From 3463b86a5ad2af78ff8d43a4576f4d743d3c46f0 Mon Sep 17 00:00:00 2001 From: Luca Bruno Date: Sun, 14 Aug 2016 21:48:31 +0000 Subject: [PATCH] Update deps for 0.11.0 --- deps/aho-corasick-0.4.1/Cargo.toml | 36 - deps/aho-corasick-0.4.1/src/autiter.rs | 401 - deps/aho-corasick-0.4.1/src/full.rs | 149 - deps/aho-corasick-0.4.1/src/lib.rs | 933 -- .../.gitignore | 0 .../.travis.yml | 0 .../COPYING | 0 deps/aho-corasick-0.5.1/Cargo.toml | 36 + .../LICENSE-MIT | 0 .../Makefile | 0 .../README.md | 0 .../UNLICENSE | 0 deps/aho-corasick-0.5.1/base | 110 + .../benches/bench.rs | 0 .../benches/random.txt | 0 .../ctags.rust | 0 .../examples/dict-search.rs | 0 deps/aho-corasick-0.5.1/memchr | 111 + deps/aho-corasick-0.5.1/memchr_take2 | 111 + .../session.vim | 0 deps/aho-corasick-0.5.1/src/autiter.rs | 475 + deps/aho-corasick-0.5.1/src/full.rs | 135 + deps/aho-corasick-0.5.1/src/lib.rs | 919 ++ .../src/main.rs | 0 .../words | 0 deps/cmake-0.1.13/Cargo.toml | 17 - deps/cmake-0.1.13/src/lib.rs | 447 - .../{cmake-0.1.13 => cmake-0.1.16}/.gitignore | 0 .../.travis.yml | 0 deps/cmake-0.1.16/Cargo.toml | 17 + .../LICENSE-APACHE | 0 .../LICENSE-MIT | 0 deps/{cmake-0.1.13 => cmake-0.1.16}/README.md | 0 deps/cmake-0.1.16/src/lib.rs | 449 + deps/crates-io-0.1.0/Cargo.toml | 17 - deps/crates-io-0.1.0/lib.rs | 268 - deps/curl-0.2.16/.travis.yml | 10 - deps/curl-0.2.16/Cargo.toml | 52 - deps/curl-0.2.16/src/ffi/easy.rs | 241 - deps/curl-0.2.16/src/http/handle.rs | 436 - deps/curl-0.2.16/test/server.rs | 258 - deps/curl-0.2.16/test/test_head.rs | 26 - deps/{curl-0.2.16 => curl-0.2.19}/.gitignore | 0 deps/{curl-0.2.16 => curl-0.2.19}/.gitmodules | 0 deps/curl-0.2.19/.travis.yml | 10 + deps/curl-0.2.19/Cargo.toml | 61 + deps/{curl-0.2.16 => curl-0.2.19}/LICENSE | 0 deps/{curl-0.2.16 => curl-0.2.19}/README.md | 0 .../src/ffi/consts.rs | 0 deps/curl-0.2.19/src/ffi/easy.rs | 246 + .../src/ffi/err.rs | 0 .../src/ffi/info.rs | 0 .../src/ffi/list.rs | 0 .../src/ffi/mod.rs | 0 .../src/ffi/opt.rs | 0 .../src/ffi/version.rs | 0 .../src/http/body.rs | 0 deps/curl-0.2.19/src/http/handle.rs | 449 + .../src/http/header.rs | 0 .../src/http/mod.rs | 0 .../src/http/response.rs | 0 deps/{curl-0.2.16 => curl-0.2.19}/src/lib.rs | 0 deps/curl-0.2.19/test/server.rs | 260 + .../{curl-0.2.16 => curl-0.2.19}/test/test.rs | 0 .../test/test_delete.rs | 0 .../test/test_get.rs | 0 deps/curl-0.2.19/test/test_head.rs | 26 + .../test/test_keep_alive.rs | 0 .../test/test_patch.rs | 0 .../test/test_post.rs | 0 .../test/test_proxy.rs | 0 .../test/test_put.rs | 0 deps/curl-sys-0.1.32/Cargo.toml | 51 - deps/curl-sys-0.1.32/build.rs | 205 - deps/curl-sys-0.1.34/Cargo.toml | 60 + deps/curl-sys-0.1.34/build.rs | 211 + .../lib.rs | 0 deps/fs2-0.2.3/.appveyor.yml | 18 + deps/{gcc-0.3.23 => fs2-0.2.3}/.gitignore | 0 deps/fs2-0.2.3/.travis.yml | 31 + deps/fs2-0.2.3/Cargo.toml | 17 + deps/{gcc-0.3.23 => fs2-0.2.3}/LICENSE-APACHE | 0 deps/fs2-0.2.3/LICENSE-MIT | 25 + deps/fs2-0.2.3/README.md | 50 + deps/fs2-0.2.3/src/lib.rs | 407 + deps/fs2-0.2.3/src/unix.rs | 217 + deps/fs2-0.2.3/src/windows.rs | 292 + deps/gcc-0.3.23/Cargo.toml | 17 - deps/gcc-0.3.23/src/lib.rs | 799 -- deps/gcc-0.3.23/src/windows_registry.rs | 359 - .../{libz-sys-1.0.1 => gcc-0.3.26}/.gitignore | 0 deps/{gcc-0.3.23 => gcc-0.3.26}/.travis.yml | 0 deps/gcc-0.3.26/Cargo.toml | 17 + .../{git2-0.4.2 => gcc-0.3.26}/LICENSE-APACHE | 0 deps/{gcc-0.3.23 => gcc-0.3.26}/LICENSE-MIT | 0 deps/{gcc-0.3.23 => gcc-0.3.26}/README.md | 0 deps/{gcc-0.3.23 => gcc-0.3.26}/appveyor.yml | 0 .../src/bin/gcc-shim.rs | 0 deps/gcc-0.3.26/src/lib.rs | 819 ++ .../src/registry.rs | 0 deps/gcc-0.3.26/src/windows_registry.rs | 381 + deps/{gcc-0.3.23 => gcc-0.3.26}/tests/test.rs | 0 deps/git2-0.4.2/Cargo.toml | 34 - deps/git2-0.4.2/README.md | 31 - deps/git2-0.4.2/appveyor.yml | 24 - deps/git2-0.4.2/examples/fetch.rs | 131 - deps/git2-0.4.2/src/blob.rs | 93 - deps/git2-0.4.2/src/commit.rs | 329 - deps/git2-0.4.2/src/cred.rs | 469 - deps/git2-0.4.2/src/error.rs | 230 - deps/git2-0.4.2/src/lib.rs | 851 -- deps/git2-0.4.2/src/object.rs | 132 - deps/git2-0.4.2/src/repo.rs | 1930 ---- deps/git2-0.4.2/src/tag.rs | 162 - deps/git2-0.4.2/src/tree.rs | 368 - deps/{git2-0.4.2 => git2-0.4.3}/.gitignore | 0 deps/{git2-0.4.2 => git2-0.4.3}/.gitmodules | 0 deps/{git2-0.4.2 => git2-0.4.3}/.travis.yml | 0 deps/git2-0.4.3/Cargo.toml | 34 + .../LICENSE-APACHE | 0 deps/{git2-0.4.2 => git2-0.4.3}/LICENSE-MIT | 0 deps/git2-0.4.3/README.md | 31 + deps/git2-0.4.3/appveyor.yml | 23 + .../examples/add.rs | 0 .../examples/blame.rs | 0 .../examples/cat-file.rs | 0 .../examples/clone.rs | 0 .../examples/diff.rs | 0 deps/git2-0.4.3/examples/fetch.rs | 131 + .../examples/init.rs | 0 .../examples/log.rs | 0 .../examples/ls-remote.rs | 0 .../examples/rev-list.rs | 0 .../examples/rev-parse.rs | 0 .../examples/status.rs | 0 .../examples/tag.rs | 0 deps/{git2-0.4.2 => git2-0.4.3}/src/blame.rs | 0 deps/git2-0.4.3/src/blob.rs | 104 + deps/{git2-0.4.2 => git2-0.4.3}/src/branch.rs | 0 deps/{git2-0.4.2 => git2-0.4.3}/src/buf.rs | 0 deps/{git2-0.4.2 => git2-0.4.3}/src/build.rs | 0 deps/{git2-0.4.2 => git2-0.4.3}/src/call.rs | 0 deps/{git2-0.4.2 => git2-0.4.3}/src/cert.rs | 0 deps/git2-0.4.3/src/commit.rs | 340 + deps/{git2-0.4.2 => git2-0.4.3}/src/config.rs | 0 deps/git2-0.4.3/src/cred.rs | 456 + .../src/describe.rs | 0 deps/{git2-0.4.2 => git2-0.4.3}/src/diff.rs | 0 deps/git2-0.4.3/src/error.rs | 237 + deps/{git2-0.4.2 => git2-0.4.3}/src/index.rs | 0 deps/git2-0.4.3/src/lib.rs | 867 ++ deps/{git2-0.4.2 => git2-0.4.3}/src/merge.rs | 0 deps/git2-0.4.3/src/message.rs | 52 + deps/{git2-0.4.2 => git2-0.4.3}/src/note.rs | 0 deps/git2-0.4.3/src/object.rs | 174 + deps/{git2-0.4.2 => git2-0.4.3}/src/oid.rs | 0 .../src/oid_array.rs | 0 deps/{git2-0.4.2 => git2-0.4.3}/src/panic.rs | 0 .../src/pathspec.rs | 0 .../src/reference.rs | 0 deps/{git2-0.4.2 => git2-0.4.3}/src/reflog.rs | 0 .../{git2-0.4.2 => git2-0.4.3}/src/refspec.rs | 0 deps/{git2-0.4.2 => git2-0.4.3}/src/remote.rs | 0 .../src/remote_callbacks.rs | 0 deps/git2-0.4.3/src/repo.rs | 1993 ++++ .../{git2-0.4.2 => git2-0.4.3}/src/revspec.rs | 0 .../{git2-0.4.2 => git2-0.4.3}/src/revwalk.rs | 0 .../src/signature.rs | 0 deps/{git2-0.4.2 => git2-0.4.3}/src/status.rs | 0 .../src/string_array.rs | 0 .../src/submodule.rs | 0 deps/git2-0.4.3/src/tag.rs | 173 + deps/{git2-0.4.2 => git2-0.4.3}/src/test.rs | 0 deps/{git2-0.4.2 => git2-0.4.3}/src/time.rs | 0 .../src/transport.rs | 0 deps/git2-0.4.3/src/tree.rs | 388 + .../src/treebuilder.rs | 0 deps/{git2-0.4.2 => git2-0.4.3}/src/util.rs | 0 deps/git2-curl-0.4.0/Cargo.toml | 30 - deps/git2-curl-0.4.0/src/lib.rs | 211 - deps/git2-curl-0.4.1/Cargo.toml | 30 + deps/git2-curl-0.4.1/src/lib.rs | 211 + .../tests/all.rs | 0 deps/glob-0.2.10/.travis.yml | 19 - deps/glob-0.2.10/Cargo.toml | 15 - deps/glob-0.2.10/README.md | 24 - deps/glob-0.2.10/src/lib.rs | 1245 --- deps/glob-0.2.10/tests/glob-std.rs | 278 - deps/{glob-0.2.10 => glob-0.2.11}/.gitignore | 0 deps/glob-0.2.11/.travis.yml | 24 + deps/glob-0.2.11/Cargo.toml | 15 + .../LICENSE-APACHE | 0 deps/{glob-0.2.10 => glob-0.2.11}/LICENSE-MIT | 0 deps/glob-0.2.11/README.md | 24 + deps/glob-0.2.11/src/lib.rs | 1312 +++ deps/glob-0.2.11/tests/glob-std.rs | 278 + deps/idna-0.1.0/Cargo.toml | 24 + .../src}/IdnaMappingTable.txt | 0 deps/idna-0.1.0/src/lib.rs | 73 + .../src/make_uts46_mapping_table.py | 56 + .../{url-0.5.5 => idna-0.1.0}/src/punycode.rs | 0 deps/idna-0.1.0/src/uts46.rs | 322 + deps/idna-0.1.0/src/uts46_mapping_table.rs | 8191 ++++++++++++++++ .../tests/IdnaTest.txt | 0 deps/idna-0.1.0/tests/punycode.rs | 65 + .../tests}/punycode_tests.json | 0 deps/idna-0.1.0/tests/tests.rs | 25 + deps/idna-0.1.0/tests/uts46.rs | 117 + deps/libc-0.2.7/.travis.yml | 62 - deps/libc-0.2.7/Cargo.toml | 17 - deps/libc-0.2.7/README.md | 117 - deps/libc-0.2.7/ci/run-travis.sh | 204 - deps/libc-0.2.7/liblibc.rlib | Bin 627398 -> 0 bytes deps/libc-0.2.7/perf.data | Bin 97508 -> 0 bytes deps/libc-0.2.7/src/lib.rs | 263 - deps/libc-0.2.7/src/macros.rs | 108 - deps/libc-0.2.7/src/unix/bsd/apple/b32.rs | 15 - deps/libc-0.2.7/src/unix/bsd/apple/b64.rs | 15 - .../src/unix/bsd/freebsdlike/dragonfly.rs | 11 - .../src/unix/bsd/freebsdlike/freebsd.rs | 13 - .../src/unix/bsd/freebsdlike/mod.rs | 657 -- deps/libc-0.2.7/src/unix/bsd/mod.rs | 337 - .../src/unix/bsd/openbsdlike/bitrig.rs | 243 - .../src/unix/bsd/openbsdlike/mod.rs | 405 - .../src/unix/bsd/openbsdlike/netbsd.rs | 373 - .../src/unix/bsd/openbsdlike/openbsd.rs | 243 - deps/libc-0.2.7/src/unix/mod.rs | 704 -- .../libc-0.2.7/src/unix/notbsd/android/b32.rs | 8 - .../libc-0.2.7/src/unix/notbsd/android/b64.rs | 8 - .../libc-0.2.7/src/unix/notbsd/android/mod.rs | 605 -- deps/libc-0.2.7/src/unix/notbsd/linux/mips.rs | 507 - deps/libc-0.2.7/src/unix/notbsd/linux/mod.rs | 561 -- .../src/unix/notbsd/linux/musl/b32/arm.rs | 298 - .../src/unix/notbsd/linux/musl/b32/asmjs.rs | 298 - .../src/unix/notbsd/linux/musl/b32/mips.rs | 303 - .../src/unix/notbsd/linux/musl/b32/mod.rs | 42 - .../src/unix/notbsd/linux/musl/b32/x86.rs | 298 - .../src/unix/notbsd/linux/musl/b64/mod.rs | 325 - .../src/unix/notbsd/linux/other/b32/arm.rs | 20 - .../src/unix/notbsd/linux/other/b32/mod.rs | 95 - .../unix/notbsd/linux/other/b32/powerpc.rs | 20 - .../src/unix/notbsd/linux/other/b32/x86.rs | 20 - .../unix/notbsd/linux/other/b64/aarch64.rs | 77 - .../src/unix/notbsd/linux/other/b64/mod.rs | 32 - .../unix/notbsd/linux/other/b64/powerpc64.rs | 75 - .../src/unix/notbsd/linux/other/b64/x86_64.rs | 82 - .../src/unix/notbsd/linux/other/mod.rs | 499 - deps/libc-0.2.7/src/unix/notbsd/mod.rs | 658 -- deps/libc-0.2.7/src/unix/solaris/mod.rs | 766 -- deps/libc-0.2.7/src/windows.rs | 178 - deps/{libc-0.2.7 => libc-0.2.8}/.gitignore | 0 deps/libc-0.2.8/.travis.yml | 67 + deps/libc-0.2.8/Cargo.toml | 18 + .../LICENSE-APACHE | 0 deps/{libc-0.2.7 => libc-0.2.8}/LICENSE-MIT | 0 deps/libc-0.2.8/README.md | 126 + deps/{libc-0.2.7 => libc-0.2.8}/appveyor.yml | 0 deps/{libc-0.2.7 => libc-0.2.8}/ci/README.md | 0 .../ci/cargo-config | 0 deps/{libc-0.2.7 => libc-0.2.8}/ci/dox.sh | 0 .../ci/landing-page-footer.html | 0 .../ci/landing-page-head.html | 0 .../ci/mips/Dockerfile | 0 .../ci/rumprun/Dockerfile | 0 deps/{libc-0.2.7 => libc-0.2.8}/ci/run-all.sh | 0 .../{libc-0.2.7 => libc-0.2.8}/ci/run-qemu.sh | 0 deps/libc-0.2.8/ci/run-travis.sh | 188 + deps/{libc-0.2.7 => libc-0.2.8}/ci/run.sh | 0 deps/libc-0.2.8/ci/style.rs | 204 + deps/{libc-0.2.7 => libc-0.2.8}/src/dox.rs | 0 deps/libc-0.2.8/src/lib.rs | 265 + deps/libc-0.2.8/src/macros.rs | 108 + deps/libc-0.2.8/src/unix/bsd/apple/b32.rs | 15 + deps/libc-0.2.8/src/unix/bsd/apple/b64.rs | 15 + .../src/unix/bsd/apple/mod.rs | 0 .../src/unix/bsd/freebsdlike/dragonfly/mod.rs | 103 + .../src/unix/bsd/freebsdlike/freebsd/mod.rs | 91 + .../src/unix/bsd/freebsdlike/freebsd}/x86.rs | 0 .../unix/bsd/freebsdlike/freebsd}/x86_64.rs | 0 .../src/unix/bsd/freebsdlike/mod.rs | 608 ++ deps/libc-0.2.8/src/unix/bsd/mod.rs | 355 + .../src/unix/bsd/openbsdlike/bitrig.rs | 247 + .../src/unix/bsd/openbsdlike/mod.rs | 409 + .../src/unix/bsd/openbsdlike/netbsd.rs | 387 + .../src/unix/bsd/openbsdlike/openbsd.rs | 247 + deps/libc-0.2.8/src/unix/mod.rs | 731 ++ .../libc-0.2.8/src/unix/notbsd/android/b32.rs | 12 + .../libc-0.2.8/src/unix/notbsd/android/b64.rs | 12 + .../libc-0.2.8/src/unix/notbsd/android/mod.rs | 662 ++ deps/libc-0.2.8/src/unix/notbsd/linux/mips.rs | 513 ++ deps/libc-0.2.8/src/unix/notbsd/linux/mod.rs | 569 ++ .../src/unix/notbsd/linux/musl/b32/arm.rs | 306 + .../src/unix/notbsd/linux/musl/b32/asmjs.rs | 306 + .../src/unix/notbsd/linux/musl/b32/mips.rs | 305 + .../src/unix/notbsd/linux/musl/b32/mod.rs | 42 + .../src/unix/notbsd/linux/musl/b32/x86.rs | 307 + .../src/unix/notbsd/linux/musl/b64/mod.rs | 328 + .../src/unix/notbsd/linux/musl/mod.rs | 0 .../src/unix/notbsd/linux/other/b32/arm.rs | 22 + .../src/unix/notbsd/linux/other/b32/mod.rs | 95 + .../unix/notbsd/linux/other/b32/powerpc.rs | 22 + .../src/unix/notbsd/linux/other/b32/x86.rs | 48 + .../unix/notbsd/linux/other/b64/aarch64.rs | 79 + .../src/unix/notbsd/linux/other/b64/mod.rs | 32 + .../unix/notbsd/linux/other/b64/powerpc64.rs | 77 + .../src/unix/notbsd/linux/other/b64/x86_64.rs | 108 + .../src/unix/notbsd/linux/other/mod.rs | 496 + deps/libc-0.2.8/src/unix/notbsd/mod.rs | 685 ++ deps/libc-0.2.8/src/unix/solaris/mod.rs | 770 ++ deps/libc-0.2.8/src/windows.rs | 180 + deps/libgit2-sys-0.4.0/Cargo.toml | 57 - deps/libgit2-sys-0.4.0/build.rs | 170 - deps/libgit2-sys-0.4.0/lib.rs | 2433 ----- .../libgit2/script/toolchain-mingw32.cmake | 13 - deps/libgit2-sys-0.4.3/Cargo.toml | 60 + deps/libgit2-sys-0.4.3/build.rs | 175 + deps/libgit2-sys-0.4.3/lib.rs | 2450 +++++ deps/libgit2-sys-0.4.3/libgit2/.HEADER | 24 + deps/libgit2-sys-0.4.3/libgit2/.editorconfig | 14 + deps/libgit2-sys-0.4.3/libgit2/.gitattributes | 1 + deps/libgit2-sys-0.4.3/libgit2/.gitignore | 33 + deps/libgit2-sys-0.4.3/libgit2/.mailmap | 22 + deps/libgit2-sys-0.4.3/libgit2/.travis.yml | 87 + .../libgit2/AUTHORS | 0 .../libgit2/CHANGELOG.md | 0 .../libgit2/CMakeLists.txt | 0 .../libgit2/CODE_OF_CONDUCT.md | 0 .../libgit2/CONTRIBUTING.md | 0 .../libgit2/CONVENTIONS.md | 0 .../libgit2/COPYING | 0 .../libgit2/Makefile.embed | 0 .../libgit2/PROJECTS.md | 0 .../libgit2/README.md | 0 .../libgit2/THREADING.md | 0 .../libgit2/api.docurium | 0 .../libgit2/appveyor.yml | 0 .../cmake/Modules/AddCFlagIfSupported.cmake | 0 .../cmake/Modules/FindCoreFoundation.cmake | 0 .../libgit2/cmake/Modules/FindGSSAPI.cmake | 0 .../cmake/Modules/FindHTTP_Parser.cmake | 0 .../libgit2/cmake/Modules/FindIconv.cmake | 0 .../libgit2/cmake/Modules/FindSecurity.cmake | 0 .../libgit2/docs/checkout-internals.md | 0 .../libgit2/docs/diff-internals.md | 0 .../libgit2/docs/error-handling.md | 0 .../libgit2/docs/merge-df_conflicts.txt | 0 .../libgit2/git.git-authors | 0 .../libgit2/include/git2.h | 0 .../libgit2/include/git2/annotated_commit.h | 0 .../libgit2/include/git2/attr.h | 0 .../libgit2/include/git2/blame.h | 0 .../libgit2/include/git2/blob.h | 0 .../libgit2/include/git2/branch.h | 0 .../libgit2/include/git2/buffer.h | 0 .../libgit2/include/git2/checkout.h | 0 .../libgit2/include/git2/cherrypick.h | 0 .../libgit2/include/git2/clone.h | 0 .../libgit2/include/git2/commit.h | 0 .../libgit2/include/git2/common.h | 0 .../libgit2/include/git2/config.h | 0 .../libgit2/include/git2/cred_helpers.h | 0 .../libgit2/include/git2/describe.h | 0 .../libgit2/include/git2/diff.h | 0 .../libgit2/include/git2/errors.h | 0 .../libgit2/include/git2/filter.h | 0 .../libgit2/include/git2/global.h | 0 .../libgit2/include/git2/graph.h | 0 .../libgit2/include/git2/ignore.h | 0 .../libgit2/include/git2/index.h | 0 .../libgit2/include/git2/indexer.h | 0 .../libgit2/include/git2/inttypes.h | 0 .../libgit2/include/git2/merge.h | 0 .../libgit2/include/git2/message.h | 0 .../libgit2/include/git2/net.h | 0 .../libgit2/include/git2/notes.h | 0 .../libgit2/include/git2/object.h | 0 .../libgit2/include/git2/odb.h | 0 .../libgit2/include/git2/odb_backend.h | 0 .../libgit2/include/git2/oid.h | 0 .../libgit2/include/git2/oidarray.h | 0 .../libgit2/include/git2/pack.h | 0 .../libgit2/include/git2/patch.h | 0 .../libgit2/include/git2/pathspec.h | 0 .../libgit2/include/git2/rebase.h | 0 .../libgit2/include/git2/refdb.h | 0 .../libgit2/include/git2/reflog.h | 0 .../libgit2/include/git2/refs.h | 0 .../libgit2/include/git2/refspec.h | 0 .../libgit2/include/git2/remote.h | 0 .../libgit2/include/git2/repository.h | 0 .../libgit2/include/git2/reset.h | 0 .../libgit2/include/git2/revert.h | 0 .../libgit2/include/git2/revparse.h | 0 .../libgit2/include/git2/revwalk.h | 0 .../libgit2/include/git2/signature.h | 0 .../libgit2/include/git2/stash.h | 0 .../libgit2/include/git2/status.h | 0 .../libgit2/include/git2/stdint.h | 0 .../libgit2/include/git2/strarray.h | 0 .../libgit2/include/git2/submodule.h | 0 .../libgit2/include/git2/sys/commit.h | 0 .../libgit2/include/git2/sys/config.h | 0 .../libgit2/include/git2/sys/diff.h | 0 .../libgit2/include/git2/sys/filter.h | 0 .../libgit2/include/git2/sys/hashsig.h | 0 .../libgit2/include/git2/sys/index.h | 0 .../libgit2/include/git2/sys/mempack.h | 0 .../libgit2/include/git2/sys/odb_backend.h | 0 .../libgit2/include/git2/sys/openssl.h | 0 .../libgit2/include/git2/sys/refdb_backend.h | 0 .../libgit2/include/git2/sys/reflog.h | 0 .../libgit2/include/git2/sys/refs.h | 0 .../libgit2/include/git2/sys/repository.h | 0 .../libgit2/include/git2/sys/stream.h | 0 .../libgit2/include/git2/sys/transport.h | 0 .../libgit2/include/git2/tag.h | 0 .../libgit2/include/git2/trace.h | 0 .../libgit2/include/git2/transaction.h | 0 .../libgit2/include/git2/transport.h | 0 .../libgit2/include/git2/tree.h | 0 .../libgit2/include/git2/types.h | 0 .../libgit2/include/git2/version.h | 0 .../libgit2/libgit2.pc.in | 0 .../libgit2/libgit2_clar.supp | 0 .../libgit2/script/appveyor-mingw.sh | 0 .../libgit2/script/cibuild.sh | 0 .../libgit2/script/coverity.sh | 0 .../libgit2/script/install-deps-osx.sh | 0 .../libgit2/script/user_nodefs.h | 0 .../libgit2/src/annotated_commit.c | 0 .../libgit2/src/annotated_commit.h | 0 .../libgit2/src/array.h | 0 .../libgit2/src/attr.c | 0 .../libgit2/src/attr.h | 0 .../libgit2/src/attr_file.c | 0 .../libgit2/src/attr_file.h | 0 .../libgit2/src/attrcache.c | 0 .../libgit2/src/attrcache.h | 0 .../libgit2/src/bitvec.h | 0 .../libgit2/src/blame.c | 0 .../libgit2/src/blame.h | 0 .../libgit2/src/blame_git.c | 0 .../libgit2/src/blame_git.h | 0 .../libgit2/src/blob.c | 0 .../libgit2/src/blob.h | 0 .../libgit2/src/branch.c | 0 .../libgit2/src/branch.h | 0 .../libgit2/src/buf_text.c | 0 .../libgit2/src/buf_text.h | 0 .../libgit2/src/buffer.c | 0 .../libgit2/src/buffer.h | 0 .../libgit2/src/cache.c | 0 .../libgit2/src/cache.h | 0 .../libgit2/src/cc-compat.h | 0 .../libgit2/src/checkout.c | 0 .../libgit2/src/checkout.h | 0 .../libgit2/src/cherrypick.c | 0 .../libgit2/src/clone.c | 0 .../libgit2/src/clone.h | 0 .../libgit2/src/commit.c | 0 .../libgit2/src/commit.h | 0 .../libgit2/src/commit_list.c | 0 .../libgit2/src/commit_list.h | 0 .../libgit2/src/common.h | 0 .../libgit2/src/config.c | 0 .../libgit2/src/config.h | 0 .../libgit2/src/config_cache.c | 0 .../libgit2/src/config_file.c | 0 .../libgit2/src/config_file.h | 0 .../libgit2/src/crlf.c | 0 .../libgit2/src/curl_stream.c | 0 .../libgit2/src/curl_stream.h | 0 .../libgit2/src/date.c | 0 .../libgit2/src/delta-apply.c | 0 .../libgit2/src/delta-apply.h | 0 .../libgit2/src/delta.c | 0 .../libgit2/src/delta.h | 0 .../libgit2/src/describe.c | 0 .../libgit2/src/diff.c | 0 .../libgit2/src/diff.h | 0 .../libgit2/src/diff_driver.c | 0 .../libgit2/src/diff_driver.h | 0 .../libgit2/src/diff_file.c | 0 .../libgit2/src/diff_file.h | 0 .../libgit2/src/diff_patch.c | 0 .../libgit2/src/diff_patch.h | 0 .../libgit2/src/diff_print.c | 0 .../libgit2/src/diff_stats.c | 0 .../libgit2/src/diff_tform.c | 0 .../libgit2/src/diff_xdiff.c | 0 .../libgit2/src/diff_xdiff.h | 0 .../libgit2/src/errors.c | 0 .../libgit2/src/fetch.c | 0 .../libgit2/src/fetch.h | 0 .../libgit2/src/fetchhead.c | 0 .../libgit2/src/fetchhead.h | 0 .../libgit2/src/filebuf.c | 0 .../libgit2/src/filebuf.h | 0 .../libgit2/src/fileops.c | 0 .../libgit2/src/fileops.h | 0 .../libgit2/src/filter.c | 0 .../libgit2/src/filter.h | 0 .../libgit2/src/fnmatch.c | 0 .../libgit2/src/fnmatch.h | 0 .../libgit2/src/global.c | 0 .../libgit2/src/global.h | 0 .../libgit2/src/graph.c | 0 .../libgit2/src/hash.c | 0 .../libgit2/src/hash.h | 0 .../libgit2/src/hash/hash_common_crypto.h | 0 .../libgit2/src/hash/hash_generic.c | 0 .../libgit2/src/hash/hash_generic.h | 0 .../libgit2/src/hash/hash_openssl.h | 0 .../libgit2/src/hash/hash_win32.c | 0 .../libgit2/src/hash/hash_win32.h | 0 .../libgit2/src/hashsig.c | 0 .../libgit2/src/ident.c | 0 .../libgit2/src/idxmap.h | 0 .../libgit2/src/ignore.c | 0 .../libgit2/src/ignore.h | 0 .../libgit2/src/index.c | 0 .../libgit2/src/index.h | 0 .../libgit2/src/indexer.c | 0 .../libgit2/src/integer.h | 0 .../libgit2/src/iterator.c | 0 .../libgit2/src/iterator.h | 0 .../libgit2/src/khash.h | 0 .../libgit2/src/map.h | 0 .../libgit2/src/merge.c | 0 .../libgit2/src/merge.h | 0 .../libgit2/src/merge_file.c | 0 .../libgit2/src/message.c | 0 .../libgit2/src/message.h | 0 .../libgit2/src/mwindow.c | 0 .../libgit2/src/mwindow.h | 0 .../libgit2/src/netops.c | 0 .../libgit2/src/netops.h | 0 .../libgit2/src/notes.c | 0 .../libgit2/src/notes.h | 0 .../libgit2/src/object.c | 0 .../libgit2/src/object.h | 0 .../libgit2/src/object_api.c | 0 .../libgit2/src/odb.c | 0 .../libgit2/src/odb.h | 0 .../libgit2/src/odb_loose.c | 0 .../libgit2/src/odb_mempack.c | 0 .../libgit2/src/odb_pack.c | 0 .../libgit2/src/offmap.h | 0 .../libgit2/src/oid.c | 0 .../libgit2/src/oid.h | 0 .../libgit2/src/oidarray.c | 0 .../libgit2/src/oidarray.h | 0 .../libgit2/src/oidmap.h | 0 .../libgit2/src/openssl_stream.c | 0 .../libgit2/src/openssl_stream.h | 0 .../libgit2/src/pack-objects.c | 0 .../libgit2/src/pack-objects.h | 0 .../libgit2/src/pack.c | 0 .../libgit2/src/pack.h | 0 .../libgit2/src/path.c | 0 .../libgit2/src/path.h | 0 .../libgit2/src/pathspec.c | 0 .../libgit2/src/pathspec.h | 0 .../libgit2/src/pool.c | 0 .../libgit2/src/pool.h | 0 .../libgit2/src/posix.c | 0 .../libgit2/src/posix.h | 0 .../libgit2/src/pqueue.c | 0 .../libgit2/src/pqueue.h | 0 .../libgit2/src/push.c | 0 .../libgit2/src/push.h | 0 .../libgit2/src/rebase.c | 0 .../libgit2/src/refdb.c | 0 .../libgit2/src/refdb.h | 0 .../libgit2/src/refdb_fs.c | 0 .../libgit2/src/refdb_fs.h | 0 .../libgit2/src/reflog.c | 0 .../libgit2/src/reflog.h | 0 .../libgit2/src/refs.c | 0 .../libgit2/src/refs.h | 0 .../libgit2/src/refspec.c | 0 .../libgit2/src/refspec.h | 0 .../libgit2/src/remote.c | 0 .../libgit2/src/remote.h | 0 .../libgit2/src/repo_template.h | 0 .../libgit2/src/repository.c | 0 .../libgit2/src/repository.h | 0 .../libgit2/src/reset.c | 0 .../libgit2/src/revert.c | 0 .../libgit2/src/revparse.c | 0 .../libgit2/src/revwalk.c | 0 .../libgit2/src/revwalk.h | 0 .../libgit2/src/settings.c | 0 .../libgit2/src/sha1_lookup.c | 0 .../libgit2/src/sha1_lookup.h | 0 .../libgit2/src/signature.c | 0 .../libgit2/src/signature.h | 0 .../libgit2/src/socket_stream.c | 0 .../libgit2/src/socket_stream.h | 0 .../libgit2/src/sortedcache.c | 0 .../libgit2/src/sortedcache.h | 0 .../libgit2/src/stash.c | 0 .../libgit2/src/status.c | 0 .../libgit2/src/status.h | 0 .../libgit2/src/stransport_stream.c | 0 .../libgit2/src/stransport_stream.h | 0 .../libgit2/src/stream.h | 0 .../libgit2/src/strmap.c | 0 .../libgit2/src/strmap.h | 0 .../libgit2/src/strnlen.h | 0 .../libgit2/src/submodule.c | 0 .../libgit2/src/submodule.h | 0 .../libgit2/src/sysdir.c | 0 .../libgit2/src/sysdir.h | 0 .../libgit2/src/tag.c | 0 .../libgit2/src/tag.h | 0 .../libgit2/src/thread-utils.c | 0 .../libgit2/src/thread-utils.h | 0 .../libgit2/src/tls_stream.c | 0 .../libgit2/src/tls_stream.h | 0 .../libgit2/src/trace.c | 0 .../libgit2/src/trace.h | 0 .../libgit2/src/transaction.c | 0 .../libgit2/src/transaction.h | 0 .../libgit2/src/transport.c | 0 .../libgit2/src/transports/auth.c | 0 .../libgit2/src/transports/auth.h | 0 .../libgit2/src/transports/auth_negotiate.c | 0 .../libgit2/src/transports/auth_negotiate.h | 0 .../libgit2/src/transports/cred.c | 0 .../libgit2/src/transports/cred.h | 0 .../libgit2/src/transports/cred_helpers.c | 0 .../libgit2/src/transports/git.c | 0 .../libgit2/src/transports/http.c | 0 .../libgit2/src/transports/local.c | 0 .../libgit2/src/transports/smart.c | 0 .../libgit2/src/transports/smart.h | 0 .../libgit2/src/transports/smart_pkt.c | 0 .../libgit2/src/transports/smart_protocol.c | 0 .../libgit2/src/transports/ssh.c | 0 .../libgit2/src/transports/winhttp.c | 0 .../libgit2/src/tree-cache.c | 0 .../libgit2/src/tree-cache.h | 0 .../libgit2/src/tree.c | 0 .../libgit2/src/tree.h | 0 .../libgit2/src/tsort.c | 0 .../libgit2/src/unix/map.c | 0 .../libgit2/src/unix/posix.h | 0 .../libgit2/src/unix/realpath.c | 0 .../libgit2/src/userdiff.h | 0 .../libgit2/src/util.c | 0 .../libgit2/src/util.h | 0 .../libgit2/src/vector.c | 0 .../libgit2/src/vector.h | 0 .../libgit2/src/win32/dir.c | 0 .../libgit2/src/win32/dir.h | 0 .../libgit2/src/win32/error.c | 0 .../libgit2/src/win32/error.h | 0 .../libgit2/src/win32/findfile.c | 0 .../libgit2/src/win32/findfile.h | 0 .../libgit2/src/win32/git2.rc | 0 .../libgit2/src/win32/map.c | 0 .../libgit2/src/win32/mingw-compat.h | 0 .../libgit2/src/win32/msvc-compat.h | 0 .../libgit2/src/win32/path_w32.c | 0 .../libgit2/src/win32/path_w32.h | 0 .../libgit2/src/win32/posix.h | 0 .../libgit2/src/win32/posix_w32.c | 0 .../libgit2/src/win32/precompiled.c | 0 .../libgit2/src/win32/precompiled.h | 0 .../libgit2/src/win32/pthread.c | 0 .../libgit2/src/win32/pthread.h | 0 .../libgit2/src/win32/reparse.h | 0 .../libgit2/src/win32/utf-conv.c | 0 .../libgit2/src/win32/utf-conv.h | 0 .../libgit2/src/win32/version.h | 0 .../libgit2/src/win32/w32_buffer.c | 0 .../libgit2/src/win32/w32_buffer.h | 0 .../libgit2/src/win32/w32_crtdbg_stacktrace.c | 0 .../libgit2/src/win32/w32_crtdbg_stacktrace.h | 0 .../libgit2/src/win32/w32_stack.c | 0 .../libgit2/src/win32/w32_stack.h | 0 .../libgit2/src/win32/w32_util.c | 0 .../libgit2/src/win32/w32_util.h | 0 .../libgit2/src/win32/win32-compat.h | 0 .../libgit2/src/xdiff/xdiff.h | 0 .../libgit2/src/xdiff/xdiffi.c | 0 .../libgit2/src/xdiff/xdiffi.h | 0 .../libgit2/src/xdiff/xemit.c | 0 .../libgit2/src/xdiff/xemit.h | 0 .../libgit2/src/xdiff/xhistogram.c | 0 .../libgit2/src/xdiff/xinclude.h | 0 .../libgit2/src/xdiff/xmacros.h | 0 .../libgit2/src/xdiff/xmerge.c | 0 .../libgit2/src/xdiff/xpatience.c | 0 .../libgit2/src/xdiff/xprepare.c | 0 .../libgit2/src/xdiff/xprepare.h | 0 .../libgit2/src/xdiff/xtypes.h | 0 .../libgit2/src/xdiff/xutils.c | 0 .../libgit2/src/xdiff/xutils.h | 0 .../libgit2/src/zstream.c | 0 .../libgit2/src/zstream.h | 0 deps/libssh2-sys-0.1.36/Cargo.toml | 52 - deps/libssh2-sys-0.1.37/Cargo.toml | 57 + .../build.rs | 0 .../lib.rs | 0 deps/libz-sys-1.0.1/Cargo.toml | 20 - deps/libz-sys-1.0.1/build.rs | 123 - .../.gitignore | 0 .../.travis.yml | 0 deps/libz-sys-1.0.2/Cargo.toml | 20 + .../LICENSE-APACHE | 0 .../LICENSE-MIT | 0 .../README.md | 0 .../appveyor.yml | 0 deps/libz-sys-1.0.2/build.rs | 124 + .../src/lib.rs | 0 .../.gitignore | 0 deps/memchr-0.1.10/.travis.yml | 13 + deps/{memchr-0.1.7 => memchr-0.1.10}/COPYING | 0 deps/memchr-0.1.10/Cargo.toml | 20 + .../LICENSE-MIT | 0 deps/{memchr-0.1.7 => memchr-0.1.10}/Makefile | 0 .../{memchr-0.1.7 => memchr-0.1.10}/README.md | 0 .../{memchr-0.1.7 => memchr-0.1.10}/UNLICENSE | 0 .../appveyor.yml | 0 deps/memchr-0.1.10/benches/bench.rs | 93 + .../ctags.rust | 0 .../session.vim | 0 deps/memchr-0.1.10/src/lib.rs | 609 ++ deps/memchr-0.1.7/.travis.yml | 12 - deps/memchr-0.1.7/Cargo.toml | 20 - deps/memchr-0.1.7/benches/bench.rs | 48 - deps/memchr-0.1.7/src/lib.rs | 398 - deps/nom-1.2.0/.travis.yml | 43 - deps/nom-1.2.0/CHANGELOG.md | 459 - deps/nom-1.2.0/Cargo.toml | 38 - deps/nom-1.2.0/src/bytes.rs | 1006 -- deps/nom-1.2.0/src/internal.rs | 132 - deps/nom-1.2.0/src/lib.rs | 150 - deps/nom-1.2.0/src/macros.rs | 3203 ------- deps/nom-1.2.0/src/methods.rs | 480 - deps/nom-1.2.0/src/nom.rs | 818 -- deps/nom-1.2.0/src/regexp.rs | 315 - deps/nom-1.2.0/src/str.rs | 729 -- deps/nom-1.2.0/src/util.rs | 688 -- deps/{nom-1.2.0 => nom-1.2.2}/.gitignore | 0 deps/nom-1.2.2/.travis.yml | 46 + deps/nom-1.2.2/CHANGELOG.md | 497 + deps/nom-1.2.2/Cargo.toml | 38 + deps/{nom-1.2.0 => nom-1.2.2}/LICENSE | 0 deps/{nom-1.2.0 => nom-1.2.2}/src/bits.rs | 0 deps/nom-1.2.2/src/bytes.rs | 1023 ++ .../{nom-1.2.0 => nom-1.2.2}/src/character.rs | 0 deps/nom-1.2.2/src/internal.rs | 271 + deps/nom-1.2.2/src/lib.rs | 151 + deps/nom-1.2.2/src/macros.rs | 3106 +++++++ deps/nom-1.2.2/src/methods.rs | 480 + deps/nom-1.2.2/src/nom.rs | 892 ++ deps/nom-1.2.2/src/regexp.rs | 328 + deps/nom-1.2.2/src/str.rs | 734 ++ deps/{nom-1.2.0 => nom-1.2.2}/src/stream.rs | 0 deps/nom-1.2.2/src/util.rs | 763 ++ .../tests/arithmetic.rs | 0 .../tests/cross_function_backtracking.rs | 142 + deps/{nom-1.2.0 => nom-1.2.2}/tests/ini.rs | 0 .../{nom-1.2.0 => nom-1.2.2}/tests/ini_str.rs | 0 deps/{nom-1.2.0 => nom-1.2.2}/tests/issues.rs | 0 deps/{nom-1.2.0 => nom-1.2.2}/tests/mp4.rs | 0 deps/{nom-1.2.0 => nom-1.2.2}/tests/omnom.rs | 0 deps/{nom-1.2.0 => nom-1.2.2}/tests/test1.rs | 0 deps/num_cpus-0.2.10/Cargo.toml | 14 - deps/num_cpus-0.2.10/src/lib.rs | 102 - .../.gitignore | 0 deps/num_cpus-0.2.11/Cargo.toml | 12 + .../LICENSE | 0 .../README.md | 0 deps/num_cpus-0.2.11/src/lib.rs | 115 + deps/openssl-sys-0.7.6/Cargo.toml | 54 - deps/openssl-sys-0.7.6/src/lib.rs | 762 -- deps/openssl-sys-0.7.8/Cargo.toml | 54 + .../LICENSE-MIT | 0 .../build.rs | 0 deps/openssl-sys-0.7.8/src/lib.rs | 772 ++ .../src/probe.rs | 0 deps/pkg-config-0.3.6/.travis.yml | 25 - deps/pkg-config-0.3.6/Cargo.toml | 13 - deps/pkg-config-0.3.6/src/lib.rs | 298 - deps/pkg-config-0.3.6/tests/test.rs | 86 - .../.gitignore | 0 deps/pkg-config-0.3.8/.travis.yml | 25 + deps/pkg-config-0.3.8/Cargo.toml | 13 + .../LICENSE-APACHE | 0 .../LICENSE-MIT | 0 .../README.md | 0 deps/pkg-config-0.3.8/src/lib.rs | 471 + .../tests/foo.pc | 0 .../tests/framework.pc | 0 deps/pkg-config-0.3.8/tests/test.rs | 97 + deps/regex-0.1.48/.travis.yml | 40 - deps/regex-0.1.48/Cargo.toml | 48 - deps/regex-0.1.48/README.md | 144 - .../examples/shootout-regex-dna-cheat.rs | 94 - .../examples/shootout-regex-dna.rs | 71 - deps/regex-0.1.48/src/backtrack.rs | 268 - deps/regex-0.1.48/src/char.rs | 100 - deps/regex-0.1.48/src/compile.rs | 517 -- deps/regex-0.1.48/src/input.rs | 114 - deps/regex-0.1.48/src/inst.rs | 142 - deps/regex-0.1.48/src/lib.rs | 440 - deps/regex-0.1.48/src/nfa.rs | 295 - deps/regex-0.1.48/src/prefix.rs | 243 - deps/regex-0.1.48/src/program.rs | 437 - deps/regex-0.1.48/src/re.rs | 1265 --- .../{regex-0.1.48 => regex-0.1.58}/.gitignore | 0 deps/regex-0.1.58/.travis.yml | 50 + deps/regex-0.1.58/Cargo.toml | 93 + deps/regex-0.1.58/HACKING.md | 315 + .../LICENSE-APACHE | 0 .../LICENSE-MIT | 0 deps/regex-0.1.58/README.md | 246 + .../appveyor.yml | 0 .../examples/regexdna-input.txt | 0 .../examples/regexdna-output.txt | 0 deps/regex-0.1.58/examples/set.rs | 19 + .../examples/shootout-regex-dna-bytes.rs | 66 + .../examples/shootout-regex-dna-cheat.rs | 88 + .../examples/shootout-regex-dna-replace.rs | 19 + .../shootout-regex-dna-single-cheat.rs | 73 + .../examples/shootout-regex-dna-single.rs | 0 .../examples/shootout-regex-dna.rs | 66 + deps/regex-0.1.58/run-bench | 46 + deps/regex-0.1.58/run-kcov | 59 + .../run-shootout-test | 0 .../scripts/regex-match-tests.py | 0 .../scripts/unicode.py | 0 deps/regex-0.1.58/src/backtrack.rs | 292 + deps/regex-0.1.58/src/compile.rs | 1055 +++ deps/regex-0.1.58/src/dfa.rs | 1293 +++ deps/regex-0.1.58/src/error.rs | 74 + deps/regex-0.1.58/src/exec.rs | 570 ++ deps/regex-0.1.58/src/expand.rs | 91 + deps/regex-0.1.58/src/input.rs | 312 + deps/regex-0.1.58/src/lib.rs | 619 ++ deps/regex-0.1.58/src/literals.rs | 814 ++ deps/regex-0.1.58/src/nfa.rs | 360 + .../src/pool.rs | 0 deps/regex-0.1.58/src/prog.rs | 474 + deps/regex-0.1.58/src/re_bytes.rs | 963 ++ deps/regex-0.1.58/src/re_unicode.rs | 1277 +++ deps/regex-0.1.58/src/set.rs | 349 + deps/regex-0.1.58/src/sparse.rs | 82 + .../src/testdata/LICENSE | 0 .../src/testdata/README | 0 .../src/testdata/basic.dat | 0 .../src/testdata/nullsubexpr.dat | 0 .../src/testdata/repetition.dat | 0 deps/regex-0.1.58/src/utf8.rs | 250 + deps/regex-0.1.58/tests/api.rs | 236 + deps/regex-0.1.58/tests/api_str.rs | 27 + deps/regex-0.1.58/tests/bytes.rs | 40 + deps/regex-0.1.58/tests/crazy.rs | 76 + deps/regex-0.1.58/tests/flags.rs | 11 + deps/regex-0.1.58/tests/fowler.rs | 371 + deps/regex-0.1.58/tests/macros.rs | 115 + deps/regex-0.1.58/tests/macros_bytes.rs | 43 + deps/regex-0.1.58/tests/macros_str.rs | 33 + deps/regex-0.1.58/tests/misc.rs | 16 + deps/regex-0.1.58/tests/multiline.rs | 49 + deps/regex-0.1.58/tests/noparse.rs | 48 + deps/regex-0.1.58/tests/plugin.rs | 26 + deps/regex-0.1.58/tests/regression.rs | 44 + deps/regex-0.1.58/tests/replace.rs | 35 + deps/regex-0.1.58/tests/searcher.rs | 66 + deps/regex-0.1.58/tests/set.rs | 26 + deps/regex-0.1.58/tests/test_backtrack.rs | 43 + .../tests/test_backtrack_bytes.rs | 44 + .../tests/test_backtrack_utf8bytes.rs | 43 + deps/regex-0.1.58/tests/test_default.rs | 94 + deps/regex-0.1.58/tests/test_default_bytes.rs | 54 + deps/regex-0.1.58/tests/test_nfa.rs | 42 + deps/regex-0.1.58/tests/test_nfa_bytes.rs | 42 + deps/regex-0.1.58/tests/test_nfa_utf8bytes.rs | 42 + deps/regex-0.1.58/tests/test_plugin.rs | 30 + deps/regex-0.1.58/tests/unicode.rs | 28 + deps/regex-syntax-0.2.2/Cargo.toml | 13 - deps/regex-syntax-0.2.2/src/lib.rs | 1201 --- deps/regex-syntax-0.2.2/src/parser.rs | 2314 ----- deps/regex-syntax-0.2.2/src/properties.rs | 398 - deps/regex-syntax-0.3.0/Cargo.toml | 13 + deps/regex-syntax-0.3.0/src/lib.rs | 1844 ++++ deps/regex-syntax-0.3.0/src/parser.rs | 2715 ++++++ deps/regex-syntax-0.3.0/src/properties.rs | 460 + .../src/unicode.rs | 0 deps/semver-0.2.2/.travis.yml | 34 - deps/semver-0.2.2/Cargo.toml | 25 - deps/semver-0.2.2/src/lib.rs | 182 - deps/semver-0.2.2/src/parser.rs | 211 - deps/semver-0.2.2/src/version.rs | 482 - deps/semver-0.2.2/src/version_req.rs | 1082 --- .../{semver-0.2.2 => semver-0.2.3}/.gitignore | 0 deps/semver-0.2.3/.travis.yml | 31 + deps/semver-0.2.3/Cargo.toml | 25 + .../LICENSE-APACHE | 0 .../LICENSE-MIT | 0 deps/{semver-0.2.2 => semver-0.2.3}/README.md | 0 deps/semver-0.2.3/src/lib.rs | 182 + deps/semver-0.2.3/src/parser.rs | 205 + deps/semver-0.2.3/src/version.rs | 622 ++ deps/semver-0.2.3/src/version_req.rs | 1110 +++ .../tests/regression.rs | 0 deps/tar-0.4.3/Cargo.toml | 25 - deps/tar-0.4.3/src/archive.rs | 364 - deps/tar-0.4.3/src/builder.rs | 267 - deps/tar-0.4.3/src/entry.rs | 306 - deps/tar-0.4.3/src/header.rs | 895 -- deps/tar-0.4.3/src/lib.rs | 65 - deps/tar-0.4.3/tests/all.rs | 467 - deps/tar-0.4.3/tests/header/mod.rs | 135 - deps/{tar-0.4.3 => tar-0.4.5}/.gitignore | 0 deps/{tar-0.4.3 => tar-0.4.5}/.travis.yml | 0 deps/tar-0.4.5/Cargo.toml | 25 + .../{time-0.1.34 => tar-0.4.5}/LICENSE-APACHE | 0 deps/{tar-0.4.3 => tar-0.4.5}/LICENSE-MIT | 0 deps/{tar-0.4.3 => tar-0.4.5}/README.md | 0 deps/{tar-0.4.3 => tar-0.4.5}/appveyor.yml | 0 deps/tar-0.4.5/src/archive.rs | 364 + deps/tar-0.4.5/src/builder.rs | 267 + deps/tar-0.4.5/src/entry.rs | 318 + .../src/entry_type.rs | 0 deps/{tar-0.4.3 => tar-0.4.5}/src/error.rs | 0 deps/tar-0.4.5/src/header.rs | 940 ++ deps/tar-0.4.5/src/lib.rs | 65 + deps/{tar-0.4.3 => tar-0.4.5}/src/pax.rs | 0 deps/tar-0.4.5/tests/all.rs | 532 ++ .../tests/archives/directory.tar | Bin .../tests/archives/duplicate_dirs.tar | Bin .../tests/archives/empty_filename.tar | Bin .../tests/archives/file_times.tar | Bin .../tests/archives/link.tar | Bin .../tests/archives/pax.tar | Bin .../tests/archives/reading_files.tar | Bin .../tests/archives/simple.tar | Bin .../tests/archives/spaces.tar | Bin deps/tar-0.4.5/tests/header/mod.rs | 149 + deps/time-0.1.34/.gitignore | 2 - deps/time-0.1.34/.travis.yml | 30 - deps/time-0.1.34/Cargo.toml | 22 - deps/time-0.1.34/LICENSE-MIT | 25 - deps/time-0.1.34/README.md | 24 - deps/time-0.1.34/appveyor.yml | 17 - deps/time-0.1.34/benches/precise_time_ns.rs | 11 - deps/time-0.1.34/src/display.rs | 260 - deps/time-0.1.34/src/duration.rs | 560 -- deps/time-0.1.34/src/lib.rs | 1275 --- deps/time-0.1.34/src/parse.rs | 395 - deps/time-0.1.34/src/sys.rs | 648 -- deps/toml-0.1.27/Cargo.toml | 26 - deps/toml-0.1.27/src/decoder/mod.rs | 223 - deps/toml-0.1.27/src/decoder/serde.rs | 511 - deps/toml-0.1.27/src/encoder/mod.rs | 211 - deps/toml-0.1.27/src/encoder/serde.rs | 102 - deps/toml-0.1.28/.gitignore | 2 + deps/{toml-0.1.27 => toml-0.1.28}/.travis.yml | 0 deps/toml-0.1.28/Cargo.toml | 26 + .../LICENSE-APACHE | 0 deps/{toml-0.1.27 => toml-0.1.28}/LICENSE-MIT | 0 deps/{toml-0.1.27 => toml-0.1.28}/README.md | 0 .../examples/toml2json.rs | 0 deps/toml-0.1.28/src/decoder/mod.rs | 235 + .../src/decoder/rustc_serialize.rs | 0 deps/toml-0.1.28/src/decoder/serde.rs | 544 ++ .../src/display.rs | 0 deps/toml-0.1.28/src/encoder/mod.rs | 214 + .../src/encoder/rustc_serialize.rs | 0 deps/toml-0.1.28/src/encoder/serde.rs | 108 + deps/{toml-0.1.27 => toml-0.1.28}/src/lib.rs | 0 .../src/parser.rs | 0 .../tests/README.md | 0 .../array-mixed-types-ints-and-floats.json | 0 .../tests/invalid.rs | 0 .../array-mixed-types-arrays-and-ints.toml | 0 .../array-mixed-types-ints-and-floats.toml | 0 .../array-mixed-types-strings-and-ints.toml | 0 .../invalid/datetime-malformed-no-leads.toml | 0 .../invalid/datetime-malformed-no-secs.toml | 0 .../invalid/datetime-malformed-no-t.toml | 0 .../invalid/datetime-malformed-no-z.toml | 0 .../datetime-malformed-with-milli.toml | 0 .../tests/invalid/duplicate-key-table.toml | 0 .../tests/invalid/duplicate-keys.toml | 0 .../tests/invalid/duplicate-tables.toml | 0 .../tests/invalid/empty-implicit-table.toml | 0 .../tests/invalid/empty-table.toml | 0 .../tests/invalid/float-no-leading-zero.toml | 0 .../invalid/float-no-trailing-digits.toml | 0 .../tests/invalid/key-two-equals.toml | 0 .../tests/invalid/string-bad-byte-escape.toml | 0 .../tests/invalid/string-bad-escape.toml | 0 .../tests/invalid/string-byte-escapes.toml | 0 .../tests/invalid/string-no-close.toml | 0 .../tests/invalid/table-array-implicit.toml | 0 .../table-array-malformed-bracket.toml | 0 .../invalid/table-array-malformed-empty.toml | 0 .../invalid/table-nested-brackets-close.toml | 0 .../invalid/table-nested-brackets-open.toml | 0 .../invalid/text-after-array-entries.toml | 0 .../tests/invalid/text-after-integer.toml | 0 .../tests/invalid/text-after-string.toml | 0 .../tests/invalid/text-after-table.toml | 0 .../invalid/text-before-array-separator.toml | 0 .../tests/invalid/text-in-array.toml | 0 .../tests/valid.rs | 0 .../tests/valid/array-empty.json | 0 .../tests/valid/array-empty.toml | 0 .../tests/valid/array-nospaces.json | 0 .../tests/valid/array-nospaces.toml | 0 .../tests/valid/arrays-hetergeneous.json | 0 .../tests/valid/arrays-hetergeneous.toml | 0 .../tests/valid/arrays-nested.json | 0 .../tests/valid/arrays-nested.toml | 0 .../tests/valid/arrays.json | 0 .../tests/valid/arrays.toml | 0 .../tests/valid/bool.json | 0 .../tests/valid/bool.toml | 0 .../tests/valid/comments-everywhere.json | 0 .../tests/valid/comments-everywhere.toml | 0 .../tests/valid/datetime.json | 0 .../tests/valid/datetime.toml | 0 .../tests/valid/empty.json | 0 .../tests/valid/empty.toml | 0 .../tests/valid/example-bom.toml | 0 .../tests/valid/example-v0.3.0.json | 0 .../tests/valid/example-v0.3.0.toml | 0 .../tests/valid/example-v0.4.0.json | 0 .../tests/valid/example-v0.4.0.toml | 0 .../tests/valid/example.json | 0 .../tests/valid/example.toml | 0 .../tests/valid/example2.json | 0 .../tests/valid/example2.toml | 0 .../tests/valid/float.json | 0 .../tests/valid/float.toml | 0 .../tests/valid/hard_example.json | 0 .../tests/valid/hard_example.toml | 0 .../valid/implicit-and-explicit-after.json | 0 .../valid/implicit-and-explicit-after.toml | 0 .../valid/implicit-and-explicit-before.json | 0 .../valid/implicit-and-explicit-before.toml | 0 .../tests/valid/implicit-groups.json | 0 .../tests/valid/implicit-groups.toml | 0 .../tests/valid/integer.json | 0 .../tests/valid/integer.toml | 0 .../tests/valid/key-equals-nospace.json | 0 .../tests/valid/key-equals-nospace.toml | 0 .../tests/valid/key-special-chars.json | 0 .../tests/valid/key-special-chars.toml | 0 .../tests/valid/key-with-pound.json | 0 .../tests/valid/key-with-pound.toml | 0 .../tests/valid/long-float.json | 0 .../tests/valid/long-float.toml | 0 .../tests/valid/long-integer.json | 0 .../tests/valid/long-integer.toml | 0 .../tests/valid/string-empty.json | 0 .../tests/valid/string-empty.toml | 0 .../tests/valid/string-escapes.json | 0 .../tests/valid/string-escapes.toml | 0 .../tests/valid/string-simple.json | 0 .../tests/valid/string-simple.toml | 0 .../tests/valid/string-with-pound.json | 0 .../tests/valid/string-with-pound.toml | 0 .../tests/valid/table-array-implicit.json | 0 .../tests/valid/table-array-implicit.toml | 0 .../tests/valid/table-array-many.json | 0 .../tests/valid/table-array-many.toml | 0 .../tests/valid/table-array-nest.json | 0 .../tests/valid/table-array-nest.toml | 0 .../tests/valid/table-array-one.json | 0 .../tests/valid/table-array-one.toml | 0 .../tests/valid/table-empty.json | 0 .../tests/valid/table-empty.toml | 0 .../tests/valid/table-sub-empty.json | 0 .../tests/valid/table-sub-empty.toml | 0 .../tests/valid/table-whitespace.json | 0 .../tests/valid/table-whitespace.toml | 0 .../tests/valid/table-with-pound.json | 0 .../tests/valid/table-with-pound.toml | 0 .../tests/valid/unicode-escape.json | 0 .../tests/valid/unicode-escape.toml | 0 .../tests/valid/unicode-literal.json | 0 .../tests/valid/unicode-literal.toml | 0 deps/url-0.2.38/.gitignore | 3 - deps/url-0.2.38/.travis.yml | 11 - deps/url-0.2.38/Cargo.toml | 38 - deps/url-0.2.38/LICENSE-MIT | 26 - deps/url-0.2.38/Makefile | 19 - deps/url-0.2.38/make_encode_sets.py | 42 - deps/url-0.2.38/src/encode_sets.rs | 298 - deps/url-0.2.38/src/encoding.rs | 97 - deps/url-0.2.38/src/form_urlencoded.rs | 177 - deps/url-0.2.38/src/format.rs | 141 - deps/url-0.2.38/src/host.rs | 283 - deps/url-0.2.38/src/lib.rs | 1143 --- deps/url-0.2.38/src/parser.rs | 748 -- deps/url-0.2.38/src/percent_encoding.rs | 149 - deps/url-0.2.38/src/punycode.rs | 267 - deps/url-0.2.38/src/tests.rs | 349 - deps/url-0.2.38/src/urltestdata.txt | 329 - deps/url-0.2.38/src/urlutils.rs | 169 - deps/url-0.5.5/.gitignore | 3 - deps/url-0.5.5/.travis.yml | 11 - deps/url-0.5.5/Cargo.toml | 52 - deps/url-0.5.5/LICENSE-APACHE | 201 - deps/url-0.5.5/LICENSE-MIT | 26 - deps/url-0.5.5/Makefile | 19 - deps/url-0.5.5/README.md | 8 - deps/url-0.5.5/appveyor.yml | 13 - deps/url-0.5.5/github.png | Bin 7786 -> 0 bytes deps/url-0.5.5/make_encode_sets.py | 42 - deps/url-0.5.5/make_idna_table.py | 60 - deps/url-0.5.5/src/encode_sets.rs | 298 - deps/url-0.5.5/src/encoding.rs | 97 - deps/url-0.5.5/src/form_urlencoded.rs | 144 - deps/url-0.5.5/src/format.rs | 81 - deps/url-0.5.5/src/host.rs | 323 - deps/url-0.5.5/src/idna.rs | 299 - deps/url-0.5.5/src/idna_mapping.rs | 8194 ----------------- deps/url-0.5.5/src/lib.rs | 1165 --- deps/url-0.5.5/src/parser.rs | 749 -- deps/url-0.5.5/src/percent_encoding.rs | 167 - deps/url-0.5.5/src/urlutils.rs | 169 - deps/url-0.5.5/tests/form_urlencoded.rs | 29 - deps/url-0.5.5/tests/format.rs | 67 - deps/url-0.5.5/tests/idna.rs | 104 - deps/url-0.5.5/tests/punycode.rs | 52 - deps/url-0.5.5/tests/punycode_tests.json | 120 - deps/url-0.5.5/tests/tests.rs | 187 - deps/url-0.5.5/tests/urltestdata.txt | 329 - deps/url-0.5.5/tests/wpt.rs | 223 - deps/url-1.1.0/.gitignore | 3 + deps/url-1.1.0/.travis.yml | 15 + deps/url-1.1.0/Cargo.toml | 39 + deps/{url-0.2.38 => url-1.1.0}/LICENSE-APACHE | 0 deps/url-1.1.0/LICENSE-MIT | 25 + deps/url-1.1.0/Makefile | 17 + deps/{url-0.2.38 => url-1.1.0}/README.md | 0 deps/{url-0.2.38 => url-1.1.0}/appveyor.yml | 0 deps/{url-0.2.38 => url-1.1.0}/github.png | Bin deps/url-1.1.0/src/encoding.rs | 135 + deps/url-1.1.0/src/form_urlencoded.rs | 364 + deps/url-1.1.0/src/host.rs | 406 + deps/url-1.1.0/src/lib.rs | 1355 +++ deps/url-1.1.0/src/origin.rs | 99 + deps/url-1.1.0/src/parser.rs | 1179 +++ deps/url-1.1.0/src/path_segments.rs | 186 + deps/url-1.1.0/src/percent_encoding.rs | 344 + deps/url-1.1.0/src/quirks.rs | 217 + deps/url-1.1.0/src/slicing.rs | 182 + deps/url-1.1.0/tests/data.rs | 193 + deps/url-1.1.0/tests/setters_tests.json | 1148 +++ deps/url-1.1.0/tests/unit.rs | 261 + deps/url-1.1.0/tests/urltestdata.json | 4277 +++++++++ deps/url-1.1.0/todo | 14 + deps/utf8-ranges-0.1.3/.gitignore | 9 + deps/utf8-ranges-0.1.3/.travis.yml | 9 + deps/utf8-ranges-0.1.3/COPYING | 3 + deps/utf8-ranges-0.1.3/Cargo.toml | 14 + deps/utf8-ranges-0.1.3/LICENSE-MIT | 21 + deps/utf8-ranges-0.1.3/Makefile | 14 + deps/utf8-ranges-0.1.3/README.md | 54 + deps/utf8-ranges-0.1.3/UNLICENSE | 24 + deps/utf8-ranges-0.1.3/benches/bench.rs | 25 + deps/utf8-ranges-0.1.3/ctags.rust | 11 + deps/utf8-ranges-0.1.3/session.vim | 1 + deps/utf8-ranges-0.1.3/src/char_utf8.rs | 36 + deps/utf8-ranges-0.1.3/src/lib.rs | 511 + deps/uuid-0.1.18/.gitignore | 2 - deps/uuid-0.1.18/.travis.yml | 28 - deps/uuid-0.1.18/Cargo.toml | 18 - deps/uuid-0.1.18/LICENSE-APACHE | 201 - deps/uuid-0.1.18/LICENSE-MIT | 25 - deps/uuid-0.1.18/README.md | 77 - deps/uuid-0.1.18/benches/parse_str.rs | 87 - deps/uuid-0.1.18/src/lib.rs | 913 -- deps/winapi-0.2.5/.travis.yml | 17 - deps/winapi-0.2.5/Cargo.toml | 52 - deps/winapi-0.2.5/README.md | 458 - deps/winapi-0.2.5/appveyor.yml | 20 - deps/winapi-0.2.5/src/cfgmgr32.rs | 772 -- deps/winapi-0.2.5/src/commctrl.rs | 3614 -------- deps/winapi-0.2.5/src/commdlg.rs | 611 -- deps/winapi-0.2.5/src/d2d1.rs | 734 -- deps/winapi-0.2.5/src/d2dbasetypes.rs | 61 - deps/winapi-0.2.5/src/d3d11.rs | 3031 ------ deps/winapi-0.2.5/src/d3d12.rs | 2451 ----- deps/winapi-0.2.5/src/d3d12sdklayers.rs | 1075 --- deps/winapi-0.2.5/src/d3d9caps.rs | 357 - deps/winapi-0.2.5/src/d3d9types.rs | 1437 --- deps/winapi-0.2.5/src/d3dcommon.rs | 753 -- deps/winapi-0.2.5/src/dbghelp.rs | 326 - deps/winapi-0.2.5/src/dcommon.rs | 18 - deps/winapi-0.2.5/src/dwrite.rs | 1038 --- deps/winapi-0.2.5/src/dxgi.rs | 258 - deps/winapi-0.2.5/src/dxgi1_2.rs | 321 - deps/winapi-0.2.5/src/dxgi1_3.rs | 151 - deps/winapi-0.2.5/src/dxgi1_4.rs | 92 - deps/winapi-0.2.5/src/dxgitype.rs | 98 - deps/winapi-0.2.5/src/hidclass.rs | 13 - deps/winapi-0.2.5/src/hidpi.rs | 154 - deps/winapi-0.2.5/src/hidsdi.rs | 10 - deps/winapi-0.2.5/src/hidusage.rs | 5 - deps/winapi-0.2.5/src/hstring.rs | 14 - deps/winapi-0.2.5/src/http.rs | 843 -- deps/winapi-0.2.5/src/lib.rs | 420 - deps/winapi-0.2.5/src/macros.rs | 242 - deps/winapi-0.2.5/src/minwinbase.rs | 258 - deps/winapi-0.2.5/src/mmreg.rs | 306 - deps/winapi-0.2.5/src/mssip.rs | 105 - deps/winapi-0.2.5/src/nb30.rs | 188 - deps/winapi-0.2.5/src/oaidl.rs | 596 -- deps/winapi-0.2.5/src/processsnapshot.rs | 60 - deps/winapi-0.2.5/src/prsht.rs | 273 - deps/winapi-0.2.5/src/sapi.rs | 2437 ----- deps/winapi-0.2.5/src/schannel.rs | 342 - deps/winapi-0.2.5/src/setupapi.rs | 1379 --- deps/winapi-0.2.5/src/shtypes.rs | 40 - deps/winapi-0.2.5/src/sspi.rs | 661 -- deps/winapi-0.2.5/src/timezoneapi.rs | 31 - deps/winapi-0.2.5/src/tlhelp32.rs | 112 - deps/winapi-0.2.5/src/vsbackup.rs | 303 - deps/winapi-0.2.5/src/wincrypt.rs | 2202 ----- deps/winapi-0.2.5/src/wingdi.rs | 1250 --- deps/winapi-0.2.5/src/winioctl.rs | 756 -- deps/winapi-0.2.5/src/winnls.rs | 168 - deps/winapi-0.2.5/src/winnt.rs | 2391 ----- deps/winapi-0.2.5/src/winscard.rs | 287 - deps/winapi-0.2.5/src/winsock2.rs | 431 - deps/winapi-0.2.5/src/winsvc.rs | 204 - deps/winapi-0.2.5/src/winuser.rs | 2035 ---- deps/winapi-0.2.5/src/ws2def.rs | 284 - deps/winapi-0.2.5/src/ws2spi.rs | 61 - deps/winapi-0.2.5/tests/kernel32.rs | 1261 --- .../{winapi-0.2.5 => winapi-0.2.6}/.gitignore | 0 deps/winapi-0.2.6/.travis.yml | 21 + .../CONTRIBUTING.md | 0 deps/winapi-0.2.6/Cargo.toml | 57 + .../{winapi-0.2.5 => winapi-0.2.6}/LICENSE.md | 0 deps/winapi-0.2.6/README.md | 458 + deps/winapi-0.2.6/RabbitCode.md | 27 + deps/winapi-0.2.6/appveyor.yml | 18 + deps/winapi-0.2.6/examples/massimport.rs | 5 + .../src/audioclient.rs | 0 .../src/audiosessiontypes.rs | 0 .../src/basetsd.rs | 0 .../src/bcrypt.rs | 0 .../{winapi-0.2.5 => winapi-0.2.6}/src/cfg.rs | 0 deps/winapi-0.2.6/src/cfgmgr32.rs | 758 ++ deps/winapi-0.2.6/src/commctrl.rs | 3578 +++++++ deps/winapi-0.2.6/src/commdlg.rs | 583 ++ .../src/corsym.rs | 0 deps/winapi-0.2.6/src/d2d1.rs | 734 ++ deps/winapi-0.2.6/src/d2dbasetypes.rs | 61 + deps/winapi-0.2.6/src/d3d10shader.rs | 110 + deps/winapi-0.2.6/src/d3d11.rs | 2658 ++++++ deps/winapi-0.2.6/src/d3d11shader.rs | 320 + deps/winapi-0.2.6/src/d3d12.rs | 2324 +++++ deps/winapi-0.2.6/src/d3d12sdklayers.rs | 1063 +++ .../src/d3d9.rs | 0 deps/winapi-0.2.6/src/d3d9caps.rs | 349 + deps/winapi-0.2.6/src/d3d9types.rs | 1397 +++ deps/winapi-0.2.6/src/d3dcommon.rs | 753 ++ deps/winapi-0.2.6/src/d3dcompiler.rs | 74 + deps/winapi-0.2.6/src/dbghelp.rs | 340 + deps/winapi-0.2.6/src/dcommon.rs | 18 + .../src/devpropdef.rs | 0 .../src/docobj.rs | 0 .../src/dpapi.rs | 0 .../src/dsgetdc.rs | 0 .../src/dsound.rs | 0 .../src/dsrole.rs | 0 .../src/dwmapi.rs | 0 deps/winapi-0.2.6/src/dwrite.rs | 1038 +++ deps/winapi-0.2.6/src/dxgi.rs | 240 + deps/winapi-0.2.6/src/dxgi1_2.rs | 288 + deps/winapi-0.2.6/src/dxgi1_3.rs | 131 + deps/winapi-0.2.6/src/dxgi1_4.rs | 82 + .../src/dxgiformat.rs | 0 deps/winapi-0.2.6/src/dxgitype.rs | 86 + .../src/errhandlingapi.rs | 0 .../src/excpt.rs | 0 .../src/fileapi.rs | 0 deps/{winapi-0.2.5 => winapi-0.2.6}/src/gl.rs | 0 .../src/guiddef.rs | 0 .../src/heapapi.rs | 0 deps/winapi-0.2.6/src/hidclass.rs | 56 + deps/winapi-0.2.6/src/hidpi.rs | 182 + deps/winapi-0.2.6/src/hidsdi.rs | 15 + deps/winapi-0.2.6/src/hidusage.rs | 270 + deps/winapi-0.2.6/src/hstring.rs | 16 + deps/winapi-0.2.6/src/http.rs | 828 ++ .../{winapi-0.2.5 => winapi-0.2.6}/src/imm.rs | 0 .../src/inaddr.rs | 0 .../src/inspectable.rs | 0 .../src/ksmedia.rs | 0 deps/winapi-0.2.6/src/lib.rs | 428 + .../src/libloaderapi.rs | 0 .../src/lmaccess.rs | 0 .../src/lmcons.rs | 0 .../src/lmdfs.rs | 0 .../src/lmerrlog.rs | 0 .../src/lmjoin.rs | 0 .../src/lsalookup.rs | 0 deps/winapi-0.2.6/src/macros.rs | 268 + .../src/memoryapi.rs | 0 deps/winapi-0.2.6/src/minwinbase.rs | 253 + .../src/minwindef.rs | 0 .../src/mmdeviceapi.rs | 0 deps/winapi-0.2.6/src/mmreg.rs | 304 + .../src/mmsystem.rs | 0 .../src/mscat.rs | 0 deps/winapi-0.2.6/src/mssip.rs | 103 + deps/winapi-0.2.6/src/nb30.rs | 200 + .../src/ncrypt.rs | 0 .../src/ntdef.rs | 0 .../src/ntsecapi.rs | 0 .../src/ntstatus.rs | 0 deps/winapi-0.2.6/src/oaidl.rs | 590 ++ .../src/objbase.rs | 0 .../src/objidl.rs | 0 .../src/objidlbase.rs | 0 .../src/olectl.rs | 0 deps/winapi-0.2.6/src/processsnapshot.rs | 58 + .../src/processthreadsapi.rs | 0 .../src/propsys.rs | 0 deps/winapi-0.2.6/src/prsht.rs | 262 + .../src/psapi.rs | 0 .../{winapi-0.2.5 => winapi-0.2.6}/src/qos.rs | 0 .../src/reason.rs | 0 .../{winapi-0.2.5 => winapi-0.2.6}/src/rpc.rs | 0 .../src/rpcdce.rs | 0 deps/winapi-0.2.6/src/sapi.rs | 2431 +++++ deps/winapi-0.2.6/src/schannel.rs | 333 + .../src/servprov.rs | 0 deps/winapi-0.2.6/src/setupapi.rs | 1301 +++ .../src/shellapi.rs | 0 .../src/shellscalingapi.rs | 0 .../src/shlguid.rs | 0 .../src/shlobj.rs | 0 .../src/shobjidl.rs | 0 deps/winapi-0.2.6/src/shtypes.rs | 40 + .../src/spapidef.rs | 0 deps/winapi-0.2.6/src/sql.rs | 179 + deps/winapi-0.2.6/src/sqltypes.rs | 130 + deps/winapi-0.2.6/src/sspi.rs | 657 ++ .../src/subauth.rs | 0 .../src/synchapi.rs | 0 .../src/sysinfoapi.rs | 0 .../src/threadpoolapi.rs | 0 deps/winapi-0.2.6/src/timezoneapi.rs | 27 + deps/winapi-0.2.6/src/tlhelp32.rs | 104 + .../src/unknwnbase.rs | 0 .../src/urlhist.rs | 0 .../src/urlmon.rs | 0 .../src/usp10.rs | 0 .../src/vadefs.rs | 0 deps/winapi-0.2.6/src/vsbackup.rs | 303 + .../{winapi-0.2.5 => winapi-0.2.6}/src/vss.rs | 0 .../src/vsserror.rs | 0 .../src/vswriter.rs | 0 .../src/werapi.rs | 0 .../src/winbase.rs | 0 .../src/wincon.rs | 0 .../src/wincred.rs | 0 deps/winapi-0.2.6/src/wincrypt.rs | 2182 +++++ .../src/windef.rs | 0 .../src/windowscodecs.rs | 0 .../src/windowsx.rs | 0 .../src/winerror.rs | 0 .../src/winevt.rs | 0 deps/winapi-0.2.6/src/wingdi.rs | 1238 +++ .../src/winhttp.rs | 0 deps/winapi-0.2.6/src/winioctl.rs | 754 ++ .../src/winnetwk.rs | 0 deps/winapi-0.2.6/src/winnls.rs | 164 + deps/winapi-0.2.6/src/winnt.rs | 2368 +++++ deps/winapi-0.2.6/src/winscard.rs | 269 + .../src/winsmcrd.rs | 0 deps/winapi-0.2.6/src/winsock2.rs | 429 + .../src/winspool.rs | 0 deps/winapi-0.2.6/src/winsvc.rs | 200 + deps/winapi-0.2.6/src/winuser.rs | 2273 +++++ deps/winapi-0.2.6/src/ws2def.rs | 279 + .../src/ws2ipdef.rs | 0 deps/winapi-0.2.6/src/ws2spi.rs | 57 + .../src/ws2tcpip.rs | 0 .../src/wtypes.rs | 0 .../src/wtypesbase.rs | 0 .../src/xinput.rs | 0 .../tests/advapi32.rs | 0 .../tests/bcrypt.rs | 0 .../tests/comctl32.rs | 0 .../tests/comdlg32.rs | 0 .../tests/credui.rs | 0 .../tests/crypt32.rs | 0 .../tests/d2d1.rs | 0 .../tests/d3d11.rs | 0 .../tests/d3d12.rs | 0 .../tests/dwmapi.rs | 0 .../tests/dwrite.rs | 0 .../tests/dxgi.rs | 0 .../tests/gdi32.rs | 0 .../tests/httpapi.rs | 0 deps/winapi-0.2.6/tests/kernel32.rs | 1261 +++ .../tests/ktmw32.rs | 0 deps/winapi-0.2.6/tests/lib.rs | 612 ++ .../tests/mpr.rs | 0 .../tests/netapi32.rs | 0 .../tests/psapi.rs | 0 .../tests/setupapi.rs | 0 .../tests/shell32.rs | 0 .../tests/user32.rs | 0 .../tests/usp10.rs | 0 .../tests/uuid.rs | 0 .../tests/winhttp.rs | 0 .../tests/winmm.rs | 0 .../tests/winscard.rs | 0 .../tests/winspool.rs | 0 .../tests/ws2_32.rs | 0 deps/winapi-0.2.6/x86_64.tar | Bin 0 -> 1291264 bytes deps/winapi-0.2.6/x86_64.tar.gz | Bin 0 -> 126351 bytes 1429 files changed, 118643 insertions(+), 107416 deletions(-) delete mode 100644 deps/aho-corasick-0.4.1/Cargo.toml delete mode 100644 deps/aho-corasick-0.4.1/src/autiter.rs delete mode 100644 deps/aho-corasick-0.4.1/src/full.rs delete mode 100644 deps/aho-corasick-0.4.1/src/lib.rs rename deps/{aho-corasick-0.4.1 => aho-corasick-0.5.1}/.gitignore (100%) rename deps/{aho-corasick-0.4.1 => aho-corasick-0.5.1}/.travis.yml (100%) rename deps/{aho-corasick-0.4.1 => aho-corasick-0.5.1}/COPYING (100%) create mode 100644 deps/aho-corasick-0.5.1/Cargo.toml rename deps/{aho-corasick-0.4.1 => aho-corasick-0.5.1}/LICENSE-MIT (100%) rename deps/{aho-corasick-0.4.1 => aho-corasick-0.5.1}/Makefile (100%) rename deps/{aho-corasick-0.4.1 => aho-corasick-0.5.1}/README.md (100%) rename deps/{aho-corasick-0.4.1 => aho-corasick-0.5.1}/UNLICENSE (100%) create mode 100644 deps/aho-corasick-0.5.1/base rename deps/{aho-corasick-0.4.1 => aho-corasick-0.5.1}/benches/bench.rs (100%) rename deps/{aho-corasick-0.4.1 => aho-corasick-0.5.1}/benches/random.txt (100%) rename deps/{aho-corasick-0.4.1 => aho-corasick-0.5.1}/ctags.rust (100%) rename deps/{aho-corasick-0.4.1 => aho-corasick-0.5.1}/examples/dict-search.rs (100%) create mode 100644 deps/aho-corasick-0.5.1/memchr create mode 100644 deps/aho-corasick-0.5.1/memchr_take2 rename deps/{aho-corasick-0.4.1 => aho-corasick-0.5.1}/session.vim (100%) create mode 100644 deps/aho-corasick-0.5.1/src/autiter.rs create mode 100644 deps/aho-corasick-0.5.1/src/full.rs create mode 100644 deps/aho-corasick-0.5.1/src/lib.rs rename deps/{aho-corasick-0.4.1 => aho-corasick-0.5.1}/src/main.rs (100%) rename deps/{aho-corasick-0.4.1 => aho-corasick-0.5.1}/words (100%) delete mode 100644 deps/cmake-0.1.13/Cargo.toml delete mode 100644 deps/cmake-0.1.13/src/lib.rs rename deps/{cmake-0.1.13 => cmake-0.1.16}/.gitignore (100%) rename deps/{cmake-0.1.13 => cmake-0.1.16}/.travis.yml (100%) create mode 100644 deps/cmake-0.1.16/Cargo.toml rename deps/{cmake-0.1.13 => cmake-0.1.16}/LICENSE-APACHE (100%) rename deps/{cmake-0.1.13 => cmake-0.1.16}/LICENSE-MIT (100%) rename deps/{cmake-0.1.13 => cmake-0.1.16}/README.md (100%) create mode 100644 deps/cmake-0.1.16/src/lib.rs delete mode 100644 deps/crates-io-0.1.0/Cargo.toml delete mode 100644 deps/crates-io-0.1.0/lib.rs delete mode 100644 deps/curl-0.2.16/.travis.yml delete mode 100644 deps/curl-0.2.16/Cargo.toml delete mode 100644 deps/curl-0.2.16/src/ffi/easy.rs delete mode 100644 deps/curl-0.2.16/src/http/handle.rs delete mode 100644 deps/curl-0.2.16/test/server.rs delete mode 100644 deps/curl-0.2.16/test/test_head.rs rename deps/{curl-0.2.16 => curl-0.2.19}/.gitignore (100%) rename deps/{curl-0.2.16 => curl-0.2.19}/.gitmodules (100%) create mode 100644 deps/curl-0.2.19/.travis.yml create mode 100644 deps/curl-0.2.19/Cargo.toml rename deps/{curl-0.2.16 => curl-0.2.19}/LICENSE (100%) rename deps/{curl-0.2.16 => curl-0.2.19}/README.md (100%) rename deps/{curl-0.2.16 => curl-0.2.19}/src/ffi/consts.rs (100%) create mode 100644 deps/curl-0.2.19/src/ffi/easy.rs rename deps/{curl-0.2.16 => curl-0.2.19}/src/ffi/err.rs (100%) rename deps/{curl-0.2.16 => curl-0.2.19}/src/ffi/info.rs (100%) rename deps/{curl-0.2.16 => curl-0.2.19}/src/ffi/list.rs (100%) rename deps/{curl-0.2.16 => curl-0.2.19}/src/ffi/mod.rs (100%) rename deps/{curl-0.2.16 => curl-0.2.19}/src/ffi/opt.rs (100%) rename deps/{curl-0.2.16 => curl-0.2.19}/src/ffi/version.rs (100%) rename deps/{curl-0.2.16 => curl-0.2.19}/src/http/body.rs (100%) create mode 100644 deps/curl-0.2.19/src/http/handle.rs rename deps/{curl-0.2.16 => curl-0.2.19}/src/http/header.rs (100%) rename deps/{curl-0.2.16 => curl-0.2.19}/src/http/mod.rs (100%) rename deps/{curl-0.2.16 => curl-0.2.19}/src/http/response.rs (100%) rename deps/{curl-0.2.16 => curl-0.2.19}/src/lib.rs (100%) create mode 100644 deps/curl-0.2.19/test/server.rs rename deps/{curl-0.2.16 => curl-0.2.19}/test/test.rs (100%) rename deps/{curl-0.2.16 => curl-0.2.19}/test/test_delete.rs (100%) rename deps/{curl-0.2.16 => curl-0.2.19}/test/test_get.rs (100%) create mode 100644 deps/curl-0.2.19/test/test_head.rs rename deps/{curl-0.2.16 => curl-0.2.19}/test/test_keep_alive.rs (100%) rename deps/{curl-0.2.16 => curl-0.2.19}/test/test_patch.rs (100%) rename deps/{curl-0.2.16 => curl-0.2.19}/test/test_post.rs (100%) rename deps/{curl-0.2.16 => curl-0.2.19}/test/test_proxy.rs (100%) rename deps/{curl-0.2.16 => curl-0.2.19}/test/test_put.rs (100%) delete mode 100644 deps/curl-sys-0.1.32/Cargo.toml delete mode 100644 deps/curl-sys-0.1.32/build.rs create mode 100644 deps/curl-sys-0.1.34/Cargo.toml create mode 100644 deps/curl-sys-0.1.34/build.rs rename deps/{curl-sys-0.1.32 => curl-sys-0.1.34}/lib.rs (100%) create mode 100644 deps/fs2-0.2.3/.appveyor.yml rename deps/{gcc-0.3.23 => fs2-0.2.3}/.gitignore (100%) create mode 100644 deps/fs2-0.2.3/.travis.yml create mode 100644 deps/fs2-0.2.3/Cargo.toml rename deps/{gcc-0.3.23 => fs2-0.2.3}/LICENSE-APACHE (100%) create mode 100644 deps/fs2-0.2.3/LICENSE-MIT create mode 100644 deps/fs2-0.2.3/README.md create mode 100644 deps/fs2-0.2.3/src/lib.rs create mode 100644 deps/fs2-0.2.3/src/unix.rs create mode 100644 deps/fs2-0.2.3/src/windows.rs delete mode 100644 deps/gcc-0.3.23/Cargo.toml delete mode 100644 deps/gcc-0.3.23/src/lib.rs delete mode 100644 deps/gcc-0.3.23/src/windows_registry.rs rename deps/{libz-sys-1.0.1 => gcc-0.3.26}/.gitignore (100%) rename deps/{gcc-0.3.23 => gcc-0.3.26}/.travis.yml (100%) create mode 100644 deps/gcc-0.3.26/Cargo.toml rename deps/{git2-0.4.2 => gcc-0.3.26}/LICENSE-APACHE (100%) rename deps/{gcc-0.3.23 => gcc-0.3.26}/LICENSE-MIT (100%) rename deps/{gcc-0.3.23 => gcc-0.3.26}/README.md (100%) rename deps/{gcc-0.3.23 => gcc-0.3.26}/appveyor.yml (100%) rename deps/{gcc-0.3.23 => gcc-0.3.26}/src/bin/gcc-shim.rs (100%) create mode 100644 deps/gcc-0.3.26/src/lib.rs rename deps/{gcc-0.3.23 => gcc-0.3.26}/src/registry.rs (100%) create mode 100644 deps/gcc-0.3.26/src/windows_registry.rs rename deps/{gcc-0.3.23 => gcc-0.3.26}/tests/test.rs (100%) delete mode 100644 deps/git2-0.4.2/Cargo.toml delete mode 100644 deps/git2-0.4.2/README.md delete mode 100644 deps/git2-0.4.2/appveyor.yml delete mode 100644 deps/git2-0.4.2/examples/fetch.rs delete mode 100644 deps/git2-0.4.2/src/blob.rs delete mode 100644 deps/git2-0.4.2/src/commit.rs delete mode 100644 deps/git2-0.4.2/src/cred.rs delete mode 100644 deps/git2-0.4.2/src/error.rs delete mode 100644 deps/git2-0.4.2/src/lib.rs delete mode 100644 deps/git2-0.4.2/src/object.rs delete mode 100644 deps/git2-0.4.2/src/repo.rs delete mode 100644 deps/git2-0.4.2/src/tag.rs delete mode 100644 deps/git2-0.4.2/src/tree.rs rename deps/{git2-0.4.2 => git2-0.4.3}/.gitignore (100%) rename deps/{git2-0.4.2 => git2-0.4.3}/.gitmodules (100%) rename deps/{git2-0.4.2 => git2-0.4.3}/.travis.yml (100%) create mode 100644 deps/git2-0.4.3/Cargo.toml rename deps/{glob-0.2.10 => git2-0.4.3}/LICENSE-APACHE (100%) rename deps/{git2-0.4.2 => git2-0.4.3}/LICENSE-MIT (100%) create mode 100644 deps/git2-0.4.3/README.md create mode 100644 deps/git2-0.4.3/appveyor.yml rename deps/{git2-0.4.2 => git2-0.4.3}/examples/add.rs (100%) rename deps/{git2-0.4.2 => git2-0.4.3}/examples/blame.rs (100%) rename deps/{git2-0.4.2 => git2-0.4.3}/examples/cat-file.rs (100%) rename deps/{git2-0.4.2 => git2-0.4.3}/examples/clone.rs (100%) rename deps/{git2-0.4.2 => git2-0.4.3}/examples/diff.rs (100%) create mode 100644 deps/git2-0.4.3/examples/fetch.rs rename deps/{git2-0.4.2 => git2-0.4.3}/examples/init.rs (100%) rename deps/{git2-0.4.2 => git2-0.4.3}/examples/log.rs (100%) rename deps/{git2-0.4.2 => git2-0.4.3}/examples/ls-remote.rs (100%) rename deps/{git2-0.4.2 => git2-0.4.3}/examples/rev-list.rs (100%) rename deps/{git2-0.4.2 => git2-0.4.3}/examples/rev-parse.rs (100%) rename deps/{git2-0.4.2 => git2-0.4.3}/examples/status.rs (100%) rename deps/{git2-0.4.2 => git2-0.4.3}/examples/tag.rs (100%) rename deps/{git2-0.4.2 => git2-0.4.3}/src/blame.rs (100%) create mode 100644 deps/git2-0.4.3/src/blob.rs rename deps/{git2-0.4.2 => git2-0.4.3}/src/branch.rs (100%) rename deps/{git2-0.4.2 => git2-0.4.3}/src/buf.rs (100%) rename deps/{git2-0.4.2 => git2-0.4.3}/src/build.rs (100%) rename deps/{git2-0.4.2 => git2-0.4.3}/src/call.rs (100%) rename deps/{git2-0.4.2 => git2-0.4.3}/src/cert.rs (100%) create mode 100644 deps/git2-0.4.3/src/commit.rs rename deps/{git2-0.4.2 => git2-0.4.3}/src/config.rs (100%) create mode 100644 deps/git2-0.4.3/src/cred.rs rename deps/{git2-0.4.2 => git2-0.4.3}/src/describe.rs (100%) rename deps/{git2-0.4.2 => git2-0.4.3}/src/diff.rs (100%) create mode 100644 deps/git2-0.4.3/src/error.rs rename deps/{git2-0.4.2 => git2-0.4.3}/src/index.rs (100%) create mode 100644 deps/git2-0.4.3/src/lib.rs rename deps/{git2-0.4.2 => git2-0.4.3}/src/merge.rs (100%) create mode 100644 deps/git2-0.4.3/src/message.rs rename deps/{git2-0.4.2 => git2-0.4.3}/src/note.rs (100%) create mode 100644 deps/git2-0.4.3/src/object.rs rename deps/{git2-0.4.2 => git2-0.4.3}/src/oid.rs (100%) rename deps/{git2-0.4.2 => git2-0.4.3}/src/oid_array.rs (100%) rename deps/{git2-0.4.2 => git2-0.4.3}/src/panic.rs (100%) rename deps/{git2-0.4.2 => git2-0.4.3}/src/pathspec.rs (100%) rename deps/{git2-0.4.2 => git2-0.4.3}/src/reference.rs (100%) rename deps/{git2-0.4.2 => git2-0.4.3}/src/reflog.rs (100%) rename deps/{git2-0.4.2 => git2-0.4.3}/src/refspec.rs (100%) rename deps/{git2-0.4.2 => git2-0.4.3}/src/remote.rs (100%) rename deps/{git2-0.4.2 => git2-0.4.3}/src/remote_callbacks.rs (100%) create mode 100644 deps/git2-0.4.3/src/repo.rs rename deps/{git2-0.4.2 => git2-0.4.3}/src/revspec.rs (100%) rename deps/{git2-0.4.2 => git2-0.4.3}/src/revwalk.rs (100%) rename deps/{git2-0.4.2 => git2-0.4.3}/src/signature.rs (100%) rename deps/{git2-0.4.2 => git2-0.4.3}/src/status.rs (100%) rename deps/{git2-0.4.2 => git2-0.4.3}/src/string_array.rs (100%) rename deps/{git2-0.4.2 => git2-0.4.3}/src/submodule.rs (100%) create mode 100644 deps/git2-0.4.3/src/tag.rs rename deps/{git2-0.4.2 => git2-0.4.3}/src/test.rs (100%) rename deps/{git2-0.4.2 => git2-0.4.3}/src/time.rs (100%) rename deps/{git2-0.4.2 => git2-0.4.3}/src/transport.rs (100%) create mode 100644 deps/git2-0.4.3/src/tree.rs rename deps/{git2-0.4.2 => git2-0.4.3}/src/treebuilder.rs (100%) rename deps/{git2-0.4.2 => git2-0.4.3}/src/util.rs (100%) delete mode 100644 deps/git2-curl-0.4.0/Cargo.toml delete mode 100644 deps/git2-curl-0.4.0/src/lib.rs create mode 100644 deps/git2-curl-0.4.1/Cargo.toml create mode 100644 deps/git2-curl-0.4.1/src/lib.rs rename deps/{git2-curl-0.4.0 => git2-curl-0.4.1}/tests/all.rs (100%) delete mode 100644 deps/glob-0.2.10/.travis.yml delete mode 100644 deps/glob-0.2.10/Cargo.toml delete mode 100644 deps/glob-0.2.10/README.md delete mode 100644 deps/glob-0.2.10/src/lib.rs delete mode 100644 deps/glob-0.2.10/tests/glob-std.rs rename deps/{glob-0.2.10 => glob-0.2.11}/.gitignore (100%) create mode 100644 deps/glob-0.2.11/.travis.yml create mode 100644 deps/glob-0.2.11/Cargo.toml rename deps/{libc-0.2.7 => glob-0.2.11}/LICENSE-APACHE (100%) rename deps/{glob-0.2.10 => glob-0.2.11}/LICENSE-MIT (100%) create mode 100644 deps/glob-0.2.11/README.md create mode 100644 deps/glob-0.2.11/src/lib.rs create mode 100644 deps/glob-0.2.11/tests/glob-std.rs create mode 100644 deps/idna-0.1.0/Cargo.toml rename deps/{url-0.5.5 => idna-0.1.0/src}/IdnaMappingTable.txt (100%) create mode 100644 deps/idna-0.1.0/src/lib.rs create mode 100644 deps/idna-0.1.0/src/make_uts46_mapping_table.py rename deps/{url-0.5.5 => idna-0.1.0}/src/punycode.rs (100%) create mode 100644 deps/idna-0.1.0/src/uts46.rs create mode 100644 deps/idna-0.1.0/src/uts46_mapping_table.rs rename deps/{url-0.5.5 => idna-0.1.0}/tests/IdnaTest.txt (100%) create mode 100644 deps/idna-0.1.0/tests/punycode.rs rename deps/{url-0.2.38/src => idna-0.1.0/tests}/punycode_tests.json (100%) create mode 100644 deps/idna-0.1.0/tests/tests.rs create mode 100644 deps/idna-0.1.0/tests/uts46.rs delete mode 100644 deps/libc-0.2.7/.travis.yml delete mode 100644 deps/libc-0.2.7/Cargo.toml delete mode 100644 deps/libc-0.2.7/README.md delete mode 100644 deps/libc-0.2.7/ci/run-travis.sh delete mode 100644 deps/libc-0.2.7/liblibc.rlib delete mode 100644 deps/libc-0.2.7/perf.data delete mode 100644 deps/libc-0.2.7/src/lib.rs delete mode 100644 deps/libc-0.2.7/src/macros.rs delete mode 100644 deps/libc-0.2.7/src/unix/bsd/apple/b32.rs delete mode 100644 deps/libc-0.2.7/src/unix/bsd/apple/b64.rs delete mode 100644 deps/libc-0.2.7/src/unix/bsd/freebsdlike/dragonfly.rs delete mode 100644 deps/libc-0.2.7/src/unix/bsd/freebsdlike/freebsd.rs delete mode 100644 deps/libc-0.2.7/src/unix/bsd/freebsdlike/mod.rs delete mode 100644 deps/libc-0.2.7/src/unix/bsd/mod.rs delete mode 100644 deps/libc-0.2.7/src/unix/bsd/openbsdlike/bitrig.rs delete mode 100644 deps/libc-0.2.7/src/unix/bsd/openbsdlike/mod.rs delete mode 100644 deps/libc-0.2.7/src/unix/bsd/openbsdlike/netbsd.rs delete mode 100644 deps/libc-0.2.7/src/unix/bsd/openbsdlike/openbsd.rs delete mode 100644 deps/libc-0.2.7/src/unix/mod.rs delete mode 100644 deps/libc-0.2.7/src/unix/notbsd/android/b32.rs delete mode 100644 deps/libc-0.2.7/src/unix/notbsd/android/b64.rs delete mode 100644 deps/libc-0.2.7/src/unix/notbsd/android/mod.rs delete mode 100644 deps/libc-0.2.7/src/unix/notbsd/linux/mips.rs delete mode 100644 deps/libc-0.2.7/src/unix/notbsd/linux/mod.rs delete mode 100644 deps/libc-0.2.7/src/unix/notbsd/linux/musl/b32/arm.rs delete mode 100644 deps/libc-0.2.7/src/unix/notbsd/linux/musl/b32/asmjs.rs delete mode 100644 deps/libc-0.2.7/src/unix/notbsd/linux/musl/b32/mips.rs delete mode 100644 deps/libc-0.2.7/src/unix/notbsd/linux/musl/b32/mod.rs delete mode 100644 deps/libc-0.2.7/src/unix/notbsd/linux/musl/b32/x86.rs delete mode 100644 deps/libc-0.2.7/src/unix/notbsd/linux/musl/b64/mod.rs delete mode 100644 deps/libc-0.2.7/src/unix/notbsd/linux/other/b32/arm.rs delete mode 100644 deps/libc-0.2.7/src/unix/notbsd/linux/other/b32/mod.rs delete mode 100644 deps/libc-0.2.7/src/unix/notbsd/linux/other/b32/powerpc.rs delete mode 100644 deps/libc-0.2.7/src/unix/notbsd/linux/other/b32/x86.rs delete mode 100644 deps/libc-0.2.7/src/unix/notbsd/linux/other/b64/aarch64.rs delete mode 100644 deps/libc-0.2.7/src/unix/notbsd/linux/other/b64/mod.rs delete mode 100644 deps/libc-0.2.7/src/unix/notbsd/linux/other/b64/powerpc64.rs delete mode 100644 deps/libc-0.2.7/src/unix/notbsd/linux/other/b64/x86_64.rs delete mode 100644 deps/libc-0.2.7/src/unix/notbsd/linux/other/mod.rs delete mode 100644 deps/libc-0.2.7/src/unix/notbsd/mod.rs delete mode 100644 deps/libc-0.2.7/src/unix/solaris/mod.rs delete mode 100644 deps/libc-0.2.7/src/windows.rs rename deps/{libc-0.2.7 => libc-0.2.8}/.gitignore (100%) create mode 100644 deps/libc-0.2.8/.travis.yml create mode 100644 deps/libc-0.2.8/Cargo.toml rename deps/{libz-sys-1.0.1 => libc-0.2.8}/LICENSE-APACHE (100%) rename deps/{libc-0.2.7 => libc-0.2.8}/LICENSE-MIT (100%) create mode 100644 deps/libc-0.2.8/README.md rename deps/{libc-0.2.7 => libc-0.2.8}/appveyor.yml (100%) rename deps/{libc-0.2.7 => libc-0.2.8}/ci/README.md (100%) rename deps/{libc-0.2.7 => libc-0.2.8}/ci/cargo-config (100%) rename deps/{libc-0.2.7 => libc-0.2.8}/ci/dox.sh (100%) rename deps/{libc-0.2.7 => libc-0.2.8}/ci/landing-page-footer.html (100%) rename deps/{libc-0.2.7 => libc-0.2.8}/ci/landing-page-head.html (100%) rename deps/{libc-0.2.7 => libc-0.2.8}/ci/mips/Dockerfile (100%) rename deps/{libc-0.2.7 => libc-0.2.8}/ci/rumprun/Dockerfile (100%) rename deps/{libc-0.2.7 => libc-0.2.8}/ci/run-all.sh (100%) rename deps/{libc-0.2.7 => libc-0.2.8}/ci/run-qemu.sh (100%) create mode 100644 deps/libc-0.2.8/ci/run-travis.sh rename deps/{libc-0.2.7 => libc-0.2.8}/ci/run.sh (100%) create mode 100644 deps/libc-0.2.8/ci/style.rs rename deps/{libc-0.2.7 => libc-0.2.8}/src/dox.rs (100%) create mode 100644 deps/libc-0.2.8/src/lib.rs create mode 100644 deps/libc-0.2.8/src/macros.rs create mode 100644 deps/libc-0.2.8/src/unix/bsd/apple/b32.rs create mode 100644 deps/libc-0.2.8/src/unix/bsd/apple/b64.rs rename deps/{libc-0.2.7 => libc-0.2.8}/src/unix/bsd/apple/mod.rs (100%) create mode 100644 deps/libc-0.2.8/src/unix/bsd/freebsdlike/dragonfly/mod.rs create mode 100644 deps/libc-0.2.8/src/unix/bsd/freebsdlike/freebsd/mod.rs rename deps/{libc-0.2.7/src/unix/bsd/freebsdlike => libc-0.2.8/src/unix/bsd/freebsdlike/freebsd}/x86.rs (100%) rename deps/{libc-0.2.7/src/unix/bsd/freebsdlike => libc-0.2.8/src/unix/bsd/freebsdlike/freebsd}/x86_64.rs (100%) create mode 100644 deps/libc-0.2.8/src/unix/bsd/freebsdlike/mod.rs create mode 100644 deps/libc-0.2.8/src/unix/bsd/mod.rs create mode 100644 deps/libc-0.2.8/src/unix/bsd/openbsdlike/bitrig.rs create mode 100644 deps/libc-0.2.8/src/unix/bsd/openbsdlike/mod.rs create mode 100644 deps/libc-0.2.8/src/unix/bsd/openbsdlike/netbsd.rs create mode 100644 deps/libc-0.2.8/src/unix/bsd/openbsdlike/openbsd.rs create mode 100644 deps/libc-0.2.8/src/unix/mod.rs create mode 100644 deps/libc-0.2.8/src/unix/notbsd/android/b32.rs create mode 100644 deps/libc-0.2.8/src/unix/notbsd/android/b64.rs create mode 100644 deps/libc-0.2.8/src/unix/notbsd/android/mod.rs create mode 100644 deps/libc-0.2.8/src/unix/notbsd/linux/mips.rs create mode 100644 deps/libc-0.2.8/src/unix/notbsd/linux/mod.rs create mode 100644 deps/libc-0.2.8/src/unix/notbsd/linux/musl/b32/arm.rs create mode 100644 deps/libc-0.2.8/src/unix/notbsd/linux/musl/b32/asmjs.rs create mode 100644 deps/libc-0.2.8/src/unix/notbsd/linux/musl/b32/mips.rs create mode 100644 deps/libc-0.2.8/src/unix/notbsd/linux/musl/b32/mod.rs create mode 100644 deps/libc-0.2.8/src/unix/notbsd/linux/musl/b32/x86.rs create mode 100644 deps/libc-0.2.8/src/unix/notbsd/linux/musl/b64/mod.rs rename deps/{libc-0.2.7 => libc-0.2.8}/src/unix/notbsd/linux/musl/mod.rs (100%) create mode 100644 deps/libc-0.2.8/src/unix/notbsd/linux/other/b32/arm.rs create mode 100644 deps/libc-0.2.8/src/unix/notbsd/linux/other/b32/mod.rs create mode 100644 deps/libc-0.2.8/src/unix/notbsd/linux/other/b32/powerpc.rs create mode 100644 deps/libc-0.2.8/src/unix/notbsd/linux/other/b32/x86.rs create mode 100644 deps/libc-0.2.8/src/unix/notbsd/linux/other/b64/aarch64.rs create mode 100644 deps/libc-0.2.8/src/unix/notbsd/linux/other/b64/mod.rs create mode 100644 deps/libc-0.2.8/src/unix/notbsd/linux/other/b64/powerpc64.rs create mode 100644 deps/libc-0.2.8/src/unix/notbsd/linux/other/b64/x86_64.rs create mode 100644 deps/libc-0.2.8/src/unix/notbsd/linux/other/mod.rs create mode 100644 deps/libc-0.2.8/src/unix/notbsd/mod.rs create mode 100644 deps/libc-0.2.8/src/unix/solaris/mod.rs create mode 100644 deps/libc-0.2.8/src/windows.rs delete mode 100644 deps/libgit2-sys-0.4.0/Cargo.toml delete mode 100644 deps/libgit2-sys-0.4.0/build.rs delete mode 100644 deps/libgit2-sys-0.4.0/lib.rs delete mode 100644 deps/libgit2-sys-0.4.0/libgit2/script/toolchain-mingw32.cmake create mode 100644 deps/libgit2-sys-0.4.3/Cargo.toml create mode 100644 deps/libgit2-sys-0.4.3/build.rs create mode 100644 deps/libgit2-sys-0.4.3/lib.rs create mode 100644 deps/libgit2-sys-0.4.3/libgit2/.HEADER create mode 100644 deps/libgit2-sys-0.4.3/libgit2/.editorconfig create mode 100644 deps/libgit2-sys-0.4.3/libgit2/.gitattributes create mode 100644 deps/libgit2-sys-0.4.3/libgit2/.gitignore create mode 100644 deps/libgit2-sys-0.4.3/libgit2/.mailmap create mode 100644 deps/libgit2-sys-0.4.3/libgit2/.travis.yml rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/AUTHORS (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/CHANGELOG.md (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/CMakeLists.txt (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/CODE_OF_CONDUCT.md (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/CONTRIBUTING.md (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/CONVENTIONS.md (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/COPYING (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/Makefile.embed (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/PROJECTS.md (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/README.md (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/THREADING.md (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/api.docurium (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/appveyor.yml (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/cmake/Modules/AddCFlagIfSupported.cmake (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/cmake/Modules/FindCoreFoundation.cmake (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/cmake/Modules/FindGSSAPI.cmake (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/cmake/Modules/FindHTTP_Parser.cmake (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/cmake/Modules/FindIconv.cmake (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/cmake/Modules/FindSecurity.cmake (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/docs/checkout-internals.md (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/docs/diff-internals.md (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/docs/error-handling.md (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/docs/merge-df_conflicts.txt (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/git.git-authors (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/include/git2.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/include/git2/annotated_commit.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/include/git2/attr.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/include/git2/blame.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/include/git2/blob.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/include/git2/branch.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/include/git2/buffer.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/include/git2/checkout.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/include/git2/cherrypick.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/include/git2/clone.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/include/git2/commit.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/include/git2/common.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/include/git2/config.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/include/git2/cred_helpers.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/include/git2/describe.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/include/git2/diff.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/include/git2/errors.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/include/git2/filter.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/include/git2/global.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/include/git2/graph.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/include/git2/ignore.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/include/git2/index.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/include/git2/indexer.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/include/git2/inttypes.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/include/git2/merge.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/include/git2/message.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/include/git2/net.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/include/git2/notes.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/include/git2/object.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/include/git2/odb.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/include/git2/odb_backend.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/include/git2/oid.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/include/git2/oidarray.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/include/git2/pack.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/include/git2/patch.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/include/git2/pathspec.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/include/git2/rebase.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/include/git2/refdb.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/include/git2/reflog.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/include/git2/refs.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/include/git2/refspec.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/include/git2/remote.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/include/git2/repository.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/include/git2/reset.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/include/git2/revert.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/include/git2/revparse.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/include/git2/revwalk.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/include/git2/signature.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/include/git2/stash.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/include/git2/status.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/include/git2/stdint.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/include/git2/strarray.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/include/git2/submodule.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/include/git2/sys/commit.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/include/git2/sys/config.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/include/git2/sys/diff.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/include/git2/sys/filter.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/include/git2/sys/hashsig.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/include/git2/sys/index.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/include/git2/sys/mempack.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/include/git2/sys/odb_backend.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/include/git2/sys/openssl.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/include/git2/sys/refdb_backend.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/include/git2/sys/reflog.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/include/git2/sys/refs.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/include/git2/sys/repository.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/include/git2/sys/stream.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/include/git2/sys/transport.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/include/git2/tag.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/include/git2/trace.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/include/git2/transaction.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/include/git2/transport.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/include/git2/tree.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/include/git2/types.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/include/git2/version.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/libgit2.pc.in (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/libgit2_clar.supp (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/script/appveyor-mingw.sh (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/script/cibuild.sh (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/script/coverity.sh (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/script/install-deps-osx.sh (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/script/user_nodefs.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/annotated_commit.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/annotated_commit.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/array.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/attr.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/attr.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/attr_file.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/attr_file.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/attrcache.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/attrcache.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/bitvec.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/blame.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/blame.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/blame_git.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/blame_git.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/blob.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/blob.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/branch.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/branch.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/buf_text.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/buf_text.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/buffer.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/buffer.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/cache.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/cache.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/cc-compat.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/checkout.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/checkout.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/cherrypick.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/clone.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/clone.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/commit.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/commit.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/commit_list.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/commit_list.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/common.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/config.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/config.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/config_cache.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/config_file.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/config_file.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/crlf.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/curl_stream.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/curl_stream.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/date.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/delta-apply.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/delta-apply.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/delta.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/delta.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/describe.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/diff.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/diff.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/diff_driver.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/diff_driver.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/diff_file.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/diff_file.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/diff_patch.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/diff_patch.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/diff_print.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/diff_stats.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/diff_tform.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/diff_xdiff.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/diff_xdiff.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/errors.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/fetch.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/fetch.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/fetchhead.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/fetchhead.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/filebuf.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/filebuf.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/fileops.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/fileops.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/filter.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/filter.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/fnmatch.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/fnmatch.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/global.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/global.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/graph.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/hash.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/hash.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/hash/hash_common_crypto.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/hash/hash_generic.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/hash/hash_generic.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/hash/hash_openssl.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/hash/hash_win32.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/hash/hash_win32.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/hashsig.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/ident.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/idxmap.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/ignore.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/ignore.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/index.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/index.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/indexer.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/integer.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/iterator.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/iterator.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/khash.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/map.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/merge.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/merge.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/merge_file.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/message.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/message.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/mwindow.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/mwindow.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/netops.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/netops.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/notes.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/notes.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/object.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/object.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/object_api.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/odb.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/odb.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/odb_loose.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/odb_mempack.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/odb_pack.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/offmap.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/oid.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/oid.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/oidarray.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/oidarray.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/oidmap.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/openssl_stream.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/openssl_stream.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/pack-objects.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/pack-objects.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/pack.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/pack.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/path.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/path.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/pathspec.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/pathspec.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/pool.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/pool.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/posix.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/posix.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/pqueue.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/pqueue.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/push.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/push.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/rebase.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/refdb.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/refdb.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/refdb_fs.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/refdb_fs.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/reflog.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/reflog.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/refs.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/refs.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/refspec.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/refspec.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/remote.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/remote.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/repo_template.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/repository.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/repository.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/reset.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/revert.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/revparse.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/revwalk.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/revwalk.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/settings.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/sha1_lookup.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/sha1_lookup.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/signature.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/signature.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/socket_stream.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/socket_stream.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/sortedcache.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/sortedcache.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/stash.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/status.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/status.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/stransport_stream.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/stransport_stream.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/stream.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/strmap.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/strmap.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/strnlen.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/submodule.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/submodule.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/sysdir.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/sysdir.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/tag.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/tag.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/thread-utils.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/thread-utils.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/tls_stream.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/tls_stream.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/trace.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/trace.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/transaction.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/transaction.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/transport.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/transports/auth.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/transports/auth.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/transports/auth_negotiate.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/transports/auth_negotiate.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/transports/cred.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/transports/cred.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/transports/cred_helpers.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/transports/git.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/transports/http.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/transports/local.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/transports/smart.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/transports/smart.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/transports/smart_pkt.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/transports/smart_protocol.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/transports/ssh.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/transports/winhttp.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/tree-cache.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/tree-cache.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/tree.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/tree.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/tsort.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/unix/map.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/unix/posix.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/unix/realpath.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/userdiff.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/util.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/util.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/vector.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/vector.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/win32/dir.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/win32/dir.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/win32/error.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/win32/error.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/win32/findfile.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/win32/findfile.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/win32/git2.rc (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/win32/map.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/win32/mingw-compat.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/win32/msvc-compat.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/win32/path_w32.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/win32/path_w32.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/win32/posix.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/win32/posix_w32.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/win32/precompiled.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/win32/precompiled.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/win32/pthread.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/win32/pthread.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/win32/reparse.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/win32/utf-conv.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/win32/utf-conv.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/win32/version.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/win32/w32_buffer.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/win32/w32_buffer.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/win32/w32_crtdbg_stacktrace.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/win32/w32_crtdbg_stacktrace.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/win32/w32_stack.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/win32/w32_stack.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/win32/w32_util.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/win32/w32_util.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/win32/win32-compat.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/xdiff/xdiff.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/xdiff/xdiffi.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/xdiff/xdiffi.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/xdiff/xemit.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/xdiff/xemit.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/xdiff/xhistogram.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/xdiff/xinclude.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/xdiff/xmacros.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/xdiff/xmerge.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/xdiff/xpatience.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/xdiff/xprepare.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/xdiff/xprepare.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/xdiff/xtypes.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/xdiff/xutils.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/xdiff/xutils.h (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/zstream.c (100%) rename deps/{libgit2-sys-0.4.0 => libgit2-sys-0.4.3}/libgit2/src/zstream.h (100%) delete mode 100644 deps/libssh2-sys-0.1.36/Cargo.toml create mode 100644 deps/libssh2-sys-0.1.37/Cargo.toml rename deps/{libssh2-sys-0.1.36 => libssh2-sys-0.1.37}/build.rs (100%) rename deps/{libssh2-sys-0.1.36 => libssh2-sys-0.1.37}/lib.rs (100%) delete mode 100644 deps/libz-sys-1.0.1/Cargo.toml delete mode 100644 deps/libz-sys-1.0.1/build.rs rename deps/{num_cpus-0.2.10 => libz-sys-1.0.2}/.gitignore (100%) rename deps/{libz-sys-1.0.1 => libz-sys-1.0.2}/.travis.yml (100%) create mode 100644 deps/libz-sys-1.0.2/Cargo.toml rename deps/{pkg-config-0.3.6 => libz-sys-1.0.2}/LICENSE-APACHE (100%) rename deps/{libz-sys-1.0.1 => libz-sys-1.0.2}/LICENSE-MIT (100%) rename deps/{libz-sys-1.0.1 => libz-sys-1.0.2}/README.md (100%) rename deps/{libz-sys-1.0.1 => libz-sys-1.0.2}/appveyor.yml (100%) create mode 100644 deps/libz-sys-1.0.2/build.rs rename deps/{libz-sys-1.0.1 => libz-sys-1.0.2}/src/lib.rs (100%) rename deps/{memchr-0.1.7 => memchr-0.1.10}/.gitignore (100%) create mode 100644 deps/memchr-0.1.10/.travis.yml rename deps/{memchr-0.1.7 => memchr-0.1.10}/COPYING (100%) create mode 100644 deps/memchr-0.1.10/Cargo.toml rename deps/{memchr-0.1.7 => memchr-0.1.10}/LICENSE-MIT (100%) rename deps/{memchr-0.1.7 => memchr-0.1.10}/Makefile (100%) rename deps/{memchr-0.1.7 => memchr-0.1.10}/README.md (100%) rename deps/{memchr-0.1.7 => memchr-0.1.10}/UNLICENSE (100%) rename deps/{memchr-0.1.7 => memchr-0.1.10}/appveyor.yml (100%) create mode 100644 deps/memchr-0.1.10/benches/bench.rs rename deps/{memchr-0.1.7 => memchr-0.1.10}/ctags.rust (100%) rename deps/{memchr-0.1.7 => memchr-0.1.10}/session.vim (100%) create mode 100644 deps/memchr-0.1.10/src/lib.rs delete mode 100644 deps/memchr-0.1.7/.travis.yml delete mode 100644 deps/memchr-0.1.7/Cargo.toml delete mode 100644 deps/memchr-0.1.7/benches/bench.rs delete mode 100644 deps/memchr-0.1.7/src/lib.rs delete mode 100644 deps/nom-1.2.0/.travis.yml delete mode 100644 deps/nom-1.2.0/CHANGELOG.md delete mode 100644 deps/nom-1.2.0/Cargo.toml delete mode 100644 deps/nom-1.2.0/src/bytes.rs delete mode 100644 deps/nom-1.2.0/src/internal.rs delete mode 100644 deps/nom-1.2.0/src/lib.rs delete mode 100644 deps/nom-1.2.0/src/macros.rs delete mode 100644 deps/nom-1.2.0/src/methods.rs delete mode 100644 deps/nom-1.2.0/src/nom.rs delete mode 100644 deps/nom-1.2.0/src/regexp.rs delete mode 100644 deps/nom-1.2.0/src/str.rs delete mode 100644 deps/nom-1.2.0/src/util.rs rename deps/{nom-1.2.0 => nom-1.2.2}/.gitignore (100%) create mode 100644 deps/nom-1.2.2/.travis.yml create mode 100644 deps/nom-1.2.2/CHANGELOG.md create mode 100644 deps/nom-1.2.2/Cargo.toml rename deps/{nom-1.2.0 => nom-1.2.2}/LICENSE (100%) rename deps/{nom-1.2.0 => nom-1.2.2}/src/bits.rs (100%) create mode 100644 deps/nom-1.2.2/src/bytes.rs rename deps/{nom-1.2.0 => nom-1.2.2}/src/character.rs (100%) create mode 100644 deps/nom-1.2.2/src/internal.rs create mode 100644 deps/nom-1.2.2/src/lib.rs create mode 100644 deps/nom-1.2.2/src/macros.rs create mode 100644 deps/nom-1.2.2/src/methods.rs create mode 100644 deps/nom-1.2.2/src/nom.rs create mode 100644 deps/nom-1.2.2/src/regexp.rs create mode 100644 deps/nom-1.2.2/src/str.rs rename deps/{nom-1.2.0 => nom-1.2.2}/src/stream.rs (100%) create mode 100644 deps/nom-1.2.2/src/util.rs rename deps/{nom-1.2.0 => nom-1.2.2}/tests/arithmetic.rs (100%) create mode 100644 deps/nom-1.2.2/tests/cross_function_backtracking.rs rename deps/{nom-1.2.0 => nom-1.2.2}/tests/ini.rs (100%) rename deps/{nom-1.2.0 => nom-1.2.2}/tests/ini_str.rs (100%) rename deps/{nom-1.2.0 => nom-1.2.2}/tests/issues.rs (100%) rename deps/{nom-1.2.0 => nom-1.2.2}/tests/mp4.rs (100%) rename deps/{nom-1.2.0 => nom-1.2.2}/tests/omnom.rs (100%) rename deps/{nom-1.2.0 => nom-1.2.2}/tests/test1.rs (100%) delete mode 100644 deps/num_cpus-0.2.10/Cargo.toml delete mode 100644 deps/num_cpus-0.2.10/src/lib.rs rename deps/{toml-0.1.27 => num_cpus-0.2.11}/.gitignore (100%) create mode 100644 deps/num_cpus-0.2.11/Cargo.toml rename deps/{num_cpus-0.2.10 => num_cpus-0.2.11}/LICENSE (100%) rename deps/{num_cpus-0.2.10 => num_cpus-0.2.11}/README.md (100%) create mode 100644 deps/num_cpus-0.2.11/src/lib.rs delete mode 100644 deps/openssl-sys-0.7.6/Cargo.toml delete mode 100644 deps/openssl-sys-0.7.6/src/lib.rs create mode 100644 deps/openssl-sys-0.7.8/Cargo.toml rename deps/{openssl-sys-0.7.6 => openssl-sys-0.7.8}/LICENSE-MIT (100%) rename deps/{openssl-sys-0.7.6 => openssl-sys-0.7.8}/build.rs (100%) create mode 100644 deps/openssl-sys-0.7.8/src/lib.rs rename deps/{openssl-sys-0.7.6 => openssl-sys-0.7.8}/src/probe.rs (100%) delete mode 100644 deps/pkg-config-0.3.6/.travis.yml delete mode 100644 deps/pkg-config-0.3.6/Cargo.toml delete mode 100644 deps/pkg-config-0.3.6/src/lib.rs delete mode 100644 deps/pkg-config-0.3.6/tests/test.rs rename deps/{pkg-config-0.3.6 => pkg-config-0.3.8}/.gitignore (100%) create mode 100644 deps/pkg-config-0.3.8/.travis.yml create mode 100644 deps/pkg-config-0.3.8/Cargo.toml rename deps/{regex-0.1.48 => pkg-config-0.3.8}/LICENSE-APACHE (100%) rename deps/{pkg-config-0.3.6 => pkg-config-0.3.8}/LICENSE-MIT (100%) rename deps/{pkg-config-0.3.6 => pkg-config-0.3.8}/README.md (100%) create mode 100644 deps/pkg-config-0.3.8/src/lib.rs rename deps/{pkg-config-0.3.6 => pkg-config-0.3.8}/tests/foo.pc (100%) rename deps/{pkg-config-0.3.6 => pkg-config-0.3.8}/tests/framework.pc (100%) create mode 100644 deps/pkg-config-0.3.8/tests/test.rs delete mode 100644 deps/regex-0.1.48/.travis.yml delete mode 100644 deps/regex-0.1.48/Cargo.toml delete mode 100644 deps/regex-0.1.48/README.md delete mode 100644 deps/regex-0.1.48/examples/shootout-regex-dna-cheat.rs delete mode 100644 deps/regex-0.1.48/examples/shootout-regex-dna.rs delete mode 100644 deps/regex-0.1.48/src/backtrack.rs delete mode 100644 deps/regex-0.1.48/src/char.rs delete mode 100644 deps/regex-0.1.48/src/compile.rs delete mode 100644 deps/regex-0.1.48/src/input.rs delete mode 100644 deps/regex-0.1.48/src/inst.rs delete mode 100644 deps/regex-0.1.48/src/lib.rs delete mode 100644 deps/regex-0.1.48/src/nfa.rs delete mode 100644 deps/regex-0.1.48/src/prefix.rs delete mode 100644 deps/regex-0.1.48/src/program.rs delete mode 100644 deps/regex-0.1.48/src/re.rs rename deps/{regex-0.1.48 => regex-0.1.58}/.gitignore (100%) create mode 100644 deps/regex-0.1.58/.travis.yml create mode 100644 deps/regex-0.1.58/Cargo.toml create mode 100644 deps/regex-0.1.58/HACKING.md rename deps/{semver-0.2.2 => regex-0.1.58}/LICENSE-APACHE (100%) rename deps/{regex-0.1.48 => regex-0.1.58}/LICENSE-MIT (100%) create mode 100644 deps/regex-0.1.58/README.md rename deps/{regex-0.1.48 => regex-0.1.58}/appveyor.yml (100%) rename deps/{regex-0.1.48 => regex-0.1.58}/examples/regexdna-input.txt (100%) rename deps/{regex-0.1.48 => regex-0.1.58}/examples/regexdna-output.txt (100%) create mode 100644 deps/regex-0.1.58/examples/set.rs create mode 100644 deps/regex-0.1.58/examples/shootout-regex-dna-bytes.rs create mode 100644 deps/regex-0.1.58/examples/shootout-regex-dna-cheat.rs create mode 100644 deps/regex-0.1.58/examples/shootout-regex-dna-replace.rs create mode 100644 deps/regex-0.1.58/examples/shootout-regex-dna-single-cheat.rs rename deps/{regex-0.1.48 => regex-0.1.58}/examples/shootout-regex-dna-single.rs (100%) create mode 100644 deps/regex-0.1.58/examples/shootout-regex-dna.rs create mode 100755 deps/regex-0.1.58/run-bench create mode 100755 deps/regex-0.1.58/run-kcov rename deps/{regex-0.1.48 => regex-0.1.58}/run-shootout-test (100%) rename deps/{regex-0.1.48 => regex-0.1.58}/scripts/regex-match-tests.py (100%) rename deps/{regex-0.1.48 => regex-0.1.58}/scripts/unicode.py (100%) create mode 100644 deps/regex-0.1.58/src/backtrack.rs create mode 100644 deps/regex-0.1.58/src/compile.rs create mode 100644 deps/regex-0.1.58/src/dfa.rs create mode 100644 deps/regex-0.1.58/src/error.rs create mode 100644 deps/regex-0.1.58/src/exec.rs create mode 100644 deps/regex-0.1.58/src/expand.rs create mode 100644 deps/regex-0.1.58/src/input.rs create mode 100644 deps/regex-0.1.58/src/lib.rs create mode 100644 deps/regex-0.1.58/src/literals.rs create mode 100644 deps/regex-0.1.58/src/nfa.rs rename deps/{regex-0.1.48 => regex-0.1.58}/src/pool.rs (100%) create mode 100644 deps/regex-0.1.58/src/prog.rs create mode 100644 deps/regex-0.1.58/src/re_bytes.rs create mode 100644 deps/regex-0.1.58/src/re_unicode.rs create mode 100644 deps/regex-0.1.58/src/set.rs create mode 100644 deps/regex-0.1.58/src/sparse.rs rename deps/{regex-0.1.48 => regex-0.1.58}/src/testdata/LICENSE (100%) rename deps/{regex-0.1.48 => regex-0.1.58}/src/testdata/README (100%) rename deps/{regex-0.1.48 => regex-0.1.58}/src/testdata/basic.dat (100%) rename deps/{regex-0.1.48 => regex-0.1.58}/src/testdata/nullsubexpr.dat (100%) rename deps/{regex-0.1.48 => regex-0.1.58}/src/testdata/repetition.dat (100%) create mode 100644 deps/regex-0.1.58/src/utf8.rs create mode 100644 deps/regex-0.1.58/tests/api.rs create mode 100644 deps/regex-0.1.58/tests/api_str.rs create mode 100644 deps/regex-0.1.58/tests/bytes.rs create mode 100644 deps/regex-0.1.58/tests/crazy.rs create mode 100644 deps/regex-0.1.58/tests/flags.rs create mode 100644 deps/regex-0.1.58/tests/fowler.rs create mode 100644 deps/regex-0.1.58/tests/macros.rs create mode 100644 deps/regex-0.1.58/tests/macros_bytes.rs create mode 100644 deps/regex-0.1.58/tests/macros_str.rs create mode 100644 deps/regex-0.1.58/tests/misc.rs create mode 100644 deps/regex-0.1.58/tests/multiline.rs create mode 100644 deps/regex-0.1.58/tests/noparse.rs create mode 100644 deps/regex-0.1.58/tests/plugin.rs create mode 100644 deps/regex-0.1.58/tests/regression.rs create mode 100644 deps/regex-0.1.58/tests/replace.rs create mode 100644 deps/regex-0.1.58/tests/searcher.rs create mode 100644 deps/regex-0.1.58/tests/set.rs create mode 100644 deps/regex-0.1.58/tests/test_backtrack.rs create mode 100644 deps/regex-0.1.58/tests/test_backtrack_bytes.rs create mode 100644 deps/regex-0.1.58/tests/test_backtrack_utf8bytes.rs create mode 100644 deps/regex-0.1.58/tests/test_default.rs create mode 100644 deps/regex-0.1.58/tests/test_default_bytes.rs create mode 100644 deps/regex-0.1.58/tests/test_nfa.rs create mode 100644 deps/regex-0.1.58/tests/test_nfa_bytes.rs create mode 100644 deps/regex-0.1.58/tests/test_nfa_utf8bytes.rs create mode 100644 deps/regex-0.1.58/tests/test_plugin.rs create mode 100644 deps/regex-0.1.58/tests/unicode.rs delete mode 100644 deps/regex-syntax-0.2.2/Cargo.toml delete mode 100644 deps/regex-syntax-0.2.2/src/lib.rs delete mode 100644 deps/regex-syntax-0.2.2/src/parser.rs delete mode 100644 deps/regex-syntax-0.2.2/src/properties.rs create mode 100644 deps/regex-syntax-0.3.0/Cargo.toml create mode 100644 deps/regex-syntax-0.3.0/src/lib.rs create mode 100644 deps/regex-syntax-0.3.0/src/parser.rs create mode 100644 deps/regex-syntax-0.3.0/src/properties.rs rename deps/{regex-syntax-0.2.2 => regex-syntax-0.3.0}/src/unicode.rs (100%) delete mode 100644 deps/semver-0.2.2/.travis.yml delete mode 100644 deps/semver-0.2.2/Cargo.toml delete mode 100644 deps/semver-0.2.2/src/lib.rs delete mode 100644 deps/semver-0.2.2/src/parser.rs delete mode 100644 deps/semver-0.2.2/src/version.rs delete mode 100644 deps/semver-0.2.2/src/version_req.rs rename deps/{semver-0.2.2 => semver-0.2.3}/.gitignore (100%) create mode 100644 deps/semver-0.2.3/.travis.yml create mode 100644 deps/semver-0.2.3/Cargo.toml rename deps/{tar-0.4.3 => semver-0.2.3}/LICENSE-APACHE (100%) rename deps/{semver-0.2.2 => semver-0.2.3}/LICENSE-MIT (100%) rename deps/{semver-0.2.2 => semver-0.2.3}/README.md (100%) create mode 100644 deps/semver-0.2.3/src/lib.rs create mode 100644 deps/semver-0.2.3/src/parser.rs create mode 100644 deps/semver-0.2.3/src/version.rs create mode 100644 deps/semver-0.2.3/src/version_req.rs rename deps/{semver-0.2.2 => semver-0.2.3}/tests/regression.rs (100%) delete mode 100644 deps/tar-0.4.3/Cargo.toml delete mode 100644 deps/tar-0.4.3/src/archive.rs delete mode 100644 deps/tar-0.4.3/src/builder.rs delete mode 100644 deps/tar-0.4.3/src/entry.rs delete mode 100644 deps/tar-0.4.3/src/header.rs delete mode 100644 deps/tar-0.4.3/src/lib.rs delete mode 100644 deps/tar-0.4.3/tests/all.rs delete mode 100644 deps/tar-0.4.3/tests/header/mod.rs rename deps/{tar-0.4.3 => tar-0.4.5}/.gitignore (100%) rename deps/{tar-0.4.3 => tar-0.4.5}/.travis.yml (100%) create mode 100644 deps/tar-0.4.5/Cargo.toml rename deps/{time-0.1.34 => tar-0.4.5}/LICENSE-APACHE (100%) rename deps/{tar-0.4.3 => tar-0.4.5}/LICENSE-MIT (100%) rename deps/{tar-0.4.3 => tar-0.4.5}/README.md (100%) rename deps/{tar-0.4.3 => tar-0.4.5}/appveyor.yml (100%) create mode 100644 deps/tar-0.4.5/src/archive.rs create mode 100644 deps/tar-0.4.5/src/builder.rs create mode 100644 deps/tar-0.4.5/src/entry.rs rename deps/{tar-0.4.3 => tar-0.4.5}/src/entry_type.rs (100%) rename deps/{tar-0.4.3 => tar-0.4.5}/src/error.rs (100%) create mode 100644 deps/tar-0.4.5/src/header.rs create mode 100644 deps/tar-0.4.5/src/lib.rs rename deps/{tar-0.4.3 => tar-0.4.5}/src/pax.rs (100%) create mode 100644 deps/tar-0.4.5/tests/all.rs rename deps/{tar-0.4.3 => tar-0.4.5}/tests/archives/directory.tar (100%) rename deps/{tar-0.4.3 => tar-0.4.5}/tests/archives/duplicate_dirs.tar (100%) rename deps/{tar-0.4.3 => tar-0.4.5}/tests/archives/empty_filename.tar (100%) rename deps/{tar-0.4.3 => tar-0.4.5}/tests/archives/file_times.tar (100%) rename deps/{tar-0.4.3 => tar-0.4.5}/tests/archives/link.tar (100%) rename deps/{tar-0.4.3 => tar-0.4.5}/tests/archives/pax.tar (100%) rename deps/{tar-0.4.3 => tar-0.4.5}/tests/archives/reading_files.tar (100%) rename deps/{tar-0.4.3 => tar-0.4.5}/tests/archives/simple.tar (100%) rename deps/{tar-0.4.3 => tar-0.4.5}/tests/archives/spaces.tar (100%) create mode 100644 deps/tar-0.4.5/tests/header/mod.rs delete mode 100644 deps/time-0.1.34/.gitignore delete mode 100644 deps/time-0.1.34/.travis.yml delete mode 100644 deps/time-0.1.34/Cargo.toml delete mode 100644 deps/time-0.1.34/LICENSE-MIT delete mode 100644 deps/time-0.1.34/README.md delete mode 100644 deps/time-0.1.34/appveyor.yml delete mode 100644 deps/time-0.1.34/benches/precise_time_ns.rs delete mode 100644 deps/time-0.1.34/src/display.rs delete mode 100644 deps/time-0.1.34/src/duration.rs delete mode 100644 deps/time-0.1.34/src/lib.rs delete mode 100644 deps/time-0.1.34/src/parse.rs delete mode 100644 deps/time-0.1.34/src/sys.rs delete mode 100644 deps/toml-0.1.27/Cargo.toml delete mode 100644 deps/toml-0.1.27/src/decoder/mod.rs delete mode 100644 deps/toml-0.1.27/src/decoder/serde.rs delete mode 100644 deps/toml-0.1.27/src/encoder/mod.rs delete mode 100644 deps/toml-0.1.27/src/encoder/serde.rs create mode 100644 deps/toml-0.1.28/.gitignore rename deps/{toml-0.1.27 => toml-0.1.28}/.travis.yml (100%) create mode 100644 deps/toml-0.1.28/Cargo.toml rename deps/{toml-0.1.27 => toml-0.1.28}/LICENSE-APACHE (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/LICENSE-MIT (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/README.md (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/examples/toml2json.rs (100%) create mode 100644 deps/toml-0.1.28/src/decoder/mod.rs rename deps/{toml-0.1.27 => toml-0.1.28}/src/decoder/rustc_serialize.rs (100%) create mode 100644 deps/toml-0.1.28/src/decoder/serde.rs rename deps/{toml-0.1.27 => toml-0.1.28}/src/display.rs (100%) create mode 100644 deps/toml-0.1.28/src/encoder/mod.rs rename deps/{toml-0.1.27 => toml-0.1.28}/src/encoder/rustc_serialize.rs (100%) create mode 100644 deps/toml-0.1.28/src/encoder/serde.rs rename deps/{toml-0.1.27 => toml-0.1.28}/src/lib.rs (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/src/parser.rs (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/README.md (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/invalid-encoder/array-mixed-types-ints-and-floats.json (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/invalid.rs (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/invalid/array-mixed-types-arrays-and-ints.toml (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/invalid/array-mixed-types-ints-and-floats.toml (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/invalid/array-mixed-types-strings-and-ints.toml (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/invalid/datetime-malformed-no-leads.toml (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/invalid/datetime-malformed-no-secs.toml (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/invalid/datetime-malformed-no-t.toml (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/invalid/datetime-malformed-no-z.toml (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/invalid/datetime-malformed-with-milli.toml (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/invalid/duplicate-key-table.toml (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/invalid/duplicate-keys.toml (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/invalid/duplicate-tables.toml (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/invalid/empty-implicit-table.toml (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/invalid/empty-table.toml (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/invalid/float-no-leading-zero.toml (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/invalid/float-no-trailing-digits.toml (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/invalid/key-two-equals.toml (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/invalid/string-bad-byte-escape.toml (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/invalid/string-bad-escape.toml (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/invalid/string-byte-escapes.toml (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/invalid/string-no-close.toml (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/invalid/table-array-implicit.toml (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/invalid/table-array-malformed-bracket.toml (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/invalid/table-array-malformed-empty.toml (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/invalid/table-nested-brackets-close.toml (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/invalid/table-nested-brackets-open.toml (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/invalid/text-after-array-entries.toml (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/invalid/text-after-integer.toml (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/invalid/text-after-string.toml (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/invalid/text-after-table.toml (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/invalid/text-before-array-separator.toml (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/invalid/text-in-array.toml (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/valid.rs (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/valid/array-empty.json (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/valid/array-empty.toml (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/valid/array-nospaces.json (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/valid/array-nospaces.toml (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/valid/arrays-hetergeneous.json (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/valid/arrays-hetergeneous.toml (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/valid/arrays-nested.json (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/valid/arrays-nested.toml (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/valid/arrays.json (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/valid/arrays.toml (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/valid/bool.json (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/valid/bool.toml (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/valid/comments-everywhere.json (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/valid/comments-everywhere.toml (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/valid/datetime.json (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/valid/datetime.toml (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/valid/empty.json (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/valid/empty.toml (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/valid/example-bom.toml (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/valid/example-v0.3.0.json (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/valid/example-v0.3.0.toml (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/valid/example-v0.4.0.json (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/valid/example-v0.4.0.toml (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/valid/example.json (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/valid/example.toml (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/valid/example2.json (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/valid/example2.toml (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/valid/float.json (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/valid/float.toml (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/valid/hard_example.json (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/valid/hard_example.toml (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/valid/implicit-and-explicit-after.json (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/valid/implicit-and-explicit-after.toml (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/valid/implicit-and-explicit-before.json (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/valid/implicit-and-explicit-before.toml (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/valid/implicit-groups.json (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/valid/implicit-groups.toml (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/valid/integer.json (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/valid/integer.toml (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/valid/key-equals-nospace.json (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/valid/key-equals-nospace.toml (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/valid/key-special-chars.json (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/valid/key-special-chars.toml (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/valid/key-with-pound.json (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/valid/key-with-pound.toml (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/valid/long-float.json (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/valid/long-float.toml (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/valid/long-integer.json (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/valid/long-integer.toml (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/valid/string-empty.json (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/valid/string-empty.toml (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/valid/string-escapes.json (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/valid/string-escapes.toml (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/valid/string-simple.json (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/valid/string-simple.toml (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/valid/string-with-pound.json (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/valid/string-with-pound.toml (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/valid/table-array-implicit.json (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/valid/table-array-implicit.toml (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/valid/table-array-many.json (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/valid/table-array-many.toml (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/valid/table-array-nest.json (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/valid/table-array-nest.toml (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/valid/table-array-one.json (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/valid/table-array-one.toml (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/valid/table-empty.json (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/valid/table-empty.toml (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/valid/table-sub-empty.json (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/valid/table-sub-empty.toml (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/valid/table-whitespace.json (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/valid/table-whitespace.toml (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/valid/table-with-pound.json (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/valid/table-with-pound.toml (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/valid/unicode-escape.json (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/valid/unicode-escape.toml (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/valid/unicode-literal.json (100%) rename deps/{toml-0.1.27 => toml-0.1.28}/tests/valid/unicode-literal.toml (100%) delete mode 100644 deps/url-0.2.38/.gitignore delete mode 100644 deps/url-0.2.38/.travis.yml delete mode 100644 deps/url-0.2.38/Cargo.toml delete mode 100644 deps/url-0.2.38/LICENSE-MIT delete mode 100644 deps/url-0.2.38/Makefile delete mode 100644 deps/url-0.2.38/make_encode_sets.py delete mode 100644 deps/url-0.2.38/src/encode_sets.rs delete mode 100644 deps/url-0.2.38/src/encoding.rs delete mode 100644 deps/url-0.2.38/src/form_urlencoded.rs delete mode 100644 deps/url-0.2.38/src/format.rs delete mode 100644 deps/url-0.2.38/src/host.rs delete mode 100644 deps/url-0.2.38/src/lib.rs delete mode 100644 deps/url-0.2.38/src/parser.rs delete mode 100644 deps/url-0.2.38/src/percent_encoding.rs delete mode 100644 deps/url-0.2.38/src/punycode.rs delete mode 100644 deps/url-0.2.38/src/tests.rs delete mode 100644 deps/url-0.2.38/src/urltestdata.txt delete mode 100644 deps/url-0.2.38/src/urlutils.rs delete mode 100644 deps/url-0.5.5/.gitignore delete mode 100644 deps/url-0.5.5/.travis.yml delete mode 100644 deps/url-0.5.5/Cargo.toml delete mode 100644 deps/url-0.5.5/LICENSE-APACHE delete mode 100644 deps/url-0.5.5/LICENSE-MIT delete mode 100644 deps/url-0.5.5/Makefile delete mode 100644 deps/url-0.5.5/README.md delete mode 100644 deps/url-0.5.5/appveyor.yml delete mode 100644 deps/url-0.5.5/github.png delete mode 100644 deps/url-0.5.5/make_encode_sets.py delete mode 100644 deps/url-0.5.5/make_idna_table.py delete mode 100644 deps/url-0.5.5/src/encode_sets.rs delete mode 100644 deps/url-0.5.5/src/encoding.rs delete mode 100644 deps/url-0.5.5/src/form_urlencoded.rs delete mode 100644 deps/url-0.5.5/src/format.rs delete mode 100644 deps/url-0.5.5/src/host.rs delete mode 100644 deps/url-0.5.5/src/idna.rs delete mode 100644 deps/url-0.5.5/src/idna_mapping.rs delete mode 100644 deps/url-0.5.5/src/lib.rs delete mode 100644 deps/url-0.5.5/src/parser.rs delete mode 100644 deps/url-0.5.5/src/percent_encoding.rs delete mode 100644 deps/url-0.5.5/src/urlutils.rs delete mode 100644 deps/url-0.5.5/tests/form_urlencoded.rs delete mode 100644 deps/url-0.5.5/tests/format.rs delete mode 100644 deps/url-0.5.5/tests/idna.rs delete mode 100644 deps/url-0.5.5/tests/punycode.rs delete mode 100644 deps/url-0.5.5/tests/punycode_tests.json delete mode 100644 deps/url-0.5.5/tests/tests.rs delete mode 100644 deps/url-0.5.5/tests/urltestdata.txt delete mode 100644 deps/url-0.5.5/tests/wpt.rs create mode 100644 deps/url-1.1.0/.gitignore create mode 100644 deps/url-1.1.0/.travis.yml create mode 100644 deps/url-1.1.0/Cargo.toml rename deps/{url-0.2.38 => url-1.1.0}/LICENSE-APACHE (100%) create mode 100644 deps/url-1.1.0/LICENSE-MIT create mode 100644 deps/url-1.1.0/Makefile rename deps/{url-0.2.38 => url-1.1.0}/README.md (100%) rename deps/{url-0.2.38 => url-1.1.0}/appveyor.yml (100%) rename deps/{url-0.2.38 => url-1.1.0}/github.png (100%) create mode 100644 deps/url-1.1.0/src/encoding.rs create mode 100644 deps/url-1.1.0/src/form_urlencoded.rs create mode 100644 deps/url-1.1.0/src/host.rs create mode 100644 deps/url-1.1.0/src/lib.rs create mode 100644 deps/url-1.1.0/src/origin.rs create mode 100644 deps/url-1.1.0/src/parser.rs create mode 100644 deps/url-1.1.0/src/path_segments.rs create mode 100644 deps/url-1.1.0/src/percent_encoding.rs create mode 100644 deps/url-1.1.0/src/quirks.rs create mode 100644 deps/url-1.1.0/src/slicing.rs create mode 100644 deps/url-1.1.0/tests/data.rs create mode 100644 deps/url-1.1.0/tests/setters_tests.json create mode 100644 deps/url-1.1.0/tests/unit.rs create mode 100644 deps/url-1.1.0/tests/urltestdata.json create mode 100644 deps/url-1.1.0/todo create mode 100644 deps/utf8-ranges-0.1.3/.gitignore create mode 100644 deps/utf8-ranges-0.1.3/.travis.yml create mode 100644 deps/utf8-ranges-0.1.3/COPYING create mode 100644 deps/utf8-ranges-0.1.3/Cargo.toml create mode 100644 deps/utf8-ranges-0.1.3/LICENSE-MIT create mode 100644 deps/utf8-ranges-0.1.3/Makefile create mode 100644 deps/utf8-ranges-0.1.3/README.md create mode 100644 deps/utf8-ranges-0.1.3/UNLICENSE create mode 100644 deps/utf8-ranges-0.1.3/benches/bench.rs create mode 100644 deps/utf8-ranges-0.1.3/ctags.rust create mode 100644 deps/utf8-ranges-0.1.3/session.vim create mode 100644 deps/utf8-ranges-0.1.3/src/char_utf8.rs create mode 100644 deps/utf8-ranges-0.1.3/src/lib.rs delete mode 100644 deps/uuid-0.1.18/.gitignore delete mode 100644 deps/uuid-0.1.18/.travis.yml delete mode 100644 deps/uuid-0.1.18/Cargo.toml delete mode 100644 deps/uuid-0.1.18/LICENSE-APACHE delete mode 100644 deps/uuid-0.1.18/LICENSE-MIT delete mode 100644 deps/uuid-0.1.18/README.md delete mode 100644 deps/uuid-0.1.18/benches/parse_str.rs delete mode 100644 deps/uuid-0.1.18/src/lib.rs delete mode 100644 deps/winapi-0.2.5/.travis.yml delete mode 100644 deps/winapi-0.2.5/Cargo.toml delete mode 100644 deps/winapi-0.2.5/README.md delete mode 100644 deps/winapi-0.2.5/appveyor.yml delete mode 100644 deps/winapi-0.2.5/src/cfgmgr32.rs delete mode 100644 deps/winapi-0.2.5/src/commctrl.rs delete mode 100644 deps/winapi-0.2.5/src/commdlg.rs delete mode 100644 deps/winapi-0.2.5/src/d2d1.rs delete mode 100644 deps/winapi-0.2.5/src/d2dbasetypes.rs delete mode 100644 deps/winapi-0.2.5/src/d3d11.rs delete mode 100644 deps/winapi-0.2.5/src/d3d12.rs delete mode 100644 deps/winapi-0.2.5/src/d3d12sdklayers.rs delete mode 100644 deps/winapi-0.2.5/src/d3d9caps.rs delete mode 100644 deps/winapi-0.2.5/src/d3d9types.rs delete mode 100644 deps/winapi-0.2.5/src/d3dcommon.rs delete mode 100644 deps/winapi-0.2.5/src/dbghelp.rs delete mode 100644 deps/winapi-0.2.5/src/dcommon.rs delete mode 100644 deps/winapi-0.2.5/src/dwrite.rs delete mode 100644 deps/winapi-0.2.5/src/dxgi.rs delete mode 100644 deps/winapi-0.2.5/src/dxgi1_2.rs delete mode 100644 deps/winapi-0.2.5/src/dxgi1_3.rs delete mode 100644 deps/winapi-0.2.5/src/dxgi1_4.rs delete mode 100644 deps/winapi-0.2.5/src/dxgitype.rs delete mode 100644 deps/winapi-0.2.5/src/hidclass.rs delete mode 100644 deps/winapi-0.2.5/src/hidpi.rs delete mode 100644 deps/winapi-0.2.5/src/hidsdi.rs delete mode 100644 deps/winapi-0.2.5/src/hidusage.rs delete mode 100644 deps/winapi-0.2.5/src/hstring.rs delete mode 100644 deps/winapi-0.2.5/src/http.rs delete mode 100644 deps/winapi-0.2.5/src/lib.rs delete mode 100644 deps/winapi-0.2.5/src/macros.rs delete mode 100644 deps/winapi-0.2.5/src/minwinbase.rs delete mode 100644 deps/winapi-0.2.5/src/mmreg.rs delete mode 100644 deps/winapi-0.2.5/src/mssip.rs delete mode 100644 deps/winapi-0.2.5/src/nb30.rs delete mode 100644 deps/winapi-0.2.5/src/oaidl.rs delete mode 100644 deps/winapi-0.2.5/src/processsnapshot.rs delete mode 100644 deps/winapi-0.2.5/src/prsht.rs delete mode 100644 deps/winapi-0.2.5/src/sapi.rs delete mode 100644 deps/winapi-0.2.5/src/schannel.rs delete mode 100644 deps/winapi-0.2.5/src/setupapi.rs delete mode 100644 deps/winapi-0.2.5/src/shtypes.rs delete mode 100644 deps/winapi-0.2.5/src/sspi.rs delete mode 100644 deps/winapi-0.2.5/src/timezoneapi.rs delete mode 100644 deps/winapi-0.2.5/src/tlhelp32.rs delete mode 100644 deps/winapi-0.2.5/src/vsbackup.rs delete mode 100644 deps/winapi-0.2.5/src/wincrypt.rs delete mode 100644 deps/winapi-0.2.5/src/wingdi.rs delete mode 100644 deps/winapi-0.2.5/src/winioctl.rs delete mode 100644 deps/winapi-0.2.5/src/winnls.rs delete mode 100644 deps/winapi-0.2.5/src/winnt.rs delete mode 100644 deps/winapi-0.2.5/src/winscard.rs delete mode 100644 deps/winapi-0.2.5/src/winsock2.rs delete mode 100644 deps/winapi-0.2.5/src/winsvc.rs delete mode 100644 deps/winapi-0.2.5/src/winuser.rs delete mode 100644 deps/winapi-0.2.5/src/ws2def.rs delete mode 100644 deps/winapi-0.2.5/src/ws2spi.rs delete mode 100644 deps/winapi-0.2.5/tests/kernel32.rs rename deps/{winapi-0.2.5 => winapi-0.2.6}/.gitignore (100%) create mode 100644 deps/winapi-0.2.6/.travis.yml rename deps/{winapi-0.2.5 => winapi-0.2.6}/CONTRIBUTING.md (100%) create mode 100644 deps/winapi-0.2.6/Cargo.toml rename deps/{winapi-0.2.5 => winapi-0.2.6}/LICENSE.md (100%) create mode 100644 deps/winapi-0.2.6/README.md create mode 100644 deps/winapi-0.2.6/RabbitCode.md create mode 100644 deps/winapi-0.2.6/appveyor.yml create mode 100644 deps/winapi-0.2.6/examples/massimport.rs rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/audioclient.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/audiosessiontypes.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/basetsd.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/bcrypt.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/cfg.rs (100%) create mode 100644 deps/winapi-0.2.6/src/cfgmgr32.rs create mode 100644 deps/winapi-0.2.6/src/commctrl.rs create mode 100644 deps/winapi-0.2.6/src/commdlg.rs rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/corsym.rs (100%) create mode 100644 deps/winapi-0.2.6/src/d2d1.rs create mode 100644 deps/winapi-0.2.6/src/d2dbasetypes.rs create mode 100644 deps/winapi-0.2.6/src/d3d10shader.rs create mode 100644 deps/winapi-0.2.6/src/d3d11.rs create mode 100644 deps/winapi-0.2.6/src/d3d11shader.rs create mode 100644 deps/winapi-0.2.6/src/d3d12.rs create mode 100644 deps/winapi-0.2.6/src/d3d12sdklayers.rs rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/d3d9.rs (100%) create mode 100644 deps/winapi-0.2.6/src/d3d9caps.rs create mode 100644 deps/winapi-0.2.6/src/d3d9types.rs create mode 100644 deps/winapi-0.2.6/src/d3dcommon.rs create mode 100644 deps/winapi-0.2.6/src/d3dcompiler.rs create mode 100644 deps/winapi-0.2.6/src/dbghelp.rs create mode 100644 deps/winapi-0.2.6/src/dcommon.rs rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/devpropdef.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/docobj.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/dpapi.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/dsgetdc.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/dsound.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/dsrole.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/dwmapi.rs (100%) create mode 100644 deps/winapi-0.2.6/src/dwrite.rs create mode 100644 deps/winapi-0.2.6/src/dxgi.rs create mode 100644 deps/winapi-0.2.6/src/dxgi1_2.rs create mode 100644 deps/winapi-0.2.6/src/dxgi1_3.rs create mode 100644 deps/winapi-0.2.6/src/dxgi1_4.rs rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/dxgiformat.rs (100%) create mode 100644 deps/winapi-0.2.6/src/dxgitype.rs rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/errhandlingapi.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/excpt.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/fileapi.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/gl.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/guiddef.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/heapapi.rs (100%) create mode 100644 deps/winapi-0.2.6/src/hidclass.rs create mode 100644 deps/winapi-0.2.6/src/hidpi.rs create mode 100644 deps/winapi-0.2.6/src/hidsdi.rs create mode 100644 deps/winapi-0.2.6/src/hidusage.rs create mode 100644 deps/winapi-0.2.6/src/hstring.rs create mode 100644 deps/winapi-0.2.6/src/http.rs rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/imm.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/inaddr.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/inspectable.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/ksmedia.rs (100%) create mode 100644 deps/winapi-0.2.6/src/lib.rs rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/libloaderapi.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/lmaccess.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/lmcons.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/lmdfs.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/lmerrlog.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/lmjoin.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/lsalookup.rs (100%) create mode 100644 deps/winapi-0.2.6/src/macros.rs rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/memoryapi.rs (100%) create mode 100644 deps/winapi-0.2.6/src/minwinbase.rs rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/minwindef.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/mmdeviceapi.rs (100%) create mode 100644 deps/winapi-0.2.6/src/mmreg.rs rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/mmsystem.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/mscat.rs (100%) create mode 100644 deps/winapi-0.2.6/src/mssip.rs create mode 100644 deps/winapi-0.2.6/src/nb30.rs rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/ncrypt.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/ntdef.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/ntsecapi.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/ntstatus.rs (100%) create mode 100644 deps/winapi-0.2.6/src/oaidl.rs rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/objbase.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/objidl.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/objidlbase.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/olectl.rs (100%) create mode 100644 deps/winapi-0.2.6/src/processsnapshot.rs rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/processthreadsapi.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/propsys.rs (100%) create mode 100644 deps/winapi-0.2.6/src/prsht.rs rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/psapi.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/qos.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/reason.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/rpc.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/rpcdce.rs (100%) create mode 100644 deps/winapi-0.2.6/src/sapi.rs create mode 100644 deps/winapi-0.2.6/src/schannel.rs rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/servprov.rs (100%) create mode 100644 deps/winapi-0.2.6/src/setupapi.rs rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/shellapi.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/shellscalingapi.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/shlguid.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/shlobj.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/shobjidl.rs (100%) create mode 100644 deps/winapi-0.2.6/src/shtypes.rs rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/spapidef.rs (100%) create mode 100644 deps/winapi-0.2.6/src/sql.rs create mode 100644 deps/winapi-0.2.6/src/sqltypes.rs create mode 100644 deps/winapi-0.2.6/src/sspi.rs rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/subauth.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/synchapi.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/sysinfoapi.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/threadpoolapi.rs (100%) create mode 100644 deps/winapi-0.2.6/src/timezoneapi.rs create mode 100644 deps/winapi-0.2.6/src/tlhelp32.rs rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/unknwnbase.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/urlhist.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/urlmon.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/usp10.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/vadefs.rs (100%) create mode 100644 deps/winapi-0.2.6/src/vsbackup.rs rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/vss.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/vsserror.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/vswriter.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/werapi.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/winbase.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/wincon.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/wincred.rs (100%) create mode 100644 deps/winapi-0.2.6/src/wincrypt.rs rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/windef.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/windowscodecs.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/windowsx.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/winerror.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/winevt.rs (100%) create mode 100644 deps/winapi-0.2.6/src/wingdi.rs rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/winhttp.rs (100%) create mode 100644 deps/winapi-0.2.6/src/winioctl.rs rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/winnetwk.rs (100%) create mode 100644 deps/winapi-0.2.6/src/winnls.rs create mode 100644 deps/winapi-0.2.6/src/winnt.rs create mode 100644 deps/winapi-0.2.6/src/winscard.rs rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/winsmcrd.rs (100%) create mode 100644 deps/winapi-0.2.6/src/winsock2.rs rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/winspool.rs (100%) create mode 100644 deps/winapi-0.2.6/src/winsvc.rs create mode 100644 deps/winapi-0.2.6/src/winuser.rs create mode 100644 deps/winapi-0.2.6/src/ws2def.rs rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/ws2ipdef.rs (100%) create mode 100644 deps/winapi-0.2.6/src/ws2spi.rs rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/ws2tcpip.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/wtypes.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/wtypesbase.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/src/xinput.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/tests/advapi32.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/tests/bcrypt.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/tests/comctl32.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/tests/comdlg32.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/tests/credui.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/tests/crypt32.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/tests/d2d1.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/tests/d3d11.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/tests/d3d12.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/tests/dwmapi.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/tests/dwrite.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/tests/dxgi.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/tests/gdi32.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/tests/httpapi.rs (100%) create mode 100644 deps/winapi-0.2.6/tests/kernel32.rs rename deps/{winapi-0.2.5 => winapi-0.2.6}/tests/ktmw32.rs (100%) create mode 100644 deps/winapi-0.2.6/tests/lib.rs rename deps/{winapi-0.2.5 => winapi-0.2.6}/tests/mpr.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/tests/netapi32.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/tests/psapi.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/tests/setupapi.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/tests/shell32.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/tests/user32.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/tests/usp10.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/tests/uuid.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/tests/winhttp.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/tests/winmm.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/tests/winscard.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/tests/winspool.rs (100%) rename deps/{winapi-0.2.5 => winapi-0.2.6}/tests/ws2_32.rs (100%) create mode 100644 deps/winapi-0.2.6/x86_64.tar create mode 100644 deps/winapi-0.2.6/x86_64.tar.gz diff --git a/deps/aho-corasick-0.4.1/Cargo.toml b/deps/aho-corasick-0.4.1/Cargo.toml deleted file mode 100644 index 2086a7945..000000000 --- a/deps/aho-corasick-0.4.1/Cargo.toml +++ /dev/null @@ -1,36 +0,0 @@ -[package] -name = "aho-corasick" -version = "0.4.1" #:version -authors = ["Andrew Gallant "] -description = "Fast multiple substring searching with finite state machines." -documentation = "http://burntsushi.net/rustdoc/aho_corasick/" -homepage = "https://github.com/BurntSushi/aho-corasick" -repository = "https://github.com/BurntSushi/aho-corasick" -readme = "README.md" -keywords = ["string", "search", "text", "aho", "corasick"] -license = "Unlicense/MIT" - -[lib] -name = "aho_corasick" - -[[bin]] -name = "aho-corasick-dot" -test = false -doc = false -bench = false - -[dependencies] -memchr = "0.1.*" - -[dev-dependencies] -csv = "0.14" -docopt = "0.6" -quickcheck = "0.2" -rand = "0.3" -rustc-serialize = "0.3" - -[[bench]] -name = "bench" -path = "benches/bench.rs" -test = false -bench = true diff --git a/deps/aho-corasick-0.4.1/src/autiter.rs b/deps/aho-corasick-0.4.1/src/autiter.rs deleted file mode 100644 index f447afdae..000000000 --- a/deps/aho-corasick-0.4.1/src/autiter.rs +++ /dev/null @@ -1,401 +0,0 @@ -use std::io::{self, BufRead}; -use std::marker::PhantomData; - -use super::{ROOT_STATE, StateIdx}; - -/// An abstraction over automatons and their corresponding iterators. -/// The type parameter `P` is the type of the pattern that was used to -/// construct this Automaton. -pub trait Automaton

{ - /// Return the next state given the current state and next character. - fn next_state(&self, si: StateIdx, b: u8) -> StateIdx; - - /// Return true if and only if the given state and current pattern index - /// indicate a match. - fn has_match(&self, si: StateIdx, outi: usize) -> bool; - - /// Build a match given the current state, pattern index and input index. - fn get_match(&self, si: StateIdx, outi: usize, texti: usize) -> Match; - - /// Attempt to skip through the input. - /// - /// This returns the index into `text` at which the next match attempt - /// should start. (If no skipping occurred, then the return value should - /// be equal to `at`.) - /// - /// Finally, if no match is possible, then return `text.len()`. - fn skip_to(&self, si: StateIdx, text: &[u8], at: usize) -> usize; - - /// Returns true if and only if this automaton can skip through the input. - fn is_skippable(&self) -> bool; - - /// Returns all of the patterns matched by this automaton. - /// - /// The order of the patterns is the order in which they were added. - fn patterns(&self) -> &[P]; - - /// Returns the pattern indexed at `i`. - /// - /// The index corresponds to the position at which the pattern was added - /// to the automaton, starting at `0`. - fn pattern(&self, i: usize) -> &P; - - /// Return the number of patterns in the automaton. - #[inline] - fn len(&self) -> usize { - self.patterns().len() - } - - /// Returns true if the automaton has no patterns. - #[inline] - fn is_empty(&self) -> bool { - self.len() == 0 - } - - /// Returns an iterator of non-overlapping matches in `s`. - fn find<'a, 's, Q: ?Sized + AsRef<[u8]>>( - &'a self, - s: &'s Q, - ) -> Matches<'a, 's, P, Self> - where Self: Sized { - Matches { - aut: self, - text: s.as_ref(), - texti: 0, - si: ROOT_STATE, - _m: PhantomData, - } - } - - /// Returns an iterator of overlapping matches in `s`. - fn find_overlapping<'a, 's, Q: ?Sized + AsRef<[u8]>>( - &'a self, - s: &'s Q, - ) -> MatchesOverlapping<'a, 's, P, Self> - where Self: Sized { - MatchesOverlapping { - aut: self, - text: s.as_ref(), - texti: 0, - si: ROOT_STATE, - outi: 0, - _m: PhantomData, - } - } - - /// Returns an iterator of non-overlapping matches in the given reader. - fn stream_find<'a, R: io::Read>( - &'a self, - rdr: R, - ) -> StreamMatches<'a, R, P, Self> - where Self: Sized { - StreamMatches { - aut: self, - buf: io::BufReader::new(rdr), - texti: 0, - si: ROOT_STATE, - _m: PhantomData, - } - } - - /// Returns an iterator of overlapping matches in the given reader. - fn stream_find_overlapping<'a, R: io::Read>( - &'a self, - rdr: R, - ) -> StreamMatchesOverlapping<'a, R, P, Self> - where Self: Sized { - StreamMatchesOverlapping { - aut: self, - buf: io::BufReader::new(rdr), - texti: 0, - si: ROOT_STATE, - outi: 0, - _m: PhantomData, - } - } -} - -impl<'a, P: AsRef<[u8]>, A: 'a + Automaton

+ ?Sized> - Automaton

for &'a A { - fn next_state(&self, si: StateIdx, b: u8) -> StateIdx { - (**self).next_state(si, b) - } - - fn has_match(&self, si: StateIdx, outi: usize) -> bool { - (**self).has_match(si, outi) - } - - fn skip_to(&self, si: StateIdx, text: &[u8], at: usize) -> usize { - (**self).skip_to(si, text, at) - } - - fn is_skippable(&self) -> bool { - (**self).is_skippable() - } - - fn patterns(&self) -> &[P] { - (**self).patterns() - } - - fn pattern(&self, i: usize) -> &P { - (**self).pattern(i) - } - - fn get_match(&self, si: StateIdx, outi: usize, texti: usize) -> Match { - (**self).get_match(si, outi, texti) - } -} - -/// Records a match in the search text. -#[derive(Copy, Clone, Debug, Hash, PartialEq, Eq)] -pub struct Match { - /// The pattern index. - /// - /// This corresponds to the ordering in which the matched pattern was - /// added to the automaton, starting at `0`. - pub pati: usize, - /// The starting byte offset of the match in the search text. - pub start: usize, - /// The ending byte offset of the match in the search text. - /// - /// (This can be re-captiulated with `pati` and adding the pattern's - /// length to `start`, but it is convenient to have it here.) - pub end: usize, -} - -/// An iterator of non-overlapping matches for in-memory text. -/// -/// This iterator yields `Match` values. -/// -/// `'a` is the lifetime of the automaton, `'s` is the lifetime of the -/// search text, and `P` is the type of the Automaton's pattern. -#[derive(Debug)] -pub struct Matches<'a, 's, P, A: 'a + Automaton

+ ?Sized> { - aut: &'a A, - text: &'s [u8], - texti: usize, - si: StateIdx, - _m: PhantomData

, -} - -// When there's an initial lone start byte, it is usually worth it -// to use `memchr` to skip along the input. The problem is that -// the skipping function is called in the inner match loop, which -// can be quite costly if the skipping condition is never met. -// Therefore, we lift the case analysis outside of the inner loop at -// the cost of repeating code. -// -// `step_to_match` is the version of the inner loop without skipping, -// and `skip_to_match` is the version with skipping. -fn step_to_match + ?Sized>( - aut: &A, - text: &[u8], - mut texti: usize, - mut si: StateIdx -) -> Option<(usize, StateIdx)> { - while texti < text.len() { - si = aut.next_state(si, text[texti]); - if aut.has_match(si, 0) { - return Some((texti, si)); - } - texti += 1; - } - None -} - -fn skip_to_match + ?Sized>( - aut: &A, - text: &[u8], - mut texti: usize, - mut si: StateIdx -) -> Option<(usize, StateIdx)> { - texti = aut.skip_to(si, text, texti); - while texti < text.len() { - si = aut.next_state(si, text[texti]); - if aut.has_match(si, 0) { - return Some((texti, si)); - } - texti = aut.skip_to(si, text, texti + 1); - } - None -} - -impl<'a, 's, P, A: Automaton

+ ?Sized> Iterator for Matches<'a, 's, P, A> { - type Item = Match; - - fn next(&mut self) -> Option { - if self.aut.is_skippable() { - let skip = skip_to_match(self.aut, self.text, self.texti, self.si); - if let Some((texti, si)) = skip { - self.texti = texti + 1; - self.si = ROOT_STATE; - return Some(self.aut.get_match(si, 0, texti)); - } - } else { - let step = step_to_match(self.aut, self.text, self.texti, self.si); - if let Some((texti, si)) = step { - self.texti = texti + 1; - self.si = ROOT_STATE; - return Some(self.aut.get_match(si, 0, texti)); - } - } - None - } -} - -/// An iterator of non-overlapping matches for streaming text. -/// -/// This iterator yields `io::Result` values. -/// -/// `'a` is the lifetime of the automaton, `R` is the type of the underlying -/// `io::Read`er, and P is the type of the Automaton's pattern. -#[derive(Debug)] -pub struct StreamMatches<'a, R, P, A: 'a + Automaton

+ ?Sized> { - aut: &'a A, - buf: io::BufReader, - texti: usize, - si: StateIdx, - _m: PhantomData

, -} - -impl<'a, R: io::Read, P, A: Automaton

> - Iterator for StreamMatches<'a, R, P, A> { - type Item = io::Result; - - fn next(&mut self) -> Option> { - let mut m = None; - let mut consumed = 0; -'LOOP: loop { - self.buf.consume(consumed); - let bs = match self.buf.fill_buf() { - Err(err) => return Some(Err(err)), - Ok(bs) if bs.len() == 0 => break, - Ok(bs) => bs, - }; - consumed = bs.len(); // is shortened if we find a match - for (i, &b) in bs.iter().enumerate() { - self.si = self.aut.next_state(self.si, b); - if self.aut.has_match(self.si, 0) { - m = Some(Ok(self.aut.get_match(self.si, 0, self.texti))); - consumed = i + 1; - self.texti += 1; - self.si = ROOT_STATE; - break 'LOOP; - } - self.texti += 1; - } - } - self.buf.consume(consumed); - m - } -} - -/// An iterator of overlapping matches for in-memory text. -/// -/// This iterator yields `Match` values. -/// -/// `'a` is the lifetime of the automaton, `'s` is the lifetime of the -/// search text, and `P` is the type of the Automaton's pattern. -#[derive(Debug)] -pub struct MatchesOverlapping<'a, 's, P, A: 'a + Automaton

+ ?Sized> { - aut: &'a A, - text: &'s [u8], - texti: usize, - si: StateIdx, - outi: usize, - _m: PhantomData

, -} - -impl<'a, 's, P, A: Automaton

+ ?Sized> - Iterator for MatchesOverlapping<'a, 's, P, A> { - type Item = Match; - - fn next(&mut self) -> Option { - if self.aut.has_match(self.si, self.outi) { - let m = self.aut.get_match(self.si, self.outi, self.texti); - self.outi += 1; - if !self.aut.has_match(self.si, self.outi) { - self.texti += 1; - } - return Some(m); - } - - self.outi = 0; - if self.aut.is_skippable() { - let skip = skip_to_match(self.aut, self.text, self.texti, self.si); - if let Some((texti, si)) = skip { - self.texti = texti; - self.si = si; - return self.next(); - } - } else { - let step = step_to_match(self.aut, self.text, self.texti, self.si); - if let Some((texti, si)) = step { - self.texti = texti; - self.si = si; - return self.next(); - } - } - None - } -} - -/// An iterator of overlapping matches for streaming text. -/// -/// This iterator yields `io::Result` values. -/// -/// `'a` is the lifetime of the automaton, `R` is the type of the underlying -/// `io::Read`er, and P is the type of the Automaton's pattern. -#[derive(Debug)] -pub struct StreamMatchesOverlapping<'a, R, P, A: 'a + Automaton

+ ?Sized> { - aut: &'a A, - buf: io::BufReader, - texti: usize, - si: StateIdx, - outi: usize, - _m: PhantomData

, -} - -impl<'a, R: io::Read, P, A: Automaton

+ ?Sized> - Iterator for StreamMatchesOverlapping<'a, R, P, A> { - type Item = io::Result; - - fn next(&mut self) -> Option> { - if self.aut.has_match(self.si, self.outi) { - let m = self.aut.get_match(self.si, self.outi, self.texti); - self.outi += 1; - if !self.aut.has_match(self.si, self.outi) { - self.texti += 1; - } - return Some(Ok(m)); - } - let mut m = None; - let mut consumed = 0; - self.outi = 0; -'LOOP: loop { - self.buf.consume(consumed); - let bs = match self.buf.fill_buf() { - Err(err) => return Some(Err(err)), - Ok(bs) if bs.len() == 0 => break, - Ok(bs) => bs, - }; - consumed = bs.len(); // is shortened if we find a match - for (i, &b) in bs.iter().enumerate() { - self.si = self.aut.next_state(self.si, b); - if self.aut.has_match(self.si, self.outi) { - m = Some(Ok(self.aut.get_match( - self.si, self.outi, self.texti))); - consumed = i + 1; - self.outi += 1; - if !self.aut.has_match(self.si, self.outi) { - self.texti += 1; - } - break 'LOOP; - } - self.texti += 1; - } - } - self.buf.consume(consumed); - m - } -} diff --git a/deps/aho-corasick-0.4.1/src/full.rs b/deps/aho-corasick-0.4.1/src/full.rs deleted file mode 100644 index 60dcd28eb..000000000 --- a/deps/aho-corasick-0.4.1/src/full.rs +++ /dev/null @@ -1,149 +0,0 @@ -use std::fmt; -use std::mem; - -use memchr::memchr; - -use super::{ - FAIL_STATE, ROOT_STATE, - StateIdx, AcAutomaton, Transitions, Match, - usize_bytes, vec_bytes, -}; -use super::autiter::Automaton; - -/// A complete Aho-Corasick automaton. -/// -/// This uses a single transition matrix that permits each input character -/// to move to the next state with a single lookup in the matrix. -/// -/// This is as fast as it gets, but it is guaranteed to use a lot of memory. -/// Namely, it will use at least `4 * 256 * #states`, where the number of -/// states is capped at length of all patterns concatenated. -#[derive(Clone)] -pub struct FullAcAutomaton

{ - pats: Vec

, - trans: Vec, // row-major, where states are rows - out: Vec>, // indexed by StateIdx - start_bytes: Vec, -} - -impl> FullAcAutomaton

{ - /// Build a new expanded Aho-Corasick automaton from an existing - /// Aho-Corasick automaton. - pub fn new(ac: AcAutomaton) -> FullAcAutomaton

{ - let mut fac = FullAcAutomaton { - pats: vec![], - trans: vec![FAIL_STATE; 256 * ac.states.len()], - out: vec![vec![]; ac.states.len()], - start_bytes: vec![], - }; - fac.build_matrix(&ac); - fac.pats = ac.pats; - fac.start_bytes = ac.start_bytes; - fac - } - - #[doc(hidden)] - pub fn memory_usage(&self) -> usize { - self.pats.iter() - .map(|p| vec_bytes() + p.as_ref().len()) - .fold(0, |a, b| a + b) - + (4 * self.trans.len()) - + self.out.iter() - .map(|v| vec_bytes() + (usize_bytes() * v.len())) - .fold(0, |a, b| a + b) - + self.start_bytes.len() - } - - #[doc(hidden)] - pub fn heap_bytes(&self) -> usize { - self.pats.iter() - .map(|p| mem::size_of::

() + p.as_ref().len()) - .fold(0, |a, b| a + b) - + (4 * self.trans.len()) - + self.out.iter() - .map(|v| vec_bytes() + (usize_bytes() * v.len())) - .fold(0, |a, b| a + b) - + self.start_bytes.len() - } - - fn set(&mut self, si: StateIdx, i: u8, goto: StateIdx) { - let ns = self.num_states(); - self.trans[i as usize * ns + si as usize] = goto; - } - - #[doc(hidden)] - #[inline] - pub fn num_states(&self) -> usize { - self.out.len() - } -} - -impl> Automaton

for FullAcAutomaton

{ - #[inline] - fn next_state(&self, si: StateIdx, i: u8) -> StateIdx { - self.trans[i as usize * self.num_states() + si as usize] - } - - #[inline] - fn get_match(&self, si: StateIdx, outi: usize, texti: usize) -> Match { - let pati = self.out[si as usize][outi]; - let patlen = self.pats[pati].as_ref().len(); - let start = texti + 1 - patlen; - Match { - pati: pati, - start: start, - end: start + patlen, - } - } - - #[inline] - fn has_match(&self, si: StateIdx, outi: usize) -> bool { - outi < self.out[si as usize].len() - } - - #[inline] - fn skip_to(&self, si: StateIdx, text: &[u8], at: usize) -> usize { - if si != ROOT_STATE || !self.is_skippable() { - return at; - } - let b = self.start_bytes[0]; - match memchr(b, &text[at..]) { - None => text.len(), - Some(i) => at + i, - } - } - - #[inline] - fn is_skippable(&self) -> bool { - self.start_bytes.len() == 1 - } - - #[inline] - fn patterns(&self) -> &[P] { - &self.pats - } - - #[inline] - fn pattern(&self, i: usize) -> &P { - &self.pats[i] - } -} - -impl> FullAcAutomaton

{ - fn build_matrix(&mut self, ac: &AcAutomaton) { - for (si, s) in ac.states.iter().enumerate().skip(1) { - for b in (0..256).map(|b| b as u8) { - self.set(si as StateIdx, b, ac.next_state(si as StateIdx, b)); - } - for &pati in &s.out { - self.out[si].push(pati); - } - } - } -} - -impl + fmt::Debug> fmt::Debug for FullAcAutomaton

{ - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "FullAcAutomaton({:?})", self.pats) - } -} diff --git a/deps/aho-corasick-0.4.1/src/lib.rs b/deps/aho-corasick-0.4.1/src/lib.rs deleted file mode 100644 index 123e8436b..000000000 --- a/deps/aho-corasick-0.4.1/src/lib.rs +++ /dev/null @@ -1,933 +0,0 @@ -/*! -An implementation of the -[Aho-Corasick string search algorithm](https://en.wikipedia.org/wiki/Aho%E2%80%93Corasick_string_matching_algorithm). - -The Aho-Corasick algorithm is principally useful when you need to search many -large texts for a fixed (possibly large) set of keywords. In particular, the -Aho-Corasick algorithm preprocesses the set of keywords by constructing a -finite state machine. The search phase is then a quick linear scan through the -text. Each character in the search text causes a state transition in the -automaton. Matches are reported when the automaton enters a match state. - -# Examples - -The main type exposed by this crate is `AcAutomaton`, which can be constructed -from an iterator of pattern strings: - -```rust -use aho_corasick::{Automaton, AcAutomaton}; - -let aut = AcAutomaton::new(vec!["apple", "maple"]); - -// AcAutomaton also implements `FromIterator`: -let aut: AcAutomaton<&str> = ["apple", "maple"].iter().cloned().collect(); -``` - -Finding matches can be done with `find`: - -```rust -use aho_corasick::{Automaton, AcAutomaton, Match}; - -let aut = AcAutomaton::new(vec!["apple", "maple"]); -let mut it = aut.find("I like maple apples."); -assert_eq!(it.next(), Some(Match { - pati: 1, - start: 7, - end: 12, -})); -assert_eq!(it.next(), Some(Match { - pati: 0, - start: 13, - end: 18, -})); -assert_eq!(it.next(), None); -``` - -Use `find_overlapping` if you want to report all matches, even if they -overlap with each other. - -```rust -use aho_corasick::{Automaton, AcAutomaton, Match}; - -let aut = AcAutomaton::new(vec!["abc", "a"]); -let matches: Vec<_> = aut.find_overlapping("abc").collect(); -assert_eq!(matches, vec![ - Match { pati: 1, start: 0, end: 1}, Match { pati: 0, start: 0, end: 3 }, -]); - -// Regular `find` will report only one match: -let matches: Vec<_> = aut.find("abc").collect(); -assert_eq!(matches, vec![Match { pati: 1, start: 0, end: 1}]); -``` - -Finally, there are also methods for finding matches on *streams*. Namely, the -search text does not have to live in memory. It's useful to run this on files -that can't fit into memory: - -```no_run -use std::fs::File; - -use aho_corasick::{Automaton, AcAutomaton}; - -let aut = AcAutomaton::new(vec!["foo", "bar", "baz"]); -let rdr = File::open("search.txt").unwrap(); -for m in aut.stream_find(rdr) { - let m = m.unwrap(); // could be an IO error - println!("Pattern '{}' matched at: ({}, {})", - aut.pattern(m.pati), m.start, m.end); -} -``` - -There is also `stream_find_overlapping`, which is just like `find_overlapping`, -but it operates on streams. - -Please see `dict-search.rs` in this crate's `examples` directory for a more -complete example. It creates a large automaton from a dictionary and can do a -streaming match over arbitrarily large data. - -# Memory usage - -A key aspect of an Aho-Corasick implementation is how the state transitions -are represented. The easiest way to make the automaton fast is to store a -sparse 256-slot map in each state. It maps an input byte to a state index. -This makes the matching loop extremely fast, since it translates to a simple -pointer read. - -The problem is that as the automaton accumulates more states, you end up paying -a `256 * 4` (`4` is for the `u32` state index) byte penalty for every state -regardless of how many transitions it has. - -To solve this, only states near the root of the automaton have this sparse -map representation. States near the leaves of the automaton use a dense mapping -that requires a linear scan. - -(The specific limit currently set is `3`, so that states with a depth less than -or equal to `3` are less memory efficient. The result is that the memory usage -of the automaton stops growing rapidly past ~60MB, even for automatons with -thousands of patterns.) - -If you'd like to opt for the less-memory-efficient-but-faster version, then -you can construct an `AcAutomaton` with a `Sparse` transition strategy: - -```rust -use aho_corasick::{Automaton, AcAutomaton, Match, Sparse}; - -let aut = AcAutomaton::<&str, Sparse>::with_transitions(vec!["abc", "a"]); -let matches: Vec<_> = aut.find("abc").collect(); -assert_eq!(matches, vec![Match { pati: 1, start: 0, end: 1}]); -``` -*/ - -#![deny(missing_docs)] - -extern crate memchr; -#[cfg(test)] extern crate quickcheck; -#[cfg(test)] extern crate rand; - -use std::collections::VecDeque; -use std::fmt; -use std::iter::FromIterator; -use std::mem; - -use memchr::memchr; - -pub use self::autiter::{ - Automaton, Match, - Matches, MatchesOverlapping, StreamMatches, StreamMatchesOverlapping, -}; -pub use self::full::FullAcAutomaton; - -// We're specifying paths explicitly so that we can use -// these modules simultaneously from `main.rs`. -// Should probably make just make `main.rs` a separate crate. -#[path = "autiter.rs"] -mod autiter; -#[path = "full.rs"] -mod full; - -/// The integer type used for the state index. -/// -/// Limiting this to 32 bit integers can have a big impact on memory usage -/// when using the `Sparse` transition representation. -pub type StateIdx = u32; - -// Constants for special state indexes. -const FAIL_STATE: u32 = 0; -const ROOT_STATE: u32 = 1; - -// Limit the depth at which we use a sparse alphabet map. Once the limit is -// reached, a dense set is used (and lookup becomes O(n)). -// -// This does have a performance hit, but the (straight forward) alternative -// is to have a `256 * 4` byte overhead for every state. -// Given that Aho-Corasick is typically used for dictionary searching, this -// can lead to dramatic memory bloat. -// -// This limit should only be increased at your peril. Namely, in the worst -// case, `256^DENSE_DEPTH_THRESHOLD * 4` corresponds to the memory usage in -// bytes. A value of `1` gives us a good balance. This is also a happy point -// in the benchmarks. A value of `0` gives considerably worse times on certain -// benchmarks (e.g., `ac_ten_one_prefix_byte_every_match`) than even a value -// of `1`. A value of `2` is slightly better than `1` and it looks like gains -// level off at that point with not much observable difference when set to -// `3`. -// -// Why not make this user configurable? Well, it doesn't make much sense -// because we pay for it with case analysis in the matching loop. Increasing it -// doesn't have much impact on performance (outside of pathological cases?). -// -// N.B. Someone else seems to have discovered an alternative, but I haven't -// grokked it yet: https://github.com/mischasan/aho-corasick -const DENSE_DEPTH_THRESHOLD: u32 = 1; - -/// An Aho-Corasick finite automaton. -/// -/// The type parameter `P` is the type of the pattern that was used to -/// construct this AcAutomaton. -#[derive(Clone)] -pub struct AcAutomaton { - pats: Vec

, - states: Vec>, - start_bytes: Vec, -} - -#[derive(Clone)] -struct State { - out: Vec, - fail: StateIdx, - goto: T, - depth: u32, -} - -impl> AcAutomaton

{ - /// Create a new automaton from an iterator of patterns. - /// - /// The patterns must be convertible to bytes (`&[u8]`) via the `AsRef` - /// trait. - pub fn new(pats: I) -> AcAutomaton - where I: IntoIterator { - AcAutomaton::with_transitions(pats) - } -} - -impl, T: Transitions> AcAutomaton { - /// Create a new automaton from an iterator of patterns. - /// - /// This constructor allows one to choose the transition representation. - /// - /// The patterns must be convertible to bytes (`&[u8]`) via the `AsRef` - /// trait. - pub fn with_transitions(pats: I) -> AcAutomaton - where I: IntoIterator { - AcAutomaton { - pats: vec![], // filled in later, avoid wrath of borrow checker - states: vec![State::new(0), State::new(0)], // empty and root - start_bytes: vec![], // also filled in later - }.build(pats.into_iter().collect()) - } - - /// Build out the entire automaton into a single matrix. - /// - /// This will make searching as fast as possible at the expense of using - /// at least `4 * 256 * #states` bytes of memory. - pub fn into_full(self) -> FullAcAutomaton

{ - FullAcAutomaton::new(self) - } - - #[doc(hidden)] - pub fn num_states(&self) -> usize { - self.states.len() - } - - #[doc(hidden)] - pub fn heap_bytes(&self) -> usize { - self.pats.iter() - .map(|p| mem::size_of::

() + p.as_ref().len()) - .fold(0, |a, b| a + b) - + self.states.iter() - .map(|s| mem::size_of::>() + s.heap_bytes()) - .fold(0, |a, b| a + b) - + self.start_bytes.len() - } -} - -impl, T: Transitions> Automaton

for AcAutomaton { - #[inline] - fn next_state(&self, mut si: StateIdx, b: u8) -> StateIdx { - loop { - let maybe_si = self.states[si as usize].goto(b); - if maybe_si != FAIL_STATE { - si = maybe_si; - break; - } else { - si = self.states[si as usize].fail; - } - } - si - } - - #[inline] - fn get_match(&self, si: StateIdx, outi: usize, texti: usize) -> Match { - let pati = self.states[si as usize].out[outi]; - let patlen = self.pats[pati].as_ref().len(); - let start = texti + 1 - patlen; - Match { - pati: pati, - start: start, - end: start + patlen, - } - } - - #[inline] - fn has_match(&self, si: StateIdx, outi: usize) -> bool { - outi < self.states[si as usize].out.len() - } - - #[inline] - fn skip_to(&self, si: StateIdx, text: &[u8], at: usize) -> usize { - if si != ROOT_STATE || !self.is_skippable() { - return at; - } - let b = self.start_bytes[0]; - match memchr(b, &text[at..]) { - None => text.len(), - Some(i) => at + i, - } - } - - #[inline] - fn is_skippable(&self) -> bool { - self.start_bytes.len() == 1 - } - - #[inline] - fn patterns(&self) -> &[P] { - &self.pats - } - - #[inline] - fn pattern(&self, i: usize) -> &P { - &self.pats[i] - } -} - -// Below contains code for *building* the automaton. It's a reasonably faithful -// translation of the description/psuedo-code from: -// http://www.cs.uku.fi/~kilpelai/BSA05/lectures/slides04.pdf - -impl, T: Transitions> AcAutomaton { - // This is the first phase and builds the initial keyword tree. - fn build(mut self, pats: Vec

) -> AcAutomaton { - for (pati, pat) in pats.iter().enumerate() { - if pat.as_ref().is_empty() { - continue; - } - let mut previ = ROOT_STATE; - for &b in pat.as_ref() { - if self.states[previ as usize].goto(b) != FAIL_STATE { - previ = self.states[previ as usize].goto(b); - } else { - let depth = self.states[previ as usize].depth + 1; - let nexti = self.add_state(State::new(depth)); - self.states[previ as usize].set_goto(b, nexti); - previ = nexti; - } - } - self.states[previ as usize].out.push(pati); - } - for c in (0..256).into_iter().map(|c| c as u8) { - if self.states[ROOT_STATE as usize].goto(c) == FAIL_STATE { - self.states[ROOT_STATE as usize].set_goto(c, ROOT_STATE); - } else { - self.start_bytes.push(c); - } - } - self.pats = pats; - self.fill() - } - - // The second phase that fills in the back links. - fn fill(mut self) -> AcAutomaton { - // Fill up the queue with all non-root transitions out of the root - // node. Then proceed by breadth first traversal. - let mut q = VecDeque::new(); - for c in (0..256).into_iter().map(|c| c as u8) { - let si = self.states[ROOT_STATE as usize].goto(c); - if si != ROOT_STATE { - q.push_front(si); - } - } - while let Some(si) = q.pop_back() { - for c in (0..256).into_iter().map(|c| c as u8) { - let u = self.states[si as usize].goto(c); - if u != FAIL_STATE { - q.push_front(u); - let mut v = self.states[si as usize].fail; - while self.states[v as usize].goto(c) == FAIL_STATE { - v = self.states[v as usize].fail; - } - let ufail = self.states[v as usize].goto(c); - self.states[u as usize].fail = ufail; - let ufail_out = self.states[ufail as usize].out.clone(); - self.states[u as usize].out.extend(ufail_out); - } - } - } - self - } - - fn add_state(&mut self, state: State) -> StateIdx { - let i = self.states.len(); - self.states.push(state); - i as StateIdx - } -} - -impl State { - fn new(depth: u32) -> State { - State { - out: vec![], - fail: 1, - goto: Transitions::new(depth), - depth: depth, - } - } - - fn goto(&self, b: u8) -> StateIdx { - self.goto.goto(b) - } - - fn set_goto(&mut self, b: u8, si: StateIdx) { - self.goto.set_goto(b, si); - } - - fn heap_bytes(&self) -> usize { - (self.out.len() * usize_bytes()) - + self.goto.heap_bytes() - } -} - -/// An abstraction over state transition strategies. -/// -/// This is an attempt to let the caller choose the space/time trade offs -/// used for state transitions. -/// -/// (It's possible that this interface is merely good enough for just the two -/// implementations in this crate.) -pub trait Transitions { - /// Return a new state at the given depth. - fn new(depth: u32) -> Self; - /// Return the next state index given the next character. - fn goto(&self, alpha: u8) -> StateIdx; - /// Set the next state index for the character given. - fn set_goto(&mut self, alpha: u8, si: StateIdx); - /// The memory use in bytes (on the heap) of this set of transitions. - fn heap_bytes(&self) -> usize; -} - -/// State transitions that can be stored either sparsely or densely. -/// -/// This uses less space but at the expense of slower matching. -#[derive(Clone, Debug)] -pub struct Dense(DenseChoice); - -#[derive(Clone, Debug)] -enum DenseChoice { - Sparse(Vec), // indexed by alphabet - Dense(Vec<(u8, StateIdx)>), -} - -impl Transitions for Dense { - fn new(depth: u32) -> Dense { - if depth <= DENSE_DEPTH_THRESHOLD { - Dense(DenseChoice::Sparse(vec![0; 256])) - } else { - Dense(DenseChoice::Dense(vec![])) - } - } - - fn goto(&self, b1: u8) -> StateIdx { - match self.0 { - DenseChoice::Sparse(ref m) => m[b1 as usize], - DenseChoice::Dense(ref m) => { - for &(b2, si) in m { - if b1 == b2 { - return si; - } - } - FAIL_STATE - } - } - } - - fn set_goto(&mut self, b: u8, si: StateIdx) { - match self.0 { - DenseChoice::Sparse(ref mut m) => m[b as usize] = si, - DenseChoice::Dense(ref mut m) => m.push((b, si)), - } - } - - fn heap_bytes(&self) -> usize { - match self.0 { - DenseChoice::Sparse(ref m) => m.len() * 4, - DenseChoice::Dense(ref m) => m.len() * (1 + 4), - } - } -} - -/// State transitions that are always sparse. -/// -/// This can use enormous amounts of memory when there are many patterns, -/// but matching is very fast. -#[derive(Clone, Debug)] -pub struct Sparse(Vec); - -impl Transitions for Sparse { - fn new(_: u32) -> Sparse { - Sparse(vec![0; 256]) - } - - #[inline] - fn goto(&self, b: u8) -> StateIdx { - self.0[b as usize] - } - - fn set_goto(&mut self, b: u8, si: StateIdx) { - self.0[b as usize] = si; - } - - fn heap_bytes(&self) -> usize { - self.0.len() * 4 - } -} - -impl> FromIterator for AcAutomaton { - /// Create an automaton from an iterator of strings. - fn from_iter(it: T) -> AcAutomaton where T: IntoIterator { - AcAutomaton::new(it) - } -} - -// Provide some question debug impls for viewing automatons. -// The custom impls mostly exist for special showing of sparse maps. - -impl + fmt::Debug, T: Transitions> - fmt::Debug for AcAutomaton { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - use std::iter::repeat; - - try!(writeln!(f, "{}", repeat('-').take(79).collect::())); - try!(writeln!(f, "Patterns: {:?}", self.pats)); - for (i, state) in self.states.iter().enumerate().skip(1) { - try!(writeln!(f, "{:3}: {}", i, state.debug(i == 1))); - } - write!(f, "{}", repeat('-').take(79).collect::()) - } -} - -impl State { - fn debug(&self, root: bool) -> String { - format!("State {{ depth: {:?}, out: {:?}, fail: {:?}, goto: {{{}}} }}", - self.depth, self.out, self.fail, self.goto_string(root)) - } - - fn goto_string(&self, root: bool) -> String { - use std::char::from_u32; - - let mut goto = vec![]; - for b in (0..256).map(|b| b as u8) { - let si = self.goto(b); - if (!root && si == FAIL_STATE) || (root && si == ROOT_STATE) { - continue; - } - goto.push(format!("{} => {}", from_u32(b as u32).unwrap(), si)); - } - goto.join(", ") - } -} - -impl fmt::Debug for State { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "{}", self.debug(false)) - } -} - -impl AcAutomaton { - #[doc(hidden)] - pub fn dot(&self) -> String { - use std::fmt::Write; - let mut out = String::new(); - macro_rules! w { - ($w:expr, $($tt:tt)*) => { {write!($w, $($tt)*)}.unwrap() } - } - - w!(out, r#" -digraph automaton {{ - label=<{}>; - labelloc="l"; - labeljust="l"; - rankdir="LR"; -"#, self.pats.join(", ")); - for (i, s) in self.states.iter().enumerate().skip(1) { - let i = i as u32; - if s.out.len() == 0 { - w!(out, " {};\n", i); - } else { - w!(out, " {} [peripheries=2];\n", i); - } - w!(out, " {} -> {} [style=dashed];\n", i, s.fail); - for b in (0..256).map(|b| b as u8) { - let si = s.goto(b); - if si == FAIL_STATE || (i == ROOT_STATE && si == ROOT_STATE) { - continue; - } - w!(out, " {} -> {} [label={}];\n", i, si, b as char); - } - } - w!(out, "}}"); - out - } -} - -fn vec_bytes() -> usize { - usize_bytes() * 3 -} - -fn usize_bytes() -> usize { - let bits = usize::max_value().count_ones() as usize; - bits / 8 -} - -#[cfg(test)] -mod tests { - use std::collections::HashSet; - use std::io; - - use quickcheck::{Arbitrary, Gen, quickcheck}; - use rand::Rng; - - use super::{Automaton, AcAutomaton, Match}; - - fn aut_find(xs: &[S], haystack: &str) -> Vec - where S: Clone + AsRef<[u8]> { - AcAutomaton::new(xs.to_vec()).find(&haystack).collect() - } - - fn aut_finds(xs: &[S], haystack: &str) -> Vec - where S: Clone + AsRef<[u8]> { - let cur = io::Cursor::new(haystack.as_bytes()); - AcAutomaton::new(xs.to_vec()) - .stream_find(cur).map(|r| r.unwrap()).collect() - } - - fn aut_findf(xs: &[S], haystack: &str) -> Vec - where S: Clone + AsRef<[u8]> { - AcAutomaton::new(xs.to_vec()).into_full().find(haystack).collect() - } - - fn aut_findfs(xs: &[S], haystack: &str) -> Vec - where S: Clone + AsRef<[u8]> { - let cur = io::Cursor::new(haystack.as_bytes()); - AcAutomaton::new(xs.to_vec()) - .into_full() - .stream_find(cur).map(|r| r.unwrap()).collect() - } - - fn aut_findo(xs: &[S], haystack: &str) -> Vec - where S: Clone + AsRef<[u8]> { - AcAutomaton::new(xs.to_vec()).find_overlapping(haystack).collect() - } - - fn aut_findos(xs: &[S], haystack: &str) -> Vec - where S: Clone + AsRef<[u8]> { - let cur = io::Cursor::new(haystack.as_bytes()); - AcAutomaton::new(xs.to_vec()) - .stream_find_overlapping(cur).map(|r| r.unwrap()).collect() - } - - fn aut_findfo(xs: &[S], haystack: &str) -> Vec - where S: Clone + AsRef<[u8]> { - AcAutomaton::new(xs.to_vec()) - .into_full().find_overlapping(haystack).collect() - } - - fn aut_findfos(xs: &[S], haystack: &str) -> Vec - where S: Clone + AsRef<[u8]> { - let cur = io::Cursor::new(haystack.as_bytes()); - AcAutomaton::new(xs.to_vec()) - .into_full() - .stream_find_overlapping(cur).map(|r| r.unwrap()).collect() - } - - #[test] - fn one_pattern_one_match() { - let ns = vec!["a"]; - let hay = "za"; - let matches = vec![ - Match { pati: 0, start: 1, end: 2 }, - ]; - assert_eq!(&aut_find(&ns, hay), &matches); - assert_eq!(&aut_finds(&ns, hay), &matches); - assert_eq!(&aut_findf(&ns, hay), &matches); - assert_eq!(&aut_findfs(&ns, hay), &matches); - } - - #[test] - fn one_pattern_many_match() { - let ns = vec!["a"]; - let hay = "zazazzzza"; - let matches = vec![ - Match { pati: 0, start: 1, end: 2 }, - Match { pati: 0, start: 3, end: 4 }, - Match { pati: 0, start: 8, end: 9 }, - ]; - assert_eq!(&aut_find(&ns, hay), &matches); - assert_eq!(&aut_finds(&ns, hay), &matches); - assert_eq!(&aut_findf(&ns, hay), &matches); - assert_eq!(&aut_findfs(&ns, hay), &matches); - } - - #[test] - fn one_longer_pattern_one_match() { - let ns = vec!["abc"]; - let hay = "zazabcz"; - let matches = vec![ Match { pati: 0, start: 3, end: 6 } ]; - assert_eq!(&aut_find(&ns, hay), &matches); - assert_eq!(&aut_finds(&ns, hay), &matches); - assert_eq!(&aut_findf(&ns, hay), &matches); - assert_eq!(&aut_findfs(&ns, hay), &matches); - } - - #[test] - fn one_longer_pattern_many_match() { - let ns = vec!["abc"]; - let hay = "zazabczzzzazzzabc"; - let matches = vec![ - Match { pati: 0, start: 3, end: 6 }, - Match { pati: 0, start: 14, end: 17 }, - ]; - assert_eq!(&aut_find(&ns, hay), &matches); - assert_eq!(&aut_finds(&ns, hay), &matches); - assert_eq!(&aut_findf(&ns, hay), &matches); - assert_eq!(&aut_findfs(&ns, hay), &matches); - } - - #[test] - fn many_pattern_one_match() { - let ns = vec!["a", "b"]; - let hay = "zb"; - let matches = vec![ Match { pati: 1, start: 1, end: 2 } ]; - assert_eq!(&aut_find(&ns, hay), &matches); - assert_eq!(&aut_finds(&ns, hay), &matches); - assert_eq!(&aut_findf(&ns, hay), &matches); - assert_eq!(&aut_findfs(&ns, hay), &matches); - } - - #[test] - fn many_pattern_many_match() { - let ns = vec!["a", "b"]; - let hay = "zbzazzzzb"; - let matches = vec![ - Match { pati: 1, start: 1, end: 2 }, - Match { pati: 0, start: 3, end: 4 }, - Match { pati: 1, start: 8, end: 9 }, - ]; - assert_eq!(&aut_find(&ns, hay), &matches); - assert_eq!(&aut_finds(&ns, hay), &matches); - assert_eq!(&aut_findf(&ns, hay), &matches); - assert_eq!(&aut_findfs(&ns, hay), &matches); - } - - #[test] - fn many_longer_pattern_one_match() { - let ns = vec!["abc", "xyz"]; - let hay = "zazxyzz"; - let matches = vec![ Match { pati: 1, start: 3, end: 6 } ]; - assert_eq!(&aut_find(&ns, hay), &matches); - assert_eq!(&aut_finds(&ns, hay), &matches); - assert_eq!(&aut_findf(&ns, hay), &matches); - assert_eq!(&aut_findfs(&ns, hay), &matches); - } - - #[test] - fn many_longer_pattern_many_match() { - let ns = vec!["abc", "xyz"]; - let hay = "zazxyzzzzzazzzabcxyz"; - let matches = vec![ - Match { pati: 1, start: 3, end: 6 }, - Match { pati: 0, start: 14, end: 17 }, - Match { pati: 1, start: 17, end: 20 }, - ]; - assert_eq!(&aut_find(&ns, hay), &matches); - assert_eq!(&aut_finds(&ns, hay), &matches); - assert_eq!(&aut_findf(&ns, hay), &matches); - assert_eq!(&aut_findfs(&ns, hay), &matches); - } - - #[test] - fn many_longer_pattern_overlap_one_match() { - let ns = vec!["abc", "bc"]; - let hay = "zazabcz"; - let matches = vec![ - Match { pati: 0, start: 3, end: 6 }, - Match { pati: 1, start: 4, end: 6 }, - ]; - assert_eq!(&aut_findo(&ns, hay), &matches); - assert_eq!(&aut_findos(&ns, hay), &matches); - assert_eq!(&aut_findfo(&ns, hay), &matches); - assert_eq!(&aut_findfos(&ns, hay), &matches); - } - - #[test] - fn many_longer_pattern_overlap_one_match_reverse() { - let ns = vec!["abc", "bc"]; - let hay = "xbc"; - let matches = vec![ Match { pati: 1, start: 1, end: 3 } ]; - assert_eq!(&aut_findo(&ns, hay), &matches); - assert_eq!(&aut_findos(&ns, hay), &matches); - assert_eq!(&aut_findfo(&ns, hay), &matches); - assert_eq!(&aut_findfos(&ns, hay), &matches); - } - - #[test] - fn many_longer_pattern_overlap_many_match() { - let ns = vec!["abc", "bc", "c"]; - let hay = "zzzabczzzbczzzc"; - let matches = vec![ - Match { pati: 0, start: 3, end: 6 }, - Match { pati: 1, start: 4, end: 6 }, - Match { pati: 2, start: 5, end: 6 }, - Match { pati: 1, start: 9, end: 11 }, - Match { pati: 2, start: 10, end: 11 }, - Match { pati: 2, start: 14, end: 15 }, - ]; - assert_eq!(&aut_findo(&ns, hay), &matches); - assert_eq!(&aut_findos(&ns, hay), &matches); - assert_eq!(&aut_findfo(&ns, hay), &matches); - assert_eq!(&aut_findfos(&ns, hay), &matches); - } - - #[test] - fn many_longer_pattern_overlap_many_match_reverse() { - let ns = vec!["abc", "bc", "c"]; - let hay = "zzzczzzbczzzabc"; - let matches = vec![ - Match { pati: 2, start: 3, end: 4 }, - Match { pati: 1, start: 7, end: 9 }, - Match { pati: 2, start: 8, end: 9 }, - Match { pati: 0, start: 12, end: 15 }, - Match { pati: 1, start: 13, end: 15 }, - Match { pati: 2, start: 14, end: 15 }, - ]; - assert_eq!(&aut_findo(&ns, hay), &matches); - assert_eq!(&aut_findos(&ns, hay), &matches); - assert_eq!(&aut_findfo(&ns, hay), &matches); - assert_eq!(&aut_findfos(&ns, hay), &matches); - } - - #[test] - fn pattern_returns_original_type() { - let aut = AcAutomaton::new(vec!["apple", "maple"]); - - // Explicitly given this type to assert that the thing returned - // from the function is our original type. - let pat: &str = aut.pattern(0); - assert_eq!(pat, "apple"); - - // Also check the return type of the `patterns` function. - let pats: &[&str] = aut.patterns(); - assert_eq!(pats, &["apple", "maple"]); - } - - // Quickcheck time. - - // This generates very small ascii strings, which makes them more likely - // to interact in interesting ways with larger haystack strings. - #[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord)] - pub struct SmallAscii(String); - - impl Arbitrary for SmallAscii { - fn arbitrary(g: &mut G) -> SmallAscii { - use std::char::from_u32; - SmallAscii((0..2) - .map(|_| from_u32(g.gen_range(97, 123)).unwrap()) - .collect()) - } - - fn shrink(&self) -> Box> { - Box::new(self.0.shrink().map(SmallAscii)) - } - } - - impl From for String { - fn from(s: SmallAscii) -> String { s.0 } - } - - impl AsRef<[u8]> for SmallAscii { - fn as_ref(&self) -> &[u8] { self.0.as_ref() } - } - - // This is the same arbitrary impl as `String`, except it has a bias toward - // ASCII characters. - #[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord)] - pub struct BiasAscii(String); - - impl Arbitrary for BiasAscii { - fn arbitrary(g: &mut G) -> BiasAscii { - use std::char::from_u32; - let size = { let s = g.size(); g.gen_range(0, s) }; - let mut s = String::with_capacity(size); - for _ in 0..size { - if g.gen_weighted_bool(3) { - s.push(char::arbitrary(g)); - } else { - for _ in 0..5 { - s.push(from_u32(g.gen_range(97, 123)).unwrap()); - } - } - } - BiasAscii(s) - } - - fn shrink(&self) -> Box> { - Box::new(self.0.shrink().map(BiasAscii)) - } - } - - fn naive_find(xs: &[S], haystack: &str) -> Vec - where S: Clone + Into { - let needles: Vec = - xs.to_vec().into_iter().map(Into::into).collect(); - let mut matches = vec![]; - for hi in 0..haystack.len() { - for (pati, needle) in needles.iter().enumerate() { - let needle = needle.as_bytes(); - if needle.len() == 0 || needle.len() > haystack.len() - hi { - continue; - } - if needle == &haystack.as_bytes()[hi..hi+needle.len()] { - matches.push(Match { - pati: pati, - start: hi, - end: hi + needle.len(), - }); - } - } - } - matches - } - - #[test] - fn qc_ac_equals_naive() { - fn prop(needles: Vec, haystack: BiasAscii) -> bool { - let aut_matches = aut_findo(&needles, &haystack.0); - let naive_matches = naive_find(&needles, &haystack.0); - // Ordering isn't always the same. I don't think we care, so do - // an unordered comparison. - let aset: HashSet = aut_matches.iter().cloned().collect(); - let nset: HashSet = naive_matches.iter().cloned().collect(); - aset == nset - } - quickcheck(prop as fn(Vec, BiasAscii) -> bool); - } -} diff --git a/deps/aho-corasick-0.4.1/.gitignore b/deps/aho-corasick-0.5.1/.gitignore similarity index 100% rename from deps/aho-corasick-0.4.1/.gitignore rename to deps/aho-corasick-0.5.1/.gitignore diff --git a/deps/aho-corasick-0.4.1/.travis.yml b/deps/aho-corasick-0.5.1/.travis.yml similarity index 100% rename from deps/aho-corasick-0.4.1/.travis.yml rename to deps/aho-corasick-0.5.1/.travis.yml diff --git a/deps/aho-corasick-0.4.1/COPYING b/deps/aho-corasick-0.5.1/COPYING similarity index 100% rename from deps/aho-corasick-0.4.1/COPYING rename to deps/aho-corasick-0.5.1/COPYING diff --git a/deps/aho-corasick-0.5.1/Cargo.toml b/deps/aho-corasick-0.5.1/Cargo.toml new file mode 100644 index 000000000..a9fd21802 --- /dev/null +++ b/deps/aho-corasick-0.5.1/Cargo.toml @@ -0,0 +1,36 @@ +[package] +name = "aho-corasick" +version = "0.5.1" #:version +authors = ["Andrew Gallant "] +description = "Fast multiple substring searching with finite state machines." +documentation = "http://burntsushi.net/rustdoc/aho_corasick/" +homepage = "https://github.com/BurntSushi/aho-corasick" +repository = "https://github.com/BurntSushi/aho-corasick" +readme = "README.md" +keywords = ["string", "search", "text", "aho", "corasick"] +license = "Unlicense/MIT" + +[lib] +name = "aho_corasick" + +[[bin]] +name = "aho-corasick-dot" +test = false +doc = false +bench = false + +[dependencies] +memchr = "0.1.9" + +[dev-dependencies] +csv = "0.14" +docopt = "0.6" +quickcheck = "0.2" +rand = "0.3" +rustc-serialize = "0.3" + +[[bench]] +name = "bench" +path = "benches/bench.rs" +test = false +bench = true diff --git a/deps/aho-corasick-0.4.1/LICENSE-MIT b/deps/aho-corasick-0.5.1/LICENSE-MIT similarity index 100% rename from deps/aho-corasick-0.4.1/LICENSE-MIT rename to deps/aho-corasick-0.5.1/LICENSE-MIT diff --git a/deps/aho-corasick-0.4.1/Makefile b/deps/aho-corasick-0.5.1/Makefile similarity index 100% rename from deps/aho-corasick-0.4.1/Makefile rename to deps/aho-corasick-0.5.1/Makefile diff --git a/deps/aho-corasick-0.4.1/README.md b/deps/aho-corasick-0.5.1/README.md similarity index 100% rename from deps/aho-corasick-0.4.1/README.md rename to deps/aho-corasick-0.5.1/README.md diff --git a/deps/aho-corasick-0.4.1/UNLICENSE b/deps/aho-corasick-0.5.1/UNLICENSE similarity index 100% rename from deps/aho-corasick-0.4.1/UNLICENSE rename to deps/aho-corasick-0.5.1/UNLICENSE diff --git a/deps/aho-corasick-0.5.1/base b/deps/aho-corasick-0.5.1/base new file mode 100644 index 000000000..06377bde2 --- /dev/null +++ b/deps/aho-corasick-0.5.1/base @@ -0,0 +1,110 @@ + Running target/release/aho_corasick-0801807238150c6f + +running 14 tests +test tests::many_longer_pattern_many_match ... ignored +test tests::many_longer_pattern_one_match ... ignored +test tests::many_longer_pattern_overlap_many_match ... ignored +test tests::many_longer_pattern_overlap_many_match_reverse ... ignored +test tests::many_longer_pattern_overlap_one_match ... ignored +test tests::many_longer_pattern_overlap_one_match_reverse ... ignored +test tests::many_pattern_many_match ... ignored +test tests::many_pattern_one_match ... ignored +test tests::one_longer_pattern_many_match ... ignored +test tests::one_longer_pattern_one_match ... ignored +test tests::one_pattern_many_match ... ignored +test tests::one_pattern_one_match ... ignored +test tests::pattern_returns_original_type ... ignored +test tests::qc_ac_equals_naive ... ignored + +test result: ok. 0 passed; 0 failed; 14 ignored; 0 measured + + Running target/release/bench-ffeb388282a1e934 + +running 84 tests +test dense::ac_one_byte ... bench: 204 ns/iter (+/- 4) = 49019 MB/s +test dense::ac_one_prefix_byte_every_match ... bench: 71,175 ns/iter (+/- 218) = 140 MB/s +test dense::ac_one_prefix_byte_no_match ... bench: 204 ns/iter (+/- 0) = 49019 MB/s +test dense::ac_one_prefix_byte_random ... bench: 7,214 ns/iter (+/- 71) = 1386 MB/s +test dense::ac_ten_bytes ... bench: 49,934 ns/iter (+/- 80) = 200 MB/s +test dense::ac_ten_diff_prefix ... bench: 49,945 ns/iter (+/- 113) = 200 MB/s +test dense::ac_ten_one_prefix_byte_every_match ... bench: 71,181 ns/iter (+/- 172) = 140 MB/s +test dense::ac_ten_one_prefix_byte_no_match ... bench: 204 ns/iter (+/- 0) = 49019 MB/s +test dense::ac_ten_one_prefix_byte_random ... bench: 8,031 ns/iter (+/- 99) = 1245 MB/s +test dense::ac_two_bytes ... bench: 49,951 ns/iter (+/- 182) = 200 MB/s +test dense::ac_two_diff_prefix ... bench: 49,961 ns/iter (+/- 123) = 200 MB/s +test dense::ac_two_one_prefix_byte_every_match ... bench: 71,204 ns/iter (+/- 224) = 140 MB/s +test dense::ac_two_one_prefix_byte_no_match ... bench: 204 ns/iter (+/- 0) = 49019 MB/s +test dense::ac_two_one_prefix_byte_random ... bench: 7,191 ns/iter (+/- 56) = 1390 MB/s +test dense_boxed::ac_one_byte ... bench: 203 ns/iter (+/- 0) = 49261 MB/s +test dense_boxed::ac_one_prefix_byte_every_match ... bench: 71,131 ns/iter (+/- 217) = 140 MB/s +test dense_boxed::ac_one_prefix_byte_no_match ... bench: 203 ns/iter (+/- 0) = 49261 MB/s +test dense_boxed::ac_one_prefix_byte_random ... bench: 8,175 ns/iter (+/- 52) = 1223 MB/s +test dense_boxed::ac_ten_bytes ... bench: 49,948 ns/iter (+/- 134) = 200 MB/s +test dense_boxed::ac_ten_diff_prefix ... bench: 49,958 ns/iter (+/- 125) = 200 MB/s +test dense_boxed::ac_ten_one_prefix_byte_every_match ... bench: 71,150 ns/iter (+/- 179) = 140 MB/s +test dense_boxed::ac_ten_one_prefix_byte_no_match ... bench: 203 ns/iter (+/- 0) = 49261 MB/s +test dense_boxed::ac_ten_one_prefix_byte_random ... bench: 8,904 ns/iter (+/- 69) = 1123 MB/s +test dense_boxed::ac_two_bytes ... bench: 49,943 ns/iter (+/- 96) = 200 MB/s +test dense_boxed::ac_two_diff_prefix ... bench: 49,942 ns/iter (+/- 89) = 200 MB/s +test dense_boxed::ac_two_one_prefix_byte_every_match ... bench: 71,149 ns/iter (+/- 239) = 140 MB/s +test dense_boxed::ac_two_one_prefix_byte_no_match ... bench: 203 ns/iter (+/- 1) = 49261 MB/s +test dense_boxed::ac_two_one_prefix_byte_random ... bench: 8,361 ns/iter (+/- 77) = 1196 MB/s +test full::ac_one_byte ... bench: 207 ns/iter (+/- 17) = 48309 MB/s +test full::ac_one_prefix_byte_every_match ... bench: 19,750 ns/iter (+/- 60) = 506 MB/s +test full::ac_one_prefix_byte_no_match ... bench: 207 ns/iter (+/- 2) = 48309 MB/s +test full::ac_one_prefix_byte_random ... bench: 3,847 ns/iter (+/- 39) = 2599 MB/s +test full::ac_ten_bytes ... bench: 20,544 ns/iter (+/- 62) = 486 MB/s +test full::ac_ten_diff_prefix ... bench: 20,556 ns/iter (+/- 47) = 486 MB/s +test full::ac_ten_one_prefix_byte_every_match ... bench: 19,760 ns/iter (+/- 55) = 506 MB/s +test full::ac_ten_one_prefix_byte_no_match ... bench: 207 ns/iter (+/- 1) = 48309 MB/s +test full::ac_ten_one_prefix_byte_random ... bench: 4,170 ns/iter (+/- 51) = 2398 MB/s +test full::ac_two_bytes ... bench: 20,549 ns/iter (+/- 63) = 486 MB/s +test full::ac_two_diff_prefix ... bench: 20,544 ns/iter (+/- 52) = 486 MB/s +test full::ac_two_one_prefix_byte_every_match ... bench: 19,768 ns/iter (+/- 78) = 505 MB/s +test full::ac_two_one_prefix_byte_no_match ... bench: 207 ns/iter (+/- 3) = 48309 MB/s +test full::ac_two_one_prefix_byte_random ... bench: 3,967 ns/iter (+/- 26) = 2521 MB/s +test full_overlap::ac_one_byte ... bench: 227 ns/iter (+/- 16) = 44052 MB/s +test full_overlap::ac_one_prefix_byte_every_match ... bench: 19,763 ns/iter (+/- 52) = 505 MB/s +test full_overlap::ac_one_prefix_byte_no_match ... bench: 211 ns/iter (+/- 0) = 47393 MB/s +test full_overlap::ac_one_prefix_byte_random ... bench: 3,873 ns/iter (+/- 27) = 2582 MB/s +test full_overlap::ac_ten_bytes ... bench: 20,558 ns/iter (+/- 74) = 486 MB/s +test full_overlap::ac_ten_diff_prefix ... bench: 20,555 ns/iter (+/- 38) = 486 MB/s +test full_overlap::ac_ten_one_prefix_byte_every_match ... bench: 19,763 ns/iter (+/- 52) = 505 MB/s +test full_overlap::ac_ten_one_prefix_byte_no_match ... bench: 228 ns/iter (+/- 17) = 43859 MB/s +test full_overlap::ac_ten_one_prefix_byte_random ... bench: 4,102 ns/iter (+/- 27) = 2438 MB/s +test full_overlap::ac_two_bytes ... bench: 20,549 ns/iter (+/- 36) = 486 MB/s +test full_overlap::ac_two_diff_prefix ... bench: 20,555 ns/iter (+/- 85) = 486 MB/s +test full_overlap::ac_two_one_prefix_byte_every_match ... bench: 19,770 ns/iter (+/- 69) = 505 MB/s +test full_overlap::ac_two_one_prefix_byte_no_match ... bench: 228 ns/iter (+/- 0) = 43859 MB/s +test full_overlap::ac_two_one_prefix_byte_random ... bench: 3,908 ns/iter (+/- 24) = 2559 MB/s +test naive_one_byte ... bench: 13,197 ns/iter (+/- 33) = 757 MB/s +test naive_one_prefix_byte_every_match ... bench: 18,455 ns/iter (+/- 30) = 541 MB/s +test naive_one_prefix_byte_no_match ... bench: 13,196 ns/iter (+/- 33) = 757 MB/s +test naive_one_prefix_byte_random ... bench: 19,137 ns/iter (+/- 1,823) = 522 MB/s +test naive_ten_bytes ... bench: 113,235 ns/iter (+/- 188) = 88 MB/s +test naive_ten_diff_prefix ... bench: 113,264 ns/iter (+/- 217) = 88 MB/s +test naive_ten_one_prefix_byte_every_match ... bench: 165,867 ns/iter (+/- 495) = 60 MB/s +test naive_ten_one_prefix_byte_no_match ... bench: 113,270 ns/iter (+/- 345) = 88 MB/s +test naive_ten_one_prefix_byte_random ... bench: 118,589 ns/iter (+/- 255) = 84 MB/s +test naive_two_bytes ... bench: 28,892 ns/iter (+/- 247) = 346 MB/s +test naive_two_diff_prefix ... bench: 28,875 ns/iter (+/- 2,693) = 346 MB/s +test naive_two_one_prefix_byte_every_match ... bench: 38,558 ns/iter (+/- 2,656) = 259 MB/s +test naive_two_one_prefix_byte_no_match ... bench: 28,485 ns/iter (+/- 2,628) = 351 MB/s +test naive_two_one_prefix_byte_random ... bench: 30,940 ns/iter (+/- 2,591) = 323 MB/s +test sparse::ac_one_byte ... bench: 203 ns/iter (+/- 1) = 49261 MB/s +test sparse::ac_one_prefix_byte_every_match ... bench: 54,865 ns/iter (+/- 164) = 182 MB/s +test sparse::ac_one_prefix_byte_no_match ... bench: 203 ns/iter (+/- 0) = 49261 MB/s +test sparse::ac_one_prefix_byte_random ... bench: 4,984 ns/iter (+/- 35) = 2006 MB/s +test sparse::ac_ten_bytes ... bench: 37,175 ns/iter (+/- 82) = 268 MB/s +test sparse::ac_ten_diff_prefix ... bench: 37,179 ns/iter (+/- 82) = 268 MB/s +test sparse::ac_ten_one_prefix_byte_every_match ... bench: 54,866 ns/iter (+/- 122) = 182 MB/s +test sparse::ac_ten_one_prefix_byte_no_match ... bench: 203 ns/iter (+/- 0) = 49261 MB/s +test sparse::ac_ten_one_prefix_byte_random ... bench: 5,353 ns/iter (+/- 41) = 1868 MB/s +test sparse::ac_two_bytes ... bench: 37,172 ns/iter (+/- 98) = 269 MB/s +test sparse::ac_two_diff_prefix ... bench: 37,174 ns/iter (+/- 119) = 269 MB/s +test sparse::ac_two_one_prefix_byte_every_match ... bench: 54,854 ns/iter (+/- 114) = 182 MB/s +test sparse::ac_two_one_prefix_byte_no_match ... bench: 203 ns/iter (+/- 0) = 49261 MB/s +test sparse::ac_two_one_prefix_byte_random ... bench: 5,027 ns/iter (+/- 45) = 1989 MB/s + +test result: ok. 0 passed; 0 failed; 0 ignored; 84 measured + diff --git a/deps/aho-corasick-0.4.1/benches/bench.rs b/deps/aho-corasick-0.5.1/benches/bench.rs similarity index 100% rename from deps/aho-corasick-0.4.1/benches/bench.rs rename to deps/aho-corasick-0.5.1/benches/bench.rs diff --git a/deps/aho-corasick-0.4.1/benches/random.txt b/deps/aho-corasick-0.5.1/benches/random.txt similarity index 100% rename from deps/aho-corasick-0.4.1/benches/random.txt rename to deps/aho-corasick-0.5.1/benches/random.txt diff --git a/deps/aho-corasick-0.4.1/ctags.rust b/deps/aho-corasick-0.5.1/ctags.rust similarity index 100% rename from deps/aho-corasick-0.4.1/ctags.rust rename to deps/aho-corasick-0.5.1/ctags.rust diff --git a/deps/aho-corasick-0.4.1/examples/dict-search.rs b/deps/aho-corasick-0.5.1/examples/dict-search.rs similarity index 100% rename from deps/aho-corasick-0.4.1/examples/dict-search.rs rename to deps/aho-corasick-0.5.1/examples/dict-search.rs diff --git a/deps/aho-corasick-0.5.1/memchr b/deps/aho-corasick-0.5.1/memchr new file mode 100644 index 000000000..2bac4949f --- /dev/null +++ b/deps/aho-corasick-0.5.1/memchr @@ -0,0 +1,111 @@ + Compiling aho-corasick v0.4.1 (file:///home/andrew/data/projects/rust/aho-corasick) + Running target/release/aho_corasick-0801807238150c6f + +running 14 tests +test tests::many_longer_pattern_many_match ... ignored +test tests::many_longer_pattern_one_match ... ignored +test tests::many_longer_pattern_overlap_many_match ... ignored +test tests::many_longer_pattern_overlap_many_match_reverse ... ignored +test tests::many_longer_pattern_overlap_one_match ... ignored +test tests::many_longer_pattern_overlap_one_match_reverse ... ignored +test tests::many_pattern_many_match ... ignored +test tests::many_pattern_one_match ... ignored +test tests::one_longer_pattern_many_match ... ignored +test tests::one_longer_pattern_one_match ... ignored +test tests::one_pattern_many_match ... ignored +test tests::one_pattern_one_match ... ignored +test tests::pattern_returns_original_type ... ignored +test tests::qc_ac_equals_naive ... ignored + +test result: ok. 0 passed; 0 failed; 14 ignored; 0 measured + + Running target/release/bench-ffeb388282a1e934 + +running 84 tests +test dense::ac_one_byte ... bench: 206 ns/iter (+/- 4) = 48543 MB/s +test dense::ac_one_prefix_byte_every_match ... bench: 81,964 ns/iter (+/- 694) = 122 MB/s +test dense::ac_one_prefix_byte_no_match ... bench: 206 ns/iter (+/- 3) = 48543 MB/s +test dense::ac_one_prefix_byte_random ... bench: 9,822 ns/iter (+/- 98) = 1018 MB/s +test dense::ac_ten_bytes ... bench: 49,973 ns/iter (+/- 509) = 200 MB/s +test dense::ac_ten_diff_prefix ... bench: 49,968 ns/iter (+/- 147) = 200 MB/s +test dense::ac_ten_one_prefix_byte_every_match ... bench: 81,722 ns/iter (+/- 1,700) = 122 MB/s +test dense::ac_ten_one_prefix_byte_no_match ... bench: 206 ns/iter (+/- 2) = 48543 MB/s +test dense::ac_ten_one_prefix_byte_random ... bench: 10,835 ns/iter (+/- 144) = 923 MB/s +test dense::ac_two_bytes ... bench: 1,712 ns/iter (+/- 9) = 5841 MB/s +test dense::ac_two_diff_prefix ... bench: 1,712 ns/iter (+/- 21) = 5841 MB/s +test dense::ac_two_one_prefix_byte_every_match ... bench: 81,840 ns/iter (+/- 442) = 122 MB/s +test dense::ac_two_one_prefix_byte_no_match ... bench: 206 ns/iter (+/- 4) = 48543 MB/s +test dense::ac_two_one_prefix_byte_random ... bench: 9,868 ns/iter (+/- 73) = 1013 MB/s +test dense_boxed::ac_one_byte ... bench: 206 ns/iter (+/- 1) = 48543 MB/s +test dense_boxed::ac_one_prefix_byte_every_match ... bench: 84,305 ns/iter (+/- 313) = 118 MB/s +test dense_boxed::ac_one_prefix_byte_no_match ... bench: 205 ns/iter (+/- 2) = 48780 MB/s +test dense_boxed::ac_one_prefix_byte_random ... bench: 10,100 ns/iter (+/- 110) = 990 MB/s +test dense_boxed::ac_ten_bytes ... bench: 49,940 ns/iter (+/- 97) = 200 MB/s +test dense_boxed::ac_ten_diff_prefix ... bench: 49,997 ns/iter (+/- 342) = 200 MB/s +test dense_boxed::ac_ten_one_prefix_byte_every_match ... bench: 84,358 ns/iter (+/- 246) = 118 MB/s +test dense_boxed::ac_ten_one_prefix_byte_no_match ... bench: 206 ns/iter (+/- 1) = 48543 MB/s +test dense_boxed::ac_ten_one_prefix_byte_random ... bench: 11,082 ns/iter (+/- 279) = 902 MB/s +test dense_boxed::ac_two_bytes ... bench: 1,712 ns/iter (+/- 5) = 5841 MB/s +test dense_boxed::ac_two_diff_prefix ... bench: 1,712 ns/iter (+/- 5) = 5841 MB/s +test dense_boxed::ac_two_one_prefix_byte_every_match ... bench: 84,321 ns/iter (+/- 185) = 118 MB/s +test dense_boxed::ac_two_one_prefix_byte_no_match ... bench: 206 ns/iter (+/- 1) = 48543 MB/s +test dense_boxed::ac_two_one_prefix_byte_random ... bench: 10,168 ns/iter (+/- 80) = 983 MB/s +test full::ac_one_byte ... bench: 207 ns/iter (+/- 4) = 48309 MB/s +test full::ac_one_prefix_byte_every_match ... bench: 31,991 ns/iter (+/- 120) = 312 MB/s +test full::ac_one_prefix_byte_no_match ... bench: 207 ns/iter (+/- 1) = 48309 MB/s +test full::ac_one_prefix_byte_random ... bench: 5,654 ns/iter (+/- 77) = 1768 MB/s +test full::ac_ten_bytes ... bench: 20,551 ns/iter (+/- 43) = 486 MB/s +test full::ac_ten_diff_prefix ... bench: 20,571 ns/iter (+/- 206) = 486 MB/s +test full::ac_ten_one_prefix_byte_every_match ... bench: 32,015 ns/iter (+/- 258) = 312 MB/s +test full::ac_ten_one_prefix_byte_no_match ... bench: 206 ns/iter (+/- 1) = 48543 MB/s +test full::ac_ten_one_prefix_byte_random ... bench: 6,294 ns/iter (+/- 94) = 1588 MB/s +test full::ac_two_bytes ... bench: 1,717 ns/iter (+/- 15) = 5824 MB/s +test full::ac_two_diff_prefix ... bench: 1,718 ns/iter (+/- 4) = 5820 MB/s +test full::ac_two_one_prefix_byte_every_match ... bench: 31,990 ns/iter (+/- 77) = 312 MB/s +test full::ac_two_one_prefix_byte_no_match ... bench: 207 ns/iter (+/- 4) = 48309 MB/s +test full::ac_two_one_prefix_byte_random ... bench: 5,735 ns/iter (+/- 35) = 1743 MB/s +test full_overlap::ac_one_byte ... bench: 208 ns/iter (+/- 0) = 48076 MB/s +test full_overlap::ac_one_prefix_byte_every_match ... bench: 31,899 ns/iter (+/- 118) = 313 MB/s +test full_overlap::ac_one_prefix_byte_no_match ... bench: 208 ns/iter (+/- 1) = 48076 MB/s +test full_overlap::ac_one_prefix_byte_random ... bench: 5,624 ns/iter (+/- 176) = 1778 MB/s +test full_overlap::ac_ten_bytes ... bench: 21,833 ns/iter (+/- 81) = 458 MB/s +test full_overlap::ac_ten_diff_prefix ... bench: 21,824 ns/iter (+/- 62) = 458 MB/s +test full_overlap::ac_ten_one_prefix_byte_every_match ... bench: 31,902 ns/iter (+/- 99) = 313 MB/s +test full_overlap::ac_ten_one_prefix_byte_no_match ... bench: 208 ns/iter (+/- 0) = 48076 MB/s +test full_overlap::ac_ten_one_prefix_byte_random ... bench: 6,520 ns/iter (+/- 91) = 1533 MB/s +test full_overlap::ac_two_bytes ... bench: 1,718 ns/iter (+/- 9) = 5820 MB/s +test full_overlap::ac_two_diff_prefix ... bench: 1,718 ns/iter (+/- 3) = 5820 MB/s +test full_overlap::ac_two_one_prefix_byte_every_match ... bench: 31,899 ns/iter (+/- 78) = 313 MB/s +test full_overlap::ac_two_one_prefix_byte_no_match ... bench: 208 ns/iter (+/- 1) = 48076 MB/s +test full_overlap::ac_two_one_prefix_byte_random ... bench: 5,760 ns/iter (+/- 56) = 1736 MB/s +test naive_one_byte ... bench: 13,196 ns/iter (+/- 35) = 757 MB/s +test naive_one_prefix_byte_every_match ... bench: 18,457 ns/iter (+/- 81) = 541 MB/s +test naive_one_prefix_byte_no_match ... bench: 13,195 ns/iter (+/- 32) = 757 MB/s +test naive_one_prefix_byte_random ... bench: 18,957 ns/iter (+/- 1,844) = 527 MB/s +test naive_ten_bytes ... bench: 113,231 ns/iter (+/- 368) = 88 MB/s +test naive_ten_diff_prefix ... bench: 113,257 ns/iter (+/- 407) = 88 MB/s +test naive_ten_one_prefix_byte_every_match ... bench: 165,918 ns/iter (+/- 3,211) = 60 MB/s +test naive_ten_one_prefix_byte_no_match ... bench: 113,231 ns/iter (+/- 475) = 88 MB/s +test naive_ten_one_prefix_byte_random ... bench: 118,596 ns/iter (+/- 285) = 84 MB/s +test naive_two_bytes ... bench: 28,897 ns/iter (+/- 204) = 346 MB/s +test naive_two_diff_prefix ... bench: 28,162 ns/iter (+/- 2,667) = 355 MB/s +test naive_two_one_prefix_byte_every_match ... bench: 38,144 ns/iter (+/- 1,697) = 262 MB/s +test naive_two_one_prefix_byte_no_match ... bench: 28,892 ns/iter (+/- 2,727) = 346 MB/s +test naive_two_one_prefix_byte_random ... bench: 31,589 ns/iter (+/- 2,567) = 316 MB/s +test sparse::ac_one_byte ... bench: 207 ns/iter (+/- 1) = 48309 MB/s +test sparse::ac_one_prefix_byte_every_match ... bench: 58,731 ns/iter (+/- 1,571) = 170 MB/s +test sparse::ac_one_prefix_byte_no_match ... bench: 207 ns/iter (+/- 1) = 48309 MB/s +test sparse::ac_one_prefix_byte_random ... bench: 6,902 ns/iter (+/- 144) = 1449 MB/s +test sparse::ac_ten_bytes ... bench: 37,167 ns/iter (+/- 48) = 269 MB/s +test sparse::ac_ten_diff_prefix ... bench: 37,175 ns/iter (+/- 82) = 268 MB/s +test sparse::ac_ten_one_prefix_byte_every_match ... bench: 58,749 ns/iter (+/- 796) = 170 MB/s +test sparse::ac_ten_one_prefix_byte_no_match ... bench: 207 ns/iter (+/- 1) = 48309 MB/s +test sparse::ac_ten_one_prefix_byte_random ... bench: 7,474 ns/iter (+/- 73) = 1338 MB/s +test sparse::ac_two_bytes ... bench: 1,725 ns/iter (+/- 6) = 5797 MB/s +test sparse::ac_two_diff_prefix ... bench: 1,725 ns/iter (+/- 10) = 5797 MB/s +test sparse::ac_two_one_prefix_byte_every_match ... bench: 58,762 ns/iter (+/- 905) = 170 MB/s +test sparse::ac_two_one_prefix_byte_no_match ... bench: 207 ns/iter (+/- 2) = 48309 MB/s +test sparse::ac_two_one_prefix_byte_random ... bench: 6,811 ns/iter (+/- 160) = 1468 MB/s + +test result: ok. 0 passed; 0 failed; 0 ignored; 84 measured + diff --git a/deps/aho-corasick-0.5.1/memchr_take2 b/deps/aho-corasick-0.5.1/memchr_take2 new file mode 100644 index 000000000..bbb375eb5 --- /dev/null +++ b/deps/aho-corasick-0.5.1/memchr_take2 @@ -0,0 +1,111 @@ + Compiling aho-corasick v0.4.1 (file:///home/andrew/data/projects/rust/aho-corasick) + Running target/release/aho_corasick-0801807238150c6f + +running 14 tests +test tests::many_longer_pattern_many_match ... ignored +test tests::many_longer_pattern_one_match ... ignored +test tests::many_longer_pattern_overlap_many_match ... ignored +test tests::many_longer_pattern_overlap_many_match_reverse ... ignored +test tests::many_longer_pattern_overlap_one_match ... ignored +test tests::many_longer_pattern_overlap_one_match_reverse ... ignored +test tests::many_pattern_many_match ... ignored +test tests::many_pattern_one_match ... ignored +test tests::one_longer_pattern_many_match ... ignored +test tests::one_longer_pattern_one_match ... ignored +test tests::one_pattern_many_match ... ignored +test tests::one_pattern_one_match ... ignored +test tests::pattern_returns_original_type ... ignored +test tests::qc_ac_equals_naive ... ignored + +test result: ok. 0 passed; 0 failed; 14 ignored; 0 measured + + Running target/release/bench-ffeb388282a1e934 + +running 84 tests +test dense::ac_one_byte ... bench: 204 ns/iter (+/- 2) = 49019 MB/s +test dense::ac_one_prefix_byte_every_match ... bench: 63,471 ns/iter (+/- 1,672) = 157 MB/s +test dense::ac_one_prefix_byte_no_match ... bench: 204 ns/iter (+/- 3) = 49019 MB/s +test dense::ac_one_prefix_byte_random ... bench: 7,628 ns/iter (+/- 78) = 1311 MB/s +test dense::ac_ten_bytes ... bench: 44,813 ns/iter (+/- 751) = 223 MB/s +test dense::ac_ten_diff_prefix ... bench: 44,827 ns/iter (+/- 424) = 223 MB/s +test dense::ac_ten_one_prefix_byte_every_match ... bench: 63,447 ns/iter (+/- 683) = 157 MB/s +test dense::ac_ten_one_prefix_byte_no_match ... bench: 204 ns/iter (+/- 3) = 49019 MB/s +test dense::ac_ten_one_prefix_byte_random ... bench: 8,110 ns/iter (+/- 165) = 1233 MB/s +test dense::ac_two_bytes ... bench: 1,726 ns/iter (+/- 18) = 5793 MB/s +test dense::ac_two_diff_prefix ... bench: 1,725 ns/iter (+/- 18) = 5797 MB/s +test dense::ac_two_one_prefix_byte_every_match ... bench: 63,418 ns/iter (+/- 858) = 157 MB/s +test dense::ac_two_one_prefix_byte_no_match ... bench: 204 ns/iter (+/- 4) = 49019 MB/s +test dense::ac_two_one_prefix_byte_random ... bench: 7,701 ns/iter (+/- 135) = 1298 MB/s +test dense_boxed::ac_one_byte ... bench: 206 ns/iter (+/- 3) = 48543 MB/s +test dense_boxed::ac_one_prefix_byte_every_match ... bench: 81,956 ns/iter (+/- 1,339) = 122 MB/s +test dense_boxed::ac_one_prefix_byte_no_match ... bench: 206 ns/iter (+/- 3) = 48543 MB/s +test dense_boxed::ac_one_prefix_byte_random ... bench: 10,330 ns/iter (+/- 125) = 968 MB/s +test dense_boxed::ac_ten_bytes ... bench: 55,500 ns/iter (+/- 1,024) = 180 MB/s +test dense_boxed::ac_ten_diff_prefix ... bench: 55,515 ns/iter (+/- 689) = 180 MB/s +test dense_boxed::ac_ten_one_prefix_byte_every_match ... bench: 81,929 ns/iter (+/- 964) = 122 MB/s +test dense_boxed::ac_ten_one_prefix_byte_no_match ... bench: 206 ns/iter (+/- 3) = 48543 MB/s +test dense_boxed::ac_ten_one_prefix_byte_random ... bench: 11,113 ns/iter (+/- 166) = 899 MB/s +test dense_boxed::ac_two_bytes ... bench: 1,727 ns/iter (+/- 27) = 5790 MB/s +test dense_boxed::ac_two_diff_prefix ... bench: 1,730 ns/iter (+/- 22) = 5780 MB/s +test dense_boxed::ac_two_one_prefix_byte_every_match ... bench: 82,190 ns/iter (+/- 2,634) = 121 MB/s +test dense_boxed::ac_two_one_prefix_byte_no_match ... bench: 206 ns/iter (+/- 5) = 48543 MB/s +test dense_boxed::ac_two_one_prefix_byte_random ... bench: 10,430 ns/iter (+/- 204) = 958 MB/s +test full::ac_one_byte ... bench: 204 ns/iter (+/- 3) = 49019 MB/s +test full::ac_one_prefix_byte_every_match ... bench: 20,533 ns/iter (+/- 410) = 487 MB/s +test full::ac_one_prefix_byte_no_match ... bench: 205 ns/iter (+/- 3) = 48780 MB/s +test full::ac_one_prefix_byte_random ... bench: 4,017 ns/iter (+/- 68) = 2489 MB/s +test full::ac_ten_bytes ... bench: 20,596 ns/iter (+/- 206) = 485 MB/s +test full::ac_ten_diff_prefix ... bench: 20,611 ns/iter (+/- 255) = 485 MB/s +test full::ac_ten_one_prefix_byte_every_match ... bench: 20,502 ns/iter (+/- 217) = 487 MB/s +test full::ac_ten_one_prefix_byte_no_match ... bench: 205 ns/iter (+/- 5) = 48780 MB/s +test full::ac_ten_one_prefix_byte_random ... bench: 4,258 ns/iter (+/- 60) = 2348 MB/s +test full::ac_two_bytes ... bench: 1,724 ns/iter (+/- 23) = 5800 MB/s +test full::ac_two_diff_prefix ... bench: 1,724 ns/iter (+/- 25) = 5800 MB/s +test full::ac_two_one_prefix_byte_every_match ... bench: 20,518 ns/iter (+/- 176) = 487 MB/s +test full::ac_two_one_prefix_byte_no_match ... bench: 205 ns/iter (+/- 3) = 48780 MB/s +test full::ac_two_one_prefix_byte_random ... bench: 4,043 ns/iter (+/- 54) = 2473 MB/s +test full_overlap::ac_one_byte ... bench: 209 ns/iter (+/- 7) = 47846 MB/s +test full_overlap::ac_one_prefix_byte_every_match ... bench: 20,540 ns/iter (+/- 258) = 486 MB/s +test full_overlap::ac_one_prefix_byte_no_match ... bench: 210 ns/iter (+/- 2) = 47619 MB/s +test full_overlap::ac_one_prefix_byte_random ... bench: 3,878 ns/iter (+/- 57) = 2578 MB/s +test full_overlap::ac_ten_bytes ... bench: 20,613 ns/iter (+/- 244) = 485 MB/s +test full_overlap::ac_ten_diff_prefix ... bench: 20,626 ns/iter (+/- 229) = 484 MB/s +test full_overlap::ac_ten_one_prefix_byte_every_match ... bench: 20,518 ns/iter (+/- 205) = 487 MB/s +test full_overlap::ac_ten_one_prefix_byte_no_match ... bench: 209 ns/iter (+/- 6) = 47846 MB/s +test full_overlap::ac_ten_one_prefix_byte_random ... bench: 4,128 ns/iter (+/- 73) = 2422 MB/s +test full_overlap::ac_two_bytes ... bench: 1,718 ns/iter (+/- 20) = 5820 MB/s +test full_overlap::ac_two_diff_prefix ... bench: 1,718 ns/iter (+/- 19) = 5820 MB/s +test full_overlap::ac_two_one_prefix_byte_every_match ... bench: 20,487 ns/iter (+/- 189) = 488 MB/s +test full_overlap::ac_two_one_prefix_byte_no_match ... bench: 209 ns/iter (+/- 3) = 47846 MB/s +test full_overlap::ac_two_one_prefix_byte_random ... bench: 3,897 ns/iter (+/- 61) = 2566 MB/s +test naive_one_byte ... bench: 13,223 ns/iter (+/- 99) = 756 MB/s +test naive_one_prefix_byte_every_match ... bench: 18,492 ns/iter (+/- 215) = 540 MB/s +test naive_one_prefix_byte_no_match ... bench: 13,229 ns/iter (+/- 172) = 755 MB/s +test naive_one_prefix_byte_random ... bench: 17,251 ns/iter (+/- 195) = 579 MB/s +test naive_ten_bytes ... bench: 110,931 ns/iter (+/- 1,117) = 90 MB/s +test naive_ten_diff_prefix ... bench: 110,905 ns/iter (+/- 893) = 90 MB/s +test naive_ten_one_prefix_byte_every_match ... bench: 163,981 ns/iter (+/- 2,051) = 60 MB/s +test naive_ten_one_prefix_byte_no_match ... bench: 111,100 ns/iter (+/- 1,706) = 90 MB/s +test naive_ten_one_prefix_byte_random ... bench: 116,612 ns/iter (+/- 1,291) = 85 MB/s +test naive_two_bytes ... bench: 26,425 ns/iter (+/- 204) = 378 MB/s +test naive_two_diff_prefix ... bench: 26,429 ns/iter (+/- 648) = 378 MB/s +test naive_two_one_prefix_byte_every_match ... bench: 37,016 ns/iter (+/- 513) = 270 MB/s +test naive_two_one_prefix_byte_no_match ... bench: 26,431 ns/iter (+/- 275) = 378 MB/s +test naive_two_one_prefix_byte_random ... bench: 29,537 ns/iter (+/- 415) = 338 MB/s +test sparse::ac_one_byte ... bench: 204 ns/iter (+/- 3) = 49019 MB/s +test sparse::ac_one_prefix_byte_every_match ... bench: 55,340 ns/iter (+/- 1,032) = 180 MB/s +test sparse::ac_one_prefix_byte_no_match ... bench: 204 ns/iter (+/- 2) = 49019 MB/s +test sparse::ac_one_prefix_byte_random ... bench: 5,090 ns/iter (+/- 79) = 1964 MB/s +test sparse::ac_ten_bytes ... bench: 37,048 ns/iter (+/- 547) = 269 MB/s +test sparse::ac_ten_diff_prefix ... bench: 37,079 ns/iter (+/- 381) = 269 MB/s +test sparse::ac_ten_one_prefix_byte_every_match ... bench: 55,341 ns/iter (+/- 507) = 180 MB/s +test sparse::ac_ten_one_prefix_byte_no_match ... bench: 204 ns/iter (+/- 3) = 49019 MB/s +test sparse::ac_ten_one_prefix_byte_random ... bench: 5,539 ns/iter (+/- 63) = 1805 MB/s +test sparse::ac_two_bytes ... bench: 1,729 ns/iter (+/- 55) = 5783 MB/s +test sparse::ac_two_diff_prefix ... bench: 1,725 ns/iter (+/- 17) = 5797 MB/s +test sparse::ac_two_one_prefix_byte_every_match ... bench: 55,342 ns/iter (+/- 760) = 180 MB/s +test sparse::ac_two_one_prefix_byte_no_match ... bench: 204 ns/iter (+/- 7) = 49019 MB/s +test sparse::ac_two_one_prefix_byte_random ... bench: 5,109 ns/iter (+/- 121) = 1957 MB/s + +test result: ok. 0 passed; 0 failed; 0 ignored; 84 measured + diff --git a/deps/aho-corasick-0.4.1/session.vim b/deps/aho-corasick-0.5.1/session.vim similarity index 100% rename from deps/aho-corasick-0.4.1/session.vim rename to deps/aho-corasick-0.5.1/session.vim diff --git a/deps/aho-corasick-0.5.1/src/autiter.rs b/deps/aho-corasick-0.5.1/src/autiter.rs new file mode 100644 index 000000000..0911f1a37 --- /dev/null +++ b/deps/aho-corasick-0.5.1/src/autiter.rs @@ -0,0 +1,475 @@ +use std::io::{self, BufRead}; +use std::marker::PhantomData; + +use memchr::{memchr, memchr2, memchr3}; + +use super::{ROOT_STATE, StateIdx}; + +/// An abstraction over automatons and their corresponding iterators. +/// The type parameter `P` is the type of the pattern that was used to +/// construct this Automaton. +pub trait Automaton

{ + /// Return the next state given the current state and next character. + fn next_state(&self, si: StateIdx, b: u8) -> StateIdx; + + /// Return true if and only if the given state and current pattern index + /// indicate a match. + fn has_match(&self, si: StateIdx, outi: usize) -> bool; + + /// Build a match given the current state, pattern index and input index. + fn get_match(&self, si: StateIdx, outi: usize, texti: usize) -> Match; + + /// Return the set of bytes that have transitions in the root state. + fn start_bytes(&self) -> &[u8]; + + /// Returns all of the patterns matched by this automaton. + /// + /// The order of the patterns is the order in which they were added. + fn patterns(&self) -> &[P]; + + /// Returns the pattern indexed at `i`. + /// + /// The index corresponds to the position at which the pattern was added + /// to the automaton, starting at `0`. + fn pattern(&self, i: usize) -> &P; + + /// Return the number of patterns in the automaton. + #[inline] + fn len(&self) -> usize { + self.patterns().len() + } + + /// Returns true if the automaton has no patterns. + #[inline] + fn is_empty(&self) -> bool { + self.len() == 0 + } + + /// Returns an iterator of non-overlapping matches in `s`. + fn find<'a, 's, Q: ?Sized + AsRef<[u8]>>( + &'a self, + s: &'s Q, + ) -> Matches<'a, 's, P, Self> + where Self: Sized { + Matches { + aut: self, + text: s.as_ref(), + texti: 0, + si: ROOT_STATE, + _m: PhantomData, + } + } + + /// Returns an iterator of overlapping matches in `s`. + fn find_overlapping<'a, 's, Q: ?Sized + AsRef<[u8]>>( + &'a self, + s: &'s Q, + ) -> MatchesOverlapping<'a, 's, P, Self> + where Self: Sized { + MatchesOverlapping { + aut: self, + text: s.as_ref(), + texti: 0, + si: ROOT_STATE, + outi: 0, + _m: PhantomData, + } + } + + /// Returns an iterator of non-overlapping matches in the given reader. + fn stream_find<'a, R: io::Read>( + &'a self, + rdr: R, + ) -> StreamMatches<'a, R, P, Self> + where Self: Sized { + StreamMatches { + aut: self, + buf: io::BufReader::new(rdr), + texti: 0, + si: ROOT_STATE, + _m: PhantomData, + } + } + + /// Returns an iterator of overlapping matches in the given reader. + fn stream_find_overlapping<'a, R: io::Read>( + &'a self, + rdr: R, + ) -> StreamMatchesOverlapping<'a, R, P, Self> + where Self: Sized { + StreamMatchesOverlapping { + aut: self, + buf: io::BufReader::new(rdr), + texti: 0, + si: ROOT_STATE, + outi: 0, + _m: PhantomData, + } + } +} + +impl<'a, P: AsRef<[u8]>, A: 'a + Automaton

+ ?Sized> + Automaton

for &'a A { + fn next_state(&self, si: StateIdx, b: u8) -> StateIdx { + (**self).next_state(si, b) + } + + fn has_match(&self, si: StateIdx, outi: usize) -> bool { + (**self).has_match(si, outi) + } + + fn start_bytes(&self) -> &[u8] { + (**self).start_bytes() + } + + fn patterns(&self) -> &[P] { + (**self).patterns() + } + + fn pattern(&self, i: usize) -> &P { + (**self).pattern(i) + } + + fn get_match(&self, si: StateIdx, outi: usize, texti: usize) -> Match { + (**self).get_match(si, outi, texti) + } +} + +/// Records a match in the search text. +#[derive(Copy, Clone, Debug, Hash, PartialEq, Eq)] +pub struct Match { + /// The pattern index. + /// + /// This corresponds to the ordering in which the matched pattern was + /// added to the automaton, starting at `0`. + pub pati: usize, + /// The starting byte offset of the match in the search text. + pub start: usize, + /// The ending byte offset of the match in the search text. + /// + /// (This can be re-captiulated with `pati` and adding the pattern's + /// length to `start`, but it is convenient to have it here.) + pub end: usize, +} + +/// An iterator of non-overlapping matches for in-memory text. +/// +/// This iterator yields `Match` values. +/// +/// `'a` is the lifetime of the automaton, `'s` is the lifetime of the +/// search text, and `P` is the type of the Automaton's pattern. +#[derive(Debug)] +pub struct Matches<'a, 's, P, A: 'a + Automaton

+ ?Sized> { + aut: &'a A, + text: &'s [u8], + texti: usize, + si: StateIdx, + _m: PhantomData

, +} + +// When there's an initial lone start byte, it is usually worth it +// to use `memchr` to skip along the input. The problem is that +// the skipping function is called in the inner match loop, which +// can be quite costly if the skipping condition is never met. +// Therefore, we lift the case analysis outside of the inner loop at +// the cost of repeating code. +// +// `step_to_match` is the version of the inner loop without skipping, +// and `skip_to_match` is the version with skipping. +fn step_to_match + ?Sized>( + aut: &A, + text: &[u8], + mut texti: usize, + mut si: StateIdx +) -> Option<(usize, StateIdx)> { + while texti < text.len() { + si = aut.next_state(si, text[texti]); + if aut.has_match(si, 0) { + return Some((texti, si)); + } + texti += 1; + } + None +} + +fn skip_to_match + ?Sized, F: Fn(&A, &[u8], usize) -> usize>( + aut: &A, + text: &[u8], + mut texti: usize, + mut si: StateIdx, + skip: F, +) -> Option<(usize, StateIdx)> { + if si == ROOT_STATE { + texti = skip(aut, text, texti); + } + while texti < text.len() { + si = aut.next_state(si, text[texti]); + if aut.has_match(si, 0) { + return Some((texti, si)); + } + if si == ROOT_STATE { + texti = skip(aut, text, texti + 1); + } else { + texti += 1; + } + } + None +} + +#[inline] +fn skip1 + ?Sized>( + aut: &A, + text: &[u8], + at: usize, +) -> usize { + debug_assert!(aut.start_bytes().len() == 1); + let b = aut.start_bytes()[0]; + match memchr(b, &text[at..]) { + None => text.len(), + Some(i) => at + i, + } +} + +#[inline] +fn skip2 + ?Sized>( + aut: &A, + text: &[u8], + at: usize, +) -> usize { + debug_assert!(aut.start_bytes().len() == 2); + let (b1, b2) = (aut.start_bytes()[0], aut.start_bytes()[1]); + match memchr2(b1, b2, &text[at..]) { + None => text.len(), + Some(i) => at + i, + } +} + +#[inline] +fn skip3 + ?Sized>( + aut: &A, + text: &[u8], + at: usize, +) -> usize { + debug_assert!(aut.start_bytes().len() == 3); + let (b1, b2, b3) = ( + aut.start_bytes()[0], aut.start_bytes()[1], aut.start_bytes()[2], + ); + match memchr3(b1, b2, b3, &text[at..]) { + None => text.len(), + Some(i) => at + i, + } +} + +impl<'a, 's, P, A: Automaton

+ ?Sized> Iterator for Matches<'a, 's, P, A> { + type Item = Match; + + fn next(&mut self) -> Option { + if self.aut.start_bytes().len() == 1 { + let skip = skip_to_match( + self.aut, self.text, self.texti, self.si, skip1); + if let Some((texti, si)) = skip { + self.texti = texti + 1; + self.si = ROOT_STATE; + return Some(self.aut.get_match(si, 0, texti)); + } + } else if self.aut.start_bytes().len() == 2 { + let skip = skip_to_match( + self.aut, self.text, self.texti, self.si, skip2); + if let Some((texti, si)) = skip { + self.texti = texti + 1; + self.si = ROOT_STATE; + return Some(self.aut.get_match(si, 0, texti)); + } + } else if self.aut.start_bytes().len() == 3 { + let skip = skip_to_match( + self.aut, self.text, self.texti, self.si, skip3); + if let Some((texti, si)) = skip { + self.texti = texti + 1; + self.si = ROOT_STATE; + return Some(self.aut.get_match(si, 0, texti)); + } + } else { + let step = step_to_match(self.aut, self.text, self.texti, self.si); + if let Some((texti, si)) = step { + self.texti = texti + 1; + self.si = ROOT_STATE; + return Some(self.aut.get_match(si, 0, texti)); + } + } + None + } +} + +/// An iterator of non-overlapping matches for streaming text. +/// +/// This iterator yields `io::Result` values. +/// +/// `'a` is the lifetime of the automaton, `R` is the type of the underlying +/// `io::Read`er, and P is the type of the Automaton's pattern. +#[derive(Debug)] +pub struct StreamMatches<'a, R, P, A: 'a + Automaton

+ ?Sized> { + aut: &'a A, + buf: io::BufReader, + texti: usize, + si: StateIdx, + _m: PhantomData

, +} + +impl<'a, R: io::Read, P, A: Automaton

> + Iterator for StreamMatches<'a, R, P, A> { + type Item = io::Result; + + fn next(&mut self) -> Option> { + let mut m = None; + let mut consumed = 0; +'LOOP: loop { + self.buf.consume(consumed); + let bs = match self.buf.fill_buf() { + Err(err) => return Some(Err(err)), + Ok(bs) if bs.len() == 0 => break, + Ok(bs) => bs, + }; + consumed = bs.len(); // is shortened if we find a match + for (i, &b) in bs.iter().enumerate() { + self.si = self.aut.next_state(self.si, b); + if self.aut.has_match(self.si, 0) { + m = Some(Ok(self.aut.get_match(self.si, 0, self.texti))); + consumed = i + 1; + self.texti += 1; + self.si = ROOT_STATE; + break 'LOOP; + } + self.texti += 1; + } + } + self.buf.consume(consumed); + m + } +} + +/// An iterator of overlapping matches for in-memory text. +/// +/// This iterator yields `Match` values. +/// +/// `'a` is the lifetime of the automaton, `'s` is the lifetime of the +/// search text, and `P` is the type of the Automaton's pattern. +#[derive(Debug)] +pub struct MatchesOverlapping<'a, 's, P, A: 'a + Automaton

+ ?Sized> { + aut: &'a A, + text: &'s [u8], + texti: usize, + si: StateIdx, + outi: usize, + _m: PhantomData

, +} + +impl<'a, 's, P, A: Automaton

+ ?Sized> + Iterator for MatchesOverlapping<'a, 's, P, A> { + type Item = Match; + + fn next(&mut self) -> Option { + if self.aut.has_match(self.si, self.outi) { + let m = self.aut.get_match(self.si, self.outi, self.texti); + self.outi += 1; + if !self.aut.has_match(self.si, self.outi) { + self.texti += 1; + } + return Some(m); + } + + self.outi = 0; + if self.aut.start_bytes().len() == 1 { + let skip = skip_to_match( + self.aut, self.text, self.texti, self.si, skip1); + if let Some((texti, si)) = skip { + self.texti = texti; + self.si = si; + return self.next(); + } + } else if self.aut.start_bytes().len() == 2 { + let skip = skip_to_match( + self.aut, self.text, self.texti, self.si, skip2); + if let Some((texti, si)) = skip { + self.texti = texti; + self.si = si; + return self.next(); + } + } else if self.aut.start_bytes().len() == 3 { + let skip = skip_to_match( + self.aut, self.text, self.texti, self.si, skip3); + if let Some((texti, si)) = skip { + self.texti = texti; + self.si = si; + return self.next(); + } + } else { + let step = step_to_match(self.aut, self.text, self.texti, self.si); + if let Some((texti, si)) = step { + self.texti = texti; + self.si = si; + return self.next(); + } + } + None + } +} + +/// An iterator of overlapping matches for streaming text. +/// +/// This iterator yields `io::Result` values. +/// +/// `'a` is the lifetime of the automaton, `R` is the type of the underlying +/// `io::Read`er, and P is the type of the Automaton's pattern. +#[derive(Debug)] +pub struct StreamMatchesOverlapping<'a, R, P, A: 'a + Automaton

+ ?Sized> { + aut: &'a A, + buf: io::BufReader, + texti: usize, + si: StateIdx, + outi: usize, + _m: PhantomData

, +} + +impl<'a, R: io::Read, P, A: Automaton

+ ?Sized> + Iterator for StreamMatchesOverlapping<'a, R, P, A> { + type Item = io::Result; + + fn next(&mut self) -> Option> { + if self.aut.has_match(self.si, self.outi) { + let m = self.aut.get_match(self.si, self.outi, self.texti); + self.outi += 1; + if !self.aut.has_match(self.si, self.outi) { + self.texti += 1; + } + return Some(Ok(m)); + } + let mut m = None; + let mut consumed = 0; + self.outi = 0; +'LOOP: loop { + self.buf.consume(consumed); + let bs = match self.buf.fill_buf() { + Err(err) => return Some(Err(err)), + Ok(bs) if bs.len() == 0 => break, + Ok(bs) => bs, + }; + consumed = bs.len(); // is shortened if we find a match + for (i, &b) in bs.iter().enumerate() { + self.si = self.aut.next_state(self.si, b); + if self.aut.has_match(self.si, self.outi) { + m = Some(Ok(self.aut.get_match( + self.si, self.outi, self.texti))); + consumed = i + 1; + self.outi += 1; + if !self.aut.has_match(self.si, self.outi) { + self.texti += 1; + } + break 'LOOP; + } + self.texti += 1; + } + } + self.buf.consume(consumed); + m + } +} diff --git a/deps/aho-corasick-0.5.1/src/full.rs b/deps/aho-corasick-0.5.1/src/full.rs new file mode 100644 index 000000000..3d04ea688 --- /dev/null +++ b/deps/aho-corasick-0.5.1/src/full.rs @@ -0,0 +1,135 @@ +use std::fmt; +use std::mem; + +use super::{ + FAIL_STATE, + StateIdx, AcAutomaton, Transitions, Match, + usize_bytes, vec_bytes, +}; +use super::autiter::Automaton; + +/// A complete Aho-Corasick automaton. +/// +/// This uses a single transition matrix that permits each input character +/// to move to the next state with a single lookup in the matrix. +/// +/// This is as fast as it gets, but it is guaranteed to use a lot of memory. +/// Namely, it will use at least `4 * 256 * #states`, where the number of +/// states is capped at length of all patterns concatenated. +#[derive(Clone)] +pub struct FullAcAutomaton

{ + pats: Vec

, + trans: Vec, // row-major, where states are rows + out: Vec>, // indexed by StateIdx + start_bytes: Vec, +} + +impl> FullAcAutomaton

{ + /// Build a new expanded Aho-Corasick automaton from an existing + /// Aho-Corasick automaton. + pub fn new(ac: AcAutomaton) -> FullAcAutomaton

{ + let mut fac = FullAcAutomaton { + pats: vec![], + trans: vec![FAIL_STATE; 256 * ac.states.len()], + out: vec![vec![]; ac.states.len()], + start_bytes: vec![], + }; + fac.build_matrix(&ac); + fac.pats = ac.pats; + fac.start_bytes = ac.start_bytes; + fac + } + + #[doc(hidden)] + pub fn memory_usage(&self) -> usize { + self.pats.iter() + .map(|p| vec_bytes() + p.as_ref().len()) + .fold(0, |a, b| a + b) + + (4 * self.trans.len()) + + self.out.iter() + .map(|v| vec_bytes() + (usize_bytes() * v.len())) + .fold(0, |a, b| a + b) + + self.start_bytes.len() + } + + #[doc(hidden)] + pub fn heap_bytes(&self) -> usize { + self.pats.iter() + .map(|p| mem::size_of::

() + p.as_ref().len()) + .fold(0, |a, b| a + b) + + (4 * self.trans.len()) + + self.out.iter() + .map(|v| vec_bytes() + (usize_bytes() * v.len())) + .fold(0, |a, b| a + b) + + self.start_bytes.len() + } + + fn set(&mut self, si: StateIdx, i: u8, goto: StateIdx) { + let ns = self.num_states(); + self.trans[i as usize * ns + si as usize] = goto; + } + + #[doc(hidden)] + #[inline] + pub fn num_states(&self) -> usize { + self.out.len() + } +} + +impl> Automaton

for FullAcAutomaton

{ + #[inline] + fn next_state(&self, si: StateIdx, i: u8) -> StateIdx { + self.trans[i as usize * self.num_states() + si as usize] + } + + #[inline] + fn get_match(&self, si: StateIdx, outi: usize, texti: usize) -> Match { + let pati = self.out[si as usize][outi]; + let patlen = self.pats[pati].as_ref().len(); + let start = texti + 1 - patlen; + Match { + pati: pati, + start: start, + end: start + patlen, + } + } + + #[inline] + fn has_match(&self, si: StateIdx, outi: usize) -> bool { + outi < self.out[si as usize].len() + } + + #[inline] + fn start_bytes(&self) -> &[u8] { + &self.start_bytes + } + + #[inline] + fn patterns(&self) -> &[P] { + &self.pats + } + + #[inline] + fn pattern(&self, i: usize) -> &P { + &self.pats[i] + } +} + +impl> FullAcAutomaton

{ + fn build_matrix(&mut self, ac: &AcAutomaton) { + for (si, s) in ac.states.iter().enumerate().skip(1) { + for b in (0..256).map(|b| b as u8) { + self.set(si as StateIdx, b, ac.next_state(si as StateIdx, b)); + } + for &pati in &s.out { + self.out[si].push(pati); + } + } + } +} + +impl + fmt::Debug> fmt::Debug for FullAcAutomaton

{ + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + write!(f, "FullAcAutomaton({:?})", self.pats) + } +} diff --git a/deps/aho-corasick-0.5.1/src/lib.rs b/deps/aho-corasick-0.5.1/src/lib.rs new file mode 100644 index 000000000..da03997b1 --- /dev/null +++ b/deps/aho-corasick-0.5.1/src/lib.rs @@ -0,0 +1,919 @@ +/*! +An implementation of the +[Aho-Corasick string search algorithm](https://en.wikipedia.org/wiki/Aho%E2%80%93Corasick_string_matching_algorithm). + +The Aho-Corasick algorithm is principally useful when you need to search many +large texts for a fixed (possibly large) set of keywords. In particular, the +Aho-Corasick algorithm preprocesses the set of keywords by constructing a +finite state machine. The search phase is then a quick linear scan through the +text. Each character in the search text causes a state transition in the +automaton. Matches are reported when the automaton enters a match state. + +# Examples + +The main type exposed by this crate is `AcAutomaton`, which can be constructed +from an iterator of pattern strings: + +```rust +use aho_corasick::{Automaton, AcAutomaton}; + +let aut = AcAutomaton::new(vec!["apple", "maple"]); + +// AcAutomaton also implements `FromIterator`: +let aut: AcAutomaton<&str> = ["apple", "maple"].iter().cloned().collect(); +``` + +Finding matches can be done with `find`: + +```rust +use aho_corasick::{Automaton, AcAutomaton, Match}; + +let aut = AcAutomaton::new(vec!["apple", "maple"]); +let mut it = aut.find("I like maple apples."); +assert_eq!(it.next(), Some(Match { + pati: 1, + start: 7, + end: 12, +})); +assert_eq!(it.next(), Some(Match { + pati: 0, + start: 13, + end: 18, +})); +assert_eq!(it.next(), None); +``` + +Use `find_overlapping` if you want to report all matches, even if they +overlap with each other. + +```rust +use aho_corasick::{Automaton, AcAutomaton, Match}; + +let aut = AcAutomaton::new(vec!["abc", "a"]); +let matches: Vec<_> = aut.find_overlapping("abc").collect(); +assert_eq!(matches, vec![ + Match { pati: 1, start: 0, end: 1}, Match { pati: 0, start: 0, end: 3 }, +]); + +// Regular `find` will report only one match: +let matches: Vec<_> = aut.find("abc").collect(); +assert_eq!(matches, vec![Match { pati: 1, start: 0, end: 1}]); +``` + +Finally, there are also methods for finding matches on *streams*. Namely, the +search text does not have to live in memory. It's useful to run this on files +that can't fit into memory: + +```no_run +use std::fs::File; + +use aho_corasick::{Automaton, AcAutomaton}; + +let aut = AcAutomaton::new(vec!["foo", "bar", "baz"]); +let rdr = File::open("search.txt").unwrap(); +for m in aut.stream_find(rdr) { + let m = m.unwrap(); // could be an IO error + println!("Pattern '{}' matched at: ({}, {})", + aut.pattern(m.pati), m.start, m.end); +} +``` + +There is also `stream_find_overlapping`, which is just like `find_overlapping`, +but it operates on streams. + +Please see `dict-search.rs` in this crate's `examples` directory for a more +complete example. It creates a large automaton from a dictionary and can do a +streaming match over arbitrarily large data. + +# Memory usage + +A key aspect of an Aho-Corasick implementation is how the state transitions +are represented. The easiest way to make the automaton fast is to store a +sparse 256-slot map in each state. It maps an input byte to a state index. +This makes the matching loop extremely fast, since it translates to a simple +pointer read. + +The problem is that as the automaton accumulates more states, you end up paying +a `256 * 4` (`4` is for the `u32` state index) byte penalty for every state +regardless of how many transitions it has. + +To solve this, only states near the root of the automaton have this sparse +map representation. States near the leaves of the automaton use a dense mapping +that requires a linear scan. + +(The specific limit currently set is `3`, so that states with a depth less than +or equal to `3` are less memory efficient. The result is that the memory usage +of the automaton stops growing rapidly past ~60MB, even for automatons with +thousands of patterns.) + +If you'd like to opt for the less-memory-efficient-but-faster version, then +you can construct an `AcAutomaton` with a `Sparse` transition strategy: + +```rust +use aho_corasick::{Automaton, AcAutomaton, Match, Sparse}; + +let aut = AcAutomaton::<&str, Sparse>::with_transitions(vec!["abc", "a"]); +let matches: Vec<_> = aut.find("abc").collect(); +assert_eq!(matches, vec![Match { pati: 1, start: 0, end: 1}]); +``` +*/ + +#![deny(missing_docs)] + +extern crate memchr; +#[cfg(test)] extern crate quickcheck; +#[cfg(test)] extern crate rand; + +use std::collections::VecDeque; +use std::fmt; +use std::iter::FromIterator; +use std::mem; + +pub use self::autiter::{ + Automaton, Match, + Matches, MatchesOverlapping, StreamMatches, StreamMatchesOverlapping, +}; +pub use self::full::FullAcAutomaton; + +// We're specifying paths explicitly so that we can use +// these modules simultaneously from `main.rs`. +// Should probably make just make `main.rs` a separate crate. +#[path = "autiter.rs"] +mod autiter; +#[path = "full.rs"] +mod full; + +/// The integer type used for the state index. +/// +/// Limiting this to 32 bit integers can have a big impact on memory usage +/// when using the `Sparse` transition representation. +pub type StateIdx = u32; + +// Constants for special state indexes. +const FAIL_STATE: u32 = 0; +const ROOT_STATE: u32 = 1; + +// Limit the depth at which we use a sparse alphabet map. Once the limit is +// reached, a dense set is used (and lookup becomes O(n)). +// +// This does have a performance hit, but the (straight forward) alternative +// is to have a `256 * 4` byte overhead for every state. +// Given that Aho-Corasick is typically used for dictionary searching, this +// can lead to dramatic memory bloat. +// +// This limit should only be increased at your peril. Namely, in the worst +// case, `256^DENSE_DEPTH_THRESHOLD * 4` corresponds to the memory usage in +// bytes. A value of `1` gives us a good balance. This is also a happy point +// in the benchmarks. A value of `0` gives considerably worse times on certain +// benchmarks (e.g., `ac_ten_one_prefix_byte_every_match`) than even a value +// of `1`. A value of `2` is slightly better than `1` and it looks like gains +// level off at that point with not much observable difference when set to +// `3`. +// +// Why not make this user configurable? Well, it doesn't make much sense +// because we pay for it with case analysis in the matching loop. Increasing it +// doesn't have much impact on performance (outside of pathological cases?). +// +// N.B. Someone else seems to have discovered an alternative, but I haven't +// grokked it yet: https://github.com/mischasan/aho-corasick +const DENSE_DEPTH_THRESHOLD: u32 = 1; + +/// An Aho-Corasick finite automaton. +/// +/// The type parameter `P` is the type of the pattern that was used to +/// construct this AcAutomaton. +#[derive(Clone)] +pub struct AcAutomaton { + pats: Vec

, + states: Vec>, + start_bytes: Vec, +} + +#[derive(Clone)] +struct State { + out: Vec, + fail: StateIdx, + goto: T, + depth: u32, +} + +impl> AcAutomaton

{ + /// Create a new automaton from an iterator of patterns. + /// + /// The patterns must be convertible to bytes (`&[u8]`) via the `AsRef` + /// trait. + pub fn new(pats: I) -> AcAutomaton + where I: IntoIterator { + AcAutomaton::with_transitions(pats) + } +} + +impl, T: Transitions> AcAutomaton { + /// Create a new automaton from an iterator of patterns. + /// + /// This constructor allows one to choose the transition representation. + /// + /// The patterns must be convertible to bytes (`&[u8]`) via the `AsRef` + /// trait. + pub fn with_transitions(pats: I) -> AcAutomaton + where I: IntoIterator { + AcAutomaton { + pats: vec![], // filled in later, avoid wrath of borrow checker + states: vec![State::new(0), State::new(0)], // empty and root + start_bytes: vec![], // also filled in later + }.build(pats.into_iter().collect()) + } + + /// Build out the entire automaton into a single matrix. + /// + /// This will make searching as fast as possible at the expense of using + /// at least `4 * 256 * #states` bytes of memory. + pub fn into_full(self) -> FullAcAutomaton

{ + FullAcAutomaton::new(self) + } + + #[doc(hidden)] + pub fn num_states(&self) -> usize { + self.states.len() + } + + #[doc(hidden)] + pub fn heap_bytes(&self) -> usize { + self.pats.iter() + .map(|p| mem::size_of::

() + p.as_ref().len()) + .fold(0, |a, b| a + b) + + self.states.iter() + .map(|s| mem::size_of::>() + s.heap_bytes()) + .fold(0, |a, b| a + b) + + self.start_bytes.len() + } +} + +impl, T: Transitions> Automaton

for AcAutomaton { + #[inline] + fn next_state(&self, mut si: StateIdx, b: u8) -> StateIdx { + loop { + let maybe_si = self.states[si as usize].goto(b); + if maybe_si != FAIL_STATE { + si = maybe_si; + break; + } else { + si = self.states[si as usize].fail; + } + } + si + } + + #[inline] + fn get_match(&self, si: StateIdx, outi: usize, texti: usize) -> Match { + let pati = self.states[si as usize].out[outi]; + let patlen = self.pats[pati].as_ref().len(); + let start = texti + 1 - patlen; + Match { + pati: pati, + start: start, + end: start + patlen, + } + } + + #[inline] + fn has_match(&self, si: StateIdx, outi: usize) -> bool { + outi < self.states[si as usize].out.len() + } + + #[inline] + fn start_bytes(&self) -> &[u8] { + &self.start_bytes + } + + #[inline] + fn patterns(&self) -> &[P] { + &self.pats + } + + #[inline] + fn pattern(&self, i: usize) -> &P { + &self.pats[i] + } +} + +// Below contains code for *building* the automaton. It's a reasonably faithful +// translation of the description/psuedo-code from: +// http://www.cs.uku.fi/~kilpelai/BSA05/lectures/slides04.pdf + +impl, T: Transitions> AcAutomaton { + // This is the first phase and builds the initial keyword tree. + fn build(mut self, pats: Vec

) -> AcAutomaton { + for (pati, pat) in pats.iter().enumerate() { + if pat.as_ref().is_empty() { + continue; + } + let mut previ = ROOT_STATE; + for &b in pat.as_ref() { + if self.states[previ as usize].goto(b) != FAIL_STATE { + previ = self.states[previ as usize].goto(b); + } else { + let depth = self.states[previ as usize].depth + 1; + let nexti = self.add_state(State::new(depth)); + self.states[previ as usize].set_goto(b, nexti); + previ = nexti; + } + } + self.states[previ as usize].out.push(pati); + } + for c in (0..256).into_iter().map(|c| c as u8) { + if self.states[ROOT_STATE as usize].goto(c) == FAIL_STATE { + self.states[ROOT_STATE as usize].set_goto(c, ROOT_STATE); + } else { + self.start_bytes.push(c); + } + } + self.pats = pats; + self.fill() + } + + // The second phase that fills in the back links. + fn fill(mut self) -> AcAutomaton { + // Fill up the queue with all non-root transitions out of the root + // node. Then proceed by breadth first traversal. + let mut q = VecDeque::new(); + for c in (0..256).into_iter().map(|c| c as u8) { + let si = self.states[ROOT_STATE as usize].goto(c); + if si != ROOT_STATE { + q.push_front(si); + } + } + while let Some(si) = q.pop_back() { + for c in (0..256).into_iter().map(|c| c as u8) { + let u = self.states[si as usize].goto(c); + if u != FAIL_STATE { + q.push_front(u); + let mut v = self.states[si as usize].fail; + while self.states[v as usize].goto(c) == FAIL_STATE { + v = self.states[v as usize].fail; + } + let ufail = self.states[v as usize].goto(c); + self.states[u as usize].fail = ufail; + let ufail_out = self.states[ufail as usize].out.clone(); + self.states[u as usize].out.extend(ufail_out); + } + } + } + self + } + + fn add_state(&mut self, state: State) -> StateIdx { + let i = self.states.len(); + self.states.push(state); + i as StateIdx + } +} + +impl State { + fn new(depth: u32) -> State { + State { + out: vec![], + fail: 1, + goto: Transitions::new(depth), + depth: depth, + } + } + + fn goto(&self, b: u8) -> StateIdx { + self.goto.goto(b) + } + + fn set_goto(&mut self, b: u8, si: StateIdx) { + self.goto.set_goto(b, si); + } + + fn heap_bytes(&self) -> usize { + (self.out.len() * usize_bytes()) + + self.goto.heap_bytes() + } +} + +/// An abstraction over state transition strategies. +/// +/// This is an attempt to let the caller choose the space/time trade offs +/// used for state transitions. +/// +/// (It's possible that this interface is merely good enough for just the two +/// implementations in this crate.) +pub trait Transitions { + /// Return a new state at the given depth. + fn new(depth: u32) -> Self; + /// Return the next state index given the next character. + fn goto(&self, alpha: u8) -> StateIdx; + /// Set the next state index for the character given. + fn set_goto(&mut self, alpha: u8, si: StateIdx); + /// The memory use in bytes (on the heap) of this set of transitions. + fn heap_bytes(&self) -> usize; +} + +/// State transitions that can be stored either sparsely or densely. +/// +/// This uses less space but at the expense of slower matching. +#[derive(Clone, Debug)] +pub struct Dense(DenseChoice); + +#[derive(Clone, Debug)] +enum DenseChoice { + Sparse(Vec), // indexed by alphabet + Dense(Vec<(u8, StateIdx)>), +} + +impl Transitions for Dense { + fn new(depth: u32) -> Dense { + if depth <= DENSE_DEPTH_THRESHOLD { + Dense(DenseChoice::Sparse(vec![0; 256])) + } else { + Dense(DenseChoice::Dense(vec![])) + } + } + + fn goto(&self, b1: u8) -> StateIdx { + match self.0 { + DenseChoice::Sparse(ref m) => m[b1 as usize], + DenseChoice::Dense(ref m) => { + for &(b2, si) in m { + if b1 == b2 { + return si; + } + } + FAIL_STATE + } + } + } + + fn set_goto(&mut self, b: u8, si: StateIdx) { + match self.0 { + DenseChoice::Sparse(ref mut m) => m[b as usize] = si, + DenseChoice::Dense(ref mut m) => m.push((b, si)), + } + } + + fn heap_bytes(&self) -> usize { + match self.0 { + DenseChoice::Sparse(ref m) => m.len() * 4, + DenseChoice::Dense(ref m) => m.len() * (1 + 4), + } + } +} + +/// State transitions that are always sparse. +/// +/// This can use enormous amounts of memory when there are many patterns, +/// but matching is very fast. +#[derive(Clone, Debug)] +pub struct Sparse(Vec); + +impl Transitions for Sparse { + fn new(_: u32) -> Sparse { + Sparse(vec![0; 256]) + } + + #[inline] + fn goto(&self, b: u8) -> StateIdx { + self.0[b as usize] + } + + fn set_goto(&mut self, b: u8, si: StateIdx) { + self.0[b as usize] = si; + } + + fn heap_bytes(&self) -> usize { + self.0.len() * 4 + } +} + +impl> FromIterator for AcAutomaton { + /// Create an automaton from an iterator of strings. + fn from_iter(it: T) -> AcAutomaton where T: IntoIterator { + AcAutomaton::new(it) + } +} + +// Provide some question debug impls for viewing automatons. +// The custom impls mostly exist for special showing of sparse maps. + +impl + fmt::Debug, T: Transitions> + fmt::Debug for AcAutomaton { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + use std::iter::repeat; + + try!(writeln!(f, "{}", repeat('-').take(79).collect::())); + try!(writeln!(f, "Patterns: {:?}", self.pats)); + for (i, state) in self.states.iter().enumerate().skip(1) { + try!(writeln!(f, "{:3}: {}", i, state.debug(i == 1))); + } + write!(f, "{}", repeat('-').take(79).collect::()) + } +} + +impl State { + fn debug(&self, root: bool) -> String { + format!("State {{ depth: {:?}, out: {:?}, fail: {:?}, goto: {{{}}} }}", + self.depth, self.out, self.fail, self.goto_string(root)) + } + + fn goto_string(&self, root: bool) -> String { + use std::char::from_u32; + + let mut goto = vec![]; + for b in (0..256).map(|b| b as u8) { + let si = self.goto(b); + if (!root && si == FAIL_STATE) || (root && si == ROOT_STATE) { + continue; + } + goto.push(format!("{} => {}", from_u32(b as u32).unwrap(), si)); + } + goto.join(", ") + } +} + +impl fmt::Debug for State { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + write!(f, "{}", self.debug(false)) + } +} + +impl AcAutomaton { + #[doc(hidden)] + pub fn dot(&self) -> String { + use std::fmt::Write; + let mut out = String::new(); + macro_rules! w { + ($w:expr, $($tt:tt)*) => { {write!($w, $($tt)*)}.unwrap() } + } + + w!(out, r#" +digraph automaton {{ + label=<{}>; + labelloc="l"; + labeljust="l"; + rankdir="LR"; +"#, self.pats.join(", ")); + for (i, s) in self.states.iter().enumerate().skip(1) { + let i = i as u32; + if s.out.len() == 0 { + w!(out, " {};\n", i); + } else { + w!(out, " {} [peripheries=2];\n", i); + } + w!(out, " {} -> {} [style=dashed];\n", i, s.fail); + for b in (0..256).map(|b| b as u8) { + let si = s.goto(b); + if si == FAIL_STATE || (i == ROOT_STATE && si == ROOT_STATE) { + continue; + } + w!(out, " {} -> {} [label={}];\n", i, si, b as char); + } + } + w!(out, "}}"); + out + } +} + +fn vec_bytes() -> usize { + usize_bytes() * 3 +} + +fn usize_bytes() -> usize { + let bits = usize::max_value().count_ones() as usize; + bits / 8 +} + +#[cfg(test)] +mod tests { + use std::collections::HashSet; + use std::io; + + use quickcheck::{Arbitrary, Gen, quickcheck}; + use rand::Rng; + + use super::{Automaton, AcAutomaton, Match}; + + fn aut_find(xs: &[S], haystack: &str) -> Vec + where S: Clone + AsRef<[u8]> { + AcAutomaton::new(xs.to_vec()).find(&haystack).collect() + } + + fn aut_finds(xs: &[S], haystack: &str) -> Vec + where S: Clone + AsRef<[u8]> { + let cur = io::Cursor::new(haystack.as_bytes()); + AcAutomaton::new(xs.to_vec()) + .stream_find(cur).map(|r| r.unwrap()).collect() + } + + fn aut_findf(xs: &[S], haystack: &str) -> Vec + where S: Clone + AsRef<[u8]> { + AcAutomaton::new(xs.to_vec()).into_full().find(haystack).collect() + } + + fn aut_findfs(xs: &[S], haystack: &str) -> Vec + where S: Clone + AsRef<[u8]> { + let cur = io::Cursor::new(haystack.as_bytes()); + AcAutomaton::new(xs.to_vec()) + .into_full() + .stream_find(cur).map(|r| r.unwrap()).collect() + } + + fn aut_findo(xs: &[S], haystack: &str) -> Vec + where S: Clone + AsRef<[u8]> { + AcAutomaton::new(xs.to_vec()).find_overlapping(haystack).collect() + } + + fn aut_findos(xs: &[S], haystack: &str) -> Vec + where S: Clone + AsRef<[u8]> { + let cur = io::Cursor::new(haystack.as_bytes()); + AcAutomaton::new(xs.to_vec()) + .stream_find_overlapping(cur).map(|r| r.unwrap()).collect() + } + + fn aut_findfo(xs: &[S], haystack: &str) -> Vec + where S: Clone + AsRef<[u8]> { + AcAutomaton::new(xs.to_vec()) + .into_full().find_overlapping(haystack).collect() + } + + fn aut_findfos(xs: &[S], haystack: &str) -> Vec + where S: Clone + AsRef<[u8]> { + let cur = io::Cursor::new(haystack.as_bytes()); + AcAutomaton::new(xs.to_vec()) + .into_full() + .stream_find_overlapping(cur).map(|r| r.unwrap()).collect() + } + + #[test] + fn one_pattern_one_match() { + let ns = vec!["a"]; + let hay = "za"; + let matches = vec![ + Match { pati: 0, start: 1, end: 2 }, + ]; + assert_eq!(&aut_find(&ns, hay), &matches); + assert_eq!(&aut_finds(&ns, hay), &matches); + assert_eq!(&aut_findf(&ns, hay), &matches); + assert_eq!(&aut_findfs(&ns, hay), &matches); + } + + #[test] + fn one_pattern_many_match() { + let ns = vec!["a"]; + let hay = "zazazzzza"; + let matches = vec![ + Match { pati: 0, start: 1, end: 2 }, + Match { pati: 0, start: 3, end: 4 }, + Match { pati: 0, start: 8, end: 9 }, + ]; + assert_eq!(&aut_find(&ns, hay), &matches); + assert_eq!(&aut_finds(&ns, hay), &matches); + assert_eq!(&aut_findf(&ns, hay), &matches); + assert_eq!(&aut_findfs(&ns, hay), &matches); + } + + #[test] + fn one_longer_pattern_one_match() { + let ns = vec!["abc"]; + let hay = "zazabcz"; + let matches = vec![ Match { pati: 0, start: 3, end: 6 } ]; + assert_eq!(&aut_find(&ns, hay), &matches); + assert_eq!(&aut_finds(&ns, hay), &matches); + assert_eq!(&aut_findf(&ns, hay), &matches); + assert_eq!(&aut_findfs(&ns, hay), &matches); + } + + #[test] + fn one_longer_pattern_many_match() { + let ns = vec!["abc"]; + let hay = "zazabczzzzazzzabc"; + let matches = vec![ + Match { pati: 0, start: 3, end: 6 }, + Match { pati: 0, start: 14, end: 17 }, + ]; + assert_eq!(&aut_find(&ns, hay), &matches); + assert_eq!(&aut_finds(&ns, hay), &matches); + assert_eq!(&aut_findf(&ns, hay), &matches); + assert_eq!(&aut_findfs(&ns, hay), &matches); + } + + #[test] + fn many_pattern_one_match() { + let ns = vec!["a", "b"]; + let hay = "zb"; + let matches = vec![ Match { pati: 1, start: 1, end: 2 } ]; + assert_eq!(&aut_find(&ns, hay), &matches); + assert_eq!(&aut_finds(&ns, hay), &matches); + assert_eq!(&aut_findf(&ns, hay), &matches); + assert_eq!(&aut_findfs(&ns, hay), &matches); + } + + #[test] + fn many_pattern_many_match() { + let ns = vec!["a", "b"]; + let hay = "zbzazzzzb"; + let matches = vec![ + Match { pati: 1, start: 1, end: 2 }, + Match { pati: 0, start: 3, end: 4 }, + Match { pati: 1, start: 8, end: 9 }, + ]; + assert_eq!(&aut_find(&ns, hay), &matches); + assert_eq!(&aut_finds(&ns, hay), &matches); + assert_eq!(&aut_findf(&ns, hay), &matches); + assert_eq!(&aut_findfs(&ns, hay), &matches); + } + + #[test] + fn many_longer_pattern_one_match() { + let ns = vec!["abc", "xyz"]; + let hay = "zazxyzz"; + let matches = vec![ Match { pati: 1, start: 3, end: 6 } ]; + assert_eq!(&aut_find(&ns, hay), &matches); + assert_eq!(&aut_finds(&ns, hay), &matches); + assert_eq!(&aut_findf(&ns, hay), &matches); + assert_eq!(&aut_findfs(&ns, hay), &matches); + } + + #[test] + fn many_longer_pattern_many_match() { + let ns = vec!["abc", "xyz"]; + let hay = "zazxyzzzzzazzzabcxyz"; + let matches = vec![ + Match { pati: 1, start: 3, end: 6 }, + Match { pati: 0, start: 14, end: 17 }, + Match { pati: 1, start: 17, end: 20 }, + ]; + assert_eq!(&aut_find(&ns, hay), &matches); + assert_eq!(&aut_finds(&ns, hay), &matches); + assert_eq!(&aut_findf(&ns, hay), &matches); + assert_eq!(&aut_findfs(&ns, hay), &matches); + } + + #[test] + fn many_longer_pattern_overlap_one_match() { + let ns = vec!["abc", "bc"]; + let hay = "zazabcz"; + let matches = vec![ + Match { pati: 0, start: 3, end: 6 }, + Match { pati: 1, start: 4, end: 6 }, + ]; + assert_eq!(&aut_findo(&ns, hay), &matches); + assert_eq!(&aut_findos(&ns, hay), &matches); + assert_eq!(&aut_findfo(&ns, hay), &matches); + assert_eq!(&aut_findfos(&ns, hay), &matches); + } + + #[test] + fn many_longer_pattern_overlap_one_match_reverse() { + let ns = vec!["abc", "bc"]; + let hay = "xbc"; + let matches = vec![ Match { pati: 1, start: 1, end: 3 } ]; + assert_eq!(&aut_findo(&ns, hay), &matches); + assert_eq!(&aut_findos(&ns, hay), &matches); + assert_eq!(&aut_findfo(&ns, hay), &matches); + assert_eq!(&aut_findfos(&ns, hay), &matches); + } + + #[test] + fn many_longer_pattern_overlap_many_match() { + let ns = vec!["abc", "bc", "c"]; + let hay = "zzzabczzzbczzzc"; + let matches = vec![ + Match { pati: 0, start: 3, end: 6 }, + Match { pati: 1, start: 4, end: 6 }, + Match { pati: 2, start: 5, end: 6 }, + Match { pati: 1, start: 9, end: 11 }, + Match { pati: 2, start: 10, end: 11 }, + Match { pati: 2, start: 14, end: 15 }, + ]; + assert_eq!(&aut_findo(&ns, hay), &matches); + assert_eq!(&aut_findos(&ns, hay), &matches); + assert_eq!(&aut_findfo(&ns, hay), &matches); + assert_eq!(&aut_findfos(&ns, hay), &matches); + } + + #[test] + fn many_longer_pattern_overlap_many_match_reverse() { + let ns = vec!["abc", "bc", "c"]; + let hay = "zzzczzzbczzzabc"; + let matches = vec![ + Match { pati: 2, start: 3, end: 4 }, + Match { pati: 1, start: 7, end: 9 }, + Match { pati: 2, start: 8, end: 9 }, + Match { pati: 0, start: 12, end: 15 }, + Match { pati: 1, start: 13, end: 15 }, + Match { pati: 2, start: 14, end: 15 }, + ]; + assert_eq!(&aut_findo(&ns, hay), &matches); + assert_eq!(&aut_findos(&ns, hay), &matches); + assert_eq!(&aut_findfo(&ns, hay), &matches); + assert_eq!(&aut_findfos(&ns, hay), &matches); + } + + #[test] + fn pattern_returns_original_type() { + let aut = AcAutomaton::new(vec!["apple", "maple"]); + + // Explicitly given this type to assert that the thing returned + // from the function is our original type. + let pat: &str = aut.pattern(0); + assert_eq!(pat, "apple"); + + // Also check the return type of the `patterns` function. + let pats: &[&str] = aut.patterns(); + assert_eq!(pats, &["apple", "maple"]); + } + + // Quickcheck time. + + // This generates very small ascii strings, which makes them more likely + // to interact in interesting ways with larger haystack strings. + #[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord)] + pub struct SmallAscii(String); + + impl Arbitrary for SmallAscii { + fn arbitrary(g: &mut G) -> SmallAscii { + use std::char::from_u32; + SmallAscii((0..2) + .map(|_| from_u32(g.gen_range(97, 123)).unwrap()) + .collect()) + } + + fn shrink(&self) -> Box> { + Box::new(self.0.shrink().map(SmallAscii)) + } + } + + impl From for String { + fn from(s: SmallAscii) -> String { s.0 } + } + + impl AsRef<[u8]> for SmallAscii { + fn as_ref(&self) -> &[u8] { self.0.as_ref() } + } + + // This is the same arbitrary impl as `String`, except it has a bias toward + // ASCII characters. + #[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord)] + pub struct BiasAscii(String); + + impl Arbitrary for BiasAscii { + fn arbitrary(g: &mut G) -> BiasAscii { + use std::char::from_u32; + let size = { let s = g.size(); g.gen_range(0, s) }; + let mut s = String::with_capacity(size); + for _ in 0..size { + if g.gen_weighted_bool(3) { + s.push(char::arbitrary(g)); + } else { + for _ in 0..5 { + s.push(from_u32(g.gen_range(97, 123)).unwrap()); + } + } + } + BiasAscii(s) + } + + fn shrink(&self) -> Box> { + Box::new(self.0.shrink().map(BiasAscii)) + } + } + + fn naive_find(xs: &[S], haystack: &str) -> Vec + where S: Clone + Into { + let needles: Vec = + xs.to_vec().into_iter().map(Into::into).collect(); + let mut matches = vec![]; + for hi in 0..haystack.len() { + for (pati, needle) in needles.iter().enumerate() { + let needle = needle.as_bytes(); + if needle.len() == 0 || needle.len() > haystack.len() - hi { + continue; + } + if needle == &haystack.as_bytes()[hi..hi+needle.len()] { + matches.push(Match { + pati: pati, + start: hi, + end: hi + needle.len(), + }); + } + } + } + matches + } + + #[test] + fn qc_ac_equals_naive() { + fn prop(needles: Vec, haystack: BiasAscii) -> bool { + let aut_matches = aut_findo(&needles, &haystack.0); + let naive_matches = naive_find(&needles, &haystack.0); + // Ordering isn't always the same. I don't think we care, so do + // an unordered comparison. + let aset: HashSet = aut_matches.iter().cloned().collect(); + let nset: HashSet = naive_matches.iter().cloned().collect(); + aset == nset + } + quickcheck(prop as fn(Vec, BiasAscii) -> bool); + } +} diff --git a/deps/aho-corasick-0.4.1/src/main.rs b/deps/aho-corasick-0.5.1/src/main.rs similarity index 100% rename from deps/aho-corasick-0.4.1/src/main.rs rename to deps/aho-corasick-0.5.1/src/main.rs diff --git a/deps/aho-corasick-0.4.1/words b/deps/aho-corasick-0.5.1/words similarity index 100% rename from deps/aho-corasick-0.4.1/words rename to deps/aho-corasick-0.5.1/words diff --git a/deps/cmake-0.1.13/Cargo.toml b/deps/cmake-0.1.13/Cargo.toml deleted file mode 100644 index 86d8575a0..000000000 --- a/deps/cmake-0.1.13/Cargo.toml +++ /dev/null @@ -1,17 +0,0 @@ -[package] - -name = "cmake" -version = "0.1.13" -authors = ["Alex Crichton "] -license = "MIT/Apache-2.0" -readme = "README.md" -keywords = ["build-dependencies"] -repository = "https://github.com/alexcrichton/cmake-rs" -homepage = "https://github.com/alexcrichton/cmake-rs" -documentation = "http://alexcrichton.com/cmake-rs" -description = """ -A build dependency for running `cmake` to build a native library -""" - -[dependencies] -gcc = "0.3.17" diff --git a/deps/cmake-0.1.13/src/lib.rs b/deps/cmake-0.1.13/src/lib.rs deleted file mode 100644 index 83f2a53da..000000000 --- a/deps/cmake-0.1.13/src/lib.rs +++ /dev/null @@ -1,447 +0,0 @@ -//! A build dependency for running `cmake` to build a native library -//! -//! This crate provides some necessary boilerplate and shim support for running -//! the system `cmake` command to build a native library. It will add -//! appropriate cflags for building code to link into Rust, handle cross -//! compilation, and use the necessary generator for the platform being -//! targeted. -//! -//! The builder-style configuration allows for various variables and such to be -//! passed down into the build as well. -//! -//! ## Installation -//! -//! Add this to your `Cargo.toml`: -//! -//! ```toml -//! [build-dependencies] -//! cmake = "0.1" -//! ``` -//! -//! ## Examples -//! -//! ```no_run -//! use cmake; -//! -//! // Builds the project in the directory located in `libfoo`, installing it -//! // into $OUT_DIR -//! let dst = cmake::build("libfoo"); -//! -//! println!("cargo:rustc-link-search=native={}", dst.display()); -//! println!("cargo:rustc-link-lib=static=foo"); -//! ``` -//! -//! ```no_run -//! use cmake::Config; -//! -//! let dst = Config::new("libfoo") -//! .define("FOO", "BAR") -//! .cflag("-foo") -//! .build(); -//! println!("cargo:rustc-link-search=native={}", dst.display()); -//! println!("cargo:rustc-link-lib=static=foo"); -//! ``` - -#![deny(missing_docs)] - -extern crate gcc; - -use std::env; -use std::ffi::{OsString, OsStr}; -use std::fs::{self, File}; -use std::io::ErrorKind; -use std::io::prelude::*; -use std::path::{Path, PathBuf}; -use std::process::Command; - -/// Builder style configuration for a pending CMake build. -pub struct Config { - path: PathBuf, - cflags: OsString, - defines: Vec<(OsString, OsString)>, - deps: Vec, - target: Option, - host: Option, - out_dir: Option, - profile: Option, - build_args: Vec, - cmake_target: Option, -} - -/// Builds the native library rooted at `path` with the default cmake options. -/// This will return the directory in which the library was installed. -/// -/// # Examples -/// -/// ```no_run -/// use cmake; -/// -/// // Builds the project in the directory located in `libfoo`, installing it -/// // into $OUT_DIR -/// let dst = cmake::build("libfoo"); -/// -/// println!("cargo:rustc-link-search=native={}", dst.display()); -/// println!("cargo:rustc-link-lib=static=foo"); -/// ``` -/// -pub fn build>(path: P) -> PathBuf { - Config::new(path.as_ref()).build() -} - -impl Config { - /// Creates a new blank set of configuration to build the project specified - /// at the path `path`. - pub fn new>(path: P) -> Config { - Config { - path: env::current_dir().unwrap().join(path), - cflags: OsString::new(), - defines: Vec::new(), - deps: Vec::new(), - profile: None, - out_dir: None, - target: None, - host: None, - build_args: Vec::new(), - cmake_target: None, - } - } - - /// Adds a custom flag to pass down to the compiler, supplementing those - /// that this library already passes. - pub fn cflag>(&mut self, flag: P) -> &mut Config { - self.cflags.push(" "); - self.cflags.push(flag.as_ref()); - self - } - - /// Adds a new `-D` flag to pass to cmake during the generation step. - pub fn define(&mut self, k: K, v: V) -> &mut Config - where K: AsRef, V: AsRef - { - self.defines.push((k.as_ref().to_owned(), v.as_ref().to_owned())); - self - } - - /// Registers a dependency for this compilation on the native library built - /// by Cargo previously. - /// - /// This registration will modify the `CMAKE_PREFIX_PATH` environment - /// variable for the build system generation step. - pub fn register_dep(&mut self, dep: &str) -> &mut Config { - self.deps.push(dep.to_string()); - self - } - - /// Sets the target triple for this compilation. - /// - /// This is automatically scraped from `$TARGET` which is set for Cargo - /// build scripts so it's not necessary to call this from a build script. - pub fn target(&mut self, target: &str) -> &mut Config { - self.target = Some(target.to_string()); - self - } - - /// Sets the host triple for this compilation. - /// - /// This is automatically scraped from `$HOST` which is set for Cargo - /// build scripts so it's not necessary to call this from a build script. - pub fn host(&mut self, host: &str) -> &mut Config { - self.host = Some(host.to_string()); - self - } - - /// Sets the output directory for this compilation. - /// - /// This is automatically scraped from `$OUT_DIR` which is set for Cargo - /// build scripts so it's not necessary to call this from a build script. - pub fn out_dir>(&mut self, out: P) -> &mut Config { - self.out_dir = Some(out.as_ref().to_path_buf()); - self - } - - /// Sets the profile for this compilation. - /// - /// This is automatically scraped from `$PROFILE` which is set for Cargo - /// build scripts so it's not necessary to call this from a build script. - pub fn profile(&mut self, profile: &str) -> &mut Config { - self.profile = Some(profile.to_string()); - self - } - - /// Add an argument to the final `cmake` build step - pub fn build_arg>(&mut self, arg: A) -> &mut Config { - self.build_args.push(arg.as_ref().to_owned()); - self - } - - /// Sets the build target for the final `cmake` build step, this will - /// default to "install" if not specified. - pub fn build_target(&mut self, target: &str) -> &mut Config { - self.cmake_target = Some(target.to_string()); - self - } - - /// Run this configuration, compiling the library with all the configured - /// options. - /// - /// This will run both the build system generator command as well as the - /// command to build the library. - pub fn build(&mut self) -> PathBuf { - let target = self.target.clone().unwrap_or_else(|| { - getenv_unwrap("TARGET") - }); - let host = self.host.clone().unwrap_or_else(|| { - getenv_unwrap("HOST") - }); - let msvc = target.contains("msvc"); - let c_compiler = gcc::Config::new().cargo_metadata(false) - .opt_level(0) - .debug(false) - .target(&target) - .host(&host) - .get_compiler(); - let cxx_compiler = gcc::Config::new().cargo_metadata(false) - .cpp(true) - .opt_level(0) - .debug(false) - .target(&target) - .host(&host) - .get_compiler(); - - let dst = self.out_dir.clone().unwrap_or_else(|| { - PathBuf::from(getenv_unwrap("OUT_DIR")) - }); - let build = dst.join("build"); - self.maybe_clear(&build); - let _ = fs::create_dir(&build); - - // Add all our dependencies to our cmake paths - let mut cmake_prefix_path = Vec::new(); - for dep in &self.deps { - if let Some(root) = env::var_os(&format!("DEP_{}_ROOT", dep)) { - cmake_prefix_path.push(PathBuf::from(root)); - } - } - let system_prefix = env::var_os("CMAKE_PREFIX_PATH") - .unwrap_or(OsString::new()); - cmake_prefix_path.extend(env::split_paths(&system_prefix) - .map(|s| s.to_owned())); - let cmake_prefix_path = env::join_paths(&cmake_prefix_path).unwrap(); - - // Build up the first cmake command to build the build system. - let mut cmd = Command::new("cmake"); - cmd.arg(&self.path) - .current_dir(&build); - if target.contains("windows-gnu") { - if host.contains("windows") { - // On MinGW we need to coerce cmake to not generate a visual - // studio build system but instead use makefiles that MinGW can - // use to build. - cmd.arg("-G").arg("MSYS Makefiles"); - } else { - // If we're cross compiling onto windows, then set some - // variables which will hopefully get things to succeed. Some - // systems may need the `windres` or `dlltool` variables set, so - // set them if possible. - if !self.defined("CMAKE_SYSTEM_NAME") { - cmd.arg("-DCMAKE_SYSTEM_NAME=Windows"); - } - if !self.defined("CMAKE_RC_COMPILER") { - let exe = find_exe(c_compiler.path()); - if let Some(name) = exe.file_name().unwrap().to_str() { - let name = name.replace("gcc", "windres"); - let windres = exe.with_file_name(name); - if windres.is_file() { - let mut arg = OsString::from("-DCMAKE_RC_COMPILER="); - arg.push(&windres); - cmd.arg(arg); - } - } - } - } - } else if msvc { - // If we're on MSVC we need to be sure to use the right generator or - // otherwise we won't get 32/64 bit correct automatically. - cmd.arg("-G").arg(self.visual_studio_generator(&target)); - } - let profile = self.profile.clone().unwrap_or_else(|| { - match &getenv_unwrap("PROFILE")[..] { - "bench" | "release" => "Release", - // currently we need to always use the same CRT for MSVC - _ if msvc => "Release", - _ => "Debug", - }.to_string() - }); - for &(ref k, ref v) in &self.defines { - let mut os = OsString::from("-D"); - os.push(k); - os.push("="); - os.push(v); - cmd.arg(os); - } - - if !self.defined("CMAKE_INSTALL_PREFIX") { - let mut dstflag = OsString::from("-DCMAKE_INSTALL_PREFIX="); - dstflag.push(&dst); - cmd.arg(dstflag); - } - - { - let mut set_compiler = |kind: &str, - compiler: &gcc::Tool, - extra: &OsString| { - let flag_var = format!("CMAKE_{}_FLAGS", kind); - let tool_var = format!("CMAKE_{}_COMPILER", kind); - if !self.defined(&flag_var) { - let mut flagsflag = OsString::from("-D"); - flagsflag.push(&flag_var); - flagsflag.push("="); - flagsflag.push(extra); - for arg in compiler.args() { - flagsflag.push(" "); - flagsflag.push(arg); - } - cmd.arg(flagsflag); - } - - // Apparently cmake likes to have an absolute path to the - // compiler as otherwise it sometimes thinks that this variable - // changed as it thinks the found compiler, /usr/bin/cc, - // differs from the specified compiler, cc. Not entirely sure - // what's up, but at least this means cmake doesn't get - // confused? - // - // Also don't specify this on Windows as it's not needed for - // MSVC and for MinGW it doesn't really vary. - if !self.defined(&tool_var) && env::consts::FAMILY != "windows" { - let mut ccompiler = OsString::from("-D"); - ccompiler.push(&tool_var); - ccompiler.push("="); - ccompiler.push(find_exe(compiler.path())); - cmd.arg(ccompiler); - } - }; - - set_compiler("C", &c_compiler, &self.cflags); - set_compiler("CXX", &cxx_compiler, &OsString::new()); - } - - if !self.defined("CMAKE_BUILD_TYPE") { - cmd.arg(&format!("-DCMAKE_BUILD_TYPE={}", profile)); - } - - run(cmd.env("CMAKE_PREFIX_PATH", cmake_prefix_path), "cmake"); - - let mut parallel_args = Vec::new(); - if fs::metadata(&dst.join("build/Makefile")).is_ok() { - if let Ok(s) = env::var("NUM_JOBS") { - parallel_args.push(format!("-j{}", s)); - } - } - - // And build! - let target = self.cmake_target.clone().unwrap_or("install".to_string()); - run(Command::new("cmake") - .arg("--build").arg(".") - .arg("--target").arg(target) - .arg("--config").arg(profile) - .arg("--").args(&self.build_args) - .args(¶llel_args) - .current_dir(&build), "cmake"); - - println!("cargo:root={}", dst.display()); - return dst - } - - fn visual_studio_generator(&self, target: &str) -> String { - // TODO: need a better way of scraping the VS install... - let candidate = format!("{:?}", gcc::windows_registry::find(target, - "cl.exe")); - let base = if candidate.contains("12.0") { - "Visual Studio 12 2013" - } else if candidate.contains("14.0") { - "Visual Studio 14 2015" - } else { - panic!("couldn't determine visual studio generator") - }; - - if target.contains("i686") { - base.to_string() - } else if target.contains("x86_64") { - format!("{} Win64", base) - } else { - panic!("unsupported msvc target: {}", target); - } - } - - fn defined(&self, var: &str) -> bool { - self.defines.iter().any(|&(ref a, _)| a == var) - } - - // If a cmake project has previously been built (e.g. CMakeCache.txt already - // exists), then cmake will choke if the source directory for the original - // project being built has changed. Detect this situation through the - // `CMAKE_HOME_DIRECTORY` variable that cmake emits and if it doesn't match - // we blow away the build directory and start from scratch (the recommended - // solution apparently [1]). - // - // [1]: https://cmake.org/pipermail/cmake/2012-August/051545.html - fn maybe_clear(&self, dir: &Path) { - let src = match self.path.to_str() { - Some(src) => src, - None => return, - }; - let mut f = match File::open(dir.join("CMakeCache.txt")) { - Ok(f) => f, - Err(..) => return, - }; - let mut u8contents = Vec::new(); - match f.read_to_end(&mut u8contents) { - Ok(f) => f, - Err(..) => return, - }; - let contents = String::from_utf8_lossy(&u8contents); - drop(f); - for line in contents.lines() { - if line.contains("CMAKE_HOME_DIRECTORY") && !line.contains(src) { - println!("detected home dir change, cleaning out entire build \ - directory"); - fs::remove_dir_all(dir).unwrap(); - break - } - } - } -} - -fn run(cmd: &mut Command, program: &str) { - println!("running: {:?}", cmd); - let status = match cmd.status() { - Ok(status) => status, - Err(ref e) if e.kind() == ErrorKind::NotFound => { - fail(&format!("failed to execute command: {}\nis `{}` not installed?", - e, program)); - } - Err(e) => fail(&format!("failed to execute command: {}", e)), - }; - if !status.success() { - fail(&format!("command did not execute successfully, got: {}", status)); - } -} - -fn find_exe(path: &Path) -> PathBuf { - env::split_paths(&env::var_os("PATH").unwrap_or(OsString::new())) - .map(|p| p.join(path)) - .find(|p| fs::metadata(p).is_ok()) - .unwrap_or(path.to_owned()) -} - -fn getenv_unwrap(v: &str) -> String { - match env::var(v) { - Ok(s) => s, - Err(..) => fail(&format!("environment variable `{}` not defined", v)), - } -} - -fn fail(s: &str) -> ! { - panic!("\n{}\n\nbuild script failed, must exit now", s) -} diff --git a/deps/cmake-0.1.13/.gitignore b/deps/cmake-0.1.16/.gitignore similarity index 100% rename from deps/cmake-0.1.13/.gitignore rename to deps/cmake-0.1.16/.gitignore diff --git a/deps/cmake-0.1.13/.travis.yml b/deps/cmake-0.1.16/.travis.yml similarity index 100% rename from deps/cmake-0.1.13/.travis.yml rename to deps/cmake-0.1.16/.travis.yml diff --git a/deps/cmake-0.1.16/Cargo.toml b/deps/cmake-0.1.16/Cargo.toml new file mode 100644 index 000000000..650fc5c83 --- /dev/null +++ b/deps/cmake-0.1.16/Cargo.toml @@ -0,0 +1,17 @@ +[package] + +name = "cmake" +version = "0.1.16" +authors = ["Alex Crichton "] +license = "MIT/Apache-2.0" +readme = "README.md" +keywords = ["build-dependencies"] +repository = "https://github.com/alexcrichton/cmake-rs" +homepage = "https://github.com/alexcrichton/cmake-rs" +documentation = "http://alexcrichton.com/cmake-rs" +description = """ +A build dependency for running `cmake` to build a native library +""" + +[dependencies] +gcc = "0.3.17" diff --git a/deps/cmake-0.1.13/LICENSE-APACHE b/deps/cmake-0.1.16/LICENSE-APACHE similarity index 100% rename from deps/cmake-0.1.13/LICENSE-APACHE rename to deps/cmake-0.1.16/LICENSE-APACHE diff --git a/deps/cmake-0.1.13/LICENSE-MIT b/deps/cmake-0.1.16/LICENSE-MIT similarity index 100% rename from deps/cmake-0.1.13/LICENSE-MIT rename to deps/cmake-0.1.16/LICENSE-MIT diff --git a/deps/cmake-0.1.13/README.md b/deps/cmake-0.1.16/README.md similarity index 100% rename from deps/cmake-0.1.13/README.md rename to deps/cmake-0.1.16/README.md diff --git a/deps/cmake-0.1.16/src/lib.rs b/deps/cmake-0.1.16/src/lib.rs new file mode 100644 index 000000000..37461f024 --- /dev/null +++ b/deps/cmake-0.1.16/src/lib.rs @@ -0,0 +1,449 @@ +//! A build dependency for running `cmake` to build a native library +//! +//! This crate provides some necessary boilerplate and shim support for running +//! the system `cmake` command to build a native library. It will add +//! appropriate cflags for building code to link into Rust, handle cross +//! compilation, and use the necessary generator for the platform being +//! targeted. +//! +//! The builder-style configuration allows for various variables and such to be +//! passed down into the build as well. +//! +//! ## Installation +//! +//! Add this to your `Cargo.toml`: +//! +//! ```toml +//! [build-dependencies] +//! cmake = "0.1" +//! ``` +//! +//! ## Examples +//! +//! ```no_run +//! use cmake; +//! +//! // Builds the project in the directory located in `libfoo`, installing it +//! // into $OUT_DIR +//! let dst = cmake::build("libfoo"); +//! +//! println!("cargo:rustc-link-search=native={}", dst.display()); +//! println!("cargo:rustc-link-lib=static=foo"); +//! ``` +//! +//! ```no_run +//! use cmake::Config; +//! +//! let dst = Config::new("libfoo") +//! .define("FOO", "BAR") +//! .cflag("-foo") +//! .build(); +//! println!("cargo:rustc-link-search=native={}", dst.display()); +//! println!("cargo:rustc-link-lib=static=foo"); +//! ``` + +#![deny(missing_docs)] + +extern crate gcc; + +use std::env; +use std::ffi::{OsString, OsStr}; +use std::fs::{self, File}; +use std::io::ErrorKind; +use std::io::prelude::*; +use std::path::{Path, PathBuf}; +use std::process::Command; + +/// Builder style configuration for a pending CMake build. +pub struct Config { + path: PathBuf, + cflags: OsString, + defines: Vec<(OsString, OsString)>, + deps: Vec, + target: Option, + host: Option, + out_dir: Option, + profile: Option, + build_args: Vec, + cmake_target: Option, +} + +/// Builds the native library rooted at `path` with the default cmake options. +/// This will return the directory in which the library was installed. +/// +/// # Examples +/// +/// ```no_run +/// use cmake; +/// +/// // Builds the project in the directory located in `libfoo`, installing it +/// // into $OUT_DIR +/// let dst = cmake::build("libfoo"); +/// +/// println!("cargo:rustc-link-search=native={}", dst.display()); +/// println!("cargo:rustc-link-lib=static=foo"); +/// ``` +/// +pub fn build>(path: P) -> PathBuf { + Config::new(path.as_ref()).build() +} + +impl Config { + /// Creates a new blank set of configuration to build the project specified + /// at the path `path`. + pub fn new>(path: P) -> Config { + Config { + path: env::current_dir().unwrap().join(path), + cflags: OsString::new(), + defines: Vec::new(), + deps: Vec::new(), + profile: None, + out_dir: None, + target: None, + host: None, + build_args: Vec::new(), + cmake_target: None, + } + } + + /// Adds a custom flag to pass down to the compiler, supplementing those + /// that this library already passes. + pub fn cflag>(&mut self, flag: P) -> &mut Config { + self.cflags.push(" "); + self.cflags.push(flag.as_ref()); + self + } + + /// Adds a new `-D` flag to pass to cmake during the generation step. + pub fn define(&mut self, k: K, v: V) -> &mut Config + where K: AsRef, V: AsRef + { + self.defines.push((k.as_ref().to_owned(), v.as_ref().to_owned())); + self + } + + /// Registers a dependency for this compilation on the native library built + /// by Cargo previously. + /// + /// This registration will modify the `CMAKE_PREFIX_PATH` environment + /// variable for the build system generation step. + pub fn register_dep(&mut self, dep: &str) -> &mut Config { + self.deps.push(dep.to_string()); + self + } + + /// Sets the target triple for this compilation. + /// + /// This is automatically scraped from `$TARGET` which is set for Cargo + /// build scripts so it's not necessary to call this from a build script. + pub fn target(&mut self, target: &str) -> &mut Config { + self.target = Some(target.to_string()); + self + } + + /// Sets the host triple for this compilation. + /// + /// This is automatically scraped from `$HOST` which is set for Cargo + /// build scripts so it's not necessary to call this from a build script. + pub fn host(&mut self, host: &str) -> &mut Config { + self.host = Some(host.to_string()); + self + } + + /// Sets the output directory for this compilation. + /// + /// This is automatically scraped from `$OUT_DIR` which is set for Cargo + /// build scripts so it's not necessary to call this from a build script. + pub fn out_dir>(&mut self, out: P) -> &mut Config { + self.out_dir = Some(out.as_ref().to_path_buf()); + self + } + + /// Sets the profile for this compilation. + /// + /// This is automatically scraped from `$PROFILE` which is set for Cargo + /// build scripts so it's not necessary to call this from a build script. + pub fn profile(&mut self, profile: &str) -> &mut Config { + self.profile = Some(profile.to_string()); + self + } + + /// Add an argument to the final `cmake` build step + pub fn build_arg>(&mut self, arg: A) -> &mut Config { + self.build_args.push(arg.as_ref().to_owned()); + self + } + + /// Sets the build target for the final `cmake` build step, this will + /// default to "install" if not specified. + pub fn build_target(&mut self, target: &str) -> &mut Config { + self.cmake_target = Some(target.to_string()); + self + } + + /// Run this configuration, compiling the library with all the configured + /// options. + /// + /// This will run both the build system generator command as well as the + /// command to build the library. + pub fn build(&mut self) -> PathBuf { + let target = self.target.clone().unwrap_or_else(|| { + getenv_unwrap("TARGET") + }); + let host = self.host.clone().unwrap_or_else(|| { + getenv_unwrap("HOST") + }); + let msvc = target.contains("msvc"); + let c_compiler = gcc::Config::new().cargo_metadata(false) + .opt_level(0) + .debug(false) + .target(&target) + .host(&host) + .get_compiler(); + let cxx_compiler = gcc::Config::new().cargo_metadata(false) + .cpp(true) + .opt_level(0) + .debug(false) + .target(&target) + .host(&host) + .get_compiler(); + + let dst = self.out_dir.clone().unwrap_or_else(|| { + PathBuf::from(getenv_unwrap("OUT_DIR")) + }); + let build = dst.join("build"); + self.maybe_clear(&build); + let _ = fs::create_dir(&build); + + // Add all our dependencies to our cmake paths + let mut cmake_prefix_path = Vec::new(); + for dep in &self.deps { + if let Some(root) = env::var_os(&format!("DEP_{}_ROOT", dep)) { + cmake_prefix_path.push(PathBuf::from(root)); + } + } + let system_prefix = env::var_os("CMAKE_PREFIX_PATH") + .unwrap_or(OsString::new()); + cmake_prefix_path.extend(env::split_paths(&system_prefix) + .map(|s| s.to_owned())); + let cmake_prefix_path = env::join_paths(&cmake_prefix_path).unwrap(); + + // Build up the first cmake command to build the build system. + let mut cmd = Command::new("cmake"); + cmd.arg(&self.path) + .current_dir(&build); + if target.contains("windows-gnu") { + if host.contains("windows") { + // On MinGW we need to coerce cmake to not generate a visual + // studio build system but instead use makefiles that MinGW can + // use to build. + cmd.arg("-G").arg("MSYS Makefiles"); + } else { + // If we're cross compiling onto windows, then set some + // variables which will hopefully get things to succeed. Some + // systems may need the `windres` or `dlltool` variables set, so + // set them if possible. + if !self.defined("CMAKE_SYSTEM_NAME") { + cmd.arg("-DCMAKE_SYSTEM_NAME=Windows"); + } + if !self.defined("CMAKE_RC_COMPILER") { + let exe = find_exe(c_compiler.path()); + if let Some(name) = exe.file_name().unwrap().to_str() { + let name = name.replace("gcc", "windres"); + let windres = exe.with_file_name(name); + if windres.is_file() { + let mut arg = OsString::from("-DCMAKE_RC_COMPILER="); + arg.push(&windres); + cmd.arg(arg); + } + } + } + } + } else if msvc { + // If we're on MSVC we need to be sure to use the right generator or + // otherwise we won't get 32/64 bit correct automatically. + cmd.arg("-G").arg(self.visual_studio_generator(&target)); + } + let profile = self.profile.clone().unwrap_or_else(|| { + match &getenv_unwrap("PROFILE")[..] { + "bench" | "release" => "Release", + // currently we need to always use the same CRT for MSVC + _ if msvc => "Release", + _ => "Debug", + }.to_string() + }); + for &(ref k, ref v) in &self.defines { + let mut os = OsString::from("-D"); + os.push(k); + os.push("="); + os.push(v); + cmd.arg(os); + } + + if !self.defined("CMAKE_INSTALL_PREFIX") { + let mut dstflag = OsString::from("-DCMAKE_INSTALL_PREFIX="); + dstflag.push(&dst); + cmd.arg(dstflag); + } + + { + let mut set_compiler = |kind: &str, + compiler: &gcc::Tool, + extra: &OsString| { + let flag_var = format!("CMAKE_{}_FLAGS", kind); + let tool_var = format!("CMAKE_{}_COMPILER", kind); + if !self.defined(&flag_var) { + let mut flagsflag = OsString::from("-D"); + flagsflag.push(&flag_var); + flagsflag.push("="); + flagsflag.push(extra); + for arg in compiler.args() { + flagsflag.push(" "); + flagsflag.push(arg); + } + cmd.arg(flagsflag); + } + + // Apparently cmake likes to have an absolute path to the + // compiler as otherwise it sometimes thinks that this variable + // changed as it thinks the found compiler, /usr/bin/cc, + // differs from the specified compiler, cc. Not entirely sure + // what's up, but at least this means cmake doesn't get + // confused? + // + // Also don't specify this on Windows as it's not needed for + // MSVC and for MinGW it doesn't really vary. + if !self.defined("CMAKE_TOOLCHAIN_FILE") + && !self.defined(&tool_var) + && env::consts::FAMILY != "windows" { + let mut ccompiler = OsString::from("-D"); + ccompiler.push(&tool_var); + ccompiler.push("="); + ccompiler.push(find_exe(compiler.path())); + cmd.arg(ccompiler); + } + }; + + set_compiler("C", &c_compiler, &self.cflags); + set_compiler("CXX", &cxx_compiler, &OsString::new()); + } + + if !self.defined("CMAKE_BUILD_TYPE") { + cmd.arg(&format!("-DCMAKE_BUILD_TYPE={}", profile)); + } + + run(cmd.env("CMAKE_PREFIX_PATH", cmake_prefix_path), "cmake"); + + let mut parallel_args = Vec::new(); + if fs::metadata(&dst.join("build/Makefile")).is_ok() { + if let Ok(s) = env::var("NUM_JOBS") { + parallel_args.push(format!("-j{}", s)); + } + } + + // And build! + let target = self.cmake_target.clone().unwrap_or("install".to_string()); + run(Command::new("cmake") + .arg("--build").arg(".") + .arg("--target").arg(target) + .arg("--config").arg(profile) + .arg("--").args(&self.build_args) + .args(¶llel_args) + .current_dir(&build), "cmake"); + + println!("cargo:root={}", dst.display()); + return dst + } + + fn visual_studio_generator(&self, target: &str) -> String { + // TODO: need a better way of scraping the VS install... + let candidate = format!("{:?}", gcc::windows_registry::find(target, + "cl.exe")); + let base = if candidate.contains("12.0") { + "Visual Studio 12 2013" + } else if candidate.contains("14.0") { + "Visual Studio 14 2015" + } else { + panic!("couldn't determine visual studio generator") + }; + + if target.contains("i686") { + base.to_string() + } else if target.contains("x86_64") { + format!("{} Win64", base) + } else { + panic!("unsupported msvc target: {}", target); + } + } + + fn defined(&self, var: &str) -> bool { + self.defines.iter().any(|&(ref a, _)| a == var) + } + + // If a cmake project has previously been built (e.g. CMakeCache.txt already + // exists), then cmake will choke if the source directory for the original + // project being built has changed. Detect this situation through the + // `CMAKE_HOME_DIRECTORY` variable that cmake emits and if it doesn't match + // we blow away the build directory and start from scratch (the recommended + // solution apparently [1]). + // + // [1]: https://cmake.org/pipermail/cmake/2012-August/051545.html + fn maybe_clear(&self, dir: &Path) { + let src = match self.path.to_str() { + Some(src) => src, + None => return, + }; + let mut f = match File::open(dir.join("CMakeCache.txt")) { + Ok(f) => f, + Err(..) => return, + }; + let mut u8contents = Vec::new(); + match f.read_to_end(&mut u8contents) { + Ok(f) => f, + Err(..) => return, + }; + let contents = String::from_utf8_lossy(&u8contents); + drop(f); + for line in contents.lines() { + if line.contains("CMAKE_HOME_DIRECTORY") && !line.contains(src) { + println!("detected home dir change, cleaning out entire build \ + directory"); + fs::remove_dir_all(dir).unwrap(); + break + } + } + } +} + +fn run(cmd: &mut Command, program: &str) { + println!("running: {:?}", cmd); + let status = match cmd.status() { + Ok(status) => status, + Err(ref e) if e.kind() == ErrorKind::NotFound => { + fail(&format!("failed to execute command: {}\nis `{}` not installed?", + e, program)); + } + Err(e) => fail(&format!("failed to execute command: {}", e)), + }; + if !status.success() { + fail(&format!("command did not execute successfully, got: {}", status)); + } +} + +fn find_exe(path: &Path) -> PathBuf { + env::split_paths(&env::var_os("PATH").unwrap_or(OsString::new())) + .map(|p| p.join(path)) + .find(|p| fs::metadata(p).is_ok()) + .unwrap_or(path.to_owned()) +} + +fn getenv_unwrap(v: &str) -> String { + match env::var(v) { + Ok(s) => s, + Err(..) => fail(&format!("environment variable `{}` not defined", v)), + } +} + +fn fail(s: &str) -> ! { + panic!("\n{}\n\nbuild script failed, must exit now", s) +} diff --git a/deps/crates-io-0.1.0/Cargo.toml b/deps/crates-io-0.1.0/Cargo.toml deleted file mode 100644 index 70068ec5b..000000000 --- a/deps/crates-io-0.1.0/Cargo.toml +++ /dev/null @@ -1,17 +0,0 @@ -[package] -name = "crates-io" -version = "0.1.0" -authors = ["Alex Crichton "] -license = "MIT/Apache-2.0" -repository = "https://github.com/rust-lang/cargo" -description = """ -Helpers for interacting with crates.io -""" - -[lib] -name = "crates_io" -path = "lib.rs" - -[dependencies] -curl = "0.2" -rustc-serialize = "0.3" diff --git a/deps/crates-io-0.1.0/lib.rs b/deps/crates-io-0.1.0/lib.rs deleted file mode 100644 index 11787a29f..000000000 --- a/deps/crates-io-0.1.0/lib.rs +++ /dev/null @@ -1,268 +0,0 @@ -extern crate curl; -extern crate rustc_serialize; - -use std::collections::HashMap; -use std::fmt; -use std::fs::{self, File}; -use std::io::prelude::*; -use std::io::{self, Cursor}; -use std::path::Path; -use std::result; - -use curl::http; -use curl::http::handle::Method::{Put, Get, Delete}; -use curl::http::handle::{Method, Request}; -use rustc_serialize::json; - -pub struct Registry { - host: String, - token: Option, - handle: http::Handle, -} - -pub type Result = result::Result; - -#[derive(PartialEq, Clone, Copy)] -pub enum Auth { - Authorized, - Unauthorized -} - -pub enum Error { - Curl(curl::ErrCode), - NotOkResponse(http::Response), - NonUtf8Body, - Api(Vec), - Unauthorized, - TokenMissing, - Io(io::Error), -} - -#[derive(RustcDecodable)] -pub struct Crate { - pub name: String, - pub description: Option, - pub max_version: String -} - -#[derive(RustcEncodable)] -pub struct NewCrate { - pub name: String, - pub vers: String, - pub deps: Vec, - pub features: HashMap>, - pub authors: Vec, - pub description: Option, - pub documentation: Option, - pub homepage: Option, - pub readme: Option, - pub keywords: Vec, - pub license: Option, - pub license_file: Option, - pub repository: Option, -} - -#[derive(RustcEncodable)] -pub struct NewCrateDependency { - pub optional: bool, - pub default_features: bool, - pub name: String, - pub features: Vec, - pub version_req: String, - pub target: Option, - pub kind: String, -} - -#[derive(RustcDecodable)] -pub struct User { - pub id: u32, - pub login: String, - pub avatar: String, - pub email: Option, - pub name: Option, -} - -#[derive(RustcDecodable)] struct R { ok: bool } -#[derive(RustcDecodable)] struct ApiErrorList { errors: Vec } -#[derive(RustcDecodable)] struct ApiError { detail: String } -#[derive(RustcEncodable)] struct OwnersReq<'a> { users: &'a [&'a str] } -#[derive(RustcDecodable)] struct Users { users: Vec } -#[derive(RustcDecodable)] struct Crates { crates: Vec } - -impl Registry { - pub fn new(host: String, token: Option) -> Registry { - Registry::new_handle(host, token, http::Handle::new()) - } - - pub fn new_handle(host: String, token: Option, - handle: http::Handle) -> Registry { - Registry { - host: host, - token: token, - handle: handle, - } - } - - pub fn add_owners(&mut self, krate: &str, owners: &[&str]) -> Result<()> { - let body = json::encode(&OwnersReq { users: owners }).unwrap(); - let body = try!(self.put(format!("/crates/{}/owners", krate), - body.as_bytes())); - assert!(json::decode::(&body).unwrap().ok); - Ok(()) - } - - pub fn remove_owners(&mut self, krate: &str, owners: &[&str]) -> Result<()> { - let body = json::encode(&OwnersReq { users: owners }).unwrap(); - let body = try!(self.delete(format!("/crates/{}/owners", krate), - Some(body.as_bytes()))); - assert!(json::decode::(&body).unwrap().ok); - Ok(()) - } - - pub fn list_owners(&mut self, krate: &str) -> Result> { - let body = try!(self.get(format!("/crates/{}/owners", krate))); - Ok(json::decode::(&body).unwrap().users) - } - - pub fn publish(&mut self, krate: &NewCrate, tarball: &Path) -> Result<()> { - let json = json::encode(krate).unwrap(); - // Prepare the body. The format of the upload request is: - // - // - // (metadata for the package) - // - // - let stat = try!(fs::metadata(tarball).map_err(Error::Io)); - let header = { - let mut w = Vec::new(); - w.extend([ - (json.len() >> 0) as u8, - (json.len() >> 8) as u8, - (json.len() >> 16) as u8, - (json.len() >> 24) as u8, - ].iter().map(|x| *x)); - w.extend(json.as_bytes().iter().map(|x| *x)); - w.extend([ - (stat.len() >> 0) as u8, - (stat.len() >> 8) as u8, - (stat.len() >> 16) as u8, - (stat.len() >> 24) as u8, - ].iter().map(|x| *x)); - w - }; - let tarball = try!(File::open(tarball).map_err(Error::Io)); - let size = stat.len() as usize + header.len(); - let mut body = Cursor::new(header).chain(tarball); - - let url = format!("{}/api/v1/crates/new", self.host); - - let token = match self.token.as_ref() { - Some(s) => s, - None => return Err(Error::TokenMissing), - }; - let request = self.handle.put(url, &mut body) - .content_length(size) - .header("Accept", "application/json") - .header("Authorization", &token); - let response = handle(request.exec()); - let _body = try!(response); - Ok(()) - } - - pub fn search(&mut self, query: &str) -> Result> { - let body = try!(self.req(format!("/crates?q={}", query), None, Get, - Auth::Unauthorized)); - - Ok(json::decode::(&body).unwrap().crates) - } - - pub fn yank(&mut self, krate: &str, version: &str) -> Result<()> { - let body = try!(self.delete(format!("/crates/{}/{}/yank", krate, version), - None)); - assert!(json::decode::(&body).unwrap().ok); - Ok(()) - } - - pub fn unyank(&mut self, krate: &str, version: &str) -> Result<()> { - let body = try!(self.put(format!("/crates/{}/{}/unyank", krate, version), - &[])); - assert!(json::decode::(&body).unwrap().ok); - Ok(()) - } - - fn put(&mut self, path: String, b: &[u8]) -> Result { - self.req(path, Some(b), Put, Auth::Authorized) - } - - fn get(&mut self, path: String) -> Result { - self.req(path, None, Get, Auth::Authorized) - } - - fn delete(&mut self, path: String, b: Option<&[u8]>) -> Result { - self.req(path, b, Delete, Auth::Authorized) - } - - fn req(&mut self, path: String, body: Option<&[u8]>, - method: Method, authorized: Auth) -> Result { - let mut req = Request::new(&mut self.handle, method) - .uri(format!("{}/api/v1{}", self.host, path)) - .header("Accept", "application/json") - .content_type("application/json"); - - if authorized == Auth::Authorized { - let token = match self.token.as_ref() { - Some(s) => s, - None => return Err(Error::TokenMissing), - }; - req = req.header("Authorization", &token); - } - match body { - Some(b) => req = req.body(b), - None => {} - } - handle(req.exec()) - } -} - -fn handle(response: result::Result) - -> Result { - let response = try!(response.map_err(Error::Curl)); - match response.get_code() { - 0 => {} // file upload url sometimes - 200 => {} - 403 => return Err(Error::Unauthorized), - _ => return Err(Error::NotOkResponse(response)) - } - - let body = match String::from_utf8(response.move_body()) { - Ok(body) => body, - Err(..) => return Err(Error::NonUtf8Body), - }; - match json::decode::(&body) { - Ok(errors) => { - return Err(Error::Api(errors.errors.into_iter().map(|s| s.detail) - .collect())) - } - Err(..) => {} - } - Ok(body) -} - -impl fmt::Display for Error { - #[allow(deprecated)] // connect => join in 1.3 - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - match *self { - Error::NonUtf8Body => write!(f, "response body was not utf-8"), - Error::Curl(ref err) => write!(f, "http error: {}", err), - Error::NotOkResponse(ref resp) => { - write!(f, "failed to get a 200 OK response: {}", resp) - } - Error::Api(ref errs) => { - write!(f, "api errors: {}", errs.connect(", ")) - } - Error::Unauthorized => write!(f, "unauthorized API access"), - Error::TokenMissing => write!(f, "no upload token found, please run `cargo login`"), - Error::Io(ref e) => write!(f, "io error: {}", e), - } - } -} diff --git a/deps/curl-0.2.16/.travis.yml b/deps/curl-0.2.16/.travis.yml deleted file mode 100644 index a5f8f41d3..000000000 --- a/deps/curl-0.2.16/.travis.yml +++ /dev/null @@ -1,10 +0,0 @@ -language: rust -sudo: false -rust: - - 1.1.0 - -os: - - linux - -script: - - cargo test diff --git a/deps/curl-0.2.16/Cargo.toml b/deps/curl-0.2.16/Cargo.toml deleted file mode 100644 index d92304e82..000000000 --- a/deps/curl-0.2.16/Cargo.toml +++ /dev/null @@ -1,52 +0,0 @@ -[package] - -name = "curl" -version = "0.2.16" -authors = ["Carl Lerche "] -license = "MIT" -repository = "https://github.com/carllerche/curl-rust" -description = "Rust bindings to libcurl for making HTTP requests" - -[dependencies] -url = "0.2.0" -log = "0.3.0" -libc = "0.2" -curl-sys = { path = "curl-sys", version = "0.1.0" } - -[dev-dependencies] -env_logger = "0.3.0" - -# Unix platforms use OpenSSL for now to provide SSL functionality -[target.i686-unknown-linux-gnu.dependencies] -openssl-sys = "0.7.0" -[target.i686-linux-android.dependencies] -openssl-sys = "0.7.0" -[target.x86_64-unknown-linux-gnu.dependencies] -openssl-sys = "0.7.0" -[target.x86_64-unknown-linux-musl.dependencies] -openssl-sys = "0.7.0" -[target.arm-unknown-linux-gnueabihf.dependencies] -openssl-sys = "0.7.0" -[target.arm-linux-androideabi.dependencies] -openssl-sys = "0.7.0" -[target.aarch64-unknown-linux-gnu.dependencies] -openssl-sys = "0.7.0" -[target.powerpc64-unknown-linux-gnu.dependencies] -openssl-sys = "0.7.0" -[target.powerpc64le-unknown-linux-gnu.dependencies] -openssl-sys = "0.7.0" -[target.i686-unknown-freebsd.dependencies] -openssl-sys = "0.7.0" -[target.x86_64-unknown-freebsd.dependencies] -openssl-sys = "0.7.0" -[target.x86_64-unknown-bitrig.dependencies] -openssl-sys = "0.7.0" -[target.x86_64-unknown-openbsd.dependencies] -openssl-sys = "0.7.0" -[target.x86_64-unknown-dragonfly.dependencies] -openssl-sys = "0.7.0" - -[[test]] - -name = "test" -path = "test/test.rs" diff --git a/deps/curl-0.2.16/src/ffi/easy.rs b/deps/curl-0.2.16/src/ffi/easy.rs deleted file mode 100644 index 5a9a3609b..000000000 --- a/deps/curl-0.2.16/src/ffi/easy.rs +++ /dev/null @@ -1,241 +0,0 @@ -#![allow(dead_code)] - -use std::sync::{Once, ONCE_INIT}; -use std::mem; -use std::collections::HashMap; -use std::slice; -use libc::{self, c_int, c_long, c_double, size_t}; -use super::{consts, err, info, opt}; -use super::err::ErrCode; -use http::body::Body; -use http::{header, Response}; - -use curl_ffi as ffi; - -pub type ProgressCb<'a> = FnMut(usize, usize, usize, usize) + 'a; - -pub struct Easy { - curl: *mut ffi::CURL -} - -impl Easy { - pub fn new() -> Easy { - // Ensure that curl is globally initialized - global_init(); - - let handle = unsafe { - let p = ffi::curl_easy_init(); - ffi::curl_easy_setopt(p, opt::NOPROGRESS, 0); - p - }; - - Easy { curl: handle } - } - - #[inline] - pub fn setopt(&mut self, option: opt::Opt, val: T) -> Result<(), err::ErrCode> { - // TODO: Prevent setting callback related options - let mut res = err::ErrCode(err::OK); - - unsafe { - val.with_c_repr(|repr| { - res = err::ErrCode(ffi::curl_easy_setopt(self.curl, option, repr)); - }) - } - - if res.is_success() { Ok(()) } else { Err(res) } - } - - pub fn perform(&mut self, - body: Option<&mut Body>, - progress: Option>) - -> Result { - let mut builder = ResponseBuilder::new(); - - unsafe { - let resp_p: usize = mem::transmute(&builder); - let body_p: usize = match body { - Some(b) => mem::transmute(b), - None => 0 - }; - - let progress_p: usize = match progress.as_ref() { - Some(cb) => mem::transmute(cb), - None => 0 - }; - - // Set callback options - ffi::curl_easy_setopt(self.curl, opt::READFUNCTION, curl_read_fn); - ffi::curl_easy_setopt(self.curl, opt::READDATA, body_p); - - ffi::curl_easy_setopt(self.curl, opt::WRITEFUNCTION, curl_write_fn); - ffi::curl_easy_setopt(self.curl, opt::WRITEDATA, resp_p); - - ffi::curl_easy_setopt(self.curl, opt::HEADERFUNCTION, curl_header_fn); - ffi::curl_easy_setopt(self.curl, opt::HEADERDATA, resp_p); - - ffi::curl_easy_setopt(self.curl, opt::PROGRESSFUNCTION, curl_progress_fn); - ffi::curl_easy_setopt(self.curl, opt::PROGRESSDATA, progress_p); - } - - let err = err::ErrCode(unsafe { ffi::curl_easy_perform(self.curl) }); - - // If the request failed, abort here - if !err.is_success() { - return Err(err); - } - - // Try to get the response code - builder.code = try!(self.get_response_code()); - - Ok(builder.build()) - } - - pub fn get_response_code(&self) -> Result { - Ok(try!(self.get_info_long(info::RESPONSE_CODE)) as u32) - } - - pub fn get_total_time(&self) -> Result { - Ok(try!(self.get_info_long(info::TOTAL_TIME)) as usize) - } - - fn get_info_long(&self, key: info::Key) -> Result { - let v: c_long = 0; - let res = err::ErrCode(unsafe { - ffi::curl_easy_getinfo(self.curl as *const _, key, &v) - }); - - if !res.is_success() { - return Err(res); - } - - Ok(v) - } -} - -#[inline] -fn global_init() { - // Schedule curl to be cleaned up after we're done with this whole process - static INIT: Once = ONCE_INIT; - INIT.call_once(|| unsafe { - assert_eq!(libc::atexit(cleanup), 0); - }); - - extern fn cleanup() { - unsafe { ffi::curl_global_cleanup() } - } -} - -impl Drop for Easy { - fn drop(&mut self) { - unsafe { ffi::curl_easy_cleanup(self.curl) } - } -} - -/* - * - * TODO: Move this into handle - * - */ - -struct ResponseBuilder { - code: u32, - hdrs: HashMap>, - body: Vec -} - -impl ResponseBuilder { - fn new() -> ResponseBuilder { - ResponseBuilder { - code: 0, - hdrs: HashMap::new(), - body: Vec::new() - } - } - - fn add_header(&mut self, name: &str, val: &str) { - // TODO: Reduce allocations - use std::ascii::AsciiExt; - let name = name.to_ascii_lowercase(); - - let inserted = match self.hdrs.get_mut(&name) { - Some(vals) => { - vals.push(val.to_string()); - true - } - None => false - }; - - if !inserted { - self.hdrs.insert(name, vec!(val.to_string())); - } - } - - fn build(self) -> Response { - let ResponseBuilder { code, hdrs, body } = self; - Response::new(code, hdrs, body) - } -} - -/* - * - * ===== Callbacks ===== - */ - -extern fn curl_read_fn(p: *mut u8, size: size_t, nmemb: size_t, - body: *mut Body) -> size_t { - if body.is_null() { - return 0; - } - - let dst = unsafe { slice::from_raw_parts_mut(p, (size * nmemb) as usize) }; - let body = unsafe { &mut *body }; - - match body.read(dst) { - Ok(len) => len as size_t, - Err(_) => consts::CURL_READFUNC_ABORT as size_t, - } -} - -extern fn curl_write_fn(p: *mut u8, size: size_t, nmemb: size_t, - resp: *mut ResponseBuilder) -> size_t { - if !resp.is_null() { - let builder: &mut ResponseBuilder = unsafe { mem::transmute(resp) }; - let chunk = unsafe { slice::from_raw_parts(p as *const u8, - (size * nmemb) as usize) }; - builder.body.extend(chunk.iter().map(|x| *x)); - } - - size * nmemb -} - -extern fn curl_header_fn(p: *mut u8, size: size_t, nmemb: size_t, - resp: &mut ResponseBuilder) -> size_t { - // TODO: Skip the first call (it seems to be the status line) - - let vec = unsafe { slice::from_raw_parts(p as *const u8, - (size * nmemb) as usize) }; - - match header::parse(&vec) { - Some((name, val)) => { - resp.add_header(name, val); - } - None => {} - } - - vec.len() as size_t -} - -pub extern "C" fn curl_progress_fn(cb: *mut Box, dltotal: c_double, dlnow: c_double, ultotal: c_double, ulnow: c_double) -> c_int { - #[inline] - fn to_usize(v: c_double) -> usize { - if v > 0.0 { v as usize } else { 0 } - } - - if !cb.is_null() { - let cb: &mut ProgressCb = unsafe { &mut **cb }; - (*cb)(to_usize(dltotal), to_usize(dlnow), to_usize(ultotal), to_usize(ulnow)); - } - - 0 -} diff --git a/deps/curl-0.2.16/src/http/handle.rs b/deps/curl-0.2.16/src/http/handle.rs deleted file mode 100644 index 93af23e37..000000000 --- a/deps/curl-0.2.16/src/http/handle.rs +++ /dev/null @@ -1,436 +0,0 @@ -use std::collections::hash_map::{HashMap, Entry}; -use std::path::Path; - -use url::Url; - -use ffi::easy::Easy; -use ffi::err; -use ffi::opt; -use ffi; -use http::Response; -use http::body::{Body,ToBody}; -use {ProgressCb,ErrCode}; - -use self::Method::{Get, Head, Post, Put, Patch, Delete}; -use self::BodyType::{Fixed, Chunked}; - -const DEFAULT_TIMEOUT_MS: usize = 30_000; - -pub struct Handle { - easy: Easy, -} - -impl Handle { - pub fn new() -> Handle { - return configure(Handle { easy: Easy::new() } - .timeout(DEFAULT_TIMEOUT_MS) - .connect_timeout(DEFAULT_TIMEOUT_MS)); - - #[cfg(all(unix, not(target_os = "macos")))] - fn configure(mut handle: Handle) -> Handle { - let probe = ::openssl::probe::probe(); - if let Some(ref path) = probe.cert_file { - set_path(&mut handle, opt::CAINFO, path); - } - if let Some(ref path) = probe.cert_dir { - set_path(&mut handle, opt::CAPATH, path); - } - return handle; - - fn set_path(handle: &mut Handle, opt: opt::Opt, path: &Path) { - if let Err(e) = handle.easy.setopt(opt, path) { - if let err::NOT_BUILT_IN = e.code() { - return - } - panic!("failed to set {:?}: {}", opt, e) - } - } - } - - #[cfg(any(not(unix), target_os = "macos"))] - fn configure(handle: Handle) -> Handle { handle } - } - - pub fn timeout(mut self, ms: usize) -> Handle { - self.easy.setopt(opt::TIMEOUT_MS, ms).unwrap(); - self - } - - pub fn connect_timeout(mut self, ms: usize) -> Handle { - self.easy.setopt(opt::CONNECTTIMEOUT_MS, ms).unwrap(); - self - } - - /// Set the time in seconds that the transfer speed should be below - /// the `low_speed_limit` rate of bytes per second for the library to - /// consider it too slow and abort. - /// - /// The default for this option is 0 which means that this option is - /// disabled. - pub fn low_speed_timeout(mut self, seconds: usize) -> Handle { - self.easy.setopt(opt::LOW_SPEED_TIME, seconds).unwrap(); - self - } - - /// Set the average transfer speed in bytes per second that the - /// transfer should be below during `low_speed_timeout` seconds for - /// libcurl to consider it to be too slow and abort. - /// - /// The default for this option is 0 which means that this option is - /// disabled. - pub fn low_speed_limit(mut self, bytes_per_second: usize) -> Handle { - self.easy.setopt(opt::LOW_SPEED_LIMIT, bytes_per_second).unwrap(); - self - } - - pub fn ssl_verifypeer(mut self, value: bool) -> Handle { - self.easy.setopt(opt::SSL_VERIFYPEER, value).unwrap(); - self - } - - pub fn follow_location(mut self, value: isize) -> Handle { - self.easy.setopt(opt::FOLLOWLOCATION, value).unwrap(); - self - } - - pub fn userpwd(mut self, userpwd: &str) -> Handle { - self.easy.setopt(opt::USERPWD, userpwd).unwrap(); - self - } - - pub fn verbose(mut self) -> Handle { - self.easy.setopt(opt::VERBOSE, 1).unwrap(); - self - } - - pub fn proxy(mut self, proxy: U) -> Handle { - proxy.with_url_str(|s| { - self.easy.setopt(opt::PROXY, s).unwrap(); - }); - - self - } - - pub fn ssl_ca_path(mut self, path: &Path) -> Handle { - self.easy.setopt(opt::CAPATH, path).unwrap(); - self - } - - pub fn ssl_ca_info(mut self, path: &Path) -> Handle { - self.easy.setopt(opt::CAINFO, path).unwrap(); - self - } - - pub fn cookie_jar(mut self, path: &Path) -> Handle { - self.easy.setopt(opt::COOKIEJAR, path).unwrap(); - self - } - - pub fn cookie_file(mut self, path: &Path) -> Handle { - self.easy.setopt(opt::COOKIEFILE, path).unwrap(); - self - } - - pub fn cookies(self, path: &Path) -> Handle { - self.cookie_jar(path).cookie_file(path) - } - - pub fn cookie(mut self, cookie: &str) -> Handle { - self.easy.setopt(opt::COOKIELIST, cookie).unwrap(); - self - } - - pub fn get<'a, 'b, U: ToUrl>(&'a mut self, uri: U) -> Request<'a, 'b> { - Request::new(self, Get).uri(uri) - } - - pub fn head<'a, 'b, U: ToUrl>(&'a mut self, uri: U) -> Request<'a, 'b> { - Request::new(self, Head).uri(uri) - } - - pub fn post<'a, 'b, U: ToUrl, B: ToBody<'b>>(&'a mut self, uri: U, body: B) -> Request<'a, 'b> { - Request::new(self, Post).uri(uri).body(body) - } - - pub fn put<'a, 'b, U: ToUrl, B: ToBody<'b>>(&'a mut self, uri: U, body: B) -> Request<'a, 'b> { - Request::new(self, Put).uri(uri).body(body) - } - - pub fn patch<'a, 'b, U: ToUrl, B: ToBody<'b>>(&'a mut self, uri: U, body: B) -> Request<'a, 'b> { - Request::new(self, Patch).uri(uri).body(body) - } - - pub fn delete<'a, 'b, U: ToUrl>(&'a mut self, uri: U) -> Request<'a, 'b> { - Request::new(self, Delete).uri(uri) - } -} - -#[derive(Copy, Clone)] -pub enum Method { - Options, - Get, - Head, - Post, - Put, - Patch, - Delete, - Trace, - Connect -} - -pub struct Request<'a, 'b> { - err: Option, - handle: &'a mut Handle, - method: Method, - headers: HashMap>, - body: Option>, - body_type: Option, - content_type: bool, // whether or not the content type was set - expect_continue: bool, // whether to expect a 100 continue from the server - progress: Option>>, - follow: bool, -} - -enum BodyType { - Fixed(usize), - Chunked, -} - -impl<'a, 'b> Request<'a, 'b> { - pub fn new(handle: &'a mut Handle, method: Method) -> Request<'a, 'b> { - Request { - err: None, - handle: handle, - method: method, - headers: HashMap::new(), - body: None, - body_type: None, - content_type: false, - expect_continue: false, - progress: None, - follow: false, - } - } - - pub fn uri(mut self, uri: U) -> Request<'a, 'b> { - uri.with_url_str(|s| { - match self.handle.easy.setopt(opt::URL, s) { - Ok(_) => {} - Err(e) => self.err = Some(e) - } - }); - - self - } - - pub fn body>(mut self, body: B) -> Request<'a, 'b> { - self.body = Some(body.to_body()); - self - } - - pub fn content_type(mut self, ty: &str) -> Request<'a, 'b> { - if !self.content_type { - self.content_type = true; - append_header(&mut self.headers, "Content-Type", ty); - } - - self - } - - pub fn content_length(mut self, len: usize) -> Request<'a, 'b> { - self.body_type = Some(Fixed(len)); - self - } - - pub fn chunked(mut self) -> Request<'a, 'b> { - self.body_type = Some(Chunked); - self - } - - pub fn expect_continue(mut self) -> Request<'a, 'b> { - self.expect_continue = true; - self - } - - pub fn header(mut self, name: &str, val: &str) -> Request<'a, 'b> { - append_header(&mut self.headers, name, val); - self - } - - pub fn get_header(&self, name: &str) -> Option<&[String]> { - self.headers.get(name).map(|a| &a[..]) - } - - pub fn headers<'c, 'd, I: Iterator>(mut self, hdrs: I) -> Request<'a, 'b> { - for (name, val) in hdrs { - append_header(&mut self.headers, name, val); - } - - self - } - - pub fn progress(mut self, cb: F) -> Request<'a, 'b> - where F: FnMut(usize, usize, usize, usize) + 'b - { - self.progress = Some(Box::new(cb) as Box>); - self - } - - pub fn follow_redirects(mut self, follow: bool) -> Request<'a, 'b> { - self.follow = follow; - self - } - - pub fn exec(self) -> Result { - // Deconstruct the struct - let Request { - err, - handle, - method, - mut headers, - mut body, - body_type, - content_type, - expect_continue, - progress, - follow, - .. - } = self; - - if follow { - try!(handle.easy.setopt(opt::FOLLOWLOCATION, 1)); - } - - match err { - Some(e) => return Err(e), - None => {} - } - - // Clear custom headers set from the previous request - try!(handle.easy.setopt(opt::HTTPHEADER, 0)); - - match method { - Get => try!(handle.easy.setopt(opt::HTTPGET, 1)), - Head => try!(handle.easy.setopt(opt::NOBODY, 1)), - Post => try!(handle.easy.setopt(opt::POST, 1)), - Put => try!(handle.easy.setopt(opt::UPLOAD, 1)), - Patch => { - try!(handle.easy.setopt(opt::CUSTOMREQUEST, "PATCH")); - try!(handle.easy.setopt(opt::UPLOAD, 1)); - }, - Delete => { - if body.is_some() { - try!(handle.easy.setopt(opt::UPLOAD, 1)); - } - - try!(handle.easy.setopt(opt::CUSTOMREQUEST, "DELETE")); - } - _ => unimplemented!() - } - - match body.as_ref() { - None => {} - Some(body) => { - let body_type = body_type.unwrap_or(match body.get_size() { - Some(len) => Fixed(len), - None => Chunked, - }); - - match body_type { - Fixed(len) => { - match method { - Post => try!(handle.easy.setopt(opt::POSTFIELDSIZE, len)), - Put | Patch | Delete => try!(handle.easy.setopt(opt::INFILESIZE, len)), - _ => { - append_header(&mut headers, "Content-Length", - &len.to_string()); - } - } - } - Chunked => { - append_header(&mut headers, "Transfer-Encoding", - "chunked"); - } - - } - - if !content_type { - append_header(&mut headers, "Content-Type", "application/octet-stream"); - } - - if !expect_continue { - append_header(&mut headers, "Expect", ""); - } - } - } - - let mut ffi_headers = ffi::List::new(); - - if !headers.is_empty() { - let mut buf = Vec::new(); - - for (k, v) in headers.iter() { - buf.extend(k.bytes()); - buf.extend(": ".bytes()); - - for v in v.iter() { - buf.extend(v.bytes()); - buf.push(0); - ffi_headers.push_bytes(&buf); - buf.truncate(k.len() + 2); - } - - buf.truncate(0); - } - - try!(handle.easy.setopt(opt::HTTPHEADER, &ffi_headers)); - } - - handle.easy.perform(body.as_mut(), progress) - } -} - -fn append_header(map: &mut HashMap>, key: &str, val: &str) { - match map.entry(key.to_string()) { - Entry::Vacant(entry) => { - let mut values = Vec::new(); - values.push(val.to_string()); - entry.insert(values) - }, - Entry::Occupied(entry) => entry.into_mut() - }; -} - -pub trait ToUrl{ - fn with_url_str(self, f: F) where F: FnOnce(&str); -} - -impl<'a> ToUrl for &'a str { - fn with_url_str(self, f: F) where F: FnOnce(&str) { - f(self); - } -} - -impl<'a> ToUrl for &'a Url { - fn with_url_str(self, f: F) where F: FnOnce(&str) { - self.to_string().with_url_str(f); - } -} - -impl ToUrl for String { - fn with_url_str(self, f: F) where F: FnOnce(&str) { - self[..].with_url_str(f); - } -} - -#[cfg(test)] -mod tests { - use super::Handle; - - #[test] - fn get_header() { - let mut h = Handle::new(); - let r = h.get("/foo").header("foo", "bar"); - assert_eq!(r.get_header("foo"), Some(&["bar".to_string()][..])); - } -} diff --git a/deps/curl-0.2.16/test/server.rs b/deps/curl-0.2.16/test/server.rs deleted file mode 100644 index 699eaff79..000000000 --- a/deps/curl-0.2.16/test/server.rs +++ /dev/null @@ -1,258 +0,0 @@ -use std::collections::HashSet; -use std::io::prelude::*; -use std::iter::repeat; -use std::net::{TcpStream, TcpListener}; -use std::str; -use std::sync::mpsc::{channel, Sender, Receiver}; -use std::thread; - -use self::Op::{SendBytes, ReceiveBytes, Wait, Shutdown}; - -// Global handle to the running test HTTP server -thread_local!(static HANDLE: Handle = start_server()); - -// Setup an op sequence with the test HTTP server -pub fn setup(ops: OpSequence) -> OpSequenceResult { - // Setup a channel to receive the response on - let (tx, rx) = channel(); - - // Send the op sequence to the server task - HANDLE.with(move |h| { - h.send(ops, tx); - }); - - OpSequenceResult::new(rx) -} - -pub fn url(path: &str) -> String { - format!("http://localhost:{}{}", port(), path) -} - -fn port() -> usize { - HANDLE.with(|h| { - h.port() - }) -} - -/* Handle to the running HTTP server task. Communication with the server - * happens over channels. - */ -struct Handle { - port: u16, - tx: Sender<(OpSequence, Sender>)> -} - -/* Operations for the test server to perform: - * - Send some bytes - * - Expect to receive bytes - * - Wait for a certain amount of time - * - Shutdown the server (allows a clean exit at the end of the tests) - */ -#[derive(Clone,PartialEq,Debug)] -pub enum Op { - SendBytes(&'static [u8]), - ReceiveBytes(&'static [u8]), - Wait(usize), - Shutdown -} - -/* An ordered sequence of operations for the HTTP server to perform -*/ -#[derive(Debug)] -pub struct OpSequence { - ops: Vec -} - -/* Represents the completion of the of the op sequence by the HTTP - * server. - */ -pub struct OpSequenceResult { - rx: Receiver> -} - -impl OpSequence { - pub fn new(op: Op) -> OpSequence { - OpSequence { ops: vec!(op) } - } - - pub fn concat(op: Op, seq: OpSequence) -> OpSequence { - let mut ops = vec!(op); - ops.extend(seq.ops.iter().cloned()); - OpSequence { ops: ops } - } - - pub fn is_shutdown(&self) -> bool { - self.ops.len() == 1 && self.ops[0] == Shutdown - } - - pub fn apply(&self, sock: &mut TcpStream, port: usize) - -> Result<(), String> { - for op in self.ops.iter() { - match op { - &SendBytes(b) => { - let b = insert_port(b, port); - match sock.write_all(&b) { - Ok(_) => {} - Err(e) => return Err(e.to_string()) - } - } - &ReceiveBytes(b) => { - let b = insert_port(b, port); - let mut rem = b.len(); - let mut act = repeat(0u8).take(rem).collect::>(); - - while rem > 0 { - match sock.read(&mut act[b.len() - rem..]) { - Ok(i) => rem = rem - i, - Err(e) => { - debug!("aborting due to error; error={}; \ - remaining={}; bytes=\n{}", e, rem, - to_debug_str(&act)); - return Err(e.to_string()) - } - } - } - - debug!("server received bytes; rem={}; bytes=\n{}\n~~~~~~~~~~~~~~", - rem, to_debug_str(&act)); - - let req1 = parse_request(&b); - let req2 = parse_request(&act); - - if req1 != req2 { - return Err(format!( - "received unexpected byte sequence.\n\n\ - Expected:\n{}\n\nReceived:\n{}", - to_debug_str(&b), to_debug_str(&act))); - } - } - &Wait(ms) => thread::sleep_ms(ms as u32), - &Shutdown => { - return Err("Shutdown must be sent on its own".to_string()) - } - } - } - - return Ok(()); - - fn insert_port(bytes: &'static [u8], port: usize) -> Vec { - let s = str::from_utf8(bytes).unwrap(); - let p = port.to_string(); - s.replace("{PORT}", &p).into_bytes() - } - - fn parse_request<'a>(req: &'a [u8]) -> (&'a [u8], - HashSet<&'a [u8]>, - &'a [u8]) { - let mut start = None; - let mut headers = HashSet::new(); - let mut taken = 0; - - for part in req.split(|a| *a == b'\n') { - taken += part.len() + 1; - - if start.is_none() { - start = Some(part); - } else if part.len() == 1 { - break; - } else { - headers.insert(part); - } - } - - if taken > req.len() { - taken = req.len(); - } - - (start.unwrap(), headers, &req[taken..]) - } - } -} - -fn to_debug_str(bytes: &[u8]) -> String { - let mut ret = String::new(); - - for b in bytes.iter() { - let b = *b as char; - - if b >= ' ' && b <= '~' { - ret.push(b); - } - else if b == '\n' { - ret.push_str("\\n\n"); - } - else if b == '\r' { - ret.push_str("\\r"); - } - else { - ret.push('?'); - } - } - - ret -} - -impl Handle { - fn new(tx: Sender<(OpSequence, Sender>)>, port: u16) - -> Handle { - Handle { tx: tx, port: port } - } - - fn send(&self, ops: OpSequence, resp: Sender>) { - self.tx.send((ops, resp)).unwrap(); - } - - fn port(&self) -> usize { - self.port as usize - } -} - -impl Drop for Handle { - fn drop(&mut self) { - let (tx, _) = channel(); - self.send(OpSequence::new(Shutdown), tx); - } -} - -impl OpSequenceResult { - pub fn new(rx: Receiver>) -> OpSequenceResult { - OpSequenceResult { rx: rx } - } - - pub fn assert(&self) { - match self.rx.recv().unwrap() { - Ok(_) => {} - Err(e) => panic!("http exchange did not proceed as expected: {}", e) - } - } -} - -fn start_server() -> Handle { - let (ops_tx, ops_rx) = channel(); - - let srv = TcpListener::bind("127.0.0.1:0").unwrap(); - let port = srv.local_addr().unwrap().port(); - - thread::spawn(move || { - loop { - let (ops, resp_tx): (OpSequence, Sender>) = - ops_rx.recv().unwrap(); - - if ops.is_shutdown() { - return; - } - - let mut sock = match srv.accept() { - Ok(s) => s.0, - Err(e) => { - resp_tx.send(Err(format!("server accept err: {}", e))).unwrap(); - return; - } - }; - - resp_tx.send(ops.apply(&mut sock, port as usize)).unwrap(); - } - }); - - Handle::new(ops_tx, port) -} diff --git a/deps/curl-0.2.16/test/test_head.rs b/deps/curl-0.2.16/test/test_head.rs deleted file mode 100644 index 6d5c770c3..000000000 --- a/deps/curl-0.2.16/test/test_head.rs +++ /dev/null @@ -1,26 +0,0 @@ -use curl::http::handle; -use super::server; - -#[test] -pub fn test_simple_head() { - let srv = server!( - recv!(b"HEAD / HTTP/1.1\r\n\ - Host: localhost:{PORT}\r\n\ - Accept: */*\r\n\ - \r\n"), // Send the data - send!(b"HTTP/1.1 200 OK\r\n\ - Content-Length: 5\r\n\r\n") - ); - - let res = handle() - .head(server::url("/")) - .exec(); - - srv.assert(); - let res = res.unwrap(); - - assert!(res.get_code() == 200, "code is {}", res.get_code()); - assert!(res.get_body() == []); - assert!(res.get_headers().len() == 1); - assert!(res.get_header("content-length") == ["5".to_string()]); -} diff --git a/deps/curl-0.2.16/.gitignore b/deps/curl-0.2.19/.gitignore similarity index 100% rename from deps/curl-0.2.16/.gitignore rename to deps/curl-0.2.19/.gitignore diff --git a/deps/curl-0.2.16/.gitmodules b/deps/curl-0.2.19/.gitmodules similarity index 100% rename from deps/curl-0.2.16/.gitmodules rename to deps/curl-0.2.19/.gitmodules diff --git a/deps/curl-0.2.19/.travis.yml b/deps/curl-0.2.19/.travis.yml new file mode 100644 index 000000000..8927d7706 --- /dev/null +++ b/deps/curl-0.2.19/.travis.yml @@ -0,0 +1,10 @@ +language: rust +sudo: false +rust: + - stable + +os: + - linux + +script: + - cargo test diff --git a/deps/curl-0.2.19/Cargo.toml b/deps/curl-0.2.19/Cargo.toml new file mode 100644 index 000000000..5f6cf8795 --- /dev/null +++ b/deps/curl-0.2.19/Cargo.toml @@ -0,0 +1,61 @@ +[package] + +name = "curl" +version = "0.2.19" +authors = ["Carl Lerche "] +license = "MIT" +repository = "https://github.com/carllerche/curl-rust" +description = "Rust bindings to libcurl for making HTTP requests" + +[dependencies] +url = ">= 0.5, < 2.0" +log = "0.3.0" +libc = "0.2" +curl-sys = { path = "curl-sys", version = "0.1.0" } + +[dev-dependencies] +env_logger = "0.3.0" + +# Unix platforms use OpenSSL for now to provide SSL functionality +[target."cfg(all(unix, not(target_os = \"macos\")))".dependencies] +openssl-sys = "0.7.0" + +[target.i686-unknown-linux-gnu.dependencies] +openssl-sys = "0.7.0" +[target.i586-unknown-linux-gnu.dependencies] +openssl-sys = "0.7.0" +[target.i686-linux-android.dependencies] +openssl-sys = "0.7.0" +[target.x86_64-unknown-linux-gnu.dependencies] +openssl-sys = "0.7.0" +[target.x86_64-unknown-linux-musl.dependencies] +openssl-sys = "0.7.0" +[target.arm-unknown-linux-gnueabihf.dependencies] +openssl-sys = "0.7.0" +[target.armv7-unknown-linux-gnueabihf.dependencies] +openssl-sys = "0.7.0" +[target.arm-linux-androideabi.dependencies] +openssl-sys = "0.7.0" +[target.aarch64-unknown-linux-gnu.dependencies] +openssl-sys = "0.7.0" +[target.powerpc-unknown-linux-gnu.dependencies] +openssl-sys = "0.7.0" +[target.powerpc64-unknown-linux-gnu.dependencies] +openssl-sys = "0.7.0" +[target.powerpc64le-unknown-linux-gnu.dependencies] +openssl-sys = "0.7.0" +[target.i686-unknown-freebsd.dependencies] +openssl-sys = "0.7.0" +[target.x86_64-unknown-freebsd.dependencies] +openssl-sys = "0.7.0" +[target.x86_64-unknown-bitrig.dependencies] +openssl-sys = "0.7.0" +[target.x86_64-unknown-openbsd.dependencies] +openssl-sys = "0.7.0" +[target.x86_64-unknown-dragonfly.dependencies] +openssl-sys = "0.7.0" + +[[test]] + +name = "test" +path = "test/test.rs" diff --git a/deps/curl-0.2.16/LICENSE b/deps/curl-0.2.19/LICENSE similarity index 100% rename from deps/curl-0.2.16/LICENSE rename to deps/curl-0.2.19/LICENSE diff --git a/deps/curl-0.2.16/README.md b/deps/curl-0.2.19/README.md similarity index 100% rename from deps/curl-0.2.16/README.md rename to deps/curl-0.2.19/README.md diff --git a/deps/curl-0.2.16/src/ffi/consts.rs b/deps/curl-0.2.19/src/ffi/consts.rs similarity index 100% rename from deps/curl-0.2.16/src/ffi/consts.rs rename to deps/curl-0.2.19/src/ffi/consts.rs diff --git a/deps/curl-0.2.19/src/ffi/easy.rs b/deps/curl-0.2.19/src/ffi/easy.rs new file mode 100644 index 000000000..1a70ac4f8 --- /dev/null +++ b/deps/curl-0.2.19/src/ffi/easy.rs @@ -0,0 +1,246 @@ +#![allow(dead_code)] + +use std::sync::{Once, ONCE_INIT}; +use std::mem; +use std::collections::HashMap; +use std::slice; +use libc::{self, c_int, c_long, c_double, size_t}; +use super::{consts, err, info, opt}; +use http::body::Body; +use http::{header, Response}; + +use curl_ffi as ffi; + +pub type ProgressCb<'a> = FnMut(usize, usize, usize, usize) + 'a; + +pub struct Easy { + curl: *mut ffi::CURL +} + +impl Easy { + pub fn new() -> Easy { + // Ensure that curl is globally initialized + global_init(); + + let handle = unsafe { + let p = ffi::curl_easy_init(); + ffi::curl_easy_setopt(p, opt::NOPROGRESS, 0); + p + }; + + Easy { curl: handle } + } + + #[inline] + pub fn setopt(&mut self, option: opt::Opt, val: T) -> Result<(), err::ErrCode> { + // TODO: Prevent setting callback related options + let mut res = err::ErrCode(err::OK); + + unsafe { + val.with_c_repr(|repr| { + res = err::ErrCode(ffi::curl_easy_setopt(self.curl, option, repr)); + }) + } + + if res.is_success() { Ok(()) } else { Err(res) } + } + + pub fn perform(&mut self, + body: Option<&mut Body>, + progress: Option>) + -> Result { + let mut builder = ResponseBuilder::new(); + + unsafe { + let resp_p: usize = mem::transmute(&builder); + let body_p: usize = match body { + Some(b) => mem::transmute(b), + None => 0 + }; + + let progress_p: usize = match progress.as_ref() { + Some(cb) => mem::transmute(cb), + None => 0 + }; + + // Set callback options + // + // Use explicit `as` casts to work around rust-lang/rust#32201 + ffi::curl_easy_setopt(self.curl, opt::READFUNCTION, + curl_read_fn as extern fn(_, _, _, _) -> _); + ffi::curl_easy_setopt(self.curl, opt::READDATA, body_p); + + ffi::curl_easy_setopt(self.curl, opt::WRITEFUNCTION, + curl_write_fn as extern fn(_, _, _, _) -> _); + ffi::curl_easy_setopt(self.curl, opt::WRITEDATA, resp_p); + + ffi::curl_easy_setopt(self.curl, opt::HEADERFUNCTION, + curl_header_fn as extern fn(_, _, _, _) -> _); + ffi::curl_easy_setopt(self.curl, opt::HEADERDATA, resp_p); + + ffi::curl_easy_setopt(self.curl, opt::PROGRESSFUNCTION, + curl_progress_fn as extern fn(_, _, _, _, _) -> _); + ffi::curl_easy_setopt(self.curl, opt::PROGRESSDATA, progress_p); + } + + let err = err::ErrCode(unsafe { ffi::curl_easy_perform(self.curl) }); + + // If the request failed, abort here + if !err.is_success() { + return Err(err); + } + + // Try to get the response code + builder.code = try!(self.get_response_code()); + + Ok(builder.build()) + } + + pub fn get_response_code(&self) -> Result { + Ok(try!(self.get_info_long(info::RESPONSE_CODE)) as u32) + } + + pub fn get_total_time(&self) -> Result { + Ok(try!(self.get_info_long(info::TOTAL_TIME)) as usize) + } + + fn get_info_long(&self, key: info::Key) -> Result { + let v: c_long = 0; + let res = err::ErrCode(unsafe { + ffi::curl_easy_getinfo(self.curl as *const _, key, &v) + }); + + if !res.is_success() { + return Err(res); + } + + Ok(v) + } +} + +#[inline] +fn global_init() { + // Schedule curl to be cleaned up after we're done with this whole process + static INIT: Once = ONCE_INIT; + INIT.call_once(|| unsafe { + assert_eq!(libc::atexit(cleanup), 0); + }); + + extern fn cleanup() { + unsafe { ffi::curl_global_cleanup() } + } +} + +impl Drop for Easy { + fn drop(&mut self) { + unsafe { ffi::curl_easy_cleanup(self.curl) } + } +} + +/* + * + * TODO: Move this into handle + * + */ + +struct ResponseBuilder { + code: u32, + hdrs: HashMap>, + body: Vec +} + +impl ResponseBuilder { + fn new() -> ResponseBuilder { + ResponseBuilder { + code: 0, + hdrs: HashMap::new(), + body: Vec::new() + } + } + + fn add_header(&mut self, name: &str, val: &str) { + // TODO: Reduce allocations + use std::ascii::AsciiExt; + let name = name.to_ascii_lowercase(); + + let inserted = match self.hdrs.get_mut(&name) { + Some(vals) => { + vals.push(val.to_string()); + true + } + None => false + }; + + if !inserted { + self.hdrs.insert(name, vec!(val.to_string())); + } + } + + fn build(self) -> Response { + let ResponseBuilder { code, hdrs, body } = self; + Response::new(code, hdrs, body) + } +} + +/* + * + * ===== Callbacks ===== + */ + +extern fn curl_read_fn(p: *mut u8, size: size_t, nmemb: size_t, + body: *mut Body) -> size_t { + if body.is_null() { + return 0; + } + + let dst = unsafe { slice::from_raw_parts_mut(p, (size * nmemb) as usize) }; + let body = unsafe { &mut *body }; + + match body.read(dst) { + Ok(len) => len as size_t, + Err(_) => consts::CURL_READFUNC_ABORT as size_t, + } +} + +extern fn curl_write_fn(p: *mut u8, size: size_t, nmemb: size_t, + resp: *mut ResponseBuilder) -> size_t { + if !resp.is_null() { + let builder: &mut ResponseBuilder = unsafe { mem::transmute(resp) }; + let chunk = unsafe { slice::from_raw_parts(p as *const u8, + (size * nmemb) as usize) }; + builder.body.extend(chunk.iter().map(|x| *x)); + } + + size * nmemb +} + +extern fn curl_header_fn(p: *mut u8, size: size_t, nmemb: size_t, + resp: &mut ResponseBuilder) -> size_t { + // TODO: Skip the first call (it seems to be the status line) + + let vec = unsafe { slice::from_raw_parts(p as *const u8, + (size * nmemb) as usize) }; + + match header::parse(&vec) { + Some((name, val)) => { + resp.add_header(name, val); + } + None => {} + } + + vec.len() as size_t +} + +pub extern "C" fn curl_progress_fn(cb: *mut Box, dltotal: c_double, dlnow: c_double, ultotal: c_double, ulnow: c_double) -> c_int { + #[inline] + fn to_usize(v: c_double) -> usize { + if v > 0.0 { v as usize } else { 0 } + } + + if !cb.is_null() { + let cb: &mut ProgressCb = unsafe { &mut **cb }; + (*cb)(to_usize(dltotal), to_usize(dlnow), to_usize(ultotal), to_usize(ulnow)); + } + + 0 +} diff --git a/deps/curl-0.2.16/src/ffi/err.rs b/deps/curl-0.2.19/src/ffi/err.rs similarity index 100% rename from deps/curl-0.2.16/src/ffi/err.rs rename to deps/curl-0.2.19/src/ffi/err.rs diff --git a/deps/curl-0.2.16/src/ffi/info.rs b/deps/curl-0.2.19/src/ffi/info.rs similarity index 100% rename from deps/curl-0.2.16/src/ffi/info.rs rename to deps/curl-0.2.19/src/ffi/info.rs diff --git a/deps/curl-0.2.16/src/ffi/list.rs b/deps/curl-0.2.19/src/ffi/list.rs similarity index 100% rename from deps/curl-0.2.16/src/ffi/list.rs rename to deps/curl-0.2.19/src/ffi/list.rs diff --git a/deps/curl-0.2.16/src/ffi/mod.rs b/deps/curl-0.2.19/src/ffi/mod.rs similarity index 100% rename from deps/curl-0.2.16/src/ffi/mod.rs rename to deps/curl-0.2.19/src/ffi/mod.rs diff --git a/deps/curl-0.2.16/src/ffi/opt.rs b/deps/curl-0.2.19/src/ffi/opt.rs similarity index 100% rename from deps/curl-0.2.16/src/ffi/opt.rs rename to deps/curl-0.2.19/src/ffi/opt.rs diff --git a/deps/curl-0.2.16/src/ffi/version.rs b/deps/curl-0.2.19/src/ffi/version.rs similarity index 100% rename from deps/curl-0.2.16/src/ffi/version.rs rename to deps/curl-0.2.19/src/ffi/version.rs diff --git a/deps/curl-0.2.16/src/http/body.rs b/deps/curl-0.2.19/src/http/body.rs similarity index 100% rename from deps/curl-0.2.16/src/http/body.rs rename to deps/curl-0.2.19/src/http/body.rs diff --git a/deps/curl-0.2.19/src/http/handle.rs b/deps/curl-0.2.19/src/http/handle.rs new file mode 100644 index 000000000..ac3b8b0bd --- /dev/null +++ b/deps/curl-0.2.19/src/http/handle.rs @@ -0,0 +1,449 @@ +use std::collections::hash_map::{HashMap, Entry}; +use std::path::Path; + +use url::Url; + +use ffi::easy::Easy; +use ffi::err; +use ffi::opt; +use ffi; +use http::Response; +use http::body::{Body,ToBody}; +use {ProgressCb,ErrCode}; + +use self::Method::{Get, Head, Post, Put, Patch, Delete}; +use self::BodyType::{Fixed, Chunked}; + +const DEFAULT_TIMEOUT_MS: usize = 30_000; + +pub struct Handle { + easy: Easy, +} + +impl Handle { + pub fn new() -> Handle { + return configure(Handle { easy: Easy::new() } + .timeout(DEFAULT_TIMEOUT_MS) + .connect_timeout(DEFAULT_TIMEOUT_MS)); + + #[cfg(all(unix, not(target_os = "macos")))] + fn configure(mut handle: Handle) -> Handle { + let probe = ::openssl::probe::probe(); + if let Some(ref path) = probe.cert_file { + set_path(&mut handle, opt::CAINFO, path); + } + if let Some(ref path) = probe.cert_dir { + set_path(&mut handle, opt::CAPATH, path); + } + return handle; + + fn set_path(handle: &mut Handle, opt: opt::Opt, path: &Path) { + if let Err(e) = handle.easy.setopt(opt, path) { + if let err::NOT_BUILT_IN = e.code() { + return + } + panic!("failed to set {:?}: {}", opt, e) + } + } + } + + #[cfg(any(not(unix), target_os = "macos"))] + fn configure(handle: Handle) -> Handle { handle } + } + + pub fn timeout(mut self, ms: usize) -> Handle { + self.easy.setopt(opt::TIMEOUT_MS, ms).unwrap(); + self + } + + pub fn connect_timeout(mut self, ms: usize) -> Handle { + self.easy.setopt(opt::CONNECTTIMEOUT_MS, ms).unwrap(); + self + } + + /// Set the time in seconds that the transfer speed should be below + /// the `low_speed_limit` rate of bytes per second for the library to + /// consider it too slow and abort. + /// + /// The default for this option is 0 which means that this option is + /// disabled. + pub fn low_speed_timeout(mut self, seconds: usize) -> Handle { + self.easy.setopt(opt::LOW_SPEED_TIME, seconds).unwrap(); + self + } + + /// Set the average transfer speed in bytes per second that the + /// transfer should be below during `low_speed_timeout` seconds for + /// libcurl to consider it to be too slow and abort. + /// + /// The default for this option is 0 which means that this option is + /// disabled. + pub fn low_speed_limit(mut self, bytes_per_second: usize) -> Handle { + self.easy.setopt(opt::LOW_SPEED_LIMIT, bytes_per_second).unwrap(); + self + } + + pub fn ssl_verifypeer(mut self, value: bool) -> Handle { + self.easy.setopt(opt::SSL_VERIFYPEER, value).unwrap(); + self + } + + pub fn follow_location(mut self, value: isize) -> Handle { + self.easy.setopt(opt::FOLLOWLOCATION, value).unwrap(); + self + } + + pub fn userpwd(mut self, userpwd: &str) -> Handle { + self.easy.setopt(opt::USERPWD, userpwd).unwrap(); + self + } + + pub fn verbose(mut self) -> Handle { + self.easy.setopt(opt::VERBOSE, 1).unwrap(); + self + } + + pub fn proxy(mut self, proxy: U) -> Handle { + proxy.with_url_str(|s| { + self.easy.setopt(opt::PROXY, s).unwrap(); + }); + + self + } + + pub fn ssl_ca_path(mut self, path: &Path) -> Handle { + self.easy.setopt(opt::CAPATH, path).unwrap(); + self + } + + pub fn ssl_ca_info(mut self, path: &Path) -> Handle { + self.easy.setopt(opt::CAINFO, path).unwrap(); + self + } + + pub fn cookie_jar(mut self, path: &Path) -> Handle { + self.easy.setopt(opt::COOKIEJAR, path).unwrap(); + self + } + + pub fn cookie_file(mut self, path: &Path) -> Handle { + self.easy.setopt(opt::COOKIEFILE, path).unwrap(); + self + } + + pub fn cookies(self, path: &Path) -> Handle { + self.cookie_jar(path).cookie_file(path) + } + + pub fn cookie(mut self, cookie: &str) -> Handle { + self.easy.setopt(opt::COOKIELIST, cookie).unwrap(); + self + } + + pub fn get<'a, 'b, U: ToUrl>(&'a mut self, uri: U) -> Request<'a, 'b> { + Request::new(self, Get).uri(uri) + } + + pub fn head<'a, 'b, U: ToUrl>(&'a mut self, uri: U) -> Request<'a, 'b> { + Request::new(self, Head).uri(uri) + } + + pub fn post<'a, 'b, U: ToUrl, B: ToBody<'b>>(&'a mut self, uri: U, body: B) -> Request<'a, 'b> { + Request::new(self, Post).uri(uri).body(body) + } + + pub fn put<'a, 'b, U: ToUrl, B: ToBody<'b>>(&'a mut self, uri: U, body: B) -> Request<'a, 'b> { + Request::new(self, Put).uri(uri).body(body) + } + + pub fn patch<'a, 'b, U: ToUrl, B: ToBody<'b>>(&'a mut self, uri: U, body: B) -> Request<'a, 'b> { + Request::new(self, Patch).uri(uri).body(body) + } + + pub fn delete<'a, 'b, U: ToUrl>(&'a mut self, uri: U) -> Request<'a, 'b> { + Request::new(self, Delete).uri(uri) + } +} + +#[derive(Copy, Clone)] +pub enum Method { + Options, + Get, + Head, + Post, + Put, + Patch, + Delete, + Trace, + Connect +} + +pub struct Request<'a, 'b> { + err: Option, + handle: &'a mut Handle, + method: Method, + headers: HashMap>, + body: Option>, + body_type: Option, + content_type: bool, // whether or not the content type was set + expect_continue: bool, // whether to expect a 100 continue from the server + progress: Option>>, + follow: bool, +} + +enum BodyType { + Fixed(usize), + Chunked, +} + +impl<'a, 'b> Request<'a, 'b> { + pub fn new(handle: &'a mut Handle, method: Method) -> Request<'a, 'b> { + Request { + err: None, + handle: handle, + method: method, + headers: HashMap::new(), + body: None, + body_type: None, + content_type: false, + expect_continue: false, + progress: None, + follow: false, + } + } + + pub fn uri(mut self, uri: U) -> Request<'a, 'b> { + uri.with_url_str(|s| { + match self.handle.easy.setopt(opt::URL, s) { + Ok(_) => {} + Err(e) => self.err = Some(e) + } + }); + + self + } + + pub fn body>(mut self, body: B) -> Request<'a, 'b> { + self.body = Some(body.to_body()); + self + } + + pub fn content_type(mut self, ty: &str) -> Request<'a, 'b> { + if !self.content_type { + self.content_type = true; + append_header(&mut self.headers, "Content-Type", ty); + } + + self + } + + pub fn content_length(mut self, len: usize) -> Request<'a, 'b> { + self.body_type = Some(Fixed(len)); + self + } + + pub fn chunked(mut self) -> Request<'a, 'b> { + self.body_type = Some(Chunked); + self + } + + pub fn expect_continue(mut self) -> Request<'a, 'b> { + self.expect_continue = true; + self + } + + pub fn header(mut self, name: &str, val: &str) -> Request<'a, 'b> { + append_header(&mut self.headers, name, val); + self + } + + pub fn get_header(&self, name: &str) -> Option<&[String]> { + self.headers.get(name).map(|a| &a[..]) + } + + pub fn headers<'c, 'd, I: Iterator>(mut self, hdrs: I) -> Request<'a, 'b> { + for (name, val) in hdrs { + append_header(&mut self.headers, name, val); + } + + self + } + + pub fn progress(mut self, cb: F) -> Request<'a, 'b> + where F: FnMut(usize, usize, usize, usize) + 'b + { + self.progress = Some(Box::new(cb) as Box>); + self + } + + pub fn follow_redirects(mut self, follow: bool) -> Request<'a, 'b> { + self.follow = follow; + self + } + + pub fn exec(self) -> Result { + // Deconstruct the struct + let Request { + err, + handle, + method, + mut headers, + mut body, + body_type, + content_type, + expect_continue, + progress, + follow, + .. + } = self; + + if follow { + try!(handle.easy.setopt(opt::FOLLOWLOCATION, 1)); + } + + match err { + Some(e) => return Err(e), + None => {} + } + + // Clear custom headers set from the previous request + try!(handle.easy.setopt(opt::HTTPHEADER, 0)); + + match method { + Get => try!(handle.easy.setopt(opt::HTTPGET, 1)), + Head => try!(handle.easy.setopt(opt::NOBODY, 1)), + Post => try!(handle.easy.setopt(opt::POST, 1)), + Put => try!(handle.easy.setopt(opt::UPLOAD, 1)), + Patch => { + try!(handle.easy.setopt(opt::CUSTOMREQUEST, "PATCH")); + try!(handle.easy.setopt(opt::UPLOAD, 1)); + }, + Delete => { + if body.is_some() { + try!(handle.easy.setopt(opt::UPLOAD, 1)); + } + + try!(handle.easy.setopt(opt::CUSTOMREQUEST, "DELETE")); + } + _ => unimplemented!() + } + + match body.as_ref() { + None => {} + Some(body) => { + let body_type = body_type.unwrap_or(match body.get_size() { + Some(len) => Fixed(len), + None => Chunked, + }); + + match body_type { + Fixed(len) => { + match method { + Post => try!(handle.easy.setopt(opt::POSTFIELDSIZE, len)), + Put | Patch | Delete => try!(handle.easy.setopt(opt::INFILESIZE, len)), + _ => { + append_header(&mut headers, "Content-Length", + &len.to_string()); + } + } + } + Chunked => { + append_header(&mut headers, "Transfer-Encoding", + "chunked"); + } + + } + + if !content_type { + append_header(&mut headers, "Content-Type", "application/octet-stream"); + } + + if !expect_continue { + append_header(&mut headers, "Expect", ""); + } + } + } + + let mut ffi_headers = ffi::List::new(); + + if !headers.is_empty() { + let mut buf = Vec::new(); + + for (k, v) in headers.iter() { + buf.extend(k.bytes()); + buf.extend(": ".bytes()); + + for v in v.iter() { + buf.extend(v.bytes()); + buf.push(0); + ffi_headers.push_bytes(&buf); + buf.truncate(k.len() + 2); + } + + buf.truncate(0); + } + + try!(handle.easy.setopt(opt::HTTPHEADER, &ffi_headers)); + } + + // According to libcurl's thread safety docs [1]: + // + // > When using multiple threads you should set the CURLOPT_NOSIGNAL + // > option to 1L for all handles + // + // This library is likely to be used in a multithreaded situation, so + // set this option as such. The implication of this is that timeouts are + // not honored during the DNS lookup phase, but using c-ares can fix + // that and it seems a small price to pay for thread safety! + // + // [1]: http://curl.haxx.se/libcurl/c/threadsafe.html + try!(handle.easy.setopt(opt::NOSIGNAL, 1)); + + handle.easy.perform(body.as_mut(), progress) + } +} + +fn append_header(map: &mut HashMap>, key: &str, val: &str) { + match map.entry(key.to_string()) { + Entry::Vacant(entry) => { + let mut values = Vec::new(); + values.push(val.to_string()); + entry.insert(values) + }, + Entry::Occupied(entry) => entry.into_mut() + }; +} + +pub trait ToUrl{ + fn with_url_str(self, f: F) where F: FnOnce(&str); +} + +impl<'a> ToUrl for &'a str { + fn with_url_str(self, f: F) where F: FnOnce(&str) { + f(self); + } +} + +impl<'a> ToUrl for &'a Url { + fn with_url_str(self, f: F) where F: FnOnce(&str) { + self.to_string().with_url_str(f); + } +} + +impl ToUrl for String { + fn with_url_str(self, f: F) where F: FnOnce(&str) { + self[..].with_url_str(f); + } +} + +#[cfg(test)] +mod tests { + use super::Handle; + + #[test] + fn get_header() { + let mut h = Handle::new(); + let r = h.get("/foo").header("foo", "bar"); + assert_eq!(r.get_header("foo"), Some(&["bar".to_string()][..])); + } +} diff --git a/deps/curl-0.2.16/src/http/header.rs b/deps/curl-0.2.19/src/http/header.rs similarity index 100% rename from deps/curl-0.2.16/src/http/header.rs rename to deps/curl-0.2.19/src/http/header.rs diff --git a/deps/curl-0.2.16/src/http/mod.rs b/deps/curl-0.2.19/src/http/mod.rs similarity index 100% rename from deps/curl-0.2.16/src/http/mod.rs rename to deps/curl-0.2.19/src/http/mod.rs diff --git a/deps/curl-0.2.16/src/http/response.rs b/deps/curl-0.2.19/src/http/response.rs similarity index 100% rename from deps/curl-0.2.16/src/http/response.rs rename to deps/curl-0.2.19/src/http/response.rs diff --git a/deps/curl-0.2.16/src/lib.rs b/deps/curl-0.2.19/src/lib.rs similarity index 100% rename from deps/curl-0.2.16/src/lib.rs rename to deps/curl-0.2.19/src/lib.rs diff --git a/deps/curl-0.2.19/test/server.rs b/deps/curl-0.2.19/test/server.rs new file mode 100644 index 000000000..d8e30a3e4 --- /dev/null +++ b/deps/curl-0.2.19/test/server.rs @@ -0,0 +1,260 @@ +use std::collections::HashSet; +use std::io::prelude::*; +use std::iter::repeat; +use std::net::{TcpStream, TcpListener}; +use std::str; +use std::sync::mpsc::{channel, Sender, Receiver}; +use std::thread; +use std::time::Duration; + +use self::Op::{SendBytes, ReceiveBytes, Wait, Shutdown}; + +// Global handle to the running test HTTP server +thread_local!(static HANDLE: Handle = start_server()); + +// Setup an op sequence with the test HTTP server +pub fn setup(ops: OpSequence) -> OpSequenceResult { + // Setup a channel to receive the response on + let (tx, rx) = channel(); + + // Send the op sequence to the server task + HANDLE.with(move |h| { + h.send(ops, tx); + }); + + OpSequenceResult::new(rx) +} + +pub fn url(path: &str) -> String { + format!("http://localhost:{}{}", port(), path) +} + +fn port() -> usize { + HANDLE.with(|h| { + h.port() + }) +} + +/* Handle to the running HTTP server task. Communication with the server + * happens over channels. + */ +struct Handle { + port: u16, + tx: Sender<(OpSequence, Sender>)> +} + +/* Operations for the test server to perform: + * - Send some bytes + * - Expect to receive bytes + * - Wait for a certain amount of time + * - Shutdown the server (allows a clean exit at the end of the tests) + */ +#[derive(Clone,PartialEq,Debug)] +pub enum Op { + SendBytes(&'static [u8]), + ReceiveBytes(&'static [u8]), + #[allow(dead_code)] + Wait(usize), + Shutdown +} + +/* An ordered sequence of operations for the HTTP server to perform +*/ +#[derive(Debug)] +pub struct OpSequence { + ops: Vec +} + +/* Represents the completion of the of the op sequence by the HTTP + * server. + */ +pub struct OpSequenceResult { + rx: Receiver> +} + +impl OpSequence { + pub fn new(op: Op) -> OpSequence { + OpSequence { ops: vec!(op) } + } + + pub fn concat(op: Op, seq: OpSequence) -> OpSequence { + let mut ops = vec!(op); + ops.extend(seq.ops.iter().cloned()); + OpSequence { ops: ops } + } + + pub fn is_shutdown(&self) -> bool { + self.ops.len() == 1 && self.ops[0] == Shutdown + } + + pub fn apply(&self, sock: &mut TcpStream, port: usize) + -> Result<(), String> { + for op in self.ops.iter() { + match op { + &SendBytes(b) => { + let b = insert_port(b, port); + match sock.write_all(&b) { + Ok(_) => {} + Err(e) => return Err(e.to_string()) + } + } + &ReceiveBytes(b) => { + let b = insert_port(b, port); + let mut rem = b.len(); + let mut act = repeat(0u8).take(rem).collect::>(); + + while rem > 0 { + match sock.read(&mut act[b.len() - rem..]) { + Ok(i) => rem = rem - i, + Err(e) => { + debug!("aborting due to error; error={}; \ + remaining={}; bytes=\n{}", e, rem, + to_debug_str(&act)); + return Err(e.to_string()) + } + } + } + + debug!("server received bytes; rem={}; bytes=\n{}\n~~~~~~~~~~~~~~", + rem, to_debug_str(&act)); + + let req1 = parse_request(&b); + let req2 = parse_request(&act); + + if req1 != req2 { + return Err(format!( + "received unexpected byte sequence.\n\n\ + Expected:\n{}\n\nReceived:\n{}", + to_debug_str(&b), to_debug_str(&act))); + } + } + &Wait(ms) => thread::sleep(Duration::from_millis(ms as u64)), + &Shutdown => { + return Err("Shutdown must be sent on its own".to_string()) + } + } + } + + return Ok(()); + + fn insert_port(bytes: &'static [u8], port: usize) -> Vec { + let s = str::from_utf8(bytes).unwrap(); + let p = port.to_string(); + s.replace("{PORT}", &p).into_bytes() + } + + fn parse_request<'a>(req: &'a [u8]) -> (&'a [u8], + HashSet<&'a [u8]>, + &'a [u8]) { + let mut start = None; + let mut headers = HashSet::new(); + let mut taken = 0; + + for part in req.split(|a| *a == b'\n') { + taken += part.len() + 1; + + if start.is_none() { + start = Some(part); + } else if part.len() == 1 { + break; + } else { + headers.insert(part); + } + } + + if taken > req.len() { + taken = req.len(); + } + + (start.unwrap(), headers, &req[taken..]) + } + } +} + +fn to_debug_str(bytes: &[u8]) -> String { + let mut ret = String::new(); + + for b in bytes.iter() { + let b = *b as char; + + if b >= ' ' && b <= '~' { + ret.push(b); + } + else if b == '\n' { + ret.push_str("\\n\n"); + } + else if b == '\r' { + ret.push_str("\\r"); + } + else { + ret.push('?'); + } + } + + ret +} + +impl Handle { + fn new(tx: Sender<(OpSequence, Sender>)>, port: u16) + -> Handle { + Handle { tx: tx, port: port } + } + + fn send(&self, ops: OpSequence, resp: Sender>) { + self.tx.send((ops, resp)).unwrap(); + } + + fn port(&self) -> usize { + self.port as usize + } +} + +impl Drop for Handle { + fn drop(&mut self) { + let (tx, _) = channel(); + self.send(OpSequence::new(Shutdown), tx); + } +} + +impl OpSequenceResult { + pub fn new(rx: Receiver>) -> OpSequenceResult { + OpSequenceResult { rx: rx } + } + + pub fn assert(&self) { + match self.rx.recv().unwrap() { + Ok(_) => {} + Err(e) => panic!("http exchange did not proceed as expected: {}", e) + } + } +} + +fn start_server() -> Handle { + let (ops_tx, ops_rx) = channel(); + + let srv = TcpListener::bind("127.0.0.1:0").unwrap(); + let port = srv.local_addr().unwrap().port(); + + thread::spawn(move || { + loop { + let (ops, resp_tx): (OpSequence, Sender>) = + ops_rx.recv().unwrap(); + + if ops.is_shutdown() { + return; + } + + let mut sock = match srv.accept() { + Ok(s) => s.0, + Err(e) => { + resp_tx.send(Err(format!("server accept err: {}", e))).unwrap(); + return; + } + }; + + resp_tx.send(ops.apply(&mut sock, port as usize)).unwrap(); + } + }); + + Handle::new(ops_tx, port) +} diff --git a/deps/curl-0.2.16/test/test.rs b/deps/curl-0.2.19/test/test.rs similarity index 100% rename from deps/curl-0.2.16/test/test.rs rename to deps/curl-0.2.19/test/test.rs diff --git a/deps/curl-0.2.16/test/test_delete.rs b/deps/curl-0.2.19/test/test_delete.rs similarity index 100% rename from deps/curl-0.2.16/test/test_delete.rs rename to deps/curl-0.2.19/test/test_delete.rs diff --git a/deps/curl-0.2.16/test/test_get.rs b/deps/curl-0.2.19/test/test_get.rs similarity index 100% rename from deps/curl-0.2.16/test/test_get.rs rename to deps/curl-0.2.19/test/test_get.rs diff --git a/deps/curl-0.2.19/test/test_head.rs b/deps/curl-0.2.19/test/test_head.rs new file mode 100644 index 000000000..a4d33b8de --- /dev/null +++ b/deps/curl-0.2.19/test/test_head.rs @@ -0,0 +1,26 @@ +use curl::http::handle; +use super::server; + +#[test] +pub fn test_simple_head() { + let srv = server!( + recv!(b"HEAD / HTTP/1.1\r\n\ + Host: localhost:{PORT}\r\n\ + Accept: */*\r\n\ + \r\n"), // Send the data + send!(b"HTTP/1.1 200 OK\r\n\ + Content-Length: 5\r\n\r\n") + ); + + let res = handle() + .head(server::url("/")) + .exec(); + + srv.assert(); + let res = res.unwrap(); + + assert!(res.get_code() == 200, "code is {}", res.get_code()); + assert!(res.get_body().len() == 0); + assert!(res.get_headers().len() == 1); + assert!(res.get_header("content-length") == ["5".to_string()]); +} diff --git a/deps/curl-0.2.16/test/test_keep_alive.rs b/deps/curl-0.2.19/test/test_keep_alive.rs similarity index 100% rename from deps/curl-0.2.16/test/test_keep_alive.rs rename to deps/curl-0.2.19/test/test_keep_alive.rs diff --git a/deps/curl-0.2.16/test/test_patch.rs b/deps/curl-0.2.19/test/test_patch.rs similarity index 100% rename from deps/curl-0.2.16/test/test_patch.rs rename to deps/curl-0.2.19/test/test_patch.rs diff --git a/deps/curl-0.2.16/test/test_post.rs b/deps/curl-0.2.19/test/test_post.rs similarity index 100% rename from deps/curl-0.2.16/test/test_post.rs rename to deps/curl-0.2.19/test/test_post.rs diff --git a/deps/curl-0.2.16/test/test_proxy.rs b/deps/curl-0.2.19/test/test_proxy.rs similarity index 100% rename from deps/curl-0.2.16/test/test_proxy.rs rename to deps/curl-0.2.19/test/test_proxy.rs diff --git a/deps/curl-0.2.16/test/test_put.rs b/deps/curl-0.2.19/test/test_put.rs similarity index 100% rename from deps/curl-0.2.16/test/test_put.rs rename to deps/curl-0.2.19/test/test_put.rs diff --git a/deps/curl-sys-0.1.32/Cargo.toml b/deps/curl-sys-0.1.32/Cargo.toml deleted file mode 100644 index 6611fdb14..000000000 --- a/deps/curl-sys-0.1.32/Cargo.toml +++ /dev/null @@ -1,51 +0,0 @@ -[package] -name = "curl-sys" -version = "0.1.32" -authors = ["Carl Lerche (match $e { - Ok(t) => t, - Err(e) => panic!("{} return the error {}", stringify!($e), e), - }) -} - -#[allow(deprecated)] // needed for `connect()`, since Rust 1.1 is supported -fn main() { - let target = env::var("TARGET").unwrap(); - let host = env::var("HOST").unwrap(); - let src = env::current_dir().unwrap(); - let dst = PathBuf::from(env::var_os("OUT_DIR").unwrap()); - let windows = target.contains("windows"); - - // OSX ships libcurl by default, so we just use that version - // unconditionally. - if target.contains("apple") { - return println!("cargo:rustc-flags=-l curl"); - } - - // Next, fall back and try to use pkg-config if its available. - match pkg_config::find_library("libcurl") { - Ok(..) => return, - Err(e) => println!("Couldn't find libcurl from \ - pkgconfig ({:?}), compiling it from source...", e), - } - - println!("cargo:rustc-link-search={}/lib", dst.display()); - println!("cargo:rustc-link-lib=static=curl"); - println!("cargo:root={}", dst.display()); - println!("cargo:include={}/include", dst.display()); - if windows { - println!("cargo:rustc-flags=-l ws2_32"); - } - - // MSVC builds are just totally different - if target.contains("msvc") { - return build_msvc(&target); - } - - let cfg = gcc::Config::new(); - let compiler = cfg.get_compiler(); - - let _ = fs::create_dir(&dst.join("build")); - - let mut cmd = Command::new("sh"); - let mut cflags = OsString::new(); - for arg in compiler.args() { - cflags.push(arg); - cflags.push(" "); - } - cmd.env("CC", compiler.path()) - .env("CFLAGS", cflags) - .env("LD", &which("ld").unwrap()) - .current_dir(&dst.join("build")) - .arg(src.join("curl/configure").to_str().unwrap() - .replace("C:\\", "/c/") - .replace("\\", "/")); - if windows { - cmd.arg("--with-winssl"); - } else { - cmd.arg("--without-ca-bundle"); - cmd.arg("--without-ca-path"); - - if let Ok(s) = env::var("DEP_OPENSSL_ROOT") { - cmd.arg(format!("--with-ssl={}", s)); - } - } - cmd.arg("--enable-static=yes"); - cmd.arg("--enable-shared=no"); - cmd.arg("--enable-optimize"); - cmd.arg(format!("--prefix={}", dst.display())); - - if target != host { - cmd.arg(format!("--host={}", host)); - cmd.arg(format!("--target={}", target)); - } - - cmd.arg("--without-librtmp"); - cmd.arg("--without-libidn"); - cmd.arg("--without-libssh2"); - cmd.arg("--without-nghttp2"); - cmd.arg("--disable-ldap"); - cmd.arg("--disable-ldaps"); - cmd.arg("--disable-ftp"); - cmd.arg("--disable-rtsp"); - cmd.arg("--disable-dict"); - cmd.arg("--disable-telnet"); - cmd.arg("--disable-tftp"); - cmd.arg("--disable-pop3"); - cmd.arg("--disable-imap"); - cmd.arg("--disable-smtp"); - cmd.arg("--disable-gopher"); - cmd.arg("--disable-manual"); - - // Can't run ./configure directly on msys2 b/c we're handing in - // Windows-style paths (those starting with C:\), but it chokes on those. - // For that reason we build up a shell script with paths converted to - // posix versions hopefully... - // - // Also apparently the buildbots choke unless we manually set LD, who knows - // why?! - run(&mut cmd); - run(Command::new(make()) - .arg(&format!("-j{}", env::var("NUM_JOBS").unwrap())) - .current_dir(&dst.join("build"))); - - // Don't run `make install` because apparently it's a little buggy on mingw - // for windows. - let _ = fs::create_dir_all(&dst.join("lib/pkgconfig")); - - // Which one does windows generate? Who knows! - let p1 = dst.join("build/lib/.libs/libcurl.a"); - let p2 = dst.join("build/lib/.libs/libcurl.lib"); - if fs::metadata(&p1).is_ok() { - t!(fs::copy(&p1, &dst.join("lib/libcurl.a"))); - } else { - t!(fs::copy(&p2, &dst.join("lib/libcurl.a"))); - } - t!(fs::copy(&dst.join("build/libcurl.pc"), - &dst.join("lib/pkgconfig/libcurl.pc"))); -} - -fn run(cmd: &mut Command) { - println!("running: {:?}", cmd); - assert!(t!(cmd.status()).success()); -} - -fn make() -> &'static str { - if cfg!(target_os = "freebsd") {"gmake"} else {"make"} -} - -fn which(cmd: &str) -> Option { - let cmd = format!("{}{}", cmd, env::consts::EXE_SUFFIX); - let paths = env::var_os("PATH").unwrap(); - env::split_paths(&paths).map(|p| p.join(&cmd)).find(|p| { - fs::metadata(p).is_ok() - }) -} - -fn build_msvc(target: &str) { - let cmd = gcc::windows_registry::find(target, "nmake.exe"); - let mut cmd = cmd.unwrap_or(Command::new("nmake.exe")); - let src = env::current_dir().unwrap(); - let dst = PathBuf::from(env::var_os("OUT_DIR").unwrap()); - let machine = if target.starts_with("x86_64") { - "x64" - } else if target.starts_with("i686") { - "x86" - } else { - panic!("unknown msvc target: {}", target); - }; - - t!(fs::create_dir_all(dst.join("include/curl"))); - t!(fs::create_dir_all(dst.join("lib"))); - - cmd.current_dir(src.join("curl/winbuild")); - cmd.arg("/f").arg("Makefile.vc") - .arg("MODE=static") - .arg("ENABLE_IDN=yes") - .arg("DEBUG=no") - .arg("GEN_PDB=no") - .arg("ENABLE_WINSSL=yes") - .arg("ENABLE_SSPI=yes") - .arg(format!("MACHINE={}", machine)); - - if let Some(inc) = env::var_os("DEP_Z_ROOT") { - let inc = PathBuf::from(inc); - let mut s = OsString::from("WITH_DEVEL="); - s.push(&inc); - cmd.arg("WITH_ZLIB=static").arg(s); - - // the build system for curl expects this library to be called - // zlib_a.lib, so make sure it's named correctly (where libz-sys just - // produces zlib.lib) - let _ = fs::remove_file(&inc.join("lib/zlib_a.lib")); - t!(fs::hard_link(inc.join("lib/zlib.lib"), inc.join("lib/zlib_a.lib"))); - } - run(&mut cmd); - - let name = format!("libcurl-vc-{}-release-static-zlib-static-\ - ipv6-sspi-winssl", machine); - let libs = src.join("curl/builds").join(name); - - t!(fs::copy(libs.join("lib/libcurl_a.lib"), dst.join("lib/curl.lib"))); - for f in t!(fs::read_dir(libs.join("include/curl"))) { - let path = t!(f).path(); - let dst = dst.join("include/curl").join(path.file_name().unwrap()); - t!(fs::copy(path, dst)); - } - t!(fs::remove_dir_all(src.join("curl/builds"))); - println!("cargo:rustc-link-lib=wldap32"); - println!("cargo:rustc-link-lib=advapi32"); - println!("cargo:rustc-link-lib=normaliz"); -} diff --git a/deps/curl-sys-0.1.34/Cargo.toml b/deps/curl-sys-0.1.34/Cargo.toml new file mode 100644 index 000000000..24bc4fa74 --- /dev/null +++ b/deps/curl-sys-0.1.34/Cargo.toml @@ -0,0 +1,60 @@ +[package] +name = "curl-sys" +version = "0.1.34" +authors = ["Carl Lerche (match $e { + Ok(t) => t, + Err(e) => panic!("{} return the error {}", stringify!($e), e), + }) +} + +#[allow(deprecated)] // needed for `connect()`, since Rust 1.1 is supported +fn main() { + let target = env::var("TARGET").unwrap(); + let host = env::var("HOST").unwrap(); + let src = env::current_dir().unwrap(); + let dst = PathBuf::from(env::var_os("OUT_DIR").unwrap()); + let windows = target.contains("windows"); + + // OSX ships libcurl by default, so we just use that version + // unconditionally. + if target.contains("apple") { + return println!("cargo:rustc-flags=-l curl"); + } + + // Next, fall back and try to use pkg-config if its available. + match pkg_config::find_library("libcurl") { + Ok(..) => return, + Err(e) => println!("Couldn't find libcurl from \ + pkgconfig ({:?}), compiling it from source...", e), + } + + println!("cargo:rustc-link-search={}/lib", dst.display()); + println!("cargo:rustc-link-lib=static=curl"); + println!("cargo:root={}", dst.display()); + println!("cargo:include={}/include", dst.display()); + if windows { + println!("cargo:rustc-flags=-l ws2_32"); + } + + // MSVC builds are just totally different + if target.contains("msvc") { + return build_msvc(&target); + } + + let cfg = gcc::Config::new(); + let compiler = cfg.get_compiler(); + + let _ = fs::create_dir(&dst.join("build")); + + let mut cmd = Command::new("sh"); + let mut cflags = OsString::new(); + for arg in compiler.args() { + cflags.push(arg); + cflags.push(" "); + } + cmd.env("CC", compiler.path()) + .env("CFLAGS", cflags) + .env("LD", &which("ld").unwrap()) + .current_dir(&dst.join("build")) + .arg(src.join("curl/configure").to_str().unwrap() + .replace("C:\\", "/c/") + .replace("\\", "/")); + if windows { + cmd.arg("--with-winssl"); + } else { + cmd.arg("--without-ca-bundle"); + cmd.arg("--without-ca-path"); + + // DEP_OPENSSL_ROOT was what cargo used to use via overrides, and + // OPENSSL_ROOT_DIR is also used by libssh2 which cargo uses and can be + // set by various build scripts. + let openssl_root = env::var("DEP_OPENSSL_ROOT").or_else(|_| { + env::var("OPENSSL_ROOT_DIR") + }); + if let Ok(s) = openssl_root { + cmd.arg(format!("--with-ssl={}", s)); + } + } + cmd.arg("--enable-static=yes"); + cmd.arg("--enable-shared=no"); + cmd.arg("--enable-optimize"); + cmd.arg(format!("--prefix={}", dst.display())); + + if target != host { + cmd.arg(format!("--host={}", host)); + cmd.arg(format!("--target={}", target)); + } + + cmd.arg("--without-librtmp"); + cmd.arg("--without-libidn"); + cmd.arg("--without-libssh2"); + cmd.arg("--without-nghttp2"); + cmd.arg("--disable-ldap"); + cmd.arg("--disable-ldaps"); + cmd.arg("--disable-ftp"); + cmd.arg("--disable-rtsp"); + cmd.arg("--disable-dict"); + cmd.arg("--disable-telnet"); + cmd.arg("--disable-tftp"); + cmd.arg("--disable-pop3"); + cmd.arg("--disable-imap"); + cmd.arg("--disable-smtp"); + cmd.arg("--disable-gopher"); + cmd.arg("--disable-manual"); + + // Can't run ./configure directly on msys2 b/c we're handing in + // Windows-style paths (those starting with C:\), but it chokes on those. + // For that reason we build up a shell script with paths converted to + // posix versions hopefully... + // + // Also apparently the buildbots choke unless we manually set LD, who knows + // why?! + run(&mut cmd); + run(Command::new(make()) + .arg(&format!("-j{}", env::var("NUM_JOBS").unwrap())) + .current_dir(&dst.join("build"))); + + // Don't run `make install` because apparently it's a little buggy on mingw + // for windows. + let _ = fs::create_dir_all(&dst.join("lib/pkgconfig")); + + // Which one does windows generate? Who knows! + let p1 = dst.join("build/lib/.libs/libcurl.a"); + let p2 = dst.join("build/lib/.libs/libcurl.lib"); + if fs::metadata(&p1).is_ok() { + t!(fs::copy(&p1, &dst.join("lib/libcurl.a"))); + } else { + t!(fs::copy(&p2, &dst.join("lib/libcurl.a"))); + } + t!(fs::copy(&dst.join("build/libcurl.pc"), + &dst.join("lib/pkgconfig/libcurl.pc"))); +} + +fn run(cmd: &mut Command) { + println!("running: {:?}", cmd); + assert!(t!(cmd.status()).success()); +} + +fn make() -> &'static str { + if cfg!(target_os = "freebsd") {"gmake"} else {"make"} +} + +fn which(cmd: &str) -> Option { + let cmd = format!("{}{}", cmd, env::consts::EXE_SUFFIX); + let paths = env::var_os("PATH").unwrap(); + env::split_paths(&paths).map(|p| p.join(&cmd)).find(|p| { + fs::metadata(p).is_ok() + }) +} + +fn build_msvc(target: &str) { + let cmd = gcc::windows_registry::find(target, "nmake.exe"); + let mut cmd = cmd.unwrap_or(Command::new("nmake.exe")); + let src = env::current_dir().unwrap(); + let dst = PathBuf::from(env::var_os("OUT_DIR").unwrap()); + let machine = if target.starts_with("x86_64") { + "x64" + } else if target.starts_with("i686") { + "x86" + } else { + panic!("unknown msvc target: {}", target); + }; + + t!(fs::create_dir_all(dst.join("include/curl"))); + t!(fs::create_dir_all(dst.join("lib"))); + + cmd.current_dir(src.join("curl/winbuild")); + cmd.arg("/f").arg("Makefile.vc") + .arg("MODE=static") + .arg("ENABLE_IDN=yes") + .arg("DEBUG=no") + .arg("GEN_PDB=no") + .arg("ENABLE_WINSSL=yes") + .arg("ENABLE_SSPI=yes") + .arg(format!("MACHINE={}", machine)); + + if let Some(inc) = env::var_os("DEP_Z_ROOT") { + let inc = PathBuf::from(inc); + let mut s = OsString::from("WITH_DEVEL="); + s.push(&inc); + cmd.arg("WITH_ZLIB=static").arg(s); + + // the build system for curl expects this library to be called + // zlib_a.lib, so make sure it's named correctly (where libz-sys just + // produces zlib.lib) + let _ = fs::remove_file(&inc.join("lib/zlib_a.lib")); + t!(fs::hard_link(inc.join("lib/zlib.lib"), inc.join("lib/zlib_a.lib"))); + } + run(&mut cmd); + + let name = format!("libcurl-vc-{}-release-static-zlib-static-\ + ipv6-sspi-winssl", machine); + let libs = src.join("curl/builds").join(name); + + t!(fs::copy(libs.join("lib/libcurl_a.lib"), dst.join("lib/curl.lib"))); + for f in t!(fs::read_dir(libs.join("include/curl"))) { + let path = t!(f).path(); + let dst = dst.join("include/curl").join(path.file_name().unwrap()); + t!(fs::copy(path, dst)); + } + t!(fs::remove_dir_all(src.join("curl/builds"))); + println!("cargo:rustc-link-lib=wldap32"); + println!("cargo:rustc-link-lib=advapi32"); + println!("cargo:rustc-link-lib=normaliz"); +} diff --git a/deps/curl-sys-0.1.32/lib.rs b/deps/curl-sys-0.1.34/lib.rs similarity index 100% rename from deps/curl-sys-0.1.32/lib.rs rename to deps/curl-sys-0.1.34/lib.rs diff --git a/deps/fs2-0.2.3/.appveyor.yml b/deps/fs2-0.2.3/.appveyor.yml new file mode 100644 index 000000000..a54c426af --- /dev/null +++ b/deps/fs2-0.2.3/.appveyor.yml @@ -0,0 +1,18 @@ +environment: + matrix: + - TARGET: x86_64-pc-windows-msvc + - TARGET: i686-pc-windows-msvc + - TARGET: x86_64-pc-windows-gnu + - TARGET: i686-pc-windows-gnu + +install: + - ps: Start-FileDownload "https://static.rust-lang.org/dist/rust-nightly-${env:TARGET}.exe" -FileName "rust-nightly.exe" + - ps: .\rust-nightly.exe /VERYSILENT /NORESTART /DIR="C:\rust" | Out-Null + - ps: $env:PATH="$env:PATH;C:\rust\bin" + +build_script: + - cargo build -v + +test_script: + - SET RUST_BACKTRACE=1 + - cargo test -v diff --git a/deps/gcc-0.3.23/.gitignore b/deps/fs2-0.2.3/.gitignore similarity index 100% rename from deps/gcc-0.3.23/.gitignore rename to deps/fs2-0.2.3/.gitignore diff --git a/deps/fs2-0.2.3/.travis.yml b/deps/fs2-0.2.3/.travis.yml new file mode 100644 index 000000000..9a6f0c37d --- /dev/null +++ b/deps/fs2-0.2.3/.travis.yml @@ -0,0 +1,31 @@ +language: rust + +rust: +- 1.1.0 +- nightly + +os: + - linux + - osx + +script: + - cargo build --verbose + + - if [ "$TRAVIS_RUST_VERSION" = "nightly" ]; then + cargo test; + fi + + - if [ "$TRAVIS_RUST_VERSION" = "nightly" ] && \ + [ "$TRAVIS_OS_NAME" = "linux" ] && \ + [ "$TRAVIS_PULL_REQUEST" = "false" ] && \ + [ "$TRAVIS_BRANCH" = "master" ]; then + cargo doc; + pip install ghp-import --user $USER; + $HOME/.local/bin/ghp-import -n target/doc; + git push -qf https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages; + fi + +env: + global: + - TRAVIS_CARGO_NIGHTLY_FEATURE="" + - secure: toeLvfBSzblN5GfKn9YAswkc2oAkwtPDNUir31TxiZ6g6+7TegmOupnbuTLOjr7Y79OffhCXnP4G+9j/apZpjox4tAmYYo620rb09zrpxjU5xxEkmgtf2efmt0Pk5xMMBMfL4iR0HBI1ImbX6lctMhHOjelOvvzxZB+Brxz4ymASmcovbNQpnKEqiNRPQRy7255o43Ktdnb8k6I7uQ7gkjb7Ie6NxTGzChUELZAsrCo5TsN5JEwOlFDRDVGSHVQHXvl1uw3H7PdK8uQFT+7w/wc16l7GGcpYMMJ7guyOScc0eyEnTZIgPn4yEpRWcBUFJ/31Jid9ZnvKCvfp1PbuKcNhRsubMJZfG7K/F47Yq8a4RTHfrdIRR4m8GjjPykelkCbBZIp0DHQa+HCJ7fElBBdauqv5k67UA3jVSkx64sGfm27G7Glr1MC3o9I3kLWl53giqDkwQrgdahHtVhsr66R5eETsQJHB/XxovklLclfCBONaFnzRcgL+7dYC1CMQq+ViEV94ZAL57b68VFOEExCRl02V1wzRzCZHdJbaP6YkU/S9XhWJ/W4oQMk7cstC77w2wTrvKSZyBoMqC9nXpDv10hTCQUapR2/FrKWeshEI5XnlWuzYDho+4V/EoceDHTmHFGFWYTlinCCFbzl/vxJsPPNrYmFF9nUFNx5/6UI= diff --git a/deps/fs2-0.2.3/Cargo.toml b/deps/fs2-0.2.3/Cargo.toml new file mode 100644 index 000000000..80f729446 --- /dev/null +++ b/deps/fs2-0.2.3/Cargo.toml @@ -0,0 +1,17 @@ +[package] +name = "fs2" +version = "0.2.3" +authors = ["Dan Burkert "] +license = "MIT/Apache-2.0" +repository = "https://github.com/danburkert/fs2-rs" +documentation = "https://danburkert.github.io/fs2-rs/fs2/index.html" +description = "Cross-platform file locks and file duplication." +keywords = ["file", "file-system", "lock", "duplicate", "flock"] + +[dependencies] +libc = "0.2.2" +winapi = "0.2" +kernel32-sys = "0.2" + +[dev-dependencies] +tempdir = "0.3" diff --git a/deps/gcc-0.3.23/LICENSE-APACHE b/deps/fs2-0.2.3/LICENSE-APACHE similarity index 100% rename from deps/gcc-0.3.23/LICENSE-APACHE rename to deps/fs2-0.2.3/LICENSE-APACHE diff --git a/deps/fs2-0.2.3/LICENSE-MIT b/deps/fs2-0.2.3/LICENSE-MIT new file mode 100644 index 000000000..e69282e38 --- /dev/null +++ b/deps/fs2-0.2.3/LICENSE-MIT @@ -0,0 +1,25 @@ +Copyright (c) 2015 The Rust Project Developers + +Permission is hereby granted, free of charge, to any +person obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the +Software without restriction, including without +limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software +is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions +of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF +ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED +TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT +SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. diff --git a/deps/fs2-0.2.3/README.md b/deps/fs2-0.2.3/README.md new file mode 100644 index 000000000..30e0981e9 --- /dev/null +++ b/deps/fs2-0.2.3/README.md @@ -0,0 +1,50 @@ +# fs2 + +Extended utilities for working with files and filesystems in Rust. `fs2` +requires Rust stable 1.1 or greater. + +[Documentation](https://danburkert.github.io/fs2-rs/fs2/index.html) + +[![Linux Status](https://travis-ci.org/danburkert/fs2-rs.svg?branch=master)](https://travis-ci.org/danburkert/fs2-rs) +[![Windows Status](https://ci.appveyor.com/api/projects/status/iuvjv1aaaml0rntt/branch/master?svg=true)](https://ci.appveyor.com/project/danburkert/fs2-rs) + +## Features + +- [x] file descriptor duplication. +- [x] file locks. +- [x] file (pre)allocation. +- [x] file allocation information. +- [x] filesystem usage information. + +## Platforms + +`fs2` should work on any platform supported by +[`libc`](https://github.com/rust-lang-nursery/libc#platforms-and-documentation). + +`fs2` is continuously tested on: + * `x86_64-unknown-linux-gnu` (Linux) + * `i686-unknown-linux-gnu` + * `x86_64-apple-darwin` (OSX) + * `i686-apple-darwin` + * `x86_64-pc-windows-msvc` (Windows) + * `i686-pc-windows-msvc` + * `x86_64-pc-windows-gnu` + * `i686-pc-windows-gnu` + +## Benchmarks + +Simple benchmarks are provided for the methods provided. Many of these +benchmarks use files in a temporary directory. On many modern Linux distros the +default temporary directory, `/tmp`, is mounted on a tempfs filesystem, which +will have different performance characteristics than a disk-backed filesystem. +The temporary directory is configurable at runtime through the environment (see +[`env::temp_dir`](https://doc.rust-lang.org/stable/std/env/fn.temp_dir.html)). + +## License + +`fs2` is primarily distributed under the terms of both the MIT license and the +Apache License (Version 2.0). + +See [LICENSE-APACHE](LICENSE-APACHE), [LICENSE-MIT](LICENSE-MIT) for details. + +Copyright (c) 2015 Dan Burkert. diff --git a/deps/fs2-0.2.3/src/lib.rs b/deps/fs2-0.2.3/src/lib.rs new file mode 100644 index 000000000..bd0c31feb --- /dev/null +++ b/deps/fs2-0.2.3/src/lib.rs @@ -0,0 +1,407 @@ +#![cfg_attr(test, feature(test))] +#![deny(warnings)] + +#[cfg(unix)] +mod unix; +#[cfg(unix)] +use unix as sys; + +#[cfg(windows)] +mod windows; +#[cfg(windows)] +use windows as sys; + +use std::fs::File; +use std::io::{Error, Result}; +use std::path::Path; + +/// Extension trait for `File` providing duplication and locking methods. +/// +/// ## Notes on File Locks +/// +/// This library provides whole-file locks in both shared (read) and exclusive +/// (read-write) varieties. +/// +/// File locks are a cross-platform hazard since the file lock APIs exposed by +/// operating system kernels vary in subtle and not-so-subtle ways. +/// +/// The API exposed by this library can be safely used across platforms as long +/// as the following rules are followed: +/// +/// * Multiple locks should not be created on an individual `File` instance +/// concurrently. +/// * Duplicated files should not be locked without great care. +/// * Files to be locked should be opened with at least read or write +/// permissions. +/// * File locks may only be relied upon to be advisory. +/// +/// See the tests in `lib.rs` for cross-platform lock behavior that may be +/// relied upon; see the tests in `unix.rs` and `windows.rs` for examples of +/// platform-specific behavior. File locks are implemented with +/// [`flock(2)`](http://man7.org/linux/man-pages/man2/flock.2.html) on Unix and +/// [`LockFile`](https://msdn.microsoft.com/en-us/library/windows/desktop/aa365202(v=vs.85).aspx) +/// on Windows. +pub trait FileExt { + + /// Returns a duplicate instance of the file. + /// + /// The returned file will share the same file position as the original + /// file. + /// + /// # Notes + /// + /// This is implemented with + /// [`dup(2)`](http://man7.org/linux/man-pages/man2/dup.2.html) on Unix and + /// [`DuplicateHandle`](https://msdn.microsoft.com/en-us/library/windows/desktop/ms724251(v=vs.85).aspx) + /// on Windows. + fn duplicate(&self) -> Result; + + /// Returns the amount of physical space allocated for a file. + fn allocated_size(&self) -> Result; + + /// Ensures that at least `len` bytes of disk space are allocated for the + /// file, and the file size is at least `len` bytes. After a successful call + /// to `allocate`, subsequent writes to the file within the specified length + /// are guaranteed not to fail because of lack of disk space. + fn allocate(&self, len: u64) -> Result<()>; + + /// Locks the file for shared usage, blocking if the file is currently + /// locked exclusively. + fn lock_shared(&self) -> Result<()>; + + /// Locks the file for exclusive usage, blocking if the file is currently + /// locked. + fn lock_exclusive(&self) -> Result<()>; + + /// Locks the file for shared usage, or returns a an error if the file is + /// currently locked (see `lock_contended_error`). + fn try_lock_shared(&self) -> Result<()>; + + /// Locks the file for shared usage, or returns a an error if the file is + /// currently locked (see `lock_contended_error`). + fn try_lock_exclusive(&self) -> Result<()>; + + /// Unlocks the file. + fn unlock(&self) -> Result<()>; +} + +impl FileExt for File { + fn duplicate(&self) -> Result { + sys::duplicate(self) + } + fn allocated_size(&self) -> Result { + sys::allocated_size(self) + } + fn allocate(&self, len: u64) -> Result<()> { + sys::allocate(self, len) + } + fn lock_shared(&self) -> Result<()> { + sys::lock_shared(self) + } + fn lock_exclusive(&self) -> Result<()> { + sys::lock_exclusive(self) + } + fn try_lock_shared(&self) -> Result<()> { + sys::try_lock_shared(self) + } + fn try_lock_exclusive(&self) -> Result<()> { + sys::try_lock_exclusive(self) + } + fn unlock(&self) -> Result<()> { + sys::unlock(self) + } +} + +/// Returns the error that a call to a try lock method on a contended file will +/// return. +pub fn lock_contended_error() -> Error { + sys::lock_error() +} + +/// Returns the number of free bytes in the file system containing the provided +/// path. +pub fn free_space

(path: P) -> Result where P: AsRef { + sys::free_space(path) +} + +/// Returns the available space in bytes to non-priveleged users in the file +/// system containing the provided path. +pub fn available_space

(path: P) -> Result where P: AsRef { + sys::available_space(path) +} + +/// Returns the total space in bytes in the file system containing the provided +/// path. +pub fn total_space

(path: P) -> Result where P: AsRef { + sys::total_space(path) +} + +/// Returns the filesystem's disk space allocation granularity in bytes. +/// The provided path may be for any file in the filesystem. +/// +/// On Posix, this is equivalent to the filesystem's block size. +/// On Windows, this is equivalent to the filesystem's cluster size. +pub fn allocation_granularity

(path: P) -> Result where P: AsRef { + sys::allocation_granularity(path) +} + +#[cfg(test)] +mod test { + + extern crate tempdir; + extern crate test; + + use std::fs; + use super::*; + use std::io::{Read, Seek, SeekFrom, Write}; + + /// Tests file duplication. + #[test] + fn duplicate() { + let tempdir = tempdir::TempDir::new("fs2").unwrap(); + let path = tempdir.path().join("fs2"); + let mut file1 = + fs::OpenOptions::new().read(true).write(true).create(true).open(&path).unwrap(); + let mut file2 = file1.duplicate().unwrap(); + + // Write into the first file and then drop it. + file1.write_all(b"foo").unwrap(); + drop(file1); + + let mut buf = vec![]; + + // Read from the second file; since the position is shared it will already be at EOF. + file2.read_to_end(&mut buf).unwrap(); + assert_eq!(0, buf.len()); + + // Rewind and read. + file2.seek(SeekFrom::Start(0)).unwrap(); + file2.read_to_end(&mut buf).unwrap(); + assert_eq!(&buf, &b"foo"); + } + + /// Tests shared file lock operations. + #[test] + fn lock_shared() { + let tempdir = tempdir::TempDir::new("fs2").unwrap(); + let path = tempdir.path().join("fs2"); + let file1 = fs::OpenOptions::new().read(true).write(true).create(true).open(&path).unwrap(); + let file2 = fs::OpenOptions::new().read(true).write(true).create(true).open(&path).unwrap(); + let file3 = fs::OpenOptions::new().read(true).write(true).create(true).open(&path).unwrap(); + + // Concurrent shared access is OK, but not shared and exclusive. + file1.lock_shared().unwrap(); + file2.lock_shared().unwrap(); + assert_eq!(file3.try_lock_exclusive().unwrap_err().kind(), + lock_contended_error().kind()); + file1.unlock().unwrap(); + assert_eq!(file3.try_lock_exclusive().unwrap_err().kind(), + lock_contended_error().kind()); + + // Once all shared file locks are dropped, an exclusive lock may be created; + file2.unlock().unwrap(); + file3.lock_exclusive().unwrap(); + } + + /// Tests exclusive file lock operations. + #[test] + fn lock_exclusive() { + let tempdir = tempdir::TempDir::new("fs2").unwrap(); + let path = tempdir.path().join("fs2"); + let file1 = fs::OpenOptions::new().read(true).write(true).create(true).open(&path).unwrap(); + let file2 = fs::OpenOptions::new().read(true).write(true).create(true).open(&path).unwrap(); + + // No other access is possible once an exclusive lock is created. + file1.lock_exclusive().unwrap(); + assert_eq!(file2.try_lock_exclusive().unwrap_err().kind(), + lock_contended_error().kind()); + assert_eq!(file2.try_lock_shared().unwrap_err().kind(), + lock_contended_error().kind()); + + // Once the exclusive lock is dropped, the second file is able to create a lock. + file1.unlock().unwrap(); + file2.lock_exclusive().unwrap(); + } + + /// Tests that a lock is released after the file that owns it is dropped. + #[test] + fn lock_cleanup() { + let tempdir = tempdir::TempDir::new("fs2").unwrap(); + let path = tempdir.path().join("fs2"); + let file1 = fs::OpenOptions::new().read(true).write(true).create(true).open(&path).unwrap(); + let file2 = fs::OpenOptions::new().read(true).write(true).create(true).open(&path).unwrap(); + + file1.lock_exclusive().unwrap(); + assert_eq!(file2.try_lock_shared().unwrap_err().kind(), + lock_contended_error().kind()); + + // Drop file1; the lock should be released. + drop(file1); + file2.lock_shared().unwrap(); + } + + /// Tests file allocation. + #[test] + fn allocate() { + let tempdir = tempdir::TempDir::new("fs2").unwrap(); + let path = tempdir.path().join("fs2"); + let file = fs::OpenOptions::new().write(true).create(true).open(&path).unwrap(); + let blksize = allocation_granularity(&path).unwrap(); + + // New files are created with no allocated size. + assert_eq!(0, file.allocated_size().unwrap()); + assert_eq!(0, file.metadata().unwrap().len()); + + // Allocate space for the file, checking that the allocated size steps + // up by block size, and the file length matches the allocated size. + + file.allocate(2 * blksize - 1).unwrap(); + assert_eq!(2 * blksize, file.allocated_size().unwrap()); + assert_eq!(2 * blksize - 1, file.metadata().unwrap().len()); + + // Truncate the file, checking that the allocated size steps down by + // block size. + + file.set_len(blksize + 1).unwrap(); + assert_eq!(2 * blksize, file.allocated_size().unwrap()); + assert_eq!(blksize + 1, file.metadata().unwrap().len()); + } + + /// Checks filesystem space methods. + #[test] + fn filesystem_space() { + let tempdir = tempdir::TempDir::new("fs2").unwrap(); + let total_space = total_space(&tempdir.path()).unwrap(); + let free_space = free_space(&tempdir.path()).unwrap(); + let available_space = available_space(&tempdir.path()).unwrap(); + + assert!(total_space > free_space); + assert!(total_space > available_space); + assert!(available_space <= free_space); + } + + /// Benchmarks creating and removing a file. This is a baseline benchmark + /// for comparing against the truncate and allocate benchmarks. + #[bench] + fn bench_file_create(b: &mut test::Bencher) { + let tempdir = tempdir::TempDir::new("fs2").unwrap(); + let path = tempdir.path().join("file"); + + b.iter(|| { + fs::OpenOptions::new() + .read(true) + .write(true) + .create(true) + .open(&path) + .unwrap(); + fs::remove_file(&path).unwrap(); + }); + } + + /// Benchmarks creating a file, truncating it to 32MiB, and deleting it. + #[bench] + fn bench_file_truncate(b: &mut test::Bencher) { + let size = 32 * 1024 * 1024; + let tempdir = tempdir::TempDir::new("fs2").unwrap(); + let path = tempdir.path().join("file"); + + b.iter(|| { + let file = fs::OpenOptions::new() + .read(true) + .write(true) + .create(true) + .open(&path) + .unwrap(); + file.set_len(size).unwrap(); + fs::remove_file(&path).unwrap(); + }); + } + + /// Benchmarks creating a file, allocating 32MiB for it, and deleting it. + #[bench] + fn bench_file_allocate(b: &mut test::Bencher) { + let size = 32 * 1024 * 1024; + let tempdir = tempdir::TempDir::new("fs2").unwrap(); + let path = tempdir.path().join("file"); + + b.iter(|| { + let file = fs::OpenOptions::new() + .read(true) + .write(true) + .create(true) + .open(&path) + .unwrap(); + file.allocate(size).unwrap(); + fs::remove_file(&path).unwrap(); + }); + } + + /// Benchmarks creating a file, allocating 32MiB for it, and deleting it. + #[bench] + fn bench_allocated_size(b: &mut test::Bencher) { + let size = 32 * 1024 * 1024; + let tempdir = tempdir::TempDir::new("fs2").unwrap(); + let path = tempdir.path().join("file"); + let file = fs::OpenOptions::new() + .read(true) + .write(true) + .create(true) + .open(&path) + .unwrap(); + file.allocate(size).unwrap(); + + b.iter(|| { + file.allocated_size().unwrap(); + }); + } + + /// Benchmarks duplicating a file descriptor or handle. + #[bench] + fn bench_duplicate(b: &mut test::Bencher) { + let tempdir = tempdir::TempDir::new("fs2").unwrap(); + let path = tempdir.path().join("fs2"); + let file = fs::OpenOptions::new().read(true).write(true).create(true).open(&path).unwrap(); + + b.iter(|| test::black_box(file.duplicate().unwrap())); + } + + /// Benchmarks locking and unlocking a file lock. + #[bench] + fn bench_lock_unlock(b: &mut test::Bencher) { + let tempdir = tempdir::TempDir::new("fs2").unwrap(); + let path = tempdir.path().join("fs2"); + let file = fs::OpenOptions::new().read(true).write(true).create(true).open(&path).unwrap(); + + b.iter(|| { + file.lock_exclusive().unwrap(); + file.unlock().unwrap(); + }); + } + + /// Benchmarks the free space method. + #[bench] + fn bench_free_space(b: &mut test::Bencher) { + let tempdir = tempdir::TempDir::new("fs2").unwrap(); + b.iter(|| { + test::black_box(free_space(&tempdir.path()).unwrap()); + }); + } + + /// Benchmarks the available space method. + #[bench] + fn bench_available_space(b: &mut test::Bencher) { + let tempdir = tempdir::TempDir::new("fs2").unwrap(); + b.iter(|| { + test::black_box(available_space(&tempdir.path()).unwrap()); + }); + } + + /// Benchmarks the total space method. + #[bench] + fn bench_total_space(b: &mut test::Bencher) { + let tempdir = tempdir::TempDir::new("fs2").unwrap(); + b.iter(|| { + test::black_box(total_space(&tempdir.path()).unwrap()); + }); + } +} diff --git a/deps/fs2-0.2.3/src/unix.rs b/deps/fs2-0.2.3/src/unix.rs new file mode 100644 index 000000000..c6b05ec56 --- /dev/null +++ b/deps/fs2-0.2.3/src/unix.rs @@ -0,0 +1,217 @@ +extern crate libc; + +use std::ffi::CString; +use std::fs::File; +use std::io::{Error, ErrorKind, Result}; +use std::mem; +use std::os::unix::ffi::OsStrExt; +use std::os::unix::fs::MetadataExt; +use std::os::unix::io::{AsRawFd, FromRawFd}; +use std::path::Path; + +pub fn duplicate(file: &File) -> Result { + unsafe { + let fd = libc::dup(file.as_raw_fd()); + + if fd < 0 { + Err(Error::last_os_error()) + } else { + Ok(File::from_raw_fd(fd)) + } + } +} + +pub fn lock_shared(file: &File) -> Result<()> { + flock(file, libc::LOCK_SH) +} + +pub fn lock_exclusive(file: &File) -> Result<()> { + flock(file, libc::LOCK_EX) +} + +pub fn try_lock_shared(file: &File) -> Result<()> { + flock(file, libc::LOCK_SH | libc::LOCK_NB) +} + +pub fn try_lock_exclusive(file: &File) -> Result<()> { + flock(file, libc::LOCK_EX | libc::LOCK_NB) +} + +pub fn unlock(file: &File) -> Result<()> { + flock(file, libc::LOCK_UN) +} + +pub fn lock_error() -> Error { + Error::from_raw_os_error(libc::EWOULDBLOCK) +} + +fn flock(file: &File, flag: libc::c_int) -> Result<()> { + let ret = unsafe { libc::flock(file.as_raw_fd(), flag) }; + if ret < 0 { Err(Error::last_os_error()) } else { Ok(()) } +} + +pub fn allocated_size(file: &File) -> Result { + file.metadata().map(|m| m.blocks() as u64 * 512) +} + +#[cfg(any(target_os = "linux", + target_os = "freebsd", + target_os = "android", + target_os = "nacl"))] +pub fn allocate(file: &File, len: u64) -> Result<()> { + let ret = unsafe { libc::posix_fallocate(file.as_raw_fd(), 0, len as libc::off_t) }; + if ret == 0 { Ok(()) } else { Err(Error::last_os_error()) } +} + +#[cfg(any(target_os = "macos", target_os = "ios"))] +pub fn allocate(file: &File, len: u64) -> Result<()> { + let stat = try!(file.metadata()); + + if len > stat.blocks() as u64 * 512 { + let mut fstore = libc::fstore_t { + fst_flags: libc::F_ALLOCATECONTIG, + fst_posmode: libc::F_PEOFPOSMODE, + fst_offset: 0, + fst_length: len as libc::off_t, + fst_bytesalloc: 0, + }; + + let ret = unsafe { libc::fcntl(file.as_raw_fd(), libc::F_PREALLOCATE, &fstore) }; + if ret == -1 { + // Unable to allocate contiguous disk space; attempt to allocate non-contiguously. + fstore.fst_flags = libc::F_ALLOCATEALL; + let ret = unsafe { libc::fcntl(file.as_raw_fd(), libc::F_PREALLOCATE, &fstore) }; + if ret == -1 { + return Err(Error::last_os_error()); + } + } + } + + if len > stat.size() as u64 { + file.set_len(len) + } else { + Ok(()) + } +} + +#[cfg(any(target_os = "openbsd", + target_os = "netbsd"))] +pub fn allocate(file: &File, len: u64) -> Result<()> { + // No file allocation API available, just set the length if necessary. + if len > try!(file.metadata()).len() as u64 { + file.set_len(len) + } else { + Ok(()) + } +} + +fn statvfs

(path: P) -> Result where P: AsRef { + let cstr = match CString::new(path.as_ref().as_os_str().as_bytes()) { + Ok(cstr) => cstr, + Err(..) => return Err(Error::new(ErrorKind::InvalidInput, "path contained a null")), + }; + + unsafe { + let mut stat: libc::statvfs = mem::zeroed(); + // danburkert/fs2-rs#1: cast is necessary for platforms where c_char != u8. + if libc::statvfs(cstr.as_ptr() as *const _, &mut stat) == -1 { + Err(Error::last_os_error()) + } else { + Ok(stat) + } + } +} + +pub fn free_space

(path: P) -> Result where P: AsRef { + statvfs(path).map(|statvfs| statvfs.f_frsize as u64 * statvfs.f_bfree as u64) +} + +pub fn available_space

(path: P) -> Result where P: AsRef { + statvfs(path).map(|statvfs| statvfs.f_frsize as u64 * statvfs.f_bavail as u64) +} + +pub fn total_space

(path: P) -> Result where P: AsRef { + statvfs(path).map(|statvfs| statvfs.f_frsize as u64 * statvfs.f_blocks as u64) +} + +pub fn allocation_granularity

(path: P) -> Result where P: AsRef { + statvfs(path).map(|statvfs| statvfs.f_frsize as u64) +} + +#[cfg(test)] +mod test { + extern crate tempdir; + extern crate libc; + + use std::fs::{self, File}; + use std::os::unix::io::AsRawFd; + + use {FileExt, lock_contended_error}; + + /// The duplicate method returns a file with a new file descriptor. + #[test] + fn duplicate_new_fd() { + let tempdir = tempdir::TempDir::new("fs2").unwrap(); + let path = tempdir.path().join("fs2"); + let file1 = fs::OpenOptions::new().write(true).create(true).open(&path).unwrap(); + let file2 = file1.duplicate().unwrap(); + assert!(file1.as_raw_fd() != file2.as_raw_fd()); + } + + /// The duplicate method should preservesthe close on exec flag. + #[test] + fn duplicate_cloexec() { + + fn flags(file: &File) -> libc::c_int { + unsafe { libc::fcntl(file.as_raw_fd(), libc::F_GETFL, 0) } + } + + let tempdir = tempdir::TempDir::new("fs2").unwrap(); + let path = tempdir.path().join("fs2"); + let file1 = fs::OpenOptions::new().write(true).create(true).open(&path).unwrap(); + let file2 = file1.duplicate().unwrap(); + + assert_eq!(flags(&file1), flags(&file2)); + } + + /// Tests that locking a file descriptor will replace any existing locks + /// held on the file descriptor. + #[test] + fn lock_replace() { + let tempdir = tempdir::TempDir::new("fs2").unwrap(); + let path = tempdir.path().join("fs2"); + let file1 = fs::OpenOptions::new().write(true).create(true).open(&path).unwrap(); + let file2 = fs::OpenOptions::new().write(true).create(true).open(&path).unwrap(); + + // Creating a shared lock will drop an exclusive lock. + file1.lock_exclusive().unwrap(); + file1.lock_shared().unwrap(); + file2.lock_shared().unwrap(); + + // Attempting to replace a shared lock with an exclusive lock will fail + // with multiple lock holders, and remove the original shared lock. + assert_eq!(file2.try_lock_exclusive().unwrap_err().raw_os_error(), + lock_contended_error().raw_os_error()); + file1.lock_shared().unwrap(); + } + + /// Tests that locks are shared among duplicated file descriptors. + #[test] + fn lock_duplicate() { + let tempdir = tempdir::TempDir::new("fs2").unwrap(); + let path = tempdir.path().join("fs2"); + let file1 = fs::OpenOptions::new().write(true).create(true).open(&path).unwrap(); + let file2 = file1.duplicate().unwrap(); + let file3 = fs::OpenOptions::new().write(true).create(true).open(&path).unwrap(); + + // Create a lock through fd1, then replace it through fd2. + file1.lock_shared().unwrap(); + file2.lock_exclusive().unwrap(); + assert_eq!(file3.try_lock_shared().unwrap_err().raw_os_error(), + lock_contended_error().raw_os_error()); + + // Either of the file descriptors should be able to unlock. + file1.unlock().unwrap(); + file3.lock_shared().unwrap(); + } +} diff --git a/deps/fs2-0.2.3/src/windows.rs b/deps/fs2-0.2.3/src/windows.rs new file mode 100644 index 000000000..0d00b2693 --- /dev/null +++ b/deps/fs2-0.2.3/src/windows.rs @@ -0,0 +1,292 @@ +extern crate kernel32; +extern crate winapi; + +use std::fs::File; +use std::io::{Error, Result}; +use std::mem; +use std::os::windows::ffi::OsStrExt; +use std::os::windows::io::{AsRawHandle, FromRawHandle}; +use std::path::Path; +use std::ptr; + +pub fn duplicate(file: &File) -> Result { + unsafe { + let mut handle = ptr::null_mut(); + let current_process = kernel32::GetCurrentProcess(); + let ret = kernel32::DuplicateHandle(current_process, + file.as_raw_handle(), + current_process, + &mut handle, + 0, + true as winapi::BOOL, + winapi::DUPLICATE_SAME_ACCESS); + if ret == 0 { + Err(Error::last_os_error()) + } else { + Ok(File::from_raw_handle(handle)) + } + } +} + +pub fn allocated_size(file: &File) -> Result { + unsafe { + let mut info: winapi::FILE_STANDARD_INFO = mem::zeroed(); + + let ret = kernel32::GetFileInformationByHandleEx( + file.as_raw_handle(), + winapi::FileStandardInfo, + &mut info as *mut _ as *mut _, + mem::size_of::() as winapi::DWORD); + + if ret == 0 { + Err(Error::last_os_error()) + } else { + Ok(info.AllocationSize as u64) + } + } +} + +pub fn allocate(file: &File, len: u64) -> Result<()> { + if try!(allocated_size(file)) < len { + unsafe { + let mut info: winapi::FILE_ALLOCATION_INFO = mem::zeroed(); + info.AllocationSize = len as i64; + let ret = kernel32::SetFileInformationByHandle( + file.as_raw_handle(), + winapi::FileAllocationInfo, + &mut info as *mut _ as *mut _, + mem::size_of::() as winapi::DWORD); + if ret == 0 { + return Err(Error::last_os_error()); + } + } + } + if try!(file.metadata()).len() < len { + file.set_len(len) + } else { + Ok(()) + } +} + +pub fn lock_shared(file: &File) -> Result<()> { + lock_file(file, 0) +} + +pub fn lock_exclusive(file: &File) -> Result<()> { + lock_file(file, winapi::LOCKFILE_EXCLUSIVE_LOCK) +} + +pub fn try_lock_shared(file: &File) -> Result<()> { + lock_file(file, winapi::LOCKFILE_FAIL_IMMEDIATELY) +} + +pub fn try_lock_exclusive(file: &File) -> Result<()> { + lock_file(file, winapi::LOCKFILE_EXCLUSIVE_LOCK | winapi::LOCKFILE_FAIL_IMMEDIATELY) +} + +pub fn unlock(file: &File) -> Result<()> { + unsafe { + let ret = kernel32::UnlockFile(file.as_raw_handle(), 0, 0, !0, !0); + if ret == 0 { Err(Error::last_os_error()) } else { Ok(()) } + } +} + +pub fn lock_error() -> Error { + Error::from_raw_os_error(winapi::ERROR_LOCK_VIOLATION as i32) +} + +fn lock_file(file: &File, flags: winapi::DWORD) -> Result<()> { + unsafe { + let mut overlapped = mem::zeroed(); + let ret = kernel32::LockFileEx(file.as_raw_handle(), flags, 0, !0, !0, &mut overlapped); + if ret == 0 { Err(Error::last_os_error()) } else { Ok(()) } + } +} + +fn volume_path

(path: P, volume_path: &mut [u16]) -> Result<()> where P: AsRef { + let path_utf8: Vec = path.as_ref().as_os_str().encode_wide().chain(Some(0)).collect(); + unsafe { + let ret = kernel32::GetVolumePathNameW(path_utf8.as_ptr(), + volume_path.as_mut_ptr(), + volume_path.len() as winapi::DWORD); + if ret == 0 { Err(Error::last_os_error()) } else { Ok(()) + } + } +} + +fn get_disk_free_space

(path: P) -> Result<(u64, u64, u64, u64)> where P: AsRef { + let root_path: &mut [u16] = &mut [0; 261]; + try!(volume_path(path, root_path)); + unsafe { + + let mut sectors_per_cluster = 0; + let mut bytes_per_sector = 0; + let mut number_of_free_clusters = 0; + let mut total_number_of_clusters = 0; + let ret = kernel32::GetDiskFreeSpaceW(root_path.as_ptr(), + &mut sectors_per_cluster, + &mut bytes_per_sector, + &mut number_of_free_clusters, + &mut total_number_of_clusters); + if ret == 0 { + Err(Error::last_os_error()) + } else { + Ok((sectors_per_cluster as u64, + bytes_per_sector as u64, + number_of_free_clusters as u64, + total_number_of_clusters as u64)) + } + } +} + +pub fn free_space

(path: P) -> Result where P: AsRef { + available_space(path) +} + +pub fn available_space

(path: P) -> Result where P: AsRef { + get_disk_free_space(path).map(|(sectors_per_cluster, + bytes_per_sector, + number_of_free_clusters, + _)| { + number_of_free_clusters * sectors_per_cluster * bytes_per_sector + }) +} + +pub fn total_space

(path: P) -> Result where P: AsRef { + get_disk_free_space(path).map(|(sectors_per_cluster, + bytes_per_sector, + _, + total_number_of_clusters)| { + total_number_of_clusters * sectors_per_cluster * bytes_per_sector + }) +} + +pub fn allocation_granularity

(path: P) -> Result where P: AsRef { + get_disk_free_space(path).map(|(sectors_per_cluster, bytes_per_sector, _, _)| { + sectors_per_cluster * bytes_per_sector + }) +} + +#[cfg(test)] +mod test { + + extern crate tempdir; + + use std::fs; + use std::os::windows::io::AsRawHandle; + + use {FileExt, lock_contended_error}; + + /// The duplicate method returns a file with a new file handle. + #[test] + fn duplicate_new_handle() { + let tempdir = tempdir::TempDir::new("fs2").unwrap(); + let path = tempdir.path().join("fs2"); + let file1 = fs::OpenOptions::new().write(true).create(true).open(&path).unwrap(); + let file2 = file1.duplicate().unwrap(); + assert!(file1.as_raw_handle() != file2.as_raw_handle()); + } + + /// A duplicated file handle does not have access to the original handle's locks. + #[test] + fn lock_duplicate_handle_independence() { + let tempdir = tempdir::TempDir::new("fs2").unwrap(); + let path = tempdir.path().join("fs2"); + let file1 = fs::OpenOptions::new().read(true).create(true).open(&path).unwrap(); + let file2 = file1.duplicate().unwrap(); + + // Locking the original file handle will block the duplicate file handle from opening a lock. + file1.lock_shared().unwrap(); + assert_eq!(file2.try_lock_exclusive().unwrap_err().raw_os_error(), + lock_contended_error().raw_os_error()); + + // Once the original file handle is unlocked, the duplicate handle can proceed with a lock. + file1.unlock().unwrap(); + file2.lock_exclusive().unwrap(); + } + + /// A file handle may not be exclusively locked multiple times, or exclusively locked and then + /// shared locked. + #[test] + fn lock_non_reentrant() { + let tempdir = tempdir::TempDir::new("fs2").unwrap(); + let path = tempdir.path().join("fs2"); + let file = fs::OpenOptions::new().read(true).create(true).open(&path).unwrap(); + + // Multiple exclusive locks fails. + file.lock_exclusive().unwrap(); + assert_eq!(file.try_lock_exclusive().unwrap_err().raw_os_error(), + lock_contended_error().raw_os_error()); + file.unlock().unwrap(); + + // Shared then Exclusive locks fails. + file.lock_shared().unwrap(); + assert_eq!(file.try_lock_exclusive().unwrap_err().raw_os_error(), + lock_contended_error().raw_os_error()); + } + + /// A file handle can hold an exclusive lock and any number of shared locks, all of which must + /// be unlocked independently. + #[test] + fn lock_layering() { + let tempdir = tempdir::TempDir::new("fs2").unwrap(); + let path = tempdir.path().join("fs2"); + let file = fs::OpenOptions::new().read(true).create(true).open(&path).unwrap(); + + // Open two shared locks on the file, and then try and fail to open an exclusive lock. + file.lock_exclusive().unwrap(); + file.lock_shared().unwrap(); + file.lock_shared().unwrap(); + assert_eq!(file.try_lock_exclusive().unwrap_err().raw_os_error(), + lock_contended_error().raw_os_error()); + + // Pop one of the shared locks and try again. + file.unlock().unwrap(); + assert_eq!(file.try_lock_exclusive().unwrap_err().raw_os_error(), + lock_contended_error().raw_os_error()); + + // Pop the second shared lock and try again. + file.unlock().unwrap(); + assert_eq!(file.try_lock_exclusive().unwrap_err().raw_os_error(), + lock_contended_error().raw_os_error()); + + // Pop the exclusive lock and finally succeed. + file.unlock().unwrap(); + file.lock_exclusive().unwrap(); + } + + /// A file handle with multiple open locks will have all locks closed on drop. + #[test] + fn lock_layering_cleanup() { + let tempdir = tempdir::TempDir::new("fs2").unwrap(); + let path = tempdir.path().join("fs2"); + let file1 = fs::OpenOptions::new().read(true).create(true).open(&path).unwrap(); + let file2 = fs::OpenOptions::new().read(true).create(true).open(&path).unwrap(); + + // Open two shared locks on the file, and then try and fail to open an exclusive lock. + file1.lock_shared().unwrap(); + assert_eq!(file2.try_lock_exclusive().unwrap_err().raw_os_error(), + lock_contended_error().raw_os_error()); + + drop(file1); + file2.lock_exclusive().unwrap(); + } + + /// A file handle's locks will not be released until the original handle and all of its + /// duplicates have been closed. This on really smells like a bug in Windows. + #[test] + fn lock_duplicate_cleanup() { + let tempdir = tempdir::TempDir::new("fs2").unwrap(); + let path = tempdir.path().join("fs2"); + let file1 = fs::OpenOptions::new().read(true).create(true).open(&path).unwrap(); + let file2 = file1.duplicate().unwrap(); + + // Open a lock on the original handle, then close it. + file1.lock_shared().unwrap(); + drop(file1); + + // Attempting to create a lock on the file with the duplicate handle will fail. + assert_eq!(file2.try_lock_exclusive().unwrap_err().raw_os_error(), + lock_contended_error().raw_os_error()); + } +} diff --git a/deps/gcc-0.3.23/Cargo.toml b/deps/gcc-0.3.23/Cargo.toml deleted file mode 100644 index 123415585..000000000 --- a/deps/gcc-0.3.23/Cargo.toml +++ /dev/null @@ -1,17 +0,0 @@ -[package] - -name = "gcc" -version = "0.3.23" -authors = ["Alex Crichton "] -license = "MIT/Apache-2.0" -repository = "https://github.com/alexcrichton/gcc-rs" -documentation = "http://alexcrichton.com/gcc-rs" -description = """ -A build-time dependency for Cargo build scripts to assist in invoking the native -C compiler to compile native C code into a static archive to be linked into Rust -code. -""" -keywords = ["build-dependencies"] - -[dev-dependencies] -tempdir = "0.3" diff --git a/deps/gcc-0.3.23/src/lib.rs b/deps/gcc-0.3.23/src/lib.rs deleted file mode 100644 index 26275e271..000000000 --- a/deps/gcc-0.3.23/src/lib.rs +++ /dev/null @@ -1,799 +0,0 @@ -//! A library for build scripts to compile custom C code -//! -//! This library is intended to be used as a `build-dependencies` entry in -//! `Cargo.toml`: -//! -//! ```toml -//! [build-dependencies] -//! gcc = "0.3" -//! ``` -//! -//! The purpose of this crate is to provide the utility functions necessary to -//! compile C code into a static archive which is then linked into a Rust crate. -//! The top-level `compile_library` function serves as a convenience and more -//! advanced configuration is available through the `Config` builder. -//! -//! This crate will automatically detect situations such as cross compilation or -//! other environment variables set by Cargo and will build code appropriately. -//! -//! # Examples -//! -//! Use the default configuration: -//! -//! ```no_run -//! extern crate gcc; -//! -//! fn main() { -//! gcc::compile_library("libfoo.a", &["src/foo.c"]); -//! } -//! ``` -//! -//! Use more advanced configuration: -//! -//! ```no_run -//! extern crate gcc; -//! -//! fn main() { -//! gcc::Config::new() -//! .file("src/foo.c") -//! .define("FOO", Some("bar")) -//! .include("src") -//! .compile("libfoo.a"); -//! } -//! ``` - -#![doc(html_root_url = "http://alexcrichton.com/gcc-rs")] -#![cfg_attr(test, deny(warnings))] -#![deny(missing_docs)] - -use std::env; -use std::ffi::{OsString, OsStr}; -use std::fs; -use std::io; -use std::path::{PathBuf, Path}; -use std::process::{Command, Stdio}; - -#[cfg(windows)] -mod registry; -pub mod windows_registry; - -/// Extra configuration to pass to gcc. -pub struct Config { - include_directories: Vec, - definitions: Vec<(String, Option)>, - objects: Vec, - flags: Vec, - files: Vec, - cpp: bool, - cpp_link_stdlib: Option>, - cpp_set_stdlib: Option, - target: Option, - host: Option, - out_dir: Option, - opt_level: Option, - debug: Option, - env: Vec<(OsString, OsString)>, - compiler: Option, - archiver: Option, - cargo_metadata: bool, - pic: Option, -} - -/// Configuration used to represent an invocation of a C compiler. -/// -/// This can be used to figure out what compiler is in use, what the arguments -/// to it are, and what the environment variables look like for the compiler. -/// This can be used to further configure other build systems (e.g. forward -/// along CC and/or CFLAGS) or the `to_command` method can be used to run the -/// compiler itself. -pub struct Tool { - path: PathBuf, - args: Vec, - env: Vec<(OsString, OsString)>, -} - -/// Compile a library from the given set of input C files. -/// -/// This will simply compile all files into object files and then assemble them -/// into the output. This will read the standard environment variables to detect -/// cross compilations and such. -/// -/// This function will also print all metadata on standard output for Cargo. -/// -/// # Example -/// -/// ```no_run -/// gcc::compile_library("libfoo.a", &["foo.c", "bar.c"]); -/// ``` -pub fn compile_library(output: &str, files: &[&str]) { - let mut c = Config::new(); - for f in files.iter() { - c.file(*f); - } - c.compile(output) -} - -impl Config { - /// Construct a new instance of a blank set of configuration. - /// - /// This builder is finished with the `compile` function. - pub fn new() -> Config { - Config { - include_directories: Vec::new(), - definitions: Vec::new(), - objects: Vec::new(), - flags: Vec::new(), - files: Vec::new(), - cpp: false, - cpp_link_stdlib: None, - cpp_set_stdlib: None, - target: None, - host: None, - out_dir: None, - opt_level: None, - debug: None, - env: Vec::new(), - compiler: None, - archiver: None, - cargo_metadata: true, - pic: None, - } - } - - /// Add a directory to the `-I` or include path for headers - pub fn include>(&mut self, dir: P) -> &mut Config { - self.include_directories.push(dir.as_ref().to_path_buf()); - self - } - - /// Specify a `-D` variable with an optional value. - pub fn define(&mut self, var: &str, val: Option<&str>) -> &mut Config { - self.definitions.push((var.to_string(), val.map(|s| s.to_string()))); - self - } - - /// Add an arbitrary object file to link in - pub fn object>(&mut self, obj: P) -> &mut Config { - self.objects.push(obj.as_ref().to_path_buf()); - self - } - - /// Add an arbitrary flag to the invocation of the compiler - pub fn flag(&mut self, flag: &str) -> &mut Config { - self.flags.push(flag.to_string()); - self - } - - /// Add a file which will be compiled - pub fn file>(&mut self, p: P) -> &mut Config { - self.files.push(p.as_ref().to_path_buf()); - self - } - - /// Set C++ support. - /// - /// The other `cpp_*` options will only become active if this is set to - /// `true`. - pub fn cpp(&mut self, cpp: bool) -> &mut Config { - self.cpp = cpp; - self - } - - /// Set the standard library to link against when compiling with C++ - /// support. - /// - /// The default value of this property depends on the current target: On - /// OS X `Some("c++")` is used, when compiling for a Visual Studio based - /// target `None` is used and for other targets `Some("stdc++")` is used. - /// - /// A value of `None` indicates that no automatic linking should happen, - /// otherwise cargo will link against the specified library. - /// - /// The given library name must not contain the `lib` prefix. - pub fn cpp_link_stdlib(&mut self, cpp_link_stdlib: Option<&str>) - -> &mut Config { - self.cpp_link_stdlib = Some(cpp_link_stdlib.map(|s| s.into())); - self - } - - /// Force the C++ compiler to use the specified standard library. - /// - /// Setting this option will automatically set `cpp_link_stdlib` to the same - /// value. - /// - /// The default value of this option is always `None`. - /// - /// This option has no effect when compiling for a Visual Studio based - /// target. - /// - /// This option sets the `-stdlib` flag, which is only supported by some - /// compilers (clang, icc) but not by others (gcc). The library will not - /// detect which compiler is used, as such it is the responsibility of the - /// caller to ensure that this option is only used in conjuction with a - /// compiler which supports the `-stdlib` flag. - /// - /// A value of `None` indicates that no specific C++ standard library should - /// be used, otherwise `-stdlib` is added to the compile invocation. - /// - /// The given library name must not contain the `lib` prefix. - pub fn cpp_set_stdlib(&mut self, cpp_set_stdlib: Option<&str>) - -> &mut Config { - self.cpp_set_stdlib = cpp_set_stdlib.map(|s| s.into()); - self.cpp_link_stdlib(cpp_set_stdlib); - self - } - - /// Configures the target this configuration will be compiling for. - /// - /// This option is automatically scraped from the `TARGET` environment - /// variable by build scripts, so it's not required to call this function. - pub fn target(&mut self, target: &str) -> &mut Config { - self.target = Some(target.to_string()); - self - } - - /// Configures the host assumed by this configuration. - /// - /// This option is automatically scraped from the `HOST` environment - /// variable by build scripts, so it's not required to call this function. - pub fn host(&mut self, host: &str) -> &mut Config { - self.host = Some(host.to_string()); - self - } - - /// Configures the optimization level of the generated object files. - /// - /// This option is automatically scraped from the `OPT_LEVEL` environment - /// variable by build scripts, so it's not required to call this function. - pub fn opt_level(&mut self, opt_level: u32) -> &mut Config { - self.opt_level = Some(opt_level); - self - } - - /// Configures whether the compiler will emit debug information when - /// generating object files. - /// - /// This option is automatically scraped from the `PROFILE` environment - /// variable by build scripts (only enabled when the profile is "debug"), so - /// it's not required to call this function. - pub fn debug(&mut self, debug: bool) -> &mut Config { - self.debug = Some(debug); - self - } - - /// Configures the output directory where all object files and static - /// libraries will be located. - /// - /// This option is automatically scraped from the `OUT_DIR` environment - /// variable by build scripts, so it's not required to call this function. - pub fn out_dir>(&mut self, out_dir: P) -> &mut Config { - self.out_dir = Some(out_dir.as_ref().to_owned()); - self - } - - /// Configures the compiler to be used to produce output. - /// - /// This option is automatically determined from the target platform or a - /// number of environment variables, so it's not required to call this - /// function. - pub fn compiler>(&mut self, compiler: P) -> &mut Config { - self.compiler = Some(compiler.as_ref().to_owned()); - self - } - - /// Configures the tool used to assemble archives. - /// - /// This option is automatically determined from the target platform or a - /// number of environment variables, so it's not required to call this - /// function. - pub fn archiver>(&mut self, archiver: P) -> &mut Config { - self.archiver = Some(archiver.as_ref().to_owned()); - self - } - /// Define whether metadata should be emitted for cargo allowing it to - /// automatically link the binary. Defaults to `true`. - pub fn cargo_metadata(&mut self, cargo_metadata: bool) -> &mut Config { - self.cargo_metadata = cargo_metadata; - self - } - - /// Configures whether the compiler will emit position independent code. - /// - /// This option defaults to `false` for `i686` and `windows-gnu` targets and to `true` for all - /// other targets. - pub fn pic(&mut self, pic: bool) -> &mut Config { - self.pic = Some(pic); - self - } - - - #[doc(hidden)] - pub fn __set_env(&mut self, a: A, b: B) -> &mut Config - where A: AsRef, B: AsRef - { - self.env.push((a.as_ref().to_owned(), b.as_ref().to_owned())); - self - } - - /// Run the compiler, generating the file `output` - /// - /// The name `output` must begin with `lib` and end with `.a` - pub fn compile(&self, output: &str) { - assert!(output.starts_with("lib")); - assert!(output.ends_with(".a")); - let lib_name = &output[3..output.len() - 2]; - let dst = self.get_out_dir(); - - let mut objects = Vec::new(); - for file in self.files.iter() { - let obj = dst.join(file).with_extension("o"); - self.compile_object(file, &obj); - objects.push(obj); - } - - self.assemble(lib_name, &dst.join(output), &objects); - - self.print(&format!("cargo:rustc-link-lib=static={}", - &output[3..output.len() - 2])); - self.print(&format!("cargo:rustc-link-search=native={}", dst.display())); - - // Add specific C++ libraries, if enabled. - if self.cpp { - if let Some(stdlib) = self.get_cpp_link_stdlib() { - self.print(&format!("cargo:rustc-link-lib={}", stdlib)); - } - } - } - - fn compile_object(&self, file: &Path, dst: &Path) { - let is_asm = file.extension().and_then(|s| s.to_str()) == Some("asm"); - let msvc = self.get_target().contains("msvc"); - let (mut cmd, name) = if msvc && is_asm { - self.msvc_macro_assembler() - } else { - let compiler = self.get_compiler(); - let mut cmd = compiler.to_command(); - for &(ref a, ref b) in self.env.iter() { - cmd.env(a, b); - } - (cmd, compiler.path.file_name().unwrap() - .to_string_lossy().into_owned()) - }; - fs::create_dir_all(&dst.parent().unwrap()).unwrap(); - if msvc && is_asm { - cmd.arg("/Fo").arg(dst); - } else if msvc { - let mut s = OsString::from("/Fo"); - s.push(&dst); - cmd.arg(s); - } else { - cmd.arg("-o").arg(&dst); - } - cmd.arg(if msvc {"/c"} else {"-c"}); - cmd.arg(file); - - run(&mut cmd, &name); - } - - /// Get the compiler that's in use for this configuration. - /// - /// This function will return a `Tool` which represents the culmination - /// of this configuration at a snapshot in time. The returned compiler can - /// be inspected (e.g. the path, arguments, environment) to forward along to - /// other tools, or the `to_command` method can be used to invoke the - /// compiler itself. - /// - /// This method will take into account all configuration such as debug - /// information, optimization level, include directories, defines, etc. - /// Additionally, the compiler binary in use follows the standard - /// conventions for this path, e.g. looking at the explicitly set compiler, - /// environment variables (a number of which are inspected here), and then - /// falling back to the default configuration. - pub fn get_compiler(&self) -> Tool { - let opt_level = self.get_opt_level(); - let debug = self.get_debug(); - let target = self.get_target(); - let msvc = target.contains("msvc"); - self.print(&format!("debug={} opt-level={}", debug, opt_level)); - - let mut cmd = self.get_base_compiler(); - let nvcc = cmd.path.to_str() - .map(|path| path.contains("nvcc")) - .unwrap_or(false); - - if msvc { - cmd.args.push("/nologo".into()); - cmd.args.push("/MD".into()); // link against msvcrt.dll for now - if opt_level != 0 { - cmd.args.push("/O2".into()); - } - } else if nvcc { - cmd.args.push(format!("-O{}", opt_level).into()); - } else { - cmd.args.push(format!("-O{}", opt_level).into()); - cmd.args.push("-ffunction-sections".into()); - cmd.args.push("-fdata-sections".into()); - } - for arg in self.envflags(if self.cpp {"CXXFLAGS"} else {"CFLAGS"}) { - cmd.args.push(arg.into()); - } - - if debug { - cmd.args.push(if msvc {"/Z7"} else {"-g"}.into()); - } - - if target.contains("-ios") { - self.ios_flags(&mut cmd); - } else if !msvc { - if target.contains("i686") { - cmd.args.push("-m32".into()); - } else if target.contains("x86_64") || target.contains("powerpc64") { - cmd.args.push("-m64".into()); - } - - if !nvcc && self.pic.unwrap_or(!target.contains("i686") && !target.contains("windows-gnu")) { - cmd.args.push("-fPIC".into()); - } else if nvcc && self.pic.unwrap_or(false) { - cmd.args.push("-Xcompiler".into()); - cmd.args.push("\'-fPIC\'".into()); - } - if target.contains("musl") { - cmd.args.push("-static".into()); - } - - if target == "armv7-unknown-linux-gnueabihf" { - cmd.args.push("-march=armv7-a".into()); - } - } - - if self.cpp && !msvc { - if let Some(ref stdlib) = self.cpp_set_stdlib { - cmd.args.push(format!("-stdlib=lib{}", stdlib).into()); - } - } - - for directory in self.include_directories.iter() { - cmd.args.push(if msvc {"/I"} else {"-I"}.into()); - cmd.args.push(directory.into()); - } - - for flag in self.flags.iter() { - cmd.args.push(flag.into()); - } - - for &(ref key, ref value) in self.definitions.iter() { - let lead = if msvc {"/"} else {"-"}; - if let &Some(ref value) = value { - cmd.args.push(format!("{}D{}={}", lead, key, value).into()); - } else { - cmd.args.push(format!("{}D{}", lead, key).into()); - } - } - cmd - } - - fn msvc_macro_assembler(&self) -> (Command, String) { - let target = self.get_target(); - let tool = if target.contains("x86_64") {"ml64.exe"} else {"ml.exe"}; - let mut cmd = windows_registry::find(&target, tool).unwrap_or_else(|| { - self.cmd(tool) - }); - for directory in self.include_directories.iter() { - cmd.arg("/I").arg(directory); - } - for &(ref key, ref value) in self.definitions.iter() { - if let &Some(ref value) = value { - cmd.arg(&format!("/D{}={}", key, value)); - } else { - cmd.arg(&format!("/D{}", key)); - } - } - (cmd, tool.to_string()) - } - - fn assemble(&self, lib_name: &str, dst: &Path, objects: &[PathBuf]) { - let target = self.get_target(); - if target.contains("msvc") { - let mut cmd = match self.archiver { - Some(ref s) => self.cmd(s), - None => windows_registry::find(&target, "lib.exe") - .unwrap_or(self.cmd("lib.exe")), - }; - let mut out = OsString::from("/OUT:"); - out.push(dst); - run(cmd.arg(out).arg("/nologo") - .args(objects) - .args(&self.objects), "lib.exe"); - - // The Rust compiler will look for libfoo.a and foo.lib, but the - // MSVC linker will also be passed foo.lib, so be sure that both - // exist for now. - let lib_dst = dst.with_file_name(format!("{}.lib", lib_name)); - let _ = fs::remove_file(&lib_dst); - fs::hard_link(&dst, &lib_dst).or_else(|_| { - //if hard-link fails, just copy (ignoring the number of bytes written) - fs::copy(&dst, &lib_dst).map(|_| ()) - }).ok().expect("Copying from {:?} to {:?} failed.");; - } else { - let ar = self.get_ar(); - let cmd = ar.file_name().unwrap().to_string_lossy(); - run(self.cmd(&ar).arg("crus") - .arg(dst) - .args(objects) - .args(&self.objects), &cmd); - } - } - - fn ios_flags(&self, cmd: &mut Tool) { - enum ArchSpec { - Device(&'static str), - Simulator(&'static str), - } - - let target = self.get_target(); - let arch = target.split('-').nth(0).unwrap(); - let arch = match arch { - "arm" | "armv7" | "thumbv7" => ArchSpec::Device("armv7"), - "armv7s" | "thumbv7s" => ArchSpec::Device("armv7s"), - "arm64" | "aarch64" => ArchSpec::Device("arm64"), - "i386" | "i686" => ArchSpec::Simulator("-m32"), - "x86_64" => ArchSpec::Simulator("-m64"), - _ => fail("Unknown arch for iOS target") - }; - - let sdk = match arch { - ArchSpec::Device(arch) => { - cmd.args.push("-arch".into()); - cmd.args.push(arch.into()); - cmd.args.push("-miphoneos-version-min=7.0".into()); - "iphoneos" - }, - ArchSpec::Simulator(arch) => { - cmd.args.push(arch.into()); - cmd.args.push("-mios-simulator-version-min=7.0".into()); - "iphonesimulator" - } - }; - - self.print(&format!("Detecting iOS SDK path for {}", sdk)); - let sdk_path = self.cmd("xcrun") - .arg("--show-sdk-path") - .arg("--sdk") - .arg(sdk) - .stderr(Stdio::inherit()) - .output() - .unwrap() - .stdout; - - let sdk_path = String::from_utf8(sdk_path).unwrap(); - - cmd.args.push("-isysroot".into()); - cmd.args.push(sdk_path.trim().into()); - } - - fn cmd>(&self, prog: P) -> Command { - let mut cmd = Command::new(prog); - for &(ref a, ref b) in self.env.iter() { - cmd.env(a, b); - } - return cmd - } - - fn get_base_compiler(&self) -> Tool { - if let Some(ref c) = self.compiler { - return Tool::new(c.clone()) - } - let host = self.get_host(); - let target = self.get_target(); - let (env, msvc, gnu, default) = if self.cpp { - ("CXX", "cl.exe", "g++", "c++") - } else { - ("CC", "cl.exe", "gcc", "cc") - }; - self.get_var(env).ok().map(|env| { - Tool::new(PathBuf::from(env)) - }).or_else(|| { - windows_registry::find_tool(&target, "cl.exe") - }).unwrap_or_else(|| { - let compiler = if host.contains("windows") && - target.contains("windows") { - if target.contains("msvc") { - msvc.to_string() - } else { - format!("{}.exe", gnu) - } - } else if target.contains("android") { - format!("{}-{}", target, gnu) - } else if self.get_host() != target { - let prefix = match &target[..] { - "aarch64-unknown-linux-gnu" => Some("aarch64-linux-gnu"), - "arm-unknown-linux-gnueabi" => Some("arm-linux-gnueabi"), - "arm-unknown-linux-gnueabihf" => Some("arm-linux-gnueabihf"), - "armv7-unknown-linux-gnueabihf" => Some("arm-linux-gnueabihf"), - "powerpc-unknown-linux-gnu" => Some("powerpc-linux-gnu"), - "powerpc64-unknown-linux-gnu" => Some("powerpc-linux-gnu"), - "powerpc64le-unknown-linux-gnu" => Some("powerpc64le-linux-gnu"), - "mips-unknown-linux-gnu" => Some("mips-linux-gnu"), - "i686-pc-windows-gnu" => Some("i686-w64-mingw32"), - "x86_64-pc-windows-gnu" => Some("x86_64-w64-mingw32"), - "x86_64-unknown-linux-musl" => Some("musl"), - "x86_64-rumprun-netbsd" => Some("x86_64-rumprun-netbsd"), - _ => None, - }; - match prefix { - Some(prefix) => format!("{}-{}", prefix, gnu), - None => default.to_string(), - } - } else { - default.to_string() - }; - Tool::new(PathBuf::from(compiler)) - }) - } - - fn get_var(&self, var_base: &str) -> Result { - let target = self.get_target(); - let host = self.get_host(); - let kind = if host == target {"HOST"} else {"TARGET"}; - let target_u = target.replace("-", "_"); - let res = self.getenv(&format!("{}_{}", var_base, target)) - .or_else(|| self.getenv(&format!("{}_{}", var_base, target_u))) - .or_else(|| self.getenv(&format!("{}_{}", kind, var_base))) - .or_else(|| self.getenv(var_base)); - - match res { - Some(res) => Ok(res), - None => Err("Could not get environment variable".to_string()), - } - } - - fn envflags(&self, name: &str) -> Vec { - self.get_var(name).unwrap_or(String::new()) - .split(|c: char| c.is_whitespace()).filter(|s| !s.is_empty()) - .map(|s| s.to_string()) - .collect() - } - - /// Returns the default C++ standard library for the current target: `libc++` - /// for OS X and `libstdc++` for anything else. - fn get_cpp_link_stdlib(&self) -> Option { - self.cpp_link_stdlib.clone().unwrap_or_else(|| { - let target = self.get_target(); - if target.contains("msvc") { - None - } else if target.contains("darwin") { - Some("c++".to_string()) - } else { - Some("stdc++".to_string()) - } - }) - } - - fn get_ar(&self) -> PathBuf { - self.archiver.clone().or_else(|| { - self.get_var("AR").map(PathBuf::from).ok() - }).unwrap_or_else(|| { - if self.get_target().contains("android") { - PathBuf::from(format!("{}-ar", self.get_target())) - } else { - PathBuf::from("ar") - } - }) - } - - fn get_target(&self) -> String { - self.target.clone().unwrap_or_else(|| self.getenv_unwrap("TARGET")) - } - - fn get_host(&self) -> String { - self.host.clone().unwrap_or_else(|| self.getenv_unwrap("HOST")) - } - - fn get_opt_level(&self) -> u32 { - self.opt_level.unwrap_or_else(|| { - self.getenv_unwrap("OPT_LEVEL").parse().unwrap() - }) - } - - fn get_debug(&self) -> bool { - self.debug.unwrap_or_else(|| self.getenv_unwrap("PROFILE") == "debug") - } - - fn get_out_dir(&self) -> PathBuf { - self.out_dir.clone().unwrap_or_else(|| { - env::var_os("OUT_DIR").map(PathBuf::from).unwrap() - }) - } - - fn getenv(&self, v: &str) -> Option { - let r = env::var(v).ok(); - self.print(&format!("{} = {:?}", v, r)); - r - } - - fn getenv_unwrap(&self, v: &str) -> String { - match self.getenv(v) { - Some(s) => s, - None => fail(&format!("environment variable `{}` not defined", v)), - } - } - - fn print(&self, s: &str) { - if self.cargo_metadata { - println!("{}", s); - } - } -} - -impl Tool { - fn new(path: PathBuf) -> Tool { - Tool { - path: path, - args: Vec::new(), - env: Vec::new(), - } - } - - /// Converts this compiler into a `Command` that's ready to be run. - /// - /// This is useful for when the compiler needs to be executed and the - /// command returned will already have the initial arguments and environment - /// variables configured. - pub fn to_command(&self) -> Command { - let mut cmd = Command::new(&self.path); - cmd.args(&self.args); - for &(ref k, ref v) in self.env.iter() { - cmd.env(k, v); - } - return cmd - } - - /// Returns the path for this compiler. - /// - /// Note that this may not be a path to a file on the filesystem, e.g. "cc", - /// but rather something which will be resolved when a process is spawned. - pub fn path(&self) -> &Path { - &self.path - } - - /// Returns the default set of arguments to the compiler needed to produce - /// executables for the target this compiler generates. - pub fn args(&self) -> &[OsString] { - &self.args - } - - /// Returns the set of environment variables needed for this compiler to - /// operate. - /// - /// This is typically only used for MSVC compilers currently. - pub fn env(&self) -> &[(OsString, OsString)] { - &self.env - } -} - -fn run(cmd: &mut Command, program: &str) { - println!("running: {:?}", cmd); - let status = match cmd.status() { - Ok(status) => status, - Err(ref e) if e.kind() == io::ErrorKind::NotFound => { - let extra = if cfg!(windows) { - " (see https://github.com/alexcrichton/gcc-rs#compile-time-requirements \ - for help)" - } else { - "" - }; - fail(&format!("failed to execute command: {}\nIs `{}` \ - not installed?{}", e, program, extra)); - } - Err(e) => fail(&format!("failed to execute command: {}", e)), - }; - println!("{:?}", status); - if !status.success() { - fail(&format!("command did not execute successfully, got: {}", status)); - } -} - -fn fail(s: &str) -> ! { - println!("\n\n{}\n\n", s); - panic!() -} diff --git a/deps/gcc-0.3.23/src/windows_registry.rs b/deps/gcc-0.3.23/src/windows_registry.rs deleted file mode 100644 index 3ad702c8e..000000000 --- a/deps/gcc-0.3.23/src/windows_registry.rs +++ /dev/null @@ -1,359 +0,0 @@ -// Copyright 2015 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -//! A helper module to probe the Windows Registry when looking for -//! windows-specific tools. - -use std::process::Command; - -use Tool; - -/// Attempts to find a tool within an MSVC installation using the Windows -/// registry as a point to search from. -/// -/// The `target` argument is the target that the tool should work for (e.g. -/// compile or link for) and the `tool` argument is the tool to find (e.g. -/// `cl.exe` or `link.exe`). -/// -/// This function will return `None` if the tool could not be found, or it will -/// return `Some(cmd)` which represents a command that's ready to execute the -/// tool with the appropriate environment variables set. -/// -/// Note that this function always returns `None` for non-MSVC targets. -pub fn find(target: &str, tool: &str) -> Option { - find_tool(target, tool).map(|c| c.to_command()) -} - -/// Similar to the `find` function above, this function will attempt the same -/// operation (finding a MSVC tool in a local install) but instead returns a -/// `Tool` which may be introspected. -#[cfg(not(windows))] -pub fn find_tool(_target: &str, _tool: &str) -> Option { - None -} - -/// Documented above. -#[cfg(windows)] -pub fn find_tool(target: &str, tool: &str) -> Option { - use std::env; - use std::ffi::OsString; - use std::io; - use std::fs; - use std::path::{Path, PathBuf}; - use registry::{RegistryKey, LOCAL_MACHINE}; - - if !target.contains("msvc") { return None } - - // When finding binaries the 32-bit version is at the top level but the - // versions to cross to other architectures are stored in sub-folders. - // Unknown architectures also just bail out early to return the standard - // `link.exe` command. - let extra = if target.starts_with("i686") { - "" - } else if target.starts_with("x86_64") { - "amd64" - } else if target.starts_with("arm") { - "arm" - } else { - return None - }; - - let vs_install_dir = get_vs_install_dir(); - let mut path_to_add = None; - - // First up, we need to find the `link.exe` binary itself, and there's a few - // locations that we can look. First up is the standard VCINSTALLDIR - // environment variable which is normally set by the vcvarsall.bat file. If - // an environment is set up manually by whomever's driving the compiler then - // we shouldn't muck with that decision and should instead respect that. - // - // Finally we read the Windows registry to discover the VS install root. - // From here we probe just to make sure that it exists. - let mut cmd = env::var_os("VCINSTALLDIR").and_then(|dir| { - let mut p = PathBuf::from(dir); - p.push("bin"); - p.push(extra); - let tool = p.join(tool); - if fs::metadata(&tool).is_ok() { - path_to_add = Some(p); - Some(tool) - } else { - None - } - }).or_else(|| { - env::var_os("PATH").and_then(|path| { - env::split_paths(&path).map(|p| p.join(tool)).find(|path| { - fs::metadata(path).is_ok() - }) - }) - }).or_else(|| { - vs_install_dir.as_ref().and_then(|p| { - let mut p = p.join("VC/bin"); - p.push(extra); - let tool = p.join(tool); - if fs::metadata(&tool).is_ok() { - path_to_add = Some(p); - Some(tool) - } else { - None - } - }) - }).map(|tool| { - Tool::new(tool.into()) - }).unwrap_or_else(|| { - Tool::new(tool.into()) - }); - - let mut paths = Vec::new(); - if let Some(path) = path_to_add { - paths.push(path); - if let Some(root) = get_windows_sdk_bin_path(target) { - paths.push(root); - } - } - if let Some(path) = env::var_os("PATH") { - paths.extend(env::split_paths(&path)); - } - cmd.env.push(("PATH".into(), env::join_paths(&paths).unwrap().into())); - - // The MSVC compiler uses the INCLUDE environment variable as the default - // lookup path for headers. This environment variable is normally set up - // by the VS shells, so we only want to start adding our own pieces if it's - // not set. - // - // If we're adding our own pieces, then we need to add two primary - // directories to the default search path for the linker. The first is in - // the VS install direcotry and the next is the Windows SDK directory. - if env::var_os("INCLUDE").is_none() { - let mut includes = Vec::new(); - if let Some(ref vs_install_dir) = vs_install_dir { - includes.push(vs_install_dir.join("VC/include")); - if let Some((ucrt_root, vers)) = ucrt_install_dir(vs_install_dir) { - let include = ucrt_root.join("Include").join(vers); - includes.push(include.join("ucrt")); - includes.push(include.join("um")); - includes.push(include.join("winrt")); - includes.push(include.join("shared")); - } - } - if let Some((path, major)) = get_windows_sdk_path() { - if major >= 8 { - includes.push(path.join("include/shared")); - includes.push(path.join("include/um")); - includes.push(path.join("include/winrt")); - } else { - includes.push(path.join("include")); - } - } else if let Some(ref vs_install_dir) = vs_install_dir { - includes.push(vs_install_dir.clone()); - } - cmd.env.push(("INCLUDE".into(), - env::join_paths(&includes).unwrap().into())); - } - - // Similarly with INCLUDE above, let's set LIB if it's not defined. - if env::var_os("LIB").is_none() { - let mut libs = Vec::new(); - if let Some(ref vs_install_dir) = vs_install_dir { - libs.push(vs_install_dir.join("VC/lib").join(extra)); - if let Some((ucrt_root, vers)) = ucrt_install_dir(vs_install_dir) { - if let Some(arch) = windows_sdk_v8_subdir(target) { - let lib = ucrt_root.join("Lib").join(vers); - libs.push(lib.join("ucrt").join(arch)); - libs.push(lib.join("um").join(arch)); - } - } - } - if let Some(path) = get_windows_sdk_lib_path(target) { - libs.push(path); - } - cmd.env.push(("LIB".into(), env::join_paths(&libs).unwrap().into())); - } - - return Some(cmd); - - // When looking for the Visual Studio installation directory we look in a - // number of locations in varying degrees of precedence: - // - // 1. The Visual Studio registry keys - // 2. The Visual Studio Express registry keys - // 3. A number of somewhat standard environment variables - // - // If we find a hit from any of these keys then we strip off the IDE/Tools - // folders which are typically found at the end. - // - // As a final note, when we take a look at the registry keys they're - // typically found underneath the version of what's installed, but we don't - // quite know what's installed. As a result we probe all sub-keys of the two - // keys we're looking at to find out the maximum version of what's installed - // and we use that root directory. - fn get_vs_install_dir() -> Option { - LOCAL_MACHINE.open(r"SOFTWARE\Microsoft\VisualStudio".as_ref()).or_else(|_| { - LOCAL_MACHINE.open(r"SOFTWARE\Microsoft\VCExpress".as_ref()) - }).ok().and_then(|key| { - max_version(&key).and_then(|(_vers, key)| { - key.query_str("InstallDir").ok() - }) - }).or_else(|| { - env::var_os("VS120COMNTOOLS") - }).or_else(|| { - env::var_os("VS100COMNTOOLS") - }).or_else(|| { - env::var_os("VS90COMNTOOLS") - }).or_else(|| { - env::var_os("VS80COMNTOOLS") - }).map(PathBuf::from).and_then(|mut dir| { - if dir.ends_with("Common7/IDE") || dir.ends_with("Common7/Tools") { - dir.pop(); - dir.pop(); - Some(dir) - } else { - None - } - }) - } - - // Given a registry key, look at all the sub keys and find the one which has - // the maximal numeric value. - // - // Returns the name of the maximal key as well as the opened maximal key. - fn max_version(key: &RegistryKey) -> Option<(OsString, RegistryKey)> { - let mut max_vers = 0; - let mut max_key = None; - for subkey in key.iter().filter_map(|k| k.ok()) { - let val = subkey.to_str().and_then(|s| { - s.trim_left_matches("v").replace(".", "").parse().ok() - }); - let val = match val { - Some(s) => s, - None => continue, - }; - if val > max_vers { - if let Ok(k) = key.open(&subkey) { - max_vers = val; - max_key = Some((subkey, k)); - } - } - } - return max_key - } - - fn get_windows_sdk_path() -> Option<(PathBuf, usize)> { - let key = r"SOFTWARE\Microsoft\Microsoft SDKs\Windows"; - let key = LOCAL_MACHINE.open(key.as_ref()); - let (n, k) = match key.ok().as_ref().and_then(max_version) { - Some(p) => p, - None => return None, - }; - let mut parts = n.to_str().unwrap().trim_left_matches("v").splitn(2, "."); - let major = parts.next().unwrap().parse::().unwrap(); - let _minor = parts.next().unwrap().parse::().unwrap(); - k.query_str("InstallationFolder").ok().map(|p| { - (PathBuf::from(p), major) - }) - } - - fn get_windows_sdk_lib_path(target: &str) -> Option { - let (mut root, major) = match get_windows_sdk_path() { - Some(pair) => pair, - None => return None, - }; - root.push("Lib"); - if major <= 7 { - // In Windows SDK 7.x, x86 libraries are directly in the Lib - // folder, x64 libraries are inside, and it's not necessary to - // link agains the SDK 7.x when targeting ARM or other - // architectures. - if target.starts_with("i686") { - Some(root) - } else if target.starts_with("x86_64") { - Some(root.join("x64")) - } else { - None - } - } else { - // Windows SDK 8.x installes libraries in a folder whose names - // depend on the version of the OS you're targeting. By default - // choose the newest, which usually corresponds to the version of - // the OS you've installed the SDK on. - let extra = match windows_sdk_v8_subdir(target) { - Some(extra) => extra, - None => return None, - }; - ["winv6.3", "win8", "win7"].iter().map(|p| root.join(p)).find(|part| { - fs::metadata(part).is_ok() - }).map(|path| { - path.join("um").join(extra) - }) - } - } - - fn get_windows_sdk_bin_path(target: &str) -> Option { - let (mut root, major) = match get_windows_sdk_path() { - Some(pair) => pair, - None => return None, - }; - root.push("bin"); - if major <= 7 { - None // untested path, not sure if this dir exists - } else { - root.push(match windows_sdk_v8_subdir(target) { - Some(extra) => extra, - None => return None, - }); - if fs::metadata(&root).is_ok() {Some(root)} else {None} - } - } - - fn windows_sdk_v8_subdir(target: &str) -> Option<&'static str> { - if target.starts_with("i686") { - Some("x86") - } else if target.starts_with("x86_64") { - Some("x64") - } else if target.starts_with("arm") { - Some("arm") - } else { - None - } - } - - fn ucrt_install_dir(vs_install_dir: &Path) -> Option<(PathBuf, String)> { - let is_vs_14 = vs_install_dir.iter().filter_map(|p| p.to_str()).any(|s| { - s == "Microsoft Visual Studio 14.0" - }); - if !is_vs_14 { - return None - } - let key = r"SOFTWARE\Microsoft\Windows Kits\Installed Roots"; - let sdk_dir = LOCAL_MACHINE.open(key.as_ref()).and_then(|p| { - p.query_str("KitsRoot10") - }).map(PathBuf::from); - let sdk_dir = match sdk_dir { - Ok(p) => p, - Err(..) => return None, - }; - (move || -> io::Result<_> { - let mut max = None; - let mut max_s = None; - for entry in try!(fs::read_dir(&sdk_dir.join("Lib"))) { - let entry = try!(entry); - if let Ok(s) = entry.file_name().into_string() { - if let Ok(u) = s.replace(".", "").parse::() { - if Some(u) > max { - max = Some(u); - max_s = Some(s); - } - } - } - } - Ok(max_s.map(|m| (sdk_dir, m))) - })().ok().and_then(|x| x) - } -} diff --git a/deps/libz-sys-1.0.1/.gitignore b/deps/gcc-0.3.26/.gitignore similarity index 100% rename from deps/libz-sys-1.0.1/.gitignore rename to deps/gcc-0.3.26/.gitignore diff --git a/deps/gcc-0.3.23/.travis.yml b/deps/gcc-0.3.26/.travis.yml similarity index 100% rename from deps/gcc-0.3.23/.travis.yml rename to deps/gcc-0.3.26/.travis.yml diff --git a/deps/gcc-0.3.26/Cargo.toml b/deps/gcc-0.3.26/Cargo.toml new file mode 100644 index 000000000..0e4c001d7 --- /dev/null +++ b/deps/gcc-0.3.26/Cargo.toml @@ -0,0 +1,17 @@ +[package] + +name = "gcc" +version = "0.3.26" +authors = ["Alex Crichton "] +license = "MIT/Apache-2.0" +repository = "https://github.com/alexcrichton/gcc-rs" +documentation = "http://alexcrichton.com/gcc-rs" +description = """ +A build-time dependency for Cargo build scripts to assist in invoking the native +C compiler to compile native C code into a static archive to be linked into Rust +code. +""" +keywords = ["build-dependencies"] + +[dev-dependencies] +tempdir = "0.3" diff --git a/deps/git2-0.4.2/LICENSE-APACHE b/deps/gcc-0.3.26/LICENSE-APACHE similarity index 100% rename from deps/git2-0.4.2/LICENSE-APACHE rename to deps/gcc-0.3.26/LICENSE-APACHE diff --git a/deps/gcc-0.3.23/LICENSE-MIT b/deps/gcc-0.3.26/LICENSE-MIT similarity index 100% rename from deps/gcc-0.3.23/LICENSE-MIT rename to deps/gcc-0.3.26/LICENSE-MIT diff --git a/deps/gcc-0.3.23/README.md b/deps/gcc-0.3.26/README.md similarity index 100% rename from deps/gcc-0.3.23/README.md rename to deps/gcc-0.3.26/README.md diff --git a/deps/gcc-0.3.23/appveyor.yml b/deps/gcc-0.3.26/appveyor.yml similarity index 100% rename from deps/gcc-0.3.23/appveyor.yml rename to deps/gcc-0.3.26/appveyor.yml diff --git a/deps/gcc-0.3.23/src/bin/gcc-shim.rs b/deps/gcc-0.3.26/src/bin/gcc-shim.rs similarity index 100% rename from deps/gcc-0.3.23/src/bin/gcc-shim.rs rename to deps/gcc-0.3.26/src/bin/gcc-shim.rs diff --git a/deps/gcc-0.3.26/src/lib.rs b/deps/gcc-0.3.26/src/lib.rs new file mode 100644 index 000000000..90d7805f9 --- /dev/null +++ b/deps/gcc-0.3.26/src/lib.rs @@ -0,0 +1,819 @@ +//! A library for build scripts to compile custom C code +//! +//! This library is intended to be used as a `build-dependencies` entry in +//! `Cargo.toml`: +//! +//! ```toml +//! [build-dependencies] +//! gcc = "0.3" +//! ``` +//! +//! The purpose of this crate is to provide the utility functions necessary to +//! compile C code into a static archive which is then linked into a Rust crate. +//! The top-level `compile_library` function serves as a convenience and more +//! advanced configuration is available through the `Config` builder. +//! +//! This crate will automatically detect situations such as cross compilation or +//! other environment variables set by Cargo and will build code appropriately. +//! +//! # Examples +//! +//! Use the default configuration: +//! +//! ```no_run +//! extern crate gcc; +//! +//! fn main() { +//! gcc::compile_library("libfoo.a", &["src/foo.c"]); +//! } +//! ``` +//! +//! Use more advanced configuration: +//! +//! ```no_run +//! extern crate gcc; +//! +//! fn main() { +//! gcc::Config::new() +//! .file("src/foo.c") +//! .define("FOO", Some("bar")) +//! .include("src") +//! .compile("libfoo.a"); +//! } +//! ``` + +#![doc(html_root_url = "http://alexcrichton.com/gcc-rs")] +#![cfg_attr(test, deny(warnings))] +#![deny(missing_docs)] + +use std::env; +use std::ffi::{OsString, OsStr}; +use std::fs; +use std::io; +use std::path::{PathBuf, Path}; +use std::process::{Command, Stdio}; + +#[cfg(windows)] +mod registry; +pub mod windows_registry; + +/// Extra configuration to pass to gcc. +pub struct Config { + include_directories: Vec, + definitions: Vec<(String, Option)>, + objects: Vec, + flags: Vec, + files: Vec, + cpp: bool, + cpp_link_stdlib: Option>, + cpp_set_stdlib: Option, + target: Option, + host: Option, + out_dir: Option, + opt_level: Option, + debug: Option, + env: Vec<(OsString, OsString)>, + compiler: Option, + archiver: Option, + cargo_metadata: bool, + pic: Option, +} + +/// Configuration used to represent an invocation of a C compiler. +/// +/// This can be used to figure out what compiler is in use, what the arguments +/// to it are, and what the environment variables look like for the compiler. +/// This can be used to further configure other build systems (e.g. forward +/// along CC and/or CFLAGS) or the `to_command` method can be used to run the +/// compiler itself. +pub struct Tool { + path: PathBuf, + args: Vec, + env: Vec<(OsString, OsString)>, +} + +/// Compile a library from the given set of input C files. +/// +/// This will simply compile all files into object files and then assemble them +/// into the output. This will read the standard environment variables to detect +/// cross compilations and such. +/// +/// This function will also print all metadata on standard output for Cargo. +/// +/// # Example +/// +/// ```no_run +/// gcc::compile_library("libfoo.a", &["foo.c", "bar.c"]); +/// ``` +pub fn compile_library(output: &str, files: &[&str]) { + let mut c = Config::new(); + for f in files.iter() { + c.file(*f); + } + c.compile(output) +} + +impl Config { + /// Construct a new instance of a blank set of configuration. + /// + /// This builder is finished with the `compile` function. + pub fn new() -> Config { + Config { + include_directories: Vec::new(), + definitions: Vec::new(), + objects: Vec::new(), + flags: Vec::new(), + files: Vec::new(), + cpp: false, + cpp_link_stdlib: None, + cpp_set_stdlib: None, + target: None, + host: None, + out_dir: None, + opt_level: None, + debug: None, + env: Vec::new(), + compiler: None, + archiver: None, + cargo_metadata: true, + pic: None, + } + } + + /// Add a directory to the `-I` or include path for headers + pub fn include>(&mut self, dir: P) -> &mut Config { + self.include_directories.push(dir.as_ref().to_path_buf()); + self + } + + /// Specify a `-D` variable with an optional value. + pub fn define(&mut self, var: &str, val: Option<&str>) -> &mut Config { + self.definitions.push((var.to_string(), val.map(|s| s.to_string()))); + self + } + + /// Add an arbitrary object file to link in + pub fn object>(&mut self, obj: P) -> &mut Config { + self.objects.push(obj.as_ref().to_path_buf()); + self + } + + /// Add an arbitrary flag to the invocation of the compiler + pub fn flag(&mut self, flag: &str) -> &mut Config { + self.flags.push(flag.to_string()); + self + } + + /// Add a file which will be compiled + pub fn file>(&mut self, p: P) -> &mut Config { + self.files.push(p.as_ref().to_path_buf()); + self + } + + /// Set C++ support. + /// + /// The other `cpp_*` options will only become active if this is set to + /// `true`. + pub fn cpp(&mut self, cpp: bool) -> &mut Config { + self.cpp = cpp; + self + } + + /// Set the standard library to link against when compiling with C++ + /// support. + /// + /// The default value of this property depends on the current target: On + /// OS X `Some("c++")` is used, when compiling for a Visual Studio based + /// target `None` is used and for other targets `Some("stdc++")` is used. + /// + /// A value of `None` indicates that no automatic linking should happen, + /// otherwise cargo will link against the specified library. + /// + /// The given library name must not contain the `lib` prefix. + pub fn cpp_link_stdlib(&mut self, cpp_link_stdlib: Option<&str>) + -> &mut Config { + self.cpp_link_stdlib = Some(cpp_link_stdlib.map(|s| s.into())); + self + } + + /// Force the C++ compiler to use the specified standard library. + /// + /// Setting this option will automatically set `cpp_link_stdlib` to the same + /// value. + /// + /// The default value of this option is always `None`. + /// + /// This option has no effect when compiling for a Visual Studio based + /// target. + /// + /// This option sets the `-stdlib` flag, which is only supported by some + /// compilers (clang, icc) but not by others (gcc). The library will not + /// detect which compiler is used, as such it is the responsibility of the + /// caller to ensure that this option is only used in conjuction with a + /// compiler which supports the `-stdlib` flag. + /// + /// A value of `None` indicates that no specific C++ standard library should + /// be used, otherwise `-stdlib` is added to the compile invocation. + /// + /// The given library name must not contain the `lib` prefix. + pub fn cpp_set_stdlib(&mut self, cpp_set_stdlib: Option<&str>) + -> &mut Config { + self.cpp_set_stdlib = cpp_set_stdlib.map(|s| s.into()); + self.cpp_link_stdlib(cpp_set_stdlib); + self + } + + /// Configures the target this configuration will be compiling for. + /// + /// This option is automatically scraped from the `TARGET` environment + /// variable by build scripts, so it's not required to call this function. + pub fn target(&mut self, target: &str) -> &mut Config { + self.target = Some(target.to_string()); + self + } + + /// Configures the host assumed by this configuration. + /// + /// This option is automatically scraped from the `HOST` environment + /// variable by build scripts, so it's not required to call this function. + pub fn host(&mut self, host: &str) -> &mut Config { + self.host = Some(host.to_string()); + self + } + + /// Configures the optimization level of the generated object files. + /// + /// This option is automatically scraped from the `OPT_LEVEL` environment + /// variable by build scripts, so it's not required to call this function. + pub fn opt_level(&mut self, opt_level: u32) -> &mut Config { + self.opt_level = Some(opt_level); + self + } + + /// Configures whether the compiler will emit debug information when + /// generating object files. + /// + /// This option is automatically scraped from the `PROFILE` environment + /// variable by build scripts (only enabled when the profile is "debug"), so + /// it's not required to call this function. + pub fn debug(&mut self, debug: bool) -> &mut Config { + self.debug = Some(debug); + self + } + + /// Configures the output directory where all object files and static + /// libraries will be located. + /// + /// This option is automatically scraped from the `OUT_DIR` environment + /// variable by build scripts, so it's not required to call this function. + pub fn out_dir>(&mut self, out_dir: P) -> &mut Config { + self.out_dir = Some(out_dir.as_ref().to_owned()); + self + } + + /// Configures the compiler to be used to produce output. + /// + /// This option is automatically determined from the target platform or a + /// number of environment variables, so it's not required to call this + /// function. + pub fn compiler>(&mut self, compiler: P) -> &mut Config { + self.compiler = Some(compiler.as_ref().to_owned()); + self + } + + /// Configures the tool used to assemble archives. + /// + /// This option is automatically determined from the target platform or a + /// number of environment variables, so it's not required to call this + /// function. + pub fn archiver>(&mut self, archiver: P) -> &mut Config { + self.archiver = Some(archiver.as_ref().to_owned()); + self + } + /// Define whether metadata should be emitted for cargo allowing it to + /// automatically link the binary. Defaults to `true`. + pub fn cargo_metadata(&mut self, cargo_metadata: bool) -> &mut Config { + self.cargo_metadata = cargo_metadata; + self + } + + /// Configures whether the compiler will emit position independent code. + /// + /// This option defaults to `false` for `i686` and `windows-gnu` targets and to `true` for all + /// other targets. + pub fn pic(&mut self, pic: bool) -> &mut Config { + self.pic = Some(pic); + self + } + + + #[doc(hidden)] + pub fn __set_env(&mut self, a: A, b: B) -> &mut Config + where A: AsRef, B: AsRef + { + self.env.push((a.as_ref().to_owned(), b.as_ref().to_owned())); + self + } + + /// Run the compiler, generating the file `output` + /// + /// The name `output` must begin with `lib` and end with `.a` + pub fn compile(&self, output: &str) { + assert!(output.starts_with("lib")); + assert!(output.ends_with(".a")); + let lib_name = &output[3..output.len() - 2]; + let dst = self.get_out_dir(); + + let mut objects = Vec::new(); + for file in self.files.iter() { + let obj = dst.join(file).with_extension("o"); + self.compile_object(file, &obj); + objects.push(obj); + } + + self.assemble(lib_name, &dst.join(output), &objects); + + self.print(&format!("cargo:rustc-link-lib=static={}", + &output[3..output.len() - 2])); + self.print(&format!("cargo:rustc-link-search=native={}", dst.display())); + + // Add specific C++ libraries, if enabled. + if self.cpp { + if let Some(stdlib) = self.get_cpp_link_stdlib() { + self.print(&format!("cargo:rustc-link-lib={}", stdlib)); + } + } + } + + fn compile_object(&self, file: &Path, dst: &Path) { + let is_asm = file.extension().and_then(|s| s.to_str()) == Some("asm"); + let msvc = self.get_target().contains("msvc"); + let (mut cmd, name) = if msvc && is_asm { + self.msvc_macro_assembler() + } else { + let compiler = self.get_compiler(); + let mut cmd = compiler.to_command(); + for &(ref a, ref b) in self.env.iter() { + cmd.env(a, b); + } + (cmd, compiler.path.file_name().unwrap() + .to_string_lossy().into_owned()) + }; + fs::create_dir_all(&dst.parent().unwrap()).unwrap(); + if msvc && is_asm { + cmd.arg("/Fo").arg(dst); + } else if msvc { + let mut s = OsString::from("/Fo"); + s.push(&dst); + cmd.arg(s); + } else { + cmd.arg("-o").arg(&dst); + } + cmd.arg(if msvc {"/c"} else {"-c"}); + cmd.arg(file); + + run(&mut cmd, &name); + } + + /// Get the compiler that's in use for this configuration. + /// + /// This function will return a `Tool` which represents the culmination + /// of this configuration at a snapshot in time. The returned compiler can + /// be inspected (e.g. the path, arguments, environment) to forward along to + /// other tools, or the `to_command` method can be used to invoke the + /// compiler itself. + /// + /// This method will take into account all configuration such as debug + /// information, optimization level, include directories, defines, etc. + /// Additionally, the compiler binary in use follows the standard + /// conventions for this path, e.g. looking at the explicitly set compiler, + /// environment variables (a number of which are inspected here), and then + /// falling back to the default configuration. + pub fn get_compiler(&self) -> Tool { + let opt_level = self.get_opt_level(); + let debug = self.get_debug(); + let target = self.get_target(); + let msvc = target.contains("msvc"); + self.print(&format!("debug={} opt-level={}", debug, opt_level)); + + let mut cmd = self.get_base_compiler(); + let nvcc = cmd.path.to_str() + .map(|path| path.contains("nvcc")) + .unwrap_or(false); + + if msvc { + cmd.args.push("/nologo".into()); + cmd.args.push("/MD".into()); // link against msvcrt.dll for now + if opt_level != 0 { + cmd.args.push("/O2".into()); + } + if target.contains("i686") { + cmd.args.push("/SAFESEH".into()); + } + } else if nvcc { + cmd.args.push(format!("-O{}", opt_level).into()); + } else { + cmd.args.push(format!("-O{}", opt_level).into()); + cmd.args.push("-ffunction-sections".into()); + cmd.args.push("-fdata-sections".into()); + } + for arg in self.envflags(if self.cpp {"CXXFLAGS"} else {"CFLAGS"}) { + cmd.args.push(arg.into()); + } + + if debug { + cmd.args.push(if msvc {"/Z7"} else {"-g"}.into()); + } + + if target.contains("-ios") { + self.ios_flags(&mut cmd); + } else if !msvc { + if target.contains("i686") { + cmd.args.push("-m32".into()); + } else if target.contains("x86_64") || target.contains("powerpc64") { + cmd.args.push("-m64".into()); + } + + if !nvcc && self.pic.unwrap_or(!target.contains("i686") && !target.contains("windows-gnu")) { + cmd.args.push("-fPIC".into()); + } else if nvcc && self.pic.unwrap_or(false) { + cmd.args.push("-Xcompiler".into()); + cmd.args.push("\'-fPIC\'".into()); + } + if target.contains("musl") { + cmd.args.push("-static".into()); + } + + if target == "armv7-unknown-linux-gnueabihf" { + cmd.args.push("-march=armv7-a".into()); + } + if target == "arm-unknown-linux-gnueabihf" { + cmd.args.push("-march=armv6".into()); + cmd.args.push("-marm".into()); + } + if target == "arm-unknown-linux-gnueabi" { + cmd.args.push("-march=armv6".into()); + cmd.args.push("-marm".into()); + } + } + + if self.cpp && !msvc { + if let Some(ref stdlib) = self.cpp_set_stdlib { + cmd.args.push(format!("-stdlib=lib{}", stdlib).into()); + } + } + + for directory in self.include_directories.iter() { + cmd.args.push(if msvc {"/I"} else {"-I"}.into()); + cmd.args.push(directory.into()); + } + + for flag in self.flags.iter() { + cmd.args.push(flag.into()); + } + + for &(ref key, ref value) in self.definitions.iter() { + let lead = if msvc {"/"} else {"-"}; + if let &Some(ref value) = value { + cmd.args.push(format!("{}D{}={}", lead, key, value).into()); + } else { + cmd.args.push(format!("{}D{}", lead, key).into()); + } + } + cmd + } + + fn msvc_macro_assembler(&self) -> (Command, String) { + let target = self.get_target(); + let tool = if target.contains("x86_64") {"ml64.exe"} else {"ml.exe"}; + let mut cmd = windows_registry::find(&target, tool).unwrap_or_else(|| { + self.cmd(tool) + }); + for directory in self.include_directories.iter() { + cmd.arg("/I").arg(directory); + } + for &(ref key, ref value) in self.definitions.iter() { + if let &Some(ref value) = value { + cmd.arg(&format!("/D{}={}", key, value)); + } else { + cmd.arg(&format!("/D{}", key)); + } + } + + if target.contains("i686") { + cmd.arg("/safeseh"); + } + for flag in self.flags.iter() { + cmd.arg(flag); + } + + (cmd, tool.to_string()) + } + + fn assemble(&self, lib_name: &str, dst: &Path, objects: &[PathBuf]) { + let target = self.get_target(); + if target.contains("msvc") { + let mut cmd = match self.archiver { + Some(ref s) => self.cmd(s), + None => windows_registry::find(&target, "lib.exe") + .unwrap_or(self.cmd("lib.exe")), + }; + let mut out = OsString::from("/OUT:"); + out.push(dst); + run(cmd.arg(out).arg("/nologo") + .args(objects) + .args(&self.objects), "lib.exe"); + + // The Rust compiler will look for libfoo.a and foo.lib, but the + // MSVC linker will also be passed foo.lib, so be sure that both + // exist for now. + let lib_dst = dst.with_file_name(format!("{}.lib", lib_name)); + let _ = fs::remove_file(&lib_dst); + fs::hard_link(&dst, &lib_dst).or_else(|_| { + //if hard-link fails, just copy (ignoring the number of bytes written) + fs::copy(&dst, &lib_dst).map(|_| ()) + }).ok().expect("Copying from {:?} to {:?} failed.");; + } else { + let ar = self.get_ar(); + let cmd = ar.file_name().unwrap().to_string_lossy(); + run(self.cmd(&ar).arg("crus") + .arg(dst) + .args(objects) + .args(&self.objects), &cmd); + } + } + + fn ios_flags(&self, cmd: &mut Tool) { + enum ArchSpec { + Device(&'static str), + Simulator(&'static str), + } + + let target = self.get_target(); + let arch = target.split('-').nth(0).unwrap(); + let arch = match arch { + "arm" | "armv7" | "thumbv7" => ArchSpec::Device("armv7"), + "armv7s" | "thumbv7s" => ArchSpec::Device("armv7s"), + "arm64" | "aarch64" => ArchSpec::Device("arm64"), + "i386" | "i686" => ArchSpec::Simulator("-m32"), + "x86_64" => ArchSpec::Simulator("-m64"), + _ => fail("Unknown arch for iOS target") + }; + + let sdk = match arch { + ArchSpec::Device(arch) => { + cmd.args.push("-arch".into()); + cmd.args.push(arch.into()); + cmd.args.push("-miphoneos-version-min=7.0".into()); + "iphoneos" + }, + ArchSpec::Simulator(arch) => { + cmd.args.push(arch.into()); + cmd.args.push("-mios-simulator-version-min=7.0".into()); + "iphonesimulator" + } + }; + + self.print(&format!("Detecting iOS SDK path for {}", sdk)); + let sdk_path = self.cmd("xcrun") + .arg("--show-sdk-path") + .arg("--sdk") + .arg(sdk) + .stderr(Stdio::inherit()) + .output() + .unwrap() + .stdout; + + let sdk_path = String::from_utf8(sdk_path).unwrap(); + + cmd.args.push("-isysroot".into()); + cmd.args.push(sdk_path.trim().into()); + } + + fn cmd>(&self, prog: P) -> Command { + let mut cmd = Command::new(prog); + for &(ref a, ref b) in self.env.iter() { + cmd.env(a, b); + } + return cmd + } + + fn get_base_compiler(&self) -> Tool { + if let Some(ref c) = self.compiler { + return Tool::new(c.clone()) + } + let host = self.get_host(); + let target = self.get_target(); + let (env, msvc, gnu, default) = if self.cpp { + ("CXX", "cl.exe", "g++", "c++") + } else { + ("CC", "cl.exe", "gcc", "cc") + }; + self.get_var(env).ok().map(|env| { + Tool::new(PathBuf::from(env)) + }).or_else(|| { + windows_registry::find_tool(&target, "cl.exe") + }).unwrap_or_else(|| { + let compiler = if host.contains("windows") && + target.contains("windows") { + if target.contains("msvc") { + msvc.to_string() + } else { + format!("{}.exe", gnu) + } + } else if target.contains("android") { + format!("{}-{}", target, gnu) + } else if self.get_host() != target { + let prefix = match &target[..] { + "aarch64-unknown-linux-gnu" => Some("aarch64-linux-gnu"), + "arm-unknown-linux-gnueabi" => Some("arm-linux-gnueabi"), + "arm-unknown-linux-gnueabihf" => Some("arm-linux-gnueabihf"), + "armv7-unknown-linux-gnueabihf" => Some("arm-linux-gnueabihf"), + "powerpc-unknown-linux-gnu" => Some("powerpc-linux-gnu"), + "powerpc64-unknown-linux-gnu" => Some("powerpc-linux-gnu"), + "powerpc64le-unknown-linux-gnu" => Some("powerpc64le-linux-gnu"), + "mips-unknown-linux-gnu" => Some("mips-linux-gnu"), + "mipsel-unknown-linux-gnu" => Some("mipsel-linux-gnu"), + "i686-pc-windows-gnu" => Some("i686-w64-mingw32"), + "x86_64-pc-windows-gnu" => Some("x86_64-w64-mingw32"), + "x86_64-unknown-linux-musl" => Some("musl"), + "x86_64-rumprun-netbsd" => Some("x86_64-rumprun-netbsd"), + _ => None, + }; + match prefix { + Some(prefix) => format!("{}-{}", prefix, gnu), + None => default.to_string(), + } + } else { + default.to_string() + }; + Tool::new(PathBuf::from(compiler)) + }) + } + + fn get_var(&self, var_base: &str) -> Result { + let target = self.get_target(); + let host = self.get_host(); + let kind = if host == target {"HOST"} else {"TARGET"}; + let target_u = target.replace("-", "_"); + let res = self.getenv(&format!("{}_{}", var_base, target)) + .or_else(|| self.getenv(&format!("{}_{}", var_base, target_u))) + .or_else(|| self.getenv(&format!("{}_{}", kind, var_base))) + .or_else(|| self.getenv(var_base)); + + match res { + Some(res) => Ok(res), + None => Err("Could not get environment variable".to_string()), + } + } + + fn envflags(&self, name: &str) -> Vec { + self.get_var(name).unwrap_or(String::new()) + .split(|c: char| c.is_whitespace()).filter(|s| !s.is_empty()) + .map(|s| s.to_string()) + .collect() + } + + /// Returns the default C++ standard library for the current target: `libc++` + /// for OS X and `libstdc++` for anything else. + fn get_cpp_link_stdlib(&self) -> Option { + self.cpp_link_stdlib.clone().unwrap_or_else(|| { + let target = self.get_target(); + if target.contains("msvc") { + None + } else if target.contains("darwin") { + Some("c++".to_string()) + } else { + Some("stdc++".to_string()) + } + }) + } + + fn get_ar(&self) -> PathBuf { + self.archiver.clone().or_else(|| { + self.get_var("AR").map(PathBuf::from).ok() + }).unwrap_or_else(|| { + if self.get_target().contains("android") { + PathBuf::from(format!("{}-ar", self.get_target())) + } else { + PathBuf::from("ar") + } + }) + } + + fn get_target(&self) -> String { + self.target.clone().unwrap_or_else(|| self.getenv_unwrap("TARGET")) + } + + fn get_host(&self) -> String { + self.host.clone().unwrap_or_else(|| self.getenv_unwrap("HOST")) + } + + fn get_opt_level(&self) -> u32 { + self.opt_level.unwrap_or_else(|| { + self.getenv_unwrap("OPT_LEVEL").parse().unwrap() + }) + } + + fn get_debug(&self) -> bool { + self.debug.unwrap_or_else(|| self.getenv_unwrap("PROFILE") == "debug") + } + + fn get_out_dir(&self) -> PathBuf { + self.out_dir.clone().unwrap_or_else(|| { + env::var_os("OUT_DIR").map(PathBuf::from).unwrap() + }) + } + + fn getenv(&self, v: &str) -> Option { + let r = env::var(v).ok(); + self.print(&format!("{} = {:?}", v, r)); + r + } + + fn getenv_unwrap(&self, v: &str) -> String { + match self.getenv(v) { + Some(s) => s, + None => fail(&format!("environment variable `{}` not defined", v)), + } + } + + fn print(&self, s: &str) { + if self.cargo_metadata { + println!("{}", s); + } + } +} + +impl Tool { + fn new(path: PathBuf) -> Tool { + Tool { + path: path, + args: Vec::new(), + env: Vec::new(), + } + } + + /// Converts this compiler into a `Command` that's ready to be run. + /// + /// This is useful for when the compiler needs to be executed and the + /// command returned will already have the initial arguments and environment + /// variables configured. + pub fn to_command(&self) -> Command { + let mut cmd = Command::new(&self.path); + cmd.args(&self.args); + for &(ref k, ref v) in self.env.iter() { + cmd.env(k, v); + } + return cmd + } + + /// Returns the path for this compiler. + /// + /// Note that this may not be a path to a file on the filesystem, e.g. "cc", + /// but rather something which will be resolved when a process is spawned. + pub fn path(&self) -> &Path { + &self.path + } + + /// Returns the default set of arguments to the compiler needed to produce + /// executables for the target this compiler generates. + pub fn args(&self) -> &[OsString] { + &self.args + } + + /// Returns the set of environment variables needed for this compiler to + /// operate. + /// + /// This is typically only used for MSVC compilers currently. + pub fn env(&self) -> &[(OsString, OsString)] { + &self.env + } +} + +fn run(cmd: &mut Command, program: &str) { + println!("running: {:?}", cmd); + let status = match cmd.status() { + Ok(status) => status, + Err(ref e) if e.kind() == io::ErrorKind::NotFound => { + let extra = if cfg!(windows) { + " (see https://github.com/alexcrichton/gcc-rs#compile-time-requirements \ + for help)" + } else { + "" + }; + fail(&format!("failed to execute command: {}\nIs `{}` \ + not installed?{}", e, program, extra)); + } + Err(e) => fail(&format!("failed to execute command: {}", e)), + }; + println!("{:?}", status); + if !status.success() { + fail(&format!("command did not execute successfully, got: {}", status)); + } +} + +fn fail(s: &str) -> ! { + println!("\n\n{}\n\n", s); + panic!() +} diff --git a/deps/gcc-0.3.23/src/registry.rs b/deps/gcc-0.3.26/src/registry.rs similarity index 100% rename from deps/gcc-0.3.23/src/registry.rs rename to deps/gcc-0.3.26/src/registry.rs diff --git a/deps/gcc-0.3.26/src/windows_registry.rs b/deps/gcc-0.3.26/src/windows_registry.rs new file mode 100644 index 000000000..350fb7628 --- /dev/null +++ b/deps/gcc-0.3.26/src/windows_registry.rs @@ -0,0 +1,381 @@ +// Copyright 2015 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +//! A helper module to probe the Windows Registry when looking for +//! windows-specific tools. + +use std::process::Command; + +use Tool; + +/// Attempts to find a tool within an MSVC installation using the Windows +/// registry as a point to search from. +/// +/// The `target` argument is the target that the tool should work for (e.g. +/// compile or link for) and the `tool` argument is the tool to find (e.g. +/// `cl.exe` or `link.exe`). +/// +/// This function will return `None` if the tool could not be found, or it will +/// return `Some(cmd)` which represents a command that's ready to execute the +/// tool with the appropriate environment variables set. +/// +/// Note that this function always returns `None` for non-MSVC targets. +pub fn find(target: &str, tool: &str) -> Option { + find_tool(target, tool).map(|c| c.to_command()) +} + +/// Similar to the `find` function above, this function will attempt the same +/// operation (finding a MSVC tool in a local install) but instead returns a +/// `Tool` which may be introspected. +#[cfg(not(windows))] +pub fn find_tool(_target: &str, _tool: &str) -> Option { + None +} + +/// Documented above. +#[cfg(windows)] +pub fn find_tool(target: &str, tool: &str) -> Option { + use std::env; + use std::ffi::OsString; + use std::io; + use std::fs; + use std::path::{Path, PathBuf}; + use registry::{RegistryKey, LOCAL_MACHINE}; + + if !target.contains("msvc") { return None } + + if tool.contains("msbuild") { + return find_msbuild(target) + } + + // When finding binaries the 32-bit version is at the top level but the + // versions to cross to other architectures are stored in sub-folders. + // Unknown architectures also just bail out early to return the standard + // `link.exe` command. + let extra = if target.starts_with("i686") { + "" + } else if target.starts_with("x86_64") { + "amd64" + } else if target.starts_with("arm") { + "arm" + } else { + return None + }; + + let vs_install_dir = get_vs_install_dir(); + let mut path_to_add = None; + + // First up, we need to find the `link.exe` binary itself, and there's a few + // locations that we can look. First up is the standard VCINSTALLDIR + // environment variable which is normally set by the vcvarsall.bat file. If + // an environment is set up manually by whomever's driving the compiler then + // we shouldn't muck with that decision and should instead respect that. + // + // Finally we read the Windows registry to discover the VS install root. + // From here we probe just to make sure that it exists. + let mut cmd = env::var_os("VCINSTALLDIR").and_then(|dir| { + let mut p = PathBuf::from(dir); + p.push("bin"); + p.push(extra); + let tool = p.join(tool); + if fs::metadata(&tool).is_ok() { + path_to_add = Some(p); + Some(tool) + } else { + None + } + }).or_else(|| { + env::var_os("PATH").and_then(|path| { + env::split_paths(&path).map(|p| p.join(tool)).find(|path| { + fs::metadata(path).is_ok() + }) + }) + }).or_else(|| { + vs_install_dir.as_ref().and_then(|p| { + let mut p = p.join("VC/bin"); + p.push(extra); + let tool = p.join(tool); + if fs::metadata(&tool).is_ok() { + path_to_add = Some(p); + Some(tool) + } else { + None + } + }) + }).map(|tool| { + Tool::new(tool.into()) + }).unwrap_or_else(|| { + Tool::new(tool.into()) + }); + + let mut paths = Vec::new(); + if let Some(path) = path_to_add { + paths.push(path); + if let Some(root) = get_windows_sdk_bin_path(target) { + paths.push(root); + } + } + if let Some(path) = env::var_os("PATH") { + paths.extend(env::split_paths(&path)); + } + cmd.env.push(("PATH".into(), env::join_paths(&paths).unwrap().into())); + + // The MSVC compiler uses the INCLUDE environment variable as the default + // lookup path for headers. This environment variable is normally set up + // by the VS shells, so we only want to start adding our own pieces if it's + // not set. + // + // If we're adding our own pieces, then we need to add two primary + // directories to the default search path for the linker. The first is in + // the VS install direcotry and the next is the Windows SDK directory. + if env::var_os("INCLUDE").is_none() { + let mut includes = Vec::new(); + if let Some(ref vs_install_dir) = vs_install_dir { + includes.push(vs_install_dir.join("VC/include")); + if let Some((ucrt_root, vers)) = ucrt_install_dir(vs_install_dir) { + let include = ucrt_root.join("Include").join(vers); + includes.push(include.join("ucrt")); + includes.push(include.join("um")); + includes.push(include.join("winrt")); + includes.push(include.join("shared")); + } + } + if let Some((path, major)) = get_windows_sdk_path() { + if major >= 8 { + includes.push(path.join("include/shared")); + includes.push(path.join("include/um")); + includes.push(path.join("include/winrt")); + } else { + includes.push(path.join("include")); + } + } else if let Some(ref vs_install_dir) = vs_install_dir { + includes.push(vs_install_dir.clone()); + } + cmd.env.push(("INCLUDE".into(), + env::join_paths(&includes).unwrap().into())); + } + + // Similarly with INCLUDE above, let's set LIB if it's not defined. + if env::var_os("LIB").is_none() { + let mut libs = Vec::new(); + if let Some(ref vs_install_dir) = vs_install_dir { + libs.push(vs_install_dir.join("VC/lib").join(extra)); + if let Some((ucrt_root, vers)) = ucrt_install_dir(vs_install_dir) { + if let Some(arch) = windows_sdk_v8_subdir(target) { + let lib = ucrt_root.join("Lib").join(vers); + libs.push(lib.join("ucrt").join(arch)); + libs.push(lib.join("um").join(arch)); + } + } + } + if let Some(path) = get_windows_sdk_lib_path(target) { + libs.push(path); + } + cmd.env.push(("LIB".into(), env::join_paths(&libs).unwrap().into())); + } + + return Some(cmd); + + // When looking for the Visual Studio installation directory we look in a + // number of locations in varying degrees of precedence: + // + // 1. The Visual Studio registry keys + // 2. The Visual Studio Express registry keys + // 3. A number of somewhat standard environment variables + // + // If we find a hit from any of these keys then we strip off the IDE/Tools + // folders which are typically found at the end. + // + // As a final note, when we take a look at the registry keys they're + // typically found underneath the version of what's installed, but we don't + // quite know what's installed. As a result we probe all sub-keys of the two + // keys we're looking at to find out the maximum version of what's installed + // and we use that root directory. + fn get_vs_install_dir() -> Option { + LOCAL_MACHINE.open(r"SOFTWARE\Microsoft\VisualStudio".as_ref()).or_else(|_| { + LOCAL_MACHINE.open(r"SOFTWARE\Microsoft\VCExpress".as_ref()) + }).ok().and_then(|key| { + max_version(&key).and_then(|(_vers, key)| { + key.query_str("InstallDir").ok() + }) + }).or_else(|| { + env::var_os("VS120COMNTOOLS") + }).or_else(|| { + env::var_os("VS100COMNTOOLS") + }).or_else(|| { + env::var_os("VS90COMNTOOLS") + }).or_else(|| { + env::var_os("VS80COMNTOOLS") + }).map(PathBuf::from).and_then(|mut dir| { + if dir.ends_with("Common7/IDE") || dir.ends_with("Common7/Tools") { + dir.pop(); + dir.pop(); + Some(dir) + } else { + None + } + }) + } + + // Given a registry key, look at all the sub keys and find the one which has + // the maximal numeric value. + // + // Returns the name of the maximal key as well as the opened maximal key. + fn max_version(key: &RegistryKey) -> Option<(OsString, RegistryKey)> { + let mut max_vers = 0; + let mut max_key = None; + for subkey in key.iter().filter_map(|k| k.ok()) { + let val = subkey.to_str().and_then(|s| { + s.trim_left_matches("v").replace(".", "").parse().ok() + }); + let val = match val { + Some(s) => s, + None => continue, + }; + if val > max_vers { + if let Ok(k) = key.open(&subkey) { + max_vers = val; + max_key = Some((subkey, k)); + } + } + } + return max_key + } + + fn get_windows_sdk_path() -> Option<(PathBuf, usize)> { + let key = r"SOFTWARE\Microsoft\Microsoft SDKs\Windows"; + let key = LOCAL_MACHINE.open(key.as_ref()); + let (n, k) = match key.ok().as_ref().and_then(max_version) { + Some(p) => p, + None => return None, + }; + let mut parts = n.to_str().unwrap().trim_left_matches("v").splitn(2, "."); + let major = parts.next().unwrap().parse::().unwrap(); + let _minor = parts.next().unwrap().parse::().unwrap(); + k.query_str("InstallationFolder").ok().map(|p| { + (PathBuf::from(p), major) + }) + } + + fn get_windows_sdk_lib_path(target: &str) -> Option { + let (mut root, major) = match get_windows_sdk_path() { + Some(pair) => pair, + None => return None, + }; + root.push("Lib"); + if major <= 7 { + // In Windows SDK 7.x, x86 libraries are directly in the Lib + // folder, x64 libraries are inside, and it's not necessary to + // link agains the SDK 7.x when targeting ARM or other + // architectures. + if target.starts_with("i686") { + Some(root) + } else if target.starts_with("x86_64") { + Some(root.join("x64")) + } else { + None + } + } else { + // Windows SDK 8.x installes libraries in a folder whose names + // depend on the version of the OS you're targeting. By default + // choose the newest, which usually corresponds to the version of + // the OS you've installed the SDK on. + let extra = match windows_sdk_v8_subdir(target) { + Some(extra) => extra, + None => return None, + }; + ["winv6.3", "win8", "win7"].iter().map(|p| root.join(p)).find(|part| { + fs::metadata(part).is_ok() + }).map(|path| { + path.join("um").join(extra) + }) + } + } + + fn get_windows_sdk_bin_path(target: &str) -> Option { + let (mut root, major) = match get_windows_sdk_path() { + Some(pair) => pair, + None => return None, + }; + root.push("bin"); + if major <= 7 { + None // untested path, not sure if this dir exists + } else { + root.push(match windows_sdk_v8_subdir(target) { + Some(extra) => extra, + None => return None, + }); + if fs::metadata(&root).is_ok() {Some(root)} else {None} + } + } + + fn windows_sdk_v8_subdir(target: &str) -> Option<&'static str> { + if target.starts_with("i686") { + Some("x86") + } else if target.starts_with("x86_64") { + Some("x64") + } else if target.starts_with("arm") { + Some("arm") + } else { + None + } + } + + fn ucrt_install_dir(vs_install_dir: &Path) -> Option<(PathBuf, String)> { + let is_vs_14 = vs_install_dir.iter().filter_map(|p| p.to_str()).any(|s| { + s == "Microsoft Visual Studio 14.0" + }); + if !is_vs_14 { + return None + } + let key = r"SOFTWARE\Microsoft\Windows Kits\Installed Roots"; + let sdk_dir = LOCAL_MACHINE.open(key.as_ref()).and_then(|p| { + p.query_str("KitsRoot10") + }).map(PathBuf::from); + let sdk_dir = match sdk_dir { + Ok(p) => p, + Err(..) => return None, + }; + (move || -> io::Result<_> { + let mut max = None; + let mut max_s = None; + for entry in try!(fs::read_dir(&sdk_dir.join("Lib"))) { + let entry = try!(entry); + if let Ok(s) = entry.file_name().into_string() { + if let Ok(u) = s.replace(".", "").parse::() { + if Some(u) > max { + max = Some(u); + max_s = Some(s); + } + } + } + } + Ok(max_s.map(|m| (sdk_dir, m))) + })().ok().and_then(|x| x) + } + + // see http://stackoverflow.com/questions/328017/path-to-msbuild + fn find_msbuild(target: &str) -> Option { + let key = r"SOFTWARE\Microsoft\MSBuild\ToolsVersions"; + LOCAL_MACHINE.open(key.as_ref()).ok().and_then(|key| { + max_version(&key).and_then(|(_vers, key)| { + key.query_str("MSBuildToolsPath").ok() + }) + }).map(|path| { + let mut path = PathBuf::from(path); + path.push("MSBuild.exe"); + let mut tool = Tool::new(path); + if target.contains("x86_64") { + tool.env.push(("Platform".into(), "X64".into())); + } + tool + }) + } +} diff --git a/deps/gcc-0.3.23/tests/test.rs b/deps/gcc-0.3.26/tests/test.rs similarity index 100% rename from deps/gcc-0.3.23/tests/test.rs rename to deps/gcc-0.3.26/tests/test.rs diff --git a/deps/git2-0.4.2/Cargo.toml b/deps/git2-0.4.2/Cargo.toml deleted file mode 100644 index 6fa9d2aea..000000000 --- a/deps/git2-0.4.2/Cargo.toml +++ /dev/null @@ -1,34 +0,0 @@ -[package] - -name = "git2" -version = "0.4.2" -authors = ["Alex Crichton "] -license = "MIT/Apache-2.0" -readme = "README.md" -keywords = ["git"] -repository = "https://github.com/alexcrichton/git2-rs" -homepage = "https://github.com/alexcrichton/git2-rs" -documentation = "http://alexcrichton.com/git2-rs" -description = """ -Bindings to libgit2 for interoperating with git repositories. This library is -both threadsafe and memory safe and allows both reading and writing git -repositories. -""" - -[dependencies] -url = "0.5" -bitflags = "0.1" -libc = "0.2" -libgit2-sys = { path = "libgit2-sys", version = "0.4.0" } - -[dev-dependencies] -docopt = "0.6" -rustc-serialize = "0.3" -time = "0.1" -tempdir = "0.3" - -[features] -unstable = [] -default = ["ssh", "https"] -ssh = ["libgit2-sys/ssh"] -https = ["libgit2-sys/https"] diff --git a/deps/git2-0.4.2/README.md b/deps/git2-0.4.2/README.md deleted file mode 100644 index 3ffd93086..000000000 --- a/deps/git2-0.4.2/README.md +++ /dev/null @@ -1,31 +0,0 @@ -# git2-rs - -[![Build Status](https://travis-ci.org/alexcrichton/git2-rs.svg?branch=master)](https://travis-ci.org/alexcrichton/git2-rs) -[![Build Status](https://ci.appveyor.com/api/projects/status/6vem3xgno2kuxnfm?svg=true)](https://ci.appveyor.com/project/alexcrichton/git2-rs) - -[Documentation](http://alexcrichton.com/git2-rs/git2/index.html) - -libgit2 bindings for Rust - -```toml -[dependencies] -git2 = "0.3" -``` - -## Building git2-rs - -First, you'll need to install _CMake_. Afterwards, just run: - -```sh -$ git clone --recursive https://github.com/alexcrichton/git2-rs -$ cd git2-rs -$ cargo build -``` - -# License - -`git2-rs` is primarily distributed under the terms of both the MIT license and -the Apache License (Version 2.0), with portions covered by various BSD-like -licenses. - -See LICENSE-APACHE, and LICENSE-MIT for details. diff --git a/deps/git2-0.4.2/appveyor.yml b/deps/git2-0.4.2/appveyor.yml deleted file mode 100644 index cc693d704..000000000 --- a/deps/git2-0.4.2/appveyor.yml +++ /dev/null @@ -1,24 +0,0 @@ -environment: - matrix: - - TARGET: x86_64-pc-windows-gnu - MSYS_BITS: 64 - - TARGET: i686-pc-windows-gnu - MSYS_BITS: 32 - - TARGET: x86_64-pc-windows-msvc - - TARGET: i686-pc-windows-msvc -install: - - ps: Start-FileDownload "https://static.rust-lang.org/dist/rust-nightly-${env:TARGET}.exe" - - rust-nightly-%TARGET%.exe /VERYSILENT /NORESTART /DIR="C:\Program Files (x86)\Rust" - - set PATH=%PATH%;C:\Program Files (x86)\Rust\bin - - if defined MSYS_BITS set PATH=%PATH%;C:\msys64\mingw%MSYS_BITS%\bin;C:\msys64\usr\bin - - set CARGO_TARGET_DIR=%APPVEYOR_BUILD_FOLDER%\target - - rustc -V - - cargo -V - - git submodule update --init - -build: false - -test_script: - - cargo test - - cargo test --no-default-features - - cargo run --manifest-path systest/Cargo.toml diff --git a/deps/git2-0.4.2/examples/fetch.rs b/deps/git2-0.4.2/examples/fetch.rs deleted file mode 100644 index 3cb9c916d..000000000 --- a/deps/git2-0.4.2/examples/fetch.rs +++ /dev/null @@ -1,131 +0,0 @@ -/* - * libgit2 "fetch" example - shows how to fetch remote data - * - * Written by the libgit2 contributors - * - * To the extent possible under law, the author(s) have dedicated all copyright - * and related and neighboring rights to this software to the public domain - * worldwide. This software is distributed without any warranty. - * - * You should have received a copy of the CC0 Public Domain Dedication along - * with this software. If not, see - * . - */ - -#![deny(warnings)] - -extern crate git2; -extern crate docopt; -extern crate rustc_serialize; - -use docopt::Docopt; -use git2::{Repository, RemoteCallbacks, Direction, AutotagOption, FetchOptions}; -use std::io::{self, Write}; -use std::str; - -#[derive(RustcDecodable)] -struct Args { - arg_remote: Option, -} - -fn run(args: &Args) -> Result<(), git2::Error> { - let repo = try!(Repository::open(".")); - let remote = args.arg_remote.as_ref().map(|s| &s[..]).unwrap_or("origin"); - - // Figure out whether it's a named remote or a URL - println!("Fetcing {} for repo", remote); - let mut cb = RemoteCallbacks::new(); - let mut remote = try!(repo.find_remote(remote).or_else(|_| { - repo.remote_anonymous(remote) - })); - cb.sideband_progress(|data| { - print!("remote: {}", str::from_utf8(data).unwrap()); - io::stdout().flush().unwrap(); - true - }); - - // This callback gets called for each remote-tracking branch that gets - // updated. The message we output depends on whether it's a new one or an - // update. - cb.update_tips(|refname, a, b| { - if a.is_zero() { - println!("[new] {:20} {}", b, refname); - } else { - println!("[updated] {:10}..{:10} {}", a, b, refname); - } - true - }); - - // Here we show processed and total objects in the pack and the amount of - // received data. Most frontends will probably want to show a percentage and - // the download rate. - cb.transfer_progress(|stats| { - if stats.received_objects() == stats.total_objects() { - print!("Resolving deltas {}/{}\r", stats.indexed_deltas(), - stats.total_deltas()); - } else if stats.total_objects() > 0 { - print!("Received {}/{} objects ({}) in {} bytes\r", - stats.received_objects(), - stats.total_objects(), - stats.indexed_objects(), - stats.received_bytes()); - } - io::stdout().flush().unwrap(); - true - }); - - // Connect to the remote end specifying that we want to fetch information - // from it. - try!(remote.connect(Direction::Fetch)); - - // Download the packfile and index it. This function updates the amount of - // received data and the indexer stats which lets you inform the user about - // progress. - let mut fo = FetchOptions::new(); - fo.remote_callbacks(cb); - try!(remote.download(&[], Some(&mut fo))); - - { - // If there are local objects (we got a thin pack), then tell the user - // how many objects we saved from having to cross the network. - let stats = remote.stats(); - if stats.local_objects() > 0 { - println!("\rReceived {}/{} objects in {} bytes (used {} local \ - objects)", stats.indexed_objects(), - stats.total_objects(), stats.received_bytes(), - stats.local_objects()); - } else { - println!("\rReceived {}/{} objects in {} bytes", - stats.indexed_objects(), stats.total_objects(), - stats.received_bytes()); - } - } - - // Disconnect the underlying connection to prevent from idling. - remote.disconnect(); - - // Update the references in the remote's namespace to point to the right - // commits. This may be needed even if there was no packfile to download, - // which can happen e.g. when the branches have been changed but all the - // needed objects are available locally. - try!(remote.update_tips(None, true, - AutotagOption::Unspecified, None)); - - Ok(()) -} - -fn main() { - const USAGE: &'static str = " -usage: fetch [options] [] - -Options: - -h, --help show this message -"; - - let args = Docopt::new(USAGE).and_then(|d| d.decode()) - .unwrap_or_else(|e| e.exit()); - match run(&args) { - Ok(()) => {} - Err(e) => println!("error: {}", e), - } -} diff --git a/deps/git2-0.4.2/src/blob.rs b/deps/git2-0.4.2/src/blob.rs deleted file mode 100644 index 4394828c1..000000000 --- a/deps/git2-0.4.2/src/blob.rs +++ /dev/null @@ -1,93 +0,0 @@ -use std::marker; -use std::slice; - -use {raw, Oid, Object}; -use util::Binding; - -/// A structure to represent a git [blob][1] -/// -/// [1]: http://git-scm.com/book/en/Git-Internals-Git-Objects -pub struct Blob<'repo> { - raw: *mut raw::git_blob, - _marker: marker::PhantomData>, -} - -impl<'repo> Blob<'repo> { - /// Get the id (SHA1) of a repository blob - pub fn id(&self) -> Oid { - unsafe { Binding::from_raw(raw::git_blob_id(&*self.raw)) } - } - - /// Determine if the blob content is most certainly binary or not. - pub fn is_binary(&self) -> bool { - unsafe { raw::git_blob_is_binary(&*self.raw) == 1 } - } - - /// Get the content of this blob. - pub fn content(&self) -> &[u8] { - unsafe { - let data = raw::git_blob_rawcontent(&*self.raw) as *const u8; - let len = raw::git_blob_rawsize(&*self.raw) as usize; - slice::from_raw_parts(data, len) - } - } - - /// Casts this Blob to be usable as an `Object` - pub fn as_object(&self) -> &Object<'repo> { - unsafe { - &*(self as *const _ as *const Object<'repo>) - } - } -} - -impl<'repo> Binding for Blob<'repo> { - type Raw = *mut raw::git_blob; - - unsafe fn from_raw(raw: *mut raw::git_blob) -> Blob<'repo> { - Blob { - raw: raw, - _marker: marker::PhantomData, - } - } - fn raw(&self) -> *mut raw::git_blob { self.raw } -} - - -impl<'repo> Drop for Blob<'repo> { - fn drop(&mut self) { - unsafe { raw::git_blob_free(self.raw) } - } -} - -#[cfg(test)] -mod tests { - use std::io::prelude::*; - use std::fs::File; - use tempdir::TempDir; - use Repository; - - #[test] - fn buffer() { - let td = TempDir::new("test").unwrap(); - let repo = Repository::init(td.path()).unwrap(); - let id = repo.blob(&[5, 4, 6]).unwrap(); - let blob = repo.find_blob(id).unwrap(); - - assert_eq!(blob.id(), id); - assert_eq!(blob.content(), [5, 4, 6]); - assert!(blob.is_binary()); - - repo.find_object(id, None).unwrap().as_blob().unwrap(); - } - - #[test] - fn path() { - let td = TempDir::new("test").unwrap(); - let path = td.path().join("foo"); - File::create(&path).unwrap().write_all(&[7, 8, 9]).unwrap(); - let repo = Repository::init(td.path()).unwrap(); - let id = repo.blob_path(&path).unwrap(); - let blob = repo.find_blob(id).unwrap(); - assert_eq!(blob.content(), [7, 8, 9]); - } -} diff --git a/deps/git2-0.4.2/src/commit.rs b/deps/git2-0.4.2/src/commit.rs deleted file mode 100644 index b4b593af2..000000000 --- a/deps/git2-0.4.2/src/commit.rs +++ /dev/null @@ -1,329 +0,0 @@ -use std::marker; -use std::ops::Range; -use std::str; -use libc; - -use {raw, signature, Oid, Error, Signature, Tree, Time, Object}; -use util::Binding; - -/// A structure to represent a git [commit][1] -/// -/// [1]: http://git-scm.com/book/en/Git-Internals-Git-Objects -pub struct Commit<'repo> { - raw: *mut raw::git_commit, - _marker: marker::PhantomData>, -} - -/// An iterator over the parent commits of a commit. -pub struct Parents<'commit, 'repo: 'commit> { - range: Range, - commit: &'commit Commit<'repo>, -} - -/// An iterator over the parent commits' ids of a commit. -pub struct ParentIds<'commit> { - range: Range, - commit: &'commit Commit<'commit>, -} - -impl<'repo> Commit<'repo> { - /// Get the id (SHA1) of a repository commit - pub fn id(&self) -> Oid { - unsafe { Binding::from_raw(raw::git_commit_id(&*self.raw)) } - } - - /// Get the id of the tree pointed to by this commit. - /// - /// No attempts are made to fetch an object from the ODB. - pub fn tree_id(&self) -> Oid { - unsafe { Binding::from_raw(raw::git_commit_tree_id(&*self.raw)) } - } - - /// Get the tree pointed to by a commit. - pub fn tree(&self) -> Result, Error> { - let mut ret = 0 as *mut raw::git_tree; - unsafe { - try_call!(raw::git_commit_tree(&mut ret, &*self.raw)); - Ok(Binding::from_raw(ret)) - } - } - - /// Get access to the underlying raw pointer. - pub fn raw(&self) -> *mut raw::git_commit { self.raw } - - /// Get the full message of a commit. - /// - /// The returned message will be slightly prettified by removing any - /// potential leading newlines. - /// - /// `None` will be returned if the message is not valid utf-8 - pub fn message(&self) -> Option<&str> { - str::from_utf8(self.message_bytes()).ok() - } - - /// Get the full message of a commit as a byte slice. - /// - /// The returned message will be slightly prettified by removing any - /// potential leading newlines. - pub fn message_bytes(&self) -> &[u8] { - unsafe { - ::opt_bytes(self, raw::git_commit_message(&*self.raw)).unwrap() - } - } - - /// Get the encoding for the message of a commit, as a string representing a - /// standard encoding name. - /// - /// `None` will be returned if the encoding is not known - pub fn message_encoding(&self) -> Option<&str> { - let bytes = unsafe { - ::opt_bytes(self, raw::git_commit_message(&*self.raw)) - }; - bytes.map(|b| str::from_utf8(b).unwrap()) - } - - /// Get the full raw message of a commit. - /// - /// `None` will be returned if the message is not valid utf-8 - pub fn message_raw(&self) -> Option<&str> { - str::from_utf8(self.message_raw_bytes()).ok() - } - - /// Get the full raw message of a commit. - pub fn message_raw_bytes(&self) -> &[u8] { - unsafe { - ::opt_bytes(self, raw::git_commit_message_raw(&*self.raw)).unwrap() - } - } - - /// Get the full raw text of the commit header. - /// - /// `None` will be returned if the message is not valid utf-8 - pub fn raw_header(&self) -> Option<&str> { - str::from_utf8(self.raw_header_bytes()).ok() - } - - /// Get the full raw text of the commit header. - pub fn raw_header_bytes(&self) -> &[u8] { - unsafe { - ::opt_bytes(self, raw::git_commit_raw_header(&*self.raw)).unwrap() - } - } - - /// Get the short "summary" of the git commit message. - /// - /// The returned message is the summary of the commit, comprising the first - /// paragraph of the message with whitespace trimmed and squashed. - /// - /// `None` may be returned if an error occurs or if the summary is not valid - /// utf-8. - pub fn summary(&mut self) -> Option<&str> { - self.summary_bytes().and_then(|s| str::from_utf8(s).ok()) - } - - /// Get the short "summary" of the git commit message. - /// - /// The returned message is the summary of the commit, comprising the first - /// paragraph of the message with whitespace trimmed and squashed. - /// - /// `None` may be returned if an error occurs - pub fn summary_bytes(&mut self) -> Option<&[u8]> { - unsafe { ::opt_bytes(self, raw::git_commit_summary(self.raw)) } - } - - /// Get the commit time (i.e. committer time) of a commit. - /// - /// The first element of the tuple is the time, in seconds, since the epoch. - /// The second element is the offset, in minutes, of the time zone of the - /// committer's preferred time zone. - pub fn time(&self) -> Time { - unsafe { - Time::new(raw::git_commit_time(&*self.raw) as i64, - raw::git_commit_time_offset(&*self.raw) as i32) - } - } - - /// Creates a new iterator over the parents of this commit. - pub fn parents<'a>(&'a self) -> Parents<'a, 'repo> { - let max = unsafe { raw::git_commit_parentcount(&*self.raw) as usize }; - Parents { range: 0..max, commit: self } - } - - /// Creates a new iterator over the parents of this commit. - pub fn parent_ids(&self) -> ParentIds { - let max = unsafe { raw::git_commit_parentcount(&*self.raw) as usize }; - ParentIds { range: 0..max, commit: self } - } - - /// Get the author of this commit. - pub fn author(&self) -> Signature { - unsafe { - let ptr = raw::git_commit_author(&*self.raw); - signature::from_raw_const(self, ptr) - } - } - - /// Get the committer of this commit. - pub fn committer(&self) -> Signature { - unsafe { - let ptr = raw::git_commit_committer(&*self.raw); - signature::from_raw_const(self, ptr) - } - } - - /// Amend this existing commit with all non-`None` values - /// - /// This creates a new commit that is exactly the same as the old commit, - /// except that any non-`None` values will be updated. The new commit has - /// the same parents as the old commit. - /// - /// For information about `update_ref`, see `new`. - pub fn amend(&self, - update_ref: Option<&str>, - author: Option<&Signature>, - committer: Option<&Signature>, - message_encoding: Option<&str>, - message: Option<&str>, - tree: Option<&Tree<'repo>>) -> Result { - let mut raw = raw::git_oid { id: [0; raw::GIT_OID_RAWSZ] }; - let update_ref = try!(::opt_cstr(update_ref)); - let encoding = try!(::opt_cstr(message_encoding)); - let message = try!(::opt_cstr(message)); - unsafe { - try_call!(raw::git_commit_amend(&mut raw, - self.raw(), - update_ref, - author.map(|s| s.raw()), - committer.map(|s| s.raw()), - encoding, - message, - tree.map(|t| t.raw()))); - Ok(Binding::from_raw(&raw as *const _)) - } - } - - /// Get the specified parent of the commit. - /// - /// Use the `parents` iterator to return an iterator over all parents. - pub fn parent(&self, i: usize) -> Result, Error> { - unsafe { - let mut raw = 0 as *mut raw::git_commit; - try_call!(raw::git_commit_parent(&mut raw, &*self.raw, - i as libc::c_uint)); - Ok(Binding::from_raw(raw)) - } - } - - /// Get the specified parent id of the commit. - /// - /// This is different from `parent`, which will attemptstempt to load the - /// parent commit from the ODB. - /// - /// Use the `parent_ids` iterator to return an iterator over all parents. - pub fn parent_id(&self, i: usize) -> Result { - unsafe { - let id = raw::git_commit_parent_id(self.raw, i as libc::c_uint); - if id.is_null() { - Err(Error::from_str("parent index out of bounds")) - } else { - Ok(Binding::from_raw(id)) - } - } - } - - /// Casts this Commit to be usable as an `Object` - pub fn as_object(&self) -> &Object<'repo> { - unsafe { - &*(self as *const _ as *const Object<'repo>) - } - } -} - -impl<'repo> Binding for Commit<'repo> { - type Raw = *mut raw::git_commit; - unsafe fn from_raw(raw: *mut raw::git_commit) -> Commit<'repo> { - Commit { - raw: raw, - _marker: marker::PhantomData, - } - } - fn raw(&self) -> *mut raw::git_commit { self.raw } -} - - -impl<'repo, 'commit> Iterator for Parents<'commit, 'repo> { - type Item = Commit<'repo>; - fn next(&mut self) -> Option> { - self.range.next().map(|i| self.commit.parent(i).unwrap()) - } - fn size_hint(&self) -> (usize, Option) { self.range.size_hint() } -} - -impl<'repo, 'commit> DoubleEndedIterator for Parents<'commit, 'repo> { - fn next_back(&mut self) -> Option> { - self.range.next_back().map(|i| self.commit.parent(i).unwrap()) - } -} - -impl<'repo, 'commit> ExactSizeIterator for Parents<'commit, 'repo> {} - -impl<'commit> Iterator for ParentIds<'commit> { - type Item = Oid; - fn next(&mut self) -> Option { - self.range.next().map(|i| self.commit.parent_id(i).unwrap()) - } - fn size_hint(&self) -> (usize, Option) { self.range.size_hint() } -} - -impl<'commit> DoubleEndedIterator for ParentIds<'commit> { - fn next_back(&mut self) -> Option { - self.range.next_back().map(|i| self.commit.parent_id(i).unwrap()) - } -} - -impl<'commit> ExactSizeIterator for ParentIds<'commit> {} - -impl<'repo> Drop for Commit<'repo> { - fn drop(&mut self) { - unsafe { raw::git_commit_free(self.raw) } - } -} - -#[cfg(test)] -mod tests { - #[test] - fn smoke() { - let (_td, repo) = ::test::repo_init(); - let head = repo.head().unwrap(); - let target = head.target().unwrap(); - let mut commit = repo.find_commit(target).unwrap(); - assert_eq!(commit.message(), Some("initial")); - assert_eq!(commit.id(), target); - commit.message_raw().unwrap(); - commit.raw_header().unwrap(); - commit.message_encoding(); - commit.summary().unwrap(); - commit.tree_id(); - commit.tree().unwrap(); - assert_eq!(commit.parents().count(), 0); - - assert_eq!(commit.author().name(), Some("name")); - assert_eq!(commit.author().email(), Some("email")); - assert_eq!(commit.committer().name(), Some("name")); - assert_eq!(commit.committer().email(), Some("email")); - - let sig = repo.signature().unwrap(); - let tree = repo.find_tree(commit.tree_id()).unwrap(); - let id = repo.commit(Some("HEAD"), &sig, &sig, "bar", &tree, - &[&commit]).unwrap(); - let head = repo.find_commit(id).unwrap(); - - let new_head = head.amend(Some("HEAD"), None, None, None, - Some("new message"), None).unwrap(); - let new_head = repo.find_commit(new_head).unwrap(); - assert_eq!(new_head.message(), Some("new message")); - - repo.find_object(target, None).unwrap().as_commit().unwrap(); - } -} - diff --git a/deps/git2-0.4.2/src/cred.rs b/deps/git2-0.4.2/src/cred.rs deleted file mode 100644 index cb20407d4..000000000 --- a/deps/git2-0.4.2/src/cred.rs +++ /dev/null @@ -1,469 +0,0 @@ -use std::ffi::CString; -use std::io::Write; -use std::mem; -use std::path::Path; -use std::process::{Command, Stdio}; -use url::{self, UrlParser}; - -use {raw, Error, Config, IntoCString}; -use util::Binding; - -/// A structure to represent git credentials in libgit2. -pub struct Cred { - raw: *mut raw::git_cred, -} - -/// Management of the gitcredentials(7) interface. -pub struct CredentialHelper { - /// A public field representing the currently discovered username from - /// configuration. - pub username: Option, - protocol: Option, - host: Option, - url: String, - commands: Vec, -} - -impl Cred { - /// Create a "default" credential usable for Negotiate mechanisms like NTLM - /// or Kerberos authentication. - pub fn default() -> Result { - ::init(); - let mut out = 0 as *mut raw::git_cred; - unsafe { - try_call!(raw::git_cred_default_new(&mut out)); - Ok(Binding::from_raw(out)) - } - } - - /// Create a new ssh key credential object used for querying an ssh-agent. - /// - /// The username specified is the username to authenticate. - pub fn ssh_key_from_agent(username: &str) -> Result { - ::init(); - let mut out = 0 as *mut raw::git_cred; - let username = try!(CString::new(username)); - unsafe { - try_call!(raw::git_cred_ssh_key_from_agent(&mut out, username)); - Ok(Binding::from_raw(out)) - } - } - - /// Create a new passphrase-protected ssh key credential object. - pub fn ssh_key(username: &str, - publickey: Option<&Path>, - privatekey: &Path, - passphrase: Option<&str>) -> Result { - ::init(); - let username = try!(CString::new(username)); - let publickey = try!(::opt_cstr(publickey)); - let privatekey = try!(privatekey.into_c_string()); - let passphrase = try!(::opt_cstr(passphrase)); - let mut out = 0 as *mut raw::git_cred; - unsafe { - try_call!(raw::git_cred_ssh_key_new(&mut out, username, publickey, - privatekey, passphrase)); - Ok(Binding::from_raw(out)) - } - } - - /// Create a new plain-text username and password credential object. - pub fn userpass_plaintext(username: &str, - password: &str) -> Result { - ::init(); - let username = try!(CString::new(username)); - let password = try!(CString::new(password)); - let mut out = 0 as *mut raw::git_cred; - unsafe { - try_call!(raw::git_cred_userpass_plaintext_new(&mut out, username, - password)); - Ok(Binding::from_raw(out)) - } - } - - /// Attempt to read `credential.helper` according to gitcredentials(7) [1] - /// - /// This function will attempt to parse the user's `credential.helper` - /// configuration, invoke the necessary processes, and read off what the - /// username/password should be for a particular url. - /// - /// The returned credential type will be a username/password credential if - /// successful. - /// - /// [1]: https://www.kernel.org/pub/software/scm/git/docs/gitcredentials.html - pub fn credential_helper(config: &Config, - url: &str, - username: Option<&str>) - -> Result { - match CredentialHelper::new(url).config(config).username(username) - .execute() { - Some((username, password)) => { - Cred::userpass_plaintext(&username, &password) - } - None => Err(Error::from_str("failed to acquire username/password \ - from local configuration")) - } - } - - /// Create a credential to specify a username. - /// - /// THis is used with ssh authentication to query for the username if non is - /// specified in the url. - pub fn username(username: &str) -> Result { - ::init(); - let username = try!(CString::new(username)); - let mut out = 0 as *mut raw::git_cred; - unsafe { - try_call!(raw::git_cred_username_new(&mut out, username)); - Ok(Binding::from_raw(out)) - } - } - - /// Check whether a credential object contains username information. - pub fn has_username(&self) -> bool { - unsafe { raw::git_cred_has_username(self.raw) == 1 } - } - - /// Return the type of credentials that this object represents. - pub fn credtype(&self) -> raw::git_credtype_t { - unsafe { (*self.raw).credtype } - } - - /// Unwrap access to the underlying raw pointer, canceling the destructor - pub unsafe fn unwrap(mut self) -> *mut raw::git_cred { - mem::replace(&mut self.raw, 0 as *mut raw::git_cred) - } -} - -impl Binding for Cred { - type Raw = *mut raw::git_cred; - - unsafe fn from_raw(raw: *mut raw::git_cred) -> Cred { - Cred { raw: raw } - } - fn raw(&self) -> *mut raw::git_cred { self.raw } -} - -impl Drop for Cred { - fn drop(&mut self) { - if !self.raw.is_null() { - unsafe { ((*self.raw).free)(self.raw) } - } - } -} - -impl CredentialHelper { - /// Create a new credential helper object which will be used to probe git's - /// local credential configuration. - /// - /// The url specified is the namespace on which this will query credentials. - /// Invalid urls are currently ignored. - pub fn new(url: &str) -> CredentialHelper { - let mut ret = CredentialHelper { - protocol: None, - host: None, - username: None, - url: url.to_string(), - commands: Vec::new(), - }; - - // Parse out the (protocol, host) if one is available - let parsed_url = UrlParser::new().scheme_type_mapper(mapper).parse(url); - match parsed_url { - Ok(url) => { - match url.host() { - Some(&url::Host::Domain(ref s)) => ret.host = Some(s.clone()), - _ => {} - } - ret.protocol = Some(url.scheme) - } - Err(..) => {} - }; - return ret; - - fn mapper(s: &str) -> url::SchemeType { - match s { - "git" => url::SchemeType::Relative(9418), - "ssh" => url::SchemeType::Relative(22), - s => url::whatwg_scheme_type_mapper(s), - } - } - } - - /// Set the username that this credential helper will query with. - /// - /// By default the username is `None`. - pub fn username(&mut self, username: Option<&str>) -> &mut CredentialHelper { - self.username = username.map(|s| s.to_string()); - self - } - - /// Query the specified configuration object to discover commands to - /// execute, usernames to query, etc. - pub fn config(&mut self, config: &Config) -> &mut CredentialHelper { - // Figure out the configured username/helper program. - // - // see http://git-scm.com/docs/gitcredentials.html#_configuration_options - // - // TODO: implement useHttpPath - if self.username.is_none() { - self.config_username(config); - } - self.config_helper(config); - self - } - - // Configure the queried username from `config` - fn config_username(&mut self, config: &Config) { - let key = self.exact_key("username"); - self.username = config.get_string(&key).ok().or_else(|| { - self.url_key("username").and_then(|s| { - config.get_string(&s).ok() - }) - }).or_else(|| { - config.get_string("credential.username").ok() - }) - } - - // Discover all `helper` directives from `config` - fn config_helper(&mut self, config: &Config) { - let exact = config.get_string(&self.exact_key("helper")); - self.add_command(exact.as_ref().ok().map(|s| &s[..])); - match self.url_key("helper") { - Some(key) => { - let url = config.get_string(&key); - self.add_command(url.as_ref().ok().map(|s| &s[..])); - } - None => {} - } - let global = config.get_string("credential.helper"); - self.add_command(global.as_ref().ok().map(|s| &s[..])); - } - - // Add a `helper` configured command to the list of commands to execute. - // - // see https://www.kernel.org/pub/software/scm/git/docs/technical - // /api-credentials.html#_credential_helpers - fn add_command(&mut self, cmd: Option<&str>) { - let cmd = match cmd { Some(s) => s, None => return }; - if cmd.starts_with("!") { - self.commands.push(cmd[1..].to_string()); - } else if cmd.starts_with("/") || cmd.starts_with("\\") || - cmd[1..].starts_with(":\\") { - self.commands.push(format!("\"{}\"", cmd)); - } else { - self.commands.push(format!("git credential-{}", cmd)); - } - } - - fn exact_key(&self, name: &str) -> String { - format!("credential.{}.{}", self.url, name) - } - - fn url_key(&self, name: &str) -> Option { - match (&self.host, &self.protocol) { - (&Some(ref host), &Some(ref protocol)) => { - Some(format!("credential.{}://{}.{}", protocol, host, name)) - } - _ => None - } - } - - /// Execute this helper, attempting to discover a username/password pair. - /// - /// All I/O errors are ignored, (to match git behavior), and this function - /// only succeeds if both a username and a password were found - pub fn execute(&self) -> Option<(String, String)> { - let mut username = self.username.clone(); - let mut password = None; - for cmd in self.commands.iter() { - let (u, p) = self.execute_cmd(&cmd, &username); - if u.is_some() && username.is_none() { - username = u; - } - if p.is_some() && password.is_none() { - password = p; - } - if username.is_some() && password.is_some() { break } - } - - match (username, password) { - (Some(u), Some(p)) => Some((u, p)), - _ => None, - } - } - - // Execute the given `cmd`, providing the appropriate variables on stdin and - // then afterwards parsing the output into the username/password on stdout. - fn execute_cmd(&self, cmd: &str, username: &Option) - -> (Option, Option) { - macro_rules! my_try( ($e:expr) => ( - match $e { Ok(e) => e, Err(..) => return (None, None) } - ) ); - - let mut p = my_try!(Command::new("sh").arg("-c") - .arg(&format!("{} get", cmd)) - .stdin(Stdio::piped()) - .stdout(Stdio::piped()) - .stderr(Stdio::piped()) - .spawn()); - // Ignore write errors as the command may not actually be listening for - // stdin - { - let stdin = p.stdin.as_mut().unwrap(); - match self.protocol { - Some(ref p) => { let _ = writeln!(stdin, "protocol={}", p); } - None => {} - } - match self.host { - Some(ref p) => { let _ = writeln!(stdin, "host={}", p); } - None => {} - } - match *username { - Some(ref p) => { let _ = writeln!(stdin, "username={}", p); } - None => {} - } - } - let output = my_try!(p.wait_with_output()); - if !output.status.success() { return (None, None) } - return self.parse_output(output.stdout) - } - - // Parse the output of a command into the username/password found - fn parse_output(&self, output: Vec) -> (Option, Option) { - // Parse the output of the command, looking for username/password - let mut username = None; - let mut password = None; - for line in output.split(|t| *t == b'\n') { - let mut parts = line.splitn(2, |t| *t == b'='); - let key = parts.next().unwrap(); - let value = match parts.next() { Some(s) => s, None => continue }; - let value = match String::from_utf8(value.to_vec()) { - Ok(s) => s, - Err(..) => continue, - }; - match key { - b"username" => username = Some(value), - b"password" => password = Some(value), - _ => {} - } - } - (username, password) - } -} - -#[cfg(all(test, feature = "unstable"))] -mod test { - use std::env; - use std::fs::File; - use std::io::prelude::*; - use std::path::Path; - use tempdir::TempDir; - - use {Cred, Config, CredentialHelper, ConfigLevel}; - - macro_rules! cfg( ($($k:expr => $v:expr),*) => ({ - let td = TempDir::new("git2-rs").unwrap(); - let mut cfg = Config::new().unwrap(); - cfg.add_file(&td.path().join("cfg"), ConfigLevel::Highest, false).unwrap(); - $(cfg.set_str($k, $v).unwrap();)* - cfg - }) ); - - #[test] - fn smoke() { - Cred::default().unwrap(); - } - - #[test] - fn credential_helper1() { - let cfg = cfg! { - "credential.helper" => "!f() { echo username=a; echo password=b; }; f" - }; - let (u, p) = CredentialHelper::new("https://example.com/foo/bar") - .config(&cfg) - .execute().unwrap(); - assert_eq!(u, "a"); - assert_eq!(p, "b"); - } - - #[test] - fn credential_helper2() { - let cfg = cfg! {}; - assert!(CredentialHelper::new("https://example.com/foo/bar") - .config(&cfg) - .execute().is_none()); - } - - #[test] - fn credential_helper3() { - let cfg = cfg! { - "credential.https://example.com.helper" => - "!f() { echo username=c; }; f", - "credential.helper" => "!f() { echo username=a; echo password=b; }; f" - }; - let (u, p) = CredentialHelper::new("https://example.com/foo/bar") - .config(&cfg) - .execute().unwrap(); - assert_eq!(u, "c"); - assert_eq!(p, "b"); - } - - #[test] - fn credential_helper4() { - let td = TempDir::new("git2-rs").unwrap(); - let path = td.path().join("script"); - File::create(&path).unwrap().write(br"\ -#!/bin/sh -echo username=c -").unwrap(); - chmod(&path); - let cfg = cfg! { - "credential.https://example.com.helper" => - &path.display().to_string()[..], - "credential.helper" => "!f() { echo username=a; echo password=b; }; f" - }; - let (u, p) = CredentialHelper::new("https://example.com/foo/bar") - .config(&cfg) - .execute().unwrap(); - assert_eq!(u, "c"); - assert_eq!(p, "b"); - } - - #[test] - fn credential_helper5() { - let td = TempDir::new("git2-rs").unwrap(); - let path = td.path().join("git-credential-script"); - File::create(&path).unwrap().write(br"\ -#!/bin/sh -echo username=c -").unwrap(); - chmod(&path); - - let paths = env::var("PATH").unwrap(); - let paths = env::split_paths(&paths) - .chain(path.parent().map(|p| p.to_path_buf()).into_iter()); - env::set_var("PATH", &env::join_paths(paths).unwrap()); - - let cfg = cfg! { - "credential.https://example.com.helper" => "script", - "credential.helper" => "!f() { echo username=a; echo password=b; }; f" - }; - let (u, p) = CredentialHelper::new("https://example.com/foo/bar") - .config(&cfg) - .execute().unwrap(); - assert_eq!(u, "c"); - assert_eq!(p, "b"); - } - - #[cfg(unix)] - fn chmod(path: &Path) { - use std::os::unix::prelude::*; - use std::fs; - let mut perms = fs::metadata(path).unwrap().permissions(); - perms.set_mode(0o755); - fs::set_permissions(path, perms).unwrap(); - } - #[cfg(windows)] - fn chmod(_path: &Path) {} -} diff --git a/deps/git2-0.4.2/src/error.rs b/deps/git2-0.4.2/src/error.rs deleted file mode 100644 index a8f69b0e6..000000000 --- a/deps/git2-0.4.2/src/error.rs +++ /dev/null @@ -1,230 +0,0 @@ -use std::ffi::{CStr, NulError}; -use std::error; -use std::fmt; -use std::str; -use libc::c_int; - -use {raw, ErrorClass, ErrorCode}; - -/// A structure to represent errors coming out of libgit2. -#[derive(Debug)] -pub struct Error { - code: c_int, - klass: c_int, - message: String, -} - -impl Error { - /// Returns the last error, or `None` if one is not available. - pub fn last_error(code: c_int) -> Option { - ::init(); - unsafe { - let ptr = raw::giterr_last(); - if ptr.is_null() { - None - } else { - Some(Error::from_raw(code, ptr)) - } - } - } - - unsafe fn from_raw(code: c_int, ptr: *const raw::git_error) -> Error { - let msg = CStr::from_ptr((*ptr).message as *const _).to_bytes(); - let msg = str::from_utf8(msg).unwrap(); - Error { code: code, klass: (*ptr).klass, message: msg.to_string() } - } - - /// Creates a new error from the given string as the error. - pub fn from_str(s: &str) -> Error { - Error { - code: raw::GIT_ERROR as c_int, - klass: raw::GITERR_NONE as c_int, - message: s.to_string(), - } - } - - /// Return the error code associated with this error. - pub fn code(&self) -> ErrorCode { - match self.raw_code() { - raw::GIT_OK => super::ErrorCode::GenericError, - raw::GIT_ERROR => super::ErrorCode::GenericError, - raw::GIT_ENOTFOUND => super::ErrorCode::NotFound, - raw::GIT_EEXISTS => super::ErrorCode::Exists, - raw::GIT_EAMBIGUOUS => super::ErrorCode::Ambiguous, - raw::GIT_EBUFS => super::ErrorCode::BufSize, - raw::GIT_EUSER => super::ErrorCode::User, - raw::GIT_EBAREREPO => super::ErrorCode::BareRepo, - raw::GIT_EUNBORNBRANCH => super::ErrorCode::UnbornBranch, - raw::GIT_EUNMERGED => super::ErrorCode::Unmerged, - raw::GIT_ENONFASTFORWARD => super::ErrorCode::NotFastForward, - raw::GIT_EINVALIDSPEC => super::ErrorCode::InvalidSpec, - raw::GIT_ECONFLICT => super::ErrorCode::Conflict, - raw::GIT_ELOCKED => super::ErrorCode::Locked, - raw::GIT_EMODIFIED => super::ErrorCode::Modified, - raw::GIT_PASSTHROUGH => super::ErrorCode::GenericError, - raw::GIT_ITEROVER => super::ErrorCode::GenericError, - raw::GIT_EAUTH => super::ErrorCode::Auth, - raw::GIT_ECERTIFICATE => super::ErrorCode::Certificate, - raw::GIT_EAPPLIED => super::ErrorCode::Applied, - raw::GIT_EPEEL => super::ErrorCode::Peel, - raw::GIT_EEOF => super::ErrorCode::Eof, - raw::GIT_EINVALID => super::ErrorCode::Invalid, - raw::GIT_EUNCOMMITTED => super::ErrorCode::Uncommitted, - raw::GIT_EDIRECTORY => super::ErrorCode::Directory, - _ => super::ErrorCode::GenericError, - } - } - - /// Return the error class associated with this error. - pub fn class(&self) -> ErrorClass { - match self.raw_class() { - raw::GITERR_NONE => super::ErrorClass::None, - raw::GITERR_NOMEMORY => super::ErrorClass::NoMemory, - raw::GITERR_OS => super::ErrorClass::Os, - raw::GITERR_INVALID => super::ErrorClass::Invalid, - raw::GITERR_REFERENCE => super::ErrorClass::Reference, - raw::GITERR_ZLIB => super::ErrorClass::Zlib, - raw::GITERR_REPOSITORY => super::ErrorClass::Repository, - raw::GITERR_CONFIG => super::ErrorClass::Config, - raw::GITERR_REGEX => super::ErrorClass::Regex, - raw::GITERR_ODB => super::ErrorClass::Odb, - raw::GITERR_INDEX => super::ErrorClass::Index, - raw::GITERR_OBJECT => super::ErrorClass::Object, - raw::GITERR_NET => super::ErrorClass::Net, - raw::GITERR_TAG => super::ErrorClass::Tag, - raw::GITERR_TREE => super::ErrorClass::Tree, - raw::GITERR_INDEXER => super::ErrorClass::Indexer, - raw::GITERR_SSL => super::ErrorClass::Ssl, - raw::GITERR_SUBMODULE => super::ErrorClass::Submodule, - raw::GITERR_THREAD => super::ErrorClass::Thread, - raw::GITERR_STASH => super::ErrorClass::Stash, - raw::GITERR_CHECKOUT => super::ErrorClass::Checkout, - raw::GITERR_FETCHHEAD => super::ErrorClass::FetchHead, - raw::GITERR_MERGE => super::ErrorClass::Merge, - raw::GITERR_SSH => super::ErrorClass::Ssh, - raw::GITERR_FILTER => super::ErrorClass::Filter, - raw::GITERR_REVERT => super::ErrorClass::Revert, - raw::GITERR_CALLBACK => super::ErrorClass::Callback, - raw::GITERR_CHERRYPICK => super::ErrorClass::CherryPick, - raw::GITERR_DESCRIBE => super::ErrorClass::Describe, - raw::GITERR_REBASE => super::ErrorClass::Rebase, - raw::GITERR_FILESYSTEM => super::ErrorClass::Filesystem, - _ => super::ErrorClass::None, - } - } - - /// Return the raw error code associated with this error. - pub fn raw_code(&self) -> raw::git_error_code { - macro_rules! check( ($($e:ident,)*) => ( - $(if self.code == raw::$e as c_int { raw::$e }) else * - else { - raw::GIT_ERROR - } - ) ); - check!( - GIT_OK, - GIT_ERROR, - GIT_ENOTFOUND, - GIT_EEXISTS, - GIT_EAMBIGUOUS, - GIT_EBUFS, - GIT_EUSER, - GIT_EBAREREPO, - GIT_EUNBORNBRANCH, - GIT_EUNMERGED, - GIT_ENONFASTFORWARD, - GIT_EINVALIDSPEC, - GIT_ECONFLICT, - GIT_ELOCKED, - GIT_EMODIFIED, - GIT_EAUTH, - GIT_ECERTIFICATE, - GIT_EAPPLIED, - GIT_EPEEL, - GIT_EEOF, - GIT_EINVALID, - GIT_EUNCOMMITTED, - GIT_PASSTHROUGH, - GIT_ITEROVER, - ) - } - - /// Return the raw error class associated with this error. - pub fn raw_class(&self) -> raw::git_error_t { - macro_rules! check( ($($e:ident,)*) => ( - $(if self.klass == raw::$e as c_int { raw::$e }) else * - else { - raw::GITERR_NONE - } - ) ); - check!( - GITERR_NONE, - GITERR_NOMEMORY, - GITERR_OS, - GITERR_INVALID, - GITERR_REFERENCE, - GITERR_ZLIB, - GITERR_REPOSITORY, - GITERR_CONFIG, - GITERR_REGEX, - GITERR_ODB, - GITERR_INDEX, - GITERR_OBJECT, - GITERR_NET, - GITERR_TAG, - GITERR_TREE, - GITERR_INDEXER, - GITERR_SSL, - GITERR_SUBMODULE, - GITERR_THREAD, - GITERR_STASH, - GITERR_CHECKOUT, - GITERR_FETCHHEAD, - GITERR_MERGE, - GITERR_SSH, - GITERR_FILTER, - GITERR_REVERT, - GITERR_CALLBACK, - GITERR_CHERRYPICK, - GITERR_DESCRIBE, - GITERR_REBASE, - GITERR_FILESYSTEM, - ) - } - - /// Return the message associated with this error - pub fn message(&self) -> &str { &self.message } -} - -impl error::Error for Error { - fn description(&self) -> &str { &self.message } -} - -impl fmt::Display for Error { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - try!(write!(f, "[{}/{}] ", self.klass, self.code)); - f.write_str(&self.message) - } -} - -impl From for Error { - fn from(_: NulError) -> Error { - Error::from_str("data contained a nul byte that could not be \ - represented as a string") - } -} - - -#[cfg(test)] -mod tests { - use {ErrorClass, ErrorCode}; - - #[test] - fn smoke() { - let (_td, repo) = ::test::repo_init(); - - let err = repo.find_submodule("does_not_exist").err().unwrap(); - assert_eq!(err.code(), ErrorCode::NotFound); - assert_eq!(err.class(), ErrorClass::Submodule); - } -} diff --git a/deps/git2-0.4.2/src/lib.rs b/deps/git2-0.4.2/src/lib.rs deleted file mode 100644 index 122cdd256..000000000 --- a/deps/git2-0.4.2/src/lib.rs +++ /dev/null @@ -1,851 +0,0 @@ -//! # libgit2 bindings for Rust -//! -//! This library contains bindings to the [libgit2][1] C library which is used -//! to manage git repositories. The library itself is a work in progress and is -//! likely lacking some bindings here and there, so be warned. -//! -//! [1]: https://libgit2.github.com/ -//! -//! The git2-rs library strives to be as close to libgit2 as possible, but also -//! strives to make using libgit2 as safe as possible. All resource management -//! is automatic as well as adding strong types to all interfaces (including -//! `Result`) -//! -//! ## Creating a `Repository` -//! -//! The `Repository` is the source from which almost all other objects in git-rs -//! are spawned. A repository can be created through opening, initializing, or -//! cloning. -//! -//! ### Initializing a new repository -//! -//! The `init` method will create a new repository, assuming one does not -//! already exist. -//! -//! ```no_run -//! # #![allow(unstable)] -//! use git2::Repository; -//! -//! let repo = match Repository::init("/path/to/a/repo") { -//! Ok(repo) => repo, -//! Err(e) => panic!("failed to init: {}", e), -//! }; -//! ``` -//! -//! ### Opening an existing repository -//! -//! ```no_run -//! # #![allow(unstable)] -//! use git2::Repository; -//! -//! let repo = match Repository::open("/path/to/a/repo") { -//! Ok(repo) => repo, -//! Err(e) => panic!("failed to open: {}", e), -//! }; -//! ``` -//! -//! ### Cloning an existing repository -//! -//! ```no_run -//! # #![allow(unstable)] -//! use git2::Repository; -//! -//! let url = "https://github.com/alexcrichton/git2-rs"; -//! let repo = match Repository::clone(url, "/path/to/a/repo") { -//! Ok(repo) => repo, -//! Err(e) => panic!("failed to clone: {}", e), -//! }; -//! ``` -//! -//! ## Working with a `Repository` -//! -//! All deriviative objects, references, etc are attached to the lifetime of the -//! source `Repository`, to ensure that they do not outlive the repository -//! itself. - -#![doc(html_root_url = "http://alexcrichton.com/git2-rs")] -#![allow(trivial_numeric_casts, trivial_casts)] -#![deny(missing_docs)] -#![cfg_attr(test, deny(warnings))] -#![cfg_attr(feature = "unstable", feature(recover, std_panic))] - -extern crate libc; -extern crate url; -extern crate libgit2_sys as raw; -#[macro_use] extern crate bitflags; -#[cfg(test)] extern crate tempdir; - -use std::ffi::{CStr, CString}; -use std::fmt; -use std::str; -use std::sync::{Once, ONCE_INIT}; - -pub use blame::{Blame, BlameHunk, BlameIter, BlameOptions}; -pub use blob::Blob; -pub use branch::{Branch, Branches}; -pub use buf::Buf; -pub use commit::{Commit, Parents}; -pub use config::{Config, ConfigEntry, ConfigEntries}; -pub use cred::{Cred, CredentialHelper}; -pub use describe::{Describe, DescribeFormatOptions, DescribeOptions}; -pub use diff::{Diff, DiffDelta, DiffFile, DiffOptions, Deltas}; -pub use diff::{DiffLine, DiffHunk, DiffStats, DiffFindOptions}; -pub use diff::{DiffBinary, DiffBinaryFile, DiffBinaryKind}; -pub use merge::{AnnotatedCommit, MergeOptions}; -pub use error::Error; -pub use index::{Index, IndexEntry, IndexEntries, IndexMatchedPath}; -pub use note::{Note, Notes}; -pub use object::Object; -pub use oid::Oid; -pub use pathspec::{Pathspec, PathspecMatchList, PathspecFailedEntries}; -pub use pathspec::{PathspecDiffEntries, PathspecEntries}; -pub use reference::{Reference, References, ReferenceNames}; -pub use reflog::{Reflog, ReflogEntry, ReflogIter}; -pub use refspec::Refspec; -pub use remote::{Remote, Refspecs, RemoteHead, FetchOptions, PushOptions}; -pub use remote_callbacks::{RemoteCallbacks, Credentials, TransferProgress}; -pub use remote_callbacks::{TransportMessage, Progress, UpdateTips}; -pub use repo::{Repository, RepositoryInitOptions}; -pub use revspec::Revspec; -pub use revwalk::Revwalk; -pub use signature::Signature; -pub use status::{StatusOptions, Statuses, StatusIter, StatusEntry, StatusShow}; -pub use submodule::Submodule; -pub use tag::Tag; -pub use time::{Time, IndexTime}; -pub use tree::{Tree, TreeEntry, TreeIter}; -pub use treebuilder::TreeBuilder; -pub use util::IntoCString; - -/// An enumeration of possible errors that can happen when working with a git -/// repository. -#[derive(PartialEq, Eq, Clone, Debug, Copy)] -pub enum ErrorCode { - /// Generic error - GenericError, - /// Requested object could not be found - NotFound, - /// Object exists preventing operation - Exists, - /// More than one object matches - Ambiguous, - /// Output buffer too short to hold data - BufSize, - /// User-generated error - User, - /// Operation not allowed on bare repository - BareRepo, - /// HEAD refers to branch with no commits - UnbornBranch, - /// Merge in progress prevented operation - Unmerged, - /// Reference was not fast-forwardable - NotFastForward, - /// Name/ref spec was not in a valid format - InvalidSpec, - /// Checkout conflicts prevented operation - Conflict, - /// Lock file prevented operation - Locked, - /// Reference value does not match expected - Modified, - /// Authentication error - Auth, - /// Server certificate is invalid - Certificate, - /// Patch/merge has already been applied - Applied, - /// The requested peel operation is not possible - Peel, - /// Unexpected EOF - Eof, - /// Invalid operation or input - Invalid, - /// Uncommitted changes in index prevented operation - Uncommitted, - /// Operation was not valid for a directory, - Directory, -} - -/// An enumeration of possible categories of things that can have -/// errors when working with a git repository. -#[derive(PartialEq, Eq, Clone, Debug, Copy)] -pub enum ErrorClass { - /// Uncategorized - None, - /// Out of memory or insufficient allocated space - NoMemory, - /// Syscall or standard system library error - Os, - /// Invalid input - Invalid, - /// Error resolving or manipulating a reference - Reference, - /// ZLib failure - Zlib, - /// Bad repository state - Repository, - /// Bad configuration - Config, - /// Regex failure - Regex, - /// Bad object - Odb, - /// Invalid index data - Index, - /// Error creating or obtaining an object - Object, - /// Network error - Net, - /// Error manpulating a tag - Tag, - /// Invalid value in tree - Tree, - /// Hashing or packing error - Indexer, - /// Error from SSL - Ssl, - /// Error involing submodules - Submodule, - /// Threading error - Thread, - /// Error manipulating a stash - Stash, - /// Checkout failure - Checkout, - /// Invalid FETCH_HEAD - FetchHead, - /// Merge failure - Merge, - /// SSH failure - Ssh, - /// Error manipulating filters - Filter, - /// Error reverting commit - Revert, - /// Error from a user callback - Callback, - /// Error cherry-picking commit - CherryPick, - /// Can't describe object - Describe, - /// Error during rebase - Rebase, - /// Filesystem-related error - Filesystem, -} - -/// A listing of the possible states that a repository can be in. -#[derive(PartialEq, Eq, Clone, Debug, Copy)] -#[allow(missing_docs)] -pub enum RepositoryState { - Clean, - Merge, - Revert, - RevertSequence, - CherryPick, - CherryPickSequence, - Bisect, - Rebase, - RebaseInteractive, - RebaseMerge, - ApplyMailbox, - ApplyMailboxOrRebase, -} - -/// An enumeration of the possible directions for a remote. -#[derive(Copy, Clone)] -pub enum Direction { - /// Data will be fetched (read) from this remote. - Fetch, - /// Data will be pushed (written) to this remote. - Push, -} - -/// An enumeration of the operations that can be performed for the `reset` -/// method on a `Repository`. -#[derive(Copy, Clone)] -pub enum ResetType { - /// Move the head to the given commit. - Soft, - /// Soft plus reset the index to the commit. - Mixed, - /// Mixed plus changes in the working tree are discarded. - Hard, -} - -/// An enumeration all possible kinds objects may have. -#[derive(PartialEq, Eq, Copy, Clone, Debug)] -pub enum ObjectType { - /// An object which corresponds to a any git object - Any, - /// An object which corresponds to a git commit - Commit, - /// An object which corresponds to a git tree - Tree, - /// An object which corresponds to a git blob - Blob, - /// An object which corresponds to a git tag - Tag, -} - -/// An enumeration for the possible types of branches -#[derive(PartialEq, Eq, Debug, Copy, Clone)] -pub enum BranchType { - /// A local branch not on a remote. - Local, - /// A branch for a remote. - Remote, -} - -/// An enumeration of the possible priority levels of a config file. -/// -/// The levels corresponding to the escalation logic (higher to lower) when -/// searching for config entries. -#[derive(PartialEq, Eq, Debug, Copy, Clone)] -pub enum ConfigLevel { - /// System-wide on Windows, for compatibility with portable git - ProgramData, - /// System-wide configuration file, e.g. /etc/gitconfig - System, - /// XDG-compatible configuration file, e.g. ~/.config/git/config - XDG, - /// User-specific configuration, e.g. ~/.gitconfig - Global, - /// Repository specific config, e.g. $PWD/.git/config - Local, - /// Application specific configuration file - App, - /// Highest level available - Highest, -} - -/// Merge file favor options for `MergeOptions` instruct the file-level -/// merging functionality how to deal with conflicting regions of the files. -#[derive(PartialEq, Eq, Debug, Copy, Clone)] -pub enum FileFavor { - /// When a region of a file is changed in both branches, a conflict will be - /// recorded in the index so that git_checkout can produce a merge file with - /// conflict markers in the working directory. This is the default. - Normal, - /// When a region of a file is changed in both branches, the file created - /// in the index will contain the "ours" side of any conflicting region. - /// The index will not record a conflict. - Ours, - /// When a region of a file is changed in both branches, the file created - /// in the index will contain the "theirs" side of any conflicting region. - /// The index will not record a conflict. - Theirs, - /// When a region of a file is changed in both branches, the file created - /// in the index will contain each unique line from each side, which has - /// the result of combining both files. The index will not record a conflict. - Union, -} - -bitflags! { - #[doc = " -Orderings that may be specified for Revwalk iteration. -"] - flags Sort: u32 { - /// Sort the repository contents in no particular ordering. - /// - /// This sorting is arbitrary, implementation-specific, and subject to - /// change at any time. This is the default sorting for new walkers. - const SORT_NONE = raw::GIT_SORT_NONE as u32, - - /// Sort the repository contents in topological order (parents before - /// children). - /// - /// This sorting mode can be combined with time sorting. - const SORT_TOPOLOGICAL = raw::GIT_SORT_TOPOLOGICAL as u32, - - /// Sort the repository contents by commit time. - /// - /// This sorting mode can be combined with topological sorting. - const SORT_TIME = raw::GIT_SORT_TIME as u32, - - /// Iterate through the repository contents in reverse order. - /// - /// This sorting mode can be combined with any others. - const SORT_REVERSE = raw::GIT_SORT_REVERSE as u32, - } -} - -bitflags! { - #[doc = " -Types of credentials that can be requested by a credential callback. -"] - flags CredentialType: u32 { - #[allow(missing_docs)] - const USER_PASS_PLAINTEXT = raw::GIT_CREDTYPE_USERPASS_PLAINTEXT as u32, - #[allow(missing_docs)] - const SSH_KEY = raw::GIT_CREDTYPE_SSH_KEY as u32, - #[allow(missing_docs)] - const SSH_MEMORY = raw::GIT_CREDTYPE_SSH_MEMORY as u32, - #[allow(missing_docs)] - const SSH_CUSTOM = raw::GIT_CREDTYPE_SSH_CUSTOM as u32, - #[allow(missing_docs)] - const DEFAULT = raw::GIT_CREDTYPE_DEFAULT as u32, - #[allow(missing_docs)] - const SSH_INTERACTIVE = raw::GIT_CREDTYPE_SSH_INTERACTIVE as u32, - #[allow(missing_docs)] - const USERNAME = raw::GIT_CREDTYPE_USERNAME as u32, - } -} - -bitflags! { - #[doc = " -Flags for APIs that add files matching pathspec -"] - flags IndexAddOption: u32 { - #[allow(missing_docs)] - const ADD_DEFAULT = raw::GIT_INDEX_ADD_DEFAULT as u32, - #[allow(missing_docs)] - const ADD_FORCE = raw::GIT_INDEX_ADD_FORCE as u32, - #[allow(missing_docs)] - const ADD_DISABLE_PATHSPEC_MATCH = - raw::GIT_INDEX_ADD_DISABLE_PATHSPEC_MATCH as u32, - #[allow(missing_docs)] - const ADD_CHECK_PATHSPEC = raw::GIT_INDEX_ADD_CHECK_PATHSPEC as u32, - } -} - -bitflags! { - #[doc = " -Flags for the return value of `Repository::revparse` -"] - flags RevparseMode: u32 { - /// The spec targeted a single object - const REVPARSE_SINGLE = raw::GIT_REVPARSE_SINGLE as u32, - /// The spec targeted a range of commits - const REVPARSE_RANGE = raw::GIT_REVPARSE_RANGE as u32, - /// The spec used the `...` operator, which invokes special semantics. - const REVPARSE_MERGE_BASE = raw::GIT_REVPARSE_MERGE_BASE as u32, - } -} - -#[cfg(test)] #[macro_use] mod test; -#[macro_use] mod panic; -mod call; -mod util; - -pub mod build; -pub mod cert; -pub mod string_array; -pub mod oid_array; -pub mod transport; - -mod blame; -mod blob; -mod branch; -mod buf; -mod commit; -mod config; -mod cred; -mod describe; -mod diff; -mod merge; -mod error; -mod index; -mod note; -mod object; -mod oid; -mod pathspec; -mod reference; -mod reflog; -mod refspec; -mod remote; -mod remote_callbacks; -mod repo; -mod revspec; -mod revwalk; -mod signature; -mod status; -mod submodule; -mod tag; -mod time; -mod tree; -mod treebuilder; - -fn init() { - static INIT: Once = ONCE_INIT; - INIT.call_once(|| unsafe { - raw::openssl_init(); - let r = raw::git_libgit2_init(); - assert!(r >= 0, - "couldn't initialize the libgit2 library: {}", r); - assert_eq!(libc::atexit(shutdown), 0); - }); - extern fn shutdown() { - unsafe { raw::git_libgit2_shutdown(); } - } -} - -unsafe fn opt_bytes<'a, T>(_anchor: &'a T, - c: *const libc::c_char) -> Option<&'a [u8]> { - if c.is_null() { - None - } else { - Some(CStr::from_ptr(c).to_bytes()) - } -} - -fn opt_cstr(o: Option) -> Result, Error> { - match o { - Some(s) => s.into_c_string().map(Some), - None => Ok(None) - } -} - -impl ObjectType { - /// Convert an object type to its string representation. - pub fn str(&self) -> &'static str { - unsafe { - let ptr = call!(raw::git_object_type2string(*self)) as *const _; - let data = CStr::from_ptr(ptr).to_bytes(); - str::from_utf8(data).unwrap() - } - } - - /// Determine if the given git_otype is a valid loose object type. - pub fn is_loose(&self) -> bool { - unsafe { (call!(raw::git_object_typeisloose(*self)) == 1) } - } - - /// Convert a raw git_otype to an ObjectType - pub fn from_raw(raw: raw::git_otype) -> Option { - match raw { - raw::GIT_OBJ_ANY => Some(ObjectType::Any), - raw::GIT_OBJ_COMMIT => Some(ObjectType::Commit), - raw::GIT_OBJ_TREE => Some(ObjectType::Tree), - raw::GIT_OBJ_BLOB => Some(ObjectType::Blob), - raw::GIT_OBJ_TAG => Some(ObjectType::Tag), - _ => None, - } - } - - /// Convert this kind into its raw representation - pub fn raw(&self) -> raw::git_otype { - call::convert(self) - } - - /// Convert a string object type representation to its object type. - pub fn from_str(s: &str) -> Option { - let raw = unsafe { call!(raw::git_object_string2type(CString::new(s).unwrap())) }; - ObjectType::from_raw(raw) - } -} - -impl fmt::Display for ObjectType { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - self.str().fmt(f) - } -} - -impl ConfigLevel { - /// Converts a raw configuration level to a ConfigLevel - pub fn from_raw(raw: raw::git_config_level_t) -> ConfigLevel { - match raw { - raw::GIT_CONFIG_LEVEL_PROGRAMDATA => ConfigLevel::ProgramData, - raw::GIT_CONFIG_LEVEL_SYSTEM => ConfigLevel::System, - raw::GIT_CONFIG_LEVEL_XDG => ConfigLevel::XDG, - raw::GIT_CONFIG_LEVEL_GLOBAL => ConfigLevel::Global, - raw::GIT_CONFIG_LEVEL_LOCAL => ConfigLevel::Local, - raw::GIT_CONFIG_LEVEL_APP => ConfigLevel::App, - raw::GIT_CONFIG_HIGHEST_LEVEL => ConfigLevel::Highest, - n => panic!("unknown config level: {}", n), - } - } -} - -bitflags! { - /// Status flags for a single file - /// - /// A combination of these values will be returned to indicate the status of - /// a file. Status compares the working directory, the index, and the - /// current HEAD of the repository. The `STATUS_INDEX_*` set of flags - /// represents the status of file in the index relative to the HEAD, and the - /// `STATUS_WT_*` set of flags represent the status of the file in the - /// working directory relative to the index. - flags Status: u32 { - #[allow(missing_docs)] - const STATUS_CURRENT = raw::GIT_STATUS_CURRENT as u32, - - #[allow(missing_docs)] - const STATUS_INDEX_NEW = raw::GIT_STATUS_INDEX_NEW as u32, - #[allow(missing_docs)] - const STATUS_INDEX_MODIFIED = raw::GIT_STATUS_INDEX_MODIFIED as u32, - #[allow(missing_docs)] - const STATUS_INDEX_DELETED = raw::GIT_STATUS_INDEX_DELETED as u32, - #[allow(missing_docs)] - const STATUS_INDEX_RENAMED = raw::GIT_STATUS_INDEX_RENAMED as u32, - #[allow(missing_docs)] - const STATUS_INDEX_TYPECHANGE = raw::GIT_STATUS_INDEX_TYPECHANGE as u32, - - #[allow(missing_docs)] - const STATUS_WT_NEW = raw::GIT_STATUS_WT_NEW as u32, - #[allow(missing_docs)] - const STATUS_WT_MODIFIED = raw::GIT_STATUS_WT_MODIFIED as u32, - #[allow(missing_docs)] - const STATUS_WT_DELETED = raw::GIT_STATUS_WT_DELETED as u32, - #[allow(missing_docs)] - const STATUS_WT_TYPECHANGE = raw::GIT_STATUS_WT_TYPECHANGE as u32, - #[allow(missing_docs)] - const STATUS_WT_RENAMED = raw::GIT_STATUS_WT_RENAMED as u32, - - #[allow(missing_docs)] - const STATUS_IGNORED = raw::GIT_STATUS_IGNORED as u32, - #[allow(missing_docs)] - const STATUS_CONFLICTED = raw::GIT_STATUS_CONFLICTED as u32, - } -} - -bitflags! { - #[doc = " -Mode options for RepositoryInitOptions -"] - flags RepositoryInitMode: u32 { - /// Use permissions configured by umask - the default - const REPOSITORY_INIT_SHARED_UMASK = - raw::GIT_REPOSITORY_INIT_SHARED_UMASK as u32, - /// Use `--shared=group` behavior, chmod'ing the new repo to be - /// group writable and \"g+sx\" for sticky group assignment - const REPOSITORY_INIT_SHARED_GROUP = - raw::GIT_REPOSITORY_INIT_SHARED_GROUP as u32, - /// Use `--shared=all` behavior, adding world readability. - const REPOSITORY_INIT_SHARED_ALL = - raw::GIT_REPOSITORY_INIT_SHARED_ALL as u32, - } -} - -/// What type of change is described by a `DiffDelta`? -#[derive(Copy, Clone, Debug)] -pub enum Delta { - /// No changes - Unmodified, - /// Entry does not exist in old version - Added, - /// Entry does not exist in new version - Deleted, - /// Entry content changed between old and new - Modified, - /// Entry was renamed wbetween old and new - Renamed, - /// Entry was copied from another old entry - Copied, - /// Entry is ignored item in workdir - Ignored, - /// Entry is untracked item in workdir - Untracked, - /// Type of entry changed between old and new - Typechange, - /// Entry is unreadable - Unreadable, - /// Entry in the index is conflicted - Conflicted, -} - -bitflags! { - #[doc = r#" -Return codes for submodule status. - -A combination of these flags will be returned to describe the status of a -submodule. Depending on the "ignore" property of the submodule, some of -the flags may never be returned because they indicate changes that are -supposed to be ignored. - -Submodule info is contained in 4 places: the HEAD tree, the index, config -files (both .git/config and .gitmodules), and the working directory. Any -or all of those places might be missing information about the submodule -depending on what state the repo is in. We consider all four places to -build the combination of status flags. - -There are four values that are not really status, but give basic info -about what sources of submodule data are available. These will be -returned even if ignore is set to "ALL". - -* IN_HEAD - superproject head contains submodule -* IN_INDEX - superproject index contains submodule -* IN_CONFIG - superproject gitmodules has submodule -* IN_WD - superproject workdir has submodule - -The following values will be returned so long as ignore is not "ALL". - -* INDEX_ADDED - in index, not in head -* INDEX_DELETED - in head, not in index -* INDEX_MODIFIED - index and head don't match -* WD_UNINITIALIZED - workdir contains empty directory -* WD_ADDED - in workdir, not index -* WD_DELETED - in index, not workdir -* WD_MODIFIED - index and workdir head don't match - -The following can only be returned if ignore is "NONE" or "UNTRACKED". - -* WD_INDEX_MODIFIED - submodule workdir index is dirty -* WD_WD_MODIFIED - submodule workdir has modified files - -Lastly, the following will only be returned for ignore "NONE". - -* WD_UNTRACKED - wd contains untracked files -"#] - flags SubmoduleStatus: u32 { - #[allow(missing_docs)] - const SUBMODULE_STATUS_IN_HEAD = - raw::GIT_SUBMODULE_STATUS_IN_HEAD as u32, - #[allow(missing_docs)] - const SUBMODULE_STATUS_IN_INDEX = - raw::GIT_SUBMODULE_STATUS_IN_INDEX as u32, - #[allow(missing_docs)] - const SUBMODULE_STATUS_IN_CONFIG = - raw::GIT_SUBMODULE_STATUS_IN_CONFIG as u32, - #[allow(missing_docs)] - const SUBMODULE_STATUS_IN_WD = - raw::GIT_SUBMODULE_STATUS_IN_WD as u32, - #[allow(missing_docs)] - const SUBMODULE_STATUS_INDEX_ADDED = - raw::GIT_SUBMODULE_STATUS_INDEX_ADDED as u32, - #[allow(missing_docs)] - const SUBMODULE_STATUS_INDEX_DELETED = - raw::GIT_SUBMODULE_STATUS_INDEX_DELETED as u32, - #[allow(missing_docs)] - const SUBMODULE_STATUS_INDEX_MODIFIED = - raw::GIT_SUBMODULE_STATUS_INDEX_MODIFIED as u32, - #[allow(missing_docs)] - const SUBMODULE_STATUS_WD_UNINITIALIZED = - raw::GIT_SUBMODULE_STATUS_WD_UNINITIALIZED as u32, - #[allow(missing_docs)] - const SUBMODULE_STATUS_WD_ADDED = - raw::GIT_SUBMODULE_STATUS_WD_ADDED as u32, - #[allow(missing_docs)] - const SUBMODULE_STATUS_WD_DELETED = - raw::GIT_SUBMODULE_STATUS_WD_DELETED as u32, - #[allow(missing_docs)] - const SUBMODULE_STATUS_WD_MODIFIED = - raw::GIT_SUBMODULE_STATUS_WD_MODIFIED as u32, - #[allow(missing_docs)] - const SUBMODULE_STATUS_WD_INDEX_MODIFIED = - raw::GIT_SUBMODULE_STATUS_WD_INDEX_MODIFIED as u32, - #[allow(missing_docs)] - const SUBMODULE_STATUS_WD_WD_MODIFIED = - raw::GIT_SUBMODULE_STATUS_WD_WD_MODIFIED as u32, - #[allow(missing_docs)] - const SUBMODULE_STATUS_WD_UNTRACKED = - raw::GIT_SUBMODULE_STATUS_WD_UNTRACKED as u32, - } - -} - -/// Submodule ignore values -/// -/// These values represent settings for the `submodule.$name.ignore` -/// configuration value which says how deeply to look at the working -/// directory when getting the submodule status. -pub enum SubmoduleIgnore { - /// Use the submodule's configuration - Unspecified, - /// Any change or untracked file is considered dirty - None, - /// Only dirty if tracked files have changed - Untracked, - /// Only dirty if HEAD has moved - Dirty, - /// Never dirty - All, -} - -bitflags! { - /// ... - flags PathspecFlags: u32 { - /// Use the default pathspec matching configuration. - const PATHSPEC_DEFAULT = raw::GIT_PATHSPEC_DEFAULT as u32, - /// Force matching to ignore case, otherwise matching will use native - /// case sensitivity fo the platform filesystem. - const PATHSPEC_IGNORE_CASE = raw::GIT_PATHSPEC_IGNORE_CASE as u32, - /// Force case sensitive matches, otherwise match will use the native - /// case sensitivity of the platform filesystem. - const PATHSPEC_USE_CASE = raw::GIT_PATHSPEC_USE_CASE as u32, - /// Disable glob patterns and just use simple string comparison for - /// matching. - const PATHSPEC_NO_GLOB = raw::GIT_PATHSPEC_NO_GLOB as u32, - /// Means that match functions return the error code `NotFound` if no - /// matches are found. By default no matches is a success. - const PATHSPEC_NO_MATCH_ERROR = raw::GIT_PATHSPEC_NO_MATCH_ERROR as u32, - /// Means that the list returned should track which patterns matched - /// which files so that at the end of the match we can identify patterns - /// that did not match any files. - const PATHSPEC_FIND_FAILURES = raw::GIT_PATHSPEC_FIND_FAILURES as u32, - /// Means that the list returned does not need to keep the actual - /// matching filenames. Use this to just test if there were any matches - /// at all or in combination with `PATHSPEC_FAILURES` to validate a - /// pathspec. - const PATHSPEC_FAILURES_ONLY = raw::GIT_PATHSPEC_FAILURES_ONLY as u32, - } -} - -/// Possible output formats for diff data -#[derive(Copy, Clone)] -pub enum DiffFormat { - /// full git diff - Patch, - /// just the headers of the patch - PatchHeader, - /// like git diff --raw - Raw, - /// like git diff --name-only - NameOnly, - /// like git diff --name-status - NameStatus, -} - -bitflags! { - /// Formatting options for diff stats - flags DiffStatsFormat: raw::git_diff_stats_format_t { - /// Don't generate any stats - const DIFF_STATS_NONE = raw::GIT_DIFF_STATS_NONE, - /// Equivalent of `--stat` in git - const DIFF_STATS_FULL = raw::GIT_DIFF_STATS_FULL, - /// Equivalent of `--shortstat` in git - const DIFF_STATS_SHORT = raw::GIT_DIFF_STATS_SHORT, - /// Equivalent of `--numstat` in git - const DIFF_STATS_NUMBER = raw::GIT_DIFF_STATS_NUMBER, - /// Extended header information such as creations, renames and mode - /// changes, equivalent of `--summary` in git - const DIFF_STATS_INCLUDE_SUMMARY = - raw::GIT_DIFF_STATS_INCLUDE_SUMMARY, - } -} - -/// Automatic tag following options. -pub enum AutotagOption { - /// Use the setting from the remote's configuration - Unspecified, - /// Ask the server for tags pointing to objects we're already downloading - Auto, - /// Don't ask for any tags beyond the refspecs - None, - /// Ask for all the tags - All, -} - -/// Configuration for how pruning is done on a fetch -pub enum FetchPrune { - /// Use the setting from the configuration - Unspecified, - /// Force pruning on - On, - /// Force pruning off - Off, -} - -#[cfg(test)] -mod tests { - use super::ObjectType; - - #[test] - fn convert() { - assert_eq!(ObjectType::Blob.str(), "blob"); - assert_eq!(ObjectType::from_str("blob"), Some(ObjectType::Blob)); - assert!(ObjectType::Blob.is_loose()); - } - -} diff --git a/deps/git2-0.4.2/src/object.rs b/deps/git2-0.4.2/src/object.rs deleted file mode 100644 index 210a43c24..000000000 --- a/deps/git2-0.4.2/src/object.rs +++ /dev/null @@ -1,132 +0,0 @@ -use std::marker; -use std::mem; - -use {raw, Oid, ObjectType, Error, Buf, Commit, Tag, Blob, Tree, Repository}; -use {Describe, DescribeOptions}; -use util::Binding; - -/// A structure to represent a git [object][1] -/// -/// [1]: http://git-scm.com/book/en/Git-Internals-Git-Objects -pub struct Object<'repo> { - raw: *mut raw::git_object, - _marker: marker::PhantomData<&'repo Repository>, -} - -impl<'repo> Object<'repo> { - /// Get the id (SHA1) of a repository object - pub fn id(&self) -> Oid { - unsafe { - Binding::from_raw(raw::git_object_id(&*self.raw)) - } - } - - /// Get the object type of an object. - /// - /// If the type is unknown, then `None` is returned. - pub fn kind(&self) -> Option { - ObjectType::from_raw(unsafe { raw::git_object_type(&*self.raw) }) - } - - /// Recursively peel an object until an object of the specified type is met. - /// - /// If you pass `Any` as the target type, then the object will be - /// peeled until the type changes (e.g. a tag will be chased until the - /// referenced object is no longer a tag). - pub fn peel(&self, kind: ObjectType) -> Result, Error> { - let mut raw = 0 as *mut raw::git_object; - unsafe { - try_call!(raw::git_object_peel(&mut raw, &*self.raw(), kind)); - Ok(Binding::from_raw(raw)) - } - } - - /// Get a short abbreviated OID string for the object - /// - /// This starts at the "core.abbrev" length (default 7 characters) and - /// iteratively extends to a longer string if that length is ambiguous. The - /// result will be unambiguous (at least until new objects are added to the - /// repository). - pub fn short_id(&self) -> Result { - unsafe { - let buf = Buf::new(); - try_call!(raw::git_object_short_id(buf.raw(), &*self.raw())); - Ok(buf) - } - } - - /// Attempt to view this object as a commit. - /// - /// Returns `None` if the object is not actually a commit. - pub fn as_commit(&self) -> Option<&Commit<'repo>> { - self.cast(ObjectType::Commit) - } - - /// Attempt to view this object as a tag. - /// - /// Returns `None` if the object is not actually a tag. - pub fn as_tag(&self) -> Option<&Tag<'repo>> { - self.cast(ObjectType::Tag) - } - - /// Attempt to view this object as a tree. - /// - /// Returns `None` if the object is not actually a tree. - pub fn as_tree(&self) -> Option<&Tree<'repo>> { - self.cast(ObjectType::Tree) - } - - /// Attempt to view this object as a blob. - /// - /// Returns `None` if the object is not actually a blob. - pub fn as_blob(&self) -> Option<&Blob<'repo>> { - self.cast(ObjectType::Blob) - } - - /// Describes a commit - /// - /// Performs a describe operation on this commitish object. - pub fn describe(&self, opts: &DescribeOptions) - -> Result { - let mut ret = 0 as *mut _; - unsafe { - try_call!(raw::git_describe_commit(&mut ret, self.raw, opts.raw())); - Ok(Binding::from_raw(ret)) - } - } - - fn cast(&self, kind: ObjectType) -> Option<&T> { - assert_eq!(mem::size_of::(), mem::size_of::()); - if self.kind() == Some(kind) { - unsafe { Some(&*(self as *const _ as *const T)) } - } else { - None - } - } -} - -impl<'repo> Clone for Object<'repo> { - fn clone(&self) -> Object<'repo> { - let mut raw = 0 as *mut raw::git_object; - unsafe { - let rc = raw::git_object_dup(&mut raw, self.raw); - assert_eq!(rc, 0); - Binding::from_raw(raw) - } - } -} - -impl<'repo> Binding for Object<'repo> { - type Raw = *mut raw::git_object; - - unsafe fn from_raw(raw: *mut raw::git_object) -> Object<'repo> { - Object { raw: raw, _marker: marker::PhantomData, } - } - fn raw(&self) -> *mut raw::git_object { self.raw } -} - -impl<'repo> Drop for Object<'repo> { - fn drop(&mut self) { - unsafe { raw::git_object_free(self.raw) } - } -} diff --git a/deps/git2-0.4.2/src/repo.rs b/deps/git2-0.4.2/src/repo.rs deleted file mode 100644 index 2d1da2bee..000000000 --- a/deps/git2-0.4.2/src/repo.rs +++ /dev/null @@ -1,1930 +0,0 @@ -use std::ffi::{CStr, CString}; -use std::iter::IntoIterator; -use std::mem; -use std::path::Path; -use std::str; -use libc::{c_int, c_char, size_t, c_void, c_uint}; - -use {raw, Revspec, Error, init, Object, RepositoryState, Remote, Buf}; -use {ResetType, Signature, Reference, References, Submodule, Blame, BlameOptions}; -use {Branches, BranchType, Index, Config, Oid, Blob, Branch, Commit, Tree}; -use {AnnotatedCommit, MergeOptions, SubmoduleIgnore, SubmoduleStatus}; -use {ObjectType, Tag, Note, Notes, StatusOptions, Statuses, Status, Revwalk}; -use {RevparseMode, RepositoryInitMode, Reflog, IntoCString, Describe}; -use {DescribeOptions, TreeBuilder, Diff, DiffOptions}; -use build::{RepoBuilder, CheckoutBuilder}; -use string_array::StringArray; -use oid_array::OidArray; -use util::{self, Binding}; - -/// An owned git repository, representing all state associated with the -/// underlying filesystem. -/// -/// This structure corresponds to a `git_repository` in libgit2. Many other -/// types in git2-rs are derivative from this structure and are attached to its -/// lifetime. -/// -/// When a repository goes out of scope it is freed in memory but not deleted -/// from the filesystem. -pub struct Repository { - raw: *mut raw::git_repository, -} - -// It is the current belief that a `Repository` can be sent among threads, or -// even shared among threads in a mutex. -unsafe impl Send for Repository {} - -/// Options which can be used to configure how a repository is initialized -pub struct RepositoryInitOptions { - flags: u32, - mode: u32, - workdir_path: Option, - description: Option, - template_path: Option, - initial_head: Option, - origin_url: Option, -} - -impl Repository { - /// Attempt to open an already-existing repository at `path`. - /// - /// The path can point to either a normal or bare repository. - pub fn open>(path: P) -> Result { - init(); - let path = try!(path.as_ref().into_c_string()); - let mut ret = 0 as *mut raw::git_repository; - unsafe { - try_call!(raw::git_repository_open(&mut ret, path)); - Ok(Binding::from_raw(ret)) - } - } - - /// Attempt to open an already-existing repository at or above `path` - /// - /// This starts at `path` and looks up the filesystem hierarchy - /// until it finds a repository. - pub fn discover>(path: P) -> Result { - // TODO: this diverges significantly from the libgit2 API - init(); - let buf = Buf::new(); - let path = try!(path.as_ref().into_c_string()); - unsafe { - try_call!(raw::git_repository_discover(buf.raw(), path, 1, - 0 as *const _)); - } - Repository::open(util::bytes2path(&*buf)) - } - - /// Creates a new repository in the specified folder. - /// - /// This by default will create any necessary directories to create the - /// repository, and it will read any user-specified templates when creating - /// the repository. This behavior can be configured through `init_opts`. - pub fn init>(path: P) -> Result { - Repository::init_opts(path, &RepositoryInitOptions::new()) - } - - /// Creates a new `--bare` repository in the specified folder. - /// - /// The folder must exist prior to invoking this function. - pub fn init_bare>(path: P) -> Result { - Repository::init_opts(path, RepositoryInitOptions::new().bare(true)) - } - - /// Creates a new `--bare` repository in the specified folder. - /// - /// The folder must exist prior to invoking this function. - pub fn init_opts>(path: P, opts: &RepositoryInitOptions) - -> Result { - init(); - let path = try!(path.as_ref().into_c_string()); - let mut ret = 0 as *mut raw::git_repository; - unsafe { - let mut opts = opts.raw(); - try_call!(raw::git_repository_init_ext(&mut ret, path, &mut opts)); - Ok(Binding::from_raw(ret)) - } - } - - /// Clone a remote repository. - /// - /// See the `RepoBuilder` struct for more information. This function will - /// delegate to a fresh `RepoBuilder` - pub fn clone>(url: &str, into: P) - -> Result { - ::init(); - RepoBuilder::new().clone(url, into.as_ref()) - } - - /// Execute a rev-parse operation against the `spec` listed. - /// - /// The resulting revision specification is returned, or an error is - /// returned if one occurs. - pub fn revparse(&self, spec: &str) -> Result { - let mut raw = raw::git_revspec { - from: 0 as *mut _, - to: 0 as *mut _, - flags: 0, - }; - let spec = try!(CString::new(spec)); - unsafe { - try_call!(raw::git_revparse(&mut raw, self.raw, spec)); - let to = Binding::from_raw_opt(raw.to); - let from = Binding::from_raw_opt(raw.from); - let mode = RevparseMode::from_bits_truncate(raw.flags as u32); - Ok(Revspec::from_objects(from, to, mode)) - } - } - - /// Find a single object, as specified by a revision string. - pub fn revparse_single(&self, spec: &str) -> Result { - let spec = try!(CString::new(spec)); - let mut obj = 0 as *mut raw::git_object; - unsafe { - try_call!(raw::git_revparse_single(&mut obj, self.raw, spec)); - assert!(!obj.is_null()); - Ok(Binding::from_raw(obj)) - } - } - - /// Find a single object and intermediate reference by a revision string. - /// - /// See `man gitrevisions`, or - /// http://git-scm.com/docs/git-rev-parse.html#_specifying_revisions for - /// information on the syntax accepted. - /// - /// In some cases (`@{<-n>}` or `@{upstream}`), the expression - /// may point to an intermediate reference. When such expressions are being - /// passed in, this intermediate reference is returned. - pub fn revparse_ext(&self, spec: &str) - -> Result<(Object, Option), Error> { - let spec = try!(CString::new(spec)); - let mut git_obj = 0 as *mut raw::git_object; - let mut git_ref = 0 as *mut raw::git_reference; - unsafe { - try_call!(raw::git_revparse_ext(&mut git_obj, &mut git_ref, - self.raw, spec)); - assert!(!git_obj.is_null()); - Ok((Binding::from_raw(git_obj), Binding::from_raw_opt(git_ref))) - } - } - - /// Tests whether this repository is a bare repository or not. - pub fn is_bare(&self) -> bool { - unsafe { raw::git_repository_is_bare(self.raw) == 1 } - } - - /// Tests whether this repository is a shallow clone. - pub fn is_shallow(&self) -> bool { - unsafe { raw::git_repository_is_shallow(self.raw) == 1 } - } - - /// Tests whether this repository is empty. - pub fn is_empty(&self) -> Result { - let empty = unsafe { - try_call!(raw::git_repository_is_empty(self.raw)) - }; - Ok(empty == 1) - } - - /// Returns the path to the `.git` folder for normal repositories or the - /// repository itself for bare repositories. - pub fn path(&self) -> &Path { - unsafe { - let ptr = raw::git_repository_path(self.raw); - util::bytes2path(::opt_bytes(self, ptr).unwrap()) - } - } - - /// Returns the current state of this repository - pub fn state(&self) -> RepositoryState { - let state = unsafe { raw::git_repository_state(self.raw) }; - macro_rules! check( ($($raw:ident => $real:ident),*) => ( - $(if state == raw::$raw as c_int { - super::RepositoryState::$real - }) else * - else { - panic!("unknown repository state: {}", state) - } - ) ); - - check!( - GIT_REPOSITORY_STATE_NONE => Clean, - GIT_REPOSITORY_STATE_MERGE => Merge, - GIT_REPOSITORY_STATE_REVERT => Revert, - GIT_REPOSITORY_STATE_REVERT_SEQUENCE => RevertSequence, - GIT_REPOSITORY_STATE_CHERRYPICK => CherryPick, - GIT_REPOSITORY_STATE_CHERRYPICK_SEQUENCE => CherryPickSequence, - GIT_REPOSITORY_STATE_BISECT => Bisect, - GIT_REPOSITORY_STATE_REBASE => Rebase, - GIT_REPOSITORY_STATE_REBASE_INTERACTIVE => RebaseInteractive, - GIT_REPOSITORY_STATE_REBASE_MERGE => RebaseMerge, - GIT_REPOSITORY_STATE_APPLY_MAILBOX => ApplyMailbox, - GIT_REPOSITORY_STATE_APPLY_MAILBOX_OR_REBASE => ApplyMailboxOrRebase - ) - } - - /// Get the path of the working directory for this repository. - /// - /// If this repository is bare, then `None` is returned. - pub fn workdir(&self) -> Option<&Path> { - unsafe { - let ptr = raw::git_repository_workdir(self.raw); - if ptr.is_null() { - None - } else { - Some(util::bytes2path(CStr::from_ptr(ptr).to_bytes())) - } - } - } - - /// Get the currently active namespace for this repository. - /// - /// If there is no namespace, or the namespace is not a valid utf8 string, - /// `None` is returned. - pub fn namespace(&self) -> Option<&str> { - self.namespace_bytes().and_then(|s| str::from_utf8(s).ok()) - } - - /// Get the currently active namespace for this repository as a byte array. - /// - /// If there is no namespace, `None` is returned. - pub fn namespace_bytes(&self) -> Option<&[u8]> { - unsafe { ::opt_bytes(self, raw::git_repository_get_namespace(self.raw)) } - } - - /// List all remotes for a given repository - pub fn remotes(&self) -> Result { - let mut arr = raw::git_strarray { - strings: 0 as *mut *mut c_char, - count: 0, - }; - unsafe { - try_call!(raw::git_remote_list(&mut arr, self.raw)); - Ok(Binding::from_raw(arr)) - } - } - - /// Get the information for a particular remote - pub fn find_remote(&self, name: &str) -> Result { - let mut ret = 0 as *mut raw::git_remote; - let name = try!(CString::new(name)); - unsafe { - try_call!(raw::git_remote_lookup(&mut ret, self.raw, name)); - Ok(Binding::from_raw(ret)) - } - } - - /// Add a remote with the default fetch refspec to the repository's - /// configuration. - pub fn remote(&self, name: &str, url: &str) -> Result { - let mut ret = 0 as *mut raw::git_remote; - let name = try!(CString::new(name)); - let url = try!(CString::new(url)); - unsafe { - try_call!(raw::git_remote_create(&mut ret, self.raw, name, url)); - Ok(Binding::from_raw(ret)) - } - } - - /// Create an anonymous remote - /// - /// Create a remote with the given url and refspec in memory. You can use - /// this when you have a URL instead of a remote's name. Note that anonymous - /// remotes cannot be converted to persisted remotes. - pub fn remote_anonymous(&self, url: &str) -> Result { - let mut ret = 0 as *mut raw::git_remote; - let url = try!(CString::new(url)); - unsafe { - try_call!(raw::git_remote_create_anonymous(&mut ret, self.raw, url)); - Ok(Binding::from_raw(ret)) - } - } - - /// Give a remote a new name - /// - /// All remote-tracking branches and configuration settings for the remote - /// are updated. - /// - /// A temporary in-memory remote cannot be given a name with this method. - /// - /// No loaded instances of the remote with the old name will change their - /// name or their list of refspecs. - /// - /// The returned array of strings is a list of the non-default refspecs - /// which cannot be renamed and are returned for further processing by the - /// caller. - pub fn remote_rename(&self, name: &str, - new_name: &str) -> Result { - let name = try!(CString::new(name)); - let new_name = try!(CString::new(new_name)); - let mut problems = raw::git_strarray { - count: 0, - strings: 0 as *mut *mut c_char, - }; - unsafe { - try_call!(raw::git_remote_rename(&mut problems, self.raw, name, - new_name)); - Ok(Binding::from_raw(problems)) - } - } - - /// Delete an existing persisted remote. - /// - /// All remote-tracking branches and configuration settings for the remote - /// will be removed. - pub fn remote_delete(&self, name: &str) -> Result<(), Error> { - let name = try!(CString::new(name)); - unsafe { try_call!(raw::git_remote_delete(self.raw, name)); } - Ok(()) - } - - /// Add a fetch refspec to the remote's configuration - /// - /// Add the given refspec to the fetch list in the configuration. No loaded - /// remote instances will be affected. - pub fn remote_add_fetch(&self, name: &str, spec: &str) - -> Result<(), Error> { - let name = try!(CString::new(name)); - let spec = try!(CString::new(spec)); - unsafe { - try_call!(raw::git_remote_add_fetch(self.raw, name, spec)); - } - Ok(()) - } - - /// Add a push refspec to the remote's configuration. - /// - /// Add the given refspec to the push list in the configuration. No - /// loaded remote instances will be affected. - pub fn remote_add_push(&self, name: &str, spec: &str) - -> Result<(), Error> { - let name = try!(CString::new(name)); - let spec = try!(CString::new(spec)); - unsafe { - try_call!(raw::git_remote_add_push(self.raw, name, spec)); - } - Ok(()) - } - - /// Set the remote's url in the configuration - /// - /// Remote objects already in memory will not be affected. This assumes - /// the common case of a single-url remote and will otherwise return an - /// error. - pub fn remote_set_url(&self, name: &str, url: &str) -> Result<(), Error> { - let name = try!(CString::new(name)); - let url = try!(CString::new(url)); - unsafe { try_call!(raw::git_remote_set_url(self.raw, name, url)); } - Ok(()) - } - - /// Set the remote's url for pushing in the configuration. - /// - /// Remote objects already in memory will not be affected. This assumes - /// the common case of a single-url remote and will otherwise return an - /// error. - /// - /// `None` indicates that it should be cleared. - pub fn remote_set_pushurl(&self, name: &str, pushurl: Option<&str>) - -> Result<(), Error> { - let name = try!(CString::new(name)); - let pushurl = try!(::opt_cstr(pushurl)); - unsafe { - try_call!(raw::git_remote_set_pushurl(self.raw, name, pushurl)); - } - Ok(()) - } - - /// Sets the current head to the specified object and optionally resets - /// the index and working tree to match. - /// - /// A soft reset means the head will be moved to the commit. - /// - /// A mixed reset will trigger a soft reset, plus the index will be - /// replaced with the content of the commit tree. - /// - /// A hard reset will trigger a mixed reset and the working directory will - /// be replaced with the content of the index. (Untracked and ignored files - /// will be left alone, however.) - /// - /// The `target` is a commit-ish to which the head should be moved to. The - /// object can either be a commit or a tag, but tags must be derefernceable - /// to a commit. - /// - /// The `checkout` options will only be used for a hard reset. - pub fn reset(&self, - target: &Object, - kind: ResetType, - checkout: Option<&mut CheckoutBuilder>) - -> Result<(), Error> { - unsafe { - let mut opts: raw::git_checkout_options = mem::zeroed(); - try_call!(raw::git_checkout_init_options(&mut opts, - raw::GIT_CHECKOUT_OPTIONS_VERSION)); - let opts = checkout.map(|c| { - c.configure(&mut opts); &mut opts - }); - try_call!(raw::git_reset(self.raw, target.raw(), kind, opts)); - } - Ok(()) - } - - /// Updates some entries in the index from the target commit tree. - /// - /// The scope of the updated entries is determined by the paths being - /// in the iterator provided. - /// - /// Passing a `None` target will result in removing entries in the index - /// matching the provided pathspecs. - pub fn reset_default(&self, - target: Option<&Object>, - paths: I) -> Result<(), Error> - where T: IntoCString, I: IntoIterator, - { - let (_a, _b, mut arr) = try!(::util::iter2cstrs(paths)); - let target = target.map(|t| t.raw()); - unsafe { - try_call!(raw::git_reset_default(self.raw, target, &mut arr)); - } - Ok(()) - } - - /// Retrieve and resolve the reference pointed at by HEAD. - pub fn head(&self) -> Result { - let mut ret = 0 as *mut raw::git_reference; - unsafe { - try_call!(raw::git_repository_head(&mut ret, self.raw)); - Ok(Binding::from_raw(ret)) - } - } - - /// Make the repository HEAD point to the specified reference. - /// - /// If the provided reference points to a tree or a blob, the HEAD is - /// unaltered and an error is returned. - /// - /// If the provided reference points to a branch, the HEAD will point to - /// that branch, staying attached, or become attached if it isn't yet. If - /// the branch doesn't exist yet, no error will be returned. The HEAD will - /// then be attached to an unborn branch. - /// - /// Otherwise, the HEAD will be detached and will directly point to the - /// commit. - pub fn set_head(&self, refname: &str) -> Result<(), Error> { - let refname = try!(CString::new(refname)); - unsafe { - try_call!(raw::git_repository_set_head(self.raw, refname)); - } - Ok(()) - } - - /// Make the repository HEAD directly point to the commit. - /// - /// If the provided committish cannot be found in the repository, the HEAD - /// is unaltered and an error is returned. - /// - /// If the provided commitish cannot be peeled into a commit, the HEAD is - /// unaltered and an error is returned. - /// - /// Otherwise, the HEAD will eventually be detached and will directly point - /// to the peeled commit. - pub fn set_head_detached(&self, commitish: Oid) -> Result<(), Error> { - unsafe { - try_call!(raw::git_repository_set_head_detached(self.raw, - commitish.raw())); - } - Ok(()) - } - - /// Create an iterator for the repo's references - pub fn references(&self) -> Result { - let mut ret = 0 as *mut raw::git_reference_iterator; - unsafe { - try_call!(raw::git_reference_iterator_new(&mut ret, self.raw)); - Ok(Binding::from_raw(ret)) - } - } - - /// Create an iterator for the repo's references that match the specified - /// glob - pub fn references_glob(&self, glob: &str) -> Result { - let mut ret = 0 as *mut raw::git_reference_iterator; - let glob = try!(CString::new(glob)); - unsafe { - try_call!(raw::git_reference_iterator_glob_new(&mut ret, self.raw, - glob)); - - Ok(Binding::from_raw(ret)) - } - } - - /// Load all submodules for this repository and return them. - pub fn submodules(&self) -> Result, Error> { - struct Data<'a, 'b:'a> { - repo: &'b Repository, - ret: &'a mut Vec>, - } - let mut ret = Vec::new(); - - unsafe { - let mut data = Data { - repo: self, - ret: &mut ret, - }; - try_call!(raw::git_submodule_foreach(self.raw, append, - &mut data as *mut _ - as *mut c_void)); - } - - return Ok(ret); - - extern fn append(_repo: *mut raw::git_submodule, - name: *const c_char, - data: *mut c_void) -> c_int { - unsafe { - let data = &mut *(data as *mut Data); - let mut raw = 0 as *mut raw::git_submodule; - let rc = raw::git_submodule_lookup(&mut raw, data.repo.raw(), - name); - assert_eq!(rc, 0); - data.ret.push(Binding::from_raw(raw)); - } - 0 - } - } - - /// Gather file status information and populate the returned structure. - /// - /// Note that if a pathspec is given in the options to filter the - /// status, then the results from rename detection (if you enable it) may - /// not be accurate. To do rename detection properly, this must be called - /// with no pathspec so that all files can be considered. - pub fn statuses(&self, options: Option<&mut StatusOptions>) - -> Result { - let mut ret = 0 as *mut raw::git_status_list; - unsafe { - try_call!(raw::git_status_list_new(&mut ret, self.raw, - options.map(|s| s.raw()) - .unwrap_or(0 as *const _))); - Ok(Binding::from_raw(ret)) - } - } - - /// Test if the ignore rules apply to a given file. - /// - /// This function checks the ignore rules to see if they would apply to the - /// given file. This indicates if the file would be ignored regardless of - /// whether the file is already in the index or committed to the repository. - /// - /// One way to think of this is if you were to do "git add ." on the - /// directory containing the file, would it be added or not? - pub fn status_should_ignore(&self, path: &Path) -> Result { - let mut ret = 0 as c_int; - let path = try!(path.into_c_string()); - unsafe { - try_call!(raw::git_status_should_ignore(&mut ret, self.raw, - path)); - } - Ok(ret != 0) - } - - /// Get file status for a single file. - /// - /// This tries to get status for the filename that you give. If no files - /// match that name (in either the HEAD, index, or working directory), this - /// returns NotFound. - /// - /// If the name matches multiple files (for example, if the path names a - /// directory or if running on a case- insensitive filesystem and yet the - /// HEAD has two entries that both match the path), then this returns - /// Ambiguous because it cannot give correct results. - /// - /// This does not do any sort of rename detection. Renames require a set of - /// targets and because of the path filtering, there is not enough - /// information to check renames correctly. To check file status with rename - /// detection, there is no choice but to do a full `statuses` and scan - /// through looking for the path that you are interested in. - pub fn status_file(&self, path: &Path) -> Result { - let mut ret = 0 as c_uint; - let path = try!(path.into_c_string()); - unsafe { - try_call!(raw::git_status_file(&mut ret, self.raw, - path)); - } - Ok(Status::from_bits_truncate(ret as u32)) - } - - /// Create an iterator which loops over the requested branches. - pub fn branches(&self, filter: Option) - -> Result { - let mut raw = 0 as *mut raw::git_branch_iterator; - unsafe { - try_call!(raw::git_branch_iterator_new(&mut raw, self.raw(), filter)); - Ok(Branches::from_raw(raw)) - } - } - - /// Get the Index file for this repository. - /// - /// If a custom index has not been set, the default index for the repository - /// will be returned (the one located in .git/index). - pub fn index(&self) -> Result { - let mut raw = 0 as *mut raw::git_index; - unsafe { - try_call!(raw::git_repository_index(&mut raw, self.raw())); - Ok(Binding::from_raw(raw)) - } - } - - /// Get the configuration file for this repository. - /// - /// If a configuration file has not been set, the default config set for the - /// repository will be returned, including global and system configurations - /// (if they are available). - pub fn config(&self) -> Result { - let mut raw = 0 as *mut raw::git_config; - unsafe { - try_call!(raw::git_repository_config(&mut raw, self.raw())); - Ok(Binding::from_raw(raw)) - } - } - - /// Write an in-memory buffer to the ODB as a blob. - /// - /// The Oid returned can in turn be passed to `find_blob` to get a handle to - /// the blob. - pub fn blob(&self, data: &[u8]) -> Result { - let mut raw = raw::git_oid { id: [0; raw::GIT_OID_RAWSZ] }; - unsafe { - let ptr = data.as_ptr() as *const c_void; - let len = data.len() as size_t; - try_call!(raw::git_blob_create_frombuffer(&mut raw, self.raw(), - ptr, len)); - Ok(Binding::from_raw(&raw as *const _)) - } - } - - /// Read a file from the filesystem and write its content to the Object - /// Database as a loose blob - /// - /// The Oid returned can in turn be passed to `find_blob` to get a handle to - /// the blob. - pub fn blob_path(&self, path: &Path) -> Result { - let path = try!(path.into_c_string()); - let mut raw = raw::git_oid { id: [0; raw::GIT_OID_RAWSZ] }; - unsafe { - try_call!(raw::git_blob_create_fromdisk(&mut raw, self.raw(), - path)); - Ok(Binding::from_raw(&raw as *const _)) - } - } - - /// Lookup a reference to one of the objects in a repository. - pub fn find_blob(&self, oid: Oid) -> Result { - let mut raw = 0 as *mut raw::git_blob; - unsafe { - try_call!(raw::git_blob_lookup(&mut raw, self.raw(), oid.raw())); - Ok(Binding::from_raw(raw)) - } - } - - /// Create a new branch pointing at a target commit - /// - /// A new direct reference will be created pointing to this target commit. - /// If `force` is true and a reference already exists with the given name, - /// it'll be replaced. - pub fn branch(&self, - branch_name: &str, - target: &Commit, - force: bool) -> Result { - let branch_name = try!(CString::new(branch_name)); - let mut raw = 0 as *mut raw::git_reference; - unsafe { - try_call!(raw::git_branch_create(&mut raw, - self.raw(), - branch_name, - target.raw(), - force)); - Ok(Branch::wrap(Binding::from_raw(raw))) - } - } - - /// Lookup a branch by its name in a repository. - pub fn find_branch(&self, name: &str, branch_type: BranchType) - -> Result { - let name = try!(CString::new(name)); - let mut ret = 0 as *mut raw::git_reference; - unsafe { - try_call!(raw::git_branch_lookup(&mut ret, self.raw(), name, - branch_type)); - Ok(Branch::wrap(Binding::from_raw(ret))) - } - } - - /// Create new commit in the repository - /// - /// If the `update_ref` is not `None`, name of the reference that will be - /// updated to point to this commit. If the reference is not direct, it will - /// be resolved to a direct reference. Use "HEAD" to update the HEAD of the - /// current branch and make it point to this commit. If the reference - /// doesn't exist yet, it will be created. If it does exist, the first - /// parent must be the tip of this branch. - pub fn commit(&self, - update_ref: Option<&str>, - author: &Signature, - committer: &Signature, - message: &str, - tree: &Tree, - parents: &[&Commit]) -> Result { - let update_ref = try!(::opt_cstr(update_ref)); - let mut parent_ptrs = parents.iter().map(|p| { - p.raw() as *const raw::git_commit - }).collect::>(); - let message = try!(CString::new(message)); - let mut raw = raw::git_oid { id: [0; raw::GIT_OID_RAWSZ] }; - unsafe { - try_call!(raw::git_commit_create(&mut raw, - self.raw(), - update_ref, - author.raw(), - committer.raw(), - 0 as *const c_char, - message, - tree.raw(), - parents.len() as size_t, - parent_ptrs.as_mut_ptr())); - Ok(Binding::from_raw(&raw as *const _)) - } - } - - - /// Lookup a reference to one of the commits in a repository. - pub fn find_commit(&self, oid: Oid) -> Result { - let mut raw = 0 as *mut raw::git_commit; - unsafe { - try_call!(raw::git_commit_lookup(&mut raw, self.raw(), oid.raw())); - Ok(Binding::from_raw(raw)) - } - } - - /// Lookup a reference to one of the objects in a repository. - pub fn find_object(&self, oid: Oid, - kind: Option) -> Result { - let mut raw = 0 as *mut raw::git_object; - unsafe { - try_call!(raw::git_object_lookup(&mut raw, self.raw(), oid.raw(), - kind)); - Ok(Binding::from_raw(raw)) - } - } - - /// Create a new direct reference. - /// - /// This function will return an error if a reference already exists with - /// the given name unless force is true, in which case it will be - /// overwritten. - pub fn reference(&self, name: &str, id: Oid, force: bool, - log_message: &str) -> Result { - let name = try!(CString::new(name)); - let log_message = try!(CString::new(log_message)); - let mut raw = 0 as *mut raw::git_reference; - unsafe { - try_call!(raw::git_reference_create(&mut raw, self.raw(), name, - id.raw(), force, - log_message)); - Ok(Binding::from_raw(raw)) - } - } - - /// Create a new symbolic reference. - /// - /// This function will return an error if a reference already exists with - /// the given name unless force is true, in which case it will be - /// overwritten. - pub fn reference_symbolic(&self, name: &str, target: &str, - force: bool, - log_message: &str) - -> Result { - let name = try!(CString::new(name)); - let target = try!(CString::new(target)); - let log_message = try!(CString::new(log_message)); - let mut raw = 0 as *mut raw::git_reference; - unsafe { - try_call!(raw::git_reference_symbolic_create(&mut raw, self.raw(), - name, target, force, - log_message)); - Ok(Binding::from_raw(raw)) - } - } - - /// Lookup a reference to one of the objects in a repository. - pub fn find_reference(&self, name: &str) -> Result { - let name = try!(CString::new(name)); - let mut raw = 0 as *mut raw::git_reference; - unsafe { - try_call!(raw::git_reference_lookup(&mut raw, self.raw(), name)); - Ok(Binding::from_raw(raw)) - } - } - - /// Lookup a reference by name and resolve immediately to OID. - /// - /// This function provides a quick way to resolve a reference name straight - /// through to the object id that it refers to. This avoids having to - /// allocate or free any `Reference` objects for simple situations. - pub fn refname_to_id(&self, name: &str) -> Result { - let name = try!(CString::new(name)); - let mut ret = raw::git_oid { id: [0; raw::GIT_OID_RAWSZ] }; - unsafe { - try_call!(raw::git_reference_name_to_id(&mut ret, self.raw(), name)); - Ok(Binding::from_raw(&ret as *const _)) - } - } - - /// Creates a git_annotated_commit from the given reference. - pub fn reference_to_annotated_commit(&self, reference: &Reference) - -> Result { - let mut ret = 0 as *mut raw::git_annotated_commit; - unsafe { - try_call!(raw::git_annotated_commit_from_ref(&mut ret, - self.raw(), - reference.raw())); - Ok(AnnotatedCommit::from_raw(ret)) - } - } - - /// Create a new action signature with default user and now timestamp. - /// - /// This looks up the user.name and user.email from the configuration and - /// uses the current time as the timestamp, and creates a new signature - /// based on that information. It will return `NotFound` if either the - /// user.name or user.email are not set. - pub fn signature(&self) -> Result, Error> { - let mut ret = 0 as *mut raw::git_signature; - unsafe { - try_call!(raw::git_signature_default(&mut ret, self.raw())); - Ok(Binding::from_raw(ret)) - } - } - - /// Set up a new git submodule for checkout. - /// - /// This does "git submodule add" up to the fetch and checkout of the - /// submodule contents. It preps a new submodule, creates an entry in - /// `.gitmodules` and creates an empty initialized repository either at the - /// given path in the working directory or in `.git/modules` with a gitlink - /// from the working directory to the new repo. - /// - /// To fully emulate "git submodule add" call this function, then `open()` - /// the submodule repo and perform the clone step as needed. Lastly, call - /// `finalize()` to wrap up adding the new submodule and `.gitmodules` to - /// the index to be ready to commit. - pub fn submodule(&self, url: &str, path: &Path, - use_gitlink: bool) -> Result { - let url = try!(CString::new(url)); - let path = try!(path.into_c_string()); - let mut raw = 0 as *mut raw::git_submodule; - unsafe { - try_call!(raw::git_submodule_add_setup(&mut raw, self.raw(), - url, path, use_gitlink)); - Ok(Binding::from_raw(raw)) - } - } - - /// Lookup submodule information by name or path. - /// - /// Given either the submodule name or path (they are usually the same), - /// this returns a structure describing the submodule. - pub fn find_submodule(&self, name: &str) -> Result { - let name = try!(CString::new(name)); - let mut raw = 0 as *mut raw::git_submodule; - unsafe { - try_call!(raw::git_submodule_lookup(&mut raw, self.raw(), name)); - Ok(Binding::from_raw(raw)) - } - } - - /// Get the status for a submodule. - /// - /// This looks at a submodule and tries to determine the status. It - /// will return a combination of the `SubmoduleStatus` values. - pub fn submodule_status(&self, name: &str, ignore: SubmoduleIgnore) - -> Result { - let mut ret = 0; - let name = try!(CString::new(name)); - unsafe { - try_call!(raw::git_submodule_status(&mut ret, self.raw, name, - ignore)); - } - Ok(SubmoduleStatus::from_bits_truncate(ret as u32)) - } - - /// Lookup a reference to one of the objects in a repository. - pub fn find_tree(&self, oid: Oid) -> Result { - let mut raw = 0 as *mut raw::git_tree; - unsafe { - try_call!(raw::git_tree_lookup(&mut raw, self.raw(), oid.raw())); - Ok(Binding::from_raw(raw)) - } - } - - /// Create a new TreeBuilder, optionally initialized with the - /// entries of the given Tree. - /// - /// The tree builder can be used to create or modify trees in memory and - /// write them as tree objects to the database. - pub fn treebuilder(&self, tree: Option<&Tree>) -> Result { - unsafe { - let mut ret = 0 as *mut raw::git_treebuilder; - let tree = match tree { - Some(tree) => tree.raw(), - None => 0 as *mut raw::git_tree, - }; - try_call!(raw::git_treebuilder_new(&mut ret, self.raw, tree)); - Ok(Binding::from_raw(ret)) - } - } - - - /// Create a new tag in the repository from an object - /// - /// A new reference will also be created pointing to this tag object. If - /// `force` is true and a reference already exists with the given name, - /// it'll be replaced. - /// - /// The message will not be cleaned up. - /// - /// The tag name will be checked for validity. You must avoid the characters - /// '~', '^', ':', ' \ ', '?', '[', and '*', and the sequences ".." and " @ - /// {" which have special meaning to revparse. - pub fn tag(&self, name: &str, target: &Object, - tagger: &Signature, message: &str, - force: bool) -> Result { - let name = try!(CString::new(name)); - let message = try!(CString::new(message)); - let mut raw = raw::git_oid { id: [0; raw::GIT_OID_RAWSZ] }; - unsafe { - try_call!(raw::git_tag_create(&mut raw, self.raw, name, - target.raw(), tagger.raw(), - message, force)); - Ok(Binding::from_raw(&raw as *const _)) - } - } - - /// Create a new lightweight tag pointing at a target object - /// - /// A new direct reference will be created pointing to this target object. - /// If force is true and a reference already exists with the given name, - /// it'll be replaced. - pub fn tag_lightweight(&self, - name: &str, - target: &Object, - force: bool) -> Result { - let name = try!(CString::new(name)); - let mut raw = raw::git_oid { id: [0; raw::GIT_OID_RAWSZ] }; - unsafe { - try_call!(raw::git_tag_create_lightweight(&mut raw, self.raw, name, - target.raw(), force)); - Ok(Binding::from_raw(&raw as *const _)) - } - } - - /// Lookup a tag object from the repository. - pub fn find_tag(&self, id: Oid) -> Result { - let mut raw = 0 as *mut raw::git_tag; - unsafe { - try_call!(raw::git_tag_lookup(&mut raw, self.raw, id.raw())); - Ok(Binding::from_raw(raw)) - } - } - - /// Delete an existing tag reference. - /// - /// The tag name will be checked for validity, see `tag` for some rules - /// about valid names. - pub fn tag_delete(&self, name: &str) -> Result<(), Error> { - let name = try!(CString::new(name)); - unsafe { - try_call!(raw::git_tag_delete(self.raw, name)); - Ok(()) - } - } - - /// Get a list with all the tags in the repository. - /// - /// An optional fnmatch pattern can also be specified. - pub fn tag_names(&self, pattern: Option<&str>) -> Result { - let mut arr = raw::git_strarray { - strings: 0 as *mut *mut c_char, - count: 0, - }; - unsafe { - match pattern { - Some(s) => { - let s = try!(CString::new(s)); - try_call!(raw::git_tag_list_match(&mut arr, s, self.raw)); - } - None => { try_call!(raw::git_tag_list(&mut arr, self.raw)); } - } - Ok(Binding::from_raw(arr)) - } - } - - /// Updates files in the index and the working tree to match the content of - /// the commit pointed at by HEAD. - pub fn checkout_head(&self, opts: Option<&mut CheckoutBuilder>) - -> Result<(), Error> { - unsafe { - let mut raw_opts = mem::zeroed(); - try_call!(raw::git_checkout_init_options(&mut raw_opts, - raw::GIT_CHECKOUT_OPTIONS_VERSION)); - if let Some(c) = opts { - c.configure(&mut raw_opts); - } - - try_call!(raw::git_checkout_head(self.raw, &raw_opts)); - } - Ok(()) - } - - /// Updates files in the working tree to match the content of the index. - /// - /// If the index is `None`, the repository's index will be used. - pub fn checkout_index(&self, - index: Option<&mut Index>, - opts: Option<&mut CheckoutBuilder>) -> Result<(), Error> { - unsafe { - let mut raw_opts = mem::zeroed(); - try_call!(raw::git_checkout_init_options(&mut raw_opts, - raw::GIT_CHECKOUT_OPTIONS_VERSION)); - match opts { - Some(c) => c.configure(&mut raw_opts), - None => {} - } - - try_call!(raw::git_checkout_index(self.raw, - index.map(|i| &mut *i.raw()), - &raw_opts)); - } - Ok(()) - } - - /// Updates files in the index and working tree to match the content of the - /// tree pointed at by the treeish. - pub fn checkout_tree(&self, - treeish: &Object, - opts: Option<&mut CheckoutBuilder>) -> Result<(), Error> { - unsafe { - let mut raw_opts = mem::zeroed(); - try_call!(raw::git_checkout_init_options(&mut raw_opts, - raw::GIT_CHECKOUT_OPTIONS_VERSION)); - match opts { - Some(c) => c.configure(&mut raw_opts), - None => {} - } - - try_call!(raw::git_checkout_tree(self.raw, &*treeish.raw(), - &raw_opts)); - } - Ok(()) - } - - /// Merges the given commit(s) into HEAD, writing the results into the - /// working directory. Any changes are staged for commit and any conflicts - /// are written to the index. Callers should inspect the repository's index - /// after this completes, resolve any conflicts and prepare a commit. - /// - /// For compatibility with git, the repository is put into a merging state. - /// Once the commit is done (or if the uses wishes to abort), you should - /// clear this state by calling git_repository_state_cleanup(). - pub fn merge(&self, - annotated_commits: &[&AnnotatedCommit], - merge_opts: Option<&mut MergeOptions>, - checkout_opts: Option<&mut CheckoutBuilder>) - -> Result<(), Error> - { - unsafe { - let mut raw_checkout_opts = mem::zeroed(); - try_call!(raw::git_checkout_init_options(&mut raw_checkout_opts, - raw::GIT_CHECKOUT_OPTIONS_VERSION)); - if let Some(c) = checkout_opts { - c.configure(&mut raw_checkout_opts); - } - - let mut commit_ptrs = annotated_commits.iter().map(|c| { - c.raw() as *const raw::git_annotated_commit - }).collect::>(); - - try_call!(raw::git_merge(self.raw, - commit_ptrs.as_mut_ptr(), - annotated_commits.len() as size_t, - merge_opts.map(|o| o.raw()) - .unwrap_or(0 as *const _), - &raw_checkout_opts)); - } - Ok(()) - } - - /// Merge two commits, producing an index that reflects the result of - /// the merge. The index may be written as-is to the working directory or - /// checked out. If the index is to be converted to a tree, the caller - /// should resolve any conflicts that arose as part of the merge. - pub fn merge_commits(&self, our_commit: &Commit, their_commit: &Commit, - opts: Option<&MergeOptions>) -> Result { - let mut raw = 0 as *mut raw::git_index; - unsafe { - try_call!(raw::git_merge_commits(&mut raw, self.raw, - our_commit.raw(), - their_commit.raw(), - opts.map(|o| o.raw()))); - Ok(Binding::from_raw(raw)) - } - } - - /// Remove all the metadata associated with an ongoing command like merge, - /// revert, cherry-pick, etc. For example: MERGE_HEAD, MERGE_MSG, etc. - pub fn cleanup_state(&self) -> Result<(), Error> { - unsafe { - try_call!(raw::git_repository_state_cleanup(self.raw)); - } - Ok(()) - } - - /// Add a note for an object - /// - /// The `notes_ref` argument is the canonical name of the reference to use, - /// defaulting to "refs/notes/commits". If `force` is specified then - /// previous notes are overwritten. - pub fn note(&self, - author: &Signature, - committer: &Signature, - notes_ref: Option<&str>, - oid: Oid, - note: &str, - force: bool) -> Result { - let notes_ref = try!(::opt_cstr(notes_ref)); - let note = try!(CString::new(note)); - let mut ret = raw::git_oid { id: [0; raw::GIT_OID_RAWSZ] }; - unsafe { - try_call!(raw::git_note_create(&mut ret, - self.raw, - notes_ref, - author.raw(), - committer.raw(), - oid.raw(), - note, - force)); - Ok(Binding::from_raw(&ret as *const _)) - } - } - - /// Get the default notes reference for this repository - pub fn note_default_ref(&self) -> Result { - let ret = Buf::new(); - unsafe { - try_call!(raw::git_note_default_ref(ret.raw(), self.raw)); - } - Ok(str::from_utf8(&ret).unwrap().to_string()) - } - - /// Creates a new iterator for notes in this repository. - /// - /// The `notes_ref` argument is the canonical name of the reference to use, - /// defaulting to "refs/notes/commits". - /// - /// The iterator returned yields pairs of (Oid, Oid) where the first element - /// is the id of the note and the second id is the id the note is - /// annotating. - pub fn notes(&self, notes_ref: Option<&str>) -> Result { - let notes_ref = try!(::opt_cstr(notes_ref)); - let mut ret = 0 as *mut raw::git_note_iterator; - unsafe { - try_call!(raw::git_note_iterator_new(&mut ret, self.raw, notes_ref)); - Ok(Binding::from_raw(ret)) - } - } - - /// Read the note for an object. - /// - /// The `notes_ref` argument is the canonical name of the reference to use, - /// defaulting to "refs/notes/commits". - /// - /// The id specified is the Oid of the git object to read the note from. - pub fn find_note(&self, notes_ref: Option<&str>, id: Oid) - -> Result { - let notes_ref = try!(::opt_cstr(notes_ref)); - let mut ret = 0 as *mut raw::git_note; - unsafe { - try_call!(raw::git_note_read(&mut ret, self.raw, notes_ref, - id.raw())); - Ok(Binding::from_raw(ret)) - } - } - - /// Remove the note for an object. - /// - /// The `notes_ref` argument is the canonical name of the reference to use, - /// defaulting to "refs/notes/commits". - /// - /// The id specified is the Oid of the git object to remove the note from. - pub fn note_delete(&self, - id: Oid, - notes_ref: Option<&str>, - author: &Signature, - committer: &Signature) -> Result<(), Error> { - let notes_ref = try!(::opt_cstr(notes_ref)); - unsafe { - try_call!(raw::git_note_remove(self.raw, notes_ref, author.raw(), - committer.raw(), id.raw())); - Ok(()) - } - } - - /// Create a revwalk that can be used to traverse the commit graph. - pub fn revwalk(&self) -> Result { - let mut raw = 0 as *mut raw::git_revwalk; - unsafe { - try_call!(raw::git_revwalk_new(&mut raw, self.raw())); - Ok(Binding::from_raw(raw)) - } - } - - /// Get the blame for a single file. - pub fn blame_file(&self, path: &Path, opts: Option<&mut BlameOptions>) - -> Result { - let path = try!(path.into_c_string()); - let mut raw = 0 as *mut raw::git_blame; - - unsafe { - try_call!(raw::git_blame_file(&mut raw, - self.raw(), - path, - opts.map(|s| s.raw()))); - Ok(Binding::from_raw(raw)) - } - } - - /// Find a merge base between two commits - pub fn merge_base(&self, one: Oid, two: Oid) -> Result { - let mut raw = raw::git_oid { id: [0; raw::GIT_OID_RAWSZ] }; - unsafe { - try_call!(raw::git_merge_base(&mut raw, self.raw, - one.raw(), two.raw())); - Ok(Binding::from_raw(&raw as *const _)) - } - } - - /// Find all merge bases between two commits - pub fn merge_bases(&self, one: Oid, two: Oid) -> Result { - let mut arr = raw::git_oidarray { - ids: 0 as *mut raw::git_oid, - count: 0, - }; - unsafe { - try_call!(raw::git_merge_bases(&mut arr, self.raw, - one.raw(), two.raw())); - Ok(Binding::from_raw(arr)) - } - } - - - /// Count the number of unique commits between two commit objects - /// - /// There is no need for branches containing the commits to have any - /// upstream relationship, but it helps to think of one as a branch and the - /// other as its upstream, the ahead and behind values will be what git - /// would report for the branches. - pub fn graph_ahead_behind(&self, local: Oid, upstream: Oid) - -> Result<(usize, usize), Error> { - unsafe { - let mut ahead: size_t = 0; - let mut behind: size_t = 0; - try_call!(raw::git_graph_ahead_behind(&mut ahead, &mut behind, - self.raw(), local.raw(), - upstream.raw())); - Ok((ahead as usize, behind as usize)) - } - } - - /// Determine if a commit is the descendant of another commit - pub fn graph_descendant_of(&self, commit: Oid, ancestor: Oid) - -> Result { - unsafe { - let rv = try_call!(raw::git_graph_descendant_of(self.raw(), - commit.raw(), - ancestor.raw())); - Ok(rv != 0) - } - } - - /// Read the reflog for the given reference - /// - /// If there is no reflog file for the given reference yet, an empty reflog - /// object will be returned. - pub fn reflog(&self, name: &str) -> Result { - let name = try!(CString::new(name)); - let mut ret = 0 as *mut raw::git_reflog; - unsafe { - try_call!(raw::git_reflog_read(&mut ret, self.raw, name)); - Ok(Binding::from_raw(ret)) - } - } - - /// Delete the reflog for the given reference - pub fn reflog_delete(&self, name: &str) -> Result<(), Error> { - let name = try!(CString::new(name)); - unsafe { try_call!(raw::git_reflog_delete(self.raw, name)); } - Ok(()) - } - - /// Rename a reflog - /// - /// The reflog to be renamed is expected to already exist. - pub fn reflog_rename(&self, old_name: &str, new_name: &str) - -> Result<(), Error> { - let old_name = try!(CString::new(old_name)); - let new_name = try!(CString::new(new_name)); - unsafe { - try_call!(raw::git_reflog_rename(self.raw, old_name, new_name)); - } - Ok(()) - } - - /// Describes a commit - /// - /// Performs a describe operation on the current commit and the worktree. - /// After performing a describe on HEAD, a status is run and description is - /// considered to be dirty if there are. - pub fn describe(&self, opts: &DescribeOptions) -> Result { - let mut ret = 0 as *mut _; - unsafe { - try_call!(raw::git_describe_workdir(&mut ret, self.raw, opts.raw())); - Ok(Binding::from_raw(ret)) - } - } - - /// Create a diff with the difference between two tree objects. - /// - /// This is equivalent to `git diff ` - /// - /// The first tree will be used for the "old_file" side of the delta and the - /// second tree will be used for the "new_file" side of the delta. You can - /// pass `None` to indicate an empty tree, although it is an error to pass - /// `None` for both the `old_tree` and `new_tree`. - pub fn diff_tree_to_tree(&self, - old_tree: Option<&Tree>, - new_tree: Option<&Tree>, - opts: Option<&mut DiffOptions>) - -> Result { - let mut ret = 0 as *mut raw::git_diff; - unsafe { - try_call!(raw::git_diff_tree_to_tree(&mut ret, - self.raw(), - old_tree.map(|s| s.raw()), - new_tree.map(|s| s.raw()), - opts.map(|s| s.raw()))); - Ok(Binding::from_raw(ret)) - } - } - - /// Create a diff between a tree and repository index. - /// - /// This is equivalent to `git diff --cached ` or if you pass - /// the HEAD tree, then like `git diff --cached`. - /// - /// The tree you pass will be used for the "old_file" side of the delta, and - /// the index will be used for the "new_file" side of the delta. - /// - /// If you pass `None` for the index, then the existing index of the `repo` - /// will be used. In this case, the index will be refreshed from disk - /// (if it has changed) before the diff is generated. - /// - /// If the tree is `None`, then it is considered an empty tree. - pub fn diff_tree_to_index(&self, - old_tree: Option<&Tree>, - index: Option<&Index>, - opts: Option<&mut DiffOptions>) - -> Result { - let mut ret = 0 as *mut raw::git_diff; - unsafe { - try_call!(raw::git_diff_tree_to_index(&mut ret, - self.raw(), - old_tree.map(|s| s.raw()), - index.map(|s| s.raw()), - opts.map(|s| s.raw()))); - Ok(Binding::from_raw(ret)) - } - } - - /// Create a diff between the repository index and the workdir directory. - /// - /// This matches the `git diff` command. See the note below on - /// `tree_to_workdir` for a discussion of the difference between - /// `git diff` and `git diff HEAD` and how to emulate a `git diff ` - /// using libgit2. - /// - /// The index will be used for the "old_file" side of the delta, and the - /// working directory will be used for the "new_file" side of the delta. - /// - /// If you pass `None` for the index, then the existing index of the `repo` - /// will be used. In this case, the index will be refreshed from disk - /// (if it has changed) before the diff is generated. - pub fn diff_index_to_workdir(&self, - index: Option<&Index>, - opts: Option<&mut DiffOptions>) - -> Result { - let mut ret = 0 as *mut raw::git_diff; - unsafe { - try_call!(raw::git_diff_index_to_workdir(&mut ret, - self.raw(), - index.map(|s| s.raw()), - opts.map(|s| s.raw()))); - Ok(Binding::from_raw(ret)) - } - } - - /// Create a diff between a tree and the working directory. - /// - /// The tree you provide will be used for the "old_file" side of the delta, - /// and the working directory will be used for the "new_file" side. - /// - /// This is not the same as `git diff ` or `git diff-index - /// `. Those commands use information from the index, whereas this - /// function strictly returns the differences between the tree and the files - /// in the working directory, regardless of the state of the index. Use - /// `tree_to_workdir_with_index` to emulate those commands. - /// - /// To see difference between this and `tree_to_workdir_with_index`, - /// consider the example of a staged file deletion where the file has then - /// been put back into the working dir and further modified. The - /// tree-to-workdir diff for that file is 'modified', but `git diff` would - /// show status 'deleted' since there is a staged delete. - /// - /// If `None` is passed for `tree`, then an empty tree is used. - pub fn diff_tree_to_workdir(&self, - old_tree: Option<&Tree>, - opts: Option<&mut DiffOptions>) - -> Result { - let mut ret = 0 as *mut raw::git_diff; - unsafe { - try_call!(raw::git_diff_tree_to_workdir(&mut ret, - self.raw(), - old_tree.map(|s| s.raw()), - opts.map(|s| s.raw()))); - Ok(Binding::from_raw(ret)) - } - } - - /// Create a diff between a tree and the working directory using index data - /// to account for staged deletes, tracked files, etc. - /// - /// This emulates `git diff ` by diffing the tree to the index and - /// the index to the working directory and blending the results into a - /// single diff that includes staged deleted, etc. - pub fn diff_tree_to_workdir_with_index(&self, - old_tree: Option<&Tree>, - opts: Option<&mut DiffOptions>) - -> Result { - let mut ret = 0 as *mut raw::git_diff; - unsafe { - try_call!(raw::git_diff_tree_to_workdir_with_index(&mut ret, - self.raw(), old_tree.map(|s| s.raw()), opts.map(|s| s.raw()))); - Ok(Binding::from_raw(ret)) - } - } -} - -impl Binding for Repository { - type Raw = *mut raw::git_repository; - unsafe fn from_raw(ptr: *mut raw::git_repository) -> Repository { - Repository { raw: ptr } - } - fn raw(&self) -> *mut raw::git_repository { self.raw } -} - -impl Drop for Repository { - fn drop(&mut self) { - unsafe { raw::git_repository_free(self.raw) } - } -} - -impl RepositoryInitOptions { - /// Creates a default set of initialization options. - /// - /// By default this will set flags for creating all necessary directories - /// and initializing a directory from the user-configured templates path. - pub fn new() -> RepositoryInitOptions { - RepositoryInitOptions { - flags: raw::GIT_REPOSITORY_INIT_MKDIR as u32 | - raw::GIT_REPOSITORY_INIT_MKPATH as u32 | - raw::GIT_REPOSITORY_INIT_EXTERNAL_TEMPLATE as u32, - mode: 0, - workdir_path: None, - description: None, - template_path: None, - initial_head: None, - origin_url: None, - } - } - - /// Create a bare repository with no working directory. - /// - /// Defaults to false. - pub fn bare(&mut self, bare: bool) -> &mut RepositoryInitOptions { - self.flag(raw::GIT_REPOSITORY_INIT_BARE, bare) - } - - /// Return an error if the repository path appears to already be a git - /// repository. - /// - /// Defaults to false. - pub fn no_reinit(&mut self, enabled: bool) -> &mut RepositoryInitOptions { - self.flag(raw::GIT_REPOSITORY_INIT_NO_REINIT, enabled) - } - - /// Normally a '/.git/' will be appended to the repo apth for non-bare repos - /// (if it is not already there), but passing this flag prevents that - /// behavior. - /// - /// Defaults to false. - pub fn no_dotgit_dir(&mut self, enabled: bool) -> &mut RepositoryInitOptions { - self.flag(raw::GIT_REPOSITORY_INIT_NO_DOTGIT_DIR, enabled) - } - - /// Make the repo path (and workdir path) as needed. The ".git" directory - /// will always be created regardless of this flag. - /// - /// Defaults to true. - pub fn mkdir(&mut self, enabled: bool) -> &mut RepositoryInitOptions { - self.flag(raw::GIT_REPOSITORY_INIT_MKDIR, enabled) - } - - /// Recursively make all components of the repo and workdir path sas - /// necessary. - /// - /// Defaults to true. - pub fn mkpath(&mut self, enabled: bool) -> &mut RepositoryInitOptions { - self.flag(raw::GIT_REPOSITORY_INIT_MKPATH, enabled) - } - - /// Set to one of the `RepositoryInit` constants, or a custom value. - pub fn mode(&mut self, mode: RepositoryInitMode) - -> &mut RepositoryInitOptions { - self.mode = mode.bits(); - self - } - - /// Enable or disable using external templates. - /// - /// If enabled, then the `template_path` option will be queried first, then - /// `init.templatedir` from the global config, and finally - /// `/usr/share/git-core-templates` will be used (if it exists). - /// - /// Defaults to true. - pub fn external_template(&mut self, enabled: bool) - -> &mut RepositoryInitOptions { - self.flag(raw::GIT_REPOSITORY_INIT_EXTERNAL_TEMPLATE, enabled) - } - - fn flag(&mut self, flag: raw::git_repository_init_flag_t, on: bool) - -> &mut RepositoryInitOptions { - if on { - self.flags |= flag as u32; - } else { - self.flags &= !(flag as u32); - } - self - } - - /// The path do the working directory. - /// - /// If this is a relative path it will be evaulated relative to the repo - /// path. If this is not the "natural" working directory, a .git gitlink - /// file will be created here linking to the repo path. - pub fn workdir_path(&mut self, path: &Path) -> &mut RepositoryInitOptions { - self.workdir_path = Some(path.into_c_string().unwrap()); - self - } - - /// If set, this will be used to initialize the "description" file in the - /// repository instead of using the template content. - pub fn description(&mut self, desc: &str) -> &mut RepositoryInitOptions { - self.description = Some(CString::new(desc).unwrap()); - self - } - - /// When the `external_template` option is set, this is the first location - /// to check for the template directory. - /// - /// If this is not configured, then the default locations will be searched - /// instead. - pub fn template_path(&mut self, path: &Path) -> &mut RepositoryInitOptions { - self.template_path = Some(path.into_c_string().unwrap()); - self - } - - /// The name of the head to point HEAD at. - /// - /// If not configured, this will be treated as `master` and the HEAD ref - /// will be set to `refs/heads/master`. If this begins with `refs/` it will - /// be used verbatim; otherwise `refs/heads/` will be prefixed - pub fn initial_head(&mut self, head: &str) -> &mut RepositoryInitOptions { - self.initial_head = Some(CString::new(head).unwrap()); - self - } - - /// If set, then after the rest of the repository initialization is - /// completed an `origin` remote will be added pointing to this URL. - pub fn origin_url(&mut self, url: &str) -> &mut RepositoryInitOptions { - self.origin_url = Some(CString::new(url).unwrap()); - self - } - - /// Creates a set of raw init options to be used with - /// `git_repository_init_ext`. - /// - /// This method is unsafe as the returned value may have pointers to the - /// interior of this structure. - pub unsafe fn raw(&self) -> raw::git_repository_init_options { - let mut opts = mem::zeroed(); - assert_eq!(raw::git_repository_init_init_options(&mut opts, - raw::GIT_REPOSITORY_INIT_OPTIONS_VERSION), 0); - opts.flags = self.flags; - opts.mode = self.mode; - opts.workdir_path = ::call::convert(&self.workdir_path); - opts.description = ::call::convert(&self.description); - opts.template_path = ::call::convert(&self.template_path); - opts.initial_head = ::call::convert(&self.initial_head); - opts.origin_url = ::call::convert(&self.origin_url); - return opts; - } -} - -#[cfg(test)] -mod tests { - use std::fs; - use std::path::Path; - use tempdir::TempDir; - use {Repository, Oid, ObjectType, ResetType}; - use build::CheckoutBuilder; - - #[test] - fn smoke_init() { - let td = TempDir::new("test").unwrap(); - let path = td.path(); - - let repo = Repository::init(path).unwrap(); - assert!(!repo.is_bare()); - } - - #[test] - fn smoke_init_bare() { - let td = TempDir::new("test").unwrap(); - let path = td.path(); - - let repo = Repository::init_bare(path).unwrap(); - assert!(repo.is_bare()); - assert!(repo.namespace().is_none()); - } - - #[test] - fn smoke_open() { - let td = TempDir::new("test").unwrap(); - let path = td.path(); - Repository::init(td.path()).unwrap(); - let repo = Repository::open(path).unwrap(); - assert!(!repo.is_bare()); - assert!(!repo.is_shallow()); - assert!(repo.is_empty().unwrap()); - assert_eq!(::test::realpath(&repo.path()).unwrap(), - ::test::realpath(&td.path().join(".git/")).unwrap()); - assert_eq!(repo.state(), ::RepositoryState::Clean); - } - - #[test] - fn smoke_open_bare() { - let td = TempDir::new("test").unwrap(); - let path = td.path(); - Repository::init_bare(td.path()).unwrap(); - - let repo = Repository::open(path).unwrap(); - assert!(repo.is_bare()); - assert_eq!(::test::realpath(&repo.path()).unwrap(), - ::test::realpath(&td.path().join("")).unwrap()); - } - - #[test] - fn smoke_checkout() { - let (_td, repo) = ::test::repo_init(); - repo.checkout_head(None).unwrap(); - } - - #[test] - fn smoke_revparse() { - let (_td, repo) = ::test::repo_init(); - let rev = repo.revparse("HEAD").unwrap(); - assert!(rev.to().is_none()); - let from = rev.from().unwrap(); - assert!(rev.from().is_some()); - - assert_eq!(repo.revparse_single("HEAD").unwrap().id(), from.id()); - let obj = repo.find_object(from.id(), None).unwrap().clone(); - obj.peel(ObjectType::Any).unwrap(); - obj.short_id().unwrap(); - repo.reset(&obj, ResetType::Hard, None).unwrap(); - let mut opts = CheckoutBuilder::new(); - t!(repo.reset(&obj, ResetType::Soft, Some(&mut opts))); - } - - #[test] - fn makes_dirs() { - let td = TempDir::new("foo").unwrap(); - Repository::init(&td.path().join("a/b/c/d")).unwrap(); - } - - #[test] - fn smoke_discover() { - let td = TempDir::new("test").unwrap(); - let subdir = td.path().join("subdi"); - fs::create_dir(&subdir).unwrap(); - Repository::init_bare(td.path()).unwrap(); - let repo = Repository::discover(&subdir).unwrap(); - assert_eq!(::test::realpath(&repo.path()).unwrap(), - ::test::realpath(&td.path().join("")).unwrap()); - } - - fn graph_repo_init() -> (TempDir, Repository) { - let (_td, repo) = ::test::repo_init(); - { - let head = repo.head().unwrap().target().unwrap(); - let head = repo.find_commit(head).unwrap(); - - let mut index = repo.index().unwrap(); - let id = index.write_tree().unwrap(); - - let tree = repo.find_tree(id).unwrap(); - let sig = repo.signature().unwrap(); - repo.commit(Some("HEAD"), &sig, &sig, "second", - &tree, &[&head]).unwrap(); - } - (_td, repo) - } - - #[test] - fn smoke_graph_ahead_behind() { - let (_td, repo) = graph_repo_init(); - let head = repo.head().unwrap().target().unwrap(); - let head = repo.find_commit(head).unwrap(); - let head_id = head.id(); - let head_parent_id = head.parent(0).unwrap().id(); - let (ahead, behind) = repo.graph_ahead_behind(head_id, - head_parent_id).unwrap(); - assert_eq!(ahead, 1); - assert_eq!(behind, 0); - let (ahead, behind) = repo.graph_ahead_behind(head_parent_id, - head_id).unwrap(); - assert_eq!(ahead, 0); - assert_eq!(behind, 1); - } - - #[test] - fn smoke_graph_descendant_of() { - let (_td, repo) = graph_repo_init(); - let head = repo.head().unwrap().target().unwrap(); - let head = repo.find_commit(head).unwrap(); - let head_id = head.id(); - let head_parent_id = head.parent(0).unwrap().id(); - assert!(repo.graph_descendant_of(head_id, head_parent_id).unwrap()); - assert!(!repo.graph_descendant_of(head_parent_id, head_id).unwrap()); - } - - #[test] - fn smoke_set_head() { - let (_td, repo) = ::test::repo_init(); - - assert!(repo.set_head("refs/heads/does-not-exist").is_ok()); - assert!(repo.head().is_err()); - - assert!(repo.set_head("refs/heads/master").is_ok()); - assert!(repo.head().is_ok()); - - assert!(repo.set_head("*").is_err()); - } - - #[test] - fn smoke_set_head_detached() { - let (_td, repo) = ::test::repo_init(); - - let void_oid = Oid::from_bytes(b"00000000000000000000").unwrap(); - assert!(repo.set_head_detached(void_oid).is_err()); - - let master_oid = repo.revparse_single("master").unwrap().id(); - assert!(repo.set_head_detached(master_oid).is_ok()); - assert_eq!(repo.head().unwrap().target().unwrap(), master_oid); - } - - /// create an octopus: - /// /---o2-o4 - /// o1 X - /// \---o3-o5 - /// and checks that the merge bases of (o4,o5) are (o2,o3) - #[test] - fn smoke_merge_bases() { - let (_td, repo) = graph_repo_init(); - let sig = repo.signature().unwrap(); - - // let oid1 = head - let oid1 = repo.head().unwrap().target().unwrap(); - let commit1 = repo.find_commit(oid1).unwrap(); - println!("created oid1 {:?}", oid1); - - repo.branch("branch_a", &commit1, true).unwrap(); - repo.branch("branch_b", &commit1, true).unwrap(); - - // create commit oid2 on branchA - let mut index = repo.index().unwrap(); - let p = Path::new(repo.workdir().unwrap()).join("file_a"); - println!("using path {:?}", p); - fs::File::create(&p).unwrap(); - index.add_path(Path::new("file_a")).unwrap(); - let id_a = index.write_tree().unwrap(); - let tree_a = repo.find_tree(id_a).unwrap(); - let oid2 = repo.commit(Some("refs/heads/branch_a"), &sig, &sig, - "commit 2", &tree_a, &[&commit1]).unwrap(); - let commit2 = repo.find_commit(oid2).unwrap(); - println!("created oid2 {:?}", oid2); - - // create commit oid3 on branchB - let mut index = repo.index().unwrap(); - let p = Path::new(repo.workdir().unwrap()).join("file_b"); - fs::File::create(&p).unwrap(); - index.add_path(Path::new("file_b")).unwrap(); - let id_b = index.write_tree().unwrap(); - let tree_b = repo.find_tree(id_b).unwrap(); - let oid3 = repo.commit(Some("refs/heads/branch_b"), &sig, &sig, - "commit 3", &tree_b, &[&commit1]).unwrap(); - let commit3 = repo.find_commit(oid3).unwrap(); - println!("created oid3 {:?}", oid3); - - // create merge commit oid4 on branchA with parents oid2 and oid3 - //let mut index4 = repo.merge_commits(&commit2, &commit3, None).unwrap(); - repo.set_head("refs/heads/branch_a").unwrap(); - repo.checkout_head(None).unwrap(); - let oid4 = repo.commit(Some("refs/heads/branch_a"), &sig, &sig, - "commit 4", &tree_a, - &[&commit2, &commit3]).unwrap(); - //index4.write_tree_to(&repo).unwrap(); - println!("created oid4 {:?}", oid4); - - // create merge commit oid5 on branchB with parents oid2 and oid3 - //let mut index5 = repo.merge_commits(&commit3, &commit2, None).unwrap(); - repo.set_head("refs/heads/branch_b").unwrap(); - repo.checkout_head(None).unwrap(); - let oid5 = repo.commit(Some("refs/heads/branch_b"), &sig, &sig, - "commit 5", &tree_a, - &[&commit3, &commit2]).unwrap(); - //index5.write_tree_to(&repo).unwrap(); - println!("created oid5 {:?}", oid5); - - // merge bases of (oid4,oid5) should be (oid2,oid3) - let merge_bases = repo.merge_bases(oid4, oid5).unwrap(); - let mut found_oid2 = false; - let mut found_oid3 = false; - for mg in merge_bases.iter() { - println!("found merge base {:?}", mg); - if mg == &oid2 { - found_oid2 = true; - } else if mg == &oid3 { - found_oid3 = true; - } else { - assert!(false); - } - } - assert!(found_oid2); - assert!(found_oid3); - assert_eq!(merge_bases.len(), 2); - } - - #[test] - fn smoke_revparse_ext() { - let (_td, repo) = graph_repo_init(); - - { - let short_refname = "master"; - let expected_refname = "refs/heads/master"; - let (obj, reference) = repo.revparse_ext(short_refname).unwrap(); - let expected_obj = repo.revparse_single(expected_refname).unwrap(); - assert_eq!(obj.id(), expected_obj.id()); - assert_eq!(reference.unwrap().name().unwrap(), expected_refname); - } - { - let missing_refname = "refs/heads/does-not-exist"; - assert!(repo.revparse_ext(missing_refname).is_err()); - } - { - let (_obj, reference) = repo.revparse_ext("HEAD^").unwrap(); - assert!(reference.is_none()); - } - } -} diff --git a/deps/git2-0.4.2/src/tag.rs b/deps/git2-0.4.2/src/tag.rs deleted file mode 100644 index 9342354d1..000000000 --- a/deps/git2-0.4.2/src/tag.rs +++ /dev/null @@ -1,162 +0,0 @@ -use std::marker; -use std::str; - -use {raw, signature, Error, Oid, Object, Signature, ObjectType}; -use util::Binding; - -/// A structure to represent a git [tag][1] -/// -/// [1]: http://git-scm.com/book/en/Git-Basics-Tagging -pub struct Tag<'repo> { - raw: *mut raw::git_tag, - _marker: marker::PhantomData>, -} - -impl<'repo> Tag<'repo> { - /// Get the id (SHA1) of a repository tag - pub fn id(&self) -> Oid { - unsafe { Binding::from_raw(raw::git_tag_id(&*self.raw)) } - } - - /// Get the message of a tag - /// - /// Returns None if there is no message or if it is not valid utf8 - pub fn message(&self) -> Option<&str> { - self.message_bytes().and_then(|s| str::from_utf8(s).ok()) - } - - /// Get the message of a tag - /// - /// Returns None if there is no message - pub fn message_bytes(&self) -> Option<&[u8]> { - unsafe { ::opt_bytes(self, raw::git_tag_message(&*self.raw)) } - } - - /// Get the name of a tag - /// - /// Returns None if it is not valid utf8 - pub fn name(&self) -> Option<&str> { - str::from_utf8(self.name_bytes()).ok() - } - - /// Get the name of a tag - pub fn name_bytes(&self) -> &[u8] { - unsafe { ::opt_bytes(self, raw::git_tag_name(&*self.raw)).unwrap() } - } - - /// Recursively peel a tag until a non tag git_object is found - pub fn peel(&self) -> Result, Error> { - let mut ret = 0 as *mut raw::git_object; - unsafe { - try_call!(raw::git_tag_peel(&mut ret, &*self.raw)); - Ok(Binding::from_raw(ret)) - } - } - - /// Get the tagger (author) of a tag - /// - /// If the author is unspecified, then `None` is returned. - pub fn tagger(&self) -> Option { - unsafe { - let ptr = raw::git_tag_tagger(&*self.raw); - if ptr.is_null() { - None - } else { - Some(signature::from_raw_const(self, ptr)) - } - } - } - - /// Get the tagged object of a tag - /// - /// This method performs a repository lookup for the given object and - /// returns it - pub fn target(&self) -> Result, Error> { - let mut ret = 0 as *mut raw::git_object; - unsafe { - try_call!(raw::git_tag_target(&mut ret, &*self.raw)); - Ok(Binding::from_raw(ret)) - } - } - - /// Get the OID of the tagged object of a tag - pub fn target_id(&self) -> Oid { - unsafe { Binding::from_raw(raw::git_tag_target_id(&*self.raw)) } - } - - /// Get the OID of the tagged object of a tag - pub fn target_type(&self) -> Option { - unsafe { ObjectType::from_raw(raw::git_tag_target_type(&*self.raw)) } - } - - /// Casts this Tag to be usable as an `Object` - pub fn as_object(&self) -> &Object<'repo> { - unsafe { - &*(self as *const _ as *const Object<'repo>) - } - } -} - -impl<'repo> Binding for Tag<'repo> { - type Raw = *mut raw::git_tag; - unsafe fn from_raw(raw: *mut raw::git_tag) -> Tag<'repo> { - Tag { raw: raw, _marker: marker::PhantomData } - } - fn raw(&self) -> *mut raw::git_tag { self.raw } -} - -impl<'repo> Drop for Tag<'repo> { - fn drop(&mut self) { - unsafe { raw::git_tag_free(self.raw) } - } -} - -#[cfg(test)] -mod tests { - #[test] - fn smoke() { - let (_td, repo) = ::test::repo_init(); - let head = repo.head().unwrap(); - let id = head.target().unwrap(); - assert!(repo.find_tag(id).is_err()); - - let obj = repo.find_object(id, None).unwrap(); - let sig = repo.signature().unwrap(); - let tag_id = repo.tag("foo", &obj, &sig, "msg", false).unwrap(); - let tag = repo.find_tag(tag_id).unwrap(); - assert_eq!(tag.id(), tag_id); - - let tags = repo.tag_names(None).unwrap(); - assert_eq!(tags.len(), 1); - assert_eq!(tags.get(0), Some("foo")); - - assert_eq!(tag.name(), Some("foo")); - assert_eq!(tag.message(), Some("msg")); - assert_eq!(tag.peel().unwrap().id(), obj.id()); - assert_eq!(tag.target_id(), obj.id()); - assert_eq!(tag.target_type(), Some(::ObjectType::Commit)); - - assert_eq!(tag.tagger().unwrap().name(), sig.name()); - tag.target().unwrap(); - - repo.find_object(tag_id, None).unwrap().as_tag().unwrap(); - - repo.tag_delete("foo").unwrap(); - } - - #[test] - fn lite() { - let (_td, repo) = ::test::repo_init(); - let head = t!(repo.head()); - let id = head.target().unwrap(); - let obj = t!(repo.find_object(id, None)); - let tag_id = t!(repo.tag_lightweight("foo", &obj, false)); - assert!(repo.find_tag(tag_id).is_err()); - assert_eq!(t!(repo.refname_to_id("refs/tags/foo")), id); - - let tags = t!(repo.tag_names(Some("f*"))); - assert_eq!(tags.len(), 1); - let tags = t!(repo.tag_names(Some("b*"))); - assert_eq!(tags.len(), 0); - } -} diff --git a/deps/git2-0.4.2/src/tree.rs b/deps/git2-0.4.2/src/tree.rs deleted file mode 100644 index 23c6d509f..000000000 --- a/deps/git2-0.4.2/src/tree.rs +++ /dev/null @@ -1,368 +0,0 @@ -use std::mem; -use std::cmp::Ordering; -use std::ffi::CString; -use std::ops::Range; -use std::marker; -use std::path::Path; -use std::str; -use libc; - -use {raw, Oid, Repository, Error, Object, ObjectType}; -use util::{Binding, IntoCString}; - -/// A structure to represent a git [tree][1] -/// -/// [1]: http://git-scm.com/book/en/Git-Internals-Git-Objects -pub struct Tree<'repo> { - raw: *mut raw::git_tree, - _marker: marker::PhantomData>, -} - -/// A structure representing an entry inside of a tree. An entry is borrowed -/// from a tree. -pub struct TreeEntry<'tree> { - raw: *mut raw::git_tree_entry, - owned: bool, - _marker: marker::PhantomData<&'tree raw::git_tree_entry>, -} - -/// An iterator over the entries in a tree. -pub struct TreeIter<'tree> { - range: Range, - tree: &'tree Tree<'tree>, -} - -impl<'repo> Tree<'repo> { - /// Get the id (SHA1) of a repository object - pub fn id(&self) -> Oid { - unsafe { Binding::from_raw(raw::git_tree_id(&*self.raw)) } - } - - /// Get the number of entries listed in this tree. - pub fn len(&self) -> usize { - unsafe { raw::git_tree_entrycount(&*self.raw) as usize } - } - - /// Returns an iterator over the entries in this tree. - pub fn iter(&self) -> TreeIter { - TreeIter { range: 0..self.len(), tree: self } - } - - /// Lookup a tree entry by SHA value. - pub fn get_id(&self, id: Oid) -> Option { - unsafe { - let ptr = raw::git_tree_entry_byid(&*self.raw(), &*id.raw()); - if ptr.is_null() { - None - } else { - Some(entry_from_raw_const(ptr)) - } - } - } - - /// Lookup a tree entry by its position in the tree - pub fn get(&self, n: usize) -> Option { - unsafe { - let ptr = raw::git_tree_entry_byindex(&*self.raw(), - n as libc::size_t); - if ptr.is_null() { - None - } else { - Some(entry_from_raw_const(ptr)) - } - } - } - - /// Lookup a tree entry by its filename - pub fn get_name(&self, filename: &str) -> Option { - let filename = CString::new(filename).unwrap(); - unsafe { - let ptr = call!(raw::git_tree_entry_byname(&*self.raw(), filename)); - if ptr.is_null() { - None - } else { - Some(entry_from_raw_const(ptr)) - } - } - } - - /// Retrieve a tree entry contained in a tree or in any of its subtrees, - /// given its relative path. - pub fn get_path(&self, path: &Path) -> Result, Error> { - let path = try!(path.into_c_string()); - let mut ret = 0 as *mut raw::git_tree_entry; - unsafe { - try_call!(raw::git_tree_entry_bypath(&mut ret, &*self.raw(), path)); - Ok(Binding::from_raw(ret)) - } - } - - /// Casts this Tree to be usable as an `Object` - pub fn as_object(&self) -> &Object<'repo> { - unsafe { - &*(self as *const _ as *const Object<'repo>) - } - } -} - -impl<'repo> Binding for Tree<'repo> { - type Raw = *mut raw::git_tree; - - unsafe fn from_raw(raw: *mut raw::git_tree) -> Tree<'repo> { - Tree { raw: raw, _marker: marker::PhantomData } - } - fn raw(&self) -> *mut raw::git_tree { self.raw } -} - -impl<'repo> Drop for Tree<'repo> { - fn drop(&mut self) { - unsafe { raw::git_tree_free(self.raw) } - } -} - -/// Create a new tree entry from the raw pointer provided. -/// -/// The lifetime of the entry is tied to the tree provided and the function -/// is unsafe because the validity of the pointer cannot be guaranteed. -pub unsafe fn entry_from_raw_const<'tree>(raw: *const raw::git_tree_entry) - -> TreeEntry<'tree> { - TreeEntry { - raw: raw as *mut raw::git_tree_entry, - owned: false, - _marker: marker::PhantomData, - } -} - -impl<'tree> TreeEntry<'tree> { - /// Get the id of the object pointed by the entry - pub fn id(&self) -> Oid { - unsafe { Binding::from_raw(raw::git_tree_entry_id(&*self.raw)) } - } - - /// Get the filename of a tree entry - /// - /// Returns `None` if the name is not valid utf-8 - pub fn name(&self) -> Option<&str> { - str::from_utf8(self.name_bytes()).ok() - } - - /// Get the filename of a tree entry - pub fn name_bytes(&self) -> &[u8] { - unsafe { - ::opt_bytes(self, raw::git_tree_entry_name(&*self.raw())).unwrap() - } - } - - /// Convert a tree entry to the object it points to. - pub fn to_object<'a>(&self, repo: &'a Repository) - -> Result, Error> { - let mut ret = 0 as *mut raw::git_object; - unsafe { - try_call!(raw::git_tree_entry_to_object(&mut ret, repo.raw(), - &*self.raw())); - Ok(Binding::from_raw(ret)) - } - } - - /// Get the type of the object pointed by the entry - pub fn kind(&self) -> Option { - ObjectType::from_raw(unsafe { raw::git_tree_entry_type(&*self.raw) }) - } - - /// Get the UNIX file attributes of a tree entry - pub fn filemode(&self) -> i32 { - unsafe { raw::git_tree_entry_filemode(&*self.raw) as i32 } - } - - /// Get the raw UNIX file attributes of a tree entry - pub fn filemode_raw(&self) -> i32 { - unsafe { raw::git_tree_entry_filemode_raw(&*self.raw) as i32 } - } - - /// Convert this entry of any lifetime into an owned signature with a static - /// lifetime. - /// - /// This will use the `Clone::clone` implementation under the hood. - pub fn to_owned(&self) -> TreeEntry<'static> { - unsafe { - let me = mem::transmute::<&TreeEntry<'tree>, &TreeEntry<'static>>(self); - me.clone() - } - } -} - -impl<'a> Binding for TreeEntry<'a> { - type Raw = *mut raw::git_tree_entry; - unsafe fn from_raw(raw: *mut raw::git_tree_entry) -> TreeEntry<'a> { - TreeEntry { - raw: raw, - owned: true, - _marker: marker::PhantomData, - } - } - fn raw(&self) -> *mut raw::git_tree_entry { self.raw } -} - -impl<'a> Clone for TreeEntry<'a> { - fn clone(&self) -> TreeEntry<'a> { - let mut ret = 0 as *mut raw::git_tree_entry; - unsafe { - assert_eq!(raw::git_tree_entry_dup(&mut ret, &*self.raw()), 0); - Binding::from_raw(ret) - } - } -} - -impl<'a> PartialOrd for TreeEntry<'a> { - fn partial_cmp(&self, other: &TreeEntry<'a>) -> Option { - Some(self.cmp(other)) - } -} -impl<'a> Ord for TreeEntry<'a> { - fn cmp(&self, other: &TreeEntry<'a>) -> Ordering { - match unsafe { raw::git_tree_entry_cmp(&*self.raw(), &*other.raw()) } { - 0 => Ordering::Equal, - n if n < 0 => Ordering::Less, - _ => Ordering::Greater, - } - } -} - -impl<'a> PartialEq for TreeEntry<'a> { - fn eq(&self, other: &TreeEntry<'a>) -> bool { - self.cmp(other) == Ordering::Equal - } -} -impl<'a> Eq for TreeEntry<'a> {} - -impl<'a> Drop for TreeEntry<'a> { - fn drop(&mut self) { - if self.owned { - unsafe { raw::git_tree_entry_free(self.raw) } - } - } -} - -impl<'tree> Iterator for TreeIter<'tree> { - type Item = TreeEntry<'tree>; - fn next(&mut self) -> Option> { - self.range.next().and_then(|i| self.tree.get(i)) - } - fn size_hint(&self) -> (usize, Option) { self.range.size_hint() } -} -impl<'tree> DoubleEndedIterator for TreeIter<'tree> { - fn next_back(&mut self) -> Option> { - self.range.next_back().and_then(|i| self.tree.get(i)) - } -} -impl<'tree> ExactSizeIterator for TreeIter<'tree> {} - -#[cfg(test)] -mod tests { - use {Repository,Tree,TreeEntry,ObjectType,Object}; - use tempdir::TempDir; - use std::fs::File; - use std::io::prelude::*; - use std::path::Path; - - pub struct TestTreeIter<'a> { - entries: Vec>, - repo: &'a Repository, - } - - impl<'a> Iterator for TestTreeIter<'a> { - type Item = TreeEntry<'a>; - - fn next(&mut self) -> Option > { - if self.entries.is_empty() { - None - } else { - let entry = self.entries.remove(0); - - match entry.kind() { - Some(ObjectType::Tree) => { - let obj: Object<'a> = entry.to_object(self.repo).unwrap(); - - let tree: &Tree<'a> = obj.as_tree().unwrap(); - - for entry in tree.iter() { - self.entries.push(entry.to_owned()); - } - } - _ => {} - } - - Some(entry) - } - } - } - - fn tree_iter<'repo>(tree: &Tree<'repo>, repo: &'repo Repository) - -> TestTreeIter<'repo> { - let mut initial = vec![]; - - for entry in tree.iter() { - initial.push(entry.to_owned()); - } - - TestTreeIter { - entries: initial, - repo: repo, - } - } - - #[test] - fn smoke_tree_iter() { - let (td, repo) = ::test::repo_init(); - - setup_repo(&td, &repo); - - let head = repo.head().unwrap(); - let target = head.target().unwrap(); - let commit = repo.find_commit(target).unwrap(); - - let tree = repo.find_tree(commit.tree_id()).unwrap(); - assert_eq!(tree.id(), commit.tree_id()); - assert_eq!(tree.len(), 1); - - for entry in tree_iter(&tree, &repo) { - println!("iter entry {:?}", entry.name()); - } - } - - fn setup_repo(td: &TempDir, repo: &Repository) { - let mut index = repo.index().unwrap(); - File::create(&td.path().join("foo")).unwrap().write_all(b"foo").unwrap(); - index.add_path(Path::new("foo")).unwrap(); - let id = index.write_tree().unwrap(); - let sig = repo.signature().unwrap(); - let tree = repo.find_tree(id).unwrap(); - let parent = repo.find_commit(repo.head().unwrap().target() - .unwrap()).unwrap(); - repo.commit(Some("HEAD"), &sig, &sig, "another commit", - &tree, &[&parent]).unwrap(); - } - - #[test] - fn smoke() { - let (td, repo) = ::test::repo_init(); - - setup_repo(&td, &repo); - - let head = repo.head().unwrap(); - let target = head.target().unwrap(); - let commit = repo.find_commit(target).unwrap(); - - let tree = repo.find_tree(commit.tree_id()).unwrap(); - assert_eq!(tree.id(), commit.tree_id()); - assert_eq!(tree.len(), 1); - let e1 = tree.get(0).unwrap(); - assert!(e1 == tree.get_id(e1.id()).unwrap()); - assert!(e1 == tree.get_name("foo").unwrap()); - assert!(e1 == tree.get_path(Path::new("foo")).unwrap()); - assert_eq!(e1.name(), Some("foo")); - e1.to_object(&repo).unwrap(); - - repo.find_object(commit.tree_id(), None).unwrap().as_tree().unwrap(); - } -} diff --git a/deps/git2-0.4.2/.gitignore b/deps/git2-0.4.3/.gitignore similarity index 100% rename from deps/git2-0.4.2/.gitignore rename to deps/git2-0.4.3/.gitignore diff --git a/deps/git2-0.4.2/.gitmodules b/deps/git2-0.4.3/.gitmodules similarity index 100% rename from deps/git2-0.4.2/.gitmodules rename to deps/git2-0.4.3/.gitmodules diff --git a/deps/git2-0.4.2/.travis.yml b/deps/git2-0.4.3/.travis.yml similarity index 100% rename from deps/git2-0.4.2/.travis.yml rename to deps/git2-0.4.3/.travis.yml diff --git a/deps/git2-0.4.3/Cargo.toml b/deps/git2-0.4.3/Cargo.toml new file mode 100644 index 000000000..d175086b4 --- /dev/null +++ b/deps/git2-0.4.3/Cargo.toml @@ -0,0 +1,34 @@ +[package] + +name = "git2" +version = "0.4.3" +authors = ["Alex Crichton "] +license = "MIT/Apache-2.0" +readme = "README.md" +keywords = ["git"] +repository = "https://github.com/alexcrichton/git2-rs" +homepage = "https://github.com/alexcrichton/git2-rs" +documentation = "http://alexcrichton.com/git2-rs" +description = """ +Bindings to libgit2 for interoperating with git repositories. This library is +both threadsafe and memory safe and allows both reading and writing git +repositories. +""" + +[dependencies] +url = "1.0" +bitflags = "0.1" +libc = "0.2" +libgit2-sys = { path = "libgit2-sys", version = "0.4.3" } + +[dev-dependencies] +docopt = "0.6" +rustc-serialize = "0.3" +time = "0.1" +tempdir = "0.3" + +[features] +unstable = [] +default = ["ssh", "https"] +ssh = ["libgit2-sys/ssh"] +https = ["libgit2-sys/https"] diff --git a/deps/glob-0.2.10/LICENSE-APACHE b/deps/git2-0.4.3/LICENSE-APACHE similarity index 100% rename from deps/glob-0.2.10/LICENSE-APACHE rename to deps/git2-0.4.3/LICENSE-APACHE diff --git a/deps/git2-0.4.2/LICENSE-MIT b/deps/git2-0.4.3/LICENSE-MIT similarity index 100% rename from deps/git2-0.4.2/LICENSE-MIT rename to deps/git2-0.4.3/LICENSE-MIT diff --git a/deps/git2-0.4.3/README.md b/deps/git2-0.4.3/README.md new file mode 100644 index 000000000..f52491196 --- /dev/null +++ b/deps/git2-0.4.3/README.md @@ -0,0 +1,31 @@ +# git2-rs + +[![Build Status](https://travis-ci.org/alexcrichton/git2-rs.svg?branch=master)](https://travis-ci.org/alexcrichton/git2-rs) +[![Build Status](https://ci.appveyor.com/api/projects/status/6vem3xgno2kuxnfm?svg=true)](https://ci.appveyor.com/project/alexcrichton/git2-rs) + +[Documentation](http://alexcrichton.com/git2-rs/git2/index.html) + +libgit2 bindings for Rust + +```toml +[dependencies] +git2 = "0.3" +``` + +## Building git2-rs + +First, you'll need to install _CMake_. Afterwards, just run: + +```sh +$ git clone https://github.com/alexcrichton/git2-rs +$ cd git2-rs +$ cargo build +``` + +# License + +`git2-rs` is primarily distributed under the terms of both the MIT license and +the Apache License (Version 2.0), with portions covered by various BSD-like +licenses. + +See LICENSE-APACHE, and LICENSE-MIT for details. diff --git a/deps/git2-0.4.3/appveyor.yml b/deps/git2-0.4.3/appveyor.yml new file mode 100644 index 000000000..13fe54d58 --- /dev/null +++ b/deps/git2-0.4.3/appveyor.yml @@ -0,0 +1,23 @@ +environment: + matrix: + - TARGET: x86_64-pc-windows-gnu + MSYS_BITS: 64 + - TARGET: i686-pc-windows-gnu + MSYS_BITS: 32 + - TARGET: x86_64-pc-windows-msvc + - TARGET: i686-pc-windows-msvc +install: + - ps: Start-FileDownload "https://static.rust-lang.org/dist/rust-nightly-${env:TARGET}.exe" + - rust-nightly-%TARGET%.exe /VERYSILENT /NORESTART /DIR="C:\Program Files (x86)\Rust" + - set PATH=%PATH%;C:\Program Files (x86)\Rust\bin + - if defined MSYS_BITS set PATH=%PATH%;C:\msys64\mingw%MSYS_BITS%\bin;C:\msys64\usr\bin + - set CARGO_TARGET_DIR=%APPVEYOR_BUILD_FOLDER%\target + - rustc -V + - cargo -V + +build: false + +test_script: + - cargo test + - cargo test --no-default-features + - cargo run --manifest-path systest/Cargo.toml diff --git a/deps/git2-0.4.2/examples/add.rs b/deps/git2-0.4.3/examples/add.rs similarity index 100% rename from deps/git2-0.4.2/examples/add.rs rename to deps/git2-0.4.3/examples/add.rs diff --git a/deps/git2-0.4.2/examples/blame.rs b/deps/git2-0.4.3/examples/blame.rs similarity index 100% rename from deps/git2-0.4.2/examples/blame.rs rename to deps/git2-0.4.3/examples/blame.rs diff --git a/deps/git2-0.4.2/examples/cat-file.rs b/deps/git2-0.4.3/examples/cat-file.rs similarity index 100% rename from deps/git2-0.4.2/examples/cat-file.rs rename to deps/git2-0.4.3/examples/cat-file.rs diff --git a/deps/git2-0.4.2/examples/clone.rs b/deps/git2-0.4.3/examples/clone.rs similarity index 100% rename from deps/git2-0.4.2/examples/clone.rs rename to deps/git2-0.4.3/examples/clone.rs diff --git a/deps/git2-0.4.2/examples/diff.rs b/deps/git2-0.4.3/examples/diff.rs similarity index 100% rename from deps/git2-0.4.2/examples/diff.rs rename to deps/git2-0.4.3/examples/diff.rs diff --git a/deps/git2-0.4.3/examples/fetch.rs b/deps/git2-0.4.3/examples/fetch.rs new file mode 100644 index 000000000..a03ea4af2 --- /dev/null +++ b/deps/git2-0.4.3/examples/fetch.rs @@ -0,0 +1,131 @@ +/* + * libgit2 "fetch" example - shows how to fetch remote data + * + * Written by the libgit2 contributors + * + * To the extent possible under law, the author(s) have dedicated all copyright + * and related and neighboring rights to this software to the public domain + * worldwide. This software is distributed without any warranty. + * + * You should have received a copy of the CC0 Public Domain Dedication along + * with this software. If not, see + * . + */ + +#![deny(warnings)] + +extern crate git2; +extern crate docopt; +extern crate rustc_serialize; + +use docopt::Docopt; +use git2::{Repository, RemoteCallbacks, Direction, AutotagOption, FetchOptions}; +use std::io::{self, Write}; +use std::str; + +#[derive(RustcDecodable)] +struct Args { + arg_remote: Option, +} + +fn run(args: &Args) -> Result<(), git2::Error> { + let repo = try!(Repository::open(".")); + let remote = args.arg_remote.as_ref().map(|s| &s[..]).unwrap_or("origin"); + + // Figure out whether it's a named remote or a URL + println!("Fetching {} for repo", remote); + let mut cb = RemoteCallbacks::new(); + let mut remote = try!(repo.find_remote(remote).or_else(|_| { + repo.remote_anonymous(remote) + })); + cb.sideband_progress(|data| { + print!("remote: {}", str::from_utf8(data).unwrap()); + io::stdout().flush().unwrap(); + true + }); + + // This callback gets called for each remote-tracking branch that gets + // updated. The message we output depends on whether it's a new one or an + // update. + cb.update_tips(|refname, a, b| { + if a.is_zero() { + println!("[new] {:20} {}", b, refname); + } else { + println!("[updated] {:10}..{:10} {}", a, b, refname); + } + true + }); + + // Here we show processed and total objects in the pack and the amount of + // received data. Most frontends will probably want to show a percentage and + // the download rate. + cb.transfer_progress(|stats| { + if stats.received_objects() == stats.total_objects() { + print!("Resolving deltas {}/{}\r", stats.indexed_deltas(), + stats.total_deltas()); + } else if stats.total_objects() > 0 { + print!("Received {}/{} objects ({}) in {} bytes\r", + stats.received_objects(), + stats.total_objects(), + stats.indexed_objects(), + stats.received_bytes()); + } + io::stdout().flush().unwrap(); + true + }); + + // Connect to the remote end specifying that we want to fetch information + // from it. + try!(remote.connect(Direction::Fetch)); + + // Download the packfile and index it. This function updates the amount of + // received data and the indexer stats which lets you inform the user about + // progress. + let mut fo = FetchOptions::new(); + fo.remote_callbacks(cb); + try!(remote.download(&[], Some(&mut fo))); + + { + // If there are local objects (we got a thin pack), then tell the user + // how many objects we saved from having to cross the network. + let stats = remote.stats(); + if stats.local_objects() > 0 { + println!("\rReceived {}/{} objects in {} bytes (used {} local \ + objects)", stats.indexed_objects(), + stats.total_objects(), stats.received_bytes(), + stats.local_objects()); + } else { + println!("\rReceived {}/{} objects in {} bytes", + stats.indexed_objects(), stats.total_objects(), + stats.received_bytes()); + } + } + + // Disconnect the underlying connection to prevent from idling. + remote.disconnect(); + + // Update the references in the remote's namespace to point to the right + // commits. This may be needed even if there was no packfile to download, + // which can happen e.g. when the branches have been changed but all the + // needed objects are available locally. + try!(remote.update_tips(None, true, + AutotagOption::Unspecified, None)); + + Ok(()) +} + +fn main() { + const USAGE: &'static str = " +usage: fetch [options] [] + +Options: + -h, --help show this message +"; + + let args = Docopt::new(USAGE).and_then(|d| d.decode()) + .unwrap_or_else(|e| e.exit()); + match run(&args) { + Ok(()) => {} + Err(e) => println!("error: {}", e), + } +} diff --git a/deps/git2-0.4.2/examples/init.rs b/deps/git2-0.4.3/examples/init.rs similarity index 100% rename from deps/git2-0.4.2/examples/init.rs rename to deps/git2-0.4.3/examples/init.rs diff --git a/deps/git2-0.4.2/examples/log.rs b/deps/git2-0.4.3/examples/log.rs similarity index 100% rename from deps/git2-0.4.2/examples/log.rs rename to deps/git2-0.4.3/examples/log.rs diff --git a/deps/git2-0.4.2/examples/ls-remote.rs b/deps/git2-0.4.3/examples/ls-remote.rs similarity index 100% rename from deps/git2-0.4.2/examples/ls-remote.rs rename to deps/git2-0.4.3/examples/ls-remote.rs diff --git a/deps/git2-0.4.2/examples/rev-list.rs b/deps/git2-0.4.3/examples/rev-list.rs similarity index 100% rename from deps/git2-0.4.2/examples/rev-list.rs rename to deps/git2-0.4.3/examples/rev-list.rs diff --git a/deps/git2-0.4.2/examples/rev-parse.rs b/deps/git2-0.4.3/examples/rev-parse.rs similarity index 100% rename from deps/git2-0.4.2/examples/rev-parse.rs rename to deps/git2-0.4.3/examples/rev-parse.rs diff --git a/deps/git2-0.4.2/examples/status.rs b/deps/git2-0.4.3/examples/status.rs similarity index 100% rename from deps/git2-0.4.2/examples/status.rs rename to deps/git2-0.4.3/examples/status.rs diff --git a/deps/git2-0.4.2/examples/tag.rs b/deps/git2-0.4.3/examples/tag.rs similarity index 100% rename from deps/git2-0.4.2/examples/tag.rs rename to deps/git2-0.4.3/examples/tag.rs diff --git a/deps/git2-0.4.2/src/blame.rs b/deps/git2-0.4.3/src/blame.rs similarity index 100% rename from deps/git2-0.4.2/src/blame.rs rename to deps/git2-0.4.3/src/blame.rs diff --git a/deps/git2-0.4.3/src/blob.rs b/deps/git2-0.4.3/src/blob.rs new file mode 100644 index 000000000..40a94b582 --- /dev/null +++ b/deps/git2-0.4.3/src/blob.rs @@ -0,0 +1,104 @@ +use std::marker; +use std::mem; +use std::slice; + +use {raw, Oid, Object}; +use util::Binding; + +/// A structure to represent a git [blob][1] +/// +/// [1]: http://git-scm.com/book/en/Git-Internals-Git-Objects +pub struct Blob<'repo> { + raw: *mut raw::git_blob, + _marker: marker::PhantomData>, +} + +impl<'repo> Blob<'repo> { + /// Get the id (SHA1) of a repository blob + pub fn id(&self) -> Oid { + unsafe { Binding::from_raw(raw::git_blob_id(&*self.raw)) } + } + + /// Determine if the blob content is most certainly binary or not. + pub fn is_binary(&self) -> bool { + unsafe { raw::git_blob_is_binary(&*self.raw) == 1 } + } + + /// Get the content of this blob. + pub fn content(&self) -> &[u8] { + unsafe { + let data = raw::git_blob_rawcontent(&*self.raw) as *const u8; + let len = raw::git_blob_rawsize(&*self.raw) as usize; + slice::from_raw_parts(data, len) + } + } + + /// Casts this Blob to be usable as an `Object` + pub fn as_object(&self) -> &Object<'repo> { + unsafe { + &*(self as *const _ as *const Object<'repo>) + } + } + + /// Consumes Blob to be returned as an `Object` + pub fn into_object(self) -> Object<'repo> { + assert_eq!(mem::size_of_val(&self), mem::size_of::()); + unsafe { + mem::transmute(self) + } + } +} + +impl<'repo> Binding for Blob<'repo> { + type Raw = *mut raw::git_blob; + + unsafe fn from_raw(raw: *mut raw::git_blob) -> Blob<'repo> { + Blob { + raw: raw, + _marker: marker::PhantomData, + } + } + fn raw(&self) -> *mut raw::git_blob { self.raw } +} + + +impl<'repo> Drop for Blob<'repo> { + fn drop(&mut self) { + unsafe { raw::git_blob_free(self.raw) } + } +} + +#[cfg(test)] +mod tests { + use std::io::prelude::*; + use std::fs::File; + use tempdir::TempDir; + use Repository; + + #[test] + fn buffer() { + let td = TempDir::new("test").unwrap(); + let repo = Repository::init(td.path()).unwrap(); + let id = repo.blob(&[5, 4, 6]).unwrap(); + let blob = repo.find_blob(id).unwrap(); + + assert_eq!(blob.id(), id); + assert_eq!(blob.content(), [5, 4, 6]); + assert!(blob.is_binary()); + + repo.find_object(id, None).unwrap().as_blob().unwrap(); + repo.find_object(id, None).unwrap().into_blob().ok().unwrap(); + } + + #[test] + fn path() { + let td = TempDir::new("test").unwrap(); + let path = td.path().join("foo"); + File::create(&path).unwrap().write_all(&[7, 8, 9]).unwrap(); + let repo = Repository::init(td.path()).unwrap(); + let id = repo.blob_path(&path).unwrap(); + let blob = repo.find_blob(id).unwrap(); + assert_eq!(blob.content(), [7, 8, 9]); + blob.into_object(); + } +} diff --git a/deps/git2-0.4.2/src/branch.rs b/deps/git2-0.4.3/src/branch.rs similarity index 100% rename from deps/git2-0.4.2/src/branch.rs rename to deps/git2-0.4.3/src/branch.rs diff --git a/deps/git2-0.4.2/src/buf.rs b/deps/git2-0.4.3/src/buf.rs similarity index 100% rename from deps/git2-0.4.2/src/buf.rs rename to deps/git2-0.4.3/src/buf.rs diff --git a/deps/git2-0.4.2/src/build.rs b/deps/git2-0.4.3/src/build.rs similarity index 100% rename from deps/git2-0.4.2/src/build.rs rename to deps/git2-0.4.3/src/build.rs diff --git a/deps/git2-0.4.2/src/call.rs b/deps/git2-0.4.3/src/call.rs similarity index 100% rename from deps/git2-0.4.2/src/call.rs rename to deps/git2-0.4.3/src/call.rs diff --git a/deps/git2-0.4.2/src/cert.rs b/deps/git2-0.4.3/src/cert.rs similarity index 100% rename from deps/git2-0.4.2/src/cert.rs rename to deps/git2-0.4.3/src/cert.rs diff --git a/deps/git2-0.4.3/src/commit.rs b/deps/git2-0.4.3/src/commit.rs new file mode 100644 index 000000000..91929d15e --- /dev/null +++ b/deps/git2-0.4.3/src/commit.rs @@ -0,0 +1,340 @@ +use std::marker; +use std::mem; +use std::ops::Range; +use std::str; +use libc; + +use {raw, signature, Oid, Error, Signature, Tree, Time, Object}; +use util::Binding; + +/// A structure to represent a git [commit][1] +/// +/// [1]: http://git-scm.com/book/en/Git-Internals-Git-Objects +pub struct Commit<'repo> { + raw: *mut raw::git_commit, + _marker: marker::PhantomData>, +} + +/// An iterator over the parent commits of a commit. +pub struct Parents<'commit, 'repo: 'commit> { + range: Range, + commit: &'commit Commit<'repo>, +} + +/// An iterator over the parent commits' ids of a commit. +pub struct ParentIds<'commit> { + range: Range, + commit: &'commit Commit<'commit>, +} + +impl<'repo> Commit<'repo> { + /// Get the id (SHA1) of a repository commit + pub fn id(&self) -> Oid { + unsafe { Binding::from_raw(raw::git_commit_id(&*self.raw)) } + } + + /// Get the id of the tree pointed to by this commit. + /// + /// No attempts are made to fetch an object from the ODB. + pub fn tree_id(&self) -> Oid { + unsafe { Binding::from_raw(raw::git_commit_tree_id(&*self.raw)) } + } + + /// Get the tree pointed to by a commit. + pub fn tree(&self) -> Result, Error> { + let mut ret = 0 as *mut raw::git_tree; + unsafe { + try_call!(raw::git_commit_tree(&mut ret, &*self.raw)); + Ok(Binding::from_raw(ret)) + } + } + + /// Get access to the underlying raw pointer. + pub fn raw(&self) -> *mut raw::git_commit { self.raw } + + /// Get the full message of a commit. + /// + /// The returned message will be slightly prettified by removing any + /// potential leading newlines. + /// + /// `None` will be returned if the message is not valid utf-8 + pub fn message(&self) -> Option<&str> { + str::from_utf8(self.message_bytes()).ok() + } + + /// Get the full message of a commit as a byte slice. + /// + /// The returned message will be slightly prettified by removing any + /// potential leading newlines. + pub fn message_bytes(&self) -> &[u8] { + unsafe { + ::opt_bytes(self, raw::git_commit_message(&*self.raw)).unwrap() + } + } + + /// Get the encoding for the message of a commit, as a string representing a + /// standard encoding name. + /// + /// `None` will be returned if the encoding is not known + pub fn message_encoding(&self) -> Option<&str> { + let bytes = unsafe { + ::opt_bytes(self, raw::git_commit_message(&*self.raw)) + }; + bytes.map(|b| str::from_utf8(b).unwrap()) + } + + /// Get the full raw message of a commit. + /// + /// `None` will be returned if the message is not valid utf-8 + pub fn message_raw(&self) -> Option<&str> { + str::from_utf8(self.message_raw_bytes()).ok() + } + + /// Get the full raw message of a commit. + pub fn message_raw_bytes(&self) -> &[u8] { + unsafe { + ::opt_bytes(self, raw::git_commit_message_raw(&*self.raw)).unwrap() + } + } + + /// Get the full raw text of the commit header. + /// + /// `None` will be returned if the message is not valid utf-8 + pub fn raw_header(&self) -> Option<&str> { + str::from_utf8(self.raw_header_bytes()).ok() + } + + /// Get the full raw text of the commit header. + pub fn raw_header_bytes(&self) -> &[u8] { + unsafe { + ::opt_bytes(self, raw::git_commit_raw_header(&*self.raw)).unwrap() + } + } + + /// Get the short "summary" of the git commit message. + /// + /// The returned message is the summary of the commit, comprising the first + /// paragraph of the message with whitespace trimmed and squashed. + /// + /// `None` may be returned if an error occurs or if the summary is not valid + /// utf-8. + pub fn summary(&mut self) -> Option<&str> { + self.summary_bytes().and_then(|s| str::from_utf8(s).ok()) + } + + /// Get the short "summary" of the git commit message. + /// + /// The returned message is the summary of the commit, comprising the first + /// paragraph of the message with whitespace trimmed and squashed. + /// + /// `None` may be returned if an error occurs + pub fn summary_bytes(&mut self) -> Option<&[u8]> { + unsafe { ::opt_bytes(self, raw::git_commit_summary(self.raw)) } + } + + /// Get the commit time (i.e. committer time) of a commit. + /// + /// The first element of the tuple is the time, in seconds, since the epoch. + /// The second element is the offset, in minutes, of the time zone of the + /// committer's preferred time zone. + pub fn time(&self) -> Time { + unsafe { + Time::new(raw::git_commit_time(&*self.raw) as i64, + raw::git_commit_time_offset(&*self.raw) as i32) + } + } + + /// Creates a new iterator over the parents of this commit. + pub fn parents<'a>(&'a self) -> Parents<'a, 'repo> { + let max = unsafe { raw::git_commit_parentcount(&*self.raw) as usize }; + Parents { range: 0..max, commit: self } + } + + /// Creates a new iterator over the parents of this commit. + pub fn parent_ids(&self) -> ParentIds { + let max = unsafe { raw::git_commit_parentcount(&*self.raw) as usize }; + ParentIds { range: 0..max, commit: self } + } + + /// Get the author of this commit. + pub fn author(&self) -> Signature { + unsafe { + let ptr = raw::git_commit_author(&*self.raw); + signature::from_raw_const(self, ptr) + } + } + + /// Get the committer of this commit. + pub fn committer(&self) -> Signature { + unsafe { + let ptr = raw::git_commit_committer(&*self.raw); + signature::from_raw_const(self, ptr) + } + } + + /// Amend this existing commit with all non-`None` values + /// + /// This creates a new commit that is exactly the same as the old commit, + /// except that any non-`None` values will be updated. The new commit has + /// the same parents as the old commit. + /// + /// For information about `update_ref`, see `new`. + pub fn amend(&self, + update_ref: Option<&str>, + author: Option<&Signature>, + committer: Option<&Signature>, + message_encoding: Option<&str>, + message: Option<&str>, + tree: Option<&Tree<'repo>>) -> Result { + let mut raw = raw::git_oid { id: [0; raw::GIT_OID_RAWSZ] }; + let update_ref = try!(::opt_cstr(update_ref)); + let encoding = try!(::opt_cstr(message_encoding)); + let message = try!(::opt_cstr(message)); + unsafe { + try_call!(raw::git_commit_amend(&mut raw, + self.raw(), + update_ref, + author.map(|s| s.raw()), + committer.map(|s| s.raw()), + encoding, + message, + tree.map(|t| t.raw()))); + Ok(Binding::from_raw(&raw as *const _)) + } + } + + /// Get the specified parent of the commit. + /// + /// Use the `parents` iterator to return an iterator over all parents. + pub fn parent(&self, i: usize) -> Result, Error> { + unsafe { + let mut raw = 0 as *mut raw::git_commit; + try_call!(raw::git_commit_parent(&mut raw, &*self.raw, + i as libc::c_uint)); + Ok(Binding::from_raw(raw)) + } + } + + /// Get the specified parent id of the commit. + /// + /// This is different from `parent`, which will attemptstempt to load the + /// parent commit from the ODB. + /// + /// Use the `parent_ids` iterator to return an iterator over all parents. + pub fn parent_id(&self, i: usize) -> Result { + unsafe { + let id = raw::git_commit_parent_id(self.raw, i as libc::c_uint); + if id.is_null() { + Err(Error::from_str("parent index out of bounds")) + } else { + Ok(Binding::from_raw(id)) + } + } + } + + /// Casts this Commit to be usable as an `Object` + pub fn as_object(&self) -> &Object<'repo> { + unsafe { + &*(self as *const _ as *const Object<'repo>) + } + } + + /// Consumes Commit to be returned as an `Object` + pub fn into_object(self) -> Object<'repo> { + assert_eq!(mem::size_of_val(&self), mem::size_of::()); + unsafe { + mem::transmute(self) + } + } +} + +impl<'repo> Binding for Commit<'repo> { + type Raw = *mut raw::git_commit; + unsafe fn from_raw(raw: *mut raw::git_commit) -> Commit<'repo> { + Commit { + raw: raw, + _marker: marker::PhantomData, + } + } + fn raw(&self) -> *mut raw::git_commit { self.raw } +} + + +impl<'repo, 'commit> Iterator for Parents<'commit, 'repo> { + type Item = Commit<'repo>; + fn next(&mut self) -> Option> { + self.range.next().map(|i| self.commit.parent(i).unwrap()) + } + fn size_hint(&self) -> (usize, Option) { self.range.size_hint() } +} + +impl<'repo, 'commit> DoubleEndedIterator for Parents<'commit, 'repo> { + fn next_back(&mut self) -> Option> { + self.range.next_back().map(|i| self.commit.parent(i).unwrap()) + } +} + +impl<'repo, 'commit> ExactSizeIterator for Parents<'commit, 'repo> {} + +impl<'commit> Iterator for ParentIds<'commit> { + type Item = Oid; + fn next(&mut self) -> Option { + self.range.next().map(|i| self.commit.parent_id(i).unwrap()) + } + fn size_hint(&self) -> (usize, Option) { self.range.size_hint() } +} + +impl<'commit> DoubleEndedIterator for ParentIds<'commit> { + fn next_back(&mut self) -> Option { + self.range.next_back().map(|i| self.commit.parent_id(i).unwrap()) + } +} + +impl<'commit> ExactSizeIterator for ParentIds<'commit> {} + +impl<'repo> Drop for Commit<'repo> { + fn drop(&mut self) { + unsafe { raw::git_commit_free(self.raw) } + } +} + +#[cfg(test)] +mod tests { + #[test] + fn smoke() { + let (_td, repo) = ::test::repo_init(); + let head = repo.head().unwrap(); + let target = head.target().unwrap(); + let mut commit = repo.find_commit(target).unwrap(); + assert_eq!(commit.message(), Some("initial")); + assert_eq!(commit.id(), target); + commit.message_raw().unwrap(); + commit.raw_header().unwrap(); + commit.message_encoding(); + commit.summary().unwrap(); + commit.tree_id(); + commit.tree().unwrap(); + assert_eq!(commit.parents().count(), 0); + + assert_eq!(commit.author().name(), Some("name")); + assert_eq!(commit.author().email(), Some("email")); + assert_eq!(commit.committer().name(), Some("name")); + assert_eq!(commit.committer().email(), Some("email")); + + let sig = repo.signature().unwrap(); + let tree = repo.find_tree(commit.tree_id()).unwrap(); + let id = repo.commit(Some("HEAD"), &sig, &sig, "bar", &tree, + &[&commit]).unwrap(); + let head = repo.find_commit(id).unwrap(); + + let new_head = head.amend(Some("HEAD"), None, None, None, + Some("new message"), None).unwrap(); + let new_head = repo.find_commit(new_head).unwrap(); + assert_eq!(new_head.message(), Some("new message")); + new_head.into_object(); + + repo.find_object(target, None).unwrap().as_commit().unwrap(); + repo.find_object(target, None).unwrap().into_commit().ok().unwrap(); + } +} + diff --git a/deps/git2-0.4.2/src/config.rs b/deps/git2-0.4.3/src/config.rs similarity index 100% rename from deps/git2-0.4.2/src/config.rs rename to deps/git2-0.4.3/src/config.rs diff --git a/deps/git2-0.4.3/src/cred.rs b/deps/git2-0.4.3/src/cred.rs new file mode 100644 index 000000000..94113b739 --- /dev/null +++ b/deps/git2-0.4.3/src/cred.rs @@ -0,0 +1,456 @@ +use std::ffi::CString; +use std::io::Write; +use std::mem; +use std::path::Path; +use std::process::{Command, Stdio}; +use url; + +use {raw, Error, Config, IntoCString}; +use util::Binding; + +/// A structure to represent git credentials in libgit2. +pub struct Cred { + raw: *mut raw::git_cred, +} + +/// Management of the gitcredentials(7) interface. +pub struct CredentialHelper { + /// A public field representing the currently discovered username from + /// configuration. + pub username: Option, + protocol: Option, + host: Option, + url: String, + commands: Vec, +} + +impl Cred { + /// Create a "default" credential usable for Negotiate mechanisms like NTLM + /// or Kerberos authentication. + pub fn default() -> Result { + ::init(); + let mut out = 0 as *mut raw::git_cred; + unsafe { + try_call!(raw::git_cred_default_new(&mut out)); + Ok(Binding::from_raw(out)) + } + } + + /// Create a new ssh key credential object used for querying an ssh-agent. + /// + /// The username specified is the username to authenticate. + pub fn ssh_key_from_agent(username: &str) -> Result { + ::init(); + let mut out = 0 as *mut raw::git_cred; + let username = try!(CString::new(username)); + unsafe { + try_call!(raw::git_cred_ssh_key_from_agent(&mut out, username)); + Ok(Binding::from_raw(out)) + } + } + + /// Create a new passphrase-protected ssh key credential object. + pub fn ssh_key(username: &str, + publickey: Option<&Path>, + privatekey: &Path, + passphrase: Option<&str>) -> Result { + ::init(); + let username = try!(CString::new(username)); + let publickey = try!(::opt_cstr(publickey)); + let privatekey = try!(privatekey.into_c_string()); + let passphrase = try!(::opt_cstr(passphrase)); + let mut out = 0 as *mut raw::git_cred; + unsafe { + try_call!(raw::git_cred_ssh_key_new(&mut out, username, publickey, + privatekey, passphrase)); + Ok(Binding::from_raw(out)) + } + } + + /// Create a new plain-text username and password credential object. + pub fn userpass_plaintext(username: &str, + password: &str) -> Result { + ::init(); + let username = try!(CString::new(username)); + let password = try!(CString::new(password)); + let mut out = 0 as *mut raw::git_cred; + unsafe { + try_call!(raw::git_cred_userpass_plaintext_new(&mut out, username, + password)); + Ok(Binding::from_raw(out)) + } + } + + /// Attempt to read `credential.helper` according to gitcredentials(7) [1] + /// + /// This function will attempt to parse the user's `credential.helper` + /// configuration, invoke the necessary processes, and read off what the + /// username/password should be for a particular url. + /// + /// The returned credential type will be a username/password credential if + /// successful. + /// + /// [1]: https://www.kernel.org/pub/software/scm/git/docs/gitcredentials.html + pub fn credential_helper(config: &Config, + url: &str, + username: Option<&str>) + -> Result { + match CredentialHelper::new(url).config(config).username(username) + .execute() { + Some((username, password)) => { + Cred::userpass_plaintext(&username, &password) + } + None => Err(Error::from_str("failed to acquire username/password \ + from local configuration")) + } + } + + /// Create a credential to specify a username. + /// + /// THis is used with ssh authentication to query for the username if non is + /// specified in the url. + pub fn username(username: &str) -> Result { + ::init(); + let username = try!(CString::new(username)); + let mut out = 0 as *mut raw::git_cred; + unsafe { + try_call!(raw::git_cred_username_new(&mut out, username)); + Ok(Binding::from_raw(out)) + } + } + + /// Check whether a credential object contains username information. + pub fn has_username(&self) -> bool { + unsafe { raw::git_cred_has_username(self.raw) == 1 } + } + + /// Return the type of credentials that this object represents. + pub fn credtype(&self) -> raw::git_credtype_t { + unsafe { (*self.raw).credtype } + } + + /// Unwrap access to the underlying raw pointer, canceling the destructor + pub unsafe fn unwrap(mut self) -> *mut raw::git_cred { + mem::replace(&mut self.raw, 0 as *mut raw::git_cred) + } +} + +impl Binding for Cred { + type Raw = *mut raw::git_cred; + + unsafe fn from_raw(raw: *mut raw::git_cred) -> Cred { + Cred { raw: raw } + } + fn raw(&self) -> *mut raw::git_cred { self.raw } +} + +impl Drop for Cred { + fn drop(&mut self) { + if !self.raw.is_null() { + unsafe { ((*self.raw).free)(self.raw) } + } + } +} + +impl CredentialHelper { + /// Create a new credential helper object which will be used to probe git's + /// local credential configuration. + /// + /// The url specified is the namespace on which this will query credentials. + /// Invalid urls are currently ignored. + pub fn new(url: &str) -> CredentialHelper { + let mut ret = CredentialHelper { + protocol: None, + host: None, + username: None, + url: url.to_string(), + commands: Vec::new(), + }; + + // Parse out the (protocol, host) if one is available + if let Ok(url) = url::Url::parse(url) { + if let Some(url::Host::Domain(s)) = url.host() { + ret.host = Some(s.to_string()); + } + ret.protocol = Some(url.scheme().to_string()) + } + return ret; + } + + /// Set the username that this credential helper will query with. + /// + /// By default the username is `None`. + pub fn username(&mut self, username: Option<&str>) -> &mut CredentialHelper { + self.username = username.map(|s| s.to_string()); + self + } + + /// Query the specified configuration object to discover commands to + /// execute, usernames to query, etc. + pub fn config(&mut self, config: &Config) -> &mut CredentialHelper { + // Figure out the configured username/helper program. + // + // see http://git-scm.com/docs/gitcredentials.html#_configuration_options + // + // TODO: implement useHttpPath + if self.username.is_none() { + self.config_username(config); + } + self.config_helper(config); + self + } + + // Configure the queried username from `config` + fn config_username(&mut self, config: &Config) { + let key = self.exact_key("username"); + self.username = config.get_string(&key).ok().or_else(|| { + self.url_key("username").and_then(|s| { + config.get_string(&s).ok() + }) + }).or_else(|| { + config.get_string("credential.username").ok() + }) + } + + // Discover all `helper` directives from `config` + fn config_helper(&mut self, config: &Config) { + let exact = config.get_string(&self.exact_key("helper")); + self.add_command(exact.as_ref().ok().map(|s| &s[..])); + match self.url_key("helper") { + Some(key) => { + let url = config.get_string(&key); + self.add_command(url.as_ref().ok().map(|s| &s[..])); + } + None => {} + } + let global = config.get_string("credential.helper"); + self.add_command(global.as_ref().ok().map(|s| &s[..])); + } + + // Add a `helper` configured command to the list of commands to execute. + // + // see https://www.kernel.org/pub/software/scm/git/docs/technical + // /api-credentials.html#_credential_helpers + fn add_command(&mut self, cmd: Option<&str>) { + let cmd = match cmd { Some(s) => s, None => return }; + if cmd.starts_with("!") { + self.commands.push(cmd[1..].to_string()); + } else if cmd.starts_with("/") || cmd.starts_with("\\") || + cmd[1..].starts_with(":\\") { + self.commands.push(format!("\"{}\"", cmd)); + } else { + self.commands.push(format!("git credential-{}", cmd)); + } + } + + fn exact_key(&self, name: &str) -> String { + format!("credential.{}.{}", self.url, name) + } + + fn url_key(&self, name: &str) -> Option { + match (&self.host, &self.protocol) { + (&Some(ref host), &Some(ref protocol)) => { + Some(format!("credential.{}://{}.{}", protocol, host, name)) + } + _ => None + } + } + + /// Execute this helper, attempting to discover a username/password pair. + /// + /// All I/O errors are ignored, (to match git behavior), and this function + /// only succeeds if both a username and a password were found + pub fn execute(&self) -> Option<(String, String)> { + let mut username = self.username.clone(); + let mut password = None; + for cmd in self.commands.iter() { + let (u, p) = self.execute_cmd(&cmd, &username); + if u.is_some() && username.is_none() { + username = u; + } + if p.is_some() && password.is_none() { + password = p; + } + if username.is_some() && password.is_some() { break } + } + + match (username, password) { + (Some(u), Some(p)) => Some((u, p)), + _ => None, + } + } + + // Execute the given `cmd`, providing the appropriate variables on stdin and + // then afterwards parsing the output into the username/password on stdout. + fn execute_cmd(&self, cmd: &str, username: &Option) + -> (Option, Option) { + macro_rules! my_try( ($e:expr) => ( + match $e { Ok(e) => e, Err(..) => return (None, None) } + ) ); + + let mut p = my_try!(Command::new("sh").arg("-c") + .arg(&format!("{} get", cmd)) + .stdin(Stdio::piped()) + .stdout(Stdio::piped()) + .stderr(Stdio::piped()) + .spawn()); + // Ignore write errors as the command may not actually be listening for + // stdin + { + let stdin = p.stdin.as_mut().unwrap(); + match self.protocol { + Some(ref p) => { let _ = writeln!(stdin, "protocol={}", p); } + None => {} + } + match self.host { + Some(ref p) => { let _ = writeln!(stdin, "host={}", p); } + None => {} + } + match *username { + Some(ref p) => { let _ = writeln!(stdin, "username={}", p); } + None => {} + } + } + let output = my_try!(p.wait_with_output()); + if !output.status.success() { return (None, None) } + return self.parse_output(output.stdout) + } + + // Parse the output of a command into the username/password found + fn parse_output(&self, output: Vec) -> (Option, Option) { + // Parse the output of the command, looking for username/password + let mut username = None; + let mut password = None; + for line in output.split(|t| *t == b'\n') { + let mut parts = line.splitn(2, |t| *t == b'='); + let key = parts.next().unwrap(); + let value = match parts.next() { Some(s) => s, None => continue }; + let value = match String::from_utf8(value.to_vec()) { + Ok(s) => s, + Err(..) => continue, + }; + match key { + b"username" => username = Some(value), + b"password" => password = Some(value), + _ => {} + } + } + (username, password) + } +} + +#[cfg(all(test, feature = "unstable"))] +mod test { + use std::env; + use std::fs::File; + use std::io::prelude::*; + use std::path::Path; + use tempdir::TempDir; + + use {Cred, Config, CredentialHelper, ConfigLevel}; + + macro_rules! cfg( ($($k:expr => $v:expr),*) => ({ + let td = TempDir::new("git2-rs").unwrap(); + let mut cfg = Config::new().unwrap(); + cfg.add_file(&td.path().join("cfg"), ConfigLevel::Highest, false).unwrap(); + $(cfg.set_str($k, $v).unwrap();)* + cfg + }) ); + + #[test] + fn smoke() { + Cred::default().unwrap(); + } + + #[test] + fn credential_helper1() { + let cfg = cfg! { + "credential.helper" => "!f() { echo username=a; echo password=b; }; f" + }; + let (u, p) = CredentialHelper::new("https://example.com/foo/bar") + .config(&cfg) + .execute().unwrap(); + assert_eq!(u, "a"); + assert_eq!(p, "b"); + } + + #[test] + fn credential_helper2() { + let cfg = cfg! {}; + assert!(CredentialHelper::new("https://example.com/foo/bar") + .config(&cfg) + .execute().is_none()); + } + + #[test] + fn credential_helper3() { + let cfg = cfg! { + "credential.https://example.com.helper" => + "!f() { echo username=c; }; f", + "credential.helper" => "!f() { echo username=a; echo password=b; }; f" + }; + let (u, p) = CredentialHelper::new("https://example.com/foo/bar") + .config(&cfg) + .execute().unwrap(); + assert_eq!(u, "c"); + assert_eq!(p, "b"); + } + + #[test] + fn credential_helper4() { + let td = TempDir::new("git2-rs").unwrap(); + let path = td.path().join("script"); + File::create(&path).unwrap().write(br"\ +#!/bin/sh +echo username=c +").unwrap(); + chmod(&path); + let cfg = cfg! { + "credential.https://example.com.helper" => + &path.display().to_string()[..], + "credential.helper" => "!f() { echo username=a; echo password=b; }; f" + }; + let (u, p) = CredentialHelper::new("https://example.com/foo/bar") + .config(&cfg) + .execute().unwrap(); + assert_eq!(u, "c"); + assert_eq!(p, "b"); + } + + #[test] + fn credential_helper5() { + let td = TempDir::new("git2-rs").unwrap(); + let path = td.path().join("git-credential-script"); + File::create(&path).unwrap().write(br"\ +#!/bin/sh +echo username=c +").unwrap(); + chmod(&path); + + let paths = env::var("PATH").unwrap(); + let paths = env::split_paths(&paths) + .chain(path.parent().map(|p| p.to_path_buf()).into_iter()); + env::set_var("PATH", &env::join_paths(paths).unwrap()); + + let cfg = cfg! { + "credential.https://example.com.helper" => "script", + "credential.helper" => "!f() { echo username=a; echo password=b; }; f" + }; + let (u, p) = CredentialHelper::new("https://example.com/foo/bar") + .config(&cfg) + .execute().unwrap(); + assert_eq!(u, "c"); + assert_eq!(p, "b"); + } + + #[cfg(unix)] + fn chmod(path: &Path) { + use std::os::unix::prelude::*; + use std::fs; + let mut perms = fs::metadata(path).unwrap().permissions(); + perms.set_mode(0o755); + fs::set_permissions(path, perms).unwrap(); + } + #[cfg(windows)] + fn chmod(_path: &Path) {} +} diff --git a/deps/git2-0.4.2/src/describe.rs b/deps/git2-0.4.3/src/describe.rs similarity index 100% rename from deps/git2-0.4.2/src/describe.rs rename to deps/git2-0.4.3/src/describe.rs diff --git a/deps/git2-0.4.2/src/diff.rs b/deps/git2-0.4.3/src/diff.rs similarity index 100% rename from deps/git2-0.4.2/src/diff.rs rename to deps/git2-0.4.3/src/diff.rs diff --git a/deps/git2-0.4.3/src/error.rs b/deps/git2-0.4.3/src/error.rs new file mode 100644 index 000000000..ab4173a07 --- /dev/null +++ b/deps/git2-0.4.3/src/error.rs @@ -0,0 +1,237 @@ +use std::env::JoinPathsError; +use std::ffi::{CStr, NulError}; +use std::error; +use std::fmt; +use std::str; +use libc::c_int; + +use {raw, ErrorClass, ErrorCode}; + +/// A structure to represent errors coming out of libgit2. +#[derive(Debug)] +pub struct Error { + code: c_int, + klass: c_int, + message: String, +} + +impl Error { + /// Returns the last error, or `None` if one is not available. + pub fn last_error(code: c_int) -> Option { + ::init(); + unsafe { + let ptr = raw::giterr_last(); + if ptr.is_null() { + None + } else { + Some(Error::from_raw(code, ptr)) + } + } + } + + unsafe fn from_raw(code: c_int, ptr: *const raw::git_error) -> Error { + let msg = CStr::from_ptr((*ptr).message as *const _).to_bytes(); + let msg = str::from_utf8(msg).unwrap(); + Error { code: code, klass: (*ptr).klass, message: msg.to_string() } + } + + /// Creates a new error from the given string as the error. + pub fn from_str(s: &str) -> Error { + Error { + code: raw::GIT_ERROR as c_int, + klass: raw::GITERR_NONE as c_int, + message: s.to_string(), + } + } + + /// Return the error code associated with this error. + pub fn code(&self) -> ErrorCode { + match self.raw_code() { + raw::GIT_OK => super::ErrorCode::GenericError, + raw::GIT_ERROR => super::ErrorCode::GenericError, + raw::GIT_ENOTFOUND => super::ErrorCode::NotFound, + raw::GIT_EEXISTS => super::ErrorCode::Exists, + raw::GIT_EAMBIGUOUS => super::ErrorCode::Ambiguous, + raw::GIT_EBUFS => super::ErrorCode::BufSize, + raw::GIT_EUSER => super::ErrorCode::User, + raw::GIT_EBAREREPO => super::ErrorCode::BareRepo, + raw::GIT_EUNBORNBRANCH => super::ErrorCode::UnbornBranch, + raw::GIT_EUNMERGED => super::ErrorCode::Unmerged, + raw::GIT_ENONFASTFORWARD => super::ErrorCode::NotFastForward, + raw::GIT_EINVALIDSPEC => super::ErrorCode::InvalidSpec, + raw::GIT_ECONFLICT => super::ErrorCode::Conflict, + raw::GIT_ELOCKED => super::ErrorCode::Locked, + raw::GIT_EMODIFIED => super::ErrorCode::Modified, + raw::GIT_PASSTHROUGH => super::ErrorCode::GenericError, + raw::GIT_ITEROVER => super::ErrorCode::GenericError, + raw::GIT_EAUTH => super::ErrorCode::Auth, + raw::GIT_ECERTIFICATE => super::ErrorCode::Certificate, + raw::GIT_EAPPLIED => super::ErrorCode::Applied, + raw::GIT_EPEEL => super::ErrorCode::Peel, + raw::GIT_EEOF => super::ErrorCode::Eof, + raw::GIT_EINVALID => super::ErrorCode::Invalid, + raw::GIT_EUNCOMMITTED => super::ErrorCode::Uncommitted, + raw::GIT_EDIRECTORY => super::ErrorCode::Directory, + _ => super::ErrorCode::GenericError, + } + } + + /// Return the error class associated with this error. + pub fn class(&self) -> ErrorClass { + match self.raw_class() { + raw::GITERR_NONE => super::ErrorClass::None, + raw::GITERR_NOMEMORY => super::ErrorClass::NoMemory, + raw::GITERR_OS => super::ErrorClass::Os, + raw::GITERR_INVALID => super::ErrorClass::Invalid, + raw::GITERR_REFERENCE => super::ErrorClass::Reference, + raw::GITERR_ZLIB => super::ErrorClass::Zlib, + raw::GITERR_REPOSITORY => super::ErrorClass::Repository, + raw::GITERR_CONFIG => super::ErrorClass::Config, + raw::GITERR_REGEX => super::ErrorClass::Regex, + raw::GITERR_ODB => super::ErrorClass::Odb, + raw::GITERR_INDEX => super::ErrorClass::Index, + raw::GITERR_OBJECT => super::ErrorClass::Object, + raw::GITERR_NET => super::ErrorClass::Net, + raw::GITERR_TAG => super::ErrorClass::Tag, + raw::GITERR_TREE => super::ErrorClass::Tree, + raw::GITERR_INDEXER => super::ErrorClass::Indexer, + raw::GITERR_SSL => super::ErrorClass::Ssl, + raw::GITERR_SUBMODULE => super::ErrorClass::Submodule, + raw::GITERR_THREAD => super::ErrorClass::Thread, + raw::GITERR_STASH => super::ErrorClass::Stash, + raw::GITERR_CHECKOUT => super::ErrorClass::Checkout, + raw::GITERR_FETCHHEAD => super::ErrorClass::FetchHead, + raw::GITERR_MERGE => super::ErrorClass::Merge, + raw::GITERR_SSH => super::ErrorClass::Ssh, + raw::GITERR_FILTER => super::ErrorClass::Filter, + raw::GITERR_REVERT => super::ErrorClass::Revert, + raw::GITERR_CALLBACK => super::ErrorClass::Callback, + raw::GITERR_CHERRYPICK => super::ErrorClass::CherryPick, + raw::GITERR_DESCRIBE => super::ErrorClass::Describe, + raw::GITERR_REBASE => super::ErrorClass::Rebase, + raw::GITERR_FILESYSTEM => super::ErrorClass::Filesystem, + _ => super::ErrorClass::None, + } + } + + /// Return the raw error code associated with this error. + pub fn raw_code(&self) -> raw::git_error_code { + macro_rules! check( ($($e:ident,)*) => ( + $(if self.code == raw::$e as c_int { raw::$e }) else * + else { + raw::GIT_ERROR + } + ) ); + check!( + GIT_OK, + GIT_ERROR, + GIT_ENOTFOUND, + GIT_EEXISTS, + GIT_EAMBIGUOUS, + GIT_EBUFS, + GIT_EUSER, + GIT_EBAREREPO, + GIT_EUNBORNBRANCH, + GIT_EUNMERGED, + GIT_ENONFASTFORWARD, + GIT_EINVALIDSPEC, + GIT_ECONFLICT, + GIT_ELOCKED, + GIT_EMODIFIED, + GIT_EAUTH, + GIT_ECERTIFICATE, + GIT_EAPPLIED, + GIT_EPEEL, + GIT_EEOF, + GIT_EINVALID, + GIT_EUNCOMMITTED, + GIT_PASSTHROUGH, + GIT_ITEROVER, + ) + } + + /// Return the raw error class associated with this error. + pub fn raw_class(&self) -> raw::git_error_t { + macro_rules! check( ($($e:ident,)*) => ( + $(if self.klass == raw::$e as c_int { raw::$e }) else * + else { + raw::GITERR_NONE + } + ) ); + check!( + GITERR_NONE, + GITERR_NOMEMORY, + GITERR_OS, + GITERR_INVALID, + GITERR_REFERENCE, + GITERR_ZLIB, + GITERR_REPOSITORY, + GITERR_CONFIG, + GITERR_REGEX, + GITERR_ODB, + GITERR_INDEX, + GITERR_OBJECT, + GITERR_NET, + GITERR_TAG, + GITERR_TREE, + GITERR_INDEXER, + GITERR_SSL, + GITERR_SUBMODULE, + GITERR_THREAD, + GITERR_STASH, + GITERR_CHECKOUT, + GITERR_FETCHHEAD, + GITERR_MERGE, + GITERR_SSH, + GITERR_FILTER, + GITERR_REVERT, + GITERR_CALLBACK, + GITERR_CHERRYPICK, + GITERR_DESCRIBE, + GITERR_REBASE, + GITERR_FILESYSTEM, + ) + } + + /// Return the message associated with this error + pub fn message(&self) -> &str { &self.message } +} + +impl error::Error for Error { + fn description(&self) -> &str { &self.message } +} + +impl fmt::Display for Error { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + try!(write!(f, "[{}/{}] ", self.klass, self.code)); + f.write_str(&self.message) + } +} + +impl From for Error { + fn from(_: NulError) -> Error { + Error::from_str("data contained a nul byte that could not be \ + represented as a string") + } +} + +impl From for Error { + fn from(e: JoinPathsError) -> Error { + Error::from_str(error::Error::description(&e)) + } +} + + +#[cfg(test)] +mod tests { + use {ErrorClass, ErrorCode}; + + #[test] + fn smoke() { + let (_td, repo) = ::test::repo_init(); + + let err = repo.find_submodule("does_not_exist").err().unwrap(); + assert_eq!(err.code(), ErrorCode::NotFound); + assert_eq!(err.class(), ErrorClass::Submodule); + } +} diff --git a/deps/git2-0.4.2/src/index.rs b/deps/git2-0.4.3/src/index.rs similarity index 100% rename from deps/git2-0.4.2/src/index.rs rename to deps/git2-0.4.3/src/index.rs diff --git a/deps/git2-0.4.3/src/lib.rs b/deps/git2-0.4.3/src/lib.rs new file mode 100644 index 000000000..b71c591d6 --- /dev/null +++ b/deps/git2-0.4.3/src/lib.rs @@ -0,0 +1,867 @@ +//! # libgit2 bindings for Rust +//! +//! This library contains bindings to the [libgit2][1] C library which is used +//! to manage git repositories. The library itself is a work in progress and is +//! likely lacking some bindings here and there, so be warned. +//! +//! [1]: https://libgit2.github.com/ +//! +//! The git2-rs library strives to be as close to libgit2 as possible, but also +//! strives to make using libgit2 as safe as possible. All resource management +//! is automatic as well as adding strong types to all interfaces (including +//! `Result`) +//! +//! ## Creating a `Repository` +//! +//! The `Repository` is the source from which almost all other objects in git-rs +//! are spawned. A repository can be created through opening, initializing, or +//! cloning. +//! +//! ### Initializing a new repository +//! +//! The `init` method will create a new repository, assuming one does not +//! already exist. +//! +//! ```no_run +//! # #![allow(unstable)] +//! use git2::Repository; +//! +//! let repo = match Repository::init("/path/to/a/repo") { +//! Ok(repo) => repo, +//! Err(e) => panic!("failed to init: {}", e), +//! }; +//! ``` +//! +//! ### Opening an existing repository +//! +//! ```no_run +//! # #![allow(unstable)] +//! use git2::Repository; +//! +//! let repo = match Repository::open("/path/to/a/repo") { +//! Ok(repo) => repo, +//! Err(e) => panic!("failed to open: {}", e), +//! }; +//! ``` +//! +//! ### Cloning an existing repository +//! +//! ```no_run +//! # #![allow(unstable)] +//! use git2::Repository; +//! +//! let url = "https://github.com/alexcrichton/git2-rs"; +//! let repo = match Repository::clone(url, "/path/to/a/repo") { +//! Ok(repo) => repo, +//! Err(e) => panic!("failed to clone: {}", e), +//! }; +//! ``` +//! +//! ## Working with a `Repository` +//! +//! All deriviative objects, references, etc are attached to the lifetime of the +//! source `Repository`, to ensure that they do not outlive the repository +//! itself. + +#![doc(html_root_url = "http://alexcrichton.com/git2-rs")] +#![allow(trivial_numeric_casts, trivial_casts)] +#![deny(missing_docs)] +#![cfg_attr(test, deny(warnings))] +#![cfg_attr(feature = "unstable", feature(recover, std_panic))] + +extern crate libc; +extern crate url; +extern crate libgit2_sys as raw; +#[macro_use] extern crate bitflags; +#[cfg(test)] extern crate tempdir; + +use std::ffi::{CStr, CString}; +use std::fmt; +use std::str; +use std::sync::{Once, ONCE_INIT}; + +pub use blame::{Blame, BlameHunk, BlameIter, BlameOptions}; +pub use blob::Blob; +pub use branch::{Branch, Branches}; +pub use buf::Buf; +pub use commit::{Commit, Parents}; +pub use config::{Config, ConfigEntry, ConfigEntries}; +pub use cred::{Cred, CredentialHelper}; +pub use describe::{Describe, DescribeFormatOptions, DescribeOptions}; +pub use diff::{Diff, DiffDelta, DiffFile, DiffOptions, Deltas}; +pub use diff::{DiffLine, DiffHunk, DiffStats, DiffFindOptions}; +pub use diff::{DiffBinary, DiffBinaryFile, DiffBinaryKind}; +pub use merge::{AnnotatedCommit, MergeOptions}; +pub use error::Error; +pub use index::{Index, IndexEntry, IndexEntries, IndexMatchedPath}; +pub use message::{message_prettify, DEFAULT_COMMENT_CHAR}; +pub use note::{Note, Notes}; +pub use object::Object; +pub use oid::Oid; +pub use pathspec::{Pathspec, PathspecMatchList, PathspecFailedEntries}; +pub use pathspec::{PathspecDiffEntries, PathspecEntries}; +pub use reference::{Reference, References, ReferenceNames}; +pub use reflog::{Reflog, ReflogEntry, ReflogIter}; +pub use refspec::Refspec; +pub use remote::{Remote, Refspecs, RemoteHead, FetchOptions, PushOptions}; +pub use remote_callbacks::{RemoteCallbacks, Credentials, TransferProgress}; +pub use remote_callbacks::{TransportMessage, Progress, UpdateTips}; +pub use repo::{Repository, RepositoryInitOptions}; +pub use revspec::Revspec; +pub use revwalk::Revwalk; +pub use signature::Signature; +pub use status::{StatusOptions, Statuses, StatusIter, StatusEntry, StatusShow}; +pub use submodule::Submodule; +pub use tag::Tag; +pub use time::{Time, IndexTime}; +pub use tree::{Tree, TreeEntry, TreeIter}; +pub use treebuilder::TreeBuilder; +pub use util::IntoCString; + +/// An enumeration of possible errors that can happen when working with a git +/// repository. +#[derive(PartialEq, Eq, Clone, Debug, Copy)] +pub enum ErrorCode { + /// Generic error + GenericError, + /// Requested object could not be found + NotFound, + /// Object exists preventing operation + Exists, + /// More than one object matches + Ambiguous, + /// Output buffer too short to hold data + BufSize, + /// User-generated error + User, + /// Operation not allowed on bare repository + BareRepo, + /// HEAD refers to branch with no commits + UnbornBranch, + /// Merge in progress prevented operation + Unmerged, + /// Reference was not fast-forwardable + NotFastForward, + /// Name/ref spec was not in a valid format + InvalidSpec, + /// Checkout conflicts prevented operation + Conflict, + /// Lock file prevented operation + Locked, + /// Reference value does not match expected + Modified, + /// Authentication error + Auth, + /// Server certificate is invalid + Certificate, + /// Patch/merge has already been applied + Applied, + /// The requested peel operation is not possible + Peel, + /// Unexpected EOF + Eof, + /// Invalid operation or input + Invalid, + /// Uncommitted changes in index prevented operation + Uncommitted, + /// Operation was not valid for a directory, + Directory, +} + +/// An enumeration of possible categories of things that can have +/// errors when working with a git repository. +#[derive(PartialEq, Eq, Clone, Debug, Copy)] +pub enum ErrorClass { + /// Uncategorized + None, + /// Out of memory or insufficient allocated space + NoMemory, + /// Syscall or standard system library error + Os, + /// Invalid input + Invalid, + /// Error resolving or manipulating a reference + Reference, + /// ZLib failure + Zlib, + /// Bad repository state + Repository, + /// Bad configuration + Config, + /// Regex failure + Regex, + /// Bad object + Odb, + /// Invalid index data + Index, + /// Error creating or obtaining an object + Object, + /// Network error + Net, + /// Error manpulating a tag + Tag, + /// Invalid value in tree + Tree, + /// Hashing or packing error + Indexer, + /// Error from SSL + Ssl, + /// Error involing submodules + Submodule, + /// Threading error + Thread, + /// Error manipulating a stash + Stash, + /// Checkout failure + Checkout, + /// Invalid FETCH_HEAD + FetchHead, + /// Merge failure + Merge, + /// SSH failure + Ssh, + /// Error manipulating filters + Filter, + /// Error reverting commit + Revert, + /// Error from a user callback + Callback, + /// Error cherry-picking commit + CherryPick, + /// Can't describe object + Describe, + /// Error during rebase + Rebase, + /// Filesystem-related error + Filesystem, +} + +/// A listing of the possible states that a repository can be in. +#[derive(PartialEq, Eq, Clone, Debug, Copy)] +#[allow(missing_docs)] +pub enum RepositoryState { + Clean, + Merge, + Revert, + RevertSequence, + CherryPick, + CherryPickSequence, + Bisect, + Rebase, + RebaseInteractive, + RebaseMerge, + ApplyMailbox, + ApplyMailboxOrRebase, +} + +/// An enumeration of the possible directions for a remote. +#[derive(Copy, Clone)] +pub enum Direction { + /// Data will be fetched (read) from this remote. + Fetch, + /// Data will be pushed (written) to this remote. + Push, +} + +/// An enumeration of the operations that can be performed for the `reset` +/// method on a `Repository`. +#[derive(Copy, Clone)] +pub enum ResetType { + /// Move the head to the given commit. + Soft, + /// Soft plus reset the index to the commit. + Mixed, + /// Mixed plus changes in the working tree are discarded. + Hard, +} + +/// An enumeration all possible kinds objects may have. +#[derive(PartialEq, Eq, Copy, Clone, Debug)] +pub enum ObjectType { + /// Any kind of git object + Any, + /// An object which corresponds to a git commit + Commit, + /// An object which corresponds to a git tree + Tree, + /// An object which corresponds to a git blob + Blob, + /// An object which corresponds to a git tag + Tag, +} + +/// An enumeration for the possible types of branches +#[derive(PartialEq, Eq, Debug, Copy, Clone)] +pub enum BranchType { + /// A local branch not on a remote. + Local, + /// A branch for a remote. + Remote, +} + +/// An enumeration of the possible priority levels of a config file. +/// +/// The levels corresponding to the escalation logic (higher to lower) when +/// searching for config entries. +#[derive(PartialEq, Eq, Debug, Copy, Clone)] +pub enum ConfigLevel { + /// System-wide on Windows, for compatibility with portable git + ProgramData, + /// System-wide configuration file, e.g. /etc/gitconfig + System, + /// XDG-compatible configuration file, e.g. ~/.config/git/config + XDG, + /// User-specific configuration, e.g. ~/.gitconfig + Global, + /// Repository specific config, e.g. $PWD/.git/config + Local, + /// Application specific configuration file + App, + /// Highest level available + Highest, +} + +/// Merge file favor options for `MergeOptions` instruct the file-level +/// merging functionality how to deal with conflicting regions of the files. +#[derive(PartialEq, Eq, Debug, Copy, Clone)] +pub enum FileFavor { + /// When a region of a file is changed in both branches, a conflict will be + /// recorded in the index so that git_checkout can produce a merge file with + /// conflict markers in the working directory. This is the default. + Normal, + /// When a region of a file is changed in both branches, the file created + /// in the index will contain the "ours" side of any conflicting region. + /// The index will not record a conflict. + Ours, + /// When a region of a file is changed in both branches, the file created + /// in the index will contain the "theirs" side of any conflicting region. + /// The index will not record a conflict. + Theirs, + /// When a region of a file is changed in both branches, the file created + /// in the index will contain each unique line from each side, which has + /// the result of combining both files. The index will not record a conflict. + Union, +} + +bitflags! { + #[doc = " +Orderings that may be specified for Revwalk iteration. +"] + flags Sort: u32 { + /// Sort the repository contents in no particular ordering. + /// + /// This sorting is arbitrary, implementation-specific, and subject to + /// change at any time. This is the default sorting for new walkers. + const SORT_NONE = raw::GIT_SORT_NONE as u32, + + /// Sort the repository contents in topological order (parents before + /// children). + /// + /// This sorting mode can be combined with time sorting. + const SORT_TOPOLOGICAL = raw::GIT_SORT_TOPOLOGICAL as u32, + + /// Sort the repository contents by commit time. + /// + /// This sorting mode can be combined with topological sorting. + const SORT_TIME = raw::GIT_SORT_TIME as u32, + + /// Iterate through the repository contents in reverse order. + /// + /// This sorting mode can be combined with any others. + const SORT_REVERSE = raw::GIT_SORT_REVERSE as u32, + } +} + +bitflags! { + #[doc = " +Types of credentials that can be requested by a credential callback. +"] + flags CredentialType: u32 { + #[allow(missing_docs)] + const USER_PASS_PLAINTEXT = raw::GIT_CREDTYPE_USERPASS_PLAINTEXT as u32, + #[allow(missing_docs)] + const SSH_KEY = raw::GIT_CREDTYPE_SSH_KEY as u32, + #[allow(missing_docs)] + const SSH_MEMORY = raw::GIT_CREDTYPE_SSH_MEMORY as u32, + #[allow(missing_docs)] + const SSH_CUSTOM = raw::GIT_CREDTYPE_SSH_CUSTOM as u32, + #[allow(missing_docs)] + const DEFAULT = raw::GIT_CREDTYPE_DEFAULT as u32, + #[allow(missing_docs)] + const SSH_INTERACTIVE = raw::GIT_CREDTYPE_SSH_INTERACTIVE as u32, + #[allow(missing_docs)] + const USERNAME = raw::GIT_CREDTYPE_USERNAME as u32, + } +} + +bitflags! { + #[doc = " +Flags for APIs that add files matching pathspec +"] + flags IndexAddOption: u32 { + #[allow(missing_docs)] + const ADD_DEFAULT = raw::GIT_INDEX_ADD_DEFAULT as u32, + #[allow(missing_docs)] + const ADD_FORCE = raw::GIT_INDEX_ADD_FORCE as u32, + #[allow(missing_docs)] + const ADD_DISABLE_PATHSPEC_MATCH = + raw::GIT_INDEX_ADD_DISABLE_PATHSPEC_MATCH as u32, + #[allow(missing_docs)] + const ADD_CHECK_PATHSPEC = raw::GIT_INDEX_ADD_CHECK_PATHSPEC as u32, + } +} + +bitflags! { + #[doc = " +Flags for `Repository::open_ext` +"] + flags RepositoryOpenFlags: u32 { + /// Only open the specified path; don't walk upward searching. + const REPOSITORY_OPEN_NO_SEARCH = raw::GIT_REPOSITORY_OPEN_NO_SEARCH as u32, + /// Search across filesystem boundaries. + const REPOSITORY_OPEN_CROSS_FS = raw::GIT_REPOSITORY_OPEN_CROSS_FS as u32, + /// Force opening as bare repository, and defer loading its config. + const REPOSITORY_OPEN_BARE = raw::GIT_REPOSITORY_OPEN_BARE as u32, + } +} + +bitflags! { + #[doc = " +Flags for the return value of `Repository::revparse` +"] + flags RevparseMode: u32 { + /// The spec targeted a single object + const REVPARSE_SINGLE = raw::GIT_REVPARSE_SINGLE as u32, + /// The spec targeted a range of commits + const REVPARSE_RANGE = raw::GIT_REVPARSE_RANGE as u32, + /// The spec used the `...` operator, which invokes special semantics. + const REVPARSE_MERGE_BASE = raw::GIT_REVPARSE_MERGE_BASE as u32, + } +} + +#[cfg(test)] #[macro_use] mod test; +#[macro_use] mod panic; +mod call; +mod util; + +pub mod build; +pub mod cert; +pub mod string_array; +pub mod oid_array; +pub mod transport; + +mod blame; +mod blob; +mod branch; +mod buf; +mod commit; +mod config; +mod cred; +mod describe; +mod diff; +mod merge; +mod error; +mod index; +mod message; +mod note; +mod object; +mod oid; +mod pathspec; +mod reference; +mod reflog; +mod refspec; +mod remote; +mod remote_callbacks; +mod repo; +mod revspec; +mod revwalk; +mod signature; +mod status; +mod submodule; +mod tag; +mod time; +mod tree; +mod treebuilder; + +fn init() { + static INIT: Once = ONCE_INIT; + INIT.call_once(|| unsafe { + raw::openssl_init(); + let r = raw::git_libgit2_init(); + assert!(r >= 0, + "couldn't initialize the libgit2 library: {}", r); + assert_eq!(libc::atexit(shutdown), 0); + }); + extern fn shutdown() { + unsafe { raw::git_libgit2_shutdown(); } + } +} + +unsafe fn opt_bytes<'a, T>(_anchor: &'a T, + c: *const libc::c_char) -> Option<&'a [u8]> { + if c.is_null() { + None + } else { + Some(CStr::from_ptr(c).to_bytes()) + } +} + +fn opt_cstr(o: Option) -> Result, Error> { + match o { + Some(s) => s.into_c_string().map(Some), + None => Ok(None) + } +} + +impl ObjectType { + /// Convert an object type to its string representation. + pub fn str(&self) -> &'static str { + unsafe { + let ptr = call!(raw::git_object_type2string(*self)) as *const _; + let data = CStr::from_ptr(ptr).to_bytes(); + str::from_utf8(data).unwrap() + } + } + + /// Determine if the given git_otype is a valid loose object type. + pub fn is_loose(&self) -> bool { + unsafe { (call!(raw::git_object_typeisloose(*self)) == 1) } + } + + /// Convert a raw git_otype to an ObjectType + pub fn from_raw(raw: raw::git_otype) -> Option { + match raw { + raw::GIT_OBJ_ANY => Some(ObjectType::Any), + raw::GIT_OBJ_COMMIT => Some(ObjectType::Commit), + raw::GIT_OBJ_TREE => Some(ObjectType::Tree), + raw::GIT_OBJ_BLOB => Some(ObjectType::Blob), + raw::GIT_OBJ_TAG => Some(ObjectType::Tag), + _ => None, + } + } + + /// Convert this kind into its raw representation + pub fn raw(&self) -> raw::git_otype { + call::convert(self) + } + + /// Convert a string object type representation to its object type. + pub fn from_str(s: &str) -> Option { + let raw = unsafe { call!(raw::git_object_string2type(CString::new(s).unwrap())) }; + ObjectType::from_raw(raw) + } +} + +impl fmt::Display for ObjectType { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + self.str().fmt(f) + } +} + +impl ConfigLevel { + /// Converts a raw configuration level to a ConfigLevel + pub fn from_raw(raw: raw::git_config_level_t) -> ConfigLevel { + match raw { + raw::GIT_CONFIG_LEVEL_PROGRAMDATA => ConfigLevel::ProgramData, + raw::GIT_CONFIG_LEVEL_SYSTEM => ConfigLevel::System, + raw::GIT_CONFIG_LEVEL_XDG => ConfigLevel::XDG, + raw::GIT_CONFIG_LEVEL_GLOBAL => ConfigLevel::Global, + raw::GIT_CONFIG_LEVEL_LOCAL => ConfigLevel::Local, + raw::GIT_CONFIG_LEVEL_APP => ConfigLevel::App, + raw::GIT_CONFIG_HIGHEST_LEVEL => ConfigLevel::Highest, + n => panic!("unknown config level: {}", n), + } + } +} + +bitflags! { + /// Status flags for a single file + /// + /// A combination of these values will be returned to indicate the status of + /// a file. Status compares the working directory, the index, and the + /// current HEAD of the repository. The `STATUS_INDEX_*` set of flags + /// represents the status of file in the index relative to the HEAD, and the + /// `STATUS_WT_*` set of flags represent the status of the file in the + /// working directory relative to the index. + flags Status: u32 { + #[allow(missing_docs)] + const STATUS_CURRENT = raw::GIT_STATUS_CURRENT as u32, + + #[allow(missing_docs)] + const STATUS_INDEX_NEW = raw::GIT_STATUS_INDEX_NEW as u32, + #[allow(missing_docs)] + const STATUS_INDEX_MODIFIED = raw::GIT_STATUS_INDEX_MODIFIED as u32, + #[allow(missing_docs)] + const STATUS_INDEX_DELETED = raw::GIT_STATUS_INDEX_DELETED as u32, + #[allow(missing_docs)] + const STATUS_INDEX_RENAMED = raw::GIT_STATUS_INDEX_RENAMED as u32, + #[allow(missing_docs)] + const STATUS_INDEX_TYPECHANGE = raw::GIT_STATUS_INDEX_TYPECHANGE as u32, + + #[allow(missing_docs)] + const STATUS_WT_NEW = raw::GIT_STATUS_WT_NEW as u32, + #[allow(missing_docs)] + const STATUS_WT_MODIFIED = raw::GIT_STATUS_WT_MODIFIED as u32, + #[allow(missing_docs)] + const STATUS_WT_DELETED = raw::GIT_STATUS_WT_DELETED as u32, + #[allow(missing_docs)] + const STATUS_WT_TYPECHANGE = raw::GIT_STATUS_WT_TYPECHANGE as u32, + #[allow(missing_docs)] + const STATUS_WT_RENAMED = raw::GIT_STATUS_WT_RENAMED as u32, + + #[allow(missing_docs)] + const STATUS_IGNORED = raw::GIT_STATUS_IGNORED as u32, + #[allow(missing_docs)] + const STATUS_CONFLICTED = raw::GIT_STATUS_CONFLICTED as u32, + } +} + +bitflags! { + #[doc = " +Mode options for RepositoryInitOptions +"] + flags RepositoryInitMode: u32 { + /// Use permissions configured by umask - the default + const REPOSITORY_INIT_SHARED_UMASK = + raw::GIT_REPOSITORY_INIT_SHARED_UMASK as u32, + /// Use `--shared=group` behavior, chmod'ing the new repo to be + /// group writable and \"g+sx\" for sticky group assignment + const REPOSITORY_INIT_SHARED_GROUP = + raw::GIT_REPOSITORY_INIT_SHARED_GROUP as u32, + /// Use `--shared=all` behavior, adding world readability. + const REPOSITORY_INIT_SHARED_ALL = + raw::GIT_REPOSITORY_INIT_SHARED_ALL as u32, + } +} + +/// What type of change is described by a `DiffDelta`? +#[derive(Copy, Clone, Debug)] +pub enum Delta { + /// No changes + Unmodified, + /// Entry does not exist in old version + Added, + /// Entry does not exist in new version + Deleted, + /// Entry content changed between old and new + Modified, + /// Entry was renamed wbetween old and new + Renamed, + /// Entry was copied from another old entry + Copied, + /// Entry is ignored item in workdir + Ignored, + /// Entry is untracked item in workdir + Untracked, + /// Type of entry changed between old and new + Typechange, + /// Entry is unreadable + Unreadable, + /// Entry in the index is conflicted + Conflicted, +} + +bitflags! { + #[doc = r#" +Return codes for submodule status. + +A combination of these flags will be returned to describe the status of a +submodule. Depending on the "ignore" property of the submodule, some of +the flags may never be returned because they indicate changes that are +supposed to be ignored. + +Submodule info is contained in 4 places: the HEAD tree, the index, config +files (both .git/config and .gitmodules), and the working directory. Any +or all of those places might be missing information about the submodule +depending on what state the repo is in. We consider all four places to +build the combination of status flags. + +There are four values that are not really status, but give basic info +about what sources of submodule data are available. These will be +returned even if ignore is set to "ALL". + +* IN_HEAD - superproject head contains submodule +* IN_INDEX - superproject index contains submodule +* IN_CONFIG - superproject gitmodules has submodule +* IN_WD - superproject workdir has submodule + +The following values will be returned so long as ignore is not "ALL". + +* INDEX_ADDED - in index, not in head +* INDEX_DELETED - in head, not in index +* INDEX_MODIFIED - index and head don't match +* WD_UNINITIALIZED - workdir contains empty directory +* WD_ADDED - in workdir, not index +* WD_DELETED - in index, not workdir +* WD_MODIFIED - index and workdir head don't match + +The following can only be returned if ignore is "NONE" or "UNTRACKED". + +* WD_INDEX_MODIFIED - submodule workdir index is dirty +* WD_WD_MODIFIED - submodule workdir has modified files + +Lastly, the following will only be returned for ignore "NONE". + +* WD_UNTRACKED - wd contains untracked files +"#] + flags SubmoduleStatus: u32 { + #[allow(missing_docs)] + const SUBMODULE_STATUS_IN_HEAD = + raw::GIT_SUBMODULE_STATUS_IN_HEAD as u32, + #[allow(missing_docs)] + const SUBMODULE_STATUS_IN_INDEX = + raw::GIT_SUBMODULE_STATUS_IN_INDEX as u32, + #[allow(missing_docs)] + const SUBMODULE_STATUS_IN_CONFIG = + raw::GIT_SUBMODULE_STATUS_IN_CONFIG as u32, + #[allow(missing_docs)] + const SUBMODULE_STATUS_IN_WD = + raw::GIT_SUBMODULE_STATUS_IN_WD as u32, + #[allow(missing_docs)] + const SUBMODULE_STATUS_INDEX_ADDED = + raw::GIT_SUBMODULE_STATUS_INDEX_ADDED as u32, + #[allow(missing_docs)] + const SUBMODULE_STATUS_INDEX_DELETED = + raw::GIT_SUBMODULE_STATUS_INDEX_DELETED as u32, + #[allow(missing_docs)] + const SUBMODULE_STATUS_INDEX_MODIFIED = + raw::GIT_SUBMODULE_STATUS_INDEX_MODIFIED as u32, + #[allow(missing_docs)] + const SUBMODULE_STATUS_WD_UNINITIALIZED = + raw::GIT_SUBMODULE_STATUS_WD_UNINITIALIZED as u32, + #[allow(missing_docs)] + const SUBMODULE_STATUS_WD_ADDED = + raw::GIT_SUBMODULE_STATUS_WD_ADDED as u32, + #[allow(missing_docs)] + const SUBMODULE_STATUS_WD_DELETED = + raw::GIT_SUBMODULE_STATUS_WD_DELETED as u32, + #[allow(missing_docs)] + const SUBMODULE_STATUS_WD_MODIFIED = + raw::GIT_SUBMODULE_STATUS_WD_MODIFIED as u32, + #[allow(missing_docs)] + const SUBMODULE_STATUS_WD_INDEX_MODIFIED = + raw::GIT_SUBMODULE_STATUS_WD_INDEX_MODIFIED as u32, + #[allow(missing_docs)] + const SUBMODULE_STATUS_WD_WD_MODIFIED = + raw::GIT_SUBMODULE_STATUS_WD_WD_MODIFIED as u32, + #[allow(missing_docs)] + const SUBMODULE_STATUS_WD_UNTRACKED = + raw::GIT_SUBMODULE_STATUS_WD_UNTRACKED as u32, + } + +} + +/// Submodule ignore values +/// +/// These values represent settings for the `submodule.$name.ignore` +/// configuration value which says how deeply to look at the working +/// directory when getting the submodule status. +pub enum SubmoduleIgnore { + /// Use the submodule's configuration + Unspecified, + /// Any change or untracked file is considered dirty + None, + /// Only dirty if tracked files have changed + Untracked, + /// Only dirty if HEAD has moved + Dirty, + /// Never dirty + All, +} + +bitflags! { + /// ... + flags PathspecFlags: u32 { + /// Use the default pathspec matching configuration. + const PATHSPEC_DEFAULT = raw::GIT_PATHSPEC_DEFAULT as u32, + /// Force matching to ignore case, otherwise matching will use native + /// case sensitivity fo the platform filesystem. + const PATHSPEC_IGNORE_CASE = raw::GIT_PATHSPEC_IGNORE_CASE as u32, + /// Force case sensitive matches, otherwise match will use the native + /// case sensitivity of the platform filesystem. + const PATHSPEC_USE_CASE = raw::GIT_PATHSPEC_USE_CASE as u32, + /// Disable glob patterns and just use simple string comparison for + /// matching. + const PATHSPEC_NO_GLOB = raw::GIT_PATHSPEC_NO_GLOB as u32, + /// Means that match functions return the error code `NotFound` if no + /// matches are found. By default no matches is a success. + const PATHSPEC_NO_MATCH_ERROR = raw::GIT_PATHSPEC_NO_MATCH_ERROR as u32, + /// Means that the list returned should track which patterns matched + /// which files so that at the end of the match we can identify patterns + /// that did not match any files. + const PATHSPEC_FIND_FAILURES = raw::GIT_PATHSPEC_FIND_FAILURES as u32, + /// Means that the list returned does not need to keep the actual + /// matching filenames. Use this to just test if there were any matches + /// at all or in combination with `PATHSPEC_FAILURES` to validate a + /// pathspec. + const PATHSPEC_FAILURES_ONLY = raw::GIT_PATHSPEC_FAILURES_ONLY as u32, + } +} + +/// Possible output formats for diff data +#[derive(Copy, Clone)] +pub enum DiffFormat { + /// full git diff + Patch, + /// just the headers of the patch + PatchHeader, + /// like git diff --raw + Raw, + /// like git diff --name-only + NameOnly, + /// like git diff --name-status + NameStatus, +} + +bitflags! { + /// Formatting options for diff stats + flags DiffStatsFormat: raw::git_diff_stats_format_t { + /// Don't generate any stats + const DIFF_STATS_NONE = raw::GIT_DIFF_STATS_NONE, + /// Equivalent of `--stat` in git + const DIFF_STATS_FULL = raw::GIT_DIFF_STATS_FULL, + /// Equivalent of `--shortstat` in git + const DIFF_STATS_SHORT = raw::GIT_DIFF_STATS_SHORT, + /// Equivalent of `--numstat` in git + const DIFF_STATS_NUMBER = raw::GIT_DIFF_STATS_NUMBER, + /// Extended header information such as creations, renames and mode + /// changes, equivalent of `--summary` in git + const DIFF_STATS_INCLUDE_SUMMARY = + raw::GIT_DIFF_STATS_INCLUDE_SUMMARY, + } +} + +/// Automatic tag following options. +pub enum AutotagOption { + /// Use the setting from the remote's configuration + Unspecified, + /// Ask the server for tags pointing to objects we're already downloading + Auto, + /// Don't ask for any tags beyond the refspecs + None, + /// Ask for all the tags + All, +} + +/// Configuration for how pruning is done on a fetch +pub enum FetchPrune { + /// Use the setting from the configuration + Unspecified, + /// Force pruning on + On, + /// Force pruning off + Off, +} + +#[cfg(test)] +mod tests { + use super::ObjectType; + + #[test] + fn convert() { + assert_eq!(ObjectType::Blob.str(), "blob"); + assert_eq!(ObjectType::from_str("blob"), Some(ObjectType::Blob)); + assert!(ObjectType::Blob.is_loose()); + } + +} diff --git a/deps/git2-0.4.2/src/merge.rs b/deps/git2-0.4.3/src/merge.rs similarity index 100% rename from deps/git2-0.4.2/src/merge.rs rename to deps/git2-0.4.3/src/merge.rs diff --git a/deps/git2-0.4.3/src/message.rs b/deps/git2-0.4.3/src/message.rs new file mode 100644 index 000000000..bdfccf651 --- /dev/null +++ b/deps/git2-0.4.3/src/message.rs @@ -0,0 +1,52 @@ +use std::ffi::CString; + +use libc::{c_char, c_int}; + +use {raw, Buf, Error, IntoCString}; +use util::Binding; + +/// Clean up a message, removing extraneous whitespace, and ensure that the +/// message ends with a newline. If comment_char is Some, also remove comment +/// lines starting with that character. +pub fn message_prettify(message: T, comment_char: Option) + -> Result { + _message_prettify(try!(message.into_c_string()), comment_char) +} + +fn _message_prettify(message: CString, comment_char: Option) + -> Result { + let ret = Buf::new(); + unsafe { + try_call!(raw::git_message_prettify(ret.raw(), message, + comment_char.is_some() as c_int, + comment_char.unwrap_or(0) as c_char)); + } + Ok(ret.as_str().unwrap().to_string()) +} + +/// The default comment character for message_prettify ('#') +pub const DEFAULT_COMMENT_CHAR: Option = Some('#' as u8); + +#[cfg(test)] +mod tests { + use {message_prettify, DEFAULT_COMMENT_CHAR}; + + #[test] + fn prettify() { + // This does not attempt to duplicate the extensive tests for + // git_message_prettify in libgit2, just a few representative values to + // make sure the interface works as expected. + assert_eq!(message_prettify("1\n\n\n2", None).unwrap(), + "1\n\n2\n"); + assert_eq!(message_prettify("1\n\n\n2\n\n\n3", None).unwrap(), + "1\n\n2\n\n3\n"); + assert_eq!(message_prettify("1\n# comment\n# more", None).unwrap(), + "1\n# comment\n# more\n"); + assert_eq!(message_prettify("1\n# comment\n# more", + DEFAULT_COMMENT_CHAR).unwrap(), + "1\n"); + assert_eq!(message_prettify("1\n; comment\n; more", + Some(';' as u8)).unwrap(), + "1\n"); + } +} diff --git a/deps/git2-0.4.2/src/note.rs b/deps/git2-0.4.3/src/note.rs similarity index 100% rename from deps/git2-0.4.2/src/note.rs rename to deps/git2-0.4.3/src/note.rs diff --git a/deps/git2-0.4.3/src/object.rs b/deps/git2-0.4.3/src/object.rs new file mode 100644 index 000000000..c7b75e7d4 --- /dev/null +++ b/deps/git2-0.4.3/src/object.rs @@ -0,0 +1,174 @@ +use std::marker; +use std::mem; +use std::ptr; + +use {raw, Oid, ObjectType, Error, Buf, Commit, Tag, Blob, Tree, Repository}; +use {Describe, DescribeOptions}; +use util::Binding; + +/// A structure to represent a git [object][1] +/// +/// [1]: http://git-scm.com/book/en/Git-Internals-Git-Objects +pub struct Object<'repo> { + raw: *mut raw::git_object, + _marker: marker::PhantomData<&'repo Repository>, +} + +impl<'repo> Object<'repo> { + /// Get the id (SHA1) of a repository object + pub fn id(&self) -> Oid { + unsafe { + Binding::from_raw(raw::git_object_id(&*self.raw)) + } + } + + /// Get the object type of an object. + /// + /// If the type is unknown, then `None` is returned. + pub fn kind(&self) -> Option { + ObjectType::from_raw(unsafe { raw::git_object_type(&*self.raw) }) + } + + /// Recursively peel an object until an object of the specified type is met. + /// + /// If you pass `Any` as the target type, then the object will be + /// peeled until the type changes (e.g. a tag will be chased until the + /// referenced object is no longer a tag). + pub fn peel(&self, kind: ObjectType) -> Result, Error> { + let mut raw = 0 as *mut raw::git_object; + unsafe { + try_call!(raw::git_object_peel(&mut raw, &*self.raw(), kind)); + Ok(Binding::from_raw(raw)) + } + } + + /// Get a short abbreviated OID string for the object + /// + /// This starts at the "core.abbrev" length (default 7 characters) and + /// iteratively extends to a longer string if that length is ambiguous. The + /// result will be unambiguous (at least until new objects are added to the + /// repository). + pub fn short_id(&self) -> Result { + unsafe { + let buf = Buf::new(); + try_call!(raw::git_object_short_id(buf.raw(), &*self.raw())); + Ok(buf) + } + } + + /// Attempt to view this object as a commit. + /// + /// Returns `None` if the object is not actually a commit. + pub fn as_commit(&self) -> Option<&Commit<'repo>> { + self.cast(ObjectType::Commit) + } + + /// Attempt to consume this object and return a commit. + /// + /// Returns `Err(self)` if this object is not actually a commit. + pub fn into_commit(self) -> Result, Object<'repo>> { + self.cast_into(ObjectType::Commit) + } + + /// Attempt to view this object as a tag. + /// + /// Returns `None` if the object is not actually a tag. + pub fn as_tag(&self) -> Option<&Tag<'repo>> { + self.cast(ObjectType::Tag) + } + + /// Attempt to consume this object and return a tag. + /// + /// Returns `Err(self)` if this object is not actually a tag. + pub fn into_tag(self) -> Result, Object<'repo>> { + self.cast_into(ObjectType::Tag) + } + + /// Attempt to view this object as a tree. + /// + /// Returns `None` if the object is not actually a tree. + pub fn as_tree(&self) -> Option<&Tree<'repo>> { + self.cast(ObjectType::Tree) + } + + /// Attempt to consume this object and return a tree. + /// + /// Returns `Err(self)` if this object is not actually a tree. + pub fn into_tree(self) -> Result, Object<'repo>> { + self.cast_into(ObjectType::Tree) + } + + /// Attempt to view this object as a blob. + /// + /// Returns `None` if the object is not actually a blob. + pub fn as_blob(&self) -> Option<&Blob<'repo>> { + self.cast(ObjectType::Blob) + } + + /// Attempt to consume this object and return a blob. + /// + /// Returns `Err(self)` if this object is not actually a blob. + pub fn into_blob(self) -> Result, Object<'repo>> { + self.cast_into(ObjectType::Blob) + } + + /// Describes a commit + /// + /// Performs a describe operation on this commitish object. + pub fn describe(&self, opts: &DescribeOptions) + -> Result { + let mut ret = 0 as *mut _; + unsafe { + try_call!(raw::git_describe_commit(&mut ret, self.raw, opts.raw())); + Ok(Binding::from_raw(ret)) + } + } + + fn cast(&self, kind: ObjectType) -> Option<&T> { + assert_eq!(mem::size_of::(), mem::size_of::()); + if self.kind() == Some(kind) { + unsafe { Some(&*(self as *const _ as *const T)) } + } else { + None + } + } + + fn cast_into(self, kind: ObjectType) -> Result> { + assert_eq!(mem::size_of_val(&self), mem::size_of::()); + if self.kind() == Some(kind) { + Ok(unsafe { + let other = ptr::read(&self as *const _ as *const T); + mem::forget(self); + other + }) + } else { + Err(self) + } + } +} + +impl<'repo> Clone for Object<'repo> { + fn clone(&self) -> Object<'repo> { + let mut raw = 0 as *mut raw::git_object; + unsafe { + let rc = raw::git_object_dup(&mut raw, self.raw); + assert_eq!(rc, 0); + Binding::from_raw(raw) + } + } +} + +impl<'repo> Binding for Object<'repo> { + type Raw = *mut raw::git_object; + + unsafe fn from_raw(raw: *mut raw::git_object) -> Object<'repo> { + Object { raw: raw, _marker: marker::PhantomData, } + } + fn raw(&self) -> *mut raw::git_object { self.raw } +} + +impl<'repo> Drop for Object<'repo> { + fn drop(&mut self) { + unsafe { raw::git_object_free(self.raw) } + } +} diff --git a/deps/git2-0.4.2/src/oid.rs b/deps/git2-0.4.3/src/oid.rs similarity index 100% rename from deps/git2-0.4.2/src/oid.rs rename to deps/git2-0.4.3/src/oid.rs diff --git a/deps/git2-0.4.2/src/oid_array.rs b/deps/git2-0.4.3/src/oid_array.rs similarity index 100% rename from deps/git2-0.4.2/src/oid_array.rs rename to deps/git2-0.4.3/src/oid_array.rs diff --git a/deps/git2-0.4.2/src/panic.rs b/deps/git2-0.4.3/src/panic.rs similarity index 100% rename from deps/git2-0.4.2/src/panic.rs rename to deps/git2-0.4.3/src/panic.rs diff --git a/deps/git2-0.4.2/src/pathspec.rs b/deps/git2-0.4.3/src/pathspec.rs similarity index 100% rename from deps/git2-0.4.2/src/pathspec.rs rename to deps/git2-0.4.3/src/pathspec.rs diff --git a/deps/git2-0.4.2/src/reference.rs b/deps/git2-0.4.3/src/reference.rs similarity index 100% rename from deps/git2-0.4.2/src/reference.rs rename to deps/git2-0.4.3/src/reference.rs diff --git a/deps/git2-0.4.2/src/reflog.rs b/deps/git2-0.4.3/src/reflog.rs similarity index 100% rename from deps/git2-0.4.2/src/reflog.rs rename to deps/git2-0.4.3/src/reflog.rs diff --git a/deps/git2-0.4.2/src/refspec.rs b/deps/git2-0.4.3/src/refspec.rs similarity index 100% rename from deps/git2-0.4.2/src/refspec.rs rename to deps/git2-0.4.3/src/refspec.rs diff --git a/deps/git2-0.4.2/src/remote.rs b/deps/git2-0.4.3/src/remote.rs similarity index 100% rename from deps/git2-0.4.2/src/remote.rs rename to deps/git2-0.4.3/src/remote.rs diff --git a/deps/git2-0.4.2/src/remote_callbacks.rs b/deps/git2-0.4.3/src/remote_callbacks.rs similarity index 100% rename from deps/git2-0.4.2/src/remote_callbacks.rs rename to deps/git2-0.4.3/src/remote_callbacks.rs diff --git a/deps/git2-0.4.3/src/repo.rs b/deps/git2-0.4.3/src/repo.rs new file mode 100644 index 000000000..d2901ed69 --- /dev/null +++ b/deps/git2-0.4.3/src/repo.rs @@ -0,0 +1,1993 @@ +use std::env; +use std::ffi::{CStr, CString, OsStr}; +use std::iter::IntoIterator; +use std::mem; +use std::path::Path; +use std::str; +use libc::{c_int, c_char, size_t, c_void, c_uint}; + +use {raw, Revspec, Error, init, Object, RepositoryOpenFlags, RepositoryState, Remote, Buf}; +use {ResetType, Signature, Reference, References, Submodule, Blame, BlameOptions}; +use {Branches, BranchType, Index, Config, Oid, Blob, Branch, Commit, Tree}; +use {AnnotatedCommit, MergeOptions, SubmoduleIgnore, SubmoduleStatus}; +use {ObjectType, Tag, Note, Notes, StatusOptions, Statuses, Status, Revwalk}; +use {RevparseMode, RepositoryInitMode, Reflog, IntoCString, Describe}; +use {DescribeOptions, TreeBuilder, Diff, DiffOptions}; +use build::{RepoBuilder, CheckoutBuilder}; +use string_array::StringArray; +use oid_array::OidArray; +use util::{self, Binding}; + +/// An owned git repository, representing all state associated with the +/// underlying filesystem. +/// +/// This structure corresponds to a `git_repository` in libgit2. Many other +/// types in git2-rs are derivative from this structure and are attached to its +/// lifetime. +/// +/// When a repository goes out of scope it is freed in memory but not deleted +/// from the filesystem. +pub struct Repository { + raw: *mut raw::git_repository, +} + +// It is the current belief that a `Repository` can be sent among threads, or +// even shared among threads in a mutex. +unsafe impl Send for Repository {} + +/// Options which can be used to configure how a repository is initialized +pub struct RepositoryInitOptions { + flags: u32, + mode: u32, + workdir_path: Option, + description: Option, + template_path: Option, + initial_head: Option, + origin_url: Option, +} + +impl Repository { + /// Attempt to open an already-existing repository at `path`. + /// + /// The path can point to either a normal or bare repository. + pub fn open>(path: P) -> Result { + init(); + let path = try!(path.as_ref().into_c_string()); + let mut ret = 0 as *mut raw::git_repository; + unsafe { + try_call!(raw::git_repository_open(&mut ret, path)); + Ok(Binding::from_raw(ret)) + } + } + + /// Find and open an existing repository, with additional options. + /// + /// If flags contains REPOSITORY_OPEN_NO_SEARCH, the path must point + /// directly to a repository; otherwise, this may point to a subdirectory + /// of a repository, and `open_ext` will search up through parent + /// directories. + /// + /// If flags contains REPOSITORY_OPEN_CROSS_FS, the search through parent + /// directories will not cross a filesystem boundary (detected when the + /// stat st_dev field changes). + /// + /// If flags contains REPOSITORY_OPEN_BARE, force opening the repository as + /// bare even if it isn't, ignoring any working directory, and defer + /// loading the repository configuration for performance. + /// + /// ceiling_dirs specifies a list of paths that the search through parent + /// directories will stop before entering. Use the functions in std::env + /// to construct or manipulate such a path list. + pub fn open_ext(path: P, + flags: RepositoryOpenFlags, + ceiling_dirs: I) + -> Result + where P: AsRef, O: AsRef, I: IntoIterator { + init(); + let path = try!(path.as_ref().into_c_string()); + let ceiling_dirs_os = try!(env::join_paths(ceiling_dirs)); + let ceiling_dirs = try!(ceiling_dirs_os.into_c_string()); + let mut ret = 0 as *mut raw::git_repository; + unsafe { + try_call!(raw::git_repository_open_ext(&mut ret, + path, + flags.bits() as c_uint, + ceiling_dirs)); + Ok(Binding::from_raw(ret)) + } + } + + /// Attempt to open an already-existing repository at or above `path` + /// + /// This starts at `path` and looks up the filesystem hierarchy + /// until it finds a repository. + pub fn discover>(path: P) -> Result { + // TODO: this diverges significantly from the libgit2 API + init(); + let buf = Buf::new(); + let path = try!(path.as_ref().into_c_string()); + unsafe { + try_call!(raw::git_repository_discover(buf.raw(), path, 1, + 0 as *const _)); + } + Repository::open(util::bytes2path(&*buf)) + } + + /// Creates a new repository in the specified folder. + /// + /// This by default will create any necessary directories to create the + /// repository, and it will read any user-specified templates when creating + /// the repository. This behavior can be configured through `init_opts`. + pub fn init>(path: P) -> Result { + Repository::init_opts(path, &RepositoryInitOptions::new()) + } + + /// Creates a new `--bare` repository in the specified folder. + /// + /// The folder must exist prior to invoking this function. + pub fn init_bare>(path: P) -> Result { + Repository::init_opts(path, RepositoryInitOptions::new().bare(true)) + } + + /// Creates a new `--bare` repository in the specified folder. + /// + /// The folder must exist prior to invoking this function. + pub fn init_opts>(path: P, opts: &RepositoryInitOptions) + -> Result { + init(); + let path = try!(path.as_ref().into_c_string()); + let mut ret = 0 as *mut raw::git_repository; + unsafe { + let mut opts = opts.raw(); + try_call!(raw::git_repository_init_ext(&mut ret, path, &mut opts)); + Ok(Binding::from_raw(ret)) + } + } + + /// Clone a remote repository. + /// + /// See the `RepoBuilder` struct for more information. This function will + /// delegate to a fresh `RepoBuilder` + pub fn clone>(url: &str, into: P) + -> Result { + ::init(); + RepoBuilder::new().clone(url, into.as_ref()) + } + + /// Execute a rev-parse operation against the `spec` listed. + /// + /// The resulting revision specification is returned, or an error is + /// returned if one occurs. + pub fn revparse(&self, spec: &str) -> Result { + let mut raw = raw::git_revspec { + from: 0 as *mut _, + to: 0 as *mut _, + flags: 0, + }; + let spec = try!(CString::new(spec)); + unsafe { + try_call!(raw::git_revparse(&mut raw, self.raw, spec)); + let to = Binding::from_raw_opt(raw.to); + let from = Binding::from_raw_opt(raw.from); + let mode = RevparseMode::from_bits_truncate(raw.flags as u32); + Ok(Revspec::from_objects(from, to, mode)) + } + } + + /// Find a single object, as specified by a revision string. + pub fn revparse_single(&self, spec: &str) -> Result { + let spec = try!(CString::new(spec)); + let mut obj = 0 as *mut raw::git_object; + unsafe { + try_call!(raw::git_revparse_single(&mut obj, self.raw, spec)); + assert!(!obj.is_null()); + Ok(Binding::from_raw(obj)) + } + } + + /// Find a single object and intermediate reference by a revision string. + /// + /// See `man gitrevisions`, or + /// http://git-scm.com/docs/git-rev-parse.html#_specifying_revisions for + /// information on the syntax accepted. + /// + /// In some cases (`@{<-n>}` or `@{upstream}`), the expression + /// may point to an intermediate reference. When such expressions are being + /// passed in, this intermediate reference is returned. + pub fn revparse_ext(&self, spec: &str) + -> Result<(Object, Option), Error> { + let spec = try!(CString::new(spec)); + let mut git_obj = 0 as *mut raw::git_object; + let mut git_ref = 0 as *mut raw::git_reference; + unsafe { + try_call!(raw::git_revparse_ext(&mut git_obj, &mut git_ref, + self.raw, spec)); + assert!(!git_obj.is_null()); + Ok((Binding::from_raw(git_obj), Binding::from_raw_opt(git_ref))) + } + } + + /// Tests whether this repository is a bare repository or not. + pub fn is_bare(&self) -> bool { + unsafe { raw::git_repository_is_bare(self.raw) == 1 } + } + + /// Tests whether this repository is a shallow clone. + pub fn is_shallow(&self) -> bool { + unsafe { raw::git_repository_is_shallow(self.raw) == 1 } + } + + /// Tests whether this repository is empty. + pub fn is_empty(&self) -> Result { + let empty = unsafe { + try_call!(raw::git_repository_is_empty(self.raw)) + }; + Ok(empty == 1) + } + + /// Returns the path to the `.git` folder for normal repositories or the + /// repository itself for bare repositories. + pub fn path(&self) -> &Path { + unsafe { + let ptr = raw::git_repository_path(self.raw); + util::bytes2path(::opt_bytes(self, ptr).unwrap()) + } + } + + /// Returns the current state of this repository + pub fn state(&self) -> RepositoryState { + let state = unsafe { raw::git_repository_state(self.raw) }; + macro_rules! check( ($($raw:ident => $real:ident),*) => ( + $(if state == raw::$raw as c_int { + super::RepositoryState::$real + }) else * + else { + panic!("unknown repository state: {}", state) + } + ) ); + + check!( + GIT_REPOSITORY_STATE_NONE => Clean, + GIT_REPOSITORY_STATE_MERGE => Merge, + GIT_REPOSITORY_STATE_REVERT => Revert, + GIT_REPOSITORY_STATE_REVERT_SEQUENCE => RevertSequence, + GIT_REPOSITORY_STATE_CHERRYPICK => CherryPick, + GIT_REPOSITORY_STATE_CHERRYPICK_SEQUENCE => CherryPickSequence, + GIT_REPOSITORY_STATE_BISECT => Bisect, + GIT_REPOSITORY_STATE_REBASE => Rebase, + GIT_REPOSITORY_STATE_REBASE_INTERACTIVE => RebaseInteractive, + GIT_REPOSITORY_STATE_REBASE_MERGE => RebaseMerge, + GIT_REPOSITORY_STATE_APPLY_MAILBOX => ApplyMailbox, + GIT_REPOSITORY_STATE_APPLY_MAILBOX_OR_REBASE => ApplyMailboxOrRebase + ) + } + + /// Get the path of the working directory for this repository. + /// + /// If this repository is bare, then `None` is returned. + pub fn workdir(&self) -> Option<&Path> { + unsafe { + let ptr = raw::git_repository_workdir(self.raw); + if ptr.is_null() { + None + } else { + Some(util::bytes2path(CStr::from_ptr(ptr).to_bytes())) + } + } + } + + /// Get the currently active namespace for this repository. + /// + /// If there is no namespace, or the namespace is not a valid utf8 string, + /// `None` is returned. + pub fn namespace(&self) -> Option<&str> { + self.namespace_bytes().and_then(|s| str::from_utf8(s).ok()) + } + + /// Get the currently active namespace for this repository as a byte array. + /// + /// If there is no namespace, `None` is returned. + pub fn namespace_bytes(&self) -> Option<&[u8]> { + unsafe { ::opt_bytes(self, raw::git_repository_get_namespace(self.raw)) } + } + + /// List all remotes for a given repository + pub fn remotes(&self) -> Result { + let mut arr = raw::git_strarray { + strings: 0 as *mut *mut c_char, + count: 0, + }; + unsafe { + try_call!(raw::git_remote_list(&mut arr, self.raw)); + Ok(Binding::from_raw(arr)) + } + } + + /// Get the information for a particular remote + pub fn find_remote(&self, name: &str) -> Result { + let mut ret = 0 as *mut raw::git_remote; + let name = try!(CString::new(name)); + unsafe { + try_call!(raw::git_remote_lookup(&mut ret, self.raw, name)); + Ok(Binding::from_raw(ret)) + } + } + + /// Add a remote with the default fetch refspec to the repository's + /// configuration. + pub fn remote(&self, name: &str, url: &str) -> Result { + let mut ret = 0 as *mut raw::git_remote; + let name = try!(CString::new(name)); + let url = try!(CString::new(url)); + unsafe { + try_call!(raw::git_remote_create(&mut ret, self.raw, name, url)); + Ok(Binding::from_raw(ret)) + } + } + + /// Create an anonymous remote + /// + /// Create a remote with the given url and refspec in memory. You can use + /// this when you have a URL instead of a remote's name. Note that anonymous + /// remotes cannot be converted to persisted remotes. + pub fn remote_anonymous(&self, url: &str) -> Result { + let mut ret = 0 as *mut raw::git_remote; + let url = try!(CString::new(url)); + unsafe { + try_call!(raw::git_remote_create_anonymous(&mut ret, self.raw, url)); + Ok(Binding::from_raw(ret)) + } + } + + /// Give a remote a new name + /// + /// All remote-tracking branches and configuration settings for the remote + /// are updated. + /// + /// A temporary in-memory remote cannot be given a name with this method. + /// + /// No loaded instances of the remote with the old name will change their + /// name or their list of refspecs. + /// + /// The returned array of strings is a list of the non-default refspecs + /// which cannot be renamed and are returned for further processing by the + /// caller. + pub fn remote_rename(&self, name: &str, + new_name: &str) -> Result { + let name = try!(CString::new(name)); + let new_name = try!(CString::new(new_name)); + let mut problems = raw::git_strarray { + count: 0, + strings: 0 as *mut *mut c_char, + }; + unsafe { + try_call!(raw::git_remote_rename(&mut problems, self.raw, name, + new_name)); + Ok(Binding::from_raw(problems)) + } + } + + /// Delete an existing persisted remote. + /// + /// All remote-tracking branches and configuration settings for the remote + /// will be removed. + pub fn remote_delete(&self, name: &str) -> Result<(), Error> { + let name = try!(CString::new(name)); + unsafe { try_call!(raw::git_remote_delete(self.raw, name)); } + Ok(()) + } + + /// Add a fetch refspec to the remote's configuration + /// + /// Add the given refspec to the fetch list in the configuration. No loaded + /// remote instances will be affected. + pub fn remote_add_fetch(&self, name: &str, spec: &str) + -> Result<(), Error> { + let name = try!(CString::new(name)); + let spec = try!(CString::new(spec)); + unsafe { + try_call!(raw::git_remote_add_fetch(self.raw, name, spec)); + } + Ok(()) + } + + /// Add a push refspec to the remote's configuration. + /// + /// Add the given refspec to the push list in the configuration. No + /// loaded remote instances will be affected. + pub fn remote_add_push(&self, name: &str, spec: &str) + -> Result<(), Error> { + let name = try!(CString::new(name)); + let spec = try!(CString::new(spec)); + unsafe { + try_call!(raw::git_remote_add_push(self.raw, name, spec)); + } + Ok(()) + } + + /// Set the remote's url in the configuration + /// + /// Remote objects already in memory will not be affected. This assumes + /// the common case of a single-url remote and will otherwise return an + /// error. + pub fn remote_set_url(&self, name: &str, url: &str) -> Result<(), Error> { + let name = try!(CString::new(name)); + let url = try!(CString::new(url)); + unsafe { try_call!(raw::git_remote_set_url(self.raw, name, url)); } + Ok(()) + } + + /// Set the remote's url for pushing in the configuration. + /// + /// Remote objects already in memory will not be affected. This assumes + /// the common case of a single-url remote and will otherwise return an + /// error. + /// + /// `None` indicates that it should be cleared. + pub fn remote_set_pushurl(&self, name: &str, pushurl: Option<&str>) + -> Result<(), Error> { + let name = try!(CString::new(name)); + let pushurl = try!(::opt_cstr(pushurl)); + unsafe { + try_call!(raw::git_remote_set_pushurl(self.raw, name, pushurl)); + } + Ok(()) + } + + /// Sets the current head to the specified object and optionally resets + /// the index and working tree to match. + /// + /// A soft reset means the head will be moved to the commit. + /// + /// A mixed reset will trigger a soft reset, plus the index will be + /// replaced with the content of the commit tree. + /// + /// A hard reset will trigger a mixed reset and the working directory will + /// be replaced with the content of the index. (Untracked and ignored files + /// will be left alone, however.) + /// + /// The `target` is a commit-ish to which the head should be moved to. The + /// object can either be a commit or a tag, but tags must be derefernceable + /// to a commit. + /// + /// The `checkout` options will only be used for a hard reset. + pub fn reset(&self, + target: &Object, + kind: ResetType, + checkout: Option<&mut CheckoutBuilder>) + -> Result<(), Error> { + unsafe { + let mut opts: raw::git_checkout_options = mem::zeroed(); + try_call!(raw::git_checkout_init_options(&mut opts, + raw::GIT_CHECKOUT_OPTIONS_VERSION)); + let opts = checkout.map(|c| { + c.configure(&mut opts); &mut opts + }); + try_call!(raw::git_reset(self.raw, target.raw(), kind, opts)); + } + Ok(()) + } + + /// Updates some entries in the index from the target commit tree. + /// + /// The scope of the updated entries is determined by the paths being + /// in the iterator provided. + /// + /// Passing a `None` target will result in removing entries in the index + /// matching the provided pathspecs. + pub fn reset_default(&self, + target: Option<&Object>, + paths: I) -> Result<(), Error> + where T: IntoCString, I: IntoIterator, + { + let (_a, _b, mut arr) = try!(::util::iter2cstrs(paths)); + let target = target.map(|t| t.raw()); + unsafe { + try_call!(raw::git_reset_default(self.raw, target, &mut arr)); + } + Ok(()) + } + + /// Retrieve and resolve the reference pointed at by HEAD. + pub fn head(&self) -> Result { + let mut ret = 0 as *mut raw::git_reference; + unsafe { + try_call!(raw::git_repository_head(&mut ret, self.raw)); + Ok(Binding::from_raw(ret)) + } + } + + /// Make the repository HEAD point to the specified reference. + /// + /// If the provided reference points to a tree or a blob, the HEAD is + /// unaltered and an error is returned. + /// + /// If the provided reference points to a branch, the HEAD will point to + /// that branch, staying attached, or become attached if it isn't yet. If + /// the branch doesn't exist yet, no error will be returned. The HEAD will + /// then be attached to an unborn branch. + /// + /// Otherwise, the HEAD will be detached and will directly point to the + /// commit. + pub fn set_head(&self, refname: &str) -> Result<(), Error> { + let refname = try!(CString::new(refname)); + unsafe { + try_call!(raw::git_repository_set_head(self.raw, refname)); + } + Ok(()) + } + + /// Make the repository HEAD directly point to the commit. + /// + /// If the provided committish cannot be found in the repository, the HEAD + /// is unaltered and an error is returned. + /// + /// If the provided commitish cannot be peeled into a commit, the HEAD is + /// unaltered and an error is returned. + /// + /// Otherwise, the HEAD will eventually be detached and will directly point + /// to the peeled commit. + pub fn set_head_detached(&self, commitish: Oid) -> Result<(), Error> { + unsafe { + try_call!(raw::git_repository_set_head_detached(self.raw, + commitish.raw())); + } + Ok(()) + } + + /// Create an iterator for the repo's references + pub fn references(&self) -> Result { + let mut ret = 0 as *mut raw::git_reference_iterator; + unsafe { + try_call!(raw::git_reference_iterator_new(&mut ret, self.raw)); + Ok(Binding::from_raw(ret)) + } + } + + /// Create an iterator for the repo's references that match the specified + /// glob + pub fn references_glob(&self, glob: &str) -> Result { + let mut ret = 0 as *mut raw::git_reference_iterator; + let glob = try!(CString::new(glob)); + unsafe { + try_call!(raw::git_reference_iterator_glob_new(&mut ret, self.raw, + glob)); + + Ok(Binding::from_raw(ret)) + } + } + + /// Load all submodules for this repository and return them. + pub fn submodules(&self) -> Result, Error> { + struct Data<'a, 'b:'a> { + repo: &'b Repository, + ret: &'a mut Vec>, + } + let mut ret = Vec::new(); + + unsafe { + let mut data = Data { + repo: self, + ret: &mut ret, + }; + try_call!(raw::git_submodule_foreach(self.raw, append, + &mut data as *mut _ + as *mut c_void)); + } + + return Ok(ret); + + extern fn append(_repo: *mut raw::git_submodule, + name: *const c_char, + data: *mut c_void) -> c_int { + unsafe { + let data = &mut *(data as *mut Data); + let mut raw = 0 as *mut raw::git_submodule; + let rc = raw::git_submodule_lookup(&mut raw, data.repo.raw(), + name); + assert_eq!(rc, 0); + data.ret.push(Binding::from_raw(raw)); + } + 0 + } + } + + /// Gather file status information and populate the returned structure. + /// + /// Note that if a pathspec is given in the options to filter the + /// status, then the results from rename detection (if you enable it) may + /// not be accurate. To do rename detection properly, this must be called + /// with no pathspec so that all files can be considered. + pub fn statuses(&self, options: Option<&mut StatusOptions>) + -> Result { + let mut ret = 0 as *mut raw::git_status_list; + unsafe { + try_call!(raw::git_status_list_new(&mut ret, self.raw, + options.map(|s| s.raw()) + .unwrap_or(0 as *const _))); + Ok(Binding::from_raw(ret)) + } + } + + /// Test if the ignore rules apply to a given file. + /// + /// This function checks the ignore rules to see if they would apply to the + /// given file. This indicates if the file would be ignored regardless of + /// whether the file is already in the index or committed to the repository. + /// + /// One way to think of this is if you were to do "git add ." on the + /// directory containing the file, would it be added or not? + pub fn status_should_ignore(&self, path: &Path) -> Result { + let mut ret = 0 as c_int; + let path = try!(path.into_c_string()); + unsafe { + try_call!(raw::git_status_should_ignore(&mut ret, self.raw, + path)); + } + Ok(ret != 0) + } + + /// Get file status for a single file. + /// + /// This tries to get status for the filename that you give. If no files + /// match that name (in either the HEAD, index, or working directory), this + /// returns NotFound. + /// + /// If the name matches multiple files (for example, if the path names a + /// directory or if running on a case- insensitive filesystem and yet the + /// HEAD has two entries that both match the path), then this returns + /// Ambiguous because it cannot give correct results. + /// + /// This does not do any sort of rename detection. Renames require a set of + /// targets and because of the path filtering, there is not enough + /// information to check renames correctly. To check file status with rename + /// detection, there is no choice but to do a full `statuses` and scan + /// through looking for the path that you are interested in. + pub fn status_file(&self, path: &Path) -> Result { + let mut ret = 0 as c_uint; + let path = try!(path.into_c_string()); + unsafe { + try_call!(raw::git_status_file(&mut ret, self.raw, + path)); + } + Ok(Status::from_bits_truncate(ret as u32)) + } + + /// Create an iterator which loops over the requested branches. + pub fn branches(&self, filter: Option) + -> Result { + let mut raw = 0 as *mut raw::git_branch_iterator; + unsafe { + try_call!(raw::git_branch_iterator_new(&mut raw, self.raw(), filter)); + Ok(Branches::from_raw(raw)) + } + } + + /// Get the Index file for this repository. + /// + /// If a custom index has not been set, the default index for the repository + /// will be returned (the one located in .git/index). + pub fn index(&self) -> Result { + let mut raw = 0 as *mut raw::git_index; + unsafe { + try_call!(raw::git_repository_index(&mut raw, self.raw())); + Ok(Binding::from_raw(raw)) + } + } + + /// Get the configuration file for this repository. + /// + /// If a configuration file has not been set, the default config set for the + /// repository will be returned, including global and system configurations + /// (if they are available). + pub fn config(&self) -> Result { + let mut raw = 0 as *mut raw::git_config; + unsafe { + try_call!(raw::git_repository_config(&mut raw, self.raw())); + Ok(Binding::from_raw(raw)) + } + } + + /// Write an in-memory buffer to the ODB as a blob. + /// + /// The Oid returned can in turn be passed to `find_blob` to get a handle to + /// the blob. + pub fn blob(&self, data: &[u8]) -> Result { + let mut raw = raw::git_oid { id: [0; raw::GIT_OID_RAWSZ] }; + unsafe { + let ptr = data.as_ptr() as *const c_void; + let len = data.len() as size_t; + try_call!(raw::git_blob_create_frombuffer(&mut raw, self.raw(), + ptr, len)); + Ok(Binding::from_raw(&raw as *const _)) + } + } + + /// Read a file from the filesystem and write its content to the Object + /// Database as a loose blob + /// + /// The Oid returned can in turn be passed to `find_blob` to get a handle to + /// the blob. + pub fn blob_path(&self, path: &Path) -> Result { + let path = try!(path.into_c_string()); + let mut raw = raw::git_oid { id: [0; raw::GIT_OID_RAWSZ] }; + unsafe { + try_call!(raw::git_blob_create_fromdisk(&mut raw, self.raw(), + path)); + Ok(Binding::from_raw(&raw as *const _)) + } + } + + /// Lookup a reference to one of the objects in a repository. + pub fn find_blob(&self, oid: Oid) -> Result { + let mut raw = 0 as *mut raw::git_blob; + unsafe { + try_call!(raw::git_blob_lookup(&mut raw, self.raw(), oid.raw())); + Ok(Binding::from_raw(raw)) + } + } + + /// Create a new branch pointing at a target commit + /// + /// A new direct reference will be created pointing to this target commit. + /// If `force` is true and a reference already exists with the given name, + /// it'll be replaced. + pub fn branch(&self, + branch_name: &str, + target: &Commit, + force: bool) -> Result { + let branch_name = try!(CString::new(branch_name)); + let mut raw = 0 as *mut raw::git_reference; + unsafe { + try_call!(raw::git_branch_create(&mut raw, + self.raw(), + branch_name, + target.raw(), + force)); + Ok(Branch::wrap(Binding::from_raw(raw))) + } + } + + /// Lookup a branch by its name in a repository. + pub fn find_branch(&self, name: &str, branch_type: BranchType) + -> Result { + let name = try!(CString::new(name)); + let mut ret = 0 as *mut raw::git_reference; + unsafe { + try_call!(raw::git_branch_lookup(&mut ret, self.raw(), name, + branch_type)); + Ok(Branch::wrap(Binding::from_raw(ret))) + } + } + + /// Create new commit in the repository + /// + /// If the `update_ref` is not `None`, name of the reference that will be + /// updated to point to this commit. If the reference is not direct, it will + /// be resolved to a direct reference. Use "HEAD" to update the HEAD of the + /// current branch and make it point to this commit. If the reference + /// doesn't exist yet, it will be created. If it does exist, the first + /// parent must be the tip of this branch. + pub fn commit(&self, + update_ref: Option<&str>, + author: &Signature, + committer: &Signature, + message: &str, + tree: &Tree, + parents: &[&Commit]) -> Result { + let update_ref = try!(::opt_cstr(update_ref)); + let mut parent_ptrs = parents.iter().map(|p| { + p.raw() as *const raw::git_commit + }).collect::>(); + let message = try!(CString::new(message)); + let mut raw = raw::git_oid { id: [0; raw::GIT_OID_RAWSZ] }; + unsafe { + try_call!(raw::git_commit_create(&mut raw, + self.raw(), + update_ref, + author.raw(), + committer.raw(), + 0 as *const c_char, + message, + tree.raw(), + parents.len() as size_t, + parent_ptrs.as_mut_ptr())); + Ok(Binding::from_raw(&raw as *const _)) + } + } + + + /// Lookup a reference to one of the commits in a repository. + pub fn find_commit(&self, oid: Oid) -> Result { + let mut raw = 0 as *mut raw::git_commit; + unsafe { + try_call!(raw::git_commit_lookup(&mut raw, self.raw(), oid.raw())); + Ok(Binding::from_raw(raw)) + } + } + + /// Lookup a reference to one of the objects in a repository. + pub fn find_object(&self, oid: Oid, + kind: Option) -> Result { + let mut raw = 0 as *mut raw::git_object; + unsafe { + try_call!(raw::git_object_lookup(&mut raw, self.raw(), oid.raw(), + kind)); + Ok(Binding::from_raw(raw)) + } + } + + /// Create a new direct reference. + /// + /// This function will return an error if a reference already exists with + /// the given name unless force is true, in which case it will be + /// overwritten. + pub fn reference(&self, name: &str, id: Oid, force: bool, + log_message: &str) -> Result { + let name = try!(CString::new(name)); + let log_message = try!(CString::new(log_message)); + let mut raw = 0 as *mut raw::git_reference; + unsafe { + try_call!(raw::git_reference_create(&mut raw, self.raw(), name, + id.raw(), force, + log_message)); + Ok(Binding::from_raw(raw)) + } + } + + /// Create a new symbolic reference. + /// + /// This function will return an error if a reference already exists with + /// the given name unless force is true, in which case it will be + /// overwritten. + pub fn reference_symbolic(&self, name: &str, target: &str, + force: bool, + log_message: &str) + -> Result { + let name = try!(CString::new(name)); + let target = try!(CString::new(target)); + let log_message = try!(CString::new(log_message)); + let mut raw = 0 as *mut raw::git_reference; + unsafe { + try_call!(raw::git_reference_symbolic_create(&mut raw, self.raw(), + name, target, force, + log_message)); + Ok(Binding::from_raw(raw)) + } + } + + /// Lookup a reference to one of the objects in a repository. + pub fn find_reference(&self, name: &str) -> Result { + let name = try!(CString::new(name)); + let mut raw = 0 as *mut raw::git_reference; + unsafe { + try_call!(raw::git_reference_lookup(&mut raw, self.raw(), name)); + Ok(Binding::from_raw(raw)) + } + } + + /// Lookup a reference by name and resolve immediately to OID. + /// + /// This function provides a quick way to resolve a reference name straight + /// through to the object id that it refers to. This avoids having to + /// allocate or free any `Reference` objects for simple situations. + pub fn refname_to_id(&self, name: &str) -> Result { + let name = try!(CString::new(name)); + let mut ret = raw::git_oid { id: [0; raw::GIT_OID_RAWSZ] }; + unsafe { + try_call!(raw::git_reference_name_to_id(&mut ret, self.raw(), name)); + Ok(Binding::from_raw(&ret as *const _)) + } + } + + /// Creates a git_annotated_commit from the given reference. + pub fn reference_to_annotated_commit(&self, reference: &Reference) + -> Result { + let mut ret = 0 as *mut raw::git_annotated_commit; + unsafe { + try_call!(raw::git_annotated_commit_from_ref(&mut ret, + self.raw(), + reference.raw())); + Ok(AnnotatedCommit::from_raw(ret)) + } + } + + /// Create a new action signature with default user and now timestamp. + /// + /// This looks up the user.name and user.email from the configuration and + /// uses the current time as the timestamp, and creates a new signature + /// based on that information. It will return `NotFound` if either the + /// user.name or user.email are not set. + pub fn signature(&self) -> Result, Error> { + let mut ret = 0 as *mut raw::git_signature; + unsafe { + try_call!(raw::git_signature_default(&mut ret, self.raw())); + Ok(Binding::from_raw(ret)) + } + } + + /// Set up a new git submodule for checkout. + /// + /// This does "git submodule add" up to the fetch and checkout of the + /// submodule contents. It preps a new submodule, creates an entry in + /// `.gitmodules` and creates an empty initialized repository either at the + /// given path in the working directory or in `.git/modules` with a gitlink + /// from the working directory to the new repo. + /// + /// To fully emulate "git submodule add" call this function, then `open()` + /// the submodule repo and perform the clone step as needed. Lastly, call + /// `finalize()` to wrap up adding the new submodule and `.gitmodules` to + /// the index to be ready to commit. + pub fn submodule(&self, url: &str, path: &Path, + use_gitlink: bool) -> Result { + let url = try!(CString::new(url)); + let path = try!(path.into_c_string()); + let mut raw = 0 as *mut raw::git_submodule; + unsafe { + try_call!(raw::git_submodule_add_setup(&mut raw, self.raw(), + url, path, use_gitlink)); + Ok(Binding::from_raw(raw)) + } + } + + /// Lookup submodule information by name or path. + /// + /// Given either the submodule name or path (they are usually the same), + /// this returns a structure describing the submodule. + pub fn find_submodule(&self, name: &str) -> Result { + let name = try!(CString::new(name)); + let mut raw = 0 as *mut raw::git_submodule; + unsafe { + try_call!(raw::git_submodule_lookup(&mut raw, self.raw(), name)); + Ok(Binding::from_raw(raw)) + } + } + + /// Get the status for a submodule. + /// + /// This looks at a submodule and tries to determine the status. It + /// will return a combination of the `SubmoduleStatus` values. + pub fn submodule_status(&self, name: &str, ignore: SubmoduleIgnore) + -> Result { + let mut ret = 0; + let name = try!(CString::new(name)); + unsafe { + try_call!(raw::git_submodule_status(&mut ret, self.raw, name, + ignore)); + } + Ok(SubmoduleStatus::from_bits_truncate(ret as u32)) + } + + /// Lookup a reference to one of the objects in a repository. + pub fn find_tree(&self, oid: Oid) -> Result { + let mut raw = 0 as *mut raw::git_tree; + unsafe { + try_call!(raw::git_tree_lookup(&mut raw, self.raw(), oid.raw())); + Ok(Binding::from_raw(raw)) + } + } + + /// Create a new TreeBuilder, optionally initialized with the + /// entries of the given Tree. + /// + /// The tree builder can be used to create or modify trees in memory and + /// write them as tree objects to the database. + pub fn treebuilder(&self, tree: Option<&Tree>) -> Result { + unsafe { + let mut ret = 0 as *mut raw::git_treebuilder; + let tree = match tree { + Some(tree) => tree.raw(), + None => 0 as *mut raw::git_tree, + }; + try_call!(raw::git_treebuilder_new(&mut ret, self.raw, tree)); + Ok(Binding::from_raw(ret)) + } + } + + + /// Create a new tag in the repository from an object + /// + /// A new reference will also be created pointing to this tag object. If + /// `force` is true and a reference already exists with the given name, + /// it'll be replaced. + /// + /// The message will not be cleaned up. + /// + /// The tag name will be checked for validity. You must avoid the characters + /// '~', '^', ':', ' \ ', '?', '[', and '*', and the sequences ".." and " @ + /// {" which have special meaning to revparse. + pub fn tag(&self, name: &str, target: &Object, + tagger: &Signature, message: &str, + force: bool) -> Result { + let name = try!(CString::new(name)); + let message = try!(CString::new(message)); + let mut raw = raw::git_oid { id: [0; raw::GIT_OID_RAWSZ] }; + unsafe { + try_call!(raw::git_tag_create(&mut raw, self.raw, name, + target.raw(), tagger.raw(), + message, force)); + Ok(Binding::from_raw(&raw as *const _)) + } + } + + /// Create a new lightweight tag pointing at a target object + /// + /// A new direct reference will be created pointing to this target object. + /// If force is true and a reference already exists with the given name, + /// it'll be replaced. + pub fn tag_lightweight(&self, + name: &str, + target: &Object, + force: bool) -> Result { + let name = try!(CString::new(name)); + let mut raw = raw::git_oid { id: [0; raw::GIT_OID_RAWSZ] }; + unsafe { + try_call!(raw::git_tag_create_lightweight(&mut raw, self.raw, name, + target.raw(), force)); + Ok(Binding::from_raw(&raw as *const _)) + } + } + + /// Lookup a tag object from the repository. + pub fn find_tag(&self, id: Oid) -> Result { + let mut raw = 0 as *mut raw::git_tag; + unsafe { + try_call!(raw::git_tag_lookup(&mut raw, self.raw, id.raw())); + Ok(Binding::from_raw(raw)) + } + } + + /// Delete an existing tag reference. + /// + /// The tag name will be checked for validity, see `tag` for some rules + /// about valid names. + pub fn tag_delete(&self, name: &str) -> Result<(), Error> { + let name = try!(CString::new(name)); + unsafe { + try_call!(raw::git_tag_delete(self.raw, name)); + Ok(()) + } + } + + /// Get a list with all the tags in the repository. + /// + /// An optional fnmatch pattern can also be specified. + pub fn tag_names(&self, pattern: Option<&str>) -> Result { + let mut arr = raw::git_strarray { + strings: 0 as *mut *mut c_char, + count: 0, + }; + unsafe { + match pattern { + Some(s) => { + let s = try!(CString::new(s)); + try_call!(raw::git_tag_list_match(&mut arr, s, self.raw)); + } + None => { try_call!(raw::git_tag_list(&mut arr, self.raw)); } + } + Ok(Binding::from_raw(arr)) + } + } + + /// Updates files in the index and the working tree to match the content of + /// the commit pointed at by HEAD. + pub fn checkout_head(&self, opts: Option<&mut CheckoutBuilder>) + -> Result<(), Error> { + unsafe { + let mut raw_opts = mem::zeroed(); + try_call!(raw::git_checkout_init_options(&mut raw_opts, + raw::GIT_CHECKOUT_OPTIONS_VERSION)); + if let Some(c) = opts { + c.configure(&mut raw_opts); + } + + try_call!(raw::git_checkout_head(self.raw, &raw_opts)); + } + Ok(()) + } + + /// Updates files in the working tree to match the content of the index. + /// + /// If the index is `None`, the repository's index will be used. + pub fn checkout_index(&self, + index: Option<&mut Index>, + opts: Option<&mut CheckoutBuilder>) -> Result<(), Error> { + unsafe { + let mut raw_opts = mem::zeroed(); + try_call!(raw::git_checkout_init_options(&mut raw_opts, + raw::GIT_CHECKOUT_OPTIONS_VERSION)); + match opts { + Some(c) => c.configure(&mut raw_opts), + None => {} + } + + try_call!(raw::git_checkout_index(self.raw, + index.map(|i| &mut *i.raw()), + &raw_opts)); + } + Ok(()) + } + + /// Updates files in the index and working tree to match the content of the + /// tree pointed at by the treeish. + pub fn checkout_tree(&self, + treeish: &Object, + opts: Option<&mut CheckoutBuilder>) -> Result<(), Error> { + unsafe { + let mut raw_opts = mem::zeroed(); + try_call!(raw::git_checkout_init_options(&mut raw_opts, + raw::GIT_CHECKOUT_OPTIONS_VERSION)); + match opts { + Some(c) => c.configure(&mut raw_opts), + None => {} + } + + try_call!(raw::git_checkout_tree(self.raw, &*treeish.raw(), + &raw_opts)); + } + Ok(()) + } + + /// Merges the given commit(s) into HEAD, writing the results into the + /// working directory. Any changes are staged for commit and any conflicts + /// are written to the index. Callers should inspect the repository's index + /// after this completes, resolve any conflicts and prepare a commit. + /// + /// For compatibility with git, the repository is put into a merging state. + /// Once the commit is done (or if the uses wishes to abort), you should + /// clear this state by calling git_repository_state_cleanup(). + pub fn merge(&self, + annotated_commits: &[&AnnotatedCommit], + merge_opts: Option<&mut MergeOptions>, + checkout_opts: Option<&mut CheckoutBuilder>) + -> Result<(), Error> + { + unsafe { + let mut raw_checkout_opts = mem::zeroed(); + try_call!(raw::git_checkout_init_options(&mut raw_checkout_opts, + raw::GIT_CHECKOUT_OPTIONS_VERSION)); + if let Some(c) = checkout_opts { + c.configure(&mut raw_checkout_opts); + } + + let mut commit_ptrs = annotated_commits.iter().map(|c| { + c.raw() as *const raw::git_annotated_commit + }).collect::>(); + + try_call!(raw::git_merge(self.raw, + commit_ptrs.as_mut_ptr(), + annotated_commits.len() as size_t, + merge_opts.map(|o| o.raw()) + .unwrap_or(0 as *const _), + &raw_checkout_opts)); + } + Ok(()) + } + + /// Merge two commits, producing an index that reflects the result of + /// the merge. The index may be written as-is to the working directory or + /// checked out. If the index is to be converted to a tree, the caller + /// should resolve any conflicts that arose as part of the merge. + pub fn merge_commits(&self, our_commit: &Commit, their_commit: &Commit, + opts: Option<&MergeOptions>) -> Result { + let mut raw = 0 as *mut raw::git_index; + unsafe { + try_call!(raw::git_merge_commits(&mut raw, self.raw, + our_commit.raw(), + their_commit.raw(), + opts.map(|o| o.raw()))); + Ok(Binding::from_raw(raw)) + } + } + + /// Remove all the metadata associated with an ongoing command like merge, + /// revert, cherry-pick, etc. For example: MERGE_HEAD, MERGE_MSG, etc. + pub fn cleanup_state(&self) -> Result<(), Error> { + unsafe { + try_call!(raw::git_repository_state_cleanup(self.raw)); + } + Ok(()) + } + + /// Add a note for an object + /// + /// The `notes_ref` argument is the canonical name of the reference to use, + /// defaulting to "refs/notes/commits". If `force` is specified then + /// previous notes are overwritten. + pub fn note(&self, + author: &Signature, + committer: &Signature, + notes_ref: Option<&str>, + oid: Oid, + note: &str, + force: bool) -> Result { + let notes_ref = try!(::opt_cstr(notes_ref)); + let note = try!(CString::new(note)); + let mut ret = raw::git_oid { id: [0; raw::GIT_OID_RAWSZ] }; + unsafe { + try_call!(raw::git_note_create(&mut ret, + self.raw, + notes_ref, + author.raw(), + committer.raw(), + oid.raw(), + note, + force)); + Ok(Binding::from_raw(&ret as *const _)) + } + } + + /// Get the default notes reference for this repository + pub fn note_default_ref(&self) -> Result { + let ret = Buf::new(); + unsafe { + try_call!(raw::git_note_default_ref(ret.raw(), self.raw)); + } + Ok(str::from_utf8(&ret).unwrap().to_string()) + } + + /// Creates a new iterator for notes in this repository. + /// + /// The `notes_ref` argument is the canonical name of the reference to use, + /// defaulting to "refs/notes/commits". + /// + /// The iterator returned yields pairs of (Oid, Oid) where the first element + /// is the id of the note and the second id is the id the note is + /// annotating. + pub fn notes(&self, notes_ref: Option<&str>) -> Result { + let notes_ref = try!(::opt_cstr(notes_ref)); + let mut ret = 0 as *mut raw::git_note_iterator; + unsafe { + try_call!(raw::git_note_iterator_new(&mut ret, self.raw, notes_ref)); + Ok(Binding::from_raw(ret)) + } + } + + /// Read the note for an object. + /// + /// The `notes_ref` argument is the canonical name of the reference to use, + /// defaulting to "refs/notes/commits". + /// + /// The id specified is the Oid of the git object to read the note from. + pub fn find_note(&self, notes_ref: Option<&str>, id: Oid) + -> Result { + let notes_ref = try!(::opt_cstr(notes_ref)); + let mut ret = 0 as *mut raw::git_note; + unsafe { + try_call!(raw::git_note_read(&mut ret, self.raw, notes_ref, + id.raw())); + Ok(Binding::from_raw(ret)) + } + } + + /// Remove the note for an object. + /// + /// The `notes_ref` argument is the canonical name of the reference to use, + /// defaulting to "refs/notes/commits". + /// + /// The id specified is the Oid of the git object to remove the note from. + pub fn note_delete(&self, + id: Oid, + notes_ref: Option<&str>, + author: &Signature, + committer: &Signature) -> Result<(), Error> { + let notes_ref = try!(::opt_cstr(notes_ref)); + unsafe { + try_call!(raw::git_note_remove(self.raw, notes_ref, author.raw(), + committer.raw(), id.raw())); + Ok(()) + } + } + + /// Create a revwalk that can be used to traverse the commit graph. + pub fn revwalk(&self) -> Result { + let mut raw = 0 as *mut raw::git_revwalk; + unsafe { + try_call!(raw::git_revwalk_new(&mut raw, self.raw())); + Ok(Binding::from_raw(raw)) + } + } + + /// Get the blame for a single file. + pub fn blame_file(&self, path: &Path, opts: Option<&mut BlameOptions>) + -> Result { + let path = try!(path.into_c_string()); + let mut raw = 0 as *mut raw::git_blame; + + unsafe { + try_call!(raw::git_blame_file(&mut raw, + self.raw(), + path, + opts.map(|s| s.raw()))); + Ok(Binding::from_raw(raw)) + } + } + + /// Find a merge base between two commits + pub fn merge_base(&self, one: Oid, two: Oid) -> Result { + let mut raw = raw::git_oid { id: [0; raw::GIT_OID_RAWSZ] }; + unsafe { + try_call!(raw::git_merge_base(&mut raw, self.raw, + one.raw(), two.raw())); + Ok(Binding::from_raw(&raw as *const _)) + } + } + + /// Find all merge bases between two commits + pub fn merge_bases(&self, one: Oid, two: Oid) -> Result { + let mut arr = raw::git_oidarray { + ids: 0 as *mut raw::git_oid, + count: 0, + }; + unsafe { + try_call!(raw::git_merge_bases(&mut arr, self.raw, + one.raw(), two.raw())); + Ok(Binding::from_raw(arr)) + } + } + + + /// Count the number of unique commits between two commit objects + /// + /// There is no need for branches containing the commits to have any + /// upstream relationship, but it helps to think of one as a branch and the + /// other as its upstream, the ahead and behind values will be what git + /// would report for the branches. + pub fn graph_ahead_behind(&self, local: Oid, upstream: Oid) + -> Result<(usize, usize), Error> { + unsafe { + let mut ahead: size_t = 0; + let mut behind: size_t = 0; + try_call!(raw::git_graph_ahead_behind(&mut ahead, &mut behind, + self.raw(), local.raw(), + upstream.raw())); + Ok((ahead as usize, behind as usize)) + } + } + + /// Determine if a commit is the descendant of another commit + pub fn graph_descendant_of(&self, commit: Oid, ancestor: Oid) + -> Result { + unsafe { + let rv = try_call!(raw::git_graph_descendant_of(self.raw(), + commit.raw(), + ancestor.raw())); + Ok(rv != 0) + } + } + + /// Read the reflog for the given reference + /// + /// If there is no reflog file for the given reference yet, an empty reflog + /// object will be returned. + pub fn reflog(&self, name: &str) -> Result { + let name = try!(CString::new(name)); + let mut ret = 0 as *mut raw::git_reflog; + unsafe { + try_call!(raw::git_reflog_read(&mut ret, self.raw, name)); + Ok(Binding::from_raw(ret)) + } + } + + /// Delete the reflog for the given reference + pub fn reflog_delete(&self, name: &str) -> Result<(), Error> { + let name = try!(CString::new(name)); + unsafe { try_call!(raw::git_reflog_delete(self.raw, name)); } + Ok(()) + } + + /// Rename a reflog + /// + /// The reflog to be renamed is expected to already exist. + pub fn reflog_rename(&self, old_name: &str, new_name: &str) + -> Result<(), Error> { + let old_name = try!(CString::new(old_name)); + let new_name = try!(CString::new(new_name)); + unsafe { + try_call!(raw::git_reflog_rename(self.raw, old_name, new_name)); + } + Ok(()) + } + + /// Describes a commit + /// + /// Performs a describe operation on the current commit and the worktree. + /// After performing a describe on HEAD, a status is run and description is + /// considered to be dirty if there are. + pub fn describe(&self, opts: &DescribeOptions) -> Result { + let mut ret = 0 as *mut _; + unsafe { + try_call!(raw::git_describe_workdir(&mut ret, self.raw, opts.raw())); + Ok(Binding::from_raw(ret)) + } + } + + /// Create a diff with the difference between two tree objects. + /// + /// This is equivalent to `git diff ` + /// + /// The first tree will be used for the "old_file" side of the delta and the + /// second tree will be used for the "new_file" side of the delta. You can + /// pass `None` to indicate an empty tree, although it is an error to pass + /// `None` for both the `old_tree` and `new_tree`. + pub fn diff_tree_to_tree(&self, + old_tree: Option<&Tree>, + new_tree: Option<&Tree>, + opts: Option<&mut DiffOptions>) + -> Result { + let mut ret = 0 as *mut raw::git_diff; + unsafe { + try_call!(raw::git_diff_tree_to_tree(&mut ret, + self.raw(), + old_tree.map(|s| s.raw()), + new_tree.map(|s| s.raw()), + opts.map(|s| s.raw()))); + Ok(Binding::from_raw(ret)) + } + } + + /// Create a diff between a tree and repository index. + /// + /// This is equivalent to `git diff --cached ` or if you pass + /// the HEAD tree, then like `git diff --cached`. + /// + /// The tree you pass will be used for the "old_file" side of the delta, and + /// the index will be used for the "new_file" side of the delta. + /// + /// If you pass `None` for the index, then the existing index of the `repo` + /// will be used. In this case, the index will be refreshed from disk + /// (if it has changed) before the diff is generated. + /// + /// If the tree is `None`, then it is considered an empty tree. + pub fn diff_tree_to_index(&self, + old_tree: Option<&Tree>, + index: Option<&Index>, + opts: Option<&mut DiffOptions>) + -> Result { + let mut ret = 0 as *mut raw::git_diff; + unsafe { + try_call!(raw::git_diff_tree_to_index(&mut ret, + self.raw(), + old_tree.map(|s| s.raw()), + index.map(|s| s.raw()), + opts.map(|s| s.raw()))); + Ok(Binding::from_raw(ret)) + } + } + + /// Create a diff between the repository index and the workdir directory. + /// + /// This matches the `git diff` command. See the note below on + /// `tree_to_workdir` for a discussion of the difference between + /// `git diff` and `git diff HEAD` and how to emulate a `git diff ` + /// using libgit2. + /// + /// The index will be used for the "old_file" side of the delta, and the + /// working directory will be used for the "new_file" side of the delta. + /// + /// If you pass `None` for the index, then the existing index of the `repo` + /// will be used. In this case, the index will be refreshed from disk + /// (if it has changed) before the diff is generated. + pub fn diff_index_to_workdir(&self, + index: Option<&Index>, + opts: Option<&mut DiffOptions>) + -> Result { + let mut ret = 0 as *mut raw::git_diff; + unsafe { + try_call!(raw::git_diff_index_to_workdir(&mut ret, + self.raw(), + index.map(|s| s.raw()), + opts.map(|s| s.raw()))); + Ok(Binding::from_raw(ret)) + } + } + + /// Create a diff between a tree and the working directory. + /// + /// The tree you provide will be used for the "old_file" side of the delta, + /// and the working directory will be used for the "new_file" side. + /// + /// This is not the same as `git diff ` or `git diff-index + /// `. Those commands use information from the index, whereas this + /// function strictly returns the differences between the tree and the files + /// in the working directory, regardless of the state of the index. Use + /// `tree_to_workdir_with_index` to emulate those commands. + /// + /// To see difference between this and `tree_to_workdir_with_index`, + /// consider the example of a staged file deletion where the file has then + /// been put back into the working dir and further modified. The + /// tree-to-workdir diff for that file is 'modified', but `git diff` would + /// show status 'deleted' since there is a staged delete. + /// + /// If `None` is passed for `tree`, then an empty tree is used. + pub fn diff_tree_to_workdir(&self, + old_tree: Option<&Tree>, + opts: Option<&mut DiffOptions>) + -> Result { + let mut ret = 0 as *mut raw::git_diff; + unsafe { + try_call!(raw::git_diff_tree_to_workdir(&mut ret, + self.raw(), + old_tree.map(|s| s.raw()), + opts.map(|s| s.raw()))); + Ok(Binding::from_raw(ret)) + } + } + + /// Create a diff between a tree and the working directory using index data + /// to account for staged deletes, tracked files, etc. + /// + /// This emulates `git diff ` by diffing the tree to the index and + /// the index to the working directory and blending the results into a + /// single diff that includes staged deleted, etc. + pub fn diff_tree_to_workdir_with_index(&self, + old_tree: Option<&Tree>, + opts: Option<&mut DiffOptions>) + -> Result { + let mut ret = 0 as *mut raw::git_diff; + unsafe { + try_call!(raw::git_diff_tree_to_workdir_with_index(&mut ret, + self.raw(), old_tree.map(|s| s.raw()), opts.map(|s| s.raw()))); + Ok(Binding::from_raw(ret)) + } + } +} + +impl Binding for Repository { + type Raw = *mut raw::git_repository; + unsafe fn from_raw(ptr: *mut raw::git_repository) -> Repository { + Repository { raw: ptr } + } + fn raw(&self) -> *mut raw::git_repository { self.raw } +} + +impl Drop for Repository { + fn drop(&mut self) { + unsafe { raw::git_repository_free(self.raw) } + } +} + +impl RepositoryInitOptions { + /// Creates a default set of initialization options. + /// + /// By default this will set flags for creating all necessary directories + /// and initializing a directory from the user-configured templates path. + pub fn new() -> RepositoryInitOptions { + RepositoryInitOptions { + flags: raw::GIT_REPOSITORY_INIT_MKDIR as u32 | + raw::GIT_REPOSITORY_INIT_MKPATH as u32 | + raw::GIT_REPOSITORY_INIT_EXTERNAL_TEMPLATE as u32, + mode: 0, + workdir_path: None, + description: None, + template_path: None, + initial_head: None, + origin_url: None, + } + } + + /// Create a bare repository with no working directory. + /// + /// Defaults to false. + pub fn bare(&mut self, bare: bool) -> &mut RepositoryInitOptions { + self.flag(raw::GIT_REPOSITORY_INIT_BARE, bare) + } + + /// Return an error if the repository path appears to already be a git + /// repository. + /// + /// Defaults to false. + pub fn no_reinit(&mut self, enabled: bool) -> &mut RepositoryInitOptions { + self.flag(raw::GIT_REPOSITORY_INIT_NO_REINIT, enabled) + } + + /// Normally a '/.git/' will be appended to the repo apth for non-bare repos + /// (if it is not already there), but passing this flag prevents that + /// behavior. + /// + /// Defaults to false. + pub fn no_dotgit_dir(&mut self, enabled: bool) -> &mut RepositoryInitOptions { + self.flag(raw::GIT_REPOSITORY_INIT_NO_DOTGIT_DIR, enabled) + } + + /// Make the repo path (and workdir path) as needed. The ".git" directory + /// will always be created regardless of this flag. + /// + /// Defaults to true. + pub fn mkdir(&mut self, enabled: bool) -> &mut RepositoryInitOptions { + self.flag(raw::GIT_REPOSITORY_INIT_MKDIR, enabled) + } + + /// Recursively make all components of the repo and workdir path sas + /// necessary. + /// + /// Defaults to true. + pub fn mkpath(&mut self, enabled: bool) -> &mut RepositoryInitOptions { + self.flag(raw::GIT_REPOSITORY_INIT_MKPATH, enabled) + } + + /// Set to one of the `RepositoryInit` constants, or a custom value. + pub fn mode(&mut self, mode: RepositoryInitMode) + -> &mut RepositoryInitOptions { + self.mode = mode.bits(); + self + } + + /// Enable or disable using external templates. + /// + /// If enabled, then the `template_path` option will be queried first, then + /// `init.templatedir` from the global config, and finally + /// `/usr/share/git-core-templates` will be used (if it exists). + /// + /// Defaults to true. + pub fn external_template(&mut self, enabled: bool) + -> &mut RepositoryInitOptions { + self.flag(raw::GIT_REPOSITORY_INIT_EXTERNAL_TEMPLATE, enabled) + } + + fn flag(&mut self, flag: raw::git_repository_init_flag_t, on: bool) + -> &mut RepositoryInitOptions { + if on { + self.flags |= flag as u32; + } else { + self.flags &= !(flag as u32); + } + self + } + + /// The path do the working directory. + /// + /// If this is a relative path it will be evaulated relative to the repo + /// path. If this is not the "natural" working directory, a .git gitlink + /// file will be created here linking to the repo path. + pub fn workdir_path(&mut self, path: &Path) -> &mut RepositoryInitOptions { + self.workdir_path = Some(path.into_c_string().unwrap()); + self + } + + /// If set, this will be used to initialize the "description" file in the + /// repository instead of using the template content. + pub fn description(&mut self, desc: &str) -> &mut RepositoryInitOptions { + self.description = Some(CString::new(desc).unwrap()); + self + } + + /// When the `external_template` option is set, this is the first location + /// to check for the template directory. + /// + /// If this is not configured, then the default locations will be searched + /// instead. + pub fn template_path(&mut self, path: &Path) -> &mut RepositoryInitOptions { + self.template_path = Some(path.into_c_string().unwrap()); + self + } + + /// The name of the head to point HEAD at. + /// + /// If not configured, this will be treated as `master` and the HEAD ref + /// will be set to `refs/heads/master`. If this begins with `refs/` it will + /// be used verbatim; otherwise `refs/heads/` will be prefixed + pub fn initial_head(&mut self, head: &str) -> &mut RepositoryInitOptions { + self.initial_head = Some(CString::new(head).unwrap()); + self + } + + /// If set, then after the rest of the repository initialization is + /// completed an `origin` remote will be added pointing to this URL. + pub fn origin_url(&mut self, url: &str) -> &mut RepositoryInitOptions { + self.origin_url = Some(CString::new(url).unwrap()); + self + } + + /// Creates a set of raw init options to be used with + /// `git_repository_init_ext`. + /// + /// This method is unsafe as the returned value may have pointers to the + /// interior of this structure. + pub unsafe fn raw(&self) -> raw::git_repository_init_options { + let mut opts = mem::zeroed(); + assert_eq!(raw::git_repository_init_init_options(&mut opts, + raw::GIT_REPOSITORY_INIT_OPTIONS_VERSION), 0); + opts.flags = self.flags; + opts.mode = self.mode; + opts.workdir_path = ::call::convert(&self.workdir_path); + opts.description = ::call::convert(&self.description); + opts.template_path = ::call::convert(&self.template_path); + opts.initial_head = ::call::convert(&self.initial_head); + opts.origin_url = ::call::convert(&self.origin_url); + return opts; + } +} + +#[cfg(test)] +mod tests { + use std::ffi::OsStr; + use std::fs; + use std::path::Path; + use tempdir::TempDir; + use {Repository, Oid, ObjectType, ResetType}; + use build::CheckoutBuilder; + + #[test] + fn smoke_init() { + let td = TempDir::new("test").unwrap(); + let path = td.path(); + + let repo = Repository::init(path).unwrap(); + assert!(!repo.is_bare()); + } + + #[test] + fn smoke_init_bare() { + let td = TempDir::new("test").unwrap(); + let path = td.path(); + + let repo = Repository::init_bare(path).unwrap(); + assert!(repo.is_bare()); + assert!(repo.namespace().is_none()); + } + + #[test] + fn smoke_open() { + let td = TempDir::new("test").unwrap(); + let path = td.path(); + Repository::init(td.path()).unwrap(); + let repo = Repository::open(path).unwrap(); + assert!(!repo.is_bare()); + assert!(!repo.is_shallow()); + assert!(repo.is_empty().unwrap()); + assert_eq!(::test::realpath(&repo.path()).unwrap(), + ::test::realpath(&td.path().join(".git/")).unwrap()); + assert_eq!(repo.state(), ::RepositoryState::Clean); + } + + #[test] + fn smoke_open_bare() { + let td = TempDir::new("test").unwrap(); + let path = td.path(); + Repository::init_bare(td.path()).unwrap(); + + let repo = Repository::open(path).unwrap(); + assert!(repo.is_bare()); + assert_eq!(::test::realpath(&repo.path()).unwrap(), + ::test::realpath(&td.path().join("")).unwrap()); + } + + #[test] + fn smoke_checkout() { + let (_td, repo) = ::test::repo_init(); + repo.checkout_head(None).unwrap(); + } + + #[test] + fn smoke_revparse() { + let (_td, repo) = ::test::repo_init(); + let rev = repo.revparse("HEAD").unwrap(); + assert!(rev.to().is_none()); + let from = rev.from().unwrap(); + assert!(rev.from().is_some()); + + assert_eq!(repo.revparse_single("HEAD").unwrap().id(), from.id()); + let obj = repo.find_object(from.id(), None).unwrap().clone(); + obj.peel(ObjectType::Any).unwrap(); + obj.short_id().unwrap(); + repo.reset(&obj, ResetType::Hard, None).unwrap(); + let mut opts = CheckoutBuilder::new(); + t!(repo.reset(&obj, ResetType::Soft, Some(&mut opts))); + } + + #[test] + fn makes_dirs() { + let td = TempDir::new("foo").unwrap(); + Repository::init(&td.path().join("a/b/c/d")).unwrap(); + } + + #[test] + fn smoke_discover() { + let td = TempDir::new("test").unwrap(); + let subdir = td.path().join("subdi"); + fs::create_dir(&subdir).unwrap(); + Repository::init_bare(td.path()).unwrap(); + let repo = Repository::discover(&subdir).unwrap(); + assert_eq!(::test::realpath(&repo.path()).unwrap(), + ::test::realpath(&td.path().join("")).unwrap()); + } + + #[test] + fn smoke_open_ext() { + let td = TempDir::new("test").unwrap(); + let subdir = td.path().join("subdir"); + fs::create_dir(&subdir).unwrap(); + Repository::init(td.path()).unwrap(); + + let repo = Repository::open_ext(&subdir, ::RepositoryOpenFlags::empty(), &[] as &[&OsStr]).unwrap(); + assert!(!repo.is_bare()); + assert_eq!(::test::realpath(&repo.path()).unwrap(), + ::test::realpath(&td.path().join(".git")).unwrap()); + + let repo = Repository::open_ext(&subdir, ::REPOSITORY_OPEN_BARE, &[] as &[&OsStr]).unwrap(); + assert!(repo.is_bare()); + assert_eq!(::test::realpath(&repo.path()).unwrap(), + ::test::realpath(&td.path().join(".git")).unwrap()); + + let err = Repository::open_ext(&subdir, ::REPOSITORY_OPEN_NO_SEARCH, &[] as &[&OsStr]).err().unwrap(); + assert_eq!(err.code(), ::ErrorCode::NotFound); + + let err = Repository::open_ext(&subdir, ::RepositoryOpenFlags::empty(), &[&subdir]).err().unwrap(); + assert_eq!(err.code(), ::ErrorCode::NotFound); + } + + fn graph_repo_init() -> (TempDir, Repository) { + let (_td, repo) = ::test::repo_init(); + { + let head = repo.head().unwrap().target().unwrap(); + let head = repo.find_commit(head).unwrap(); + + let mut index = repo.index().unwrap(); + let id = index.write_tree().unwrap(); + + let tree = repo.find_tree(id).unwrap(); + let sig = repo.signature().unwrap(); + repo.commit(Some("HEAD"), &sig, &sig, "second", + &tree, &[&head]).unwrap(); + } + (_td, repo) + } + + #[test] + fn smoke_graph_ahead_behind() { + let (_td, repo) = graph_repo_init(); + let head = repo.head().unwrap().target().unwrap(); + let head = repo.find_commit(head).unwrap(); + let head_id = head.id(); + let head_parent_id = head.parent(0).unwrap().id(); + let (ahead, behind) = repo.graph_ahead_behind(head_id, + head_parent_id).unwrap(); + assert_eq!(ahead, 1); + assert_eq!(behind, 0); + let (ahead, behind) = repo.graph_ahead_behind(head_parent_id, + head_id).unwrap(); + assert_eq!(ahead, 0); + assert_eq!(behind, 1); + } + + #[test] + fn smoke_graph_descendant_of() { + let (_td, repo) = graph_repo_init(); + let head = repo.head().unwrap().target().unwrap(); + let head = repo.find_commit(head).unwrap(); + let head_id = head.id(); + let head_parent_id = head.parent(0).unwrap().id(); + assert!(repo.graph_descendant_of(head_id, head_parent_id).unwrap()); + assert!(!repo.graph_descendant_of(head_parent_id, head_id).unwrap()); + } + + #[test] + fn smoke_set_head() { + let (_td, repo) = ::test::repo_init(); + + assert!(repo.set_head("refs/heads/does-not-exist").is_ok()); + assert!(repo.head().is_err()); + + assert!(repo.set_head("refs/heads/master").is_ok()); + assert!(repo.head().is_ok()); + + assert!(repo.set_head("*").is_err()); + } + + #[test] + fn smoke_set_head_detached() { + let (_td, repo) = ::test::repo_init(); + + let void_oid = Oid::from_bytes(b"00000000000000000000").unwrap(); + assert!(repo.set_head_detached(void_oid).is_err()); + + let master_oid = repo.revparse_single("master").unwrap().id(); + assert!(repo.set_head_detached(master_oid).is_ok()); + assert_eq!(repo.head().unwrap().target().unwrap(), master_oid); + } + + /// create an octopus: + /// /---o2-o4 + /// o1 X + /// \---o3-o5 + /// and checks that the merge bases of (o4,o5) are (o2,o3) + #[test] + fn smoke_merge_bases() { + let (_td, repo) = graph_repo_init(); + let sig = repo.signature().unwrap(); + + // let oid1 = head + let oid1 = repo.head().unwrap().target().unwrap(); + let commit1 = repo.find_commit(oid1).unwrap(); + println!("created oid1 {:?}", oid1); + + repo.branch("branch_a", &commit1, true).unwrap(); + repo.branch("branch_b", &commit1, true).unwrap(); + + // create commit oid2 on branchA + let mut index = repo.index().unwrap(); + let p = Path::new(repo.workdir().unwrap()).join("file_a"); + println!("using path {:?}", p); + fs::File::create(&p).unwrap(); + index.add_path(Path::new("file_a")).unwrap(); + let id_a = index.write_tree().unwrap(); + let tree_a = repo.find_tree(id_a).unwrap(); + let oid2 = repo.commit(Some("refs/heads/branch_a"), &sig, &sig, + "commit 2", &tree_a, &[&commit1]).unwrap(); + let commit2 = repo.find_commit(oid2).unwrap(); + println!("created oid2 {:?}", oid2); + + // create commit oid3 on branchB + let mut index = repo.index().unwrap(); + let p = Path::new(repo.workdir().unwrap()).join("file_b"); + fs::File::create(&p).unwrap(); + index.add_path(Path::new("file_b")).unwrap(); + let id_b = index.write_tree().unwrap(); + let tree_b = repo.find_tree(id_b).unwrap(); + let oid3 = repo.commit(Some("refs/heads/branch_b"), &sig, &sig, + "commit 3", &tree_b, &[&commit1]).unwrap(); + let commit3 = repo.find_commit(oid3).unwrap(); + println!("created oid3 {:?}", oid3); + + // create merge commit oid4 on branchA with parents oid2 and oid3 + //let mut index4 = repo.merge_commits(&commit2, &commit3, None).unwrap(); + repo.set_head("refs/heads/branch_a").unwrap(); + repo.checkout_head(None).unwrap(); + let oid4 = repo.commit(Some("refs/heads/branch_a"), &sig, &sig, + "commit 4", &tree_a, + &[&commit2, &commit3]).unwrap(); + //index4.write_tree_to(&repo).unwrap(); + println!("created oid4 {:?}", oid4); + + // create merge commit oid5 on branchB with parents oid2 and oid3 + //let mut index5 = repo.merge_commits(&commit3, &commit2, None).unwrap(); + repo.set_head("refs/heads/branch_b").unwrap(); + repo.checkout_head(None).unwrap(); + let oid5 = repo.commit(Some("refs/heads/branch_b"), &sig, &sig, + "commit 5", &tree_a, + &[&commit3, &commit2]).unwrap(); + //index5.write_tree_to(&repo).unwrap(); + println!("created oid5 {:?}", oid5); + + // merge bases of (oid4,oid5) should be (oid2,oid3) + let merge_bases = repo.merge_bases(oid4, oid5).unwrap(); + let mut found_oid2 = false; + let mut found_oid3 = false; + for mg in merge_bases.iter() { + println!("found merge base {:?}", mg); + if mg == &oid2 { + found_oid2 = true; + } else if mg == &oid3 { + found_oid3 = true; + } else { + assert!(false); + } + } + assert!(found_oid2); + assert!(found_oid3); + assert_eq!(merge_bases.len(), 2); + } + + #[test] + fn smoke_revparse_ext() { + let (_td, repo) = graph_repo_init(); + + { + let short_refname = "master"; + let expected_refname = "refs/heads/master"; + let (obj, reference) = repo.revparse_ext(short_refname).unwrap(); + let expected_obj = repo.revparse_single(expected_refname).unwrap(); + assert_eq!(obj.id(), expected_obj.id()); + assert_eq!(reference.unwrap().name().unwrap(), expected_refname); + } + { + let missing_refname = "refs/heads/does-not-exist"; + assert!(repo.revparse_ext(missing_refname).is_err()); + } + { + let (_obj, reference) = repo.revparse_ext("HEAD^").unwrap(); + assert!(reference.is_none()); + } + } +} diff --git a/deps/git2-0.4.2/src/revspec.rs b/deps/git2-0.4.3/src/revspec.rs similarity index 100% rename from deps/git2-0.4.2/src/revspec.rs rename to deps/git2-0.4.3/src/revspec.rs diff --git a/deps/git2-0.4.2/src/revwalk.rs b/deps/git2-0.4.3/src/revwalk.rs similarity index 100% rename from deps/git2-0.4.2/src/revwalk.rs rename to deps/git2-0.4.3/src/revwalk.rs diff --git a/deps/git2-0.4.2/src/signature.rs b/deps/git2-0.4.3/src/signature.rs similarity index 100% rename from deps/git2-0.4.2/src/signature.rs rename to deps/git2-0.4.3/src/signature.rs diff --git a/deps/git2-0.4.2/src/status.rs b/deps/git2-0.4.3/src/status.rs similarity index 100% rename from deps/git2-0.4.2/src/status.rs rename to deps/git2-0.4.3/src/status.rs diff --git a/deps/git2-0.4.2/src/string_array.rs b/deps/git2-0.4.3/src/string_array.rs similarity index 100% rename from deps/git2-0.4.2/src/string_array.rs rename to deps/git2-0.4.3/src/string_array.rs diff --git a/deps/git2-0.4.2/src/submodule.rs b/deps/git2-0.4.3/src/submodule.rs similarity index 100% rename from deps/git2-0.4.2/src/submodule.rs rename to deps/git2-0.4.3/src/submodule.rs diff --git a/deps/git2-0.4.3/src/tag.rs b/deps/git2-0.4.3/src/tag.rs new file mode 100644 index 000000000..85739748d --- /dev/null +++ b/deps/git2-0.4.3/src/tag.rs @@ -0,0 +1,173 @@ +use std::marker; +use std::mem; +use std::str; + +use {raw, signature, Error, Oid, Object, Signature, ObjectType}; +use util::Binding; + +/// A structure to represent a git [tag][1] +/// +/// [1]: http://git-scm.com/book/en/Git-Basics-Tagging +pub struct Tag<'repo> { + raw: *mut raw::git_tag, + _marker: marker::PhantomData>, +} + +impl<'repo> Tag<'repo> { + /// Get the id (SHA1) of a repository tag + pub fn id(&self) -> Oid { + unsafe { Binding::from_raw(raw::git_tag_id(&*self.raw)) } + } + + /// Get the message of a tag + /// + /// Returns None if there is no message or if it is not valid utf8 + pub fn message(&self) -> Option<&str> { + self.message_bytes().and_then(|s| str::from_utf8(s).ok()) + } + + /// Get the message of a tag + /// + /// Returns None if there is no message + pub fn message_bytes(&self) -> Option<&[u8]> { + unsafe { ::opt_bytes(self, raw::git_tag_message(&*self.raw)) } + } + + /// Get the name of a tag + /// + /// Returns None if it is not valid utf8 + pub fn name(&self) -> Option<&str> { + str::from_utf8(self.name_bytes()).ok() + } + + /// Get the name of a tag + pub fn name_bytes(&self) -> &[u8] { + unsafe { ::opt_bytes(self, raw::git_tag_name(&*self.raw)).unwrap() } + } + + /// Recursively peel a tag until a non tag git_object is found + pub fn peel(&self) -> Result, Error> { + let mut ret = 0 as *mut raw::git_object; + unsafe { + try_call!(raw::git_tag_peel(&mut ret, &*self.raw)); + Ok(Binding::from_raw(ret)) + } + } + + /// Get the tagger (author) of a tag + /// + /// If the author is unspecified, then `None` is returned. + pub fn tagger(&self) -> Option { + unsafe { + let ptr = raw::git_tag_tagger(&*self.raw); + if ptr.is_null() { + None + } else { + Some(signature::from_raw_const(self, ptr)) + } + } + } + + /// Get the tagged object of a tag + /// + /// This method performs a repository lookup for the given object and + /// returns it + pub fn target(&self) -> Result, Error> { + let mut ret = 0 as *mut raw::git_object; + unsafe { + try_call!(raw::git_tag_target(&mut ret, &*self.raw)); + Ok(Binding::from_raw(ret)) + } + } + + /// Get the OID of the tagged object of a tag + pub fn target_id(&self) -> Oid { + unsafe { Binding::from_raw(raw::git_tag_target_id(&*self.raw)) } + } + + /// Get the OID of the tagged object of a tag + pub fn target_type(&self) -> Option { + unsafe { ObjectType::from_raw(raw::git_tag_target_type(&*self.raw)) } + } + + /// Casts this Tag to be usable as an `Object` + pub fn as_object(&self) -> &Object<'repo> { + unsafe { + &*(self as *const _ as *const Object<'repo>) + } + } + + /// Consumes Tag to be returned as an `Object` + pub fn into_object(self) -> Object<'repo> { + assert_eq!(mem::size_of_val(&self), mem::size_of::()); + unsafe { + mem::transmute(self) + } + } +} + +impl<'repo> Binding for Tag<'repo> { + type Raw = *mut raw::git_tag; + unsafe fn from_raw(raw: *mut raw::git_tag) -> Tag<'repo> { + Tag { raw: raw, _marker: marker::PhantomData } + } + fn raw(&self) -> *mut raw::git_tag { self.raw } +} + +impl<'repo> Drop for Tag<'repo> { + fn drop(&mut self) { + unsafe { raw::git_tag_free(self.raw) } + } +} + +#[cfg(test)] +mod tests { + #[test] + fn smoke() { + let (_td, repo) = ::test::repo_init(); + let head = repo.head().unwrap(); + let id = head.target().unwrap(); + assert!(repo.find_tag(id).is_err()); + + let obj = repo.find_object(id, None).unwrap(); + let sig = repo.signature().unwrap(); + let tag_id = repo.tag("foo", &obj, &sig, "msg", false).unwrap(); + let tag = repo.find_tag(tag_id).unwrap(); + assert_eq!(tag.id(), tag_id); + + let tags = repo.tag_names(None).unwrap(); + assert_eq!(tags.len(), 1); + assert_eq!(tags.get(0), Some("foo")); + + assert_eq!(tag.name(), Some("foo")); + assert_eq!(tag.message(), Some("msg")); + assert_eq!(tag.peel().unwrap().id(), obj.id()); + assert_eq!(tag.target_id(), obj.id()); + assert_eq!(tag.target_type(), Some(::ObjectType::Commit)); + + assert_eq!(tag.tagger().unwrap().name(), sig.name()); + tag.target().unwrap(); + tag.into_object(); + + repo.find_object(tag_id, None).unwrap().as_tag().unwrap(); + repo.find_object(tag_id, None).unwrap().into_tag().ok().unwrap(); + + repo.tag_delete("foo").unwrap(); + } + + #[test] + fn lite() { + let (_td, repo) = ::test::repo_init(); + let head = t!(repo.head()); + let id = head.target().unwrap(); + let obj = t!(repo.find_object(id, None)); + let tag_id = t!(repo.tag_lightweight("foo", &obj, false)); + assert!(repo.find_tag(tag_id).is_err()); + assert_eq!(t!(repo.refname_to_id("refs/tags/foo")), id); + + let tags = t!(repo.tag_names(Some("f*"))); + assert_eq!(tags.len(), 1); + let tags = t!(repo.tag_names(Some("b*"))); + assert_eq!(tags.len(), 0); + } +} diff --git a/deps/git2-0.4.2/src/test.rs b/deps/git2-0.4.3/src/test.rs similarity index 100% rename from deps/git2-0.4.2/src/test.rs rename to deps/git2-0.4.3/src/test.rs diff --git a/deps/git2-0.4.2/src/time.rs b/deps/git2-0.4.3/src/time.rs similarity index 100% rename from deps/git2-0.4.2/src/time.rs rename to deps/git2-0.4.3/src/time.rs diff --git a/deps/git2-0.4.2/src/transport.rs b/deps/git2-0.4.3/src/transport.rs similarity index 100% rename from deps/git2-0.4.2/src/transport.rs rename to deps/git2-0.4.3/src/transport.rs diff --git a/deps/git2-0.4.3/src/tree.rs b/deps/git2-0.4.3/src/tree.rs new file mode 100644 index 000000000..27231adc0 --- /dev/null +++ b/deps/git2-0.4.3/src/tree.rs @@ -0,0 +1,388 @@ +use std::mem; +use std::cmp::Ordering; +use std::ffi::CString; +use std::ops::Range; +use std::marker; +use std::path::Path; +use std::str; +use libc; + +use {raw, Oid, Repository, Error, Object, ObjectType}; +use util::{Binding, IntoCString}; + +/// A structure to represent a git [tree][1] +/// +/// [1]: http://git-scm.com/book/en/Git-Internals-Git-Objects +pub struct Tree<'repo> { + raw: *mut raw::git_tree, + _marker: marker::PhantomData>, +} + +/// A structure representing an entry inside of a tree. An entry is borrowed +/// from a tree. +pub struct TreeEntry<'tree> { + raw: *mut raw::git_tree_entry, + owned: bool, + _marker: marker::PhantomData<&'tree raw::git_tree_entry>, +} + +/// An iterator over the entries in a tree. +pub struct TreeIter<'tree> { + range: Range, + tree: &'tree Tree<'tree>, +} + +impl<'repo> Tree<'repo> { + /// Get the id (SHA1) of a repository object + pub fn id(&self) -> Oid { + unsafe { Binding::from_raw(raw::git_tree_id(&*self.raw)) } + } + + /// Get the number of entries listed in this tree. + pub fn len(&self) -> usize { + unsafe { raw::git_tree_entrycount(&*self.raw) as usize } + } + + /// Returns an iterator over the entries in this tree. + pub fn iter(&self) -> TreeIter { + TreeIter { range: 0..self.len(), tree: self } + } + + /// Lookup a tree entry by SHA value. + pub fn get_id(&self, id: Oid) -> Option { + unsafe { + let ptr = raw::git_tree_entry_byid(&*self.raw(), &*id.raw()); + if ptr.is_null() { + None + } else { + Some(entry_from_raw_const(ptr)) + } + } + } + + /// Lookup a tree entry by its position in the tree + pub fn get(&self, n: usize) -> Option { + unsafe { + let ptr = raw::git_tree_entry_byindex(&*self.raw(), + n as libc::size_t); + if ptr.is_null() { + None + } else { + Some(entry_from_raw_const(ptr)) + } + } + } + + /// Lookup a tree entry by its filename + pub fn get_name(&self, filename: &str) -> Option { + let filename = CString::new(filename).unwrap(); + unsafe { + let ptr = call!(raw::git_tree_entry_byname(&*self.raw(), filename)); + if ptr.is_null() { + None + } else { + Some(entry_from_raw_const(ptr)) + } + } + } + + /// Retrieve a tree entry contained in a tree or in any of its subtrees, + /// given its relative path. + pub fn get_path(&self, path: &Path) -> Result, Error> { + let path = try!(path.into_c_string()); + let mut ret = 0 as *mut raw::git_tree_entry; + unsafe { + try_call!(raw::git_tree_entry_bypath(&mut ret, &*self.raw(), path)); + Ok(Binding::from_raw(ret)) + } + } + + /// Casts this Tree to be usable as an `Object` + pub fn as_object(&self) -> &Object<'repo> { + unsafe { + &*(self as *const _ as *const Object<'repo>) + } + } + + /// Consumes Commit to be returned as an `Object` + pub fn into_object(self) -> Object<'repo> { + assert_eq!(mem::size_of_val(&self), mem::size_of::()); + unsafe { + mem::transmute(self) + } + } +} + +impl<'repo> Binding for Tree<'repo> { + type Raw = *mut raw::git_tree; + + unsafe fn from_raw(raw: *mut raw::git_tree) -> Tree<'repo> { + Tree { raw: raw, _marker: marker::PhantomData } + } + fn raw(&self) -> *mut raw::git_tree { self.raw } +} + +impl<'repo> Drop for Tree<'repo> { + fn drop(&mut self) { + unsafe { raw::git_tree_free(self.raw) } + } +} + +impl<'repo, 'iter> IntoIterator for &'iter Tree<'repo> { + type Item = TreeEntry<'iter>; + type IntoIter = TreeIter<'iter>; + fn into_iter(self) -> Self::IntoIter { + self.iter() + } +} + +/// Create a new tree entry from the raw pointer provided. +/// +/// The lifetime of the entry is tied to the tree provided and the function +/// is unsafe because the validity of the pointer cannot be guaranteed. +pub unsafe fn entry_from_raw_const<'tree>(raw: *const raw::git_tree_entry) + -> TreeEntry<'tree> { + TreeEntry { + raw: raw as *mut raw::git_tree_entry, + owned: false, + _marker: marker::PhantomData, + } +} + +impl<'tree> TreeEntry<'tree> { + /// Get the id of the object pointed by the entry + pub fn id(&self) -> Oid { + unsafe { Binding::from_raw(raw::git_tree_entry_id(&*self.raw)) } + } + + /// Get the filename of a tree entry + /// + /// Returns `None` if the name is not valid utf-8 + pub fn name(&self) -> Option<&str> { + str::from_utf8(self.name_bytes()).ok() + } + + /// Get the filename of a tree entry + pub fn name_bytes(&self) -> &[u8] { + unsafe { + ::opt_bytes(self, raw::git_tree_entry_name(&*self.raw())).unwrap() + } + } + + /// Convert a tree entry to the object it points to. + pub fn to_object<'a>(&self, repo: &'a Repository) + -> Result, Error> { + let mut ret = 0 as *mut raw::git_object; + unsafe { + try_call!(raw::git_tree_entry_to_object(&mut ret, repo.raw(), + &*self.raw())); + Ok(Binding::from_raw(ret)) + } + } + + /// Get the type of the object pointed by the entry + pub fn kind(&self) -> Option { + ObjectType::from_raw(unsafe { raw::git_tree_entry_type(&*self.raw) }) + } + + /// Get the UNIX file attributes of a tree entry + pub fn filemode(&self) -> i32 { + unsafe { raw::git_tree_entry_filemode(&*self.raw) as i32 } + } + + /// Get the raw UNIX file attributes of a tree entry + pub fn filemode_raw(&self) -> i32 { + unsafe { raw::git_tree_entry_filemode_raw(&*self.raw) as i32 } + } + + /// Convert this entry of any lifetime into an owned signature with a static + /// lifetime. + /// + /// This will use the `Clone::clone` implementation under the hood. + pub fn to_owned(&self) -> TreeEntry<'static> { + unsafe { + let me = mem::transmute::<&TreeEntry<'tree>, &TreeEntry<'static>>(self); + me.clone() + } + } +} + +impl<'a> Binding for TreeEntry<'a> { + type Raw = *mut raw::git_tree_entry; + unsafe fn from_raw(raw: *mut raw::git_tree_entry) -> TreeEntry<'a> { + TreeEntry { + raw: raw, + owned: true, + _marker: marker::PhantomData, + } + } + fn raw(&self) -> *mut raw::git_tree_entry { self.raw } +} + +impl<'a> Clone for TreeEntry<'a> { + fn clone(&self) -> TreeEntry<'a> { + let mut ret = 0 as *mut raw::git_tree_entry; + unsafe { + assert_eq!(raw::git_tree_entry_dup(&mut ret, &*self.raw()), 0); + Binding::from_raw(ret) + } + } +} + +impl<'a> PartialOrd for TreeEntry<'a> { + fn partial_cmp(&self, other: &TreeEntry<'a>) -> Option { + Some(self.cmp(other)) + } +} +impl<'a> Ord for TreeEntry<'a> { + fn cmp(&self, other: &TreeEntry<'a>) -> Ordering { + match unsafe { raw::git_tree_entry_cmp(&*self.raw(), &*other.raw()) } { + 0 => Ordering::Equal, + n if n < 0 => Ordering::Less, + _ => Ordering::Greater, + } + } +} + +impl<'a> PartialEq for TreeEntry<'a> { + fn eq(&self, other: &TreeEntry<'a>) -> bool { + self.cmp(other) == Ordering::Equal + } +} +impl<'a> Eq for TreeEntry<'a> {} + +impl<'a> Drop for TreeEntry<'a> { + fn drop(&mut self) { + if self.owned { + unsafe { raw::git_tree_entry_free(self.raw) } + } + } +} + +impl<'tree> Iterator for TreeIter<'tree> { + type Item = TreeEntry<'tree>; + fn next(&mut self) -> Option> { + self.range.next().and_then(|i| self.tree.get(i)) + } + fn size_hint(&self) -> (usize, Option) { self.range.size_hint() } +} +impl<'tree> DoubleEndedIterator for TreeIter<'tree> { + fn next_back(&mut self) -> Option> { + self.range.next_back().and_then(|i| self.tree.get(i)) + } +} +impl<'tree> ExactSizeIterator for TreeIter<'tree> {} + +#[cfg(test)] +mod tests { + use {Repository,Tree,TreeEntry,ObjectType,Object}; + use tempdir::TempDir; + use std::fs::File; + use std::io::prelude::*; + use std::path::Path; + + pub struct TestTreeIter<'a> { + entries: Vec>, + repo: &'a Repository, + } + + impl<'a> Iterator for TestTreeIter<'a> { + type Item = TreeEntry<'a>; + + fn next(&mut self) -> Option > { + if self.entries.is_empty() { + None + } else { + let entry = self.entries.remove(0); + + match entry.kind() { + Some(ObjectType::Tree) => { + let obj: Object<'a> = entry.to_object(self.repo).unwrap(); + + let tree: &Tree<'a> = obj.as_tree().unwrap(); + + for entry in tree.iter() { + self.entries.push(entry.to_owned()); + } + } + _ => {} + } + + Some(entry) + } + } + } + + fn tree_iter<'repo>(tree: &Tree<'repo>, repo: &'repo Repository) + -> TestTreeIter<'repo> { + let mut initial = vec![]; + + for entry in tree.iter() { + initial.push(entry.to_owned()); + } + + TestTreeIter { + entries: initial, + repo: repo, + } + } + + #[test] + fn smoke_tree_iter() { + let (td, repo) = ::test::repo_init(); + + setup_repo(&td, &repo); + + let head = repo.head().unwrap(); + let target = head.target().unwrap(); + let commit = repo.find_commit(target).unwrap(); + + let tree = repo.find_tree(commit.tree_id()).unwrap(); + assert_eq!(tree.id(), commit.tree_id()); + assert_eq!(tree.len(), 1); + + for entry in tree_iter(&tree, &repo) { + println!("iter entry {:?}", entry.name()); + } + } + + fn setup_repo(td: &TempDir, repo: &Repository) { + let mut index = repo.index().unwrap(); + File::create(&td.path().join("foo")).unwrap().write_all(b"foo").unwrap(); + index.add_path(Path::new("foo")).unwrap(); + let id = index.write_tree().unwrap(); + let sig = repo.signature().unwrap(); + let tree = repo.find_tree(id).unwrap(); + let parent = repo.find_commit(repo.head().unwrap().target() + .unwrap()).unwrap(); + repo.commit(Some("HEAD"), &sig, &sig, "another commit", + &tree, &[&parent]).unwrap(); + } + + #[test] + fn smoke() { + let (td, repo) = ::test::repo_init(); + + setup_repo(&td, &repo); + + let head = repo.head().unwrap(); + let target = head.target().unwrap(); + let commit = repo.find_commit(target).unwrap(); + + let tree = repo.find_tree(commit.tree_id()).unwrap(); + assert_eq!(tree.id(), commit.tree_id()); + assert_eq!(tree.len(), 1); + { + let e1 = tree.get(0).unwrap(); + assert!(e1 == tree.get_id(e1.id()).unwrap()); + assert!(e1 == tree.get_name("foo").unwrap()); + assert!(e1 == tree.get_path(Path::new("foo")).unwrap()); + assert_eq!(e1.name(), Some("foo")); + e1.to_object(&repo).unwrap(); + } + tree.into_object(); + + repo.find_object(commit.tree_id(), None).unwrap().as_tree().unwrap(); + repo.find_object(commit.tree_id(), None).unwrap().into_tree().ok().unwrap(); + } +} diff --git a/deps/git2-0.4.2/src/treebuilder.rs b/deps/git2-0.4.3/src/treebuilder.rs similarity index 100% rename from deps/git2-0.4.2/src/treebuilder.rs rename to deps/git2-0.4.3/src/treebuilder.rs diff --git a/deps/git2-0.4.2/src/util.rs b/deps/git2-0.4.3/src/util.rs similarity index 100% rename from deps/git2-0.4.2/src/util.rs rename to deps/git2-0.4.3/src/util.rs diff --git a/deps/git2-curl-0.4.0/Cargo.toml b/deps/git2-curl-0.4.0/Cargo.toml deleted file mode 100644 index 93185e14e..000000000 --- a/deps/git2-curl-0.4.0/Cargo.toml +++ /dev/null @@ -1,30 +0,0 @@ -[package] - -name = "git2-curl" -version = "0.4.0" -authors = ["Alex Crichton "] -license = "MIT/Apache-2.0" -repository = "https://github.com/alexcrichton/git2-rs" -homepage = "https://github.com/alexcrichton/git2-rs" -documentation = "http://alexcrichton.com/git2-rs/git2-curl" -description = """ -Backend for an HTTP transport in libgit2 powered by libcurl. - -Intended to be used with the git2 crate. -""" - -[dependencies] -curl = "0.2" -url = "0.5" -log = "0.3" -git2 = { path = "..", version = "0.4" } - -[dev-dependencies] -civet = "0.8" -conduit = "0.7" -conduit-git-http-backend = "0.7" -tempdir = "0.3" - -[[test]] -name = "all" -harness = false diff --git a/deps/git2-curl-0.4.0/src/lib.rs b/deps/git2-curl-0.4.0/src/lib.rs deleted file mode 100644 index cfa50632a..000000000 --- a/deps/git2-curl-0.4.0/src/lib.rs +++ /dev/null @@ -1,211 +0,0 @@ -//! A crate for using libcurl as a backend for HTTP git requests with git2-rs. -//! -//! This crate provides one public function, `register`, which will register -//! a custom HTTP transport with libcurl for any HTTP requests made by libgit2. -//! At this time the `register` function is unsafe for the same reasons that -//! `git2::transport::register` is also unsafe. -//! -//! It is not recommended to use this crate wherever possible. The current -//! libcurl backend used, `curl-rust`, only supports executing a request in one -//! method call implying no streaming support. This consequently means that -//! when a repository is cloned the entire contents of the repo are downloaded -//! into memory, and *then* written off to disk by libgit2 afterwards. It -//! should be possible to alleviate this problem in the future. -//! -//! > **NOTE**: At this time this crate likely does not support a `git push` -//! > operation, only clones. - -#![doc(html_root_url = "http://alexcrichton.com/git2-rs")] - -extern crate git2; -extern crate curl; -extern crate url; -#[macro_use] extern crate log; - -use std::io::prelude::*; -use std::io::{self, Cursor}; -use std::sync::{Once, ONCE_INIT, Arc, Mutex}; -use std::error; - -use curl::http::handle::Method; -use curl::http::{Handle, Request}; -use git2::Error; -use git2::transport::{SmartSubtransportStream}; -use git2::transport::{Transport, SmartSubtransport, Service}; -use url::Url; - -struct CurlTransport { - handle: Arc>, -} - -struct CurlSubtransport { - handle: Arc>, - service: &'static str, - url_path: &'static str, - base_url: String, - method: Method, - reader: Option>>, - sent_request: bool, -} - -struct MyHandle(Handle); -unsafe impl Send for MyHandle {} // Handle is not send... - -/// Register the libcurl backend for HTTP requests made by libgit2. -/// -/// This function takes one parameter, a `handle`, which is used to perform all -/// future HTTP requests. The handle can be previously configured with -/// information such as proxies, SSL information, etc. -/// -/// This function is unsafe largely for the same reasons as -/// `git2::transport::register`: -/// -/// * The function needs to be synchronized against all other creations of -/// transport (any API calls to libgit2). -/// * The function will leak `handle` as once registered it is not currently -/// possible to unregister the backend. -/// -/// This function may be called concurrently, but only the first `handle` will -/// be used. All others will be discarded. -pub unsafe fn register(handle: Handle) { - static INIT: Once = ONCE_INIT; - - let handle = Arc::new(Mutex::new(MyHandle(handle))); - let handle2 = handle.clone(); - INIT.call_once(move || { - git2::transport::register("http", move |remote| { - factory(remote, handle.clone()) - }).unwrap(); - git2::transport::register("https", move |remote| { - factory(remote, handle2.clone()) - }).unwrap(); - }); -} - -fn factory(remote: &git2::Remote, handle: Arc>) - -> Result { - Transport::smart(remote, true, CurlTransport { handle: handle }) -} - -impl SmartSubtransport for CurlTransport { - fn action(&self, url: &str, action: Service) - -> Result, Error> { - let (service, path, method) = match action { - Service::UploadPackLs => { - ("upload-pack", "/info/refs?service=git-upload-pack", Method::Get) - } - Service::UploadPack => { - ("upload-pack", "/git-upload-pack", Method::Post) - } - Service::ReceivePackLs => { - ("receive-pack", "/info/refs?service=git-receive-pack", - Method::Get) - } - Service::ReceivePack => { - ("receive-pack", "/git-receive-pack", Method::Post) - } - }; - info!("action {} {}", service, path); - Ok(Box::new(CurlSubtransport { - handle: self.handle.clone(), - service: service, - url_path: path, - base_url: url.to_string(), - method: method, - reader: None, - sent_request: false, - })) - } - - fn close(&self) -> Result<(), Error> { - Ok(()) // ... - } -} - -impl CurlSubtransport { - fn err>>(&self, err: E) -> io::Error { - io::Error::new(io::ErrorKind::Other, err) - } - - fn execute(&mut self, mut data: &[u8]) -> io::Result<()> { - if self.sent_request { - return Err(self.err("already sent HTTP request")) - } - let agent = format!("git/1.0 (git2-curl {})", env!("CARGO_PKG_VERSION")); - - // Parse our input URL to figure out the host - let url = format!("{}{}", self.base_url, self.url_path); - let parsed = try!(Url::parse(&url).map_err(|_| { - self.err("invalid url, failed to parse") - })); - let host = match parsed.host() { - Some(host) => host.to_string(), - None => return Err(self.err("invalid url, did not have a host")), - }; - - // Prep the request - debug!("request to {}", url); - let mut h = self.handle.lock().unwrap(); - let mut req = Request::new(&mut h.0, self.method) - .uri(url) - .header("User-Agent", &agent) - .header("Host", &host) - .follow_redirects(true); - if data.len() > 0 { - req = req.body(&mut data) - .content_length(data.len()) - .header("Accept", &format!("application/x-git-{}-result", - self.service)) - .header("Content-Type", - &format!("application/x-git-{}-request", - self.service)); - } else { - req = req.header("Accept", "*/*"); - } - - // Send the request - let resp = try!(req.exec().map_err(|e| self.err(e))); - debug!("response: {}", resp); - if resp.get_code() != 200 { - return Err(self.err(&format!("failed to receive HTTP 200 response: \ - got {}", resp.get_code())[..])) - } - - // Check returned headers - let expected = match self.method { - Method::Get => format!("application/x-git-{}-advertisement", - self.service), - _ => format!("application/x-git-{}-result", self.service), - }; - if &resp.get_header("content-type") != &[expected.clone()] { - return Err(self.err(&format!("invalid Content-Type header: \ - found `{:?}` expected `{}`", - resp.get_header("Content-Type"), - expected)[..])) - } - - // Ok, time to read off some data. - let rdr = Cursor::new(resp.move_body()); - self.reader = Some(rdr); - Ok(()) - } -} - -impl Read for CurlSubtransport { - fn read(&mut self, buf: &mut [u8]) -> io::Result { - if self.reader.is_none() { - try!(self.execute(&[])); - } - self.reader.as_mut().unwrap().read(buf) - } -} - -impl Write for CurlSubtransport { - fn write(&mut self, data: &[u8]) -> io::Result { - if self.reader.is_none() { - try!(self.execute(data)); - } - Ok(data.len()) - } - fn flush(&mut self) -> io::Result<()> { Ok(()) } -} diff --git a/deps/git2-curl-0.4.1/Cargo.toml b/deps/git2-curl-0.4.1/Cargo.toml new file mode 100644 index 000000000..a483462a8 --- /dev/null +++ b/deps/git2-curl-0.4.1/Cargo.toml @@ -0,0 +1,30 @@ +[package] + +name = "git2-curl" +version = "0.4.1" +authors = ["Alex Crichton "] +license = "MIT/Apache-2.0" +repository = "https://github.com/alexcrichton/git2-rs" +homepage = "https://github.com/alexcrichton/git2-rs" +documentation = "http://alexcrichton.com/git2-rs/git2-curl" +description = """ +Backend for an HTTP transport in libgit2 powered by libcurl. + +Intended to be used with the git2 crate. +""" + +[dependencies] +curl = "0.2" +url = "1.0" +log = "0.3" +git2 = { path = "..", version = "0.4" } + +[dev-dependencies] +civet = "0.8" +conduit = "0.7" +conduit-git-http-backend = "0.7" +tempdir = "0.3" + +[[test]] +name = "all" +harness = false diff --git a/deps/git2-curl-0.4.1/src/lib.rs b/deps/git2-curl-0.4.1/src/lib.rs new file mode 100644 index 000000000..22e859ba4 --- /dev/null +++ b/deps/git2-curl-0.4.1/src/lib.rs @@ -0,0 +1,211 @@ +//! A crate for using libcurl as a backend for HTTP git requests with git2-rs. +//! +//! This crate provides one public function, `register`, which will register +//! a custom HTTP transport with libcurl for any HTTP requests made by libgit2. +//! At this time the `register` function is unsafe for the same reasons that +//! `git2::transport::register` is also unsafe. +//! +//! It is not recommended to use this crate wherever possible. The current +//! libcurl backend used, `curl-rust`, only supports executing a request in one +//! method call implying no streaming support. This consequently means that +//! when a repository is cloned the entire contents of the repo are downloaded +//! into memory, and *then* written off to disk by libgit2 afterwards. It +//! should be possible to alleviate this problem in the future. +//! +//! > **NOTE**: At this time this crate likely does not support a `git push` +//! > operation, only clones. + +#![doc(html_root_url = "http://alexcrichton.com/git2-rs")] + +extern crate git2; +extern crate curl; +extern crate url; +#[macro_use] extern crate log; + +use std::io::prelude::*; +use std::io::{self, Cursor}; +use std::sync::{Once, ONCE_INIT, Arc, Mutex}; +use std::error; + +use curl::http::handle::Method; +use curl::http::{Handle, Request}; +use git2::Error; +use git2::transport::{SmartSubtransportStream}; +use git2::transport::{Transport, SmartSubtransport, Service}; +use url::Url; + +struct CurlTransport { + handle: Arc>, +} + +struct CurlSubtransport { + handle: Arc>, + service: &'static str, + url_path: &'static str, + base_url: String, + method: Method, + reader: Option>>, + sent_request: bool, +} + +struct MyHandle(Handle); +unsafe impl Send for MyHandle {} // Handle is not send... + +/// Register the libcurl backend for HTTP requests made by libgit2. +/// +/// This function takes one parameter, a `handle`, which is used to perform all +/// future HTTP requests. The handle can be previously configured with +/// information such as proxies, SSL information, etc. +/// +/// This function is unsafe largely for the same reasons as +/// `git2::transport::register`: +/// +/// * The function needs to be synchronized against all other creations of +/// transport (any API calls to libgit2). +/// * The function will leak `handle` as once registered it is not currently +/// possible to unregister the backend. +/// +/// This function may be called concurrently, but only the first `handle` will +/// be used. All others will be discarded. +pub unsafe fn register(handle: Handle) { + static INIT: Once = ONCE_INIT; + + let handle = Arc::new(Mutex::new(MyHandle(handle))); + let handle2 = handle.clone(); + INIT.call_once(move || { + git2::transport::register("http", move |remote| { + factory(remote, handle.clone()) + }).unwrap(); + git2::transport::register("https", move |remote| { + factory(remote, handle2.clone()) + }).unwrap(); + }); +} + +fn factory(remote: &git2::Remote, handle: Arc>) + -> Result { + Transport::smart(remote, true, CurlTransport { handle: handle }) +} + +impl SmartSubtransport for CurlTransport { + fn action(&self, url: &str, action: Service) + -> Result, Error> { + let (service, path, method) = match action { + Service::UploadPackLs => { + ("upload-pack", "/info/refs?service=git-upload-pack", Method::Get) + } + Service::UploadPack => { + ("upload-pack", "/git-upload-pack", Method::Post) + } + Service::ReceivePackLs => { + ("receive-pack", "/info/refs?service=git-receive-pack", + Method::Get) + } + Service::ReceivePack => { + ("receive-pack", "/git-receive-pack", Method::Post) + } + }; + info!("action {} {}", service, path); + Ok(Box::new(CurlSubtransport { + handle: self.handle.clone(), + service: service, + url_path: path, + base_url: url.to_string(), + method: method, + reader: None, + sent_request: false, + })) + } + + fn close(&self) -> Result<(), Error> { + Ok(()) // ... + } +} + +impl CurlSubtransport { + fn err>>(&self, err: E) -> io::Error { + io::Error::new(io::ErrorKind::Other, err) + } + + fn execute(&mut self, mut data: &[u8]) -> io::Result<()> { + if self.sent_request { + return Err(self.err("already sent HTTP request")) + } + let agent = format!("git/1.0 (git2-curl {})", env!("CARGO_PKG_VERSION")); + + // Parse our input URL to figure out the host + let url = format!("{}{}", self.base_url, self.url_path); + let parsed = try!(Url::parse(&url).map_err(|_| { + self.err("invalid url, failed to parse") + })); + let host = match parsed.host_str() { + Some(host) => host, + None => return Err(self.err("invalid url, did not have a host")), + }; + + // Prep the request + debug!("request to {}", url); + let mut h = self.handle.lock().unwrap(); + let mut req = Request::new(&mut h.0, self.method) + .uri(url) + .header("User-Agent", &agent) + .header("Host", host) + .follow_redirects(true); + if data.len() > 0 { + req = req.body(&mut data) + .content_length(data.len()) + .header("Accept", &format!("application/x-git-{}-result", + self.service)) + .header("Content-Type", + &format!("application/x-git-{}-request", + self.service)); + } else { + req = req.header("Accept", "*/*"); + } + + // Send the request + let resp = try!(req.exec().map_err(|e| self.err(e))); + debug!("response: {}", resp); + if resp.get_code() != 200 { + return Err(self.err(&format!("failed to receive HTTP 200 response: \ + got {}", resp.get_code())[..])) + } + + // Check returned headers + let expected = match self.method { + Method::Get => format!("application/x-git-{}-advertisement", + self.service), + _ => format!("application/x-git-{}-result", self.service), + }; + if &resp.get_header("content-type") != &[expected.clone()] { + return Err(self.err(&format!("invalid Content-Type header: \ + found `{:?}` expected `{}`", + resp.get_header("Content-Type"), + expected)[..])) + } + + // Ok, time to read off some data. + let rdr = Cursor::new(resp.move_body()); + self.reader = Some(rdr); + Ok(()) + } +} + +impl Read for CurlSubtransport { + fn read(&mut self, buf: &mut [u8]) -> io::Result { + if self.reader.is_none() { + try!(self.execute(&[])); + } + self.reader.as_mut().unwrap().read(buf) + } +} + +impl Write for CurlSubtransport { + fn write(&mut self, data: &[u8]) -> io::Result { + if self.reader.is_none() { + try!(self.execute(data)); + } + Ok(data.len()) + } + fn flush(&mut self) -> io::Result<()> { Ok(()) } +} diff --git a/deps/git2-curl-0.4.0/tests/all.rs b/deps/git2-curl-0.4.1/tests/all.rs similarity index 100% rename from deps/git2-curl-0.4.0/tests/all.rs rename to deps/git2-curl-0.4.1/tests/all.rs diff --git a/deps/glob-0.2.10/.travis.yml b/deps/glob-0.2.10/.travis.yml deleted file mode 100644 index bc5f3ba5e..000000000 --- a/deps/glob-0.2.10/.travis.yml +++ /dev/null @@ -1,19 +0,0 @@ -language: rust -sudo: false -script: - - cargo build --verbose - - cargo test --verbose - - cargo doc -after_success: | - [ $TRAVIS_BRANCH = master ] && - [ $TRAVIS_PULL_REQUEST = false ] && - echo '' > target/doc/index.html && - pip install ghp-import --user $USER && - $HOME/.local/bin/ghp-import -n target/doc && - git push -qf https://${TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages -env: - global: - secure: I3a1njiqfFW9TpMKB715bpq3qHmsSmue/ahYbXhYbRoskWDWk+ruSKHS/X3nvSXY2Vv9oBCFaWldQvKdPtbpLYlfnIfquvUSzGzT3BW8bOAU6EY6+MQiToDln+xlcfjlSqBF4RGyrZtmuXzC1xXPKotG6jfUT1+7iOgaXLxyaRU= -notifications: - email: - on_success: never diff --git a/deps/glob-0.2.10/Cargo.toml b/deps/glob-0.2.10/Cargo.toml deleted file mode 100644 index 504499a3c..000000000 --- a/deps/glob-0.2.10/Cargo.toml +++ /dev/null @@ -1,15 +0,0 @@ -[package] - -name = "glob" -version = "0.2.10" -authors = ["The Rust Project Developers"] -license = "MIT/Apache-2.0" -homepage = "https://github.com/rust-lang/glob" -repository = "https://github.com/rust-lang/glob" -documentation = "http://doc.rust-lang.org/glob" -description = """ -Support for matching file paths against Unix shell style patterns. -""" - -[dev-dependencies] -tempdir = "0.3" diff --git a/deps/glob-0.2.10/README.md b/deps/glob-0.2.10/README.md deleted file mode 100644 index 5da388821..000000000 --- a/deps/glob-0.2.10/README.md +++ /dev/null @@ -1,24 +0,0 @@ -glob -==== - -Support for matching file paths against Unix shell style patterns. - -[![Build Status](https://travis-ci.org/rust-lang/glob.svg?branch=master)](https://travis-ci.org/rust-lang/glob) - -[Documentation](http://doc.rust-lang.org/glob) - -## Usage - -To use `glob`, add this to your `Cargo.toml`: - -```toml -[dependencies] -glob = "*" -``` - -And add this to your crate root: - -```rust -extern crate glob; -``` - diff --git a/deps/glob-0.2.10/src/lib.rs b/deps/glob-0.2.10/src/lib.rs deleted file mode 100644 index 8102f0d1e..000000000 --- a/deps/glob-0.2.10/src/lib.rs +++ /dev/null @@ -1,1245 +0,0 @@ -// Copyright 2014 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -//! Support for matching file paths against Unix shell style patterns. -//! -//! The `glob` and `glob_with` functions, in concert with the `Paths` -//! type, allow querying the filesystem for all files that match a particular -//! pattern - just like the libc `glob` function (for an example see the `glob` -//! documentation). The methods on the `Pattern` type provide functionality -//! for checking if individual paths match a particular pattern - in a similar -//! manner to the libc `fnmatch` function -//! For consistency across platforms, and for Windows support, this module -//! is implemented entirely in Rust rather than deferring to the libc -//! `glob`/`fnmatch` functions. - -#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", - html_favicon_url = "http://www.rust-lang.org/favicon.ico", - html_root_url = "http://doc.rust-lang.org/glob/")] -#![cfg_attr(all(test, windows), feature(std_misc))] - -use std::ascii::AsciiExt; -use std::cell::Cell; -use std::cmp; -use std::fmt; -use std::fs; -use std::io::prelude::*; -use std::io; -use std::path::{self, Path, PathBuf, Component}; -use std::str::FromStr; - -use PatternToken::{Char, AnyChar, AnySequence, AnyRecursiveSequence, AnyWithin}; -use PatternToken::AnyExcept; -use CharSpecifier::{SingleChar, CharRange}; -use MatchResult::{Match, SubPatternDoesntMatch, EntirePatternDoesntMatch}; - -/// An iterator that yields `Path`s from the filesystem that match a particular -/// pattern. -/// -/// Note that it yields `GlobResult` in order to report any `IoErrors` that may -/// arise during iteration. If a directory matches but is unreadable, -/// thereby preventing its contents from being checked for matches, a -/// `GlobError` is returned to express this. -/// -/// See the `glob` function for more details. -pub struct Paths { - dir_patterns: Vec, - require_dir: bool, - options: MatchOptions, - todo: Vec>, - scope: Option, -} - -/// Return an iterator that produces all the Paths that match the given pattern, -/// which may be absolute or relative to the current working directory. -/// -/// This may return an error if the pattern is invalid. -/// -/// This method uses the default match options and is equivalent to calling -/// `glob_with(pattern, MatchOptions::new())`. Use `glob_with` directly if you -/// want to use non-default match options. -/// -/// When iterating, each result is a `GlobResult` which expresses the -/// possibility that there was an `IoError` when attempting to read the contents -/// of the matched path. In other words, each item returned by the iterator -/// will either be an `Ok(Path)` if the path matched, or an `Err(GlobError)` if -/// the path (partially) matched _but_ its contents could not be read in order -/// to determine if its contents matched. -/// -/// See the `Paths` documentation for more information. -/// -/// # Example -/// -/// Consider a directory `/media/pictures` containing only the files -/// `kittens.jpg`, `puppies.jpg` and `hamsters.gif`: -/// -/// ```rust -/// use glob::glob; -/// -/// for entry in glob("/media/pictures/*.jpg").unwrap() { -/// match entry { -/// Ok(path) => println!("{:?}", path.display()), -/// -/// // if the path matched but was unreadable, -/// // thereby preventing its contents from matching -/// Err(e) => println!("{:?}", e), -/// } -/// } -/// ``` -/// -/// The above code will print: -/// -/// ```ignore -/// /media/pictures/kittens.jpg -/// /media/pictures/puppies.jpg -/// ``` -/// -/// If you want to ignore unreadable paths, you can use something like -/// `filter_map`: -/// -/// ```rust -/// use glob::glob; -/// use std::result::Result; -/// -/// for path in glob("/media/pictures/*.jpg").unwrap().filter_map(Result::ok) { -/// println!("{}", path.display()); -/// } -/// ``` -/// -pub fn glob(pattern: &str) -> Result { - glob_with(pattern, &MatchOptions::new()) -} - -/// Return an iterator that produces all the Paths that match the given pattern, -/// which may be absolute or relative to the current working directory. -/// -/// This may return an error if the pattern is invalid. -/// -/// This function accepts Unix shell style patterns as described by -/// `Pattern::new(..)`. The options given are passed through unchanged to -/// `Pattern::matches_with(..)` with the exception that -/// `require_literal_separator` is always set to `true` regardless of the value -/// passed to this function. -/// -/// Paths are yielded in alphabetical order. -pub fn glob_with(pattern: &str, options: &MatchOptions) - -> Result { - // make sure that the pattern is valid first, else early return with error - let _compiled = try!(Pattern::new(pattern)); - - #[cfg(windows)] - fn check_windows_verbatim(p: &Path) -> bool { - use std::path::Prefix; - match p.components().next() { - Some(Component::Prefix(ref p)) => p.kind().is_verbatim(), - _ => false - } - } - #[cfg(not(windows))] - fn check_windows_verbatim(_: &Path) -> bool { false } - - #[cfg(windows)] - fn to_scope(p: &Path) -> PathBuf { - // FIXME handle volume relative paths here - p.to_path_buf() - } - #[cfg(not(windows))] - fn to_scope(p: &Path) -> PathBuf { p.to_path_buf() } - - let mut components = Path::new(pattern).components().peekable(); - loop { - match components.peek() { - Some(&Component::Prefix(..)) | - Some(&Component::RootDir) => { components.next(); } - _ => break, - } - } - let rest = components.map(|s| s.as_os_str()).collect::(); - let normalized_pattern = Path::new(pattern).iter().collect::(); - let root_len = normalized_pattern.to_str().unwrap().len() - - rest.to_str().unwrap().len(); - let root = if root_len > 0 {Some(Path::new(&pattern[..root_len]))} - else {None}; - - if root_len > 0 && check_windows_verbatim(root.unwrap()) { - // FIXME: How do we want to handle verbatim paths? I'm inclined to - // return nothing, since we can't very well find all UNC shares with a - // 1-letter server name. - return Ok(Paths { - dir_patterns: Vec::new(), - require_dir: false, - options: options.clone(), - todo: Vec::new(), - scope: None, - }); - } - - let scope = root.map(to_scope).unwrap_or_else(|| PathBuf::from(".")); - - let mut dir_patterns = Vec::new(); - let components = pattern[cmp::min(root_len, pattern.len())..] - .split_terminator(path::is_separator); - - for component in components { - let compiled = try!(Pattern::new(component)); - dir_patterns.push(compiled); - } - - if root_len == pattern.len() { - dir_patterns.push(Pattern { - original: "".to_string(), - tokens: Vec::new(), - is_recursive: false, - }); - } - - let require_dir = pattern.chars().next_back().map(path::is_separator) == Some(true); - let todo = Vec::new(); - - Ok(Paths { - dir_patterns: dir_patterns, - require_dir: require_dir, - options: options.clone(), - todo: todo, - scope: Some(scope), - }) -} - -/// A glob iteration error. -/// -/// This is typically returned when a particular path cannot be read -/// to determine if its contents match the glob pattern. This is possible -/// if the program lacks the permissions, for example. -#[derive(Debug)] -pub struct GlobError { - path: PathBuf, - error: io::Error, -} - -impl GlobError { - /// The Path that the error corresponds to. - pub fn path(&self) -> &Path { &self.path } - - /// The error in question. - pub fn error(&self) -> &io::Error { &self.error } -} - -impl fmt::Display for GlobError { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "attempting to read `{}` resulted in an error: {}", - self.path.display(), self.error) - } -} - -fn is_dir(p: &Path) -> bool { - fs::metadata(p).map(|m| m.is_dir()).unwrap_or(false) -} - -/// An alias for a glob iteration result. -/// -/// This represents either a matched path or a glob iteration error, -/// such as failing to read a particular directory's contents. -pub type GlobResult = Result; - -impl Iterator for Paths { - type Item = GlobResult; - - fn next(&mut self) -> Option { - // the todo buffer hasn't been initialized yet, so it's done at this - // point rather than in glob() so that the errors are unified that is, - // failing to fill the buffer is an iteration error construction of the - // iterator (i.e. glob()) only fails if it fails to compile the Pattern - if let Some(scope) = self.scope.take() { - if self.dir_patterns.len() > 0 { - // Shouldn't happen, but we're using -1 as a special index. - assert!(self.dir_patterns.len() < !0 as usize); - - fill_todo(&mut self.todo, &self.dir_patterns, - 0, &scope, &self.options); - } - } - - loop { - if self.dir_patterns.is_empty() || self.todo.is_empty() { - return None; - } - - let (path, mut idx) = match self.todo.pop().unwrap() { - Ok(pair) => pair, - Err(e) => return Some(Err(e)), - }; - - // idx -1: was already checked by fill_todo, maybe path was '.' or - // '..' that we can't match here because of normalization. - if idx == !0 as usize { - if self.require_dir && !is_dir(&path) { continue; } - return Some(Ok(path)); - } - - if self.dir_patterns[idx].is_recursive { - let mut next = idx; - - // collapse consecutive recursive patterns - while (next + 1) < self.dir_patterns.len() && - self.dir_patterns[next + 1].is_recursive { - next += 1; - } - - // the path is a directory, so it's a match - if is_dir(&path) { - // push this directory's contents - fill_todo(&mut self.todo, &self.dir_patterns, - next, &path, &self.options); - - // pattern ends in recursive pattern, so return this - // directory as a result - if next == self.dir_patterns.len() - 1 { - return Some(Ok(path)); - // advanced to the next pattern for this path - } else { - idx = next + 1; - } - // advanced to the next pattern for this path - } else if next != self.dir_patterns.len() - 1 { - idx = next + 1; - // not a directory and it's the last pattern, meaning no match - } else { - continue; - } - } - - // not recursive, so match normally - if self.dir_patterns[idx].matches_with({ - match path.file_name().and_then(|s| s.to_str()) { - // FIXME (#9639): How do we handle non-utf8 filenames? - // Ignore them for now Ideally we'd still match them - // against a * - None => continue, - Some(x) => x - } - }, &self.options) { - if idx == self.dir_patterns.len() - 1 { - // it is not possible for a pattern to match a directory - // *AND* its children so we don't need to check the - // children - - if !self.require_dir || is_dir(&path) { - return Some(Ok(path)); - } - } else { - fill_todo(&mut self.todo, &self.dir_patterns, - idx + 1, &path, &self.options); - } - } - } - } - -} - -/// A pattern parsing error. -#[derive(Debug)] -#[allow(missing_copy_implementations)] -pub struct PatternError { - /// The approximate character index of where the error occurred. - pub pos: usize, - - /// A message describing the error. - pub msg: &'static str, -} - -impl fmt::Display for PatternError { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "Pattern syntax error near position {}: {}", - self.pos, self.msg) - } -} - -/// A compiled Unix shell style pattern. -/// -/// `?` matches any single character -/// -/// `*` matches any (possibly empty) sequence of characters -/// -/// `**` matches the current directory and arbitrary subdirectories. This -/// sequence **must** form a single path component, so both `**a` and `b**` are -/// invalid and will result in an error. A sequence of more than two -/// consecutive `*` characters is also invalid. -/// -/// `[...]` matches any character inside the brackets. -/// Character sequences can also specify ranges -/// of characters, as ordered by Unicode, so e.g. `[0-9]` specifies any -/// character between 0 and 9 inclusive. An unclosed bracket is invalid. -/// -/// `[!...]` is the negation of `[...]`, i.e. it matches any characters **not** -/// in the brackets. -/// -/// The metacharacters `?`, `*`, `[`, `]` can be matched by using brackets -/// (e.g. `[?]`). When a `]` occurs immediately following `[` or `[!` then -/// it is interpreted as being part of, rather then ending, the character -/// set, so `]` and NOT `]` can be matched by `[]]` and `[!]]` respectively. -/// The `-` character can be specified inside a character sequence pattern by -/// placing it at the start or the end, e.g. `[abc-]`. -#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Default, Debug)] -pub struct Pattern { - original: String, - tokens: Vec, - is_recursive: bool, -} - -/// Show the original glob pattern. -impl fmt::Display for Pattern { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - self.original.fmt(f) - } -} - -impl FromStr for Pattern { - type Err = PatternError; - - fn from_str(s: &str) -> Result { - Pattern::new(s) - } -} - -#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)] -enum PatternToken { - Char(char), - AnyChar, - AnySequence, - AnyRecursiveSequence, - AnyWithin(Vec ), - AnyExcept(Vec ) -} - -#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)] -enum CharSpecifier { - SingleChar(char), - CharRange(char, char) -} - -#[derive(Copy, Clone, PartialEq)] -enum MatchResult { - Match, - SubPatternDoesntMatch, - EntirePatternDoesntMatch -} - -const ERROR_WILDCARDS: &'static str = - "wildcards are either regular `*` or recursive `**`"; -const ERROR_RECURSIVE_WILDCARDS: &'static str = - "recursive wildcards must form a single path component"; -const ERROR_INVALID_RANGE: &'static str = - "invalid range pattern"; - -impl Pattern { - /// This function compiles Unix shell style patterns. - /// - /// An invalid glob pattern will yield an error. - pub fn new(pattern: &str) -> Result { - - let chars = pattern.chars().collect::>(); - let mut tokens = Vec::new(); - let mut is_recursive = false; - let mut i = 0; - - while i < chars.len() { - match chars[i] { - '?' => { - tokens.push(AnyChar); - i += 1; - } - '*' => { - let old = i; - - while i < chars.len() && chars[i] == '*' { - i += 1; - } - - let count = i - old; - - if count > 2 { - return Err( - PatternError { - pos: old + 2, - msg: ERROR_WILDCARDS, - }); - } else if count == 2 { - // ** can only be an entire path component - // i.e. a/**/b is valid, but a**/b or a/**b is not - // invalid matches are treated literally - let is_valid = - // is the beginning of the pattern or begins with '/' - if i == 2 || chars[i - count - 1] == '/' { - // it ends in a '/' - if i < chars.len() && chars[i] == '/' { - i += 1; - true - // or the pattern ends here - // this enables the existing globbing mechanism - } else if i == chars.len() { - true - // `**` ends in non-separator - } else { - return Err( - PatternError { - pos: i, - msg: ERROR_RECURSIVE_WILDCARDS, - }); - } - // `**` begins with non-separator - } else { - return Err( - PatternError { - pos: old - 1, - msg: ERROR_RECURSIVE_WILDCARDS, - }); - }; - - let tokens_len = tokens.len(); - - if is_valid { - // collapse consecutive AnyRecursiveSequence to a - // single one - if !(tokens_len > 1 && - tokens[tokens_len - 1] == AnyRecursiveSequence) { - is_recursive = true; - tokens.push(AnyRecursiveSequence); - } - } - } else { - tokens.push(AnySequence); - } - } - '[' => { - - if i + 4 <= chars.len() && chars[i + 1] == '!' { - match chars[i + 3..].iter().position(|x| *x == ']') { - None => (), - Some(j) => { - let chars = &chars[i + 2 .. i + 3 + j]; - let cs = parse_char_specifiers(chars); - tokens.push(AnyExcept(cs)); - i += j + 4; - continue; - } - } - } else if i + 3 <= chars.len() && chars[i + 1] != '!' { - match chars[i + 2..].iter().position(|x| *x == ']') { - None => (), - Some(j) => { - let cs = parse_char_specifiers(&chars[i + 1 .. - i + 2 + j]); - tokens.push(AnyWithin(cs)); - i += j + 3; - continue; - } - } - } - - // if we get here then this is not a valid range pattern - return Err( - PatternError { - pos: i, - msg: ERROR_INVALID_RANGE, - }); - } - c => { - tokens.push(Char(c)); - i += 1; - } - } - } - - Ok(Pattern { - tokens: tokens, - original: pattern.to_string(), - is_recursive: is_recursive, - }) - } - - /// Escape metacharacters within the given string by surrounding them in - /// brackets. The resulting string will, when compiled into a `Pattern`, - /// match the input string and nothing else. - pub fn escape(s: &str) -> String { - let mut escaped = String::new(); - for c in s.chars() { - match c { - // note that ! does not need escaping because it is only special - // inside brackets - '?' | '*' | '[' | ']' => { - escaped.push('['); - escaped.push(c); - escaped.push(']'); - } - c => { - escaped.push(c); - } - } - } - escaped - } - - /// Return if the given `str` matches this `Pattern` using the default - /// match options (i.e. `MatchOptions::new()`). - /// - /// # Example - /// - /// ```rust - /// use glob::Pattern; - /// - /// assert!(Pattern::new("c?t").unwrap().matches("cat")); - /// assert!(Pattern::new("k[!e]tteh").unwrap().matches("kitteh")); - /// assert!(Pattern::new("d*g").unwrap().matches("doog")); - /// ``` - pub fn matches(&self, str: &str) -> bool { - self.matches_with(str, &MatchOptions::new()) - } - - /// Return if the given `Path`, when converted to a `str`, matches this - /// `Pattern` using the default match options (i.e. `MatchOptions::new()`). - pub fn matches_path(&self, path: &Path) -> bool { - // FIXME (#9639): This needs to handle non-utf8 paths - path.to_str().map_or(false, |s| { - self.matches(s) - }) - } - - /// Return if the given `str` matches this `Pattern` using the specified - /// match options. - pub fn matches_with(&self, str: &str, options: &MatchOptions) -> bool { - self.matches_from(None, str, 0, options) == Match - } - - /// Return if the given `Path`, when converted to a `str`, matches this - /// `Pattern` using the specified match options. - pub fn matches_path_with(&self, path: &Path, options: &MatchOptions) -> bool { - // FIXME (#9639): This needs to handle non-utf8 paths - path.to_str().map_or(false, |s| { - self.matches_with(s, options) - }) - } - - /// Access the original glob pattern. - pub fn as_str<'a>(&'a self) -> &'a str { &self.original } - - fn matches_from(&self, - prev_char: Option, - mut file: &str, - i: usize, - options: &MatchOptions) -> MatchResult { - - let prev_char = Cell::new(prev_char); - - let require_literal = |c| { - (options.require_literal_separator && path::is_separator(c)) || - (options.require_literal_leading_dot && c == '.' - && path::is_separator(prev_char.get().unwrap_or('/'))) - }; - - for (ti, token) in self.tokens[i..].iter().enumerate() { - match *token { - AnySequence | AnyRecursiveSequence => { - loop { - match self.matches_from(prev_char.get(), file, - i + ti + 1, options) { - SubPatternDoesntMatch => (), // keep trying - m => return m, - } - - if file.len() == 0 { return EntirePatternDoesntMatch } - let c = file.chars().next().unwrap(); - let next = &file[c.len_utf8()..]; - - if let AnySequence = *token { - if require_literal(c) { - return SubPatternDoesntMatch; - } - } - - prev_char.set(Some(c)); - file = next; - } - } - _ => { - if file.len() == 0 { return EntirePatternDoesntMatch } - let c = file.chars().next().unwrap(); - let next = &file[c.len_utf8()..]; - - let matches = match *token { - AnyChar => { - !require_literal(c) - } - AnyWithin(ref specifiers) => { - !require_literal(c) && - in_char_specifiers(&specifiers, - c, - options) - } - AnyExcept(ref specifiers) => { - !require_literal(c) && - !in_char_specifiers(&specifiers, - c, - options) - } - Char(c2) => { - chars_eq(c, c2, options.case_sensitive) - } - AnySequence | AnyRecursiveSequence => { - unreachable!() - } - }; - if !matches { - return SubPatternDoesntMatch; - } - prev_char.set(Some(c)); - file = next; - } - } - } - - if file.is_empty() { - Match - } else { - SubPatternDoesntMatch - } - } - -} - -// Fills `todo` with paths under `path` to be matched by `patterns[idx]`, -// special-casing patterns to match `.` and `..`, and avoiding `readdir()` -// calls when there are no metacharacters in the pattern. -fn fill_todo(todo: &mut Vec>, - patterns: &[Pattern], - idx: usize, - path: &Path, - options: &MatchOptions) { - // convert a pattern that's just many Char(_) to a string - fn pattern_as_str(pattern: &Pattern) -> Option { - let mut s = String::new(); - for token in pattern.tokens.iter() { - match *token { - Char(c) => s.push(c), - _ => return None - } - } - return Some(s); - } - - let add = |todo: &mut Vec<_>, next_path: PathBuf| { - if idx + 1 == patterns.len() { - // We know it's good, so don't make the iterator match this path - // against the pattern again. In particular, it can't match - // . or .. globs since these never show up as path components. - todo.push(Ok((next_path, !0 as usize))); - } else { - fill_todo(todo, patterns, idx + 1, &next_path, options); - } - }; - - let pattern = &patterns[idx]; - let is_dir = is_dir(path); - let curdir = path == Path::new("."); - match pattern_as_str(pattern) { - Some(s) => { - // This pattern component doesn't have any metacharacters, so we - // don't need to read the current directory to know where to - // continue. So instead of passing control back to the iterator, - // we can just check for that one entry and potentially recurse - // right away. - let special = "." == s || ".." == s; - let next_path = if curdir {PathBuf::from(s)} else {path.join(&s)}; - if (special && is_dir) || (!special && fs::metadata(&next_path).is_ok()) { - add(todo, next_path); - } - }, - None if is_dir => { - let dirs = fs::read_dir(path).and_then(|d| { - d.map(|e| e.map(|e| { - if curdir { - PathBuf::from(e.path().file_name().unwrap()) - } else { - e.path() - } - })).collect::, _>>() - }); - match dirs { - Ok(mut children) => { - children.sort_by(|p1, p2| p2.file_name().cmp(&p1.file_name())); - todo.extend(children.into_iter().map(|x| Ok((x, idx)))); - - // Matching the special directory entries . and .. that - // refer to the current and parent directory respectively - // requires that the pattern has a leading dot, even if the - // `MatchOptions` field `require_literal_leading_dot` is not - // set. - if pattern.tokens.len() > 0 && pattern.tokens[0] == Char('.') { - for &special in [".", ".."].iter() { - if pattern.matches_with(special, options) { - add(todo, path.join(special)); - } - } - } - }, - Err(e) => { - todo.push(Err(GlobError { - path: path.to_path_buf(), - error: e, - })); - } - } - } - None => {/* not a directory, nothing more to find */} - } -} - -fn parse_char_specifiers(s: &[char]) -> Vec { - let mut cs = Vec::new(); - let mut i = 0; - while i < s.len() { - if i + 3 <= s.len() && s[i + 1] == '-' { - cs.push(CharRange(s[i], s[i + 2])); - i += 3; - } else { - cs.push(SingleChar(s[i])); - i += 1; - } - } - cs -} - -fn in_char_specifiers(specifiers: &[CharSpecifier], c: char, options: &MatchOptions) -> bool { - - for &specifier in specifiers.iter() { - match specifier { - SingleChar(sc) => { - if chars_eq(c, sc, options.case_sensitive) { - return true; - } - } - CharRange(start, end) => { - - // FIXME: work with non-ascii chars properly (issue #1347) - if !options.case_sensitive && c.is_ascii() && - start.is_ascii() && end.is_ascii() { - - let start = start.to_ascii_lowercase(); - let end = end.to_ascii_lowercase(); - - let start_up = start.to_uppercase().next().unwrap(); - let end_up = end.to_uppercase().next().unwrap(); - - // only allow case insensitive matching when - // both start and end are within a-z or A-Z - if start != start_up && end != end_up { - let c = c.to_ascii_lowercase(); - if c >= start && c <= end { - return true; - } - } - } - - if c >= start && c <= end { - return true; - } - } - } - } - - false -} - -/// A helper function to determine if two chars are (possibly case-insensitively) equal. -fn chars_eq(a: char, b: char, case_sensitive: bool) -> bool { - if cfg!(windows) && path::is_separator(a) && path::is_separator(b) { - true - } else if !case_sensitive && a.is_ascii() && b.is_ascii() { - // FIXME: work with non-ascii chars properly (issue #9084) - a.to_ascii_lowercase() == b.to_ascii_lowercase() - } else { - a == b - } -} - - -/// Configuration options to modify the behaviour of `Pattern::matches_with(..)` -#[allow(missing_copy_implementations)] -#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] -pub struct MatchOptions { - /// Whether or not patterns should be matched in a case-sensitive manner. - /// This currently only considers upper/lower case relationships between - /// ASCII characters, but in future this might be extended to work with - /// Unicode. - pub case_sensitive: bool, - - /// If this is true then path-component separator characters (e.g. `/` on - /// Posix) must be matched by a literal `/`, rather than by `*` or `?` or - /// `[...]` - pub require_literal_separator: bool, - - /// If this is true then paths that contain components that start with a `.` - /// will not match unless the `.` appears literally in the pattern: `*`, `?` - /// or `[...]` will not match. This is useful because such files are - /// conventionally considered hidden on Unix systems and it might be - /// desirable to skip them when listing files. - pub require_literal_leading_dot: bool -} - -impl MatchOptions { - - /// Constructs a new `MatchOptions` with default field values. This is used - /// when calling functions that do not take an explicit `MatchOptions` - /// parameter. - /// - /// This function always returns this value: - /// - /// ```rust,ignore - /// MatchOptions { - /// case_sensitive: true, - /// require_literal_separator: false. - /// require_literal_leading_dot: false - /// } - /// ``` - pub fn new() -> MatchOptions { - MatchOptions { - case_sensitive: true, - require_literal_separator: false, - require_literal_leading_dot: false - } - } - -} - -#[cfg(test)] -mod test { - use std::path::Path; - use super::{glob, Pattern, MatchOptions}; - - #[test] - fn test_pattern_from_str() { - assert!("a*b".parse::().unwrap().matches("a_b")); - assert!("a/**b".parse::().unwrap_err().pos == 4); - } - - #[test] - fn test_wildcard_errors() { - assert!(Pattern::new("a/**b").unwrap_err().pos == 4); - assert!(Pattern::new("a/bc**").unwrap_err().pos == 3); - assert!(Pattern::new("a/*****").unwrap_err().pos == 4); - assert!(Pattern::new("a/b**c**d").unwrap_err().pos == 2); - assert!(Pattern::new("a**b").unwrap_err().pos == 0); - } - - #[test] - fn test_unclosed_bracket_errors() { - assert!(Pattern::new("abc[def").unwrap_err().pos == 3); - assert!(Pattern::new("abc[!def").unwrap_err().pos == 3 ); - assert!(Pattern::new("abc[").unwrap_err().pos == 3); - assert!(Pattern::new("abc[!").unwrap_err().pos == 3); - assert!(Pattern::new("abc[d").unwrap_err().pos == 3); - assert!(Pattern::new("abc[!d").unwrap_err().pos == 3); - assert!(Pattern::new("abc[]").unwrap_err().pos == 3); - assert!(Pattern::new("abc[!]").unwrap_err().pos == 3); - } - - #[test] - fn test_glob_errors() { - assert!(glob("a/**b").err().unwrap().pos == 4); - assert!(glob("abc[def").err().unwrap().pos == 3); - } - - // this test assumes that there is a /root directory and that - // the user running this test is not root or otherwise doesn't - // have permission to read its contents - #[cfg(unix)] - #[test] - fn test_iteration_errors() { - use std::io; - let mut iter = glob("/root/*").unwrap(); - - // GlobErrors shouldn't halt iteration - let next = iter.next(); - assert!(next.is_some()); - - let err = next.unwrap(); - assert!(err.is_err()); - - let err = err.err().unwrap(); - assert!(err.path() == Path::new("/root")); - assert!(err.error().kind() == io::ErrorKind::PermissionDenied); - } - - #[test] - fn test_absolute_pattern() { - assert!(glob("/").unwrap().next().is_some()); - assert!(glob("//").unwrap().next().is_some()); - - // assume that the filesystem is not empty! - assert!(glob("/*").unwrap().next().is_some()); - - #[cfg(not(windows))] fn win() {} - - #[cfg(windows)] fn win() { - use std::env::current_dir; - use std::ffi::AsOsStr; - - // check windows absolute paths with host/device components - let root_with_device = - current_dir().ok().and_then(|p| p.prefix().map(|p| p.join("*"))).unwrap(); - // FIXME (#9639): This needs to handle non-utf8 paths - assert!(glob(root_with_device.as_os_str().to_str().unwrap()).unwrap().next().is_some()); - } - win() - } - - #[test] - fn test_wildcards() { - assert!(Pattern::new("a*b").unwrap().matches("a_b")); - assert!(Pattern::new("a*b*c").unwrap().matches("abc")); - assert!(!Pattern::new("a*b*c").unwrap().matches("abcd")); - assert!(Pattern::new("a*b*c").unwrap().matches("a_b_c")); - assert!(Pattern::new("a*b*c").unwrap().matches("a___b___c")); - assert!(Pattern::new("abc*abc*abc").unwrap().matches("abcabcabcabcabcabcabc")); - assert!(!Pattern::new("abc*abc*abc").unwrap().matches("abcabcabcabcabcabcabca")); - assert!(Pattern::new("a*a*a*a*a*a*a*a*a").unwrap().matches("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")); - assert!(Pattern::new("a*b[xyz]c*d").unwrap().matches("abxcdbxcddd")); - } - - #[test] - fn test_recursive_wildcards() { - let pat = Pattern::new("some/**/needle.txt").unwrap(); - assert!(pat.matches("some/needle.txt")); - assert!(pat.matches("some/one/needle.txt")); - assert!(pat.matches("some/one/two/needle.txt")); - assert!(pat.matches("some/other/needle.txt")); - assert!(!pat.matches("some/other/notthis.txt")); - - // a single ** should be valid, for globs - assert!(Pattern::new("**").unwrap().is_recursive); - - // collapse consecutive wildcards - let pat = Pattern::new("some/**/**/needle.txt").unwrap(); - assert!(pat.matches("some/needle.txt")); - assert!(pat.matches("some/one/needle.txt")); - assert!(pat.matches("some/one/two/needle.txt")); - assert!(pat.matches("some/other/needle.txt")); - assert!(!pat.matches("some/other/notthis.txt")); - - // ** can begin the pattern - let pat = Pattern::new("**/test").unwrap(); - assert!(pat.matches("one/two/test")); - assert!(pat.matches("one/test")); - assert!(pat.matches("test")); - - // /** can begin the pattern - let pat = Pattern::new("/**/test").unwrap(); - assert!(pat.matches("/one/two/test")); - assert!(pat.matches("/one/test")); - assert!(pat.matches("/test")); - assert!(!pat.matches("/one/notthis")); - assert!(!pat.matches("/notthis")); - } - - #[test] - fn test_lots_of_files() { - // this is a good test because it touches lots of differently named files - glob("/*/*/*/*").unwrap().skip(10000).next(); - } - - #[test] - fn test_range_pattern() { - - let pat = Pattern::new("a[0-9]b").unwrap(); - for i in 0..10 { - assert!(pat.matches(&format!("a{}b", i))); - } - assert!(!pat.matches("a_b")); - - let pat = Pattern::new("a[!0-9]b").unwrap(); - for i in 0..10 { - assert!(!pat.matches(&format!("a{}b", i))); - } - assert!(pat.matches("a_b")); - - let pats = ["[a-z123]", "[1a-z23]", "[123a-z]"]; - for &p in pats.iter() { - let pat = Pattern::new(p).unwrap(); - for c in "abcdefghijklmnopqrstuvwxyz".chars() { - assert!(pat.matches(&c.to_string())); - } - for c in "ABCDEFGHIJKLMNOPQRSTUVWXYZ".chars() { - let options = MatchOptions {case_sensitive: false, .. MatchOptions::new()}; - assert!(pat.matches_with(&c.to_string(), &options)); - } - assert!(pat.matches("1")); - assert!(pat.matches("2")); - assert!(pat.matches("3")); - } - - let pats = ["[abc-]", "[-abc]", "[a-c-]"]; - for &p in pats.iter() { - let pat = Pattern::new(p).unwrap(); - assert!(pat.matches("a")); - assert!(pat.matches("b")); - assert!(pat.matches("c")); - assert!(pat.matches("-")); - assert!(!pat.matches("d")); - } - - let pat = Pattern::new("[2-1]").unwrap(); - assert!(!pat.matches("1")); - assert!(!pat.matches("2")); - - assert!(Pattern::new("[-]").unwrap().matches("-")); - assert!(!Pattern::new("[!-]").unwrap().matches("-")); - } - - #[test] - fn test_pattern_matches() { - let txt_pat = Pattern::new("*hello.txt").unwrap(); - assert!(txt_pat.matches("hello.txt")); - assert!(txt_pat.matches("gareth_says_hello.txt")); - assert!(txt_pat.matches("some/path/to/hello.txt")); - assert!(txt_pat.matches("some\\path\\to\\hello.txt")); - assert!(txt_pat.matches("/an/absolute/path/to/hello.txt")); - assert!(!txt_pat.matches("hello.txt-and-then-some")); - assert!(!txt_pat.matches("goodbye.txt")); - - let dir_pat = Pattern::new("*some/path/to/hello.txt").unwrap(); - assert!(dir_pat.matches("some/path/to/hello.txt")); - assert!(dir_pat.matches("a/bigger/some/path/to/hello.txt")); - assert!(!dir_pat.matches("some/path/to/hello.txt-and-then-some")); - assert!(!dir_pat.matches("some/other/path/to/hello.txt")); - } - - #[test] - fn test_pattern_escape() { - let s = "_[_]_?_*_!_"; - assert_eq!(Pattern::escape(s), "_[[]_[]]_[?]_[*]_!_".to_string()); - assert!(Pattern::new(&Pattern::escape(s)).unwrap().matches(s)); - } - - #[test] - fn test_pattern_matches_case_insensitive() { - - let pat = Pattern::new("aBcDeFg").unwrap(); - let options = MatchOptions { - case_sensitive: false, - require_literal_separator: false, - require_literal_leading_dot: false - }; - - assert!(pat.matches_with("aBcDeFg", &options)); - assert!(pat.matches_with("abcdefg", &options)); - assert!(pat.matches_with("ABCDEFG", &options)); - assert!(pat.matches_with("AbCdEfG", &options)); - } - - #[test] - fn test_pattern_matches_case_insensitive_range() { - - let pat_within = Pattern::new("[a]").unwrap(); - let pat_except = Pattern::new("[!a]").unwrap(); - - let options_case_insensitive = MatchOptions { - case_sensitive: false, - require_literal_separator: false, - require_literal_leading_dot: false - }; - let options_case_sensitive = MatchOptions { - case_sensitive: true, - require_literal_separator: false, - require_literal_leading_dot: false - }; - - assert!(pat_within.matches_with("a", &options_case_insensitive)); - assert!(pat_within.matches_with("A", &options_case_insensitive)); - assert!(!pat_within.matches_with("A", &options_case_sensitive)); - - assert!(!pat_except.matches_with("a", &options_case_insensitive)); - assert!(!pat_except.matches_with("A", &options_case_insensitive)); - assert!(pat_except.matches_with("A", &options_case_sensitive)); - } - - #[test] - fn test_pattern_matches_require_literal_separator() { - - let options_require_literal = MatchOptions { - case_sensitive: true, - require_literal_separator: true, - require_literal_leading_dot: false - }; - let options_not_require_literal = MatchOptions { - case_sensitive: true, - require_literal_separator: false, - require_literal_leading_dot: false - }; - - assert!(Pattern::new("abc/def").unwrap().matches_with("abc/def", &options_require_literal)); - assert!(!Pattern::new("abc?def").unwrap().matches_with("abc/def", &options_require_literal)); - assert!(!Pattern::new("abc*def").unwrap().matches_with("abc/def", &options_require_literal)); - assert!(!Pattern::new("abc[/]def").unwrap().matches_with("abc/def", &options_require_literal)); - - assert!(Pattern::new("abc/def").unwrap().matches_with("abc/def", &options_not_require_literal)); - assert!(Pattern::new("abc?def").unwrap().matches_with("abc/def", &options_not_require_literal)); - assert!(Pattern::new("abc*def").unwrap().matches_with("abc/def", &options_not_require_literal)); - assert!(Pattern::new("abc[/]def").unwrap().matches_with("abc/def", &options_not_require_literal)); - } - - #[test] - fn test_pattern_matches_require_literal_leading_dot() { - - let options_require_literal_leading_dot = MatchOptions { - case_sensitive: true, - require_literal_separator: false, - require_literal_leading_dot: true - }; - let options_not_require_literal_leading_dot = MatchOptions { - case_sensitive: true, - require_literal_separator: false, - require_literal_leading_dot: false - }; - - let f = |options| Pattern::new("*.txt").unwrap().matches_with(".hello.txt", options); - assert!(f(&options_not_require_literal_leading_dot)); - assert!(!f(&options_require_literal_leading_dot)); - - let f = |options| Pattern::new(".*.*").unwrap().matches_with(".hello.txt", options); - assert!(f(&options_not_require_literal_leading_dot)); - assert!(f(&options_require_literal_leading_dot)); - - let f = |options| Pattern::new("aaa/bbb/*").unwrap().matches_with("aaa/bbb/.ccc", options); - assert!(f(&options_not_require_literal_leading_dot)); - assert!(!f(&options_require_literal_leading_dot)); - - let f = |options| Pattern::new("aaa/bbb/*").unwrap().matches_with("aaa/bbb/c.c.c.", options); - assert!(f(&options_not_require_literal_leading_dot)); - assert!(f(&options_require_literal_leading_dot)); - - let f = |options| Pattern::new("aaa/bbb/.*").unwrap().matches_with("aaa/bbb/.ccc", options); - assert!(f(&options_not_require_literal_leading_dot)); - assert!(f(&options_require_literal_leading_dot)); - - let f = |options| Pattern::new("aaa/?bbb").unwrap().matches_with("aaa/.bbb", options); - assert!(f(&options_not_require_literal_leading_dot)); - assert!(!f(&options_require_literal_leading_dot)); - - let f = |options| Pattern::new("aaa/[.]bbb").unwrap().matches_with("aaa/.bbb", options); - assert!(f(&options_not_require_literal_leading_dot)); - assert!(!f(&options_require_literal_leading_dot)); - } - - #[test] - fn test_matches_path() { - // on windows, (Path::new("a/b").as_str().unwrap() == "a\\b"), so this - // tests that / and \ are considered equivalent on windows - assert!(Pattern::new("a/b").unwrap().matches_path(&Path::new("a/b"))); - } -} diff --git a/deps/glob-0.2.10/tests/glob-std.rs b/deps/glob-0.2.10/tests/glob-std.rs deleted file mode 100644 index e347858d3..000000000 --- a/deps/glob-0.2.10/tests/glob-std.rs +++ /dev/null @@ -1,278 +0,0 @@ -// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -// ignore-windows TempDir may cause IoError on windows: #10462 - -#![cfg_attr(test, deny(warnings))] - -extern crate glob; -extern crate tempdir; - -use glob::glob; -use std::env; -use std::path::PathBuf; -use std::fs; -use tempdir::TempDir; - -#[test] -fn main() { - fn mk_file(path: &str, directory: bool) { - if directory { - fs::create_dir(path).unwrap(); - } else { - fs::File::create(path).unwrap(); - } - } - - fn glob_vec(pattern: &str) -> Vec { - glob(pattern).unwrap().map(|r| r.unwrap()).collect() - } - - let root = TempDir::new("glob-tests"); - let root = root.ok().expect("Should have created a temp directory"); - assert!(env::set_current_dir(root.path()).is_ok()); - - mk_file("aaa", true); - mk_file("aaa/apple", true); - mk_file("aaa/orange", true); - mk_file("aaa/tomato", true); - mk_file("aaa/tomato/tomato.txt", false); - mk_file("aaa/tomato/tomoto.txt", false); - mk_file("bbb", true); - mk_file("bbb/specials", true); - mk_file("bbb/specials/!", false); - - // windows does not allow `*` or `?` characters to exist in filenames - if env::consts::FAMILY != "windows" { - mk_file("bbb/specials/*", false); - mk_file("bbb/specials/?", false); - } - - mk_file("bbb/specials/[", false); - mk_file("bbb/specials/]", false); - mk_file("ccc", true); - mk_file("xyz", true); - mk_file("xyz/x", false); - mk_file("xyz/y", false); - mk_file("xyz/z", false); - - mk_file("r", true); - mk_file("r/current_dir.md", false); - mk_file("r/one", true); - mk_file("r/one/a.md", false); - mk_file("r/one/another", true); - mk_file("r/one/another/a.md", false); - mk_file("r/one/another/deep", true); - mk_file("r/one/another/deep/spelunking.md", false); - mk_file("r/another", true); - mk_file("r/another/a.md", false); - mk_file("r/two", true); - mk_file("r/two/b.md", false); - mk_file("r/three", true); - mk_file("r/three/c.md", false); - - // all recursive entities - assert_eq!(glob_vec("r/**"), vec!( - PathBuf::from("r/another"), - PathBuf::from("r/one"), - PathBuf::from("r/one/another"), - PathBuf::from("r/one/another/deep"), - PathBuf::from("r/three"), - PathBuf::from("r/two"))); - - // collapse consecutive recursive patterns - assert_eq!(glob_vec("r/**/**"), vec!( - PathBuf::from("r/another"), - PathBuf::from("r/one"), - PathBuf::from("r/one/another"), - PathBuf::from("r/one/another/deep"), - PathBuf::from("r/three"), - PathBuf::from("r/two"))); - - assert_eq!(glob_vec("r/**/*"), vec!( - PathBuf::from("r/another"), - PathBuf::from("r/another/a.md"), - PathBuf::from("r/current_dir.md"), - PathBuf::from("r/one"), - PathBuf::from("r/one/a.md"), - PathBuf::from("r/one/another"), - PathBuf::from("r/one/another/a.md"), - PathBuf::from("r/one/another/deep"), - PathBuf::from("r/one/another/deep/spelunking.md"), - PathBuf::from("r/three"), - PathBuf::from("r/three/c.md"), - PathBuf::from("r/two"), - PathBuf::from("r/two/b.md"))); - - // followed by a wildcard - assert_eq!(glob_vec("r/**/*.md"), vec!( - PathBuf::from("r/another/a.md"), - PathBuf::from("r/current_dir.md"), - PathBuf::from("r/one/a.md"), - PathBuf::from("r/one/another/a.md"), - PathBuf::from("r/one/another/deep/spelunking.md"), - PathBuf::from("r/three/c.md"), - PathBuf::from("r/two/b.md"))); - - // followed by a precise pattern - assert_eq!(glob_vec("r/one/**/a.md"), vec!( - PathBuf::from("r/one/a.md"), - PathBuf::from("r/one/another/a.md"))); - - // followed by another recursive pattern - // collapses consecutive recursives into one - assert_eq!(glob_vec("r/one/**/**/a.md"), vec!( - PathBuf::from("r/one/a.md"), - PathBuf::from("r/one/another/a.md"))); - - // followed by two precise patterns - assert_eq!(glob_vec("r/**/another/a.md"), vec!( - PathBuf::from("r/another/a.md"), - PathBuf::from("r/one/another/a.md"))); - - assert_eq!(glob_vec(""), Vec::new()); - assert_eq!(glob_vec("."), vec!(PathBuf::from("."))); - assert_eq!(glob_vec(".."), vec!(PathBuf::from(".."))); - - assert_eq!(glob_vec("aaa"), vec!(PathBuf::from("aaa"))); - assert_eq!(glob_vec("aaa/"), vec!(PathBuf::from("aaa"))); - assert_eq!(glob_vec("a"), Vec::new()); - assert_eq!(glob_vec("aa"), Vec::new()); - assert_eq!(glob_vec("aaaa"), Vec::new()); - - assert_eq!(glob_vec("aaa/apple"), vec!(PathBuf::from("aaa/apple"))); - assert_eq!(glob_vec("aaa/apple/nope"), Vec::new()); - - // windows should support both / and \ as directory separators - if env::consts::FAMILY == "windows" { - assert_eq!(glob_vec("aaa\\apple"), vec!(PathBuf::from("aaa/apple"))); - } - - assert_eq!(glob_vec("???/"), vec!( - PathBuf::from("aaa"), - PathBuf::from("bbb"), - PathBuf::from("ccc"), - PathBuf::from("xyz"))); - - assert_eq!(glob_vec("aaa/tomato/tom?to.txt"), vec!( - PathBuf::from("aaa/tomato/tomato.txt"), - PathBuf::from("aaa/tomato/tomoto.txt"))); - - assert_eq!(glob_vec("xyz/?"), vec!( - PathBuf::from("xyz/x"), - PathBuf::from("xyz/y"), - PathBuf::from("xyz/z"))); - - assert_eq!(glob_vec("a*"), vec!(PathBuf::from("aaa"))); - assert_eq!(glob_vec("*a*"), vec!(PathBuf::from("aaa"))); - assert_eq!(glob_vec("a*a"), vec!(PathBuf::from("aaa"))); - assert_eq!(glob_vec("aaa*"), vec!(PathBuf::from("aaa"))); - assert_eq!(glob_vec("*aaa"), vec!(PathBuf::from("aaa"))); - assert_eq!(glob_vec("*aaa*"), vec!(PathBuf::from("aaa"))); - assert_eq!(glob_vec("*a*a*a*"), vec!(PathBuf::from("aaa"))); - assert_eq!(glob_vec("aaa*/"), vec!(PathBuf::from("aaa"))); - - assert_eq!(glob_vec("aaa/*"), vec!( - PathBuf::from("aaa/apple"), - PathBuf::from("aaa/orange"), - PathBuf::from("aaa/tomato"))); - - assert_eq!(glob_vec("aaa/*a*"), vec!( - PathBuf::from("aaa/apple"), - PathBuf::from("aaa/orange"), - PathBuf::from("aaa/tomato"))); - - assert_eq!(glob_vec("*/*/*.txt"), vec!( - PathBuf::from("aaa/tomato/tomato.txt"), - PathBuf::from("aaa/tomato/tomoto.txt"))); - - assert_eq!(glob_vec("*/*/t[aob]m?to[.]t[!y]t"), vec!( - PathBuf::from("aaa/tomato/tomato.txt"), - PathBuf::from("aaa/tomato/tomoto.txt"))); - - assert_eq!(glob_vec("./aaa"), vec!(PathBuf::from("aaa"))); - assert_eq!(glob_vec("./*"), glob_vec("*")); - assert_eq!(glob_vec("*/..").pop().unwrap(), PathBuf::from("xyz/..")); - assert_eq!(glob_vec("aaa/../bbb"), vec!(PathBuf::from("aaa/../bbb"))); - assert_eq!(glob_vec("nonexistent/../bbb"), Vec::new()); - assert_eq!(glob_vec("aaa/tomato/tomato.txt/.."), Vec::new()); - - assert_eq!(glob_vec("aaa/tomato/tomato.txt/"), Vec::new()); - - assert_eq!(glob_vec("aa[a]"), vec!(PathBuf::from("aaa"))); - assert_eq!(glob_vec("aa[abc]"), vec!(PathBuf::from("aaa"))); - assert_eq!(glob_vec("a[bca]a"), vec!(PathBuf::from("aaa"))); - assert_eq!(glob_vec("aa[b]"), Vec::new()); - assert_eq!(glob_vec("aa[xyz]"), Vec::new()); - assert_eq!(glob_vec("aa[]]"), Vec::new()); - - assert_eq!(glob_vec("aa[!b]"), vec!(PathBuf::from("aaa"))); - assert_eq!(glob_vec("aa[!bcd]"), vec!(PathBuf::from("aaa"))); - assert_eq!(glob_vec("a[!bcd]a"), vec!(PathBuf::from("aaa"))); - assert_eq!(glob_vec("aa[!a]"), Vec::new()); - assert_eq!(glob_vec("aa[!abc]"), Vec::new()); - - assert_eq!(glob_vec("bbb/specials/[[]"), vec!(PathBuf::from("bbb/specials/["))); - assert_eq!(glob_vec("bbb/specials/!"), vec!(PathBuf::from("bbb/specials/!"))); - assert_eq!(glob_vec("bbb/specials/[]]"), vec!(PathBuf::from("bbb/specials/]"))); - - if env::consts::FAMILY != "windows" { - assert_eq!(glob_vec("bbb/specials/[*]"), vec!(PathBuf::from("bbb/specials/*"))); - assert_eq!(glob_vec("bbb/specials/[?]"), vec!(PathBuf::from("bbb/specials/?"))); - } - - if env::consts::FAMILY == "windows" { - - assert_eq!(glob_vec("bbb/specials/[![]"), vec!( - PathBuf::from("bbb/specials/!"), - PathBuf::from("bbb/specials/]"))); - - assert_eq!(glob_vec("bbb/specials/[!]]"), vec!( - PathBuf::from("bbb/specials/!"), - PathBuf::from("bbb/specials/["))); - - assert_eq!(glob_vec("bbb/specials/[!!]"), vec!( - PathBuf::from("bbb/specials/["), - PathBuf::from("bbb/specials/]"))); - - } else { - - assert_eq!(glob_vec("bbb/specials/[![]"), vec!( - PathBuf::from("bbb/specials/!"), - PathBuf::from("bbb/specials/*"), - PathBuf::from("bbb/specials/?"), - PathBuf::from("bbb/specials/]"))); - - assert_eq!(glob_vec("bbb/specials/[!]]"), vec!( - PathBuf::from("bbb/specials/!"), - PathBuf::from("bbb/specials/*"), - PathBuf::from("bbb/specials/?"), - PathBuf::from("bbb/specials/["))); - - assert_eq!(glob_vec("bbb/specials/[!!]"), vec!( - PathBuf::from("bbb/specials/*"), - PathBuf::from("bbb/specials/?"), - PathBuf::from("bbb/specials/["), - PathBuf::from("bbb/specials/]"))); - - assert_eq!(glob_vec("bbb/specials/[!*]"), vec!( - PathBuf::from("bbb/specials/!"), - PathBuf::from("bbb/specials/?"), - PathBuf::from("bbb/specials/["), - PathBuf::from("bbb/specials/]"))); - - assert_eq!(glob_vec("bbb/specials/[!?]"), vec!( - PathBuf::from("bbb/specials/!"), - PathBuf::from("bbb/specials/*"), - PathBuf::from("bbb/specials/["), - PathBuf::from("bbb/specials/]"))); - - } -} diff --git a/deps/glob-0.2.10/.gitignore b/deps/glob-0.2.11/.gitignore similarity index 100% rename from deps/glob-0.2.10/.gitignore rename to deps/glob-0.2.11/.gitignore diff --git a/deps/glob-0.2.11/.travis.yml b/deps/glob-0.2.11/.travis.yml new file mode 100644 index 000000000..c8d7bba7f --- /dev/null +++ b/deps/glob-0.2.11/.travis.yml @@ -0,0 +1,24 @@ +language: rust +rust: + - stable + - beta + - nightly +sudo: false +script: + - cargo build --verbose + - cargo test --verbose + - cargo doc +after_success: | + [ $TRAVIS_BRANCH = master ] && + [ $TRAVIS_PULL_REQUEST = false ] && + [ $TRAVIS_RUST_VERSION = nightly ] && + echo '' > target/doc/index.html && + pip install ghp-import --user $USER && + $HOME/.local/bin/ghp-import -n target/doc && + git push -qf https://${TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages +env: + global: + secure: I3a1njiqfFW9TpMKB715bpq3qHmsSmue/ahYbXhYbRoskWDWk+ruSKHS/X3nvSXY2Vv9oBCFaWldQvKdPtbpLYlfnIfquvUSzGzT3BW8bOAU6EY6+MQiToDln+xlcfjlSqBF4RGyrZtmuXzC1xXPKotG6jfUT1+7iOgaXLxyaRU= +notifications: + email: + on_success: never diff --git a/deps/glob-0.2.11/Cargo.toml b/deps/glob-0.2.11/Cargo.toml new file mode 100644 index 000000000..48ba71906 --- /dev/null +++ b/deps/glob-0.2.11/Cargo.toml @@ -0,0 +1,15 @@ +[package] + +name = "glob" +version = "0.2.11" +authors = ["The Rust Project Developers"] +license = "MIT/Apache-2.0" +homepage = "https://github.com/rust-lang/glob" +repository = "https://github.com/rust-lang/glob" +documentation = "https://doc.rust-lang.org/glob" +description = """ +Support for matching file paths against Unix shell style patterns. +""" + +[dev-dependencies] +tempdir = "0.3" diff --git a/deps/libc-0.2.7/LICENSE-APACHE b/deps/glob-0.2.11/LICENSE-APACHE similarity index 100% rename from deps/libc-0.2.7/LICENSE-APACHE rename to deps/glob-0.2.11/LICENSE-APACHE diff --git a/deps/glob-0.2.10/LICENSE-MIT b/deps/glob-0.2.11/LICENSE-MIT similarity index 100% rename from deps/glob-0.2.10/LICENSE-MIT rename to deps/glob-0.2.11/LICENSE-MIT diff --git a/deps/glob-0.2.11/README.md b/deps/glob-0.2.11/README.md new file mode 100644 index 000000000..86b112da6 --- /dev/null +++ b/deps/glob-0.2.11/README.md @@ -0,0 +1,24 @@ +glob +==== + +Support for matching file paths against Unix shell style patterns. + +[![Build Status](https://travis-ci.org/rust-lang-nursery/glob.svg?branch=master)](https://travis-ci.org/rust-lang-nursery/glob) + +[Documentation](https://doc.rust-lang.org/glob) + +## Usage + +To use `glob`, add this to your `Cargo.toml`: + +```toml +[dependencies] +glob = "*" +``` + +And add this to your crate root: + +```rust +extern crate glob; +``` + diff --git a/deps/glob-0.2.11/src/lib.rs b/deps/glob-0.2.11/src/lib.rs new file mode 100644 index 000000000..a26b99689 --- /dev/null +++ b/deps/glob-0.2.11/src/lib.rs @@ -0,0 +1,1312 @@ +// Copyright 2014 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +//! Support for matching file paths against Unix shell style patterns. +//! +//! The `glob` and `glob_with` functions, in concert with the `Paths` +//! type, allow querying the filesystem for all files that match a particular +//! pattern - just like the libc `glob` function (for an example see the `glob` +//! documentation). The methods on the `Pattern` type provide functionality +//! for checking if individual paths match a particular pattern - in a similar +//! manner to the libc `fnmatch` function +//! For consistency across platforms, and for Windows support, this module +//! is implemented entirely in Rust rather than deferring to the libc +//! `glob`/`fnmatch` functions. + +#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", + html_favicon_url = "https://www.rust-lang.org/favicon.ico", + html_root_url = "https://doc.rust-lang.org/glob/")] +#![cfg_attr(all(test, windows), feature(std_misc))] + +use std::ascii::AsciiExt; +use std::cmp; +use std::fmt; +use std::fs; +use std::io::prelude::*; +use std::io; +use std::path::{self, Path, PathBuf, Component}; +use std::str::FromStr; +use std::error::Error; + +use PatternToken::{Char, AnyChar, AnySequence, AnyRecursiveSequence, AnyWithin}; +use PatternToken::AnyExcept; +use CharSpecifier::{SingleChar, CharRange}; +use MatchResult::{Match, SubPatternDoesntMatch, EntirePatternDoesntMatch}; + +/// An iterator that yields `Path`s from the filesystem that match a particular +/// pattern. +/// +/// Note that it yields `GlobResult` in order to report any `IoErrors` that may +/// arise during iteration. If a directory matches but is unreadable, +/// thereby preventing its contents from being checked for matches, a +/// `GlobError` is returned to express this. +/// +/// See the `glob` function for more details. +pub struct Paths { + dir_patterns: Vec, + require_dir: bool, + options: MatchOptions, + todo: Vec>, + scope: Option, +} + +/// Return an iterator that produces all the Paths that match the given pattern, +/// which may be absolute or relative to the current working directory. +/// +/// This may return an error if the pattern is invalid. +/// +/// This method uses the default match options and is equivalent to calling +/// `glob_with(pattern, MatchOptions::new())`. Use `glob_with` directly if you +/// want to use non-default match options. +/// +/// When iterating, each result is a `GlobResult` which expresses the +/// possibility that there was an `IoError` when attempting to read the contents +/// of the matched path. In other words, each item returned by the iterator +/// will either be an `Ok(Path)` if the path matched, or an `Err(GlobError)` if +/// the path (partially) matched _but_ its contents could not be read in order +/// to determine if its contents matched. +/// +/// See the `Paths` documentation for more information. +/// +/// # Example +/// +/// Consider a directory `/media/pictures` containing only the files +/// `kittens.jpg`, `puppies.jpg` and `hamsters.gif`: +/// +/// ```rust +/// use glob::glob; +/// +/// for entry in glob("/media/pictures/*.jpg").unwrap() { +/// match entry { +/// Ok(path) => println!("{:?}", path.display()), +/// +/// // if the path matched but was unreadable, +/// // thereby preventing its contents from matching +/// Err(e) => println!("{:?}", e), +/// } +/// } +/// ``` +/// +/// The above code will print: +/// +/// ```ignore +/// /media/pictures/kittens.jpg +/// /media/pictures/puppies.jpg +/// ``` +/// +/// If you want to ignore unreadable paths, you can use something like +/// `filter_map`: +/// +/// ```rust +/// use glob::glob; +/// use std::result::Result; +/// +/// for path in glob("/media/pictures/*.jpg").unwrap().filter_map(Result::ok) { +/// println!("{}", path.display()); +/// } +/// ``` +/// +pub fn glob(pattern: &str) -> Result { + glob_with(pattern, &MatchOptions::new()) +} + +/// Return an iterator that produces all the Paths that match the given pattern, +/// which may be absolute or relative to the current working directory. +/// +/// This may return an error if the pattern is invalid. +/// +/// This function accepts Unix shell style patterns as described by +/// `Pattern::new(..)`. The options given are passed through unchanged to +/// `Pattern::matches_with(..)` with the exception that +/// `require_literal_separator` is always set to `true` regardless of the value +/// passed to this function. +/// +/// Paths are yielded in alphabetical order. +pub fn glob_with(pattern: &str, options: &MatchOptions) -> Result { + // make sure that the pattern is valid first, else early return with error + let _compiled = try!(Pattern::new(pattern)); + + #[cfg(windows)] + fn check_windows_verbatim(p: &Path) -> bool { + use std::path::Prefix; + match p.components().next() { + Some(Component::Prefix(ref p)) => p.kind().is_verbatim(), + _ => false, + } + } + #[cfg(not(windows))] + fn check_windows_verbatim(_: &Path) -> bool { + false + } + + #[cfg(windows)] + fn to_scope(p: &Path) -> PathBuf { + // FIXME handle volume relative paths here + p.to_path_buf() + } + #[cfg(not(windows))] + fn to_scope(p: &Path) -> PathBuf { + p.to_path_buf() + } + + let mut components = Path::new(pattern).components().peekable(); + loop { + match components.peek() { + Some(&Component::Prefix(..)) | + Some(&Component::RootDir) => { + components.next(); + } + _ => break, + } + } + let rest = components.map(|s| s.as_os_str()).collect::(); + let normalized_pattern = Path::new(pattern).iter().collect::(); + let root_len = normalized_pattern.to_str().unwrap().len() - rest.to_str().unwrap().len(); + let root = if root_len > 0 { + Some(Path::new(&pattern[..root_len])) + } else { + None + }; + + if root_len > 0 && check_windows_verbatim(root.unwrap()) { + // FIXME: How do we want to handle verbatim paths? I'm inclined to + // return nothing, since we can't very well find all UNC shares with a + // 1-letter server name. + return Ok(Paths { + dir_patterns: Vec::new(), + require_dir: false, + options: options.clone(), + todo: Vec::new(), + scope: None, + }); + } + + let scope = root.map(to_scope).unwrap_or_else(|| PathBuf::from(".")); + + let mut dir_patterns = Vec::new(); + let components = pattern[cmp::min(root_len, pattern.len())..] + .split_terminator(path::is_separator); + + for component in components { + let compiled = try!(Pattern::new(component)); + dir_patterns.push(compiled); + } + + if root_len == pattern.len() { + dir_patterns.push(Pattern { + original: "".to_string(), + tokens: Vec::new(), + is_recursive: false, + }); + } + + let require_dir = pattern.chars().next_back().map(path::is_separator) == Some(true); + let todo = Vec::new(); + + Ok(Paths { + dir_patterns: dir_patterns, + require_dir: require_dir, + options: options.clone(), + todo: todo, + scope: Some(scope), + }) +} + +/// A glob iteration error. +/// +/// This is typically returned when a particular path cannot be read +/// to determine if its contents match the glob pattern. This is possible +/// if the program lacks the permissions, for example. +#[derive(Debug)] +pub struct GlobError { + path: PathBuf, + error: io::Error, +} + +impl GlobError { + /// The Path that the error corresponds to. + pub fn path(&self) -> &Path { + &self.path + } + + /// The error in question. + pub fn error(&self) -> &io::Error { + &self.error + } +} + +impl Error for GlobError { + fn description(&self) -> &str { + self.error.description() + } + fn cause(&self) -> Option<&Error> { + Some(&self.error) + } +} + +impl fmt::Display for GlobError { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + write!(f, + "attempting to read `{}` resulted in an error: {}", + self.path.display(), + self.error) + } +} + +fn is_dir(p: &Path) -> bool { + fs::metadata(p).map(|m| m.is_dir()).unwrap_or(false) +} + +/// An alias for a glob iteration result. +/// +/// This represents either a matched path or a glob iteration error, +/// such as failing to read a particular directory's contents. +pub type GlobResult = Result; + +impl Iterator for Paths { + type Item = GlobResult; + + fn next(&mut self) -> Option { + // the todo buffer hasn't been initialized yet, so it's done at this + // point rather than in glob() so that the errors are unified that is, + // failing to fill the buffer is an iteration error construction of the + // iterator (i.e. glob()) only fails if it fails to compile the Pattern + if let Some(scope) = self.scope.take() { + if self.dir_patterns.len() > 0 { + // Shouldn't happen, but we're using -1 as a special index. + assert!(self.dir_patterns.len() < !0 as usize); + + fill_todo(&mut self.todo, &self.dir_patterns, 0, &scope, &self.options); + } + } + + loop { + if self.dir_patterns.is_empty() || self.todo.is_empty() { + return None; + } + + let (path, mut idx) = match self.todo.pop().unwrap() { + Ok(pair) => pair, + Err(e) => return Some(Err(e)), + }; + + // idx -1: was already checked by fill_todo, maybe path was '.' or + // '..' that we can't match here because of normalization. + if idx == !0 as usize { + if self.require_dir && !is_dir(&path) { + continue; + } + return Some(Ok(path)); + } + + if self.dir_patterns[idx].is_recursive { + let mut next = idx; + + // collapse consecutive recursive patterns + while (next + 1) < self.dir_patterns.len() && + self.dir_patterns[next + 1].is_recursive { + next += 1; + } + + if is_dir(&path) { + // the path is a directory, so it's a match + + // push this directory's contents + fill_todo(&mut self.todo, + &self.dir_patterns, + next, + &path, + &self.options); + + if next == self.dir_patterns.len() - 1 { + // pattern ends in recursive pattern, so return this + // directory as a result + return Some(Ok(path)); + } else { + // advanced to the next pattern for this path + idx = next + 1; + } + } else if next != self.dir_patterns.len() - 1 { + // advanced to the next pattern for this path + idx = next + 1; + } else { + // not a directory and it's the last pattern, meaning no match + continue; + } + } + + // not recursive, so match normally + if self.dir_patterns[idx].matches_with({ + match path.file_name().and_then(|s| s.to_str()) { + // FIXME (#9639): How do we handle non-utf8 filenames? + // Ignore them for now Ideally we'd still match them + // against a * + None => continue, + Some(x) => x + } + }, &self.options) { + if idx == self.dir_patterns.len() - 1 { + // it is not possible for a pattern to match a directory + // *AND* its children so we don't need to check the + // children + + if !self.require_dir || is_dir(&path) { + return Some(Ok(path)); + } + } else { + fill_todo(&mut self.todo, &self.dir_patterns, + idx + 1, &path, &self.options); + } + } + } + } +} + +/// A pattern parsing error. +#[derive(Debug)] +#[allow(missing_copy_implementations)] +pub struct PatternError { + /// The approximate character index of where the error occurred. + pub pos: usize, + + /// A message describing the error. + pub msg: &'static str, +} + +impl Error for PatternError { + fn description(&self) -> &str { + self.msg + } +} + +impl fmt::Display for PatternError { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + write!(f, + "Pattern syntax error near position {}: {}", + self.pos, + self.msg) + } +} + +/// A compiled Unix shell style pattern. +/// +/// `?` matches any single character +/// +/// `*` matches any (possibly empty) sequence of characters +/// +/// `**` matches the current directory and arbitrary subdirectories. This +/// sequence **must** form a single path component, so both `**a` and `b**` are +/// invalid and will result in an error. A sequence of more than two +/// consecutive `*` characters is also invalid. +/// +/// `[...]` matches any character inside the brackets. +/// Character sequences can also specify ranges +/// of characters, as ordered by Unicode, so e.g. `[0-9]` specifies any +/// character between 0 and 9 inclusive. An unclosed bracket is invalid. +/// +/// `[!...]` is the negation of `[...]`, i.e. it matches any characters **not** +/// in the brackets. +/// +/// The metacharacters `?`, `*`, `[`, `]` can be matched by using brackets +/// (e.g. `[?]`). When a `]` occurs immediately following `[` or `[!` then +/// it is interpreted as being part of, rather then ending, the character +/// set, so `]` and NOT `]` can be matched by `[]]` and `[!]]` respectively. +/// The `-` character can be specified inside a character sequence pattern by +/// placing it at the start or the end, e.g. `[abc-]`. +#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Default, Debug)] +pub struct Pattern { + original: String, + tokens: Vec, + is_recursive: bool, +} + +/// Show the original glob pattern. +impl fmt::Display for Pattern { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + self.original.fmt(f) + } +} + +impl FromStr for Pattern { + type Err = PatternError; + + fn from_str(s: &str) -> Result { + Pattern::new(s) + } +} + +#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)] +enum PatternToken { + Char(char), + AnyChar, + AnySequence, + AnyRecursiveSequence, + AnyWithin(Vec), + AnyExcept(Vec), +} + +#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)] +enum CharSpecifier { + SingleChar(char), + CharRange(char, char), +} + +#[derive(Copy, Clone, PartialEq)] +enum MatchResult { + Match, + SubPatternDoesntMatch, + EntirePatternDoesntMatch, +} + +const ERROR_WILDCARDS: &'static str = "wildcards are either regular `*` or recursive `**`"; +const ERROR_RECURSIVE_WILDCARDS: &'static str = "recursive wildcards must form a single path \ + component"; +const ERROR_INVALID_RANGE: &'static str = "invalid range pattern"; + +impl Pattern { + /// This function compiles Unix shell style patterns. + /// + /// An invalid glob pattern will yield an error. + pub fn new(pattern: &str) -> Result { + + let chars = pattern.chars().collect::>(); + let mut tokens = Vec::new(); + let mut is_recursive = false; + let mut i = 0; + + while i < chars.len() { + match chars[i] { + '?' => { + tokens.push(AnyChar); + i += 1; + } + '*' => { + let old = i; + + while i < chars.len() && chars[i] == '*' { + i += 1; + } + + let count = i - old; + + if count > 2 { + return Err(PatternError { + pos: old + 2, + msg: ERROR_WILDCARDS, + }); + } else if count == 2 { + // ** can only be an entire path component + // i.e. a/**/b is valid, but a**/b or a/**b is not + // invalid matches are treated literally + let is_valid = if i == 2 || path::is_separator(chars[i - count - 1]) { + // it ends in a '/' + if i < chars.len() && path::is_separator(chars[i]) { + i += 1; + true + // or the pattern ends here + // this enables the existing globbing mechanism + } else if i == chars.len() { + true + // `**` ends in non-separator + } else { + return Err(PatternError { + pos: i, + msg: ERROR_RECURSIVE_WILDCARDS, + }); + } + // `**` begins with non-separator + } else { + return Err(PatternError { + pos: old - 1, + msg: ERROR_RECURSIVE_WILDCARDS, + }); + }; + + let tokens_len = tokens.len(); + + if is_valid { + // collapse consecutive AnyRecursiveSequence to a + // single one + if !(tokens_len > 1 && tokens[tokens_len - 1] == AnyRecursiveSequence) { + is_recursive = true; + tokens.push(AnyRecursiveSequence); + } + } + } else { + tokens.push(AnySequence); + } + } + '[' => { + + if i + 4 <= chars.len() && chars[i + 1] == '!' { + match chars[i + 3..].iter().position(|x| *x == ']') { + None => (), + Some(j) => { + let chars = &chars[i + 2..i + 3 + j]; + let cs = parse_char_specifiers(chars); + tokens.push(AnyExcept(cs)); + i += j + 4; + continue; + } + } + } else if i + 3 <= chars.len() && chars[i + 1] != '!' { + match chars[i + 2..].iter().position(|x| *x == ']') { + None => (), + Some(j) => { + let cs = parse_char_specifiers(&chars[i + 1..i + 2 + j]); + tokens.push(AnyWithin(cs)); + i += j + 3; + continue; + } + } + } + + // if we get here then this is not a valid range pattern + return Err(PatternError { + pos: i, + msg: ERROR_INVALID_RANGE, + }); + } + c => { + tokens.push(Char(c)); + i += 1; + } + } + } + + Ok(Pattern { + tokens: tokens, + original: pattern.to_string(), + is_recursive: is_recursive, + }) + } + + /// Escape metacharacters within the given string by surrounding them in + /// brackets. The resulting string will, when compiled into a `Pattern`, + /// match the input string and nothing else. + pub fn escape(s: &str) -> String { + let mut escaped = String::new(); + for c in s.chars() { + match c { + // note that ! does not need escaping because it is only special + // inside brackets + '?' | '*' | '[' | ']' => { + escaped.push('['); + escaped.push(c); + escaped.push(']'); + } + c => { + escaped.push(c); + } + } + } + escaped + } + + /// Return if the given `str` matches this `Pattern` using the default + /// match options (i.e. `MatchOptions::new()`). + /// + /// # Example + /// + /// ```rust + /// use glob::Pattern; + /// + /// assert!(Pattern::new("c?t").unwrap().matches("cat")); + /// assert!(Pattern::new("k[!e]tteh").unwrap().matches("kitteh")); + /// assert!(Pattern::new("d*g").unwrap().matches("doog")); + /// ``` + pub fn matches(&self, str: &str) -> bool { + self.matches_with(str, &MatchOptions::new()) + } + + /// Return if the given `Path`, when converted to a `str`, matches this + /// `Pattern` using the default match options (i.e. `MatchOptions::new()`). + pub fn matches_path(&self, path: &Path) -> bool { + // FIXME (#9639): This needs to handle non-utf8 paths + path.to_str().map_or(false, |s| self.matches(s)) + } + + /// Return if the given `str` matches this `Pattern` using the specified + /// match options. + pub fn matches_with(&self, str: &str, options: &MatchOptions) -> bool { + self.matches_from(true, str.chars(), 0, options) == Match + } + + /// Return if the given `Path`, when converted to a `str`, matches this + /// `Pattern` using the specified match options. + pub fn matches_path_with(&self, path: &Path, options: &MatchOptions) -> bool { + // FIXME (#9639): This needs to handle non-utf8 paths + path.to_str().map_or(false, |s| self.matches_with(s, options)) + } + + /// Access the original glob pattern. + pub fn as_str<'a>(&'a self) -> &'a str { + &self.original + } + + fn matches_from(&self, + mut follows_separator: bool, + mut file: std::str::Chars, + i: usize, + options: &MatchOptions) + -> MatchResult { + + for (ti, token) in self.tokens[i..].iter().enumerate() { + match *token { + AnySequence | AnyRecursiveSequence => { + // ** must be at the start. + debug_assert!(match *token { + AnyRecursiveSequence => follows_separator, + _ => true, + }); + + // Empty match + match self.matches_from(follows_separator, file.clone(), i + ti + 1, options) { + SubPatternDoesntMatch => (), // keep trying + m => return m, + }; + + while let Some(c) = file.next() { + if follows_separator && options.require_literal_leading_dot && c == '.' { + return SubPatternDoesntMatch; + } + follows_separator = path::is_separator(c); + match *token { + AnyRecursiveSequence if !follows_separator => continue, + AnySequence if options.require_literal_separator && + follows_separator => return SubPatternDoesntMatch, + _ => (), + } + match self.matches_from(follows_separator, + file.clone(), + i + ti + 1, + options) { + SubPatternDoesntMatch => (), // keep trying + m => return m, + } + } + } + _ => { + let c = match file.next() { + Some(c) => c, + None => return EntirePatternDoesntMatch, + }; + + let is_sep = path::is_separator(c); + + if !match *token { + AnyChar | AnyWithin(..) | AnyExcept(..) + if (options.require_literal_separator && is_sep) || + (follows_separator && options.require_literal_leading_dot && + c == '.') => false, + AnyChar => true, + AnyWithin(ref specifiers) => in_char_specifiers(&specifiers, c, options), + AnyExcept(ref specifiers) => !in_char_specifiers(&specifiers, c, options), + Char(c2) => chars_eq(c, c2, options.case_sensitive), + AnySequence | AnyRecursiveSequence => unreachable!(), + } { + return SubPatternDoesntMatch; + } + follows_separator = is_sep; + } + } + } + + // Iter is fused. + if file.next().is_none() { + Match + } else { + SubPatternDoesntMatch + } + } +} + +// Fills `todo` with paths under `path` to be matched by `patterns[idx]`, +// special-casing patterns to match `.` and `..`, and avoiding `readdir()` +// calls when there are no metacharacters in the pattern. +fn fill_todo(todo: &mut Vec>, + patterns: &[Pattern], + idx: usize, + path: &Path, + options: &MatchOptions) { + // convert a pattern that's just many Char(_) to a string + fn pattern_as_str(pattern: &Pattern) -> Option { + let mut s = String::new(); + for token in pattern.tokens.iter() { + match *token { + Char(c) => s.push(c), + _ => return None, + } + } + return Some(s); + } + + let add = |todo: &mut Vec<_>, next_path: PathBuf| { + if idx + 1 == patterns.len() { + // We know it's good, so don't make the iterator match this path + // against the pattern again. In particular, it can't match + // . or .. globs since these never show up as path components. + todo.push(Ok((next_path, !0 as usize))); + } else { + fill_todo(todo, patterns, idx + 1, &next_path, options); + } + }; + + let pattern = &patterns[idx]; + let is_dir = is_dir(path); + let curdir = path == Path::new("."); + match pattern_as_str(pattern) { + Some(s) => { + // This pattern component doesn't have any metacharacters, so we + // don't need to read the current directory to know where to + // continue. So instead of passing control back to the iterator, + // we can just check for that one entry and potentially recurse + // right away. + let special = "." == s || ".." == s; + let next_path = if curdir { + PathBuf::from(s) + } else { + path.join(&s) + }; + if (special && is_dir) || (!special && fs::metadata(&next_path).is_ok()) { + add(todo, next_path); + } + } + None if is_dir => { + let dirs = fs::read_dir(path).and_then(|d| { + d.map(|e| { + e.map(|e| { + if curdir { + PathBuf::from(e.path().file_name().unwrap()) + } else { + e.path() + } + }) + }) + .collect::, _>>() + }); + match dirs { + Ok(mut children) => { + children.sort_by(|p1, p2| p2.file_name().cmp(&p1.file_name())); + todo.extend(children.into_iter().map(|x| Ok((x, idx)))); + + // Matching the special directory entries . and .. that + // refer to the current and parent directory respectively + // requires that the pattern has a leading dot, even if the + // `MatchOptions` field `require_literal_leading_dot` is not + // set. + if pattern.tokens.len() > 0 && pattern.tokens[0] == Char('.') { + for &special in [".", ".."].iter() { + if pattern.matches_with(special, options) { + add(todo, path.join(special)); + } + } + } + } + Err(e) => { + todo.push(Err(GlobError { + path: path.to_path_buf(), + error: e, + })); + } + } + } + None => { + // not a directory, nothing more to find + } + } +} + +fn parse_char_specifiers(s: &[char]) -> Vec { + let mut cs = Vec::new(); + let mut i = 0; + while i < s.len() { + if i + 3 <= s.len() && s[i + 1] == '-' { + cs.push(CharRange(s[i], s[i + 2])); + i += 3; + } else { + cs.push(SingleChar(s[i])); + i += 1; + } + } + cs +} + +fn in_char_specifiers(specifiers: &[CharSpecifier], c: char, options: &MatchOptions) -> bool { + + for &specifier in specifiers.iter() { + match specifier { + SingleChar(sc) => { + if chars_eq(c, sc, options.case_sensitive) { + return true; + } + } + CharRange(start, end) => { + + // FIXME: work with non-ascii chars properly (issue #1347) + if !options.case_sensitive && c.is_ascii() && start.is_ascii() && end.is_ascii() { + + let start = start.to_ascii_lowercase(); + let end = end.to_ascii_lowercase(); + + let start_up = start.to_uppercase().next().unwrap(); + let end_up = end.to_uppercase().next().unwrap(); + + // only allow case insensitive matching when + // both start and end are within a-z or A-Z + if start != start_up && end != end_up { + let c = c.to_ascii_lowercase(); + if c >= start && c <= end { + return true; + } + } + } + + if c >= start && c <= end { + return true; + } + } + } + } + + false +} + +/// A helper function to determine if two chars are (possibly case-insensitively) equal. +fn chars_eq(a: char, b: char, case_sensitive: bool) -> bool { + if cfg!(windows) && path::is_separator(a) && path::is_separator(b) { + true + } else if !case_sensitive && a.is_ascii() && b.is_ascii() { + // FIXME: work with non-ascii chars properly (issue #9084) + a.to_ascii_lowercase() == b.to_ascii_lowercase() + } else { + a == b + } +} + + +/// Configuration options to modify the behaviour of `Pattern::matches_with(..)` +#[allow(missing_copy_implementations)] +#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] +pub struct MatchOptions { + /// Whether or not patterns should be matched in a case-sensitive manner. + /// This currently only considers upper/lower case relationships between + /// ASCII characters, but in future this might be extended to work with + /// Unicode. + pub case_sensitive: bool, + + /// If this is true then path-component separator characters (e.g. `/` on + /// Posix) must be matched by a literal `/`, rather than by `*` or `?` or + /// `[...]` + pub require_literal_separator: bool, + + /// If this is true then paths that contain components that start with a `.` + /// will not match unless the `.` appears literally in the pattern: `*`, `?`, `**`, + /// or `[...]` will not match. This is useful because such files are + /// conventionally considered hidden on Unix systems and it might be + /// desirable to skip them when listing files. + pub require_literal_leading_dot: bool, +} + +impl MatchOptions { + /// Constructs a new `MatchOptions` with default field values. This is used + /// when calling functions that do not take an explicit `MatchOptions` + /// parameter. + /// + /// This function always returns this value: + /// + /// ```rust,ignore + /// MatchOptions { + /// case_sensitive: true, + /// require_literal_separator: false. + /// require_literal_leading_dot: false + /// } + /// ``` + pub fn new() -> MatchOptions { + MatchOptions { + case_sensitive: true, + require_literal_separator: false, + require_literal_leading_dot: false, + } + } +} + +#[cfg(test)] +mod test { + use std::path::Path; + use super::{glob, Pattern, MatchOptions}; + + #[test] + fn test_pattern_from_str() { + assert!("a*b".parse::().unwrap().matches("a_b")); + assert!("a/**b".parse::().unwrap_err().pos == 4); + } + + #[test] + fn test_wildcard_errors() { + assert!(Pattern::new("a/**b").unwrap_err().pos == 4); + assert!(Pattern::new("a/bc**").unwrap_err().pos == 3); + assert!(Pattern::new("a/*****").unwrap_err().pos == 4); + assert!(Pattern::new("a/b**c**d").unwrap_err().pos == 2); + assert!(Pattern::new("a**b").unwrap_err().pos == 0); + } + + #[test] + fn test_unclosed_bracket_errors() { + assert!(Pattern::new("abc[def").unwrap_err().pos == 3); + assert!(Pattern::new("abc[!def").unwrap_err().pos == 3); + assert!(Pattern::new("abc[").unwrap_err().pos == 3); + assert!(Pattern::new("abc[!").unwrap_err().pos == 3); + assert!(Pattern::new("abc[d").unwrap_err().pos == 3); + assert!(Pattern::new("abc[!d").unwrap_err().pos == 3); + assert!(Pattern::new("abc[]").unwrap_err().pos == 3); + assert!(Pattern::new("abc[!]").unwrap_err().pos == 3); + } + + #[test] + fn test_glob_errors() { + assert!(glob("a/**b").err().unwrap().pos == 4); + assert!(glob("abc[def").err().unwrap().pos == 3); + } + + // this test assumes that there is a /root directory and that + // the user running this test is not root or otherwise doesn't + // have permission to read its contents + #[cfg(unix)] + #[test] + fn test_iteration_errors() { + use std::io; + let mut iter = glob("/root/*").unwrap(); + + // GlobErrors shouldn't halt iteration + let next = iter.next(); + assert!(next.is_some()); + + let err = next.unwrap(); + assert!(err.is_err()); + + let err = err.err().unwrap(); + assert!(err.path() == Path::new("/root")); + assert!(err.error().kind() == io::ErrorKind::PermissionDenied); + } + + #[test] + fn test_absolute_pattern() { + assert!(glob("/").unwrap().next().is_some()); + assert!(glob("//").unwrap().next().is_some()); + + // assume that the filesystem is not empty! + assert!(glob("/*").unwrap().next().is_some()); + + #[cfg(not(windows))] + fn win() {} + + #[cfg(windows)] + fn win() { + use std::env::current_dir; + use std::ffi::AsOsStr; + + // check windows absolute paths with host/device components + let root_with_device = current_dir() + .ok() + .and_then(|p| p.prefix().map(|p| p.join("*"))) + .unwrap(); + // FIXME (#9639): This needs to handle non-utf8 paths + assert!(glob(root_with_device.as_os_str().to_str().unwrap()).unwrap().next().is_some()); + } + win() + } + + #[test] + fn test_wildcards() { + assert!(Pattern::new("a*b").unwrap().matches("a_b")); + assert!(Pattern::new("a*b*c").unwrap().matches("abc")); + assert!(!Pattern::new("a*b*c").unwrap().matches("abcd")); + assert!(Pattern::new("a*b*c").unwrap().matches("a_b_c")); + assert!(Pattern::new("a*b*c").unwrap().matches("a___b___c")); + assert!(Pattern::new("abc*abc*abc").unwrap().matches("abcabcabcabcabcabcabc")); + assert!(!Pattern::new("abc*abc*abc").unwrap().matches("abcabcabcabcabcabcabca")); + assert!(Pattern::new("a*a*a*a*a*a*a*a*a") + .unwrap() + .matches("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")); + assert!(Pattern::new("a*b[xyz]c*d").unwrap().matches("abxcdbxcddd")); + } + + #[test] + fn test_recursive_wildcards() { + let pat = Pattern::new("some/**/needle.txt").unwrap(); + assert!(pat.matches("some/needle.txt")); + assert!(pat.matches("some/one/needle.txt")); + assert!(pat.matches("some/one/two/needle.txt")); + assert!(pat.matches("some/other/needle.txt")); + assert!(!pat.matches("some/other/notthis.txt")); + + // a single ** should be valid, for globs + // Should accept anything + let pat = Pattern::new("**").unwrap(); + assert!(pat.is_recursive); + assert!(pat.matches("abcde")); + assert!(pat.matches("")); + assert!(pat.matches(".asdf")); + assert!(pat.matches("/x/.asdf")); + + + // collapse consecutive wildcards + let pat = Pattern::new("some/**/**/needle.txt").unwrap(); + assert!(pat.matches("some/needle.txt")); + assert!(pat.matches("some/one/needle.txt")); + assert!(pat.matches("some/one/two/needle.txt")); + assert!(pat.matches("some/other/needle.txt")); + assert!(!pat.matches("some/other/notthis.txt")); + + // ** can begin the pattern + let pat = Pattern::new("**/test").unwrap(); + assert!(pat.matches("one/two/test")); + assert!(pat.matches("one/test")); + assert!(pat.matches("test")); + + // /** can begin the pattern + let pat = Pattern::new("/**/test").unwrap(); + assert!(pat.matches("/one/two/test")); + assert!(pat.matches("/one/test")); + assert!(pat.matches("/test")); + assert!(!pat.matches("/one/notthis")); + assert!(!pat.matches("/notthis")); + + // Only start sub-patterns on start of path segment. + let pat = Pattern::new("**/.*").unwrap(); + assert!(pat.matches(".abc")); + assert!(pat.matches("abc/.abc")); + assert!(!pat.matches("ab.c")); + assert!(!pat.matches("abc/ab.c")); + } + + #[test] + fn test_lots_of_files() { + // this is a good test because it touches lots of differently named files + glob("/*/*/*/*").unwrap().skip(10000).next(); + } + + #[test] + fn test_range_pattern() { + + let pat = Pattern::new("a[0-9]b").unwrap(); + for i in 0..10 { + assert!(pat.matches(&format!("a{}b", i))); + } + assert!(!pat.matches("a_b")); + + let pat = Pattern::new("a[!0-9]b").unwrap(); + for i in 0..10 { + assert!(!pat.matches(&format!("a{}b", i))); + } + assert!(pat.matches("a_b")); + + let pats = ["[a-z123]", "[1a-z23]", "[123a-z]"]; + for &p in pats.iter() { + let pat = Pattern::new(p).unwrap(); + for c in "abcdefghijklmnopqrstuvwxyz".chars() { + assert!(pat.matches(&c.to_string())); + } + for c in "ABCDEFGHIJKLMNOPQRSTUVWXYZ".chars() { + let options = MatchOptions { case_sensitive: false, ..MatchOptions::new() }; + assert!(pat.matches_with(&c.to_string(), &options)); + } + assert!(pat.matches("1")); + assert!(pat.matches("2")); + assert!(pat.matches("3")); + } + + let pats = ["[abc-]", "[-abc]", "[a-c-]"]; + for &p in pats.iter() { + let pat = Pattern::new(p).unwrap(); + assert!(pat.matches("a")); + assert!(pat.matches("b")); + assert!(pat.matches("c")); + assert!(pat.matches("-")); + assert!(!pat.matches("d")); + } + + let pat = Pattern::new("[2-1]").unwrap(); + assert!(!pat.matches("1")); + assert!(!pat.matches("2")); + + assert!(Pattern::new("[-]").unwrap().matches("-")); + assert!(!Pattern::new("[!-]").unwrap().matches("-")); + } + + #[test] + fn test_pattern_matches() { + let txt_pat = Pattern::new("*hello.txt").unwrap(); + assert!(txt_pat.matches("hello.txt")); + assert!(txt_pat.matches("gareth_says_hello.txt")); + assert!(txt_pat.matches("some/path/to/hello.txt")); + assert!(txt_pat.matches("some\\path\\to\\hello.txt")); + assert!(txt_pat.matches("/an/absolute/path/to/hello.txt")); + assert!(!txt_pat.matches("hello.txt-and-then-some")); + assert!(!txt_pat.matches("goodbye.txt")); + + let dir_pat = Pattern::new("*some/path/to/hello.txt").unwrap(); + assert!(dir_pat.matches("some/path/to/hello.txt")); + assert!(dir_pat.matches("a/bigger/some/path/to/hello.txt")); + assert!(!dir_pat.matches("some/path/to/hello.txt-and-then-some")); + assert!(!dir_pat.matches("some/other/path/to/hello.txt")); + } + + #[test] + fn test_pattern_escape() { + let s = "_[_]_?_*_!_"; + assert_eq!(Pattern::escape(s), "_[[]_[]]_[?]_[*]_!_".to_string()); + assert!(Pattern::new(&Pattern::escape(s)).unwrap().matches(s)); + } + + #[test] + fn test_pattern_matches_case_insensitive() { + + let pat = Pattern::new("aBcDeFg").unwrap(); + let options = MatchOptions { + case_sensitive: false, + require_literal_separator: false, + require_literal_leading_dot: false, + }; + + assert!(pat.matches_with("aBcDeFg", &options)); + assert!(pat.matches_with("abcdefg", &options)); + assert!(pat.matches_with("ABCDEFG", &options)); + assert!(pat.matches_with("AbCdEfG", &options)); + } + + #[test] + fn test_pattern_matches_case_insensitive_range() { + + let pat_within = Pattern::new("[a]").unwrap(); + let pat_except = Pattern::new("[!a]").unwrap(); + + let options_case_insensitive = MatchOptions { + case_sensitive: false, + require_literal_separator: false, + require_literal_leading_dot: false, + }; + let options_case_sensitive = MatchOptions { + case_sensitive: true, + require_literal_separator: false, + require_literal_leading_dot: false, + }; + + assert!(pat_within.matches_with("a", &options_case_insensitive)); + assert!(pat_within.matches_with("A", &options_case_insensitive)); + assert!(!pat_within.matches_with("A", &options_case_sensitive)); + + assert!(!pat_except.matches_with("a", &options_case_insensitive)); + assert!(!pat_except.matches_with("A", &options_case_insensitive)); + assert!(pat_except.matches_with("A", &options_case_sensitive)); + } + + #[test] + fn test_pattern_matches_require_literal_separator() { + + let options_require_literal = MatchOptions { + case_sensitive: true, + require_literal_separator: true, + require_literal_leading_dot: false, + }; + let options_not_require_literal = MatchOptions { + case_sensitive: true, + require_literal_separator: false, + require_literal_leading_dot: false, + }; + + assert!(Pattern::new("abc/def").unwrap().matches_with("abc/def", &options_require_literal)); + assert!(!Pattern::new("abc?def") + .unwrap() + .matches_with("abc/def", &options_require_literal)); + assert!(!Pattern::new("abc*def") + .unwrap() + .matches_with("abc/def", &options_require_literal)); + assert!(!Pattern::new("abc[/]def") + .unwrap() + .matches_with("abc/def", &options_require_literal)); + + assert!(Pattern::new("abc/def") + .unwrap() + .matches_with("abc/def", &options_not_require_literal)); + assert!(Pattern::new("abc?def") + .unwrap() + .matches_with("abc/def", &options_not_require_literal)); + assert!(Pattern::new("abc*def") + .unwrap() + .matches_with("abc/def", &options_not_require_literal)); + assert!(Pattern::new("abc[/]def") + .unwrap() + .matches_with("abc/def", &options_not_require_literal)); + } + + #[test] + fn test_pattern_matches_require_literal_leading_dot() { + + let options_require_literal_leading_dot = MatchOptions { + case_sensitive: true, + require_literal_separator: false, + require_literal_leading_dot: true, + }; + let options_not_require_literal_leading_dot = MatchOptions { + case_sensitive: true, + require_literal_separator: false, + require_literal_leading_dot: false, + }; + + let f = |options| Pattern::new("*.txt").unwrap().matches_with(".hello.txt", options); + assert!(f(&options_not_require_literal_leading_dot)); + assert!(!f(&options_require_literal_leading_dot)); + + let f = |options| Pattern::new(".*.*").unwrap().matches_with(".hello.txt", options); + assert!(f(&options_not_require_literal_leading_dot)); + assert!(f(&options_require_literal_leading_dot)); + + let f = |options| Pattern::new("aaa/bbb/*").unwrap().matches_with("aaa/bbb/.ccc", options); + assert!(f(&options_not_require_literal_leading_dot)); + assert!(!f(&options_require_literal_leading_dot)); + + let f = |options| { + Pattern::new("aaa/bbb/*").unwrap().matches_with("aaa/bbb/c.c.c.", options) + }; + assert!(f(&options_not_require_literal_leading_dot)); + assert!(f(&options_require_literal_leading_dot)); + + let f = |options| Pattern::new("aaa/bbb/.*").unwrap().matches_with("aaa/bbb/.ccc", options); + assert!(f(&options_not_require_literal_leading_dot)); + assert!(f(&options_require_literal_leading_dot)); + + let f = |options| Pattern::new("aaa/?bbb").unwrap().matches_with("aaa/.bbb", options); + assert!(f(&options_not_require_literal_leading_dot)); + assert!(!f(&options_require_literal_leading_dot)); + + let f = |options| Pattern::new("aaa/[.]bbb").unwrap().matches_with("aaa/.bbb", options); + assert!(f(&options_not_require_literal_leading_dot)); + assert!(!f(&options_require_literal_leading_dot)); + + let f = |options| Pattern::new("**/*").unwrap().matches_with(".bbb", options); + assert!(f(&options_not_require_literal_leading_dot)); + assert!(!f(&options_require_literal_leading_dot)); + } + + #[test] + fn test_matches_path() { + // on windows, (Path::new("a/b").as_str().unwrap() == "a\\b"), so this + // tests that / and \ are considered equivalent on windows + assert!(Pattern::new("a/b").unwrap().matches_path(&Path::new("a/b"))); + } + + #[test] + fn test_path_join() { + let pattern = Path::new("one").join(&Path::new("**/*.rs")); + assert!(Pattern::new(pattern.to_str().unwrap()).is_ok()); + } +} diff --git a/deps/glob-0.2.11/tests/glob-std.rs b/deps/glob-0.2.11/tests/glob-std.rs new file mode 100644 index 000000000..c42641850 --- /dev/null +++ b/deps/glob-0.2.11/tests/glob-std.rs @@ -0,0 +1,278 @@ +// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +// ignore-windows TempDir may cause IoError on windows: #10462 + +#![cfg_attr(test, deny(warnings))] + +extern crate glob; +extern crate tempdir; + +use glob::glob; +use std::env; +use std::path::PathBuf; +use std::fs; +use tempdir::TempDir; + +#[test] +fn main() { + fn mk_file(path: &str, directory: bool) { + if directory { + fs::create_dir(path).unwrap(); + } else { + fs::File::create(path).unwrap(); + } + } + + fn glob_vec(pattern: &str) -> Vec { + glob(pattern).unwrap().map(|r| r.unwrap()).collect() + } + + let root = TempDir::new("glob-tests"); + let root = root.ok().expect("Should have created a temp directory"); + assert!(env::set_current_dir(root.path()).is_ok()); + + mk_file("aaa", true); + mk_file("aaa/apple", true); + mk_file("aaa/orange", true); + mk_file("aaa/tomato", true); + mk_file("aaa/tomato/tomato.txt", false); + mk_file("aaa/tomato/tomoto.txt", false); + mk_file("bbb", true); + mk_file("bbb/specials", true); + mk_file("bbb/specials/!", false); + + // windows does not allow `*` or `?` characters to exist in filenames + if env::consts::FAMILY != "windows" { + mk_file("bbb/specials/*", false); + mk_file("bbb/specials/?", false); + } + + mk_file("bbb/specials/[", false); + mk_file("bbb/specials/]", false); + mk_file("ccc", true); + mk_file("xyz", true); + mk_file("xyz/x", false); + mk_file("xyz/y", false); + mk_file("xyz/z", false); + + mk_file("r", true); + mk_file("r/current_dir.md", false); + mk_file("r/one", true); + mk_file("r/one/a.md", false); + mk_file("r/one/another", true); + mk_file("r/one/another/a.md", false); + mk_file("r/one/another/deep", true); + mk_file("r/one/another/deep/spelunking.md", false); + mk_file("r/another", true); + mk_file("r/another/a.md", false); + mk_file("r/two", true); + mk_file("r/two/b.md", false); + mk_file("r/three", true); + mk_file("r/three/c.md", false); + + // all recursive entities + assert_eq!(glob_vec("r/**"), vec!( + PathBuf::from("r/another"), + PathBuf::from("r/one"), + PathBuf::from("r/one/another"), + PathBuf::from("r/one/another/deep"), + PathBuf::from("r/three"), + PathBuf::from("r/two"))); + + // collapse consecutive recursive patterns + assert_eq!(glob_vec("r/**/**"), vec!( + PathBuf::from("r/another"), + PathBuf::from("r/one"), + PathBuf::from("r/one/another"), + PathBuf::from("r/one/another/deep"), + PathBuf::from("r/three"), + PathBuf::from("r/two"))); + + assert_eq!(glob_vec("r/**/*"), vec!( + PathBuf::from("r/another"), + PathBuf::from("r/another/a.md"), + PathBuf::from("r/current_dir.md"), + PathBuf::from("r/one"), + PathBuf::from("r/one/a.md"), + PathBuf::from("r/one/another"), + PathBuf::from("r/one/another/a.md"), + PathBuf::from("r/one/another/deep"), + PathBuf::from("r/one/another/deep/spelunking.md"), + PathBuf::from("r/three"), + PathBuf::from("r/three/c.md"), + PathBuf::from("r/two"), + PathBuf::from("r/two/b.md"))); + + // followed by a wildcard + assert_eq!(glob_vec("r/**/*.md"), vec!( + PathBuf::from("r/another/a.md"), + PathBuf::from("r/current_dir.md"), + PathBuf::from("r/one/a.md"), + PathBuf::from("r/one/another/a.md"), + PathBuf::from("r/one/another/deep/spelunking.md"), + PathBuf::from("r/three/c.md"), + PathBuf::from("r/two/b.md"))); + + // followed by a precise pattern + assert_eq!(glob_vec("r/one/**/a.md"), vec!( + PathBuf::from("r/one/a.md"), + PathBuf::from("r/one/another/a.md"))); + + // followed by another recursive pattern + // collapses consecutive recursives into one + assert_eq!(glob_vec("r/one/**/**/a.md"), vec!( + PathBuf::from("r/one/a.md"), + PathBuf::from("r/one/another/a.md"))); + + // followed by two precise patterns + assert_eq!(glob_vec("r/**/another/a.md"), vec!( + PathBuf::from("r/another/a.md"), + PathBuf::from("r/one/another/a.md"))); + + assert_eq!(glob_vec(""), Vec::::new()); + assert_eq!(glob_vec("."), vec!(PathBuf::from("."))); + assert_eq!(glob_vec(".."), vec!(PathBuf::from(".."))); + + assert_eq!(glob_vec("aaa"), vec!(PathBuf::from("aaa"))); + assert_eq!(glob_vec("aaa/"), vec!(PathBuf::from("aaa"))); + assert_eq!(glob_vec("a"), Vec::::new()); + assert_eq!(glob_vec("aa"), Vec::::new()); + assert_eq!(glob_vec("aaaa"), Vec::::new()); + + assert_eq!(glob_vec("aaa/apple"), vec!(PathBuf::from("aaa/apple"))); + assert_eq!(glob_vec("aaa/apple/nope"), Vec::::new()); + + // windows should support both / and \ as directory separators + if env::consts::FAMILY == "windows" { + assert_eq!(glob_vec("aaa\\apple"), vec!(PathBuf::from("aaa/apple"))); + } + + assert_eq!(glob_vec("???/"), vec!( + PathBuf::from("aaa"), + PathBuf::from("bbb"), + PathBuf::from("ccc"), + PathBuf::from("xyz"))); + + assert_eq!(glob_vec("aaa/tomato/tom?to.txt"), vec!( + PathBuf::from("aaa/tomato/tomato.txt"), + PathBuf::from("aaa/tomato/tomoto.txt"))); + + assert_eq!(glob_vec("xyz/?"), vec!( + PathBuf::from("xyz/x"), + PathBuf::from("xyz/y"), + PathBuf::from("xyz/z"))); + + assert_eq!(glob_vec("a*"), vec!(PathBuf::from("aaa"))); + assert_eq!(glob_vec("*a*"), vec!(PathBuf::from("aaa"))); + assert_eq!(glob_vec("a*a"), vec!(PathBuf::from("aaa"))); + assert_eq!(glob_vec("aaa*"), vec!(PathBuf::from("aaa"))); + assert_eq!(glob_vec("*aaa"), vec!(PathBuf::from("aaa"))); + assert_eq!(glob_vec("*aaa*"), vec!(PathBuf::from("aaa"))); + assert_eq!(glob_vec("*a*a*a*"), vec!(PathBuf::from("aaa"))); + assert_eq!(glob_vec("aaa*/"), vec!(PathBuf::from("aaa"))); + + assert_eq!(glob_vec("aaa/*"), vec!( + PathBuf::from("aaa/apple"), + PathBuf::from("aaa/orange"), + PathBuf::from("aaa/tomato"))); + + assert_eq!(glob_vec("aaa/*a*"), vec!( + PathBuf::from("aaa/apple"), + PathBuf::from("aaa/orange"), + PathBuf::from("aaa/tomato"))); + + assert_eq!(glob_vec("*/*/*.txt"), vec!( + PathBuf::from("aaa/tomato/tomato.txt"), + PathBuf::from("aaa/tomato/tomoto.txt"))); + + assert_eq!(glob_vec("*/*/t[aob]m?to[.]t[!y]t"), vec!( + PathBuf::from("aaa/tomato/tomato.txt"), + PathBuf::from("aaa/tomato/tomoto.txt"))); + + assert_eq!(glob_vec("./aaa"), vec!(PathBuf::from("aaa"))); + assert_eq!(glob_vec("./*"), glob_vec("*")); + assert_eq!(glob_vec("*/..").pop().unwrap(), PathBuf::from("xyz/..")); + assert_eq!(glob_vec("aaa/../bbb"), vec!(PathBuf::from("aaa/../bbb"))); + assert_eq!(glob_vec("nonexistent/../bbb"), Vec::::new()); + assert_eq!(glob_vec("aaa/tomato/tomato.txt/.."), Vec::::new()); + + assert_eq!(glob_vec("aaa/tomato/tomato.txt/"), Vec::::new()); + + assert_eq!(glob_vec("aa[a]"), vec!(PathBuf::from("aaa"))); + assert_eq!(glob_vec("aa[abc]"), vec!(PathBuf::from("aaa"))); + assert_eq!(glob_vec("a[bca]a"), vec!(PathBuf::from("aaa"))); + assert_eq!(glob_vec("aa[b]"), Vec::::new()); + assert_eq!(glob_vec("aa[xyz]"), Vec::::new()); + assert_eq!(glob_vec("aa[]]"), Vec::::new()); + + assert_eq!(glob_vec("aa[!b]"), vec!(PathBuf::from("aaa"))); + assert_eq!(glob_vec("aa[!bcd]"), vec!(PathBuf::from("aaa"))); + assert_eq!(glob_vec("a[!bcd]a"), vec!(PathBuf::from("aaa"))); + assert_eq!(glob_vec("aa[!a]"), Vec::::new()); + assert_eq!(glob_vec("aa[!abc]"), Vec::::new()); + + assert_eq!(glob_vec("bbb/specials/[[]"), vec!(PathBuf::from("bbb/specials/["))); + assert_eq!(glob_vec("bbb/specials/!"), vec!(PathBuf::from("bbb/specials/!"))); + assert_eq!(glob_vec("bbb/specials/[]]"), vec!(PathBuf::from("bbb/specials/]"))); + + if env::consts::FAMILY != "windows" { + assert_eq!(glob_vec("bbb/specials/[*]"), vec!(PathBuf::from("bbb/specials/*"))); + assert_eq!(glob_vec("bbb/specials/[?]"), vec!(PathBuf::from("bbb/specials/?"))); + } + + if env::consts::FAMILY == "windows" { + + assert_eq!(glob_vec("bbb/specials/[![]"), vec!( + PathBuf::from("bbb/specials/!"), + PathBuf::from("bbb/specials/]"))); + + assert_eq!(glob_vec("bbb/specials/[!]]"), vec!( + PathBuf::from("bbb/specials/!"), + PathBuf::from("bbb/specials/["))); + + assert_eq!(glob_vec("bbb/specials/[!!]"), vec!( + PathBuf::from("bbb/specials/["), + PathBuf::from("bbb/specials/]"))); + + } else { + + assert_eq!(glob_vec("bbb/specials/[![]"), vec!( + PathBuf::from("bbb/specials/!"), + PathBuf::from("bbb/specials/*"), + PathBuf::from("bbb/specials/?"), + PathBuf::from("bbb/specials/]"))); + + assert_eq!(glob_vec("bbb/specials/[!]]"), vec!( + PathBuf::from("bbb/specials/!"), + PathBuf::from("bbb/specials/*"), + PathBuf::from("bbb/specials/?"), + PathBuf::from("bbb/specials/["))); + + assert_eq!(glob_vec("bbb/specials/[!!]"), vec!( + PathBuf::from("bbb/specials/*"), + PathBuf::from("bbb/specials/?"), + PathBuf::from("bbb/specials/["), + PathBuf::from("bbb/specials/]"))); + + assert_eq!(glob_vec("bbb/specials/[!*]"), vec!( + PathBuf::from("bbb/specials/!"), + PathBuf::from("bbb/specials/?"), + PathBuf::from("bbb/specials/["), + PathBuf::from("bbb/specials/]"))); + + assert_eq!(glob_vec("bbb/specials/[!?]"), vec!( + PathBuf::from("bbb/specials/!"), + PathBuf::from("bbb/specials/*"), + PathBuf::from("bbb/specials/["), + PathBuf::from("bbb/specials/]"))); + + } +} diff --git a/deps/idna-0.1.0/Cargo.toml b/deps/idna-0.1.0/Cargo.toml new file mode 100644 index 000000000..cc7a8d228 --- /dev/null +++ b/deps/idna-0.1.0/Cargo.toml @@ -0,0 +1,24 @@ +[package] +name = "idna" +version = "0.1.0" +authors = ["Simon Sapin "] +description = "IDNA (Internationalizing Domain Names in Applications) and Punycode." +repository = "https://github.com/servo/rust-url/" +license = "MIT/Apache-2.0" + +[lib] +doctest = false +test = false + +[[test]] +name = "tests" +harness = false + +[dev-dependencies] +rustc-test = "0.1" +rustc-serialize = "0.3" + +[dependencies] +unicode-bidi = "0.2.3" +unicode-normalization = "0.1.2" +matches = "0.1" diff --git a/deps/url-0.5.5/IdnaMappingTable.txt b/deps/idna-0.1.0/src/IdnaMappingTable.txt similarity index 100% rename from deps/url-0.5.5/IdnaMappingTable.txt rename to deps/idna-0.1.0/src/IdnaMappingTable.txt diff --git a/deps/idna-0.1.0/src/lib.rs b/deps/idna-0.1.0/src/lib.rs new file mode 100644 index 000000000..d53874f35 --- /dev/null +++ b/deps/idna-0.1.0/src/lib.rs @@ -0,0 +1,73 @@ +// Copyright 2016 Simon Sapin. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +//! This Rust crate implements IDNA +//! [per the WHATWG URL Standard](https://url.spec.whatwg.org/#idna). +//! +//! It also exposes the underlying algorithms from [*Unicode IDNA Compatibility Processing* +//! (Unicode Technical Standard #46)](http://www.unicode.org/reports/tr46/) +//! and [Punycode (RFC 3492)](https://tools.ietf.org/html/rfc3492). +//! +//! Quoting from [UTS #46’s introduction](http://www.unicode.org/reports/tr46/#Introduction): +//! +//! > Initially, domain names were restricted to ASCII characters. +//! > A system was introduced in 2003 for internationalized domain names (IDN). +//! > This system is called Internationalizing Domain Names for Applications, +//! > or IDNA2003 for short. +//! > This mechanism supports IDNs by means of a client software transformation +//! > into a format known as Punycode. +//! > A revision of IDNA was approved in 2010 (IDNA2008). +//! > This revision has a number of incompatibilities with IDNA2003. +//! > +//! > The incompatibilities force implementers of client software, +//! > such as browsers and emailers, +//! > to face difficult choices during the transition period +//! > as registries shift from IDNA2003 to IDNA2008. +//! > This document specifies a mechanism +//! > that minimizes the impact of this transition for client software, +//! > allowing client software to access domains that are valid under either system. + +#[macro_use] extern crate matches; +extern crate unicode_bidi; +extern crate unicode_normalization; + +pub mod punycode; +pub mod uts46; + +/// The [domain to ASCII](https://url.spec.whatwg.org/#concept-domain-to-ascii) algorithm. +/// +/// Return the ASCII representation a domain name, +/// normalizing characters (upper-case to lower-case and other kinds of equivalence) +/// and using Punycode as necessary. +/// +/// This process may fail. +pub fn domain_to_ascii(domain: &str) -> Result { + uts46::to_ascii(domain, uts46::Flags { + use_std3_ascii_rules: false, + transitional_processing: true, // XXX: switch when Firefox does + verify_dns_length: false, + }) +} + +/// The [domain to Unicode](https://url.spec.whatwg.org/#concept-domain-to-unicode) algorithm. +/// +/// Return the Unicode representation of a domain name, +/// normalizing characters (upper-case to lower-case and other kinds of equivalence) +/// and decoding Punycode as necessary. +/// +/// This may indicate [syntax violations](https://url.spec.whatwg.org/#syntax-violation) +/// but always returns a string for the mapped domain. +pub fn domain_to_unicode(domain: &str) -> (String, Result<(), uts46::Errors>) { + uts46::to_unicode(domain, uts46::Flags { + use_std3_ascii_rules: false, + + // Unused: + transitional_processing: true, + verify_dns_length: false, + }) +} diff --git a/deps/idna-0.1.0/src/make_uts46_mapping_table.py b/deps/idna-0.1.0/src/make_uts46_mapping_table.py new file mode 100644 index 000000000..8e090dc76 --- /dev/null +++ b/deps/idna-0.1.0/src/make_uts46_mapping_table.py @@ -0,0 +1,56 @@ +# Copyright 2013-2014 Valentin Gosu. +# +# Licensed under the Apache License, Version 2.0 or the MIT license +# , at your +# option. This file may not be copied, modified, or distributed +# except according to those terms. + +# Run as: python make_uts46_mapping_table.py IdnaMappingTable.txt > uts46_mapping_table.rs +# You can get the latest idna table from +# http://www.unicode.org/Public/idna/latest/IdnaMappingTable.txt + +print('''\ +// Copyright 2013-2014 Valentin Gosu. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +// Generated by make_idna_table.py + +static TABLE: &'static [Range] = &[ +''') + +txt = open("IdnaMappingTable.txt") + +def char(s): + return (unichr(int(s, 16)) + .encode('utf8') + .replace('\\', '\\\\') + .replace('"', '\\"') + .replace('\0', '\\0')) + +for line in txt: + # remove comments + line, _, _ = line.partition('#') + # skip empty lines + if len(line.strip()) == 0: + continue + fields = line.split(';') + if fields[0].strip() == 'D800..DFFF': + continue # Surrogates don't occur in Rust strings. + first, _, last = fields[0].strip().partition('..') + if not last: + last = first + mapping = fields[1].strip().replace('_', ' ').title().replace(' ', '') + if len(fields) > 2: + if fields[2].strip(): + mapping += '("%s")' % ''.join(char(c) for c in fields[2].strip().split(' ')) + elif mapping == "Deviation": + mapping += '("")' + print(" Range { from: '%s', to: '%s', mapping: %s }," % (char(first), char(last), mapping)) + +print("];") diff --git a/deps/url-0.5.5/src/punycode.rs b/deps/idna-0.1.0/src/punycode.rs similarity index 100% rename from deps/url-0.5.5/src/punycode.rs rename to deps/idna-0.1.0/src/punycode.rs diff --git a/deps/idna-0.1.0/src/uts46.rs b/deps/idna-0.1.0/src/uts46.rs new file mode 100644 index 000000000..5f230e0e4 --- /dev/null +++ b/deps/idna-0.1.0/src/uts46.rs @@ -0,0 +1,322 @@ +// Copyright 2013-2014 Valentin Gosu. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +//! [*Unicode IDNA Compatibility Processing* +//! (Unicode Technical Standard #46)](http://www.unicode.org/reports/tr46/) + +use self::Mapping::*; +use punycode; +use std::ascii::AsciiExt; +use unicode_normalization::UnicodeNormalization; +use unicode_normalization::char::is_combining_mark; +use unicode_bidi::{BidiClass, bidi_class}; + +include!("uts46_mapping_table.rs"); + +#[derive(Debug)] +enum Mapping { + Valid, + Ignored, + Mapped(&'static str), + Deviation(&'static str), + Disallowed, + DisallowedStd3Valid, + DisallowedStd3Mapped(&'static str), +} + +struct Range { + from: char, + to: char, + mapping: Mapping, +} + +fn find_char(codepoint: char) -> &'static Mapping { + let mut min = 0; + let mut max = TABLE.len() - 1; + while max > min { + let mid = (min + max) >> 1; + if codepoint > TABLE[mid].to { + min = mid; + } else if codepoint < TABLE[mid].from { + max = mid; + } else { + min = mid; + max = mid; + } + } + &TABLE[min].mapping +} + +fn map_char(codepoint: char, flags: Flags, output: &mut String, errors: &mut Vec) { + match *find_char(codepoint) { + Mapping::Valid => output.push(codepoint), + Mapping::Ignored => {}, + Mapping::Mapped(mapping) => output.push_str(mapping), + Mapping::Deviation(mapping) => { + if flags.transitional_processing { + output.push_str(mapping) + } else { + output.push(codepoint) + } + } + Mapping::Disallowed => { + errors.push(Error::DissallowedCharacter); + output.push(codepoint); + } + Mapping::DisallowedStd3Valid => { + if flags.use_std3_ascii_rules { + errors.push(Error::DissallowedByStd3AsciiRules); + } + output.push(codepoint) + } + Mapping::DisallowedStd3Mapped(mapping) => { + if flags.use_std3_ascii_rules { + errors.push(Error::DissallowedMappedInStd3); + } + output.push_str(mapping) + } + } +} + +// http://tools.ietf.org/html/rfc5893#section-2 +fn passes_bidi(label: &str, transitional_processing: bool) -> bool { + let mut chars = label.chars(); + let class = match chars.next() { + Some(c) => bidi_class(c), + None => return true, // empty string + }; + + if class == BidiClass::L + || (class == BidiClass::ON && transitional_processing) // starts with \u200D + || (class == BidiClass::ES && transitional_processing) // hack: 1.35.+33.49 + || class == BidiClass::EN // hack: starts with number 0à.\u05D0 + { // LTR + // Rule 5 + loop { + match chars.next() { + Some(c) => { + let c = bidi_class(c); + if !matches!(c, BidiClass::L | BidiClass::EN | + BidiClass::ES | BidiClass::CS | + BidiClass::ET | BidiClass::ON | + BidiClass::BN | BidiClass::NSM) { + return false; + } + }, + None => { break; }, + } + } + + // Rule 6 + let mut rev_chars = label.chars().rev(); + let mut last = rev_chars.next(); + loop { // must end in L or EN followed by 0 or more NSM + match last { + Some(c) if bidi_class(c) == BidiClass::NSM => { + last = rev_chars.next(); + continue; + } + _ => { break; }, + } + } + + // TODO: does not pass for àˇ.\u05D0 + // match last { + // Some(c) if bidi_class(c) == BidiClass::L + // || bidi_class(c) == BidiClass::EN => {}, + // Some(c) => { return false; }, + // _ => {} + // } + + } else if class == BidiClass::R || class == BidiClass::AL { // RTL + let mut found_en = false; + let mut found_an = false; + + // Rule 2 + loop { + match chars.next() { + Some(c) => { + let char_class = bidi_class(c); + + if char_class == BidiClass::EN { + found_en = true; + } + if char_class == BidiClass::AN { + found_an = true; + } + + if !matches!(char_class, BidiClass::R | BidiClass::AL | + BidiClass::AN | BidiClass::EN | + BidiClass::ES | BidiClass::CS | + BidiClass::ET | BidiClass::ON | + BidiClass::BN | BidiClass::NSM) { + return false; + } + }, + None => { break; }, + } + } + // Rule 3 + let mut rev_chars = label.chars().rev(); + let mut last = rev_chars.next(); + loop { // must end in L or EN followed by 0 or more NSM + match last { + Some(c) if bidi_class(c) == BidiClass::NSM => { + last = rev_chars.next(); + continue; + } + _ => { break; }, + } + } + match last { + Some(c) if matches!(bidi_class(c), BidiClass::R | BidiClass::AL | + BidiClass::EN | BidiClass::AN) => {}, + _ => { return false; } + } + + // Rule 4 + if found_an && found_en { + return false; + } + } else { + // Rule 2: Should start with L or R/AL + return false; + } + + return true; +} + +/// http://www.unicode.org/reports/tr46/#Validity_Criteria +fn validate(label: &str, flags: Flags, errors: &mut Vec) { + if label.nfc().ne(label.chars()) { + errors.push(Error::ValidityCriteria); + } + + // Can not contain '.' since the input is from .split('.') + if { + let mut chars = label.chars().skip(2); + let third = chars.next(); + let fourth = chars.next(); + (third, fourth) == (Some('-'), Some('-')) + } || label.starts_with("-") + || label.ends_with("-") + || label.chars().next().map_or(false, is_combining_mark) + || label.chars().any(|c| match *find_char(c) { + Mapping::Valid => false, + Mapping::Deviation(_) => flags.transitional_processing, + Mapping::DisallowedStd3Valid => flags.use_std3_ascii_rules, + _ => true, + }) + || !passes_bidi(label, flags.transitional_processing) + { + errors.push(Error::ValidityCriteria) + } +} + +/// http://www.unicode.org/reports/tr46/#Processing +fn processing(domain: &str, flags: Flags, errors: &mut Vec) -> String { + let mut mapped = String::new(); + for c in domain.chars() { + map_char(c, flags, &mut mapped, errors) + } + let normalized: String = mapped.nfc().collect(); + let mut validated = String::new(); + for label in normalized.split('.') { + if validated.len() > 0 { + validated.push('.'); + } + if label.starts_with("xn--") { + match punycode::decode_to_string(&label["xn--".len()..]) { + Some(decoded_label) => { + let flags = Flags { transitional_processing: false, ..flags }; + validate(&decoded_label, flags, errors); + validated.push_str(&decoded_label) + } + None => errors.push(Error::PunycodeError) + } + } else { + validate(label, flags, errors); + validated.push_str(label) + } + } + validated +} + +#[derive(Copy, Clone)] +pub struct Flags { + pub use_std3_ascii_rules: bool, + pub transitional_processing: bool, + pub verify_dns_length: bool, +} + +#[derive(PartialEq, Eq, Clone, Copy, Debug)] +enum Error { + PunycodeError, + ValidityCriteria, + DissallowedByStd3AsciiRules, + DissallowedMappedInStd3, + DissallowedCharacter, + TooLongForDns, +} + +/// Errors recorded during UTS #46 processing. +/// +/// This is opaque for now, only indicating the precense of at least one error. +/// More details may be exposed in the future. +#[derive(Debug)] +pub struct Errors(Vec); + +/// http://www.unicode.org/reports/tr46/#ToASCII +pub fn to_ascii(domain: &str, flags: Flags) -> Result { + let mut errors = Vec::new(); + let mut result = String::new(); + for label in processing(domain, flags, &mut errors).split('.') { + if result.len() > 0 { + result.push('.'); + } + if label.is_ascii() { + result.push_str(label); + } else { + match punycode::encode_str(label) { + Some(x) => { + result.push_str("xn--"); + result.push_str(&x); + }, + None => errors.push(Error::PunycodeError) + } + } + } + + if flags.verify_dns_length { + let domain = if result.ends_with(".") { &result[..result.len()-1] } else { &*result }; + if domain.len() < 1 || domain.len() > 253 || + domain.split('.').any(|label| label.len() < 1 || label.len() > 63) { + errors.push(Error::TooLongForDns) + } + } + if errors.is_empty() { + Ok(result) + } else { + Err(Errors(errors)) + } +} + +/// http://www.unicode.org/reports/tr46/#ToUnicode +/// +/// Only `use_std3_ascii_rules` is used in `flags`. +pub fn to_unicode(domain: &str, mut flags: Flags) -> (String, Result<(), Errors>) { + flags.transitional_processing = false; + let mut errors = Vec::new(); + let domain = processing(domain, flags, &mut errors); + let errors = if errors.is_empty() { + Ok(()) + } else { + Err(Errors(errors)) + }; + (domain, errors) +} diff --git a/deps/idna-0.1.0/src/uts46_mapping_table.rs b/deps/idna-0.1.0/src/uts46_mapping_table.rs new file mode 100644 index 000000000..eb57dfb27 --- /dev/null +++ b/deps/idna-0.1.0/src/uts46_mapping_table.rs @@ -0,0 +1,8191 @@ +// Copyright 2013-2014 Valentin Gosu. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +// Generated by make_idna_table.py + +static TABLE: &'static [Range] = &[ + + Range { from: '\0', to: ',', mapping: DisallowedStd3Valid }, + Range { from: '-', to: '.', mapping: Valid }, + Range { from: '/', to: '/', mapping: DisallowedStd3Valid }, + Range { from: '0', to: '9', mapping: Valid }, + Range { from: ':', to: '@', mapping: DisallowedStd3Valid }, + Range { from: 'A', to: 'A', mapping: Mapped("a") }, + Range { from: 'B', to: 'B', mapping: Mapped("b") }, + Range { from: 'C', to: 'C', mapping: Mapped("c") }, + Range { from: 'D', to: 'D', mapping: Mapped("d") }, + Range { from: 'E', to: 'E', mapping: Mapped("e") }, + Range { from: 'F', to: 'F', mapping: Mapped("f") }, + Range { from: 'G', to: 'G', mapping: Mapped("g") }, + Range { from: 'H', to: 'H', mapping: Mapped("h") }, + Range { from: 'I', to: 'I', mapping: Mapped("i") }, + Range { from: 'J', to: 'J', mapping: Mapped("j") }, + Range { from: 'K', to: 'K', mapping: Mapped("k") }, + Range { from: 'L', to: 'L', mapping: Mapped("l") }, + Range { from: 'M', to: 'M', mapping: Mapped("m") }, + Range { from: 'N', to: 'N', mapping: Mapped("n") }, + Range { from: 'O', to: 'O', mapping: Mapped("o") }, + Range { from: 'P', to: 'P', mapping: Mapped("p") }, + Range { from: 'Q', to: 'Q', mapping: Mapped("q") }, + Range { from: 'R', to: 'R', mapping: Mapped("r") }, + Range { from: 'S', to: 'S', mapping: Mapped("s") }, + Range { from: 'T', to: 'T', mapping: Mapped("t") }, + Range { from: 'U', to: 'U', mapping: Mapped("u") }, + Range { from: 'V', to: 'V', mapping: Mapped("v") }, + Range { from: 'W', to: 'W', mapping: Mapped("w") }, + Range { from: 'X', to: 'X', mapping: Mapped("x") }, + Range { from: 'Y', to: 'Y', mapping: Mapped("y") }, + Range { from: 'Z', to: 'Z', mapping: Mapped("z") }, + Range { from: '[', to: '`', mapping: DisallowedStd3Valid }, + Range { from: 'a', to: 'z', mapping: Valid }, + Range { from: '{', to: '', mapping: DisallowedStd3Valid }, + Range { from: '€', to: 'Ÿ', mapping: Disallowed }, + Range { from: ' ', to: ' ', mapping: DisallowedStd3Mapped(" ") }, + Range { from: '¡', to: '§', mapping: Valid }, + Range { from: '¨', to: '¨', mapping: DisallowedStd3Mapped(" ̈") }, + Range { from: '©', to: '©', mapping: Valid }, + Range { from: 'ª', to: 'ª', mapping: Mapped("a") }, + Range { from: '«', to: '¬', mapping: Valid }, + Range { from: '­', to: '­', mapping: Ignored }, + Range { from: '®', to: '®', mapping: Valid }, + Range { from: '¯', to: '¯', mapping: DisallowedStd3Mapped(" ̄") }, + Range { from: '°', to: '±', mapping: Valid }, + Range { from: '²', to: '²', mapping: Mapped("2") }, + Range { from: '³', to: '³', mapping: Mapped("3") }, + Range { from: '´', to: '´', mapping: DisallowedStd3Mapped(" ́") }, + Range { from: 'µ', to: 'µ', mapping: Mapped("μ") }, + Range { from: '¶', to: '¶', mapping: Valid }, + Range { from: '·', to: '·', mapping: Valid }, + Range { from: '¸', to: '¸', mapping: DisallowedStd3Mapped(" ̧") }, + Range { from: '¹', to: '¹', mapping: Mapped("1") }, + Range { from: 'º', to: 'º', mapping: Mapped("o") }, + Range { from: '»', to: '»', mapping: Valid }, + Range { from: '¼', to: '¼', mapping: Mapped("1⁄4") }, + Range { from: '½', to: '½', mapping: Mapped("1⁄2") }, + Range { from: '¾', to: '¾', mapping: Mapped("3⁄4") }, + Range { from: '¿', to: '¿', mapping: Valid }, + Range { from: 'À', to: 'À', mapping: Mapped("à") }, + Range { from: 'Á', to: 'Á', mapping: Mapped("á") }, + Range { from: 'Â', to: 'Â', mapping: Mapped("â") }, + Range { from: 'Ã', to: 'Ã', mapping: Mapped("ã") }, + Range { from: 'Ä', to: 'Ä', mapping: Mapped("ä") }, + Range { from: 'Å', to: 'Å', mapping: Mapped("å") }, + Range { from: 'Æ', to: 'Æ', mapping: Mapped("æ") }, + Range { from: 'Ç', to: 'Ç', mapping: Mapped("ç") }, + Range { from: 'È', to: 'È', mapping: Mapped("è") }, + Range { from: 'É', to: 'É', mapping: Mapped("é") }, + Range { from: 'Ê', to: 'Ê', mapping: Mapped("ê") }, + Range { from: 'Ë', to: 'Ë', mapping: Mapped("ë") }, + Range { from: 'Ì', to: 'Ì', mapping: Mapped("ì") }, + Range { from: 'Í', to: 'Í', mapping: Mapped("í") }, + Range { from: 'Î', to: 'Î', mapping: Mapped("î") }, + Range { from: 'Ï', to: 'Ï', mapping: Mapped("ï") }, + Range { from: 'Ð', to: 'Ð', mapping: Mapped("ð") }, + Range { from: 'Ñ', to: 'Ñ', mapping: Mapped("ñ") }, + Range { from: 'Ò', to: 'Ò', mapping: Mapped("ò") }, + Range { from: 'Ó', to: 'Ó', mapping: Mapped("ó") }, + Range { from: 'Ô', to: 'Ô', mapping: Mapped("ô") }, + Range { from: 'Õ', to: 'Õ', mapping: Mapped("õ") }, + Range { from: 'Ö', to: 'Ö', mapping: Mapped("ö") }, + Range { from: '×', to: '×', mapping: Valid }, + Range { from: 'Ø', to: 'Ø', mapping: Mapped("ø") }, + Range { from: 'Ù', to: 'Ù', mapping: Mapped("ù") }, + Range { from: 'Ú', to: 'Ú', mapping: Mapped("ú") }, + Range { from: 'Û', to: 'Û', mapping: Mapped("û") }, + Range { from: 'Ü', to: 'Ü', mapping: Mapped("ü") }, + Range { from: 'Ý', to: 'Ý', mapping: Mapped("ý") }, + Range { from: 'Þ', to: 'Þ', mapping: Mapped("þ") }, + Range { from: 'ß', to: 'ß', mapping: Deviation("ss") }, + Range { from: 'à', to: 'ö', mapping: Valid }, + Range { from: '÷', to: '÷', mapping: Valid }, + Range { from: 'ø', to: 'ÿ', mapping: Valid }, + Range { from: 'Ā', to: 'Ā', mapping: Mapped("ā") }, + Range { from: 'ā', to: 'ā', mapping: Valid }, + Range { from: 'Ă', to: 'Ă', mapping: Mapped("ă") }, + Range { from: 'ă', to: 'ă', mapping: Valid }, + Range { from: 'Ą', to: 'Ą', mapping: Mapped("ą") }, + Range { from: 'ą', to: 'ą', mapping: Valid }, + Range { from: 'Ć', to: 'Ć', mapping: Mapped("ć") }, + Range { from: 'ć', to: 'ć', mapping: Valid }, + Range { from: 'Ĉ', to: 'Ĉ', mapping: Mapped("ĉ") }, + Range { from: 'ĉ', to: 'ĉ', mapping: Valid }, + Range { from: 'Ċ', to: 'Ċ', mapping: Mapped("ċ") }, + Range { from: 'ċ', to: 'ċ', mapping: Valid }, + Range { from: 'Č', to: 'Č', mapping: Mapped("č") }, + Range { from: 'č', to: 'č', mapping: Valid }, + Range { from: 'Ď', to: 'Ď', mapping: Mapped("ď") }, + Range { from: 'ď', to: 'ď', mapping: Valid }, + Range { from: 'Đ', to: 'Đ', mapping: Mapped("đ") }, + Range { from: 'đ', to: 'đ', mapping: Valid }, + Range { from: 'Ē', to: 'Ē', mapping: Mapped("ē") }, + Range { from: 'ē', to: 'ē', mapping: Valid }, + Range { from: 'Ĕ', to: 'Ĕ', mapping: Mapped("ĕ") }, + Range { from: 'ĕ', to: 'ĕ', mapping: Valid }, + Range { from: 'Ė', to: 'Ė', mapping: Mapped("ė") }, + Range { from: 'ė', to: 'ė', mapping: Valid }, + Range { from: 'Ę', to: 'Ę', mapping: Mapped("ę") }, + Range { from: 'ę', to: 'ę', mapping: Valid }, + Range { from: 'Ě', to: 'Ě', mapping: Mapped("ě") }, + Range { from: 'ě', to: 'ě', mapping: Valid }, + Range { from: 'Ĝ', to: 'Ĝ', mapping: Mapped("ĝ") }, + Range { from: 'ĝ', to: 'ĝ', mapping: Valid }, + Range { from: 'Ğ', to: 'Ğ', mapping: Mapped("ğ") }, + Range { from: 'ğ', to: 'ğ', mapping: Valid }, + Range { from: 'Ġ', to: 'Ġ', mapping: Mapped("ġ") }, + Range { from: 'ġ', to: 'ġ', mapping: Valid }, + Range { from: 'Ģ', to: 'Ģ', mapping: Mapped("ģ") }, + Range { from: 'ģ', to: 'ģ', mapping: Valid }, + Range { from: 'Ĥ', to: 'Ĥ', mapping: Mapped("ĥ") }, + Range { from: 'ĥ', to: 'ĥ', mapping: Valid }, + Range { from: 'Ħ', to: 'Ħ', mapping: Mapped("ħ") }, + Range { from: 'ħ', to: 'ħ', mapping: Valid }, + Range { from: 'Ĩ', to: 'Ĩ', mapping: Mapped("ĩ") }, + Range { from: 'ĩ', to: 'ĩ', mapping: Valid }, + Range { from: 'Ī', to: 'Ī', mapping: Mapped("ī") }, + Range { from: 'ī', to: 'ī', mapping: Valid }, + Range { from: 'Ĭ', to: 'Ĭ', mapping: Mapped("ĭ") }, + Range { from: 'ĭ', to: 'ĭ', mapping: Valid }, + Range { from: 'Į', to: 'Į', mapping: Mapped("į") }, + Range { from: 'į', to: 'į', mapping: Valid }, + Range { from: 'İ', to: 'İ', mapping: Mapped("i̇") }, + Range { from: 'ı', to: 'ı', mapping: Valid }, + Range { from: 'IJ', to: 'ij', mapping: Mapped("ij") }, + Range { from: 'Ĵ', to: 'Ĵ', mapping: Mapped("ĵ") }, + Range { from: 'ĵ', to: 'ĵ', mapping: Valid }, + Range { from: 'Ķ', to: 'Ķ', mapping: Mapped("ķ") }, + Range { from: 'ķ', to: 'ĸ', mapping: Valid }, + Range { from: 'Ĺ', to: 'Ĺ', mapping: Mapped("ĺ") }, + Range { from: 'ĺ', to: 'ĺ', mapping: Valid }, + Range { from: 'Ļ', to: 'Ļ', mapping: Mapped("ļ") }, + Range { from: 'ļ', to: 'ļ', mapping: Valid }, + Range { from: 'Ľ', to: 'Ľ', mapping: Mapped("ľ") }, + Range { from: 'ľ', to: 'ľ', mapping: Valid }, + Range { from: 'Ŀ', to: 'ŀ', mapping: Mapped("l·") }, + Range { from: 'Ł', to: 'Ł', mapping: Mapped("ł") }, + Range { from: 'ł', to: 'ł', mapping: Valid }, + Range { from: 'Ń', to: 'Ń', mapping: Mapped("ń") }, + Range { from: 'ń', to: 'ń', mapping: Valid }, + Range { from: 'Ņ', to: 'Ņ', mapping: Mapped("ņ") }, + Range { from: 'ņ', to: 'ņ', mapping: Valid }, + Range { from: 'Ň', to: 'Ň', mapping: Mapped("ň") }, + Range { from: 'ň', to: 'ň', mapping: Valid }, + Range { from: 'ʼn', to: 'ʼn', mapping: Mapped("ʼn") }, + Range { from: 'Ŋ', to: 'Ŋ', mapping: Mapped("ŋ") }, + Range { from: 'ŋ', to: 'ŋ', mapping: Valid }, + Range { from: 'Ō', to: 'Ō', mapping: Mapped("ō") }, + Range { from: 'ō', to: 'ō', mapping: Valid }, + Range { from: 'Ŏ', to: 'Ŏ', mapping: Mapped("ŏ") }, + Range { from: 'ŏ', to: 'ŏ', mapping: Valid }, + Range { from: 'Ő', to: 'Ő', mapping: Mapped("ő") }, + Range { from: 'ő', to: 'ő', mapping: Valid }, + Range { from: 'Œ', to: 'Œ', mapping: Mapped("œ") }, + Range { from: 'œ', to: 'œ', mapping: Valid }, + Range { from: 'Ŕ', to: 'Ŕ', mapping: Mapped("ŕ") }, + Range { from: 'ŕ', to: 'ŕ', mapping: Valid }, + Range { from: 'Ŗ', to: 'Ŗ', mapping: Mapped("ŗ") }, + Range { from: 'ŗ', to: 'ŗ', mapping: Valid }, + Range { from: 'Ř', to: 'Ř', mapping: Mapped("ř") }, + Range { from: 'ř', to: 'ř', mapping: Valid }, + Range { from: 'Ś', to: 'Ś', mapping: Mapped("ś") }, + Range { from: 'ś', to: 'ś', mapping: Valid }, + Range { from: 'Ŝ', to: 'Ŝ', mapping: Mapped("ŝ") }, + Range { from: 'ŝ', to: 'ŝ', mapping: Valid }, + Range { from: 'Ş', to: 'Ş', mapping: Mapped("ş") }, + Range { from: 'ş', to: 'ş', mapping: Valid }, + Range { from: 'Š', to: 'Š', mapping: Mapped("š") }, + Range { from: 'š', to: 'š', mapping: Valid }, + Range { from: 'Ţ', to: 'Ţ', mapping: Mapped("ţ") }, + Range { from: 'ţ', to: 'ţ', mapping: Valid }, + Range { from: 'Ť', to: 'Ť', mapping: Mapped("ť") }, + Range { from: 'ť', to: 'ť', mapping: Valid }, + Range { from: 'Ŧ', to: 'Ŧ', mapping: Mapped("ŧ") }, + Range { from: 'ŧ', to: 'ŧ', mapping: Valid }, + Range { from: 'Ũ', to: 'Ũ', mapping: Mapped("ũ") }, + Range { from: 'ũ', to: 'ũ', mapping: Valid }, + Range { from: 'Ū', to: 'Ū', mapping: Mapped("ū") }, + Range { from: 'ū', to: 'ū', mapping: Valid }, + Range { from: 'Ŭ', to: 'Ŭ', mapping: Mapped("ŭ") }, + Range { from: 'ŭ', to: 'ŭ', mapping: Valid }, + Range { from: 'Ů', to: 'Ů', mapping: Mapped("ů") }, + Range { from: 'ů', to: 'ů', mapping: Valid }, + Range { from: 'Ű', to: 'Ű', mapping: Mapped("ű") }, + Range { from: 'ű', to: 'ű', mapping: Valid }, + Range { from: 'Ų', to: 'Ų', mapping: Mapped("ų") }, + Range { from: 'ų', to: 'ų', mapping: Valid }, + Range { from: 'Ŵ', to: 'Ŵ', mapping: Mapped("ŵ") }, + Range { from: 'ŵ', to: 'ŵ', mapping: Valid }, + Range { from: 'Ŷ', to: 'Ŷ', mapping: Mapped("ŷ") }, + Range { from: 'ŷ', to: 'ŷ', mapping: Valid }, + Range { from: 'Ÿ', to: 'Ÿ', mapping: Mapped("ÿ") }, + Range { from: 'Ź', to: 'Ź', mapping: Mapped("ź") }, + Range { from: 'ź', to: 'ź', mapping: Valid }, + Range { from: 'Ż', to: 'Ż', mapping: Mapped("ż") }, + Range { from: 'ż', to: 'ż', mapping: Valid }, + Range { from: 'Ž', to: 'Ž', mapping: Mapped("ž") }, + Range { from: 'ž', to: 'ž', mapping: Valid }, + Range { from: 'ſ', to: 'ſ', mapping: Mapped("s") }, + Range { from: 'ƀ', to: 'ƀ', mapping: Valid }, + Range { from: 'Ɓ', to: 'Ɓ', mapping: Mapped("ɓ") }, + Range { from: 'Ƃ', to: 'Ƃ', mapping: Mapped("ƃ") }, + Range { from: 'ƃ', to: 'ƃ', mapping: Valid }, + Range { from: 'Ƅ', to: 'Ƅ', mapping: Mapped("ƅ") }, + Range { from: 'ƅ', to: 'ƅ', mapping: Valid }, + Range { from: 'Ɔ', to: 'Ɔ', mapping: Mapped("ɔ") }, + Range { from: 'Ƈ', to: 'Ƈ', mapping: Mapped("ƈ") }, + Range { from: 'ƈ', to: 'ƈ', mapping: Valid }, + Range { from: 'Ɖ', to: 'Ɖ', mapping: Mapped("ɖ") }, + Range { from: 'Ɗ', to: 'Ɗ', mapping: Mapped("ɗ") }, + Range { from: 'Ƌ', to: 'Ƌ', mapping: Mapped("ƌ") }, + Range { from: 'ƌ', to: 'ƍ', mapping: Valid }, + Range { from: 'Ǝ', to: 'Ǝ', mapping: Mapped("ǝ") }, + Range { from: 'Ə', to: 'Ə', mapping: Mapped("ə") }, + Range { from: 'Ɛ', to: 'Ɛ', mapping: Mapped("ɛ") }, + Range { from: 'Ƒ', to: 'Ƒ', mapping: Mapped("ƒ") }, + Range { from: 'ƒ', to: 'ƒ', mapping: Valid }, + Range { from: 'Ɠ', to: 'Ɠ', mapping: Mapped("ɠ") }, + Range { from: 'Ɣ', to: 'Ɣ', mapping: Mapped("ɣ") }, + Range { from: 'ƕ', to: 'ƕ', mapping: Valid }, + Range { from: 'Ɩ', to: 'Ɩ', mapping: Mapped("ɩ") }, + Range { from: 'Ɨ', to: 'Ɨ', mapping: Mapped("ɨ") }, + Range { from: 'Ƙ', to: 'Ƙ', mapping: Mapped("ƙ") }, + Range { from: 'ƙ', to: 'ƛ', mapping: Valid }, + Range { from: 'Ɯ', to: 'Ɯ', mapping: Mapped("ɯ") }, + Range { from: 'Ɲ', to: 'Ɲ', mapping: Mapped("ɲ") }, + Range { from: 'ƞ', to: 'ƞ', mapping: Valid }, + Range { from: 'Ɵ', to: 'Ɵ', mapping: Mapped("ɵ") }, + Range { from: 'Ơ', to: 'Ơ', mapping: Mapped("ơ") }, + Range { from: 'ơ', to: 'ơ', mapping: Valid }, + Range { from: 'Ƣ', to: 'Ƣ', mapping: Mapped("ƣ") }, + Range { from: 'ƣ', to: 'ƣ', mapping: Valid }, + Range { from: 'Ƥ', to: 'Ƥ', mapping: Mapped("ƥ") }, + Range { from: 'ƥ', to: 'ƥ', mapping: Valid }, + Range { from: 'Ʀ', to: 'Ʀ', mapping: Mapped("ʀ") }, + Range { from: 'Ƨ', to: 'Ƨ', mapping: Mapped("ƨ") }, + Range { from: 'ƨ', to: 'ƨ', mapping: Valid }, + Range { from: 'Ʃ', to: 'Ʃ', mapping: Mapped("ʃ") }, + Range { from: 'ƪ', to: 'ƫ', mapping: Valid }, + Range { from: 'Ƭ', to: 'Ƭ', mapping: Mapped("ƭ") }, + Range { from: 'ƭ', to: 'ƭ', mapping: Valid }, + Range { from: 'Ʈ', to: 'Ʈ', mapping: Mapped("ʈ") }, + Range { from: 'Ư', to: 'Ư', mapping: Mapped("ư") }, + Range { from: 'ư', to: 'ư', mapping: Valid }, + Range { from: 'Ʊ', to: 'Ʊ', mapping: Mapped("ʊ") }, + Range { from: 'Ʋ', to: 'Ʋ', mapping: Mapped("ʋ") }, + Range { from: 'Ƴ', to: 'Ƴ', mapping: Mapped("ƴ") }, + Range { from: 'ƴ', to: 'ƴ', mapping: Valid }, + Range { from: 'Ƶ', to: 'Ƶ', mapping: Mapped("ƶ") }, + Range { from: 'ƶ', to: 'ƶ', mapping: Valid }, + Range { from: 'Ʒ', to: 'Ʒ', mapping: Mapped("ʒ") }, + Range { from: 'Ƹ', to: 'Ƹ', mapping: Mapped("ƹ") }, + Range { from: 'ƹ', to: 'ƻ', mapping: Valid }, + Range { from: 'Ƽ', to: 'Ƽ', mapping: Mapped("ƽ") }, + Range { from: 'ƽ', to: 'ǃ', mapping: Valid }, + Range { from: 'DŽ', to: 'dž', mapping: Mapped("dž") }, + Range { from: 'LJ', to: 'lj', mapping: Mapped("lj") }, + Range { from: 'NJ', to: 'nj', mapping: Mapped("nj") }, + Range { from: 'Ǎ', to: 'Ǎ', mapping: Mapped("ǎ") }, + Range { from: 'ǎ', to: 'ǎ', mapping: Valid }, + Range { from: 'Ǐ', to: 'Ǐ', mapping: Mapped("ǐ") }, + Range { from: 'ǐ', to: 'ǐ', mapping: Valid }, + Range { from: 'Ǒ', to: 'Ǒ', mapping: Mapped("ǒ") }, + Range { from: 'ǒ', to: 'ǒ', mapping: Valid }, + Range { from: 'Ǔ', to: 'Ǔ', mapping: Mapped("ǔ") }, + Range { from: 'ǔ', to: 'ǔ', mapping: Valid }, + Range { from: 'Ǖ', to: 'Ǖ', mapping: Mapped("ǖ") }, + Range { from: 'ǖ', to: 'ǖ', mapping: Valid }, + Range { from: 'Ǘ', to: 'Ǘ', mapping: Mapped("ǘ") }, + Range { from: 'ǘ', to: 'ǘ', mapping: Valid }, + Range { from: 'Ǚ', to: 'Ǚ', mapping: Mapped("ǚ") }, + Range { from: 'ǚ', to: 'ǚ', mapping: Valid }, + Range { from: 'Ǜ', to: 'Ǜ', mapping: Mapped("ǜ") }, + Range { from: 'ǜ', to: 'ǝ', mapping: Valid }, + Range { from: 'Ǟ', to: 'Ǟ', mapping: Mapped("ǟ") }, + Range { from: 'ǟ', to: 'ǟ', mapping: Valid }, + Range { from: 'Ǡ', to: 'Ǡ', mapping: Mapped("ǡ") }, + Range { from: 'ǡ', to: 'ǡ', mapping: Valid }, + Range { from: 'Ǣ', to: 'Ǣ', mapping: Mapped("ǣ") }, + Range { from: 'ǣ', to: 'ǣ', mapping: Valid }, + Range { from: 'Ǥ', to: 'Ǥ', mapping: Mapped("ǥ") }, + Range { from: 'ǥ', to: 'ǥ', mapping: Valid }, + Range { from: 'Ǧ', to: 'Ǧ', mapping: Mapped("ǧ") }, + Range { from: 'ǧ', to: 'ǧ', mapping: Valid }, + Range { from: 'Ǩ', to: 'Ǩ', mapping: Mapped("ǩ") }, + Range { from: 'ǩ', to: 'ǩ', mapping: Valid }, + Range { from: 'Ǫ', to: 'Ǫ', mapping: Mapped("ǫ") }, + Range { from: 'ǫ', to: 'ǫ', mapping: Valid }, + Range { from: 'Ǭ', to: 'Ǭ', mapping: Mapped("ǭ") }, + Range { from: 'ǭ', to: 'ǭ', mapping: Valid }, + Range { from: 'Ǯ', to: 'Ǯ', mapping: Mapped("ǯ") }, + Range { from: 'ǯ', to: 'ǰ', mapping: Valid }, + Range { from: 'DZ', to: 'dz', mapping: Mapped("dz") }, + Range { from: 'Ǵ', to: 'Ǵ', mapping: Mapped("ǵ") }, + Range { from: 'ǵ', to: 'ǵ', mapping: Valid }, + Range { from: 'Ƕ', to: 'Ƕ', mapping: Mapped("ƕ") }, + Range { from: 'Ƿ', to: 'Ƿ', mapping: Mapped("ƿ") }, + Range { from: 'Ǹ', to: 'Ǹ', mapping: Mapped("ǹ") }, + Range { from: 'ǹ', to: 'ǹ', mapping: Valid }, + Range { from: 'Ǻ', to: 'Ǻ', mapping: Mapped("ǻ") }, + Range { from: 'ǻ', to: 'ǻ', mapping: Valid }, + Range { from: 'Ǽ', to: 'Ǽ', mapping: Mapped("ǽ") }, + Range { from: 'ǽ', to: 'ǽ', mapping: Valid }, + Range { from: 'Ǿ', to: 'Ǿ', mapping: Mapped("ǿ") }, + Range { from: 'ǿ', to: 'ǿ', mapping: Valid }, + Range { from: 'Ȁ', to: 'Ȁ', mapping: Mapped("ȁ") }, + Range { from: 'ȁ', to: 'ȁ', mapping: Valid }, + Range { from: 'Ȃ', to: 'Ȃ', mapping: Mapped("ȃ") }, + Range { from: 'ȃ', to: 'ȃ', mapping: Valid }, + Range { from: 'Ȅ', to: 'Ȅ', mapping: Mapped("ȅ") }, + Range { from: 'ȅ', to: 'ȅ', mapping: Valid }, + Range { from: 'Ȇ', to: 'Ȇ', mapping: Mapped("ȇ") }, + Range { from: 'ȇ', to: 'ȇ', mapping: Valid }, + Range { from: 'Ȉ', to: 'Ȉ', mapping: Mapped("ȉ") }, + Range { from: 'ȉ', to: 'ȉ', mapping: Valid }, + Range { from: 'Ȋ', to: 'Ȋ', mapping: Mapped("ȋ") }, + Range { from: 'ȋ', to: 'ȋ', mapping: Valid }, + Range { from: 'Ȍ', to: 'Ȍ', mapping: Mapped("ȍ") }, + Range { from: 'ȍ', to: 'ȍ', mapping: Valid }, + Range { from: 'Ȏ', to: 'Ȏ', mapping: Mapped("ȏ") }, + Range { from: 'ȏ', to: 'ȏ', mapping: Valid }, + Range { from: 'Ȑ', to: 'Ȑ', mapping: Mapped("ȑ") }, + Range { from: 'ȑ', to: 'ȑ', mapping: Valid }, + Range { from: 'Ȓ', to: 'Ȓ', mapping: Mapped("ȓ") }, + Range { from: 'ȓ', to: 'ȓ', mapping: Valid }, + Range { from: 'Ȕ', to: 'Ȕ', mapping: Mapped("ȕ") }, + Range { from: 'ȕ', to: 'ȕ', mapping: Valid }, + Range { from: 'Ȗ', to: 'Ȗ', mapping: Mapped("ȗ") }, + Range { from: 'ȗ', to: 'ȗ', mapping: Valid }, + Range { from: 'Ș', to: 'Ș', mapping: Mapped("ș") }, + Range { from: 'ș', to: 'ș', mapping: Valid }, + Range { from: 'Ț', to: 'Ț', mapping: Mapped("ț") }, + Range { from: 'ț', to: 'ț', mapping: Valid }, + Range { from: 'Ȝ', to: 'Ȝ', mapping: Mapped("ȝ") }, + Range { from: 'ȝ', to: 'ȝ', mapping: Valid }, + Range { from: 'Ȟ', to: 'Ȟ', mapping: Mapped("ȟ") }, + Range { from: 'ȟ', to: 'ȟ', mapping: Valid }, + Range { from: 'Ƞ', to: 'Ƞ', mapping: Mapped("ƞ") }, + Range { from: 'ȡ', to: 'ȡ', mapping: Valid }, + Range { from: 'Ȣ', to: 'Ȣ', mapping: Mapped("ȣ") }, + Range { from: 'ȣ', to: 'ȣ', mapping: Valid }, + Range { from: 'Ȥ', to: 'Ȥ', mapping: Mapped("ȥ") }, + Range { from: 'ȥ', to: 'ȥ', mapping: Valid }, + Range { from: 'Ȧ', to: 'Ȧ', mapping: Mapped("ȧ") }, + Range { from: 'ȧ', to: 'ȧ', mapping: Valid }, + Range { from: 'Ȩ', to: 'Ȩ', mapping: Mapped("ȩ") }, + Range { from: 'ȩ', to: 'ȩ', mapping: Valid }, + Range { from: 'Ȫ', to: 'Ȫ', mapping: Mapped("ȫ") }, + Range { from: 'ȫ', to: 'ȫ', mapping: Valid }, + Range { from: 'Ȭ', to: 'Ȭ', mapping: Mapped("ȭ") }, + Range { from: 'ȭ', to: 'ȭ', mapping: Valid }, + Range { from: 'Ȯ', to: 'Ȯ', mapping: Mapped("ȯ") }, + Range { from: 'ȯ', to: 'ȯ', mapping: Valid }, + Range { from: 'Ȱ', to: 'Ȱ', mapping: Mapped("ȱ") }, + Range { from: 'ȱ', to: 'ȱ', mapping: Valid }, + Range { from: 'Ȳ', to: 'Ȳ', mapping: Mapped("ȳ") }, + Range { from: 'ȳ', to: 'ȳ', mapping: Valid }, + Range { from: 'ȴ', to: 'ȶ', mapping: Valid }, + Range { from: 'ȷ', to: 'ȹ', mapping: Valid }, + Range { from: 'Ⱥ', to: 'Ⱥ', mapping: Mapped("ⱥ") }, + Range { from: 'Ȼ', to: 'Ȼ', mapping: Mapped("ȼ") }, + Range { from: 'ȼ', to: 'ȼ', mapping: Valid }, + Range { from: 'Ƚ', to: 'Ƚ', mapping: Mapped("ƚ") }, + Range { from: 'Ⱦ', to: 'Ⱦ', mapping: Mapped("ⱦ") }, + Range { from: 'ȿ', to: 'ɀ', mapping: Valid }, + Range { from: 'Ɂ', to: 'Ɂ', mapping: Mapped("ɂ") }, + Range { from: 'ɂ', to: 'ɂ', mapping: Valid }, + Range { from: 'Ƀ', to: 'Ƀ', mapping: Mapped("ƀ") }, + Range { from: 'Ʉ', to: 'Ʉ', mapping: Mapped("ʉ") }, + Range { from: 'Ʌ', to: 'Ʌ', mapping: Mapped("ʌ") }, + Range { from: 'Ɇ', to: 'Ɇ', mapping: Mapped("ɇ") }, + Range { from: 'ɇ', to: 'ɇ', mapping: Valid }, + Range { from: 'Ɉ', to: 'Ɉ', mapping: Mapped("ɉ") }, + Range { from: 'ɉ', to: 'ɉ', mapping: Valid }, + Range { from: 'Ɋ', to: 'Ɋ', mapping: Mapped("ɋ") }, + Range { from: 'ɋ', to: 'ɋ', mapping: Valid }, + Range { from: 'Ɍ', to: 'Ɍ', mapping: Mapped("ɍ") }, + Range { from: 'ɍ', to: 'ɍ', mapping: Valid }, + Range { from: 'Ɏ', to: 'Ɏ', mapping: Mapped("ɏ") }, + Range { from: 'ɏ', to: 'ɏ', mapping: Valid }, + Range { from: 'ɐ', to: 'ʨ', mapping: Valid }, + Range { from: 'ʩ', to: 'ʭ', mapping: Valid }, + Range { from: 'ʮ', to: 'ʯ', mapping: Valid }, + Range { from: 'ʰ', to: 'ʰ', mapping: Mapped("h") }, + Range { from: 'ʱ', to: 'ʱ', mapping: Mapped("ɦ") }, + Range { from: 'ʲ', to: 'ʲ', mapping: Mapped("j") }, + Range { from: 'ʳ', to: 'ʳ', mapping: Mapped("r") }, + Range { from: 'ʴ', to: 'ʴ', mapping: Mapped("ɹ") }, + Range { from: 'ʵ', to: 'ʵ', mapping: Mapped("ɻ") }, + Range { from: 'ʶ', to: 'ʶ', mapping: Mapped("ʁ") }, + Range { from: 'ʷ', to: 'ʷ', mapping: Mapped("w") }, + Range { from: 'ʸ', to: 'ʸ', mapping: Mapped("y") }, + Range { from: 'ʹ', to: 'ˁ', mapping: Valid }, + Range { from: '˂', to: '˅', mapping: Valid }, + Range { from: 'ˆ', to: 'ˑ', mapping: Valid }, + Range { from: '˒', to: '˗', mapping: Valid }, + Range { from: '˘', to: '˘', mapping: DisallowedStd3Mapped(" ̆") }, + Range { from: '˙', to: '˙', mapping: DisallowedStd3Mapped(" ̇") }, + Range { from: '˚', to: '˚', mapping: DisallowedStd3Mapped(" ̊") }, + Range { from: '˛', to: '˛', mapping: DisallowedStd3Mapped(" ̨") }, + Range { from: '˜', to: '˜', mapping: DisallowedStd3Mapped(" ̃") }, + Range { from: '˝', to: '˝', mapping: DisallowedStd3Mapped(" ̋") }, + Range { from: '˞', to: '˞', mapping: Valid }, + Range { from: '˟', to: '˟', mapping: Valid }, + Range { from: 'ˠ', to: 'ˠ', mapping: Mapped("ɣ") }, + Range { from: 'ˡ', to: 'ˡ', mapping: Mapped("l") }, + Range { from: 'ˢ', to: 'ˢ', mapping: Mapped("s") }, + Range { from: 'ˣ', to: 'ˣ', mapping: Mapped("x") }, + Range { from: 'ˤ', to: 'ˤ', mapping: Mapped("ʕ") }, + Range { from: '˥', to: '˩', mapping: Valid }, + Range { from: '˪', to: '˫', mapping: Valid }, + Range { from: 'ˬ', to: 'ˬ', mapping: Valid }, + Range { from: '˭', to: '˭', mapping: Valid }, + Range { from: 'ˮ', to: 'ˮ', mapping: Valid }, + Range { from: '˯', to: '˿', mapping: Valid }, + Range { from: '̀', to: '̿', mapping: Valid }, + Range { from: '̀', to: '̀', mapping: Mapped("̀") }, + Range { from: '́', to: '́', mapping: Mapped("́") }, + Range { from: '͂', to: '͂', mapping: Valid }, + Range { from: '̓', to: '̓', mapping: Mapped("̓") }, + Range { from: '̈́', to: '̈́', mapping: Mapped("̈́") }, + Range { from: 'ͅ', to: 'ͅ', mapping: Mapped("ι") }, + Range { from: '͆', to: '͎', mapping: Valid }, + Range { from: '͏', to: '͏', mapping: Ignored }, + Range { from: '͐', to: '͗', mapping: Valid }, + Range { from: '͘', to: '͜', mapping: Valid }, + Range { from: '͝', to: '͟', mapping: Valid }, + Range { from: '͠', to: '͡', mapping: Valid }, + Range { from: '͢', to: '͢', mapping: Valid }, + Range { from: 'ͣ', to: 'ͯ', mapping: Valid }, + Range { from: 'Ͱ', to: 'Ͱ', mapping: Mapped("ͱ") }, + Range { from: 'ͱ', to: 'ͱ', mapping: Valid }, + Range { from: 'Ͳ', to: 'Ͳ', mapping: Mapped("ͳ") }, + Range { from: 'ͳ', to: 'ͳ', mapping: Valid }, + Range { from: 'ʹ', to: 'ʹ', mapping: Mapped("ʹ") }, + Range { from: '͵', to: '͵', mapping: Valid }, + Range { from: 'Ͷ', to: 'Ͷ', mapping: Mapped("ͷ") }, + Range { from: 'ͷ', to: 'ͷ', mapping: Valid }, + Range { from: '͸', to: '͹', mapping: Disallowed }, + Range { from: 'ͺ', to: 'ͺ', mapping: DisallowedStd3Mapped(" ι") }, + Range { from: 'ͻ', to: 'ͽ', mapping: Valid }, + Range { from: ';', to: ';', mapping: DisallowedStd3Mapped(";") }, + Range { from: 'Ϳ', to: 'Ϳ', mapping: Mapped("ϳ") }, + Range { from: '΀', to: '΃', mapping: Disallowed }, + Range { from: '΄', to: '΄', mapping: DisallowedStd3Mapped(" ́") }, + Range { from: '΅', to: '΅', mapping: DisallowedStd3Mapped(" ̈́") }, + Range { from: 'Ά', to: 'Ά', mapping: Mapped("ά") }, + Range { from: '·', to: '·', mapping: Mapped("·") }, + Range { from: 'Έ', to: 'Έ', mapping: Mapped("έ") }, + Range { from: 'Ή', to: 'Ή', mapping: Mapped("ή") }, + Range { from: 'Ί', to: 'Ί', mapping: Mapped("ί") }, + Range { from: '΋', to: '΋', mapping: Disallowed }, + Range { from: 'Ό', to: 'Ό', mapping: Mapped("ό") }, + Range { from: '΍', to: '΍', mapping: Disallowed }, + Range { from: 'Ύ', to: 'Ύ', mapping: Mapped("ύ") }, + Range { from: 'Ώ', to: 'Ώ', mapping: Mapped("ώ") }, + Range { from: 'ΐ', to: 'ΐ', mapping: Valid }, + Range { from: 'Α', to: 'Α', mapping: Mapped("α") }, + Range { from: 'Β', to: 'Β', mapping: Mapped("β") }, + Range { from: 'Γ', to: 'Γ', mapping: Mapped("γ") }, + Range { from: 'Δ', to: 'Δ', mapping: Mapped("δ") }, + Range { from: 'Ε', to: 'Ε', mapping: Mapped("ε") }, + Range { from: 'Ζ', to: 'Ζ', mapping: Mapped("ζ") }, + Range { from: 'Η', to: 'Η', mapping: Mapped("η") }, + Range { from: 'Θ', to: 'Θ', mapping: Mapped("θ") }, + Range { from: 'Ι', to: 'Ι', mapping: Mapped("ι") }, + Range { from: 'Κ', to: 'Κ', mapping: Mapped("κ") }, + Range { from: 'Λ', to: 'Λ', mapping: Mapped("λ") }, + Range { from: 'Μ', to: 'Μ', mapping: Mapped("μ") }, + Range { from: 'Ν', to: 'Ν', mapping: Mapped("ν") }, + Range { from: 'Ξ', to: 'Ξ', mapping: Mapped("ξ") }, + Range { from: 'Ο', to: 'Ο', mapping: Mapped("ο") }, + Range { from: 'Π', to: 'Π', mapping: Mapped("π") }, + Range { from: 'Ρ', to: 'Ρ', mapping: Mapped("ρ") }, + Range { from: '΢', to: '΢', mapping: Disallowed }, + Range { from: 'Σ', to: 'Σ', mapping: Mapped("σ") }, + Range { from: 'Τ', to: 'Τ', mapping: Mapped("τ") }, + Range { from: 'Υ', to: 'Υ', mapping: Mapped("υ") }, + Range { from: 'Φ', to: 'Φ', mapping: Mapped("φ") }, + Range { from: 'Χ', to: 'Χ', mapping: Mapped("χ") }, + Range { from: 'Ψ', to: 'Ψ', mapping: Mapped("ψ") }, + Range { from: 'Ω', to: 'Ω', mapping: Mapped("ω") }, + Range { from: 'Ϊ', to: 'Ϊ', mapping: Mapped("ϊ") }, + Range { from: 'Ϋ', to: 'Ϋ', mapping: Mapped("ϋ") }, + Range { from: 'ά', to: 'ρ', mapping: Valid }, + Range { from: 'ς', to: 'ς', mapping: Deviation("σ") }, + Range { from: 'σ', to: 'ώ', mapping: Valid }, + Range { from: 'Ϗ', to: 'Ϗ', mapping: Mapped("ϗ") }, + Range { from: 'ϐ', to: 'ϐ', mapping: Mapped("β") }, + Range { from: 'ϑ', to: 'ϑ', mapping: Mapped("θ") }, + Range { from: 'ϒ', to: 'ϒ', mapping: Mapped("υ") }, + Range { from: 'ϓ', to: 'ϓ', mapping: Mapped("ύ") }, + Range { from: 'ϔ', to: 'ϔ', mapping: Mapped("ϋ") }, + Range { from: 'ϕ', to: 'ϕ', mapping: Mapped("φ") }, + Range { from: 'ϖ', to: 'ϖ', mapping: Mapped("π") }, + Range { from: 'ϗ', to: 'ϗ', mapping: Valid }, + Range { from: 'Ϙ', to: 'Ϙ', mapping: Mapped("ϙ") }, + Range { from: 'ϙ', to: 'ϙ', mapping: Valid }, + Range { from: 'Ϛ', to: 'Ϛ', mapping: Mapped("ϛ") }, + Range { from: 'ϛ', to: 'ϛ', mapping: Valid }, + Range { from: 'Ϝ', to: 'Ϝ', mapping: Mapped("ϝ") }, + Range { from: 'ϝ', to: 'ϝ', mapping: Valid }, + Range { from: 'Ϟ', to: 'Ϟ', mapping: Mapped("ϟ") }, + Range { from: 'ϟ', to: 'ϟ', mapping: Valid }, + Range { from: 'Ϡ', to: 'Ϡ', mapping: Mapped("ϡ") }, + Range { from: 'ϡ', to: 'ϡ', mapping: Valid }, + Range { from: 'Ϣ', to: 'Ϣ', mapping: Mapped("ϣ") }, + Range { from: 'ϣ', to: 'ϣ', mapping: Valid }, + Range { from: 'Ϥ', to: 'Ϥ', mapping: Mapped("ϥ") }, + Range { from: 'ϥ', to: 'ϥ', mapping: Valid }, + Range { from: 'Ϧ', to: 'Ϧ', mapping: Mapped("ϧ") }, + Range { from: 'ϧ', to: 'ϧ', mapping: Valid }, + Range { from: 'Ϩ', to: 'Ϩ', mapping: Mapped("ϩ") }, + Range { from: 'ϩ', to: 'ϩ', mapping: Valid }, + Range { from: 'Ϫ', to: 'Ϫ', mapping: Mapped("ϫ") }, + Range { from: 'ϫ', to: 'ϫ', mapping: Valid }, + Range { from: 'Ϭ', to: 'Ϭ', mapping: Mapped("ϭ") }, + Range { from: 'ϭ', to: 'ϭ', mapping: Valid }, + Range { from: 'Ϯ', to: 'Ϯ', mapping: Mapped("ϯ") }, + Range { from: 'ϯ', to: 'ϯ', mapping: Valid }, + Range { from: 'ϰ', to: 'ϰ', mapping: Mapped("κ") }, + Range { from: 'ϱ', to: 'ϱ', mapping: Mapped("ρ") }, + Range { from: 'ϲ', to: 'ϲ', mapping: Mapped("σ") }, + Range { from: 'ϳ', to: 'ϳ', mapping: Valid }, + Range { from: 'ϴ', to: 'ϴ', mapping: Mapped("θ") }, + Range { from: 'ϵ', to: 'ϵ', mapping: Mapped("ε") }, + Range { from: '϶', to: '϶', mapping: Valid }, + Range { from: 'Ϸ', to: 'Ϸ', mapping: Mapped("ϸ") }, + Range { from: 'ϸ', to: 'ϸ', mapping: Valid }, + Range { from: 'Ϲ', to: 'Ϲ', mapping: Mapped("σ") }, + Range { from: 'Ϻ', to: 'Ϻ', mapping: Mapped("ϻ") }, + Range { from: 'ϻ', to: 'ϻ', mapping: Valid }, + Range { from: 'ϼ', to: 'ϼ', mapping: Valid }, + Range { from: 'Ͻ', to: 'Ͻ', mapping: Mapped("ͻ") }, + Range { from: 'Ͼ', to: 'Ͼ', mapping: Mapped("ͼ") }, + Range { from: 'Ͽ', to: 'Ͽ', mapping: Mapped("ͽ") }, + Range { from: 'Ѐ', to: 'Ѐ', mapping: Mapped("ѐ") }, + Range { from: 'Ё', to: 'Ё', mapping: Mapped("ё") }, + Range { from: 'Ђ', to: 'Ђ', mapping: Mapped("ђ") }, + Range { from: 'Ѓ', to: 'Ѓ', mapping: Mapped("ѓ") }, + Range { from: 'Є', to: 'Є', mapping: Mapped("є") }, + Range { from: 'Ѕ', to: 'Ѕ', mapping: Mapped("ѕ") }, + Range { from: 'І', to: 'І', mapping: Mapped("і") }, + Range { from: 'Ї', to: 'Ї', mapping: Mapped("ї") }, + Range { from: 'Ј', to: 'Ј', mapping: Mapped("ј") }, + Range { from: 'Љ', to: 'Љ', mapping: Mapped("љ") }, + Range { from: 'Њ', to: 'Њ', mapping: Mapped("њ") }, + Range { from: 'Ћ', to: 'Ћ', mapping: Mapped("ћ") }, + Range { from: 'Ќ', to: 'Ќ', mapping: Mapped("ќ") }, + Range { from: 'Ѝ', to: 'Ѝ', mapping: Mapped("ѝ") }, + Range { from: 'Ў', to: 'Ў', mapping: Mapped("ў") }, + Range { from: 'Џ', to: 'Џ', mapping: Mapped("џ") }, + Range { from: 'А', to: 'А', mapping: Mapped("а") }, + Range { from: 'Б', to: 'Б', mapping: Mapped("б") }, + Range { from: 'В', to: 'В', mapping: Mapped("в") }, + Range { from: 'Г', to: 'Г', mapping: Mapped("г") }, + Range { from: 'Д', to: 'Д', mapping: Mapped("д") }, + Range { from: 'Е', to: 'Е', mapping: Mapped("е") }, + Range { from: 'Ж', to: 'Ж', mapping: Mapped("ж") }, + Range { from: 'З', to: 'З', mapping: Mapped("з") }, + Range { from: 'И', to: 'И', mapping: Mapped("и") }, + Range { from: 'Й', to: 'Й', mapping: Mapped("й") }, + Range { from: 'К', to: 'К', mapping: Mapped("к") }, + Range { from: 'Л', to: 'Л', mapping: Mapped("л") }, + Range { from: 'М', to: 'М', mapping: Mapped("м") }, + Range { from: 'Н', to: 'Н', mapping: Mapped("н") }, + Range { from: 'О', to: 'О', mapping: Mapped("о") }, + Range { from: 'П', to: 'П', mapping: Mapped("п") }, + Range { from: 'Р', to: 'Р', mapping: Mapped("р") }, + Range { from: 'С', to: 'С', mapping: Mapped("с") }, + Range { from: 'Т', to: 'Т', mapping: Mapped("т") }, + Range { from: 'У', to: 'У', mapping: Mapped("у") }, + Range { from: 'Ф', to: 'Ф', mapping: Mapped("ф") }, + Range { from: 'Х', to: 'Х', mapping: Mapped("х") }, + Range { from: 'Ц', to: 'Ц', mapping: Mapped("ц") }, + Range { from: 'Ч', to: 'Ч', mapping: Mapped("ч") }, + Range { from: 'Ш', to: 'Ш', mapping: Mapped("ш") }, + Range { from: 'Щ', to: 'Щ', mapping: Mapped("щ") }, + Range { from: 'Ъ', to: 'Ъ', mapping: Mapped("ъ") }, + Range { from: 'Ы', to: 'Ы', mapping: Mapped("ы") }, + Range { from: 'Ь', to: 'Ь', mapping: Mapped("ь") }, + Range { from: 'Э', to: 'Э', mapping: Mapped("э") }, + Range { from: 'Ю', to: 'Ю', mapping: Mapped("ю") }, + Range { from: 'Я', to: 'Я', mapping: Mapped("я") }, + Range { from: 'а', to: 'я', mapping: Valid }, + Range { from: 'ѐ', to: 'ѐ', mapping: Valid }, + Range { from: 'ё', to: 'ќ', mapping: Valid }, + Range { from: 'ѝ', to: 'ѝ', mapping: Valid }, + Range { from: 'ў', to: 'џ', mapping: Valid }, + Range { from: 'Ѡ', to: 'Ѡ', mapping: Mapped("ѡ") }, + Range { from: 'ѡ', to: 'ѡ', mapping: Valid }, + Range { from: 'Ѣ', to: 'Ѣ', mapping: Mapped("ѣ") }, + Range { from: 'ѣ', to: 'ѣ', mapping: Valid }, + Range { from: 'Ѥ', to: 'Ѥ', mapping: Mapped("ѥ") }, + Range { from: 'ѥ', to: 'ѥ', mapping: Valid }, + Range { from: 'Ѧ', to: 'Ѧ', mapping: Mapped("ѧ") }, + Range { from: 'ѧ', to: 'ѧ', mapping: Valid }, + Range { from: 'Ѩ', to: 'Ѩ', mapping: Mapped("ѩ") }, + Range { from: 'ѩ', to: 'ѩ', mapping: Valid }, + Range { from: 'Ѫ', to: 'Ѫ', mapping: Mapped("ѫ") }, + Range { from: 'ѫ', to: 'ѫ', mapping: Valid }, + Range { from: 'Ѭ', to: 'Ѭ', mapping: Mapped("ѭ") }, + Range { from: 'ѭ', to: 'ѭ', mapping: Valid }, + Range { from: 'Ѯ', to: 'Ѯ', mapping: Mapped("ѯ") }, + Range { from: 'ѯ', to: 'ѯ', mapping: Valid }, + Range { from: 'Ѱ', to: 'Ѱ', mapping: Mapped("ѱ") }, + Range { from: 'ѱ', to: 'ѱ', mapping: Valid }, + Range { from: 'Ѳ', to: 'Ѳ', mapping: Mapped("ѳ") }, + Range { from: 'ѳ', to: 'ѳ', mapping: Valid }, + Range { from: 'Ѵ', to: 'Ѵ', mapping: Mapped("ѵ") }, + Range { from: 'ѵ', to: 'ѵ', mapping: Valid }, + Range { from: 'Ѷ', to: 'Ѷ', mapping: Mapped("ѷ") }, + Range { from: 'ѷ', to: 'ѷ', mapping: Valid }, + Range { from: 'Ѹ', to: 'Ѹ', mapping: Mapped("ѹ") }, + Range { from: 'ѹ', to: 'ѹ', mapping: Valid }, + Range { from: 'Ѻ', to: 'Ѻ', mapping: Mapped("ѻ") }, + Range { from: 'ѻ', to: 'ѻ', mapping: Valid }, + Range { from: 'Ѽ', to: 'Ѽ', mapping: Mapped("ѽ") }, + Range { from: 'ѽ', to: 'ѽ', mapping: Valid }, + Range { from: 'Ѿ', to: 'Ѿ', mapping: Mapped("ѿ") }, + Range { from: 'ѿ', to: 'ѿ', mapping: Valid }, + Range { from: 'Ҁ', to: 'Ҁ', mapping: Mapped("ҁ") }, + Range { from: 'ҁ', to: 'ҁ', mapping: Valid }, + Range { from: '҂', to: '҂', mapping: Valid }, + Range { from: '҃', to: '҆', mapping: Valid }, + Range { from: '҇', to: '҇', mapping: Valid }, + Range { from: '҈', to: '҉', mapping: Valid }, + Range { from: 'Ҋ', to: 'Ҋ', mapping: Mapped("ҋ") }, + Range { from: 'ҋ', to: 'ҋ', mapping: Valid }, + Range { from: 'Ҍ', to: 'Ҍ', mapping: Mapped("ҍ") }, + Range { from: 'ҍ', to: 'ҍ', mapping: Valid }, + Range { from: 'Ҏ', to: 'Ҏ', mapping: Mapped("ҏ") }, + Range { from: 'ҏ', to: 'ҏ', mapping: Valid }, + Range { from: 'Ґ', to: 'Ґ', mapping: Mapped("ґ") }, + Range { from: 'ґ', to: 'ґ', mapping: Valid }, + Range { from: 'Ғ', to: 'Ғ', mapping: Mapped("ғ") }, + Range { from: 'ғ', to: 'ғ', mapping: Valid }, + Range { from: 'Ҕ', to: 'Ҕ', mapping: Mapped("ҕ") }, + Range { from: 'ҕ', to: 'ҕ', mapping: Valid }, + Range { from: 'Җ', to: 'Җ', mapping: Mapped("җ") }, + Range { from: 'җ', to: 'җ', mapping: Valid }, + Range { from: 'Ҙ', to: 'Ҙ', mapping: Mapped("ҙ") }, + Range { from: 'ҙ', to: 'ҙ', mapping: Valid }, + Range { from: 'Қ', to: 'Қ', mapping: Mapped("қ") }, + Range { from: 'қ', to: 'қ', mapping: Valid }, + Range { from: 'Ҝ', to: 'Ҝ', mapping: Mapped("ҝ") }, + Range { from: 'ҝ', to: 'ҝ', mapping: Valid }, + Range { from: 'Ҟ', to: 'Ҟ', mapping: Mapped("ҟ") }, + Range { from: 'ҟ', to: 'ҟ', mapping: Valid }, + Range { from: 'Ҡ', to: 'Ҡ', mapping: Mapped("ҡ") }, + Range { from: 'ҡ', to: 'ҡ', mapping: Valid }, + Range { from: 'Ң', to: 'Ң', mapping: Mapped("ң") }, + Range { from: 'ң', to: 'ң', mapping: Valid }, + Range { from: 'Ҥ', to: 'Ҥ', mapping: Mapped("ҥ") }, + Range { from: 'ҥ', to: 'ҥ', mapping: Valid }, + Range { from: 'Ҧ', to: 'Ҧ', mapping: Mapped("ҧ") }, + Range { from: 'ҧ', to: 'ҧ', mapping: Valid }, + Range { from: 'Ҩ', to: 'Ҩ', mapping: Mapped("ҩ") }, + Range { from: 'ҩ', to: 'ҩ', mapping: Valid }, + Range { from: 'Ҫ', to: 'Ҫ', mapping: Mapped("ҫ") }, + Range { from: 'ҫ', to: 'ҫ', mapping: Valid }, + Range { from: 'Ҭ', to: 'Ҭ', mapping: Mapped("ҭ") }, + Range { from: 'ҭ', to: 'ҭ', mapping: Valid }, + Range { from: 'Ү', to: 'Ү', mapping: Mapped("ү") }, + Range { from: 'ү', to: 'ү', mapping: Valid }, + Range { from: 'Ұ', to: 'Ұ', mapping: Mapped("ұ") }, + Range { from: 'ұ', to: 'ұ', mapping: Valid }, + Range { from: 'Ҳ', to: 'Ҳ', mapping: Mapped("ҳ") }, + Range { from: 'ҳ', to: 'ҳ', mapping: Valid }, + Range { from: 'Ҵ', to: 'Ҵ', mapping: Mapped("ҵ") }, + Range { from: 'ҵ', to: 'ҵ', mapping: Valid }, + Range { from: 'Ҷ', to: 'Ҷ', mapping: Mapped("ҷ") }, + Range { from: 'ҷ', to: 'ҷ', mapping: Valid }, + Range { from: 'Ҹ', to: 'Ҹ', mapping: Mapped("ҹ") }, + Range { from: 'ҹ', to: 'ҹ', mapping: Valid }, + Range { from: 'Һ', to: 'Һ', mapping: Mapped("һ") }, + Range { from: 'һ', to: 'һ', mapping: Valid }, + Range { from: 'Ҽ', to: 'Ҽ', mapping: Mapped("ҽ") }, + Range { from: 'ҽ', to: 'ҽ', mapping: Valid }, + Range { from: 'Ҿ', to: 'Ҿ', mapping: Mapped("ҿ") }, + Range { from: 'ҿ', to: 'ҿ', mapping: Valid }, + Range { from: 'Ӏ', to: 'Ӏ', mapping: Disallowed }, + Range { from: 'Ӂ', to: 'Ӂ', mapping: Mapped("ӂ") }, + Range { from: 'ӂ', to: 'ӂ', mapping: Valid }, + Range { from: 'Ӄ', to: 'Ӄ', mapping: Mapped("ӄ") }, + Range { from: 'ӄ', to: 'ӄ', mapping: Valid }, + Range { from: 'Ӆ', to: 'Ӆ', mapping: Mapped("ӆ") }, + Range { from: 'ӆ', to: 'ӆ', mapping: Valid }, + Range { from: 'Ӈ', to: 'Ӈ', mapping: Mapped("ӈ") }, + Range { from: 'ӈ', to: 'ӈ', mapping: Valid }, + Range { from: 'Ӊ', to: 'Ӊ', mapping: Mapped("ӊ") }, + Range { from: 'ӊ', to: 'ӊ', mapping: Valid }, + Range { from: 'Ӌ', to: 'Ӌ', mapping: Mapped("ӌ") }, + Range { from: 'ӌ', to: 'ӌ', mapping: Valid }, + Range { from: 'Ӎ', to: 'Ӎ', mapping: Mapped("ӎ") }, + Range { from: 'ӎ', to: 'ӎ', mapping: Valid }, + Range { from: 'ӏ', to: 'ӏ', mapping: Valid }, + Range { from: 'Ӑ', to: 'Ӑ', mapping: Mapped("ӑ") }, + Range { from: 'ӑ', to: 'ӑ', mapping: Valid }, + Range { from: 'Ӓ', to: 'Ӓ', mapping: Mapped("ӓ") }, + Range { from: 'ӓ', to: 'ӓ', mapping: Valid }, + Range { from: 'Ӕ', to: 'Ӕ', mapping: Mapped("ӕ") }, + Range { from: 'ӕ', to: 'ӕ', mapping: Valid }, + Range { from: 'Ӗ', to: 'Ӗ', mapping: Mapped("ӗ") }, + Range { from: 'ӗ', to: 'ӗ', mapping: Valid }, + Range { from: 'Ә', to: 'Ә', mapping: Mapped("ә") }, + Range { from: 'ә', to: 'ә', mapping: Valid }, + Range { from: 'Ӛ', to: 'Ӛ', mapping: Mapped("ӛ") }, + Range { from: 'ӛ', to: 'ӛ', mapping: Valid }, + Range { from: 'Ӝ', to: 'Ӝ', mapping: Mapped("ӝ") }, + Range { from: 'ӝ', to: 'ӝ', mapping: Valid }, + Range { from: 'Ӟ', to: 'Ӟ', mapping: Mapped("ӟ") }, + Range { from: 'ӟ', to: 'ӟ', mapping: Valid }, + Range { from: 'Ӡ', to: 'Ӡ', mapping: Mapped("ӡ") }, + Range { from: 'ӡ', to: 'ӡ', mapping: Valid }, + Range { from: 'Ӣ', to: 'Ӣ', mapping: Mapped("ӣ") }, + Range { from: 'ӣ', to: 'ӣ', mapping: Valid }, + Range { from: 'Ӥ', to: 'Ӥ', mapping: Mapped("ӥ") }, + Range { from: 'ӥ', to: 'ӥ', mapping: Valid }, + Range { from: 'Ӧ', to: 'Ӧ', mapping: Mapped("ӧ") }, + Range { from: 'ӧ', to: 'ӧ', mapping: Valid }, + Range { from: 'Ө', to: 'Ө', mapping: Mapped("ө") }, + Range { from: 'ө', to: 'ө', mapping: Valid }, + Range { from: 'Ӫ', to: 'Ӫ', mapping: Mapped("ӫ") }, + Range { from: 'ӫ', to: 'ӫ', mapping: Valid }, + Range { from: 'Ӭ', to: 'Ӭ', mapping: Mapped("ӭ") }, + Range { from: 'ӭ', to: 'ӭ', mapping: Valid }, + Range { from: 'Ӯ', to: 'Ӯ', mapping: Mapped("ӯ") }, + Range { from: 'ӯ', to: 'ӯ', mapping: Valid }, + Range { from: 'Ӱ', to: 'Ӱ', mapping: Mapped("ӱ") }, + Range { from: 'ӱ', to: 'ӱ', mapping: Valid }, + Range { from: 'Ӳ', to: 'Ӳ', mapping: Mapped("ӳ") }, + Range { from: 'ӳ', to: 'ӳ', mapping: Valid }, + Range { from: 'Ӵ', to: 'Ӵ', mapping: Mapped("ӵ") }, + Range { from: 'ӵ', to: 'ӵ', mapping: Valid }, + Range { from: 'Ӷ', to: 'Ӷ', mapping: Mapped("ӷ") }, + Range { from: 'ӷ', to: 'ӷ', mapping: Valid }, + Range { from: 'Ӹ', to: 'Ӹ', mapping: Mapped("ӹ") }, + Range { from: 'ӹ', to: 'ӹ', mapping: Valid }, + Range { from: 'Ӻ', to: 'Ӻ', mapping: Mapped("ӻ") }, + Range { from: 'ӻ', to: 'ӻ', mapping: Valid }, + Range { from: 'Ӽ', to: 'Ӽ', mapping: Mapped("ӽ") }, + Range { from: 'ӽ', to: 'ӽ', mapping: Valid }, + Range { from: 'Ӿ', to: 'Ӿ', mapping: Mapped("ӿ") }, + Range { from: 'ӿ', to: 'ӿ', mapping: Valid }, + Range { from: 'Ԁ', to: 'Ԁ', mapping: Mapped("ԁ") }, + Range { from: 'ԁ', to: 'ԁ', mapping: Valid }, + Range { from: 'Ԃ', to: 'Ԃ', mapping: Mapped("ԃ") }, + Range { from: 'ԃ', to: 'ԃ', mapping: Valid }, + Range { from: 'Ԅ', to: 'Ԅ', mapping: Mapped("ԅ") }, + Range { from: 'ԅ', to: 'ԅ', mapping: Valid }, + Range { from: 'Ԇ', to: 'Ԇ', mapping: Mapped("ԇ") }, + Range { from: 'ԇ', to: 'ԇ', mapping: Valid }, + Range { from: 'Ԉ', to: 'Ԉ', mapping: Mapped("ԉ") }, + Range { from: 'ԉ', to: 'ԉ', mapping: Valid }, + Range { from: 'Ԋ', to: 'Ԋ', mapping: Mapped("ԋ") }, + Range { from: 'ԋ', to: 'ԋ', mapping: Valid }, + Range { from: 'Ԍ', to: 'Ԍ', mapping: Mapped("ԍ") }, + Range { from: 'ԍ', to: 'ԍ', mapping: Valid }, + Range { from: 'Ԏ', to: 'Ԏ', mapping: Mapped("ԏ") }, + Range { from: 'ԏ', to: 'ԏ', mapping: Valid }, + Range { from: 'Ԑ', to: 'Ԑ', mapping: Mapped("ԑ") }, + Range { from: 'ԑ', to: 'ԑ', mapping: Valid }, + Range { from: 'Ԓ', to: 'Ԓ', mapping: Mapped("ԓ") }, + Range { from: 'ԓ', to: 'ԓ', mapping: Valid }, + Range { from: 'Ԕ', to: 'Ԕ', mapping: Mapped("ԕ") }, + Range { from: 'ԕ', to: 'ԕ', mapping: Valid }, + Range { from: 'Ԗ', to: 'Ԗ', mapping: Mapped("ԗ") }, + Range { from: 'ԗ', to: 'ԗ', mapping: Valid }, + Range { from: 'Ԙ', to: 'Ԙ', mapping: Mapped("ԙ") }, + Range { from: 'ԙ', to: 'ԙ', mapping: Valid }, + Range { from: 'Ԛ', to: 'Ԛ', mapping: Mapped("ԛ") }, + Range { from: 'ԛ', to: 'ԛ', mapping: Valid }, + Range { from: 'Ԝ', to: 'Ԝ', mapping: Mapped("ԝ") }, + Range { from: 'ԝ', to: 'ԝ', mapping: Valid }, + Range { from: 'Ԟ', to: 'Ԟ', mapping: Mapped("ԟ") }, + Range { from: 'ԟ', to: 'ԟ', mapping: Valid }, + Range { from: 'Ԡ', to: 'Ԡ', mapping: Mapped("ԡ") }, + Range { from: 'ԡ', to: 'ԡ', mapping: Valid }, + Range { from: 'Ԣ', to: 'Ԣ', mapping: Mapped("ԣ") }, + Range { from: 'ԣ', to: 'ԣ', mapping: Valid }, + Range { from: 'Ԥ', to: 'Ԥ', mapping: Mapped("ԥ") }, + Range { from: 'ԥ', to: 'ԥ', mapping: Valid }, + Range { from: 'Ԧ', to: 'Ԧ', mapping: Mapped("ԧ") }, + Range { from: 'ԧ', to: 'ԧ', mapping: Valid }, + Range { from: 'Ԩ', to: 'Ԩ', mapping: Mapped("ԩ") }, + Range { from: 'ԩ', to: 'ԩ', mapping: Valid }, + Range { from: 'Ԫ', to: 'Ԫ', mapping: Mapped("ԫ") }, + Range { from: 'ԫ', to: 'ԫ', mapping: Valid }, + Range { from: 'Ԭ', to: 'Ԭ', mapping: Mapped("ԭ") }, + Range { from: 'ԭ', to: 'ԭ', mapping: Valid }, + Range { from: 'Ԯ', to: 'Ԯ', mapping: Mapped("ԯ") }, + Range { from: 'ԯ', to: 'ԯ', mapping: Valid }, + Range { from: '԰', to: '԰', mapping: Disallowed }, + Range { from: 'Ա', to: 'Ա', mapping: Mapped("ա") }, + Range { from: 'Բ', to: 'Բ', mapping: Mapped("բ") }, + Range { from: 'Գ', to: 'Գ', mapping: Mapped("գ") }, + Range { from: 'Դ', to: 'Դ', mapping: Mapped("դ") }, + Range { from: 'Ե', to: 'Ե', mapping: Mapped("ե") }, + Range { from: 'Զ', to: 'Զ', mapping: Mapped("զ") }, + Range { from: 'Է', to: 'Է', mapping: Mapped("է") }, + Range { from: 'Ը', to: 'Ը', mapping: Mapped("ը") }, + Range { from: 'Թ', to: 'Թ', mapping: Mapped("թ") }, + Range { from: 'Ժ', to: 'Ժ', mapping: Mapped("ժ") }, + Range { from: 'Ի', to: 'Ի', mapping: Mapped("ի") }, + Range { from: 'Լ', to: 'Լ', mapping: Mapped("լ") }, + Range { from: 'Խ', to: 'Խ', mapping: Mapped("խ") }, + Range { from: 'Ծ', to: 'Ծ', mapping: Mapped("ծ") }, + Range { from: 'Կ', to: 'Կ', mapping: Mapped("կ") }, + Range { from: 'Հ', to: 'Հ', mapping: Mapped("հ") }, + Range { from: 'Ձ', to: 'Ձ', mapping: Mapped("ձ") }, + Range { from: 'Ղ', to: 'Ղ', mapping: Mapped("ղ") }, + Range { from: 'Ճ', to: 'Ճ', mapping: Mapped("ճ") }, + Range { from: 'Մ', to: 'Մ', mapping: Mapped("մ") }, + Range { from: 'Յ', to: 'Յ', mapping: Mapped("յ") }, + Range { from: 'Ն', to: 'Ն', mapping: Mapped("ն") }, + Range { from: 'Շ', to: 'Շ', mapping: Mapped("շ") }, + Range { from: 'Ո', to: 'Ո', mapping: Mapped("ո") }, + Range { from: 'Չ', to: 'Չ', mapping: Mapped("չ") }, + Range { from: 'Պ', to: 'Պ', mapping: Mapped("պ") }, + Range { from: 'Ջ', to: 'Ջ', mapping: Mapped("ջ") }, + Range { from: 'Ռ', to: 'Ռ', mapping: Mapped("ռ") }, + Range { from: 'Ս', to: 'Ս', mapping: Mapped("ս") }, + Range { from: 'Վ', to: 'Վ', mapping: Mapped("վ") }, + Range { from: 'Տ', to: 'Տ', mapping: Mapped("տ") }, + Range { from: 'Ր', to: 'Ր', mapping: Mapped("ր") }, + Range { from: 'Ց', to: 'Ց', mapping: Mapped("ց") }, + Range { from: 'Ւ', to: 'Ւ', mapping: Mapped("ւ") }, + Range { from: 'Փ', to: 'Փ', mapping: Mapped("փ") }, + Range { from: 'Ք', to: 'Ք', mapping: Mapped("ք") }, + Range { from: 'Օ', to: 'Օ', mapping: Mapped("օ") }, + Range { from: 'Ֆ', to: 'Ֆ', mapping: Mapped("ֆ") }, + Range { from: '՗', to: '՘', mapping: Disallowed }, + Range { from: 'ՙ', to: 'ՙ', mapping: Valid }, + Range { from: '՚', to: '՟', mapping: Valid }, + Range { from: 'ՠ', to: 'ՠ', mapping: Disallowed }, + Range { from: 'ա', to: 'ֆ', mapping: Valid }, + Range { from: 'և', to: 'և', mapping: Mapped("եւ") }, + Range { from: 'ֈ', to: 'ֈ', mapping: Disallowed }, + Range { from: '։', to: '։', mapping: Valid }, + Range { from: '֊', to: '֊', mapping: Valid }, + Range { from: '֋', to: '֌', mapping: Disallowed }, + Range { from: '֍', to: '֎', mapping: Valid }, + Range { from: '֏', to: '֏', mapping: Valid }, + Range { from: '֐', to: '֐', mapping: Disallowed }, + Range { from: '֑', to: '֡', mapping: Valid }, + Range { from: '֢', to: '֢', mapping: Valid }, + Range { from: '֣', to: '֯', mapping: Valid }, + Range { from: 'ְ', to: 'ֹ', mapping: Valid }, + Range { from: 'ֺ', to: 'ֺ', mapping: Valid }, + Range { from: 'ֻ', to: 'ֽ', mapping: Valid }, + Range { from: '־', to: '־', mapping: Valid }, + Range { from: 'ֿ', to: 'ֿ', mapping: Valid }, + Range { from: '׀', to: '׀', mapping: Valid }, + Range { from: 'ׁ', to: 'ׂ', mapping: Valid }, + Range { from: '׃', to: '׃', mapping: Valid }, + Range { from: 'ׄ', to: 'ׄ', mapping: Valid }, + Range { from: 'ׅ', to: 'ׅ', mapping: Valid }, + Range { from: '׆', to: '׆', mapping: Valid }, + Range { from: 'ׇ', to: 'ׇ', mapping: Valid }, + Range { from: '׈', to: '׏', mapping: Disallowed }, + Range { from: 'א', to: 'ת', mapping: Valid }, + Range { from: '׫', to: 'ׯ', mapping: Disallowed }, + Range { from: 'װ', to: '״', mapping: Valid }, + Range { from: '׵', to: '׿', mapping: Disallowed }, + Range { from: '؀', to: '؃', mapping: Disallowed }, + Range { from: '؄', to: '؄', mapping: Disallowed }, + Range { from: '؅', to: '؅', mapping: Disallowed }, + Range { from: '؆', to: '؊', mapping: Valid }, + Range { from: '؋', to: '؋', mapping: Valid }, + Range { from: '،', to: '،', mapping: Valid }, + Range { from: '؍', to: '؏', mapping: Valid }, + Range { from: 'ؐ', to: 'ؕ', mapping: Valid }, + Range { from: 'ؖ', to: 'ؚ', mapping: Valid }, + Range { from: '؛', to: '؛', mapping: Valid }, + Range { from: '؜', to: '؜', mapping: Disallowed }, + Range { from: '؝', to: '؝', mapping: Disallowed }, + Range { from: '؞', to: '؞', mapping: Valid }, + Range { from: '؟', to: '؟', mapping: Valid }, + Range { from: 'ؠ', to: 'ؠ', mapping: Valid }, + Range { from: 'ء', to: 'غ', mapping: Valid }, + Range { from: 'ػ', to: 'ؿ', mapping: Valid }, + Range { from: 'ـ', to: 'ـ', mapping: Valid }, + Range { from: 'ف', to: 'ْ', mapping: Valid }, + Range { from: 'ٓ', to: 'ٕ', mapping: Valid }, + Range { from: 'ٖ', to: '٘', mapping: Valid }, + Range { from: 'ٙ', to: 'ٞ', mapping: Valid }, + Range { from: 'ٟ', to: 'ٟ', mapping: Valid }, + Range { from: '٠', to: '٩', mapping: Valid }, + Range { from: '٪', to: '٭', mapping: Valid }, + Range { from: 'ٮ', to: 'ٯ', mapping: Valid }, + Range { from: 'ٰ', to: 'ٴ', mapping: Valid }, + Range { from: 'ٵ', to: 'ٵ', mapping: Mapped("اٴ") }, + Range { from: 'ٶ', to: 'ٶ', mapping: Mapped("وٴ") }, + Range { from: 'ٷ', to: 'ٷ', mapping: Mapped("ۇٴ") }, + Range { from: 'ٸ', to: 'ٸ', mapping: Mapped("يٴ") }, + Range { from: 'ٹ', to: 'ڷ', mapping: Valid }, + Range { from: 'ڸ', to: 'ڹ', mapping: Valid }, + Range { from: 'ں', to: 'ھ', mapping: Valid }, + Range { from: 'ڿ', to: 'ڿ', mapping: Valid }, + Range { from: 'ۀ', to: 'ێ', mapping: Valid }, + Range { from: 'ۏ', to: 'ۏ', mapping: Valid }, + Range { from: 'ې', to: 'ۓ', mapping: Valid }, + Range { from: '۔', to: '۔', mapping: Valid }, + Range { from: 'ە', to: 'ۜ', mapping: Valid }, + Range { from: '۝', to: '۝', mapping: Disallowed }, + Range { from: '۞', to: '۞', mapping: Valid }, + Range { from: '۟', to: 'ۨ', mapping: Valid }, + Range { from: '۩', to: '۩', mapping: Valid }, + Range { from: '۪', to: 'ۭ', mapping: Valid }, + Range { from: 'ۮ', to: 'ۯ', mapping: Valid }, + Range { from: '۰', to: '۹', mapping: Valid }, + Range { from: 'ۺ', to: '۾', mapping: Valid }, + Range { from: 'ۿ', to: 'ۿ', mapping: Valid }, + Range { from: '܀', to: '܍', mapping: Valid }, + Range { from: '܎', to: '܎', mapping: Disallowed }, + Range { from: '܏', to: '܏', mapping: Disallowed }, + Range { from: 'ܐ', to: 'ܬ', mapping: Valid }, + Range { from: 'ܭ', to: 'ܯ', mapping: Valid }, + Range { from: 'ܰ', to: '݊', mapping: Valid }, + Range { from: '݋', to: '݌', mapping: Disallowed }, + Range { from: 'ݍ', to: 'ݏ', mapping: Valid }, + Range { from: 'ݐ', to: 'ݭ', mapping: Valid }, + Range { from: 'ݮ', to: 'ݿ', mapping: Valid }, + Range { from: 'ހ', to: 'ް', mapping: Valid }, + Range { from: 'ޱ', to: 'ޱ', mapping: Valid }, + Range { from: '޲', to: '޿', mapping: Disallowed }, + Range { from: '߀', to: 'ߵ', mapping: Valid }, + Range { from: '߶', to: 'ߺ', mapping: Valid }, + Range { from: '߻', to: '߿', mapping: Disallowed }, + Range { from: 'ࠀ', to: '࠭', mapping: Valid }, + Range { from: '࠮', to: '࠯', mapping: Disallowed }, + Range { from: '࠰', to: '࠾', mapping: Valid }, + Range { from: '࠿', to: '࠿', mapping: Disallowed }, + Range { from: 'ࡀ', to: '࡛', mapping: Valid }, + Range { from: '࡜', to: '࡝', mapping: Disallowed }, + Range { from: '࡞', to: '࡞', mapping: Valid }, + Range { from: '࡟', to: '࢟', mapping: Disallowed }, + Range { from: 'ࢠ', to: 'ࢠ', mapping: Valid }, + Range { from: 'ࢡ', to: 'ࢡ', mapping: Valid }, + Range { from: 'ࢢ', to: 'ࢬ', mapping: Valid }, + Range { from: 'ࢭ', to: 'ࢲ', mapping: Valid }, + Range { from: 'ࢳ', to: 'ࢴ', mapping: Valid }, + Range { from: 'ࢵ', to: '࣢', mapping: Disallowed }, + Range { from: 'ࣣ', to: 'ࣣ', mapping: Valid }, + Range { from: 'ࣤ', to: 'ࣾ', mapping: Valid }, + Range { from: 'ࣿ', to: 'ࣿ', mapping: Valid }, + Range { from: 'ऀ', to: 'ऀ', mapping: Valid }, + Range { from: 'ँ', to: 'ः', mapping: Valid }, + Range { from: 'ऄ', to: 'ऄ', mapping: Valid }, + Range { from: 'अ', to: 'ह', mapping: Valid }, + Range { from: 'ऺ', to: 'ऻ', mapping: Valid }, + Range { from: '़', to: '्', mapping: Valid }, + Range { from: 'ॎ', to: 'ॎ', mapping: Valid }, + Range { from: 'ॏ', to: 'ॏ', mapping: Valid }, + Range { from: 'ॐ', to: '॔', mapping: Valid }, + Range { from: 'ॕ', to: 'ॕ', mapping: Valid }, + Range { from: 'ॖ', to: 'ॗ', mapping: Valid }, + Range { from: 'क़', to: 'क़', mapping: Mapped("क़") }, + Range { from: 'ख़', to: 'ख़', mapping: Mapped("ख़") }, + Range { from: 'ग़', to: 'ग़', mapping: Mapped("ग़") }, + Range { from: 'ज़', to: 'ज़', mapping: Mapped("ज़") }, + Range { from: 'ड़', to: 'ड़', mapping: Mapped("ड़") }, + Range { from: 'ढ़', to: 'ढ़', mapping: Mapped("ढ़") }, + Range { from: 'फ़', to: 'फ़', mapping: Mapped("फ़") }, + Range { from: 'य़', to: 'य़', mapping: Mapped("य़") }, + Range { from: 'ॠ', to: 'ॣ', mapping: Valid }, + Range { from: '।', to: '॥', mapping: Valid }, + Range { from: '०', to: '९', mapping: Valid }, + Range { from: '॰', to: '॰', mapping: Valid }, + Range { from: 'ॱ', to: 'ॲ', mapping: Valid }, + Range { from: 'ॳ', to: 'ॷ', mapping: Valid }, + Range { from: 'ॸ', to: 'ॸ', mapping: Valid }, + Range { from: 'ॹ', to: 'ॺ', mapping: Valid }, + Range { from: 'ॻ', to: 'ॼ', mapping: Valid }, + Range { from: 'ॽ', to: 'ॽ', mapping: Valid }, + Range { from: 'ॾ', to: 'ॿ', mapping: Valid }, + Range { from: 'ঀ', to: 'ঀ', mapping: Valid }, + Range { from: 'ঁ', to: 'ঃ', mapping: Valid }, + Range { from: '঄', to: '঄', mapping: Disallowed }, + Range { from: 'অ', to: 'ঌ', mapping: Valid }, + Range { from: '঍', to: '঎', mapping: Disallowed }, + Range { from: 'এ', to: 'ঐ', mapping: Valid }, + Range { from: '঑', to: '঒', mapping: Disallowed }, + Range { from: 'ও', to: 'ন', mapping: Valid }, + Range { from: '঩', to: '঩', mapping: Disallowed }, + Range { from: 'প', to: 'র', mapping: Valid }, + Range { from: '঱', to: '঱', mapping: Disallowed }, + Range { from: 'ল', to: 'ল', mapping: Valid }, + Range { from: '঳', to: '঵', mapping: Disallowed }, + Range { from: 'শ', to: 'হ', mapping: Valid }, + Range { from: '঺', to: '঻', mapping: Disallowed }, + Range { from: '়', to: '়', mapping: Valid }, + Range { from: 'ঽ', to: 'ঽ', mapping: Valid }, + Range { from: 'া', to: 'ৄ', mapping: Valid }, + Range { from: '৅', to: '৆', mapping: Disallowed }, + Range { from: 'ে', to: 'ৈ', mapping: Valid }, + Range { from: '৉', to: '৊', mapping: Disallowed }, + Range { from: 'ো', to: '্', mapping: Valid }, + Range { from: 'ৎ', to: 'ৎ', mapping: Valid }, + Range { from: '৏', to: '৖', mapping: Disallowed }, + Range { from: 'ৗ', to: 'ৗ', mapping: Valid }, + Range { from: '৘', to: '৛', mapping: Disallowed }, + Range { from: 'ড়', to: 'ড়', mapping: Mapped("ড়") }, + Range { from: 'ঢ়', to: 'ঢ়', mapping: Mapped("ঢ়") }, + Range { from: '৞', to: '৞', mapping: Disallowed }, + Range { from: 'য়', to: 'য়', mapping: Mapped("য়") }, + Range { from: 'ৠ', to: 'ৣ', mapping: Valid }, + Range { from: '৤', to: '৥', mapping: Disallowed }, + Range { from: '০', to: 'ৱ', mapping: Valid }, + Range { from: '৲', to: '৺', mapping: Valid }, + Range { from: '৻', to: '৻', mapping: Valid }, + Range { from: 'ৼ', to: '਀', mapping: Disallowed }, + Range { from: 'ਁ', to: 'ਁ', mapping: Valid }, + Range { from: 'ਂ', to: 'ਂ', mapping: Valid }, + Range { from: 'ਃ', to: 'ਃ', mapping: Valid }, + Range { from: '਄', to: '਄', mapping: Disallowed }, + Range { from: 'ਅ', to: 'ਊ', mapping: Valid }, + Range { from: '਋', to: '਎', mapping: Disallowed }, + Range { from: 'ਏ', to: 'ਐ', mapping: Valid }, + Range { from: '਑', to: '਒', mapping: Disallowed }, + Range { from: 'ਓ', to: 'ਨ', mapping: Valid }, + Range { from: '਩', to: '਩', mapping: Disallowed }, + Range { from: 'ਪ', to: 'ਰ', mapping: Valid }, + Range { from: '਱', to: '਱', mapping: Disallowed }, + Range { from: 'ਲ', to: 'ਲ', mapping: Valid }, + Range { from: 'ਲ਼', to: 'ਲ਼', mapping: Mapped("ਲ਼") }, + Range { from: '਴', to: '਴', mapping: Disallowed }, + Range { from: 'ਵ', to: 'ਵ', mapping: Valid }, + Range { from: 'ਸ਼', to: 'ਸ਼', mapping: Mapped("ਸ਼") }, + Range { from: '਷', to: '਷', mapping: Disallowed }, + Range { from: 'ਸ', to: 'ਹ', mapping: Valid }, + Range { from: '਺', to: '਻', mapping: Disallowed }, + Range { from: '਼', to: '਼', mapping: Valid }, + Range { from: '਽', to: '਽', mapping: Disallowed }, + Range { from: 'ਾ', to: 'ੂ', mapping: Valid }, + Range { from: '੃', to: '੆', mapping: Disallowed }, + Range { from: 'ੇ', to: 'ੈ', mapping: Valid }, + Range { from: '੉', to: '੊', mapping: Disallowed }, + Range { from: 'ੋ', to: '੍', mapping: Valid }, + Range { from: '੎', to: '੐', mapping: Disallowed }, + Range { from: 'ੑ', to: 'ੑ', mapping: Valid }, + Range { from: '੒', to: '੘', mapping: Disallowed }, + Range { from: 'ਖ਼', to: 'ਖ਼', mapping: Mapped("ਖ਼") }, + Range { from: 'ਗ਼', to: 'ਗ਼', mapping: Mapped("ਗ਼") }, + Range { from: 'ਜ਼', to: 'ਜ਼', mapping: Mapped("ਜ਼") }, + Range { from: 'ੜ', to: 'ੜ', mapping: Valid }, + Range { from: '੝', to: '੝', mapping: Disallowed }, + Range { from: 'ਫ਼', to: 'ਫ਼', mapping: Mapped("ਫ਼") }, + Range { from: '੟', to: '੥', mapping: Disallowed }, + Range { from: '੦', to: 'ੴ', mapping: Valid }, + Range { from: 'ੵ', to: 'ੵ', mapping: Valid }, + Range { from: '੶', to: '઀', mapping: Disallowed }, + Range { from: 'ઁ', to: 'ઃ', mapping: Valid }, + Range { from: '઄', to: '઄', mapping: Disallowed }, + Range { from: 'અ', to: 'ઋ', mapping: Valid }, + Range { from: 'ઌ', to: 'ઌ', mapping: Valid }, + Range { from: 'ઍ', to: 'ઍ', mapping: Valid }, + Range { from: '઎', to: '઎', mapping: Disallowed }, + Range { from: 'એ', to: 'ઑ', mapping: Valid }, + Range { from: '઒', to: '઒', mapping: Disallowed }, + Range { from: 'ઓ', to: 'ન', mapping: Valid }, + Range { from: '઩', to: '઩', mapping: Disallowed }, + Range { from: 'પ', to: 'ર', mapping: Valid }, + Range { from: '઱', to: '઱', mapping: Disallowed }, + Range { from: 'લ', to: 'ળ', mapping: Valid }, + Range { from: '઴', to: '઴', mapping: Disallowed }, + Range { from: 'વ', to: 'હ', mapping: Valid }, + Range { from: '઺', to: '઻', mapping: Disallowed }, + Range { from: '઼', to: 'ૅ', mapping: Valid }, + Range { from: '૆', to: '૆', mapping: Disallowed }, + Range { from: 'ે', to: 'ૉ', mapping: Valid }, + Range { from: '૊', to: '૊', mapping: Disallowed }, + Range { from: 'ો', to: '્', mapping: Valid }, + Range { from: '૎', to: '૏', mapping: Disallowed }, + Range { from: 'ૐ', to: 'ૐ', mapping: Valid }, + Range { from: '૑', to: '૟', mapping: Disallowed }, + Range { from: 'ૠ', to: 'ૠ', mapping: Valid }, + Range { from: 'ૡ', to: 'ૣ', mapping: Valid }, + Range { from: '૤', to: '૥', mapping: Disallowed }, + Range { from: '૦', to: '૯', mapping: Valid }, + Range { from: '૰', to: '૰', mapping: Valid }, + Range { from: '૱', to: '૱', mapping: Valid }, + Range { from: '૲', to: '૸', mapping: Disallowed }, + Range { from: 'ૹ', to: 'ૹ', mapping: Valid }, + Range { from: 'ૺ', to: '଀', mapping: Disallowed }, + Range { from: 'ଁ', to: 'ଃ', mapping: Valid }, + Range { from: '଄', to: '଄', mapping: Disallowed }, + Range { from: 'ଅ', to: 'ଌ', mapping: Valid }, + Range { from: '଍', to: '଎', mapping: Disallowed }, + Range { from: 'ଏ', to: 'ଐ', mapping: Valid }, + Range { from: '଑', to: '଒', mapping: Disallowed }, + Range { from: 'ଓ', to: 'ନ', mapping: Valid }, + Range { from: '଩', to: '଩', mapping: Disallowed }, + Range { from: 'ପ', to: 'ର', mapping: Valid }, + Range { from: '଱', to: '଱', mapping: Disallowed }, + Range { from: 'ଲ', to: 'ଳ', mapping: Valid }, + Range { from: '଴', to: '଴', mapping: Disallowed }, + Range { from: 'ଵ', to: 'ଵ', mapping: Valid }, + Range { from: 'ଶ', to: 'ହ', mapping: Valid }, + Range { from: '଺', to: '଻', mapping: Disallowed }, + Range { from: '଼', to: 'ୃ', mapping: Valid }, + Range { from: 'ୄ', to: 'ୄ', mapping: Valid }, + Range { from: '୅', to: '୆', mapping: Disallowed }, + Range { from: 'େ', to: 'ୈ', mapping: Valid }, + Range { from: '୉', to: '୊', mapping: Disallowed }, + Range { from: 'ୋ', to: '୍', mapping: Valid }, + Range { from: '୎', to: '୕', mapping: Disallowed }, + Range { from: 'ୖ', to: 'ୗ', mapping: Valid }, + Range { from: '୘', to: '୛', mapping: Disallowed }, + Range { from: 'ଡ଼', to: 'ଡ଼', mapping: Mapped("ଡ଼") }, + Range { from: 'ଢ଼', to: 'ଢ଼', mapping: Mapped("ଢ଼") }, + Range { from: '୞', to: '୞', mapping: Disallowed }, + Range { from: 'ୟ', to: 'ୡ', mapping: Valid }, + Range { from: 'ୢ', to: 'ୣ', mapping: Valid }, + Range { from: '୤', to: '୥', mapping: Disallowed }, + Range { from: '୦', to: '୯', mapping: Valid }, + Range { from: '୰', to: '୰', mapping: Valid }, + Range { from: 'ୱ', to: 'ୱ', mapping: Valid }, + Range { from: '୲', to: '୷', mapping: Valid }, + Range { from: '୸', to: '஁', mapping: Disallowed }, + Range { from: 'ஂ', to: 'ஃ', mapping: Valid }, + Range { from: '஄', to: '஄', mapping: Disallowed }, + Range { from: 'அ', to: 'ஊ', mapping: Valid }, + Range { from: '஋', to: '஍', mapping: Disallowed }, + Range { from: 'எ', to: 'ஐ', mapping: Valid }, + Range { from: '஑', to: '஑', mapping: Disallowed }, + Range { from: 'ஒ', to: 'க', mapping: Valid }, + Range { from: '஖', to: '஘', mapping: Disallowed }, + Range { from: 'ங', to: 'ச', mapping: Valid }, + Range { from: '஛', to: '஛', mapping: Disallowed }, + Range { from: 'ஜ', to: 'ஜ', mapping: Valid }, + Range { from: '஝', to: '஝', mapping: Disallowed }, + Range { from: 'ஞ', to: 'ட', mapping: Valid }, + Range { from: '஠', to: '஢', mapping: Disallowed }, + Range { from: 'ண', to: 'த', mapping: Valid }, + Range { from: '஥', to: '஧', mapping: Disallowed }, + Range { from: 'ந', to: 'ப', mapping: Valid }, + Range { from: '஫', to: '஭', mapping: Disallowed }, + Range { from: 'ம', to: 'வ', mapping: Valid }, + Range { from: 'ஶ', to: 'ஶ', mapping: Valid }, + Range { from: 'ஷ', to: 'ஹ', mapping: Valid }, + Range { from: '஺', to: '஽', mapping: Disallowed }, + Range { from: 'ா', to: 'ூ', mapping: Valid }, + Range { from: '௃', to: '௅', mapping: Disallowed }, + Range { from: 'ெ', to: 'ை', mapping: Valid }, + Range { from: '௉', to: '௉', mapping: Disallowed }, + Range { from: 'ொ', to: '்', mapping: Valid }, + Range { from: '௎', to: '௏', mapping: Disallowed }, + Range { from: 'ௐ', to: 'ௐ', mapping: Valid }, + Range { from: '௑', to: '௖', mapping: Disallowed }, + Range { from: 'ௗ', to: 'ௗ', mapping: Valid }, + Range { from: '௘', to: '௥', mapping: Disallowed }, + Range { from: '௦', to: '௦', mapping: Valid }, + Range { from: '௧', to: '௯', mapping: Valid }, + Range { from: '௰', to: '௲', mapping: Valid }, + Range { from: '௳', to: '௺', mapping: Valid }, + Range { from: '௻', to: '௿', mapping: Disallowed }, + Range { from: 'ఀ', to: 'ఀ', mapping: Valid }, + Range { from: 'ఁ', to: 'ః', mapping: Valid }, + Range { from: 'ఄ', to: 'ఄ', mapping: Disallowed }, + Range { from: 'అ', to: 'ఌ', mapping: Valid }, + Range { from: '఍', to: '఍', mapping: Disallowed }, + Range { from: 'ఎ', to: 'ఐ', mapping: Valid }, + Range { from: '఑', to: '఑', mapping: Disallowed }, + Range { from: 'ఒ', to: 'న', mapping: Valid }, + Range { from: '఩', to: '఩', mapping: Disallowed }, + Range { from: 'ప', to: 'ళ', mapping: Valid }, + Range { from: 'ఴ', to: 'ఴ', mapping: Valid }, + Range { from: 'వ', to: 'హ', mapping: Valid }, + Range { from: '఺', to: '఼', mapping: Disallowed }, + Range { from: 'ఽ', to: 'ఽ', mapping: Valid }, + Range { from: 'ా', to: 'ౄ', mapping: Valid }, + Range { from: '౅', to: '౅', mapping: Disallowed }, + Range { from: 'ె', to: 'ై', mapping: Valid }, + Range { from: '౉', to: '౉', mapping: Disallowed }, + Range { from: 'ొ', to: '్', mapping: Valid }, + Range { from: '౎', to: '౔', mapping: Disallowed }, + Range { from: 'ౕ', to: 'ౖ', mapping: Valid }, + Range { from: '౗', to: '౗', mapping: Disallowed }, + Range { from: 'ౘ', to: 'ౙ', mapping: Valid }, + Range { from: 'ౚ', to: 'ౚ', mapping: Valid }, + Range { from: '౛', to: '౟', mapping: Disallowed }, + Range { from: 'ౠ', to: 'ౡ', mapping: Valid }, + Range { from: 'ౢ', to: 'ౣ', mapping: Valid }, + Range { from: '౤', to: '౥', mapping: Disallowed }, + Range { from: '౦', to: '౯', mapping: Valid }, + Range { from: '౰', to: '౷', mapping: Disallowed }, + Range { from: '౸', to: '౿', mapping: Valid }, + Range { from: 'ಀ', to: 'ಀ', mapping: Disallowed }, + Range { from: 'ಁ', to: 'ಁ', mapping: Valid }, + Range { from: 'ಂ', to: 'ಃ', mapping: Valid }, + Range { from: '಄', to: '಄', mapping: Disallowed }, + Range { from: 'ಅ', to: 'ಌ', mapping: Valid }, + Range { from: '಍', to: '಍', mapping: Disallowed }, + Range { from: 'ಎ', to: 'ಐ', mapping: Valid }, + Range { from: '಑', to: '಑', mapping: Disallowed }, + Range { from: 'ಒ', to: 'ನ', mapping: Valid }, + Range { from: '಩', to: '಩', mapping: Disallowed }, + Range { from: 'ಪ', to: 'ಳ', mapping: Valid }, + Range { from: '಴', to: '಴', mapping: Disallowed }, + Range { from: 'ವ', to: 'ಹ', mapping: Valid }, + Range { from: '಺', to: '಻', mapping: Disallowed }, + Range { from: '಼', to: 'ಽ', mapping: Valid }, + Range { from: 'ಾ', to: 'ೄ', mapping: Valid }, + Range { from: '೅', to: '೅', mapping: Disallowed }, + Range { from: 'ೆ', to: 'ೈ', mapping: Valid }, + Range { from: '೉', to: '೉', mapping: Disallowed }, + Range { from: 'ೊ', to: '್', mapping: Valid }, + Range { from: '೎', to: '೔', mapping: Disallowed }, + Range { from: 'ೕ', to: 'ೖ', mapping: Valid }, + Range { from: '೗', to: 'ೝ', mapping: Disallowed }, + Range { from: 'ೞ', to: 'ೞ', mapping: Valid }, + Range { from: '೟', to: '೟', mapping: Disallowed }, + Range { from: 'ೠ', to: 'ೡ', mapping: Valid }, + Range { from: 'ೢ', to: 'ೣ', mapping: Valid }, + Range { from: '೤', to: '೥', mapping: Disallowed }, + Range { from: '೦', to: '೯', mapping: Valid }, + Range { from: '೰', to: '೰', mapping: Disallowed }, + Range { from: 'ೱ', to: 'ೲ', mapping: Valid }, + Range { from: 'ೳ', to: 'ഀ', mapping: Disallowed }, + Range { from: 'ഁ', to: 'ഁ', mapping: Valid }, + Range { from: 'ം', to: 'ഃ', mapping: Valid }, + Range { from: 'ഄ', to: 'ഄ', mapping: Disallowed }, + Range { from: 'അ', to: 'ഌ', mapping: Valid }, + Range { from: '഍', to: '഍', mapping: Disallowed }, + Range { from: 'എ', to: 'ഐ', mapping: Valid }, + Range { from: '഑', to: '഑', mapping: Disallowed }, + Range { from: 'ഒ', to: 'ന', mapping: Valid }, + Range { from: 'ഩ', to: 'ഩ', mapping: Valid }, + Range { from: 'പ', to: 'ഹ', mapping: Valid }, + Range { from: 'ഺ', to: 'ഺ', mapping: Valid }, + Range { from: '഻', to: '഼', mapping: Disallowed }, + Range { from: 'ഽ', to: 'ഽ', mapping: Valid }, + Range { from: 'ാ', to: 'ൃ', mapping: Valid }, + Range { from: 'ൄ', to: 'ൄ', mapping: Valid }, + Range { from: '൅', to: '൅', mapping: Disallowed }, + Range { from: 'െ', to: 'ൈ', mapping: Valid }, + Range { from: '൉', to: '൉', mapping: Disallowed }, + Range { from: 'ൊ', to: '്', mapping: Valid }, + Range { from: 'ൎ', to: 'ൎ', mapping: Valid }, + Range { from: '൏', to: 'ൖ', mapping: Disallowed }, + Range { from: 'ൗ', to: 'ൗ', mapping: Valid }, + Range { from: '൘', to: '൞', mapping: Disallowed }, + Range { from: 'ൟ', to: 'ൟ', mapping: Valid }, + Range { from: 'ൠ', to: 'ൡ', mapping: Valid }, + Range { from: 'ൢ', to: 'ൣ', mapping: Valid }, + Range { from: '൤', to: '൥', mapping: Disallowed }, + Range { from: '൦', to: '൯', mapping: Valid }, + Range { from: '൰', to: '൵', mapping: Valid }, + Range { from: '൶', to: '൸', mapping: Disallowed }, + Range { from: '൹', to: '൹', mapping: Valid }, + Range { from: 'ൺ', to: 'ൿ', mapping: Valid }, + Range { from: '඀', to: 'ඁ', mapping: Disallowed }, + Range { from: 'ං', to: 'ඃ', mapping: Valid }, + Range { from: '඄', to: '඄', mapping: Disallowed }, + Range { from: 'අ', to: 'ඖ', mapping: Valid }, + Range { from: '඗', to: '඙', mapping: Disallowed }, + Range { from: 'ක', to: 'න', mapping: Valid }, + Range { from: '඲', to: '඲', mapping: Disallowed }, + Range { from: 'ඳ', to: 'ර', mapping: Valid }, + Range { from: '඼', to: '඼', mapping: Disallowed }, + Range { from: 'ල', to: 'ල', mapping: Valid }, + Range { from: '඾', to: '඿', mapping: Disallowed }, + Range { from: 'ව', to: 'ෆ', mapping: Valid }, + Range { from: '෇', to: '෉', mapping: Disallowed }, + Range { from: '්', to: '්', mapping: Valid }, + Range { from: '෋', to: '෎', mapping: Disallowed }, + Range { from: 'ා', to: 'ු', mapping: Valid }, + Range { from: '෕', to: '෕', mapping: Disallowed }, + Range { from: 'ූ', to: 'ූ', mapping: Valid }, + Range { from: '෗', to: '෗', mapping: Disallowed }, + Range { from: 'ෘ', to: 'ෟ', mapping: Valid }, + Range { from: '෠', to: '෥', mapping: Disallowed }, + Range { from: '෦', to: '෯', mapping: Valid }, + Range { from: '෰', to: '෱', mapping: Disallowed }, + Range { from: 'ෲ', to: 'ෳ', mapping: Valid }, + Range { from: '෴', to: '෴', mapping: Valid }, + Range { from: '෵', to: '฀', mapping: Disallowed }, + Range { from: 'ก', to: 'า', mapping: Valid }, + Range { from: 'ำ', to: 'ำ', mapping: Mapped("ํา") }, + Range { from: 'ิ', to: 'ฺ', mapping: Valid }, + Range { from: '฻', to: '฾', mapping: Disallowed }, + Range { from: '฿', to: '฿', mapping: Valid }, + Range { from: 'เ', to: '๎', mapping: Valid }, + Range { from: '๏', to: '๏', mapping: Valid }, + Range { from: '๐', to: '๙', mapping: Valid }, + Range { from: '๚', to: '๛', mapping: Valid }, + Range { from: '๜', to: '຀', mapping: Disallowed }, + Range { from: 'ກ', to: 'ຂ', mapping: Valid }, + Range { from: '຃', to: '຃', mapping: Disallowed }, + Range { from: 'ຄ', to: 'ຄ', mapping: Valid }, + Range { from: '຅', to: 'ຆ', mapping: Disallowed }, + Range { from: 'ງ', to: 'ຈ', mapping: Valid }, + Range { from: 'ຉ', to: 'ຉ', mapping: Disallowed }, + Range { from: 'ຊ', to: 'ຊ', mapping: Valid }, + Range { from: '຋', to: 'ຌ', mapping: Disallowed }, + Range { from: 'ຍ', to: 'ຍ', mapping: Valid }, + Range { from: 'ຎ', to: 'ຓ', mapping: Disallowed }, + Range { from: 'ດ', to: 'ທ', mapping: Valid }, + Range { from: 'ຘ', to: 'ຘ', mapping: Disallowed }, + Range { from: 'ນ', to: 'ຟ', mapping: Valid }, + Range { from: 'ຠ', to: 'ຠ', mapping: Disallowed }, + Range { from: 'ມ', to: 'ຣ', mapping: Valid }, + Range { from: '຤', to: '຤', mapping: Disallowed }, + Range { from: 'ລ', to: 'ລ', mapping: Valid }, + Range { from: '຦', to: '຦', mapping: Disallowed }, + Range { from: 'ວ', to: 'ວ', mapping: Valid }, + Range { from: 'ຨ', to: 'ຩ', mapping: Disallowed }, + Range { from: 'ສ', to: 'ຫ', mapping: Valid }, + Range { from: 'ຬ', to: 'ຬ', mapping: Disallowed }, + Range { from: 'ອ', to: 'າ', mapping: Valid }, + Range { from: 'ຳ', to: 'ຳ', mapping: Mapped("ໍາ") }, + Range { from: 'ິ', to: 'ູ', mapping: Valid }, + Range { from: '຺', to: '຺', mapping: Disallowed }, + Range { from: 'ົ', to: 'ຽ', mapping: Valid }, + Range { from: '຾', to: '຿', mapping: Disallowed }, + Range { from: 'ເ', to: 'ໄ', mapping: Valid }, + Range { from: '໅', to: '໅', mapping: Disallowed }, + Range { from: 'ໆ', to: 'ໆ', mapping: Valid }, + Range { from: '໇', to: '໇', mapping: Disallowed }, + Range { from: '່', to: 'ໍ', mapping: Valid }, + Range { from: '໎', to: '໏', mapping: Disallowed }, + Range { from: '໐', to: '໙', mapping: Valid }, + Range { from: '໚', to: '໛', mapping: Disallowed }, + Range { from: 'ໜ', to: 'ໜ', mapping: Mapped("ຫນ") }, + Range { from: 'ໝ', to: 'ໝ', mapping: Mapped("ຫມ") }, + Range { from: 'ໞ', to: 'ໟ', mapping: Valid }, + Range { from: '໠', to: '໿', mapping: Disallowed }, + Range { from: 'ༀ', to: 'ༀ', mapping: Valid }, + Range { from: '༁', to: '༊', mapping: Valid }, + Range { from: '་', to: '་', mapping: Valid }, + Range { from: '༌', to: '༌', mapping: Mapped("་") }, + Range { from: '།', to: '༗', mapping: Valid }, + Range { from: '༘', to: '༙', mapping: Valid }, + Range { from: '༚', to: '༟', mapping: Valid }, + Range { from: '༠', to: '༩', mapping: Valid }, + Range { from: '༪', to: '༴', mapping: Valid }, + Range { from: '༵', to: '༵', mapping: Valid }, + Range { from: '༶', to: '༶', mapping: Valid }, + Range { from: '༷', to: '༷', mapping: Valid }, + Range { from: '༸', to: '༸', mapping: Valid }, + Range { from: '༹', to: '༹', mapping: Valid }, + Range { from: '༺', to: '༽', mapping: Valid }, + Range { from: '༾', to: 'ག', mapping: Valid }, + Range { from: 'གྷ', to: 'གྷ', mapping: Mapped("གྷ") }, + Range { from: 'ང', to: 'ཇ', mapping: Valid }, + Range { from: '཈', to: '཈', mapping: Disallowed }, + Range { from: 'ཉ', to: 'ཌ', mapping: Valid }, + Range { from: 'ཌྷ', to: 'ཌྷ', mapping: Mapped("ཌྷ") }, + Range { from: 'ཎ', to: 'ད', mapping: Valid }, + Range { from: 'དྷ', to: 'དྷ', mapping: Mapped("དྷ") }, + Range { from: 'ན', to: 'བ', mapping: Valid }, + Range { from: 'བྷ', to: 'བྷ', mapping: Mapped("བྷ") }, + Range { from: 'མ', to: 'ཛ', mapping: Valid }, + Range { from: 'ཛྷ', to: 'ཛྷ', mapping: Mapped("ཛྷ") }, + Range { from: 'ཝ', to: 'ཨ', mapping: Valid }, + Range { from: 'ཀྵ', to: 'ཀྵ', mapping: Mapped("ཀྵ") }, + Range { from: 'ཪ', to: 'ཪ', mapping: Valid }, + Range { from: 'ཫ', to: 'ཬ', mapping: Valid }, + Range { from: '཭', to: '཰', mapping: Disallowed }, + Range { from: 'ཱ', to: 'ི', mapping: Valid }, + Range { from: 'ཱི', to: 'ཱི', mapping: Mapped("ཱི") }, + Range { from: 'ུ', to: 'ུ', mapping: Valid }, + Range { from: 'ཱུ', to: 'ཱུ', mapping: Mapped("ཱུ") }, + Range { from: 'ྲྀ', to: 'ྲྀ', mapping: Mapped("ྲྀ") }, + Range { from: 'ཷ', to: 'ཷ', mapping: Mapped("ྲཱྀ") }, + Range { from: 'ླྀ', to: 'ླྀ', mapping: Mapped("ླྀ") }, + Range { from: 'ཹ', to: 'ཹ', mapping: Mapped("ླཱྀ") }, + Range { from: 'ེ', to: 'ྀ', mapping: Valid }, + Range { from: 'ཱྀ', to: 'ཱྀ', mapping: Mapped("ཱྀ") }, + Range { from: 'ྂ', to: '྄', mapping: Valid }, + Range { from: '྅', to: '྅', mapping: Valid }, + Range { from: '྆', to: 'ྋ', mapping: Valid }, + Range { from: 'ྌ', to: 'ྏ', mapping: Valid }, + Range { from: 'ྐ', to: 'ྒ', mapping: Valid }, + Range { from: 'ྒྷ', to: 'ྒྷ', mapping: Mapped("ྒྷ") }, + Range { from: 'ྔ', to: 'ྕ', mapping: Valid }, + Range { from: 'ྖ', to: 'ྖ', mapping: Valid }, + Range { from: 'ྗ', to: 'ྗ', mapping: Valid }, + Range { from: '྘', to: '྘', mapping: Disallowed }, + Range { from: 'ྙ', to: 'ྜ', mapping: Valid }, + Range { from: 'ྜྷ', to: 'ྜྷ', mapping: Mapped("ྜྷ") }, + Range { from: 'ྞ', to: 'ྡ', mapping: Valid }, + Range { from: 'ྡྷ', to: 'ྡྷ', mapping: Mapped("ྡྷ") }, + Range { from: 'ྣ', to: 'ྦ', mapping: Valid }, + Range { from: 'ྦྷ', to: 'ྦྷ', mapping: Mapped("ྦྷ") }, + Range { from: 'ྨ', to: 'ྫ', mapping: Valid }, + Range { from: 'ྫྷ', to: 'ྫྷ', mapping: Mapped("ྫྷ") }, + Range { from: 'ྭ', to: 'ྭ', mapping: Valid }, + Range { from: 'ྮ', to: 'ྰ', mapping: Valid }, + Range { from: 'ྱ', to: 'ྷ', mapping: Valid }, + Range { from: 'ྸ', to: 'ྸ', mapping: Valid }, + Range { from: 'ྐྵ', to: 'ྐྵ', mapping: Mapped("ྐྵ") }, + Range { from: 'ྺ', to: 'ྼ', mapping: Valid }, + Range { from: '྽', to: '྽', mapping: Disallowed }, + Range { from: '྾', to: '࿅', mapping: Valid }, + Range { from: '࿆', to: '࿆', mapping: Valid }, + Range { from: '࿇', to: '࿌', mapping: Valid }, + Range { from: '࿍', to: '࿍', mapping: Disallowed }, + Range { from: '࿎', to: '࿎', mapping: Valid }, + Range { from: '࿏', to: '࿏', mapping: Valid }, + Range { from: '࿐', to: '࿑', mapping: Valid }, + Range { from: '࿒', to: '࿔', mapping: Valid }, + Range { from: '࿕', to: '࿘', mapping: Valid }, + Range { from: '࿙', to: '࿚', mapping: Valid }, + Range { from: '࿛', to: '࿿', mapping: Disallowed }, + Range { from: 'က', to: 'အ', mapping: Valid }, + Range { from: 'ဢ', to: 'ဢ', mapping: Valid }, + Range { from: 'ဣ', to: 'ဧ', mapping: Valid }, + Range { from: 'ဨ', to: 'ဨ', mapping: Valid }, + Range { from: 'ဩ', to: 'ဪ', mapping: Valid }, + Range { from: 'ါ', to: 'ါ', mapping: Valid }, + Range { from: 'ာ', to: 'ဲ', mapping: Valid }, + Range { from: 'ဳ', to: 'ဵ', mapping: Valid }, + Range { from: 'ံ', to: '္', mapping: Valid }, + Range { from: '်', to: 'ဿ', mapping: Valid }, + Range { from: '၀', to: '၉', mapping: Valid }, + Range { from: '၊', to: '၏', mapping: Valid }, + Range { from: 'ၐ', to: 'ၙ', mapping: Valid }, + Range { from: 'ၚ', to: '႙', mapping: Valid }, + Range { from: 'ႚ', to: 'ႝ', mapping: Valid }, + Range { from: '႞', to: '႟', mapping: Valid }, + Range { from: 'Ⴀ', to: 'Ⴥ', mapping: Disallowed }, + Range { from: '჆', to: '჆', mapping: Disallowed }, + Range { from: 'Ⴧ', to: 'Ⴧ', mapping: Mapped("ⴧ") }, + Range { from: '჈', to: '჌', mapping: Disallowed }, + Range { from: 'Ⴭ', to: 'Ⴭ', mapping: Mapped("ⴭ") }, + Range { from: '჎', to: '჏', mapping: Disallowed }, + Range { from: 'ა', to: 'ჶ', mapping: Valid }, + Range { from: 'ჷ', to: 'ჸ', mapping: Valid }, + Range { from: 'ჹ', to: 'ჺ', mapping: Valid }, + Range { from: '჻', to: '჻', mapping: Valid }, + Range { from: 'ჼ', to: 'ჼ', mapping: Mapped("ნ") }, + Range { from: 'ჽ', to: 'ჿ', mapping: Valid }, + Range { from: 'ᄀ', to: 'ᅙ', mapping: Valid }, + Range { from: 'ᅚ', to: 'ᅞ', mapping: Valid }, + Range { from: 'ᅟ', to: 'ᅠ', mapping: Disallowed }, + Range { from: 'ᅡ', to: 'ᆢ', mapping: Valid }, + Range { from: 'ᆣ', to: 'ᆧ', mapping: Valid }, + Range { from: 'ᆨ', to: 'ᇹ', mapping: Valid }, + Range { from: 'ᇺ', to: 'ᇿ', mapping: Valid }, + Range { from: 'ሀ', to: 'ሆ', mapping: Valid }, + Range { from: 'ሇ', to: 'ሇ', mapping: Valid }, + Range { from: 'ለ', to: 'ቆ', mapping: Valid }, + Range { from: 'ቇ', to: 'ቇ', mapping: Valid }, + Range { from: 'ቈ', to: 'ቈ', mapping: Valid }, + Range { from: '቉', to: '቉', mapping: Disallowed }, + Range { from: 'ቊ', to: 'ቍ', mapping: Valid }, + Range { from: '቎', to: '቏', mapping: Disallowed }, + Range { from: 'ቐ', to: 'ቖ', mapping: Valid }, + Range { from: '቗', to: '቗', mapping: Disallowed }, + Range { from: 'ቘ', to: 'ቘ', mapping: Valid }, + Range { from: '቙', to: '቙', mapping: Disallowed }, + Range { from: 'ቚ', to: 'ቝ', mapping: Valid }, + Range { from: '቞', to: '቟', mapping: Disallowed }, + Range { from: 'በ', to: 'ኆ', mapping: Valid }, + Range { from: 'ኇ', to: 'ኇ', mapping: Valid }, + Range { from: 'ኈ', to: 'ኈ', mapping: Valid }, + Range { from: '኉', to: '኉', mapping: Disallowed }, + Range { from: 'ኊ', to: 'ኍ', mapping: Valid }, + Range { from: '኎', to: '኏', mapping: Disallowed }, + Range { from: 'ነ', to: 'ኮ', mapping: Valid }, + Range { from: 'ኯ', to: 'ኯ', mapping: Valid }, + Range { from: 'ኰ', to: 'ኰ', mapping: Valid }, + Range { from: '኱', to: '኱', mapping: Disallowed }, + Range { from: 'ኲ', to: 'ኵ', mapping: Valid }, + Range { from: '኶', to: '኷', mapping: Disallowed }, + Range { from: 'ኸ', to: 'ኾ', mapping: Valid }, + Range { from: '኿', to: '኿', mapping: Disallowed }, + Range { from: 'ዀ', to: 'ዀ', mapping: Valid }, + Range { from: '዁', to: '዁', mapping: Disallowed }, + Range { from: 'ዂ', to: 'ዅ', mapping: Valid }, + Range { from: '዆', to: '዇', mapping: Disallowed }, + Range { from: 'ወ', to: 'ዎ', mapping: Valid }, + Range { from: 'ዏ', to: 'ዏ', mapping: Valid }, + Range { from: 'ዐ', to: 'ዖ', mapping: Valid }, + Range { from: '዗', to: '዗', mapping: Disallowed }, + Range { from: 'ዘ', to: 'ዮ', mapping: Valid }, + Range { from: 'ዯ', to: 'ዯ', mapping: Valid }, + Range { from: 'ደ', to: 'ጎ', mapping: Valid }, + Range { from: 'ጏ', to: 'ጏ', mapping: Valid }, + Range { from: 'ጐ', to: 'ጐ', mapping: Valid }, + Range { from: '጑', to: '጑', mapping: Disallowed }, + Range { from: 'ጒ', to: 'ጕ', mapping: Valid }, + Range { from: '጖', to: '጗', mapping: Disallowed }, + Range { from: 'ጘ', to: 'ጞ', mapping: Valid }, + Range { from: 'ጟ', to: 'ጟ', mapping: Valid }, + Range { from: 'ጠ', to: 'ፆ', mapping: Valid }, + Range { from: 'ፇ', to: 'ፇ', mapping: Valid }, + Range { from: 'ፈ', to: 'ፚ', mapping: Valid }, + Range { from: '፛', to: '፜', mapping: Disallowed }, + Range { from: '፝', to: '፞', mapping: Valid }, + Range { from: '፟', to: '፟', mapping: Valid }, + Range { from: '፠', to: '፠', mapping: Valid }, + Range { from: '፡', to: '፼', mapping: Valid }, + Range { from: '፽', to: '፿', mapping: Disallowed }, + Range { from: 'ᎀ', to: 'ᎏ', mapping: Valid }, + Range { from: '᎐', to: '᎙', mapping: Valid }, + Range { from: '᎚', to: '᎟', mapping: Disallowed }, + Range { from: 'Ꭰ', to: 'Ᏼ', mapping: Valid }, + Range { from: 'Ᏽ', to: 'Ᏽ', mapping: Valid }, + Range { from: '᏶', to: '᏷', mapping: Disallowed }, + Range { from: 'ᏸ', to: 'ᏸ', mapping: Mapped("Ᏸ") }, + Range { from: 'ᏹ', to: 'ᏹ', mapping: Mapped("Ᏹ") }, + Range { from: 'ᏺ', to: 'ᏺ', mapping: Mapped("Ᏺ") }, + Range { from: 'ᏻ', to: 'ᏻ', mapping: Mapped("Ᏻ") }, + Range { from: 'ᏼ', to: 'ᏼ', mapping: Mapped("Ᏼ") }, + Range { from: 'ᏽ', to: 'ᏽ', mapping: Mapped("Ᏽ") }, + Range { from: '᏾', to: '᏿', mapping: Disallowed }, + Range { from: '᐀', to: '᐀', mapping: Valid }, + Range { from: 'ᐁ', to: 'ᙬ', mapping: Valid }, + Range { from: '᙭', to: '᙮', mapping: Valid }, + Range { from: 'ᙯ', to: 'ᙶ', mapping: Valid }, + Range { from: 'ᙷ', to: 'ᙿ', mapping: Valid }, + Range { from: ' ', to: ' ', mapping: Disallowed }, + Range { from: 'ᚁ', to: 'ᚚ', mapping: Valid }, + Range { from: '᚛', to: '᚜', mapping: Valid }, + Range { from: '᚝', to: '᚟', mapping: Disallowed }, + Range { from: 'ᚠ', to: 'ᛪ', mapping: Valid }, + Range { from: '᛫', to: 'ᛰ', mapping: Valid }, + Range { from: 'ᛱ', to: 'ᛸ', mapping: Valid }, + Range { from: '᛹', to: '᛿', mapping: Disallowed }, + Range { from: 'ᜀ', to: 'ᜌ', mapping: Valid }, + Range { from: 'ᜍ', to: 'ᜍ', mapping: Disallowed }, + Range { from: 'ᜎ', to: '᜔', mapping: Valid }, + Range { from: '᜕', to: 'ᜟ', mapping: Disallowed }, + Range { from: 'ᜠ', to: '᜴', mapping: Valid }, + Range { from: '᜵', to: '᜶', mapping: Valid }, + Range { from: '᜷', to: '᜿', mapping: Disallowed }, + Range { from: 'ᝀ', to: 'ᝓ', mapping: Valid }, + Range { from: '᝔', to: '᝟', mapping: Disallowed }, + Range { from: 'ᝠ', to: 'ᝬ', mapping: Valid }, + Range { from: '᝭', to: '᝭', mapping: Disallowed }, + Range { from: 'ᝮ', to: 'ᝰ', mapping: Valid }, + Range { from: '᝱', to: '᝱', mapping: Disallowed }, + Range { from: 'ᝲ', to: 'ᝳ', mapping: Valid }, + Range { from: '᝴', to: '᝿', mapping: Disallowed }, + Range { from: 'ក', to: 'ឳ', mapping: Valid }, + Range { from: '឴', to: '឵', mapping: Disallowed }, + Range { from: 'ា', to: '៓', mapping: Valid }, + Range { from: '។', to: '៖', mapping: Valid }, + Range { from: 'ៗ', to: 'ៗ', mapping: Valid }, + Range { from: '៘', to: '៛', mapping: Valid }, + Range { from: 'ៜ', to: 'ៜ', mapping: Valid }, + Range { from: '៝', to: '៝', mapping: Valid }, + Range { from: '៞', to: '៟', mapping: Disallowed }, + Range { from: '០', to: '៩', mapping: Valid }, + Range { from: '៪', to: '៯', mapping: Disallowed }, + Range { from: '៰', to: '៹', mapping: Valid }, + Range { from: '៺', to: '៿', mapping: Disallowed }, + Range { from: '᠀', to: '᠅', mapping: Valid }, + Range { from: '᠆', to: '᠆', mapping: Disallowed }, + Range { from: '᠇', to: '᠊', mapping: Valid }, + Range { from: '᠋', to: '᠍', mapping: Ignored }, + Range { from: '᠎', to: '᠎', mapping: Disallowed }, + Range { from: '᠏', to: '᠏', mapping: Disallowed }, + Range { from: '᠐', to: '᠙', mapping: Valid }, + Range { from: '᠚', to: '᠟', mapping: Disallowed }, + Range { from: 'ᠠ', to: 'ᡷ', mapping: Valid }, + Range { from: 'ᡸ', to: '᡿', mapping: Disallowed }, + Range { from: 'ᢀ', to: 'ᢩ', mapping: Valid }, + Range { from: 'ᢪ', to: 'ᢪ', mapping: Valid }, + Range { from: '᢫', to: '᢯', mapping: Disallowed }, + Range { from: 'ᢰ', to: 'ᣵ', mapping: Valid }, + Range { from: '᣶', to: '᣿', mapping: Disallowed }, + Range { from: 'ᤀ', to: 'ᤜ', mapping: Valid }, + Range { from: 'ᤝ', to: 'ᤞ', mapping: Valid }, + Range { from: '᤟', to: '᤟', mapping: Disallowed }, + Range { from: 'ᤠ', to: 'ᤫ', mapping: Valid }, + Range { from: '᤬', to: '᤯', mapping: Disallowed }, + Range { from: 'ᤰ', to: '᤻', mapping: Valid }, + Range { from: '᤼', to: '᤿', mapping: Disallowed }, + Range { from: '᥀', to: '᥀', mapping: Valid }, + Range { from: '᥁', to: '᥃', mapping: Disallowed }, + Range { from: '᥄', to: '᥅', mapping: Valid }, + Range { from: '᥆', to: 'ᥭ', mapping: Valid }, + Range { from: '᥮', to: '᥯', mapping: Disallowed }, + Range { from: 'ᥰ', to: 'ᥴ', mapping: Valid }, + Range { from: '᥵', to: '᥿', mapping: Disallowed }, + Range { from: 'ᦀ', to: 'ᦩ', mapping: Valid }, + Range { from: 'ᦪ', to: 'ᦫ', mapping: Valid }, + Range { from: '᦬', to: '᦯', mapping: Disallowed }, + Range { from: 'ᦰ', to: 'ᧉ', mapping: Valid }, + Range { from: '᧊', to: '᧏', mapping: Disallowed }, + Range { from: '᧐', to: '᧙', mapping: Valid }, + Range { from: '᧚', to: '᧚', mapping: Valid }, + Range { from: '᧛', to: '᧝', mapping: Disallowed }, + Range { from: '᧞', to: '᧟', mapping: Valid }, + Range { from: '᧠', to: '᧿', mapping: Valid }, + Range { from: 'ᨀ', to: 'ᨛ', mapping: Valid }, + Range { from: '᨜', to: '᨝', mapping: Disallowed }, + Range { from: '᨞', to: '᨟', mapping: Valid }, + Range { from: 'ᨠ', to: 'ᩞ', mapping: Valid }, + Range { from: '᩟', to: '᩟', mapping: Disallowed }, + Range { from: '᩠', to: '᩼', mapping: Valid }, + Range { from: '᩽', to: '᩾', mapping: Disallowed }, + Range { from: '᩿', to: '᪉', mapping: Valid }, + Range { from: '᪊', to: '᪏', mapping: Disallowed }, + Range { from: '᪐', to: '᪙', mapping: Valid }, + Range { from: '᪚', to: '᪟', mapping: Disallowed }, + Range { from: '᪠', to: '᪦', mapping: Valid }, + Range { from: 'ᪧ', to: 'ᪧ', mapping: Valid }, + Range { from: '᪨', to: '᪭', mapping: Valid }, + Range { from: '᪮', to: '᪯', mapping: Disallowed }, + Range { from: '᪰', to: '᪽', mapping: Valid }, + Range { from: '᪾', to: '᪾', mapping: Valid }, + Range { from: 'ᪿ', to: '᫿', mapping: Disallowed }, + Range { from: 'ᬀ', to: 'ᭋ', mapping: Valid }, + Range { from: 'ᭌ', to: '᭏', mapping: Disallowed }, + Range { from: '᭐', to: '᭙', mapping: Valid }, + Range { from: '᭚', to: '᭪', mapping: Valid }, + Range { from: '᭫', to: '᭳', mapping: Valid }, + Range { from: '᭴', to: '᭼', mapping: Valid }, + Range { from: '᭽', to: '᭿', mapping: Disallowed }, + Range { from: 'ᮀ', to: '᮪', mapping: Valid }, + Range { from: '᮫', to: 'ᮭ', mapping: Valid }, + Range { from: 'ᮮ', to: '᮹', mapping: Valid }, + Range { from: 'ᮺ', to: 'ᮿ', mapping: Valid }, + Range { from: 'ᯀ', to: '᯳', mapping: Valid }, + Range { from: '᯴', to: '᯻', mapping: Disallowed }, + Range { from: '᯼', to: '᯿', mapping: Valid }, + Range { from: 'ᰀ', to: '᰷', mapping: Valid }, + Range { from: '᰸', to: '᰺', mapping: Disallowed }, + Range { from: '᰻', to: '᰿', mapping: Valid }, + Range { from: '᱀', to: '᱉', mapping: Valid }, + Range { from: '᱊', to: '᱌', mapping: Disallowed }, + Range { from: 'ᱍ', to: 'ᱽ', mapping: Valid }, + Range { from: '᱾', to: '᱿', mapping: Valid }, + Range { from: 'ᲀ', to: 'Ჿ', mapping: Disallowed }, + Range { from: '᳀', to: '᳇', mapping: Valid }, + Range { from: '᳈', to: '᳏', mapping: Disallowed }, + Range { from: '᳐', to: '᳒', mapping: Valid }, + Range { from: '᳓', to: '᳓', mapping: Valid }, + Range { from: '᳔', to: 'ᳲ', mapping: Valid }, + Range { from: 'ᳳ', to: 'ᳶ', mapping: Valid }, + Range { from: '᳷', to: '᳷', mapping: Disallowed }, + Range { from: '᳸', to: '᳹', mapping: Valid }, + Range { from: 'ᳺ', to: '᳿', mapping: Disallowed }, + Range { from: 'ᴀ', to: 'ᴫ', mapping: Valid }, + Range { from: 'ᴬ', to: 'ᴬ', mapping: Mapped("a") }, + Range { from: 'ᴭ', to: 'ᴭ', mapping: Mapped("æ") }, + Range { from: 'ᴮ', to: 'ᴮ', mapping: Mapped("b") }, + Range { from: 'ᴯ', to: 'ᴯ', mapping: Valid }, + Range { from: 'ᴰ', to: 'ᴰ', mapping: Mapped("d") }, + Range { from: 'ᴱ', to: 'ᴱ', mapping: Mapped("e") }, + Range { from: 'ᴲ', to: 'ᴲ', mapping: Mapped("ǝ") }, + Range { from: 'ᴳ', to: 'ᴳ', mapping: Mapped("g") }, + Range { from: 'ᴴ', to: 'ᴴ', mapping: Mapped("h") }, + Range { from: 'ᴵ', to: 'ᴵ', mapping: Mapped("i") }, + Range { from: 'ᴶ', to: 'ᴶ', mapping: Mapped("j") }, + Range { from: 'ᴷ', to: 'ᴷ', mapping: Mapped("k") }, + Range { from: 'ᴸ', to: 'ᴸ', mapping: Mapped("l") }, + Range { from: 'ᴹ', to: 'ᴹ', mapping: Mapped("m") }, + Range { from: 'ᴺ', to: 'ᴺ', mapping: Mapped("n") }, + Range { from: 'ᴻ', to: 'ᴻ', mapping: Valid }, + Range { from: 'ᴼ', to: 'ᴼ', mapping: Mapped("o") }, + Range { from: 'ᴽ', to: 'ᴽ', mapping: Mapped("ȣ") }, + Range { from: 'ᴾ', to: 'ᴾ', mapping: Mapped("p") }, + Range { from: 'ᴿ', to: 'ᴿ', mapping: Mapped("r") }, + Range { from: 'ᵀ', to: 'ᵀ', mapping: Mapped("t") }, + Range { from: 'ᵁ', to: 'ᵁ', mapping: Mapped("u") }, + Range { from: 'ᵂ', to: 'ᵂ', mapping: Mapped("w") }, + Range { from: 'ᵃ', to: 'ᵃ', mapping: Mapped("a") }, + Range { from: 'ᵄ', to: 'ᵄ', mapping: Mapped("ɐ") }, + Range { from: 'ᵅ', to: 'ᵅ', mapping: Mapped("ɑ") }, + Range { from: 'ᵆ', to: 'ᵆ', mapping: Mapped("ᴂ") }, + Range { from: 'ᵇ', to: 'ᵇ', mapping: Mapped("b") }, + Range { from: 'ᵈ', to: 'ᵈ', mapping: Mapped("d") }, + Range { from: 'ᵉ', to: 'ᵉ', mapping: Mapped("e") }, + Range { from: 'ᵊ', to: 'ᵊ', mapping: Mapped("ə") }, + Range { from: 'ᵋ', to: 'ᵋ', mapping: Mapped("ɛ") }, + Range { from: 'ᵌ', to: 'ᵌ', mapping: Mapped("ɜ") }, + Range { from: 'ᵍ', to: 'ᵍ', mapping: Mapped("g") }, + Range { from: 'ᵎ', to: 'ᵎ', mapping: Valid }, + Range { from: 'ᵏ', to: 'ᵏ', mapping: Mapped("k") }, + Range { from: 'ᵐ', to: 'ᵐ', mapping: Mapped("m") }, + Range { from: 'ᵑ', to: 'ᵑ', mapping: Mapped("ŋ") }, + Range { from: 'ᵒ', to: 'ᵒ', mapping: Mapped("o") }, + Range { from: 'ᵓ', to: 'ᵓ', mapping: Mapped("ɔ") }, + Range { from: 'ᵔ', to: 'ᵔ', mapping: Mapped("ᴖ") }, + Range { from: 'ᵕ', to: 'ᵕ', mapping: Mapped("ᴗ") }, + Range { from: 'ᵖ', to: 'ᵖ', mapping: Mapped("p") }, + Range { from: 'ᵗ', to: 'ᵗ', mapping: Mapped("t") }, + Range { from: 'ᵘ', to: 'ᵘ', mapping: Mapped("u") }, + Range { from: 'ᵙ', to: 'ᵙ', mapping: Mapped("ᴝ") }, + Range { from: 'ᵚ', to: 'ᵚ', mapping: Mapped("ɯ") }, + Range { from: 'ᵛ', to: 'ᵛ', mapping: Mapped("v") }, + Range { from: 'ᵜ', to: 'ᵜ', mapping: Mapped("ᴥ") }, + Range { from: 'ᵝ', to: 'ᵝ', mapping: Mapped("β") }, + Range { from: 'ᵞ', to: 'ᵞ', mapping: Mapped("γ") }, + Range { from: 'ᵟ', to: 'ᵟ', mapping: Mapped("δ") }, + Range { from: 'ᵠ', to: 'ᵠ', mapping: Mapped("φ") }, + Range { from: 'ᵡ', to: 'ᵡ', mapping: Mapped("χ") }, + Range { from: 'ᵢ', to: 'ᵢ', mapping: Mapped("i") }, + Range { from: 'ᵣ', to: 'ᵣ', mapping: Mapped("r") }, + Range { from: 'ᵤ', to: 'ᵤ', mapping: Mapped("u") }, + Range { from: 'ᵥ', to: 'ᵥ', mapping: Mapped("v") }, + Range { from: 'ᵦ', to: 'ᵦ', mapping: Mapped("β") }, + Range { from: 'ᵧ', to: 'ᵧ', mapping: Mapped("γ") }, + Range { from: 'ᵨ', to: 'ᵨ', mapping: Mapped("ρ") }, + Range { from: 'ᵩ', to: 'ᵩ', mapping: Mapped("φ") }, + Range { from: 'ᵪ', to: 'ᵪ', mapping: Mapped("χ") }, + Range { from: 'ᵫ', to: 'ᵫ', mapping: Valid }, + Range { from: 'ᵬ', to: 'ᵷ', mapping: Valid }, + Range { from: 'ᵸ', to: 'ᵸ', mapping: Mapped("н") }, + Range { from: 'ᵹ', to: 'ᶚ', mapping: Valid }, + Range { from: 'ᶛ', to: 'ᶛ', mapping: Mapped("ɒ") }, + Range { from: 'ᶜ', to: 'ᶜ', mapping: Mapped("c") }, + Range { from: 'ᶝ', to: 'ᶝ', mapping: Mapped("ɕ") }, + Range { from: 'ᶞ', to: 'ᶞ', mapping: Mapped("ð") }, + Range { from: 'ᶟ', to: 'ᶟ', mapping: Mapped("ɜ") }, + Range { from: 'ᶠ', to: 'ᶠ', mapping: Mapped("f") }, + Range { from: 'ᶡ', to: 'ᶡ', mapping: Mapped("ɟ") }, + Range { from: 'ᶢ', to: 'ᶢ', mapping: Mapped("ɡ") }, + Range { from: 'ᶣ', to: 'ᶣ', mapping: Mapped("ɥ") }, + Range { from: 'ᶤ', to: 'ᶤ', mapping: Mapped("ɨ") }, + Range { from: 'ᶥ', to: 'ᶥ', mapping: Mapped("ɩ") }, + Range { from: 'ᶦ', to: 'ᶦ', mapping: Mapped("ɪ") }, + Range { from: 'ᶧ', to: 'ᶧ', mapping: Mapped("ᵻ") }, + Range { from: 'ᶨ', to: 'ᶨ', mapping: Mapped("ʝ") }, + Range { from: 'ᶩ', to: 'ᶩ', mapping: Mapped("ɭ") }, + Range { from: 'ᶪ', to: 'ᶪ', mapping: Mapped("ᶅ") }, + Range { from: 'ᶫ', to: 'ᶫ', mapping: Mapped("ʟ") }, + Range { from: 'ᶬ', to: 'ᶬ', mapping: Mapped("ɱ") }, + Range { from: 'ᶭ', to: 'ᶭ', mapping: Mapped("ɰ") }, + Range { from: 'ᶮ', to: 'ᶮ', mapping: Mapped("ɲ") }, + Range { from: 'ᶯ', to: 'ᶯ', mapping: Mapped("ɳ") }, + Range { from: 'ᶰ', to: 'ᶰ', mapping: Mapped("ɴ") }, + Range { from: 'ᶱ', to: 'ᶱ', mapping: Mapped("ɵ") }, + Range { from: 'ᶲ', to: 'ᶲ', mapping: Mapped("ɸ") }, + Range { from: 'ᶳ', to: 'ᶳ', mapping: Mapped("ʂ") }, + Range { from: 'ᶴ', to: 'ᶴ', mapping: Mapped("ʃ") }, + Range { from: 'ᶵ', to: 'ᶵ', mapping: Mapped("ƫ") }, + Range { from: 'ᶶ', to: 'ᶶ', mapping: Mapped("ʉ") }, + Range { from: 'ᶷ', to: 'ᶷ', mapping: Mapped("ʊ") }, + Range { from: 'ᶸ', to: 'ᶸ', mapping: Mapped("ᴜ") }, + Range { from: 'ᶹ', to: 'ᶹ', mapping: Mapped("ʋ") }, + Range { from: 'ᶺ', to: 'ᶺ', mapping: Mapped("ʌ") }, + Range { from: 'ᶻ', to: 'ᶻ', mapping: Mapped("z") }, + Range { from: 'ᶼ', to: 'ᶼ', mapping: Mapped("ʐ") }, + Range { from: 'ᶽ', to: 'ᶽ', mapping: Mapped("ʑ") }, + Range { from: 'ᶾ', to: 'ᶾ', mapping: Mapped("ʒ") }, + Range { from: 'ᶿ', to: 'ᶿ', mapping: Mapped("θ") }, + Range { from: '᷀', to: '᷃', mapping: Valid }, + Range { from: '᷄', to: '᷊', mapping: Valid }, + Range { from: '᷋', to: 'ᷦ', mapping: Valid }, + Range { from: 'ᷧ', to: '᷵', mapping: Valid }, + Range { from: '᷶', to: '᷻', mapping: Disallowed }, + Range { from: '᷼', to: '᷼', mapping: Valid }, + Range { from: '᷽', to: '᷽', mapping: Valid }, + Range { from: '᷾', to: '᷿', mapping: Valid }, + Range { from: 'Ḁ', to: 'Ḁ', mapping: Mapped("ḁ") }, + Range { from: 'ḁ', to: 'ḁ', mapping: Valid }, + Range { from: 'Ḃ', to: 'Ḃ', mapping: Mapped("ḃ") }, + Range { from: 'ḃ', to: 'ḃ', mapping: Valid }, + Range { from: 'Ḅ', to: 'Ḅ', mapping: Mapped("ḅ") }, + Range { from: 'ḅ', to: 'ḅ', mapping: Valid }, + Range { from: 'Ḇ', to: 'Ḇ', mapping: Mapped("ḇ") }, + Range { from: 'ḇ', to: 'ḇ', mapping: Valid }, + Range { from: 'Ḉ', to: 'Ḉ', mapping: Mapped("ḉ") }, + Range { from: 'ḉ', to: 'ḉ', mapping: Valid }, + Range { from: 'Ḋ', to: 'Ḋ', mapping: Mapped("ḋ") }, + Range { from: 'ḋ', to: 'ḋ', mapping: Valid }, + Range { from: 'Ḍ', to: 'Ḍ', mapping: Mapped("ḍ") }, + Range { from: 'ḍ', to: 'ḍ', mapping: Valid }, + Range { from: 'Ḏ', to: 'Ḏ', mapping: Mapped("ḏ") }, + Range { from: 'ḏ', to: 'ḏ', mapping: Valid }, + Range { from: 'Ḑ', to: 'Ḑ', mapping: Mapped("ḑ") }, + Range { from: 'ḑ', to: 'ḑ', mapping: Valid }, + Range { from: 'Ḓ', to: 'Ḓ', mapping: Mapped("ḓ") }, + Range { from: 'ḓ', to: 'ḓ', mapping: Valid }, + Range { from: 'Ḕ', to: 'Ḕ', mapping: Mapped("ḕ") }, + Range { from: 'ḕ', to: 'ḕ', mapping: Valid }, + Range { from: 'Ḗ', to: 'Ḗ', mapping: Mapped("ḗ") }, + Range { from: 'ḗ', to: 'ḗ', mapping: Valid }, + Range { from: 'Ḙ', to: 'Ḙ', mapping: Mapped("ḙ") }, + Range { from: 'ḙ', to: 'ḙ', mapping: Valid }, + Range { from: 'Ḛ', to: 'Ḛ', mapping: Mapped("ḛ") }, + Range { from: 'ḛ', to: 'ḛ', mapping: Valid }, + Range { from: 'Ḝ', to: 'Ḝ', mapping: Mapped("ḝ") }, + Range { from: 'ḝ', to: 'ḝ', mapping: Valid }, + Range { from: 'Ḟ', to: 'Ḟ', mapping: Mapped("ḟ") }, + Range { from: 'ḟ', to: 'ḟ', mapping: Valid }, + Range { from: 'Ḡ', to: 'Ḡ', mapping: Mapped("ḡ") }, + Range { from: 'ḡ', to: 'ḡ', mapping: Valid }, + Range { from: 'Ḣ', to: 'Ḣ', mapping: Mapped("ḣ") }, + Range { from: 'ḣ', to: 'ḣ', mapping: Valid }, + Range { from: 'Ḥ', to: 'Ḥ', mapping: Mapped("ḥ") }, + Range { from: 'ḥ', to: 'ḥ', mapping: Valid }, + Range { from: 'Ḧ', to: 'Ḧ', mapping: Mapped("ḧ") }, + Range { from: 'ḧ', to: 'ḧ', mapping: Valid }, + Range { from: 'Ḩ', to: 'Ḩ', mapping: Mapped("ḩ") }, + Range { from: 'ḩ', to: 'ḩ', mapping: Valid }, + Range { from: 'Ḫ', to: 'Ḫ', mapping: Mapped("ḫ") }, + Range { from: 'ḫ', to: 'ḫ', mapping: Valid }, + Range { from: 'Ḭ', to: 'Ḭ', mapping: Mapped("ḭ") }, + Range { from: 'ḭ', to: 'ḭ', mapping: Valid }, + Range { from: 'Ḯ', to: 'Ḯ', mapping: Mapped("ḯ") }, + Range { from: 'ḯ', to: 'ḯ', mapping: Valid }, + Range { from: 'Ḱ', to: 'Ḱ', mapping: Mapped("ḱ") }, + Range { from: 'ḱ', to: 'ḱ', mapping: Valid }, + Range { from: 'Ḳ', to: 'Ḳ', mapping: Mapped("ḳ") }, + Range { from: 'ḳ', to: 'ḳ', mapping: Valid }, + Range { from: 'Ḵ', to: 'Ḵ', mapping: Mapped("ḵ") }, + Range { from: 'ḵ', to: 'ḵ', mapping: Valid }, + Range { from: 'Ḷ', to: 'Ḷ', mapping: Mapped("ḷ") }, + Range { from: 'ḷ', to: 'ḷ', mapping: Valid }, + Range { from: 'Ḹ', to: 'Ḹ', mapping: Mapped("ḹ") }, + Range { from: 'ḹ', to: 'ḹ', mapping: Valid }, + Range { from: 'Ḻ', to: 'Ḻ', mapping: Mapped("ḻ") }, + Range { from: 'ḻ', to: 'ḻ', mapping: Valid }, + Range { from: 'Ḽ', to: 'Ḽ', mapping: Mapped("ḽ") }, + Range { from: 'ḽ', to: 'ḽ', mapping: Valid }, + Range { from: 'Ḿ', to: 'Ḿ', mapping: Mapped("ḿ") }, + Range { from: 'ḿ', to: 'ḿ', mapping: Valid }, + Range { from: 'Ṁ', to: 'Ṁ', mapping: Mapped("ṁ") }, + Range { from: 'ṁ', to: 'ṁ', mapping: Valid }, + Range { from: 'Ṃ', to: 'Ṃ', mapping: Mapped("ṃ") }, + Range { from: 'ṃ', to: 'ṃ', mapping: Valid }, + Range { from: 'Ṅ', to: 'Ṅ', mapping: Mapped("ṅ") }, + Range { from: 'ṅ', to: 'ṅ', mapping: Valid }, + Range { from: 'Ṇ', to: 'Ṇ', mapping: Mapped("ṇ") }, + Range { from: 'ṇ', to: 'ṇ', mapping: Valid }, + Range { from: 'Ṉ', to: 'Ṉ', mapping: Mapped("ṉ") }, + Range { from: 'ṉ', to: 'ṉ', mapping: Valid }, + Range { from: 'Ṋ', to: 'Ṋ', mapping: Mapped("ṋ") }, + Range { from: 'ṋ', to: 'ṋ', mapping: Valid }, + Range { from: 'Ṍ', to: 'Ṍ', mapping: Mapped("ṍ") }, + Range { from: 'ṍ', to: 'ṍ', mapping: Valid }, + Range { from: 'Ṏ', to: 'Ṏ', mapping: Mapped("ṏ") }, + Range { from: 'ṏ', to: 'ṏ', mapping: Valid }, + Range { from: 'Ṑ', to: 'Ṑ', mapping: Mapped("ṑ") }, + Range { from: 'ṑ', to: 'ṑ', mapping: Valid }, + Range { from: 'Ṓ', to: 'Ṓ', mapping: Mapped("ṓ") }, + Range { from: 'ṓ', to: 'ṓ', mapping: Valid }, + Range { from: 'Ṕ', to: 'Ṕ', mapping: Mapped("ṕ") }, + Range { from: 'ṕ', to: 'ṕ', mapping: Valid }, + Range { from: 'Ṗ', to: 'Ṗ', mapping: Mapped("ṗ") }, + Range { from: 'ṗ', to: 'ṗ', mapping: Valid }, + Range { from: 'Ṙ', to: 'Ṙ', mapping: Mapped("ṙ") }, + Range { from: 'ṙ', to: 'ṙ', mapping: Valid }, + Range { from: 'Ṛ', to: 'Ṛ', mapping: Mapped("ṛ") }, + Range { from: 'ṛ', to: 'ṛ', mapping: Valid }, + Range { from: 'Ṝ', to: 'Ṝ', mapping: Mapped("ṝ") }, + Range { from: 'ṝ', to: 'ṝ', mapping: Valid }, + Range { from: 'Ṟ', to: 'Ṟ', mapping: Mapped("ṟ") }, + Range { from: 'ṟ', to: 'ṟ', mapping: Valid }, + Range { from: 'Ṡ', to: 'Ṡ', mapping: Mapped("ṡ") }, + Range { from: 'ṡ', to: 'ṡ', mapping: Valid }, + Range { from: 'Ṣ', to: 'Ṣ', mapping: Mapped("ṣ") }, + Range { from: 'ṣ', to: 'ṣ', mapping: Valid }, + Range { from: 'Ṥ', to: 'Ṥ', mapping: Mapped("ṥ") }, + Range { from: 'ṥ', to: 'ṥ', mapping: Valid }, + Range { from: 'Ṧ', to: 'Ṧ', mapping: Mapped("ṧ") }, + Range { from: 'ṧ', to: 'ṧ', mapping: Valid }, + Range { from: 'Ṩ', to: 'Ṩ', mapping: Mapped("ṩ") }, + Range { from: 'ṩ', to: 'ṩ', mapping: Valid }, + Range { from: 'Ṫ', to: 'Ṫ', mapping: Mapped("ṫ") }, + Range { from: 'ṫ', to: 'ṫ', mapping: Valid }, + Range { from: 'Ṭ', to: 'Ṭ', mapping: Mapped("ṭ") }, + Range { from: 'ṭ', to: 'ṭ', mapping: Valid }, + Range { from: 'Ṯ', to: 'Ṯ', mapping: Mapped("ṯ") }, + Range { from: 'ṯ', to: 'ṯ', mapping: Valid }, + Range { from: 'Ṱ', to: 'Ṱ', mapping: Mapped("ṱ") }, + Range { from: 'ṱ', to: 'ṱ', mapping: Valid }, + Range { from: 'Ṳ', to: 'Ṳ', mapping: Mapped("ṳ") }, + Range { from: 'ṳ', to: 'ṳ', mapping: Valid }, + Range { from: 'Ṵ', to: 'Ṵ', mapping: Mapped("ṵ") }, + Range { from: 'ṵ', to: 'ṵ', mapping: Valid }, + Range { from: 'Ṷ', to: 'Ṷ', mapping: Mapped("ṷ") }, + Range { from: 'ṷ', to: 'ṷ', mapping: Valid }, + Range { from: 'Ṹ', to: 'Ṹ', mapping: Mapped("ṹ") }, + Range { from: 'ṹ', to: 'ṹ', mapping: Valid }, + Range { from: 'Ṻ', to: 'Ṻ', mapping: Mapped("ṻ") }, + Range { from: 'ṻ', to: 'ṻ', mapping: Valid }, + Range { from: 'Ṽ', to: 'Ṽ', mapping: Mapped("ṽ") }, + Range { from: 'ṽ', to: 'ṽ', mapping: Valid }, + Range { from: 'Ṿ', to: 'Ṿ', mapping: Mapped("ṿ") }, + Range { from: 'ṿ', to: 'ṿ', mapping: Valid }, + Range { from: 'Ẁ', to: 'Ẁ', mapping: Mapped("ẁ") }, + Range { from: 'ẁ', to: 'ẁ', mapping: Valid }, + Range { from: 'Ẃ', to: 'Ẃ', mapping: Mapped("ẃ") }, + Range { from: 'ẃ', to: 'ẃ', mapping: Valid }, + Range { from: 'Ẅ', to: 'Ẅ', mapping: Mapped("ẅ") }, + Range { from: 'ẅ', to: 'ẅ', mapping: Valid }, + Range { from: 'Ẇ', to: 'Ẇ', mapping: Mapped("ẇ") }, + Range { from: 'ẇ', to: 'ẇ', mapping: Valid }, + Range { from: 'Ẉ', to: 'Ẉ', mapping: Mapped("ẉ") }, + Range { from: 'ẉ', to: 'ẉ', mapping: Valid }, + Range { from: 'Ẋ', to: 'Ẋ', mapping: Mapped("ẋ") }, + Range { from: 'ẋ', to: 'ẋ', mapping: Valid }, + Range { from: 'Ẍ', to: 'Ẍ', mapping: Mapped("ẍ") }, + Range { from: 'ẍ', to: 'ẍ', mapping: Valid }, + Range { from: 'Ẏ', to: 'Ẏ', mapping: Mapped("ẏ") }, + Range { from: 'ẏ', to: 'ẏ', mapping: Valid }, + Range { from: 'Ẑ', to: 'Ẑ', mapping: Mapped("ẑ") }, + Range { from: 'ẑ', to: 'ẑ', mapping: Valid }, + Range { from: 'Ẓ', to: 'Ẓ', mapping: Mapped("ẓ") }, + Range { from: 'ẓ', to: 'ẓ', mapping: Valid }, + Range { from: 'Ẕ', to: 'Ẕ', mapping: Mapped("ẕ") }, + Range { from: 'ẕ', to: 'ẙ', mapping: Valid }, + Range { from: 'ẚ', to: 'ẚ', mapping: Mapped("aʾ") }, + Range { from: 'ẛ', to: 'ẛ', mapping: Mapped("ṡ") }, + Range { from: 'ẜ', to: 'ẝ', mapping: Valid }, + Range { from: 'ẞ', to: 'ẞ', mapping: Mapped("ss") }, + Range { from: 'ẟ', to: 'ẟ', mapping: Valid }, + Range { from: 'Ạ', to: 'Ạ', mapping: Mapped("ạ") }, + Range { from: 'ạ', to: 'ạ', mapping: Valid }, + Range { from: 'Ả', to: 'Ả', mapping: Mapped("ả") }, + Range { from: 'ả', to: 'ả', mapping: Valid }, + Range { from: 'Ấ', to: 'Ấ', mapping: Mapped("ấ") }, + Range { from: 'ấ', to: 'ấ', mapping: Valid }, + Range { from: 'Ầ', to: 'Ầ', mapping: Mapped("ầ") }, + Range { from: 'ầ', to: 'ầ', mapping: Valid }, + Range { from: 'Ẩ', to: 'Ẩ', mapping: Mapped("ẩ") }, + Range { from: 'ẩ', to: 'ẩ', mapping: Valid }, + Range { from: 'Ẫ', to: 'Ẫ', mapping: Mapped("ẫ") }, + Range { from: 'ẫ', to: 'ẫ', mapping: Valid }, + Range { from: 'Ậ', to: 'Ậ', mapping: Mapped("ậ") }, + Range { from: 'ậ', to: 'ậ', mapping: Valid }, + Range { from: 'Ắ', to: 'Ắ', mapping: Mapped("ắ") }, + Range { from: 'ắ', to: 'ắ', mapping: Valid }, + Range { from: 'Ằ', to: 'Ằ', mapping: Mapped("ằ") }, + Range { from: 'ằ', to: 'ằ', mapping: Valid }, + Range { from: 'Ẳ', to: 'Ẳ', mapping: Mapped("ẳ") }, + Range { from: 'ẳ', to: 'ẳ', mapping: Valid }, + Range { from: 'Ẵ', to: 'Ẵ', mapping: Mapped("ẵ") }, + Range { from: 'ẵ', to: 'ẵ', mapping: Valid }, + Range { from: 'Ặ', to: 'Ặ', mapping: Mapped("ặ") }, + Range { from: 'ặ', to: 'ặ', mapping: Valid }, + Range { from: 'Ẹ', to: 'Ẹ', mapping: Mapped("ẹ") }, + Range { from: 'ẹ', to: 'ẹ', mapping: Valid }, + Range { from: 'Ẻ', to: 'Ẻ', mapping: Mapped("ẻ") }, + Range { from: 'ẻ', to: 'ẻ', mapping: Valid }, + Range { from: 'Ẽ', to: 'Ẽ', mapping: Mapped("ẽ") }, + Range { from: 'ẽ', to: 'ẽ', mapping: Valid }, + Range { from: 'Ế', to: 'Ế', mapping: Mapped("ế") }, + Range { from: 'ế', to: 'ế', mapping: Valid }, + Range { from: 'Ề', to: 'Ề', mapping: Mapped("ề") }, + Range { from: 'ề', to: 'ề', mapping: Valid }, + Range { from: 'Ể', to: 'Ể', mapping: Mapped("ể") }, + Range { from: 'ể', to: 'ể', mapping: Valid }, + Range { from: 'Ễ', to: 'Ễ', mapping: Mapped("ễ") }, + Range { from: 'ễ', to: 'ễ', mapping: Valid }, + Range { from: 'Ệ', to: 'Ệ', mapping: Mapped("ệ") }, + Range { from: 'ệ', to: 'ệ', mapping: Valid }, + Range { from: 'Ỉ', to: 'Ỉ', mapping: Mapped("ỉ") }, + Range { from: 'ỉ', to: 'ỉ', mapping: Valid }, + Range { from: 'Ị', to: 'Ị', mapping: Mapped("ị") }, + Range { from: 'ị', to: 'ị', mapping: Valid }, + Range { from: 'Ọ', to: 'Ọ', mapping: Mapped("ọ") }, + Range { from: 'ọ', to: 'ọ', mapping: Valid }, + Range { from: 'Ỏ', to: 'Ỏ', mapping: Mapped("ỏ") }, + Range { from: 'ỏ', to: 'ỏ', mapping: Valid }, + Range { from: 'Ố', to: 'Ố', mapping: Mapped("ố") }, + Range { from: 'ố', to: 'ố', mapping: Valid }, + Range { from: 'Ồ', to: 'Ồ', mapping: Mapped("ồ") }, + Range { from: 'ồ', to: 'ồ', mapping: Valid }, + Range { from: 'Ổ', to: 'Ổ', mapping: Mapped("ổ") }, + Range { from: 'ổ', to: 'ổ', mapping: Valid }, + Range { from: 'Ỗ', to: 'Ỗ', mapping: Mapped("ỗ") }, + Range { from: 'ỗ', to: 'ỗ', mapping: Valid }, + Range { from: 'Ộ', to: 'Ộ', mapping: Mapped("ộ") }, + Range { from: 'ộ', to: 'ộ', mapping: Valid }, + Range { from: 'Ớ', to: 'Ớ', mapping: Mapped("ớ") }, + Range { from: 'ớ', to: 'ớ', mapping: Valid }, + Range { from: 'Ờ', to: 'Ờ', mapping: Mapped("ờ") }, + Range { from: 'ờ', to: 'ờ', mapping: Valid }, + Range { from: 'Ở', to: 'Ở', mapping: Mapped("ở") }, + Range { from: 'ở', to: 'ở', mapping: Valid }, + Range { from: 'Ỡ', to: 'Ỡ', mapping: Mapped("ỡ") }, + Range { from: 'ỡ', to: 'ỡ', mapping: Valid }, + Range { from: 'Ợ', to: 'Ợ', mapping: Mapped("ợ") }, + Range { from: 'ợ', to: 'ợ', mapping: Valid }, + Range { from: 'Ụ', to: 'Ụ', mapping: Mapped("ụ") }, + Range { from: 'ụ', to: 'ụ', mapping: Valid }, + Range { from: 'Ủ', to: 'Ủ', mapping: Mapped("ủ") }, + Range { from: 'ủ', to: 'ủ', mapping: Valid }, + Range { from: 'Ứ', to: 'Ứ', mapping: Mapped("ứ") }, + Range { from: 'ứ', to: 'ứ', mapping: Valid }, + Range { from: 'Ừ', to: 'Ừ', mapping: Mapped("ừ") }, + Range { from: 'ừ', to: 'ừ', mapping: Valid }, + Range { from: 'Ử', to: 'Ử', mapping: Mapped("ử") }, + Range { from: 'ử', to: 'ử', mapping: Valid }, + Range { from: 'Ữ', to: 'Ữ', mapping: Mapped("ữ") }, + Range { from: 'ữ', to: 'ữ', mapping: Valid }, + Range { from: 'Ự', to: 'Ự', mapping: Mapped("ự") }, + Range { from: 'ự', to: 'ự', mapping: Valid }, + Range { from: 'Ỳ', to: 'Ỳ', mapping: Mapped("ỳ") }, + Range { from: 'ỳ', to: 'ỳ', mapping: Valid }, + Range { from: 'Ỵ', to: 'Ỵ', mapping: Mapped("ỵ") }, + Range { from: 'ỵ', to: 'ỵ', mapping: Valid }, + Range { from: 'Ỷ', to: 'Ỷ', mapping: Mapped("ỷ") }, + Range { from: 'ỷ', to: 'ỷ', mapping: Valid }, + Range { from: 'Ỹ', to: 'Ỹ', mapping: Mapped("ỹ") }, + Range { from: 'ỹ', to: 'ỹ', mapping: Valid }, + Range { from: 'Ỻ', to: 'Ỻ', mapping: Mapped("ỻ") }, + Range { from: 'ỻ', to: 'ỻ', mapping: Valid }, + Range { from: 'Ỽ', to: 'Ỽ', mapping: Mapped("ỽ") }, + Range { from: 'ỽ', to: 'ỽ', mapping: Valid }, + Range { from: 'Ỿ', to: 'Ỿ', mapping: Mapped("ỿ") }, + Range { from: 'ỿ', to: 'ỿ', mapping: Valid }, + Range { from: 'ἀ', to: 'ἇ', mapping: Valid }, + Range { from: 'Ἀ', to: 'Ἀ', mapping: Mapped("ἀ") }, + Range { from: 'Ἁ', to: 'Ἁ', mapping: Mapped("ἁ") }, + Range { from: 'Ἂ', to: 'Ἂ', mapping: Mapped("ἂ") }, + Range { from: 'Ἃ', to: 'Ἃ', mapping: Mapped("ἃ") }, + Range { from: 'Ἄ', to: 'Ἄ', mapping: Mapped("ἄ") }, + Range { from: 'Ἅ', to: 'Ἅ', mapping: Mapped("ἅ") }, + Range { from: 'Ἆ', to: 'Ἆ', mapping: Mapped("ἆ") }, + Range { from: 'Ἇ', to: 'Ἇ', mapping: Mapped("ἇ") }, + Range { from: 'ἐ', to: 'ἕ', mapping: Valid }, + Range { from: '἖', to: '἗', mapping: Disallowed }, + Range { from: 'Ἐ', to: 'Ἐ', mapping: Mapped("ἐ") }, + Range { from: 'Ἑ', to: 'Ἑ', mapping: Mapped("ἑ") }, + Range { from: 'Ἒ', to: 'Ἒ', mapping: Mapped("ἒ") }, + Range { from: 'Ἓ', to: 'Ἓ', mapping: Mapped("ἓ") }, + Range { from: 'Ἔ', to: 'Ἔ', mapping: Mapped("ἔ") }, + Range { from: 'Ἕ', to: 'Ἕ', mapping: Mapped("ἕ") }, + Range { from: '἞', to: '἟', mapping: Disallowed }, + Range { from: 'ἠ', to: 'ἧ', mapping: Valid }, + Range { from: 'Ἠ', to: 'Ἠ', mapping: Mapped("ἠ") }, + Range { from: 'Ἡ', to: 'Ἡ', mapping: Mapped("ἡ") }, + Range { from: 'Ἢ', to: 'Ἢ', mapping: Mapped("ἢ") }, + Range { from: 'Ἣ', to: 'Ἣ', mapping: Mapped("ἣ") }, + Range { from: 'Ἤ', to: 'Ἤ', mapping: Mapped("ἤ") }, + Range { from: 'Ἥ', to: 'Ἥ', mapping: Mapped("ἥ") }, + Range { from: 'Ἦ', to: 'Ἦ', mapping: Mapped("ἦ") }, + Range { from: 'Ἧ', to: 'Ἧ', mapping: Mapped("ἧ") }, + Range { from: 'ἰ', to: 'ἷ', mapping: Valid }, + Range { from: 'Ἰ', to: 'Ἰ', mapping: Mapped("ἰ") }, + Range { from: 'Ἱ', to: 'Ἱ', mapping: Mapped("ἱ") }, + Range { from: 'Ἲ', to: 'Ἲ', mapping: Mapped("ἲ") }, + Range { from: 'Ἳ', to: 'Ἳ', mapping: Mapped("ἳ") }, + Range { from: 'Ἴ', to: 'Ἴ', mapping: Mapped("ἴ") }, + Range { from: 'Ἵ', to: 'Ἵ', mapping: Mapped("ἵ") }, + Range { from: 'Ἶ', to: 'Ἶ', mapping: Mapped("ἶ") }, + Range { from: 'Ἷ', to: 'Ἷ', mapping: Mapped("ἷ") }, + Range { from: 'ὀ', to: 'ὅ', mapping: Valid }, + Range { from: '὆', to: '὇', mapping: Disallowed }, + Range { from: 'Ὀ', to: 'Ὀ', mapping: Mapped("ὀ") }, + Range { from: 'Ὁ', to: 'Ὁ', mapping: Mapped("ὁ") }, + Range { from: 'Ὂ', to: 'Ὂ', mapping: Mapped("ὂ") }, + Range { from: 'Ὃ', to: 'Ὃ', mapping: Mapped("ὃ") }, + Range { from: 'Ὄ', to: 'Ὄ', mapping: Mapped("ὄ") }, + Range { from: 'Ὅ', to: 'Ὅ', mapping: Mapped("ὅ") }, + Range { from: '὎', to: '὏', mapping: Disallowed }, + Range { from: 'ὐ', to: 'ὗ', mapping: Valid }, + Range { from: '὘', to: '὘', mapping: Disallowed }, + Range { from: 'Ὑ', to: 'Ὑ', mapping: Mapped("ὑ") }, + Range { from: '὚', to: '὚', mapping: Disallowed }, + Range { from: 'Ὓ', to: 'Ὓ', mapping: Mapped("ὓ") }, + Range { from: '὜', to: '὜', mapping: Disallowed }, + Range { from: 'Ὕ', to: 'Ὕ', mapping: Mapped("ὕ") }, + Range { from: '὞', to: '὞', mapping: Disallowed }, + Range { from: 'Ὗ', to: 'Ὗ', mapping: Mapped("ὗ") }, + Range { from: 'ὠ', to: 'ὧ', mapping: Valid }, + Range { from: 'Ὠ', to: 'Ὠ', mapping: Mapped("ὠ") }, + Range { from: 'Ὡ', to: 'Ὡ', mapping: Mapped("ὡ") }, + Range { from: 'Ὢ', to: 'Ὢ', mapping: Mapped("ὢ") }, + Range { from: 'Ὣ', to: 'Ὣ', mapping: Mapped("ὣ") }, + Range { from: 'Ὤ', to: 'Ὤ', mapping: Mapped("ὤ") }, + Range { from: 'Ὥ', to: 'Ὥ', mapping: Mapped("ὥ") }, + Range { from: 'Ὦ', to: 'Ὦ', mapping: Mapped("ὦ") }, + Range { from: 'Ὧ', to: 'Ὧ', mapping: Mapped("ὧ") }, + Range { from: 'ὰ', to: 'ὰ', mapping: Valid }, + Range { from: 'ά', to: 'ά', mapping: Mapped("ά") }, + Range { from: 'ὲ', to: 'ὲ', mapping: Valid }, + Range { from: 'έ', to: 'έ', mapping: Mapped("έ") }, + Range { from: 'ὴ', to: 'ὴ', mapping: Valid }, + Range { from: 'ή', to: 'ή', mapping: Mapped("ή") }, + Range { from: 'ὶ', to: 'ὶ', mapping: Valid }, + Range { from: 'ί', to: 'ί', mapping: Mapped("ί") }, + Range { from: 'ὸ', to: 'ὸ', mapping: Valid }, + Range { from: 'ό', to: 'ό', mapping: Mapped("ό") }, + Range { from: 'ὺ', to: 'ὺ', mapping: Valid }, + Range { from: 'ύ', to: 'ύ', mapping: Mapped("ύ") }, + Range { from: 'ὼ', to: 'ὼ', mapping: Valid }, + Range { from: 'ώ', to: 'ώ', mapping: Mapped("ώ") }, + Range { from: '὾', to: '὿', mapping: Disallowed }, + Range { from: 'ᾀ', to: 'ᾀ', mapping: Mapped("ἀι") }, + Range { from: 'ᾁ', to: 'ᾁ', mapping: Mapped("ἁι") }, + Range { from: 'ᾂ', to: 'ᾂ', mapping: Mapped("ἂι") }, + Range { from: 'ᾃ', to: 'ᾃ', mapping: Mapped("ἃι") }, + Range { from: 'ᾄ', to: 'ᾄ', mapping: Mapped("ἄι") }, + Range { from: 'ᾅ', to: 'ᾅ', mapping: Mapped("ἅι") }, + Range { from: 'ᾆ', to: 'ᾆ', mapping: Mapped("ἆι") }, + Range { from: 'ᾇ', to: 'ᾇ', mapping: Mapped("ἇι") }, + Range { from: 'ᾈ', to: 'ᾈ', mapping: Mapped("ἀι") }, + Range { from: 'ᾉ', to: 'ᾉ', mapping: Mapped("ἁι") }, + Range { from: 'ᾊ', to: 'ᾊ', mapping: Mapped("ἂι") }, + Range { from: 'ᾋ', to: 'ᾋ', mapping: Mapped("ἃι") }, + Range { from: 'ᾌ', to: 'ᾌ', mapping: Mapped("ἄι") }, + Range { from: 'ᾍ', to: 'ᾍ', mapping: Mapped("ἅι") }, + Range { from: 'ᾎ', to: 'ᾎ', mapping: Mapped("ἆι") }, + Range { from: 'ᾏ', to: 'ᾏ', mapping: Mapped("ἇι") }, + Range { from: 'ᾐ', to: 'ᾐ', mapping: Mapped("ἠι") }, + Range { from: 'ᾑ', to: 'ᾑ', mapping: Mapped("ἡι") }, + Range { from: 'ᾒ', to: 'ᾒ', mapping: Mapped("ἢι") }, + Range { from: 'ᾓ', to: 'ᾓ', mapping: Mapped("ἣι") }, + Range { from: 'ᾔ', to: 'ᾔ', mapping: Mapped("ἤι") }, + Range { from: 'ᾕ', to: 'ᾕ', mapping: Mapped("ἥι") }, + Range { from: 'ᾖ', to: 'ᾖ', mapping: Mapped("ἦι") }, + Range { from: 'ᾗ', to: 'ᾗ', mapping: Mapped("ἧι") }, + Range { from: 'ᾘ', to: 'ᾘ', mapping: Mapped("ἠι") }, + Range { from: 'ᾙ', to: 'ᾙ', mapping: Mapped("ἡι") }, + Range { from: 'ᾚ', to: 'ᾚ', mapping: Mapped("ἢι") }, + Range { from: 'ᾛ', to: 'ᾛ', mapping: Mapped("ἣι") }, + Range { from: 'ᾜ', to: 'ᾜ', mapping: Mapped("ἤι") }, + Range { from: 'ᾝ', to: 'ᾝ', mapping: Mapped("ἥι") }, + Range { from: 'ᾞ', to: 'ᾞ', mapping: Mapped("ἦι") }, + Range { from: 'ᾟ', to: 'ᾟ', mapping: Mapped("ἧι") }, + Range { from: 'ᾠ', to: 'ᾠ', mapping: Mapped("ὠι") }, + Range { from: 'ᾡ', to: 'ᾡ', mapping: Mapped("ὡι") }, + Range { from: 'ᾢ', to: 'ᾢ', mapping: Mapped("ὢι") }, + Range { from: 'ᾣ', to: 'ᾣ', mapping: Mapped("ὣι") }, + Range { from: 'ᾤ', to: 'ᾤ', mapping: Mapped("ὤι") }, + Range { from: 'ᾥ', to: 'ᾥ', mapping: Mapped("ὥι") }, + Range { from: 'ᾦ', to: 'ᾦ', mapping: Mapped("ὦι") }, + Range { from: 'ᾧ', to: 'ᾧ', mapping: Mapped("ὧι") }, + Range { from: 'ᾨ', to: 'ᾨ', mapping: Mapped("ὠι") }, + Range { from: 'ᾩ', to: 'ᾩ', mapping: Mapped("ὡι") }, + Range { from: 'ᾪ', to: 'ᾪ', mapping: Mapped("ὢι") }, + Range { from: 'ᾫ', to: 'ᾫ', mapping: Mapped("ὣι") }, + Range { from: 'ᾬ', to: 'ᾬ', mapping: Mapped("ὤι") }, + Range { from: 'ᾭ', to: 'ᾭ', mapping: Mapped("ὥι") }, + Range { from: 'ᾮ', to: 'ᾮ', mapping: Mapped("ὦι") }, + Range { from: 'ᾯ', to: 'ᾯ', mapping: Mapped("ὧι") }, + Range { from: 'ᾰ', to: 'ᾱ', mapping: Valid }, + Range { from: 'ᾲ', to: 'ᾲ', mapping: Mapped("ὰι") }, + Range { from: 'ᾳ', to: 'ᾳ', mapping: Mapped("αι") }, + Range { from: 'ᾴ', to: 'ᾴ', mapping: Mapped("άι") }, + Range { from: '᾵', to: '᾵', mapping: Disallowed }, + Range { from: 'ᾶ', to: 'ᾶ', mapping: Valid }, + Range { from: 'ᾷ', to: 'ᾷ', mapping: Mapped("ᾶι") }, + Range { from: 'Ᾰ', to: 'Ᾰ', mapping: Mapped("ᾰ") }, + Range { from: 'Ᾱ', to: 'Ᾱ', mapping: Mapped("ᾱ") }, + Range { from: 'Ὰ', to: 'Ὰ', mapping: Mapped("ὰ") }, + Range { from: 'Ά', to: 'Ά', mapping: Mapped("ά") }, + Range { from: 'ᾼ', to: 'ᾼ', mapping: Mapped("αι") }, + Range { from: '᾽', to: '᾽', mapping: DisallowedStd3Mapped(" ̓") }, + Range { from: 'ι', to: 'ι', mapping: Mapped("ι") }, + Range { from: '᾿', to: '᾿', mapping: DisallowedStd3Mapped(" ̓") }, + Range { from: '῀', to: '῀', mapping: DisallowedStd3Mapped(" ͂") }, + Range { from: '῁', to: '῁', mapping: DisallowedStd3Mapped(" ̈͂") }, + Range { from: 'ῂ', to: 'ῂ', mapping: Mapped("ὴι") }, + Range { from: 'ῃ', to: 'ῃ', mapping: Mapped("ηι") }, + Range { from: 'ῄ', to: 'ῄ', mapping: Mapped("ήι") }, + Range { from: '῅', to: '῅', mapping: Disallowed }, + Range { from: 'ῆ', to: 'ῆ', mapping: Valid }, + Range { from: 'ῇ', to: 'ῇ', mapping: Mapped("ῆι") }, + Range { from: 'Ὲ', to: 'Ὲ', mapping: Mapped("ὲ") }, + Range { from: 'Έ', to: 'Έ', mapping: Mapped("έ") }, + Range { from: 'Ὴ', to: 'Ὴ', mapping: Mapped("ὴ") }, + Range { from: 'Ή', to: 'Ή', mapping: Mapped("ή") }, + Range { from: 'ῌ', to: 'ῌ', mapping: Mapped("ηι") }, + Range { from: '῍', to: '῍', mapping: DisallowedStd3Mapped(" ̓̀") }, + Range { from: '῎', to: '῎', mapping: DisallowedStd3Mapped(" ̓́") }, + Range { from: '῏', to: '῏', mapping: DisallowedStd3Mapped(" ̓͂") }, + Range { from: 'ῐ', to: 'ῒ', mapping: Valid }, + Range { from: 'ΐ', to: 'ΐ', mapping: Mapped("ΐ") }, + Range { from: '῔', to: '῕', mapping: Disallowed }, + Range { from: 'ῖ', to: 'ῗ', mapping: Valid }, + Range { from: 'Ῐ', to: 'Ῐ', mapping: Mapped("ῐ") }, + Range { from: 'Ῑ', to: 'Ῑ', mapping: Mapped("ῑ") }, + Range { from: 'Ὶ', to: 'Ὶ', mapping: Mapped("ὶ") }, + Range { from: 'Ί', to: 'Ί', mapping: Mapped("ί") }, + Range { from: '῜', to: '῜', mapping: Disallowed }, + Range { from: '῝', to: '῝', mapping: DisallowedStd3Mapped(" ̔̀") }, + Range { from: '῞', to: '῞', mapping: DisallowedStd3Mapped(" ̔́") }, + Range { from: '῟', to: '῟', mapping: DisallowedStd3Mapped(" ̔͂") }, + Range { from: 'ῠ', to: 'ῢ', mapping: Valid }, + Range { from: 'ΰ', to: 'ΰ', mapping: Mapped("ΰ") }, + Range { from: 'ῤ', to: 'ῧ', mapping: Valid }, + Range { from: 'Ῠ', to: 'Ῠ', mapping: Mapped("ῠ") }, + Range { from: 'Ῡ', to: 'Ῡ', mapping: Mapped("ῡ") }, + Range { from: 'Ὺ', to: 'Ὺ', mapping: Mapped("ὺ") }, + Range { from: 'Ύ', to: 'Ύ', mapping: Mapped("ύ") }, + Range { from: 'Ῥ', to: 'Ῥ', mapping: Mapped("ῥ") }, + Range { from: '῭', to: '῭', mapping: DisallowedStd3Mapped(" ̈̀") }, + Range { from: '΅', to: '΅', mapping: DisallowedStd3Mapped(" ̈́") }, + Range { from: '`', to: '`', mapping: DisallowedStd3Mapped("`") }, + Range { from: '῰', to: '῱', mapping: Disallowed }, + Range { from: 'ῲ', to: 'ῲ', mapping: Mapped("ὼι") }, + Range { from: 'ῳ', to: 'ῳ', mapping: Mapped("ωι") }, + Range { from: 'ῴ', to: 'ῴ', mapping: Mapped("ώι") }, + Range { from: '῵', to: '῵', mapping: Disallowed }, + Range { from: 'ῶ', to: 'ῶ', mapping: Valid }, + Range { from: 'ῷ', to: 'ῷ', mapping: Mapped("ῶι") }, + Range { from: 'Ὸ', to: 'Ὸ', mapping: Mapped("ὸ") }, + Range { from: 'Ό', to: 'Ό', mapping: Mapped("ό") }, + Range { from: 'Ὼ', to: 'Ὼ', mapping: Mapped("ὼ") }, + Range { from: 'Ώ', to: 'Ώ', mapping: Mapped("ώ") }, + Range { from: 'ῼ', to: 'ῼ', mapping: Mapped("ωι") }, + Range { from: '´', to: '´', mapping: DisallowedStd3Mapped(" ́") }, + Range { from: '῾', to: '῾', mapping: DisallowedStd3Mapped(" ̔") }, + Range { from: '῿', to: '῿', mapping: Disallowed }, + Range { from: ' ', to: ' ', mapping: DisallowedStd3Mapped(" ") }, + Range { from: '​', to: '​', mapping: Ignored }, + Range { from: '‌', to: '‍', mapping: Deviation("") }, + Range { from: '‎', to: '‏', mapping: Disallowed }, + Range { from: '‐', to: '‐', mapping: Valid }, + Range { from: '‑', to: '‑', mapping: Mapped("‐") }, + Range { from: '‒', to: '‖', mapping: Valid }, + Range { from: '‗', to: '‗', mapping: DisallowedStd3Mapped(" ̳") }, + Range { from: '‘', to: '‣', mapping: Valid }, + Range { from: '․', to: '…', mapping: Disallowed }, + Range { from: '‧', to: '‧', mapping: Valid }, + Range { from: '
', to: '‮', mapping: Disallowed }, + Range { from: ' ', to: ' ', mapping: DisallowedStd3Mapped(" ") }, + Range { from: '‰', to: '′', mapping: Valid }, + Range { from: '″', to: '″', mapping: Mapped("′′") }, + Range { from: '‴', to: '‴', mapping: Mapped("′′′") }, + Range { from: '‵', to: '‵', mapping: Valid }, + Range { from: '‶', to: '‶', mapping: Mapped("‵‵") }, + Range { from: '‷', to: '‷', mapping: Mapped("‵‵‵") }, + Range { from: '‸', to: '※', mapping: Valid }, + Range { from: '‼', to: '‼', mapping: DisallowedStd3Mapped("!!") }, + Range { from: '‽', to: '‽', mapping: Valid }, + Range { from: '‾', to: '‾', mapping: DisallowedStd3Mapped(" ̅") }, + Range { from: '‿', to: '⁆', mapping: Valid }, + Range { from: '⁇', to: '⁇', mapping: DisallowedStd3Mapped("??") }, + Range { from: '⁈', to: '⁈', mapping: DisallowedStd3Mapped("?!") }, + Range { from: '⁉', to: '⁉', mapping: DisallowedStd3Mapped("!?") }, + Range { from: '⁊', to: '⁍', mapping: Valid }, + Range { from: '⁎', to: '⁒', mapping: Valid }, + Range { from: '⁓', to: '⁔', mapping: Valid }, + Range { from: '⁕', to: '⁖', mapping: Valid }, + Range { from: '⁗', to: '⁗', mapping: Mapped("′′′′") }, + Range { from: '⁘', to: '⁞', mapping: Valid }, + Range { from: ' ', to: ' ', mapping: DisallowedStd3Mapped(" ") }, + Range { from: '⁠', to: '⁠', mapping: Ignored }, + Range { from: '⁡', to: '⁣', mapping: Disallowed }, + Range { from: '⁤', to: '⁤', mapping: Ignored }, + Range { from: '⁥', to: '⁥', mapping: Disallowed }, + Range { from: '⁦', to: '⁩', mapping: Disallowed }, + Range { from: '', to: '', mapping: Disallowed }, + Range { from: '⁰', to: '⁰', mapping: Mapped("0") }, + Range { from: 'ⁱ', to: 'ⁱ', mapping: Mapped("i") }, + Range { from: '⁲', to: '⁳', mapping: Disallowed }, + Range { from: '⁴', to: '⁴', mapping: Mapped("4") }, + Range { from: '⁵', to: '⁵', mapping: Mapped("5") }, + Range { from: '⁶', to: '⁶', mapping: Mapped("6") }, + Range { from: '⁷', to: '⁷', mapping: Mapped("7") }, + Range { from: '⁸', to: '⁸', mapping: Mapped("8") }, + Range { from: '⁹', to: '⁹', mapping: Mapped("9") }, + Range { from: '⁺', to: '⁺', mapping: DisallowedStd3Mapped("+") }, + Range { from: '⁻', to: '⁻', mapping: Mapped("−") }, + Range { from: '⁼', to: '⁼', mapping: DisallowedStd3Mapped("=") }, + Range { from: '⁽', to: '⁽', mapping: DisallowedStd3Mapped("(") }, + Range { from: '⁾', to: '⁾', mapping: DisallowedStd3Mapped(")") }, + Range { from: 'ⁿ', to: 'ⁿ', mapping: Mapped("n") }, + Range { from: '₀', to: '₀', mapping: Mapped("0") }, + Range { from: '₁', to: '₁', mapping: Mapped("1") }, + Range { from: '₂', to: '₂', mapping: Mapped("2") }, + Range { from: '₃', to: '₃', mapping: Mapped("3") }, + Range { from: '₄', to: '₄', mapping: Mapped("4") }, + Range { from: '₅', to: '₅', mapping: Mapped("5") }, + Range { from: '₆', to: '₆', mapping: Mapped("6") }, + Range { from: '₇', to: '₇', mapping: Mapped("7") }, + Range { from: '₈', to: '₈', mapping: Mapped("8") }, + Range { from: '₉', to: '₉', mapping: Mapped("9") }, + Range { from: '₊', to: '₊', mapping: DisallowedStd3Mapped("+") }, + Range { from: '₋', to: '₋', mapping: Mapped("−") }, + Range { from: '₌', to: '₌', mapping: DisallowedStd3Mapped("=") }, + Range { from: '₍', to: '₍', mapping: DisallowedStd3Mapped("(") }, + Range { from: '₎', to: '₎', mapping: DisallowedStd3Mapped(")") }, + Range { from: '₏', to: '₏', mapping: Disallowed }, + Range { from: 'ₐ', to: 'ₐ', mapping: Mapped("a") }, + Range { from: 'ₑ', to: 'ₑ', mapping: Mapped("e") }, + Range { from: 'ₒ', to: 'ₒ', mapping: Mapped("o") }, + Range { from: 'ₓ', to: 'ₓ', mapping: Mapped("x") }, + Range { from: 'ₔ', to: 'ₔ', mapping: Mapped("ə") }, + Range { from: 'ₕ', to: 'ₕ', mapping: Mapped("h") }, + Range { from: 'ₖ', to: 'ₖ', mapping: Mapped("k") }, + Range { from: 'ₗ', to: 'ₗ', mapping: Mapped("l") }, + Range { from: 'ₘ', to: 'ₘ', mapping: Mapped("m") }, + Range { from: 'ₙ', to: 'ₙ', mapping: Mapped("n") }, + Range { from: 'ₚ', to: 'ₚ', mapping: Mapped("p") }, + Range { from: 'ₛ', to: 'ₛ', mapping: Mapped("s") }, + Range { from: 'ₜ', to: 'ₜ', mapping: Mapped("t") }, + Range { from: '₝', to: '₟', mapping: Disallowed }, + Range { from: '₠', to: '₧', mapping: Valid }, + Range { from: '₨', to: '₨', mapping: Mapped("rs") }, + Range { from: '₩', to: '₪', mapping: Valid }, + Range { from: '₫', to: '₫', mapping: Valid }, + Range { from: '€', to: '€', mapping: Valid }, + Range { from: '₭', to: '₯', mapping: Valid }, + Range { from: '₰', to: '₱', mapping: Valid }, + Range { from: '₲', to: '₵', mapping: Valid }, + Range { from: '₶', to: '₸', mapping: Valid }, + Range { from: '₹', to: '₹', mapping: Valid }, + Range { from: '₺', to: '₺', mapping: Valid }, + Range { from: '₻', to: '₽', mapping: Valid }, + Range { from: '₾', to: '₾', mapping: Valid }, + Range { from: '₿', to: '⃏', mapping: Disallowed }, + Range { from: '⃐', to: '⃡', mapping: Valid }, + Range { from: '⃢', to: '⃣', mapping: Valid }, + Range { from: '⃤', to: '⃪', mapping: Valid }, + Range { from: '⃫', to: '⃫', mapping: Valid }, + Range { from: '⃬', to: '⃯', mapping: Valid }, + Range { from: '⃰', to: '⃰', mapping: Valid }, + Range { from: '⃱', to: '⃿', mapping: Disallowed }, + Range { from: '℀', to: '℀', mapping: DisallowedStd3Mapped("a/c") }, + Range { from: '℁', to: '℁', mapping: DisallowedStd3Mapped("a/s") }, + Range { from: 'ℂ', to: 'ℂ', mapping: Mapped("c") }, + Range { from: '℃', to: '℃', mapping: Mapped("°c") }, + Range { from: '℄', to: '℄', mapping: Valid }, + Range { from: '℅', to: '℅', mapping: DisallowedStd3Mapped("c/o") }, + Range { from: '℆', to: '℆', mapping: DisallowedStd3Mapped("c/u") }, + Range { from: 'ℇ', to: 'ℇ', mapping: Mapped("ɛ") }, + Range { from: '℈', to: '℈', mapping: Valid }, + Range { from: '℉', to: '℉', mapping: Mapped("°f") }, + Range { from: 'ℊ', to: 'ℊ', mapping: Mapped("g") }, + Range { from: 'ℋ', to: 'ℎ', mapping: Mapped("h") }, + Range { from: 'ℏ', to: 'ℏ', mapping: Mapped("ħ") }, + Range { from: 'ℐ', to: 'ℑ', mapping: Mapped("i") }, + Range { from: 'ℒ', to: 'ℓ', mapping: Mapped("l") }, + Range { from: '℔', to: '℔', mapping: Valid }, + Range { from: 'ℕ', to: 'ℕ', mapping: Mapped("n") }, + Range { from: '№', to: '№', mapping: Mapped("no") }, + Range { from: '℗', to: '℘', mapping: Valid }, + Range { from: 'ℙ', to: 'ℙ', mapping: Mapped("p") }, + Range { from: 'ℚ', to: 'ℚ', mapping: Mapped("q") }, + Range { from: 'ℛ', to: 'ℝ', mapping: Mapped("r") }, + Range { from: '℞', to: '℟', mapping: Valid }, + Range { from: '℠', to: '℠', mapping: Mapped("sm") }, + Range { from: '℡', to: '℡', mapping: Mapped("tel") }, + Range { from: '™', to: '™', mapping: Mapped("tm") }, + Range { from: '℣', to: '℣', mapping: Valid }, + Range { from: 'ℤ', to: 'ℤ', mapping: Mapped("z") }, + Range { from: '℥', to: '℥', mapping: Valid }, + Range { from: 'Ω', to: 'Ω', mapping: Mapped("ω") }, + Range { from: '℧', to: '℧', mapping: Valid }, + Range { from: 'ℨ', to: 'ℨ', mapping: Mapped("z") }, + Range { from: '℩', to: '℩', mapping: Valid }, + Range { from: 'K', to: 'K', mapping: Mapped("k") }, + Range { from: 'Å', to: 'Å', mapping: Mapped("å") }, + Range { from: 'ℬ', to: 'ℬ', mapping: Mapped("b") }, + Range { from: 'ℭ', to: 'ℭ', mapping: Mapped("c") }, + Range { from: '℮', to: '℮', mapping: Valid }, + Range { from: 'ℯ', to: 'ℰ', mapping: Mapped("e") }, + Range { from: 'ℱ', to: 'ℱ', mapping: Mapped("f") }, + Range { from: 'Ⅎ', to: 'Ⅎ', mapping: Disallowed }, + Range { from: 'ℳ', to: 'ℳ', mapping: Mapped("m") }, + Range { from: 'ℴ', to: 'ℴ', mapping: Mapped("o") }, + Range { from: 'ℵ', to: 'ℵ', mapping: Mapped("א") }, + Range { from: 'ℶ', to: 'ℶ', mapping: Mapped("ב") }, + Range { from: 'ℷ', to: 'ℷ', mapping: Mapped("ג") }, + Range { from: 'ℸ', to: 'ℸ', mapping: Mapped("ד") }, + Range { from: 'ℹ', to: 'ℹ', mapping: Mapped("i") }, + Range { from: '℺', to: '℺', mapping: Valid }, + Range { from: '℻', to: '℻', mapping: Mapped("fax") }, + Range { from: 'ℼ', to: 'ℼ', mapping: Mapped("π") }, + Range { from: 'ℽ', to: 'ℾ', mapping: Mapped("γ") }, + Range { from: 'ℿ', to: 'ℿ', mapping: Mapped("π") }, + Range { from: '⅀', to: '⅀', mapping: Mapped("∑") }, + Range { from: '⅁', to: '⅄', mapping: Valid }, + Range { from: 'ⅅ', to: 'ⅆ', mapping: Mapped("d") }, + Range { from: 'ⅇ', to: 'ⅇ', mapping: Mapped("e") }, + Range { from: 'ⅈ', to: 'ⅈ', mapping: Mapped("i") }, + Range { from: 'ⅉ', to: 'ⅉ', mapping: Mapped("j") }, + Range { from: '⅊', to: '⅋', mapping: Valid }, + Range { from: '⅌', to: '⅌', mapping: Valid }, + Range { from: '⅍', to: '⅍', mapping: Valid }, + Range { from: 'ⅎ', to: 'ⅎ', mapping: Valid }, + Range { from: '⅏', to: '⅏', mapping: Valid }, + Range { from: '⅐', to: '⅐', mapping: Mapped("1⁄7") }, + Range { from: '⅑', to: '⅑', mapping: Mapped("1⁄9") }, + Range { from: '⅒', to: '⅒', mapping: Mapped("1⁄10") }, + Range { from: '⅓', to: '⅓', mapping: Mapped("1⁄3") }, + Range { from: '⅔', to: '⅔', mapping: Mapped("2⁄3") }, + Range { from: '⅕', to: '⅕', mapping: Mapped("1⁄5") }, + Range { from: '⅖', to: '⅖', mapping: Mapped("2⁄5") }, + Range { from: '⅗', to: '⅗', mapping: Mapped("3⁄5") }, + Range { from: '⅘', to: '⅘', mapping: Mapped("4⁄5") }, + Range { from: '⅙', to: '⅙', mapping: Mapped("1⁄6") }, + Range { from: '⅚', to: '⅚', mapping: Mapped("5⁄6") }, + Range { from: '⅛', to: '⅛', mapping: Mapped("1⁄8") }, + Range { from: '⅜', to: '⅜', mapping: Mapped("3⁄8") }, + Range { from: '⅝', to: '⅝', mapping: Mapped("5⁄8") }, + Range { from: '⅞', to: '⅞', mapping: Mapped("7⁄8") }, + Range { from: '⅟', to: '⅟', mapping: Mapped("1⁄") }, + Range { from: 'Ⅰ', to: 'Ⅰ', mapping: Mapped("i") }, + Range { from: 'Ⅱ', to: 'Ⅱ', mapping: Mapped("ii") }, + Range { from: 'Ⅲ', to: 'Ⅲ', mapping: Mapped("iii") }, + Range { from: 'Ⅳ', to: 'Ⅳ', mapping: Mapped("iv") }, + Range { from: 'Ⅴ', to: 'Ⅴ', mapping: Mapped("v") }, + Range { from: 'Ⅵ', to: 'Ⅵ', mapping: Mapped("vi") }, + Range { from: 'Ⅶ', to: 'Ⅶ', mapping: Mapped("vii") }, + Range { from: 'Ⅷ', to: 'Ⅷ', mapping: Mapped("viii") }, + Range { from: 'Ⅸ', to: 'Ⅸ', mapping: Mapped("ix") }, + Range { from: 'Ⅹ', to: 'Ⅹ', mapping: Mapped("x") }, + Range { from: 'Ⅺ', to: 'Ⅺ', mapping: Mapped("xi") }, + Range { from: 'Ⅻ', to: 'Ⅻ', mapping: Mapped("xii") }, + Range { from: 'Ⅼ', to: 'Ⅼ', mapping: Mapped("l") }, + Range { from: 'Ⅽ', to: 'Ⅽ', mapping: Mapped("c") }, + Range { from: 'Ⅾ', to: 'Ⅾ', mapping: Mapped("d") }, + Range { from: 'Ⅿ', to: 'Ⅿ', mapping: Mapped("m") }, + Range { from: 'ⅰ', to: 'ⅰ', mapping: Mapped("i") }, + Range { from: 'ⅱ', to: 'ⅱ', mapping: Mapped("ii") }, + Range { from: 'ⅲ', to: 'ⅲ', mapping: Mapped("iii") }, + Range { from: 'ⅳ', to: 'ⅳ', mapping: Mapped("iv") }, + Range { from: 'ⅴ', to: 'ⅴ', mapping: Mapped("v") }, + Range { from: 'ⅵ', to: 'ⅵ', mapping: Mapped("vi") }, + Range { from: 'ⅶ', to: 'ⅶ', mapping: Mapped("vii") }, + Range { from: 'ⅷ', to: 'ⅷ', mapping: Mapped("viii") }, + Range { from: 'ⅸ', to: 'ⅸ', mapping: Mapped("ix") }, + Range { from: 'ⅹ', to: 'ⅹ', mapping: Mapped("x") }, + Range { from: 'ⅺ', to: 'ⅺ', mapping: Mapped("xi") }, + Range { from: 'ⅻ', to: 'ⅻ', mapping: Mapped("xii") }, + Range { from: 'ⅼ', to: 'ⅼ', mapping: Mapped("l") }, + Range { from: 'ⅽ', to: 'ⅽ', mapping: Mapped("c") }, + Range { from: 'ⅾ', to: 'ⅾ', mapping: Mapped("d") }, + Range { from: 'ⅿ', to: 'ⅿ', mapping: Mapped("m") }, + Range { from: 'ↀ', to: 'ↂ', mapping: Valid }, + Range { from: 'Ↄ', to: 'Ↄ', mapping: Disallowed }, + Range { from: 'ↄ', to: 'ↄ', mapping: Valid }, + Range { from: 'ↅ', to: 'ↈ', mapping: Valid }, + Range { from: '↉', to: '↉', mapping: Mapped("0⁄3") }, + Range { from: '↊', to: '↋', mapping: Valid }, + Range { from: '↌', to: '↏', mapping: Disallowed }, + Range { from: '←', to: '⇪', mapping: Valid }, + Range { from: '⇫', to: '⇳', mapping: Valid }, + Range { from: '⇴', to: '⇿', mapping: Valid }, + Range { from: '∀', to: '∫', mapping: Valid }, + Range { from: '∬', to: '∬', mapping: Mapped("∫∫") }, + Range { from: '∭', to: '∭', mapping: Mapped("∫∫∫") }, + Range { from: '∮', to: '∮', mapping: Valid }, + Range { from: '∯', to: '∯', mapping: Mapped("∮∮") }, + Range { from: '∰', to: '∰', mapping: Mapped("∮∮∮") }, + Range { from: '∱', to: '≟', mapping: Valid }, + Range { from: '≠', to: '≠', mapping: DisallowedStd3Valid }, + Range { from: '≡', to: '≭', mapping: Valid }, + Range { from: '≮', to: '≯', mapping: DisallowedStd3Valid }, + Range { from: '≰', to: '⋱', mapping: Valid }, + Range { from: '⋲', to: '⋿', mapping: Valid }, + Range { from: '⌀', to: '⌀', mapping: Valid }, + Range { from: '⌁', to: '⌁', mapping: Valid }, + Range { from: '⌂', to: '⌨', mapping: Valid }, + Range { from: '〈', to: '〈', mapping: Mapped("〈") }, + Range { from: '〉', to: '〉', mapping: Mapped("〉") }, + Range { from: '⌫', to: '⍺', mapping: Valid }, + Range { from: '⍻', to: '⍻', mapping: Valid }, + Range { from: '⍼', to: '⍼', mapping: Valid }, + Range { from: '⍽', to: '⎚', mapping: Valid }, + Range { from: '⎛', to: '⏎', mapping: Valid }, + Range { from: '⏏', to: '⏐', mapping: Valid }, + Range { from: '⏑', to: '⏛', mapping: Valid }, + Range { from: '⏜', to: '⏧', mapping: Valid }, + Range { from: '⏨', to: '⏨', mapping: Valid }, + Range { from: '⏩', to: '⏳', mapping: Valid }, + Range { from: '⏴', to: '⏺', mapping: Valid }, + Range { from: '⏻', to: '⏿', mapping: Disallowed }, + Range { from: '␀', to: '␤', mapping: Valid }, + Range { from: '␥', to: '␦', mapping: Valid }, + Range { from: '␧', to: '␿', mapping: Disallowed }, + Range { from: '⑀', to: '⑊', mapping: Valid }, + Range { from: '⑋', to: '⑟', mapping: Disallowed }, + Range { from: '①', to: '①', mapping: Mapped("1") }, + Range { from: '②', to: '②', mapping: Mapped("2") }, + Range { from: '③', to: '③', mapping: Mapped("3") }, + Range { from: '④', to: '④', mapping: Mapped("4") }, + Range { from: '⑤', to: '⑤', mapping: Mapped("5") }, + Range { from: '⑥', to: '⑥', mapping: Mapped("6") }, + Range { from: '⑦', to: '⑦', mapping: Mapped("7") }, + Range { from: '⑧', to: '⑧', mapping: Mapped("8") }, + Range { from: '⑨', to: '⑨', mapping: Mapped("9") }, + Range { from: '⑩', to: '⑩', mapping: Mapped("10") }, + Range { from: '⑪', to: '⑪', mapping: Mapped("11") }, + Range { from: '⑫', to: '⑫', mapping: Mapped("12") }, + Range { from: '⑬', to: '⑬', mapping: Mapped("13") }, + Range { from: '⑭', to: '⑭', mapping: Mapped("14") }, + Range { from: '⑮', to: '⑮', mapping: Mapped("15") }, + Range { from: '⑯', to: '⑯', mapping: Mapped("16") }, + Range { from: '⑰', to: '⑰', mapping: Mapped("17") }, + Range { from: '⑱', to: '⑱', mapping: Mapped("18") }, + Range { from: '⑲', to: '⑲', mapping: Mapped("19") }, + Range { from: '⑳', to: '⑳', mapping: Mapped("20") }, + Range { from: '⑴', to: '⑴', mapping: DisallowedStd3Mapped("(1)") }, + Range { from: '⑵', to: '⑵', mapping: DisallowedStd3Mapped("(2)") }, + Range { from: '⑶', to: '⑶', mapping: DisallowedStd3Mapped("(3)") }, + Range { from: '⑷', to: '⑷', mapping: DisallowedStd3Mapped("(4)") }, + Range { from: '⑸', to: '⑸', mapping: DisallowedStd3Mapped("(5)") }, + Range { from: '⑹', to: '⑹', mapping: DisallowedStd3Mapped("(6)") }, + Range { from: '⑺', to: '⑺', mapping: DisallowedStd3Mapped("(7)") }, + Range { from: '⑻', to: '⑻', mapping: DisallowedStd3Mapped("(8)") }, + Range { from: '⑼', to: '⑼', mapping: DisallowedStd3Mapped("(9)") }, + Range { from: '⑽', to: '⑽', mapping: DisallowedStd3Mapped("(10)") }, + Range { from: '⑾', to: '⑾', mapping: DisallowedStd3Mapped("(11)") }, + Range { from: '⑿', to: '⑿', mapping: DisallowedStd3Mapped("(12)") }, + Range { from: '⒀', to: '⒀', mapping: DisallowedStd3Mapped("(13)") }, + Range { from: '⒁', to: '⒁', mapping: DisallowedStd3Mapped("(14)") }, + Range { from: '⒂', to: '⒂', mapping: DisallowedStd3Mapped("(15)") }, + Range { from: '⒃', to: '⒃', mapping: DisallowedStd3Mapped("(16)") }, + Range { from: '⒄', to: '⒄', mapping: DisallowedStd3Mapped("(17)") }, + Range { from: '⒅', to: '⒅', mapping: DisallowedStd3Mapped("(18)") }, + Range { from: '⒆', to: '⒆', mapping: DisallowedStd3Mapped("(19)") }, + Range { from: '⒇', to: '⒇', mapping: DisallowedStd3Mapped("(20)") }, + Range { from: '⒈', to: '⒛', mapping: Disallowed }, + Range { from: '⒜', to: '⒜', mapping: DisallowedStd3Mapped("(a)") }, + Range { from: '⒝', to: '⒝', mapping: DisallowedStd3Mapped("(b)") }, + Range { from: '⒞', to: '⒞', mapping: DisallowedStd3Mapped("(c)") }, + Range { from: '⒟', to: '⒟', mapping: DisallowedStd3Mapped("(d)") }, + Range { from: '⒠', to: '⒠', mapping: DisallowedStd3Mapped("(e)") }, + Range { from: '⒡', to: '⒡', mapping: DisallowedStd3Mapped("(f)") }, + Range { from: '⒢', to: '⒢', mapping: DisallowedStd3Mapped("(g)") }, + Range { from: '⒣', to: '⒣', mapping: DisallowedStd3Mapped("(h)") }, + Range { from: '⒤', to: '⒤', mapping: DisallowedStd3Mapped("(i)") }, + Range { from: '⒥', to: '⒥', mapping: DisallowedStd3Mapped("(j)") }, + Range { from: '⒦', to: '⒦', mapping: DisallowedStd3Mapped("(k)") }, + Range { from: '⒧', to: '⒧', mapping: DisallowedStd3Mapped("(l)") }, + Range { from: '⒨', to: '⒨', mapping: DisallowedStd3Mapped("(m)") }, + Range { from: '⒩', to: '⒩', mapping: DisallowedStd3Mapped("(n)") }, + Range { from: '⒪', to: '⒪', mapping: DisallowedStd3Mapped("(o)") }, + Range { from: '⒫', to: '⒫', mapping: DisallowedStd3Mapped("(p)") }, + Range { from: '⒬', to: '⒬', mapping: DisallowedStd3Mapped("(q)") }, + Range { from: '⒭', to: '⒭', mapping: DisallowedStd3Mapped("(r)") }, + Range { from: '⒮', to: '⒮', mapping: DisallowedStd3Mapped("(s)") }, + Range { from: '⒯', to: '⒯', mapping: DisallowedStd3Mapped("(t)") }, + Range { from: '⒰', to: '⒰', mapping: DisallowedStd3Mapped("(u)") }, + Range { from: '⒱', to: '⒱', mapping: DisallowedStd3Mapped("(v)") }, + Range { from: '⒲', to: '⒲', mapping: DisallowedStd3Mapped("(w)") }, + Range { from: '⒳', to: '⒳', mapping: DisallowedStd3Mapped("(x)") }, + Range { from: '⒴', to: '⒴', mapping: DisallowedStd3Mapped("(y)") }, + Range { from: '⒵', to: '⒵', mapping: DisallowedStd3Mapped("(z)") }, + Range { from: 'Ⓐ', to: 'Ⓐ', mapping: Mapped("a") }, + Range { from: 'Ⓑ', to: 'Ⓑ', mapping: Mapped("b") }, + Range { from: 'Ⓒ', to: 'Ⓒ', mapping: Mapped("c") }, + Range { from: 'Ⓓ', to: 'Ⓓ', mapping: Mapped("d") }, + Range { from: 'Ⓔ', to: 'Ⓔ', mapping: Mapped("e") }, + Range { from: 'Ⓕ', to: 'Ⓕ', mapping: Mapped("f") }, + Range { from: 'Ⓖ', to: 'Ⓖ', mapping: Mapped("g") }, + Range { from: 'Ⓗ', to: 'Ⓗ', mapping: Mapped("h") }, + Range { from: 'Ⓘ', to: 'Ⓘ', mapping: Mapped("i") }, + Range { from: 'Ⓙ', to: 'Ⓙ', mapping: Mapped("j") }, + Range { from: 'Ⓚ', to: 'Ⓚ', mapping: Mapped("k") }, + Range { from: 'Ⓛ', to: 'Ⓛ', mapping: Mapped("l") }, + Range { from: 'Ⓜ', to: 'Ⓜ', mapping: Mapped("m") }, + Range { from: 'Ⓝ', to: 'Ⓝ', mapping: Mapped("n") }, + Range { from: 'Ⓞ', to: 'Ⓞ', mapping: Mapped("o") }, + Range { from: 'Ⓟ', to: 'Ⓟ', mapping: Mapped("p") }, + Range { from: 'Ⓠ', to: 'Ⓠ', mapping: Mapped("q") }, + Range { from: 'Ⓡ', to: 'Ⓡ', mapping: Mapped("r") }, + Range { from: 'Ⓢ', to: 'Ⓢ', mapping: Mapped("s") }, + Range { from: 'Ⓣ', to: 'Ⓣ', mapping: Mapped("t") }, + Range { from: 'Ⓤ', to: 'Ⓤ', mapping: Mapped("u") }, + Range { from: 'Ⓥ', to: 'Ⓥ', mapping: Mapped("v") }, + Range { from: 'Ⓦ', to: 'Ⓦ', mapping: Mapped("w") }, + Range { from: 'Ⓧ', to: 'Ⓧ', mapping: Mapped("x") }, + Range { from: 'Ⓨ', to: 'Ⓨ', mapping: Mapped("y") }, + Range { from: 'Ⓩ', to: 'Ⓩ', mapping: Mapped("z") }, + Range { from: 'ⓐ', to: 'ⓐ', mapping: Mapped("a") }, + Range { from: 'ⓑ', to: 'ⓑ', mapping: Mapped("b") }, + Range { from: 'ⓒ', to: 'ⓒ', mapping: Mapped("c") }, + Range { from: 'ⓓ', to: 'ⓓ', mapping: Mapped("d") }, + Range { from: 'ⓔ', to: 'ⓔ', mapping: Mapped("e") }, + Range { from: 'ⓕ', to: 'ⓕ', mapping: Mapped("f") }, + Range { from: 'ⓖ', to: 'ⓖ', mapping: Mapped("g") }, + Range { from: 'ⓗ', to: 'ⓗ', mapping: Mapped("h") }, + Range { from: 'ⓘ', to: 'ⓘ', mapping: Mapped("i") }, + Range { from: 'ⓙ', to: 'ⓙ', mapping: Mapped("j") }, + Range { from: 'ⓚ', to: 'ⓚ', mapping: Mapped("k") }, + Range { from: 'ⓛ', to: 'ⓛ', mapping: Mapped("l") }, + Range { from: 'ⓜ', to: 'ⓜ', mapping: Mapped("m") }, + Range { from: 'ⓝ', to: 'ⓝ', mapping: Mapped("n") }, + Range { from: 'ⓞ', to: 'ⓞ', mapping: Mapped("o") }, + Range { from: 'ⓟ', to: 'ⓟ', mapping: Mapped("p") }, + Range { from: 'ⓠ', to: 'ⓠ', mapping: Mapped("q") }, + Range { from: 'ⓡ', to: 'ⓡ', mapping: Mapped("r") }, + Range { from: 'ⓢ', to: 'ⓢ', mapping: Mapped("s") }, + Range { from: 'ⓣ', to: 'ⓣ', mapping: Mapped("t") }, + Range { from: 'ⓤ', to: 'ⓤ', mapping: Mapped("u") }, + Range { from: 'ⓥ', to: 'ⓥ', mapping: Mapped("v") }, + Range { from: 'ⓦ', to: 'ⓦ', mapping: Mapped("w") }, + Range { from: 'ⓧ', to: 'ⓧ', mapping: Mapped("x") }, + Range { from: 'ⓨ', to: 'ⓨ', mapping: Mapped("y") }, + Range { from: 'ⓩ', to: 'ⓩ', mapping: Mapped("z") }, + Range { from: '⓪', to: '⓪', mapping: Mapped("0") }, + Range { from: '⓫', to: '⓾', mapping: Valid }, + Range { from: '⓿', to: '⓿', mapping: Valid }, + Range { from: '─', to: '▕', mapping: Valid }, + Range { from: '▖', to: '▟', mapping: Valid }, + Range { from: '■', to: '◯', mapping: Valid }, + Range { from: '◰', to: '◷', mapping: Valid }, + Range { from: '◸', to: '◿', mapping: Valid }, + Range { from: '☀', to: '☓', mapping: Valid }, + Range { from: '☔', to: '☕', mapping: Valid }, + Range { from: '☖', to: '☗', mapping: Valid }, + Range { from: '☘', to: '☘', mapping: Valid }, + Range { from: '☙', to: '☙', mapping: Valid }, + Range { from: '☚', to: '♯', mapping: Valid }, + Range { from: '♰', to: '♱', mapping: Valid }, + Range { from: '♲', to: '♽', mapping: Valid }, + Range { from: '♾', to: '♿', mapping: Valid }, + Range { from: '⚀', to: '⚉', mapping: Valid }, + Range { from: '⚊', to: '⚑', mapping: Valid }, + Range { from: '⚒', to: '⚜', mapping: Valid }, + Range { from: '⚝', to: '⚝', mapping: Valid }, + Range { from: '⚞', to: '⚟', mapping: Valid }, + Range { from: '⚠', to: '⚡', mapping: Valid }, + Range { from: '⚢', to: '⚱', mapping: Valid }, + Range { from: '⚲', to: '⚲', mapping: Valid }, + Range { from: '⚳', to: '⚼', mapping: Valid }, + Range { from: '⚽', to: '⚿', mapping: Valid }, + Range { from: '⛀', to: '⛃', mapping: Valid }, + Range { from: '⛄', to: '⛍', mapping: Valid }, + Range { from: '⛎', to: '⛎', mapping: Valid }, + Range { from: '⛏', to: '⛡', mapping: Valid }, + Range { from: '⛢', to: '⛢', mapping: Valid }, + Range { from: '⛣', to: '⛣', mapping: Valid }, + Range { from: '⛤', to: '⛧', mapping: Valid }, + Range { from: '⛨', to: '⛿', mapping: Valid }, + Range { from: '✀', to: '✀', mapping: Valid }, + Range { from: '✁', to: '✄', mapping: Valid }, + Range { from: '✅', to: '✅', mapping: Valid }, + Range { from: '✆', to: '✉', mapping: Valid }, + Range { from: '✊', to: '✋', mapping: Valid }, + Range { from: '✌', to: '✧', mapping: Valid }, + Range { from: '✨', to: '✨', mapping: Valid }, + Range { from: '✩', to: '❋', mapping: Valid }, + Range { from: '❌', to: '❌', mapping: Valid }, + Range { from: '❍', to: '❍', mapping: Valid }, + Range { from: '❎', to: '❎', mapping: Valid }, + Range { from: '❏', to: '❒', mapping: Valid }, + Range { from: '❓', to: '❕', mapping: Valid }, + Range { from: '❖', to: '❖', mapping: Valid }, + Range { from: '❗', to: '❗', mapping: Valid }, + Range { from: '❘', to: '❞', mapping: Valid }, + Range { from: '❟', to: '❠', mapping: Valid }, + Range { from: '❡', to: '❧', mapping: Valid }, + Range { from: '❨', to: '❵', mapping: Valid }, + Range { from: '❶', to: '➔', mapping: Valid }, + Range { from: '➕', to: '➗', mapping: Valid }, + Range { from: '➘', to: '➯', mapping: Valid }, + Range { from: '➰', to: '➰', mapping: Valid }, + Range { from: '➱', to: '➾', mapping: Valid }, + Range { from: '➿', to: '➿', mapping: Valid }, + Range { from: '⟀', to: '⟆', mapping: Valid }, + Range { from: '⟇', to: '⟊', mapping: Valid }, + Range { from: '⟋', to: '⟋', mapping: Valid }, + Range { from: '⟌', to: '⟌', mapping: Valid }, + Range { from: '⟍', to: '⟍', mapping: Valid }, + Range { from: '⟎', to: '⟏', mapping: Valid }, + Range { from: '⟐', to: '⟫', mapping: Valid }, + Range { from: '⟬', to: '⟯', mapping: Valid }, + Range { from: '⟰', to: '⟿', mapping: Valid }, + Range { from: '⠀', to: '⣿', mapping: Valid }, + Range { from: '⤀', to: '⨋', mapping: Valid }, + Range { from: '⨌', to: '⨌', mapping: Mapped("∫∫∫∫") }, + Range { from: '⨍', to: '⩳', mapping: Valid }, + Range { from: '⩴', to: '⩴', mapping: DisallowedStd3Mapped("::=") }, + Range { from: '⩵', to: '⩵', mapping: DisallowedStd3Mapped("==") }, + Range { from: '⩶', to: '⩶', mapping: DisallowedStd3Mapped("===") }, + Range { from: '⩷', to: '⫛', mapping: Valid }, + Range { from: '⫝̸', to: '⫝̸', mapping: Mapped("⫝̸") }, + Range { from: '⫝', to: '⫿', mapping: Valid }, + Range { from: '⬀', to: '⬍', mapping: Valid }, + Range { from: '⬎', to: '⬓', mapping: Valid }, + Range { from: '⬔', to: '⬚', mapping: Valid }, + Range { from: '⬛', to: '⬟', mapping: Valid }, + Range { from: '⬠', to: '⬣', mapping: Valid }, + Range { from: '⬤', to: '⭌', mapping: Valid }, + Range { from: '⭍', to: '⭏', mapping: Valid }, + Range { from: '⭐', to: '⭔', mapping: Valid }, + Range { from: '⭕', to: '⭙', mapping: Valid }, + Range { from: '⭚', to: '⭳', mapping: Valid }, + Range { from: '⭴', to: '⭵', mapping: Disallowed }, + Range { from: '⭶', to: '⮕', mapping: Valid }, + Range { from: '⮖', to: '⮗', mapping: Disallowed }, + Range { from: '⮘', to: '⮹', mapping: Valid }, + Range { from: '⮺', to: '⮼', mapping: Disallowed }, + Range { from: '⮽', to: '⯈', mapping: Valid }, + Range { from: '⯉', to: '⯉', mapping: Disallowed }, + Range { from: '⯊', to: '⯑', mapping: Valid }, + Range { from: '⯒', to: '⯫', mapping: Disallowed }, + Range { from: '⯬', to: '⯯', mapping: Valid }, + Range { from: '⯰', to: '⯿', mapping: Disallowed }, + Range { from: 'Ⰰ', to: 'Ⰰ', mapping: Mapped("ⰰ") }, + Range { from: 'Ⰱ', to: 'Ⰱ', mapping: Mapped("ⰱ") }, + Range { from: 'Ⰲ', to: 'Ⰲ', mapping: Mapped("ⰲ") }, + Range { from: 'Ⰳ', to: 'Ⰳ', mapping: Mapped("ⰳ") }, + Range { from: 'Ⰴ', to: 'Ⰴ', mapping: Mapped("ⰴ") }, + Range { from: 'Ⰵ', to: 'Ⰵ', mapping: Mapped("ⰵ") }, + Range { from: 'Ⰶ', to: 'Ⰶ', mapping: Mapped("ⰶ") }, + Range { from: 'Ⰷ', to: 'Ⰷ', mapping: Mapped("ⰷ") }, + Range { from: 'Ⰸ', to: 'Ⰸ', mapping: Mapped("ⰸ") }, + Range { from: 'Ⰹ', to: 'Ⰹ', mapping: Mapped("ⰹ") }, + Range { from: 'Ⰺ', to: 'Ⰺ', mapping: Mapped("ⰺ") }, + Range { from: 'Ⰻ', to: 'Ⰻ', mapping: Mapped("ⰻ") }, + Range { from: 'Ⰼ', to: 'Ⰼ', mapping: Mapped("ⰼ") }, + Range { from: 'Ⰽ', to: 'Ⰽ', mapping: Mapped("ⰽ") }, + Range { from: 'Ⰾ', to: 'Ⰾ', mapping: Mapped("ⰾ") }, + Range { from: 'Ⰿ', to: 'Ⰿ', mapping: Mapped("ⰿ") }, + Range { from: 'Ⱀ', to: 'Ⱀ', mapping: Mapped("ⱀ") }, + Range { from: 'Ⱁ', to: 'Ⱁ', mapping: Mapped("ⱁ") }, + Range { from: 'Ⱂ', to: 'Ⱂ', mapping: Mapped("ⱂ") }, + Range { from: 'Ⱃ', to: 'Ⱃ', mapping: Mapped("ⱃ") }, + Range { from: 'Ⱄ', to: 'Ⱄ', mapping: Mapped("ⱄ") }, + Range { from: 'Ⱅ', to: 'Ⱅ', mapping: Mapped("ⱅ") }, + Range { from: 'Ⱆ', to: 'Ⱆ', mapping: Mapped("ⱆ") }, + Range { from: 'Ⱇ', to: 'Ⱇ', mapping: Mapped("ⱇ") }, + Range { from: 'Ⱈ', to: 'Ⱈ', mapping: Mapped("ⱈ") }, + Range { from: 'Ⱉ', to: 'Ⱉ', mapping: Mapped("ⱉ") }, + Range { from: 'Ⱊ', to: 'Ⱊ', mapping: Mapped("ⱊ") }, + Range { from: 'Ⱋ', to: 'Ⱋ', mapping: Mapped("ⱋ") }, + Range { from: 'Ⱌ', to: 'Ⱌ', mapping: Mapped("ⱌ") }, + Range { from: 'Ⱍ', to: 'Ⱍ', mapping: Mapped("ⱍ") }, + Range { from: 'Ⱎ', to: 'Ⱎ', mapping: Mapped("ⱎ") }, + Range { from: 'Ⱏ', to: 'Ⱏ', mapping: Mapped("ⱏ") }, + Range { from: 'Ⱐ', to: 'Ⱐ', mapping: Mapped("ⱐ") }, + Range { from: 'Ⱑ', to: 'Ⱑ', mapping: Mapped("ⱑ") }, + Range { from: 'Ⱒ', to: 'Ⱒ', mapping: Mapped("ⱒ") }, + Range { from: 'Ⱓ', to: 'Ⱓ', mapping: Mapped("ⱓ") }, + Range { from: 'Ⱔ', to: 'Ⱔ', mapping: Mapped("ⱔ") }, + Range { from: 'Ⱕ', to: 'Ⱕ', mapping: Mapped("ⱕ") }, + Range { from: 'Ⱖ', to: 'Ⱖ', mapping: Mapped("ⱖ") }, + Range { from: 'Ⱗ', to: 'Ⱗ', mapping: Mapped("ⱗ") }, + Range { from: 'Ⱘ', to: 'Ⱘ', mapping: Mapped("ⱘ") }, + Range { from: 'Ⱙ', to: 'Ⱙ', mapping: Mapped("ⱙ") }, + Range { from: 'Ⱚ', to: 'Ⱚ', mapping: Mapped("ⱚ") }, + Range { from: 'Ⱛ', to: 'Ⱛ', mapping: Mapped("ⱛ") }, + Range { from: 'Ⱜ', to: 'Ⱜ', mapping: Mapped("ⱜ") }, + Range { from: 'Ⱝ', to: 'Ⱝ', mapping: Mapped("ⱝ") }, + Range { from: 'Ⱞ', to: 'Ⱞ', mapping: Mapped("ⱞ") }, + Range { from: 'Ⱟ', to: 'Ⱟ', mapping: Disallowed }, + Range { from: 'ⰰ', to: 'ⱞ', mapping: Valid }, + Range { from: 'ⱟ', to: 'ⱟ', mapping: Disallowed }, + Range { from: 'Ⱡ', to: 'Ⱡ', mapping: Mapped("ⱡ") }, + Range { from: 'ⱡ', to: 'ⱡ', mapping: Valid }, + Range { from: 'Ɫ', to: 'Ɫ', mapping: Mapped("ɫ") }, + Range { from: 'Ᵽ', to: 'Ᵽ', mapping: Mapped("ᵽ") }, + Range { from: 'Ɽ', to: 'Ɽ', mapping: Mapped("ɽ") }, + Range { from: 'ⱥ', to: 'ⱦ', mapping: Valid }, + Range { from: 'Ⱨ', to: 'Ⱨ', mapping: Mapped("ⱨ") }, + Range { from: 'ⱨ', to: 'ⱨ', mapping: Valid }, + Range { from: 'Ⱪ', to: 'Ⱪ', mapping: Mapped("ⱪ") }, + Range { from: 'ⱪ', to: 'ⱪ', mapping: Valid }, + Range { from: 'Ⱬ', to: 'Ⱬ', mapping: Mapped("ⱬ") }, + Range { from: 'ⱬ', to: 'ⱬ', mapping: Valid }, + Range { from: 'Ɑ', to: 'Ɑ', mapping: Mapped("ɑ") }, + Range { from: 'Ɱ', to: 'Ɱ', mapping: Mapped("ɱ") }, + Range { from: 'Ɐ', to: 'Ɐ', mapping: Mapped("ɐ") }, + Range { from: 'Ɒ', to: 'Ɒ', mapping: Mapped("ɒ") }, + Range { from: 'ⱱ', to: 'ⱱ', mapping: Valid }, + Range { from: 'Ⱳ', to: 'Ⱳ', mapping: Mapped("ⱳ") }, + Range { from: 'ⱳ', to: 'ⱳ', mapping: Valid }, + Range { from: 'ⱴ', to: 'ⱴ', mapping: Valid }, + Range { from: 'Ⱶ', to: 'Ⱶ', mapping: Mapped("ⱶ") }, + Range { from: 'ⱶ', to: 'ⱷ', mapping: Valid }, + Range { from: 'ⱸ', to: 'ⱻ', mapping: Valid }, + Range { from: 'ⱼ', to: 'ⱼ', mapping: Mapped("j") }, + Range { from: 'ⱽ', to: 'ⱽ', mapping: Mapped("v") }, + Range { from: 'Ȿ', to: 'Ȿ', mapping: Mapped("ȿ") }, + Range { from: 'Ɀ', to: 'Ɀ', mapping: Mapped("ɀ") }, + Range { from: 'Ⲁ', to: 'Ⲁ', mapping: Mapped("ⲁ") }, + Range { from: 'ⲁ', to: 'ⲁ', mapping: Valid }, + Range { from: 'Ⲃ', to: 'Ⲃ', mapping: Mapped("ⲃ") }, + Range { from: 'ⲃ', to: 'ⲃ', mapping: Valid }, + Range { from: 'Ⲅ', to: 'Ⲅ', mapping: Mapped("ⲅ") }, + Range { from: 'ⲅ', to: 'ⲅ', mapping: Valid }, + Range { from: 'Ⲇ', to: 'Ⲇ', mapping: Mapped("ⲇ") }, + Range { from: 'ⲇ', to: 'ⲇ', mapping: Valid }, + Range { from: 'Ⲉ', to: 'Ⲉ', mapping: Mapped("ⲉ") }, + Range { from: 'ⲉ', to: 'ⲉ', mapping: Valid }, + Range { from: 'Ⲋ', to: 'Ⲋ', mapping: Mapped("ⲋ") }, + Range { from: 'ⲋ', to: 'ⲋ', mapping: Valid }, + Range { from: 'Ⲍ', to: 'Ⲍ', mapping: Mapped("ⲍ") }, + Range { from: 'ⲍ', to: 'ⲍ', mapping: Valid }, + Range { from: 'Ⲏ', to: 'Ⲏ', mapping: Mapped("ⲏ") }, + Range { from: 'ⲏ', to: 'ⲏ', mapping: Valid }, + Range { from: 'Ⲑ', to: 'Ⲑ', mapping: Mapped("ⲑ") }, + Range { from: 'ⲑ', to: 'ⲑ', mapping: Valid }, + Range { from: 'Ⲓ', to: 'Ⲓ', mapping: Mapped("ⲓ") }, + Range { from: 'ⲓ', to: 'ⲓ', mapping: Valid }, + Range { from: 'Ⲕ', to: 'Ⲕ', mapping: Mapped("ⲕ") }, + Range { from: 'ⲕ', to: 'ⲕ', mapping: Valid }, + Range { from: 'Ⲗ', to: 'Ⲗ', mapping: Mapped("ⲗ") }, + Range { from: 'ⲗ', to: 'ⲗ', mapping: Valid }, + Range { from: 'Ⲙ', to: 'Ⲙ', mapping: Mapped("ⲙ") }, + Range { from: 'ⲙ', to: 'ⲙ', mapping: Valid }, + Range { from: 'Ⲛ', to: 'Ⲛ', mapping: Mapped("ⲛ") }, + Range { from: 'ⲛ', to: 'ⲛ', mapping: Valid }, + Range { from: 'Ⲝ', to: 'Ⲝ', mapping: Mapped("ⲝ") }, + Range { from: 'ⲝ', to: 'ⲝ', mapping: Valid }, + Range { from: 'Ⲟ', to: 'Ⲟ', mapping: Mapped("ⲟ") }, + Range { from: 'ⲟ', to: 'ⲟ', mapping: Valid }, + Range { from: 'Ⲡ', to: 'Ⲡ', mapping: Mapped("ⲡ") }, + Range { from: 'ⲡ', to: 'ⲡ', mapping: Valid }, + Range { from: 'Ⲣ', to: 'Ⲣ', mapping: Mapped("ⲣ") }, + Range { from: 'ⲣ', to: 'ⲣ', mapping: Valid }, + Range { from: 'Ⲥ', to: 'Ⲥ', mapping: Mapped("ⲥ") }, + Range { from: 'ⲥ', to: 'ⲥ', mapping: Valid }, + Range { from: 'Ⲧ', to: 'Ⲧ', mapping: Mapped("ⲧ") }, + Range { from: 'ⲧ', to: 'ⲧ', mapping: Valid }, + Range { from: 'Ⲩ', to: 'Ⲩ', mapping: Mapped("ⲩ") }, + Range { from: 'ⲩ', to: 'ⲩ', mapping: Valid }, + Range { from: 'Ⲫ', to: 'Ⲫ', mapping: Mapped("ⲫ") }, + Range { from: 'ⲫ', to: 'ⲫ', mapping: Valid }, + Range { from: 'Ⲭ', to: 'Ⲭ', mapping: Mapped("ⲭ") }, + Range { from: 'ⲭ', to: 'ⲭ', mapping: Valid }, + Range { from: 'Ⲯ', to: 'Ⲯ', mapping: Mapped("ⲯ") }, + Range { from: 'ⲯ', to: 'ⲯ', mapping: Valid }, + Range { from: 'Ⲱ', to: 'Ⲱ', mapping: Mapped("ⲱ") }, + Range { from: 'ⲱ', to: 'ⲱ', mapping: Valid }, + Range { from: 'Ⲳ', to: 'Ⲳ', mapping: Mapped("ⲳ") }, + Range { from: 'ⲳ', to: 'ⲳ', mapping: Valid }, + Range { from: 'Ⲵ', to: 'Ⲵ', mapping: Mapped("ⲵ") }, + Range { from: 'ⲵ', to: 'ⲵ', mapping: Valid }, + Range { from: 'Ⲷ', to: 'Ⲷ', mapping: Mapped("ⲷ") }, + Range { from: 'ⲷ', to: 'ⲷ', mapping: Valid }, + Range { from: 'Ⲹ', to: 'Ⲹ', mapping: Mapped("ⲹ") }, + Range { from: 'ⲹ', to: 'ⲹ', mapping: Valid }, + Range { from: 'Ⲻ', to: 'Ⲻ', mapping: Mapped("ⲻ") }, + Range { from: 'ⲻ', to: 'ⲻ', mapping: Valid }, + Range { from: 'Ⲽ', to: 'Ⲽ', mapping: Mapped("ⲽ") }, + Range { from: 'ⲽ', to: 'ⲽ', mapping: Valid }, + Range { from: 'Ⲿ', to: 'Ⲿ', mapping: Mapped("ⲿ") }, + Range { from: 'ⲿ', to: 'ⲿ', mapping: Valid }, + Range { from: 'Ⳁ', to: 'Ⳁ', mapping: Mapped("ⳁ") }, + Range { from: 'ⳁ', to: 'ⳁ', mapping: Valid }, + Range { from: 'Ⳃ', to: 'Ⳃ', mapping: Mapped("ⳃ") }, + Range { from: 'ⳃ', to: 'ⳃ', mapping: Valid }, + Range { from: 'Ⳅ', to: 'Ⳅ', mapping: Mapped("ⳅ") }, + Range { from: 'ⳅ', to: 'ⳅ', mapping: Valid }, + Range { from: 'Ⳇ', to: 'Ⳇ', mapping: Mapped("ⳇ") }, + Range { from: 'ⳇ', to: 'ⳇ', mapping: Valid }, + Range { from: 'Ⳉ', to: 'Ⳉ', mapping: Mapped("ⳉ") }, + Range { from: 'ⳉ', to: 'ⳉ', mapping: Valid }, + Range { from: 'Ⳋ', to: 'Ⳋ', mapping: Mapped("ⳋ") }, + Range { from: 'ⳋ', to: 'ⳋ', mapping: Valid }, + Range { from: 'Ⳍ', to: 'Ⳍ', mapping: Mapped("ⳍ") }, + Range { from: 'ⳍ', to: 'ⳍ', mapping: Valid }, + Range { from: 'Ⳏ', to: 'Ⳏ', mapping: Mapped("ⳏ") }, + Range { from: 'ⳏ', to: 'ⳏ', mapping: Valid }, + Range { from: 'Ⳑ', to: 'Ⳑ', mapping: Mapped("ⳑ") }, + Range { from: 'ⳑ', to: 'ⳑ', mapping: Valid }, + Range { from: 'Ⳓ', to: 'Ⳓ', mapping: Mapped("ⳓ") }, + Range { from: 'ⳓ', to: 'ⳓ', mapping: Valid }, + Range { from: 'Ⳕ', to: 'Ⳕ', mapping: Mapped("ⳕ") }, + Range { from: 'ⳕ', to: 'ⳕ', mapping: Valid }, + Range { from: 'Ⳗ', to: 'Ⳗ', mapping: Mapped("ⳗ") }, + Range { from: 'ⳗ', to: 'ⳗ', mapping: Valid }, + Range { from: 'Ⳙ', to: 'Ⳙ', mapping: Mapped("ⳙ") }, + Range { from: 'ⳙ', to: 'ⳙ', mapping: Valid }, + Range { from: 'Ⳛ', to: 'Ⳛ', mapping: Mapped("ⳛ") }, + Range { from: 'ⳛ', to: 'ⳛ', mapping: Valid }, + Range { from: 'Ⳝ', to: 'Ⳝ', mapping: Mapped("ⳝ") }, + Range { from: 'ⳝ', to: 'ⳝ', mapping: Valid }, + Range { from: 'Ⳟ', to: 'Ⳟ', mapping: Mapped("ⳟ") }, + Range { from: 'ⳟ', to: 'ⳟ', mapping: Valid }, + Range { from: 'Ⳡ', to: 'Ⳡ', mapping: Mapped("ⳡ") }, + Range { from: 'ⳡ', to: 'ⳡ', mapping: Valid }, + Range { from: 'Ⳣ', to: 'Ⳣ', mapping: Mapped("ⳣ") }, + Range { from: 'ⳣ', to: 'ⳤ', mapping: Valid }, + Range { from: '⳥', to: '⳪', mapping: Valid }, + Range { from: 'Ⳬ', to: 'Ⳬ', mapping: Mapped("ⳬ") }, + Range { from: 'ⳬ', to: 'ⳬ', mapping: Valid }, + Range { from: 'Ⳮ', to: 'Ⳮ', mapping: Mapped("ⳮ") }, + Range { from: 'ⳮ', to: '⳱', mapping: Valid }, + Range { from: 'Ⳳ', to: 'Ⳳ', mapping: Mapped("ⳳ") }, + Range { from: 'ⳳ', to: 'ⳳ', mapping: Valid }, + Range { from: '⳴', to: '⳸', mapping: Disallowed }, + Range { from: '⳹', to: '⳿', mapping: Valid }, + Range { from: 'ⴀ', to: 'ⴥ', mapping: Valid }, + Range { from: '⴦', to: '⴦', mapping: Disallowed }, + Range { from: 'ⴧ', to: 'ⴧ', mapping: Valid }, + Range { from: '⴨', to: '⴬', mapping: Disallowed }, + Range { from: 'ⴭ', to: 'ⴭ', mapping: Valid }, + Range { from: '⴮', to: '⴯', mapping: Disallowed }, + Range { from: 'ⴰ', to: 'ⵥ', mapping: Valid }, + Range { from: 'ⵦ', to: 'ⵧ', mapping: Valid }, + Range { from: '⵨', to: '⵮', mapping: Disallowed }, + Range { from: 'ⵯ', to: 'ⵯ', mapping: Mapped("ⵡ") }, + Range { from: '⵰', to: '⵰', mapping: Valid }, + Range { from: '⵱', to: '⵾', mapping: Disallowed }, + Range { from: '⵿', to: '⵿', mapping: Valid }, + Range { from: 'ⶀ', to: 'ⶖ', mapping: Valid }, + Range { from: '⶗', to: '⶟', mapping: Disallowed }, + Range { from: 'ⶠ', to: 'ⶦ', mapping: Valid }, + Range { from: '⶧', to: '⶧', mapping: Disallowed }, + Range { from: 'ⶨ', to: 'ⶮ', mapping: Valid }, + Range { from: '⶯', to: '⶯', mapping: Disallowed }, + Range { from: 'ⶰ', to: 'ⶶ', mapping: Valid }, + Range { from: '⶷', to: '⶷', mapping: Disallowed }, + Range { from: 'ⶸ', to: 'ⶾ', mapping: Valid }, + Range { from: '⶿', to: '⶿', mapping: Disallowed }, + Range { from: 'ⷀ', to: 'ⷆ', mapping: Valid }, + Range { from: '⷇', to: '⷇', mapping: Disallowed }, + Range { from: 'ⷈ', to: 'ⷎ', mapping: Valid }, + Range { from: '⷏', to: '⷏', mapping: Disallowed }, + Range { from: 'ⷐ', to: 'ⷖ', mapping: Valid }, + Range { from: '⷗', to: '⷗', mapping: Disallowed }, + Range { from: 'ⷘ', to: 'ⷞ', mapping: Valid }, + Range { from: '⷟', to: '⷟', mapping: Disallowed }, + Range { from: 'ⷠ', to: 'ⷿ', mapping: Valid }, + Range { from: '⸀', to: '⸗', mapping: Valid }, + Range { from: '⸘', to: '⸛', mapping: Valid }, + Range { from: '⸜', to: '⸝', mapping: Valid }, + Range { from: '⸞', to: '⸮', mapping: Valid }, + Range { from: 'ⸯ', to: 'ⸯ', mapping: Valid }, + Range { from: '⸰', to: '⸰', mapping: Valid }, + Range { from: '⸱', to: '⸱', mapping: Valid }, + Range { from: '⸲', to: '⸻', mapping: Valid }, + Range { from: '⸼', to: '⹂', mapping: Valid }, + Range { from: '⹃', to: '⹿', mapping: Disallowed }, + Range { from: '⺀', to: '⺙', mapping: Valid }, + Range { from: '⺚', to: '⺚', mapping: Disallowed }, + Range { from: '⺛', to: '⺞', mapping: Valid }, + Range { from: '⺟', to: '⺟', mapping: Mapped("母") }, + Range { from: '⺠', to: '⻲', mapping: Valid }, + Range { from: '⻳', to: '⻳', mapping: Mapped("龟") }, + Range { from: '⻴', to: '⻿', mapping: Disallowed }, + Range { from: '⼀', to: '⼀', mapping: Mapped("一") }, + Range { from: '⼁', to: '⼁', mapping: Mapped("丨") }, + Range { from: '⼂', to: '⼂', mapping: Mapped("丶") }, + Range { from: '⼃', to: '⼃', mapping: Mapped("丿") }, + Range { from: '⼄', to: '⼄', mapping: Mapped("乙") }, + Range { from: '⼅', to: '⼅', mapping: Mapped("亅") }, + Range { from: '⼆', to: '⼆', mapping: Mapped("二") }, + Range { from: '⼇', to: '⼇', mapping: Mapped("亠") }, + Range { from: '⼈', to: '⼈', mapping: Mapped("人") }, + Range { from: '⼉', to: '⼉', mapping: Mapped("儿") }, + Range { from: '⼊', to: '⼊', mapping: Mapped("入") }, + Range { from: '⼋', to: '⼋', mapping: Mapped("八") }, + Range { from: '⼌', to: '⼌', mapping: Mapped("冂") }, + Range { from: '⼍', to: '⼍', mapping: Mapped("冖") }, + Range { from: '⼎', to: '⼎', mapping: Mapped("冫") }, + Range { from: '⼏', to: '⼏', mapping: Mapped("几") }, + Range { from: '⼐', to: '⼐', mapping: Mapped("凵") }, + Range { from: '⼑', to: '⼑', mapping: Mapped("刀") }, + Range { from: '⼒', to: '⼒', mapping: Mapped("力") }, + Range { from: '⼓', to: '⼓', mapping: Mapped("勹") }, + Range { from: '⼔', to: '⼔', mapping: Mapped("匕") }, + Range { from: '⼕', to: '⼕', mapping: Mapped("匚") }, + Range { from: '⼖', to: '⼖', mapping: Mapped("匸") }, + Range { from: '⼗', to: '⼗', mapping: Mapped("十") }, + Range { from: '⼘', to: '⼘', mapping: Mapped("卜") }, + Range { from: '⼙', to: '⼙', mapping: Mapped("卩") }, + Range { from: '⼚', to: '⼚', mapping: Mapped("厂") }, + Range { from: '⼛', to: '⼛', mapping: Mapped("厶") }, + Range { from: '⼜', to: '⼜', mapping: Mapped("又") }, + Range { from: '⼝', to: '⼝', mapping: Mapped("口") }, + Range { from: '⼞', to: '⼞', mapping: Mapped("囗") }, + Range { from: '⼟', to: '⼟', mapping: Mapped("土") }, + Range { from: '⼠', to: '⼠', mapping: Mapped("士") }, + Range { from: '⼡', to: '⼡', mapping: Mapped("夂") }, + Range { from: '⼢', to: '⼢', mapping: Mapped("夊") }, + Range { from: '⼣', to: '⼣', mapping: Mapped("夕") }, + Range { from: '⼤', to: '⼤', mapping: Mapped("大") }, + Range { from: '⼥', to: '⼥', mapping: Mapped("女") }, + Range { from: '⼦', to: '⼦', mapping: Mapped("子") }, + Range { from: '⼧', to: '⼧', mapping: Mapped("宀") }, + Range { from: '⼨', to: '⼨', mapping: Mapped("寸") }, + Range { from: '⼩', to: '⼩', mapping: Mapped("小") }, + Range { from: '⼪', to: '⼪', mapping: Mapped("尢") }, + Range { from: '⼫', to: '⼫', mapping: Mapped("尸") }, + Range { from: '⼬', to: '⼬', mapping: Mapped("屮") }, + Range { from: '⼭', to: '⼭', mapping: Mapped("山") }, + Range { from: '⼮', to: '⼮', mapping: Mapped("巛") }, + Range { from: '⼯', to: '⼯', mapping: Mapped("工") }, + Range { from: '⼰', to: '⼰', mapping: Mapped("己") }, + Range { from: '⼱', to: '⼱', mapping: Mapped("巾") }, + Range { from: '⼲', to: '⼲', mapping: Mapped("干") }, + Range { from: '⼳', to: '⼳', mapping: Mapped("幺") }, + Range { from: '⼴', to: '⼴', mapping: Mapped("广") }, + Range { from: '⼵', to: '⼵', mapping: Mapped("廴") }, + Range { from: '⼶', to: '⼶', mapping: Mapped("廾") }, + Range { from: '⼷', to: '⼷', mapping: Mapped("弋") }, + Range { from: '⼸', to: '⼸', mapping: Mapped("弓") }, + Range { from: '⼹', to: '⼹', mapping: Mapped("彐") }, + Range { from: '⼺', to: '⼺', mapping: Mapped("彡") }, + Range { from: '⼻', to: '⼻', mapping: Mapped("彳") }, + Range { from: '⼼', to: '⼼', mapping: Mapped("心") }, + Range { from: '⼽', to: '⼽', mapping: Mapped("戈") }, + Range { from: '⼾', to: '⼾', mapping: Mapped("戶") }, + Range { from: '⼿', to: '⼿', mapping: Mapped("手") }, + Range { from: '⽀', to: '⽀', mapping: Mapped("支") }, + Range { from: '⽁', to: '⽁', mapping: Mapped("攴") }, + Range { from: '⽂', to: '⽂', mapping: Mapped("文") }, + Range { from: '⽃', to: '⽃', mapping: Mapped("斗") }, + Range { from: '⽄', to: '⽄', mapping: Mapped("斤") }, + Range { from: '⽅', to: '⽅', mapping: Mapped("方") }, + Range { from: '⽆', to: '⽆', mapping: Mapped("无") }, + Range { from: '⽇', to: '⽇', mapping: Mapped("日") }, + Range { from: '⽈', to: '⽈', mapping: Mapped("曰") }, + Range { from: '⽉', to: '⽉', mapping: Mapped("月") }, + Range { from: '⽊', to: '⽊', mapping: Mapped("木") }, + Range { from: '⽋', to: '⽋', mapping: Mapped("欠") }, + Range { from: '⽌', to: '⽌', mapping: Mapped("止") }, + Range { from: '⽍', to: '⽍', mapping: Mapped("歹") }, + Range { from: '⽎', to: '⽎', mapping: Mapped("殳") }, + Range { from: '⽏', to: '⽏', mapping: Mapped("毋") }, + Range { from: '⽐', to: '⽐', mapping: Mapped("比") }, + Range { from: '⽑', to: '⽑', mapping: Mapped("毛") }, + Range { from: '⽒', to: '⽒', mapping: Mapped("氏") }, + Range { from: '⽓', to: '⽓', mapping: Mapped("气") }, + Range { from: '⽔', to: '⽔', mapping: Mapped("水") }, + Range { from: '⽕', to: '⽕', mapping: Mapped("火") }, + Range { from: '⽖', to: '⽖', mapping: Mapped("爪") }, + Range { from: '⽗', to: '⽗', mapping: Mapped("父") }, + Range { from: '⽘', to: '⽘', mapping: Mapped("爻") }, + Range { from: '⽙', to: '⽙', mapping: Mapped("爿") }, + Range { from: '⽚', to: '⽚', mapping: Mapped("片") }, + Range { from: '⽛', to: '⽛', mapping: Mapped("牙") }, + Range { from: '⽜', to: '⽜', mapping: Mapped("牛") }, + Range { from: '⽝', to: '⽝', mapping: Mapped("犬") }, + Range { from: '⽞', to: '⽞', mapping: Mapped("玄") }, + Range { from: '⽟', to: '⽟', mapping: Mapped("玉") }, + Range { from: '⽠', to: '⽠', mapping: Mapped("瓜") }, + Range { from: '⽡', to: '⽡', mapping: Mapped("瓦") }, + Range { from: '⽢', to: '⽢', mapping: Mapped("甘") }, + Range { from: '⽣', to: '⽣', mapping: Mapped("生") }, + Range { from: '⽤', to: '⽤', mapping: Mapped("用") }, + Range { from: '⽥', to: '⽥', mapping: Mapped("田") }, + Range { from: '⽦', to: '⽦', mapping: Mapped("疋") }, + Range { from: '⽧', to: '⽧', mapping: Mapped("疒") }, + Range { from: '⽨', to: '⽨', mapping: Mapped("癶") }, + Range { from: '⽩', to: '⽩', mapping: Mapped("白") }, + Range { from: '⽪', to: '⽪', mapping: Mapped("皮") }, + Range { from: '⽫', to: '⽫', mapping: Mapped("皿") }, + Range { from: '⽬', to: '⽬', mapping: Mapped("目") }, + Range { from: '⽭', to: '⽭', mapping: Mapped("矛") }, + Range { from: '⽮', to: '⽮', mapping: Mapped("矢") }, + Range { from: '⽯', to: '⽯', mapping: Mapped("石") }, + Range { from: '⽰', to: '⽰', mapping: Mapped("示") }, + Range { from: '⽱', to: '⽱', mapping: Mapped("禸") }, + Range { from: '⽲', to: '⽲', mapping: Mapped("禾") }, + Range { from: '⽳', to: '⽳', mapping: Mapped("穴") }, + Range { from: '⽴', to: '⽴', mapping: Mapped("立") }, + Range { from: '⽵', to: '⽵', mapping: Mapped("竹") }, + Range { from: '⽶', to: '⽶', mapping: Mapped("米") }, + Range { from: '⽷', to: '⽷', mapping: Mapped("糸") }, + Range { from: '⽸', to: '⽸', mapping: Mapped("缶") }, + Range { from: '⽹', to: '⽹', mapping: Mapped("网") }, + Range { from: '⽺', to: '⽺', mapping: Mapped("羊") }, + Range { from: '⽻', to: '⽻', mapping: Mapped("羽") }, + Range { from: '⽼', to: '⽼', mapping: Mapped("老") }, + Range { from: '⽽', to: '⽽', mapping: Mapped("而") }, + Range { from: '⽾', to: '⽾', mapping: Mapped("耒") }, + Range { from: '⽿', to: '⽿', mapping: Mapped("耳") }, + Range { from: '⾀', to: '⾀', mapping: Mapped("聿") }, + Range { from: '⾁', to: '⾁', mapping: Mapped("肉") }, + Range { from: '⾂', to: '⾂', mapping: Mapped("臣") }, + Range { from: '⾃', to: '⾃', mapping: Mapped("自") }, + Range { from: '⾄', to: '⾄', mapping: Mapped("至") }, + Range { from: '⾅', to: '⾅', mapping: Mapped("臼") }, + Range { from: '⾆', to: '⾆', mapping: Mapped("舌") }, + Range { from: '⾇', to: '⾇', mapping: Mapped("舛") }, + Range { from: '⾈', to: '⾈', mapping: Mapped("舟") }, + Range { from: '⾉', to: '⾉', mapping: Mapped("艮") }, + Range { from: '⾊', to: '⾊', mapping: Mapped("色") }, + Range { from: '⾋', to: '⾋', mapping: Mapped("艸") }, + Range { from: '⾌', to: '⾌', mapping: Mapped("虍") }, + Range { from: '⾍', to: '⾍', mapping: Mapped("虫") }, + Range { from: '⾎', to: '⾎', mapping: Mapped("血") }, + Range { from: '⾏', to: '⾏', mapping: Mapped("行") }, + Range { from: '⾐', to: '⾐', mapping: Mapped("衣") }, + Range { from: '⾑', to: '⾑', mapping: Mapped("襾") }, + Range { from: '⾒', to: '⾒', mapping: Mapped("見") }, + Range { from: '⾓', to: '⾓', mapping: Mapped("角") }, + Range { from: '⾔', to: '⾔', mapping: Mapped("言") }, + Range { from: '⾕', to: '⾕', mapping: Mapped("谷") }, + Range { from: '⾖', to: '⾖', mapping: Mapped("豆") }, + Range { from: '⾗', to: '⾗', mapping: Mapped("豕") }, + Range { from: '⾘', to: '⾘', mapping: Mapped("豸") }, + Range { from: '⾙', to: '⾙', mapping: Mapped("貝") }, + Range { from: '⾚', to: '⾚', mapping: Mapped("赤") }, + Range { from: '⾛', to: '⾛', mapping: Mapped("走") }, + Range { from: '⾜', to: '⾜', mapping: Mapped("足") }, + Range { from: '⾝', to: '⾝', mapping: Mapped("身") }, + Range { from: '⾞', to: '⾞', mapping: Mapped("車") }, + Range { from: '⾟', to: '⾟', mapping: Mapped("辛") }, + Range { from: '⾠', to: '⾠', mapping: Mapped("辰") }, + Range { from: '⾡', to: '⾡', mapping: Mapped("辵") }, + Range { from: '⾢', to: '⾢', mapping: Mapped("邑") }, + Range { from: '⾣', to: '⾣', mapping: Mapped("酉") }, + Range { from: '⾤', to: '⾤', mapping: Mapped("釆") }, + Range { from: '⾥', to: '⾥', mapping: Mapped("里") }, + Range { from: '⾦', to: '⾦', mapping: Mapped("金") }, + Range { from: '⾧', to: '⾧', mapping: Mapped("長") }, + Range { from: '⾨', to: '⾨', mapping: Mapped("門") }, + Range { from: '⾩', to: '⾩', mapping: Mapped("阜") }, + Range { from: '⾪', to: '⾪', mapping: Mapped("隶") }, + Range { from: '⾫', to: '⾫', mapping: Mapped("隹") }, + Range { from: '⾬', to: '⾬', mapping: Mapped("雨") }, + Range { from: '⾭', to: '⾭', mapping: Mapped("靑") }, + Range { from: '⾮', to: '⾮', mapping: Mapped("非") }, + Range { from: '⾯', to: '⾯', mapping: Mapped("面") }, + Range { from: '⾰', to: '⾰', mapping: Mapped("革") }, + Range { from: '⾱', to: '⾱', mapping: Mapped("韋") }, + Range { from: '⾲', to: '⾲', mapping: Mapped("韭") }, + Range { from: '⾳', to: '⾳', mapping: Mapped("音") }, + Range { from: '⾴', to: '⾴', mapping: Mapped("頁") }, + Range { from: '⾵', to: '⾵', mapping: Mapped("風") }, + Range { from: '⾶', to: '⾶', mapping: Mapped("飛") }, + Range { from: '⾷', to: '⾷', mapping: Mapped("食") }, + Range { from: '⾸', to: '⾸', mapping: Mapped("首") }, + Range { from: '⾹', to: '⾹', mapping: Mapped("香") }, + Range { from: '⾺', to: '⾺', mapping: Mapped("馬") }, + Range { from: '⾻', to: '⾻', mapping: Mapped("骨") }, + Range { from: '⾼', to: '⾼', mapping: Mapped("高") }, + Range { from: '⾽', to: '⾽', mapping: Mapped("髟") }, + Range { from: '⾾', to: '⾾', mapping: Mapped("鬥") }, + Range { from: '⾿', to: '⾿', mapping: Mapped("鬯") }, + Range { from: '⿀', to: '⿀', mapping: Mapped("鬲") }, + Range { from: '⿁', to: '⿁', mapping: Mapped("鬼") }, + Range { from: '⿂', to: '⿂', mapping: Mapped("魚") }, + Range { from: '⿃', to: '⿃', mapping: Mapped("鳥") }, + Range { from: '⿄', to: '⿄', mapping: Mapped("鹵") }, + Range { from: '⿅', to: '⿅', mapping: Mapped("鹿") }, + Range { from: '⿆', to: '⿆', mapping: Mapped("麥") }, + Range { from: '⿇', to: '⿇', mapping: Mapped("麻") }, + Range { from: '⿈', to: '⿈', mapping: Mapped("黃") }, + Range { from: '⿉', to: '⿉', mapping: Mapped("黍") }, + Range { from: '⿊', to: '⿊', mapping: Mapped("黑") }, + Range { from: '⿋', to: '⿋', mapping: Mapped("黹") }, + Range { from: '⿌', to: '⿌', mapping: Mapped("黽") }, + Range { from: '⿍', to: '⿍', mapping: Mapped("鼎") }, + Range { from: '⿎', to: '⿎', mapping: Mapped("鼓") }, + Range { from: '⿏', to: '⿏', mapping: Mapped("鼠") }, + Range { from: '⿐', to: '⿐', mapping: Mapped("鼻") }, + Range { from: '⿑', to: '⿑', mapping: Mapped("齊") }, + Range { from: '⿒', to: '⿒', mapping: Mapped("齒") }, + Range { from: '⿓', to: '⿓', mapping: Mapped("龍") }, + Range { from: '⿔', to: '⿔', mapping: Mapped("龜") }, + Range { from: '⿕', to: '⿕', mapping: Mapped("龠") }, + Range { from: '⿖', to: '⿯', mapping: Disallowed }, + Range { from: '⿰', to: '⿻', mapping: Disallowed }, + Range { from: '⿼', to: '⿿', mapping: Disallowed }, + Range { from: ' ', to: ' ', mapping: DisallowedStd3Mapped(" ") }, + Range { from: '、', to: '、', mapping: Valid }, + Range { from: '。', to: '。', mapping: Mapped(".") }, + Range { from: '〃', to: '〄', mapping: Valid }, + Range { from: '々', to: '〇', mapping: Valid }, + Range { from: '〈', to: '〩', mapping: Valid }, + Range { from: '〪', to: '〭', mapping: Valid }, + Range { from: '〮', to: '〵', mapping: Valid }, + Range { from: '〶', to: '〶', mapping: Mapped("〒") }, + Range { from: '〷', to: '〷', mapping: Valid }, + Range { from: '〸', to: '〸', mapping: Mapped("十") }, + Range { from: '〹', to: '〹', mapping: Mapped("卄") }, + Range { from: '〺', to: '〺', mapping: Mapped("卅") }, + Range { from: '〻', to: '〻', mapping: Valid }, + Range { from: '〼', to: '〼', mapping: Valid }, + Range { from: '〽', to: '〽', mapping: Valid }, + Range { from: '〾', to: '〾', mapping: Valid }, + Range { from: '〿', to: '〿', mapping: Valid }, + Range { from: '぀', to: '぀', mapping: Disallowed }, + Range { from: 'ぁ', to: 'ゔ', mapping: Valid }, + Range { from: 'ゕ', to: 'ゖ', mapping: Valid }, + Range { from: '゗', to: '゘', mapping: Disallowed }, + Range { from: '゙', to: '゚', mapping: Valid }, + Range { from: '゛', to: '゛', mapping: DisallowedStd3Mapped(" ゙") }, + Range { from: '゜', to: '゜', mapping: DisallowedStd3Mapped(" ゚") }, + Range { from: 'ゝ', to: 'ゞ', mapping: Valid }, + Range { from: 'ゟ', to: 'ゟ', mapping: Mapped("より") }, + Range { from: '゠', to: '゠', mapping: Valid }, + Range { from: 'ァ', to: 'ヾ', mapping: Valid }, + Range { from: 'ヿ', to: 'ヿ', mapping: Mapped("コト") }, + Range { from: '㄀', to: '㄄', mapping: Disallowed }, + Range { from: 'ㄅ', to: 'ㄬ', mapping: Valid }, + Range { from: 'ㄭ', to: 'ㄭ', mapping: Valid }, + Range { from: 'ㄮ', to: '㄰', mapping: Disallowed }, + Range { from: 'ㄱ', to: 'ㄱ', mapping: Mapped("ᄀ") }, + Range { from: 'ㄲ', to: 'ㄲ', mapping: Mapped("ᄁ") }, + Range { from: 'ㄳ', to: 'ㄳ', mapping: Mapped("ᆪ") }, + Range { from: 'ㄴ', to: 'ㄴ', mapping: Mapped("ᄂ") }, + Range { from: 'ㄵ', to: 'ㄵ', mapping: Mapped("ᆬ") }, + Range { from: 'ㄶ', to: 'ㄶ', mapping: Mapped("ᆭ") }, + Range { from: 'ㄷ', to: 'ㄷ', mapping: Mapped("ᄃ") }, + Range { from: 'ㄸ', to: 'ㄸ', mapping: Mapped("ᄄ") }, + Range { from: 'ㄹ', to: 'ㄹ', mapping: Mapped("ᄅ") }, + Range { from: 'ㄺ', to: 'ㄺ', mapping: Mapped("ᆰ") }, + Range { from: 'ㄻ', to: 'ㄻ', mapping: Mapped("ᆱ") }, + Range { from: 'ㄼ', to: 'ㄼ', mapping: Mapped("ᆲ") }, + Range { from: 'ㄽ', to: 'ㄽ', mapping: Mapped("ᆳ") }, + Range { from: 'ㄾ', to: 'ㄾ', mapping: Mapped("ᆴ") }, + Range { from: 'ㄿ', to: 'ㄿ', mapping: Mapped("ᆵ") }, + Range { from: 'ㅀ', to: 'ㅀ', mapping: Mapped("ᄚ") }, + Range { from: 'ㅁ', to: 'ㅁ', mapping: Mapped("ᄆ") }, + Range { from: 'ㅂ', to: 'ㅂ', mapping: Mapped("ᄇ") }, + Range { from: 'ㅃ', to: 'ㅃ', mapping: Mapped("ᄈ") }, + Range { from: 'ㅄ', to: 'ㅄ', mapping: Mapped("ᄡ") }, + Range { from: 'ㅅ', to: 'ㅅ', mapping: Mapped("ᄉ") }, + Range { from: 'ㅆ', to: 'ㅆ', mapping: Mapped("ᄊ") }, + Range { from: 'ㅇ', to: 'ㅇ', mapping: Mapped("ᄋ") }, + Range { from: 'ㅈ', to: 'ㅈ', mapping: Mapped("ᄌ") }, + Range { from: 'ㅉ', to: 'ㅉ', mapping: Mapped("ᄍ") }, + Range { from: 'ㅊ', to: 'ㅊ', mapping: Mapped("ᄎ") }, + Range { from: 'ㅋ', to: 'ㅋ', mapping: Mapped("ᄏ") }, + Range { from: 'ㅌ', to: 'ㅌ', mapping: Mapped("ᄐ") }, + Range { from: 'ㅍ', to: 'ㅍ', mapping: Mapped("ᄑ") }, + Range { from: 'ㅎ', to: 'ㅎ', mapping: Mapped("ᄒ") }, + Range { from: 'ㅏ', to: 'ㅏ', mapping: Mapped("ᅡ") }, + Range { from: 'ㅐ', to: 'ㅐ', mapping: Mapped("ᅢ") }, + Range { from: 'ㅑ', to: 'ㅑ', mapping: Mapped("ᅣ") }, + Range { from: 'ㅒ', to: 'ㅒ', mapping: Mapped("ᅤ") }, + Range { from: 'ㅓ', to: 'ㅓ', mapping: Mapped("ᅥ") }, + Range { from: 'ㅔ', to: 'ㅔ', mapping: Mapped("ᅦ") }, + Range { from: 'ㅕ', to: 'ㅕ', mapping: Mapped("ᅧ") }, + Range { from: 'ㅖ', to: 'ㅖ', mapping: Mapped("ᅨ") }, + Range { from: 'ㅗ', to: 'ㅗ', mapping: Mapped("ᅩ") }, + Range { from: 'ㅘ', to: 'ㅘ', mapping: Mapped("ᅪ") }, + Range { from: 'ㅙ', to: 'ㅙ', mapping: Mapped("ᅫ") }, + Range { from: 'ㅚ', to: 'ㅚ', mapping: Mapped("ᅬ") }, + Range { from: 'ㅛ', to: 'ㅛ', mapping: Mapped("ᅭ") }, + Range { from: 'ㅜ', to: 'ㅜ', mapping: Mapped("ᅮ") }, + Range { from: 'ㅝ', to: 'ㅝ', mapping: Mapped("ᅯ") }, + Range { from: 'ㅞ', to: 'ㅞ', mapping: Mapped("ᅰ") }, + Range { from: 'ㅟ', to: 'ㅟ', mapping: Mapped("ᅱ") }, + Range { from: 'ㅠ', to: 'ㅠ', mapping: Mapped("ᅲ") }, + Range { from: 'ㅡ', to: 'ㅡ', mapping: Mapped("ᅳ") }, + Range { from: 'ㅢ', to: 'ㅢ', mapping: Mapped("ᅴ") }, + Range { from: 'ㅣ', to: 'ㅣ', mapping: Mapped("ᅵ") }, + Range { from: 'ㅤ', to: 'ㅤ', mapping: Disallowed }, + Range { from: 'ㅥ', to: 'ㅥ', mapping: Mapped("ᄔ") }, + Range { from: 'ㅦ', to: 'ㅦ', mapping: Mapped("ᄕ") }, + Range { from: 'ㅧ', to: 'ㅧ', mapping: Mapped("ᇇ") }, + Range { from: 'ㅨ', to: 'ㅨ', mapping: Mapped("ᇈ") }, + Range { from: 'ㅩ', to: 'ㅩ', mapping: Mapped("ᇌ") }, + Range { from: 'ㅪ', to: 'ㅪ', mapping: Mapped("ᇎ") }, + Range { from: 'ㅫ', to: 'ㅫ', mapping: Mapped("ᇓ") }, + Range { from: 'ㅬ', to: 'ㅬ', mapping: Mapped("ᇗ") }, + Range { from: 'ㅭ', to: 'ㅭ', mapping: Mapped("ᇙ") }, + Range { from: 'ㅮ', to: 'ㅮ', mapping: Mapped("ᄜ") }, + Range { from: 'ㅯ', to: 'ㅯ', mapping: Mapped("ᇝ") }, + Range { from: 'ㅰ', to: 'ㅰ', mapping: Mapped("ᇟ") }, + Range { from: 'ㅱ', to: 'ㅱ', mapping: Mapped("ᄝ") }, + Range { from: 'ㅲ', to: 'ㅲ', mapping: Mapped("ᄞ") }, + Range { from: 'ㅳ', to: 'ㅳ', mapping: Mapped("ᄠ") }, + Range { from: 'ㅴ', to: 'ㅴ', mapping: Mapped("ᄢ") }, + Range { from: 'ㅵ', to: 'ㅵ', mapping: Mapped("ᄣ") }, + Range { from: 'ㅶ', to: 'ㅶ', mapping: Mapped("ᄧ") }, + Range { from: 'ㅷ', to: 'ㅷ', mapping: Mapped("ᄩ") }, + Range { from: 'ㅸ', to: 'ㅸ', mapping: Mapped("ᄫ") }, + Range { from: 'ㅹ', to: 'ㅹ', mapping: Mapped("ᄬ") }, + Range { from: 'ㅺ', to: 'ㅺ', mapping: Mapped("ᄭ") }, + Range { from: 'ㅻ', to: 'ㅻ', mapping: Mapped("ᄮ") }, + Range { from: 'ㅼ', to: 'ㅼ', mapping: Mapped("ᄯ") }, + Range { from: 'ㅽ', to: 'ㅽ', mapping: Mapped("ᄲ") }, + Range { from: 'ㅾ', to: 'ㅾ', mapping: Mapped("ᄶ") }, + Range { from: 'ㅿ', to: 'ㅿ', mapping: Mapped("ᅀ") }, + Range { from: 'ㆀ', to: 'ㆀ', mapping: Mapped("ᅇ") }, + Range { from: 'ㆁ', to: 'ㆁ', mapping: Mapped("ᅌ") }, + Range { from: 'ㆂ', to: 'ㆂ', mapping: Mapped("ᇱ") }, + Range { from: 'ㆃ', to: 'ㆃ', mapping: Mapped("ᇲ") }, + Range { from: 'ㆄ', to: 'ㆄ', mapping: Mapped("ᅗ") }, + Range { from: 'ㆅ', to: 'ㆅ', mapping: Mapped("ᅘ") }, + Range { from: 'ㆆ', to: 'ㆆ', mapping: Mapped("ᅙ") }, + Range { from: 'ㆇ', to: 'ㆇ', mapping: Mapped("ᆄ") }, + Range { from: 'ㆈ', to: 'ㆈ', mapping: Mapped("ᆅ") }, + Range { from: 'ㆉ', to: 'ㆉ', mapping: Mapped("ᆈ") }, + Range { from: 'ㆊ', to: 'ㆊ', mapping: Mapped("ᆑ") }, + Range { from: 'ㆋ', to: 'ㆋ', mapping: Mapped("ᆒ") }, + Range { from: 'ㆌ', to: 'ㆌ', mapping: Mapped("ᆔ") }, + Range { from: 'ㆍ', to: 'ㆍ', mapping: Mapped("ᆞ") }, + Range { from: 'ㆎ', to: 'ㆎ', mapping: Mapped("ᆡ") }, + Range { from: '㆏', to: '㆏', mapping: Disallowed }, + Range { from: '㆐', to: '㆑', mapping: Valid }, + Range { from: '㆒', to: '㆒', mapping: Mapped("一") }, + Range { from: '㆓', to: '㆓', mapping: Mapped("二") }, + Range { from: '㆔', to: '㆔', mapping: Mapped("三") }, + Range { from: '㆕', to: '㆕', mapping: Mapped("四") }, + Range { from: '㆖', to: '㆖', mapping: Mapped("上") }, + Range { from: '㆗', to: '㆗', mapping: Mapped("中") }, + Range { from: '㆘', to: '㆘', mapping: Mapped("下") }, + Range { from: '㆙', to: '㆙', mapping: Mapped("甲") }, + Range { from: '㆚', to: '㆚', mapping: Mapped("乙") }, + Range { from: '㆛', to: '㆛', mapping: Mapped("丙") }, + Range { from: '㆜', to: '㆜', mapping: Mapped("丁") }, + Range { from: '㆝', to: '㆝', mapping: Mapped("天") }, + Range { from: '㆞', to: '㆞', mapping: Mapped("地") }, + Range { from: '㆟', to: '㆟', mapping: Mapped("人") }, + Range { from: 'ㆠ', to: 'ㆷ', mapping: Valid }, + Range { from: 'ㆸ', to: 'ㆺ', mapping: Valid }, + Range { from: 'ㆻ', to: 'ㆿ', mapping: Disallowed }, + Range { from: '㇀', to: '㇏', mapping: Valid }, + Range { from: '㇐', to: '㇣', mapping: Valid }, + Range { from: '㇤', to: '㇯', mapping: Disallowed }, + Range { from: 'ㇰ', to: 'ㇿ', mapping: Valid }, + Range { from: '㈀', to: '㈀', mapping: DisallowedStd3Mapped("(ᄀ)") }, + Range { from: '㈁', to: '㈁', mapping: DisallowedStd3Mapped("(ᄂ)") }, + Range { from: '㈂', to: '㈂', mapping: DisallowedStd3Mapped("(ᄃ)") }, + Range { from: '㈃', to: '㈃', mapping: DisallowedStd3Mapped("(ᄅ)") }, + Range { from: '㈄', to: '㈄', mapping: DisallowedStd3Mapped("(ᄆ)") }, + Range { from: '㈅', to: '㈅', mapping: DisallowedStd3Mapped("(ᄇ)") }, + Range { from: '㈆', to: '㈆', mapping: DisallowedStd3Mapped("(ᄉ)") }, + Range { from: '㈇', to: '㈇', mapping: DisallowedStd3Mapped("(ᄋ)") }, + Range { from: '㈈', to: '㈈', mapping: DisallowedStd3Mapped("(ᄌ)") }, + Range { from: '㈉', to: '㈉', mapping: DisallowedStd3Mapped("(ᄎ)") }, + Range { from: '㈊', to: '㈊', mapping: DisallowedStd3Mapped("(ᄏ)") }, + Range { from: '㈋', to: '㈋', mapping: DisallowedStd3Mapped("(ᄐ)") }, + Range { from: '㈌', to: '㈌', mapping: DisallowedStd3Mapped("(ᄑ)") }, + Range { from: '㈍', to: '㈍', mapping: DisallowedStd3Mapped("(ᄒ)") }, + Range { from: '㈎', to: '㈎', mapping: DisallowedStd3Mapped("(가)") }, + Range { from: '㈏', to: '㈏', mapping: DisallowedStd3Mapped("(나)") }, + Range { from: '㈐', to: '㈐', mapping: DisallowedStd3Mapped("(다)") }, + Range { from: '㈑', to: '㈑', mapping: DisallowedStd3Mapped("(라)") }, + Range { from: '㈒', to: '㈒', mapping: DisallowedStd3Mapped("(마)") }, + Range { from: '㈓', to: '㈓', mapping: DisallowedStd3Mapped("(바)") }, + Range { from: '㈔', to: '㈔', mapping: DisallowedStd3Mapped("(사)") }, + Range { from: '㈕', to: '㈕', mapping: DisallowedStd3Mapped("(아)") }, + Range { from: '㈖', to: '㈖', mapping: DisallowedStd3Mapped("(자)") }, + Range { from: '㈗', to: '㈗', mapping: DisallowedStd3Mapped("(차)") }, + Range { from: '㈘', to: '㈘', mapping: DisallowedStd3Mapped("(카)") }, + Range { from: '㈙', to: '㈙', mapping: DisallowedStd3Mapped("(타)") }, + Range { from: '㈚', to: '㈚', mapping: DisallowedStd3Mapped("(파)") }, + Range { from: '㈛', to: '㈛', mapping: DisallowedStd3Mapped("(하)") }, + Range { from: '㈜', to: '㈜', mapping: DisallowedStd3Mapped("(주)") }, + Range { from: '㈝', to: '㈝', mapping: DisallowedStd3Mapped("(오전)") }, + Range { from: '㈞', to: '㈞', mapping: DisallowedStd3Mapped("(오후)") }, + Range { from: '㈟', to: '㈟', mapping: Disallowed }, + Range { from: '㈠', to: '㈠', mapping: DisallowedStd3Mapped("(一)") }, + Range { from: '㈡', to: '㈡', mapping: DisallowedStd3Mapped("(二)") }, + Range { from: '㈢', to: '㈢', mapping: DisallowedStd3Mapped("(三)") }, + Range { from: '㈣', to: '㈣', mapping: DisallowedStd3Mapped("(四)") }, + Range { from: '㈤', to: '㈤', mapping: DisallowedStd3Mapped("(五)") }, + Range { from: '㈥', to: '㈥', mapping: DisallowedStd3Mapped("(六)") }, + Range { from: '㈦', to: '㈦', mapping: DisallowedStd3Mapped("(七)") }, + Range { from: '㈧', to: '㈧', mapping: DisallowedStd3Mapped("(八)") }, + Range { from: '㈨', to: '㈨', mapping: DisallowedStd3Mapped("(九)") }, + Range { from: '㈩', to: '㈩', mapping: DisallowedStd3Mapped("(十)") }, + Range { from: '㈪', to: '㈪', mapping: DisallowedStd3Mapped("(月)") }, + Range { from: '㈫', to: '㈫', mapping: DisallowedStd3Mapped("(火)") }, + Range { from: '㈬', to: '㈬', mapping: DisallowedStd3Mapped("(水)") }, + Range { from: '㈭', to: '㈭', mapping: DisallowedStd3Mapped("(木)") }, + Range { from: '㈮', to: '㈮', mapping: DisallowedStd3Mapped("(金)") }, + Range { from: '㈯', to: '㈯', mapping: DisallowedStd3Mapped("(土)") }, + Range { from: '㈰', to: '㈰', mapping: DisallowedStd3Mapped("(日)") }, + Range { from: '㈱', to: '㈱', mapping: DisallowedStd3Mapped("(株)") }, + Range { from: '㈲', to: '㈲', mapping: DisallowedStd3Mapped("(有)") }, + Range { from: '㈳', to: '㈳', mapping: DisallowedStd3Mapped("(社)") }, + Range { from: '㈴', to: '㈴', mapping: DisallowedStd3Mapped("(名)") }, + Range { from: '㈵', to: '㈵', mapping: DisallowedStd3Mapped("(特)") }, + Range { from: '㈶', to: '㈶', mapping: DisallowedStd3Mapped("(財)") }, + Range { from: '㈷', to: '㈷', mapping: DisallowedStd3Mapped("(祝)") }, + Range { from: '㈸', to: '㈸', mapping: DisallowedStd3Mapped("(労)") }, + Range { from: '㈹', to: '㈹', mapping: DisallowedStd3Mapped("(代)") }, + Range { from: '㈺', to: '㈺', mapping: DisallowedStd3Mapped("(呼)") }, + Range { from: '㈻', to: '㈻', mapping: DisallowedStd3Mapped("(学)") }, + Range { from: '㈼', to: '㈼', mapping: DisallowedStd3Mapped("(監)") }, + Range { from: '㈽', to: '㈽', mapping: DisallowedStd3Mapped("(企)") }, + Range { from: '㈾', to: '㈾', mapping: DisallowedStd3Mapped("(資)") }, + Range { from: '㈿', to: '㈿', mapping: DisallowedStd3Mapped("(協)") }, + Range { from: '㉀', to: '㉀', mapping: DisallowedStd3Mapped("(祭)") }, + Range { from: '㉁', to: '㉁', mapping: DisallowedStd3Mapped("(休)") }, + Range { from: '㉂', to: '㉂', mapping: DisallowedStd3Mapped("(自)") }, + Range { from: '㉃', to: '㉃', mapping: DisallowedStd3Mapped("(至)") }, + Range { from: '㉄', to: '㉄', mapping: Mapped("問") }, + Range { from: '㉅', to: '㉅', mapping: Mapped("幼") }, + Range { from: '㉆', to: '㉆', mapping: Mapped("文") }, + Range { from: '㉇', to: '㉇', mapping: Mapped("箏") }, + Range { from: '㉈', to: '㉏', mapping: Valid }, + Range { from: '㉐', to: '㉐', mapping: Mapped("pte") }, + Range { from: '㉑', to: '㉑', mapping: Mapped("21") }, + Range { from: '㉒', to: '㉒', mapping: Mapped("22") }, + Range { from: '㉓', to: '㉓', mapping: Mapped("23") }, + Range { from: '㉔', to: '㉔', mapping: Mapped("24") }, + Range { from: '㉕', to: '㉕', mapping: Mapped("25") }, + Range { from: '㉖', to: '㉖', mapping: Mapped("26") }, + Range { from: '㉗', to: '㉗', mapping: Mapped("27") }, + Range { from: '㉘', to: '㉘', mapping: Mapped("28") }, + Range { from: '㉙', to: '㉙', mapping: Mapped("29") }, + Range { from: '㉚', to: '㉚', mapping: Mapped("30") }, + Range { from: '㉛', to: '㉛', mapping: Mapped("31") }, + Range { from: '㉜', to: '㉜', mapping: Mapped("32") }, + Range { from: '㉝', to: '㉝', mapping: Mapped("33") }, + Range { from: '㉞', to: '㉞', mapping: Mapped("34") }, + Range { from: '㉟', to: '㉟', mapping: Mapped("35") }, + Range { from: '㉠', to: '㉠', mapping: Mapped("ᄀ") }, + Range { from: '㉡', to: '㉡', mapping: Mapped("ᄂ") }, + Range { from: '㉢', to: '㉢', mapping: Mapped("ᄃ") }, + Range { from: '㉣', to: '㉣', mapping: Mapped("ᄅ") }, + Range { from: '㉤', to: '㉤', mapping: Mapped("ᄆ") }, + Range { from: '㉥', to: '㉥', mapping: Mapped("ᄇ") }, + Range { from: '㉦', to: '㉦', mapping: Mapped("ᄉ") }, + Range { from: '㉧', to: '㉧', mapping: Mapped("ᄋ") }, + Range { from: '㉨', to: '㉨', mapping: Mapped("ᄌ") }, + Range { from: '㉩', to: '㉩', mapping: Mapped("ᄎ") }, + Range { from: '㉪', to: '㉪', mapping: Mapped("ᄏ") }, + Range { from: '㉫', to: '㉫', mapping: Mapped("ᄐ") }, + Range { from: '㉬', to: '㉬', mapping: Mapped("ᄑ") }, + Range { from: '㉭', to: '㉭', mapping: Mapped("ᄒ") }, + Range { from: '㉮', to: '㉮', mapping: Mapped("가") }, + Range { from: '㉯', to: '㉯', mapping: Mapped("나") }, + Range { from: '㉰', to: '㉰', mapping: Mapped("다") }, + Range { from: '㉱', to: '㉱', mapping: Mapped("라") }, + Range { from: '㉲', to: '㉲', mapping: Mapped("마") }, + Range { from: '㉳', to: '㉳', mapping: Mapped("바") }, + Range { from: '㉴', to: '㉴', mapping: Mapped("사") }, + Range { from: '㉵', to: '㉵', mapping: Mapped("아") }, + Range { from: '㉶', to: '㉶', mapping: Mapped("자") }, + Range { from: '㉷', to: '㉷', mapping: Mapped("차") }, + Range { from: '㉸', to: '㉸', mapping: Mapped("카") }, + Range { from: '㉹', to: '㉹', mapping: Mapped("타") }, + Range { from: '㉺', to: '㉺', mapping: Mapped("파") }, + Range { from: '㉻', to: '㉻', mapping: Mapped("하") }, + Range { from: '㉼', to: '㉼', mapping: Mapped("참고") }, + Range { from: '㉽', to: '㉽', mapping: Mapped("주의") }, + Range { from: '㉾', to: '㉾', mapping: Mapped("우") }, + Range { from: '㉿', to: '㉿', mapping: Valid }, + Range { from: '㊀', to: '㊀', mapping: Mapped("一") }, + Range { from: '㊁', to: '㊁', mapping: Mapped("二") }, + Range { from: '㊂', to: '㊂', mapping: Mapped("三") }, + Range { from: '㊃', to: '㊃', mapping: Mapped("四") }, + Range { from: '㊄', to: '㊄', mapping: Mapped("五") }, + Range { from: '㊅', to: '㊅', mapping: Mapped("六") }, + Range { from: '㊆', to: '㊆', mapping: Mapped("七") }, + Range { from: '㊇', to: '㊇', mapping: Mapped("八") }, + Range { from: '㊈', to: '㊈', mapping: Mapped("九") }, + Range { from: '㊉', to: '㊉', mapping: Mapped("十") }, + Range { from: '㊊', to: '㊊', mapping: Mapped("月") }, + Range { from: '㊋', to: '㊋', mapping: Mapped("火") }, + Range { from: '㊌', to: '㊌', mapping: Mapped("水") }, + Range { from: '㊍', to: '㊍', mapping: Mapped("木") }, + Range { from: '㊎', to: '㊎', mapping: Mapped("金") }, + Range { from: '㊏', to: '㊏', mapping: Mapped("土") }, + Range { from: '㊐', to: '㊐', mapping: Mapped("日") }, + Range { from: '㊑', to: '㊑', mapping: Mapped("株") }, + Range { from: '㊒', to: '㊒', mapping: Mapped("有") }, + Range { from: '㊓', to: '㊓', mapping: Mapped("社") }, + Range { from: '㊔', to: '㊔', mapping: Mapped("名") }, + Range { from: '㊕', to: '㊕', mapping: Mapped("特") }, + Range { from: '㊖', to: '㊖', mapping: Mapped("財") }, + Range { from: '㊗', to: '㊗', mapping: Mapped("祝") }, + Range { from: '㊘', to: '㊘', mapping: Mapped("労") }, + Range { from: '㊙', to: '㊙', mapping: Mapped("秘") }, + Range { from: '㊚', to: '㊚', mapping: Mapped("男") }, + Range { from: '㊛', to: '㊛', mapping: Mapped("女") }, + Range { from: '㊜', to: '㊜', mapping: Mapped("適") }, + Range { from: '㊝', to: '㊝', mapping: Mapped("優") }, + Range { from: '㊞', to: '㊞', mapping: Mapped("印") }, + Range { from: '㊟', to: '㊟', mapping: Mapped("注") }, + Range { from: '㊠', to: '㊠', mapping: Mapped("項") }, + Range { from: '㊡', to: '㊡', mapping: Mapped("休") }, + Range { from: '㊢', to: '㊢', mapping: Mapped("写") }, + Range { from: '㊣', to: '㊣', mapping: Mapped("正") }, + Range { from: '㊤', to: '㊤', mapping: Mapped("上") }, + Range { from: '㊥', to: '㊥', mapping: Mapped("中") }, + Range { from: '㊦', to: '㊦', mapping: Mapped("下") }, + Range { from: '㊧', to: '㊧', mapping: Mapped("左") }, + Range { from: '㊨', to: '㊨', mapping: Mapped("右") }, + Range { from: '㊩', to: '㊩', mapping: Mapped("医") }, + Range { from: '㊪', to: '㊪', mapping: Mapped("宗") }, + Range { from: '㊫', to: '㊫', mapping: Mapped("学") }, + Range { from: '㊬', to: '㊬', mapping: Mapped("監") }, + Range { from: '㊭', to: '㊭', mapping: Mapped("企") }, + Range { from: '㊮', to: '㊮', mapping: Mapped("資") }, + Range { from: '㊯', to: '㊯', mapping: Mapped("協") }, + Range { from: '㊰', to: '㊰', mapping: Mapped("夜") }, + Range { from: '㊱', to: '㊱', mapping: Mapped("36") }, + Range { from: '㊲', to: '㊲', mapping: Mapped("37") }, + Range { from: '㊳', to: '㊳', mapping: Mapped("38") }, + Range { from: '㊴', to: '㊴', mapping: Mapped("39") }, + Range { from: '㊵', to: '㊵', mapping: Mapped("40") }, + Range { from: '㊶', to: '㊶', mapping: Mapped("41") }, + Range { from: '㊷', to: '㊷', mapping: Mapped("42") }, + Range { from: '㊸', to: '㊸', mapping: Mapped("43") }, + Range { from: '㊹', to: '㊹', mapping: Mapped("44") }, + Range { from: '㊺', to: '㊺', mapping: Mapped("45") }, + Range { from: '㊻', to: '㊻', mapping: Mapped("46") }, + Range { from: '㊼', to: '㊼', mapping: Mapped("47") }, + Range { from: '㊽', to: '㊽', mapping: Mapped("48") }, + Range { from: '㊾', to: '㊾', mapping: Mapped("49") }, + Range { from: '㊿', to: '㊿', mapping: Mapped("50") }, + Range { from: '㋀', to: '㋀', mapping: Mapped("1月") }, + Range { from: '㋁', to: '㋁', mapping: Mapped("2月") }, + Range { from: '㋂', to: '㋂', mapping: Mapped("3月") }, + Range { from: '㋃', to: '㋃', mapping: Mapped("4月") }, + Range { from: '㋄', to: '㋄', mapping: Mapped("5月") }, + Range { from: '㋅', to: '㋅', mapping: Mapped("6月") }, + Range { from: '㋆', to: '㋆', mapping: Mapped("7月") }, + Range { from: '㋇', to: '㋇', mapping: Mapped("8月") }, + Range { from: '㋈', to: '㋈', mapping: Mapped("9月") }, + Range { from: '㋉', to: '㋉', mapping: Mapped("10月") }, + Range { from: '㋊', to: '㋊', mapping: Mapped("11月") }, + Range { from: '㋋', to: '㋋', mapping: Mapped("12月") }, + Range { from: '㋌', to: '㋌', mapping: Mapped("hg") }, + Range { from: '㋍', to: '㋍', mapping: Mapped("erg") }, + Range { from: '㋎', to: '㋎', mapping: Mapped("ev") }, + Range { from: '㋏', to: '㋏', mapping: Mapped("ltd") }, + Range { from: '㋐', to: '㋐', mapping: Mapped("ア") }, + Range { from: '㋑', to: '㋑', mapping: Mapped("イ") }, + Range { from: '㋒', to: '㋒', mapping: Mapped("ウ") }, + Range { from: '㋓', to: '㋓', mapping: Mapped("エ") }, + Range { from: '㋔', to: '㋔', mapping: Mapped("オ") }, + Range { from: '㋕', to: '㋕', mapping: Mapped("カ") }, + Range { from: '㋖', to: '㋖', mapping: Mapped("キ") }, + Range { from: '㋗', to: '㋗', mapping: Mapped("ク") }, + Range { from: '㋘', to: '㋘', mapping: Mapped("ケ") }, + Range { from: '㋙', to: '㋙', mapping: Mapped("コ") }, + Range { from: '㋚', to: '㋚', mapping: Mapped("サ") }, + Range { from: '㋛', to: '㋛', mapping: Mapped("シ") }, + Range { from: '㋜', to: '㋜', mapping: Mapped("ス") }, + Range { from: '㋝', to: '㋝', mapping: Mapped("セ") }, + Range { from: '㋞', to: '㋞', mapping: Mapped("ソ") }, + Range { from: '㋟', to: '㋟', mapping: Mapped("タ") }, + Range { from: '㋠', to: '㋠', mapping: Mapped("チ") }, + Range { from: '㋡', to: '㋡', mapping: Mapped("ツ") }, + Range { from: '㋢', to: '㋢', mapping: Mapped("テ") }, + Range { from: '㋣', to: '㋣', mapping: Mapped("ト") }, + Range { from: '㋤', to: '㋤', mapping: Mapped("ナ") }, + Range { from: '㋥', to: '㋥', mapping: Mapped("ニ") }, + Range { from: '㋦', to: '㋦', mapping: Mapped("ヌ") }, + Range { from: '㋧', to: '㋧', mapping: Mapped("ネ") }, + Range { from: '㋨', to: '㋨', mapping: Mapped("ノ") }, + Range { from: '㋩', to: '㋩', mapping: Mapped("ハ") }, + Range { from: '㋪', to: '㋪', mapping: Mapped("ヒ") }, + Range { from: '㋫', to: '㋫', mapping: Mapped("フ") }, + Range { from: '㋬', to: '㋬', mapping: Mapped("ヘ") }, + Range { from: '㋭', to: '㋭', mapping: Mapped("ホ") }, + Range { from: '㋮', to: '㋮', mapping: Mapped("マ") }, + Range { from: '㋯', to: '㋯', mapping: Mapped("ミ") }, + Range { from: '㋰', to: '㋰', mapping: Mapped("ム") }, + Range { from: '㋱', to: '㋱', mapping: Mapped("メ") }, + Range { from: '㋲', to: '㋲', mapping: Mapped("モ") }, + Range { from: '㋳', to: '㋳', mapping: Mapped("ヤ") }, + Range { from: '㋴', to: '㋴', mapping: Mapped("ユ") }, + Range { from: '㋵', to: '㋵', mapping: Mapped("ヨ") }, + Range { from: '㋶', to: '㋶', mapping: Mapped("ラ") }, + Range { from: '㋷', to: '㋷', mapping: Mapped("リ") }, + Range { from: '㋸', to: '㋸', mapping: Mapped("ル") }, + Range { from: '㋹', to: '㋹', mapping: Mapped("レ") }, + Range { from: '㋺', to: '㋺', mapping: Mapped("ロ") }, + Range { from: '㋻', to: '㋻', mapping: Mapped("ワ") }, + Range { from: '㋼', to: '㋼', mapping: Mapped("ヰ") }, + Range { from: '㋽', to: '㋽', mapping: Mapped("ヱ") }, + Range { from: '㋾', to: '㋾', mapping: Mapped("ヲ") }, + Range { from: '㋿', to: '㋿', mapping: Disallowed }, + Range { from: '㌀', to: '㌀', mapping: Mapped("アパート") }, + Range { from: '㌁', to: '㌁', mapping: Mapped("アルファ") }, + Range { from: '㌂', to: '㌂', mapping: Mapped("アンペア") }, + Range { from: '㌃', to: '㌃', mapping: Mapped("アール") }, + Range { from: '㌄', to: '㌄', mapping: Mapped("イニング") }, + Range { from: '㌅', to: '㌅', mapping: Mapped("インチ") }, + Range { from: '㌆', to: '㌆', mapping: Mapped("ウォン") }, + Range { from: '㌇', to: '㌇', mapping: Mapped("エスクード") }, + Range { from: '㌈', to: '㌈', mapping: Mapped("エーカー") }, + Range { from: '㌉', to: '㌉', mapping: Mapped("オンス") }, + Range { from: '㌊', to: '㌊', mapping: Mapped("オーム") }, + Range { from: '㌋', to: '㌋', mapping: Mapped("カイリ") }, + Range { from: '㌌', to: '㌌', mapping: Mapped("カラット") }, + Range { from: '㌍', to: '㌍', mapping: Mapped("カロリー") }, + Range { from: '㌎', to: '㌎', mapping: Mapped("ガロン") }, + Range { from: '㌏', to: '㌏', mapping: Mapped("ガンマ") }, + Range { from: '㌐', to: '㌐', mapping: Mapped("ギガ") }, + Range { from: '㌑', to: '㌑', mapping: Mapped("ギニー") }, + Range { from: '㌒', to: '㌒', mapping: Mapped("キュリー") }, + Range { from: '㌓', to: '㌓', mapping: Mapped("ギルダー") }, + Range { from: '㌔', to: '㌔', mapping: Mapped("キロ") }, + Range { from: '㌕', to: '㌕', mapping: Mapped("キログラム") }, + Range { from: '㌖', to: '㌖', mapping: Mapped("キロメートル") }, + Range { from: '㌗', to: '㌗', mapping: Mapped("キロワット") }, + Range { from: '㌘', to: '㌘', mapping: Mapped("グラム") }, + Range { from: '㌙', to: '㌙', mapping: Mapped("グラムトン") }, + Range { from: '㌚', to: '㌚', mapping: Mapped("クルゼイロ") }, + Range { from: '㌛', to: '㌛', mapping: Mapped("クローネ") }, + Range { from: '㌜', to: '㌜', mapping: Mapped("ケース") }, + Range { from: '㌝', to: '㌝', mapping: Mapped("コルナ") }, + Range { from: '㌞', to: '㌞', mapping: Mapped("コーポ") }, + Range { from: '㌟', to: '㌟', mapping: Mapped("サイクル") }, + Range { from: '㌠', to: '㌠', mapping: Mapped("サンチーム") }, + Range { from: '㌡', to: '㌡', mapping: Mapped("シリング") }, + Range { from: '㌢', to: '㌢', mapping: Mapped("センチ") }, + Range { from: '㌣', to: '㌣', mapping: Mapped("セント") }, + Range { from: '㌤', to: '㌤', mapping: Mapped("ダース") }, + Range { from: '㌥', to: '㌥', mapping: Mapped("デシ") }, + Range { from: '㌦', to: '㌦', mapping: Mapped("ドル") }, + Range { from: '㌧', to: '㌧', mapping: Mapped("トン") }, + Range { from: '㌨', to: '㌨', mapping: Mapped("ナノ") }, + Range { from: '㌩', to: '㌩', mapping: Mapped("ノット") }, + Range { from: '㌪', to: '㌪', mapping: Mapped("ハイツ") }, + Range { from: '㌫', to: '㌫', mapping: Mapped("パーセント") }, + Range { from: '㌬', to: '㌬', mapping: Mapped("パーツ") }, + Range { from: '㌭', to: '㌭', mapping: Mapped("バーレル") }, + Range { from: '㌮', to: '㌮', mapping: Mapped("ピアストル") }, + Range { from: '㌯', to: '㌯', mapping: Mapped("ピクル") }, + Range { from: '㌰', to: '㌰', mapping: Mapped("ピコ") }, + Range { from: '㌱', to: '㌱', mapping: Mapped("ビル") }, + Range { from: '㌲', to: '㌲', mapping: Mapped("ファラッド") }, + Range { from: '㌳', to: '㌳', mapping: Mapped("フィート") }, + Range { from: '㌴', to: '㌴', mapping: Mapped("ブッシェル") }, + Range { from: '㌵', to: '㌵', mapping: Mapped("フラン") }, + Range { from: '㌶', to: '㌶', mapping: Mapped("ヘクタール") }, + Range { from: '㌷', to: '㌷', mapping: Mapped("ペソ") }, + Range { from: '㌸', to: '㌸', mapping: Mapped("ペニヒ") }, + Range { from: '㌹', to: '㌹', mapping: Mapped("ヘルツ") }, + Range { from: '㌺', to: '㌺', mapping: Mapped("ペンス") }, + Range { from: '㌻', to: '㌻', mapping: Mapped("ページ") }, + Range { from: '㌼', to: '㌼', mapping: Mapped("ベータ") }, + Range { from: '㌽', to: '㌽', mapping: Mapped("ポイント") }, + Range { from: '㌾', to: '㌾', mapping: Mapped("ボルト") }, + Range { from: '㌿', to: '㌿', mapping: Mapped("ホン") }, + Range { from: '㍀', to: '㍀', mapping: Mapped("ポンド") }, + Range { from: '㍁', to: '㍁', mapping: Mapped("ホール") }, + Range { from: '㍂', to: '㍂', mapping: Mapped("ホーン") }, + Range { from: '㍃', to: '㍃', mapping: Mapped("マイクロ") }, + Range { from: '㍄', to: '㍄', mapping: Mapped("マイル") }, + Range { from: '㍅', to: '㍅', mapping: Mapped("マッハ") }, + Range { from: '㍆', to: '㍆', mapping: Mapped("マルク") }, + Range { from: '㍇', to: '㍇', mapping: Mapped("マンション") }, + Range { from: '㍈', to: '㍈', mapping: Mapped("ミクロン") }, + Range { from: '㍉', to: '㍉', mapping: Mapped("ミリ") }, + Range { from: '㍊', to: '㍊', mapping: Mapped("ミリバール") }, + Range { from: '㍋', to: '㍋', mapping: Mapped("メガ") }, + Range { from: '㍌', to: '㍌', mapping: Mapped("メガトン") }, + Range { from: '㍍', to: '㍍', mapping: Mapped("メートル") }, + Range { from: '㍎', to: '㍎', mapping: Mapped("ヤード") }, + Range { from: '㍏', to: '㍏', mapping: Mapped("ヤール") }, + Range { from: '㍐', to: '㍐', mapping: Mapped("ユアン") }, + Range { from: '㍑', to: '㍑', mapping: Mapped("リットル") }, + Range { from: '㍒', to: '㍒', mapping: Mapped("リラ") }, + Range { from: '㍓', to: '㍓', mapping: Mapped("ルピー") }, + Range { from: '㍔', to: '㍔', mapping: Mapped("ルーブル") }, + Range { from: '㍕', to: '㍕', mapping: Mapped("レム") }, + Range { from: '㍖', to: '㍖', mapping: Mapped("レントゲン") }, + Range { from: '㍗', to: '㍗', mapping: Mapped("ワット") }, + Range { from: '㍘', to: '㍘', mapping: Mapped("0点") }, + Range { from: '㍙', to: '㍙', mapping: Mapped("1点") }, + Range { from: '㍚', to: '㍚', mapping: Mapped("2点") }, + Range { from: '㍛', to: '㍛', mapping: Mapped("3点") }, + Range { from: '㍜', to: '㍜', mapping: Mapped("4点") }, + Range { from: '㍝', to: '㍝', mapping: Mapped("5点") }, + Range { from: '㍞', to: '㍞', mapping: Mapped("6点") }, + Range { from: '㍟', to: '㍟', mapping: Mapped("7点") }, + Range { from: '㍠', to: '㍠', mapping: Mapped("8点") }, + Range { from: '㍡', to: '㍡', mapping: Mapped("9点") }, + Range { from: '㍢', to: '㍢', mapping: Mapped("10点") }, + Range { from: '㍣', to: '㍣', mapping: Mapped("11点") }, + Range { from: '㍤', to: '㍤', mapping: Mapped("12点") }, + Range { from: '㍥', to: '㍥', mapping: Mapped("13点") }, + Range { from: '㍦', to: '㍦', mapping: Mapped("14点") }, + Range { from: '㍧', to: '㍧', mapping: Mapped("15点") }, + Range { from: '㍨', to: '㍨', mapping: Mapped("16点") }, + Range { from: '㍩', to: '㍩', mapping: Mapped("17点") }, + Range { from: '㍪', to: '㍪', mapping: Mapped("18点") }, + Range { from: '㍫', to: '㍫', mapping: Mapped("19点") }, + Range { from: '㍬', to: '㍬', mapping: Mapped("20点") }, + Range { from: '㍭', to: '㍭', mapping: Mapped("21点") }, + Range { from: '㍮', to: '㍮', mapping: Mapped("22点") }, + Range { from: '㍯', to: '㍯', mapping: Mapped("23点") }, + Range { from: '㍰', to: '㍰', mapping: Mapped("24点") }, + Range { from: '㍱', to: '㍱', mapping: Mapped("hpa") }, + Range { from: '㍲', to: '㍲', mapping: Mapped("da") }, + Range { from: '㍳', to: '㍳', mapping: Mapped("au") }, + Range { from: '㍴', to: '㍴', mapping: Mapped("bar") }, + Range { from: '㍵', to: '㍵', mapping: Mapped("ov") }, + Range { from: '㍶', to: '㍶', mapping: Mapped("pc") }, + Range { from: '㍷', to: '㍷', mapping: Mapped("dm") }, + Range { from: '㍸', to: '㍸', mapping: Mapped("dm2") }, + Range { from: '㍹', to: '㍹', mapping: Mapped("dm3") }, + Range { from: '㍺', to: '㍺', mapping: Mapped("iu") }, + Range { from: '㍻', to: '㍻', mapping: Mapped("平成") }, + Range { from: '㍼', to: '㍼', mapping: Mapped("昭和") }, + Range { from: '㍽', to: '㍽', mapping: Mapped("大正") }, + Range { from: '㍾', to: '㍾', mapping: Mapped("明治") }, + Range { from: '㍿', to: '㍿', mapping: Mapped("株式会社") }, + Range { from: '㎀', to: '㎀', mapping: Mapped("pa") }, + Range { from: '㎁', to: '㎁', mapping: Mapped("na") }, + Range { from: '㎂', to: '㎂', mapping: Mapped("μa") }, + Range { from: '㎃', to: '㎃', mapping: Mapped("ma") }, + Range { from: '㎄', to: '㎄', mapping: Mapped("ka") }, + Range { from: '㎅', to: '㎅', mapping: Mapped("kb") }, + Range { from: '㎆', to: '㎆', mapping: Mapped("mb") }, + Range { from: '㎇', to: '㎇', mapping: Mapped("gb") }, + Range { from: '㎈', to: '㎈', mapping: Mapped("cal") }, + Range { from: '㎉', to: '㎉', mapping: Mapped("kcal") }, + Range { from: '㎊', to: '㎊', mapping: Mapped("pf") }, + Range { from: '㎋', to: '㎋', mapping: Mapped("nf") }, + Range { from: '㎌', to: '㎌', mapping: Mapped("μf") }, + Range { from: '㎍', to: '㎍', mapping: Mapped("μg") }, + Range { from: '㎎', to: '㎎', mapping: Mapped("mg") }, + Range { from: '㎏', to: '㎏', mapping: Mapped("kg") }, + Range { from: '㎐', to: '㎐', mapping: Mapped("hz") }, + Range { from: '㎑', to: '㎑', mapping: Mapped("khz") }, + Range { from: '㎒', to: '㎒', mapping: Mapped("mhz") }, + Range { from: '㎓', to: '㎓', mapping: Mapped("ghz") }, + Range { from: '㎔', to: '㎔', mapping: Mapped("thz") }, + Range { from: '㎕', to: '㎕', mapping: Mapped("μl") }, + Range { from: '㎖', to: '㎖', mapping: Mapped("ml") }, + Range { from: '㎗', to: '㎗', mapping: Mapped("dl") }, + Range { from: '㎘', to: '㎘', mapping: Mapped("kl") }, + Range { from: '㎙', to: '㎙', mapping: Mapped("fm") }, + Range { from: '㎚', to: '㎚', mapping: Mapped("nm") }, + Range { from: '㎛', to: '㎛', mapping: Mapped("μm") }, + Range { from: '㎜', to: '㎜', mapping: Mapped("mm") }, + Range { from: '㎝', to: '㎝', mapping: Mapped("cm") }, + Range { from: '㎞', to: '㎞', mapping: Mapped("km") }, + Range { from: '㎟', to: '㎟', mapping: Mapped("mm2") }, + Range { from: '㎠', to: '㎠', mapping: Mapped("cm2") }, + Range { from: '㎡', to: '㎡', mapping: Mapped("m2") }, + Range { from: '㎢', to: '㎢', mapping: Mapped("km2") }, + Range { from: '㎣', to: '㎣', mapping: Mapped("mm3") }, + Range { from: '㎤', to: '㎤', mapping: Mapped("cm3") }, + Range { from: '㎥', to: '㎥', mapping: Mapped("m3") }, + Range { from: '㎦', to: '㎦', mapping: Mapped("km3") }, + Range { from: '㎧', to: '㎧', mapping: Mapped("m∕s") }, + Range { from: '㎨', to: '㎨', mapping: Mapped("m∕s2") }, + Range { from: '㎩', to: '㎩', mapping: Mapped("pa") }, + Range { from: '㎪', to: '㎪', mapping: Mapped("kpa") }, + Range { from: '㎫', to: '㎫', mapping: Mapped("mpa") }, + Range { from: '㎬', to: '㎬', mapping: Mapped("gpa") }, + Range { from: '㎭', to: '㎭', mapping: Mapped("rad") }, + Range { from: '㎮', to: '㎮', mapping: Mapped("rad∕s") }, + Range { from: '㎯', to: '㎯', mapping: Mapped("rad∕s2") }, + Range { from: '㎰', to: '㎰', mapping: Mapped("ps") }, + Range { from: '㎱', to: '㎱', mapping: Mapped("ns") }, + Range { from: '㎲', to: '㎲', mapping: Mapped("μs") }, + Range { from: '㎳', to: '㎳', mapping: Mapped("ms") }, + Range { from: '㎴', to: '㎴', mapping: Mapped("pv") }, + Range { from: '㎵', to: '㎵', mapping: Mapped("nv") }, + Range { from: '㎶', to: '㎶', mapping: Mapped("μv") }, + Range { from: '㎷', to: '㎷', mapping: Mapped("mv") }, + Range { from: '㎸', to: '㎸', mapping: Mapped("kv") }, + Range { from: '㎹', to: '㎹', mapping: Mapped("mv") }, + Range { from: '㎺', to: '㎺', mapping: Mapped("pw") }, + Range { from: '㎻', to: '㎻', mapping: Mapped("nw") }, + Range { from: '㎼', to: '㎼', mapping: Mapped("μw") }, + Range { from: '㎽', to: '㎽', mapping: Mapped("mw") }, + Range { from: '㎾', to: '㎾', mapping: Mapped("kw") }, + Range { from: '㎿', to: '㎿', mapping: Mapped("mw") }, + Range { from: '㏀', to: '㏀', mapping: Mapped("kω") }, + Range { from: '㏁', to: '㏁', mapping: Mapped("mω") }, + Range { from: '㏂', to: '㏂', mapping: Disallowed }, + Range { from: '㏃', to: '㏃', mapping: Mapped("bq") }, + Range { from: '㏄', to: '㏄', mapping: Mapped("cc") }, + Range { from: '㏅', to: '㏅', mapping: Mapped("cd") }, + Range { from: '㏆', to: '㏆', mapping: Mapped("c∕kg") }, + Range { from: '㏇', to: '㏇', mapping: Disallowed }, + Range { from: '㏈', to: '㏈', mapping: Mapped("db") }, + Range { from: '㏉', to: '㏉', mapping: Mapped("gy") }, + Range { from: '㏊', to: '㏊', mapping: Mapped("ha") }, + Range { from: '㏋', to: '㏋', mapping: Mapped("hp") }, + Range { from: '㏌', to: '㏌', mapping: Mapped("in") }, + Range { from: '㏍', to: '㏍', mapping: Mapped("kk") }, + Range { from: '㏎', to: '㏎', mapping: Mapped("km") }, + Range { from: '㏏', to: '㏏', mapping: Mapped("kt") }, + Range { from: '㏐', to: '㏐', mapping: Mapped("lm") }, + Range { from: '㏑', to: '㏑', mapping: Mapped("ln") }, + Range { from: '㏒', to: '㏒', mapping: Mapped("log") }, + Range { from: '㏓', to: '㏓', mapping: Mapped("lx") }, + Range { from: '㏔', to: '㏔', mapping: Mapped("mb") }, + Range { from: '㏕', to: '㏕', mapping: Mapped("mil") }, + Range { from: '㏖', to: '㏖', mapping: Mapped("mol") }, + Range { from: '㏗', to: '㏗', mapping: Mapped("ph") }, + Range { from: '㏘', to: '㏘', mapping: Disallowed }, + Range { from: '㏙', to: '㏙', mapping: Mapped("ppm") }, + Range { from: '㏚', to: '㏚', mapping: Mapped("pr") }, + Range { from: '㏛', to: '㏛', mapping: Mapped("sr") }, + Range { from: '㏜', to: '㏜', mapping: Mapped("sv") }, + Range { from: '㏝', to: '㏝', mapping: Mapped("wb") }, + Range { from: '㏞', to: '㏞', mapping: Mapped("v∕m") }, + Range { from: '㏟', to: '㏟', mapping: Mapped("a∕m") }, + Range { from: '㏠', to: '㏠', mapping: Mapped("1日") }, + Range { from: '㏡', to: '㏡', mapping: Mapped("2日") }, + Range { from: '㏢', to: '㏢', mapping: Mapped("3日") }, + Range { from: '㏣', to: '㏣', mapping: Mapped("4日") }, + Range { from: '㏤', to: '㏤', mapping: Mapped("5日") }, + Range { from: '㏥', to: '㏥', mapping: Mapped("6日") }, + Range { from: '㏦', to: '㏦', mapping: Mapped("7日") }, + Range { from: '㏧', to: '㏧', mapping: Mapped("8日") }, + Range { from: '㏨', to: '㏨', mapping: Mapped("9日") }, + Range { from: '㏩', to: '㏩', mapping: Mapped("10日") }, + Range { from: '㏪', to: '㏪', mapping: Mapped("11日") }, + Range { from: '㏫', to: '㏫', mapping: Mapped("12日") }, + Range { from: '㏬', to: '㏬', mapping: Mapped("13日") }, + Range { from: '㏭', to: '㏭', mapping: Mapped("14日") }, + Range { from: '㏮', to: '㏮', mapping: Mapped("15日") }, + Range { from: '㏯', to: '㏯', mapping: Mapped("16日") }, + Range { from: '㏰', to: '㏰', mapping: Mapped("17日") }, + Range { from: '㏱', to: '㏱', mapping: Mapped("18日") }, + Range { from: '㏲', to: '㏲', mapping: Mapped("19日") }, + Range { from: '㏳', to: '㏳', mapping: Mapped("20日") }, + Range { from: '㏴', to: '㏴', mapping: Mapped("21日") }, + Range { from: '㏵', to: '㏵', mapping: Mapped("22日") }, + Range { from: '㏶', to: '㏶', mapping: Mapped("23日") }, + Range { from: '㏷', to: '㏷', mapping: Mapped("24日") }, + Range { from: '㏸', to: '㏸', mapping: Mapped("25日") }, + Range { from: '㏹', to: '㏹', mapping: Mapped("26日") }, + Range { from: '㏺', to: '㏺', mapping: Mapped("27日") }, + Range { from: '㏻', to: '㏻', mapping: Mapped("28日") }, + Range { from: '㏼', to: '㏼', mapping: Mapped("29日") }, + Range { from: '㏽', to: '㏽', mapping: Mapped("30日") }, + Range { from: '㏾', to: '㏾', mapping: Mapped("31日") }, + Range { from: '㏿', to: '㏿', mapping: Mapped("gal") }, + Range { from: '㐀', to: '䶵', mapping: Valid }, + Range { from: '䶶', to: '䶿', mapping: Disallowed }, + Range { from: '䷀', to: '䷿', mapping: Valid }, + Range { from: '一', to: '龥', mapping: Valid }, + Range { from: '龦', to: '龻', mapping: Valid }, + Range { from: '龼', to: '鿃', mapping: Valid }, + Range { from: '鿄', to: '鿋', mapping: Valid }, + Range { from: '鿌', to: '鿌', mapping: Valid }, + Range { from: '鿍', to: '鿕', mapping: Valid }, + Range { from: '鿖', to: '鿿', mapping: Disallowed }, + Range { from: 'ꀀ', to: 'ꒌ', mapping: Valid }, + Range { from: '꒍', to: '꒏', mapping: Disallowed }, + Range { from: '꒐', to: '꒡', mapping: Valid }, + Range { from: '꒢', to: '꒣', mapping: Valid }, + Range { from: '꒤', to: '꒳', mapping: Valid }, + Range { from: '꒴', to: '꒴', mapping: Valid }, + Range { from: '꒵', to: '꓀', mapping: Valid }, + Range { from: '꓁', to: '꓁', mapping: Valid }, + Range { from: '꓂', to: '꓄', mapping: Valid }, + Range { from: '꓅', to: '꓅', mapping: Valid }, + Range { from: '꓆', to: '꓆', mapping: Valid }, + Range { from: '꓇', to: '꓏', mapping: Disallowed }, + Range { from: 'ꓐ', to: 'ꓽ', mapping: Valid }, + Range { from: '꓾', to: '꓿', mapping: Valid }, + Range { from: 'ꔀ', to: 'ꘌ', mapping: Valid }, + Range { from: '꘍', to: '꘏', mapping: Valid }, + Range { from: 'ꘐ', to: 'ꘫ', mapping: Valid }, + Range { from: '꘬', to: '꘿', mapping: Disallowed }, + Range { from: 'Ꙁ', to: 'Ꙁ', mapping: Mapped("ꙁ") }, + Range { from: 'ꙁ', to: 'ꙁ', mapping: Valid }, + Range { from: 'Ꙃ', to: 'Ꙃ', mapping: Mapped("ꙃ") }, + Range { from: 'ꙃ', to: 'ꙃ', mapping: Valid }, + Range { from: 'Ꙅ', to: 'Ꙅ', mapping: Mapped("ꙅ") }, + Range { from: 'ꙅ', to: 'ꙅ', mapping: Valid }, + Range { from: 'Ꙇ', to: 'Ꙇ', mapping: Mapped("ꙇ") }, + Range { from: 'ꙇ', to: 'ꙇ', mapping: Valid }, + Range { from: 'Ꙉ', to: 'Ꙉ', mapping: Mapped("ꙉ") }, + Range { from: 'ꙉ', to: 'ꙉ', mapping: Valid }, + Range { from: 'Ꙋ', to: 'Ꙋ', mapping: Mapped("ꙋ") }, + Range { from: 'ꙋ', to: 'ꙋ', mapping: Valid }, + Range { from: 'Ꙍ', to: 'Ꙍ', mapping: Mapped("ꙍ") }, + Range { from: 'ꙍ', to: 'ꙍ', mapping: Valid }, + Range { from: 'Ꙏ', to: 'Ꙏ', mapping: Mapped("ꙏ") }, + Range { from: 'ꙏ', to: 'ꙏ', mapping: Valid }, + Range { from: 'Ꙑ', to: 'Ꙑ', mapping: Mapped("ꙑ") }, + Range { from: 'ꙑ', to: 'ꙑ', mapping: Valid }, + Range { from: 'Ꙓ', to: 'Ꙓ', mapping: Mapped("ꙓ") }, + Range { from: 'ꙓ', to: 'ꙓ', mapping: Valid }, + Range { from: 'Ꙕ', to: 'Ꙕ', mapping: Mapped("ꙕ") }, + Range { from: 'ꙕ', to: 'ꙕ', mapping: Valid }, + Range { from: 'Ꙗ', to: 'Ꙗ', mapping: Mapped("ꙗ") }, + Range { from: 'ꙗ', to: 'ꙗ', mapping: Valid }, + Range { from: 'Ꙙ', to: 'Ꙙ', mapping: Mapped("ꙙ") }, + Range { from: 'ꙙ', to: 'ꙙ', mapping: Valid }, + Range { from: 'Ꙛ', to: 'Ꙛ', mapping: Mapped("ꙛ") }, + Range { from: 'ꙛ', to: 'ꙛ', mapping: Valid }, + Range { from: 'Ꙝ', to: 'Ꙝ', mapping: Mapped("ꙝ") }, + Range { from: 'ꙝ', to: 'ꙝ', mapping: Valid }, + Range { from: 'Ꙟ', to: 'Ꙟ', mapping: Mapped("ꙟ") }, + Range { from: 'ꙟ', to: 'ꙟ', mapping: Valid }, + Range { from: 'Ꙡ', to: 'Ꙡ', mapping: Mapped("ꙡ") }, + Range { from: 'ꙡ', to: 'ꙡ', mapping: Valid }, + Range { from: 'Ꙣ', to: 'Ꙣ', mapping: Mapped("ꙣ") }, + Range { from: 'ꙣ', to: 'ꙣ', mapping: Valid }, + Range { from: 'Ꙥ', to: 'Ꙥ', mapping: Mapped("ꙥ") }, + Range { from: 'ꙥ', to: 'ꙥ', mapping: Valid }, + Range { from: 'Ꙧ', to: 'Ꙧ', mapping: Mapped("ꙧ") }, + Range { from: 'ꙧ', to: 'ꙧ', mapping: Valid }, + Range { from: 'Ꙩ', to: 'Ꙩ', mapping: Mapped("ꙩ") }, + Range { from: 'ꙩ', to: 'ꙩ', mapping: Valid }, + Range { from: 'Ꙫ', to: 'Ꙫ', mapping: Mapped("ꙫ") }, + Range { from: 'ꙫ', to: 'ꙫ', mapping: Valid }, + Range { from: 'Ꙭ', to: 'Ꙭ', mapping: Mapped("ꙭ") }, + Range { from: 'ꙭ', to: '꙯', mapping: Valid }, + Range { from: '꙰', to: '꙳', mapping: Valid }, + Range { from: 'ꙴ', to: 'ꙻ', mapping: Valid }, + Range { from: '꙼', to: '꙽', mapping: Valid }, + Range { from: '꙾', to: '꙾', mapping: Valid }, + Range { from: 'ꙿ', to: 'ꙿ', mapping: Valid }, + Range { from: 'Ꚁ', to: 'Ꚁ', mapping: Mapped("ꚁ") }, + Range { from: 'ꚁ', to: 'ꚁ', mapping: Valid }, + Range { from: 'Ꚃ', to: 'Ꚃ', mapping: Mapped("ꚃ") }, + Range { from: 'ꚃ', to: 'ꚃ', mapping: Valid }, + Range { from: 'Ꚅ', to: 'Ꚅ', mapping: Mapped("ꚅ") }, + Range { from: 'ꚅ', to: 'ꚅ', mapping: Valid }, + Range { from: 'Ꚇ', to: 'Ꚇ', mapping: Mapped("ꚇ") }, + Range { from: 'ꚇ', to: 'ꚇ', mapping: Valid }, + Range { from: 'Ꚉ', to: 'Ꚉ', mapping: Mapped("ꚉ") }, + Range { from: 'ꚉ', to: 'ꚉ', mapping: Valid }, + Range { from: 'Ꚋ', to: 'Ꚋ', mapping: Mapped("ꚋ") }, + Range { from: 'ꚋ', to: 'ꚋ', mapping: Valid }, + Range { from: 'Ꚍ', to: 'Ꚍ', mapping: Mapped("ꚍ") }, + Range { from: 'ꚍ', to: 'ꚍ', mapping: Valid }, + Range { from: 'Ꚏ', to: 'Ꚏ', mapping: Mapped("ꚏ") }, + Range { from: 'ꚏ', to: 'ꚏ', mapping: Valid }, + Range { from: 'Ꚑ', to: 'Ꚑ', mapping: Mapped("ꚑ") }, + Range { from: 'ꚑ', to: 'ꚑ', mapping: Valid }, + Range { from: 'Ꚓ', to: 'Ꚓ', mapping: Mapped("ꚓ") }, + Range { from: 'ꚓ', to: 'ꚓ', mapping: Valid }, + Range { from: 'Ꚕ', to: 'Ꚕ', mapping: Mapped("ꚕ") }, + Range { from: 'ꚕ', to: 'ꚕ', mapping: Valid }, + Range { from: 'Ꚗ', to: 'Ꚗ', mapping: Mapped("ꚗ") }, + Range { from: 'ꚗ', to: 'ꚗ', mapping: Valid }, + Range { from: 'Ꚙ', to: 'Ꚙ', mapping: Mapped("ꚙ") }, + Range { from: 'ꚙ', to: 'ꚙ', mapping: Valid }, + Range { from: 'Ꚛ', to: 'Ꚛ', mapping: Mapped("ꚛ") }, + Range { from: 'ꚛ', to: 'ꚛ', mapping: Valid }, + Range { from: 'ꚜ', to: 'ꚜ', mapping: Mapped("ъ") }, + Range { from: 'ꚝ', to: 'ꚝ', mapping: Mapped("ь") }, + Range { from: 'ꚞ', to: 'ꚞ', mapping: Valid }, + Range { from: 'ꚟ', to: 'ꚟ', mapping: Valid }, + Range { from: 'ꚠ', to: 'ꛥ', mapping: Valid }, + Range { from: 'ꛦ', to: 'ꛯ', mapping: Valid }, + Range { from: '꛰', to: '꛱', mapping: Valid }, + Range { from: '꛲', to: '꛷', mapping: Valid }, + Range { from: '꛸', to: '꛿', mapping: Disallowed }, + Range { from: '꜀', to: '꜖', mapping: Valid }, + Range { from: 'ꜗ', to: 'ꜚ', mapping: Valid }, + Range { from: 'ꜛ', to: 'ꜟ', mapping: Valid }, + Range { from: '꜠', to: '꜡', mapping: Valid }, + Range { from: 'Ꜣ', to: 'Ꜣ', mapping: Mapped("ꜣ") }, + Range { from: 'ꜣ', to: 'ꜣ', mapping: Valid }, + Range { from: 'Ꜥ', to: 'Ꜥ', mapping: Mapped("ꜥ") }, + Range { from: 'ꜥ', to: 'ꜥ', mapping: Valid }, + Range { from: 'Ꜧ', to: 'Ꜧ', mapping: Mapped("ꜧ") }, + Range { from: 'ꜧ', to: 'ꜧ', mapping: Valid }, + Range { from: 'Ꜩ', to: 'Ꜩ', mapping: Mapped("ꜩ") }, + Range { from: 'ꜩ', to: 'ꜩ', mapping: Valid }, + Range { from: 'Ꜫ', to: 'Ꜫ', mapping: Mapped("ꜫ") }, + Range { from: 'ꜫ', to: 'ꜫ', mapping: Valid }, + Range { from: 'Ꜭ', to: 'Ꜭ', mapping: Mapped("ꜭ") }, + Range { from: 'ꜭ', to: 'ꜭ', mapping: Valid }, + Range { from: 'Ꜯ', to: 'Ꜯ', mapping: Mapped("ꜯ") }, + Range { from: 'ꜯ', to: 'ꜱ', mapping: Valid }, + Range { from: 'Ꜳ', to: 'Ꜳ', mapping: Mapped("ꜳ") }, + Range { from: 'ꜳ', to: 'ꜳ', mapping: Valid }, + Range { from: 'Ꜵ', to: 'Ꜵ', mapping: Mapped("ꜵ") }, + Range { from: 'ꜵ', to: 'ꜵ', mapping: Valid }, + Range { from: 'Ꜷ', to: 'Ꜷ', mapping: Mapped("ꜷ") }, + Range { from: 'ꜷ', to: 'ꜷ', mapping: Valid }, + Range { from: 'Ꜹ', to: 'Ꜹ', mapping: Mapped("ꜹ") }, + Range { from: 'ꜹ', to: 'ꜹ', mapping: Valid }, + Range { from: 'Ꜻ', to: 'Ꜻ', mapping: Mapped("ꜻ") }, + Range { from: 'ꜻ', to: 'ꜻ', mapping: Valid }, + Range { from: 'Ꜽ', to: 'Ꜽ', mapping: Mapped("ꜽ") }, + Range { from: 'ꜽ', to: 'ꜽ', mapping: Valid }, + Range { from: 'Ꜿ', to: 'Ꜿ', mapping: Mapped("ꜿ") }, + Range { from: 'ꜿ', to: 'ꜿ', mapping: Valid }, + Range { from: 'Ꝁ', to: 'Ꝁ', mapping: Mapped("ꝁ") }, + Range { from: 'ꝁ', to: 'ꝁ', mapping: Valid }, + Range { from: 'Ꝃ', to: 'Ꝃ', mapping: Mapped("ꝃ") }, + Range { from: 'ꝃ', to: 'ꝃ', mapping: Valid }, + Range { from: 'Ꝅ', to: 'Ꝅ', mapping: Mapped("ꝅ") }, + Range { from: 'ꝅ', to: 'ꝅ', mapping: Valid }, + Range { from: 'Ꝇ', to: 'Ꝇ', mapping: Mapped("ꝇ") }, + Range { from: 'ꝇ', to: 'ꝇ', mapping: Valid }, + Range { from: 'Ꝉ', to: 'Ꝉ', mapping: Mapped("ꝉ") }, + Range { from: 'ꝉ', to: 'ꝉ', mapping: Valid }, + Range { from: 'Ꝋ', to: 'Ꝋ', mapping: Mapped("ꝋ") }, + Range { from: 'ꝋ', to: 'ꝋ', mapping: Valid }, + Range { from: 'Ꝍ', to: 'Ꝍ', mapping: Mapped("ꝍ") }, + Range { from: 'ꝍ', to: 'ꝍ', mapping: Valid }, + Range { from: 'Ꝏ', to: 'Ꝏ', mapping: Mapped("ꝏ") }, + Range { from: 'ꝏ', to: 'ꝏ', mapping: Valid }, + Range { from: 'Ꝑ', to: 'Ꝑ', mapping: Mapped("ꝑ") }, + Range { from: 'ꝑ', to: 'ꝑ', mapping: Valid }, + Range { from: 'Ꝓ', to: 'Ꝓ', mapping: Mapped("ꝓ") }, + Range { from: 'ꝓ', to: 'ꝓ', mapping: Valid }, + Range { from: 'Ꝕ', to: 'Ꝕ', mapping: Mapped("ꝕ") }, + Range { from: 'ꝕ', to: 'ꝕ', mapping: Valid }, + Range { from: 'Ꝗ', to: 'Ꝗ', mapping: Mapped("ꝗ") }, + Range { from: 'ꝗ', to: 'ꝗ', mapping: Valid }, + Range { from: 'Ꝙ', to: 'Ꝙ', mapping: Mapped("ꝙ") }, + Range { from: 'ꝙ', to: 'ꝙ', mapping: Valid }, + Range { from: 'Ꝛ', to: 'Ꝛ', mapping: Mapped("ꝛ") }, + Range { from: 'ꝛ', to: 'ꝛ', mapping: Valid }, + Range { from: 'Ꝝ', to: 'Ꝝ', mapping: Mapped("ꝝ") }, + Range { from: 'ꝝ', to: 'ꝝ', mapping: Valid }, + Range { from: 'Ꝟ', to: 'Ꝟ', mapping: Mapped("ꝟ") }, + Range { from: 'ꝟ', to: 'ꝟ', mapping: Valid }, + Range { from: 'Ꝡ', to: 'Ꝡ', mapping: Mapped("ꝡ") }, + Range { from: 'ꝡ', to: 'ꝡ', mapping: Valid }, + Range { from: 'Ꝣ', to: 'Ꝣ', mapping: Mapped("ꝣ") }, + Range { from: 'ꝣ', to: 'ꝣ', mapping: Valid }, + Range { from: 'Ꝥ', to: 'Ꝥ', mapping: Mapped("ꝥ") }, + Range { from: 'ꝥ', to: 'ꝥ', mapping: Valid }, + Range { from: 'Ꝧ', to: 'Ꝧ', mapping: Mapped("ꝧ") }, + Range { from: 'ꝧ', to: 'ꝧ', mapping: Valid }, + Range { from: 'Ꝩ', to: 'Ꝩ', mapping: Mapped("ꝩ") }, + Range { from: 'ꝩ', to: 'ꝩ', mapping: Valid }, + Range { from: 'Ꝫ', to: 'Ꝫ', mapping: Mapped("ꝫ") }, + Range { from: 'ꝫ', to: 'ꝫ', mapping: Valid }, + Range { from: 'Ꝭ', to: 'Ꝭ', mapping: Mapped("ꝭ") }, + Range { from: 'ꝭ', to: 'ꝭ', mapping: Valid }, + Range { from: 'Ꝯ', to: 'Ꝯ', mapping: Mapped("ꝯ") }, + Range { from: 'ꝯ', to: 'ꝯ', mapping: Valid }, + Range { from: 'ꝰ', to: 'ꝰ', mapping: Mapped("ꝯ") }, + Range { from: 'ꝱ', to: 'ꝸ', mapping: Valid }, + Range { from: 'Ꝺ', to: 'Ꝺ', mapping: Mapped("ꝺ") }, + Range { from: 'ꝺ', to: 'ꝺ', mapping: Valid }, + Range { from: 'Ꝼ', to: 'Ꝼ', mapping: Mapped("ꝼ") }, + Range { from: 'ꝼ', to: 'ꝼ', mapping: Valid }, + Range { from: 'Ᵹ', to: 'Ᵹ', mapping: Mapped("ᵹ") }, + Range { from: 'Ꝿ', to: 'Ꝿ', mapping: Mapped("ꝿ") }, + Range { from: 'ꝿ', to: 'ꝿ', mapping: Valid }, + Range { from: 'Ꞁ', to: 'Ꞁ', mapping: Mapped("ꞁ") }, + Range { from: 'ꞁ', to: 'ꞁ', mapping: Valid }, + Range { from: 'Ꞃ', to: 'Ꞃ', mapping: Mapped("ꞃ") }, + Range { from: 'ꞃ', to: 'ꞃ', mapping: Valid }, + Range { from: 'Ꞅ', to: 'Ꞅ', mapping: Mapped("ꞅ") }, + Range { from: 'ꞅ', to: 'ꞅ', mapping: Valid }, + Range { from: 'Ꞇ', to: 'Ꞇ', mapping: Mapped("ꞇ") }, + Range { from: 'ꞇ', to: 'ꞈ', mapping: Valid }, + Range { from: '꞉', to: '꞊', mapping: Valid }, + Range { from: 'Ꞌ', to: 'Ꞌ', mapping: Mapped("ꞌ") }, + Range { from: 'ꞌ', to: 'ꞌ', mapping: Valid }, + Range { from: 'Ɥ', to: 'Ɥ', mapping: Mapped("ɥ") }, + Range { from: 'ꞎ', to: 'ꞎ', mapping: Valid }, + Range { from: 'ꞏ', to: 'ꞏ', mapping: Valid }, + Range { from: 'Ꞑ', to: 'Ꞑ', mapping: Mapped("ꞑ") }, + Range { from: 'ꞑ', to: 'ꞑ', mapping: Valid }, + Range { from: 'Ꞓ', to: 'Ꞓ', mapping: Mapped("ꞓ") }, + Range { from: 'ꞓ', to: 'ꞓ', mapping: Valid }, + Range { from: 'ꞔ', to: 'ꞕ', mapping: Valid }, + Range { from: 'Ꞗ', to: 'Ꞗ', mapping: Mapped("ꞗ") }, + Range { from: 'ꞗ', to: 'ꞗ', mapping: Valid }, + Range { from: 'Ꞙ', to: 'Ꞙ', mapping: Mapped("ꞙ") }, + Range { from: 'ꞙ', to: 'ꞙ', mapping: Valid }, + Range { from: 'Ꞛ', to: 'Ꞛ', mapping: Mapped("ꞛ") }, + Range { from: 'ꞛ', to: 'ꞛ', mapping: Valid }, + Range { from: 'Ꞝ', to: 'Ꞝ', mapping: Mapped("ꞝ") }, + Range { from: 'ꞝ', to: 'ꞝ', mapping: Valid }, + Range { from: 'Ꞟ', to: 'Ꞟ', mapping: Mapped("ꞟ") }, + Range { from: 'ꞟ', to: 'ꞟ', mapping: Valid }, + Range { from: 'Ꞡ', to: 'Ꞡ', mapping: Mapped("ꞡ") }, + Range { from: 'ꞡ', to: 'ꞡ', mapping: Valid }, + Range { from: 'Ꞣ', to: 'Ꞣ', mapping: Mapped("ꞣ") }, + Range { from: 'ꞣ', to: 'ꞣ', mapping: Valid }, + Range { from: 'Ꞥ', to: 'Ꞥ', mapping: Mapped("ꞥ") }, + Range { from: 'ꞥ', to: 'ꞥ', mapping: Valid }, + Range { from: 'Ꞧ', to: 'Ꞧ', mapping: Mapped("ꞧ") }, + Range { from: 'ꞧ', to: 'ꞧ', mapping: Valid }, + Range { from: 'Ꞩ', to: 'Ꞩ', mapping: Mapped("ꞩ") }, + Range { from: 'ꞩ', to: 'ꞩ', mapping: Valid }, + Range { from: 'Ɦ', to: 'Ɦ', mapping: Mapped("ɦ") }, + Range { from: 'Ɜ', to: 'Ɜ', mapping: Mapped("ɜ") }, + Range { from: 'Ɡ', to: 'Ɡ', mapping: Mapped("ɡ") }, + Range { from: 'Ɬ', to: 'Ɬ', mapping: Mapped("ɬ") }, + Range { from: 'Ɪ', to: 'ꞯ', mapping: Disallowed }, + Range { from: 'Ʞ', to: 'Ʞ', mapping: Mapped("ʞ") }, + Range { from: 'Ʇ', to: 'Ʇ', mapping: Mapped("ʇ") }, + Range { from: 'Ʝ', to: 'Ʝ', mapping: Mapped("ʝ") }, + Range { from: 'Ꭓ', to: 'Ꭓ', mapping: Mapped("ꭓ") }, + Range { from: 'Ꞵ', to: 'Ꞵ', mapping: Mapped("ꞵ") }, + Range { from: 'ꞵ', to: 'ꞵ', mapping: Valid }, + Range { from: 'Ꞷ', to: 'Ꞷ', mapping: Mapped("ꞷ") }, + Range { from: 'ꞷ', to: 'ꞷ', mapping: Valid }, + Range { from: 'Ꞹ', to: 'ꟶ', mapping: Disallowed }, + Range { from: 'ꟷ', to: 'ꟷ', mapping: Valid }, + Range { from: 'ꟸ', to: 'ꟸ', mapping: Mapped("ħ") }, + Range { from: 'ꟹ', to: 'ꟹ', mapping: Mapped("œ") }, + Range { from: 'ꟺ', to: 'ꟺ', mapping: Valid }, + Range { from: 'ꟻ', to: 'ꟿ', mapping: Valid }, + Range { from: 'ꠀ', to: 'ꠧ', mapping: Valid }, + Range { from: '꠨', to: '꠫', mapping: Valid }, + Range { from: '꠬', to: '꠯', mapping: Disallowed }, + Range { from: '꠰', to: '꠹', mapping: Valid }, + Range { from: '꠺', to: '꠿', mapping: Disallowed }, + Range { from: 'ꡀ', to: 'ꡳ', mapping: Valid }, + Range { from: '꡴', to: '꡷', mapping: Valid }, + Range { from: '꡸', to: '꡿', mapping: Disallowed }, + Range { from: 'ꢀ', to: '꣄', mapping: Valid }, + Range { from: 'ꣅ', to: '꣍', mapping: Disallowed }, + Range { from: '꣎', to: '꣏', mapping: Valid }, + Range { from: '꣐', to: '꣙', mapping: Valid }, + Range { from: '꣚', to: '꣟', mapping: Disallowed }, + Range { from: '꣠', to: 'ꣷ', mapping: Valid }, + Range { from: '꣸', to: '꣺', mapping: Valid }, + Range { from: 'ꣻ', to: 'ꣻ', mapping: Valid }, + Range { from: '꣼', to: '꣼', mapping: Valid }, + Range { from: 'ꣽ', to: 'ꣽ', mapping: Valid }, + Range { from: 'ꣾ', to: 'ꣿ', mapping: Disallowed }, + Range { from: '꤀', to: '꤭', mapping: Valid }, + Range { from: '꤮', to: '꤯', mapping: Valid }, + Range { from: 'ꤰ', to: '꥓', mapping: Valid }, + Range { from: '꥔', to: '꥞', mapping: Disallowed }, + Range { from: '꥟', to: '꥟', mapping: Valid }, + Range { from: 'ꥠ', to: 'ꥼ', mapping: Valid }, + Range { from: '꥽', to: '꥿', mapping: Disallowed }, + Range { from: 'ꦀ', to: '꧀', mapping: Valid }, + Range { from: '꧁', to: '꧍', mapping: Valid }, + Range { from: '꧎', to: '꧎', mapping: Disallowed }, + Range { from: 'ꧏ', to: '꧙', mapping: Valid }, + Range { from: '꧚', to: '꧝', mapping: Disallowed }, + Range { from: '꧞', to: '꧟', mapping: Valid }, + Range { from: 'ꧠ', to: 'ꧾ', mapping: Valid }, + Range { from: '꧿', to: '꧿', mapping: Disallowed }, + Range { from: 'ꨀ', to: 'ꨶ', mapping: Valid }, + Range { from: '꨷', to: '꨿', mapping: Disallowed }, + Range { from: 'ꩀ', to: 'ꩍ', mapping: Valid }, + Range { from: '꩎', to: '꩏', mapping: Disallowed }, + Range { from: '꩐', to: '꩙', mapping: Valid }, + Range { from: '꩚', to: '꩛', mapping: Disallowed }, + Range { from: '꩜', to: '꩟', mapping: Valid }, + Range { from: 'ꩠ', to: 'ꩶ', mapping: Valid }, + Range { from: '꩷', to: '꩹', mapping: Valid }, + Range { from: 'ꩺ', to: 'ꩻ', mapping: Valid }, + Range { from: 'ꩼ', to: 'ꩿ', mapping: Valid }, + Range { from: 'ꪀ', to: 'ꫂ', mapping: Valid }, + Range { from: '꫃', to: '꫚', mapping: Disallowed }, + Range { from: 'ꫛ', to: 'ꫝ', mapping: Valid }, + Range { from: '꫞', to: '꫟', mapping: Valid }, + Range { from: 'ꫠ', to: 'ꫯ', mapping: Valid }, + Range { from: '꫰', to: '꫱', mapping: Valid }, + Range { from: 'ꫲ', to: '꫶', mapping: Valid }, + Range { from: '꫷', to: '꬀', mapping: Disallowed }, + Range { from: 'ꬁ', to: 'ꬆ', mapping: Valid }, + Range { from: '꬇', to: '꬈', mapping: Disallowed }, + Range { from: 'ꬉ', to: 'ꬎ', mapping: Valid }, + Range { from: '꬏', to: '꬐', mapping: Disallowed }, + Range { from: 'ꬑ', to: 'ꬖ', mapping: Valid }, + Range { from: '꬗', to: '꬟', mapping: Disallowed }, + Range { from: 'ꬠ', to: 'ꬦ', mapping: Valid }, + Range { from: '꬧', to: '꬧', mapping: Disallowed }, + Range { from: 'ꬨ', to: 'ꬮ', mapping: Valid }, + Range { from: '꬯', to: '꬯', mapping: Disallowed }, + Range { from: 'ꬰ', to: 'ꭚ', mapping: Valid }, + Range { from: '꭛', to: '꭛', mapping: Valid }, + Range { from: 'ꭜ', to: 'ꭜ', mapping: Mapped("ꜧ") }, + Range { from: 'ꭝ', to: 'ꭝ', mapping: Mapped("ꬷ") }, + Range { from: 'ꭞ', to: 'ꭞ', mapping: Mapped("ɫ") }, + Range { from: 'ꭟ', to: 'ꭟ', mapping: Mapped("ꭒ") }, + Range { from: 'ꭠ', to: 'ꭣ', mapping: Valid }, + Range { from: 'ꭤ', to: 'ꭥ', mapping: Valid }, + Range { from: 'ꭦ', to: '꭯', mapping: Disallowed }, + Range { from: 'ꭰ', to: 'ꭰ', mapping: Mapped("Ꭰ") }, + Range { from: 'ꭱ', to: 'ꭱ', mapping: Mapped("Ꭱ") }, + Range { from: 'ꭲ', to: 'ꭲ', mapping: Mapped("Ꭲ") }, + Range { from: 'ꭳ', to: 'ꭳ', mapping: Mapped("Ꭳ") }, + Range { from: 'ꭴ', to: 'ꭴ', mapping: Mapped("Ꭴ") }, + Range { from: 'ꭵ', to: 'ꭵ', mapping: Mapped("Ꭵ") }, + Range { from: 'ꭶ', to: 'ꭶ', mapping: Mapped("Ꭶ") }, + Range { from: 'ꭷ', to: 'ꭷ', mapping: Mapped("Ꭷ") }, + Range { from: 'ꭸ', to: 'ꭸ', mapping: Mapped("Ꭸ") }, + Range { from: 'ꭹ', to: 'ꭹ', mapping: Mapped("Ꭹ") }, + Range { from: 'ꭺ', to: 'ꭺ', mapping: Mapped("Ꭺ") }, + Range { from: 'ꭻ', to: 'ꭻ', mapping: Mapped("Ꭻ") }, + Range { from: 'ꭼ', to: 'ꭼ', mapping: Mapped("Ꭼ") }, + Range { from: 'ꭽ', to: 'ꭽ', mapping: Mapped("Ꭽ") }, + Range { from: 'ꭾ', to: 'ꭾ', mapping: Mapped("Ꭾ") }, + Range { from: 'ꭿ', to: 'ꭿ', mapping: Mapped("Ꭿ") }, + Range { from: 'ꮀ', to: 'ꮀ', mapping: Mapped("Ꮀ") }, + Range { from: 'ꮁ', to: 'ꮁ', mapping: Mapped("Ꮁ") }, + Range { from: 'ꮂ', to: 'ꮂ', mapping: Mapped("Ꮂ") }, + Range { from: 'ꮃ', to: 'ꮃ', mapping: Mapped("Ꮃ") }, + Range { from: 'ꮄ', to: 'ꮄ', mapping: Mapped("Ꮄ") }, + Range { from: 'ꮅ', to: 'ꮅ', mapping: Mapped("Ꮅ") }, + Range { from: 'ꮆ', to: 'ꮆ', mapping: Mapped("Ꮆ") }, + Range { from: 'ꮇ', to: 'ꮇ', mapping: Mapped("Ꮇ") }, + Range { from: 'ꮈ', to: 'ꮈ', mapping: Mapped("Ꮈ") }, + Range { from: 'ꮉ', to: 'ꮉ', mapping: Mapped("Ꮉ") }, + Range { from: 'ꮊ', to: 'ꮊ', mapping: Mapped("Ꮊ") }, + Range { from: 'ꮋ', to: 'ꮋ', mapping: Mapped("Ꮋ") }, + Range { from: 'ꮌ', to: 'ꮌ', mapping: Mapped("Ꮌ") }, + Range { from: 'ꮍ', to: 'ꮍ', mapping: Mapped("Ꮍ") }, + Range { from: 'ꮎ', to: 'ꮎ', mapping: Mapped("Ꮎ") }, + Range { from: 'ꮏ', to: 'ꮏ', mapping: Mapped("Ꮏ") }, + Range { from: 'ꮐ', to: 'ꮐ', mapping: Mapped("Ꮐ") }, + Range { from: 'ꮑ', to: 'ꮑ', mapping: Mapped("Ꮑ") }, + Range { from: 'ꮒ', to: 'ꮒ', mapping: Mapped("Ꮒ") }, + Range { from: 'ꮓ', to: 'ꮓ', mapping: Mapped("Ꮓ") }, + Range { from: 'ꮔ', to: 'ꮔ', mapping: Mapped("Ꮔ") }, + Range { from: 'ꮕ', to: 'ꮕ', mapping: Mapped("Ꮕ") }, + Range { from: 'ꮖ', to: 'ꮖ', mapping: Mapped("Ꮖ") }, + Range { from: 'ꮗ', to: 'ꮗ', mapping: Mapped("Ꮗ") }, + Range { from: 'ꮘ', to: 'ꮘ', mapping: Mapped("Ꮘ") }, + Range { from: 'ꮙ', to: 'ꮙ', mapping: Mapped("Ꮙ") }, + Range { from: 'ꮚ', to: 'ꮚ', mapping: Mapped("Ꮚ") }, + Range { from: 'ꮛ', to: 'ꮛ', mapping: Mapped("Ꮛ") }, + Range { from: 'ꮜ', to: 'ꮜ', mapping: Mapped("Ꮜ") }, + Range { from: 'ꮝ', to: 'ꮝ', mapping: Mapped("Ꮝ") }, + Range { from: 'ꮞ', to: 'ꮞ', mapping: Mapped("Ꮞ") }, + Range { from: 'ꮟ', to: 'ꮟ', mapping: Mapped("Ꮟ") }, + Range { from: 'ꮠ', to: 'ꮠ', mapping: Mapped("Ꮠ") }, + Range { from: 'ꮡ', to: 'ꮡ', mapping: Mapped("Ꮡ") }, + Range { from: 'ꮢ', to: 'ꮢ', mapping: Mapped("Ꮢ") }, + Range { from: 'ꮣ', to: 'ꮣ', mapping: Mapped("Ꮣ") }, + Range { from: 'ꮤ', to: 'ꮤ', mapping: Mapped("Ꮤ") }, + Range { from: 'ꮥ', to: 'ꮥ', mapping: Mapped("Ꮥ") }, + Range { from: 'ꮦ', to: 'ꮦ', mapping: Mapped("Ꮦ") }, + Range { from: 'ꮧ', to: 'ꮧ', mapping: Mapped("Ꮧ") }, + Range { from: 'ꮨ', to: 'ꮨ', mapping: Mapped("Ꮨ") }, + Range { from: 'ꮩ', to: 'ꮩ', mapping: Mapped("Ꮩ") }, + Range { from: 'ꮪ', to: 'ꮪ', mapping: Mapped("Ꮪ") }, + Range { from: 'ꮫ', to: 'ꮫ', mapping: Mapped("Ꮫ") }, + Range { from: 'ꮬ', to: 'ꮬ', mapping: Mapped("Ꮬ") }, + Range { from: 'ꮭ', to: 'ꮭ', mapping: Mapped("Ꮭ") }, + Range { from: 'ꮮ', to: 'ꮮ', mapping: Mapped("Ꮮ") }, + Range { from: 'ꮯ', to: 'ꮯ', mapping: Mapped("Ꮯ") }, + Range { from: 'ꮰ', to: 'ꮰ', mapping: Mapped("Ꮰ") }, + Range { from: 'ꮱ', to: 'ꮱ', mapping: Mapped("Ꮱ") }, + Range { from: 'ꮲ', to: 'ꮲ', mapping: Mapped("Ꮲ") }, + Range { from: 'ꮳ', to: 'ꮳ', mapping: Mapped("Ꮳ") }, + Range { from: 'ꮴ', to: 'ꮴ', mapping: Mapped("Ꮴ") }, + Range { from: 'ꮵ', to: 'ꮵ', mapping: Mapped("Ꮵ") }, + Range { from: 'ꮶ', to: 'ꮶ', mapping: Mapped("Ꮶ") }, + Range { from: 'ꮷ', to: 'ꮷ', mapping: Mapped("Ꮷ") }, + Range { from: 'ꮸ', to: 'ꮸ', mapping: Mapped("Ꮸ") }, + Range { from: 'ꮹ', to: 'ꮹ', mapping: Mapped("Ꮹ") }, + Range { from: 'ꮺ', to: 'ꮺ', mapping: Mapped("Ꮺ") }, + Range { from: 'ꮻ', to: 'ꮻ', mapping: Mapped("Ꮻ") }, + Range { from: 'ꮼ', to: 'ꮼ', mapping: Mapped("Ꮼ") }, + Range { from: 'ꮽ', to: 'ꮽ', mapping: Mapped("Ꮽ") }, + Range { from: 'ꮾ', to: 'ꮾ', mapping: Mapped("Ꮾ") }, + Range { from: 'ꮿ', to: 'ꮿ', mapping: Mapped("Ꮿ") }, + Range { from: 'ꯀ', to: 'ꯪ', mapping: Valid }, + Range { from: '꯫', to: '꯫', mapping: Valid }, + Range { from: '꯬', to: '꯭', mapping: Valid }, + Range { from: '꯮', to: '꯯', mapping: Disallowed }, + Range { from: '꯰', to: '꯹', mapping: Valid }, + Range { from: '꯺', to: '꯿', mapping: Disallowed }, + Range { from: '가', to: '힣', mapping: Valid }, + Range { from: '힤', to: '힯', mapping: Disallowed }, + Range { from: 'ힰ', to: 'ퟆ', mapping: Valid }, + Range { from: '퟇', to: '퟊', mapping: Disallowed }, + Range { from: 'ퟋ', to: 'ퟻ', mapping: Valid }, + Range { from: '퟼', to: '퟿', mapping: Disallowed }, + Range { from: '', to: '', mapping: Disallowed }, + Range { from: '豈', to: '豈', mapping: Mapped("豈") }, + Range { from: '更', to: '更', mapping: Mapped("更") }, + Range { from: '車', to: '車', mapping: Mapped("車") }, + Range { from: '賈', to: '賈', mapping: Mapped("賈") }, + Range { from: '滑', to: '滑', mapping: Mapped("滑") }, + Range { from: '串', to: '串', mapping: Mapped("串") }, + Range { from: '句', to: '句', mapping: Mapped("句") }, + Range { from: '龜', to: '龜', mapping: Mapped("龜") }, + Range { from: '契', to: '契', mapping: Mapped("契") }, + Range { from: '金', to: '金', mapping: Mapped("金") }, + Range { from: '喇', to: '喇', mapping: Mapped("喇") }, + Range { from: '奈', to: '奈', mapping: Mapped("奈") }, + Range { from: '懶', to: '懶', mapping: Mapped("懶") }, + Range { from: '癩', to: '癩', mapping: Mapped("癩") }, + Range { from: '羅', to: '羅', mapping: Mapped("羅") }, + Range { from: '蘿', to: '蘿', mapping: Mapped("蘿") }, + Range { from: '螺', to: '螺', mapping: Mapped("螺") }, + Range { from: '裸', to: '裸', mapping: Mapped("裸") }, + Range { from: '邏', to: '邏', mapping: Mapped("邏") }, + Range { from: '樂', to: '樂', mapping: Mapped("樂") }, + Range { from: '洛', to: '洛', mapping: Mapped("洛") }, + Range { from: '烙', to: '烙', mapping: Mapped("烙") }, + Range { from: '珞', to: '珞', mapping: Mapped("珞") }, + Range { from: '落', to: '落', mapping: Mapped("落") }, + Range { from: '酪', to: '酪', mapping: Mapped("酪") }, + Range { from: '駱', to: '駱', mapping: Mapped("駱") }, + Range { from: '亂', to: '亂', mapping: Mapped("亂") }, + Range { from: '卵', to: '卵', mapping: Mapped("卵") }, + Range { from: '欄', to: '欄', mapping: Mapped("欄") }, + Range { from: '爛', to: '爛', mapping: Mapped("爛") }, + Range { from: '蘭', to: '蘭', mapping: Mapped("蘭") }, + Range { from: '鸞', to: '鸞', mapping: Mapped("鸞") }, + Range { from: '嵐', to: '嵐', mapping: Mapped("嵐") }, + Range { from: '濫', to: '濫', mapping: Mapped("濫") }, + Range { from: '藍', to: '藍', mapping: Mapped("藍") }, + Range { from: '襤', to: '襤', mapping: Mapped("襤") }, + Range { from: '拉', to: '拉', mapping: Mapped("拉") }, + Range { from: '臘', to: '臘', mapping: Mapped("臘") }, + Range { from: '蠟', to: '蠟', mapping: Mapped("蠟") }, + Range { from: '廊', to: '廊', mapping: Mapped("廊") }, + Range { from: '朗', to: '朗', mapping: Mapped("朗") }, + Range { from: '浪', to: '浪', mapping: Mapped("浪") }, + Range { from: '狼', to: '狼', mapping: Mapped("狼") }, + Range { from: '郎', to: '郎', mapping: Mapped("郎") }, + Range { from: '來', to: '來', mapping: Mapped("來") }, + Range { from: '冷', to: '冷', mapping: Mapped("冷") }, + Range { from: '勞', to: '勞', mapping: Mapped("勞") }, + Range { from: '擄', to: '擄', mapping: Mapped("擄") }, + Range { from: '櫓', to: '櫓', mapping: Mapped("櫓") }, + Range { from: '爐', to: '爐', mapping: Mapped("爐") }, + Range { from: '盧', to: '盧', mapping: Mapped("盧") }, + Range { from: '老', to: '老', mapping: Mapped("老") }, + Range { from: '蘆', to: '蘆', mapping: Mapped("蘆") }, + Range { from: '虜', to: '虜', mapping: Mapped("虜") }, + Range { from: '路', to: '路', mapping: Mapped("路") }, + Range { from: '露', to: '露', mapping: Mapped("露") }, + Range { from: '魯', to: '魯', mapping: Mapped("魯") }, + Range { from: '鷺', to: '鷺', mapping: Mapped("鷺") }, + Range { from: '碌', to: '碌', mapping: Mapped("碌") }, + Range { from: '祿', to: '祿', mapping: Mapped("祿") }, + Range { from: '綠', to: '綠', mapping: Mapped("綠") }, + Range { from: '菉', to: '菉', mapping: Mapped("菉") }, + Range { from: '錄', to: '錄', mapping: Mapped("錄") }, + Range { from: '鹿', to: '鹿', mapping: Mapped("鹿") }, + Range { from: '論', to: '論', mapping: Mapped("論") }, + Range { from: '壟', to: '壟', mapping: Mapped("壟") }, + Range { from: '弄', to: '弄', mapping: Mapped("弄") }, + Range { from: '籠', to: '籠', mapping: Mapped("籠") }, + Range { from: '聾', to: '聾', mapping: Mapped("聾") }, + Range { from: '牢', to: '牢', mapping: Mapped("牢") }, + Range { from: '磊', to: '磊', mapping: Mapped("磊") }, + Range { from: '賂', to: '賂', mapping: Mapped("賂") }, + Range { from: '雷', to: '雷', mapping: Mapped("雷") }, + Range { from: '壘', to: '壘', mapping: Mapped("壘") }, + Range { from: '屢', to: '屢', mapping: Mapped("屢") }, + Range { from: '樓', to: '樓', mapping: Mapped("樓") }, + Range { from: '淚', to: '淚', mapping: Mapped("淚") }, + Range { from: '漏', to: '漏', mapping: Mapped("漏") }, + Range { from: '累', to: '累', mapping: Mapped("累") }, + Range { from: '縷', to: '縷', mapping: Mapped("縷") }, + Range { from: '陋', to: '陋', mapping: Mapped("陋") }, + Range { from: '勒', to: '勒', mapping: Mapped("勒") }, + Range { from: '肋', to: '肋', mapping: Mapped("肋") }, + Range { from: '凜', to: '凜', mapping: Mapped("凜") }, + Range { from: '凌', to: '凌', mapping: Mapped("凌") }, + Range { from: '稜', to: '稜', mapping: Mapped("稜") }, + Range { from: '綾', to: '綾', mapping: Mapped("綾") }, + Range { from: '菱', to: '菱', mapping: Mapped("菱") }, + Range { from: '陵', to: '陵', mapping: Mapped("陵") }, + Range { from: '讀', to: '讀', mapping: Mapped("讀") }, + Range { from: '拏', to: '拏', mapping: Mapped("拏") }, + Range { from: '樂', to: '樂', mapping: Mapped("樂") }, + Range { from: '諾', to: '諾', mapping: Mapped("諾") }, + Range { from: '丹', to: '丹', mapping: Mapped("丹") }, + Range { from: '寧', to: '寧', mapping: Mapped("寧") }, + Range { from: '怒', to: '怒', mapping: Mapped("怒") }, + Range { from: '率', to: '率', mapping: Mapped("率") }, + Range { from: '異', to: '異', mapping: Mapped("異") }, + Range { from: '北', to: '北', mapping: Mapped("北") }, + Range { from: '磻', to: '磻', mapping: Mapped("磻") }, + Range { from: '便', to: '便', mapping: Mapped("便") }, + Range { from: '復', to: '復', mapping: Mapped("復") }, + Range { from: '不', to: '不', mapping: Mapped("不") }, + Range { from: '泌', to: '泌', mapping: Mapped("泌") }, + Range { from: '數', to: '數', mapping: Mapped("數") }, + Range { from: '索', to: '索', mapping: Mapped("索") }, + Range { from: '參', to: '參', mapping: Mapped("參") }, + Range { from: '塞', to: '塞', mapping: Mapped("塞") }, + Range { from: '省', to: '省', mapping: Mapped("省") }, + Range { from: '葉', to: '葉', mapping: Mapped("葉") }, + Range { from: '說', to: '說', mapping: Mapped("說") }, + Range { from: '殺', to: '殺', mapping: Mapped("殺") }, + Range { from: '辰', to: '辰', mapping: Mapped("辰") }, + Range { from: '沈', to: '沈', mapping: Mapped("沈") }, + Range { from: '拾', to: '拾', mapping: Mapped("拾") }, + Range { from: '若', to: '若', mapping: Mapped("若") }, + Range { from: '掠', to: '掠', mapping: Mapped("掠") }, + Range { from: '略', to: '略', mapping: Mapped("略") }, + Range { from: '亮', to: '亮', mapping: Mapped("亮") }, + Range { from: '兩', to: '兩', mapping: Mapped("兩") }, + Range { from: '凉', to: '凉', mapping: Mapped("凉") }, + Range { from: '梁', to: '梁', mapping: Mapped("梁") }, + Range { from: '糧', to: '糧', mapping: Mapped("糧") }, + Range { from: '良', to: '良', mapping: Mapped("良") }, + Range { from: '諒', to: '諒', mapping: Mapped("諒") }, + Range { from: '量', to: '量', mapping: Mapped("量") }, + Range { from: '勵', to: '勵', mapping: Mapped("勵") }, + Range { from: '呂', to: '呂', mapping: Mapped("呂") }, + Range { from: '女', to: '女', mapping: Mapped("女") }, + Range { from: '廬', to: '廬', mapping: Mapped("廬") }, + Range { from: '旅', to: '旅', mapping: Mapped("旅") }, + Range { from: '濾', to: '濾', mapping: Mapped("濾") }, + Range { from: '礪', to: '礪', mapping: Mapped("礪") }, + Range { from: '閭', to: '閭', mapping: Mapped("閭") }, + Range { from: '驪', to: '驪', mapping: Mapped("驪") }, + Range { from: '麗', to: '麗', mapping: Mapped("麗") }, + Range { from: '黎', to: '黎', mapping: Mapped("黎") }, + Range { from: '力', to: '力', mapping: Mapped("力") }, + Range { from: '曆', to: '曆', mapping: Mapped("曆") }, + Range { from: '歷', to: '歷', mapping: Mapped("歷") }, + Range { from: '轢', to: '轢', mapping: Mapped("轢") }, + Range { from: '年', to: '年', mapping: Mapped("年") }, + Range { from: '憐', to: '憐', mapping: Mapped("憐") }, + Range { from: '戀', to: '戀', mapping: Mapped("戀") }, + Range { from: '撚', to: '撚', mapping: Mapped("撚") }, + Range { from: '漣', to: '漣', mapping: Mapped("漣") }, + Range { from: '煉', to: '煉', mapping: Mapped("煉") }, + Range { from: '璉', to: '璉', mapping: Mapped("璉") }, + Range { from: '秊', to: '秊', mapping: Mapped("秊") }, + Range { from: '練', to: '練', mapping: Mapped("練") }, + Range { from: '聯', to: '聯', mapping: Mapped("聯") }, + Range { from: '輦', to: '輦', mapping: Mapped("輦") }, + Range { from: '蓮', to: '蓮', mapping: Mapped("蓮") }, + Range { from: '連', to: '連', mapping: Mapped("連") }, + Range { from: '鍊', to: '鍊', mapping: Mapped("鍊") }, + Range { from: '列', to: '列', mapping: Mapped("列") }, + Range { from: '劣', to: '劣', mapping: Mapped("劣") }, + Range { from: '咽', to: '咽', mapping: Mapped("咽") }, + Range { from: '烈', to: '烈', mapping: Mapped("烈") }, + Range { from: '裂', to: '裂', mapping: Mapped("裂") }, + Range { from: '說', to: '說', mapping: Mapped("說") }, + Range { from: '廉', to: '廉', mapping: Mapped("廉") }, + Range { from: '念', to: '念', mapping: Mapped("念") }, + Range { from: '捻', to: '捻', mapping: Mapped("捻") }, + Range { from: '殮', to: '殮', mapping: Mapped("殮") }, + Range { from: '簾', to: '簾', mapping: Mapped("簾") }, + Range { from: '獵', to: '獵', mapping: Mapped("獵") }, + Range { from: '令', to: '令', mapping: Mapped("令") }, + Range { from: '囹', to: '囹', mapping: Mapped("囹") }, + Range { from: '寧', to: '寧', mapping: Mapped("寧") }, + Range { from: '嶺', to: '嶺', mapping: Mapped("嶺") }, + Range { from: '怜', to: '怜', mapping: Mapped("怜") }, + Range { from: '玲', to: '玲', mapping: Mapped("玲") }, + Range { from: '瑩', to: '瑩', mapping: Mapped("瑩") }, + Range { from: '羚', to: '羚', mapping: Mapped("羚") }, + Range { from: '聆', to: '聆', mapping: Mapped("聆") }, + Range { from: '鈴', to: '鈴', mapping: Mapped("鈴") }, + Range { from: '零', to: '零', mapping: Mapped("零") }, + Range { from: '靈', to: '靈', mapping: Mapped("靈") }, + Range { from: '領', to: '領', mapping: Mapped("領") }, + Range { from: '例', to: '例', mapping: Mapped("例") }, + Range { from: '禮', to: '禮', mapping: Mapped("禮") }, + Range { from: '醴', to: '醴', mapping: Mapped("醴") }, + Range { from: '隸', to: '隸', mapping: Mapped("隸") }, + Range { from: '惡', to: '惡', mapping: Mapped("惡") }, + Range { from: '了', to: '了', mapping: Mapped("了") }, + Range { from: '僚', to: '僚', mapping: Mapped("僚") }, + Range { from: '寮', to: '寮', mapping: Mapped("寮") }, + Range { from: '尿', to: '尿', mapping: Mapped("尿") }, + Range { from: '料', to: '料', mapping: Mapped("料") }, + Range { from: '樂', to: '樂', mapping: Mapped("樂") }, + Range { from: '燎', to: '燎', mapping: Mapped("燎") }, + Range { from: '療', to: '療', mapping: Mapped("療") }, + Range { from: '蓼', to: '蓼', mapping: Mapped("蓼") }, + Range { from: '遼', to: '遼', mapping: Mapped("遼") }, + Range { from: '龍', to: '龍', mapping: Mapped("龍") }, + Range { from: '暈', to: '暈', mapping: Mapped("暈") }, + Range { from: '阮', to: '阮', mapping: Mapped("阮") }, + Range { from: '劉', to: '劉', mapping: Mapped("劉") }, + Range { from: '杻', to: '杻', mapping: Mapped("杻") }, + Range { from: '柳', to: '柳', mapping: Mapped("柳") }, + Range { from: '流', to: '流', mapping: Mapped("流") }, + Range { from: '溜', to: '溜', mapping: Mapped("溜") }, + Range { from: '琉', to: '琉', mapping: Mapped("琉") }, + Range { from: '留', to: '留', mapping: Mapped("留") }, + Range { from: '硫', to: '硫', mapping: Mapped("硫") }, + Range { from: '紐', to: '紐', mapping: Mapped("紐") }, + Range { from: '類', to: '類', mapping: Mapped("類") }, + Range { from: '六', to: '六', mapping: Mapped("六") }, + Range { from: '戮', to: '戮', mapping: Mapped("戮") }, + Range { from: '陸', to: '陸', mapping: Mapped("陸") }, + Range { from: '倫', to: '倫', mapping: Mapped("倫") }, + Range { from: '崙', to: '崙', mapping: Mapped("崙") }, + Range { from: '淪', to: '淪', mapping: Mapped("淪") }, + Range { from: '輪', to: '輪', mapping: Mapped("輪") }, + Range { from: '律', to: '律', mapping: Mapped("律") }, + Range { from: '慄', to: '慄', mapping: Mapped("慄") }, + Range { from: '栗', to: '栗', mapping: Mapped("栗") }, + Range { from: '率', to: '率', mapping: Mapped("率") }, + Range { from: '隆', to: '隆', mapping: Mapped("隆") }, + Range { from: '利', to: '利', mapping: Mapped("利") }, + Range { from: '吏', to: '吏', mapping: Mapped("吏") }, + Range { from: '履', to: '履', mapping: Mapped("履") }, + Range { from: '易', to: '易', mapping: Mapped("易") }, + Range { from: '李', to: '李', mapping: Mapped("李") }, + Range { from: '梨', to: '梨', mapping: Mapped("梨") }, + Range { from: '泥', to: '泥', mapping: Mapped("泥") }, + Range { from: '理', to: '理', mapping: Mapped("理") }, + Range { from: '痢', to: '痢', mapping: Mapped("痢") }, + Range { from: '罹', to: '罹', mapping: Mapped("罹") }, + Range { from: '裏', to: '裏', mapping: Mapped("裏") }, + Range { from: '裡', to: '裡', mapping: Mapped("裡") }, + Range { from: '里', to: '里', mapping: Mapped("里") }, + Range { from: '離', to: '離', mapping: Mapped("離") }, + Range { from: '匿', to: '匿', mapping: Mapped("匿") }, + Range { from: '溺', to: '溺', mapping: Mapped("溺") }, + Range { from: '吝', to: '吝', mapping: Mapped("吝") }, + Range { from: '燐', to: '燐', mapping: Mapped("燐") }, + Range { from: '璘', to: '璘', mapping: Mapped("璘") }, + Range { from: '藺', to: '藺', mapping: Mapped("藺") }, + Range { from: '隣', to: '隣', mapping: Mapped("隣") }, + Range { from: '鱗', to: '鱗', mapping: Mapped("鱗") }, + Range { from: '麟', to: '麟', mapping: Mapped("麟") }, + Range { from: '林', to: '林', mapping: Mapped("林") }, + Range { from: '淋', to: '淋', mapping: Mapped("淋") }, + Range { from: '臨', to: '臨', mapping: Mapped("臨") }, + Range { from: '立', to: '立', mapping: Mapped("立") }, + Range { from: '笠', to: '笠', mapping: Mapped("笠") }, + Range { from: '粒', to: '粒', mapping: Mapped("粒") }, + Range { from: '狀', to: '狀', mapping: Mapped("狀") }, + Range { from: '炙', to: '炙', mapping: Mapped("炙") }, + Range { from: '識', to: '識', mapping: Mapped("識") }, + Range { from: '什', to: '什', mapping: Mapped("什") }, + Range { from: '茶', to: '茶', mapping: Mapped("茶") }, + Range { from: '刺', to: '刺', mapping: Mapped("刺") }, + Range { from: '切', to: '切', mapping: Mapped("切") }, + Range { from: '度', to: '度', mapping: Mapped("度") }, + Range { from: '拓', to: '拓', mapping: Mapped("拓") }, + Range { from: '糖', to: '糖', mapping: Mapped("糖") }, + Range { from: '宅', to: '宅', mapping: Mapped("宅") }, + Range { from: '洞', to: '洞', mapping: Mapped("洞") }, + Range { from: '暴', to: '暴', mapping: Mapped("暴") }, + Range { from: '輻', to: '輻', mapping: Mapped("輻") }, + Range { from: '行', to: '行', mapping: Mapped("行") }, + Range { from: '降', to: '降', mapping: Mapped("降") }, + Range { from: '見', to: '見', mapping: Mapped("見") }, + Range { from: '廓', to: '廓', mapping: Mapped("廓") }, + Range { from: '兀', to: '兀', mapping: Mapped("兀") }, + Range { from: '嗀', to: '嗀', mapping: Mapped("嗀") }, + Range { from: '﨎', to: '﨏', mapping: Valid }, + Range { from: '塚', to: '塚', mapping: Mapped("塚") }, + Range { from: '﨑', to: '﨑', mapping: Valid }, + Range { from: '晴', to: '晴', mapping: Mapped("晴") }, + Range { from: '﨓', to: '﨔', mapping: Valid }, + Range { from: '凞', to: '凞', mapping: Mapped("凞") }, + Range { from: '猪', to: '猪', mapping: Mapped("猪") }, + Range { from: '益', to: '益', mapping: Mapped("益") }, + Range { from: '礼', to: '礼', mapping: Mapped("礼") }, + Range { from: '神', to: '神', mapping: Mapped("神") }, + Range { from: '祥', to: '祥', mapping: Mapped("祥") }, + Range { from: '福', to: '福', mapping: Mapped("福") }, + Range { from: '靖', to: '靖', mapping: Mapped("靖") }, + Range { from: '精', to: '精', mapping: Mapped("精") }, + Range { from: '羽', to: '羽', mapping: Mapped("羽") }, + Range { from: '﨟', to: '﨟', mapping: Valid }, + Range { from: '蘒', to: '蘒', mapping: Mapped("蘒") }, + Range { from: '﨡', to: '﨡', mapping: Valid }, + Range { from: '諸', to: '諸', mapping: Mapped("諸") }, + Range { from: '﨣', to: '﨤', mapping: Valid }, + Range { from: '逸', to: '逸', mapping: Mapped("逸") }, + Range { from: '都', to: '都', mapping: Mapped("都") }, + Range { from: '﨧', to: '﨩', mapping: Valid }, + Range { from: '飯', to: '飯', mapping: Mapped("飯") }, + Range { from: '飼', to: '飼', mapping: Mapped("飼") }, + Range { from: '館', to: '館', mapping: Mapped("館") }, + Range { from: '鶴', to: '鶴', mapping: Mapped("鶴") }, + Range { from: '郞', to: '郞', mapping: Mapped("郞") }, + Range { from: '隷', to: '隷', mapping: Mapped("隷") }, + Range { from: '侮', to: '侮', mapping: Mapped("侮") }, + Range { from: '僧', to: '僧', mapping: Mapped("僧") }, + Range { from: '免', to: '免', mapping: Mapped("免") }, + Range { from: '勉', to: '勉', mapping: Mapped("勉") }, + Range { from: '勤', to: '勤', mapping: Mapped("勤") }, + Range { from: '卑', to: '卑', mapping: Mapped("卑") }, + Range { from: '喝', to: '喝', mapping: Mapped("喝") }, + Range { from: '嘆', to: '嘆', mapping: Mapped("嘆") }, + Range { from: '器', to: '器', mapping: Mapped("器") }, + Range { from: '塀', to: '塀', mapping: Mapped("塀") }, + Range { from: '墨', to: '墨', mapping: Mapped("墨") }, + Range { from: '層', to: '層', mapping: Mapped("層") }, + Range { from: '屮', to: '屮', mapping: Mapped("屮") }, + Range { from: '悔', to: '悔', mapping: Mapped("悔") }, + Range { from: '慨', to: '慨', mapping: Mapped("慨") }, + Range { from: '憎', to: '憎', mapping: Mapped("憎") }, + Range { from: '懲', to: '懲', mapping: Mapped("懲") }, + Range { from: '敏', to: '敏', mapping: Mapped("敏") }, + Range { from: '既', to: '既', mapping: Mapped("既") }, + Range { from: '暑', to: '暑', mapping: Mapped("暑") }, + Range { from: '梅', to: '梅', mapping: Mapped("梅") }, + Range { from: '海', to: '海', mapping: Mapped("海") }, + Range { from: '渚', to: '渚', mapping: Mapped("渚") }, + Range { from: '漢', to: '漢', mapping: Mapped("漢") }, + Range { from: '煮', to: '煮', mapping: Mapped("煮") }, + Range { from: '爫', to: '爫', mapping: Mapped("爫") }, + Range { from: '琢', to: '琢', mapping: Mapped("琢") }, + Range { from: '碑', to: '碑', mapping: Mapped("碑") }, + Range { from: '社', to: '社', mapping: Mapped("社") }, + Range { from: '祉', to: '祉', mapping: Mapped("祉") }, + Range { from: '祈', to: '祈', mapping: Mapped("祈") }, + Range { from: '祐', to: '祐', mapping: Mapped("祐") }, + Range { from: '祖', to: '祖', mapping: Mapped("祖") }, + Range { from: '祝', to: '祝', mapping: Mapped("祝") }, + Range { from: '禍', to: '禍', mapping: Mapped("禍") }, + Range { from: '禎', to: '禎', mapping: Mapped("禎") }, + Range { from: '穀', to: '穀', mapping: Mapped("穀") }, + Range { from: '突', to: '突', mapping: Mapped("突") }, + Range { from: '節', to: '節', mapping: Mapped("節") }, + Range { from: '練', to: '練', mapping: Mapped("練") }, + Range { from: '縉', to: '縉', mapping: Mapped("縉") }, + Range { from: '繁', to: '繁', mapping: Mapped("繁") }, + Range { from: '署', to: '署', mapping: Mapped("署") }, + Range { from: '者', to: '者', mapping: Mapped("者") }, + Range { from: '臭', to: '臭', mapping: Mapped("臭") }, + Range { from: '艹', to: '艹', mapping: Mapped("艹") }, + Range { from: '著', to: '著', mapping: Mapped("著") }, + Range { from: '褐', to: '褐', mapping: Mapped("褐") }, + Range { from: '視', to: '視', mapping: Mapped("視") }, + Range { from: '謁', to: '謁', mapping: Mapped("謁") }, + Range { from: '謹', to: '謹', mapping: Mapped("謹") }, + Range { from: '賓', to: '賓', mapping: Mapped("賓") }, + Range { from: '贈', to: '贈', mapping: Mapped("贈") }, + Range { from: '辶', to: '辶', mapping: Mapped("辶") }, + Range { from: '逸', to: '逸', mapping: Mapped("逸") }, + Range { from: '難', to: '難', mapping: Mapped("難") }, + Range { from: '響', to: '響', mapping: Mapped("響") }, + Range { from: '頻', to: '頻', mapping: Mapped("頻") }, + Range { from: '恵', to: '恵', mapping: Mapped("恵") }, + Range { from: '𤋮', to: '𤋮', mapping: Mapped("𤋮") }, + Range { from: '舘', to: '舘', mapping: Mapped("舘") }, + Range { from: '﩮', to: '﩯', mapping: Disallowed }, + Range { from: '並', to: '並', mapping: Mapped("並") }, + Range { from: '况', to: '况', mapping: Mapped("况") }, + Range { from: '全', to: '全', mapping: Mapped("全") }, + Range { from: '侀', to: '侀', mapping: Mapped("侀") }, + Range { from: '充', to: '充', mapping: Mapped("充") }, + Range { from: '冀', to: '冀', mapping: Mapped("冀") }, + Range { from: '勇', to: '勇', mapping: Mapped("勇") }, + Range { from: '勺', to: '勺', mapping: Mapped("勺") }, + Range { from: '喝', to: '喝', mapping: Mapped("喝") }, + Range { from: '啕', to: '啕', mapping: Mapped("啕") }, + Range { from: '喙', to: '喙', mapping: Mapped("喙") }, + Range { from: '嗢', to: '嗢', mapping: Mapped("嗢") }, + Range { from: '塚', to: '塚', mapping: Mapped("塚") }, + Range { from: '墳', to: '墳', mapping: Mapped("墳") }, + Range { from: '奄', to: '奄', mapping: Mapped("奄") }, + Range { from: '奔', to: '奔', mapping: Mapped("奔") }, + Range { from: '婢', to: '婢', mapping: Mapped("婢") }, + Range { from: '嬨', to: '嬨', mapping: Mapped("嬨") }, + Range { from: '廒', to: '廒', mapping: Mapped("廒") }, + Range { from: '廙', to: '廙', mapping: Mapped("廙") }, + Range { from: '彩', to: '彩', mapping: Mapped("彩") }, + Range { from: '徭', to: '徭', mapping: Mapped("徭") }, + Range { from: '惘', to: '惘', mapping: Mapped("惘") }, + Range { from: '慎', to: '慎', mapping: Mapped("慎") }, + Range { from: '愈', to: '愈', mapping: Mapped("愈") }, + Range { from: '憎', to: '憎', mapping: Mapped("憎") }, + Range { from: '慠', to: '慠', mapping: Mapped("慠") }, + Range { from: '懲', to: '懲', mapping: Mapped("懲") }, + Range { from: '戴', to: '戴', mapping: Mapped("戴") }, + Range { from: '揄', to: '揄', mapping: Mapped("揄") }, + Range { from: '搜', to: '搜', mapping: Mapped("搜") }, + Range { from: '摒', to: '摒', mapping: Mapped("摒") }, + Range { from: '敖', to: '敖', mapping: Mapped("敖") }, + Range { from: '晴', to: '晴', mapping: Mapped("晴") }, + Range { from: '朗', to: '朗', mapping: Mapped("朗") }, + Range { from: '望', to: '望', mapping: Mapped("望") }, + Range { from: '杖', to: '杖', mapping: Mapped("杖") }, + Range { from: '歹', to: '歹', mapping: Mapped("歹") }, + Range { from: '殺', to: '殺', mapping: Mapped("殺") }, + Range { from: '流', to: '流', mapping: Mapped("流") }, + Range { from: '滛', to: '滛', mapping: Mapped("滛") }, + Range { from: '滋', to: '滋', mapping: Mapped("滋") }, + Range { from: '漢', to: '漢', mapping: Mapped("漢") }, + Range { from: '瀞', to: '瀞', mapping: Mapped("瀞") }, + Range { from: '煮', to: '煮', mapping: Mapped("煮") }, + Range { from: '瞧', to: '瞧', mapping: Mapped("瞧") }, + Range { from: '爵', to: '爵', mapping: Mapped("爵") }, + Range { from: '犯', to: '犯', mapping: Mapped("犯") }, + Range { from: '猪', to: '猪', mapping: Mapped("猪") }, + Range { from: '瑱', to: '瑱', mapping: Mapped("瑱") }, + Range { from: '甆', to: '甆', mapping: Mapped("甆") }, + Range { from: '画', to: '画', mapping: Mapped("画") }, + Range { from: '瘝', to: '瘝', mapping: Mapped("瘝") }, + Range { from: '瘟', to: '瘟', mapping: Mapped("瘟") }, + Range { from: '益', to: '益', mapping: Mapped("益") }, + Range { from: '盛', to: '盛', mapping: Mapped("盛") }, + Range { from: '直', to: '直', mapping: Mapped("直") }, + Range { from: '睊', to: '睊', mapping: Mapped("睊") }, + Range { from: '着', to: '着', mapping: Mapped("着") }, + Range { from: '磌', to: '磌', mapping: Mapped("磌") }, + Range { from: '窱', to: '窱', mapping: Mapped("窱") }, + Range { from: '節', to: '節', mapping: Mapped("節") }, + Range { from: '类', to: '类', mapping: Mapped("类") }, + Range { from: '絛', to: '絛', mapping: Mapped("絛") }, + Range { from: '練', to: '練', mapping: Mapped("練") }, + Range { from: '缾', to: '缾', mapping: Mapped("缾") }, + Range { from: '者', to: '者', mapping: Mapped("者") }, + Range { from: '荒', to: '荒', mapping: Mapped("荒") }, + Range { from: '華', to: '華', mapping: Mapped("華") }, + Range { from: '蝹', to: '蝹', mapping: Mapped("蝹") }, + Range { from: '襁', to: '襁', mapping: Mapped("襁") }, + Range { from: '覆', to: '覆', mapping: Mapped("覆") }, + Range { from: '視', to: '視', mapping: Mapped("視") }, + Range { from: '調', to: '調', mapping: Mapped("調") }, + Range { from: '諸', to: '諸', mapping: Mapped("諸") }, + Range { from: '請', to: '請', mapping: Mapped("請") }, + Range { from: '謁', to: '謁', mapping: Mapped("謁") }, + Range { from: '諾', to: '諾', mapping: Mapped("諾") }, + Range { from: '諭', to: '諭', mapping: Mapped("諭") }, + Range { from: '謹', to: '謹', mapping: Mapped("謹") }, + Range { from: '變', to: '變', mapping: Mapped("變") }, + Range { from: '贈', to: '贈', mapping: Mapped("贈") }, + Range { from: '輸', to: '輸', mapping: Mapped("輸") }, + Range { from: '遲', to: '遲', mapping: Mapped("遲") }, + Range { from: '醙', to: '醙', mapping: Mapped("醙") }, + Range { from: '鉶', to: '鉶', mapping: Mapped("鉶") }, + Range { from: '陼', to: '陼', mapping: Mapped("陼") }, + Range { from: '難', to: '難', mapping: Mapped("難") }, + Range { from: '靖', to: '靖', mapping: Mapped("靖") }, + Range { from: '韛', to: '韛', mapping: Mapped("韛") }, + Range { from: '響', to: '響', mapping: Mapped("響") }, + Range { from: '頋', to: '頋', mapping: Mapped("頋") }, + Range { from: '頻', to: '頻', mapping: Mapped("頻") }, + Range { from: '鬒', to: '鬒', mapping: Mapped("鬒") }, + Range { from: '龜', to: '龜', mapping: Mapped("龜") }, + Range { from: '𢡊', to: '𢡊', mapping: Mapped("𢡊") }, + Range { from: '𢡄', to: '𢡄', mapping: Mapped("𢡄") }, + Range { from: '𣏕', to: '𣏕', mapping: Mapped("𣏕") }, + Range { from: '㮝', to: '㮝', mapping: Mapped("㮝") }, + Range { from: '䀘', to: '䀘', mapping: Mapped("䀘") }, + Range { from: '䀹', to: '䀹', mapping: Mapped("䀹") }, + Range { from: '𥉉', to: '𥉉', mapping: Mapped("𥉉") }, + Range { from: '𥳐', to: '𥳐', mapping: Mapped("𥳐") }, + Range { from: '𧻓', to: '𧻓', mapping: Mapped("𧻓") }, + Range { from: '齃', to: '齃', mapping: Mapped("齃") }, + Range { from: '龎', to: '龎', mapping: Mapped("龎") }, + Range { from: '﫚', to: '﫿', mapping: Disallowed }, + Range { from: 'ff', to: 'ff', mapping: Mapped("ff") }, + Range { from: 'fi', to: 'fi', mapping: Mapped("fi") }, + Range { from: 'fl', to: 'fl', mapping: Mapped("fl") }, + Range { from: 'ffi', to: 'ffi', mapping: Mapped("ffi") }, + Range { from: 'ffl', to: 'ffl', mapping: Mapped("ffl") }, + Range { from: 'ſt', to: 'st', mapping: Mapped("st") }, + Range { from: '﬇', to: '﬒', mapping: Disallowed }, + Range { from: 'ﬓ', to: 'ﬓ', mapping: Mapped("մն") }, + Range { from: 'ﬔ', to: 'ﬔ', mapping: Mapped("մե") }, + Range { from: 'ﬕ', to: 'ﬕ', mapping: Mapped("մի") }, + Range { from: 'ﬖ', to: 'ﬖ', mapping: Mapped("վն") }, + Range { from: 'ﬗ', to: 'ﬗ', mapping: Mapped("մխ") }, + Range { from: '﬘', to: '﬜', mapping: Disallowed }, + Range { from: 'יִ', to: 'יִ', mapping: Mapped("יִ") }, + Range { from: 'ﬞ', to: 'ﬞ', mapping: Valid }, + Range { from: 'ײַ', to: 'ײַ', mapping: Mapped("ײַ") }, + Range { from: 'ﬠ', to: 'ﬠ', mapping: Mapped("ע") }, + Range { from: 'ﬡ', to: 'ﬡ', mapping: Mapped("א") }, + Range { from: 'ﬢ', to: 'ﬢ', mapping: Mapped("ד") }, + Range { from: 'ﬣ', to: 'ﬣ', mapping: Mapped("ה") }, + Range { from: 'ﬤ', to: 'ﬤ', mapping: Mapped("כ") }, + Range { from: 'ﬥ', to: 'ﬥ', mapping: Mapped("ל") }, + Range { from: 'ﬦ', to: 'ﬦ', mapping: Mapped("ם") }, + Range { from: 'ﬧ', to: 'ﬧ', mapping: Mapped("ר") }, + Range { from: 'ﬨ', to: 'ﬨ', mapping: Mapped("ת") }, + Range { from: '﬩', to: '﬩', mapping: DisallowedStd3Mapped("+") }, + Range { from: 'שׁ', to: 'שׁ', mapping: Mapped("שׁ") }, + Range { from: 'שׂ', to: 'שׂ', mapping: Mapped("שׂ") }, + Range { from: 'שּׁ', to: 'שּׁ', mapping: Mapped("שּׁ") }, + Range { from: 'שּׂ', to: 'שּׂ', mapping: Mapped("שּׂ") }, + Range { from: 'אַ', to: 'אַ', mapping: Mapped("אַ") }, + Range { from: 'אָ', to: 'אָ', mapping: Mapped("אָ") }, + Range { from: 'אּ', to: 'אּ', mapping: Mapped("אּ") }, + Range { from: 'בּ', to: 'בּ', mapping: Mapped("בּ") }, + Range { from: 'גּ', to: 'גּ', mapping: Mapped("גּ") }, + Range { from: 'דּ', to: 'דּ', mapping: Mapped("דּ") }, + Range { from: 'הּ', to: 'הּ', mapping: Mapped("הּ") }, + Range { from: 'וּ', to: 'וּ', mapping: Mapped("וּ") }, + Range { from: 'זּ', to: 'זּ', mapping: Mapped("זּ") }, + Range { from: '﬷', to: '﬷', mapping: Disallowed }, + Range { from: 'טּ', to: 'טּ', mapping: Mapped("טּ") }, + Range { from: 'יּ', to: 'יּ', mapping: Mapped("יּ") }, + Range { from: 'ךּ', to: 'ךּ', mapping: Mapped("ךּ") }, + Range { from: 'כּ', to: 'כּ', mapping: Mapped("כּ") }, + Range { from: 'לּ', to: 'לּ', mapping: Mapped("לּ") }, + Range { from: '﬽', to: '﬽', mapping: Disallowed }, + Range { from: 'מּ', to: 'מּ', mapping: Mapped("מּ") }, + Range { from: '﬿', to: '﬿', mapping: Disallowed }, + Range { from: 'נּ', to: 'נּ', mapping: Mapped("נּ") }, + Range { from: 'סּ', to: 'סּ', mapping: Mapped("סּ") }, + Range { from: '﭂', to: '﭂', mapping: Disallowed }, + Range { from: 'ףּ', to: 'ףּ', mapping: Mapped("ףּ") }, + Range { from: 'פּ', to: 'פּ', mapping: Mapped("פּ") }, + Range { from: '﭅', to: '﭅', mapping: Disallowed }, + Range { from: 'צּ', to: 'צּ', mapping: Mapped("צּ") }, + Range { from: 'קּ', to: 'קּ', mapping: Mapped("קּ") }, + Range { from: 'רּ', to: 'רּ', mapping: Mapped("רּ") }, + Range { from: 'שּ', to: 'שּ', mapping: Mapped("שּ") }, + Range { from: 'תּ', to: 'תּ', mapping: Mapped("תּ") }, + Range { from: 'וֹ', to: 'וֹ', mapping: Mapped("וֹ") }, + Range { from: 'בֿ', to: 'בֿ', mapping: Mapped("בֿ") }, + Range { from: 'כֿ', to: 'כֿ', mapping: Mapped("כֿ") }, + Range { from: 'פֿ', to: 'פֿ', mapping: Mapped("פֿ") }, + Range { from: 'ﭏ', to: 'ﭏ', mapping: Mapped("אל") }, + Range { from: 'ﭐ', to: 'ﭑ', mapping: Mapped("ٱ") }, + Range { from: 'ﭒ', to: 'ﭕ', mapping: Mapped("ٻ") }, + Range { from: 'ﭖ', to: 'ﭙ', mapping: Mapped("پ") }, + Range { from: 'ﭚ', to: 'ﭝ', mapping: Mapped("ڀ") }, + Range { from: 'ﭞ', to: 'ﭡ', mapping: Mapped("ٺ") }, + Range { from: 'ﭢ', to: 'ﭥ', mapping: Mapped("ٿ") }, + Range { from: 'ﭦ', to: 'ﭩ', mapping: Mapped("ٹ") }, + Range { from: 'ﭪ', to: 'ﭭ', mapping: Mapped("ڤ") }, + Range { from: 'ﭮ', to: 'ﭱ', mapping: Mapped("ڦ") }, + Range { from: 'ﭲ', to: 'ﭵ', mapping: Mapped("ڄ") }, + Range { from: 'ﭶ', to: 'ﭹ', mapping: Mapped("ڃ") }, + Range { from: 'ﭺ', to: 'ﭽ', mapping: Mapped("چ") }, + Range { from: 'ﭾ', to: 'ﮁ', mapping: Mapped("ڇ") }, + Range { from: 'ﮂ', to: 'ﮃ', mapping: Mapped("ڍ") }, + Range { from: 'ﮄ', to: 'ﮅ', mapping: Mapped("ڌ") }, + Range { from: 'ﮆ', to: 'ﮇ', mapping: Mapped("ڎ") }, + Range { from: 'ﮈ', to: 'ﮉ', mapping: Mapped("ڈ") }, + Range { from: 'ﮊ', to: 'ﮋ', mapping: Mapped("ژ") }, + Range { from: 'ﮌ', to: 'ﮍ', mapping: Mapped("ڑ") }, + Range { from: 'ﮎ', to: 'ﮑ', mapping: Mapped("ک") }, + Range { from: 'ﮒ', to: 'ﮕ', mapping: Mapped("گ") }, + Range { from: 'ﮖ', to: 'ﮙ', mapping: Mapped("ڳ") }, + Range { from: 'ﮚ', to: 'ﮝ', mapping: Mapped("ڱ") }, + Range { from: 'ﮞ', to: 'ﮟ', mapping: Mapped("ں") }, + Range { from: 'ﮠ', to: 'ﮣ', mapping: Mapped("ڻ") }, + Range { from: 'ﮤ', to: 'ﮥ', mapping: Mapped("ۀ") }, + Range { from: 'ﮦ', to: 'ﮩ', mapping: Mapped("ہ") }, + Range { from: 'ﮪ', to: 'ﮭ', mapping: Mapped("ھ") }, + Range { from: 'ﮮ', to: 'ﮯ', mapping: Mapped("ے") }, + Range { from: 'ﮰ', to: 'ﮱ', mapping: Mapped("ۓ") }, + Range { from: '﮲', to: '﯁', mapping: Valid }, + Range { from: '﯂', to: '﯒', mapping: Disallowed }, + Range { from: 'ﯓ', to: 'ﯖ', mapping: Mapped("ڭ") }, + Range { from: 'ﯗ', to: 'ﯘ', mapping: Mapped("ۇ") }, + Range { from: 'ﯙ', to: 'ﯚ', mapping: Mapped("ۆ") }, + Range { from: 'ﯛ', to: 'ﯜ', mapping: Mapped("ۈ") }, + Range { from: 'ﯝ', to: 'ﯝ', mapping: Mapped("ۇٴ") }, + Range { from: 'ﯞ', to: 'ﯟ', mapping: Mapped("ۋ") }, + Range { from: 'ﯠ', to: 'ﯡ', mapping: Mapped("ۅ") }, + Range { from: 'ﯢ', to: 'ﯣ', mapping: Mapped("ۉ") }, + Range { from: 'ﯤ', to: 'ﯧ', mapping: Mapped("ې") }, + Range { from: 'ﯨ', to: 'ﯩ', mapping: Mapped("ى") }, + Range { from: 'ﯪ', to: 'ﯫ', mapping: Mapped("ئا") }, + Range { from: 'ﯬ', to: 'ﯭ', mapping: Mapped("ئە") }, + Range { from: 'ﯮ', to: 'ﯯ', mapping: Mapped("ئو") }, + Range { from: 'ﯰ', to: 'ﯱ', mapping: Mapped("ئۇ") }, + Range { from: 'ﯲ', to: 'ﯳ', mapping: Mapped("ئۆ") }, + Range { from: 'ﯴ', to: 'ﯵ', mapping: Mapped("ئۈ") }, + Range { from: 'ﯶ', to: 'ﯸ', mapping: Mapped("ئې") }, + Range { from: 'ﯹ', to: 'ﯻ', mapping: Mapped("ئى") }, + Range { from: 'ﯼ', to: 'ﯿ', mapping: Mapped("ی") }, + Range { from: 'ﰀ', to: 'ﰀ', mapping: Mapped("ئج") }, + Range { from: 'ﰁ', to: 'ﰁ', mapping: Mapped("ئح") }, + Range { from: 'ﰂ', to: 'ﰂ', mapping: Mapped("ئم") }, + Range { from: 'ﰃ', to: 'ﰃ', mapping: Mapped("ئى") }, + Range { from: 'ﰄ', to: 'ﰄ', mapping: Mapped("ئي") }, + Range { from: 'ﰅ', to: 'ﰅ', mapping: Mapped("بج") }, + Range { from: 'ﰆ', to: 'ﰆ', mapping: Mapped("بح") }, + Range { from: 'ﰇ', to: 'ﰇ', mapping: Mapped("بخ") }, + Range { from: 'ﰈ', to: 'ﰈ', mapping: Mapped("بم") }, + Range { from: 'ﰉ', to: 'ﰉ', mapping: Mapped("بى") }, + Range { from: 'ﰊ', to: 'ﰊ', mapping: Mapped("بي") }, + Range { from: 'ﰋ', to: 'ﰋ', mapping: Mapped("تج") }, + Range { from: 'ﰌ', to: 'ﰌ', mapping: Mapped("تح") }, + Range { from: 'ﰍ', to: 'ﰍ', mapping: Mapped("تخ") }, + Range { from: 'ﰎ', to: 'ﰎ', mapping: Mapped("تم") }, + Range { from: 'ﰏ', to: 'ﰏ', mapping: Mapped("تى") }, + Range { from: 'ﰐ', to: 'ﰐ', mapping: Mapped("تي") }, + Range { from: 'ﰑ', to: 'ﰑ', mapping: Mapped("ثج") }, + Range { from: 'ﰒ', to: 'ﰒ', mapping: Mapped("ثم") }, + Range { from: 'ﰓ', to: 'ﰓ', mapping: Mapped("ثى") }, + Range { from: 'ﰔ', to: 'ﰔ', mapping: Mapped("ثي") }, + Range { from: 'ﰕ', to: 'ﰕ', mapping: Mapped("جح") }, + Range { from: 'ﰖ', to: 'ﰖ', mapping: Mapped("جم") }, + Range { from: 'ﰗ', to: 'ﰗ', mapping: Mapped("حج") }, + Range { from: 'ﰘ', to: 'ﰘ', mapping: Mapped("حم") }, + Range { from: 'ﰙ', to: 'ﰙ', mapping: Mapped("خج") }, + Range { from: 'ﰚ', to: 'ﰚ', mapping: Mapped("خح") }, + Range { from: 'ﰛ', to: 'ﰛ', mapping: Mapped("خم") }, + Range { from: 'ﰜ', to: 'ﰜ', mapping: Mapped("سج") }, + Range { from: 'ﰝ', to: 'ﰝ', mapping: Mapped("سح") }, + Range { from: 'ﰞ', to: 'ﰞ', mapping: Mapped("سخ") }, + Range { from: 'ﰟ', to: 'ﰟ', mapping: Mapped("سم") }, + Range { from: 'ﰠ', to: 'ﰠ', mapping: Mapped("صح") }, + Range { from: 'ﰡ', to: 'ﰡ', mapping: Mapped("صم") }, + Range { from: 'ﰢ', to: 'ﰢ', mapping: Mapped("ضج") }, + Range { from: 'ﰣ', to: 'ﰣ', mapping: Mapped("ضح") }, + Range { from: 'ﰤ', to: 'ﰤ', mapping: Mapped("ضخ") }, + Range { from: 'ﰥ', to: 'ﰥ', mapping: Mapped("ضم") }, + Range { from: 'ﰦ', to: 'ﰦ', mapping: Mapped("طح") }, + Range { from: 'ﰧ', to: 'ﰧ', mapping: Mapped("طم") }, + Range { from: 'ﰨ', to: 'ﰨ', mapping: Mapped("ظم") }, + Range { from: 'ﰩ', to: 'ﰩ', mapping: Mapped("عج") }, + Range { from: 'ﰪ', to: 'ﰪ', mapping: Mapped("عم") }, + Range { from: 'ﰫ', to: 'ﰫ', mapping: Mapped("غج") }, + Range { from: 'ﰬ', to: 'ﰬ', mapping: Mapped("غم") }, + Range { from: 'ﰭ', to: 'ﰭ', mapping: Mapped("فج") }, + Range { from: 'ﰮ', to: 'ﰮ', mapping: Mapped("فح") }, + Range { from: 'ﰯ', to: 'ﰯ', mapping: Mapped("فخ") }, + Range { from: 'ﰰ', to: 'ﰰ', mapping: Mapped("فم") }, + Range { from: 'ﰱ', to: 'ﰱ', mapping: Mapped("فى") }, + Range { from: 'ﰲ', to: 'ﰲ', mapping: Mapped("في") }, + Range { from: 'ﰳ', to: 'ﰳ', mapping: Mapped("قح") }, + Range { from: 'ﰴ', to: 'ﰴ', mapping: Mapped("قم") }, + Range { from: 'ﰵ', to: 'ﰵ', mapping: Mapped("قى") }, + Range { from: 'ﰶ', to: 'ﰶ', mapping: Mapped("قي") }, + Range { from: 'ﰷ', to: 'ﰷ', mapping: Mapped("كا") }, + Range { from: 'ﰸ', to: 'ﰸ', mapping: Mapped("كج") }, + Range { from: 'ﰹ', to: 'ﰹ', mapping: Mapped("كح") }, + Range { from: 'ﰺ', to: 'ﰺ', mapping: Mapped("كخ") }, + Range { from: 'ﰻ', to: 'ﰻ', mapping: Mapped("كل") }, + Range { from: 'ﰼ', to: 'ﰼ', mapping: Mapped("كم") }, + Range { from: 'ﰽ', to: 'ﰽ', mapping: Mapped("كى") }, + Range { from: 'ﰾ', to: 'ﰾ', mapping: Mapped("كي") }, + Range { from: 'ﰿ', to: 'ﰿ', mapping: Mapped("لج") }, + Range { from: 'ﱀ', to: 'ﱀ', mapping: Mapped("لح") }, + Range { from: 'ﱁ', to: 'ﱁ', mapping: Mapped("لخ") }, + Range { from: 'ﱂ', to: 'ﱂ', mapping: Mapped("لم") }, + Range { from: 'ﱃ', to: 'ﱃ', mapping: Mapped("لى") }, + Range { from: 'ﱄ', to: 'ﱄ', mapping: Mapped("لي") }, + Range { from: 'ﱅ', to: 'ﱅ', mapping: Mapped("مج") }, + Range { from: 'ﱆ', to: 'ﱆ', mapping: Mapped("مح") }, + Range { from: 'ﱇ', to: 'ﱇ', mapping: Mapped("مخ") }, + Range { from: 'ﱈ', to: 'ﱈ', mapping: Mapped("مم") }, + Range { from: 'ﱉ', to: 'ﱉ', mapping: Mapped("مى") }, + Range { from: 'ﱊ', to: 'ﱊ', mapping: Mapped("مي") }, + Range { from: 'ﱋ', to: 'ﱋ', mapping: Mapped("نج") }, + Range { from: 'ﱌ', to: 'ﱌ', mapping: Mapped("نح") }, + Range { from: 'ﱍ', to: 'ﱍ', mapping: Mapped("نخ") }, + Range { from: 'ﱎ', to: 'ﱎ', mapping: Mapped("نم") }, + Range { from: 'ﱏ', to: 'ﱏ', mapping: Mapped("نى") }, + Range { from: 'ﱐ', to: 'ﱐ', mapping: Mapped("ني") }, + Range { from: 'ﱑ', to: 'ﱑ', mapping: Mapped("هج") }, + Range { from: 'ﱒ', to: 'ﱒ', mapping: Mapped("هم") }, + Range { from: 'ﱓ', to: 'ﱓ', mapping: Mapped("هى") }, + Range { from: 'ﱔ', to: 'ﱔ', mapping: Mapped("هي") }, + Range { from: 'ﱕ', to: 'ﱕ', mapping: Mapped("يج") }, + Range { from: 'ﱖ', to: 'ﱖ', mapping: Mapped("يح") }, + Range { from: 'ﱗ', to: 'ﱗ', mapping: Mapped("يخ") }, + Range { from: 'ﱘ', to: 'ﱘ', mapping: Mapped("يم") }, + Range { from: 'ﱙ', to: 'ﱙ', mapping: Mapped("يى") }, + Range { from: 'ﱚ', to: 'ﱚ', mapping: Mapped("يي") }, + Range { from: 'ﱛ', to: 'ﱛ', mapping: Mapped("ذٰ") }, + Range { from: 'ﱜ', to: 'ﱜ', mapping: Mapped("رٰ") }, + Range { from: 'ﱝ', to: 'ﱝ', mapping: Mapped("ىٰ") }, + Range { from: 'ﱞ', to: 'ﱞ', mapping: DisallowedStd3Mapped(" ٌّ") }, + Range { from: 'ﱟ', to: 'ﱟ', mapping: DisallowedStd3Mapped(" ٍّ") }, + Range { from: 'ﱠ', to: 'ﱠ', mapping: DisallowedStd3Mapped(" َّ") }, + Range { from: 'ﱡ', to: 'ﱡ', mapping: DisallowedStd3Mapped(" ُّ") }, + Range { from: 'ﱢ', to: 'ﱢ', mapping: DisallowedStd3Mapped(" ِّ") }, + Range { from: 'ﱣ', to: 'ﱣ', mapping: DisallowedStd3Mapped(" ّٰ") }, + Range { from: 'ﱤ', to: 'ﱤ', mapping: Mapped("ئر") }, + Range { from: 'ﱥ', to: 'ﱥ', mapping: Mapped("ئز") }, + Range { from: 'ﱦ', to: 'ﱦ', mapping: Mapped("ئم") }, + Range { from: 'ﱧ', to: 'ﱧ', mapping: Mapped("ئن") }, + Range { from: 'ﱨ', to: 'ﱨ', mapping: Mapped("ئى") }, + Range { from: 'ﱩ', to: 'ﱩ', mapping: Mapped("ئي") }, + Range { from: 'ﱪ', to: 'ﱪ', mapping: Mapped("بر") }, + Range { from: 'ﱫ', to: 'ﱫ', mapping: Mapped("بز") }, + Range { from: 'ﱬ', to: 'ﱬ', mapping: Mapped("بم") }, + Range { from: 'ﱭ', to: 'ﱭ', mapping: Mapped("بن") }, + Range { from: 'ﱮ', to: 'ﱮ', mapping: Mapped("بى") }, + Range { from: 'ﱯ', to: 'ﱯ', mapping: Mapped("بي") }, + Range { from: 'ﱰ', to: 'ﱰ', mapping: Mapped("تر") }, + Range { from: 'ﱱ', to: 'ﱱ', mapping: Mapped("تز") }, + Range { from: 'ﱲ', to: 'ﱲ', mapping: Mapped("تم") }, + Range { from: 'ﱳ', to: 'ﱳ', mapping: Mapped("تن") }, + Range { from: 'ﱴ', to: 'ﱴ', mapping: Mapped("تى") }, + Range { from: 'ﱵ', to: 'ﱵ', mapping: Mapped("تي") }, + Range { from: 'ﱶ', to: 'ﱶ', mapping: Mapped("ثر") }, + Range { from: 'ﱷ', to: 'ﱷ', mapping: Mapped("ثز") }, + Range { from: 'ﱸ', to: 'ﱸ', mapping: Mapped("ثم") }, + Range { from: 'ﱹ', to: 'ﱹ', mapping: Mapped("ثن") }, + Range { from: 'ﱺ', to: 'ﱺ', mapping: Mapped("ثى") }, + Range { from: 'ﱻ', to: 'ﱻ', mapping: Mapped("ثي") }, + Range { from: 'ﱼ', to: 'ﱼ', mapping: Mapped("فى") }, + Range { from: 'ﱽ', to: 'ﱽ', mapping: Mapped("في") }, + Range { from: 'ﱾ', to: 'ﱾ', mapping: Mapped("قى") }, + Range { from: 'ﱿ', to: 'ﱿ', mapping: Mapped("قي") }, + Range { from: 'ﲀ', to: 'ﲀ', mapping: Mapped("كا") }, + Range { from: 'ﲁ', to: 'ﲁ', mapping: Mapped("كل") }, + Range { from: 'ﲂ', to: 'ﲂ', mapping: Mapped("كم") }, + Range { from: 'ﲃ', to: 'ﲃ', mapping: Mapped("كى") }, + Range { from: 'ﲄ', to: 'ﲄ', mapping: Mapped("كي") }, + Range { from: 'ﲅ', to: 'ﲅ', mapping: Mapped("لم") }, + Range { from: 'ﲆ', to: 'ﲆ', mapping: Mapped("لى") }, + Range { from: 'ﲇ', to: 'ﲇ', mapping: Mapped("لي") }, + Range { from: 'ﲈ', to: 'ﲈ', mapping: Mapped("ما") }, + Range { from: 'ﲉ', to: 'ﲉ', mapping: Mapped("مم") }, + Range { from: 'ﲊ', to: 'ﲊ', mapping: Mapped("نر") }, + Range { from: 'ﲋ', to: 'ﲋ', mapping: Mapped("نز") }, + Range { from: 'ﲌ', to: 'ﲌ', mapping: Mapped("نم") }, + Range { from: 'ﲍ', to: 'ﲍ', mapping: Mapped("نن") }, + Range { from: 'ﲎ', to: 'ﲎ', mapping: Mapped("نى") }, + Range { from: 'ﲏ', to: 'ﲏ', mapping: Mapped("ني") }, + Range { from: 'ﲐ', to: 'ﲐ', mapping: Mapped("ىٰ") }, + Range { from: 'ﲑ', to: 'ﲑ', mapping: Mapped("ير") }, + Range { from: 'ﲒ', to: 'ﲒ', mapping: Mapped("يز") }, + Range { from: 'ﲓ', to: 'ﲓ', mapping: Mapped("يم") }, + Range { from: 'ﲔ', to: 'ﲔ', mapping: Mapped("ين") }, + Range { from: 'ﲕ', to: 'ﲕ', mapping: Mapped("يى") }, + Range { from: 'ﲖ', to: 'ﲖ', mapping: Mapped("يي") }, + Range { from: 'ﲗ', to: 'ﲗ', mapping: Mapped("ئج") }, + Range { from: 'ﲘ', to: 'ﲘ', mapping: Mapped("ئح") }, + Range { from: 'ﲙ', to: 'ﲙ', mapping: Mapped("ئخ") }, + Range { from: 'ﲚ', to: 'ﲚ', mapping: Mapped("ئم") }, + Range { from: 'ﲛ', to: 'ﲛ', mapping: Mapped("ئه") }, + Range { from: 'ﲜ', to: 'ﲜ', mapping: Mapped("بج") }, + Range { from: 'ﲝ', to: 'ﲝ', mapping: Mapped("بح") }, + Range { from: 'ﲞ', to: 'ﲞ', mapping: Mapped("بخ") }, + Range { from: 'ﲟ', to: 'ﲟ', mapping: Mapped("بم") }, + Range { from: 'ﲠ', to: 'ﲠ', mapping: Mapped("به") }, + Range { from: 'ﲡ', to: 'ﲡ', mapping: Mapped("تج") }, + Range { from: 'ﲢ', to: 'ﲢ', mapping: Mapped("تح") }, + Range { from: 'ﲣ', to: 'ﲣ', mapping: Mapped("تخ") }, + Range { from: 'ﲤ', to: 'ﲤ', mapping: Mapped("تم") }, + Range { from: 'ﲥ', to: 'ﲥ', mapping: Mapped("ته") }, + Range { from: 'ﲦ', to: 'ﲦ', mapping: Mapped("ثم") }, + Range { from: 'ﲧ', to: 'ﲧ', mapping: Mapped("جح") }, + Range { from: 'ﲨ', to: 'ﲨ', mapping: Mapped("جم") }, + Range { from: 'ﲩ', to: 'ﲩ', mapping: Mapped("حج") }, + Range { from: 'ﲪ', to: 'ﲪ', mapping: Mapped("حم") }, + Range { from: 'ﲫ', to: 'ﲫ', mapping: Mapped("خج") }, + Range { from: 'ﲬ', to: 'ﲬ', mapping: Mapped("خم") }, + Range { from: 'ﲭ', to: 'ﲭ', mapping: Mapped("سج") }, + Range { from: 'ﲮ', to: 'ﲮ', mapping: Mapped("سح") }, + Range { from: 'ﲯ', to: 'ﲯ', mapping: Mapped("سخ") }, + Range { from: 'ﲰ', to: 'ﲰ', mapping: Mapped("سم") }, + Range { from: 'ﲱ', to: 'ﲱ', mapping: Mapped("صح") }, + Range { from: 'ﲲ', to: 'ﲲ', mapping: Mapped("صخ") }, + Range { from: 'ﲳ', to: 'ﲳ', mapping: Mapped("صم") }, + Range { from: 'ﲴ', to: 'ﲴ', mapping: Mapped("ضج") }, + Range { from: 'ﲵ', to: 'ﲵ', mapping: Mapped("ضح") }, + Range { from: 'ﲶ', to: 'ﲶ', mapping: Mapped("ضخ") }, + Range { from: 'ﲷ', to: 'ﲷ', mapping: Mapped("ضم") }, + Range { from: 'ﲸ', to: 'ﲸ', mapping: Mapped("طح") }, + Range { from: 'ﲹ', to: 'ﲹ', mapping: Mapped("ظم") }, + Range { from: 'ﲺ', to: 'ﲺ', mapping: Mapped("عج") }, + Range { from: 'ﲻ', to: 'ﲻ', mapping: Mapped("عم") }, + Range { from: 'ﲼ', to: 'ﲼ', mapping: Mapped("غج") }, + Range { from: 'ﲽ', to: 'ﲽ', mapping: Mapped("غم") }, + Range { from: 'ﲾ', to: 'ﲾ', mapping: Mapped("فج") }, + Range { from: 'ﲿ', to: 'ﲿ', mapping: Mapped("فح") }, + Range { from: 'ﳀ', to: 'ﳀ', mapping: Mapped("فخ") }, + Range { from: 'ﳁ', to: 'ﳁ', mapping: Mapped("فم") }, + Range { from: 'ﳂ', to: 'ﳂ', mapping: Mapped("قح") }, + Range { from: 'ﳃ', to: 'ﳃ', mapping: Mapped("قم") }, + Range { from: 'ﳄ', to: 'ﳄ', mapping: Mapped("كج") }, + Range { from: 'ﳅ', to: 'ﳅ', mapping: Mapped("كح") }, + Range { from: 'ﳆ', to: 'ﳆ', mapping: Mapped("كخ") }, + Range { from: 'ﳇ', to: 'ﳇ', mapping: Mapped("كل") }, + Range { from: 'ﳈ', to: 'ﳈ', mapping: Mapped("كم") }, + Range { from: 'ﳉ', to: 'ﳉ', mapping: Mapped("لج") }, + Range { from: 'ﳊ', to: 'ﳊ', mapping: Mapped("لح") }, + Range { from: 'ﳋ', to: 'ﳋ', mapping: Mapped("لخ") }, + Range { from: 'ﳌ', to: 'ﳌ', mapping: Mapped("لم") }, + Range { from: 'ﳍ', to: 'ﳍ', mapping: Mapped("له") }, + Range { from: 'ﳎ', to: 'ﳎ', mapping: Mapped("مج") }, + Range { from: 'ﳏ', to: 'ﳏ', mapping: Mapped("مح") }, + Range { from: 'ﳐ', to: 'ﳐ', mapping: Mapped("مخ") }, + Range { from: 'ﳑ', to: 'ﳑ', mapping: Mapped("مم") }, + Range { from: 'ﳒ', to: 'ﳒ', mapping: Mapped("نج") }, + Range { from: 'ﳓ', to: 'ﳓ', mapping: Mapped("نح") }, + Range { from: 'ﳔ', to: 'ﳔ', mapping: Mapped("نخ") }, + Range { from: 'ﳕ', to: 'ﳕ', mapping: Mapped("نم") }, + Range { from: 'ﳖ', to: 'ﳖ', mapping: Mapped("نه") }, + Range { from: 'ﳗ', to: 'ﳗ', mapping: Mapped("هج") }, + Range { from: 'ﳘ', to: 'ﳘ', mapping: Mapped("هم") }, + Range { from: 'ﳙ', to: 'ﳙ', mapping: Mapped("هٰ") }, + Range { from: 'ﳚ', to: 'ﳚ', mapping: Mapped("يج") }, + Range { from: 'ﳛ', to: 'ﳛ', mapping: Mapped("يح") }, + Range { from: 'ﳜ', to: 'ﳜ', mapping: Mapped("يخ") }, + Range { from: 'ﳝ', to: 'ﳝ', mapping: Mapped("يم") }, + Range { from: 'ﳞ', to: 'ﳞ', mapping: Mapped("يه") }, + Range { from: 'ﳟ', to: 'ﳟ', mapping: Mapped("ئم") }, + Range { from: 'ﳠ', to: 'ﳠ', mapping: Mapped("ئه") }, + Range { from: 'ﳡ', to: 'ﳡ', mapping: Mapped("بم") }, + Range { from: 'ﳢ', to: 'ﳢ', mapping: Mapped("به") }, + Range { from: 'ﳣ', to: 'ﳣ', mapping: Mapped("تم") }, + Range { from: 'ﳤ', to: 'ﳤ', mapping: Mapped("ته") }, + Range { from: 'ﳥ', to: 'ﳥ', mapping: Mapped("ثم") }, + Range { from: 'ﳦ', to: 'ﳦ', mapping: Mapped("ثه") }, + Range { from: 'ﳧ', to: 'ﳧ', mapping: Mapped("سم") }, + Range { from: 'ﳨ', to: 'ﳨ', mapping: Mapped("سه") }, + Range { from: 'ﳩ', to: 'ﳩ', mapping: Mapped("شم") }, + Range { from: 'ﳪ', to: 'ﳪ', mapping: Mapped("شه") }, + Range { from: 'ﳫ', to: 'ﳫ', mapping: Mapped("كل") }, + Range { from: 'ﳬ', to: 'ﳬ', mapping: Mapped("كم") }, + Range { from: 'ﳭ', to: 'ﳭ', mapping: Mapped("لم") }, + Range { from: 'ﳮ', to: 'ﳮ', mapping: Mapped("نم") }, + Range { from: 'ﳯ', to: 'ﳯ', mapping: Mapped("نه") }, + Range { from: 'ﳰ', to: 'ﳰ', mapping: Mapped("يم") }, + Range { from: 'ﳱ', to: 'ﳱ', mapping: Mapped("يه") }, + Range { from: 'ﳲ', to: 'ﳲ', mapping: Mapped("ـَّ") }, + Range { from: 'ﳳ', to: 'ﳳ', mapping: Mapped("ـُّ") }, + Range { from: 'ﳴ', to: 'ﳴ', mapping: Mapped("ـِّ") }, + Range { from: 'ﳵ', to: 'ﳵ', mapping: Mapped("طى") }, + Range { from: 'ﳶ', to: 'ﳶ', mapping: Mapped("طي") }, + Range { from: 'ﳷ', to: 'ﳷ', mapping: Mapped("عى") }, + Range { from: 'ﳸ', to: 'ﳸ', mapping: Mapped("عي") }, + Range { from: 'ﳹ', to: 'ﳹ', mapping: Mapped("غى") }, + Range { from: 'ﳺ', to: 'ﳺ', mapping: Mapped("غي") }, + Range { from: 'ﳻ', to: 'ﳻ', mapping: Mapped("سى") }, + Range { from: 'ﳼ', to: 'ﳼ', mapping: Mapped("سي") }, + Range { from: 'ﳽ', to: 'ﳽ', mapping: Mapped("شى") }, + Range { from: 'ﳾ', to: 'ﳾ', mapping: Mapped("شي") }, + Range { from: 'ﳿ', to: 'ﳿ', mapping: Mapped("حى") }, + Range { from: 'ﴀ', to: 'ﴀ', mapping: Mapped("حي") }, + Range { from: 'ﴁ', to: 'ﴁ', mapping: Mapped("جى") }, + Range { from: 'ﴂ', to: 'ﴂ', mapping: Mapped("جي") }, + Range { from: 'ﴃ', to: 'ﴃ', mapping: Mapped("خى") }, + Range { from: 'ﴄ', to: 'ﴄ', mapping: Mapped("خي") }, + Range { from: 'ﴅ', to: 'ﴅ', mapping: Mapped("صى") }, + Range { from: 'ﴆ', to: 'ﴆ', mapping: Mapped("صي") }, + Range { from: 'ﴇ', to: 'ﴇ', mapping: Mapped("ضى") }, + Range { from: 'ﴈ', to: 'ﴈ', mapping: Mapped("ضي") }, + Range { from: 'ﴉ', to: 'ﴉ', mapping: Mapped("شج") }, + Range { from: 'ﴊ', to: 'ﴊ', mapping: Mapped("شح") }, + Range { from: 'ﴋ', to: 'ﴋ', mapping: Mapped("شخ") }, + Range { from: 'ﴌ', to: 'ﴌ', mapping: Mapped("شم") }, + Range { from: 'ﴍ', to: 'ﴍ', mapping: Mapped("شر") }, + Range { from: 'ﴎ', to: 'ﴎ', mapping: Mapped("سر") }, + Range { from: 'ﴏ', to: 'ﴏ', mapping: Mapped("صر") }, + Range { from: 'ﴐ', to: 'ﴐ', mapping: Mapped("ضر") }, + Range { from: 'ﴑ', to: 'ﴑ', mapping: Mapped("طى") }, + Range { from: 'ﴒ', to: 'ﴒ', mapping: Mapped("طي") }, + Range { from: 'ﴓ', to: 'ﴓ', mapping: Mapped("عى") }, + Range { from: 'ﴔ', to: 'ﴔ', mapping: Mapped("عي") }, + Range { from: 'ﴕ', to: 'ﴕ', mapping: Mapped("غى") }, + Range { from: 'ﴖ', to: 'ﴖ', mapping: Mapped("غي") }, + Range { from: 'ﴗ', to: 'ﴗ', mapping: Mapped("سى") }, + Range { from: 'ﴘ', to: 'ﴘ', mapping: Mapped("سي") }, + Range { from: 'ﴙ', to: 'ﴙ', mapping: Mapped("شى") }, + Range { from: 'ﴚ', to: 'ﴚ', mapping: Mapped("شي") }, + Range { from: 'ﴛ', to: 'ﴛ', mapping: Mapped("حى") }, + Range { from: 'ﴜ', to: 'ﴜ', mapping: Mapped("حي") }, + Range { from: 'ﴝ', to: 'ﴝ', mapping: Mapped("جى") }, + Range { from: 'ﴞ', to: 'ﴞ', mapping: Mapped("جي") }, + Range { from: 'ﴟ', to: 'ﴟ', mapping: Mapped("خى") }, + Range { from: 'ﴠ', to: 'ﴠ', mapping: Mapped("خي") }, + Range { from: 'ﴡ', to: 'ﴡ', mapping: Mapped("صى") }, + Range { from: 'ﴢ', to: 'ﴢ', mapping: Mapped("صي") }, + Range { from: 'ﴣ', to: 'ﴣ', mapping: Mapped("ضى") }, + Range { from: 'ﴤ', to: 'ﴤ', mapping: Mapped("ضي") }, + Range { from: 'ﴥ', to: 'ﴥ', mapping: Mapped("شج") }, + Range { from: 'ﴦ', to: 'ﴦ', mapping: Mapped("شح") }, + Range { from: 'ﴧ', to: 'ﴧ', mapping: Mapped("شخ") }, + Range { from: 'ﴨ', to: 'ﴨ', mapping: Mapped("شم") }, + Range { from: 'ﴩ', to: 'ﴩ', mapping: Mapped("شر") }, + Range { from: 'ﴪ', to: 'ﴪ', mapping: Mapped("سر") }, + Range { from: 'ﴫ', to: 'ﴫ', mapping: Mapped("صر") }, + Range { from: 'ﴬ', to: 'ﴬ', mapping: Mapped("ضر") }, + Range { from: 'ﴭ', to: 'ﴭ', mapping: Mapped("شج") }, + Range { from: 'ﴮ', to: 'ﴮ', mapping: Mapped("شح") }, + Range { from: 'ﴯ', to: 'ﴯ', mapping: Mapped("شخ") }, + Range { from: 'ﴰ', to: 'ﴰ', mapping: Mapped("شم") }, + Range { from: 'ﴱ', to: 'ﴱ', mapping: Mapped("سه") }, + Range { from: 'ﴲ', to: 'ﴲ', mapping: Mapped("شه") }, + Range { from: 'ﴳ', to: 'ﴳ', mapping: Mapped("طم") }, + Range { from: 'ﴴ', to: 'ﴴ', mapping: Mapped("سج") }, + Range { from: 'ﴵ', to: 'ﴵ', mapping: Mapped("سح") }, + Range { from: 'ﴶ', to: 'ﴶ', mapping: Mapped("سخ") }, + Range { from: 'ﴷ', to: 'ﴷ', mapping: Mapped("شج") }, + Range { from: 'ﴸ', to: 'ﴸ', mapping: Mapped("شح") }, + Range { from: 'ﴹ', to: 'ﴹ', mapping: Mapped("شخ") }, + Range { from: 'ﴺ', to: 'ﴺ', mapping: Mapped("طم") }, + Range { from: 'ﴻ', to: 'ﴻ', mapping: Mapped("ظم") }, + Range { from: 'ﴼ', to: 'ﴽ', mapping: Mapped("اً") }, + Range { from: '﴾', to: '﴿', mapping: Valid }, + Range { from: '﵀', to: '﵏', mapping: Disallowed }, + Range { from: 'ﵐ', to: 'ﵐ', mapping: Mapped("تجم") }, + Range { from: 'ﵑ', to: 'ﵒ', mapping: Mapped("تحج") }, + Range { from: 'ﵓ', to: 'ﵓ', mapping: Mapped("تحم") }, + Range { from: 'ﵔ', to: 'ﵔ', mapping: Mapped("تخم") }, + Range { from: 'ﵕ', to: 'ﵕ', mapping: Mapped("تمج") }, + Range { from: 'ﵖ', to: 'ﵖ', mapping: Mapped("تمح") }, + Range { from: 'ﵗ', to: 'ﵗ', mapping: Mapped("تمخ") }, + Range { from: 'ﵘ', to: 'ﵙ', mapping: Mapped("جمح") }, + Range { from: 'ﵚ', to: 'ﵚ', mapping: Mapped("حمي") }, + Range { from: 'ﵛ', to: 'ﵛ', mapping: Mapped("حمى") }, + Range { from: 'ﵜ', to: 'ﵜ', mapping: Mapped("سحج") }, + Range { from: 'ﵝ', to: 'ﵝ', mapping: Mapped("سجح") }, + Range { from: 'ﵞ', to: 'ﵞ', mapping: Mapped("سجى") }, + Range { from: 'ﵟ', to: 'ﵠ', mapping: Mapped("سمح") }, + Range { from: 'ﵡ', to: 'ﵡ', mapping: Mapped("سمج") }, + Range { from: 'ﵢ', to: 'ﵣ', mapping: Mapped("سمم") }, + Range { from: 'ﵤ', to: 'ﵥ', mapping: Mapped("صحح") }, + Range { from: 'ﵦ', to: 'ﵦ', mapping: Mapped("صمم") }, + Range { from: 'ﵧ', to: 'ﵨ', mapping: Mapped("شحم") }, + Range { from: 'ﵩ', to: 'ﵩ', mapping: Mapped("شجي") }, + Range { from: 'ﵪ', to: 'ﵫ', mapping: Mapped("شمخ") }, + Range { from: 'ﵬ', to: 'ﵭ', mapping: Mapped("شمم") }, + Range { from: 'ﵮ', to: 'ﵮ', mapping: Mapped("ضحى") }, + Range { from: 'ﵯ', to: 'ﵰ', mapping: Mapped("ضخم") }, + Range { from: 'ﵱ', to: 'ﵲ', mapping: Mapped("طمح") }, + Range { from: 'ﵳ', to: 'ﵳ', mapping: Mapped("طمم") }, + Range { from: 'ﵴ', to: 'ﵴ', mapping: Mapped("طمي") }, + Range { from: 'ﵵ', to: 'ﵵ', mapping: Mapped("عجم") }, + Range { from: 'ﵶ', to: 'ﵷ', mapping: Mapped("عمم") }, + Range { from: 'ﵸ', to: 'ﵸ', mapping: Mapped("عمى") }, + Range { from: 'ﵹ', to: 'ﵹ', mapping: Mapped("غمم") }, + Range { from: 'ﵺ', to: 'ﵺ', mapping: Mapped("غمي") }, + Range { from: 'ﵻ', to: 'ﵻ', mapping: Mapped("غمى") }, + Range { from: 'ﵼ', to: 'ﵽ', mapping: Mapped("فخم") }, + Range { from: 'ﵾ', to: 'ﵾ', mapping: Mapped("قمح") }, + Range { from: 'ﵿ', to: 'ﵿ', mapping: Mapped("قمم") }, + Range { from: 'ﶀ', to: 'ﶀ', mapping: Mapped("لحم") }, + Range { from: 'ﶁ', to: 'ﶁ', mapping: Mapped("لحي") }, + Range { from: 'ﶂ', to: 'ﶂ', mapping: Mapped("لحى") }, + Range { from: 'ﶃ', to: 'ﶄ', mapping: Mapped("لجج") }, + Range { from: 'ﶅ', to: 'ﶆ', mapping: Mapped("لخم") }, + Range { from: 'ﶇ', to: 'ﶈ', mapping: Mapped("لمح") }, + Range { from: 'ﶉ', to: 'ﶉ', mapping: Mapped("محج") }, + Range { from: 'ﶊ', to: 'ﶊ', mapping: Mapped("محم") }, + Range { from: 'ﶋ', to: 'ﶋ', mapping: Mapped("محي") }, + Range { from: 'ﶌ', to: 'ﶌ', mapping: Mapped("مجح") }, + Range { from: 'ﶍ', to: 'ﶍ', mapping: Mapped("مجم") }, + Range { from: 'ﶎ', to: 'ﶎ', mapping: Mapped("مخج") }, + Range { from: 'ﶏ', to: 'ﶏ', mapping: Mapped("مخم") }, + Range { from: '﶐', to: '﶑', mapping: Disallowed }, + Range { from: 'ﶒ', to: 'ﶒ', mapping: Mapped("مجخ") }, + Range { from: 'ﶓ', to: 'ﶓ', mapping: Mapped("همج") }, + Range { from: 'ﶔ', to: 'ﶔ', mapping: Mapped("همم") }, + Range { from: 'ﶕ', to: 'ﶕ', mapping: Mapped("نحم") }, + Range { from: 'ﶖ', to: 'ﶖ', mapping: Mapped("نحى") }, + Range { from: 'ﶗ', to: 'ﶘ', mapping: Mapped("نجم") }, + Range { from: 'ﶙ', to: 'ﶙ', mapping: Mapped("نجى") }, + Range { from: 'ﶚ', to: 'ﶚ', mapping: Mapped("نمي") }, + Range { from: 'ﶛ', to: 'ﶛ', mapping: Mapped("نمى") }, + Range { from: 'ﶜ', to: 'ﶝ', mapping: Mapped("يمم") }, + Range { from: 'ﶞ', to: 'ﶞ', mapping: Mapped("بخي") }, + Range { from: 'ﶟ', to: 'ﶟ', mapping: Mapped("تجي") }, + Range { from: 'ﶠ', to: 'ﶠ', mapping: Mapped("تجى") }, + Range { from: 'ﶡ', to: 'ﶡ', mapping: Mapped("تخي") }, + Range { from: 'ﶢ', to: 'ﶢ', mapping: Mapped("تخى") }, + Range { from: 'ﶣ', to: 'ﶣ', mapping: Mapped("تمي") }, + Range { from: 'ﶤ', to: 'ﶤ', mapping: Mapped("تمى") }, + Range { from: 'ﶥ', to: 'ﶥ', mapping: Mapped("جمي") }, + Range { from: 'ﶦ', to: 'ﶦ', mapping: Mapped("جحى") }, + Range { from: 'ﶧ', to: 'ﶧ', mapping: Mapped("جمى") }, + Range { from: 'ﶨ', to: 'ﶨ', mapping: Mapped("سخى") }, + Range { from: 'ﶩ', to: 'ﶩ', mapping: Mapped("صحي") }, + Range { from: 'ﶪ', to: 'ﶪ', mapping: Mapped("شحي") }, + Range { from: 'ﶫ', to: 'ﶫ', mapping: Mapped("ضحي") }, + Range { from: 'ﶬ', to: 'ﶬ', mapping: Mapped("لجي") }, + Range { from: 'ﶭ', to: 'ﶭ', mapping: Mapped("لمي") }, + Range { from: 'ﶮ', to: 'ﶮ', mapping: Mapped("يحي") }, + Range { from: 'ﶯ', to: 'ﶯ', mapping: Mapped("يجي") }, + Range { from: 'ﶰ', to: 'ﶰ', mapping: Mapped("يمي") }, + Range { from: 'ﶱ', to: 'ﶱ', mapping: Mapped("ممي") }, + Range { from: 'ﶲ', to: 'ﶲ', mapping: Mapped("قمي") }, + Range { from: 'ﶳ', to: 'ﶳ', mapping: Mapped("نحي") }, + Range { from: 'ﶴ', to: 'ﶴ', mapping: Mapped("قمح") }, + Range { from: 'ﶵ', to: 'ﶵ', mapping: Mapped("لحم") }, + Range { from: 'ﶶ', to: 'ﶶ', mapping: Mapped("عمي") }, + Range { from: 'ﶷ', to: 'ﶷ', mapping: Mapped("كمي") }, + Range { from: 'ﶸ', to: 'ﶸ', mapping: Mapped("نجح") }, + Range { from: 'ﶹ', to: 'ﶹ', mapping: Mapped("مخي") }, + Range { from: 'ﶺ', to: 'ﶺ', mapping: Mapped("لجم") }, + Range { from: 'ﶻ', to: 'ﶻ', mapping: Mapped("كمم") }, + Range { from: 'ﶼ', to: 'ﶼ', mapping: Mapped("لجم") }, + Range { from: 'ﶽ', to: 'ﶽ', mapping: Mapped("نجح") }, + Range { from: 'ﶾ', to: 'ﶾ', mapping: Mapped("جحي") }, + Range { from: 'ﶿ', to: 'ﶿ', mapping: Mapped("حجي") }, + Range { from: 'ﷀ', to: 'ﷀ', mapping: Mapped("مجي") }, + Range { from: 'ﷁ', to: 'ﷁ', mapping: Mapped("فمي") }, + Range { from: 'ﷂ', to: 'ﷂ', mapping: Mapped("بحي") }, + Range { from: 'ﷃ', to: 'ﷃ', mapping: Mapped("كمم") }, + Range { from: 'ﷄ', to: 'ﷄ', mapping: Mapped("عجم") }, + Range { from: 'ﷅ', to: 'ﷅ', mapping: Mapped("صمم") }, + Range { from: 'ﷆ', to: 'ﷆ', mapping: Mapped("سخي") }, + Range { from: 'ﷇ', to: 'ﷇ', mapping: Mapped("نجي") }, + Range { from: '﷈', to: '﷏', mapping: Disallowed }, + Range { from: '﷐', to: '﷯', mapping: Disallowed }, + Range { from: 'ﷰ', to: 'ﷰ', mapping: Mapped("صلے") }, + Range { from: 'ﷱ', to: 'ﷱ', mapping: Mapped("قلے") }, + Range { from: 'ﷲ', to: 'ﷲ', mapping: Mapped("الله") }, + Range { from: 'ﷳ', to: 'ﷳ', mapping: Mapped("اكبر") }, + Range { from: 'ﷴ', to: 'ﷴ', mapping: Mapped("محمد") }, + Range { from: 'ﷵ', to: 'ﷵ', mapping: Mapped("صلعم") }, + Range { from: 'ﷶ', to: 'ﷶ', mapping: Mapped("رسول") }, + Range { from: 'ﷷ', to: 'ﷷ', mapping: Mapped("عليه") }, + Range { from: 'ﷸ', to: 'ﷸ', mapping: Mapped("وسلم") }, + Range { from: 'ﷹ', to: 'ﷹ', mapping: Mapped("صلى") }, + Range { from: 'ﷺ', to: 'ﷺ', mapping: DisallowedStd3Mapped("صلى الله عليه وسلم") }, + Range { from: 'ﷻ', to: 'ﷻ', mapping: DisallowedStd3Mapped("جل جلاله") }, + Range { from: '﷼', to: '﷼', mapping: Mapped("ریال") }, + Range { from: '﷽', to: '﷽', mapping: Valid }, + Range { from: '﷾', to: '﷿', mapping: Disallowed }, + Range { from: '︀', to: '️', mapping: Ignored }, + Range { from: '︐', to: '︐', mapping: DisallowedStd3Mapped(",") }, + Range { from: '︑', to: '︑', mapping: Mapped("、") }, + Range { from: '︒', to: '︒', mapping: Disallowed }, + Range { from: '︓', to: '︓', mapping: DisallowedStd3Mapped(":") }, + Range { from: '︔', to: '︔', mapping: DisallowedStd3Mapped(";") }, + Range { from: '︕', to: '︕', mapping: DisallowedStd3Mapped("!") }, + Range { from: '︖', to: '︖', mapping: DisallowedStd3Mapped("?") }, + Range { from: '︗', to: '︗', mapping: Mapped("〖") }, + Range { from: '︘', to: '︘', mapping: Mapped("〗") }, + Range { from: '︙', to: '︙', mapping: Disallowed }, + Range { from: '︚', to: '︟', mapping: Disallowed }, + Range { from: '︠', to: '︣', mapping: Valid }, + Range { from: '︤', to: '︦', mapping: Valid }, + Range { from: '︧', to: '︭', mapping: Valid }, + Range { from: '︮', to: '︯', mapping: Valid }, + Range { from: '︰', to: '︰', mapping: Disallowed }, + Range { from: '︱', to: '︱', mapping: Mapped("—") }, + Range { from: '︲', to: '︲', mapping: Mapped("–") }, + Range { from: '︳', to: '︴', mapping: DisallowedStd3Mapped("_") }, + Range { from: '︵', to: '︵', mapping: DisallowedStd3Mapped("(") }, + Range { from: '︶', to: '︶', mapping: DisallowedStd3Mapped(")") }, + Range { from: '︷', to: '︷', mapping: DisallowedStd3Mapped("{") }, + Range { from: '︸', to: '︸', mapping: DisallowedStd3Mapped("}") }, + Range { from: '︹', to: '︹', mapping: Mapped("〔") }, + Range { from: '︺', to: '︺', mapping: Mapped("〕") }, + Range { from: '︻', to: '︻', mapping: Mapped("【") }, + Range { from: '︼', to: '︼', mapping: Mapped("】") }, + Range { from: '︽', to: '︽', mapping: Mapped("《") }, + Range { from: '︾', to: '︾', mapping: Mapped("》") }, + Range { from: '︿', to: '︿', mapping: Mapped("〈") }, + Range { from: '﹀', to: '﹀', mapping: Mapped("〉") }, + Range { from: '﹁', to: '﹁', mapping: Mapped("「") }, + Range { from: '﹂', to: '﹂', mapping: Mapped("」") }, + Range { from: '﹃', to: '﹃', mapping: Mapped("『") }, + Range { from: '﹄', to: '﹄', mapping: Mapped("』") }, + Range { from: '﹅', to: '﹆', mapping: Valid }, + Range { from: '﹇', to: '﹇', mapping: DisallowedStd3Mapped("[") }, + Range { from: '﹈', to: '﹈', mapping: DisallowedStd3Mapped("]") }, + Range { from: '﹉', to: '﹌', mapping: DisallowedStd3Mapped(" ̅") }, + Range { from: '﹍', to: '﹏', mapping: DisallowedStd3Mapped("_") }, + Range { from: '﹐', to: '﹐', mapping: DisallowedStd3Mapped(",") }, + Range { from: '﹑', to: '﹑', mapping: Mapped("、") }, + Range { from: '﹒', to: '﹒', mapping: Disallowed }, + Range { from: '﹓', to: '﹓', mapping: Disallowed }, + Range { from: '﹔', to: '﹔', mapping: DisallowedStd3Mapped(";") }, + Range { from: '﹕', to: '﹕', mapping: DisallowedStd3Mapped(":") }, + Range { from: '﹖', to: '﹖', mapping: DisallowedStd3Mapped("?") }, + Range { from: '﹗', to: '﹗', mapping: DisallowedStd3Mapped("!") }, + Range { from: '﹘', to: '﹘', mapping: Mapped("—") }, + Range { from: '﹙', to: '﹙', mapping: DisallowedStd3Mapped("(") }, + Range { from: '﹚', to: '﹚', mapping: DisallowedStd3Mapped(")") }, + Range { from: '﹛', to: '﹛', mapping: DisallowedStd3Mapped("{") }, + Range { from: '﹜', to: '﹜', mapping: DisallowedStd3Mapped("}") }, + Range { from: '﹝', to: '﹝', mapping: Mapped("〔") }, + Range { from: '﹞', to: '﹞', mapping: Mapped("〕") }, + Range { from: '﹟', to: '﹟', mapping: DisallowedStd3Mapped("#") }, + Range { from: '﹠', to: '﹠', mapping: DisallowedStd3Mapped("&") }, + Range { from: '﹡', to: '﹡', mapping: DisallowedStd3Mapped("*") }, + Range { from: '﹢', to: '﹢', mapping: DisallowedStd3Mapped("+") }, + Range { from: '﹣', to: '﹣', mapping: Mapped("-") }, + Range { from: '﹤', to: '﹤', mapping: DisallowedStd3Mapped("<") }, + Range { from: '﹥', to: '﹥', mapping: DisallowedStd3Mapped(">") }, + Range { from: '﹦', to: '﹦', mapping: DisallowedStd3Mapped("=") }, + Range { from: '﹧', to: '﹧', mapping: Disallowed }, + Range { from: '﹨', to: '﹨', mapping: DisallowedStd3Mapped("\\") }, + Range { from: '﹩', to: '﹩', mapping: DisallowedStd3Mapped("$") }, + Range { from: '﹪', to: '﹪', mapping: DisallowedStd3Mapped("%") }, + Range { from: '﹫', to: '﹫', mapping: DisallowedStd3Mapped("@") }, + Range { from: '﹬', to: '﹯', mapping: Disallowed }, + Range { from: 'ﹰ', to: 'ﹰ', mapping: DisallowedStd3Mapped(" ً") }, + Range { from: 'ﹱ', to: 'ﹱ', mapping: Mapped("ـً") }, + Range { from: 'ﹲ', to: 'ﹲ', mapping: DisallowedStd3Mapped(" ٌ") }, + Range { from: 'ﹳ', to: 'ﹳ', mapping: Valid }, + Range { from: 'ﹴ', to: 'ﹴ', mapping: DisallowedStd3Mapped(" ٍ") }, + Range { from: '﹵', to: '﹵', mapping: Disallowed }, + Range { from: 'ﹶ', to: 'ﹶ', mapping: DisallowedStd3Mapped(" َ") }, + Range { from: 'ﹷ', to: 'ﹷ', mapping: Mapped("ـَ") }, + Range { from: 'ﹸ', to: 'ﹸ', mapping: DisallowedStd3Mapped(" ُ") }, + Range { from: 'ﹹ', to: 'ﹹ', mapping: Mapped("ـُ") }, + Range { from: 'ﹺ', to: 'ﹺ', mapping: DisallowedStd3Mapped(" ِ") }, + Range { from: 'ﹻ', to: 'ﹻ', mapping: Mapped("ـِ") }, + Range { from: 'ﹼ', to: 'ﹼ', mapping: DisallowedStd3Mapped(" ّ") }, + Range { from: 'ﹽ', to: 'ﹽ', mapping: Mapped("ـّ") }, + Range { from: 'ﹾ', to: 'ﹾ', mapping: DisallowedStd3Mapped(" ْ") }, + Range { from: 'ﹿ', to: 'ﹿ', mapping: Mapped("ـْ") }, + Range { from: 'ﺀ', to: 'ﺀ', mapping: Mapped("ء") }, + Range { from: 'ﺁ', to: 'ﺂ', mapping: Mapped("آ") }, + Range { from: 'ﺃ', to: 'ﺄ', mapping: Mapped("أ") }, + Range { from: 'ﺅ', to: 'ﺆ', mapping: Mapped("ؤ") }, + Range { from: 'ﺇ', to: 'ﺈ', mapping: Mapped("إ") }, + Range { from: 'ﺉ', to: 'ﺌ', mapping: Mapped("ئ") }, + Range { from: 'ﺍ', to: 'ﺎ', mapping: Mapped("ا") }, + Range { from: 'ﺏ', to: 'ﺒ', mapping: Mapped("ب") }, + Range { from: 'ﺓ', to: 'ﺔ', mapping: Mapped("ة") }, + Range { from: 'ﺕ', to: 'ﺘ', mapping: Mapped("ت") }, + Range { from: 'ﺙ', to: 'ﺜ', mapping: Mapped("ث") }, + Range { from: 'ﺝ', to: 'ﺠ', mapping: Mapped("ج") }, + Range { from: 'ﺡ', to: 'ﺤ', mapping: Mapped("ح") }, + Range { from: 'ﺥ', to: 'ﺨ', mapping: Mapped("خ") }, + Range { from: 'ﺩ', to: 'ﺪ', mapping: Mapped("د") }, + Range { from: 'ﺫ', to: 'ﺬ', mapping: Mapped("ذ") }, + Range { from: 'ﺭ', to: 'ﺮ', mapping: Mapped("ر") }, + Range { from: 'ﺯ', to: 'ﺰ', mapping: Mapped("ز") }, + Range { from: 'ﺱ', to: 'ﺴ', mapping: Mapped("س") }, + Range { from: 'ﺵ', to: 'ﺸ', mapping: Mapped("ش") }, + Range { from: 'ﺹ', to: 'ﺼ', mapping: Mapped("ص") }, + Range { from: 'ﺽ', to: 'ﻀ', mapping: Mapped("ض") }, + Range { from: 'ﻁ', to: 'ﻄ', mapping: Mapped("ط") }, + Range { from: 'ﻅ', to: 'ﻈ', mapping: Mapped("ظ") }, + Range { from: 'ﻉ', to: 'ﻌ', mapping: Mapped("ع") }, + Range { from: 'ﻍ', to: 'ﻐ', mapping: Mapped("غ") }, + Range { from: 'ﻑ', to: 'ﻔ', mapping: Mapped("ف") }, + Range { from: 'ﻕ', to: 'ﻘ', mapping: Mapped("ق") }, + Range { from: 'ﻙ', to: 'ﻜ', mapping: Mapped("ك") }, + Range { from: 'ﻝ', to: 'ﻠ', mapping: Mapped("ل") }, + Range { from: 'ﻡ', to: 'ﻤ', mapping: Mapped("م") }, + Range { from: 'ﻥ', to: 'ﻨ', mapping: Mapped("ن") }, + Range { from: 'ﻩ', to: 'ﻬ', mapping: Mapped("ه") }, + Range { from: 'ﻭ', to: 'ﻮ', mapping: Mapped("و") }, + Range { from: 'ﻯ', to: 'ﻰ', mapping: Mapped("ى") }, + Range { from: 'ﻱ', to: 'ﻴ', mapping: Mapped("ي") }, + Range { from: 'ﻵ', to: 'ﻶ', mapping: Mapped("لآ") }, + Range { from: 'ﻷ', to: 'ﻸ', mapping: Mapped("لأ") }, + Range { from: 'ﻹ', to: 'ﻺ', mapping: Mapped("لإ") }, + Range { from: 'ﻻ', to: 'ﻼ', mapping: Mapped("لا") }, + Range { from: '﻽', to: '﻾', mapping: Disallowed }, + Range { from: '', to: '', mapping: Ignored }, + Range { from: '＀', to: '＀', mapping: Disallowed }, + Range { from: '!', to: '!', mapping: DisallowedStd3Mapped("!") }, + Range { from: '"', to: '"', mapping: DisallowedStd3Mapped("\"") }, + Range { from: '#', to: '#', mapping: DisallowedStd3Mapped("#") }, + Range { from: '$', to: '$', mapping: DisallowedStd3Mapped("$") }, + Range { from: '%', to: '%', mapping: DisallowedStd3Mapped("%") }, + Range { from: '&', to: '&', mapping: DisallowedStd3Mapped("&") }, + Range { from: ''', to: ''', mapping: DisallowedStd3Mapped("'") }, + Range { from: '(', to: '(', mapping: DisallowedStd3Mapped("(") }, + Range { from: ')', to: ')', mapping: DisallowedStd3Mapped(")") }, + Range { from: '*', to: '*', mapping: DisallowedStd3Mapped("*") }, + Range { from: '+', to: '+', mapping: DisallowedStd3Mapped("+") }, + Range { from: ',', to: ',', mapping: DisallowedStd3Mapped(",") }, + Range { from: '-', to: '-', mapping: Mapped("-") }, + Range { from: '.', to: '.', mapping: Mapped(".") }, + Range { from: '/', to: '/', mapping: DisallowedStd3Mapped("/") }, + Range { from: '0', to: '0', mapping: Mapped("0") }, + Range { from: '1', to: '1', mapping: Mapped("1") }, + Range { from: '2', to: '2', mapping: Mapped("2") }, + Range { from: '3', to: '3', mapping: Mapped("3") }, + Range { from: '4', to: '4', mapping: Mapped("4") }, + Range { from: '5', to: '5', mapping: Mapped("5") }, + Range { from: '6', to: '6', mapping: Mapped("6") }, + Range { from: '7', to: '7', mapping: Mapped("7") }, + Range { from: '8', to: '8', mapping: Mapped("8") }, + Range { from: '9', to: '9', mapping: Mapped("9") }, + Range { from: ':', to: ':', mapping: DisallowedStd3Mapped(":") }, + Range { from: ';', to: ';', mapping: DisallowedStd3Mapped(";") }, + Range { from: '<', to: '<', mapping: DisallowedStd3Mapped("<") }, + Range { from: '=', to: '=', mapping: DisallowedStd3Mapped("=") }, + Range { from: '>', to: '>', mapping: DisallowedStd3Mapped(">") }, + Range { from: '?', to: '?', mapping: DisallowedStd3Mapped("?") }, + Range { from: '@', to: '@', mapping: DisallowedStd3Mapped("@") }, + Range { from: 'A', to: 'A', mapping: Mapped("a") }, + Range { from: 'B', to: 'B', mapping: Mapped("b") }, + Range { from: 'C', to: 'C', mapping: Mapped("c") }, + Range { from: 'D', to: 'D', mapping: Mapped("d") }, + Range { from: 'E', to: 'E', mapping: Mapped("e") }, + Range { from: 'F', to: 'F', mapping: Mapped("f") }, + Range { from: 'G', to: 'G', mapping: Mapped("g") }, + Range { from: 'H', to: 'H', mapping: Mapped("h") }, + Range { from: 'I', to: 'I', mapping: Mapped("i") }, + Range { from: 'J', to: 'J', mapping: Mapped("j") }, + Range { from: 'K', to: 'K', mapping: Mapped("k") }, + Range { from: 'L', to: 'L', mapping: Mapped("l") }, + Range { from: 'M', to: 'M', mapping: Mapped("m") }, + Range { from: 'N', to: 'N', mapping: Mapped("n") }, + Range { from: 'O', to: 'O', mapping: Mapped("o") }, + Range { from: 'P', to: 'P', mapping: Mapped("p") }, + Range { from: 'Q', to: 'Q', mapping: Mapped("q") }, + Range { from: 'R', to: 'R', mapping: Mapped("r") }, + Range { from: 'S', to: 'S', mapping: Mapped("s") }, + Range { from: 'T', to: 'T', mapping: Mapped("t") }, + Range { from: 'U', to: 'U', mapping: Mapped("u") }, + Range { from: 'V', to: 'V', mapping: Mapped("v") }, + Range { from: 'W', to: 'W', mapping: Mapped("w") }, + Range { from: 'X', to: 'X', mapping: Mapped("x") }, + Range { from: 'Y', to: 'Y', mapping: Mapped("y") }, + Range { from: 'Z', to: 'Z', mapping: Mapped("z") }, + Range { from: '[', to: '[', mapping: DisallowedStd3Mapped("[") }, + Range { from: '\', to: '\', mapping: DisallowedStd3Mapped("\\") }, + Range { from: ']', to: ']', mapping: DisallowedStd3Mapped("]") }, + Range { from: '^', to: '^', mapping: DisallowedStd3Mapped("^") }, + Range { from: '_', to: '_', mapping: DisallowedStd3Mapped("_") }, + Range { from: '`', to: '`', mapping: DisallowedStd3Mapped("`") }, + Range { from: 'a', to: 'a', mapping: Mapped("a") }, + Range { from: 'b', to: 'b', mapping: Mapped("b") }, + Range { from: 'c', to: 'c', mapping: Mapped("c") }, + Range { from: 'd', to: 'd', mapping: Mapped("d") }, + Range { from: 'e', to: 'e', mapping: Mapped("e") }, + Range { from: 'f', to: 'f', mapping: Mapped("f") }, + Range { from: 'g', to: 'g', mapping: Mapped("g") }, + Range { from: 'h', to: 'h', mapping: Mapped("h") }, + Range { from: 'i', to: 'i', mapping: Mapped("i") }, + Range { from: 'j', to: 'j', mapping: Mapped("j") }, + Range { from: 'k', to: 'k', mapping: Mapped("k") }, + Range { from: 'l', to: 'l', mapping: Mapped("l") }, + Range { from: 'm', to: 'm', mapping: Mapped("m") }, + Range { from: 'n', to: 'n', mapping: Mapped("n") }, + Range { from: 'o', to: 'o', mapping: Mapped("o") }, + Range { from: 'p', to: 'p', mapping: Mapped("p") }, + Range { from: 'q', to: 'q', mapping: Mapped("q") }, + Range { from: 'r', to: 'r', mapping: Mapped("r") }, + Range { from: 's', to: 's', mapping: Mapped("s") }, + Range { from: 't', to: 't', mapping: Mapped("t") }, + Range { from: 'u', to: 'u', mapping: Mapped("u") }, + Range { from: 'v', to: 'v', mapping: Mapped("v") }, + Range { from: 'w', to: 'w', mapping: Mapped("w") }, + Range { from: 'x', to: 'x', mapping: Mapped("x") }, + Range { from: 'y', to: 'y', mapping: Mapped("y") }, + Range { from: 'z', to: 'z', mapping: Mapped("z") }, + Range { from: '{', to: '{', mapping: DisallowedStd3Mapped("{") }, + Range { from: '|', to: '|', mapping: DisallowedStd3Mapped("|") }, + Range { from: '}', to: '}', mapping: DisallowedStd3Mapped("}") }, + Range { from: '~', to: '~', mapping: DisallowedStd3Mapped("~") }, + Range { from: '⦅', to: '⦅', mapping: Mapped("⦅") }, + Range { from: '⦆', to: '⦆', mapping: Mapped("⦆") }, + Range { from: '。', to: '。', mapping: Mapped(".") }, + Range { from: '「', to: '「', mapping: Mapped("「") }, + Range { from: '」', to: '」', mapping: Mapped("」") }, + Range { from: '、', to: '、', mapping: Mapped("、") }, + Range { from: '・', to: '・', mapping: Mapped("・") }, + Range { from: 'ヲ', to: 'ヲ', mapping: Mapped("ヲ") }, + Range { from: 'ァ', to: 'ァ', mapping: Mapped("ァ") }, + Range { from: 'ィ', to: 'ィ', mapping: Mapped("ィ") }, + Range { from: 'ゥ', to: 'ゥ', mapping: Mapped("ゥ") }, + Range { from: 'ェ', to: 'ェ', mapping: Mapped("ェ") }, + Range { from: 'ォ', to: 'ォ', mapping: Mapped("ォ") }, + Range { from: 'ャ', to: 'ャ', mapping: Mapped("ャ") }, + Range { from: 'ュ', to: 'ュ', mapping: Mapped("ュ") }, + Range { from: 'ョ', to: 'ョ', mapping: Mapped("ョ") }, + Range { from: 'ッ', to: 'ッ', mapping: Mapped("ッ") }, + Range { from: 'ー', to: 'ー', mapping: Mapped("ー") }, + Range { from: 'ア', to: 'ア', mapping: Mapped("ア") }, + Range { from: 'イ', to: 'イ', mapping: Mapped("イ") }, + Range { from: 'ウ', to: 'ウ', mapping: Mapped("ウ") }, + Range { from: 'エ', to: 'エ', mapping: Mapped("エ") }, + Range { from: 'オ', to: 'オ', mapping: Mapped("オ") }, + Range { from: 'カ', to: 'カ', mapping: Mapped("カ") }, + Range { from: 'キ', to: 'キ', mapping: Mapped("キ") }, + Range { from: 'ク', to: 'ク', mapping: Mapped("ク") }, + Range { from: 'ケ', to: 'ケ', mapping: Mapped("ケ") }, + Range { from: 'コ', to: 'コ', mapping: Mapped("コ") }, + Range { from: 'サ', to: 'サ', mapping: Mapped("サ") }, + Range { from: 'シ', to: 'シ', mapping: Mapped("シ") }, + Range { from: 'ス', to: 'ス', mapping: Mapped("ス") }, + Range { from: 'セ', to: 'セ', mapping: Mapped("セ") }, + Range { from: 'ソ', to: 'ソ', mapping: Mapped("ソ") }, + Range { from: 'タ', to: 'タ', mapping: Mapped("タ") }, + Range { from: 'チ', to: 'チ', mapping: Mapped("チ") }, + Range { from: 'ツ', to: 'ツ', mapping: Mapped("ツ") }, + Range { from: 'テ', to: 'テ', mapping: Mapped("テ") }, + Range { from: 'ト', to: 'ト', mapping: Mapped("ト") }, + Range { from: 'ナ', to: 'ナ', mapping: Mapped("ナ") }, + Range { from: 'ニ', to: 'ニ', mapping: Mapped("ニ") }, + Range { from: 'ヌ', to: 'ヌ', mapping: Mapped("ヌ") }, + Range { from: 'ネ', to: 'ネ', mapping: Mapped("ネ") }, + Range { from: 'ノ', to: 'ノ', mapping: Mapped("ノ") }, + Range { from: 'ハ', to: 'ハ', mapping: Mapped("ハ") }, + Range { from: 'ヒ', to: 'ヒ', mapping: Mapped("ヒ") }, + Range { from: 'フ', to: 'フ', mapping: Mapped("フ") }, + Range { from: 'ヘ', to: 'ヘ', mapping: Mapped("ヘ") }, + Range { from: 'ホ', to: 'ホ', mapping: Mapped("ホ") }, + Range { from: 'マ', to: 'マ', mapping: Mapped("マ") }, + Range { from: 'ミ', to: 'ミ', mapping: Mapped("ミ") }, + Range { from: 'ム', to: 'ム', mapping: Mapped("ム") }, + Range { from: 'メ', to: 'メ', mapping: Mapped("メ") }, + Range { from: 'モ', to: 'モ', mapping: Mapped("モ") }, + Range { from: 'ヤ', to: 'ヤ', mapping: Mapped("ヤ") }, + Range { from: 'ユ', to: 'ユ', mapping: Mapped("ユ") }, + Range { from: 'ヨ', to: 'ヨ', mapping: Mapped("ヨ") }, + Range { from: 'ラ', to: 'ラ', mapping: Mapped("ラ") }, + Range { from: 'リ', to: 'リ', mapping: Mapped("リ") }, + Range { from: 'ル', to: 'ル', mapping: Mapped("ル") }, + Range { from: 'レ', to: 'レ', mapping: Mapped("レ") }, + Range { from: 'ロ', to: 'ロ', mapping: Mapped("ロ") }, + Range { from: 'ワ', to: 'ワ', mapping: Mapped("ワ") }, + Range { from: 'ン', to: 'ン', mapping: Mapped("ン") }, + Range { from: '゙', to: '゙', mapping: Mapped("゙") }, + Range { from: '゚', to: '゚', mapping: Mapped("゚") }, + Range { from: 'ᅠ', to: 'ᅠ', mapping: Disallowed }, + Range { from: 'ᄀ', to: 'ᄀ', mapping: Mapped("ᄀ") }, + Range { from: 'ᄁ', to: 'ᄁ', mapping: Mapped("ᄁ") }, + Range { from: 'ᆪ', to: 'ᆪ', mapping: Mapped("ᆪ") }, + Range { from: 'ᄂ', to: 'ᄂ', mapping: Mapped("ᄂ") }, + Range { from: 'ᆬ', to: 'ᆬ', mapping: Mapped("ᆬ") }, + Range { from: 'ᆭ', to: 'ᆭ', mapping: Mapped("ᆭ") }, + Range { from: 'ᄃ', to: 'ᄃ', mapping: Mapped("ᄃ") }, + Range { from: 'ᄄ', to: 'ᄄ', mapping: Mapped("ᄄ") }, + Range { from: 'ᄅ', to: 'ᄅ', mapping: Mapped("ᄅ") }, + Range { from: 'ᆰ', to: 'ᆰ', mapping: Mapped("ᆰ") }, + Range { from: 'ᆱ', to: 'ᆱ', mapping: Mapped("ᆱ") }, + Range { from: 'ᆲ', to: 'ᆲ', mapping: Mapped("ᆲ") }, + Range { from: 'ᆳ', to: 'ᆳ', mapping: Mapped("ᆳ") }, + Range { from: 'ᆴ', to: 'ᆴ', mapping: Mapped("ᆴ") }, + Range { from: 'ᆵ', to: 'ᆵ', mapping: Mapped("ᆵ") }, + Range { from: 'ᄚ', to: 'ᄚ', mapping: Mapped("ᄚ") }, + Range { from: 'ᄆ', to: 'ᄆ', mapping: Mapped("ᄆ") }, + Range { from: 'ᄇ', to: 'ᄇ', mapping: Mapped("ᄇ") }, + Range { from: 'ᄈ', to: 'ᄈ', mapping: Mapped("ᄈ") }, + Range { from: 'ᄡ', to: 'ᄡ', mapping: Mapped("ᄡ") }, + Range { from: 'ᄉ', to: 'ᄉ', mapping: Mapped("ᄉ") }, + Range { from: 'ᄊ', to: 'ᄊ', mapping: Mapped("ᄊ") }, + Range { from: 'ᄋ', to: 'ᄋ', mapping: Mapped("ᄋ") }, + Range { from: 'ᄌ', to: 'ᄌ', mapping: Mapped("ᄌ") }, + Range { from: 'ᄍ', to: 'ᄍ', mapping: Mapped("ᄍ") }, + Range { from: 'ᄎ', to: 'ᄎ', mapping: Mapped("ᄎ") }, + Range { from: 'ᄏ', to: 'ᄏ', mapping: Mapped("ᄏ") }, + Range { from: 'ᄐ', to: 'ᄐ', mapping: Mapped("ᄐ") }, + Range { from: 'ᄑ', to: 'ᄑ', mapping: Mapped("ᄑ") }, + Range { from: 'ᄒ', to: 'ᄒ', mapping: Mapped("ᄒ") }, + Range { from: '﾿', to: '￁', mapping: Disallowed }, + Range { from: 'ᅡ', to: 'ᅡ', mapping: Mapped("ᅡ") }, + Range { from: 'ᅢ', to: 'ᅢ', mapping: Mapped("ᅢ") }, + Range { from: 'ᅣ', to: 'ᅣ', mapping: Mapped("ᅣ") }, + Range { from: 'ᅤ', to: 'ᅤ', mapping: Mapped("ᅤ") }, + Range { from: 'ᅥ', to: 'ᅥ', mapping: Mapped("ᅥ") }, + Range { from: 'ᅦ', to: 'ᅦ', mapping: Mapped("ᅦ") }, + Range { from: '￈', to: '￉', mapping: Disallowed }, + Range { from: 'ᅧ', to: 'ᅧ', mapping: Mapped("ᅧ") }, + Range { from: 'ᅨ', to: 'ᅨ', mapping: Mapped("ᅨ") }, + Range { from: 'ᅩ', to: 'ᅩ', mapping: Mapped("ᅩ") }, + Range { from: 'ᅪ', to: 'ᅪ', mapping: Mapped("ᅪ") }, + Range { from: 'ᅫ', to: 'ᅫ', mapping: Mapped("ᅫ") }, + Range { from: 'ᅬ', to: 'ᅬ', mapping: Mapped("ᅬ") }, + Range { from: '￐', to: '￑', mapping: Disallowed }, + Range { from: 'ᅭ', to: 'ᅭ', mapping: Mapped("ᅭ") }, + Range { from: 'ᅮ', to: 'ᅮ', mapping: Mapped("ᅮ") }, + Range { from: 'ᅯ', to: 'ᅯ', mapping: Mapped("ᅯ") }, + Range { from: 'ᅰ', to: 'ᅰ', mapping: Mapped("ᅰ") }, + Range { from: 'ᅱ', to: 'ᅱ', mapping: Mapped("ᅱ") }, + Range { from: 'ᅲ', to: 'ᅲ', mapping: Mapped("ᅲ") }, + Range { from: '￘', to: '￙', mapping: Disallowed }, + Range { from: 'ᅳ', to: 'ᅳ', mapping: Mapped("ᅳ") }, + Range { from: 'ᅴ', to: 'ᅴ', mapping: Mapped("ᅴ") }, + Range { from: 'ᅵ', to: 'ᅵ', mapping: Mapped("ᅵ") }, + Range { from: '￝', to: '￟', mapping: Disallowed }, + Range { from: '¢', to: '¢', mapping: Mapped("¢") }, + Range { from: '£', to: '£', mapping: Mapped("£") }, + Range { from: '¬', to: '¬', mapping: Mapped("¬") }, + Range { from: ' ̄', to: ' ̄', mapping: DisallowedStd3Mapped(" ̄") }, + Range { from: '¦', to: '¦', mapping: Mapped("¦") }, + Range { from: '¥', to: '¥', mapping: Mapped("¥") }, + Range { from: '₩', to: '₩', mapping: Mapped("₩") }, + Range { from: '￧', to: '￧', mapping: Disallowed }, + Range { from: '│', to: '│', mapping: Mapped("│") }, + Range { from: '←', to: '←', mapping: Mapped("←") }, + Range { from: '↑', to: '↑', mapping: Mapped("↑") }, + Range { from: '→', to: '→', mapping: Mapped("→") }, + Range { from: '↓', to: '↓', mapping: Mapped("↓") }, + Range { from: '■', to: '■', mapping: Mapped("■") }, + Range { from: '○', to: '○', mapping: Mapped("○") }, + Range { from: '￯', to: '￸', mapping: Disallowed }, + Range { from: '', to: '', mapping: Disallowed }, + Range { from: '', to: '', mapping: Disallowed }, + Range { from: '�', to: '�', mapping: Disallowed }, + Range { from: '￾', to: '￿', mapping: Disallowed }, + Range { from: '𐀀', to: '𐀋', mapping: Valid }, + Range { from: '𐀌', to: '𐀌', mapping: Disallowed }, + Range { from: '𐀍', to: '𐀦', mapping: Valid }, + Range { from: '𐀧', to: '𐀧', mapping: Disallowed }, + Range { from: '𐀨', to: '𐀺', mapping: Valid }, + Range { from: '𐀻', to: '𐀻', mapping: Disallowed }, + Range { from: '𐀼', to: '𐀽', mapping: Valid }, + Range { from: '𐀾', to: '𐀾', mapping: Disallowed }, + Range { from: '𐀿', to: '𐁍', mapping: Valid }, + Range { from: '𐁎', to: '𐁏', mapping: Disallowed }, + Range { from: '𐁐', to: '𐁝', mapping: Valid }, + Range { from: '𐁞', to: '𐁿', mapping: Disallowed }, + Range { from: '𐂀', to: '𐃺', mapping: Valid }, + Range { from: '𐃻', to: '𐃿', mapping: Disallowed }, + Range { from: '𐄀', to: '𐄂', mapping: Valid }, + Range { from: '𐄃', to: '𐄆', mapping: Disallowed }, + Range { from: '𐄇', to: '𐄳', mapping: Valid }, + Range { from: '𐄴', to: '𐄶', mapping: Disallowed }, + Range { from: '𐄷', to: '𐄿', mapping: Valid }, + Range { from: '𐅀', to: '𐆊', mapping: Valid }, + Range { from: '𐆋', to: '𐆌', mapping: Valid }, + Range { from: '𐆍', to: '𐆏', mapping: Disallowed }, + Range { from: '𐆐', to: '𐆛', mapping: Valid }, + Range { from: '𐆜', to: '𐆟', mapping: Disallowed }, + Range { from: '𐆠', to: '𐆠', mapping: Valid }, + Range { from: '𐆡', to: '𐇏', mapping: Disallowed }, + Range { from: '𐇐', to: '𐇼', mapping: Valid }, + Range { from: '𐇽', to: '𐇽', mapping: Valid }, + Range { from: '𐇾', to: '𐉿', mapping: Disallowed }, + Range { from: '𐊀', to: '𐊜', mapping: Valid }, + Range { from: '𐊝', to: '𐊟', mapping: Disallowed }, + Range { from: '𐊠', to: '𐋐', mapping: Valid }, + Range { from: '𐋑', to: '𐋟', mapping: Disallowed }, + Range { from: '𐋠', to: '𐋠', mapping: Valid }, + Range { from: '𐋡', to: '𐋻', mapping: Valid }, + Range { from: '𐋼', to: '𐋿', mapping: Disallowed }, + Range { from: '𐌀', to: '𐌞', mapping: Valid }, + Range { from: '𐌟', to: '𐌟', mapping: Valid }, + Range { from: '𐌠', to: '𐌣', mapping: Valid }, + Range { from: '𐌤', to: '𐌯', mapping: Disallowed }, + Range { from: '𐌰', to: '𐍀', mapping: Valid }, + Range { from: '𐍁', to: '𐍁', mapping: Valid }, + Range { from: '𐍂', to: '𐍉', mapping: Valid }, + Range { from: '𐍊', to: '𐍊', mapping: Valid }, + Range { from: '𐍋', to: '𐍏', mapping: Disallowed }, + Range { from: '𐍐', to: '𐍺', mapping: Valid }, + Range { from: '𐍻', to: '𐍿', mapping: Disallowed }, + Range { from: '𐎀', to: '𐎝', mapping: Valid }, + Range { from: '𐎞', to: '𐎞', mapping: Disallowed }, + Range { from: '𐎟', to: '𐎟', mapping: Valid }, + Range { from: '𐎠', to: '𐏃', mapping: Valid }, + Range { from: '𐏄', to: '𐏇', mapping: Disallowed }, + Range { from: '𐏈', to: '𐏏', mapping: Valid }, + Range { from: '𐏐', to: '𐏕', mapping: Valid }, + Range { from: '𐏖', to: '𐏿', mapping: Disallowed }, + Range { from: '𐐀', to: '𐐀', mapping: Mapped("𐐨") }, + Range { from: '𐐁', to: '𐐁', mapping: Mapped("𐐩") }, + Range { from: '𐐂', to: '𐐂', mapping: Mapped("𐐪") }, + Range { from: '𐐃', to: '𐐃', mapping: Mapped("𐐫") }, + Range { from: '𐐄', to: '𐐄', mapping: Mapped("𐐬") }, + Range { from: '𐐅', to: '𐐅', mapping: Mapped("𐐭") }, + Range { from: '𐐆', to: '𐐆', mapping: Mapped("𐐮") }, + Range { from: '𐐇', to: '𐐇', mapping: Mapped("𐐯") }, + Range { from: '𐐈', to: '𐐈', mapping: Mapped("𐐰") }, + Range { from: '𐐉', to: '𐐉', mapping: Mapped("𐐱") }, + Range { from: '𐐊', to: '𐐊', mapping: Mapped("𐐲") }, + Range { from: '𐐋', to: '𐐋', mapping: Mapped("𐐳") }, + Range { from: '𐐌', to: '𐐌', mapping: Mapped("𐐴") }, + Range { from: '𐐍', to: '𐐍', mapping: Mapped("𐐵") }, + Range { from: '𐐎', to: '𐐎', mapping: Mapped("𐐶") }, + Range { from: '𐐏', to: '𐐏', mapping: Mapped("𐐷") }, + Range { from: '𐐐', to: '𐐐', mapping: Mapped("𐐸") }, + Range { from: '𐐑', to: '𐐑', mapping: Mapped("𐐹") }, + Range { from: '𐐒', to: '𐐒', mapping: Mapped("𐐺") }, + Range { from: '𐐓', to: '𐐓', mapping: Mapped("𐐻") }, + Range { from: '𐐔', to: '𐐔', mapping: Mapped("𐐼") }, + Range { from: '𐐕', to: '𐐕', mapping: Mapped("𐐽") }, + Range { from: '𐐖', to: '𐐖', mapping: Mapped("𐐾") }, + Range { from: '𐐗', to: '𐐗', mapping: Mapped("𐐿") }, + Range { from: '𐐘', to: '𐐘', mapping: Mapped("𐑀") }, + Range { from: '𐐙', to: '𐐙', mapping: Mapped("𐑁") }, + Range { from: '𐐚', to: '𐐚', mapping: Mapped("𐑂") }, + Range { from: '𐐛', to: '𐐛', mapping: Mapped("𐑃") }, + Range { from: '𐐜', to: '𐐜', mapping: Mapped("𐑄") }, + Range { from: '𐐝', to: '𐐝', mapping: Mapped("𐑅") }, + Range { from: '𐐞', to: '𐐞', mapping: Mapped("𐑆") }, + Range { from: '𐐟', to: '𐐟', mapping: Mapped("𐑇") }, + Range { from: '𐐠', to: '𐐠', mapping: Mapped("𐑈") }, + Range { from: '𐐡', to: '𐐡', mapping: Mapped("𐑉") }, + Range { from: '𐐢', to: '𐐢', mapping: Mapped("𐑊") }, + Range { from: '𐐣', to: '𐐣', mapping: Mapped("𐑋") }, + Range { from: '𐐤', to: '𐐤', mapping: Mapped("𐑌") }, + Range { from: '𐐥', to: '𐐥', mapping: Mapped("𐑍") }, + Range { from: '𐐦', to: '𐐦', mapping: Mapped("𐑎") }, + Range { from: '𐐧', to: '𐐧', mapping: Mapped("𐑏") }, + Range { from: '𐐨', to: '𐑍', mapping: Valid }, + Range { from: '𐑎', to: '𐒝', mapping: Valid }, + Range { from: '𐒞', to: '𐒟', mapping: Disallowed }, + Range { from: '𐒠', to: '𐒩', mapping: Valid }, + Range { from: '𐒪', to: '𐓿', mapping: Disallowed }, + Range { from: '𐔀', to: '𐔧', mapping: Valid }, + Range { from: '𐔨', to: '𐔯', mapping: Disallowed }, + Range { from: '𐔰', to: '𐕣', mapping: Valid }, + Range { from: '𐕤', to: '𐕮', mapping: Disallowed }, + Range { from: '𐕯', to: '𐕯', mapping: Valid }, + Range { from: '𐕰', to: '𐗿', mapping: Disallowed }, + Range { from: '𐘀', to: '𐜶', mapping: Valid }, + Range { from: '𐜷', to: '𐜿', mapping: Disallowed }, + Range { from: '𐝀', to: '𐝕', mapping: Valid }, + Range { from: '𐝖', to: '𐝟', mapping: Disallowed }, + Range { from: '𐝠', to: '𐝧', mapping: Valid }, + Range { from: '𐝨', to: '𐟿', mapping: Disallowed }, + Range { from: '𐠀', to: '𐠅', mapping: Valid }, + Range { from: '𐠆', to: '𐠇', mapping: Disallowed }, + Range { from: '𐠈', to: '𐠈', mapping: Valid }, + Range { from: '𐠉', to: '𐠉', mapping: Disallowed }, + Range { from: '𐠊', to: '𐠵', mapping: Valid }, + Range { from: '𐠶', to: '𐠶', mapping: Disallowed }, + Range { from: '𐠷', to: '𐠸', mapping: Valid }, + Range { from: '𐠹', to: '𐠻', mapping: Disallowed }, + Range { from: '𐠼', to: '𐠼', mapping: Valid }, + Range { from: '𐠽', to: '𐠾', mapping: Disallowed }, + Range { from: '𐠿', to: '𐠿', mapping: Valid }, + Range { from: '𐡀', to: '𐡕', mapping: Valid }, + Range { from: '𐡖', to: '𐡖', mapping: Disallowed }, + Range { from: '𐡗', to: '𐡟', mapping: Valid }, + Range { from: '𐡠', to: '𐡶', mapping: Valid }, + Range { from: '𐡷', to: '𐡿', mapping: Valid }, + Range { from: '𐢀', to: '𐢞', mapping: Valid }, + Range { from: '𐢟', to: '𐢦', mapping: Disallowed }, + Range { from: '𐢧', to: '𐢯', mapping: Valid }, + Range { from: '𐢰', to: '𐣟', mapping: Disallowed }, + Range { from: '𐣠', to: '𐣲', mapping: Valid }, + Range { from: '𐣳', to: '𐣳', mapping: Disallowed }, + Range { from: '𐣴', to: '𐣵', mapping: Valid }, + Range { from: '𐣶', to: '𐣺', mapping: Disallowed }, + Range { from: '𐣻', to: '𐣿', mapping: Valid }, + Range { from: '𐤀', to: '𐤕', mapping: Valid }, + Range { from: '𐤖', to: '𐤙', mapping: Valid }, + Range { from: '𐤚', to: '𐤛', mapping: Valid }, + Range { from: '𐤜', to: '𐤞', mapping: Disallowed }, + Range { from: '𐤟', to: '𐤟', mapping: Valid }, + Range { from: '𐤠', to: '𐤹', mapping: Valid }, + Range { from: '𐤺', to: '𐤾', mapping: Disallowed }, + Range { from: '𐤿', to: '𐤿', mapping: Valid }, + Range { from: '𐥀', to: '𐥿', mapping: Disallowed }, + Range { from: '𐦀', to: '𐦷', mapping: Valid }, + Range { from: '𐦸', to: '𐦻', mapping: Disallowed }, + Range { from: '𐦼', to: '𐦽', mapping: Valid }, + Range { from: '𐦾', to: '𐦿', mapping: Valid }, + Range { from: '𐧀', to: '𐧏', mapping: Valid }, + Range { from: '𐧐', to: '𐧑', mapping: Disallowed }, + Range { from: '𐧒', to: '𐧿', mapping: Valid }, + Range { from: '𐨀', to: '𐨃', mapping: Valid }, + Range { from: '𐨄', to: '𐨄', mapping: Disallowed }, + Range { from: '𐨅', to: '𐨆', mapping: Valid }, + Range { from: '𐨇', to: '𐨋', mapping: Disallowed }, + Range { from: '𐨌', to: '𐨓', mapping: Valid }, + Range { from: '𐨔', to: '𐨔', mapping: Disallowed }, + Range { from: '𐨕', to: '𐨗', mapping: Valid }, + Range { from: '𐨘', to: '𐨘', mapping: Disallowed }, + Range { from: '𐨙', to: '𐨳', mapping: Valid }, + Range { from: '𐨴', to: '𐨷', mapping: Disallowed }, + Range { from: '𐨸', to: '𐨺', mapping: Valid }, + Range { from: '𐨻', to: '𐨾', mapping: Disallowed }, + Range { from: '𐨿', to: '𐨿', mapping: Valid }, + Range { from: '𐩀', to: '𐩇', mapping: Valid }, + Range { from: '𐩈', to: '𐩏', mapping: Disallowed }, + Range { from: '𐩐', to: '𐩘', mapping: Valid }, + Range { from: '𐩙', to: '𐩟', mapping: Disallowed }, + Range { from: '𐩠', to: '𐩼', mapping: Valid }, + Range { from: '𐩽', to: '𐩿', mapping: Valid }, + Range { from: '𐪀', to: '𐪜', mapping: Valid }, + Range { from: '𐪝', to: '𐪟', mapping: Valid }, + Range { from: '𐪠', to: '𐪿', mapping: Disallowed }, + Range { from: '𐫀', to: '𐫇', mapping: Valid }, + Range { from: '𐫈', to: '𐫈', mapping: Valid }, + Range { from: '𐫉', to: '𐫦', mapping: Valid }, + Range { from: '𐫧', to: '𐫪', mapping: Disallowed }, + Range { from: '𐫫', to: '𐫶', mapping: Valid }, + Range { from: '𐫷', to: '𐫿', mapping: Disallowed }, + Range { from: '𐬀', to: '𐬵', mapping: Valid }, + Range { from: '𐬶', to: '𐬸', mapping: Disallowed }, + Range { from: '𐬹', to: '𐬿', mapping: Valid }, + Range { from: '𐭀', to: '𐭕', mapping: Valid }, + Range { from: '𐭖', to: '𐭗', mapping: Disallowed }, + Range { from: '𐭘', to: '𐭟', mapping: Valid }, + Range { from: '𐭠', to: '𐭲', mapping: Valid }, + Range { from: '𐭳', to: '𐭷', mapping: Disallowed }, + Range { from: '𐭸', to: '𐭿', mapping: Valid }, + Range { from: '𐮀', to: '𐮑', mapping: Valid }, + Range { from: '𐮒', to: '𐮘', mapping: Disallowed }, + Range { from: '𐮙', to: '𐮜', mapping: Valid }, + Range { from: '𐮝', to: '𐮨', mapping: Disallowed }, + Range { from: '𐮩', to: '𐮯', mapping: Valid }, + Range { from: '𐮰', to: '𐯿', mapping: Disallowed }, + Range { from: '𐰀', to: '𐱈', mapping: Valid }, + Range { from: '𐱉', to: '𐱿', mapping: Disallowed }, + Range { from: '𐲀', to: '𐲀', mapping: Mapped("𐳀") }, + Range { from: '𐲁', to: '𐲁', mapping: Mapped("𐳁") }, + Range { from: '𐲂', to: '𐲂', mapping: Mapped("𐳂") }, + Range { from: '𐲃', to: '𐲃', mapping: Mapped("𐳃") }, + Range { from: '𐲄', to: '𐲄', mapping: Mapped("𐳄") }, + Range { from: '𐲅', to: '𐲅', mapping: Mapped("𐳅") }, + Range { from: '𐲆', to: '𐲆', mapping: Mapped("𐳆") }, + Range { from: '𐲇', to: '𐲇', mapping: Mapped("𐳇") }, + Range { from: '𐲈', to: '𐲈', mapping: Mapped("𐳈") }, + Range { from: '𐲉', to: '𐲉', mapping: Mapped("𐳉") }, + Range { from: '𐲊', to: '𐲊', mapping: Mapped("𐳊") }, + Range { from: '𐲋', to: '𐲋', mapping: Mapped("𐳋") }, + Range { from: '𐲌', to: '𐲌', mapping: Mapped("𐳌") }, + Range { from: '𐲍', to: '𐲍', mapping: Mapped("𐳍") }, + Range { from: '𐲎', to: '𐲎', mapping: Mapped("𐳎") }, + Range { from: '𐲏', to: '𐲏', mapping: Mapped("𐳏") }, + Range { from: '𐲐', to: '𐲐', mapping: Mapped("𐳐") }, + Range { from: '𐲑', to: '𐲑', mapping: Mapped("𐳑") }, + Range { from: '𐲒', to: '𐲒', mapping: Mapped("𐳒") }, + Range { from: '𐲓', to: '𐲓', mapping: Mapped("𐳓") }, + Range { from: '𐲔', to: '𐲔', mapping: Mapped("𐳔") }, + Range { from: '𐲕', to: '𐲕', mapping: Mapped("𐳕") }, + Range { from: '𐲖', to: '𐲖', mapping: Mapped("𐳖") }, + Range { from: '𐲗', to: '𐲗', mapping: Mapped("𐳗") }, + Range { from: '𐲘', to: '𐲘', mapping: Mapped("𐳘") }, + Range { from: '𐲙', to: '𐲙', mapping: Mapped("𐳙") }, + Range { from: '𐲚', to: '𐲚', mapping: Mapped("𐳚") }, + Range { from: '𐲛', to: '𐲛', mapping: Mapped("𐳛") }, + Range { from: '𐲜', to: '𐲜', mapping: Mapped("𐳜") }, + Range { from: '𐲝', to: '𐲝', mapping: Mapped("𐳝") }, + Range { from: '𐲞', to: '𐲞', mapping: Mapped("𐳞") }, + Range { from: '𐲟', to: '𐲟', mapping: Mapped("𐳟") }, + Range { from: '𐲠', to: '𐲠', mapping: Mapped("𐳠") }, + Range { from: '𐲡', to: '𐲡', mapping: Mapped("𐳡") }, + Range { from: '𐲢', to: '𐲢', mapping: Mapped("𐳢") }, + Range { from: '𐲣', to: '𐲣', mapping: Mapped("𐳣") }, + Range { from: '𐲤', to: '𐲤', mapping: Mapped("𐳤") }, + Range { from: '𐲥', to: '𐲥', mapping: Mapped("𐳥") }, + Range { from: '𐲦', to: '𐲦', mapping: Mapped("𐳦") }, + Range { from: '𐲧', to: '𐲧', mapping: Mapped("𐳧") }, + Range { from: '𐲨', to: '𐲨', mapping: Mapped("𐳨") }, + Range { from: '𐲩', to: '𐲩', mapping: Mapped("𐳩") }, + Range { from: '𐲪', to: '𐲪', mapping: Mapped("𐳪") }, + Range { from: '𐲫', to: '𐲫', mapping: Mapped("𐳫") }, + Range { from: '𐲬', to: '𐲬', mapping: Mapped("𐳬") }, + Range { from: '𐲭', to: '𐲭', mapping: Mapped("𐳭") }, + Range { from: '𐲮', to: '𐲮', mapping: Mapped("𐳮") }, + Range { from: '𐲯', to: '𐲯', mapping: Mapped("𐳯") }, + Range { from: '𐲰', to: '𐲰', mapping: Mapped("𐳰") }, + Range { from: '𐲱', to: '𐲱', mapping: Mapped("𐳱") }, + Range { from: '𐲲', to: '𐲲', mapping: Mapped("𐳲") }, + Range { from: '𐲳', to: '𐲿', mapping: Disallowed }, + Range { from: '𐳀', to: '𐳲', mapping: Valid }, + Range { from: '𐳳', to: '𐳹', mapping: Disallowed }, + Range { from: '𐳺', to: '𐳿', mapping: Valid }, + Range { from: '𐴀', to: '𐹟', mapping: Disallowed }, + Range { from: '𐹠', to: '𐹾', mapping: Valid }, + Range { from: '𐹿', to: '𐿿', mapping: Disallowed }, + Range { from: '𑀀', to: '𑁆', mapping: Valid }, + Range { from: '𑁇', to: '𑁍', mapping: Valid }, + Range { from: '𑁎', to: '𑁑', mapping: Disallowed }, + Range { from: '𑁒', to: '𑁥', mapping: Valid }, + Range { from: '𑁦', to: '𑁯', mapping: Valid }, + Range { from: '𑁰', to: '𑁾', mapping: Disallowed }, + Range { from: '𑁿', to: '𑁿', mapping: Valid }, + Range { from: '𑂀', to: '𑂺', mapping: Valid }, + Range { from: '𑂻', to: '𑂼', mapping: Valid }, + Range { from: '𑂽', to: '𑂽', mapping: Disallowed }, + Range { from: '𑂾', to: '𑃁', mapping: Valid }, + Range { from: '𑃂', to: '𑃏', mapping: Disallowed }, + Range { from: '𑃐', to: '𑃨', mapping: Valid }, + Range { from: '𑃩', to: '𑃯', mapping: Disallowed }, + Range { from: '𑃰', to: '𑃹', mapping: Valid }, + Range { from: '𑃺', to: '𑃿', mapping: Disallowed }, + Range { from: '𑄀', to: '𑄴', mapping: Valid }, + Range { from: '𑄵', to: '𑄵', mapping: Disallowed }, + Range { from: '𑄶', to: '𑄿', mapping: Valid }, + Range { from: '𑅀', to: '𑅃', mapping: Valid }, + Range { from: '𑅄', to: '𑅏', mapping: Disallowed }, + Range { from: '𑅐', to: '𑅳', mapping: Valid }, + Range { from: '𑅴', to: '𑅵', mapping: Valid }, + Range { from: '𑅶', to: '𑅶', mapping: Valid }, + Range { from: '𑅷', to: '𑅿', mapping: Disallowed }, + Range { from: '𑆀', to: '𑇄', mapping: Valid }, + Range { from: '𑇅', to: '𑇈', mapping: Valid }, + Range { from: '𑇉', to: '𑇉', mapping: Valid }, + Range { from: '𑇊', to: '𑇌', mapping: Valid }, + Range { from: '𑇍', to: '𑇍', mapping: Valid }, + Range { from: '𑇎', to: '𑇏', mapping: Disallowed }, + Range { from: '𑇐', to: '𑇙', mapping: Valid }, + Range { from: '𑇚', to: '𑇚', mapping: Valid }, + Range { from: '𑇛', to: '𑇛', mapping: Valid }, + Range { from: '𑇜', to: '𑇜', mapping: Valid }, + Range { from: '𑇝', to: '𑇟', mapping: Valid }, + Range { from: '𑇠', to: '𑇠', mapping: Disallowed }, + Range { from: '𑇡', to: '𑇴', mapping: Valid }, + Range { from: '𑇵', to: '𑇿', mapping: Disallowed }, + Range { from: '𑈀', to: '𑈑', mapping: Valid }, + Range { from: '𑈒', to: '𑈒', mapping: Disallowed }, + Range { from: '𑈓', to: '𑈷', mapping: Valid }, + Range { from: '𑈸', to: '𑈽', mapping: Valid }, + Range { from: '𑈾', to: '𑉿', mapping: Disallowed }, + Range { from: '𑊀', to: '𑊆', mapping: Valid }, + Range { from: '𑊇', to: '𑊇', mapping: Disallowed }, + Range { from: '𑊈', to: '𑊈', mapping: Valid }, + Range { from: '𑊉', to: '𑊉', mapping: Disallowed }, + Range { from: '𑊊', to: '𑊍', mapping: Valid }, + Range { from: '𑊎', to: '𑊎', mapping: Disallowed }, + Range { from: '𑊏', to: '𑊝', mapping: Valid }, + Range { from: '𑊞', to: '𑊞', mapping: Disallowed }, + Range { from: '𑊟', to: '𑊨', mapping: Valid }, + Range { from: '𑊩', to: '𑊩', mapping: Valid }, + Range { from: '𑊪', to: '𑊯', mapping: Disallowed }, + Range { from: '𑊰', to: '𑋪', mapping: Valid }, + Range { from: '𑋫', to: '𑋯', mapping: Disallowed }, + Range { from: '𑋰', to: '𑋹', mapping: Valid }, + Range { from: '𑋺', to: '𑋿', mapping: Disallowed }, + Range { from: '𑌀', to: '𑌀', mapping: Valid }, + Range { from: '𑌁', to: '𑌃', mapping: Valid }, + Range { from: '𑌄', to: '𑌄', mapping: Disallowed }, + Range { from: '𑌅', to: '𑌌', mapping: Valid }, + Range { from: '𑌍', to: '𑌎', mapping: Disallowed }, + Range { from: '𑌏', to: '𑌐', mapping: Valid }, + Range { from: '𑌑', to: '𑌒', mapping: Disallowed }, + Range { from: '𑌓', to: '𑌨', mapping: Valid }, + Range { from: '𑌩', to: '𑌩', mapping: Disallowed }, + Range { from: '𑌪', to: '𑌰', mapping: Valid }, + Range { from: '𑌱', to: '𑌱', mapping: Disallowed }, + Range { from: '𑌲', to: '𑌳', mapping: Valid }, + Range { from: '𑌴', to: '𑌴', mapping: Disallowed }, + Range { from: '𑌵', to: '𑌹', mapping: Valid }, + Range { from: '𑌺', to: '𑌻', mapping: Disallowed }, + Range { from: '𑌼', to: '𑍄', mapping: Valid }, + Range { from: '𑍅', to: '𑍆', mapping: Disallowed }, + Range { from: '𑍇', to: '𑍈', mapping: Valid }, + Range { from: '𑍉', to: '𑍊', mapping: Disallowed }, + Range { from: '𑍋', to: '𑍍', mapping: Valid }, + Range { from: '𑍎', to: '𑍏', mapping: Disallowed }, + Range { from: '𑍐', to: '𑍐', mapping: Valid }, + Range { from: '𑍑', to: '𑍖', mapping: Disallowed }, + Range { from: '𑍗', to: '𑍗', mapping: Valid }, + Range { from: '𑍘', to: '𑍜', mapping: Disallowed }, + Range { from: '𑍝', to: '𑍣', mapping: Valid }, + Range { from: '𑍤', to: '𑍥', mapping: Disallowed }, + Range { from: '𑍦', to: '𑍬', mapping: Valid }, + Range { from: '𑍭', to: '𑍯', mapping: Disallowed }, + Range { from: '𑍰', to: '𑍴', mapping: Valid }, + Range { from: '𑍵', to: '𑑿', mapping: Disallowed }, + Range { from: '𑒀', to: '𑓅', mapping: Valid }, + Range { from: '𑓆', to: '𑓆', mapping: Valid }, + Range { from: '𑓇', to: '𑓇', mapping: Valid }, + Range { from: '𑓈', to: '𑓏', mapping: Disallowed }, + Range { from: '𑓐', to: '𑓙', mapping: Valid }, + Range { from: '𑓚', to: '𑕿', mapping: Disallowed }, + Range { from: '𑖀', to: '𑖵', mapping: Valid }, + Range { from: '𑖶', to: '𑖷', mapping: Disallowed }, + Range { from: '𑖸', to: '𑗀', mapping: Valid }, + Range { from: '𑗁', to: '𑗉', mapping: Valid }, + Range { from: '𑗊', to: '𑗗', mapping: Valid }, + Range { from: '𑗘', to: '𑗝', mapping: Valid }, + Range { from: '𑗞', to: '𑗿', mapping: Disallowed }, + Range { from: '𑘀', to: '𑙀', mapping: Valid }, + Range { from: '𑙁', to: '𑙃', mapping: Valid }, + Range { from: '𑙄', to: '𑙄', mapping: Valid }, + Range { from: '𑙅', to: '𑙏', mapping: Disallowed }, + Range { from: '𑙐', to: '𑙙', mapping: Valid }, + Range { from: '𑙚', to: '𑙿', mapping: Disallowed }, + Range { from: '𑚀', to: '𑚷', mapping: Valid }, + Range { from: '𑚸', to: '𑚿', mapping: Disallowed }, + Range { from: '𑛀', to: '𑛉', mapping: Valid }, + Range { from: '𑛊', to: '𑛿', mapping: Disallowed }, + Range { from: '𑜀', to: '𑜙', mapping: Valid }, + Range { from: '𑜚', to: '𑜜', mapping: Disallowed }, + Range { from: '𑜝', to: '𑜫', mapping: Valid }, + Range { from: '𑜬', to: '𑜯', mapping: Disallowed }, + Range { from: '𑜰', to: '𑜹', mapping: Valid }, + Range { from: '𑜺', to: '𑜿', mapping: Valid }, + Range { from: '𑝀', to: '𑢟', mapping: Disallowed }, + Range { from: '𑢠', to: '𑢠', mapping: Mapped("𑣀") }, + Range { from: '𑢡', to: '𑢡', mapping: Mapped("𑣁") }, + Range { from: '𑢢', to: '𑢢', mapping: Mapped("𑣂") }, + Range { from: '𑢣', to: '𑢣', mapping: Mapped("𑣃") }, + Range { from: '𑢤', to: '𑢤', mapping: Mapped("𑣄") }, + Range { from: '𑢥', to: '𑢥', mapping: Mapped("𑣅") }, + Range { from: '𑢦', to: '𑢦', mapping: Mapped("𑣆") }, + Range { from: '𑢧', to: '𑢧', mapping: Mapped("𑣇") }, + Range { from: '𑢨', to: '𑢨', mapping: Mapped("𑣈") }, + Range { from: '𑢩', to: '𑢩', mapping: Mapped("𑣉") }, + Range { from: '𑢪', to: '𑢪', mapping: Mapped("𑣊") }, + Range { from: '𑢫', to: '𑢫', mapping: Mapped("𑣋") }, + Range { from: '𑢬', to: '𑢬', mapping: Mapped("𑣌") }, + Range { from: '𑢭', to: '𑢭', mapping: Mapped("𑣍") }, + Range { from: '𑢮', to: '𑢮', mapping: Mapped("𑣎") }, + Range { from: '𑢯', to: '𑢯', mapping: Mapped("𑣏") }, + Range { from: '𑢰', to: '𑢰', mapping: Mapped("𑣐") }, + Range { from: '𑢱', to: '𑢱', mapping: Mapped("𑣑") }, + Range { from: '𑢲', to: '𑢲', mapping: Mapped("𑣒") }, + Range { from: '𑢳', to: '𑢳', mapping: Mapped("𑣓") }, + Range { from: '𑢴', to: '𑢴', mapping: Mapped("𑣔") }, + Range { from: '𑢵', to: '𑢵', mapping: Mapped("𑣕") }, + Range { from: '𑢶', to: '𑢶', mapping: Mapped("𑣖") }, + Range { from: '𑢷', to: '𑢷', mapping: Mapped("𑣗") }, + Range { from: '𑢸', to: '𑢸', mapping: Mapped("𑣘") }, + Range { from: '𑢹', to: '𑢹', mapping: Mapped("𑣙") }, + Range { from: '𑢺', to: '𑢺', mapping: Mapped("𑣚") }, + Range { from: '𑢻', to: '𑢻', mapping: Mapped("𑣛") }, + Range { from: '𑢼', to: '𑢼', mapping: Mapped("𑣜") }, + Range { from: '𑢽', to: '𑢽', mapping: Mapped("𑣝") }, + Range { from: '𑢾', to: '𑢾', mapping: Mapped("𑣞") }, + Range { from: '𑢿', to: '𑢿', mapping: Mapped("𑣟") }, + Range { from: '𑣀', to: '𑣩', mapping: Valid }, + Range { from: '𑣪', to: '𑣲', mapping: Valid }, + Range { from: '𑣳', to: '𑣾', mapping: Disallowed }, + Range { from: '𑣿', to: '𑣿', mapping: Valid }, + Range { from: '𑤀', to: '𑪿', mapping: Disallowed }, + Range { from: '𑫀', to: '𑫸', mapping: Valid }, + Range { from: '𑫹', to: '𑿿', mapping: Disallowed }, + Range { from: '𒀀', to: '𒍮', mapping: Valid }, + Range { from: '𒍯', to: '𒎘', mapping: Valid }, + Range { from: '𒎙', to: '𒎙', mapping: Valid }, + Range { from: '𒎚', to: '𒏿', mapping: Disallowed }, + Range { from: '𒐀', to: '𒑢', mapping: Valid }, + Range { from: '𒑣', to: '𒑮', mapping: Valid }, + Range { from: '𒑯', to: '𒑯', mapping: Disallowed }, + Range { from: '𒑰', to: '𒑳', mapping: Valid }, + Range { from: '𒑴', to: '𒑴', mapping: Valid }, + Range { from: '𒑵', to: '𒑿', mapping: Disallowed }, + Range { from: '𒒀', to: '𒕃', mapping: Valid }, + Range { from: '𒕄', to: '𒿿', mapping: Disallowed }, + Range { from: '𓀀', to: '𓐮', mapping: Valid }, + Range { from: '𓐯', to: '𔏿', mapping: Disallowed }, + Range { from: '𔐀', to: '𔙆', mapping: Valid }, + Range { from: '𔙇', to: '𖟿', mapping: Disallowed }, + Range { from: '𖠀', to: '𖨸', mapping: Valid }, + Range { from: '𖨹', to: '𖨿', mapping: Disallowed }, + Range { from: '𖩀', to: '𖩞', mapping: Valid }, + Range { from: '𖩟', to: '𖩟', mapping: Disallowed }, + Range { from: '𖩠', to: '𖩩', mapping: Valid }, + Range { from: '𖩪', to: '𖩭', mapping: Disallowed }, + Range { from: '𖩮', to: '𖩯', mapping: Valid }, + Range { from: '𖩰', to: '𖫏', mapping: Disallowed }, + Range { from: '𖫐', to: '𖫭', mapping: Valid }, + Range { from: '𖫮', to: '𖫯', mapping: Disallowed }, + Range { from: '𖫰', to: '𖫴', mapping: Valid }, + Range { from: '𖫵', to: '𖫵', mapping: Valid }, + Range { from: '𖫶', to: '𖫿', mapping: Disallowed }, + Range { from: '𖬀', to: '𖬶', mapping: Valid }, + Range { from: '𖬷', to: '𖬿', mapping: Valid }, + Range { from: '𖭀', to: '𖭃', mapping: Valid }, + Range { from: '𖭄', to: '𖭅', mapping: Valid }, + Range { from: '𖭆', to: '𖭏', mapping: Disallowed }, + Range { from: '𖭐', to: '𖭙', mapping: Valid }, + Range { from: '𖭚', to: '𖭚', mapping: Disallowed }, + Range { from: '𖭛', to: '𖭡', mapping: Valid }, + Range { from: '𖭢', to: '𖭢', mapping: Disallowed }, + Range { from: '𖭣', to: '𖭷', mapping: Valid }, + Range { from: '𖭸', to: '𖭼', mapping: Disallowed }, + Range { from: '𖭽', to: '𖮏', mapping: Valid }, + Range { from: '𖮐', to: '𖻿', mapping: Disallowed }, + Range { from: '𖼀', to: '𖽄', mapping: Valid }, + Range { from: '𖽅', to: '𖽏', mapping: Disallowed }, + Range { from: '𖽐', to: '𖽾', mapping: Valid }, + Range { from: '𖽿', to: '𖾎', mapping: Disallowed }, + Range { from: '𖾏', to: '𖾟', mapping: Valid }, + Range { from: '𖾠', to: '𚿿', mapping: Disallowed }, + Range { from: '𛀀', to: '𛀁', mapping: Valid }, + Range { from: '𛀂', to: '𛯿', mapping: Disallowed }, + Range { from: '𛰀', to: '𛱪', mapping: Valid }, + Range { from: '𛱫', to: '𛱯', mapping: Disallowed }, + Range { from: '𛱰', to: '𛱼', mapping: Valid }, + Range { from: '𛱽', to: '𛱿', mapping: Disallowed }, + Range { from: '𛲀', to: '𛲈', mapping: Valid }, + Range { from: '𛲉', to: '𛲏', mapping: Disallowed }, + Range { from: '𛲐', to: '𛲙', mapping: Valid }, + Range { from: '𛲚', to: '𛲛', mapping: Disallowed }, + Range { from: '𛲜', to: '𛲜', mapping: Valid }, + Range { from: '𛲝', to: '𛲞', mapping: Valid }, + Range { from: '𛲟', to: '𛲟', mapping: Valid }, + Range { from: '𛲠', to: '𛲣', mapping: Ignored }, + Range { from: '𛲤', to: '𜿿', mapping: Disallowed }, + Range { from: '𝀀', to: '𝃵', mapping: Valid }, + Range { from: '𝃶', to: '𝃿', mapping: Disallowed }, + Range { from: '𝄀', to: '𝄦', mapping: Valid }, + Range { from: '𝄧', to: '𝄨', mapping: Disallowed }, + Range { from: '𝄩', to: '𝄩', mapping: Valid }, + Range { from: '𝄪', to: '𝅝', mapping: Valid }, + Range { from: '𝅗𝅥', to: '𝅗𝅥', mapping: Mapped("𝅗𝅥") }, + Range { from: '𝅘𝅥', to: '𝅘𝅥', mapping: Mapped("𝅘𝅥") }, + Range { from: '𝅘𝅥𝅮', to: '𝅘𝅥𝅮', mapping: Mapped("𝅘𝅥𝅮") }, + Range { from: '𝅘𝅥𝅯', to: '𝅘𝅥𝅯', mapping: Mapped("𝅘𝅥𝅯") }, + Range { from: '𝅘𝅥𝅰', to: '𝅘𝅥𝅰', mapping: Mapped("𝅘𝅥𝅰") }, + Range { from: '𝅘𝅥𝅱', to: '𝅘𝅥𝅱', mapping: Mapped("𝅘𝅥𝅱") }, + Range { from: '𝅘𝅥𝅲', to: '𝅘𝅥𝅲', mapping: Mapped("𝅘𝅥𝅲") }, + Range { from: '𝅥', to: '𝅲', mapping: Valid }, + Range { from: '𝅳', to: '𝅺', mapping: Disallowed }, + Range { from: '𝅻', to: '𝆺', mapping: Valid }, + Range { from: '𝆹𝅥', to: '𝆹𝅥', mapping: Mapped("𝆹𝅥") }, + Range { from: '𝆺𝅥', to: '𝆺𝅥', mapping: Mapped("𝆺𝅥") }, + Range { from: '𝆹𝅥𝅮', to: '𝆹𝅥𝅮', mapping: Mapped("𝆹𝅥𝅮") }, + Range { from: '𝆺𝅥𝅮', to: '𝆺𝅥𝅮', mapping: Mapped("𝆺𝅥𝅮") }, + Range { from: '𝆹𝅥𝅯', to: '𝆹𝅥𝅯', mapping: Mapped("𝆹𝅥𝅯") }, + Range { from: '𝆺𝅥𝅯', to: '𝆺𝅥𝅯', mapping: Mapped("𝆺𝅥𝅯") }, + Range { from: '𝇁', to: '𝇝', mapping: Valid }, + Range { from: '𝇞', to: '𝇨', mapping: Valid }, + Range { from: '𝇩', to: '𝇿', mapping: Disallowed }, + Range { from: '𝈀', to: '𝉅', mapping: Valid }, + Range { from: '𝉆', to: '𝋿', mapping: Disallowed }, + Range { from: '𝌀', to: '𝍖', mapping: Valid }, + Range { from: '𝍗', to: '𝍟', mapping: Disallowed }, + Range { from: '𝍠', to: '𝍱', mapping: Valid }, + Range { from: '𝍲', to: '𝏿', mapping: Disallowed }, + Range { from: '𝐀', to: '𝐀', mapping: Mapped("a") }, + Range { from: '𝐁', to: '𝐁', mapping: Mapped("b") }, + Range { from: '𝐂', to: '𝐂', mapping: Mapped("c") }, + Range { from: '𝐃', to: '𝐃', mapping: Mapped("d") }, + Range { from: '𝐄', to: '𝐄', mapping: Mapped("e") }, + Range { from: '𝐅', to: '𝐅', mapping: Mapped("f") }, + Range { from: '𝐆', to: '𝐆', mapping: Mapped("g") }, + Range { from: '𝐇', to: '𝐇', mapping: Mapped("h") }, + Range { from: '𝐈', to: '𝐈', mapping: Mapped("i") }, + Range { from: '𝐉', to: '𝐉', mapping: Mapped("j") }, + Range { from: '𝐊', to: '𝐊', mapping: Mapped("k") }, + Range { from: '𝐋', to: '𝐋', mapping: Mapped("l") }, + Range { from: '𝐌', to: '𝐌', mapping: Mapped("m") }, + Range { from: '𝐍', to: '𝐍', mapping: Mapped("n") }, + Range { from: '𝐎', to: '𝐎', mapping: Mapped("o") }, + Range { from: '𝐏', to: '𝐏', mapping: Mapped("p") }, + Range { from: '𝐐', to: '𝐐', mapping: Mapped("q") }, + Range { from: '𝐑', to: '𝐑', mapping: Mapped("r") }, + Range { from: '𝐒', to: '𝐒', mapping: Mapped("s") }, + Range { from: '𝐓', to: '𝐓', mapping: Mapped("t") }, + Range { from: '𝐔', to: '𝐔', mapping: Mapped("u") }, + Range { from: '𝐕', to: '𝐕', mapping: Mapped("v") }, + Range { from: '𝐖', to: '𝐖', mapping: Mapped("w") }, + Range { from: '𝐗', to: '𝐗', mapping: Mapped("x") }, + Range { from: '𝐘', to: '𝐘', mapping: Mapped("y") }, + Range { from: '𝐙', to: '𝐙', mapping: Mapped("z") }, + Range { from: '𝐚', to: '𝐚', mapping: Mapped("a") }, + Range { from: '𝐛', to: '𝐛', mapping: Mapped("b") }, + Range { from: '𝐜', to: '𝐜', mapping: Mapped("c") }, + Range { from: '𝐝', to: '𝐝', mapping: Mapped("d") }, + Range { from: '𝐞', to: '𝐞', mapping: Mapped("e") }, + Range { from: '𝐟', to: '𝐟', mapping: Mapped("f") }, + Range { from: '𝐠', to: '𝐠', mapping: Mapped("g") }, + Range { from: '𝐡', to: '𝐡', mapping: Mapped("h") }, + Range { from: '𝐢', to: '𝐢', mapping: Mapped("i") }, + Range { from: '𝐣', to: '𝐣', mapping: Mapped("j") }, + Range { from: '𝐤', to: '𝐤', mapping: Mapped("k") }, + Range { from: '𝐥', to: '𝐥', mapping: Mapped("l") }, + Range { from: '𝐦', to: '𝐦', mapping: Mapped("m") }, + Range { from: '𝐧', to: '𝐧', mapping: Mapped("n") }, + Range { from: '𝐨', to: '𝐨', mapping: Mapped("o") }, + Range { from: '𝐩', to: '𝐩', mapping: Mapped("p") }, + Range { from: '𝐪', to: '𝐪', mapping: Mapped("q") }, + Range { from: '𝐫', to: '𝐫', mapping: Mapped("r") }, + Range { from: '𝐬', to: '𝐬', mapping: Mapped("s") }, + Range { from: '𝐭', to: '𝐭', mapping: Mapped("t") }, + Range { from: '𝐮', to: '𝐮', mapping: Mapped("u") }, + Range { from: '𝐯', to: '𝐯', mapping: Mapped("v") }, + Range { from: '𝐰', to: '𝐰', mapping: Mapped("w") }, + Range { from: '𝐱', to: '𝐱', mapping: Mapped("x") }, + Range { from: '𝐲', to: '𝐲', mapping: Mapped("y") }, + Range { from: '𝐳', to: '𝐳', mapping: Mapped("z") }, + Range { from: '𝐴', to: '𝐴', mapping: Mapped("a") }, + Range { from: '𝐵', to: '𝐵', mapping: Mapped("b") }, + Range { from: '𝐶', to: '𝐶', mapping: Mapped("c") }, + Range { from: '𝐷', to: '𝐷', mapping: Mapped("d") }, + Range { from: '𝐸', to: '𝐸', mapping: Mapped("e") }, + Range { from: '𝐹', to: '𝐹', mapping: Mapped("f") }, + Range { from: '𝐺', to: '𝐺', mapping: Mapped("g") }, + Range { from: '𝐻', to: '𝐻', mapping: Mapped("h") }, + Range { from: '𝐼', to: '𝐼', mapping: Mapped("i") }, + Range { from: '𝐽', to: '𝐽', mapping: Mapped("j") }, + Range { from: '𝐾', to: '𝐾', mapping: Mapped("k") }, + Range { from: '𝐿', to: '𝐿', mapping: Mapped("l") }, + Range { from: '𝑀', to: '𝑀', mapping: Mapped("m") }, + Range { from: '𝑁', to: '𝑁', mapping: Mapped("n") }, + Range { from: '𝑂', to: '𝑂', mapping: Mapped("o") }, + Range { from: '𝑃', to: '𝑃', mapping: Mapped("p") }, + Range { from: '𝑄', to: '𝑄', mapping: Mapped("q") }, + Range { from: '𝑅', to: '𝑅', mapping: Mapped("r") }, + Range { from: '𝑆', to: '𝑆', mapping: Mapped("s") }, + Range { from: '𝑇', to: '𝑇', mapping: Mapped("t") }, + Range { from: '𝑈', to: '𝑈', mapping: Mapped("u") }, + Range { from: '𝑉', to: '𝑉', mapping: Mapped("v") }, + Range { from: '𝑊', to: '𝑊', mapping: Mapped("w") }, + Range { from: '𝑋', to: '𝑋', mapping: Mapped("x") }, + Range { from: '𝑌', to: '𝑌', mapping: Mapped("y") }, + Range { from: '𝑍', to: '𝑍', mapping: Mapped("z") }, + Range { from: '𝑎', to: '𝑎', mapping: Mapped("a") }, + Range { from: '𝑏', to: '𝑏', mapping: Mapped("b") }, + Range { from: '𝑐', to: '𝑐', mapping: Mapped("c") }, + Range { from: '𝑑', to: '𝑑', mapping: Mapped("d") }, + Range { from: '𝑒', to: '𝑒', mapping: Mapped("e") }, + Range { from: '𝑓', to: '𝑓', mapping: Mapped("f") }, + Range { from: '𝑔', to: '𝑔', mapping: Mapped("g") }, + Range { from: '𝑕', to: '𝑕', mapping: Disallowed }, + Range { from: '𝑖', to: '𝑖', mapping: Mapped("i") }, + Range { from: '𝑗', to: '𝑗', mapping: Mapped("j") }, + Range { from: '𝑘', to: '𝑘', mapping: Mapped("k") }, + Range { from: '𝑙', to: '𝑙', mapping: Mapped("l") }, + Range { from: '𝑚', to: '𝑚', mapping: Mapped("m") }, + Range { from: '𝑛', to: '𝑛', mapping: Mapped("n") }, + Range { from: '𝑜', to: '𝑜', mapping: Mapped("o") }, + Range { from: '𝑝', to: '𝑝', mapping: Mapped("p") }, + Range { from: '𝑞', to: '𝑞', mapping: Mapped("q") }, + Range { from: '𝑟', to: '𝑟', mapping: Mapped("r") }, + Range { from: '𝑠', to: '𝑠', mapping: Mapped("s") }, + Range { from: '𝑡', to: '𝑡', mapping: Mapped("t") }, + Range { from: '𝑢', to: '𝑢', mapping: Mapped("u") }, + Range { from: '𝑣', to: '𝑣', mapping: Mapped("v") }, + Range { from: '𝑤', to: '𝑤', mapping: Mapped("w") }, + Range { from: '𝑥', to: '𝑥', mapping: Mapped("x") }, + Range { from: '𝑦', to: '𝑦', mapping: Mapped("y") }, + Range { from: '𝑧', to: '𝑧', mapping: Mapped("z") }, + Range { from: '𝑨', to: '𝑨', mapping: Mapped("a") }, + Range { from: '𝑩', to: '𝑩', mapping: Mapped("b") }, + Range { from: '𝑪', to: '𝑪', mapping: Mapped("c") }, + Range { from: '𝑫', to: '𝑫', mapping: Mapped("d") }, + Range { from: '𝑬', to: '𝑬', mapping: Mapped("e") }, + Range { from: '𝑭', to: '𝑭', mapping: Mapped("f") }, + Range { from: '𝑮', to: '𝑮', mapping: Mapped("g") }, + Range { from: '𝑯', to: '𝑯', mapping: Mapped("h") }, + Range { from: '𝑰', to: '𝑰', mapping: Mapped("i") }, + Range { from: '𝑱', to: '𝑱', mapping: Mapped("j") }, + Range { from: '𝑲', to: '𝑲', mapping: Mapped("k") }, + Range { from: '𝑳', to: '𝑳', mapping: Mapped("l") }, + Range { from: '𝑴', to: '𝑴', mapping: Mapped("m") }, + Range { from: '𝑵', to: '𝑵', mapping: Mapped("n") }, + Range { from: '𝑶', to: '𝑶', mapping: Mapped("o") }, + Range { from: '𝑷', to: '𝑷', mapping: Mapped("p") }, + Range { from: '𝑸', to: '𝑸', mapping: Mapped("q") }, + Range { from: '𝑹', to: '𝑹', mapping: Mapped("r") }, + Range { from: '𝑺', to: '𝑺', mapping: Mapped("s") }, + Range { from: '𝑻', to: '𝑻', mapping: Mapped("t") }, + Range { from: '𝑼', to: '𝑼', mapping: Mapped("u") }, + Range { from: '𝑽', to: '𝑽', mapping: Mapped("v") }, + Range { from: '𝑾', to: '𝑾', mapping: Mapped("w") }, + Range { from: '𝑿', to: '𝑿', mapping: Mapped("x") }, + Range { from: '𝒀', to: '𝒀', mapping: Mapped("y") }, + Range { from: '𝒁', to: '𝒁', mapping: Mapped("z") }, + Range { from: '𝒂', to: '𝒂', mapping: Mapped("a") }, + Range { from: '𝒃', to: '𝒃', mapping: Mapped("b") }, + Range { from: '𝒄', to: '𝒄', mapping: Mapped("c") }, + Range { from: '𝒅', to: '𝒅', mapping: Mapped("d") }, + Range { from: '𝒆', to: '𝒆', mapping: Mapped("e") }, + Range { from: '𝒇', to: '𝒇', mapping: Mapped("f") }, + Range { from: '𝒈', to: '𝒈', mapping: Mapped("g") }, + Range { from: '𝒉', to: '𝒉', mapping: Mapped("h") }, + Range { from: '𝒊', to: '𝒊', mapping: Mapped("i") }, + Range { from: '𝒋', to: '𝒋', mapping: Mapped("j") }, + Range { from: '𝒌', to: '𝒌', mapping: Mapped("k") }, + Range { from: '𝒍', to: '𝒍', mapping: Mapped("l") }, + Range { from: '𝒎', to: '𝒎', mapping: Mapped("m") }, + Range { from: '𝒏', to: '𝒏', mapping: Mapped("n") }, + Range { from: '𝒐', to: '𝒐', mapping: Mapped("o") }, + Range { from: '𝒑', to: '𝒑', mapping: Mapped("p") }, + Range { from: '𝒒', to: '𝒒', mapping: Mapped("q") }, + Range { from: '𝒓', to: '𝒓', mapping: Mapped("r") }, + Range { from: '𝒔', to: '𝒔', mapping: Mapped("s") }, + Range { from: '𝒕', to: '𝒕', mapping: Mapped("t") }, + Range { from: '𝒖', to: '𝒖', mapping: Mapped("u") }, + Range { from: '𝒗', to: '𝒗', mapping: Mapped("v") }, + Range { from: '𝒘', to: '𝒘', mapping: Mapped("w") }, + Range { from: '𝒙', to: '𝒙', mapping: Mapped("x") }, + Range { from: '𝒚', to: '𝒚', mapping: Mapped("y") }, + Range { from: '𝒛', to: '𝒛', mapping: Mapped("z") }, + Range { from: '𝒜', to: '𝒜', mapping: Mapped("a") }, + Range { from: '𝒝', to: '𝒝', mapping: Disallowed }, + Range { from: '𝒞', to: '𝒞', mapping: Mapped("c") }, + Range { from: '𝒟', to: '𝒟', mapping: Mapped("d") }, + Range { from: '𝒠', to: '𝒡', mapping: Disallowed }, + Range { from: '𝒢', to: '𝒢', mapping: Mapped("g") }, + Range { from: '𝒣', to: '𝒤', mapping: Disallowed }, + Range { from: '𝒥', to: '𝒥', mapping: Mapped("j") }, + Range { from: '𝒦', to: '𝒦', mapping: Mapped("k") }, + Range { from: '𝒧', to: '𝒨', mapping: Disallowed }, + Range { from: '𝒩', to: '𝒩', mapping: Mapped("n") }, + Range { from: '𝒪', to: '𝒪', mapping: Mapped("o") }, + Range { from: '𝒫', to: '𝒫', mapping: Mapped("p") }, + Range { from: '𝒬', to: '𝒬', mapping: Mapped("q") }, + Range { from: '𝒭', to: '𝒭', mapping: Disallowed }, + Range { from: '𝒮', to: '𝒮', mapping: Mapped("s") }, + Range { from: '𝒯', to: '𝒯', mapping: Mapped("t") }, + Range { from: '𝒰', to: '𝒰', mapping: Mapped("u") }, + Range { from: '𝒱', to: '𝒱', mapping: Mapped("v") }, + Range { from: '𝒲', to: '𝒲', mapping: Mapped("w") }, + Range { from: '𝒳', to: '𝒳', mapping: Mapped("x") }, + Range { from: '𝒴', to: '𝒴', mapping: Mapped("y") }, + Range { from: '𝒵', to: '𝒵', mapping: Mapped("z") }, + Range { from: '𝒶', to: '𝒶', mapping: Mapped("a") }, + Range { from: '𝒷', to: '𝒷', mapping: Mapped("b") }, + Range { from: '𝒸', to: '𝒸', mapping: Mapped("c") }, + Range { from: '𝒹', to: '𝒹', mapping: Mapped("d") }, + Range { from: '𝒺', to: '𝒺', mapping: Disallowed }, + Range { from: '𝒻', to: '𝒻', mapping: Mapped("f") }, + Range { from: '𝒼', to: '𝒼', mapping: Disallowed }, + Range { from: '𝒽', to: '𝒽', mapping: Mapped("h") }, + Range { from: '𝒾', to: '𝒾', mapping: Mapped("i") }, + Range { from: '𝒿', to: '𝒿', mapping: Mapped("j") }, + Range { from: '𝓀', to: '𝓀', mapping: Mapped("k") }, + Range { from: '𝓁', to: '𝓁', mapping: Mapped("l") }, + Range { from: '𝓂', to: '𝓂', mapping: Mapped("m") }, + Range { from: '𝓃', to: '𝓃', mapping: Mapped("n") }, + Range { from: '𝓄', to: '𝓄', mapping: Disallowed }, + Range { from: '𝓅', to: '𝓅', mapping: Mapped("p") }, + Range { from: '𝓆', to: '𝓆', mapping: Mapped("q") }, + Range { from: '𝓇', to: '𝓇', mapping: Mapped("r") }, + Range { from: '𝓈', to: '𝓈', mapping: Mapped("s") }, + Range { from: '𝓉', to: '𝓉', mapping: Mapped("t") }, + Range { from: '𝓊', to: '𝓊', mapping: Mapped("u") }, + Range { from: '𝓋', to: '𝓋', mapping: Mapped("v") }, + Range { from: '𝓌', to: '𝓌', mapping: Mapped("w") }, + Range { from: '𝓍', to: '𝓍', mapping: Mapped("x") }, + Range { from: '𝓎', to: '𝓎', mapping: Mapped("y") }, + Range { from: '𝓏', to: '𝓏', mapping: Mapped("z") }, + Range { from: '𝓐', to: '𝓐', mapping: Mapped("a") }, + Range { from: '𝓑', to: '𝓑', mapping: Mapped("b") }, + Range { from: '𝓒', to: '𝓒', mapping: Mapped("c") }, + Range { from: '𝓓', to: '𝓓', mapping: Mapped("d") }, + Range { from: '𝓔', to: '𝓔', mapping: Mapped("e") }, + Range { from: '𝓕', to: '𝓕', mapping: Mapped("f") }, + Range { from: '𝓖', to: '𝓖', mapping: Mapped("g") }, + Range { from: '𝓗', to: '𝓗', mapping: Mapped("h") }, + Range { from: '𝓘', to: '𝓘', mapping: Mapped("i") }, + Range { from: '𝓙', to: '𝓙', mapping: Mapped("j") }, + Range { from: '𝓚', to: '𝓚', mapping: Mapped("k") }, + Range { from: '𝓛', to: '𝓛', mapping: Mapped("l") }, + Range { from: '𝓜', to: '𝓜', mapping: Mapped("m") }, + Range { from: '𝓝', to: '𝓝', mapping: Mapped("n") }, + Range { from: '𝓞', to: '𝓞', mapping: Mapped("o") }, + Range { from: '𝓟', to: '𝓟', mapping: Mapped("p") }, + Range { from: '𝓠', to: '𝓠', mapping: Mapped("q") }, + Range { from: '𝓡', to: '𝓡', mapping: Mapped("r") }, + Range { from: '𝓢', to: '𝓢', mapping: Mapped("s") }, + Range { from: '𝓣', to: '𝓣', mapping: Mapped("t") }, + Range { from: '𝓤', to: '𝓤', mapping: Mapped("u") }, + Range { from: '𝓥', to: '𝓥', mapping: Mapped("v") }, + Range { from: '𝓦', to: '𝓦', mapping: Mapped("w") }, + Range { from: '𝓧', to: '𝓧', mapping: Mapped("x") }, + Range { from: '𝓨', to: '𝓨', mapping: Mapped("y") }, + Range { from: '𝓩', to: '𝓩', mapping: Mapped("z") }, + Range { from: '𝓪', to: '𝓪', mapping: Mapped("a") }, + Range { from: '𝓫', to: '𝓫', mapping: Mapped("b") }, + Range { from: '𝓬', to: '𝓬', mapping: Mapped("c") }, + Range { from: '𝓭', to: '𝓭', mapping: Mapped("d") }, + Range { from: '𝓮', to: '𝓮', mapping: Mapped("e") }, + Range { from: '𝓯', to: '𝓯', mapping: Mapped("f") }, + Range { from: '𝓰', to: '𝓰', mapping: Mapped("g") }, + Range { from: '𝓱', to: '𝓱', mapping: Mapped("h") }, + Range { from: '𝓲', to: '𝓲', mapping: Mapped("i") }, + Range { from: '𝓳', to: '𝓳', mapping: Mapped("j") }, + Range { from: '𝓴', to: '𝓴', mapping: Mapped("k") }, + Range { from: '𝓵', to: '𝓵', mapping: Mapped("l") }, + Range { from: '𝓶', to: '𝓶', mapping: Mapped("m") }, + Range { from: '𝓷', to: '𝓷', mapping: Mapped("n") }, + Range { from: '𝓸', to: '𝓸', mapping: Mapped("o") }, + Range { from: '𝓹', to: '𝓹', mapping: Mapped("p") }, + Range { from: '𝓺', to: '𝓺', mapping: Mapped("q") }, + Range { from: '𝓻', to: '𝓻', mapping: Mapped("r") }, + Range { from: '𝓼', to: '𝓼', mapping: Mapped("s") }, + Range { from: '𝓽', to: '𝓽', mapping: Mapped("t") }, + Range { from: '𝓾', to: '𝓾', mapping: Mapped("u") }, + Range { from: '𝓿', to: '𝓿', mapping: Mapped("v") }, + Range { from: '𝔀', to: '𝔀', mapping: Mapped("w") }, + Range { from: '𝔁', to: '𝔁', mapping: Mapped("x") }, + Range { from: '𝔂', to: '𝔂', mapping: Mapped("y") }, + Range { from: '𝔃', to: '𝔃', mapping: Mapped("z") }, + Range { from: '𝔄', to: '𝔄', mapping: Mapped("a") }, + Range { from: '𝔅', to: '𝔅', mapping: Mapped("b") }, + Range { from: '𝔆', to: '𝔆', mapping: Disallowed }, + Range { from: '𝔇', to: '𝔇', mapping: Mapped("d") }, + Range { from: '𝔈', to: '𝔈', mapping: Mapped("e") }, + Range { from: '𝔉', to: '𝔉', mapping: Mapped("f") }, + Range { from: '𝔊', to: '𝔊', mapping: Mapped("g") }, + Range { from: '𝔋', to: '𝔌', mapping: Disallowed }, + Range { from: '𝔍', to: '𝔍', mapping: Mapped("j") }, + Range { from: '𝔎', to: '𝔎', mapping: Mapped("k") }, + Range { from: '𝔏', to: '𝔏', mapping: Mapped("l") }, + Range { from: '𝔐', to: '𝔐', mapping: Mapped("m") }, + Range { from: '𝔑', to: '𝔑', mapping: Mapped("n") }, + Range { from: '𝔒', to: '𝔒', mapping: Mapped("o") }, + Range { from: '𝔓', to: '𝔓', mapping: Mapped("p") }, + Range { from: '𝔔', to: '𝔔', mapping: Mapped("q") }, + Range { from: '𝔕', to: '𝔕', mapping: Disallowed }, + Range { from: '𝔖', to: '𝔖', mapping: Mapped("s") }, + Range { from: '𝔗', to: '𝔗', mapping: Mapped("t") }, + Range { from: '𝔘', to: '𝔘', mapping: Mapped("u") }, + Range { from: '𝔙', to: '𝔙', mapping: Mapped("v") }, + Range { from: '𝔚', to: '𝔚', mapping: Mapped("w") }, + Range { from: '𝔛', to: '𝔛', mapping: Mapped("x") }, + Range { from: '𝔜', to: '𝔜', mapping: Mapped("y") }, + Range { from: '𝔝', to: '𝔝', mapping: Disallowed }, + Range { from: '𝔞', to: '𝔞', mapping: Mapped("a") }, + Range { from: '𝔟', to: '𝔟', mapping: Mapped("b") }, + Range { from: '𝔠', to: '𝔠', mapping: Mapped("c") }, + Range { from: '𝔡', to: '𝔡', mapping: Mapped("d") }, + Range { from: '𝔢', to: '𝔢', mapping: Mapped("e") }, + Range { from: '𝔣', to: '𝔣', mapping: Mapped("f") }, + Range { from: '𝔤', to: '𝔤', mapping: Mapped("g") }, + Range { from: '𝔥', to: '𝔥', mapping: Mapped("h") }, + Range { from: '𝔦', to: '𝔦', mapping: Mapped("i") }, + Range { from: '𝔧', to: '𝔧', mapping: Mapped("j") }, + Range { from: '𝔨', to: '𝔨', mapping: Mapped("k") }, + Range { from: '𝔩', to: '𝔩', mapping: Mapped("l") }, + Range { from: '𝔪', to: '𝔪', mapping: Mapped("m") }, + Range { from: '𝔫', to: '𝔫', mapping: Mapped("n") }, + Range { from: '𝔬', to: '𝔬', mapping: Mapped("o") }, + Range { from: '𝔭', to: '𝔭', mapping: Mapped("p") }, + Range { from: '𝔮', to: '𝔮', mapping: Mapped("q") }, + Range { from: '𝔯', to: '𝔯', mapping: Mapped("r") }, + Range { from: '𝔰', to: '𝔰', mapping: Mapped("s") }, + Range { from: '𝔱', to: '𝔱', mapping: Mapped("t") }, + Range { from: '𝔲', to: '𝔲', mapping: Mapped("u") }, + Range { from: '𝔳', to: '𝔳', mapping: Mapped("v") }, + Range { from: '𝔴', to: '𝔴', mapping: Mapped("w") }, + Range { from: '𝔵', to: '𝔵', mapping: Mapped("x") }, + Range { from: '𝔶', to: '𝔶', mapping: Mapped("y") }, + Range { from: '𝔷', to: '𝔷', mapping: Mapped("z") }, + Range { from: '𝔸', to: '𝔸', mapping: Mapped("a") }, + Range { from: '𝔹', to: '𝔹', mapping: Mapped("b") }, + Range { from: '𝔺', to: '𝔺', mapping: Disallowed }, + Range { from: '𝔻', to: '𝔻', mapping: Mapped("d") }, + Range { from: '𝔼', to: '𝔼', mapping: Mapped("e") }, + Range { from: '𝔽', to: '𝔽', mapping: Mapped("f") }, + Range { from: '𝔾', to: '𝔾', mapping: Mapped("g") }, + Range { from: '𝔿', to: '𝔿', mapping: Disallowed }, + Range { from: '𝕀', to: '𝕀', mapping: Mapped("i") }, + Range { from: '𝕁', to: '𝕁', mapping: Mapped("j") }, + Range { from: '𝕂', to: '𝕂', mapping: Mapped("k") }, + Range { from: '𝕃', to: '𝕃', mapping: Mapped("l") }, + Range { from: '𝕄', to: '𝕄', mapping: Mapped("m") }, + Range { from: '𝕅', to: '𝕅', mapping: Disallowed }, + Range { from: '𝕆', to: '𝕆', mapping: Mapped("o") }, + Range { from: '𝕇', to: '𝕉', mapping: Disallowed }, + Range { from: '𝕊', to: '𝕊', mapping: Mapped("s") }, + Range { from: '𝕋', to: '𝕋', mapping: Mapped("t") }, + Range { from: '𝕌', to: '𝕌', mapping: Mapped("u") }, + Range { from: '𝕍', to: '𝕍', mapping: Mapped("v") }, + Range { from: '𝕎', to: '𝕎', mapping: Mapped("w") }, + Range { from: '𝕏', to: '𝕏', mapping: Mapped("x") }, + Range { from: '𝕐', to: '𝕐', mapping: Mapped("y") }, + Range { from: '𝕑', to: '𝕑', mapping: Disallowed }, + Range { from: '𝕒', to: '𝕒', mapping: Mapped("a") }, + Range { from: '𝕓', to: '𝕓', mapping: Mapped("b") }, + Range { from: '𝕔', to: '𝕔', mapping: Mapped("c") }, + Range { from: '𝕕', to: '𝕕', mapping: Mapped("d") }, + Range { from: '𝕖', to: '𝕖', mapping: Mapped("e") }, + Range { from: '𝕗', to: '𝕗', mapping: Mapped("f") }, + Range { from: '𝕘', to: '𝕘', mapping: Mapped("g") }, + Range { from: '𝕙', to: '𝕙', mapping: Mapped("h") }, + Range { from: '𝕚', to: '𝕚', mapping: Mapped("i") }, + Range { from: '𝕛', to: '𝕛', mapping: Mapped("j") }, + Range { from: '𝕜', to: '𝕜', mapping: Mapped("k") }, + Range { from: '𝕝', to: '𝕝', mapping: Mapped("l") }, + Range { from: '𝕞', to: '𝕞', mapping: Mapped("m") }, + Range { from: '𝕟', to: '𝕟', mapping: Mapped("n") }, + Range { from: '𝕠', to: '𝕠', mapping: Mapped("o") }, + Range { from: '𝕡', to: '𝕡', mapping: Mapped("p") }, + Range { from: '𝕢', to: '𝕢', mapping: Mapped("q") }, + Range { from: '𝕣', to: '𝕣', mapping: Mapped("r") }, + Range { from: '𝕤', to: '𝕤', mapping: Mapped("s") }, + Range { from: '𝕥', to: '𝕥', mapping: Mapped("t") }, + Range { from: '𝕦', to: '𝕦', mapping: Mapped("u") }, + Range { from: '𝕧', to: '𝕧', mapping: Mapped("v") }, + Range { from: '𝕨', to: '𝕨', mapping: Mapped("w") }, + Range { from: '𝕩', to: '𝕩', mapping: Mapped("x") }, + Range { from: '𝕪', to: '𝕪', mapping: Mapped("y") }, + Range { from: '𝕫', to: '𝕫', mapping: Mapped("z") }, + Range { from: '𝕬', to: '𝕬', mapping: Mapped("a") }, + Range { from: '𝕭', to: '𝕭', mapping: Mapped("b") }, + Range { from: '𝕮', to: '𝕮', mapping: Mapped("c") }, + Range { from: '𝕯', to: '𝕯', mapping: Mapped("d") }, + Range { from: '𝕰', to: '𝕰', mapping: Mapped("e") }, + Range { from: '𝕱', to: '𝕱', mapping: Mapped("f") }, + Range { from: '𝕲', to: '𝕲', mapping: Mapped("g") }, + Range { from: '𝕳', to: '𝕳', mapping: Mapped("h") }, + Range { from: '𝕴', to: '𝕴', mapping: Mapped("i") }, + Range { from: '𝕵', to: '𝕵', mapping: Mapped("j") }, + Range { from: '𝕶', to: '𝕶', mapping: Mapped("k") }, + Range { from: '𝕷', to: '𝕷', mapping: Mapped("l") }, + Range { from: '𝕸', to: '𝕸', mapping: Mapped("m") }, + Range { from: '𝕹', to: '𝕹', mapping: Mapped("n") }, + Range { from: '𝕺', to: '𝕺', mapping: Mapped("o") }, + Range { from: '𝕻', to: '𝕻', mapping: Mapped("p") }, + Range { from: '𝕼', to: '𝕼', mapping: Mapped("q") }, + Range { from: '𝕽', to: '𝕽', mapping: Mapped("r") }, + Range { from: '𝕾', to: '𝕾', mapping: Mapped("s") }, + Range { from: '𝕿', to: '𝕿', mapping: Mapped("t") }, + Range { from: '𝖀', to: '𝖀', mapping: Mapped("u") }, + Range { from: '𝖁', to: '𝖁', mapping: Mapped("v") }, + Range { from: '𝖂', to: '𝖂', mapping: Mapped("w") }, + Range { from: '𝖃', to: '𝖃', mapping: Mapped("x") }, + Range { from: '𝖄', to: '𝖄', mapping: Mapped("y") }, + Range { from: '𝖅', to: '𝖅', mapping: Mapped("z") }, + Range { from: '𝖆', to: '𝖆', mapping: Mapped("a") }, + Range { from: '𝖇', to: '𝖇', mapping: Mapped("b") }, + Range { from: '𝖈', to: '𝖈', mapping: Mapped("c") }, + Range { from: '𝖉', to: '𝖉', mapping: Mapped("d") }, + Range { from: '𝖊', to: '𝖊', mapping: Mapped("e") }, + Range { from: '𝖋', to: '𝖋', mapping: Mapped("f") }, + Range { from: '𝖌', to: '𝖌', mapping: Mapped("g") }, + Range { from: '𝖍', to: '𝖍', mapping: Mapped("h") }, + Range { from: '𝖎', to: '𝖎', mapping: Mapped("i") }, + Range { from: '𝖏', to: '𝖏', mapping: Mapped("j") }, + Range { from: '𝖐', to: '𝖐', mapping: Mapped("k") }, + Range { from: '𝖑', to: '𝖑', mapping: Mapped("l") }, + Range { from: '𝖒', to: '𝖒', mapping: Mapped("m") }, + Range { from: '𝖓', to: '𝖓', mapping: Mapped("n") }, + Range { from: '𝖔', to: '𝖔', mapping: Mapped("o") }, + Range { from: '𝖕', to: '𝖕', mapping: Mapped("p") }, + Range { from: '𝖖', to: '𝖖', mapping: Mapped("q") }, + Range { from: '𝖗', to: '𝖗', mapping: Mapped("r") }, + Range { from: '𝖘', to: '𝖘', mapping: Mapped("s") }, + Range { from: '𝖙', to: '𝖙', mapping: Mapped("t") }, + Range { from: '𝖚', to: '𝖚', mapping: Mapped("u") }, + Range { from: '𝖛', to: '𝖛', mapping: Mapped("v") }, + Range { from: '𝖜', to: '𝖜', mapping: Mapped("w") }, + Range { from: '𝖝', to: '𝖝', mapping: Mapped("x") }, + Range { from: '𝖞', to: '𝖞', mapping: Mapped("y") }, + Range { from: '𝖟', to: '𝖟', mapping: Mapped("z") }, + Range { from: '𝖠', to: '𝖠', mapping: Mapped("a") }, + Range { from: '𝖡', to: '𝖡', mapping: Mapped("b") }, + Range { from: '𝖢', to: '𝖢', mapping: Mapped("c") }, + Range { from: '𝖣', to: '𝖣', mapping: Mapped("d") }, + Range { from: '𝖤', to: '𝖤', mapping: Mapped("e") }, + Range { from: '𝖥', to: '𝖥', mapping: Mapped("f") }, + Range { from: '𝖦', to: '𝖦', mapping: Mapped("g") }, + Range { from: '𝖧', to: '𝖧', mapping: Mapped("h") }, + Range { from: '𝖨', to: '𝖨', mapping: Mapped("i") }, + Range { from: '𝖩', to: '𝖩', mapping: Mapped("j") }, + Range { from: '𝖪', to: '𝖪', mapping: Mapped("k") }, + Range { from: '𝖫', to: '𝖫', mapping: Mapped("l") }, + Range { from: '𝖬', to: '𝖬', mapping: Mapped("m") }, + Range { from: '𝖭', to: '𝖭', mapping: Mapped("n") }, + Range { from: '𝖮', to: '𝖮', mapping: Mapped("o") }, + Range { from: '𝖯', to: '𝖯', mapping: Mapped("p") }, + Range { from: '𝖰', to: '𝖰', mapping: Mapped("q") }, + Range { from: '𝖱', to: '𝖱', mapping: Mapped("r") }, + Range { from: '𝖲', to: '𝖲', mapping: Mapped("s") }, + Range { from: '𝖳', to: '𝖳', mapping: Mapped("t") }, + Range { from: '𝖴', to: '𝖴', mapping: Mapped("u") }, + Range { from: '𝖵', to: '𝖵', mapping: Mapped("v") }, + Range { from: '𝖶', to: '𝖶', mapping: Mapped("w") }, + Range { from: '𝖷', to: '𝖷', mapping: Mapped("x") }, + Range { from: '𝖸', to: '𝖸', mapping: Mapped("y") }, + Range { from: '𝖹', to: '𝖹', mapping: Mapped("z") }, + Range { from: '𝖺', to: '𝖺', mapping: Mapped("a") }, + Range { from: '𝖻', to: '𝖻', mapping: Mapped("b") }, + Range { from: '𝖼', to: '𝖼', mapping: Mapped("c") }, + Range { from: '𝖽', to: '𝖽', mapping: Mapped("d") }, + Range { from: '𝖾', to: '𝖾', mapping: Mapped("e") }, + Range { from: '𝖿', to: '𝖿', mapping: Mapped("f") }, + Range { from: '𝗀', to: '𝗀', mapping: Mapped("g") }, + Range { from: '𝗁', to: '𝗁', mapping: Mapped("h") }, + Range { from: '𝗂', to: '𝗂', mapping: Mapped("i") }, + Range { from: '𝗃', to: '𝗃', mapping: Mapped("j") }, + Range { from: '𝗄', to: '𝗄', mapping: Mapped("k") }, + Range { from: '𝗅', to: '𝗅', mapping: Mapped("l") }, + Range { from: '𝗆', to: '𝗆', mapping: Mapped("m") }, + Range { from: '𝗇', to: '𝗇', mapping: Mapped("n") }, + Range { from: '𝗈', to: '𝗈', mapping: Mapped("o") }, + Range { from: '𝗉', to: '𝗉', mapping: Mapped("p") }, + Range { from: '𝗊', to: '𝗊', mapping: Mapped("q") }, + Range { from: '𝗋', to: '𝗋', mapping: Mapped("r") }, + Range { from: '𝗌', to: '𝗌', mapping: Mapped("s") }, + Range { from: '𝗍', to: '𝗍', mapping: Mapped("t") }, + Range { from: '𝗎', to: '𝗎', mapping: Mapped("u") }, + Range { from: '𝗏', to: '𝗏', mapping: Mapped("v") }, + Range { from: '𝗐', to: '𝗐', mapping: Mapped("w") }, + Range { from: '𝗑', to: '𝗑', mapping: Mapped("x") }, + Range { from: '𝗒', to: '𝗒', mapping: Mapped("y") }, + Range { from: '𝗓', to: '𝗓', mapping: Mapped("z") }, + Range { from: '𝗔', to: '𝗔', mapping: Mapped("a") }, + Range { from: '𝗕', to: '𝗕', mapping: Mapped("b") }, + Range { from: '𝗖', to: '𝗖', mapping: Mapped("c") }, + Range { from: '𝗗', to: '𝗗', mapping: Mapped("d") }, + Range { from: '𝗘', to: '𝗘', mapping: Mapped("e") }, + Range { from: '𝗙', to: '𝗙', mapping: Mapped("f") }, + Range { from: '𝗚', to: '𝗚', mapping: Mapped("g") }, + Range { from: '𝗛', to: '𝗛', mapping: Mapped("h") }, + Range { from: '𝗜', to: '𝗜', mapping: Mapped("i") }, + Range { from: '𝗝', to: '𝗝', mapping: Mapped("j") }, + Range { from: '𝗞', to: '𝗞', mapping: Mapped("k") }, + Range { from: '𝗟', to: '𝗟', mapping: Mapped("l") }, + Range { from: '𝗠', to: '𝗠', mapping: Mapped("m") }, + Range { from: '𝗡', to: '𝗡', mapping: Mapped("n") }, + Range { from: '𝗢', to: '𝗢', mapping: Mapped("o") }, + Range { from: '𝗣', to: '𝗣', mapping: Mapped("p") }, + Range { from: '𝗤', to: '𝗤', mapping: Mapped("q") }, + Range { from: '𝗥', to: '𝗥', mapping: Mapped("r") }, + Range { from: '𝗦', to: '𝗦', mapping: Mapped("s") }, + Range { from: '𝗧', to: '𝗧', mapping: Mapped("t") }, + Range { from: '𝗨', to: '𝗨', mapping: Mapped("u") }, + Range { from: '𝗩', to: '𝗩', mapping: Mapped("v") }, + Range { from: '𝗪', to: '𝗪', mapping: Mapped("w") }, + Range { from: '𝗫', to: '𝗫', mapping: Mapped("x") }, + Range { from: '𝗬', to: '𝗬', mapping: Mapped("y") }, + Range { from: '𝗭', to: '𝗭', mapping: Mapped("z") }, + Range { from: '𝗮', to: '𝗮', mapping: Mapped("a") }, + Range { from: '𝗯', to: '𝗯', mapping: Mapped("b") }, + Range { from: '𝗰', to: '𝗰', mapping: Mapped("c") }, + Range { from: '𝗱', to: '𝗱', mapping: Mapped("d") }, + Range { from: '𝗲', to: '𝗲', mapping: Mapped("e") }, + Range { from: '𝗳', to: '𝗳', mapping: Mapped("f") }, + Range { from: '𝗴', to: '𝗴', mapping: Mapped("g") }, + Range { from: '𝗵', to: '𝗵', mapping: Mapped("h") }, + Range { from: '𝗶', to: '𝗶', mapping: Mapped("i") }, + Range { from: '𝗷', to: '𝗷', mapping: Mapped("j") }, + Range { from: '𝗸', to: '𝗸', mapping: Mapped("k") }, + Range { from: '𝗹', to: '𝗹', mapping: Mapped("l") }, + Range { from: '𝗺', to: '𝗺', mapping: Mapped("m") }, + Range { from: '𝗻', to: '𝗻', mapping: Mapped("n") }, + Range { from: '𝗼', to: '𝗼', mapping: Mapped("o") }, + Range { from: '𝗽', to: '𝗽', mapping: Mapped("p") }, + Range { from: '𝗾', to: '𝗾', mapping: Mapped("q") }, + Range { from: '𝗿', to: '𝗿', mapping: Mapped("r") }, + Range { from: '𝘀', to: '𝘀', mapping: Mapped("s") }, + Range { from: '𝘁', to: '𝘁', mapping: Mapped("t") }, + Range { from: '𝘂', to: '𝘂', mapping: Mapped("u") }, + Range { from: '𝘃', to: '𝘃', mapping: Mapped("v") }, + Range { from: '𝘄', to: '𝘄', mapping: Mapped("w") }, + Range { from: '𝘅', to: '𝘅', mapping: Mapped("x") }, + Range { from: '𝘆', to: '𝘆', mapping: Mapped("y") }, + Range { from: '𝘇', to: '𝘇', mapping: Mapped("z") }, + Range { from: '𝘈', to: '𝘈', mapping: Mapped("a") }, + Range { from: '𝘉', to: '𝘉', mapping: Mapped("b") }, + Range { from: '𝘊', to: '𝘊', mapping: Mapped("c") }, + Range { from: '𝘋', to: '𝘋', mapping: Mapped("d") }, + Range { from: '𝘌', to: '𝘌', mapping: Mapped("e") }, + Range { from: '𝘍', to: '𝘍', mapping: Mapped("f") }, + Range { from: '𝘎', to: '𝘎', mapping: Mapped("g") }, + Range { from: '𝘏', to: '𝘏', mapping: Mapped("h") }, + Range { from: '𝘐', to: '𝘐', mapping: Mapped("i") }, + Range { from: '𝘑', to: '𝘑', mapping: Mapped("j") }, + Range { from: '𝘒', to: '𝘒', mapping: Mapped("k") }, + Range { from: '𝘓', to: '𝘓', mapping: Mapped("l") }, + Range { from: '𝘔', to: '𝘔', mapping: Mapped("m") }, + Range { from: '𝘕', to: '𝘕', mapping: Mapped("n") }, + Range { from: '𝘖', to: '𝘖', mapping: Mapped("o") }, + Range { from: '𝘗', to: '𝘗', mapping: Mapped("p") }, + Range { from: '𝘘', to: '𝘘', mapping: Mapped("q") }, + Range { from: '𝘙', to: '𝘙', mapping: Mapped("r") }, + Range { from: '𝘚', to: '𝘚', mapping: Mapped("s") }, + Range { from: '𝘛', to: '𝘛', mapping: Mapped("t") }, + Range { from: '𝘜', to: '𝘜', mapping: Mapped("u") }, + Range { from: '𝘝', to: '𝘝', mapping: Mapped("v") }, + Range { from: '𝘞', to: '𝘞', mapping: Mapped("w") }, + Range { from: '𝘟', to: '𝘟', mapping: Mapped("x") }, + Range { from: '𝘠', to: '𝘠', mapping: Mapped("y") }, + Range { from: '𝘡', to: '𝘡', mapping: Mapped("z") }, + Range { from: '𝘢', to: '𝘢', mapping: Mapped("a") }, + Range { from: '𝘣', to: '𝘣', mapping: Mapped("b") }, + Range { from: '𝘤', to: '𝘤', mapping: Mapped("c") }, + Range { from: '𝘥', to: '𝘥', mapping: Mapped("d") }, + Range { from: '𝘦', to: '𝘦', mapping: Mapped("e") }, + Range { from: '𝘧', to: '𝘧', mapping: Mapped("f") }, + Range { from: '𝘨', to: '𝘨', mapping: Mapped("g") }, + Range { from: '𝘩', to: '𝘩', mapping: Mapped("h") }, + Range { from: '𝘪', to: '𝘪', mapping: Mapped("i") }, + Range { from: '𝘫', to: '𝘫', mapping: Mapped("j") }, + Range { from: '𝘬', to: '𝘬', mapping: Mapped("k") }, + Range { from: '𝘭', to: '𝘭', mapping: Mapped("l") }, + Range { from: '𝘮', to: '𝘮', mapping: Mapped("m") }, + Range { from: '𝘯', to: '𝘯', mapping: Mapped("n") }, + Range { from: '𝘰', to: '𝘰', mapping: Mapped("o") }, + Range { from: '𝘱', to: '𝘱', mapping: Mapped("p") }, + Range { from: '𝘲', to: '𝘲', mapping: Mapped("q") }, + Range { from: '𝘳', to: '𝘳', mapping: Mapped("r") }, + Range { from: '𝘴', to: '𝘴', mapping: Mapped("s") }, + Range { from: '𝘵', to: '𝘵', mapping: Mapped("t") }, + Range { from: '𝘶', to: '𝘶', mapping: Mapped("u") }, + Range { from: '𝘷', to: '𝘷', mapping: Mapped("v") }, + Range { from: '𝘸', to: '𝘸', mapping: Mapped("w") }, + Range { from: '𝘹', to: '𝘹', mapping: Mapped("x") }, + Range { from: '𝘺', to: '𝘺', mapping: Mapped("y") }, + Range { from: '𝘻', to: '𝘻', mapping: Mapped("z") }, + Range { from: '𝘼', to: '𝘼', mapping: Mapped("a") }, + Range { from: '𝘽', to: '𝘽', mapping: Mapped("b") }, + Range { from: '𝘾', to: '𝘾', mapping: Mapped("c") }, + Range { from: '𝘿', to: '𝘿', mapping: Mapped("d") }, + Range { from: '𝙀', to: '𝙀', mapping: Mapped("e") }, + Range { from: '𝙁', to: '𝙁', mapping: Mapped("f") }, + Range { from: '𝙂', to: '𝙂', mapping: Mapped("g") }, + Range { from: '𝙃', to: '𝙃', mapping: Mapped("h") }, + Range { from: '𝙄', to: '𝙄', mapping: Mapped("i") }, + Range { from: '𝙅', to: '𝙅', mapping: Mapped("j") }, + Range { from: '𝙆', to: '𝙆', mapping: Mapped("k") }, + Range { from: '𝙇', to: '𝙇', mapping: Mapped("l") }, + Range { from: '𝙈', to: '𝙈', mapping: Mapped("m") }, + Range { from: '𝙉', to: '𝙉', mapping: Mapped("n") }, + Range { from: '𝙊', to: '𝙊', mapping: Mapped("o") }, + Range { from: '𝙋', to: '𝙋', mapping: Mapped("p") }, + Range { from: '𝙌', to: '𝙌', mapping: Mapped("q") }, + Range { from: '𝙍', to: '𝙍', mapping: Mapped("r") }, + Range { from: '𝙎', to: '𝙎', mapping: Mapped("s") }, + Range { from: '𝙏', to: '𝙏', mapping: Mapped("t") }, + Range { from: '𝙐', to: '𝙐', mapping: Mapped("u") }, + Range { from: '𝙑', to: '𝙑', mapping: Mapped("v") }, + Range { from: '𝙒', to: '𝙒', mapping: Mapped("w") }, + Range { from: '𝙓', to: '𝙓', mapping: Mapped("x") }, + Range { from: '𝙔', to: '𝙔', mapping: Mapped("y") }, + Range { from: '𝙕', to: '𝙕', mapping: Mapped("z") }, + Range { from: '𝙖', to: '𝙖', mapping: Mapped("a") }, + Range { from: '𝙗', to: '𝙗', mapping: Mapped("b") }, + Range { from: '𝙘', to: '𝙘', mapping: Mapped("c") }, + Range { from: '𝙙', to: '𝙙', mapping: Mapped("d") }, + Range { from: '𝙚', to: '𝙚', mapping: Mapped("e") }, + Range { from: '𝙛', to: '𝙛', mapping: Mapped("f") }, + Range { from: '𝙜', to: '𝙜', mapping: Mapped("g") }, + Range { from: '𝙝', to: '𝙝', mapping: Mapped("h") }, + Range { from: '𝙞', to: '𝙞', mapping: Mapped("i") }, + Range { from: '𝙟', to: '𝙟', mapping: Mapped("j") }, + Range { from: '𝙠', to: '𝙠', mapping: Mapped("k") }, + Range { from: '𝙡', to: '𝙡', mapping: Mapped("l") }, + Range { from: '𝙢', to: '𝙢', mapping: Mapped("m") }, + Range { from: '𝙣', to: '𝙣', mapping: Mapped("n") }, + Range { from: '𝙤', to: '𝙤', mapping: Mapped("o") }, + Range { from: '𝙥', to: '𝙥', mapping: Mapped("p") }, + Range { from: '𝙦', to: '𝙦', mapping: Mapped("q") }, + Range { from: '𝙧', to: '𝙧', mapping: Mapped("r") }, + Range { from: '𝙨', to: '𝙨', mapping: Mapped("s") }, + Range { from: '𝙩', to: '𝙩', mapping: Mapped("t") }, + Range { from: '𝙪', to: '𝙪', mapping: Mapped("u") }, + Range { from: '𝙫', to: '𝙫', mapping: Mapped("v") }, + Range { from: '𝙬', to: '𝙬', mapping: Mapped("w") }, + Range { from: '𝙭', to: '𝙭', mapping: Mapped("x") }, + Range { from: '𝙮', to: '𝙮', mapping: Mapped("y") }, + Range { from: '𝙯', to: '𝙯', mapping: Mapped("z") }, + Range { from: '𝙰', to: '𝙰', mapping: Mapped("a") }, + Range { from: '𝙱', to: '𝙱', mapping: Mapped("b") }, + Range { from: '𝙲', to: '𝙲', mapping: Mapped("c") }, + Range { from: '𝙳', to: '𝙳', mapping: Mapped("d") }, + Range { from: '𝙴', to: '𝙴', mapping: Mapped("e") }, + Range { from: '𝙵', to: '𝙵', mapping: Mapped("f") }, + Range { from: '𝙶', to: '𝙶', mapping: Mapped("g") }, + Range { from: '𝙷', to: '𝙷', mapping: Mapped("h") }, + Range { from: '𝙸', to: '𝙸', mapping: Mapped("i") }, + Range { from: '𝙹', to: '𝙹', mapping: Mapped("j") }, + Range { from: '𝙺', to: '𝙺', mapping: Mapped("k") }, + Range { from: '𝙻', to: '𝙻', mapping: Mapped("l") }, + Range { from: '𝙼', to: '𝙼', mapping: Mapped("m") }, + Range { from: '𝙽', to: '𝙽', mapping: Mapped("n") }, + Range { from: '𝙾', to: '𝙾', mapping: Mapped("o") }, + Range { from: '𝙿', to: '𝙿', mapping: Mapped("p") }, + Range { from: '𝚀', to: '𝚀', mapping: Mapped("q") }, + Range { from: '𝚁', to: '𝚁', mapping: Mapped("r") }, + Range { from: '𝚂', to: '𝚂', mapping: Mapped("s") }, + Range { from: '𝚃', to: '𝚃', mapping: Mapped("t") }, + Range { from: '𝚄', to: '𝚄', mapping: Mapped("u") }, + Range { from: '𝚅', to: '𝚅', mapping: Mapped("v") }, + Range { from: '𝚆', to: '𝚆', mapping: Mapped("w") }, + Range { from: '𝚇', to: '𝚇', mapping: Mapped("x") }, + Range { from: '𝚈', to: '𝚈', mapping: Mapped("y") }, + Range { from: '𝚉', to: '𝚉', mapping: Mapped("z") }, + Range { from: '𝚊', to: '𝚊', mapping: Mapped("a") }, + Range { from: '𝚋', to: '𝚋', mapping: Mapped("b") }, + Range { from: '𝚌', to: '𝚌', mapping: Mapped("c") }, + Range { from: '𝚍', to: '𝚍', mapping: Mapped("d") }, + Range { from: '𝚎', to: '𝚎', mapping: Mapped("e") }, + Range { from: '𝚏', to: '𝚏', mapping: Mapped("f") }, + Range { from: '𝚐', to: '𝚐', mapping: Mapped("g") }, + Range { from: '𝚑', to: '𝚑', mapping: Mapped("h") }, + Range { from: '𝚒', to: '𝚒', mapping: Mapped("i") }, + Range { from: '𝚓', to: '𝚓', mapping: Mapped("j") }, + Range { from: '𝚔', to: '𝚔', mapping: Mapped("k") }, + Range { from: '𝚕', to: '𝚕', mapping: Mapped("l") }, + Range { from: '𝚖', to: '𝚖', mapping: Mapped("m") }, + Range { from: '𝚗', to: '𝚗', mapping: Mapped("n") }, + Range { from: '𝚘', to: '𝚘', mapping: Mapped("o") }, + Range { from: '𝚙', to: '𝚙', mapping: Mapped("p") }, + Range { from: '𝚚', to: '𝚚', mapping: Mapped("q") }, + Range { from: '𝚛', to: '𝚛', mapping: Mapped("r") }, + Range { from: '𝚜', to: '𝚜', mapping: Mapped("s") }, + Range { from: '𝚝', to: '𝚝', mapping: Mapped("t") }, + Range { from: '𝚞', to: '𝚞', mapping: Mapped("u") }, + Range { from: '𝚟', to: '𝚟', mapping: Mapped("v") }, + Range { from: '𝚠', to: '𝚠', mapping: Mapped("w") }, + Range { from: '𝚡', to: '𝚡', mapping: Mapped("x") }, + Range { from: '𝚢', to: '𝚢', mapping: Mapped("y") }, + Range { from: '𝚣', to: '𝚣', mapping: Mapped("z") }, + Range { from: '𝚤', to: '𝚤', mapping: Mapped("ı") }, + Range { from: '𝚥', to: '𝚥', mapping: Mapped("ȷ") }, + Range { from: '𝚦', to: '𝚧', mapping: Disallowed }, + Range { from: '𝚨', to: '𝚨', mapping: Mapped("α") }, + Range { from: '𝚩', to: '𝚩', mapping: Mapped("β") }, + Range { from: '𝚪', to: '𝚪', mapping: Mapped("γ") }, + Range { from: '𝚫', to: '𝚫', mapping: Mapped("δ") }, + Range { from: '𝚬', to: '𝚬', mapping: Mapped("ε") }, + Range { from: '𝚭', to: '𝚭', mapping: Mapped("ζ") }, + Range { from: '𝚮', to: '𝚮', mapping: Mapped("η") }, + Range { from: '𝚯', to: '𝚯', mapping: Mapped("θ") }, + Range { from: '𝚰', to: '𝚰', mapping: Mapped("ι") }, + Range { from: '𝚱', to: '𝚱', mapping: Mapped("κ") }, + Range { from: '𝚲', to: '𝚲', mapping: Mapped("λ") }, + Range { from: '𝚳', to: '𝚳', mapping: Mapped("μ") }, + Range { from: '𝚴', to: '𝚴', mapping: Mapped("ν") }, + Range { from: '𝚵', to: '𝚵', mapping: Mapped("ξ") }, + Range { from: '𝚶', to: '𝚶', mapping: Mapped("ο") }, + Range { from: '𝚷', to: '𝚷', mapping: Mapped("π") }, + Range { from: '𝚸', to: '𝚸', mapping: Mapped("ρ") }, + Range { from: '𝚹', to: '𝚹', mapping: Mapped("θ") }, + Range { from: '𝚺', to: '𝚺', mapping: Mapped("σ") }, + Range { from: '𝚻', to: '𝚻', mapping: Mapped("τ") }, + Range { from: '𝚼', to: '𝚼', mapping: Mapped("υ") }, + Range { from: '𝚽', to: '𝚽', mapping: Mapped("φ") }, + Range { from: '𝚾', to: '𝚾', mapping: Mapped("χ") }, + Range { from: '𝚿', to: '𝚿', mapping: Mapped("ψ") }, + Range { from: '𝛀', to: '𝛀', mapping: Mapped("ω") }, + Range { from: '𝛁', to: '𝛁', mapping: Mapped("∇") }, + Range { from: '𝛂', to: '𝛂', mapping: Mapped("α") }, + Range { from: '𝛃', to: '𝛃', mapping: Mapped("β") }, + Range { from: '𝛄', to: '𝛄', mapping: Mapped("γ") }, + Range { from: '𝛅', to: '𝛅', mapping: Mapped("δ") }, + Range { from: '𝛆', to: '𝛆', mapping: Mapped("ε") }, + Range { from: '𝛇', to: '𝛇', mapping: Mapped("ζ") }, + Range { from: '𝛈', to: '𝛈', mapping: Mapped("η") }, + Range { from: '𝛉', to: '𝛉', mapping: Mapped("θ") }, + Range { from: '𝛊', to: '𝛊', mapping: Mapped("ι") }, + Range { from: '𝛋', to: '𝛋', mapping: Mapped("κ") }, + Range { from: '𝛌', to: '𝛌', mapping: Mapped("λ") }, + Range { from: '𝛍', to: '𝛍', mapping: Mapped("μ") }, + Range { from: '𝛎', to: '𝛎', mapping: Mapped("ν") }, + Range { from: '𝛏', to: '𝛏', mapping: Mapped("ξ") }, + Range { from: '𝛐', to: '𝛐', mapping: Mapped("ο") }, + Range { from: '𝛑', to: '𝛑', mapping: Mapped("π") }, + Range { from: '𝛒', to: '𝛒', mapping: Mapped("ρ") }, + Range { from: '𝛓', to: '𝛔', mapping: Mapped("σ") }, + Range { from: '𝛕', to: '𝛕', mapping: Mapped("τ") }, + Range { from: '𝛖', to: '𝛖', mapping: Mapped("υ") }, + Range { from: '𝛗', to: '𝛗', mapping: Mapped("φ") }, + Range { from: '𝛘', to: '𝛘', mapping: Mapped("χ") }, + Range { from: '𝛙', to: '𝛙', mapping: Mapped("ψ") }, + Range { from: '𝛚', to: '𝛚', mapping: Mapped("ω") }, + Range { from: '𝛛', to: '𝛛', mapping: Mapped("∂") }, + Range { from: '𝛜', to: '𝛜', mapping: Mapped("ε") }, + Range { from: '𝛝', to: '𝛝', mapping: Mapped("θ") }, + Range { from: '𝛞', to: '𝛞', mapping: Mapped("κ") }, + Range { from: '𝛟', to: '𝛟', mapping: Mapped("φ") }, + Range { from: '𝛠', to: '𝛠', mapping: Mapped("ρ") }, + Range { from: '𝛡', to: '𝛡', mapping: Mapped("π") }, + Range { from: '𝛢', to: '𝛢', mapping: Mapped("α") }, + Range { from: '𝛣', to: '𝛣', mapping: Mapped("β") }, + Range { from: '𝛤', to: '𝛤', mapping: Mapped("γ") }, + Range { from: '𝛥', to: '𝛥', mapping: Mapped("δ") }, + Range { from: '𝛦', to: '𝛦', mapping: Mapped("ε") }, + Range { from: '𝛧', to: '𝛧', mapping: Mapped("ζ") }, + Range { from: '𝛨', to: '𝛨', mapping: Mapped("η") }, + Range { from: '𝛩', to: '𝛩', mapping: Mapped("θ") }, + Range { from: '𝛪', to: '𝛪', mapping: Mapped("ι") }, + Range { from: '𝛫', to: '𝛫', mapping: Mapped("κ") }, + Range { from: '𝛬', to: '𝛬', mapping: Mapped("λ") }, + Range { from: '𝛭', to: '𝛭', mapping: Mapped("μ") }, + Range { from: '𝛮', to: '𝛮', mapping: Mapped("ν") }, + Range { from: '𝛯', to: '𝛯', mapping: Mapped("ξ") }, + Range { from: '𝛰', to: '𝛰', mapping: Mapped("ο") }, + Range { from: '𝛱', to: '𝛱', mapping: Mapped("π") }, + Range { from: '𝛲', to: '𝛲', mapping: Mapped("ρ") }, + Range { from: '𝛳', to: '𝛳', mapping: Mapped("θ") }, + Range { from: '𝛴', to: '𝛴', mapping: Mapped("σ") }, + Range { from: '𝛵', to: '𝛵', mapping: Mapped("τ") }, + Range { from: '𝛶', to: '𝛶', mapping: Mapped("υ") }, + Range { from: '𝛷', to: '𝛷', mapping: Mapped("φ") }, + Range { from: '𝛸', to: '𝛸', mapping: Mapped("χ") }, + Range { from: '𝛹', to: '𝛹', mapping: Mapped("ψ") }, + Range { from: '𝛺', to: '𝛺', mapping: Mapped("ω") }, + Range { from: '𝛻', to: '𝛻', mapping: Mapped("∇") }, + Range { from: '𝛼', to: '𝛼', mapping: Mapped("α") }, + Range { from: '𝛽', to: '𝛽', mapping: Mapped("β") }, + Range { from: '𝛾', to: '𝛾', mapping: Mapped("γ") }, + Range { from: '𝛿', to: '𝛿', mapping: Mapped("δ") }, + Range { from: '𝜀', to: '𝜀', mapping: Mapped("ε") }, + Range { from: '𝜁', to: '𝜁', mapping: Mapped("ζ") }, + Range { from: '𝜂', to: '𝜂', mapping: Mapped("η") }, + Range { from: '𝜃', to: '𝜃', mapping: Mapped("θ") }, + Range { from: '𝜄', to: '𝜄', mapping: Mapped("ι") }, + Range { from: '𝜅', to: '𝜅', mapping: Mapped("κ") }, + Range { from: '𝜆', to: '𝜆', mapping: Mapped("λ") }, + Range { from: '𝜇', to: '𝜇', mapping: Mapped("μ") }, + Range { from: '𝜈', to: '𝜈', mapping: Mapped("ν") }, + Range { from: '𝜉', to: '𝜉', mapping: Mapped("ξ") }, + Range { from: '𝜊', to: '𝜊', mapping: Mapped("ο") }, + Range { from: '𝜋', to: '𝜋', mapping: Mapped("π") }, + Range { from: '𝜌', to: '𝜌', mapping: Mapped("ρ") }, + Range { from: '𝜍', to: '𝜎', mapping: Mapped("σ") }, + Range { from: '𝜏', to: '𝜏', mapping: Mapped("τ") }, + Range { from: '𝜐', to: '𝜐', mapping: Mapped("υ") }, + Range { from: '𝜑', to: '𝜑', mapping: Mapped("φ") }, + Range { from: '𝜒', to: '𝜒', mapping: Mapped("χ") }, + Range { from: '𝜓', to: '𝜓', mapping: Mapped("ψ") }, + Range { from: '𝜔', to: '𝜔', mapping: Mapped("ω") }, + Range { from: '𝜕', to: '𝜕', mapping: Mapped("∂") }, + Range { from: '𝜖', to: '𝜖', mapping: Mapped("ε") }, + Range { from: '𝜗', to: '𝜗', mapping: Mapped("θ") }, + Range { from: '𝜘', to: '𝜘', mapping: Mapped("κ") }, + Range { from: '𝜙', to: '𝜙', mapping: Mapped("φ") }, + Range { from: '𝜚', to: '𝜚', mapping: Mapped("ρ") }, + Range { from: '𝜛', to: '𝜛', mapping: Mapped("π") }, + Range { from: '𝜜', to: '𝜜', mapping: Mapped("α") }, + Range { from: '𝜝', to: '𝜝', mapping: Mapped("β") }, + Range { from: '𝜞', to: '𝜞', mapping: Mapped("γ") }, + Range { from: '𝜟', to: '𝜟', mapping: Mapped("δ") }, + Range { from: '𝜠', to: '𝜠', mapping: Mapped("ε") }, + Range { from: '𝜡', to: '𝜡', mapping: Mapped("ζ") }, + Range { from: '𝜢', to: '𝜢', mapping: Mapped("η") }, + Range { from: '𝜣', to: '𝜣', mapping: Mapped("θ") }, + Range { from: '𝜤', to: '𝜤', mapping: Mapped("ι") }, + Range { from: '𝜥', to: '𝜥', mapping: Mapped("κ") }, + Range { from: '𝜦', to: '𝜦', mapping: Mapped("λ") }, + Range { from: '𝜧', to: '𝜧', mapping: Mapped("μ") }, + Range { from: '𝜨', to: '𝜨', mapping: Mapped("ν") }, + Range { from: '𝜩', to: '𝜩', mapping: Mapped("ξ") }, + Range { from: '𝜪', to: '𝜪', mapping: Mapped("ο") }, + Range { from: '𝜫', to: '𝜫', mapping: Mapped("π") }, + Range { from: '𝜬', to: '𝜬', mapping: Mapped("ρ") }, + Range { from: '𝜭', to: '𝜭', mapping: Mapped("θ") }, + Range { from: '𝜮', to: '𝜮', mapping: Mapped("σ") }, + Range { from: '𝜯', to: '𝜯', mapping: Mapped("τ") }, + Range { from: '𝜰', to: '𝜰', mapping: Mapped("υ") }, + Range { from: '𝜱', to: '𝜱', mapping: Mapped("φ") }, + Range { from: '𝜲', to: '𝜲', mapping: Mapped("χ") }, + Range { from: '𝜳', to: '𝜳', mapping: Mapped("ψ") }, + Range { from: '𝜴', to: '𝜴', mapping: Mapped("ω") }, + Range { from: '𝜵', to: '𝜵', mapping: Mapped("∇") }, + Range { from: '𝜶', to: '𝜶', mapping: Mapped("α") }, + Range { from: '𝜷', to: '𝜷', mapping: Mapped("β") }, + Range { from: '𝜸', to: '𝜸', mapping: Mapped("γ") }, + Range { from: '𝜹', to: '𝜹', mapping: Mapped("δ") }, + Range { from: '𝜺', to: '𝜺', mapping: Mapped("ε") }, + Range { from: '𝜻', to: '𝜻', mapping: Mapped("ζ") }, + Range { from: '𝜼', to: '𝜼', mapping: Mapped("η") }, + Range { from: '𝜽', to: '𝜽', mapping: Mapped("θ") }, + Range { from: '𝜾', to: '𝜾', mapping: Mapped("ι") }, + Range { from: '𝜿', to: '𝜿', mapping: Mapped("κ") }, + Range { from: '𝝀', to: '𝝀', mapping: Mapped("λ") }, + Range { from: '𝝁', to: '𝝁', mapping: Mapped("μ") }, + Range { from: '𝝂', to: '𝝂', mapping: Mapped("ν") }, + Range { from: '𝝃', to: '𝝃', mapping: Mapped("ξ") }, + Range { from: '𝝄', to: '𝝄', mapping: Mapped("ο") }, + Range { from: '𝝅', to: '𝝅', mapping: Mapped("π") }, + Range { from: '𝝆', to: '𝝆', mapping: Mapped("ρ") }, + Range { from: '𝝇', to: '𝝈', mapping: Mapped("σ") }, + Range { from: '𝝉', to: '𝝉', mapping: Mapped("τ") }, + Range { from: '𝝊', to: '𝝊', mapping: Mapped("υ") }, + Range { from: '𝝋', to: '𝝋', mapping: Mapped("φ") }, + Range { from: '𝝌', to: '𝝌', mapping: Mapped("χ") }, + Range { from: '𝝍', to: '𝝍', mapping: Mapped("ψ") }, + Range { from: '𝝎', to: '𝝎', mapping: Mapped("ω") }, + Range { from: '𝝏', to: '𝝏', mapping: Mapped("∂") }, + Range { from: '𝝐', to: '𝝐', mapping: Mapped("ε") }, + Range { from: '𝝑', to: '𝝑', mapping: Mapped("θ") }, + Range { from: '𝝒', to: '𝝒', mapping: Mapped("κ") }, + Range { from: '𝝓', to: '𝝓', mapping: Mapped("φ") }, + Range { from: '𝝔', to: '𝝔', mapping: Mapped("ρ") }, + Range { from: '𝝕', to: '𝝕', mapping: Mapped("π") }, + Range { from: '𝝖', to: '𝝖', mapping: Mapped("α") }, + Range { from: '𝝗', to: '𝝗', mapping: Mapped("β") }, + Range { from: '𝝘', to: '𝝘', mapping: Mapped("γ") }, + Range { from: '𝝙', to: '𝝙', mapping: Mapped("δ") }, + Range { from: '𝝚', to: '𝝚', mapping: Mapped("ε") }, + Range { from: '𝝛', to: '𝝛', mapping: Mapped("ζ") }, + Range { from: '𝝜', to: '𝝜', mapping: Mapped("η") }, + Range { from: '𝝝', to: '𝝝', mapping: Mapped("θ") }, + Range { from: '𝝞', to: '𝝞', mapping: Mapped("ι") }, + Range { from: '𝝟', to: '𝝟', mapping: Mapped("κ") }, + Range { from: '𝝠', to: '𝝠', mapping: Mapped("λ") }, + Range { from: '𝝡', to: '𝝡', mapping: Mapped("μ") }, + Range { from: '𝝢', to: '𝝢', mapping: Mapped("ν") }, + Range { from: '𝝣', to: '𝝣', mapping: Mapped("ξ") }, + Range { from: '𝝤', to: '𝝤', mapping: Mapped("ο") }, + Range { from: '𝝥', to: '𝝥', mapping: Mapped("π") }, + Range { from: '𝝦', to: '𝝦', mapping: Mapped("ρ") }, + Range { from: '𝝧', to: '𝝧', mapping: Mapped("θ") }, + Range { from: '𝝨', to: '𝝨', mapping: Mapped("σ") }, + Range { from: '𝝩', to: '𝝩', mapping: Mapped("τ") }, + Range { from: '𝝪', to: '𝝪', mapping: Mapped("υ") }, + Range { from: '𝝫', to: '𝝫', mapping: Mapped("φ") }, + Range { from: '𝝬', to: '𝝬', mapping: Mapped("χ") }, + Range { from: '𝝭', to: '𝝭', mapping: Mapped("ψ") }, + Range { from: '𝝮', to: '𝝮', mapping: Mapped("ω") }, + Range { from: '𝝯', to: '𝝯', mapping: Mapped("∇") }, + Range { from: '𝝰', to: '𝝰', mapping: Mapped("α") }, + Range { from: '𝝱', to: '𝝱', mapping: Mapped("β") }, + Range { from: '𝝲', to: '𝝲', mapping: Mapped("γ") }, + Range { from: '𝝳', to: '𝝳', mapping: Mapped("δ") }, + Range { from: '𝝴', to: '𝝴', mapping: Mapped("ε") }, + Range { from: '𝝵', to: '𝝵', mapping: Mapped("ζ") }, + Range { from: '𝝶', to: '𝝶', mapping: Mapped("η") }, + Range { from: '𝝷', to: '𝝷', mapping: Mapped("θ") }, + Range { from: '𝝸', to: '𝝸', mapping: Mapped("ι") }, + Range { from: '𝝹', to: '𝝹', mapping: Mapped("κ") }, + Range { from: '𝝺', to: '𝝺', mapping: Mapped("λ") }, + Range { from: '𝝻', to: '𝝻', mapping: Mapped("μ") }, + Range { from: '𝝼', to: '𝝼', mapping: Mapped("ν") }, + Range { from: '𝝽', to: '𝝽', mapping: Mapped("ξ") }, + Range { from: '𝝾', to: '𝝾', mapping: Mapped("ο") }, + Range { from: '𝝿', to: '𝝿', mapping: Mapped("π") }, + Range { from: '𝞀', to: '𝞀', mapping: Mapped("ρ") }, + Range { from: '𝞁', to: '𝞂', mapping: Mapped("σ") }, + Range { from: '𝞃', to: '𝞃', mapping: Mapped("τ") }, + Range { from: '𝞄', to: '𝞄', mapping: Mapped("υ") }, + Range { from: '𝞅', to: '𝞅', mapping: Mapped("φ") }, + Range { from: '𝞆', to: '𝞆', mapping: Mapped("χ") }, + Range { from: '𝞇', to: '𝞇', mapping: Mapped("ψ") }, + Range { from: '𝞈', to: '𝞈', mapping: Mapped("ω") }, + Range { from: '𝞉', to: '𝞉', mapping: Mapped("∂") }, + Range { from: '𝞊', to: '𝞊', mapping: Mapped("ε") }, + Range { from: '𝞋', to: '𝞋', mapping: Mapped("θ") }, + Range { from: '𝞌', to: '𝞌', mapping: Mapped("κ") }, + Range { from: '𝞍', to: '𝞍', mapping: Mapped("φ") }, + Range { from: '𝞎', to: '𝞎', mapping: Mapped("ρ") }, + Range { from: '𝞏', to: '𝞏', mapping: Mapped("π") }, + Range { from: '𝞐', to: '𝞐', mapping: Mapped("α") }, + Range { from: '𝞑', to: '𝞑', mapping: Mapped("β") }, + Range { from: '𝞒', to: '𝞒', mapping: Mapped("γ") }, + Range { from: '𝞓', to: '𝞓', mapping: Mapped("δ") }, + Range { from: '𝞔', to: '𝞔', mapping: Mapped("ε") }, + Range { from: '𝞕', to: '𝞕', mapping: Mapped("ζ") }, + Range { from: '𝞖', to: '𝞖', mapping: Mapped("η") }, + Range { from: '𝞗', to: '𝞗', mapping: Mapped("θ") }, + Range { from: '𝞘', to: '𝞘', mapping: Mapped("ι") }, + Range { from: '𝞙', to: '𝞙', mapping: Mapped("κ") }, + Range { from: '𝞚', to: '𝞚', mapping: Mapped("λ") }, + Range { from: '𝞛', to: '𝞛', mapping: Mapped("μ") }, + Range { from: '𝞜', to: '𝞜', mapping: Mapped("ν") }, + Range { from: '𝞝', to: '𝞝', mapping: Mapped("ξ") }, + Range { from: '𝞞', to: '𝞞', mapping: Mapped("ο") }, + Range { from: '𝞟', to: '𝞟', mapping: Mapped("π") }, + Range { from: '𝞠', to: '𝞠', mapping: Mapped("ρ") }, + Range { from: '𝞡', to: '𝞡', mapping: Mapped("θ") }, + Range { from: '𝞢', to: '𝞢', mapping: Mapped("σ") }, + Range { from: '𝞣', to: '𝞣', mapping: Mapped("τ") }, + Range { from: '𝞤', to: '𝞤', mapping: Mapped("υ") }, + Range { from: '𝞥', to: '𝞥', mapping: Mapped("φ") }, + Range { from: '𝞦', to: '𝞦', mapping: Mapped("χ") }, + Range { from: '𝞧', to: '𝞧', mapping: Mapped("ψ") }, + Range { from: '𝞨', to: '𝞨', mapping: Mapped("ω") }, + Range { from: '𝞩', to: '𝞩', mapping: Mapped("∇") }, + Range { from: '𝞪', to: '𝞪', mapping: Mapped("α") }, + Range { from: '𝞫', to: '𝞫', mapping: Mapped("β") }, + Range { from: '𝞬', to: '𝞬', mapping: Mapped("γ") }, + Range { from: '𝞭', to: '𝞭', mapping: Mapped("δ") }, + Range { from: '𝞮', to: '𝞮', mapping: Mapped("ε") }, + Range { from: '𝞯', to: '𝞯', mapping: Mapped("ζ") }, + Range { from: '𝞰', to: '𝞰', mapping: Mapped("η") }, + Range { from: '𝞱', to: '𝞱', mapping: Mapped("θ") }, + Range { from: '𝞲', to: '𝞲', mapping: Mapped("ι") }, + Range { from: '𝞳', to: '𝞳', mapping: Mapped("κ") }, + Range { from: '𝞴', to: '𝞴', mapping: Mapped("λ") }, + Range { from: '𝞵', to: '𝞵', mapping: Mapped("μ") }, + Range { from: '𝞶', to: '𝞶', mapping: Mapped("ν") }, + Range { from: '𝞷', to: '𝞷', mapping: Mapped("ξ") }, + Range { from: '𝞸', to: '𝞸', mapping: Mapped("ο") }, + Range { from: '𝞹', to: '𝞹', mapping: Mapped("π") }, + Range { from: '𝞺', to: '𝞺', mapping: Mapped("ρ") }, + Range { from: '𝞻', to: '𝞼', mapping: Mapped("σ") }, + Range { from: '𝞽', to: '𝞽', mapping: Mapped("τ") }, + Range { from: '𝞾', to: '𝞾', mapping: Mapped("υ") }, + Range { from: '𝞿', to: '𝞿', mapping: Mapped("φ") }, + Range { from: '𝟀', to: '𝟀', mapping: Mapped("χ") }, + Range { from: '𝟁', to: '𝟁', mapping: Mapped("ψ") }, + Range { from: '𝟂', to: '𝟂', mapping: Mapped("ω") }, + Range { from: '𝟃', to: '𝟃', mapping: Mapped("∂") }, + Range { from: '𝟄', to: '𝟄', mapping: Mapped("ε") }, + Range { from: '𝟅', to: '𝟅', mapping: Mapped("θ") }, + Range { from: '𝟆', to: '𝟆', mapping: Mapped("κ") }, + Range { from: '𝟇', to: '𝟇', mapping: Mapped("φ") }, + Range { from: '𝟈', to: '𝟈', mapping: Mapped("ρ") }, + Range { from: '𝟉', to: '𝟉', mapping: Mapped("π") }, + Range { from: '𝟊', to: '𝟋', mapping: Mapped("ϝ") }, + Range { from: '𝟌', to: '𝟍', mapping: Disallowed }, + Range { from: '𝟎', to: '𝟎', mapping: Mapped("0") }, + Range { from: '𝟏', to: '𝟏', mapping: Mapped("1") }, + Range { from: '𝟐', to: '𝟐', mapping: Mapped("2") }, + Range { from: '𝟑', to: '𝟑', mapping: Mapped("3") }, + Range { from: '𝟒', to: '𝟒', mapping: Mapped("4") }, + Range { from: '𝟓', to: '𝟓', mapping: Mapped("5") }, + Range { from: '𝟔', to: '𝟔', mapping: Mapped("6") }, + Range { from: '𝟕', to: '𝟕', mapping: Mapped("7") }, + Range { from: '𝟖', to: '𝟖', mapping: Mapped("8") }, + Range { from: '𝟗', to: '𝟗', mapping: Mapped("9") }, + Range { from: '𝟘', to: '𝟘', mapping: Mapped("0") }, + Range { from: '𝟙', to: '𝟙', mapping: Mapped("1") }, + Range { from: '𝟚', to: '𝟚', mapping: Mapped("2") }, + Range { from: '𝟛', to: '𝟛', mapping: Mapped("3") }, + Range { from: '𝟜', to: '𝟜', mapping: Mapped("4") }, + Range { from: '𝟝', to: '𝟝', mapping: Mapped("5") }, + Range { from: '𝟞', to: '𝟞', mapping: Mapped("6") }, + Range { from: '𝟟', to: '𝟟', mapping: Mapped("7") }, + Range { from: '𝟠', to: '𝟠', mapping: Mapped("8") }, + Range { from: '𝟡', to: '𝟡', mapping: Mapped("9") }, + Range { from: '𝟢', to: '𝟢', mapping: Mapped("0") }, + Range { from: '𝟣', to: '𝟣', mapping: Mapped("1") }, + Range { from: '𝟤', to: '𝟤', mapping: Mapped("2") }, + Range { from: '𝟥', to: '𝟥', mapping: Mapped("3") }, + Range { from: '𝟦', to: '𝟦', mapping: Mapped("4") }, + Range { from: '𝟧', to: '𝟧', mapping: Mapped("5") }, + Range { from: '𝟨', to: '𝟨', mapping: Mapped("6") }, + Range { from: '𝟩', to: '𝟩', mapping: Mapped("7") }, + Range { from: '𝟪', to: '𝟪', mapping: Mapped("8") }, + Range { from: '𝟫', to: '𝟫', mapping: Mapped("9") }, + Range { from: '𝟬', to: '𝟬', mapping: Mapped("0") }, + Range { from: '𝟭', to: '𝟭', mapping: Mapped("1") }, + Range { from: '𝟮', to: '𝟮', mapping: Mapped("2") }, + Range { from: '𝟯', to: '𝟯', mapping: Mapped("3") }, + Range { from: '𝟰', to: '𝟰', mapping: Mapped("4") }, + Range { from: '𝟱', to: '𝟱', mapping: Mapped("5") }, + Range { from: '𝟲', to: '𝟲', mapping: Mapped("6") }, + Range { from: '𝟳', to: '𝟳', mapping: Mapped("7") }, + Range { from: '𝟴', to: '𝟴', mapping: Mapped("8") }, + Range { from: '𝟵', to: '𝟵', mapping: Mapped("9") }, + Range { from: '𝟶', to: '𝟶', mapping: Mapped("0") }, + Range { from: '𝟷', to: '𝟷', mapping: Mapped("1") }, + Range { from: '𝟸', to: '𝟸', mapping: Mapped("2") }, + Range { from: '𝟹', to: '𝟹', mapping: Mapped("3") }, + Range { from: '𝟺', to: '𝟺', mapping: Mapped("4") }, + Range { from: '𝟻', to: '𝟻', mapping: Mapped("5") }, + Range { from: '𝟼', to: '𝟼', mapping: Mapped("6") }, + Range { from: '𝟽', to: '𝟽', mapping: Mapped("7") }, + Range { from: '𝟾', to: '𝟾', mapping: Mapped("8") }, + Range { from: '𝟿', to: '𝟿', mapping: Mapped("9") }, + Range { from: '𝠀', to: '𝧿', mapping: Valid }, + Range { from: '𝨀', to: '𝨶', mapping: Valid }, + Range { from: '𝨷', to: '𝨺', mapping: Valid }, + Range { from: '𝨻', to: '𝩬', mapping: Valid }, + Range { from: '𝩭', to: '𝩴', mapping: Valid }, + Range { from: '𝩵', to: '𝩵', mapping: Valid }, + Range { from: '𝩶', to: '𝪃', mapping: Valid }, + Range { from: '𝪄', to: '𝪄', mapping: Valid }, + Range { from: '𝪅', to: '𝪋', mapping: Valid }, + Range { from: '𝪌', to: '𝪚', mapping: Disallowed }, + Range { from: '𝪛', to: '𝪟', mapping: Valid }, + Range { from: '𝪠', to: '𝪠', mapping: Disallowed }, + Range { from: '𝪡', to: '𝪯', mapping: Valid }, + Range { from: '𝪰', to: '𞟿', mapping: Disallowed }, + Range { from: '𞠀', to: '𞣄', mapping: Valid }, + Range { from: '𞣅', to: '𞣆', mapping: Disallowed }, + Range { from: '𞣇', to: '𞣏', mapping: Valid }, + Range { from: '𞣐', to: '𞣖', mapping: Valid }, + Range { from: '𞣗', to: '𞷿', mapping: Disallowed }, + Range { from: '𞸀', to: '𞸀', mapping: Mapped("ا") }, + Range { from: '𞸁', to: '𞸁', mapping: Mapped("ب") }, + Range { from: '𞸂', to: '𞸂', mapping: Mapped("ج") }, + Range { from: '𞸃', to: '𞸃', mapping: Mapped("د") }, + Range { from: '𞸄', to: '𞸄', mapping: Disallowed }, + Range { from: '𞸅', to: '𞸅', mapping: Mapped("و") }, + Range { from: '𞸆', to: '𞸆', mapping: Mapped("ز") }, + Range { from: '𞸇', to: '𞸇', mapping: Mapped("ح") }, + Range { from: '𞸈', to: '𞸈', mapping: Mapped("ط") }, + Range { from: '𞸉', to: '𞸉', mapping: Mapped("ي") }, + Range { from: '𞸊', to: '𞸊', mapping: Mapped("ك") }, + Range { from: '𞸋', to: '𞸋', mapping: Mapped("ل") }, + Range { from: '𞸌', to: '𞸌', mapping: Mapped("م") }, + Range { from: '𞸍', to: '𞸍', mapping: Mapped("ن") }, + Range { from: '𞸎', to: '𞸎', mapping: Mapped("س") }, + Range { from: '𞸏', to: '𞸏', mapping: Mapped("ع") }, + Range { from: '𞸐', to: '𞸐', mapping: Mapped("ف") }, + Range { from: '𞸑', to: '𞸑', mapping: Mapped("ص") }, + Range { from: '𞸒', to: '𞸒', mapping: Mapped("ق") }, + Range { from: '𞸓', to: '𞸓', mapping: Mapped("ر") }, + Range { from: '𞸔', to: '𞸔', mapping: Mapped("ش") }, + Range { from: '𞸕', to: '𞸕', mapping: Mapped("ت") }, + Range { from: '𞸖', to: '𞸖', mapping: Mapped("ث") }, + Range { from: '𞸗', to: '𞸗', mapping: Mapped("خ") }, + Range { from: '𞸘', to: '𞸘', mapping: Mapped("ذ") }, + Range { from: '𞸙', to: '𞸙', mapping: Mapped("ض") }, + Range { from: '𞸚', to: '𞸚', mapping: Mapped("ظ") }, + Range { from: '𞸛', to: '𞸛', mapping: Mapped("غ") }, + Range { from: '𞸜', to: '𞸜', mapping: Mapped("ٮ") }, + Range { from: '𞸝', to: '𞸝', mapping: Mapped("ں") }, + Range { from: '𞸞', to: '𞸞', mapping: Mapped("ڡ") }, + Range { from: '𞸟', to: '𞸟', mapping: Mapped("ٯ") }, + Range { from: '𞸠', to: '𞸠', mapping: Disallowed }, + Range { from: '𞸡', to: '𞸡', mapping: Mapped("ب") }, + Range { from: '𞸢', to: '𞸢', mapping: Mapped("ج") }, + Range { from: '𞸣', to: '𞸣', mapping: Disallowed }, + Range { from: '𞸤', to: '𞸤', mapping: Mapped("ه") }, + Range { from: '𞸥', to: '𞸦', mapping: Disallowed }, + Range { from: '𞸧', to: '𞸧', mapping: Mapped("ح") }, + Range { from: '𞸨', to: '𞸨', mapping: Disallowed }, + Range { from: '𞸩', to: '𞸩', mapping: Mapped("ي") }, + Range { from: '𞸪', to: '𞸪', mapping: Mapped("ك") }, + Range { from: '𞸫', to: '𞸫', mapping: Mapped("ل") }, + Range { from: '𞸬', to: '𞸬', mapping: Mapped("م") }, + Range { from: '𞸭', to: '𞸭', mapping: Mapped("ن") }, + Range { from: '𞸮', to: '𞸮', mapping: Mapped("س") }, + Range { from: '𞸯', to: '𞸯', mapping: Mapped("ع") }, + Range { from: '𞸰', to: '𞸰', mapping: Mapped("ف") }, + Range { from: '𞸱', to: '𞸱', mapping: Mapped("ص") }, + Range { from: '𞸲', to: '𞸲', mapping: Mapped("ق") }, + Range { from: '𞸳', to: '𞸳', mapping: Disallowed }, + Range { from: '𞸴', to: '𞸴', mapping: Mapped("ش") }, + Range { from: '𞸵', to: '𞸵', mapping: Mapped("ت") }, + Range { from: '𞸶', to: '𞸶', mapping: Mapped("ث") }, + Range { from: '𞸷', to: '𞸷', mapping: Mapped("خ") }, + Range { from: '𞸸', to: '𞸸', mapping: Disallowed }, + Range { from: '𞸹', to: '𞸹', mapping: Mapped("ض") }, + Range { from: '𞸺', to: '𞸺', mapping: Disallowed }, + Range { from: '𞸻', to: '𞸻', mapping: Mapped("غ") }, + Range { from: '𞸼', to: '𞹁', mapping: Disallowed }, + Range { from: '𞹂', to: '𞹂', mapping: Mapped("ج") }, + Range { from: '𞹃', to: '𞹆', mapping: Disallowed }, + Range { from: '𞹇', to: '𞹇', mapping: Mapped("ح") }, + Range { from: '𞹈', to: '𞹈', mapping: Disallowed }, + Range { from: '𞹉', to: '𞹉', mapping: Mapped("ي") }, + Range { from: '𞹊', to: '𞹊', mapping: Disallowed }, + Range { from: '𞹋', to: '𞹋', mapping: Mapped("ل") }, + Range { from: '𞹌', to: '𞹌', mapping: Disallowed }, + Range { from: '𞹍', to: '𞹍', mapping: Mapped("ن") }, + Range { from: '𞹎', to: '𞹎', mapping: Mapped("س") }, + Range { from: '𞹏', to: '𞹏', mapping: Mapped("ع") }, + Range { from: '𞹐', to: '𞹐', mapping: Disallowed }, + Range { from: '𞹑', to: '𞹑', mapping: Mapped("ص") }, + Range { from: '𞹒', to: '𞹒', mapping: Mapped("ق") }, + Range { from: '𞹓', to: '𞹓', mapping: Disallowed }, + Range { from: '𞹔', to: '𞹔', mapping: Mapped("ش") }, + Range { from: '𞹕', to: '𞹖', mapping: Disallowed }, + Range { from: '𞹗', to: '𞹗', mapping: Mapped("خ") }, + Range { from: '𞹘', to: '𞹘', mapping: Disallowed }, + Range { from: '𞹙', to: '𞹙', mapping: Mapped("ض") }, + Range { from: '𞹚', to: '𞹚', mapping: Disallowed }, + Range { from: '𞹛', to: '𞹛', mapping: Mapped("غ") }, + Range { from: '𞹜', to: '𞹜', mapping: Disallowed }, + Range { from: '𞹝', to: '𞹝', mapping: Mapped("ں") }, + Range { from: '𞹞', to: '𞹞', mapping: Disallowed }, + Range { from: '𞹟', to: '𞹟', mapping: Mapped("ٯ") }, + Range { from: '𞹠', to: '𞹠', mapping: Disallowed }, + Range { from: '𞹡', to: '𞹡', mapping: Mapped("ب") }, + Range { from: '𞹢', to: '𞹢', mapping: Mapped("ج") }, + Range { from: '𞹣', to: '𞹣', mapping: Disallowed }, + Range { from: '𞹤', to: '𞹤', mapping: Mapped("ه") }, + Range { from: '𞹥', to: '𞹦', mapping: Disallowed }, + Range { from: '𞹧', to: '𞹧', mapping: Mapped("ح") }, + Range { from: '𞹨', to: '𞹨', mapping: Mapped("ط") }, + Range { from: '𞹩', to: '𞹩', mapping: Mapped("ي") }, + Range { from: '𞹪', to: '𞹪', mapping: Mapped("ك") }, + Range { from: '𞹫', to: '𞹫', mapping: Disallowed }, + Range { from: '𞹬', to: '𞹬', mapping: Mapped("م") }, + Range { from: '𞹭', to: '𞹭', mapping: Mapped("ن") }, + Range { from: '𞹮', to: '𞹮', mapping: Mapped("س") }, + Range { from: '𞹯', to: '𞹯', mapping: Mapped("ع") }, + Range { from: '𞹰', to: '𞹰', mapping: Mapped("ف") }, + Range { from: '𞹱', to: '𞹱', mapping: Mapped("ص") }, + Range { from: '𞹲', to: '𞹲', mapping: Mapped("ق") }, + Range { from: '𞹳', to: '𞹳', mapping: Disallowed }, + Range { from: '𞹴', to: '𞹴', mapping: Mapped("ش") }, + Range { from: '𞹵', to: '𞹵', mapping: Mapped("ت") }, + Range { from: '𞹶', to: '𞹶', mapping: Mapped("ث") }, + Range { from: '𞹷', to: '𞹷', mapping: Mapped("خ") }, + Range { from: '𞹸', to: '𞹸', mapping: Disallowed }, + Range { from: '𞹹', to: '𞹹', mapping: Mapped("ض") }, + Range { from: '𞹺', to: '𞹺', mapping: Mapped("ظ") }, + Range { from: '𞹻', to: '𞹻', mapping: Mapped("غ") }, + Range { from: '𞹼', to: '𞹼', mapping: Mapped("ٮ") }, + Range { from: '𞹽', to: '𞹽', mapping: Disallowed }, + Range { from: '𞹾', to: '𞹾', mapping: Mapped("ڡ") }, + Range { from: '𞹿', to: '𞹿', mapping: Disallowed }, + Range { from: '𞺀', to: '𞺀', mapping: Mapped("ا") }, + Range { from: '𞺁', to: '𞺁', mapping: Mapped("ب") }, + Range { from: '𞺂', to: '𞺂', mapping: Mapped("ج") }, + Range { from: '𞺃', to: '𞺃', mapping: Mapped("د") }, + Range { from: '𞺄', to: '𞺄', mapping: Mapped("ه") }, + Range { from: '𞺅', to: '𞺅', mapping: Mapped("و") }, + Range { from: '𞺆', to: '𞺆', mapping: Mapped("ز") }, + Range { from: '𞺇', to: '𞺇', mapping: Mapped("ح") }, + Range { from: '𞺈', to: '𞺈', mapping: Mapped("ط") }, + Range { from: '𞺉', to: '𞺉', mapping: Mapped("ي") }, + Range { from: '𞺊', to: '𞺊', mapping: Disallowed }, + Range { from: '𞺋', to: '𞺋', mapping: Mapped("ل") }, + Range { from: '𞺌', to: '𞺌', mapping: Mapped("م") }, + Range { from: '𞺍', to: '𞺍', mapping: Mapped("ن") }, + Range { from: '𞺎', to: '𞺎', mapping: Mapped("س") }, + Range { from: '𞺏', to: '𞺏', mapping: Mapped("ع") }, + Range { from: '𞺐', to: '𞺐', mapping: Mapped("ف") }, + Range { from: '𞺑', to: '𞺑', mapping: Mapped("ص") }, + Range { from: '𞺒', to: '𞺒', mapping: Mapped("ق") }, + Range { from: '𞺓', to: '𞺓', mapping: Mapped("ر") }, + Range { from: '𞺔', to: '𞺔', mapping: Mapped("ش") }, + Range { from: '𞺕', to: '𞺕', mapping: Mapped("ت") }, + Range { from: '𞺖', to: '𞺖', mapping: Mapped("ث") }, + Range { from: '𞺗', to: '𞺗', mapping: Mapped("خ") }, + Range { from: '𞺘', to: '𞺘', mapping: Mapped("ذ") }, + Range { from: '𞺙', to: '𞺙', mapping: Mapped("ض") }, + Range { from: '𞺚', to: '𞺚', mapping: Mapped("ظ") }, + Range { from: '𞺛', to: '𞺛', mapping: Mapped("غ") }, + Range { from: '𞺜', to: '𞺠', mapping: Disallowed }, + Range { from: '𞺡', to: '𞺡', mapping: Mapped("ب") }, + Range { from: '𞺢', to: '𞺢', mapping: Mapped("ج") }, + Range { from: '𞺣', to: '𞺣', mapping: Mapped("د") }, + Range { from: '𞺤', to: '𞺤', mapping: Disallowed }, + Range { from: '𞺥', to: '𞺥', mapping: Mapped("و") }, + Range { from: '𞺦', to: '𞺦', mapping: Mapped("ز") }, + Range { from: '𞺧', to: '𞺧', mapping: Mapped("ح") }, + Range { from: '𞺨', to: '𞺨', mapping: Mapped("ط") }, + Range { from: '𞺩', to: '𞺩', mapping: Mapped("ي") }, + Range { from: '𞺪', to: '𞺪', mapping: Disallowed }, + Range { from: '𞺫', to: '𞺫', mapping: Mapped("ل") }, + Range { from: '𞺬', to: '𞺬', mapping: Mapped("م") }, + Range { from: '𞺭', to: '𞺭', mapping: Mapped("ن") }, + Range { from: '𞺮', to: '𞺮', mapping: Mapped("س") }, + Range { from: '𞺯', to: '𞺯', mapping: Mapped("ع") }, + Range { from: '𞺰', to: '𞺰', mapping: Mapped("ف") }, + Range { from: '𞺱', to: '𞺱', mapping: Mapped("ص") }, + Range { from: '𞺲', to: '𞺲', mapping: Mapped("ق") }, + Range { from: '𞺳', to: '𞺳', mapping: Mapped("ر") }, + Range { from: '𞺴', to: '𞺴', mapping: Mapped("ش") }, + Range { from: '𞺵', to: '𞺵', mapping: Mapped("ت") }, + Range { from: '𞺶', to: '𞺶', mapping: Mapped("ث") }, + Range { from: '𞺷', to: '𞺷', mapping: Mapped("خ") }, + Range { from: '𞺸', to: '𞺸', mapping: Mapped("ذ") }, + Range { from: '𞺹', to: '𞺹', mapping: Mapped("ض") }, + Range { from: '𞺺', to: '𞺺', mapping: Mapped("ظ") }, + Range { from: '𞺻', to: '𞺻', mapping: Mapped("غ") }, + Range { from: '𞺼', to: '𞻯', mapping: Disallowed }, + Range { from: '𞻰', to: '𞻱', mapping: Valid }, + Range { from: '𞻲', to: '𞿿', mapping: Disallowed }, + Range { from: '🀀', to: '🀫', mapping: Valid }, + Range { from: '🀬', to: '🀯', mapping: Disallowed }, + Range { from: '🀰', to: '🂓', mapping: Valid }, + Range { from: '🂔', to: '🂟', mapping: Disallowed }, + Range { from: '🂠', to: '🂮', mapping: Valid }, + Range { from: '🂯', to: '🂰', mapping: Disallowed }, + Range { from: '🂱', to: '🂾', mapping: Valid }, + Range { from: '🂿', to: '🂿', mapping: Valid }, + Range { from: '🃀', to: '🃀', mapping: Disallowed }, + Range { from: '🃁', to: '🃏', mapping: Valid }, + Range { from: '🃐', to: '🃐', mapping: Disallowed }, + Range { from: '🃑', to: '🃟', mapping: Valid }, + Range { from: '🃠', to: '🃵', mapping: Valid }, + Range { from: '🃶', to: '🃿', mapping: Disallowed }, + Range { from: '🄀', to: '🄀', mapping: Disallowed }, + Range { from: '🄁', to: '🄁', mapping: DisallowedStd3Mapped("0,") }, + Range { from: '🄂', to: '🄂', mapping: DisallowedStd3Mapped("1,") }, + Range { from: '🄃', to: '🄃', mapping: DisallowedStd3Mapped("2,") }, + Range { from: '🄄', to: '🄄', mapping: DisallowedStd3Mapped("3,") }, + Range { from: '🄅', to: '🄅', mapping: DisallowedStd3Mapped("4,") }, + Range { from: '🄆', to: '🄆', mapping: DisallowedStd3Mapped("5,") }, + Range { from: '🄇', to: '🄇', mapping: DisallowedStd3Mapped("6,") }, + Range { from: '🄈', to: '🄈', mapping: DisallowedStd3Mapped("7,") }, + Range { from: '🄉', to: '🄉', mapping: DisallowedStd3Mapped("8,") }, + Range { from: '🄊', to: '🄊', mapping: DisallowedStd3Mapped("9,") }, + Range { from: '🄋', to: '🄌', mapping: Valid }, + Range { from: '🄍', to: '🄏', mapping: Disallowed }, + Range { from: '🄐', to: '🄐', mapping: DisallowedStd3Mapped("(a)") }, + Range { from: '🄑', to: '🄑', mapping: DisallowedStd3Mapped("(b)") }, + Range { from: '🄒', to: '🄒', mapping: DisallowedStd3Mapped("(c)") }, + Range { from: '🄓', to: '🄓', mapping: DisallowedStd3Mapped("(d)") }, + Range { from: '🄔', to: '🄔', mapping: DisallowedStd3Mapped("(e)") }, + Range { from: '🄕', to: '🄕', mapping: DisallowedStd3Mapped("(f)") }, + Range { from: '🄖', to: '🄖', mapping: DisallowedStd3Mapped("(g)") }, + Range { from: '🄗', to: '🄗', mapping: DisallowedStd3Mapped("(h)") }, + Range { from: '🄘', to: '🄘', mapping: DisallowedStd3Mapped("(i)") }, + Range { from: '🄙', to: '🄙', mapping: DisallowedStd3Mapped("(j)") }, + Range { from: '🄚', to: '🄚', mapping: DisallowedStd3Mapped("(k)") }, + Range { from: '🄛', to: '🄛', mapping: DisallowedStd3Mapped("(l)") }, + Range { from: '🄜', to: '🄜', mapping: DisallowedStd3Mapped("(m)") }, + Range { from: '🄝', to: '🄝', mapping: DisallowedStd3Mapped("(n)") }, + Range { from: '🄞', to: '🄞', mapping: DisallowedStd3Mapped("(o)") }, + Range { from: '🄟', to: '🄟', mapping: DisallowedStd3Mapped("(p)") }, + Range { from: '🄠', to: '🄠', mapping: DisallowedStd3Mapped("(q)") }, + Range { from: '🄡', to: '🄡', mapping: DisallowedStd3Mapped("(r)") }, + Range { from: '🄢', to: '🄢', mapping: DisallowedStd3Mapped("(s)") }, + Range { from: '🄣', to: '🄣', mapping: DisallowedStd3Mapped("(t)") }, + Range { from: '🄤', to: '🄤', mapping: DisallowedStd3Mapped("(u)") }, + Range { from: '🄥', to: '🄥', mapping: DisallowedStd3Mapped("(v)") }, + Range { from: '🄦', to: '🄦', mapping: DisallowedStd3Mapped("(w)") }, + Range { from: '🄧', to: '🄧', mapping: DisallowedStd3Mapped("(x)") }, + Range { from: '🄨', to: '🄨', mapping: DisallowedStd3Mapped("(y)") }, + Range { from: '🄩', to: '🄩', mapping: DisallowedStd3Mapped("(z)") }, + Range { from: '🄪', to: '🄪', mapping: Mapped("〔s〕") }, + Range { from: '🄫', to: '🄫', mapping: Mapped("c") }, + Range { from: '🄬', to: '🄬', mapping: Mapped("r") }, + Range { from: '🄭', to: '🄭', mapping: Mapped("cd") }, + Range { from: '🄮', to: '🄮', mapping: Mapped("wz") }, + Range { from: '🄯', to: '🄯', mapping: Disallowed }, + Range { from: '🄰', to: '🄰', mapping: Mapped("a") }, + Range { from: '🄱', to: '🄱', mapping: Mapped("b") }, + Range { from: '🄲', to: '🄲', mapping: Mapped("c") }, + Range { from: '🄳', to: '🄳', mapping: Mapped("d") }, + Range { from: '🄴', to: '🄴', mapping: Mapped("e") }, + Range { from: '🄵', to: '🄵', mapping: Mapped("f") }, + Range { from: '🄶', to: '🄶', mapping: Mapped("g") }, + Range { from: '🄷', to: '🄷', mapping: Mapped("h") }, + Range { from: '🄸', to: '🄸', mapping: Mapped("i") }, + Range { from: '🄹', to: '🄹', mapping: Mapped("j") }, + Range { from: '🄺', to: '🄺', mapping: Mapped("k") }, + Range { from: '🄻', to: '🄻', mapping: Mapped("l") }, + Range { from: '🄼', to: '🄼', mapping: Mapped("m") }, + Range { from: '🄽', to: '🄽', mapping: Mapped("n") }, + Range { from: '🄾', to: '🄾', mapping: Mapped("o") }, + Range { from: '🄿', to: '🄿', mapping: Mapped("p") }, + Range { from: '🅀', to: '🅀', mapping: Mapped("q") }, + Range { from: '🅁', to: '🅁', mapping: Mapped("r") }, + Range { from: '🅂', to: '🅂', mapping: Mapped("s") }, + Range { from: '🅃', to: '🅃', mapping: Mapped("t") }, + Range { from: '🅄', to: '🅄', mapping: Mapped("u") }, + Range { from: '🅅', to: '🅅', mapping: Mapped("v") }, + Range { from: '🅆', to: '🅆', mapping: Mapped("w") }, + Range { from: '🅇', to: '🅇', mapping: Mapped("x") }, + Range { from: '🅈', to: '🅈', mapping: Mapped("y") }, + Range { from: '🅉', to: '🅉', mapping: Mapped("z") }, + Range { from: '🅊', to: '🅊', mapping: Mapped("hv") }, + Range { from: '🅋', to: '🅋', mapping: Mapped("mv") }, + Range { from: '🅌', to: '🅌', mapping: Mapped("sd") }, + Range { from: '🅍', to: '🅍', mapping: Mapped("ss") }, + Range { from: '🅎', to: '🅎', mapping: Mapped("ppv") }, + Range { from: '🅏', to: '🅏', mapping: Mapped("wc") }, + Range { from: '🅐', to: '🅖', mapping: Valid }, + Range { from: '🅗', to: '🅗', mapping: Valid }, + Range { from: '🅘', to: '🅞', mapping: Valid }, + Range { from: '🅟', to: '🅟', mapping: Valid }, + Range { from: '🅠', to: '🅩', mapping: Valid }, + Range { from: '🅪', to: '🅪', mapping: Mapped("mc") }, + Range { from: '🅫', to: '🅫', mapping: Mapped("md") }, + Range { from: '🅬', to: '🅯', mapping: Disallowed }, + Range { from: '🅰', to: '🅸', mapping: Valid }, + Range { from: '🅹', to: '🅹', mapping: Valid }, + Range { from: '🅺', to: '🅺', mapping: Valid }, + Range { from: '🅻', to: '🅼', mapping: Valid }, + Range { from: '🅽', to: '🅾', mapping: Valid }, + Range { from: '🅿', to: '🅿', mapping: Valid }, + Range { from: '🆀', to: '🆉', mapping: Valid }, + Range { from: '🆊', to: '🆍', mapping: Valid }, + Range { from: '🆎', to: '🆏', mapping: Valid }, + Range { from: '🆐', to: '🆐', mapping: Mapped("dj") }, + Range { from: '🆑', to: '🆚', mapping: Valid }, + Range { from: '🆛', to: '🇥', mapping: Disallowed }, + Range { from: '🇦', to: '🇿', mapping: Valid }, + Range { from: '🈀', to: '🈀', mapping: Mapped("ほか") }, + Range { from: '🈁', to: '🈁', mapping: Mapped("ココ") }, + Range { from: '🈂', to: '🈂', mapping: Mapped("サ") }, + Range { from: '🈃', to: '🈏', mapping: Disallowed }, + Range { from: '🈐', to: '🈐', mapping: Mapped("手") }, + Range { from: '🈑', to: '🈑', mapping: Mapped("字") }, + Range { from: '🈒', to: '🈒', mapping: Mapped("双") }, + Range { from: '🈓', to: '🈓', mapping: Mapped("デ") }, + Range { from: '🈔', to: '🈔', mapping: Mapped("二") }, + Range { from: '🈕', to: '🈕', mapping: Mapped("多") }, + Range { from: '🈖', to: '🈖', mapping: Mapped("解") }, + Range { from: '🈗', to: '🈗', mapping: Mapped("天") }, + Range { from: '🈘', to: '🈘', mapping: Mapped("交") }, + Range { from: '🈙', to: '🈙', mapping: Mapped("映") }, + Range { from: '🈚', to: '🈚', mapping: Mapped("無") }, + Range { from: '🈛', to: '🈛', mapping: Mapped("料") }, + Range { from: '🈜', to: '🈜', mapping: Mapped("前") }, + Range { from: '🈝', to: '🈝', mapping: Mapped("後") }, + Range { from: '🈞', to: '🈞', mapping: Mapped("再") }, + Range { from: '🈟', to: '🈟', mapping: Mapped("新") }, + Range { from: '🈠', to: '🈠', mapping: Mapped("初") }, + Range { from: '🈡', to: '🈡', mapping: Mapped("終") }, + Range { from: '🈢', to: '🈢', mapping: Mapped("生") }, + Range { from: '🈣', to: '🈣', mapping: Mapped("販") }, + Range { from: '🈤', to: '🈤', mapping: Mapped("声") }, + Range { from: '🈥', to: '🈥', mapping: Mapped("吹") }, + Range { from: '🈦', to: '🈦', mapping: Mapped("演") }, + Range { from: '🈧', to: '🈧', mapping: Mapped("投") }, + Range { from: '🈨', to: '🈨', mapping: Mapped("捕") }, + Range { from: '🈩', to: '🈩', mapping: Mapped("一") }, + Range { from: '🈪', to: '🈪', mapping: Mapped("三") }, + Range { from: '🈫', to: '🈫', mapping: Mapped("遊") }, + Range { from: '🈬', to: '🈬', mapping: Mapped("左") }, + Range { from: '🈭', to: '🈭', mapping: Mapped("中") }, + Range { from: '🈮', to: '🈮', mapping: Mapped("右") }, + Range { from: '🈯', to: '🈯', mapping: Mapped("指") }, + Range { from: '🈰', to: '🈰', mapping: Mapped("走") }, + Range { from: '🈱', to: '🈱', mapping: Mapped("打") }, + Range { from: '🈲', to: '🈲', mapping: Mapped("禁") }, + Range { from: '🈳', to: '🈳', mapping: Mapped("空") }, + Range { from: '🈴', to: '🈴', mapping: Mapped("合") }, + Range { from: '🈵', to: '🈵', mapping: Mapped("満") }, + Range { from: '🈶', to: '🈶', mapping: Mapped("有") }, + Range { from: '🈷', to: '🈷', mapping: Mapped("月") }, + Range { from: '🈸', to: '🈸', mapping: Mapped("申") }, + Range { from: '🈹', to: '🈹', mapping: Mapped("割") }, + Range { from: '🈺', to: '🈺', mapping: Mapped("営") }, + Range { from: '🈻', to: '🈿', mapping: Disallowed }, + Range { from: '🉀', to: '🉀', mapping: Mapped("〔本〕") }, + Range { from: '🉁', to: '🉁', mapping: Mapped("〔三〕") }, + Range { from: '🉂', to: '🉂', mapping: Mapped("〔二〕") }, + Range { from: '🉃', to: '🉃', mapping: Mapped("〔安〕") }, + Range { from: '🉄', to: '🉄', mapping: Mapped("〔点〕") }, + Range { from: '🉅', to: '🉅', mapping: Mapped("〔打〕") }, + Range { from: '🉆', to: '🉆', mapping: Mapped("〔盗〕") }, + Range { from: '🉇', to: '🉇', mapping: Mapped("〔勝〕") }, + Range { from: '🉈', to: '🉈', mapping: Mapped("〔敗〕") }, + Range { from: '🉉', to: '🉏', mapping: Disallowed }, + Range { from: '🉐', to: '🉐', mapping: Mapped("得") }, + Range { from: '🉑', to: '🉑', mapping: Mapped("可") }, + Range { from: '🉒', to: '🋿', mapping: Disallowed }, + Range { from: '🌀', to: '🌠', mapping: Valid }, + Range { from: '🌡', to: '🌬', mapping: Valid }, + Range { from: '🌭', to: '🌯', mapping: Valid }, + Range { from: '🌰', to: '🌵', mapping: Valid }, + Range { from: '🌶', to: '🌶', mapping: Valid }, + Range { from: '🌷', to: '🍼', mapping: Valid }, + Range { from: '🍽', to: '🍽', mapping: Valid }, + Range { from: '🍾', to: '🍿', mapping: Valid }, + Range { from: '🎀', to: '🎓', mapping: Valid }, + Range { from: '🎔', to: '🎟', mapping: Valid }, + Range { from: '🎠', to: '🏄', mapping: Valid }, + Range { from: '🏅', to: '🏅', mapping: Valid }, + Range { from: '🏆', to: '🏊', mapping: Valid }, + Range { from: '🏋', to: '🏎', mapping: Valid }, + Range { from: '🏏', to: '🏓', mapping: Valid }, + Range { from: '🏔', to: '🏟', mapping: Valid }, + Range { from: '🏠', to: '🏰', mapping: Valid }, + Range { from: '🏱', to: '🏷', mapping: Valid }, + Range { from: '🏸', to: '🏿', mapping: Valid }, + Range { from: '🐀', to: '🐾', mapping: Valid }, + Range { from: '🐿', to: '🐿', mapping: Valid }, + Range { from: '👀', to: '👀', mapping: Valid }, + Range { from: '👁', to: '👁', mapping: Valid }, + Range { from: '👂', to: '📷', mapping: Valid }, + Range { from: '📸', to: '📸', mapping: Valid }, + Range { from: '📹', to: '📼', mapping: Valid }, + Range { from: '📽', to: '📾', mapping: Valid }, + Range { from: '📿', to: '📿', mapping: Valid }, + Range { from: '🔀', to: '🔽', mapping: Valid }, + Range { from: '🔾', to: '🔿', mapping: Valid }, + Range { from: '🕀', to: '🕃', mapping: Valid }, + Range { from: '🕄', to: '🕊', mapping: Valid }, + Range { from: '🕋', to: '🕏', mapping: Valid }, + Range { from: '🕐', to: '🕧', mapping: Valid }, + Range { from: '🕨', to: '🕹', mapping: Valid }, + Range { from: '🕺', to: '🕺', mapping: Disallowed }, + Range { from: '🕻', to: '🖣', mapping: Valid }, + Range { from: '🖤', to: '🖤', mapping: Disallowed }, + Range { from: '🖥', to: '🗺', mapping: Valid }, + Range { from: '🗻', to: '🗿', mapping: Valid }, + Range { from: '😀', to: '😀', mapping: Valid }, + Range { from: '😁', to: '😐', mapping: Valid }, + Range { from: '😑', to: '😑', mapping: Valid }, + Range { from: '😒', to: '😔', mapping: Valid }, + Range { from: '😕', to: '😕', mapping: Valid }, + Range { from: '😖', to: '😖', mapping: Valid }, + Range { from: '😗', to: '😗', mapping: Valid }, + Range { from: '😘', to: '😘', mapping: Valid }, + Range { from: '😙', to: '😙', mapping: Valid }, + Range { from: '😚', to: '😚', mapping: Valid }, + Range { from: '😛', to: '😛', mapping: Valid }, + Range { from: '😜', to: '😞', mapping: Valid }, + Range { from: '😟', to: '😟', mapping: Valid }, + Range { from: '😠', to: '😥', mapping: Valid }, + Range { from: '😦', to: '😧', mapping: Valid }, + Range { from: '😨', to: '😫', mapping: Valid }, + Range { from: '😬', to: '😬', mapping: Valid }, + Range { from: '😭', to: '😭', mapping: Valid }, + Range { from: '😮', to: '😯', mapping: Valid }, + Range { from: '😰', to: '😳', mapping: Valid }, + Range { from: '😴', to: '😴', mapping: Valid }, + Range { from: '😵', to: '🙀', mapping: Valid }, + Range { from: '🙁', to: '🙂', mapping: Valid }, + Range { from: '🙃', to: '🙄', mapping: Valid }, + Range { from: '🙅', to: '🙏', mapping: Valid }, + Range { from: '🙐', to: '🙿', mapping: Valid }, + Range { from: '🚀', to: '🛅', mapping: Valid }, + Range { from: '🛆', to: '🛏', mapping: Valid }, + Range { from: '🛐', to: '🛐', mapping: Valid }, + Range { from: '🛑', to: '🛟', mapping: Disallowed }, + Range { from: '🛠', to: '🛬', mapping: Valid }, + Range { from: '🛭', to: '🛯', mapping: Disallowed }, + Range { from: '🛰', to: '🛳', mapping: Valid }, + Range { from: '🛴', to: '🛿', mapping: Disallowed }, + Range { from: '🜀', to: '🝳', mapping: Valid }, + Range { from: '🝴', to: '🝿', mapping: Disallowed }, + Range { from: '🞀', to: '🟔', mapping: Valid }, + Range { from: '🟕', to: '🟿', mapping: Disallowed }, + Range { from: '🠀', to: '🠋', mapping: Valid }, + Range { from: '🠌', to: '🠏', mapping: Disallowed }, + Range { from: '🠐', to: '🡇', mapping: Valid }, + Range { from: '🡈', to: '🡏', mapping: Disallowed }, + Range { from: '🡐', to: '🡙', mapping: Valid }, + Range { from: '🡚', to: '🡟', mapping: Disallowed }, + Range { from: '🡠', to: '🢇', mapping: Valid }, + Range { from: '🢈', to: '🢏', mapping: Disallowed }, + Range { from: '🢐', to: '🢭', mapping: Valid }, + Range { from: '🢮', to: '🤏', mapping: Disallowed }, + Range { from: '🤐', to: '🤘', mapping: Valid }, + Range { from: '🤙', to: '🥿', mapping: Disallowed }, + Range { from: '🦀', to: '🦄', mapping: Valid }, + Range { from: '🦅', to: '🦿', mapping: Disallowed }, + Range { from: '🧀', to: '🧀', mapping: Valid }, + Range { from: '🧁', to: '🿽', mapping: Disallowed }, + Range { from: '🿾', to: '🿿', mapping: Disallowed }, + Range { from: '𠀀', to: '𪛖', mapping: Valid }, + Range { from: '𪛗', to: '𪛿', mapping: Disallowed }, + Range { from: '𪜀', to: '𫜴', mapping: Valid }, + Range { from: '𫜵', to: '𫜿', mapping: Disallowed }, + Range { from: '𫝀', to: '𫠝', mapping: Valid }, + Range { from: '𫠞', to: '𫠟', mapping: Disallowed }, + Range { from: '𫠠', to: '𬺡', mapping: Valid }, + Range { from: '𬺢', to: '𯟿', mapping: Disallowed }, + Range { from: '丽', to: '丽', mapping: Mapped("丽") }, + Range { from: '丸', to: '丸', mapping: Mapped("丸") }, + Range { from: '乁', to: '乁', mapping: Mapped("乁") }, + Range { from: '𠄢', to: '𠄢', mapping: Mapped("𠄢") }, + Range { from: '你', to: '你', mapping: Mapped("你") }, + Range { from: '侮', to: '侮', mapping: Mapped("侮") }, + Range { from: '侻', to: '侻', mapping: Mapped("侻") }, + Range { from: '倂', to: '倂', mapping: Mapped("倂") }, + Range { from: '偺', to: '偺', mapping: Mapped("偺") }, + Range { from: '備', to: '備', mapping: Mapped("備") }, + Range { from: '僧', to: '僧', mapping: Mapped("僧") }, + Range { from: '像', to: '像', mapping: Mapped("像") }, + Range { from: '㒞', to: '㒞', mapping: Mapped("㒞") }, + Range { from: '𠘺', to: '𠘺', mapping: Mapped("𠘺") }, + Range { from: '免', to: '免', mapping: Mapped("免") }, + Range { from: '兔', to: '兔', mapping: Mapped("兔") }, + Range { from: '兤', to: '兤', mapping: Mapped("兤") }, + Range { from: '具', to: '具', mapping: Mapped("具") }, + Range { from: '𠔜', to: '𠔜', mapping: Mapped("𠔜") }, + Range { from: '㒹', to: '㒹', mapping: Mapped("㒹") }, + Range { from: '內', to: '內', mapping: Mapped("內") }, + Range { from: '再', to: '再', mapping: Mapped("再") }, + Range { from: '𠕋', to: '𠕋', mapping: Mapped("𠕋") }, + Range { from: '冗', to: '冗', mapping: Mapped("冗") }, + Range { from: '冤', to: '冤', mapping: Mapped("冤") }, + Range { from: '仌', to: '仌', mapping: Mapped("仌") }, + Range { from: '冬', to: '冬', mapping: Mapped("冬") }, + Range { from: '况', to: '况', mapping: Mapped("况") }, + Range { from: '𩇟', to: '𩇟', mapping: Mapped("𩇟") }, + Range { from: '凵', to: '凵', mapping: Mapped("凵") }, + Range { from: '刃', to: '刃', mapping: Mapped("刃") }, + Range { from: '㓟', to: '㓟', mapping: Mapped("㓟") }, + Range { from: '刻', to: '刻', mapping: Mapped("刻") }, + Range { from: '剆', to: '剆', mapping: Mapped("剆") }, + Range { from: '割', to: '割', mapping: Mapped("割") }, + Range { from: '剷', to: '剷', mapping: Mapped("剷") }, + Range { from: '㔕', to: '㔕', mapping: Mapped("㔕") }, + Range { from: '勇', to: '勇', mapping: Mapped("勇") }, + Range { from: '勉', to: '勉', mapping: Mapped("勉") }, + Range { from: '勤', to: '勤', mapping: Mapped("勤") }, + Range { from: '勺', to: '勺', mapping: Mapped("勺") }, + Range { from: '包', to: '包', mapping: Mapped("包") }, + Range { from: '匆', to: '匆', mapping: Mapped("匆") }, + Range { from: '北', to: '北', mapping: Mapped("北") }, + Range { from: '卉', to: '卉', mapping: Mapped("卉") }, + Range { from: '卑', to: '卑', mapping: Mapped("卑") }, + Range { from: '博', to: '博', mapping: Mapped("博") }, + Range { from: '即', to: '即', mapping: Mapped("即") }, + Range { from: '卽', to: '卽', mapping: Mapped("卽") }, + Range { from: '卿', to: '卿', mapping: Mapped("卿") }, + Range { from: '𠨬', to: '𠨬', mapping: Mapped("𠨬") }, + Range { from: '灰', to: '灰', mapping: Mapped("灰") }, + Range { from: '及', to: '及', mapping: Mapped("及") }, + Range { from: '叟', to: '叟', mapping: Mapped("叟") }, + Range { from: '𠭣', to: '𠭣', mapping: Mapped("𠭣") }, + Range { from: '叫', to: '叫', mapping: Mapped("叫") }, + Range { from: '叱', to: '叱', mapping: Mapped("叱") }, + Range { from: '吆', to: '吆', mapping: Mapped("吆") }, + Range { from: '咞', to: '咞', mapping: Mapped("咞") }, + Range { from: '吸', to: '吸', mapping: Mapped("吸") }, + Range { from: '呈', to: '呈', mapping: Mapped("呈") }, + Range { from: '周', to: '周', mapping: Mapped("周") }, + Range { from: '咢', to: '咢', mapping: Mapped("咢") }, + Range { from: '哶', to: '哶', mapping: Mapped("哶") }, + Range { from: '唐', to: '唐', mapping: Mapped("唐") }, + Range { from: '啓', to: '啓', mapping: Mapped("啓") }, + Range { from: '啣', to: '啣', mapping: Mapped("啣") }, + Range { from: '善', to: '善', mapping: Mapped("善") }, + Range { from: '喙', to: '喙', mapping: Mapped("喙") }, + Range { from: '喫', to: '喫', mapping: Mapped("喫") }, + Range { from: '喳', to: '喳', mapping: Mapped("喳") }, + Range { from: '嗂', to: '嗂', mapping: Mapped("嗂") }, + Range { from: '圖', to: '圖', mapping: Mapped("圖") }, + Range { from: '嘆', to: '嘆', mapping: Mapped("嘆") }, + Range { from: '圗', to: '圗', mapping: Mapped("圗") }, + Range { from: '噑', to: '噑', mapping: Mapped("噑") }, + Range { from: '噴', to: '噴', mapping: Mapped("噴") }, + Range { from: '切', to: '切', mapping: Mapped("切") }, + Range { from: '壮', to: '壮', mapping: Mapped("壮") }, + Range { from: '城', to: '城', mapping: Mapped("城") }, + Range { from: '埴', to: '埴', mapping: Mapped("埴") }, + Range { from: '堍', to: '堍', mapping: Mapped("堍") }, + Range { from: '型', to: '型', mapping: Mapped("型") }, + Range { from: '堲', to: '堲', mapping: Mapped("堲") }, + Range { from: '報', to: '報', mapping: Mapped("報") }, + Range { from: '墬', to: '墬', mapping: Mapped("墬") }, + Range { from: '𡓤', to: '𡓤', mapping: Mapped("𡓤") }, + Range { from: '売', to: '売', mapping: Mapped("売") }, + Range { from: '壷', to: '壷', mapping: Mapped("壷") }, + Range { from: '夆', to: '夆', mapping: Mapped("夆") }, + Range { from: '多', to: '多', mapping: Mapped("多") }, + Range { from: '夢', to: '夢', mapping: Mapped("夢") }, + Range { from: '奢', to: '奢', mapping: Mapped("奢") }, + Range { from: '𡚨', to: '𡚨', mapping: Mapped("𡚨") }, + Range { from: '𡛪', to: '𡛪', mapping: Mapped("𡛪") }, + Range { from: '姬', to: '姬', mapping: Mapped("姬") }, + Range { from: '娛', to: '娛', mapping: Mapped("娛") }, + Range { from: '娧', to: '娧', mapping: Mapped("娧") }, + Range { from: '姘', to: '姘', mapping: Mapped("姘") }, + Range { from: '婦', to: '婦', mapping: Mapped("婦") }, + Range { from: '㛮', to: '㛮', mapping: Mapped("㛮") }, + Range { from: '㛼', to: '㛼', mapping: Disallowed }, + Range { from: '嬈', to: '嬈', mapping: Mapped("嬈") }, + Range { from: '嬾', to: '嬾', mapping: Mapped("嬾") }, + Range { from: '𡧈', to: '𡧈', mapping: Mapped("𡧈") }, + Range { from: '寃', to: '寃', mapping: Mapped("寃") }, + Range { from: '寘', to: '寘', mapping: Mapped("寘") }, + Range { from: '寧', to: '寧', mapping: Mapped("寧") }, + Range { from: '寳', to: '寳', mapping: Mapped("寳") }, + Range { from: '𡬘', to: '𡬘', mapping: Mapped("𡬘") }, + Range { from: '寿', to: '寿', mapping: Mapped("寿") }, + Range { from: '将', to: '将', mapping: Mapped("将") }, + Range { from: '当', to: '当', mapping: Disallowed }, + Range { from: '尢', to: '尢', mapping: Mapped("尢") }, + Range { from: '㞁', to: '㞁', mapping: Mapped("㞁") }, + Range { from: '屠', to: '屠', mapping: Mapped("屠") }, + Range { from: '屮', to: '屮', mapping: Mapped("屮") }, + Range { from: '峀', to: '峀', mapping: Mapped("峀") }, + Range { from: '岍', to: '岍', mapping: Mapped("岍") }, + Range { from: '𡷤', to: '𡷤', mapping: Mapped("𡷤") }, + Range { from: '嵃', to: '嵃', mapping: Mapped("嵃") }, + Range { from: '𡷦', to: '𡷦', mapping: Mapped("𡷦") }, + Range { from: '嵮', to: '嵮', mapping: Mapped("嵮") }, + Range { from: '嵫', to: '嵫', mapping: Mapped("嵫") }, + Range { from: '嵼', to: '嵼', mapping: Mapped("嵼") }, + Range { from: '巡', to: '巡', mapping: Mapped("巡") }, + Range { from: '巢', to: '巢', mapping: Mapped("巢") }, + Range { from: '㠯', to: '㠯', mapping: Mapped("㠯") }, + Range { from: '巽', to: '巽', mapping: Mapped("巽") }, + Range { from: '帨', to: '帨', mapping: Mapped("帨") }, + Range { from: '帽', to: '帽', mapping: Mapped("帽") }, + Range { from: '幩', to: '幩', mapping: Mapped("幩") }, + Range { from: '㡢', to: '㡢', mapping: Mapped("㡢") }, + Range { from: '𢆃', to: '𢆃', mapping: Mapped("𢆃") }, + Range { from: '㡼', to: '㡼', mapping: Mapped("㡼") }, + Range { from: '庰', to: '庰', mapping: Mapped("庰") }, + Range { from: '庳', to: '庳', mapping: Mapped("庳") }, + Range { from: '庶', to: '庶', mapping: Mapped("庶") }, + Range { from: '廊', to: '廊', mapping: Mapped("廊") }, + Range { from: '𪎒', to: '𪎒', mapping: Mapped("𪎒") }, + Range { from: '廾', to: '廾', mapping: Mapped("廾") }, + Range { from: '𢌱', to: '𢌱', mapping: Mapped("𢌱") }, + Range { from: '舁', to: '舁', mapping: Mapped("舁") }, + Range { from: '弢', to: '弢', mapping: Mapped("弢") }, + Range { from: '㣇', to: '㣇', mapping: Mapped("㣇") }, + Range { from: '𣊸', to: '𣊸', mapping: Mapped("𣊸") }, + Range { from: '𦇚', to: '𦇚', mapping: Mapped("𦇚") }, + Range { from: '形', to: '形', mapping: Mapped("形") }, + Range { from: '彫', to: '彫', mapping: Mapped("彫") }, + Range { from: '㣣', to: '㣣', mapping: Mapped("㣣") }, + Range { from: '徚', to: '徚', mapping: Mapped("徚") }, + Range { from: '忍', to: '忍', mapping: Mapped("忍") }, + Range { from: '志', to: '志', mapping: Mapped("志") }, + Range { from: '忹', to: '忹', mapping: Mapped("忹") }, + Range { from: '悁', to: '悁', mapping: Mapped("悁") }, + Range { from: '㤺', to: '㤺', mapping: Mapped("㤺") }, + Range { from: '㤜', to: '㤜', mapping: Mapped("㤜") }, + Range { from: '悔', to: '悔', mapping: Mapped("悔") }, + Range { from: '𢛔', to: '𢛔', mapping: Mapped("𢛔") }, + Range { from: '惇', to: '惇', mapping: Mapped("惇") }, + Range { from: '慈', to: '慈', mapping: Mapped("慈") }, + Range { from: '慌', to: '慌', mapping: Mapped("慌") }, + Range { from: '慎', to: '慎', mapping: Mapped("慎") }, + Range { from: '慌', to: '慌', mapping: Mapped("慌") }, + Range { from: '慺', to: '慺', mapping: Mapped("慺") }, + Range { from: '憎', to: '憎', mapping: Mapped("憎") }, + Range { from: '憲', to: '憲', mapping: Mapped("憲") }, + Range { from: '憤', to: '憤', mapping: Mapped("憤") }, + Range { from: '憯', to: '憯', mapping: Mapped("憯") }, + Range { from: '懞', to: '懞', mapping: Mapped("懞") }, + Range { from: '懲', to: '懲', mapping: Mapped("懲") }, + Range { from: '懶', to: '懶', mapping: Mapped("懶") }, + Range { from: '成', to: '成', mapping: Mapped("成") }, + Range { from: '戛', to: '戛', mapping: Mapped("戛") }, + Range { from: '扝', to: '扝', mapping: Mapped("扝") }, + Range { from: '抱', to: '抱', mapping: Mapped("抱") }, + Range { from: '拔', to: '拔', mapping: Mapped("拔") }, + Range { from: '捐', to: '捐', mapping: Mapped("捐") }, + Range { from: '𢬌', to: '𢬌', mapping: Mapped("𢬌") }, + Range { from: '挽', to: '挽', mapping: Mapped("挽") }, + Range { from: '拼', to: '拼', mapping: Mapped("拼") }, + Range { from: '捨', to: '捨', mapping: Mapped("捨") }, + Range { from: '掃', to: '掃', mapping: Mapped("掃") }, + Range { from: '揤', to: '揤', mapping: Mapped("揤") }, + Range { from: '𢯱', to: '𢯱', mapping: Mapped("𢯱") }, + Range { from: '搢', to: '搢', mapping: Mapped("搢") }, + Range { from: '揅', to: '揅', mapping: Mapped("揅") }, + Range { from: '掩', to: '掩', mapping: Mapped("掩") }, + Range { from: '㨮', to: '㨮', mapping: Mapped("㨮") }, + Range { from: '摩', to: '摩', mapping: Mapped("摩") }, + Range { from: '摾', to: '摾', mapping: Mapped("摾") }, + Range { from: '撝', to: '撝', mapping: Mapped("撝") }, + Range { from: '摷', to: '摷', mapping: Mapped("摷") }, + Range { from: '㩬', to: '㩬', mapping: Mapped("㩬") }, + Range { from: '敏', to: '敏', mapping: Mapped("敏") }, + Range { from: '敬', to: '敬', mapping: Mapped("敬") }, + Range { from: '𣀊', to: '𣀊', mapping: Mapped("𣀊") }, + Range { from: '旣', to: '旣', mapping: Mapped("旣") }, + Range { from: '書', to: '書', mapping: Mapped("書") }, + Range { from: '晉', to: '晉', mapping: Mapped("晉") }, + Range { from: '㬙', to: '㬙', mapping: Mapped("㬙") }, + Range { from: '暑', to: '暑', mapping: Mapped("暑") }, + Range { from: '㬈', to: '㬈', mapping: Mapped("㬈") }, + Range { from: '㫤', to: '㫤', mapping: Mapped("㫤") }, + Range { from: '冒', to: '冒', mapping: Mapped("冒") }, + Range { from: '冕', to: '冕', mapping: Mapped("冕") }, + Range { from: '最', to: '最', mapping: Mapped("最") }, + Range { from: '暜', to: '暜', mapping: Mapped("暜") }, + Range { from: '肭', to: '肭', mapping: Mapped("肭") }, + Range { from: '䏙', to: '䏙', mapping: Mapped("䏙") }, + Range { from: '朗', to: '朗', mapping: Mapped("朗") }, + Range { from: '望', to: '望', mapping: Mapped("望") }, + Range { from: '朡', to: '朡', mapping: Mapped("朡") }, + Range { from: '杞', to: '杞', mapping: Mapped("杞") }, + Range { from: '杓', to: '杓', mapping: Mapped("杓") }, + Range { from: '𣏃', to: '𣏃', mapping: Mapped("𣏃") }, + Range { from: '㭉', to: '㭉', mapping: Mapped("㭉") }, + Range { from: '柺', to: '柺', mapping: Mapped("柺") }, + Range { from: '枅', to: '枅', mapping: Mapped("枅") }, + Range { from: '桒', to: '桒', mapping: Mapped("桒") }, + Range { from: '梅', to: '梅', mapping: Mapped("梅") }, + Range { from: '𣑭', to: '𣑭', mapping: Mapped("𣑭") }, + Range { from: '梎', to: '梎', mapping: Mapped("梎") }, + Range { from: '栟', to: '栟', mapping: Mapped("栟") }, + Range { from: '椔', to: '椔', mapping: Mapped("椔") }, + Range { from: '㮝', to: '㮝', mapping: Mapped("㮝") }, + Range { from: '楂', to: '楂', mapping: Mapped("楂") }, + Range { from: '榣', to: '榣', mapping: Mapped("榣") }, + Range { from: '槪', to: '槪', mapping: Mapped("槪") }, + Range { from: '檨', to: '檨', mapping: Mapped("檨") }, + Range { from: '𣚣', to: '𣚣', mapping: Mapped("𣚣") }, + Range { from: '櫛', to: '櫛', mapping: Mapped("櫛") }, + Range { from: '㰘', to: '㰘', mapping: Mapped("㰘") }, + Range { from: '次', to: '次', mapping: Mapped("次") }, + Range { from: '𣢧', to: '𣢧', mapping: Mapped("𣢧") }, + Range { from: '歔', to: '歔', mapping: Mapped("歔") }, + Range { from: '㱎', to: '㱎', mapping: Mapped("㱎") }, + Range { from: '歲', to: '歲', mapping: Mapped("歲") }, + Range { from: '殟', to: '殟', mapping: Mapped("殟") }, + Range { from: '殺', to: '殺', mapping: Mapped("殺") }, + Range { from: '殻', to: '殻', mapping: Mapped("殻") }, + Range { from: '𣪍', to: '𣪍', mapping: Mapped("𣪍") }, + Range { from: '𡴋', to: '𡴋', mapping: Mapped("𡴋") }, + Range { from: '𣫺', to: '𣫺', mapping: Mapped("𣫺") }, + Range { from: '汎', to: '汎', mapping: Mapped("汎") }, + Range { from: '𣲼', to: '𣲼', mapping: Mapped("𣲼") }, + Range { from: '沿', to: '沿', mapping: Mapped("沿") }, + Range { from: '泍', to: '泍', mapping: Mapped("泍") }, + Range { from: '汧', to: '汧', mapping: Mapped("汧") }, + Range { from: '洖', to: '洖', mapping: Mapped("洖") }, + Range { from: '派', to: '派', mapping: Mapped("派") }, + Range { from: '海', to: '海', mapping: Mapped("海") }, + Range { from: '流', to: '流', mapping: Mapped("流") }, + Range { from: '浩', to: '浩', mapping: Mapped("浩") }, + Range { from: '浸', to: '浸', mapping: Mapped("浸") }, + Range { from: '涅', to: '涅', mapping: Mapped("涅") }, + Range { from: '𣴞', to: '𣴞', mapping: Mapped("𣴞") }, + Range { from: '洴', to: '洴', mapping: Mapped("洴") }, + Range { from: '港', to: '港', mapping: Mapped("港") }, + Range { from: '湮', to: '湮', mapping: Mapped("湮") }, + Range { from: '㴳', to: '㴳', mapping: Mapped("㴳") }, + Range { from: '滋', to: '滋', mapping: Mapped("滋") }, + Range { from: '滇', to: '滇', mapping: Mapped("滇") }, + Range { from: '𣻑', to: '𣻑', mapping: Mapped("𣻑") }, + Range { from: '淹', to: '淹', mapping: Mapped("淹") }, + Range { from: '潮', to: '潮', mapping: Mapped("潮") }, + Range { from: '𣽞', to: '𣽞', mapping: Mapped("𣽞") }, + Range { from: '𣾎', to: '𣾎', mapping: Mapped("𣾎") }, + Range { from: '濆', to: '濆', mapping: Mapped("濆") }, + Range { from: '瀹', to: '瀹', mapping: Mapped("瀹") }, + Range { from: '瀞', to: '瀞', mapping: Mapped("瀞") }, + Range { from: '瀛', to: '瀛', mapping: Mapped("瀛") }, + Range { from: '㶖', to: '㶖', mapping: Mapped("㶖") }, + Range { from: '灊', to: '灊', mapping: Mapped("灊") }, + Range { from: '災', to: '災', mapping: Mapped("災") }, + Range { from: '灷', to: '灷', mapping: Mapped("灷") }, + Range { from: '炭', to: '炭', mapping: Mapped("炭") }, + Range { from: '𠔥', to: '𠔥', mapping: Mapped("𠔥") }, + Range { from: '煅', to: '煅', mapping: Mapped("煅") }, + Range { from: '𤉣', to: '𤉣', mapping: Mapped("𤉣") }, + Range { from: '熜', to: '熜', mapping: Mapped("熜") }, + Range { from: '𤎫', to: '𤎫', mapping: Disallowed }, + Range { from: '爨', to: '爨', mapping: Mapped("爨") }, + Range { from: '爵', to: '爵', mapping: Mapped("爵") }, + Range { from: '牐', to: '牐', mapping: Mapped("牐") }, + Range { from: '𤘈', to: '𤘈', mapping: Mapped("𤘈") }, + Range { from: '犀', to: '犀', mapping: Mapped("犀") }, + Range { from: '犕', to: '犕', mapping: Mapped("犕") }, + Range { from: '𤜵', to: '𤜵', mapping: Mapped("𤜵") }, + Range { from: '𤠔', to: '𤠔', mapping: Mapped("𤠔") }, + Range { from: '獺', to: '獺', mapping: Mapped("獺") }, + Range { from: '王', to: '王', mapping: Mapped("王") }, + Range { from: '㺬', to: '㺬', mapping: Mapped("㺬") }, + Range { from: '玥', to: '玥', mapping: Mapped("玥") }, + Range { from: '㺸', to: '㺸', mapping: Mapped("㺸") }, + Range { from: '瑇', to: '瑇', mapping: Mapped("瑇") }, + Range { from: '瑜', to: '瑜', mapping: Mapped("瑜") }, + Range { from: '瑱', to: '瑱', mapping: Mapped("瑱") }, + Range { from: '璅', to: '璅', mapping: Mapped("璅") }, + Range { from: '瓊', to: '瓊', mapping: Mapped("瓊") }, + Range { from: '㼛', to: '㼛', mapping: Mapped("㼛") }, + Range { from: '甤', to: '甤', mapping: Mapped("甤") }, + Range { from: '𤰶', to: '𤰶', mapping: Mapped("𤰶") }, + Range { from: '甾', to: '甾', mapping: Mapped("甾") }, + Range { from: '𤲒', to: '𤲒', mapping: Mapped("𤲒") }, + Range { from: '異', to: '異', mapping: Mapped("異") }, + Range { from: '𢆟', to: '𢆟', mapping: Mapped("𢆟") }, + Range { from: '瘐', to: '瘐', mapping: Mapped("瘐") }, + Range { from: '𤾡', to: '𤾡', mapping: Mapped("𤾡") }, + Range { from: '𤾸', to: '𤾸', mapping: Mapped("𤾸") }, + Range { from: '𥁄', to: '𥁄', mapping: Mapped("𥁄") }, + Range { from: '㿼', to: '㿼', mapping: Mapped("㿼") }, + Range { from: '䀈', to: '䀈', mapping: Mapped("䀈") }, + Range { from: '直', to: '直', mapping: Mapped("直") }, + Range { from: '𥃳', to: '𥃳', mapping: Mapped("𥃳") }, + Range { from: '𥃲', to: '𥃲', mapping: Mapped("𥃲") }, + Range { from: '𥄙', to: '𥄙', mapping: Mapped("𥄙") }, + Range { from: '𥄳', to: '𥄳', mapping: Mapped("𥄳") }, + Range { from: '眞', to: '眞', mapping: Mapped("眞") }, + Range { from: '真', to: '真', mapping: Mapped("真") }, + Range { from: '睊', to: '睊', mapping: Mapped("睊") }, + Range { from: '䀹', to: '䀹', mapping: Mapped("䀹") }, + Range { from: '瞋', to: '瞋', mapping: Mapped("瞋") }, + Range { from: '䁆', to: '䁆', mapping: Mapped("䁆") }, + Range { from: '䂖', to: '䂖', mapping: Mapped("䂖") }, + Range { from: '𥐝', to: '𥐝', mapping: Mapped("𥐝") }, + Range { from: '硎', to: '硎', mapping: Mapped("硎") }, + Range { from: '碌', to: '碌', mapping: Mapped("碌") }, + Range { from: '磌', to: '磌', mapping: Mapped("磌") }, + Range { from: '䃣', to: '䃣', mapping: Mapped("䃣") }, + Range { from: '𥘦', to: '𥘦', mapping: Mapped("𥘦") }, + Range { from: '祖', to: '祖', mapping: Mapped("祖") }, + Range { from: '𥚚', to: '𥚚', mapping: Mapped("𥚚") }, + Range { from: '𥛅', to: '𥛅', mapping: Mapped("𥛅") }, + Range { from: '福', to: '福', mapping: Mapped("福") }, + Range { from: '秫', to: '秫', mapping: Mapped("秫") }, + Range { from: '䄯', to: '䄯', mapping: Mapped("䄯") }, + Range { from: '穀', to: '穀', mapping: Mapped("穀") }, + Range { from: '穊', to: '穊', mapping: Mapped("穊") }, + Range { from: '穏', to: '穏', mapping: Mapped("穏") }, + Range { from: '𥥼', to: '𥥼', mapping: Mapped("𥥼") }, + Range { from: '𥪧', to: '𥪧', mapping: Mapped("𥪧") }, + Range { from: '竮', to: '竮', mapping: Disallowed }, + Range { from: '䈂', to: '䈂', mapping: Mapped("䈂") }, + Range { from: '𥮫', to: '𥮫', mapping: Mapped("𥮫") }, + Range { from: '篆', to: '篆', mapping: Mapped("篆") }, + Range { from: '築', to: '築', mapping: Mapped("築") }, + Range { from: '䈧', to: '䈧', mapping: Mapped("䈧") }, + Range { from: '𥲀', to: '𥲀', mapping: Mapped("𥲀") }, + Range { from: '糒', to: '糒', mapping: Mapped("糒") }, + Range { from: '䊠', to: '䊠', mapping: Mapped("䊠") }, + Range { from: '糨', to: '糨', mapping: Mapped("糨") }, + Range { from: '糣', to: '糣', mapping: Mapped("糣") }, + Range { from: '紀', to: '紀', mapping: Mapped("紀") }, + Range { from: '𥾆', to: '𥾆', mapping: Mapped("𥾆") }, + Range { from: '絣', to: '絣', mapping: Mapped("絣") }, + Range { from: '䌁', to: '䌁', mapping: Mapped("䌁") }, + Range { from: '緇', to: '緇', mapping: Mapped("緇") }, + Range { from: '縂', to: '縂', mapping: Mapped("縂") }, + Range { from: '繅', to: '繅', mapping: Mapped("繅") }, + Range { from: '䌴', to: '䌴', mapping: Mapped("䌴") }, + Range { from: '𦈨', to: '𦈨', mapping: Mapped("𦈨") }, + Range { from: '𦉇', to: '𦉇', mapping: Mapped("𦉇") }, + Range { from: '䍙', to: '䍙', mapping: Mapped("䍙") }, + Range { from: '𦋙', to: '𦋙', mapping: Mapped("𦋙") }, + Range { from: '罺', to: '罺', mapping: Mapped("罺") }, + Range { from: '𦌾', to: '𦌾', mapping: Mapped("𦌾") }, + Range { from: '羕', to: '羕', mapping: Mapped("羕") }, + Range { from: '翺', to: '翺', mapping: Mapped("翺") }, + Range { from: '者', to: '者', mapping: Mapped("者") }, + Range { from: '𦓚', to: '𦓚', mapping: Mapped("𦓚") }, + Range { from: '𦔣', to: '𦔣', mapping: Mapped("𦔣") }, + Range { from: '聠', to: '聠', mapping: Mapped("聠") }, + Range { from: '𦖨', to: '𦖨', mapping: Mapped("𦖨") }, + Range { from: '聰', to: '聰', mapping: Mapped("聰") }, + Range { from: '𣍟', to: '𣍟', mapping: Mapped("𣍟") }, + Range { from: '䏕', to: '䏕', mapping: Mapped("䏕") }, + Range { from: '育', to: '育', mapping: Mapped("育") }, + Range { from: '脃', to: '脃', mapping: Mapped("脃") }, + Range { from: '䐋', to: '䐋', mapping: Mapped("䐋") }, + Range { from: '脾', to: '脾', mapping: Mapped("脾") }, + Range { from: '媵', to: '媵', mapping: Mapped("媵") }, + Range { from: '𦞧', to: '𦞧', mapping: Mapped("𦞧") }, + Range { from: '𦞵', to: '𦞵', mapping: Mapped("𦞵") }, + Range { from: '𣎓', to: '𣎓', mapping: Mapped("𣎓") }, + Range { from: '𣎜', to: '𣎜', mapping: Mapped("𣎜") }, + Range { from: '舁', to: '舁', mapping: Mapped("舁") }, + Range { from: '舄', to: '舄', mapping: Mapped("舄") }, + Range { from: '辞', to: '辞', mapping: Mapped("辞") }, + Range { from: '䑫', to: '䑫', mapping: Mapped("䑫") }, + Range { from: '芑', to: '芑', mapping: Mapped("芑") }, + Range { from: '芋', to: '芋', mapping: Mapped("芋") }, + Range { from: '芝', to: '芝', mapping: Mapped("芝") }, + Range { from: '劳', to: '劳', mapping: Mapped("劳") }, + Range { from: '花', to: '花', mapping: Mapped("花") }, + Range { from: '芳', to: '芳', mapping: Mapped("芳") }, + Range { from: '芽', to: '芽', mapping: Mapped("芽") }, + Range { from: '苦', to: '苦', mapping: Mapped("苦") }, + Range { from: '𦬼', to: '𦬼', mapping: Mapped("𦬼") }, + Range { from: '若', to: '若', mapping: Mapped("若") }, + Range { from: '茝', to: '茝', mapping: Mapped("茝") }, + Range { from: '荣', to: '荣', mapping: Mapped("荣") }, + Range { from: '莭', to: '莭', mapping: Mapped("莭") }, + Range { from: '茣', to: '茣', mapping: Mapped("茣") }, + Range { from: '莽', to: '莽', mapping: Mapped("莽") }, + Range { from: '菧', to: '菧', mapping: Mapped("菧") }, + Range { from: '著', to: '著', mapping: Mapped("著") }, + Range { from: '荓', to: '荓', mapping: Mapped("荓") }, + Range { from: '菊', to: '菊', mapping: Mapped("菊") }, + Range { from: '菌', to: '菌', mapping: Mapped("菌") }, + Range { from: '菜', to: '菜', mapping: Mapped("菜") }, + Range { from: '𦰶', to: '𦰶', mapping: Mapped("𦰶") }, + Range { from: '𦵫', to: '𦵫', mapping: Mapped("𦵫") }, + Range { from: '𦳕', to: '𦳕', mapping: Mapped("𦳕") }, + Range { from: '䔫', to: '䔫', mapping: Mapped("䔫") }, + Range { from: '蓱', to: '蓱', mapping: Mapped("蓱") }, + Range { from: '蓳', to: '蓳', mapping: Mapped("蓳") }, + Range { from: '蔖', to: '蔖', mapping: Mapped("蔖") }, + Range { from: '𧏊', to: '𧏊', mapping: Mapped("𧏊") }, + Range { from: '蕤', to: '蕤', mapping: Mapped("蕤") }, + Range { from: '𦼬', to: '𦼬', mapping: Mapped("𦼬") }, + Range { from: '䕝', to: '䕝', mapping: Mapped("䕝") }, + Range { from: '䕡', to: '䕡', mapping: Mapped("䕡") }, + Range { from: '𦾱', to: '𦾱', mapping: Mapped("𦾱") }, + Range { from: '𧃒', to: '𧃒', mapping: Mapped("𧃒") }, + Range { from: '䕫', to: '䕫', mapping: Mapped("䕫") }, + Range { from: '虐', to: '虐', mapping: Mapped("虐") }, + Range { from: '虜', to: '虜', mapping: Mapped("虜") }, + Range { from: '虧', to: '虧', mapping: Mapped("虧") }, + Range { from: '虩', to: '虩', mapping: Mapped("虩") }, + Range { from: '蚩', to: '蚩', mapping: Mapped("蚩") }, + Range { from: '蚈', to: '蚈', mapping: Mapped("蚈") }, + Range { from: '蜎', to: '蜎', mapping: Mapped("蜎") }, + Range { from: '蛢', to: '蛢', mapping: Mapped("蛢") }, + Range { from: '蝹', to: '蝹', mapping: Mapped("蝹") }, + Range { from: '蜨', to: '蜨', mapping: Mapped("蜨") }, + Range { from: '蝫', to: '蝫', mapping: Mapped("蝫") }, + Range { from: '螆', to: '螆', mapping: Mapped("螆") }, + Range { from: '䗗', to: '䗗', mapping: Disallowed }, + Range { from: '蟡', to: '蟡', mapping: Mapped("蟡") }, + Range { from: '蠁', to: '蠁', mapping: Mapped("蠁") }, + Range { from: '䗹', to: '䗹', mapping: Mapped("䗹") }, + Range { from: '衠', to: '衠', mapping: Mapped("衠") }, + Range { from: '衣', to: '衣', mapping: Mapped("衣") }, + Range { from: '𧙧', to: '𧙧', mapping: Mapped("𧙧") }, + Range { from: '裗', to: '裗', mapping: Mapped("裗") }, + Range { from: '裞', to: '裞', mapping: Mapped("裞") }, + Range { from: '䘵', to: '䘵', mapping: Mapped("䘵") }, + Range { from: '裺', to: '裺', mapping: Mapped("裺") }, + Range { from: '㒻', to: '㒻', mapping: Mapped("㒻") }, + Range { from: '𧢮', to: '𧢮', mapping: Mapped("𧢮") }, + Range { from: '𧥦', to: '𧥦', mapping: Mapped("𧥦") }, + Range { from: '䚾', to: '䚾', mapping: Mapped("䚾") }, + Range { from: '䛇', to: '䛇', mapping: Mapped("䛇") }, + Range { from: '誠', to: '誠', mapping: Mapped("誠") }, + Range { from: '諭', to: '諭', mapping: Mapped("諭") }, + Range { from: '變', to: '變', mapping: Mapped("變") }, + Range { from: '豕', to: '豕', mapping: Mapped("豕") }, + Range { from: '𧲨', to: '𧲨', mapping: Mapped("𧲨") }, + Range { from: '貫', to: '貫', mapping: Mapped("貫") }, + Range { from: '賁', to: '賁', mapping: Mapped("賁") }, + Range { from: '贛', to: '贛', mapping: Mapped("贛") }, + Range { from: '起', to: '起', mapping: Mapped("起") }, + Range { from: '𧼯', to: '𧼯', mapping: Mapped("𧼯") }, + Range { from: '𠠄', to: '𠠄', mapping: Mapped("𠠄") }, + Range { from: '跋', to: '跋', mapping: Mapped("跋") }, + Range { from: '趼', to: '趼', mapping: Mapped("趼") }, + Range { from: '跰', to: '跰', mapping: Mapped("跰") }, + Range { from: '𠣞', to: '𠣞', mapping: Mapped("𠣞") }, + Range { from: '軔', to: '軔', mapping: Mapped("軔") }, + Range { from: '輸', to: '輸', mapping: Mapped("輸") }, + Range { from: '𨗒', to: '𨗒', mapping: Mapped("𨗒") }, + Range { from: '𨗭', to: '𨗭', mapping: Mapped("𨗭") }, + Range { from: '邔', to: '邔', mapping: Mapped("邔") }, + Range { from: '郱', to: '郱', mapping: Mapped("郱") }, + Range { from: '鄑', to: '鄑', mapping: Mapped("鄑") }, + Range { from: '𨜮', to: '𨜮', mapping: Mapped("𨜮") }, + Range { from: '鄛', to: '鄛', mapping: Mapped("鄛") }, + Range { from: '鈸', to: '鈸', mapping: Mapped("鈸") }, + Range { from: '鋗', to: '鋗', mapping: Mapped("鋗") }, + Range { from: '鋘', to: '鋘', mapping: Mapped("鋘") }, + Range { from: '鉼', to: '鉼', mapping: Mapped("鉼") }, + Range { from: '鏹', to: '鏹', mapping: Mapped("鏹") }, + Range { from: '鐕', to: '鐕', mapping: Mapped("鐕") }, + Range { from: '𨯺', to: '𨯺', mapping: Mapped("𨯺") }, + Range { from: '開', to: '開', mapping: Mapped("開") }, + Range { from: '䦕', to: '䦕', mapping: Mapped("䦕") }, + Range { from: '閷', to: '閷', mapping: Mapped("閷") }, + Range { from: '𨵷', to: '𨵷', mapping: Mapped("𨵷") }, + Range { from: '䧦', to: '䧦', mapping: Mapped("䧦") }, + Range { from: '雃', to: '雃', mapping: Mapped("雃") }, + Range { from: '嶲', to: '嶲', mapping: Mapped("嶲") }, + Range { from: '霣', to: '霣', mapping: Mapped("霣") }, + Range { from: '𩅅', to: '𩅅', mapping: Mapped("𩅅") }, + Range { from: '𩈚', to: '𩈚', mapping: Mapped("𩈚") }, + Range { from: '䩮', to: '䩮', mapping: Mapped("䩮") }, + Range { from: '䩶', to: '䩶', mapping: Mapped("䩶") }, + Range { from: '韠', to: '韠', mapping: Mapped("韠") }, + Range { from: '𩐊', to: '𩐊', mapping: Mapped("𩐊") }, + Range { from: '䪲', to: '䪲', mapping: Mapped("䪲") }, + Range { from: '𩒖', to: '𩒖', mapping: Mapped("𩒖") }, + Range { from: '頋', to: '頋', mapping: Mapped("頋") }, + Range { from: '頩', to: '頩', mapping: Mapped("頩") }, + Range { from: '𩖶', to: '𩖶', mapping: Mapped("𩖶") }, + Range { from: '飢', to: '飢', mapping: Mapped("飢") }, + Range { from: '䬳', to: '䬳', mapping: Mapped("䬳") }, + Range { from: '餩', to: '餩', mapping: Mapped("餩") }, + Range { from: '馧', to: '馧', mapping: Mapped("馧") }, + Range { from: '駂', to: '駂', mapping: Mapped("駂") }, + Range { from: '駾', to: '駾', mapping: Mapped("駾") }, + Range { from: '䯎', to: '䯎', mapping: Mapped("䯎") }, + Range { from: '𩬰', to: '𩬰', mapping: Mapped("𩬰") }, + Range { from: '鬒', to: '鬒', mapping: Mapped("鬒") }, + Range { from: '鱀', to: '鱀', mapping: Mapped("鱀") }, + Range { from: '鳽', to: '鳽', mapping: Mapped("鳽") }, + Range { from: '䳎', to: '䳎', mapping: Mapped("䳎") }, + Range { from: '䳭', to: '䳭', mapping: Mapped("䳭") }, + Range { from: '鵧', to: '鵧', mapping: Mapped("鵧") }, + Range { from: '𪃎', to: '𪃎', mapping: Mapped("𪃎") }, + Range { from: '䳸', to: '䳸', mapping: Mapped("䳸") }, + Range { from: '𪄅', to: '𪄅', mapping: Mapped("𪄅") }, + Range { from: '𪈎', to: '𪈎', mapping: Mapped("𪈎") }, + Range { from: '𪊑', to: '𪊑', mapping: Mapped("𪊑") }, + Range { from: '麻', to: '麻', mapping: Mapped("麻") }, + Range { from: '䵖', to: '䵖', mapping: Mapped("䵖") }, + Range { from: '黹', to: '黹', mapping: Mapped("黹") }, + Range { from: '黾', to: '黾', mapping: Mapped("黾") }, + Range { from: '鼅', to: '鼅', mapping: Mapped("鼅") }, + Range { from: '鼏', to: '鼏', mapping: Mapped("鼏") }, + Range { from: '鼖', to: '鼖', mapping: Mapped("鼖") }, + Range { from: '鼻', to: '鼻', mapping: Mapped("鼻") }, + Range { from: '𪘀', to: '𪘀', mapping: Mapped("𪘀") }, + Range { from: '𯨞', to: '𯿽', mapping: Disallowed }, + Range { from: '𯿾', to: '𯿿', mapping: Disallowed }, + Range { from: '𰀀', to: '𿿽', mapping: Disallowed }, + Range { from: '𿿾', to: '𿿿', mapping: Disallowed }, + Range { from: '񀀀', to: '񏿽', mapping: Disallowed }, + Range { from: '񏿾', to: '񏿿', mapping: Disallowed }, + Range { from: '񐀀', to: '񟿽', mapping: Disallowed }, + Range { from: '񟿾', to: '񟿿', mapping: Disallowed }, + Range { from: '񠀀', to: '񯿽', mapping: Disallowed }, + Range { from: '񯿾', to: '񯿿', mapping: Disallowed }, + Range { from: '񰀀', to: '񿿽', mapping: Disallowed }, + Range { from: '񿿾', to: '񿿿', mapping: Disallowed }, + Range { from: '򀀀', to: '򏿽', mapping: Disallowed }, + Range { from: '򏿾', to: '򏿿', mapping: Disallowed }, + Range { from: '򐀀', to: '򟿽', mapping: Disallowed }, + Range { from: '򟿾', to: '򟿿', mapping: Disallowed }, + Range { from: '򠀀', to: '򯿽', mapping: Disallowed }, + Range { from: '򯿾', to: '򯿿', mapping: Disallowed }, + Range { from: '򰀀', to: '򿿽', mapping: Disallowed }, + Range { from: '򿿾', to: '򿿿', mapping: Disallowed }, + Range { from: '󀀀', to: '󏿽', mapping: Disallowed }, + Range { from: '󏿾', to: '󏿿', mapping: Disallowed }, + Range { from: '󐀀', to: '󟿽', mapping: Disallowed }, + Range { from: '󟿾', to: '󟿿', mapping: Disallowed }, + Range { from: '󠀀', to: '󠀀', mapping: Disallowed }, + Range { from: '󠀁', to: '󠀁', mapping: Disallowed }, + Range { from: '󠀂', to: '󠀟', mapping: Disallowed }, + Range { from: '󠀠', to: '󠁿', mapping: Disallowed }, + Range { from: '󠂀', to: '󠃿', mapping: Disallowed }, + Range { from: '󠄀', to: '󠇯', mapping: Ignored }, + Range { from: '󠇰', to: '󯿽', mapping: Disallowed }, + Range { from: '󯿾', to: '󯿿', mapping: Disallowed }, + Range { from: '󰀀', to: '󿿽', mapping: Disallowed }, + Range { from: '󿿾', to: '󿿿', mapping: Disallowed }, + Range { from: '􀀀', to: '􏿽', mapping: Disallowed }, + Range { from: '􏿾', to: '􏿿', mapping: Disallowed }, +]; diff --git a/deps/url-0.5.5/tests/IdnaTest.txt b/deps/idna-0.1.0/tests/IdnaTest.txt similarity index 100% rename from deps/url-0.5.5/tests/IdnaTest.txt rename to deps/idna-0.1.0/tests/IdnaTest.txt diff --git a/deps/idna-0.1.0/tests/punycode.rs b/deps/idna-0.1.0/tests/punycode.rs new file mode 100644 index 000000000..b72c0abaa --- /dev/null +++ b/deps/idna-0.1.0/tests/punycode.rs @@ -0,0 +1,65 @@ +// Copyright 2013 Simon Sapin. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +use idna::punycode::{decode, encode_str}; +use rustc_serialize::json::{Json, Object}; +use test::TestFn; + +fn one_test(decoded: &str, encoded: &str) { + match decode(encoded) { + None => panic!("Decoding {} failed.", encoded), + Some(result) => { + let result = result.into_iter().collect::(); + assert!(result == decoded, + format!("Incorrect decoding of \"{}\":\n \"{}\"\n!= \"{}\"\n", + encoded, result, decoded)) + } + } + + match encode_str(decoded) { + None => panic!("Encoding {} failed.", decoded), + Some(result) => { + assert!(result == encoded, + format!("Incorrect encoding of \"{}\":\n \"{}\"\n!= \"{}\"\n", + decoded, result, encoded)) + } + } +} + +fn get_string<'a>(map: &'a Object, key: &str) -> &'a str { + match map.get(&key.to_string()) { + Some(&Json::String(ref s)) => s, + None => "", + _ => panic!(), + } +} + +pub fn collect_tests(add_test: &mut F) { + match Json::from_str(include_str!("punycode_tests.json")) { + Ok(Json::Array(tests)) => for (i, test) in tests.into_iter().enumerate() { + match test { + Json::Object(o) => { + let test_name = { + let desc = get_string(&o, "description"); + if desc.is_empty() { + format!("Punycode {}", i + 1) + } else { + format!("Punycode {}: {}", i + 1, desc) + } + }; + add_test(test_name, TestFn::dyn_test_fn(move || one_test( + get_string(&o, "decoded"), + get_string(&o, "encoded"), + ))) + } + _ => panic!(), + } + }, + other => panic!("{:?}", other) + } +} diff --git a/deps/url-0.2.38/src/punycode_tests.json b/deps/idna-0.1.0/tests/punycode_tests.json similarity index 100% rename from deps/url-0.2.38/src/punycode_tests.json rename to deps/idna-0.1.0/tests/punycode_tests.json diff --git a/deps/idna-0.1.0/tests/tests.rs b/deps/idna-0.1.0/tests/tests.rs new file mode 100644 index 000000000..0a4ad03ee --- /dev/null +++ b/deps/idna-0.1.0/tests/tests.rs @@ -0,0 +1,25 @@ +extern crate idna; +extern crate rustc_serialize; +extern crate test; + +mod punycode; +mod uts46; + +fn main() { + let mut tests = Vec::new(); + { + let mut add_test = |name, run| { + tests.push(test::TestDescAndFn { + desc: test::TestDesc { + name: test::DynTestName(name), + ignore: false, + should_panic: test::ShouldPanic::No, + }, + testfn: run, + }) + }; + punycode::collect_tests(&mut add_test); + uts46::collect_tests(&mut add_test); + } + test::test_main(&std::env::args().collect::>(), tests) +} diff --git a/deps/idna-0.1.0/tests/uts46.rs b/deps/idna-0.1.0/tests/uts46.rs new file mode 100644 index 000000000..038fdf450 --- /dev/null +++ b/deps/idna-0.1.0/tests/uts46.rs @@ -0,0 +1,117 @@ +// Copyright 2013-2014 Valentin Gosu. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +use std::char; +use idna::uts46; +use test::TestFn; + +pub fn collect_tests(add_test: &mut F) { + // http://www.unicode.org/Public/idna/latest/IdnaTest.txt + for (i, line) in include_str!("IdnaTest.txt").lines().enumerate() { + if line == "" || line.starts_with("#") { + continue + } + // Remove comments + let mut line = match line.find("#") { + Some(index) => &line[0..index], + None => line + }; + + let mut expected_failure = false; + if line.starts_with("XFAIL") { + expected_failure = true; + line = &line[5..line.len()]; + }; + + let mut pieces = line.split(';').map(|x| x.trim()).collect::>(); + + let test_type = pieces.remove(0); + let original = pieces.remove(0); + let source = unescape(original); + let to_unicode = pieces.remove(0); + let to_ascii = pieces.remove(0); + let nv8 = if pieces.len() > 0 { pieces.remove(0) } else { "" }; + + if expected_failure { + continue; + } + + let test_name = format!("UTS #46 line {}", i + 1); + add_test(test_name, TestFn::dyn_test_fn(move || { + let result = uts46::to_ascii(&source, uts46::Flags { + use_std3_ascii_rules: true, + transitional_processing: test_type == "T", + verify_dns_length: true, + }); + + if to_ascii.starts_with("[") { + if to_ascii.starts_with("[C") { + // http://unicode.org/reports/tr46/#Deviations + // applications that perform IDNA2008 lookup are not required to check + // for these contexts + return; + } + let res = result.ok(); + assert!(res == None, "Expected error. result: {} | original: {} | source: {}", + res.unwrap(), original, source); + return; + } + + let to_ascii = if to_ascii.len() > 0 { + to_ascii.to_string() + } else { + if to_unicode.len() > 0 { + to_unicode.to_string() + } else { + source.clone() + } + }; + + if nv8 == "NV8" { + // This result isn't valid under IDNA2008. Skip it + return; + } + + assert!(result.is_ok(), "Couldn't parse {} | original: {} | error: {:?}", + source, original, result.err()); + let output = result.ok().unwrap(); + assert!(output == to_ascii, "result: {} | expected: {} | original: {} | source: {}", + output, to_ascii, original, source); + })) + } +} + +fn unescape(input: &str) -> String { + let mut output = String::new(); + let mut chars = input.chars(); + loop { + match chars.next() { + None => return output, + Some(c) => + if c == '\\' { + match chars.next().unwrap() { + '\\' => output.push('\\'), + 'u' => { + let c1 = chars.next().unwrap().to_digit(16).unwrap(); + let c2 = chars.next().unwrap().to_digit(16).unwrap(); + let c3 = chars.next().unwrap().to_digit(16).unwrap(); + let c4 = chars.next().unwrap().to_digit(16).unwrap(); + match char::from_u32((((c1 * 16 + c2) * 16 + c3) * 16 + c4)) + { + Some(c) => output.push(c), + None => { output.push_str(&format!("\\u{:X}{:X}{:X}{:X}",c1,c2,c3,c4)); } + }; + } + _ => panic!("Invalid test data input"), + } + } else { + output.push(c); + } + } + } +} diff --git a/deps/libc-0.2.7/.travis.yml b/deps/libc-0.2.7/.travis.yml deleted file mode 100644 index b52200253..000000000 --- a/deps/libc-0.2.7/.travis.yml +++ /dev/null @@ -1,62 +0,0 @@ -language: rust -sudo: required -dist: trusty -rust: - - 1.0.0 - - beta - - nightly -services: - - docker -script: - - if [[ $TRAVIS_RUST_VERSION = nightly* ]]; then - sh ci/run-travis.sh; - else - cargo build; - fi -os: - - linux - - osx -env: - matrix: - - ARCH=x86_64 - - ARCH=i686 - global: - secure: eIDEoQdTyglcsTD13zSGotAX2HDhRSXIaaTnVZTThqLSrySOc3/6KY3qmOc2Msf7XaBqfFy9QA+alk7OwfePp253eiy1Kced67ffjjFOytEcRT7FlQiYpcYQD6WNHZEj62/bJBO4LTM9sGtWNCTJVEDKW0WM8mUK7qNuC+honPM= -matrix: - include: - - os: linux - env: TARGET=arm-linux-androideabi DOCKER=alexcrichton/rust-slave-android:2015-11-22 - rust: nightly - - os: linux - env: TARGET=x86_64-unknown-linux-musl - rust: nightly - - os: linux - env: TARGET=arm-unknown-linux-gnueabihf - rust: nightly - - os: linux - env: TARGET=mips-unknown-linux-gnu DOCKER=alexcrichton/rust-libc-mips:2016-01-10 - rust: nightly - - os: linux - env: TARGET=aarch64-unknown-linux-gnu - rust: nightly - - os: osx - env: TARGET=i386-apple-ios - rust: nightly - - os: osx - env: TARGET=x86_64-apple-ios - rust: nightly - - os: linux - env: TARGET=x86_64-rumprun-netbsd DOCKER=alexcrichton/rust-libc-rumprun:2015-11-27 - rust: nightly-2015-09-27 - - os: linux - env: TARGET=x86_64-unknown-freebsd QEMU=freebsd.qcow2 - rust: nightly - - os: linux - env: TARGET=x86_64-unknown-openbsd QEMU=openbsd.qcow2 - rust: nightly -notifications: - email: - on_success: never -branches: - only: - - master diff --git a/deps/libc-0.2.7/Cargo.toml b/deps/libc-0.2.7/Cargo.toml deleted file mode 100644 index 067d0785b..000000000 --- a/deps/libc-0.2.7/Cargo.toml +++ /dev/null @@ -1,17 +0,0 @@ -[package] - -name = "libc" -version = "0.2.7" -authors = ["The Rust Project Developers"] -license = "MIT/Apache-2.0" -readme = "README.md" -repository = "https://github.com/rust-lang/libc" -homepage = "https://github.com/rust-lang/libc" -documentation = "http://doc.rust-lang.org/libc" -description = """ -A library for types and bindings to native C functions often found in libc or -other common platform libraries. -""" - -[features] -default = [] diff --git a/deps/libc-0.2.7/README.md b/deps/libc-0.2.7/README.md deleted file mode 100644 index 801b73d37..000000000 --- a/deps/libc-0.2.7/README.md +++ /dev/null @@ -1,117 +0,0 @@ -libc -==== - -A Rust library with native bindings to the types and functions commonly found on -various systems, including libc. - -[![Build Status](https://travis-ci.org/rust-lang-nursery/libc.svg?branch=master)](https://travis-ci.org/rust-lang-nursery/libc) -[![Build status](https://ci.appveyor.com/api/projects/status/34csq3uurnw7c0rl?svg=true)](https://ci.appveyor.com/project/alexcrichton/libc) - -[Documentation](#platforms-and-documentation) - -## Usage - -First, add the following to your `Cargo.toml`: - -```toml -[dependencies] -libc = "0.2" -``` - -Next, add this to your crate root: - -```rust -extern crate libc; -``` - -## What is libc? - -The primary purpose of this crate is to provide all of the definitions necessary -to easily interoperate with C code (or "C-like" code) on each of the platforms -that Rust supports. This includes type definitions (e.g. `c_int`), constants -(e.g. `EINVAL`) as well as function headers (e.g. `malloc`). - -This crate does not strive to have any form of compatibility across platforms, -but rather it is simply a straight binding to the system libraries on the -platform in question. - -## Public API - -This crate exports all underlying platform types, functions, and constants under -the crate root, so all items are accessible as `libc::foo`. The types and values -of all the exported APIs match the platform that libc is compiled for. - -More detailed information about the design of this library can be found in its -[associated RFC][rfc]. - -[rfc]: https://github.com/rust-lang/rfcs/blob/master/text/1291-promote-libc.md - -## Adding an API - -Want to use an API which currently isn't bound in `libc`? It's quite easy to add -one! - -The internal structure of this crate is designed to minimize the number of -`#[cfg]` attributes in order to easily be able to add new items which apply -to all platforms in the future. As a result, the crate is organized -hierarchically based on platform. Each module has a number of `#[cfg]`'d -children, but only one is ever actually compiled. Each module then reexports all -the contents of its children. - -This means that for each platform that libc supports, the path from a -leaf module to the root will contain all bindings for the platform in question. -Consequently, this indicates where an API should be added! Adding an API at a -particular level in the hierarchy means that it is supported on all the child -platforms of that level. For example, when adding a Unix API it should be added -to `src/unix/mod.rs`, but when adding a Linux-only API it should be added to -`src/unix/notbsd/linux/mod.rs`. - -If you're not 100% sure at what level of the hierarchy an API should be added -at, fear not! This crate has CI support which tests any binding against all -platforms supported, so you'll see failures if an API is added at the wrong -level or has different signatures across platforms. - -With that in mind, the steps for adding a new API are: - -1. Determine where in the module hierarchy your API should be added. -2. Add the API. -3. Send a PR to this repo. -4. Wait for CI to pass, fixing errors. -5. Wait for a merge! - -## Platforms and Documentation - -The following platforms are currently tested and have documentation available: - -Tested: - * [`i686-pc-windows-msvc`](https://doc.rust-lang.org/libc/i686-pc-windows-msvc/libc) - * [`x86_64-pc-windows-msvc`](https://doc.rust-lang.org/libc/x86_64-pc-windows-msvc/libc) - (Windows) - * [`i686-pc-windows-gnu`](https://doc.rust-lang.org/libc/i686-pc-windows-gnu/libc) - * [`x86_64-pc-windows-gnu`](https://doc.rust-lang.org/libc/x86_64-pc-windows-gnu/libc) - * [`i686-apple-darwin`](https://doc.rust-lang.org/libc/i686-apple-darwin/libc) - * [`x86_64-apple-darwin`](https://doc.rust-lang.org/libc/x86_64-apple-darwin/libc) - (OSX) - * [`i686-apple-ios`](https://doc.rust-lang.org/libc/i686-apple-ios/libc) - * [`x86_64-apple-ios`](https://doc.rust-lang.org/libc/x86_64-apple-ios/libc) - (iOS) - * [`i686-unknown-linux-gnu`](https://doc.rust-lang.org/libc/i686-unknown-linux-gnu/libc) - * [`x86_64-unknown-linux-gnu`](https://doc.rust-lang.org/libc/x86_64-unknown-linux-gnu/libc) - (Linux) - * [`x86_64-unknown-linux-musl`](https://doc.rust-lang.org/libc/x86_64-unknown-linux-musl/libc) - (Linux MUSL) - * [`aarch64-unknown-linux-gnu`](https://doc.rust-lang.org/libc/aarch64-unknown-linux-gnu/libc) - * [`mips-unknown-linux-gnu`](https://doc.rust-lang.org/libc/mips-unknown-linux-gnu/libc) - * [`arm-unknown-linux-gnueabihf`](https://doc.rust-lang.org/libc/arm-unknown-linux-gnueabihf/libc) - * [`arm-linux-androideabi`](https://doc.rust-lang.org/libc/arm-linux-androideabi/libc) - (Android) - * [`x86_64-unknown-freebsd`](http://rust-lang-nursery.github.io/libc/x86_64-unknown-freebsd/libc) - * [`x86_64-unknown-openbsd`](http://rust-lang-nursery.github.io/libc/x86_64-unknown-openbsd/libc) - * [`x86_64-rumprun-netbsd`](http://rust-lang-nursery.github.io/libc/x86_64-unknown-netbsd/libc) - -The following may be supported, but are not guaranteed to always work: - - * `i686-unknown-freebsd` - * [`x86_64-unknown-bitrig`](http://rust-lang-nursery.github.io/libc/x86_64-unknown-bitrig/libc) - * [`x86_64-unknown-dragonfly`](http://rust-lang-nursery.github.io/libc/x86_64-unknown-dragonfly/libc) - * [`x86_64-unknown-netbsd`](http://rust-lang-nursery.github.io/libc/x86_64-unknown-netbsd/libc) diff --git a/deps/libc-0.2.7/ci/run-travis.sh b/deps/libc-0.2.7/ci/run-travis.sh deleted file mode 100644 index e6d6c8156..000000000 --- a/deps/libc-0.2.7/ci/run-travis.sh +++ /dev/null @@ -1,204 +0,0 @@ -# Entry point for all travis builds, this will set up the Travis environment by -# downloading any dependencies. It will then execute the `run.sh` script to -# build and execute all tests. -# -# For a full description of how all tests are run, see `ci/README.md` - -set -ex - -if [ "$TRAVIS_OS_NAME" = "linux" ]; then - OS=unknown-linux-gnu -else - OS=apple-darwin -fi - -export HOST=$ARCH-$OS -if [ "$TARGET" = "" ]; then - TARGET=$HOST -fi - -MAIN_TARGETS=https://static.rust-lang.org/dist -DATE=$(echo $TRAVIS_RUST_VERSION | sed s/nightly-//) -EXTRA_TARGETS=https://people.mozilla.org/~acrichton/libc-test/$DATE - -install() { - if [ "$TRAVIS" = "true" ]; then - sudo apt-get update - sudo apt-get install -y $@ - fi -} - -# If we're going to run tests inside of a qemu image, then we don't need any of -# the scripts below. Instead, download the image, prepare a filesystem which has -# the current state of this repository, and then run the image. -# -# It's assume that all images, when run with two disks, will run the `run.sh` -# script from the second which we place inside. -if [ "$QEMU" != "" ]; then - # Acquire QEMU and the base OS image - install qemu-kvm - tmpdir=/tmp/qemu-img-creation - mkdir -p $tmpdir - if [ ! -f $tmpdir/$QEMU ]; then - curl https://people.mozilla.org/~acrichton/libc-test/qemu/$QEMU.gz | \ - gunzip -d > $tmpdir/$QEMU - fi - - # Generate all.{c,rs} on the host which will be compiled inside QEMU. Do this - # here because compiling syntex_syntax in QEMU would time out basically - # everywhere. - rm -rf $tmpdir/generated - mkdir -p $tmpdir/generated - CARGO_TARGET_DIR=$tmpdir/generated-build \ - cargo build --manifest-path libc-test/generate-files/Cargo.toml - (cd libc-test && TARGET=$TARGET OUT_DIR=$tmpdir/generated SKIP_COMPILE=1 \ - $tmpdir/generated-build/debug/generate-files) - - # Create a mount a fresh new filesystem image that we'll later pass to QEMU, - # this contains the checkout of libc and will be able to run all tests - rm -f $tmpdir/libc-test.img - dd if=/dev/null of=$tmpdir/libc-test.img bs=1M seek=5 - mkfs.ext2 -F $tmpdir/libc-test.img - rm -rf $tmpdir/mount - mkdir $tmpdir/mount - sudo mount -t ext2 -o loop $tmpdir/libc-test.img $tmpdir/mount - - # Copy this folder into the mounted image, the `run.sh` entry point, and - # overwrite the standard libc-test Cargo.toml with the overlay one which will - # assume the all.{c,rs} test files have already been generated - sudo mkdir $tmpdir/mount/libc - sudo cp -r * $tmpdir/mount/libc/ - sudo cp ci/run-qemu.sh $tmpdir/mount/run.sh - echo $TARGET | sudo tee -a $tmpdir/mount/TARGET - sudo cp $tmpdir/generated/* $tmpdir/mount/libc/libc-test - sudo cp libc-test/run-generated-Cargo.toml $tmpdir/mount/libc/libc-test/Cargo.toml - - sudo umount $tmpdir/mount - - # If we can use kvm, prefer that, otherwise just fall back to user-space - # emulation. - if kvm-ok; then - program="sudo kvm" - else - program=qemu-system-x86_64 - fi - - # Pass -snapshot to prevent tampering with the disk images, this helps when - # running this script in development. The two drives are then passed next, - # first is the OS and second is the one we just made. Next the network is - # configured to work (I'm not entirely sure how), and then finally we turn off - # graphics and redirect the serial console output to out.log. - $program \ - -m 1024 \ - -snapshot \ - -drive if=virtio,file=$tmpdir/$QEMU \ - -drive if=virtio,file=$tmpdir/libc-test.img \ - -net nic,model=virtio \ - -net user \ - -nographic \ - -vga none 2>&1 | tee out.log - exec grep "^PASSED .* tests" out.log -fi - -mkdir -p .cargo -cp ci/cargo-config .cargo/config - -# Next up we need to install the standard library for the version of Rust that -# we're testing. Get fancy targets from the EXTRA_TARGETS URL and otherwise get -# all others from the official distribution. -if [ "$TRAVIS" = "true" ]; then - case "$TARGET" in - *-rumprun-*) - curl -s $EXTRA_TARGETS/$TARGET.tar.gz | \ - tar xzf - -C `rustc --print sysroot`/lib/rustlib - ;; - - *) - # Download the rustlib folder from the relevant portion of main - # distribution's tarballs. - dir=rust-std-$TARGET - pkg=rust-std - if [ "$TRAVIS_RUST_VERSION" = "1.0.0" ]; then - pkg=rust - dir=rustc - fi - curl -s $MAIN_TARGETS/$pkg-$TRAVIS_RUST_VERSION-$TARGET.tar.gz | \ - tar xzf - -C $HOME/rust/lib/rustlib --strip-components=4 \ - $pkg-$TRAVIS_RUST_VERSION-$TARGET/$dir/lib/rustlib/$TARGET - ;; - - esac -fi - -# If we're testing with a docker image, then run tests entirely within that -# image. Note that this is using the same rustc installation that travis has -# (sharing it via `-v`) and otherwise the tests run entirely within the -# container. -# -# For the docker build we mount the entire current directory at /checkout, set -# up some environment variables to let it run, and then run the standard run.sh -# script. -if [ "$DOCKER" != "" ]; then - args="" - - case "$TARGET" in - mips-unknown-linux-gnu) - args="$args -e CC=mips-linux-gnu-gcc-5" - ;; - - *) - ;; - esac - - exec docker run \ - --entrypoint bash \ - -v `rustc --print sysroot`:/usr/local:ro \ - -v `pwd`:/checkout \ - -e LD_LIBRARY_PATH=/usr/local/lib \ - -e CARGO_TARGET_DIR=/tmp \ - $args \ - -w /checkout \ - -it $DOCKER \ - ci/run.sh $TARGET -fi - -# If we're not running docker or qemu, then we may still need some packages -# and/or tools with various configurations here and there. -case "$TARGET" in - x86_64-unknown-linux-musl) - install musl-tools - export CC=musl-gcc - ;; - - arm-unknown-linux-gnueabihf) - install gcc-4.7-arm-linux-gnueabihf qemu-user - export CC=arm-linux-gnueabihf-gcc-4.7 - ;; - - aarch64-unknown-linux-gnu) - install gcc-aarch64-linux-gnu qemu-user - export CC=aarch64-linux-gnu-gcc - ;; - - *-apple-ios) - ;; - - *) - # clang has better error messages and implements alignof more broadly - export CC=clang - - if [ "$TARGET" = "i686-unknown-linux-gnu" ]; then - install gcc-multilib - fi - ;; - -esac - -# Finally, if we've gotten this far, actually run the tests. -sh ci/run.sh $TARGET - -if [ "$TARGET" = "x86_64-unknown-linux-gnu" ] && \ - [ "$TRAVIS_RUST_VERSION" = "nightly" ] && \ - [ "$TRAVIS_OS_NAME" = "linux" ]; then - sh ci/dox.sh -fi diff --git a/deps/libc-0.2.7/liblibc.rlib b/deps/libc-0.2.7/liblibc.rlib deleted file mode 100644 index 3b300aea3e931e40ccb387733e94cbd96efbe165..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 627398 zcmeFa3!EHPl|NoRorDm93=v2mubyO*OkR`fcQ*twLuMvDFi9rKAc(q?elme1GfXBB z467LenlJ>S!ivZ$DDL8G#T8xnExROufUXZ*->$1c*)z;e=x#!-h?rK_@9nKG2G-XAoaLiFvz=B=qI4viFQnteVlkgc6;tVFuZt*`%Ec3*iaP8Y(dL^K~w$F9wlT~E{axot9+Di!Q>HXltSb0vFM z%rJZ{+Elb)XYE2bk&VTZxyXjdIB3%`8>X@2b~<9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`r0AMGRaEA;--*PMC4{{0{IT3%%U diff --git a/deps/libc-0.2.7/perf.data b/deps/libc-0.2.7/perf.data deleted file mode 100644 index 8c2bb0265b5212b9096019acf07b601202184fc9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 97508 zcmcGX1z1;&u<>;M(TE-iK*g74Q9>HEXSzH8U%>nQ6~<9lMy;b=1=Q@<{ue|9v^_e>d{VlJ=AQ>uX@< z|GS#9RQ)3|zvdsg=s(L=R9{8?{*USPP5&>HVzX$OY5hq3mHxjef2aO4BJF=0qx?P4 z+0N6=&ZV}qm5Ym4fUDPF3vWArZ}oqn`B_t*zq-6g<-h-7Az4EgCu>7jcUvD9J1@g} zwd>TYZDdflzJY_Co1LeVjiE-Gp{=Krubrotp@#>4TiCdJ+SPV;mqp=U8o5CkaxJwq za&Jlaf0S$G>EZ6_ZRnx-J9E)0`KorCWYNf<@i+3VyseZ9TRGY|DY7$>|5LjY)8s}d z|4+uR|E=9lZXQ0~sp|3ZvNQDX!rz(5R!aX#-yYfi1%2B%T6v}_-PX=m5v$10Xo=>h zpWB@#x4R_&w|2W)**Lj*yL&krrv7B%=w$ngR%g=ga@qfdc6)ex7^ePKq^8N2t;s}g zP@3F8N&au`R_rX@$TaPirDY;lE62akUg+5c?bZ4xxf8V%7lJxjrpb-SDysOuwb#wg z+tAM2QE_SBhSr|$R<<_ou7=(Y_5O>#Lo@23m0Qz(!|eZ7JyI>t&c)EKj**d(UD{v2 ztWMgvQ~5h19Zh}y%HO2YD8h>$V^8d=uYy6H^Y6x&Q#Ge+P zR(?tqej#7wZ_DM=wEwT4LE|7867-{iYGdD$4c+Bqq|m6kiEr#Js8@F%&U z`89F_|AXL%|52{Jt)YvDjfInqqayZ~a#eP&r}r=DS>0X(*I%R*Xpg4d9$NqLKOSlF z%l=7!d%63#*%~TYjG>oXrolxcPu1Sg0-E-A|C@exs%v9t<>KJ(WtjStf%21qwUalx zTo#))u2thIIZgfy3I3j*WqS?0om}la6{!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;-ZtrIhoz=XI}#D@Mx@eFX6`S zSPR^(Bz^|z`HoDl_JIoEo|=gDflIJqj_TE4 z{T^^uq9>0}Gyf(Y`~bNAldxVbDSyVYI^fDDW6n$JjmK*C1Gixc<|b{#`ElXXL%_Xk zz#R3j=gCijJ4Wi4M3TR07aD*|`w`byr@M4U^-I~FuYmjKA&q0@c@sI0yoJYrizeJB z`*1qqdVdF83aL*Alkz-Z?+M_xUDE8bddM8m#(!CUmlOxXo z*Hx+ynBJ?C@%@vmGZ%pyPwLa8j@tZjrgu-(e}U^J)u&9aVW~FG&bXy>qffK(*PoKL zd}CakMVo)XxWCr42d0LTI6}YZ?tVg--f13_m_BhO) z{Rrz_xGMv=N2Gd&#Zms93bT9a(rn-^Apmi){)YCllM&-p$vK1y~PHQ4;u< z(yfU9a|diylytJbimW$~^?q~t@iD>U6N2kP&r8-f6aJ0h`l_Hm>Ban?%Aj7%e7-&_ zxZiPKa6P!cCb-@&xSwr~QXI;!>gR<=>c^MVpQyh+bNU%q`$KPE8gXeh+nx zcMsH!^Z1+trcEBGb0zDCB`2G7<5JUfX5CQ3Fw=xT%vZ_gKW26F1ZP2^tH23T2}ub_ zri7u*!(p}_t2+awy1lyJtS-hvzYp@9PZVJ{)BO5S@Qq%lFFTA9-^?_8PP@nFXc231 zCujuc)U*h;u#;)%XSM*eVi(g0xbmHPug&jw`de{CQ-o>weRdX7gRgB8Fz?73losD? zwY(GG*g>k7*p{o}yYU@u_-j^=u@~FjZA>m$WbQB>lRg>N+xmyKJ7#q;B@An;1RTdS z5)+0;tT7}ZDPoPG36aG_WVJYNm3BSAC$swZ{}FEybGx@NqO^)K;P+$)=GuJDwu(io f2b$GI9bUFOy&m or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -//! Crate docs - -#![allow(bad_style, overflowing_literals, improper_ctypes)] -#![crate_type = "rlib"] -#![crate_name = "libc"] -#![cfg_attr(dox, feature(no_core, lang_items))] -#![cfg_attr(dox, no_core)] -#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", - html_favicon_url = "https://doc.rust-lang.org/favicon.ico")] - -#![cfg_attr(all(target_os = "linux", target_arch = "x86_64"), doc( - html_root_url = "https://doc.rust-lang.org/libc/x86_64-unknown-linux-gnu" -))] -#![cfg_attr(all(target_os = "linux", target_arch = "x86"), doc( - html_root_url = "https://doc.rust-lang.org/libc/i686-unknown-linux-gnu" -))] -#![cfg_attr(all(target_os = "linux", target_arch = "arm"), doc( - html_root_url = "https://doc.rust-lang.org/libc/arm-unknown-linux-gnueabihf" -))] -#![cfg_attr(all(target_os = "linux", target_arch = "mips"), doc( - html_root_url = "https://doc.rust-lang.org/libc/mips-unknown-linux-gnu" -))] -#![cfg_attr(all(target_os = "linux", target_arch = "aarch64"), doc( - html_root_url = "https://doc.rust-lang.org/libc/aarch64-unknown-linux-gnu" -))] -#![cfg_attr(all(target_os = "linux", target_env = "musl"), doc( - html_root_url = "https://doc.rust-lang.org/libc/x86_64-unknown-linux-musl" -))] -#![cfg_attr(all(target_os = "macos", target_arch = "x86_64"), doc( - html_root_url = "https://doc.rust-lang.org/libc/x86_64-apple-darwin" -))] -#![cfg_attr(all(target_os = "macos", target_arch = "x86"), doc( - html_root_url = "https://doc.rust-lang.org/libc/i686-apple-darwin" -))] -#![cfg_attr(all(windows, target_arch = "x86_64", target_env = "gnu"), doc( - html_root_url = "https://doc.rust-lang.org/libc/x86_64-pc-windows-gnu" -))] -#![cfg_attr(all(windows, target_arch = "x86", target_env = "gnu"), doc( - html_root_url = "https://doc.rust-lang.org/libc/i686-pc-windows-gnu" -))] -#![cfg_attr(all(windows, target_arch = "x86_64", target_env = "msvc"), doc( - html_root_url = "https://doc.rust-lang.org/libc/x86_64-pc-windows-msvc" -))] -#![cfg_attr(all(windows, target_arch = "x86", target_env = "msvc"), doc( - html_root_url = "https://doc.rust-lang.org/libc/i686-pc-windows-msvc" -))] -#![cfg_attr(target_os = "android", doc( - html_root_url = "https://doc.rust-lang.org/libc/arm-linux-androideabi" -))] -#![cfg_attr(target_os = "freebsd", doc( - html_root_url = "https://doc.rust-lang.org/libc/x86_64-unknown-freebsd" -))] -#![cfg_attr(target_os = "openbsd", doc( - html_root_url = "https://doc.rust-lang.org/libc/x86_64-unknown-openbsd" -))] -#![cfg_attr(target_os = "bitrig", doc( - html_root_url = "https://doc.rust-lang.org/libc/x86_64-unknown-bitrig" -))] -#![cfg_attr(target_os = "netbsd", doc( - html_root_url = "https://doc.rust-lang.org/libc/x86_64-unknown-netbsd" -))] -#![cfg_attr(target_os = "dragonfly", doc( - html_root_url = "https://doc.rust-lang.org/libc/x86_64-unknown-dragonfly" -))] - -// Attributes needed when building as part of the standard library -#![cfg_attr(stdbuild, feature(no_std, core, core_slice_ext, staged_api, custom_attribute))] -#![cfg_attr(stdbuild, no_std)] -#![cfg_attr(stdbuild, staged_api)] -#![cfg_attr(stdbuild, allow(warnings))] -#![cfg_attr(stdbuild, unstable(feature = "libc", - reason = "use `libc` from crates.io", - issue = "27783"))] - -#[cfg(all(not(stdbuild), not(dox)))] -extern crate std as core; - -#[macro_use] mod macros; -mod dox; - -// Use repr(u8) as LLVM expects `void*` to be the same as `i8*` to help enable -// more optimization opportunities around it recognizing things like -// malloc/free. -#[repr(u8)] -pub enum c_void { - // Two dummy variants so the #[repr] attribute can be used. - #[doc(hidden)] - __variant1, - #[doc(hidden)] - __variant2, -} - -pub type int8_t = i8; -pub type int16_t = i16; -pub type int32_t = i32; -pub type int64_t = i64; -pub type uint8_t = u8; -pub type uint16_t = u16; -pub type uint32_t = u32; -pub type uint64_t = u64; - -pub type c_schar = i8; -pub type c_uchar = u8; -pub type c_short = i16; -pub type c_ushort = u16; -pub type c_int = i32; -pub type c_uint = u32; -pub type c_float = f32; -pub type c_double = f64; -pub type c_longlong = i64; -pub type c_ulonglong = u64; -pub type intmax_t = i64; -pub type uintmax_t = u64; - -pub type size_t = usize; -pub type ptrdiff_t = isize; -pub type intptr_t = isize; -pub type uintptr_t = usize; -pub type ssize_t = isize; - -pub enum FILE {} -pub enum fpos_t {} // TODO: fill this out with a struct - -extern { - pub fn isalnum(c: c_int) -> c_int; - pub fn isalpha(c: c_int) -> c_int; - pub fn iscntrl(c: c_int) -> c_int; - pub fn isdigit(c: c_int) -> c_int; - pub fn isgraph(c: c_int) -> c_int; - pub fn islower(c: c_int) -> c_int; - pub fn isprint(c: c_int) -> c_int; - pub fn ispunct(c: c_int) -> c_int; - pub fn isspace(c: c_int) -> c_int; - pub fn isupper(c: c_int) -> c_int; - pub fn isxdigit(c: c_int) -> c_int; - pub fn tolower(c: c_int) -> c_int; - pub fn toupper(c: c_int) -> c_int; - - #[cfg_attr(all(target_os = "macos", target_arch = "x86"), - link_name = "fopen$UNIX2003")] - pub fn fopen(filename: *const c_char, - mode: *const c_char) -> *mut FILE; - #[cfg_attr(all(target_os = "macos", target_arch = "x86"), - link_name = "freopen$UNIX2003")] - pub fn freopen(filename: *const c_char, mode: *const c_char, - file: *mut FILE) -> *mut FILE; - pub fn fflush(file: *mut FILE) -> c_int; - pub fn fclose(file: *mut FILE) -> c_int; - pub fn remove(filename: *const c_char) -> c_int; - pub fn rename(oldname: *const c_char, newname: *const c_char) -> c_int; - pub fn tmpfile() -> *mut FILE; - pub fn setvbuf(stream: *mut FILE, - buffer: *mut c_char, - mode: c_int, - size: size_t) -> c_int; - pub fn setbuf(stream: *mut FILE, buf: *mut c_char); - pub fn fgetc(stream: *mut FILE) -> c_int; - pub fn fgets(buf: *mut c_char, n: c_int, stream: *mut FILE) -> *mut c_char; - pub fn fputc(c: c_int, stream: *mut FILE) -> c_int; - #[cfg_attr(all(target_os = "macos", target_arch = "x86"), - link_name = "fputs$UNIX2003")] - pub fn fputs(s: *const c_char, stream: *mut FILE)-> c_int; - pub fn puts(s: *const c_char) -> c_int; - pub fn ungetc(c: c_int, stream: *mut FILE) -> c_int; - pub fn fread(ptr: *mut c_void, - size: size_t, - nobj: size_t, - stream: *mut FILE) - -> size_t; - #[cfg_attr(all(target_os = "macos", target_arch = "x86"), - link_name = "fwrite$UNIX2003")] - pub fn fwrite(ptr: *const c_void, - size: size_t, - nobj: size_t, - stream: *mut FILE) - -> size_t; - pub fn fseek(stream: *mut FILE, offset: c_long, whence: c_int) -> c_int; - pub fn ftell(stream: *mut FILE) -> c_long; - pub fn rewind(stream: *mut FILE); - #[cfg_attr(target_os = "netbsd", link_name = "__fgetpos50")] - pub fn fgetpos(stream: *mut FILE, ptr: *mut fpos_t) -> c_int; - #[cfg_attr(target_os = "netbsd", link_name = "__fsetpos50")] - pub fn fsetpos(stream: *mut FILE, ptr: *const fpos_t) -> c_int; - pub fn feof(stream: *mut FILE) -> c_int; - pub fn ferror(stream: *mut FILE) -> c_int; - pub fn perror(s: *const c_char); - pub fn atoi(s: *const c_char) -> c_int; - #[cfg_attr(all(target_os = "macos", target_arch = "x86"), - link_name = "strtod$UNIX2003")] - pub fn strtod(s: *const c_char, endp: *mut *mut c_char) -> c_double; - pub fn strtol(s: *const c_char, - endp: *mut *mut c_char, base: c_int) -> c_long; - pub fn strtoul(s: *const c_char, endp: *mut *mut c_char, - base: c_int) -> c_ulong; - pub fn calloc(nobj: size_t, size: size_t) -> *mut c_void; - pub fn malloc(size: size_t) -> *mut c_void; - pub fn realloc(p: *mut c_void, size: size_t) -> *mut c_void; - pub fn free(p: *mut c_void); - pub fn abort() -> !; - pub fn exit(status: c_int) -> !; - pub fn _exit(status: c_int) -> !; - pub fn atexit(cb: extern fn()) -> c_int; - #[cfg_attr(all(target_os = "macos", target_arch = "x86"), - link_name = "system$UNIX2003")] - pub fn system(s: *const c_char) -> c_int; - pub fn getenv(s: *const c_char) -> *mut c_char; - - pub fn strcpy(dst: *mut c_char, src: *const c_char) -> *mut c_char; - pub fn strncpy(dst: *mut c_char, src: *const c_char, n: size_t) - -> *mut c_char; - pub fn strcat(s: *mut c_char, ct: *const c_char) -> *mut c_char; - pub fn strncat(s: *mut c_char, ct: *const c_char, n: size_t) -> *mut c_char; - pub fn strcmp(cs: *const c_char, ct: *const c_char) -> c_int; - pub fn strncmp(cs: *const c_char, ct: *const c_char, n: size_t) -> c_int; - pub fn strcoll(cs: *const c_char, ct: *const c_char) -> c_int; - pub fn strchr(cs: *const c_char, c: c_int) -> *mut c_char; - pub fn strrchr(cs: *const c_char, c: c_int) -> *mut c_char; - pub fn strspn(cs: *const c_char, ct: *const c_char) -> size_t; - pub fn strcspn(cs: *const c_char, ct: *const c_char) -> size_t; - pub fn strpbrk(cs: *const c_char, ct: *const c_char) -> *mut c_char; - pub fn strstr(cs: *const c_char, ct: *const c_char) -> *mut c_char; - pub fn strlen(cs: *const c_char) -> size_t; - #[cfg_attr(all(target_os = "macos", target_arch = "x86"), - link_name = "strerror$UNIX2003")] - pub fn strerror(n: c_int) -> *mut c_char; - pub fn strtok(s: *mut c_char, t: *const c_char) -> *mut c_char; - pub fn strxfrm(s: *mut c_char, ct: *const c_char, n: size_t) -> size_t; - pub fn wcslen(buf: *const wchar_t) -> size_t; - - pub fn memcmp(cx: *const c_void, ct: *const c_void, n: size_t) -> c_int; - pub fn memchr(cx: *const c_void, c: c_int, n: size_t) -> *mut c_void; -} - -// These are all inline functions on android, so they end up just being entirely -// missing on that platform. -#[cfg(not(target_os = "android"))] -extern { - pub fn abs(i: c_int) -> c_int; - pub fn atof(s: *const c_char) -> c_double; - pub fn labs(i: c_long) -> c_long; - pub fn rand() -> c_int; - pub fn srand(seed: c_uint); -} - -cfg_if! { - if #[cfg(windows)] { - mod windows; - pub use windows::*; - } else { - mod unix; - pub use unix::*; - } -} diff --git a/deps/libc-0.2.7/src/macros.rs b/deps/libc-0.2.7/src/macros.rs deleted file mode 100644 index 3c2978ea2..000000000 --- a/deps/libc-0.2.7/src/macros.rs +++ /dev/null @@ -1,108 +0,0 @@ -/// A macro for defining #[cfg] if-else statements. -/// -/// This is similar to the `if/elif` C preprocessor macro by allowing definition -/// of a cascade of `#[cfg]` cases, emitting the implementation which matches -/// first. -/// -/// This allows you to conveniently provide a long list #[cfg]'d blocks of code -/// without having to rewrite each clause multiple times. -macro_rules! cfg_if { - ($( - if #[cfg($($meta:meta),*)] { $($it:item)* } - ) else * else { - $($it2:item)* - }) => { - __cfg_if_items! { - () ; - $( ( ($($meta),*) ($($it)*) ), )* - ( () ($($it2)*) ), - } - } -} - -macro_rules! __cfg_if_items { - (($($not:meta,)*) ; ) => {}; - (($($not:meta,)*) ; ( ($($m:meta),*) ($($it:item)*) ), $($rest:tt)*) => { - __cfg_if_apply! { cfg(all($($m,)* not(any($($not),*)))), $($it)* } - __cfg_if_items! { ($($not,)* $($m,)*) ; $($rest)* } - } -} - -macro_rules! __cfg_if_apply { - ($m:meta, $($it:item)*) => { - $(#[$m] $it)* - } -} - -macro_rules! s { - ($($(#[$attr:meta])* pub struct $i:ident { $($field:tt)* })*) => ($( - __item! { - #[repr(C)] - $(#[$attr])* - pub struct $i { $($field)* } - } - impl ::dox::Copy for $i {} - impl ::dox::Clone for $i { - fn clone(&self) -> $i { *self } - } - )*) -} - -macro_rules! f { - ($(pub fn $i:ident($($arg:ident: $argty:ty),*) -> $ret:ty { - $($body:stmt);* - })*) => ($( - #[inline] - #[cfg(not(dox))] - pub unsafe extern fn $i($($arg: $argty),*) -> $ret { - $($body);* - } - - #[cfg(dox)] - #[allow(dead_code)] - pub unsafe extern fn $i($($arg: $argty),*) -> $ret { - loop {} - } - )*) -} - -macro_rules! __item { - ($i:item) => ($i) -} - -#[cfg(test)] -mod tests { - cfg_if! { - if #[cfg(test)] { - use std::option::Option as Option2; - fn works1() -> Option2 { Some(1) } - } else { - fn works1() -> Option { None } - } - } - - cfg_if! { - if #[cfg(foo)] { - fn works2() -> bool { false } - } else if #[cfg(test)] { - fn works2() -> bool { true } - } else { - fn works2() -> bool { false } - } - } - - cfg_if! { - if #[cfg(foo)] { - fn works3() -> bool { false } - } else { - fn works3() -> bool { true } - } - } - - #[test] - fn it_works() { - assert!(works1().is_some()); - assert!(works2()); - assert!(works3()); - } -} diff --git a/deps/libc-0.2.7/src/unix/bsd/apple/b32.rs b/deps/libc-0.2.7/src/unix/bsd/apple/b32.rs deleted file mode 100644 index 9a46ed055..000000000 --- a/deps/libc-0.2.7/src/unix/bsd/apple/b32.rs +++ /dev/null @@ -1,15 +0,0 @@ -//! 32-bit specific Apple (ios/darwin) definitions - -pub type c_long = i32; -pub type c_ulong = u32; - -pub const __PTHREAD_MUTEX_SIZE__: usize = 40; -pub const __PTHREAD_COND_SIZE__: usize = 24; -pub const __PTHREAD_RWLOCK_SIZE__: usize = 124; - -s! { - pub struct pthread_attr_t { - __sig: c_long, - __opaque: [::c_char; 36] - } -} diff --git a/deps/libc-0.2.7/src/unix/bsd/apple/b64.rs b/deps/libc-0.2.7/src/unix/bsd/apple/b64.rs deleted file mode 100644 index 344582e35..000000000 --- a/deps/libc-0.2.7/src/unix/bsd/apple/b64.rs +++ /dev/null @@ -1,15 +0,0 @@ -//! 64-bit specific Apple (ios/darwin) definitions - -pub type c_long = i64; -pub type c_ulong = u64; - -pub const __PTHREAD_MUTEX_SIZE__: usize = 56; -pub const __PTHREAD_COND_SIZE__: usize = 40; -pub const __PTHREAD_RWLOCK_SIZE__: usize = 192; - -s! { - pub struct pthread_attr_t { - __sig: c_long, - __opaque: [::c_char; 56] - } -} diff --git a/deps/libc-0.2.7/src/unix/bsd/freebsdlike/dragonfly.rs b/deps/libc-0.2.7/src/unix/bsd/freebsdlike/dragonfly.rs deleted file mode 100644 index a06d232f4..000000000 --- a/deps/libc-0.2.7/src/unix/bsd/freebsdlike/dragonfly.rs +++ /dev/null @@ -1,11 +0,0 @@ -pub type fsblkcnt_t = ::c_uint; -pub type fsfilcnt_t = ::c_uint; - -pub const PTHREAD_STACK_MIN: ::size_t = 1024; -pub const KERN_PROC_PATHNAME: ::c_int = 9; -pub const SIGSTKSZ: ::size_t = 40960; -pub const MADV_INVAL: ::c_int = 10; - -extern { - pub fn __dfly_error() -> *const ::c_int; -} diff --git a/deps/libc-0.2.7/src/unix/bsd/freebsdlike/freebsd.rs b/deps/libc-0.2.7/src/unix/bsd/freebsdlike/freebsd.rs deleted file mode 100644 index d6fa96fe2..000000000 --- a/deps/libc-0.2.7/src/unix/bsd/freebsdlike/freebsd.rs +++ /dev/null @@ -1,13 +0,0 @@ -pub type fsblkcnt_t = ::uint64_t; -pub type fsfilcnt_t = ::uint64_t; - -pub const PTHREAD_STACK_MIN: ::size_t = 2048; -pub const KERN_PROC_PATHNAME: ::c_int = 12; -pub const SIGSTKSZ: ::size_t = 34816; -pub const SF_NODISKIO: ::c_int = 0x00000001; -pub const SF_MNOWAIT: ::c_int = 0x00000002; -pub const SF_SYNC: ::c_int = 0x00000004; - -extern { - pub fn __error() -> *mut ::c_int; -} diff --git a/deps/libc-0.2.7/src/unix/bsd/freebsdlike/mod.rs b/deps/libc-0.2.7/src/unix/bsd/freebsdlike/mod.rs deleted file mode 100644 index 746901281..000000000 --- a/deps/libc-0.2.7/src/unix/bsd/freebsdlike/mod.rs +++ /dev/null @@ -1,657 +0,0 @@ -pub type clock_t = i32; -pub type dev_t = u32; -pub type ino_t = u32; -pub type mode_t = u16; -pub type nlink_t = u16; -pub type blksize_t = u32; -pub type fflags_t = u32; -pub type pthread_attr_t = *mut ::c_void; -pub type rlim_t = i64; -pub type pthread_mutex_t = *mut ::c_void; -pub type pthread_mutexattr_t = *mut ::c_void; -pub type pthread_cond_t = *mut ::c_void; -pub type pthread_rwlock_t = *mut ::c_void; -pub type pthread_key_t = ::c_int; -pub type tcflag_t = ::c_uint; -pub type speed_t = ::c_uint; - -pub enum timezone {} - -s! { - pub struct dirent { - pub d_fileno: u32, - pub d_reclen: u16, - pub d_type: u8, - pub d_namlen: u8, - pub d_name: [::c_char; 256], - } - - pub struct glob_t { - pub gl_pathc: ::size_t, - __unused1: ::size_t, - pub gl_offs: ::size_t, - __unused2: ::c_int, - pub gl_pathv: *mut *mut ::c_char, - - __unused3: *mut ::c_void, - - __unused4: *mut ::c_void, - __unused5: *mut ::c_void, - __unused6: *mut ::c_void, - __unused7: *mut ::c_void, - __unused8: *mut ::c_void, - } - - pub struct sockaddr_storage { - pub ss_len: u8, - pub ss_family: ::sa_family_t, - __ss_pad1: [u8; 6], - __ss_align: i64, - __ss_pad2: [u8; 112], - } - - pub struct addrinfo { - pub ai_flags: ::c_int, - pub ai_family: ::c_int, - pub ai_socktype: ::c_int, - pub ai_protocol: ::c_int, - pub ai_addrlen: ::socklen_t, - pub ai_canonname: *mut ::c_char, - pub ai_addr: *mut ::sockaddr, - pub ai_next: *mut addrinfo, - } - - pub struct sigset_t { - bits: [u32; 4], - } - - pub struct siginfo_t { - pub si_signo: ::c_int, - pub si_errno: ::c_int, - pub si_code: ::c_int, - pub si_pid: ::pid_t, - pub si_uid: ::uid_t, - pub si_status: ::c_int, - pub si_addr: *mut ::c_void, - _pad: [::c_int; 12], - } - - pub struct sigaction { - pub sa_sigaction: ::sighandler_t, - pub sa_flags: ::c_int, - pub sa_mask: sigset_t, - } - - pub struct stack_t { - pub ss_sp: *mut ::c_char, - pub ss_size: ::size_t, - pub ss_flags: ::c_int, - } - - pub struct statvfs { - pub f_bavail: ::fsblkcnt_t, - pub f_bfree: ::fsblkcnt_t, - pub f_blocks: ::fsblkcnt_t, - pub f_favail: ::fsfilcnt_t, - pub f_ffree: ::fsfilcnt_t, - pub f_files: ::fsfilcnt_t, - pub f_bsize: ::c_ulong, - pub f_flag: ::c_ulong, - pub f_frsize: ::c_ulong, - pub f_fsid: ::c_ulong, - pub f_namemax: ::c_ulong, - } - - pub struct sched_param { - pub sched_priority: ::c_int, - } - - pub struct Dl_info { - pub dli_fname: *const ::c_char, - pub dli_fbase: *mut ::c_void, - pub dli_sname: *const ::c_char, - pub dli_saddr: *mut ::c_void, - } - - pub struct sockaddr_in { - pub sin_len: u8, - pub sin_family: ::sa_family_t, - pub sin_port: ::in_port_t, - pub sin_addr: ::in_addr, - pub sin_zero: [::c_char; 8], - } - - pub struct termios { - pub c_iflag: ::tcflag_t, - pub c_oflag: ::tcflag_t, - pub c_cflag: ::tcflag_t, - pub c_lflag: ::tcflag_t, - pub c_cc: [::cc_t; ::NCCS], - pub c_ispeed: ::speed_t, - pub c_ospeed: ::speed_t, - } - - pub struct flock { - pub l_start: ::off_t, - pub l_len: ::off_t, - pub l_pid: ::pid_t, - pub l_type: ::c_short, - pub l_whence: ::c_short, - pub l_sysid: ::c_int, - } - - pub struct sf_hdtr { - pub headers: *mut ::iovec, - pub hdr_cnt: ::c_int, - pub trailers: *mut ::iovec, - pub trl_cnt: ::c_int, - } -} - -pub const EXIT_FAILURE: ::c_int = 1; -pub const EXIT_SUCCESS: ::c_int = 0; -pub const RAND_MAX: ::c_int = 0x7fff_fffd; -pub const EOF: ::c_int = -1; -pub const SEEK_SET: ::c_int = 0; -pub const SEEK_CUR: ::c_int = 1; -pub const SEEK_END: ::c_int = 2; -pub const _IOFBF: ::c_int = 0; -pub const _IONBF: ::c_int = 2; -pub const _IOLBF: ::c_int = 1; -pub const BUFSIZ: ::c_uint = 1024; -pub const FOPEN_MAX: ::c_uint = 20; -pub const FILENAME_MAX: ::c_uint = 1024; -pub const L_tmpnam: ::c_uint = 1024; -pub const TMP_MAX: ::c_uint = 308915776; - -pub const O_RDONLY: ::c_int = 0; -pub const O_WRONLY: ::c_int = 1; -pub const O_RDWR: ::c_int = 2; -pub const O_ACCMODE: ::c_int = 3; -pub const O_APPEND: ::c_int = 8; -pub const O_CREAT: ::c_int = 512; -pub const O_EXCL: ::c_int = 2048; -pub const O_NOCTTY: ::c_int = 32768; -pub const O_TRUNC: ::c_int = 1024; -pub const O_CLOEXEC: ::c_int = 0x00100000; -pub const S_IFIFO: mode_t = 4096; -pub const S_IFCHR: mode_t = 8192; -pub const S_IFBLK: mode_t = 24576; -pub const S_IFDIR: mode_t = 16384; -pub const S_IFREG: mode_t = 32768; -pub const S_IFLNK: mode_t = 40960; -pub const S_IFSOCK: mode_t = 49152; -pub const S_IFMT: mode_t = 61440; -pub const S_IEXEC: mode_t = 64; -pub const S_IWRITE: mode_t = 128; -pub const S_IREAD: mode_t = 256; -pub const S_IRWXU: mode_t = 448; -pub const S_IXUSR: mode_t = 64; -pub const S_IWUSR: mode_t = 128; -pub const S_IRUSR: mode_t = 256; -pub const S_IRWXG: mode_t = 56; -pub const S_IXGRP: mode_t = 8; -pub const S_IWGRP: mode_t = 16; -pub const S_IRGRP: mode_t = 32; -pub const S_IRWXO: mode_t = 7; -pub const S_IXOTH: mode_t = 1; -pub const S_IWOTH: mode_t = 2; -pub const S_IROTH: mode_t = 4; -pub const F_OK: ::c_int = 0; -pub const R_OK: ::c_int = 4; -pub const W_OK: ::c_int = 2; -pub const X_OK: ::c_int = 1; -pub const STDIN_FILENO: ::c_int = 0; -pub const STDOUT_FILENO: ::c_int = 1; -pub const STDERR_FILENO: ::c_int = 2; -pub const F_LOCK: ::c_int = 1; -pub const F_TEST: ::c_int = 3; -pub const F_TLOCK: ::c_int = 2; -pub const F_ULOCK: ::c_int = 0; -pub const F_DUPFD_CLOEXEC: ::c_int = 17; -pub const F_GETLK: ::c_int = 11; -pub const F_SETLK: ::c_int = 12; -pub const F_SETLKW: ::c_int = 13; -pub const SIGHUP: ::c_int = 1; -pub const SIGINT: ::c_int = 2; -pub const SIGQUIT: ::c_int = 3; -pub const SIGILL: ::c_int = 4; -pub const SIGABRT: ::c_int = 6; -pub const SIGFPE: ::c_int = 8; -pub const SIGKILL: ::c_int = 9; -pub const SIGSEGV: ::c_int = 11; -pub const SIGPIPE: ::c_int = 13; -pub const SIGALRM: ::c_int = 14; -pub const SIGTERM: ::c_int = 15; - -pub const PROT_NONE: ::c_int = 0; -pub const PROT_READ: ::c_int = 1; -pub const PROT_WRITE: ::c_int = 2; -pub const PROT_EXEC: ::c_int = 4; - -pub const MAP_FILE: ::c_int = 0x0000; -pub const MAP_SHARED: ::c_int = 0x0001; -pub const MAP_PRIVATE: ::c_int = 0x0002; -pub const MAP_FIXED: ::c_int = 0x0010; -pub const MAP_ANON: ::c_int = 0x1000; - -pub const MAP_FAILED: *mut ::c_void = !0 as *mut ::c_void; - -pub const MCL_CURRENT: ::c_int = 0x0001; -pub const MCL_FUTURE: ::c_int = 0x0002; - -pub const MS_SYNC: ::c_int = 0x0000; -pub const MS_ASYNC: ::c_int = 0x0001; -pub const MS_INVALIDATE: ::c_int = 0x0002; - -pub const EPERM: ::c_int = 1; -pub const ENOENT: ::c_int = 2; -pub const ESRCH: ::c_int = 3; -pub const EINTR: ::c_int = 4; -pub const EIO: ::c_int = 5; -pub const ENXIO: ::c_int = 6; -pub const E2BIG: ::c_int = 7; -pub const ENOEXEC: ::c_int = 8; -pub const EBADF: ::c_int = 9; -pub const ECHILD: ::c_int = 10; -pub const EDEADLK: ::c_int = 11; -pub const ENOMEM: ::c_int = 12; -pub const EACCES: ::c_int = 13; -pub const EFAULT: ::c_int = 14; -pub const ENOTBLK: ::c_int = 15; -pub const EBUSY: ::c_int = 16; -pub const EEXIST: ::c_int = 17; -pub const EXDEV: ::c_int = 18; -pub const ENODEV: ::c_int = 19; -pub const ENOTDIR: ::c_int = 20; -pub const EISDIR: ::c_int = 21; -pub const EINVAL: ::c_int = 22; -pub const ENFILE: ::c_int = 23; -pub const EMFILE: ::c_int = 24; -pub const ENOTTY: ::c_int = 25; -pub const ETXTBSY: ::c_int = 26; -pub const EFBIG: ::c_int = 27; -pub const ENOSPC: ::c_int = 28; -pub const ESPIPE: ::c_int = 29; -pub const EROFS: ::c_int = 30; -pub const EMLINK: ::c_int = 31; -pub const EPIPE: ::c_int = 32; -pub const EDOM: ::c_int = 33; -pub const ERANGE: ::c_int = 34; -pub const EAGAIN: ::c_int = 35; -pub const EWOULDBLOCK: ::c_int = 35; -pub const EINPROGRESS: ::c_int = 36; -pub const EALREADY: ::c_int = 37; -pub const ENOTSOCK: ::c_int = 38; -pub const EDESTADDRREQ: ::c_int = 39; -pub const EMSGSIZE: ::c_int = 40; -pub const EPROTOTYPE: ::c_int = 41; -pub const ENOPROTOOPT: ::c_int = 42; -pub const EPROTONOSUPPORT: ::c_int = 43; -pub const ESOCKTNOSUPPORT: ::c_int = 44; -pub const EOPNOTSUPP: ::c_int = 45; -pub const EPFNOSUPPORT: ::c_int = 46; -pub const EAFNOSUPPORT: ::c_int = 47; -pub const EADDRINUSE: ::c_int = 48; -pub const EADDRNOTAVAIL: ::c_int = 49; -pub const ENETDOWN: ::c_int = 50; -pub const ENETUNREACH: ::c_int = 51; -pub const ENETRESET: ::c_int = 52; -pub const ECONNABORTED: ::c_int = 53; -pub const ECONNRESET: ::c_int = 54; -pub const ENOBUFS: ::c_int = 55; -pub const EISCONN: ::c_int = 56; -pub const ENOTCONN: ::c_int = 57; -pub const ESHUTDOWN: ::c_int = 58; -pub const ETOOMANYREFS: ::c_int = 59; -pub const ETIMEDOUT: ::c_int = 60; -pub const ECONNREFUSED: ::c_int = 61; -pub const ELOOP: ::c_int = 62; -pub const ENAMETOOLONG: ::c_int = 63; -pub const EHOSTDOWN: ::c_int = 64; -pub const EHOSTUNREACH: ::c_int = 65; -pub const ENOTEMPTY: ::c_int = 66; -pub const EPROCLIM: ::c_int = 67; -pub const EUSERS: ::c_int = 68; -pub const EDQUOT: ::c_int = 69; -pub const ESTALE: ::c_int = 70; -pub const EREMOTE: ::c_int = 71; -pub const EBADRPC: ::c_int = 72; -pub const ERPCMISMATCH: ::c_int = 73; -pub const EPROGUNAVAIL: ::c_int = 74; -pub const EPROGMISMATCH: ::c_int = 75; -pub const EPROCUNAVAIL: ::c_int = 76; -pub const ENOLCK: ::c_int = 77; -pub const ENOSYS: ::c_int = 78; -pub const EFTYPE: ::c_int = 79; -pub const EAUTH: ::c_int = 80; -pub const ENEEDAUTH: ::c_int = 81; -pub const EIDRM: ::c_int = 82; -pub const ENOMSG: ::c_int = 83; -pub const EOVERFLOW: ::c_int = 84; -pub const ECANCELED: ::c_int = 85; -pub const EILSEQ: ::c_int = 86; -pub const ENOATTR: ::c_int = 87; -pub const EDOOFUS: ::c_int = 88; -pub const EBADMSG: ::c_int = 89; -pub const EMULTIHOP: ::c_int = 90; -pub const ENOLINK: ::c_int = 91; -pub const EPROTO: ::c_int = 92; -pub const ELAST: ::c_int = 96; - -pub const F_DUPFD: ::c_int = 0; -pub const F_GETFD: ::c_int = 1; -pub const F_SETFD: ::c_int = 2; -pub const F_GETFL: ::c_int = 3; -pub const F_SETFL: ::c_int = 4; - -pub const SIGTRAP: ::c_int = 5; - -pub const GLOB_APPEND : ::c_int = 0x0001; -pub const GLOB_DOOFFS : ::c_int = 0x0002; -pub const GLOB_ERR : ::c_int = 0x0004; -pub const GLOB_MARK : ::c_int = 0x0008; -pub const GLOB_NOCHECK : ::c_int = 0x0010; -pub const GLOB_NOSORT : ::c_int = 0x0020; -pub const GLOB_NOESCAPE: ::c_int = 0x2000; - -pub const GLOB_NOSPACE : ::c_int = -1; -pub const GLOB_ABORTED : ::c_int = -2; -pub const GLOB_NOMATCH : ::c_int = -3; - -pub const POSIX_MADV_NORMAL: ::c_int = 0; -pub const POSIX_MADV_RANDOM: ::c_int = 1; -pub const POSIX_MADV_SEQUENTIAL: ::c_int = 2; -pub const POSIX_MADV_WILLNEED: ::c_int = 3; -pub const POSIX_MADV_DONTNEED: ::c_int = 4; - -pub const _SC_IOV_MAX: ::c_int = 56; -pub const _SC_GETGR_R_SIZE_MAX: ::c_int = 70; -pub const _SC_GETPW_R_SIZE_MAX: ::c_int = 71; -pub const _SC_LOGIN_NAME_MAX: ::c_int = 73; -pub const _SC_MQ_PRIO_MAX: ::c_int = 75; -pub const _SC_NPROCESSORS_ONLN: ::c_int = 58; -pub const _SC_THREAD_ATTR_STACKADDR: ::c_int = 82; -pub const _SC_THREAD_ATTR_STACKSIZE: ::c_int = 83; -pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: ::c_int = 85; -pub const _SC_THREAD_KEYS_MAX: ::c_int = 86; -pub const _SC_THREAD_PRIO_INHERIT: ::c_int = 87; -pub const _SC_THREAD_PRIO_PROTECT: ::c_int = 88; -pub const _SC_THREAD_PRIORITY_SCHEDULING: ::c_int = 89; -pub const _SC_THREAD_PROCESS_SHARED: ::c_int = 90; -pub const _SC_THREAD_SAFE_FUNCTIONS: ::c_int = 91; -pub const _SC_THREAD_STACK_MIN: ::c_int = 93; -pub const _SC_THREAD_THREADS_MAX: ::c_int = 94; -pub const _SC_THREADS: ::c_int = 96; -pub const _SC_TTY_NAME_MAX: ::c_int = 101; -pub const _SC_ATEXIT_MAX: ::c_int = 107; -pub const _SC_XOPEN_CRYPT: ::c_int = 108; -pub const _SC_XOPEN_ENH_I18N: ::c_int = 109; -pub const _SC_XOPEN_LEGACY: ::c_int = 110; -pub const _SC_XOPEN_REALTIME: ::c_int = 111; -pub const _SC_XOPEN_REALTIME_THREADS: ::c_int = 112; -pub const _SC_XOPEN_SHM: ::c_int = 113; -pub const _SC_XOPEN_UNIX: ::c_int = 115; -pub const _SC_XOPEN_VERSION: ::c_int = 116; -pub const _SC_XOPEN_XCU_VERSION: ::c_int = 117; - -pub const PTHREAD_CREATE_JOINABLE: ::c_int = 0; -pub const PTHREAD_CREATE_DETACHED: ::c_int = 1; - -pub const CLOCK_REALTIME: ::c_int = 0; -pub const CLOCK_MONOTONIC: ::c_int = 4; - -pub const RLIMIT_CPU: ::c_int = 0; -pub const RLIMIT_FSIZE: ::c_int = 1; -pub const RLIMIT_DATA: ::c_int = 2; -pub const RLIMIT_STACK: ::c_int = 3; -pub const RLIMIT_CORE: ::c_int = 4; -pub const RLIMIT_RSS: ::c_int = 5; -pub const RLIMIT_MEMLOCK: ::c_int = 6; -pub const RLIMIT_NPROC: ::c_int = 7; -pub const RLIMIT_NOFILE: ::c_int = 8; -pub const RLIMIT_SBSIZE: ::c_int = 9; -pub const RLIMIT_VMEM: ::c_int = 10; -pub const RLIMIT_AS: ::c_int = RLIMIT_VMEM; -pub const RLIMIT_NPTS: ::c_int = 11; -pub const RLIMIT_SWAP: ::c_int = 12; - -pub const RLIM_NLIMITS: rlim_t = 13; -pub const RLIM_INFINITY: rlim_t = 0x7fff_ffff_ffff_ffff; - -pub const RUSAGE_SELF: ::c_int = 0; -pub const RUSAGE_CHILDREN: ::c_int = -1; -pub const RUSAGE_THREAD: ::c_int = 1; - -pub const MADV_NORMAL: ::c_int = 0; -pub const MADV_RANDOM: ::c_int = 1; -pub const MADV_SEQUENTIAL: ::c_int = 2; -pub const MADV_WILLNEED: ::c_int = 3; -pub const MADV_DONTNEED: ::c_int = 4; -pub const MADV_FREE: ::c_int = 5; -pub const MADV_NOSYNC: ::c_int = 6; -pub const MADV_AUTOSYNC: ::c_int = 7; -pub const MADV_NOCORE: ::c_int = 8; -pub const MADV_CORE: ::c_int = 9; -pub const MADV_PROTECT: ::c_int = 10; - -pub const MINCORE_INCORE: ::c_int = 0x1; -pub const MINCORE_REFERENCED: ::c_int = 0x2; -pub const MINCORE_MODIFIED: ::c_int = 0x4; -pub const MINCORE_REFERENCED_OTHER: ::c_int = 0x8; -pub const MINCORE_MODIFIED_OTHER: ::c_int = 0x10; -pub const MINCORE_SUPER: ::c_int = 0x20; - -pub const AF_INET: ::c_int = 2; -pub const AF_INET6: ::c_int = 28; -pub const AF_UNIX: ::c_int = 1; -pub const SOCK_STREAM: ::c_int = 1; -pub const SOCK_DGRAM: ::c_int = 2; -pub const SOCK_RAW: ::c_int = 3; -pub const IPPROTO_TCP: ::c_int = 6; -pub const IPPROTO_IP: ::c_int = 0; -pub const IPPROTO_IPV6: ::c_int = 41; -pub const IP_MULTICAST_TTL: ::c_int = 10; -pub const IP_MULTICAST_LOOP: ::c_int = 11; -pub const IP_TTL: ::c_int = 4; -pub const IP_HDRINCL: ::c_int = 2; -pub const IP_ADD_MEMBERSHIP: ::c_int = 12; -pub const IP_DROP_MEMBERSHIP: ::c_int = 13; -pub const IPV6_JOIN_GROUP: ::c_int = 12; -pub const IPV6_LEAVE_GROUP: ::c_int = 13; - -pub const TCP_NODELAY: ::c_int = 1; -pub const TCP_KEEPIDLE: ::c_int = 256; -pub const SOL_SOCKET: ::c_int = 0xffff; -pub const SO_DEBUG: ::c_int = 0x01; -pub const SO_ACCEPTCONN: ::c_int = 0x0002; -pub const SO_REUSEADDR: ::c_int = 0x0004; -pub const SO_KEEPALIVE: ::c_int = 0x0008; -pub const SO_DONTROUTE: ::c_int = 0x0010; -pub const SO_BROADCAST: ::c_int = 0x0020; -pub const SO_USELOOPBACK: ::c_int = 0x0040; -pub const SO_LINGER: ::c_int = 0x0080; -pub const SO_OOBINLINE: ::c_int = 0x0100; -pub const SO_REUSEPORT: ::c_int = 0x0200; -pub const SO_SNDBUF: ::c_int = 0x1001; -pub const SO_RCVBUF: ::c_int = 0x1002; -pub const SO_SNDLOWAT: ::c_int = 0x1003; -pub const SO_RCVLOWAT: ::c_int = 0x1004; -pub const SO_SNDTIMEO: ::c_int = 0x1005; -pub const SO_RCVTIMEO: ::c_int = 0x1006; -pub const SO_ERROR: ::c_int = 0x1007; -pub const SO_TYPE: ::c_int = 0x1008; - -pub const IFF_LOOPBACK: ::c_int = 0x8; - -pub const SHUT_RD: ::c_int = 0; -pub const SHUT_WR: ::c_int = 1; -pub const SHUT_RDWR: ::c_int = 2; - -pub const LOCK_SH: ::c_int = 1; -pub const LOCK_EX: ::c_int = 2; -pub const LOCK_NB: ::c_int = 4; -pub const LOCK_UN: ::c_int = 8; - -pub const O_SYNC: ::c_int = 128; -pub const O_NONBLOCK: ::c_int = 4; -pub const CTL_KERN: ::c_int = 1; -pub const KERN_PROC: ::c_int = 14; - -pub const MAP_COPY: ::c_int = 0x0002; -pub const MAP_RENAME: ::c_int = 0x0020; -pub const MAP_NORESERVE: ::c_int = 0x0040; -pub const MAP_HASSEMAPHORE: ::c_int = 0x0200; -pub const MAP_STACK: ::c_int = 0x0400; -pub const MAP_NOSYNC: ::c_int = 0x0800; -pub const MAP_NOCORE: ::c_int = 0x020000; - -pub const IPPROTO_RAW: ::c_int = 255; - -pub const _SC_ARG_MAX: ::c_int = 1; -pub const _SC_CHILD_MAX: ::c_int = 2; -pub const _SC_CLK_TCK: ::c_int = 3; -pub const _SC_NGROUPS_MAX: ::c_int = 4; -pub const _SC_OPEN_MAX: ::c_int = 5; -pub const _SC_JOB_CONTROL: ::c_int = 6; -pub const _SC_SAVED_IDS: ::c_int = 7; -pub const _SC_VERSION: ::c_int = 8; -pub const _SC_BC_BASE_MAX: ::c_int = 9; -pub const _SC_BC_DIM_MAX: ::c_int = 10; -pub const _SC_BC_SCALE_MAX: ::c_int = 11; -pub const _SC_BC_STRING_MAX: ::c_int = 12; -pub const _SC_COLL_WEIGHTS_MAX: ::c_int = 13; -pub const _SC_EXPR_NEST_MAX: ::c_int = 14; -pub const _SC_LINE_MAX: ::c_int = 15; -pub const _SC_RE_DUP_MAX: ::c_int = 16; -pub const _SC_2_VERSION: ::c_int = 17; -pub const _SC_2_C_BIND: ::c_int = 18; -pub const _SC_2_C_DEV: ::c_int = 19; -pub const _SC_2_CHAR_TERM: ::c_int = 20; -pub const _SC_2_FORT_DEV: ::c_int = 21; -pub const _SC_2_FORT_RUN: ::c_int = 22; -pub const _SC_2_LOCALEDEF: ::c_int = 23; -pub const _SC_2_SW_DEV: ::c_int = 24; -pub const _SC_2_UPE: ::c_int = 25; -pub const _SC_STREAM_MAX: ::c_int = 26; -pub const _SC_TZNAME_MAX: ::c_int = 27; -pub const _SC_ASYNCHRONOUS_IO: ::c_int = 28; -pub const _SC_MAPPED_FILES: ::c_int = 29; -pub const _SC_MEMLOCK: ::c_int = 30; -pub const _SC_MEMLOCK_RANGE: ::c_int = 31; -pub const _SC_MEMORY_PROTECTION: ::c_int = 32; -pub const _SC_MESSAGE_PASSING: ::c_int = 33; -pub const _SC_PRIORITIZED_IO: ::c_int = 34; -pub const _SC_PRIORITY_SCHEDULING: ::c_int = 35; -pub const _SC_REALTIME_SIGNALS: ::c_int = 36; -pub const _SC_SEMAPHORES: ::c_int = 37; -pub const _SC_FSYNC: ::c_int = 38; -pub const _SC_SHARED_MEMORY_OBJECTS: ::c_int = 39; -pub const _SC_SYNCHRONIZED_IO: ::c_int = 40; -pub const _SC_TIMERS: ::c_int = 41; -pub const _SC_AIO_LISTIO_MAX: ::c_int = 42; -pub const _SC_AIO_MAX: ::c_int = 43; -pub const _SC_AIO_PRIO_DELTA_MAX: ::c_int = 44; -pub const _SC_DELAYTIMER_MAX: ::c_int = 45; -pub const _SC_MQ_OPEN_MAX: ::c_int = 46; -pub const _SC_PAGESIZE: ::c_int = 47; -pub const _SC_PAGE_SIZE: ::c_int = _SC_PAGESIZE; -pub const _SC_RTSIG_MAX: ::c_int = 48; -pub const _SC_SEM_NSEMS_MAX: ::c_int = 49; -pub const _SC_SEM_VALUE_MAX: ::c_int = 50; -pub const _SC_SIGQUEUE_MAX: ::c_int = 51; -pub const _SC_TIMER_MAX: ::c_int = 52; - -pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = 0 as *mut _; -pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = 0 as *mut _; -pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = 0 as *mut _; -pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 2; - -pub const SCHED_FIFO: ::c_int = 1; -pub const SCHED_OTHER: ::c_int = 2; -pub const SCHED_RR: ::c_int = 3; - -pub const FD_SETSIZE: usize = 1024; - -pub const ST_NOSUID: ::c_ulong = 2; - -pub const NI_MAXHOST: ::size_t = 1025; - -pub const Q_GETQUOTA: ::c_int = 0x700; -pub const Q_SETQUOTA: ::c_int = 0x800; - -pub const RTLD_LOCAL: ::c_int = 0; -pub const RTLD_NODELETE: ::c_int = 0x1000; -pub const RTLD_NOLOAD: ::c_int = 0x2000; -pub const RTLD_GLOBAL: ::c_int = 0x100; - -extern { - pub fn getnameinfo(sa: *const ::sockaddr, - salen: ::socklen_t, - host: *mut ::c_char, - hostlen: ::size_t, - serv: *mut ::c_char, - servlen: ::size_t, - flags: ::c_int) -> ::c_int; - pub fn mincore(addr: *const ::c_void, len: ::size_t, - vec: *mut ::c_char) -> ::c_int; - pub fn sysctlnametomib(name: *const ::c_char, - mibp: *mut ::c_int, - sizep: *mut ::size_t) - -> ::c_int; - pub fn mprotect(addr: *const ::c_void, len: ::size_t, prot: ::c_int) - -> ::c_int; - pub fn shm_open(name: *const ::c_char, oflag: ::c_int, mode: ::mode_t) - -> ::c_int; - pub fn sysctl(name: *const ::c_int, - namelen: ::c_uint, - oldp: *mut ::c_void, - oldlenp: *mut ::size_t, - newp: *const ::c_void, - newlen: ::size_t) - -> ::c_int; - pub fn sysctlbyname(name: *const ::c_char, - oldp: *mut ::c_void, - oldlenp: *mut ::size_t, - newp: *const ::c_void, - newlen: ::size_t) - -> ::c_int; - pub fn clock_gettime(clk_id: ::c_int, tp: *mut ::timespec) -> ::c_int; - pub fn pthread_set_name_np(tid: ::pthread_t, name: *const ::c_char); - pub fn posix_fallocate(fd: ::c_int, offset: ::off_t, - len: ::off_t) -> ::c_int; - pub fn sched_setscheduler(pid: ::pid_t, policy: ::c_int, param: *const sched_param) -> ::c_int; - pub fn sched_getscheduler(pid: ::pid_t) -> ::c_int; - pub fn memrchr(cx: *const ::c_void, c: ::c_int, n: ::size_t) -> *mut ::c_void; - pub fn sendfile(fd: ::c_int, - s: ::c_int, - offset: ::off_t, - nbytes: ::size_t, - hdtr: *mut ::sf_hdtr, - sbytes: *mut ::off_t, - flags: ::c_int) -> ::c_int; -} - -cfg_if! { - if #[cfg(target_arch = "x86")] { - mod x86; - pub use self::x86::*; - } else if #[cfg(target_arch = "x86_64")] { - mod x86_64; - pub use self::x86_64::*; - } else { - // ... - } -} - -cfg_if! { - if #[cfg(target_os = "freebsd")] { - mod freebsd; - pub use self::freebsd::*; - } else if #[cfg(target_os = "dragonfly")] { - mod dragonfly; - pub use self::dragonfly::*; - } else { - // ... - } -} diff --git a/deps/libc-0.2.7/src/unix/bsd/mod.rs b/deps/libc-0.2.7/src/unix/bsd/mod.rs deleted file mode 100644 index 2a0104c20..000000000 --- a/deps/libc-0.2.7/src/unix/bsd/mod.rs +++ /dev/null @@ -1,337 +0,0 @@ -use dox::mem; - -pub type c_char = i8; -pub type wchar_t = i32; -pub type off_t = i64; -pub type useconds_t = u32; -pub type blkcnt_t = i64; -pub type socklen_t = u32; -pub type sa_family_t = u8; -pub type pthread_t = ::uintptr_t; -pub type nfds_t = ::c_uint; - -s! { - pub struct sockaddr { - pub sa_len: u8, - pub sa_family: sa_family_t, - pub sa_data: [::c_char; 14], - } - - pub struct sockaddr_in6 { - pub sin6_len: u8, - pub sin6_family: sa_family_t, - pub sin6_port: ::in_port_t, - pub sin6_flowinfo: u32, - pub sin6_addr: ::in6_addr, - pub sin6_scope_id: u32, - } - - pub struct sockaddr_un { - pub sun_len: u8, - pub sun_family: sa_family_t, - pub sun_path: [c_char; 104] - } - - pub struct passwd { - pub pw_name: *mut ::c_char, - pub pw_passwd: *mut ::c_char, - pub pw_uid: ::uid_t, - pub pw_gid: ::gid_t, - pub pw_change: ::time_t, - pub pw_class: *mut ::c_char, - pub pw_gecos: *mut ::c_char, - pub pw_dir: *mut ::c_char, - pub pw_shell: *mut ::c_char, - pub pw_expire: ::time_t, - - #[cfg(not(any(target_os = "macos", - target_os = "ios", - target_os = "netbsd", - target_os = "openbsd")))] - pub pw_fields: ::c_int, - } - - pub struct ifaddrs { - pub ifa_next: *mut ifaddrs, - pub ifa_name: *mut ::c_char, - pub ifa_flags: ::c_uint, - pub ifa_addr: *mut ::sockaddr, - pub ifa_netmask: *mut ::sockaddr, - pub ifa_dstaddr: *mut ::sockaddr, - pub ifa_data: *mut ::c_void - } - - pub struct fd_set { - #[cfg(all(target_pointer_width = "64", - target_os = "freebsd"))] - fds_bits: [i64; FD_SETSIZE / 64], - #[cfg(not(all(target_pointer_width = "64", - target_os = "freebsd")))] - fds_bits: [i32; FD_SETSIZE / 32], - } - - pub struct tm { - pub tm_sec: ::c_int, - pub tm_min: ::c_int, - pub tm_hour: ::c_int, - pub tm_mday: ::c_int, - pub tm_mon: ::c_int, - pub tm_year: ::c_int, - pub tm_wday: ::c_int, - pub tm_yday: ::c_int, - pub tm_isdst: ::c_int, - pub tm_gmtoff: ::c_long, - pub tm_zone: *mut ::c_char, - } - - pub struct utsname { - pub sysname: [::c_char; 256], - pub nodename: [::c_char; 256], - pub release: [::c_char; 256], - pub version: [::c_char; 256], - pub machine: [::c_char; 256], - } - - pub struct msghdr { - pub msg_name: *mut ::c_void, - pub msg_namelen: ::socklen_t, - pub msg_iov: *mut ::iovec, - pub msg_iovlen: ::c_int, - pub msg_control: *mut ::c_void, - pub msg_controllen: ::socklen_t, - pub msg_flags: ::c_int, - } - - pub struct fsid_t { - __fsid_val: [::int32_t; 2], - } -} - -pub const FIOCLEX: ::c_ulong = 0x20006601; -pub const FIONBIO: ::c_ulong = 0x8004667e; - -pub const PATH_MAX: ::c_int = 1024; - -pub const SA_ONSTACK: ::c_int = 0x0001; -pub const SA_SIGINFO: ::c_int = 0x0040; -pub const SA_RESTART: ::c_int = 0x0002; -pub const SA_RESETHAND: ::c_int = 0x0004; -pub const SA_NOCLDSTOP: ::c_int = 0x0008; -pub const SA_NODEFER: ::c_int = 0x0010; -pub const SA_NOCLDWAIT: ::c_int = 0x0020; - -pub const SIGCHLD: ::c_int = 20; -pub const SIGBUS: ::c_int = 10; -pub const SIGUSR1: ::c_int = 30; -pub const SIGUSR2: ::c_int = 31; -pub const SIGCONT: ::c_int = 19; -pub const SIGSTOP: ::c_int = 17; -pub const SIGTSTP: ::c_int = 18; -pub const SIGURG: ::c_int = 16; -pub const SIGIO: ::c_int = 23; -pub const SIGSYS: ::c_int = 12; -pub const SIGTTIN: ::c_int = 21; -pub const SIGTTOU: ::c_int = 22; -pub const SIGXCPU: ::c_int = 24; -pub const SIGXFSZ: ::c_int = 25; -pub const SIGVTALRM: ::c_int = 26; -pub const SIGPROF: ::c_int = 27; -pub const SIGWINCH: ::c_int = 28; - -pub const SIG_SETMASK: ::c_int = 3; -pub const SIG_BLOCK: ::c_int = 0x1; -pub const SIG_UNBLOCK: ::c_int = 0x2; - -pub const IPV6_MULTICAST_LOOP: ::c_int = 11; -pub const IPV6_V6ONLY: ::c_int = 27; - -pub const ST_RDONLY: ::c_ulong = 1; - -pub const CTL_HW: ::c_int = 6; -pub const HW_NCPU: ::c_int = 3; - -pub const EV_ADD: ::uint16_t = 0x1; -pub const EV_CLEAR: ::uint16_t = 0x20; -pub const EV_DELETE: ::uint16_t = 0x2; -pub const EV_DISABLE: ::uint16_t = 0x8; -pub const EV_ENABLE: ::uint16_t = 0x4; -pub const EV_EOF: ::uint16_t = 0x8000; -pub const EV_ERROR: ::uint16_t = 0x4000; -pub const EV_FLAG1: ::uint16_t = 0x2000; -pub const EV_ONESHOT: ::uint16_t = 0x10; -pub const EV_SYSFLAGS: ::uint16_t = 0xf000; - -pub const NOTE_ATTRIB: ::uint32_t = 0x8; -pub const NOTE_CHILD: ::uint32_t = 0x4; -pub const NOTE_DELETE: ::uint32_t = 0x1; -pub const NOTE_EXEC: ::uint32_t = 0x20000000; -pub const NOTE_EXIT: ::uint32_t = 0x80000000; -pub const NOTE_EXTEND: ::uint32_t = 0x4; -pub const NOTE_FORK: ::uint32_t = 0x40000000; -pub const NOTE_LINK: ::uint32_t = 0x10; -pub const NOTE_LOWAT: ::uint32_t = 0x1; -pub const NOTE_PDATAMASK: ::uint32_t = 0x000fffff; -pub const NOTE_RENAME: ::uint32_t = 0x20; -pub const NOTE_REVOKE: ::uint32_t = 0x40; -pub const NOTE_TRACK: ::uint32_t = 0x1; -pub const NOTE_TRACKERR: ::uint32_t = 0x2; -pub const NOTE_WRITE: ::uint32_t = 0x2; - -pub const NCCS: usize = 20; - -pub const O_ASYNC: ::c_int = 0x40; -pub const O_FSYNC: ::c_int = 0x80; -pub const O_NDELAY: ::c_int = 0x4; -pub const O_NOFOLLOW: ::c_int = 0x100; - -pub const F_GETOWN: ::c_int = 5; -pub const F_SETOWN: ::c_int = 6; - -pub const MNT_FORCE: ::c_int = 0x80000; - -pub const Q_SYNC: ::c_int = 0x600; -pub const Q_QUOTAON: ::c_int = 0x100; -pub const Q_QUOTAOFF: ::c_int = 0x200; - -pub const TCIOFF: ::c_int = 3; -pub const TCION: ::c_int = 4; -pub const TCOOFF: ::c_int = 1; -pub const TCOON: ::c_int = 2; -pub const TCIFLUSH: ::c_int = 1; -pub const TCOFLUSH: ::c_int = 2; -pub const TCIOFLUSH: ::c_int = 3; -pub const TCSANOW: ::c_int = 0; -pub const TCSADRAIN: ::c_int = 1; -pub const TCSAFLUSH: ::c_int = 2; -pub const VEOF: usize = 0; -pub const VEOL: usize = 1; -pub const VEOL2: usize = 2; -pub const VERASE: usize = 3; -pub const VWERASE: usize = 4; -pub const VKILL: usize = 5; -pub const VREPRINT: usize = 6; -pub const VINTR: usize = 8; -pub const VQUIT: usize = 9; -pub const VSUSP: usize = 10; -pub const VSTART: usize = 12; -pub const VSTOP: usize = 13; -pub const VLNEXT: usize = 14; -pub const VDISCARD: usize = 15; -pub const VMIN: usize = 16; -pub const VTIME: usize = 17; -pub const IGNBRK: ::tcflag_t = 0x00000001; -pub const BRKINT: ::tcflag_t = 0x00000002; -pub const IGNPAR: ::tcflag_t = 0x00000004; -pub const PARMRK: ::tcflag_t = 0x00000008; -pub const INPCK: ::tcflag_t = 0x00000010; -pub const ISTRIP: ::tcflag_t = 0x00000020; -pub const INLCR: ::tcflag_t = 0x00000040; -pub const IGNCR: ::tcflag_t = 0x00000080; -pub const ICRNL: ::tcflag_t = 0x00000100; -pub const IXON: ::tcflag_t = 0x00000200; -pub const IXOFF: ::tcflag_t = 0x00000400; -pub const IXANY: ::tcflag_t = 0x00000800; -pub const IMAXBEL: ::tcflag_t = 0x00002000; -pub const OPOST: ::tcflag_t = 0x1; -pub const ONLCR: ::tcflag_t = 0x2; -pub const CSIZE: ::tcflag_t = 0x00000300; -pub const CS5: ::tcflag_t = 0x00000000; -pub const CS6: ::tcflag_t = 0x00000100; -pub const CS7: ::tcflag_t = 0x00000200; -pub const CS8: ::tcflag_t = 0x00000300; -pub const CSTOPB: ::tcflag_t = 0x00000400; -pub const CREAD: ::tcflag_t = 0x00000800; -pub const PARENB: ::tcflag_t = 0x00001000; -pub const PARODD: ::tcflag_t = 0x00002000; -pub const HUPCL: ::tcflag_t = 0x00004000; -pub const CLOCAL: ::tcflag_t = 0x00008000; -pub const ECHOKE: ::tcflag_t = 0x00000001; -pub const ECHOE: ::tcflag_t = 0x00000002; -pub const ECHOK: ::tcflag_t = 0x00000004; -pub const ECHO: ::tcflag_t = 0x00000008; -pub const ECHONL: ::tcflag_t = 0x00000010; -pub const ECHOPRT: ::tcflag_t = 0x00000020; -pub const ECHOCTL: ::tcflag_t = 0x00000040; -pub const ISIG: ::tcflag_t = 0x00000080; -pub const ICANON: ::tcflag_t = 0x00000100; -pub const IEXTEN: ::tcflag_t = 0x00000400; -pub const EXTPROC: ::tcflag_t = 0x00000800; -pub const TOSTOP: ::tcflag_t = 0x00400000; -pub const FLUSHO: ::tcflag_t = 0x00800000; -pub const PENDIN: ::tcflag_t = 0x20000000; -pub const NOFLSH: ::tcflag_t = 0x80000000; - -pub const WNOHANG: ::c_int = 1; - -pub const RTLD_NOW: ::c_int = 0x2; - -f! { - pub fn FD_CLR(fd: ::c_int, set: *mut fd_set) -> () { - let bits = mem::size_of_val(&(*set).fds_bits[0]) * 8; - let fd = fd as usize; - (*set).fds_bits[fd / bits] &= !(1 << (fd % bits)); - return - } - - pub fn FD_ISSET(fd: ::c_int, set: *mut fd_set) -> bool { - let bits = mem::size_of_val(&(*set).fds_bits[0]) * 8; - let fd = fd as usize; - return ((*set).fds_bits[fd / bits] & (1 << (fd % bits))) != 0 - } - - pub fn FD_SET(fd: ::c_int, set: *mut fd_set) -> () { - let bits = mem::size_of_val(&(*set).fds_bits[0]) * 8; - let fd = fd as usize; - (*set).fds_bits[fd / bits] |= 1 << (fd % bits); - return - } - - pub fn FD_ZERO(set: *mut fd_set) -> () { - for slot in (*set).fds_bits.iter_mut() { - *slot = 0; - } - } - - pub fn WIFEXITED(status: ::c_int) -> bool { - (status & 0x7f) == 0 - } - - pub fn WEXITSTATUS(status: ::c_int) -> ::c_int { - status >> 8 - } - - pub fn WTERMSIG(status: ::c_int) -> ::c_int { - status & 0o177 - } -} - -extern { - pub fn setgroups(ngroups: ::c_int, - ptr: *const ::gid_t) -> ::c_int; - pub fn ioctl(fd: ::c_int, request: ::c_ulong, ...) -> ::c_int; - pub fn kqueue() -> ::c_int; - pub fn unmount(target: *const ::c_char, arg: ::c_int) -> ::c_int; - pub fn syscall(num: ::c_int, ...) -> ::c_int; - #[cfg_attr(target_os = "netbsd", link_name = "__getpwuid_r50")] - pub fn getpwuid_r(uid: ::uid_t, - pwd: *mut passwd, - buf: *mut ::c_char, - buflen: ::size_t, - result: *mut *mut passwd) -> ::c_int; -} - -cfg_if! { - if #[cfg(any(target_os = "macos", target_os = "ios"))] { - mod apple; - pub use self::apple::*; - } else if #[cfg(any(target_os = "openbsd", target_os = "netbsd", - target_os = "bitrig"))] { - mod openbsdlike; - pub use self::openbsdlike::*; - } else if #[cfg(any(target_os = "freebsd", target_os = "dragonfly"))] { - mod freebsdlike; - pub use self::freebsdlike::*; - } else { - // ... - } -} diff --git a/deps/libc-0.2.7/src/unix/bsd/openbsdlike/bitrig.rs b/deps/libc-0.2.7/src/unix/bsd/openbsdlike/bitrig.rs deleted file mode 100644 index ab9cc9f0c..000000000 --- a/deps/libc-0.2.7/src/unix/bsd/openbsdlike/bitrig.rs +++ /dev/null @@ -1,243 +0,0 @@ -pub type clock_t = i64; -pub type suseconds_t = i64; -pub type dev_t = i32; -pub type sigset_t = ::c_uint; -pub type blksize_t = ::uint32_t; -pub type fsblkcnt_t = ::c_uint; -pub type fsfilcnt_t = ::c_uint; -pub type pthread_attr_t = *mut ::c_void; -pub type pthread_mutex_t = *mut ::c_void; -pub type pthread_mutexattr_t = *mut ::c_void; -pub type pthread_cond_t = *mut ::c_void; -pub type pthread_rwlock_t = *mut ::c_void; - -s! { - pub struct dirent { - pub d_fileno: ::ino_t, - pub d_off: ::off_t, - pub d_reclen: u16, - pub d_type: u8, - pub d_namlen: u8, - __d_padding: [u8; 4], - pub d_name: [::c_char; 256], - } - - pub struct glob_t { - pub gl_pathc: ::c_int, - pub gl_matchc: ::c_int, - pub gl_offs: ::c_int, - pub gl_flags: ::c_int, - pub gl_pathv: *mut *mut ::c_char, - __unused1: *mut ::c_void, - __unused2: *mut ::c_void, - __unused3: *mut ::c_void, - __unused4: *mut ::c_void, - __unused5: *mut ::c_void, - __unused6: *mut ::c_void, - __unused7: *mut ::c_void, - } - - pub struct stat { - pub st_mode: ::mode_t, - pub st_dev: ::dev_t, - pub st_ino: ::ino_t, - pub st_nlink: ::nlink_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::dev_t, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - pub st_size: ::off_t, - pub st_blocks: ::blkcnt_t, - pub st_blksize: ::blksize_t, - pub st_flags: ::uint32_t, - pub st_gen: ::uint32_t, - pub st_birthtime: ::time_t, - pub st_birthtime_nsec: ::c_long, - } - - pub struct statvfs { - pub f_bsize: ::c_ulong, - pub f_frsize: ::c_ulong, - pub f_blocks: ::fsblkcnt_t, - pub f_bfree: ::fsblkcnt_t, - pub f_bavail: ::fsblkcnt_t, - pub f_files: ::fsfilcnt_t, - pub f_ffree: ::fsfilcnt_t, - pub f_favail: ::fsfilcnt_t, - pub f_fsid: ::c_ulong, - pub f_flag: ::c_ulong, - pub f_namemax: ::c_ulong, - } - - pub struct addrinfo { - pub ai_flags: ::c_int, - pub ai_family: ::c_int, - pub ai_socktype: ::c_int, - pub ai_protocol: ::c_int, - pub ai_addrlen: ::socklen_t, - pub ai_addr: *mut ::sockaddr, - pub ai_canonname: *mut ::c_char, - pub ai_next: *mut ::addrinfo, - } - - pub struct sockaddr_storage { - pub ss_len: u8, - pub ss_family: ::sa_family_t, - __ss_pad1: [u8; 6], - __ss_pad2: i64, - __ss_pad3: [u8; 240], - } - - pub struct siginfo_t { - pub si_signo: ::c_int, - pub si_code: ::c_int, - pub si_errno: ::c_int, - pub si_addr: *mut ::c_void - } - - pub struct Dl_info { - pub dli_fname: *const ::c_char, - pub dli_fbase: *mut ::c_void, - pub dli_sname: *const ::c_char, - pub dli_saddr: *mut ::c_void, - } -} - -pub const O_CLOEXEC: ::c_int = 0x10000; - -pub const MS_SYNC : ::c_int = 0x0002; -pub const MS_INVALIDATE : ::c_int = 0x0004; - -pub const PTHREAD_STACK_MIN : ::size_t = 2048; - -pub const ENOATTR : ::c_int = 83; -pub const EILSEQ : ::c_int = 84; -pub const EOVERFLOW : ::c_int = 87; -pub const ECANCELED : ::c_int = 88; -pub const EIDRM : ::c_int = 89; -pub const ENOMSG : ::c_int = 90; -pub const ENOTSUP : ::c_int = 91; -pub const ELAST : ::c_int = 91; - -pub const F_DUPFD_CLOEXEC : ::c_int = 10; - -pub const RLIM_NLIMITS: ::c_int = 9; - -pub const SO_SNDTIMEO: ::c_int = 0x1005; -pub const SO_RCVTIMEO: ::c_int = 0x1006; - -pub const KERN_PROC : ::c_int = 66; -pub const O_DSYNC : ::c_int = 128; - -pub const MAP_RENAME : ::c_int = 0x0000; -pub const MAP_NORESERVE : ::c_int = 0x0000; -pub const MAP_HASSEMAPHORE : ::c_int = 0x0000; - -pub const EIPSEC : ::c_int = 82; -pub const ENOMEDIUM : ::c_int = 85; -pub const EMEDIUMTYPE : ::c_int = 86; - -pub const RUSAGE_THREAD: ::c_int = 1; - -pub const IPV6_ADD_MEMBERSHIP: ::c_int = 12; -pub const IPV6_DROP_MEMBERSHIP: ::c_int = 13; - -pub const MAP_COPY : ::c_int = 0x0002; -pub const MAP_NOEXTEND : ::c_int = 0x0000; - -pub const _SC_IOV_MAX : ::c_int = 51; -pub const _SC_GETGR_R_SIZE_MAX : ::c_int = 100; -pub const _SC_GETPW_R_SIZE_MAX : ::c_int = 101; -pub const _SC_LOGIN_NAME_MAX : ::c_int = 102; -pub const _SC_MQ_PRIO_MAX : ::c_int = 59; -pub const _SC_NPROCESSORS_ONLN : ::c_int = 503; -pub const _SC_THREADS : ::c_int = 91; -pub const _SC_THREAD_ATTR_STACKADDR : ::c_int = 77; -pub const _SC_THREAD_ATTR_STACKSIZE : ::c_int = 78; -pub const _SC_THREAD_DESTRUCTOR_ITERATIONS : ::c_int = 80; -pub const _SC_THREAD_KEYS_MAX : ::c_int = 81; -pub const _SC_THREAD_PRIO_INHERIT : ::c_int = 82; -pub const _SC_THREAD_PRIO_PROTECT : ::c_int = 83; -pub const _SC_THREAD_PRIORITY_SCHEDULING : ::c_int = 84; -pub const _SC_THREAD_PROCESS_SHARED : ::c_int = 85; -pub const _SC_THREAD_SAFE_FUNCTIONS : ::c_int = 103; -pub const _SC_THREAD_STACK_MIN : ::c_int = 89; -pub const _SC_THREAD_THREADS_MAX : ::c_int = 90; -pub const _SC_TTY_NAME_MAX : ::c_int = 107; -pub const _SC_ATEXIT_MAX : ::c_int = 46; -pub const _SC_CLK_TCK : ::c_int = 3; -pub const _SC_AIO_LISTIO_MAX : ::c_int = 42; -pub const _SC_AIO_MAX : ::c_int = 43; -pub const _SC_ASYNCHRONOUS_IO : ::c_int = 45; -pub const _SC_MAPPED_FILES : ::c_int = 53; -pub const _SC_MEMLOCK : ::c_int = 54; -pub const _SC_MEMLOCK_RANGE : ::c_int = 55; -pub const _SC_MEMORY_PROTECTION : ::c_int = 56; -pub const _SC_MESSAGE_PASSING : ::c_int = 57; -pub const _SC_MQ_OPEN_MAX : ::c_int = 58; -pub const _SC_PRIORITY_SCHEDULING : ::c_int = 61; -pub const _SC_SEMAPHORES : ::c_int = 67; -pub const _SC_SHARED_MEMORY_OBJECTS : ::c_int = 68; -pub const _SC_SYNCHRONIZED_IO : ::c_int = 75; -pub const _SC_TIMERS : ::c_int = 94; -pub const _SC_XOPEN_CRYPT : ::c_int = 117; -pub const _SC_XOPEN_ENH_I18N : ::c_int = 118; -pub const _SC_XOPEN_LEGACY : ::c_int = 119; -pub const _SC_XOPEN_REALTIME : ::c_int = 120; -pub const _SC_XOPEN_REALTIME_THREADS : ::c_int = 121; -pub const _SC_XOPEN_UNIX : ::c_int = 123; -pub const _SC_XOPEN_VERSION : ::c_int = 125; -pub const _SC_SEM_NSEMS_MAX : ::c_int = 31; -pub const _SC_SEM_VALUE_MAX : ::c_int = 32; -pub const _SC_AIO_PRIO_DELTA_MAX : ::c_int = 44; -pub const _SC_DELAYTIMER_MAX : ::c_int = 50; -pub const _SC_PRIORITIZED_IO : ::c_int = 60; -pub const _SC_REALTIME_SIGNALS : ::c_int = 64; -pub const _SC_RTSIG_MAX : ::c_int = 66; -pub const _SC_SIGQUEUE_MAX : ::c_int = 70; -pub const _SC_TIMER_MAX : ::c_int = 93; - -pub const FD_SETSIZE: usize = 1024; - -pub const ST_NOSUID: ::c_ulong = 2; - -pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = 0 as *mut _; -pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = 0 as *mut _; -pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = 0 as *mut _; -pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 2; - -pub const KERN_PROC_ARGS: ::c_int = 55; - -pub const TMP_MAX : ::c_uint = 0x7fffffff; - -pub const NI_MAXHOST: ::size_t = 256; - -extern { - pub fn getnameinfo(sa: *const ::sockaddr, - salen: ::socklen_t, - host: *mut ::c_char, - hostlen: ::size_t, - serv: *mut ::c_char, - servlen: ::size_t, - flags: ::c_int) -> ::c_int; - pub fn mprotect(addr: *const ::c_void, len: ::size_t, prot: ::c_int) - -> ::c_int; - pub fn sysctl(name: *mut ::c_int, - namelen: ::c_uint, - oldp: *mut ::c_void, - oldlenp: *mut ::size_t, - newp: *mut ::c_void, - newlen: ::size_t) - -> ::c_int; - pub fn sysctlbyname(name: *const ::c_char, - oldp: *mut ::c_void, - oldlenp: *mut ::size_t, - newp: *mut ::c_void, - newlen: ::size_t) - -> ::c_int; -} diff --git a/deps/libc-0.2.7/src/unix/bsd/openbsdlike/mod.rs b/deps/libc-0.2.7/src/unix/bsd/openbsdlike/mod.rs deleted file mode 100644 index ea116fbf7..000000000 --- a/deps/libc-0.2.7/src/unix/bsd/openbsdlike/mod.rs +++ /dev/null @@ -1,405 +0,0 @@ -pub type c_long = i64; -pub type c_ulong = u64; -pub type time_t = i64; -pub type mode_t = u32; -pub type nlink_t = ::uint32_t; -pub type ino_t = ::uint64_t; -pub type pthread_key_t = ::c_int; -pub type rlim_t = u64; -pub type speed_t = ::c_uint; -pub type tcflag_t = ::c_uint; - -pub enum timezone {} - -s! { - pub struct sigaction { - pub sa_sigaction: ::sighandler_t, - pub sa_mask: ::sigset_t, - pub sa_flags: ::c_int, - } - - pub struct stack_t { - pub ss_sp: *mut ::c_void, - pub ss_size: ::size_t, - pub ss_flags: ::c_int, - } - - pub struct sockaddr_in { - pub sin_len: u8, - pub sin_family: ::sa_family_t, - pub sin_port: ::in_port_t, - pub sin_addr: ::in_addr, - pub sin_zero: [::int8_t; 8], - } - - pub struct termios { - pub c_iflag: ::tcflag_t, - pub c_oflag: ::tcflag_t, - pub c_cflag: ::tcflag_t, - pub c_lflag: ::tcflag_t, - pub c_cc: [::cc_t; ::NCCS], - pub c_ispeed: ::c_int, - pub c_ospeed: ::c_int, - } - - pub struct flock { - pub l_start: ::off_t, - pub l_len: ::off_t, - pub l_pid: ::pid_t, - pub l_type: ::c_short, - pub l_whence: ::c_short, - } -} - -pub const EXIT_FAILURE : ::c_int = 1; -pub const EXIT_SUCCESS : ::c_int = 0; -pub const RAND_MAX : ::c_int = 2147483647; -pub const EOF : ::c_int = -1; -pub const SEEK_SET : ::c_int = 0; -pub const SEEK_CUR : ::c_int = 1; -pub const SEEK_END : ::c_int = 2; -pub const _IOFBF : ::c_int = 0; -pub const _IONBF : ::c_int = 2; -pub const _IOLBF : ::c_int = 1; -pub const BUFSIZ : ::c_uint = 1024; -pub const FOPEN_MAX : ::c_uint = 20; -pub const FILENAME_MAX : ::c_uint = 1024; -pub const L_tmpnam : ::c_uint = 1024; -pub const O_RDONLY : ::c_int = 0; -pub const O_WRONLY : ::c_int = 1; -pub const O_RDWR : ::c_int = 2; -pub const O_ACCMODE : ::c_int = 3; -pub const O_APPEND : ::c_int = 8; -pub const O_CREAT : ::c_int = 512; -pub const O_EXCL : ::c_int = 2048; -pub const O_NOCTTY : ::c_int = 32768; -pub const O_TRUNC : ::c_int = 1024; -pub const O_SYNC : ::c_int = 128; -pub const S_IFIFO : mode_t = 4096; -pub const S_IFCHR : mode_t = 8192; -pub const S_IFBLK : mode_t = 24576; -pub const S_IFDIR : mode_t = 16384; -pub const S_IFREG : mode_t = 32768; -pub const S_IFLNK : mode_t = 40960; -pub const S_IFSOCK : mode_t = 49152; -pub const S_IFMT : mode_t = 61440; -pub const S_IEXEC : mode_t = 64; -pub const S_IWRITE : mode_t = 128; -pub const S_IREAD : mode_t = 256; -pub const S_IRWXU : mode_t = 448; -pub const S_IXUSR : mode_t = 64; -pub const S_IWUSR : mode_t = 128; -pub const S_IRUSR : mode_t = 256; -pub const S_IRWXG : mode_t = 56; -pub const S_IXGRP : mode_t = 8; -pub const S_IWGRP : mode_t = 16; -pub const S_IRGRP : mode_t = 32; -pub const S_IRWXO : mode_t = 7; -pub const S_IXOTH : mode_t = 1; -pub const S_IWOTH : mode_t = 2; -pub const S_IROTH : mode_t = 4; -pub const F_OK : ::c_int = 0; -pub const R_OK : ::c_int = 4; -pub const W_OK : ::c_int = 2; -pub const X_OK : ::c_int = 1; -pub const STDIN_FILENO : ::c_int = 0; -pub const STDOUT_FILENO : ::c_int = 1; -pub const STDERR_FILENO : ::c_int = 2; -pub const F_LOCK : ::c_int = 1; -pub const F_TEST : ::c_int = 3; -pub const F_TLOCK : ::c_int = 2; -pub const F_ULOCK : ::c_int = 0; -pub const F_GETLK: ::c_int = 7; -pub const F_SETLK: ::c_int = 8; -pub const F_SETLKW: ::c_int = 9; -pub const SIGHUP : ::c_int = 1; -pub const SIGINT : ::c_int = 2; -pub const SIGQUIT : ::c_int = 3; -pub const SIGILL : ::c_int = 4; -pub const SIGABRT : ::c_int = 6; -pub const SIGFPE : ::c_int = 8; -pub const SIGKILL : ::c_int = 9; -pub const SIGSEGV : ::c_int = 11; -pub const SIGPIPE : ::c_int = 13; -pub const SIGALRM : ::c_int = 14; -pub const SIGTERM : ::c_int = 15; -pub const SIGSTKSZ : ::size_t = 40960; - -pub const PROT_NONE : ::c_int = 0; -pub const PROT_READ : ::c_int = 1; -pub const PROT_WRITE : ::c_int = 2; -pub const PROT_EXEC : ::c_int = 4; - -pub const MAP_FILE : ::c_int = 0x0000; -pub const MAP_SHARED : ::c_int = 0x0001; -pub const MAP_PRIVATE : ::c_int = 0x0002; -pub const MAP_FIXED : ::c_int = 0x0010; -pub const MAP_ANON : ::c_int = 0x1000; - -pub const MAP_FAILED : *mut ::c_void = !0 as *mut ::c_void; - -pub const MCL_CURRENT : ::c_int = 0x0001; -pub const MCL_FUTURE : ::c_int = 0x0002; - -pub const MS_ASYNC : ::c_int = 0x0001; - -pub const EPERM : ::c_int = 1; -pub const ENOENT : ::c_int = 2; -pub const ESRCH : ::c_int = 3; -pub const EINTR : ::c_int = 4; -pub const EIO : ::c_int = 5; -pub const ENXIO : ::c_int = 6; -pub const E2BIG : ::c_int = 7; -pub const ENOEXEC : ::c_int = 8; -pub const EBADF : ::c_int = 9; -pub const ECHILD : ::c_int = 10; -pub const EDEADLK : ::c_int = 11; -pub const ENOMEM : ::c_int = 12; -pub const EACCES : ::c_int = 13; -pub const EFAULT : ::c_int = 14; -pub const ENOTBLK : ::c_int = 15; -pub const EBUSY : ::c_int = 16; -pub const EEXIST : ::c_int = 17; -pub const EXDEV : ::c_int = 18; -pub const ENODEV : ::c_int = 19; -pub const ENOTDIR : ::c_int = 20; -pub const EISDIR : ::c_int = 21; -pub const EINVAL : ::c_int = 22; -pub const ENFILE : ::c_int = 23; -pub const EMFILE : ::c_int = 24; -pub const ENOTTY : ::c_int = 25; -pub const ETXTBSY : ::c_int = 26; -pub const EFBIG : ::c_int = 27; -pub const ENOSPC : ::c_int = 28; -pub const ESPIPE : ::c_int = 29; -pub const EROFS : ::c_int = 30; -pub const EMLINK : ::c_int = 31; -pub const EPIPE : ::c_int = 32; -pub const EDOM : ::c_int = 33; -pub const ERANGE : ::c_int = 34; -pub const EAGAIN : ::c_int = 35; -pub const EWOULDBLOCK : ::c_int = 35; -pub const EINPROGRESS : ::c_int = 36; -pub const EALREADY : ::c_int = 37; -pub const ENOTSOCK : ::c_int = 38; -pub const EDESTADDRREQ : ::c_int = 39; -pub const EMSGSIZE : ::c_int = 40; -pub const EPROTOTYPE : ::c_int = 41; -pub const ENOPROTOOPT : ::c_int = 42; -pub const EPROTONOSUPPORT : ::c_int = 43; -pub const ESOCKTNOSUPPORT : ::c_int = 44; -pub const EOPNOTSUPP : ::c_int = 45; -pub const EPFNOSUPPORT : ::c_int = 46; -pub const EAFNOSUPPORT : ::c_int = 47; -pub const EADDRINUSE : ::c_int = 48; -pub const EADDRNOTAVAIL : ::c_int = 49; -pub const ENETDOWN : ::c_int = 50; -pub const ENETUNREACH : ::c_int = 51; -pub const ENETRESET : ::c_int = 52; -pub const ECONNABORTED : ::c_int = 53; -pub const ECONNRESET : ::c_int = 54; -pub const ENOBUFS : ::c_int = 55; -pub const EISCONN : ::c_int = 56; -pub const ENOTCONN : ::c_int = 57; -pub const ESHUTDOWN : ::c_int = 58; -pub const ETOOMANYREFS : ::c_int = 59; -pub const ETIMEDOUT : ::c_int = 60; -pub const ECONNREFUSED : ::c_int = 61; -pub const ELOOP : ::c_int = 62; -pub const ENAMETOOLONG : ::c_int = 63; -pub const EHOSTDOWN : ::c_int = 64; -pub const EHOSTUNREACH : ::c_int = 65; -pub const ENOTEMPTY : ::c_int = 66; -pub const EPROCLIM : ::c_int = 67; -pub const EUSERS : ::c_int = 68; -pub const EDQUOT : ::c_int = 69; -pub const ESTALE : ::c_int = 70; -pub const EREMOTE : ::c_int = 71; -pub const EBADRPC : ::c_int = 72; -pub const ERPCMISMATCH : ::c_int = 73; -pub const EPROGUNAVAIL : ::c_int = 74; -pub const EPROGMISMATCH : ::c_int = 75; -pub const EPROCUNAVAIL : ::c_int = 76; -pub const ENOLCK : ::c_int = 77; -pub const ENOSYS : ::c_int = 78; -pub const EFTYPE : ::c_int = 79; -pub const EAUTH : ::c_int = 80; -pub const ENEEDAUTH : ::c_int = 81; - -pub const F_DUPFD : ::c_int = 0; -pub const F_GETFD : ::c_int = 1; -pub const F_SETFD : ::c_int = 2; -pub const F_GETFL : ::c_int = 3; -pub const F_SETFL : ::c_int = 4; - -pub const SIGTRAP : ::c_int = 5; - -pub const GLOB_APPEND : ::c_int = 0x0001; -pub const GLOB_DOOFFS : ::c_int = 0x0002; -pub const GLOB_ERR : ::c_int = 0x0004; -pub const GLOB_MARK : ::c_int = 0x0008; -pub const GLOB_NOCHECK : ::c_int = 0x0010; -pub const GLOB_NOSORT : ::c_int = 0x0020; -pub const GLOB_NOESCAPE : ::c_int = 0x1000; - -pub const GLOB_NOSPACE : ::c_int = -1; -pub const GLOB_ABORTED : ::c_int = -2; -pub const GLOB_NOMATCH : ::c_int = -3; -pub const GLOB_NOSYS : ::c_int = -4; - -pub const POSIX_MADV_NORMAL : ::c_int = 0; -pub const POSIX_MADV_RANDOM : ::c_int = 1; -pub const POSIX_MADV_SEQUENTIAL : ::c_int = 2; -pub const POSIX_MADV_WILLNEED : ::c_int = 3; -pub const POSIX_MADV_DONTNEED : ::c_int = 4; - -pub const _SC_XOPEN_SHM : ::c_int = 30; - -pub const PTHREAD_CREATE_JOINABLE : ::c_int = 0; -pub const PTHREAD_CREATE_DETACHED : ::c_int = 1; - -pub const CLOCK_REALTIME : ::c_int = 0; -pub const CLOCK_MONOTONIC : ::c_int = 3; - -pub const RLIMIT_CPU: ::c_int = 0; -pub const RLIMIT_FSIZE: ::c_int = 1; -pub const RLIMIT_DATA: ::c_int = 2; -pub const RLIMIT_STACK: ::c_int = 3; -pub const RLIMIT_CORE: ::c_int = 4; -pub const RLIMIT_RSS: ::c_int = 5; -pub const RLIMIT_MEMLOCK: ::c_int = 6; -pub const RLIMIT_NPROC: ::c_int = 7; -pub const RLIMIT_NOFILE: ::c_int = 8; - -pub const RLIM_INFINITY: rlim_t = 0x7fff_ffff_ffff_ffff; -pub const RLIM_SAVED_MAX: rlim_t = RLIM_INFINITY; -pub const RLIM_SAVED_CUR: rlim_t = RLIM_INFINITY; - -pub const RUSAGE_SELF: ::c_int = 0; -pub const RUSAGE_CHILDREN: ::c_int = -1; - -pub const MADV_NORMAL : ::c_int = 0; -pub const MADV_RANDOM : ::c_int = 1; -pub const MADV_SEQUENTIAL : ::c_int = 2; -pub const MADV_WILLNEED : ::c_int = 3; -pub const MADV_DONTNEED : ::c_int = 4; -pub const MADV_FREE : ::c_int = 6; - -pub const AF_UNIX: ::c_int = 1; -pub const AF_INET: ::c_int = 2; -pub const AF_INET6: ::c_int = 24; -pub const SOCK_STREAM: ::c_int = 1; -pub const SOCK_DGRAM: ::c_int = 2; -pub const SOCK_RAW: ::c_int = 3; -pub const IPPROTO_TCP: ::c_int = 6; -pub const IPPROTO_IP: ::c_int = 0; -pub const IPPROTO_IPV6: ::c_int = 41; -pub const IP_MULTICAST_TTL: ::c_int = 10; -pub const IP_MULTICAST_LOOP: ::c_int = 11; -pub const IP_TTL: ::c_int = 4; -pub const IP_HDRINCL: ::c_int = 2; -pub const IP_ADD_MEMBERSHIP: ::c_int = 12; -pub const IP_DROP_MEMBERSHIP: ::c_int = 13; - -pub const TCP_NODELAY: ::c_int = 0x01; -pub const SOL_SOCKET: ::c_int = 0xffff; -pub const SO_DEBUG: ::c_int = 0x01; -pub const SO_ACCEPTCONN: ::c_int = 0x0002; -pub const SO_REUSEADDR: ::c_int = 0x0004; -pub const SO_KEEPALIVE: ::c_int = 0x0008; -pub const SO_DONTROUTE: ::c_int = 0x0010; -pub const SO_BROADCAST: ::c_int = 0x0020; -pub const SO_USELOOPBACK: ::c_int = 0x0040; -pub const SO_LINGER: ::c_int = 0x0080; -pub const SO_OOBINLINE: ::c_int = 0x0100; -pub const SO_REUSEPORT: ::c_int = 0x0200; -pub const SO_SNDBUF: ::c_int = 0x1001; -pub const SO_RCVBUF: ::c_int = 0x1002; -pub const SO_SNDLOWAT: ::c_int = 0x1003; -pub const SO_RCVLOWAT: ::c_int = 0x1004; -pub const SO_ERROR: ::c_int = 0x1007; -pub const SO_TYPE: ::c_int = 0x1008; - -pub const IFF_LOOPBACK: ::c_int = 0x8; - -pub const SHUT_RD: ::c_int = 0; -pub const SHUT_WR: ::c_int = 1; -pub const SHUT_RDWR: ::c_int = 2; - -pub const LOCK_SH: ::c_int = 1; -pub const LOCK_EX: ::c_int = 2; -pub const LOCK_NB: ::c_int = 4; -pub const LOCK_UN: ::c_int = 8; - -pub const O_NONBLOCK : ::c_int = 4; -pub const CTL_KERN : ::c_int = 1; - -pub const IPPROTO_RAW : ::c_int = 255; - -pub const _SC_ARG_MAX : ::c_int = 1; -pub const _SC_CHILD_MAX : ::c_int = 2; -pub const _SC_NGROUPS_MAX : ::c_int = 4; -pub const _SC_OPEN_MAX : ::c_int = 5; -pub const _SC_JOB_CONTROL : ::c_int = 6; -pub const _SC_SAVED_IDS : ::c_int = 7; -pub const _SC_VERSION : ::c_int = 8; -pub const _SC_BC_BASE_MAX : ::c_int = 9; -pub const _SC_BC_DIM_MAX : ::c_int = 10; -pub const _SC_BC_SCALE_MAX : ::c_int = 11; -pub const _SC_BC_STRING_MAX : ::c_int = 12; -pub const _SC_COLL_WEIGHTS_MAX : ::c_int = 13; -pub const _SC_EXPR_NEST_MAX : ::c_int = 14; -pub const _SC_LINE_MAX : ::c_int = 15; -pub const _SC_RE_DUP_MAX : ::c_int = 16; -pub const _SC_2_VERSION : ::c_int = 17; -pub const _SC_2_C_BIND : ::c_int = 18; -pub const _SC_2_C_DEV : ::c_int = 19; -pub const _SC_2_CHAR_TERM : ::c_int = 20; -pub const _SC_2_FORT_DEV : ::c_int = 21; -pub const _SC_2_FORT_RUN : ::c_int = 22; -pub const _SC_2_LOCALEDEF : ::c_int = 23; -pub const _SC_2_SW_DEV : ::c_int = 24; -pub const _SC_2_UPE : ::c_int = 25; -pub const _SC_STREAM_MAX : ::c_int = 26; -pub const _SC_TZNAME_MAX : ::c_int = 27; -pub const _SC_PAGESIZE : ::c_int = 28; -pub const _SC_PAGE_SIZE: ::c_int = _SC_PAGESIZE; -pub const _SC_FSYNC : ::c_int = 29; - -pub const KERN_PROC_ARGV: ::c_int = 1; -pub const KERN_PROC_NARGV: ::c_int = 2; -pub const KERN_PROC_ENV: ::c_int = 3; -pub const KERN_PROC_NENV: ::c_int = 4; - -pub const Q_GETQUOTA: ::c_int = 0x300; -pub const Q_SETQUOTA: ::c_int = 0x400; - -pub const RTLD_GLOBAL: ::c_int = 0x100; - -extern { - pub fn mincore(addr: *mut ::c_void, len: ::size_t, - vec: *mut ::c_char) -> ::c_int; - #[cfg_attr(target_os = "netbsd", link_name = "__clock_gettime50")] - pub fn clock_gettime(clk_id: ::c_int, tp: *mut ::timespec) -> ::c_int; - pub fn __errno() -> *mut ::c_int; - pub fn shm_open(name: *const ::c_char, oflag: ::c_int, mode: ::mode_t) - -> ::c_int; - pub fn pthread_main_np() -> ::c_int; - pub fn pthread_set_name_np(tid: ::pthread_t, name: *const ::c_char); - pub fn pthread_stackseg_np(thread: ::pthread_t, - sinfo: *mut ::stack_t) -> ::c_int; - pub fn memrchr(cx: *const ::c_void, c: ::c_int, n: ::size_t) -> *mut ::c_void; -} - -cfg_if! { - if #[cfg(target_os = "bitrig")] { - mod bitrig; - pub use self::bitrig::*; - } else if #[cfg(target_os = "netbsd")] { - mod netbsd; - pub use self::netbsd::*; - } else { - mod openbsd; - pub use self::openbsd::*; - } -} diff --git a/deps/libc-0.2.7/src/unix/bsd/openbsdlike/netbsd.rs b/deps/libc-0.2.7/src/unix/bsd/openbsdlike/netbsd.rs deleted file mode 100644 index 1ddfb1907..000000000 --- a/deps/libc-0.2.7/src/unix/bsd/openbsdlike/netbsd.rs +++ /dev/null @@ -1,373 +0,0 @@ -pub type clock_t = ::c_uint; -pub type suseconds_t = ::c_int; -pub type dev_t = u64; -pub type blksize_t = ::int32_t; -pub type fsblkcnt_t = ::uint64_t; -pub type fsfilcnt_t = ::uint64_t; - -s! { - pub struct dirent { - pub d_fileno: ::ino_t, - pub d_reclen: u16, - pub d_namlen: u16, - pub d_type: u8, - pub d_name: [::c_char; 512], - } - - pub struct glob_t { - pub gl_pathc: ::size_t, - __unused1: ::c_int, - pub gl_offs: ::size_t, - __unused2: ::c_int, - pub gl_pathv: *mut *mut ::c_char, - - __unused3: *mut ::c_void, - - __unused4: *mut ::c_void, - __unused5: *mut ::c_void, - __unused6: *mut ::c_void, - __unused7: *mut ::c_void, - __unused8: *mut ::c_void, - } - - pub struct sigset_t { - __bits: [u32; 4], - } - - pub struct stat { - pub st_dev: ::dev_t, - pub st_mode: ::mode_t, - pub st_ino: ::ino_t, - pub st_nlink: ::nlink_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::dev_t, - pub st_atime: ::time_t, - pub st_atimensec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtimensec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctimensec: ::c_long, - pub st_birthtime: ::time_t, - pub st_birthtimensec: ::c_long, - pub st_size: ::off_t, - pub st_blocks: ::blkcnt_t, - pub st_blksize: ::blksize_t, - pub st_flags: ::uint32_t, - pub st_gen: ::uint32_t, - pub st_spare: [::uint32_t; 2], - } - - pub struct statvfs { - pub f_flag: ::c_ulong, - pub f_bsize: ::c_ulong, - pub f_frsize: ::c_ulong, - pub f_iosize: ::c_ulong, - - pub f_blocks: ::fsblkcnt_t, - pub f_bfree: ::fsblkcnt_t, - pub f_bavail: ::fsblkcnt_t, - pub f_bresvd: ::fsblkcnt_t, - - pub f_files: ::fsfilcnt_t, - pub f_ffree: ::fsfilcnt_t, - pub f_favail: ::fsfilcnt_t, - pub f_fresvd: ::fsfilcnt_t, - - pub f_syncreads: ::uint64_t, - pub f_syncwrites: ::uint64_t, - - pub f_asyncreads: ::uint64_t, - pub f_asyncwrites: ::uint64_t, - - pub f_fsidx: ::fsid_t, - pub f_fsid: ::c_ulong, - pub f_namemax: ::c_ulong, - pub f_owner: ::uid_t, - - pub f_spare: [::uint32_t; 4], - - pub f_fstypename: [::c_char; 32], - pub f_mntonname: [::c_char; 1024], - pub f_mntfromname: [::c_char; 1024], - } - - pub struct addrinfo { - pub ai_flags: ::c_int, - pub ai_family: ::c_int, - pub ai_socktype: ::c_int, - pub ai_protocol: ::c_int, - pub ai_addrlen: ::socklen_t, - pub ai_canonname: *mut ::c_char, - pub ai_addr: *mut ::sockaddr, - pub ai_next: *mut ::addrinfo, - } - - pub struct sockaddr_storage { - pub ss_len: u8, - pub ss_family: ::sa_family_t, - __ss_pad1: [u8; 6], - __ss_pad2: i64, - __ss_pad3: [u8; 112], - } - - pub struct siginfo_t { - pub si_signo: ::c_int, - pub si_code: ::c_int, - pub si_errno: ::c_int, - __pad1: ::c_int, - __pad2: [u64; 14], - } - - pub struct pthread_attr_t { - pta_magic: ::c_uint, - pta_flags: ::c_int, - pta_private: *mut ::c_void, - } - - pub struct pthread_mutex_t { - ptm_magic: ::c_uint, - ptm_errorcheck: ::c_uchar, - ptm_pad1: [u8; 3], - ptm_interlock: ::c_uchar, - ptm_pad2: [u8; 3], - ptm_owner: ::pthread_t, - ptm_waiters: *mut u8, - ptm_recursed: ::c_uint, - ptm_spare2: *mut ::c_void, - } - - pub struct pthread_mutexattr_t { - ptma_magic: ::c_uint, - ptma_private: *mut ::c_void, - } - - pub struct pthread_cond_t { - ptc_magic: ::c_uint, - ptc_lock: ::c_uchar, - ptc_waiters_first: *mut u8, - ptc_waiters_last: *mut u8, - ptc_mutex: *mut ::pthread_mutex_t, - ptc_private: *mut ::c_void, - } - - pub struct pthread_rwlock_t { - ptr_magic: ::c_uint, - ptr_interlock: ::c_uchar, - ptr_rblocked_first: *mut u8, - ptr_rblocked_last: *mut u8, - ptr_wblocked_first: *mut u8, - ptr_wblocked_last: *mut u8, - ptr_nreaders: ::c_uint, - ptr_owner: ::pthread_t, - ptr_private: *mut ::c_void, - } - - pub struct kevent { - pub ident: ::uintptr_t, - pub filter: ::uint32_t, - pub flags: ::uint32_t, - pub fflags: ::uint32_t, - pub data: ::int64_t, - pub udata: ::intptr_t, - } - - pub struct dqblk { - pub dqb_bhardlimit: ::uint32_t, - pub dqb_bsoftlimit: ::uint32_t, - pub dqb_curblocks: ::uint32_t, - pub dqb_ihardlimit: ::uint32_t, - pub dqb_isoftlimit: ::uint32_t, - pub dqb_curinodes: ::uint32_t, - pub dqb_btime: ::int32_t, - pub dqb_itime: ::int32_t, - } - - pub struct Dl_info { - pub dli_fname: *const ::c_char, - pub dli_fbase: *mut ::c_void, - pub dli_sname: *const ::c_char, - pub dli_saddr: *const ::c_void, - } -} - -pub const O_CLOEXEC: ::c_int = 0x400000; -pub const O_ALT_IO: ::c_int = 0x40000; -pub const O_NOSIGPIPE: ::c_int = 0x1000000; -pub const O_SEARCH: ::c_int = 0x800000; -pub const O_EXLOCK: ::c_int = 0x20; -pub const O_SHLOCK: ::c_int = 0x10; -pub const O_DIRECTORY: ::c_int = 0x200000; - -pub const MS_SYNC : ::c_int = 0x4; -pub const MS_INVALIDATE : ::c_int = 0x2; - -pub const RLIM_NLIMITS: ::c_int = 12; - -pub const ENOATTR : ::c_int = 93; -pub const EILSEQ : ::c_int = 85; -pub const EOVERFLOW : ::c_int = 84; -pub const ECANCELED : ::c_int = 87; -pub const EIDRM : ::c_int = 82; -pub const ENOMSG : ::c_int = 83; -pub const ENOTSUP : ::c_int = 86; -pub const ELAST : ::c_int = 96; - -pub const F_DUPFD_CLOEXEC : ::c_int = 12; -pub const F_CLOSEM: ::c_int = 10; -pub const F_GETNOSIGPIPE: ::c_int = 13; -pub const F_SETNOSIGPIPE: ::c_int = 14; -pub const F_MAXFD: ::c_int = 11; - -pub const IPV6_JOIN_GROUP: ::c_int = 12; -pub const IPV6_LEAVE_GROUP: ::c_int = 13; - -pub const SO_SNDTIMEO: ::c_int = 0x100b; -pub const SO_RCVTIMEO: ::c_int = 0x100c; - -pub const KERN_PROC : ::c_int = 14; -pub const O_DSYNC : ::c_int = 0x10000; - -pub const MAP_RENAME : ::c_int = 0x20; -pub const MAP_NORESERVE : ::c_int = 0x40; -pub const MAP_HASSEMAPHORE : ::c_int = 0x200; -pub const MAP_WIRED: ::c_int = 0x800; - -pub const _SC_IOV_MAX : ::c_int = 32; -pub const _SC_GETGR_R_SIZE_MAX : ::c_int = 47; -pub const _SC_GETPW_R_SIZE_MAX : ::c_int = 48; -pub const _SC_LOGIN_NAME_MAX : ::c_int = 37; -pub const _SC_MQ_PRIO_MAX : ::c_int = 55; -pub const _SC_NPROCESSORS_ONLN : ::c_int = 1002; -pub const _SC_THREADS : ::c_int = 41; -pub const _SC_THREAD_ATTR_STACKADDR : ::c_int = 61; -pub const _SC_THREAD_ATTR_STACKSIZE : ::c_int = 62; -pub const _SC_THREAD_DESTRUCTOR_ITERATIONS : ::c_int = 57; -pub const _SC_THREAD_KEYS_MAX : ::c_int = 58; -pub const _SC_THREAD_PRIO_INHERIT : ::c_int = 64; -pub const _SC_THREAD_PRIO_PROTECT : ::c_int = 65; -pub const _SC_THREAD_PRIORITY_SCHEDULING : ::c_int = 63; -pub const _SC_THREAD_PROCESS_SHARED : ::c_int = 66; -pub const _SC_THREAD_SAFE_FUNCTIONS : ::c_int = 67; -pub const _SC_THREAD_STACK_MIN : ::c_int = 59; -pub const _SC_THREAD_THREADS_MAX : ::c_int = 60; -pub const _SC_TTY_NAME_MAX : ::c_int = 68; -pub const _SC_ATEXIT_MAX : ::c_int = 40; -pub const _SC_CLK_TCK : ::c_int = 39; -pub const _SC_AIO_LISTIO_MAX : ::c_int = 51; -pub const _SC_AIO_MAX : ::c_int = 52; -pub const _SC_ASYNCHRONOUS_IO : ::c_int = 50; -pub const _SC_MAPPED_FILES : ::c_int = 33; -pub const _SC_MEMLOCK : ::c_int = 34; -pub const _SC_MEMLOCK_RANGE : ::c_int = 35; -pub const _SC_MEMORY_PROTECTION : ::c_int = 36; -pub const _SC_MESSAGE_PASSING : ::c_int = 53; -pub const _SC_MQ_OPEN_MAX : ::c_int = 54; -pub const _SC_PRIORITY_SCHEDULING : ::c_int = 56; -pub const _SC_SEMAPHORES : ::c_int = 42; -pub const _SC_SHARED_MEMORY_OBJECTS : ::c_int = 87; -pub const _SC_SYNCHRONIZED_IO : ::c_int = 31; -pub const _SC_TIMERS : ::c_int = 44; - -pub const FD_SETSIZE: usize = 0x100; - -pub const ST_NOSUID: ::c_ulong = 8; - -pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t { - ptm_magic: 0x33330003, - ptm_errorcheck: 0, - ptm_interlock: 0, - ptm_waiters: 0 as *mut _, - ptm_owner: 0, - ptm_pad1: [0; 3], - ptm_pad2: [0; 3], - ptm_recursed: 0, - ptm_spare2: 0 as *mut _, -}; -pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = pthread_cond_t { - ptc_magic: 0x55550005, - ptc_lock: 0, - ptc_waiters_first: 0 as *mut _, - ptc_waiters_last: 0 as *mut _, - ptc_mutex: 0 as *mut _, - ptc_private: 0 as *mut _, -}; -pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t { - ptr_magic: 0x99990009, - ptr_interlock: 0, - ptr_rblocked_first: 0 as *mut _, - ptr_rblocked_last: 0 as *mut _, - ptr_wblocked_first: 0 as *mut _, - ptr_wblocked_last: 0 as *mut _, - ptr_nreaders: 0, - ptr_owner: 0, - ptr_private: 0 as *mut _, -}; -pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 2; -pub const KERN_PROC_ARGS: ::c_int = 48; - -pub const EVFILT_AIO: ::int16_t = 2; -pub const EVFILT_PROC: ::int16_t = 4; -pub const EVFILT_READ: ::int16_t = 0; -pub const EVFILT_SIGNAL: ::int16_t = 5; -pub const EVFILT_SYSCOUNT: ::int16_t = 7; -pub const EVFILT_TIMER: ::int16_t = 6; -pub const EVFILT_VNODE: ::int16_t = 3; -pub const EVFILT_WRITE: ::int16_t = 1; - -pub const NOTE_PCTRLMASK: ::uint32_t = 0xf0000000; - -pub const CRTSCTS: ::tcflag_t = 0x00010000; - -pub const TMP_MAX : ::c_uint = 308915776; - -pub const NI_MAXHOST: ::socklen_t = 1025; - -pub const RTLD_NOLOAD: ::c_int = 0x2000; -pub const RTLD_LOCAL: ::c_int = 0x200; - -extern { - pub fn getnameinfo(sa: *const ::sockaddr, - salen: ::socklen_t, - host: *mut ::c_char, - hostlen: ::socklen_t, - serv: *mut ::c_char, - sevlen: ::socklen_t, - flags: ::c_int) -> ::c_int; - pub fn mprotect(addr: *mut ::c_void, len: ::size_t, prot: ::c_int) - -> ::c_int; - pub fn sysctl(name: *const ::c_int, - namelen: ::c_uint, - oldp: *mut ::c_void, - oldlenp: *mut ::size_t, - newp: *const ::c_void, - newlen: ::size_t) - -> ::c_int; - pub fn sysctlbyname(name: *const ::c_char, - oldp: *mut ::c_void, - oldlenp: *mut ::size_t, - newp: *const ::c_void, - newlen: ::size_t) - -> ::c_int; - #[link_name = "__kevent50"] - pub fn kevent(kq: ::c_int, - changelist: *const ::kevent, - nchanges: ::size_t, - eventlist: *mut ::kevent, - nevents: ::size_t, - timeout: *const ::timespec) -> ::c_int; - #[link_name = "__mount50"] - pub fn mount(src: *const ::c_char, - target: *const ::c_char, - flags: ::c_int, - data: *mut ::c_void, - size: ::size_t) -> ::c_int; - pub fn ptrace(requeset: ::c_int, - pid: ::pid_t, - addr: *mut ::c_void, - data: ::c_int) -> ::c_int; - pub fn sethostname(name: *const ::c_char, len: ::size_t) -> ::c_int; - pub fn pthread_setname_np(t: ::pthread_t, - name: *const ::c_char, - arg: *mut ::c_void) -> ::c_int; -} diff --git a/deps/libc-0.2.7/src/unix/bsd/openbsdlike/openbsd.rs b/deps/libc-0.2.7/src/unix/bsd/openbsdlike/openbsd.rs deleted file mode 100644 index fc38478fd..000000000 --- a/deps/libc-0.2.7/src/unix/bsd/openbsdlike/openbsd.rs +++ /dev/null @@ -1,243 +0,0 @@ -pub type clock_t = i64; -pub type suseconds_t = i64; -pub type dev_t = i32; -pub type sigset_t = ::c_uint; -pub type blksize_t = ::int32_t; -pub type fsblkcnt_t = ::uint64_t; -pub type fsfilcnt_t = ::uint64_t; -pub type pthread_attr_t = *mut ::c_void; -pub type pthread_mutex_t = *mut ::c_void; -pub type pthread_mutexattr_t = *mut ::c_void; -pub type pthread_cond_t = *mut ::c_void; -pub type pthread_rwlock_t = *mut ::c_void; - -s! { - pub struct dirent { - pub d_fileno: ::ino_t, - pub d_off: ::off_t, - pub d_reclen: u16, - pub d_type: u8, - pub d_namlen: u8, - __d_padding: [u8; 4], - pub d_name: [::c_char; 256], - } - - pub struct glob_t { - pub gl_pathc: ::c_int, - __unused1: ::c_int, - pub gl_offs: ::c_int, - __unused2: ::c_int, - pub gl_pathv: *mut *mut ::c_char, - - __unused3: *mut ::c_void, - - __unused4: *mut ::c_void, - __unused5: *mut ::c_void, - __unused6: *mut ::c_void, - __unused7: *mut ::c_void, - __unused8: *mut ::c_void, - __unused9: *mut ::c_void, - } - - pub struct stat { - pub st_mode: ::mode_t, - pub st_dev: ::dev_t, - pub st_ino: ::ino_t, - pub st_nlink: ::nlink_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::dev_t, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - pub st_size: ::off_t, - pub st_blocks: ::blkcnt_t, - pub st_blksize: ::blksize_t, - pub st_flags: ::uint32_t, - pub st_gen: ::uint32_t, - pub st_birthtime: ::time_t, - pub st_birthtime_nsec: ::c_long, - } - - pub struct statvfs { - pub f_bsize: ::c_ulong, - pub f_frsize: ::c_ulong, - pub f_blocks: ::fsblkcnt_t, - pub f_bfree: ::fsblkcnt_t, - pub f_bavail: ::fsblkcnt_t, - pub f_files: ::fsfilcnt_t, - pub f_ffree: ::fsfilcnt_t, - pub f_favail: ::fsfilcnt_t, - pub f_fsid: ::c_ulong, - pub f_flag: ::c_ulong, - pub f_namemax: ::c_ulong, - } - - pub struct addrinfo { - pub ai_flags: ::c_int, - pub ai_family: ::c_int, - pub ai_socktype: ::c_int, - pub ai_protocol: ::c_int, - pub ai_addrlen: ::socklen_t, - pub ai_addr: *mut ::sockaddr, - pub ai_canonname: *mut ::c_char, - pub ai_next: *mut ::addrinfo, - } - - pub struct sockaddr_storage { - pub ss_len: u8, - pub ss_family: ::sa_family_t, - __ss_pad1: [u8; 6], - __ss_pad2: i64, - __ss_pad3: [u8; 240], - } - - pub struct siginfo_t { - pub si_signo: ::c_int, - pub si_code: ::c_int, - pub si_errno: ::c_int, - pub si_addr: *mut ::c_char, - __pad: [u8; 108], - } - - pub struct Dl_info { - pub dli_fname: *const ::c_char, - pub dli_fbase: *mut ::c_void, - pub dli_sname: *const ::c_char, - pub dli_saddr: *mut ::c_void, - } -} - -pub const O_CLOEXEC: ::c_int = 0x10000; - -pub const MS_SYNC : ::c_int = 0x0002; -pub const MS_INVALIDATE : ::c_int = 0x0004; - -pub const PTHREAD_STACK_MIN : ::size_t = 2048; - -pub const ENOATTR : ::c_int = 83; -pub const EILSEQ : ::c_int = 84; -pub const EOVERFLOW : ::c_int = 87; -pub const ECANCELED : ::c_int = 88; -pub const EIDRM : ::c_int = 89; -pub const ENOMSG : ::c_int = 90; -pub const ENOTSUP : ::c_int = 91; -pub const ELAST : ::c_int = 91; - -pub const F_DUPFD_CLOEXEC : ::c_int = 10; - -pub const RLIM_NLIMITS: ::c_int = 9; - -pub const SO_SNDTIMEO: ::c_int = 0x1005; -pub const SO_RCVTIMEO: ::c_int = 0x1006; - -pub const IPV6_JOIN_GROUP: ::c_int = 12; -pub const IPV6_LEAVE_GROUP: ::c_int = 13; - -pub const KERN_PROC : ::c_int = 66; -pub const O_DSYNC : ::c_int = 128; - -pub const MAP_RENAME : ::c_int = 0x0000; -pub const MAP_NORESERVE : ::c_int = 0x0000; -pub const MAP_HASSEMAPHORE : ::c_int = 0x0000; - -pub const EIPSEC : ::c_int = 82; -pub const ENOMEDIUM : ::c_int = 85; -pub const EMEDIUMTYPE : ::c_int = 86; - -pub const RUSAGE_THREAD: ::c_int = 1; - -pub const MAP_COPY : ::c_int = 0x0002; -pub const MAP_NOEXTEND : ::c_int = 0x0000; - -pub const _SC_CLK_TCK : ::c_int = 3; -pub const _SC_IOV_MAX : ::c_int = 51; -pub const _SC_GETGR_R_SIZE_MAX : ::c_int = 100; -pub const _SC_GETPW_R_SIZE_MAX : ::c_int = 101; -pub const _SC_LOGIN_NAME_MAX : ::c_int = 102; -pub const _SC_MQ_PRIO_MAX : ::c_int = 59; -pub const _SC_NPROCESSORS_ONLN : ::c_int = 503; -pub const _SC_THREADS : ::c_int = 91; -pub const _SC_THREAD_ATTR_STACKADDR : ::c_int = 77; -pub const _SC_THREAD_ATTR_STACKSIZE : ::c_int = 78; -pub const _SC_THREAD_DESTRUCTOR_ITERATIONS : ::c_int = 80; -pub const _SC_THREAD_KEYS_MAX : ::c_int = 81; -pub const _SC_THREAD_PRIO_INHERIT : ::c_int = 82; -pub const _SC_THREAD_PRIO_PROTECT : ::c_int = 83; -pub const _SC_THREAD_PRIORITY_SCHEDULING : ::c_int = 84; -pub const _SC_THREAD_PROCESS_SHARED : ::c_int = 85; -pub const _SC_THREAD_SAFE_FUNCTIONS : ::c_int = 103; -pub const _SC_THREAD_STACK_MIN : ::c_int = 89; -pub const _SC_THREAD_THREADS_MAX : ::c_int = 90; -pub const _SC_TTY_NAME_MAX : ::c_int = 107; -pub const _SC_ATEXIT_MAX : ::c_int = 46; -pub const _SC_AIO_LISTIO_MAX : ::c_int = 42; -pub const _SC_AIO_MAX : ::c_int = 43; -pub const _SC_ASYNCHRONOUS_IO : ::c_int = 45; -pub const _SC_MAPPED_FILES : ::c_int = 53; -pub const _SC_MEMLOCK : ::c_int = 54; -pub const _SC_MEMLOCK_RANGE : ::c_int = 55; -pub const _SC_MEMORY_PROTECTION : ::c_int = 56; -pub const _SC_MESSAGE_PASSING : ::c_int = 57; -pub const _SC_MQ_OPEN_MAX : ::c_int = 58; -pub const _SC_PRIORITY_SCHEDULING : ::c_int = 61; -pub const _SC_SEMAPHORES : ::c_int = 67; -pub const _SC_SHARED_MEMORY_OBJECTS : ::c_int = 68; -pub const _SC_SYNCHRONIZED_IO : ::c_int = 75; -pub const _SC_TIMERS : ::c_int = 94; -pub const _SC_XOPEN_CRYPT : ::c_int = 117; -pub const _SC_XOPEN_ENH_I18N : ::c_int = 118; -pub const _SC_XOPEN_LEGACY : ::c_int = 119; -pub const _SC_XOPEN_REALTIME : ::c_int = 120; -pub const _SC_XOPEN_REALTIME_THREADS : ::c_int = 121; -pub const _SC_XOPEN_UNIX : ::c_int = 123; -pub const _SC_XOPEN_VERSION : ::c_int = 125; -pub const _SC_SEM_NSEMS_MAX : ::c_int = 31; -pub const _SC_SEM_VALUE_MAX : ::c_int = 32; -pub const _SC_AIO_PRIO_DELTA_MAX : ::c_int = 44; -pub const _SC_DELAYTIMER_MAX : ::c_int = 50; -pub const _SC_PRIORITIZED_IO : ::c_int = 60; -pub const _SC_REALTIME_SIGNALS : ::c_int = 64; -pub const _SC_RTSIG_MAX : ::c_int = 66; -pub const _SC_SIGQUEUE_MAX : ::c_int = 70; -pub const _SC_TIMER_MAX : ::c_int = 93; - -pub const FD_SETSIZE: usize = 1024; - -pub const ST_NOSUID: ::c_ulong = 2; - -pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = 0 as *mut _; -pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = 0 as *mut _; -pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = 0 as *mut _; -pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 2; - -pub const KERN_PROC_ARGS: ::c_int = 55; - -pub const TMP_MAX : ::c_uint = 0x7fffffff; - -pub const NI_MAXHOST: ::size_t = 256; - -pub const RTLD_LOCAL: ::c_int = 0; - -extern { - pub fn getnameinfo(sa: *const ::sockaddr, - salen: ::socklen_t, - host: *mut ::c_char, - hostlen: ::size_t, - serv: *mut ::c_char, - servlen: ::size_t, - flags: ::c_int) -> ::c_int; - pub fn mprotect(addr: *mut ::c_void, len: ::size_t, prot: ::c_int) - -> ::c_int; - pub fn sysctl(name: *const ::c_int, - namelen: ::c_uint, - oldp: *mut ::c_void, - oldlenp: *mut ::size_t, - newp: *mut ::c_void, - newlen: ::size_t) - -> ::c_int; - pub fn getentropy(buf: *mut ::c_void, buflen: ::size_t) -> ::c_int; -} diff --git a/deps/libc-0.2.7/src/unix/mod.rs b/deps/libc-0.2.7/src/unix/mod.rs deleted file mode 100644 index c56246a32..000000000 --- a/deps/libc-0.2.7/src/unix/mod.rs +++ /dev/null @@ -1,704 +0,0 @@ -//! Definitions found commonly among almost all Unix derivatives -//! -//! More functions and definitions can be found in the more specific modules -//! according to the platform in question. - -pub type pid_t = i32; -pub type uid_t = u32; -pub type gid_t = u32; -pub type in_addr_t = u32; -pub type in_port_t = u16; -pub type sighandler_t = ::size_t; -pub type cc_t = ::c_uchar; - -pub enum DIR {} - -s! { - pub struct utimbuf { - pub actime: time_t, - pub modtime: time_t, - } - - pub struct timeval { - pub tv_sec: time_t, - pub tv_usec: suseconds_t, - } - - pub struct timespec { - pub tv_sec: time_t, - pub tv_nsec: c_long, - } - - pub struct rlimit { - pub rlim_cur: rlim_t, - pub rlim_max: rlim_t, - } - - pub struct rusage { - pub ru_utime: timeval, - pub ru_stime: timeval, - pub ru_maxrss: c_long, - pub ru_ixrss: c_long, - pub ru_idrss: c_long, - pub ru_isrss: c_long, - pub ru_minflt: c_long, - pub ru_majflt: c_long, - pub ru_nswap: c_long, - pub ru_inblock: c_long, - pub ru_oublock: c_long, - pub ru_msgsnd: c_long, - pub ru_msgrcv: c_long, - pub ru_nsignals: c_long, - pub ru_nvcsw: c_long, - pub ru_nivcsw: c_long, - - #[cfg(target_env = "musl")] - __reserved: [c_long; 16], - } - - #[cfg_attr(target_os = "netbsd", repr(packed))] - pub struct in_addr { - pub s_addr: in_addr_t, - } - - pub struct in6_addr { - pub s6_addr: [u8; 16], - __align: [u32; 0], - } - - pub struct ip_mreq { - pub imr_multiaddr: in_addr, - pub imr_interface: in_addr, - } - - pub struct ipv6_mreq { - pub ipv6mr_multiaddr: in6_addr, - #[cfg(target_os = "android")] - pub ipv6mr_interface: ::c_int, - #[cfg(not(target_os = "android"))] - pub ipv6mr_interface: ::c_uint, - } - - pub struct hostent { - pub h_name: *mut ::c_char, - pub h_aliases: *mut *mut ::c_char, - pub h_addrtype: ::c_int, - pub h_length: ::c_int, - pub h_addr_list: *mut *mut ::c_char, - } - - pub struct iovec { - pub iov_base: *mut ::c_void, - pub iov_len: ::size_t, - } - - pub struct pollfd { - pub fd: ::c_int, - pub events: ::c_short, - pub revents: ::c_short, - } -} - -pub const SIG_DFL: sighandler_t = 0 as sighandler_t; -pub const SIG_IGN: sighandler_t = 1 as sighandler_t; -pub const SIG_ERR: sighandler_t = !0 as sighandler_t; - -pub const DT_FIFO: u8 = 1; -pub const DT_CHR: u8 = 2; -pub const DT_DIR: u8 = 4; -pub const DT_BLK: u8 = 6; -pub const DT_REG: u8 = 8; -pub const DT_LNK: u8 = 10; -pub const DT_SOCK: u8 = 12; - -pub const FD_CLOEXEC: ::c_int = 0x1; - -pub const USRQUOTA: ::c_int = 0; -pub const GRPQUOTA: ::c_int = 1; - -pub const SIGIOT: ::c_int = 6; - -pub const S_ISUID: ::c_int = 0x800; -pub const S_ISGID: ::c_int = 0x400; -pub const S_ISVTX: ::c_int = 0x200; - -pub const POLLIN: ::c_short = 0x1; -pub const POLLPRI: ::c_short = 0x2; -pub const POLLOUT: ::c_short = 0x4; -pub const POLLERR: ::c_short = 0x8; -pub const POLLHUP: ::c_short = 0x10; -pub const POLLNVAL: ::c_short = 0x20; - -pub const IF_NAMESIZE: ::size_t = 16; - -pub const RTLD_LAZY: ::c_int = 0x1; - -cfg_if! { - if #[cfg(not(stdbuild))] { - // cargo build, don't pull in anything extra as the libstd dep - // already pulls in all libs. - } else if #[cfg(all(target_env = "musl", not(target_arch = "mips")))] { - #[link(name = "c", kind = "static")] - extern {} - } else if #[cfg(target_os = "emscripten")] { - #[link(name = "c")] - extern {} - } else if #[cfg(any(target_os = "macos", - target_os = "ios", - target_os = "android", - target_os = "openbsd", - target_os = "bitrig"))] { - #[link(name = "c")] - #[link(name = "m")] - extern {} - } else { - #[link(name = "c")] - #[link(name = "m")] - #[link(name = "rt")] - extern {} - } -} - -extern { - #[cfg_attr(target_os = "netbsd", link_name = "__socket30")] - pub fn socket(domain: ::c_int, ty: ::c_int, protocol: ::c_int) -> ::c_int; - #[cfg_attr(all(target_os = "macos", target_arch = "x86"), - link_name = "connect$UNIX2003")] - pub fn connect(socket: ::c_int, address: *const sockaddr, - len: socklen_t) -> ::c_int; - #[cfg_attr(all(target_os = "macos", target_arch = "x86"), - link_name = "bind$UNIX2003")] - pub fn bind(socket: ::c_int, address: *const sockaddr, - address_len: socklen_t) -> ::c_int; - #[cfg_attr(all(target_os = "macos", target_arch = "x86"), - link_name = "listen$UNIX2003")] - pub fn listen(socket: ::c_int, backlog: ::c_int) -> ::c_int; - #[cfg_attr(all(target_os = "macos", target_arch = "x86"), - link_name = "accept$UNIX2003")] - pub fn accept(socket: ::c_int, address: *mut sockaddr, - address_len: *mut socklen_t) -> ::c_int; - #[cfg_attr(all(target_os = "macos", target_arch = "x86"), - link_name = "getpeername$UNIX2003")] - pub fn getpeername(socket: ::c_int, address: *mut sockaddr, - address_len: *mut socklen_t) -> ::c_int; - #[cfg_attr(all(target_os = "macos", target_arch = "x86"), - link_name = "getsockname$UNIX2003")] - pub fn getsockname(socket: ::c_int, address: *mut sockaddr, - address_len: *mut socklen_t) -> ::c_int; - pub fn setsockopt(socket: ::c_int, level: ::c_int, name: ::c_int, - value: *const ::c_void, - option_len: socklen_t) -> ::c_int; - #[cfg_attr(all(target_os = "macos", target_arch = "x86"), - link_name = "socketpair$UNIX2003")] - pub fn socketpair(domain: ::c_int, type_: ::c_int, protocol: ::c_int, - socket_vector: *mut ::c_int) -> ::c_int; - #[cfg_attr(all(target_os = "macos", target_arch = "x86"), - link_name = "sendto$UNIX2003")] - pub fn sendto(socket: ::c_int, buf: *const ::c_void, len: ::size_t, - flags: ::c_int, addr: *const sockaddr, - addrlen: socklen_t) -> ::ssize_t; - pub fn shutdown(socket: ::c_int, how: ::c_int) -> ::c_int; - - #[cfg_attr(all(target_os = "macos", target_arch = "x86"), - link_name = "chmod$UNIX2003")] - pub fn chmod(path: *const c_char, mode: mode_t) -> ::c_int; - #[cfg_attr(all(target_os = "macos", target_arch = "x86"), - link_name = "fchmod$UNIX2003")] - pub fn fchmod(fd: ::c_int, mode: mode_t) -> ::c_int; - - #[cfg_attr(target_os = "macos", link_name = "fstat$INODE64")] - #[cfg_attr(target_os = "netbsd", link_name = "__fstat50")] - pub fn fstat(fildes: ::c_int, buf: *mut stat) -> ::c_int; - - pub fn mkdir(path: *const c_char, mode: mode_t) -> ::c_int; - - #[cfg_attr(target_os = "macos", link_name = "stat$INODE64")] - #[cfg_attr(target_os = "netbsd", link_name = "__stat50")] - pub fn stat(path: *const c_char, buf: *mut stat) -> ::c_int; - - #[cfg_attr(all(target_os = "macos", target_arch = "x86"), - link_name = "popen$UNIX2003")] - pub fn popen(command: *const c_char, - mode: *const c_char) -> *mut ::FILE; - pub fn pclose(stream: *mut ::FILE) -> ::c_int; - #[cfg_attr(all(target_os = "macos", target_arch = "x86"), - link_name = "fdopen$UNIX2003")] - pub fn fdopen(fd: ::c_int, mode: *const c_char) -> *mut ::FILE; - pub fn fileno(stream: *mut ::FILE) -> ::c_int; - - #[cfg_attr(all(target_os = "macos", target_arch = "x86"), - link_name = "open$UNIX2003")] - pub fn open(path: *const c_char, oflag: ::c_int, ...) -> ::c_int; - #[cfg_attr(all(target_os = "macos", target_arch = "x86"), - link_name = "creat$UNIX2003")] - pub fn creat(path: *const c_char, mode: mode_t) -> ::c_int; - #[cfg_attr(all(target_os = "macos", target_arch = "x86"), - link_name = "fcntl$UNIX2003")] - pub fn fcntl(fd: ::c_int, cmd: ::c_int, ...) -> ::c_int; - - #[cfg_attr(all(target_os = "macos", target_arch = "x86_64"), - link_name = "opendir$INODE64")] - #[cfg_attr(all(target_os = "macos", target_arch = "x86"), - link_name = "opendir$INODE64$UNIX2003")] - #[cfg_attr(target_os = "netbsd", link_name = "__opendir30")] - pub fn opendir(dirname: *const c_char) -> *mut ::DIR; - #[cfg_attr(target_os = "macos", link_name = "readdir_r$INODE64")] - #[cfg_attr(target_os = "netbsd", link_name = "__readdir_r30")] - pub fn readdir_r(dirp: *mut ::DIR, entry: *mut ::dirent, - result: *mut *mut ::dirent) -> ::c_int; - #[cfg_attr(all(target_os = "macos", target_arch = "x86"), - link_name = "closedir$UNIX2003")] - pub fn closedir(dirp: *mut ::DIR) -> ::c_int; - #[cfg_attr(all(target_os = "macos", target_arch = "x86_64"), - link_name = "rewinddir$INODE64")] - #[cfg_attr(all(target_os = "macos", target_arch = "x86"), - link_name = "rewinddir$INODE64$UNIX2003")] - pub fn rewinddir(dirp: *mut ::DIR); - - pub fn access(path: *const c_char, amode: ::c_int) -> ::c_int; - pub fn alarm(seconds: ::c_uint) -> ::c_uint; - pub fn chdir(dir: *const c_char) -> ::c_int; - pub fn chown(path: *const c_char, uid: uid_t, - gid: gid_t) -> ::c_int; - #[cfg_attr(all(target_os = "macos", target_arch = "x86"), - link_name = "close$UNIX2003")] - pub fn close(fd: ::c_int) -> ::c_int; - pub fn dup(fd: ::c_int) -> ::c_int; - pub fn dup2(src: ::c_int, dst: ::c_int) -> ::c_int; - pub fn execv(prog: *const c_char, - argv: *const *const c_char) -> ::c_int; - pub fn execve(prog: *const c_char, argv: *const *const c_char, - envp: *const *const c_char) - -> ::c_int; - pub fn execvp(c: *const c_char, - argv: *const *const c_char) -> ::c_int; - pub fn fork() -> pid_t; - pub fn fpathconf(filedes: ::c_int, name: ::c_int) -> c_long; - pub fn getcwd(buf: *mut c_char, size: ::size_t) -> *mut c_char; - pub fn getegid() -> gid_t; - pub fn geteuid() -> uid_t; - pub fn getgid() -> gid_t; - pub fn getgroups(ngroups_max: ::c_int, groups: *mut gid_t) - -> ::c_int; - pub fn getlogin() -> *mut c_char; - #[cfg_attr(all(target_os = "macos", target_arch = "x86"), - link_name = "getopt$UNIX2003")] - pub fn getopt(argc: ::c_int, argv: *const *mut c_char, - optstr: *const c_char) -> ::c_int; - pub fn getpgrp() -> pid_t; - pub fn getpid() -> pid_t; - pub fn getppid() -> pid_t; - pub fn getuid() -> uid_t; - pub fn isatty(fd: ::c_int) -> ::c_int; - pub fn link(src: *const c_char, dst: *const c_char) -> ::c_int; - pub fn lseek(fd: ::c_int, offset: off_t, whence: ::c_int) -> off_t; - pub fn pathconf(path: *const c_char, name: ::c_int) -> c_long; - #[cfg_attr(all(target_os = "macos", target_arch = "x86"), - link_name = "pause$UNIX2003")] - pub fn pause() -> ::c_int; - pub fn pipe(fds: *mut ::c_int) -> ::c_int; - pub fn posix_memalign(memptr: *mut *mut ::c_void, - align: ::size_t, - size: ::size_t) -> ::c_int; - #[cfg_attr(all(target_os = "macos", target_arch = "x86"), - link_name = "read$UNIX2003")] - pub fn read(fd: ::c_int, buf: *mut ::c_void, count: ::size_t) - -> ::ssize_t; - pub fn rmdir(path: *const c_char) -> ::c_int; - pub fn setgid(gid: gid_t) -> ::c_int; - pub fn setpgid(pid: pid_t, pgid: pid_t) -> ::c_int; - pub fn setsid() -> pid_t; - pub fn setuid(uid: uid_t) -> ::c_int; - #[cfg_attr(all(target_os = "macos", target_arch = "x86"), - link_name = "sleep$UNIX2003")] - pub fn sleep(secs: ::c_uint) -> ::c_uint; - #[cfg_attr(all(target_os = "macos", target_arch = "x86"), - link_name = "nanosleep$UNIX2003")] - #[cfg_attr(target_os = "netbsd", link_name = "__nanosleep50")] - pub fn nanosleep(rqtp: *const timespec, - rmtp: *mut timespec) -> ::c_int; - pub fn tcgetpgrp(fd: ::c_int) -> pid_t; - pub fn ttyname(fd: ::c_int) -> *mut c_char; - pub fn unlink(c: *const c_char) -> ::c_int; - #[cfg_attr(all(target_os = "macos", target_arch = "x86"), - link_name = "wait$UNIX2003")] - pub fn wait(status: *mut ::c_int) -> pid_t; - #[cfg_attr(all(target_os = "macos", target_arch = "x86"), - link_name = "waitpid$UNIX2003")] - pub fn waitpid(pid: pid_t, status: *mut ::c_int, options: ::c_int) - -> pid_t; - #[cfg_attr(all(target_os = "macos", target_arch = "x86"), - link_name = "write$UNIX2003")] - pub fn write(fd: ::c_int, buf: *const ::c_void, count: ::size_t) - -> ::ssize_t; - #[cfg_attr(all(target_os = "macos", target_arch = "x86"), - link_name = "pread$UNIX2003")] - pub fn pread(fd: ::c_int, buf: *mut ::c_void, count: ::size_t, - offset: off_t) -> ::ssize_t; - #[cfg_attr(all(target_os = "macos", target_arch = "x86"), - link_name = "pwrite$UNIX2003")] - pub fn pwrite(fd: ::c_int, buf: *const ::c_void, count: ::size_t, - offset: off_t) -> ::ssize_t; - pub fn umask(mask: mode_t) -> mode_t; - - #[cfg_attr(target_os = "netbsd", link_name = "__utime50")] - pub fn utime(file: *const c_char, buf: *const utimbuf) -> ::c_int; - - #[cfg_attr(all(target_os = "macos", target_arch = "x86"), - link_name = "kill$UNIX2003")] - pub fn kill(pid: pid_t, sig: ::c_int) -> ::c_int; - - pub fn mlock(addr: *const ::c_void, len: ::size_t) -> ::c_int; - pub fn munlock(addr: *const ::c_void, len: ::size_t) -> ::c_int; - pub fn mlockall(flags: ::c_int) -> ::c_int; - pub fn munlockall() -> ::c_int; - - #[cfg_attr(all(target_os = "macos", target_arch = "x86"), - link_name = "mmap$UNIX2003")] - pub fn mmap(addr: *mut ::c_void, - len: ::size_t, - prot: ::c_int, - flags: ::c_int, - fd: ::c_int, - offset: off_t) - -> *mut ::c_void; - #[cfg_attr(all(target_os = "macos", target_arch = "x86"), - link_name = "munmap$UNIX2003")] - pub fn munmap(addr: *mut ::c_void, len: ::size_t) -> ::c_int; - - pub fn if_nametoindex(ifname: *const c_char) -> ::c_uint; - pub fn if_indextoname(ifindex: ::c_uint, ifname: *mut ::c_char) -> *mut ::c_char; - - #[cfg_attr(target_os = "macos", link_name = "lstat$INODE64")] - #[cfg_attr(target_os = "netbsd", link_name = "__lstat50")] - pub fn lstat(path: *const c_char, buf: *mut stat) -> ::c_int; - - #[cfg_attr(all(target_os = "macos", target_arch = "x86"), - link_name = "fsync$UNIX2003")] - pub fn fsync(fd: ::c_int) -> ::c_int; - - #[cfg_attr(all(target_os = "macos", target_arch = "x86"), - link_name = "setenv$UNIX2003")] - pub fn setenv(name: *const c_char, val: *const c_char, - overwrite: ::c_int) -> ::c_int; - #[cfg_attr(all(target_os = "macos", target_arch = "x86"), - link_name = "unsetenv$UNIX2003")] - #[cfg_attr(target_os = "netbsd", link_name = "__unsetenv13")] - pub fn unsetenv(name: *const c_char) -> ::c_int; - - pub fn symlink(path1: *const c_char, - path2: *const c_char) -> ::c_int; - - pub fn ftruncate(fd: ::c_int, length: off_t) -> ::c_int; - - #[cfg_attr(target_os = "android", link_name = "bsd_signal")] - pub fn signal(signum: ::c_int, handler: sighandler_t) -> sighandler_t; - - #[cfg_attr(all(target_os = "macos", target_arch = "x86"), - link_name = "getrlimit$UNIX2003")] - pub fn getrlimit(resource: ::c_int, rlim: *mut rlimit) -> ::c_int; - #[cfg_attr(all(target_os = "macos", target_arch = "x86"), - link_name = "setrlimit$UNIX2003")] - pub fn setrlimit(resource: ::c_int, rlim: *const rlimit) -> ::c_int; - #[cfg_attr(target_os = "netbsd", link_name = "__getrusage50")] - pub fn getrusage(resource: ::c_int, usage: *mut rusage) -> ::c_int; - - pub fn getdtablesize() -> ::c_int; - #[cfg_attr(any(target_os = "macos", target_os = "ios"), - link_name = "realpath$DARWIN_EXTSN")] - pub fn realpath(pathname: *const ::c_char, resolved: *mut ::c_char) - -> *mut ::c_char; - - pub fn flock(fd: ::c_int, operation: ::c_int) -> ::c_int; - - #[cfg_attr(arget_os = "netbsd", link_name = "__gettimeofday50")] - pub fn gettimeofday(tp: *mut ::timeval, - tz: *mut ::c_void) -> ::c_int; - - pub fn pthread_self() -> ::pthread_t; - pub fn pthread_create(native: *mut ::pthread_t, - attr: *const ::pthread_attr_t, - f: extern fn(*mut ::c_void) -> *mut ::c_void, - value: *mut ::c_void) -> ::c_int; - #[cfg_attr(all(target_os = "macos", target_arch = "x86"), - link_name = "pthread_join$UNIX2003")] - pub fn pthread_join(native: ::pthread_t, - value: *mut *mut ::c_void) -> ::c_int; - pub fn pthread_attr_init(attr: *mut ::pthread_attr_t) -> ::c_int; - pub fn pthread_attr_destroy(attr: *mut ::pthread_attr_t) -> ::c_int; - pub fn pthread_attr_setstacksize(attr: *mut ::pthread_attr_t, - stack_size: ::size_t) -> ::c_int; - pub fn pthread_attr_setdetachstate(attr: *mut ::pthread_attr_t, - state: ::c_int) -> ::c_int; - pub fn pthread_detach(thread: ::pthread_t) -> ::c_int; - #[cfg_attr(target_os = "netbsd", link_name = "__libc_thr_yield")] - pub fn sched_yield() -> ::c_int; - pub fn pthread_key_create(key: *mut pthread_key_t, - dtor: ::dox::Option) - -> ::c_int; - pub fn pthread_key_delete(key: pthread_key_t) -> ::c_int; - pub fn pthread_getspecific(key: pthread_key_t) -> *mut ::c_void; - pub fn pthread_setspecific(key: pthread_key_t, value: *const ::c_void) - -> ::c_int; - pub fn pthread_mutex_init(lock: *mut pthread_mutex_t, - attr: *const pthread_mutexattr_t) -> ::c_int; - pub fn pthread_mutex_destroy(lock: *mut pthread_mutex_t) -> ::c_int; - pub fn pthread_mutex_lock(lock: *mut pthread_mutex_t) -> ::c_int; - pub fn pthread_mutex_trylock(lock: *mut pthread_mutex_t) -> ::c_int; - pub fn pthread_mutex_unlock(lock: *mut pthread_mutex_t) -> ::c_int; - - pub fn pthread_mutexattr_init(attr: *mut pthread_mutexattr_t) -> ::c_int; - #[cfg_attr(all(target_os = "macos", target_arch = "x86"), - link_name = "pthread_mutexattr_destroy$UNIX2003")] - pub fn pthread_mutexattr_destroy(attr: *mut pthread_mutexattr_t) -> ::c_int; - pub fn pthread_mutexattr_settype(attr: *mut pthread_mutexattr_t, - _type: ::c_int) -> ::c_int; - - #[cfg_attr(all(target_os = "macos", target_arch = "x86"), - link_name = "pthread_cond_wait$UNIX2003")] - pub fn pthread_cond_wait(cond: *mut pthread_cond_t, - lock: *mut pthread_mutex_t) -> ::c_int; - #[cfg_attr(all(target_os = "macos", target_arch = "x86"), - link_name = "pthread_cond_timedwait$UNIX2003")] - pub fn pthread_cond_timedwait(cond: *mut pthread_cond_t, - lock: *mut pthread_mutex_t, - abstime: *const ::timespec) -> ::c_int; - pub fn pthread_cond_signal(cond: *mut pthread_cond_t) -> ::c_int; - pub fn pthread_cond_broadcast(cond: *mut pthread_cond_t) -> ::c_int; - pub fn pthread_cond_destroy(cond: *mut pthread_cond_t) -> ::c_int; - #[cfg_attr(all(target_os = "macos", target_arch = "x86"), - link_name = "pthread_rwlock_destroy$UNIX2003")] - pub fn pthread_rwlock_destroy(lock: *mut pthread_rwlock_t) -> ::c_int; - #[cfg_attr(all(target_os = "macos", target_arch = "x86"), - link_name = "pthread_rwlock_rdlock$UNIX2003")] - pub fn pthread_rwlock_rdlock(lock: *mut pthread_rwlock_t) -> ::c_int; - #[cfg_attr(all(target_os = "macos", target_arch = "x86"), - link_name = "pthread_rwlock_tryrdlock$UNIX2003")] - pub fn pthread_rwlock_tryrdlock(lock: *mut pthread_rwlock_t) -> ::c_int; - #[cfg_attr(all(target_os = "macos", target_arch = "x86"), - link_name = "pthread_rwlock_wrlock$UNIX2003")] - pub fn pthread_rwlock_wrlock(lock: *mut pthread_rwlock_t) -> ::c_int; - #[cfg_attr(all(target_os = "macos", target_arch = "x86"), - link_name = "pthread_rwlock_trywrlock$UNIX2003")] - pub fn pthread_rwlock_trywrlock(lock: *mut pthread_rwlock_t) -> ::c_int; - #[cfg_attr(all(target_os = "macos", target_arch = "x86"), - link_name = "pthread_rwlock_unlock$UNIX2003")] - pub fn pthread_rwlock_unlock(lock: *mut pthread_rwlock_t) -> ::c_int; - #[cfg_attr(all(target_os = "macos", target_arch = "x86"), - link_name = "pthread_sigmask$UNIX2003")] - pub fn pthread_sigmask(how: ::c_int, set: *const sigset_t, - oldset: *mut sigset_t) -> ::c_int; - - // #[cfg_attr(target_os = "linux", link_name = "__xpg_strerror_r")] - pub fn strerror_r(errnum: ::c_int, buf: *mut c_char, - buflen: ::size_t) -> ::c_int; - - pub fn getsockopt(sockfd: ::c_int, - level: ::c_int, - optname: ::c_int, - optval: *mut ::c_void, - optlen: *mut ::socklen_t) -> ::c_int; - pub fn raise(signum: ::c_int) -> ::c_int; - pub fn sigaction(signum: ::c_int, - act: *const sigaction, - oldact: *mut sigaction) -> ::c_int; - #[cfg_attr(all(target_os = "macos", target_arch = "x86"), - link_name = "sigaltstack$UNIX2003")] - pub fn sigaltstack(ss: *const stack_t, - oss: *mut stack_t) -> ::c_int; - - #[cfg_attr(target_os = "netbsd", link_name = "__utimes50")] - pub fn utimes(filename: *const ::c_char, - times: *const ::timeval) -> ::c_int; - pub fn dlopen(filename: *const ::c_char, - flag: ::c_int) -> *mut ::c_void; - pub fn dlerror() -> *mut ::c_char; - pub fn dlsym(handle: *mut ::c_void, - symbol: *const ::c_char) -> *mut ::c_void; - pub fn dlclose(handle: *mut ::c_void) -> ::c_int; - pub fn dladdr(addr: *const ::c_void, info: *mut Dl_info) -> ::c_int; - - pub fn getaddrinfo(node: *const c_char, - service: *const c_char, - hints: *const addrinfo, - res: *mut *mut addrinfo) -> ::c_int; - pub fn freeaddrinfo(res: *mut addrinfo); - pub fn gai_strerror(errcode: ::c_int) -> *const ::c_char; - - #[cfg_attr(target_os = "netbsd", link_name = "__gmtime_r50")] - pub fn gmtime_r(time_p: *const time_t, result: *mut tm) -> *mut tm; - #[cfg_attr(target_os = "netbsd", link_name = "__localtime_r50")] - pub fn localtime_r(time_p: *const time_t, result: *mut tm) -> *mut tm; - #[cfg_attr(all(target_os = "macos", target_arch = "x86"), - link_name = "mktime$UNIX2003")] - #[cfg_attr(target_os = "netbsd", link_name = "__mktime50")] - pub fn mktime(tm: *mut tm) -> time_t; - - #[cfg_attr(target_os = "netbsd", link_name = "__mknod50")] - pub fn mknod(pathname: *const ::c_char, mode: ::mode_t, - dev: ::dev_t) -> ::c_int; - #[cfg_attr(all(target_os = "macos", target_arch = "x86"), - link_name = "writev$UNIX2003")] - pub fn writev(fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int) -> ::ssize_t; - #[cfg_attr(all(target_os = "macos", target_arch = "x86"), - link_name = "readv$UNIX2003")] - pub fn readv(fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int) -> ::ssize_t; - pub fn uname(buf: *mut ::utsname) -> ::c_int; - pub fn daemon(nochdir: ::c_int, noclose: ::c_int) -> ::c_int; - pub fn gethostname(name: *mut ::c_char, len: ::size_t) -> ::c_int; - pub fn chroot(name: *const ::c_char) -> ::c_int; - #[cfg_attr(all(target_os = "macos", target_arch = "x86"), - link_name = "usleep$UNIX2003")] - pub fn usleep(secs: ::c_uint) -> ::c_int; - #[cfg_attr(all(target_os = "macos", target_arch = "x86"), - link_name = "send$UNIX2003")] - pub fn send(socket: ::c_int, buf: *const ::c_void, len: ::size_t, - flags: ::c_int) -> ::ssize_t; - #[cfg_attr(all(target_os = "macos", target_arch = "x86"), - link_name = "recv$UNIX2003")] - pub fn recv(socket: ::c_int, buf: *mut ::c_void, len: ::size_t, - flags: ::c_int) -> ::ssize_t; - #[cfg_attr(all(target_os = "macos", target_arch = "x86"), - link_name = "putenv$UNIX2003")] - #[cfg_attr(target_os = "netbsd", link_name = "__putenv50")] - pub fn putenv(string: *mut c_char) -> ::c_int; - #[cfg_attr(all(target_os = "macos", target_arch = "x86"), - link_name = "sendmsg$UNIX2003")] - pub fn sendmsg(fd: ::c_int, msg: *const msghdr, flags: ::c_int) -> ::ssize_t; - #[cfg_attr(all(target_os = "macos", target_arch = "x86"), - link_name = "recvmsg$UNIX2003")] - pub fn recvmsg(fd: ::c_int, msg: *mut msghdr, flags: ::c_int) -> ::ssize_t; - #[cfg_attr(all(target_os = "macos", target_arch = "x86"), - link_name = "poll$UNIX2003")] - pub fn poll(fds: *mut pollfd, nfds: nfds_t, timeout: ::c_int) -> ::c_int; -} - -// TODO: get rid of this #[cfg(not(...))] -#[cfg(not(target_os = "android"))] -extern { - pub fn getifaddrs(ifap: *mut *mut ifaddrs) -> ::c_int; - pub fn freeifaddrs(ifa: *mut ifaddrs); - #[cfg_attr(target_os = "macos", link_name = "glob$INODE64")] - #[cfg_attr(target_os = "netbsd", link_name = "__glob30")] - pub fn glob(pattern: *const c_char, - flags: ::c_int, - errfunc: ::dox::Option ::c_int>, - pglob: *mut glob_t) -> ::c_int; - #[cfg_attr(target_os = "netbsd", link_name = "__globfree30")] - pub fn globfree(pglob: *mut glob_t); - - pub fn posix_madvise(addr: *mut ::c_void, len: ::size_t, advice: ::c_int) - -> ::c_int; - - pub fn shm_unlink(name: *const c_char) -> ::c_int; - - #[cfg_attr(all(target_os = "macos", target_arch = "x86_64"), - link_name = "seekdir$INODE64")] - #[cfg_attr(all(target_os = "macos", target_arch = "x86"), - link_name = "seekdir$INODE64$UNIX2003")] - pub fn seekdir(dirp: *mut ::DIR, loc: c_long); - - #[cfg_attr(all(target_os = "macos", target_arch = "x86_64"), - link_name = "telldir$INODE64")] - #[cfg_attr(all(target_os = "macos", target_arch = "x86"), - link_name = "telldir$INODE64$UNIX2003")] - pub fn telldir(dirp: *mut ::DIR) -> c_long; - - pub fn getsid(pid: pid_t) -> pid_t; - pub fn madvise(addr: *mut ::c_void, len: ::size_t, advice: ::c_int) - -> ::c_int; - pub fn readlink(path: *const c_char, - buf: *mut c_char, - bufsz: ::size_t) - -> ::ssize_t; - - #[cfg_attr(all(target_os = "macos", target_arch = "x86"), - link_name = "msync$UNIX2003")] - #[cfg_attr(target_os = "netbsd", link_name = "__msync13")] - pub fn msync(addr: *mut ::c_void, len: ::size_t, flags: ::c_int) -> ::c_int; - pub fn sysconf(name: ::c_int) -> c_long; - #[cfg_attr(all(target_os = "macos", target_arch = "x86"), - link_name = "recvfrom$UNIX2003")] - pub fn recvfrom(socket: ::c_int, buf: *mut ::c_void, len: ::size_t, - flags: ::c_int, addr: *mut sockaddr, - addrlen: *mut socklen_t) -> ::ssize_t; - pub fn mkfifo(path: *const c_char, mode: mode_t) -> ::c_int; - - #[cfg_attr(target_os = "netbsd", link_name = "__sigemptyset14")] - pub fn sigemptyset(set: *mut sigset_t) -> ::c_int; - #[cfg_attr(target_os = "netbsd", link_name = "__sigaddset14")] - pub fn sigaddset(set: *mut sigset_t, signum: ::c_int) -> ::c_int; - #[cfg_attr(target_os = "netbsd", link_name = "__sigfillset14")] - pub fn sigfillset(set: *mut sigset_t) -> ::c_int; - #[cfg_attr(target_os = "netbsd", link_name = "__sigdelset14")] - pub fn sigdelset(set: *mut sigset_t, signum: ::c_int) -> ::c_int; - #[cfg_attr(target_os = "netbsd", link_name = "__sigismember14")] - pub fn sigismember(set: *const sigset_t, signum: ::c_int) -> ::c_int; - #[cfg_attr(all(target_os = "macos", target_arch = "x86_64"), - link_name = "select$1050")] - #[cfg_attr(all(target_os = "macos", target_arch = "x86"), - link_name = "select$UNIX2003")] - #[cfg_attr(target_os = "netbsd", link_name = "__select50")] - pub fn select(nfds: ::c_int, - readfs: *mut fd_set, - writefds: *mut fd_set, - errorfds: *mut fd_set, - timeout: *mut timeval) -> ::c_int; - #[cfg_attr(all(target_os = "macos", target_arch = "x86_64"), - link_name = "pselect$1050")] - #[cfg_attr(all(target_os = "macos", target_arch = "x86"), - link_name = "pselect$UNIX2003")] - #[cfg_attr(target_os = "netbsd", link_name = "__pselect50")] - pub fn pselect(nfds: ::c_int, - readfs: *mut fd_set, - writefds: *mut fd_set, - errorfds: *mut fd_set, - timeout: *const timespec, - sigmask: *const sigset_t) -> ::c_int; - pub fn fseeko(stream: *mut ::FILE, - offset: ::off_t, - whence: ::c_int) -> ::c_int; - pub fn ftello(stream: *mut ::FILE) -> ::off_t; - #[cfg_attr(target_os = "netbsd", link_name = "__timegm50")] - pub fn timegm(tm: *mut ::tm) -> time_t; - pub fn statvfs(path: *const c_char, buf: *mut statvfs) -> ::c_int; - pub fn fstatvfs(fd: ::c_int, buf: *mut statvfs) -> ::c_int; - #[cfg_attr(all(target_os = "macos", target_arch = "x86"), - link_name = "tcdrain$UNIX2003")] - pub fn tcdrain(fd: ::c_int) -> ::c_int; - pub fn cfgetispeed(termios: *const ::termios) -> ::speed_t; - pub fn cfgetospeed(termios: *const ::termios) -> ::speed_t; - pub fn cfsetispeed(termios: *mut ::termios, speed: ::speed_t) -> ::c_int; - pub fn cfsetospeed(termios: *mut ::termios, speed: ::speed_t) -> ::c_int; - pub fn tcgetattr(fd: ::c_int, termios: *mut ::termios) -> ::c_int; - pub fn tcsetattr(fd: ::c_int, - optional_actions: ::c_int, - termios: *const ::termios) -> ::c_int; - pub fn tcflow(fd: ::c_int, action: ::c_int) -> ::c_int; - pub fn tcflush(fd: ::c_int, action: ::c_int) -> ::c_int; - pub fn tcsendbreak(fd: ::c_int, duration: ::c_int) -> ::c_int; -} - -cfg_if! { - if #[cfg(any(target_os = "linux", - target_os = "android", - target_os = "emscripten"))] { - mod notbsd; - pub use self::notbsd::*; - } else if #[cfg(any(target_os = "macos", - target_os = "ios", - target_os = "freebsd", - target_os = "dragonfly", - target_os = "openbsd", - target_os = "netbsd", - target_os = "bitrig"))] { - mod bsd; - pub use self::bsd::*; - } else if #[cfg(target_os = "solaris")] { - mod solaris; - pub use self::solaris::*; - } else { - // ... - } -} diff --git a/deps/libc-0.2.7/src/unix/notbsd/android/b32.rs b/deps/libc-0.2.7/src/unix/notbsd/android/b32.rs deleted file mode 100644 index 8ae2c2e38..000000000 --- a/deps/libc-0.2.7/src/unix/notbsd/android/b32.rs +++ /dev/null @@ -1,8 +0,0 @@ -s! { - pub struct sigaction { - pub sa_sigaction: ::sighandler_t, - pub sa_mask: ::sigset_t, - pub sa_flags: ::c_ulong, - pub sa_restorer: ::dox::Option, - } -} diff --git a/deps/libc-0.2.7/src/unix/notbsd/android/b64.rs b/deps/libc-0.2.7/src/unix/notbsd/android/b64.rs deleted file mode 100644 index d869b8cf6..000000000 --- a/deps/libc-0.2.7/src/unix/notbsd/android/b64.rs +++ /dev/null @@ -1,8 +0,0 @@ -s! { - pub struct sigaction { - pub sa_flags: ::c_uint, - pub sa_sigaction: ::sighandler_t, - pub sa_mask: ::sigset_t, - _restorer: *mut ::c_void, - } -} diff --git a/deps/libc-0.2.7/src/unix/notbsd/android/mod.rs b/deps/libc-0.2.7/src/unix/notbsd/android/mod.rs deleted file mode 100644 index 926dff17c..000000000 --- a/deps/libc-0.2.7/src/unix/notbsd/android/mod.rs +++ /dev/null @@ -1,605 +0,0 @@ -//! Android-specific definitions for linux-like values - -pub type c_char = u8; -pub type c_long = i32; -pub type c_ulong = u32; -pub type clock_t = i32; -pub type time_t = i32; -pub type suseconds_t = i32; -pub type wchar_t = u32; -pub type off_t = i32; -pub type ino_t = u32; -pub type blkcnt_t = u32; -pub type blksize_t = u32; -pub type dev_t = u32; -pub type mode_t = u16; -pub type nlink_t = u32; -pub type useconds_t = u32; -pub type socklen_t = i32; -pub type pthread_t = c_long; -pub type pthread_mutexattr_t = ::c_long; -pub type sigset_t = c_ulong; -pub type time64_t = i64; -pub type fsfilcnt_t = ::c_ulong; -pub type fsblkcnt_t = ::c_ulong; -pub type nfds_t = ::c_uint; -pub type rlim_t = c_ulong; - -s! { - pub struct stat { - pub st_dev: ::c_ulonglong, - __pad0: [::c_uchar; 4], - __st_ino: ::ino_t, - pub st_mode: ::c_uint, - pub st_nlink: ::c_uint, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::c_ulonglong, - __pad3: [::c_uchar; 4], - pub st_size: ::c_longlong, - pub st_blksize: blksize_t, - pub st_blocks: ::c_ulonglong, - pub st_atime: ::c_ulong, - pub st_atime_nsec: ::c_ulong, - pub st_mtime: ::c_ulong, - pub st_mtime_nsec: ::c_ulong, - pub st_ctime: ::c_ulong, - pub st_ctime_nsec: ::c_ulong, - pub st_ino: ::c_ulonglong, - } - - pub struct dirent { - pub d_ino: u64, - pub d_off: i64, - pub d_reclen: ::c_ushort, - pub d_type: ::c_uchar, - pub d_name: [::c_char; 256], - } - - pub struct pthread_attr_t { - pub flags: ::uint32_t, - pub stack_base: *mut ::c_void, - pub stack_size: ::size_t, - pub guard_size: ::size_t, - pub sched_policy: ::int32_t, - pub sched_priority: ::int32_t, - } - - pub struct pthread_mutex_t { value: ::c_int } - - pub struct pthread_cond_t { value: ::c_int } - - pub struct pthread_rwlock_t { - lock: pthread_mutex_t, - cond: pthread_cond_t, - numLocks: ::c_int, - writerThreadId: ::c_int, - pendingReaders: ::c_int, - pendingWriters: ::c_int, - reserved: [*mut ::c_void; 4], - } - - pub struct passwd { - pub pw_name: *mut ::c_char, - pub pw_passwd: *mut ::c_char, - pub pw_uid: ::uid_t, - pub pw_gid: ::gid_t, - pub pw_dir: *mut ::c_char, - pub pw_shell: *mut ::c_char, - } - - pub struct stack_t { - pub ss_sp: *mut ::c_void, - pub ss_flags: ::c_int, - pub ss_size: ::size_t - } - - pub struct siginfo_t { - pub si_signo: ::c_int, - pub si_errno: ::c_int, - pub si_code: ::c_int, - pub _pad: [::c_int; 29], - } - - pub struct statfs { - pub f_type: ::uint32_t, - pub f_bsize: ::uint32_t, - pub f_blocks: ::uint64_t, - pub f_bfree: ::uint64_t, - pub f_bavail: ::uint64_t, - pub f_files: ::uint64_t, - pub f_ffree: ::uint64_t, - pub f_fsid: ::__fsid_t, - pub f_namelen: ::uint32_t, - pub f_frsize: ::uint32_t, - pub f_flags: ::uint32_t, - pub f_spare: [::uint32_t; 4], - } - - pub struct __fsid_t { - __val: [::c_int; 2], - } - - pub struct msghdr { - pub msg_name: *mut ::c_void, - pub msg_namelen: ::c_int, - pub msg_iov: *mut ::iovec, - pub msg_iovlen: ::size_t, - pub msg_control: *mut ::c_void, - pub msg_controllen: ::size_t, - pub msg_flags: ::c_int, - } - - pub struct termios { - pub c_iflag: ::tcflag_t, - pub c_oflag: ::tcflag_t, - pub c_cflag: ::tcflag_t, - pub c_lflag: ::tcflag_t, - pub c_line: ::cc_t, - pub c_cc: [::cc_t; ::NCCS], - } - - pub struct flock { - pub l_type: ::c_short, - pub l_whence: ::c_short, - pub l_start: ::off_t, - pub l_len: ::off_t, - pub l_pid: ::pid_t, - } -} - -pub const BUFSIZ: ::c_uint = 1024; -pub const FILENAME_MAX: ::c_uint = 1024; -pub const FOPEN_MAX: ::c_uint = 20; -pub const L_tmpnam: ::c_uint = 1024; -pub const TMP_MAX: ::c_uint = 308915776; -pub const _PC_NAME_MAX: ::c_int = 4; - -pub const FIONBIO: ::c_int = 0x5421; - -pub const _SC_ARG_MAX: ::c_int = 0; -pub const _SC_BC_BASE_MAX: ::c_int = 1; -pub const _SC_BC_DIM_MAX: ::c_int = 2; -pub const _SC_BC_SCALE_MAX: ::c_int = 3; -pub const _SC_BC_STRING_MAX: ::c_int = 4; -pub const _SC_CHILD_MAX: ::c_int = 5; -pub const _SC_CLK_TCK: ::c_int = 6; -pub const _SC_COLL_WEIGHTS_MAX: ::c_int = 7; -pub const _SC_EXPR_NEST_MAX: ::c_int = 8; -pub const _SC_LINE_MAX: ::c_int = 9; -pub const _SC_NGROUPS_MAX: ::c_int = 10; -pub const _SC_OPEN_MAX: ::c_int = 11; -pub const _SC_2_C_BIND: ::c_int = 13; -pub const _SC_2_C_DEV: ::c_int = 14; -pub const _SC_2_C_VERSION: ::c_int = 15; -pub const _SC_2_CHAR_TERM: ::c_int = 16; -pub const _SC_2_FORT_DEV: ::c_int = 17; -pub const _SC_2_FORT_RUN: ::c_int = 18; -pub const _SC_2_LOCALEDEF: ::c_int = 19; -pub const _SC_2_SW_DEV: ::c_int = 20; -pub const _SC_2_UPE: ::c_int = 21; -pub const _SC_2_VERSION: ::c_int = 22; -pub const _SC_JOB_CONTROL: ::c_int = 23; -pub const _SC_SAVED_IDS: ::c_int = 24; -pub const _SC_VERSION: ::c_int = 25; -pub const _SC_RE_DUP_MAX: ::c_int = 26; -pub const _SC_STREAM_MAX: ::c_int = 27; -pub const _SC_TZNAME_MAX: ::c_int = 28; -pub const _SC_XOPEN_CRYPT: ::c_int = 29; -pub const _SC_XOPEN_ENH_I18N: ::c_int = 30; -pub const _SC_XOPEN_SHM: ::c_int = 31; -pub const _SC_XOPEN_VERSION: ::c_int = 32; -pub const _SC_XOPEN_XCU_VERSION: ::c_int = 33; -pub const _SC_XOPEN_REALTIME: ::c_int = 34; -pub const _SC_XOPEN_REALTIME_THREADS: ::c_int = 35; -pub const _SC_XOPEN_LEGACY: ::c_int = 36; -pub const _SC_ATEXIT_MAX: ::c_int = 37; -pub const _SC_IOV_MAX: ::c_int = 38; -pub const _SC_PAGESIZE: ::c_int = 39; -pub const _SC_PAGE_SIZE: ::c_int = 40; -pub const _SC_XOPEN_UNIX: ::c_int = 41; -pub const _SC_MQ_PRIO_MAX: ::c_int = 51; -pub const _SC_GETGR_R_SIZE_MAX: ::c_int = 71; -pub const _SC_GETPW_R_SIZE_MAX: ::c_int = 72; -pub const _SC_LOGIN_NAME_MAX: ::c_int = 73; -pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: ::c_int = 74; -pub const _SC_THREAD_KEYS_MAX: ::c_int = 75; -pub const _SC_THREAD_STACK_MIN: ::c_int = 76; -pub const _SC_THREAD_THREADS_MAX: ::c_int = 77; -pub const _SC_TTY_NAME_MAX: ::c_int = 78; -pub const _SC_THREADS: ::c_int = 79; -pub const _SC_THREAD_ATTR_STACKADDR: ::c_int = 80; -pub const _SC_THREAD_ATTR_STACKSIZE: ::c_int = 81; -pub const _SC_THREAD_PRIORITY_SCHEDULING: ::c_int = 82; -pub const _SC_THREAD_PRIO_INHERIT: ::c_int = 83; -pub const _SC_THREAD_PRIO_PROTECT: ::c_int = 84; -pub const _SC_THREAD_SAFE_FUNCTIONS: ::c_int = 85; -pub const _SC_NPROCESSORS_ONLN: ::c_int = 97; - -pub const PTHREAD_STACK_MIN: ::size_t = 8192; -pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t { - value: 0, -}; -pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = pthread_cond_t { - value: 0, -}; -pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t { - lock: PTHREAD_MUTEX_INITIALIZER, - cond: PTHREAD_COND_INITIALIZER, - numLocks: 0, - writerThreadId: 0, - pendingReaders: 0, - pendingWriters: 0, - reserved: [0 as *mut _; 4], -}; -pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 1; - -pub const FIOCLEX: ::c_int = 0x5451; - -pub const SA_ONSTACK: ::c_ulong = 0x08000000; -pub const SA_SIGINFO: ::c_ulong = 0x00000004; -pub const SA_NOCLDWAIT: ::c_ulong = 0x00000002; - -pub const SIGCHLD: ::c_int = 17; -pub const SIGBUS: ::c_int = 7; -pub const SIGUSR1: ::c_int = 10; -pub const SIGUSR2: ::c_int = 12; -pub const SIGCONT: ::c_int = 18; -pub const SIGSTOP: ::c_int = 19; -pub const SIGTSTP: ::c_int = 20; -pub const SIGURG: ::c_int = 23; -pub const SIGIO: ::c_int = 29; -pub const SIGSYS: ::c_int = 31; -pub const SIGSTKFLT: ::c_int = 16; -pub const SIGUNUSED: ::c_int = 31; -pub const SIGTTIN: ::c_int = 21; -pub const SIGTTOU: ::c_int = 22; -pub const SIGXCPU: ::c_int = 24; -pub const SIGXFSZ: ::c_int = 25; -pub const SIGVTALRM: ::c_int = 26; -pub const SIGPROF: ::c_int = 27; -pub const SIGWINCH: ::c_int = 28; -pub const SIGPOLL: ::c_int = 29; -pub const SIGPWR: ::c_int = 30; -pub const SIG_SETMASK: ::c_int = 2; -pub const SIG_BLOCK: ::c_int = 0x000000; -pub const SIG_UNBLOCK: ::c_int = 0x01; - -pub const RUSAGE_CHILDREN: ::c_int = -1; - -pub const MAP_ANON: ::c_int = 0x0020; -pub const MAP_ANONYMOUS: ::c_int = 0x0020; -pub const MAP_GROWSDOWN: ::c_int = 0x0100; -pub const MAP_DENYWRITE: ::c_int = 0x0800; -pub const MAP_EXECUTABLE: ::c_int = 0x01000; -pub const MAP_LOCKED: ::c_int = 0x02000; -pub const MAP_NORESERVE: ::c_int = 0x04000; -pub const MAP_POPULATE: ::c_int = 0x08000; -pub const MAP_NONBLOCK: ::c_int = 0x010000; -pub const MAP_STACK: ::c_int = 0x020000; - -pub const EDEADLK: ::c_int = 35; -pub const ENAMETOOLONG: ::c_int = 36; -pub const ENOLCK: ::c_int = 37; -pub const ENOSYS: ::c_int = 38; -pub const ENOTEMPTY: ::c_int = 39; -pub const ELOOP: ::c_int = 40; -pub const ENOMSG: ::c_int = 42; -pub const EIDRM: ::c_int = 43; -pub const ECHRNG: ::c_int = 44; -pub const EL2NSYNC: ::c_int = 45; -pub const EL3HLT: ::c_int = 46; -pub const EL3RST: ::c_int = 47; -pub const ELNRNG: ::c_int = 48; -pub const EUNATCH: ::c_int = 49; -pub const ENOCSI: ::c_int = 50; -pub const EL2HLT: ::c_int = 51; -pub const EBADE: ::c_int = 52; -pub const EBADR: ::c_int = 53; -pub const EXFULL: ::c_int = 54; -pub const ENOANO: ::c_int = 55; -pub const EBADRQC: ::c_int = 56; -pub const EBADSLT: ::c_int = 57; - -pub const EMULTIHOP: ::c_int = 72; -pub const EBADMSG: ::c_int = 74; -pub const EOVERFLOW: ::c_int = 75; -pub const ENOTUNIQ: ::c_int = 76; -pub const EBADFD: ::c_int = 77; -pub const EREMCHG: ::c_int = 78; -pub const ELIBACC: ::c_int = 79; -pub const ELIBBAD: ::c_int = 80; -pub const ELIBSCN: ::c_int = 81; -pub const ELIBMAX: ::c_int = 82; -pub const ELIBEXEC: ::c_int = 83; -pub const EILSEQ: ::c_int = 84; -pub const ERESTART: ::c_int = 85; -pub const ESTRPIPE: ::c_int = 86; -pub const EUSERS: ::c_int = 87; -pub const ENOTSOCK: ::c_int = 88; -pub const EDESTADDRREQ: ::c_int = 89; -pub const EMSGSIZE: ::c_int = 90; -pub const EPROTOTYPE: ::c_int = 91; -pub const ENOPROTOOPT: ::c_int = 92; -pub const EPROTONOSUPPORT: ::c_int = 93; -pub const ESOCKTNOSUPPORT: ::c_int = 94; -pub const EOPNOTSUPP: ::c_int = 95; -pub const EPFNOSUPPORT: ::c_int = 96; -pub const EAFNOSUPPORT: ::c_int = 97; -pub const EADDRINUSE: ::c_int = 98; -pub const EADDRNOTAVAIL: ::c_int = 99; -pub const ENETDOWN: ::c_int = 100; -pub const ENETUNREACH: ::c_int = 101; -pub const ENETRESET: ::c_int = 102; -pub const ECONNABORTED: ::c_int = 103; -pub const ECONNRESET: ::c_int = 104; -pub const ENOBUFS: ::c_int = 105; -pub const EISCONN: ::c_int = 106; -pub const ENOTCONN: ::c_int = 107; -pub const ESHUTDOWN: ::c_int = 108; -pub const ETOOMANYREFS: ::c_int = 109; -pub const ETIMEDOUT: ::c_int = 110; -pub const ECONNREFUSED: ::c_int = 111; -pub const EHOSTDOWN: ::c_int = 112; -pub const EHOSTUNREACH: ::c_int = 113; -pub const EALREADY: ::c_int = 114; -pub const EINPROGRESS: ::c_int = 115; -pub const ESTALE: ::c_int = 116; -pub const EUCLEAN: ::c_int = 117; -pub const ENOTNAM: ::c_int = 118; -pub const ENAVAIL: ::c_int = 119; -pub const EISNAM: ::c_int = 120; -pub const EREMOTEIO: ::c_int = 121; -pub const EDQUOT: ::c_int = 122; -pub const ENOMEDIUM: ::c_int = 123; -pub const EMEDIUMTYPE: ::c_int = 124; -pub const ECANCELED: ::c_int = 125; -pub const ENOKEY: ::c_int = 126; -pub const EKEYEXPIRED: ::c_int = 127; -pub const EKEYREVOKED: ::c_int = 128; -pub const EKEYREJECTED: ::c_int = 129; -pub const EOWNERDEAD: ::c_int = 130; -pub const ENOTRECOVERABLE: ::c_int = 131; - -pub const SOCK_STREAM: ::c_int = 1; -pub const SOCK_DGRAM: ::c_int = 2; - -pub const SOL_SOCKET: ::c_int = 1; - -pub const SO_REUSEADDR: ::c_int = 2; -pub const SO_TYPE: ::c_int = 3; -pub const SO_ERROR: ::c_int = 4; -pub const SO_DONTROUTE: ::c_int = 5; -pub const SO_BROADCAST: ::c_int = 6; -pub const SO_SNDBUF: ::c_int = 7; -pub const SO_RCVBUF: ::c_int = 8; -pub const SO_KEEPALIVE: ::c_int = 9; -pub const SO_OOBINLINE: ::c_int = 10; -pub const SO_LINGER: ::c_int = 13; -pub const SO_REUSEPORT: ::c_int = 15; -pub const SO_RCVLOWAT: ::c_int = 18; -pub const SO_SNDLOWAT: ::c_int = 19; -pub const SO_RCVTIMEO: ::c_int = 20; -pub const SO_SNDTIMEO: ::c_int = 21; -pub const SO_ACCEPTCONN: ::c_int = 30; - -pub const O_ACCMODE: ::c_int = 3; -pub const O_APPEND: ::c_int = 1024; -pub const O_CREAT: ::c_int = 64; -pub const O_EXCL: ::c_int = 128; -pub const O_NOCTTY: ::c_int = 256; -pub const O_NONBLOCK: ::c_int = 2048; -pub const O_SYNC: ::c_int = 0x101000; -pub const O_DIRECT: ::c_int = 0x10000; -pub const O_DIRECTORY: ::c_int = 0x4000; -pub const O_NOFOLLOW: ::c_int = 0x8000; -pub const O_ASYNC: ::c_int = 0x2000; -pub const O_NDELAY: ::c_int = 0x800; - -pub const NI_MAXHOST: ::size_t = 1025; - -pub const NCCS: usize = 19; -pub const TCSBRKP: ::c_int = 0x5425; -pub const TCSANOW: ::c_int = 0; -pub const TCSADRAIN: ::c_int = 0x1; -pub const TCSAFLUSH: ::c_int = 0x2; -pub const IUTF8: ::tcflag_t = 0x00004000; -pub const VEOF: usize = 4; -pub const VEOL: usize = 11; -pub const VEOL2: usize = 16; -pub const VMIN: usize = 6; -pub const IEXTEN: ::tcflag_t = 0x00008000; -pub const TOSTOP: ::tcflag_t = 0x00000100; -pub const FLUSHO: ::tcflag_t = 0x00001000; - -pub const ADFS_SUPER_MAGIC: ::c_long = 0x0000adf5; -pub const AFFS_SUPER_MAGIC: ::c_long = 0x0000adff; -pub const CODA_SUPER_MAGIC: ::c_long = 0x73757245; -pub const CRAMFS_MAGIC: ::c_long = 0x28cd3d45; -pub const EFS_SUPER_MAGIC: ::c_long = 0x00414a53; -pub const EXT2_SUPER_MAGIC: ::c_long = 0x0000ef53; -pub const EXT3_SUPER_MAGIC: ::c_long = 0x0000ef53; -pub const EXT4_SUPER_MAGIC: ::c_long = 0x0000ef53; -pub const HPFS_SUPER_MAGIC: ::c_long = 0xf995e849; -pub const HUGETLBFS_MAGIC: ::c_long = 0x958458f6; -pub const ISOFS_SUPER_MAGIC: ::c_long = 0x00009660; -pub const JFFS2_SUPER_MAGIC: ::c_long = 0x000072b6; -pub const MINIX_SUPER_MAGIC: ::c_long = 0x0000137f; -pub const MINIX_SUPER_MAGIC2: ::c_long = 0x0000138f; -pub const MINIX2_SUPER_MAGIC: ::c_long = 0x00002468; -pub const MINIX2_SUPER_MAGIC2: ::c_long = 0x00002478; -pub const MSDOS_SUPER_MAGIC: ::c_long = 0x00004d44; -pub const NCP_SUPER_MAGIC: ::c_long = 0x0000564c; -pub const NFS_SUPER_MAGIC: ::c_long = 0x00006969; -pub const OPENPROM_SUPER_MAGIC: ::c_long = 0x00009fa1; -pub const PROC_SUPER_MAGIC: ::c_long = 0x00009fa0; -pub const QNX4_SUPER_MAGIC: ::c_long = 0x0000002f; -pub const REISERFS_SUPER_MAGIC: ::c_long = 0x52654973; -pub const SMB_SUPER_MAGIC: ::c_long = 0x0000517b; -pub const TMPFS_MAGIC: ::c_long = 0x01021994; -pub const USBDEVICE_SUPER_MAGIC: ::c_long = 0x00009fa2; - -pub const MADV_HUGEPAGE: ::c_int = 14; -pub const MADV_NOHUGEPAGE: ::c_int = 15; -pub const MAP_HUGETLB: ::c_int = 0x040000; - -pub const PTRACE_TRACEME: ::c_int = 0; -pub const PTRACE_PEEKTEXT: ::c_int = 1; -pub const PTRACE_PEEKDATA: ::c_int = 2; -pub const PTRACE_PEEKUSER: ::c_int = 3; -pub const PTRACE_POKETEXT: ::c_int = 4; -pub const PTRACE_POKEDATA: ::c_int = 5; -pub const PTRACE_POKEUSER: ::c_int = 6; -pub const PTRACE_CONT: ::c_int = 7; -pub const PTRACE_KILL: ::c_int = 8; -pub const PTRACE_SINGLESTEP: ::c_int = 9; -pub const PTRACE_ATTACH: ::c_int = 16; -pub const PTRACE_DETACH: ::c_int = 17; -pub const PTRACE_SYSCALL: ::c_int = 24; -pub const PTRACE_SETOPTIONS: ::c_int = 0x4200; -pub const PTRACE_GETEVENTMSG: ::c_int = 0x4201; -pub const PTRACE_GETSIGINFO: ::c_int = 0x4202; -pub const PTRACE_SETSIGINFO: ::c_int = 0x4203; -pub const PTRACE_GETFPREGS: ::c_int = 14; -pub const PTRACE_SETFPREGS: ::c_int = 15; -pub const PTRACE_GETREGS: ::c_int = 12; -pub const PTRACE_SETREGS: ::c_int = 13; - -pub const EFD_NONBLOCK: ::c_int = 0x800; - -pub const F_GETLK: ::c_int = 5; -pub const F_GETOWN: ::c_int = 9; -pub const F_SETOWN: ::c_int = 8; -pub const F_SETLK: ::c_int = 6; -pub const F_SETLKW: ::c_int = 7; - -pub const TCGETS: ::c_int = 0x5401; -pub const TCSETS: ::c_int = 0x5402; -pub const TCSETSW: ::c_int = 0x5403; -pub const TCSETSF: ::c_int = 0x5404; -pub const TCGETA: ::c_int = 0x5405; -pub const TCSETA: ::c_int = 0x5406; -pub const TCSETAW: ::c_int = 0x5407; -pub const TCSETAF: ::c_int = 0x5408; -pub const TCSBRK: ::c_int = 0x5409; -pub const TCXONC: ::c_int = 0x540A; -pub const TCFLSH: ::c_int = 0x540B; -pub const TIOCGSOFTCAR: ::c_int = 0x5419; -pub const TIOCSSOFTCAR: ::c_int = 0x541A; -pub const TIOCINQ: ::c_int = 0x541B; -pub const TIOCLINUX: ::c_int = 0x541C; -pub const TIOCGSERIAL: ::c_int = 0x541E; -pub const TIOCEXCL: ::c_int = 0x540C; -pub const TIOCNXCL: ::c_int = 0x540D; -pub const TIOCSCTTY: ::c_int = 0x540E; -pub const TIOCGPGRP: ::c_int = 0x540F; -pub const TIOCSPGRP: ::c_int = 0x5410; -pub const TIOCOUTQ: ::c_int = 0x5411; -pub const TIOCSTI: ::c_int = 0x5412; -pub const TIOCGWINSZ: ::c_int = 0x5413; -pub const TIOCSWINSZ: ::c_int = 0x5414; -pub const TIOCMGET: ::c_int = 0x5415; -pub const TIOCMBIS: ::c_int = 0x5416; -pub const TIOCMBIC: ::c_int = 0x5417; -pub const TIOCMSET: ::c_int = 0x5418; -pub const FIONREAD: ::c_int = 0x541B; -pub const TIOCCONS: ::c_int = 0x541D; - -pub const RTLD_GLOBAL: ::c_int = 0x2; -pub const RTLD_NOLOAD: ::c_int = 0x4; -pub const RTLD_NOW: ::c_int = 0; - -f! { - pub fn sigemptyset(set: *mut sigset_t) -> ::c_int { - *set = 0; - return 0 - } - pub fn sigaddset(set: *mut sigset_t, signum: ::c_int) -> ::c_int { - *set |= signum as sigset_t; - return 0 - } - pub fn sigfillset(set: *mut sigset_t) -> ::c_int { - *set = !0; - return 0 - } - pub fn sigdelset(set: *mut sigset_t, signum: ::c_int) -> ::c_int { - *set &= !(signum as sigset_t); - return 0 - } - pub fn sigismember(set: *const sigset_t, signum: ::c_int) -> ::c_int { - (*set & (signum as sigset_t)) as ::c_int - } - pub fn cfgetispeed(termios: *const ::termios) -> ::speed_t { - (*termios).c_cflag & ::CBAUD - } - pub fn cfgetospeed(termios: *const ::termios) -> ::speed_t { - (*termios).c_cflag & ::CBAUD - } - pub fn cfsetispeed(termios: *mut ::termios, speed: ::speed_t) -> ::c_int { - (*termios).c_cflag = ((*termios).c_cflag & !::CBAUD) | (speed & ::CBAUD); - return 0 - } - pub fn cfsetospeed(termios: *mut ::termios, speed: ::speed_t) -> ::c_int { - (*termios).c_cflag = ((*termios).c_cflag & !::CBAUD) | (speed & ::CBAUD); - return 0 - } - pub fn tcgetattr(fd: ::c_int, termios: *mut ::termios) -> ::c_int { - ioctl(fd, ::TCGETS, termios) - } - pub fn tcsetattr(fd: ::c_int, - optional_actions: ::c_int, - termios: *const ::termios) -> ::c_int { - ioctl(fd, optional_actions, termios) - } - pub fn tcflow(fd: ::c_int, action: ::c_int) -> ::c_int { - ioctl(fd, ::TCXONC, action as *mut ::c_void) - } - pub fn tcflush(fd: ::c_int, action: ::c_int) -> ::c_int { - ioctl(fd, ::TCFLSH, action as *mut ::c_void) - } - pub fn tcsendbreak(fd: ::c_int, duration: ::c_int) -> ::c_int { - ioctl(fd, TCSBRKP, duration as *mut ::c_void) - } -} - -extern { - pub fn madvise(addr: *const ::c_void, len: ::size_t, advice: ::c_int) - -> ::c_int; - pub fn ioctl(fd: ::c_int, request: ::c_int, ...) -> ::c_int; - pub fn readlink(path: *const ::c_char, - buf: *mut ::c_char, - bufsz: ::size_t) - -> ::c_int; - pub fn msync(addr: *const ::c_void, len: ::size_t, - flags: ::c_int) -> ::c_int; - pub fn mprotect(addr: *const ::c_void, len: ::size_t, prot: ::c_int) - -> ::c_int; - pub fn sysconf(name: ::c_int) -> ::c_long; - pub fn recvfrom(socket: ::c_int, buf: *mut ::c_void, len: ::size_t, - flags: ::c_int, addr: *const ::sockaddr, - addrlen: *mut ::socklen_t) -> ::ssize_t; - pub fn getnameinfo(sa: *const ::sockaddr, - salen: ::socklen_t, - host: *mut ::c_char, - hostlen: ::size_t, - serv: *mut ::c_char, - sevlen: ::size_t, - flags: ::c_int) -> ::c_int; - pub fn timegm64(tm: *const ::tm) -> time64_t; - pub fn eventfd(init: ::c_uint, flags: ::c_int) -> ::c_int; - pub fn ptrace(request: ::c_int, ...) -> ::c_long; -} - -cfg_if! { - if #[cfg(target_pointer_width = "32")] { - mod b32; - pub use self::b32::*; - } else if #[cfg(target_pointer_width = "64")] { - mod b64; - pub use self::b64::*; - } else { - // ... - } -} - - diff --git a/deps/libc-0.2.7/src/unix/notbsd/linux/mips.rs b/deps/libc-0.2.7/src/unix/notbsd/linux/mips.rs deleted file mode 100644 index d9baf722d..000000000 --- a/deps/libc-0.2.7/src/unix/notbsd/linux/mips.rs +++ /dev/null @@ -1,507 +0,0 @@ -pub type c_char = i8; -pub type c_long = i32; -pub type c_ulong = u32; -pub type clock_t = i32; -pub type time_t = i32; -pub type suseconds_t = i32; -pub type wchar_t = i32; -pub type off_t = i32; -pub type ino_t = u32; -pub type blkcnt_t = i32; -pub type blksize_t = i32; -pub type nlink_t = u32; -pub type fsblkcnt_t = ::c_ulong; -pub type fsfilcnt_t = ::c_ulong; -pub type rlim_t = c_ulong; - -s! { - pub struct stat { - pub st_dev: ::c_ulong, - st_pad1: [::c_long; 3], - pub st_ino: ::ino_t, - pub st_mode: ::mode_t, - pub st_nlink: ::nlink_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::c_ulong, - pub st_pad2: [::c_long; 2], - pub st_size: ::off_t, - st_pad3: ::c_long, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - pub st_blksize: ::blksize_t, - pub st_blocks: ::blkcnt_t, - st_pad5: [::c_long; 14], - } - - pub struct stat64 { - pub st_dev: ::c_ulong, - st_pad1: [::c_long; 3], - pub st_ino: ::ino64_t, - pub st_mode: ::mode_t, - pub st_nlink: ::nlink_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::c_ulong, - st_pad2: [::c_long; 2], - pub st_size: ::off64_t, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - pub st_blksize: ::blksize_t, - st_pad3: ::c_long, - pub st_blocks: ::blkcnt64_t, - st_pad5: [::c_long; 14], - } - - pub struct pthread_attr_t { - __size: [u32; 9] - } - - pub struct sigaction { - pub sa_flags: ::c_int, - pub sa_sigaction: ::sighandler_t, - pub sa_mask: sigset_t, - _restorer: *mut ::c_void, - _resv: [::c_int; 1], - } - - pub struct stack_t { - pub ss_sp: *mut ::c_void, - pub ss_size: ::size_t, - pub ss_flags: ::c_int, - } - - pub struct sigset_t { - __val: [::c_ulong; 32], - } - - pub struct siginfo_t { - pub si_signo: ::c_int, - pub si_code: ::c_int, - pub si_errno: ::c_int, - pub _pad: [::c_int; 29], - } - - pub struct glob64_t { - pub gl_pathc: ::size_t, - pub gl_pathv: *mut *mut ::c_char, - pub gl_offs: ::size_t, - pub gl_flags: ::c_int, - - __unused1: *mut ::c_void, - __unused2: *mut ::c_void, - __unused3: *mut ::c_void, - __unused4: *mut ::c_void, - __unused5: *mut ::c_void, - } - - pub struct ipc_perm { - pub __key: ::key_t, - pub uid: ::uid_t, - pub gid: ::gid_t, - pub cuid: ::uid_t, - pub cgid: ::gid_t, - pub mode: ::c_uint, - pub __seq: ::c_ushort, - __pad1: ::c_ushort, - __unused1: ::c_ulong, - __unused2: ::c_ulong - } - - pub struct shmid_ds { - pub shm_perm: ::ipc_perm, - pub shm_segsz: ::size_t, - pub shm_atime: ::time_t, - pub shm_dtime: ::time_t, - pub shm_ctime: ::time_t, - pub shm_cpid: ::pid_t, - pub shm_lpid: ::pid_t, - pub shm_nattch: ::shmatt_t, - __unused4: ::c_ulong, - __unused5: ::c_ulong - } - - pub struct statfs { - pub f_type: ::c_long, - pub f_bsize: ::c_long, - pub f_frsize: ::c_long, - pub f_blocks: ::fsblkcnt_t, - pub f_bfree: ::fsblkcnt_t, - pub f_files: ::fsblkcnt_t, - pub f_ffree: ::fsblkcnt_t, - pub f_bavail: ::fsblkcnt_t, - pub f_fsid: ::fsid_t, - - pub f_namelen: ::c_long, - f_spare: [::c_long; 6], - } - - pub struct msghdr { - pub msg_name: *mut ::c_void, - pub msg_namelen: ::socklen_t, - pub msg_iov: *mut ::iovec, - pub msg_iovlen: ::size_t, - pub msg_control: *mut ::c_void, - pub msg_controllen: ::size_t, - pub msg_flags: ::c_int, - } - - pub struct termios { - pub c_iflag: ::tcflag_t, - pub c_oflag: ::tcflag_t, - pub c_cflag: ::tcflag_t, - pub c_lflag: ::tcflag_t, - pub c_line: ::cc_t, - pub c_cc: [::cc_t; ::NCCS], - } - - pub struct flock { - pub l_type: ::c_short, - pub l_whence: ::c_short, - pub l_start: ::off_t, - pub l_len: ::off_t, - pub l_sysid: ::c_long, - pub l_pid: ::pid_t, - pad: [::c_long; 4], - } -} - -pub const BUFSIZ: ::c_uint = 8192; -pub const TMP_MAX: ::c_uint = 238328; -pub const FOPEN_MAX: ::c_uint = 16; -pub const POSIX_MADV_DONTNEED: ::c_int = 4; -pub const _SC_2_C_VERSION: ::c_int = 96; -pub const RUSAGE_THREAD: ::c_int = 1; -pub const O_ACCMODE: ::c_int = 3; -pub const O_DIRECT: ::c_int = 0x8000; -pub const O_DIRECTORY: ::c_int = 0x10000; -pub const O_NOFOLLOW: ::c_int = 0x20000; -pub const RUSAGE_CHILDREN: ::c_int = -1; -pub const ST_RELATIME: ::c_ulong = 4096; -pub const NI_MAXHOST: ::socklen_t = 1025; - -pub const RLIMIT_NOFILE: ::c_int = 5; -pub const RLIMIT_AS: ::c_int = 6; -pub const RLIMIT_RSS: ::c_int = 7; -pub const RLIMIT_NPROC: ::c_int = 8; -pub const RLIMIT_MEMLOCK: ::c_int = 9; -pub const RLIMIT_NLIMITS: ::c_int = 16; -pub const RLIM_INFINITY: ::rlim_t = 0x7fffffff; - -pub const O_APPEND: ::c_int = 8; -pub const O_CREAT: ::c_int = 256; -pub const O_EXCL: ::c_int = 1024; -pub const O_NOCTTY: ::c_int = 2048; -pub const O_NONBLOCK: ::c_int = 128; -pub const O_SYNC: ::c_int = 0x4010; -pub const O_RSYNC: ::c_int = 0x4010; -pub const O_DSYNC: ::c_int = 0x10; -pub const O_FSYNC: ::c_int = 0x4010; -pub const O_ASYNC: ::c_int = 0x1000; -pub const O_NDELAY: ::c_int = 0x80; - -pub const SOCK_NONBLOCK: ::c_int = 128; - -pub const EDEADLK: ::c_int = 45; -pub const ENAMETOOLONG: ::c_int = 78; -pub const ENOLCK: ::c_int = 46; -pub const ENOSYS: ::c_int = 89; -pub const ENOTEMPTY: ::c_int = 93; -pub const ELOOP: ::c_int = 90; -pub const ENOMSG: ::c_int = 35; -pub const EIDRM: ::c_int = 36; -pub const ECHRNG: ::c_int = 37; -pub const EL2NSYNC: ::c_int = 38; -pub const EL3HLT: ::c_int = 39; -pub const EL3RST: ::c_int = 40; -pub const ELNRNG: ::c_int = 41; -pub const EUNATCH: ::c_int = 42; -pub const ENOCSI: ::c_int = 43; -pub const EL2HLT: ::c_int = 44; -pub const EBADE: ::c_int = 50; -pub const EBADR: ::c_int = 51; -pub const EXFULL: ::c_int = 52; -pub const ENOANO: ::c_int = 53; -pub const EBADRQC: ::c_int = 54; -pub const EBADSLT: ::c_int = 55; -pub const EDEADLOCK: ::c_int = 56; -pub const EMULTIHOP: ::c_int = 74; -pub const EOVERFLOW: ::c_int = 79; -pub const ENOTUNIQ: ::c_int = 80; -pub const EBADFD: ::c_int = 81; -pub const EBADMSG: ::c_int = 77; -pub const EREMCHG: ::c_int = 82; -pub const ELIBACC: ::c_int = 83; -pub const ELIBBAD: ::c_int = 84; -pub const ELIBSCN: ::c_int = 85; -pub const ELIBMAX: ::c_int = 86; -pub const ELIBEXEC: ::c_int = 87; -pub const EILSEQ: ::c_int = 88; -pub const ERESTART: ::c_int = 91; -pub const ESTRPIPE: ::c_int = 92; -pub const EUSERS: ::c_int = 94; -pub const ENOTSOCK: ::c_int = 95; -pub const EDESTADDRREQ: ::c_int = 96; -pub const EMSGSIZE: ::c_int = 97; -pub const EPROTOTYPE: ::c_int = 98; -pub const ENOPROTOOPT: ::c_int = 99; -pub const EPROTONOSUPPORT: ::c_int = 120; -pub const ESOCKTNOSUPPORT: ::c_int = 121; -pub const EOPNOTSUPP: ::c_int = 122; -pub const EPFNOSUPPORT: ::c_int = 123; -pub const EAFNOSUPPORT: ::c_int = 124; -pub const EADDRINUSE: ::c_int = 125; -pub const EADDRNOTAVAIL: ::c_int = 126; -pub const ENETDOWN: ::c_int = 127; -pub const ENETUNREACH: ::c_int = 128; -pub const ENETRESET: ::c_int = 129; -pub const ECONNABORTED: ::c_int = 130; -pub const ECONNRESET: ::c_int = 131; -pub const ENOBUFS: ::c_int = 132; -pub const EISCONN: ::c_int = 133; -pub const ENOTCONN: ::c_int = 134; -pub const ESHUTDOWN: ::c_int = 143; -pub const ETOOMANYREFS: ::c_int = 144; -pub const ETIMEDOUT: ::c_int = 145; -pub const ECONNREFUSED: ::c_int = 146; -pub const EHOSTDOWN: ::c_int = 147; -pub const EHOSTUNREACH: ::c_int = 148; -pub const EALREADY: ::c_int = 149; -pub const EINPROGRESS: ::c_int = 150; -pub const ESTALE: ::c_int = 151; -pub const EUCLEAN: ::c_int = 135; -pub const ENOTNAM: ::c_int = 137; -pub const ENAVAIL: ::c_int = 138; -pub const EISNAM: ::c_int = 139; -pub const EREMOTEIO: ::c_int = 140; -pub const EDQUOT: ::c_int = 1133; -pub const ENOMEDIUM: ::c_int = 159; -pub const EMEDIUMTYPE: ::c_int = 160; -pub const ECANCELED: ::c_int = 158; -pub const ENOKEY: ::c_int = 161; -pub const EKEYEXPIRED: ::c_int = 162; -pub const EKEYREVOKED: ::c_int = 163; -pub const EKEYREJECTED: ::c_int = 164; -pub const EOWNERDEAD: ::c_int = 165; -pub const ENOTRECOVERABLE: ::c_int = 166; -pub const ERFKILL: ::c_int = 167; - -pub const MAP_NORESERVE: ::c_int = 0x400; -pub const MAP_ANON: ::c_int = 0x800; -pub const MAP_ANONYMOUS: ::c_int = 0x800; -pub const MAP_GROWSDOWN: ::c_int = 0x1000; -pub const MAP_DENYWRITE: ::c_int = 0x2000; -pub const MAP_EXECUTABLE: ::c_int = 0x4000; -pub const MAP_LOCKED: ::c_int = 0x8000; -pub const MAP_POPULATE: ::c_int = 0x10000; -pub const MAP_NONBLOCK: ::c_int = 0x20000; - -pub const SOCK_STREAM: ::c_int = 2; -pub const SOCK_DGRAM: ::c_int = 1; - -pub const SOL_SOCKET: ::c_int = 0xffff; - -pub const SO_REUSEADDR: ::c_int = 4; -pub const SO_TYPE: ::c_int = 4104; -pub const SO_ERROR: ::c_int = 4103; -pub const SO_DONTROUTE: ::c_int = 16; -pub const SO_BROADCAST: ::c_int = 32; -pub const SO_SNDBUF: ::c_int = 4097; -pub const SO_RCVBUF: ::c_int = 4098; -pub const SO_KEEPALIVE: ::c_int = 8; -pub const SO_OOBINLINE: ::c_int = 256; -pub const SO_LINGER: ::c_int = 128; -pub const SO_RCVLOWAT: ::c_int = 4100; -pub const SO_SNDLOWAT: ::c_int = 4099; -pub const SO_RCVTIMEO: ::c_int = 4102; -pub const SO_SNDTIMEO: ::c_int = 4101; -pub const SO_ACCEPTCONN: ::c_int = 4105; - -pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 24; -pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 32; -pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4; - -pub const FIOCLEX: ::c_ulong = 0x6601; -pub const FIONBIO: ::c_ulong = 0x667e; - -pub const SA_ONSTACK: ::c_int = 0x08000000; -pub const SA_SIGINFO: ::c_int = 0x00000008; -pub const SA_NOCLDWAIT: ::c_int = 0x00010000; - -pub const SIGCHLD: ::c_int = 18; -pub const SIGBUS: ::c_int = 10; -pub const SIGTTIN: ::c_int = 26; -pub const SIGTTOU: ::c_int = 27; -pub const SIGXCPU: ::c_int = 30; -pub const SIGXFSZ: ::c_int = 31; -pub const SIGVTALRM: ::c_int = 28; -pub const SIGPROF: ::c_int = 29; -pub const SIGWINCH: ::c_int = 20; -pub const SIGUSR1: ::c_int = 16; -pub const SIGUSR2: ::c_int = 17; -pub const SIGCONT: ::c_int = 25; -pub const SIGSTOP: ::c_int = 23; -pub const SIGTSTP: ::c_int = 24; -pub const SIGURG: ::c_int = 21; -pub const SIGIO: ::c_int = 22; -pub const SIGSYS: ::c_int = 12; -pub const SIGPOLL: ::c_int = 22; -pub const SIGPWR: ::c_int = 19; -pub const SIG_SETMASK: ::c_int = 3; -pub const SIG_BLOCK: ::c_int = 0x1; -pub const SIG_UNBLOCK: ::c_int = 0x2; - -pub const PTHREAD_STACK_MIN: ::size_t = 131072; - -pub const ADFS_SUPER_MAGIC: ::c_long = 0x0000adf5; -pub const AFFS_SUPER_MAGIC: ::c_long = 0x0000adff; -pub const CODA_SUPER_MAGIC: ::c_long = 0x73757245; -pub const CRAMFS_MAGIC: ::c_long = 0x28cd3d45; -pub const EFS_SUPER_MAGIC: ::c_long = 0x00414a53; -pub const EXT2_SUPER_MAGIC: ::c_long = 0x0000ef53; -pub const EXT3_SUPER_MAGIC: ::c_long = 0x0000ef53; -pub const EXT4_SUPER_MAGIC: ::c_long = 0x0000ef53; -pub const HPFS_SUPER_MAGIC: ::c_long = 0xf995e849; -pub const HUGETLBFS_MAGIC: ::c_long = 0x958458f6; -pub const ISOFS_SUPER_MAGIC: ::c_long = 0x00009660; -pub const JFFS2_SUPER_MAGIC: ::c_long = 0x000072b6; -pub const MINIX_SUPER_MAGIC: ::c_long = 0x0000137f; -pub const MINIX_SUPER_MAGIC2: ::c_long = 0x0000138f; -pub const MINIX2_SUPER_MAGIC: ::c_long = 0x00002468; -pub const MINIX2_SUPER_MAGIC2: ::c_long = 0x00002478; -pub const MSDOS_SUPER_MAGIC: ::c_long = 0x00004d44; -pub const NCP_SUPER_MAGIC: ::c_long = 0x0000564c; -pub const NFS_SUPER_MAGIC: ::c_long = 0x00006969; -pub const OPENPROM_SUPER_MAGIC: ::c_long = 0x00009fa1; -pub const PROC_SUPER_MAGIC: ::c_long = 0x00009fa0; -pub const QNX4_SUPER_MAGIC: ::c_long = 0x0000002f; -pub const REISERFS_SUPER_MAGIC: ::c_long = 0x52654973; -pub const SMB_SUPER_MAGIC: ::c_long = 0x0000517b; -pub const TMPFS_MAGIC: ::c_long = 0x01021994; -pub const USBDEVICE_SUPER_MAGIC: ::c_long = 0x00009fa2; - -pub const VEOF: usize = 16; -pub const VEOL: usize = 17; -pub const VEOL2: usize = 6; -pub const VMIN: usize = 4; -pub const IEXTEN: ::tcflag_t = 0x00000100; -pub const TOSTOP: ::tcflag_t = 0x00008000; -pub const FLUSHO: ::tcflag_t = 0x00002000; -pub const IUTF8: ::tcflag_t = 0x00004000; -pub const TCSANOW: ::c_int = 0x540e; -pub const TCSADRAIN: ::c_int = 0x540f; -pub const TCSAFLUSH: ::c_int = 0x5410; - -pub const CPU_SETSIZE: ::c_int = 0x400; - -pub const PTRACE_TRACEME: ::c_uint = 0; -pub const PTRACE_PEEKTEXT: ::c_uint = 1; -pub const PTRACE_PEEKDATA: ::c_uint = 2; -pub const PTRACE_PEEKUSER: ::c_uint = 3; -pub const PTRACE_POKETEXT: ::c_uint = 4; -pub const PTRACE_POKEDATA: ::c_uint = 5; -pub const PTRACE_POKEUSER: ::c_uint = 6; -pub const PTRACE_CONT: ::c_uint = 7; -pub const PTRACE_KILL: ::c_uint = 8; -pub const PTRACE_SINGLESTEP: ::c_uint = 9; -pub const PTRACE_ATTACH: ::c_uint = 16; -pub const PTRACE_DETACH: ::c_uint = 17; -pub const PTRACE_SYSCALL: ::c_uint = 24; -pub const PTRACE_SETOPTIONS: ::c_uint = 0x4200; -pub const PTRACE_GETEVENTMSG: ::c_uint = 0x4201; -pub const PTRACE_GETSIGINFO: ::c_uint = 0x4202; -pub const PTRACE_SETSIGINFO: ::c_uint = 0x4203; -pub const PTRACE_GETFPREGS: ::c_uint = 14; -pub const PTRACE_SETFPREGS: ::c_uint = 15; -pub const PTRACE_GETFPXREGS: ::c_uint = 18; -pub const PTRACE_SETFPXREGS: ::c_uint = 19; -pub const PTRACE_GETREGS: ::c_uint = 12; -pub const PTRACE_SETREGS: ::c_uint = 13; - -pub const EFD_NONBLOCK: ::c_int = 0x80; - -pub const F_GETLK: ::c_int = 14; -pub const F_GETOWN: ::c_int = 23; -pub const F_SETOWN: ::c_int = 24; -pub const F_SETLK: ::c_int = 6; -pub const F_SETLKW: ::c_int = 7; - -pub const SFD_NONBLOCK: ::c_int = 0x80; - -pub const TCGETS: ::c_ulong = 0x540d; -pub const TCSETS: ::c_ulong = 0x540e; -pub const TCSETSW: ::c_ulong = 0x540f; -pub const TCSETSF: ::c_ulong = 0x5410; -pub const TCGETA: ::c_ulong = 0x5401; -pub const TCSETA: ::c_ulong = 0x5402; -pub const TCSETAW: ::c_ulong = 0x5403; -pub const TCSETAF: ::c_ulong = 0x5404; -pub const TCSBRK: ::c_ulong = 0x5405; -pub const TCXONC: ::c_ulong = 0x5406; -pub const TCFLSH: ::c_ulong = 0x5407; -pub const TIOCGSOFTCAR: ::c_ulong = 0x5481; -pub const TIOCSSOFTCAR: ::c_ulong = 0x5482; -pub const TIOCINQ: ::c_ulong = 0x467f; -pub const TIOCLINUX: ::c_ulong = 0x5483; -pub const TIOCGSERIAL: ::c_ulong = 0x5484; -pub const TIOCEXCL: ::c_ulong = 0x740d; -pub const TIOCNXCL: ::c_ulong = 0x740e; -pub const TIOCSCTTY: ::c_ulong = 0x5480; -pub const TIOCGPGRP: ::c_ulong = 0x40047477; -pub const TIOCSPGRP: ::c_ulong = 0x80047476; -pub const TIOCOUTQ: ::c_ulong = 0x7472; -pub const TIOCSTI: ::c_ulong = 0x5472; -pub const TIOCGWINSZ: ::c_ulong = 0x40087468; -pub const TIOCSWINSZ: ::c_ulong = 0x80087467; -pub const TIOCMGET: ::c_ulong = 0x741d; -pub const TIOCMBIS: ::c_ulong = 0x741b; -pub const TIOCMBIC: ::c_ulong = 0x741c; -pub const TIOCMSET: ::c_ulong = 0x741a; -pub const FIONREAD: ::c_ulong = 0x467f; -pub const TIOCCONS: ::c_ulong = 0x80047478; - -pub const RTLD_DEEPBIND: ::c_int = 0x10; -pub const RTLD_GLOBAL: ::c_int = 0x4; -pub const RTLD_NOLOAD: ::c_int = 0x8; - -extern { - pub fn sysctl(name: *mut ::c_int, - namelen: ::c_int, - oldp: *mut ::c_void, - oldlenp: *mut ::size_t, - newp: *mut ::c_void, - newlen: ::size_t) - -> ::c_int; - pub fn ioctl(fd: ::c_int, request: ::c_ulong, ...) -> ::c_int; - pub fn backtrace(buf: *mut *mut ::c_void, - sz: ::c_int) -> ::c_int; - pub fn glob64(pattern: *const ::c_char, - flags: ::c_int, - errfunc: ::dox::Option ::c_int>, - pglob: *mut glob64_t) -> ::c_int; - pub fn globfree64(pglob: *mut glob64_t); - pub fn getnameinfo(sa: *const ::sockaddr, - salen: ::socklen_t, - host: *mut ::c_char, - hostlen: ::socklen_t, - serv: *mut ::c_char, - sevlen: ::socklen_t, - flags: ::c_int) -> ::c_int; - pub fn eventfd(init: ::c_uint, flags: ::c_int) -> ::c_int; - pub fn ptrace(request: ::c_uint, ...) -> ::c_long; - pub fn pthread_attr_getaffinity_np(attr: *const ::pthread_attr_t, - cpusetsize: ::size_t, - cpuset: *mut ::cpu_set_t) -> ::c_int; - pub fn pthread_attr_setaffinity_np(attr: *mut ::pthread_attr_t, - cpusetsize: ::size_t, - cpuset: *const ::cpu_set_t) -> ::c_int; -} diff --git a/deps/libc-0.2.7/src/unix/notbsd/linux/mod.rs b/deps/libc-0.2.7/src/unix/notbsd/linux/mod.rs deleted file mode 100644 index 5a392c02e..000000000 --- a/deps/libc-0.2.7/src/unix/notbsd/linux/mod.rs +++ /dev/null @@ -1,561 +0,0 @@ -//! Linux-specific definitions for linux-like values - -use dox::mem; - -pub type useconds_t = u32; -pub type dev_t = u64; -pub type socklen_t = u32; -pub type pthread_t = c_ulong; -pub type mode_t = u32; -pub type ino64_t = u64; -pub type off64_t = i64; -pub type blkcnt64_t = i64; -pub type rlim64_t = u64; -pub type key_t = ::c_int; -pub type shmatt_t = ::c_ulong; -pub type mqd_t = ::c_int; -pub type nfds_t = ::c_ulong; - -pub enum fpos64_t {} // TODO: fill this out with a struct - -s! { - pub struct dirent { - pub d_ino: ::ino_t, - pub d_off: ::off_t, - pub d_reclen: ::c_ushort, - pub d_type: ::c_uchar, - pub d_name: [::c_char; 256], - } - - pub struct dirent64 { - pub d_ino: ::ino64_t, - pub d_off: ::off64_t, - pub d_reclen: ::c_ushort, - pub d_type: ::c_uchar, - pub d_name: [::c_char; 256], - } - - pub struct rlimit64 { - pub rlim_cur: rlim64_t, - pub rlim_max: rlim64_t, - } - - pub struct glob_t { - pub gl_pathc: ::size_t, - pub gl_pathv: *mut *mut c_char, - pub gl_offs: ::size_t, - pub gl_flags: ::c_int, - - __unused1: *mut ::c_void, - __unused2: *mut ::c_void, - __unused3: *mut ::c_void, - __unused4: *mut ::c_void, - __unused5: *mut ::c_void, - } - - pub struct ifaddrs { - pub ifa_next: *mut ifaddrs, - pub ifa_name: *mut c_char, - pub ifa_flags: ::c_uint, - pub ifa_addr: *mut ::sockaddr, - pub ifa_netmask: *mut ::sockaddr, - pub ifa_ifu: *mut ::sockaddr, // FIXME This should be a union - pub ifa_data: *mut ::c_void - } - - pub struct pthread_mutex_t { - #[cfg(any(target_arch = "mips", target_arch = "mipsel", - target_arch = "arm"))] - __align: [::c_long; 0], - #[cfg(not(any(target_arch = "mips", target_arch = "mipsel", - target_arch = "arm")))] - __align: [::c_longlong; 0], - size: [u8; __SIZEOF_PTHREAD_MUTEX_T], - } - - pub struct pthread_rwlock_t { - #[cfg(any(target_arch = "mips", target_arch = "mipsel", - target_arch = "arm"))] - __align: [::c_long; 0], - #[cfg(not(any(target_arch = "mips", target_arch = "mipsel", - target_arch = "arm")))] - __align: [::c_longlong; 0], - size: [u8; __SIZEOF_PTHREAD_RWLOCK_T], - } - - pub struct pthread_mutexattr_t { - #[cfg(any(target_arch = "x86_64", target_arch = "powerpc64", - target_arch = "powerpc64le"))] - __align: [::c_int; 0], - #[cfg(not(any(target_arch = "x86_64", target_arch = "powerpc64", - target_arch = "powerpc64le")))] - __align: [::c_long; 0], - size: [u8; __SIZEOF_PTHREAD_MUTEXATTR_T], - } - - pub struct pthread_cond_t { - #[cfg(target_env = "musl")] - __align: [*const ::c_void; 0], - #[cfg(not(target_env = "musl"))] - __align: [::c_longlong; 0], - size: [u8; __SIZEOF_PTHREAD_COND_T], - } - - pub struct passwd { - pub pw_name: *mut ::c_char, - pub pw_passwd: *mut ::c_char, - pub pw_uid: ::uid_t, - pub pw_gid: ::gid_t, - pub pw_gecos: *mut ::c_char, - pub pw_dir: *mut ::c_char, - pub pw_shell: *mut ::c_char, - } - - pub struct statvfs { - pub f_bsize: ::c_ulong, - pub f_frsize: ::c_ulong, - pub f_blocks: ::fsblkcnt_t, - pub f_bfree: ::fsblkcnt_t, - pub f_bavail: ::fsblkcnt_t, - pub f_files: ::fsfilcnt_t, - pub f_ffree: ::fsfilcnt_t, - pub f_favail: ::fsfilcnt_t, - pub f_fsid: ::c_ulong, - #[cfg(target_pointer_width = "32")] - pub __f_unused: ::c_int, - pub f_flag: ::c_ulong, - pub f_namemax: ::c_ulong, - __f_spare: [::c_int; 6], - } - - pub struct sockaddr_nl { - pub nl_family: ::sa_family_t, - nl_pad: ::c_ushort, - pub nl_pid: u32, - pub nl_groups: u32 - } - - pub struct dqblk { - pub dqb_bhardlimit: ::uint64_t, - pub dqb_bsoftlimit: ::uint64_t, - pub dqb_curspace: ::uint64_t, - pub dqb_ihardlimit: ::uint64_t, - pub dqb_isoftlimit: ::uint64_t, - pub dqb_curinodes: ::uint64_t, - pub dqb_btime: ::uint64_t, - pub dqb_itime: ::uint64_t, - pub dqb_valid: ::uint32_t, - } - - pub struct signalfd_siginfo { - pub ssi_signo: ::uint32_t, - pub ssi_errno: ::int32_t, - pub ssi_code: ::int32_t, - pub ssi_pid: ::uint32_t, - pub ssi_uid: ::uint32_t, - pub ssi_fd: ::int32_t, - pub ssi_tid: ::uint32_t, - pub ssi_band: ::uint32_t, - pub ssi_overrun: ::uint32_t, - pub ssi_trapno: ::uint32_t, - pub ssi_status: ::int32_t, - pub ssi_int: ::int32_t, - pub ssi_ptr: ::uint64_t, - pub ssi_utime: ::uint64_t, - pub ssi_stime: ::uint64_t, - pub ssi_addr: ::uint64_t, - _pad: [::uint8_t; 48], - } - - pub struct fsid_t { - __val: [::c_int; 2], - } - - pub struct mq_attr { - pub mq_flags: ::c_long, - pub mq_maxmsg: ::c_long, - pub mq_msgsize: ::c_long, - pub mq_curmsgs: ::c_long, - pad: [::c_long; 4] - } - - pub struct cpu_set_t { - #[cfg(target_pointer_width = "32")] - bits: [u32; 32], - #[cfg(target_pointer_width = "64")] - bits: [u64; 16], - } -} - -f! { - pub fn CPU_ZERO(cpuset: &mut cpu_set_t) -> () { - for slot in cpuset.bits.iter_mut() { - *slot = 0; - } - } - - pub fn CPU_SET(cpu: usize, cpuset: &mut cpu_set_t) -> () { - let size = mem::size_of_val(&cpuset.bits[0]); - let (idx, offset) = (cpu / size, cpu % size); - cpuset.bits[idx] |= 1 << offset; - () - } - - pub fn CPU_ISSET(cpu: usize, cpuset: &cpu_set_t) -> bool { - let size = mem::size_of_val(&cpuset.bits[0]); - let (idx, offset) = (cpu / size, cpu % size); - 0 != (cpuset.bits[idx] & (1 << offset)) - } - - pub fn CPU_EQUAL(set1: &cpu_set_t, set2: &cpu_set_t) -> bool { - set1.bits == set2.bits - } -} - -pub const FILENAME_MAX: ::c_uint = 4096; -pub const L_tmpnam: ::c_uint = 20; -pub const _PC_NAME_MAX: ::c_int = 3; - -pub const _SC_ARG_MAX: ::c_int = 0; -pub const _SC_CHILD_MAX: ::c_int = 1; -pub const _SC_CLK_TCK: ::c_int = 2; -pub const _SC_NGROUPS_MAX: ::c_int = 3; -pub const _SC_OPEN_MAX: ::c_int = 4; -pub const _SC_STREAM_MAX: ::c_int = 5; -pub const _SC_TZNAME_MAX: ::c_int = 6; -pub const _SC_JOB_CONTROL: ::c_int = 7; -pub const _SC_SAVED_IDS: ::c_int = 8; -pub const _SC_REALTIME_SIGNALS: ::c_int = 9; -pub const _SC_PRIORITY_SCHEDULING: ::c_int = 10; -pub const _SC_TIMERS: ::c_int = 11; -pub const _SC_ASYNCHRONOUS_IO: ::c_int = 12; -pub const _SC_PRIORITIZED_IO: ::c_int = 13; -pub const _SC_SYNCHRONIZED_IO: ::c_int = 14; -pub const _SC_FSYNC: ::c_int = 15; -pub const _SC_MAPPED_FILES: ::c_int = 16; -pub const _SC_MEMLOCK: ::c_int = 17; -pub const _SC_MEMLOCK_RANGE: ::c_int = 18; -pub const _SC_MEMORY_PROTECTION: ::c_int = 19; -pub const _SC_MESSAGE_PASSING: ::c_int = 20; -pub const _SC_SEMAPHORES: ::c_int = 21; -pub const _SC_SHARED_MEMORY_OBJECTS: ::c_int = 22; -pub const _SC_AIO_LISTIO_MAX: ::c_int = 23; -pub const _SC_AIO_MAX: ::c_int = 24; -pub const _SC_AIO_PRIO_DELTA_MAX: ::c_int = 25; -pub const _SC_DELAYTIMER_MAX: ::c_int = 26; -pub const _SC_MQ_OPEN_MAX: ::c_int = 27; -pub const _SC_MQ_PRIO_MAX: ::c_int = 28; -pub const _SC_VERSION: ::c_int = 29; -pub const _SC_PAGESIZE: ::c_int = 30; -pub const _SC_PAGE_SIZE: ::c_int = _SC_PAGESIZE; -pub const _SC_RTSIG_MAX: ::c_int = 31; -pub const _SC_SEM_NSEMS_MAX: ::c_int = 32; -pub const _SC_SEM_VALUE_MAX: ::c_int = 33; -pub const _SC_SIGQUEUE_MAX: ::c_int = 34; -pub const _SC_TIMER_MAX: ::c_int = 35; -pub const _SC_BC_BASE_MAX: ::c_int = 36; -pub const _SC_BC_DIM_MAX: ::c_int = 37; -pub const _SC_BC_SCALE_MAX: ::c_int = 38; -pub const _SC_BC_STRING_MAX: ::c_int = 39; -pub const _SC_COLL_WEIGHTS_MAX: ::c_int = 40; -pub const _SC_EXPR_NEST_MAX: ::c_int = 42; -pub const _SC_LINE_MAX: ::c_int = 43; -pub const _SC_RE_DUP_MAX: ::c_int = 44; -pub const _SC_2_VERSION: ::c_int = 46; -pub const _SC_2_C_BIND: ::c_int = 47; -pub const _SC_2_C_DEV: ::c_int = 48; -pub const _SC_2_FORT_DEV: ::c_int = 49; -pub const _SC_2_FORT_RUN: ::c_int = 50; -pub const _SC_2_SW_DEV: ::c_int = 51; -pub const _SC_2_LOCALEDEF: ::c_int = 52; -pub const _SC_IOV_MAX: ::c_int = 60; -pub const _SC_THREADS: ::c_int = 67; -pub const _SC_THREAD_SAFE_FUNCTIONS: ::c_int = 68; -pub const _SC_GETGR_R_SIZE_MAX: ::c_int = 69; -pub const _SC_GETPW_R_SIZE_MAX: ::c_int = 70; -pub const _SC_LOGIN_NAME_MAX: ::c_int = 71; -pub const _SC_TTY_NAME_MAX: ::c_int = 72; -pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: ::c_int = 73; -pub const _SC_THREAD_KEYS_MAX: ::c_int = 74; -pub const _SC_THREAD_STACK_MIN: ::c_int = 75; -pub const _SC_THREAD_THREADS_MAX: ::c_int = 76; -pub const _SC_THREAD_ATTR_STACKADDR: ::c_int = 77; -pub const _SC_THREAD_ATTR_STACKSIZE: ::c_int = 78; -pub const _SC_THREAD_PRIORITY_SCHEDULING: ::c_int = 79; -pub const _SC_THREAD_PRIO_INHERIT: ::c_int = 80; -pub const _SC_THREAD_PRIO_PROTECT: ::c_int = 81; -pub const _SC_NPROCESSORS_ONLN: ::c_int = 84; -pub const _SC_ATEXIT_MAX: ::c_int = 87; -pub const _SC_XOPEN_VERSION: ::c_int = 89; -pub const _SC_XOPEN_XCU_VERSION: ::c_int = 90; -pub const _SC_XOPEN_UNIX: ::c_int = 91; -pub const _SC_XOPEN_CRYPT: ::c_int = 92; -pub const _SC_XOPEN_ENH_I18N: ::c_int = 93; -pub const _SC_XOPEN_SHM: ::c_int = 94; -pub const _SC_2_CHAR_TERM: ::c_int = 95; -pub const _SC_2_UPE: ::c_int = 97; -pub const _SC_XBS5_ILP32_OFF32: ::c_int = 125; -pub const _SC_XBS5_ILP32_OFFBIG: ::c_int = 126; -pub const _SC_XBS5_LPBIG_OFFBIG: ::c_int = 128; -pub const _SC_XOPEN_LEGACY: ::c_int = 129; -pub const _SC_XOPEN_REALTIME: ::c_int = 130; -pub const _SC_XOPEN_REALTIME_THREADS: ::c_int = 131; - -pub const RLIM_SAVED_MAX: ::rlim_t = RLIM_INFINITY; -pub const RLIM_SAVED_CUR: ::rlim_t = RLIM_INFINITY; - -pub const GLOB_ERR: ::c_int = 1 << 0; -pub const GLOB_MARK: ::c_int = 1 << 1; -pub const GLOB_NOSORT: ::c_int = 1 << 2; -pub const GLOB_DOOFFS: ::c_int = 1 << 3; -pub const GLOB_NOCHECK: ::c_int = 1 << 4; -pub const GLOB_APPEND: ::c_int = 1 << 5; -pub const GLOB_NOESCAPE: ::c_int = 1 << 6; - -pub const GLOB_NOSPACE: ::c_int = 1; -pub const GLOB_ABORTED: ::c_int = 2; -pub const GLOB_NOMATCH: ::c_int = 3; - -pub const POSIX_MADV_NORMAL: ::c_int = 0; -pub const POSIX_MADV_RANDOM: ::c_int = 1; -pub const POSIX_MADV_SEQUENTIAL: ::c_int = 2; -pub const POSIX_MADV_WILLNEED: ::c_int = 3; - -pub const S_IEXEC: mode_t = 64; -pub const S_IWRITE: mode_t = 128; -pub const S_IREAD: mode_t = 256; - -pub const F_LOCK: ::c_int = 1; -pub const F_TEST: ::c_int = 3; -pub const F_TLOCK: ::c_int = 2; -pub const F_ULOCK: ::c_int = 0; - -pub const ST_RDONLY: ::c_ulong = 1; -pub const ST_NOSUID: ::c_ulong = 2; -pub const ST_NODEV: ::c_ulong = 4; -pub const ST_NOEXEC: ::c_ulong = 8; -pub const ST_SYNCHRONOUS: ::c_ulong = 16; -pub const ST_MANDLOCK: ::c_ulong = 64; -pub const ST_WRITE: ::c_ulong = 128; -pub const ST_APPEND: ::c_ulong = 256; -pub const ST_IMMUTABLE: ::c_ulong = 512; -pub const ST_NOATIME: ::c_ulong = 1024; -pub const ST_NODIRATIME: ::c_ulong = 2048; - -pub const RTLD_NEXT: *mut ::c_void = -1i64 as *mut ::c_void; -pub const RTLD_DEFAULT: *mut ::c_void = 0i64 as *mut ::c_void; -pub const RTLD_NODELETE: ::c_int = 0x1000; -pub const RTLD_NOW: ::c_int = 0x2; - -#[cfg(any(target_arch = "x86", target_arch = "x86_64"))] -pub const MAP_32BIT: ::c_int = 0x0040; - -pub const TCP_MD5SIG: ::c_int = 14; - -pub const F_DUPFD_CLOEXEC: ::c_int = 1030; - -pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t { - __align: [], - size: [0; __SIZEOF_PTHREAD_MUTEX_T], -}; -pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = pthread_cond_t { - __align: [], - size: [0; __SIZEOF_PTHREAD_COND_T], -}; -pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t { - __align: [], - size: [0; __SIZEOF_PTHREAD_RWLOCK_T], -}; -pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 1; -pub const __SIZEOF_PTHREAD_COND_T: usize = 48; - -pub const SCHED_OTHER: ::c_int = 0; -pub const SCHED_FIFO: ::c_int = 1; -pub const SCHED_RR: ::c_int = 2; -pub const SCHED_BATCH: ::c_int = 3; -pub const SCHED_IDLE: ::c_int = 5; - -pub const IPC_CREAT: ::c_int = 0o1000; -pub const IPC_EXCL: ::c_int = 0o2000; -pub const IPC_NOWAIT: ::c_int = 0o4000; - -pub const IPC_RMID: ::c_int = 0; -pub const IPC_SET: ::c_int = 1; -pub const IPC_STAT: ::c_int = 2; -pub const IPC_INFO: ::c_int = 3; - -pub const SHM_R: ::c_int = 0o400; -pub const SHM_W: ::c_int = 0o200; - -pub const SHM_RDONLY: ::c_int = 0o10000; -pub const SHM_RND: ::c_int = 0o20000; -pub const SHM_REMAP: ::c_int = 0o40000; -pub const SHM_EXEC: ::c_int = 0o100000; - -pub const SHM_LOCK: ::c_int = 11; -pub const SHM_UNLOCK: ::c_int = 12; - -pub const SHM_HUGETLB: ::c_int = 0o4000; -pub const SHM_NORESERVE: ::c_int = 0o10000; - -pub const MS_RELATIME: ::c_ulong = 0x200000; -pub const MS_KERNMOUNT: ::c_ulong = 0x400000; -pub const MS_I_VERSION: ::c_ulong = 0x800000; -pub const MS_STRICTATIME: ::c_ulong = 0x01000000; - -pub const EPOLLRDHUP: ::c_int = 0x2000; -pub const EPOLLONESHOT: ::c_int = 0x40000000; - -pub const QFMT_VFS_OLD: ::c_int = 1; -pub const QFMT_VFS_V0: ::c_int = 2; - -pub const SFD_CLOEXEC: ::c_int = 0x080000; - -pub const EFD_SEMAPHORE: ::c_int = 0x1; - -pub const NCCS: usize = 32; - -pub const CLONE_NEWUTS: ::c_int = 0x04000000; -pub const CLONE_NEWIPC: ::c_int = 0x08000000; -pub const CLONE_NEWUSER: ::c_int = 0x10000000; -pub const CLONE_NEWPID: ::c_int = 0x20000000; -pub const CLONE_NEWNET: ::c_int = 0x40000000; -pub const CLONE_IO: ::c_int = 0x80000000; - -extern { - pub fn shm_open(name: *const c_char, oflag: ::c_int, - mode: mode_t) -> ::c_int; - pub fn shmget(key: ::key_t, size: ::size_t, shmflg: ::c_int) -> ::c_int; - pub fn shmat(shmid: ::c_int, shmaddr: *const ::c_void, shmflg: ::c_int) -> *mut ::c_void; - pub fn shmdt(shmaddr: *const ::c_void) -> ::c_int; - pub fn shmctl(shmid: ::c_int, cmd: ::c_int, buf: *mut ::shmid_ds) -> ::c_int; - pub fn mprotect(addr: *mut ::c_void, len: ::size_t, prot: ::c_int) - -> ::c_int; - pub fn __errno_location() -> *mut ::c_int; - - pub fn fopen64(filename: *const c_char, - mode: *const c_char) -> *mut ::FILE; - pub fn freopen64(filename: *const c_char, mode: *const c_char, - file: *mut ::FILE) -> *mut ::FILE; - pub fn tmpfile64() -> *mut ::FILE; - pub fn fgetpos64(stream: *mut ::FILE, ptr: *mut fpos64_t) -> ::c_int; - pub fn fsetpos64(stream: *mut ::FILE, ptr: *const fpos64_t) -> ::c_int; - pub fn fstat64(fildes: ::c_int, buf: *mut stat64) -> ::c_int; - pub fn stat64(path: *const c_char, buf: *mut stat64) -> ::c_int; - pub fn open64(path: *const c_char, oflag: ::c_int, ...) -> ::c_int; - pub fn creat64(path: *const c_char, mode: mode_t) -> ::c_int; - pub fn lseek64(fd: ::c_int, offset: off64_t, whence: ::c_int) -> off64_t; - pub fn pread64(fd: ::c_int, buf: *mut ::c_void, count: ::size_t, - offset: off64_t) -> ::ssize_t; - pub fn pwrite64(fd: ::c_int, buf: *const ::c_void, count: ::size_t, - offset: off64_t) -> ::ssize_t; - pub fn mmap64(addr: *mut ::c_void, - len: ::size_t, - prot: ::c_int, - flags: ::c_int, - fd: ::c_int, - offset: off64_t) - -> *mut ::c_void; - pub fn lstat64(path: *const c_char, buf: *mut stat64) -> ::c_int; - pub fn ftruncate64(fd: ::c_int, length: off64_t) -> ::c_int; - pub fn readdir64_r(dirp: *mut ::DIR, entry: *mut ::dirent64, - result: *mut *mut ::dirent64) -> ::c_int; - - pub fn getrlimit64(resource: ::c_int, rlim: *mut rlimit64) -> ::c_int; - pub fn setrlimit64(resource: ::c_int, rlim: *const rlimit64) -> ::c_int; - pub fn fseeko64(stream: *mut ::FILE, - offset: ::off64_t, - whence: ::c_int) -> ::c_int; - pub fn ftello64(stream: *mut ::FILE) -> ::off64_t; - pub fn fallocate(fd: ::c_int, mode: ::c_int, - offset: ::off_t, len: ::off_t) -> ::c_int; - pub fn posix_fallocate(fd: ::c_int, offset: ::off_t, - len: ::off_t) -> ::c_int; - pub fn readahead(fd: ::c_int, offset: ::off64_t, - count: ::size_t) -> ::ssize_t; - pub fn getxattr(path: *const c_char, name: *const c_char, - value: *mut ::c_void, size: ::size_t) -> ::ssize_t; - pub fn lgetxattr(path: *const c_char, name: *const c_char, - value: *mut ::c_void, size: ::size_t) -> ::ssize_t; - pub fn fgetxattr(filedes: ::c_int, name: *const c_char, - value: *mut ::c_void, size: ::size_t) -> ::ssize_t; - pub fn setxattr(path: *const c_char, name: *const c_char, - value: *const ::c_void, size: ::size_t, - flags: ::c_int) -> ::c_int; - pub fn lsetxattr(path: *const c_char, name: *const c_char, - value: *const ::c_void, size: ::size_t, - flags: ::c_int) -> ::c_int; - pub fn fsetxattr(filedes: ::c_int, name: *const c_char, - value: *const ::c_void, size: ::size_t, - flags: ::c_int) -> ::c_int; - pub fn listxattr(path: *const c_char, list: *mut c_char, - size: ::size_t) -> ::ssize_t; - pub fn llistxattr(path: *const c_char, list: *mut c_char, - size: ::size_t) -> ::ssize_t; - pub fn flistxattr(filedes: ::c_int, list: *mut c_char, - size: ::size_t) -> ::ssize_t; - pub fn removexattr(path: *const c_char, name: *const c_char) -> ::c_int; - pub fn lremovexattr(path: *const c_char, name: *const c_char) -> ::c_int; - pub fn fremovexattr(filedes: ::c_int, name: *const c_char) -> ::c_int; - pub fn signalfd(fd: ::c_int, - mask: *const ::sigset_t, - flags: ::c_int) -> ::c_int; - pub fn pwritev(fd: ::c_int, - iov: *const ::iovec, - iovcnt: ::c_int, - offset: ::off_t) -> ::ssize_t; - pub fn preadv(fd: ::c_int, - iov: *const ::iovec, - iovcnt: ::c_int, - offset: ::off_t) -> ::ssize_t; - pub fn quotactl(cmd: ::c_int, - special: *const ::c_char, - id: ::c_int, - data: *mut ::c_char) -> ::c_int; - pub fn mq_open(name: *const ::c_char, oflag: ::c_int, ...) -> ::mqd_t; - pub fn mq_close(mqd: ::mqd_t) -> ::c_int; - pub fn mq_unlink(name: *const ::c_char) -> ::c_int; - pub fn mq_receive(mqd: ::mqd_t, - msg_ptr: *mut ::c_char, - msg_len: ::size_t, - msq_prio: *mut ::c_uint) -> ::ssize_t; - pub fn mq_send(mqd: ::mqd_t, - msg_ptr: *const ::c_char, - msg_len: ::size_t, - msq_prio: ::c_uint) -> ::c_int; - pub fn mq_getattr(mqd: ::mqd_t, attr: *mut ::mq_attr) -> ::c_int; - pub fn mq_setattr(mqd: ::mqd_t, - newattr: *const ::mq_attr, - oldattr: *mut ::mq_attr) -> ::c_int; - pub fn sched_getaffinity(pid: ::pid_t, - cpusetsize: ::size_t, - cpuset: *mut cpu_set_t) -> ::c_int; - pub fn sched_setaffinity(pid: ::pid_t, - cpusetsize: ::size_t, - cpuset: *const cpu_set_t) -> ::c_int; - pub fn epoll_pwait(epfd: ::c_int, - events: *mut ::epoll_event, - maxevents: ::c_int, - timeout: ::c_int, - sigmask: *const ::sigset_t) -> ::c_int; - pub fn dup3(oldfd: ::c_int, newfd: ::c_int, flags: ::c_int) -> ::c_int; - pub fn unshare(flags: ::c_int) -> ::c_int; - pub fn sethostname(name: *const ::c_char, len: ::size_t) -> ::c_int; - pub fn setns(fd: ::c_int, nstype: ::c_int) -> ::c_int; -} - -cfg_if! { - if #[cfg(any(target_env = "musl", - target_os = "emscripten"))] { - mod musl; - pub use self::musl::*; - } else if #[cfg(any(target_arch = "mips", target_arch = "mipsel"))] { - mod mips; - pub use self::mips::*; - } else { - mod other; - pub use self::other::*; - } -} - -pub const AF_NETLINK: ::c_int = 16; diff --git a/deps/libc-0.2.7/src/unix/notbsd/linux/musl/b32/arm.rs b/deps/libc-0.2.7/src/unix/notbsd/linux/musl/b32/arm.rs deleted file mode 100644 index b59647f94..000000000 --- a/deps/libc-0.2.7/src/unix/notbsd/linux/musl/b32/arm.rs +++ /dev/null @@ -1,298 +0,0 @@ -pub type c_char = u8; -pub type wchar_t = u32; - -pub const O_DIRECT: ::c_int = 0x4000; -pub const O_DIRECTORY: ::c_int = 0x10000; -pub const O_NOFOLLOW: ::c_int = 0x20000; -pub const O_ASYNC: ::c_int = 0x2000; - -pub const FIOCLEX: ::c_int = 0x5451; -pub const FIONBIO: ::c_int = 0x5421; - -pub const RLIMIT_RSS: ::c_int = 5; -pub const RLIMIT_NOFILE: ::c_int = 7; -pub const RLIMIT_AS: ::c_int = 9; -pub const RLIMIT_NPROC: ::c_int = 6; -pub const RLIMIT_MEMLOCK: ::c_int = 8; - -pub const O_APPEND: ::c_int = 1024; -pub const O_CREAT: ::c_int = 64; -pub const O_EXCL: ::c_int = 128; -pub const O_NOCTTY: ::c_int = 256; -pub const O_NONBLOCK: ::c_int = 2048; -pub const O_SYNC: ::c_int = 1052672; -pub const O_RSYNC: ::c_int = 1052672; -pub const O_DSYNC: ::c_int = 4096; - -pub const SOCK_NONBLOCK: ::c_int = 2048; - -pub const MAP_ANON: ::c_int = 0x0020; -pub const MAP_GROWSDOWN: ::c_int = 0x0100; -pub const MAP_DENYWRITE: ::c_int = 0x0800; -pub const MAP_EXECUTABLE: ::c_int = 0x01000; -pub const MAP_LOCKED: ::c_int = 0x02000; -pub const MAP_NORESERVE: ::c_int = 0x04000; -pub const MAP_POPULATE: ::c_int = 0x08000; -pub const MAP_NONBLOCK: ::c_int = 0x010000; -pub const MAP_STACK: ::c_int = 0x020000; - -pub const SOCK_STREAM: ::c_int = 1; -pub const SOCK_DGRAM: ::c_int = 2; - -pub const SOL_SOCKET: ::c_int = 1; - -pub const EDEADLK: ::c_int = 35; -pub const ENAMETOOLONG: ::c_int = 36; -pub const ENOLCK: ::c_int = 37; -pub const ENOSYS: ::c_int = 38; -pub const ENOTEMPTY: ::c_int = 39; -pub const ELOOP: ::c_int = 40; -pub const ENOMSG: ::c_int = 42; -pub const EIDRM: ::c_int = 43; -pub const ECHRNG: ::c_int = 44; -pub const EL2NSYNC: ::c_int = 45; -pub const EL3HLT: ::c_int = 46; -pub const EL3RST: ::c_int = 47; -pub const ELNRNG: ::c_int = 48; -pub const EUNATCH: ::c_int = 49; -pub const ENOCSI: ::c_int = 50; -pub const EL2HLT: ::c_int = 51; -pub const EBADE: ::c_int = 52; -pub const EBADR: ::c_int = 53; -pub const EXFULL: ::c_int = 54; -pub const ENOANO: ::c_int = 55; -pub const EBADRQC: ::c_int = 56; -pub const EBADSLT: ::c_int = 57; -pub const EDEADLOCK: ::c_int = EDEADLK; -pub const EMULTIHOP: ::c_int = 72; -pub const EBADMSG: ::c_int = 74; -pub const EOVERFLOW: ::c_int = 75; -pub const ENOTUNIQ: ::c_int = 76; -pub const EBADFD: ::c_int = 77; -pub const EREMCHG: ::c_int = 78; -pub const ELIBACC: ::c_int = 79; -pub const ELIBBAD: ::c_int = 80; -pub const ELIBSCN: ::c_int = 81; -pub const ELIBMAX: ::c_int = 82; -pub const ELIBEXEC: ::c_int = 83; -pub const EILSEQ: ::c_int = 84; -pub const ERESTART: ::c_int = 85; -pub const ESTRPIPE: ::c_int = 86; -pub const EUSERS: ::c_int = 87; -pub const ENOTSOCK: ::c_int = 88; -pub const EDESTADDRREQ: ::c_int = 89; -pub const EMSGSIZE: ::c_int = 90; -pub const EPROTOTYPE: ::c_int = 91; -pub const ENOPROTOOPT: ::c_int = 92; -pub const EPROTONOSUPPORT: ::c_int = 93; -pub const ESOCKTNOSUPPORT: ::c_int = 94; -pub const EOPNOTSUPP: ::c_int = 95; -pub const EPFNOSUPPORT: ::c_int = 96; -pub const EAFNOSUPPORT: ::c_int = 97; -pub const EADDRINUSE: ::c_int = 98; -pub const EADDRNOTAVAIL: ::c_int = 99; -pub const ENETDOWN: ::c_int = 100; -pub const ENETUNREACH: ::c_int = 101; -pub const ENETRESET: ::c_int = 102; -pub const ECONNABORTED: ::c_int = 103; -pub const ECONNRESET: ::c_int = 104; -pub const ENOBUFS: ::c_int = 105; -pub const EISCONN: ::c_int = 106; -pub const ENOTCONN: ::c_int = 107; -pub const ESHUTDOWN: ::c_int = 108; -pub const ETOOMANYREFS: ::c_int = 109; -pub const ETIMEDOUT: ::c_int = 110; -pub const ECONNREFUSED: ::c_int = 111; -pub const EHOSTDOWN: ::c_int = 112; -pub const EHOSTUNREACH: ::c_int = 113; -pub const EALREADY: ::c_int = 114; -pub const EINPROGRESS: ::c_int = 115; -pub const ESTALE: ::c_int = 116; -pub const EUCLEAN: ::c_int = 117; -pub const ENOTNAM: ::c_int = 118; -pub const ENAVAIL: ::c_int = 119; -pub const EISNAM: ::c_int = 120; -pub const EREMOTEIO: ::c_int = 121; -pub const EDQUOT: ::c_int = 122; -pub const ENOMEDIUM: ::c_int = 123; -pub const EMEDIUMTYPE: ::c_int = 124; -pub const ECANCELED: ::c_int = 125; -pub const ENOKEY: ::c_int = 126; -pub const EKEYEXPIRED: ::c_int = 127; -pub const EKEYREVOKED: ::c_int = 128; -pub const EKEYREJECTED: ::c_int = 129; -pub const EOWNERDEAD: ::c_int = 130; -pub const ENOTRECOVERABLE: ::c_int = 131; -pub const ERFKILL: ::c_int = 132; -pub const EHWPOISON: ::c_int = 133; - -pub const SO_REUSEADDR: ::c_int = 2; -pub const SO_TYPE: ::c_int = 3; -pub const SO_ERROR: ::c_int = 4; -pub const SO_DONTROUTE: ::c_int = 5; -pub const SO_BROADCAST: ::c_int = 6; -pub const SO_SNDBUF: ::c_int = 7; -pub const SO_RCVBUF: ::c_int = 8; -pub const SO_KEEPALIVE: ::c_int = 9; -pub const SO_OOBINLINE: ::c_int = 10; -pub const SO_LINGER: ::c_int = 13; -pub const SO_REUSEPORT: ::c_int = 15; -pub const SO_RCVLOWAT: ::c_int = 18; -pub const SO_SNDLOWAT: ::c_int = 19; -pub const SO_RCVTIMEO: ::c_int = 20; -pub const SO_SNDTIMEO: ::c_int = 21; -pub const SO_ACCEPTCONN: ::c_int = 30; - -pub const SA_ONSTACK: ::c_int = 0x08000000; -pub const SA_SIGINFO: ::c_int = 0x00000004; -pub const SA_NOCLDWAIT: ::c_int = 0x00000002; - -pub const SIGCHLD: ::c_int = 17; -pub const SIGBUS: ::c_int = 7; -pub const SIGTTIN: ::c_int = 21; -pub const SIGTTOU: ::c_int = 22; -pub const SIGXCPU: ::c_int = 24; -pub const SIGXFSZ: ::c_int = 25; -pub const SIGVTALRM: ::c_int = 26; -pub const SIGPROF: ::c_int = 27; -pub const SIGWINCH: ::c_int = 28; -pub const SIGUSR1: ::c_int = 10; -pub const SIGUSR2: ::c_int = 12; -pub const SIGCONT: ::c_int = 18; -pub const SIGSTOP: ::c_int = 19; -pub const SIGTSTP: ::c_int = 20; -pub const SIGURG: ::c_int = 23; -pub const SIGIO: ::c_int = 29; -pub const SIGSYS: ::c_int = 31; -pub const SIGSTKFLT: ::c_int = 16; -pub const SIGPOLL: ::c_int = 29; -pub const SIGPWR: ::c_int = 30; -pub const SIG_SETMASK: ::c_int = 2; -pub const SIG_BLOCK: ::c_int = 0x000000; -pub const SIG_UNBLOCK: ::c_int = 0x01; - -pub const EXTPROC: ::tcflag_t = 0x00010000; - -pub const MAP_HUGETLB: ::c_int = 0x040000; - -pub const F_GETLK: ::c_int = 12; -pub const F_GETOWN: ::c_int = 9; -pub const F_SETLK: ::c_int = 13; -pub const F_SETLKW: ::c_int = 14; -pub const F_SETOWN: ::c_int = 8; - -pub const VEOF: usize = 4; -pub const VEOL: usize = 11; -pub const VEOL2: usize = 16; -pub const VMIN: usize = 6; -pub const IEXTEN: ::tcflag_t = 0x00008000; -pub const TOSTOP: ::tcflag_t = 0x00000100; -pub const FLUSHO: ::tcflag_t = 0x00001000; - -pub const TCGETS: ::c_ulong = 0x5401; -pub const TCSETS: ::c_ulong = 0x5402; -pub const TCSETSW: ::c_ulong = 0x5403; -pub const TCSETSF: ::c_ulong = 0x5404; -pub const TCGETA: ::c_ulong = 0x5405; -pub const TCSETA: ::c_ulong = 0x5406; -pub const TCSETAW: ::c_ulong = 0x5407; -pub const TCSETAF: ::c_ulong = 0x5408; -pub const TCSBRK: ::c_ulong = 0x5409; -pub const TCXONC: ::c_ulong = 0x540A; -pub const TCFLSH: ::c_ulong = 0x540B; -pub const TIOCGSOFTCAR: ::c_ulong = 0x5419; -pub const TIOCSSOFTCAR: ::c_ulong = 0x541A; -pub const TIOCLINUX: ::c_ulong = 0x541C; -pub const TIOCGSERIAL: ::c_ulong = 0x541E; -pub const TIOCEXCL: ::c_ulong = 0x540C; -pub const TIOCNXCL: ::c_ulong = 0x540D; -pub const TIOCSCTTY: ::c_ulong = 0x540E; -pub const TIOCGPGRP: ::c_ulong = 0x540F; -pub const TIOCSPGRP: ::c_ulong = 0x5410; -pub const TIOCOUTQ: ::c_ulong = 0x5411; -pub const TIOCSTI: ::c_ulong = 0x5412; -pub const TIOCGWINSZ: ::c_ulong = 0x5413; -pub const TIOCSWINSZ: ::c_ulong = 0x5414; -pub const TIOCMGET: ::c_ulong = 0x5415; -pub const TIOCMBIS: ::c_ulong = 0x5416; -pub const TIOCMBIC: ::c_ulong = 0x5417; -pub const TIOCMSET: ::c_ulong = 0x5418; -pub const FIONREAD: ::c_ulong = 0x541B; -pub const TIOCCONS: ::c_ulong = 0x541D; - -s! { - pub struct stat { - pub st_dev: ::dev_t, - __st_dev_padding: ::c_int, - __st_ino_truncated: ::c_long, - pub st_mode: ::mode_t, - pub st_nlink: ::nlink_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::dev_t, - __st_rdev_padding: ::c_int, - pub st_size: ::off_t, - pub st_blksize: ::blksize_t, - pub st_blocks: ::blkcnt_t, - pub st_atim: ::timespec, - pub st_mtim: ::timespec, - pub st_ctim: ::timespec, - pub st_ino: ::ino_t, - } - - pub struct stat64 { - pub st_dev: ::dev_t, - __st_dev_padding: ::c_int, - __st_ino_truncated: ::c_long, - pub st_mode: ::mode_t, - pub st_nlink: ::nlink_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::dev_t, - __st_rdev_padding: ::c_int, - pub st_size: ::off_t, - pub st_blksize: ::blksize_t, - pub st_blocks: ::blkcnt_t, - pub st_atim: ::timespec, - pub st_mtim: ::timespec, - pub st_ctim: ::timespec, - pub st_ino: ::ino_t, - } - - pub struct stack_t { - pub ss_sp: *mut ::c_void, - pub ss_flags: ::c_int, - pub ss_size: ::size_t - } - - pub struct shmid_ds { - pub shm_perm: ::ipc_perm, - pub shm_segsz: ::size_t, - pub shm_atime: ::time_t, - __unused1: ::c_int, - pub shm_dtime: ::time_t, - __unused2: ::c_int, - pub shm_ctime: ::time_t, - __unused3: ::c_int, - pub shm_cpid: ::pid_t, - pub shm_lpid: ::pid_t, - pub shm_nattch: ::c_ulong, - __pad1: ::c_ulong, - __pad2: ::c_ulong, - } - - pub struct statfs { - pub f_type: ::c_ulong, - pub f_bsize: ::c_ulong, - pub f_blocks: ::fsblkcnt_t, - pub f_bfree: ::fsblkcnt_t, - pub f_bavail: ::fsblkcnt_t, - pub f_files: ::fsfilcnt_t, - pub f_ffree: ::fsfilcnt_t, - pub f_fsid: ::fsid_t, - pub f_namelen: ::c_ulong, - pub f_frsize: ::c_ulong, - pub f_flags: ::c_ulong, - pub f_spare: [::c_ulong; 4], - } -} diff --git a/deps/libc-0.2.7/src/unix/notbsd/linux/musl/b32/asmjs.rs b/deps/libc-0.2.7/src/unix/notbsd/linux/musl/b32/asmjs.rs deleted file mode 100644 index b59647f94..000000000 --- a/deps/libc-0.2.7/src/unix/notbsd/linux/musl/b32/asmjs.rs +++ /dev/null @@ -1,298 +0,0 @@ -pub type c_char = u8; -pub type wchar_t = u32; - -pub const O_DIRECT: ::c_int = 0x4000; -pub const O_DIRECTORY: ::c_int = 0x10000; -pub const O_NOFOLLOW: ::c_int = 0x20000; -pub const O_ASYNC: ::c_int = 0x2000; - -pub const FIOCLEX: ::c_int = 0x5451; -pub const FIONBIO: ::c_int = 0x5421; - -pub const RLIMIT_RSS: ::c_int = 5; -pub const RLIMIT_NOFILE: ::c_int = 7; -pub const RLIMIT_AS: ::c_int = 9; -pub const RLIMIT_NPROC: ::c_int = 6; -pub const RLIMIT_MEMLOCK: ::c_int = 8; - -pub const O_APPEND: ::c_int = 1024; -pub const O_CREAT: ::c_int = 64; -pub const O_EXCL: ::c_int = 128; -pub const O_NOCTTY: ::c_int = 256; -pub const O_NONBLOCK: ::c_int = 2048; -pub const O_SYNC: ::c_int = 1052672; -pub const O_RSYNC: ::c_int = 1052672; -pub const O_DSYNC: ::c_int = 4096; - -pub const SOCK_NONBLOCK: ::c_int = 2048; - -pub const MAP_ANON: ::c_int = 0x0020; -pub const MAP_GROWSDOWN: ::c_int = 0x0100; -pub const MAP_DENYWRITE: ::c_int = 0x0800; -pub const MAP_EXECUTABLE: ::c_int = 0x01000; -pub const MAP_LOCKED: ::c_int = 0x02000; -pub const MAP_NORESERVE: ::c_int = 0x04000; -pub const MAP_POPULATE: ::c_int = 0x08000; -pub const MAP_NONBLOCK: ::c_int = 0x010000; -pub const MAP_STACK: ::c_int = 0x020000; - -pub const SOCK_STREAM: ::c_int = 1; -pub const SOCK_DGRAM: ::c_int = 2; - -pub const SOL_SOCKET: ::c_int = 1; - -pub const EDEADLK: ::c_int = 35; -pub const ENAMETOOLONG: ::c_int = 36; -pub const ENOLCK: ::c_int = 37; -pub const ENOSYS: ::c_int = 38; -pub const ENOTEMPTY: ::c_int = 39; -pub const ELOOP: ::c_int = 40; -pub const ENOMSG: ::c_int = 42; -pub const EIDRM: ::c_int = 43; -pub const ECHRNG: ::c_int = 44; -pub const EL2NSYNC: ::c_int = 45; -pub const EL3HLT: ::c_int = 46; -pub const EL3RST: ::c_int = 47; -pub const ELNRNG: ::c_int = 48; -pub const EUNATCH: ::c_int = 49; -pub const ENOCSI: ::c_int = 50; -pub const EL2HLT: ::c_int = 51; -pub const EBADE: ::c_int = 52; -pub const EBADR: ::c_int = 53; -pub const EXFULL: ::c_int = 54; -pub const ENOANO: ::c_int = 55; -pub const EBADRQC: ::c_int = 56; -pub const EBADSLT: ::c_int = 57; -pub const EDEADLOCK: ::c_int = EDEADLK; -pub const EMULTIHOP: ::c_int = 72; -pub const EBADMSG: ::c_int = 74; -pub const EOVERFLOW: ::c_int = 75; -pub const ENOTUNIQ: ::c_int = 76; -pub const EBADFD: ::c_int = 77; -pub const EREMCHG: ::c_int = 78; -pub const ELIBACC: ::c_int = 79; -pub const ELIBBAD: ::c_int = 80; -pub const ELIBSCN: ::c_int = 81; -pub const ELIBMAX: ::c_int = 82; -pub const ELIBEXEC: ::c_int = 83; -pub const EILSEQ: ::c_int = 84; -pub const ERESTART: ::c_int = 85; -pub const ESTRPIPE: ::c_int = 86; -pub const EUSERS: ::c_int = 87; -pub const ENOTSOCK: ::c_int = 88; -pub const EDESTADDRREQ: ::c_int = 89; -pub const EMSGSIZE: ::c_int = 90; -pub const EPROTOTYPE: ::c_int = 91; -pub const ENOPROTOOPT: ::c_int = 92; -pub const EPROTONOSUPPORT: ::c_int = 93; -pub const ESOCKTNOSUPPORT: ::c_int = 94; -pub const EOPNOTSUPP: ::c_int = 95; -pub const EPFNOSUPPORT: ::c_int = 96; -pub const EAFNOSUPPORT: ::c_int = 97; -pub const EADDRINUSE: ::c_int = 98; -pub const EADDRNOTAVAIL: ::c_int = 99; -pub const ENETDOWN: ::c_int = 100; -pub const ENETUNREACH: ::c_int = 101; -pub const ENETRESET: ::c_int = 102; -pub const ECONNABORTED: ::c_int = 103; -pub const ECONNRESET: ::c_int = 104; -pub const ENOBUFS: ::c_int = 105; -pub const EISCONN: ::c_int = 106; -pub const ENOTCONN: ::c_int = 107; -pub const ESHUTDOWN: ::c_int = 108; -pub const ETOOMANYREFS: ::c_int = 109; -pub const ETIMEDOUT: ::c_int = 110; -pub const ECONNREFUSED: ::c_int = 111; -pub const EHOSTDOWN: ::c_int = 112; -pub const EHOSTUNREACH: ::c_int = 113; -pub const EALREADY: ::c_int = 114; -pub const EINPROGRESS: ::c_int = 115; -pub const ESTALE: ::c_int = 116; -pub const EUCLEAN: ::c_int = 117; -pub const ENOTNAM: ::c_int = 118; -pub const ENAVAIL: ::c_int = 119; -pub const EISNAM: ::c_int = 120; -pub const EREMOTEIO: ::c_int = 121; -pub const EDQUOT: ::c_int = 122; -pub const ENOMEDIUM: ::c_int = 123; -pub const EMEDIUMTYPE: ::c_int = 124; -pub const ECANCELED: ::c_int = 125; -pub const ENOKEY: ::c_int = 126; -pub const EKEYEXPIRED: ::c_int = 127; -pub const EKEYREVOKED: ::c_int = 128; -pub const EKEYREJECTED: ::c_int = 129; -pub const EOWNERDEAD: ::c_int = 130; -pub const ENOTRECOVERABLE: ::c_int = 131; -pub const ERFKILL: ::c_int = 132; -pub const EHWPOISON: ::c_int = 133; - -pub const SO_REUSEADDR: ::c_int = 2; -pub const SO_TYPE: ::c_int = 3; -pub const SO_ERROR: ::c_int = 4; -pub const SO_DONTROUTE: ::c_int = 5; -pub const SO_BROADCAST: ::c_int = 6; -pub const SO_SNDBUF: ::c_int = 7; -pub const SO_RCVBUF: ::c_int = 8; -pub const SO_KEEPALIVE: ::c_int = 9; -pub const SO_OOBINLINE: ::c_int = 10; -pub const SO_LINGER: ::c_int = 13; -pub const SO_REUSEPORT: ::c_int = 15; -pub const SO_RCVLOWAT: ::c_int = 18; -pub const SO_SNDLOWAT: ::c_int = 19; -pub const SO_RCVTIMEO: ::c_int = 20; -pub const SO_SNDTIMEO: ::c_int = 21; -pub const SO_ACCEPTCONN: ::c_int = 30; - -pub const SA_ONSTACK: ::c_int = 0x08000000; -pub const SA_SIGINFO: ::c_int = 0x00000004; -pub const SA_NOCLDWAIT: ::c_int = 0x00000002; - -pub const SIGCHLD: ::c_int = 17; -pub const SIGBUS: ::c_int = 7; -pub const SIGTTIN: ::c_int = 21; -pub const SIGTTOU: ::c_int = 22; -pub const SIGXCPU: ::c_int = 24; -pub const SIGXFSZ: ::c_int = 25; -pub const SIGVTALRM: ::c_int = 26; -pub const SIGPROF: ::c_int = 27; -pub const SIGWINCH: ::c_int = 28; -pub const SIGUSR1: ::c_int = 10; -pub const SIGUSR2: ::c_int = 12; -pub const SIGCONT: ::c_int = 18; -pub const SIGSTOP: ::c_int = 19; -pub const SIGTSTP: ::c_int = 20; -pub const SIGURG: ::c_int = 23; -pub const SIGIO: ::c_int = 29; -pub const SIGSYS: ::c_int = 31; -pub const SIGSTKFLT: ::c_int = 16; -pub const SIGPOLL: ::c_int = 29; -pub const SIGPWR: ::c_int = 30; -pub const SIG_SETMASK: ::c_int = 2; -pub const SIG_BLOCK: ::c_int = 0x000000; -pub const SIG_UNBLOCK: ::c_int = 0x01; - -pub const EXTPROC: ::tcflag_t = 0x00010000; - -pub const MAP_HUGETLB: ::c_int = 0x040000; - -pub const F_GETLK: ::c_int = 12; -pub const F_GETOWN: ::c_int = 9; -pub const F_SETLK: ::c_int = 13; -pub const F_SETLKW: ::c_int = 14; -pub const F_SETOWN: ::c_int = 8; - -pub const VEOF: usize = 4; -pub const VEOL: usize = 11; -pub const VEOL2: usize = 16; -pub const VMIN: usize = 6; -pub const IEXTEN: ::tcflag_t = 0x00008000; -pub const TOSTOP: ::tcflag_t = 0x00000100; -pub const FLUSHO: ::tcflag_t = 0x00001000; - -pub const TCGETS: ::c_ulong = 0x5401; -pub const TCSETS: ::c_ulong = 0x5402; -pub const TCSETSW: ::c_ulong = 0x5403; -pub const TCSETSF: ::c_ulong = 0x5404; -pub const TCGETA: ::c_ulong = 0x5405; -pub const TCSETA: ::c_ulong = 0x5406; -pub const TCSETAW: ::c_ulong = 0x5407; -pub const TCSETAF: ::c_ulong = 0x5408; -pub const TCSBRK: ::c_ulong = 0x5409; -pub const TCXONC: ::c_ulong = 0x540A; -pub const TCFLSH: ::c_ulong = 0x540B; -pub const TIOCGSOFTCAR: ::c_ulong = 0x5419; -pub const TIOCSSOFTCAR: ::c_ulong = 0x541A; -pub const TIOCLINUX: ::c_ulong = 0x541C; -pub const TIOCGSERIAL: ::c_ulong = 0x541E; -pub const TIOCEXCL: ::c_ulong = 0x540C; -pub const TIOCNXCL: ::c_ulong = 0x540D; -pub const TIOCSCTTY: ::c_ulong = 0x540E; -pub const TIOCGPGRP: ::c_ulong = 0x540F; -pub const TIOCSPGRP: ::c_ulong = 0x5410; -pub const TIOCOUTQ: ::c_ulong = 0x5411; -pub const TIOCSTI: ::c_ulong = 0x5412; -pub const TIOCGWINSZ: ::c_ulong = 0x5413; -pub const TIOCSWINSZ: ::c_ulong = 0x5414; -pub const TIOCMGET: ::c_ulong = 0x5415; -pub const TIOCMBIS: ::c_ulong = 0x5416; -pub const TIOCMBIC: ::c_ulong = 0x5417; -pub const TIOCMSET: ::c_ulong = 0x5418; -pub const FIONREAD: ::c_ulong = 0x541B; -pub const TIOCCONS: ::c_ulong = 0x541D; - -s! { - pub struct stat { - pub st_dev: ::dev_t, - __st_dev_padding: ::c_int, - __st_ino_truncated: ::c_long, - pub st_mode: ::mode_t, - pub st_nlink: ::nlink_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::dev_t, - __st_rdev_padding: ::c_int, - pub st_size: ::off_t, - pub st_blksize: ::blksize_t, - pub st_blocks: ::blkcnt_t, - pub st_atim: ::timespec, - pub st_mtim: ::timespec, - pub st_ctim: ::timespec, - pub st_ino: ::ino_t, - } - - pub struct stat64 { - pub st_dev: ::dev_t, - __st_dev_padding: ::c_int, - __st_ino_truncated: ::c_long, - pub st_mode: ::mode_t, - pub st_nlink: ::nlink_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::dev_t, - __st_rdev_padding: ::c_int, - pub st_size: ::off_t, - pub st_blksize: ::blksize_t, - pub st_blocks: ::blkcnt_t, - pub st_atim: ::timespec, - pub st_mtim: ::timespec, - pub st_ctim: ::timespec, - pub st_ino: ::ino_t, - } - - pub struct stack_t { - pub ss_sp: *mut ::c_void, - pub ss_flags: ::c_int, - pub ss_size: ::size_t - } - - pub struct shmid_ds { - pub shm_perm: ::ipc_perm, - pub shm_segsz: ::size_t, - pub shm_atime: ::time_t, - __unused1: ::c_int, - pub shm_dtime: ::time_t, - __unused2: ::c_int, - pub shm_ctime: ::time_t, - __unused3: ::c_int, - pub shm_cpid: ::pid_t, - pub shm_lpid: ::pid_t, - pub shm_nattch: ::c_ulong, - __pad1: ::c_ulong, - __pad2: ::c_ulong, - } - - pub struct statfs { - pub f_type: ::c_ulong, - pub f_bsize: ::c_ulong, - pub f_blocks: ::fsblkcnt_t, - pub f_bfree: ::fsblkcnt_t, - pub f_bavail: ::fsblkcnt_t, - pub f_files: ::fsfilcnt_t, - pub f_ffree: ::fsfilcnt_t, - pub f_fsid: ::fsid_t, - pub f_namelen: ::c_ulong, - pub f_frsize: ::c_ulong, - pub f_flags: ::c_ulong, - pub f_spare: [::c_ulong; 4], - } -} diff --git a/deps/libc-0.2.7/src/unix/notbsd/linux/musl/b32/mips.rs b/deps/libc-0.2.7/src/unix/notbsd/linux/musl/b32/mips.rs deleted file mode 100644 index 806bde31b..000000000 --- a/deps/libc-0.2.7/src/unix/notbsd/linux/musl/b32/mips.rs +++ /dev/null @@ -1,303 +0,0 @@ -pub type c_char = i8; -pub type wchar_t = ::c_int; - -s! { - pub struct stat { - pub st_dev: ::dev_t, - __st_padding1: [::c_long; 2], - pub st_ino: ::ino_t, - pub st_mode: ::mode_t, - pub st_nlink: ::nlink_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::dev_t, - __st_padding2: [::c_long; 2], - pub st_size: ::off_t, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - pub st_blksize: ::blksize_t, - __st_padding3: ::c_long, - pub st_blocks: ::blkcnt_t, - __st_padding4: [::c_long; 14], - } - - pub struct stat64 { - pub st_dev: ::dev_t, - __st_padding1: [::c_long; 2], - pub st_ino: ::ino64_t, - pub st_mode: ::mode_t, - pub st_nlink: ::nlink_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::dev_t, - __st_padding2: [::c_long; 2], - pub st_size: ::off_t, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - pub st_blksize: ::blksize_t, - __st_padding3: ::c_long, - pub st_blocks: ::blkcnt64_t, - __st_padding4: [::c_long; 14], - } - - pub struct stack_t { - pub ss_sp: *mut ::c_void, - pub ss_size: ::size_t, - pub ss_flags: ::c_int, - } - - pub struct shmid_ds { - pub shm_perm: ::ipc_perm, - pub shm_segsz: ::size_t, - pub shm_atime: ::time_t, - pub shm_dtime: ::time_t, - pub shm_ctime: ::time_t, - pub shm_cpid: ::pid_t, - pub shm_lpid: ::pid_t, - pub shm_nattch: ::c_ulong, - __pad1: ::c_ulong, - __pad2: ::c_ulong, - } - - pub struct statfs { - pub f_type: ::c_ulong, - pub f_bsize: ::c_ulong, - pub f_frsize: ::c_ulong, - pub f_blocks: ::fsblkcnt_t, - pub f_bfree: ::fsblkcnt_t, - pub f_files: ::fsfilcnt_t, - pub f_ffree: ::fsfilcnt_t, - pub f_bavail: ::fsblkcnt_t, - pub f_fsid: ::fsid_t, - pub f_namelen: ::c_ulong, - pub f_flags: ::c_ulong, - pub f_spare: [::c_ulong; 5], - } -} - -pub const O_DIRECT: ::c_int = 0o100000; -pub const O_DIRECTORY: ::c_int = 0o200000; -pub const O_NOFOLLOW: ::c_int = 0o400000; -pub const O_ASYNC: ::c_int = 0o10000; - -pub const FIOCLEX: ::c_int = 0x6601; -pub const FIONBIO: ::c_int = 0x667E; - -pub const RLIMIT_RSS: ::c_int = 7; -pub const RLIMIT_NOFILE: ::c_int = 5; -pub const RLIMIT_AS: ::c_int = 6; -pub const RLIMIT_NPROC: ::c_int = 8; -pub const RLIMIT_MEMLOCK: ::c_int = 9; - -pub const O_APPEND: ::c_int = 0o010; -pub const O_CREAT: ::c_int = 0o400; -pub const O_EXCL: ::c_int = 0o2000; -pub const O_NOCTTY: ::c_int = 0o4000; -pub const O_NONBLOCK: ::c_int = 0o200; -pub const O_SYNC: ::c_int = 0o40020; -pub const O_RSYNC: ::c_int = 0o40020; -pub const O_DSYNC: ::c_int = 0o020; - -pub const SOCK_NONBLOCK: ::c_int = 0o200; - -pub const MAP_ANON: ::c_int = 0x800; -pub const MAP_GROWSDOWN: ::c_int = 0x1000; -pub const MAP_DENYWRITE: ::c_int = 0x2000; -pub const MAP_EXECUTABLE: ::c_int = 0x4000; -pub const MAP_LOCKED: ::c_int = 0x8000; -pub const MAP_NORESERVE: ::c_int = 0x0400; -pub const MAP_POPULATE: ::c_int = 0x10000; -pub const MAP_NONBLOCK: ::c_int = 0x20000; -pub const MAP_STACK: ::c_int = 0x40000; - -pub const EDEADLK: ::c_int = 45; -pub const ENAMETOOLONG: ::c_int = 78; -pub const ENOLCK: ::c_int = 46; -pub const ENOSYS: ::c_int = 89; -pub const ENOTEMPTY: ::c_int = 93; -pub const ELOOP: ::c_int = 90; -pub const ENOMSG: ::c_int = 35; -pub const EIDRM: ::c_int = 36; -pub const ECHRNG: ::c_int = 37; -pub const EL2NSYNC: ::c_int = 38; -pub const EL3HLT: ::c_int = 39; -pub const EL3RST: ::c_int = 40; -pub const ELNRNG: ::c_int = 41; -pub const EUNATCH: ::c_int = 42; -pub const ENOCSI: ::c_int = 43; -pub const EL2HLT: ::c_int = 44; -pub const EBADE: ::c_int = 50; -pub const EBADR: ::c_int = 51; -pub const EXFULL: ::c_int = 52; -pub const ENOANO: ::c_int = 53; -pub const EBADRQC: ::c_int = 54; -pub const EBADSLT: ::c_int = 55; -pub const EDEADLOCK: ::c_int = 56; -pub const EMULTIHOP: ::c_int = 74; -pub const EOVERFLOW: ::c_int = 79; -pub const ENOTUNIQ: ::c_int = 80; -pub const EBADFD: ::c_int = 81; -pub const EBADMSG: ::c_int = 77; -pub const EREMCHG: ::c_int = 82; -pub const ELIBACC: ::c_int = 83; -pub const ELIBBAD: ::c_int = 84; -pub const ELIBSCN: ::c_int = 85; -pub const ELIBMAX: ::c_int = 86; -pub const ELIBEXEC: ::c_int = 87; -pub const EILSEQ: ::c_int = 88; -pub const ERESTART: ::c_int = 91; -pub const ESTRPIPE: ::c_int = 92; -pub const EUSERS: ::c_int = 94; -pub const ENOTSOCK: ::c_int = 95; -pub const EDESTADDRREQ: ::c_int = 96; -pub const EMSGSIZE: ::c_int = 97; -pub const EPROTOTYPE: ::c_int = 98; -pub const ENOPROTOOPT: ::c_int = 99; -pub const EPROTONOSUPPORT: ::c_int = 120; -pub const ESOCKTNOSUPPORT: ::c_int = 121; -pub const EOPNOTSUPP: ::c_int = 122; -pub const EPFNOSUPPORT: ::c_int = 123; -pub const EAFNOSUPPORT: ::c_int = 124; -pub const EADDRINUSE: ::c_int = 125; -pub const EADDRNOTAVAIL: ::c_int = 126; -pub const ENETDOWN: ::c_int = 127; -pub const ENETUNREACH: ::c_int = 128; -pub const ENETRESET: ::c_int = 129; -pub const ECONNABORTED: ::c_int = 130; -pub const ECONNRESET: ::c_int = 131; -pub const ENOBUFS: ::c_int = 132; -pub const EISCONN: ::c_int = 133; -pub const ENOTCONN: ::c_int = 134; -pub const ESHUTDOWN: ::c_int = 143; -pub const ETOOMANYREFS: ::c_int = 144; -pub const ETIMEDOUT: ::c_int = 145; -pub const ECONNREFUSED: ::c_int = 146; -pub const EHOSTDOWN: ::c_int = 147; -pub const EHOSTUNREACH: ::c_int = 148; -pub const EALREADY: ::c_int = 149; -pub const EINPROGRESS: ::c_int = 150; -pub const ESTALE: ::c_int = 151; -pub const EUCLEAN: ::c_int = 135; -pub const ENOTNAM: ::c_int = 137; -pub const ENAVAIL: ::c_int = 138; -pub const EISNAM: ::c_int = 139; -pub const EREMOTEIO: ::c_int = 140; -pub const EDQUOT: ::c_int = 1133; -pub const ENOMEDIUM: ::c_int = 159; -pub const EMEDIUMTYPE: ::c_int = 160; -pub const ECANCELED: ::c_int = 158; -pub const ENOKEY: ::c_int = 161; -pub const EKEYEXPIRED: ::c_int = 162; -pub const EKEYREVOKED: ::c_int = 163; -pub const EKEYREJECTED: ::c_int = 164; -pub const EOWNERDEAD: ::c_int = 165; -pub const ENOTRECOVERABLE: ::c_int = 166; -pub const EHWPOISON: ::c_int = 168; -pub const ERFKILL: ::c_int = 167; - -pub const SOCK_STREAM: ::c_int = 2; -pub const SOCK_DGRAM: ::c_int = 1; - -pub const SOL_SOCKET: ::c_int = 65535; - -pub const SO_REUSEADDR: ::c_int = 0x0004; -pub const SO_TYPE: ::c_int = 0x1008; -pub const SO_ERROR: ::c_int = 0x1007; -pub const SO_DONTROUTE: ::c_int = 0x0010; -pub const SO_BROADCAST: ::c_int = 0x0020; -pub const SO_SNDBUF: ::c_int = 0x1001; -pub const SO_RCVBUF: ::c_int = 0x1002; -pub const SO_KEEPALIVE: ::c_int = 0x0008; -pub const SO_OOBINLINE: ::c_int = 0x0100; -pub const SO_LINGER: ::c_int = 0x0080; -pub const SO_REUSEPORT: ::c_int = 0x200; -pub const SO_RCVLOWAT: ::c_int = 0x1004; -pub const SO_SNDLOWAT: ::c_int = 0x1003; -pub const SO_RCVTIMEO: ::c_int = 0x1006; -pub const SO_SNDTIMEO: ::c_int = 0x1005; -pub const SO_ACCEPTCONN: ::c_int = 0x1009; - -pub const SA_ONSTACK: ::c_int = 0x08000000; -pub const SA_SIGINFO: ::c_int = 8; -pub const SA_NOCLDWAIT: ::c_int = 0x10000; - -pub const SIGCHLD: ::c_int = 18; -pub const SIGBUS: ::c_int = 10; -pub const SIGTTIN: ::c_int = 26; -pub const SIGTTOU: ::c_int = 27; -pub const SIGXCPU: ::c_int = 30; -pub const SIGXFSZ: ::c_int = 31; -pub const SIGVTALRM: ::c_int = 28; -pub const SIGPROF: ::c_int = 29; -pub const SIGWINCH: ::c_int = 20; -pub const SIGUSR1: ::c_int = 16; -pub const SIGUSR2: ::c_int = 17; -pub const SIGCONT: ::c_int = 25; -pub const SIGSTOP: ::c_int = 23; -pub const SIGTSTP: ::c_int = 24; -pub const SIGURG: ::c_int = 21; -pub const SIGIO: ::c_int = 22; -pub const SIGSYS: ::c_int = 12; -pub const SIGSTKFLT: ::c_int = 7; -pub const SIGPOLL: ::c_int = ::SIGIO; -pub const SIGPWR: ::c_int = 19; -pub const SIG_SETMASK: ::c_int = 3; -pub const SIG_BLOCK: ::c_int = 1; -pub const SIG_UNBLOCK: ::c_int = 2; - -pub const EXTPROC: ::tcflag_t = 0o200000; - -pub const MAP_HUGETLB: ::c_int = 0x80000; - -pub const F_GETLK: ::c_int = 33; -pub const F_GETOWN: ::c_int = 23; -pub const F_SETLK: ::c_int = 34; -pub const F_SETLKW: ::c_int = 35; -pub const F_SETOWN: ::c_int = 24; - -pub const VEOF: usize = 16; -pub const VEOL: usize = 17; -pub const VEOL2: usize = 6; -pub const VMIN: usize = 4; -pub const IEXTEN: ::tcflag_t = 0o000400; -pub const TOSTOP: ::tcflag_t = 0o100000; -pub const FLUSHO: ::tcflag_t = 0o020000; - -pub const TCGETS: ::c_ulong = 0x540D; -pub const TCSETS: ::c_ulong = 0x540E; -pub const TCSETSW: ::c_ulong = 0x540F; -pub const TCSETSF: ::c_ulong = 0x5410; -pub const TCGETA: ::c_ulong = 0x5401; -pub const TCSETA: ::c_ulong = 0x5402; -pub const TCSETAW: ::c_ulong = 0x5403; -pub const TCSETAF: ::c_ulong = 0x5404; -pub const TCSBRK: ::c_ulong = 0x5405; -pub const TCXONC: ::c_ulong = 0x5406; -pub const TCFLSH: ::c_ulong = 0x5407; -pub const TIOCGSOFTCAR: ::c_ulong = 0x5481; -pub const TIOCSSOFTCAR: ::c_ulong = 0x5482; -pub const TIOCLINUX: ::c_ulong = 0x5483; -pub const TIOCGSERIAL: ::c_ulong = 0x5484; -pub const TIOCEXCL: ::c_ulong = 0x740D; -pub const TIOCNXCL: ::c_ulong = 0x740E; -pub const TIOCSCTTY: ::c_ulong = 0x5480; -pub const TIOCGPGRP: ::c_ulong = 0x40047477; -pub const TIOCSPGRP: ::c_ulong = 0x80047476; -pub const TIOCOUTQ: ::c_ulong = 0x7472; -pub const TIOCSTI: ::c_ulong = 0x5472; -pub const TIOCGWINSZ: ::c_ulong = 0x40087468; -pub const TIOCSWINSZ: ::c_ulong = 0x80087467; -pub const TIOCMGET: ::c_ulong = 0x741D; -pub const TIOCMBIS: ::c_ulong = 0x741B; -pub const TIOCMBIC: ::c_ulong = 0x741C; -pub const TIOCMSET: ::c_ulong = 0x741D; -pub const FIONREAD: ::c_ulong = 0x467F; -pub const TIOCCONS: ::c_ulong = 0x80047478; diff --git a/deps/libc-0.2.7/src/unix/notbsd/linux/musl/b32/mod.rs b/deps/libc-0.2.7/src/unix/notbsd/linux/musl/b32/mod.rs deleted file mode 100644 index dfbc2b548..000000000 --- a/deps/libc-0.2.7/src/unix/notbsd/linux/musl/b32/mod.rs +++ /dev/null @@ -1,42 +0,0 @@ -pub type c_long = i32; -pub type c_ulong = u32; -pub type nlink_t = u32; - -pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 32; -pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 24; - -s! { - pub struct pthread_attr_t { - __size: [u32; 9] - } - - pub struct sigset_t { - __val: [::c_ulong; 32], - } - - pub struct msghdr { - pub msg_name: *mut ::c_void, - pub msg_namelen: ::socklen_t, - pub msg_iov: *mut ::iovec, - pub msg_iovlen: ::c_int, - pub msg_control: *mut ::c_void, - pub msg_controllen: ::socklen_t, - pub msg_flags: ::c_int, - } -} - -cfg_if! { - if #[cfg(any(target_arch = "x86"))] { - mod x86; - pub use self::x86::*; - } else if #[cfg(any(target_arch = "mips"))] { - mod mips; - pub use self::mips::*; - } else if #[cfg(any(target_arch = "arm"))] { - mod arm; - pub use self::arm::*; - } else if #[cfg(any(target_arch = "asmjs"))] { - mod asmjs; - pub use self::asmjs::*; - } else { } -} diff --git a/deps/libc-0.2.7/src/unix/notbsd/linux/musl/b32/x86.rs b/deps/libc-0.2.7/src/unix/notbsd/linux/musl/b32/x86.rs deleted file mode 100644 index e34997a47..000000000 --- a/deps/libc-0.2.7/src/unix/notbsd/linux/musl/b32/x86.rs +++ /dev/null @@ -1,298 +0,0 @@ -pub type c_char = i8; -pub type wchar_t = i32; - -pub const O_DIRECT: ::c_int = 0x4000; -pub const O_DIRECTORY: ::c_int = 0x10000; -pub const O_NOFOLLOW: ::c_int = 0x20000; -pub const O_ASYNC: ::c_int = 0x2000; - -pub const FIOCLEX: ::c_int = 0x5451; -pub const FIONBIO: ::c_int = 0x5421; - -pub const RLIMIT_RSS: ::c_int = 5; -pub const RLIMIT_NOFILE: ::c_int = 7; -pub const RLIMIT_AS: ::c_int = 9; -pub const RLIMIT_NPROC: ::c_int = 6; -pub const RLIMIT_MEMLOCK: ::c_int = 8; - -pub const O_APPEND: ::c_int = 1024; -pub const O_CREAT: ::c_int = 64; -pub const O_EXCL: ::c_int = 128; -pub const O_NOCTTY: ::c_int = 256; -pub const O_NONBLOCK: ::c_int = 2048; -pub const O_SYNC: ::c_int = 1052672; -pub const O_RSYNC: ::c_int = 1052672; -pub const O_DSYNC: ::c_int = 4096; - -pub const SOCK_NONBLOCK: ::c_int = 2048; - -pub const MAP_ANON: ::c_int = 0x0020; -pub const MAP_GROWSDOWN: ::c_int = 0x0100; -pub const MAP_DENYWRITE: ::c_int = 0x0800; -pub const MAP_EXECUTABLE: ::c_int = 0x01000; -pub const MAP_LOCKED: ::c_int = 0x02000; -pub const MAP_NORESERVE: ::c_int = 0x04000; -pub const MAP_POPULATE: ::c_int = 0x08000; -pub const MAP_NONBLOCK: ::c_int = 0x010000; -pub const MAP_STACK: ::c_int = 0x020000; - -pub const SOCK_STREAM: ::c_int = 1; -pub const SOCK_DGRAM: ::c_int = 2; - -pub const SOL_SOCKET: ::c_int = 1; - -pub const EDEADLK: ::c_int = 35; -pub const ENAMETOOLONG: ::c_int = 36; -pub const ENOLCK: ::c_int = 37; -pub const ENOSYS: ::c_int = 38; -pub const ENOTEMPTY: ::c_int = 39; -pub const ELOOP: ::c_int = 40; -pub const ENOMSG: ::c_int = 42; -pub const EIDRM: ::c_int = 43; -pub const ECHRNG: ::c_int = 44; -pub const EL2NSYNC: ::c_int = 45; -pub const EL3HLT: ::c_int = 46; -pub const EL3RST: ::c_int = 47; -pub const ELNRNG: ::c_int = 48; -pub const EUNATCH: ::c_int = 49; -pub const ENOCSI: ::c_int = 50; -pub const EL2HLT: ::c_int = 51; -pub const EBADE: ::c_int = 52; -pub const EBADR: ::c_int = 53; -pub const EXFULL: ::c_int = 54; -pub const ENOANO: ::c_int = 55; -pub const EBADRQC: ::c_int = 56; -pub const EBADSLT: ::c_int = 57; -pub const EDEADLOCK: ::c_int = EDEADLK; -pub const EMULTIHOP: ::c_int = 72; -pub const EBADMSG: ::c_int = 74; -pub const EOVERFLOW: ::c_int = 75; -pub const ENOTUNIQ: ::c_int = 76; -pub const EBADFD: ::c_int = 77; -pub const EREMCHG: ::c_int = 78; -pub const ELIBACC: ::c_int = 79; -pub const ELIBBAD: ::c_int = 80; -pub const ELIBSCN: ::c_int = 81; -pub const ELIBMAX: ::c_int = 82; -pub const ELIBEXEC: ::c_int = 83; -pub const EILSEQ: ::c_int = 84; -pub const ERESTART: ::c_int = 85; -pub const ESTRPIPE: ::c_int = 86; -pub const EUSERS: ::c_int = 87; -pub const ENOTSOCK: ::c_int = 88; -pub const EDESTADDRREQ: ::c_int = 89; -pub const EMSGSIZE: ::c_int = 90; -pub const EPROTOTYPE: ::c_int = 91; -pub const ENOPROTOOPT: ::c_int = 92; -pub const EPROTONOSUPPORT: ::c_int = 93; -pub const ESOCKTNOSUPPORT: ::c_int = 94; -pub const EOPNOTSUPP: ::c_int = 95; -pub const EPFNOSUPPORT: ::c_int = 96; -pub const EAFNOSUPPORT: ::c_int = 97; -pub const EADDRINUSE: ::c_int = 98; -pub const EADDRNOTAVAIL: ::c_int = 99; -pub const ENETDOWN: ::c_int = 100; -pub const ENETUNREACH: ::c_int = 101; -pub const ENETRESET: ::c_int = 102; -pub const ECONNABORTED: ::c_int = 103; -pub const ECONNRESET: ::c_int = 104; -pub const ENOBUFS: ::c_int = 105; -pub const EISCONN: ::c_int = 106; -pub const ENOTCONN: ::c_int = 107; -pub const ESHUTDOWN: ::c_int = 108; -pub const ETOOMANYREFS: ::c_int = 109; -pub const ETIMEDOUT: ::c_int = 110; -pub const ECONNREFUSED: ::c_int = 111; -pub const EHOSTDOWN: ::c_int = 112; -pub const EHOSTUNREACH: ::c_int = 113; -pub const EALREADY: ::c_int = 114; -pub const EINPROGRESS: ::c_int = 115; -pub const ESTALE: ::c_int = 116; -pub const EUCLEAN: ::c_int = 117; -pub const ENOTNAM: ::c_int = 118; -pub const ENAVAIL: ::c_int = 119; -pub const EISNAM: ::c_int = 120; -pub const EREMOTEIO: ::c_int = 121; -pub const EDQUOT: ::c_int = 122; -pub const ENOMEDIUM: ::c_int = 123; -pub const EMEDIUMTYPE: ::c_int = 124; -pub const ECANCELED: ::c_int = 125; -pub const ENOKEY: ::c_int = 126; -pub const EKEYEXPIRED: ::c_int = 127; -pub const EKEYREVOKED: ::c_int = 128; -pub const EKEYREJECTED: ::c_int = 129; -pub const EOWNERDEAD: ::c_int = 130; -pub const ENOTRECOVERABLE: ::c_int = 131; -pub const ERFKILL: ::c_int = 132; -pub const EHWPOISON: ::c_int = 133; - -pub const SO_REUSEADDR: ::c_int = 2; -pub const SO_TYPE: ::c_int = 3; -pub const SO_ERROR: ::c_int = 4; -pub const SO_DONTROUTE: ::c_int = 5; -pub const SO_BROADCAST: ::c_int = 6; -pub const SO_SNDBUF: ::c_int = 7; -pub const SO_RCVBUF: ::c_int = 8; -pub const SO_KEEPALIVE: ::c_int = 9; -pub const SO_OOBINLINE: ::c_int = 10; -pub const SO_LINGER: ::c_int = 13; -pub const SO_REUSEPORT: ::c_int = 15; -pub const SO_RCVLOWAT: ::c_int = 18; -pub const SO_SNDLOWAT: ::c_int = 19; -pub const SO_RCVTIMEO: ::c_int = 20; -pub const SO_SNDTIMEO: ::c_int = 21; -pub const SO_ACCEPTCONN: ::c_int = 30; - -pub const SA_ONSTACK: ::c_int = 0x08000000; -pub const SA_SIGINFO: ::c_int = 0x00000004; -pub const SA_NOCLDWAIT: ::c_int = 0x00000002; - -pub const SIGCHLD: ::c_int = 17; -pub const SIGBUS: ::c_int = 7; -pub const SIGTTIN: ::c_int = 21; -pub const SIGTTOU: ::c_int = 22; -pub const SIGXCPU: ::c_int = 24; -pub const SIGXFSZ: ::c_int = 25; -pub const SIGVTALRM: ::c_int = 26; -pub const SIGPROF: ::c_int = 27; -pub const SIGWINCH: ::c_int = 28; -pub const SIGUSR1: ::c_int = 10; -pub const SIGUSR2: ::c_int = 12; -pub const SIGCONT: ::c_int = 18; -pub const SIGSTOP: ::c_int = 19; -pub const SIGTSTP: ::c_int = 20; -pub const SIGURG: ::c_int = 23; -pub const SIGIO: ::c_int = 29; -pub const SIGSYS: ::c_int = 31; -pub const SIGSTKFLT: ::c_int = 16; -pub const SIGPOLL: ::c_int = 29; -pub const SIGPWR: ::c_int = 30; -pub const SIG_SETMASK: ::c_int = 2; -pub const SIG_BLOCK: ::c_int = 0x000000; -pub const SIG_UNBLOCK: ::c_int = 0x01; - -pub const EXTPROC: ::tcflag_t = 0x00010000; - -pub const MAP_HUGETLB: ::c_int = 0x040000; - -pub const F_GETLK: ::c_int = 12; -pub const F_GETOWN: ::c_int = 9; -pub const F_SETLK: ::c_int = 13; -pub const F_SETLKW: ::c_int = 14; -pub const F_SETOWN: ::c_int = 8; - -pub const VEOF: usize = 4; -pub const VEOL: usize = 11; -pub const VEOL2: usize = 16; -pub const VMIN: usize = 6; -pub const IEXTEN: ::tcflag_t = 0x00008000; -pub const TOSTOP: ::tcflag_t = 0x00000100; -pub const FLUSHO: ::tcflag_t = 0x00001000; - -pub const TCGETS: ::c_ulong = 0x5401; -pub const TCSETS: ::c_ulong = 0x5402; -pub const TCSETSW: ::c_ulong = 0x5403; -pub const TCSETSF: ::c_ulong = 0x5404; -pub const TCGETA: ::c_ulong = 0x5405; -pub const TCSETA: ::c_ulong = 0x5406; -pub const TCSETAW: ::c_ulong = 0x5407; -pub const TCSETAF: ::c_ulong = 0x5408; -pub const TCSBRK: ::c_ulong = 0x5409; -pub const TCXONC: ::c_ulong = 0x540A; -pub const TCFLSH: ::c_ulong = 0x540B; -pub const TIOCGSOFTCAR: ::c_ulong = 0x5419; -pub const TIOCSSOFTCAR: ::c_ulong = 0x541A; -pub const TIOCLINUX: ::c_ulong = 0x541C; -pub const TIOCGSERIAL: ::c_ulong = 0x541E; -pub const TIOCEXCL: ::c_ulong = 0x540C; -pub const TIOCNXCL: ::c_ulong = 0x540D; -pub const TIOCSCTTY: ::c_ulong = 0x540E; -pub const TIOCGPGRP: ::c_ulong = 0x540F; -pub const TIOCSPGRP: ::c_ulong = 0x5410; -pub const TIOCOUTQ: ::c_ulong = 0x5411; -pub const TIOCSTI: ::c_ulong = 0x5412; -pub const TIOCGWINSZ: ::c_ulong = 0x5413; -pub const TIOCSWINSZ: ::c_ulong = 0x5414; -pub const TIOCMGET: ::c_ulong = 0x5415; -pub const TIOCMBIS: ::c_ulong = 0x5416; -pub const TIOCMBIC: ::c_ulong = 0x5417; -pub const TIOCMSET: ::c_ulong = 0x5418; -pub const FIONREAD: ::c_ulong = 0x541B; -pub const TIOCCONS: ::c_ulong = 0x541D; - -s! { - pub struct stat { - pub st_dev: ::dev_t, - __st_dev_padding: ::c_int, - __st_ino_truncated: ::c_long, - pub st_mode: ::mode_t, - pub st_nlink: ::nlink_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::dev_t, - __st_rdev_padding: ::c_int, - pub st_size: ::off_t, - pub st_blksize: ::blksize_t, - pub st_blocks: ::blkcnt_t, - pub st_atim: ::timespec, - pub st_mtim: ::timespec, - pub st_ctim: ::timespec, - pub st_ino: ::ino_t, - } - - pub struct stat64 { - pub st_dev: ::dev_t, - __st_dev_padding: ::c_int, - __st_ino_truncated: ::c_long, - pub st_mode: ::mode_t, - pub st_nlink: ::nlink_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::dev_t, - __st_rdev_padding: ::c_int, - pub st_size: ::off_t, - pub st_blksize: ::blksize_t, - pub st_blocks: ::blkcnt_t, - pub st_atim: ::timespec, - pub st_mtim: ::timespec, - pub st_ctim: ::timespec, - pub st_ino: ::ino_t, - } - - pub struct stack_t { - pub ss_sp: *mut ::c_void, - pub ss_flags: ::c_int, - pub ss_size: ::size_t - } - - pub struct shmid_ds { - pub shm_perm: ::ipc_perm, - pub shm_segsz: ::size_t, - pub shm_atime: ::time_t, - __unused1: ::c_int, - pub shm_dtime: ::time_t, - __unused2: ::c_int, - pub shm_ctime: ::time_t, - __unused3: ::c_int, - pub shm_cpid: ::pid_t, - pub shm_lpid: ::pid_t, - pub shm_nattch: ::c_ulong, - __pad1: ::c_ulong, - __pad2: ::c_ulong, - } - - pub struct statfs { - pub f_type: ::c_ulong, - pub f_bsize: ::c_ulong, - pub f_blocks: ::fsblkcnt_t, - pub f_bfree: ::fsblkcnt_t, - pub f_bavail: ::fsblkcnt_t, - pub f_files: ::fsfilcnt_t, - pub f_ffree: ::fsfilcnt_t, - pub f_fsid: ::fsid_t, - pub f_namelen: ::c_ulong, - pub f_frsize: ::c_ulong, - pub f_flags: ::c_ulong, - pub f_spare: [::c_ulong; 4], - } -} diff --git a/deps/libc-0.2.7/src/unix/notbsd/linux/musl/b64/mod.rs b/deps/libc-0.2.7/src/unix/notbsd/linux/musl/b64/mod.rs deleted file mode 100644 index 0251e83b0..000000000 --- a/deps/libc-0.2.7/src/unix/notbsd/linux/musl/b64/mod.rs +++ /dev/null @@ -1,325 +0,0 @@ -pub type c_char = i8; -pub type wchar_t = i32; -pub type c_long = i64; -pub type c_ulong = u64; -pub type nlink_t = u64; - -pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56; -pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40; - -pub const O_DIRECT: ::c_int = 0x4000; -pub const O_DIRECTORY: ::c_int = 0x10000; -pub const O_NOFOLLOW: ::c_int = 0x20000; -pub const O_ASYNC: ::c_int = 0x2000; - -pub const FIOCLEX: ::c_int = 0x5451; -pub const FIONBIO: ::c_int = 0x5421; - -pub const RLIMIT_RSS: ::c_int = 5; -pub const RLIMIT_NOFILE: ::c_int = 7; -pub const RLIMIT_AS: ::c_int = 9; -pub const RLIMIT_NPROC: ::c_int = 6; -pub const RLIMIT_MEMLOCK: ::c_int = 8; - -pub const O_APPEND: ::c_int = 1024; -pub const O_CREAT: ::c_int = 64; -pub const O_EXCL: ::c_int = 128; -pub const O_NOCTTY: ::c_int = 256; -pub const O_NONBLOCK: ::c_int = 2048; -pub const O_SYNC: ::c_int = 1052672; -pub const O_RSYNC: ::c_int = 1052672; -pub const O_DSYNC: ::c_int = 4096; - -pub const SOCK_NONBLOCK: ::c_int = 2048; - -pub const MAP_ANON: ::c_int = 0x0020; -pub const MAP_GROWSDOWN: ::c_int = 0x0100; -pub const MAP_DENYWRITE: ::c_int = 0x0800; -pub const MAP_EXECUTABLE: ::c_int = 0x01000; -pub const MAP_LOCKED: ::c_int = 0x02000; -pub const MAP_NORESERVE: ::c_int = 0x04000; -pub const MAP_POPULATE: ::c_int = 0x08000; -pub const MAP_NONBLOCK: ::c_int = 0x010000; -pub const MAP_STACK: ::c_int = 0x020000; - -pub const SOCK_STREAM: ::c_int = 1; -pub const SOCK_DGRAM: ::c_int = 2; - -pub const SOL_SOCKET: ::c_int = 1; - -pub const EDEADLK: ::c_int = 35; -pub const ENAMETOOLONG: ::c_int = 36; -pub const ENOLCK: ::c_int = 37; -pub const ENOSYS: ::c_int = 38; -pub const ENOTEMPTY: ::c_int = 39; -pub const ELOOP: ::c_int = 40; -pub const ENOMSG: ::c_int = 42; -pub const EIDRM: ::c_int = 43; -pub const ECHRNG: ::c_int = 44; -pub const EL2NSYNC: ::c_int = 45; -pub const EL3HLT: ::c_int = 46; -pub const EL3RST: ::c_int = 47; -pub const ELNRNG: ::c_int = 48; -pub const EUNATCH: ::c_int = 49; -pub const ENOCSI: ::c_int = 50; -pub const EL2HLT: ::c_int = 51; -pub const EBADE: ::c_int = 52; -pub const EBADR: ::c_int = 53; -pub const EXFULL: ::c_int = 54; -pub const ENOANO: ::c_int = 55; -pub const EBADRQC: ::c_int = 56; -pub const EBADSLT: ::c_int = 57; -pub const EDEADLOCK: ::c_int = EDEADLK; -pub const EMULTIHOP: ::c_int = 72; -pub const EBADMSG: ::c_int = 74; -pub const EOVERFLOW: ::c_int = 75; -pub const ENOTUNIQ: ::c_int = 76; -pub const EBADFD: ::c_int = 77; -pub const EREMCHG: ::c_int = 78; -pub const ELIBACC: ::c_int = 79; -pub const ELIBBAD: ::c_int = 80; -pub const ELIBSCN: ::c_int = 81; -pub const ELIBMAX: ::c_int = 82; -pub const ELIBEXEC: ::c_int = 83; -pub const EILSEQ: ::c_int = 84; -pub const ERESTART: ::c_int = 85; -pub const ESTRPIPE: ::c_int = 86; -pub const EUSERS: ::c_int = 87; -pub const ENOTSOCK: ::c_int = 88; -pub const EDESTADDRREQ: ::c_int = 89; -pub const EMSGSIZE: ::c_int = 90; -pub const EPROTOTYPE: ::c_int = 91; -pub const ENOPROTOOPT: ::c_int = 92; -pub const EPROTONOSUPPORT: ::c_int = 93; -pub const ESOCKTNOSUPPORT: ::c_int = 94; -pub const EOPNOTSUPP: ::c_int = 95; -pub const EPFNOSUPPORT: ::c_int = 96; -pub const EAFNOSUPPORT: ::c_int = 97; -pub const EADDRINUSE: ::c_int = 98; -pub const EADDRNOTAVAIL: ::c_int = 99; -pub const ENETDOWN: ::c_int = 100; -pub const ENETUNREACH: ::c_int = 101; -pub const ENETRESET: ::c_int = 102; -pub const ECONNABORTED: ::c_int = 103; -pub const ECONNRESET: ::c_int = 104; -pub const ENOBUFS: ::c_int = 105; -pub const EISCONN: ::c_int = 106; -pub const ENOTCONN: ::c_int = 107; -pub const ESHUTDOWN: ::c_int = 108; -pub const ETOOMANYREFS: ::c_int = 109; -pub const ETIMEDOUT: ::c_int = 110; -pub const ECONNREFUSED: ::c_int = 111; -pub const EHOSTDOWN: ::c_int = 112; -pub const EHOSTUNREACH: ::c_int = 113; -pub const EALREADY: ::c_int = 114; -pub const EINPROGRESS: ::c_int = 115; -pub const ESTALE: ::c_int = 116; -pub const EUCLEAN: ::c_int = 117; -pub const ENOTNAM: ::c_int = 118; -pub const ENAVAIL: ::c_int = 119; -pub const EISNAM: ::c_int = 120; -pub const EREMOTEIO: ::c_int = 121; -pub const EDQUOT: ::c_int = 122; -pub const ENOMEDIUM: ::c_int = 123; -pub const EMEDIUMTYPE: ::c_int = 124; -pub const ECANCELED: ::c_int = 125; -pub const ENOKEY: ::c_int = 126; -pub const EKEYEXPIRED: ::c_int = 127; -pub const EKEYREVOKED: ::c_int = 128; -pub const EKEYREJECTED: ::c_int = 129; -pub const EOWNERDEAD: ::c_int = 130; -pub const ENOTRECOVERABLE: ::c_int = 131; -pub const ERFKILL: ::c_int = 132; -pub const EHWPOISON: ::c_int = 133; - -pub const SO_REUSEADDR: ::c_int = 2; -pub const SO_TYPE: ::c_int = 3; -pub const SO_ERROR: ::c_int = 4; -pub const SO_DONTROUTE: ::c_int = 5; -pub const SO_BROADCAST: ::c_int = 6; -pub const SO_SNDBUF: ::c_int = 7; -pub const SO_RCVBUF: ::c_int = 8; -pub const SO_KEEPALIVE: ::c_int = 9; -pub const SO_OOBINLINE: ::c_int = 10; -pub const SO_LINGER: ::c_int = 13; -pub const SO_REUSEPORT: ::c_int = 15; -pub const SO_RCVLOWAT: ::c_int = 18; -pub const SO_SNDLOWAT: ::c_int = 19; -pub const SO_RCVTIMEO: ::c_int = 20; -pub const SO_SNDTIMEO: ::c_int = 21; -pub const SO_ACCEPTCONN: ::c_int = 30; - -pub const SA_ONSTACK: ::c_int = 0x08000000; -pub const SA_SIGINFO: ::c_int = 0x00000004; -pub const SA_NOCLDWAIT: ::c_int = 0x00000002; - -pub const SIGCHLD: ::c_int = 17; -pub const SIGBUS: ::c_int = 7; -pub const SIGTTIN: ::c_int = 21; -pub const SIGTTOU: ::c_int = 22; -pub const SIGXCPU: ::c_int = 24; -pub const SIGXFSZ: ::c_int = 25; -pub const SIGVTALRM: ::c_int = 26; -pub const SIGPROF: ::c_int = 27; -pub const SIGWINCH: ::c_int = 28; -pub const SIGUSR1: ::c_int = 10; -pub const SIGUSR2: ::c_int = 12; -pub const SIGCONT: ::c_int = 18; -pub const SIGSTOP: ::c_int = 19; -pub const SIGTSTP: ::c_int = 20; -pub const SIGURG: ::c_int = 23; -pub const SIGIO: ::c_int = 29; -pub const SIGSYS: ::c_int = 31; -pub const SIGSTKFLT: ::c_int = 16; -pub const SIGPOLL: ::c_int = 29; -pub const SIGPWR: ::c_int = 30; -pub const SIG_SETMASK: ::c_int = 2; -pub const SIG_BLOCK: ::c_int = 0x000000; -pub const SIG_UNBLOCK: ::c_int = 0x01; - -pub const EXTPROC: ::tcflag_t = 0x00010000; - -pub const MAP_HUGETLB: ::c_int = 0x040000; - -pub const F_GETLK: ::c_int = 5; -pub const F_GETOWN: ::c_int = 9; -pub const F_SETLK: ::c_int = 6; -pub const F_SETLKW: ::c_int = 7; -pub const F_SETOWN: ::c_int = 8; - -pub const VEOF: usize = 4; -pub const VEOL: usize = 11; -pub const VEOL2: usize = 16; -pub const VMIN: usize = 6; -pub const IEXTEN: ::tcflag_t = 0x00008000; -pub const TOSTOP: ::tcflag_t = 0x00000100; -pub const FLUSHO: ::tcflag_t = 0x00001000; - -pub const TCGETS: ::c_ulong = 0x5401; -pub const TCSETS: ::c_ulong = 0x5402; -pub const TCSETSW: ::c_ulong = 0x5403; -pub const TCSETSF: ::c_ulong = 0x5404; -pub const TCGETA: ::c_ulong = 0x5405; -pub const TCSETA: ::c_ulong = 0x5406; -pub const TCSETAW: ::c_ulong = 0x5407; -pub const TCSETAF: ::c_ulong = 0x5408; -pub const TCSBRK: ::c_ulong = 0x5409; -pub const TCXONC: ::c_ulong = 0x540A; -pub const TCFLSH: ::c_ulong = 0x540B; -pub const TIOCGSOFTCAR: ::c_ulong = 0x5419; -pub const TIOCSSOFTCAR: ::c_ulong = 0x541A; -pub const TIOCLINUX: ::c_ulong = 0x541C; -pub const TIOCGSERIAL: ::c_ulong = 0x541E; -pub const TIOCEXCL: ::c_ulong = 0x540C; -pub const TIOCNXCL: ::c_ulong = 0x540D; -pub const TIOCSCTTY: ::c_ulong = 0x540E; -pub const TIOCGPGRP: ::c_ulong = 0x540F; -pub const TIOCSPGRP: ::c_ulong = 0x5410; -pub const TIOCOUTQ: ::c_ulong = 0x5411; -pub const TIOCSTI: ::c_ulong = 0x5412; -pub const TIOCGWINSZ: ::c_ulong = 0x5413; -pub const TIOCSWINSZ: ::c_ulong = 0x5414; -pub const TIOCMGET: ::c_ulong = 0x5415; -pub const TIOCMBIS: ::c_ulong = 0x5416; -pub const TIOCMBIC: ::c_ulong = 0x5417; -pub const TIOCMSET: ::c_ulong = 0x5418; -pub const FIONREAD: ::c_ulong = 0x541B; -pub const TIOCCONS: ::c_ulong = 0x541D; - -s! { - pub struct stat { - pub st_dev: ::dev_t, - pub st_ino: ::ino_t, - pub st_nlink: ::nlink_t, - pub st_mode: ::mode_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - __pad0: ::c_int, - pub st_rdev: ::dev_t, - pub st_size: ::off_t, - pub st_blksize: ::blksize_t, - pub st_blocks: ::blkcnt_t, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - __unused: [::c_long; 3], - } - - pub struct stat64 { - pub st_dev: ::dev_t, - pub st_ino: ::ino64_t, - pub st_nlink: ::nlink_t, - pub st_mode: ::mode_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - __pad0: ::c_int, - pub st_rdev: ::dev_t, - pub st_size: ::off_t, - pub st_blksize: ::blksize_t, - pub st_blocks: ::blkcnt64_t, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - __reserved: [::c_long; 3], - } - - pub struct stack_t { - pub ss_sp: *mut ::c_void, - pub ss_flags: ::c_int, - pub ss_size: ::size_t - } - - pub struct pthread_attr_t { - __size: [u64; 7] - } - - pub struct sigset_t { - __val: [::c_ulong; 16], - } - - pub struct shmid_ds { - pub shm_perm: ::ipc_perm, - pub shm_segsz: ::size_t, - pub shm_atime: ::time_t, - pub shm_dtime: ::time_t, - pub shm_ctime: ::time_t, - pub shm_cpid: ::pid_t, - pub shm_lpid: ::pid_t, - pub shm_nattch: ::c_ulong, - __pad1: ::c_ulong, - __pad2: ::c_ulong, - } - - pub struct statfs { - pub f_type: ::c_ulong, - pub f_bsize: ::c_ulong, - pub f_blocks: ::fsblkcnt_t, - pub f_bfree: ::fsblkcnt_t, - pub f_bavail: ::fsblkcnt_t, - pub f_files: ::fsfilcnt_t, - pub f_ffree: ::fsfilcnt_t, - pub f_fsid: ::fsid_t, - pub f_namelen: ::c_ulong, - pub f_frsize: ::c_ulong, - pub f_flags: ::c_ulong, - pub f_spare: [::c_ulong; 4], - } - - pub struct msghdr { - pub msg_name: *mut ::c_void, - pub msg_namelen: ::socklen_t, - pub msg_iov: *mut ::iovec, - pub msg_iovlen: ::c_int, - __pad1: ::c_int, - pub msg_control: *mut ::c_void, - pub msg_controllen: ::socklen_t, - __pad2: ::socklen_t, - pub msg_flags: ::c_int, - } -} diff --git a/deps/libc-0.2.7/src/unix/notbsd/linux/other/b32/arm.rs b/deps/libc-0.2.7/src/unix/notbsd/linux/other/b32/arm.rs deleted file mode 100644 index aabe8edbe..000000000 --- a/deps/libc-0.2.7/src/unix/notbsd/linux/other/b32/arm.rs +++ /dev/null @@ -1,20 +0,0 @@ -pub type c_char = u8; -pub type wchar_t = u32; - -pub const O_DIRECT: ::c_int = 0x10000; -pub const O_DIRECTORY: ::c_int = 0x4000; -pub const O_NOFOLLOW: ::c_int = 0x8000; - -pub const MAP_LOCKED: ::c_int = 0x02000; -pub const MAP_NORESERVE: ::c_int = 0x04000; - -pub const EDEADLOCK: ::c_int = 35; - -pub const SO_PEERCRED: ::c_int = 17; -pub const SO_RCVLOWAT: ::c_int = 18; -pub const SO_SNDLOWAT: ::c_int = 19; -pub const SO_RCVTIMEO: ::c_int = 20; -pub const SO_SNDTIMEO: ::c_int = 21; - -pub const FIOCLEX: ::c_ulong = 0x5451; -pub const FIONBIO: ::c_ulong = 0x5421; diff --git a/deps/libc-0.2.7/src/unix/notbsd/linux/other/b32/mod.rs b/deps/libc-0.2.7/src/unix/notbsd/linux/other/b32/mod.rs deleted file mode 100644 index 12d466981..000000000 --- a/deps/libc-0.2.7/src/unix/notbsd/linux/other/b32/mod.rs +++ /dev/null @@ -1,95 +0,0 @@ -//! 32-bit specific definitions for linux-like values - -pub type c_long = i32; -pub type c_ulong = u32; -pub type clock_t = i32; -pub type time_t = i32; -pub type suseconds_t = i32; -pub type ino_t = u32; -pub type off_t = i32; -pub type blkcnt_t = i32; -pub type __fsword_t = i32; - -pub type blksize_t = i32; -pub type nlink_t = u32; - -pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 24; -pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 32; -pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4; - -pub const PTRACE_GETFPREGS: ::c_uint = 14; -pub const PTRACE_SETFPREGS: ::c_uint = 15; -pub const PTRACE_GETFPXREGS: ::c_uint = 18; -pub const PTRACE_SETFPXREGS: ::c_uint = 19; -pub const PTRACE_GETREGS: ::c_uint = 12; -pub const PTRACE_SETREGS: ::c_uint = 13; - -s! { - pub struct stat { - pub st_dev: ::dev_t, - __pad1: ::c_short, - pub st_ino: ::ino_t, - pub st_mode: ::mode_t, - pub st_nlink: ::nlink_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::dev_t, - __pad2: ::c_short, - pub st_size: ::off_t, - pub st_blksize: ::blksize_t, - pub st_blocks: ::blkcnt_t, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - __unused4: ::c_long, - __unused5: ::c_long, - } - - pub struct stat64 { - pub st_dev: ::dev_t, - __pad1: ::c_uint, - __st_ino: ::ino_t, - pub st_mode: ::mode_t, - pub st_nlink: ::nlink_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::dev_t, - __pad2: ::c_uint, - pub st_size: ::off64_t, - pub st_blksize: ::blksize_t, - pub st_blocks: ::blkcnt64_t, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - pub st_ino: ::ino64_t, - } - - pub struct pthread_attr_t { - __size: [u32; 9] - } - - pub struct sigset_t { - __val: [::c_ulong; 32], - } -} - -cfg_if! { - if #[cfg(target_arch = "x86")] { - mod x86; - pub use self::x86::*; - } else if #[cfg(target_arch = "arm")] { - mod arm; - pub use self::arm::*; - } else if #[cfg(target_arch = "powerpc")] { - mod powerpc; - pub use self::powerpc::*; - } else { - // ... - } -} diff --git a/deps/libc-0.2.7/src/unix/notbsd/linux/other/b32/powerpc.rs b/deps/libc-0.2.7/src/unix/notbsd/linux/other/b32/powerpc.rs deleted file mode 100644 index 4ebfeda40..000000000 --- a/deps/libc-0.2.7/src/unix/notbsd/linux/other/b32/powerpc.rs +++ /dev/null @@ -1,20 +0,0 @@ -pub type c_char = u8; -pub type wchar_t = i32; - -pub const O_DIRECT: ::c_int = 0x20000; -pub const O_DIRECTORY: ::c_int = 0x4000; -pub const O_NOFOLLOW: ::c_int = 0x8000; - -pub const MAP_LOCKED: ::c_int = 0x00080; -pub const MAP_NORESERVE: ::c_int = 0x00040; - -pub const EDEADLOCK: ::c_int = 58; - -pub const SO_PEERCRED: ::c_int = 21; -pub const SO_RCVLOWAT: ::c_int = 16; -pub const SO_SNDLOWAT: ::c_int = 17; -pub const SO_RCVTIMEO: ::c_int = 18; -pub const SO_SNDTIMEO: ::c_int = 19; - -pub const FIOCLEX: ::c_ulong = 0x20006601; -pub const FIONBIO: ::c_ulong = 0x8004667e; diff --git a/deps/libc-0.2.7/src/unix/notbsd/linux/other/b32/x86.rs b/deps/libc-0.2.7/src/unix/notbsd/linux/other/b32/x86.rs deleted file mode 100644 index 45fa03f90..000000000 --- a/deps/libc-0.2.7/src/unix/notbsd/linux/other/b32/x86.rs +++ /dev/null @@ -1,20 +0,0 @@ -pub type c_char = i8; -pub type wchar_t = i32; - -pub const O_DIRECT: ::c_int = 0x4000; -pub const O_DIRECTORY: ::c_int = 0x10000; -pub const O_NOFOLLOW: ::c_int = 0x20000; - -pub const MAP_LOCKED: ::c_int = 0x02000; -pub const MAP_NORESERVE: ::c_int = 0x04000; - -pub const EDEADLOCK: ::c_int = 35; - -pub const SO_PEERCRED: ::c_int = 17; -pub const SO_RCVLOWAT: ::c_int = 18; -pub const SO_SNDLOWAT: ::c_int = 19; -pub const SO_RCVTIMEO: ::c_int = 20; -pub const SO_SNDTIMEO: ::c_int = 21; - -pub const FIOCLEX: ::c_ulong = 0x5451; -pub const FIONBIO: ::c_ulong = 0x5421; diff --git a/deps/libc-0.2.7/src/unix/notbsd/linux/other/b64/aarch64.rs b/deps/libc-0.2.7/src/unix/notbsd/linux/other/b64/aarch64.rs deleted file mode 100644 index b56cb48b5..000000000 --- a/deps/libc-0.2.7/src/unix/notbsd/linux/other/b64/aarch64.rs +++ /dev/null @@ -1,77 +0,0 @@ -//! AArch64-specific definitions for 64-bit linux-like values - -pub type c_char = u8; -pub type wchar_t = u32; -pub type nlink_t = u32; -pub type blksize_t = i32; - -pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 48; -pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 8; - -pub const O_DIRECT: ::c_int = 0x10000; -pub const O_DIRECTORY: ::c_int = 0x4000; -pub const O_NOFOLLOW: ::c_int = 0x8000; - -pub const MAP_LOCKED: ::c_int = 0x02000; -pub const MAP_NORESERVE: ::c_int = 0x04000; - -pub const EDEADLOCK: ::c_int = 35; - -pub const SO_PEERCRED: ::c_int = 17; -pub const SO_RCVLOWAT: ::c_int = 18; -pub const SO_SNDLOWAT: ::c_int = 19; -pub const SO_RCVTIMEO: ::c_int = 20; -pub const SO_SNDTIMEO: ::c_int = 21; - -pub const FIOCLEX: ::c_ulong = 0x5451; -pub const FIONBIO: ::c_ulong = 0x5421; - -s! { - pub struct stat { - pub st_dev: ::dev_t, - pub st_ino: ::ino_t, - pub st_mode: ::mode_t, - pub st_nlink: ::nlink_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::dev_t, - __pad1: ::dev_t, - pub st_size: ::off_t, - pub st_blksize: ::blksize_t, - __pad2: ::c_int, - pub st_blocks: ::blkcnt_t, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - __unused: [::c_int; 2], - } - - pub struct stat64 { - pub st_dev: ::dev_t, - pub st_ino: ::ino_t, - pub st_mode: ::mode_t, - pub st_nlink: ::nlink_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::dev_t, - __pad1: ::dev_t, - pub st_size: ::off64_t, - pub st_blksize: ::blksize_t, - __pad2: ::c_int, - pub st_blocks: ::blkcnt64_t, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - __unused: [::c_int; 2], - } - - pub struct pthread_attr_t { - __size: [u64; 8] - } -} diff --git a/deps/libc-0.2.7/src/unix/notbsd/linux/other/b64/mod.rs b/deps/libc-0.2.7/src/unix/notbsd/linux/other/b64/mod.rs deleted file mode 100644 index c9d82af4b..000000000 --- a/deps/libc-0.2.7/src/unix/notbsd/linux/other/b64/mod.rs +++ /dev/null @@ -1,32 +0,0 @@ -//! 64-bit specific definitions for linux-like values - -pub type c_long = i64; -pub type c_ulong = u64; -pub type clock_t = i64; -pub type time_t = i64; -pub type suseconds_t = i64; -pub type ino_t = u64; -pub type off_t = i64; -pub type blkcnt_t = i64; -pub type __fsword_t = ::c_long; - -s! { - pub struct sigset_t { - __val: [::c_ulong; 16], - } -} - -pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56; - -cfg_if! { - if #[cfg(target_arch = "aarch64")] { - mod aarch64; - pub use self::aarch64::*; - } else if #[cfg(any(target_arch = "powerpc64", target_arch = "powerpc64le"))] { - mod powerpc64; - pub use self::powerpc64::*; - } else { - mod x86_64; - pub use self::x86_64::*; - } -} diff --git a/deps/libc-0.2.7/src/unix/notbsd/linux/other/b64/powerpc64.rs b/deps/libc-0.2.7/src/unix/notbsd/linux/other/b64/powerpc64.rs deleted file mode 100644 index c853a01fc..000000000 --- a/deps/libc-0.2.7/src/unix/notbsd/linux/other/b64/powerpc64.rs +++ /dev/null @@ -1,75 +0,0 @@ -//! PowerPC64-specific definitions for 64-bit linux-like values - -pub type c_char = u8; -pub type wchar_t = u32; -pub type nlink_t = u64; -pub type blksize_t = i64; - -pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40; -pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4; - -pub const O_DIRECTORY: ::c_int = 0x4000; -pub const O_NOFOLLOW: ::c_int = 0x8000; -pub const O_DIRECT: ::c_int = 0x20000; - -pub const MAP_LOCKED: ::c_int = 0x00080; -pub const MAP_NORESERVE: ::c_int = 0x00040; - -pub const EDEADLOCK: ::c_int = 58; - -pub const SO_PEERCRED: ::c_int = 21; -pub const SO_RCVLOWAT: ::c_int = 16; -pub const SO_SNDLOWAT: ::c_int = 17; -pub const SO_RCVTIMEO: ::c_int = 18; -pub const SO_SNDTIMEO: ::c_int = 19; - -pub const FIOCLEX: ::c_ulong = 0x20006601; -pub const FIONBIO: ::c_ulong = 0x8004667e; - -s! { - pub struct stat { - pub st_dev: ::dev_t, - pub st_ino: ::ino_t, - pub st_nlink: ::nlink_t, - pub st_mode: ::mode_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - __pad0: ::c_int, - pub st_rdev: ::dev_t, - pub st_size: ::off_t, - pub st_blksize: ::blksize_t, - pub st_blocks: ::blkcnt_t, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - __unused: [::c_long; 3], - } - - pub struct stat64 { - pub st_dev: ::dev_t, - pub st_ino: ::ino64_t, - pub st_nlink: ::nlink_t, - pub st_mode: ::mode_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - __pad0: ::c_int, - pub st_rdev: ::dev_t, - pub st_size: ::off64_t, - pub st_blksize: ::blksize_t, - pub st_blocks: ::blkcnt64_t, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - __reserved: [::c_long; 3], - } - - pub struct pthread_attr_t { - __size: [u64; 7] - } -} diff --git a/deps/libc-0.2.7/src/unix/notbsd/linux/other/b64/x86_64.rs b/deps/libc-0.2.7/src/unix/notbsd/linux/other/b64/x86_64.rs deleted file mode 100644 index fc82c71e2..000000000 --- a/deps/libc-0.2.7/src/unix/notbsd/linux/other/b64/x86_64.rs +++ /dev/null @@ -1,82 +0,0 @@ -//! x86_64-specific definitions for 64-bit linux-like values - -pub type c_char = i8; -pub type wchar_t = i32; -pub type nlink_t = u64; -pub type blksize_t = i64; - -pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40; -pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4; - -pub const O_DIRECT: ::c_int = 0x4000; -pub const O_DIRECTORY: ::c_int = 0x10000; -pub const O_NOFOLLOW: ::c_int = 0x20000; - -pub const MAP_LOCKED: ::c_int = 0x02000; -pub const MAP_NORESERVE: ::c_int = 0x04000; - -pub const EDEADLOCK: ::c_int = 35; - -pub const SO_PEERCRED: ::c_int = 17; -pub const SO_RCVLOWAT: ::c_int = 18; -pub const SO_SNDLOWAT: ::c_int = 19; -pub const SO_RCVTIMEO: ::c_int = 20; -pub const SO_SNDTIMEO: ::c_int = 21; - -pub const FIOCLEX: ::c_ulong = 0x5451; -pub const FIONBIO: ::c_ulong = 0x5421; - -pub const PTRACE_GETFPREGS: ::c_uint = 14; -pub const PTRACE_SETFPREGS: ::c_uint = 15; -pub const PTRACE_GETFPXREGS: ::c_uint = 18; -pub const PTRACE_SETFPXREGS: ::c_uint = 19; -pub const PTRACE_GETREGS: ::c_uint = 12; -pub const PTRACE_SETREGS: ::c_uint = 13; - -s! { - pub struct stat { - pub st_dev: ::dev_t, - pub st_ino: ::ino_t, - pub st_nlink: ::nlink_t, - pub st_mode: ::mode_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - __pad0: ::c_int, - pub st_rdev: ::dev_t, - pub st_size: ::off_t, - pub st_blksize: ::blksize_t, - pub st_blocks: ::blkcnt_t, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - __unused: [::c_long; 3], - } - - pub struct stat64 { - pub st_dev: ::dev_t, - pub st_ino: ::ino64_t, - pub st_nlink: ::nlink_t, - pub st_mode: ::mode_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - __pad0: ::c_int, - pub st_rdev: ::dev_t, - pub st_size: ::off_t, - pub st_blksize: ::blksize_t, - pub st_blocks: ::blkcnt64_t, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - __reserved: [::c_long; 3], - } - - pub struct pthread_attr_t { - __size: [u64; 7] - } -} diff --git a/deps/libc-0.2.7/src/unix/notbsd/linux/other/mod.rs b/deps/libc-0.2.7/src/unix/notbsd/linux/other/mod.rs deleted file mode 100644 index 0a65f9540..000000000 --- a/deps/libc-0.2.7/src/unix/notbsd/linux/other/mod.rs +++ /dev/null @@ -1,499 +0,0 @@ -pub type fsblkcnt_t = ::c_ulong; -pub type fsfilcnt_t = ::c_ulong; -pub type rlim_t = c_ulong; - -s! { - pub struct sigaction { - pub sa_sigaction: ::sighandler_t, - pub sa_mask: ::sigset_t, - pub sa_flags: ::c_int, - _restorer: *mut ::c_void, - } - - pub struct stack_t { - pub ss_sp: *mut ::c_void, - pub ss_flags: ::c_int, - pub ss_size: ::size_t - } - - pub struct siginfo_t { - pub si_signo: ::c_int, - pub si_errno: ::c_int, - pub si_code: ::c_int, - pub _pad: [::c_int; 29], - _align: [usize; 0], - } - - pub struct glob64_t { - pub gl_pathc: ::size_t, - pub gl_pathv: *mut *mut ::c_char, - pub gl_offs: ::size_t, - pub gl_flags: ::c_int, - - __unused1: *mut ::c_void, - __unused2: *mut ::c_void, - __unused3: *mut ::c_void, - __unused4: *mut ::c_void, - __unused5: *mut ::c_void, - } - - - pub struct ucred { - pub pid: ::pid_t, - pub uid: ::uid_t, - pub gid: ::gid_t, - } - - pub struct statfs { - pub f_type: __fsword_t, - pub f_bsize: __fsword_t, - pub f_blocks: ::fsblkcnt_t, - pub f_bfree: ::fsblkcnt_t, - pub f_bavail: ::fsblkcnt_t, - - pub f_files: ::fsfilcnt_t, - pub f_ffree: ::fsfilcnt_t, - pub f_fsid: ::fsid_t, - - pub f_namelen: __fsword_t, - pub f_frsize: __fsword_t, - f_spare: [__fsword_t; 5], - } - - pub struct msghdr { - pub msg_name: *mut ::c_void, - pub msg_namelen: ::socklen_t, - pub msg_iov: *mut ::iovec, - pub msg_iovlen: ::size_t, - pub msg_control: *mut ::c_void, - pub msg_controllen: ::size_t, - pub msg_flags: ::c_int, - } - - pub struct termios { - pub c_iflag: ::tcflag_t, - pub c_oflag: ::tcflag_t, - pub c_cflag: ::tcflag_t, - pub c_lflag: ::tcflag_t, - pub c_line: ::cc_t, - pub c_cc: [::cc_t; ::NCCS], - pub c_ispeed: ::speed_t, - pub c_ospeed: ::speed_t, - } - - pub struct flock { - pub l_type: ::c_short, - pub l_whence: ::c_short, - pub l_start: ::off_t, - pub l_len: ::off_t, - pub l_pid: ::pid_t, - } -} - -pub const RLIMIT_RSS: ::c_int = 5; -pub const RLIMIT_NOFILE: ::c_int = 7; -pub const RLIMIT_AS: ::c_int = 9; -pub const RLIMIT_NPROC: ::c_int = 6; -pub const RLIMIT_MEMLOCK: ::c_int = 8; -pub const RLIM_INFINITY: ::rlim_t = !0; -pub const RLIMIT_RTTIME: ::c_int = 15; -pub const RLIMIT_NLIMITS: ::c_int = 16; - -pub const O_APPEND: ::c_int = 1024; -pub const O_CREAT: ::c_int = 64; -pub const O_EXCL: ::c_int = 128; -pub const O_NOCTTY: ::c_int = 256; -pub const O_NONBLOCK: ::c_int = 2048; -pub const O_SYNC: ::c_int = 1052672; -pub const O_RSYNC: ::c_int = 1052672; -pub const O_DSYNC: ::c_int = 4096; -pub const O_FSYNC: ::c_int = 0x101000; - -pub const SOCK_NONBLOCK: ::c_int = O_NONBLOCK; - -pub const MAP_ANON: ::c_int = 0x0020; -pub const MAP_ANONYMOUS: ::c_int = 0x0020; -pub const MAP_GROWSDOWN: ::c_int = 0x0100; -pub const MAP_DENYWRITE: ::c_int = 0x0800; -pub const MAP_EXECUTABLE: ::c_int = 0x01000; -pub const MAP_POPULATE: ::c_int = 0x08000; -pub const MAP_NONBLOCK: ::c_int = 0x010000; -pub const MAP_STACK: ::c_int = 0x020000; - -pub const EDEADLK: ::c_int = 35; -pub const ENAMETOOLONG: ::c_int = 36; -pub const ENOLCK: ::c_int = 37; -pub const ENOSYS: ::c_int = 38; -pub const ENOTEMPTY: ::c_int = 39; -pub const ELOOP: ::c_int = 40; -pub const ENOMSG: ::c_int = 42; -pub const EIDRM: ::c_int = 43; -pub const ECHRNG: ::c_int = 44; -pub const EL2NSYNC: ::c_int = 45; -pub const EL3HLT: ::c_int = 46; -pub const EL3RST: ::c_int = 47; -pub const ELNRNG: ::c_int = 48; -pub const EUNATCH: ::c_int = 49; -pub const ENOCSI: ::c_int = 50; -pub const EL2HLT: ::c_int = 51; -pub const EBADE: ::c_int = 52; -pub const EBADR: ::c_int = 53; -pub const EXFULL: ::c_int = 54; -pub const ENOANO: ::c_int = 55; -pub const EBADRQC: ::c_int = 56; -pub const EBADSLT: ::c_int = 57; -pub const EMULTIHOP: ::c_int = 72; -pub const EOVERFLOW: ::c_int = 75; -pub const ENOTUNIQ: ::c_int = 76; -pub const EBADFD: ::c_int = 77; -pub const EBADMSG: ::c_int = 74; -pub const EREMCHG: ::c_int = 78; -pub const ELIBACC: ::c_int = 79; -pub const ELIBBAD: ::c_int = 80; -pub const ELIBSCN: ::c_int = 81; -pub const ELIBMAX: ::c_int = 82; -pub const ELIBEXEC: ::c_int = 83; -pub const EILSEQ: ::c_int = 84; -pub const ERESTART: ::c_int = 85; -pub const ESTRPIPE: ::c_int = 86; -pub const EUSERS: ::c_int = 87; -pub const ENOTSOCK: ::c_int = 88; -pub const EDESTADDRREQ: ::c_int = 89; -pub const EMSGSIZE: ::c_int = 90; -pub const EPROTOTYPE: ::c_int = 91; -pub const ENOPROTOOPT: ::c_int = 92; -pub const EPROTONOSUPPORT: ::c_int = 93; -pub const ESOCKTNOSUPPORT: ::c_int = 94; -pub const EOPNOTSUPP: ::c_int = 95; -pub const EPFNOSUPPORT: ::c_int = 96; -pub const EAFNOSUPPORT: ::c_int = 97; -pub const EADDRINUSE: ::c_int = 98; -pub const EADDRNOTAVAIL: ::c_int = 99; -pub const ENETDOWN: ::c_int = 100; -pub const ENETUNREACH: ::c_int = 101; -pub const ENETRESET: ::c_int = 102; -pub const ECONNABORTED: ::c_int = 103; -pub const ECONNRESET: ::c_int = 104; -pub const ENOBUFS: ::c_int = 105; -pub const EISCONN: ::c_int = 106; -pub const ENOTCONN: ::c_int = 107; -pub const ESHUTDOWN: ::c_int = 108; -pub const ETOOMANYREFS: ::c_int = 109; -pub const ETIMEDOUT: ::c_int = 110; -pub const ECONNREFUSED: ::c_int = 111; -pub const EHOSTDOWN: ::c_int = 112; -pub const EHOSTUNREACH: ::c_int = 113; -pub const EALREADY: ::c_int = 114; -pub const EINPROGRESS: ::c_int = 115; -pub const ESTALE: ::c_int = 116; -pub const EUCLEAN: ::c_int = 117; -pub const ENOTNAM: ::c_int = 118; -pub const ENAVAIL: ::c_int = 119; -pub const EISNAM: ::c_int = 120; -pub const EREMOTEIO: ::c_int = 121; -pub const EDQUOT: ::c_int = 122; -pub const ENOMEDIUM: ::c_int = 123; -pub const EMEDIUMTYPE: ::c_int = 124; -pub const ECANCELED: ::c_int = 125; -pub const ENOKEY: ::c_int = 126; -pub const EKEYEXPIRED: ::c_int = 127; -pub const EKEYREVOKED: ::c_int = 128; -pub const EKEYREJECTED: ::c_int = 129; -pub const EOWNERDEAD: ::c_int = 130; -pub const ENOTRECOVERABLE: ::c_int = 131; -pub const EHWPOISON: ::c_int = 133; -pub const ERFKILL: ::c_int = 132; - -pub const SOCK_STREAM: ::c_int = 1; -pub const SOCK_DGRAM: ::c_int = 2; - -pub const SOL_SOCKET: ::c_int = 1; - -pub const SO_REUSEADDR: ::c_int = 2; -pub const SO_TYPE: ::c_int = 3; -pub const SO_ERROR: ::c_int = 4; -pub const SO_DONTROUTE: ::c_int = 5; -pub const SO_BROADCAST: ::c_int = 6; -pub const SO_SNDBUF: ::c_int = 7; -pub const SO_RCVBUF: ::c_int = 8; -pub const SO_KEEPALIVE: ::c_int = 9; -pub const SO_OOBINLINE: ::c_int = 10; -pub const SO_LINGER: ::c_int = 13; -pub const SO_REUSEPORT: ::c_int = 15; -pub const SO_ACCEPTCONN: ::c_int = 30; - -pub const TCP_COOKIE_TRANSACTIONS: ::c_int = 15; -pub const TCP_THIN_LINEAR_TIMEOUTS: ::c_int = 16; -pub const TCP_THIN_DUPACK: ::c_int = 17; -pub const TCP_USER_TIMEOUT: ::c_int = 18; -pub const TCP_REPAIR: ::c_int = 19; -pub const TCP_REPAIR_QUEUE: ::c_int = 20; -pub const TCP_QUEUE_SEQ: ::c_int = 21; -pub const TCP_REPAIR_OPTIONS: ::c_int = 22; -pub const TCP_FASTOPEN: ::c_int = 23; -pub const TCP_TIMESTAMP: ::c_int = 24; - -pub const SA_ONSTACK: ::c_int = 0x08000000; -pub const SA_SIGINFO: ::c_int = 0x00000004; -pub const SA_NOCLDWAIT: ::c_int = 0x00000002; - -pub const SIGCHLD: ::c_int = 17; -pub const SIGBUS: ::c_int = 7; -pub const SIGUSR1: ::c_int = 10; -pub const SIGUSR2: ::c_int = 12; -pub const SIGCONT: ::c_int = 18; -pub const SIGSTOP: ::c_int = 19; -pub const SIGTSTP: ::c_int = 20; -pub const SIGURG: ::c_int = 23; -pub const SIGIO: ::c_int = 29; -pub const SIGSYS: ::c_int = 31; -pub const SIGSTKFLT: ::c_int = 16; -pub const SIGUNUSED: ::c_int = 31; -pub const SIGTTIN: ::c_int = 21; -pub const SIGTTOU: ::c_int = 22; -pub const SIGXCPU: ::c_int = 24; -pub const SIGXFSZ: ::c_int = 25; -pub const SIGVTALRM: ::c_int = 26; -pub const SIGPROF: ::c_int = 27; -pub const SIGWINCH: ::c_int = 28; -pub const SIGPOLL: ::c_int = 29; -pub const SIGPWR: ::c_int = 30; -pub const SIG_SETMASK: ::c_int = 2; -pub const SIG_BLOCK: ::c_int = 0x000000; -pub const SIG_UNBLOCK: ::c_int = 0x01; - -pub const FALLOC_FL_KEEP_SIZE: ::c_int = 0x01; -pub const FALLOC_FL_PUNCH_HOLE: ::c_int = 0x02; - -pub const BUFSIZ: ::c_uint = 8192; -pub const TMP_MAX: ::c_uint = 238328; -pub const FOPEN_MAX: ::c_uint = 16; -pub const POSIX_MADV_DONTNEED: ::c_int = 4; -pub const _SC_2_C_VERSION: ::c_int = 96; -pub const RUSAGE_THREAD: ::c_int = 1; -pub const O_ACCMODE: ::c_int = 3; -pub const O_ASYNC: ::c_int = 0x2000; -pub const O_NDELAY: ::c_int = 0x800; -pub const RUSAGE_CHILDREN: ::c_int = -1; -pub const ST_RELATIME: ::c_ulong = 4096; -pub const NI_MAXHOST: ::socklen_t = 1025; - -pub const ADFS_SUPER_MAGIC: ::c_long = 0x0000adf5; -pub const AFFS_SUPER_MAGIC: ::c_long = 0x0000adff; -pub const CODA_SUPER_MAGIC: ::c_long = 0x73757245; -pub const CRAMFS_MAGIC: ::c_long = 0x28cd3d45; -pub const EFS_SUPER_MAGIC: ::c_long = 0x00414a53; -pub const EXT2_SUPER_MAGIC: ::c_long = 0x0000ef53; -pub const EXT3_SUPER_MAGIC: ::c_long = 0x0000ef53; -pub const EXT4_SUPER_MAGIC: ::c_long = 0x0000ef53; -pub const HPFS_SUPER_MAGIC: ::c_long = 0xf995e849; -pub const HUGETLBFS_MAGIC: ::c_long = 0x958458f6; -pub const ISOFS_SUPER_MAGIC: ::c_long = 0x00009660; -pub const JFFS2_SUPER_MAGIC: ::c_long = 0x000072b6; -pub const MINIX_SUPER_MAGIC: ::c_long = 0x0000137f; -pub const MINIX_SUPER_MAGIC2: ::c_long = 0x0000138f; -pub const MINIX2_SUPER_MAGIC: ::c_long = 0x00002468; -pub const MINIX2_SUPER_MAGIC2: ::c_long = 0x00002478; -pub const MSDOS_SUPER_MAGIC: ::c_long = 0x00004d44; -pub const NCP_SUPER_MAGIC: ::c_long = 0x0000564c; -pub const NFS_SUPER_MAGIC: ::c_long = 0x00006969; -pub const OPENPROM_SUPER_MAGIC: ::c_long = 0x00009fa1; -pub const PROC_SUPER_MAGIC: ::c_long = 0x00009fa0; -pub const QNX4_SUPER_MAGIC: ::c_long = 0x0000002f; -pub const REISERFS_SUPER_MAGIC: ::c_long = 0x52654973; -pub const SMB_SUPER_MAGIC: ::c_long = 0x0000517b; -pub const TMPFS_MAGIC: ::c_long = 0x01021994; -pub const USBDEVICE_SUPER_MAGIC: ::c_long = 0x00009fa2; - -pub const VEOF: usize = 4; -pub const VEOL: usize = 11; -pub const VEOL2: usize = 16; -pub const VMIN: usize = 6; -pub const IEXTEN: ::tcflag_t = 0x00008000; -pub const TOSTOP: ::tcflag_t = 0x00000100; -pub const FLUSHO: ::tcflag_t = 0x00001000; -pub const IUTF8: ::tcflag_t = 0x00004000; - -pub const CPU_SETSIZE: ::c_int = 0x400; - -pub const EXTPROC: ::tcflag_t = 0x00010000; - -pub const QFMT_VFS_V1: ::c_int = 4; - -pub const PTRACE_TRACEME: ::c_uint = 0; -pub const PTRACE_PEEKTEXT: ::c_uint = 1; -pub const PTRACE_PEEKDATA: ::c_uint = 2; -pub const PTRACE_PEEKUSER: ::c_uint = 3; -pub const PTRACE_POKETEXT: ::c_uint = 4; -pub const PTRACE_POKEDATA: ::c_uint = 5; -pub const PTRACE_POKEUSER: ::c_uint = 6; -pub const PTRACE_CONT: ::c_uint = 7; -pub const PTRACE_KILL: ::c_uint = 8; -pub const PTRACE_SINGLESTEP: ::c_uint = 9; -pub const PTRACE_ATTACH: ::c_uint = 16; -pub const PTRACE_DETACH: ::c_uint = 17; -pub const PTRACE_SYSCALL: ::c_uint = 24; -pub const PTRACE_SETOPTIONS: ::c_uint = 0x4200; -pub const PTRACE_GETEVENTMSG: ::c_uint = 0x4201; -pub const PTRACE_GETSIGINFO: ::c_uint = 0x4202; -pub const PTRACE_SETSIGINFO: ::c_uint = 0x4203; -pub const PTRACE_GETREGSET: ::c_uint = 0x4204; -pub const PTRACE_SETREGSET: ::c_uint = 0x4205; -pub const PTRACE_SEIZE: ::c_uint = 0x4206; -pub const PTRACE_INTERRUPT: ::c_uint = 0x4207; -pub const PTRACE_LISTEN: ::c_uint = 0x4208; -pub const PTRACE_PEEKSIGINFO: ::c_uint = 0x4209; - -pub const MADV_DODUMP: ::c_int = 17; -pub const MADV_DONTDUMP: ::c_int = 16; - -pub const EPOLLWAKEUP: ::c_int = 0x20000000; - -pub const MADV_HUGEPAGE: ::c_int = 14; -pub const MADV_NOHUGEPAGE: ::c_int = 15; -pub const MAP_HUGETLB: ::c_int = 0x040000; - -pub const EFD_NONBLOCK: ::c_int = 0x800; - -pub const F_GETLK: ::c_int = 5; -pub const F_GETOWN: ::c_int = 9; -pub const F_SETOWN: ::c_int = 8; -pub const F_SETLK: ::c_int = 6; -pub const F_SETLKW: ::c_int = 7; - -pub const SFD_NONBLOCK: ::c_int = 0x0800; - -pub const TCSANOW: ::c_int = 0; -pub const TCSADRAIN: ::c_int = 1; -pub const TCSAFLUSH: ::c_int = 2; - -pub const TCGETS: ::c_ulong = 0x5401; -pub const TCSETS: ::c_ulong = 0x5402; -pub const TCSETSW: ::c_ulong = 0x5403; -pub const TCSETSF: ::c_ulong = 0x5404; -pub const TCGETA: ::c_ulong = 0x5405; -pub const TCSETA: ::c_ulong = 0x5406; -pub const TCSETAW: ::c_ulong = 0x5407; -pub const TCSETAF: ::c_ulong = 0x5408; -pub const TCSBRK: ::c_ulong = 0x5409; -pub const TCXONC: ::c_ulong = 0x540A; -pub const TCFLSH: ::c_ulong = 0x540B; -pub const TIOCGSOFTCAR: ::c_ulong = 0x5419; -pub const TIOCSSOFTCAR: ::c_ulong = 0x541A; -pub const TIOCINQ: ::c_ulong = 0x541B; -pub const TIOCLINUX: ::c_ulong = 0x541C; -pub const TIOCGSERIAL: ::c_ulong = 0x541E; -pub const TIOCEXCL: ::c_ulong = 0x540C; -pub const TIOCNXCL: ::c_ulong = 0x540D; -pub const TIOCSCTTY: ::c_ulong = 0x540E; -pub const TIOCGPGRP: ::c_ulong = 0x540F; -pub const TIOCSPGRP: ::c_ulong = 0x5410; -pub const TIOCOUTQ: ::c_ulong = 0x5411; -pub const TIOCSTI: ::c_ulong = 0x5412; -pub const TIOCGWINSZ: ::c_ulong = 0x5413; -pub const TIOCSWINSZ: ::c_ulong = 0x5414; -pub const TIOCMGET: ::c_ulong = 0x5415; -pub const TIOCMBIS: ::c_ulong = 0x5416; -pub const TIOCMBIC: ::c_ulong = 0x5417; -pub const TIOCMSET: ::c_ulong = 0x5418; -pub const FIONREAD: ::c_ulong = 0x541B; -pub const TIOCCONS: ::c_ulong = 0x541D; - -pub const RTLD_DEEPBIND: ::c_int = 0x8; -pub const RTLD_GLOBAL: ::c_int = 0x100; -pub const RTLD_NOLOAD: ::c_int = 0x4; - -cfg_if! { - if #[cfg(any(target_arch = "arm", target_arch = "x86", - target_arch = "x86_64"))] { - pub const PTHREAD_STACK_MIN: ::size_t = 16384; - } else { - pub const PTHREAD_STACK_MIN: ::size_t = 131072; - } -} - -extern { - pub fn sysctl(name: *mut ::c_int, - namelen: ::c_int, - oldp: *mut ::c_void, - oldlenp: *mut ::size_t, - newp: *mut ::c_void, - newlen: ::size_t) - -> ::c_int; - pub fn ioctl(fd: ::c_int, request: ::c_ulong, ...) -> ::c_int; - pub fn backtrace(buf: *mut *mut ::c_void, - sz: ::c_int) -> ::c_int; - pub fn glob64(pattern: *const ::c_char, - flags: ::c_int, - errfunc: ::dox::Option ::c_int>, - pglob: *mut glob64_t) -> ::c_int; - pub fn globfree64(pglob: *mut glob64_t); - pub fn getnameinfo(sa: *const ::sockaddr, - salen: ::socklen_t, - host: *mut ::c_char, - hostlen: ::socklen_t, - serv: *mut ::c_char, - sevlen: ::socklen_t, - flags: ::c_int) -> ::c_int; - pub fn eventfd(init: ::c_uint, flags: ::c_int) -> ::c_int; - pub fn ptrace(request: ::c_uint, ...) -> ::c_long; - pub fn pthread_attr_getaffinity_np(attr: *const ::pthread_attr_t, - cpusetsize: ::size_t, - cpuset: *mut ::cpu_set_t) -> ::c_int; - pub fn pthread_attr_setaffinity_np(attr: *mut ::pthread_attr_t, - cpusetsize: ::size_t, - cpuset: *const ::cpu_set_t) -> ::c_int; -} - -cfg_if! { - if #[cfg(any(target_arch = "x86", - target_arch = "arm", - target_arch = "powerpc"))] { - mod b32; - pub use self::b32::*; - } else if #[cfg(any(target_arch = "x86_64", - target_arch = "aarch64", - target_arch = "powerpc64", - target_arch = "powerpc64le"))] { - mod b64; - pub use self::b64::*; - } else { - // ... - } -} - -s! { - pub struct ipc_perm { - pub __key: ::key_t, - pub uid: ::uid_t, - pub gid: ::gid_t, - pub cuid: ::uid_t, - pub cgid: ::gid_t, - pub mode: ::c_ushort, - __pad1: ::c_ushort, - pub __seq: ::c_ushort, - __pad2: ::c_ushort, - __unused1: ::c_ulong, - __unused2: ::c_ulong - } - - pub struct shmid_ds { - pub shm_perm: ::ipc_perm, - pub shm_segsz: ::size_t, - pub shm_atime: ::time_t, - #[cfg(target_pointer_width = "32")] - __unused1: ::c_ulong, - pub shm_dtime: ::time_t, - #[cfg(target_pointer_width = "32")] - __unused2: ::c_ulong, - pub shm_ctime: ::time_t, - #[cfg(target_pointer_width = "32")] - __unused3: ::c_ulong, - pub shm_cpid: ::pid_t, - pub shm_lpid: ::pid_t, - pub shm_nattch: ::shmatt_t, - __unused4: ::c_ulong, - __unused5: ::c_ulong - } -} diff --git a/deps/libc-0.2.7/src/unix/notbsd/mod.rs b/deps/libc-0.2.7/src/unix/notbsd/mod.rs deleted file mode 100644 index 83b4f0ba7..000000000 --- a/deps/libc-0.2.7/src/unix/notbsd/mod.rs +++ /dev/null @@ -1,658 +0,0 @@ -use dox::mem; - -pub type sa_family_t = u16; -pub type pthread_key_t = ::c_uint; -pub type speed_t = ::c_uint; -pub type tcflag_t = ::c_uint; -pub type loff_t = ::c_longlong; - -pub enum timezone {} - -s! { - pub struct sockaddr { - pub sa_family: sa_family_t, - pub sa_data: [::c_char; 14], - } - - pub struct sockaddr_in { - pub sin_family: sa_family_t, - pub sin_port: ::in_port_t, - pub sin_addr: ::in_addr, - pub sin_zero: [u8; 8], - } - - pub struct sockaddr_in6 { - pub sin6_family: sa_family_t, - pub sin6_port: ::in_port_t, - pub sin6_flowinfo: u32, - pub sin6_addr: ::in6_addr, - pub sin6_scope_id: u32, - } - - pub struct sockaddr_un { - pub sun_family: sa_family_t, - pub sun_path: [::c_char; 108] - } - - pub struct sockaddr_storage { - pub ss_family: sa_family_t, - __ss_align: ::size_t, - #[cfg(target_pointer_width = "32")] - __ss_pad2: [u8; 128 - 2 * 4], - #[cfg(target_pointer_width = "64")] - __ss_pad2: [u8; 128 - 2 * 8], - } - - pub struct addrinfo { - pub ai_flags: ::c_int, - pub ai_family: ::c_int, - pub ai_socktype: ::c_int, - pub ai_protocol: ::c_int, - pub ai_addrlen: socklen_t, - - #[cfg(any(target_os = "linux", target_os = "emscripten"))] - pub ai_addr: *mut ::sockaddr, - - pub ai_canonname: *mut c_char, - - #[cfg(target_os = "android")] - pub ai_addr: *mut ::sockaddr, - - pub ai_next: *mut addrinfo, - } - - pub struct sockaddr_ll { - pub sll_family: ::c_ushort, - pub sll_protocol: ::c_ushort, - pub sll_ifindex: ::c_int, - pub sll_hatype: ::c_ushort, - pub sll_pkttype: ::c_uchar, - pub sll_halen: ::c_uchar, - pub sll_addr: [::c_uchar; 8] - } - - pub struct fd_set { - fds_bits: [::c_ulong; FD_SETSIZE / ULONG_SIZE], - } - - pub struct tm { - pub tm_sec: ::c_int, - pub tm_min: ::c_int, - pub tm_hour: ::c_int, - pub tm_mday: ::c_int, - pub tm_mon: ::c_int, - pub tm_year: ::c_int, - pub tm_wday: ::c_int, - pub tm_yday: ::c_int, - pub tm_isdst: ::c_int, - pub tm_gmtoff: ::c_long, - pub tm_zone: *const ::c_char, - } - - pub struct sched_param { - pub sched_priority: ::c_int, - #[cfg(target_env = "musl")] - pub sched_ss_low_priority: ::c_int, - #[cfg(target_env = "musl")] - pub sched_ss_repl_period: ::timespec, - #[cfg(target_env = "musl")] - pub sched_ss_init_budget: ::timespec, - #[cfg(target_env = "musl")] - pub sched_ss_max_repl: ::c_int, - } - - pub struct Dl_info { - pub dli_fname: *const ::c_char, - pub dli_fbase: *mut ::c_void, - pub dli_sname: *const ::c_char, - pub dli_saddr: *mut ::c_void, - } - - #[cfg_attr(any(all(target_arch = "x86", not(target_env = "musl")), - target_arch = "x86_64"), - repr(packed))] - pub struct epoll_event { - pub events: ::uint32_t, - pub u64: ::uint64_t, - } - - pub struct utsname { - pub sysname: [::c_char; 65], - pub nodename: [::c_char; 65], - pub release: [::c_char; 65], - pub version: [::c_char; 65], - pub machine: [::c_char; 65], - pub domainname: [::c_char; 65] - } -} - -// intentionally not public, only used for fd_set -#[cfg(target_pointer_width = "32")] -const ULONG_SIZE: usize = 32; -#[cfg(target_pointer_width = "64")] -const ULONG_SIZE: usize = 64; - -pub const EXIT_FAILURE: ::c_int = 1; -pub const EXIT_SUCCESS: ::c_int = 0; -pub const RAND_MAX: ::c_int = 2147483647; -pub const EOF: ::c_int = -1; -pub const SEEK_SET: ::c_int = 0; -pub const SEEK_CUR: ::c_int = 1; -pub const SEEK_END: ::c_int = 2; -pub const _IOFBF: ::c_int = 0; -pub const _IONBF: ::c_int = 2; -pub const _IOLBF: ::c_int = 1; - -pub const F_DUPFD: ::c_int = 0; -pub const F_GETFD: ::c_int = 1; -pub const F_SETFD: ::c_int = 2; -pub const F_GETFL: ::c_int = 3; -pub const F_SETFL: ::c_int = 4; - -pub const SIGTRAP: ::c_int = 5; - -pub const PTHREAD_CREATE_JOINABLE: ::c_int = 0; -pub const PTHREAD_CREATE_DETACHED: ::c_int = 1; - -pub const CLOCK_REALTIME: ::c_int = 0; -pub const CLOCK_MONOTONIC: ::c_int = 1; - -pub const RLIMIT_CPU: ::c_int = 0; -pub const RLIMIT_FSIZE: ::c_int = 1; -pub const RLIMIT_DATA: ::c_int = 2; -pub const RLIMIT_STACK: ::c_int = 3; -pub const RLIMIT_CORE: ::c_int = 4; -pub const RLIMIT_LOCKS: ::c_int = 10; -pub const RLIMIT_SIGPENDING: ::c_int = 11; -pub const RLIMIT_MSGQUEUE: ::c_int = 12; -pub const RLIMIT_NICE: ::c_int = 13; -pub const RLIMIT_RTPRIO: ::c_int = 14; - -pub const RUSAGE_SELF: ::c_int = 0; - -pub const O_RDONLY: ::c_int = 0; -pub const O_WRONLY: ::c_int = 1; -pub const O_RDWR: ::c_int = 2; -pub const O_TRUNC: ::c_int = 512; -pub const O_CLOEXEC: ::c_int = 0x80000; - -pub const SOCK_CLOEXEC: ::c_int = O_CLOEXEC; - -pub const S_IFIFO: ::mode_t = 4096; -pub const S_IFCHR: ::mode_t = 8192; -pub const S_IFBLK: ::mode_t = 24576; -pub const S_IFDIR: ::mode_t = 16384; -pub const S_IFREG: ::mode_t = 32768; -pub const S_IFLNK: ::mode_t = 40960; -pub const S_IFSOCK: ::mode_t = 49152; -pub const S_IFMT: ::mode_t = 61440; -pub const S_IRWXU: ::mode_t = 448; -pub const S_IXUSR: ::mode_t = 64; -pub const S_IWUSR: ::mode_t = 128; -pub const S_IRUSR: ::mode_t = 256; -pub const S_IRWXG: ::mode_t = 56; -pub const S_IXGRP: ::mode_t = 8; -pub const S_IWGRP: ::mode_t = 16; -pub const S_IRGRP: ::mode_t = 32; -pub const S_IRWXO: ::mode_t = 7; -pub const S_IXOTH: ::mode_t = 1; -pub const S_IWOTH: ::mode_t = 2; -pub const S_IROTH: ::mode_t = 4; -pub const F_OK: ::c_int = 0; -pub const R_OK: ::c_int = 4; -pub const W_OK: ::c_int = 2; -pub const X_OK: ::c_int = 1; -pub const STDIN_FILENO: ::c_int = 0; -pub const STDOUT_FILENO: ::c_int = 1; -pub const STDERR_FILENO: ::c_int = 2; -pub const SIGHUP: ::c_int = 1; -pub const SIGINT: ::c_int = 2; -pub const SIGQUIT: ::c_int = 3; -pub const SIGILL: ::c_int = 4; -pub const SIGABRT: ::c_int = 6; -pub const SIGFPE: ::c_int = 8; -pub const SIGKILL: ::c_int = 9; -pub const SIGSEGV: ::c_int = 11; -pub const SIGPIPE: ::c_int = 13; -pub const SIGALRM: ::c_int = 14; -pub const SIGTERM: ::c_int = 15; - -pub const PROT_NONE: ::c_int = 0; -pub const PROT_READ: ::c_int = 1; -pub const PROT_WRITE: ::c_int = 2; -pub const PROT_EXEC: ::c_int = 4; - -pub const MAP_FILE: ::c_int = 0x0000; -pub const MAP_SHARED: ::c_int = 0x0001; -pub const MAP_PRIVATE: ::c_int = 0x0002; -pub const MAP_FIXED: ::c_int = 0x0010; - -pub const MAP_FAILED: *mut ::c_void = !0 as *mut ::c_void; - -pub const MCL_CURRENT: ::c_int = 0x0001; -pub const MCL_FUTURE: ::c_int = 0x0002; - -pub const MS_ASYNC: ::c_int = 0x0001; -pub const MS_INVALIDATE: ::c_int = 0x0002; -pub const MS_SYNC: ::c_int = 0x0004; -pub const MS_RDONLY: ::c_ulong = 0x01; -pub const MS_NOSUID: ::c_ulong = 0x02; -pub const MS_NODEV: ::c_ulong = 0x04; -pub const MS_NOEXEC: ::c_ulong = 0x08; -pub const MS_SYNCHRONOUS: ::c_ulong = 0x10; -pub const MS_REMOUNT: ::c_ulong = 0x20; -pub const MS_MANDLOCK: ::c_ulong = 0x40; -pub const MS_DIRSYNC: ::c_ulong = 0x80; -pub const MS_NOATIME: ::c_ulong = 0x0400; -pub const MS_NODIRATIME: ::c_ulong = 0x0800; -pub const MS_BIND: ::c_ulong = 0x1000; -pub const MS_MOVE: ::c_ulong = 0x2000; -pub const MS_REC: ::c_ulong = 0x4000; -pub const MS_SILENT: ::c_ulong = 0x8000; -pub const MS_POSIXACL: ::c_ulong = 0x010000; -pub const MS_UNBINDABLE: ::c_ulong = 0x020000; -pub const MS_PRIVATE: ::c_ulong = 0x040000; -pub const MS_SLAVE: ::c_ulong = 0x080000; -pub const MS_SHARED: ::c_ulong = 0x100000; -pub const MS_ACTIVE: ::c_ulong = 0x40000000; -pub const MS_NOUSER: ::c_ulong = 0x80000000; -pub const MS_MGC_VAL: ::c_ulong = 0xc0ed0000; -pub const MS_MGC_MSK: ::c_ulong = 0xffff0000; -pub const MS_RMT_MASK: ::c_ulong = 0x800051; - -pub const EPERM: ::c_int = 1; -pub const ENOENT: ::c_int = 2; -pub const ESRCH: ::c_int = 3; -pub const EINTR: ::c_int = 4; -pub const EIO: ::c_int = 5; -pub const ENXIO: ::c_int = 6; -pub const E2BIG: ::c_int = 7; -pub const ENOEXEC: ::c_int = 8; -pub const EBADF: ::c_int = 9; -pub const ECHILD: ::c_int = 10; -pub const EAGAIN: ::c_int = 11; -pub const ENOMEM: ::c_int = 12; -pub const EACCES: ::c_int = 13; -pub const EFAULT: ::c_int = 14; -pub const ENOTBLK: ::c_int = 15; -pub const EBUSY: ::c_int = 16; -pub const EEXIST: ::c_int = 17; -pub const EXDEV: ::c_int = 18; -pub const ENODEV: ::c_int = 19; -pub const ENOTDIR: ::c_int = 20; -pub const EISDIR: ::c_int = 21; -pub const EINVAL: ::c_int = 22; -pub const ENFILE: ::c_int = 23; -pub const EMFILE: ::c_int = 24; -pub const ENOTTY: ::c_int = 25; -pub const ETXTBSY: ::c_int = 26; -pub const EFBIG: ::c_int = 27; -pub const ENOSPC: ::c_int = 28; -pub const ESPIPE: ::c_int = 29; -pub const EROFS: ::c_int = 30; -pub const EMLINK: ::c_int = 31; -pub const EPIPE: ::c_int = 32; -pub const EDOM: ::c_int = 33; -pub const ERANGE: ::c_int = 34; -pub const EWOULDBLOCK: ::c_int = EAGAIN; - -pub const EBFONT: ::c_int = 59; -pub const ENOSTR: ::c_int = 60; -pub const ENODATA: ::c_int = 61; -pub const ETIME: ::c_int = 62; -pub const ENOSR: ::c_int = 63; -pub const ENONET: ::c_int = 64; -pub const ENOPKG: ::c_int = 65; -pub const EREMOTE: ::c_int = 66; -pub const ENOLINK: ::c_int = 67; -pub const EADV: ::c_int = 68; -pub const ESRMNT: ::c_int = 69; -pub const ECOMM: ::c_int = 70; -pub const EPROTO: ::c_int = 71; -pub const EDOTDOT: ::c_int = 73; - -pub const AF_PACKET: ::c_int = 17; -pub const IPPROTO_RAW: ::c_int = 255; - -pub const PROT_GROWSDOWN: ::c_int = 0x1000000; -pub const PROT_GROWSUP: ::c_int = 0x2000000; - -pub const MAP_TYPE: ::c_int = 0x000f; - -pub const MADV_NORMAL: ::c_int = 0; -pub const MADV_RANDOM: ::c_int = 1; -pub const MADV_SEQUENTIAL: ::c_int = 2; -pub const MADV_WILLNEED: ::c_int = 3; -pub const MADV_DONTNEED: ::c_int = 4; -pub const MADV_REMOVE: ::c_int = 9; -pub const MADV_DONTFORK: ::c_int = 10; -pub const MADV_DOFORK: ::c_int = 11; -pub const MADV_MERGEABLE: ::c_int = 12; -pub const MADV_UNMERGEABLE: ::c_int = 13; -pub const MADV_HWPOISON: ::c_int = 100; - -pub const IFF_LOOPBACK: ::c_int = 0x8; - -pub const AF_UNIX: ::c_int = 1; -pub const AF_INET: ::c_int = 2; -pub const AF_INET6: ::c_int = 10; -pub const SOCK_RAW: ::c_int = 3; -pub const IPPROTO_TCP: ::c_int = 6; -pub const IPPROTO_IP: ::c_int = 0; -pub const IPPROTO_IPV6: ::c_int = 41; -pub const IP_MULTICAST_TTL: ::c_int = 33; -pub const IP_MULTICAST_LOOP: ::c_int = 34; -pub const IP_TTL: ::c_int = 2; -pub const IP_HDRINCL: ::c_int = 3; -pub const IP_ADD_MEMBERSHIP: ::c_int = 35; -pub const IP_DROP_MEMBERSHIP: ::c_int = 36; -pub const IP_TRANSPARENT: ::c_int = 19; -pub const IPV6_ADD_MEMBERSHIP: ::c_int = 20; -pub const IPV6_DROP_MEMBERSHIP: ::c_int = 21; - -pub const TCP_NODELAY: ::c_int = 1; -pub const TCP_MAXSEG: ::c_int = 2; -pub const TCP_CORK: ::c_int = 3; -pub const TCP_KEEPIDLE: ::c_int = 4; -pub const TCP_KEEPINTVL: ::c_int = 5; -pub const TCP_KEEPCNT: ::c_int = 6; -pub const TCP_SYNCNT: ::c_int = 7; -pub const TCP_LINGER2: ::c_int = 8; -pub const TCP_DEFER_ACCEPT: ::c_int = 9; -pub const TCP_WINDOW_CLAMP: ::c_int = 10; -pub const TCP_INFO: ::c_int = 11; -pub const TCP_QUICKACK: ::c_int = 12; -pub const TCP_CONGESTION: ::c_int = 13; - -pub const IPV6_MULTICAST_LOOP: ::c_int = 19; -pub const IPV6_V6ONLY: ::c_int = 26; - -pub const SO_DEBUG: ::c_int = 1; - -pub const SHUT_RD: ::c_int = 0; -pub const SHUT_WR: ::c_int = 1; -pub const SHUT_RDWR: ::c_int = 2; - -pub const LOCK_SH: ::c_int = 1; -pub const LOCK_EX: ::c_int = 2; -pub const LOCK_NB: ::c_int = 4; -pub const LOCK_UN: ::c_int = 8; - -pub const SIGSTKSZ: ::size_t = 8192; - -pub const SA_NODEFER: ::c_int = 0x40000000; -pub const SA_RESETHAND: ::c_int = 0x80000000; -pub const SA_RESTART: ::c_int = 0x10000000; -pub const SA_NOCLDSTOP: ::c_int = 0x00000001; - -pub const PATH_MAX: ::c_int = 4096; - -pub const FD_SETSIZE: usize = 1024; - -pub const EPOLLIN: ::c_int = 0x1; -pub const EPOLLPRI: ::c_int = 0x2; -pub const EPOLLOUT: ::c_int = 0x4; -pub const EPOLLRDNORM: ::c_int = 0x40; -pub const EPOLLRDBAND: ::c_int = 0x80; -pub const EPOLLWRNORM: ::c_int = 0x100; -pub const EPOLLWRBAND: ::c_int = 0x200; -pub const EPOLLMSG: ::c_int = 0x400; -pub const EPOLLERR: ::c_int = 0x8; -pub const EPOLLHUP: ::c_int = 0x10; -pub const EPOLLET: ::c_int = 0x80000000; - -pub const EPOLL_CTL_ADD: ::c_int = 1; -pub const EPOLL_CTL_MOD: ::c_int = 3; -pub const EPOLL_CTL_DEL: ::c_int = 2; - -pub const MNT_DETACH: ::c_int = 0x2; -pub const MNT_EXPIRE: ::c_int = 0x4; - -pub const Q_GETFMT: ::c_int = 0x800004; -pub const Q_GETINFO: ::c_int = 0x800005; -pub const Q_SETINFO: ::c_int = 0x800006; -pub const QIF_BLIMITS: ::uint32_t = 1; -pub const QIF_SPACE: ::uint32_t = 2; -pub const QIF_ILIMITS: ::uint32_t = 4; -pub const QIF_INODES: ::uint32_t = 8; -pub const QIF_BTIME: ::uint32_t = 16; -pub const QIF_ITIME: ::uint32_t = 32; -pub const QIF_LIMITS: ::uint32_t = 5; -pub const QIF_USAGE: ::uint32_t = 10; -pub const QIF_TIMES: ::uint32_t = 48; -pub const QIF_ALL: ::uint32_t = 63; - -pub const CBAUD: ::tcflag_t = 0o0010017; - -pub const EFD_CLOEXEC: ::c_int = 0x80000; - -pub const MNT_FORCE: ::c_int = 0x1; - -pub const Q_SYNC: ::c_int = 0x800001; -pub const Q_QUOTAON: ::c_int = 0x800002; -pub const Q_QUOTAOFF: ::c_int = 0x800003; -pub const Q_GETQUOTA: ::c_int = 0x800007; -pub const Q_SETQUOTA: ::c_int = 0x800008; - -pub const TCIOFF: ::c_int = 2; -pub const TCION: ::c_int = 3; -pub const TCOOFF: ::c_int = 0; -pub const TCOON: ::c_int = 1; -pub const TCIFLUSH: ::c_int = 0; -pub const TCOFLUSH: ::c_int = 1; -pub const TCIOFLUSH: ::c_int = 2; -pub const NL0: ::c_int = 0x00000000; -pub const NL1: ::c_int = 0x00000100; -pub const TAB0: ::c_int = 0x00000000; -pub const TAB1: ::c_int = 0x00000800; -pub const TAB2: ::c_int = 0x00001000; -pub const TAB3: ::c_int = 0x00001800; -pub const CR0: ::c_int = 0x00000000; -pub const CR1: ::c_int = 0x00000200; -pub const CR2: ::c_int = 0x00000400; -pub const CR3: ::c_int = 0x00000600; -pub const FF0: ::c_int = 0x00000000; -pub const FF1: ::c_int = 0x00008000; -pub const BS0: ::c_int = 0x00000000; -pub const BS1: ::c_int = 0x00002000; -pub const VT0: ::c_int = 0x00000000; -pub const VT1: ::c_int = 0x00004000; -pub const VERASE: usize = 2; -pub const VWERASE: usize = 14; -pub const VKILL: usize = 3; -pub const VREPRINT: usize = 12; -pub const VINTR: usize = 0; -pub const VQUIT: usize = 1; -pub const VSUSP: usize = 10; -pub const VSTART: usize = 8; -pub const VSTOP: usize = 9; -pub const VLNEXT: usize = 15; -pub const VDISCARD: usize = 13; -pub const VTIME: usize = 5; -pub const IGNBRK: ::tcflag_t = 0x00000001; -pub const BRKINT: ::tcflag_t = 0x00000002; -pub const IGNPAR: ::tcflag_t = 0x00000004; -pub const PARMRK: ::tcflag_t = 0x00000008; -pub const INPCK: ::tcflag_t = 0x00000010; -pub const ISTRIP: ::tcflag_t = 0x00000020; -pub const INLCR: ::tcflag_t = 0x00000040; -pub const IGNCR: ::tcflag_t = 0x00000080; -pub const ICRNL: ::tcflag_t = 0x00000100; -pub const IXON: ::tcflag_t = 0x00000400; -pub const IXOFF: ::tcflag_t = 0x00001000; -pub const IXANY: ::tcflag_t = 0x00000800; -pub const IMAXBEL: ::tcflag_t = 0x00002000; -pub const OPOST: ::tcflag_t = 0x1; -pub const ONLCR: ::tcflag_t = 0x4; -pub const CSIZE: ::tcflag_t = 0x00000030; -pub const CS5: ::tcflag_t = 0x00000000; -pub const CS6: ::tcflag_t = 0x00000010; -pub const CS7: ::tcflag_t = 0x00000020; -pub const CS8: ::tcflag_t = 0x00000030; -pub const CSTOPB: ::tcflag_t = 0x00000040; -pub const CREAD: ::tcflag_t = 0x00000080; -pub const PARENB: ::tcflag_t = 0x00000100; -pub const PARODD: ::tcflag_t = 0x00000200; -pub const HUPCL: ::tcflag_t = 0x00000400; -pub const CLOCAL: ::tcflag_t = 0x00000800; -pub const CRTSCTS: ::tcflag_t = 0x80000000; -pub const ECHOKE: ::tcflag_t = 0x00000800; -pub const ECHOE: ::tcflag_t = 0x00000010; -pub const ECHOK: ::tcflag_t = 0x00000020; -pub const ECHO: ::tcflag_t = 0x00000008; -pub const ECHONL: ::tcflag_t = 0x00000040; -pub const ECHOPRT: ::tcflag_t = 0x00000400; -pub const ECHOCTL: ::tcflag_t = 0x00000200; -pub const ISIG: ::tcflag_t = 0x00000001; -pub const ICANON: ::tcflag_t = 0x00000002; -pub const PENDIN: ::tcflag_t = 0x00004000; -pub const NOFLSH: ::tcflag_t = 0x00000080; - -pub const CLONE_VM: ::c_int = 0x100; -pub const CLONE_FS: ::c_int = 0x200; -pub const CLONE_FILES: ::c_int = 0x400; -pub const CLONE_SIGHAND: ::c_int = 0x800; -pub const CLONE_PTRACE: ::c_int = 0x2000; -pub const CLONE_VFORK: ::c_int = 0x4000; -pub const CLONE_PARENT: ::c_int = 0x8000; -pub const CLONE_THREAD: ::c_int = 0x10000; -pub const CLONE_NEWNS: ::c_int = 0x20000; -pub const CLONE_SYSVSEM: ::c_int = 0x40000; -pub const CLONE_SETTLS: ::c_int = 0x80000; -pub const CLONE_PARENT_SETTID: ::c_int = 0x100000; -pub const CLONE_CHILD_CLEARTID: ::c_int = 0x200000; -pub const CLONE_DETACHED: ::c_int = 0x400000; -pub const CLONE_UNTRACED: ::c_int = 0x800000; -pub const CLONE_CHILD_SETTID: ::c_int = 0x01000000; - -pub const WNOHANG: ::c_int = 1; - -pub const SPLICE_F_MOVE: ::c_uint = 0x01; -pub const SPLICE_F_NONBLOCK: ::c_uint = 0x02; -pub const SPLICE_F_MORE: ::c_uint = 0x04; -pub const SPLICE_F_GIFT: ::c_uint = 0x08; - -pub const RTLD_LOCAL: ::c_int = 0; - -f! { - pub fn FD_CLR(fd: ::c_int, set: *mut fd_set) -> () { - let fd = fd as usize; - let size = mem::size_of_val(&(*set).fds_bits[0]) * 8; - (*set).fds_bits[fd / size] &= !(1 << (fd % size)); - return - } - - pub fn FD_ISSET(fd: ::c_int, set: *mut fd_set) -> bool { - let fd = fd as usize; - let size = mem::size_of_val(&(*set).fds_bits[0]) * 8; - return ((*set).fds_bits[fd / size] & (1 << (fd % size))) != 0 - } - - pub fn FD_SET(fd: ::c_int, set: *mut fd_set) -> () { - let fd = fd as usize; - let size = mem::size_of_val(&(*set).fds_bits[0]) * 8; - (*set).fds_bits[fd / size] |= 1 << (fd % size); - return - } - - pub fn FD_ZERO(set: *mut fd_set) -> () { - for slot in (*set).fds_bits.iter_mut() { - *slot = 0; - } - } - - pub fn WIFEXITED(status: ::c_int) -> bool { - (status & 0xff) == 0 - } - - pub fn WEXITSTATUS(status: ::c_int) -> ::c_int { - (status >> 8) & 0xff - } - - pub fn WTERMSIG(status: ::c_int) -> ::c_int { - status & 0x7f - } -} - -extern { - pub fn getpwuid_r(uid: ::uid_t, - pwd: *mut passwd, - buf: *mut ::c_char, - buflen: ::size_t, - result: *mut *mut passwd) -> ::c_int; - pub fn fdatasync(fd: ::c_int) -> ::c_int; - pub fn mincore(addr: *mut ::c_void, len: ::size_t, - vec: *mut ::c_uchar) -> ::c_int; - pub fn clock_gettime(clk_id: ::c_int, tp: *mut ::timespec) -> ::c_int; - pub fn prctl(option: ::c_int, ...) -> ::c_int; - pub fn pthread_getattr_np(native: ::pthread_t, - attr: *mut ::pthread_attr_t) -> ::c_int; - pub fn pthread_attr_getguardsize(attr: *const ::pthread_attr_t, - guardsize: *mut ::size_t) -> ::c_int; - pub fn pthread_attr_getstack(attr: *const ::pthread_attr_t, - stackaddr: *mut *mut ::c_void, - stacksize: *mut ::size_t) -> ::c_int; - pub fn memalign(align: ::size_t, size: ::size_t) -> *mut ::c_void; - pub fn setgroups(ngroups: ::size_t, - ptr: *const ::gid_t) -> ::c_int; - pub fn sched_setscheduler(pid: ::pid_t, policy: ::c_int, param: *const sched_param) -> ::c_int; - pub fn sched_getscheduler(pid: ::pid_t) -> ::c_int; - pub fn sched_get_priority_max(policy: ::c_int) -> ::c_int; - pub fn sched_get_priority_min(policy: ::c_int) -> ::c_int; - pub fn epoll_create(size: ::c_int) -> ::c_int; - pub fn epoll_ctl(epfd: ::c_int, - op: ::c_int, - fd: ::c_int, - event: *mut epoll_event) -> ::c_int; - pub fn epoll_wait(epfd: ::c_int, - events: *mut epoll_event, - maxevents: ::c_int, - timeout: ::c_int) -> ::c_int; - pub fn pipe2(fds: *mut ::c_int, flags: ::c_int) -> ::c_int; - pub fn mount(src: *const ::c_char, - target: *const ::c_char, - fstype: *const ::c_char, - flags: ::c_ulong, - data: *const ::c_void) -> ::c_int; - pub fn umount(target: *const ::c_char) -> ::c_int; - pub fn umount2(target: *const ::c_char, flags: ::c_int) -> ::c_int; - pub fn clone(cb: extern fn(*mut ::c_void) -> ::c_int, - child_stack: *mut ::c_void, - flags: ::c_int, - arg: *mut ::c_void, ...) -> ::c_int; - pub fn statfs(path: *const ::c_char, buf: *mut statfs) -> ::c_int; - pub fn fstatfs(fd: ::c_int, buf: *mut statfs) -> ::c_int; - pub fn memrchr(cx: *const ::c_void, c: ::c_int, n: ::size_t) -> *mut ::c_void; - pub fn syscall(num: ::c_long, ...) -> ::c_long; - pub fn sendfile(out_fd: ::c_int, - in_fd: ::c_int, - offset: *mut off_t, - count: ::size_t) -> ::ssize_t; - pub fn splice(fd_in: ::c_int, - off_in: *mut ::loff_t, - fd_out: ::c_int, - off_out: *mut ::loff_t, - len: ::size_t, - flags: ::c_uint) -> ::ssize_t; - pub fn tee(fd_in: ::c_int, - fd_out: ::c_int, - len: ::size_t, - flags: ::c_uint) -> ::ssize_t; - pub fn vmsplice(fd: ::c_int, - iov: *const ::iovec, - nr_segs: ::size_t, - flags: ::c_uint) -> ::ssize_t; -} - -cfg_if! { - if #[cfg(any(target_os = "linux", - target_os = "emscripten"))] { - mod linux; - pub use self::linux::*; - } else if #[cfg(target_os = "android")] { - mod android; - pub use self::android::*; - } else { - // ... - } -} diff --git a/deps/libc-0.2.7/src/unix/solaris/mod.rs b/deps/libc-0.2.7/src/unix/solaris/mod.rs deleted file mode 100644 index c6596f1f2..000000000 --- a/deps/libc-0.2.7/src/unix/solaris/mod.rs +++ /dev/null @@ -1,766 +0,0 @@ -pub type c_char = i8; -pub type c_long = i64; -pub type c_ulong = u64; - -pub type blkcnt_t = i64; -pub type clock_t = i64; -pub type daddr_t = i64; -pub type dev_t = u64; -pub type fsblkcnt_t = u64; -pub type fsfilcnt_t = u64; -pub type ino_t = i64; -pub type key_t = i32; -pub type major_t = u32; -pub type minor_t = u32; -pub type mode_t = u32; -pub type nlink_t = u32; -pub type rlim_t = u64; -pub type speed_t = u32; -pub type tcflag_t = u32; -pub type time_t = i64; -pub type wchar_t = i32; -pub type nfds_t = ::c_ulong; - -pub type suseconds_t = ::c_long; -pub type off_t = i64; -pub type useconds_t = ::c_uint; -pub type socklen_t = u32; -pub type sa_family_t = u8; -pub type pthread_t = ::uintptr_t; -pub type pthread_key_t = ::c_uint; -pub type blksize_t = u32; -pub type fflags_t = u32; - -pub enum timezone {} - -s! { - pub struct sockaddr { - pub sa_family: sa_family_t, - pub sa_data: [::c_char; 14], - } - - pub struct sockaddr_in { - pub sin_family: sa_family_t, - pub sin_port: ::in_port_t, - pub sin_addr: ::in_addr, - pub sin_zero: [::c_char; 8] - } - - pub struct sockaddr_in6 { - pub sin6_family: sa_family_t, - pub sin6_port: ::in_port_t, - pub sin6_flowinfo: u32, - pub sin6_addr: ::in6_addr, - pub sin6_scope_id: u32, - pub __sin6_src_id: u32 - } - - pub struct sockaddr_un { - pub sun_family: sa_family_t, - pub sun_path: [c_char; 108] - } - - pub struct passwd { - pub pw_name: *mut ::c_char, - pub pw_passwd: *mut ::c_char, - pub pw_uid: ::uid_t, - pub pw_gid: ::gid_t, - pub pw_age: *mut ::c_char, - pub pw_comment: *mut ::c_char, - pub pw_gecos: *mut ::c_char, - pub pw_dir: *mut ::c_char, - pub pw_shell: *mut ::c_char - } - - pub struct ifaddrs { - pub ifa_next: *mut ifaddrs, - pub ifa_name: *mut ::c_char, - pub ifa_flags: ::c_ulong, - pub ifa_addr: *mut ::sockaddr, - pub ifa_netmask: *mut ::sockaddr, - pub ifa_dstaddr: *mut ::sockaddr, - pub ifa_data: *mut ::c_void - } - - pub struct tm { - pub tm_sec: ::c_int, - pub tm_min: ::c_int, - pub tm_hour: ::c_int, - pub tm_mday: ::c_int, - pub tm_mon: ::c_int, - pub tm_year: ::c_int, - pub tm_wday: ::c_int, - pub tm_yday: ::c_int, - pub tm_isdst: ::c_int - } - - pub struct utsname { - pub sysname: [::c_char; 257], - pub nodename: [::c_char; 257], - pub release: [::c_char; 257], - pub version: [::c_char; 257], - pub machine: [::c_char; 257], - } - - pub struct msghdr { - pub msg_name: *mut ::c_void, - pub msg_namelen: ::socklen_t, - pub msg_iov: *mut ::iovec, - pub msg_iovlen: ::c_int, - pub msg_control: *mut ::c_void, - pub msg_controllen: ::socklen_t, - pub msg_flags: ::c_int, - } - - pub struct fd_set { - fds_bits: [i32; FD_SETSIZE / 32], - } - - pub struct pthread_attr_t { - __pthread_attrp: *mut ::c_void - } - - pub struct pthread_mutex_t { - __pthread_mutex_flag1: u16, - __pthread_mutex_flag2: u8, - __pthread_mutex_ceiling: u8, - __pthread_mutex_type: u16, - __pthread_mutex_magic: u16, - __pthread_mutex_lock: u64, - __pthread_mutex_data: u64 - } - - pub struct pthread_mutexattr_t { - __pthread_mutexattrp: *mut ::c_void - } - - pub struct pthread_cond_t { - __pthread_cond_flag: [u8; 4], - __pthread_cond_type: u16, - __pthread_cond_magic: u16, - __pthread_cond_data: u64 - } - - pub struct pthread_rwlock_t { - __pthread_rwlock_readers: i32, - __pthread_rwlock_type: u16, - __pthread_rwlock_magic: u16, - __pthread_rwlock_mutex: ::pthread_mutex_t, - __pthread_rwlock_readercv: ::pthread_cond_t, - __pthread_rwlock_writercv: ::pthread_cond_t - } - - pub struct dirent { - pub d_ino: ::ino_t, - pub d_off: ::off_t, - pub d_reclen: u16, - pub d_name: [::c_char; 1] - } - - pub struct glob_t { - pub gl_pathc: ::size_t, - pub gl_pathv: *mut *mut ::c_char, - pub gl_offs: ::size_t, - __unused1: *mut ::c_void, - __unused2: ::c_int, - __unused3: ::c_int, - __unused4: ::c_int, - __unused5: *mut ::c_void, - __unused6: *mut ::c_void, - __unused7: *mut ::c_void, - __unused8: *mut ::c_void, - __unused9: *mut ::c_void, - __unused10: *mut ::c_void, - } - - pub struct sockaddr_storage { - pub ss_family: ::sa_family_t, - __ss_pad1: [u8; 6], - __ss_align: i64, - __ss_pad2: [u8; 240], - } - - pub struct addrinfo { - pub ai_flags: ::c_int, - pub ai_family: ::c_int, - pub ai_socktype: ::c_int, - pub ai_protocol: ::c_int, - pub ai_addrlen: ::socklen_t, - pub ai_canonname: *mut ::c_char, - pub ai_addr: *mut ::sockaddr, - pub ai_next: *mut addrinfo, - } - - pub struct sigset_t { - bits: [u32; 4], - } - - pub struct siginfo_t { - pub si_signo: ::c_int, - pub si_code: ::c_int, - pub si_errno: ::c_int, - pub si_pad: ::c_int, - pub si_addr: *mut ::c_void, - __pad: [u8; 232], - } - - pub struct sigaction { - pub sa_flags: ::c_int, - pub sa_sigaction: ::sighandler_t, - pub sa_mask: sigset_t, - } - - pub struct stack_t { - pub ss_sp: *mut ::c_void, - pub ss_size: ::size_t, - pub ss_flags: ::c_int, - } - - pub struct statvfs { - pub f_bsize: ::c_ulong, - pub f_frsize: ::c_ulong, - pub f_blocks: ::fsblkcnt_t, - pub f_bfree: ::fsblkcnt_t, - pub f_bavail: ::fsblkcnt_t, - pub f_files: ::fsfilcnt_t, - pub f_ffree: ::fsfilcnt_t, - pub f_favail: ::fsfilcnt_t, - pub f_fsid: ::c_ulong, - pub f_basetype: [::c_char; 16], - pub f_flag: ::c_ulong, - pub f_namemax: ::c_ulong, - pub f_fstr: [::c_char; 32] - } - - pub struct sched_param { - pub sched_priority: ::c_int, - sched_pad: [::c_int; 8] - } - - pub struct Dl_info { - pub dli_fname: *const ::c_char, - pub dli_fbase: *mut ::c_void, - pub dli_sname: *const ::c_char, - pub dli_saddr: *mut ::c_void, - } - - pub struct stat { - pub st_dev: ::dev_t, - pub st_ino: ::ino_t, - pub st_mode: ::mode_t, - pub st_nlink: ::nlink_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::dev_t, - pub st_size: ::off_t, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - pub st_blksize: ::blksize_t, - pub st_blocks: ::blkcnt_t, - __unused: [::c_char; 16] - } - - pub struct termios { - pub c_iflag: ::tcflag_t, - pub c_oflag: ::tcflag_t, - pub c_cflag: ::tcflag_t, - pub c_lflag: ::tcflag_t, - pub c_cc: [::cc_t; ::NCCS] - } -} - -pub const SA_ONSTACK: ::c_int = 0x00000001; -pub const SA_RESETHAND: ::c_int = 0x00000002; -pub const SA_RESTART: ::c_int = 0x00000004; -pub const SA_SIGINFO: ::c_int = 0x00000008; -pub const SA_NODEFER: ::c_int = 0x00000010; -pub const SA_NOCLDWAIT: ::c_int = 0x00010000; -pub const SA_NOCLDSTOP: ::c_int = 0x00020000; - -pub const FIONBIO: ::c_int = 0x8004667e; - -pub const SIGCHLD: ::c_int = 18; -pub const SIGBUS: ::c_int = 10; -pub const SIG_SETMASK: ::c_int = 3; - -pub const IPV6_MULTICAST_LOOP: ::c_int = 0x8; -pub const IPV6_V6ONLY: ::c_int = 0x27; - -pub const FD_SETSIZE: usize = 1024; - -pub const ST_RDONLY: ::c_ulong = 1; -pub const ST_NOSUID: ::c_ulong = 2; - -pub const NI_MAXHOST: ::socklen_t = 1025; - -pub const EXIT_FAILURE: ::c_int = 1; -pub const EXIT_SUCCESS: ::c_int = 0; -pub const RAND_MAX: ::c_int = 32767; -pub const EOF: ::c_int = -1; -pub const SEEK_SET: ::c_int = 0; -pub const SEEK_CUR: ::c_int = 1; -pub const SEEK_END: ::c_int = 2; -pub const _IOFBF: ::c_int = 0; -pub const _IONBF: ::c_int = 4; -pub const _IOLBF: ::c_int = 64; -pub const BUFSIZ: ::c_uint = 1024; -pub const FOPEN_MAX: ::c_uint = 20; -pub const FILENAME_MAX: ::c_uint = 1024; -pub const L_tmpnam: ::c_uint = 25; -pub const TMP_MAX: ::c_uint = 17576; - -pub const O_RDONLY: ::c_int = 0; -pub const O_WRONLY: ::c_int = 1; -pub const O_RDWR: ::c_int = 2; -pub const O_APPEND: ::c_int = 8; -pub const O_CREAT: ::c_int = 256; -pub const O_EXCL: ::c_int = 1024; -pub const O_NOCTTY: ::c_int = 2048; -pub const O_TRUNC: ::c_int = 512; -pub const O_CLOEXEC: ::c_int = 0x800000; -pub const O_ACCMODE: ::c_int = 0x600003; -pub const S_IFIFO: mode_t = 4096; -pub const S_IFCHR: mode_t = 8192; -pub const S_IFBLK: mode_t = 24576; -pub const S_IFDIR: mode_t = 16384; -pub const S_IFREG: mode_t = 32768; -pub const S_IFLNK: mode_t = 40960; -pub const S_IFSOCK: mode_t = 49152; -pub const S_IFMT: mode_t = 61440; -pub const S_IEXEC: mode_t = 64; -pub const S_IWRITE: mode_t = 128; -pub const S_IREAD: mode_t = 256; -pub const S_IRWXU: mode_t = 448; -pub const S_IXUSR: mode_t = 64; -pub const S_IWUSR: mode_t = 128; -pub const S_IRUSR: mode_t = 256; -pub const S_IRWXG: mode_t = 56; -pub const S_IXGRP: mode_t = 8; -pub const S_IWGRP: mode_t = 16; -pub const S_IRGRP: mode_t = 32; -pub const S_IRWXO: mode_t = 7; -pub const S_IXOTH: mode_t = 1; -pub const S_IWOTH: mode_t = 2; -pub const S_IROTH: mode_t = 4; -pub const F_OK: ::c_int = 0; -pub const R_OK: ::c_int = 4; -pub const W_OK: ::c_int = 2; -pub const X_OK: ::c_int = 1; -pub const STDIN_FILENO: ::c_int = 0; -pub const STDOUT_FILENO: ::c_int = 1; -pub const STDERR_FILENO: ::c_int = 2; -pub const F_LOCK: ::c_int = 1; -pub const F_TEST: ::c_int = 3; -pub const F_TLOCK: ::c_int = 2; -pub const F_ULOCK: ::c_int = 0; -pub const F_DUPFD_CLOEXEC: ::c_int = 37; -pub const SIGHUP: ::c_int = 1; -pub const SIGINT: ::c_int = 2; -pub const SIGQUIT: ::c_int = 3; -pub const SIGILL: ::c_int = 4; -pub const SIGABRT: ::c_int = 6; -pub const SIGFPE: ::c_int = 8; -pub const SIGKILL: ::c_int = 9; -pub const SIGSEGV: ::c_int = 11; -pub const SIGPIPE: ::c_int = 13; -pub const SIGALRM: ::c_int = 14; -pub const SIGTERM: ::c_int = 15; - -pub const WNOHANG: ::c_int = 0x40; - -pub const PROT_NONE: ::c_int = 0; -pub const PROT_READ: ::c_int = 1; -pub const PROT_WRITE: ::c_int = 2; -pub const PROT_EXEC: ::c_int = 4; - -pub const MAP_SHARED: ::c_int = 0x0001; -pub const MAP_PRIVATE: ::c_int = 0x0002; -pub const MAP_FIXED: ::c_int = 0x0010; -pub const MAP_ANON: ::c_int = 0x0100; - -pub const MAP_FAILED: *mut ::c_void = !0 as *mut ::c_void; - -pub const MCL_CURRENT: ::c_int = 0x0001; -pub const MCL_FUTURE: ::c_int = 0x0002; - -pub const MS_SYNC: ::c_int = 0x0004; -pub const MS_ASYNC: ::c_int = 0x0001; -pub const MS_INVALIDATE: ::c_int = 0x0002; - -pub const EPERM: ::c_int = 1; -pub const ENOENT: ::c_int = 2; -pub const ESRCH: ::c_int = 3; -pub const EINTR: ::c_int = 4; -pub const EIO: ::c_int = 5; -pub const ENXIO: ::c_int = 6; -pub const E2BIG: ::c_int = 7; -pub const ENOEXEC: ::c_int = 8; -pub const EBADF: ::c_int = 9; -pub const ECHILD: ::c_int = 10; -pub const EDEADLK: ::c_int = 45; -pub const ENOMEM: ::c_int = 12; -pub const EACCES: ::c_int = 13; -pub const EFAULT: ::c_int = 14; -pub const ENOTBLK: ::c_int = 15; -pub const EBUSY: ::c_int = 16; -pub const EEXIST: ::c_int = 17; -pub const EXDEV: ::c_int = 18; -pub const ENODEV: ::c_int = 19; -pub const ENOTDIR: ::c_int = 20; -pub const EISDIR: ::c_int = 21; -pub const EINVAL: ::c_int = 22; -pub const ENFILE: ::c_int = 23; -pub const EMFILE: ::c_int = 24; -pub const ENOTTY: ::c_int = 25; -pub const ETXTBSY: ::c_int = 26; -pub const EFBIG: ::c_int = 27; -pub const ENOSPC: ::c_int = 28; -pub const ESPIPE: ::c_int = 29; -pub const EROFS: ::c_int = 30; -pub const EMLINK: ::c_int = 31; -pub const EPIPE: ::c_int = 32; -pub const EDOM: ::c_int = 33; -pub const ERANGE: ::c_int = 34; -pub const EAGAIN: ::c_int = 11; -pub const EWOULDBLOCK: ::c_int = 11; -pub const EINPROGRESS: ::c_int = 150; -pub const EALREADY: ::c_int = 149; -pub const ENOTSOCK: ::c_int = 95; -pub const EDESTADDRREQ: ::c_int = 96; -pub const EMSGSIZE: ::c_int = 97; -pub const EPROTOTYPE: ::c_int = 98; -pub const ENOPROTOOPT: ::c_int = 99; -pub const EPROTONOSUPPORT: ::c_int = 120; -pub const ESOCKTNOSUPPORT: ::c_int = 121; -pub const EOPNOTSUPP: ::c_int = 122; -pub const EPFNOSUPPORT: ::c_int = 123; -pub const EAFNOSUPPORT: ::c_int = 124; -pub const EADDRINUSE: ::c_int = 125; -pub const EADDRNOTAVAIL: ::c_int = 126; -pub const ENETDOWN: ::c_int = 127; -pub const ENETUNREACH: ::c_int = 128; -pub const ENETRESET: ::c_int = 129; -pub const ECONNABORTED: ::c_int = 130; -pub const ECONNRESET: ::c_int = 131; -pub const ENOBUFS: ::c_int = 132; -pub const EISCONN: ::c_int = 133; -pub const ENOTCONN: ::c_int = 134; -pub const ESHUTDOWN: ::c_int = 143; -pub const ETOOMANYREFS: ::c_int = 144; -pub const ETIMEDOUT: ::c_int = 145; -pub const ECONNREFUSED: ::c_int = 146; -pub const ELOOP: ::c_int = 90; -pub const ENAMETOOLONG: ::c_int = 78; -pub const EHOSTDOWN: ::c_int = 147; -pub const EHOSTUNREACH: ::c_int = 148; -pub const ENOTEMPTY: ::c_int = 93; -pub const EUSERS: ::c_int = 94; -pub const EDQUOT: ::c_int = 49; -pub const ESTALE: ::c_int = 151; -pub const EREMOTE: ::c_int = 66; -pub const ENOLCK: ::c_int = 46; -pub const ENOSYS: ::c_int = 89; -pub const EIDRM: ::c_int = 36; -pub const ENOMSG: ::c_int = 35; -pub const EOVERFLOW: ::c_int = 79; -pub const ECANCELED: ::c_int = 47; -pub const EILSEQ: ::c_int = 88; -pub const EBADMSG: ::c_int = 77; -pub const EMULTIHOP: ::c_int = 74; -pub const ENOLINK: ::c_int = 67; -pub const EPROTO: ::c_int = 71; - -pub const F_DUPFD: ::c_int = 0; -pub const F_GETFD: ::c_int = 1; -pub const F_SETFD: ::c_int = 2; -pub const F_GETFL: ::c_int = 3; -pub const F_SETFL: ::c_int = 4; - -pub const SIGTRAP: ::c_int = 5; - -pub const GLOB_APPEND : ::c_int = 32; -pub const GLOB_DOOFFS : ::c_int = 16; -pub const GLOB_ERR : ::c_int = 1; -pub const GLOB_MARK : ::c_int = 2; -pub const GLOB_NOCHECK : ::c_int = 8; -pub const GLOB_NOSORT : ::c_int = 4; -pub const GLOB_NOESCAPE: ::c_int = 64; - -pub const GLOB_NOSPACE : ::c_int = -2; -pub const GLOB_ABORTED : ::c_int = -1; -pub const GLOB_NOMATCH : ::c_int = -3; - -pub const POSIX_MADV_NORMAL: ::c_int = 0; -pub const POSIX_MADV_RANDOM: ::c_int = 1; -pub const POSIX_MADV_SEQUENTIAL: ::c_int = 2; -pub const POSIX_MADV_WILLNEED: ::c_int = 3; -pub const POSIX_MADV_DONTNEED: ::c_int = 4; - -pub const _SC_IOV_MAX: ::c_int = 77; -pub const _SC_GETGR_R_SIZE_MAX: ::c_int = 569; -pub const _SC_GETPW_R_SIZE_MAX: ::c_int = 570; -pub const _SC_LOGIN_NAME_MAX: ::c_int = 571; -pub const _SC_MQ_PRIO_MAX: ::c_int = 30; -pub const _SC_THREAD_ATTR_STACKADDR: ::c_int = 577; -pub const _SC_THREAD_ATTR_STACKSIZE: ::c_int = 578; -pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: ::c_int = 568; -pub const _SC_THREAD_KEYS_MAX: ::c_int = 572; -pub const _SC_THREAD_PRIO_INHERIT: ::c_int = 580; -pub const _SC_THREAD_PRIO_PROTECT: ::c_int = 581; -pub const _SC_THREAD_PRIORITY_SCHEDULING: ::c_int = 579; -pub const _SC_THREAD_PROCESS_SHARED: ::c_int = 582; -pub const _SC_THREAD_SAFE_FUNCTIONS: ::c_int = 583; -pub const _SC_THREAD_STACK_MIN: ::c_int = 573; -pub const _SC_THREAD_THREADS_MAX: ::c_int = 574; -pub const _SC_THREADS: ::c_int = 576; -pub const _SC_TTY_NAME_MAX: ::c_int = 575; -pub const _SC_ATEXIT_MAX: ::c_int = 76; -pub const _SC_XOPEN_CRYPT: ::c_int = 62; -pub const _SC_XOPEN_ENH_I18N: ::c_int = 63; -pub const _SC_XOPEN_LEGACY: ::c_int = 717; -pub const _SC_XOPEN_REALTIME: ::c_int = 718; -pub const _SC_XOPEN_REALTIME_THREADS: ::c_int = 719; -pub const _SC_XOPEN_SHM: ::c_int = 64; -pub const _SC_XOPEN_UNIX: ::c_int = 78; -pub const _SC_XOPEN_VERSION: ::c_int = 12; -pub const _SC_XOPEN_XCU_VERSION: ::c_int = 67; - -pub const PTHREAD_CREATE_JOINABLE: ::c_int = 0; -pub const PTHREAD_CREATE_DETACHED: ::c_int = 0x40; -pub const PTHREAD_PROCESS_SHARED: ::c_int = 1; -pub const PTHREAD_PROCESS_PRIVATE: u16 = 0; -pub const PTHREAD_STACK_MIN: ::size_t = 4096; - -pub const SIGSTKSZ: ::size_t = 8192; - -pub const CLOCK_REALTIME: ::c_int = 3; -pub const CLOCK_MONOTONIC: ::c_int = 4; - -pub const RLIMIT_CPU: ::c_int = 0; -pub const RLIMIT_FSIZE: ::c_int = 1; -pub const RLIMIT_DATA: ::c_int = 2; -pub const RLIMIT_STACK: ::c_int = 3; -pub const RLIMIT_CORE: ::c_int = 4; -pub const RLIMIT_NOFILE: ::c_int = 5; -pub const RLIMIT_VMEM: ::c_int = 6; -pub const RLIMIT_AS: ::c_int = RLIMIT_VMEM; - -pub const RLIM_NLIMITS: rlim_t = 7; -pub const RLIM_INFINITY: rlim_t = 0x7fffffff; - -pub const RUSAGE_SELF: ::c_int = 0; -pub const RUSAGE_CHILDREN: ::c_int = -1; - -pub const MADV_NORMAL: ::c_int = 0; -pub const MADV_RANDOM: ::c_int = 1; -pub const MADV_SEQUENTIAL: ::c_int = 2; -pub const MADV_WILLNEED: ::c_int = 3; -pub const MADV_DONTNEED: ::c_int = 4; -pub const MADV_FREE: ::c_int = 5; - -pub const AF_INET: ::c_int = 2; -pub const AF_INET6: ::c_int = 26; -pub const AF_UNIX: ::c_int = 1; -pub const SOCK_DGRAM: ::c_int = 1; -pub const SOCK_STREAM: ::c_int = 2; -pub const SOCK_RAW: ::c_int = 4; -pub const IPPROTO_TCP: ::c_int = 6; -pub const IPPROTO_IP: ::c_int = 0; -pub const IPPROTO_IPV6: ::c_int = 41; -pub const IP_MULTICAST_TTL: ::c_int = 17; -pub const IP_MULTICAST_LOOP: ::c_int = 18; -pub const IP_TTL: ::c_int = 4; -pub const IP_HDRINCL: ::c_int = 2; -pub const IP_ADD_MEMBERSHIP: ::c_int = 19; -pub const IP_DROP_MEMBERSHIP: ::c_int = 20; -pub const IPV6_JOIN_GROUP: ::c_int = 9; -pub const IPV6_LEAVE_GROUP: ::c_int = 10; - -pub const TCP_NODELAY: ::c_int = 1; -pub const TCP_KEEPIDLE: ::c_int = 34; -pub const SOL_SOCKET: ::c_int = 0xffff; -pub const SO_DEBUG: ::c_int = 0x01; -pub const SO_ACCEPTCONN: ::c_int = 0x0002; -pub const SO_REUSEADDR: ::c_int = 0x0004; -pub const SO_KEEPALIVE: ::c_int = 0x0008; -pub const SO_DONTROUTE: ::c_int = 0x0010; -pub const SO_BROADCAST: ::c_int = 0x0020; -pub const SO_USELOOPBACK: ::c_int = 0x0040; -pub const SO_LINGER: ::c_int = 0x0080; -pub const SO_OOBINLINE: ::c_int = 0x0100; -pub const SO_SNDBUF: ::c_int = 0x1001; -pub const SO_RCVBUF: ::c_int = 0x1002; -pub const SO_SNDLOWAT: ::c_int = 0x1003; -pub const SO_RCVLOWAT: ::c_int = 0x1004; -pub const SO_SNDTIMEO: ::c_int = 0x1005; -pub const SO_RCVTIMEO: ::c_int = 0x1006; -pub const SO_ERROR: ::c_int = 0x1007; -pub const SO_TYPE: ::c_int = 0x1008; - -pub const IFF_LOOPBACK: ::c_int = 0x8; - -pub const SHUT_RD: ::c_int = 0; -pub const SHUT_WR: ::c_int = 1; -pub const SHUT_RDWR: ::c_int = 2; - -pub const LOCK_SH: ::c_int = 1; -pub const LOCK_EX: ::c_int = 2; -pub const LOCK_NB: ::c_int = 4; -pub const LOCK_UN: ::c_int = 8; - -pub const O_SYNC: ::c_int = 16; -pub const O_NONBLOCK: ::c_int = 128; - -pub const IPPROTO_RAW: ::c_int = 255; - -pub const _SC_ARG_MAX: ::c_int = 1; -pub const _SC_CHILD_MAX: ::c_int = 2; -pub const _SC_CLK_TCK: ::c_int = 3; -pub const _SC_NGROUPS_MAX: ::c_int = 4; -pub const _SC_OPEN_MAX: ::c_int = 5; -pub const _SC_JOB_CONTROL: ::c_int = 6; -pub const _SC_SAVED_IDS: ::c_int = 7; -pub const _SC_VERSION: ::c_int = 8; -pub const _SC_PAGESIZE: ::c_int = 11; -pub const _SC_PAGE_SIZE: ::c_int = _SC_PAGESIZE; -pub const _SC_NPROCESSORS_ONLN: ::c_int = 15; -pub const _SC_STREAM_MAX: ::c_int = 16; -pub const _SC_TZNAME_MAX: ::c_int = 17; -pub const _SC_AIO_LISTIO_MAX: ::c_int = 18; -pub const _SC_AIO_MAX: ::c_int = 19; -pub const _SC_BC_BASE_MAX: ::c_int = 54; -pub const _SC_BC_DIM_MAX: ::c_int = 55; -pub const _SC_BC_SCALE_MAX: ::c_int = 56; -pub const _SC_BC_STRING_MAX: ::c_int = 57; -pub const _SC_COLL_WEIGHTS_MAX: ::c_int = 58; -pub const _SC_EXPR_NEST_MAX: ::c_int = 59; -pub const _SC_LINE_MAX: ::c_int = 60; -pub const _SC_RE_DUP_MAX: ::c_int = 61; -pub const _SC_2_VERSION: ::c_int = 53; -pub const _SC_2_C_BIND: ::c_int = 45; -pub const _SC_2_C_DEV: ::c_int = 46; -pub const _SC_2_CHAR_TERM: ::c_int = 66; -pub const _SC_2_FORT_DEV: ::c_int = 48; -pub const _SC_2_FORT_RUN: ::c_int = 49; -pub const _SC_2_LOCALEDEF: ::c_int = 50; -pub const _SC_2_SW_DEV: ::c_int = 51; -pub const _SC_2_UPE: ::c_int = 52; -pub const _SC_ASYNCHRONOUS_IO: ::c_int = 21; -pub const _SC_MAPPED_FILES: ::c_int = 24; -pub const _SC_MEMLOCK: ::c_int = 25; -pub const _SC_MEMLOCK_RANGE: ::c_int = 26; -pub const _SC_MEMORY_PROTECTION: ::c_int = 27; -pub const _SC_MESSAGE_PASSING: ::c_int = 28; -pub const _SC_PRIORITIZED_IO: ::c_int = 31; -pub const _SC_PRIORITY_SCHEDULING: ::c_int = 32; -pub const _SC_REALTIME_SIGNALS: ::c_int = 33; -pub const _SC_SEMAPHORES: ::c_int = 35; -pub const _SC_FSYNC: ::c_int = 23; -pub const _SC_SHARED_MEMORY_OBJECTS: ::c_int = 38; -pub const _SC_SYNCHRONIZED_IO: ::c_int = 42; -pub const _SC_TIMERS: ::c_int = 43; -pub const _SC_AIO_PRIO_DELTA_MAX: ::c_int = 20; -pub const _SC_DELAYTIMER_MAX: ::c_int = 22; -pub const _SC_MQ_OPEN_MAX: ::c_int = 29; -pub const _SC_RTSIG_MAX: ::c_int = 34; -pub const _SC_SEM_NSEMS_MAX: ::c_int = 36; -pub const _SC_SEM_VALUE_MAX: ::c_int = 37; -pub const _SC_SIGQUEUE_MAX: ::c_int = 39; -pub const _SC_TIMER_MAX: ::c_int = 44; - -pub const _MUTEX_MAGIC: u16 = 0x4d58; // MX -pub const _COND_MAGIC: u16 = 0x4356; // CV -pub const _RWL_MAGIC: u16 = 0x5257; // RW - -pub const NCCS: usize = 19; - -pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t { - __pthread_mutex_flag1: 0, - __pthread_mutex_flag2: 0, - __pthread_mutex_ceiling: 0, - __pthread_mutex_type: PTHREAD_PROCESS_PRIVATE, - __pthread_mutex_magic: _MUTEX_MAGIC, - __pthread_mutex_lock: 0, - __pthread_mutex_data: 0 -}; -pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = pthread_cond_t { - __pthread_cond_flag: [0; 4], - __pthread_cond_type: PTHREAD_PROCESS_PRIVATE, - __pthread_cond_magic: _COND_MAGIC, - __pthread_cond_data: 0 -}; -pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t { - __pthread_rwlock_readers: 0, - __pthread_rwlock_type: PTHREAD_PROCESS_PRIVATE, - __pthread_rwlock_magic: _RWL_MAGIC, - __pthread_rwlock_mutex: PTHREAD_MUTEX_INITIALIZER, - __pthread_rwlock_readercv: PTHREAD_COND_INITIALIZER, - __pthread_rwlock_writercv: PTHREAD_COND_INITIALIZER -}; -pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 4; - -f! { - pub fn FD_CLR(fd: ::c_int, set: *mut fd_set) -> () { - let fd = fd as usize; - (*set).fds_bits[fd / 32] &= !(1 << (fd % 32)); - return - } - - pub fn FD_ISSET(fd: ::c_int, set: *mut fd_set) -> bool { - let fd = fd as usize; - return ((*set).fds_bits[fd / 32] & (1 << (fd % 32))) != 0 - } - - pub fn FD_SET(fd: ::c_int, set: *mut fd_set) -> () { - let fd = fd as usize; - (*set).fds_bits[fd / 32] |= 1 << (fd % 32); - return - } - - pub fn FD_ZERO(set: *mut fd_set) -> () { - for slot in (*set).fds_bits.iter_mut() { - *slot = 0; - } - } - - pub fn WIFEXITED(status: ::c_int) -> bool { - (status & 0xFF) == 0 - } - - pub fn WEXITSTATUS(status: ::c_int) -> ::c_int { - (status >> 8) & 0xFF - } - - pub fn WTERMSIG(status: ::c_int) -> ::c_int { - status & 0x7F - } -} - -extern { - pub fn stack_getbounds(sp: *mut ::stack_t) -> ::c_int; - pub fn mincore(addr: *const ::c_void, len: ::size_t, - vec: *mut c_char) -> ::c_int; - pub fn setgroups(ngroups: ::c_int, - ptr: *const ::gid_t) -> ::c_int; - pub fn ioctl(fildes: ::c_int, request: ::c_int, ...) -> ::c_int; - pub fn mprotect(addr: *const ::c_void, len: ::size_t, prot: ::c_int) - -> ::c_int; - pub fn clock_gettime(clk_id: ::c_int, tp: *mut ::timespec) -> ::c_int; - pub fn getnameinfo(sa: *const ::sockaddr, - salen: ::socklen_t, - host: *mut ::c_char, - hostlen: ::socklen_t, - serv: *mut ::c_char, - sevlen: ::socklen_t, - flags: ::c_int) -> ::c_int; - pub fn getpwuid_r(uid: ::uid_t, - pwd: *mut passwd, - buf: *mut ::c_char, - buflen: ::size_t) -> *const passwd; - pub fn readdir(dirp: *mut ::DIR) -> *const ::dirent; -} - diff --git a/deps/libc-0.2.7/src/windows.rs b/deps/libc-0.2.7/src/windows.rs deleted file mode 100644 index a4783cb08..000000000 --- a/deps/libc-0.2.7/src/windows.rs +++ /dev/null @@ -1,178 +0,0 @@ -//! Windows CRT definitions - -pub type c_char = i8; -pub type c_long = i32; -pub type c_ulong = u32; -pub type wchar_t = u16; - -pub type clock_t = i32; - -cfg_if! { - if #[cfg(all(target_arch = "x86", target_env = "gnu"))] { - pub type time_t = i32; - } else { - pub type time_t = i64; - } -} - -pub type off_t = i32; -pub type dev_t = u32; -pub type ino_t = u16; -pub enum timezone {} -pub type time64_t = i64; - -s! { - // note this is the struct called stat64 in Windows. Not stat, nor stati64. - pub struct stat { - pub st_dev: dev_t, - pub st_ino: ino_t, - pub st_mode: u16, - pub st_nlink: ::c_short, - pub st_uid: ::c_short, - pub st_gid: ::c_short, - pub st_rdev: dev_t, - pub st_size: i64, - pub st_atime: time64_t, - pub st_mtime: time64_t, - pub st_ctime: time64_t, - } - - // note that this is called utimbuf64 in Windows - pub struct utimbuf { - pub actime: time64_t, - pub modtime: time64_t, - } - - pub struct timeval { - pub tv_sec: c_long, - pub tv_usec: c_long, - } - - pub struct timespec { - pub tv_sec: time_t, - pub tv_nsec: c_long, - } -} - -pub const EXIT_FAILURE: ::c_int = 1; -pub const EXIT_SUCCESS: ::c_int = 0; -pub const RAND_MAX: ::c_int = 32767; -pub const EOF: ::c_int = -1; -pub const SEEK_SET: ::c_int = 0; -pub const SEEK_CUR: ::c_int = 1; -pub const SEEK_END: ::c_int = 2; -pub const _IOFBF: ::c_int = 0; -pub const _IONBF: ::c_int = 4; -pub const _IOLBF: ::c_int = 64; -pub const BUFSIZ: ::c_uint = 512; -pub const FOPEN_MAX: ::c_uint = 20; -pub const FILENAME_MAX: ::c_uint = 260; - -cfg_if! { - if #[cfg(all(target_env = "gnu"))] { - pub const L_tmpnam: ::c_uint = 14; - pub const TMP_MAX: ::c_uint = 0x7fff; - } else { - pub const L_tmpnam: ::c_uint = 260; - pub const TMP_MAX: ::c_uint = 0x7fff_ffff; - } -} - -pub const O_RDONLY: ::c_int = 0; -pub const O_WRONLY: ::c_int = 1; -pub const O_RDWR: ::c_int = 2; -pub const O_APPEND: ::c_int = 8; -pub const O_CREAT: ::c_int = 256; -pub const O_EXCL: ::c_int = 1024; -pub const O_TEXT: ::c_int = 16384; -pub const O_BINARY: ::c_int = 32768; -pub const O_NOINHERIT: ::c_int = 128; -pub const O_TRUNC: ::c_int = 512; -pub const S_IFCHR: ::c_int = 8192; -pub const S_IFDIR: ::c_int = 16384; -pub const S_IFREG: ::c_int = 32768; -pub const S_IFMT: ::c_int = 61440; -pub const S_IEXEC: ::c_int = 64; -pub const S_IWRITE: ::c_int = 128; -pub const S_IREAD: ::c_int = 256; - -#[cfg(target_env = "msvc")] -#[link(name = "msvcrt")] -extern {} - -extern { - #[link_name = "_chmod"] - pub fn chmod(path: *const c_char, mode: ::c_int) -> ::c_int; - #[link_name = "_wchmod"] - pub fn wchmod(path: *const wchar_t, mode: ::c_int) -> ::c_int; - #[link_name = "_mkdir"] - pub fn mkdir(path: *const c_char) -> ::c_int; - #[link_name = "_wrmdir"] - pub fn wrmdir(path: *const wchar_t) -> ::c_int; - #[link_name = "_fstat64"] - pub fn fstat(fildes: ::c_int, buf: *mut stat) -> ::c_int; - #[link_name = "_stat64"] - pub fn stat(path: *const c_char, buf: *mut stat) -> ::c_int; - #[link_name = "_wstat64"] - pub fn wstat(path: *const wchar_t, buf: *mut stat) -> ::c_int; - #[link_name = "_wutime64"] - pub fn wutime(file: *const wchar_t, buf: *mut utimbuf) -> ::c_int; - #[link_name = "_popen"] - pub fn popen(command: *const c_char, mode: *const c_char) -> *mut ::FILE; - #[link_name = "_pclose"] - pub fn pclose(stream: *mut ::FILE) -> ::c_int; - #[link_name = "_fdopen"] - pub fn fdopen(fd: ::c_int, mode: *const c_char) -> *mut ::FILE; - #[link_name = "_fileno"] - pub fn fileno(stream: *mut ::FILE) -> ::c_int; - #[link_name = "_open"] - pub fn open(path: *const c_char, oflag: ::c_int, ...) -> ::c_int; - #[link_name = "_wopen"] - pub fn wopen(path: *const wchar_t, oflag: ::c_int, ...) -> ::c_int; - #[link_name = "_creat"] - pub fn creat(path: *const c_char, mode: ::c_int) -> ::c_int; - #[link_name = "_access"] - pub fn access(path: *const c_char, amode: ::c_int) -> ::c_int; - #[link_name = "_chdir"] - pub fn chdir(dir: *const c_char) -> ::c_int; - #[link_name = "_close"] - pub fn close(fd: ::c_int) -> ::c_int; - #[link_name = "_dup"] - pub fn dup(fd: ::c_int) -> ::c_int; - #[link_name = "_dup2"] - pub fn dup2(src: ::c_int, dst: ::c_int) -> ::c_int; - #[link_name = "_execv"] - pub fn execv(prog: *const c_char, argv: *const *const c_char) -> ::intptr_t; - #[link_name = "_execve"] - pub fn execve(prog: *const c_char, argv: *const *const c_char, - envp: *const *const c_char) -> ::c_int; - #[link_name = "_execvp"] - pub fn execvp(c: *const c_char, argv: *const *const c_char) -> ::c_int; - #[link_name = "_execvpe"] - pub fn execvpe(c: *const c_char, argv: *const *const c_char, - envp: *const *const c_char) -> ::c_int; - #[link_name = "_getcwd"] - pub fn getcwd(buf: *mut c_char, size: ::c_int) -> *mut c_char; - #[link_name = "_getpid"] - pub fn getpid() -> ::c_int; - #[link_name = "_isatty"] - pub fn isatty(fd: ::c_int) -> ::c_int; - #[link_name = "_lseek"] - pub fn lseek(fd: ::c_int, offset: c_long, origin: ::c_int) -> c_long; - #[link_name = "_pipe"] - pub fn pipe(fds: *mut ::c_int, psize: ::c_uint, textmode: ::c_int) -> ::c_int; - #[link_name = "_read"] - pub fn read(fd: ::c_int, buf: *mut ::c_void, count: ::c_uint) -> ::c_int; - #[link_name = "_rmdir"] - pub fn rmdir(path: *const c_char) -> ::c_int; - #[link_name = "_unlink"] - pub fn unlink(c: *const c_char) -> ::c_int; - #[link_name = "_write"] - pub fn write(fd: ::c_int, buf: *const ::c_void, count: ::c_uint) -> ::c_int; - #[link_name = "_commit"] - pub fn commit(fd: ::c_int) -> ::c_int; - #[link_name = "_get_osfhandle"] - pub fn get_osfhandle(fd: ::c_int) -> ::intptr_t; - #[link_name = "_open_osfhandle"] - pub fn open_osfhandle(osfhandle: ::intptr_t, flags: ::c_int) -> ::c_int; -} diff --git a/deps/libc-0.2.7/.gitignore b/deps/libc-0.2.8/.gitignore similarity index 100% rename from deps/libc-0.2.7/.gitignore rename to deps/libc-0.2.8/.gitignore diff --git a/deps/libc-0.2.8/.travis.yml b/deps/libc-0.2.8/.travis.yml new file mode 100644 index 000000000..91d543a2f --- /dev/null +++ b/deps/libc-0.2.8/.travis.yml @@ -0,0 +1,67 @@ +language: rust +sudo: required +dist: trusty +rust: + - 1.0.0 + - stable + - beta + - nightly +services: + - docker +script: + - if [[ $TRAVIS_RUST_VERSION = nightly* ]]; then + sh ci/run-travis.sh; + elif [[ $TRAVIS_RUST_VERSION = "1.0.0" ]]; then + cargo build; + else + cargo build; + cargo build --no-default-features; + rustc ci/style.rs && ./style src; + fi +os: + - linux + - osx +env: + matrix: + - ARCH=x86_64 + - ARCH=i686 + global: + secure: eIDEoQdTyglcsTD13zSGotAX2HDhRSXIaaTnVZTThqLSrySOc3/6KY3qmOc2Msf7XaBqfFy9QA+alk7OwfePp253eiy1Kced67ffjjFOytEcRT7FlQiYpcYQD6WNHZEj62/bJBO4LTM9sGtWNCTJVEDKW0WM8mUK7qNuC+honPM= +matrix: + include: + - os: linux + env: TARGET=arm-linux-androideabi DOCKER=alexcrichton/rust-slave-android:2015-11-22 + rust: nightly + - os: linux + env: TARGET=x86_64-unknown-linux-musl + rust: nightly + - os: linux + env: TARGET=arm-unknown-linux-gnueabihf + rust: nightly + - os: linux + env: TARGET=mips-unknown-linux-gnu DOCKER=alexcrichton/rust-libc-mips:2016-01-10 + rust: nightly + - os: linux + env: TARGET=aarch64-unknown-linux-gnu + rust: nightly + - os: osx + env: TARGET=i386-apple-ios + rust: nightly + - os: osx + env: TARGET=x86_64-apple-ios + rust: nightly + - os: linux + env: TARGET=x86_64-rumprun-netbsd DOCKER=alexcrichton/rust-libc-rumprun:2015-11-27 + rust: nightly + - os: linux + env: TARGET=x86_64-unknown-freebsd QEMU=freebsd.qcow2 + rust: nightly + - os: linux + env: TARGET=x86_64-unknown-openbsd QEMU=openbsd.qcow2 + rust: nightly +notifications: + email: + on_success: never +branches: + only: + - master diff --git a/deps/libc-0.2.8/Cargo.toml b/deps/libc-0.2.8/Cargo.toml new file mode 100644 index 000000000..f9cead172 --- /dev/null +++ b/deps/libc-0.2.8/Cargo.toml @@ -0,0 +1,18 @@ +[package] + +name = "libc" +version = "0.2.8" +authors = ["The Rust Project Developers"] +license = "MIT/Apache-2.0" +readme = "README.md" +repository = "https://github.com/rust-lang/libc" +homepage = "https://github.com/rust-lang/libc" +documentation = "http://doc.rust-lang.org/libc" +description = """ +A library for types and bindings to native C functions often found in libc or +other common platform libraries. +""" + +[features] +default = ["use_std"] +use_std = [] diff --git a/deps/libz-sys-1.0.1/LICENSE-APACHE b/deps/libc-0.2.8/LICENSE-APACHE similarity index 100% rename from deps/libz-sys-1.0.1/LICENSE-APACHE rename to deps/libc-0.2.8/LICENSE-APACHE diff --git a/deps/libc-0.2.7/LICENSE-MIT b/deps/libc-0.2.8/LICENSE-MIT similarity index 100% rename from deps/libc-0.2.7/LICENSE-MIT rename to deps/libc-0.2.8/LICENSE-MIT diff --git a/deps/libc-0.2.8/README.md b/deps/libc-0.2.8/README.md new file mode 100644 index 000000000..a822744dc --- /dev/null +++ b/deps/libc-0.2.8/README.md @@ -0,0 +1,126 @@ +libc +==== + +A Rust library with native bindings to the types and functions commonly found on +various systems, including libc. + +[![Build Status](https://travis-ci.org/rust-lang/libc.svg?branch=master)](https://travis-ci.org/rust-lang/libc) +[![Build status](https://ci.appveyor.com/api/projects/status/34csq3uurnw7c0rl?svg=true)](https://ci.appveyor.com/project/alexcrichton/libc) + +[Documentation](#platforms-and-documentation) + +## Usage + +First, add the following to your `Cargo.toml`: + +```toml +[dependencies] +libc = "0.2" +``` + +Next, add this to your crate root: + +```rust +extern crate libc; +``` + +Currently libc by default links to the standard library, but if you would +instead like to use libc in a `#![no_std]` situation or crate you can request +this via: + +```toml +[dependencies] +libc = { version = "0.2", default-features = false } +``` + +## What is libc? + +The primary purpose of this crate is to provide all of the definitions necessary +to easily interoperate with C code (or "C-like" code) on each of the platforms +that Rust supports. This includes type definitions (e.g. `c_int`), constants +(e.g. `EINVAL`) as well as function headers (e.g. `malloc`). + +This crate does not strive to have any form of compatibility across platforms, +but rather it is simply a straight binding to the system libraries on the +platform in question. + +## Public API + +This crate exports all underlying platform types, functions, and constants under +the crate root, so all items are accessible as `libc::foo`. The types and values +of all the exported APIs match the platform that libc is compiled for. + +More detailed information about the design of this library can be found in its +[associated RFC][rfc]. + +[rfc]: https://github.com/rust-lang/rfcs/blob/master/text/1291-promote-libc.md + +## Adding an API + +Want to use an API which currently isn't bound in `libc`? It's quite easy to add +one! + +The internal structure of this crate is designed to minimize the number of +`#[cfg]` attributes in order to easily be able to add new items which apply +to all platforms in the future. As a result, the crate is organized +hierarchically based on platform. Each module has a number of `#[cfg]`'d +children, but only one is ever actually compiled. Each module then reexports all +the contents of its children. + +This means that for each platform that libc supports, the path from a +leaf module to the root will contain all bindings for the platform in question. +Consequently, this indicates where an API should be added! Adding an API at a +particular level in the hierarchy means that it is supported on all the child +platforms of that level. For example, when adding a Unix API it should be added +to `src/unix/mod.rs`, but when adding a Linux-only API it should be added to +`src/unix/notbsd/linux/mod.rs`. + +If you're not 100% sure at what level of the hierarchy an API should be added +at, fear not! This crate has CI support which tests any binding against all +platforms supported, so you'll see failures if an API is added at the wrong +level or has different signatures across platforms. + +With that in mind, the steps for adding a new API are: + +1. Determine where in the module hierarchy your API should be added. +2. Add the API. +3. Send a PR to this repo. +4. Wait for CI to pass, fixing errors. +5. Wait for a merge! + +## Platforms and Documentation + +The following platforms are currently tested and have documentation available: + +Tested: + * [`i686-pc-windows-msvc`](https://doc.rust-lang.org/libc/i686-pc-windows-msvc/libc/) + * [`x86_64-pc-windows-msvc`](https://doc.rust-lang.org/libc/x86_64-pc-windows-msvc/libc/) + (Windows) + * [`i686-pc-windows-gnu`](https://doc.rust-lang.org/libc/i686-pc-windows-gnu/libc/) + * [`x86_64-pc-windows-gnu`](https://doc.rust-lang.org/libc/x86_64-pc-windows-gnu/libc/) + * [`i686-apple-darwin`](https://doc.rust-lang.org/libc/i686-apple-darwin/libc/) + * [`x86_64-apple-darwin`](https://doc.rust-lang.org/libc/x86_64-apple-darwin/libc/) + (OSX) + * [`i686-apple-ios`](https://doc.rust-lang.org/libc/i686-apple-ios/libc/) + * [`x86_64-apple-ios`](https://doc.rust-lang.org/libc/x86_64-apple-ios/libc/) + (iOS) + * [`i686-unknown-linux-gnu`](https://doc.rust-lang.org/libc/i686-unknown-linux-gnu/libc/) + * [`x86_64-unknown-linux-gnu`](https://doc.rust-lang.org/libc/x86_64-unknown-linux-gnu/libc/) + (Linux) + * [`x86_64-unknown-linux-musl`](https://doc.rust-lang.org/libc/x86_64-unknown-linux-musl/libc/) + (Linux MUSL) + * [`aarch64-unknown-linux-gnu`](https://doc.rust-lang.org/libc/aarch64-unknown-linux-gnu/libc/) + * [`mips-unknown-linux-gnu`](https://doc.rust-lang.org/libc/mips-unknown-linux-gnu/libc/) + * [`arm-unknown-linux-gnueabihf`](https://doc.rust-lang.org/libc/arm-unknown-linux-gnueabihf/libc/) + * [`arm-linux-androideabi`](https://doc.rust-lang.org/libc/arm-linux-androideabi/libc/) + (Android) + * [`x86_64-unknown-freebsd`](https://doc.rust-lang.org/libc/x86_64-unknown-freebsd/libc/) + * [`x86_64-unknown-openbsd`](https://doc.rust-lang.org/libc/x86_64-unknown-openbsd/libc/) + * [`x86_64-rumprun-netbsd`](https://doc.rust-lang.org/libc/x86_64-unknown-netbsd/libc/) + +The following may be supported, but are not guaranteed to always work: + + * `i686-unknown-freebsd` + * [`x86_64-unknown-bitrig`](https://doc.rust-lang.org/libc/x86_64-unknown-bitrig/libc/) + * [`x86_64-unknown-dragonfly`](https://doc.rust-lang.org/libc/x86_64-unknown-dragonfly/libc/) + * [`x86_64-unknown-netbsd`](https://doc.rust-lang.org/libc/x86_64-unknown-netbsd/libc/) diff --git a/deps/libc-0.2.7/appveyor.yml b/deps/libc-0.2.8/appveyor.yml similarity index 100% rename from deps/libc-0.2.7/appveyor.yml rename to deps/libc-0.2.8/appveyor.yml diff --git a/deps/libc-0.2.7/ci/README.md b/deps/libc-0.2.8/ci/README.md similarity index 100% rename from deps/libc-0.2.7/ci/README.md rename to deps/libc-0.2.8/ci/README.md diff --git a/deps/libc-0.2.7/ci/cargo-config b/deps/libc-0.2.8/ci/cargo-config similarity index 100% rename from deps/libc-0.2.7/ci/cargo-config rename to deps/libc-0.2.8/ci/cargo-config diff --git a/deps/libc-0.2.7/ci/dox.sh b/deps/libc-0.2.8/ci/dox.sh similarity index 100% rename from deps/libc-0.2.7/ci/dox.sh rename to deps/libc-0.2.8/ci/dox.sh diff --git a/deps/libc-0.2.7/ci/landing-page-footer.html b/deps/libc-0.2.8/ci/landing-page-footer.html similarity index 100% rename from deps/libc-0.2.7/ci/landing-page-footer.html rename to deps/libc-0.2.8/ci/landing-page-footer.html diff --git a/deps/libc-0.2.7/ci/landing-page-head.html b/deps/libc-0.2.8/ci/landing-page-head.html similarity index 100% rename from deps/libc-0.2.7/ci/landing-page-head.html rename to deps/libc-0.2.8/ci/landing-page-head.html diff --git a/deps/libc-0.2.7/ci/mips/Dockerfile b/deps/libc-0.2.8/ci/mips/Dockerfile similarity index 100% rename from deps/libc-0.2.7/ci/mips/Dockerfile rename to deps/libc-0.2.8/ci/mips/Dockerfile diff --git a/deps/libc-0.2.7/ci/rumprun/Dockerfile b/deps/libc-0.2.8/ci/rumprun/Dockerfile similarity index 100% rename from deps/libc-0.2.7/ci/rumprun/Dockerfile rename to deps/libc-0.2.8/ci/rumprun/Dockerfile diff --git a/deps/libc-0.2.7/ci/run-all.sh b/deps/libc-0.2.8/ci/run-all.sh similarity index 100% rename from deps/libc-0.2.7/ci/run-all.sh rename to deps/libc-0.2.8/ci/run-all.sh diff --git a/deps/libc-0.2.7/ci/run-qemu.sh b/deps/libc-0.2.8/ci/run-qemu.sh similarity index 100% rename from deps/libc-0.2.7/ci/run-qemu.sh rename to deps/libc-0.2.8/ci/run-qemu.sh diff --git a/deps/libc-0.2.8/ci/run-travis.sh b/deps/libc-0.2.8/ci/run-travis.sh new file mode 100644 index 000000000..d9f708aa1 --- /dev/null +++ b/deps/libc-0.2.8/ci/run-travis.sh @@ -0,0 +1,188 @@ +# Entry point for all travis builds, this will set up the Travis environment by +# downloading any dependencies. It will then execute the `run.sh` script to +# build and execute all tests. +# +# For a full description of how all tests are run, see `ci/README.md` + +set -ex + +if [ "$TRAVIS_OS_NAME" = "linux" ]; then + OS=unknown-linux-gnu +else + OS=apple-darwin +fi + +export HOST=$ARCH-$OS +if [ "$TARGET" = "" ]; then + TARGET=$HOST +fi + +MAIN_TARGETS=https://static.rust-lang.org/dist +DATE=$(echo $TRAVIS_RUST_VERSION | sed s/nightly-//) +if [ "$DATE" != "nightly" ]; then + MAIN_TARGETS=$MAIN_TARGETS/$DATE + TRAVIS_RUST_VERSION=nightly +fi + +install() { + if [ "$TRAVIS" = "true" ]; then + sudo apt-get update + sudo apt-get install -y $@ + fi +} + +# If we're going to run tests inside of a qemu image, then we don't need any of +# the scripts below. Instead, download the image, prepare a filesystem which has +# the current state of this repository, and then run the image. +# +# It's assume that all images, when run with two disks, will run the `run.sh` +# script from the second which we place inside. +if [ "$QEMU" != "" ]; then + # Acquire QEMU and the base OS image + install qemu-kvm + tmpdir=/tmp/qemu-img-creation + mkdir -p $tmpdir + if [ ! -f $tmpdir/$QEMU ]; then + curl https://people.mozilla.org/~acrichton/libc-test/qemu/$QEMU.gz | \ + gunzip -d > $tmpdir/$QEMU + fi + + # Generate all.{c,rs} on the host which will be compiled inside QEMU. Do this + # here because compiling syntex_syntax in QEMU would time out basically + # everywhere. + rm -rf $tmpdir/generated + mkdir -p $tmpdir/generated + CARGO_TARGET_DIR=$tmpdir/generated-build \ + cargo build --manifest-path libc-test/generate-files/Cargo.toml + (cd libc-test && TARGET=$TARGET OUT_DIR=$tmpdir/generated SKIP_COMPILE=1 \ + $tmpdir/generated-build/debug/generate-files) + + # Create a mount a fresh new filesystem image that we'll later pass to QEMU, + # this contains the checkout of libc and will be able to run all tests + rm -f $tmpdir/libc-test.img + dd if=/dev/null of=$tmpdir/libc-test.img bs=1M seek=5 + mkfs.ext2 -F $tmpdir/libc-test.img + rm -rf $tmpdir/mount + mkdir $tmpdir/mount + sudo mount -t ext2 -o loop $tmpdir/libc-test.img $tmpdir/mount + + # Copy this folder into the mounted image, the `run.sh` entry point, and + # overwrite the standard libc-test Cargo.toml with the overlay one which will + # assume the all.{c,rs} test files have already been generated + sudo mkdir $tmpdir/mount/libc + sudo cp -r * $tmpdir/mount/libc/ + sudo cp ci/run-qemu.sh $tmpdir/mount/run.sh + echo $TARGET | sudo tee -a $tmpdir/mount/TARGET + sudo cp $tmpdir/generated/* $tmpdir/mount/libc/libc-test + sudo cp libc-test/run-generated-Cargo.toml $tmpdir/mount/libc/libc-test/Cargo.toml + + sudo umount $tmpdir/mount + + # If we can use kvm, prefer that, otherwise just fall back to user-space + # emulation. + if kvm-ok; then + program="sudo kvm" + else + program=qemu-system-x86_64 + fi + + # Pass -snapshot to prevent tampering with the disk images, this helps when + # running this script in development. The two drives are then passed next, + # first is the OS and second is the one we just made. Next the network is + # configured to work (I'm not entirely sure how), and then finally we turn off + # graphics and redirect the serial console output to out.log. + $program \ + -m 1024 \ + -snapshot \ + -drive if=virtio,file=$tmpdir/$QEMU \ + -drive if=virtio,file=$tmpdir/libc-test.img \ + -net nic,model=virtio \ + -net user \ + -nographic \ + -vga none 2>&1 | tee out.log + exec grep "^PASSED .* tests" out.log +fi + +mkdir -p .cargo +cp ci/cargo-config .cargo/config + +# Next up we need to install the standard library for the version of Rust that +# we're testing. +if [ "$TRAVIS" = "true" ]; then + curl -s $MAIN_TARGETS/rust-std-$TRAVIS_RUST_VERSION-$TARGET.tar.gz | \ + tar xzf - -C $HOME/rust/lib/rustlib --strip-components=4 \ + rust-std-$TRAVIS_RUST_VERSION-$TARGET/rust-std-$TARGET/lib/rustlib/$TARGET +fi + +# If we're testing with a docker image, then run tests entirely within that +# image. Note that this is using the same rustc installation that travis has +# (sharing it via `-v`) and otherwise the tests run entirely within the +# container. +# +# For the docker build we mount the entire current directory at /checkout, set +# up some environment variables to let it run, and then run the standard run.sh +# script. +if [ "$DOCKER" != "" ]; then + args="" + + case "$TARGET" in + mips-unknown-linux-gnu) + args="$args -e CC=mips-linux-gnu-gcc-5" + ;; + + *) + ;; + esac + + exec docker run \ + --entrypoint bash \ + -v `rustc --print sysroot`:/usr/local:ro \ + -v `pwd`:/checkout \ + -e LD_LIBRARY_PATH=/usr/local/lib \ + -e CARGO_TARGET_DIR=/tmp \ + $args \ + -w /checkout \ + -it $DOCKER \ + ci/run.sh $TARGET +fi + +# If we're not running docker or qemu, then we may still need some packages +# and/or tools with various configurations here and there. +case "$TARGET" in + x86_64-unknown-linux-musl) + install musl-tools + export CC=musl-gcc + ;; + + arm-unknown-linux-gnueabihf) + install gcc-4.7-arm-linux-gnueabihf qemu-user + export CC=arm-linux-gnueabihf-gcc-4.7 + ;; + + aarch64-unknown-linux-gnu) + install gcc-aarch64-linux-gnu qemu-user + export CC=aarch64-linux-gnu-gcc + ;; + + *-apple-ios) + ;; + + *) + # clang has better error messages and implements alignof more broadly + export CC=clang + + if [ "$TARGET" = "i686-unknown-linux-gnu" ]; then + install gcc-multilib + fi + ;; + +esac + +# Finally, if we've gotten this far, actually run the tests. +sh ci/run.sh $TARGET + +if [ "$TARGET" = "x86_64-unknown-linux-gnu" ] && \ + [ "$TRAVIS_RUST_VERSION" = "nightly" ] && \ + [ "$TRAVIS_OS_NAME" = "linux" ]; then + sh ci/dox.sh +fi diff --git a/deps/libc-0.2.7/ci/run.sh b/deps/libc-0.2.8/ci/run.sh similarity index 100% rename from deps/libc-0.2.7/ci/run.sh rename to deps/libc-0.2.8/ci/run.sh diff --git a/deps/libc-0.2.8/ci/style.rs b/deps/libc-0.2.8/ci/style.rs new file mode 100644 index 000000000..32e4ba772 --- /dev/null +++ b/deps/libc-0.2.8/ci/style.rs @@ -0,0 +1,204 @@ +//! Simple script to verify the coding style of this library +//! +//! ## How to run +//! +//! The first argument to this script is the directory to run on, so running +//! this script should be as simple as: +//! +//! ```notrust +//! rustc ci/style.rs +//! ./style src +//! ``` +//! +//! ## Guidelines +//! +//! The current style is: +//! +//! * No trailing whitespace +//! * No tabs +//! * 80-character lines +//! * `extern` instead of `extern "C"` +//! * Specific module layout: +//! 1. use directives +//! 2. typedefs +//! 3. structs +//! 4. constants +//! 5. f! { ... } functions +//! 6. extern functions +//! 7. modules + pub use +//! +//! Things not verified: +//! +//! * alignment +//! * 4-space tabs +//! * leading colons on paths + +use std::env; +use std::fs; +use std::io::prelude::*; +use std::path::Path; + +macro_rules! t { + ($e:expr) => (match $e { + Ok(e) => e, + Err(e) => panic!("{} failed with {}", stringify!($e), e), + }) +} + +fn main() { + let arg = env::args().skip(1).next().unwrap_or(".".to_string()); + + let mut errors = Errors { errs: false }; + walk(Path::new(&arg), &mut errors); + + if errors.errs { + panic!("found some lint errors"); + } else { + println!("good style!"); + } +} + +fn walk(path: &Path, err: &mut Errors) { + for entry in t!(path.read_dir()).map(|e| t!(e)) { + let path = entry.path(); + if t!(entry.file_type()).is_dir() { + walk(&path, err); + continue + } + + let name = entry.file_name().into_string().unwrap(); + match &name[..] { + n if !n.ends_with(".rs") => continue, + + "dox.rs" | + "lib.rs" | + "macros.rs" => continue, + + _ => {} + } + + let mut contents = String::new(); + t!(t!(fs::File::open(&path)).read_to_string(&mut contents)); + + check_style(&contents, &path, err); + } +} + +struct Errors { + errs: bool, +} + +#[derive(Clone, Copy, PartialEq)] +enum State { + Start, + Imports, + Typedefs, + Structs, + Constants, + FunctionDefinitions, + Functions, + Modules, +} + +fn check_style(file: &str, path: &Path, err: &mut Errors) { + let mut state = State::Start; + let mut s_macros = 0; + let mut f_macros = 0; + let mut prev_blank = false; + + for (i, line) in file.lines().enumerate() { + if line == "" { + if prev_blank { + err.error(path, i, "double blank line"); + } + prev_blank = true; + } else { + prev_blank = false; + } + if line != line.trim_right() { + err.error(path, i, "trailing whitespace"); + } + if line.contains("\t") { + err.error(path, i, "tab character"); + } + if line.len() > 80 { + err.error(path, i, "line longer than 80 chars"); + } + if line.contains("extern \"C\"") { + err.error(path, i, "use `extern` instead of `extern \"C\""); + } + if line.contains("#[cfg(") && !line.contains(" if ") { + if state != State::Structs { + err.error(path, i, "use cfg_if! and submodules \ + instead of #[cfg]"); + } + } + + let line = line.trim_left(); + let is_pub = line.starts_with("pub "); + let line = if is_pub {&line[4..]} else {line}; + + let line_state = if line.starts_with("use ") { + if is_pub { + State::Modules + } else { + State::Imports + } + } else if line.starts_with("const ") { + State::Constants + } else if line.starts_with("type ") { + State::Typedefs + } else if line.starts_with("s! {") { + s_macros += 1; + State::Structs + } else if line.starts_with("f! {") { + f_macros += 1; + State::FunctionDefinitions + } else if line.starts_with("extern ") { + State::Functions + } else if line.starts_with("mod ") { + State::Modules + } else { + continue + }; + + if state as usize > line_state as usize { + err.error(path, i, &format!("{} found after {} when \ + it belongs before", + line_state.desc(), state.desc())); + } + + if f_macros == 2 { + f_macros += 1; + err.error(path, i, "multiple f! macros in one module"); + } + if s_macros == 2 { + s_macros += 1; + err.error(path, i, "multiple s! macros in one module"); + } + + state = line_state; + } +} + +impl State { + fn desc(&self) -> &str { + match *self { + State::Start => "start", + State::Imports => "import", + State::Typedefs => "typedef", + State::Structs => "struct", + State::Constants => "constant", + State::FunctionDefinitions => "function definition", + State::Functions => "extern function", + State::Modules => "module", + } + } +} + +impl Errors { + fn error(&mut self, path: &Path, line: usize, msg: &str) { + self.errs = true; + println!("{}:{} - {}", path.display(), line + 1, msg); + } +} diff --git a/deps/libc-0.2.7/src/dox.rs b/deps/libc-0.2.8/src/dox.rs similarity index 100% rename from deps/libc-0.2.7/src/dox.rs rename to deps/libc-0.2.8/src/dox.rs diff --git a/deps/libc-0.2.8/src/lib.rs b/deps/libc-0.2.8/src/lib.rs new file mode 100644 index 000000000..57919c59f --- /dev/null +++ b/deps/libc-0.2.8/src/lib.rs @@ -0,0 +1,265 @@ +// Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +//! Crate docs + +#![allow(bad_style, overflowing_literals, improper_ctypes)] +#![crate_type = "rlib"] +#![crate_name = "libc"] +#![cfg_attr(dox, feature(no_core, lang_items))] +#![cfg_attr(dox, no_core)] +#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", + html_favicon_url = "https://doc.rust-lang.org/favicon.ico")] + +#![cfg_attr(all(target_os = "linux", target_arch = "x86_64"), doc( + html_root_url = "https://doc.rust-lang.org/libc/x86_64-unknown-linux-gnu" +))] +#![cfg_attr(all(target_os = "linux", target_arch = "x86"), doc( + html_root_url = "https://doc.rust-lang.org/libc/i686-unknown-linux-gnu" +))] +#![cfg_attr(all(target_os = "linux", target_arch = "arm"), doc( + html_root_url = "https://doc.rust-lang.org/libc/arm-unknown-linux-gnueabihf" +))] +#![cfg_attr(all(target_os = "linux", target_arch = "mips"), doc( + html_root_url = "https://doc.rust-lang.org/libc/mips-unknown-linux-gnu" +))] +#![cfg_attr(all(target_os = "linux", target_arch = "aarch64"), doc( + html_root_url = "https://doc.rust-lang.org/libc/aarch64-unknown-linux-gnu" +))] +#![cfg_attr(all(target_os = "linux", target_env = "musl"), doc( + html_root_url = "https://doc.rust-lang.org/libc/x86_64-unknown-linux-musl" +))] +#![cfg_attr(all(target_os = "macos", target_arch = "x86_64"), doc( + html_root_url = "https://doc.rust-lang.org/libc/x86_64-apple-darwin" +))] +#![cfg_attr(all(target_os = "macos", target_arch = "x86"), doc( + html_root_url = "https://doc.rust-lang.org/libc/i686-apple-darwin" +))] +#![cfg_attr(all(windows, target_arch = "x86_64", target_env = "gnu"), doc( + html_root_url = "https://doc.rust-lang.org/libc/x86_64-pc-windows-gnu" +))] +#![cfg_attr(all(windows, target_arch = "x86", target_env = "gnu"), doc( + html_root_url = "https://doc.rust-lang.org/libc/i686-pc-windows-gnu" +))] +#![cfg_attr(all(windows, target_arch = "x86_64", target_env = "msvc"), doc( + html_root_url = "https://doc.rust-lang.org/libc/x86_64-pc-windows-msvc" +))] +#![cfg_attr(all(windows, target_arch = "x86", target_env = "msvc"), doc( + html_root_url = "https://doc.rust-lang.org/libc/i686-pc-windows-msvc" +))] +#![cfg_attr(target_os = "android", doc( + html_root_url = "https://doc.rust-lang.org/libc/arm-linux-androideabi" +))] +#![cfg_attr(target_os = "freebsd", doc( + html_root_url = "https://doc.rust-lang.org/libc/x86_64-unknown-freebsd" +))] +#![cfg_attr(target_os = "openbsd", doc( + html_root_url = "https://doc.rust-lang.org/libc/x86_64-unknown-openbsd" +))] +#![cfg_attr(target_os = "bitrig", doc( + html_root_url = "https://doc.rust-lang.org/libc/x86_64-unknown-bitrig" +))] +#![cfg_attr(target_os = "netbsd", doc( + html_root_url = "https://doc.rust-lang.org/libc/x86_64-unknown-netbsd" +))] +#![cfg_attr(target_os = "dragonfly", doc( + html_root_url = "https://doc.rust-lang.org/libc/x86_64-unknown-dragonfly" +))] + +// Attributes needed when building as part of the standard library +#![cfg_attr(stdbuild, feature(no_std, core, core_slice_ext, staged_api, custom_attribute, cfg_target_vendor))] +#![cfg_attr(stdbuild, no_std)] +#![cfg_attr(stdbuild, staged_api)] +#![cfg_attr(stdbuild, allow(warnings))] +#![cfg_attr(stdbuild, unstable(feature = "libc", + reason = "use `libc` from crates.io", + issue = "27783"))] + +#![cfg_attr(not(feature = "use_std"), no_std)] + +#[cfg(all(not(stdbuild), not(dox), feature = "use_std"))] +extern crate std as core; + +#[macro_use] mod macros; +mod dox; + +// Use repr(u8) as LLVM expects `void*` to be the same as `i8*` to help enable +// more optimization opportunities around it recognizing things like +// malloc/free. +#[repr(u8)] +pub enum c_void { + // Two dummy variants so the #[repr] attribute can be used. + #[doc(hidden)] + __variant1, + #[doc(hidden)] + __variant2, +} + +pub type int8_t = i8; +pub type int16_t = i16; +pub type int32_t = i32; +pub type int64_t = i64; +pub type uint8_t = u8; +pub type uint16_t = u16; +pub type uint32_t = u32; +pub type uint64_t = u64; + +pub type c_schar = i8; +pub type c_uchar = u8; +pub type c_short = i16; +pub type c_ushort = u16; +pub type c_int = i32; +pub type c_uint = u32; +pub type c_float = f32; +pub type c_double = f64; +pub type c_longlong = i64; +pub type c_ulonglong = u64; +pub type intmax_t = i64; +pub type uintmax_t = u64; + +pub type size_t = usize; +pub type ptrdiff_t = isize; +pub type intptr_t = isize; +pub type uintptr_t = usize; +pub type ssize_t = isize; + +pub enum FILE {} +pub enum fpos_t {} // TODO: fill this out with a struct + +extern { + pub fn isalnum(c: c_int) -> c_int; + pub fn isalpha(c: c_int) -> c_int; + pub fn iscntrl(c: c_int) -> c_int; + pub fn isdigit(c: c_int) -> c_int; + pub fn isgraph(c: c_int) -> c_int; + pub fn islower(c: c_int) -> c_int; + pub fn isprint(c: c_int) -> c_int; + pub fn ispunct(c: c_int) -> c_int; + pub fn isspace(c: c_int) -> c_int; + pub fn isupper(c: c_int) -> c_int; + pub fn isxdigit(c: c_int) -> c_int; + pub fn tolower(c: c_int) -> c_int; + pub fn toupper(c: c_int) -> c_int; + + #[cfg_attr(all(target_os = "macos", target_arch = "x86"), + link_name = "fopen$UNIX2003")] + pub fn fopen(filename: *const c_char, + mode: *const c_char) -> *mut FILE; + #[cfg_attr(all(target_os = "macos", target_arch = "x86"), + link_name = "freopen$UNIX2003")] + pub fn freopen(filename: *const c_char, mode: *const c_char, + file: *mut FILE) -> *mut FILE; + pub fn fflush(file: *mut FILE) -> c_int; + pub fn fclose(file: *mut FILE) -> c_int; + pub fn remove(filename: *const c_char) -> c_int; + pub fn rename(oldname: *const c_char, newname: *const c_char) -> c_int; + pub fn tmpfile() -> *mut FILE; + pub fn setvbuf(stream: *mut FILE, + buffer: *mut c_char, + mode: c_int, + size: size_t) -> c_int; + pub fn setbuf(stream: *mut FILE, buf: *mut c_char); + pub fn fgetc(stream: *mut FILE) -> c_int; + pub fn fgets(buf: *mut c_char, n: c_int, stream: *mut FILE) -> *mut c_char; + pub fn fputc(c: c_int, stream: *mut FILE) -> c_int; + #[cfg_attr(all(target_os = "macos", target_arch = "x86"), + link_name = "fputs$UNIX2003")] + pub fn fputs(s: *const c_char, stream: *mut FILE)-> c_int; + pub fn puts(s: *const c_char) -> c_int; + pub fn ungetc(c: c_int, stream: *mut FILE) -> c_int; + pub fn fread(ptr: *mut c_void, + size: size_t, + nobj: size_t, + stream: *mut FILE) + -> size_t; + #[cfg_attr(all(target_os = "macos", target_arch = "x86"), + link_name = "fwrite$UNIX2003")] + pub fn fwrite(ptr: *const c_void, + size: size_t, + nobj: size_t, + stream: *mut FILE) + -> size_t; + pub fn fseek(stream: *mut FILE, offset: c_long, whence: c_int) -> c_int; + pub fn ftell(stream: *mut FILE) -> c_long; + pub fn rewind(stream: *mut FILE); + #[cfg_attr(target_os = "netbsd", link_name = "__fgetpos50")] + pub fn fgetpos(stream: *mut FILE, ptr: *mut fpos_t) -> c_int; + #[cfg_attr(target_os = "netbsd", link_name = "__fsetpos50")] + pub fn fsetpos(stream: *mut FILE, ptr: *const fpos_t) -> c_int; + pub fn feof(stream: *mut FILE) -> c_int; + pub fn ferror(stream: *mut FILE) -> c_int; + pub fn perror(s: *const c_char); + pub fn atoi(s: *const c_char) -> c_int; + #[cfg_attr(all(target_os = "macos", target_arch = "x86"), + link_name = "strtod$UNIX2003")] + pub fn strtod(s: *const c_char, endp: *mut *mut c_char) -> c_double; + pub fn strtol(s: *const c_char, + endp: *mut *mut c_char, base: c_int) -> c_long; + pub fn strtoul(s: *const c_char, endp: *mut *mut c_char, + base: c_int) -> c_ulong; + pub fn calloc(nobj: size_t, size: size_t) -> *mut c_void; + pub fn malloc(size: size_t) -> *mut c_void; + pub fn realloc(p: *mut c_void, size: size_t) -> *mut c_void; + pub fn free(p: *mut c_void); + pub fn abort() -> !; + pub fn exit(status: c_int) -> !; + pub fn _exit(status: c_int) -> !; + pub fn atexit(cb: extern fn()) -> c_int; + #[cfg_attr(all(target_os = "macos", target_arch = "x86"), + link_name = "system$UNIX2003")] + pub fn system(s: *const c_char) -> c_int; + pub fn getenv(s: *const c_char) -> *mut c_char; + + pub fn strcpy(dst: *mut c_char, src: *const c_char) -> *mut c_char; + pub fn strncpy(dst: *mut c_char, src: *const c_char, n: size_t) + -> *mut c_char; + pub fn strcat(s: *mut c_char, ct: *const c_char) -> *mut c_char; + pub fn strncat(s: *mut c_char, ct: *const c_char, n: size_t) -> *mut c_char; + pub fn strcmp(cs: *const c_char, ct: *const c_char) -> c_int; + pub fn strncmp(cs: *const c_char, ct: *const c_char, n: size_t) -> c_int; + pub fn strcoll(cs: *const c_char, ct: *const c_char) -> c_int; + pub fn strchr(cs: *const c_char, c: c_int) -> *mut c_char; + pub fn strrchr(cs: *const c_char, c: c_int) -> *mut c_char; + pub fn strspn(cs: *const c_char, ct: *const c_char) -> size_t; + pub fn strcspn(cs: *const c_char, ct: *const c_char) -> size_t; + pub fn strpbrk(cs: *const c_char, ct: *const c_char) -> *mut c_char; + pub fn strstr(cs: *const c_char, ct: *const c_char) -> *mut c_char; + pub fn strlen(cs: *const c_char) -> size_t; + #[cfg_attr(all(target_os = "macos", target_arch = "x86"), + link_name = "strerror$UNIX2003")] + pub fn strerror(n: c_int) -> *mut c_char; + pub fn strtok(s: *mut c_char, t: *const c_char) -> *mut c_char; + pub fn strxfrm(s: *mut c_char, ct: *const c_char, n: size_t) -> size_t; + pub fn wcslen(buf: *const wchar_t) -> size_t; + + pub fn memcmp(cx: *const c_void, ct: *const c_void, n: size_t) -> c_int; + pub fn memchr(cx: *const c_void, c: c_int, n: size_t) -> *mut c_void; +} + +// These are all inline functions on android, so they end up just being entirely +// missing on that platform. +#[cfg(not(target_os = "android"))] +extern { + pub fn abs(i: c_int) -> c_int; + pub fn atof(s: *const c_char) -> c_double; + pub fn labs(i: c_long) -> c_long; + pub fn rand() -> c_int; + pub fn srand(seed: c_uint); +} + +cfg_if! { + if #[cfg(windows)] { + mod windows; + pub use windows::*; + } else { + mod unix; + pub use unix::*; + } +} diff --git a/deps/libc-0.2.8/src/macros.rs b/deps/libc-0.2.8/src/macros.rs new file mode 100644 index 000000000..5811c84c3 --- /dev/null +++ b/deps/libc-0.2.8/src/macros.rs @@ -0,0 +1,108 @@ +/// A macro for defining #[cfg] if-else statements. +/// +/// This is similar to the `if/elif` C preprocessor macro by allowing definition +/// of a cascade of `#[cfg]` cases, emitting the implementation which matches +/// first. +/// +/// This allows you to conveniently provide a long list #[cfg]'d blocks of code +/// without having to rewrite each clause multiple times. +macro_rules! cfg_if { + ($( + if #[cfg($($meta:meta),*)] { $($it:item)* } + ) else * else { + $($it2:item)* + }) => { + __cfg_if_items! { + () ; + $( ( ($($meta),*) ($($it)*) ), )* + ( () ($($it2)*) ), + } + } +} + +macro_rules! __cfg_if_items { + (($($not:meta,)*) ; ) => {}; + (($($not:meta,)*) ; ( ($($m:meta),*) ($($it:item)*) ), $($rest:tt)*) => { + __cfg_if_apply! { cfg(all(not(any($($not),*)), $($m,)*)), $($it)* } + __cfg_if_items! { ($($not,)* $($m,)*) ; $($rest)* } + } +} + +macro_rules! __cfg_if_apply { + ($m:meta, $($it:item)*) => { + $(#[$m] $it)* + } +} + +macro_rules! s { + ($($(#[$attr:meta])* pub struct $i:ident { $($field:tt)* })*) => ($( + __item! { + #[repr(C)] + $(#[$attr])* + pub struct $i { $($field)* } + } + impl ::dox::Copy for $i {} + impl ::dox::Clone for $i { + fn clone(&self) -> $i { *self } + } + )*) +} + +macro_rules! f { + ($(pub fn $i:ident($($arg:ident: $argty:ty),*) -> $ret:ty { + $($body:stmt);* + })*) => ($( + #[inline] + #[cfg(not(dox))] + pub unsafe extern fn $i($($arg: $argty),*) -> $ret { + $($body);* + } + + #[cfg(dox)] + #[allow(dead_code)] + pub unsafe extern fn $i($($arg: $argty),*) -> $ret { + loop {} + } + )*) +} + +macro_rules! __item { + ($i:item) => ($i) +} + +#[cfg(test)] +mod tests { + cfg_if! { + if #[cfg(test)] { + use std::option::Option as Option2; + fn works1() -> Option2 { Some(1) } + } else { + fn works1() -> Option { None } + } + } + + cfg_if! { + if #[cfg(foo)] { + fn works2() -> bool { false } + } else if #[cfg(test)] { + fn works2() -> bool { true } + } else { + fn works2() -> bool { false } + } + } + + cfg_if! { + if #[cfg(foo)] { + fn works3() -> bool { false } + } else { + fn works3() -> bool { true } + } + } + + #[test] + fn it_works() { + assert!(works1().is_some()); + assert!(works2()); + assert!(works3()); + } +} diff --git a/deps/libc-0.2.8/src/unix/bsd/apple/b32.rs b/deps/libc-0.2.8/src/unix/bsd/apple/b32.rs new file mode 100644 index 000000000..d2c567161 --- /dev/null +++ b/deps/libc-0.2.8/src/unix/bsd/apple/b32.rs @@ -0,0 +1,15 @@ +//! 32-bit specific Apple (ios/darwin) definitions + +pub type c_long = i32; +pub type c_ulong = u32; + +s! { + pub struct pthread_attr_t { + __sig: c_long, + __opaque: [::c_char; 36] + } +} + +pub const __PTHREAD_MUTEX_SIZE__: usize = 40; +pub const __PTHREAD_COND_SIZE__: usize = 24; +pub const __PTHREAD_RWLOCK_SIZE__: usize = 124; diff --git a/deps/libc-0.2.8/src/unix/bsd/apple/b64.rs b/deps/libc-0.2.8/src/unix/bsd/apple/b64.rs new file mode 100644 index 000000000..784aa9b5d --- /dev/null +++ b/deps/libc-0.2.8/src/unix/bsd/apple/b64.rs @@ -0,0 +1,15 @@ +//! 64-bit specific Apple (ios/darwin) definitions + +pub type c_long = i64; +pub type c_ulong = u64; + +s! { + pub struct pthread_attr_t { + __sig: c_long, + __opaque: [::c_char; 56] + } +} + +pub const __PTHREAD_MUTEX_SIZE__: usize = 56; +pub const __PTHREAD_COND_SIZE__: usize = 40; +pub const __PTHREAD_RWLOCK_SIZE__: usize = 192; diff --git a/deps/libc-0.2.7/src/unix/bsd/apple/mod.rs b/deps/libc-0.2.8/src/unix/bsd/apple/mod.rs similarity index 100% rename from deps/libc-0.2.7/src/unix/bsd/apple/mod.rs rename to deps/libc-0.2.8/src/unix/bsd/apple/mod.rs diff --git a/deps/libc-0.2.8/src/unix/bsd/freebsdlike/dragonfly/mod.rs b/deps/libc-0.2.8/src/unix/bsd/freebsdlike/dragonfly/mod.rs new file mode 100644 index 000000000..079f49576 --- /dev/null +++ b/deps/libc-0.2.8/src/unix/bsd/freebsdlike/dragonfly/mod.rs @@ -0,0 +1,103 @@ +pub type clock_t = u64; +pub type ino_t = u64; +pub type nlink_t = u32; +pub type blksize_t = i64; + +pub type c_long = i64; +pub type c_ulong = u64; +pub type time_t = i64; +pub type suseconds_t = i64; + +pub type uuid_t = ::uuid; + +pub type fsblkcnt_t = u64; +pub type fsfilcnt_t = u64; + +s! { + pub struct dirent { + pub d_fileno: ::ino_t, + pub d_namlen: u16, + pub d_type: u8, + __unused1: u8, + __unused2: u32, + pub d_name: [::c_char; 256], + } + + pub struct uuid { + pub time_low: u32, + pub time_mid: u16, + pub time_hi_and_version: u16, + pub clock_seq_hi_and_reserved: u8, + pub clock_seq_low: u8, + pub node: [u8; 6], + } + + pub struct statvfs { + pub f_bsize: ::c_ulong, + pub f_frsize: ::c_ulong, + pub f_blocks: ::fsblkcnt_t, + pub f_bfree: ::fsblkcnt_t, + pub f_bavail: ::fsblkcnt_t, + pub f_files: ::fsfilcnt_t, + pub f_ffree: ::fsfilcnt_t, + pub f_favail: ::fsfilcnt_t, + pub f_fsid: ::c_ulong, + pub f_flag: ::c_ulong, + pub f_namemax: ::c_ulong, + pub f_owner: ::uid_t, + pub f_type: ::c_uint, + pub f_syncreads: u64, + pub f_syncwrites: u64, + pub f_asyncreads: u64, + pub f_asyncwrites: u64, + pub f_fsid_uuid: ::uuid_t, + pub f_uid_uuid: ::uuid_t, + } + + pub struct stat { + pub st_ino: ::ino_t, + pub st_nlink: ::nlink_t, + pub st_dev: ::dev_t, + pub st_mode: ::mode_t, + pub st_padding1: ::uint16_t, + pub st_uid: ::uid_t, + pub st_gid: ::gid_t, + pub st_rdev: ::dev_t, + pub st_atime: ::time_t, + pub st_atime_nsec: ::c_long, + pub st_mtime: ::time_t, + pub st_mtime_nsec: ::c_long, + pub st_ctime: ::time_t, + pub st_ctime_nsec: ::c_long, + pub st_size: ::off_t, + pub st_blocks: ::int64_t, + pub st_blksize: ::uint32_t, + pub st_flags: ::uint32_t, + pub st_gen: ::uint32_t, + pub st_lspare: ::int32_t, + pub st_qspare1: ::int64_t, + pub st_qspare2: ::int64_t, + } +} + +pub const RAND_MAX: ::c_int = 0x7fff_ffff; +pub const PTHREAD_STACK_MIN: ::size_t = 1024; +pub const KERN_PROC_PATHNAME: ::c_int = 9; +pub const SIGSTKSZ: ::size_t = 40960; +pub const MADV_INVAL: ::c_int = 10; +pub const O_CLOEXEC: ::c_int = 0x00020000; +pub const F_GETLK: ::c_int = 7; +pub const F_SETLK: ::c_int = 8; +pub const F_SETLKW: ::c_int = 9; +pub const ELAST: ::c_int = 99; +pub const RLIMIT_POSIXLOCKS: ::c_int = 11; +pub const RLIM_NLIMITS: ::rlim_t = 12; + +pub const Q_GETQUOTA: ::c_int = 0x300; +pub const Q_SETQUOTA: ::c_int = 0x400; + +extern { + pub fn mprotect(addr: *mut ::c_void, len: ::size_t, prot: ::c_int) + -> ::c_int; + pub fn clock_gettime(clk_id: ::c_ulong, tp: *mut ::timespec) -> ::c_int; +} diff --git a/deps/libc-0.2.8/src/unix/bsd/freebsdlike/freebsd/mod.rs b/deps/libc-0.2.8/src/unix/bsd/freebsdlike/freebsd/mod.rs new file mode 100644 index 000000000..171889e56 --- /dev/null +++ b/deps/libc-0.2.8/src/unix/bsd/freebsdlike/freebsd/mod.rs @@ -0,0 +1,91 @@ +pub type fflags_t = u32; +pub type clock_t = i32; +pub type ino_t = u32; +pub type nlink_t = u16; +pub type blksize_t = u32; + +pub type fsblkcnt_t = ::uint64_t; +pub type fsfilcnt_t = ::uint64_t; + +s! { + pub struct dirent { + pub d_fileno: u32, + pub d_reclen: u16, + pub d_type: u8, + pub d_namlen: u8, + pub d_name: [::c_char; 256], + } + + pub struct statvfs { + pub f_bavail: ::fsblkcnt_t, + pub f_bfree: ::fsblkcnt_t, + pub f_blocks: ::fsblkcnt_t, + pub f_favail: ::fsfilcnt_t, + pub f_ffree: ::fsfilcnt_t, + pub f_files: ::fsfilcnt_t, + pub f_bsize: ::c_ulong, + pub f_flag: ::c_ulong, + pub f_frsize: ::c_ulong, + pub f_fsid: ::c_ulong, + pub f_namemax: ::c_ulong, + } +} + +pub const RAND_MAX: ::c_int = 0x7fff_fffd; +pub const PTHREAD_STACK_MIN: ::size_t = 2048; +pub const KERN_PROC_PATHNAME: ::c_int = 12; +pub const SIGSTKSZ: ::size_t = 34816; +pub const SF_NODISKIO: ::c_int = 0x00000001; +pub const SF_MNOWAIT: ::c_int = 0x00000002; +pub const SF_SYNC: ::c_int = 0x00000004; +pub const O_CLOEXEC: ::c_int = 0x00100000; +pub const F_GETLK: ::c_int = 11; +pub const F_SETLK: ::c_int = 12; +pub const F_SETLKW: ::c_int = 13; +pub const ELAST: ::c_int = 96; +pub const RLIMIT_NPTS: ::c_int = 11; +pub const RLIMIT_SWAP: ::c_int = 12; +pub const RLIM_NLIMITS: ::rlim_t = 13; + +pub const Q_GETQUOTA: ::c_int = 0x700; +pub const Q_SETQUOTA: ::c_int = 0x800; + +pub const POSIX_FADV_NORMAL: ::c_int = 0; +pub const POSIX_FADV_RANDOM: ::c_int = 1; +pub const POSIX_FADV_SEQUENTIAL: ::c_int = 2; +pub const POSIX_FADV_WILLNEED: ::c_int = 3; +pub const POSIX_FADV_DONTNEED: ::c_int = 4; +pub const POSIX_FADV_NOREUSE: ::c_int = 5; + +pub const MADV_PROTECT: ::c_int = 10; +pub const RUSAGE_THREAD: ::c_int = 1; + +extern { + pub fn __error() -> *mut ::c_int; + + pub fn mprotect(addr: *const ::c_void, len: ::size_t, prot: ::c_int) + -> ::c_int; + + pub fn clock_gettime(clk_id: ::c_int, tp: *mut ::timespec) -> ::c_int; + + pub fn posix_fallocate(fd: ::c_int, offset: ::off_t, + len: ::off_t) -> ::c_int; + pub fn posix_fadvise(fd: ::c_int, offset: ::off_t, len: ::off_t, + advise: ::c_int) -> ::c_int; + pub fn mkostemp(template: *mut ::c_char, flags: ::c_int) -> ::c_int; + pub fn mkostemps(template: *mut ::c_char, + suffixlen: ::c_int, + flags: ::c_int) -> ::c_int; +} + +cfg_if! { + if #[cfg(target_arch = "x86")] { + mod x86; + pub use self::x86::*; + } else if #[cfg(target_arch = "x86_64")] { + mod x86_64; + pub use self::x86_64::*; + } else { + // ... + } +} diff --git a/deps/libc-0.2.7/src/unix/bsd/freebsdlike/x86.rs b/deps/libc-0.2.8/src/unix/bsd/freebsdlike/freebsd/x86.rs similarity index 100% rename from deps/libc-0.2.7/src/unix/bsd/freebsdlike/x86.rs rename to deps/libc-0.2.8/src/unix/bsd/freebsdlike/freebsd/x86.rs diff --git a/deps/libc-0.2.7/src/unix/bsd/freebsdlike/x86_64.rs b/deps/libc-0.2.8/src/unix/bsd/freebsdlike/freebsd/x86_64.rs similarity index 100% rename from deps/libc-0.2.7/src/unix/bsd/freebsdlike/x86_64.rs rename to deps/libc-0.2.8/src/unix/bsd/freebsdlike/freebsd/x86_64.rs diff --git a/deps/libc-0.2.8/src/unix/bsd/freebsdlike/mod.rs b/deps/libc-0.2.8/src/unix/bsd/freebsdlike/mod.rs new file mode 100644 index 000000000..829ce6dbd --- /dev/null +++ b/deps/libc-0.2.8/src/unix/bsd/freebsdlike/mod.rs @@ -0,0 +1,608 @@ +pub type dev_t = u32; +pub type mode_t = u16; +pub type pthread_attr_t = *mut ::c_void; +pub type rlim_t = i64; +pub type pthread_mutex_t = *mut ::c_void; +pub type pthread_mutexattr_t = *mut ::c_void; +pub type pthread_cond_t = *mut ::c_void; +pub type pthread_rwlock_t = *mut ::c_void; +pub type pthread_key_t = ::c_int; +pub type tcflag_t = ::c_uint; +pub type speed_t = ::c_uint; + +pub enum timezone {} + +s! { + pub struct glob_t { + pub gl_pathc: ::size_t, + __unused1: ::size_t, + pub gl_offs: ::size_t, + __unused2: ::c_int, + pub gl_pathv: *mut *mut ::c_char, + + __unused3: *mut ::c_void, + + __unused4: *mut ::c_void, + __unused5: *mut ::c_void, + __unused6: *mut ::c_void, + __unused7: *mut ::c_void, + __unused8: *mut ::c_void, + } + + pub struct sockaddr_storage { + pub ss_len: u8, + pub ss_family: ::sa_family_t, + __ss_pad1: [u8; 6], + __ss_align: i64, + __ss_pad2: [u8; 112], + } + + pub struct addrinfo { + pub ai_flags: ::c_int, + pub ai_family: ::c_int, + pub ai_socktype: ::c_int, + pub ai_protocol: ::c_int, + pub ai_addrlen: ::socklen_t, + pub ai_canonname: *mut ::c_char, + pub ai_addr: *mut ::sockaddr, + pub ai_next: *mut addrinfo, + } + + pub struct sigset_t { + bits: [u32; 4], + } + + pub struct siginfo_t { + pub si_signo: ::c_int, + pub si_errno: ::c_int, + pub si_code: ::c_int, + pub si_pid: ::pid_t, + pub si_uid: ::uid_t, + pub si_status: ::c_int, + pub si_addr: *mut ::c_void, + _pad: [::c_int; 12], + } + + pub struct sigaction { + pub sa_sigaction: ::sighandler_t, + pub sa_flags: ::c_int, + pub sa_mask: sigset_t, + } + + pub struct stack_t { + pub ss_sp: *mut ::c_char, + pub ss_size: ::size_t, + pub ss_flags: ::c_int, + } + + pub struct sched_param { + pub sched_priority: ::c_int, + } + + pub struct Dl_info { + pub dli_fname: *const ::c_char, + pub dli_fbase: *mut ::c_void, + pub dli_sname: *const ::c_char, + pub dli_saddr: *mut ::c_void, + } + + pub struct sockaddr_in { + pub sin_len: u8, + pub sin_family: ::sa_family_t, + pub sin_port: ::in_port_t, + pub sin_addr: ::in_addr, + pub sin_zero: [::c_char; 8], + } + + pub struct termios { + pub c_iflag: ::tcflag_t, + pub c_oflag: ::tcflag_t, + pub c_cflag: ::tcflag_t, + pub c_lflag: ::tcflag_t, + pub c_cc: [::cc_t; ::NCCS], + pub c_ispeed: ::speed_t, + pub c_ospeed: ::speed_t, + } + + pub struct flock { + pub l_start: ::off_t, + pub l_len: ::off_t, + pub l_pid: ::pid_t, + pub l_type: ::c_short, + pub l_whence: ::c_short, + #[cfg(not(target_os = "dragonfly"))] + pub l_sysid: ::c_int, + } + + pub struct sf_hdtr { + pub headers: *mut ::iovec, + pub hdr_cnt: ::c_int, + pub trailers: *mut ::iovec, + pub trl_cnt: ::c_int, + } +} + +pub const EXIT_FAILURE: ::c_int = 1; +pub const EXIT_SUCCESS: ::c_int = 0; +pub const EOF: ::c_int = -1; +pub const SEEK_SET: ::c_int = 0; +pub const SEEK_CUR: ::c_int = 1; +pub const SEEK_END: ::c_int = 2; +pub const _IOFBF: ::c_int = 0; +pub const _IONBF: ::c_int = 2; +pub const _IOLBF: ::c_int = 1; +pub const BUFSIZ: ::c_uint = 1024; +pub const FOPEN_MAX: ::c_uint = 20; +pub const FILENAME_MAX: ::c_uint = 1024; +pub const L_tmpnam: ::c_uint = 1024; +pub const TMP_MAX: ::c_uint = 308915776; + +pub const O_RDONLY: ::c_int = 0; +pub const O_WRONLY: ::c_int = 1; +pub const O_RDWR: ::c_int = 2; +pub const O_ACCMODE: ::c_int = 3; +pub const O_APPEND: ::c_int = 8; +pub const O_CREAT: ::c_int = 512; +pub const O_EXCL: ::c_int = 2048; +pub const O_NOCTTY: ::c_int = 32768; +pub const O_TRUNC: ::c_int = 1024; +pub const S_IFIFO: mode_t = 4096; +pub const S_IFCHR: mode_t = 8192; +pub const S_IFBLK: mode_t = 24576; +pub const S_IFDIR: mode_t = 16384; +pub const S_IFREG: mode_t = 32768; +pub const S_IFLNK: mode_t = 40960; +pub const S_IFSOCK: mode_t = 49152; +pub const S_IFMT: mode_t = 61440; +pub const S_IEXEC: mode_t = 64; +pub const S_IWRITE: mode_t = 128; +pub const S_IREAD: mode_t = 256; +pub const S_IRWXU: mode_t = 448; +pub const S_IXUSR: mode_t = 64; +pub const S_IWUSR: mode_t = 128; +pub const S_IRUSR: mode_t = 256; +pub const S_IRWXG: mode_t = 56; +pub const S_IXGRP: mode_t = 8; +pub const S_IWGRP: mode_t = 16; +pub const S_IRGRP: mode_t = 32; +pub const S_IRWXO: mode_t = 7; +pub const S_IXOTH: mode_t = 1; +pub const S_IWOTH: mode_t = 2; +pub const S_IROTH: mode_t = 4; +pub const F_OK: ::c_int = 0; +pub const R_OK: ::c_int = 4; +pub const W_OK: ::c_int = 2; +pub const X_OK: ::c_int = 1; +pub const STDIN_FILENO: ::c_int = 0; +pub const STDOUT_FILENO: ::c_int = 1; +pub const STDERR_FILENO: ::c_int = 2; +pub const F_LOCK: ::c_int = 1; +pub const F_TEST: ::c_int = 3; +pub const F_TLOCK: ::c_int = 2; +pub const F_ULOCK: ::c_int = 0; +pub const F_DUPFD_CLOEXEC: ::c_int = 17; +pub const SIGHUP: ::c_int = 1; +pub const SIGINT: ::c_int = 2; +pub const SIGQUIT: ::c_int = 3; +pub const SIGILL: ::c_int = 4; +pub const SIGABRT: ::c_int = 6; +pub const SIGFPE: ::c_int = 8; +pub const SIGKILL: ::c_int = 9; +pub const SIGSEGV: ::c_int = 11; +pub const SIGPIPE: ::c_int = 13; +pub const SIGALRM: ::c_int = 14; +pub const SIGTERM: ::c_int = 15; + +pub const PROT_NONE: ::c_int = 0; +pub const PROT_READ: ::c_int = 1; +pub const PROT_WRITE: ::c_int = 2; +pub const PROT_EXEC: ::c_int = 4; + +pub const MAP_FILE: ::c_int = 0x0000; +pub const MAP_SHARED: ::c_int = 0x0001; +pub const MAP_PRIVATE: ::c_int = 0x0002; +pub const MAP_FIXED: ::c_int = 0x0010; +pub const MAP_ANON: ::c_int = 0x1000; + +pub const MAP_FAILED: *mut ::c_void = !0 as *mut ::c_void; + +pub const MCL_CURRENT: ::c_int = 0x0001; +pub const MCL_FUTURE: ::c_int = 0x0002; + +pub const MS_SYNC: ::c_int = 0x0000; +pub const MS_ASYNC: ::c_int = 0x0001; +pub const MS_INVALIDATE: ::c_int = 0x0002; + +pub const EPERM: ::c_int = 1; +pub const ENOENT: ::c_int = 2; +pub const ESRCH: ::c_int = 3; +pub const EINTR: ::c_int = 4; +pub const EIO: ::c_int = 5; +pub const ENXIO: ::c_int = 6; +pub const E2BIG: ::c_int = 7; +pub const ENOEXEC: ::c_int = 8; +pub const EBADF: ::c_int = 9; +pub const ECHILD: ::c_int = 10; +pub const EDEADLK: ::c_int = 11; +pub const ENOMEM: ::c_int = 12; +pub const EACCES: ::c_int = 13; +pub const EFAULT: ::c_int = 14; +pub const ENOTBLK: ::c_int = 15; +pub const EBUSY: ::c_int = 16; +pub const EEXIST: ::c_int = 17; +pub const EXDEV: ::c_int = 18; +pub const ENODEV: ::c_int = 19; +pub const ENOTDIR: ::c_int = 20; +pub const EISDIR: ::c_int = 21; +pub const EINVAL: ::c_int = 22; +pub const ENFILE: ::c_int = 23; +pub const EMFILE: ::c_int = 24; +pub const ENOTTY: ::c_int = 25; +pub const ETXTBSY: ::c_int = 26; +pub const EFBIG: ::c_int = 27; +pub const ENOSPC: ::c_int = 28; +pub const ESPIPE: ::c_int = 29; +pub const EROFS: ::c_int = 30; +pub const EMLINK: ::c_int = 31; +pub const EPIPE: ::c_int = 32; +pub const EDOM: ::c_int = 33; +pub const ERANGE: ::c_int = 34; +pub const EAGAIN: ::c_int = 35; +pub const EWOULDBLOCK: ::c_int = 35; +pub const EINPROGRESS: ::c_int = 36; +pub const EALREADY: ::c_int = 37; +pub const ENOTSOCK: ::c_int = 38; +pub const EDESTADDRREQ: ::c_int = 39; +pub const EMSGSIZE: ::c_int = 40; +pub const EPROTOTYPE: ::c_int = 41; +pub const ENOPROTOOPT: ::c_int = 42; +pub const EPROTONOSUPPORT: ::c_int = 43; +pub const ESOCKTNOSUPPORT: ::c_int = 44; +pub const EOPNOTSUPP: ::c_int = 45; +pub const EPFNOSUPPORT: ::c_int = 46; +pub const EAFNOSUPPORT: ::c_int = 47; +pub const EADDRINUSE: ::c_int = 48; +pub const EADDRNOTAVAIL: ::c_int = 49; +pub const ENETDOWN: ::c_int = 50; +pub const ENETUNREACH: ::c_int = 51; +pub const ENETRESET: ::c_int = 52; +pub const ECONNABORTED: ::c_int = 53; +pub const ECONNRESET: ::c_int = 54; +pub const ENOBUFS: ::c_int = 55; +pub const EISCONN: ::c_int = 56; +pub const ENOTCONN: ::c_int = 57; +pub const ESHUTDOWN: ::c_int = 58; +pub const ETOOMANYREFS: ::c_int = 59; +pub const ETIMEDOUT: ::c_int = 60; +pub const ECONNREFUSED: ::c_int = 61; +pub const ELOOP: ::c_int = 62; +pub const ENAMETOOLONG: ::c_int = 63; +pub const EHOSTDOWN: ::c_int = 64; +pub const EHOSTUNREACH: ::c_int = 65; +pub const ENOTEMPTY: ::c_int = 66; +pub const EPROCLIM: ::c_int = 67; +pub const EUSERS: ::c_int = 68; +pub const EDQUOT: ::c_int = 69; +pub const ESTALE: ::c_int = 70; +pub const EREMOTE: ::c_int = 71; +pub const EBADRPC: ::c_int = 72; +pub const ERPCMISMATCH: ::c_int = 73; +pub const EPROGUNAVAIL: ::c_int = 74; +pub const EPROGMISMATCH: ::c_int = 75; +pub const EPROCUNAVAIL: ::c_int = 76; +pub const ENOLCK: ::c_int = 77; +pub const ENOSYS: ::c_int = 78; +pub const EFTYPE: ::c_int = 79; +pub const EAUTH: ::c_int = 80; +pub const ENEEDAUTH: ::c_int = 81; +pub const EIDRM: ::c_int = 82; +pub const ENOMSG: ::c_int = 83; +pub const EOVERFLOW: ::c_int = 84; +pub const ECANCELED: ::c_int = 85; +pub const EILSEQ: ::c_int = 86; +pub const ENOATTR: ::c_int = 87; +pub const EDOOFUS: ::c_int = 88; +pub const EBADMSG: ::c_int = 89; +pub const EMULTIHOP: ::c_int = 90; +pub const ENOLINK: ::c_int = 91; +pub const EPROTO: ::c_int = 92; + +pub const F_DUPFD: ::c_int = 0; +pub const F_GETFD: ::c_int = 1; +pub const F_SETFD: ::c_int = 2; +pub const F_GETFL: ::c_int = 3; +pub const F_SETFL: ::c_int = 4; + +pub const SIGTRAP: ::c_int = 5; + +pub const GLOB_APPEND : ::c_int = 0x0001; +pub const GLOB_DOOFFS : ::c_int = 0x0002; +pub const GLOB_ERR : ::c_int = 0x0004; +pub const GLOB_MARK : ::c_int = 0x0008; +pub const GLOB_NOCHECK : ::c_int = 0x0010; +pub const GLOB_NOSORT : ::c_int = 0x0020; +pub const GLOB_NOESCAPE: ::c_int = 0x2000; + +pub const GLOB_NOSPACE : ::c_int = -1; +pub const GLOB_ABORTED : ::c_int = -2; +pub const GLOB_NOMATCH : ::c_int = -3; + +pub const POSIX_MADV_NORMAL: ::c_int = 0; +pub const POSIX_MADV_RANDOM: ::c_int = 1; +pub const POSIX_MADV_SEQUENTIAL: ::c_int = 2; +pub const POSIX_MADV_WILLNEED: ::c_int = 3; +pub const POSIX_MADV_DONTNEED: ::c_int = 4; + +pub const _SC_IOV_MAX: ::c_int = 56; +pub const _SC_GETGR_R_SIZE_MAX: ::c_int = 70; +pub const _SC_GETPW_R_SIZE_MAX: ::c_int = 71; +pub const _SC_LOGIN_NAME_MAX: ::c_int = 73; +pub const _SC_MQ_PRIO_MAX: ::c_int = 75; +pub const _SC_NPROCESSORS_ONLN: ::c_int = 58; +pub const _SC_THREAD_ATTR_STACKADDR: ::c_int = 82; +pub const _SC_THREAD_ATTR_STACKSIZE: ::c_int = 83; +pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: ::c_int = 85; +pub const _SC_THREAD_KEYS_MAX: ::c_int = 86; +pub const _SC_THREAD_PRIO_INHERIT: ::c_int = 87; +pub const _SC_THREAD_PRIO_PROTECT: ::c_int = 88; +pub const _SC_THREAD_PRIORITY_SCHEDULING: ::c_int = 89; +pub const _SC_THREAD_PROCESS_SHARED: ::c_int = 90; +pub const _SC_THREAD_SAFE_FUNCTIONS: ::c_int = 91; +pub const _SC_THREAD_STACK_MIN: ::c_int = 93; +pub const _SC_THREAD_THREADS_MAX: ::c_int = 94; +pub const _SC_THREADS: ::c_int = 96; +pub const _SC_TTY_NAME_MAX: ::c_int = 101; +pub const _SC_ATEXIT_MAX: ::c_int = 107; +pub const _SC_XOPEN_CRYPT: ::c_int = 108; +pub const _SC_XOPEN_ENH_I18N: ::c_int = 109; +pub const _SC_XOPEN_LEGACY: ::c_int = 110; +pub const _SC_XOPEN_REALTIME: ::c_int = 111; +pub const _SC_XOPEN_REALTIME_THREADS: ::c_int = 112; +pub const _SC_XOPEN_SHM: ::c_int = 113; +pub const _SC_XOPEN_UNIX: ::c_int = 115; +pub const _SC_XOPEN_VERSION: ::c_int = 116; +pub const _SC_XOPEN_XCU_VERSION: ::c_int = 117; + +pub const PTHREAD_CREATE_JOINABLE: ::c_int = 0; +pub const PTHREAD_CREATE_DETACHED: ::c_int = 1; + +pub const CLOCK_REALTIME: ::c_int = 0; +pub const CLOCK_MONOTONIC: ::c_int = 4; + +pub const RLIMIT_CPU: ::c_int = 0; +pub const RLIMIT_FSIZE: ::c_int = 1; +pub const RLIMIT_DATA: ::c_int = 2; +pub const RLIMIT_STACK: ::c_int = 3; +pub const RLIMIT_CORE: ::c_int = 4; +pub const RLIMIT_RSS: ::c_int = 5; +pub const RLIMIT_MEMLOCK: ::c_int = 6; +pub const RLIMIT_NPROC: ::c_int = 7; +pub const RLIMIT_NOFILE: ::c_int = 8; +pub const RLIMIT_SBSIZE: ::c_int = 9; +pub const RLIMIT_VMEM: ::c_int = 10; +pub const RLIMIT_AS: ::c_int = RLIMIT_VMEM; +pub const RLIM_INFINITY: rlim_t = 0x7fff_ffff_ffff_ffff; + +pub const RUSAGE_SELF: ::c_int = 0; +pub const RUSAGE_CHILDREN: ::c_int = -1; + +pub const MADV_NORMAL: ::c_int = 0; +pub const MADV_RANDOM: ::c_int = 1; +pub const MADV_SEQUENTIAL: ::c_int = 2; +pub const MADV_WILLNEED: ::c_int = 3; +pub const MADV_DONTNEED: ::c_int = 4; +pub const MADV_FREE: ::c_int = 5; +pub const MADV_NOSYNC: ::c_int = 6; +pub const MADV_AUTOSYNC: ::c_int = 7; +pub const MADV_NOCORE: ::c_int = 8; +pub const MADV_CORE: ::c_int = 9; + +pub const MINCORE_INCORE: ::c_int = 0x1; +pub const MINCORE_REFERENCED: ::c_int = 0x2; +pub const MINCORE_MODIFIED: ::c_int = 0x4; +pub const MINCORE_REFERENCED_OTHER: ::c_int = 0x8; +pub const MINCORE_MODIFIED_OTHER: ::c_int = 0x10; +pub const MINCORE_SUPER: ::c_int = 0x20; + +pub const AF_INET: ::c_int = 2; +pub const AF_INET6: ::c_int = 28; +pub const AF_UNIX: ::c_int = 1; +pub const SOCK_STREAM: ::c_int = 1; +pub const SOCK_DGRAM: ::c_int = 2; +pub const SOCK_RAW: ::c_int = 3; +pub const IPPROTO_TCP: ::c_int = 6; +pub const IPPROTO_IP: ::c_int = 0; +pub const IPPROTO_IPV6: ::c_int = 41; +pub const IP_MULTICAST_TTL: ::c_int = 10; +pub const IP_MULTICAST_LOOP: ::c_int = 11; +pub const IP_TTL: ::c_int = 4; +pub const IP_HDRINCL: ::c_int = 2; +pub const IP_ADD_MEMBERSHIP: ::c_int = 12; +pub const IP_DROP_MEMBERSHIP: ::c_int = 13; +pub const IPV6_JOIN_GROUP: ::c_int = 12; +pub const IPV6_LEAVE_GROUP: ::c_int = 13; + +pub const TCP_NODELAY: ::c_int = 1; +pub const TCP_KEEPIDLE: ::c_int = 256; +pub const SOL_SOCKET: ::c_int = 0xffff; +pub const SO_DEBUG: ::c_int = 0x01; +pub const SO_ACCEPTCONN: ::c_int = 0x0002; +pub const SO_REUSEADDR: ::c_int = 0x0004; +pub const SO_KEEPALIVE: ::c_int = 0x0008; +pub const SO_DONTROUTE: ::c_int = 0x0010; +pub const SO_BROADCAST: ::c_int = 0x0020; +pub const SO_USELOOPBACK: ::c_int = 0x0040; +pub const SO_LINGER: ::c_int = 0x0080; +pub const SO_OOBINLINE: ::c_int = 0x0100; +pub const SO_REUSEPORT: ::c_int = 0x0200; +pub const SO_SNDBUF: ::c_int = 0x1001; +pub const SO_RCVBUF: ::c_int = 0x1002; +pub const SO_SNDLOWAT: ::c_int = 0x1003; +pub const SO_RCVLOWAT: ::c_int = 0x1004; +pub const SO_SNDTIMEO: ::c_int = 0x1005; +pub const SO_RCVTIMEO: ::c_int = 0x1006; +pub const SO_ERROR: ::c_int = 0x1007; +pub const SO_TYPE: ::c_int = 0x1008; + +pub const IFF_LOOPBACK: ::c_int = 0x8; + +pub const SHUT_RD: ::c_int = 0; +pub const SHUT_WR: ::c_int = 1; +pub const SHUT_RDWR: ::c_int = 2; + +pub const LOCK_SH: ::c_int = 1; +pub const LOCK_EX: ::c_int = 2; +pub const LOCK_NB: ::c_int = 4; +pub const LOCK_UN: ::c_int = 8; + +pub const O_SYNC: ::c_int = 128; +pub const O_NONBLOCK: ::c_int = 4; +pub const CTL_KERN: ::c_int = 1; +pub const KERN_PROC: ::c_int = 14; + +pub const MAP_COPY: ::c_int = 0x0002; +pub const MAP_RENAME: ::c_int = 0x0020; +pub const MAP_NORESERVE: ::c_int = 0x0040; +pub const MAP_HASSEMAPHORE: ::c_int = 0x0200; +pub const MAP_STACK: ::c_int = 0x0400; +pub const MAP_NOSYNC: ::c_int = 0x0800; +pub const MAP_NOCORE: ::c_int = 0x020000; + +pub const IPPROTO_RAW: ::c_int = 255; + +pub const _SC_ARG_MAX: ::c_int = 1; +pub const _SC_CHILD_MAX: ::c_int = 2; +pub const _SC_CLK_TCK: ::c_int = 3; +pub const _SC_NGROUPS_MAX: ::c_int = 4; +pub const _SC_OPEN_MAX: ::c_int = 5; +pub const _SC_JOB_CONTROL: ::c_int = 6; +pub const _SC_SAVED_IDS: ::c_int = 7; +pub const _SC_VERSION: ::c_int = 8; +pub const _SC_BC_BASE_MAX: ::c_int = 9; +pub const _SC_BC_DIM_MAX: ::c_int = 10; +pub const _SC_BC_SCALE_MAX: ::c_int = 11; +pub const _SC_BC_STRING_MAX: ::c_int = 12; +pub const _SC_COLL_WEIGHTS_MAX: ::c_int = 13; +pub const _SC_EXPR_NEST_MAX: ::c_int = 14; +pub const _SC_LINE_MAX: ::c_int = 15; +pub const _SC_RE_DUP_MAX: ::c_int = 16; +pub const _SC_2_VERSION: ::c_int = 17; +pub const _SC_2_C_BIND: ::c_int = 18; +pub const _SC_2_C_DEV: ::c_int = 19; +pub const _SC_2_CHAR_TERM: ::c_int = 20; +pub const _SC_2_FORT_DEV: ::c_int = 21; +pub const _SC_2_FORT_RUN: ::c_int = 22; +pub const _SC_2_LOCALEDEF: ::c_int = 23; +pub const _SC_2_SW_DEV: ::c_int = 24; +pub const _SC_2_UPE: ::c_int = 25; +pub const _SC_STREAM_MAX: ::c_int = 26; +pub const _SC_TZNAME_MAX: ::c_int = 27; +pub const _SC_ASYNCHRONOUS_IO: ::c_int = 28; +pub const _SC_MAPPED_FILES: ::c_int = 29; +pub const _SC_MEMLOCK: ::c_int = 30; +pub const _SC_MEMLOCK_RANGE: ::c_int = 31; +pub const _SC_MEMORY_PROTECTION: ::c_int = 32; +pub const _SC_MESSAGE_PASSING: ::c_int = 33; +pub const _SC_PRIORITIZED_IO: ::c_int = 34; +pub const _SC_PRIORITY_SCHEDULING: ::c_int = 35; +pub const _SC_REALTIME_SIGNALS: ::c_int = 36; +pub const _SC_SEMAPHORES: ::c_int = 37; +pub const _SC_FSYNC: ::c_int = 38; +pub const _SC_SHARED_MEMORY_OBJECTS: ::c_int = 39; +pub const _SC_SYNCHRONIZED_IO: ::c_int = 40; +pub const _SC_TIMERS: ::c_int = 41; +pub const _SC_AIO_LISTIO_MAX: ::c_int = 42; +pub const _SC_AIO_MAX: ::c_int = 43; +pub const _SC_AIO_PRIO_DELTA_MAX: ::c_int = 44; +pub const _SC_DELAYTIMER_MAX: ::c_int = 45; +pub const _SC_MQ_OPEN_MAX: ::c_int = 46; +pub const _SC_PAGESIZE: ::c_int = 47; +pub const _SC_PAGE_SIZE: ::c_int = _SC_PAGESIZE; +pub const _SC_RTSIG_MAX: ::c_int = 48; +pub const _SC_SEM_NSEMS_MAX: ::c_int = 49; +pub const _SC_SEM_VALUE_MAX: ::c_int = 50; +pub const _SC_SIGQUEUE_MAX: ::c_int = 51; +pub const _SC_TIMER_MAX: ::c_int = 52; + +pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = 0 as *mut _; +pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = 0 as *mut _; +pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = 0 as *mut _; +pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 2; + +pub const SCHED_FIFO: ::c_int = 1; +pub const SCHED_OTHER: ::c_int = 2; +pub const SCHED_RR: ::c_int = 3; + +pub const FD_SETSIZE: usize = 1024; + +pub const ST_NOSUID: ::c_ulong = 2; + +pub const NI_MAXHOST: ::size_t = 1025; + +pub const RTLD_LOCAL: ::c_int = 0; +pub const RTLD_NODELETE: ::c_int = 0x1000; +pub const RTLD_NOLOAD: ::c_int = 0x2000; +pub const RTLD_GLOBAL: ::c_int = 0x100; + +extern { + pub fn getnameinfo(sa: *const ::sockaddr, + salen: ::socklen_t, + host: *mut ::c_char, + hostlen: ::size_t, + serv: *mut ::c_char, + servlen: ::size_t, + flags: ::c_int) -> ::c_int; + pub fn mincore(addr: *const ::c_void, len: ::size_t, + vec: *mut ::c_char) -> ::c_int; + pub fn sysctlnametomib(name: *const ::c_char, + mibp: *mut ::c_int, + sizep: *mut ::size_t) + -> ::c_int; + pub fn shm_open(name: *const ::c_char, oflag: ::c_int, mode: ::mode_t) + -> ::c_int; + pub fn sysctl(name: *const ::c_int, + namelen: ::c_uint, + oldp: *mut ::c_void, + oldlenp: *mut ::size_t, + newp: *const ::c_void, + newlen: ::size_t) + -> ::c_int; + pub fn sysctlbyname(name: *const ::c_char, + oldp: *mut ::c_void, + oldlenp: *mut ::size_t, + newp: *const ::c_void, + newlen: ::size_t) + -> ::c_int; + pub fn pthread_set_name_np(tid: ::pthread_t, name: *const ::c_char); + pub fn sched_setscheduler(pid: ::pid_t, + policy: ::c_int, + param: *const sched_param) -> ::c_int; + pub fn sched_getscheduler(pid: ::pid_t) -> ::c_int; + pub fn memrchr(cx: *const ::c_void, + c: ::c_int, + n: ::size_t) -> *mut ::c_void; + pub fn sendfile(fd: ::c_int, + s: ::c_int, + offset: ::off_t, + nbytes: ::size_t, + hdtr: *mut ::sf_hdtr, + sbytes: *mut ::off_t, + flags: ::c_int) -> ::c_int; + pub fn sigtimedwait(set: *const sigset_t, + info: *mut siginfo_t, + timeout: *const ::timespec) -> ::c_int; + pub fn sigwaitinfo(set: *const sigset_t, + info: *mut siginfo_t) -> ::c_int; +} + +cfg_if! { + if #[cfg(target_os = "freebsd")] { + mod freebsd; + pub use self::freebsd::*; + } else if #[cfg(target_os = "dragonfly")] { + mod dragonfly; + pub use self::dragonfly::*; + } else { + // ... + } +} diff --git a/deps/libc-0.2.8/src/unix/bsd/mod.rs b/deps/libc-0.2.8/src/unix/bsd/mod.rs new file mode 100644 index 000000000..139edf717 --- /dev/null +++ b/deps/libc-0.2.8/src/unix/bsd/mod.rs @@ -0,0 +1,355 @@ +use dox::mem; + +pub type c_char = i8; +pub type wchar_t = i32; +pub type off_t = i64; +pub type useconds_t = u32; +pub type blkcnt_t = i64; +pub type socklen_t = u32; +pub type sa_family_t = u8; +pub type pthread_t = ::uintptr_t; +pub type nfds_t = ::c_uint; + +s! { + pub struct sockaddr { + pub sa_len: u8, + pub sa_family: sa_family_t, + pub sa_data: [::c_char; 14], + } + + pub struct sockaddr_in6 { + pub sin6_len: u8, + pub sin6_family: sa_family_t, + pub sin6_port: ::in_port_t, + pub sin6_flowinfo: u32, + pub sin6_addr: ::in6_addr, + pub sin6_scope_id: u32, + } + + pub struct sockaddr_un { + pub sun_len: u8, + pub sun_family: sa_family_t, + pub sun_path: [c_char; 104] + } + + pub struct passwd { + pub pw_name: *mut ::c_char, + pub pw_passwd: *mut ::c_char, + pub pw_uid: ::uid_t, + pub pw_gid: ::gid_t, + pub pw_change: ::time_t, + pub pw_class: *mut ::c_char, + pub pw_gecos: *mut ::c_char, + pub pw_dir: *mut ::c_char, + pub pw_shell: *mut ::c_char, + pub pw_expire: ::time_t, + + #[cfg(not(any(target_os = "macos", + target_os = "ios", + target_os = "netbsd", + target_os = "openbsd")))] + pub pw_fields: ::c_int, + } + + pub struct ifaddrs { + pub ifa_next: *mut ifaddrs, + pub ifa_name: *mut ::c_char, + pub ifa_flags: ::c_uint, + pub ifa_addr: *mut ::sockaddr, + pub ifa_netmask: *mut ::sockaddr, + pub ifa_dstaddr: *mut ::sockaddr, + pub ifa_data: *mut ::c_void + } + + pub struct fd_set { + #[cfg(all(target_pointer_width = "64", + any(target_os = "freebsd", target_os = "dragonfly")))] + fds_bits: [i64; FD_SETSIZE / 64], + #[cfg(not(all(target_pointer_width = "64", + any(target_os = "freebsd", target_os = "dragonfly"))))] + fds_bits: [i32; FD_SETSIZE / 32], + } + + pub struct tm { + pub tm_sec: ::c_int, + pub tm_min: ::c_int, + pub tm_hour: ::c_int, + pub tm_mday: ::c_int, + pub tm_mon: ::c_int, + pub tm_year: ::c_int, + pub tm_wday: ::c_int, + pub tm_yday: ::c_int, + pub tm_isdst: ::c_int, + pub tm_gmtoff: ::c_long, + pub tm_zone: *mut ::c_char, + } + + pub struct utsname { + #[cfg(not(target_os = "dragonfly"))] + pub sysname: [::c_char; 256], + #[cfg(target_os = "dragonfly")] + pub sysname: [::c_char; 32], + #[cfg(not(target_os = "dragonfly"))] + pub nodename: [::c_char; 256], + #[cfg(target_os = "dragonfly")] + pub nodename: [::c_char; 32], + #[cfg(not(target_os = "dragonfly"))] + pub release: [::c_char; 256], + #[cfg(target_os = "dragonfly")] + pub release: [::c_char; 32], + #[cfg(not(target_os = "dragonfly"))] + pub version: [::c_char; 256], + #[cfg(target_os = "dragonfly")] + pub version: [::c_char; 32], + #[cfg(not(target_os = "dragonfly"))] + pub machine: [::c_char; 256], + #[cfg(target_os = "dragonfly")] + pub machine: [::c_char; 32], + } + + pub struct msghdr { + pub msg_name: *mut ::c_void, + pub msg_namelen: ::socklen_t, + pub msg_iov: *mut ::iovec, + pub msg_iovlen: ::c_int, + pub msg_control: *mut ::c_void, + pub msg_controllen: ::socklen_t, + pub msg_flags: ::c_int, + } + + pub struct fsid_t { + __fsid_val: [::int32_t; 2], + } +} + +pub const FIOCLEX: ::c_ulong = 0x20006601; +pub const FIONBIO: ::c_ulong = 0x8004667e; + +pub const PATH_MAX: ::c_int = 1024; + +pub const SA_ONSTACK: ::c_int = 0x0001; +pub const SA_SIGINFO: ::c_int = 0x0040; +pub const SA_RESTART: ::c_int = 0x0002; +pub const SA_RESETHAND: ::c_int = 0x0004; +pub const SA_NOCLDSTOP: ::c_int = 0x0008; +pub const SA_NODEFER: ::c_int = 0x0010; +pub const SA_NOCLDWAIT: ::c_int = 0x0020; + +pub const SS_ONSTACK: ::c_int = 1; +pub const SS_DISABLE: ::c_int = 4; + +pub const SIGCHLD: ::c_int = 20; +pub const SIGBUS: ::c_int = 10; +pub const SIGUSR1: ::c_int = 30; +pub const SIGUSR2: ::c_int = 31; +pub const SIGCONT: ::c_int = 19; +pub const SIGSTOP: ::c_int = 17; +pub const SIGTSTP: ::c_int = 18; +pub const SIGURG: ::c_int = 16; +pub const SIGIO: ::c_int = 23; +pub const SIGSYS: ::c_int = 12; +pub const SIGTTIN: ::c_int = 21; +pub const SIGTTOU: ::c_int = 22; +pub const SIGXCPU: ::c_int = 24; +pub const SIGXFSZ: ::c_int = 25; +pub const SIGVTALRM: ::c_int = 26; +pub const SIGPROF: ::c_int = 27; +pub const SIGWINCH: ::c_int = 28; + +pub const SIG_SETMASK: ::c_int = 3; +pub const SIG_BLOCK: ::c_int = 0x1; +pub const SIG_UNBLOCK: ::c_int = 0x2; + +pub const IPV6_MULTICAST_LOOP: ::c_int = 11; +pub const IPV6_V6ONLY: ::c_int = 27; + +pub const ST_RDONLY: ::c_ulong = 1; + +pub const CTL_HW: ::c_int = 6; +pub const HW_NCPU: ::c_int = 3; + +pub const EV_ADD: ::uint16_t = 0x1; +pub const EV_CLEAR: ::uint16_t = 0x20; +pub const EV_DELETE: ::uint16_t = 0x2; +pub const EV_DISABLE: ::uint16_t = 0x8; +pub const EV_ENABLE: ::uint16_t = 0x4; +pub const EV_EOF: ::uint16_t = 0x8000; +pub const EV_ERROR: ::uint16_t = 0x4000; +pub const EV_FLAG1: ::uint16_t = 0x2000; +pub const EV_ONESHOT: ::uint16_t = 0x10; +pub const EV_SYSFLAGS: ::uint16_t = 0xf000; + +pub const NOTE_ATTRIB: ::uint32_t = 0x8; +pub const NOTE_CHILD: ::uint32_t = 0x4; +pub const NOTE_DELETE: ::uint32_t = 0x1; +pub const NOTE_EXEC: ::uint32_t = 0x20000000; +pub const NOTE_EXIT: ::uint32_t = 0x80000000; +pub const NOTE_EXTEND: ::uint32_t = 0x4; +pub const NOTE_FORK: ::uint32_t = 0x40000000; +pub const NOTE_LINK: ::uint32_t = 0x10; +pub const NOTE_LOWAT: ::uint32_t = 0x1; +pub const NOTE_PDATAMASK: ::uint32_t = 0x000fffff; +pub const NOTE_RENAME: ::uint32_t = 0x20; +pub const NOTE_REVOKE: ::uint32_t = 0x40; +pub const NOTE_TRACK: ::uint32_t = 0x1; +pub const NOTE_TRACKERR: ::uint32_t = 0x2; +pub const NOTE_WRITE: ::uint32_t = 0x2; + +pub const NCCS: usize = 20; + +pub const O_ASYNC: ::c_int = 0x40; +pub const O_FSYNC: ::c_int = 0x80; +pub const O_NDELAY: ::c_int = 0x4; +pub const O_NOFOLLOW: ::c_int = 0x100; + +pub const F_GETOWN: ::c_int = 5; +pub const F_SETOWN: ::c_int = 6; + +pub const MNT_FORCE: ::c_int = 0x80000; + +pub const Q_SYNC: ::c_int = 0x600; +pub const Q_QUOTAON: ::c_int = 0x100; +pub const Q_QUOTAOFF: ::c_int = 0x200; + +pub const TCIOFF: ::c_int = 3; +pub const TCION: ::c_int = 4; +pub const TCOOFF: ::c_int = 1; +pub const TCOON: ::c_int = 2; +pub const TCIFLUSH: ::c_int = 1; +pub const TCOFLUSH: ::c_int = 2; +pub const TCIOFLUSH: ::c_int = 3; +pub const TCSANOW: ::c_int = 0; +pub const TCSADRAIN: ::c_int = 1; +pub const TCSAFLUSH: ::c_int = 2; +pub const VEOF: usize = 0; +pub const VEOL: usize = 1; +pub const VEOL2: usize = 2; +pub const VERASE: usize = 3; +pub const VWERASE: usize = 4; +pub const VKILL: usize = 5; +pub const VREPRINT: usize = 6; +pub const VINTR: usize = 8; +pub const VQUIT: usize = 9; +pub const VSUSP: usize = 10; +pub const VSTART: usize = 12; +pub const VSTOP: usize = 13; +pub const VLNEXT: usize = 14; +pub const VDISCARD: usize = 15; +pub const VMIN: usize = 16; +pub const VTIME: usize = 17; +pub const IGNBRK: ::tcflag_t = 0x00000001; +pub const BRKINT: ::tcflag_t = 0x00000002; +pub const IGNPAR: ::tcflag_t = 0x00000004; +pub const PARMRK: ::tcflag_t = 0x00000008; +pub const INPCK: ::tcflag_t = 0x00000010; +pub const ISTRIP: ::tcflag_t = 0x00000020; +pub const INLCR: ::tcflag_t = 0x00000040; +pub const IGNCR: ::tcflag_t = 0x00000080; +pub const ICRNL: ::tcflag_t = 0x00000100; +pub const IXON: ::tcflag_t = 0x00000200; +pub const IXOFF: ::tcflag_t = 0x00000400; +pub const IXANY: ::tcflag_t = 0x00000800; +pub const IMAXBEL: ::tcflag_t = 0x00002000; +pub const OPOST: ::tcflag_t = 0x1; +pub const ONLCR: ::tcflag_t = 0x2; +pub const CSIZE: ::tcflag_t = 0x00000300; +pub const CS5: ::tcflag_t = 0x00000000; +pub const CS6: ::tcflag_t = 0x00000100; +pub const CS7: ::tcflag_t = 0x00000200; +pub const CS8: ::tcflag_t = 0x00000300; +pub const CSTOPB: ::tcflag_t = 0x00000400; +pub const CREAD: ::tcflag_t = 0x00000800; +pub const PARENB: ::tcflag_t = 0x00001000; +pub const PARODD: ::tcflag_t = 0x00002000; +pub const HUPCL: ::tcflag_t = 0x00004000; +pub const CLOCAL: ::tcflag_t = 0x00008000; +pub const ECHOKE: ::tcflag_t = 0x00000001; +pub const ECHOE: ::tcflag_t = 0x00000002; +pub const ECHOK: ::tcflag_t = 0x00000004; +pub const ECHO: ::tcflag_t = 0x00000008; +pub const ECHONL: ::tcflag_t = 0x00000010; +pub const ECHOPRT: ::tcflag_t = 0x00000020; +pub const ECHOCTL: ::tcflag_t = 0x00000040; +pub const ISIG: ::tcflag_t = 0x00000080; +pub const ICANON: ::tcflag_t = 0x00000100; +pub const IEXTEN: ::tcflag_t = 0x00000400; +pub const EXTPROC: ::tcflag_t = 0x00000800; +pub const TOSTOP: ::tcflag_t = 0x00400000; +pub const FLUSHO: ::tcflag_t = 0x00800000; +pub const PENDIN: ::tcflag_t = 0x20000000; +pub const NOFLSH: ::tcflag_t = 0x80000000; + +pub const WNOHANG: ::c_int = 1; + +pub const RTLD_NOW: ::c_int = 0x2; + +f! { + pub fn FD_CLR(fd: ::c_int, set: *mut fd_set) -> () { + let bits = mem::size_of_val(&(*set).fds_bits[0]) * 8; + let fd = fd as usize; + (*set).fds_bits[fd / bits] &= !(1 << (fd % bits)); + return + } + + pub fn FD_ISSET(fd: ::c_int, set: *mut fd_set) -> bool { + let bits = mem::size_of_val(&(*set).fds_bits[0]) * 8; + let fd = fd as usize; + return ((*set).fds_bits[fd / bits] & (1 << (fd % bits))) != 0 + } + + pub fn FD_SET(fd: ::c_int, set: *mut fd_set) -> () { + let bits = mem::size_of_val(&(*set).fds_bits[0]) * 8; + let fd = fd as usize; + (*set).fds_bits[fd / bits] |= 1 << (fd % bits); + return + } + + pub fn FD_ZERO(set: *mut fd_set) -> () { + for slot in (*set).fds_bits.iter_mut() { + *slot = 0; + } + } + + pub fn WIFEXITED(status: ::c_int) -> bool { + (status & 0x7f) == 0 + } + + pub fn WEXITSTATUS(status: ::c_int) -> ::c_int { + status >> 8 + } + + pub fn WTERMSIG(status: ::c_int) -> ::c_int { + status & 0o177 + } +} + +extern { + pub fn setgroups(ngroups: ::c_int, + ptr: *const ::gid_t) -> ::c_int; + pub fn ioctl(fd: ::c_int, request: ::c_ulong, ...) -> ::c_int; + pub fn kqueue() -> ::c_int; + pub fn unmount(target: *const ::c_char, arg: ::c_int) -> ::c_int; + pub fn syscall(num: ::c_int, ...) -> ::c_int; + #[cfg_attr(target_os = "netbsd", link_name = "__getpwuid_r50")] + pub fn getpwuid_r(uid: ::uid_t, + pwd: *mut passwd, + buf: *mut ::c_char, + buflen: ::size_t, + result: *mut *mut passwd) -> ::c_int; +} + +cfg_if! { + if #[cfg(any(target_os = "macos", target_os = "ios"))] { + mod apple; + pub use self::apple::*; + } else if #[cfg(any(target_os = "openbsd", target_os = "netbsd", + target_os = "bitrig"))] { + mod openbsdlike; + pub use self::openbsdlike::*; + } else if #[cfg(any(target_os = "freebsd", target_os = "dragonfly"))] { + mod freebsdlike; + pub use self::freebsdlike::*; + } else { + // ... + } +} diff --git a/deps/libc-0.2.8/src/unix/bsd/openbsdlike/bitrig.rs b/deps/libc-0.2.8/src/unix/bsd/openbsdlike/bitrig.rs new file mode 100644 index 000000000..b6c51dec3 --- /dev/null +++ b/deps/libc-0.2.8/src/unix/bsd/openbsdlike/bitrig.rs @@ -0,0 +1,247 @@ +pub type clock_t = i64; +pub type suseconds_t = i64; +pub type dev_t = i32; +pub type sigset_t = ::c_uint; +pub type blksize_t = ::uint32_t; +pub type fsblkcnt_t = ::c_uint; +pub type fsfilcnt_t = ::c_uint; +pub type pthread_attr_t = *mut ::c_void; +pub type pthread_mutex_t = *mut ::c_void; +pub type pthread_mutexattr_t = *mut ::c_void; +pub type pthread_cond_t = *mut ::c_void; +pub type pthread_rwlock_t = *mut ::c_void; + +s! { + pub struct dirent { + pub d_fileno: ::ino_t, + pub d_off: ::off_t, + pub d_reclen: u16, + pub d_type: u8, + pub d_namlen: u8, + __d_padding: [u8; 4], + pub d_name: [::c_char; 256], + } + + pub struct glob_t { + pub gl_pathc: ::c_int, + pub gl_matchc: ::c_int, + pub gl_offs: ::c_int, + pub gl_flags: ::c_int, + pub gl_pathv: *mut *mut ::c_char, + __unused1: *mut ::c_void, + __unused2: *mut ::c_void, + __unused3: *mut ::c_void, + __unused4: *mut ::c_void, + __unused5: *mut ::c_void, + __unused6: *mut ::c_void, + __unused7: *mut ::c_void, + } + + pub struct stat { + pub st_mode: ::mode_t, + pub st_dev: ::dev_t, + pub st_ino: ::ino_t, + pub st_nlink: ::nlink_t, + pub st_uid: ::uid_t, + pub st_gid: ::gid_t, + pub st_rdev: ::dev_t, + pub st_atime: ::time_t, + pub st_atime_nsec: ::c_long, + pub st_mtime: ::time_t, + pub st_mtime_nsec: ::c_long, + pub st_ctime: ::time_t, + pub st_ctime_nsec: ::c_long, + pub st_size: ::off_t, + pub st_blocks: ::blkcnt_t, + pub st_blksize: ::blksize_t, + pub st_flags: ::uint32_t, + pub st_gen: ::uint32_t, + pub st_birthtime: ::time_t, + pub st_birthtime_nsec: ::c_long, + } + + pub struct statvfs { + pub f_bsize: ::c_ulong, + pub f_frsize: ::c_ulong, + pub f_blocks: ::fsblkcnt_t, + pub f_bfree: ::fsblkcnt_t, + pub f_bavail: ::fsblkcnt_t, + pub f_files: ::fsfilcnt_t, + pub f_ffree: ::fsfilcnt_t, + pub f_favail: ::fsfilcnt_t, + pub f_fsid: ::c_ulong, + pub f_flag: ::c_ulong, + pub f_namemax: ::c_ulong, + } + + pub struct addrinfo { + pub ai_flags: ::c_int, + pub ai_family: ::c_int, + pub ai_socktype: ::c_int, + pub ai_protocol: ::c_int, + pub ai_addrlen: ::socklen_t, + pub ai_addr: *mut ::sockaddr, + pub ai_canonname: *mut ::c_char, + pub ai_next: *mut ::addrinfo, + } + + pub struct sockaddr_storage { + pub ss_len: u8, + pub ss_family: ::sa_family_t, + __ss_pad1: [u8; 6], + __ss_pad2: i64, + __ss_pad3: [u8; 240], + } + + pub struct siginfo_t { + pub si_signo: ::c_int, + pub si_code: ::c_int, + pub si_errno: ::c_int, + pub si_addr: *mut ::c_void + } + + pub struct Dl_info { + pub dli_fname: *const ::c_char, + pub dli_fbase: *mut ::c_void, + pub dli_sname: *const ::c_char, + pub dli_saddr: *mut ::c_void, + } +} + +pub const O_CLOEXEC: ::c_int = 0x10000; + +pub const MS_SYNC : ::c_int = 0x0002; +pub const MS_INVALIDATE : ::c_int = 0x0004; + +pub const PTHREAD_STACK_MIN : ::size_t = 2048; + +pub const ENOATTR : ::c_int = 83; +pub const EILSEQ : ::c_int = 84; +pub const EOVERFLOW : ::c_int = 87; +pub const ECANCELED : ::c_int = 88; +pub const EIDRM : ::c_int = 89; +pub const ENOMSG : ::c_int = 90; +pub const ENOTSUP : ::c_int = 91; +pub const ELAST : ::c_int = 91; + +pub const F_DUPFD_CLOEXEC : ::c_int = 10; + +pub const RLIM_NLIMITS: ::c_int = 9; + +pub const SO_SNDTIMEO: ::c_int = 0x1005; +pub const SO_RCVTIMEO: ::c_int = 0x1006; + +pub const KERN_PROC : ::c_int = 66; +pub const O_DSYNC : ::c_int = 128; + +pub const MAP_RENAME : ::c_int = 0x0000; +pub const MAP_NORESERVE : ::c_int = 0x0000; +pub const MAP_HASSEMAPHORE : ::c_int = 0x0000; + +pub const EIPSEC : ::c_int = 82; +pub const ENOMEDIUM : ::c_int = 85; +pub const EMEDIUMTYPE : ::c_int = 86; + +pub const RUSAGE_THREAD: ::c_int = 1; + +pub const IPV6_ADD_MEMBERSHIP: ::c_int = 12; +pub const IPV6_DROP_MEMBERSHIP: ::c_int = 13; + +pub const MAP_COPY : ::c_int = 0x0002; +pub const MAP_NOEXTEND : ::c_int = 0x0000; + +pub const _SC_IOV_MAX : ::c_int = 51; +pub const _SC_GETGR_R_SIZE_MAX : ::c_int = 100; +pub const _SC_GETPW_R_SIZE_MAX : ::c_int = 101; +pub const _SC_LOGIN_NAME_MAX : ::c_int = 102; +pub const _SC_MQ_PRIO_MAX : ::c_int = 59; +pub const _SC_NPROCESSORS_ONLN : ::c_int = 503; +pub const _SC_THREADS : ::c_int = 91; +pub const _SC_THREAD_ATTR_STACKADDR : ::c_int = 77; +pub const _SC_THREAD_ATTR_STACKSIZE : ::c_int = 78; +pub const _SC_THREAD_DESTRUCTOR_ITERATIONS : ::c_int = 80; +pub const _SC_THREAD_KEYS_MAX : ::c_int = 81; +pub const _SC_THREAD_PRIO_INHERIT : ::c_int = 82; +pub const _SC_THREAD_PRIO_PROTECT : ::c_int = 83; +pub const _SC_THREAD_PRIORITY_SCHEDULING : ::c_int = 84; +pub const _SC_THREAD_PROCESS_SHARED : ::c_int = 85; +pub const _SC_THREAD_SAFE_FUNCTIONS : ::c_int = 103; +pub const _SC_THREAD_STACK_MIN : ::c_int = 89; +pub const _SC_THREAD_THREADS_MAX : ::c_int = 90; +pub const _SC_TTY_NAME_MAX : ::c_int = 107; +pub const _SC_ATEXIT_MAX : ::c_int = 46; +pub const _SC_CLK_TCK : ::c_int = 3; +pub const _SC_AIO_LISTIO_MAX : ::c_int = 42; +pub const _SC_AIO_MAX : ::c_int = 43; +pub const _SC_ASYNCHRONOUS_IO : ::c_int = 45; +pub const _SC_MAPPED_FILES : ::c_int = 53; +pub const _SC_MEMLOCK : ::c_int = 54; +pub const _SC_MEMLOCK_RANGE : ::c_int = 55; +pub const _SC_MEMORY_PROTECTION : ::c_int = 56; +pub const _SC_MESSAGE_PASSING : ::c_int = 57; +pub const _SC_MQ_OPEN_MAX : ::c_int = 58; +pub const _SC_PRIORITY_SCHEDULING : ::c_int = 61; +pub const _SC_SEMAPHORES : ::c_int = 67; +pub const _SC_SHARED_MEMORY_OBJECTS : ::c_int = 68; +pub const _SC_SYNCHRONIZED_IO : ::c_int = 75; +pub const _SC_TIMERS : ::c_int = 94; +pub const _SC_XOPEN_CRYPT : ::c_int = 117; +pub const _SC_XOPEN_ENH_I18N : ::c_int = 118; +pub const _SC_XOPEN_LEGACY : ::c_int = 119; +pub const _SC_XOPEN_REALTIME : ::c_int = 120; +pub const _SC_XOPEN_REALTIME_THREADS : ::c_int = 121; +pub const _SC_XOPEN_UNIX : ::c_int = 123; +pub const _SC_XOPEN_VERSION : ::c_int = 125; +pub const _SC_SEM_NSEMS_MAX : ::c_int = 31; +pub const _SC_SEM_VALUE_MAX : ::c_int = 32; +pub const _SC_AIO_PRIO_DELTA_MAX : ::c_int = 44; +pub const _SC_DELAYTIMER_MAX : ::c_int = 50; +pub const _SC_PRIORITIZED_IO : ::c_int = 60; +pub const _SC_REALTIME_SIGNALS : ::c_int = 64; +pub const _SC_RTSIG_MAX : ::c_int = 66; +pub const _SC_SIGQUEUE_MAX : ::c_int = 70; +pub const _SC_TIMER_MAX : ::c_int = 93; + +pub const FD_SETSIZE: usize = 1024; + +pub const ST_NOSUID: ::c_ulong = 2; + +pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = 0 as *mut _; +pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = 0 as *mut _; +pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = 0 as *mut _; +pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 2; + +pub const KERN_PROC_ARGS: ::c_int = 55; + +pub const TMP_MAX : ::c_uint = 0x7fffffff; + +pub const NI_MAXHOST: ::size_t = 256; + +extern { + pub fn getnameinfo(sa: *const ::sockaddr, + salen: ::socklen_t, + host: *mut ::c_char, + hostlen: ::size_t, + serv: *mut ::c_char, + servlen: ::size_t, + flags: ::c_int) -> ::c_int; + pub fn mprotect(addr: *const ::c_void, len: ::size_t, prot: ::c_int) + -> ::c_int; + pub fn pthread_main_np() -> ::c_int; + pub fn pthread_set_name_np(tid: ::pthread_t, name: *const ::c_char); + pub fn pthread_stackseg_np(thread: ::pthread_t, + sinfo: *mut ::stack_t) -> ::c_int; + pub fn sysctl(name: *mut ::c_int, + namelen: ::c_uint, + oldp: *mut ::c_void, + oldlenp: *mut ::size_t, + newp: *mut ::c_void, + newlen: ::size_t) + -> ::c_int; + pub fn sysctlbyname(name: *const ::c_char, + oldp: *mut ::c_void, + oldlenp: *mut ::size_t, + newp: *mut ::c_void, + newlen: ::size_t) + -> ::c_int; +} diff --git a/deps/libc-0.2.8/src/unix/bsd/openbsdlike/mod.rs b/deps/libc-0.2.8/src/unix/bsd/openbsdlike/mod.rs new file mode 100644 index 000000000..1cd6eb816 --- /dev/null +++ b/deps/libc-0.2.8/src/unix/bsd/openbsdlike/mod.rs @@ -0,0 +1,409 @@ +pub type c_long = i64; +pub type c_ulong = u64; +pub type time_t = i64; +pub type mode_t = u32; +pub type nlink_t = ::uint32_t; +pub type ino_t = ::uint64_t; +pub type pthread_key_t = ::c_int; +pub type rlim_t = u64; +pub type speed_t = ::c_uint; +pub type tcflag_t = ::c_uint; + +pub enum timezone {} + +s! { + pub struct sigaction { + pub sa_sigaction: ::sighandler_t, + pub sa_mask: ::sigset_t, + pub sa_flags: ::c_int, + } + + pub struct stack_t { + pub ss_sp: *mut ::c_void, + pub ss_size: ::size_t, + pub ss_flags: ::c_int, + } + + pub struct sockaddr_in { + pub sin_len: u8, + pub sin_family: ::sa_family_t, + pub sin_port: ::in_port_t, + pub sin_addr: ::in_addr, + pub sin_zero: [::int8_t; 8], + } + + pub struct termios { + pub c_iflag: ::tcflag_t, + pub c_oflag: ::tcflag_t, + pub c_cflag: ::tcflag_t, + pub c_lflag: ::tcflag_t, + pub c_cc: [::cc_t; ::NCCS], + pub c_ispeed: ::c_int, + pub c_ospeed: ::c_int, + } + + pub struct flock { + pub l_start: ::off_t, + pub l_len: ::off_t, + pub l_pid: ::pid_t, + pub l_type: ::c_short, + pub l_whence: ::c_short, + } +} + +pub const EXIT_FAILURE : ::c_int = 1; +pub const EXIT_SUCCESS : ::c_int = 0; +pub const RAND_MAX : ::c_int = 2147483647; +pub const EOF : ::c_int = -1; +pub const SEEK_SET : ::c_int = 0; +pub const SEEK_CUR : ::c_int = 1; +pub const SEEK_END : ::c_int = 2; +pub const _IOFBF : ::c_int = 0; +pub const _IONBF : ::c_int = 2; +pub const _IOLBF : ::c_int = 1; +pub const BUFSIZ : ::c_uint = 1024; +pub const FOPEN_MAX : ::c_uint = 20; +pub const FILENAME_MAX : ::c_uint = 1024; +pub const L_tmpnam : ::c_uint = 1024; +pub const O_RDONLY : ::c_int = 0; +pub const O_WRONLY : ::c_int = 1; +pub const O_RDWR : ::c_int = 2; +pub const O_ACCMODE : ::c_int = 3; +pub const O_APPEND : ::c_int = 8; +pub const O_CREAT : ::c_int = 512; +pub const O_EXCL : ::c_int = 2048; +pub const O_NOCTTY : ::c_int = 32768; +pub const O_TRUNC : ::c_int = 1024; +pub const O_SYNC : ::c_int = 128; +pub const S_IFIFO : mode_t = 4096; +pub const S_IFCHR : mode_t = 8192; +pub const S_IFBLK : mode_t = 24576; +pub const S_IFDIR : mode_t = 16384; +pub const S_IFREG : mode_t = 32768; +pub const S_IFLNK : mode_t = 40960; +pub const S_IFSOCK : mode_t = 49152; +pub const S_IFMT : mode_t = 61440; +pub const S_IEXEC : mode_t = 64; +pub const S_IWRITE : mode_t = 128; +pub const S_IREAD : mode_t = 256; +pub const S_IRWXU : mode_t = 448; +pub const S_IXUSR : mode_t = 64; +pub const S_IWUSR : mode_t = 128; +pub const S_IRUSR : mode_t = 256; +pub const S_IRWXG : mode_t = 56; +pub const S_IXGRP : mode_t = 8; +pub const S_IWGRP : mode_t = 16; +pub const S_IRGRP : mode_t = 32; +pub const S_IRWXO : mode_t = 7; +pub const S_IXOTH : mode_t = 1; +pub const S_IWOTH : mode_t = 2; +pub const S_IROTH : mode_t = 4; +pub const F_OK : ::c_int = 0; +pub const R_OK : ::c_int = 4; +pub const W_OK : ::c_int = 2; +pub const X_OK : ::c_int = 1; +pub const STDIN_FILENO : ::c_int = 0; +pub const STDOUT_FILENO : ::c_int = 1; +pub const STDERR_FILENO : ::c_int = 2; +pub const F_LOCK : ::c_int = 1; +pub const F_TEST : ::c_int = 3; +pub const F_TLOCK : ::c_int = 2; +pub const F_ULOCK : ::c_int = 0; +pub const F_GETLK: ::c_int = 7; +pub const F_SETLK: ::c_int = 8; +pub const F_SETLKW: ::c_int = 9; +pub const SIGHUP : ::c_int = 1; +pub const SIGINT : ::c_int = 2; +pub const SIGQUIT : ::c_int = 3; +pub const SIGILL : ::c_int = 4; +pub const SIGABRT : ::c_int = 6; +pub const SIGFPE : ::c_int = 8; +pub const SIGKILL : ::c_int = 9; +pub const SIGSEGV : ::c_int = 11; +pub const SIGPIPE : ::c_int = 13; +pub const SIGALRM : ::c_int = 14; +pub const SIGTERM : ::c_int = 15; +pub const SIGSTKSZ : ::size_t = 40960; + +pub const PROT_NONE : ::c_int = 0; +pub const PROT_READ : ::c_int = 1; +pub const PROT_WRITE : ::c_int = 2; +pub const PROT_EXEC : ::c_int = 4; + +pub const MAP_FILE : ::c_int = 0x0000; +pub const MAP_SHARED : ::c_int = 0x0001; +pub const MAP_PRIVATE : ::c_int = 0x0002; +pub const MAP_FIXED : ::c_int = 0x0010; +pub const MAP_ANON : ::c_int = 0x1000; + +pub const MAP_FAILED : *mut ::c_void = !0 as *mut ::c_void; + +pub const MCL_CURRENT : ::c_int = 0x0001; +pub const MCL_FUTURE : ::c_int = 0x0002; + +pub const MS_ASYNC : ::c_int = 0x0001; + +pub const EPERM : ::c_int = 1; +pub const ENOENT : ::c_int = 2; +pub const ESRCH : ::c_int = 3; +pub const EINTR : ::c_int = 4; +pub const EIO : ::c_int = 5; +pub const ENXIO : ::c_int = 6; +pub const E2BIG : ::c_int = 7; +pub const ENOEXEC : ::c_int = 8; +pub const EBADF : ::c_int = 9; +pub const ECHILD : ::c_int = 10; +pub const EDEADLK : ::c_int = 11; +pub const ENOMEM : ::c_int = 12; +pub const EACCES : ::c_int = 13; +pub const EFAULT : ::c_int = 14; +pub const ENOTBLK : ::c_int = 15; +pub const EBUSY : ::c_int = 16; +pub const EEXIST : ::c_int = 17; +pub const EXDEV : ::c_int = 18; +pub const ENODEV : ::c_int = 19; +pub const ENOTDIR : ::c_int = 20; +pub const EISDIR : ::c_int = 21; +pub const EINVAL : ::c_int = 22; +pub const ENFILE : ::c_int = 23; +pub const EMFILE : ::c_int = 24; +pub const ENOTTY : ::c_int = 25; +pub const ETXTBSY : ::c_int = 26; +pub const EFBIG : ::c_int = 27; +pub const ENOSPC : ::c_int = 28; +pub const ESPIPE : ::c_int = 29; +pub const EROFS : ::c_int = 30; +pub const EMLINK : ::c_int = 31; +pub const EPIPE : ::c_int = 32; +pub const EDOM : ::c_int = 33; +pub const ERANGE : ::c_int = 34; +pub const EAGAIN : ::c_int = 35; +pub const EWOULDBLOCK : ::c_int = 35; +pub const EINPROGRESS : ::c_int = 36; +pub const EALREADY : ::c_int = 37; +pub const ENOTSOCK : ::c_int = 38; +pub const EDESTADDRREQ : ::c_int = 39; +pub const EMSGSIZE : ::c_int = 40; +pub const EPROTOTYPE : ::c_int = 41; +pub const ENOPROTOOPT : ::c_int = 42; +pub const EPROTONOSUPPORT : ::c_int = 43; +pub const ESOCKTNOSUPPORT : ::c_int = 44; +pub const EOPNOTSUPP : ::c_int = 45; +pub const EPFNOSUPPORT : ::c_int = 46; +pub const EAFNOSUPPORT : ::c_int = 47; +pub const EADDRINUSE : ::c_int = 48; +pub const EADDRNOTAVAIL : ::c_int = 49; +pub const ENETDOWN : ::c_int = 50; +pub const ENETUNREACH : ::c_int = 51; +pub const ENETRESET : ::c_int = 52; +pub const ECONNABORTED : ::c_int = 53; +pub const ECONNRESET : ::c_int = 54; +pub const ENOBUFS : ::c_int = 55; +pub const EISCONN : ::c_int = 56; +pub const ENOTCONN : ::c_int = 57; +pub const ESHUTDOWN : ::c_int = 58; +pub const ETOOMANYREFS : ::c_int = 59; +pub const ETIMEDOUT : ::c_int = 60; +pub const ECONNREFUSED : ::c_int = 61; +pub const ELOOP : ::c_int = 62; +pub const ENAMETOOLONG : ::c_int = 63; +pub const EHOSTDOWN : ::c_int = 64; +pub const EHOSTUNREACH : ::c_int = 65; +pub const ENOTEMPTY : ::c_int = 66; +pub const EPROCLIM : ::c_int = 67; +pub const EUSERS : ::c_int = 68; +pub const EDQUOT : ::c_int = 69; +pub const ESTALE : ::c_int = 70; +pub const EREMOTE : ::c_int = 71; +pub const EBADRPC : ::c_int = 72; +pub const ERPCMISMATCH : ::c_int = 73; +pub const EPROGUNAVAIL : ::c_int = 74; +pub const EPROGMISMATCH : ::c_int = 75; +pub const EPROCUNAVAIL : ::c_int = 76; +pub const ENOLCK : ::c_int = 77; +pub const ENOSYS : ::c_int = 78; +pub const EFTYPE : ::c_int = 79; +pub const EAUTH : ::c_int = 80; +pub const ENEEDAUTH : ::c_int = 81; + +pub const F_DUPFD : ::c_int = 0; +pub const F_GETFD : ::c_int = 1; +pub const F_SETFD : ::c_int = 2; +pub const F_GETFL : ::c_int = 3; +pub const F_SETFL : ::c_int = 4; + +pub const SIGTRAP : ::c_int = 5; + +pub const GLOB_APPEND : ::c_int = 0x0001; +pub const GLOB_DOOFFS : ::c_int = 0x0002; +pub const GLOB_ERR : ::c_int = 0x0004; +pub const GLOB_MARK : ::c_int = 0x0008; +pub const GLOB_NOCHECK : ::c_int = 0x0010; +pub const GLOB_NOSORT : ::c_int = 0x0020; +pub const GLOB_NOESCAPE : ::c_int = 0x1000; + +pub const GLOB_NOSPACE : ::c_int = -1; +pub const GLOB_ABORTED : ::c_int = -2; +pub const GLOB_NOMATCH : ::c_int = -3; +pub const GLOB_NOSYS : ::c_int = -4; + +pub const POSIX_MADV_NORMAL : ::c_int = 0; +pub const POSIX_MADV_RANDOM : ::c_int = 1; +pub const POSIX_MADV_SEQUENTIAL : ::c_int = 2; +pub const POSIX_MADV_WILLNEED : ::c_int = 3; +pub const POSIX_MADV_DONTNEED : ::c_int = 4; + +pub const _SC_XOPEN_SHM : ::c_int = 30; + +pub const PTHREAD_CREATE_JOINABLE : ::c_int = 0; +pub const PTHREAD_CREATE_DETACHED : ::c_int = 1; + +pub const CLOCK_REALTIME : ::c_int = 0; +pub const CLOCK_MONOTONIC : ::c_int = 3; + +pub const RLIMIT_CPU: ::c_int = 0; +pub const RLIMIT_FSIZE: ::c_int = 1; +pub const RLIMIT_DATA: ::c_int = 2; +pub const RLIMIT_STACK: ::c_int = 3; +pub const RLIMIT_CORE: ::c_int = 4; +pub const RLIMIT_RSS: ::c_int = 5; +pub const RLIMIT_MEMLOCK: ::c_int = 6; +pub const RLIMIT_NPROC: ::c_int = 7; +pub const RLIMIT_NOFILE: ::c_int = 8; + +pub const RLIM_INFINITY: rlim_t = 0x7fff_ffff_ffff_ffff; +pub const RLIM_SAVED_MAX: rlim_t = RLIM_INFINITY; +pub const RLIM_SAVED_CUR: rlim_t = RLIM_INFINITY; + +pub const RUSAGE_SELF: ::c_int = 0; +pub const RUSAGE_CHILDREN: ::c_int = -1; + +pub const MADV_NORMAL : ::c_int = 0; +pub const MADV_RANDOM : ::c_int = 1; +pub const MADV_SEQUENTIAL : ::c_int = 2; +pub const MADV_WILLNEED : ::c_int = 3; +pub const MADV_DONTNEED : ::c_int = 4; +pub const MADV_FREE : ::c_int = 6; + +pub const AF_UNIX: ::c_int = 1; +pub const AF_INET: ::c_int = 2; +pub const AF_INET6: ::c_int = 24; +pub const SOCK_STREAM: ::c_int = 1; +pub const SOCK_DGRAM: ::c_int = 2; +pub const SOCK_RAW: ::c_int = 3; +pub const IPPROTO_TCP: ::c_int = 6; +pub const IPPROTO_IP: ::c_int = 0; +pub const IPPROTO_IPV6: ::c_int = 41; +pub const IP_MULTICAST_TTL: ::c_int = 10; +pub const IP_MULTICAST_LOOP: ::c_int = 11; +pub const IP_TTL: ::c_int = 4; +pub const IP_HDRINCL: ::c_int = 2; +pub const IP_ADD_MEMBERSHIP: ::c_int = 12; +pub const IP_DROP_MEMBERSHIP: ::c_int = 13; + +pub const TCP_NODELAY: ::c_int = 0x01; +pub const SOL_SOCKET: ::c_int = 0xffff; +pub const SO_DEBUG: ::c_int = 0x01; +pub const SO_ACCEPTCONN: ::c_int = 0x0002; +pub const SO_REUSEADDR: ::c_int = 0x0004; +pub const SO_KEEPALIVE: ::c_int = 0x0008; +pub const SO_DONTROUTE: ::c_int = 0x0010; +pub const SO_BROADCAST: ::c_int = 0x0020; +pub const SO_USELOOPBACK: ::c_int = 0x0040; +pub const SO_LINGER: ::c_int = 0x0080; +pub const SO_OOBINLINE: ::c_int = 0x0100; +pub const SO_REUSEPORT: ::c_int = 0x0200; +pub const SO_SNDBUF: ::c_int = 0x1001; +pub const SO_RCVBUF: ::c_int = 0x1002; +pub const SO_SNDLOWAT: ::c_int = 0x1003; +pub const SO_RCVLOWAT: ::c_int = 0x1004; +pub const SO_ERROR: ::c_int = 0x1007; +pub const SO_TYPE: ::c_int = 0x1008; + +pub const IFF_LOOPBACK: ::c_int = 0x8; + +pub const SHUT_RD: ::c_int = 0; +pub const SHUT_WR: ::c_int = 1; +pub const SHUT_RDWR: ::c_int = 2; + +pub const LOCK_SH: ::c_int = 1; +pub const LOCK_EX: ::c_int = 2; +pub const LOCK_NB: ::c_int = 4; +pub const LOCK_UN: ::c_int = 8; + +pub const O_NONBLOCK : ::c_int = 4; +pub const CTL_KERN : ::c_int = 1; + +pub const IPPROTO_RAW : ::c_int = 255; + +pub const _SC_ARG_MAX : ::c_int = 1; +pub const _SC_CHILD_MAX : ::c_int = 2; +pub const _SC_NGROUPS_MAX : ::c_int = 4; +pub const _SC_OPEN_MAX : ::c_int = 5; +pub const _SC_JOB_CONTROL : ::c_int = 6; +pub const _SC_SAVED_IDS : ::c_int = 7; +pub const _SC_VERSION : ::c_int = 8; +pub const _SC_BC_BASE_MAX : ::c_int = 9; +pub const _SC_BC_DIM_MAX : ::c_int = 10; +pub const _SC_BC_SCALE_MAX : ::c_int = 11; +pub const _SC_BC_STRING_MAX : ::c_int = 12; +pub const _SC_COLL_WEIGHTS_MAX : ::c_int = 13; +pub const _SC_EXPR_NEST_MAX : ::c_int = 14; +pub const _SC_LINE_MAX : ::c_int = 15; +pub const _SC_RE_DUP_MAX : ::c_int = 16; +pub const _SC_2_VERSION : ::c_int = 17; +pub const _SC_2_C_BIND : ::c_int = 18; +pub const _SC_2_C_DEV : ::c_int = 19; +pub const _SC_2_CHAR_TERM : ::c_int = 20; +pub const _SC_2_FORT_DEV : ::c_int = 21; +pub const _SC_2_FORT_RUN : ::c_int = 22; +pub const _SC_2_LOCALEDEF : ::c_int = 23; +pub const _SC_2_SW_DEV : ::c_int = 24; +pub const _SC_2_UPE : ::c_int = 25; +pub const _SC_STREAM_MAX : ::c_int = 26; +pub const _SC_TZNAME_MAX : ::c_int = 27; +pub const _SC_PAGESIZE : ::c_int = 28; +pub const _SC_PAGE_SIZE: ::c_int = _SC_PAGESIZE; +pub const _SC_FSYNC : ::c_int = 29; + +pub const KERN_PROC_ARGV: ::c_int = 1; +pub const KERN_PROC_NARGV: ::c_int = 2; +pub const KERN_PROC_ENV: ::c_int = 3; +pub const KERN_PROC_NENV: ::c_int = 4; + +pub const Q_GETQUOTA: ::c_int = 0x300; +pub const Q_SETQUOTA: ::c_int = 0x400; + +pub const RTLD_GLOBAL: ::c_int = 0x100; + +extern { + pub fn mincore(addr: *mut ::c_void, len: ::size_t, + vec: *mut ::c_char) -> ::c_int; + #[cfg_attr(target_os = "netbsd", link_name = "__clock_gettime50")] + pub fn clock_gettime(clk_id: ::c_int, tp: *mut ::timespec) -> ::c_int; + pub fn __errno() -> *mut ::c_int; + pub fn shm_open(name: *const ::c_char, oflag: ::c_int, mode: ::mode_t) + -> ::c_int; + pub fn memrchr(cx: *const ::c_void, + c: ::c_int, + n: ::size_t) -> *mut ::c_void; + pub fn mkostemp(template: *mut ::c_char, flags: ::c_int) -> ::c_int; + pub fn mkostemps(template: *mut ::c_char, + suffixlen: ::c_int, + flags: ::c_int) -> ::c_int; + pub fn futimens(fd: ::c_int, times: *const ::timespec) -> ::c_int; + pub fn fdatasync(fd: ::c_int) -> ::c_int; +} + +cfg_if! { + if #[cfg(target_os = "bitrig")] { + mod bitrig; + pub use self::bitrig::*; + } else if #[cfg(target_os = "netbsd")] { + mod netbsd; + pub use self::netbsd::*; + } else { + mod openbsd; + pub use self::openbsd::*; + } +} diff --git a/deps/libc-0.2.8/src/unix/bsd/openbsdlike/netbsd.rs b/deps/libc-0.2.8/src/unix/bsd/openbsdlike/netbsd.rs new file mode 100644 index 000000000..3640d2ec0 --- /dev/null +++ b/deps/libc-0.2.8/src/unix/bsd/openbsdlike/netbsd.rs @@ -0,0 +1,387 @@ +pub type clock_t = ::c_uint; +pub type suseconds_t = ::c_int; +pub type dev_t = u64; +pub type blksize_t = ::int32_t; +pub type fsblkcnt_t = ::uint64_t; +pub type fsfilcnt_t = ::uint64_t; + +s! { + pub struct dirent { + pub d_fileno: ::ino_t, + pub d_reclen: u16, + pub d_namlen: u16, + pub d_type: u8, + pub d_name: [::c_char; 512], + } + + pub struct glob_t { + pub gl_pathc: ::size_t, + __unused1: ::c_int, + pub gl_offs: ::size_t, + __unused2: ::c_int, + pub gl_pathv: *mut *mut ::c_char, + + __unused3: *mut ::c_void, + + __unused4: *mut ::c_void, + __unused5: *mut ::c_void, + __unused6: *mut ::c_void, + __unused7: *mut ::c_void, + __unused8: *mut ::c_void, + } + + pub struct sigset_t { + __bits: [u32; 4], + } + + pub struct stat { + pub st_dev: ::dev_t, + pub st_mode: ::mode_t, + pub st_ino: ::ino_t, + pub st_nlink: ::nlink_t, + pub st_uid: ::uid_t, + pub st_gid: ::gid_t, + pub st_rdev: ::dev_t, + pub st_atime: ::time_t, + pub st_atimensec: ::c_long, + pub st_mtime: ::time_t, + pub st_mtimensec: ::c_long, + pub st_ctime: ::time_t, + pub st_ctimensec: ::c_long, + pub st_birthtime: ::time_t, + pub st_birthtimensec: ::c_long, + pub st_size: ::off_t, + pub st_blocks: ::blkcnt_t, + pub st_blksize: ::blksize_t, + pub st_flags: ::uint32_t, + pub st_gen: ::uint32_t, + pub st_spare: [::uint32_t; 2], + } + + pub struct statvfs { + pub f_flag: ::c_ulong, + pub f_bsize: ::c_ulong, + pub f_frsize: ::c_ulong, + pub f_iosize: ::c_ulong, + + pub f_blocks: ::fsblkcnt_t, + pub f_bfree: ::fsblkcnt_t, + pub f_bavail: ::fsblkcnt_t, + pub f_bresvd: ::fsblkcnt_t, + + pub f_files: ::fsfilcnt_t, + pub f_ffree: ::fsfilcnt_t, + pub f_favail: ::fsfilcnt_t, + pub f_fresvd: ::fsfilcnt_t, + + pub f_syncreads: ::uint64_t, + pub f_syncwrites: ::uint64_t, + + pub f_asyncreads: ::uint64_t, + pub f_asyncwrites: ::uint64_t, + + pub f_fsidx: ::fsid_t, + pub f_fsid: ::c_ulong, + pub f_namemax: ::c_ulong, + pub f_owner: ::uid_t, + + pub f_spare: [::uint32_t; 4], + + pub f_fstypename: [::c_char; 32], + pub f_mntonname: [::c_char; 1024], + pub f_mntfromname: [::c_char; 1024], + } + + pub struct addrinfo { + pub ai_flags: ::c_int, + pub ai_family: ::c_int, + pub ai_socktype: ::c_int, + pub ai_protocol: ::c_int, + pub ai_addrlen: ::socklen_t, + pub ai_canonname: *mut ::c_char, + pub ai_addr: *mut ::sockaddr, + pub ai_next: *mut ::addrinfo, + } + + pub struct sockaddr_storage { + pub ss_len: u8, + pub ss_family: ::sa_family_t, + __ss_pad1: [u8; 6], + __ss_pad2: i64, + __ss_pad3: [u8; 112], + } + + pub struct siginfo_t { + pub si_signo: ::c_int, + pub si_code: ::c_int, + pub si_errno: ::c_int, + __pad1: ::c_int, + pub si_addr: *mut ::c_void, + __pad2: [u64; 13], + } + + pub struct pthread_attr_t { + pta_magic: ::c_uint, + pta_flags: ::c_int, + pta_private: *mut ::c_void, + } + + pub struct pthread_mutex_t { + ptm_magic: ::c_uint, + ptm_errorcheck: ::c_uchar, + ptm_pad1: [u8; 3], + ptm_interlock: ::c_uchar, + ptm_pad2: [u8; 3], + ptm_owner: ::pthread_t, + ptm_waiters: *mut u8, + ptm_recursed: ::c_uint, + ptm_spare2: *mut ::c_void, + } + + pub struct pthread_mutexattr_t { + ptma_magic: ::c_uint, + ptma_private: *mut ::c_void, + } + + pub struct pthread_cond_t { + ptc_magic: ::c_uint, + ptc_lock: ::c_uchar, + ptc_waiters_first: *mut u8, + ptc_waiters_last: *mut u8, + ptc_mutex: *mut ::pthread_mutex_t, + ptc_private: *mut ::c_void, + } + + pub struct pthread_rwlock_t { + ptr_magic: ::c_uint, + ptr_interlock: ::c_uchar, + ptr_rblocked_first: *mut u8, + ptr_rblocked_last: *mut u8, + ptr_wblocked_first: *mut u8, + ptr_wblocked_last: *mut u8, + ptr_nreaders: ::c_uint, + ptr_owner: ::pthread_t, + ptr_private: *mut ::c_void, + } + + pub struct kevent { + pub ident: ::uintptr_t, + pub filter: ::uint32_t, + pub flags: ::uint32_t, + pub fflags: ::uint32_t, + pub data: ::int64_t, + pub udata: ::intptr_t, + } + + pub struct dqblk { + pub dqb_bhardlimit: ::uint32_t, + pub dqb_bsoftlimit: ::uint32_t, + pub dqb_curblocks: ::uint32_t, + pub dqb_ihardlimit: ::uint32_t, + pub dqb_isoftlimit: ::uint32_t, + pub dqb_curinodes: ::uint32_t, + pub dqb_btime: ::int32_t, + pub dqb_itime: ::int32_t, + } + + pub struct Dl_info { + pub dli_fname: *const ::c_char, + pub dli_fbase: *mut ::c_void, + pub dli_sname: *const ::c_char, + pub dli_saddr: *const ::c_void, + } +} + +pub const O_CLOEXEC: ::c_int = 0x400000; +pub const O_ALT_IO: ::c_int = 0x40000; +pub const O_NOSIGPIPE: ::c_int = 0x1000000; +pub const O_SEARCH: ::c_int = 0x800000; +pub const O_EXLOCK: ::c_int = 0x20; +pub const O_SHLOCK: ::c_int = 0x10; +pub const O_DIRECTORY: ::c_int = 0x200000; + +pub const MS_SYNC : ::c_int = 0x4; +pub const MS_INVALIDATE : ::c_int = 0x2; + +pub const RLIM_NLIMITS: ::c_int = 12; + +pub const ENOATTR : ::c_int = 93; +pub const EILSEQ : ::c_int = 85; +pub const EOVERFLOW : ::c_int = 84; +pub const ECANCELED : ::c_int = 87; +pub const EIDRM : ::c_int = 82; +pub const ENOMSG : ::c_int = 83; +pub const ENOTSUP : ::c_int = 86; +pub const ELAST : ::c_int = 96; + +pub const F_DUPFD_CLOEXEC : ::c_int = 12; +pub const F_CLOSEM: ::c_int = 10; +pub const F_GETNOSIGPIPE: ::c_int = 13; +pub const F_SETNOSIGPIPE: ::c_int = 14; +pub const F_MAXFD: ::c_int = 11; + +pub const IPV6_JOIN_GROUP: ::c_int = 12; +pub const IPV6_LEAVE_GROUP: ::c_int = 13; + +pub const SO_SNDTIMEO: ::c_int = 0x100b; +pub const SO_RCVTIMEO: ::c_int = 0x100c; + +pub const KERN_PROC : ::c_int = 14; +pub const O_DSYNC : ::c_int = 0x10000; + +pub const MAP_RENAME : ::c_int = 0x20; +pub const MAP_NORESERVE : ::c_int = 0x40; +pub const MAP_HASSEMAPHORE : ::c_int = 0x200; +pub const MAP_WIRED: ::c_int = 0x800; + +pub const _SC_IOV_MAX : ::c_int = 32; +pub const _SC_GETGR_R_SIZE_MAX : ::c_int = 47; +pub const _SC_GETPW_R_SIZE_MAX : ::c_int = 48; +pub const _SC_LOGIN_NAME_MAX : ::c_int = 37; +pub const _SC_MQ_PRIO_MAX : ::c_int = 55; +pub const _SC_NPROCESSORS_ONLN : ::c_int = 1002; +pub const _SC_THREADS : ::c_int = 41; +pub const _SC_THREAD_ATTR_STACKADDR : ::c_int = 61; +pub const _SC_THREAD_ATTR_STACKSIZE : ::c_int = 62; +pub const _SC_THREAD_DESTRUCTOR_ITERATIONS : ::c_int = 57; +pub const _SC_THREAD_KEYS_MAX : ::c_int = 58; +pub const _SC_THREAD_PRIO_INHERIT : ::c_int = 64; +pub const _SC_THREAD_PRIO_PROTECT : ::c_int = 65; +pub const _SC_THREAD_PRIORITY_SCHEDULING : ::c_int = 63; +pub const _SC_THREAD_PROCESS_SHARED : ::c_int = 66; +pub const _SC_THREAD_SAFE_FUNCTIONS : ::c_int = 67; +pub const _SC_THREAD_STACK_MIN : ::c_int = 59; +pub const _SC_THREAD_THREADS_MAX : ::c_int = 60; +pub const _SC_TTY_NAME_MAX : ::c_int = 68; +pub const _SC_ATEXIT_MAX : ::c_int = 40; +pub const _SC_CLK_TCK : ::c_int = 39; +pub const _SC_AIO_LISTIO_MAX : ::c_int = 51; +pub const _SC_AIO_MAX : ::c_int = 52; +pub const _SC_ASYNCHRONOUS_IO : ::c_int = 50; +pub const _SC_MAPPED_FILES : ::c_int = 33; +pub const _SC_MEMLOCK : ::c_int = 34; +pub const _SC_MEMLOCK_RANGE : ::c_int = 35; +pub const _SC_MEMORY_PROTECTION : ::c_int = 36; +pub const _SC_MESSAGE_PASSING : ::c_int = 53; +pub const _SC_MQ_OPEN_MAX : ::c_int = 54; +pub const _SC_PRIORITY_SCHEDULING : ::c_int = 56; +pub const _SC_SEMAPHORES : ::c_int = 42; +pub const _SC_SHARED_MEMORY_OBJECTS : ::c_int = 87; +pub const _SC_SYNCHRONIZED_IO : ::c_int = 31; +pub const _SC_TIMERS : ::c_int = 44; + +pub const FD_SETSIZE: usize = 0x100; + +pub const ST_NOSUID: ::c_ulong = 8; + +pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t { + ptm_magic: 0x33330003, + ptm_errorcheck: 0, + ptm_interlock: 0, + ptm_waiters: 0 as *mut _, + ptm_owner: 0, + ptm_pad1: [0; 3], + ptm_pad2: [0; 3], + ptm_recursed: 0, + ptm_spare2: 0 as *mut _, +}; +pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = pthread_cond_t { + ptc_magic: 0x55550005, + ptc_lock: 0, + ptc_waiters_first: 0 as *mut _, + ptc_waiters_last: 0 as *mut _, + ptc_mutex: 0 as *mut _, + ptc_private: 0 as *mut _, +}; +pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t { + ptr_magic: 0x99990009, + ptr_interlock: 0, + ptr_rblocked_first: 0 as *mut _, + ptr_rblocked_last: 0 as *mut _, + ptr_wblocked_first: 0 as *mut _, + ptr_wblocked_last: 0 as *mut _, + ptr_nreaders: 0, + ptr_owner: 0, + ptr_private: 0 as *mut _, +}; +pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 2; +pub const KERN_PROC_ARGS: ::c_int = 48; + +pub const EVFILT_AIO: ::int16_t = 2; +pub const EVFILT_PROC: ::int16_t = 4; +pub const EVFILT_READ: ::int16_t = 0; +pub const EVFILT_SIGNAL: ::int16_t = 5; +pub const EVFILT_SYSCOUNT: ::int16_t = 7; +pub const EVFILT_TIMER: ::int16_t = 6; +pub const EVFILT_VNODE: ::int16_t = 3; +pub const EVFILT_WRITE: ::int16_t = 1; + +pub const NOTE_PCTRLMASK: ::uint32_t = 0xf0000000; + +pub const CRTSCTS: ::tcflag_t = 0x00010000; + +pub const TMP_MAX : ::c_uint = 308915776; + +pub const NI_MAXHOST: ::socklen_t = 1025; + +pub const RTLD_NOLOAD: ::c_int = 0x2000; +pub const RTLD_LOCAL: ::c_int = 0x200; + +extern { + pub fn getnameinfo(sa: *const ::sockaddr, + salen: ::socklen_t, + host: *mut ::c_char, + hostlen: ::socklen_t, + serv: *mut ::c_char, + sevlen: ::socklen_t, + flags: ::c_int) -> ::c_int; + pub fn mprotect(addr: *mut ::c_void, len: ::size_t, prot: ::c_int) + -> ::c_int; + pub fn sysctl(name: *const ::c_int, + namelen: ::c_uint, + oldp: *mut ::c_void, + oldlenp: *mut ::size_t, + newp: *const ::c_void, + newlen: ::size_t) + -> ::c_int; + pub fn sysctlbyname(name: *const ::c_char, + oldp: *mut ::c_void, + oldlenp: *mut ::size_t, + newp: *const ::c_void, + newlen: ::size_t) + -> ::c_int; + #[link_name = "__kevent50"] + pub fn kevent(kq: ::c_int, + changelist: *const ::kevent, + nchanges: ::size_t, + eventlist: *mut ::kevent, + nevents: ::size_t, + timeout: *const ::timespec) -> ::c_int; + #[link_name = "__mount50"] + pub fn mount(src: *const ::c_char, + target: *const ::c_char, + flags: ::c_int, + data: *mut ::c_void, + size: ::size_t) -> ::c_int; + pub fn ptrace(requeset: ::c_int, + pid: ::pid_t, + addr: *mut ::c_void, + data: ::c_int) -> ::c_int; + pub fn sethostname(name: *const ::c_char, len: ::size_t) -> ::c_int; + pub fn pthread_setname_np(t: ::pthread_t, + name: *const ::c_char, + arg: *mut ::c_void) -> ::c_int; + pub fn pthread_getattr_np(native: ::pthread_t, + attr: *mut ::pthread_attr_t) -> ::c_int; + pub fn pthread_attr_getguardsize(attr: *const ::pthread_attr_t, + guardsize: *mut ::size_t) -> ::c_int; + pub fn pthread_attr_getstack(attr: *const ::pthread_attr_t, + stackaddr: *mut *mut ::c_void, + stacksize: *mut ::size_t) -> ::c_int; + #[link_name = "__sigtimedwait50"] + pub fn sigtimedwait(set: *const sigset_t, + info: *mut siginfo_t, + timeout: *const ::timespec) -> ::c_int; + pub fn sigwaitinfo(set: *const sigset_t, + info: *mut siginfo_t) -> ::c_int; +} diff --git a/deps/libc-0.2.8/src/unix/bsd/openbsdlike/openbsd.rs b/deps/libc-0.2.8/src/unix/bsd/openbsdlike/openbsd.rs new file mode 100644 index 000000000..73d14ea97 --- /dev/null +++ b/deps/libc-0.2.8/src/unix/bsd/openbsdlike/openbsd.rs @@ -0,0 +1,247 @@ +pub type clock_t = i64; +pub type suseconds_t = i64; +pub type dev_t = i32; +pub type sigset_t = ::c_uint; +pub type blksize_t = ::int32_t; +pub type fsblkcnt_t = ::uint64_t; +pub type fsfilcnt_t = ::uint64_t; +pub type pthread_attr_t = *mut ::c_void; +pub type pthread_mutex_t = *mut ::c_void; +pub type pthread_mutexattr_t = *mut ::c_void; +pub type pthread_cond_t = *mut ::c_void; +pub type pthread_rwlock_t = *mut ::c_void; + +s! { + pub struct dirent { + pub d_fileno: ::ino_t, + pub d_off: ::off_t, + pub d_reclen: u16, + pub d_type: u8, + pub d_namlen: u8, + __d_padding: [u8; 4], + pub d_name: [::c_char; 256], + } + + pub struct glob_t { + pub gl_pathc: ::c_int, + __unused1: ::c_int, + pub gl_offs: ::c_int, + __unused2: ::c_int, + pub gl_pathv: *mut *mut ::c_char, + + __unused3: *mut ::c_void, + + __unused4: *mut ::c_void, + __unused5: *mut ::c_void, + __unused6: *mut ::c_void, + __unused7: *mut ::c_void, + __unused8: *mut ::c_void, + __unused9: *mut ::c_void, + } + + pub struct stat { + pub st_mode: ::mode_t, + pub st_dev: ::dev_t, + pub st_ino: ::ino_t, + pub st_nlink: ::nlink_t, + pub st_uid: ::uid_t, + pub st_gid: ::gid_t, + pub st_rdev: ::dev_t, + pub st_atime: ::time_t, + pub st_atime_nsec: ::c_long, + pub st_mtime: ::time_t, + pub st_mtime_nsec: ::c_long, + pub st_ctime: ::time_t, + pub st_ctime_nsec: ::c_long, + pub st_size: ::off_t, + pub st_blocks: ::blkcnt_t, + pub st_blksize: ::blksize_t, + pub st_flags: ::uint32_t, + pub st_gen: ::uint32_t, + pub st_birthtime: ::time_t, + pub st_birthtime_nsec: ::c_long, + } + + pub struct statvfs { + pub f_bsize: ::c_ulong, + pub f_frsize: ::c_ulong, + pub f_blocks: ::fsblkcnt_t, + pub f_bfree: ::fsblkcnt_t, + pub f_bavail: ::fsblkcnt_t, + pub f_files: ::fsfilcnt_t, + pub f_ffree: ::fsfilcnt_t, + pub f_favail: ::fsfilcnt_t, + pub f_fsid: ::c_ulong, + pub f_flag: ::c_ulong, + pub f_namemax: ::c_ulong, + } + + pub struct addrinfo { + pub ai_flags: ::c_int, + pub ai_family: ::c_int, + pub ai_socktype: ::c_int, + pub ai_protocol: ::c_int, + pub ai_addrlen: ::socklen_t, + pub ai_addr: *mut ::sockaddr, + pub ai_canonname: *mut ::c_char, + pub ai_next: *mut ::addrinfo, + } + + pub struct sockaddr_storage { + pub ss_len: u8, + pub ss_family: ::sa_family_t, + __ss_pad1: [u8; 6], + __ss_pad2: i64, + __ss_pad3: [u8; 240], + } + + pub struct siginfo_t { + pub si_signo: ::c_int, + pub si_code: ::c_int, + pub si_errno: ::c_int, + pub si_addr: *mut ::c_char, + __pad: [u8; 108], + } + + pub struct Dl_info { + pub dli_fname: *const ::c_char, + pub dli_fbase: *mut ::c_void, + pub dli_sname: *const ::c_char, + pub dli_saddr: *mut ::c_void, + } +} + +pub const O_CLOEXEC: ::c_int = 0x10000; + +pub const MS_SYNC : ::c_int = 0x0002; +pub const MS_INVALIDATE : ::c_int = 0x0004; + +pub const PTHREAD_STACK_MIN : ::size_t = 2048; + +pub const ENOATTR : ::c_int = 83; +pub const EILSEQ : ::c_int = 84; +pub const EOVERFLOW : ::c_int = 87; +pub const ECANCELED : ::c_int = 88; +pub const EIDRM : ::c_int = 89; +pub const ENOMSG : ::c_int = 90; +pub const ENOTSUP : ::c_int = 91; +pub const ELAST : ::c_int = 91; + +pub const F_DUPFD_CLOEXEC : ::c_int = 10; + +pub const RLIM_NLIMITS: ::c_int = 9; + +pub const SO_SNDTIMEO: ::c_int = 0x1005; +pub const SO_RCVTIMEO: ::c_int = 0x1006; + +pub const IPV6_JOIN_GROUP: ::c_int = 12; +pub const IPV6_LEAVE_GROUP: ::c_int = 13; + +pub const KERN_PROC : ::c_int = 66; +pub const O_DSYNC : ::c_int = 128; + +pub const MAP_RENAME : ::c_int = 0x0000; +pub const MAP_NORESERVE : ::c_int = 0x0000; +pub const MAP_HASSEMAPHORE : ::c_int = 0x0000; + +pub const EIPSEC : ::c_int = 82; +pub const ENOMEDIUM : ::c_int = 85; +pub const EMEDIUMTYPE : ::c_int = 86; + +pub const RUSAGE_THREAD: ::c_int = 1; + +pub const MAP_COPY : ::c_int = 0x0002; +pub const MAP_NOEXTEND : ::c_int = 0x0000; + +pub const _SC_CLK_TCK : ::c_int = 3; +pub const _SC_IOV_MAX : ::c_int = 51; +pub const _SC_GETGR_R_SIZE_MAX : ::c_int = 100; +pub const _SC_GETPW_R_SIZE_MAX : ::c_int = 101; +pub const _SC_LOGIN_NAME_MAX : ::c_int = 102; +pub const _SC_MQ_PRIO_MAX : ::c_int = 59; +pub const _SC_NPROCESSORS_ONLN : ::c_int = 503; +pub const _SC_THREADS : ::c_int = 91; +pub const _SC_THREAD_ATTR_STACKADDR : ::c_int = 77; +pub const _SC_THREAD_ATTR_STACKSIZE : ::c_int = 78; +pub const _SC_THREAD_DESTRUCTOR_ITERATIONS : ::c_int = 80; +pub const _SC_THREAD_KEYS_MAX : ::c_int = 81; +pub const _SC_THREAD_PRIO_INHERIT : ::c_int = 82; +pub const _SC_THREAD_PRIO_PROTECT : ::c_int = 83; +pub const _SC_THREAD_PRIORITY_SCHEDULING : ::c_int = 84; +pub const _SC_THREAD_PROCESS_SHARED : ::c_int = 85; +pub const _SC_THREAD_SAFE_FUNCTIONS : ::c_int = 103; +pub const _SC_THREAD_STACK_MIN : ::c_int = 89; +pub const _SC_THREAD_THREADS_MAX : ::c_int = 90; +pub const _SC_TTY_NAME_MAX : ::c_int = 107; +pub const _SC_ATEXIT_MAX : ::c_int = 46; +pub const _SC_AIO_LISTIO_MAX : ::c_int = 42; +pub const _SC_AIO_MAX : ::c_int = 43; +pub const _SC_ASYNCHRONOUS_IO : ::c_int = 45; +pub const _SC_MAPPED_FILES : ::c_int = 53; +pub const _SC_MEMLOCK : ::c_int = 54; +pub const _SC_MEMLOCK_RANGE : ::c_int = 55; +pub const _SC_MEMORY_PROTECTION : ::c_int = 56; +pub const _SC_MESSAGE_PASSING : ::c_int = 57; +pub const _SC_MQ_OPEN_MAX : ::c_int = 58; +pub const _SC_PRIORITY_SCHEDULING : ::c_int = 61; +pub const _SC_SEMAPHORES : ::c_int = 67; +pub const _SC_SHARED_MEMORY_OBJECTS : ::c_int = 68; +pub const _SC_SYNCHRONIZED_IO : ::c_int = 75; +pub const _SC_TIMERS : ::c_int = 94; +pub const _SC_XOPEN_CRYPT : ::c_int = 117; +pub const _SC_XOPEN_ENH_I18N : ::c_int = 118; +pub const _SC_XOPEN_LEGACY : ::c_int = 119; +pub const _SC_XOPEN_REALTIME : ::c_int = 120; +pub const _SC_XOPEN_REALTIME_THREADS : ::c_int = 121; +pub const _SC_XOPEN_UNIX : ::c_int = 123; +pub const _SC_XOPEN_VERSION : ::c_int = 125; +pub const _SC_SEM_NSEMS_MAX : ::c_int = 31; +pub const _SC_SEM_VALUE_MAX : ::c_int = 32; +pub const _SC_AIO_PRIO_DELTA_MAX : ::c_int = 44; +pub const _SC_DELAYTIMER_MAX : ::c_int = 50; +pub const _SC_PRIORITIZED_IO : ::c_int = 60; +pub const _SC_REALTIME_SIGNALS : ::c_int = 64; +pub const _SC_RTSIG_MAX : ::c_int = 66; +pub const _SC_SIGQUEUE_MAX : ::c_int = 70; +pub const _SC_TIMER_MAX : ::c_int = 93; + +pub const FD_SETSIZE: usize = 1024; + +pub const ST_NOSUID: ::c_ulong = 2; + +pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = 0 as *mut _; +pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = 0 as *mut _; +pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = 0 as *mut _; +pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 2; + +pub const KERN_PROC_ARGS: ::c_int = 55; + +pub const TMP_MAX : ::c_uint = 0x7fffffff; + +pub const NI_MAXHOST: ::size_t = 256; + +pub const RTLD_LOCAL: ::c_int = 0; + +extern { + pub fn getnameinfo(sa: *const ::sockaddr, + salen: ::socklen_t, + host: *mut ::c_char, + hostlen: ::size_t, + serv: *mut ::c_char, + servlen: ::size_t, + flags: ::c_int) -> ::c_int; + pub fn mprotect(addr: *mut ::c_void, len: ::size_t, prot: ::c_int) + -> ::c_int; + pub fn pthread_main_np() -> ::c_int; + pub fn pthread_set_name_np(tid: ::pthread_t, name: *const ::c_char); + pub fn pthread_stackseg_np(thread: ::pthread_t, + sinfo: *mut ::stack_t) -> ::c_int; + pub fn sysctl(name: *const ::c_int, + namelen: ::c_uint, + oldp: *mut ::c_void, + oldlenp: *mut ::size_t, + newp: *mut ::c_void, + newlen: ::size_t) + -> ::c_int; + pub fn getentropy(buf: *mut ::c_void, buflen: ::size_t) -> ::c_int; +} diff --git a/deps/libc-0.2.8/src/unix/mod.rs b/deps/libc-0.2.8/src/unix/mod.rs new file mode 100644 index 000000000..6176402fb --- /dev/null +++ b/deps/libc-0.2.8/src/unix/mod.rs @@ -0,0 +1,731 @@ +//! Definitions found commonly among almost all Unix derivatives +//! +//! More functions and definitions can be found in the more specific modules +//! according to the platform in question. + +use dox::Option; + +pub type pid_t = i32; +pub type uid_t = u32; +pub type gid_t = u32; +pub type in_addr_t = u32; +pub type in_port_t = u16; +pub type sighandler_t = ::size_t; +pub type cc_t = ::c_uchar; + +pub enum DIR {} + +s! { + pub struct utimbuf { + pub actime: time_t, + pub modtime: time_t, + } + + pub struct timeval { + pub tv_sec: time_t, + pub tv_usec: suseconds_t, + } + + pub struct timespec { + pub tv_sec: time_t, + pub tv_nsec: c_long, + } + + pub struct rlimit { + pub rlim_cur: rlim_t, + pub rlim_max: rlim_t, + } + + pub struct rusage { + pub ru_utime: timeval, + pub ru_stime: timeval, + pub ru_maxrss: c_long, + pub ru_ixrss: c_long, + pub ru_idrss: c_long, + pub ru_isrss: c_long, + pub ru_minflt: c_long, + pub ru_majflt: c_long, + pub ru_nswap: c_long, + pub ru_inblock: c_long, + pub ru_oublock: c_long, + pub ru_msgsnd: c_long, + pub ru_msgrcv: c_long, + pub ru_nsignals: c_long, + pub ru_nvcsw: c_long, + pub ru_nivcsw: c_long, + + #[cfg(target_env = "musl")] + __reserved: [c_long; 16], + } + + #[cfg_attr(target_os = "netbsd", repr(packed))] + pub struct in_addr { + pub s_addr: in_addr_t, + } + + pub struct in6_addr { + pub s6_addr: [u8; 16], + __align: [u32; 0], + } + + pub struct ip_mreq { + pub imr_multiaddr: in_addr, + pub imr_interface: in_addr, + } + + pub struct ipv6_mreq { + pub ipv6mr_multiaddr: in6_addr, + #[cfg(target_os = "android")] + pub ipv6mr_interface: ::c_int, + #[cfg(not(target_os = "android"))] + pub ipv6mr_interface: ::c_uint, + } + + pub struct hostent { + pub h_name: *mut ::c_char, + pub h_aliases: *mut *mut ::c_char, + pub h_addrtype: ::c_int, + pub h_length: ::c_int, + pub h_addr_list: *mut *mut ::c_char, + } + + pub struct iovec { + pub iov_base: *mut ::c_void, + pub iov_len: ::size_t, + } + + pub struct pollfd { + pub fd: ::c_int, + pub events: ::c_short, + pub revents: ::c_short, + } +} + +pub const SIG_DFL: sighandler_t = 0 as sighandler_t; +pub const SIG_IGN: sighandler_t = 1 as sighandler_t; +pub const SIG_ERR: sighandler_t = !0 as sighandler_t; + +pub const DT_FIFO: u8 = 1; +pub const DT_CHR: u8 = 2; +pub const DT_DIR: u8 = 4; +pub const DT_BLK: u8 = 6; +pub const DT_REG: u8 = 8; +pub const DT_LNK: u8 = 10; +pub const DT_SOCK: u8 = 12; + +pub const FD_CLOEXEC: ::c_int = 0x1; + +pub const USRQUOTA: ::c_int = 0; +pub const GRPQUOTA: ::c_int = 1; + +pub const SIGIOT: ::c_int = 6; + +pub const S_ISUID: ::c_int = 0x800; +pub const S_ISGID: ::c_int = 0x400; +pub const S_ISVTX: ::c_int = 0x200; + +pub const POLLIN: ::c_short = 0x1; +pub const POLLPRI: ::c_short = 0x2; +pub const POLLOUT: ::c_short = 0x4; +pub const POLLERR: ::c_short = 0x8; +pub const POLLHUP: ::c_short = 0x10; +pub const POLLNVAL: ::c_short = 0x20; + +pub const IF_NAMESIZE: ::size_t = 16; + +pub const RTLD_LAZY: ::c_int = 0x1; + +cfg_if! { + if #[cfg(not(stdbuild))] { + // cargo build, don't pull in anything extra as the libstd dep + // already pulls in all libs. + } else if #[cfg(all(target_env = "musl", not(any(target_arch = "mips", + target_arch = "arm"))))] { + #[link(name = "c", kind = "static")] + extern {} + } else if #[cfg(target_os = "emscripten")] { + #[link(name = "c")] + extern {} + } else if #[cfg(all(target_vendor = "rumprun", target_os = "netbsd"))] { + // Since we don't use -nodefaultlibs on Rumprun, libc is always pulled + // in automatically by the linker. We avoid passing it explicitly, as it + // causes some versions of binutils to crash with an assertion failure. + #[link(name = "m")] + extern {} + } else if #[cfg(any(target_os = "macos", + target_os = "ios", + target_os = "android", + target_os = "openbsd", + target_os = "bitrig"))] { + #[link(name = "c")] + #[link(name = "m")] + extern {} + } else { + #[link(name = "c")] + #[link(name = "m")] + #[link(name = "rt")] + extern {} + } +} + +extern { + #[cfg_attr(target_os = "netbsd", link_name = "__socket30")] + pub fn socket(domain: ::c_int, ty: ::c_int, protocol: ::c_int) -> ::c_int; + #[cfg_attr(all(target_os = "macos", target_arch = "x86"), + link_name = "connect$UNIX2003")] + pub fn connect(socket: ::c_int, address: *const sockaddr, + len: socklen_t) -> ::c_int; + #[cfg_attr(all(target_os = "macos", target_arch = "x86"), + link_name = "bind$UNIX2003")] + pub fn bind(socket: ::c_int, address: *const sockaddr, + address_len: socklen_t) -> ::c_int; + #[cfg_attr(all(target_os = "macos", target_arch = "x86"), + link_name = "listen$UNIX2003")] + pub fn listen(socket: ::c_int, backlog: ::c_int) -> ::c_int; + #[cfg_attr(all(target_os = "macos", target_arch = "x86"), + link_name = "accept$UNIX2003")] + pub fn accept(socket: ::c_int, address: *mut sockaddr, + address_len: *mut socklen_t) -> ::c_int; + #[cfg_attr(all(target_os = "macos", target_arch = "x86"), + link_name = "getpeername$UNIX2003")] + pub fn getpeername(socket: ::c_int, address: *mut sockaddr, + address_len: *mut socklen_t) -> ::c_int; + #[cfg_attr(all(target_os = "macos", target_arch = "x86"), + link_name = "getsockname$UNIX2003")] + pub fn getsockname(socket: ::c_int, address: *mut sockaddr, + address_len: *mut socklen_t) -> ::c_int; + pub fn setsockopt(socket: ::c_int, level: ::c_int, name: ::c_int, + value: *const ::c_void, + option_len: socklen_t) -> ::c_int; + #[cfg_attr(all(target_os = "macos", target_arch = "x86"), + link_name = "socketpair$UNIX2003")] + pub fn socketpair(domain: ::c_int, type_: ::c_int, protocol: ::c_int, + socket_vector: *mut ::c_int) -> ::c_int; + #[cfg_attr(all(target_os = "macos", target_arch = "x86"), + link_name = "sendto$UNIX2003")] + pub fn sendto(socket: ::c_int, buf: *const ::c_void, len: ::size_t, + flags: ::c_int, addr: *const sockaddr, + addrlen: socklen_t) -> ::ssize_t; + pub fn shutdown(socket: ::c_int, how: ::c_int) -> ::c_int; + + #[cfg_attr(all(target_os = "macos", target_arch = "x86"), + link_name = "chmod$UNIX2003")] + pub fn chmod(path: *const c_char, mode: mode_t) -> ::c_int; + #[cfg_attr(all(target_os = "macos", target_arch = "x86"), + link_name = "fchmod$UNIX2003")] + pub fn fchmod(fd: ::c_int, mode: mode_t) -> ::c_int; + + #[cfg_attr(target_os = "macos", link_name = "fstat$INODE64")] + #[cfg_attr(target_os = "netbsd", link_name = "__fstat50")] + pub fn fstat(fildes: ::c_int, buf: *mut stat) -> ::c_int; + + pub fn mkdir(path: *const c_char, mode: mode_t) -> ::c_int; + + #[cfg_attr(target_os = "macos", link_name = "stat$INODE64")] + #[cfg_attr(target_os = "netbsd", link_name = "__stat50")] + pub fn stat(path: *const c_char, buf: *mut stat) -> ::c_int; + + #[cfg_attr(all(target_os = "macos", target_arch = "x86"), + link_name = "popen$UNIX2003")] + pub fn popen(command: *const c_char, + mode: *const c_char) -> *mut ::FILE; + pub fn pclose(stream: *mut ::FILE) -> ::c_int; + #[cfg_attr(all(target_os = "macos", target_arch = "x86"), + link_name = "fdopen$UNIX2003")] + pub fn fdopen(fd: ::c_int, mode: *const c_char) -> *mut ::FILE; + pub fn fileno(stream: *mut ::FILE) -> ::c_int; + + #[cfg_attr(all(target_os = "macos", target_arch = "x86"), + link_name = "open$UNIX2003")] + pub fn open(path: *const c_char, oflag: ::c_int, ...) -> ::c_int; + #[cfg_attr(all(target_os = "macos", target_arch = "x86"), + link_name = "creat$UNIX2003")] + pub fn creat(path: *const c_char, mode: mode_t) -> ::c_int; + #[cfg_attr(all(target_os = "macos", target_arch = "x86"), + link_name = "fcntl$UNIX2003")] + pub fn fcntl(fd: ::c_int, cmd: ::c_int, ...) -> ::c_int; + + #[cfg_attr(all(target_os = "macos", target_arch = "x86_64"), + link_name = "opendir$INODE64")] + #[cfg_attr(all(target_os = "macos", target_arch = "x86"), + link_name = "opendir$INODE64$UNIX2003")] + #[cfg_attr(target_os = "netbsd", link_name = "__opendir30")] + pub fn opendir(dirname: *const c_char) -> *mut ::DIR; + #[cfg_attr(target_os = "macos", link_name = "readdir_r$INODE64")] + #[cfg_attr(target_os = "netbsd", link_name = "__readdir_r30")] + pub fn readdir_r(dirp: *mut ::DIR, entry: *mut ::dirent, + result: *mut *mut ::dirent) -> ::c_int; + #[cfg_attr(all(target_os = "macos", target_arch = "x86"), + link_name = "closedir$UNIX2003")] + pub fn closedir(dirp: *mut ::DIR) -> ::c_int; + #[cfg_attr(all(target_os = "macos", target_arch = "x86_64"), + link_name = "rewinddir$INODE64")] + #[cfg_attr(all(target_os = "macos", target_arch = "x86"), + link_name = "rewinddir$INODE64$UNIX2003")] + pub fn rewinddir(dirp: *mut ::DIR); + + pub fn access(path: *const c_char, amode: ::c_int) -> ::c_int; + pub fn alarm(seconds: ::c_uint) -> ::c_uint; + pub fn chdir(dir: *const c_char) -> ::c_int; + pub fn chown(path: *const c_char, uid: uid_t, + gid: gid_t) -> ::c_int; + #[cfg_attr(all(target_os = "macos", target_arch = "x86"), + link_name = "close$UNIX2003")] + pub fn close(fd: ::c_int) -> ::c_int; + pub fn dup(fd: ::c_int) -> ::c_int; + pub fn dup2(src: ::c_int, dst: ::c_int) -> ::c_int; + pub fn execv(prog: *const c_char, + argv: *const *const c_char) -> ::c_int; + pub fn execve(prog: *const c_char, argv: *const *const c_char, + envp: *const *const c_char) + -> ::c_int; + pub fn execvp(c: *const c_char, + argv: *const *const c_char) -> ::c_int; + pub fn fork() -> pid_t; + pub fn fpathconf(filedes: ::c_int, name: ::c_int) -> c_long; + pub fn getcwd(buf: *mut c_char, size: ::size_t) -> *mut c_char; + pub fn getegid() -> gid_t; + pub fn geteuid() -> uid_t; + pub fn getgid() -> gid_t; + pub fn getgroups(ngroups_max: ::c_int, groups: *mut gid_t) + -> ::c_int; + pub fn getlogin() -> *mut c_char; + #[cfg_attr(all(target_os = "macos", target_arch = "x86"), + link_name = "getopt$UNIX2003")] + pub fn getopt(argc: ::c_int, argv: *const *mut c_char, + optstr: *const c_char) -> ::c_int; + pub fn getpgrp() -> pid_t; + pub fn getpid() -> pid_t; + pub fn getppid() -> pid_t; + pub fn getuid() -> uid_t; + pub fn isatty(fd: ::c_int) -> ::c_int; + pub fn link(src: *const c_char, dst: *const c_char) -> ::c_int; + pub fn lseek(fd: ::c_int, offset: off_t, whence: ::c_int) -> off_t; + pub fn pathconf(path: *const c_char, name: ::c_int) -> c_long; + #[cfg_attr(all(target_os = "macos", target_arch = "x86"), + link_name = "pause$UNIX2003")] + pub fn pause() -> ::c_int; + pub fn pipe(fds: *mut ::c_int) -> ::c_int; + pub fn posix_memalign(memptr: *mut *mut ::c_void, + align: ::size_t, + size: ::size_t) -> ::c_int; + #[cfg_attr(all(target_os = "macos", target_arch = "x86"), + link_name = "read$UNIX2003")] + pub fn read(fd: ::c_int, buf: *mut ::c_void, count: ::size_t) + -> ::ssize_t; + pub fn rmdir(path: *const c_char) -> ::c_int; + pub fn setgid(gid: gid_t) -> ::c_int; + pub fn setpgid(pid: pid_t, pgid: pid_t) -> ::c_int; + pub fn setsid() -> pid_t; + pub fn setuid(uid: uid_t) -> ::c_int; + #[cfg_attr(all(target_os = "macos", target_arch = "x86"), + link_name = "sleep$UNIX2003")] + pub fn sleep(secs: ::c_uint) -> ::c_uint; + #[cfg_attr(all(target_os = "macos", target_arch = "x86"), + link_name = "nanosleep$UNIX2003")] + #[cfg_attr(target_os = "netbsd", link_name = "__nanosleep50")] + pub fn nanosleep(rqtp: *const timespec, + rmtp: *mut timespec) -> ::c_int; + pub fn tcgetpgrp(fd: ::c_int) -> pid_t; + pub fn ttyname(fd: ::c_int) -> *mut c_char; + pub fn unlink(c: *const c_char) -> ::c_int; + #[cfg_attr(all(target_os = "macos", target_arch = "x86"), + link_name = "wait$UNIX2003")] + pub fn wait(status: *mut ::c_int) -> pid_t; + #[cfg_attr(all(target_os = "macos", target_arch = "x86"), + link_name = "waitpid$UNIX2003")] + pub fn waitpid(pid: pid_t, status: *mut ::c_int, options: ::c_int) + -> pid_t; + #[cfg_attr(all(target_os = "macos", target_arch = "x86"), + link_name = "write$UNIX2003")] + pub fn write(fd: ::c_int, buf: *const ::c_void, count: ::size_t) + -> ::ssize_t; + #[cfg_attr(all(target_os = "macos", target_arch = "x86"), + link_name = "pread$UNIX2003")] + pub fn pread(fd: ::c_int, buf: *mut ::c_void, count: ::size_t, + offset: off_t) -> ::ssize_t; + #[cfg_attr(all(target_os = "macos", target_arch = "x86"), + link_name = "pwrite$UNIX2003")] + pub fn pwrite(fd: ::c_int, buf: *const ::c_void, count: ::size_t, + offset: off_t) -> ::ssize_t; + pub fn umask(mask: mode_t) -> mode_t; + + #[cfg_attr(target_os = "netbsd", link_name = "__utime50")] + pub fn utime(file: *const c_char, buf: *const utimbuf) -> ::c_int; + + #[cfg_attr(all(target_os = "macos", target_arch = "x86"), + link_name = "kill$UNIX2003")] + pub fn kill(pid: pid_t, sig: ::c_int) -> ::c_int; + + pub fn mlock(addr: *const ::c_void, len: ::size_t) -> ::c_int; + pub fn munlock(addr: *const ::c_void, len: ::size_t) -> ::c_int; + pub fn mlockall(flags: ::c_int) -> ::c_int; + pub fn munlockall() -> ::c_int; + + #[cfg_attr(all(target_os = "macos", target_arch = "x86"), + link_name = "mmap$UNIX2003")] + pub fn mmap(addr: *mut ::c_void, + len: ::size_t, + prot: ::c_int, + flags: ::c_int, + fd: ::c_int, + offset: off_t) + -> *mut ::c_void; + #[cfg_attr(all(target_os = "macos", target_arch = "x86"), + link_name = "munmap$UNIX2003")] + pub fn munmap(addr: *mut ::c_void, len: ::size_t) -> ::c_int; + + pub fn if_nametoindex(ifname: *const c_char) -> ::c_uint; + pub fn if_indextoname(ifindex: ::c_uint, + ifname: *mut ::c_char) -> *mut ::c_char; + + #[cfg_attr(target_os = "macos", link_name = "lstat$INODE64")] + #[cfg_attr(target_os = "netbsd", link_name = "__lstat50")] + pub fn lstat(path: *const c_char, buf: *mut stat) -> ::c_int; + + #[cfg_attr(all(target_os = "macos", target_arch = "x86"), + link_name = "fsync$UNIX2003")] + pub fn fsync(fd: ::c_int) -> ::c_int; + + #[cfg_attr(all(target_os = "macos", target_arch = "x86"), + link_name = "setenv$UNIX2003")] + pub fn setenv(name: *const c_char, val: *const c_char, + overwrite: ::c_int) -> ::c_int; + #[cfg_attr(all(target_os = "macos", target_arch = "x86"), + link_name = "unsetenv$UNIX2003")] + #[cfg_attr(target_os = "netbsd", link_name = "__unsetenv13")] + pub fn unsetenv(name: *const c_char) -> ::c_int; + + pub fn symlink(path1: *const c_char, + path2: *const c_char) -> ::c_int; + + pub fn ftruncate(fd: ::c_int, length: off_t) -> ::c_int; + + #[cfg_attr(target_os = "android", link_name = "bsd_signal")] + pub fn signal(signum: ::c_int, handler: sighandler_t) -> sighandler_t; + + #[cfg_attr(all(target_os = "macos", target_arch = "x86"), + link_name = "getrlimit$UNIX2003")] + pub fn getrlimit(resource: ::c_int, rlim: *mut rlimit) -> ::c_int; + #[cfg_attr(all(target_os = "macos", target_arch = "x86"), + link_name = "setrlimit$UNIX2003")] + pub fn setrlimit(resource: ::c_int, rlim: *const rlimit) -> ::c_int; + #[cfg_attr(target_os = "netbsd", link_name = "__getrusage50")] + pub fn getrusage(resource: ::c_int, usage: *mut rusage) -> ::c_int; + + pub fn getdtablesize() -> ::c_int; + #[cfg_attr(any(target_os = "macos", target_os = "ios"), + link_name = "realpath$DARWIN_EXTSN")] + pub fn realpath(pathname: *const ::c_char, resolved: *mut ::c_char) + -> *mut ::c_char; + + pub fn flock(fd: ::c_int, operation: ::c_int) -> ::c_int; + + #[cfg_attr(target_os = "netbsd", link_name = "__gettimeofday50")] + pub fn gettimeofday(tp: *mut ::timeval, + tz: *mut ::c_void) -> ::c_int; + + pub fn pthread_self() -> ::pthread_t; + pub fn pthread_create(native: *mut ::pthread_t, + attr: *const ::pthread_attr_t, + f: extern fn(*mut ::c_void) -> *mut ::c_void, + value: *mut ::c_void) -> ::c_int; + #[cfg_attr(all(target_os = "macos", target_arch = "x86"), + link_name = "pthread_join$UNIX2003")] + pub fn pthread_join(native: ::pthread_t, + value: *mut *mut ::c_void) -> ::c_int; + pub fn pthread_attr_init(attr: *mut ::pthread_attr_t) -> ::c_int; + pub fn pthread_attr_destroy(attr: *mut ::pthread_attr_t) -> ::c_int; + pub fn pthread_attr_setstacksize(attr: *mut ::pthread_attr_t, + stack_size: ::size_t) -> ::c_int; + pub fn pthread_attr_setdetachstate(attr: *mut ::pthread_attr_t, + state: ::c_int) -> ::c_int; + pub fn pthread_detach(thread: ::pthread_t) -> ::c_int; + #[cfg_attr(target_os = "netbsd", link_name = "__libc_thr_yield")] + pub fn sched_yield() -> ::c_int; + pub fn pthread_key_create(key: *mut pthread_key_t, + dtor: Option) + -> ::c_int; + pub fn pthread_key_delete(key: pthread_key_t) -> ::c_int; + pub fn pthread_getspecific(key: pthread_key_t) -> *mut ::c_void; + pub fn pthread_setspecific(key: pthread_key_t, value: *const ::c_void) + -> ::c_int; + pub fn pthread_mutex_init(lock: *mut pthread_mutex_t, + attr: *const pthread_mutexattr_t) -> ::c_int; + pub fn pthread_mutex_destroy(lock: *mut pthread_mutex_t) -> ::c_int; + pub fn pthread_mutex_lock(lock: *mut pthread_mutex_t) -> ::c_int; + pub fn pthread_mutex_trylock(lock: *mut pthread_mutex_t) -> ::c_int; + pub fn pthread_mutex_unlock(lock: *mut pthread_mutex_t) -> ::c_int; + + pub fn pthread_mutexattr_init(attr: *mut pthread_mutexattr_t) -> ::c_int; + #[cfg_attr(all(target_os = "macos", target_arch = "x86"), + link_name = "pthread_mutexattr_destroy$UNIX2003")] + pub fn pthread_mutexattr_destroy(attr: *mut pthread_mutexattr_t) -> ::c_int; + pub fn pthread_mutexattr_settype(attr: *mut pthread_mutexattr_t, + _type: ::c_int) -> ::c_int; + + #[cfg_attr(all(target_os = "macos", target_arch = "x86"), + link_name = "pthread_cond_wait$UNIX2003")] + pub fn pthread_cond_wait(cond: *mut pthread_cond_t, + lock: *mut pthread_mutex_t) -> ::c_int; + #[cfg_attr(all(target_os = "macos", target_arch = "x86"), + link_name = "pthread_cond_timedwait$UNIX2003")] + pub fn pthread_cond_timedwait(cond: *mut pthread_cond_t, + lock: *mut pthread_mutex_t, + abstime: *const ::timespec) -> ::c_int; + pub fn pthread_cond_signal(cond: *mut pthread_cond_t) -> ::c_int; + pub fn pthread_cond_broadcast(cond: *mut pthread_cond_t) -> ::c_int; + pub fn pthread_cond_destroy(cond: *mut pthread_cond_t) -> ::c_int; + #[cfg_attr(all(target_os = "macos", target_arch = "x86"), + link_name = "pthread_rwlock_destroy$UNIX2003")] + pub fn pthread_rwlock_destroy(lock: *mut pthread_rwlock_t) -> ::c_int; + #[cfg_attr(all(target_os = "macos", target_arch = "x86"), + link_name = "pthread_rwlock_rdlock$UNIX2003")] + pub fn pthread_rwlock_rdlock(lock: *mut pthread_rwlock_t) -> ::c_int; + #[cfg_attr(all(target_os = "macos", target_arch = "x86"), + link_name = "pthread_rwlock_tryrdlock$UNIX2003")] + pub fn pthread_rwlock_tryrdlock(lock: *mut pthread_rwlock_t) -> ::c_int; + #[cfg_attr(all(target_os = "macos", target_arch = "x86"), + link_name = "pthread_rwlock_wrlock$UNIX2003")] + pub fn pthread_rwlock_wrlock(lock: *mut pthread_rwlock_t) -> ::c_int; + #[cfg_attr(all(target_os = "macos", target_arch = "x86"), + link_name = "pthread_rwlock_trywrlock$UNIX2003")] + pub fn pthread_rwlock_trywrlock(lock: *mut pthread_rwlock_t) -> ::c_int; + #[cfg_attr(all(target_os = "macos", target_arch = "x86"), + link_name = "pthread_rwlock_unlock$UNIX2003")] + pub fn pthread_rwlock_unlock(lock: *mut pthread_rwlock_t) -> ::c_int; + #[cfg_attr(all(target_os = "macos", target_arch = "x86"), + link_name = "pthread_sigmask$UNIX2003")] + pub fn pthread_sigmask(how: ::c_int, set: *const sigset_t, + oldset: *mut sigset_t) -> ::c_int; + pub fn pthread_kill(thread: ::pthread_t, sig: ::c_int) -> ::c_int; + + // #[cfg_attr(target_os = "linux", link_name = "__xpg_strerror_r")] + pub fn strerror_r(errnum: ::c_int, buf: *mut c_char, + buflen: ::size_t) -> ::c_int; + + pub fn getsockopt(sockfd: ::c_int, + level: ::c_int, + optname: ::c_int, + optval: *mut ::c_void, + optlen: *mut ::socklen_t) -> ::c_int; + pub fn raise(signum: ::c_int) -> ::c_int; + #[cfg_attr(target_os = "netbsd", link_name = "__sigaction14")] + pub fn sigaction(signum: ::c_int, + act: *const sigaction, + oldact: *mut sigaction) -> ::c_int; + #[cfg_attr(all(target_os = "macos", target_arch = "x86"), + link_name = "sigaltstack$UNIX2003")] + #[cfg_attr(target_os = "netbsd", link_name = "__sigaltstack14")] + pub fn sigaltstack(ss: *const stack_t, + oss: *mut stack_t) -> ::c_int; + #[cfg_attr(all(target_os = "macos", target_arch ="x86"), + link_name = "sigwait$UNIX2003")] + pub fn sigwait(set: *const sigset_t, + sig: *mut ::c_int) -> ::c_int; + + #[cfg_attr(target_os = "netbsd", link_name = "__utimes50")] + pub fn utimes(filename: *const ::c_char, + times: *const ::timeval) -> ::c_int; + pub fn dlopen(filename: *const ::c_char, + flag: ::c_int) -> *mut ::c_void; + pub fn dlerror() -> *mut ::c_char; + pub fn dlsym(handle: *mut ::c_void, + symbol: *const ::c_char) -> *mut ::c_void; + pub fn dlclose(handle: *mut ::c_void) -> ::c_int; + pub fn dladdr(addr: *const ::c_void, info: *mut Dl_info) -> ::c_int; + + pub fn getaddrinfo(node: *const c_char, + service: *const c_char, + hints: *const addrinfo, + res: *mut *mut addrinfo) -> ::c_int; + pub fn freeaddrinfo(res: *mut addrinfo); + pub fn gai_strerror(errcode: ::c_int) -> *const ::c_char; + + #[cfg_attr(target_os = "netbsd", link_name = "__gmtime_r50")] + pub fn gmtime_r(time_p: *const time_t, result: *mut tm) -> *mut tm; + #[cfg_attr(target_os = "netbsd", link_name = "__localtime_r50")] + pub fn localtime_r(time_p: *const time_t, result: *mut tm) -> *mut tm; + #[cfg_attr(all(target_os = "macos", target_arch = "x86"), + link_name = "mktime$UNIX2003")] + #[cfg_attr(target_os = "netbsd", link_name = "__mktime50")] + pub fn mktime(tm: *mut tm) -> time_t; + + #[cfg_attr(target_os = "netbsd", link_name = "__mknod50")] + pub fn mknod(pathname: *const ::c_char, mode: ::mode_t, + dev: ::dev_t) -> ::c_int; + #[cfg_attr(all(target_os = "macos", target_arch = "x86"), + link_name = "writev$UNIX2003")] + pub fn writev(fd: ::c_int, + iov: *const ::iovec, + iovcnt: ::c_int) -> ::ssize_t; + #[cfg_attr(all(target_os = "macos", target_arch = "x86"), + link_name = "readv$UNIX2003")] + pub fn readv(fd: ::c_int, + iov: *const ::iovec, + iovcnt: ::c_int) -> ::ssize_t; + pub fn uname(buf: *mut ::utsname) -> ::c_int; + pub fn daemon(nochdir: ::c_int, noclose: ::c_int) -> ::c_int; + pub fn gethostname(name: *mut ::c_char, len: ::size_t) -> ::c_int; + pub fn chroot(name: *const ::c_char) -> ::c_int; + #[cfg_attr(all(target_os = "macos", target_arch = "x86"), + link_name = "usleep$UNIX2003")] + pub fn usleep(secs: ::c_uint) -> ::c_int; + #[cfg_attr(all(target_os = "macos", target_arch = "x86"), + link_name = "send$UNIX2003")] + pub fn send(socket: ::c_int, buf: *const ::c_void, len: ::size_t, + flags: ::c_int) -> ::ssize_t; + #[cfg_attr(all(target_os = "macos", target_arch = "x86"), + link_name = "recv$UNIX2003")] + pub fn recv(socket: ::c_int, buf: *mut ::c_void, len: ::size_t, + flags: ::c_int) -> ::ssize_t; + #[cfg_attr(all(target_os = "macos", target_arch = "x86"), + link_name = "putenv$UNIX2003")] + #[cfg_attr(target_os = "netbsd", link_name = "__putenv50")] + pub fn putenv(string: *mut c_char) -> ::c_int; + #[cfg_attr(all(target_os = "macos", target_arch = "x86"), + link_name = "sendmsg$UNIX2003")] + pub fn sendmsg(fd: ::c_int, + msg: *const msghdr, + flags: ::c_int) -> ::ssize_t; + #[cfg_attr(all(target_os = "macos", target_arch = "x86"), + link_name = "recvmsg$UNIX2003")] + pub fn recvmsg(fd: ::c_int, msg: *mut msghdr, flags: ::c_int) -> ::ssize_t; + #[cfg_attr(all(target_os = "macos", target_arch = "x86"), + link_name = "poll$UNIX2003")] + pub fn poll(fds: *mut pollfd, nfds: nfds_t, timeout: ::c_int) -> ::c_int; + #[cfg_attr(all(target_os = "macos", target_arch = "x86_64"), + link_name = "select$1050")] + #[cfg_attr(all(target_os = "macos", target_arch = "x86"), + link_name = "select$UNIX2003")] + #[cfg_attr(target_os = "netbsd", link_name = "__select50")] + pub fn select(nfds: ::c_int, + readfs: *mut fd_set, + writefds: *mut fd_set, + errorfds: *mut fd_set, + timeout: *mut timeval) -> ::c_int; +} + +// TODO: get rid of this cfg(not(...)) +#[cfg(not(target_os = "android"))] // " if " -- appease style checker +extern { + pub fn getifaddrs(ifap: *mut *mut ifaddrs) -> ::c_int; + pub fn freeifaddrs(ifa: *mut ifaddrs); + #[cfg_attr(target_os = "macos", link_name = "glob$INODE64")] + #[cfg_attr(target_os = "netbsd", link_name = "__glob30")] + pub fn glob(pattern: *const c_char, + flags: ::c_int, + errfunc: Option ::c_int>, + pglob: *mut glob_t) -> ::c_int; + #[cfg_attr(target_os = "netbsd", link_name = "__globfree30")] + pub fn globfree(pglob: *mut glob_t); + + pub fn posix_madvise(addr: *mut ::c_void, len: ::size_t, advice: ::c_int) + -> ::c_int; + + pub fn shm_unlink(name: *const c_char) -> ::c_int; + + #[cfg_attr(all(target_os = "macos", target_arch = "x86_64"), + link_name = "seekdir$INODE64")] + #[cfg_attr(all(target_os = "macos", target_arch = "x86"), + link_name = "seekdir$INODE64$UNIX2003")] + pub fn seekdir(dirp: *mut ::DIR, loc: c_long); + + #[cfg_attr(all(target_os = "macos", target_arch = "x86_64"), + link_name = "telldir$INODE64")] + #[cfg_attr(all(target_os = "macos", target_arch = "x86"), + link_name = "telldir$INODE64$UNIX2003")] + pub fn telldir(dirp: *mut ::DIR) -> c_long; + + pub fn getsid(pid: pid_t) -> pid_t; + pub fn madvise(addr: *mut ::c_void, len: ::size_t, advice: ::c_int) + -> ::c_int; + pub fn readlink(path: *const c_char, + buf: *mut c_char, + bufsz: ::size_t) + -> ::ssize_t; + + #[cfg_attr(all(target_os = "macos", target_arch = "x86"), + link_name = "msync$UNIX2003")] + #[cfg_attr(target_os = "netbsd", link_name = "__msync13")] + pub fn msync(addr: *mut ::c_void, len: ::size_t, flags: ::c_int) -> ::c_int; + pub fn sysconf(name: ::c_int) -> c_long; + #[cfg_attr(all(target_os = "macos", target_arch = "x86"), + link_name = "recvfrom$UNIX2003")] + pub fn recvfrom(socket: ::c_int, buf: *mut ::c_void, len: ::size_t, + flags: ::c_int, addr: *mut sockaddr, + addrlen: *mut socklen_t) -> ::ssize_t; + pub fn mkfifo(path: *const c_char, mode: mode_t) -> ::c_int; + + #[cfg_attr(target_os = "netbsd", link_name = "__sigemptyset14")] + pub fn sigemptyset(set: *mut sigset_t) -> ::c_int; + #[cfg_attr(target_os = "netbsd", link_name = "__sigaddset14")] + pub fn sigaddset(set: *mut sigset_t, signum: ::c_int) -> ::c_int; + #[cfg_attr(target_os = "netbsd", link_name = "__sigfillset14")] + pub fn sigfillset(set: *mut sigset_t) -> ::c_int; + #[cfg_attr(target_os = "netbsd", link_name = "__sigdelset14")] + pub fn sigdelset(set: *mut sigset_t, signum: ::c_int) -> ::c_int; + #[cfg_attr(target_os = "netbsd", link_name = "__sigismember14")] + pub fn sigismember(set: *const sigset_t, signum: ::c_int) -> ::c_int; + #[cfg_attr(all(target_os = "macos", target_arch = "x86_64"), + link_name = "pselect$1050")] + #[cfg_attr(all(target_os = "macos", target_arch = "x86"), + link_name = "pselect$UNIX2003")] + #[cfg_attr(target_os = "netbsd", link_name = "__pselect50")] + pub fn pselect(nfds: ::c_int, + readfs: *mut fd_set, + writefds: *mut fd_set, + errorfds: *mut fd_set, + timeout: *const timespec, + sigmask: *const sigset_t) -> ::c_int; + pub fn fseeko(stream: *mut ::FILE, + offset: ::off_t, + whence: ::c_int) -> ::c_int; + pub fn ftello(stream: *mut ::FILE) -> ::off_t; + #[cfg_attr(target_os = "netbsd", link_name = "__timegm50")] + pub fn timegm(tm: *mut ::tm) -> time_t; + pub fn statvfs(path: *const c_char, buf: *mut statvfs) -> ::c_int; + pub fn fstatvfs(fd: ::c_int, buf: *mut statvfs) -> ::c_int; + #[cfg_attr(all(target_os = "macos", target_arch = "x86"), + link_name = "tcdrain$UNIX2003")] + pub fn tcdrain(fd: ::c_int) -> ::c_int; + pub fn cfgetispeed(termios: *const ::termios) -> ::speed_t; + pub fn cfgetospeed(termios: *const ::termios) -> ::speed_t; + pub fn cfsetispeed(termios: *mut ::termios, speed: ::speed_t) -> ::c_int; + pub fn cfsetospeed(termios: *mut ::termios, speed: ::speed_t) -> ::c_int; + pub fn tcgetattr(fd: ::c_int, termios: *mut ::termios) -> ::c_int; + pub fn tcsetattr(fd: ::c_int, + optional_actions: ::c_int, + termios: *const ::termios) -> ::c_int; + pub fn tcflow(fd: ::c_int, action: ::c_int) -> ::c_int; + pub fn tcflush(fd: ::c_int, action: ::c_int) -> ::c_int; + pub fn tcsendbreak(fd: ::c_int, duration: ::c_int) -> ::c_int; + pub fn mkstemp(template: *mut ::c_char) -> ::c_int; + pub fn mkstemps(template: *mut ::c_char, suffixlen: ::c_int) -> ::c_int; + pub fn mkdtemp(template: *mut ::c_char) -> *mut ::c_char; + pub fn futimes(fd: ::c_int, times: *const ::timeval) -> ::c_int; +} + +cfg_if! { + if #[cfg(any(target_os = "linux", + target_os = "android", + target_os = "emscripten"))] { + mod notbsd; + pub use self::notbsd::*; + } else if #[cfg(any(target_os = "macos", + target_os = "ios", + target_os = "freebsd", + target_os = "dragonfly", + target_os = "openbsd", + target_os = "netbsd", + target_os = "bitrig"))] { + mod bsd; + pub use self::bsd::*; + } else if #[cfg(target_os = "solaris")] { + mod solaris; + pub use self::solaris::*; + } else { + // ... + } +} diff --git a/deps/libc-0.2.8/src/unix/notbsd/android/b32.rs b/deps/libc-0.2.8/src/unix/notbsd/android/b32.rs new file mode 100644 index 000000000..267060d42 --- /dev/null +++ b/deps/libc-0.2.8/src/unix/notbsd/android/b32.rs @@ -0,0 +1,12 @@ +pub type mode_t = u16; + +s! { + pub struct sigaction { + pub sa_sigaction: ::sighandler_t, + pub sa_mask: ::sigset_t, + pub sa_flags: ::c_ulong, + pub sa_restorer: ::dox::Option, + } +} + +pub const SYS_gettid: ::c_long = 224; diff --git a/deps/libc-0.2.8/src/unix/notbsd/android/b64.rs b/deps/libc-0.2.8/src/unix/notbsd/android/b64.rs new file mode 100644 index 000000000..5cf4f9d0c --- /dev/null +++ b/deps/libc-0.2.8/src/unix/notbsd/android/b64.rs @@ -0,0 +1,12 @@ +pub type mode_t = u32; + +s! { + pub struct sigaction { + pub sa_flags: ::c_uint, + pub sa_sigaction: ::sighandler_t, + pub sa_mask: ::sigset_t, + _restorer: *mut ::c_void, + } +} + +pub const SYS_gettid: ::c_long = 178; diff --git a/deps/libc-0.2.8/src/unix/notbsd/android/mod.rs b/deps/libc-0.2.8/src/unix/notbsd/android/mod.rs new file mode 100644 index 000000000..f039683a7 --- /dev/null +++ b/deps/libc-0.2.8/src/unix/notbsd/android/mod.rs @@ -0,0 +1,662 @@ +//! Android-specific definitions for linux-like values + +pub type c_char = u8; +pub type c_long = i32; +pub type c_ulong = u32; +pub type clock_t = i32; +pub type time_t = i32; +pub type suseconds_t = i32; +pub type wchar_t = u32; +pub type off_t = i32; +pub type off64_t = i64; +pub type ino_t = u32; +pub type blkcnt_t = u32; +pub type blksize_t = u32; +pub type dev_t = u32; +pub type nlink_t = u32; +pub type useconds_t = u32; +pub type socklen_t = i32; +pub type pthread_t = c_long; +pub type pthread_mutexattr_t = ::c_long; +pub type sigset_t = c_ulong; +pub type time64_t = i64; +pub type fsfilcnt_t = ::c_ulong; +pub type fsblkcnt_t = ::c_ulong; +pub type nfds_t = ::c_uint; +pub type rlim_t = c_ulong; + +s! { + pub struct stat { + pub st_dev: ::c_ulonglong, + __pad0: [::c_uchar; 4], + __st_ino: ::ino_t, + pub st_mode: ::c_uint, + pub st_nlink: ::c_uint, + pub st_uid: ::uid_t, + pub st_gid: ::gid_t, + pub st_rdev: ::c_ulonglong, + __pad3: [::c_uchar; 4], + pub st_size: ::c_longlong, + pub st_blksize: blksize_t, + pub st_blocks: ::c_ulonglong, + pub st_atime: ::c_ulong, + pub st_atime_nsec: ::c_ulong, + pub st_mtime: ::c_ulong, + pub st_mtime_nsec: ::c_ulong, + pub st_ctime: ::c_ulong, + pub st_ctime_nsec: ::c_ulong, + pub st_ino: ::c_ulonglong, + } + + pub struct stat64 { + pub st_dev: ::c_ulonglong, + __pad0: [::c_uchar; 4], + __st_ino: ::ino_t, + pub st_mode: ::c_uint, + pub st_nlink: ::c_uint, + pub st_uid: ::uid_t, + pub st_gid: ::gid_t, + pub st_rdev: ::c_ulonglong, + __pad3: [::c_uchar; 4], + pub st_size: ::c_longlong, + pub st_blksize: blksize_t, + pub st_blocks: ::c_ulonglong, + pub st_atime: ::c_ulong, + pub st_atime_nsec: ::c_ulong, + pub st_mtime: ::c_ulong, + pub st_mtime_nsec: ::c_ulong, + pub st_ctime: ::c_ulong, + pub st_ctime_nsec: ::c_ulong, + pub st_ino: ::c_ulonglong, + } + + pub struct dirent { + pub d_ino: u64, + pub d_off: i64, + pub d_reclen: ::c_ushort, + pub d_type: ::c_uchar, + pub d_name: [::c_char; 256], + } + + pub struct dirent64 { + pub d_ino: u64, + pub d_off: i64, + pub d_reclen: ::c_ushort, + pub d_type: ::c_uchar, + pub d_name: [::c_char; 256], + } + + pub struct rlimit64 { + pub rlim_cur: u64, + pub rlim_max: u64, + } + + pub struct pthread_attr_t { + pub flags: ::uint32_t, + pub stack_base: *mut ::c_void, + pub stack_size: ::size_t, + pub guard_size: ::size_t, + pub sched_policy: ::int32_t, + pub sched_priority: ::int32_t, + } + + pub struct pthread_mutex_t { value: ::c_int } + + pub struct pthread_cond_t { value: ::c_int } + + pub struct pthread_rwlock_t { + lock: pthread_mutex_t, + cond: pthread_cond_t, + numLocks: ::c_int, + writerThreadId: ::c_int, + pendingReaders: ::c_int, + pendingWriters: ::c_int, + reserved: [*mut ::c_void; 4], + } + + pub struct passwd { + pub pw_name: *mut ::c_char, + pub pw_passwd: *mut ::c_char, + pub pw_uid: ::uid_t, + pub pw_gid: ::gid_t, + pub pw_dir: *mut ::c_char, + pub pw_shell: *mut ::c_char, + } + + pub struct stack_t { + pub ss_sp: *mut ::c_void, + pub ss_flags: ::c_int, + pub ss_size: ::size_t + } + + pub struct siginfo_t { + pub si_signo: ::c_int, + pub si_errno: ::c_int, + pub si_code: ::c_int, + pub _pad: [::c_int; 29], + } + + pub struct statfs { + pub f_type: ::uint32_t, + pub f_bsize: ::uint32_t, + pub f_blocks: ::uint64_t, + pub f_bfree: ::uint64_t, + pub f_bavail: ::uint64_t, + pub f_files: ::uint64_t, + pub f_ffree: ::uint64_t, + pub f_fsid: ::__fsid_t, + pub f_namelen: ::uint32_t, + pub f_frsize: ::uint32_t, + pub f_flags: ::uint32_t, + pub f_spare: [::uint32_t; 4], + } + + pub struct __fsid_t { + __val: [::c_int; 2], + } + + pub struct msghdr { + pub msg_name: *mut ::c_void, + pub msg_namelen: ::c_int, + pub msg_iov: *mut ::iovec, + pub msg_iovlen: ::size_t, + pub msg_control: *mut ::c_void, + pub msg_controllen: ::size_t, + pub msg_flags: ::c_int, + } + + pub struct termios { + pub c_iflag: ::tcflag_t, + pub c_oflag: ::tcflag_t, + pub c_cflag: ::tcflag_t, + pub c_lflag: ::tcflag_t, + pub c_line: ::cc_t, + pub c_cc: [::cc_t; ::NCCS], + } + + pub struct flock { + pub l_type: ::c_short, + pub l_whence: ::c_short, + pub l_start: ::off_t, + pub l_len: ::off_t, + pub l_pid: ::pid_t, + } +} + +pub const BUFSIZ: ::c_uint = 1024; +pub const FILENAME_MAX: ::c_uint = 1024; +pub const FOPEN_MAX: ::c_uint = 20; +pub const L_tmpnam: ::c_uint = 1024; +pub const TMP_MAX: ::c_uint = 308915776; +pub const _PC_NAME_MAX: ::c_int = 4; + +pub const FIONBIO: ::c_int = 0x5421; + +pub const _SC_ARG_MAX: ::c_int = 0; +pub const _SC_BC_BASE_MAX: ::c_int = 1; +pub const _SC_BC_DIM_MAX: ::c_int = 2; +pub const _SC_BC_SCALE_MAX: ::c_int = 3; +pub const _SC_BC_STRING_MAX: ::c_int = 4; +pub const _SC_CHILD_MAX: ::c_int = 5; +pub const _SC_CLK_TCK: ::c_int = 6; +pub const _SC_COLL_WEIGHTS_MAX: ::c_int = 7; +pub const _SC_EXPR_NEST_MAX: ::c_int = 8; +pub const _SC_LINE_MAX: ::c_int = 9; +pub const _SC_NGROUPS_MAX: ::c_int = 10; +pub const _SC_OPEN_MAX: ::c_int = 11; +pub const _SC_2_C_BIND: ::c_int = 13; +pub const _SC_2_C_DEV: ::c_int = 14; +pub const _SC_2_C_VERSION: ::c_int = 15; +pub const _SC_2_CHAR_TERM: ::c_int = 16; +pub const _SC_2_FORT_DEV: ::c_int = 17; +pub const _SC_2_FORT_RUN: ::c_int = 18; +pub const _SC_2_LOCALEDEF: ::c_int = 19; +pub const _SC_2_SW_DEV: ::c_int = 20; +pub const _SC_2_UPE: ::c_int = 21; +pub const _SC_2_VERSION: ::c_int = 22; +pub const _SC_JOB_CONTROL: ::c_int = 23; +pub const _SC_SAVED_IDS: ::c_int = 24; +pub const _SC_VERSION: ::c_int = 25; +pub const _SC_RE_DUP_MAX: ::c_int = 26; +pub const _SC_STREAM_MAX: ::c_int = 27; +pub const _SC_TZNAME_MAX: ::c_int = 28; +pub const _SC_XOPEN_CRYPT: ::c_int = 29; +pub const _SC_XOPEN_ENH_I18N: ::c_int = 30; +pub const _SC_XOPEN_SHM: ::c_int = 31; +pub const _SC_XOPEN_VERSION: ::c_int = 32; +pub const _SC_XOPEN_XCU_VERSION: ::c_int = 33; +pub const _SC_XOPEN_REALTIME: ::c_int = 34; +pub const _SC_XOPEN_REALTIME_THREADS: ::c_int = 35; +pub const _SC_XOPEN_LEGACY: ::c_int = 36; +pub const _SC_ATEXIT_MAX: ::c_int = 37; +pub const _SC_IOV_MAX: ::c_int = 38; +pub const _SC_PAGESIZE: ::c_int = 39; +pub const _SC_PAGE_SIZE: ::c_int = 40; +pub const _SC_XOPEN_UNIX: ::c_int = 41; +pub const _SC_MQ_PRIO_MAX: ::c_int = 51; +pub const _SC_GETGR_R_SIZE_MAX: ::c_int = 71; +pub const _SC_GETPW_R_SIZE_MAX: ::c_int = 72; +pub const _SC_LOGIN_NAME_MAX: ::c_int = 73; +pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: ::c_int = 74; +pub const _SC_THREAD_KEYS_MAX: ::c_int = 75; +pub const _SC_THREAD_STACK_MIN: ::c_int = 76; +pub const _SC_THREAD_THREADS_MAX: ::c_int = 77; +pub const _SC_TTY_NAME_MAX: ::c_int = 78; +pub const _SC_THREADS: ::c_int = 79; +pub const _SC_THREAD_ATTR_STACKADDR: ::c_int = 80; +pub const _SC_THREAD_ATTR_STACKSIZE: ::c_int = 81; +pub const _SC_THREAD_PRIORITY_SCHEDULING: ::c_int = 82; +pub const _SC_THREAD_PRIO_INHERIT: ::c_int = 83; +pub const _SC_THREAD_PRIO_PROTECT: ::c_int = 84; +pub const _SC_THREAD_SAFE_FUNCTIONS: ::c_int = 85; +pub const _SC_NPROCESSORS_ONLN: ::c_int = 97; + +pub const PTHREAD_STACK_MIN: ::size_t = 8192; +pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t { + value: 0, +}; +pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = pthread_cond_t { + value: 0, +}; +pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t { + lock: PTHREAD_MUTEX_INITIALIZER, + cond: PTHREAD_COND_INITIALIZER, + numLocks: 0, + writerThreadId: 0, + pendingReaders: 0, + pendingWriters: 0, + reserved: [0 as *mut _; 4], +}; +pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 1; + +pub const FIOCLEX: ::c_int = 0x5451; + +pub const SA_ONSTACK: ::c_ulong = 0x08000000; +pub const SA_SIGINFO: ::c_ulong = 0x00000004; +pub const SA_NOCLDWAIT: ::c_ulong = 0x00000002; + +pub const SIGCHLD: ::c_int = 17; +pub const SIGBUS: ::c_int = 7; +pub const SIGUSR1: ::c_int = 10; +pub const SIGUSR2: ::c_int = 12; +pub const SIGCONT: ::c_int = 18; +pub const SIGSTOP: ::c_int = 19; +pub const SIGTSTP: ::c_int = 20; +pub const SIGURG: ::c_int = 23; +pub const SIGIO: ::c_int = 29; +pub const SIGSYS: ::c_int = 31; +pub const SIGSTKFLT: ::c_int = 16; +pub const SIGUNUSED: ::c_int = 31; +pub const SIGTTIN: ::c_int = 21; +pub const SIGTTOU: ::c_int = 22; +pub const SIGXCPU: ::c_int = 24; +pub const SIGXFSZ: ::c_int = 25; +pub const SIGVTALRM: ::c_int = 26; +pub const SIGPROF: ::c_int = 27; +pub const SIGWINCH: ::c_int = 28; +pub const SIGPOLL: ::c_int = 29; +pub const SIGPWR: ::c_int = 30; +pub const SIG_SETMASK: ::c_int = 2; +pub const SIG_BLOCK: ::c_int = 0x000000; +pub const SIG_UNBLOCK: ::c_int = 0x01; + +pub const RUSAGE_CHILDREN: ::c_int = -1; + +pub const MAP_ANON: ::c_int = 0x0020; +pub const MAP_ANONYMOUS: ::c_int = 0x0020; +pub const MAP_GROWSDOWN: ::c_int = 0x0100; +pub const MAP_DENYWRITE: ::c_int = 0x0800; +pub const MAP_EXECUTABLE: ::c_int = 0x01000; +pub const MAP_LOCKED: ::c_int = 0x02000; +pub const MAP_NORESERVE: ::c_int = 0x04000; +pub const MAP_POPULATE: ::c_int = 0x08000; +pub const MAP_NONBLOCK: ::c_int = 0x010000; +pub const MAP_STACK: ::c_int = 0x020000; + +pub const EDEADLK: ::c_int = 35; +pub const ENAMETOOLONG: ::c_int = 36; +pub const ENOLCK: ::c_int = 37; +pub const ENOSYS: ::c_int = 38; +pub const ENOTEMPTY: ::c_int = 39; +pub const ELOOP: ::c_int = 40; +pub const ENOMSG: ::c_int = 42; +pub const EIDRM: ::c_int = 43; +pub const ECHRNG: ::c_int = 44; +pub const EL2NSYNC: ::c_int = 45; +pub const EL3HLT: ::c_int = 46; +pub const EL3RST: ::c_int = 47; +pub const ELNRNG: ::c_int = 48; +pub const EUNATCH: ::c_int = 49; +pub const ENOCSI: ::c_int = 50; +pub const EL2HLT: ::c_int = 51; +pub const EBADE: ::c_int = 52; +pub const EBADR: ::c_int = 53; +pub const EXFULL: ::c_int = 54; +pub const ENOANO: ::c_int = 55; +pub const EBADRQC: ::c_int = 56; +pub const EBADSLT: ::c_int = 57; + +pub const EMULTIHOP: ::c_int = 72; +pub const EBADMSG: ::c_int = 74; +pub const EOVERFLOW: ::c_int = 75; +pub const ENOTUNIQ: ::c_int = 76; +pub const EBADFD: ::c_int = 77; +pub const EREMCHG: ::c_int = 78; +pub const ELIBACC: ::c_int = 79; +pub const ELIBBAD: ::c_int = 80; +pub const ELIBSCN: ::c_int = 81; +pub const ELIBMAX: ::c_int = 82; +pub const ELIBEXEC: ::c_int = 83; +pub const EILSEQ: ::c_int = 84; +pub const ERESTART: ::c_int = 85; +pub const ESTRPIPE: ::c_int = 86; +pub const EUSERS: ::c_int = 87; +pub const ENOTSOCK: ::c_int = 88; +pub const EDESTADDRREQ: ::c_int = 89; +pub const EMSGSIZE: ::c_int = 90; +pub const EPROTOTYPE: ::c_int = 91; +pub const ENOPROTOOPT: ::c_int = 92; +pub const EPROTONOSUPPORT: ::c_int = 93; +pub const ESOCKTNOSUPPORT: ::c_int = 94; +pub const EOPNOTSUPP: ::c_int = 95; +pub const EPFNOSUPPORT: ::c_int = 96; +pub const EAFNOSUPPORT: ::c_int = 97; +pub const EADDRINUSE: ::c_int = 98; +pub const EADDRNOTAVAIL: ::c_int = 99; +pub const ENETDOWN: ::c_int = 100; +pub const ENETUNREACH: ::c_int = 101; +pub const ENETRESET: ::c_int = 102; +pub const ECONNABORTED: ::c_int = 103; +pub const ECONNRESET: ::c_int = 104; +pub const ENOBUFS: ::c_int = 105; +pub const EISCONN: ::c_int = 106; +pub const ENOTCONN: ::c_int = 107; +pub const ESHUTDOWN: ::c_int = 108; +pub const ETOOMANYREFS: ::c_int = 109; +pub const ETIMEDOUT: ::c_int = 110; +pub const ECONNREFUSED: ::c_int = 111; +pub const EHOSTDOWN: ::c_int = 112; +pub const EHOSTUNREACH: ::c_int = 113; +pub const EALREADY: ::c_int = 114; +pub const EINPROGRESS: ::c_int = 115; +pub const ESTALE: ::c_int = 116; +pub const EUCLEAN: ::c_int = 117; +pub const ENOTNAM: ::c_int = 118; +pub const ENAVAIL: ::c_int = 119; +pub const EISNAM: ::c_int = 120; +pub const EREMOTEIO: ::c_int = 121; +pub const EDQUOT: ::c_int = 122; +pub const ENOMEDIUM: ::c_int = 123; +pub const EMEDIUMTYPE: ::c_int = 124; +pub const ECANCELED: ::c_int = 125; +pub const ENOKEY: ::c_int = 126; +pub const EKEYEXPIRED: ::c_int = 127; +pub const EKEYREVOKED: ::c_int = 128; +pub const EKEYREJECTED: ::c_int = 129; +pub const EOWNERDEAD: ::c_int = 130; +pub const ENOTRECOVERABLE: ::c_int = 131; + +pub const SOCK_STREAM: ::c_int = 1; +pub const SOCK_DGRAM: ::c_int = 2; + +pub const SOL_SOCKET: ::c_int = 1; + +pub const SO_REUSEADDR: ::c_int = 2; +pub const SO_TYPE: ::c_int = 3; +pub const SO_ERROR: ::c_int = 4; +pub const SO_DONTROUTE: ::c_int = 5; +pub const SO_BROADCAST: ::c_int = 6; +pub const SO_SNDBUF: ::c_int = 7; +pub const SO_RCVBUF: ::c_int = 8; +pub const SO_KEEPALIVE: ::c_int = 9; +pub const SO_OOBINLINE: ::c_int = 10; +pub const SO_LINGER: ::c_int = 13; +pub const SO_REUSEPORT: ::c_int = 15; +pub const SO_RCVLOWAT: ::c_int = 18; +pub const SO_SNDLOWAT: ::c_int = 19; +pub const SO_RCVTIMEO: ::c_int = 20; +pub const SO_SNDTIMEO: ::c_int = 21; +pub const SO_ACCEPTCONN: ::c_int = 30; + +pub const O_ACCMODE: ::c_int = 3; +pub const O_APPEND: ::c_int = 1024; +pub const O_CREAT: ::c_int = 64; +pub const O_EXCL: ::c_int = 128; +pub const O_NOCTTY: ::c_int = 256; +pub const O_NONBLOCK: ::c_int = 2048; +pub const O_SYNC: ::c_int = 0x101000; +pub const O_DIRECT: ::c_int = 0x10000; +pub const O_DIRECTORY: ::c_int = 0x4000; +pub const O_NOFOLLOW: ::c_int = 0x8000; +pub const O_ASYNC: ::c_int = 0x2000; +pub const O_NDELAY: ::c_int = 0x800; + +pub const NI_MAXHOST: ::size_t = 1025; + +pub const NCCS: usize = 19; +pub const TCSBRKP: ::c_int = 0x5425; +pub const TCSANOW: ::c_int = 0; +pub const TCSADRAIN: ::c_int = 0x1; +pub const TCSAFLUSH: ::c_int = 0x2; +pub const IUTF8: ::tcflag_t = 0x00004000; +pub const VEOF: usize = 4; +pub const VEOL: usize = 11; +pub const VEOL2: usize = 16; +pub const VMIN: usize = 6; +pub const IEXTEN: ::tcflag_t = 0x00008000; +pub const TOSTOP: ::tcflag_t = 0x00000100; +pub const FLUSHO: ::tcflag_t = 0x00001000; + +pub const ADFS_SUPER_MAGIC: ::c_long = 0x0000adf5; +pub const AFFS_SUPER_MAGIC: ::c_long = 0x0000adff; +pub const CODA_SUPER_MAGIC: ::c_long = 0x73757245; +pub const CRAMFS_MAGIC: ::c_long = 0x28cd3d45; +pub const EFS_SUPER_MAGIC: ::c_long = 0x00414a53; +pub const EXT2_SUPER_MAGIC: ::c_long = 0x0000ef53; +pub const EXT3_SUPER_MAGIC: ::c_long = 0x0000ef53; +pub const EXT4_SUPER_MAGIC: ::c_long = 0x0000ef53; +pub const HPFS_SUPER_MAGIC: ::c_long = 0xf995e849; +pub const HUGETLBFS_MAGIC: ::c_long = 0x958458f6; +pub const ISOFS_SUPER_MAGIC: ::c_long = 0x00009660; +pub const JFFS2_SUPER_MAGIC: ::c_long = 0x000072b6; +pub const MINIX_SUPER_MAGIC: ::c_long = 0x0000137f; +pub const MINIX_SUPER_MAGIC2: ::c_long = 0x0000138f; +pub const MINIX2_SUPER_MAGIC: ::c_long = 0x00002468; +pub const MINIX2_SUPER_MAGIC2: ::c_long = 0x00002478; +pub const MSDOS_SUPER_MAGIC: ::c_long = 0x00004d44; +pub const NCP_SUPER_MAGIC: ::c_long = 0x0000564c; +pub const NFS_SUPER_MAGIC: ::c_long = 0x00006969; +pub const OPENPROM_SUPER_MAGIC: ::c_long = 0x00009fa1; +pub const PROC_SUPER_MAGIC: ::c_long = 0x00009fa0; +pub const QNX4_SUPER_MAGIC: ::c_long = 0x0000002f; +pub const REISERFS_SUPER_MAGIC: ::c_long = 0x52654973; +pub const SMB_SUPER_MAGIC: ::c_long = 0x0000517b; +pub const TMPFS_MAGIC: ::c_long = 0x01021994; +pub const USBDEVICE_SUPER_MAGIC: ::c_long = 0x00009fa2; + +pub const MADV_HUGEPAGE: ::c_int = 14; +pub const MADV_NOHUGEPAGE: ::c_int = 15; +pub const MAP_HUGETLB: ::c_int = 0x040000; + +pub const PTRACE_TRACEME: ::c_int = 0; +pub const PTRACE_PEEKTEXT: ::c_int = 1; +pub const PTRACE_PEEKDATA: ::c_int = 2; +pub const PTRACE_PEEKUSER: ::c_int = 3; +pub const PTRACE_POKETEXT: ::c_int = 4; +pub const PTRACE_POKEDATA: ::c_int = 5; +pub const PTRACE_POKEUSER: ::c_int = 6; +pub const PTRACE_CONT: ::c_int = 7; +pub const PTRACE_KILL: ::c_int = 8; +pub const PTRACE_SINGLESTEP: ::c_int = 9; +pub const PTRACE_ATTACH: ::c_int = 16; +pub const PTRACE_DETACH: ::c_int = 17; +pub const PTRACE_SYSCALL: ::c_int = 24; +pub const PTRACE_SETOPTIONS: ::c_int = 0x4200; +pub const PTRACE_GETEVENTMSG: ::c_int = 0x4201; +pub const PTRACE_GETSIGINFO: ::c_int = 0x4202; +pub const PTRACE_SETSIGINFO: ::c_int = 0x4203; +pub const PTRACE_GETFPREGS: ::c_int = 14; +pub const PTRACE_SETFPREGS: ::c_int = 15; +pub const PTRACE_GETREGS: ::c_int = 12; +pub const PTRACE_SETREGS: ::c_int = 13; + +pub const EFD_NONBLOCK: ::c_int = 0x800; + +pub const F_GETLK: ::c_int = 5; +pub const F_GETOWN: ::c_int = 9; +pub const F_SETOWN: ::c_int = 8; +pub const F_SETLK: ::c_int = 6; +pub const F_SETLKW: ::c_int = 7; + +pub const TCGETS: ::c_int = 0x5401; +pub const TCSETS: ::c_int = 0x5402; +pub const TCSETSW: ::c_int = 0x5403; +pub const TCSETSF: ::c_int = 0x5404; +pub const TCGETA: ::c_int = 0x5405; +pub const TCSETA: ::c_int = 0x5406; +pub const TCSETAW: ::c_int = 0x5407; +pub const TCSETAF: ::c_int = 0x5408; +pub const TCSBRK: ::c_int = 0x5409; +pub const TCXONC: ::c_int = 0x540A; +pub const TCFLSH: ::c_int = 0x540B; +pub const TIOCGSOFTCAR: ::c_int = 0x5419; +pub const TIOCSSOFTCAR: ::c_int = 0x541A; +pub const TIOCINQ: ::c_int = 0x541B; +pub const TIOCLINUX: ::c_int = 0x541C; +pub const TIOCGSERIAL: ::c_int = 0x541E; +pub const TIOCEXCL: ::c_int = 0x540C; +pub const TIOCNXCL: ::c_int = 0x540D; +pub const TIOCSCTTY: ::c_int = 0x540E; +pub const TIOCGPGRP: ::c_int = 0x540F; +pub const TIOCSPGRP: ::c_int = 0x5410; +pub const TIOCOUTQ: ::c_int = 0x5411; +pub const TIOCSTI: ::c_int = 0x5412; +pub const TIOCGWINSZ: ::c_int = 0x5413; +pub const TIOCSWINSZ: ::c_int = 0x5414; +pub const TIOCMGET: ::c_int = 0x5415; +pub const TIOCMBIS: ::c_int = 0x5416; +pub const TIOCMBIC: ::c_int = 0x5417; +pub const TIOCMSET: ::c_int = 0x5418; +pub const FIONREAD: ::c_int = 0x541B; +pub const TIOCCONS: ::c_int = 0x541D; + +pub const RTLD_GLOBAL: ::c_int = 0x2; +pub const RTLD_NOLOAD: ::c_int = 0x4; +pub const RTLD_NOW: ::c_int = 0; + +f! { + pub fn sigemptyset(set: *mut sigset_t) -> ::c_int { + *set = 0; + return 0 + } + pub fn sigaddset(set: *mut sigset_t, signum: ::c_int) -> ::c_int { + *set |= signum as sigset_t; + return 0 + } + pub fn sigfillset(set: *mut sigset_t) -> ::c_int { + *set = !0; + return 0 + } + pub fn sigdelset(set: *mut sigset_t, signum: ::c_int) -> ::c_int { + *set &= !(signum as sigset_t); + return 0 + } + pub fn sigismember(set: *const sigset_t, signum: ::c_int) -> ::c_int { + (*set & (signum as sigset_t)) as ::c_int + } + pub fn cfgetispeed(termios: *const ::termios) -> ::speed_t { + (*termios).c_cflag & ::CBAUD + } + pub fn cfgetospeed(termios: *const ::termios) -> ::speed_t { + (*termios).c_cflag & ::CBAUD + } + pub fn cfsetispeed(termios: *mut ::termios, speed: ::speed_t) -> ::c_int { + let cbaud = ::CBAUD; + (*termios).c_cflag = ((*termios).c_cflag & !cbaud) | (speed & cbaud); + return 0 + } + pub fn cfsetospeed(termios: *mut ::termios, speed: ::speed_t) -> ::c_int { + let cbaud = ::CBAUD; + (*termios).c_cflag = ((*termios).c_cflag & !cbaud) | (speed & cbaud); + return 0 + } + pub fn tcgetattr(fd: ::c_int, termios: *mut ::termios) -> ::c_int { + ioctl(fd, ::TCGETS, termios) + } + pub fn tcsetattr(fd: ::c_int, + optional_actions: ::c_int, + termios: *const ::termios) -> ::c_int { + ioctl(fd, optional_actions, termios) + } + pub fn tcflow(fd: ::c_int, action: ::c_int) -> ::c_int { + ioctl(fd, ::TCXONC, action as *mut ::c_void) + } + pub fn tcflush(fd: ::c_int, action: ::c_int) -> ::c_int { + ioctl(fd, ::TCFLSH, action as *mut ::c_void) + } + pub fn tcsendbreak(fd: ::c_int, duration: ::c_int) -> ::c_int { + ioctl(fd, TCSBRKP, duration as *mut ::c_void) + } +} + +extern { + pub fn madvise(addr: *const ::c_void, len: ::size_t, advice: ::c_int) + -> ::c_int; + pub fn ioctl(fd: ::c_int, request: ::c_int, ...) -> ::c_int; + pub fn readlink(path: *const ::c_char, + buf: *mut ::c_char, + bufsz: ::size_t) + -> ::c_int; + pub fn msync(addr: *const ::c_void, len: ::size_t, + flags: ::c_int) -> ::c_int; + pub fn mprotect(addr: *const ::c_void, len: ::size_t, prot: ::c_int) + -> ::c_int; + pub fn sysconf(name: ::c_int) -> ::c_long; + pub fn recvfrom(socket: ::c_int, buf: *mut ::c_void, len: ::size_t, + flags: ::c_int, addr: *const ::sockaddr, + addrlen: *mut ::socklen_t) -> ::ssize_t; + pub fn getnameinfo(sa: *const ::sockaddr, + salen: ::socklen_t, + host: *mut ::c_char, + hostlen: ::size_t, + serv: *mut ::c_char, + sevlen: ::size_t, + flags: ::c_int) -> ::c_int; + pub fn timegm64(tm: *const ::tm) -> time64_t; + pub fn eventfd(init: ::c_uint, flags: ::c_int) -> ::c_int; + pub fn ptrace(request: ::c_int, ...) -> ::c_long; + pub fn fstat64(fildes: ::c_int, buf: *mut stat64) -> ::c_int; + pub fn stat64(path: *const c_char, buf: *mut stat64) -> ::c_int; + pub fn open64(path: *const c_char, oflag: ::c_int, ...) -> ::c_int; + pub fn creat64(path: *const c_char, mode: mode_t) -> ::c_int; + pub fn lseek64(fd: ::c_int, offset: off64_t, whence: ::c_int) -> off64_t; + pub fn pread64(fd: ::c_int, buf: *mut ::c_void, count: ::size_t, + offset: off64_t) -> ::ssize_t; + pub fn pwrite64(fd: ::c_int, buf: *const ::c_void, count: ::size_t, + offset: off64_t) -> ::ssize_t; + pub fn mmap64(addr: *mut ::c_void, + len: ::size_t, + prot: ::c_int, + flags: ::c_int, + fd: ::c_int, + offset: off64_t) + -> *mut ::c_void; + pub fn lstat64(path: *const c_char, buf: *mut stat64) -> ::c_int; + pub fn ftruncate64(fd: ::c_int, length: off64_t) -> ::c_int; + pub fn readdir64_r(dirp: *mut ::DIR, entry: *mut ::dirent64, + result: *mut *mut ::dirent64) -> ::c_int; + pub fn getrlimit64(resource: ::c_int, rlim: *mut rlimit64) -> ::c_int; + pub fn setrlimit64(resource: ::c_int, rlim: *const rlimit64) -> ::c_int; +} + +cfg_if! { + if #[cfg(target_pointer_width = "32")] { + mod b32; + pub use self::b32::*; + } else if #[cfg(target_pointer_width = "64")] { + mod b64; + pub use self::b64::*; + } else { + // ... + } +} diff --git a/deps/libc-0.2.8/src/unix/notbsd/linux/mips.rs b/deps/libc-0.2.8/src/unix/notbsd/linux/mips.rs new file mode 100644 index 000000000..1e8603da8 --- /dev/null +++ b/deps/libc-0.2.8/src/unix/notbsd/linux/mips.rs @@ -0,0 +1,513 @@ +pub type c_char = i8; +pub type c_long = i32; +pub type c_ulong = u32; +pub type clock_t = i32; +pub type time_t = i32; +pub type suseconds_t = i32; +pub type wchar_t = i32; +pub type off_t = i32; +pub type ino_t = u32; +pub type blkcnt_t = i32; +pub type blksize_t = i32; +pub type nlink_t = u32; +pub type fsblkcnt_t = ::c_ulong; +pub type fsfilcnt_t = ::c_ulong; +pub type rlim_t = c_ulong; + +s! { + pub struct stat { + pub st_dev: ::c_ulong, + st_pad1: [::c_long; 3], + pub st_ino: ::ino_t, + pub st_mode: ::mode_t, + pub st_nlink: ::nlink_t, + pub st_uid: ::uid_t, + pub st_gid: ::gid_t, + pub st_rdev: ::c_ulong, + pub st_pad2: [::c_long; 2], + pub st_size: ::off_t, + st_pad3: ::c_long, + pub st_atime: ::time_t, + pub st_atime_nsec: ::c_long, + pub st_mtime: ::time_t, + pub st_mtime_nsec: ::c_long, + pub st_ctime: ::time_t, + pub st_ctime_nsec: ::c_long, + pub st_blksize: ::blksize_t, + pub st_blocks: ::blkcnt_t, + st_pad5: [::c_long; 14], + } + + pub struct stat64 { + pub st_dev: ::c_ulong, + st_pad1: [::c_long; 3], + pub st_ino: ::ino64_t, + pub st_mode: ::mode_t, + pub st_nlink: ::nlink_t, + pub st_uid: ::uid_t, + pub st_gid: ::gid_t, + pub st_rdev: ::c_ulong, + st_pad2: [::c_long; 2], + pub st_size: ::off64_t, + pub st_atime: ::time_t, + pub st_atime_nsec: ::c_long, + pub st_mtime: ::time_t, + pub st_mtime_nsec: ::c_long, + pub st_ctime: ::time_t, + pub st_ctime_nsec: ::c_long, + pub st_blksize: ::blksize_t, + st_pad3: ::c_long, + pub st_blocks: ::blkcnt64_t, + st_pad5: [::c_long; 14], + } + + pub struct pthread_attr_t { + __size: [u32; 9] + } + + pub struct sigaction { + pub sa_flags: ::c_int, + pub sa_sigaction: ::sighandler_t, + pub sa_mask: sigset_t, + _restorer: *mut ::c_void, + _resv: [::c_int; 1], + } + + pub struct stack_t { + pub ss_sp: *mut ::c_void, + pub ss_size: ::size_t, + pub ss_flags: ::c_int, + } + + pub struct sigset_t { + __val: [::c_ulong; 32], + } + + pub struct siginfo_t { + pub si_signo: ::c_int, + pub si_code: ::c_int, + pub si_errno: ::c_int, + pub _pad: [::c_int; 29], + } + + pub struct glob64_t { + pub gl_pathc: ::size_t, + pub gl_pathv: *mut *mut ::c_char, + pub gl_offs: ::size_t, + pub gl_flags: ::c_int, + + __unused1: *mut ::c_void, + __unused2: *mut ::c_void, + __unused3: *mut ::c_void, + __unused4: *mut ::c_void, + __unused5: *mut ::c_void, + } + + pub struct ipc_perm { + pub __key: ::key_t, + pub uid: ::uid_t, + pub gid: ::gid_t, + pub cuid: ::uid_t, + pub cgid: ::gid_t, + pub mode: ::c_uint, + pub __seq: ::c_ushort, + __pad1: ::c_ushort, + __unused1: ::c_ulong, + __unused2: ::c_ulong + } + + pub struct shmid_ds { + pub shm_perm: ::ipc_perm, + pub shm_segsz: ::size_t, + pub shm_atime: ::time_t, + pub shm_dtime: ::time_t, + pub shm_ctime: ::time_t, + pub shm_cpid: ::pid_t, + pub shm_lpid: ::pid_t, + pub shm_nattch: ::shmatt_t, + __unused4: ::c_ulong, + __unused5: ::c_ulong + } + + pub struct statfs { + pub f_type: ::c_long, + pub f_bsize: ::c_long, + pub f_frsize: ::c_long, + pub f_blocks: ::fsblkcnt_t, + pub f_bfree: ::fsblkcnt_t, + pub f_files: ::fsblkcnt_t, + pub f_ffree: ::fsblkcnt_t, + pub f_bavail: ::fsblkcnt_t, + pub f_fsid: ::fsid_t, + + pub f_namelen: ::c_long, + f_spare: [::c_long; 6], + } + + pub struct msghdr { + pub msg_name: *mut ::c_void, + pub msg_namelen: ::socklen_t, + pub msg_iov: *mut ::iovec, + pub msg_iovlen: ::size_t, + pub msg_control: *mut ::c_void, + pub msg_controllen: ::size_t, + pub msg_flags: ::c_int, + } + + pub struct termios { + pub c_iflag: ::tcflag_t, + pub c_oflag: ::tcflag_t, + pub c_cflag: ::tcflag_t, + pub c_lflag: ::tcflag_t, + pub c_line: ::cc_t, + pub c_cc: [::cc_t; ::NCCS], + } + + pub struct flock { + pub l_type: ::c_short, + pub l_whence: ::c_short, + pub l_start: ::off_t, + pub l_len: ::off_t, + pub l_sysid: ::c_long, + pub l_pid: ::pid_t, + pad: [::c_long; 4], + } +} + +pub const BUFSIZ: ::c_uint = 8192; +pub const TMP_MAX: ::c_uint = 238328; +pub const FOPEN_MAX: ::c_uint = 16; +pub const POSIX_MADV_DONTNEED: ::c_int = 4; +pub const _SC_2_C_VERSION: ::c_int = 96; +pub const RUSAGE_THREAD: ::c_int = 1; +pub const O_ACCMODE: ::c_int = 3; +pub const O_DIRECT: ::c_int = 0x8000; +pub const O_DIRECTORY: ::c_int = 0x10000; +pub const O_NOFOLLOW: ::c_int = 0x20000; +pub const RUSAGE_CHILDREN: ::c_int = -1; +pub const ST_RELATIME: ::c_ulong = 4096; +pub const NI_MAXHOST: ::socklen_t = 1025; + +pub const RLIMIT_NOFILE: ::c_int = 5; +pub const RLIMIT_AS: ::c_int = 6; +pub const RLIMIT_RSS: ::c_int = 7; +pub const RLIMIT_NPROC: ::c_int = 8; +pub const RLIMIT_MEMLOCK: ::c_int = 9; +pub const RLIMIT_NLIMITS: ::c_int = 16; +pub const RLIM_INFINITY: ::rlim_t = 0x7fffffff; + +pub const O_APPEND: ::c_int = 8; +pub const O_CREAT: ::c_int = 256; +pub const O_EXCL: ::c_int = 1024; +pub const O_NOCTTY: ::c_int = 2048; +pub const O_NONBLOCK: ::c_int = 128; +pub const O_SYNC: ::c_int = 0x4010; +pub const O_RSYNC: ::c_int = 0x4010; +pub const O_DSYNC: ::c_int = 0x10; +pub const O_FSYNC: ::c_int = 0x4010; +pub const O_ASYNC: ::c_int = 0x1000; +pub const O_NDELAY: ::c_int = 0x80; + +pub const SOCK_NONBLOCK: ::c_int = 128; + +pub const EDEADLK: ::c_int = 45; +pub const ENAMETOOLONG: ::c_int = 78; +pub const ENOLCK: ::c_int = 46; +pub const ENOSYS: ::c_int = 89; +pub const ENOTEMPTY: ::c_int = 93; +pub const ELOOP: ::c_int = 90; +pub const ENOMSG: ::c_int = 35; +pub const EIDRM: ::c_int = 36; +pub const ECHRNG: ::c_int = 37; +pub const EL2NSYNC: ::c_int = 38; +pub const EL3HLT: ::c_int = 39; +pub const EL3RST: ::c_int = 40; +pub const ELNRNG: ::c_int = 41; +pub const EUNATCH: ::c_int = 42; +pub const ENOCSI: ::c_int = 43; +pub const EL2HLT: ::c_int = 44; +pub const EBADE: ::c_int = 50; +pub const EBADR: ::c_int = 51; +pub const EXFULL: ::c_int = 52; +pub const ENOANO: ::c_int = 53; +pub const EBADRQC: ::c_int = 54; +pub const EBADSLT: ::c_int = 55; +pub const EDEADLOCK: ::c_int = 56; +pub const EMULTIHOP: ::c_int = 74; +pub const EOVERFLOW: ::c_int = 79; +pub const ENOTUNIQ: ::c_int = 80; +pub const EBADFD: ::c_int = 81; +pub const EBADMSG: ::c_int = 77; +pub const EREMCHG: ::c_int = 82; +pub const ELIBACC: ::c_int = 83; +pub const ELIBBAD: ::c_int = 84; +pub const ELIBSCN: ::c_int = 85; +pub const ELIBMAX: ::c_int = 86; +pub const ELIBEXEC: ::c_int = 87; +pub const EILSEQ: ::c_int = 88; +pub const ERESTART: ::c_int = 91; +pub const ESTRPIPE: ::c_int = 92; +pub const EUSERS: ::c_int = 94; +pub const ENOTSOCK: ::c_int = 95; +pub const EDESTADDRREQ: ::c_int = 96; +pub const EMSGSIZE: ::c_int = 97; +pub const EPROTOTYPE: ::c_int = 98; +pub const ENOPROTOOPT: ::c_int = 99; +pub const EPROTONOSUPPORT: ::c_int = 120; +pub const ESOCKTNOSUPPORT: ::c_int = 121; +pub const EOPNOTSUPP: ::c_int = 122; +pub const EPFNOSUPPORT: ::c_int = 123; +pub const EAFNOSUPPORT: ::c_int = 124; +pub const EADDRINUSE: ::c_int = 125; +pub const EADDRNOTAVAIL: ::c_int = 126; +pub const ENETDOWN: ::c_int = 127; +pub const ENETUNREACH: ::c_int = 128; +pub const ENETRESET: ::c_int = 129; +pub const ECONNABORTED: ::c_int = 130; +pub const ECONNRESET: ::c_int = 131; +pub const ENOBUFS: ::c_int = 132; +pub const EISCONN: ::c_int = 133; +pub const ENOTCONN: ::c_int = 134; +pub const ESHUTDOWN: ::c_int = 143; +pub const ETOOMANYREFS: ::c_int = 144; +pub const ETIMEDOUT: ::c_int = 145; +pub const ECONNREFUSED: ::c_int = 146; +pub const EHOSTDOWN: ::c_int = 147; +pub const EHOSTUNREACH: ::c_int = 148; +pub const EALREADY: ::c_int = 149; +pub const EINPROGRESS: ::c_int = 150; +pub const ESTALE: ::c_int = 151; +pub const EUCLEAN: ::c_int = 135; +pub const ENOTNAM: ::c_int = 137; +pub const ENAVAIL: ::c_int = 138; +pub const EISNAM: ::c_int = 139; +pub const EREMOTEIO: ::c_int = 140; +pub const EDQUOT: ::c_int = 1133; +pub const ENOMEDIUM: ::c_int = 159; +pub const EMEDIUMTYPE: ::c_int = 160; +pub const ECANCELED: ::c_int = 158; +pub const ENOKEY: ::c_int = 161; +pub const EKEYEXPIRED: ::c_int = 162; +pub const EKEYREVOKED: ::c_int = 163; +pub const EKEYREJECTED: ::c_int = 164; +pub const EOWNERDEAD: ::c_int = 165; +pub const ENOTRECOVERABLE: ::c_int = 166; +pub const ERFKILL: ::c_int = 167; + +pub const MAP_NORESERVE: ::c_int = 0x400; +pub const MAP_ANON: ::c_int = 0x800; +pub const MAP_ANONYMOUS: ::c_int = 0x800; +pub const MAP_GROWSDOWN: ::c_int = 0x1000; +pub const MAP_DENYWRITE: ::c_int = 0x2000; +pub const MAP_EXECUTABLE: ::c_int = 0x4000; +pub const MAP_LOCKED: ::c_int = 0x8000; +pub const MAP_POPULATE: ::c_int = 0x10000; +pub const MAP_NONBLOCK: ::c_int = 0x20000; +pub const MAP_STACK: ::c_int = 0x40000; + +pub const SOCK_STREAM: ::c_int = 2; +pub const SOCK_DGRAM: ::c_int = 1; + +pub const SOL_SOCKET: ::c_int = 0xffff; + +pub const SO_REUSEADDR: ::c_int = 4; +pub const SO_TYPE: ::c_int = 4104; +pub const SO_ERROR: ::c_int = 4103; +pub const SO_DONTROUTE: ::c_int = 16; +pub const SO_BROADCAST: ::c_int = 32; +pub const SO_SNDBUF: ::c_int = 4097; +pub const SO_RCVBUF: ::c_int = 4098; +pub const SO_KEEPALIVE: ::c_int = 8; +pub const SO_OOBINLINE: ::c_int = 256; +pub const SO_LINGER: ::c_int = 128; +pub const SO_RCVLOWAT: ::c_int = 4100; +pub const SO_SNDLOWAT: ::c_int = 4099; +pub const SO_RCVTIMEO: ::c_int = 4102; +pub const SO_SNDTIMEO: ::c_int = 4101; +pub const SO_ACCEPTCONN: ::c_int = 4105; + +pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 24; +pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 32; +pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4; + +pub const FIOCLEX: ::c_ulong = 0x6601; +pub const FIONBIO: ::c_ulong = 0x667e; + +pub const SA_ONSTACK: ::c_int = 0x08000000; +pub const SA_SIGINFO: ::c_int = 0x00000008; +pub const SA_NOCLDWAIT: ::c_int = 0x00010000; + +pub const SIGCHLD: ::c_int = 18; +pub const SIGBUS: ::c_int = 10; +pub const SIGTTIN: ::c_int = 26; +pub const SIGTTOU: ::c_int = 27; +pub const SIGXCPU: ::c_int = 30; +pub const SIGXFSZ: ::c_int = 31; +pub const SIGVTALRM: ::c_int = 28; +pub const SIGPROF: ::c_int = 29; +pub const SIGWINCH: ::c_int = 20; +pub const SIGUSR1: ::c_int = 16; +pub const SIGUSR2: ::c_int = 17; +pub const SIGCONT: ::c_int = 25; +pub const SIGSTOP: ::c_int = 23; +pub const SIGTSTP: ::c_int = 24; +pub const SIGURG: ::c_int = 21; +pub const SIGIO: ::c_int = 22; +pub const SIGSYS: ::c_int = 12; +pub const SIGPOLL: ::c_int = 22; +pub const SIGPWR: ::c_int = 19; +pub const SIG_SETMASK: ::c_int = 3; +pub const SIG_BLOCK: ::c_int = 0x1; +pub const SIG_UNBLOCK: ::c_int = 0x2; + +pub const PTHREAD_STACK_MIN: ::size_t = 131072; + +pub const ADFS_SUPER_MAGIC: ::c_long = 0x0000adf5; +pub const AFFS_SUPER_MAGIC: ::c_long = 0x0000adff; +pub const CODA_SUPER_MAGIC: ::c_long = 0x73757245; +pub const CRAMFS_MAGIC: ::c_long = 0x28cd3d45; +pub const EFS_SUPER_MAGIC: ::c_long = 0x00414a53; +pub const EXT2_SUPER_MAGIC: ::c_long = 0x0000ef53; +pub const EXT3_SUPER_MAGIC: ::c_long = 0x0000ef53; +pub const EXT4_SUPER_MAGIC: ::c_long = 0x0000ef53; +pub const HPFS_SUPER_MAGIC: ::c_long = 0xf995e849; +pub const HUGETLBFS_MAGIC: ::c_long = 0x958458f6; +pub const ISOFS_SUPER_MAGIC: ::c_long = 0x00009660; +pub const JFFS2_SUPER_MAGIC: ::c_long = 0x000072b6; +pub const MINIX_SUPER_MAGIC: ::c_long = 0x0000137f; +pub const MINIX_SUPER_MAGIC2: ::c_long = 0x0000138f; +pub const MINIX2_SUPER_MAGIC: ::c_long = 0x00002468; +pub const MINIX2_SUPER_MAGIC2: ::c_long = 0x00002478; +pub const MSDOS_SUPER_MAGIC: ::c_long = 0x00004d44; +pub const NCP_SUPER_MAGIC: ::c_long = 0x0000564c; +pub const NFS_SUPER_MAGIC: ::c_long = 0x00006969; +pub const OPENPROM_SUPER_MAGIC: ::c_long = 0x00009fa1; +pub const PROC_SUPER_MAGIC: ::c_long = 0x00009fa0; +pub const QNX4_SUPER_MAGIC: ::c_long = 0x0000002f; +pub const REISERFS_SUPER_MAGIC: ::c_long = 0x52654973; +pub const SMB_SUPER_MAGIC: ::c_long = 0x0000517b; +pub const TMPFS_MAGIC: ::c_long = 0x01021994; +pub const USBDEVICE_SUPER_MAGIC: ::c_long = 0x00009fa2; + +pub const VEOF: usize = 16; +pub const VEOL: usize = 17; +pub const VEOL2: usize = 6; +pub const VMIN: usize = 4; +pub const IEXTEN: ::tcflag_t = 0x00000100; +pub const TOSTOP: ::tcflag_t = 0x00008000; +pub const FLUSHO: ::tcflag_t = 0x00002000; +pub const IUTF8: ::tcflag_t = 0x00004000; +pub const TCSANOW: ::c_int = 0x540e; +pub const TCSADRAIN: ::c_int = 0x540f; +pub const TCSAFLUSH: ::c_int = 0x5410; + +pub const CPU_SETSIZE: ::c_int = 0x400; + +pub const PTRACE_TRACEME: ::c_uint = 0; +pub const PTRACE_PEEKTEXT: ::c_uint = 1; +pub const PTRACE_PEEKDATA: ::c_uint = 2; +pub const PTRACE_PEEKUSER: ::c_uint = 3; +pub const PTRACE_POKETEXT: ::c_uint = 4; +pub const PTRACE_POKEDATA: ::c_uint = 5; +pub const PTRACE_POKEUSER: ::c_uint = 6; +pub const PTRACE_CONT: ::c_uint = 7; +pub const PTRACE_KILL: ::c_uint = 8; +pub const PTRACE_SINGLESTEP: ::c_uint = 9; +pub const PTRACE_ATTACH: ::c_uint = 16; +pub const PTRACE_DETACH: ::c_uint = 17; +pub const PTRACE_SYSCALL: ::c_uint = 24; +pub const PTRACE_SETOPTIONS: ::c_uint = 0x4200; +pub const PTRACE_GETEVENTMSG: ::c_uint = 0x4201; +pub const PTRACE_GETSIGINFO: ::c_uint = 0x4202; +pub const PTRACE_SETSIGINFO: ::c_uint = 0x4203; +pub const PTRACE_GETFPREGS: ::c_uint = 14; +pub const PTRACE_SETFPREGS: ::c_uint = 15; +pub const PTRACE_GETFPXREGS: ::c_uint = 18; +pub const PTRACE_SETFPXREGS: ::c_uint = 19; +pub const PTRACE_GETREGS: ::c_uint = 12; +pub const PTRACE_SETREGS: ::c_uint = 13; + +pub const MAP_HUGETLB: ::c_int = 0x080000; + +pub const EFD_NONBLOCK: ::c_int = 0x80; + +pub const F_GETLK: ::c_int = 14; +pub const F_GETOWN: ::c_int = 23; +pub const F_SETOWN: ::c_int = 24; +pub const F_SETLK: ::c_int = 6; +pub const F_SETLKW: ::c_int = 7; + +pub const SFD_NONBLOCK: ::c_int = 0x80; + +pub const TCGETS: ::c_ulong = 0x540d; +pub const TCSETS: ::c_ulong = 0x540e; +pub const TCSETSW: ::c_ulong = 0x540f; +pub const TCSETSF: ::c_ulong = 0x5410; +pub const TCGETA: ::c_ulong = 0x5401; +pub const TCSETA: ::c_ulong = 0x5402; +pub const TCSETAW: ::c_ulong = 0x5403; +pub const TCSETAF: ::c_ulong = 0x5404; +pub const TCSBRK: ::c_ulong = 0x5405; +pub const TCXONC: ::c_ulong = 0x5406; +pub const TCFLSH: ::c_ulong = 0x5407; +pub const TIOCGSOFTCAR: ::c_ulong = 0x5481; +pub const TIOCSSOFTCAR: ::c_ulong = 0x5482; +pub const TIOCINQ: ::c_ulong = 0x467f; +pub const TIOCLINUX: ::c_ulong = 0x5483; +pub const TIOCGSERIAL: ::c_ulong = 0x5484; +pub const TIOCEXCL: ::c_ulong = 0x740d; +pub const TIOCNXCL: ::c_ulong = 0x740e; +pub const TIOCSCTTY: ::c_ulong = 0x5480; +pub const TIOCGPGRP: ::c_ulong = 0x40047477; +pub const TIOCSPGRP: ::c_ulong = 0x80047476; +pub const TIOCOUTQ: ::c_ulong = 0x7472; +pub const TIOCSTI: ::c_ulong = 0x5472; +pub const TIOCGWINSZ: ::c_ulong = 0x40087468; +pub const TIOCSWINSZ: ::c_ulong = 0x80087467; +pub const TIOCMGET: ::c_ulong = 0x741d; +pub const TIOCMBIS: ::c_ulong = 0x741b; +pub const TIOCMBIC: ::c_ulong = 0x741c; +pub const TIOCMSET: ::c_ulong = 0x741a; +pub const FIONREAD: ::c_ulong = 0x467f; +pub const TIOCCONS: ::c_ulong = 0x80047478; + +pub const RTLD_DEEPBIND: ::c_int = 0x10; +pub const RTLD_GLOBAL: ::c_int = 0x4; +pub const RTLD_NOLOAD: ::c_int = 0x8; + +pub const SYS_gettid: ::c_long = 4222; // Valid for O32 + +extern { + pub fn sysctl(name: *mut ::c_int, + namelen: ::c_int, + oldp: *mut ::c_void, + oldlenp: *mut ::size_t, + newp: *mut ::c_void, + newlen: ::size_t) + -> ::c_int; + pub fn ioctl(fd: ::c_int, request: ::c_ulong, ...) -> ::c_int; + pub fn backtrace(buf: *mut *mut ::c_void, + sz: ::c_int) -> ::c_int; + pub fn glob64(pattern: *const ::c_char, + flags: ::c_int, + errfunc: ::dox::Option ::c_int>, + pglob: *mut glob64_t) -> ::c_int; + pub fn globfree64(pglob: *mut glob64_t); + pub fn getnameinfo(sa: *const ::sockaddr, + salen: ::socklen_t, + host: *mut ::c_char, + hostlen: ::socklen_t, + serv: *mut ::c_char, + sevlen: ::socklen_t, + flags: ::c_int) -> ::c_int; + pub fn eventfd(init: ::c_uint, flags: ::c_int) -> ::c_int; + pub fn ptrace(request: ::c_uint, ...) -> ::c_long; + pub fn pthread_attr_getaffinity_np(attr: *const ::pthread_attr_t, + cpusetsize: ::size_t, + cpuset: *mut ::cpu_set_t) -> ::c_int; + pub fn pthread_attr_setaffinity_np(attr: *mut ::pthread_attr_t, + cpusetsize: ::size_t, + cpuset: *const ::cpu_set_t) -> ::c_int; +} diff --git a/deps/libc-0.2.8/src/unix/notbsd/linux/mod.rs b/deps/libc-0.2.8/src/unix/notbsd/linux/mod.rs new file mode 100644 index 000000000..64adea5a9 --- /dev/null +++ b/deps/libc-0.2.8/src/unix/notbsd/linux/mod.rs @@ -0,0 +1,569 @@ +//! Linux-specific definitions for linux-like values + +use dox::mem; + +pub type useconds_t = u32; +pub type dev_t = u64; +pub type socklen_t = u32; +pub type pthread_t = c_ulong; +pub type mode_t = u32; +pub type ino64_t = u64; +pub type off64_t = i64; +pub type blkcnt64_t = i64; +pub type rlim64_t = u64; +pub type key_t = ::c_int; +pub type shmatt_t = ::c_ulong; +pub type mqd_t = ::c_int; +pub type nfds_t = ::c_ulong; + +pub enum fpos64_t {} // TODO: fill this out with a struct + +s! { + pub struct dirent { + pub d_ino: ::ino_t, + pub d_off: ::off_t, + pub d_reclen: ::c_ushort, + pub d_type: ::c_uchar, + pub d_name: [::c_char; 256], + } + + pub struct dirent64 { + pub d_ino: ::ino64_t, + pub d_off: ::off64_t, + pub d_reclen: ::c_ushort, + pub d_type: ::c_uchar, + pub d_name: [::c_char; 256], + } + + pub struct rlimit64 { + pub rlim_cur: rlim64_t, + pub rlim_max: rlim64_t, + } + + pub struct glob_t { + pub gl_pathc: ::size_t, + pub gl_pathv: *mut *mut c_char, + pub gl_offs: ::size_t, + pub gl_flags: ::c_int, + + __unused1: *mut ::c_void, + __unused2: *mut ::c_void, + __unused3: *mut ::c_void, + __unused4: *mut ::c_void, + __unused5: *mut ::c_void, + } + + pub struct ifaddrs { + pub ifa_next: *mut ifaddrs, + pub ifa_name: *mut c_char, + pub ifa_flags: ::c_uint, + pub ifa_addr: *mut ::sockaddr, + pub ifa_netmask: *mut ::sockaddr, + pub ifa_ifu: *mut ::sockaddr, // FIXME This should be a union + pub ifa_data: *mut ::c_void + } + + pub struct pthread_mutex_t { + #[cfg(any(target_arch = "mips", target_arch = "mipsel", + target_arch = "arm"))] + __align: [::c_long; 0], + #[cfg(not(any(target_arch = "mips", target_arch = "mipsel", + target_arch = "arm")))] + __align: [::c_longlong; 0], + size: [u8; __SIZEOF_PTHREAD_MUTEX_T], + } + + pub struct pthread_rwlock_t { + #[cfg(any(target_arch = "mips", target_arch = "mipsel", + target_arch = "arm"))] + __align: [::c_long; 0], + #[cfg(not(any(target_arch = "mips", target_arch = "mipsel", + target_arch = "arm")))] + __align: [::c_longlong; 0], + size: [u8; __SIZEOF_PTHREAD_RWLOCK_T], + } + + pub struct pthread_mutexattr_t { + #[cfg(any(target_arch = "x86_64", target_arch = "powerpc64"))] + __align: [::c_int; 0], + #[cfg(not(any(target_arch = "x86_64", target_arch = "powerpc64")))] + __align: [::c_long; 0], + size: [u8; __SIZEOF_PTHREAD_MUTEXATTR_T], + } + + pub struct pthread_cond_t { + #[cfg(target_env = "musl")] + __align: [*const ::c_void; 0], + #[cfg(not(target_env = "musl"))] + __align: [::c_longlong; 0], + size: [u8; __SIZEOF_PTHREAD_COND_T], + } + + pub struct passwd { + pub pw_name: *mut ::c_char, + pub pw_passwd: *mut ::c_char, + pub pw_uid: ::uid_t, + pub pw_gid: ::gid_t, + pub pw_gecos: *mut ::c_char, + pub pw_dir: *mut ::c_char, + pub pw_shell: *mut ::c_char, + } + + pub struct statvfs { + pub f_bsize: ::c_ulong, + pub f_frsize: ::c_ulong, + pub f_blocks: ::fsblkcnt_t, + pub f_bfree: ::fsblkcnt_t, + pub f_bavail: ::fsblkcnt_t, + pub f_files: ::fsfilcnt_t, + pub f_ffree: ::fsfilcnt_t, + pub f_favail: ::fsfilcnt_t, + pub f_fsid: ::c_ulong, + #[cfg(target_pointer_width = "32")] + pub __f_unused: ::c_int, + pub f_flag: ::c_ulong, + pub f_namemax: ::c_ulong, + __f_spare: [::c_int; 6], + } + + pub struct sockaddr_nl { + pub nl_family: ::sa_family_t, + nl_pad: ::c_ushort, + pub nl_pid: u32, + pub nl_groups: u32 + } + + pub struct dqblk { + pub dqb_bhardlimit: ::uint64_t, + pub dqb_bsoftlimit: ::uint64_t, + pub dqb_curspace: ::uint64_t, + pub dqb_ihardlimit: ::uint64_t, + pub dqb_isoftlimit: ::uint64_t, + pub dqb_curinodes: ::uint64_t, + pub dqb_btime: ::uint64_t, + pub dqb_itime: ::uint64_t, + pub dqb_valid: ::uint32_t, + } + + pub struct signalfd_siginfo { + pub ssi_signo: ::uint32_t, + pub ssi_errno: ::int32_t, + pub ssi_code: ::int32_t, + pub ssi_pid: ::uint32_t, + pub ssi_uid: ::uint32_t, + pub ssi_fd: ::int32_t, + pub ssi_tid: ::uint32_t, + pub ssi_band: ::uint32_t, + pub ssi_overrun: ::uint32_t, + pub ssi_trapno: ::uint32_t, + pub ssi_status: ::int32_t, + pub ssi_int: ::int32_t, + pub ssi_ptr: ::uint64_t, + pub ssi_utime: ::uint64_t, + pub ssi_stime: ::uint64_t, + pub ssi_addr: ::uint64_t, + _pad: [::uint8_t; 48], + } + + pub struct fsid_t { + __val: [::c_int; 2], + } + + pub struct mq_attr { + pub mq_flags: ::c_long, + pub mq_maxmsg: ::c_long, + pub mq_msgsize: ::c_long, + pub mq_curmsgs: ::c_long, + pad: [::c_long; 4] + } + + pub struct cpu_set_t { + #[cfg(target_pointer_width = "32")] + bits: [u32; 32], + #[cfg(target_pointer_width = "64")] + bits: [u64; 16], + } +} + +pub const FILENAME_MAX: ::c_uint = 4096; +pub const L_tmpnam: ::c_uint = 20; +pub const _PC_NAME_MAX: ::c_int = 3; + +pub const _SC_ARG_MAX: ::c_int = 0; +pub const _SC_CHILD_MAX: ::c_int = 1; +pub const _SC_CLK_TCK: ::c_int = 2; +pub const _SC_NGROUPS_MAX: ::c_int = 3; +pub const _SC_OPEN_MAX: ::c_int = 4; +pub const _SC_STREAM_MAX: ::c_int = 5; +pub const _SC_TZNAME_MAX: ::c_int = 6; +pub const _SC_JOB_CONTROL: ::c_int = 7; +pub const _SC_SAVED_IDS: ::c_int = 8; +pub const _SC_REALTIME_SIGNALS: ::c_int = 9; +pub const _SC_PRIORITY_SCHEDULING: ::c_int = 10; +pub const _SC_TIMERS: ::c_int = 11; +pub const _SC_ASYNCHRONOUS_IO: ::c_int = 12; +pub const _SC_PRIORITIZED_IO: ::c_int = 13; +pub const _SC_SYNCHRONIZED_IO: ::c_int = 14; +pub const _SC_FSYNC: ::c_int = 15; +pub const _SC_MAPPED_FILES: ::c_int = 16; +pub const _SC_MEMLOCK: ::c_int = 17; +pub const _SC_MEMLOCK_RANGE: ::c_int = 18; +pub const _SC_MEMORY_PROTECTION: ::c_int = 19; +pub const _SC_MESSAGE_PASSING: ::c_int = 20; +pub const _SC_SEMAPHORES: ::c_int = 21; +pub const _SC_SHARED_MEMORY_OBJECTS: ::c_int = 22; +pub const _SC_AIO_LISTIO_MAX: ::c_int = 23; +pub const _SC_AIO_MAX: ::c_int = 24; +pub const _SC_AIO_PRIO_DELTA_MAX: ::c_int = 25; +pub const _SC_DELAYTIMER_MAX: ::c_int = 26; +pub const _SC_MQ_OPEN_MAX: ::c_int = 27; +pub const _SC_MQ_PRIO_MAX: ::c_int = 28; +pub const _SC_VERSION: ::c_int = 29; +pub const _SC_PAGESIZE: ::c_int = 30; +pub const _SC_PAGE_SIZE: ::c_int = _SC_PAGESIZE; +pub const _SC_RTSIG_MAX: ::c_int = 31; +pub const _SC_SEM_NSEMS_MAX: ::c_int = 32; +pub const _SC_SEM_VALUE_MAX: ::c_int = 33; +pub const _SC_SIGQUEUE_MAX: ::c_int = 34; +pub const _SC_TIMER_MAX: ::c_int = 35; +pub const _SC_BC_BASE_MAX: ::c_int = 36; +pub const _SC_BC_DIM_MAX: ::c_int = 37; +pub const _SC_BC_SCALE_MAX: ::c_int = 38; +pub const _SC_BC_STRING_MAX: ::c_int = 39; +pub const _SC_COLL_WEIGHTS_MAX: ::c_int = 40; +pub const _SC_EXPR_NEST_MAX: ::c_int = 42; +pub const _SC_LINE_MAX: ::c_int = 43; +pub const _SC_RE_DUP_MAX: ::c_int = 44; +pub const _SC_2_VERSION: ::c_int = 46; +pub const _SC_2_C_BIND: ::c_int = 47; +pub const _SC_2_C_DEV: ::c_int = 48; +pub const _SC_2_FORT_DEV: ::c_int = 49; +pub const _SC_2_FORT_RUN: ::c_int = 50; +pub const _SC_2_SW_DEV: ::c_int = 51; +pub const _SC_2_LOCALEDEF: ::c_int = 52; +pub const _SC_IOV_MAX: ::c_int = 60; +pub const _SC_THREADS: ::c_int = 67; +pub const _SC_THREAD_SAFE_FUNCTIONS: ::c_int = 68; +pub const _SC_GETGR_R_SIZE_MAX: ::c_int = 69; +pub const _SC_GETPW_R_SIZE_MAX: ::c_int = 70; +pub const _SC_LOGIN_NAME_MAX: ::c_int = 71; +pub const _SC_TTY_NAME_MAX: ::c_int = 72; +pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: ::c_int = 73; +pub const _SC_THREAD_KEYS_MAX: ::c_int = 74; +pub const _SC_THREAD_STACK_MIN: ::c_int = 75; +pub const _SC_THREAD_THREADS_MAX: ::c_int = 76; +pub const _SC_THREAD_ATTR_STACKADDR: ::c_int = 77; +pub const _SC_THREAD_ATTR_STACKSIZE: ::c_int = 78; +pub const _SC_THREAD_PRIORITY_SCHEDULING: ::c_int = 79; +pub const _SC_THREAD_PRIO_INHERIT: ::c_int = 80; +pub const _SC_THREAD_PRIO_PROTECT: ::c_int = 81; +pub const _SC_NPROCESSORS_ONLN: ::c_int = 84; +pub const _SC_ATEXIT_MAX: ::c_int = 87; +pub const _SC_XOPEN_VERSION: ::c_int = 89; +pub const _SC_XOPEN_XCU_VERSION: ::c_int = 90; +pub const _SC_XOPEN_UNIX: ::c_int = 91; +pub const _SC_XOPEN_CRYPT: ::c_int = 92; +pub const _SC_XOPEN_ENH_I18N: ::c_int = 93; +pub const _SC_XOPEN_SHM: ::c_int = 94; +pub const _SC_2_CHAR_TERM: ::c_int = 95; +pub const _SC_2_UPE: ::c_int = 97; +pub const _SC_XBS5_ILP32_OFF32: ::c_int = 125; +pub const _SC_XBS5_ILP32_OFFBIG: ::c_int = 126; +pub const _SC_XBS5_LPBIG_OFFBIG: ::c_int = 128; +pub const _SC_XOPEN_LEGACY: ::c_int = 129; +pub const _SC_XOPEN_REALTIME: ::c_int = 130; +pub const _SC_XOPEN_REALTIME_THREADS: ::c_int = 131; + +pub const RLIM_SAVED_MAX: ::rlim_t = RLIM_INFINITY; +pub const RLIM_SAVED_CUR: ::rlim_t = RLIM_INFINITY; + +pub const GLOB_ERR: ::c_int = 1 << 0; +pub const GLOB_MARK: ::c_int = 1 << 1; +pub const GLOB_NOSORT: ::c_int = 1 << 2; +pub const GLOB_DOOFFS: ::c_int = 1 << 3; +pub const GLOB_NOCHECK: ::c_int = 1 << 4; +pub const GLOB_APPEND: ::c_int = 1 << 5; +pub const GLOB_NOESCAPE: ::c_int = 1 << 6; + +pub const GLOB_NOSPACE: ::c_int = 1; +pub const GLOB_ABORTED: ::c_int = 2; +pub const GLOB_NOMATCH: ::c_int = 3; + +pub const POSIX_MADV_NORMAL: ::c_int = 0; +pub const POSIX_MADV_RANDOM: ::c_int = 1; +pub const POSIX_MADV_SEQUENTIAL: ::c_int = 2; +pub const POSIX_MADV_WILLNEED: ::c_int = 3; + +pub const S_IEXEC: mode_t = 64; +pub const S_IWRITE: mode_t = 128; +pub const S_IREAD: mode_t = 256; + +pub const F_LOCK: ::c_int = 1; +pub const F_TEST: ::c_int = 3; +pub const F_TLOCK: ::c_int = 2; +pub const F_ULOCK: ::c_int = 0; + +pub const ST_RDONLY: ::c_ulong = 1; +pub const ST_NOSUID: ::c_ulong = 2; +pub const ST_NODEV: ::c_ulong = 4; +pub const ST_NOEXEC: ::c_ulong = 8; +pub const ST_SYNCHRONOUS: ::c_ulong = 16; +pub const ST_MANDLOCK: ::c_ulong = 64; +pub const ST_WRITE: ::c_ulong = 128; +pub const ST_APPEND: ::c_ulong = 256; +pub const ST_IMMUTABLE: ::c_ulong = 512; +pub const ST_NOATIME: ::c_ulong = 1024; +pub const ST_NODIRATIME: ::c_ulong = 2048; + +pub const RTLD_NEXT: *mut ::c_void = -1i64 as *mut ::c_void; +pub const RTLD_DEFAULT: *mut ::c_void = 0i64 as *mut ::c_void; +pub const RTLD_NODELETE: ::c_int = 0x1000; +pub const RTLD_NOW: ::c_int = 0x2; + +pub const TCP_MD5SIG: ::c_int = 14; + +pub const F_DUPFD_CLOEXEC: ::c_int = 1030; + +pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t { + __align: [], + size: [0; __SIZEOF_PTHREAD_MUTEX_T], +}; +pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = pthread_cond_t { + __align: [], + size: [0; __SIZEOF_PTHREAD_COND_T], +}; +pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t { + __align: [], + size: [0; __SIZEOF_PTHREAD_RWLOCK_T], +}; +pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 1; +pub const __SIZEOF_PTHREAD_COND_T: usize = 48; + +pub const SCHED_OTHER: ::c_int = 0; +pub const SCHED_FIFO: ::c_int = 1; +pub const SCHED_RR: ::c_int = 2; +pub const SCHED_BATCH: ::c_int = 3; +pub const SCHED_IDLE: ::c_int = 5; + +pub const IPC_CREAT: ::c_int = 0o1000; +pub const IPC_EXCL: ::c_int = 0o2000; +pub const IPC_NOWAIT: ::c_int = 0o4000; + +pub const IPC_RMID: ::c_int = 0; +pub const IPC_SET: ::c_int = 1; +pub const IPC_STAT: ::c_int = 2; +pub const IPC_INFO: ::c_int = 3; + +pub const SHM_R: ::c_int = 0o400; +pub const SHM_W: ::c_int = 0o200; + +pub const SHM_RDONLY: ::c_int = 0o10000; +pub const SHM_RND: ::c_int = 0o20000; +pub const SHM_REMAP: ::c_int = 0o40000; +pub const SHM_EXEC: ::c_int = 0o100000; + +pub const SHM_LOCK: ::c_int = 11; +pub const SHM_UNLOCK: ::c_int = 12; + +pub const SHM_HUGETLB: ::c_int = 0o4000; +pub const SHM_NORESERVE: ::c_int = 0o10000; + +pub const MS_RELATIME: ::c_ulong = 0x200000; +pub const MS_KERNMOUNT: ::c_ulong = 0x400000; +pub const MS_I_VERSION: ::c_ulong = 0x800000; +pub const MS_STRICTATIME: ::c_ulong = 0x01000000; + +pub const EPOLLRDHUP: ::c_int = 0x2000; +pub const EPOLLONESHOT: ::c_int = 0x40000000; + +pub const QFMT_VFS_OLD: ::c_int = 1; +pub const QFMT_VFS_V0: ::c_int = 2; + +pub const SFD_CLOEXEC: ::c_int = 0x080000; + +pub const EFD_SEMAPHORE: ::c_int = 0x1; + +pub const NCCS: usize = 32; + +pub const CLONE_NEWUTS: ::c_int = 0x04000000; +pub const CLONE_NEWIPC: ::c_int = 0x08000000; +pub const CLONE_NEWUSER: ::c_int = 0x10000000; +pub const CLONE_NEWPID: ::c_int = 0x20000000; +pub const CLONE_NEWNET: ::c_int = 0x40000000; +pub const CLONE_IO: ::c_int = 0x80000000; + +pub const AF_NETLINK: ::c_int = 16; + +f! { + pub fn CPU_ZERO(cpuset: &mut cpu_set_t) -> () { + for slot in cpuset.bits.iter_mut() { + *slot = 0; + } + } + + pub fn CPU_SET(cpu: usize, cpuset: &mut cpu_set_t) -> () { + let size = mem::size_of_val(&cpuset.bits[0]); + let (idx, offset) = (cpu / size, cpu % size); + cpuset.bits[idx] |= 1 << offset; + () + } + + pub fn CPU_ISSET(cpu: usize, cpuset: &cpu_set_t) -> bool { + let size = mem::size_of_val(&cpuset.bits[0]); + let (idx, offset) = (cpu / size, cpu % size); + 0 != (cpuset.bits[idx] & (1 << offset)) + } + + pub fn CPU_EQUAL(set1: &cpu_set_t, set2: &cpu_set_t) -> bool { + set1.bits == set2.bits + } +} + +extern { + pub fn shm_open(name: *const c_char, oflag: ::c_int, + mode: mode_t) -> ::c_int; + pub fn shmget(key: ::key_t, size: ::size_t, shmflg: ::c_int) -> ::c_int; + pub fn shmat(shmid: ::c_int, + shmaddr: *const ::c_void, + shmflg: ::c_int) -> *mut ::c_void; + pub fn shmdt(shmaddr: *const ::c_void) -> ::c_int; + pub fn shmctl(shmid: ::c_int, + cmd: ::c_int, + buf: *mut ::shmid_ds) -> ::c_int; + pub fn mprotect(addr: *mut ::c_void, len: ::size_t, prot: ::c_int) + -> ::c_int; + pub fn __errno_location() -> *mut ::c_int; + + pub fn fopen64(filename: *const c_char, + mode: *const c_char) -> *mut ::FILE; + pub fn freopen64(filename: *const c_char, mode: *const c_char, + file: *mut ::FILE) -> *mut ::FILE; + pub fn tmpfile64() -> *mut ::FILE; + pub fn fgetpos64(stream: *mut ::FILE, ptr: *mut fpos64_t) -> ::c_int; + pub fn fsetpos64(stream: *mut ::FILE, ptr: *const fpos64_t) -> ::c_int; + pub fn fstat64(fildes: ::c_int, buf: *mut stat64) -> ::c_int; + pub fn stat64(path: *const c_char, buf: *mut stat64) -> ::c_int; + pub fn open64(path: *const c_char, oflag: ::c_int, ...) -> ::c_int; + pub fn creat64(path: *const c_char, mode: mode_t) -> ::c_int; + pub fn lseek64(fd: ::c_int, offset: off64_t, whence: ::c_int) -> off64_t; + pub fn pread64(fd: ::c_int, buf: *mut ::c_void, count: ::size_t, + offset: off64_t) -> ::ssize_t; + pub fn pwrite64(fd: ::c_int, buf: *const ::c_void, count: ::size_t, + offset: off64_t) -> ::ssize_t; + pub fn mmap64(addr: *mut ::c_void, + len: ::size_t, + prot: ::c_int, + flags: ::c_int, + fd: ::c_int, + offset: off64_t) + -> *mut ::c_void; + pub fn lstat64(path: *const c_char, buf: *mut stat64) -> ::c_int; + pub fn ftruncate64(fd: ::c_int, length: off64_t) -> ::c_int; + pub fn readdir64_r(dirp: *mut ::DIR, entry: *mut ::dirent64, + result: *mut *mut ::dirent64) -> ::c_int; + + pub fn getrlimit64(resource: ::c_int, rlim: *mut rlimit64) -> ::c_int; + pub fn setrlimit64(resource: ::c_int, rlim: *const rlimit64) -> ::c_int; + pub fn fseeko64(stream: *mut ::FILE, + offset: ::off64_t, + whence: ::c_int) -> ::c_int; + pub fn ftello64(stream: *mut ::FILE) -> ::off64_t; + pub fn fallocate(fd: ::c_int, mode: ::c_int, + offset: ::off_t, len: ::off_t) -> ::c_int; + pub fn posix_fallocate(fd: ::c_int, offset: ::off_t, + len: ::off_t) -> ::c_int; + pub fn readahead(fd: ::c_int, offset: ::off64_t, + count: ::size_t) -> ::ssize_t; + pub fn getxattr(path: *const c_char, name: *const c_char, + value: *mut ::c_void, size: ::size_t) -> ::ssize_t; + pub fn lgetxattr(path: *const c_char, name: *const c_char, + value: *mut ::c_void, size: ::size_t) -> ::ssize_t; + pub fn fgetxattr(filedes: ::c_int, name: *const c_char, + value: *mut ::c_void, size: ::size_t) -> ::ssize_t; + pub fn setxattr(path: *const c_char, name: *const c_char, + value: *const ::c_void, size: ::size_t, + flags: ::c_int) -> ::c_int; + pub fn lsetxattr(path: *const c_char, name: *const c_char, + value: *const ::c_void, size: ::size_t, + flags: ::c_int) -> ::c_int; + pub fn fsetxattr(filedes: ::c_int, name: *const c_char, + value: *const ::c_void, size: ::size_t, + flags: ::c_int) -> ::c_int; + pub fn listxattr(path: *const c_char, list: *mut c_char, + size: ::size_t) -> ::ssize_t; + pub fn llistxattr(path: *const c_char, list: *mut c_char, + size: ::size_t) -> ::ssize_t; + pub fn flistxattr(filedes: ::c_int, list: *mut c_char, + size: ::size_t) -> ::ssize_t; + pub fn removexattr(path: *const c_char, name: *const c_char) -> ::c_int; + pub fn lremovexattr(path: *const c_char, name: *const c_char) -> ::c_int; + pub fn fremovexattr(filedes: ::c_int, name: *const c_char) -> ::c_int; + pub fn signalfd(fd: ::c_int, + mask: *const ::sigset_t, + flags: ::c_int) -> ::c_int; + pub fn pwritev(fd: ::c_int, + iov: *const ::iovec, + iovcnt: ::c_int, + offset: ::off_t) -> ::ssize_t; + pub fn preadv(fd: ::c_int, + iov: *const ::iovec, + iovcnt: ::c_int, + offset: ::off_t) -> ::ssize_t; + pub fn quotactl(cmd: ::c_int, + special: *const ::c_char, + id: ::c_int, + data: *mut ::c_char) -> ::c_int; + pub fn mq_open(name: *const ::c_char, oflag: ::c_int, ...) -> ::mqd_t; + pub fn mq_close(mqd: ::mqd_t) -> ::c_int; + pub fn mq_unlink(name: *const ::c_char) -> ::c_int; + pub fn mq_receive(mqd: ::mqd_t, + msg_ptr: *mut ::c_char, + msg_len: ::size_t, + msq_prio: *mut ::c_uint) -> ::ssize_t; + pub fn mq_send(mqd: ::mqd_t, + msg_ptr: *const ::c_char, + msg_len: ::size_t, + msq_prio: ::c_uint) -> ::c_int; + pub fn mq_getattr(mqd: ::mqd_t, attr: *mut ::mq_attr) -> ::c_int; + pub fn mq_setattr(mqd: ::mqd_t, + newattr: *const ::mq_attr, + oldattr: *mut ::mq_attr) -> ::c_int; + pub fn sched_getaffinity(pid: ::pid_t, + cpusetsize: ::size_t, + cpuset: *mut cpu_set_t) -> ::c_int; + pub fn sched_setaffinity(pid: ::pid_t, + cpusetsize: ::size_t, + cpuset: *const cpu_set_t) -> ::c_int; + pub fn epoll_pwait(epfd: ::c_int, + events: *mut ::epoll_event, + maxevents: ::c_int, + timeout: ::c_int, + sigmask: *const ::sigset_t) -> ::c_int; + pub fn dup3(oldfd: ::c_int, newfd: ::c_int, flags: ::c_int) -> ::c_int; + pub fn unshare(flags: ::c_int) -> ::c_int; + pub fn sethostname(name: *const ::c_char, len: ::size_t) -> ::c_int; + pub fn setns(fd: ::c_int, nstype: ::c_int) -> ::c_int; + pub fn mkostemp(template: *mut ::c_char, flags: ::c_int) -> ::c_int; + pub fn mkostemps(template: *mut ::c_char, + suffixlen: ::c_int, + flags: ::c_int) -> ::c_int; + pub fn sigtimedwait(set: *const sigset_t, + info: *mut siginfo_t, + timeout: *const ::timespec) -> ::c_int; + pub fn sigwaitinfo(set: *const sigset_t, + info: *mut siginfo_t) -> ::c_int; +} + +cfg_if! { + if #[cfg(any(target_env = "musl", + target_os = "emscripten"))] { + mod musl; + pub use self::musl::*; + } else if #[cfg(any(target_arch = "mips", target_arch = "mipsel"))] { + mod mips; + pub use self::mips::*; + } else { + mod other; + pub use self::other::*; + } +} diff --git a/deps/libc-0.2.8/src/unix/notbsd/linux/musl/b32/arm.rs b/deps/libc-0.2.8/src/unix/notbsd/linux/musl/b32/arm.rs new file mode 100644 index 000000000..bfd8f7c5f --- /dev/null +++ b/deps/libc-0.2.8/src/unix/notbsd/linux/musl/b32/arm.rs @@ -0,0 +1,306 @@ +pub type c_char = u8; +pub type wchar_t = u32; + +s! { + pub struct stat { + pub st_dev: ::dev_t, + __st_dev_padding: ::c_int, + __st_ino_truncated: ::c_long, + pub st_mode: ::mode_t, + pub st_nlink: ::nlink_t, + pub st_uid: ::uid_t, + pub st_gid: ::gid_t, + pub st_rdev: ::dev_t, + __st_rdev_padding: ::c_int, + pub st_size: ::off_t, + pub st_blksize: ::blksize_t, + pub st_blocks: ::blkcnt_t, + pub st_atime: ::time_t, + pub st_atime_nsec: ::c_long, + pub st_mtime: ::time_t, + pub st_mtime_nsec: ::c_long, + pub st_ctime: ::time_t, + pub st_ctime_nsec: ::c_long, + pub st_ino: ::ino_t, + } + + pub struct stat64 { + pub st_dev: ::dev_t, + __st_dev_padding: ::c_int, + __st_ino_truncated: ::c_long, + pub st_mode: ::mode_t, + pub st_nlink: ::nlink_t, + pub st_uid: ::uid_t, + pub st_gid: ::gid_t, + pub st_rdev: ::dev_t, + __st_rdev_padding: ::c_int, + pub st_size: ::off_t, + pub st_blksize: ::blksize_t, + pub st_blocks: ::blkcnt_t, + pub st_atime: ::time_t, + pub st_atime_nsec: ::c_long, + pub st_mtime: ::time_t, + pub st_mtime_nsec: ::c_long, + pub st_ctime: ::time_t, + pub st_ctime_nsec: ::c_long, + pub st_ino: ::ino_t, + } + + pub struct stack_t { + pub ss_sp: *mut ::c_void, + pub ss_flags: ::c_int, + pub ss_size: ::size_t + } + + pub struct shmid_ds { + pub shm_perm: ::ipc_perm, + pub shm_segsz: ::size_t, + pub shm_atime: ::time_t, + __unused1: ::c_int, + pub shm_dtime: ::time_t, + __unused2: ::c_int, + pub shm_ctime: ::time_t, + __unused3: ::c_int, + pub shm_cpid: ::pid_t, + pub shm_lpid: ::pid_t, + pub shm_nattch: ::c_ulong, + __pad1: ::c_ulong, + __pad2: ::c_ulong, + } + + pub struct statfs { + pub f_type: ::c_ulong, + pub f_bsize: ::c_ulong, + pub f_blocks: ::fsblkcnt_t, + pub f_bfree: ::fsblkcnt_t, + pub f_bavail: ::fsblkcnt_t, + pub f_files: ::fsfilcnt_t, + pub f_ffree: ::fsfilcnt_t, + pub f_fsid: ::fsid_t, + pub f_namelen: ::c_ulong, + pub f_frsize: ::c_ulong, + pub f_flags: ::c_ulong, + pub f_spare: [::c_ulong; 4], + } +} + +pub const O_DIRECT: ::c_int = 0x4000; +pub const O_DIRECTORY: ::c_int = 0x10000; +pub const O_NOFOLLOW: ::c_int = 0x20000; +pub const O_ASYNC: ::c_int = 0x2000; + +pub const FIOCLEX: ::c_int = 0x5451; +pub const FIONBIO: ::c_int = 0x5421; + +pub const RLIMIT_RSS: ::c_int = 5; +pub const RLIMIT_NOFILE: ::c_int = 7; +pub const RLIMIT_AS: ::c_int = 9; +pub const RLIMIT_NPROC: ::c_int = 6; +pub const RLIMIT_MEMLOCK: ::c_int = 8; + +pub const O_APPEND: ::c_int = 1024; +pub const O_CREAT: ::c_int = 64; +pub const O_EXCL: ::c_int = 128; +pub const O_NOCTTY: ::c_int = 256; +pub const O_NONBLOCK: ::c_int = 2048; +pub const O_SYNC: ::c_int = 1052672; +pub const O_RSYNC: ::c_int = 1052672; +pub const O_DSYNC: ::c_int = 4096; + +pub const SOCK_NONBLOCK: ::c_int = 2048; + +pub const MAP_ANON: ::c_int = 0x0020; +pub const MAP_GROWSDOWN: ::c_int = 0x0100; +pub const MAP_DENYWRITE: ::c_int = 0x0800; +pub const MAP_EXECUTABLE: ::c_int = 0x01000; +pub const MAP_LOCKED: ::c_int = 0x02000; +pub const MAP_NORESERVE: ::c_int = 0x04000; +pub const MAP_POPULATE: ::c_int = 0x08000; +pub const MAP_NONBLOCK: ::c_int = 0x010000; +pub const MAP_STACK: ::c_int = 0x020000; + +pub const SOCK_STREAM: ::c_int = 1; +pub const SOCK_DGRAM: ::c_int = 2; + +pub const SOL_SOCKET: ::c_int = 1; + +pub const EDEADLK: ::c_int = 35; +pub const ENAMETOOLONG: ::c_int = 36; +pub const ENOLCK: ::c_int = 37; +pub const ENOSYS: ::c_int = 38; +pub const ENOTEMPTY: ::c_int = 39; +pub const ELOOP: ::c_int = 40; +pub const ENOMSG: ::c_int = 42; +pub const EIDRM: ::c_int = 43; +pub const ECHRNG: ::c_int = 44; +pub const EL2NSYNC: ::c_int = 45; +pub const EL3HLT: ::c_int = 46; +pub const EL3RST: ::c_int = 47; +pub const ELNRNG: ::c_int = 48; +pub const EUNATCH: ::c_int = 49; +pub const ENOCSI: ::c_int = 50; +pub const EL2HLT: ::c_int = 51; +pub const EBADE: ::c_int = 52; +pub const EBADR: ::c_int = 53; +pub const EXFULL: ::c_int = 54; +pub const ENOANO: ::c_int = 55; +pub const EBADRQC: ::c_int = 56; +pub const EBADSLT: ::c_int = 57; +pub const EDEADLOCK: ::c_int = EDEADLK; +pub const EMULTIHOP: ::c_int = 72; +pub const EBADMSG: ::c_int = 74; +pub const EOVERFLOW: ::c_int = 75; +pub const ENOTUNIQ: ::c_int = 76; +pub const EBADFD: ::c_int = 77; +pub const EREMCHG: ::c_int = 78; +pub const ELIBACC: ::c_int = 79; +pub const ELIBBAD: ::c_int = 80; +pub const ELIBSCN: ::c_int = 81; +pub const ELIBMAX: ::c_int = 82; +pub const ELIBEXEC: ::c_int = 83; +pub const EILSEQ: ::c_int = 84; +pub const ERESTART: ::c_int = 85; +pub const ESTRPIPE: ::c_int = 86; +pub const EUSERS: ::c_int = 87; +pub const ENOTSOCK: ::c_int = 88; +pub const EDESTADDRREQ: ::c_int = 89; +pub const EMSGSIZE: ::c_int = 90; +pub const EPROTOTYPE: ::c_int = 91; +pub const ENOPROTOOPT: ::c_int = 92; +pub const EPROTONOSUPPORT: ::c_int = 93; +pub const ESOCKTNOSUPPORT: ::c_int = 94; +pub const EOPNOTSUPP: ::c_int = 95; +pub const EPFNOSUPPORT: ::c_int = 96; +pub const EAFNOSUPPORT: ::c_int = 97; +pub const EADDRINUSE: ::c_int = 98; +pub const EADDRNOTAVAIL: ::c_int = 99; +pub const ENETDOWN: ::c_int = 100; +pub const ENETUNREACH: ::c_int = 101; +pub const ENETRESET: ::c_int = 102; +pub const ECONNABORTED: ::c_int = 103; +pub const ECONNRESET: ::c_int = 104; +pub const ENOBUFS: ::c_int = 105; +pub const EISCONN: ::c_int = 106; +pub const ENOTCONN: ::c_int = 107; +pub const ESHUTDOWN: ::c_int = 108; +pub const ETOOMANYREFS: ::c_int = 109; +pub const ETIMEDOUT: ::c_int = 110; +pub const ECONNREFUSED: ::c_int = 111; +pub const EHOSTDOWN: ::c_int = 112; +pub const EHOSTUNREACH: ::c_int = 113; +pub const EALREADY: ::c_int = 114; +pub const EINPROGRESS: ::c_int = 115; +pub const ESTALE: ::c_int = 116; +pub const EUCLEAN: ::c_int = 117; +pub const ENOTNAM: ::c_int = 118; +pub const ENAVAIL: ::c_int = 119; +pub const EISNAM: ::c_int = 120; +pub const EREMOTEIO: ::c_int = 121; +pub const EDQUOT: ::c_int = 122; +pub const ENOMEDIUM: ::c_int = 123; +pub const EMEDIUMTYPE: ::c_int = 124; +pub const ECANCELED: ::c_int = 125; +pub const ENOKEY: ::c_int = 126; +pub const EKEYEXPIRED: ::c_int = 127; +pub const EKEYREVOKED: ::c_int = 128; +pub const EKEYREJECTED: ::c_int = 129; +pub const EOWNERDEAD: ::c_int = 130; +pub const ENOTRECOVERABLE: ::c_int = 131; +pub const ERFKILL: ::c_int = 132; +pub const EHWPOISON: ::c_int = 133; + +pub const SO_REUSEADDR: ::c_int = 2; +pub const SO_TYPE: ::c_int = 3; +pub const SO_ERROR: ::c_int = 4; +pub const SO_DONTROUTE: ::c_int = 5; +pub const SO_BROADCAST: ::c_int = 6; +pub const SO_SNDBUF: ::c_int = 7; +pub const SO_RCVBUF: ::c_int = 8; +pub const SO_KEEPALIVE: ::c_int = 9; +pub const SO_OOBINLINE: ::c_int = 10; +pub const SO_LINGER: ::c_int = 13; +pub const SO_REUSEPORT: ::c_int = 15; +pub const SO_RCVLOWAT: ::c_int = 18; +pub const SO_SNDLOWAT: ::c_int = 19; +pub const SO_RCVTIMEO: ::c_int = 20; +pub const SO_SNDTIMEO: ::c_int = 21; +pub const SO_ACCEPTCONN: ::c_int = 30; + +pub const SA_ONSTACK: ::c_int = 0x08000000; +pub const SA_SIGINFO: ::c_int = 0x00000004; +pub const SA_NOCLDWAIT: ::c_int = 0x00000002; + +pub const SIGCHLD: ::c_int = 17; +pub const SIGBUS: ::c_int = 7; +pub const SIGTTIN: ::c_int = 21; +pub const SIGTTOU: ::c_int = 22; +pub const SIGXCPU: ::c_int = 24; +pub const SIGXFSZ: ::c_int = 25; +pub const SIGVTALRM: ::c_int = 26; +pub const SIGPROF: ::c_int = 27; +pub const SIGWINCH: ::c_int = 28; +pub const SIGUSR1: ::c_int = 10; +pub const SIGUSR2: ::c_int = 12; +pub const SIGCONT: ::c_int = 18; +pub const SIGSTOP: ::c_int = 19; +pub const SIGTSTP: ::c_int = 20; +pub const SIGURG: ::c_int = 23; +pub const SIGIO: ::c_int = 29; +pub const SIGSYS: ::c_int = 31; +pub const SIGSTKFLT: ::c_int = 16; +pub const SIGPOLL: ::c_int = 29; +pub const SIGPWR: ::c_int = 30; +pub const SIG_SETMASK: ::c_int = 2; +pub const SIG_BLOCK: ::c_int = 0x000000; +pub const SIG_UNBLOCK: ::c_int = 0x01; + +pub const EXTPROC: ::tcflag_t = 0x00010000; + +pub const MAP_HUGETLB: ::c_int = 0x040000; + +pub const F_GETLK: ::c_int = 12; +pub const F_GETOWN: ::c_int = 9; +pub const F_SETLK: ::c_int = 13; +pub const F_SETLKW: ::c_int = 14; +pub const F_SETOWN: ::c_int = 8; + +pub const VEOF: usize = 4; +pub const VEOL: usize = 11; +pub const VEOL2: usize = 16; +pub const VMIN: usize = 6; +pub const IEXTEN: ::tcflag_t = 0x00008000; +pub const TOSTOP: ::tcflag_t = 0x00000100; +pub const FLUSHO: ::tcflag_t = 0x00001000; + +pub const TCGETS: ::c_ulong = 0x5401; +pub const TCSETS: ::c_ulong = 0x5402; +pub const TCSETSW: ::c_ulong = 0x5403; +pub const TCSETSF: ::c_ulong = 0x5404; +pub const TCGETA: ::c_ulong = 0x5405; +pub const TCSETA: ::c_ulong = 0x5406; +pub const TCSETAW: ::c_ulong = 0x5407; +pub const TCSETAF: ::c_ulong = 0x5408; +pub const TCSBRK: ::c_ulong = 0x5409; +pub const TCXONC: ::c_ulong = 0x540A; +pub const TCFLSH: ::c_ulong = 0x540B; +pub const TIOCGSOFTCAR: ::c_ulong = 0x5419; +pub const TIOCSSOFTCAR: ::c_ulong = 0x541A; +pub const TIOCLINUX: ::c_ulong = 0x541C; +pub const TIOCGSERIAL: ::c_ulong = 0x541E; +pub const TIOCEXCL: ::c_ulong = 0x540C; +pub const TIOCNXCL: ::c_ulong = 0x540D; +pub const TIOCSCTTY: ::c_ulong = 0x540E; +pub const TIOCGPGRP: ::c_ulong = 0x540F; +pub const TIOCSPGRP: ::c_ulong = 0x5410; +pub const TIOCOUTQ: ::c_ulong = 0x5411; +pub const TIOCSTI: ::c_ulong = 0x5412; +pub const TIOCGWINSZ: ::c_ulong = 0x5413; +pub const TIOCSWINSZ: ::c_ulong = 0x5414; +pub const TIOCMGET: ::c_ulong = 0x5415; +pub const TIOCMBIS: ::c_ulong = 0x5416; +pub const TIOCMBIC: ::c_ulong = 0x5417; +pub const TIOCMSET: ::c_ulong = 0x5418; +pub const FIONREAD: ::c_ulong = 0x541B; +pub const TIOCCONS: ::c_ulong = 0x541D; + +pub const SYS_gettid: ::c_long = 224; diff --git a/deps/libc-0.2.8/src/unix/notbsd/linux/musl/b32/asmjs.rs b/deps/libc-0.2.8/src/unix/notbsd/linux/musl/b32/asmjs.rs new file mode 100644 index 000000000..13790ef4d --- /dev/null +++ b/deps/libc-0.2.8/src/unix/notbsd/linux/musl/b32/asmjs.rs @@ -0,0 +1,306 @@ +pub type c_char = u8; +pub type wchar_t = u32; + +s! { + pub struct stat { + pub st_dev: ::dev_t, + __st_dev_padding: ::c_int, + __st_ino_truncated: ::c_long, + pub st_mode: ::mode_t, + pub st_nlink: ::nlink_t, + pub st_uid: ::uid_t, + pub st_gid: ::gid_t, + pub st_rdev: ::dev_t, + __st_rdev_padding: ::c_int, + pub st_size: ::off_t, + pub st_blksize: ::blksize_t, + pub st_blocks: ::blkcnt_t, + pub st_atime: ::time_t, + pub st_atime_nsec: ::c_long, + pub st_mtime: ::time_t, + pub st_mtime_nsec: ::c_long, + pub st_ctime: ::time_t, + pub st_ctime_nsec: ::c_long, + pub st_ino: ::ino_t, + } + + pub struct stat64 { + pub st_dev: ::dev_t, + __st_dev_padding: ::c_int, + __st_ino_truncated: ::c_long, + pub st_mode: ::mode_t, + pub st_nlink: ::nlink_t, + pub st_uid: ::uid_t, + pub st_gid: ::gid_t, + pub st_rdev: ::dev_t, + __st_rdev_padding: ::c_int, + pub st_size: ::off_t, + pub st_blksize: ::blksize_t, + pub st_blocks: ::blkcnt_t, + pub st_atime: ::time_t, + pub st_atime_nsec: ::c_long, + pub st_mtime: ::time_t, + pub st_mtime_nsec: ::c_long, + pub st_ctime: ::time_t, + pub st_ctime_nsec: ::c_long, + pub st_ino: ::ino_t, + } + + pub struct stack_t { + pub ss_sp: *mut ::c_void, + pub ss_flags: ::c_int, + pub ss_size: ::size_t + } + + pub struct shmid_ds { + pub shm_perm: ::ipc_perm, + pub shm_segsz: ::size_t, + pub shm_atime: ::time_t, + __unused1: ::c_int, + pub shm_dtime: ::time_t, + __unused2: ::c_int, + pub shm_ctime: ::time_t, + __unused3: ::c_int, + pub shm_cpid: ::pid_t, + pub shm_lpid: ::pid_t, + pub shm_nattch: ::c_ulong, + __pad1: ::c_ulong, + __pad2: ::c_ulong, + } + + pub struct statfs { + pub f_type: ::c_ulong, + pub f_bsize: ::c_ulong, + pub f_blocks: ::fsblkcnt_t, + pub f_bfree: ::fsblkcnt_t, + pub f_bavail: ::fsblkcnt_t, + pub f_files: ::fsfilcnt_t, + pub f_ffree: ::fsfilcnt_t, + pub f_fsid: ::fsid_t, + pub f_namelen: ::c_ulong, + pub f_frsize: ::c_ulong, + pub f_flags: ::c_ulong, + pub f_spare: [::c_ulong; 4], + } +} + +pub const O_DIRECT: ::c_int = 0x4000; +pub const O_DIRECTORY: ::c_int = 0x10000; +pub const O_NOFOLLOW: ::c_int = 0x20000; +pub const O_ASYNC: ::c_int = 0x2000; + +pub const FIOCLEX: ::c_int = 0x5451; +pub const FIONBIO: ::c_int = 0x5421; + +pub const RLIMIT_RSS: ::c_int = 5; +pub const RLIMIT_NOFILE: ::c_int = 7; +pub const RLIMIT_AS: ::c_int = 9; +pub const RLIMIT_NPROC: ::c_int = 6; +pub const RLIMIT_MEMLOCK: ::c_int = 8; + +pub const O_APPEND: ::c_int = 1024; +pub const O_CREAT: ::c_int = 64; +pub const O_EXCL: ::c_int = 128; +pub const O_NOCTTY: ::c_int = 256; +pub const O_NONBLOCK: ::c_int = 2048; +pub const O_SYNC: ::c_int = 1052672; +pub const O_RSYNC: ::c_int = 1052672; +pub const O_DSYNC: ::c_int = 4096; + +pub const SOCK_NONBLOCK: ::c_int = 2048; + +pub const MAP_ANON: ::c_int = 0x0020; +pub const MAP_GROWSDOWN: ::c_int = 0x0100; +pub const MAP_DENYWRITE: ::c_int = 0x0800; +pub const MAP_EXECUTABLE: ::c_int = 0x01000; +pub const MAP_LOCKED: ::c_int = 0x02000; +pub const MAP_NORESERVE: ::c_int = 0x04000; +pub const MAP_POPULATE: ::c_int = 0x08000; +pub const MAP_NONBLOCK: ::c_int = 0x010000; +pub const MAP_STACK: ::c_int = 0x020000; + +pub const SOCK_STREAM: ::c_int = 1; +pub const SOCK_DGRAM: ::c_int = 2; + +pub const SOL_SOCKET: ::c_int = 1; + +pub const EDEADLK: ::c_int = 35; +pub const ENAMETOOLONG: ::c_int = 36; +pub const ENOLCK: ::c_int = 37; +pub const ENOSYS: ::c_int = 38; +pub const ENOTEMPTY: ::c_int = 39; +pub const ELOOP: ::c_int = 40; +pub const ENOMSG: ::c_int = 42; +pub const EIDRM: ::c_int = 43; +pub const ECHRNG: ::c_int = 44; +pub const EL2NSYNC: ::c_int = 45; +pub const EL3HLT: ::c_int = 46; +pub const EL3RST: ::c_int = 47; +pub const ELNRNG: ::c_int = 48; +pub const EUNATCH: ::c_int = 49; +pub const ENOCSI: ::c_int = 50; +pub const EL2HLT: ::c_int = 51; +pub const EBADE: ::c_int = 52; +pub const EBADR: ::c_int = 53; +pub const EXFULL: ::c_int = 54; +pub const ENOANO: ::c_int = 55; +pub const EBADRQC: ::c_int = 56; +pub const EBADSLT: ::c_int = 57; +pub const EDEADLOCK: ::c_int = EDEADLK; +pub const EMULTIHOP: ::c_int = 72; +pub const EBADMSG: ::c_int = 74; +pub const EOVERFLOW: ::c_int = 75; +pub const ENOTUNIQ: ::c_int = 76; +pub const EBADFD: ::c_int = 77; +pub const EREMCHG: ::c_int = 78; +pub const ELIBACC: ::c_int = 79; +pub const ELIBBAD: ::c_int = 80; +pub const ELIBSCN: ::c_int = 81; +pub const ELIBMAX: ::c_int = 82; +pub const ELIBEXEC: ::c_int = 83; +pub const EILSEQ: ::c_int = 84; +pub const ERESTART: ::c_int = 85; +pub const ESTRPIPE: ::c_int = 86; +pub const EUSERS: ::c_int = 87; +pub const ENOTSOCK: ::c_int = 88; +pub const EDESTADDRREQ: ::c_int = 89; +pub const EMSGSIZE: ::c_int = 90; +pub const EPROTOTYPE: ::c_int = 91; +pub const ENOPROTOOPT: ::c_int = 92; +pub const EPROTONOSUPPORT: ::c_int = 93; +pub const ESOCKTNOSUPPORT: ::c_int = 94; +pub const EOPNOTSUPP: ::c_int = 95; +pub const EPFNOSUPPORT: ::c_int = 96; +pub const EAFNOSUPPORT: ::c_int = 97; +pub const EADDRINUSE: ::c_int = 98; +pub const EADDRNOTAVAIL: ::c_int = 99; +pub const ENETDOWN: ::c_int = 100; +pub const ENETUNREACH: ::c_int = 101; +pub const ENETRESET: ::c_int = 102; +pub const ECONNABORTED: ::c_int = 103; +pub const ECONNRESET: ::c_int = 104; +pub const ENOBUFS: ::c_int = 105; +pub const EISCONN: ::c_int = 106; +pub const ENOTCONN: ::c_int = 107; +pub const ESHUTDOWN: ::c_int = 108; +pub const ETOOMANYREFS: ::c_int = 109; +pub const ETIMEDOUT: ::c_int = 110; +pub const ECONNREFUSED: ::c_int = 111; +pub const EHOSTDOWN: ::c_int = 112; +pub const EHOSTUNREACH: ::c_int = 113; +pub const EALREADY: ::c_int = 114; +pub const EINPROGRESS: ::c_int = 115; +pub const ESTALE: ::c_int = 116; +pub const EUCLEAN: ::c_int = 117; +pub const ENOTNAM: ::c_int = 118; +pub const ENAVAIL: ::c_int = 119; +pub const EISNAM: ::c_int = 120; +pub const EREMOTEIO: ::c_int = 121; +pub const EDQUOT: ::c_int = 122; +pub const ENOMEDIUM: ::c_int = 123; +pub const EMEDIUMTYPE: ::c_int = 124; +pub const ECANCELED: ::c_int = 125; +pub const ENOKEY: ::c_int = 126; +pub const EKEYEXPIRED: ::c_int = 127; +pub const EKEYREVOKED: ::c_int = 128; +pub const EKEYREJECTED: ::c_int = 129; +pub const EOWNERDEAD: ::c_int = 130; +pub const ENOTRECOVERABLE: ::c_int = 131; +pub const ERFKILL: ::c_int = 132; +pub const EHWPOISON: ::c_int = 133; + +pub const SO_REUSEADDR: ::c_int = 2; +pub const SO_TYPE: ::c_int = 3; +pub const SO_ERROR: ::c_int = 4; +pub const SO_DONTROUTE: ::c_int = 5; +pub const SO_BROADCAST: ::c_int = 6; +pub const SO_SNDBUF: ::c_int = 7; +pub const SO_RCVBUF: ::c_int = 8; +pub const SO_KEEPALIVE: ::c_int = 9; +pub const SO_OOBINLINE: ::c_int = 10; +pub const SO_LINGER: ::c_int = 13; +pub const SO_REUSEPORT: ::c_int = 15; +pub const SO_RCVLOWAT: ::c_int = 18; +pub const SO_SNDLOWAT: ::c_int = 19; +pub const SO_RCVTIMEO: ::c_int = 20; +pub const SO_SNDTIMEO: ::c_int = 21; +pub const SO_ACCEPTCONN: ::c_int = 30; + +pub const SA_ONSTACK: ::c_int = 0x08000000; +pub const SA_SIGINFO: ::c_int = 0x00000004; +pub const SA_NOCLDWAIT: ::c_int = 0x00000002; + +pub const SIGCHLD: ::c_int = 17; +pub const SIGBUS: ::c_int = 7; +pub const SIGTTIN: ::c_int = 21; +pub const SIGTTOU: ::c_int = 22; +pub const SIGXCPU: ::c_int = 24; +pub const SIGXFSZ: ::c_int = 25; +pub const SIGVTALRM: ::c_int = 26; +pub const SIGPROF: ::c_int = 27; +pub const SIGWINCH: ::c_int = 28; +pub const SIGUSR1: ::c_int = 10; +pub const SIGUSR2: ::c_int = 12; +pub const SIGCONT: ::c_int = 18; +pub const SIGSTOP: ::c_int = 19; +pub const SIGTSTP: ::c_int = 20; +pub const SIGURG: ::c_int = 23; +pub const SIGIO: ::c_int = 29; +pub const SIGSYS: ::c_int = 31; +pub const SIGSTKFLT: ::c_int = 16; +pub const SIGPOLL: ::c_int = 29; +pub const SIGPWR: ::c_int = 30; +pub const SIG_SETMASK: ::c_int = 2; +pub const SIG_BLOCK: ::c_int = 0x000000; +pub const SIG_UNBLOCK: ::c_int = 0x01; + +pub const EXTPROC: ::tcflag_t = 0x00010000; + +pub const MAP_HUGETLB: ::c_int = 0x040000; + +pub const F_GETLK: ::c_int = 12; +pub const F_GETOWN: ::c_int = 9; +pub const F_SETLK: ::c_int = 13; +pub const F_SETLKW: ::c_int = 14; +pub const F_SETOWN: ::c_int = 8; + +pub const VEOF: usize = 4; +pub const VEOL: usize = 11; +pub const VEOL2: usize = 16; +pub const VMIN: usize = 6; +pub const IEXTEN: ::tcflag_t = 0x00008000; +pub const TOSTOP: ::tcflag_t = 0x00000100; +pub const FLUSHO: ::tcflag_t = 0x00001000; + +pub const TCGETS: ::c_ulong = 0x5401; +pub const TCSETS: ::c_ulong = 0x5402; +pub const TCSETSW: ::c_ulong = 0x5403; +pub const TCSETSF: ::c_ulong = 0x5404; +pub const TCGETA: ::c_ulong = 0x5405; +pub const TCSETA: ::c_ulong = 0x5406; +pub const TCSETAW: ::c_ulong = 0x5407; +pub const TCSETAF: ::c_ulong = 0x5408; +pub const TCSBRK: ::c_ulong = 0x5409; +pub const TCXONC: ::c_ulong = 0x540A; +pub const TCFLSH: ::c_ulong = 0x540B; +pub const TIOCGSOFTCAR: ::c_ulong = 0x5419; +pub const TIOCSSOFTCAR: ::c_ulong = 0x541A; +pub const TIOCLINUX: ::c_ulong = 0x541C; +pub const TIOCGSERIAL: ::c_ulong = 0x541E; +pub const TIOCEXCL: ::c_ulong = 0x540C; +pub const TIOCNXCL: ::c_ulong = 0x540D; +pub const TIOCSCTTY: ::c_ulong = 0x540E; +pub const TIOCGPGRP: ::c_ulong = 0x540F; +pub const TIOCSPGRP: ::c_ulong = 0x5410; +pub const TIOCOUTQ: ::c_ulong = 0x5411; +pub const TIOCSTI: ::c_ulong = 0x5412; +pub const TIOCGWINSZ: ::c_ulong = 0x5413; +pub const TIOCSWINSZ: ::c_ulong = 0x5414; +pub const TIOCMGET: ::c_ulong = 0x5415; +pub const TIOCMBIS: ::c_ulong = 0x5416; +pub const TIOCMBIC: ::c_ulong = 0x5417; +pub const TIOCMSET: ::c_ulong = 0x5418; +pub const FIONREAD: ::c_ulong = 0x541B; +pub const TIOCCONS: ::c_ulong = 0x541D; + +pub const SYS_gettid: ::c_long = 224; // Valid for arm (32-bit) and x86 (32-bit) diff --git a/deps/libc-0.2.8/src/unix/notbsd/linux/musl/b32/mips.rs b/deps/libc-0.2.8/src/unix/notbsd/linux/musl/b32/mips.rs new file mode 100644 index 000000000..1fd9280f7 --- /dev/null +++ b/deps/libc-0.2.8/src/unix/notbsd/linux/musl/b32/mips.rs @@ -0,0 +1,305 @@ +pub type c_char = i8; +pub type wchar_t = ::c_int; + +s! { + pub struct stat { + pub st_dev: ::dev_t, + __st_padding1: [::c_long; 2], + pub st_ino: ::ino_t, + pub st_mode: ::mode_t, + pub st_nlink: ::nlink_t, + pub st_uid: ::uid_t, + pub st_gid: ::gid_t, + pub st_rdev: ::dev_t, + __st_padding2: [::c_long; 2], + pub st_size: ::off_t, + pub st_atime: ::time_t, + pub st_atime_nsec: ::c_long, + pub st_mtime: ::time_t, + pub st_mtime_nsec: ::c_long, + pub st_ctime: ::time_t, + pub st_ctime_nsec: ::c_long, + pub st_blksize: ::blksize_t, + __st_padding3: ::c_long, + pub st_blocks: ::blkcnt_t, + __st_padding4: [::c_long; 14], + } + + pub struct stat64 { + pub st_dev: ::dev_t, + __st_padding1: [::c_long; 2], + pub st_ino: ::ino64_t, + pub st_mode: ::mode_t, + pub st_nlink: ::nlink_t, + pub st_uid: ::uid_t, + pub st_gid: ::gid_t, + pub st_rdev: ::dev_t, + __st_padding2: [::c_long; 2], + pub st_size: ::off_t, + pub st_atime: ::time_t, + pub st_atime_nsec: ::c_long, + pub st_mtime: ::time_t, + pub st_mtime_nsec: ::c_long, + pub st_ctime: ::time_t, + pub st_ctime_nsec: ::c_long, + pub st_blksize: ::blksize_t, + __st_padding3: ::c_long, + pub st_blocks: ::blkcnt64_t, + __st_padding4: [::c_long; 14], + } + + pub struct stack_t { + pub ss_sp: *mut ::c_void, + pub ss_size: ::size_t, + pub ss_flags: ::c_int, + } + + pub struct shmid_ds { + pub shm_perm: ::ipc_perm, + pub shm_segsz: ::size_t, + pub shm_atime: ::time_t, + pub shm_dtime: ::time_t, + pub shm_ctime: ::time_t, + pub shm_cpid: ::pid_t, + pub shm_lpid: ::pid_t, + pub shm_nattch: ::c_ulong, + __pad1: ::c_ulong, + __pad2: ::c_ulong, + } + + pub struct statfs { + pub f_type: ::c_ulong, + pub f_bsize: ::c_ulong, + pub f_frsize: ::c_ulong, + pub f_blocks: ::fsblkcnt_t, + pub f_bfree: ::fsblkcnt_t, + pub f_files: ::fsfilcnt_t, + pub f_ffree: ::fsfilcnt_t, + pub f_bavail: ::fsblkcnt_t, + pub f_fsid: ::fsid_t, + pub f_namelen: ::c_ulong, + pub f_flags: ::c_ulong, + pub f_spare: [::c_ulong; 5], + } +} + +pub const O_DIRECT: ::c_int = 0o100000; +pub const O_DIRECTORY: ::c_int = 0o200000; +pub const O_NOFOLLOW: ::c_int = 0o400000; +pub const O_ASYNC: ::c_int = 0o10000; + +pub const FIOCLEX: ::c_int = 0x6601; +pub const FIONBIO: ::c_int = 0x667E; + +pub const RLIMIT_RSS: ::c_int = 7; +pub const RLIMIT_NOFILE: ::c_int = 5; +pub const RLIMIT_AS: ::c_int = 6; +pub const RLIMIT_NPROC: ::c_int = 8; +pub const RLIMIT_MEMLOCK: ::c_int = 9; + +pub const O_APPEND: ::c_int = 0o010; +pub const O_CREAT: ::c_int = 0o400; +pub const O_EXCL: ::c_int = 0o2000; +pub const O_NOCTTY: ::c_int = 0o4000; +pub const O_NONBLOCK: ::c_int = 0o200; +pub const O_SYNC: ::c_int = 0o40020; +pub const O_RSYNC: ::c_int = 0o40020; +pub const O_DSYNC: ::c_int = 0o020; + +pub const SOCK_NONBLOCK: ::c_int = 0o200; + +pub const MAP_ANON: ::c_int = 0x800; +pub const MAP_GROWSDOWN: ::c_int = 0x1000; +pub const MAP_DENYWRITE: ::c_int = 0x2000; +pub const MAP_EXECUTABLE: ::c_int = 0x4000; +pub const MAP_LOCKED: ::c_int = 0x8000; +pub const MAP_NORESERVE: ::c_int = 0x0400; +pub const MAP_POPULATE: ::c_int = 0x10000; +pub const MAP_NONBLOCK: ::c_int = 0x20000; +pub const MAP_STACK: ::c_int = 0x40000; + +pub const EDEADLK: ::c_int = 45; +pub const ENAMETOOLONG: ::c_int = 78; +pub const ENOLCK: ::c_int = 46; +pub const ENOSYS: ::c_int = 89; +pub const ENOTEMPTY: ::c_int = 93; +pub const ELOOP: ::c_int = 90; +pub const ENOMSG: ::c_int = 35; +pub const EIDRM: ::c_int = 36; +pub const ECHRNG: ::c_int = 37; +pub const EL2NSYNC: ::c_int = 38; +pub const EL3HLT: ::c_int = 39; +pub const EL3RST: ::c_int = 40; +pub const ELNRNG: ::c_int = 41; +pub const EUNATCH: ::c_int = 42; +pub const ENOCSI: ::c_int = 43; +pub const EL2HLT: ::c_int = 44; +pub const EBADE: ::c_int = 50; +pub const EBADR: ::c_int = 51; +pub const EXFULL: ::c_int = 52; +pub const ENOANO: ::c_int = 53; +pub const EBADRQC: ::c_int = 54; +pub const EBADSLT: ::c_int = 55; +pub const EDEADLOCK: ::c_int = 56; +pub const EMULTIHOP: ::c_int = 74; +pub const EOVERFLOW: ::c_int = 79; +pub const ENOTUNIQ: ::c_int = 80; +pub const EBADFD: ::c_int = 81; +pub const EBADMSG: ::c_int = 77; +pub const EREMCHG: ::c_int = 82; +pub const ELIBACC: ::c_int = 83; +pub const ELIBBAD: ::c_int = 84; +pub const ELIBSCN: ::c_int = 85; +pub const ELIBMAX: ::c_int = 86; +pub const ELIBEXEC: ::c_int = 87; +pub const EILSEQ: ::c_int = 88; +pub const ERESTART: ::c_int = 91; +pub const ESTRPIPE: ::c_int = 92; +pub const EUSERS: ::c_int = 94; +pub const ENOTSOCK: ::c_int = 95; +pub const EDESTADDRREQ: ::c_int = 96; +pub const EMSGSIZE: ::c_int = 97; +pub const EPROTOTYPE: ::c_int = 98; +pub const ENOPROTOOPT: ::c_int = 99; +pub const EPROTONOSUPPORT: ::c_int = 120; +pub const ESOCKTNOSUPPORT: ::c_int = 121; +pub const EOPNOTSUPP: ::c_int = 122; +pub const EPFNOSUPPORT: ::c_int = 123; +pub const EAFNOSUPPORT: ::c_int = 124; +pub const EADDRINUSE: ::c_int = 125; +pub const EADDRNOTAVAIL: ::c_int = 126; +pub const ENETDOWN: ::c_int = 127; +pub const ENETUNREACH: ::c_int = 128; +pub const ENETRESET: ::c_int = 129; +pub const ECONNABORTED: ::c_int = 130; +pub const ECONNRESET: ::c_int = 131; +pub const ENOBUFS: ::c_int = 132; +pub const EISCONN: ::c_int = 133; +pub const ENOTCONN: ::c_int = 134; +pub const ESHUTDOWN: ::c_int = 143; +pub const ETOOMANYREFS: ::c_int = 144; +pub const ETIMEDOUT: ::c_int = 145; +pub const ECONNREFUSED: ::c_int = 146; +pub const EHOSTDOWN: ::c_int = 147; +pub const EHOSTUNREACH: ::c_int = 148; +pub const EALREADY: ::c_int = 149; +pub const EINPROGRESS: ::c_int = 150; +pub const ESTALE: ::c_int = 151; +pub const EUCLEAN: ::c_int = 135; +pub const ENOTNAM: ::c_int = 137; +pub const ENAVAIL: ::c_int = 138; +pub const EISNAM: ::c_int = 139; +pub const EREMOTEIO: ::c_int = 140; +pub const EDQUOT: ::c_int = 1133; +pub const ENOMEDIUM: ::c_int = 159; +pub const EMEDIUMTYPE: ::c_int = 160; +pub const ECANCELED: ::c_int = 158; +pub const ENOKEY: ::c_int = 161; +pub const EKEYEXPIRED: ::c_int = 162; +pub const EKEYREVOKED: ::c_int = 163; +pub const EKEYREJECTED: ::c_int = 164; +pub const EOWNERDEAD: ::c_int = 165; +pub const ENOTRECOVERABLE: ::c_int = 166; +pub const EHWPOISON: ::c_int = 168; +pub const ERFKILL: ::c_int = 167; + +pub const SOCK_STREAM: ::c_int = 2; +pub const SOCK_DGRAM: ::c_int = 1; + +pub const SOL_SOCKET: ::c_int = 65535; + +pub const SO_REUSEADDR: ::c_int = 0x0004; +pub const SO_TYPE: ::c_int = 0x1008; +pub const SO_ERROR: ::c_int = 0x1007; +pub const SO_DONTROUTE: ::c_int = 0x0010; +pub const SO_BROADCAST: ::c_int = 0x0020; +pub const SO_SNDBUF: ::c_int = 0x1001; +pub const SO_RCVBUF: ::c_int = 0x1002; +pub const SO_KEEPALIVE: ::c_int = 0x0008; +pub const SO_OOBINLINE: ::c_int = 0x0100; +pub const SO_LINGER: ::c_int = 0x0080; +pub const SO_REUSEPORT: ::c_int = 0x200; +pub const SO_RCVLOWAT: ::c_int = 0x1004; +pub const SO_SNDLOWAT: ::c_int = 0x1003; +pub const SO_RCVTIMEO: ::c_int = 0x1006; +pub const SO_SNDTIMEO: ::c_int = 0x1005; +pub const SO_ACCEPTCONN: ::c_int = 0x1009; + +pub const SA_ONSTACK: ::c_int = 0x08000000; +pub const SA_SIGINFO: ::c_int = 8; +pub const SA_NOCLDWAIT: ::c_int = 0x10000; + +pub const SIGCHLD: ::c_int = 18; +pub const SIGBUS: ::c_int = 10; +pub const SIGTTIN: ::c_int = 26; +pub const SIGTTOU: ::c_int = 27; +pub const SIGXCPU: ::c_int = 30; +pub const SIGXFSZ: ::c_int = 31; +pub const SIGVTALRM: ::c_int = 28; +pub const SIGPROF: ::c_int = 29; +pub const SIGWINCH: ::c_int = 20; +pub const SIGUSR1: ::c_int = 16; +pub const SIGUSR2: ::c_int = 17; +pub const SIGCONT: ::c_int = 25; +pub const SIGSTOP: ::c_int = 23; +pub const SIGTSTP: ::c_int = 24; +pub const SIGURG: ::c_int = 21; +pub const SIGIO: ::c_int = 22; +pub const SIGSYS: ::c_int = 12; +pub const SIGSTKFLT: ::c_int = 7; +pub const SIGPOLL: ::c_int = ::SIGIO; +pub const SIGPWR: ::c_int = 19; +pub const SIG_SETMASK: ::c_int = 3; +pub const SIG_BLOCK: ::c_int = 1; +pub const SIG_UNBLOCK: ::c_int = 2; + +pub const EXTPROC: ::tcflag_t = 0o200000; + +pub const MAP_HUGETLB: ::c_int = 0x80000; + +pub const F_GETLK: ::c_int = 33; +pub const F_GETOWN: ::c_int = 23; +pub const F_SETLK: ::c_int = 34; +pub const F_SETLKW: ::c_int = 35; +pub const F_SETOWN: ::c_int = 24; + +pub const VEOF: usize = 16; +pub const VEOL: usize = 17; +pub const VEOL2: usize = 6; +pub const VMIN: usize = 4; +pub const IEXTEN: ::tcflag_t = 0o000400; +pub const TOSTOP: ::tcflag_t = 0o100000; +pub const FLUSHO: ::tcflag_t = 0o020000; + +pub const TCGETS: ::c_ulong = 0x540D; +pub const TCSETS: ::c_ulong = 0x540E; +pub const TCSETSW: ::c_ulong = 0x540F; +pub const TCSETSF: ::c_ulong = 0x5410; +pub const TCGETA: ::c_ulong = 0x5401; +pub const TCSETA: ::c_ulong = 0x5402; +pub const TCSETAW: ::c_ulong = 0x5403; +pub const TCSETAF: ::c_ulong = 0x5404; +pub const TCSBRK: ::c_ulong = 0x5405; +pub const TCXONC: ::c_ulong = 0x5406; +pub const TCFLSH: ::c_ulong = 0x5407; +pub const TIOCGSOFTCAR: ::c_ulong = 0x5481; +pub const TIOCSSOFTCAR: ::c_ulong = 0x5482; +pub const TIOCLINUX: ::c_ulong = 0x5483; +pub const TIOCGSERIAL: ::c_ulong = 0x5484; +pub const TIOCEXCL: ::c_ulong = 0x740D; +pub const TIOCNXCL: ::c_ulong = 0x740E; +pub const TIOCSCTTY: ::c_ulong = 0x5480; +pub const TIOCGPGRP: ::c_ulong = 0x40047477; +pub const TIOCSPGRP: ::c_ulong = 0x80047476; +pub const TIOCOUTQ: ::c_ulong = 0x7472; +pub const TIOCSTI: ::c_ulong = 0x5472; +pub const TIOCGWINSZ: ::c_ulong = 0x40087468; +pub const TIOCSWINSZ: ::c_ulong = 0x80087467; +pub const TIOCMGET: ::c_ulong = 0x741D; +pub const TIOCMBIS: ::c_ulong = 0x741B; +pub const TIOCMBIC: ::c_ulong = 0x741C; +pub const TIOCMSET: ::c_ulong = 0x741D; +pub const FIONREAD: ::c_ulong = 0x467F; +pub const TIOCCONS: ::c_ulong = 0x80047478; + +pub const SYS_gettid: ::c_long = 4222; // Valid for O32 diff --git a/deps/libc-0.2.8/src/unix/notbsd/linux/musl/b32/mod.rs b/deps/libc-0.2.8/src/unix/notbsd/linux/musl/b32/mod.rs new file mode 100644 index 000000000..668e8fc95 --- /dev/null +++ b/deps/libc-0.2.8/src/unix/notbsd/linux/musl/b32/mod.rs @@ -0,0 +1,42 @@ +pub type c_long = i32; +pub type c_ulong = u32; +pub type nlink_t = u32; + +s! { + pub struct pthread_attr_t { + __size: [u32; 9] + } + + pub struct sigset_t { + __val: [::c_ulong; 32], + } + + pub struct msghdr { + pub msg_name: *mut ::c_void, + pub msg_namelen: ::socklen_t, + pub msg_iov: *mut ::iovec, + pub msg_iovlen: ::c_int, + pub msg_control: *mut ::c_void, + pub msg_controllen: ::socklen_t, + pub msg_flags: ::c_int, + } +} + +pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 32; +pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 24; + +cfg_if! { + if #[cfg(any(target_arch = "x86"))] { + mod x86; + pub use self::x86::*; + } else if #[cfg(any(target_arch = "mips"))] { + mod mips; + pub use self::mips::*; + } else if #[cfg(any(target_arch = "arm"))] { + mod arm; + pub use self::arm::*; + } else if #[cfg(any(target_arch = "asmjs"))] { + mod asmjs; + pub use self::asmjs::*; + } else { } +} diff --git a/deps/libc-0.2.8/src/unix/notbsd/linux/musl/b32/x86.rs b/deps/libc-0.2.8/src/unix/notbsd/linux/musl/b32/x86.rs new file mode 100644 index 000000000..6a77e8191 --- /dev/null +++ b/deps/libc-0.2.8/src/unix/notbsd/linux/musl/b32/x86.rs @@ -0,0 +1,307 @@ +pub type c_char = i8; +pub type wchar_t = i32; + +s! { + pub struct stat { + pub st_dev: ::dev_t, + __st_dev_padding: ::c_int, + __st_ino_truncated: ::c_long, + pub st_mode: ::mode_t, + pub st_nlink: ::nlink_t, + pub st_uid: ::uid_t, + pub st_gid: ::gid_t, + pub st_rdev: ::dev_t, + __st_rdev_padding: ::c_int, + pub st_size: ::off_t, + pub st_blksize: ::blksize_t, + pub st_blocks: ::blkcnt_t, + pub st_atime: ::time_t, + pub st_atime_nsec: ::c_long, + pub st_mtime: ::time_t, + pub st_mtime_nsec: ::c_long, + pub st_ctime: ::time_t, + pub st_ctime_nsec: ::c_long, + pub st_ino: ::ino_t, + } + + pub struct stat64 { + pub st_dev: ::dev_t, + __st_dev_padding: ::c_int, + __st_ino_truncated: ::c_long, + pub st_mode: ::mode_t, + pub st_nlink: ::nlink_t, + pub st_uid: ::uid_t, + pub st_gid: ::gid_t, + pub st_rdev: ::dev_t, + __st_rdev_padding: ::c_int, + pub st_size: ::off_t, + pub st_blksize: ::blksize_t, + pub st_blocks: ::blkcnt_t, + pub st_atime: ::time_t, + pub st_atime_nsec: ::c_long, + pub st_mtime: ::time_t, + pub st_mtime_nsec: ::c_long, + pub st_ctime: ::time_t, + pub st_ctime_nsec: ::c_long, + pub st_ino: ::ino_t, + } + + pub struct stack_t { + pub ss_sp: *mut ::c_void, + pub ss_flags: ::c_int, + pub ss_size: ::size_t + } + + pub struct shmid_ds { + pub shm_perm: ::ipc_perm, + pub shm_segsz: ::size_t, + pub shm_atime: ::time_t, + __unused1: ::c_int, + pub shm_dtime: ::time_t, + __unused2: ::c_int, + pub shm_ctime: ::time_t, + __unused3: ::c_int, + pub shm_cpid: ::pid_t, + pub shm_lpid: ::pid_t, + pub shm_nattch: ::c_ulong, + __pad1: ::c_ulong, + __pad2: ::c_ulong, + } + + pub struct statfs { + pub f_type: ::c_ulong, + pub f_bsize: ::c_ulong, + pub f_blocks: ::fsblkcnt_t, + pub f_bfree: ::fsblkcnt_t, + pub f_bavail: ::fsblkcnt_t, + pub f_files: ::fsfilcnt_t, + pub f_ffree: ::fsfilcnt_t, + pub f_fsid: ::fsid_t, + pub f_namelen: ::c_ulong, + pub f_frsize: ::c_ulong, + pub f_flags: ::c_ulong, + pub f_spare: [::c_ulong; 4], + } +} + +pub const O_DIRECT: ::c_int = 0x4000; +pub const O_DIRECTORY: ::c_int = 0x10000; +pub const O_NOFOLLOW: ::c_int = 0x20000; +pub const O_ASYNC: ::c_int = 0x2000; + +pub const FIOCLEX: ::c_int = 0x5451; +pub const FIONBIO: ::c_int = 0x5421; + +pub const RLIMIT_RSS: ::c_int = 5; +pub const RLIMIT_NOFILE: ::c_int = 7; +pub const RLIMIT_AS: ::c_int = 9; +pub const RLIMIT_NPROC: ::c_int = 6; +pub const RLIMIT_MEMLOCK: ::c_int = 8; + +pub const O_APPEND: ::c_int = 1024; +pub const O_CREAT: ::c_int = 64; +pub const O_EXCL: ::c_int = 128; +pub const O_NOCTTY: ::c_int = 256; +pub const O_NONBLOCK: ::c_int = 2048; +pub const O_SYNC: ::c_int = 1052672; +pub const O_RSYNC: ::c_int = 1052672; +pub const O_DSYNC: ::c_int = 4096; + +pub const SOCK_NONBLOCK: ::c_int = 2048; + +pub const MAP_ANON: ::c_int = 0x0020; +pub const MAP_GROWSDOWN: ::c_int = 0x0100; +pub const MAP_DENYWRITE: ::c_int = 0x0800; +pub const MAP_EXECUTABLE: ::c_int = 0x01000; +pub const MAP_LOCKED: ::c_int = 0x02000; +pub const MAP_NORESERVE: ::c_int = 0x04000; +pub const MAP_POPULATE: ::c_int = 0x08000; +pub const MAP_NONBLOCK: ::c_int = 0x010000; +pub const MAP_STACK: ::c_int = 0x020000; + +pub const SOCK_STREAM: ::c_int = 1; +pub const SOCK_DGRAM: ::c_int = 2; + +pub const SOL_SOCKET: ::c_int = 1; + +pub const EDEADLK: ::c_int = 35; +pub const ENAMETOOLONG: ::c_int = 36; +pub const ENOLCK: ::c_int = 37; +pub const ENOSYS: ::c_int = 38; +pub const ENOTEMPTY: ::c_int = 39; +pub const ELOOP: ::c_int = 40; +pub const ENOMSG: ::c_int = 42; +pub const EIDRM: ::c_int = 43; +pub const ECHRNG: ::c_int = 44; +pub const EL2NSYNC: ::c_int = 45; +pub const EL3HLT: ::c_int = 46; +pub const EL3RST: ::c_int = 47; +pub const ELNRNG: ::c_int = 48; +pub const EUNATCH: ::c_int = 49; +pub const ENOCSI: ::c_int = 50; +pub const EL2HLT: ::c_int = 51; +pub const EBADE: ::c_int = 52; +pub const EBADR: ::c_int = 53; +pub const EXFULL: ::c_int = 54; +pub const ENOANO: ::c_int = 55; +pub const EBADRQC: ::c_int = 56; +pub const EBADSLT: ::c_int = 57; +pub const EDEADLOCK: ::c_int = EDEADLK; +pub const EMULTIHOP: ::c_int = 72; +pub const EBADMSG: ::c_int = 74; +pub const EOVERFLOW: ::c_int = 75; +pub const ENOTUNIQ: ::c_int = 76; +pub const EBADFD: ::c_int = 77; +pub const EREMCHG: ::c_int = 78; +pub const ELIBACC: ::c_int = 79; +pub const ELIBBAD: ::c_int = 80; +pub const ELIBSCN: ::c_int = 81; +pub const ELIBMAX: ::c_int = 82; +pub const ELIBEXEC: ::c_int = 83; +pub const EILSEQ: ::c_int = 84; +pub const ERESTART: ::c_int = 85; +pub const ESTRPIPE: ::c_int = 86; +pub const EUSERS: ::c_int = 87; +pub const ENOTSOCK: ::c_int = 88; +pub const EDESTADDRREQ: ::c_int = 89; +pub const EMSGSIZE: ::c_int = 90; +pub const EPROTOTYPE: ::c_int = 91; +pub const ENOPROTOOPT: ::c_int = 92; +pub const EPROTONOSUPPORT: ::c_int = 93; +pub const ESOCKTNOSUPPORT: ::c_int = 94; +pub const EOPNOTSUPP: ::c_int = 95; +pub const EPFNOSUPPORT: ::c_int = 96; +pub const EAFNOSUPPORT: ::c_int = 97; +pub const EADDRINUSE: ::c_int = 98; +pub const EADDRNOTAVAIL: ::c_int = 99; +pub const ENETDOWN: ::c_int = 100; +pub const ENETUNREACH: ::c_int = 101; +pub const ENETRESET: ::c_int = 102; +pub const ECONNABORTED: ::c_int = 103; +pub const ECONNRESET: ::c_int = 104; +pub const ENOBUFS: ::c_int = 105; +pub const EISCONN: ::c_int = 106; +pub const ENOTCONN: ::c_int = 107; +pub const ESHUTDOWN: ::c_int = 108; +pub const ETOOMANYREFS: ::c_int = 109; +pub const ETIMEDOUT: ::c_int = 110; +pub const ECONNREFUSED: ::c_int = 111; +pub const EHOSTDOWN: ::c_int = 112; +pub const EHOSTUNREACH: ::c_int = 113; +pub const EALREADY: ::c_int = 114; +pub const EINPROGRESS: ::c_int = 115; +pub const ESTALE: ::c_int = 116; +pub const EUCLEAN: ::c_int = 117; +pub const ENOTNAM: ::c_int = 118; +pub const ENAVAIL: ::c_int = 119; +pub const EISNAM: ::c_int = 120; +pub const EREMOTEIO: ::c_int = 121; +pub const EDQUOT: ::c_int = 122; +pub const ENOMEDIUM: ::c_int = 123; +pub const EMEDIUMTYPE: ::c_int = 124; +pub const ECANCELED: ::c_int = 125; +pub const ENOKEY: ::c_int = 126; +pub const EKEYEXPIRED: ::c_int = 127; +pub const EKEYREVOKED: ::c_int = 128; +pub const EKEYREJECTED: ::c_int = 129; +pub const EOWNERDEAD: ::c_int = 130; +pub const ENOTRECOVERABLE: ::c_int = 131; +pub const ERFKILL: ::c_int = 132; +pub const EHWPOISON: ::c_int = 133; + +pub const SO_REUSEADDR: ::c_int = 2; +pub const SO_TYPE: ::c_int = 3; +pub const SO_ERROR: ::c_int = 4; +pub const SO_DONTROUTE: ::c_int = 5; +pub const SO_BROADCAST: ::c_int = 6; +pub const SO_SNDBUF: ::c_int = 7; +pub const SO_RCVBUF: ::c_int = 8; +pub const SO_KEEPALIVE: ::c_int = 9; +pub const SO_OOBINLINE: ::c_int = 10; +pub const SO_LINGER: ::c_int = 13; +pub const SO_REUSEPORT: ::c_int = 15; +pub const SO_RCVLOWAT: ::c_int = 18; +pub const SO_SNDLOWAT: ::c_int = 19; +pub const SO_RCVTIMEO: ::c_int = 20; +pub const SO_SNDTIMEO: ::c_int = 21; +pub const SO_ACCEPTCONN: ::c_int = 30; + +pub const SA_ONSTACK: ::c_int = 0x08000000; +pub const SA_SIGINFO: ::c_int = 0x00000004; +pub const SA_NOCLDWAIT: ::c_int = 0x00000002; + +pub const SIGCHLD: ::c_int = 17; +pub const SIGBUS: ::c_int = 7; +pub const SIGTTIN: ::c_int = 21; +pub const SIGTTOU: ::c_int = 22; +pub const SIGXCPU: ::c_int = 24; +pub const SIGXFSZ: ::c_int = 25; +pub const SIGVTALRM: ::c_int = 26; +pub const SIGPROF: ::c_int = 27; +pub const SIGWINCH: ::c_int = 28; +pub const SIGUSR1: ::c_int = 10; +pub const SIGUSR2: ::c_int = 12; +pub const SIGCONT: ::c_int = 18; +pub const SIGSTOP: ::c_int = 19; +pub const SIGTSTP: ::c_int = 20; +pub const SIGURG: ::c_int = 23; +pub const SIGIO: ::c_int = 29; +pub const SIGSYS: ::c_int = 31; +pub const SIGSTKFLT: ::c_int = 16; +pub const SIGPOLL: ::c_int = 29; +pub const SIGPWR: ::c_int = 30; +pub const SIG_SETMASK: ::c_int = 2; +pub const SIG_BLOCK: ::c_int = 0x000000; +pub const SIG_UNBLOCK: ::c_int = 0x01; + +pub const EXTPROC: ::tcflag_t = 0x00010000; + +pub const MAP_HUGETLB: ::c_int = 0x040000; +pub const MAP_32BIT: ::c_int = 0x0040; + +pub const F_GETLK: ::c_int = 12; +pub const F_GETOWN: ::c_int = 9; +pub const F_SETLK: ::c_int = 13; +pub const F_SETLKW: ::c_int = 14; +pub const F_SETOWN: ::c_int = 8; + +pub const VEOF: usize = 4; +pub const VEOL: usize = 11; +pub const VEOL2: usize = 16; +pub const VMIN: usize = 6; +pub const IEXTEN: ::tcflag_t = 0x00008000; +pub const TOSTOP: ::tcflag_t = 0x00000100; +pub const FLUSHO: ::tcflag_t = 0x00001000; + +pub const TCGETS: ::c_ulong = 0x5401; +pub const TCSETS: ::c_ulong = 0x5402; +pub const TCSETSW: ::c_ulong = 0x5403; +pub const TCSETSF: ::c_ulong = 0x5404; +pub const TCGETA: ::c_ulong = 0x5405; +pub const TCSETA: ::c_ulong = 0x5406; +pub const TCSETAW: ::c_ulong = 0x5407; +pub const TCSETAF: ::c_ulong = 0x5408; +pub const TCSBRK: ::c_ulong = 0x5409; +pub const TCXONC: ::c_ulong = 0x540A; +pub const TCFLSH: ::c_ulong = 0x540B; +pub const TIOCGSOFTCAR: ::c_ulong = 0x5419; +pub const TIOCSSOFTCAR: ::c_ulong = 0x541A; +pub const TIOCLINUX: ::c_ulong = 0x541C; +pub const TIOCGSERIAL: ::c_ulong = 0x541E; +pub const TIOCEXCL: ::c_ulong = 0x540C; +pub const TIOCNXCL: ::c_ulong = 0x540D; +pub const TIOCSCTTY: ::c_ulong = 0x540E; +pub const TIOCGPGRP: ::c_ulong = 0x540F; +pub const TIOCSPGRP: ::c_ulong = 0x5410; +pub const TIOCOUTQ: ::c_ulong = 0x5411; +pub const TIOCSTI: ::c_ulong = 0x5412; +pub const TIOCGWINSZ: ::c_ulong = 0x5413; +pub const TIOCSWINSZ: ::c_ulong = 0x5414; +pub const TIOCMGET: ::c_ulong = 0x5415; +pub const TIOCMBIS: ::c_ulong = 0x5416; +pub const TIOCMBIC: ::c_ulong = 0x5417; +pub const TIOCMSET: ::c_ulong = 0x5418; +pub const FIONREAD: ::c_ulong = 0x541B; +pub const TIOCCONS: ::c_ulong = 0x541D; + +pub const SYS_gettid: ::c_long = 224; diff --git a/deps/libc-0.2.8/src/unix/notbsd/linux/musl/b64/mod.rs b/deps/libc-0.2.8/src/unix/notbsd/linux/musl/b64/mod.rs new file mode 100644 index 000000000..c49ab6d2b --- /dev/null +++ b/deps/libc-0.2.8/src/unix/notbsd/linux/musl/b64/mod.rs @@ -0,0 +1,328 @@ +pub type c_char = i8; +pub type wchar_t = i32; +pub type c_long = i64; +pub type c_ulong = u64; +pub type nlink_t = u64; + +s! { + pub struct stat { + pub st_dev: ::dev_t, + pub st_ino: ::ino_t, + pub st_nlink: ::nlink_t, + pub st_mode: ::mode_t, + pub st_uid: ::uid_t, + pub st_gid: ::gid_t, + __pad0: ::c_int, + pub st_rdev: ::dev_t, + pub st_size: ::off_t, + pub st_blksize: ::blksize_t, + pub st_blocks: ::blkcnt_t, + pub st_atime: ::time_t, + pub st_atime_nsec: ::c_long, + pub st_mtime: ::time_t, + pub st_mtime_nsec: ::c_long, + pub st_ctime: ::time_t, + pub st_ctime_nsec: ::c_long, + __unused: [::c_long; 3], + } + + pub struct stat64 { + pub st_dev: ::dev_t, + pub st_ino: ::ino64_t, + pub st_nlink: ::nlink_t, + pub st_mode: ::mode_t, + pub st_uid: ::uid_t, + pub st_gid: ::gid_t, + __pad0: ::c_int, + pub st_rdev: ::dev_t, + pub st_size: ::off_t, + pub st_blksize: ::blksize_t, + pub st_blocks: ::blkcnt64_t, + pub st_atime: ::time_t, + pub st_atime_nsec: ::c_long, + pub st_mtime: ::time_t, + pub st_mtime_nsec: ::c_long, + pub st_ctime: ::time_t, + pub st_ctime_nsec: ::c_long, + __reserved: [::c_long; 3], + } + + pub struct stack_t { + pub ss_sp: *mut ::c_void, + pub ss_flags: ::c_int, + pub ss_size: ::size_t + } + + pub struct pthread_attr_t { + __size: [u64; 7] + } + + pub struct sigset_t { + __val: [::c_ulong; 16], + } + + pub struct shmid_ds { + pub shm_perm: ::ipc_perm, + pub shm_segsz: ::size_t, + pub shm_atime: ::time_t, + pub shm_dtime: ::time_t, + pub shm_ctime: ::time_t, + pub shm_cpid: ::pid_t, + pub shm_lpid: ::pid_t, + pub shm_nattch: ::c_ulong, + __pad1: ::c_ulong, + __pad2: ::c_ulong, + } + + pub struct statfs { + pub f_type: ::c_ulong, + pub f_bsize: ::c_ulong, + pub f_blocks: ::fsblkcnt_t, + pub f_bfree: ::fsblkcnt_t, + pub f_bavail: ::fsblkcnt_t, + pub f_files: ::fsfilcnt_t, + pub f_ffree: ::fsfilcnt_t, + pub f_fsid: ::fsid_t, + pub f_namelen: ::c_ulong, + pub f_frsize: ::c_ulong, + pub f_flags: ::c_ulong, + pub f_spare: [::c_ulong; 4], + } + + pub struct msghdr { + pub msg_name: *mut ::c_void, + pub msg_namelen: ::socklen_t, + pub msg_iov: *mut ::iovec, + pub msg_iovlen: ::c_int, + __pad1: ::c_int, + pub msg_control: *mut ::c_void, + pub msg_controllen: ::socklen_t, + __pad2: ::socklen_t, + pub msg_flags: ::c_int, + } +} + +pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56; +pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40; + +pub const O_DIRECT: ::c_int = 0x4000; +pub const O_DIRECTORY: ::c_int = 0x10000; +pub const O_NOFOLLOW: ::c_int = 0x20000; +pub const O_ASYNC: ::c_int = 0x2000; + +pub const FIOCLEX: ::c_int = 0x5451; +pub const FIONBIO: ::c_int = 0x5421; + +pub const RLIMIT_RSS: ::c_int = 5; +pub const RLIMIT_NOFILE: ::c_int = 7; +pub const RLIMIT_AS: ::c_int = 9; +pub const RLIMIT_NPROC: ::c_int = 6; +pub const RLIMIT_MEMLOCK: ::c_int = 8; + +pub const O_APPEND: ::c_int = 1024; +pub const O_CREAT: ::c_int = 64; +pub const O_EXCL: ::c_int = 128; +pub const O_NOCTTY: ::c_int = 256; +pub const O_NONBLOCK: ::c_int = 2048; +pub const O_SYNC: ::c_int = 1052672; +pub const O_RSYNC: ::c_int = 1052672; +pub const O_DSYNC: ::c_int = 4096; + +pub const SOCK_NONBLOCK: ::c_int = 2048; + +pub const MAP_ANON: ::c_int = 0x0020; +pub const MAP_GROWSDOWN: ::c_int = 0x0100; +pub const MAP_DENYWRITE: ::c_int = 0x0800; +pub const MAP_EXECUTABLE: ::c_int = 0x01000; +pub const MAP_LOCKED: ::c_int = 0x02000; +pub const MAP_NORESERVE: ::c_int = 0x04000; +pub const MAP_POPULATE: ::c_int = 0x08000; +pub const MAP_NONBLOCK: ::c_int = 0x010000; +pub const MAP_STACK: ::c_int = 0x020000; +pub const MAP_32BIT: ::c_int = 0x0040; + +pub const SOCK_STREAM: ::c_int = 1; +pub const SOCK_DGRAM: ::c_int = 2; + +pub const SOL_SOCKET: ::c_int = 1; + +pub const EDEADLK: ::c_int = 35; +pub const ENAMETOOLONG: ::c_int = 36; +pub const ENOLCK: ::c_int = 37; +pub const ENOSYS: ::c_int = 38; +pub const ENOTEMPTY: ::c_int = 39; +pub const ELOOP: ::c_int = 40; +pub const ENOMSG: ::c_int = 42; +pub const EIDRM: ::c_int = 43; +pub const ECHRNG: ::c_int = 44; +pub const EL2NSYNC: ::c_int = 45; +pub const EL3HLT: ::c_int = 46; +pub const EL3RST: ::c_int = 47; +pub const ELNRNG: ::c_int = 48; +pub const EUNATCH: ::c_int = 49; +pub const ENOCSI: ::c_int = 50; +pub const EL2HLT: ::c_int = 51; +pub const EBADE: ::c_int = 52; +pub const EBADR: ::c_int = 53; +pub const EXFULL: ::c_int = 54; +pub const ENOANO: ::c_int = 55; +pub const EBADRQC: ::c_int = 56; +pub const EBADSLT: ::c_int = 57; +pub const EDEADLOCK: ::c_int = EDEADLK; +pub const EMULTIHOP: ::c_int = 72; +pub const EBADMSG: ::c_int = 74; +pub const EOVERFLOW: ::c_int = 75; +pub const ENOTUNIQ: ::c_int = 76; +pub const EBADFD: ::c_int = 77; +pub const EREMCHG: ::c_int = 78; +pub const ELIBACC: ::c_int = 79; +pub const ELIBBAD: ::c_int = 80; +pub const ELIBSCN: ::c_int = 81; +pub const ELIBMAX: ::c_int = 82; +pub const ELIBEXEC: ::c_int = 83; +pub const EILSEQ: ::c_int = 84; +pub const ERESTART: ::c_int = 85; +pub const ESTRPIPE: ::c_int = 86; +pub const EUSERS: ::c_int = 87; +pub const ENOTSOCK: ::c_int = 88; +pub const EDESTADDRREQ: ::c_int = 89; +pub const EMSGSIZE: ::c_int = 90; +pub const EPROTOTYPE: ::c_int = 91; +pub const ENOPROTOOPT: ::c_int = 92; +pub const EPROTONOSUPPORT: ::c_int = 93; +pub const ESOCKTNOSUPPORT: ::c_int = 94; +pub const EOPNOTSUPP: ::c_int = 95; +pub const EPFNOSUPPORT: ::c_int = 96; +pub const EAFNOSUPPORT: ::c_int = 97; +pub const EADDRINUSE: ::c_int = 98; +pub const EADDRNOTAVAIL: ::c_int = 99; +pub const ENETDOWN: ::c_int = 100; +pub const ENETUNREACH: ::c_int = 101; +pub const ENETRESET: ::c_int = 102; +pub const ECONNABORTED: ::c_int = 103; +pub const ECONNRESET: ::c_int = 104; +pub const ENOBUFS: ::c_int = 105; +pub const EISCONN: ::c_int = 106; +pub const ENOTCONN: ::c_int = 107; +pub const ESHUTDOWN: ::c_int = 108; +pub const ETOOMANYREFS: ::c_int = 109; +pub const ETIMEDOUT: ::c_int = 110; +pub const ECONNREFUSED: ::c_int = 111; +pub const EHOSTDOWN: ::c_int = 112; +pub const EHOSTUNREACH: ::c_int = 113; +pub const EALREADY: ::c_int = 114; +pub const EINPROGRESS: ::c_int = 115; +pub const ESTALE: ::c_int = 116; +pub const EUCLEAN: ::c_int = 117; +pub const ENOTNAM: ::c_int = 118; +pub const ENAVAIL: ::c_int = 119; +pub const EISNAM: ::c_int = 120; +pub const EREMOTEIO: ::c_int = 121; +pub const EDQUOT: ::c_int = 122; +pub const ENOMEDIUM: ::c_int = 123; +pub const EMEDIUMTYPE: ::c_int = 124; +pub const ECANCELED: ::c_int = 125; +pub const ENOKEY: ::c_int = 126; +pub const EKEYEXPIRED: ::c_int = 127; +pub const EKEYREVOKED: ::c_int = 128; +pub const EKEYREJECTED: ::c_int = 129; +pub const EOWNERDEAD: ::c_int = 130; +pub const ENOTRECOVERABLE: ::c_int = 131; +pub const ERFKILL: ::c_int = 132; +pub const EHWPOISON: ::c_int = 133; + +pub const SO_REUSEADDR: ::c_int = 2; +pub const SO_TYPE: ::c_int = 3; +pub const SO_ERROR: ::c_int = 4; +pub const SO_DONTROUTE: ::c_int = 5; +pub const SO_BROADCAST: ::c_int = 6; +pub const SO_SNDBUF: ::c_int = 7; +pub const SO_RCVBUF: ::c_int = 8; +pub const SO_KEEPALIVE: ::c_int = 9; +pub const SO_OOBINLINE: ::c_int = 10; +pub const SO_LINGER: ::c_int = 13; +pub const SO_REUSEPORT: ::c_int = 15; +pub const SO_RCVLOWAT: ::c_int = 18; +pub const SO_SNDLOWAT: ::c_int = 19; +pub const SO_RCVTIMEO: ::c_int = 20; +pub const SO_SNDTIMEO: ::c_int = 21; +pub const SO_ACCEPTCONN: ::c_int = 30; + +pub const SA_ONSTACK: ::c_int = 0x08000000; +pub const SA_SIGINFO: ::c_int = 0x00000004; +pub const SA_NOCLDWAIT: ::c_int = 0x00000002; + +pub const SIGCHLD: ::c_int = 17; +pub const SIGBUS: ::c_int = 7; +pub const SIGTTIN: ::c_int = 21; +pub const SIGTTOU: ::c_int = 22; +pub const SIGXCPU: ::c_int = 24; +pub const SIGXFSZ: ::c_int = 25; +pub const SIGVTALRM: ::c_int = 26; +pub const SIGPROF: ::c_int = 27; +pub const SIGWINCH: ::c_int = 28; +pub const SIGUSR1: ::c_int = 10; +pub const SIGUSR2: ::c_int = 12; +pub const SIGCONT: ::c_int = 18; +pub const SIGSTOP: ::c_int = 19; +pub const SIGTSTP: ::c_int = 20; +pub const SIGURG: ::c_int = 23; +pub const SIGIO: ::c_int = 29; +pub const SIGSYS: ::c_int = 31; +pub const SIGSTKFLT: ::c_int = 16; +pub const SIGPOLL: ::c_int = 29; +pub const SIGPWR: ::c_int = 30; +pub const SIG_SETMASK: ::c_int = 2; +pub const SIG_BLOCK: ::c_int = 0x000000; +pub const SIG_UNBLOCK: ::c_int = 0x01; + +pub const EXTPROC: ::tcflag_t = 0x00010000; + +pub const MAP_HUGETLB: ::c_int = 0x040000; + +pub const F_GETLK: ::c_int = 5; +pub const F_GETOWN: ::c_int = 9; +pub const F_SETLK: ::c_int = 6; +pub const F_SETLKW: ::c_int = 7; +pub const F_SETOWN: ::c_int = 8; + +pub const VEOF: usize = 4; +pub const VEOL: usize = 11; +pub const VEOL2: usize = 16; +pub const VMIN: usize = 6; +pub const IEXTEN: ::tcflag_t = 0x00008000; +pub const TOSTOP: ::tcflag_t = 0x00000100; +pub const FLUSHO: ::tcflag_t = 0x00001000; + +pub const TCGETS: ::c_ulong = 0x5401; +pub const TCSETS: ::c_ulong = 0x5402; +pub const TCSETSW: ::c_ulong = 0x5403; +pub const TCSETSF: ::c_ulong = 0x5404; +pub const TCGETA: ::c_ulong = 0x5405; +pub const TCSETA: ::c_ulong = 0x5406; +pub const TCSETAW: ::c_ulong = 0x5407; +pub const TCSETAF: ::c_ulong = 0x5408; +pub const TCSBRK: ::c_ulong = 0x5409; +pub const TCXONC: ::c_ulong = 0x540A; +pub const TCFLSH: ::c_ulong = 0x540B; +pub const TIOCGSOFTCAR: ::c_ulong = 0x5419; +pub const TIOCSSOFTCAR: ::c_ulong = 0x541A; +pub const TIOCLINUX: ::c_ulong = 0x541C; +pub const TIOCGSERIAL: ::c_ulong = 0x541E; +pub const TIOCEXCL: ::c_ulong = 0x540C; +pub const TIOCNXCL: ::c_ulong = 0x540D; +pub const TIOCSCTTY: ::c_ulong = 0x540E; +pub const TIOCGPGRP: ::c_ulong = 0x540F; +pub const TIOCSPGRP: ::c_ulong = 0x5410; +pub const TIOCOUTQ: ::c_ulong = 0x5411; +pub const TIOCSTI: ::c_ulong = 0x5412; +pub const TIOCGWINSZ: ::c_ulong = 0x5413; +pub const TIOCSWINSZ: ::c_ulong = 0x5414; +pub const TIOCMGET: ::c_ulong = 0x5415; +pub const TIOCMBIS: ::c_ulong = 0x5416; +pub const TIOCMBIC: ::c_ulong = 0x5417; +pub const TIOCMSET: ::c_ulong = 0x5418; +pub const FIONREAD: ::c_ulong = 0x541B; +pub const TIOCCONS: ::c_ulong = 0x541D; + +pub const SYS_gettid: ::c_long = 186; // Valid for x86_64 diff --git a/deps/libc-0.2.7/src/unix/notbsd/linux/musl/mod.rs b/deps/libc-0.2.8/src/unix/notbsd/linux/musl/mod.rs similarity index 100% rename from deps/libc-0.2.7/src/unix/notbsd/linux/musl/mod.rs rename to deps/libc-0.2.8/src/unix/notbsd/linux/musl/mod.rs diff --git a/deps/libc-0.2.8/src/unix/notbsd/linux/other/b32/arm.rs b/deps/libc-0.2.8/src/unix/notbsd/linux/other/b32/arm.rs new file mode 100644 index 000000000..8537d52a6 --- /dev/null +++ b/deps/libc-0.2.8/src/unix/notbsd/linux/other/b32/arm.rs @@ -0,0 +1,22 @@ +pub type c_char = u8; +pub type wchar_t = u32; + +pub const O_DIRECT: ::c_int = 0x10000; +pub const O_DIRECTORY: ::c_int = 0x4000; +pub const O_NOFOLLOW: ::c_int = 0x8000; + +pub const MAP_LOCKED: ::c_int = 0x02000; +pub const MAP_NORESERVE: ::c_int = 0x04000; + +pub const EDEADLOCK: ::c_int = 35; + +pub const SO_PEERCRED: ::c_int = 17; +pub const SO_RCVLOWAT: ::c_int = 18; +pub const SO_SNDLOWAT: ::c_int = 19; +pub const SO_RCVTIMEO: ::c_int = 20; +pub const SO_SNDTIMEO: ::c_int = 21; + +pub const FIOCLEX: ::c_ulong = 0x5451; +pub const FIONBIO: ::c_ulong = 0x5421; + +pub const SYS_gettid: ::c_long = 224; diff --git a/deps/libc-0.2.8/src/unix/notbsd/linux/other/b32/mod.rs b/deps/libc-0.2.8/src/unix/notbsd/linux/other/b32/mod.rs new file mode 100644 index 000000000..908fa40a5 --- /dev/null +++ b/deps/libc-0.2.8/src/unix/notbsd/linux/other/b32/mod.rs @@ -0,0 +1,95 @@ +//! 32-bit specific definitions for linux-like values + +pub type c_long = i32; +pub type c_ulong = u32; +pub type clock_t = i32; +pub type time_t = i32; +pub type suseconds_t = i32; +pub type ino_t = u32; +pub type off_t = i32; +pub type blkcnt_t = i32; +pub type __fsword_t = i32; + +pub type blksize_t = i32; +pub type nlink_t = u32; + +s! { + pub struct stat { + pub st_dev: ::dev_t, + __pad1: ::c_short, + pub st_ino: ::ino_t, + pub st_mode: ::mode_t, + pub st_nlink: ::nlink_t, + pub st_uid: ::uid_t, + pub st_gid: ::gid_t, + pub st_rdev: ::dev_t, + __pad2: ::c_short, + pub st_size: ::off_t, + pub st_blksize: ::blksize_t, + pub st_blocks: ::blkcnt_t, + pub st_atime: ::time_t, + pub st_atime_nsec: ::c_long, + pub st_mtime: ::time_t, + pub st_mtime_nsec: ::c_long, + pub st_ctime: ::time_t, + pub st_ctime_nsec: ::c_long, + __unused4: ::c_long, + __unused5: ::c_long, + } + + pub struct stat64 { + pub st_dev: ::dev_t, + __pad1: ::c_uint, + __st_ino: ::ino_t, + pub st_mode: ::mode_t, + pub st_nlink: ::nlink_t, + pub st_uid: ::uid_t, + pub st_gid: ::gid_t, + pub st_rdev: ::dev_t, + __pad2: ::c_uint, + pub st_size: ::off64_t, + pub st_blksize: ::blksize_t, + pub st_blocks: ::blkcnt64_t, + pub st_atime: ::time_t, + pub st_atime_nsec: ::c_long, + pub st_mtime: ::time_t, + pub st_mtime_nsec: ::c_long, + pub st_ctime: ::time_t, + pub st_ctime_nsec: ::c_long, + pub st_ino: ::ino64_t, + } + + pub struct pthread_attr_t { + __size: [u32; 9] + } + + pub struct sigset_t { + __val: [::c_ulong; 32], + } +} + +pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 24; +pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 32; +pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4; + +pub const PTRACE_GETFPREGS: ::c_uint = 14; +pub const PTRACE_SETFPREGS: ::c_uint = 15; +pub const PTRACE_GETFPXREGS: ::c_uint = 18; +pub const PTRACE_SETFPXREGS: ::c_uint = 19; +pub const PTRACE_GETREGS: ::c_uint = 12; +pub const PTRACE_SETREGS: ::c_uint = 13; + +cfg_if! { + if #[cfg(target_arch = "x86")] { + mod x86; + pub use self::x86::*; + } else if #[cfg(target_arch = "arm")] { + mod arm; + pub use self::arm::*; + } else if #[cfg(target_arch = "powerpc")] { + mod powerpc; + pub use self::powerpc::*; + } else { + // ... + } +} diff --git a/deps/libc-0.2.8/src/unix/notbsd/linux/other/b32/powerpc.rs b/deps/libc-0.2.8/src/unix/notbsd/linux/other/b32/powerpc.rs new file mode 100644 index 000000000..52c285c4e --- /dev/null +++ b/deps/libc-0.2.8/src/unix/notbsd/linux/other/b32/powerpc.rs @@ -0,0 +1,22 @@ +pub type c_char = u8; +pub type wchar_t = i32; + +pub const O_DIRECT: ::c_int = 0x20000; +pub const O_DIRECTORY: ::c_int = 0x4000; +pub const O_NOFOLLOW: ::c_int = 0x8000; + +pub const MAP_LOCKED: ::c_int = 0x00080; +pub const MAP_NORESERVE: ::c_int = 0x00040; + +pub const EDEADLOCK: ::c_int = 58; + +pub const SO_PEERCRED: ::c_int = 21; +pub const SO_RCVLOWAT: ::c_int = 16; +pub const SO_SNDLOWAT: ::c_int = 17; +pub const SO_RCVTIMEO: ::c_int = 18; +pub const SO_SNDTIMEO: ::c_int = 19; + +pub const FIOCLEX: ::c_ulong = 0x20006601; +pub const FIONBIO: ::c_ulong = 0x8004667e; + +pub const SYS_gettid: ::c_long = 207; diff --git a/deps/libc-0.2.8/src/unix/notbsd/linux/other/b32/x86.rs b/deps/libc-0.2.8/src/unix/notbsd/linux/other/b32/x86.rs new file mode 100644 index 000000000..edb5aa5d1 --- /dev/null +++ b/deps/libc-0.2.8/src/unix/notbsd/linux/other/b32/x86.rs @@ -0,0 +1,48 @@ +pub type c_char = i8; +pub type wchar_t = i32; + +s! { + pub struct mcontext_t { + __private: [u32; 22] + } + + pub struct ucontext_t { + pub uc_flags: ::c_ulong, + pub uc_link: *mut ucontext_t, + pub uc_stack: ::stack_t, + pub uc_mcontext: mcontext_t, + pub uc_sigmask: ::sigset_t, + __private: [u8; 112], + } +} + +pub const O_DIRECT: ::c_int = 0x4000; +pub const O_DIRECTORY: ::c_int = 0x10000; +pub const O_NOFOLLOW: ::c_int = 0x20000; + +pub const MAP_LOCKED: ::c_int = 0x02000; +pub const MAP_NORESERVE: ::c_int = 0x04000; +pub const MAP_32BIT: ::c_int = 0x0040; + +pub const EDEADLOCK: ::c_int = 35; + +pub const SO_PEERCRED: ::c_int = 17; +pub const SO_RCVLOWAT: ::c_int = 18; +pub const SO_SNDLOWAT: ::c_int = 19; +pub const SO_RCVTIMEO: ::c_int = 20; +pub const SO_SNDTIMEO: ::c_int = 21; + +pub const FIOCLEX: ::c_ulong = 0x5451; +pub const FIONBIO: ::c_ulong = 0x5421; + +pub const SYS_gettid: ::c_long = 224; + +extern { + pub fn getcontext(ucp: *mut ucontext_t) -> ::c_int; + pub fn setcontext(ucp: *const ucontext_t) -> ::c_int; + pub fn makecontext(ucp: *mut ucontext_t, + func: extern fn (), + argc: ::c_int, ...); + pub fn swapcontext(uocp: *mut ucontext_t, + ucp: *const ucontext_t) -> ::c_int; +} diff --git a/deps/libc-0.2.8/src/unix/notbsd/linux/other/b64/aarch64.rs b/deps/libc-0.2.8/src/unix/notbsd/linux/other/b64/aarch64.rs new file mode 100644 index 000000000..d6f8b7ce9 --- /dev/null +++ b/deps/libc-0.2.8/src/unix/notbsd/linux/other/b64/aarch64.rs @@ -0,0 +1,79 @@ +//! AArch64-specific definitions for 64-bit linux-like values + +pub type c_char = u8; +pub type wchar_t = u32; +pub type nlink_t = u32; +pub type blksize_t = i32; + +s! { + pub struct stat { + pub st_dev: ::dev_t, + pub st_ino: ::ino_t, + pub st_mode: ::mode_t, + pub st_nlink: ::nlink_t, + pub st_uid: ::uid_t, + pub st_gid: ::gid_t, + pub st_rdev: ::dev_t, + __pad1: ::dev_t, + pub st_size: ::off_t, + pub st_blksize: ::blksize_t, + __pad2: ::c_int, + pub st_blocks: ::blkcnt_t, + pub st_atime: ::time_t, + pub st_atime_nsec: ::c_long, + pub st_mtime: ::time_t, + pub st_mtime_nsec: ::c_long, + pub st_ctime: ::time_t, + pub st_ctime_nsec: ::c_long, + __unused: [::c_int; 2], + } + + pub struct stat64 { + pub st_dev: ::dev_t, + pub st_ino: ::ino_t, + pub st_mode: ::mode_t, + pub st_nlink: ::nlink_t, + pub st_uid: ::uid_t, + pub st_gid: ::gid_t, + pub st_rdev: ::dev_t, + __pad1: ::dev_t, + pub st_size: ::off64_t, + pub st_blksize: ::blksize_t, + __pad2: ::c_int, + pub st_blocks: ::blkcnt64_t, + pub st_atime: ::time_t, + pub st_atime_nsec: ::c_long, + pub st_mtime: ::time_t, + pub st_mtime_nsec: ::c_long, + pub st_ctime: ::time_t, + pub st_ctime_nsec: ::c_long, + __unused: [::c_int; 2], + } + + pub struct pthread_attr_t { + __size: [u64; 8] + } +} + +pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 48; +pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 8; + +pub const O_DIRECT: ::c_int = 0x10000; +pub const O_DIRECTORY: ::c_int = 0x4000; +pub const O_NOFOLLOW: ::c_int = 0x8000; + +pub const MAP_LOCKED: ::c_int = 0x02000; +pub const MAP_NORESERVE: ::c_int = 0x04000; + +pub const EDEADLOCK: ::c_int = 35; + +pub const SO_PEERCRED: ::c_int = 17; +pub const SO_RCVLOWAT: ::c_int = 18; +pub const SO_SNDLOWAT: ::c_int = 19; +pub const SO_RCVTIMEO: ::c_int = 20; +pub const SO_SNDTIMEO: ::c_int = 21; + +pub const FIOCLEX: ::c_ulong = 0x5451; +pub const FIONBIO: ::c_ulong = 0x5421; + +pub const SYS_gettid: ::c_long = 178; diff --git a/deps/libc-0.2.8/src/unix/notbsd/linux/other/b64/mod.rs b/deps/libc-0.2.8/src/unix/notbsd/linux/other/b64/mod.rs new file mode 100644 index 000000000..28d9e4d00 --- /dev/null +++ b/deps/libc-0.2.8/src/unix/notbsd/linux/other/b64/mod.rs @@ -0,0 +1,32 @@ +//! 64-bit specific definitions for linux-like values + +pub type c_long = i64; +pub type c_ulong = u64; +pub type clock_t = i64; +pub type time_t = i64; +pub type suseconds_t = i64; +pub type ino_t = u64; +pub type off_t = i64; +pub type blkcnt_t = i64; +pub type __fsword_t = ::c_long; + +s! { + pub struct sigset_t { + __val: [::c_ulong; 16], + } +} + +pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56; + +cfg_if! { + if #[cfg(target_arch = "aarch64")] { + mod aarch64; + pub use self::aarch64::*; + } else if #[cfg(any(target_arch = "powerpc64"))] { + mod powerpc64; + pub use self::powerpc64::*; + } else { + mod x86_64; + pub use self::x86_64::*; + } +} diff --git a/deps/libc-0.2.8/src/unix/notbsd/linux/other/b64/powerpc64.rs b/deps/libc-0.2.8/src/unix/notbsd/linux/other/b64/powerpc64.rs new file mode 100644 index 000000000..e9494ddd7 --- /dev/null +++ b/deps/libc-0.2.8/src/unix/notbsd/linux/other/b64/powerpc64.rs @@ -0,0 +1,77 @@ +//! PowerPC64-specific definitions for 64-bit linux-like values + +pub type c_char = u8; +pub type wchar_t = i32; +pub type nlink_t = u64; +pub type blksize_t = i64; + +s! { + pub struct stat { + pub st_dev: ::dev_t, + pub st_ino: ::ino_t, + pub st_nlink: ::nlink_t, + pub st_mode: ::mode_t, + pub st_uid: ::uid_t, + pub st_gid: ::gid_t, + __pad0: ::c_int, + pub st_rdev: ::dev_t, + pub st_size: ::off_t, + pub st_blksize: ::blksize_t, + pub st_blocks: ::blkcnt_t, + pub st_atime: ::time_t, + pub st_atime_nsec: ::c_long, + pub st_mtime: ::time_t, + pub st_mtime_nsec: ::c_long, + pub st_ctime: ::time_t, + pub st_ctime_nsec: ::c_long, + __unused: [::c_long; 3], + } + + pub struct stat64 { + pub st_dev: ::dev_t, + pub st_ino: ::ino64_t, + pub st_nlink: ::nlink_t, + pub st_mode: ::mode_t, + pub st_uid: ::uid_t, + pub st_gid: ::gid_t, + __pad0: ::c_int, + pub st_rdev: ::dev_t, + pub st_size: ::off64_t, + pub st_blksize: ::blksize_t, + pub st_blocks: ::blkcnt64_t, + pub st_atime: ::time_t, + pub st_atime_nsec: ::c_long, + pub st_mtime: ::time_t, + pub st_mtime_nsec: ::c_long, + pub st_ctime: ::time_t, + pub st_ctime_nsec: ::c_long, + __reserved: [::c_long; 3], + } + + pub struct pthread_attr_t { + __size: [u64; 7] + } +} + +pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40; +pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4; + +pub const O_DIRECTORY: ::c_int = 0x4000; +pub const O_NOFOLLOW: ::c_int = 0x8000; +pub const O_DIRECT: ::c_int = 0x20000; + +pub const MAP_LOCKED: ::c_int = 0x00080; +pub const MAP_NORESERVE: ::c_int = 0x00040; + +pub const EDEADLOCK: ::c_int = 58; + +pub const SO_PEERCRED: ::c_int = 21; +pub const SO_RCVLOWAT: ::c_int = 16; +pub const SO_SNDLOWAT: ::c_int = 17; +pub const SO_RCVTIMEO: ::c_int = 18; +pub const SO_SNDTIMEO: ::c_int = 19; + +pub const FIOCLEX: ::c_ulong = 0x20006601; +pub const FIONBIO: ::c_ulong = 0x8004667e; + +pub const SYS_gettid: ::c_long = 207; diff --git a/deps/libc-0.2.8/src/unix/notbsd/linux/other/b64/x86_64.rs b/deps/libc-0.2.8/src/unix/notbsd/linux/other/b64/x86_64.rs new file mode 100644 index 000000000..5b608e1f8 --- /dev/null +++ b/deps/libc-0.2.8/src/unix/notbsd/linux/other/b64/x86_64.rs @@ -0,0 +1,108 @@ +//! x86_64-specific definitions for 64-bit linux-like values + +pub type c_char = i8; +pub type wchar_t = i32; +pub type nlink_t = u64; +pub type blksize_t = i64; + +s! { + pub struct stat { + pub st_dev: ::dev_t, + pub st_ino: ::ino_t, + pub st_nlink: ::nlink_t, + pub st_mode: ::mode_t, + pub st_uid: ::uid_t, + pub st_gid: ::gid_t, + __pad0: ::c_int, + pub st_rdev: ::dev_t, + pub st_size: ::off_t, + pub st_blksize: ::blksize_t, + pub st_blocks: ::blkcnt_t, + pub st_atime: ::time_t, + pub st_atime_nsec: ::c_long, + pub st_mtime: ::time_t, + pub st_mtime_nsec: ::c_long, + pub st_ctime: ::time_t, + pub st_ctime_nsec: ::c_long, + __unused: [::c_long; 3], + } + + pub struct stat64 { + pub st_dev: ::dev_t, + pub st_ino: ::ino64_t, + pub st_nlink: ::nlink_t, + pub st_mode: ::mode_t, + pub st_uid: ::uid_t, + pub st_gid: ::gid_t, + __pad0: ::c_int, + pub st_rdev: ::dev_t, + pub st_size: ::off_t, + pub st_blksize: ::blksize_t, + pub st_blocks: ::blkcnt64_t, + pub st_atime: ::time_t, + pub st_atime_nsec: ::c_long, + pub st_mtime: ::time_t, + pub st_mtime_nsec: ::c_long, + pub st_ctime: ::time_t, + pub st_ctime_nsec: ::c_long, + __reserved: [::c_long; 3], + } + + pub struct pthread_attr_t { + __size: [u64; 7] + } + + pub struct mcontext_t { + __private: [u64; 32], + } + + pub struct ucontext_t { + pub uc_flags: ::c_ulong, + pub uc_link: *mut ucontext_t, + pub uc_stack: ::stack_t, + pub uc_mcontext: mcontext_t, + pub uc_sigmask: ::sigset_t, + __private: [u8; 512], + } +} + +pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40; +pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4; + +pub const O_DIRECT: ::c_int = 0x4000; +pub const O_DIRECTORY: ::c_int = 0x10000; +pub const O_NOFOLLOW: ::c_int = 0x20000; + +pub const MAP_LOCKED: ::c_int = 0x02000; +pub const MAP_NORESERVE: ::c_int = 0x04000; +pub const MAP_32BIT: ::c_int = 0x0040; + +pub const EDEADLOCK: ::c_int = 35; + +pub const SO_PEERCRED: ::c_int = 17; +pub const SO_RCVLOWAT: ::c_int = 18; +pub const SO_SNDLOWAT: ::c_int = 19; +pub const SO_RCVTIMEO: ::c_int = 20; +pub const SO_SNDTIMEO: ::c_int = 21; + +pub const FIOCLEX: ::c_ulong = 0x5451; +pub const FIONBIO: ::c_ulong = 0x5421; + +pub const PTRACE_GETFPREGS: ::c_uint = 14; +pub const PTRACE_SETFPREGS: ::c_uint = 15; +pub const PTRACE_GETFPXREGS: ::c_uint = 18; +pub const PTRACE_SETFPXREGS: ::c_uint = 19; +pub const PTRACE_GETREGS: ::c_uint = 12; +pub const PTRACE_SETREGS: ::c_uint = 13; + +pub const SYS_gettid: ::c_long = 186; + +extern { + pub fn getcontext(ucp: *mut ucontext_t) -> ::c_int; + pub fn setcontext(ucp: *const ucontext_t) -> ::c_int; + pub fn makecontext(ucp: *mut ucontext_t, + func: extern fn (), + argc: ::c_int, ...); + pub fn swapcontext(uocp: *mut ucontext_t, + ucp: *const ucontext_t) -> ::c_int; +} diff --git a/deps/libc-0.2.8/src/unix/notbsd/linux/other/mod.rs b/deps/libc-0.2.8/src/unix/notbsd/linux/other/mod.rs new file mode 100644 index 000000000..09d7e355c --- /dev/null +++ b/deps/libc-0.2.8/src/unix/notbsd/linux/other/mod.rs @@ -0,0 +1,496 @@ +pub type fsblkcnt_t = ::c_ulong; +pub type fsfilcnt_t = ::c_ulong; +pub type rlim_t = c_ulong; + +s! { + pub struct sigaction { + pub sa_sigaction: ::sighandler_t, + pub sa_mask: ::sigset_t, + pub sa_flags: ::c_int, + _restorer: *mut ::c_void, + } + + pub struct stack_t { + pub ss_sp: *mut ::c_void, + pub ss_flags: ::c_int, + pub ss_size: ::size_t + } + + pub struct siginfo_t { + pub si_signo: ::c_int, + pub si_errno: ::c_int, + pub si_code: ::c_int, + pub _pad: [::c_int; 29], + _align: [usize; 0], + } + + pub struct glob64_t { + pub gl_pathc: ::size_t, + pub gl_pathv: *mut *mut ::c_char, + pub gl_offs: ::size_t, + pub gl_flags: ::c_int, + + __unused1: *mut ::c_void, + __unused2: *mut ::c_void, + __unused3: *mut ::c_void, + __unused4: *mut ::c_void, + __unused5: *mut ::c_void, + } + + pub struct ucred { + pub pid: ::pid_t, + pub uid: ::uid_t, + pub gid: ::gid_t, + } + + pub struct statfs { + pub f_type: __fsword_t, + pub f_bsize: __fsword_t, + pub f_blocks: ::fsblkcnt_t, + pub f_bfree: ::fsblkcnt_t, + pub f_bavail: ::fsblkcnt_t, + + pub f_files: ::fsfilcnt_t, + pub f_ffree: ::fsfilcnt_t, + pub f_fsid: ::fsid_t, + + pub f_namelen: __fsword_t, + pub f_frsize: __fsword_t, + f_spare: [__fsword_t; 5], + } + + pub struct msghdr { + pub msg_name: *mut ::c_void, + pub msg_namelen: ::socklen_t, + pub msg_iov: *mut ::iovec, + pub msg_iovlen: ::size_t, + pub msg_control: *mut ::c_void, + pub msg_controllen: ::size_t, + pub msg_flags: ::c_int, + } + + pub struct termios { + pub c_iflag: ::tcflag_t, + pub c_oflag: ::tcflag_t, + pub c_cflag: ::tcflag_t, + pub c_lflag: ::tcflag_t, + pub c_line: ::cc_t, + pub c_cc: [::cc_t; ::NCCS], + pub c_ispeed: ::speed_t, + pub c_ospeed: ::speed_t, + } + + pub struct flock { + pub l_type: ::c_short, + pub l_whence: ::c_short, + pub l_start: ::off_t, + pub l_len: ::off_t, + pub l_pid: ::pid_t, + } + + pub struct ipc_perm { + pub __key: ::key_t, + pub uid: ::uid_t, + pub gid: ::gid_t, + pub cuid: ::uid_t, + pub cgid: ::gid_t, + pub mode: ::c_ushort, + __pad1: ::c_ushort, + pub __seq: ::c_ushort, + __pad2: ::c_ushort, + __unused1: ::c_ulong, + __unused2: ::c_ulong + } + + pub struct shmid_ds { + pub shm_perm: ::ipc_perm, + pub shm_segsz: ::size_t, + pub shm_atime: ::time_t, + #[cfg(target_pointer_width = "32")] + __unused1: ::c_ulong, + pub shm_dtime: ::time_t, + #[cfg(target_pointer_width = "32")] + __unused2: ::c_ulong, + pub shm_ctime: ::time_t, + #[cfg(target_pointer_width = "32")] + __unused3: ::c_ulong, + pub shm_cpid: ::pid_t, + pub shm_lpid: ::pid_t, + pub shm_nattch: ::shmatt_t, + __unused4: ::c_ulong, + __unused5: ::c_ulong + } +} + +pub const RLIMIT_RSS: ::c_int = 5; +pub const RLIMIT_NOFILE: ::c_int = 7; +pub const RLIMIT_AS: ::c_int = 9; +pub const RLIMIT_NPROC: ::c_int = 6; +pub const RLIMIT_MEMLOCK: ::c_int = 8; +pub const RLIM_INFINITY: ::rlim_t = !0; +pub const RLIMIT_RTTIME: ::c_int = 15; +pub const RLIMIT_NLIMITS: ::c_int = 16; + +pub const O_APPEND: ::c_int = 1024; +pub const O_CREAT: ::c_int = 64; +pub const O_EXCL: ::c_int = 128; +pub const O_NOCTTY: ::c_int = 256; +pub const O_NONBLOCK: ::c_int = 2048; +pub const O_SYNC: ::c_int = 1052672; +pub const O_RSYNC: ::c_int = 1052672; +pub const O_DSYNC: ::c_int = 4096; +pub const O_FSYNC: ::c_int = 0x101000; + +pub const SOCK_NONBLOCK: ::c_int = O_NONBLOCK; + +pub const MAP_ANON: ::c_int = 0x0020; +pub const MAP_ANONYMOUS: ::c_int = 0x0020; +pub const MAP_GROWSDOWN: ::c_int = 0x0100; +pub const MAP_DENYWRITE: ::c_int = 0x0800; +pub const MAP_EXECUTABLE: ::c_int = 0x01000; +pub const MAP_POPULATE: ::c_int = 0x08000; +pub const MAP_NONBLOCK: ::c_int = 0x010000; +pub const MAP_STACK: ::c_int = 0x020000; + +pub const EDEADLK: ::c_int = 35; +pub const ENAMETOOLONG: ::c_int = 36; +pub const ENOLCK: ::c_int = 37; +pub const ENOSYS: ::c_int = 38; +pub const ENOTEMPTY: ::c_int = 39; +pub const ELOOP: ::c_int = 40; +pub const ENOMSG: ::c_int = 42; +pub const EIDRM: ::c_int = 43; +pub const ECHRNG: ::c_int = 44; +pub const EL2NSYNC: ::c_int = 45; +pub const EL3HLT: ::c_int = 46; +pub const EL3RST: ::c_int = 47; +pub const ELNRNG: ::c_int = 48; +pub const EUNATCH: ::c_int = 49; +pub const ENOCSI: ::c_int = 50; +pub const EL2HLT: ::c_int = 51; +pub const EBADE: ::c_int = 52; +pub const EBADR: ::c_int = 53; +pub const EXFULL: ::c_int = 54; +pub const ENOANO: ::c_int = 55; +pub const EBADRQC: ::c_int = 56; +pub const EBADSLT: ::c_int = 57; +pub const EMULTIHOP: ::c_int = 72; +pub const EOVERFLOW: ::c_int = 75; +pub const ENOTUNIQ: ::c_int = 76; +pub const EBADFD: ::c_int = 77; +pub const EBADMSG: ::c_int = 74; +pub const EREMCHG: ::c_int = 78; +pub const ELIBACC: ::c_int = 79; +pub const ELIBBAD: ::c_int = 80; +pub const ELIBSCN: ::c_int = 81; +pub const ELIBMAX: ::c_int = 82; +pub const ELIBEXEC: ::c_int = 83; +pub const EILSEQ: ::c_int = 84; +pub const ERESTART: ::c_int = 85; +pub const ESTRPIPE: ::c_int = 86; +pub const EUSERS: ::c_int = 87; +pub const ENOTSOCK: ::c_int = 88; +pub const EDESTADDRREQ: ::c_int = 89; +pub const EMSGSIZE: ::c_int = 90; +pub const EPROTOTYPE: ::c_int = 91; +pub const ENOPROTOOPT: ::c_int = 92; +pub const EPROTONOSUPPORT: ::c_int = 93; +pub const ESOCKTNOSUPPORT: ::c_int = 94; +pub const EOPNOTSUPP: ::c_int = 95; +pub const EPFNOSUPPORT: ::c_int = 96; +pub const EAFNOSUPPORT: ::c_int = 97; +pub const EADDRINUSE: ::c_int = 98; +pub const EADDRNOTAVAIL: ::c_int = 99; +pub const ENETDOWN: ::c_int = 100; +pub const ENETUNREACH: ::c_int = 101; +pub const ENETRESET: ::c_int = 102; +pub const ECONNABORTED: ::c_int = 103; +pub const ECONNRESET: ::c_int = 104; +pub const ENOBUFS: ::c_int = 105; +pub const EISCONN: ::c_int = 106; +pub const ENOTCONN: ::c_int = 107; +pub const ESHUTDOWN: ::c_int = 108; +pub const ETOOMANYREFS: ::c_int = 109; +pub const ETIMEDOUT: ::c_int = 110; +pub const ECONNREFUSED: ::c_int = 111; +pub const EHOSTDOWN: ::c_int = 112; +pub const EHOSTUNREACH: ::c_int = 113; +pub const EALREADY: ::c_int = 114; +pub const EINPROGRESS: ::c_int = 115; +pub const ESTALE: ::c_int = 116; +pub const EUCLEAN: ::c_int = 117; +pub const ENOTNAM: ::c_int = 118; +pub const ENAVAIL: ::c_int = 119; +pub const EISNAM: ::c_int = 120; +pub const EREMOTEIO: ::c_int = 121; +pub const EDQUOT: ::c_int = 122; +pub const ENOMEDIUM: ::c_int = 123; +pub const EMEDIUMTYPE: ::c_int = 124; +pub const ECANCELED: ::c_int = 125; +pub const ENOKEY: ::c_int = 126; +pub const EKEYEXPIRED: ::c_int = 127; +pub const EKEYREVOKED: ::c_int = 128; +pub const EKEYREJECTED: ::c_int = 129; +pub const EOWNERDEAD: ::c_int = 130; +pub const ENOTRECOVERABLE: ::c_int = 131; +pub const EHWPOISON: ::c_int = 133; +pub const ERFKILL: ::c_int = 132; + +pub const SOCK_STREAM: ::c_int = 1; +pub const SOCK_DGRAM: ::c_int = 2; + +pub const SOL_SOCKET: ::c_int = 1; + +pub const SO_REUSEADDR: ::c_int = 2; +pub const SO_TYPE: ::c_int = 3; +pub const SO_ERROR: ::c_int = 4; +pub const SO_DONTROUTE: ::c_int = 5; +pub const SO_BROADCAST: ::c_int = 6; +pub const SO_SNDBUF: ::c_int = 7; +pub const SO_RCVBUF: ::c_int = 8; +pub const SO_KEEPALIVE: ::c_int = 9; +pub const SO_OOBINLINE: ::c_int = 10; +pub const SO_LINGER: ::c_int = 13; +pub const SO_REUSEPORT: ::c_int = 15; +pub const SO_ACCEPTCONN: ::c_int = 30; + +pub const TCP_COOKIE_TRANSACTIONS: ::c_int = 15; +pub const TCP_THIN_LINEAR_TIMEOUTS: ::c_int = 16; +pub const TCP_THIN_DUPACK: ::c_int = 17; +pub const TCP_USER_TIMEOUT: ::c_int = 18; +pub const TCP_REPAIR: ::c_int = 19; +pub const TCP_REPAIR_QUEUE: ::c_int = 20; +pub const TCP_QUEUE_SEQ: ::c_int = 21; +pub const TCP_REPAIR_OPTIONS: ::c_int = 22; +pub const TCP_FASTOPEN: ::c_int = 23; +pub const TCP_TIMESTAMP: ::c_int = 24; + +pub const SA_ONSTACK: ::c_int = 0x08000000; +pub const SA_SIGINFO: ::c_int = 0x00000004; +pub const SA_NOCLDWAIT: ::c_int = 0x00000002; + +pub const SIGCHLD: ::c_int = 17; +pub const SIGBUS: ::c_int = 7; +pub const SIGUSR1: ::c_int = 10; +pub const SIGUSR2: ::c_int = 12; +pub const SIGCONT: ::c_int = 18; +pub const SIGSTOP: ::c_int = 19; +pub const SIGTSTP: ::c_int = 20; +pub const SIGURG: ::c_int = 23; +pub const SIGIO: ::c_int = 29; +pub const SIGSYS: ::c_int = 31; +pub const SIGSTKFLT: ::c_int = 16; +pub const SIGUNUSED: ::c_int = 31; +pub const SIGTTIN: ::c_int = 21; +pub const SIGTTOU: ::c_int = 22; +pub const SIGXCPU: ::c_int = 24; +pub const SIGXFSZ: ::c_int = 25; +pub const SIGVTALRM: ::c_int = 26; +pub const SIGPROF: ::c_int = 27; +pub const SIGWINCH: ::c_int = 28; +pub const SIGPOLL: ::c_int = 29; +pub const SIGPWR: ::c_int = 30; +pub const SIG_SETMASK: ::c_int = 2; +pub const SIG_BLOCK: ::c_int = 0x000000; +pub const SIG_UNBLOCK: ::c_int = 0x01; + +pub const FALLOC_FL_KEEP_SIZE: ::c_int = 0x01; +pub const FALLOC_FL_PUNCH_HOLE: ::c_int = 0x02; + +pub const BUFSIZ: ::c_uint = 8192; +pub const TMP_MAX: ::c_uint = 238328; +pub const FOPEN_MAX: ::c_uint = 16; +pub const POSIX_MADV_DONTNEED: ::c_int = 4; +pub const _SC_2_C_VERSION: ::c_int = 96; +pub const RUSAGE_THREAD: ::c_int = 1; +pub const O_ACCMODE: ::c_int = 3; +pub const O_ASYNC: ::c_int = 0x2000; +pub const O_NDELAY: ::c_int = 0x800; +pub const RUSAGE_CHILDREN: ::c_int = -1; +pub const ST_RELATIME: ::c_ulong = 4096; +pub const NI_MAXHOST: ::socklen_t = 1025; + +pub const ADFS_SUPER_MAGIC: ::c_long = 0x0000adf5; +pub const AFFS_SUPER_MAGIC: ::c_long = 0x0000adff; +pub const CODA_SUPER_MAGIC: ::c_long = 0x73757245; +pub const CRAMFS_MAGIC: ::c_long = 0x28cd3d45; +pub const EFS_SUPER_MAGIC: ::c_long = 0x00414a53; +pub const EXT2_SUPER_MAGIC: ::c_long = 0x0000ef53; +pub const EXT3_SUPER_MAGIC: ::c_long = 0x0000ef53; +pub const EXT4_SUPER_MAGIC: ::c_long = 0x0000ef53; +pub const HPFS_SUPER_MAGIC: ::c_long = 0xf995e849; +pub const HUGETLBFS_MAGIC: ::c_long = 0x958458f6; +pub const ISOFS_SUPER_MAGIC: ::c_long = 0x00009660; +pub const JFFS2_SUPER_MAGIC: ::c_long = 0x000072b6; +pub const MINIX_SUPER_MAGIC: ::c_long = 0x0000137f; +pub const MINIX_SUPER_MAGIC2: ::c_long = 0x0000138f; +pub const MINIX2_SUPER_MAGIC: ::c_long = 0x00002468; +pub const MINIX2_SUPER_MAGIC2: ::c_long = 0x00002478; +pub const MSDOS_SUPER_MAGIC: ::c_long = 0x00004d44; +pub const NCP_SUPER_MAGIC: ::c_long = 0x0000564c; +pub const NFS_SUPER_MAGIC: ::c_long = 0x00006969; +pub const OPENPROM_SUPER_MAGIC: ::c_long = 0x00009fa1; +pub const PROC_SUPER_MAGIC: ::c_long = 0x00009fa0; +pub const QNX4_SUPER_MAGIC: ::c_long = 0x0000002f; +pub const REISERFS_SUPER_MAGIC: ::c_long = 0x52654973; +pub const SMB_SUPER_MAGIC: ::c_long = 0x0000517b; +pub const TMPFS_MAGIC: ::c_long = 0x01021994; +pub const USBDEVICE_SUPER_MAGIC: ::c_long = 0x00009fa2; + +pub const VEOF: usize = 4; +pub const VEOL: usize = 11; +pub const VEOL2: usize = 16; +pub const VMIN: usize = 6; +pub const IEXTEN: ::tcflag_t = 0x00008000; +pub const TOSTOP: ::tcflag_t = 0x00000100; +pub const FLUSHO: ::tcflag_t = 0x00001000; +pub const IUTF8: ::tcflag_t = 0x00004000; + +pub const CPU_SETSIZE: ::c_int = 0x400; + +pub const EXTPROC: ::tcflag_t = 0x00010000; + +pub const QFMT_VFS_V1: ::c_int = 4; + +pub const PTRACE_TRACEME: ::c_uint = 0; +pub const PTRACE_PEEKTEXT: ::c_uint = 1; +pub const PTRACE_PEEKDATA: ::c_uint = 2; +pub const PTRACE_PEEKUSER: ::c_uint = 3; +pub const PTRACE_POKETEXT: ::c_uint = 4; +pub const PTRACE_POKEDATA: ::c_uint = 5; +pub const PTRACE_POKEUSER: ::c_uint = 6; +pub const PTRACE_CONT: ::c_uint = 7; +pub const PTRACE_KILL: ::c_uint = 8; +pub const PTRACE_SINGLESTEP: ::c_uint = 9; +pub const PTRACE_ATTACH: ::c_uint = 16; +pub const PTRACE_DETACH: ::c_uint = 17; +pub const PTRACE_SYSCALL: ::c_uint = 24; +pub const PTRACE_SETOPTIONS: ::c_uint = 0x4200; +pub const PTRACE_GETEVENTMSG: ::c_uint = 0x4201; +pub const PTRACE_GETSIGINFO: ::c_uint = 0x4202; +pub const PTRACE_SETSIGINFO: ::c_uint = 0x4203; +pub const PTRACE_GETREGSET: ::c_uint = 0x4204; +pub const PTRACE_SETREGSET: ::c_uint = 0x4205; +pub const PTRACE_SEIZE: ::c_uint = 0x4206; +pub const PTRACE_INTERRUPT: ::c_uint = 0x4207; +pub const PTRACE_LISTEN: ::c_uint = 0x4208; +pub const PTRACE_PEEKSIGINFO: ::c_uint = 0x4209; + +pub const MADV_DODUMP: ::c_int = 17; +pub const MADV_DONTDUMP: ::c_int = 16; + +pub const EPOLLWAKEUP: ::c_int = 0x20000000; + +pub const MADV_HUGEPAGE: ::c_int = 14; +pub const MADV_NOHUGEPAGE: ::c_int = 15; +pub const MAP_HUGETLB: ::c_int = 0x040000; + +pub const EFD_NONBLOCK: ::c_int = 0x800; + +pub const F_GETLK: ::c_int = 5; +pub const F_GETOWN: ::c_int = 9; +pub const F_SETOWN: ::c_int = 8; +pub const F_SETLK: ::c_int = 6; +pub const F_SETLKW: ::c_int = 7; + +pub const SFD_NONBLOCK: ::c_int = 0x0800; + +pub const TCSANOW: ::c_int = 0; +pub const TCSADRAIN: ::c_int = 1; +pub const TCSAFLUSH: ::c_int = 2; + +pub const TCGETS: ::c_ulong = 0x5401; +pub const TCSETS: ::c_ulong = 0x5402; +pub const TCSETSW: ::c_ulong = 0x5403; +pub const TCSETSF: ::c_ulong = 0x5404; +pub const TCGETA: ::c_ulong = 0x5405; +pub const TCSETA: ::c_ulong = 0x5406; +pub const TCSETAW: ::c_ulong = 0x5407; +pub const TCSETAF: ::c_ulong = 0x5408; +pub const TCSBRK: ::c_ulong = 0x5409; +pub const TCXONC: ::c_ulong = 0x540A; +pub const TCFLSH: ::c_ulong = 0x540B; +pub const TIOCGSOFTCAR: ::c_ulong = 0x5419; +pub const TIOCSSOFTCAR: ::c_ulong = 0x541A; +pub const TIOCINQ: ::c_ulong = 0x541B; +pub const TIOCLINUX: ::c_ulong = 0x541C; +pub const TIOCGSERIAL: ::c_ulong = 0x541E; +pub const TIOCEXCL: ::c_ulong = 0x540C; +pub const TIOCNXCL: ::c_ulong = 0x540D; +pub const TIOCSCTTY: ::c_ulong = 0x540E; +pub const TIOCGPGRP: ::c_ulong = 0x540F; +pub const TIOCSPGRP: ::c_ulong = 0x5410; +pub const TIOCOUTQ: ::c_ulong = 0x5411; +pub const TIOCSTI: ::c_ulong = 0x5412; +pub const TIOCGWINSZ: ::c_ulong = 0x5413; +pub const TIOCSWINSZ: ::c_ulong = 0x5414; +pub const TIOCMGET: ::c_ulong = 0x5415; +pub const TIOCMBIS: ::c_ulong = 0x5416; +pub const TIOCMBIC: ::c_ulong = 0x5417; +pub const TIOCMSET: ::c_ulong = 0x5418; +pub const FIONREAD: ::c_ulong = 0x541B; +pub const TIOCCONS: ::c_ulong = 0x541D; + +pub const RTLD_DEEPBIND: ::c_int = 0x8; +pub const RTLD_GLOBAL: ::c_int = 0x100; +pub const RTLD_NOLOAD: ::c_int = 0x4; + +cfg_if! { + if #[cfg(any(target_arch = "arm", target_arch = "x86", + target_arch = "x86_64"))] { + pub const PTHREAD_STACK_MIN: ::size_t = 16384; + } else { + pub const PTHREAD_STACK_MIN: ::size_t = 131072; + } +} + +extern { + pub fn sysctl(name: *mut ::c_int, + namelen: ::c_int, + oldp: *mut ::c_void, + oldlenp: *mut ::size_t, + newp: *mut ::c_void, + newlen: ::size_t) + -> ::c_int; + pub fn ioctl(fd: ::c_int, request: ::c_ulong, ...) -> ::c_int; + pub fn backtrace(buf: *mut *mut ::c_void, + sz: ::c_int) -> ::c_int; + pub fn glob64(pattern: *const ::c_char, + flags: ::c_int, + errfunc: ::dox::Option ::c_int>, + pglob: *mut glob64_t) -> ::c_int; + pub fn globfree64(pglob: *mut glob64_t); + pub fn getnameinfo(sa: *const ::sockaddr, + salen: ::socklen_t, + host: *mut ::c_char, + hostlen: ::socklen_t, + serv: *mut ::c_char, + sevlen: ::socklen_t, + flags: ::c_int) -> ::c_int; + pub fn eventfd(init: ::c_uint, flags: ::c_int) -> ::c_int; + pub fn ptrace(request: ::c_uint, ...) -> ::c_long; + pub fn pthread_attr_getaffinity_np(attr: *const ::pthread_attr_t, + cpusetsize: ::size_t, + cpuset: *mut ::cpu_set_t) -> ::c_int; + pub fn pthread_attr_setaffinity_np(attr: *mut ::pthread_attr_t, + cpusetsize: ::size_t, + cpuset: *const ::cpu_set_t) -> ::c_int; +} + +cfg_if! { + if #[cfg(any(target_arch = "x86", + target_arch = "arm", + target_arch = "powerpc"))] { + mod b32; + pub use self::b32::*; + } else if #[cfg(any(target_arch = "x86_64", + target_arch = "aarch64", + target_arch = "powerpc64"))] { + mod b64; + pub use self::b64::*; + } else { + // ... + } +} diff --git a/deps/libc-0.2.8/src/unix/notbsd/mod.rs b/deps/libc-0.2.8/src/unix/notbsd/mod.rs new file mode 100644 index 000000000..610643873 --- /dev/null +++ b/deps/libc-0.2.8/src/unix/notbsd/mod.rs @@ -0,0 +1,685 @@ +use dox::mem; + +pub type sa_family_t = u16; +pub type pthread_key_t = ::c_uint; +pub type speed_t = ::c_uint; +pub type tcflag_t = ::c_uint; +pub type loff_t = ::c_longlong; + +pub enum timezone {} + +s! { + pub struct sockaddr { + pub sa_family: sa_family_t, + pub sa_data: [::c_char; 14], + } + + pub struct sockaddr_in { + pub sin_family: sa_family_t, + pub sin_port: ::in_port_t, + pub sin_addr: ::in_addr, + pub sin_zero: [u8; 8], + } + + pub struct sockaddr_in6 { + pub sin6_family: sa_family_t, + pub sin6_port: ::in_port_t, + pub sin6_flowinfo: u32, + pub sin6_addr: ::in6_addr, + pub sin6_scope_id: u32, + } + + pub struct sockaddr_un { + pub sun_family: sa_family_t, + pub sun_path: [::c_char; 108] + } + + pub struct sockaddr_storage { + pub ss_family: sa_family_t, + __ss_align: ::size_t, + #[cfg(target_pointer_width = "32")] + __ss_pad2: [u8; 128 - 2 * 4], + #[cfg(target_pointer_width = "64")] + __ss_pad2: [u8; 128 - 2 * 8], + } + + pub struct addrinfo { + pub ai_flags: ::c_int, + pub ai_family: ::c_int, + pub ai_socktype: ::c_int, + pub ai_protocol: ::c_int, + pub ai_addrlen: socklen_t, + + #[cfg(any(target_os = "linux", target_os = "emscripten"))] + pub ai_addr: *mut ::sockaddr, + + pub ai_canonname: *mut c_char, + + #[cfg(target_os = "android")] + pub ai_addr: *mut ::sockaddr, + + pub ai_next: *mut addrinfo, + } + + pub struct sockaddr_ll { + pub sll_family: ::c_ushort, + pub sll_protocol: ::c_ushort, + pub sll_ifindex: ::c_int, + pub sll_hatype: ::c_ushort, + pub sll_pkttype: ::c_uchar, + pub sll_halen: ::c_uchar, + pub sll_addr: [::c_uchar; 8] + } + + pub struct fd_set { + fds_bits: [::c_ulong; FD_SETSIZE / ULONG_SIZE], + } + + pub struct tm { + pub tm_sec: ::c_int, + pub tm_min: ::c_int, + pub tm_hour: ::c_int, + pub tm_mday: ::c_int, + pub tm_mon: ::c_int, + pub tm_year: ::c_int, + pub tm_wday: ::c_int, + pub tm_yday: ::c_int, + pub tm_isdst: ::c_int, + pub tm_gmtoff: ::c_long, + pub tm_zone: *const ::c_char, + } + + pub struct sched_param { + pub sched_priority: ::c_int, + #[cfg(target_env = "musl")] + pub sched_ss_low_priority: ::c_int, + #[cfg(target_env = "musl")] + pub sched_ss_repl_period: ::timespec, + #[cfg(target_env = "musl")] + pub sched_ss_init_budget: ::timespec, + #[cfg(target_env = "musl")] + pub sched_ss_max_repl: ::c_int, + } + + pub struct Dl_info { + pub dli_fname: *const ::c_char, + pub dli_fbase: *mut ::c_void, + pub dli_sname: *const ::c_char, + pub dli_saddr: *mut ::c_void, + } + + #[cfg_attr(any(all(target_arch = "x86", not(target_env = "musl")), + target_arch = "x86_64"), + repr(packed))] + pub struct epoll_event { + pub events: ::uint32_t, + pub u64: ::uint64_t, + } + + pub struct utsname { + pub sysname: [::c_char; 65], + pub nodename: [::c_char; 65], + pub release: [::c_char; 65], + pub version: [::c_char; 65], + pub machine: [::c_char; 65], + pub domainname: [::c_char; 65] + } +} + +// intentionally not public, only used for fd_set +cfg_if! { + if #[cfg(target_pointer_width = "32")] { + const ULONG_SIZE: usize = 32; + } else if #[cfg(target_pointer_width = "64")] { + const ULONG_SIZE: usize = 64; + } else { + } +} + +pub const EXIT_FAILURE: ::c_int = 1; +pub const EXIT_SUCCESS: ::c_int = 0; +pub const RAND_MAX: ::c_int = 2147483647; +pub const EOF: ::c_int = -1; +pub const SEEK_SET: ::c_int = 0; +pub const SEEK_CUR: ::c_int = 1; +pub const SEEK_END: ::c_int = 2; +pub const _IOFBF: ::c_int = 0; +pub const _IONBF: ::c_int = 2; +pub const _IOLBF: ::c_int = 1; + +pub const F_DUPFD: ::c_int = 0; +pub const F_GETFD: ::c_int = 1; +pub const F_SETFD: ::c_int = 2; +pub const F_GETFL: ::c_int = 3; +pub const F_SETFL: ::c_int = 4; + +pub const SIGTRAP: ::c_int = 5; + +pub const PTHREAD_CREATE_JOINABLE: ::c_int = 0; +pub const PTHREAD_CREATE_DETACHED: ::c_int = 1; + +pub const CLOCK_REALTIME: ::c_int = 0; +pub const CLOCK_MONOTONIC: ::c_int = 1; + +pub const RLIMIT_CPU: ::c_int = 0; +pub const RLIMIT_FSIZE: ::c_int = 1; +pub const RLIMIT_DATA: ::c_int = 2; +pub const RLIMIT_STACK: ::c_int = 3; +pub const RLIMIT_CORE: ::c_int = 4; +pub const RLIMIT_LOCKS: ::c_int = 10; +pub const RLIMIT_SIGPENDING: ::c_int = 11; +pub const RLIMIT_MSGQUEUE: ::c_int = 12; +pub const RLIMIT_NICE: ::c_int = 13; +pub const RLIMIT_RTPRIO: ::c_int = 14; + +pub const RUSAGE_SELF: ::c_int = 0; + +pub const O_RDONLY: ::c_int = 0; +pub const O_WRONLY: ::c_int = 1; +pub const O_RDWR: ::c_int = 2; +pub const O_TRUNC: ::c_int = 512; +pub const O_CLOEXEC: ::c_int = 0x80000; + +pub const SOCK_CLOEXEC: ::c_int = O_CLOEXEC; + +pub const S_IFIFO: ::mode_t = 4096; +pub const S_IFCHR: ::mode_t = 8192; +pub const S_IFBLK: ::mode_t = 24576; +pub const S_IFDIR: ::mode_t = 16384; +pub const S_IFREG: ::mode_t = 32768; +pub const S_IFLNK: ::mode_t = 40960; +pub const S_IFSOCK: ::mode_t = 49152; +pub const S_IFMT: ::mode_t = 61440; +pub const S_IRWXU: ::mode_t = 448; +pub const S_IXUSR: ::mode_t = 64; +pub const S_IWUSR: ::mode_t = 128; +pub const S_IRUSR: ::mode_t = 256; +pub const S_IRWXG: ::mode_t = 56; +pub const S_IXGRP: ::mode_t = 8; +pub const S_IWGRP: ::mode_t = 16; +pub const S_IRGRP: ::mode_t = 32; +pub const S_IRWXO: ::mode_t = 7; +pub const S_IXOTH: ::mode_t = 1; +pub const S_IWOTH: ::mode_t = 2; +pub const S_IROTH: ::mode_t = 4; +pub const F_OK: ::c_int = 0; +pub const R_OK: ::c_int = 4; +pub const W_OK: ::c_int = 2; +pub const X_OK: ::c_int = 1; +pub const STDIN_FILENO: ::c_int = 0; +pub const STDOUT_FILENO: ::c_int = 1; +pub const STDERR_FILENO: ::c_int = 2; +pub const SIGHUP: ::c_int = 1; +pub const SIGINT: ::c_int = 2; +pub const SIGQUIT: ::c_int = 3; +pub const SIGILL: ::c_int = 4; +pub const SIGABRT: ::c_int = 6; +pub const SIGFPE: ::c_int = 8; +pub const SIGKILL: ::c_int = 9; +pub const SIGSEGV: ::c_int = 11; +pub const SIGPIPE: ::c_int = 13; +pub const SIGALRM: ::c_int = 14; +pub const SIGTERM: ::c_int = 15; + +pub const PROT_NONE: ::c_int = 0; +pub const PROT_READ: ::c_int = 1; +pub const PROT_WRITE: ::c_int = 2; +pub const PROT_EXEC: ::c_int = 4; + +pub const MAP_FILE: ::c_int = 0x0000; +pub const MAP_SHARED: ::c_int = 0x0001; +pub const MAP_PRIVATE: ::c_int = 0x0002; +pub const MAP_FIXED: ::c_int = 0x0010; + +pub const MAP_FAILED: *mut ::c_void = !0 as *mut ::c_void; + +pub const MCL_CURRENT: ::c_int = 0x0001; +pub const MCL_FUTURE: ::c_int = 0x0002; + +pub const MS_ASYNC: ::c_int = 0x0001; +pub const MS_INVALIDATE: ::c_int = 0x0002; +pub const MS_SYNC: ::c_int = 0x0004; +pub const MS_RDONLY: ::c_ulong = 0x01; +pub const MS_NOSUID: ::c_ulong = 0x02; +pub const MS_NODEV: ::c_ulong = 0x04; +pub const MS_NOEXEC: ::c_ulong = 0x08; +pub const MS_SYNCHRONOUS: ::c_ulong = 0x10; +pub const MS_REMOUNT: ::c_ulong = 0x20; +pub const MS_MANDLOCK: ::c_ulong = 0x40; +pub const MS_DIRSYNC: ::c_ulong = 0x80; +pub const MS_NOATIME: ::c_ulong = 0x0400; +pub const MS_NODIRATIME: ::c_ulong = 0x0800; +pub const MS_BIND: ::c_ulong = 0x1000; +pub const MS_MOVE: ::c_ulong = 0x2000; +pub const MS_REC: ::c_ulong = 0x4000; +pub const MS_SILENT: ::c_ulong = 0x8000; +pub const MS_POSIXACL: ::c_ulong = 0x010000; +pub const MS_UNBINDABLE: ::c_ulong = 0x020000; +pub const MS_PRIVATE: ::c_ulong = 0x040000; +pub const MS_SLAVE: ::c_ulong = 0x080000; +pub const MS_SHARED: ::c_ulong = 0x100000; +pub const MS_ACTIVE: ::c_ulong = 0x40000000; +pub const MS_NOUSER: ::c_ulong = 0x80000000; +pub const MS_MGC_VAL: ::c_ulong = 0xc0ed0000; +pub const MS_MGC_MSK: ::c_ulong = 0xffff0000; +pub const MS_RMT_MASK: ::c_ulong = 0x800051; + +pub const EPERM: ::c_int = 1; +pub const ENOENT: ::c_int = 2; +pub const ESRCH: ::c_int = 3; +pub const EINTR: ::c_int = 4; +pub const EIO: ::c_int = 5; +pub const ENXIO: ::c_int = 6; +pub const E2BIG: ::c_int = 7; +pub const ENOEXEC: ::c_int = 8; +pub const EBADF: ::c_int = 9; +pub const ECHILD: ::c_int = 10; +pub const EAGAIN: ::c_int = 11; +pub const ENOMEM: ::c_int = 12; +pub const EACCES: ::c_int = 13; +pub const EFAULT: ::c_int = 14; +pub const ENOTBLK: ::c_int = 15; +pub const EBUSY: ::c_int = 16; +pub const EEXIST: ::c_int = 17; +pub const EXDEV: ::c_int = 18; +pub const ENODEV: ::c_int = 19; +pub const ENOTDIR: ::c_int = 20; +pub const EISDIR: ::c_int = 21; +pub const EINVAL: ::c_int = 22; +pub const ENFILE: ::c_int = 23; +pub const EMFILE: ::c_int = 24; +pub const ENOTTY: ::c_int = 25; +pub const ETXTBSY: ::c_int = 26; +pub const EFBIG: ::c_int = 27; +pub const ENOSPC: ::c_int = 28; +pub const ESPIPE: ::c_int = 29; +pub const EROFS: ::c_int = 30; +pub const EMLINK: ::c_int = 31; +pub const EPIPE: ::c_int = 32; +pub const EDOM: ::c_int = 33; +pub const ERANGE: ::c_int = 34; +pub const EWOULDBLOCK: ::c_int = EAGAIN; + +pub const EBFONT: ::c_int = 59; +pub const ENOSTR: ::c_int = 60; +pub const ENODATA: ::c_int = 61; +pub const ETIME: ::c_int = 62; +pub const ENOSR: ::c_int = 63; +pub const ENONET: ::c_int = 64; +pub const ENOPKG: ::c_int = 65; +pub const EREMOTE: ::c_int = 66; +pub const ENOLINK: ::c_int = 67; +pub const EADV: ::c_int = 68; +pub const ESRMNT: ::c_int = 69; +pub const ECOMM: ::c_int = 70; +pub const EPROTO: ::c_int = 71; +pub const EDOTDOT: ::c_int = 73; + +pub const AF_PACKET: ::c_int = 17; +pub const IPPROTO_RAW: ::c_int = 255; + +pub const PROT_GROWSDOWN: ::c_int = 0x1000000; +pub const PROT_GROWSUP: ::c_int = 0x2000000; + +pub const MAP_TYPE: ::c_int = 0x000f; + +pub const MADV_NORMAL: ::c_int = 0; +pub const MADV_RANDOM: ::c_int = 1; +pub const MADV_SEQUENTIAL: ::c_int = 2; +pub const MADV_WILLNEED: ::c_int = 3; +pub const MADV_DONTNEED: ::c_int = 4; +pub const MADV_REMOVE: ::c_int = 9; +pub const MADV_DONTFORK: ::c_int = 10; +pub const MADV_DOFORK: ::c_int = 11; +pub const MADV_MERGEABLE: ::c_int = 12; +pub const MADV_UNMERGEABLE: ::c_int = 13; +pub const MADV_HWPOISON: ::c_int = 100; + +pub const IFF_LOOPBACK: ::c_int = 0x8; + +pub const AF_UNIX: ::c_int = 1; +pub const AF_INET: ::c_int = 2; +pub const AF_INET6: ::c_int = 10; +pub const SOCK_RAW: ::c_int = 3; +pub const IPPROTO_TCP: ::c_int = 6; +pub const IPPROTO_IP: ::c_int = 0; +pub const IPPROTO_IPV6: ::c_int = 41; +pub const IP_MULTICAST_TTL: ::c_int = 33; +pub const IP_MULTICAST_LOOP: ::c_int = 34; +pub const IP_TTL: ::c_int = 2; +pub const IP_HDRINCL: ::c_int = 3; +pub const IP_ADD_MEMBERSHIP: ::c_int = 35; +pub const IP_DROP_MEMBERSHIP: ::c_int = 36; +pub const IP_TRANSPARENT: ::c_int = 19; +pub const IPV6_ADD_MEMBERSHIP: ::c_int = 20; +pub const IPV6_DROP_MEMBERSHIP: ::c_int = 21; + +pub const TCP_NODELAY: ::c_int = 1; +pub const TCP_MAXSEG: ::c_int = 2; +pub const TCP_CORK: ::c_int = 3; +pub const TCP_KEEPIDLE: ::c_int = 4; +pub const TCP_KEEPINTVL: ::c_int = 5; +pub const TCP_KEEPCNT: ::c_int = 6; +pub const TCP_SYNCNT: ::c_int = 7; +pub const TCP_LINGER2: ::c_int = 8; +pub const TCP_DEFER_ACCEPT: ::c_int = 9; +pub const TCP_WINDOW_CLAMP: ::c_int = 10; +pub const TCP_INFO: ::c_int = 11; +pub const TCP_QUICKACK: ::c_int = 12; +pub const TCP_CONGESTION: ::c_int = 13; + +pub const IPV6_MULTICAST_LOOP: ::c_int = 19; +pub const IPV6_V6ONLY: ::c_int = 26; + +pub const SO_DEBUG: ::c_int = 1; + +pub const SHUT_RD: ::c_int = 0; +pub const SHUT_WR: ::c_int = 1; +pub const SHUT_RDWR: ::c_int = 2; + +pub const LOCK_SH: ::c_int = 1; +pub const LOCK_EX: ::c_int = 2; +pub const LOCK_NB: ::c_int = 4; +pub const LOCK_UN: ::c_int = 8; + +pub const SIGSTKSZ: ::size_t = 8192; + +pub const SA_NODEFER: ::c_int = 0x40000000; +pub const SA_RESETHAND: ::c_int = 0x80000000; +pub const SA_RESTART: ::c_int = 0x10000000; +pub const SA_NOCLDSTOP: ::c_int = 0x00000001; + +pub const SS_ONSTACK: ::c_int = 1; +pub const SS_DISABLE: ::c_int = 2; + +pub const PATH_MAX: ::c_int = 4096; + +pub const FD_SETSIZE: usize = 1024; + +pub const EPOLLIN: ::c_int = 0x1; +pub const EPOLLPRI: ::c_int = 0x2; +pub const EPOLLOUT: ::c_int = 0x4; +pub const EPOLLRDNORM: ::c_int = 0x40; +pub const EPOLLRDBAND: ::c_int = 0x80; +pub const EPOLLWRNORM: ::c_int = 0x100; +pub const EPOLLWRBAND: ::c_int = 0x200; +pub const EPOLLMSG: ::c_int = 0x400; +pub const EPOLLERR: ::c_int = 0x8; +pub const EPOLLHUP: ::c_int = 0x10; +pub const EPOLLET: ::c_int = 0x80000000; + +pub const EPOLL_CTL_ADD: ::c_int = 1; +pub const EPOLL_CTL_MOD: ::c_int = 3; +pub const EPOLL_CTL_DEL: ::c_int = 2; + +pub const MNT_DETACH: ::c_int = 0x2; +pub const MNT_EXPIRE: ::c_int = 0x4; + +pub const Q_GETFMT: ::c_int = 0x800004; +pub const Q_GETINFO: ::c_int = 0x800005; +pub const Q_SETINFO: ::c_int = 0x800006; +pub const QIF_BLIMITS: ::uint32_t = 1; +pub const QIF_SPACE: ::uint32_t = 2; +pub const QIF_ILIMITS: ::uint32_t = 4; +pub const QIF_INODES: ::uint32_t = 8; +pub const QIF_BTIME: ::uint32_t = 16; +pub const QIF_ITIME: ::uint32_t = 32; +pub const QIF_LIMITS: ::uint32_t = 5; +pub const QIF_USAGE: ::uint32_t = 10; +pub const QIF_TIMES: ::uint32_t = 48; +pub const QIF_ALL: ::uint32_t = 63; + +pub const CBAUD: ::tcflag_t = 0o0010017; + +pub const EFD_CLOEXEC: ::c_int = 0x80000; + +pub const MNT_FORCE: ::c_int = 0x1; + +pub const Q_SYNC: ::c_int = 0x800001; +pub const Q_QUOTAON: ::c_int = 0x800002; +pub const Q_QUOTAOFF: ::c_int = 0x800003; +pub const Q_GETQUOTA: ::c_int = 0x800007; +pub const Q_SETQUOTA: ::c_int = 0x800008; + +pub const TCIOFF: ::c_int = 2; +pub const TCION: ::c_int = 3; +pub const TCOOFF: ::c_int = 0; +pub const TCOON: ::c_int = 1; +pub const TCIFLUSH: ::c_int = 0; +pub const TCOFLUSH: ::c_int = 1; +pub const TCIOFLUSH: ::c_int = 2; +pub const NL0: ::c_int = 0x00000000; +pub const NL1: ::c_int = 0x00000100; +pub const TAB0: ::c_int = 0x00000000; +pub const TAB1: ::c_int = 0x00000800; +pub const TAB2: ::c_int = 0x00001000; +pub const TAB3: ::c_int = 0x00001800; +pub const CR0: ::c_int = 0x00000000; +pub const CR1: ::c_int = 0x00000200; +pub const CR2: ::c_int = 0x00000400; +pub const CR3: ::c_int = 0x00000600; +pub const FF0: ::c_int = 0x00000000; +pub const FF1: ::c_int = 0x00008000; +pub const BS0: ::c_int = 0x00000000; +pub const BS1: ::c_int = 0x00002000; +pub const VT0: ::c_int = 0x00000000; +pub const VT1: ::c_int = 0x00004000; +pub const VERASE: usize = 2; +pub const VWERASE: usize = 14; +pub const VKILL: usize = 3; +pub const VREPRINT: usize = 12; +pub const VINTR: usize = 0; +pub const VQUIT: usize = 1; +pub const VSUSP: usize = 10; +pub const VSTART: usize = 8; +pub const VSTOP: usize = 9; +pub const VLNEXT: usize = 15; +pub const VDISCARD: usize = 13; +pub const VTIME: usize = 5; +pub const IGNBRK: ::tcflag_t = 0x00000001; +pub const BRKINT: ::tcflag_t = 0x00000002; +pub const IGNPAR: ::tcflag_t = 0x00000004; +pub const PARMRK: ::tcflag_t = 0x00000008; +pub const INPCK: ::tcflag_t = 0x00000010; +pub const ISTRIP: ::tcflag_t = 0x00000020; +pub const INLCR: ::tcflag_t = 0x00000040; +pub const IGNCR: ::tcflag_t = 0x00000080; +pub const ICRNL: ::tcflag_t = 0x00000100; +pub const IXON: ::tcflag_t = 0x00000400; +pub const IXOFF: ::tcflag_t = 0x00001000; +pub const IXANY: ::tcflag_t = 0x00000800; +pub const IMAXBEL: ::tcflag_t = 0x00002000; +pub const OPOST: ::tcflag_t = 0x1; +pub const ONLCR: ::tcflag_t = 0x4; +pub const CSIZE: ::tcflag_t = 0x00000030; +pub const CS5: ::tcflag_t = 0x00000000; +pub const CS6: ::tcflag_t = 0x00000010; +pub const CS7: ::tcflag_t = 0x00000020; +pub const CS8: ::tcflag_t = 0x00000030; +pub const CSTOPB: ::tcflag_t = 0x00000040; +pub const CREAD: ::tcflag_t = 0x00000080; +pub const PARENB: ::tcflag_t = 0x00000100; +pub const PARODD: ::tcflag_t = 0x00000200; +pub const HUPCL: ::tcflag_t = 0x00000400; +pub const CLOCAL: ::tcflag_t = 0x00000800; +pub const CRTSCTS: ::tcflag_t = 0x80000000; +pub const ECHOKE: ::tcflag_t = 0x00000800; +pub const ECHOE: ::tcflag_t = 0x00000010; +pub const ECHOK: ::tcflag_t = 0x00000020; +pub const ECHO: ::tcflag_t = 0x00000008; +pub const ECHONL: ::tcflag_t = 0x00000040; +pub const ECHOPRT: ::tcflag_t = 0x00000400; +pub const ECHOCTL: ::tcflag_t = 0x00000200; +pub const ISIG: ::tcflag_t = 0x00000001; +pub const ICANON: ::tcflag_t = 0x00000002; +pub const PENDIN: ::tcflag_t = 0x00004000; +pub const NOFLSH: ::tcflag_t = 0x00000080; + +pub const CLONE_VM: ::c_int = 0x100; +pub const CLONE_FS: ::c_int = 0x200; +pub const CLONE_FILES: ::c_int = 0x400; +pub const CLONE_SIGHAND: ::c_int = 0x800; +pub const CLONE_PTRACE: ::c_int = 0x2000; +pub const CLONE_VFORK: ::c_int = 0x4000; +pub const CLONE_PARENT: ::c_int = 0x8000; +pub const CLONE_THREAD: ::c_int = 0x10000; +pub const CLONE_NEWNS: ::c_int = 0x20000; +pub const CLONE_SYSVSEM: ::c_int = 0x40000; +pub const CLONE_SETTLS: ::c_int = 0x80000; +pub const CLONE_PARENT_SETTID: ::c_int = 0x100000; +pub const CLONE_CHILD_CLEARTID: ::c_int = 0x200000; +pub const CLONE_DETACHED: ::c_int = 0x400000; +pub const CLONE_UNTRACED: ::c_int = 0x800000; +pub const CLONE_CHILD_SETTID: ::c_int = 0x01000000; + +pub const WNOHANG: ::c_int = 1; + +pub const SPLICE_F_MOVE: ::c_uint = 0x01; +pub const SPLICE_F_NONBLOCK: ::c_uint = 0x02; +pub const SPLICE_F_MORE: ::c_uint = 0x04; +pub const SPLICE_F_GIFT: ::c_uint = 0x08; + +pub const RTLD_LOCAL: ::c_int = 0; + +pub const POSIX_FADV_NORMAL: ::c_int = 0; +pub const POSIX_FADV_RANDOM: ::c_int = 1; +pub const POSIX_FADV_SEQUENTIAL: ::c_int = 2; +pub const POSIX_FADV_WILLNEED: ::c_int = 3; +pub const POSIX_FADV_DONTNEED: ::c_int = 4; +pub const POSIX_FADV_NOREUSE: ::c_int = 5; + +pub const AT_FDCWD: ::c_int = -100; +pub const AT_SYMLINK_NOFOLLOW: ::c_int = 0x100; + +f! { + pub fn FD_CLR(fd: ::c_int, set: *mut fd_set) -> () { + let fd = fd as usize; + let size = mem::size_of_val(&(*set).fds_bits[0]) * 8; + (*set).fds_bits[fd / size] &= !(1 << (fd % size)); + return + } + + pub fn FD_ISSET(fd: ::c_int, set: *mut fd_set) -> bool { + let fd = fd as usize; + let size = mem::size_of_val(&(*set).fds_bits[0]) * 8; + return ((*set).fds_bits[fd / size] & (1 << (fd % size))) != 0 + } + + pub fn FD_SET(fd: ::c_int, set: *mut fd_set) -> () { + let fd = fd as usize; + let size = mem::size_of_val(&(*set).fds_bits[0]) * 8; + (*set).fds_bits[fd / size] |= 1 << (fd % size); + return + } + + pub fn FD_ZERO(set: *mut fd_set) -> () { + for slot in (*set).fds_bits.iter_mut() { + *slot = 0; + } + } + + pub fn WIFEXITED(status: ::c_int) -> bool { + (status & 0xff) == 0 + } + + pub fn WEXITSTATUS(status: ::c_int) -> ::c_int { + (status >> 8) & 0xff + } + + pub fn WTERMSIG(status: ::c_int) -> ::c_int { + status & 0x7f + } +} + +extern { + pub fn getpwuid_r(uid: ::uid_t, + pwd: *mut passwd, + buf: *mut ::c_char, + buflen: ::size_t, + result: *mut *mut passwd) -> ::c_int; + pub fn fdatasync(fd: ::c_int) -> ::c_int; + pub fn mincore(addr: *mut ::c_void, len: ::size_t, + vec: *mut ::c_uchar) -> ::c_int; + pub fn clock_gettime(clk_id: ::c_int, tp: *mut ::timespec) -> ::c_int; + pub fn prctl(option: ::c_int, ...) -> ::c_int; + pub fn pthread_getattr_np(native: ::pthread_t, + attr: *mut ::pthread_attr_t) -> ::c_int; + pub fn pthread_attr_getguardsize(attr: *const ::pthread_attr_t, + guardsize: *mut ::size_t) -> ::c_int; + pub fn pthread_attr_getstack(attr: *const ::pthread_attr_t, + stackaddr: *mut *mut ::c_void, + stacksize: *mut ::size_t) -> ::c_int; + pub fn memalign(align: ::size_t, size: ::size_t) -> *mut ::c_void; + pub fn setgroups(ngroups: ::size_t, + ptr: *const ::gid_t) -> ::c_int; + pub fn sched_setscheduler(pid: ::pid_t, + policy: ::c_int, + param: *const sched_param) -> ::c_int; + pub fn sched_getscheduler(pid: ::pid_t) -> ::c_int; + pub fn sched_get_priority_max(policy: ::c_int) -> ::c_int; + pub fn sched_get_priority_min(policy: ::c_int) -> ::c_int; + pub fn epoll_create(size: ::c_int) -> ::c_int; + pub fn epoll_ctl(epfd: ::c_int, + op: ::c_int, + fd: ::c_int, + event: *mut epoll_event) -> ::c_int; + pub fn epoll_wait(epfd: ::c_int, + events: *mut epoll_event, + maxevents: ::c_int, + timeout: ::c_int) -> ::c_int; + pub fn pipe2(fds: *mut ::c_int, flags: ::c_int) -> ::c_int; + pub fn mount(src: *const ::c_char, + target: *const ::c_char, + fstype: *const ::c_char, + flags: ::c_ulong, + data: *const ::c_void) -> ::c_int; + pub fn umount(target: *const ::c_char) -> ::c_int; + pub fn umount2(target: *const ::c_char, flags: ::c_int) -> ::c_int; + pub fn clone(cb: extern fn(*mut ::c_void) -> ::c_int, + child_stack: *mut ::c_void, + flags: ::c_int, + arg: *mut ::c_void, ...) -> ::c_int; + pub fn statfs(path: *const ::c_char, buf: *mut statfs) -> ::c_int; + pub fn fstatfs(fd: ::c_int, buf: *mut statfs) -> ::c_int; + pub fn memrchr(cx: *const ::c_void, + c: ::c_int, + n: ::size_t) -> *mut ::c_void; + pub fn syscall(num: ::c_long, ...) -> ::c_long; + pub fn sendfile(out_fd: ::c_int, + in_fd: ::c_int, + offset: *mut off_t, + count: ::size_t) -> ::ssize_t; + pub fn splice(fd_in: ::c_int, + off_in: *mut ::loff_t, + fd_out: ::c_int, + off_out: *mut ::loff_t, + len: ::size_t, + flags: ::c_uint) -> ::ssize_t; + pub fn tee(fd_in: ::c_int, + fd_out: ::c_int, + len: ::size_t, + flags: ::c_uint) -> ::ssize_t; + pub fn vmsplice(fd: ::c_int, + iov: *const ::iovec, + nr_segs: ::size_t, + flags: ::c_uint) -> ::ssize_t; + + pub fn posix_fadvise(fd: ::c_int, offset: ::off_t, len: ::off_t, + advise: ::c_int) -> ::c_int; + pub fn futimens(fd: ::c_int, times: *const ::timespec) -> ::c_int; + pub fn utimensat(dirfd: ::c_int, path: *const ::c_char, + times: *const ::timespec, flag: ::c_int) -> ::c_int; +} + +cfg_if! { + if #[cfg(any(target_os = "linux", + target_os = "emscripten"))] { + mod linux; + pub use self::linux::*; + } else if #[cfg(target_os = "android")] { + mod android; + pub use self::android::*; + } else { + // ... + } +} diff --git a/deps/libc-0.2.8/src/unix/solaris/mod.rs b/deps/libc-0.2.8/src/unix/solaris/mod.rs new file mode 100644 index 000000000..4ad520c8f --- /dev/null +++ b/deps/libc-0.2.8/src/unix/solaris/mod.rs @@ -0,0 +1,770 @@ +pub type c_char = i8; +pub type c_long = i64; +pub type c_ulong = u64; + +pub type blkcnt_t = i64; +pub type clock_t = i64; +pub type daddr_t = i64; +pub type dev_t = u64; +pub type fsblkcnt_t = u64; +pub type fsfilcnt_t = u64; +pub type ino_t = i64; +pub type key_t = i32; +pub type major_t = u32; +pub type minor_t = u32; +pub type mode_t = u32; +pub type nlink_t = u32; +pub type rlim_t = u64; +pub type speed_t = u32; +pub type tcflag_t = u32; +pub type time_t = i64; +pub type wchar_t = i32; +pub type nfds_t = ::c_ulong; + +pub type suseconds_t = ::c_long; +pub type off_t = i64; +pub type useconds_t = ::c_uint; +pub type socklen_t = u32; +pub type sa_family_t = u8; +pub type pthread_t = ::uintptr_t; +pub type pthread_key_t = ::c_uint; +pub type blksize_t = u32; +pub type fflags_t = u32; + +pub enum timezone {} + +s! { + pub struct sockaddr { + pub sa_family: sa_family_t, + pub sa_data: [::c_char; 14], + } + + pub struct sockaddr_in { + pub sin_family: sa_family_t, + pub sin_port: ::in_port_t, + pub sin_addr: ::in_addr, + pub sin_zero: [::c_char; 8] + } + + pub struct sockaddr_in6 { + pub sin6_family: sa_family_t, + pub sin6_port: ::in_port_t, + pub sin6_flowinfo: u32, + pub sin6_addr: ::in6_addr, + pub sin6_scope_id: u32, + pub __sin6_src_id: u32 + } + + pub struct sockaddr_un { + pub sun_family: sa_family_t, + pub sun_path: [c_char; 108] + } + + pub struct passwd { + pub pw_name: *mut ::c_char, + pub pw_passwd: *mut ::c_char, + pub pw_uid: ::uid_t, + pub pw_gid: ::gid_t, + pub pw_age: *mut ::c_char, + pub pw_comment: *mut ::c_char, + pub pw_gecos: *mut ::c_char, + pub pw_dir: *mut ::c_char, + pub pw_shell: *mut ::c_char + } + + pub struct ifaddrs { + pub ifa_next: *mut ifaddrs, + pub ifa_name: *mut ::c_char, + pub ifa_flags: ::c_ulong, + pub ifa_addr: *mut ::sockaddr, + pub ifa_netmask: *mut ::sockaddr, + pub ifa_dstaddr: *mut ::sockaddr, + pub ifa_data: *mut ::c_void + } + + pub struct tm { + pub tm_sec: ::c_int, + pub tm_min: ::c_int, + pub tm_hour: ::c_int, + pub tm_mday: ::c_int, + pub tm_mon: ::c_int, + pub tm_year: ::c_int, + pub tm_wday: ::c_int, + pub tm_yday: ::c_int, + pub tm_isdst: ::c_int + } + + pub struct utsname { + pub sysname: [::c_char; 257], + pub nodename: [::c_char; 257], + pub release: [::c_char; 257], + pub version: [::c_char; 257], + pub machine: [::c_char; 257], + } + + pub struct msghdr { + pub msg_name: *mut ::c_void, + pub msg_namelen: ::socklen_t, + pub msg_iov: *mut ::iovec, + pub msg_iovlen: ::c_int, + pub msg_control: *mut ::c_void, + pub msg_controllen: ::socklen_t, + pub msg_flags: ::c_int, + } + + pub struct fd_set { + fds_bits: [i32; FD_SETSIZE / 32], + } + + pub struct pthread_attr_t { + __pthread_attrp: *mut ::c_void + } + + pub struct pthread_mutex_t { + __pthread_mutex_flag1: u16, + __pthread_mutex_flag2: u8, + __pthread_mutex_ceiling: u8, + __pthread_mutex_type: u16, + __pthread_mutex_magic: u16, + __pthread_mutex_lock: u64, + __pthread_mutex_data: u64 + } + + pub struct pthread_mutexattr_t { + __pthread_mutexattrp: *mut ::c_void + } + + pub struct pthread_cond_t { + __pthread_cond_flag: [u8; 4], + __pthread_cond_type: u16, + __pthread_cond_magic: u16, + __pthread_cond_data: u64 + } + + pub struct pthread_rwlock_t { + __pthread_rwlock_readers: i32, + __pthread_rwlock_type: u16, + __pthread_rwlock_magic: u16, + __pthread_rwlock_mutex: ::pthread_mutex_t, + __pthread_rwlock_readercv: ::pthread_cond_t, + __pthread_rwlock_writercv: ::pthread_cond_t + } + + pub struct dirent { + pub d_ino: ::ino_t, + pub d_off: ::off_t, + pub d_reclen: u16, + pub d_name: [::c_char; 1] + } + + pub struct glob_t { + pub gl_pathc: ::size_t, + pub gl_pathv: *mut *mut ::c_char, + pub gl_offs: ::size_t, + __unused1: *mut ::c_void, + __unused2: ::c_int, + __unused3: ::c_int, + __unused4: ::c_int, + __unused5: *mut ::c_void, + __unused6: *mut ::c_void, + __unused7: *mut ::c_void, + __unused8: *mut ::c_void, + __unused9: *mut ::c_void, + __unused10: *mut ::c_void, + } + + pub struct sockaddr_storage { + pub ss_family: ::sa_family_t, + __ss_pad1: [u8; 6], + __ss_align: i64, + __ss_pad2: [u8; 240], + } + + pub struct addrinfo { + pub ai_flags: ::c_int, + pub ai_family: ::c_int, + pub ai_socktype: ::c_int, + pub ai_protocol: ::c_int, + pub ai_addrlen: ::socklen_t, + pub ai_canonname: *mut ::c_char, + pub ai_addr: *mut ::sockaddr, + pub ai_next: *mut addrinfo, + } + + pub struct sigset_t { + bits: [u32; 4], + } + + pub struct siginfo_t { + pub si_signo: ::c_int, + pub si_code: ::c_int, + pub si_errno: ::c_int, + pub si_pad: ::c_int, + pub si_addr: *mut ::c_void, + __pad: [u8; 232], + } + + pub struct sigaction { + pub sa_flags: ::c_int, + pub sa_sigaction: ::sighandler_t, + pub sa_mask: sigset_t, + } + + pub struct stack_t { + pub ss_sp: *mut ::c_void, + pub ss_size: ::size_t, + pub ss_flags: ::c_int, + } + + pub struct statvfs { + pub f_bsize: ::c_ulong, + pub f_frsize: ::c_ulong, + pub f_blocks: ::fsblkcnt_t, + pub f_bfree: ::fsblkcnt_t, + pub f_bavail: ::fsblkcnt_t, + pub f_files: ::fsfilcnt_t, + pub f_ffree: ::fsfilcnt_t, + pub f_favail: ::fsfilcnt_t, + pub f_fsid: ::c_ulong, + pub f_basetype: [::c_char; 16], + pub f_flag: ::c_ulong, + pub f_namemax: ::c_ulong, + pub f_fstr: [::c_char; 32] + } + + pub struct sched_param { + pub sched_priority: ::c_int, + sched_pad: [::c_int; 8] + } + + pub struct Dl_info { + pub dli_fname: *const ::c_char, + pub dli_fbase: *mut ::c_void, + pub dli_sname: *const ::c_char, + pub dli_saddr: *mut ::c_void, + } + + pub struct stat { + pub st_dev: ::dev_t, + pub st_ino: ::ino_t, + pub st_mode: ::mode_t, + pub st_nlink: ::nlink_t, + pub st_uid: ::uid_t, + pub st_gid: ::gid_t, + pub st_rdev: ::dev_t, + pub st_size: ::off_t, + pub st_atime: ::time_t, + pub st_atime_nsec: ::c_long, + pub st_mtime: ::time_t, + pub st_mtime_nsec: ::c_long, + pub st_ctime: ::time_t, + pub st_ctime_nsec: ::c_long, + pub st_blksize: ::blksize_t, + pub st_blocks: ::blkcnt_t, + __unused: [::c_char; 16] + } + + pub struct termios { + pub c_iflag: ::tcflag_t, + pub c_oflag: ::tcflag_t, + pub c_cflag: ::tcflag_t, + pub c_lflag: ::tcflag_t, + pub c_cc: [::cc_t; ::NCCS] + } +} + +pub const SA_ONSTACK: ::c_int = 0x00000001; +pub const SA_RESETHAND: ::c_int = 0x00000002; +pub const SA_RESTART: ::c_int = 0x00000004; +pub const SA_SIGINFO: ::c_int = 0x00000008; +pub const SA_NODEFER: ::c_int = 0x00000010; +pub const SA_NOCLDWAIT: ::c_int = 0x00010000; +pub const SA_NOCLDSTOP: ::c_int = 0x00020000; + +pub const SS_ONSTACK: ::c_int = 1; +pub const SS_DISABLE: ::c_int = 2; + +pub const FIONBIO: ::c_int = 0x8004667e; + +pub const SIGCHLD: ::c_int = 18; +pub const SIGBUS: ::c_int = 10; +pub const SIG_SETMASK: ::c_int = 3; + +pub const IPV6_MULTICAST_LOOP: ::c_int = 0x8; +pub const IPV6_V6ONLY: ::c_int = 0x27; + +pub const FD_SETSIZE: usize = 1024; + +pub const ST_RDONLY: ::c_ulong = 1; +pub const ST_NOSUID: ::c_ulong = 2; + +pub const NI_MAXHOST: ::socklen_t = 1025; + +pub const EXIT_FAILURE: ::c_int = 1; +pub const EXIT_SUCCESS: ::c_int = 0; +pub const RAND_MAX: ::c_int = 32767; +pub const EOF: ::c_int = -1; +pub const SEEK_SET: ::c_int = 0; +pub const SEEK_CUR: ::c_int = 1; +pub const SEEK_END: ::c_int = 2; +pub const _IOFBF: ::c_int = 0; +pub const _IONBF: ::c_int = 4; +pub const _IOLBF: ::c_int = 64; +pub const BUFSIZ: ::c_uint = 1024; +pub const FOPEN_MAX: ::c_uint = 20; +pub const FILENAME_MAX: ::c_uint = 1024; +pub const L_tmpnam: ::c_uint = 25; +pub const TMP_MAX: ::c_uint = 17576; + +pub const O_RDONLY: ::c_int = 0; +pub const O_WRONLY: ::c_int = 1; +pub const O_RDWR: ::c_int = 2; +pub const O_APPEND: ::c_int = 8; +pub const O_CREAT: ::c_int = 256; +pub const O_EXCL: ::c_int = 1024; +pub const O_NOCTTY: ::c_int = 2048; +pub const O_TRUNC: ::c_int = 512; +pub const O_CLOEXEC: ::c_int = 0x800000; +pub const O_ACCMODE: ::c_int = 0x600003; +pub const S_IFIFO: mode_t = 4096; +pub const S_IFCHR: mode_t = 8192; +pub const S_IFBLK: mode_t = 24576; +pub const S_IFDIR: mode_t = 16384; +pub const S_IFREG: mode_t = 32768; +pub const S_IFLNK: mode_t = 40960; +pub const S_IFSOCK: mode_t = 49152; +pub const S_IFMT: mode_t = 61440; +pub const S_IEXEC: mode_t = 64; +pub const S_IWRITE: mode_t = 128; +pub const S_IREAD: mode_t = 256; +pub const S_IRWXU: mode_t = 448; +pub const S_IXUSR: mode_t = 64; +pub const S_IWUSR: mode_t = 128; +pub const S_IRUSR: mode_t = 256; +pub const S_IRWXG: mode_t = 56; +pub const S_IXGRP: mode_t = 8; +pub const S_IWGRP: mode_t = 16; +pub const S_IRGRP: mode_t = 32; +pub const S_IRWXO: mode_t = 7; +pub const S_IXOTH: mode_t = 1; +pub const S_IWOTH: mode_t = 2; +pub const S_IROTH: mode_t = 4; +pub const F_OK: ::c_int = 0; +pub const R_OK: ::c_int = 4; +pub const W_OK: ::c_int = 2; +pub const X_OK: ::c_int = 1; +pub const STDIN_FILENO: ::c_int = 0; +pub const STDOUT_FILENO: ::c_int = 1; +pub const STDERR_FILENO: ::c_int = 2; +pub const F_LOCK: ::c_int = 1; +pub const F_TEST: ::c_int = 3; +pub const F_TLOCK: ::c_int = 2; +pub const F_ULOCK: ::c_int = 0; +pub const F_DUPFD_CLOEXEC: ::c_int = 37; +pub const SIGHUP: ::c_int = 1; +pub const SIGINT: ::c_int = 2; +pub const SIGQUIT: ::c_int = 3; +pub const SIGILL: ::c_int = 4; +pub const SIGABRT: ::c_int = 6; +pub const SIGFPE: ::c_int = 8; +pub const SIGKILL: ::c_int = 9; +pub const SIGSEGV: ::c_int = 11; +pub const SIGPIPE: ::c_int = 13; +pub const SIGALRM: ::c_int = 14; +pub const SIGTERM: ::c_int = 15; + +pub const WNOHANG: ::c_int = 0x40; + +pub const PROT_NONE: ::c_int = 0; +pub const PROT_READ: ::c_int = 1; +pub const PROT_WRITE: ::c_int = 2; +pub const PROT_EXEC: ::c_int = 4; + +pub const MAP_SHARED: ::c_int = 0x0001; +pub const MAP_PRIVATE: ::c_int = 0x0002; +pub const MAP_FIXED: ::c_int = 0x0010; +pub const MAP_ANON: ::c_int = 0x0100; + +pub const MAP_FAILED: *mut ::c_void = !0 as *mut ::c_void; + +pub const MCL_CURRENT: ::c_int = 0x0001; +pub const MCL_FUTURE: ::c_int = 0x0002; + +pub const MS_SYNC: ::c_int = 0x0004; +pub const MS_ASYNC: ::c_int = 0x0001; +pub const MS_INVALIDATE: ::c_int = 0x0002; + +pub const EPERM: ::c_int = 1; +pub const ENOENT: ::c_int = 2; +pub const ESRCH: ::c_int = 3; +pub const EINTR: ::c_int = 4; +pub const EIO: ::c_int = 5; +pub const ENXIO: ::c_int = 6; +pub const E2BIG: ::c_int = 7; +pub const ENOEXEC: ::c_int = 8; +pub const EBADF: ::c_int = 9; +pub const ECHILD: ::c_int = 10; +pub const EDEADLK: ::c_int = 45; +pub const ENOMEM: ::c_int = 12; +pub const EACCES: ::c_int = 13; +pub const EFAULT: ::c_int = 14; +pub const ENOTBLK: ::c_int = 15; +pub const EBUSY: ::c_int = 16; +pub const EEXIST: ::c_int = 17; +pub const EXDEV: ::c_int = 18; +pub const ENODEV: ::c_int = 19; +pub const ENOTDIR: ::c_int = 20; +pub const EISDIR: ::c_int = 21; +pub const EINVAL: ::c_int = 22; +pub const ENFILE: ::c_int = 23; +pub const EMFILE: ::c_int = 24; +pub const ENOTTY: ::c_int = 25; +pub const ETXTBSY: ::c_int = 26; +pub const EFBIG: ::c_int = 27; +pub const ENOSPC: ::c_int = 28; +pub const ESPIPE: ::c_int = 29; +pub const EROFS: ::c_int = 30; +pub const EMLINK: ::c_int = 31; +pub const EPIPE: ::c_int = 32; +pub const EDOM: ::c_int = 33; +pub const ERANGE: ::c_int = 34; +pub const EAGAIN: ::c_int = 11; +pub const EWOULDBLOCK: ::c_int = 11; +pub const EINPROGRESS: ::c_int = 150; +pub const EALREADY: ::c_int = 149; +pub const ENOTSOCK: ::c_int = 95; +pub const EDESTADDRREQ: ::c_int = 96; +pub const EMSGSIZE: ::c_int = 97; +pub const EPROTOTYPE: ::c_int = 98; +pub const ENOPROTOOPT: ::c_int = 99; +pub const EPROTONOSUPPORT: ::c_int = 120; +pub const ESOCKTNOSUPPORT: ::c_int = 121; +pub const EOPNOTSUPP: ::c_int = 122; +pub const EPFNOSUPPORT: ::c_int = 123; +pub const EAFNOSUPPORT: ::c_int = 124; +pub const EADDRINUSE: ::c_int = 125; +pub const EADDRNOTAVAIL: ::c_int = 126; +pub const ENETDOWN: ::c_int = 127; +pub const ENETUNREACH: ::c_int = 128; +pub const ENETRESET: ::c_int = 129; +pub const ECONNABORTED: ::c_int = 130; +pub const ECONNRESET: ::c_int = 131; +pub const ENOBUFS: ::c_int = 132; +pub const EISCONN: ::c_int = 133; +pub const ENOTCONN: ::c_int = 134; +pub const ESHUTDOWN: ::c_int = 143; +pub const ETOOMANYREFS: ::c_int = 144; +pub const ETIMEDOUT: ::c_int = 145; +pub const ECONNREFUSED: ::c_int = 146; +pub const ELOOP: ::c_int = 90; +pub const ENAMETOOLONG: ::c_int = 78; +pub const EHOSTDOWN: ::c_int = 147; +pub const EHOSTUNREACH: ::c_int = 148; +pub const ENOTEMPTY: ::c_int = 93; +pub const EUSERS: ::c_int = 94; +pub const EDQUOT: ::c_int = 49; +pub const ESTALE: ::c_int = 151; +pub const EREMOTE: ::c_int = 66; +pub const ENOLCK: ::c_int = 46; +pub const ENOSYS: ::c_int = 89; +pub const EIDRM: ::c_int = 36; +pub const ENOMSG: ::c_int = 35; +pub const EOVERFLOW: ::c_int = 79; +pub const ECANCELED: ::c_int = 47; +pub const EILSEQ: ::c_int = 88; +pub const EBADMSG: ::c_int = 77; +pub const EMULTIHOP: ::c_int = 74; +pub const ENOLINK: ::c_int = 67; +pub const EPROTO: ::c_int = 71; + +pub const F_DUPFD: ::c_int = 0; +pub const F_GETFD: ::c_int = 1; +pub const F_SETFD: ::c_int = 2; +pub const F_GETFL: ::c_int = 3; +pub const F_SETFL: ::c_int = 4; + +pub const SIGTRAP: ::c_int = 5; + +pub const GLOB_APPEND : ::c_int = 32; +pub const GLOB_DOOFFS : ::c_int = 16; +pub const GLOB_ERR : ::c_int = 1; +pub const GLOB_MARK : ::c_int = 2; +pub const GLOB_NOCHECK : ::c_int = 8; +pub const GLOB_NOSORT : ::c_int = 4; +pub const GLOB_NOESCAPE: ::c_int = 64; + +pub const GLOB_NOSPACE : ::c_int = -2; +pub const GLOB_ABORTED : ::c_int = -1; +pub const GLOB_NOMATCH : ::c_int = -3; + +pub const POSIX_MADV_NORMAL: ::c_int = 0; +pub const POSIX_MADV_RANDOM: ::c_int = 1; +pub const POSIX_MADV_SEQUENTIAL: ::c_int = 2; +pub const POSIX_MADV_WILLNEED: ::c_int = 3; +pub const POSIX_MADV_DONTNEED: ::c_int = 4; + +pub const _SC_IOV_MAX: ::c_int = 77; +pub const _SC_GETGR_R_SIZE_MAX: ::c_int = 569; +pub const _SC_GETPW_R_SIZE_MAX: ::c_int = 570; +pub const _SC_LOGIN_NAME_MAX: ::c_int = 571; +pub const _SC_MQ_PRIO_MAX: ::c_int = 30; +pub const _SC_THREAD_ATTR_STACKADDR: ::c_int = 577; +pub const _SC_THREAD_ATTR_STACKSIZE: ::c_int = 578; +pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: ::c_int = 568; +pub const _SC_THREAD_KEYS_MAX: ::c_int = 572; +pub const _SC_THREAD_PRIO_INHERIT: ::c_int = 580; +pub const _SC_THREAD_PRIO_PROTECT: ::c_int = 581; +pub const _SC_THREAD_PRIORITY_SCHEDULING: ::c_int = 579; +pub const _SC_THREAD_PROCESS_SHARED: ::c_int = 582; +pub const _SC_THREAD_SAFE_FUNCTIONS: ::c_int = 583; +pub const _SC_THREAD_STACK_MIN: ::c_int = 573; +pub const _SC_THREAD_THREADS_MAX: ::c_int = 574; +pub const _SC_THREADS: ::c_int = 576; +pub const _SC_TTY_NAME_MAX: ::c_int = 575; +pub const _SC_ATEXIT_MAX: ::c_int = 76; +pub const _SC_XOPEN_CRYPT: ::c_int = 62; +pub const _SC_XOPEN_ENH_I18N: ::c_int = 63; +pub const _SC_XOPEN_LEGACY: ::c_int = 717; +pub const _SC_XOPEN_REALTIME: ::c_int = 718; +pub const _SC_XOPEN_REALTIME_THREADS: ::c_int = 719; +pub const _SC_XOPEN_SHM: ::c_int = 64; +pub const _SC_XOPEN_UNIX: ::c_int = 78; +pub const _SC_XOPEN_VERSION: ::c_int = 12; +pub const _SC_XOPEN_XCU_VERSION: ::c_int = 67; + +pub const PTHREAD_CREATE_JOINABLE: ::c_int = 0; +pub const PTHREAD_CREATE_DETACHED: ::c_int = 0x40; +pub const PTHREAD_PROCESS_SHARED: ::c_int = 1; +pub const PTHREAD_PROCESS_PRIVATE: u16 = 0; +pub const PTHREAD_STACK_MIN: ::size_t = 4096; + +pub const SIGSTKSZ: ::size_t = 8192; + +pub const CLOCK_REALTIME: ::c_int = 3; +pub const CLOCK_MONOTONIC: ::c_int = 4; + +pub const RLIMIT_CPU: ::c_int = 0; +pub const RLIMIT_FSIZE: ::c_int = 1; +pub const RLIMIT_DATA: ::c_int = 2; +pub const RLIMIT_STACK: ::c_int = 3; +pub const RLIMIT_CORE: ::c_int = 4; +pub const RLIMIT_NOFILE: ::c_int = 5; +pub const RLIMIT_VMEM: ::c_int = 6; +pub const RLIMIT_AS: ::c_int = RLIMIT_VMEM; + +pub const RLIM_NLIMITS: rlim_t = 7; +pub const RLIM_INFINITY: rlim_t = 0x7fffffff; + +pub const RUSAGE_SELF: ::c_int = 0; +pub const RUSAGE_CHILDREN: ::c_int = -1; + +pub const MADV_NORMAL: ::c_int = 0; +pub const MADV_RANDOM: ::c_int = 1; +pub const MADV_SEQUENTIAL: ::c_int = 2; +pub const MADV_WILLNEED: ::c_int = 3; +pub const MADV_DONTNEED: ::c_int = 4; +pub const MADV_FREE: ::c_int = 5; + +pub const AF_INET: ::c_int = 2; +pub const AF_INET6: ::c_int = 26; +pub const AF_UNIX: ::c_int = 1; +pub const SOCK_DGRAM: ::c_int = 1; +pub const SOCK_STREAM: ::c_int = 2; +pub const SOCK_RAW: ::c_int = 4; +pub const IPPROTO_TCP: ::c_int = 6; +pub const IPPROTO_IP: ::c_int = 0; +pub const IPPROTO_IPV6: ::c_int = 41; +pub const IP_MULTICAST_TTL: ::c_int = 17; +pub const IP_MULTICAST_LOOP: ::c_int = 18; +pub const IP_TTL: ::c_int = 4; +pub const IP_HDRINCL: ::c_int = 2; +pub const IP_ADD_MEMBERSHIP: ::c_int = 19; +pub const IP_DROP_MEMBERSHIP: ::c_int = 20; +pub const IPV6_JOIN_GROUP: ::c_int = 9; +pub const IPV6_LEAVE_GROUP: ::c_int = 10; + +pub const TCP_NODELAY: ::c_int = 1; +pub const TCP_KEEPIDLE: ::c_int = 34; +pub const SOL_SOCKET: ::c_int = 0xffff; +pub const SO_DEBUG: ::c_int = 0x01; +pub const SO_ACCEPTCONN: ::c_int = 0x0002; +pub const SO_REUSEADDR: ::c_int = 0x0004; +pub const SO_KEEPALIVE: ::c_int = 0x0008; +pub const SO_DONTROUTE: ::c_int = 0x0010; +pub const SO_BROADCAST: ::c_int = 0x0020; +pub const SO_USELOOPBACK: ::c_int = 0x0040; +pub const SO_LINGER: ::c_int = 0x0080; +pub const SO_OOBINLINE: ::c_int = 0x0100; +pub const SO_SNDBUF: ::c_int = 0x1001; +pub const SO_RCVBUF: ::c_int = 0x1002; +pub const SO_SNDLOWAT: ::c_int = 0x1003; +pub const SO_RCVLOWAT: ::c_int = 0x1004; +pub const SO_SNDTIMEO: ::c_int = 0x1005; +pub const SO_RCVTIMEO: ::c_int = 0x1006; +pub const SO_ERROR: ::c_int = 0x1007; +pub const SO_TYPE: ::c_int = 0x1008; + +pub const IFF_LOOPBACK: ::c_int = 0x8; + +pub const SHUT_RD: ::c_int = 0; +pub const SHUT_WR: ::c_int = 1; +pub const SHUT_RDWR: ::c_int = 2; + +pub const LOCK_SH: ::c_int = 1; +pub const LOCK_EX: ::c_int = 2; +pub const LOCK_NB: ::c_int = 4; +pub const LOCK_UN: ::c_int = 8; + +pub const O_SYNC: ::c_int = 16; +pub const O_NONBLOCK: ::c_int = 128; + +pub const IPPROTO_RAW: ::c_int = 255; + +pub const _SC_ARG_MAX: ::c_int = 1; +pub const _SC_CHILD_MAX: ::c_int = 2; +pub const _SC_CLK_TCK: ::c_int = 3; +pub const _SC_NGROUPS_MAX: ::c_int = 4; +pub const _SC_OPEN_MAX: ::c_int = 5; +pub const _SC_JOB_CONTROL: ::c_int = 6; +pub const _SC_SAVED_IDS: ::c_int = 7; +pub const _SC_VERSION: ::c_int = 8; +pub const _SC_PAGESIZE: ::c_int = 11; +pub const _SC_PAGE_SIZE: ::c_int = _SC_PAGESIZE; +pub const _SC_NPROCESSORS_ONLN: ::c_int = 15; +pub const _SC_STREAM_MAX: ::c_int = 16; +pub const _SC_TZNAME_MAX: ::c_int = 17; +pub const _SC_AIO_LISTIO_MAX: ::c_int = 18; +pub const _SC_AIO_MAX: ::c_int = 19; +pub const _SC_BC_BASE_MAX: ::c_int = 54; +pub const _SC_BC_DIM_MAX: ::c_int = 55; +pub const _SC_BC_SCALE_MAX: ::c_int = 56; +pub const _SC_BC_STRING_MAX: ::c_int = 57; +pub const _SC_COLL_WEIGHTS_MAX: ::c_int = 58; +pub const _SC_EXPR_NEST_MAX: ::c_int = 59; +pub const _SC_LINE_MAX: ::c_int = 60; +pub const _SC_RE_DUP_MAX: ::c_int = 61; +pub const _SC_2_VERSION: ::c_int = 53; +pub const _SC_2_C_BIND: ::c_int = 45; +pub const _SC_2_C_DEV: ::c_int = 46; +pub const _SC_2_CHAR_TERM: ::c_int = 66; +pub const _SC_2_FORT_DEV: ::c_int = 48; +pub const _SC_2_FORT_RUN: ::c_int = 49; +pub const _SC_2_LOCALEDEF: ::c_int = 50; +pub const _SC_2_SW_DEV: ::c_int = 51; +pub const _SC_2_UPE: ::c_int = 52; +pub const _SC_ASYNCHRONOUS_IO: ::c_int = 21; +pub const _SC_MAPPED_FILES: ::c_int = 24; +pub const _SC_MEMLOCK: ::c_int = 25; +pub const _SC_MEMLOCK_RANGE: ::c_int = 26; +pub const _SC_MEMORY_PROTECTION: ::c_int = 27; +pub const _SC_MESSAGE_PASSING: ::c_int = 28; +pub const _SC_PRIORITIZED_IO: ::c_int = 31; +pub const _SC_PRIORITY_SCHEDULING: ::c_int = 32; +pub const _SC_REALTIME_SIGNALS: ::c_int = 33; +pub const _SC_SEMAPHORES: ::c_int = 35; +pub const _SC_FSYNC: ::c_int = 23; +pub const _SC_SHARED_MEMORY_OBJECTS: ::c_int = 38; +pub const _SC_SYNCHRONIZED_IO: ::c_int = 42; +pub const _SC_TIMERS: ::c_int = 43; +pub const _SC_AIO_PRIO_DELTA_MAX: ::c_int = 20; +pub const _SC_DELAYTIMER_MAX: ::c_int = 22; +pub const _SC_MQ_OPEN_MAX: ::c_int = 29; +pub const _SC_RTSIG_MAX: ::c_int = 34; +pub const _SC_SEM_NSEMS_MAX: ::c_int = 36; +pub const _SC_SEM_VALUE_MAX: ::c_int = 37; +pub const _SC_SIGQUEUE_MAX: ::c_int = 39; +pub const _SC_TIMER_MAX: ::c_int = 44; + +pub const _MUTEX_MAGIC: u16 = 0x4d58; // MX +pub const _COND_MAGIC: u16 = 0x4356; // CV +pub const _RWL_MAGIC: u16 = 0x5257; // RW + +pub const NCCS: usize = 19; + +pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t { + __pthread_mutex_flag1: 0, + __pthread_mutex_flag2: 0, + __pthread_mutex_ceiling: 0, + __pthread_mutex_type: PTHREAD_PROCESS_PRIVATE, + __pthread_mutex_magic: _MUTEX_MAGIC, + __pthread_mutex_lock: 0, + __pthread_mutex_data: 0 +}; +pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = pthread_cond_t { + __pthread_cond_flag: [0; 4], + __pthread_cond_type: PTHREAD_PROCESS_PRIVATE, + __pthread_cond_magic: _COND_MAGIC, + __pthread_cond_data: 0 +}; +pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t { + __pthread_rwlock_readers: 0, + __pthread_rwlock_type: PTHREAD_PROCESS_PRIVATE, + __pthread_rwlock_magic: _RWL_MAGIC, + __pthread_rwlock_mutex: PTHREAD_MUTEX_INITIALIZER, + __pthread_rwlock_readercv: PTHREAD_COND_INITIALIZER, + __pthread_rwlock_writercv: PTHREAD_COND_INITIALIZER +}; +pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 4; + +f! { + pub fn FD_CLR(fd: ::c_int, set: *mut fd_set) -> () { + let fd = fd as usize; + (*set).fds_bits[fd / 32] &= !(1 << (fd % 32)); + return + } + + pub fn FD_ISSET(fd: ::c_int, set: *mut fd_set) -> bool { + let fd = fd as usize; + return ((*set).fds_bits[fd / 32] & (1 << (fd % 32))) != 0 + } + + pub fn FD_SET(fd: ::c_int, set: *mut fd_set) -> () { + let fd = fd as usize; + (*set).fds_bits[fd / 32] |= 1 << (fd % 32); + return + } + + pub fn FD_ZERO(set: *mut fd_set) -> () { + for slot in (*set).fds_bits.iter_mut() { + *slot = 0; + } + } + + pub fn WIFEXITED(status: ::c_int) -> bool { + (status & 0xFF) == 0 + } + + pub fn WEXITSTATUS(status: ::c_int) -> ::c_int { + (status >> 8) & 0xFF + } + + pub fn WTERMSIG(status: ::c_int) -> ::c_int { + status & 0x7F + } +} + +extern { + pub fn stack_getbounds(sp: *mut ::stack_t) -> ::c_int; + pub fn mincore(addr: *const ::c_void, len: ::size_t, + vec: *mut c_char) -> ::c_int; + pub fn setgroups(ngroups: ::c_int, + ptr: *const ::gid_t) -> ::c_int; + pub fn ioctl(fildes: ::c_int, request: ::c_int, ...) -> ::c_int; + pub fn mprotect(addr: *const ::c_void, len: ::size_t, prot: ::c_int) + -> ::c_int; + pub fn clock_gettime(clk_id: ::c_int, tp: *mut ::timespec) -> ::c_int; + pub fn getnameinfo(sa: *const ::sockaddr, + salen: ::socklen_t, + host: *mut ::c_char, + hostlen: ::socklen_t, + serv: *mut ::c_char, + sevlen: ::socklen_t, + flags: ::c_int) -> ::c_int; + pub fn getpwuid_r(uid: ::uid_t, + pwd: *mut passwd, + buf: *mut ::c_char, + buflen: ::size_t) -> *const passwd; + pub fn readdir(dirp: *mut ::DIR) -> *const ::dirent; + pub fn fdatasync(fd: ::c_int) -> ::c_int; +} + diff --git a/deps/libc-0.2.8/src/windows.rs b/deps/libc-0.2.8/src/windows.rs new file mode 100644 index 000000000..3f7f160ff --- /dev/null +++ b/deps/libc-0.2.8/src/windows.rs @@ -0,0 +1,180 @@ +//! Windows CRT definitions + +pub type c_char = i8; +pub type c_long = i32; +pub type c_ulong = u32; +pub type wchar_t = u16; + +pub type clock_t = i32; + +cfg_if! { + if #[cfg(all(target_arch = "x86", target_env = "gnu"))] { + pub type time_t = i32; + } else { + pub type time_t = i64; + } +} + +pub type off_t = i32; +pub type dev_t = u32; +pub type ino_t = u16; +pub enum timezone {} +pub type time64_t = i64; + +s! { + // note this is the struct called stat64 in Windows. Not stat, nor stati64. + pub struct stat { + pub st_dev: dev_t, + pub st_ino: ino_t, + pub st_mode: u16, + pub st_nlink: ::c_short, + pub st_uid: ::c_short, + pub st_gid: ::c_short, + pub st_rdev: dev_t, + pub st_size: i64, + pub st_atime: time64_t, + pub st_mtime: time64_t, + pub st_ctime: time64_t, + } + + // note that this is called utimbuf64 in Windows + pub struct utimbuf { + pub actime: time64_t, + pub modtime: time64_t, + } + + pub struct timeval { + pub tv_sec: c_long, + pub tv_usec: c_long, + } + + pub struct timespec { + pub tv_sec: time_t, + pub tv_nsec: c_long, + } +} + +pub const EXIT_FAILURE: ::c_int = 1; +pub const EXIT_SUCCESS: ::c_int = 0; +pub const RAND_MAX: ::c_int = 32767; +pub const EOF: ::c_int = -1; +pub const SEEK_SET: ::c_int = 0; +pub const SEEK_CUR: ::c_int = 1; +pub const SEEK_END: ::c_int = 2; +pub const _IOFBF: ::c_int = 0; +pub const _IONBF: ::c_int = 4; +pub const _IOLBF: ::c_int = 64; +pub const BUFSIZ: ::c_uint = 512; +pub const FOPEN_MAX: ::c_uint = 20; +pub const FILENAME_MAX: ::c_uint = 260; + +cfg_if! { + if #[cfg(all(target_env = "gnu"))] { + pub const L_tmpnam: ::c_uint = 14; + pub const TMP_MAX: ::c_uint = 0x7fff; + } else { + pub const L_tmpnam: ::c_uint = 260; + pub const TMP_MAX: ::c_uint = 0x7fff_ffff; + } +} + +pub const O_RDONLY: ::c_int = 0; +pub const O_WRONLY: ::c_int = 1; +pub const O_RDWR: ::c_int = 2; +pub const O_APPEND: ::c_int = 8; +pub const O_CREAT: ::c_int = 256; +pub const O_EXCL: ::c_int = 1024; +pub const O_TEXT: ::c_int = 16384; +pub const O_BINARY: ::c_int = 32768; +pub const O_NOINHERIT: ::c_int = 128; +pub const O_TRUNC: ::c_int = 512; +pub const S_IFCHR: ::c_int = 8192; +pub const S_IFDIR: ::c_int = 16384; +pub const S_IFREG: ::c_int = 32768; +pub const S_IFMT: ::c_int = 61440; +pub const S_IEXEC: ::c_int = 64; +pub const S_IWRITE: ::c_int = 128; +pub const S_IREAD: ::c_int = 256; + +#[cfg(target_env = "msvc")] // " if " -- appease style checker +#[link(name = "msvcrt")] +extern {} + +extern { + #[link_name = "_chmod"] + pub fn chmod(path: *const c_char, mode: ::c_int) -> ::c_int; + #[link_name = "_wchmod"] + pub fn wchmod(path: *const wchar_t, mode: ::c_int) -> ::c_int; + #[link_name = "_mkdir"] + pub fn mkdir(path: *const c_char) -> ::c_int; + #[link_name = "_wrmdir"] + pub fn wrmdir(path: *const wchar_t) -> ::c_int; + #[link_name = "_fstat64"] + pub fn fstat(fildes: ::c_int, buf: *mut stat) -> ::c_int; + #[link_name = "_stat64"] + pub fn stat(path: *const c_char, buf: *mut stat) -> ::c_int; + #[link_name = "_wstat64"] + pub fn wstat(path: *const wchar_t, buf: *mut stat) -> ::c_int; + #[link_name = "_wutime64"] + pub fn wutime(file: *const wchar_t, buf: *mut utimbuf) -> ::c_int; + #[link_name = "_popen"] + pub fn popen(command: *const c_char, mode: *const c_char) -> *mut ::FILE; + #[link_name = "_pclose"] + pub fn pclose(stream: *mut ::FILE) -> ::c_int; + #[link_name = "_fdopen"] + pub fn fdopen(fd: ::c_int, mode: *const c_char) -> *mut ::FILE; + #[link_name = "_fileno"] + pub fn fileno(stream: *mut ::FILE) -> ::c_int; + #[link_name = "_open"] + pub fn open(path: *const c_char, oflag: ::c_int, ...) -> ::c_int; + #[link_name = "_wopen"] + pub fn wopen(path: *const wchar_t, oflag: ::c_int, ...) -> ::c_int; + #[link_name = "_creat"] + pub fn creat(path: *const c_char, mode: ::c_int) -> ::c_int; + #[link_name = "_access"] + pub fn access(path: *const c_char, amode: ::c_int) -> ::c_int; + #[link_name = "_chdir"] + pub fn chdir(dir: *const c_char) -> ::c_int; + #[link_name = "_close"] + pub fn close(fd: ::c_int) -> ::c_int; + #[link_name = "_dup"] + pub fn dup(fd: ::c_int) -> ::c_int; + #[link_name = "_dup2"] + pub fn dup2(src: ::c_int, dst: ::c_int) -> ::c_int; + #[link_name = "_execv"] + pub fn execv(prog: *const c_char, argv: *const *const c_char) -> ::intptr_t; + #[link_name = "_execve"] + pub fn execve(prog: *const c_char, argv: *const *const c_char, + envp: *const *const c_char) -> ::c_int; + #[link_name = "_execvp"] + pub fn execvp(c: *const c_char, argv: *const *const c_char) -> ::c_int; + #[link_name = "_execvpe"] + pub fn execvpe(c: *const c_char, argv: *const *const c_char, + envp: *const *const c_char) -> ::c_int; + #[link_name = "_getcwd"] + pub fn getcwd(buf: *mut c_char, size: ::c_int) -> *mut c_char; + #[link_name = "_getpid"] + pub fn getpid() -> ::c_int; + #[link_name = "_isatty"] + pub fn isatty(fd: ::c_int) -> ::c_int; + #[link_name = "_lseek"] + pub fn lseek(fd: ::c_int, offset: c_long, origin: ::c_int) -> c_long; + #[link_name = "_pipe"] + pub fn pipe(fds: *mut ::c_int, + psize: ::c_uint, + textmode: ::c_int) -> ::c_int; + #[link_name = "_read"] + pub fn read(fd: ::c_int, buf: *mut ::c_void, count: ::c_uint) -> ::c_int; + #[link_name = "_rmdir"] + pub fn rmdir(path: *const c_char) -> ::c_int; + #[link_name = "_unlink"] + pub fn unlink(c: *const c_char) -> ::c_int; + #[link_name = "_write"] + pub fn write(fd: ::c_int, buf: *const ::c_void, count: ::c_uint) -> ::c_int; + #[link_name = "_commit"] + pub fn commit(fd: ::c_int) -> ::c_int; + #[link_name = "_get_osfhandle"] + pub fn get_osfhandle(fd: ::c_int) -> ::intptr_t; + #[link_name = "_open_osfhandle"] + pub fn open_osfhandle(osfhandle: ::intptr_t, flags: ::c_int) -> ::c_int; +} diff --git a/deps/libgit2-sys-0.4.0/Cargo.toml b/deps/libgit2-sys-0.4.0/Cargo.toml deleted file mode 100644 index 84cc8ad8c..000000000 --- a/deps/libgit2-sys-0.4.0/Cargo.toml +++ /dev/null @@ -1,57 +0,0 @@ -[package] - -name = "libgit2-sys" -version = "0.4.0" -authors = ["Alex Crichton "] -links = "git2" -build = "build.rs" -repository = "https://github.com/alexcrichton/git2-rs" -license = "MIT/Apache-2.0" -description = "Native bindings to the libgit2 library" - -[lib] -name = "libgit2_sys" -path = "lib.rs" - -[dependencies] -libssh2-sys = { version = ">= 0", optional = true } -libc = "0.2" -libz-sys = ">= 0" - -[build-dependencies] -pkg-config = "0.3" -cmake = "0.1.2" -gcc = "0.3" - -[target.i686-unknown-linux-gnu.dependencies] -openssl-sys = "0.7.0" -[target.i586-unknown-linux-gnu.dependencies] -openssl-sys = "0.7.0" -[target.x86_64-unknown-linux-gnu.dependencies] -openssl-sys = "0.7.0" -[target.x86_64-unknown-linux-musl.dependencies] -openssl-sys = "0.7.0" -[target.aarch64-unknown-linux-gnu.dependencies] -openssl-sys = "0.7.0" -[target.powerpc64-unknown-linux-gnu.dependencies] -openssl-sys = "0.7.0" -[target.powerpc64le-unknown-linux-gnu.dependencies] -openssl-sys = "0.7.0" -[target.arm-unknown-linux-gnueabihf.dependencies] -openssl-sys = "0.7.0" -[target.armv7-unknown-linux-gnueabihf.dependencies] -openssl-sys = "0.7.0" -[target.i686-unknown-freebsd.dependencies] -openssl-sys = "0.7.0" -[target.x86_64-unknown-freebsd.dependencies] -openssl-sys = "0.7.0" -[target.x86_64-unknown-bitrig.dependencies] -openssl-sys = "0.7.0" -[target.x86_64-unknown-openbsd.dependencies] -openssl-sys = "0.7.0" -[target.x86_64-unknown-dragonfly.dependencies] -openssl-sys = "0.7.0" - -[features] -ssh = ["libssh2-sys"] -https = [] diff --git a/deps/libgit2-sys-0.4.0/build.rs b/deps/libgit2-sys-0.4.0/build.rs deleted file mode 100644 index 552b7adda..000000000 --- a/deps/libgit2-sys-0.4.0/build.rs +++ /dev/null @@ -1,170 +0,0 @@ -extern crate cmake; -extern crate gcc; -extern crate pkg_config; - -use std::env; -use std::ffi::OsString; -use std::fs::{self, File}; -use std::io::prelude::*; -use std::path::{Path, PathBuf}; -use std::process::Command; - -macro_rules! t { - ($e:expr) => (match $e{ - Ok(e) => e, - Err(e) => panic!("{} failed with {}", stringify!($e), e), - }) -} - -fn main() { - let https = env::var("CARGO_FEATURE_HTTPS").is_ok(); - let ssh = env::var("CARGO_FEATURE_SSH").is_ok(); - if ssh { - register_dep("SSH2"); - } - if https { - register_dep("OPENSSL"); - } - let has_pkgconfig = Command::new("pkg-config").output().is_ok(); - - if env::var("LIBGIT2_SYS_USE_PKG_CONFIG").is_ok() { - if pkg_config::find_library("libgit2").is_ok() { - return - } - } - - let target = env::var("TARGET").unwrap(); - let host = env::var("HOST").unwrap(); - let windows = target.contains("windows"); - let msvc = target.contains("msvc"); - let mut cfg = cmake::Config::new("libgit2"); - - if msvc { - // libgit2 passes the /GL flag to enable whole program optimization, but - // this requires that the /LTCG flag is passed to the linker later on, - // and currently the compiler does not do that, so we disable whole - // program optimization entirely. - cfg.cflag("/GL-"); - - // Currently liblibc links to msvcrt which apparently is a dynamic CRT, - // so we need to turn this off to get it to link right. - cfg.define("STATIC_CRT", "OFF"); - } - - // libgit2 uses pkg-config to discover libssh2, but this doesn't work on - // windows as libssh2 doesn't come with a libssh2.pc file in that install - // (or when pkg-config isn't found). As a result we just manually turn on - // SSH support in libgit2 (a little jankily) here... - if ssh && (windows || !has_pkgconfig) { - if let Ok(libssh2_include) = env::var("DEP_SSH2_INCLUDE") { - if msvc { - cfg.cflag(format!("/I{}", libssh2_include)) - .cflag("/DGIT_SSH"); - } else { - cfg.cflag(format!("-I{}", libssh2_include)) - .cflag("-DGIT_SSH"); - } - } - } - - // When cross-compiling, we're pretty unlikely to find a `dlltool` binary - // lying around, so try to find another if it exists - if windows && !host.contains("windows") { - let c_compiler = gcc::Config::new().cargo_metadata(false) - .get_compiler(); - let exe = c_compiler.path(); - let path = env::var_os("PATH").unwrap_or(OsString::new()); - let exe = env::split_paths(&path) - .map(|p| p.join(&exe)) - .find(|p| p.exists()); - if let Some(exe) = exe { - if let Some(name) = exe.file_name().and_then(|e| e.to_str()) { - let name = name.replace("gcc", "dlltool"); - let dlltool = exe.with_file_name(name); - cfg.define("DLLTOOL", &dlltool); - } - } - } - - if ssh { - cfg.register_dep("SSH2"); - } else { - cfg.define("USE_SSH", "OFF"); - } - if https { - cfg.register_dep("OPENSSL"); - } else { - cfg.define("USE_OPENSSL", "OFF"); - } - - let _ = fs::remove_dir_all(env::var("OUT_DIR").unwrap()); - t!(fs::create_dir_all(env::var("OUT_DIR").unwrap())); - - let dst = cfg.define("BUILD_SHARED_LIBS", "OFF") - .define("BUILD_CLAR", "OFF") - .define("CURL", "OFF") - .register_dep("Z") - .build(); - - // Make sure libssh2 was detected on unix systems, because it definitely - // should have been! - if ssh && !msvc { - let flags = dst.join("build/CMakeFiles/git2.dir/flags.make"); - let mut contents = String::new(); - t!(t!(File::open(flags)).read_to_string(&mut contents)); - if !contents.contains("-DGIT_SSH") { - panic!("libgit2 failed to find libssh2, and SSH support is required"); - } - } - - if target.contains("windows") { - println!("cargo:rustc-link-lib=winhttp"); - println!("cargo:rustc-link-lib=rpcrt4"); - println!("cargo:rustc-link-lib=ole32"); - println!("cargo:rustc-link-lib=crypt32"); - println!("cargo:rustc-link-lib=static=git2"); - println!("cargo:rustc-link-search=native={}/lib", dst.display()); - return - } - - // libgit2 requires the http_parser library for the HTTP transport to be - // implemented, and it will attempt to use the system http_parser if it's - // available. Detect this situation and report using the system http parser - // the same way in this situation. - // - // Note that other dependencies of libgit2 like openssl, libz, and libssh2 - // are tracked via crates instead of this. Ideally this should be a crate as - // well. - let pkgconfig_file = dst.join("lib/pkgconfig/libgit2.pc"); - if let Ok(mut f) = File::open(&pkgconfig_file) { - let mut contents = String::new(); - t!(f.read_to_string(&mut contents)); - if contents.contains("-lhttp_parser") { - println!("cargo:rustc-link-lib=http_parser"); - } - } - - println!("cargo:rustc-link-lib=static=git2"); - println!("cargo:rustc-link-search=native={}", dst.join("lib").display()); - if target.contains("apple") { - println!("cargo:rustc-link-lib=iconv"); - println!("cargo:rustc-link-lib=framework=Security"); - println!("cargo:rustc-link-lib=framework=CoreFoundation"); - } -} - -fn register_dep(dep: &str) { - match env::var(&format!("DEP_{}_ROOT", dep)) { - Ok(s) => { - prepend("PKG_CONFIG_PATH", Path::new(&s).join("lib/pkgconfig")); - } - Err(..) => {} - } -} - -fn prepend(var: &str, val: PathBuf) { - let prefix = env::var(var).unwrap_or(String::new()); - let mut v = vec![val]; - v.extend(env::split_paths(&prefix)); - env::set_var(var, &env::join_paths(v).unwrap()); -} diff --git a/deps/libgit2-sys-0.4.0/lib.rs b/deps/libgit2-sys-0.4.0/lib.rs deleted file mode 100644 index 9e61be600..000000000 --- a/deps/libgit2-sys-0.4.0/lib.rs +++ /dev/null @@ -1,2433 +0,0 @@ -#![doc(html_root_url = "http://alexcrichton.com/git2-rs")] -#![allow(non_camel_case_types)] - -extern crate libc; -#[cfg(feature = "ssh")] -extern crate libssh2_sys as libssh2; -#[cfg(all(unix, not(target_os = "macos"), not(target_os = "ios"), feature = "https"))] -extern crate openssl_sys as openssl; -extern crate libz_sys as libz; - -use libc::{c_int, c_char, c_uint, size_t, c_uchar, c_void}; - -pub const GIT_OID_RAWSZ: usize = 20; -pub const GIT_OID_HEXSZ: usize = GIT_OID_RAWSZ * 2; -pub const GIT_CLONE_OPTIONS_VERSION: c_uint = 1; -pub const GIT_CHECKOUT_OPTIONS_VERSION: c_uint = 1; -pub const GIT_MERGE_OPTIONS_VERSION: c_uint = 1; -pub const GIT_REMOTE_CALLBACKS_VERSION: c_uint = 1; -pub const GIT_STATUS_OPTIONS_VERSION: c_uint = 1; -pub const GIT_BLAME_OPTIONS_VERSION: c_uint = 1; - -macro_rules! git_enum { - (pub enum $name:ident { $($variants:tt)* }) => { - #[cfg(target_env = "msvc")] - pub type $name = i32; - #[cfg(not(target_env = "msvc"))] - pub type $name = u32; - git_enum!(gen, $name, 0, $($variants)*); - }; - (pub enum $name:ident: $t:ty { $($variants:tt)* }) => { - pub type $name = $t; - git_enum!(gen, $name, 0, $($variants)*); - }; - (gen, $name:ident, $val:expr, $variant:ident, $($rest:tt)*) => { - pub const $variant: $name = $val; - git_enum!(gen, $name, $val+1, $($rest)*); - }; - (gen, $name:ident, $val:expr, $variant:ident = $e:expr, $($rest:tt)*) => { - pub const $variant: $name = $e; - git_enum!(gen, $name, $e+1, $($rest)*); - }; - (gen, $name:ident, $val:expr, ) => {} -} - -pub enum git_blob {} -pub enum git_branch_iterator {} -pub enum git_blame {} -pub enum git_commit {} -pub enum git_config {} -pub enum git_config_iterator {} -pub enum git_index {} -pub enum git_object {} -pub enum git_reference {} -pub enum git_reference_iterator {} -pub enum git_annotated_commit {} -pub enum git_refspec {} -pub enum git_remote {} -pub enum git_repository {} -pub enum git_revwalk {} -pub enum git_submodule {} -pub enum git_tag {} -pub enum git_tree {} -pub enum git_tree_entry {} -pub enum git_treebuilder {} -pub enum git_push {} -pub enum git_note {} -pub enum git_note_iterator {} -pub enum git_status_list {} -pub enum git_pathspec {} -pub enum git_pathspec_match_list {} -pub enum git_diff {} -pub enum git_diff_stats {} -pub enum git_reflog {} -pub enum git_reflog_entry {} -pub enum git_describe_result {} - -#[repr(C)] -pub struct git_revspec { - pub from: *mut git_object, - pub to: *mut git_object, - pub flags: c_uint, -} - -#[repr(C)] -pub struct git_error { - pub message: *mut c_char, - pub klass: c_int, -} - -#[repr(C)] -#[derive(Copy, Clone)] -pub struct git_oid { - pub id: [u8; GIT_OID_RAWSZ], -} - -#[repr(C)] -#[derive(Copy)] -pub struct git_strarray { - pub strings: *mut *mut c_char, - pub count: size_t, -} -impl Clone for git_strarray { - fn clone(&self) -> git_strarray { *self } -} - -#[repr(C)] -#[derive(Copy)] -pub struct git_oidarray { - pub ids: *mut git_oid, - pub count: size_t, -} -impl Clone for git_oidarray { - fn clone(&self) -> git_oidarray { *self } -} - -#[repr(C)] -pub struct git_signature { - pub name: *mut c_char, - pub email: *mut c_char, - pub when: git_time, -} - -#[repr(C)] -#[derive(Copy, Clone, Eq, PartialEq)] -pub struct git_time { - pub time: git_time_t, - pub offset: c_int, -} - -pub type git_off_t = i64; -pub type git_time_t = i64; - -git_enum! { - pub enum git_revparse_mode_t { - GIT_REVPARSE_SINGLE = 1 << 0, - GIT_REVPARSE_RANGE = 1 << 1, - GIT_REVPARSE_MERGE_BASE = 1 << 2, - } -} - -git_enum! { - pub enum git_error_code: c_int { - GIT_OK = 0, - - GIT_ERROR = -1, - GIT_ENOTFOUND = -3, - GIT_EEXISTS = -4, - GIT_EAMBIGUOUS = -5, - GIT_EBUFS = -6, - GIT_EUSER = -7, - GIT_EBAREREPO = -8, - GIT_EUNBORNBRANCH = -9, - GIT_EUNMERGED = -10, - GIT_ENONFASTFORWARD = -11, - GIT_EINVALIDSPEC = -12, - GIT_ECONFLICT = -13, - GIT_ELOCKED = -14, - GIT_EMODIFIED = -15, - GIT_EAUTH = -16, - GIT_ECERTIFICATE = -17, - GIT_EAPPLIED = -18, - GIT_EPEEL = -19, - GIT_EEOF = -20, - GIT_EINVALID = -21, - GIT_EUNCOMMITTED = -22, - GIT_EDIRECTORY = -23, - GIT_EMERGECONFLICT = -24, - GIT_PASSTHROUGH = -30, - GIT_ITEROVER = -31, - } -} - -git_enum! { - pub enum git_error_t { - GITERR_NONE = 0, - GITERR_NOMEMORY, - GITERR_OS, - GITERR_INVALID, - GITERR_REFERENCE, - GITERR_ZLIB, - GITERR_REPOSITORY, - GITERR_CONFIG, - GITERR_REGEX, - GITERR_ODB, - GITERR_INDEX, - GITERR_OBJECT, - GITERR_NET, - GITERR_TAG, - GITERR_TREE, - GITERR_INDEXER, - GITERR_SSL, - GITERR_SUBMODULE, - GITERR_THREAD, - GITERR_STASH, - GITERR_CHECKOUT, - GITERR_FETCHHEAD, - GITERR_MERGE, - GITERR_SSH, - GITERR_FILTER, - GITERR_REVERT, - GITERR_CALLBACK, - GITERR_CHERRYPICK, - GITERR_DESCRIBE, - GITERR_REBASE, - GITERR_FILESYSTEM, - } -} - -git_enum! { - pub enum git_repository_state_t { - GIT_REPOSITORY_STATE_NONE, - GIT_REPOSITORY_STATE_MERGE, - GIT_REPOSITORY_STATE_REVERT, - GIT_REPOSITORY_STATE_REVERT_SEQUENCE, - GIT_REPOSITORY_STATE_CHERRYPICK, - GIT_REPOSITORY_STATE_CHERRYPICK_SEQUENCE, - GIT_REPOSITORY_STATE_BISECT, - GIT_REPOSITORY_STATE_REBASE, - GIT_REPOSITORY_STATE_REBASE_INTERACTIVE, - GIT_REPOSITORY_STATE_REBASE_MERGE, - GIT_REPOSITORY_STATE_APPLY_MAILBOX, - GIT_REPOSITORY_STATE_APPLY_MAILBOX_OR_REBASE, - } -} - -git_enum! { - pub enum git_direction { - GIT_DIRECTION_FETCH, - GIT_DIRECTION_PUSH, - } -} - -#[repr(C)] -pub struct git_clone_options { - pub version: c_uint, - pub checkout_opts: git_checkout_options, - pub fetch_opts: git_fetch_options, - pub bare: c_int, - pub local: git_clone_local_t, - pub checkout_branch: *const c_char, - pub repository_cb: Option, - pub repository_cb_payload: *mut c_void, - pub remote_cb: Option, - pub remote_cb_payload: *mut c_void, -} - -git_enum! { - pub enum git_clone_local_t { - GIT_CLONE_LOCAL_AUTO, - GIT_CLONE_LOCAL, - GIT_CLONE_NO_LOCAL, - GIT_CLONE_LOCAL_NO_LINKS, - } -} - -#[repr(C)] -pub struct git_checkout_options { - pub version: c_uint, - pub checkout_strategy: c_uint, - pub disable_filters: c_int, - pub dir_mode: c_uint, - pub file_mode: c_uint, - pub file_open_flags: c_int, - pub notify_flags: c_uint, - pub notify_cb: Option, - pub notify_payload: *mut c_void, - pub progress_cb: Option, - pub progress_payload: *mut c_void, - pub paths: git_strarray, - pub baseline: *mut git_tree, - pub baseline_index: *mut git_index, - pub target_directory: *const c_char, - pub ancestor_label: *const c_char, - pub our_label: *const c_char, - pub their_label: *const c_char, - pub perfdata_cb: Option, - pub perfdata_payload: *mut c_void, -} - -pub type git_checkout_notify_cb = extern fn(git_checkout_notify_t, - *const c_char, - *const git_diff_file, - *const git_diff_file, - *const git_diff_file, - *mut c_void) -> c_int; -pub type git_checkout_progress_cb = extern fn(*const c_char, - size_t, - size_t, - *mut c_void); - -pub type git_checkout_perfdata_cb = extern fn(*const git_checkout_perfdata, - *mut c_void); - -#[repr(C)] -pub struct git_checkout_perfdata { - pub mkdir_calls: size_t, - pub stat_calls: size_t, - pub chmod_calls: size_t, -} - -#[repr(C)] -pub struct git_remote_callbacks { - pub version: c_uint, - pub sideband_progress: Option, - pub completion: Option c_int>, - pub credentials: Option, - pub certificate_check: Option, - pub transfer_progress: Option, - pub update_tips: Option c_int>, - pub pack_progress: Option, - pub push_transfer_progress: Option, - pub push_update_reference: Option c_int>, - pub push_negotiation: Option, - pub transport: Option, - pub payload: *mut c_void, -} - -#[repr(C)] -pub struct git_fetch_options { - pub version: c_int, - pub callbacks: git_remote_callbacks, - pub prune: git_fetch_prune_t, - pub update_fetchhead: c_int, - pub download_tags: git_remote_autotag_option_t, - pub custom_headers: git_strarray, -} - -git_enum! { - pub enum git_remote_autotag_option_t { - GIT_REMOTE_DOWNLOAD_TAGS_UNSPECIFIED, - GIT_REMOTE_DOWNLOAD_TAGS_AUTO, - GIT_REMOTE_DOWNLOAD_TAGS_NONE, - GIT_REMOTE_DOWNLOAD_TAGS_ALL, - } -} - -git_enum! { - pub enum git_fetch_prune_t { - GIT_FETCH_PRUNE_UNSPECIFIED, - GIT_FETCH_PRUNE, - GIT_FETCH_NO_PRUNE, - } -} - -git_enum! { - pub enum git_remote_completion_type { - GIT_REMOTE_COMPLETION_DOWNLOAD, - GIT_REMOTE_COMPLETION_INDEXING, - GIT_REMOTE_COMPLETION_ERROR, - } -} - -pub type git_transport_message_cb = extern fn(*const c_char, c_int, - *mut c_void) -> c_int; -pub type git_cred_acquire_cb = extern fn(*mut *mut git_cred, - *const c_char, *const c_char, - c_uint, *mut c_void) -> c_int; -pub type git_transfer_progress_cb = extern fn(*const git_transfer_progress, - *mut c_void) -> c_int; -pub type git_packbuilder_progress = extern fn(c_int, c_uint, c_uint, - *mut c_void) -> c_int; -pub type git_push_transfer_progress = extern fn(c_uint, c_uint, size_t, - *mut c_void) -> c_int; -pub type git_transport_certificate_check_cb = extern fn(*mut git_cert, - c_int, - *const c_char, - *mut c_void) -> c_int; -pub type git_push_negotiation = extern fn(*mut *const git_push_update, - size_t, - *mut c_void) -> c_int; - -#[repr(C)] -pub struct git_push_update { - pub src_refname: *mut c_char, - pub dst_refname: *mut c_char, - pub src: git_oid, - pub dst: git_oid, -} - -git_enum! { - pub enum git_cert_t { - GIT_CERT_NONE, - GIT_CERT_X509, - GIT_CERT_HOSTKEY_LIBSSH2, - } -} - -#[repr(C)] -pub struct git_cert { - pub cert_type: git_cert_t, -} - -#[repr(C)] -pub struct git_cert_hostkey { - pub parent: git_cert, - pub kind: git_cert_ssh_t, - pub hash_md5: [u8; 16], - pub hash_sha1: [u8; 20], -} - -#[repr(C)] -pub struct git_cert_x509 { - pub parent: git_cert, - pub data: *mut c_void, - pub len: size_t, -} - -git_enum! { - pub enum git_cert_ssh_t { - GIT_CERT_SSH_MD5 = 1 << 0, - GIT_CERT_SSH_SHA1 = 1 << 1, - } -} - -#[repr(C)] -#[derive(Copy, Clone)] -pub struct git_transfer_progress { - pub total_objects: c_uint, - pub indexed_objects: c_uint, - pub received_objects: c_uint, - pub local_objects: c_uint, - pub total_deltas: c_uint, - pub indexed_deltas: c_uint, - pub received_bytes: size_t, -} - -#[repr(C)] -pub struct git_diff_file { - pub id: git_oid, - pub path: *const c_char, - pub size: git_off_t, - pub flags: u32, - pub mode: u16, -} - -pub type git_repository_create_cb = extern fn(*mut *mut git_repository, - *const c_char, - c_int, *mut c_void) -> c_int; -pub type git_remote_create_cb = extern fn(*mut *mut git_remote, - *mut git_repository, - *const c_char, - *const c_char, - *mut c_void) -> c_int; - -git_enum! { - pub enum git_checkout_notify_t { - GIT_CHECKOUT_NOTIFY_NONE = 0, - GIT_CHECKOUT_NOTIFY_CONFLICT = (1 << 0), - GIT_CHECKOUT_NOTIFY_DIRTY = (1 << 1), - GIT_CHECKOUT_NOTIFY_UPDATED = (1 << 2), - GIT_CHECKOUT_NOTIFY_UNTRACKED = (1 << 3), - GIT_CHECKOUT_NOTIFY_IGNORED = (1 << 4), - - GIT_CHECKOUT_NOTIFY_ALL = 0x0FFFF, - } -} - -git_enum! { - pub enum git_status_t { - GIT_STATUS_CURRENT = 0, - - GIT_STATUS_INDEX_NEW = (1 << 0), - GIT_STATUS_INDEX_MODIFIED = (1 << 1), - GIT_STATUS_INDEX_DELETED = (1 << 2), - GIT_STATUS_INDEX_RENAMED = (1 << 3), - GIT_STATUS_INDEX_TYPECHANGE = (1 << 4), - - GIT_STATUS_WT_NEW = (1 << 7), - GIT_STATUS_WT_MODIFIED = (1 << 8), - GIT_STATUS_WT_DELETED = (1 << 9), - GIT_STATUS_WT_TYPECHANGE = (1 << 10), - GIT_STATUS_WT_RENAMED = (1 << 11), - GIT_STATUS_WT_UNREADABLE = (1 << 12), - - GIT_STATUS_IGNORED = (1 << 14), - GIT_STATUS_CONFLICTED = (1 << 15), - } -} - -git_enum! { - pub enum git_status_opt_t { - GIT_STATUS_OPT_INCLUDE_UNTRACKED = (1 << 0), - GIT_STATUS_OPT_INCLUDE_IGNORED = (1 << 1), - GIT_STATUS_OPT_INCLUDE_UNMODIFIED = (1 << 2), - GIT_STATUS_OPT_EXCLUDE_SUBMODULES = (1 << 3), - GIT_STATUS_OPT_RECURSE_UNTRACKED_DIRS = (1 << 4), - GIT_STATUS_OPT_DISABLE_PATHSPEC_MATCH = (1 << 5), - GIT_STATUS_OPT_RECURSE_IGNORED_DIRS = (1 << 6), - GIT_STATUS_OPT_RENAMES_HEAD_TO_INDEX = (1 << 7), - GIT_STATUS_OPT_RENAMES_INDEX_TO_WORKDIR = (1 << 8), - GIT_STATUS_OPT_SORT_CASE_SENSITIVELY = (1 << 9), - GIT_STATUS_OPT_SORT_CASE_INSENSITIVELY = (1 << 10), - - GIT_STATUS_OPT_RENAMES_FROM_REWRITES = (1 << 11), - GIT_STATUS_OPT_NO_REFRESH = (1 << 12), - GIT_STATUS_OPT_UPDATE_INDEX = (1 << 13), - GIT_STATUS_OPT_INCLUDE_UNREADABLE = (1 << 14), - GIT_STATUS_OPT_INCLUDE_UNREADABLE_AS_UNTRACKED = (1 << 15), - } -} - -git_enum! { - pub enum git_status_show_t { - GIT_STATUS_SHOW_INDEX_AND_WORKDIR = 0, - GIT_STATUS_SHOW_INDEX_ONLY = 1, - GIT_STATUS_SHOW_WORKDIR_ONLY = 2, - } -} - -git_enum! { - pub enum git_delta_t { - GIT_DELTA_UNMODIFIED, - GIT_DELTA_ADDED, - GIT_DELTA_DELETED, - GIT_DELTA_MODIFIED, - GIT_DELTA_RENAMED, - GIT_DELTA_COPIED, - GIT_DELTA_IGNORED, - GIT_DELTA_UNTRACKED, - GIT_DELTA_TYPECHANGE, - GIT_DELTA_UNREADABLE, - GIT_DELTA_CONFLICTED, - } -} - -#[repr(C)] -pub struct git_status_options { - pub version: c_uint, - pub show: git_status_show_t, - pub flags: c_uint, - pub pathspec: git_strarray, -} -pub use git_status_show_t::*; - -#[repr(C)] -pub struct git_diff_delta { - pub status: git_delta_t, - pub flags: u32, - pub similarity: u16, - pub nfiles: u16, - pub old_file: git_diff_file, - pub new_file: git_diff_file, -} - -#[repr(C)] -pub struct git_status_entry { - pub status: git_status_t, - pub head_to_index: *mut git_diff_delta, - pub index_to_workdir: *mut git_diff_delta -} - -git_enum! { - pub enum git_checkout_strategy_t { - GIT_CHECKOUT_NONE = 0, - GIT_CHECKOUT_SAFE = (1 << 0), - GIT_CHECKOUT_FORCE = (1 << 1), - GIT_CHECKOUT_ALLOW_CONFLICTS = (1 << 4), - GIT_CHECKOUT_REMOVE_UNTRACKED = (1 << 5), - GIT_CHECKOUT_REMOVE_IGNORED = (1 << 6), - GIT_CHECKOUT_UPDATE_ONLY = (1 << 7), - GIT_CHECKOUT_DONT_UPDATE_INDEX = (1 << 8), - GIT_CHECKOUT_NO_REFRESH = (1 << 9), - GIT_CHECKOUT_SKIP_UNMERGED = (1 << 10), - GIT_CHECKOUT_USE_OURS = (1 << 11), - GIT_CHECKOUT_USE_THEIRS = (1 << 12), - GIT_CHECKOUT_DISABLE_PATHSPEC_MATCH = (1 << 13), - GIT_CHECKOUT_SKIP_LOCKED_DIRECTORIES = (1 << 18), - GIT_CHECKOUT_DONT_OVERWRITE_IGNORED = (1 << 19), - GIT_CHECKOUT_CONFLICT_STYLE_MERGE = (1 << 20), - GIT_CHECKOUT_CONFLICT_STYLE_DIFF3 = (1 << 21), - - GIT_CHECKOUT_UPDATE_SUBMODULES = (1 << 16), - GIT_CHECKOUT_UPDATE_SUBMODULES_IF_CHANGED = (1 << 17), - } -} - -git_enum! { - pub enum git_reset_t { - GIT_RESET_SOFT = 1, - GIT_RESET_MIXED = 2, - GIT_RESET_HARD = 3, - } -} - -git_enum! { - pub enum git_otype: c_int { - GIT_OBJ_ANY = -2, - GIT_OBJ_BAD = -1, - GIT_OBJ__EXT1 = 0, - GIT_OBJ_COMMIT = 1, - GIT_OBJ_TREE = 2, - GIT_OBJ_BLOB = 3, - GIT_OBJ_TAG = 4, - GIT_OBJ__EXT2 = 5, - GIT_OBJ_OFS_DELTA = 6, - GIT_OBJ_REF_DELTA = 7, - } -} - -git_enum! { - pub enum git_ref_t { - GIT_REF_INVALID = 0, - GIT_REF_OID = 1, - GIT_REF_SYMBOLIC = 2, - GIT_REF_LISTALL = GIT_REF_OID | GIT_REF_SYMBOLIC, - } -} - -git_enum! { - pub enum git_filemode_t { - GIT_FILEMODE_UNREADABLE = 0o000000, - GIT_FILEMODE_TREE = 0o040000, - GIT_FILEMODE_BLOB = 0o100644, - GIT_FILEMODE_BLOB_EXECUTABLE = 0o100755, - GIT_FILEMODE_LINK = 0o120000, - GIT_FILEMODE_COMMIT = 0o160000, - } -} - -git_enum! { - pub enum git_treewalk_mode { - GIT_TREEWALK_PRE = 0, - GIT_TREEWALK_POST = 1, - } -} - -pub type git_treewalk_cb = extern fn(*const c_char, *const git_tree_entry, - *mut c_void) -> c_int; -pub type git_treebuilder_filter_cb = extern fn(*const git_tree_entry, - *mut c_void) -> c_int; - -#[repr(C)] -#[derive(Copy, Clone)] -pub struct git_buf { - pub ptr: *mut c_char, - pub asize: size_t, - pub size: size_t, -} - -git_enum! { - pub enum git_branch_t { - GIT_BRANCH_LOCAL = 1, - GIT_BRANCH_REMOTE = 2, - GIT_BRANCH_ALL = GIT_BRANCH_LOCAL | GIT_BRANCH_REMOTE, - } -} - -pub const GIT_BLAME_NORMAL: u32 = 0; -pub const GIT_BLAME_TRACK_COPIES_SAME_FILE: u32 = 1<<0; -pub const GIT_BLAME_TRACK_COPIES_SAME_COMMIT_MOVES: u32 = 1<<1; -pub const GIT_BLAME_TRACK_COPIES_SAME_COMMIT_COPIES: u32 = 1<<2; -pub const GIT_BLAME_TRACK_COPIES_ANY_COMMIT_COPIES: u32 = 1<<3; -pub const GIT_BLAME_FIRST_PARENT: u32 = 1<<4; - -#[repr(C)] -#[derive(Copy, Clone)] -pub struct git_blame_options { - pub version: c_uint, - - pub flags: u32, - pub min_match_characters: u16, - pub newest_commit: git_oid, - pub oldest_commit: git_oid, - pub min_line: usize, - pub max_line: usize, -} - -#[repr(C)] -#[derive(Copy, Clone)] -pub struct git_blame_hunk { - pub lines_in_hunk: usize, - pub final_commit_id: git_oid, - pub final_start_line_number: usize, - pub final_signature: *mut git_signature, - pub orig_commit_id: git_oid, - pub orig_path: *const c_char, - pub orig_start_line_number: usize, - pub orig_signature: *mut git_signature, - pub boundary: c_char, -} - -pub type git_index_matched_path_cb = extern fn(*const c_char, *const c_char, - *mut c_void) -> c_int; - -#[repr(C)] -#[derive(Copy, Clone)] -pub struct git_index_entry { - pub ctime: git_index_time, - pub mtime: git_index_time, - pub dev: u32, - pub ino: u32, - pub mode: u32, - pub uid: u32, - pub gid: u32, - pub file_size: u32, - pub id: git_oid, - pub flags: u16, - pub flags_extended: u16, - pub path: *const c_char, -} - -#[repr(C)] -#[derive(Copy, Clone, Eq, PartialEq)] -pub struct git_index_time { - pub seconds: i32, - pub nanoseconds: u32, -} - -#[repr(C)] -pub struct git_config_entry { - pub name: *const c_char, - pub value: *const c_char, - pub level: git_config_level_t, - pub free: extern fn(*mut git_config_entry), - pub payload: *mut c_void, -} - -git_enum! { - pub enum git_config_level_t: c_int { - GIT_CONFIG_LEVEL_PROGRAMDATA = 1, - GIT_CONFIG_LEVEL_SYSTEM = 2, - GIT_CONFIG_LEVEL_XDG = 3, - GIT_CONFIG_LEVEL_GLOBAL = 4, - GIT_CONFIG_LEVEL_LOCAL = 5, - GIT_CONFIG_LEVEL_APP = 6, - GIT_CONFIG_HIGHEST_LEVEL = -1, - } -} - -git_enum! { - pub enum git_submodule_update_t { - GIT_SUBMODULE_UPDATE_CHECKOUT = 1, - GIT_SUBMODULE_UPDATE_REBASE = 2, - GIT_SUBMODULE_UPDATE_MERGE = 3, - GIT_SUBMODULE_UPDATE_NONE = 4, - GIT_SUBMODULE_UPDATE_DEFAULT = 0, - } -} - -git_enum! { - pub enum git_submodule_ignore_t: c_int { - GIT_SUBMODULE_IGNORE_UNSPECIFIED = -1, - - GIT_SUBMODULE_IGNORE_NONE = 1, - GIT_SUBMODULE_IGNORE_UNTRACKED = 2, - GIT_SUBMODULE_IGNORE_DIRTY = 3, - GIT_SUBMODULE_IGNORE_ALL = 4, - } -} - -pub type git_submodule_cb = extern fn(*mut git_submodule, - *const c_char, - *mut c_void) -> c_int; - -#[repr(C)] -pub struct git_cred { - pub credtype: git_credtype_t, - pub free: extern fn(*mut git_cred), -} - -git_enum! { - pub enum git_credtype_t { - GIT_CREDTYPE_USERPASS_PLAINTEXT = 1 << 0, - GIT_CREDTYPE_SSH_KEY = 1 << 1, - GIT_CREDTYPE_SSH_CUSTOM = 1 << 2, - GIT_CREDTYPE_DEFAULT = 1 << 3, - GIT_CREDTYPE_SSH_INTERACTIVE = 1 << 4, - GIT_CREDTYPE_USERNAME = 1 << 5, - GIT_CREDTYPE_SSH_MEMORY = 1 << 6, - } -} - -pub type git_cred_ssh_interactive_callback = extern fn( - name: *const c_char, - name_len: c_int, - instruction: *const c_char, - instruction_len: c_int, - num_prompts: c_int, - prompts: *const LIBSSH2_USERAUTH_KBDINT_PROMPT, - responses: *mut LIBSSH2_USERAUTH_KBDINT_RESPONSE, - abstrakt: *mut *mut c_void -); - -pub type git_cred_sign_callback = extern fn( - session: *mut LIBSSH2_SESSION, - sig: *mut *mut c_uchar, - sig_len: *mut size_t, - data: *const c_uchar, - data_len: size_t, - abstrakt: *mut *mut c_void, -); - -pub enum LIBSSH2_SESSION {} -pub enum LIBSSH2_USERAUTH_KBDINT_PROMPT {} -pub enum LIBSSH2_USERAUTH_KBDINT_RESPONSE {} - -#[repr(C)] -pub struct git_push_options { - pub version: c_uint, - pub pb_parallelism: c_uint, - pub callbacks: git_remote_callbacks, - pub custom_headers: git_strarray, -} - -pub type git_tag_foreach_cb = extern fn(name: *const c_char, - oid: *mut git_oid, - payload: *mut c_void) -> c_int; - -git_enum! { - pub enum git_index_add_option_t { - GIT_INDEX_ADD_DEFAULT = 0, - GIT_INDEX_ADD_FORCE = 1 << 0, - GIT_INDEX_ADD_DISABLE_PATHSPEC_MATCH = 1 << 1, - GIT_INDEX_ADD_CHECK_PATHSPEC = 1 << 2, - } -} - -#[repr(C)] -pub struct git_repository_init_options { - pub version: c_uint, - pub flags: u32, - pub mode: u32, - pub workdir_path: *const c_char, - pub description: *const c_char, - pub template_path: *const c_char, - pub initial_head: *const c_char, - pub origin_url: *const c_char, -} - -pub const GIT_REPOSITORY_INIT_OPTIONS_VERSION: c_uint = 1; - -git_enum! { - pub enum git_repository_init_flag_t { - GIT_REPOSITORY_INIT_BARE = (1 << 0), - GIT_REPOSITORY_INIT_NO_REINIT = (1 << 1), - GIT_REPOSITORY_INIT_NO_DOTGIT_DIR = (1 << 2), - GIT_REPOSITORY_INIT_MKDIR = (1 << 3), - GIT_REPOSITORY_INIT_MKPATH = (1 << 4), - GIT_REPOSITORY_INIT_EXTERNAL_TEMPLATE = (1 << 5), - } -} - -git_enum! { - pub enum git_repository_init_mode_t { - GIT_REPOSITORY_INIT_SHARED_UMASK = 0, - GIT_REPOSITORY_INIT_SHARED_GROUP = 0o002775, - GIT_REPOSITORY_INIT_SHARED_ALL = 0o002777, - } -} - -git_enum! { - pub enum git_sort_t { - GIT_SORT_NONE = 0, - GIT_SORT_TOPOLOGICAL = (1 << 0), - GIT_SORT_TIME = (1 << 1), - GIT_SORT_REVERSE = (1 << 2), - } -} - -git_enum! { - pub enum git_submodule_status_t { - GIT_SUBMODULE_STATUS_IN_HEAD = 1 << 0, - GIT_SUBMODULE_STATUS_IN_INDEX = 1 << 1, - GIT_SUBMODULE_STATUS_IN_CONFIG = 1 << 2, - GIT_SUBMODULE_STATUS_IN_WD = 1 << 3, - GIT_SUBMODULE_STATUS_INDEX_ADDED = 1 << 4, - GIT_SUBMODULE_STATUS_INDEX_DELETED = 1 << 5, - GIT_SUBMODULE_STATUS_INDEX_MODIFIED = 1 << 6, - GIT_SUBMODULE_STATUS_WD_UNINITIALIZED = 1 << 7, - GIT_SUBMODULE_STATUS_WD_ADDED = 1 << 8, - GIT_SUBMODULE_STATUS_WD_DELETED = 1 << 9, - GIT_SUBMODULE_STATUS_WD_MODIFIED = 1 << 10, - GIT_SUBMODULE_STATUS_WD_INDEX_MODIFIED = 1 << 11, - GIT_SUBMODULE_STATUS_WD_WD_MODIFIED = 1 << 12, - GIT_SUBMODULE_STATUS_WD_UNTRACKED = 1 << 13, - } -} - -#[repr(C)] -pub struct git_remote_head { - pub local: c_int, - pub oid: git_oid, - pub loid: git_oid, - pub name: *mut c_char, - pub symref_target: *mut c_char, -} - -git_enum! { - pub enum git_pathspec_flag_t { - GIT_PATHSPEC_DEFAULT = 0, - GIT_PATHSPEC_IGNORE_CASE = 1 << 0, - GIT_PATHSPEC_USE_CASE = 1 << 1, - GIT_PATHSPEC_NO_GLOB = 1 << 2, - GIT_PATHSPEC_NO_MATCH_ERROR = 1 << 3, - GIT_PATHSPEC_FIND_FAILURES = 1 << 4, - GIT_PATHSPEC_FAILURES_ONLY = 1 << 5, - } -} - -pub type git_diff_file_cb = extern fn(*const git_diff_delta, f32, *mut c_void) - -> c_int; -pub type git_diff_hunk_cb = extern fn(*const git_diff_delta, - *const git_diff_hunk, - *mut c_void) -> c_int; -pub type git_diff_line_cb = extern fn(*const git_diff_delta, - *const git_diff_hunk, - *const git_diff_line, - *mut c_void) -> c_int; -pub type git_diff_binary_cb = extern fn(*const git_diff_delta, - *const git_diff_binary, - *mut c_void) -> c_int; - -#[repr(C)] -pub struct git_diff_hunk { - pub old_start: c_int, - pub old_lines: c_int, - pub new_start: c_int, - pub new_lines: c_int, - pub header_len: size_t, - pub header: [c_char; 128], -} - -git_enum! { - pub enum git_diff_line_t { - GIT_DIFF_LINE_CONTEXT = b' ' as git_diff_line_t, - GIT_DIFF_LINE_ADDITION = b'+' as git_diff_line_t, - GIT_DIFF_LINE_DELETION = b'-' as git_diff_line_t, - GIT_DIFF_LINE_CONTEXT_EOFNL = b'=' as git_diff_line_t, - GIT_DIFF_LINE_ADD_EOFNL = b'>' as git_diff_line_t, - GIT_DIFF_LINE_DEL_EOFNL = b'<' as git_diff_line_t, - GIT_DIFF_LINE_FILE_HDR = b'F' as git_diff_line_t, - GIT_DIFF_LINE_HUNK_HDR = b'H' as git_diff_line_t, - GIT_DIFF_LINE_BINARY = b'B' as git_diff_line_t, - } -} - -#[repr(C)] -pub struct git_diff_line { - pub origin: c_char, - pub old_lineno: c_int, - pub new_lineno: c_int, - pub num_lines: c_int, - pub content_len: size_t, - pub content_offset: git_off_t, - pub content: *const c_char, -} - -#[repr(C)] -pub struct git_diff_options { - pub version: c_uint, - pub flags: u32, - pub ignore_submodules: git_submodule_ignore_t, - pub pathspec: git_strarray, - pub notify_cb: git_diff_notify_cb, - pub progress_cb: git_diff_progress_cb, - pub payload: *mut c_void, - pub context_lines: u32, - pub interhunk_lines: u32, - pub id_abbrev: u16, - pub max_size: git_off_t, - pub old_prefix: *const c_char, - pub new_prefix: *const c_char, -} - -git_enum! { - pub enum git_diff_format_t { - GIT_DIFF_FORMAT_PATCH = 1, - GIT_DIFF_FORMAT_PATCH_HEADER = 2, - GIT_DIFF_FORMAT_RAW = 3, - GIT_DIFF_FORMAT_NAME_ONLY = 4, - GIT_DIFF_FORMAT_NAME_STATUS = 5, - } -} - -git_enum! { - pub enum git_diff_stats_format_t { - GIT_DIFF_STATS_NONE = 0, - GIT_DIFF_STATS_FULL = 1 << 0, - GIT_DIFF_STATS_SHORT = 1 << 1, - GIT_DIFF_STATS_NUMBER = 1 << 2, - GIT_DIFF_STATS_INCLUDE_SUMMARY = 1 << 3, - } -} - -pub type git_diff_notify_cb = extern fn(*const git_diff, - *const git_diff_delta, - *const c_char, - *mut c_void) -> c_int; - -pub type git_diff_progress_cb = extern fn (*const git_diff, - *const c_char, - *const c_char, - *mut c_void) -> c_int; - -pub const GIT_DIFF_NORMAL: u32 = 0; -pub const GIT_DIFF_REVERSE: u32 = 1 << 0; -pub const GIT_DIFF_INCLUDE_IGNORED: u32 = 1 << 1; -pub const GIT_DIFF_RECURSE_IGNORED_DIRS: u32 = 1 << 2; -pub const GIT_DIFF_INCLUDE_UNTRACKED: u32 = 1 << 3; -pub const GIT_DIFF_RECURSE_UNTRACKED_DIRS: u32 = 1 << 4; -pub const GIT_DIFF_INCLUDE_UNMODIFIED: u32 = 1 << 5; -pub const GIT_DIFF_INCLUDE_TYPECHANGE: u32 = 1 << 6; -pub const GIT_DIFF_INCLUDE_TYPECHANGE_TREES: u32 = 1 << 7; -pub const GIT_DIFF_IGNORE_FILEMODE: u32 = 1 << 8; -pub const GIT_DIFF_IGNORE_SUBMODULES: u32 = 1 << 9; -pub const GIT_DIFF_IGNORE_CASE: u32 = 1 << 10; -pub const GIT_DIFF_DISABLE_PATHSPEC_MATCH: u32 = 1 << 12; -pub const GIT_DIFF_SKIP_BINARY_CHECK: u32 = 1 << 13; -pub const GIT_DIFF_ENABLE_FAST_UNTRACKED_DIRS: u32 = 1 << 14; -pub const GIT_DIFF_UPDATE_INDEX: u32 = 1 << 15; -pub const GIT_DIFF_INCLUDE_UNREADABLE: u32 = 1 << 16; -pub const GIT_DIFF_INCLUDE_UNREADABLE_AS_UNTRACKED: u32 = 1 << 17; -pub const GIT_DIFF_FORCE_TEXT: u32 = 1 << 20; -pub const GIT_DIFF_FORCE_BINARY: u32 = 1 << 21; -pub const GIT_DIFF_IGNORE_WHITESPACE: u32 = 1 << 22; -pub const GIT_DIFF_IGNORE_WHITESPACE_CHANGE: u32 = 1 << 23; -pub const GIT_DIFF_IGNORE_WHITESPACE_EOL: u32 = 1 << 24; -pub const GIT_DIFF_SHOW_UNTRACKED_CONTENT: u32 = 1 << 25; -pub const GIT_DIFF_SHOW_UNMODIFIED: u32 = 1 << 26; -pub const GIT_DIFF_PATIENCE: u32 = 1 << 28; -pub const GIT_DIFF_MINIMAL: u32 = 1 << 29; -pub const GIT_DIFF_SHOW_BINARY: u32 = 1 << 30; - -#[repr(C)] -pub struct git_diff_find_options { - pub version: c_uint, - pub flags: u32, - pub rename_threshold: u16, - pub rename_from_rewrite_threshold: u16, - pub copy_threshold: u16, - pub break_rewrite_threshold: u16, - pub rename_limit: size_t, - pub metric: *mut git_diff_similarity_metric, -} - -#[repr(C)] -pub struct git_diff_similarity_metric { - pub file_signature: extern fn(*mut *mut c_void, - *const git_diff_file, - *const c_char, - *mut c_void) -> c_int, - pub buffer_signature: extern fn(*mut *mut c_void, - *const git_diff_file, - *const c_char, - size_t, - *mut c_void) -> c_int, - pub free_signature: extern fn(*mut c_void, *mut c_void), - pub similarity: extern fn(*mut c_int, *mut c_void, *mut c_void, - *mut c_void) -> c_int, - pub payload: *mut c_void, -} - -pub const GIT_DIFF_FIND_OPTIONS_VERSION: c_uint = 1; - -pub const GIT_DIFF_FIND_BY_CONFIG: u32 = 0; -pub const GIT_DIFF_FIND_RENAMES: u32 = 1 << 0; -pub const GIT_DIFF_FIND_RENAMES_FROM_REWRITES: u32 = 1 << 1; -pub const GIT_DIFF_FIND_COPIES: u32 = 1 << 2; -pub const GIT_DIFF_FIND_COPIES_FROM_UNMODIFIED: u32 = 1 << 3; -pub const GIT_DIFF_FIND_REWRITES: u32 = 1 << 4; -pub const GIT_DIFF_BREAK_REWRITES: u32 = 1 << 5; -pub const GIT_DIFF_FIND_AND_BREAK_REWRITES: u32 = - GIT_DIFF_FIND_REWRITES | GIT_DIFF_BREAK_REWRITES; -pub const GIT_DIFF_FIND_FOR_UNTRACKED: u32 = 1 << 6; -pub const GIT_DIFF_FIND_ALL: u32 = 0x0ff; -pub const GIT_DIFF_FIND_IGNORE_LEADING_WHITESPACE: u32 = 0; -pub const GIT_DIFF_FIND_IGNORE_WHITESPACE: u32 = 1 << 12; -pub const GIT_DIFF_FIND_DONT_IGNORE_WHITESPACE: u32 = 1 << 13; -pub const GIT_DIFF_FIND_EXACT_MATCH_ONLY: u32 = 1 << 14; -pub const GIT_DIFF_BREAK_REWRITES_FOR_RENAMES_ONLY : u32 = 1 << 15; -pub const GIT_DIFF_FIND_REMOVE_UNMODIFIED: u32 = 1 << 16; - -#[repr(C)] -pub struct git_diff_binary { - pub old_file: git_diff_binary_file, - pub new_file: git_diff_binary_file, -} - -#[repr(C)] -pub struct git_diff_binary_file { - pub kind: git_diff_binary_t, - pub data: *const c_char, - pub datalen: size_t, - pub inflatedlen: size_t, -} - -git_enum! { - pub enum git_diff_binary_t { - GIT_DIFF_BINARY_NONE, - GIT_DIFF_BINARY_LITERAL, - GIT_DIFF_BINARY_DELTA, - } -} - -#[repr(C)] -pub struct git_merge_options { - pub version: c_uint, - pub flags: git_merge_flag_t, - pub rename_threshold: c_uint, - pub target_limit: c_uint, - pub metric: *mut git_diff_similarity_metric, - pub recursion_limit: c_uint, - pub file_favor: git_merge_file_favor_t, - pub file_flags: git_merge_file_flag_t, -} - -git_enum! { - pub enum git_merge_flag_t { - GIT_MERGE_FIND_RENAMES = 1 << 0, - GIT_MERGE_FAIL_ON_CONFLICT = 1 << 1, - GIT_MERGE_SKIP_REUC = 1 << 2, - GIT_MERGE_NO_RECURSIVE = 1 << 3, - } -} - -git_enum! { - pub enum git_merge_file_favor_t { - GIT_MERGE_FILE_FAVOR_NORMAL = 0, - GIT_MERGE_FILE_FAVOR_OURS = 1, - GIT_MERGE_FILE_FAVOR_THEIRS = 2, - GIT_MERGE_FILE_FAVOR_UNION = 3, - } -} - -git_enum! { - pub enum git_merge_file_flag_t { - GIT_MERGE_FILE_DEFAULT = 0, - GIT_MERGE_FILE_STYLE_MERGE = (1 << 0), - GIT_MERGE_FILE_STYLE_DIFF3 = (1 << 1), - GIT_MERGE_FILE_SIMPLIFY_ALNUM = (1 << 2), - GIT_MERGE_FILE_IGNORE_WHITESPACE = (1 << 3), - GIT_MERGE_FILE_IGNORE_WHITESPACE_CHANGE = (1 << 4), - GIT_MERGE_FILE_IGNORE_WHITESPACE_EOL = (1 << 5), - GIT_MERGE_FILE_DIFF_PATIENCE = (1 << 6), - GIT_MERGE_FILE_DIFF_MINIMAL = (1 << 7), - } -} - -pub type git_transport_cb = extern fn(out: *mut *mut git_transport, - owner: *mut git_remote, - param: *mut c_void) -> c_int; - -#[repr(C)] -pub struct git_transport { - pub version: c_uint, - pub set_callbacks: extern fn(*mut git_transport, - git_transport_message_cb, - git_transport_message_cb, - git_transport_certificate_check_cb, - *mut c_void) -> c_int, - pub set_custom_headers: extern fn(*mut git_transport, - *const git_strarray) -> c_int, - pub connect: extern fn(*mut git_transport, - *const c_char, - git_cred_acquire_cb, - *mut c_void, - c_int, c_int) -> c_int, - pub ls: extern fn(*mut *mut *const git_remote_head, - *mut size_t, - *mut git_transport) -> c_int, - pub push: extern fn(*mut git_transport, - *mut git_push, - *const git_remote_callbacks) -> c_int, - pub negotiate_fetch: extern fn(*mut git_transport, - *mut git_repository, - *const *const git_remote_head, - size_t) -> c_int, - pub download_pack: extern fn(*mut git_transport, - *mut git_repository, - *mut git_transfer_progress, - git_transfer_progress_cb, - *mut c_void) -> c_int, - pub is_connected: extern fn(*mut git_transport) -> c_int, - pub read_flags: extern fn(*mut git_transport, *mut c_int) -> c_int, - pub cancel: extern fn(*mut git_transport), - pub close: extern fn(*mut git_transport) -> c_int, - pub free: extern fn(*mut git_transport), -} - -git_enum! { - pub enum git_smart_service_t { - GIT_SERVICE_UPLOADPACK_LS = 1, - GIT_SERVICE_UPLOADPACK = 2, - GIT_SERVICE_RECEIVEPACK_LS = 3, - GIT_SERVICE_RECEIVEPACK = 4, - } -} - -#[repr(C)] -pub struct git_smart_subtransport_stream { - pub subtransport: *mut git_smart_subtransport, - pub read: extern fn(*mut git_smart_subtransport_stream, - *mut c_char, - size_t, - *mut size_t) -> c_int, - pub write: extern fn(*mut git_smart_subtransport_stream, - *const c_char, - size_t) -> c_int, - pub free: extern fn(*mut git_smart_subtransport_stream), -} - -#[repr(C)] -pub struct git_smart_subtransport { - pub action: extern fn(*mut *mut git_smart_subtransport_stream, - *mut git_smart_subtransport, - *const c_char, - git_smart_service_t) -> c_int, - pub close: extern fn(*mut git_smart_subtransport) -> c_int, - pub free: extern fn(*mut git_smart_subtransport), -} - -pub type git_smart_subtransport_cb = extern fn(*mut *mut git_smart_subtransport, - *mut git_transport, - *mut c_void) -> c_int; - -#[repr(C)] -pub struct git_smart_subtransport_definition { - pub callback: git_smart_subtransport_cb, - pub rpc: c_uint, - pub param: *mut c_void, -} - -#[repr(C)] -pub struct git_describe_options { - pub version: c_uint, - pub max_candidates_tags: c_uint, - pub describe_strategy: c_uint, - pub pattern: *const c_char, - pub only_follow_first_parent: c_int, - pub show_commit_oid_as_fallback: c_int, -} - -git_enum! { - pub enum git_describe_strategy_t { - GIT_DESCRIBE_DEFAULT, - GIT_DESCRIBE_TAGS, - GIT_DESCRIBE_ALL, - } -} - -#[repr(C)] -pub struct git_describe_format_options { - pub version: c_uint, - pub abbreviated_size: c_uint, - pub always_use_long_format: c_int, - pub dirty_suffix: *const c_char, -} - -/// Initialize openssl for the libgit2 library -#[cfg(all(unix, not(target_os = "macos"), not(target_os = "ios"), feature = "https"))] -pub fn openssl_init() { - if !cfg!(target_os = "linux") && !cfg!(target_os = "freebsd") { return } - - // Currently, libgit2 leverages OpenSSL for SSL support when cloning - // repositories over HTTPS. This means that we're picking up an OpenSSL - // dependency on non-Windows platforms (where it has its own HTTPS - // subsystem). As a result, we need to link to OpenSSL. - // - // Now actually *linking* to OpenSSL isn't so hard. We just need to make - // sure to use pkg-config to discover any relevant system dependencies for - // differences between distributions like CentOS and Ubuntu. The actual - // trickiness comes about when we start *distributing* the resulting - // binaries. Currently Cargo is distributed in binary form as nightlies, - // which means we're distributing a binary with OpenSSL linked in. - // - // For historical reasons, the Linux nightly builder is running a CentOS - // distribution in order to have as much ABI compatibility with other - // distributions as possible. Sadly, however, this compatibility does not - // extend to OpenSSL. Currently OpenSSL has two major versions, 0.9 and 1.0, - // which are incompatible (many ABI differences). The CentOS builder we - // build on has version 1.0, as do most distributions today. Some still have - // 0.9, however. This means that if we are to distribute the binaries built - // by the CentOS machine, we would only be compatible with OpenSSL 1.0 and - // we would fail to run (a dynamic linker error at runtime) on systems with - // only 9.8 installed (hopefully). - // - // But wait, the plot thickens! Apparently CentOS has dubbed their OpenSSL - // library as `libssl.so.10`, notably the `10` is included at the end. On - // the other hand Ubuntu, for example, only distributes `libssl.so`. This - // means that the binaries created at CentOS are hard-wired to probe for a - // file called `libssl.so.10` at runtime (using the LD_LIBRARY_PATH), which - // will not be found on ubuntu. The conclusion of this is that binaries - // built on CentOS cannot be distributed to Ubuntu and run successfully. - // - // There are a number of sneaky things we could do, including, but not - // limited to: - // - // 1. Create a shim program which runs "just before" cargo runs. The - // responsibility of this shim program would be to locate `libssl.so`, - // whatever it's called, on the current system, make sure there's a - // symlink *somewhere* called `libssl.so.10`, and then set up - // LD_LIBRARY_PATH and run the actual cargo. - // - // This approach definitely seems unconventional, and is borderline - // overkill for this problem. It's also dubious if we can find a - // libssl.so reliably on the target system. - // - // 2. Somehow re-work the CentOS installation so that the linked-against - // library is called libssl.so instead of libssl.so.10 - // - // The problem with this approach is that systems with 0.9 installed will - // start to silently fail, due to also having libraries called libssl.so - // (probably symlinked under a more appropriate version). - // - // 3. Compile Cargo against both OpenSSL 1.0 *and* OpenSSL 0.9, and - // distribute both. Also make sure that the linked-against name of the - // library is `libssl.so`. At runtime we determine which version is - // installed, and we then the appropriate binary. - // - // This approach clearly has drawbacks in terms of infrastructure and - // feasibility. - // - // 4. Build a nightly of Cargo for each distribution we'd like to support. - // You would then pick the appropriate Cargo nightly to install locally. - // - // So, with all this in mind, the decision was made to *statically* link - // OpenSSL. This solves any problem of relying on a downstream OpenSSL - // version being available. This does, however, open a can of worms related - // to security issues. It's generally a good idea to dynamically link - // OpenSSL as you'll get security updates over time without having to do - // anything (the system administrator will update the local openssl - // package). By statically linking, we're forfeiting this feature. - // - // The conclusion was made it is likely appropriate for the Cargo nightlies - // to statically link OpenSSL, but highly encourage distributions and - // packagers of Cargo to dynamically link OpenSSL. Packagers are targeting - // one system and are distributing to only that system, so none of the - // problems mentioned above would arise. - // - // In order to support this, a new package was made: openssl-static-sys. - // This package currently performs a fairly simple task: - // - // 1. Run pkg-config to discover where openssl is installed. - // 2. If openssl is installed in a nonstandard location, *and* static copies - // of the libraries are available, copy them to $OUT_DIR. - // - // This library will bring in libssl.a and libcrypto.a into the local build, - // allowing them to be picked up by this crate. This allows us to configure - // our own buildbots to have pkg-config point to these local pre-built - // copies of a static OpenSSL (with very few dependencies) while allowing - // most other builds of Cargo to naturally dynamically link OpenSSL. - // - // So in summary, if you're with me so far, we've statically linked OpenSSL - // to the Cargo binary (or any binary, for that matter) and we're ready to - // distribute it to *all* linux distributions. Remember that our original - // intent for openssl was for HTTPS support, which implies that we need some - // for of CA certificate store to validate certificates. This is normally - // installed in a standard system location. - // - // Unfortunately, as one might imagine, OpenSSL is configured for where this - // standard location is at *build time*, but it often varies widely - // per-system. Consequently, it was discovered that OpenSSL will respect the - // SSL_CERT_FILE and SSL_CERT_DIR environment variables in order to assist - // in discovering the location of this file (hurray!). - // - // So, finally getting to the point, this function solely exists to support - // our static builds of OpenSSL by probing for the "standard system - // location" of certificates and setting relevant environment variable to - // point to them. - // - // Ah, and as a final note, this is only a problem on Linux, not on OS X. On - // OS X the OpenSSL binaries are stable enough that we can just rely on - // dynamic linkage (plus they have some weird modifications to OpenSSL which - // means we wouldn't want to link statically). - openssl::probe::init_ssl_cert_env_vars(); -} - -#[cfg(any(windows, target_os = "macos", target_os = "ios", not(feature = "https")))] -pub fn openssl_init() {} - -extern { - // threads - pub fn git_libgit2_init() -> c_int; - pub fn git_libgit2_shutdown() -> c_int; - - // repository - pub fn git_repository_free(repo: *mut git_repository); - pub fn git_repository_open(repo: *mut *mut git_repository, - path: *const c_char) -> c_int; - pub fn git_repository_init(repo: *mut *mut git_repository, - path: *const c_char, - is_bare: c_uint) -> c_int; - pub fn git_repository_init_ext(out: *mut *mut git_repository, - repo_path: *const c_char, - opts: *mut git_repository_init_options) - -> c_int; - pub fn git_repository_init_init_options(opts: *mut git_repository_init_options, - version: c_uint) -> c_int; - pub fn git_repository_get_namespace(repo: *mut git_repository) - -> *const c_char; - pub fn git_repository_head(out: *mut *mut git_reference, - repo: *mut git_repository) -> c_int; - pub fn git_repository_set_head(repo: *mut git_repository, - refname: *const c_char) -> c_int; - pub fn git_repository_set_head_detached(repo: *mut git_repository, - commitish: *const git_oid) -> c_int; - pub fn git_repository_is_bare(repo: *mut git_repository) -> c_int; - pub fn git_repository_is_empty(repo: *mut git_repository) -> c_int; - pub fn git_repository_is_shallow(repo: *mut git_repository) -> c_int; - pub fn git_repository_path(repo: *mut git_repository) -> *const c_char; - pub fn git_repository_state(repo: *mut git_repository) -> c_int; - pub fn git_repository_workdir(repo: *mut git_repository) -> *const c_char; - pub fn git_repository_index(out: *mut *mut git_index, - repo: *mut git_repository) -> c_int; - pub fn git_repository_config(out: *mut *mut git_config, - repo: *mut git_repository) -> c_int; - pub fn git_repository_config_snapshot(out: *mut *mut git_config, - repo: *mut git_repository) -> c_int; - pub fn git_repository_discover(out: *mut git_buf, - start_path: *const c_char, - across_fs: c_int, - ceiling_dirs: *const c_char) -> c_int; - - // revparse - pub fn git_revparse(revspec: *mut git_revspec, - repo: *mut git_repository, - spec: *const c_char) -> c_int; - pub fn git_revparse_single(out: *mut *mut git_object, - repo: *mut git_repository, - spec: *const c_char) -> c_int; - pub fn git_revparse_ext(object_out: *mut *mut git_object, - reference_out: *mut *mut git_reference, - repo: *mut git_repository, - spec: *const c_char) -> c_int; - - // object - pub fn git_object_dup(dest: *mut *mut git_object, - source: *mut git_object) -> c_int; - pub fn git_object_id(obj: *const git_object) -> *const git_oid; - pub fn git_object_free(object: *mut git_object); - pub fn git_object_lookup(dest: *mut *mut git_object, - repo: *mut git_repository, - id: *const git_oid, - kind: git_otype) -> c_int; - pub fn git_object_type(obj: *const git_object) -> git_otype; - pub fn git_object_peel(peeled: *mut *mut git_object, - object: *const git_object, - target_type: git_otype) -> c_int; - pub fn git_object_short_id(out: *mut git_buf, - obj: *const git_object) -> c_int; - pub fn git_object_type2string(kind: git_otype) -> *const c_char; - pub fn git_object_string2type(s: *const c_char) -> git_otype; - pub fn git_object_typeisloose(kind: git_otype) -> c_int; - - // oid - pub fn git_oid_fromraw(out: *mut git_oid, raw: *const c_uchar); - pub fn git_oid_fromstrn(out: *mut git_oid, str: *const c_char, - len: size_t) -> c_int; - pub fn git_oid_tostr(out: *mut c_char, n: size_t, - id: *const git_oid) -> *mut c_char; - pub fn git_oid_cmp(a: *const git_oid, b: *const git_oid) -> c_int; - pub fn git_oid_equal(a: *const git_oid, b: *const git_oid) -> c_int; - pub fn git_oid_streq(id: *const git_oid, str: *const c_char) -> c_int; - pub fn git_oid_iszero(id: *const git_oid) -> c_int; - - // giterr - pub fn giterr_last() -> *const git_error; - pub fn giterr_clear(); - pub fn giterr_set_str(error_class: c_int, string: *const c_char); - - // remote - pub fn git_remote_create(out: *mut *mut git_remote, - repo: *mut git_repository, - name: *const c_char, - url: *const c_char) -> c_int; - pub fn git_remote_lookup(out: *mut *mut git_remote, - repo: *mut git_repository, - name: *const c_char) -> c_int; - pub fn git_remote_create_anonymous(out: *mut *mut git_remote, - repo: *mut git_repository, - url: *const c_char) -> c_int; - pub fn git_remote_delete(repo: *mut git_repository, - name: *const c_char) -> c_int; - pub fn git_remote_free(remote: *mut git_remote); - pub fn git_remote_name(remote: *const git_remote) -> *const c_char; - pub fn git_remote_pushurl(remote: *const git_remote) -> *const c_char; - pub fn git_remote_refspec_count(remote: *const git_remote) -> size_t; - pub fn git_remote_url(remote: *const git_remote) -> *const c_char; - pub fn git_remote_connect(remote: *mut git_remote, - dir: git_direction, - callbacks: *const git_remote_callbacks, - custom_headers: *const git_strarray) -> c_int; - pub fn git_remote_connected(remote: *const git_remote) -> c_int; - pub fn git_remote_disconnect(remote: *mut git_remote); - pub fn git_remote_add_fetch(repo: *mut git_repository, - remote: *const c_char, - refspec: *const c_char) -> c_int; - pub fn git_remote_add_push(repo: *mut git_repository, - remote: *const c_char, - refspec: *const c_char) -> c_int; - pub fn git_remote_download(remote: *mut git_remote, - refspecs: *const git_strarray, - opts: *const git_fetch_options) -> c_int; - pub fn git_remote_stop(remote: *mut git_remote); - pub fn git_remote_dup(dest: *mut *mut git_remote, - source: *mut git_remote) -> c_int; - pub fn git_remote_get_fetch_refspecs(array: *mut git_strarray, - remote: *const git_remote) -> c_int; - pub fn git_remote_get_refspec(remote: *const git_remote, - n: size_t) -> *const git_refspec; - pub fn git_remote_is_valid_name(remote_name: *const c_char) -> c_int; - pub fn git_remote_list(out: *mut git_strarray, - repo: *mut git_repository) -> c_int; - pub fn git_remote_rename(problems: *mut git_strarray, - repo: *mut git_repository, - name: *const c_char, - new_name: *const c_char) -> c_int; - pub fn git_remote_fetch(remote: *mut git_remote, - refspecs: *const git_strarray, - opts: *const git_fetch_options, - reflog_message: *const c_char) -> c_int; - pub fn git_remote_push(remote: *mut git_remote, - refspecs: *const git_strarray, - opts: *const git_push_options) -> c_int; - pub fn git_remote_update_tips(remote: *mut git_remote, - callbacks: *const git_remote_callbacks, - update_fetchead: c_int, - download_tags: git_remote_autotag_option_t, - reflog_message: *const c_char) -> c_int; - pub fn git_remote_set_url(repo: *mut git_repository, - remote: *const c_char, - url: *const c_char) -> c_int; - pub fn git_remote_set_pushurl(repo: *mut git_repository, - remote: *const c_char, - pushurl: *const c_char) -> c_int; - pub fn git_remote_init_callbacks(opts: *mut git_remote_callbacks, - version: c_uint) -> c_int; - pub fn git_fetch_init_options(opts: *mut git_fetch_options, - version: c_uint) -> c_int; - pub fn git_remote_stats(remote: *mut git_remote) - -> *const git_transfer_progress; - pub fn git_remote_ls(out: *mut *mut *const git_remote_head, - size: *mut size_t, - remote: *mut git_remote) -> c_int; - pub fn git_remote_set_autotag(repo: *mut git_repository, - remote: *const c_char, - value: git_remote_autotag_option_t) -> c_int; - pub fn git_remote_prune(remote: *mut git_remote, - callbacks: *const git_remote_callbacks) -> c_int; - - // refspec - pub fn git_refspec_direction(spec: *const git_refspec) -> git_direction; - pub fn git_refspec_dst(spec: *const git_refspec) -> *const c_char; - pub fn git_refspec_dst_matches(spec: *const git_refspec, - refname: *const c_char) -> c_int; - pub fn git_refspec_src(spec: *const git_refspec) -> *const c_char; - pub fn git_refspec_src_matches(spec: *const git_refspec, - refname: *const c_char) -> c_int; - pub fn git_refspec_force(spec: *const git_refspec) -> c_int; - pub fn git_refspec_string(spec: *const git_refspec) -> *const c_char; - - // strarray - pub fn git_strarray_free(array: *mut git_strarray); - - // oidarray - pub fn git_oidarray_free(array: *mut git_oidarray); - - // signature - pub fn git_signature_default(out: *mut *mut git_signature, - repo: *mut git_repository) -> c_int; - pub fn git_signature_free(sig: *mut git_signature); - pub fn git_signature_new(out: *mut *mut git_signature, - name: *const c_char, - email: *const c_char, - time: git_time_t, - offset: c_int) -> c_int; - pub fn git_signature_now(out: *mut *mut git_signature, - name: *const c_char, - email: *const c_char) -> c_int; - pub fn git_signature_dup(dest: *mut *mut git_signature, - sig: *const git_signature) -> c_int; - - // status - pub fn git_status_list_new(out: *mut *mut git_status_list, - repo: *mut git_repository, - options: *const git_status_options) -> c_int; - pub fn git_status_list_entrycount(list: *mut git_status_list) -> size_t; - pub fn git_status_byindex(statuslist: *mut git_status_list, - idx: size_t) -> *const git_status_entry; - pub fn git_status_list_free(list: *mut git_status_list); - pub fn git_status_init_options(opts: *mut git_status_options, - version: c_uint) -> c_int; - pub fn git_status_file(status_flags: *mut c_uint, - repo: *mut git_repository, - path: *const c_char) -> c_int; - pub fn git_status_should_ignore(ignored: *mut c_int, - repo: *mut git_repository, - path: *const c_char) -> c_int; - - // clone - pub fn git_clone(out: *mut *mut git_repository, - url: *const c_char, - local_path: *const c_char, - options: *const git_clone_options) -> c_int; - pub fn git_clone_init_options(opts: *mut git_clone_options, - version: c_uint) -> c_int; - - // reset - pub fn git_reset(repo: *mut git_repository, - target: *mut git_object, - reset_type: git_reset_t, - checkout_opts: *const git_checkout_options) -> c_int; - pub fn git_reset_default(repo: *mut git_repository, - target: *mut git_object, - pathspecs: *mut git_strarray) -> c_int; - - // reference - pub fn git_reference_cmp(ref1: *const git_reference, - ref2: *const git_reference) -> c_int; - pub fn git_reference_delete(r: *mut git_reference) -> c_int; - pub fn git_reference_free(r: *mut git_reference); - pub fn git_reference_is_branch(r: *const git_reference) -> c_int; - pub fn git_reference_is_note(r: *const git_reference) -> c_int; - pub fn git_reference_is_remote(r: *const git_reference) -> c_int; - pub fn git_reference_is_tag(r: *const git_reference) -> c_int; - pub fn git_reference_is_valid_name(name: *const c_char) -> c_int; - pub fn git_reference_lookup(out: *mut *mut git_reference, - repo: *mut git_repository, - name: *const c_char) -> c_int; - pub fn git_reference_name(r: *const git_reference) -> *const c_char; - pub fn git_reference_name_to_id(out: *mut git_oid, - repo: *mut git_repository, - name: *const c_char) -> c_int; - pub fn git_reference_peel(out: *mut *mut git_object, - r: *mut git_reference, - otype: git_otype) -> c_int; - pub fn git_reference_rename(new_ref: *mut *mut git_reference, - r: *mut git_reference, - new_name: *const c_char, - force: c_int, - log_message: *const c_char) -> c_int; - pub fn git_reference_resolve(out: *mut *mut git_reference, - r: *const git_reference) -> c_int; - pub fn git_reference_shorthand(r: *const git_reference) -> *const c_char; - pub fn git_reference_symbolic_target(r: *const git_reference) -> *const c_char; - pub fn git_reference_target(r: *const git_reference) -> *const git_oid; - pub fn git_reference_target_peel(r: *const git_reference) -> *const git_oid; - pub fn git_reference_set_target(out: *mut *mut git_reference, - r: *mut git_reference, - id: *const git_oid, - log_message: *const c_char) -> c_int; - pub fn git_reference_type(r: *const git_reference) -> git_ref_t; - pub fn git_reference_iterator_new(out: *mut *mut git_reference_iterator, - repo: *mut git_repository) -> c_int; - pub fn git_reference_iterator_glob_new(out: *mut *mut git_reference_iterator, - repo: *mut git_repository, - glob: *const c_char) -> c_int; - pub fn git_reference_iterator_free(iter: *mut git_reference_iterator); - pub fn git_reference_next(out: *mut *mut git_reference, - iter: *mut git_reference_iterator) -> c_int; - pub fn git_reference_next_name(out: *mut *const c_char, - iter: *mut git_reference_iterator) -> c_int; - pub fn git_reference_create(out: *mut *mut git_reference, - repo: *mut git_repository, - name: *const c_char, - id: *const git_oid, - force: c_int, - log_message: *const c_char) -> c_int; - pub fn git_reference_symbolic_create(out: *mut *mut git_reference, - repo: *mut git_repository, - name: *const c_char, - target: *const c_char, - force: c_int, - log_message: *const c_char) -> c_int; - - // submodules - pub fn git_submodule_add_finalize(submodule: *mut git_submodule) -> c_int; - pub fn git_submodule_add_setup(submodule: *mut *mut git_submodule, - repo: *mut git_repository, - url: *const c_char, - path: *const c_char, - use_gitlink: c_int) -> c_int; - pub fn git_submodule_add_to_index(submodule: *mut git_submodule, - write_index: c_int) -> c_int; - pub fn git_submodule_branch(submodule: *mut git_submodule) -> *const c_char; - pub fn git_submodule_foreach(repo: *mut git_repository, - callback: git_submodule_cb, - payload: *mut c_void) -> c_int; - pub fn git_submodule_free(submodule: *mut git_submodule); - pub fn git_submodule_head_id(submodule: *mut git_submodule) -> *const git_oid; - pub fn git_submodule_index_id(submodule: *mut git_submodule) -> *const git_oid; - pub fn git_submodule_init(submodule: *mut git_submodule, - overwrite: c_int) -> c_int; - pub fn git_submodule_location(status: *mut c_uint, - submodule: *mut git_submodule) -> c_int; - pub fn git_submodule_lookup(out: *mut *mut git_submodule, - repo: *mut git_repository, - name: *const c_char) -> c_int; - pub fn git_submodule_name(submodule: *mut git_submodule) -> *const c_char; - pub fn git_submodule_open(repo: *mut *mut git_repository, - submodule: *mut git_submodule) -> c_int; - pub fn git_submodule_path(submodule: *mut git_submodule) -> *const c_char; - pub fn git_submodule_reload(submodule: *mut git_submodule, - force: c_int) -> c_int; - pub fn git_submodule_set_ignore(repo: *mut git_repository, - name: *const c_char, - ignore: git_submodule_ignore_t) - -> c_int; - pub fn git_submodule_set_update(repo: *mut git_repository, - name: *const c_char, - update: git_submodule_update_t) - -> c_int; - pub fn git_submodule_set_url(repo: *mut git_repository, - name: *const c_char, - url: *const c_char) -> c_int; - pub fn git_submodule_sync(submodule: *mut git_submodule) -> c_int; - pub fn git_submodule_update_strategy(submodule: *mut git_submodule) - -> git_submodule_update_t; - // pub fn git_submodule_update(submodule: *mut git_submodule, - // init: c_int, - // options: *mut git_submodule_update_options) - // -> c_int; - pub fn git_submodule_url(submodule: *mut git_submodule) -> *const c_char; - pub fn git_submodule_wd_id(submodule: *mut git_submodule) -> *const git_oid; - pub fn git_submodule_status(status: *mut c_uint, - repo: *mut git_repository, - name: *const c_char, - ignore: git_submodule_ignore_t) -> c_int; - pub fn git_submodule_set_branch(repo: *mut git_repository, - name: *const c_char, - branch: *const c_char) -> c_int; - - // blob - pub fn git_blob_free(blob: *mut git_blob); - pub fn git_blob_id(blob: *const git_blob) -> *const git_oid; - pub fn git_blob_is_binary(blob: *const git_blob) -> c_int; - pub fn git_blob_lookup(blob: *mut *mut git_blob, repo: *mut git_repository, - id: *const git_oid) -> c_int; - pub fn git_blob_lookup_prefix(blob: *mut *mut git_blob, - repo: *mut git_repository, - id: *const git_oid, - len: size_t) -> c_int; - pub fn git_blob_rawcontent(blob: *const git_blob) -> *const c_void; - pub fn git_blob_rawsize(blob: *const git_blob) -> git_off_t; - pub fn git_blob_create_frombuffer(id: *mut git_oid, - repo: *mut git_repository, - buffer: *const c_void, - len: size_t) -> c_int; - pub fn git_blob_create_fromdisk(id: *mut git_oid, - repo: *mut git_repository, - path: *const c_char) -> c_int; - pub fn git_blob_create_fromworkdir(id: *mut git_oid, - repo: *mut git_repository, - relative_path: *const c_char) -> c_int; - - // tree - pub fn git_tree_entry_byid(tree: *const git_tree, - id: *const git_oid) -> *const git_tree_entry; - pub fn git_tree_entry_byindex(tree: *const git_tree, - idx: size_t) -> *const git_tree_entry; - pub fn git_tree_entry_byname(tree: *const git_tree, - filename: *const c_char) -> *const git_tree_entry; - pub fn git_tree_entry_bypath(out: *mut *mut git_tree_entry, - tree: *const git_tree, - filename: *const c_char) -> c_int; - pub fn git_tree_entry_cmp(e1: *const git_tree_entry, - e2: *const git_tree_entry) -> c_int; - pub fn git_tree_entry_dup(dest: *mut *mut git_tree_entry, - src: *const git_tree_entry) -> c_int; - pub fn git_tree_entry_filemode(entry: *const git_tree_entry) -> git_filemode_t; - pub fn git_tree_entry_filemode_raw(entry: *const git_tree_entry) -> git_filemode_t; - pub fn git_tree_entry_free(entry: *mut git_tree_entry); - pub fn git_tree_entry_id(entry: *const git_tree_entry) -> *const git_oid; - pub fn git_tree_entry_name(entry: *const git_tree_entry) -> *const c_char; - pub fn git_tree_entry_to_object(out: *mut *mut git_object, - repo: *mut git_repository, - entry: *const git_tree_entry) -> c_int; - pub fn git_tree_entry_type(entry: *const git_tree_entry) -> git_otype; - pub fn git_tree_entrycount(tree: *const git_tree) -> size_t; - pub fn git_tree_free(tree: *mut git_tree); - pub fn git_tree_id(tree: *const git_tree) -> *const git_oid; - pub fn git_tree_lookup(tree: *mut *mut git_tree, - repo: *mut git_repository, - id: *const git_oid) -> c_int; - pub fn git_tree_walk(tree: *const git_tree, - mode: git_treewalk_mode, - callback: git_treewalk_cb, - payload: *mut c_void) -> c_int; - - // treebuilder - pub fn git_treebuilder_new(out: *mut *mut git_treebuilder, - repo: *mut git_repository, - source: *const git_tree) -> c_int; - pub fn git_treebuilder_clear(bld: *mut git_treebuilder); - pub fn git_treebuilder_entrycount(bld: *mut git_treebuilder) -> c_uint; - pub fn git_treebuilder_free(bld: *mut git_treebuilder); - pub fn git_treebuilder_get(bld: *mut git_treebuilder, - filename: *const c_char) -> *const git_tree_entry; - pub fn git_treebuilder_insert(out: *mut *const git_tree_entry, - bld: *mut git_treebuilder, - filename: *const c_char, - id: *const git_oid, - filemode: git_filemode_t) -> c_int; - pub fn git_treebuilder_remove(bld: *mut git_treebuilder, - filename: *const c_char) -> c_int; - pub fn git_treebuilder_filter(bld: *mut git_treebuilder, - filter: git_treebuilder_filter_cb, - payload: *mut c_void); - pub fn git_treebuilder_write(id: *mut git_oid, - bld: *mut git_treebuilder) -> c_int; - - // buf - pub fn git_buf_free(buffer: *mut git_buf); - pub fn git_buf_grow(buffer: *mut git_buf, target_size: size_t) -> c_int; - pub fn git_buf_set(buffer: *mut git_buf, data: *const c_void, - datalen: size_t) -> c_int; - - // commit - pub fn git_commit_author(commit: *const git_commit) -> *const git_signature; - pub fn git_commit_committer(commit: *const git_commit) -> *const git_signature; - pub fn git_commit_free(commit: *mut git_commit); - pub fn git_commit_id(commit: *const git_commit) -> *const git_oid; - pub fn git_commit_lookup(commit: *mut *mut git_commit, - repo: *mut git_repository, - id: *const git_oid) -> c_int; - pub fn git_commit_message(commit: *const git_commit) -> *const c_char; - pub fn git_commit_message_encoding(commit: *const git_commit) -> *const c_char; - pub fn git_commit_message_raw(commit: *const git_commit) -> *const c_char; - pub fn git_commit_nth_gen_ancestor(commit: *mut *mut git_commit, - commit: *const git_commit, - n: c_uint) -> c_int; - pub fn git_commit_parent(out: *mut *mut git_commit, - commit: *const git_commit, - n: c_uint) -> c_int; - pub fn git_commit_parent_id(commit: *const git_commit, - n: c_uint) -> *const git_oid; - pub fn git_commit_parentcount(commit: *const git_commit) -> c_uint; - pub fn git_commit_raw_header(commit: *const git_commit) -> *const c_char; - pub fn git_commit_summary(commit: *mut git_commit) -> *const c_char; - pub fn git_commit_time(commit: *const git_commit) -> git_time_t; - pub fn git_commit_time_offset(commit: *const git_commit) -> c_int; - pub fn git_commit_tree(tree_out: *mut *mut git_tree, - commit: *const git_commit) -> c_int; - pub fn git_commit_tree_id(commit: *const git_commit) -> *const git_oid; - pub fn git_commit_amend(id: *mut git_oid, - commit_to_amend: *const git_commit, - update_ref: *const c_char, - author: *const git_signature, - committer: *const git_signature, - message_encoding: *const c_char, - message: *const c_char, - tree: *const git_tree) -> c_int; - pub fn git_commit_create(id: *mut git_oid, - repo: *mut git_repository, - update_ref: *const c_char, - author: *const git_signature, - committer: *const git_signature, - message_encoding: *const c_char, - message: *const c_char, - tree: *const git_tree, - parent_count: size_t, - parents: *mut *const git_commit) -> c_int; - pub fn git_commit_header_field(out: *mut git_buf, - commit: *const git_commit, - field: *const c_char) -> c_int; - - // branch - pub fn git_branch_create(out: *mut *mut git_reference, - repo: *mut git_repository, - branch_name: *const c_char, - target: *const git_commit, - force: c_int) -> c_int; - pub fn git_branch_delete(branch: *mut git_reference) -> c_int; - pub fn git_branch_is_head(branch: *const git_reference) -> c_int; - pub fn git_branch_iterator_free(iter: *mut git_branch_iterator); - pub fn git_branch_iterator_new(iter: *mut *mut git_branch_iterator, - repo: *mut git_repository, - list_flags: git_branch_t) -> c_int; - pub fn git_branch_lookup(out: *mut *mut git_reference, - repo: *mut git_repository, - branch_name: *const c_char, - branch_type: git_branch_t) -> c_int; - pub fn git_branch_move(out: *mut *mut git_reference, - branch: *mut git_reference, - new_branch_name: *const c_char, - force: c_int) -> c_int; - pub fn git_branch_name(out: *mut *const c_char, - branch: *const git_reference) -> c_int; - pub fn git_branch_next(out: *mut *mut git_reference, - out_type: *mut git_branch_t, - iter: *mut git_branch_iterator) -> c_int; - pub fn git_branch_set_upstream(branch: *mut git_reference, - upstream_name: *const c_char) -> c_int; - pub fn git_branch_upstream(out: *mut *mut git_reference, - branch: *const git_reference) -> c_int; - - // index - pub fn git_index_add(index: *mut git_index, - entry: *const git_index_entry) -> c_int; - pub fn git_index_add_all(index: *mut git_index, - pathspec: *const git_strarray, - flags: c_uint, - callback: Option, - payload: *mut c_void) -> c_int; - pub fn git_index_add_bypath(index: *mut git_index, - path: *const c_char) -> c_int; - pub fn git_index_add_frombuffer(index: *mut git_index, - entry: *const git_index_entry, - buffer: *const c_void, - len: size_t) -> c_int; - pub fn git_index_conflict_add(index: *mut git_index, - ancestor_entry: *const git_index_entry, - our_entry: *const git_index_entry, - their_entry: *const git_index_entry) -> c_int; - pub fn git_index_clear(index: *mut git_index) -> c_int; - pub fn git_index_entry_stage(entry: *const git_index_entry) -> c_int; - pub fn git_index_entrycount(entry: *const git_index) -> size_t; - pub fn git_index_find(at_pos: *mut size_t, - index: *mut git_index, - path: *const c_char) -> c_int; - pub fn git_index_free(index: *mut git_index); - pub fn git_index_get_byindex(index: *mut git_index, - n: size_t) -> *const git_index_entry; - pub fn git_index_get_bypath(index: *mut git_index, - path: *const c_char, - stage: c_int) -> *const git_index_entry; - pub fn git_index_new(index: *mut *mut git_index) -> c_int; - pub fn git_index_open(index: *mut *mut git_index, - index_path: *const c_char) -> c_int; - pub fn git_index_path(index: *const git_index) -> *const c_char; - pub fn git_index_read(index: *mut git_index, force: c_int) -> c_int; - pub fn git_index_read_tree(index: *mut git_index, - tree: *const git_tree) -> c_int; - pub fn git_index_remove(index: *mut git_index, - path: *const c_char, - stage: c_int) -> c_int; - pub fn git_index_remove_all(index: *mut git_index, - pathspec: *const git_strarray, - callback: Option, - payload: *mut c_void) -> c_int; - pub fn git_index_remove_bypath(index: *mut git_index, - path: *const c_char) -> c_int; - pub fn git_index_remove_directory(index: *mut git_index, - dir: *const c_char, - stage: c_int) -> c_int; - pub fn git_index_update_all(index: *mut git_index, - pathspec: *const git_strarray, - callback: Option, - payload: *mut c_void) -> c_int; - pub fn git_index_write(index: *mut git_index) -> c_int; - pub fn git_index_write_tree(out: *mut git_oid, - index: *mut git_index) -> c_int; - pub fn git_index_write_tree_to(out: *mut git_oid, - index: *mut git_index, - repo: *mut git_repository) -> c_int; - - // config - pub fn git_config_add_file_ondisk(cfg: *mut git_config, - path: *const c_char, - level: git_config_level_t, - force: c_int) -> c_int; - pub fn git_config_delete_entry(cfg: *mut git_config, - name: *const c_char) -> c_int; - pub fn git_config_delete_multivar(cfg: *mut git_config, - name: *const c_char, - regexp: *const c_char) -> c_int; - pub fn git_config_find_programdata(out: *mut git_buf) -> c_int; - pub fn git_config_find_global(out: *mut git_buf) -> c_int; - pub fn git_config_find_system(out: *mut git_buf) -> c_int; - pub fn git_config_find_xdg(out: *mut git_buf) -> c_int; - pub fn git_config_free(cfg: *mut git_config); - pub fn git_config_get_bool(out: *mut c_int, - cfg: *const git_config, - name: *const c_char) -> c_int; - pub fn git_config_get_entry(out: *mut *mut git_config_entry, - cfg: *const git_config, - name: *const c_char) -> c_int; - pub fn git_config_get_int32(out: *mut i32, - cfg: *const git_config, - name: *const c_char) -> c_int; - pub fn git_config_get_int64(out: *mut i64, - cfg: *const git_config, - name: *const c_char) -> c_int; - pub fn git_config_get_string(out: *mut *const c_char, - cfg: *const git_config, - name: *const c_char) -> c_int; - pub fn git_config_get_string_buf(out: *mut git_buf, - cfg: *const git_config, - name: *const c_char) -> c_int; - pub fn git_config_get_path(out: *mut git_buf, - cfg: *const git_config, - name: *const c_char) -> c_int; - pub fn git_config_iterator_free(iter: *mut git_config_iterator); - pub fn git_config_iterator_glob_new(out: *mut *mut git_config_iterator, - cfg: *const git_config, - regexp: *const c_char) -> c_int; - pub fn git_config_iterator_new(out: *mut *mut git_config_iterator, - cfg: *const git_config) -> c_int; - pub fn git_config_new(out: *mut *mut git_config) -> c_int; - pub fn git_config_next(entry: *mut *mut git_config_entry, - iter: *mut git_config_iterator) -> c_int; - pub fn git_config_open_default(out: *mut *mut git_config) -> c_int; - pub fn git_config_open_global(out: *mut *mut git_config, - config: *mut git_config) -> c_int; - pub fn git_config_open_level(out: *mut *mut git_config, - parent: *const git_config, - level: git_config_level_t) -> c_int; - pub fn git_config_open_ondisk(out: *mut *mut git_config, - path: *const c_char) -> c_int; - pub fn git_config_parse_bool(out: *mut c_int, - value: *const c_char) -> c_int; - pub fn git_config_parse_int32(out: *mut i32, - value: *const c_char) -> c_int; - pub fn git_config_parse_int64(out: *mut i64, - value: *const c_char) -> c_int; - pub fn git_config_set_bool(cfg: *mut git_config, - name: *const c_char, - value: c_int) -> c_int; - pub fn git_config_set_int32(cfg: *mut git_config, - name: *const c_char, - value: i32) -> c_int; - pub fn git_config_set_int64(cfg: *mut git_config, - name: *const c_char, - value: i64) -> c_int; - pub fn git_config_set_string(cfg: *mut git_config, - name: *const c_char, - value: *const c_char) -> c_int; - pub fn git_config_snapshot(out: *mut *mut git_config, - config: *mut git_config) -> c_int; - pub fn git_config_entry_free(entry: *mut git_config_entry); - - // cred - pub fn git_cred_default_new(out: *mut *mut git_cred) -> c_int; - pub fn git_cred_has_username(cred: *mut git_cred) -> c_int; - pub fn git_cred_ssh_custom_new(out: *mut *mut git_cred, - username: *const c_char, - publickey: *const c_char, - publickey_len: size_t, - sign_callback: git_cred_sign_callback, - payload: *mut c_void) -> c_int; - pub fn git_cred_ssh_interactive_new(out: *mut *mut git_cred, - username: *const c_char, - prompt_callback: git_cred_ssh_interactive_callback, - payload: *mut c_void) -> c_int; - pub fn git_cred_ssh_key_from_agent(out: *mut *mut git_cred, - username: *const c_char) -> c_int; - pub fn git_cred_ssh_key_new(out: *mut *mut git_cred, - username: *const c_char, - publickey: *const c_char, - privatekey: *const c_char, - passphrase: *const c_char) -> c_int; - pub fn git_cred_ssh_key_memory_new(out: *mut *mut git_cred, - username: *const c_char, - publickey: *const c_char, - privatekey: *const c_char, - passphrase: *const c_char) -> c_int; - pub fn git_cred_userpass(cred: *mut *mut git_cred, - url: *const c_char, - user_from_url: *const c_char, - allowed_types: c_uint, - payload: *mut c_void) -> c_int; - pub fn git_cred_userpass_plaintext_new(out: *mut *mut git_cred, - username: *const c_char, - password: *const c_char) -> c_int; - pub fn git_cred_username_new(cred: *mut *mut git_cred, - username: *const c_char) -> c_int; - - // tags - pub fn git_tag_annotation_create(oid: *mut git_oid, - repo: *mut git_repository, - tag_name: *const c_char, - target: *const git_object, - tagger: *const git_signature, - message: *const c_char) -> c_int; - pub fn git_tag_create(oid: *mut git_oid, - repo: *mut git_repository, - tag_name: *const c_char, - target: *const git_object, - tagger: *const git_signature, - message: *const c_char, - force: c_int) -> c_int; - pub fn git_tag_create_frombuffer(oid: *mut git_oid, - repo: *mut git_repository, - buffer: *const c_char, - force: c_int) -> c_int; - pub fn git_tag_create_lightweight(oid: *mut git_oid, - repo: *mut git_repository, - tag_name: *const c_char, - target: *const git_object, - force: c_int) -> c_int; - pub fn git_tag_delete(repo: *mut git_repository, - tag_name: *const c_char) -> c_int; - pub fn git_tag_foreach(repo: *mut git_repository, - callback: git_tag_foreach_cb, - payload: *mut c_void) -> c_int; - pub fn git_tag_free(tag: *mut git_tag); - pub fn git_tag_id(tag: *const git_tag) -> *const git_oid; - pub fn git_tag_list(tag_names: *mut git_strarray, - repo: *mut git_repository) -> c_int; - pub fn git_tag_list_match(tag_names: *mut git_strarray, - pattern: *const c_char, - repo: *mut git_repository) -> c_int; - pub fn git_tag_lookup(out: *mut *mut git_tag, - repo: *mut git_repository, - id: *const git_oid) -> c_int; - pub fn git_tag_lookup_prefix(out: *mut *mut git_tag, - repo: *mut git_repository, - id: *const git_oid, - len: size_t) -> c_int; - pub fn git_tag_message(tag: *const git_tag) -> *const c_char; - pub fn git_tag_name(tag: *const git_tag) -> *const c_char; - pub fn git_tag_peel(tag_target_out: *mut *mut git_object, - tag: *const git_tag) -> c_int; - pub fn git_tag_tagger(tag: *const git_tag) -> *const git_signature; - pub fn git_tag_target(target_out: *mut *mut git_object, - tag: *const git_tag) -> c_int; - pub fn git_tag_target_id(tag: *const git_tag) -> *const git_oid; - pub fn git_tag_target_type(tag: *const git_tag) -> git_otype; - - // checkout - pub fn git_checkout_head(repo: *mut git_repository, - opts: *const git_checkout_options) -> c_int; - pub fn git_checkout_index(repo: *mut git_repository, - index: *mut git_index, - opts: *const git_checkout_options) -> c_int; - pub fn git_checkout_tree(repo: *mut git_repository, - treeish: *const git_object, - opts: *const git_checkout_options) -> c_int; - pub fn git_checkout_init_options(opts: *mut git_checkout_options, - version: c_uint) -> c_int; - - // merge - pub fn git_annotated_commit_id(commit: *const git_annotated_commit) - -> *const git_oid; - pub fn git_annotated_commit_from_ref(out: *mut *mut git_annotated_commit, - repo: *mut git_repository, - reference: *const git_reference) - -> c_int; - pub fn git_annotated_commit_free(commit: *mut git_annotated_commit); - pub fn git_merge_init_options(opts: *mut git_merge_options, - version: c_uint) -> c_int; - pub fn git_merge(repo: *mut git_repository, - their_heads: *mut *const git_annotated_commit, - len: size_t, - merge_opts: *const git_merge_options, - checkout_opts: *const git_checkout_options) -> c_int; - pub fn git_merge_commits(out: *mut *mut git_index, - repo: *mut git_repository, - our_commit: *const git_commit, - their_commit: *const git_commit, - opts: *const git_merge_options) -> c_int; - pub fn git_repository_state_cleanup(repo: *mut git_repository) -> c_int; - - // notes - pub fn git_note_author(note: *const git_note) -> *const git_signature; - pub fn git_note_committer(note: *const git_note) -> *const git_signature; - pub fn git_note_create(out: *mut git_oid, - repo: *mut git_repository, - notes_ref: *const c_char, - author: *const git_signature, - committer: *const git_signature, - oid: *const git_oid, - note: *const c_char, - force: c_int) -> c_int; - pub fn git_note_default_ref(out: *mut git_buf, - repo: *mut git_repository) -> c_int; - pub fn git_note_free(note: *mut git_note); - pub fn git_note_id(note: *const git_note) -> *const git_oid; - pub fn git_note_iterator_free(it: *mut git_note_iterator); - pub fn git_note_iterator_new(out: *mut *mut git_note_iterator, - repo: *mut git_repository, - notes_ref: *const c_char) -> c_int; - pub fn git_note_message(note: *const git_note) -> *const c_char; - pub fn git_note_next(note_id: *mut git_oid, - annotated_id: *mut git_oid, - it: *mut git_note_iterator) -> c_int; - pub fn git_note_read(out: *mut *mut git_note, - repo: *mut git_repository, - notes_ref: *const c_char, - oid: *const git_oid) -> c_int; - pub fn git_note_remove(repo: *mut git_repository, - notes_ref: *const c_char, - author: *const git_signature, - committer: *const git_signature, - oid: *const git_oid) -> c_int; - - // blame - pub fn git_blame_file(out: *mut *mut git_blame, - repo: *mut git_repository, - path: *const c_char, - options: *mut git_blame_options) -> c_int; - pub fn git_blame_free(blame: *mut git_blame); - - pub fn git_blame_init_options(opts: *mut git_blame_options, - version: c_uint) -> c_int; - pub fn git_blame_get_hunk_count(blame: *mut git_blame) -> u32; - - pub fn git_blame_get_hunk_byline(blame: *mut git_blame, - lineno: usize) -> *const git_blame_hunk; - pub fn git_blame_get_hunk_byindex(blame: *mut git_blame, - index: u32) -> *const git_blame_hunk; - - // revwalk - pub fn git_revwalk_new(out: *mut *mut git_revwalk, - repo: *mut git_repository) -> c_int; - pub fn git_revwalk_free(walk: *mut git_revwalk); - - pub fn git_revwalk_reset(walk: *mut git_revwalk); - - pub fn git_revwalk_sorting(walk: *mut git_revwalk, sort_mode: c_uint); - - pub fn git_revwalk_push_head(walk: *mut git_revwalk) -> c_int; - pub fn git_revwalk_push(walk: *mut git_revwalk, - oid: *const git_oid) -> c_int; - pub fn git_revwalk_push_ref(walk: *mut git_revwalk, - refname: *const c_char) -> c_int; - pub fn git_revwalk_push_glob(walk: *mut git_revwalk, - glob: *const c_char) -> c_int; - pub fn git_revwalk_push_range(walk: *mut git_revwalk, - range: *const c_char) -> c_int; - pub fn git_revwalk_simplify_first_parent(walk: *mut git_revwalk); - - pub fn git_revwalk_hide_head(walk: *mut git_revwalk) -> c_int; - pub fn git_revwalk_hide(walk: *mut git_revwalk, - oid: *const git_oid) -> c_int; - pub fn git_revwalk_hide_ref(walk: *mut git_revwalk, - refname: *const c_char) -> c_int; - pub fn git_revwalk_hide_glob(walk: *mut git_revwalk, - refname: *const c_char) -> c_int; - - pub fn git_revwalk_next(out: *mut git_oid, walk: *mut git_revwalk) -> c_int; - - // merge - pub fn git_merge_base(out: *mut git_oid, - repo: *mut git_repository, - one: *const git_oid, - two: *const git_oid) -> c_int; - - pub fn git_merge_bases(out: *mut git_oidarray, - repo: *mut git_repository, - one: *const git_oid, - two: *const git_oid) -> c_int; - - // pathspec - pub fn git_pathspec_free(ps: *mut git_pathspec); - pub fn git_pathspec_match_diff(out: *mut *mut git_pathspec_match_list, - diff: *mut git_diff, - flags: u32, - ps: *mut git_pathspec) -> c_int; - pub fn git_pathspec_match_index(out: *mut *mut git_pathspec_match_list, - index: *mut git_index, - flags: u32, - ps: *mut git_pathspec) -> c_int; - pub fn git_pathspec_match_list_diff_entry(m: *const git_pathspec_match_list, - pos: size_t) -> *const git_diff_delta; - pub fn git_pathspec_match_list_entry(m: *const git_pathspec_match_list, - pos: size_t) -> *const c_char; - pub fn git_pathspec_match_list_entrycount(m: *const git_pathspec_match_list) - -> size_t; - pub fn git_pathspec_match_list_failed_entry(m: *const git_pathspec_match_list, - pos: size_t) -> *const c_char; - pub fn git_pathspec_match_list_failed_entrycount( - m: *const git_pathspec_match_list) -> size_t; - pub fn git_pathspec_match_list_free(m: *mut git_pathspec_match_list); - pub fn git_pathspec_match_tree(out: *mut *mut git_pathspec_match_list, - tree: *mut git_tree, - flags: u32, - ps: *mut git_pathspec) -> c_int; - pub fn git_pathspec_match_workdir(out: *mut *mut git_pathspec_match_list, - repo: *mut git_repository, - flags: u32, - ps: *mut git_pathspec) -> c_int; - pub fn git_pathspec_matches_path(ps: *const git_pathspec, - flags: u32, - path: *const c_char) -> c_int; - pub fn git_pathspec_new(out: *mut *mut git_pathspec, - pathspec: *const git_strarray) -> c_int; - - // diff - pub fn git_diff_blob_to_buffer(old_blob: *const git_blob, - old_as_path: *const c_char, - buffer: *const c_char, - buffer_len: size_t, - buffer_as_path: *const c_char, - options: *const git_diff_options, - file_cb: git_diff_file_cb, - binary_cb: git_diff_binary_cb, - hunk_cb: git_diff_hunk_cb, - line_cb: git_diff_line_cb, - payload: *mut c_void) -> c_int; - pub fn git_diff_blobs(old_blob: *const git_blob, - old_as_path: *const c_char, - new_blob: *const git_blob, - new_as_path: *const c_char, - options: *const git_diff_options, - file_cb: git_diff_file_cb, - binary_cb: git_diff_binary_cb, - hunk_cb: git_diff_hunk_cb, - line_cb: git_diff_line_cb, - payload: *mut c_void) -> c_int; - pub fn git_diff_buffers(old_buffer: *const c_void, - old_len: size_t, - old_as_path: *const c_char, - new_buffer: *const c_void, - new_len: size_t, - new_as_path: *const c_char, - options: *const git_diff_options, - file_cb: git_diff_file_cb, - binary_cb: git_diff_binary_cb, - hunk_cb: git_diff_hunk_cb, - line_cb: git_diff_line_cb, - payload: *mut c_void) -> c_int; - pub fn git_diff_find_similar(diff: *mut git_diff, - options: *const git_diff_find_options) -> c_int; - pub fn git_diff_find_init_options(opts: *mut git_diff_find_options, - version: c_uint) -> c_int; - pub fn git_diff_foreach(diff: *mut git_diff, - file_cb: git_diff_file_cb, - binary_cb: Option, - hunk_cb: Option, - line_cb: Option, - payload: *mut c_void) -> c_int; - pub fn git_diff_free(diff: *mut git_diff); - pub fn git_diff_get_delta(diff: *const git_diff, - idx: size_t) -> *const git_diff_delta; - pub fn git_diff_get_stats(out: *mut *mut git_diff_stats, - diff: *mut git_diff) -> c_int; - pub fn git_diff_index_to_workdir(diff: *mut *mut git_diff, - repo: *mut git_repository, - index: *mut git_index, - opts: *const git_diff_options) -> c_int; - pub fn git_diff_init_options(opts: *mut git_diff_options, - version: c_uint) -> c_int; - pub fn git_diff_is_sorted_icase(diff: *const git_diff) -> c_int; - pub fn git_diff_merge(onto: *mut git_diff, - from: *const git_diff) -> c_int; - pub fn git_diff_num_deltas(diff: *const git_diff) -> size_t; - pub fn git_diff_num_deltas_of_type(diff: *const git_diff, - delta: git_delta_t) -> size_t; - pub fn git_diff_print(diff: *mut git_diff, - format: git_diff_format_t, - print_cb: git_diff_line_cb, - payload: *mut c_void) -> c_int; - pub fn git_diff_stats_deletions(stats: *const git_diff_stats) -> size_t; - pub fn git_diff_stats_files_changed(stats: *const git_diff_stats) -> size_t; - pub fn git_diff_stats_free(stats: *mut git_diff_stats); - pub fn git_diff_stats_insertions(stats: *const git_diff_stats) -> size_t; - pub fn git_diff_stats_to_buf(out: *mut git_buf, - stats: *const git_diff_stats, - format: git_diff_stats_format_t, - width: size_t) -> c_int; - pub fn git_diff_status_char(status: git_delta_t) -> c_char; - pub fn git_diff_tree_to_index(diff: *mut *mut git_diff, - repo: *mut git_repository, - old_tree: *mut git_tree, - index: *mut git_index, - opts: *const git_diff_options) -> c_int; - pub fn git_diff_tree_to_tree(diff: *mut *mut git_diff, - repo: *mut git_repository, - old_tree: *mut git_tree, - new_tree: *mut git_tree, - opts: *const git_diff_options) -> c_int; - pub fn git_diff_tree_to_workdir(diff: *mut *mut git_diff, - repo: *mut git_repository, - old_tree: *mut git_tree, - opts: *const git_diff_options) -> c_int; - pub fn git_diff_tree_to_workdir_with_index(diff: *mut *mut git_diff, - repo: *mut git_repository, - old_tree: *mut git_tree, - opts: *const git_diff_options) - -> c_int; - - pub fn git_graph_ahead_behind(ahead: *mut size_t, behind: *mut size_t, - repo: *mut git_repository, - local: *const git_oid, upstream: *const git_oid) - -> c_int; - - pub fn git_graph_descendant_of(repo: *mut git_repository, - commit: *const git_oid, ancestor: *const git_oid) - -> c_int; - - // reflog - pub fn git_reflog_append(reflog: *mut git_reflog, - id: *const git_oid, - committer: *const git_signature, - msg: *const c_char) -> c_int; - pub fn git_reflog_delete(repo: *mut git_repository, - name: *const c_char) -> c_int; - pub fn git_reflog_drop(reflog: *mut git_reflog, - idx: size_t, - rewrite_previous_entry: c_int) -> c_int; - pub fn git_reflog_entry_byindex(reflog: *const git_reflog, - idx: size_t) -> *const git_reflog_entry; - pub fn git_reflog_entry_committer(entry: *const git_reflog_entry) - -> *const git_signature; - pub fn git_reflog_entry_id_new(entry: *const git_reflog_entry) - -> *const git_oid; - pub fn git_reflog_entry_id_old(entry: *const git_reflog_entry) - -> *const git_oid; - pub fn git_reflog_entry_message(entry: *const git_reflog_entry) - -> *const c_char; - pub fn git_reflog_entrycount(reflog: *mut git_reflog) -> size_t; - pub fn git_reflog_free(reflog: *mut git_reflog); - pub fn git_reflog_read(out: *mut *mut git_reflog, - repo: *mut git_repository, - name: *const c_char) -> c_int; - pub fn git_reflog_rename(repo: *mut git_repository, - old_name: *const c_char, - name: *const c_char) -> c_int; - pub fn git_reflog_write(reflog: *mut git_reflog) -> c_int; - - // transport - pub fn git_transport_register(prefix: *const c_char, - cb: git_transport_cb, - param: *mut c_void) -> c_int; - pub fn git_transport_unregister(prefix: *const c_char) -> c_int; - pub fn git_transport_smart(out: *mut *mut git_transport, - owner: *mut git_remote, - payload: *mut c_void) -> c_int; - - // describe - pub fn git_describe_commit(result: *mut *mut git_describe_result, - object: *mut git_object, - opts: *mut git_describe_options) -> c_int; - pub fn git_describe_format(buf: *mut git_buf, - result: *const git_describe_result, - opts: *const git_describe_format_options) -> c_int; - pub fn git_describe_result_free(result: *mut git_describe_result); - pub fn git_describe_workdir(out: *mut *mut git_describe_result, - repo: *mut git_repository, - opts: *mut git_describe_options) -> c_int; -} - -#[test] -fn smoke() { - unsafe { git_threads_init(); } -} diff --git a/deps/libgit2-sys-0.4.0/libgit2/script/toolchain-mingw32.cmake b/deps/libgit2-sys-0.4.0/libgit2/script/toolchain-mingw32.cmake deleted file mode 100644 index 2536b01c3..000000000 --- a/deps/libgit2-sys-0.4.0/libgit2/script/toolchain-mingw32.cmake +++ /dev/null @@ -1,13 +0,0 @@ -# CMake toolchain file for Win32 cross-compile -SET(CMAKE_SYSTEM_NAME Windows) - -SET(CMAKE_C_COMPILER i586-mingw32msvc-gcc) -SET(CMAKE_RC_COMPILER i586-mingw32msvc-windres) - -SET(CMAKE_FIND_ROOT_PATH /usr/i586-mingw32msvc) - -SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) -SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) -SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) - -SET(ENV{PKG_CONFIG_LIBDIR} ${CMAKE_FIND_ROOT_PATH}/lib/pkgconfig) diff --git a/deps/libgit2-sys-0.4.3/Cargo.toml b/deps/libgit2-sys-0.4.3/Cargo.toml new file mode 100644 index 000000000..5c6ebf62d --- /dev/null +++ b/deps/libgit2-sys-0.4.3/Cargo.toml @@ -0,0 +1,60 @@ +[package] + +name = "libgit2-sys" +version = "0.4.3" +authors = ["Alex Crichton "] +links = "git2" +build = "build.rs" +repository = "https://github.com/alexcrichton/git2-rs" +license = "MIT/Apache-2.0" +description = "Native bindings to the libgit2 library" + +[lib] +name = "libgit2_sys" +path = "lib.rs" + +[dependencies] +libssh2-sys = { version = ">= 0", optional = true } +libc = "0.2" +libz-sys = ">= 0" + +[build-dependencies] +pkg-config = "0.3" +cmake = "0.1.2" +gcc = "0.3" + +[target."cfg(all(unix, not(target_os = \"macos\")))".dependencies] +openssl-sys = "0.7.0" + +[target.i686-unknown-linux-gnu.dependencies] +openssl-sys = "0.7.0" +[target.i586-unknown-linux-gnu.dependencies] +openssl-sys = "0.7.0" +[target.x86_64-unknown-linux-gnu.dependencies] +openssl-sys = "0.7.0" +[target.x86_64-unknown-linux-musl.dependencies] +openssl-sys = "0.7.0" +[target.aarch64-unknown-linux-gnu.dependencies] +openssl-sys = "0.7.0" +[target.powerpc64-unknown-linux-gnu.dependencies] +openssl-sys = "0.7.0" +[target.powerpc64le-unknown-linux-gnu.dependencies] +openssl-sys = "0.7.0" +[target.arm-unknown-linux-gnueabihf.dependencies] +openssl-sys = "0.7.0" +[target.armv7-unknown-linux-gnueabihf.dependencies] +openssl-sys = "0.7.0" +[target.i686-unknown-freebsd.dependencies] +openssl-sys = "0.7.0" +[target.x86_64-unknown-freebsd.dependencies] +openssl-sys = "0.7.0" +[target.x86_64-unknown-bitrig.dependencies] +openssl-sys = "0.7.0" +[target.x86_64-unknown-openbsd.dependencies] +openssl-sys = "0.7.0" +[target.x86_64-unknown-dragonfly.dependencies] +openssl-sys = "0.7.0" + +[features] +ssh = ["libssh2-sys"] +https = [] diff --git a/deps/libgit2-sys-0.4.3/build.rs b/deps/libgit2-sys-0.4.3/build.rs new file mode 100644 index 000000000..b4d58b321 --- /dev/null +++ b/deps/libgit2-sys-0.4.3/build.rs @@ -0,0 +1,175 @@ +extern crate cmake; +extern crate gcc; +extern crate pkg_config; + +use std::env; +use std::ffi::OsString; +use std::fs::{self, File}; +use std::io::prelude::*; +use std::path::{Path, PathBuf}; +use std::process::Command; + +macro_rules! t { + ($e:expr) => (match $e{ + Ok(e) => e, + Err(e) => panic!("{} failed with {}", stringify!($e), e), + }) +} + +fn main() { + let https = env::var("CARGO_FEATURE_HTTPS").is_ok(); + let ssh = env::var("CARGO_FEATURE_SSH").is_ok(); + if ssh { + register_dep("SSH2"); + } + if https { + register_dep("OPENSSL"); + } + let has_pkgconfig = Command::new("pkg-config").output().is_ok(); + + if env::var("LIBGIT2_SYS_USE_PKG_CONFIG").is_ok() { + if pkg_config::find_library("libgit2").is_ok() { + return + } + } + + if !Path::new("libgit2/.git").exists() { + let _ = Command::new("git").args(&["submodule", "update", "--init"]) + .status(); + } + + let target = env::var("TARGET").unwrap(); + let host = env::var("HOST").unwrap(); + let windows = target.contains("windows"); + let msvc = target.contains("msvc"); + let mut cfg = cmake::Config::new("libgit2"); + + if msvc { + // libgit2 passes the /GL flag to enable whole program optimization, but + // this requires that the /LTCG flag is passed to the linker later on, + // and currently the compiler does not do that, so we disable whole + // program optimization entirely. + cfg.cflag("/GL-"); + + // Currently liblibc links to msvcrt which apparently is a dynamic CRT, + // so we need to turn this off to get it to link right. + cfg.define("STATIC_CRT", "OFF"); + } + + // libgit2 uses pkg-config to discover libssh2, but this doesn't work on + // windows as libssh2 doesn't come with a libssh2.pc file in that install + // (or when pkg-config isn't found). As a result we just manually turn on + // SSH support in libgit2 (a little jankily) here... + if ssh && (windows || !has_pkgconfig) { + if let Ok(libssh2_include) = env::var("DEP_SSH2_INCLUDE") { + if msvc { + cfg.cflag(format!("/I{}", libssh2_include)) + .cflag("/DGIT_SSH"); + } else { + cfg.cflag(format!("-I{}", libssh2_include)) + .cflag("-DGIT_SSH"); + } + } + } + + // When cross-compiling, we're pretty unlikely to find a `dlltool` binary + // lying around, so try to find another if it exists + if windows && !host.contains("windows") { + let c_compiler = gcc::Config::new().cargo_metadata(false) + .get_compiler(); + let exe = c_compiler.path(); + let path = env::var_os("PATH").unwrap_or(OsString::new()); + let exe = env::split_paths(&path) + .map(|p| p.join(&exe)) + .find(|p| p.exists()); + if let Some(exe) = exe { + if let Some(name) = exe.file_name().and_then(|e| e.to_str()) { + let name = name.replace("gcc", "dlltool"); + let dlltool = exe.with_file_name(name); + cfg.define("DLLTOOL", &dlltool); + } + } + } + + if ssh { + cfg.register_dep("SSH2"); + } else { + cfg.define("USE_SSH", "OFF"); + } + if https { + cfg.register_dep("OPENSSL"); + } else { + cfg.define("USE_OPENSSL", "OFF"); + } + + let _ = fs::remove_dir_all(env::var("OUT_DIR").unwrap()); + t!(fs::create_dir_all(env::var("OUT_DIR").unwrap())); + + let dst = cfg.define("BUILD_SHARED_LIBS", "OFF") + .define("BUILD_CLAR", "OFF") + .define("CURL", "OFF") + .register_dep("Z") + .build(); + + // Make sure libssh2 was detected on unix systems, because it definitely + // should have been! + if ssh && !msvc { + let flags = dst.join("build/CMakeFiles/git2.dir/flags.make"); + let mut contents = String::new(); + t!(t!(File::open(flags)).read_to_string(&mut contents)); + if !contents.contains("-DGIT_SSH") { + panic!("libgit2 failed to find libssh2, and SSH support is required"); + } + } + + if target.contains("windows") { + println!("cargo:rustc-link-lib=winhttp"); + println!("cargo:rustc-link-lib=rpcrt4"); + println!("cargo:rustc-link-lib=ole32"); + println!("cargo:rustc-link-lib=crypt32"); + println!("cargo:rustc-link-lib=static=git2"); + println!("cargo:rustc-link-search=native={}/lib", dst.display()); + return + } + + // libgit2 requires the http_parser library for the HTTP transport to be + // implemented, and it will attempt to use the system http_parser if it's + // available. Detect this situation and report using the system http parser + // the same way in this situation. + // + // Note that other dependencies of libgit2 like openssl, libz, and libssh2 + // are tracked via crates instead of this. Ideally this should be a crate as + // well. + let pkgconfig_file = dst.join("lib/pkgconfig/libgit2.pc"); + if let Ok(mut f) = File::open(&pkgconfig_file) { + let mut contents = String::new(); + t!(f.read_to_string(&mut contents)); + if contents.contains("-lhttp_parser") { + println!("cargo:rustc-link-lib=http_parser"); + } + } + + println!("cargo:rustc-link-lib=static=git2"); + println!("cargo:rustc-link-search=native={}", dst.join("lib").display()); + if target.contains("apple") { + println!("cargo:rustc-link-lib=iconv"); + println!("cargo:rustc-link-lib=framework=Security"); + println!("cargo:rustc-link-lib=framework=CoreFoundation"); + } +} + +fn register_dep(dep: &str) { + match env::var(&format!("DEP_{}_ROOT", dep)) { + Ok(s) => { + prepend("PKG_CONFIG_PATH", Path::new(&s).join("lib/pkgconfig")); + } + Err(..) => {} + } +} + +fn prepend(var: &str, val: PathBuf) { + let prefix = env::var(var).unwrap_or(String::new()); + let mut v = vec![val]; + v.extend(env::split_paths(&prefix)); + env::set_var(var, &env::join_paths(v).unwrap()); +} diff --git a/deps/libgit2-sys-0.4.3/lib.rs b/deps/libgit2-sys-0.4.3/lib.rs new file mode 100644 index 000000000..1ade9be83 --- /dev/null +++ b/deps/libgit2-sys-0.4.3/lib.rs @@ -0,0 +1,2450 @@ +#![doc(html_root_url = "http://alexcrichton.com/git2-rs")] +#![allow(non_camel_case_types)] + +extern crate libc; +#[cfg(feature = "ssh")] +extern crate libssh2_sys as libssh2; +#[cfg(all(unix, not(target_os = "macos"), not(target_os = "ios"), feature = "https"))] +extern crate openssl_sys as openssl; +extern crate libz_sys as libz; + +use libc::{c_int, c_char, c_uint, size_t, c_uchar, c_void}; + +pub const GIT_OID_RAWSZ: usize = 20; +pub const GIT_OID_HEXSZ: usize = GIT_OID_RAWSZ * 2; +pub const GIT_CLONE_OPTIONS_VERSION: c_uint = 1; +pub const GIT_CHECKOUT_OPTIONS_VERSION: c_uint = 1; +pub const GIT_MERGE_OPTIONS_VERSION: c_uint = 1; +pub const GIT_REMOTE_CALLBACKS_VERSION: c_uint = 1; +pub const GIT_STATUS_OPTIONS_VERSION: c_uint = 1; +pub const GIT_BLAME_OPTIONS_VERSION: c_uint = 1; + +macro_rules! git_enum { + (pub enum $name:ident { $($variants:tt)* }) => { + #[cfg(target_env = "msvc")] + pub type $name = i32; + #[cfg(not(target_env = "msvc"))] + pub type $name = u32; + git_enum!(gen, $name, 0, $($variants)*); + }; + (pub enum $name:ident: $t:ty { $($variants:tt)* }) => { + pub type $name = $t; + git_enum!(gen, $name, 0, $($variants)*); + }; + (gen, $name:ident, $val:expr, $variant:ident, $($rest:tt)*) => { + pub const $variant: $name = $val; + git_enum!(gen, $name, $val+1, $($rest)*); + }; + (gen, $name:ident, $val:expr, $variant:ident = $e:expr, $($rest:tt)*) => { + pub const $variant: $name = $e; + git_enum!(gen, $name, $e+1, $($rest)*); + }; + (gen, $name:ident, $val:expr, ) => {} +} + +pub enum git_blob {} +pub enum git_branch_iterator {} +pub enum git_blame {} +pub enum git_commit {} +pub enum git_config {} +pub enum git_config_iterator {} +pub enum git_index {} +pub enum git_object {} +pub enum git_reference {} +pub enum git_reference_iterator {} +pub enum git_annotated_commit {} +pub enum git_refspec {} +pub enum git_remote {} +pub enum git_repository {} +pub enum git_revwalk {} +pub enum git_submodule {} +pub enum git_tag {} +pub enum git_tree {} +pub enum git_tree_entry {} +pub enum git_treebuilder {} +pub enum git_push {} +pub enum git_note {} +pub enum git_note_iterator {} +pub enum git_status_list {} +pub enum git_pathspec {} +pub enum git_pathspec_match_list {} +pub enum git_diff {} +pub enum git_diff_stats {} +pub enum git_reflog {} +pub enum git_reflog_entry {} +pub enum git_describe_result {} + +#[repr(C)] +pub struct git_revspec { + pub from: *mut git_object, + pub to: *mut git_object, + pub flags: c_uint, +} + +#[repr(C)] +pub struct git_error { + pub message: *mut c_char, + pub klass: c_int, +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct git_oid { + pub id: [u8; GIT_OID_RAWSZ], +} + +#[repr(C)] +#[derive(Copy)] +pub struct git_strarray { + pub strings: *mut *mut c_char, + pub count: size_t, +} +impl Clone for git_strarray { + fn clone(&self) -> git_strarray { *self } +} + +#[repr(C)] +#[derive(Copy)] +pub struct git_oidarray { + pub ids: *mut git_oid, + pub count: size_t, +} +impl Clone for git_oidarray { + fn clone(&self) -> git_oidarray { *self } +} + +#[repr(C)] +pub struct git_signature { + pub name: *mut c_char, + pub email: *mut c_char, + pub when: git_time, +} + +#[repr(C)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct git_time { + pub time: git_time_t, + pub offset: c_int, +} + +pub type git_off_t = i64; +pub type git_time_t = i64; + +git_enum! { + pub enum git_revparse_mode_t { + GIT_REVPARSE_SINGLE = 1 << 0, + GIT_REVPARSE_RANGE = 1 << 1, + GIT_REVPARSE_MERGE_BASE = 1 << 2, + } +} + +git_enum! { + pub enum git_error_code: c_int { + GIT_OK = 0, + + GIT_ERROR = -1, + GIT_ENOTFOUND = -3, + GIT_EEXISTS = -4, + GIT_EAMBIGUOUS = -5, + GIT_EBUFS = -6, + GIT_EUSER = -7, + GIT_EBAREREPO = -8, + GIT_EUNBORNBRANCH = -9, + GIT_EUNMERGED = -10, + GIT_ENONFASTFORWARD = -11, + GIT_EINVALIDSPEC = -12, + GIT_ECONFLICT = -13, + GIT_ELOCKED = -14, + GIT_EMODIFIED = -15, + GIT_EAUTH = -16, + GIT_ECERTIFICATE = -17, + GIT_EAPPLIED = -18, + GIT_EPEEL = -19, + GIT_EEOF = -20, + GIT_EINVALID = -21, + GIT_EUNCOMMITTED = -22, + GIT_EDIRECTORY = -23, + GIT_EMERGECONFLICT = -24, + GIT_PASSTHROUGH = -30, + GIT_ITEROVER = -31, + } +} + +git_enum! { + pub enum git_error_t { + GITERR_NONE = 0, + GITERR_NOMEMORY, + GITERR_OS, + GITERR_INVALID, + GITERR_REFERENCE, + GITERR_ZLIB, + GITERR_REPOSITORY, + GITERR_CONFIG, + GITERR_REGEX, + GITERR_ODB, + GITERR_INDEX, + GITERR_OBJECT, + GITERR_NET, + GITERR_TAG, + GITERR_TREE, + GITERR_INDEXER, + GITERR_SSL, + GITERR_SUBMODULE, + GITERR_THREAD, + GITERR_STASH, + GITERR_CHECKOUT, + GITERR_FETCHHEAD, + GITERR_MERGE, + GITERR_SSH, + GITERR_FILTER, + GITERR_REVERT, + GITERR_CALLBACK, + GITERR_CHERRYPICK, + GITERR_DESCRIBE, + GITERR_REBASE, + GITERR_FILESYSTEM, + } +} + +git_enum! { + pub enum git_repository_state_t { + GIT_REPOSITORY_STATE_NONE, + GIT_REPOSITORY_STATE_MERGE, + GIT_REPOSITORY_STATE_REVERT, + GIT_REPOSITORY_STATE_REVERT_SEQUENCE, + GIT_REPOSITORY_STATE_CHERRYPICK, + GIT_REPOSITORY_STATE_CHERRYPICK_SEQUENCE, + GIT_REPOSITORY_STATE_BISECT, + GIT_REPOSITORY_STATE_REBASE, + GIT_REPOSITORY_STATE_REBASE_INTERACTIVE, + GIT_REPOSITORY_STATE_REBASE_MERGE, + GIT_REPOSITORY_STATE_APPLY_MAILBOX, + GIT_REPOSITORY_STATE_APPLY_MAILBOX_OR_REBASE, + } +} + +git_enum! { + pub enum git_direction { + GIT_DIRECTION_FETCH, + GIT_DIRECTION_PUSH, + } +} + +#[repr(C)] +pub struct git_clone_options { + pub version: c_uint, + pub checkout_opts: git_checkout_options, + pub fetch_opts: git_fetch_options, + pub bare: c_int, + pub local: git_clone_local_t, + pub checkout_branch: *const c_char, + pub repository_cb: Option, + pub repository_cb_payload: *mut c_void, + pub remote_cb: Option, + pub remote_cb_payload: *mut c_void, +} + +git_enum! { + pub enum git_clone_local_t { + GIT_CLONE_LOCAL_AUTO, + GIT_CLONE_LOCAL, + GIT_CLONE_NO_LOCAL, + GIT_CLONE_LOCAL_NO_LINKS, + } +} + +#[repr(C)] +pub struct git_checkout_options { + pub version: c_uint, + pub checkout_strategy: c_uint, + pub disable_filters: c_int, + pub dir_mode: c_uint, + pub file_mode: c_uint, + pub file_open_flags: c_int, + pub notify_flags: c_uint, + pub notify_cb: Option, + pub notify_payload: *mut c_void, + pub progress_cb: Option, + pub progress_payload: *mut c_void, + pub paths: git_strarray, + pub baseline: *mut git_tree, + pub baseline_index: *mut git_index, + pub target_directory: *const c_char, + pub ancestor_label: *const c_char, + pub our_label: *const c_char, + pub their_label: *const c_char, + pub perfdata_cb: Option, + pub perfdata_payload: *mut c_void, +} + +pub type git_checkout_notify_cb = extern fn(git_checkout_notify_t, + *const c_char, + *const git_diff_file, + *const git_diff_file, + *const git_diff_file, + *mut c_void) -> c_int; +pub type git_checkout_progress_cb = extern fn(*const c_char, + size_t, + size_t, + *mut c_void); + +pub type git_checkout_perfdata_cb = extern fn(*const git_checkout_perfdata, + *mut c_void); + +#[repr(C)] +pub struct git_checkout_perfdata { + pub mkdir_calls: size_t, + pub stat_calls: size_t, + pub chmod_calls: size_t, +} + +#[repr(C)] +pub struct git_remote_callbacks { + pub version: c_uint, + pub sideband_progress: Option, + pub completion: Option c_int>, + pub credentials: Option, + pub certificate_check: Option, + pub transfer_progress: Option, + pub update_tips: Option c_int>, + pub pack_progress: Option, + pub push_transfer_progress: Option, + pub push_update_reference: Option c_int>, + pub push_negotiation: Option, + pub transport: Option, + pub payload: *mut c_void, +} + +#[repr(C)] +pub struct git_fetch_options { + pub version: c_int, + pub callbacks: git_remote_callbacks, + pub prune: git_fetch_prune_t, + pub update_fetchhead: c_int, + pub download_tags: git_remote_autotag_option_t, + pub custom_headers: git_strarray, +} + +git_enum! { + pub enum git_remote_autotag_option_t { + GIT_REMOTE_DOWNLOAD_TAGS_UNSPECIFIED, + GIT_REMOTE_DOWNLOAD_TAGS_AUTO, + GIT_REMOTE_DOWNLOAD_TAGS_NONE, + GIT_REMOTE_DOWNLOAD_TAGS_ALL, + } +} + +git_enum! { + pub enum git_fetch_prune_t { + GIT_FETCH_PRUNE_UNSPECIFIED, + GIT_FETCH_PRUNE, + GIT_FETCH_NO_PRUNE, + } +} + +git_enum! { + pub enum git_remote_completion_type { + GIT_REMOTE_COMPLETION_DOWNLOAD, + GIT_REMOTE_COMPLETION_INDEXING, + GIT_REMOTE_COMPLETION_ERROR, + } +} + +pub type git_transport_message_cb = extern fn(*const c_char, c_int, + *mut c_void) -> c_int; +pub type git_cred_acquire_cb = extern fn(*mut *mut git_cred, + *const c_char, *const c_char, + c_uint, *mut c_void) -> c_int; +pub type git_transfer_progress_cb = extern fn(*const git_transfer_progress, + *mut c_void) -> c_int; +pub type git_packbuilder_progress = extern fn(c_int, c_uint, c_uint, + *mut c_void) -> c_int; +pub type git_push_transfer_progress = extern fn(c_uint, c_uint, size_t, + *mut c_void) -> c_int; +pub type git_transport_certificate_check_cb = extern fn(*mut git_cert, + c_int, + *const c_char, + *mut c_void) -> c_int; +pub type git_push_negotiation = extern fn(*mut *const git_push_update, + size_t, + *mut c_void) -> c_int; + +#[repr(C)] +pub struct git_push_update { + pub src_refname: *mut c_char, + pub dst_refname: *mut c_char, + pub src: git_oid, + pub dst: git_oid, +} + +git_enum! { + pub enum git_cert_t { + GIT_CERT_NONE, + GIT_CERT_X509, + GIT_CERT_HOSTKEY_LIBSSH2, + } +} + +#[repr(C)] +pub struct git_cert { + pub cert_type: git_cert_t, +} + +#[repr(C)] +pub struct git_cert_hostkey { + pub parent: git_cert, + pub kind: git_cert_ssh_t, + pub hash_md5: [u8; 16], + pub hash_sha1: [u8; 20], +} + +#[repr(C)] +pub struct git_cert_x509 { + pub parent: git_cert, + pub data: *mut c_void, + pub len: size_t, +} + +git_enum! { + pub enum git_cert_ssh_t { + GIT_CERT_SSH_MD5 = 1 << 0, + GIT_CERT_SSH_SHA1 = 1 << 1, + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct git_transfer_progress { + pub total_objects: c_uint, + pub indexed_objects: c_uint, + pub received_objects: c_uint, + pub local_objects: c_uint, + pub total_deltas: c_uint, + pub indexed_deltas: c_uint, + pub received_bytes: size_t, +} + +#[repr(C)] +pub struct git_diff_file { + pub id: git_oid, + pub path: *const c_char, + pub size: git_off_t, + pub flags: u32, + pub mode: u16, +} + +pub type git_repository_create_cb = extern fn(*mut *mut git_repository, + *const c_char, + c_int, *mut c_void) -> c_int; +pub type git_remote_create_cb = extern fn(*mut *mut git_remote, + *mut git_repository, + *const c_char, + *const c_char, + *mut c_void) -> c_int; + +git_enum! { + pub enum git_checkout_notify_t { + GIT_CHECKOUT_NOTIFY_NONE = 0, + GIT_CHECKOUT_NOTIFY_CONFLICT = (1 << 0), + GIT_CHECKOUT_NOTIFY_DIRTY = (1 << 1), + GIT_CHECKOUT_NOTIFY_UPDATED = (1 << 2), + GIT_CHECKOUT_NOTIFY_UNTRACKED = (1 << 3), + GIT_CHECKOUT_NOTIFY_IGNORED = (1 << 4), + + GIT_CHECKOUT_NOTIFY_ALL = 0x0FFFF, + } +} + +git_enum! { + pub enum git_status_t { + GIT_STATUS_CURRENT = 0, + + GIT_STATUS_INDEX_NEW = (1 << 0), + GIT_STATUS_INDEX_MODIFIED = (1 << 1), + GIT_STATUS_INDEX_DELETED = (1 << 2), + GIT_STATUS_INDEX_RENAMED = (1 << 3), + GIT_STATUS_INDEX_TYPECHANGE = (1 << 4), + + GIT_STATUS_WT_NEW = (1 << 7), + GIT_STATUS_WT_MODIFIED = (1 << 8), + GIT_STATUS_WT_DELETED = (1 << 9), + GIT_STATUS_WT_TYPECHANGE = (1 << 10), + GIT_STATUS_WT_RENAMED = (1 << 11), + GIT_STATUS_WT_UNREADABLE = (1 << 12), + + GIT_STATUS_IGNORED = (1 << 14), + GIT_STATUS_CONFLICTED = (1 << 15), + } +} + +git_enum! { + pub enum git_status_opt_t { + GIT_STATUS_OPT_INCLUDE_UNTRACKED = (1 << 0), + GIT_STATUS_OPT_INCLUDE_IGNORED = (1 << 1), + GIT_STATUS_OPT_INCLUDE_UNMODIFIED = (1 << 2), + GIT_STATUS_OPT_EXCLUDE_SUBMODULES = (1 << 3), + GIT_STATUS_OPT_RECURSE_UNTRACKED_DIRS = (1 << 4), + GIT_STATUS_OPT_DISABLE_PATHSPEC_MATCH = (1 << 5), + GIT_STATUS_OPT_RECURSE_IGNORED_DIRS = (1 << 6), + GIT_STATUS_OPT_RENAMES_HEAD_TO_INDEX = (1 << 7), + GIT_STATUS_OPT_RENAMES_INDEX_TO_WORKDIR = (1 << 8), + GIT_STATUS_OPT_SORT_CASE_SENSITIVELY = (1 << 9), + GIT_STATUS_OPT_SORT_CASE_INSENSITIVELY = (1 << 10), + + GIT_STATUS_OPT_RENAMES_FROM_REWRITES = (1 << 11), + GIT_STATUS_OPT_NO_REFRESH = (1 << 12), + GIT_STATUS_OPT_UPDATE_INDEX = (1 << 13), + GIT_STATUS_OPT_INCLUDE_UNREADABLE = (1 << 14), + GIT_STATUS_OPT_INCLUDE_UNREADABLE_AS_UNTRACKED = (1 << 15), + } +} + +git_enum! { + pub enum git_status_show_t { + GIT_STATUS_SHOW_INDEX_AND_WORKDIR = 0, + GIT_STATUS_SHOW_INDEX_ONLY = 1, + GIT_STATUS_SHOW_WORKDIR_ONLY = 2, + } +} + +git_enum! { + pub enum git_delta_t { + GIT_DELTA_UNMODIFIED, + GIT_DELTA_ADDED, + GIT_DELTA_DELETED, + GIT_DELTA_MODIFIED, + GIT_DELTA_RENAMED, + GIT_DELTA_COPIED, + GIT_DELTA_IGNORED, + GIT_DELTA_UNTRACKED, + GIT_DELTA_TYPECHANGE, + GIT_DELTA_UNREADABLE, + GIT_DELTA_CONFLICTED, + } +} + +#[repr(C)] +pub struct git_status_options { + pub version: c_uint, + pub show: git_status_show_t, + pub flags: c_uint, + pub pathspec: git_strarray, +} + +#[repr(C)] +pub struct git_diff_delta { + pub status: git_delta_t, + pub flags: u32, + pub similarity: u16, + pub nfiles: u16, + pub old_file: git_diff_file, + pub new_file: git_diff_file, +} + +#[repr(C)] +pub struct git_status_entry { + pub status: git_status_t, + pub head_to_index: *mut git_diff_delta, + pub index_to_workdir: *mut git_diff_delta +} + +git_enum! { + pub enum git_checkout_strategy_t { + GIT_CHECKOUT_NONE = 0, + GIT_CHECKOUT_SAFE = (1 << 0), + GIT_CHECKOUT_FORCE = (1 << 1), + GIT_CHECKOUT_ALLOW_CONFLICTS = (1 << 4), + GIT_CHECKOUT_REMOVE_UNTRACKED = (1 << 5), + GIT_CHECKOUT_REMOVE_IGNORED = (1 << 6), + GIT_CHECKOUT_UPDATE_ONLY = (1 << 7), + GIT_CHECKOUT_DONT_UPDATE_INDEX = (1 << 8), + GIT_CHECKOUT_NO_REFRESH = (1 << 9), + GIT_CHECKOUT_SKIP_UNMERGED = (1 << 10), + GIT_CHECKOUT_USE_OURS = (1 << 11), + GIT_CHECKOUT_USE_THEIRS = (1 << 12), + GIT_CHECKOUT_DISABLE_PATHSPEC_MATCH = (1 << 13), + GIT_CHECKOUT_SKIP_LOCKED_DIRECTORIES = (1 << 18), + GIT_CHECKOUT_DONT_OVERWRITE_IGNORED = (1 << 19), + GIT_CHECKOUT_CONFLICT_STYLE_MERGE = (1 << 20), + GIT_CHECKOUT_CONFLICT_STYLE_DIFF3 = (1 << 21), + + GIT_CHECKOUT_UPDATE_SUBMODULES = (1 << 16), + GIT_CHECKOUT_UPDATE_SUBMODULES_IF_CHANGED = (1 << 17), + } +} + +git_enum! { + pub enum git_reset_t { + GIT_RESET_SOFT = 1, + GIT_RESET_MIXED = 2, + GIT_RESET_HARD = 3, + } +} + +git_enum! { + pub enum git_otype: c_int { + GIT_OBJ_ANY = -2, + GIT_OBJ_BAD = -1, + GIT_OBJ__EXT1 = 0, + GIT_OBJ_COMMIT = 1, + GIT_OBJ_TREE = 2, + GIT_OBJ_BLOB = 3, + GIT_OBJ_TAG = 4, + GIT_OBJ__EXT2 = 5, + GIT_OBJ_OFS_DELTA = 6, + GIT_OBJ_REF_DELTA = 7, + } +} + +git_enum! { + pub enum git_ref_t { + GIT_REF_INVALID = 0, + GIT_REF_OID = 1, + GIT_REF_SYMBOLIC = 2, + GIT_REF_LISTALL = GIT_REF_OID | GIT_REF_SYMBOLIC, + } +} + +git_enum! { + pub enum git_filemode_t { + GIT_FILEMODE_UNREADABLE = 0o000000, + GIT_FILEMODE_TREE = 0o040000, + GIT_FILEMODE_BLOB = 0o100644, + GIT_FILEMODE_BLOB_EXECUTABLE = 0o100755, + GIT_FILEMODE_LINK = 0o120000, + GIT_FILEMODE_COMMIT = 0o160000, + } +} + +git_enum! { + pub enum git_treewalk_mode { + GIT_TREEWALK_PRE = 0, + GIT_TREEWALK_POST = 1, + } +} + +pub type git_treewalk_cb = extern fn(*const c_char, *const git_tree_entry, + *mut c_void) -> c_int; +pub type git_treebuilder_filter_cb = extern fn(*const git_tree_entry, + *mut c_void) -> c_int; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct git_buf { + pub ptr: *mut c_char, + pub asize: size_t, + pub size: size_t, +} + +git_enum! { + pub enum git_branch_t { + GIT_BRANCH_LOCAL = 1, + GIT_BRANCH_REMOTE = 2, + GIT_BRANCH_ALL = GIT_BRANCH_LOCAL | GIT_BRANCH_REMOTE, + } +} + +pub const GIT_BLAME_NORMAL: u32 = 0; +pub const GIT_BLAME_TRACK_COPIES_SAME_FILE: u32 = 1<<0; +pub const GIT_BLAME_TRACK_COPIES_SAME_COMMIT_MOVES: u32 = 1<<1; +pub const GIT_BLAME_TRACK_COPIES_SAME_COMMIT_COPIES: u32 = 1<<2; +pub const GIT_BLAME_TRACK_COPIES_ANY_COMMIT_COPIES: u32 = 1<<3; +pub const GIT_BLAME_FIRST_PARENT: u32 = 1<<4; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct git_blame_options { + pub version: c_uint, + + pub flags: u32, + pub min_match_characters: u16, + pub newest_commit: git_oid, + pub oldest_commit: git_oid, + pub min_line: usize, + pub max_line: usize, +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct git_blame_hunk { + pub lines_in_hunk: usize, + pub final_commit_id: git_oid, + pub final_start_line_number: usize, + pub final_signature: *mut git_signature, + pub orig_commit_id: git_oid, + pub orig_path: *const c_char, + pub orig_start_line_number: usize, + pub orig_signature: *mut git_signature, + pub boundary: c_char, +} + +pub type git_index_matched_path_cb = extern fn(*const c_char, *const c_char, + *mut c_void) -> c_int; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct git_index_entry { + pub ctime: git_index_time, + pub mtime: git_index_time, + pub dev: u32, + pub ino: u32, + pub mode: u32, + pub uid: u32, + pub gid: u32, + pub file_size: u32, + pub id: git_oid, + pub flags: u16, + pub flags_extended: u16, + pub path: *const c_char, +} + +#[repr(C)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct git_index_time { + pub seconds: i32, + pub nanoseconds: u32, +} + +#[repr(C)] +pub struct git_config_entry { + pub name: *const c_char, + pub value: *const c_char, + pub level: git_config_level_t, + pub free: extern fn(*mut git_config_entry), + pub payload: *mut c_void, +} + +git_enum! { + pub enum git_config_level_t: c_int { + GIT_CONFIG_LEVEL_PROGRAMDATA = 1, + GIT_CONFIG_LEVEL_SYSTEM = 2, + GIT_CONFIG_LEVEL_XDG = 3, + GIT_CONFIG_LEVEL_GLOBAL = 4, + GIT_CONFIG_LEVEL_LOCAL = 5, + GIT_CONFIG_LEVEL_APP = 6, + GIT_CONFIG_HIGHEST_LEVEL = -1, + } +} + +git_enum! { + pub enum git_submodule_update_t { + GIT_SUBMODULE_UPDATE_CHECKOUT = 1, + GIT_SUBMODULE_UPDATE_REBASE = 2, + GIT_SUBMODULE_UPDATE_MERGE = 3, + GIT_SUBMODULE_UPDATE_NONE = 4, + GIT_SUBMODULE_UPDATE_DEFAULT = 0, + } +} + +git_enum! { + pub enum git_submodule_ignore_t: c_int { + GIT_SUBMODULE_IGNORE_UNSPECIFIED = -1, + + GIT_SUBMODULE_IGNORE_NONE = 1, + GIT_SUBMODULE_IGNORE_UNTRACKED = 2, + GIT_SUBMODULE_IGNORE_DIRTY = 3, + GIT_SUBMODULE_IGNORE_ALL = 4, + } +} + +pub type git_submodule_cb = extern fn(*mut git_submodule, + *const c_char, + *mut c_void) -> c_int; + +#[repr(C)] +pub struct git_cred { + pub credtype: git_credtype_t, + pub free: extern fn(*mut git_cred), +} + +git_enum! { + pub enum git_credtype_t { + GIT_CREDTYPE_USERPASS_PLAINTEXT = 1 << 0, + GIT_CREDTYPE_SSH_KEY = 1 << 1, + GIT_CREDTYPE_SSH_CUSTOM = 1 << 2, + GIT_CREDTYPE_DEFAULT = 1 << 3, + GIT_CREDTYPE_SSH_INTERACTIVE = 1 << 4, + GIT_CREDTYPE_USERNAME = 1 << 5, + GIT_CREDTYPE_SSH_MEMORY = 1 << 6, + } +} + +pub type git_cred_ssh_interactive_callback = extern fn( + name: *const c_char, + name_len: c_int, + instruction: *const c_char, + instruction_len: c_int, + num_prompts: c_int, + prompts: *const LIBSSH2_USERAUTH_KBDINT_PROMPT, + responses: *mut LIBSSH2_USERAUTH_KBDINT_RESPONSE, + abstrakt: *mut *mut c_void +); + +pub type git_cred_sign_callback = extern fn( + session: *mut LIBSSH2_SESSION, + sig: *mut *mut c_uchar, + sig_len: *mut size_t, + data: *const c_uchar, + data_len: size_t, + abstrakt: *mut *mut c_void, +); + +pub enum LIBSSH2_SESSION {} +pub enum LIBSSH2_USERAUTH_KBDINT_PROMPT {} +pub enum LIBSSH2_USERAUTH_KBDINT_RESPONSE {} + +#[repr(C)] +pub struct git_push_options { + pub version: c_uint, + pub pb_parallelism: c_uint, + pub callbacks: git_remote_callbacks, + pub custom_headers: git_strarray, +} + +pub type git_tag_foreach_cb = extern fn(name: *const c_char, + oid: *mut git_oid, + payload: *mut c_void) -> c_int; + +git_enum! { + pub enum git_index_add_option_t { + GIT_INDEX_ADD_DEFAULT = 0, + GIT_INDEX_ADD_FORCE = 1 << 0, + GIT_INDEX_ADD_DISABLE_PATHSPEC_MATCH = 1 << 1, + GIT_INDEX_ADD_CHECK_PATHSPEC = 1 << 2, + } +} + +git_enum! { + pub enum git_repository_open_flag_t { + GIT_REPOSITORY_OPEN_NO_SEARCH = (1 << 0), + GIT_REPOSITORY_OPEN_CROSS_FS = (1 << 1), + GIT_REPOSITORY_OPEN_BARE = (1 << 2), + } +} + +#[repr(C)] +pub struct git_repository_init_options { + pub version: c_uint, + pub flags: u32, + pub mode: u32, + pub workdir_path: *const c_char, + pub description: *const c_char, + pub template_path: *const c_char, + pub initial_head: *const c_char, + pub origin_url: *const c_char, +} + +pub const GIT_REPOSITORY_INIT_OPTIONS_VERSION: c_uint = 1; + +git_enum! { + pub enum git_repository_init_flag_t { + GIT_REPOSITORY_INIT_BARE = (1 << 0), + GIT_REPOSITORY_INIT_NO_REINIT = (1 << 1), + GIT_REPOSITORY_INIT_NO_DOTGIT_DIR = (1 << 2), + GIT_REPOSITORY_INIT_MKDIR = (1 << 3), + GIT_REPOSITORY_INIT_MKPATH = (1 << 4), + GIT_REPOSITORY_INIT_EXTERNAL_TEMPLATE = (1 << 5), + } +} + +git_enum! { + pub enum git_repository_init_mode_t { + GIT_REPOSITORY_INIT_SHARED_UMASK = 0, + GIT_REPOSITORY_INIT_SHARED_GROUP = 0o002775, + GIT_REPOSITORY_INIT_SHARED_ALL = 0o002777, + } +} + +git_enum! { + pub enum git_sort_t { + GIT_SORT_NONE = 0, + GIT_SORT_TOPOLOGICAL = (1 << 0), + GIT_SORT_TIME = (1 << 1), + GIT_SORT_REVERSE = (1 << 2), + } +} + +git_enum! { + pub enum git_submodule_status_t { + GIT_SUBMODULE_STATUS_IN_HEAD = 1 << 0, + GIT_SUBMODULE_STATUS_IN_INDEX = 1 << 1, + GIT_SUBMODULE_STATUS_IN_CONFIG = 1 << 2, + GIT_SUBMODULE_STATUS_IN_WD = 1 << 3, + GIT_SUBMODULE_STATUS_INDEX_ADDED = 1 << 4, + GIT_SUBMODULE_STATUS_INDEX_DELETED = 1 << 5, + GIT_SUBMODULE_STATUS_INDEX_MODIFIED = 1 << 6, + GIT_SUBMODULE_STATUS_WD_UNINITIALIZED = 1 << 7, + GIT_SUBMODULE_STATUS_WD_ADDED = 1 << 8, + GIT_SUBMODULE_STATUS_WD_DELETED = 1 << 9, + GIT_SUBMODULE_STATUS_WD_MODIFIED = 1 << 10, + GIT_SUBMODULE_STATUS_WD_INDEX_MODIFIED = 1 << 11, + GIT_SUBMODULE_STATUS_WD_WD_MODIFIED = 1 << 12, + GIT_SUBMODULE_STATUS_WD_UNTRACKED = 1 << 13, + } +} + +#[repr(C)] +pub struct git_remote_head { + pub local: c_int, + pub oid: git_oid, + pub loid: git_oid, + pub name: *mut c_char, + pub symref_target: *mut c_char, +} + +git_enum! { + pub enum git_pathspec_flag_t { + GIT_PATHSPEC_DEFAULT = 0, + GIT_PATHSPEC_IGNORE_CASE = 1 << 0, + GIT_PATHSPEC_USE_CASE = 1 << 1, + GIT_PATHSPEC_NO_GLOB = 1 << 2, + GIT_PATHSPEC_NO_MATCH_ERROR = 1 << 3, + GIT_PATHSPEC_FIND_FAILURES = 1 << 4, + GIT_PATHSPEC_FAILURES_ONLY = 1 << 5, + } +} + +pub type git_diff_file_cb = extern fn(*const git_diff_delta, f32, *mut c_void) + -> c_int; +pub type git_diff_hunk_cb = extern fn(*const git_diff_delta, + *const git_diff_hunk, + *mut c_void) -> c_int; +pub type git_diff_line_cb = extern fn(*const git_diff_delta, + *const git_diff_hunk, + *const git_diff_line, + *mut c_void) -> c_int; +pub type git_diff_binary_cb = extern fn(*const git_diff_delta, + *const git_diff_binary, + *mut c_void) -> c_int; + +#[repr(C)] +pub struct git_diff_hunk { + pub old_start: c_int, + pub old_lines: c_int, + pub new_start: c_int, + pub new_lines: c_int, + pub header_len: size_t, + pub header: [c_char; 128], +} + +git_enum! { + pub enum git_diff_line_t { + GIT_DIFF_LINE_CONTEXT = b' ' as git_diff_line_t, + GIT_DIFF_LINE_ADDITION = b'+' as git_diff_line_t, + GIT_DIFF_LINE_DELETION = b'-' as git_diff_line_t, + GIT_DIFF_LINE_CONTEXT_EOFNL = b'=' as git_diff_line_t, + GIT_DIFF_LINE_ADD_EOFNL = b'>' as git_diff_line_t, + GIT_DIFF_LINE_DEL_EOFNL = b'<' as git_diff_line_t, + GIT_DIFF_LINE_FILE_HDR = b'F' as git_diff_line_t, + GIT_DIFF_LINE_HUNK_HDR = b'H' as git_diff_line_t, + GIT_DIFF_LINE_BINARY = b'B' as git_diff_line_t, + } +} + +#[repr(C)] +pub struct git_diff_line { + pub origin: c_char, + pub old_lineno: c_int, + pub new_lineno: c_int, + pub num_lines: c_int, + pub content_len: size_t, + pub content_offset: git_off_t, + pub content: *const c_char, +} + +#[repr(C)] +pub struct git_diff_options { + pub version: c_uint, + pub flags: u32, + pub ignore_submodules: git_submodule_ignore_t, + pub pathspec: git_strarray, + pub notify_cb: git_diff_notify_cb, + pub progress_cb: git_diff_progress_cb, + pub payload: *mut c_void, + pub context_lines: u32, + pub interhunk_lines: u32, + pub id_abbrev: u16, + pub max_size: git_off_t, + pub old_prefix: *const c_char, + pub new_prefix: *const c_char, +} + +git_enum! { + pub enum git_diff_format_t { + GIT_DIFF_FORMAT_PATCH = 1, + GIT_DIFF_FORMAT_PATCH_HEADER = 2, + GIT_DIFF_FORMAT_RAW = 3, + GIT_DIFF_FORMAT_NAME_ONLY = 4, + GIT_DIFF_FORMAT_NAME_STATUS = 5, + } +} + +git_enum! { + pub enum git_diff_stats_format_t { + GIT_DIFF_STATS_NONE = 0, + GIT_DIFF_STATS_FULL = 1 << 0, + GIT_DIFF_STATS_SHORT = 1 << 1, + GIT_DIFF_STATS_NUMBER = 1 << 2, + GIT_DIFF_STATS_INCLUDE_SUMMARY = 1 << 3, + } +} + +pub type git_diff_notify_cb = extern fn(*const git_diff, + *const git_diff_delta, + *const c_char, + *mut c_void) -> c_int; + +pub type git_diff_progress_cb = extern fn (*const git_diff, + *const c_char, + *const c_char, + *mut c_void) -> c_int; + +pub const GIT_DIFF_NORMAL: u32 = 0; +pub const GIT_DIFF_REVERSE: u32 = 1 << 0; +pub const GIT_DIFF_INCLUDE_IGNORED: u32 = 1 << 1; +pub const GIT_DIFF_RECURSE_IGNORED_DIRS: u32 = 1 << 2; +pub const GIT_DIFF_INCLUDE_UNTRACKED: u32 = 1 << 3; +pub const GIT_DIFF_RECURSE_UNTRACKED_DIRS: u32 = 1 << 4; +pub const GIT_DIFF_INCLUDE_UNMODIFIED: u32 = 1 << 5; +pub const GIT_DIFF_INCLUDE_TYPECHANGE: u32 = 1 << 6; +pub const GIT_DIFF_INCLUDE_TYPECHANGE_TREES: u32 = 1 << 7; +pub const GIT_DIFF_IGNORE_FILEMODE: u32 = 1 << 8; +pub const GIT_DIFF_IGNORE_SUBMODULES: u32 = 1 << 9; +pub const GIT_DIFF_IGNORE_CASE: u32 = 1 << 10; +pub const GIT_DIFF_DISABLE_PATHSPEC_MATCH: u32 = 1 << 12; +pub const GIT_DIFF_SKIP_BINARY_CHECK: u32 = 1 << 13; +pub const GIT_DIFF_ENABLE_FAST_UNTRACKED_DIRS: u32 = 1 << 14; +pub const GIT_DIFF_UPDATE_INDEX: u32 = 1 << 15; +pub const GIT_DIFF_INCLUDE_UNREADABLE: u32 = 1 << 16; +pub const GIT_DIFF_INCLUDE_UNREADABLE_AS_UNTRACKED: u32 = 1 << 17; +pub const GIT_DIFF_FORCE_TEXT: u32 = 1 << 20; +pub const GIT_DIFF_FORCE_BINARY: u32 = 1 << 21; +pub const GIT_DIFF_IGNORE_WHITESPACE: u32 = 1 << 22; +pub const GIT_DIFF_IGNORE_WHITESPACE_CHANGE: u32 = 1 << 23; +pub const GIT_DIFF_IGNORE_WHITESPACE_EOL: u32 = 1 << 24; +pub const GIT_DIFF_SHOW_UNTRACKED_CONTENT: u32 = 1 << 25; +pub const GIT_DIFF_SHOW_UNMODIFIED: u32 = 1 << 26; +pub const GIT_DIFF_PATIENCE: u32 = 1 << 28; +pub const GIT_DIFF_MINIMAL: u32 = 1 << 29; +pub const GIT_DIFF_SHOW_BINARY: u32 = 1 << 30; + +#[repr(C)] +pub struct git_diff_find_options { + pub version: c_uint, + pub flags: u32, + pub rename_threshold: u16, + pub rename_from_rewrite_threshold: u16, + pub copy_threshold: u16, + pub break_rewrite_threshold: u16, + pub rename_limit: size_t, + pub metric: *mut git_diff_similarity_metric, +} + +#[repr(C)] +pub struct git_diff_similarity_metric { + pub file_signature: extern fn(*mut *mut c_void, + *const git_diff_file, + *const c_char, + *mut c_void) -> c_int, + pub buffer_signature: extern fn(*mut *mut c_void, + *const git_diff_file, + *const c_char, + size_t, + *mut c_void) -> c_int, + pub free_signature: extern fn(*mut c_void, *mut c_void), + pub similarity: extern fn(*mut c_int, *mut c_void, *mut c_void, + *mut c_void) -> c_int, + pub payload: *mut c_void, +} + +pub const GIT_DIFF_FIND_OPTIONS_VERSION: c_uint = 1; + +pub const GIT_DIFF_FIND_BY_CONFIG: u32 = 0; +pub const GIT_DIFF_FIND_RENAMES: u32 = 1 << 0; +pub const GIT_DIFF_FIND_RENAMES_FROM_REWRITES: u32 = 1 << 1; +pub const GIT_DIFF_FIND_COPIES: u32 = 1 << 2; +pub const GIT_DIFF_FIND_COPIES_FROM_UNMODIFIED: u32 = 1 << 3; +pub const GIT_DIFF_FIND_REWRITES: u32 = 1 << 4; +pub const GIT_DIFF_BREAK_REWRITES: u32 = 1 << 5; +pub const GIT_DIFF_FIND_AND_BREAK_REWRITES: u32 = + GIT_DIFF_FIND_REWRITES | GIT_DIFF_BREAK_REWRITES; +pub const GIT_DIFF_FIND_FOR_UNTRACKED: u32 = 1 << 6; +pub const GIT_DIFF_FIND_ALL: u32 = 0x0ff; +pub const GIT_DIFF_FIND_IGNORE_LEADING_WHITESPACE: u32 = 0; +pub const GIT_DIFF_FIND_IGNORE_WHITESPACE: u32 = 1 << 12; +pub const GIT_DIFF_FIND_DONT_IGNORE_WHITESPACE: u32 = 1 << 13; +pub const GIT_DIFF_FIND_EXACT_MATCH_ONLY: u32 = 1 << 14; +pub const GIT_DIFF_BREAK_REWRITES_FOR_RENAMES_ONLY : u32 = 1 << 15; +pub const GIT_DIFF_FIND_REMOVE_UNMODIFIED: u32 = 1 << 16; + +#[repr(C)] +pub struct git_diff_binary { + pub old_file: git_diff_binary_file, + pub new_file: git_diff_binary_file, +} + +#[repr(C)] +pub struct git_diff_binary_file { + pub kind: git_diff_binary_t, + pub data: *const c_char, + pub datalen: size_t, + pub inflatedlen: size_t, +} + +git_enum! { + pub enum git_diff_binary_t { + GIT_DIFF_BINARY_NONE, + GIT_DIFF_BINARY_LITERAL, + GIT_DIFF_BINARY_DELTA, + } +} + +#[repr(C)] +pub struct git_merge_options { + pub version: c_uint, + pub flags: git_merge_flag_t, + pub rename_threshold: c_uint, + pub target_limit: c_uint, + pub metric: *mut git_diff_similarity_metric, + pub recursion_limit: c_uint, + pub file_favor: git_merge_file_favor_t, + pub file_flags: git_merge_file_flag_t, +} + +git_enum! { + pub enum git_merge_flag_t { + GIT_MERGE_FIND_RENAMES = 1 << 0, + GIT_MERGE_FAIL_ON_CONFLICT = 1 << 1, + GIT_MERGE_SKIP_REUC = 1 << 2, + GIT_MERGE_NO_RECURSIVE = 1 << 3, + } +} + +git_enum! { + pub enum git_merge_file_favor_t { + GIT_MERGE_FILE_FAVOR_NORMAL = 0, + GIT_MERGE_FILE_FAVOR_OURS = 1, + GIT_MERGE_FILE_FAVOR_THEIRS = 2, + GIT_MERGE_FILE_FAVOR_UNION = 3, + } +} + +git_enum! { + pub enum git_merge_file_flag_t { + GIT_MERGE_FILE_DEFAULT = 0, + GIT_MERGE_FILE_STYLE_MERGE = (1 << 0), + GIT_MERGE_FILE_STYLE_DIFF3 = (1 << 1), + GIT_MERGE_FILE_SIMPLIFY_ALNUM = (1 << 2), + GIT_MERGE_FILE_IGNORE_WHITESPACE = (1 << 3), + GIT_MERGE_FILE_IGNORE_WHITESPACE_CHANGE = (1 << 4), + GIT_MERGE_FILE_IGNORE_WHITESPACE_EOL = (1 << 5), + GIT_MERGE_FILE_DIFF_PATIENCE = (1 << 6), + GIT_MERGE_FILE_DIFF_MINIMAL = (1 << 7), + } +} + +pub type git_transport_cb = extern fn(out: *mut *mut git_transport, + owner: *mut git_remote, + param: *mut c_void) -> c_int; + +#[repr(C)] +pub struct git_transport { + pub version: c_uint, + pub set_callbacks: extern fn(*mut git_transport, + git_transport_message_cb, + git_transport_message_cb, + git_transport_certificate_check_cb, + *mut c_void) -> c_int, + pub set_custom_headers: extern fn(*mut git_transport, + *const git_strarray) -> c_int, + pub connect: extern fn(*mut git_transport, + *const c_char, + git_cred_acquire_cb, + *mut c_void, + c_int, c_int) -> c_int, + pub ls: extern fn(*mut *mut *const git_remote_head, + *mut size_t, + *mut git_transport) -> c_int, + pub push: extern fn(*mut git_transport, + *mut git_push, + *const git_remote_callbacks) -> c_int, + pub negotiate_fetch: extern fn(*mut git_transport, + *mut git_repository, + *const *const git_remote_head, + size_t) -> c_int, + pub download_pack: extern fn(*mut git_transport, + *mut git_repository, + *mut git_transfer_progress, + git_transfer_progress_cb, + *mut c_void) -> c_int, + pub is_connected: extern fn(*mut git_transport) -> c_int, + pub read_flags: extern fn(*mut git_transport, *mut c_int) -> c_int, + pub cancel: extern fn(*mut git_transport), + pub close: extern fn(*mut git_transport) -> c_int, + pub free: extern fn(*mut git_transport), +} + +git_enum! { + pub enum git_smart_service_t { + GIT_SERVICE_UPLOADPACK_LS = 1, + GIT_SERVICE_UPLOADPACK = 2, + GIT_SERVICE_RECEIVEPACK_LS = 3, + GIT_SERVICE_RECEIVEPACK = 4, + } +} + +#[repr(C)] +pub struct git_smart_subtransport_stream { + pub subtransport: *mut git_smart_subtransport, + pub read: extern fn(*mut git_smart_subtransport_stream, + *mut c_char, + size_t, + *mut size_t) -> c_int, + pub write: extern fn(*mut git_smart_subtransport_stream, + *const c_char, + size_t) -> c_int, + pub free: extern fn(*mut git_smart_subtransport_stream), +} + +#[repr(C)] +pub struct git_smart_subtransport { + pub action: extern fn(*mut *mut git_smart_subtransport_stream, + *mut git_smart_subtransport, + *const c_char, + git_smart_service_t) -> c_int, + pub close: extern fn(*mut git_smart_subtransport) -> c_int, + pub free: extern fn(*mut git_smart_subtransport), +} + +pub type git_smart_subtransport_cb = extern fn(*mut *mut git_smart_subtransport, + *mut git_transport, + *mut c_void) -> c_int; + +#[repr(C)] +pub struct git_smart_subtransport_definition { + pub callback: git_smart_subtransport_cb, + pub rpc: c_uint, + pub param: *mut c_void, +} + +#[repr(C)] +pub struct git_describe_options { + pub version: c_uint, + pub max_candidates_tags: c_uint, + pub describe_strategy: c_uint, + pub pattern: *const c_char, + pub only_follow_first_parent: c_int, + pub show_commit_oid_as_fallback: c_int, +} + +git_enum! { + pub enum git_describe_strategy_t { + GIT_DESCRIBE_DEFAULT, + GIT_DESCRIBE_TAGS, + GIT_DESCRIBE_ALL, + } +} + +#[repr(C)] +pub struct git_describe_format_options { + pub version: c_uint, + pub abbreviated_size: c_uint, + pub always_use_long_format: c_int, + pub dirty_suffix: *const c_char, +} + +/// Initialize openssl for the libgit2 library +#[cfg(all(unix, not(target_os = "macos"), not(target_os = "ios"), feature = "https"))] +pub fn openssl_init() { + if !cfg!(target_os = "linux") && !cfg!(target_os = "freebsd") { return } + + // Currently, libgit2 leverages OpenSSL for SSL support when cloning + // repositories over HTTPS. This means that we're picking up an OpenSSL + // dependency on non-Windows platforms (where it has its own HTTPS + // subsystem). As a result, we need to link to OpenSSL. + // + // Now actually *linking* to OpenSSL isn't so hard. We just need to make + // sure to use pkg-config to discover any relevant system dependencies for + // differences between distributions like CentOS and Ubuntu. The actual + // trickiness comes about when we start *distributing* the resulting + // binaries. Currently Cargo is distributed in binary form as nightlies, + // which means we're distributing a binary with OpenSSL linked in. + // + // For historical reasons, the Linux nightly builder is running a CentOS + // distribution in order to have as much ABI compatibility with other + // distributions as possible. Sadly, however, this compatibility does not + // extend to OpenSSL. Currently OpenSSL has two major versions, 0.9 and 1.0, + // which are incompatible (many ABI differences). The CentOS builder we + // build on has version 1.0, as do most distributions today. Some still have + // 0.9, however. This means that if we are to distribute the binaries built + // by the CentOS machine, we would only be compatible with OpenSSL 1.0 and + // we would fail to run (a dynamic linker error at runtime) on systems with + // only 9.8 installed (hopefully). + // + // But wait, the plot thickens! Apparently CentOS has dubbed their OpenSSL + // library as `libssl.so.10`, notably the `10` is included at the end. On + // the other hand Ubuntu, for example, only distributes `libssl.so`. This + // means that the binaries created at CentOS are hard-wired to probe for a + // file called `libssl.so.10` at runtime (using the LD_LIBRARY_PATH), which + // will not be found on ubuntu. The conclusion of this is that binaries + // built on CentOS cannot be distributed to Ubuntu and run successfully. + // + // There are a number of sneaky things we could do, including, but not + // limited to: + // + // 1. Create a shim program which runs "just before" cargo runs. The + // responsibility of this shim program would be to locate `libssl.so`, + // whatever it's called, on the current system, make sure there's a + // symlink *somewhere* called `libssl.so.10`, and then set up + // LD_LIBRARY_PATH and run the actual cargo. + // + // This approach definitely seems unconventional, and is borderline + // overkill for this problem. It's also dubious if we can find a + // libssl.so reliably on the target system. + // + // 2. Somehow re-work the CentOS installation so that the linked-against + // library is called libssl.so instead of libssl.so.10 + // + // The problem with this approach is that systems with 0.9 installed will + // start to silently fail, due to also having libraries called libssl.so + // (probably symlinked under a more appropriate version). + // + // 3. Compile Cargo against both OpenSSL 1.0 *and* OpenSSL 0.9, and + // distribute both. Also make sure that the linked-against name of the + // library is `libssl.so`. At runtime we determine which version is + // installed, and we then the appropriate binary. + // + // This approach clearly has drawbacks in terms of infrastructure and + // feasibility. + // + // 4. Build a nightly of Cargo for each distribution we'd like to support. + // You would then pick the appropriate Cargo nightly to install locally. + // + // So, with all this in mind, the decision was made to *statically* link + // OpenSSL. This solves any problem of relying on a downstream OpenSSL + // version being available. This does, however, open a can of worms related + // to security issues. It's generally a good idea to dynamically link + // OpenSSL as you'll get security updates over time without having to do + // anything (the system administrator will update the local openssl + // package). By statically linking, we're forfeiting this feature. + // + // The conclusion was made it is likely appropriate for the Cargo nightlies + // to statically link OpenSSL, but highly encourage distributions and + // packagers of Cargo to dynamically link OpenSSL. Packagers are targeting + // one system and are distributing to only that system, so none of the + // problems mentioned above would arise. + // + // In order to support this, a new package was made: openssl-static-sys. + // This package currently performs a fairly simple task: + // + // 1. Run pkg-config to discover where openssl is installed. + // 2. If openssl is installed in a nonstandard location, *and* static copies + // of the libraries are available, copy them to $OUT_DIR. + // + // This library will bring in libssl.a and libcrypto.a into the local build, + // allowing them to be picked up by this crate. This allows us to configure + // our own buildbots to have pkg-config point to these local pre-built + // copies of a static OpenSSL (with very few dependencies) while allowing + // most other builds of Cargo to naturally dynamically link OpenSSL. + // + // So in summary, if you're with me so far, we've statically linked OpenSSL + // to the Cargo binary (or any binary, for that matter) and we're ready to + // distribute it to *all* linux distributions. Remember that our original + // intent for openssl was for HTTPS support, which implies that we need some + // for of CA certificate store to validate certificates. This is normally + // installed in a standard system location. + // + // Unfortunately, as one might imagine, OpenSSL is configured for where this + // standard location is at *build time*, but it often varies widely + // per-system. Consequently, it was discovered that OpenSSL will respect the + // SSL_CERT_FILE and SSL_CERT_DIR environment variables in order to assist + // in discovering the location of this file (hurray!). + // + // So, finally getting to the point, this function solely exists to support + // our static builds of OpenSSL by probing for the "standard system + // location" of certificates and setting relevant environment variable to + // point to them. + // + // Ah, and as a final note, this is only a problem on Linux, not on OS X. On + // OS X the OpenSSL binaries are stable enough that we can just rely on + // dynamic linkage (plus they have some weird modifications to OpenSSL which + // means we wouldn't want to link statically). + openssl::probe::init_ssl_cert_env_vars(); +} + +#[cfg(any(windows, target_os = "macos", target_os = "ios", not(feature = "https")))] +pub fn openssl_init() {} + +extern { + // threads + pub fn git_libgit2_init() -> c_int; + pub fn git_libgit2_shutdown() -> c_int; + + // repository + pub fn git_repository_free(repo: *mut git_repository); + pub fn git_repository_open(repo: *mut *mut git_repository, + path: *const c_char) -> c_int; + pub fn git_repository_open_ext(repo: *mut *mut git_repository, + path: *const c_char, + flags: c_uint, + ceiling_dirs: *const c_char) -> c_int; + pub fn git_repository_init(repo: *mut *mut git_repository, + path: *const c_char, + is_bare: c_uint) -> c_int; + pub fn git_repository_init_ext(out: *mut *mut git_repository, + repo_path: *const c_char, + opts: *mut git_repository_init_options) + -> c_int; + pub fn git_repository_init_init_options(opts: *mut git_repository_init_options, + version: c_uint) -> c_int; + pub fn git_repository_get_namespace(repo: *mut git_repository) + -> *const c_char; + pub fn git_repository_head(out: *mut *mut git_reference, + repo: *mut git_repository) -> c_int; + pub fn git_repository_set_head(repo: *mut git_repository, + refname: *const c_char) -> c_int; + pub fn git_repository_set_head_detached(repo: *mut git_repository, + commitish: *const git_oid) -> c_int; + pub fn git_repository_is_bare(repo: *mut git_repository) -> c_int; + pub fn git_repository_is_empty(repo: *mut git_repository) -> c_int; + pub fn git_repository_is_shallow(repo: *mut git_repository) -> c_int; + pub fn git_repository_path(repo: *mut git_repository) -> *const c_char; + pub fn git_repository_state(repo: *mut git_repository) -> c_int; + pub fn git_repository_workdir(repo: *mut git_repository) -> *const c_char; + pub fn git_repository_index(out: *mut *mut git_index, + repo: *mut git_repository) -> c_int; + pub fn git_repository_config(out: *mut *mut git_config, + repo: *mut git_repository) -> c_int; + pub fn git_repository_config_snapshot(out: *mut *mut git_config, + repo: *mut git_repository) -> c_int; + pub fn git_repository_discover(out: *mut git_buf, + start_path: *const c_char, + across_fs: c_int, + ceiling_dirs: *const c_char) -> c_int; + + // revparse + pub fn git_revparse(revspec: *mut git_revspec, + repo: *mut git_repository, + spec: *const c_char) -> c_int; + pub fn git_revparse_single(out: *mut *mut git_object, + repo: *mut git_repository, + spec: *const c_char) -> c_int; + pub fn git_revparse_ext(object_out: *mut *mut git_object, + reference_out: *mut *mut git_reference, + repo: *mut git_repository, + spec: *const c_char) -> c_int; + + // object + pub fn git_object_dup(dest: *mut *mut git_object, + source: *mut git_object) -> c_int; + pub fn git_object_id(obj: *const git_object) -> *const git_oid; + pub fn git_object_free(object: *mut git_object); + pub fn git_object_lookup(dest: *mut *mut git_object, + repo: *mut git_repository, + id: *const git_oid, + kind: git_otype) -> c_int; + pub fn git_object_type(obj: *const git_object) -> git_otype; + pub fn git_object_peel(peeled: *mut *mut git_object, + object: *const git_object, + target_type: git_otype) -> c_int; + pub fn git_object_short_id(out: *mut git_buf, + obj: *const git_object) -> c_int; + pub fn git_object_type2string(kind: git_otype) -> *const c_char; + pub fn git_object_string2type(s: *const c_char) -> git_otype; + pub fn git_object_typeisloose(kind: git_otype) -> c_int; + + // oid + pub fn git_oid_fromraw(out: *mut git_oid, raw: *const c_uchar); + pub fn git_oid_fromstrn(out: *mut git_oid, str: *const c_char, + len: size_t) -> c_int; + pub fn git_oid_tostr(out: *mut c_char, n: size_t, + id: *const git_oid) -> *mut c_char; + pub fn git_oid_cmp(a: *const git_oid, b: *const git_oid) -> c_int; + pub fn git_oid_equal(a: *const git_oid, b: *const git_oid) -> c_int; + pub fn git_oid_streq(id: *const git_oid, str: *const c_char) -> c_int; + pub fn git_oid_iszero(id: *const git_oid) -> c_int; + + // giterr + pub fn giterr_last() -> *const git_error; + pub fn giterr_clear(); + pub fn giterr_set_str(error_class: c_int, string: *const c_char); + + // remote + pub fn git_remote_create(out: *mut *mut git_remote, + repo: *mut git_repository, + name: *const c_char, + url: *const c_char) -> c_int; + pub fn git_remote_lookup(out: *mut *mut git_remote, + repo: *mut git_repository, + name: *const c_char) -> c_int; + pub fn git_remote_create_anonymous(out: *mut *mut git_remote, + repo: *mut git_repository, + url: *const c_char) -> c_int; + pub fn git_remote_delete(repo: *mut git_repository, + name: *const c_char) -> c_int; + pub fn git_remote_free(remote: *mut git_remote); + pub fn git_remote_name(remote: *const git_remote) -> *const c_char; + pub fn git_remote_pushurl(remote: *const git_remote) -> *const c_char; + pub fn git_remote_refspec_count(remote: *const git_remote) -> size_t; + pub fn git_remote_url(remote: *const git_remote) -> *const c_char; + pub fn git_remote_connect(remote: *mut git_remote, + dir: git_direction, + callbacks: *const git_remote_callbacks, + custom_headers: *const git_strarray) -> c_int; + pub fn git_remote_connected(remote: *const git_remote) -> c_int; + pub fn git_remote_disconnect(remote: *mut git_remote); + pub fn git_remote_add_fetch(repo: *mut git_repository, + remote: *const c_char, + refspec: *const c_char) -> c_int; + pub fn git_remote_add_push(repo: *mut git_repository, + remote: *const c_char, + refspec: *const c_char) -> c_int; + pub fn git_remote_download(remote: *mut git_remote, + refspecs: *const git_strarray, + opts: *const git_fetch_options) -> c_int; + pub fn git_remote_stop(remote: *mut git_remote); + pub fn git_remote_dup(dest: *mut *mut git_remote, + source: *mut git_remote) -> c_int; + pub fn git_remote_get_fetch_refspecs(array: *mut git_strarray, + remote: *const git_remote) -> c_int; + pub fn git_remote_get_refspec(remote: *const git_remote, + n: size_t) -> *const git_refspec; + pub fn git_remote_is_valid_name(remote_name: *const c_char) -> c_int; + pub fn git_remote_list(out: *mut git_strarray, + repo: *mut git_repository) -> c_int; + pub fn git_remote_rename(problems: *mut git_strarray, + repo: *mut git_repository, + name: *const c_char, + new_name: *const c_char) -> c_int; + pub fn git_remote_fetch(remote: *mut git_remote, + refspecs: *const git_strarray, + opts: *const git_fetch_options, + reflog_message: *const c_char) -> c_int; + pub fn git_remote_push(remote: *mut git_remote, + refspecs: *const git_strarray, + opts: *const git_push_options) -> c_int; + pub fn git_remote_update_tips(remote: *mut git_remote, + callbacks: *const git_remote_callbacks, + update_fetchead: c_int, + download_tags: git_remote_autotag_option_t, + reflog_message: *const c_char) -> c_int; + pub fn git_remote_set_url(repo: *mut git_repository, + remote: *const c_char, + url: *const c_char) -> c_int; + pub fn git_remote_set_pushurl(repo: *mut git_repository, + remote: *const c_char, + pushurl: *const c_char) -> c_int; + pub fn git_remote_init_callbacks(opts: *mut git_remote_callbacks, + version: c_uint) -> c_int; + pub fn git_fetch_init_options(opts: *mut git_fetch_options, + version: c_uint) -> c_int; + pub fn git_remote_stats(remote: *mut git_remote) + -> *const git_transfer_progress; + pub fn git_remote_ls(out: *mut *mut *const git_remote_head, + size: *mut size_t, + remote: *mut git_remote) -> c_int; + pub fn git_remote_set_autotag(repo: *mut git_repository, + remote: *const c_char, + value: git_remote_autotag_option_t) -> c_int; + pub fn git_remote_prune(remote: *mut git_remote, + callbacks: *const git_remote_callbacks) -> c_int; + + // refspec + pub fn git_refspec_direction(spec: *const git_refspec) -> git_direction; + pub fn git_refspec_dst(spec: *const git_refspec) -> *const c_char; + pub fn git_refspec_dst_matches(spec: *const git_refspec, + refname: *const c_char) -> c_int; + pub fn git_refspec_src(spec: *const git_refspec) -> *const c_char; + pub fn git_refspec_src_matches(spec: *const git_refspec, + refname: *const c_char) -> c_int; + pub fn git_refspec_force(spec: *const git_refspec) -> c_int; + pub fn git_refspec_string(spec: *const git_refspec) -> *const c_char; + + // strarray + pub fn git_strarray_free(array: *mut git_strarray); + + // oidarray + pub fn git_oidarray_free(array: *mut git_oidarray); + + // signature + pub fn git_signature_default(out: *mut *mut git_signature, + repo: *mut git_repository) -> c_int; + pub fn git_signature_free(sig: *mut git_signature); + pub fn git_signature_new(out: *mut *mut git_signature, + name: *const c_char, + email: *const c_char, + time: git_time_t, + offset: c_int) -> c_int; + pub fn git_signature_now(out: *mut *mut git_signature, + name: *const c_char, + email: *const c_char) -> c_int; + pub fn git_signature_dup(dest: *mut *mut git_signature, + sig: *const git_signature) -> c_int; + + // status + pub fn git_status_list_new(out: *mut *mut git_status_list, + repo: *mut git_repository, + options: *const git_status_options) -> c_int; + pub fn git_status_list_entrycount(list: *mut git_status_list) -> size_t; + pub fn git_status_byindex(statuslist: *mut git_status_list, + idx: size_t) -> *const git_status_entry; + pub fn git_status_list_free(list: *mut git_status_list); + pub fn git_status_init_options(opts: *mut git_status_options, + version: c_uint) -> c_int; + pub fn git_status_file(status_flags: *mut c_uint, + repo: *mut git_repository, + path: *const c_char) -> c_int; + pub fn git_status_should_ignore(ignored: *mut c_int, + repo: *mut git_repository, + path: *const c_char) -> c_int; + + // clone + pub fn git_clone(out: *mut *mut git_repository, + url: *const c_char, + local_path: *const c_char, + options: *const git_clone_options) -> c_int; + pub fn git_clone_init_options(opts: *mut git_clone_options, + version: c_uint) -> c_int; + + // reset + pub fn git_reset(repo: *mut git_repository, + target: *mut git_object, + reset_type: git_reset_t, + checkout_opts: *const git_checkout_options) -> c_int; + pub fn git_reset_default(repo: *mut git_repository, + target: *mut git_object, + pathspecs: *mut git_strarray) -> c_int; + + // reference + pub fn git_reference_cmp(ref1: *const git_reference, + ref2: *const git_reference) -> c_int; + pub fn git_reference_delete(r: *mut git_reference) -> c_int; + pub fn git_reference_free(r: *mut git_reference); + pub fn git_reference_is_branch(r: *const git_reference) -> c_int; + pub fn git_reference_is_note(r: *const git_reference) -> c_int; + pub fn git_reference_is_remote(r: *const git_reference) -> c_int; + pub fn git_reference_is_tag(r: *const git_reference) -> c_int; + pub fn git_reference_is_valid_name(name: *const c_char) -> c_int; + pub fn git_reference_lookup(out: *mut *mut git_reference, + repo: *mut git_repository, + name: *const c_char) -> c_int; + pub fn git_reference_name(r: *const git_reference) -> *const c_char; + pub fn git_reference_name_to_id(out: *mut git_oid, + repo: *mut git_repository, + name: *const c_char) -> c_int; + pub fn git_reference_peel(out: *mut *mut git_object, + r: *mut git_reference, + otype: git_otype) -> c_int; + pub fn git_reference_rename(new_ref: *mut *mut git_reference, + r: *mut git_reference, + new_name: *const c_char, + force: c_int, + log_message: *const c_char) -> c_int; + pub fn git_reference_resolve(out: *mut *mut git_reference, + r: *const git_reference) -> c_int; + pub fn git_reference_shorthand(r: *const git_reference) -> *const c_char; + pub fn git_reference_symbolic_target(r: *const git_reference) -> *const c_char; + pub fn git_reference_target(r: *const git_reference) -> *const git_oid; + pub fn git_reference_target_peel(r: *const git_reference) -> *const git_oid; + pub fn git_reference_set_target(out: *mut *mut git_reference, + r: *mut git_reference, + id: *const git_oid, + log_message: *const c_char) -> c_int; + pub fn git_reference_type(r: *const git_reference) -> git_ref_t; + pub fn git_reference_iterator_new(out: *mut *mut git_reference_iterator, + repo: *mut git_repository) -> c_int; + pub fn git_reference_iterator_glob_new(out: *mut *mut git_reference_iterator, + repo: *mut git_repository, + glob: *const c_char) -> c_int; + pub fn git_reference_iterator_free(iter: *mut git_reference_iterator); + pub fn git_reference_next(out: *mut *mut git_reference, + iter: *mut git_reference_iterator) -> c_int; + pub fn git_reference_next_name(out: *mut *const c_char, + iter: *mut git_reference_iterator) -> c_int; + pub fn git_reference_create(out: *mut *mut git_reference, + repo: *mut git_repository, + name: *const c_char, + id: *const git_oid, + force: c_int, + log_message: *const c_char) -> c_int; + pub fn git_reference_symbolic_create(out: *mut *mut git_reference, + repo: *mut git_repository, + name: *const c_char, + target: *const c_char, + force: c_int, + log_message: *const c_char) -> c_int; + + // submodules + pub fn git_submodule_add_finalize(submodule: *mut git_submodule) -> c_int; + pub fn git_submodule_add_setup(submodule: *mut *mut git_submodule, + repo: *mut git_repository, + url: *const c_char, + path: *const c_char, + use_gitlink: c_int) -> c_int; + pub fn git_submodule_add_to_index(submodule: *mut git_submodule, + write_index: c_int) -> c_int; + pub fn git_submodule_branch(submodule: *mut git_submodule) -> *const c_char; + pub fn git_submodule_foreach(repo: *mut git_repository, + callback: git_submodule_cb, + payload: *mut c_void) -> c_int; + pub fn git_submodule_free(submodule: *mut git_submodule); + pub fn git_submodule_head_id(submodule: *mut git_submodule) -> *const git_oid; + pub fn git_submodule_index_id(submodule: *mut git_submodule) -> *const git_oid; + pub fn git_submodule_init(submodule: *mut git_submodule, + overwrite: c_int) -> c_int; + pub fn git_submodule_location(status: *mut c_uint, + submodule: *mut git_submodule) -> c_int; + pub fn git_submodule_lookup(out: *mut *mut git_submodule, + repo: *mut git_repository, + name: *const c_char) -> c_int; + pub fn git_submodule_name(submodule: *mut git_submodule) -> *const c_char; + pub fn git_submodule_open(repo: *mut *mut git_repository, + submodule: *mut git_submodule) -> c_int; + pub fn git_submodule_path(submodule: *mut git_submodule) -> *const c_char; + pub fn git_submodule_reload(submodule: *mut git_submodule, + force: c_int) -> c_int; + pub fn git_submodule_set_ignore(repo: *mut git_repository, + name: *const c_char, + ignore: git_submodule_ignore_t) + -> c_int; + pub fn git_submodule_set_update(repo: *mut git_repository, + name: *const c_char, + update: git_submodule_update_t) + -> c_int; + pub fn git_submodule_set_url(repo: *mut git_repository, + name: *const c_char, + url: *const c_char) -> c_int; + pub fn git_submodule_sync(submodule: *mut git_submodule) -> c_int; + pub fn git_submodule_update_strategy(submodule: *mut git_submodule) + -> git_submodule_update_t; + // pub fn git_submodule_update(submodule: *mut git_submodule, + // init: c_int, + // options: *mut git_submodule_update_options) + // -> c_int; + pub fn git_submodule_url(submodule: *mut git_submodule) -> *const c_char; + pub fn git_submodule_wd_id(submodule: *mut git_submodule) -> *const git_oid; + pub fn git_submodule_status(status: *mut c_uint, + repo: *mut git_repository, + name: *const c_char, + ignore: git_submodule_ignore_t) -> c_int; + pub fn git_submodule_set_branch(repo: *mut git_repository, + name: *const c_char, + branch: *const c_char) -> c_int; + + // blob + pub fn git_blob_free(blob: *mut git_blob); + pub fn git_blob_id(blob: *const git_blob) -> *const git_oid; + pub fn git_blob_is_binary(blob: *const git_blob) -> c_int; + pub fn git_blob_lookup(blob: *mut *mut git_blob, repo: *mut git_repository, + id: *const git_oid) -> c_int; + pub fn git_blob_lookup_prefix(blob: *mut *mut git_blob, + repo: *mut git_repository, + id: *const git_oid, + len: size_t) -> c_int; + pub fn git_blob_rawcontent(blob: *const git_blob) -> *const c_void; + pub fn git_blob_rawsize(blob: *const git_blob) -> git_off_t; + pub fn git_blob_create_frombuffer(id: *mut git_oid, + repo: *mut git_repository, + buffer: *const c_void, + len: size_t) -> c_int; + pub fn git_blob_create_fromdisk(id: *mut git_oid, + repo: *mut git_repository, + path: *const c_char) -> c_int; + pub fn git_blob_create_fromworkdir(id: *mut git_oid, + repo: *mut git_repository, + relative_path: *const c_char) -> c_int; + + // tree + pub fn git_tree_entry_byid(tree: *const git_tree, + id: *const git_oid) -> *const git_tree_entry; + pub fn git_tree_entry_byindex(tree: *const git_tree, + idx: size_t) -> *const git_tree_entry; + pub fn git_tree_entry_byname(tree: *const git_tree, + filename: *const c_char) -> *const git_tree_entry; + pub fn git_tree_entry_bypath(out: *mut *mut git_tree_entry, + tree: *const git_tree, + filename: *const c_char) -> c_int; + pub fn git_tree_entry_cmp(e1: *const git_tree_entry, + e2: *const git_tree_entry) -> c_int; + pub fn git_tree_entry_dup(dest: *mut *mut git_tree_entry, + src: *const git_tree_entry) -> c_int; + pub fn git_tree_entry_filemode(entry: *const git_tree_entry) -> git_filemode_t; + pub fn git_tree_entry_filemode_raw(entry: *const git_tree_entry) -> git_filemode_t; + pub fn git_tree_entry_free(entry: *mut git_tree_entry); + pub fn git_tree_entry_id(entry: *const git_tree_entry) -> *const git_oid; + pub fn git_tree_entry_name(entry: *const git_tree_entry) -> *const c_char; + pub fn git_tree_entry_to_object(out: *mut *mut git_object, + repo: *mut git_repository, + entry: *const git_tree_entry) -> c_int; + pub fn git_tree_entry_type(entry: *const git_tree_entry) -> git_otype; + pub fn git_tree_entrycount(tree: *const git_tree) -> size_t; + pub fn git_tree_free(tree: *mut git_tree); + pub fn git_tree_id(tree: *const git_tree) -> *const git_oid; + pub fn git_tree_lookup(tree: *mut *mut git_tree, + repo: *mut git_repository, + id: *const git_oid) -> c_int; + pub fn git_tree_walk(tree: *const git_tree, + mode: git_treewalk_mode, + callback: git_treewalk_cb, + payload: *mut c_void) -> c_int; + + // treebuilder + pub fn git_treebuilder_new(out: *mut *mut git_treebuilder, + repo: *mut git_repository, + source: *const git_tree) -> c_int; + pub fn git_treebuilder_clear(bld: *mut git_treebuilder); + pub fn git_treebuilder_entrycount(bld: *mut git_treebuilder) -> c_uint; + pub fn git_treebuilder_free(bld: *mut git_treebuilder); + pub fn git_treebuilder_get(bld: *mut git_treebuilder, + filename: *const c_char) -> *const git_tree_entry; + pub fn git_treebuilder_insert(out: *mut *const git_tree_entry, + bld: *mut git_treebuilder, + filename: *const c_char, + id: *const git_oid, + filemode: git_filemode_t) -> c_int; + pub fn git_treebuilder_remove(bld: *mut git_treebuilder, + filename: *const c_char) -> c_int; + pub fn git_treebuilder_filter(bld: *mut git_treebuilder, + filter: git_treebuilder_filter_cb, + payload: *mut c_void); + pub fn git_treebuilder_write(id: *mut git_oid, + bld: *mut git_treebuilder) -> c_int; + + // buf + pub fn git_buf_free(buffer: *mut git_buf); + pub fn git_buf_grow(buffer: *mut git_buf, target_size: size_t) -> c_int; + pub fn git_buf_set(buffer: *mut git_buf, data: *const c_void, + datalen: size_t) -> c_int; + + // commit + pub fn git_commit_author(commit: *const git_commit) -> *const git_signature; + pub fn git_commit_committer(commit: *const git_commit) -> *const git_signature; + pub fn git_commit_free(commit: *mut git_commit); + pub fn git_commit_id(commit: *const git_commit) -> *const git_oid; + pub fn git_commit_lookup(commit: *mut *mut git_commit, + repo: *mut git_repository, + id: *const git_oid) -> c_int; + pub fn git_commit_message(commit: *const git_commit) -> *const c_char; + pub fn git_commit_message_encoding(commit: *const git_commit) -> *const c_char; + pub fn git_commit_message_raw(commit: *const git_commit) -> *const c_char; + pub fn git_commit_nth_gen_ancestor(commit: *mut *mut git_commit, + commit: *const git_commit, + n: c_uint) -> c_int; + pub fn git_commit_parent(out: *mut *mut git_commit, + commit: *const git_commit, + n: c_uint) -> c_int; + pub fn git_commit_parent_id(commit: *const git_commit, + n: c_uint) -> *const git_oid; + pub fn git_commit_parentcount(commit: *const git_commit) -> c_uint; + pub fn git_commit_raw_header(commit: *const git_commit) -> *const c_char; + pub fn git_commit_summary(commit: *mut git_commit) -> *const c_char; + pub fn git_commit_time(commit: *const git_commit) -> git_time_t; + pub fn git_commit_time_offset(commit: *const git_commit) -> c_int; + pub fn git_commit_tree(tree_out: *mut *mut git_tree, + commit: *const git_commit) -> c_int; + pub fn git_commit_tree_id(commit: *const git_commit) -> *const git_oid; + pub fn git_commit_amend(id: *mut git_oid, + commit_to_amend: *const git_commit, + update_ref: *const c_char, + author: *const git_signature, + committer: *const git_signature, + message_encoding: *const c_char, + message: *const c_char, + tree: *const git_tree) -> c_int; + pub fn git_commit_create(id: *mut git_oid, + repo: *mut git_repository, + update_ref: *const c_char, + author: *const git_signature, + committer: *const git_signature, + message_encoding: *const c_char, + message: *const c_char, + tree: *const git_tree, + parent_count: size_t, + parents: *mut *const git_commit) -> c_int; + pub fn git_commit_header_field(out: *mut git_buf, + commit: *const git_commit, + field: *const c_char) -> c_int; + + // branch + pub fn git_branch_create(out: *mut *mut git_reference, + repo: *mut git_repository, + branch_name: *const c_char, + target: *const git_commit, + force: c_int) -> c_int; + pub fn git_branch_delete(branch: *mut git_reference) -> c_int; + pub fn git_branch_is_head(branch: *const git_reference) -> c_int; + pub fn git_branch_iterator_free(iter: *mut git_branch_iterator); + pub fn git_branch_iterator_new(iter: *mut *mut git_branch_iterator, + repo: *mut git_repository, + list_flags: git_branch_t) -> c_int; + pub fn git_branch_lookup(out: *mut *mut git_reference, + repo: *mut git_repository, + branch_name: *const c_char, + branch_type: git_branch_t) -> c_int; + pub fn git_branch_move(out: *mut *mut git_reference, + branch: *mut git_reference, + new_branch_name: *const c_char, + force: c_int) -> c_int; + pub fn git_branch_name(out: *mut *const c_char, + branch: *const git_reference) -> c_int; + pub fn git_branch_next(out: *mut *mut git_reference, + out_type: *mut git_branch_t, + iter: *mut git_branch_iterator) -> c_int; + pub fn git_branch_set_upstream(branch: *mut git_reference, + upstream_name: *const c_char) -> c_int; + pub fn git_branch_upstream(out: *mut *mut git_reference, + branch: *const git_reference) -> c_int; + + // index + pub fn git_index_add(index: *mut git_index, + entry: *const git_index_entry) -> c_int; + pub fn git_index_add_all(index: *mut git_index, + pathspec: *const git_strarray, + flags: c_uint, + callback: Option, + payload: *mut c_void) -> c_int; + pub fn git_index_add_bypath(index: *mut git_index, + path: *const c_char) -> c_int; + pub fn git_index_add_frombuffer(index: *mut git_index, + entry: *const git_index_entry, + buffer: *const c_void, + len: size_t) -> c_int; + pub fn git_index_conflict_add(index: *mut git_index, + ancestor_entry: *const git_index_entry, + our_entry: *const git_index_entry, + their_entry: *const git_index_entry) -> c_int; + pub fn git_index_clear(index: *mut git_index) -> c_int; + pub fn git_index_entry_stage(entry: *const git_index_entry) -> c_int; + pub fn git_index_entrycount(entry: *const git_index) -> size_t; + pub fn git_index_find(at_pos: *mut size_t, + index: *mut git_index, + path: *const c_char) -> c_int; + pub fn git_index_free(index: *mut git_index); + pub fn git_index_get_byindex(index: *mut git_index, + n: size_t) -> *const git_index_entry; + pub fn git_index_get_bypath(index: *mut git_index, + path: *const c_char, + stage: c_int) -> *const git_index_entry; + pub fn git_index_new(index: *mut *mut git_index) -> c_int; + pub fn git_index_open(index: *mut *mut git_index, + index_path: *const c_char) -> c_int; + pub fn git_index_path(index: *const git_index) -> *const c_char; + pub fn git_index_read(index: *mut git_index, force: c_int) -> c_int; + pub fn git_index_read_tree(index: *mut git_index, + tree: *const git_tree) -> c_int; + pub fn git_index_remove(index: *mut git_index, + path: *const c_char, + stage: c_int) -> c_int; + pub fn git_index_remove_all(index: *mut git_index, + pathspec: *const git_strarray, + callback: Option, + payload: *mut c_void) -> c_int; + pub fn git_index_remove_bypath(index: *mut git_index, + path: *const c_char) -> c_int; + pub fn git_index_remove_directory(index: *mut git_index, + dir: *const c_char, + stage: c_int) -> c_int; + pub fn git_index_update_all(index: *mut git_index, + pathspec: *const git_strarray, + callback: Option, + payload: *mut c_void) -> c_int; + pub fn git_index_write(index: *mut git_index) -> c_int; + pub fn git_index_write_tree(out: *mut git_oid, + index: *mut git_index) -> c_int; + pub fn git_index_write_tree_to(out: *mut git_oid, + index: *mut git_index, + repo: *mut git_repository) -> c_int; + + // config + pub fn git_config_add_file_ondisk(cfg: *mut git_config, + path: *const c_char, + level: git_config_level_t, + force: c_int) -> c_int; + pub fn git_config_delete_entry(cfg: *mut git_config, + name: *const c_char) -> c_int; + pub fn git_config_delete_multivar(cfg: *mut git_config, + name: *const c_char, + regexp: *const c_char) -> c_int; + pub fn git_config_find_programdata(out: *mut git_buf) -> c_int; + pub fn git_config_find_global(out: *mut git_buf) -> c_int; + pub fn git_config_find_system(out: *mut git_buf) -> c_int; + pub fn git_config_find_xdg(out: *mut git_buf) -> c_int; + pub fn git_config_free(cfg: *mut git_config); + pub fn git_config_get_bool(out: *mut c_int, + cfg: *const git_config, + name: *const c_char) -> c_int; + pub fn git_config_get_entry(out: *mut *mut git_config_entry, + cfg: *const git_config, + name: *const c_char) -> c_int; + pub fn git_config_get_int32(out: *mut i32, + cfg: *const git_config, + name: *const c_char) -> c_int; + pub fn git_config_get_int64(out: *mut i64, + cfg: *const git_config, + name: *const c_char) -> c_int; + pub fn git_config_get_string(out: *mut *const c_char, + cfg: *const git_config, + name: *const c_char) -> c_int; + pub fn git_config_get_string_buf(out: *mut git_buf, + cfg: *const git_config, + name: *const c_char) -> c_int; + pub fn git_config_get_path(out: *mut git_buf, + cfg: *const git_config, + name: *const c_char) -> c_int; + pub fn git_config_iterator_free(iter: *mut git_config_iterator); + pub fn git_config_iterator_glob_new(out: *mut *mut git_config_iterator, + cfg: *const git_config, + regexp: *const c_char) -> c_int; + pub fn git_config_iterator_new(out: *mut *mut git_config_iterator, + cfg: *const git_config) -> c_int; + pub fn git_config_new(out: *mut *mut git_config) -> c_int; + pub fn git_config_next(entry: *mut *mut git_config_entry, + iter: *mut git_config_iterator) -> c_int; + pub fn git_config_open_default(out: *mut *mut git_config) -> c_int; + pub fn git_config_open_global(out: *mut *mut git_config, + config: *mut git_config) -> c_int; + pub fn git_config_open_level(out: *mut *mut git_config, + parent: *const git_config, + level: git_config_level_t) -> c_int; + pub fn git_config_open_ondisk(out: *mut *mut git_config, + path: *const c_char) -> c_int; + pub fn git_config_parse_bool(out: *mut c_int, + value: *const c_char) -> c_int; + pub fn git_config_parse_int32(out: *mut i32, + value: *const c_char) -> c_int; + pub fn git_config_parse_int64(out: *mut i64, + value: *const c_char) -> c_int; + pub fn git_config_set_bool(cfg: *mut git_config, + name: *const c_char, + value: c_int) -> c_int; + pub fn git_config_set_int32(cfg: *mut git_config, + name: *const c_char, + value: i32) -> c_int; + pub fn git_config_set_int64(cfg: *mut git_config, + name: *const c_char, + value: i64) -> c_int; + pub fn git_config_set_string(cfg: *mut git_config, + name: *const c_char, + value: *const c_char) -> c_int; + pub fn git_config_snapshot(out: *mut *mut git_config, + config: *mut git_config) -> c_int; + pub fn git_config_entry_free(entry: *mut git_config_entry); + + // cred + pub fn git_cred_default_new(out: *mut *mut git_cred) -> c_int; + pub fn git_cred_has_username(cred: *mut git_cred) -> c_int; + pub fn git_cred_ssh_custom_new(out: *mut *mut git_cred, + username: *const c_char, + publickey: *const c_char, + publickey_len: size_t, + sign_callback: git_cred_sign_callback, + payload: *mut c_void) -> c_int; + pub fn git_cred_ssh_interactive_new(out: *mut *mut git_cred, + username: *const c_char, + prompt_callback: git_cred_ssh_interactive_callback, + payload: *mut c_void) -> c_int; + pub fn git_cred_ssh_key_from_agent(out: *mut *mut git_cred, + username: *const c_char) -> c_int; + pub fn git_cred_ssh_key_new(out: *mut *mut git_cred, + username: *const c_char, + publickey: *const c_char, + privatekey: *const c_char, + passphrase: *const c_char) -> c_int; + pub fn git_cred_ssh_key_memory_new(out: *mut *mut git_cred, + username: *const c_char, + publickey: *const c_char, + privatekey: *const c_char, + passphrase: *const c_char) -> c_int; + pub fn git_cred_userpass(cred: *mut *mut git_cred, + url: *const c_char, + user_from_url: *const c_char, + allowed_types: c_uint, + payload: *mut c_void) -> c_int; + pub fn git_cred_userpass_plaintext_new(out: *mut *mut git_cred, + username: *const c_char, + password: *const c_char) -> c_int; + pub fn git_cred_username_new(cred: *mut *mut git_cred, + username: *const c_char) -> c_int; + + // tags + pub fn git_tag_annotation_create(oid: *mut git_oid, + repo: *mut git_repository, + tag_name: *const c_char, + target: *const git_object, + tagger: *const git_signature, + message: *const c_char) -> c_int; + pub fn git_tag_create(oid: *mut git_oid, + repo: *mut git_repository, + tag_name: *const c_char, + target: *const git_object, + tagger: *const git_signature, + message: *const c_char, + force: c_int) -> c_int; + pub fn git_tag_create_frombuffer(oid: *mut git_oid, + repo: *mut git_repository, + buffer: *const c_char, + force: c_int) -> c_int; + pub fn git_tag_create_lightweight(oid: *mut git_oid, + repo: *mut git_repository, + tag_name: *const c_char, + target: *const git_object, + force: c_int) -> c_int; + pub fn git_tag_delete(repo: *mut git_repository, + tag_name: *const c_char) -> c_int; + pub fn git_tag_foreach(repo: *mut git_repository, + callback: git_tag_foreach_cb, + payload: *mut c_void) -> c_int; + pub fn git_tag_free(tag: *mut git_tag); + pub fn git_tag_id(tag: *const git_tag) -> *const git_oid; + pub fn git_tag_list(tag_names: *mut git_strarray, + repo: *mut git_repository) -> c_int; + pub fn git_tag_list_match(tag_names: *mut git_strarray, + pattern: *const c_char, + repo: *mut git_repository) -> c_int; + pub fn git_tag_lookup(out: *mut *mut git_tag, + repo: *mut git_repository, + id: *const git_oid) -> c_int; + pub fn git_tag_lookup_prefix(out: *mut *mut git_tag, + repo: *mut git_repository, + id: *const git_oid, + len: size_t) -> c_int; + pub fn git_tag_message(tag: *const git_tag) -> *const c_char; + pub fn git_tag_name(tag: *const git_tag) -> *const c_char; + pub fn git_tag_peel(tag_target_out: *mut *mut git_object, + tag: *const git_tag) -> c_int; + pub fn git_tag_tagger(tag: *const git_tag) -> *const git_signature; + pub fn git_tag_target(target_out: *mut *mut git_object, + tag: *const git_tag) -> c_int; + pub fn git_tag_target_id(tag: *const git_tag) -> *const git_oid; + pub fn git_tag_target_type(tag: *const git_tag) -> git_otype; + + // checkout + pub fn git_checkout_head(repo: *mut git_repository, + opts: *const git_checkout_options) -> c_int; + pub fn git_checkout_index(repo: *mut git_repository, + index: *mut git_index, + opts: *const git_checkout_options) -> c_int; + pub fn git_checkout_tree(repo: *mut git_repository, + treeish: *const git_object, + opts: *const git_checkout_options) -> c_int; + pub fn git_checkout_init_options(opts: *mut git_checkout_options, + version: c_uint) -> c_int; + + // merge + pub fn git_annotated_commit_id(commit: *const git_annotated_commit) + -> *const git_oid; + pub fn git_annotated_commit_from_ref(out: *mut *mut git_annotated_commit, + repo: *mut git_repository, + reference: *const git_reference) + -> c_int; + pub fn git_annotated_commit_free(commit: *mut git_annotated_commit); + pub fn git_merge_init_options(opts: *mut git_merge_options, + version: c_uint) -> c_int; + pub fn git_merge(repo: *mut git_repository, + their_heads: *mut *const git_annotated_commit, + len: size_t, + merge_opts: *const git_merge_options, + checkout_opts: *const git_checkout_options) -> c_int; + pub fn git_merge_commits(out: *mut *mut git_index, + repo: *mut git_repository, + our_commit: *const git_commit, + their_commit: *const git_commit, + opts: *const git_merge_options) -> c_int; + pub fn git_repository_state_cleanup(repo: *mut git_repository) -> c_int; + + // notes + pub fn git_note_author(note: *const git_note) -> *const git_signature; + pub fn git_note_committer(note: *const git_note) -> *const git_signature; + pub fn git_note_create(out: *mut git_oid, + repo: *mut git_repository, + notes_ref: *const c_char, + author: *const git_signature, + committer: *const git_signature, + oid: *const git_oid, + note: *const c_char, + force: c_int) -> c_int; + pub fn git_note_default_ref(out: *mut git_buf, + repo: *mut git_repository) -> c_int; + pub fn git_note_free(note: *mut git_note); + pub fn git_note_id(note: *const git_note) -> *const git_oid; + pub fn git_note_iterator_free(it: *mut git_note_iterator); + pub fn git_note_iterator_new(out: *mut *mut git_note_iterator, + repo: *mut git_repository, + notes_ref: *const c_char) -> c_int; + pub fn git_note_message(note: *const git_note) -> *const c_char; + pub fn git_note_next(note_id: *mut git_oid, + annotated_id: *mut git_oid, + it: *mut git_note_iterator) -> c_int; + pub fn git_note_read(out: *mut *mut git_note, + repo: *mut git_repository, + notes_ref: *const c_char, + oid: *const git_oid) -> c_int; + pub fn git_note_remove(repo: *mut git_repository, + notes_ref: *const c_char, + author: *const git_signature, + committer: *const git_signature, + oid: *const git_oid) -> c_int; + + // blame + pub fn git_blame_file(out: *mut *mut git_blame, + repo: *mut git_repository, + path: *const c_char, + options: *mut git_blame_options) -> c_int; + pub fn git_blame_free(blame: *mut git_blame); + + pub fn git_blame_init_options(opts: *mut git_blame_options, + version: c_uint) -> c_int; + pub fn git_blame_get_hunk_count(blame: *mut git_blame) -> u32; + + pub fn git_blame_get_hunk_byline(blame: *mut git_blame, + lineno: usize) -> *const git_blame_hunk; + pub fn git_blame_get_hunk_byindex(blame: *mut git_blame, + index: u32) -> *const git_blame_hunk; + + // revwalk + pub fn git_revwalk_new(out: *mut *mut git_revwalk, + repo: *mut git_repository) -> c_int; + pub fn git_revwalk_free(walk: *mut git_revwalk); + + pub fn git_revwalk_reset(walk: *mut git_revwalk); + + pub fn git_revwalk_sorting(walk: *mut git_revwalk, sort_mode: c_uint); + + pub fn git_revwalk_push_head(walk: *mut git_revwalk) -> c_int; + pub fn git_revwalk_push(walk: *mut git_revwalk, + oid: *const git_oid) -> c_int; + pub fn git_revwalk_push_ref(walk: *mut git_revwalk, + refname: *const c_char) -> c_int; + pub fn git_revwalk_push_glob(walk: *mut git_revwalk, + glob: *const c_char) -> c_int; + pub fn git_revwalk_push_range(walk: *mut git_revwalk, + range: *const c_char) -> c_int; + pub fn git_revwalk_simplify_first_parent(walk: *mut git_revwalk); + + pub fn git_revwalk_hide_head(walk: *mut git_revwalk) -> c_int; + pub fn git_revwalk_hide(walk: *mut git_revwalk, + oid: *const git_oid) -> c_int; + pub fn git_revwalk_hide_ref(walk: *mut git_revwalk, + refname: *const c_char) -> c_int; + pub fn git_revwalk_hide_glob(walk: *mut git_revwalk, + refname: *const c_char) -> c_int; + + pub fn git_revwalk_next(out: *mut git_oid, walk: *mut git_revwalk) -> c_int; + + // merge + pub fn git_merge_base(out: *mut git_oid, + repo: *mut git_repository, + one: *const git_oid, + two: *const git_oid) -> c_int; + + pub fn git_merge_bases(out: *mut git_oidarray, + repo: *mut git_repository, + one: *const git_oid, + two: *const git_oid) -> c_int; + + // pathspec + pub fn git_pathspec_free(ps: *mut git_pathspec); + pub fn git_pathspec_match_diff(out: *mut *mut git_pathspec_match_list, + diff: *mut git_diff, + flags: u32, + ps: *mut git_pathspec) -> c_int; + pub fn git_pathspec_match_index(out: *mut *mut git_pathspec_match_list, + index: *mut git_index, + flags: u32, + ps: *mut git_pathspec) -> c_int; + pub fn git_pathspec_match_list_diff_entry(m: *const git_pathspec_match_list, + pos: size_t) -> *const git_diff_delta; + pub fn git_pathspec_match_list_entry(m: *const git_pathspec_match_list, + pos: size_t) -> *const c_char; + pub fn git_pathspec_match_list_entrycount(m: *const git_pathspec_match_list) + -> size_t; + pub fn git_pathspec_match_list_failed_entry(m: *const git_pathspec_match_list, + pos: size_t) -> *const c_char; + pub fn git_pathspec_match_list_failed_entrycount( + m: *const git_pathspec_match_list) -> size_t; + pub fn git_pathspec_match_list_free(m: *mut git_pathspec_match_list); + pub fn git_pathspec_match_tree(out: *mut *mut git_pathspec_match_list, + tree: *mut git_tree, + flags: u32, + ps: *mut git_pathspec) -> c_int; + pub fn git_pathspec_match_workdir(out: *mut *mut git_pathspec_match_list, + repo: *mut git_repository, + flags: u32, + ps: *mut git_pathspec) -> c_int; + pub fn git_pathspec_matches_path(ps: *const git_pathspec, + flags: u32, + path: *const c_char) -> c_int; + pub fn git_pathspec_new(out: *mut *mut git_pathspec, + pathspec: *const git_strarray) -> c_int; + + // diff + pub fn git_diff_blob_to_buffer(old_blob: *const git_blob, + old_as_path: *const c_char, + buffer: *const c_char, + buffer_len: size_t, + buffer_as_path: *const c_char, + options: *const git_diff_options, + file_cb: git_diff_file_cb, + binary_cb: git_diff_binary_cb, + hunk_cb: git_diff_hunk_cb, + line_cb: git_diff_line_cb, + payload: *mut c_void) -> c_int; + pub fn git_diff_blobs(old_blob: *const git_blob, + old_as_path: *const c_char, + new_blob: *const git_blob, + new_as_path: *const c_char, + options: *const git_diff_options, + file_cb: git_diff_file_cb, + binary_cb: git_diff_binary_cb, + hunk_cb: git_diff_hunk_cb, + line_cb: git_diff_line_cb, + payload: *mut c_void) -> c_int; + pub fn git_diff_buffers(old_buffer: *const c_void, + old_len: size_t, + old_as_path: *const c_char, + new_buffer: *const c_void, + new_len: size_t, + new_as_path: *const c_char, + options: *const git_diff_options, + file_cb: git_diff_file_cb, + binary_cb: git_diff_binary_cb, + hunk_cb: git_diff_hunk_cb, + line_cb: git_diff_line_cb, + payload: *mut c_void) -> c_int; + pub fn git_diff_find_similar(diff: *mut git_diff, + options: *const git_diff_find_options) -> c_int; + pub fn git_diff_find_init_options(opts: *mut git_diff_find_options, + version: c_uint) -> c_int; + pub fn git_diff_foreach(diff: *mut git_diff, + file_cb: git_diff_file_cb, + binary_cb: Option, + hunk_cb: Option, + line_cb: Option, + payload: *mut c_void) -> c_int; + pub fn git_diff_free(diff: *mut git_diff); + pub fn git_diff_get_delta(diff: *const git_diff, + idx: size_t) -> *const git_diff_delta; + pub fn git_diff_get_stats(out: *mut *mut git_diff_stats, + diff: *mut git_diff) -> c_int; + pub fn git_diff_index_to_workdir(diff: *mut *mut git_diff, + repo: *mut git_repository, + index: *mut git_index, + opts: *const git_diff_options) -> c_int; + pub fn git_diff_init_options(opts: *mut git_diff_options, + version: c_uint) -> c_int; + pub fn git_diff_is_sorted_icase(diff: *const git_diff) -> c_int; + pub fn git_diff_merge(onto: *mut git_diff, + from: *const git_diff) -> c_int; + pub fn git_diff_num_deltas(diff: *const git_diff) -> size_t; + pub fn git_diff_num_deltas_of_type(diff: *const git_diff, + delta: git_delta_t) -> size_t; + pub fn git_diff_print(diff: *mut git_diff, + format: git_diff_format_t, + print_cb: git_diff_line_cb, + payload: *mut c_void) -> c_int; + pub fn git_diff_stats_deletions(stats: *const git_diff_stats) -> size_t; + pub fn git_diff_stats_files_changed(stats: *const git_diff_stats) -> size_t; + pub fn git_diff_stats_free(stats: *mut git_diff_stats); + pub fn git_diff_stats_insertions(stats: *const git_diff_stats) -> size_t; + pub fn git_diff_stats_to_buf(out: *mut git_buf, + stats: *const git_diff_stats, + format: git_diff_stats_format_t, + width: size_t) -> c_int; + pub fn git_diff_status_char(status: git_delta_t) -> c_char; + pub fn git_diff_tree_to_index(diff: *mut *mut git_diff, + repo: *mut git_repository, + old_tree: *mut git_tree, + index: *mut git_index, + opts: *const git_diff_options) -> c_int; + pub fn git_diff_tree_to_tree(diff: *mut *mut git_diff, + repo: *mut git_repository, + old_tree: *mut git_tree, + new_tree: *mut git_tree, + opts: *const git_diff_options) -> c_int; + pub fn git_diff_tree_to_workdir(diff: *mut *mut git_diff, + repo: *mut git_repository, + old_tree: *mut git_tree, + opts: *const git_diff_options) -> c_int; + pub fn git_diff_tree_to_workdir_with_index(diff: *mut *mut git_diff, + repo: *mut git_repository, + old_tree: *mut git_tree, + opts: *const git_diff_options) + -> c_int; + + pub fn git_graph_ahead_behind(ahead: *mut size_t, behind: *mut size_t, + repo: *mut git_repository, + local: *const git_oid, upstream: *const git_oid) + -> c_int; + + pub fn git_graph_descendant_of(repo: *mut git_repository, + commit: *const git_oid, ancestor: *const git_oid) + -> c_int; + + // reflog + pub fn git_reflog_append(reflog: *mut git_reflog, + id: *const git_oid, + committer: *const git_signature, + msg: *const c_char) -> c_int; + pub fn git_reflog_delete(repo: *mut git_repository, + name: *const c_char) -> c_int; + pub fn git_reflog_drop(reflog: *mut git_reflog, + idx: size_t, + rewrite_previous_entry: c_int) -> c_int; + pub fn git_reflog_entry_byindex(reflog: *const git_reflog, + idx: size_t) -> *const git_reflog_entry; + pub fn git_reflog_entry_committer(entry: *const git_reflog_entry) + -> *const git_signature; + pub fn git_reflog_entry_id_new(entry: *const git_reflog_entry) + -> *const git_oid; + pub fn git_reflog_entry_id_old(entry: *const git_reflog_entry) + -> *const git_oid; + pub fn git_reflog_entry_message(entry: *const git_reflog_entry) + -> *const c_char; + pub fn git_reflog_entrycount(reflog: *mut git_reflog) -> size_t; + pub fn git_reflog_free(reflog: *mut git_reflog); + pub fn git_reflog_read(out: *mut *mut git_reflog, + repo: *mut git_repository, + name: *const c_char) -> c_int; + pub fn git_reflog_rename(repo: *mut git_repository, + old_name: *const c_char, + name: *const c_char) -> c_int; + pub fn git_reflog_write(reflog: *mut git_reflog) -> c_int; + + // transport + pub fn git_transport_register(prefix: *const c_char, + cb: git_transport_cb, + param: *mut c_void) -> c_int; + pub fn git_transport_unregister(prefix: *const c_char) -> c_int; + pub fn git_transport_smart(out: *mut *mut git_transport, + owner: *mut git_remote, + payload: *mut c_void) -> c_int; + + // describe + pub fn git_describe_commit(result: *mut *mut git_describe_result, + object: *mut git_object, + opts: *mut git_describe_options) -> c_int; + pub fn git_describe_format(buf: *mut git_buf, + result: *const git_describe_result, + opts: *const git_describe_format_options) -> c_int; + pub fn git_describe_result_free(result: *mut git_describe_result); + pub fn git_describe_workdir(out: *mut *mut git_describe_result, + repo: *mut git_repository, + opts: *mut git_describe_options) -> c_int; + + // message + pub fn git_message_prettify(out: *mut git_buf, + message: *const c_char, + strip_comments: c_int, + comment_char: c_char) -> c_int; +} + +#[test] +fn smoke() { + unsafe { git_threads_init(); } +} diff --git a/deps/libgit2-sys-0.4.3/libgit2/.HEADER b/deps/libgit2-sys-0.4.3/libgit2/.HEADER new file mode 100644 index 000000000..fd8430bc8 --- /dev/null +++ b/deps/libgit2-sys-0.4.3/libgit2/.HEADER @@ -0,0 +1,24 @@ +/* + * This file is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License, version 2, + * as published by the Free Software Foundation. + * + * In addition to the permissions in the GNU General Public License, + * the authors give you unlimited permission to link the compiled + * version of this file into combinations with other programs, + * and to distribute those combinations without any restriction + * coming from the use of this file. (The General Public License + * restrictions do apply in other respects; for example, they cover + * modification of the file, and distribution when not linked into + * a combined executable.) + * + * This file is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; see the file COPYING. If not, write to + * the Free Software Foundation, 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ diff --git a/deps/libgit2-sys-0.4.3/libgit2/.editorconfig b/deps/libgit2-sys-0.4.3/libgit2/.editorconfig new file mode 100644 index 000000000..be59274e8 --- /dev/null +++ b/deps/libgit2-sys-0.4.3/libgit2/.editorconfig @@ -0,0 +1,14 @@ +; Check http://editorconfig.org/ for more informations +; Top-most EditorConfig file +root = true + +; tab indentation +[*] +indent_style = tab +trim_trailing_whitespace = true +insert_final_newline = true + +; 4-column space indentation +[*.md] +indent_style = space +indent_size = 4 diff --git a/deps/libgit2-sys-0.4.3/libgit2/.gitattributes b/deps/libgit2-sys-0.4.3/libgit2/.gitattributes new file mode 100644 index 000000000..176a458f9 --- /dev/null +++ b/deps/libgit2-sys-0.4.3/libgit2/.gitattributes @@ -0,0 +1 @@ +* text=auto diff --git a/deps/libgit2-sys-0.4.3/libgit2/.gitignore b/deps/libgit2-sys-0.4.3/libgit2/.gitignore new file mode 100644 index 000000000..1ef1ec730 --- /dev/null +++ b/deps/libgit2-sys-0.4.3/libgit2/.gitignore @@ -0,0 +1,33 @@ +/tests/clar.suite +/tests/clar.suite.rule +/tests/.clarcache +/apidocs +/trash-*.exe +/libgit2.pc +/config.mak +*.o +*.a +*.exe +*.gcda +*.gcno +*.gcov +.lock-wafbuild +.waf* +build/ +build-amiga/ +tests/tmp/ +msvc/Debug/ +msvc/Release/ +*.sln +*.suo +*.vc*proj* +*.sdf +*.opensdf +*.aps +*.cmake +!cmake/Modules/*.cmake +.DS_Store +*~ +.*.swp +tags +mkmf.log diff --git a/deps/libgit2-sys-0.4.3/libgit2/.mailmap b/deps/libgit2-sys-0.4.3/libgit2/.mailmap new file mode 100644 index 000000000..8479cf6c4 --- /dev/null +++ b/deps/libgit2-sys-0.4.3/libgit2/.mailmap @@ -0,0 +1,22 @@ +Vicent Martí Vicent Marti +Vicent Martí Vicent Martí +Michael Schubert schu +Ben Straub Ben Straub +Ben Straub Ben Straub +Carlos Martín Nieto +Carlos Martín Nieto +nulltoken +Scott J. Goldman +Martin Woodward +Peter Drahoš +Adam Roben +Adam Roben +Xavier L. +Xavier L. +Sascha Cunz +Authmillenon +Authmillenon +Edward Thomson +Edward Thomson +J. David Ibáñez +Russell Belfer diff --git a/deps/libgit2-sys-0.4.3/libgit2/.travis.yml b/deps/libgit2-sys-0.4.3/libgit2/.travis.yml new file mode 100644 index 000000000..9022fdec2 --- /dev/null +++ b/deps/libgit2-sys-0.4.3/libgit2/.travis.yml @@ -0,0 +1,87 @@ +# Travis-CI Build for libgit2 +# see travis-ci.org for details + +language: c + +os: + - linux + - osx + +compiler: + - gcc + - clang + +# Settings to try +env: + global: + - secure: "YnhS+8n6B+uoyaYfaJ3Lei7cSJqHDPiKJCKFIF2c87YDfmCvAJke8QtE7IzjYDs7UFkTCM4ox+ph2bERUrxZbSCyEkHdjIZpKuMJfYWja/jgMqTMxdyOH9y8JLFbZsSXDIXDwqBlC6vVyl1fP90M35wuWcNTs6tctfVWVofEFbs=" + - GITTEST_INVASIVE_FS_SIZE=1 + matrix: + - OPTIONS="-DTHREADSAFE=ON -DCMAKE_BUILD_TYPE=Release" + - OPTIONS="-DTHREADSAFE=OFF -DBUILD_EXAMPLES=ON" + +addons: + apt: + packages: + - cmake + - libssh2-1-dev + - openssh-client + - openssh-server + - valgrind + +sudo: false + +matrix: + fast_finish: true + exclude: + - os: osx + compiler: gcc + include: + - compiler: i586-mingw32msvc-gcc + env: OPTIONS="-DCMAKE_TOOLCHAIN_FILE=../script/toolchain-mingw32.cmake" SKIP_TESTS=1 + os: linux + - compiler: gcc + env: COVERITY=1 + os: linux + - compiler: gcc + env: + - VALGRIND=1 + OPTIONS="-DBUILD_CLAR=ON -DBUILD_EXAMPLES=OFF -DCMAKE_BUILD_TYPE=Debug" + os: linux + allow_failures: + - env: COVERITY=1 + - env: + - VALGRIND=1 + OPTIONS="-DBUILD_CLAR=ON -DBUILD_EXAMPLES=OFF -DCMAKE_BUILD_TYPE=Debug" + +install: + - if [ "$TRAVIS_OS_NAME" = "osx" ]; then ./script/install-deps-${TRAVIS_OS_NAME}.sh; fi + +# Run the Build script and tests +script: + - script/cibuild.sh + +# Run Tests +after_success: + - if [ "$TRAVIS_OS_NAME" = "linux" -a -n "$VALGRIND" ]; then valgrind --leak-check=full --show-reachable=yes --suppressions=./libgit2_clar.supp _build/libgit2_clar -ionline; fi + +# Only watch the development and master branches +branches: + only: + - master + - /^maint.*/ + +# Notify development list when needed +notifications: + irc: + channels: + - irc.freenode.net#libgit2 + on_success: change + on_failure: always + use_notice: true + skip_join: true + campfire: + on_success: always + on_failure: always + rooms: + - secure: "sH0dpPWMirbEe7AvLddZ2yOp8rzHalGmv0bYL/LIhVw3JDI589HCYckeLMSB\n3e/FeXw4bn0EqXWEXijVa4ijbilVY6d8oprdqMdWHEodng4KvY5vID3iZSGT\nxylhahO1XHmRynKQLOAvxlc93IlpVW38vQfby8giIY1nkpspb2w=" diff --git a/deps/libgit2-sys-0.4.0/libgit2/AUTHORS b/deps/libgit2-sys-0.4.3/libgit2/AUTHORS similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/AUTHORS rename to deps/libgit2-sys-0.4.3/libgit2/AUTHORS diff --git a/deps/libgit2-sys-0.4.0/libgit2/CHANGELOG.md b/deps/libgit2-sys-0.4.3/libgit2/CHANGELOG.md similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/CHANGELOG.md rename to deps/libgit2-sys-0.4.3/libgit2/CHANGELOG.md diff --git a/deps/libgit2-sys-0.4.0/libgit2/CMakeLists.txt b/deps/libgit2-sys-0.4.3/libgit2/CMakeLists.txt similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/CMakeLists.txt rename to deps/libgit2-sys-0.4.3/libgit2/CMakeLists.txt diff --git a/deps/libgit2-sys-0.4.0/libgit2/CODE_OF_CONDUCT.md b/deps/libgit2-sys-0.4.3/libgit2/CODE_OF_CONDUCT.md similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/CODE_OF_CONDUCT.md rename to deps/libgit2-sys-0.4.3/libgit2/CODE_OF_CONDUCT.md diff --git a/deps/libgit2-sys-0.4.0/libgit2/CONTRIBUTING.md b/deps/libgit2-sys-0.4.3/libgit2/CONTRIBUTING.md similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/CONTRIBUTING.md rename to deps/libgit2-sys-0.4.3/libgit2/CONTRIBUTING.md diff --git a/deps/libgit2-sys-0.4.0/libgit2/CONVENTIONS.md b/deps/libgit2-sys-0.4.3/libgit2/CONVENTIONS.md similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/CONVENTIONS.md rename to deps/libgit2-sys-0.4.3/libgit2/CONVENTIONS.md diff --git a/deps/libgit2-sys-0.4.0/libgit2/COPYING b/deps/libgit2-sys-0.4.3/libgit2/COPYING similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/COPYING rename to deps/libgit2-sys-0.4.3/libgit2/COPYING diff --git a/deps/libgit2-sys-0.4.0/libgit2/Makefile.embed b/deps/libgit2-sys-0.4.3/libgit2/Makefile.embed similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/Makefile.embed rename to deps/libgit2-sys-0.4.3/libgit2/Makefile.embed diff --git a/deps/libgit2-sys-0.4.0/libgit2/PROJECTS.md b/deps/libgit2-sys-0.4.3/libgit2/PROJECTS.md similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/PROJECTS.md rename to deps/libgit2-sys-0.4.3/libgit2/PROJECTS.md diff --git a/deps/libgit2-sys-0.4.0/libgit2/README.md b/deps/libgit2-sys-0.4.3/libgit2/README.md similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/README.md rename to deps/libgit2-sys-0.4.3/libgit2/README.md diff --git a/deps/libgit2-sys-0.4.0/libgit2/THREADING.md b/deps/libgit2-sys-0.4.3/libgit2/THREADING.md similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/THREADING.md rename to deps/libgit2-sys-0.4.3/libgit2/THREADING.md diff --git a/deps/libgit2-sys-0.4.0/libgit2/api.docurium b/deps/libgit2-sys-0.4.3/libgit2/api.docurium similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/api.docurium rename to deps/libgit2-sys-0.4.3/libgit2/api.docurium diff --git a/deps/libgit2-sys-0.4.0/libgit2/appveyor.yml b/deps/libgit2-sys-0.4.3/libgit2/appveyor.yml similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/appveyor.yml rename to deps/libgit2-sys-0.4.3/libgit2/appveyor.yml diff --git a/deps/libgit2-sys-0.4.0/libgit2/cmake/Modules/AddCFlagIfSupported.cmake b/deps/libgit2-sys-0.4.3/libgit2/cmake/Modules/AddCFlagIfSupported.cmake similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/cmake/Modules/AddCFlagIfSupported.cmake rename to deps/libgit2-sys-0.4.3/libgit2/cmake/Modules/AddCFlagIfSupported.cmake diff --git a/deps/libgit2-sys-0.4.0/libgit2/cmake/Modules/FindCoreFoundation.cmake b/deps/libgit2-sys-0.4.3/libgit2/cmake/Modules/FindCoreFoundation.cmake similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/cmake/Modules/FindCoreFoundation.cmake rename to deps/libgit2-sys-0.4.3/libgit2/cmake/Modules/FindCoreFoundation.cmake diff --git a/deps/libgit2-sys-0.4.0/libgit2/cmake/Modules/FindGSSAPI.cmake b/deps/libgit2-sys-0.4.3/libgit2/cmake/Modules/FindGSSAPI.cmake similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/cmake/Modules/FindGSSAPI.cmake rename to deps/libgit2-sys-0.4.3/libgit2/cmake/Modules/FindGSSAPI.cmake diff --git a/deps/libgit2-sys-0.4.0/libgit2/cmake/Modules/FindHTTP_Parser.cmake b/deps/libgit2-sys-0.4.3/libgit2/cmake/Modules/FindHTTP_Parser.cmake similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/cmake/Modules/FindHTTP_Parser.cmake rename to deps/libgit2-sys-0.4.3/libgit2/cmake/Modules/FindHTTP_Parser.cmake diff --git a/deps/libgit2-sys-0.4.0/libgit2/cmake/Modules/FindIconv.cmake b/deps/libgit2-sys-0.4.3/libgit2/cmake/Modules/FindIconv.cmake similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/cmake/Modules/FindIconv.cmake rename to deps/libgit2-sys-0.4.3/libgit2/cmake/Modules/FindIconv.cmake diff --git a/deps/libgit2-sys-0.4.0/libgit2/cmake/Modules/FindSecurity.cmake b/deps/libgit2-sys-0.4.3/libgit2/cmake/Modules/FindSecurity.cmake similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/cmake/Modules/FindSecurity.cmake rename to deps/libgit2-sys-0.4.3/libgit2/cmake/Modules/FindSecurity.cmake diff --git a/deps/libgit2-sys-0.4.0/libgit2/docs/checkout-internals.md b/deps/libgit2-sys-0.4.3/libgit2/docs/checkout-internals.md similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/docs/checkout-internals.md rename to deps/libgit2-sys-0.4.3/libgit2/docs/checkout-internals.md diff --git a/deps/libgit2-sys-0.4.0/libgit2/docs/diff-internals.md b/deps/libgit2-sys-0.4.3/libgit2/docs/diff-internals.md similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/docs/diff-internals.md rename to deps/libgit2-sys-0.4.3/libgit2/docs/diff-internals.md diff --git a/deps/libgit2-sys-0.4.0/libgit2/docs/error-handling.md b/deps/libgit2-sys-0.4.3/libgit2/docs/error-handling.md similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/docs/error-handling.md rename to deps/libgit2-sys-0.4.3/libgit2/docs/error-handling.md diff --git a/deps/libgit2-sys-0.4.0/libgit2/docs/merge-df_conflicts.txt b/deps/libgit2-sys-0.4.3/libgit2/docs/merge-df_conflicts.txt similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/docs/merge-df_conflicts.txt rename to deps/libgit2-sys-0.4.3/libgit2/docs/merge-df_conflicts.txt diff --git a/deps/libgit2-sys-0.4.0/libgit2/git.git-authors b/deps/libgit2-sys-0.4.3/libgit2/git.git-authors similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/git.git-authors rename to deps/libgit2-sys-0.4.3/libgit2/git.git-authors diff --git a/deps/libgit2-sys-0.4.0/libgit2/include/git2.h b/deps/libgit2-sys-0.4.3/libgit2/include/git2.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/include/git2.h rename to deps/libgit2-sys-0.4.3/libgit2/include/git2.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/include/git2/annotated_commit.h b/deps/libgit2-sys-0.4.3/libgit2/include/git2/annotated_commit.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/include/git2/annotated_commit.h rename to deps/libgit2-sys-0.4.3/libgit2/include/git2/annotated_commit.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/include/git2/attr.h b/deps/libgit2-sys-0.4.3/libgit2/include/git2/attr.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/include/git2/attr.h rename to deps/libgit2-sys-0.4.3/libgit2/include/git2/attr.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/include/git2/blame.h b/deps/libgit2-sys-0.4.3/libgit2/include/git2/blame.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/include/git2/blame.h rename to deps/libgit2-sys-0.4.3/libgit2/include/git2/blame.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/include/git2/blob.h b/deps/libgit2-sys-0.4.3/libgit2/include/git2/blob.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/include/git2/blob.h rename to deps/libgit2-sys-0.4.3/libgit2/include/git2/blob.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/include/git2/branch.h b/deps/libgit2-sys-0.4.3/libgit2/include/git2/branch.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/include/git2/branch.h rename to deps/libgit2-sys-0.4.3/libgit2/include/git2/branch.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/include/git2/buffer.h b/deps/libgit2-sys-0.4.3/libgit2/include/git2/buffer.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/include/git2/buffer.h rename to deps/libgit2-sys-0.4.3/libgit2/include/git2/buffer.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/include/git2/checkout.h b/deps/libgit2-sys-0.4.3/libgit2/include/git2/checkout.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/include/git2/checkout.h rename to deps/libgit2-sys-0.4.3/libgit2/include/git2/checkout.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/include/git2/cherrypick.h b/deps/libgit2-sys-0.4.3/libgit2/include/git2/cherrypick.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/include/git2/cherrypick.h rename to deps/libgit2-sys-0.4.3/libgit2/include/git2/cherrypick.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/include/git2/clone.h b/deps/libgit2-sys-0.4.3/libgit2/include/git2/clone.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/include/git2/clone.h rename to deps/libgit2-sys-0.4.3/libgit2/include/git2/clone.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/include/git2/commit.h b/deps/libgit2-sys-0.4.3/libgit2/include/git2/commit.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/include/git2/commit.h rename to deps/libgit2-sys-0.4.3/libgit2/include/git2/commit.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/include/git2/common.h b/deps/libgit2-sys-0.4.3/libgit2/include/git2/common.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/include/git2/common.h rename to deps/libgit2-sys-0.4.3/libgit2/include/git2/common.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/include/git2/config.h b/deps/libgit2-sys-0.4.3/libgit2/include/git2/config.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/include/git2/config.h rename to deps/libgit2-sys-0.4.3/libgit2/include/git2/config.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/include/git2/cred_helpers.h b/deps/libgit2-sys-0.4.3/libgit2/include/git2/cred_helpers.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/include/git2/cred_helpers.h rename to deps/libgit2-sys-0.4.3/libgit2/include/git2/cred_helpers.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/include/git2/describe.h b/deps/libgit2-sys-0.4.3/libgit2/include/git2/describe.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/include/git2/describe.h rename to deps/libgit2-sys-0.4.3/libgit2/include/git2/describe.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/include/git2/diff.h b/deps/libgit2-sys-0.4.3/libgit2/include/git2/diff.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/include/git2/diff.h rename to deps/libgit2-sys-0.4.3/libgit2/include/git2/diff.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/include/git2/errors.h b/deps/libgit2-sys-0.4.3/libgit2/include/git2/errors.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/include/git2/errors.h rename to deps/libgit2-sys-0.4.3/libgit2/include/git2/errors.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/include/git2/filter.h b/deps/libgit2-sys-0.4.3/libgit2/include/git2/filter.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/include/git2/filter.h rename to deps/libgit2-sys-0.4.3/libgit2/include/git2/filter.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/include/git2/global.h b/deps/libgit2-sys-0.4.3/libgit2/include/git2/global.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/include/git2/global.h rename to deps/libgit2-sys-0.4.3/libgit2/include/git2/global.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/include/git2/graph.h b/deps/libgit2-sys-0.4.3/libgit2/include/git2/graph.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/include/git2/graph.h rename to deps/libgit2-sys-0.4.3/libgit2/include/git2/graph.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/include/git2/ignore.h b/deps/libgit2-sys-0.4.3/libgit2/include/git2/ignore.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/include/git2/ignore.h rename to deps/libgit2-sys-0.4.3/libgit2/include/git2/ignore.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/include/git2/index.h b/deps/libgit2-sys-0.4.3/libgit2/include/git2/index.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/include/git2/index.h rename to deps/libgit2-sys-0.4.3/libgit2/include/git2/index.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/include/git2/indexer.h b/deps/libgit2-sys-0.4.3/libgit2/include/git2/indexer.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/include/git2/indexer.h rename to deps/libgit2-sys-0.4.3/libgit2/include/git2/indexer.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/include/git2/inttypes.h b/deps/libgit2-sys-0.4.3/libgit2/include/git2/inttypes.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/include/git2/inttypes.h rename to deps/libgit2-sys-0.4.3/libgit2/include/git2/inttypes.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/include/git2/merge.h b/deps/libgit2-sys-0.4.3/libgit2/include/git2/merge.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/include/git2/merge.h rename to deps/libgit2-sys-0.4.3/libgit2/include/git2/merge.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/include/git2/message.h b/deps/libgit2-sys-0.4.3/libgit2/include/git2/message.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/include/git2/message.h rename to deps/libgit2-sys-0.4.3/libgit2/include/git2/message.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/include/git2/net.h b/deps/libgit2-sys-0.4.3/libgit2/include/git2/net.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/include/git2/net.h rename to deps/libgit2-sys-0.4.3/libgit2/include/git2/net.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/include/git2/notes.h b/deps/libgit2-sys-0.4.3/libgit2/include/git2/notes.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/include/git2/notes.h rename to deps/libgit2-sys-0.4.3/libgit2/include/git2/notes.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/include/git2/object.h b/deps/libgit2-sys-0.4.3/libgit2/include/git2/object.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/include/git2/object.h rename to deps/libgit2-sys-0.4.3/libgit2/include/git2/object.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/include/git2/odb.h b/deps/libgit2-sys-0.4.3/libgit2/include/git2/odb.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/include/git2/odb.h rename to deps/libgit2-sys-0.4.3/libgit2/include/git2/odb.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/include/git2/odb_backend.h b/deps/libgit2-sys-0.4.3/libgit2/include/git2/odb_backend.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/include/git2/odb_backend.h rename to deps/libgit2-sys-0.4.3/libgit2/include/git2/odb_backend.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/include/git2/oid.h b/deps/libgit2-sys-0.4.3/libgit2/include/git2/oid.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/include/git2/oid.h rename to deps/libgit2-sys-0.4.3/libgit2/include/git2/oid.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/include/git2/oidarray.h b/deps/libgit2-sys-0.4.3/libgit2/include/git2/oidarray.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/include/git2/oidarray.h rename to deps/libgit2-sys-0.4.3/libgit2/include/git2/oidarray.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/include/git2/pack.h b/deps/libgit2-sys-0.4.3/libgit2/include/git2/pack.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/include/git2/pack.h rename to deps/libgit2-sys-0.4.3/libgit2/include/git2/pack.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/include/git2/patch.h b/deps/libgit2-sys-0.4.3/libgit2/include/git2/patch.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/include/git2/patch.h rename to deps/libgit2-sys-0.4.3/libgit2/include/git2/patch.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/include/git2/pathspec.h b/deps/libgit2-sys-0.4.3/libgit2/include/git2/pathspec.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/include/git2/pathspec.h rename to deps/libgit2-sys-0.4.3/libgit2/include/git2/pathspec.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/include/git2/rebase.h b/deps/libgit2-sys-0.4.3/libgit2/include/git2/rebase.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/include/git2/rebase.h rename to deps/libgit2-sys-0.4.3/libgit2/include/git2/rebase.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/include/git2/refdb.h b/deps/libgit2-sys-0.4.3/libgit2/include/git2/refdb.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/include/git2/refdb.h rename to deps/libgit2-sys-0.4.3/libgit2/include/git2/refdb.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/include/git2/reflog.h b/deps/libgit2-sys-0.4.3/libgit2/include/git2/reflog.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/include/git2/reflog.h rename to deps/libgit2-sys-0.4.3/libgit2/include/git2/reflog.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/include/git2/refs.h b/deps/libgit2-sys-0.4.3/libgit2/include/git2/refs.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/include/git2/refs.h rename to deps/libgit2-sys-0.4.3/libgit2/include/git2/refs.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/include/git2/refspec.h b/deps/libgit2-sys-0.4.3/libgit2/include/git2/refspec.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/include/git2/refspec.h rename to deps/libgit2-sys-0.4.3/libgit2/include/git2/refspec.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/include/git2/remote.h b/deps/libgit2-sys-0.4.3/libgit2/include/git2/remote.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/include/git2/remote.h rename to deps/libgit2-sys-0.4.3/libgit2/include/git2/remote.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/include/git2/repository.h b/deps/libgit2-sys-0.4.3/libgit2/include/git2/repository.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/include/git2/repository.h rename to deps/libgit2-sys-0.4.3/libgit2/include/git2/repository.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/include/git2/reset.h b/deps/libgit2-sys-0.4.3/libgit2/include/git2/reset.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/include/git2/reset.h rename to deps/libgit2-sys-0.4.3/libgit2/include/git2/reset.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/include/git2/revert.h b/deps/libgit2-sys-0.4.3/libgit2/include/git2/revert.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/include/git2/revert.h rename to deps/libgit2-sys-0.4.3/libgit2/include/git2/revert.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/include/git2/revparse.h b/deps/libgit2-sys-0.4.3/libgit2/include/git2/revparse.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/include/git2/revparse.h rename to deps/libgit2-sys-0.4.3/libgit2/include/git2/revparse.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/include/git2/revwalk.h b/deps/libgit2-sys-0.4.3/libgit2/include/git2/revwalk.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/include/git2/revwalk.h rename to deps/libgit2-sys-0.4.3/libgit2/include/git2/revwalk.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/include/git2/signature.h b/deps/libgit2-sys-0.4.3/libgit2/include/git2/signature.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/include/git2/signature.h rename to deps/libgit2-sys-0.4.3/libgit2/include/git2/signature.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/include/git2/stash.h b/deps/libgit2-sys-0.4.3/libgit2/include/git2/stash.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/include/git2/stash.h rename to deps/libgit2-sys-0.4.3/libgit2/include/git2/stash.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/include/git2/status.h b/deps/libgit2-sys-0.4.3/libgit2/include/git2/status.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/include/git2/status.h rename to deps/libgit2-sys-0.4.3/libgit2/include/git2/status.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/include/git2/stdint.h b/deps/libgit2-sys-0.4.3/libgit2/include/git2/stdint.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/include/git2/stdint.h rename to deps/libgit2-sys-0.4.3/libgit2/include/git2/stdint.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/include/git2/strarray.h b/deps/libgit2-sys-0.4.3/libgit2/include/git2/strarray.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/include/git2/strarray.h rename to deps/libgit2-sys-0.4.3/libgit2/include/git2/strarray.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/include/git2/submodule.h b/deps/libgit2-sys-0.4.3/libgit2/include/git2/submodule.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/include/git2/submodule.h rename to deps/libgit2-sys-0.4.3/libgit2/include/git2/submodule.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/include/git2/sys/commit.h b/deps/libgit2-sys-0.4.3/libgit2/include/git2/sys/commit.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/include/git2/sys/commit.h rename to deps/libgit2-sys-0.4.3/libgit2/include/git2/sys/commit.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/include/git2/sys/config.h b/deps/libgit2-sys-0.4.3/libgit2/include/git2/sys/config.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/include/git2/sys/config.h rename to deps/libgit2-sys-0.4.3/libgit2/include/git2/sys/config.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/include/git2/sys/diff.h b/deps/libgit2-sys-0.4.3/libgit2/include/git2/sys/diff.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/include/git2/sys/diff.h rename to deps/libgit2-sys-0.4.3/libgit2/include/git2/sys/diff.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/include/git2/sys/filter.h b/deps/libgit2-sys-0.4.3/libgit2/include/git2/sys/filter.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/include/git2/sys/filter.h rename to deps/libgit2-sys-0.4.3/libgit2/include/git2/sys/filter.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/include/git2/sys/hashsig.h b/deps/libgit2-sys-0.4.3/libgit2/include/git2/sys/hashsig.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/include/git2/sys/hashsig.h rename to deps/libgit2-sys-0.4.3/libgit2/include/git2/sys/hashsig.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/include/git2/sys/index.h b/deps/libgit2-sys-0.4.3/libgit2/include/git2/sys/index.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/include/git2/sys/index.h rename to deps/libgit2-sys-0.4.3/libgit2/include/git2/sys/index.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/include/git2/sys/mempack.h b/deps/libgit2-sys-0.4.3/libgit2/include/git2/sys/mempack.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/include/git2/sys/mempack.h rename to deps/libgit2-sys-0.4.3/libgit2/include/git2/sys/mempack.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/include/git2/sys/odb_backend.h b/deps/libgit2-sys-0.4.3/libgit2/include/git2/sys/odb_backend.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/include/git2/sys/odb_backend.h rename to deps/libgit2-sys-0.4.3/libgit2/include/git2/sys/odb_backend.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/include/git2/sys/openssl.h b/deps/libgit2-sys-0.4.3/libgit2/include/git2/sys/openssl.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/include/git2/sys/openssl.h rename to deps/libgit2-sys-0.4.3/libgit2/include/git2/sys/openssl.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/include/git2/sys/refdb_backend.h b/deps/libgit2-sys-0.4.3/libgit2/include/git2/sys/refdb_backend.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/include/git2/sys/refdb_backend.h rename to deps/libgit2-sys-0.4.3/libgit2/include/git2/sys/refdb_backend.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/include/git2/sys/reflog.h b/deps/libgit2-sys-0.4.3/libgit2/include/git2/sys/reflog.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/include/git2/sys/reflog.h rename to deps/libgit2-sys-0.4.3/libgit2/include/git2/sys/reflog.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/include/git2/sys/refs.h b/deps/libgit2-sys-0.4.3/libgit2/include/git2/sys/refs.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/include/git2/sys/refs.h rename to deps/libgit2-sys-0.4.3/libgit2/include/git2/sys/refs.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/include/git2/sys/repository.h b/deps/libgit2-sys-0.4.3/libgit2/include/git2/sys/repository.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/include/git2/sys/repository.h rename to deps/libgit2-sys-0.4.3/libgit2/include/git2/sys/repository.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/include/git2/sys/stream.h b/deps/libgit2-sys-0.4.3/libgit2/include/git2/sys/stream.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/include/git2/sys/stream.h rename to deps/libgit2-sys-0.4.3/libgit2/include/git2/sys/stream.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/include/git2/sys/transport.h b/deps/libgit2-sys-0.4.3/libgit2/include/git2/sys/transport.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/include/git2/sys/transport.h rename to deps/libgit2-sys-0.4.3/libgit2/include/git2/sys/transport.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/include/git2/tag.h b/deps/libgit2-sys-0.4.3/libgit2/include/git2/tag.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/include/git2/tag.h rename to deps/libgit2-sys-0.4.3/libgit2/include/git2/tag.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/include/git2/trace.h b/deps/libgit2-sys-0.4.3/libgit2/include/git2/trace.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/include/git2/trace.h rename to deps/libgit2-sys-0.4.3/libgit2/include/git2/trace.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/include/git2/transaction.h b/deps/libgit2-sys-0.4.3/libgit2/include/git2/transaction.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/include/git2/transaction.h rename to deps/libgit2-sys-0.4.3/libgit2/include/git2/transaction.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/include/git2/transport.h b/deps/libgit2-sys-0.4.3/libgit2/include/git2/transport.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/include/git2/transport.h rename to deps/libgit2-sys-0.4.3/libgit2/include/git2/transport.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/include/git2/tree.h b/deps/libgit2-sys-0.4.3/libgit2/include/git2/tree.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/include/git2/tree.h rename to deps/libgit2-sys-0.4.3/libgit2/include/git2/tree.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/include/git2/types.h b/deps/libgit2-sys-0.4.3/libgit2/include/git2/types.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/include/git2/types.h rename to deps/libgit2-sys-0.4.3/libgit2/include/git2/types.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/include/git2/version.h b/deps/libgit2-sys-0.4.3/libgit2/include/git2/version.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/include/git2/version.h rename to deps/libgit2-sys-0.4.3/libgit2/include/git2/version.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/libgit2.pc.in b/deps/libgit2-sys-0.4.3/libgit2/libgit2.pc.in similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/libgit2.pc.in rename to deps/libgit2-sys-0.4.3/libgit2/libgit2.pc.in diff --git a/deps/libgit2-sys-0.4.0/libgit2/libgit2_clar.supp b/deps/libgit2-sys-0.4.3/libgit2/libgit2_clar.supp similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/libgit2_clar.supp rename to deps/libgit2-sys-0.4.3/libgit2/libgit2_clar.supp diff --git a/deps/libgit2-sys-0.4.0/libgit2/script/appveyor-mingw.sh b/deps/libgit2-sys-0.4.3/libgit2/script/appveyor-mingw.sh similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/script/appveyor-mingw.sh rename to deps/libgit2-sys-0.4.3/libgit2/script/appveyor-mingw.sh diff --git a/deps/libgit2-sys-0.4.0/libgit2/script/cibuild.sh b/deps/libgit2-sys-0.4.3/libgit2/script/cibuild.sh similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/script/cibuild.sh rename to deps/libgit2-sys-0.4.3/libgit2/script/cibuild.sh diff --git a/deps/libgit2-sys-0.4.0/libgit2/script/coverity.sh b/deps/libgit2-sys-0.4.3/libgit2/script/coverity.sh similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/script/coverity.sh rename to deps/libgit2-sys-0.4.3/libgit2/script/coverity.sh diff --git a/deps/libgit2-sys-0.4.0/libgit2/script/install-deps-osx.sh b/deps/libgit2-sys-0.4.3/libgit2/script/install-deps-osx.sh similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/script/install-deps-osx.sh rename to deps/libgit2-sys-0.4.3/libgit2/script/install-deps-osx.sh diff --git a/deps/libgit2-sys-0.4.0/libgit2/script/user_nodefs.h b/deps/libgit2-sys-0.4.3/libgit2/script/user_nodefs.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/script/user_nodefs.h rename to deps/libgit2-sys-0.4.3/libgit2/script/user_nodefs.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/annotated_commit.c b/deps/libgit2-sys-0.4.3/libgit2/src/annotated_commit.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/annotated_commit.c rename to deps/libgit2-sys-0.4.3/libgit2/src/annotated_commit.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/annotated_commit.h b/deps/libgit2-sys-0.4.3/libgit2/src/annotated_commit.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/annotated_commit.h rename to deps/libgit2-sys-0.4.3/libgit2/src/annotated_commit.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/array.h b/deps/libgit2-sys-0.4.3/libgit2/src/array.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/array.h rename to deps/libgit2-sys-0.4.3/libgit2/src/array.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/attr.c b/deps/libgit2-sys-0.4.3/libgit2/src/attr.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/attr.c rename to deps/libgit2-sys-0.4.3/libgit2/src/attr.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/attr.h b/deps/libgit2-sys-0.4.3/libgit2/src/attr.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/attr.h rename to deps/libgit2-sys-0.4.3/libgit2/src/attr.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/attr_file.c b/deps/libgit2-sys-0.4.3/libgit2/src/attr_file.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/attr_file.c rename to deps/libgit2-sys-0.4.3/libgit2/src/attr_file.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/attr_file.h b/deps/libgit2-sys-0.4.3/libgit2/src/attr_file.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/attr_file.h rename to deps/libgit2-sys-0.4.3/libgit2/src/attr_file.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/attrcache.c b/deps/libgit2-sys-0.4.3/libgit2/src/attrcache.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/attrcache.c rename to deps/libgit2-sys-0.4.3/libgit2/src/attrcache.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/attrcache.h b/deps/libgit2-sys-0.4.3/libgit2/src/attrcache.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/attrcache.h rename to deps/libgit2-sys-0.4.3/libgit2/src/attrcache.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/bitvec.h b/deps/libgit2-sys-0.4.3/libgit2/src/bitvec.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/bitvec.h rename to deps/libgit2-sys-0.4.3/libgit2/src/bitvec.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/blame.c b/deps/libgit2-sys-0.4.3/libgit2/src/blame.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/blame.c rename to deps/libgit2-sys-0.4.3/libgit2/src/blame.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/blame.h b/deps/libgit2-sys-0.4.3/libgit2/src/blame.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/blame.h rename to deps/libgit2-sys-0.4.3/libgit2/src/blame.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/blame_git.c b/deps/libgit2-sys-0.4.3/libgit2/src/blame_git.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/blame_git.c rename to deps/libgit2-sys-0.4.3/libgit2/src/blame_git.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/blame_git.h b/deps/libgit2-sys-0.4.3/libgit2/src/blame_git.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/blame_git.h rename to deps/libgit2-sys-0.4.3/libgit2/src/blame_git.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/blob.c b/deps/libgit2-sys-0.4.3/libgit2/src/blob.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/blob.c rename to deps/libgit2-sys-0.4.3/libgit2/src/blob.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/blob.h b/deps/libgit2-sys-0.4.3/libgit2/src/blob.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/blob.h rename to deps/libgit2-sys-0.4.3/libgit2/src/blob.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/branch.c b/deps/libgit2-sys-0.4.3/libgit2/src/branch.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/branch.c rename to deps/libgit2-sys-0.4.3/libgit2/src/branch.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/branch.h b/deps/libgit2-sys-0.4.3/libgit2/src/branch.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/branch.h rename to deps/libgit2-sys-0.4.3/libgit2/src/branch.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/buf_text.c b/deps/libgit2-sys-0.4.3/libgit2/src/buf_text.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/buf_text.c rename to deps/libgit2-sys-0.4.3/libgit2/src/buf_text.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/buf_text.h b/deps/libgit2-sys-0.4.3/libgit2/src/buf_text.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/buf_text.h rename to deps/libgit2-sys-0.4.3/libgit2/src/buf_text.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/buffer.c b/deps/libgit2-sys-0.4.3/libgit2/src/buffer.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/buffer.c rename to deps/libgit2-sys-0.4.3/libgit2/src/buffer.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/buffer.h b/deps/libgit2-sys-0.4.3/libgit2/src/buffer.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/buffer.h rename to deps/libgit2-sys-0.4.3/libgit2/src/buffer.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/cache.c b/deps/libgit2-sys-0.4.3/libgit2/src/cache.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/cache.c rename to deps/libgit2-sys-0.4.3/libgit2/src/cache.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/cache.h b/deps/libgit2-sys-0.4.3/libgit2/src/cache.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/cache.h rename to deps/libgit2-sys-0.4.3/libgit2/src/cache.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/cc-compat.h b/deps/libgit2-sys-0.4.3/libgit2/src/cc-compat.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/cc-compat.h rename to deps/libgit2-sys-0.4.3/libgit2/src/cc-compat.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/checkout.c b/deps/libgit2-sys-0.4.3/libgit2/src/checkout.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/checkout.c rename to deps/libgit2-sys-0.4.3/libgit2/src/checkout.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/checkout.h b/deps/libgit2-sys-0.4.3/libgit2/src/checkout.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/checkout.h rename to deps/libgit2-sys-0.4.3/libgit2/src/checkout.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/cherrypick.c b/deps/libgit2-sys-0.4.3/libgit2/src/cherrypick.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/cherrypick.c rename to deps/libgit2-sys-0.4.3/libgit2/src/cherrypick.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/clone.c b/deps/libgit2-sys-0.4.3/libgit2/src/clone.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/clone.c rename to deps/libgit2-sys-0.4.3/libgit2/src/clone.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/clone.h b/deps/libgit2-sys-0.4.3/libgit2/src/clone.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/clone.h rename to deps/libgit2-sys-0.4.3/libgit2/src/clone.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/commit.c b/deps/libgit2-sys-0.4.3/libgit2/src/commit.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/commit.c rename to deps/libgit2-sys-0.4.3/libgit2/src/commit.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/commit.h b/deps/libgit2-sys-0.4.3/libgit2/src/commit.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/commit.h rename to deps/libgit2-sys-0.4.3/libgit2/src/commit.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/commit_list.c b/deps/libgit2-sys-0.4.3/libgit2/src/commit_list.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/commit_list.c rename to deps/libgit2-sys-0.4.3/libgit2/src/commit_list.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/commit_list.h b/deps/libgit2-sys-0.4.3/libgit2/src/commit_list.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/commit_list.h rename to deps/libgit2-sys-0.4.3/libgit2/src/commit_list.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/common.h b/deps/libgit2-sys-0.4.3/libgit2/src/common.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/common.h rename to deps/libgit2-sys-0.4.3/libgit2/src/common.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/config.c b/deps/libgit2-sys-0.4.3/libgit2/src/config.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/config.c rename to deps/libgit2-sys-0.4.3/libgit2/src/config.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/config.h b/deps/libgit2-sys-0.4.3/libgit2/src/config.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/config.h rename to deps/libgit2-sys-0.4.3/libgit2/src/config.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/config_cache.c b/deps/libgit2-sys-0.4.3/libgit2/src/config_cache.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/config_cache.c rename to deps/libgit2-sys-0.4.3/libgit2/src/config_cache.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/config_file.c b/deps/libgit2-sys-0.4.3/libgit2/src/config_file.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/config_file.c rename to deps/libgit2-sys-0.4.3/libgit2/src/config_file.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/config_file.h b/deps/libgit2-sys-0.4.3/libgit2/src/config_file.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/config_file.h rename to deps/libgit2-sys-0.4.3/libgit2/src/config_file.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/crlf.c b/deps/libgit2-sys-0.4.3/libgit2/src/crlf.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/crlf.c rename to deps/libgit2-sys-0.4.3/libgit2/src/crlf.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/curl_stream.c b/deps/libgit2-sys-0.4.3/libgit2/src/curl_stream.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/curl_stream.c rename to deps/libgit2-sys-0.4.3/libgit2/src/curl_stream.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/curl_stream.h b/deps/libgit2-sys-0.4.3/libgit2/src/curl_stream.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/curl_stream.h rename to deps/libgit2-sys-0.4.3/libgit2/src/curl_stream.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/date.c b/deps/libgit2-sys-0.4.3/libgit2/src/date.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/date.c rename to deps/libgit2-sys-0.4.3/libgit2/src/date.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/delta-apply.c b/deps/libgit2-sys-0.4.3/libgit2/src/delta-apply.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/delta-apply.c rename to deps/libgit2-sys-0.4.3/libgit2/src/delta-apply.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/delta-apply.h b/deps/libgit2-sys-0.4.3/libgit2/src/delta-apply.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/delta-apply.h rename to deps/libgit2-sys-0.4.3/libgit2/src/delta-apply.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/delta.c b/deps/libgit2-sys-0.4.3/libgit2/src/delta.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/delta.c rename to deps/libgit2-sys-0.4.3/libgit2/src/delta.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/delta.h b/deps/libgit2-sys-0.4.3/libgit2/src/delta.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/delta.h rename to deps/libgit2-sys-0.4.3/libgit2/src/delta.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/describe.c b/deps/libgit2-sys-0.4.3/libgit2/src/describe.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/describe.c rename to deps/libgit2-sys-0.4.3/libgit2/src/describe.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/diff.c b/deps/libgit2-sys-0.4.3/libgit2/src/diff.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/diff.c rename to deps/libgit2-sys-0.4.3/libgit2/src/diff.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/diff.h b/deps/libgit2-sys-0.4.3/libgit2/src/diff.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/diff.h rename to deps/libgit2-sys-0.4.3/libgit2/src/diff.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/diff_driver.c b/deps/libgit2-sys-0.4.3/libgit2/src/diff_driver.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/diff_driver.c rename to deps/libgit2-sys-0.4.3/libgit2/src/diff_driver.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/diff_driver.h b/deps/libgit2-sys-0.4.3/libgit2/src/diff_driver.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/diff_driver.h rename to deps/libgit2-sys-0.4.3/libgit2/src/diff_driver.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/diff_file.c b/deps/libgit2-sys-0.4.3/libgit2/src/diff_file.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/diff_file.c rename to deps/libgit2-sys-0.4.3/libgit2/src/diff_file.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/diff_file.h b/deps/libgit2-sys-0.4.3/libgit2/src/diff_file.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/diff_file.h rename to deps/libgit2-sys-0.4.3/libgit2/src/diff_file.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/diff_patch.c b/deps/libgit2-sys-0.4.3/libgit2/src/diff_patch.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/diff_patch.c rename to deps/libgit2-sys-0.4.3/libgit2/src/diff_patch.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/diff_patch.h b/deps/libgit2-sys-0.4.3/libgit2/src/diff_patch.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/diff_patch.h rename to deps/libgit2-sys-0.4.3/libgit2/src/diff_patch.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/diff_print.c b/deps/libgit2-sys-0.4.3/libgit2/src/diff_print.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/diff_print.c rename to deps/libgit2-sys-0.4.3/libgit2/src/diff_print.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/diff_stats.c b/deps/libgit2-sys-0.4.3/libgit2/src/diff_stats.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/diff_stats.c rename to deps/libgit2-sys-0.4.3/libgit2/src/diff_stats.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/diff_tform.c b/deps/libgit2-sys-0.4.3/libgit2/src/diff_tform.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/diff_tform.c rename to deps/libgit2-sys-0.4.3/libgit2/src/diff_tform.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/diff_xdiff.c b/deps/libgit2-sys-0.4.3/libgit2/src/diff_xdiff.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/diff_xdiff.c rename to deps/libgit2-sys-0.4.3/libgit2/src/diff_xdiff.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/diff_xdiff.h b/deps/libgit2-sys-0.4.3/libgit2/src/diff_xdiff.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/diff_xdiff.h rename to deps/libgit2-sys-0.4.3/libgit2/src/diff_xdiff.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/errors.c b/deps/libgit2-sys-0.4.3/libgit2/src/errors.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/errors.c rename to deps/libgit2-sys-0.4.3/libgit2/src/errors.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/fetch.c b/deps/libgit2-sys-0.4.3/libgit2/src/fetch.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/fetch.c rename to deps/libgit2-sys-0.4.3/libgit2/src/fetch.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/fetch.h b/deps/libgit2-sys-0.4.3/libgit2/src/fetch.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/fetch.h rename to deps/libgit2-sys-0.4.3/libgit2/src/fetch.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/fetchhead.c b/deps/libgit2-sys-0.4.3/libgit2/src/fetchhead.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/fetchhead.c rename to deps/libgit2-sys-0.4.3/libgit2/src/fetchhead.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/fetchhead.h b/deps/libgit2-sys-0.4.3/libgit2/src/fetchhead.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/fetchhead.h rename to deps/libgit2-sys-0.4.3/libgit2/src/fetchhead.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/filebuf.c b/deps/libgit2-sys-0.4.3/libgit2/src/filebuf.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/filebuf.c rename to deps/libgit2-sys-0.4.3/libgit2/src/filebuf.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/filebuf.h b/deps/libgit2-sys-0.4.3/libgit2/src/filebuf.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/filebuf.h rename to deps/libgit2-sys-0.4.3/libgit2/src/filebuf.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/fileops.c b/deps/libgit2-sys-0.4.3/libgit2/src/fileops.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/fileops.c rename to deps/libgit2-sys-0.4.3/libgit2/src/fileops.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/fileops.h b/deps/libgit2-sys-0.4.3/libgit2/src/fileops.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/fileops.h rename to deps/libgit2-sys-0.4.3/libgit2/src/fileops.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/filter.c b/deps/libgit2-sys-0.4.3/libgit2/src/filter.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/filter.c rename to deps/libgit2-sys-0.4.3/libgit2/src/filter.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/filter.h b/deps/libgit2-sys-0.4.3/libgit2/src/filter.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/filter.h rename to deps/libgit2-sys-0.4.3/libgit2/src/filter.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/fnmatch.c b/deps/libgit2-sys-0.4.3/libgit2/src/fnmatch.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/fnmatch.c rename to deps/libgit2-sys-0.4.3/libgit2/src/fnmatch.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/fnmatch.h b/deps/libgit2-sys-0.4.3/libgit2/src/fnmatch.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/fnmatch.h rename to deps/libgit2-sys-0.4.3/libgit2/src/fnmatch.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/global.c b/deps/libgit2-sys-0.4.3/libgit2/src/global.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/global.c rename to deps/libgit2-sys-0.4.3/libgit2/src/global.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/global.h b/deps/libgit2-sys-0.4.3/libgit2/src/global.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/global.h rename to deps/libgit2-sys-0.4.3/libgit2/src/global.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/graph.c b/deps/libgit2-sys-0.4.3/libgit2/src/graph.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/graph.c rename to deps/libgit2-sys-0.4.3/libgit2/src/graph.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/hash.c b/deps/libgit2-sys-0.4.3/libgit2/src/hash.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/hash.c rename to deps/libgit2-sys-0.4.3/libgit2/src/hash.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/hash.h b/deps/libgit2-sys-0.4.3/libgit2/src/hash.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/hash.h rename to deps/libgit2-sys-0.4.3/libgit2/src/hash.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/hash/hash_common_crypto.h b/deps/libgit2-sys-0.4.3/libgit2/src/hash/hash_common_crypto.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/hash/hash_common_crypto.h rename to deps/libgit2-sys-0.4.3/libgit2/src/hash/hash_common_crypto.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/hash/hash_generic.c b/deps/libgit2-sys-0.4.3/libgit2/src/hash/hash_generic.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/hash/hash_generic.c rename to deps/libgit2-sys-0.4.3/libgit2/src/hash/hash_generic.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/hash/hash_generic.h b/deps/libgit2-sys-0.4.3/libgit2/src/hash/hash_generic.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/hash/hash_generic.h rename to deps/libgit2-sys-0.4.3/libgit2/src/hash/hash_generic.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/hash/hash_openssl.h b/deps/libgit2-sys-0.4.3/libgit2/src/hash/hash_openssl.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/hash/hash_openssl.h rename to deps/libgit2-sys-0.4.3/libgit2/src/hash/hash_openssl.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/hash/hash_win32.c b/deps/libgit2-sys-0.4.3/libgit2/src/hash/hash_win32.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/hash/hash_win32.c rename to deps/libgit2-sys-0.4.3/libgit2/src/hash/hash_win32.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/hash/hash_win32.h b/deps/libgit2-sys-0.4.3/libgit2/src/hash/hash_win32.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/hash/hash_win32.h rename to deps/libgit2-sys-0.4.3/libgit2/src/hash/hash_win32.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/hashsig.c b/deps/libgit2-sys-0.4.3/libgit2/src/hashsig.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/hashsig.c rename to deps/libgit2-sys-0.4.3/libgit2/src/hashsig.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/ident.c b/deps/libgit2-sys-0.4.3/libgit2/src/ident.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/ident.c rename to deps/libgit2-sys-0.4.3/libgit2/src/ident.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/idxmap.h b/deps/libgit2-sys-0.4.3/libgit2/src/idxmap.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/idxmap.h rename to deps/libgit2-sys-0.4.3/libgit2/src/idxmap.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/ignore.c b/deps/libgit2-sys-0.4.3/libgit2/src/ignore.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/ignore.c rename to deps/libgit2-sys-0.4.3/libgit2/src/ignore.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/ignore.h b/deps/libgit2-sys-0.4.3/libgit2/src/ignore.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/ignore.h rename to deps/libgit2-sys-0.4.3/libgit2/src/ignore.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/index.c b/deps/libgit2-sys-0.4.3/libgit2/src/index.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/index.c rename to deps/libgit2-sys-0.4.3/libgit2/src/index.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/index.h b/deps/libgit2-sys-0.4.3/libgit2/src/index.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/index.h rename to deps/libgit2-sys-0.4.3/libgit2/src/index.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/indexer.c b/deps/libgit2-sys-0.4.3/libgit2/src/indexer.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/indexer.c rename to deps/libgit2-sys-0.4.3/libgit2/src/indexer.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/integer.h b/deps/libgit2-sys-0.4.3/libgit2/src/integer.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/integer.h rename to deps/libgit2-sys-0.4.3/libgit2/src/integer.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/iterator.c b/deps/libgit2-sys-0.4.3/libgit2/src/iterator.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/iterator.c rename to deps/libgit2-sys-0.4.3/libgit2/src/iterator.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/iterator.h b/deps/libgit2-sys-0.4.3/libgit2/src/iterator.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/iterator.h rename to deps/libgit2-sys-0.4.3/libgit2/src/iterator.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/khash.h b/deps/libgit2-sys-0.4.3/libgit2/src/khash.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/khash.h rename to deps/libgit2-sys-0.4.3/libgit2/src/khash.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/map.h b/deps/libgit2-sys-0.4.3/libgit2/src/map.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/map.h rename to deps/libgit2-sys-0.4.3/libgit2/src/map.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/merge.c b/deps/libgit2-sys-0.4.3/libgit2/src/merge.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/merge.c rename to deps/libgit2-sys-0.4.3/libgit2/src/merge.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/merge.h b/deps/libgit2-sys-0.4.3/libgit2/src/merge.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/merge.h rename to deps/libgit2-sys-0.4.3/libgit2/src/merge.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/merge_file.c b/deps/libgit2-sys-0.4.3/libgit2/src/merge_file.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/merge_file.c rename to deps/libgit2-sys-0.4.3/libgit2/src/merge_file.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/message.c b/deps/libgit2-sys-0.4.3/libgit2/src/message.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/message.c rename to deps/libgit2-sys-0.4.3/libgit2/src/message.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/message.h b/deps/libgit2-sys-0.4.3/libgit2/src/message.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/message.h rename to deps/libgit2-sys-0.4.3/libgit2/src/message.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/mwindow.c b/deps/libgit2-sys-0.4.3/libgit2/src/mwindow.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/mwindow.c rename to deps/libgit2-sys-0.4.3/libgit2/src/mwindow.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/mwindow.h b/deps/libgit2-sys-0.4.3/libgit2/src/mwindow.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/mwindow.h rename to deps/libgit2-sys-0.4.3/libgit2/src/mwindow.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/netops.c b/deps/libgit2-sys-0.4.3/libgit2/src/netops.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/netops.c rename to deps/libgit2-sys-0.4.3/libgit2/src/netops.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/netops.h b/deps/libgit2-sys-0.4.3/libgit2/src/netops.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/netops.h rename to deps/libgit2-sys-0.4.3/libgit2/src/netops.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/notes.c b/deps/libgit2-sys-0.4.3/libgit2/src/notes.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/notes.c rename to deps/libgit2-sys-0.4.3/libgit2/src/notes.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/notes.h b/deps/libgit2-sys-0.4.3/libgit2/src/notes.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/notes.h rename to deps/libgit2-sys-0.4.3/libgit2/src/notes.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/object.c b/deps/libgit2-sys-0.4.3/libgit2/src/object.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/object.c rename to deps/libgit2-sys-0.4.3/libgit2/src/object.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/object.h b/deps/libgit2-sys-0.4.3/libgit2/src/object.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/object.h rename to deps/libgit2-sys-0.4.3/libgit2/src/object.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/object_api.c b/deps/libgit2-sys-0.4.3/libgit2/src/object_api.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/object_api.c rename to deps/libgit2-sys-0.4.3/libgit2/src/object_api.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/odb.c b/deps/libgit2-sys-0.4.3/libgit2/src/odb.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/odb.c rename to deps/libgit2-sys-0.4.3/libgit2/src/odb.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/odb.h b/deps/libgit2-sys-0.4.3/libgit2/src/odb.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/odb.h rename to deps/libgit2-sys-0.4.3/libgit2/src/odb.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/odb_loose.c b/deps/libgit2-sys-0.4.3/libgit2/src/odb_loose.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/odb_loose.c rename to deps/libgit2-sys-0.4.3/libgit2/src/odb_loose.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/odb_mempack.c b/deps/libgit2-sys-0.4.3/libgit2/src/odb_mempack.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/odb_mempack.c rename to deps/libgit2-sys-0.4.3/libgit2/src/odb_mempack.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/odb_pack.c b/deps/libgit2-sys-0.4.3/libgit2/src/odb_pack.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/odb_pack.c rename to deps/libgit2-sys-0.4.3/libgit2/src/odb_pack.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/offmap.h b/deps/libgit2-sys-0.4.3/libgit2/src/offmap.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/offmap.h rename to deps/libgit2-sys-0.4.3/libgit2/src/offmap.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/oid.c b/deps/libgit2-sys-0.4.3/libgit2/src/oid.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/oid.c rename to deps/libgit2-sys-0.4.3/libgit2/src/oid.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/oid.h b/deps/libgit2-sys-0.4.3/libgit2/src/oid.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/oid.h rename to deps/libgit2-sys-0.4.3/libgit2/src/oid.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/oidarray.c b/deps/libgit2-sys-0.4.3/libgit2/src/oidarray.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/oidarray.c rename to deps/libgit2-sys-0.4.3/libgit2/src/oidarray.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/oidarray.h b/deps/libgit2-sys-0.4.3/libgit2/src/oidarray.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/oidarray.h rename to deps/libgit2-sys-0.4.3/libgit2/src/oidarray.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/oidmap.h b/deps/libgit2-sys-0.4.3/libgit2/src/oidmap.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/oidmap.h rename to deps/libgit2-sys-0.4.3/libgit2/src/oidmap.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/openssl_stream.c b/deps/libgit2-sys-0.4.3/libgit2/src/openssl_stream.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/openssl_stream.c rename to deps/libgit2-sys-0.4.3/libgit2/src/openssl_stream.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/openssl_stream.h b/deps/libgit2-sys-0.4.3/libgit2/src/openssl_stream.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/openssl_stream.h rename to deps/libgit2-sys-0.4.3/libgit2/src/openssl_stream.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/pack-objects.c b/deps/libgit2-sys-0.4.3/libgit2/src/pack-objects.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/pack-objects.c rename to deps/libgit2-sys-0.4.3/libgit2/src/pack-objects.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/pack-objects.h b/deps/libgit2-sys-0.4.3/libgit2/src/pack-objects.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/pack-objects.h rename to deps/libgit2-sys-0.4.3/libgit2/src/pack-objects.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/pack.c b/deps/libgit2-sys-0.4.3/libgit2/src/pack.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/pack.c rename to deps/libgit2-sys-0.4.3/libgit2/src/pack.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/pack.h b/deps/libgit2-sys-0.4.3/libgit2/src/pack.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/pack.h rename to deps/libgit2-sys-0.4.3/libgit2/src/pack.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/path.c b/deps/libgit2-sys-0.4.3/libgit2/src/path.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/path.c rename to deps/libgit2-sys-0.4.3/libgit2/src/path.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/path.h b/deps/libgit2-sys-0.4.3/libgit2/src/path.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/path.h rename to deps/libgit2-sys-0.4.3/libgit2/src/path.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/pathspec.c b/deps/libgit2-sys-0.4.3/libgit2/src/pathspec.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/pathspec.c rename to deps/libgit2-sys-0.4.3/libgit2/src/pathspec.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/pathspec.h b/deps/libgit2-sys-0.4.3/libgit2/src/pathspec.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/pathspec.h rename to deps/libgit2-sys-0.4.3/libgit2/src/pathspec.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/pool.c b/deps/libgit2-sys-0.4.3/libgit2/src/pool.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/pool.c rename to deps/libgit2-sys-0.4.3/libgit2/src/pool.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/pool.h b/deps/libgit2-sys-0.4.3/libgit2/src/pool.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/pool.h rename to deps/libgit2-sys-0.4.3/libgit2/src/pool.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/posix.c b/deps/libgit2-sys-0.4.3/libgit2/src/posix.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/posix.c rename to deps/libgit2-sys-0.4.3/libgit2/src/posix.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/posix.h b/deps/libgit2-sys-0.4.3/libgit2/src/posix.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/posix.h rename to deps/libgit2-sys-0.4.3/libgit2/src/posix.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/pqueue.c b/deps/libgit2-sys-0.4.3/libgit2/src/pqueue.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/pqueue.c rename to deps/libgit2-sys-0.4.3/libgit2/src/pqueue.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/pqueue.h b/deps/libgit2-sys-0.4.3/libgit2/src/pqueue.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/pqueue.h rename to deps/libgit2-sys-0.4.3/libgit2/src/pqueue.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/push.c b/deps/libgit2-sys-0.4.3/libgit2/src/push.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/push.c rename to deps/libgit2-sys-0.4.3/libgit2/src/push.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/push.h b/deps/libgit2-sys-0.4.3/libgit2/src/push.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/push.h rename to deps/libgit2-sys-0.4.3/libgit2/src/push.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/rebase.c b/deps/libgit2-sys-0.4.3/libgit2/src/rebase.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/rebase.c rename to deps/libgit2-sys-0.4.3/libgit2/src/rebase.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/refdb.c b/deps/libgit2-sys-0.4.3/libgit2/src/refdb.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/refdb.c rename to deps/libgit2-sys-0.4.3/libgit2/src/refdb.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/refdb.h b/deps/libgit2-sys-0.4.3/libgit2/src/refdb.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/refdb.h rename to deps/libgit2-sys-0.4.3/libgit2/src/refdb.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/refdb_fs.c b/deps/libgit2-sys-0.4.3/libgit2/src/refdb_fs.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/refdb_fs.c rename to deps/libgit2-sys-0.4.3/libgit2/src/refdb_fs.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/refdb_fs.h b/deps/libgit2-sys-0.4.3/libgit2/src/refdb_fs.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/refdb_fs.h rename to deps/libgit2-sys-0.4.3/libgit2/src/refdb_fs.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/reflog.c b/deps/libgit2-sys-0.4.3/libgit2/src/reflog.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/reflog.c rename to deps/libgit2-sys-0.4.3/libgit2/src/reflog.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/reflog.h b/deps/libgit2-sys-0.4.3/libgit2/src/reflog.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/reflog.h rename to deps/libgit2-sys-0.4.3/libgit2/src/reflog.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/refs.c b/deps/libgit2-sys-0.4.3/libgit2/src/refs.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/refs.c rename to deps/libgit2-sys-0.4.3/libgit2/src/refs.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/refs.h b/deps/libgit2-sys-0.4.3/libgit2/src/refs.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/refs.h rename to deps/libgit2-sys-0.4.3/libgit2/src/refs.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/refspec.c b/deps/libgit2-sys-0.4.3/libgit2/src/refspec.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/refspec.c rename to deps/libgit2-sys-0.4.3/libgit2/src/refspec.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/refspec.h b/deps/libgit2-sys-0.4.3/libgit2/src/refspec.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/refspec.h rename to deps/libgit2-sys-0.4.3/libgit2/src/refspec.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/remote.c b/deps/libgit2-sys-0.4.3/libgit2/src/remote.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/remote.c rename to deps/libgit2-sys-0.4.3/libgit2/src/remote.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/remote.h b/deps/libgit2-sys-0.4.3/libgit2/src/remote.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/remote.h rename to deps/libgit2-sys-0.4.3/libgit2/src/remote.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/repo_template.h b/deps/libgit2-sys-0.4.3/libgit2/src/repo_template.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/repo_template.h rename to deps/libgit2-sys-0.4.3/libgit2/src/repo_template.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/repository.c b/deps/libgit2-sys-0.4.3/libgit2/src/repository.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/repository.c rename to deps/libgit2-sys-0.4.3/libgit2/src/repository.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/repository.h b/deps/libgit2-sys-0.4.3/libgit2/src/repository.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/repository.h rename to deps/libgit2-sys-0.4.3/libgit2/src/repository.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/reset.c b/deps/libgit2-sys-0.4.3/libgit2/src/reset.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/reset.c rename to deps/libgit2-sys-0.4.3/libgit2/src/reset.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/revert.c b/deps/libgit2-sys-0.4.3/libgit2/src/revert.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/revert.c rename to deps/libgit2-sys-0.4.3/libgit2/src/revert.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/revparse.c b/deps/libgit2-sys-0.4.3/libgit2/src/revparse.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/revparse.c rename to deps/libgit2-sys-0.4.3/libgit2/src/revparse.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/revwalk.c b/deps/libgit2-sys-0.4.3/libgit2/src/revwalk.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/revwalk.c rename to deps/libgit2-sys-0.4.3/libgit2/src/revwalk.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/revwalk.h b/deps/libgit2-sys-0.4.3/libgit2/src/revwalk.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/revwalk.h rename to deps/libgit2-sys-0.4.3/libgit2/src/revwalk.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/settings.c b/deps/libgit2-sys-0.4.3/libgit2/src/settings.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/settings.c rename to deps/libgit2-sys-0.4.3/libgit2/src/settings.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/sha1_lookup.c b/deps/libgit2-sys-0.4.3/libgit2/src/sha1_lookup.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/sha1_lookup.c rename to deps/libgit2-sys-0.4.3/libgit2/src/sha1_lookup.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/sha1_lookup.h b/deps/libgit2-sys-0.4.3/libgit2/src/sha1_lookup.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/sha1_lookup.h rename to deps/libgit2-sys-0.4.3/libgit2/src/sha1_lookup.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/signature.c b/deps/libgit2-sys-0.4.3/libgit2/src/signature.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/signature.c rename to deps/libgit2-sys-0.4.3/libgit2/src/signature.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/signature.h b/deps/libgit2-sys-0.4.3/libgit2/src/signature.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/signature.h rename to deps/libgit2-sys-0.4.3/libgit2/src/signature.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/socket_stream.c b/deps/libgit2-sys-0.4.3/libgit2/src/socket_stream.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/socket_stream.c rename to deps/libgit2-sys-0.4.3/libgit2/src/socket_stream.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/socket_stream.h b/deps/libgit2-sys-0.4.3/libgit2/src/socket_stream.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/socket_stream.h rename to deps/libgit2-sys-0.4.3/libgit2/src/socket_stream.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/sortedcache.c b/deps/libgit2-sys-0.4.3/libgit2/src/sortedcache.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/sortedcache.c rename to deps/libgit2-sys-0.4.3/libgit2/src/sortedcache.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/sortedcache.h b/deps/libgit2-sys-0.4.3/libgit2/src/sortedcache.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/sortedcache.h rename to deps/libgit2-sys-0.4.3/libgit2/src/sortedcache.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/stash.c b/deps/libgit2-sys-0.4.3/libgit2/src/stash.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/stash.c rename to deps/libgit2-sys-0.4.3/libgit2/src/stash.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/status.c b/deps/libgit2-sys-0.4.3/libgit2/src/status.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/status.c rename to deps/libgit2-sys-0.4.3/libgit2/src/status.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/status.h b/deps/libgit2-sys-0.4.3/libgit2/src/status.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/status.h rename to deps/libgit2-sys-0.4.3/libgit2/src/status.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/stransport_stream.c b/deps/libgit2-sys-0.4.3/libgit2/src/stransport_stream.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/stransport_stream.c rename to deps/libgit2-sys-0.4.3/libgit2/src/stransport_stream.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/stransport_stream.h b/deps/libgit2-sys-0.4.3/libgit2/src/stransport_stream.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/stransport_stream.h rename to deps/libgit2-sys-0.4.3/libgit2/src/stransport_stream.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/stream.h b/deps/libgit2-sys-0.4.3/libgit2/src/stream.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/stream.h rename to deps/libgit2-sys-0.4.3/libgit2/src/stream.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/strmap.c b/deps/libgit2-sys-0.4.3/libgit2/src/strmap.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/strmap.c rename to deps/libgit2-sys-0.4.3/libgit2/src/strmap.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/strmap.h b/deps/libgit2-sys-0.4.3/libgit2/src/strmap.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/strmap.h rename to deps/libgit2-sys-0.4.3/libgit2/src/strmap.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/strnlen.h b/deps/libgit2-sys-0.4.3/libgit2/src/strnlen.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/strnlen.h rename to deps/libgit2-sys-0.4.3/libgit2/src/strnlen.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/submodule.c b/deps/libgit2-sys-0.4.3/libgit2/src/submodule.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/submodule.c rename to deps/libgit2-sys-0.4.3/libgit2/src/submodule.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/submodule.h b/deps/libgit2-sys-0.4.3/libgit2/src/submodule.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/submodule.h rename to deps/libgit2-sys-0.4.3/libgit2/src/submodule.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/sysdir.c b/deps/libgit2-sys-0.4.3/libgit2/src/sysdir.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/sysdir.c rename to deps/libgit2-sys-0.4.3/libgit2/src/sysdir.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/sysdir.h b/deps/libgit2-sys-0.4.3/libgit2/src/sysdir.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/sysdir.h rename to deps/libgit2-sys-0.4.3/libgit2/src/sysdir.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/tag.c b/deps/libgit2-sys-0.4.3/libgit2/src/tag.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/tag.c rename to deps/libgit2-sys-0.4.3/libgit2/src/tag.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/tag.h b/deps/libgit2-sys-0.4.3/libgit2/src/tag.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/tag.h rename to deps/libgit2-sys-0.4.3/libgit2/src/tag.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/thread-utils.c b/deps/libgit2-sys-0.4.3/libgit2/src/thread-utils.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/thread-utils.c rename to deps/libgit2-sys-0.4.3/libgit2/src/thread-utils.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/thread-utils.h b/deps/libgit2-sys-0.4.3/libgit2/src/thread-utils.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/thread-utils.h rename to deps/libgit2-sys-0.4.3/libgit2/src/thread-utils.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/tls_stream.c b/deps/libgit2-sys-0.4.3/libgit2/src/tls_stream.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/tls_stream.c rename to deps/libgit2-sys-0.4.3/libgit2/src/tls_stream.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/tls_stream.h b/deps/libgit2-sys-0.4.3/libgit2/src/tls_stream.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/tls_stream.h rename to deps/libgit2-sys-0.4.3/libgit2/src/tls_stream.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/trace.c b/deps/libgit2-sys-0.4.3/libgit2/src/trace.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/trace.c rename to deps/libgit2-sys-0.4.3/libgit2/src/trace.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/trace.h b/deps/libgit2-sys-0.4.3/libgit2/src/trace.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/trace.h rename to deps/libgit2-sys-0.4.3/libgit2/src/trace.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/transaction.c b/deps/libgit2-sys-0.4.3/libgit2/src/transaction.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/transaction.c rename to deps/libgit2-sys-0.4.3/libgit2/src/transaction.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/transaction.h b/deps/libgit2-sys-0.4.3/libgit2/src/transaction.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/transaction.h rename to deps/libgit2-sys-0.4.3/libgit2/src/transaction.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/transport.c b/deps/libgit2-sys-0.4.3/libgit2/src/transport.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/transport.c rename to deps/libgit2-sys-0.4.3/libgit2/src/transport.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/transports/auth.c b/deps/libgit2-sys-0.4.3/libgit2/src/transports/auth.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/transports/auth.c rename to deps/libgit2-sys-0.4.3/libgit2/src/transports/auth.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/transports/auth.h b/deps/libgit2-sys-0.4.3/libgit2/src/transports/auth.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/transports/auth.h rename to deps/libgit2-sys-0.4.3/libgit2/src/transports/auth.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/transports/auth_negotiate.c b/deps/libgit2-sys-0.4.3/libgit2/src/transports/auth_negotiate.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/transports/auth_negotiate.c rename to deps/libgit2-sys-0.4.3/libgit2/src/transports/auth_negotiate.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/transports/auth_negotiate.h b/deps/libgit2-sys-0.4.3/libgit2/src/transports/auth_negotiate.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/transports/auth_negotiate.h rename to deps/libgit2-sys-0.4.3/libgit2/src/transports/auth_negotiate.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/transports/cred.c b/deps/libgit2-sys-0.4.3/libgit2/src/transports/cred.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/transports/cred.c rename to deps/libgit2-sys-0.4.3/libgit2/src/transports/cred.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/transports/cred.h b/deps/libgit2-sys-0.4.3/libgit2/src/transports/cred.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/transports/cred.h rename to deps/libgit2-sys-0.4.3/libgit2/src/transports/cred.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/transports/cred_helpers.c b/deps/libgit2-sys-0.4.3/libgit2/src/transports/cred_helpers.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/transports/cred_helpers.c rename to deps/libgit2-sys-0.4.3/libgit2/src/transports/cred_helpers.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/transports/git.c b/deps/libgit2-sys-0.4.3/libgit2/src/transports/git.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/transports/git.c rename to deps/libgit2-sys-0.4.3/libgit2/src/transports/git.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/transports/http.c b/deps/libgit2-sys-0.4.3/libgit2/src/transports/http.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/transports/http.c rename to deps/libgit2-sys-0.4.3/libgit2/src/transports/http.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/transports/local.c b/deps/libgit2-sys-0.4.3/libgit2/src/transports/local.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/transports/local.c rename to deps/libgit2-sys-0.4.3/libgit2/src/transports/local.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/transports/smart.c b/deps/libgit2-sys-0.4.3/libgit2/src/transports/smart.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/transports/smart.c rename to deps/libgit2-sys-0.4.3/libgit2/src/transports/smart.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/transports/smart.h b/deps/libgit2-sys-0.4.3/libgit2/src/transports/smart.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/transports/smart.h rename to deps/libgit2-sys-0.4.3/libgit2/src/transports/smart.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/transports/smart_pkt.c b/deps/libgit2-sys-0.4.3/libgit2/src/transports/smart_pkt.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/transports/smart_pkt.c rename to deps/libgit2-sys-0.4.3/libgit2/src/transports/smart_pkt.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/transports/smart_protocol.c b/deps/libgit2-sys-0.4.3/libgit2/src/transports/smart_protocol.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/transports/smart_protocol.c rename to deps/libgit2-sys-0.4.3/libgit2/src/transports/smart_protocol.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/transports/ssh.c b/deps/libgit2-sys-0.4.3/libgit2/src/transports/ssh.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/transports/ssh.c rename to deps/libgit2-sys-0.4.3/libgit2/src/transports/ssh.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/transports/winhttp.c b/deps/libgit2-sys-0.4.3/libgit2/src/transports/winhttp.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/transports/winhttp.c rename to deps/libgit2-sys-0.4.3/libgit2/src/transports/winhttp.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/tree-cache.c b/deps/libgit2-sys-0.4.3/libgit2/src/tree-cache.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/tree-cache.c rename to deps/libgit2-sys-0.4.3/libgit2/src/tree-cache.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/tree-cache.h b/deps/libgit2-sys-0.4.3/libgit2/src/tree-cache.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/tree-cache.h rename to deps/libgit2-sys-0.4.3/libgit2/src/tree-cache.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/tree.c b/deps/libgit2-sys-0.4.3/libgit2/src/tree.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/tree.c rename to deps/libgit2-sys-0.4.3/libgit2/src/tree.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/tree.h b/deps/libgit2-sys-0.4.3/libgit2/src/tree.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/tree.h rename to deps/libgit2-sys-0.4.3/libgit2/src/tree.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/tsort.c b/deps/libgit2-sys-0.4.3/libgit2/src/tsort.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/tsort.c rename to deps/libgit2-sys-0.4.3/libgit2/src/tsort.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/unix/map.c b/deps/libgit2-sys-0.4.3/libgit2/src/unix/map.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/unix/map.c rename to deps/libgit2-sys-0.4.3/libgit2/src/unix/map.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/unix/posix.h b/deps/libgit2-sys-0.4.3/libgit2/src/unix/posix.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/unix/posix.h rename to deps/libgit2-sys-0.4.3/libgit2/src/unix/posix.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/unix/realpath.c b/deps/libgit2-sys-0.4.3/libgit2/src/unix/realpath.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/unix/realpath.c rename to deps/libgit2-sys-0.4.3/libgit2/src/unix/realpath.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/userdiff.h b/deps/libgit2-sys-0.4.3/libgit2/src/userdiff.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/userdiff.h rename to deps/libgit2-sys-0.4.3/libgit2/src/userdiff.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/util.c b/deps/libgit2-sys-0.4.3/libgit2/src/util.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/util.c rename to deps/libgit2-sys-0.4.3/libgit2/src/util.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/util.h b/deps/libgit2-sys-0.4.3/libgit2/src/util.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/util.h rename to deps/libgit2-sys-0.4.3/libgit2/src/util.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/vector.c b/deps/libgit2-sys-0.4.3/libgit2/src/vector.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/vector.c rename to deps/libgit2-sys-0.4.3/libgit2/src/vector.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/vector.h b/deps/libgit2-sys-0.4.3/libgit2/src/vector.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/vector.h rename to deps/libgit2-sys-0.4.3/libgit2/src/vector.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/win32/dir.c b/deps/libgit2-sys-0.4.3/libgit2/src/win32/dir.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/win32/dir.c rename to deps/libgit2-sys-0.4.3/libgit2/src/win32/dir.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/win32/dir.h b/deps/libgit2-sys-0.4.3/libgit2/src/win32/dir.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/win32/dir.h rename to deps/libgit2-sys-0.4.3/libgit2/src/win32/dir.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/win32/error.c b/deps/libgit2-sys-0.4.3/libgit2/src/win32/error.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/win32/error.c rename to deps/libgit2-sys-0.4.3/libgit2/src/win32/error.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/win32/error.h b/deps/libgit2-sys-0.4.3/libgit2/src/win32/error.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/win32/error.h rename to deps/libgit2-sys-0.4.3/libgit2/src/win32/error.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/win32/findfile.c b/deps/libgit2-sys-0.4.3/libgit2/src/win32/findfile.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/win32/findfile.c rename to deps/libgit2-sys-0.4.3/libgit2/src/win32/findfile.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/win32/findfile.h b/deps/libgit2-sys-0.4.3/libgit2/src/win32/findfile.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/win32/findfile.h rename to deps/libgit2-sys-0.4.3/libgit2/src/win32/findfile.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/win32/git2.rc b/deps/libgit2-sys-0.4.3/libgit2/src/win32/git2.rc similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/win32/git2.rc rename to deps/libgit2-sys-0.4.3/libgit2/src/win32/git2.rc diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/win32/map.c b/deps/libgit2-sys-0.4.3/libgit2/src/win32/map.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/win32/map.c rename to deps/libgit2-sys-0.4.3/libgit2/src/win32/map.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/win32/mingw-compat.h b/deps/libgit2-sys-0.4.3/libgit2/src/win32/mingw-compat.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/win32/mingw-compat.h rename to deps/libgit2-sys-0.4.3/libgit2/src/win32/mingw-compat.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/win32/msvc-compat.h b/deps/libgit2-sys-0.4.3/libgit2/src/win32/msvc-compat.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/win32/msvc-compat.h rename to deps/libgit2-sys-0.4.3/libgit2/src/win32/msvc-compat.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/win32/path_w32.c b/deps/libgit2-sys-0.4.3/libgit2/src/win32/path_w32.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/win32/path_w32.c rename to deps/libgit2-sys-0.4.3/libgit2/src/win32/path_w32.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/win32/path_w32.h b/deps/libgit2-sys-0.4.3/libgit2/src/win32/path_w32.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/win32/path_w32.h rename to deps/libgit2-sys-0.4.3/libgit2/src/win32/path_w32.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/win32/posix.h b/deps/libgit2-sys-0.4.3/libgit2/src/win32/posix.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/win32/posix.h rename to deps/libgit2-sys-0.4.3/libgit2/src/win32/posix.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/win32/posix_w32.c b/deps/libgit2-sys-0.4.3/libgit2/src/win32/posix_w32.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/win32/posix_w32.c rename to deps/libgit2-sys-0.4.3/libgit2/src/win32/posix_w32.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/win32/precompiled.c b/deps/libgit2-sys-0.4.3/libgit2/src/win32/precompiled.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/win32/precompiled.c rename to deps/libgit2-sys-0.4.3/libgit2/src/win32/precompiled.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/win32/precompiled.h b/deps/libgit2-sys-0.4.3/libgit2/src/win32/precompiled.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/win32/precompiled.h rename to deps/libgit2-sys-0.4.3/libgit2/src/win32/precompiled.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/win32/pthread.c b/deps/libgit2-sys-0.4.3/libgit2/src/win32/pthread.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/win32/pthread.c rename to deps/libgit2-sys-0.4.3/libgit2/src/win32/pthread.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/win32/pthread.h b/deps/libgit2-sys-0.4.3/libgit2/src/win32/pthread.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/win32/pthread.h rename to deps/libgit2-sys-0.4.3/libgit2/src/win32/pthread.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/win32/reparse.h b/deps/libgit2-sys-0.4.3/libgit2/src/win32/reparse.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/win32/reparse.h rename to deps/libgit2-sys-0.4.3/libgit2/src/win32/reparse.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/win32/utf-conv.c b/deps/libgit2-sys-0.4.3/libgit2/src/win32/utf-conv.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/win32/utf-conv.c rename to deps/libgit2-sys-0.4.3/libgit2/src/win32/utf-conv.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/win32/utf-conv.h b/deps/libgit2-sys-0.4.3/libgit2/src/win32/utf-conv.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/win32/utf-conv.h rename to deps/libgit2-sys-0.4.3/libgit2/src/win32/utf-conv.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/win32/version.h b/deps/libgit2-sys-0.4.3/libgit2/src/win32/version.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/win32/version.h rename to deps/libgit2-sys-0.4.3/libgit2/src/win32/version.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/win32/w32_buffer.c b/deps/libgit2-sys-0.4.3/libgit2/src/win32/w32_buffer.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/win32/w32_buffer.c rename to deps/libgit2-sys-0.4.3/libgit2/src/win32/w32_buffer.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/win32/w32_buffer.h b/deps/libgit2-sys-0.4.3/libgit2/src/win32/w32_buffer.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/win32/w32_buffer.h rename to deps/libgit2-sys-0.4.3/libgit2/src/win32/w32_buffer.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/win32/w32_crtdbg_stacktrace.c b/deps/libgit2-sys-0.4.3/libgit2/src/win32/w32_crtdbg_stacktrace.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/win32/w32_crtdbg_stacktrace.c rename to deps/libgit2-sys-0.4.3/libgit2/src/win32/w32_crtdbg_stacktrace.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/win32/w32_crtdbg_stacktrace.h b/deps/libgit2-sys-0.4.3/libgit2/src/win32/w32_crtdbg_stacktrace.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/win32/w32_crtdbg_stacktrace.h rename to deps/libgit2-sys-0.4.3/libgit2/src/win32/w32_crtdbg_stacktrace.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/win32/w32_stack.c b/deps/libgit2-sys-0.4.3/libgit2/src/win32/w32_stack.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/win32/w32_stack.c rename to deps/libgit2-sys-0.4.3/libgit2/src/win32/w32_stack.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/win32/w32_stack.h b/deps/libgit2-sys-0.4.3/libgit2/src/win32/w32_stack.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/win32/w32_stack.h rename to deps/libgit2-sys-0.4.3/libgit2/src/win32/w32_stack.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/win32/w32_util.c b/deps/libgit2-sys-0.4.3/libgit2/src/win32/w32_util.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/win32/w32_util.c rename to deps/libgit2-sys-0.4.3/libgit2/src/win32/w32_util.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/win32/w32_util.h b/deps/libgit2-sys-0.4.3/libgit2/src/win32/w32_util.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/win32/w32_util.h rename to deps/libgit2-sys-0.4.3/libgit2/src/win32/w32_util.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/win32/win32-compat.h b/deps/libgit2-sys-0.4.3/libgit2/src/win32/win32-compat.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/win32/win32-compat.h rename to deps/libgit2-sys-0.4.3/libgit2/src/win32/win32-compat.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/xdiff/xdiff.h b/deps/libgit2-sys-0.4.3/libgit2/src/xdiff/xdiff.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/xdiff/xdiff.h rename to deps/libgit2-sys-0.4.3/libgit2/src/xdiff/xdiff.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/xdiff/xdiffi.c b/deps/libgit2-sys-0.4.3/libgit2/src/xdiff/xdiffi.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/xdiff/xdiffi.c rename to deps/libgit2-sys-0.4.3/libgit2/src/xdiff/xdiffi.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/xdiff/xdiffi.h b/deps/libgit2-sys-0.4.3/libgit2/src/xdiff/xdiffi.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/xdiff/xdiffi.h rename to deps/libgit2-sys-0.4.3/libgit2/src/xdiff/xdiffi.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/xdiff/xemit.c b/deps/libgit2-sys-0.4.3/libgit2/src/xdiff/xemit.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/xdiff/xemit.c rename to deps/libgit2-sys-0.4.3/libgit2/src/xdiff/xemit.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/xdiff/xemit.h b/deps/libgit2-sys-0.4.3/libgit2/src/xdiff/xemit.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/xdiff/xemit.h rename to deps/libgit2-sys-0.4.3/libgit2/src/xdiff/xemit.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/xdiff/xhistogram.c b/deps/libgit2-sys-0.4.3/libgit2/src/xdiff/xhistogram.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/xdiff/xhistogram.c rename to deps/libgit2-sys-0.4.3/libgit2/src/xdiff/xhistogram.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/xdiff/xinclude.h b/deps/libgit2-sys-0.4.3/libgit2/src/xdiff/xinclude.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/xdiff/xinclude.h rename to deps/libgit2-sys-0.4.3/libgit2/src/xdiff/xinclude.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/xdiff/xmacros.h b/deps/libgit2-sys-0.4.3/libgit2/src/xdiff/xmacros.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/xdiff/xmacros.h rename to deps/libgit2-sys-0.4.3/libgit2/src/xdiff/xmacros.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/xdiff/xmerge.c b/deps/libgit2-sys-0.4.3/libgit2/src/xdiff/xmerge.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/xdiff/xmerge.c rename to deps/libgit2-sys-0.4.3/libgit2/src/xdiff/xmerge.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/xdiff/xpatience.c b/deps/libgit2-sys-0.4.3/libgit2/src/xdiff/xpatience.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/xdiff/xpatience.c rename to deps/libgit2-sys-0.4.3/libgit2/src/xdiff/xpatience.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/xdiff/xprepare.c b/deps/libgit2-sys-0.4.3/libgit2/src/xdiff/xprepare.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/xdiff/xprepare.c rename to deps/libgit2-sys-0.4.3/libgit2/src/xdiff/xprepare.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/xdiff/xprepare.h b/deps/libgit2-sys-0.4.3/libgit2/src/xdiff/xprepare.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/xdiff/xprepare.h rename to deps/libgit2-sys-0.4.3/libgit2/src/xdiff/xprepare.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/xdiff/xtypes.h b/deps/libgit2-sys-0.4.3/libgit2/src/xdiff/xtypes.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/xdiff/xtypes.h rename to deps/libgit2-sys-0.4.3/libgit2/src/xdiff/xtypes.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/xdiff/xutils.c b/deps/libgit2-sys-0.4.3/libgit2/src/xdiff/xutils.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/xdiff/xutils.c rename to deps/libgit2-sys-0.4.3/libgit2/src/xdiff/xutils.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/xdiff/xutils.h b/deps/libgit2-sys-0.4.3/libgit2/src/xdiff/xutils.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/xdiff/xutils.h rename to deps/libgit2-sys-0.4.3/libgit2/src/xdiff/xutils.h diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/zstream.c b/deps/libgit2-sys-0.4.3/libgit2/src/zstream.c similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/zstream.c rename to deps/libgit2-sys-0.4.3/libgit2/src/zstream.c diff --git a/deps/libgit2-sys-0.4.0/libgit2/src/zstream.h b/deps/libgit2-sys-0.4.3/libgit2/src/zstream.h similarity index 100% rename from deps/libgit2-sys-0.4.0/libgit2/src/zstream.h rename to deps/libgit2-sys-0.4.3/libgit2/src/zstream.h diff --git a/deps/libssh2-sys-0.1.36/Cargo.toml b/deps/libssh2-sys-0.1.36/Cargo.toml deleted file mode 100644 index b3aca8d8d..000000000 --- a/deps/libssh2-sys-0.1.36/Cargo.toml +++ /dev/null @@ -1,52 +0,0 @@ -[package] -name = "libssh2-sys" -version = "0.1.36" -authors = ["Alex Crichton "] -links = "ssh2" -build = "build.rs" -license = "MIT/Apache-2.0" -repository = "https://github.com/alexcrichton/ssh2-rs" -description = "Native bindings to the libssh2 library" - -[lib] -name = "libssh2_sys" -path = "lib.rs" - -[dependencies] -libz-sys = ">= 0" -libc = "0.2" - -[target.i686-apple-darwin.dependencies] -openssl-sys = ">= 0" -[target.x86_64-apple-darwin.dependencies] -openssl-sys = ">= 0" -[target.i686-unknown-linux-gnu.dependencies] -openssl-sys = ">= 0" -[target.x86_64-unknown-linux-gnu.dependencies] -openssl-sys = ">= 0" -[target.aarch64-unknown-linux-gnu.dependencies] -openssl-sys = ">= 0" -[target.powerpc64-unknown-linux-gnu.dependencies] -openssl-sys = ">= 0" -[target.powerpc64le-unknown-linux-gnu.dependencies] -openssl-sys = ">= 0" -[target.x86_64-unknown-linux-musl.dependencies] -openssl-sys = ">= 0" -[target.arm-unknown-linux-gnueabihf.dependencies] -openssl-sys = ">= 0" -[target.armv7-unknown-linux-gnueabihf.dependencies] -openssl-sys = ">= 0" -[target.i686-unknown-freebsd.dependencies] -openssl-sys = ">= 0" -[target.x86_64-unknown-freebsd.dependencies] -openssl-sys = ">= 0" -[target.x86_64-unknown-dragonfly.dependencies] -openssl-sys = ">= 0" -[target.x86_64-unknown-bitrig.dependencies] -openssl-sys = ">= 0" -[target.x86_64-unknown-openbsd.dependencies] -openssl-sys = ">= 0" - -[build-dependencies] -pkg-config = "0.3" -cmake = "0.1.2" diff --git a/deps/libssh2-sys-0.1.37/Cargo.toml b/deps/libssh2-sys-0.1.37/Cargo.toml new file mode 100644 index 000000000..c4e006da2 --- /dev/null +++ b/deps/libssh2-sys-0.1.37/Cargo.toml @@ -0,0 +1,57 @@ +[package] +name = "libssh2-sys" +version = "0.1.37" +authors = ["Alex Crichton "] +links = "ssh2" +build = "build.rs" +license = "MIT/Apache-2.0" +repository = "https://github.com/alexcrichton/ssh2-rs" +description = "Native bindings to the libssh2 library" + +[lib] +name = "libssh2_sys" +path = "lib.rs" + +[dependencies] +libz-sys = ">= 0" +libc = "0.2" + +[target."cfg(unix)".dependencies] +openssl-sys = ">= 0" + +[target.i686-apple-darwin.dependencies] +openssl-sys = ">= 0" +[target.x86_64-apple-darwin.dependencies] +openssl-sys = ">= 0" +[target.i686-unknown-linux-gnu.dependencies] +openssl-sys = ">= 0" +[target.i586-unknown-linux-gnu.dependencies] +openssl-sys = ">= 0" +[target.x86_64-unknown-linux-gnu.dependencies] +openssl-sys = ">= 0" +[target.aarch64-unknown-linux-gnu.dependencies] +openssl-sys = ">= 0" +[target.powerpc64-unknown-linux-gnu.dependencies] +openssl-sys = ">= 0" +[target.powerpc64le-unknown-linux-gnu.dependencies] +openssl-sys = ">= 0" +[target.x86_64-unknown-linux-musl.dependencies] +openssl-sys = ">= 0" +[target.arm-unknown-linux-gnueabihf.dependencies] +openssl-sys = ">= 0" +[target.armv7-unknown-linux-gnueabihf.dependencies] +openssl-sys = ">= 0" +[target.i686-unknown-freebsd.dependencies] +openssl-sys = ">= 0" +[target.x86_64-unknown-freebsd.dependencies] +openssl-sys = ">= 0" +[target.x86_64-unknown-dragonfly.dependencies] +openssl-sys = ">= 0" +[target.x86_64-unknown-bitrig.dependencies] +openssl-sys = ">= 0" +[target.x86_64-unknown-openbsd.dependencies] +openssl-sys = ">= 0" + +[build-dependencies] +pkg-config = "0.3" +cmake = "0.1.2" diff --git a/deps/libssh2-sys-0.1.36/build.rs b/deps/libssh2-sys-0.1.37/build.rs similarity index 100% rename from deps/libssh2-sys-0.1.36/build.rs rename to deps/libssh2-sys-0.1.37/build.rs diff --git a/deps/libssh2-sys-0.1.36/lib.rs b/deps/libssh2-sys-0.1.37/lib.rs similarity index 100% rename from deps/libssh2-sys-0.1.36/lib.rs rename to deps/libssh2-sys-0.1.37/lib.rs diff --git a/deps/libz-sys-1.0.1/Cargo.toml b/deps/libz-sys-1.0.1/Cargo.toml deleted file mode 100644 index 02f7a855d..000000000 --- a/deps/libz-sys-1.0.1/Cargo.toml +++ /dev/null @@ -1,20 +0,0 @@ -[package] - -name = "libz-sys" -version = "1.0.1" -authors = ["Alex Crichton "] -links = "z" -build = "build.rs" -license = "MIT/Apache-2.0" -repository = "https://github.com/alexcrichton/libz-sys" -documentation = "http://alexcrichton.com/libz-sys" -description = """ -Bindings to the system libz library (also known as zlib). -""" - -[dependencies] -libc = "0.2" - -[build-dependencies] -pkg-config = "0.3" -gcc = "0.3.17" diff --git a/deps/libz-sys-1.0.1/build.rs b/deps/libz-sys-1.0.1/build.rs deleted file mode 100644 index f1271ba6d..000000000 --- a/deps/libz-sys-1.0.1/build.rs +++ /dev/null @@ -1,123 +0,0 @@ -extern crate pkg_config; -extern crate gcc; - -use std::env; -use std::ffi::OsString; -use std::fs; -use std::path::{Path, PathBuf}; -use std::process::Command; - -macro_rules! t { - ($e:expr) => (match $e { - Ok(n) => n, - Err(e) => panic!("\n{} failed with {}\n", stringify!($e), e), - }) -} - -fn main() { - if pkg_config::find_library("zlib").is_ok() { - return - } - - // Practically all platforms come with libz installed already, but MSVC is - // one of those sole platforms that doesn't! - let target = env::var("TARGET").unwrap(); - let host = env::var("HOST").unwrap(); - if target.contains("msvc") { - build_msvc_zlib(&target); - } else if target.contains("musl") || target != host { - build_zlib(); - } else { - println!("cargo:rustc-link-lib=z"); - } -} - -fn build_zlib() { - let src = env::current_dir().unwrap().join("src/zlib-1.2.8"); - let dst = PathBuf::from(env::var_os("OUT_DIR").unwrap()); - let build = dst.join("build"); - t!(fs::create_dir_all(&build)); - cp_r(&src, &build); - let compiler = gcc::Config::new().get_compiler(); - let mut cflags = OsString::new(); - for arg in compiler.args() { - cflags.push(arg); - cflags.push(" "); - } - run(Command::new("./configure") - .current_dir(&build) - .env("CC", compiler.path()) - .env("CFLAGS", cflags)); - run(Command::new("make") - .current_dir(&build) - .arg("libz.a")); - - t!(fs::create_dir_all(dst.join("lib"))); - t!(fs::create_dir_all(dst.join("include"))); - t!(fs::copy(build.join("libz.a"), dst.join("lib/libz.a"))); - t!(fs::copy(build.join("zlib.h"), dst.join("include/zlib.h"))); - t!(fs::copy(build.join("zconf.h"), dst.join("include/zconf.h"))); - - println!("cargo:rustc-link-lib=static=z"); - println!("cargo:rustc-link-search={}/lib", dst.to_string_lossy()); - println!("cargo:root={}", dst.to_string_lossy()); - println!("cargo:include={}/include", dst.to_string_lossy()); -} - -fn cp_r(dir: &Path, dst: &Path) { - for entry in t!(fs::read_dir(dir)) { - let entry = t!(entry); - let path = entry.path(); - let dst = dst.join(path.file_name().unwrap()); - if t!(fs::metadata(&path)).is_file() { - t!(fs::copy(path, dst)); - } else { - t!(fs::create_dir_all(&dst)); - cp_r(&path, &dst); - } - } -} - -fn build_msvc_zlib(target: &str) { - let src = t!(env::current_dir()).join("src/zlib-1.2.8"); - let dst = PathBuf::from(env::var_os("OUT_DIR").unwrap()); - - t!(fs::create_dir_all(dst.join("lib"))); - t!(fs::create_dir_all(dst.join("include"))); - - let mut top = OsString::from("TOP="); - top.push(&src); - let nmake = gcc::windows_registry::find(target, "nmake.exe"); - let mut nmake = nmake.unwrap_or(Command::new("nmake.exe")); - run(nmake.current_dir(dst.join("lib")) - .arg("/nologo") - .arg("/f") - .arg(src.join("win32/Makefile.msc")) - .arg(top) - .arg("zlib.lib")); - - for file in t!(fs::read_dir(&src)) { - let file = t!(file).path(); - if let Some(s) = file.file_name().and_then(|s| s.to_str()) { - if s.ends_with(".h") { - t!(fs::copy(&file, dst.join("include").join(s))); - } - } - } - - println!("cargo:rustc-link-lib=static=zlib"); - println!("cargo:rustc-link-search={}/lib", dst.to_string_lossy()); - println!("cargo:root={}", dst.to_string_lossy()); - println!("cargo:include={}/include", dst.to_string_lossy()); -} - -fn run(cmd: &mut Command) { - println!("running: {:?}", cmd); - let status = match cmd.status() { - Ok(s) => s, - Err(e) => panic!("failed to run: {}", e), - }; - if !status.success() { - panic!("failed to run successfully: {}", status); - } -} diff --git a/deps/num_cpus-0.2.10/.gitignore b/deps/libz-sys-1.0.2/.gitignore similarity index 100% rename from deps/num_cpus-0.2.10/.gitignore rename to deps/libz-sys-1.0.2/.gitignore diff --git a/deps/libz-sys-1.0.1/.travis.yml b/deps/libz-sys-1.0.2/.travis.yml similarity index 100% rename from deps/libz-sys-1.0.1/.travis.yml rename to deps/libz-sys-1.0.2/.travis.yml diff --git a/deps/libz-sys-1.0.2/Cargo.toml b/deps/libz-sys-1.0.2/Cargo.toml new file mode 100644 index 000000000..75da4d480 --- /dev/null +++ b/deps/libz-sys-1.0.2/Cargo.toml @@ -0,0 +1,20 @@ +[package] + +name = "libz-sys" +version = "1.0.2" +authors = ["Alex Crichton "] +links = "z" +build = "build.rs" +license = "MIT/Apache-2.0" +repository = "https://github.com/alexcrichton/libz-sys" +documentation = "http://alexcrichton.com/libz-sys" +description = """ +Bindings to the system libz library (also known as zlib). +""" + +[dependencies] +libc = "0.2" + +[build-dependencies] +pkg-config = "0.3" +gcc = "0.3.17" diff --git a/deps/pkg-config-0.3.6/LICENSE-APACHE b/deps/libz-sys-1.0.2/LICENSE-APACHE similarity index 100% rename from deps/pkg-config-0.3.6/LICENSE-APACHE rename to deps/libz-sys-1.0.2/LICENSE-APACHE diff --git a/deps/libz-sys-1.0.1/LICENSE-MIT b/deps/libz-sys-1.0.2/LICENSE-MIT similarity index 100% rename from deps/libz-sys-1.0.1/LICENSE-MIT rename to deps/libz-sys-1.0.2/LICENSE-MIT diff --git a/deps/libz-sys-1.0.1/README.md b/deps/libz-sys-1.0.2/README.md similarity index 100% rename from deps/libz-sys-1.0.1/README.md rename to deps/libz-sys-1.0.2/README.md diff --git a/deps/libz-sys-1.0.1/appveyor.yml b/deps/libz-sys-1.0.2/appveyor.yml similarity index 100% rename from deps/libz-sys-1.0.1/appveyor.yml rename to deps/libz-sys-1.0.2/appveyor.yml diff --git a/deps/libz-sys-1.0.2/build.rs b/deps/libz-sys-1.0.2/build.rs new file mode 100644 index 000000000..228544310 --- /dev/null +++ b/deps/libz-sys-1.0.2/build.rs @@ -0,0 +1,124 @@ +extern crate pkg_config; +extern crate gcc; + +use std::env; +use std::ffi::OsString; +use std::fs; +use std::path::{Path, PathBuf}; +use std::process::Command; + +macro_rules! t { + ($e:expr) => (match $e { + Ok(n) => n, + Err(e) => panic!("\n{} failed with {}\n", stringify!($e), e), + }) +} + +fn main() { + let want_static = env::var("LIBZ_SYS_STATIC").unwrap_or(String::new()) == "1"; + if !want_static && pkg_config::find_library("zlib").is_ok() { + return + } + + // Practically all platforms come with libz installed already, but MSVC is + // one of those sole platforms that doesn't! + let target = env::var("TARGET").unwrap(); + let host = env::var("HOST").unwrap(); + if target.contains("msvc") { + build_msvc_zlib(&target); + } else if target.contains("musl") || target != host || want_static { + build_zlib(); + } else { + println!("cargo:rustc-link-lib=z"); + } +} + +fn build_zlib() { + let src = env::current_dir().unwrap().join("src/zlib-1.2.8"); + let dst = PathBuf::from(env::var_os("OUT_DIR").unwrap()); + let build = dst.join("build"); + t!(fs::create_dir_all(&build)); + cp_r(&src, &build); + let compiler = gcc::Config::new().get_compiler(); + let mut cflags = OsString::new(); + for arg in compiler.args() { + cflags.push(arg); + cflags.push(" "); + } + run(Command::new("./configure") + .current_dir(&build) + .env("CC", compiler.path()) + .env("CFLAGS", cflags)); + run(Command::new("make") + .current_dir(&build) + .arg("libz.a")); + + t!(fs::create_dir_all(dst.join("lib"))); + t!(fs::create_dir_all(dst.join("include"))); + t!(fs::copy(build.join("libz.a"), dst.join("lib/libz.a"))); + t!(fs::copy(build.join("zlib.h"), dst.join("include/zlib.h"))); + t!(fs::copy(build.join("zconf.h"), dst.join("include/zconf.h"))); + + println!("cargo:rustc-link-lib=static=z"); + println!("cargo:rustc-link-search={}/lib", dst.to_string_lossy()); + println!("cargo:root={}", dst.to_string_lossy()); + println!("cargo:include={}/include", dst.to_string_lossy()); +} + +fn cp_r(dir: &Path, dst: &Path) { + for entry in t!(fs::read_dir(dir)) { + let entry = t!(entry); + let path = entry.path(); + let dst = dst.join(path.file_name().unwrap()); + if t!(fs::metadata(&path)).is_file() { + t!(fs::copy(path, dst)); + } else { + t!(fs::create_dir_all(&dst)); + cp_r(&path, &dst); + } + } +} + +fn build_msvc_zlib(target: &str) { + let src = t!(env::current_dir()).join("src/zlib-1.2.8"); + let dst = PathBuf::from(env::var_os("OUT_DIR").unwrap()); + + t!(fs::create_dir_all(dst.join("lib"))); + t!(fs::create_dir_all(dst.join("include"))); + + let mut top = OsString::from("TOP="); + top.push(&src); + let nmake = gcc::windows_registry::find(target, "nmake.exe"); + let mut nmake = nmake.unwrap_or(Command::new("nmake.exe")); + run(nmake.current_dir(dst.join("lib")) + .arg("/nologo") + .arg("/f") + .arg(src.join("win32/Makefile.msc")) + .arg(top) + .arg("zlib.lib")); + + for file in t!(fs::read_dir(&src)) { + let file = t!(file).path(); + if let Some(s) = file.file_name().and_then(|s| s.to_str()) { + if s.ends_with(".h") { + t!(fs::copy(&file, dst.join("include").join(s))); + } + } + } + + println!("cargo:rustc-link-lib=static=zlib"); + println!("cargo:rustc-link-search={}/lib", dst.to_string_lossy()); + println!("cargo:root={}", dst.to_string_lossy()); + println!("cargo:include={}/include", dst.to_string_lossy()); +} + +fn run(cmd: &mut Command) { + println!("running: {:?}", cmd); + let status = match cmd.status() { + Ok(s) => s, + Err(e) => panic!("failed to run: {}", e), + }; + if !status.success() { + panic!("failed to run successfully: {}", status); + } +} diff --git a/deps/libz-sys-1.0.1/src/lib.rs b/deps/libz-sys-1.0.2/src/lib.rs similarity index 100% rename from deps/libz-sys-1.0.1/src/lib.rs rename to deps/libz-sys-1.0.2/src/lib.rs diff --git a/deps/memchr-0.1.7/.gitignore b/deps/memchr-0.1.10/.gitignore similarity index 100% rename from deps/memchr-0.1.7/.gitignore rename to deps/memchr-0.1.10/.gitignore diff --git a/deps/memchr-0.1.10/.travis.yml b/deps/memchr-0.1.10/.travis.yml new file mode 100644 index 000000000..2563a0e22 --- /dev/null +++ b/deps/memchr-0.1.10/.travis.yml @@ -0,0 +1,13 @@ +language: rust +rust: + - 1.3.0 + - stable + - beta + - nightly +script: + - cargo build --verbose + - cargo test --verbose + - cargo doc + - if [ "$TRAVIS_RUST_VERSION" = "nightly" ]; then + cargo bench --verbose; + fi diff --git a/deps/memchr-0.1.7/COPYING b/deps/memchr-0.1.10/COPYING similarity index 100% rename from deps/memchr-0.1.7/COPYING rename to deps/memchr-0.1.10/COPYING diff --git a/deps/memchr-0.1.10/Cargo.toml b/deps/memchr-0.1.10/Cargo.toml new file mode 100644 index 000000000..f4de96237 --- /dev/null +++ b/deps/memchr-0.1.10/Cargo.toml @@ -0,0 +1,20 @@ +[package] +name = "memchr" +version = "0.1.10" #:version +authors = ["Andrew Gallant ", "bluss"] +description = "Safe interface to memchr." +documentation = "http://burntsushi.net/rustdoc/memchr/" +homepage = "https://github.com/BurntSushi/rust-memchr" +repository = "https://github.com/BurntSushi/rust-memchr" +readme = "README.md" +keywords = ["memchr", "char", "scan", "strchr", "string"] +license = "Unlicense/MIT" + +[lib] +name = "memchr" + +[dependencies] +libc = "0.2.4" + +[dev-dependencies] +quickcheck = "0.2" diff --git a/deps/memchr-0.1.7/LICENSE-MIT b/deps/memchr-0.1.10/LICENSE-MIT similarity index 100% rename from deps/memchr-0.1.7/LICENSE-MIT rename to deps/memchr-0.1.10/LICENSE-MIT diff --git a/deps/memchr-0.1.7/Makefile b/deps/memchr-0.1.10/Makefile similarity index 100% rename from deps/memchr-0.1.7/Makefile rename to deps/memchr-0.1.10/Makefile diff --git a/deps/memchr-0.1.7/README.md b/deps/memchr-0.1.10/README.md similarity index 100% rename from deps/memchr-0.1.7/README.md rename to deps/memchr-0.1.10/README.md diff --git a/deps/memchr-0.1.7/UNLICENSE b/deps/memchr-0.1.10/UNLICENSE similarity index 100% rename from deps/memchr-0.1.7/UNLICENSE rename to deps/memchr-0.1.10/UNLICENSE diff --git a/deps/memchr-0.1.7/appveyor.yml b/deps/memchr-0.1.10/appveyor.yml similarity index 100% rename from deps/memchr-0.1.7/appveyor.yml rename to deps/memchr-0.1.10/appveyor.yml diff --git a/deps/memchr-0.1.10/benches/bench.rs b/deps/memchr-0.1.10/benches/bench.rs new file mode 100644 index 000000000..d77f87936 --- /dev/null +++ b/deps/memchr-0.1.10/benches/bench.rs @@ -0,0 +1,93 @@ +#![feature(test)] + +extern crate memchr; +extern crate test; + +use std::iter; + +fn bench_data() -> Vec { iter::repeat(b'z').take(10000).collect() } + +#[bench] +fn iterator_memchr(b: &mut test::Bencher) { + let haystack = bench_data(); + let needle = b'a'; + b.iter(|| { + assert!(haystack.iter().position(|&b| b == needle).is_none()); + }); + b.bytes = haystack.len() as u64; +} + +#[bench] +fn optimized_memchr(b: &mut test::Bencher) { + let haystack = bench_data(); + let needle = b'a'; + b.iter(|| { + assert!(memchr::memchr(needle, &haystack).is_none()); + }); + b.bytes = haystack.len() as u64; +} + +#[bench] +fn iterator_memrchr(b: &mut test::Bencher) { + let haystack = bench_data(); + let needle = b'a'; + b.iter(|| { + assert!(haystack.iter().rposition(|&b| b == needle).is_none()); + }); + b.bytes = haystack.len() as u64; +} + +#[bench] +fn optimized_memrchr(b: &mut test::Bencher) { + let haystack = bench_data(); + let needle = b'a'; + b.iter(|| { + assert!(memchr::memrchr(needle, &haystack).is_none()); + }); + b.bytes = haystack.len() as u64; +} + +#[bench] +fn iterator_memchr2(b: &mut test::Bencher) { + let haystack = bench_data(); + let (needle1, needle2) = (b'a', b'b'); + b.iter(|| { + assert!(haystack.iter().position(|&b| { + b == needle1 || b == needle2 + }).is_none()); + }); + b.bytes = haystack.len() as u64; +} + +#[bench] +fn optimized_memchr2(b: &mut test::Bencher) { + let haystack = bench_data(); + let (needle1, needle2) = (b'a', b'b'); + b.iter(|| { + assert!(memchr::memchr2(needle1, needle2, &haystack).is_none()); + }); + b.bytes = haystack.len() as u64; +} + +#[bench] +fn iterator_memchr3(b: &mut test::Bencher) { + let haystack = bench_data(); + let (needle1, needle2, needle3) = (b'a', b'b', b'c'); + b.iter(|| { + assert!(haystack.iter().position(|&b| { + b == needle1 || b == needle2 || b == needle3 + }).is_none()); + }); + b.bytes = haystack.len() as u64; +} + +#[bench] +fn optimized_memchr3(b: &mut test::Bencher) { + let haystack = bench_data(); + let (needle1, needle2, needle3) = (b'a', b'b', b'c'); + b.iter(|| { + assert!(memchr::memchr3( + needle1, needle2, needle3, &haystack).is_none()); + }); + b.bytes = haystack.len() as u64; +} diff --git a/deps/memchr-0.1.7/ctags.rust b/deps/memchr-0.1.10/ctags.rust similarity index 100% rename from deps/memchr-0.1.7/ctags.rust rename to deps/memchr-0.1.10/ctags.rust diff --git a/deps/memchr-0.1.7/session.vim b/deps/memchr-0.1.10/session.vim similarity index 100% rename from deps/memchr-0.1.7/session.vim rename to deps/memchr-0.1.10/session.vim diff --git a/deps/memchr-0.1.10/src/lib.rs b/deps/memchr-0.1.10/src/lib.rs new file mode 100644 index 000000000..4d0e345ba --- /dev/null +++ b/deps/memchr-0.1.10/src/lib.rs @@ -0,0 +1,609 @@ +/*! +This crate defines two functions, `memchr` and `memrchr`, which expose a safe interface +to the corresponding functions in `libc`. +*/ + +#![deny(missing_docs)] +#![allow(unused_imports)] + +extern crate libc; + +use libc::c_void; +use libc::{c_int, size_t}; + +const LO_U64: u64 = 0x0101010101010101; +const HI_U64: u64 = 0x8080808080808080; + +// use truncation +const LO_USIZE: usize = LO_U64 as usize; +const HI_USIZE: usize = HI_U64 as usize; + +#[cfg(target_pointer_width = "32")] +const USIZE_BYTES: usize = 4; +#[cfg(target_pointer_width = "64")] +const USIZE_BYTES: usize = 8; + +/// Return `true` if `x` contains any zero byte. +/// +/// From *Matters Computational*, J. Arndt +/// +/// "The idea is to subtract one from each of the bytes and then look for +/// bytes where the borrow propagated all the way to the most significant +/// bit." +#[inline] +fn contains_zero_byte(x: usize) -> bool { + x.wrapping_sub(LO_USIZE) & !x & HI_USIZE != 0 +} + +#[cfg(target_pointer_width = "32")] +#[inline] +fn repeat_byte(b: u8) -> usize { + let mut rep = (b as usize) << 8 | b as usize; + rep = rep << 16 | rep; + rep +} + +#[cfg(target_pointer_width = "64")] +#[inline] +fn repeat_byte(b: u8) -> usize { + let mut rep = (b as usize) << 8 | b as usize; + rep = rep << 16 | rep; + rep = rep << 32 | rep; + rep +} + +/// A safe interface to `memchr`. +/// +/// Returns the index corresponding to the first occurrence of `needle` in +/// `haystack`, or `None` if one is not found. +/// +/// memchr reduces to super-optimized machine code at around an order of +/// magnitude faster than `haystack.iter().position(|&b| b == needle)`. +/// (See benchmarks.) +/// +/// # Example +/// +/// This shows how to find the first position of a byte in a byte string. +/// +/// ```rust +/// use memchr::memchr; +/// +/// let haystack = b"the quick brown fox"; +/// assert_eq!(memchr(b'k', haystack), Some(8)); +/// ``` +pub fn memchr(needle: u8, haystack: &[u8]) -> Option { + // libc memchr + #[cfg(any(not(target_os = "windows"), + not(any(target_pointer_width = "32", + target_pointer_width = "64"))))] + fn memchr_specific(needle: u8, haystack: &[u8]) -> Option { + use libc::memchr as libc_memchr; + + let p = unsafe { + libc_memchr( + haystack.as_ptr() as *const c_void, + needle as c_int, + haystack.len() as size_t) + }; + if p.is_null() { + None + } else { + Some(p as usize - (haystack.as_ptr() as usize)) + } + } + + // use fallback on windows, since it's faster + #[cfg(all(target_os = "windows", + any(target_pointer_width = "32", + target_pointer_width = "64")))] + fn memchr_specific(needle: u8, haystack: &[u8]) -> Option { + fallback::memchr(needle, haystack) + } + + memchr_specific(needle, haystack) +} + +/// A safe interface to `memrchr`. +/// +/// Returns the index corresponding to the last occurrence of `needle` in +/// `haystack`, or `None` if one is not found. +/// +/// # Example +/// +/// This shows how to find the last position of a byte in a byte string. +/// +/// ```rust +/// use memchr::memrchr; +/// +/// let haystack = b"the quick brown fox"; +/// assert_eq!(memrchr(b'o', haystack), Some(17)); +/// ``` +pub fn memrchr(needle: u8, haystack: &[u8]) -> Option { + + #[cfg(target_os = "linux")] + fn memrchr_specific(needle: u8, haystack: &[u8]) -> Option { + // GNU's memrchr() will - unlike memchr() - error if haystack is empty. + if haystack.is_empty() {return None} + let p = unsafe { + libc::memrchr( + haystack.as_ptr() as *const c_void, + needle as c_int, + haystack.len() as size_t) + }; + if p.is_null() { + None + } else { + Some(p as usize - (haystack.as_ptr() as usize)) + } + } + + #[cfg(all(not(target_os = "linux"), + any(target_pointer_width = "32", target_pointer_width = "64")))] + fn memrchr_specific(needle: u8, haystack: &[u8]) -> Option { + fallback::memrchr(needle, haystack) + } + + // For the rare case of neither 32 bit nor 64-bit platform. + #[cfg(all(not(target_os = "linux"), + not(target_pointer_width = "32"), + not(target_pointer_width = "64")))] + fn memrchr_specific(needle: u8, haystack: &[u8]) -> Option { + haystack.iter().rposition(|&b| b == needle) + } + + memrchr_specific(needle, haystack) +} + +/// Like `memchr`, but searches for two bytes instead of one. +pub fn memchr2(needle1: u8, needle2: u8, haystack: &[u8]) -> Option { + use std::cmp; + + fn slow(b1: u8, b2: u8, haystack: &[u8]) -> Option { + haystack.iter().position(|&b| b == b1 || b == b2) + } + + let len = haystack.len(); + let ptr = haystack.as_ptr(); + let align = (ptr as usize) & (USIZE_BYTES - 1); + let mut i = 0; + if align > 0 { + i = cmp::min(USIZE_BYTES - align, len); + if let Some(found) = slow(needle1, needle2, &haystack[..i]) { + return Some(found); + } + } + let repeated_b1 = repeat_byte(needle1); + let repeated_b2 = repeat_byte(needle2); + if len >= USIZE_BYTES { + while i <= len - USIZE_BYTES { + unsafe { + let u = *(ptr.offset(i as isize) as *const usize); + let found_ub1 = contains_zero_byte(u ^ repeated_b1); + let found_ub2 = contains_zero_byte(u ^ repeated_b2); + if found_ub1 || found_ub2 { + break; + } + } + i += USIZE_BYTES; + } + } + slow(needle1, needle2, &haystack[i..]).map(|pos| i + pos) +} + +/// Like `memchr`, but searches for three bytes instead of one. +pub fn memchr3( + needle1: u8, + needle2: u8, + needle3: u8, + haystack: &[u8], +) -> Option { + use std::cmp; + + fn slow(b1: u8, b2: u8, b3: u8, haystack: &[u8]) -> Option { + haystack.iter().position(|&b| b == b1 || b == b2 || b == b3) + } + + let len = haystack.len(); + let ptr = haystack.as_ptr(); + let align = (ptr as usize) & (USIZE_BYTES - 1); + let mut i = 0; + if align > 0 { + i = cmp::min(USIZE_BYTES - align, len); + if let Some(found) = slow(needle1, needle2, needle3, &haystack[..i]) { + return Some(found); + } + } + let repeated_b1 = repeat_byte(needle1); + let repeated_b2 = repeat_byte(needle2); + let repeated_b3 = repeat_byte(needle3); + if len >= USIZE_BYTES { + while i <= len - USIZE_BYTES { + unsafe { + let u = *(ptr.offset(i as isize) as *const usize); + let found_ub1 = contains_zero_byte(u ^ repeated_b1); + let found_ub2 = contains_zero_byte(u ^ repeated_b2); + let found_ub3 = contains_zero_byte(u ^ repeated_b3); + if found_ub1 || found_ub2 || found_ub3 { + break; + } + } + i += USIZE_BYTES; + } + } + slow(needle1, needle2, needle3, &haystack[i..]).map(|pos| i + pos) +} + +#[allow(dead_code)] +#[cfg(all(not(target_os = "linux"), + any(target_pointer_width = "32", target_pointer_width = "64")))] +mod fallback { + use std::cmp; + use super::{ + LO_U64, HI_U64, LO_USIZE, HI_USIZE, USIZE_BYTES, + contains_zero_byte, repeat_byte, + }; + + /// Return the first index matching the byte `a` in `text`. + pub fn memchr(x: u8, text: &[u8]) -> Option { + // Scan for a single byte value by reading two `usize` words at a time. + // + // Split `text` in three parts + // - unaligned inital part, before the first word aligned address in text + // - body, scan by 2 words at a time + // - the last remaining part, < 2 word size + let len = text.len(); + let ptr = text.as_ptr(); + + // search up to an aligned boundary + let align = (ptr as usize) & (USIZE_BYTES - 1); + let mut offset; + if align > 0 { + offset = cmp::min(USIZE_BYTES - align, len); + if let Some(index) = text[..offset].iter().position(|elt| *elt == x) { + return Some(index); + } + } else { + offset = 0; + } + + // search the body of the text + let repeated_x = repeat_byte(x); + + if len >= 2 * USIZE_BYTES { + while offset <= len - 2 * USIZE_BYTES { + unsafe { + let u = *(ptr.offset(offset as isize) as *const usize); + let v = *(ptr.offset((offset + USIZE_BYTES) as isize) as *const usize); + + // break if there is a matching byte + let zu = contains_zero_byte(u ^ repeated_x); + let zv = contains_zero_byte(v ^ repeated_x); + if zu || zv { + break; + } + } + offset += USIZE_BYTES * 2; + } + } + + // find the byte after the point the body loop stopped + text[offset..].iter().position(|elt| *elt == x).map(|i| offset + i) + } + + /// Return the last index matching the byte `a` in `text`. + pub fn memrchr(x: u8, text: &[u8]) -> Option { + // Scan for a single byte value by reading two `usize` words at a time. + // + // Split `text` in three parts + // - unaligned tail, after the last word aligned address in text + // - body, scan by 2 words at a time + // - the first remaining bytes, < 2 word size + let len = text.len(); + let ptr = text.as_ptr(); + + // search to an aligned boundary + let end_align = (ptr as usize + len) & (USIZE_BYTES - 1); + let mut offset; + if end_align > 0 { + offset = len - cmp::min(USIZE_BYTES - end_align, len); + if let Some(index) = text[offset..].iter().rposition(|elt| *elt == x) { + return Some(offset + index); + } + } else { + offset = len; + } + + // search the body of the text + let repeated_x = repeat_byte(x); + + while offset >= 2 * USIZE_BYTES { + unsafe { + let u = *(ptr.offset(offset as isize - 2 * USIZE_BYTES as isize) as *const usize); + let v = *(ptr.offset(offset as isize - USIZE_BYTES as isize) as *const usize); + + // break if there is a matching byte + let zu = contains_zero_byte(u ^ repeated_x); + let zv = contains_zero_byte(v ^ repeated_x); + if zu || zv { + break; + } + } + offset -= 2 * USIZE_BYTES; + } + + // find the byte before the point the body loop stopped + text[..offset].iter().rposition(|elt| *elt == x) + } +} + +#[cfg(test)] +mod tests { + extern crate quickcheck; + + use super::{memchr, memrchr, memchr2, memchr3}; + + #[test] + fn matches_one() { + assert_eq!(Some(0), memchr(b'a', b"a")); + } + + #[test] + fn matches_begin() { + assert_eq!(Some(0), memchr(b'a', b"aaaa")); + } + + #[test] + fn matches_end() { + assert_eq!(Some(4), memchr(b'z', b"aaaaz")); + } + + #[test] + fn matches_nul() { + assert_eq!(Some(4), memchr(b'\x00', b"aaaa\x00")); + } + + #[test] + fn matches_past_nul() { + assert_eq!(Some(5), memchr(b'z', b"aaaa\x00z")); + } + + #[test] + fn no_match_empty() { + assert_eq!(None, memchr(b'a', b"")); + } + + #[test] + fn no_match() { + assert_eq!(None, memchr(b'a', b"xyz")); + } + + #[test] + fn qc_never_fail() { + fn prop(needle: u8, haystack: Vec) -> bool { + memchr(needle, &haystack); true + } + quickcheck::quickcheck(prop as fn(u8, Vec) -> bool); + } + + #[test] + fn matches_one_reversed() { + assert_eq!(Some(0), memrchr(b'a', b"a")); + } + + #[test] + fn matches_begin_reversed() { + assert_eq!(Some(3), memrchr(b'a', b"aaaa")); + } + + #[test] + fn matches_end_reversed() { + assert_eq!(Some(0), memrchr(b'z', b"zaaaa")); + } + + #[test] + fn matches_nul_reversed() { + assert_eq!(Some(4), memrchr(b'\x00', b"aaaa\x00")); + } + + #[test] + fn matches_past_nul_reversed() { + assert_eq!(Some(0), memrchr(b'z', b"z\x00aaaa")); + } + + #[test] + fn no_match_empty_reversed() { + assert_eq!(None, memrchr(b'a', b"")); + } + + #[test] + fn no_match_reversed() { + assert_eq!(None, memrchr(b'a', b"xyz")); + } + + #[test] + fn qc_never_fail_reversed() { + fn prop(needle: u8, haystack: Vec) -> bool { + memrchr(needle, &haystack); true + } + quickcheck::quickcheck(prop as fn(u8, Vec) -> bool); + } + + #[test] + fn memchr2_matches_one() { + assert_eq!(Some(0), memchr2(b'a', b'b', b"a")); + assert_eq!(Some(0), memchr2(b'a', b'b', b"b")); + assert_eq!(Some(0), memchr2(b'b', b'a', b"a")); + assert_eq!(Some(0), memchr2(b'b', b'a', b"b")); + } + + #[test] + fn memchr2_matches_begin() { + assert_eq!(Some(0), memchr2(b'a', b'b', b"aaaa")); + assert_eq!(Some(0), memchr2(b'a', b'b', b"bbbb")); + } + + #[test] + fn memchr2_matches_end() { + assert_eq!(Some(4), memchr2(b'z', b'y', b"aaaaz")); + assert_eq!(Some(4), memchr2(b'z', b'y', b"aaaay")); + } + + #[test] + fn memchr2_matches_nul() { + assert_eq!(Some(4), memchr2(b'\x00', b'z', b"aaaa\x00")); + assert_eq!(Some(4), memchr2(b'z', b'\x00', b"aaaa\x00")); + } + + #[test] + fn memchr2_matches_past_nul() { + assert_eq!(Some(5), memchr2(b'z', b'y', b"aaaa\x00z")); + assert_eq!(Some(5), memchr2(b'y', b'z', b"aaaa\x00z")); + } + + #[test] + fn memchr2_no_match_empty() { + assert_eq!(None, memchr2(b'a', b'b', b"")); + assert_eq!(None, memchr2(b'b', b'a', b"")); + } + + #[test] + fn memchr2_no_match() { + assert_eq!(None, memchr2(b'a', b'b', b"xyz")); + } + + #[test] + fn qc_never_fail_memchr2() { + fn prop(needle1: u8, needle2: u8, haystack: Vec) -> bool { + memchr2(needle1, needle2, &haystack); true + } + quickcheck::quickcheck(prop as fn(u8, u8, Vec) -> bool); + } + + #[test] + fn memchr3_matches_one() { + assert_eq!(Some(0), memchr3(b'a', b'b', b'c', b"a")); + assert_eq!(Some(0), memchr3(b'a', b'b', b'c', b"b")); + assert_eq!(Some(0), memchr3(b'a', b'b', b'c', b"c")); + } + + #[test] + fn memchr3_matches_begin() { + assert_eq!(Some(0), memchr3(b'a', b'b', b'c', b"aaaa")); + assert_eq!(Some(0), memchr3(b'a', b'b', b'c', b"bbbb")); + assert_eq!(Some(0), memchr3(b'a', b'b', b'c', b"cccc")); + } + + #[test] + fn memchr3_matches_end() { + assert_eq!(Some(4), memchr3(b'z', b'y', b'x', b"aaaaz")); + assert_eq!(Some(4), memchr3(b'z', b'y', b'x', b"aaaay")); + assert_eq!(Some(4), memchr3(b'z', b'y', b'x', b"aaaax")); + } + + #[test] + fn memchr3_matches_nul() { + assert_eq!(Some(4), memchr3(b'\x00', b'z', b'y', b"aaaa\x00")); + assert_eq!(Some(4), memchr3(b'z', b'\x00', b'y', b"aaaa\x00")); + assert_eq!(Some(4), memchr3(b'z', b'y', b'\x00', b"aaaa\x00")); + } + + #[test] + fn memchr3_matches_past_nul() { + assert_eq!(Some(5), memchr3(b'z', b'y', b'x', b"aaaa\x00z")); + assert_eq!(Some(5), memchr3(b'y', b'z', b'x', b"aaaa\x00z")); + assert_eq!(Some(5), memchr3(b'y', b'x', b'z', b"aaaa\x00z")); + } + + #[test] + fn memchr3_no_match_empty() { + assert_eq!(None, memchr3(b'a', b'b', b'c', b"")); + assert_eq!(None, memchr3(b'b', b'a', b'c', b"")); + assert_eq!(None, memchr3(b'c', b'b', b'a', b"")); + } + + #[test] + fn memchr3_no_match() { + assert_eq!(None, memchr3(b'a', b'b', b'c', b"xyz")); + } + + #[test] + fn qc_never_fail_memchr3() { + fn prop( + needle1: u8, + needle2: u8, + needle3: u8, + haystack: Vec, + ) -> bool { + memchr3(needle1, needle2, needle3, &haystack); true + } + quickcheck::quickcheck(prop as fn(u8, u8, u8, Vec) -> bool); + } + + #[test] + fn qc_correct_memchr() { + fn prop(v: Vec, offset: u8) -> bool { + // test all pointer alignments + let uoffset = (offset & 0xF) as usize; + let data = if uoffset <= v.len() { + &v[uoffset..] + } else { + &v[..] + }; + for byte in 0..256u32 { + let byte = byte as u8; + if memchr(byte, &data) != data.iter().position(|elt| *elt == byte) { + return false; + } + } + true + } + quickcheck::quickcheck(prop as fn(Vec, u8) -> bool); + } + + #[test] + fn qc_correct_memrchr() { + fn prop(v: Vec, offset: u8) -> bool { + // test all pointer alignments + let uoffset = (offset & 0xF) as usize; + let data = if uoffset <= v.len() { + &v[uoffset..] + } else { + &v[..] + }; + for byte in 0..256u32 { + let byte = byte as u8; + if memrchr(byte, &data) != data.iter().rposition(|elt| *elt == byte) { + return false; + } + } + true + } + quickcheck::quickcheck(prop as fn(Vec, u8) -> bool); + } + + #[test] + fn qc_correct_memchr2() { + fn prop(v: Vec, offset: u8) -> bool { + // test all pointer alignments + let uoffset = (offset & 0xF) as usize; + let data = if uoffset <= v.len() { + &v[uoffset..] + } else { + &v[..] + }; + for b1 in 0..256u32 { + for b2 in 0..256u32 { + let (b1, b2) = (b1 as u8, b2 as u8); + let expected = + data.iter().position(|&b| b == b1 || b == b2); + let got = memchr2(b1, b2, &data); + if expected != got { + return false; + } + } + } + true + } + quickcheck::quickcheck(prop as fn(Vec, u8) -> bool); + } +} diff --git a/deps/memchr-0.1.7/.travis.yml b/deps/memchr-0.1.7/.travis.yml deleted file mode 100644 index faea53eef..000000000 --- a/deps/memchr-0.1.7/.travis.yml +++ /dev/null @@ -1,12 +0,0 @@ -language: rust -rust: - - 1.0.0 - - beta - - nightly -script: - - cargo build --verbose - - cargo test --verbose - - cargo doc - - if [ "$TRAVIS_RUST_VERSION" = "nightly" ]; then - cargo bench --verbose; - fi diff --git a/deps/memchr-0.1.7/Cargo.toml b/deps/memchr-0.1.7/Cargo.toml deleted file mode 100644 index 49f579735..000000000 --- a/deps/memchr-0.1.7/Cargo.toml +++ /dev/null @@ -1,20 +0,0 @@ -[package] -name = "memchr" -version = "0.1.7" #:version -authors = ["Andrew Gallant ", "bluss"] -description = "Safe interface to memchr." -documentation = "http://burntsushi.net/rustdoc/memchr/" -homepage = "https://github.com/BurntSushi/rust-memchr" -repository = "https://github.com/BurntSushi/rust-memchr" -readme = "README.md" -keywords = ["memchr", "char", "scan", "strchr", "string"] -license = "Unlicense/MIT" - -[lib] -name = "memchr" - -[dependencies] -libc = "0.2" - -[dev-dependencies] -quickcheck = "0.2" diff --git a/deps/memchr-0.1.7/benches/bench.rs b/deps/memchr-0.1.7/benches/bench.rs deleted file mode 100644 index 9db0fa6cd..000000000 --- a/deps/memchr-0.1.7/benches/bench.rs +++ /dev/null @@ -1,48 +0,0 @@ -#![feature(test)] - -extern crate memchr; -extern crate test; - -use std::iter; - -fn bench_data() -> Vec { iter::repeat(b'z').take(10000).collect() } - -#[bench] -fn iterator(b: &mut test::Bencher) { - let haystack = bench_data(); - let needle = b'a'; - b.iter(|| { - assert!(haystack.iter().position(|&b| b == needle).is_none()); - }); - b.bytes = haystack.len() as u64; -} - -#[bench] -fn libc_memchr(b: &mut test::Bencher) { - let haystack = bench_data(); - let needle = b'a'; - b.iter(|| { - assert!(memchr::memchr(needle, &haystack).is_none()); - }); - b.bytes = haystack.len() as u64; -} - -#[bench] -fn iterator_reversed(b: &mut test::Bencher) { - let haystack = bench_data(); - let needle = b'a'; - b.iter(|| { - assert!(haystack.iter().rposition(|&b| b == needle).is_none()); - }); - b.bytes = haystack.len() as u64; -} - -#[bench] -fn libc_memrchr(b: &mut test::Bencher) { - let haystack = bench_data(); - let needle = b'a'; - b.iter(|| { - assert!(memchr::memrchr(needle, &haystack).is_none()); - }); - b.bytes = haystack.len() as u64; -} diff --git a/deps/memchr-0.1.7/src/lib.rs b/deps/memchr-0.1.7/src/lib.rs deleted file mode 100644 index 2475bcb6a..000000000 --- a/deps/memchr-0.1.7/src/lib.rs +++ /dev/null @@ -1,398 +0,0 @@ -/*! -This crate defines two functions, `memchr` and `memrchr`, which expose a safe interface -to the corresponding functions in `libc`. -*/ - -#![deny(missing_docs)] -#![allow(unused_imports)] - -extern crate libc; - -use libc::c_void; -use libc::{c_int, size_t}; - -/// A safe interface to `memchr`. -/// -/// Returns the index corresponding to the first occurrence of `needle` in -/// `haystack`, or `None` if one is not found. -/// -/// memchr reduces to super-optimized machine code at around an order of -/// magnitude faster than `haystack.iter().position(|&b| b == needle)`. -/// (See benchmarks.) -/// -/// # Example -/// -/// This shows how to find the first position of a byte in a byte string. -/// -/// ```rust -/// use memchr::memchr; -/// -/// let haystack = b"the quick brown fox"; -/// assert_eq!(memchr(b'k', haystack), Some(8)); -/// ``` -pub fn memchr(needle: u8, haystack: &[u8]) -> Option { - // libc memchr - #[cfg(any(not(target_os = "windows"), - not(any(target_pointer_width = "32", - target_pointer_width = "64"))))] - fn memchr_specific(needle: u8, haystack: &[u8]) -> Option { - use libc::memchr as libc_memchr; - - let p = unsafe { - libc_memchr( - haystack.as_ptr() as *const c_void, - needle as c_int, - haystack.len() as size_t) - }; - if p.is_null() { - None - } else { - Some(p as usize - (haystack.as_ptr() as usize)) - } - } - - // use fallback on windows, since it's faster - #[cfg(all(target_os = "windows", - any(target_pointer_width = "32", - target_pointer_width = "64")))] - fn memchr_specific(needle: u8, haystack: &[u8]) -> Option { - fallback::memchr(needle, haystack) - } - - memchr_specific(needle, haystack) -} - -/// A safe interface to `memrchr`. -/// -/// Returns the index corresponding to the last occurrence of `needle` in -/// `haystack`, or `None` if one is not found. -/// -/// # Example -/// -/// This shows how to find the last position of a byte in a byte string. -/// -/// ```rust -/// use memchr::memrchr; -/// -/// let haystack = b"the quick brown fox"; -/// assert_eq!(memrchr(b'o', haystack), Some(17)); -/// ``` -pub fn memrchr(needle: u8, haystack: &[u8]) -> Option { - - #[cfg(target_os = "linux")] - fn memrchr_specific(needle: u8, haystack: &[u8]) -> Option { - // GNU's memrchr() will - unlike memchr() - error if haystack is empty. - if haystack.is_empty() {return None} - let p = unsafe { - ffi::memrchr( - haystack.as_ptr() as *const c_void, - needle as c_int, - haystack.len() as size_t) - }; - if p.is_null() { - None - } else { - Some(p as usize - (haystack.as_ptr() as usize)) - } - } - - #[cfg(all(not(target_os = "linux"), - any(target_pointer_width = "32", target_pointer_width = "64")))] - fn memrchr_specific(needle: u8, haystack: &[u8]) -> Option { - fallback::memrchr(needle, haystack) - } - - // For the rare case of neither 32 bit nor 64-bit platform. - #[cfg(all(not(target_os = "linux"), - not(target_pointer_width = "32"), - not(target_pointer_width = "64")))] - fn memrchr_specific(needle: u8, haystack: &[u8]) -> Option { - haystack.iter().rposition(|&b| b == needle) - } - - memrchr_specific(needle, haystack) -} - -#[allow(dead_code)] -#[cfg(all(not(target_os = "linux"), - any(target_pointer_width = "32", target_pointer_width = "64")))] -mod fallback { - use std::cmp; - - const LO_U64: u64 = 0x0101010101010101; - const HI_U64: u64 = 0x8080808080808080; - - // use truncation - const LO_USIZE: usize = LO_U64 as usize; - const HI_USIZE: usize = HI_U64 as usize; - - #[cfg(target_pointer_width = "32")] - const USIZE_BYTES: usize = 4; - #[cfg(target_pointer_width = "64")] - const USIZE_BYTES: usize = 8; - - /// Return `true` if `x` contains any zero byte. - /// - /// From *Matters Computational*, J. Arndt - /// - /// "The idea is to subtract one from each of the bytes and then look for - /// bytes where the borrow propagated all the way to the most significant - /// bit." - #[inline] - fn contains_zero_byte(x: usize) -> bool { - x.wrapping_sub(LO_USIZE) & !x & HI_USIZE != 0 - } - - #[cfg(target_pointer_width = "32")] - #[inline] - fn repeat_byte(b: u8) -> usize { - let mut rep = (b as usize) << 8 | b as usize; - rep = rep << 16 | rep; - rep - } - - #[cfg(target_pointer_width = "64")] - #[inline] - fn repeat_byte(b: u8) -> usize { - let mut rep = (b as usize) << 8 | b as usize; - rep = rep << 16 | rep; - rep = rep << 32 | rep; - rep - } - - /// Return the first index matching the byte `a` in `text`. - pub fn memchr(x: u8, text: &[u8]) -> Option { - // Scan for a single byte value by reading two `usize` words at a time. - // - // Split `text` in three parts - // - unaligned inital part, before the first word aligned address in text - // - body, scan by 2 words at a time - // - the last remaining part, < 2 word size - let len = text.len(); - let ptr = text.as_ptr(); - - // search up to an aligned boundary - let align = (ptr as usize) & (USIZE_BYTES - 1); - let mut offset; - if align > 0 { - offset = cmp::min(USIZE_BYTES - align, len); - if let Some(index) = text[..offset].iter().position(|elt| *elt == x) { - return Some(index); - } - } else { - offset = 0; - } - - // search the body of the text - let repeated_x = repeat_byte(x); - - if len >= 2 * USIZE_BYTES { - while offset <= len - 2 * USIZE_BYTES { - unsafe { - let u = *(ptr.offset(offset as isize) as *const usize); - let v = *(ptr.offset((offset + USIZE_BYTES) as isize) as *const usize); - - // break if there is a matching byte - let zu = contains_zero_byte(u ^ repeated_x); - let zv = contains_zero_byte(v ^ repeated_x); - if zu || zv { - break; - } - } - offset += USIZE_BYTES * 2; - } - } - - // find the byte after the point the body loop stopped - text[offset..].iter().position(|elt| *elt == x).map(|i| offset + i) - } - - /// Return the last index matching the byte `a` in `text`. - pub fn memrchr(x: u8, text: &[u8]) -> Option { - // Scan for a single byte value by reading two `usize` words at a time. - // - // Split `text` in three parts - // - unaligned tail, after the last word aligned address in text - // - body, scan by 2 words at a time - // - the first remaining bytes, < 2 word size - let len = text.len(); - let ptr = text.as_ptr(); - - // search to an aligned boundary - let end_align = (ptr as usize + len) & (USIZE_BYTES - 1); - let mut offset; - if end_align > 0 { - offset = len - cmp::min(USIZE_BYTES - end_align, len); - if let Some(index) = text[offset..].iter().rposition(|elt| *elt == x) { - return Some(offset + index); - } - } else { - offset = len; - } - - // search the body of the text - let repeated_x = repeat_byte(x); - - while offset >= 2 * USIZE_BYTES { - unsafe { - let u = *(ptr.offset(offset as isize - 2 * USIZE_BYTES as isize) as *const usize); - let v = *(ptr.offset(offset as isize - USIZE_BYTES as isize) as *const usize); - - // break if there is a matching byte - let zu = contains_zero_byte(u ^ repeated_x); - let zv = contains_zero_byte(v ^ repeated_x); - if zu || zv { - break; - } - } - offset -= 2 * USIZE_BYTES; - } - - // find the byte before the point the body loop stopped - text[..offset].iter().rposition(|elt| *elt == x) - } -} - -#[cfg(target_os = "linux")] -mod ffi { - use libc::c_void; - use libc::{c_int, size_t}; - extern { - pub fn memrchr(cx: *const c_void, c: c_int, n: size_t) -> *mut c_void; - } -} - -#[cfg(test)] -mod tests { - extern crate quickcheck; - - use super::{memchr, memrchr}; - - #[test] - fn matches_one() { - assert_eq!(Some(0), memchr(b'a', b"a")); - } - - #[test] - fn matches_begin() { - assert_eq!(Some(0), memchr(b'a', b"aaaa")); - } - - #[test] - fn matches_end() { - assert_eq!(Some(4), memchr(b'z', b"aaaaz")); - } - - #[test] - fn matches_nul() { - assert_eq!(Some(4), memchr(b'\x00', b"aaaa\x00")); - } - - #[test] - fn matches_past_nul() { - assert_eq!(Some(5), memchr(b'z', b"aaaa\x00z")); - } - - #[test] - fn no_match_empty() { - assert_eq!(None, memchr(b'a', b"")); - } - - #[test] - fn no_match() { - assert_eq!(None, memchr(b'a', b"xyz")); - } - - #[test] - fn qc_never_fail() { - fn prop(needle: u8, haystack: Vec) -> bool { - memchr(needle, &haystack); true - } - quickcheck::quickcheck(prop as fn(u8, Vec) -> bool); - } - - #[test] - fn matches_one_reversed() { - assert_eq!(Some(0), memrchr(b'a', b"a")); - } - - #[test] - fn matches_begin_reversed() { - assert_eq!(Some(3), memrchr(b'a', b"aaaa")); - } - - #[test] - fn matches_end_reversed() { - assert_eq!(Some(0), memrchr(b'z', b"zaaaa")); - } - - #[test] - fn matches_nul_reversed() { - assert_eq!(Some(4), memrchr(b'\x00', b"aaaa\x00")); - } - - #[test] - fn matches_past_nul_reversed() { - assert_eq!(Some(0), memrchr(b'z', b"z\x00aaaa")); - } - - #[test] - fn no_match_empty_reversed() { - assert_eq!(None, memrchr(b'a', b"")); - } - - #[test] - fn no_match_reversed() { - assert_eq!(None, memrchr(b'a', b"xyz")); - } - - #[test] - fn qc_never_fail_reversed() { - fn prop(needle: u8, haystack: Vec) -> bool { - memrchr(needle, &haystack); true - } - quickcheck::quickcheck(prop as fn(u8, Vec) -> bool); - } - - #[test] - fn qc_correct_memchr() { - fn prop(v: Vec, offset: u8) -> bool { - // test all pointer alignments - let uoffset = (offset & 0xF) as usize; - let data = if uoffset <= v.len() { - &v[uoffset..] - } else { - &v[..] - }; - for byte in 0..256u32 { - let byte = byte as u8; - if memchr(byte, &data) != data.iter().position(|elt| *elt == byte) { - return false; - } - } - true - } - quickcheck::quickcheck(prop as fn(Vec, u8) -> bool); - } - - #[test] - fn qc_correct_memrchr() { - fn prop(v: Vec, offset: u8) -> bool { - // test all pointer alignments - let uoffset = (offset & 0xF) as usize; - let data = if uoffset <= v.len() { - &v[uoffset..] - } else { - &v[..] - }; - for byte in 0..256u32 { - let byte = byte as u8; - if memrchr(byte, &data) != data.iter().rposition(|elt| *elt == byte) { - return false; - } - } - true - } - quickcheck::quickcheck(prop as fn(Vec, u8) -> bool); - } -} diff --git a/deps/nom-1.2.0/.travis.yml b/deps/nom-1.2.0/.travis.yml deleted file mode 100644 index ba60978fd..000000000 --- a/deps/nom-1.2.0/.travis.yml +++ /dev/null @@ -1,43 +0,0 @@ -language: rust - -addons: - apt: - packages: - - libcurl4-openssl-dev - - libelf-dev - - libdw-dev - -rust: - - nightly - - beta - - stable - - 1.2.0 - -before_script: - - pip install 'travis-cargo<0.2' --user && export PATH=$HOME/.local/bin:$PATH - -script: - - | - travis-cargo build && - travis-cargo test && - travis-cargo bench && - travis-cargo --only stable doc - -after_success: - - travis-cargo coveralls --no-sudo - -notifications: - webhooks: - urls: - - https://webhooks.gitter.im/e/9c035a194ac4fd4cc061 - on_success: change - on_failure: always - on_start: false - - -env: - global: - # override the default `--features unstable` used for the nightly branch (optional) - - TRAVIS_CARGO_NIGHTLY_FEATURE=nightly - -sudo: false diff --git a/deps/nom-1.2.0/CHANGELOG.md b/deps/nom-1.2.0/CHANGELOG.md deleted file mode 100644 index 9dc875023..000000000 --- a/deps/nom-1.2.0/CHANGELOG.md +++ /dev/null @@ -1,459 +0,0 @@ -# Change Log - -## [Unreleased][unreleased] - -### Changed - -## 1.2.0 - 2016-02-08 - -### Thanks -- @zentner-kyle for type inference fixes -- @joelself for his work on `&str` parsing and method parsers -- @GuillaumeGomez for implementing methods on `IResult` -- @dirk for the `alt_complete!` combinator -- @tstorch for a lot of refactoring work and unit tests additions -- @jansegre for the hex digit parsers -- @belgum for some documentation fixes -- @lwandrebeck for some documentation fixes and code fixes in `hex_digit` - -### Added -- `take_until_and_consume_s!` for consumption of string data until a tag -- more function patterns in `named!`. The error type can now be specified -- `alt_complete!` works like the `alt!` combinator, but tries the next branch if the current one returned `Incomplete`, instead of returning directly -- more unit tests for a lot of combinators -- hexadecimal digit parsers -- the `tuple!` combinator takes a list of parsers as argument, and applies them serially on the input. If all of them are successful, it willr eturn a tuple accumulating all the values. This combinator will (hopefully) replace most uses of `chain!` -- parsers can now be implemented as a method for a struct thanks to the `method!`, `call_m!` and `apply_rf!` combinators - -### Fixed -- there were type inference issues in a few combinators. They will now be easier to compile -- `peek!` compilation with bare functions -- `&str` parsers were splitting data at the byte level, not at the char level, which can result in inconsistencies in parsing UTF-8 characters. They now use character indexes -- some method implementations were missing on `ÌResult` (with specified error type instead of implicit) - -## 1.1.0 - 2016-01-01 - -This release adds a lot of features related to `&str` parsing. The previous versions -were focused on `&[u8]` and bit streams parsing, but there's a need for more text -parsing with nom. The parsing functions like `alpha`, `digit` and others will now -accept either a `&[u8]` or a `&str`, so there is no breaking change on that part. - -There are also a few performance improvements and documentation fixes. - -### Thanks -- @Binero for pushing the work on `&str` parsing -- @meh for fixing `Option` and `Vec` imports -- @hoodie for a documentation fix -- @joelself for some documentation fixes -- @vberger for his traits magic making `nom functions more generic - -### Added - -- string related parsers: `tag_s!`, `take_s!`, `is_a_s!`, `is_not_s!`, `take_while_s!`, `take_while1_s!`, `take_till_s! -- `value!` is a combinator that always returns the same value. If a child parser is passed as second argument, that value is returned when the child parser succeeds - -### Changed - -- `tag!` will now compare even on partial input. If it expects "abcd" but receives "ef", it will now return an `Error` instead of `Incomplete` -- `many0!` and others will preallocate a larger vector to avoid some copies and reallocations -- `alpha`, `digit`, `alphanumeric`, `space` and `multispace` now accept as input a `&[u8]` or a `&str`. Additionally, they return an error if they receive an empty input -- `take_while!`, `take_while1!`, `take_while_s!`, `take_while1_s!` wilreturn an error on empty input - -### Fixed - -- if the child parser of `many0!` or `many1!` returns `Incomplete`, it will return `Incomplete` too, possibly updating the needed size -- `Option,` `Some`, `None` and `Vec` are now used with full path imports - -## 1.0.1 - 2015-11-22 - -This releases makes the 1.0 version compatible with Rust 1.2 and 1.3 - -### Thanks -- @steveklabnik for fixing lifetime issues in Producers and Consumers - -## 1.0.0 - 2015-11-16 - -Stable release for nom. A lot of new features, a few breaking changes - -### Thanks -- @ahenry for macro fixes -- @bluss for fixing documentation -- @sourrust for cleaning code and debugging the new streaming utilities -- @meh for inline optimizations -- @ccmtaylor for fixing function imports -- @soro for improvements to the streaming utilities -- @breard-r for catching my typos -- @nelsonjchen for catching my typos too -- @divarvel for hex string parsers -- @mrordinaire for the `length_bytes!` combinator - -### Breaking changes -- `IResult::Error` can now use custom error types, and is generic over the input type -- Producers and consumers have been replaced. The new implementation uses less memory and integrates more with parsers -- `nom::ErrorCode` is now `nom::ErrorKind` -- `filter!` has been renamed to `take_while!` -- `chain!` will count how much data is consumed and use that number to calculate how much data is needed if a parser returned `Incomplete` -- `alt!` returns `Incomplete` if a child parser returned `Incomplete`, instead of skipping to the next parser -- `IResult` does not require a lifetime tag anymore, yay! - -### Added - -- `complete!` will return an error if the child parser returned `Incomplete` -- `add_error!` will wrap an error, but allow backtracking -- `hex_u32` parser - -### Fixed -- the behaviour around `Incomplete` is better for most parsers now - -## 0.5.0 - 2015-10-16 - -This release fixes a few issues and stabilizes the code. - -### Thanks -- @nox for documentation fixes -- @daboross for linting fixes -- @ahenry for fixing `tap!` and extending `dbg!` and `dbg_dmp!` -- @bluss for tracking down and fixing issues with unsafe code -- @meh for inlining parser functions -- @ccmtaylor for fixing import of `str::from_utf8` - -### Fixed -- `tap!`, `dbg!` and `dbg_dmp!` now accept function parameters - -### Changed -- the type used in `count_fixed!` must be `Copy` -- `chain!` calculates how much data is needed if one of the parsers returns `Incomplete -- optional parsers in `chain!` can return `Incomplete` - -## 0.4.0 - 2015-09-08 - -Considering the number of changes since the last release, this version can contain breaking changes, so the version number becomes 0.4.0. A lot of new features and performance improvements! - -### Thanks -- @frewsxcv for documentation fixes -- @ngrewe for his work on producers and consumers -- @meh for fixes on `chain!` and for the `rest` parser -- @daboross for refactoring `many0!` and `many1!` -- @aleksander for the `switch!` combinator idea -- @TechnoMancer for his help with bit level parsing -- @sxeraverx for pointing out a bug in `is_a!` - -### Fixed -- `count_fixed!` must take an explicit type as argument to generate the fixed-size array -- optional parsing behaviour in `chain!` -- `count!` can take 0 elements -- `is_a!` and `is_not!` can now consume the whole input - -### Added -- it is now possible to seek to the end of a `MemProducer` -- `opt!` returns `Done(input, None)` if `the child parser returned `Incomplete` -- `rest` will return the remaining input -- consumers can now seek to and from the end of input -- `switch!` applies a first parser then matches on its result to choose the next parser -- bit-level parsers -- character-level parsers -- regular expression parsers -- implementation of `take_till!`, `take_while!` and `take_while1!` - -### Changed -- `alt!` can return `Incomplete` -- the error analysis functions will now take references to functions instead of moving them -- performance improvements on producers -- performance improvement for `filter!` -- performance improvement for `count!`: a `Vec` of the right size is directly allocated - -## 0.3.11 - 2015-08-04 - -### Thanks -- @bluss for remarking that the crate included random junk lying non commited in my local repository - -### Fixed -- cleanup of my local repository will ship less files in the crates, resulting in a smaller download - -## 0.3.10 - 2015-08-03 - -### Added - -- `bits!` for bit level parsing. It indicates that all child parsers will take a `(&[u8], usize)`as input, with the second parameter indicating the bit offset in the first byte. This allows viewing a byte slice as a bit stream. Most combinators can be used directly under `bits!` -- `take_bits!` takes an integer type and a number of bits, consumes that number of bits and updates the offset, possibly by crossing byte boundaries -- bit level parsers are all written in `src/bits.rs` - -### Changed - -- Parsers that specifically handle bytes have been moved to src/bytes.rs`. This applies to `tag!`, `is_not!`, `is_a!`, `filter!`, `take!`, `take_str!`, `take_until_and_consume!`, `take_until!`, `take_until_either_and_consume!`, `take_until_either!` - -## 0.3.9 - 2015-07-20 - -### Thanks -- @badboy for fixing `filter!` -- @idmit for some documentation fixes - -### Added -- `opt_res!` applies a parser and transform its result in a Result. This parser never fails -- `cond_reduce!` takes an expression as parameter, applies the parser if the expression is true, and returns an error if the expression is false -- `tap!` pass the result of a parser to a block to manipulate it, but do not affect the parser's result -- `AccReader` is a Read+BufRead that supports data accumulation and partial consumption. The `consume` method must be called afterwardsto indicate how much was consumed -- Arithmetic expression evaluation and parsing example -- `u16!`, `u32!`, `u64!`, `i16!`, `i32!`, `i64!` take an expression as parameter, if the expression is true, apply the big endian integer parser, if false, the little endian version -- type information for combinators. This will make the documentation a bit easier to navigate - -### Fixed -- `map_opt!` and `map_res!` had issues with argument order due to bad macros -- `delimited!` did not compile for certain combinations of arguments -- `filter!` did not return a byte slice but a fixed array - -## 0.3.8 - 2015-07-03 - -### Added -- code coverage is now calculated automatically on Travis CI -- `Stepper`: wrap a `Producer`, and call the method `step` with a parser. This method will buffer data if there is not enough, apply the parser if there is, and keep the rest of the input in memory for the next call -- `ReadProducer`: takes something implementing `Read`, and makes a `Producer` out of it - -### Fixed -- the combinators `separated_pair!` and `delimited!` did not work because an implementation macro was not exported -- if a `MemProducer` reached its end, it should always return `Eof` -- `map!` had issues with argument matching - -## 0.3.7 - 2015-06-24 - -### Added -- `expr_res!` and `expr_opt!` evaluate an expression returning a Result or Opt and convert it to IResult -- `AsBytes` is implemented for fixed size arrays. This allows `tag!([41u8, 42u8])` - -### Fixed -- `count_fixed!` argument parsing works again - -## 0.3.6 - 2015-06-15 - -### Added -- documentation for a few functions -- the consumer trait now requires the `failed(&self, error_code)` method in case of parsing error -- `named!` now handles thge alternative `named!(pub fun_name, ...)` - -### Fixed -- `filter!` now returns the whole input if the filter function never returned false -- `take!` casts its argument as usize, so it can accepts any integer type now - -## 0.3.5 - 2015-06-10 - -### Thanks -- @cmr for some documentation fixes - -### Added -- `count_fixed!` returns a fixed array - -### Fixed -- `count!` is back to the previous behaviour, returning a `Vec` for sizes known at runtime - -### Changed -- functions and traits exported from `nom::util` are now directly in `nom::` - -## 0.3.4 - 2015-06-09 - -### Thanks -- @andrew-d for fixes on `cond!` -- @keruspe for features in `chain!` - -### Added -- `chain!` can now have mutable fields - -### Fixed -- `cond!` had an infinite macro recursion - -### Changed -- `chain!` generates less code now. No apprent compilation time improvement - -## 0.3.3 - 2015-06-09 - -### Thanks -- @andrew-d for the little endian signed integer parsers -- @keruspe for fixes on `count!` - -### Added -- `le_i8`, `le_i16`, `le_i32`, `le_i64`: little endian signed integer parsers - -### Changed -- the `alt!` parser compiles much faster, even with more than 8 branches -- `count!` can now return a fixed size array instead of a growable vector - -## 0.3.2 - 2015-05-31 - -### Thanks -- @keruspe for the `take_str` parser and the function application combinator - -### Added -- `take_str!`: takes the specified number of bytes and return a UTF-8 string -- `apply!`: do partial application on the parameters of a function - -### Changed -- `Needed::Size` now contains a `usize` instead of a `u32` - -## 0.3.1 - 2015-05-21 - -### Thanks -- @divarvel for the big endian signed integer parsers - -### Added -- `be_i8`, `be_i16`, `be_i32`, `be_i64`: big endian signed integer parsers -- the `core` feature can be passed to cargo to build with `no_std` -- colored hexdump can be generated from error chains - -## 0.3.0 - 2015-05-07 - -### Thanks -- @filipegoncalves for some documentation and the new eof parser -- @CrimsonVoid for putting fully qualified types in the macros -- @lu_zero for some documentation fixes - -### Added -- new error types that can contain an error code, an input slice, and a list of following errors -- `error!` will cut backtracking and return directly from the parser, with a specified error code -- `eof` parser, successful if there is no more input -- specific error codes for the parsers provided by nom - -### Changed -- fully qualified types in macros. A lot of imports are not needed anymore - -### Removed -- `FlatMap`, `FlatpMapOpt` and `Functor` traits (replaced by `map!`, `map_opt!` and `map_res!`) - -## 0.2.2 - 2015-04-12 - -### Thanks -- @filipegoncalves and @thehydroimpulse for debugging an infinite loop in many0 and many1 -- @thehydroimpulse for suggesting public named parsers -- @skade for removing the dependency on the collections gate - -### Added -- `named!` can now declare public functions like this: `named!(pub tst, tag!("abcd"));` -- `pair!(X,Y)` returns a tuple `(x, y)` -- `separated_pair!(X, sep, Y)` returns a tuple `(x, y)` -- `preceded!(opening, X)` returns `x` -- `terminated!(X, closing)` returns `x` -- `delimited(opening, X, closing)` returns `x` -- `separated_list(sep, X)` returns a `Vec` -- `separated_nonempty_list(sep, X)` returns a `Vec` of at list one element - -### Changed -- `many0!` and `many1!` forbid parsers that do not consume input -- `is_a!`, `is_not!`, `alpha`, `digit`, `space`, `multispace` will now return an error if they do not consume at least one byte - -## 0.2.1 - 2015-04-04 - -### Thanks -- @mtsr for catching the remaining debug println! -- @jag426 who killed a lot of warnings -- @skade for removing the dependency on the core feature gate - - -### Added -- little endian unsigned int parsers le_u8, le_u16, le_u32, le_u64 -- `count!` to apply a parser a specified number of times -- `cond!` applies a parser if the condition is met -- more parser development tools in `util::*` - -### Fixed -- in one case, `opt!` would not compile - -### Removed -- most of the feature gates are now removed. The only one still needed is `collections` - -## 0.2.0 - 2015-03-24 -*works with `rustc 1.0.0-dev (81e2396c7 2015-03-19) (built 2015-03-19)`* - -### Thanks -- Ryman for the AsBytes implementation -- jag426 and jaredly for documentation fixes -- eternaleye on #rust IRC for his help on the new macro syntax - -### Changed -- the AsBytes trait improves readability, no more b"...", but "..." instead -- Incomplete will now hold either Needed;;Unknown, or Needed::Size(u32). Matching on Incomplete without caring for the value is done with `Incomplete(_)`, but if more granularity is mandatory, `Needed` can be matched too -- `alt!` can pass the result of the parser to a closure -- the `take_*` macros changed behaviour, the default case is now not to consume the separator. The macros have been renamed as follows: `take_until!` -> `take_until_and_consume!`, `take_until_and_leave!` -> `take_until!`, `take_until_either_and_leave!` -> `take_until_either!`, `take_until_either!` -> `take_until_either_and_consume!` - -### Added -- `peek!` macro: matches the future input but does not consume it -- `length_value!` macro: the first argument is a parser returning a `n` that can cast to usize, then applies the second parser `n` times. The macro has a variant with a third argument indicating the expected input size for the second parser -- benchmarks are available at https://github.com/Geal/nom_benchmarks -- more documentation -- **Unnamed parser syntax**: warning, this is a breaking change. With this new syntax, the macro combinators do not generate functions anymore, they create blocks. That way, they can be nested, for better readability. The `named!` macro is provided to create functions from parsers. Please be aware that nesting parsers comes with a small cost of compilation time, negligible in most cases, but can quickly get to the minutes scale if not careful. If this happens, separate your parsers in multiple subfunctions. -- `named!`, `closure!` and `call!` macros used to support the unnamed syntax -- `map!`, `map_opt!` and `map_res!` to combine a parser with a normal function, transforming the input directly, or returning an `Option` or `Result` - -### Fixed -- `is_a!` is now working properly - -### Removed -- the `o!` macro does less than `chain!`, so it has been removed -- the `fold0!` and `fold1!` macros were too complex and awkward to use, the `many*` combinators will be useful for most uses for now - -## 0.1.6 - 2015-02-24 -### Changed -- consumers must have an end method that will be called after parsing - -### Added -- big endian unsigned int and float parsers: be_u8, be_u16, be_u32, be_u64, be_f32, be_f64 -- producers can seek -- function and macros documentation -- README documentation -### Fixed -- lifetime declarations -- tag! can return Incomplete - -## 0.1.5 - 2015-02-17 -### Changed -- traits were renamed: FlatMapper -> FlatMap, Mapper -> FlatMapOpt, Mapper2 -> Functor - -### Fixed -- woeks with rustc f1bb6c2f4 - -## 0.1.4 - 2015-02-17 -### Changed -- the chaining macro can take optional arguments with '?' - -## 0.1.3 - 2015-02-16 -### Changed -- the chaining macro now takes the closure at the end of the argument list - -## 0.1.2 - 2015-02-16 -### Added -- flat_map implementation for <&[u8], &[u8]> -- chaining macro -- partial MP4 parser example - - -## 0.1.1 - 2015-02-06 -### Fixed -- closure syntax change - -## Compare code - -* [unreleased]: https://github.com/Geal/nom/compare/1.2.0...HEAD -* [1.2.0]: https://github.com/Geal/nom/compare/1.1.0...1.2.0 -* [1.1.0]: https://github.com/Geal/nom/compare/1.0.1...1.1.0 -* [1.0.1]: https://github.com/Geal/nom/compare/1.0.0...1.0.1 -* [1.0.0]: https://github.com/Geal/nom/compare/0.5.0...1.0.0 -* [0.5.0]: https://github.com/geal/nom/compare/0.4.0...0.5.0 -* [0.4.0]: https://github.com/geal/nom/compare/0.3.11...0.4.0 -* [0.3.11]: https://github.com/geal/nom/compare/0.3.10...0.3.11 -* [0.3.10]: https://github.com/geal/nom/compare/0.3.9...0.3.10 -* [0.3.9]: https://github.com/geal/nom/compare/0.3.8...0.3.9 -* [0.3.8]: https://github.com/Geal/nom/compare/0.3.7...0.3.8 -* [0.3.7]: https://github.com/Geal/nom/compare/0.3.6...0.3.7 -* [0.3.6]: https://github.com/Geal/nom/compare/0.3.5...0.3.6 -* [0.3.5]: https://github.com/Geal/nom/compare/0.3.4...0.3.5 -* [0.3.4]: https://github.com/Geal/nom/compare/0.3.3...0.3.4 -* [0.3.3]: https://github.com/Geal/nom/compare/0.3.2...0.3.3 -* [0.3.2]: https://github.com/Geal/nom/compare/0.3.1...0.3.2 -* [0.3.1]: https://github.com/Geal/nom/compare/0.3.0...0.3.1 -* [0.3.0]: https://github.com/Geal/nom/compare/0.2.2...0.3.0 -* [0.2.2]: https://github.com/Geal/nom/compare/0.2.1...0.2.2 -* [0.2.1]: https://github.com/Geal/nom/compare/0.2.0...0.2.1 -* [0.2.0]: https://github.com/Geal/nom/compare/0.1.6...0.2.0 -* [0.1.6]: https://github.com/Geal/nom/compare/0.1.5...0.1.6 -* [0.1.5]: https://github.com/Geal/nom/compare/0.1.4...0.1.5 -* [0.1.4]: https://github.com/Geal/nom/compare/0.1.3...0.1.4 -* [0.1.3]: https://github.com/Geal/nom/compare/0.1.2...0.1.3 -* [0.1.2]: https://github.com/Geal/nom/compare/0.1.1...0.1.2 -* [0.1.1]: https://github.com/Geal/nom/compare/0.1.0...0.1.1 diff --git a/deps/nom-1.2.0/Cargo.toml b/deps/nom-1.2.0/Cargo.toml deleted file mode 100644 index e25ad5a71..000000000 --- a/deps/nom-1.2.0/Cargo.toml +++ /dev/null @@ -1,38 +0,0 @@ -[package] - -name = "nom" -version = "1.2.0" -authors = [ "contact@geoffroycouprie.com" ] -description = "A byte-oriented, zero-copy, parser combinators library" -license = "MIT" -repository = "https://github.com/Geal/nom" -readme = "README.md" -documentation = "http://rust.unhandledexpression.com/nom/" -keywords = ["parser", "parser-combinators", "parsing", "streaming", "bit"] - -include = [ - "CHANGELOG.md", - "LICENSE", - ".gitignore", - ".travis.yml", - "Cargo.toml", - "src/*.rs", - "tests/*.rs" -] - -[features] -core = [] -nightly = [] -default = ["stream"] -regexp = ["regex"] -regexp_macros = ["regexp", "regex_macros"] -stream = [] - -[dependencies.regex] -version = "^0.1.41" -optional = true - -[dependencies.regex_macros] -version = "^0.1.21" -optional = true - diff --git a/deps/nom-1.2.0/src/bytes.rs b/deps/nom-1.2.0/src/bytes.rs deleted file mode 100644 index 1418da6b6..000000000 --- a/deps/nom-1.2.0/src/bytes.rs +++ /dev/null @@ -1,1006 +0,0 @@ -//! Byte level parsers and combinators -//! - -/// `recognize!(&[T] -> IResult<&[T], O> ) => &[T] -> IResult<&[T], &[T]>` -/// if the child parser was successful, return the consumed input as produced value -/// -/// ``` -/// # #[macro_use] extern crate nom; -/// # use nom::IResult::Done; -/// # fn main() { -/// named!(x, recognize!(delimited!(tag!("")))); -/// let r = x(&b" aaa"[..]); -/// assert_eq!(r, Done(&b" aaa"[..], &b""[..])); -/// # } -/// ``` -#[macro_export] -macro_rules! recognize ( - ($i:expr, $submac:ident!( $($args:tt)* )) => ( - { - use $crate::HexDisplay; - match $submac!($i, $($args)*) { - $crate::IResult::Done(i,_) => { - let index = ($i).offset(i); - $crate::IResult::Done(i, &($i)[..index]) - }, - $crate::IResult::Error(e) => return $crate::IResult::Error(e), - $crate::IResult::Incomplete(i) => return $crate::IResult::Incomplete(i) - } - } - ); - ($i:expr, $f:expr) => ( - recognize!($i, call!($f)) - ); -); - -/// `tag!(&[T]: nom::AsBytes) => &[T] -> IResult<&[T], &[T]>` -/// declares a byte array as a suite to recognize -/// -/// consumes the recognized characters -/// -/// ``` -/// # #[macro_use] extern crate nom; -/// # use nom::IResult::Done; -/// # fn main() { -/// named!(x, tag!("abcd")); -/// let r = x(&b"abcdefgh"[..]); -/// assert_eq!(r, Done(&b"efgh"[..], &b"abcd"[..])); -/// # } -/// ``` -#[macro_export] -macro_rules! tag ( - ($i:expr, $inp: expr) => ( - { - #[inline(always)] - fn as_bytes(b: &T) -> &[u8] { - b.as_bytes() - } - - let expected = $inp; - let bytes = as_bytes(&expected); - - tag_bytes!($i,bytes) - } - ); -); - -#[doc(hidden)] -#[macro_export] -macro_rules! tag_bytes ( - ($i:expr, $bytes: expr) => ( - { - use std::cmp::min; - let len = $i.len(); - let blen = $bytes.len(); - let m = min(len, blen); - let reduced = &$i[..m]; - let b = &$bytes[..m]; - - let res: $crate::IResult<_,_> = if reduced != b { - $crate::IResult::Error($crate::Err::Position($crate::ErrorKind::Tag, $i)) - } else if m < blen { - $crate::IResult::Incomplete($crate::Needed::Size(blen)) - } else { - $crate::IResult::Done(&$i[blen..], reduced) - }; - res - } - ); -); - -/// `is_not!(&[T:AsBytes]) => &[T] -> IResult<&[T], &[T]>` -/// returns the longest list of bytes that do not appear in the provided array -/// -/// ``` -/// # #[macro_use] extern crate nom; -/// # use nom::IResult::Done; -/// # fn main() { -/// named!( not_space, is_not!( " \t\r\n" ) ); -/// -/// let r = not_space(&b"abcdefgh\nijkl"[..]); -/// assert_eq!(r, Done(&b"\nijkl"[..], &b"abcdefgh"[..])); -/// # } -/// ``` -#[macro_export] -macro_rules! is_not( - ($input:expr, $arr:expr) => ( - { - #[inline(always)] - fn as_bytes(b: &T) -> &[u8] { - b.as_bytes() - } - - let expected = $arr; - let bytes = as_bytes(&expected); - - is_not_bytes!($input, bytes) - } - ); -); - -#[doc(hidden)] -#[macro_export] -macro_rules! is_not_bytes ( - ($input:expr, $bytes:expr) => ( - { - let res: $crate::IResult<_,_> = match $input.iter().position(|c| { - for &i in $bytes.iter() { - if *c == i { return true } - } - false - }) { - Some(0) => $crate::IResult::Error($crate::Err::Position($crate::ErrorKind::IsNot,$input)), - Some(n) => { - let res = $crate::IResult::Done(&$input[n..], &$input[..n]); - res - }, - None => { - $crate::IResult::Done(&b""[..], $input) - } - }; - res - } - ); -); - -/// `is_a!(&[T]) => &[T] -> IResult<&[T], &[T]>` -/// returns the longest list of bytes that appear in the provided array -/// -/// ``` -/// # #[macro_use] extern crate nom; -/// # use nom::IResult::Done; -/// # fn main() { -/// named!(abcd, is_a!( "abcd" )); -/// -/// let r1 = abcd(&b"aaaaefgh"[..]); -/// assert_eq!(r1, Done(&b"efgh"[..], &b"aaaa"[..])); -/// -/// let r2 = abcd(&b"dcbaefgh"[..]); -/// assert_eq!(r2, Done(&b"efgh"[..], &b"dcba"[..])); -/// # } -/// ``` -#[macro_export] -macro_rules! is_a ( - ($input:expr, $arr:expr) => ( - { - #[inline(always)] - fn as_bytes(b: &T) -> &[u8] { - b.as_bytes() - } - - let expected = $arr; - let bytes = as_bytes(&expected); - - is_a_bytes!($input, bytes) - } - ); -); - -#[doc(hidden)] -#[macro_export] -macro_rules! is_a_bytes ( - ($input:expr, $bytes:expr) => ( - { - let res: $crate::IResult<_,_> = match $input.iter().position(|c| { - for &i in $bytes.iter() { - if *c == i { return false } - } - true - }) { - Some(0) => $crate::IResult::Error($crate::Err::Position($crate::ErrorKind::IsA,$input)), - Some(n) => { - let res: $crate::IResult<_,_> = $crate::IResult::Done(&$input[n..], &$input[..n]); - res - }, - None => { - $crate::IResult::Done(&b""[..], $input) - } - }; - res - } - ); -); - -/// `escaped!(&[T] -> IResult<&[T], &[T]>, T, &[T] -> IResult<&[T], &[T]>) => &[T] -> IResult<&[T], &[T]>` -/// matches a byte string with escaped characters. -/// -/// The first argument parses the normal characters, the second argument is the control character (like `\` in most languages), -/// the third argument matches the escaped characters -/// -/// ``` -/// # #[macro_use] extern crate nom; -/// # use nom::IResult::Done; -/// # use nom::alpha; -/// # fn main() { -/// named!(esc, escaped!(call!(alpha), '\\', is_a_bytes!(&b"\"n\\"[..]))); -/// assert_eq!(esc(&b"abcd"[..]), Done(&b""[..], &b"abcd"[..])); -/// assert_eq!(esc(&b"ab\\\"cd"[..]), Done(&b""[..], &b"ab\\\"cd"[..])); -/// # } -/// ``` -#[macro_export] -macro_rules! escaped ( - ($i:expr, $submac:ident!( $($args:tt)* ), $control_char: expr, $($rest:tt)+) => ( - { - escaped1!($i, $submac!($($args)*), $control_char, $($rest)*) - } - ); - - ($i:expr, $f:expr, $control_char: expr, $($rest:tt)+) => ( - escaped1!($i, call!($f), $control_char, $($rest)*) - ); -); - -/// Internal parser, do not use directly -#[doc(hidden)] -#[macro_export] -macro_rules! escaped1 ( - ($i:expr, $submac1:ident!( $($args:tt)* ), $control_char: expr, $submac2:ident!( $($args2:tt)*) ) => ( - { - escaped_impl!($i, $submac1!($($args)*), $control_char, $submac2!($($args2)*)) - } - ); - ($i:expr, $submac1:ident!( $($args:tt)* ), $control_char: expr, $g:expr) => ( - escaped_impl!($i, $submac1!($($args)*), $control_char, call!($g)) - ); -); - -#[doc(hidden)] -#[macro_export] -macro_rules! escaped_impl ( - ($i: expr, $normal:ident!( $($args:tt)* ), $control_char: expr, $escapable:ident!( $($args2:tt)* )) => ( - { - let cl = || { - use $crate::HexDisplay; - let mut index = 0; - - while index < $i.len() { - if let $crate::IResult::Done(i,_) = $normal!(&$i[index..], $($args)*) { - if i.is_empty() { - return $crate::IResult::Done(&b""[..], $i) - } else { - index = $i.offset(i); - } - } else if $i[index] == $control_char as u8 { - if index + 1 >= $i.len() { - return $crate::IResult::Error($crate::Err::Position($crate::ErrorKind::Escaped,&$i[index..])); - } else { - match $escapable!(&$i[index+1..], $($args2)*) { - $crate::IResult::Done(i,_) => { - if i.is_empty() { - return $crate::IResult::Done(&b""[..], $i) - } else { - index = $i.offset(i); - } - }, - $crate::IResult::Incomplete(i) => return $crate::IResult::Incomplete(i), - $crate::IResult::Error(e) => return $crate::IResult::Error(e) - } - } - } else { - if index == 0 { - return $crate::IResult::Error($crate::Err::Position($crate::ErrorKind::Escaped,&$i[index..])) - } else { - return $crate::IResult::Done(&$i[index..], &$i[..index]) - } - } - } - $crate::IResult::Done(&$i[index..], &$i[..index]) - }; - match cl() { - $crate::IResult::Incomplete(x) => $crate::IResult::Incomplete(x), - $crate::IResult::Done(i, o) => $crate::IResult::Done(i, o), - $crate::IResult::Error(e) => { - return $crate::IResult::Error($crate::Err::NodePosition($crate::ErrorKind::Escaped, $i, Box::new(e))) - } - } - } - ); -); - -/// `escaped_transform!(&[T] -> IResult<&[T], &[T]>, T, &[T] -> IResult<&[T], &[T]>) => &[T] -> IResult<&[T], Vec>` -/// matches a byte string with escaped characters. -/// -/// The first argument parses the normal characters, the second argument is the control character (like `\` in most languages), -/// the third argument matches the escaped characters and trnasforms them. -/// -/// As an example, the chain `abc\tdef` could be `abc def` (it also consumes the control character) -/// -/// ``` -/// # #[macro_use] extern crate nom; -/// # use nom::IResult::Done; -/// # use nom::alpha; -/// # use std::str::from_utf8; -/// # fn main() { -/// fn to_s(i:Vec) -> String { -/// String::from_utf8_lossy(&i).into_owned() -/// } - -/// named!(transform < String >, -/// map!( -/// escaped_transform!(call!(alpha), '\\', -/// alt!( -/// tag!("\\") => { |_| &b"\\"[..] } -/// | tag!("\"") => { |_| &b"\""[..] } -/// | tag!("n") => { |_| &b"\n"[..] } -/// ) -/// ), to_s -/// ) -/// ); -/// assert_eq!(transform(&b"ab\\\"cd"[..]), Done(&b""[..], String::from("ab\"cd"))); -/// # } -/// ``` -#[macro_export] -macro_rules! escaped_transform ( - ($i:expr, $submac:ident!( $($args:tt)* ), $control_char: expr, $($rest:tt)+) => ( - { - escaped_transform1!($i, $submac!($($args)*), $control_char, $($rest)*) - } - ); - - ($i:expr, $f:expr, $control_char: expr, $($rest:tt)+) => ( - escaped_transform1!($i, call!($f), $control_char, $($rest)*) - ); -); - -/// Internal parser, do not use directly -#[doc(hidden)] -#[macro_export] -macro_rules! escaped_transform1 ( - ($i:expr, $submac1:ident!( $($args:tt)* ), $control_char: expr, $submac2:ident!( $($args2:tt)*) ) => ( - { - escaped_transform_impl!($i, $submac1!($($args)*), $control_char, $submac2!($($args2)*)) - } - ); - ($i:expr, $submac1:ident!( $($args:tt)* ), $control_char: expr, $g:expr) => ( - escaped_transform_impl!($i, $submac1!($($args)*), $control_char, call!($g)) - ); -); - -#[doc(hidden)] -#[macro_export] -macro_rules! escaped_transform_impl ( - ($i: expr, $normal:ident!( $($args:tt)* ), $control_char: expr, $transform:ident!( $($args2:tt)* )) => ( - { - let cl = || { - use $crate::HexDisplay; - let mut index = 0; - let mut res = Vec::new(); - - while index < $i.len() { - if let $crate::IResult::Done(i,o) = $normal!(&$i[index..], $($args)*) { - res.extend(o.iter().cloned()); - if i.is_empty() { - return $crate::IResult::Done(&b""[..], res) - } else { - index = $i.offset(i); - } - } else if $i[index] == $control_char as u8 { - if index + 1 >= $i.len() { - return $crate::IResult::Error($crate::Err::Position($crate::ErrorKind::EscapedTransform,&$i[index..])); - } else { - match $transform!(&$i[index+1..], $($args2)*) { - $crate::IResult::Done(i,o) => { - res.extend(o.iter().cloned()); - if i.is_empty() { - return $crate::IResult::Done(&b""[..], res) - } else { - index = $i.offset(i); - } - }, - $crate::IResult::Incomplete(i) => return $crate::IResult::Incomplete(i), - $crate::IResult::Error(e) => return $crate::IResult::Error(e) - } - } - } else { - if index == 0 { - return $crate::IResult::Error($crate::Err::Position($crate::ErrorKind::EscapedTransform,&$i[index..])) - } else { - return $crate::IResult::Done(&$i[index..], res) - } - } - } - $crate::IResult::Done(&$i[index..], res) - }; - match cl() { - $crate::IResult::Incomplete(x) => $crate::IResult::Incomplete(x), - $crate::IResult::Done(i, o) => $crate::IResult::Done(i, o), - $crate::IResult::Error(e) => { - return $crate::IResult::Error($crate::Err::NodePosition($crate::ErrorKind::EscapedTransform, $i, Box::new(e))) - } - } - } - ) -); - -/// `take_while!(T -> bool) => &[T] -> IResult<&[T], &[T]>` -/// returns the longest list of bytes until the provided function fails. -/// -/// The argument is either a function `T -> bool` or a macro returning a `bool -/// -/// ``` -/// # #[macro_use] extern crate nom; -/// # use nom::IResult::Done; -/// # use nom::is_alphanumeric; -/// # fn main() { -/// named!( alpha, take_while!( is_alphanumeric ) ); -/// -/// let r = alpha(&b"abcd\nefgh"[..]); -/// assert_eq!(r, Done(&b"\nefgh"[..], &b"abcd"[..])); -/// # } -/// ``` -#[macro_export] -macro_rules! take_while ( - ($input:expr, $submac:ident!( $($args:tt)* )) => ( - { - match $input.iter().position(|c| !$submac!(*c, $($args)*)) { - Some(n) => { - let res:$crate::IResult<_,_> = $crate::IResult::Done(&$input[n..], &$input[..n]); - res - }, - None => { - $crate::IResult::Done(&$input[..0], $input) - } - } - } - ); - ($input:expr, $f:expr) => ( - take_while!($input, call!($f)); - ); -); - -/// `take_while1!(&[T] -> bool) => &[T] -> IResult<&[T], &[T]>` -/// returns the longest (non empty) list of bytes until the provided function fails. -/// -/// The argument is either a function `&[T] -> bool` or a macro returning a `bool -#[macro_export] -macro_rules! take_while1 ( - ($input:expr, $submac:ident!( $($args:tt)* )) => ( - { - use $crate::InputLength; - if ($input).input_len() == 0 { - $crate::IResult::Error($crate::Err::Position($crate::ErrorKind::TakeWhile1,$input)) - } else { - match $input.iter().position(|c| !$submac!(*c, $($args)*)) { - Some(0) => $crate::IResult::Error($crate::Err::Position($crate::ErrorKind::TakeWhile1,$input)), - Some(n) => { - $crate::IResult::Done(&$input[n..], &$input[..n]) - }, - None => { - $crate::IResult::Done(&$input[..0], $input) - } - } - } - } - ); - ($input:expr, $f:expr) => ( - take_while1!($input, call!($f)); - ); -); - -/// `take_till!(T -> bool) => &[T] -> IResult<&[T], &[T]>` -/// returns the longest list of bytes until the provided function succeeds -/// -/// The argument is either a function `&[T] -> bool` or a macro returning a `bool -#[macro_export] -macro_rules! take_till ( - ($input:expr, $submac:ident!( $($args:tt)* )) => ( - - { - match $input.iter().position(|c| $submac!(c, $($args)*)) { - Some(n) => $crate::IResult::Done(&$input[n..], &$input[..n]), - None => $crate::IResult::Done(&b""[..], $input) - } - } - ); - ($input:expr, $f:expr) => ( - take_till!($input, call!($f)); - ); -); - -/// `take!(nb) => &[T] -> IResult<&[T], &[T]>` -/// generates a parser consuming the specified number of bytes -/// -/// ``` -/// # #[macro_use] extern crate nom; -/// # use nom::IResult::Done; -/// # fn main() { -/// // Desmond parser -/// named!(take5, take!( 5 ) ); -/// -/// let a = b"abcdefgh"; -/// -/// assert_eq!(take5(&a[..]), Done(&b"fgh"[..], &b"abcde"[..])); -/// # } -/// ``` -#[macro_export] -macro_rules! take ( - ($i:expr, $count:expr) => ( - { - let cnt = $count as usize; - let res: $crate::IResult<_,_> = if $i.len() < cnt { - $crate::IResult::Incomplete($crate::Needed::Size(cnt)) - } else { - $crate::IResult::Done(&$i[cnt..],&$i[0..cnt]) - }; - res - } - ); -); - -/// `take!(nb) => &[T] -> IResult<&[T], &str>` -/// same as take! but returning a &str -#[macro_export] -macro_rules! take_str ( - ( $i:expr, $size:expr ) => ( map_res!($i, take!($size), ::std::str::from_utf8) ); -); - -/// `take_until_and_consume!(tag) => &[T] -> IResult<&[T], &[T]>` -/// generates a parser consuming bytes until the specified byte sequence is found, and consumes it -#[macro_export] -macro_rules! take_until_and_consume( - ($i:expr, $inp:expr) => ( - { - #[inline(always)] - fn as_bytes(b: &T) -> &[u8] { - b.as_bytes() - } - - let expected = $inp; - let bytes = as_bytes(&expected); - take_until_and_consume_bytes!($i, bytes) - } - ); -); - -#[doc(hidden)] -#[macro_export] -macro_rules! take_until_and_consume_bytes ( - ($i:expr, $bytes:expr) => ( - { - let res: $crate::IResult<_,_> = if $bytes.len() > $i.len() { - $crate::IResult::Incomplete($crate::Needed::Size($bytes.len())) - } else { - let mut index = 0; - let mut parsed = false; - - for idx in 0..$i.len() { - if idx + $bytes.len() > $i.len() { - index = idx; - break; - } - if &$i[idx..idx + $bytes.len()] == $bytes { - parsed = true; - index = idx; - break; - } - } - - if parsed { - $crate::IResult::Done(&$i[(index + $bytes.len())..], &$i[0..index]) - } else { - $crate::IResult::Error($crate::Err::Position($crate::ErrorKind::TakeUntilAndConsume,$i)) - } - }; - res - } - ); -); - -/// `take_until!(tag) => &[T] -> IResult<&[T], &[T]>` -/// consumes data until it finds the specified tag -#[macro_export] -macro_rules! take_until( - ($i:expr, $inp:expr) => ( - { - #[inline(always)] - fn as_bytes(b: &T) -> &[u8] { - b.as_bytes() - } - - let expected = $inp; - let bytes = as_bytes(&expected); - take_until_bytes!($i, bytes) - } - ); -); - -#[doc(hidden)] -#[macro_export] -macro_rules! take_until_bytes( - ($i:expr, $bytes:expr) => ( - { - let res: $crate::IResult<_,_> = if $bytes.len() > $i.len() { - $crate::IResult::Incomplete($crate::Needed::Size($bytes.len())) - } else { - let mut index = 0; - let mut parsed = false; - - for idx in 0..$i.len() { - if idx + $bytes.len() > $i.len() { - index = idx; - break; - } - if &$i[idx..idx+$bytes.len()] == $bytes { - parsed = true; - index = idx; - break; - } - } - - if parsed { - $crate::IResult::Done(&$i[index..], &$i[0..index]) - } else { - $crate::IResult::Error($crate::Err::Position($crate::ErrorKind::TakeUntil,$i)) - } - }; - res - } - ); -); - -/// `take_until_either_and_consume!(tag) => &[T] -> IResult<&[T], &[T]>` -/// consumes data until it finds any of the specified characters, and consume it -#[macro_export] -macro_rules! take_until_either_and_consume( - ($i:expr, $inp:expr) => ( - { - #[inline(always)] - fn as_bytes(b: &T) -> &[u8] { - b.as_bytes() - } - - let expected = $inp; - let bytes = as_bytes(&expected); - take_until_either_and_consume_bytes!($i, bytes) - } - ); -); - -#[doc(hidden)] -#[macro_export] -macro_rules! take_until_either_and_consume_bytes( - ($i:expr, $bytes:expr) => ( - { - let res: $crate::IResult<_,_> = if 1 > $i.len() { - $crate::IResult::Incomplete($crate::Needed::Size(1)) - } else { - let mut index = 0; - let mut parsed = false; - - for idx in 0..$i.len() { - if idx + 1 > $i.len() { - index = idx; - break; - } - for &t in $bytes.iter() { - if $i[idx] == t { - parsed = true; - index = idx; - break; - } - } - if parsed { break; } - } - - if parsed { - $crate::IResult::Done(&$i[(index+1)..], &$i[0..index]) - } else { - $crate::IResult::Error($crate::Err::Position($crate::ErrorKind::TakeUntilEitherAndConsume,$i)) - } - }; - res - } - ); -); - -/// `take_until_either!(tag) => &[T] -> IResult<&[T], &[T]>` -#[macro_export] -macro_rules! take_until_either( - ($i:expr, $inp:expr) => ( - { - #[inline(always)] - fn as_bytes(b: &T) -> &[u8] { - b.as_bytes() - } - - let expected = $inp; - let bytes = as_bytes(&expected); - take_until_either_bytes!($i, bytes) - } - ); -); - -#[doc(hidden)] -#[macro_export] -macro_rules! take_until_either_bytes( - ($i:expr, $bytes:expr) => ( - { - let res: $crate::IResult<_,_> = if 1 > $i.len() { - $crate::IResult::Incomplete($crate::Needed::Size(1)) - } else { - let mut index = 0; - let mut parsed = false; - - for idx in 0..$i.len() { - if idx + 1 > $i.len() { - index = idx; - break; - } - for &t in $bytes.iter() { - if $i[idx] == t { - parsed = true; - index = idx; - break; - } - } - if parsed { break; } - } - - if parsed { - $crate::IResult::Done(&$i[index..], &$i[0..index]) - } else { - $crate::IResult::Error($crate::Err::Position($crate::ErrorKind::TakeUntilEither,$i)) - } - }; - res - } - ); -); - -/// `length_bytes!(&[T] -> IResult<&[T], nb>) => &[T] -> IResult<&[T], &[T]> -/// gets a number from the first parser, then extracts that many bytes from the -/// remaining stream -#[macro_export] -macro_rules! length_bytes( - ($i:expr, $f:expr) => ( - { - match $f($i) { - $crate::IResult::Error(a) => $crate::IResult::Error(a), - $crate::IResult::Incomplete(i) => $crate::IResult::Incomplete(i), - $crate::IResult::Done(i1,nb) => { - let length_remaining = i1.len(); - if length_remaining < nb { - $crate::IResult::Incomplete($crate::Needed::Size(nb - length_remaining)) - } else { - $crate::IResult::Done(&i1[nb..], &i1[..nb]) - } - } - } - } - ) -); - -#[cfg(test)] -mod tests { - use internal::Needed; - use internal::IResult::*; - use internal::Err::*; - use util::ErrorKind; - use nom::{alpha, digit, hex_digit, alphanumeric, space, multispace}; - - #[test] - fn is_a() { - named!(a_or_b, is_a!(&b"ab"[..])); - - let a = &b"abcd"[..]; - assert_eq!(a_or_b(a), Done(&b"cd"[..], &b"ab"[..])); - - let b = &b"bcde"[..]; - assert_eq!(a_or_b(b), Done(&b"cde"[..], &b"b"[..])); - - let c = &b"cdef"[..]; - assert_eq!(a_or_b(c), Error(Position(ErrorKind::IsA,c))); - - let d = &b"bacdef"[..]; - assert_eq!(a_or_b(d), Done(&b"cdef"[..], &b"ba"[..])); - } - - #[test] - fn is_not() { - named!(a_or_b, is_not!(&b"ab"[..])); - - let a = &b"cdab"[..]; - assert_eq!(a_or_b(a), Done(&b"ab"[..], &b"cd"[..])); - - let b = &b"cbde"[..]; - assert_eq!(a_or_b(b), Done(&b"bde"[..], &b"c"[..])); - - let c = &b"abab"[..]; - assert_eq!(a_or_b(c), Error(Position(ErrorKind::IsNot,c))); - - let d = &b"cdefba"[..]; - assert_eq!(a_or_b(d), Done(&b"ba"[..], &b"cdef"[..])); - - let e = &b"e"[..]; - assert_eq!(a_or_b(e), Done(&b""[..], &b"e"[..])); - - let f = &b"fghi"[..]; - assert_eq!(a_or_b(f), Done(&b""[..], &b"fghi"[..])); - } - - #[test] - fn escaping() { - named!(esc, escaped!(call!(alpha), '\\', is_a_bytes!(&b"\"n\\"[..]))); - assert_eq!(esc(&b"abcd"[..]), Done(&b""[..], &b"abcd"[..])); - assert_eq!(esc(&b"ab\\\"cd"[..]), Done(&b""[..], &b"ab\\\"cd"[..])); - assert_eq!(esc(&b"\\\"abcd"[..]), Done(&b""[..], &b"\\\"abcd"[..])); - assert_eq!(esc(&b"\\n"[..]), Done(&b""[..], &b"\\n"[..])); - assert_eq!(esc(&b"ab\\\"12"[..]), Done(&b"12"[..], &b"ab\\\""[..])); - assert_eq!(esc(&b"AB\\"[..]), Error(NodePosition(ErrorKind::Escaped, &b"AB\\"[..], Box::new(Position(ErrorKind::Escaped, &b"\\"[..]))))); - assert_eq!(esc(&b"AB\\A"[..]), Error(NodePosition(ErrorKind::Escaped, &b"AB\\A"[..], Box::new(Position(ErrorKind::IsA, &b"A"[..]))))); - } - - fn to_s(i:Vec) -> String { - String::from_utf8_lossy(&i).into_owned() - } - - #[test] - fn escape_transform() { - use std::str; - - named!(esc< String >, map!(escaped_transform!(alpha, '\\', - alt!( - tag!("\\") => { |_| &b"\\"[..] } - | tag!("\"") => { |_| &b"\""[..] } - | tag!("n") => { |_| &b"\n"[..] } - )), to_s) - ); - - assert_eq!(esc(&b"abcd"[..]), Done(&b""[..], String::from("abcd"))); - assert_eq!(esc(&b"ab\\\"cd"[..]), Done(&b""[..], String::from("ab\"cd"))); - assert_eq!(esc(&b"\\\"abcd"[..]), Done(&b""[..], String::from("\"abcd"))); - assert_eq!(esc(&b"\\n"[..]), Done(&b""[..], String::from("\n"))); - assert_eq!(esc(&b"ab\\\"12"[..]), Done(&b"12"[..], String::from("ab\""))); - assert_eq!(esc(&b"AB\\"[..]), Error(NodePosition(ErrorKind::EscapedTransform, &b"AB\\"[..], Box::new(Position(ErrorKind::EscapedTransform, &b"\\"[..]))))); - assert_eq!(esc(&b"AB\\A"[..]), Error(NodePosition(ErrorKind::EscapedTransform, &b"AB\\A"[..], Box::new(Position(ErrorKind::Alt, &b"A"[..]))))); - - let e = "è"; - let a = "à"; - println!("è: {:?} | à: {:?}", str::as_bytes(e), str::as_bytes(a)); - named!(esc2< String >, map!(escaped_transform!(call!(alpha), '&', - alt!( - tag!("egrave;") => { |_| str::as_bytes("è") } - | tag!("agrave;") => { |_| str::as_bytes("à") } - )), to_s) - ); - assert_eq!(esc2(&b"abèDEF"[..]), Done(&b""[..], String::from("abèDEF"))); - assert_eq!(esc2(&b"abèDàEF"[..]), Done(&b""[..], String::from("abèDàEF"))); - } - - #[test] - fn issue_84() { - let r0 = is_a!(&b"aaaaefgh"[..], "abcd"); - assert_eq!(r0, Done(&b"efgh"[..], &b"aaaa"[..])); - let r1 = is_a!(&b"aaaa"[..], "abcd"); - assert_eq!(r1, Done(&b""[..], &b"aaaa"[..])); - let r2 = is_a!(&b"1"[..], "123456789"); - assert_eq!(r2, Done(&b""[..], &b"1"[..])); - } - - #[test] - fn take_str_test() { - let a = b"omnomnom"; - - assert_eq!(take_str!(&a[..], 5), Done(&b"nom"[..], "omnom")); - assert_eq!(take_str!(&a[..], 9), Incomplete(Needed::Size(9))); - } - - #[test] - fn take_until_test() { - named!(x, take_until_and_consume!("efgh")); - let r = x(&b"abcdabcdefghijkl"[..]); - assert_eq!(r, Done(&b"ijkl"[..], &b"abcdabcd"[..])); - - println!("Done 1\n"); - - let r2 = x(&b"abcdabcdefgh"[..]); - assert_eq!(r2, Done(&b""[..], &b"abcdabcd"[..])); - - println!("Done 2\n"); - let r3 = x(&b"abcefg"[..]); - assert_eq!(r3, Error(Position(ErrorKind::TakeUntilAndConsume, &b"abcefg"[..]))); - - assert_eq!( - x(&b"ab"[..]), - Incomplete(Needed::Size(4)) - ); - } - - #[test] - fn take_until_either_incomplete() { - named!(x, take_until_either!("!.")); - assert_eq!( - x(&b"123"[..]), - Error(Position(ErrorKind::TakeUntilEither, &b"123"[..])) - ); - } - - #[test] - fn take_until_incomplete() { - named!(y, take_until!("end")); - assert_eq!( - y(&b"nd"[..]), - Incomplete(Needed::Size(3)) - ); - assert_eq!( - y(&b"123"[..]), - Error(Position(ErrorKind::TakeUntil, &b"123"[..])) - ); - } - - #[test] - fn recognize() { - named!(x, recognize!(delimited!(tag!("")))); - let r = x(&b" aaa"[..]); - assert_eq!(r, Done(&b" aaa"[..], &b""[..])); - - let empty = &b""[..]; - - named!(ya, recognize!(alpha)); - let ra = ya(&b"abc"[..]); - assert_eq!(ra, Done(empty, &b"abc"[..])); - - named!(yd, recognize!(digit)); - let rd = yd(&b"123"[..]); - assert_eq!(rd, Done(empty, &b"123"[..])); - - named!(yhd, recognize!(hex_digit)); - let rhd = yhd(&b"123abcDEF"[..]); - assert_eq!(rhd, Done(empty, &b"123abcDEF"[..])); - - named!(yan, recognize!(alphanumeric)); - let ran = yan(&b"123abc"[..]); - assert_eq!(ran, Done(empty, &b"123abc"[..])); - - named!(ys, recognize!(space)); - let rs = ys(&b" \t"[..]); - assert_eq!(rs, Done(empty, &b" \t"[..])); - - named!(yms, recognize!(multispace)); - let rms = yms(&b" \t\r\n"[..]); - assert_eq!(rms, Done(empty, &b" \t\r\n"[..])); - } - - #[test] - fn take_while() { - use nom::is_alphabetic; - named!(f, take_while!(is_alphabetic)); - let a = b""; - let b = b"abcd"; - let c = b"abcd123"; - let d = b"123"; - - assert_eq!(f(&a[..]), Done(&a[..], &a[..])); - assert_eq!(f(&b[..]), Done(&a[..], &b[..])); - assert_eq!(f(&c[..]), Done(&d[..], &b[..])); - assert_eq!(f(&d[..]), Done(&d[..], &a[..])); - } - - #[test] - fn take_while1() { - use nom::is_alphabetic; - named!(f, take_while1!(is_alphabetic)); - let a = b""; - let b = b"abcd"; - let c = b"abcd123"; - let d = b"123"; - - assert_eq!(f(&a[..]), Error(Position(ErrorKind::TakeWhile1, &b""[..]))); - assert_eq!(f(&b[..]), Done(&a[..], &b[..])); - assert_eq!(f(&c[..]), Done(&b"123"[..], &b[..])); - assert_eq!(f(&d[..]), Error(Position(ErrorKind::TakeWhile1, &d[..]))); - } - - #[cfg(feature = "nightly")] - use test::Bencher; - - #[cfg(feature = "nightly")] - #[bench] - fn take_while_bench(b: &mut Bencher) { - use nom::is_alphabetic; - named!(f, take_while!(is_alphabetic)); - b.iter(|| { - f(&b"abcdefghijklABCDEejfrfrjgro12aa"[..]) - }); - } -} diff --git a/deps/nom-1.2.0/src/internal.rs b/deps/nom-1.2.0/src/internal.rs deleted file mode 100644 index eb6cd3450..000000000 --- a/deps/nom-1.2.0/src/internal.rs +++ /dev/null @@ -1,132 +0,0 @@ -//! Basic types to build the parsers - -use self::IResult::*; -use util::ErrorKind; - -#[cfg(feature = "core")] -use std::prelude::v1::*; -use std::boxed::Box; - -/// Contains the error that a parser can return -/// -/// It can represent a linked list of errors, indicating the path taken in the parsing tree, with corresponding position in the input data. -/// It depends on P, the input position (for a &[u8] parser, it would be a &[u8]), and E, the custom error type (by default, u32) -#[derive(Debug,PartialEq,Eq,Clone)] -pub enum Err{ - /// An error code, represented by an ErrorKind, which can contain a custom error code represented by E - Code(ErrorKind), - /// An error code, and the next error - Node(ErrorKind, Box>), - /// An error code, and the input position - Position(ErrorKind, P), - /// An error code, the input position and the next error - NodePosition(ErrorKind, P, Box>) -} - -/// Contains information on needed data if a parser returned `Incomplete` -#[derive(Debug,PartialEq,Eq,Clone,Copy)] -pub enum Needed { - /// needs more data, but we do not know how much - Unknown, - /// contains the required data size - Size(usize) -} - -/// Holds the result of parsing functions -/// -/// It depends on I, the input type, O, the output type, and E, the error type (by default u32) -/// -#[derive(Debug,PartialEq,Eq,Clone)] -pub enum IResult { - /// indicates a correct parsing, the first field containing the rest of the unparsed data, the second field contains the parsed data - Done(I,O), - /// contains a Err, an enum that can indicate an error code, a position in the input, and a pointer to another error, making a list of errors in the parsing tree - Error(Err), - /// Incomplete contains a Needed, an enum than can represent a known quantity of input data, or unknown - Incomplete(Needed) -} - -impl IResult { - pub fn is_done(&self) -> bool { - match *self { - Done(_,_) => true, - _ => false - } - } - - pub fn is_err(&self) -> bool { - match *self { - Error(_) => true, - _ => false - } - } - - pub fn is_incomplete(&self) -> bool { - match *self { - Incomplete(_) => true, - _ => false - } - } -} - -pub trait GetInput { - fn remaining_input(&self) -> Option; -} - -pub trait GetOutput { - fn output(&self) -> Option; -} - -impl<'a,I,O,E> GetInput<&'a[I]> for IResult<&'a[I],O,E> { - fn remaining_input(&self) -> Option<&'a[I]> { - match *self { - Done(ref i,_) => Some(*i), - _ => None - } - } -} - -impl GetInput<()> for IResult<(),O,E> { - fn remaining_input(&self) -> Option<()> { - match *self { - Done((),_) => Some(()), - _ => None - } - } -} - -impl<'a,O,E> GetInput<&'a str> for IResult<&'a str,O,E> { - fn remaining_input(&self) -> Option<&'a str> { - match *self { - Done(ref i,_) => Some(*i), - _ => None - } - } -} - -impl<'a,I,O,E> GetOutput<&'a[O]> for IResult { - fn output(&self) -> Option<&'a[O]> { - match *self { - Done(_, ref o) => Some(*o), - _ => None - } - } -} - -impl GetOutput<()> for IResult { - fn output(&self) -> Option<()> { - match *self { - Done(_,()) => Some(()), - _ => None - } - } -} - -impl<'a,I,E> GetOutput<&'a str> for IResult { - fn output(&self) -> Option<&'a str> { - match *self { - Done(_,ref o) => Some(*o), - _ => None - } - } -} diff --git a/deps/nom-1.2.0/src/lib.rs b/deps/nom-1.2.0/src/lib.rs deleted file mode 100644 index 12cec1b2c..000000000 --- a/deps/nom-1.2.0/src/lib.rs +++ /dev/null @@ -1,150 +0,0 @@ -//! nom, eating data byte by byte -//! -//! nom is a parser combinator library with a focus on safe parsing, -//! streaming patterns, and as much as possible zero copy. -//! -//! The code is available on [Github](https://github.com/Geal/nom) -//! -//! # Example -//! -//! ``` -//! #[macro_use] -//! extern crate nom; -//! -//! use nom::{IResult,digit}; -//! use nom::IResult::*; -//! -//! // Parser definition -//! -//! use std::str; -//! use std::str::FromStr; -//! -//! named!(parens, delimited!( -//! char!('('), -//! expr, -//! char!(')') -//! ) -//! ); -//! -//! named!(i64_digit, -//! map_res!( -//! map_res!( -//! digit, -//! str::from_utf8 -//! ), -//! FromStr::from_str -//! ) -//! ); -//! -//! // We transform an integer string into a i64 -//! // we look for a digit suite, and try to convert it. -//! // if either str::from_utf8 or FromStr::from_str fail, -//! // the parser will fail -//! named!(factor, -//! alt!( -//! i64_digit -//! | parens -//! ) -//! ); -//! -//! // we define acc as mutable to update its value whenever a new term is found -//! named!(term , -//! chain!( -//! mut acc: factor ~ -//! many0!( -//! alt!( -//! tap!(mul: preceded!(tag!("*"), factor) => acc = acc * mul) | -//! tap!(div: preceded!(tag!("/"), factor) => acc = acc / div) -//! ) -//! ), -//! || { return acc } -//! ) -//! ); -//! -//! named!(expr , -//! chain!( -//! mut acc: term ~ -//! many0!( -//! alt!( -//! tap!(add: preceded!(tag!("+"), term) => acc = acc + add) | -//! tap!(sub: preceded!(tag!("-"), term) => acc = acc - sub) -//! ) -//! ), -//! || { return acc } -//! ) -//! ); -//! -//! fn main() { -//! assert_eq!(expr(b"1+2"), IResult::Done(&b""[..], 3)); -//! assert_eq!(expr(b"12+6-4+3"), IResult::Done(&b""[..], 17)); -//! assert_eq!(expr(b"1+2*3+4"), IResult::Done(&b""[..], 11)); -//! -//! assert_eq!(expr(b"(2)"), IResult::Done(&b""[..], 2)); -//! assert_eq!(expr(b"2*(3+4)"), IResult::Done(&b""[..], 14)); -//! assert_eq!(expr(b"2*2/(5-1)+3"), IResult::Done(&b""[..], 4)); -//! } -//! ``` -#![cfg_attr(feature = "core", feature(no_std))] -#![cfg_attr(feature = "core", feature(collections))] -#![cfg_attr(feature = "core", no_std)] -#![cfg_attr(feature = "regexp_macros", feature(plugin))] -#![cfg_attr(feature = "regexp_macros", plugin(regex_macros))] -#![cfg_attr(feature = "nightly", feature(test))] - -#[cfg(feature = "core")] -extern crate collections; -#[cfg(feature = "regexp")] -extern crate regex; -#[cfg(feature = "nightly")] -extern crate test; - -#[cfg(feature = "core")] -mod std { -#[macro_use] - pub use core::{fmt, iter, option, ops, slice, mem}; - pub use collections::{boxed, vec, string}; - pub mod prelude { - pub use core::prelude as v1; - } -} - -pub use self::util::*; -pub use self::internal::*; -pub use self::macros::*; -pub use self::methods::*; -pub use self::bytes::*; -pub use self::bits::*; - -pub use self::nom::*; -pub use self::character::*; - -#[cfg(feature = "regexp")] -pub use self::regexp::*; - -#[cfg(not(feature = "core"))] -#[cfg(feature = "stream")] -pub use self::stream::*; - -#[cfg(not(feature = "core"))] -pub use self::str::*; - -#[macro_use] mod util; -mod internal; -#[macro_use] mod macros; -#[macro_use] mod methods; -#[macro_use] mod bytes; -#[macro_use] mod bits; - -#[macro_use] mod nom; -#[macro_use] mod character; - -#[cfg(feature = "regexp")] -#[macro_use] mod regexp; - -#[macro_use] -#[cfg(not(feature = "core"))] -#[cfg(feature = "stream")] -mod stream; - -#[cfg(not(feature = "core"))] -mod str; diff --git a/deps/nom-1.2.0/src/macros.rs b/deps/nom-1.2.0/src/macros.rs deleted file mode 100644 index 1fd05323a..000000000 --- a/deps/nom-1.2.0/src/macros.rs +++ /dev/null @@ -1,3203 +0,0 @@ -//! Macro combinators -//! -//! Macros are used to make combination easier, -//! since they often do not depend on the type -//! of the data they manipulate or return. -//! -//! There is a trick to make them easier to assemble, -//! combinators are defined like this: -//! -//! ```ignore -//! macro_rules! tag ( -//! ($i:expr, $inp: expr) => ( -//! { -//! ... -//! } -//! ); -//! ); -//! ``` -//! -//! But when used in other combinators, are Used -//! like this: -//! -//! ```ignore -//! named!(my_function, tag!("abcd")); -//! ``` -//! -//! Internally, other combinators will rewrite -//! that call to pass the input as first argument: -//! -//! ```ignore -//! macro_rules! named ( -//! ($name:ident, $submac:ident!( $($args:tt)* )) => ( -//! fn $name<'a>( i: &'a [u8] ) -> $crate::IResult<'a,&[u8], &[u8]> { -//! $submac!(i, $($args)*) -//! } -//! ); -//! ); -//! ``` -//! -//! If you want to call a combinator directly, you can -//! do it like this: -//! -//! ```ignore -//! let res = { tag!(input, "abcd"); } -//! ``` -//! -//! Combinators must have a specific variant for -//! non-macro arguments. Example: passing a function -//! to take_while! instead of another combinator. -//! -//! ```ignore -//! macro_rules! take_while( -//! ($input:expr, $submac:ident!( $($args:tt)* )) => ( -//! { -//! ... -//! } -//! ); -//! -//! // wrap the function in a macro to pass it to the main implementation -//! ($input:expr, $f:expr) => ( -//! take_while!($input, call!($f)); -//! ); -//! ); -//! - -/// Wraps a parser in a closure -#[macro_export] -macro_rules! closure ( - ($ty:ty, $submac:ident!( $($args:tt)* )) => ( - |i: $ty| { $submac!(i, $($args)*) } - ); - ($submac:ident!( $($args:tt)* )) => ( - |i| { $submac!(i, $($args)*) } - ); -); - -/// Makes a function from a parser combination -/// -/// The type can be set up if the compiler needs -/// more information -/// -/// ```ignore -/// named!(my_function( &[u8] ) -> &[u8], tag!("abcd")); -/// // first type parameter is input, second is output -/// named!(my_function<&[u8], &[u8]>, tag!("abcd")); -/// // will have &[u8] as input type, &[u8] as output type -/// named!(my_function, tag!("abcd")); -/// // will use &[u8] as input type (use this if the compiler -/// // complains about lifetime issues -/// named!(my_function<&[u8]>, tag!("abcd")); -/// //prefix them with 'pub' to make the functions public -/// named!(pub my_function, tag!("abcd")); -/// ``` -#[macro_export] -macro_rules! named ( - ($name:ident( $i:ty ) -> $o:ty, $submac:ident!( $($args:tt)* )) => ( - fn $name( i: $i ) -> $crate::IResult<$i,$o,u32> { - $submac!(i, $($args)*) - } - ); - ($name:ident<$i:ty,$o:ty,$e:ty>, $submac:ident!( $($args:tt)* )) => ( - fn $name( i: $i ) -> $crate::IResult<$i, $o, $e> { - $submac!(i, $($args)*) - } - ); - ($name:ident<$i:ty,$o:ty>, $submac:ident!( $($args:tt)* )) => ( - fn $name( i: $i ) -> $crate::IResult<$i, $o, u32> { - $submac!(i, $($args)*) - } - ); - ($name:ident<$o:ty>, $submac:ident!( $($args:tt)* )) => ( - fn $name<'a>( i: &'a[u8] ) -> $crate::IResult<&'a [u8], $o, u32> { - $submac!(i, $($args)*) - } - ); - ($name:ident, $submac:ident!( $($args:tt)* )) => ( - fn $name( i: &[u8] ) -> $crate::IResult<&[u8], &[u8], u32> { - $submac!(i, $($args)*) - } - ); - (pub $name:ident( $i:ty ) -> $o:ty, $submac:ident!( $($args:tt)* )) => ( - pub fn $name( i: $i ) -> $crate::IResult<$i,$o, u32> { - $submac!(i, $($args)*) - } - ); - (pub $name:ident<$i:ty,$o:ty,$e:ty>, $submac:ident!( $($args:tt)* )) => ( - pub fn $name( i: $i ) -> $crate::IResult<$i, $o, $e> { - $submac!(i, $($args)*) - } - ); - (pub $name:ident<$i:ty,$o:ty>, $submac:ident!( $($args:tt)* )) => ( - pub fn $name( i: $i ) -> $crate::IResult<$i, $o, u32> { - $submac!(i, $($args)*) - } - ); - (pub $name:ident<$o:ty>, $submac:ident!( $($args:tt)* )) => ( - pub fn $name( i: &[u8] ) -> $crate::IResult<&[u8], $o, u32> { - $submac!(i, $($args)*) - } - ); - (pub $name:ident, $submac:ident!( $($args:tt)* )) => ( - pub fn $name<'a>( i: &'a [u8] ) -> $crate::IResult<&[u8], &[u8], u32> { - $submac!(i, $($args)*) - } - ); -); - -/// Used to wrap common expressions and function as macros -#[macro_export] -macro_rules! call ( - ($i:expr, $fun:expr) => ( $fun( $i ) ); - ($i:expr, $fun:expr, $($args:expr),* ) => ( $fun( $i, $($args),* ) ); -); - -/// emulate function currying: `apply!(my_function, arg1, arg2, ...)` becomes `my_function(input, arg1, arg2, ...)` -/// -/// Supports up to 6 arguments -#[macro_export] -macro_rules! apply ( - ($i:expr, $fun:expr, $($args:expr),* ) => ( $fun( $i, $($args),* ) ); -); - -/// Prevents backtracking if the child parser fails -/// -/// This parser will do an early return instead of sending -/// its result to the parent parser. -/// -/// If another `error!` combinator is present in the parent -/// chain, the error will be wrapped and another early -/// return will be made. -/// -/// This makes it easy to build report on which parser failed, -/// where it failed in the input, and the chain of parsers -/// that led it there. -/// -/// Additionally, the error chain contains number identifiers -/// that can be matched to provide useful error messages. -/// -/// ``` -/// # #[macro_use] extern crate nom; -/// # use std::collections; -/// # use nom::IResult::Error; -/// # use nom::Err::{Position,NodePosition}; -/// # use nom::ErrorKind; -/// # fn main() { -/// named!(err_test, alt!( -/// tag!("abcd") | -/// preceded!(tag!("efgh"), error!(ErrorKind::Custom(42), -/// chain!( -/// tag!("ijkl") ~ -/// res: error!(ErrorKind::Custom(128), tag!("mnop")) , -/// || { res } -/// ) -/// ) -/// ) -/// )); -/// let a = &b"efghblah"[..]; -/// let b = &b"efghijklblah"[..]; -/// let c = &b"efghijklmnop"[..]; -/// -/// let blah = &b"blah"[..]; -/// -/// let res_a = err_test(a); -/// let res_b = err_test(b); -/// let res_c = err_test(c); -/// assert_eq!(res_a, Error(NodePosition(ErrorKind::Custom(42), blah, Box::new(Position(ErrorKind::Tag, blah))))); -/// assert_eq!(res_b, Error(NodePosition(ErrorKind::Custom(42), &b"ijklblah"[..], -/// Box::new(NodePosition(ErrorKind::Custom(128), blah, Box::new(Position(ErrorKind::Tag, blah)))))) -/// ); -/// # } -/// ``` -/// -#[macro_export] -macro_rules! error ( - ($i:expr, $code:expr, $submac:ident!( $($args:tt)* )) => ( - { - let cl = || { - $submac!($i, $($args)*) - }; - - match cl() { - $crate::IResult::Incomplete(x) => $crate::IResult::Incomplete(x), - $crate::IResult::Done(i, o) => $crate::IResult::Done(i, o), - $crate::IResult::Error(e) => { - return $crate::IResult::Error($crate::Err::NodePosition($code, $i, Box::new(e))) - } - } - } - ); - ($i:expr, $code:expr, $f:expr) => ( - error!($i, $code, call!($f)); - ); -); - -/// Add an error if the child parser fails -/// -/// While error! does an early return and avoids backtracking, -/// add_error! backtracks normally. It just provides more context -/// for an error -/// -#[macro_export] -macro_rules! add_error ( - ($i:expr, $code:expr, $submac:ident!( $($args:tt)* )) => ( - { - match $submac!($i, $($args)*) { - $crate::IResult::Incomplete(x) => $crate::IResult::Incomplete(x), - $crate::IResult::Done(i, o) => $crate::IResult::Done(i, o), - $crate::IResult::Error(e) => { - $crate::IResult::Error($crate::Err::NodePosition($code, $i, Box::new(e))) - } - } - } - ); - ($i:expr, $code:expr, $f:expr) => ( - add_error!($i, $code, call!($f)); - ); -); - - -/// translate parser result from IResult to IResult woth a custom type -/// -#[macro_export] -macro_rules! fix_error ( - ($i:expr, $t:ty, $submac:ident!( $($args:tt)* )) => ( - { - match $submac!($i, $($args)*) { - $crate::IResult::Incomplete(x) => $crate::IResult::Incomplete(x), - $crate::IResult::Done(i, o) => $crate::IResult::Done(i, o), - $crate::IResult::Error(e) => { - let err = match e { - $crate::Err::Code(ErrorKind::Custom(_)) | - $crate::Err::Node(ErrorKind::Custom(_), _) => { - let e: ErrorKind<$t> = ErrorKind::Fix; - $crate::Err::Code(e) - }, - $crate::Err::Position(ErrorKind::Custom(_), p) | - $crate::Err::NodePosition(ErrorKind::Custom(_), p, _) => { - let e: ErrorKind<$t> = ErrorKind::Fix; - $crate::Err::Position(e, p) - }, - $crate::Err::Code(_) | - $crate::Err::Node(_, _) => { - let e: ErrorKind<$t> = ErrorKind::Fix; - $crate::Err::Code(e) - }, - $crate::Err::Position(_, p) | - $crate::Err::NodePosition(_, p, _) => { - let e: ErrorKind<$t> = ErrorKind::Fix; - $crate::Err::Position(e, p) - }, - }; - $crate::IResult::Error(err) - } - } - } - ); - ($i:expr, $t:ty, $f:expr) => ( - fix_error!($i, $t, call!($f)); - ); -); - -/// replaces a `Incomplete` returned by the child parser -/// with an `Error` -/// -#[macro_export] -macro_rules! complete ( - ($i:expr, $submac:ident!( $($args:tt)* )) => ( - { - match $submac!($i, $($args)*) { - $crate::IResult::Done(i, o) => $crate::IResult::Done(i, o), - $crate::IResult::Error(e) => $crate::IResult::Error(e), - $crate::IResult::Incomplete(_) => { - $crate::IResult::Error($crate::Err::Position($crate::ErrorKind::Complete, $i)) - }, - } - } - ); - ($i:expr, $f:expr) => ( - complete!($i, call!($f)); - ); -); - -/// A bit like `std::try!`, this macro will return the remaining input and parsed value if the child parser returned `Done`, -/// and will do an early return for `Error` and `Incomplete` -/// this can provide more flexibility than `chain!` if needed -/// -/// ``` -/// # #[macro_use] extern crate nom; -/// # use nom::IResult::{self, Done, Error}; -/// # use nom::Err::Position; -/// # use nom::{be_u8,ErrorKind}; -/// -/// fn take_add(input:&[u8], size: u8) -> IResult<&[u8],&[u8]> { -/// let (i1, sz) = try_parse!(input, be_u8); -/// let (i2, length) = try_parse!(i1, expr_opt!(size.checked_add(sz))); -/// let (i3, data) = try_parse!(i2, take!(length)); -/// return Done(i3, data); -/// } -/// # fn main() { -/// let arr1 = [1, 2, 3, 4, 5]; -/// let r1 = take_add(&arr1[..], 1); -/// assert_eq!(r1, Done(&[4,5][..], &[2,3][..])); -/// -/// let arr2 = [0xFE, 2, 3, 4, 5]; -/// // size is overflowing -/// let r1 = take_add(&arr2[..], 42); -/// assert_eq!(r1, Error(Position(ErrorKind::ExprOpt,&[2,3,4,5][..]))); -/// # } -/// ``` -#[macro_export] -macro_rules! try_parse ( - ($i:expr, $submac:ident!( $($args:tt)* )) => ( - match $submac!($i, $($args)*) { - $crate::IResult::Done(i,o) => (i,o), - $crate::IResult::Error(e) => return $crate::IResult::Error(e), - $crate::IResult::Incomplete(i) => return $crate::IResult::Incomplete(i) - } - ); - ($i:expr, $f:expr) => ( - try_parse!($i, call!($f)) - ); -); - -/// `flat_map!(R -> IResult, S -> IResult) => R -> IResult` -/// -/// combines a parser R -> IResult and -/// a parser S -> IResult to return another -/// parser R -> IResult -#[macro_export] -macro_rules! flat_map( - ($i:expr, $submac:ident!( $($args:tt)* ), $submac2:ident!( $($args2:tt)* )) => ( - { - match $submac!($i, $($args)*) { - $crate::IResult::Error(e) => $crate::IResult::Error(e), - $crate::IResult::Incomplete($crate::Needed::Unknown) => $crate::IResult::Incomplete($crate::Needed::Unknown), - $crate::IResult::Incomplete($crate::Needed::Size(i)) => $crate::IResult::Incomplete($crate::Needed::Size(i)), - $crate::IResult::Done(i, o) => match $submac2!(o, $($args2)*) { - $crate::IResult::Error(e) => { - let err = match e { - $crate::Err::Code(k) | $crate::Err::Node(k, _) | $crate::Err::Position(k, _) | $crate::Err::NodePosition(k, _, _) => { - $crate::Err::Position(k, $i) - } - }; - $crate::IResult::Error(err) - }, - $crate::IResult::Incomplete($crate::Needed::Unknown) => $crate::IResult::Incomplete($crate::Needed::Unknown), - $crate::IResult::Incomplete($crate::Needed::Size(ref i2)) => $crate::IResult::Incomplete($crate::Needed::Size(*i2)), - $crate::IResult::Done(_, o2) => $crate::IResult::Done(i, o2) - } - } - } - ); - ($i:expr, $submac:ident!( $($args:tt)* ), $g:expr) => ( - flat_map!($i, $submac!($($args)*), call!($g)); - ); - ($i:expr, $f:expr, $g:expr) => ( - flat_map!($i, call!($f), call!($g)); - ); - ($i:expr, $f:expr, $submac:ident!( $($args:tt)* )) => ( - flat_map!($i, call!($f), $submac!($($args)*)); - ); -); - -/// `map!(I -> IResult, O -> P) => I -> IResult` -/// maps a function on the result of a parser -#[macro_export] -macro_rules! map( - ($i:expr, $submac:ident!( $($args:tt)* ), $g:expr) => ( - map_impl!($i, $submac!($($args)*), call!($g)); - ); - ($i:expr, $submac:ident!( $($args:tt)* ), $submac2:ident!( $($args2:tt)* )) => ( - map_impl!($i, $submac!($($args)*), $submac2!($($args2)*)); - ); - ($i:expr, $f:expr, $g:expr) => ( - map_impl!($i, call!($f), call!($g)); - ); - ($i:expr, $f:expr, $submac:ident!( $($args:tt)* )) => ( - map_impl!($i, call!($f), $submac!($($args)*)); - ); -); - -/// Internal parser, do not use directly -#[doc(hidden)] -#[macro_export] -macro_rules! map_impl( - ($i:expr, $submac:ident!( $($args:tt)* ), $submac2:ident!( $($args2:tt)* )) => ( - { - match $submac!($i, $($args)*) { - $crate::IResult::Error(e) => $crate::IResult::Error(e), - $crate::IResult::Incomplete($crate::Needed::Unknown) => $crate::IResult::Incomplete($crate::Needed::Unknown), - $crate::IResult::Incomplete($crate::Needed::Size(i)) => $crate::IResult::Incomplete($crate::Needed::Size(i)), - $crate::IResult::Done(i, o) => $crate::IResult::Done(i, $submac2!(o, $($args2)*)) - } - } - ); -); - -/// `map_res!(I -> IResult, O -> Result

) => I -> IResult` -/// maps a function returning a Result on the output of a parser -#[macro_export] -macro_rules! map_res ( - ($i:expr, $submac:ident!( $($args:tt)* ), $g:expr) => ( - map_res_impl!($i, $submac!($($args)*), call!($g)); - ); - ($i:expr, $submac:ident!( $($args:tt)* ), $submac2:ident!( $($args2:tt)* )) => ( - map_res_impl!($i, $submac!($($args)*), $submac2!($($args2)*)); - ); - ($i:expr, $f:expr, $g:expr) => ( - map_res_impl!($i, call!($f), call!($g)); - ); - ($i:expr, $f:expr, $submac:ident!( $($args:tt)* )) => ( - map_res_impl!($i, call!($f), $submac!($($args)*)); - ); -); - -/// Internal parser, do not use directly -#[doc(hidden)] -#[macro_export] -macro_rules! map_res_impl ( - ($i:expr, $submac:ident!( $($args:tt)* ), $submac2:ident!( $($args2:tt)* )) => ( - { - match $submac!($i, $($args)*) { - $crate::IResult::Error(e) => $crate::IResult::Error(e), - $crate::IResult::Incomplete($crate::Needed::Unknown) => $crate::IResult::Incomplete($crate::Needed::Unknown), - $crate::IResult::Incomplete($crate::Needed::Size(i)) => $crate::IResult::Incomplete($crate::Needed::Size(i)), - $crate::IResult::Done(i, o) => match $submac2!(o, $($args2)*) { - Ok(output) => $crate::IResult::Done(i, output), - Err(_) => $crate::IResult::Error($crate::Err::Position($crate::ErrorKind::MapRes, $i)) - } - } - } - ); -); - - -/// `map_opt!(I -> IResult, O -> Option

) => I -> IResult` -/// maps a function returning an Option on the output of a parser -#[macro_export] -macro_rules! map_opt ( - ($i:expr, $submac:ident!( $($args:tt)* ), $g:expr) => ( - map_opt_impl!($i, $submac!($($args)*), call!($g)); - ); - ($i:expr, $submac:ident!( $($args:tt)* ), $submac2:ident!( $($args2:tt)* )) => ( - map_opt_impl!($i, $submac!($($args)*), $submac2!($($args2)*)); - ); - ($i:expr, $f:expr, $g:expr) => ( - map_opt_impl!($i, call!($f), call!($g)); - ); - ($i:expr, $f:expr, $submac:ident!( $($args:tt)* )) => ( - map_opt_impl!($i, call!($f), $submac!($($args)*)); - ); -); - -/// Internal parser, do not use directly -#[doc(hidden)] -#[macro_export] -macro_rules! map_opt_impl ( - ($i:expr, $submac:ident!( $($args:tt)* ), $submac2:ident!( $($args2:tt)* )) => ( - { - match $submac!($i, $($args)*) { - $crate::IResult::Error(e) => $crate::IResult::Error(e), - $crate::IResult::Incomplete($crate::Needed::Unknown) => $crate::IResult::Incomplete($crate::Needed::Unknown), - $crate::IResult::Incomplete($crate::Needed::Size(i)) => $crate::IResult::Incomplete($crate::Needed::Size(i)), - $crate::IResult::Done(i, o) => match $submac2!(o, $($args2)*) { - ::std::option::Option::Some(output) => $crate::IResult::Done(i, output), - ::std::option::Option::None => $crate::IResult::Error($crate::Err::Position($crate::ErrorKind::MapOpt, $i)) - } - } - } - ); -); - -/// `value!(T, R -> IResult ) => R -> IResult` -/// -/// or `value!(T) => R -> IResult` -/// -/// If the child parser was successful, return the value. -/// If no child parser is provided, always return the value -/// -/// ``` -/// # #[macro_use] extern crate nom; -/// # use nom::IResult::Done; -/// # fn main() { -/// named!(x, value!(42, delimited!(tag!("")))); -/// named!(y, delimited!(tag!(""))); -/// let r = x(&b" aaa"[..]); -/// assert_eq!(r, Done(&b" aaa"[..], 42)); -/// -/// let r2 = y(&b" aaa"[..]); -/// assert_eq!(r2, Done(&b" aaa"[..], 42)); -/// # } -/// ``` -#[macro_export] -macro_rules! value ( - ($i:expr, $res:expr, $submac:ident!( $($args:tt)* )) => ( - { - use $crate::HexDisplay; - match $submac!($i, $($args)*) { - $crate::IResult::Done(i,_) => { - $crate::IResult::Done(i, $res) - }, - $crate::IResult::Error(e) => $crate::IResult::Error(e), - $crate::IResult::Incomplete(i) => $crate::IResult::Incomplete(i) - } - } - ); - ($i:expr, $res:expr, $f:expr) => ( - value!($i, $res, call!($f)) - ); - ($i:expr, $res:expr) => ( - $crate::IResult::Done($i, $res) - ); -); - -/// `expr_res!(Result) => I -> IResult` -/// evaluate an expression that returns a Result and returns a IResult::Done(I,T) if Ok -/// -/// See expr_opt for an example -#[macro_export] -macro_rules! expr_res ( - ($i:expr, $e:expr) => ( - { - match $e { - Ok(output) => $crate::IResult::Done($i, output), - Err(_) => $crate::IResult::Error($crate::Err::Position($crate::ErrorKind::ExprRes, $i)) - } - } - ); -); - -/// `expr_opt!(Option) => I -> IResult` -/// evaluate an expression that returns a Option and returns a IResult::Done(I,T) if Ok -/// -/// Useful when doing computations in a chain -/// -/// ``` -/// # #[macro_use] extern crate nom; -/// # use nom::IResult::{self, Done, Error}; -/// # use nom::Err::Position; -/// # use nom::{be_u8,ErrorKind}; -/// -/// fn take_add(input:&[u8], size: u8) -> IResult<&[u8],&[u8]> { -/// chain!(input, -/// sz: be_u8 ~ -/// length: expr_opt!(size.checked_add(sz)) ~ // checking for integer overflow (returns an Option) -/// data: take!(length) , -/// ||{ data } -/// ) -/// } -/// # fn main() { -/// let arr1 = [1, 2, 3, 4, 5]; -/// let r1 = take_add(&arr1[..], 1); -/// assert_eq!(r1, Done(&[4,5][..], &[2,3][..])); -/// -/// let arr2 = [0xFE, 2, 3, 4, 5]; -/// // size is overflowing -/// let r1 = take_add(&arr2[..], 42); -/// assert_eq!(r1, Error(Position(ErrorKind::ExprOpt,&[2,3,4,5][..]))); -/// # } -/// ``` -#[macro_export] -macro_rules! expr_opt ( - ($i:expr, $e:expr) => ( - { - match $e { - ::std::option::Option::Some(output) => $crate::IResult::Done($i, output), - ::std::option::Option::None => $crate::IResult::Error($crate::Err::Position($crate::ErrorKind::ExprOpt, $i)) - } - } - ); -); - -/// `chain!(I->IResult ~ I->IResult ~ ... I->IResult , || { return O } ) => I -> IResult` -/// chains parsers and assemble the results through a closure -/// -/// The input type `I` must implement `nom::InputLength`. -/// -/// This combinator will count how much data is consumed by every child parser and take it into account if -/// there is not enough data -/// -/// ``` -/// # #[macro_use] extern crate nom; -/// # use nom::IResult::{self, Done, Error}; -/// # use nom::Err::Position; -/// # use nom::ErrorKind; -/// #[derive(PartialEq,Eq,Debug)] -/// struct B { -/// a: u8, -/// b: Option -/// } -/// -/// named!(y, tag!("efgh")); -/// -/// fn ret_int(i:&[u8]) -> IResult<&[u8], u8> { Done(i, 1) } -/// named!(ret_y<&[u8], u8>, map!(y, |_| 1)); // return 1 if the "efgh" tag is found -/// -/// named!(z<&[u8], B>, -/// chain!( -/// tag!("abcd") ~ // the '~' character is used as separator -/// aa: ret_int ~ // the result of that parser will be used in the closure -/// tag!("abcd")? ~ // this parser is optional -/// bb: ret_y? , // the result of that parser is an option -/// // the last parser in the chain is followed by a ',' -/// ||{B{a: aa, b: bb}} -/// ) -/// ); -/// -/// # fn main() { -/// // the first "abcd" tag is not present, we have an error -/// let r1 = z(&b"efgh"[..]); -/// assert_eq!(r1, Error(Position(ErrorKind::Tag,&b"efgh"[..]))); -/// -/// // everything is present, everything is parsed -/// let r2 = z(&b"abcdabcdefgh"[..]); -/// assert_eq!(r2, Done(&b""[..], B{a: 1, b: Some(1)})); -/// -/// // the second "abcd" tag is optional -/// let r3 = z(&b"abcdefgh"[..]); -/// assert_eq!(r3, Done(&b""[..], B{a: 1, b: Some(1)})); -/// -/// // the result of ret_y is optional, as seen in the B structure -/// let r4 = z(&b"abcdabcdwxyz"[..]); -/// assert_eq!(r4, Done(&b"wxyz"[..], B{a: 1, b: None})); -/// # } -/// ``` -#[macro_export] -macro_rules! chain ( - ($i:expr, $($rest:tt)*) => ( - { - //use $crate::InputLength; - chaining_parser!($i, 0usize, $($rest)*) - } - ); -); - -/// Internal parser, do not use directly -#[doc(hidden)] -#[macro_export] -macro_rules! chaining_parser ( - ($i:expr, $consumed:expr, $e:ident ~ $($rest:tt)*) => ( - chaining_parser!($i, $consumed, call!($e) ~ $($rest)*); - ); - ($i:expr, $consumed:expr, $submac:ident!( $($args:tt)* ) ~ $($rest:tt)*) => ( - { - use $crate::InputLength; - match $submac!($i, $($args)*) { - $crate::IResult::Error(e) => $crate::IResult::Error(e), - $crate::IResult::Incomplete($crate::Needed::Unknown) => $crate::IResult::Incomplete($crate::Needed::Unknown), - $crate::IResult::Incomplete($crate::Needed::Size(i)) => $crate::IResult::Incomplete($crate::Needed::Size($consumed + i)), - $crate::IResult::Done(i,_) => { - chaining_parser!(i, $consumed + (($i).input_len() - i.input_len()), $($rest)*) - } - } - } -); - - ($i:expr, $consumed:expr, $e:ident ? ~ $($rest:tt)*) => ( - chaining_parser!($i, $consumed, call!($e) ? ~ $($rest)*); - ); - - ($i:expr, $consumed:expr, $submac:ident!( $($args:tt)* ) ? ~ $($rest:tt)*) => ({ - { - use $crate::InputLength; - let res = $submac!($i, $($args)*); - if let $crate::IResult::Incomplete(inc) = res { - match inc { - $crate::Needed::Unknown => $crate::IResult::Incomplete($crate::Needed::Unknown), - $crate::Needed::Size(i) => $crate::IResult::Incomplete($crate::Needed::Size($consumed + i)), - } - } else { - let input = if let $crate::IResult::Done(i,_) = res { - i - } else { - $i - }; - chaining_parser!(input, $consumed + (($i).input_len() - input.input_len()), $($rest)*) - } - } - }); - - ($i:expr, $consumed:expr, $field:ident : $e:ident ~ $($rest:tt)*) => ( - chaining_parser!($i, $consumed, $field: call!($e) ~ $($rest)*); - ); - - ($i:expr, $consumed:expr, $field:ident : $submac:ident!( $($args:tt)* ) ~ $($rest:tt)*) => ( - { - use $crate::InputLength; - match $submac!($i, $($args)*) { - $crate::IResult::Error(e) => $crate::IResult::Error(e), - $crate::IResult::Incomplete($crate::Needed::Unknown) => $crate::IResult::Incomplete($crate::Needed::Unknown), - $crate::IResult::Incomplete($crate::Needed::Size(i)) => $crate::IResult::Incomplete($crate::Needed::Size($consumed + i)), - $crate::IResult::Done(i,o) => { - let $field = o; - chaining_parser!(i, $consumed + (($i).input_len() - i.input_len()), $($rest)*) - } - } - } - ); - - ($i:expr, $consumed:expr, mut $field:ident : $e:ident ~ $($rest:tt)*) => ( - chaining_parser!($i, $consumed, mut $field: call!($e) ~ $($rest)*); - ); - - ($i:expr, $consumed:expr, mut $field:ident : $submac:ident!( $($args:tt)* ) ~ $($rest:tt)*) => ( - { - use $crate::InputLength; - match $submac!($i, $($args)*) { - $crate::IResult::Error(e) => $crate::IResult::Error(e), - $crate::IResult::Incomplete($crate::Needed::Unknown) => $crate::IResult::Incomplete($crate::Needed::Unknown), - $crate::IResult::Incomplete($crate::Needed::Size(i)) => $crate::IResult::Incomplete($crate::Needed::Size($consumed + i)), - $crate::IResult::Done(i,o) => { - let mut $field = o; - chaining_parser!(i, $consumed + ($i).input_len() - i.input_len(), $($rest)*) - } - } - } - ); - - ($i:expr, $consumed:expr, $field:ident : $e:ident ? ~ $($rest:tt)*) => ( - chaining_parser!($i, $consumed, $field : call!($e) ? ~ $($rest)*); - ); - - ($i:expr, $consumed:expr, $field:ident : $submac:ident!( $($args:tt)* ) ? ~ $($rest:tt)*) => ({ - { - use $crate::InputLength; - let res = $submac!($i, $($args)*); - if let $crate::IResult::Incomplete(inc) = res { - match inc { - $crate::Needed::Unknown => $crate::IResult::Incomplete($crate::Needed::Unknown), - $crate::Needed::Size(i) => $crate::IResult::Incomplete($crate::Needed::Size($consumed + i)), - } - } else { - let ($field,input) = if let $crate::IResult::Done(i,o) = res { - (::std::option::Option::Some(o),i) - } else { - (::std::option::Option::None,$i) - }; - chaining_parser!(input, $consumed + ($i).input_len() - input.input_len(), $($rest)*) - } - } - }); - - ($i:expr, $consumed:expr, mut $field:ident : $e:ident ? ~ $($rest:tt)*) => ( - chaining_parser!($i, $consumed, mut $field : call!($e) ? ~ $($rest)*); - ); - - ($i:expr, $consumed:expr, mut $field:ident : $submac:ident!( $($args:tt)* ) ? ~ $($rest:tt)*) => ({ - { - use $crate::InputLength; - let res = $submac!($i, $($args)*); - if let $crate::IResult::Incomplete(inc) = res { - match inc { - $crate::Needed::Unknown => $crate::IResult::Incomplete($crate::Needed::Unknown), - $crate::Needed::Size(i) => $crate::IResult::Incomplete($crate::Needed::Size($consumed + i)), - } - } else { - let (mut $field,input) = if let $crate::IResult::Done(i,o) = res { - (::std::option::Option::Some(o),i) - } else { - (::std::option::Option::None,$i) - }; - chaining_parser!(input, $consumed + ($i).input_len() - input.input_len(), $($rest)*) - } - } - }); - - // ending the chain - ($i:expr, $consumed:expr, $e:ident, $assemble:expr) => ( - chaining_parser!($i, $consumed, call!($e), $assemble); - ); - - ($i:expr, $consumed:expr, $submac:ident!( $($args:tt)* ), $assemble:expr) => ( - match $submac!($i, $($args)*) { - $crate::IResult::Error(e) => $crate::IResult::Error(e), - $crate::IResult::Incomplete($crate::Needed::Unknown) => $crate::IResult::Incomplete($crate::Needed::Unknown), - $crate::IResult::Incomplete($crate::Needed::Size(i)) => $crate::IResult::Incomplete($crate::Needed::Size($consumed + i)), - $crate::IResult::Done(i,_) => { - $crate::IResult::Done(i, $assemble()) - } - } - ); - - ($i:expr, $consumed:expr, $e:ident ?, $assemble:expr) => ( - chaining_parser!($i, $consumed, call!($e) ?, $assemble); - ); - - ($i:expr, $consumed:expr, $submac:ident!( $($args:tt)* ) ?, $assemble:expr) => ({ - let res = $submac!($i, $($args)*); - if let $crate::IResult::Incomplete(inc) = res { - match inc { - $crate::Needed::Unknown => $crate::IResult::Incomplete($crate::Needed::Unknown), - $crate::Needed::Size(i) => $crate::IResult::Incomplete($crate::Needed::Size($consumed + i)), - } - } else { - let input = if let $crate::IResult::Done(i,_) = res { - i - } else { - $i - }; - $crate::IResult::Done(input, $assemble()) - } - }); - - ($i:expr, $consumed:expr, $field:ident : $e:ident, $assemble:expr) => ( - chaining_parser!($i, $consumed, $field: call!($e), $assemble); - ); - - ($i:expr, $consumed:expr, $field:ident : $submac:ident!( $($args:tt)* ), $assemble:expr) => ( - match $submac!($i, $($args)*) { - $crate::IResult::Error(e) => $crate::IResult::Error(e), - $crate::IResult::Incomplete($crate::Needed::Unknown) => $crate::IResult::Incomplete($crate::Needed::Unknown), - $crate::IResult::Incomplete($crate::Needed::Size(i)) => $crate::IResult::Incomplete($crate::Needed::Size($consumed + i)), - $crate::IResult::Done(i,o) => { - let $field = o; - $crate::IResult::Done(i, $assemble()) - } - } - ); - - ($i:expr, $consumed:expr, mut $field:ident : $e:ident, $assemble:expr) => ( - chaining_parser!($i, $consumed, mut $field: call!($e), $assemble); - ); - - ($i:expr, $consumed:expr, mut $field:ident : $submac:ident!( $($args:tt)* ), $assemble:expr) => ( - match $submac!($i, $($args)*) { - $crate::IResult::Error(e) => $crate::IResult::Error(e), - $crate::IResult::Incomplete($crate::Needed::Unknown) => $crate::IResult::Incomplete($crate::Needed::Unknown), - $crate::IResult::Incomplete($crate::Needed::Size(i)) => $crate::IResult::Incomplete($crate::Needed::Size($consumed + i)), - $crate::IResult::Done(i,o) => { - let mut $field = o; - $crate::IResult::Done(i, $assemble()) - } - } - ); - - ($i:expr, $consumed:expr, $field:ident : $e:ident ? , $assemble:expr) => ( - chaining_parser!($i, $consumed, $field : call!($e) ? , $assemble); - ); - - ($i:expr, $consumed:expr, $field:ident : $submac:ident!( $($args:tt)* ) ? , $assemble:expr) => ({ - let res = $submac!($i, $($args)*); - if let $crate::IResult::Incomplete(inc) = res { - match inc { - $crate::Needed::Unknown => $crate::IResult::Incomplete($crate::Needed::Unknown), - $crate::Needed::Size(i) => $crate::IResult::Incomplete($crate::Needed::Size($consumed + i)), - } - } else { - let ($field,input) = if let $crate::IResult::Done(i,o) = res { - (::std::option::Option::Some(o), i) - } else { - (::std::option::Option::None, $i) - }; - $crate::IResult::Done(input, $assemble()) - } - }); - - ($i:expr, $consumed:expr, mut $field:ident : $e:ident ? , $assemble:expr) => ( - chaining_parser!($i, $consumed, $field : call!($e) ? , $assemble); - ); - - ($i:expr, $consumed:expr, mut $field:ident : $submac:ident!( $($args:tt)* ) ? , $assemble:expr) => ({ - let res = $submac!($i, $($args)*); - if let $crate::IResult::Incomplete(inc) = res { - match inc { - $crate::Needed::Unknown => $crate::IResult::Incomplete($crate::Needed::Unknown), - $crate::Needed::Size(i) => $crate::IResult::Incomplete($crate::Needed::Size($consumed + i)), - } - } else { - let (mut $field,input) = if let $crate::IResult::Done(i,o) = res { - (::std::option::Option::Some(o), i) - } else { - (::std::option::Option::None, $i) - }; - $crate::IResult::Done(input, $assemble()) - } - }); - - ($i:expr, $consumed:expr, $assemble:expr) => ( - $crate::IResult::Done($i, $assemble()) - ) -); - - -/// `tuple!(I->IResult, I->IResult, ... I->IResult) => I -> IResult` -/// chains parsers and assemble the sub results in a tuple. -/// -/// The input type `I` must implement `nom::InputLength`. -/// -/// This combinator will count how much data is consumed by every child parser and take it into account if -/// there is not enough data -/// -/// ``` -/// # #[macro_use] extern crate nom; -/// # use nom::IResult::{self, Done, Error}; -/// # use nom::Err::Position; -/// # use nom::ErrorKind; -/// # use nom::be_u16; -/// // the return type depends of the children parsers -/// named!(parser<&[u8], (u16, &[u8], &[u8]) >, -/// tuple!( -/// be_u16 , -/// take!(3), -/// tag!("fg") -/// ) -/// ); -/// -/// # fn main() { -/// assert_eq!( -/// parser(&b"abcdefgh"[..]), -/// Done( -/// &b"h"[..], -/// (0x6162u16, &b"cde"[..], &b"fg"[..]) -/// ) -/// ); -/// # } -/// ``` -#[macro_export] -macro_rules! tuple ( - ($i:expr, $($rest:tt)*) => ( - { - tuple_parser!($i, 0usize, (), $($rest)*) - } - ); -); - -/// Internal parser, do not use directly -#[doc(hidden)] -#[macro_export] -macro_rules! tuple_parser ( - ($i:expr, $consumed:expr, ($($parsed:tt),*), $e:ident, $($rest:tt)*) => ( - tuple_parser!($i, $consumed, ($($parsed),*), call!($e), $($rest)*); - ); - ($i:expr, $consumed:expr, (), $submac:ident!( $($args:tt)* ), $($rest:tt)*) => ( - { - use $crate::InputLength; - match $submac!($i, $($args)*) { - $crate::IResult::Error(e) => $crate::IResult::Error(e), - $crate::IResult::Incomplete($crate::Needed::Unknown) => $crate::IResult::Incomplete($crate::Needed::Unknown), - $crate::IResult::Incomplete($crate::Needed::Size(i)) => $crate::IResult::Incomplete($crate::Needed::Size($consumed + i)), - $crate::IResult::Done(i,o) => { - tuple_parser!(i, $consumed + (($i).input_len() - i.input_len()), (o), $($rest)*) - } - } - } - ); - ($i:expr, $consumed:expr, ($($parsed:tt)*), $submac:ident!( $($args:tt)* ), $($rest:tt)*) => ( - { - use $crate::InputLength; - match $submac!($i, $($args)*) { - $crate::IResult::Error(e) => $crate::IResult::Error(e), - $crate::IResult::Incomplete($crate::Needed::Unknown) => $crate::IResult::Incomplete($crate::Needed::Unknown), - $crate::IResult::Incomplete($crate::Needed::Size(i)) => $crate::IResult::Incomplete($crate::Needed::Size($consumed + i)), - $crate::IResult::Done(i,o) => { - tuple_parser!(i, $consumed + (($i).input_len() - i.input_len()), ($($parsed)* , o), $($rest)*) - } - } - } - ); - ($i:expr, $consumed:expr, ($($parsed:tt),*), $e:ident) => ( - tuple_parser!($i, $consumed, ($($parsed),*), call!($e)); - ); - ($i:expr, $consumed:expr, (), $submac:ident!( $($args:tt)* )) => ( - { - use $crate::InputLength; - match $submac!($i, $($args)*) { - $crate::IResult::Error(e) => $crate::IResult::Error(e), - $crate::IResult::Incomplete($crate::Needed::Unknown) => $crate::IResult::Incomplete($crate::Needed::Unknown), - $crate::IResult::Incomplete($crate::Needed::Size(i)) => $crate::IResult::Incomplete($crate::Needed::Size($consumed + i)), - $crate::IResult::Done(i,o) => { - $crate::IResult::Done(i, (o)) - } - } - } - ); - ($i:expr, $consumed:expr, ($($parsed:expr),*), $submac:ident!( $($args:tt)* )) => ( - { - use $crate::InputLength; - match $submac!($i, $($args)*) { - $crate::IResult::Error(e) => $crate::IResult::Error(e), - $crate::IResult::Incomplete($crate::Needed::Unknown) => $crate::IResult::Incomplete($crate::Needed::Unknown), - $crate::IResult::Incomplete($crate::Needed::Size(i)) => $crate::IResult::Incomplete($crate::Needed::Size($consumed + i)), - $crate::IResult::Done(i,o) => { - $crate::IResult::Done(i, ($($parsed),* , o)) - } - } - } - ); - ($i:expr, $consumed:expr, ($($parsed:expr),*)) => ( - { - $crate::IResult::Done($i, ($($parsed),*)) - } - ); -); -/// `alt!(I -> IResult | I -> IResult | ... | I -> IResult ) => I -> IResult` -/// try a list of parsers, return the result of the first successful one -/// -/// If one of the parser returns Incomplete, alt will return Incomplete, to retry -/// once you get more input. Note that it is better for performance to know the -/// minimum size of data you need before you get into alt. -/// -/// ``` -/// # #[macro_use] extern crate nom; -/// # use nom::IResult::Done; -/// # fn main() { -/// named!( test, alt!( tag!( "abcd" ) | tag!( "efgh" ) ) ); -/// let r1 = test(b"abcdefgh"); -/// assert_eq!(r1, Done(&b"efgh"[..], &b"abcd"[..])); -/// let r2 = test(&b"efghijkl"[..]); -/// assert_eq!(r2, Done(&b"ijkl"[..], &b"efgh"[..])); -/// # } -/// ``` -/// -/// There is another syntax for alt allowing a block to manipulate the result: -/// -/// ``` -/// # #[macro_use] extern crate nom; -/// # use nom::IResult::Done; -/// # fn main() { -/// #[derive(Debug,PartialEq,Eq)] -/// enum Tagged { -/// Abcd, -/// Efgh, -/// Took(usize) -/// } -/// named!(test, alt!( -/// tag!("abcd") => { |_| Tagged::Abcd } -/// | tag!("efgh") => { |_| Tagged::Efgh } -/// | take!(5) => { |res: &[u8]| Tagged::Took(res.len()) } // the closure takes the result as argument if the parser is successful -/// )); -/// let r1 = test(b"abcdefgh"); -/// assert_eq!(r1, Done(&b"efgh"[..], Tagged::Abcd)); -/// let r2 = test(&b"efghijkl"[..]); -/// assert_eq!(r2, Done(&b"ijkl"[..], Tagged::Efgh)); -/// let r3 = test(&b"mnopqrst"[..]); -/// assert_eq!(r3, Done(&b"rst"[..], Tagged::Took(5))); -/// # } -/// ``` -/// -/// **BE CAREFUL** there is a case where the behaviour of `alt!` can be confusing: -/// -/// when the alternatives have different lengths, like this case: -/// -/// ```ignore -/// named!( test, alt!( tag!( "abcd" ) | tag!( "ef" ) | tag!( "ghi" ) | tag!( "kl" ) ) ); -/// ``` -/// -/// With this parser, if you pass `"abcd"` as input, the first alternative parses it correctly, -/// but if you pass `"efg"`, the first alternative will return `Incomplete`, since it needs an input -/// of 4 bytes. This behaviour of `alt!` is expected: if you get a partial input that isn't matched -/// by the first alternative, but would match if the input was complete, you want `alt!` to indicate -/// that it cannot decide with limited information. -/// -/// There are two ways to fix this behaviour. The first one consists in ordering the alternatives -/// by size, like this: -/// -/// ```ignore -/// named!( test, alt!( tag!( "ef" ) | tag!( "kl") | tag!( "ghi" ) | tag!( "abcd" ) ) ); -/// ``` -/// -/// With this solution, the largest alternative will be tested last. -/// -/// The other solution uses the `complete!` combinator, which transforms an `Incomplete` in an -/// `Error`. If one of the alternatives returns `Incomplete` but is wrapped by `complete!`, -/// `alt!` will try the next alternative. This is useful when you know that -/// you will not get partial input: -/// -/// ```ignore -/// named!( test, -/// alt!( -/// complete!( tag!( "abcd" ) ) | -/// complete!( tag!( "ef" ) ) | -/// complete!( tag!( "ghi" ) ) | -/// complete!( tag!( "kl" ) ) -/// ) -/// ); -/// ``` -/// -/// If you want the `complete!` combinator to be applied to all rules then use the convenience -/// `alt_complete!` macro (see below). -/// -/// This behaviour of `alt!` can get especially confusing if multiple alternatives have different -/// sizes but a common prefix, like this: -/// -/// ```ignore -/// named!( test, alt!( tag!( "abcd" ) | tag!( "ab" ) | tag!( "ef" ) ) ); -/// ``` -/// -/// in that case, if you order by size, passing `"abcd"` as input will always be matched by the -/// smallest parser, so the solution using `complete!` is better suited. -/// -/// You can also nest multiple `alt!`, like this: -/// -/// ```ignore -/// named!( test, -/// alt!( -/// preceded!( -/// tag!("ab"), -/// alt!( -/// tag!( "cd" ) | -/// eof -/// ) -/// ) -/// | tag!( "ef" ) -/// ) -/// ); -/// ``` -/// -/// `preceded!` will first parse `"ab"` then, if successful, try the alternatives "cd", -/// or empty input (End Of File). If none of them work, `preceded!` will fail and -/// "ef" will be tested. -/// -#[macro_export] -macro_rules! alt ( - ($i:expr, $($rest:tt)*) => ( - { - alt_parser!($i, $($rest)*) - } - ); -); - -/// Internal parser, do not use directly -#[doc(hidden)] -#[macro_export] -macro_rules! alt_parser ( - ($i:expr, $e:ident | $($rest:tt)*) => ( - alt_parser!($i, call!($e) | $($rest)*); - ); - - ($i:expr, $subrule:ident!( $($args:tt)*) | $($rest:tt)*) => ( - { - let res = $subrule!($i, $($args)*); - match res { - $crate::IResult::Done(_,_) => res, - $crate::IResult::Incomplete(_) => res, - _ => alt_parser!($i, $($rest)*) - } - } - ); - - ($i:expr, $subrule:ident!( $($args:tt)* ) => { $gen:expr } | $($rest:tt)+) => ( - { - match $subrule!( $i, $($args)* ) { - $crate::IResult::Done(i,o) => $crate::IResult::Done(i,$gen(o)), - $crate::IResult::Incomplete(x) => $crate::IResult::Incomplete(x), - $crate::IResult::Error(_) => { - alt_parser!($i, $($rest)*) - } - } - } - ); - - ($i:expr, $e:ident => { $gen:expr } | $($rest:tt)*) => ( - alt_parser!($i, call!($e) => { $gen } | $($rest)*); - ); - - ($i:expr, $e:ident => { $gen:expr }) => ( - alt_parser!($i, call!($e) => { $gen }); - ); - - ($i:expr, $subrule:ident!( $($args:tt)* ) => { $gen:expr }) => ( - { - match $subrule!( $i, $($args)* ) { - $crate::IResult::Done(i,o) => $crate::IResult::Done(i,$gen(o)), - $crate::IResult::Incomplete(x) => $crate::IResult::Incomplete(x), - $crate::IResult::Error(_) => { - alt_parser!($i) - } - } - } - ); - - ($i:expr, $e:ident) => ( - alt_parser!($i, call!($e)); - ); - - ($i:expr, $subrule:ident!( $($args:tt)*)) => ( - { - match $subrule!( $i, $($args)* ) { - $crate::IResult::Done(i,o) => $crate::IResult::Done(i,o), - $crate::IResult::Incomplete(x) => $crate::IResult::Incomplete(x), - $crate::IResult::Error(_) => { - alt_parser!($i) - } - } - } - ); - - ($i:expr) => ( - $crate::IResult::Error($crate::Err::Position($crate::ErrorKind::Alt,$i)) - ); -); - -/// This is a combination of the `alt!` and `complete!` combinators. Rather -/// than returning `Incomplete` on partial input, `alt_complete!` will try the -/// next alternative in the chain. You should use this only if you know you -/// will not receive partial input for the rules you're trying to match (this -/// is almost always the case for parsing programming languages). -#[macro_export] -macro_rules! alt_complete ( - // Recursive rules (must include `complete!` around the head) - - ($i:expr, $e:ident | $($rest:tt)*) => ( - alt_complete!($i, complete!(call!($e)) | $($rest)*); - ); - - ($i:expr, $subrule:ident!( $($args:tt)*) | $($rest:tt)*) => ( - { - let res = complete!($i, $subrule!($($args)*)); - match res { - $crate::IResult::Done(_,_) => res, - _ => alt_complete!($i, $($rest)*), - } - } - ); - - ($i:expr, $subrule:ident!( $($args:tt)* ) => { $gen:expr } | $($rest:tt)+) => ( - { - match complete!($i, $subrule!($($args)*)) { - $crate::IResult::Done(i,o) => $crate::IResult::Done(i,$gen(o)), - _ => alt_complete!($i, $($rest)*), - } - } - ); - - ($i:expr, $e:ident => { $gen:expr } | $($rest:tt)*) => ( - alt_complete!($i, complete!(call!($e)) => { $gen } | $($rest)*); - ); - - // Tail (non-recursive) rules - - ($i:expr, $e:ident => { $gen:expr }) => ( - alt_complete!($i, call!($e) => { $gen }); - ); - - ($i:expr, $subrule:ident!( $($args:tt)* ) => { $gen:expr }) => ( - alt_parser!($i, $subrule!($($args)*) => { $gen }) - ); - - ($i:expr, $e:ident) => ( - alt_complete!($i, call!($e)); - ); - - ($i:expr, $subrule:ident!( $($args:tt)*)) => ( - alt_parser!($i, $subrule!($($args)*)) - ); -); - -/// `switch!(I -> IResult, P => I -> IResult | ... | P => I -> IResult ) => I -> IResult` -/// choose the next parser depending on the result of the first one, if successful, -/// and returns the result of the second parser -/// -/// ``` -/// # #[macro_use] extern crate nom; -/// # use nom::IResult::{Done,Error}; -/// # use nom::Err::{Position, NodePosition}; -/// # use nom::ErrorKind; -/// # fn main() { -/// named!(sw, -/// switch!(take!(4), -/// b"abcd" => tag!("XYZ") | -/// b"efgh" => tag!("123") -/// ) -/// ); -/// -/// let a = b"abcdXYZ123"; -/// let b = b"abcdef"; -/// let c = b"efgh123"; -/// let d = b"blah"; -/// -/// assert_eq!(sw(&a[..]), Done(&b"123"[..], &b"XYZ"[..])); -/// assert_eq!(sw(&b[..]), Error(NodePosition(ErrorKind::Switch, &b"abcdef"[..], Box::new(Position(ErrorKind::Tag, &b"ef"[..]))))); -/// assert_eq!(sw(&c[..]), Done(&b""[..], &b"123"[..])); -/// assert_eq!(sw(&d[..]), Error(Position(ErrorKind::Switch, &b"blah"[..]))); -/// # } -/// ``` -/// -/// Due to limitations in Rust macros, it is not possible to have simple functions on the right hand -/// side of pattern, like this: -/// -/// ```ignore -/// named!(sw, -/// switch!(take!(4), -/// b"abcd" => tag!("XYZ") | -/// b"efgh" => tag!("123") -/// ) -/// ); -/// ``` -/// -/// If you want to pass your own functions instead, you can use the `call!` combinator as follows: -/// -/// ```ignore -/// named!(xyz, tag!("XYZ")); -/// named!(num, tag!("123")); -/// named!(sw, -/// switch!(take!(4), -/// b"abcd" => call!(xyz) | -/// b"efgh" => call!(num) -/// ) -/// ); -/// ``` -/// -#[macro_export] -macro_rules! switch ( - ($i:expr, $submac:ident!( $($args:tt)*), $($rest:tt)*) => ( - { - switch_impl!($i, $submac!($($args)*), $($rest)*) - } - ); - ($i:expr, $e:ident, $($rest:tt)*) => ( - { - switch_impl!($i, call!($e), $($rest)*) - } - ); -); - -/// Internal parser, do not use directly -#[doc(hidden)] -#[macro_export] -macro_rules! switch_impl ( - ($i:expr, $submac:ident!( $($args:tt)* ), $($p:pat => $subrule:ident!( $($args2:tt)* ))|* ) => ( - { - match $submac!($i, $($args)*) { - $crate::IResult::Error(e) => $crate::IResult::Error($crate::Err::NodePosition( - $crate::ErrorKind::Switch, $i, ::std::boxed::Box::new(e) - )), - $crate::IResult::Incomplete(i) => $crate::IResult::Incomplete(i), - $crate::IResult::Done(i, o) => { - match o { - $($p => match $subrule!(i, $($args2)*) { - $crate::IResult::Error(e) => $crate::IResult::Error($crate::Err::NodePosition( - $crate::ErrorKind::Switch, $i, ::std::boxed::Box::new(e) - )), - a => a, - }),*, - _ => $crate::IResult::Error($crate::Err::Position($crate::ErrorKind::Switch,$i)) - } - } - } - } - ); -); -/// `opt!(I -> IResult) => I -> IResult>` -/// make the underlying parser optional -/// -/// returns an Option of the returned type. This parser returns `Some(result)` if the child parser -/// succeeds,`None` if it fails, and `Incomplete` if it did not have enough data to decide -/// -/// ``` -/// # #[macro_use] extern crate nom; -/// # use nom::IResult::Done; -/// # fn main() { -/// named!( o<&[u8], Option<&[u8]> >, opt!( tag!( "abcd" ) ) ); -/// -/// let a = b"abcdef"; -/// let b = b"bcdefg"; -/// assert_eq!(o(&a[..]), Done(&b"ef"[..], Some(&b"abcd"[..]))); -/// assert_eq!(o(&b[..]), Done(&b"bcdefg"[..], None)); -/// # } -/// ``` -#[macro_export] -macro_rules! opt( - ($i:expr, $submac:ident!( $($args:tt)* )) => ( - { - match $submac!($i, $($args)*) { - $crate::IResult::Done(i,o) => $crate::IResult::Done(i, ::std::option::Option::Some(o)), - $crate::IResult::Error(_) => $crate::IResult::Done($i, ::std::option::Option::None), - $crate::IResult::Incomplete(i) => $crate::IResult::Incomplete(i) - } - } - ); - ($i:expr, $f:expr) => ( - opt!($i, call!($f)); - ); -); - -/// `opt_res!(I -> IResult) => I -> IResult>` -/// make the underlying parser optional -/// -/// returns a Result, with Err containing the parsing error -/// -/// ``` -/// # #[macro_use] extern crate nom; -/// # use nom::IResult::Done; -/// # use nom::Err::Position; -/// # use nom::ErrorKind; -/// # fn main() { -/// named!( o<&[u8], Result<&[u8], nom::Err<&[u8]> > >, opt_res!( tag!( "abcd" ) ) ); -/// -/// let a = b"abcdef"; -/// let b = b"bcdefg"; -/// assert_eq!(o(&a[..]), Done(&b"ef"[..], Ok(&b"abcd"[..]))); -/// assert_eq!(o(&b[..]), Done(&b"bcdefg"[..], Err(Position(ErrorKind::Tag, &b[..])))); -/// # } -/// ``` -#[macro_export] -macro_rules! opt_res ( - ($i:expr, $submac:ident!( $($args:tt)* )) => ( - { - match $submac!($i, $($args)*) { - $crate::IResult::Done(i,o) => $crate::IResult::Done(i, Ok(o)), - $crate::IResult::Error(e) => $crate::IResult::Done($i, Err(e)), - $crate::IResult::Incomplete(i) => $crate::IResult::Incomplete(i) - } - } - ); - ($i:expr, $f:expr) => ( - opt_res!($i, call!($f)); - ); -); - -/// `cond!(bool, I -> IResult) => I -> IResult>` -/// Conditional combinator -/// -/// Wraps another parser and calls it if the -/// condition is met. This combinator returns -/// an Option of the return type of the child -/// parser. -/// -/// This is especially useful if a parser depends -/// on the value return by a preceding parser in -/// a `chain!`. -/// -/// ``` -/// # #[macro_use] extern crate nom; -/// # use nom::IResult::Done; -/// # use nom::IResult; -/// # fn main() { -/// let b = true; -/// let f: Box IResult<&[u8],Option<&[u8]>>> = Box::new(closure!(&'static[u8], -/// cond!( b, tag!("abcd") )) -/// ); -/// -/// let a = b"abcdef"; -/// assert_eq!(f(&a[..]), Done(&b"ef"[..], Some(&b"abcd"[..]))); -/// -/// let b2 = false; -/// let f2:Box IResult<&[u8],Option<&[u8]>>> = Box::new(closure!(&'static[u8], -/// cond!( b2, tag!("abcd") )) -/// ); -/// assert_eq!(f2(&a[..]), Done(&b"abcdef"[..], None)); -/// # } -/// ``` -/// -#[macro_export] -macro_rules! cond( - ($i:expr, $cond:expr, $submac:ident!( $($args:tt)* )) => ( - { - if $cond { - match $submac!($i, $($args)*) { - $crate::IResult::Done(i,o) => $crate::IResult::Done(i, ::std::option::Option::Some(o)), - $crate::IResult::Error(_) => $crate::IResult::Done($i, ::std::option::Option::None), - $crate::IResult::Incomplete(i) => $crate::IResult::Incomplete(i) - } - } else { - $crate::IResult::Done($i, ::std::option::Option::None) - } - } - ); - ($i:expr, $cond:expr, $f:expr) => ( - cond!($i, $cond, call!($f)); - ); -); - -/// `cond_reduce!(bool, I -> IResult) => I -> IResult` -/// Conditional combinator with error -/// -/// Wraps another parser and calls it if the -/// condition is met. This combinator returns -/// an error if the condition is false -/// -/// This is especially useful if a parser depends -/// on the value return by a preceding parser in -/// a `chain!`. -/// -/// ``` -/// # #[macro_use] extern crate nom; -/// # use nom::IResult::{Done,Error}; -/// # use nom::{Err,ErrorKind}; -/// # fn main() { -/// let b = true; -/// let f = closure!(&'static[u8], -/// cond_reduce!( b, tag!("abcd") ) -/// ); -/// -/// let a = b"abcdef"; -/// assert_eq!(f(&a[..]), Done(&b"ef"[..], &b"abcd"[..])); -/// -/// let b2 = false; -/// let f2 = closure!(&'static[u8], -/// cond_reduce!( b2, tag!("abcd") ) -/// ); -/// assert_eq!(f2(&a[..]), Error(Err::Position(ErrorKind::CondReduce, &a[..]))); -/// # } -/// ``` -/// -#[macro_export] -macro_rules! cond_reduce( - ($i:expr, $cond:expr, $submac:ident!( $($args:tt)* )) => ( - { - if $cond { - match $submac!($i, $($args)*) { - $crate::IResult::Done(i,o) => $crate::IResult::Done(i, o), - $crate::IResult::Error(e) => $crate::IResult::Error(e), - $crate::IResult::Incomplete(i) => $crate::IResult::Incomplete(i) - } - } else { - $crate::IResult::Error($crate::Err::Position($crate::ErrorKind::CondReduce, $i)) - } - } - ); - ($i:expr, $cond:expr, $f:expr) => ( - cond_reduce!($i, $cond, call!($f)); - ); -); - -/// `peek!(I -> IResult) => I -> IResult` -/// returns a result without consuming the input -/// -/// the embedded parser may return Incomplete -/// -/// ``` -/// # #[macro_use] extern crate nom; -/// # use nom::IResult::Done; -/// # fn main() { -/// named!(ptag, peek!( tag!( "abcd" ) ) ); -/// -/// let r = ptag(&b"abcdefgh"[..]); -/// assert_eq!(r, Done(&b"abcdefgh"[..], &b"abcd"[..])); -/// # } -/// ``` -#[macro_export] -macro_rules! peek( - ($i:expr, $submac:ident!( $($args:tt)* )) => ( - { - match $submac!($i, $($args)*) { - $crate::IResult::Done(_,o) => $crate::IResult::Done($i, o), - $crate::IResult::Error(a) => $crate::IResult::Error(a), - $crate::IResult::Incomplete(i) => $crate::IResult::Incomplete(i) - } - } - ); - ($i:expr, $f:expr) => ( - peek!($i, call!($f)); - ); -); - -/// `tap!(name: I -> IResult => { block }) => I -> IResult` -/// allows access to the parser's result without affecting it -/// -/// ``` -/// # #[macro_use] extern crate nom; -/// # use nom::IResult::Done; -/// # use std::str; -/// # fn main() { -/// named!(ptag, tap!(res: tag!( "abcd" ) => { println!("recognized {}", str::from_utf8(res).unwrap()) } ) ); -/// -/// let r = ptag(&b"abcdefgh"[..]); -/// assert_eq!(r, Done(&b"efgh"[..], &b"abcd"[..])); -/// # } -/// ``` -#[macro_export] -macro_rules! tap ( - ($i:expr, $name:ident : $submac:ident!( $($args:tt)* ) => $e:expr) => ( - { - match $submac!($i, $($args)*) { - $crate::IResult::Done(i,o) => { - let $name = o; - $e; - $crate::IResult::Done(i, $name) - }, - $crate::IResult::Error(a) => $crate::IResult::Error(a), - $crate::IResult::Incomplete(i) => $crate::IResult::Incomplete(i) - } - } - ); - ($i:expr, $name: ident: $f:expr => $e:expr) => ( - tap!($i, $name: call!($f) => $e); - ); -); - -/// `pair!(I -> IResult, I -> IResult) => I -> IResult` -/// pair(X,Y), returns (x,y) -/// -#[macro_export] -macro_rules! pair( - ($i:expr, $submac:ident!( $($args:tt)* ), $submac2:ident!( $($args2:tt)* )) => ( - { - match $submac!($i, $($args)*) { - $crate::IResult::Error(a) => $crate::IResult::Error(a), - $crate::IResult::Incomplete(i) => $crate::IResult::Incomplete(i), - $crate::IResult::Done(i1,o1) => { - match $submac2!(i1, $($args2)*) { - $crate::IResult::Error(a) => $crate::IResult::Error(a), - $crate::IResult::Incomplete(i) => $crate::IResult::Incomplete(i), - $crate::IResult::Done(i2,o2) => { - $crate::IResult::Done(i2, (o1, o2)) - } - } - }, - } - } - ); - - ($i:expr, $submac:ident!( $($args:tt)* ), $g:expr) => ( - pair!($i, $submac!($($args)*), call!($g)); - ); - - ($i:expr, $f:expr, $submac:ident!( $($args:tt)* )) => ( - pair!($i, call!($f), $submac!($($args)*)); - ); - - ($i:expr, $f:expr, $g:expr) => ( - pair!($i, call!($f), call!($g)); - ); -); - -/// `separated_pair!(I -> IResult, I -> IResult, I -> IResult) => I -> IResult` -/// separated_pair(X,sep,Y) returns (x,y) -#[macro_export] -macro_rules! separated_pair( - ($i:expr, $submac:ident!( $($args:tt)* ), $($rest:tt)+) => ( - { - match $submac!($i, $($args)*) { - $crate::IResult::Error(a) => $crate::IResult::Error(a), - $crate::IResult::Incomplete(i) => $crate::IResult::Incomplete(i), - $crate::IResult::Done(i1,o1) => { - separated_pair1!(i1, o1, $($rest)*) - } - } - } - ); - - ($i:expr, $f:expr, $($rest:tt)+) => ( - separated_pair!($i, call!($f), $($rest)*); - ); -); - -/// Internal parser, do not use directly -#[doc(hidden)] -#[macro_export] -macro_rules! separated_pair1( - ($i:expr, $res1:ident, $submac2:ident!( $($args2:tt)* ), $($rest:tt)+) => ( - { - match $submac2!($i, $($args2)*) { - $crate::IResult::Error(a) => $crate::IResult::Error(a), - $crate::IResult::Incomplete(i) => $crate::IResult::Incomplete(i), - $crate::IResult::Done(i2,_) => { - separated_pair2!(i2, $res1, $($rest)*) - } - } - } - ); - ($i:expr, $res1:ident, $g:expr, $($rest:tt)+) => ( - separated_pair1!($i, $res1, call!($g), $($rest)*); - ); -); - -/// Internal parser, do not use directly -#[doc(hidden)] -#[macro_export] -macro_rules! separated_pair2( - ($i:expr, $res1:ident, $submac3:ident!( $($args3:tt)* )) => ( - { - match $submac3!($i, $($args3)*) { - $crate::IResult::Error(a) => $crate::IResult::Error(a), - $crate::IResult::Incomplete(i) => $crate::IResult::Incomplete(i), - $crate::IResult::Done(i3,o3) => { - $crate::IResult::Done(i3, ($res1, o3)) - } - } - } - ); - - ($i:expr, $res1:ident, $h:expr) => ( - separated_pair2!($i, $res1, call!($h)); - ); -); - -/// `preceded!(I -> IResult, I -> IResult) => I -> IResult` -/// preceded(opening, X) returns X -#[macro_export] -macro_rules! preceded( - ($i:expr, $submac:ident!( $($args:tt)* ), $submac2:ident!( $($args2:tt)* )) => ( - { - match $submac!($i, $($args)*) { - $crate::IResult::Error(a) => $crate::IResult::Error(a), - $crate::IResult::Incomplete(i) => $crate::IResult::Incomplete(i), - $crate::IResult::Done(i1,_) => { - match $submac2!(i1, $($args2)*) { - $crate::IResult::Error(a) => $crate::IResult::Error(a), - $crate::IResult::Incomplete(i) => $crate::IResult::Incomplete(i), - $crate::IResult::Done(i2,o2) => { - $crate::IResult::Done(i2, o2) - } - } - }, - } - } - ); - - ($i:expr, $submac:ident!( $($args:tt)* ), $g:expr) => ( - preceded!($i, $submac!($($args)*), call!($g)); - ); - - ($i:expr, $f:expr, $submac:ident!( $($args:tt)* )) => ( - preceded!($i, call!($f), $submac!($($args)*)); - ); - - ($i:expr, $f:expr, $g:expr) => ( - preceded!($i, call!($f), call!($g)); - ); -); - -/// `terminated!(I -> IResult, I -> IResult) => I -> IResult` -/// terminated(X, closing) returns X -#[macro_export] -macro_rules! terminated( - ($i:expr, $submac:ident!( $($args:tt)* ), $submac2:ident!( $($args2:tt)* )) => ( - { - match $submac!($i, $($args)*) { - $crate::IResult::Error(a) => $crate::IResult::Error(a), - $crate::IResult::Incomplete(i) => $crate::IResult::Incomplete(i), - $crate::IResult::Done(i1,o1) => { - match $submac2!(i1, $($args2)*) { - $crate::IResult::Error(a) => $crate::IResult::Error(a), - $crate::IResult::Incomplete(i) => $crate::IResult::Incomplete(i), - $crate::IResult::Done(i2,_) => { - $crate::IResult::Done(i2, o1) - } - } - }, - } - } - ); - - ($i:expr, $submac:ident!( $($args:tt)* ), $g:expr) => ( - terminated!($i, $submac!($($args)*), call!($g)); - ); - - ($i:expr, $f:expr, $submac:ident!( $($args:tt)* )) => ( - terminated!($i, call!($f), $submac!($($args)*)); - ); - - ($i:expr, $f:expr, $g:expr) => ( - terminated!($i, call!($f), call!($g)); - ); -); - -/// `delimited!(I -> IResult, I -> IResult, I -> IResult) => I -> IResult` -/// delimited(opening, X, closing) returns X -#[macro_export] -macro_rules! delimited( - ($i:expr, $submac:ident!( $($args:tt)* ), $($rest:tt)+) => ( - { - match $submac!($i, $($args)*) { - $crate::IResult::Error(a) => $crate::IResult::Error(a), - $crate::IResult::Incomplete(i) => $crate::IResult::Incomplete(i), - $crate::IResult::Done(i1,_) => { - delimited1!(i1, $($rest)*) - } - } - } - ); - - ($i:expr, $f:expr, $($rest:tt)+) => ( - delimited!($i, call!($f), $($rest)*); - ); -); - -/// Internal parser, do not use directly -#[doc(hidden)] -#[macro_export] -macro_rules! delimited1( - ($i:expr, $submac2:ident!( $($args2:tt)* ), $($rest:tt)+) => ( - { - match $submac2!($i, $($args2)*) { - $crate::IResult::Error(a) => $crate::IResult::Error(a), - $crate::IResult::Incomplete(i) => $crate::IResult::Incomplete(i), - $crate::IResult::Done(i2,o2) => { - delimited2!(i2, o2, $($rest)*) - } - } - } - ); - ($i:expr, $g:expr, $($rest:tt)+) => ( - delimited1!($i, call!($g), $($rest)*); - ); -); - -/// Internal parser, do not use directly -#[doc(hidden)] -#[macro_export] -macro_rules! delimited2( - ($i:expr, $res2:ident, $submac3:ident!( $($args3:tt)* )) => ( - { - match $submac3!($i, $($args3)*) { - $crate::IResult::Error(a) => $crate::IResult::Error(a), - $crate::IResult::Incomplete(i) => $crate::IResult::Incomplete(i), - $crate::IResult::Done(i3,_) => { - $crate::IResult::Done(i3, $res2) - } - } - } - ); - - ($i:expr, $res2:ident, $h:expr) => ( - delimited2!($i, $res2, call!($h)); - ); -); - -/// `separated_list!(I -> IResult, I -> IResult) => I -> IResult>` -/// separated_list(sep, X) returns Vec -#[macro_export] -macro_rules! separated_list( - ($i:expr, $sep:ident!( $($args:tt)* ), $submac:ident!( $($args2:tt)* )) => ( - { - let mut res = ::std::vec::Vec::new(); - let mut input = $i; - - // get the first element - match $submac!(input, $($args2)*) { - $crate::IResult::Error(_) => $crate::IResult::Done(input, ::std::vec::Vec::new()), - $crate::IResult::Incomplete(i) => $crate::IResult::Incomplete(i), - $crate::IResult::Done(i,o) => { - if i.len() == input.len() { - $crate::IResult::Error($crate::Err::Position($crate::ErrorKind::SeparatedList,input)) - } else { - res.push(o); - input = i; - - loop { - // get the separator first - if let $crate::IResult::Done(i2,_) = $sep!(input, $($args)*) { - if i2.len() == input.len() { - break; - } - input = i2; - - // get the element next - if let $crate::IResult::Done(i3,o3) = $submac!(input, $($args2)*) { - if i3.len() == input.len() { - break; - } - res.push(o3); - input = i3; - } else { - break; - } - } else { - break; - } - } - $crate::IResult::Done(input, res) - } - }, - } - } - ); - ($i:expr, $submac:ident!( $($args:tt)* ), $g:expr) => ( - separated_list!($i, $submac!($($args)*), call!($g)); - ); - ($i:expr, $f:expr, $submac:ident!( $($args:tt)* )) => ( - separated_list!($i, call!($f), $submac!($($args)*)); - ); - ($i:expr, $f:expr, $g:expr) => ( - separated_list!($i, call!($f), call!($g)); - ); -); - -/// `separated_nonempty_list!(I -> IResult, I -> IResult) => I -> IResult>` -/// separated_nonempty_list(sep, X) returns Vec -#[macro_export] -macro_rules! separated_nonempty_list( - ($i:expr, $sep:ident!( $($args:tt)* ), $submac:ident!( $($args2:tt)* )) => ( - { - let mut res = ::std::vec::Vec::new(); - let mut input = $i; - - // get the first element - match $submac!(input, $($args2)*) { - $crate::IResult::Error(a) => $crate::IResult::Error(a), - $crate::IResult::Incomplete(i) => $crate::IResult::Incomplete(i), - $crate::IResult::Done(i,o) => { - if i.len() == input.len() { - $crate::IResult::Error($crate::Err::Position($crate::ErrorKind::SeparatedNonEmptyList,input)) - } else { - res.push(o); - input = i; - - loop { - if let $crate::IResult::Done(i2,_) = $sep!(input, $($args)*) { - if i2.len() == input.len() { - break; - } - input = i2; - - if let $crate::IResult::Done(i3,o3) = $submac!(input, $($args2)*) { - if i3.len() == input.len() { - break; - } - res.push(o3); - input = i3; - } else { - break; - } - } else { - break; - } - } - $crate::IResult::Done(input, res) - } - }, - } - } - ); - ($i:expr, $submac:ident!( $($args:tt)* ), $g:expr) => ( - separated_nonempty_list!($i, $submac!($($args)*), call!($g)); - ); - ($i:expr, $f:expr, $submac:ident!( $($args:tt)* )) => ( - separated_nonempty_list!($i, call!($f), $submac!($($args)*)); - ); - ($i:expr, $f:expr, $g:expr) => ( - separated_nonempty_list!($i, call!($f), call!($g)); - ); -); - -/// `many0!(I -> IResult) => I -> IResult>` -/// Applies the parser 0 or more times and returns the list of results in a Vec -/// -/// the embedded parser may return Incomplete -/// -/// ``` -/// # #[macro_use] extern crate nom; -/// # use nom::IResult::Done; -/// # fn main() { -/// named!(multi<&[u8], Vec<&[u8]> >, many0!( tag!( "abcd" ) ) ); -/// -/// let a = b"abcdabcdefgh"; -/// let b = b"azerty"; -/// -/// let res = vec![&b"abcd"[..], &b"abcd"[..]]; -/// assert_eq!(multi(&a[..]), Done(&b"efgh"[..], res)); -/// assert_eq!(multi(&b[..]), Done(&b"azerty"[..], Vec::new())); -/// # } -/// ``` -/// 0 or more -#[macro_export] -macro_rules! many0( - ($i:expr, $submac:ident!( $($args:tt)* )) => ( - { - use $crate::InputLength; - if ($i).input_len() == 0 { - $crate::IResult::Done($i, ::std::vec::Vec::new()) - } else { - match $submac!($i, $($args)*) { - $crate::IResult::Error(_) => { - $crate::IResult::Done($i, ::std::vec::Vec::new()) - }, - $crate::IResult::Incomplete(i) => $crate::IResult::Incomplete(i), - $crate::IResult::Done(i1,o1) => { - if i1.input_len() == 0 { - $crate::IResult::Done(i1,vec![o1]) - } else { - let mut res = ::std::vec::Vec::with_capacity(4); - res.push(o1); - let mut input = i1; - let mut incomplete: ::std::option::Option<$crate::Needed> = ::std::option::Option::None; - loop { - match $submac!(input, $($args)*) { - $crate::IResult::Done(i, o) => { - // do not allow parsers that do not consume input (causes infinite loops) - if i.input_len() == input.input_len() { - break; - } - res.push(o); - input = i; - } - $crate::IResult::Error(_) => { - break; - }, - $crate::IResult::Incomplete($crate::Needed::Unknown) => { - incomplete = ::std::option::Option::Some($crate::Needed::Unknown); - break; - }, - $crate::IResult::Incomplete($crate::Needed::Size(i)) => { - incomplete = ::std::option::Option::Some($crate::Needed::Size(i + ($i).input_len() - input.input_len())); - break; - }, - } - if input.input_len() == 0 { - break; - } - } - - match incomplete { - ::std::option::Option::Some(i) => $crate::IResult::Incomplete(i), - ::std::option::Option::None => $crate::IResult::Done(input, res) - } - } - } - } - } - } - ); - ($i:expr, $f:expr) => ( - many0!($i, call!($f)); - ); -); - -/// `many1!(I -> IResult) => I -> IResult>` -/// Applies the parser 1 or more times and returns the list of results in a Vec -/// -/// the embedded parser may return Incomplete -/// -/// ``` -/// # #[macro_use] extern crate nom; -/// # use nom::IResult::{Done, Error}; -/// # use nom::Err::Position; -/// # use nom::ErrorKind; -/// # fn main() { -/// named!(multi<&[u8], Vec<&[u8]> >, many1!( tag!( "abcd" ) ) ); -/// -/// let a = b"abcdabcdefgh"; -/// let b = b"azerty"; -/// -/// let res = vec![&b"abcd"[..], &b"abcd"[..]]; -/// assert_eq!(multi(&a[..]), Done(&b"efgh"[..], res)); -/// assert_eq!(multi(&b[..]), Error(Position(ErrorKind::Many1,&b[..]))); -/// # } -/// ``` -#[macro_export] -macro_rules! many1( - ($i:expr, $submac:ident!( $($args:tt)* )) => ( - { - use $crate::InputLength; - match $submac!($i, $($args)*) { - $crate::IResult::Error(_) => $crate::IResult::Error($crate::Err::Position($crate::ErrorKind::Many1,$i)), - $crate::IResult::Incomplete(i) => $crate::IResult::Incomplete(i), - $crate::IResult::Done(i1,o1) => { - if i1.len() == 0 { - $crate::IResult::Done(i1,vec![o1]) - } else { - - let mut res = ::std::vec::Vec::with_capacity(4); - res.push(o1); - let mut input = i1; - let mut incomplete: ::std::option::Option<$crate::Needed> = ::std::option::Option::None; - loop { - if input.input_len() == 0 { - break; - } - match $submac!(input, $($args)*) { - $crate::IResult::Error(_) => { - break; - }, - $crate::IResult::Incomplete($crate::Needed::Unknown) => { - incomplete = ::std::option::Option::Some($crate::Needed::Unknown); - break; - }, - $crate::IResult::Incomplete($crate::Needed::Size(i)) => { - incomplete = ::std::option::Option::Some($crate::Needed::Size(i + ($i).input_len() - input.input_len())); - break; - }, - $crate::IResult::Done(i, o) => { - if i.input_len() == input.input_len() { - break; - } - res.push(o); - input = i; - } - } - } - - match incomplete { - ::std::option::Option::Some(i) => $crate::IResult::Incomplete(i), - ::std::option::Option::None => $crate::IResult::Done(input, res) - } - } - } - } - } - ); - ($i:expr, $f:expr) => ( - many1!($i, call!($f)); - ); -); - -/// `many_m_n!(usize, usize, I -> IResult) => I -> IResult>` -/// Applies the parser between m and n times (n included) and returns the list of results in a Vec -/// -/// the embedded parser may return Incomplete -/// -/// ``` -/// # #[macro_use] extern crate nom; -/// # use nom::IResult::{Done, Error}; -/// # use nom::Err::Position; -/// # use nom::ErrorKind; -/// # fn main() { -/// named!(multi<&[u8], Vec<&[u8]> >, many_m_n!(2, 4, tag!( "abcd" ) ) ); -/// -/// let a = b"abcdefgh"; -/// let b = b"abcdabcdefgh"; -/// let c = b"abcdabcdabcdabcdabcdefgh"; -/// -/// assert_eq!(multi(&a[..]),Error(Position(ErrorKind::ManyMN,&a[..]))); -/// let res = vec![&b"abcd"[..], &b"abcd"[..]]; -/// assert_eq!(multi(&b[..]), Done(&b"efgh"[..], res)); -/// let res2 = vec![&b"abcd"[..], &b"abcd"[..], &b"abcd"[..], &b"abcd"[..]]; -/// assert_eq!(multi(&c[..]), Done(&b"abcdefgh"[..], res2)); -/// # } -/// ``` -#[macro_export] -macro_rules! many_m_n( - ($i:expr, $m:expr, $n: expr, $submac:ident!( $($args:tt)* )) => ( - { - use $crate::InputLength; - let mut res = ::std::vec::Vec::with_capacity($m); - let mut input = $i; - let mut count: usize = 0; - let mut err = false; - let mut incomplete: ::std::option::Option<$crate::Needed> = ::std::option::Option::None; - loop { - if count == $n { break } - match $submac!(input, $($args)*) { - $crate::IResult::Done(i, o) => { - // do not allow parsers that do not consume input (causes infinite loops) - if i.input_len() == input.input_len() { - break; - } - res.push(o); - input = i; - count += 1; - } - $crate::IResult::Error(_) => { - err = true; - break; - }, - $crate::IResult::Incomplete($crate::Needed::Unknown) => { - incomplete = ::std::option::Option::Some($crate::Needed::Unknown); - break; - }, - $crate::IResult::Incomplete($crate::Needed::Size(i)) => { - incomplete = ::std::option::Option::Some($crate::Needed::Size(i + ($i).input_len() - input.input_len())); - break; - }, - } - if input.input_len() == 0 { - break; - } - } - - if count < $m { - if err { - $crate::IResult::Error($crate::Err::Position($crate::ErrorKind::ManyMN,$i)) - } else { - match incomplete { - ::std::option::Option::Some(i) => $crate::IResult::Incomplete(i), - ::std::option::Option::None => $crate::IResult::Incomplete($crate::Needed::Unknown) - } - } - } else { - match incomplete { - ::std::option::Option::Some(i) => $crate::IResult::Incomplete(i), - ::std::option::Option::None => $crate::IResult::Done(input, res) - } - } - } - ); - ($i:expr, $m:expr, $n: expr, $f:expr) => ( - many_m_n!($i, $m, $n, call!($f)); - ); -); - -/// `count!(I -> IResult, nb) => I -> IResult>` -/// Applies the child parser a specified number of times -/// -/// ``` -/// # #[macro_use] extern crate nom; -/// # use nom::IResult::{Done,Error}; -/// # use nom::Err::Position; -/// # use nom::ErrorKind; -/// # fn main() { -/// named!(counter< Vec<&[u8]> >, count!( tag!( "abcd" ), 2 ) ); -/// -/// let a = b"abcdabcdabcdef"; -/// let b = b"abcdefgh"; -/// let res = vec![&b"abcd"[..], &b"abcd"[..]]; -/// -/// assert_eq!(counter(&a[..]), Done(&b"abcdef"[..], res)); -/// assert_eq!(counter(&b[..]), Error(Position(ErrorKind::Count, &b[..]))); -/// # } -/// ``` -/// -#[macro_export] -macro_rules! count( - ($i:expr, $submac:ident!( $($args:tt)* ), $count: expr) => ( - { - let ret; - let mut input = $i; - let mut res = ::std::vec::Vec::with_capacity($count); - - loop { - if res.len() == $count { - ret = $crate::IResult::Done(input, res); break; - } - - match $submac!(input, $($args)*) { - $crate::IResult::Done(i,o) => { - res.push(o); - input = i; - }, - $crate::IResult::Error(_) => { - ret = $crate::IResult::Error($crate::Err::Position($crate::ErrorKind::Count,$i)); break; - }, - $crate::IResult::Incomplete(_) => { - ret = $crate::IResult::Incomplete($crate::Needed::Unknown); break; - } - } - } - - ret - } - ); - ($i:expr, $f:expr, $count: expr) => ( - count!($i, call!($f), $count); - ); -); - -/// `count_fixed!(O, I -> IResult, nb) => I -> IResult` -/// Applies the child parser a fixed number of times and returns a fixed size array -/// The type must be specified and it must be `Copy` -/// -/// ``` -/// # #[macro_use] extern crate nom; -/// # use nom::IResult::{Done,Error}; -/// # use nom::Err::Position; -/// # use nom::ErrorKind; -/// # fn main() { -/// named!(counter< [&[u8]; 2] >, count_fixed!( &[u8], tag!( "abcd" ), 2 ) ); -/// // can omit the type specifier if returning slices -/// // named!(counter< [&[u8]; 2] >, count_fixed!( tag!( "abcd" ), 2 ) ); -/// -/// let a = b"abcdabcdabcdef"; -/// let b = b"abcdefgh"; -/// let res = [&b"abcd"[..], &b"abcd"[..]]; -/// -/// assert_eq!(counter(&a[..]), Done(&b"abcdef"[..], res)); -/// assert_eq!(counter(&b[..]), Error(Position(ErrorKind::Count, &b[..]))); -/// # } -/// ``` -/// -#[macro_export] -macro_rules! count_fixed ( - ($i:expr, $typ:ty, $submac:ident!( $($args:tt)* ), $count: expr) => ( - { - let ret; - let mut input = $i; - // `$typ` must be Copy, and thus having no destructor, this is panic safe - let mut res: [$typ; $count] = unsafe{[::std::mem::uninitialized(); $count as usize]}; - let mut cnt: usize = 0; - - loop { - if cnt == $count { - ret = $crate::IResult::Done(input, res); break; - } - - match $submac!(input, $($args)*) { - $crate::IResult::Done(i,o) => { - res[cnt] = o; - cnt += 1; - input = i; - }, - $crate::IResult::Error(_) => { - ret = $crate::IResult::Error($crate::Err::Position($crate::ErrorKind::Count,$i)); break; - }, - $crate::IResult::Incomplete(_) => { - ret = $crate::IResult::Incomplete($crate::Needed::Unknown); break; - } - } - } - - ret - } - ); - ($i:expr, $typ: ty, $f:ident, $count: expr) => ( - count_fixed!($i, $typ, call!($f), $count); - ); -); - -/// `length_value!(I -> IResult, I -> IResult) => I -> IResult>` -/// gets a number from the first parser, then applies the second parser that many times -#[macro_export] -macro_rules! length_value( - ($i:expr, $f:expr, $g:expr) => ( - { - match $f($i) { - $crate::IResult::Error(a) => $crate::IResult::Error(a), - $crate::IResult::Incomplete(x) => $crate::IResult::Incomplete(x), - $crate::IResult::Done(inum, onum) => { - let ret; - let length_token = $i.len() - inum.len(); - let mut input = inum; - let mut res = ::std::vec::Vec::new(); - - loop { - if res.len() == onum as usize { - ret = $crate::IResult::Done(input, res); break; - } - - match $g(input) { - $crate::IResult::Done(iparse, oparse) => { - res.push(oparse); - input = iparse; - }, - $crate::IResult::Error(_) => { - ret = $crate::IResult::Error($crate::Err::Position($crate::ErrorKind::LengthValue,$i)); break; - }, - $crate::IResult::Incomplete(a) => { - ret = match a { - $crate::Needed::Unknown => $crate::IResult::Incomplete($crate::Needed::Unknown), - $crate::Needed::Size(length) => $crate::IResult::Incomplete($crate::Needed::Size(length_token + onum as usize * length)) - }; - break; - } - } - } - - ret - } - } - } - ); - ($i:expr, $f:expr, $g:expr, $length:expr) => ( - { - match $f($i) { - $crate::IResult::Error(a) => $crate::IResult::Error(a), - $crate::IResult::Incomplete(x) => $crate::IResult::Incomplete(x), - $crate::IResult::Done(inum, onum) => { - let ret; - let length_token = $i.len() - inum.len(); - let mut input = inum; - let mut res = ::std::vec::Vec::new(); - - loop { - if res.len() == onum as usize { - ret = $crate::IResult::Done(input, res); break; - } - - match $g(input) { - $crate::IResult::Done(iparse, oparse) => { - res.push(oparse); - input = iparse; - }, - $crate::IResult::Error(_) => { - ret = $crate::IResult::Error($crate::Err::Position($crate::ErrorKind::LengthValue,$i)); break; - }, - $crate::IResult::Incomplete(a) => { - ret = match a { - $crate::Needed::Unknown => $crate::IResult::Incomplete($crate::Needed::Unknown), - $crate::Needed::Size(_) => $crate::IResult::Incomplete($crate::Needed::Size(length_token + onum as usize * $length)) - }; - break; - } - } - } - - ret - } - } - } - ); -); - - -#[cfg(test)] -mod tests { - use internal::{Needed,IResult,Err}; - use internal::IResult::*; - use internal::Err::*; - use util::ErrorKind; - - // reproduce the tag and take macros, because of module import order - macro_rules! tag ( - ($i:expr, $inp: expr) => ( - { - #[inline(always)] - fn as_bytes(b: &T) -> &[u8] { - b.as_bytes() - } - - let expected = $inp; - let bytes = as_bytes(&expected); - - tag_bytes!($i,bytes) - } - ); - ); - - macro_rules! tag_bytes ( - ($i:expr, $bytes: expr) => ( - { - use std::cmp::min; - let len = $i.len(); - let blen = $bytes.len(); - let m = min(len, blen); - let reduced = &$i[..m]; - let b = &$bytes[..m]; - - let res: $crate::IResult<_,_> = if reduced != b { - $crate::IResult::Error($crate::Err::Position($crate::ErrorKind::Tag, $i)) - } else if m < blen { - $crate::IResult::Incomplete($crate::Needed::Size(blen)) - } else { - $crate::IResult::Done(&$i[blen..], reduced) - }; - res - } - ); - ); - - macro_rules! take( - ($i:expr, $count:expr) => ( - { - let cnt = $count as usize; - let res:$crate::IResult<&[u8],&[u8]> = if $i.len() < cnt { - $crate::IResult::Incomplete($crate::Needed::Size(cnt)) - } else { - $crate::IResult::Done(&$i[cnt..],&$i[0..cnt]) - }; - res - } - ); - ); - - - mod pub_named_mod { - named!(pub tst, tag!("abcd")); - } - - #[test] - fn pub_named_test() { - let a = &b"abcd"[..]; - let res = pub_named_mod::tst(a); - assert_eq!(res, Done(&b""[..], a)); - } - - #[test] - fn apply_test() { - fn sum2(a:u8, b:u8) -> u8 { a + b } - fn sum3(a:u8, b:u8, c:u8) -> u8 { a + b + c } - let a = apply!(1, sum2, 2); - let b = apply!(1, sum3, 2, 3); - - assert_eq!(a, 3); - assert_eq!(b, 6); - } - - #[derive(PartialEq,Eq,Debug)] - struct B { - a: u8, - b: u8 - } - - #[test] - fn chain2() { - fn ret_int1(i:&[u8]) -> IResult<&[u8], u8> { Done(i,1) }; - fn ret_int2(i:&[u8]) -> IResult<&[u8], u8> { Done(i,2) }; - named!(f<&[u8],B>, - chain!( - tag!("abcd") ~ - tag!("abcd")? ~ - aa: ret_int1 ~ - tag!("efgh") ~ - bb: ret_int2 ~ - tag!("efgh") , - ||{B{a: aa, b: bb}} - ) - ); - - let r = f(&b"abcdabcdefghefghX"[..]); - assert_eq!(r, Done(&b"X"[..], B{a: 1, b: 2})); - - let r2 = f(&b"abcdefghefghX"[..]); - assert_eq!(r2, Done(&b"X"[..], B{a: 1, b: 2})); - } - - #[test] - fn nested_chain() { - fn ret_int1(i:&[u8]) -> IResult<&[u8], u8> { Done(i,1) }; - fn ret_int2(i:&[u8]) -> IResult<&[u8], u8> { Done(i,2) }; - named!(f<&[u8],B>, - chain!( - chain!( - tag!("abcd") ~ - tag!("abcd")? , - || {} - ) ~ - aa: ret_int1 ~ - tag!("efgh") ~ - bb: ret_int2 ~ - tag!("efgh") , - ||{B{a: aa, b: bb}} - ) - ); - - let r = f(&b"abcdabcdefghefghX"[..]); - assert_eq!(r, Done(&b"X"[..], B{a: 1, b: 2})); - - let r2 = f(&b"abcdefghefghX"[..]); - assert_eq!(r2, Done(&b"X"[..], B{a: 1, b: 2})); - } - - #[derive(PartialEq,Eq,Debug)] - struct C { - a: u8, - b: Option - } - - #[test] - fn chain_mut() { - fn ret_b1_2(i:&[u8]) -> IResult<&[u8], B> { Done(i,B{a:1,b:2}) }; - named!(f<&[u8],B>, - chain!( - tag!("abcd") ~ - tag!("abcd")? ~ - tag!("efgh") ~ - mut bb: ret_b1_2 ~ - tag!("efgh") , - ||{ - bb.b = 3; - bb - } - ) - ); - - let r = f(&b"abcdabcdefghefghX"[..]); - assert_eq!(r, Done(&b"X"[..], B{a: 1, b: 3})); - } - - #[test] - fn chain_opt() { - named!(y, tag!("efgh")); - fn ret_int1(i:&[u8]) -> IResult<&[u8], u8> { Done(i,1) }; - named!(ret_y<&[u8], u8>, map!(y, |_| 2)); - - named!(f<&[u8],C>, - chain!( - tag!("abcd") ~ - aa: ret_int1 ~ - bb: ret_y? , - ||{C{a: aa, b: bb}} - ) - ); - - let r = f(&b"abcdefghX"[..]); - assert_eq!(r, Done(&b"X"[..], C{a: 1, b: Some(2)})); - - let r2 = f(&b"abcdWXYZ"[..]); - assert_eq!(r2, Done(&b"WXYZ"[..], C{a: 1, b: None})); - - let r3 = f(&b"abcdX"[..]); - assert_eq!(r3, Done(&b"X"[..], C{a: 1, b: None})); - } - - use util::{error_to_list, add_error_pattern, print_error}; - - fn error_to_string

(e: &Err

) -> &'static str { - let v:Vec = error_to_list(e); - // do it this way if you can use slice patterns - /* - match &v[..] { - [ErrorKind::Custom(42), ErrorKind::Tag] => "missing `ijkl` tag", - [ErrorKind::Custom(42), ErrorKind::Custom(128), ErrorKind::Tag] => "missing `mnop` tag after `ijkl`", - _ => "unrecognized error" - } - */ - if &v[..] == [ErrorKind::Custom(42),ErrorKind::Tag] { - "missing `ijkl` tag" - } else if &v[..] == [ErrorKind::Custom(42), ErrorKind::Custom(128), ErrorKind::Tag] { - "missing `mnop` tag after `ijkl`" - } else { - "unrecognized error" - } - } - - // do it this way if you can use box patterns - /*use std::str; - fn error_to_string(e:Err) -> String - match e { - NodePosition(ErrorKind::Custom(42), i1, box Position(ErrorKind::Tag, i2)) => { - format!("missing `ijkl` tag, found '{}' instead", str::from_utf8(i2).unwrap()) - }, - NodePosition(ErrorKind::Custom(42), i1, box NodePosition(ErrorKind::Custom(128), i2, box Position(ErrorKind::Tag, i3))) => { - format!("missing `mnop` tag after `ijkl`, found '{}' instead", str::from_utf8(i3).unwrap()) - }, - _ => "unrecognized error".to_string() - } - }*/ - use std::collections; - #[test] - fn err() { - named!(err_test, alt!( - tag!("abcd") | - preceded!(tag!("efgh"), error!(ErrorKind::Custom(42), - chain!( - tag!("ijkl") ~ - res: error!(ErrorKind::Custom(128), tag!("mnop")) , - || { res } - ) - ) - ) - )); - let a = &b"efghblah"[..]; - let b = &b"efghijklblah"[..]; - let c = &b"efghijklmnop"[..]; - - let blah = &b"blah"[..]; - - let res_a = err_test(a); - let res_b = err_test(b); - let res_c = err_test(c); - assert_eq!(res_a, Error(NodePosition(ErrorKind::Custom(42), blah, Box::new(Position(ErrorKind::Tag, blah))))); - assert_eq!(res_b, Error(NodePosition(ErrorKind::Custom(42), &b"ijklblah"[..], Box::new(NodePosition(ErrorKind::Custom(128), blah, Box::new(Position(ErrorKind::Tag, blah))))))); - assert_eq!(res_c, Done(&b""[..], &b"mnop"[..])); - - // Merr-like error matching - let mut err_map = collections::HashMap::new(); - assert!(add_error_pattern(&mut err_map, err_test(&b"efghpouet"[..]), "missing `ijkl` tag")); - assert!(add_error_pattern(&mut err_map, err_test(&b"efghijklpouet"[..]), "missing `mnop` tag after `ijkl`")); - - let res_a2 = res_a.clone(); - match res_a { - Error(e) => { - assert_eq!(error_to_list(&e), [ErrorKind::Custom(42), ErrorKind::Tag]); - assert_eq!(error_to_string(&e), "missing `ijkl` tag"); - assert_eq!(err_map.get(&error_to_list(&e)), Some(&"missing `ijkl` tag")); - }, - _ => panic!() - }; - - let res_b2 = res_b.clone(); - match res_b { - Error(e) => { - assert_eq!(error_to_list(&e), [ErrorKind::Custom(42), ErrorKind::Custom(128), ErrorKind::Tag]); - assert_eq!(error_to_string(&e), "missing `mnop` tag after `ijkl`"); - assert_eq!(err_map.get(&error_to_list(&e)), Some(&"missing `mnop` tag after `ijkl`")); - }, - _ => panic!() - }; - - print_error(a, res_a2); - print_error(b, res_b2); - } - - #[test] - fn add_err() { - named!(err_test, - preceded!(tag!("efgh"), add_error!(ErrorKind::Custom(42), - chain!( - tag!("ijkl") ~ - res: add_error!(ErrorKind::Custom(128), tag!("mnop")) , - || { res } - ) - ) - )); - let a = &b"efghblah"[..]; - let b = &b"efghijklblah"[..]; - let c = &b"efghijklmnop"[..]; - - let blah = &b"blah"[..]; - - let res_a = err_test(a); - let res_b = err_test(b); - let res_c = err_test(c); - assert_eq!(res_a, Error(NodePosition(ErrorKind::Custom(42), blah, Box::new(Position(ErrorKind::Tag, blah))))); - assert_eq!(res_b, Error(NodePosition(ErrorKind::Custom(42), &b"ijklblah"[..], Box::new(NodePosition(ErrorKind::Custom(128), blah, Box::new(Position(ErrorKind::Tag, blah))))))); - assert_eq!(res_c, Done(&b""[..], &b"mnop"[..])); - } - - #[test] - fn complete() { - named!(err_test, - chain!( - tag!("ijkl") ~ - res: complete!(tag!("mnop")) , - || { res } - ) - ); - let a = &b"ijklmn"[..]; - - let res_a = err_test(a); - assert_eq!(res_a, Error(Position(ErrorKind::Complete, &b"mn"[..]))); - } - #[test] - fn alt() { - fn work(input: &[u8]) -> IResult<&[u8],&[u8], &'static str> { - Done(&b""[..], input) - } - - #[allow(unused_variables)] - fn dont_work(input: &[u8]) -> IResult<&[u8],&[u8],&'static str> { - Error(Code(ErrorKind::Custom("abcd"))) - } - - fn work2(input: &[u8]) -> IResult<&[u8],&[u8], &'static str> { - Done(input, &b""[..]) - } - - fn alt1(i:&[u8]) -> IResult<&[u8],&[u8], &'static str> { - alt!(i, dont_work | dont_work) - } - fn alt2(i:&[u8]) -> IResult<&[u8],&[u8], &'static str> { - alt!(i, dont_work | work) - } - fn alt3(i:&[u8]) -> IResult<&[u8],&[u8], &'static str> { - alt!(i, dont_work | dont_work | work2 | dont_work) - } - //named!(alt1, alt!(dont_work | dont_work)); - //named!(alt2, alt!(dont_work | work)); - //named!(alt3, alt!(dont_work | dont_work | work2 | dont_work)); - - let a = &b"abcd"[..]; - assert_eq!(alt1(a), Error(Position(ErrorKind::Alt, a))); - assert_eq!(alt2(a), Done(&b""[..], a)); - assert_eq!(alt3(a), Done(a, &b""[..])); - - named!(alt4, alt!(tag!("abcd") | tag!("efgh"))); - let b = &b"efgh"[..]; - assert_eq!(alt4(a), Done(&b""[..], a)); - assert_eq!(alt4(b), Done(&b""[..], b)); - - // test the alternative syntax - named!(alt5, alt!(tag!("abcd") => { |_| false } | tag!("efgh") => { |_| true })); - assert_eq!(alt5(a), Done(&b""[..], false)); - assert_eq!(alt5(b), Done(&b""[..], true)); - - } - - #[test] - fn alt_incomplete() { - named!(alt1, alt!(tag!("a") | tag!("bc") | tag!("def"))); - - let a = &b""[..]; - assert_eq!(alt1(a), Incomplete(Needed::Size(1))); - let a = &b"b"[..]; - assert_eq!(alt1(a), Incomplete(Needed::Size(2))); - let a = &b"bcd"[..]; - assert_eq!(alt1(a), Done(&b"d"[..], &b"bc"[..])); - let a = &b"cde"[..]; - assert_eq!(alt1(a), Error(Position(ErrorKind::Alt, a))); - let a = &b"de"[..]; - assert_eq!(alt1(a), Incomplete(Needed::Size(3))); - let a = &b"defg"[..]; - assert_eq!(alt1(a), Done(&b"g"[..], &b"def"[..])); - } - - #[test] - fn alt_complete() { - named!(ac<&[u8], &[u8]>, - alt_complete!(tag!("abcd") | tag!("ef") | tag!("ghi") | tag!("kl")) - ); - - let a = &b""[..]; - assert_eq!(ac(a), Incomplete(Needed::Size(2))); - let a = &b"ef"[..]; - assert_eq!(ac(a), Done(&b""[..], &b"ef"[..])); - let a = &b"cde"[..]; - assert_eq!(ac(a), Error(Position(ErrorKind::Alt, a))); - } - - #[test] - fn switch() { - named!(sw, - switch!(take!(4), - b"abcd" => take!(2) | - b"efgh" => take!(4) - ) - ); - - let a = &b"abcdefgh"[..]; - assert_eq!(sw(a), Done(&b"gh"[..], &b"ef"[..])); - - let b = &b"efghijkl"[..]; - assert_eq!(sw(b), Done(&b""[..], &b"ijkl"[..])); - let c = &b"afghijkl"[..]; - assert_eq!(sw(c), Error(Position(ErrorKind::Switch, &b"afghijkl"[..]))); - } - - #[test] - fn opt() { - named!(opt_abcd<&[u8],Option<&[u8]> >, opt!(tag!("abcd"))); - - let a = &b"abcdef"[..]; - let b = &b"bcdefg"[..]; - let c = &b"ab"[..]; - assert_eq!(opt_abcd(a), Done(&b"ef"[..], Some(&b"abcd"[..]))); - assert_eq!(opt_abcd(b), Done(&b"bcdefg"[..], None)); - assert_eq!(opt_abcd(c), Incomplete(Needed::Size(4))); - } - - #[test] - fn opt_res() { - named!(opt_res_abcd<&[u8], Result<&[u8], Err<&[u8]>> >, opt_res!(tag!("abcd"))); - - let a = &b"abcdef"[..]; - let b = &b"bcdefg"[..]; - let c = &b"ab"[..]; - assert_eq!(opt_res_abcd(a), Done(&b"ef"[..], Ok(&b"abcd"[..]))); - assert_eq!(opt_res_abcd(b), Done(&b"bcdefg"[..], Err(Position(ErrorKind::Tag, b)))); - assert_eq!(opt_res_abcd(c), Incomplete(Needed::Size(4))); - } - - #[test] - fn cond() { - let b = true; - let f: Box IResult<&[u8],Option<&[u8]>, &str>> = Box::new(closure!(&'static [u8], cond!( b, tag!("abcd") ) )); - - let a = b"abcdef"; - assert_eq!(f(&a[..]), Done(&b"ef"[..], Some(&b"abcd"[..]))); - - let b2 = false; - let f2: Box IResult<&[u8],Option<&[u8]>, &str>> = Box::new(closure!(&'static [u8], cond!( b2, tag!("abcd") ) )); - //let f2 = closure!(&'static [u8], cond!( b2, tag!("abcd") ) ); - - assert_eq!(f2(&a[..]), Done(&b"abcdef"[..], None)); - } - - #[test] - fn cond_wrapping() { - // Test that cond!() will wrap a given identifier in the call!() macro. - - named!(silly, tag!("foo")); - - let b = true; - //let f = closure!(&'static [u8], cond!( b, silly ) ); - let f: Box IResult<&[u8],Option<&[u8]>, &str>> = Box::new(closure!(&'static [u8], cond!( b, silly ) )); - assert_eq!(f(b"foobar"), Done(&b"bar"[..], Some(&b"foo"[..]))); - } - - #[test] - fn peek() { - named!(ptag<&[u8],&[u8]>, peek!(tag!("abcd"))); - - let r1 = ptag(&b"abcdefgh"[..]); - assert_eq!(r1, Done(&b"abcdefgh"[..], &b"abcd"[..])); - - let r1 = ptag(&b"efgh"[..]); - assert_eq!(r1, Error(Position(ErrorKind::Tag,&b"efgh"[..]))); - } - - #[test] - fn pair() { - named!(p<&[u8],(&[u8], &[u8])>, pair!(tag!("abcd"), tag!("efgh"))); - - let r1 = p(&b"abcdefghijkl"[..]); - assert_eq!(r1, Done(&b"ijkl"[..], (&b"abcd"[..], &b"efgh"[..]))); - } - - #[test] - fn separated_pair() { - named!(p<&[u8],(&[u8], &[u8])>, separated_pair!(tag!("abcd"), tag!(","), tag!("efgh"))); - - let r1 = p(&b"abcd,efghijkl"[..]); - assert_eq!(r1, Done(&b"ijkl"[..], (&b"abcd"[..], &b"efgh"[..]))); - } - - #[test] - fn preceded() { - named!(p<&[u8], &[u8]>, preceded!(tag!("abcd"), tag!("efgh"))); - - let r1 = p(&b"abcdefghijkl"[..]); - assert_eq!(r1, Done(&b"ijkl"[..], &b"efgh"[..])); - } - - #[test] - fn terminated() { - named!(p<&[u8], &[u8]>, terminated!(tag!("abcd"), tag!("efgh"))); - - let r1 = p(&b"abcdefghijkl"[..]); - assert_eq!(r1, Done(&b"ijkl"[..], &b"abcd"[..])); - } - - #[test] - fn delimited() { - named!(p<&[u8], &[u8]>, delimited!(tag!("abcd"), tag!("efgh"), tag!("ij"))); - - let r1 = p(&b"abcdefghijkl"[..]); - assert_eq!(r1, Done(&b"kl"[..], &b"efgh"[..])); - } - - #[test] - fn separated_list() { - named!(multi<&[u8],Vec<&[u8]> >, separated_list!(tag!(","), tag!("abcd"))); - named!(multi_empty<&[u8],Vec<&[u8]> >, separated_list!(tag!(","), tag!(""))); - - let a = &b"abcdef"[..]; - let b = &b"abcd,abcdef"[..]; - let c = &b"azerty"[..]; - let d = &b",,abc"[..]; - - let res1 = vec![&b"abcd"[..]]; - assert_eq!(multi(a), Done(&b"ef"[..], res1)); - let res2 = vec![&b"abcd"[..], &b"abcd"[..]]; - assert_eq!(multi(b), Done(&b"ef"[..], res2)); - assert_eq!(multi(c), Done(&b"azerty"[..], Vec::new())); - let res3 = vec![&b""[..], &b""[..], &b""[..]]; - //assert_eq!(multi_empty(d), Done(&b"abc"[..], res3)); - } - - #[test] - fn separated_nonempty_list() { - named!(multi<&[u8],Vec<&[u8]> >, separated_nonempty_list!(tag!(","), tag!("abcd"))); - - let a = &b"abcdef"[..]; - let b = &b"abcd,abcdef"[..]; - let c = &b"azerty"[..]; - - let res1 = vec![&b"abcd"[..]]; - assert_eq!(multi(a), Done(&b"ef"[..], res1)); - let res2 = vec![&b"abcd"[..], &b"abcd"[..]]; - assert_eq!(multi(b), Done(&b"ef"[..], res2)); - assert_eq!(multi(c), Error(Position(ErrorKind::Tag,c))); - } - - #[test] - fn many0() { - named!(multi<&[u8],Vec<&[u8]> >, many0!(tag!("abcd"))); - - let a = &b"abcdef"[..]; - let b = &b"abcdabcdefgh"[..]; - let c = &b"azerty"[..]; - let d = &b"abcdab"[..]; - - let res1 = vec![&b"abcd"[..]]; - assert_eq!(multi(a), Done(&b"ef"[..], res1)); - let res2 = vec![&b"abcd"[..], &b"abcd"[..]]; - assert_eq!(multi(b), Done(&b"efgh"[..], res2)); - assert_eq!(multi(c), Done(&b"azerty"[..], Vec::new())); - assert_eq!(multi(d), Incomplete(Needed::Size(8))); - } - - #[cfg(feature = "nightly")] - use test::Bencher; - - #[cfg(feature = "nightly")] - #[bench] - fn many0_bench(b: &mut Bencher) { - named!(multi<&[u8],Vec<&[u8]> >, many0!(tag!("abcd"))); - b.iter(|| { - multi(&b"abcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcd"[..]) - }); - } - - #[test] - fn many1() { - named!(multi<&[u8],Vec<&[u8]> >, many1!(tag!("abcd"))); - - let a = &b"abcdef"[..]; - let b = &b"abcdabcdefgh"[..]; - let c = &b"azerty"[..]; - let d = &b"abcdab"[..]; - - let res1 = vec![&b"abcd"[..]]; - assert_eq!(multi(a), Done(&b"ef"[..], res1)); - let res2 = vec![&b"abcd"[..], &b"abcd"[..]]; - assert_eq!(multi(b), Done(&b"efgh"[..], res2)); - assert_eq!(multi(c), Error(Position(ErrorKind::Many1,c))); - assert_eq!(multi(d), Incomplete(Needed::Size(8))); - } - - #[test] - fn infinite_many() { - fn tst(input: &[u8]) -> IResult<&[u8], &[u8]> { - println!("input: {:?}", input); - Error(Position(ErrorKind::Custom(0),input)) - } - - // should not go into an infinite loop - named!(multi0<&[u8],Vec<&[u8]> >, many0!(tst)); - let a = &b"abcdef"[..]; - assert_eq!(multi0(a), Done(a, Vec::new())); - - named!(multi1<&[u8],Vec<&[u8]> >, many1!(tst)); - let a = &b"abcdef"[..]; - assert_eq!(multi1(a), Error(Position(ErrorKind::Many1,a))); - } - - #[test] - fn many_m_n() { - named!(multi<&[u8],Vec<&[u8]> >, many_m_n!(2, 4, tag!("Abcd"))); - - let a = &b"Abcdef"[..]; - let b = &b"AbcdAbcdefgh"[..]; - let c = &b"AbcdAbcdAbcdAbcdefgh"[..]; - let d = &b"AbcdAbcdAbcdAbcdAbcdefgh"[..]; - let e = &b"AbcdAb"[..]; - - assert_eq!(multi(a), Error(Err::Position(ErrorKind::ManyMN,a))); - let res1 = vec![&b"Abcd"[..], &b"Abcd"[..]]; - assert_eq!(multi(b), Done(&b"efgh"[..], res1)); - let res2 = vec![&b"Abcd"[..], &b"Abcd"[..], &b"Abcd"[..], &b"Abcd"[..]]; - assert_eq!(multi(c), Done(&b"efgh"[..], res2)); - let res3 = vec![&b"Abcd"[..], &b"Abcd"[..], &b"Abcd"[..], &b"Abcd"[..]]; - assert_eq!(multi(d), Done(&b"Abcdefgh"[..], res3)); - assert_eq!(multi(e), Incomplete(Needed::Size(8))); - } - - #[test] - fn count() { - fn counter(input: &[u8]) -> IResult<&[u8], Vec<&[u8]>> { - let size: usize = 2; - count!(input, tag!( "abcd" ), size ) - } - - let a = b"abcdabcdabcdef"; - let b = b"abcdefgh"; - let res = vec![&b"abcd"[..], &b"abcd"[..]]; - - assert_eq!(counter(&a[..]), Done(&b"abcdef"[..], res)); - assert_eq!(counter(&b[..]), Error(Position(ErrorKind::Count, &b[..]))); - } - - #[test] - fn count_zero() { - const TIMES: usize = 0; - named!( tag_abc, tag!("abc") ); - named!( counter_2<&[u8], Vec<&[u8]> >, count!(tag_abc, TIMES ) ); - - let done = &b"abcabcabcdef"[..]; - let parsed_done = Vec::new(); - let rest = done; - let incomplete_1 = &b"ab"[..]; - let parsed_incompl_1 = Vec::new(); - let incomplete_2 = &b"abcab"[..]; - let parsed_incompl_2 = Vec::new(); - let error = &b"xxx"[..]; - let error_remain = &b"xxx"[..]; - let parsed_err = Vec::new(); - let error_1 = &b"xxxabcabcdef"[..]; - let parsed_err_1 = Vec::new(); - let error_1_remain = &b"xxxabcabcdef"[..]; - let error_2 = &b"abcxxxabcdef"[..]; - let parsed_err_2 = Vec::new(); - let error_2_remain = &b"abcxxxabcdef"[..]; - - assert_eq!(counter_2(done), Done(rest, parsed_done)); - assert_eq!(counter_2(incomplete_1), Done(incomplete_1, parsed_incompl_1)); - assert_eq!(counter_2(incomplete_2), Done(incomplete_2, parsed_incompl_2)); - assert_eq!(counter_2(error), Done(error_remain, parsed_err)); - assert_eq!(counter_2(error_1), Done(error_1_remain, parsed_err_1)); - assert_eq!(counter_2(error_2), Done(error_2_remain, parsed_err_2)); - } - - #[test] - fn count_fixed() { - //named!(counter< [&[u8]; 2], u32 >, count_fixed!( &[u8], tag!( "abcd" ), 2 ) ); - fn counter(input:&[u8]) -> IResult<&[u8], [&[u8]; 2], () > { - count_fixed!(input, &[u8], tag!( "abcd" ), 2 ) - } - - let a = b"abcdabcdabcdef"; - let b = b"abcdefgh"; - let res = [&b"abcd"[..], &b"abcd"[..]]; - - assert_eq!(counter(&a[..]), Done(&b"abcdef"[..], res)); - assert_eq!(counter(&b[..]), Error(Position(ErrorKind::Count, &b[..]))); - } - - use nom::{le_u16,eof}; - #[allow(dead_code)] - pub fn compile_count_fixed(input: &[u8]) -> IResult<&[u8], ()> { - chain!(input, - tag!("abcd") ~ - count_fixed!( u16, le_u16, 4 ) ~ - eof , - || { () } - ) - } - - #[test] - fn count_fixed_no_type() { - const TIMES: usize = 2; - named!( tag_abc, tag!("abc") ); - named!( counter_2<&[u8], [&[u8]; TIMES], () >, count_fixed!(&[u8], tag_abc, TIMES ) ); - - let done = &b"abcabcabcdef"[..]; - let parsed_main = [&b"abc"[..], &b"abc"[..]]; - let rest = &b"abcdef"[..]; - let incomplete_1 = &b"ab"[..]; - let incomplete_2 = &b"abcab"[..]; - let error = &b"xxx"[..]; - let error_1 = &b"xxxabcabcdef"[..]; - let error_1_remain = &b"xxxabcabcdef"[..]; - let error_2 = &b"abcxxxabcdef"[..]; - let error_2_remain = &b"abcxxxabcdef"[..]; - - assert_eq!(counter_2(done), Done(rest, parsed_main)); - assert_eq!(counter_2(incomplete_1), Incomplete(Needed::Unknown)); - assert_eq!(counter_2(incomplete_2), Incomplete(Needed::Unknown)); - assert_eq!(counter_2(error), Error(Position(ErrorKind::Count, error))); - assert_eq!(counter_2(error_1), Error(Position(ErrorKind::Count, error_1_remain))); - assert_eq!(counter_2(error_2), Error(Position(ErrorKind::Count, error_2_remain))); - } - - use nom::{be_u8,be_u16}; - #[test] - fn length_value_test() { - named!(tst1<&[u8], Vec >, length_value!(be_u8, be_u16)); - named!(tst2<&[u8], Vec >, length_value!(be_u8, be_u16, 2)); - - let i1 = vec![0, 5, 6]; - let i2 = vec![1, 5, 6, 3]; - let i3 = vec![2, 5, 6, 3]; - let i4 = vec![2, 5, 6, 3, 4, 5, 7]; - let i5 = vec![3, 5, 6, 3, 4, 5]; - - let r1: Vec = Vec::new(); - let r2: Vec = vec![1286]; - let r4: Vec = vec![1286, 772]; - assert_eq!(tst1(&i1), IResult::Done(&i1[1..], r1)); - assert_eq!(tst1(&i2), IResult::Done(&i2[3..], r2)); - assert_eq!(tst1(&i3), IResult::Incomplete(Needed::Size(5))); - assert_eq!(tst1(&i4), IResult::Done(&i4[5..], r4)); - assert_eq!(tst1(&i5), IResult::Incomplete(Needed::Size(7))); - - let r6: Vec = Vec::new(); - let r7: Vec = vec![1286]; - let r9: Vec = vec![1286, 772]; - assert_eq!(tst2(&i1), IResult::Done(&i1[1..], r6)); - assert_eq!(tst2(&i2), IResult::Done(&i2[3..], r7)); - assert_eq!(tst2(&i3), IResult::Incomplete(Needed::Size(5))); - assert_eq!(tst2(&i4), IResult::Done(&i4[5..], r9)); - assert_eq!(tst1(&i5), IResult::Incomplete(Needed::Size(7))); - } - - #[test] - fn chain_incomplete() { - let res = chain!(&b"abcdefgh"[..], - a: take!(4) ~ - b: take!(8), - ||{(a,b )} - ); - - assert_eq!(res, IResult::Incomplete(Needed::Size(12))); - } - - #[test] - fn tuple_test() { - named!(tpl<&[u8], (u16, &[u8], &[u8]) >, - tuple!( - be_u16 , - take!(3), - tag!("fg") - ) - ); - - assert_eq!(tpl(&b"abcdefgh"[..]), Done(&b"h"[..], (0x6162u16, &b"cde"[..], &b"fg"[..]))); - assert_eq!(tpl(&b"abcd"[..]), Incomplete(Needed::Size(5))); - assert_eq!(tpl(&b"abcde"[..]), Incomplete(Needed::Size(7))); - let input = &b"abcdejk"[..]; - assert_eq!(tpl(input), Error(Position(ErrorKind::Tag, &input[5..]))); - } -} diff --git a/deps/nom-1.2.0/src/methods.rs b/deps/nom-1.2.0/src/methods.rs deleted file mode 100644 index 6ca3a8d15..000000000 --- a/deps/nom-1.2.0/src/methods.rs +++ /dev/null @@ -1,480 +0,0 @@ -//! Method macro combinators -//! -//! These macros make parsers as methods of structs -//! and that can take methods of structs to call -//! as parsers. -//! -//! There is a trick to make them easier to assemble, -//! combinators are defined like this: -//! -//! ```ignore -//! macro_rules! tag ( -//! ($i:expr, $inp: expr) => ( -//! { -//! ... -//! } -//! ); -//! ); -//! ``` -//! -//! But when used as methods in other combinators, are used -//! like this: -//! -//! ```ignore -//! method!(my_function >, self, tag!("abcd")); -//! ``` -//! -//! Internally, other combinators will rewrite -//! that call to pass the input as second argument: -//! -//! ```ignore -//! macro_rules! method ( -//! ($name:ident<$a:ty>, $self_:ident, $submac:ident!( $($args:tt)* )) => ( -//! fn $name( $self_: $a, i: &[u8] ) -> $crate::IResult<&[u8], &[u8]> { -//! $submac!(i, $($args)*) -//! } -//! ); -//! ); -//! ``` -//! -//! The `method!` macro is similar to the `named!` macro in the macros module. -//! While `named!` will create a parser function, `method!` will create a parser -//! method on the struct it is defined in. -//! -//! Compared to the `named!` macro there are a few differences in how they are -//! invoked. A `method!` invocation always has to have the type of `self` -//! declared and it can't be a reference due to Rust's borrow lifetime -//! restrictions: -//! ```ignore -//! // -`self`'s type- -//! method!(method_name< Parser<'a> >, ...); -//! ``` -//! `self`'s type always comes first. -//! The next difference is you have to input the self struct. Due to Rust's -//! macro hygiene the macro can't declare it on it's own. -//! ```ignore -//! // -self- -//! method!(method_name, &'a str, &'a str>, self, ...); -//! ``` -//! When making a parsing struct with parsing methods, due to the static borrow -//! checker,calling any parsing methods on self (or any other parsing struct) -//! will cause self to be moved for the rest of the method.To get around this -//! restriction all self is moved into the called method and then the called -//! method will return self to the caller. -//! -//! To call a method on self you need to use the `call_m!` macro. For example: -//! ```ignore -//! struct<'a> Parser<'a> { -//! parsed: &'a str, -//! } -//! impl<'a> Parser<'a> { -//! // Constructor omitted for brevity -//! method!(take4, &'a str, &'a str>, self, take!(4)); -//! method!(caller, &'a str, &'a str>, self, call_m!(self.take4)); -//! } -//! ``` -//! More complicated combinations still mostly look the same as their `named!` -//! counterparts: -//! ```ignore -//! method!(pub simple_chain<&mut Parser<'a>, &'a str, &'a str>, self, -//! chain!( -//! call_m!(self.tag_abc) ~ -//! call_m!(self.tag_def) ~ -//! call_m!(self.tag_ghi) ~ -//! last: call_m!(self.simple_peek) , -//! ||{sb.parsed = last; last} -//! ) -//! ); -//! ``` -//! The three additions to method definitions to remember are: -//! 1. Specify `self`'s type -//! 2. Pass `self` to the macro -//! 4. Call parser methods using the `call_m!` macro. - -/// Makes a method from a parser combination -/// -/// The must be set up because the compiler needs -/// the information -/// -/// ```ignore -/// method!(my_function >( &[u8] ) -> &[u8], tag!("abcd")); -/// // first type parameter is `self`'s type, second is input, third is output -/// method!(my_function, &[u8], &[u8]>, tag!("abcd")); -/// //prefix them with 'pub' to make the methods public -/// method!(pub my_function,&[u8], &[u8]>, tag!("abcd")); -/// ``` -#[macro_export] -macro_rules! method ( - // Non-public immutable self - ($name:ident<$a:ty>( $i:ty ) -> $o:ty, $self_:ident, $submac:ident!( $($args:tt)* )) => ( - fn $name( $self_: $a, i: $i ) -> ($a, $crate::IResult<$i,$o,u32>) { - let result = $submac!(i, $($args)*); - ($self_, result) - } - ); - ($name:ident<$a:ty,$i:ty,$o:ty,$e:ty>, $self_:ident, $submac:ident!( $($args:tt)* )) => ( - fn $name( $self_: $a, i: $i ) -> ($a, $crate::IResult<$i, $o, $e>) { - let result = $submac!(i, $($args)*); - ($self_, result) - } - ); - ($name:ident<$a:ty,$i:ty,$o:ty>, $self_:ident, $submac:ident!( $($args:tt)* )) => ( - fn $name( $self_: $a, i: $i ) -> ($a, $crate::IResult<$i,$o,u32>) { - let result = $submac!(i, $($args)*); - ($self_, result) - } - ); - ($name:ident<$a:ty,$o:ty>, $self_:ident, $submac:ident!( $($args:tt)* )) => ( - fn $name<'a>( $self_: $a, i: &'a[u8] ) -> ($a, $crate::IResult<&'a [u8], $o, u32>) { - let result = $submac!(i, $($args)*); - ($self_, result) - } - ); - ($name:ident<$a:ty>, $self_:ident, $submac:ident!( $($args:tt)* )) => ( - fn $name( $self_: $a, i: &[u8] ) -> ($a, $crate::IResult<&[u8], &[u8], u32>) { - let result = $submac!(i, $($args)*); - ($self_, result) - } - ); - // Public immutable self - (pub $name:ident<$a:ty>( $i:ty ) -> $o:ty, $self_:ident, $submac:ident!( $($args:tt)* )) => ( - pub fn $name( $self_: $a, i: $i ) -> ($a, $crate::IResult<$i,$o,u32>) { - let result = $submac!(i, $($args)*); - ($self_, result) - } - ); - (pub $name:ident<$a:ty,$i:ty,$o:ty,$e:ty>, $self_:ident, $submac:ident!( $($args:tt)* )) => ( - fn $name( $self_: $a, i: $i ) -> ($a, $crate::IResult<$i, $o, $e>) { - let result = $submac!(i, $($args)*); - ($self_, result) - } - ); - (pub $name:ident<$a:ty,$i:ty,$o:ty>, $self_:ident, $submac:ident!( $($args:tt)* )) => ( - pub fn $name( $self_: $a,i: $i ) -> ($a, $crate::IResult<$i,$o,u32>) { - let result = $submac!(i, $($args)*); - ($self_, result) - } - ); - (pub $name:ident<$a:ty,$o:ty>, $self_:ident, $submac:ident!( $($args:tt)* )) => ( - pub fn $name<'a>( $self_: $a, i: &'a[u8] ) -> ($a, $crate::IResult<&'a [u8], $o, u32>) { - let result = $submac!(i, $($args)*); - ($self_, result) - } - ); - (pub $name:ident<$a:ty>, $self_:ident, $submac:ident!( $($args:tt)* )) => ( - pub fn $name( $self_: $a, i: &[u8] ) -> ($a, $crate::IResult<&[u8], &[u8], u32>) { - let result = $submac!(i, $($args)*); - ($self_, result) - } - ); - // Non-public mutable self - ($name:ident<$a:ty>( $i:ty ) -> $o:ty, mut $self_:ident, $submac:ident!( $($args:tt)* )) => ( - fn $name( mut $self_: $a, i: $i ) -> ($a, $crate::IResult<$i,$o,u32>) { - let result = $submac!(i, $($args)*); - ($self_, result) - } - ); - ($name:ident<$a:ty,$i:ty,$o:ty,$e:ty>, mut $self_:ident, $submac:ident!( $($args:tt)* )) => ( - fn $name( mut $self_: $a, i: $i ) -> ($a, $crate::IResult<$i, $o, $e>) { - let result = $submac!(i, $($args)*); - ($self_, result) - } - ); - ($name:ident<$a:ty,$i:ty,$o:ty>, mut $self_:ident, $submac:ident!( $($args:tt)* )) => ( - fn $name( mut $self_: $a, i: $i ) -> ($a, $crate::IResult<$i,$o,u32>) { - let result = $submac!(i, $($args)*); - ($self_, result) - } - ); - ($name:ident<$a:ty,$o:ty>, mut $self_:ident, $submac:ident!( $($args:tt)* )) => ( - fn $name<'a>( mut $self_: $a, i: &'a[u8] ) -> ($a, $crate::IResult<&'a [u8], $o, u32>) { - let result = $submac!(i, $($args)*); - ($self_, result) - } - ); - ($name:ident<$a:ty>, mut $self_:ident, $submac:ident!( $($args:tt)* )) => ( - fn $name( mut $self_: $a, i: &[u8] ) -> ($a, $crate::IResult<&[u8], &[u8], u32>) { - let result = $submac!(i, $($args)*); - ($self_, result) - } - ); - // Public mutable self - (pub $name:ident<$a:ty>( $i:ty ) -> $o:ty, mut $self_:ident, $submac:ident!( $($args:tt)* )) => ( - pub fn $name( mut $self_: $a, i: $i ) -> ($a, $crate::IResult<$i,$o,u32>) { - let result = $submac!(i, $($args)*); - ($self_, result) - } - ); - (pub $name:ident<$a:ty,$i:ty,$o:ty,$e:ty>, mut $self_:ident, $submac:ident!( $($args:tt)* )) => ( - fn $name( mut $self_: $a, i: $i ) -> ($a, $crate::IResult<$i, $o, $e>) { - let result = $submac!(i, $($args)*); - ($self_, result) - } - ); - (pub $name:ident<$a:ty,$i:ty,$o:ty>, mut $self_:ident, $submac:ident!( $($args:tt)* )) => ( - pub fn $name( mut $self_: $a,i: $i ) -> ($a, $crate::IResult<$i,$o,u32>) { - let result = $submac!(i, $($args)*); - ($self_, result) - } - ); - (pub $name:ident<$a:ty,$o:ty>, mut $self_:ident, $submac:ident!( $($args:tt)* )) => ( - pub fn $name<'a>( mut $self_: $a, i: &'a[u8] ) -> ($a, $crate::IResult<&'a [u8], $o, u32>) { - let result = $submac!(i, $($args)*); - ($self_, result) - } - ); - (pub $name:ident<$a:ty>, mut $self_:ident, $submac:ident!( $($args:tt)* )) => ( - pub fn $name( mut $self_: $a, i: &[u8] ) -> ($a, $crate::IResult<&[u8], &[u8], u32>) { - let result = $submac!(i, $($args)*); - ($self_, result) - } - ); -); - -/// Used to called methods then move self back into self -#[macro_export] -macro_rules! call_m ( - ($i:expr, $self_:ident.$method:ident) => ( - { - let (tmp, res) = $self_.$method($i); - $self_ = tmp; - res - } - ); - ($i:expr, $self_:ident.$method:ident, $($args:expr),* ) => ( - { - let (tmp, res) = $self_.$method($i, $($args),*); - $self_ = tmp; - res - } - ); -); - - -/// emulate function currying for method calls on structs -/// `apply!(self.my_function, arg1, arg2, ...)` becomes `self.my_function(input, arg1, arg2, ...)` -/// -/// Supports up to 6 arguments -#[macro_export] -macro_rules! apply_rf ( - ($i:expr, $self_:ident.$method:ident, $($args:expr),* ) => ( { let (tmp, res) = $self_.$method( $i, $($args),* ); $self_ = tmp; res } ); -); - -#[cfg(test)] -mod tests { - use internal::IResult::*; - - // reproduce the tag_s and take_s macros, because of module import order - macro_rules! tag_s ( - ($i:expr, $tag: expr) => ( - { - let res: $crate::IResult<_,_> = if $tag.len() > $i.len() { - $crate::IResult::Incomplete($crate::Needed::Size($tag.len())) - //} else if &$i[0..$tag.len()] == $tag { - } else if ($i).starts_with($tag) { - $crate::IResult::Done(&$i[$tag.len()..], &$i[0..$tag.len()]) - } else { - $crate::IResult::Error($crate::Err::Position($crate::ErrorKind::TagStr, $i)) - }; - res - } - ); - ); - - macro_rules! take_s ( - ($i:expr, $count:expr) => ( - { - let cnt = $count as usize; - let res: $crate::IResult<_,_> = if $i.chars().count() < cnt { - $crate::IResult::Incomplete($crate::Needed::Size(cnt)) - } else { - let mut offset = $i.len(); - let mut count = 0; - for (o, _) in $i.char_indices() { - if count == cnt { - offset = o; - break; - } - count += 1; - } - $crate::IResult::Done(&$i[offset..], &$i[..offset]) - }; - res - } - ); - ); - - struct Parser<'a> { - bcd: &'a str, - } - - impl<'a> Parser<'a> { - pub fn new() -> Parser<'a> { - Parser{bcd: ""} - } - - method!(tag_abc, &'a str, &'a str>, self, tag_s!("áβç")); - method!(tag_bcd >(&'a str) -> &'a str, self, tag_s!("βçδ")); - method!(pub tag_hij >(&'a str) -> &'a str, self, tag_s!("λïJ")); - method!(pub tag_ijk, &'a str, &'a str>, self, tag_s!("ïJƙ")); - method!(take3, &'a str, &'a str>, self, take_s!(3)); - method!(pub simple_call, &'a str, &'a str>, mut self, - call_m!(self.tag_abc) - ); - method!(pub simple_peek, &'a str, &'a str>, mut self, - peek!(call_m!(self.take3)) - ); - method!(pub simple_chain, &'a str, &'a str>, mut self, - chain!( - bcd: call_m!(self.tag_bcd) ~ - last: call_m!(self.simple_peek) , - ||{self.bcd = bcd; last} - ) - ); - fn tag_stuff(mut self: Parser<'a>, input: &'a str, something: &'a str) -> (Parser<'a>, ::IResult<&'a str, &'a str>) { - self.bcd = something; - let(tmp, res) = self.tag_abc(input); - self = tmp; - (self, res) - } - method!(use_apply, &'a str, &'a str>, mut self, apply_rf!(self.tag_stuff, "βçδ")); - } - - #[test] - fn test_method_call_abc() { - let p = Parser::new(); - let input: &str = "áβçδèƒϱλïJƙ"; - let consumed: &str = "áβç"; - let leftover: &str = "δèƒϱλïJƙ"; - let(_, res) = p.tag_abc(input); - match res { - Done(extra, output) => { assert!(extra == leftover, "`Parser.tag_abc` consumed leftover input. leftover: {}", extra); - assert!(output == consumed, "`Parser.tag_abc` doesnt return the string it consumed \ - on success. Expected `{}`, got `{}`.", consumed, output); - }, - other => panic!("`Parser.tag_abc` didn't succeed when it should have. \ - Got `{:?}`.", other), - } - } - - #[test] - fn test_method_call_bcd() { - let p = Parser::new(); - let input: &str = "βçδèƒϱλïJƙ"; - let consumed: &str = "βçδ"; - let leftover: &str = "èƒϱλïJƙ"; - let(_, res) = p.tag_bcd(input); - match res { - Done(extra, output) => { assert!(extra == leftover, "`Parser.tag_bcd` consumed leftover input. leftover: {}", extra); - assert!(output == consumed, "`Parser.tag_bcd` doesn't return the string it consumed \ - on success. Expected `{}`, got `{}`.", consumed, output); - }, - other => panic!("`Parser.tag_bcd` didn't succeed when it should have. \ - Got `{:?}`.", other), - } - } - - #[test] - fn test_method_call_hij() { - let p = Parser::new(); - let input: &str = "λïJƙℓ₥ñôƥ9řƨ"; - let consumed: &str = "λïJ"; - let leftover: &str = "ƙℓ₥ñôƥ9řƨ"; - let(_, res) = p.tag_hij(input); - match res { - Done(extra, output) => { assert!(extra == leftover, "`Parser.tag_hij` consumed leftover input. leftover: {}", extra); - assert!(output == consumed, "`Parser.tag_hij` doesn't return the string it consumed \ - on success. Expected `{}`, got `{}`.", consumed, output); - }, - other => panic!("`Parser.tag_hij` didn't succeed when it should have. \ - Got `{:?}`.", other), - } - } - - #[test] - fn test_method_call_ijk() { - let p = Parser::new(); - let input: &str = "ïJƙℓ₥ñôƥ9řƨ"; - let consumed: &str = "ïJƙ"; - let leftover: &str = "ℓ₥ñôƥ9řƨ"; - let(_, res) = p.tag_ijk(input); - match res { - Done(extra, output) => { assert!(extra == leftover, "`Parser.tag_ijk` consumed leftover input. leftover: {}", extra); - assert!(output == consumed, "`Parser.tag_ijk` doesn't return the string it consumed \ - on success. Expected `{}`, got `{}`.", consumed, output); - }, - other => panic!("`Parser.tag_ijk` didn't succeed when it should have. \ - Got `{:?}`.", other), - } - } - #[test] - fn test_method_simple_call() { - let p = Parser::new(); - let input: &str = "áβçδèƒϱλïJƙ"; - let consumed: &str = "áβç"; - let leftover: &str = "δèƒϱλïJƙ"; - let(_, res) = p.simple_call(input); - match res { - Done(extra, output) => { assert!(extra == leftover, "`Parser.simple_call` consumed leftover input. leftover: {}", extra); - assert!(output == consumed, "`Parser.simple_call` doesn't return the string it consumed \ - on success. Expected `{}`, got `{}`.", consumed, output); - }, - other => panic!("`Parser.simple_call` didn't succeed when it should have. \ - Got `{:?}`.", other), - } - } - - #[test] - fn test_apply_rf() { - let mut p = Parser::new(); - let input: &str = "áβçδèƒϱλïJƙ"; - let consumed: &str = "áβç"; - let leftover: &str = "δèƒϱλïJƙ"; - let(tmp, res) = p.use_apply(input); - p = tmp; - match res { - Done(extra, output) => { assert!(extra == leftover, "`Parser.use_apply` consumed leftover input. leftover: {}", extra); - assert!(output == consumed, "`Parser.use_apply` doesn't return the string it was supposed to \ - on success. Expected `{}`, got `{}`.", leftover, output); - assert!(p.bcd == "βçδ", "Parser.use_apply didn't modify the parser field correctly: {}", p.bcd); - }, - other => panic!("`Parser.use_apply` didn't succeed when it should have. \ - Got `{:?}`.", other), - } - } - - #[test] - fn test_method_call_peek() { - let p = Parser::new(); - let input: &str = "ж¥ƺáβçδèƒϱλïJƙ"; - let consumed: &str = "ж¥ƺ"; - let(_, res) = p.simple_peek(input); - match res { - Done(extra, output) => { assert!(extra == input, "`Parser.simple_peek` consumed leftover input. leftover: {}", extra); - assert!(output == consumed, "`Parser.simple_peek` doesn't return the string it consumed \ - on success. Expected `{}`, got `{}`.", consumed, output); - }, - other => panic!("`Parser.simple_peek` didn't succeed when it should have. \ - Got `{:?}`.", other), - } - } - - #[test] - fn test_method_call_chain() { - let mut p = Parser::new(); - let input : &str = "βçδδèƒϱλïJƙℓ"; - let leftover : &str = "δèƒϱλïJƙℓ"; - let output : &str = "늟"; - let(tmp, res) = p.simple_chain(input); - p = tmp; - match res { - Done(extra, out) => { assert!(extra == leftover, "`Parser.simple_chain` consumed leftover input. leftover: {}", extra); - assert!(out == output, "`Parser.simple_chain` doesn't return the string it was supposed to \ - on success. Expected `{}`, got `{}`.", output, out); - assert!(p.bcd == "βçδ", "Parser.simple_chain didn't modify the parser field correctly: {}", p.bcd); - }, - other => panic!("`Parser.simple_chain` didn't succeed when it should have. \ - Got `{:?}`.", other), - } - } -} diff --git a/deps/nom-1.2.0/src/nom.rs b/deps/nom-1.2.0/src/nom.rs deleted file mode 100644 index 7b6f217b2..000000000 --- a/deps/nom-1.2.0/src/nom.rs +++ /dev/null @@ -1,818 +0,0 @@ -//! Useful parser combinators -//! -//! A number of useful parser combinators have already been implemented. -//! Some of them use macros, other are implemented through functions. -//! Hopefully, the syntax will converge to onely one way in the future, -//! but the macros system makes no promises. -//! - -#[cfg(feature = "core")] -use std::prelude::v1::*; -use std::boxed::Box; - -use std::fmt::Debug; -use internal::*; -use internal::IResult::*; -use internal::Err::*; -use util::{ErrorKind,IterIndices,AsChar,InputLength}; -use std::mem::transmute; - -#[inline] -pub fn tag_cl<'a,'b>(rec:&'a[u8]) -> Box IResult<&'b[u8], &'b[u8]> + 'a> { - Box::new(move |i: &'b[u8]| -> IResult<&'b[u8], &'b[u8]> { - if i.len() >= rec.len() && &i[0..rec.len()] == rec { - Done(&i[rec.len()..], &i[0..rec.len()]) - } else { - Error(Position(ErrorKind::TagClosure, i)) - } - }) -} - -#[cfg(not(feature = "core"))] -#[inline] -pub fn print(input: T) -> IResult { - println!("{:?}", input); - Done(input, ()) -} - -#[inline] -pub fn begin(input: &[u8]) -> IResult<(), &[u8]> { - Done((), input) -} - -// FIXME: when rust-lang/rust#17436 is fixed, macros will be able to export -// public methods -//pub is_not!(line_ending b"\r\n") -pub fn not_line_ending(input:&[u8]) -> IResult<&[u8], &[u8]> { - for (idx, item) in input.iter().enumerate() { - for &i in b"\r\n".iter() { - if *item == i { - return Done(&input[idx..], &input[0..idx]) - } - } - } - Done(b"", input) -} - -named!(tag_ln, tag!("\n")); - -/// Recognizes a line feed -#[inline] -pub fn line_ending(input:&[u8]) -> IResult<&[u8], &[u8]> { - tag_ln(input) -} - -#[inline] -pub fn is_alphabetic(chr:u8) -> bool { - (chr >= 0x41 && chr <= 0x5A) || (chr >= 0x61 && chr <= 0x7A) -} - -#[inline] -pub fn is_digit(chr: u8) -> bool { - chr >= 0x30 && chr <= 0x39 -} - -#[inline] -pub fn is_hex_digit(chr: u8) -> bool { - (chr >= 0x30 && chr <= 0x39) || - (chr >= 0x41 && chr <= 0x46) || - (chr >= 0x61 && chr <= 0x66) -} - -#[inline] -pub fn is_alphanumeric(chr: u8) -> bool { - is_alphabetic(chr) || is_digit(chr) -} - -#[inline] -pub fn is_space(chr:u8) -> bool { - chr == ' ' as u8 || chr == '\t' as u8 -} - -// FIXME: when rust-lang/rust#17436 is fixed, macros will be able to export -//pub filter!(alpha is_alphabetic) -//pub filter!(digit is_digit) -//pub filter!(hex_digit is_hex_digit) -//pub filter!(alphanumeric is_alphanumeric) - -use std::ops::{Index,Range,RangeFrom}; -/// Recognizes lowercase and uppercase alphabetic characters: a-zA-Z -pub fn alpha<'a, T: ?Sized>(input:&'a T) -> IResult<&'a T, &'a T> where - T:Index, Output=T>+Index, Output=T>, - &'a T: IterIndices+InputLength { - let input_length = input.input_len(); - if input_length == 0 { - return Error(Position(ErrorKind::Alpha, input)) - } - - for (idx, item) in input.iter_indices() { - if ! item.is_alpha() { - if idx == 0 { - return Error(Position(ErrorKind::Alpha, input)) - } else { - return Done(&input[idx..], &input[0..idx]) - } - } - } - Done(&input[input_length..], input) -} - -/// Recognizes numerical characters: 0-9 -pub fn digit<'a, T: ?Sized>(input:&'a T) -> IResult<&'a T, &'a T> where - T:Index, Output=T>+Index, Output=T>, - &'a T: IterIndices+InputLength { - let input_length = input.input_len(); - if input_length == 0 { - return Error(Position(ErrorKind::Digit, input)) - } - - for (idx, item) in input.iter_indices() { - if ! item.is_0_to_9() { - if idx == 0 { - return Error(Position(ErrorKind::Digit, input)) - } else { - return Done(&input[idx..], &input[0..idx]) - } - } - } - Done(&input[input_length..], input) -} - -/// Recognizes hexadecimal numerical characters: 0-9, A-F, a-f -pub fn hex_digit<'a, T: ?Sized>(input:&'a T) -> IResult<&'a T, &'a T> where - T:Index, Output=T>+Index, Output=T>, - &'a T: IterIndices+InputLength { - let input_length = input.input_len(); - if input_length == 0 { - return Error(Position(ErrorKind::HexDigit, input)) - } - - for (idx, item) in input.iter_indices() { - if ! item.is_hex_digit() { - if idx == 0 { - return Error(Position(ErrorKind::HexDigit, input)) - } else { - return Done(&input[idx..], &input[0..idx]) - } - } - } - Done(&input[input_length..], input) -} - -/// Recognizes numerical and alphabetic characters: 0-9a-zA-Z -pub fn alphanumeric<'a, T: ?Sized>(input:&'a T) -> IResult<&'a T, &'a T> where - T:Index, Output=T>+Index, Output=T>, - &'a T: IterIndices+InputLength { - let input_length = input.input_len(); - if input_length == 0 { - return Error(Position(ErrorKind::AlphaNumeric, input)); - } - - for (idx, item) in input.iter_indices() { - if ! item.is_alphanum() { - if idx == 0 { - return Error(Position(ErrorKind::AlphaNumeric, input)) - } else { - return Done(&input[idx..], &input[0..idx]) - } - } - } - Done(&input[input_length..], input) -} - -/// Recognizes spaces and tabs -pub fn space<'a, T: ?Sized>(input:&'a T) -> IResult<&'a T, &'a T> where - T:Index, Output=T>+Index, Output=T>, - &'a T: IterIndices+InputLength { - let input_length = input.input_len(); - if input_length == 0 { - return Error(Position(ErrorKind::Space, input)); - } - - for (idx, item) in input.iter_indices() { - let chr = item.as_char(); - if ! (chr == ' ' || chr == '\t') { - if idx == 0 { - return Error(Position(ErrorKind::Space, input)) - } else { - return Done(&input[idx..], &input[0..idx]) - } - } - } - Done(&input[input_length..], input) -} - -/// Recognizes spaces, tabs, carriage returns and line feeds -pub fn multispace<'a, T: ?Sized>(input:&'a T) -> IResult<&'a T, &'a T> where - T:Index, Output=T>+Index, Output=T>, - &'a T: IterIndices+InputLength { - let input_length = input.input_len(); - if input_length == 0 { - return Error(Position(ErrorKind::MultiSpace, input)); - } - - for (idx, item) in input.iter_indices() { - let chr = item.as_char(); - if ! (chr == ' ' || chr == '\t' || chr == '\r' || chr == '\n') { - if idx == 0 { - return Error(Position(ErrorKind::MultiSpace, input)) - } else { - return Done(&input[idx..], &input[0..idx]) - } - } - } - Done(&input[input_length..], input) -} - -pub fn sized_buffer(input:&[u8]) -> IResult<&[u8], &[u8]> { - if input.is_empty() { - return Incomplete(Needed::Unknown) - } - - let len = input[0] as usize; - - if input.len() >= len + 1 { - Done(&input[len+1..], &input[1..len+1]) - } else { - Incomplete(Needed::Size(1 + len)) - } -} - -pub fn length_value(input:&[u8]) -> IResult<&[u8], &[u8]> { - let input_len = input.len(); - if input_len == 0 { - return Error(Position(ErrorKind::LengthValueFn, input)) - } - - let len = input[0] as usize; - if input_len - 1 >= len { - IResult::Done(&input[len+1..], &input[1..len+1]) - } else { - IResult::Incomplete(Needed::Size(1+len)) - } -} - -/// Recognizes an unsigned 1 byte integer (equivalent to take!(1) -#[inline] -pub fn be_u8(i: &[u8]) -> IResult<&[u8], u8> { - if i.len() < 1 { - Incomplete(Needed::Size(1)) - } else { - Done(&i[1..], i[0]) - } -} - -/// Recognizes big endian unsigned 2 bytes integer -#[inline] -pub fn be_u16(i: &[u8]) -> IResult<&[u8], u16> { - if i.len() < 2 { - Incomplete(Needed::Size(2)) - } else { - let res = ((i[0] as u16) << 8) + i[1] as u16; - Done(&i[2..], res) - } -} - -/// Recognizes big endian unsigned 4 bytes integer -#[inline] -pub fn be_u32(i: &[u8]) -> IResult<&[u8], u32> { - if i.len() < 4 { - Incomplete(Needed::Size(4)) - } else { - let res = ((i[0] as u32) << 24) + ((i[1] as u32) << 16) + ((i[2] as u32) << 8) + i[3] as u32; - Done(&i[4..], res) - } -} - -/// Recognizes big endian unsigned 8 bytes integer -#[inline] -pub fn be_u64(i: &[u8]) -> IResult<&[u8], u64> { - if i.len() < 8 { - Incomplete(Needed::Size(8)) - } else { - let res = ((i[0] as u64) << 56) + ((i[1] as u64) << 48) + ((i[2] as u64) << 40) + ((i[3] as u64) << 32) + - ((i[4] as u64) << 24) + ((i[5] as u64) << 16) + ((i[6] as u64) << 8) + i[7] as u64; - Done(&i[8..], res) - } -} - -/// Recognizes a signed 1 byte integer (equivalent to take!(1) -#[inline] -pub fn be_i8(i:&[u8]) -> IResult<&[u8], i8> { - map!(i, be_u8, | x | { x as i8 }) -} - -/// Recognizes big endian signed 2 bytes integer -#[inline] -pub fn be_i16(i:&[u8]) -> IResult<&[u8], i16> { - map!(i, be_u16, | x | { x as i16 }) -} - -/// Recognizes big endian signed 4 bytes integer -#[inline] -pub fn be_i32(i:&[u8]) -> IResult<&[u8], i32> { - map!(i, be_u32, | x | { x as i32 }) -} - -/// Recognizes big endian signed 8 bytes integer -#[inline] -pub fn be_i64(i:&[u8]) -> IResult<&[u8], i64> { - map!(i, be_u64, | x | { x as i64 }) -} - -/// Recognizes an unsigned 1 byte integer (equivalent to take!(1) -#[inline] -pub fn le_u8(i: &[u8]) -> IResult<&[u8], u8> { - if i.len() < 1 { - Incomplete(Needed::Size(1)) - } else { - Done(&i[1..], i[0]) - } -} - -/// Recognizes little endian unsigned 2 bytes integer -#[inline] -pub fn le_u16(i: &[u8]) -> IResult<&[u8], u16> { - if i.len() < 2 { - Incomplete(Needed::Size(2)) - } else { - let res = ((i[1] as u16) << 8) + i[0] as u16; - Done(&i[2..], res) - } -} - -/// Recognizes little endian unsigned 4 bytes integer -#[inline] -pub fn le_u32(i: &[u8]) -> IResult<&[u8], u32> { - if i.len() < 4 { - Incomplete(Needed::Size(4)) - } else { - let res = ((i[3] as u32) << 24) + ((i[2] as u32) << 16) + ((i[1] as u32) << 8) + i[0] as u32; - Done(&i[4..], res) - } -} - -/// Recognizes little endian unsigned 8 bytes integer -#[inline] -pub fn le_u64(i: &[u8]) -> IResult<&[u8], u64> { - if i.len() < 8 { - Incomplete(Needed::Size(8)) - } else { - let res = ((i[7] as u64) << 56) + ((i[6] as u64) << 48) + ((i[5] as u64) << 40) + ((i[4] as u64) << 32) + - ((i[3] as u64) << 24) + ((i[2] as u64) << 16) + ((i[1] as u64) << 8) + i[0] as u64; - Done(&i[8..], res) - } -} - -/// Recognizes a signed 1 byte integer (equivalent to take!(1) -#[inline] -pub fn le_i8(i:&[u8]) -> IResult<&[u8], i8> { - map!(i, le_u8, | x | { x as i8 }) -} - -/// Recognizes little endian signed 2 bytes integer -#[inline] -pub fn le_i16(i:&[u8]) -> IResult<&[u8], i16> { - map!(i, le_u16, | x | { x as i16 }) -} - -/// Recognizes little endian signed 4 bytes integer -#[inline] -pub fn le_i32(i:&[u8]) -> IResult<&[u8], i32> { - map!(i, le_u32, | x | { x as i32 }) -} - -/// Recognizes little endian signed 8 bytes integer -#[inline] -pub fn le_i64(i:&[u8]) -> IResult<&[u8], i64> { - map!(i, le_u64, | x | { x as i64 }) -} - -/// if parameter is true, parse a big endian u16 integer, -/// otherwise a little endian u16 integer -#[macro_export] -macro_rules! u16 ( ($i:expr, $e:expr) => ( {if $e { $crate::be_u16($i) } else { $crate::le_u16($i) } } );); -/// if parameter is true, parse a big endian u32 integer, -/// otherwise a little endian u32 integer -#[macro_export] -macro_rules! u32 ( ($i:expr, $e:expr) => ( {if $e { $crate::be_u32($i) } else { $crate::le_u32($i) } } );); -/// if parameter is true, parse a big endian u64 integer, -/// otherwise a little endian u64 integer -#[macro_export] -macro_rules! u64 ( ($i:expr, $e:expr) => ( {if $e { $crate::be_u64($i) } else { $crate::le_u64($i) } } );); - -/// if parameter is true, parse a big endian i16 integer, -/// otherwise a little endian i16 integer -#[macro_export] -macro_rules! i16 ( ($i:expr, $e:expr) => ( {if $e { $crate::be_i16($i) } else { $crate::le_i16($i) } } );); -/// if parameter is true, parse a big endian i32 integer, -/// otherwise a little endian i32 integer -#[macro_export] -macro_rules! i32 ( ($i:expr, $e:expr) => ( {if $e { $crate::be_i32($i) } else { $crate::le_i32($i) } } );); -/// if parameter is true, parse a big endian i64 integer, -/// otherwise a little endian i64 integer -#[macro_export] -macro_rules! i64 ( ($i:expr, $e:expr) => ( {if $e { $crate::be_i64($i) } else { $crate::le_i64($i) } } );); - -/// Recognizes big endian 4 bytes floating point number -#[inline] -pub fn be_f32(input: &[u8]) -> IResult<&[u8], f32> { - match be_u32(input) { - Error(e) => Error(e), - Incomplete(e) => Incomplete(e), - Done(i,o) => { - unsafe { - Done(i, transmute::(o)) - } - } - } -} - -/// Recognizes big endian 8 bytes floating point number -#[inline] -pub fn be_f64(input: &[u8]) -> IResult<&[u8], f64> { - match be_u64(input) { - Error(e) => Error(e), - Incomplete(e) => Incomplete(e), - Done(i,o) => { - unsafe { - Done(i, transmute::(o)) - } - } - } -} - -/// Recognizes a hex-encoded integer -#[inline] -pub fn hex_u32(input: &[u8]) -> IResult<&[u8], u32> { - match is_a!(input, &b"0123456789abcdef"[..]) { - Error(e) => Error(e), - Incomplete(e) => Incomplete(e), - Done(i,o) => { - let mut res = 0; - for &e in o { - let digit = e as char; - let value = digit.to_digit(16).unwrap_or(0); - res = value + (res << 4); - } - Done(i, res) - } - } -} - -/// Recognizes empty input buffers -/// -/// useful to verify that the previous parsers used all of the input -#[inline] -//pub fn eof(input:&[u8]) -> IResult<&[u8], &[u8]> { -pub fn eof<'a, T:?Sized>(input: &'a T) -> IResult<&'a T,&'a T> where - T:Index, Output=T>+Index, Output=T>, - &'a T: InputLength { - if input.input_len() == 0 { - Done(input, input) - } else { - Error(Position(ErrorKind::Eof, input)) - } -} - -/// Recognizes non empty buffers -#[inline] -pub fn non_empty<'a, T:?Sized>(input: &'a T) -> IResult<&'a T,&'a T> where - T:Index, Output=T>+Index, Output=T>, - &'a T: InputLength { - if input.input_len() == 0 { - Error(Position(ErrorKind::NonEmpty, input)) - } else { - Done(&input[0..0], input) - } -} - -/// Return the remaining input. -#[inline] -pub fn rest(i: &[u8]) -> IResult<&[u8], &[u8]> { - IResult::Done(b"", i) -} - -#[cfg(test)] -mod tests { - use super::*; - use internal::{Needed,IResult}; - use internal::IResult::*; - use internal::Err::*; - use util::ErrorKind; - - #[test] - fn tag_closure() { - let x = tag_cl(&b"abcd"[..]); - let r = x(&b"abcdabcdefgh"[..]); - assert_eq!(r, Done(&b"abcdefgh"[..], &b"abcd"[..])); - - let r2 = x(&b"abcefgh"[..]); - assert_eq!(r2, Error(Position(ErrorKind::TagClosure, &b"abcefgh"[..]))); - } - - #[test] - fn character() { - let empty: &[u8] = b""; - let a: &[u8] = b"abcd"; - let b: &[u8] = b"1234"; - let c: &[u8] = b"a123"; - let d: &[u8] = "azé12".as_bytes(); - let e: &[u8] = b" "; - assert_eq!(alpha(a), Done(empty, a)); - assert_eq!(alpha(b), Error(Position(ErrorKind::Alpha,b))); - assert_eq!(alpha(c), Done(&c[1..], &b"a"[..])); - assert_eq!(alpha(d), Done("é12".as_bytes(), &b"az"[..])); - assert_eq!(digit(a), Error(Position(ErrorKind::Digit,a))); - assert_eq!(digit(b), Done(empty, b)); - assert_eq!(digit(c), Error(Position(ErrorKind::Digit,c))); - assert_eq!(digit(d), Error(Position(ErrorKind::Digit,d))); - assert_eq!(hex_digit(a), Done(empty, a)); - assert_eq!(hex_digit(b), Done(empty, b)); - assert_eq!(hex_digit(c), Done(empty, c)); - assert_eq!(hex_digit(d), Done("zé12".as_bytes(), &b"a"[..])); - assert_eq!(hex_digit(e), Error(Position(ErrorKind::HexDigit,e))); - assert_eq!(alphanumeric(a), Done(empty, a)); - assert_eq!(fix_error!(b,(), alphanumeric), Done(empty, b)); - assert_eq!(alphanumeric(c), Done(empty, c)); - assert_eq!(alphanumeric(d), Done("é12".as_bytes(), &b"az"[..])); - assert_eq!(space(e), Done(&b""[..], &b" "[..])); - } - - #[test] - fn character_s() { - let empty = ""; - let a = "abcd"; - let b = "1234"; - let c = "a123"; - let d = "azé12"; - let e = " "; - assert_eq!(alpha(a), Done(empty, a)); - assert_eq!(alpha(b), Error(Position(ErrorKind::Alpha,b))); - assert_eq!(alpha(c), Done(&c[1..], &"a"[..])); - assert_eq!(alpha(d), Done("12", &"azé"[..])); - assert_eq!(digit(a), Error(Position(ErrorKind::Digit,a))); - assert_eq!(digit(b), Done(empty, b)); - assert_eq!(digit(c), Error(Position(ErrorKind::Digit,c))); - assert_eq!(digit(d), Error(Position(ErrorKind::Digit,d))); - assert_eq!(hex_digit(a), Done(empty, a)); - assert_eq!(hex_digit(b), Done(empty, b)); - assert_eq!(hex_digit(c), Done(empty, c)); - assert_eq!(hex_digit(d), Done("zé12", &"a"[..])); - assert_eq!(hex_digit(e), Error(Position(ErrorKind::HexDigit,e))); - assert_eq!(alphanumeric(a), Done(empty, a)); - assert_eq!(fix_error!(b,(), alphanumeric), Done(empty, b)); - assert_eq!(alphanumeric(c), Done(empty, c)); - assert_eq!(alphanumeric(d), Done("", &"azé12"[..])); - assert_eq!(space(e), Done(&""[..], &" "[..])); - } - - use util::HexDisplay; - #[test] - fn offset() { - let a = &b"abcd"[..]; - let b = &b"1234"[..]; - let c = &b"a123"[..]; - let d = &b" \t"[..]; - let e = &b" \t\r\n"[..]; - let f = &b"123abcDEF"[..]; - - match alpha(a) { - Done(i, _) => { assert_eq!(a.offset(i) + i.len(), a.len()); } - _ => { panic!("wrong return type in offset test for alpha") } - } - match digit(b) { - Done(i, _) => { assert_eq!(b.offset(i) + i.len(), b.len()); } - _ => { panic!("wrong return type in offset test for digit") } - } - match alphanumeric(c) { - Done(i, _) => { assert_eq!(c.offset(i) + i.len(), c.len()); } - _ => { panic!("wrong return type in offset test for alphanumeric") } - } - match space(d) { - Done(i, _) => { assert_eq!(d.offset(i) + i.len(), d.len()); } - _ => { panic!("wrong return type in offset test for space") } - } - match multispace(e) { - Done(i, _) => { assert_eq!(e.offset(i) + i.len(), e.len()); } - _ => { panic!("wrong return type in offset test for multispace") } - } - match hex_digit(f) { - Done(i, _) => { assert_eq!(f.offset(i) + i.len(), f.len()); } - _ => { panic!("wrong return type in offset test for hex_digit") } - } - } - - #[test] - fn is_not() { - let a: &[u8] = b"ab12cd\nefgh"; - assert_eq!(not_line_ending(a), Done(&b"\nefgh"[..], &b"ab12cd"[..])); - - let b: &[u8] = b"ab12cd\nefgh\nijkl"; - assert_eq!(not_line_ending(b), Done(&b"\nefgh\nijkl"[..], &b"ab12cd"[..])); - - let c: &[u8] = b"ab12cd"; - assert_eq!(not_line_ending(c), Done(&b""[..], c)); - } - - #[test] - fn buffer_with_size() { - let i:Vec = vec![7,8]; - let o:Vec = vec![4,5,6]; - //let arr:[u8; 6usize] = [3, 4, 5, 6, 7, 8]; - let arr:[u8; 6usize] = [3, 4, 5, 6, 7, 8]; - let res = sized_buffer(&arr[..]); - assert_eq!(res, Done(&i[..], &o[..])) - } - - /*#[test] - fn t1() { - let v1:Vec = vec![1,2,3]; - let v2:Vec = vec![4,5,6]; - let d = Done(&v1[..], &v2[..]); - let res = d.flat_map(print); - assert_eq!(res, Done(&v2[..], ())); - }*/ - - #[test] - fn length_value_test() { - let i1 = vec![7,8]; - let o1 = vec![4, 5, 6]; - let arr1:[u8; 6usize] = [3, 4, 5, 6, 7, 8]; - let res1 = length_value(&arr1); - assert_eq!(Done(&i1[..], &o1[..]), res1); - - let i2:Vec = vec![4,5,6,7,8]; - let o2: &[u8] = b""; - let arr2:[u8; 6usize] = [0, 4, 5, 6, 7, 8]; - let res2 = length_value(&arr2); - assert_eq!(Done(&i2[..], o2), res2); - - let arr3:[u8; 7usize] = [8, 4, 5, 6, 7, 8, 9]; - let res3 = length_value(&arr3); - //FIXME: should be incomplete - assert_eq!(Incomplete(Needed::Size(9)), res3); - } - - #[test] - fn i8_tests() { - assert_eq!(be_i8(&[0x00]), Done(&b""[..], 0)); - assert_eq!(be_i8(&[0x7f]), Done(&b""[..], 127)); - assert_eq!(be_i8(&[0xff]), Done(&b""[..], -1)); - assert_eq!(be_i8(&[0x80]), Done(&b""[..], -128)); - } - - #[test] - fn i16_tests() { - assert_eq!(be_i16(&[0x00, 0x00]), Done(&b""[..], 0)); - assert_eq!(be_i16(&[0x7f, 0xff]), Done(&b""[..], 32767_i16)); - assert_eq!(be_i16(&[0xff, 0xff]), Done(&b""[..], -1)); - assert_eq!(be_i16(&[0x80, 0x00]), Done(&b""[..], -32768_i16)); - } - - #[test] - fn i32_tests() { - assert_eq!(be_i32(&[0x00, 0x00, 0x00, 0x00]), Done(&b""[..], 0)); - assert_eq!(be_i32(&[0x7f, 0xff, 0xff, 0xff]), Done(&b""[..], 2147483647_i32)); - assert_eq!(be_i32(&[0xff, 0xff, 0xff, 0xff]), Done(&b""[..], -1)); - assert_eq!(be_i32(&[0x80, 0x00, 0x00, 0x00]), Done(&b""[..], -2147483648_i32)); - } - - #[test] - fn i64_tests() { - assert_eq!(be_i64(&[0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]), Done(&b""[..], 0)); - assert_eq!(be_i64(&[0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), Done(&b""[..], 9223372036854775807_i64)); - assert_eq!(be_i64(&[0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), Done(&b""[..], -1)); - assert_eq!(be_i64(&[0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]), Done(&b""[..], -9223372036854775808_i64)); - } - - #[test] - fn le_i8_tests() { - assert_eq!(le_i8(&[0x00]), Done(&b""[..], 0)); - assert_eq!(le_i8(&[0x7f]), Done(&b""[..], 127)); - assert_eq!(le_i8(&[0xff]), Done(&b""[..], -1)); - assert_eq!(le_i8(&[0x80]), Done(&b""[..], -128)); - } - - #[test] - fn le_i16_tests() { - assert_eq!(le_i16(&[0x00, 0x00]), Done(&b""[..], 0)); - assert_eq!(le_i16(&[0xff, 0x7f]), Done(&b""[..], 32767_i16)); - assert_eq!(le_i16(&[0xff, 0xff]), Done(&b""[..], -1)); - assert_eq!(le_i16(&[0x00, 0x80]), Done(&b""[..], -32768_i16)); - } - - #[test] - fn le_i32_tests() { - assert_eq!(le_i32(&[0x00, 0x00, 0x00, 0x00]), Done(&b""[..], 0)); - assert_eq!(le_i32(&[0xff, 0xff, 0xff, 0x7f]), Done(&b""[..], 2147483647_i32)); - assert_eq!(le_i32(&[0xff, 0xff, 0xff, 0xff]), Done(&b""[..], -1)); - assert_eq!(le_i32(&[0x00, 0x00, 0x00, 0x80]), Done(&b""[..], -2147483648_i32)); - } - - #[test] - fn le_i64_tests() { - assert_eq!(le_i64(&[0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]), Done(&b""[..], 0)); - assert_eq!(le_i64(&[0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f]), Done(&b""[..], 9223372036854775807_i64)); - assert_eq!(le_i64(&[0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), Done(&b""[..], -1)); - assert_eq!(le_i64(&[0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80]), Done(&b""[..], -9223372036854775808_i64)); - } - - #[test] - fn hex_u32_tests() { - assert_eq!(hex_u32(&b""[..]), Done(&b""[..], 0)); - assert_eq!(hex_u32(&b"ff"[..]), Done(&b""[..], 255)); - assert_eq!(hex_u32(&b"1be2"[..]), Done(&b""[..], 7138)); - assert_eq!(hex_u32(&b"0x1be2"[..]), Done(&b"x1be2"[..], 0)); - } - - #[test] - fn end_of_input() { - let not_over = &b"Hello, world!"[..]; - let is_over = &b""[..]; - - let res_not_over = eof(not_over); - assert_eq!(res_not_over, Error(Position(ErrorKind::Eof, not_over))); - - let res_over = eof(is_over); - assert_eq!(res_over, Done(is_over, is_over)); - } - - #[test] - fn configurable_endianness() { - named!(be_tst16, u16!(true)); - named!(le_tst16, u16!(false)); - assert_eq!(be_tst16(&[0x80, 0x00]), Done(&b""[..], 32768_u16)); - assert_eq!(le_tst16(&[0x80, 0x00]), Done(&b""[..], 128_u16)); - - named!(be_tst32, u32!(true)); - named!(le_tst32, u32!(false)); - assert_eq!(be_tst32(&[0x12, 0x00, 0x60, 0x00]), Done(&b""[..], 302014464_u32)); - assert_eq!(le_tst32(&[0x12, 0x00, 0x60, 0x00]), Done(&b""[..], 6291474_u32)); - - named!(be_tst64, u64!(true)); - named!(le_tst64, u64!(false)); - assert_eq!(be_tst64(&[0x12, 0x00, 0x60, 0x00, 0x12, 0x00, 0x80, 0x00]), Done(&b""[..], 1297142246100992000_u64)); - assert_eq!(le_tst64(&[0x12, 0x00, 0x60, 0x00, 0x12, 0x00, 0x80, 0x00]), Done(&b""[..], 36028874334666770_u64)); - - named!(be_tsti16, i16!(true)); - named!(le_tsti16, i16!(false)); - assert_eq!(be_tsti16(&[0x00, 0x80]), Done(&b""[..], 128_i16)); - assert_eq!(le_tsti16(&[0x00, 0x80]), Done(&b""[..], -32768_i16)); - - named!(be_tsti32, i32!(true)); - named!(le_tsti32, i32!(false)); - assert_eq!(be_tsti32(&[0x00, 0x12, 0x60, 0x00]), Done(&b""[..], 1204224_i32)); - assert_eq!(le_tsti32(&[0x00, 0x12, 0x60, 0x00]), Done(&b""[..], 6296064_i32)); - - named!(be_tsti64, i64!(true)); - named!(le_tsti64, i64!(false)); - assert_eq!(be_tsti64(&[0x00, 0xFF, 0x60, 0x00, 0x12, 0x00, 0x80, 0x00]), Done(&b""[..], 71881672479506432_i64)); - assert_eq!(le_tsti64(&[0x00, 0xFF, 0x60, 0x00, 0x12, 0x00, 0x80, 0x00]), Done(&b""[..], 36028874334732032_i64)); - - } - - #[test] - fn manual_configurable_endianness_test() { - let x = 1; - let int_parse: Box IResult<&[u8], u16> > = if x == 2 { - Box::new(be_u16) - } else { - Box::new(le_u16) - }; - println!("{:?}", int_parse(&b"3"[..])); - assert_eq!(int_parse(&[0x80, 0x00]), Done(&b""[..], 128_u16)); - } - - #[allow(dead_code)] - fn custom_error(input: &[u8]) -> IResult<&[u8], &[u8], ()> { - fix_error!(input, (), alphanumeric) - } - - #[test] - fn hex_digit_test() { - let empty = &b""[..]; - - let i = &b"0123456789abcdefABCDEF"[..]; - assert_eq!(hex_digit(i), Done(empty, i)); - - let i = &b"g"[..]; - assert_eq!(hex_digit(i), Error(Position(ErrorKind::HexDigit,i))); - - let i = &b"G"[..]; - assert_eq!(hex_digit(i), Error(Position(ErrorKind::HexDigit,i))); - - assert!(is_hex_digit(b'0')); - assert!(is_hex_digit(b'9')); - assert!(is_hex_digit(b'a')); - assert!(is_hex_digit(b'f')); - assert!(is_hex_digit(b'A')); - assert!(is_hex_digit(b'F')); - assert!(!is_hex_digit(b'g')); - assert!(!is_hex_digit(b'G')); - assert!(!is_hex_digit(b'/')); - assert!(!is_hex_digit(b':')); - assert!(!is_hex_digit(b'@')); - assert!(!is_hex_digit(b'\x60')); - } -} diff --git a/deps/nom-1.2.0/src/regexp.rs b/deps/nom-1.2.0/src/regexp.rs deleted file mode 100644 index 8b150be20..000000000 --- a/deps/nom-1.2.0/src/regexp.rs +++ /dev/null @@ -1,315 +0,0 @@ -/// `re_match!(regexp) => &[T] -> IResult<&[T], &[T]>` -/// Returns the whole input if a match is found -/// -/// requires the `regexp` feature -#[macro_export] -macro_rules! re_match ( - ($i:expr, $re:expr) => ( - { - let re = ::regex::Regex::new($re).unwrap(); - if re.is_match($i) { - $crate::IResult::Done(&""[..], $i) - } else { - $crate::IResult::Error($crate::Err::Code($crate::ErrorKind::RegexpMatch)) - } - } - ) -); - -#[cfg(feature = "regexp_macros")] -/// `re_match_static!(regexp) => &[T] -> IResult<&[T], &[T]>` -/// Returns the whole input if a match is found. Regular expression calculated at compile time -/// -/// requires the `regexp_macros` feature -#[macro_export] -macro_rules! re_match_static ( - ($i:expr, $re:expr) => ( - { - let re = regex!($re); - if re.is_match($i) { - $crate::IResult::Done(&""[..], $i) - } else { - $crate::IResult::Error($crate::Err::Code($crate::ErrorKind::RegexpMatch)) - } - } - - ) -); - -/// `re_find!(regexp) => &[T] -> IResult<&[T], &[T]>` -/// Returns the first match -/// -/// requires the `regexp` feature -#[macro_export] -macro_rules! re_find ( - ($i:expr, $re:expr) => ( - { - let re = ::regex::Regex::new($re).unwrap(); - if let Some((begin, end)) = re.find($i) { - $crate::IResult::Done(&$i[end..], &$i[begin..end]) - } else { - $crate::IResult::Error($crate::Err::Code($crate::ErrorKind::RegexpFind)) - } - } - ) -); - -#[cfg(feature = "regexp_macros")] -/// `re_find!(regexp) => &[T] -> IResult<&[T], &[T]>` -/// Returns the first match. Regular expression calculated at compile time -/// -/// requires the `regexp_macros` feature -#[macro_export] -macro_rules! re_find_static ( - ($i:expr, $re:expr) => ( - { - let re = regex!($re); - if let Some((begin, end)) = re.find($i) { - $crate::IResult::Done(&$i[end..], &$i[begin..end]) - } else { - $crate::IResult::Error($crate::Err::Code($crate::ErrorKind::RegexpFind)) - } - } - - ) -); - -/// `re_matches!(regexp) => &[T] -> IResult<&[T], Vec<&[T]>>` -/// Returns all the matched parts -/// -/// requires the `regexp` feature -#[macro_export] -macro_rules! re_matches ( - ($i:expr, $re:expr) => ( - { - let re = ::regex::Regex::new($re).unwrap(); - let v: Vec<&str> = re.find_iter($i).map(|(begin,end)| &$i[begin..end]).collect(); - if v.len() != 0 { - let offset = { - let end = v.last().unwrap(); - end.as_ptr() as usize + end.len() - $i.as_ptr() as usize - }; - $crate::IResult::Done(&$i[offset..], v) - } else { - $crate::IResult::Error($crate::Err::Code($crate::ErrorKind::RegexpMatches)) - } - } - ) -); - -#[cfg(feature = "regexp_macros")] -/// `re_matches_static!(regexp) => &[T] -> IResult<&[T], Vec<&[T]>>` -/// Returns all the matched parts. Regular expression calculated at compile time -/// -/// requires the `regexp_macros` feature -#[macro_export] -macro_rules! re_matches_static ( - ($i:expr, $re:expr) => ( - { - let re = regex!($re); - let v: Vec<&str> = re.find_iter($i).map(|(begin,end)| &$i[begin..end]).collect(); - if v.len() != 0 { - let offset = { - let end = v.last().unwrap(); - end.as_ptr() as usize + end.len() - $i.as_ptr() as usize - }; - $crate::IResult::Done(&$i[offset..], v) - } else { - $crate::IResult::Error($crate::Err::Code($crate::ErrorKind::RegexpMatches)) - } - } - ) -); - -/// `re_capture!(regexp) => &[T] -> IResult<&[T], Vec<&[T]>>` -/// Returns the first capture group -/// -/// requires the `regexp` feature -#[macro_export] -macro_rules! re_capture ( - ($i:expr, $re:expr) => ( - { - let re = ::regex::Regex::new($re).unwrap(); - if let Some(c) = re.captures($i) { - let v:Vec<&str> = c.iter_pos().filter(|el| el.is_some()).map(|el| el.unwrap()).map(|(begin,end)| &$i[begin..end]).collect(); - let offset = { - let end = v.last().unwrap(); - end.as_ptr() as usize + end.len() - $i.as_ptr() as usize - }; - $crate::IResult::Done(&$i[offset..], v) - } else { - $crate::IResult::Error($crate::Err::Code($crate::ErrorKind::RegexpCapture)) - } - } - ) -); - -#[cfg(feature = "regexp_macros")] -/// `re_capture_static!(regexp) => &[T] -> IResult<&[T], Vec<&[T]>>` -/// Returns the first capture group. Regular expression calculated at compile time -/// -/// requires the `regexp_macros` feature -#[macro_export] -macro_rules! re_capture_static ( - ($i:expr, $re:expr) => ( - { - let re = regex!($re); - if let Some(c) = re.captures($i) { - let v:Vec<&str> = c.iter_pos().filter(|el| el.is_some()).map(|el| el.unwrap()).map(|(begin,end)| &$i[begin..end]).collect(); - let offset = { - let end = v.last().unwrap(); - end.as_ptr() as usize + end.len() - $i.as_ptr() as usize - }; - $crate::IResult::Done(&$i[offset..], v) - } else { - $crate::IResult::Error($crate::Err::Code($crate::ErrorKind::RegexpCapture)) - } - } - ) -); - -/// `re_captures!(regexp) => &[T] -> IResult<&[T], Vec>>` -/// Returns all the capture groups -/// -/// requires the `regexp` feature -#[macro_export] -macro_rules! re_captures ( - ($i:expr, $re:expr) => ( - { - let re = ::regex::Regex::new($re).unwrap(); - let v:Vec> = re.captures_iter($i).map(|c| c.iter_pos().filter(|el| el.is_some()).map(|el| el.unwrap()).map(|(begin,end)| &$i[begin..end]).collect()).collect(); - if v.len() != 0 { - let offset = { - let end = v.last().unwrap().last().unwrap(); - end.as_ptr() as usize + end.len() - $i.as_ptr() as usize - }; - $crate::IResult::Done(&$i[offset..], v) - } else { - $crate::IResult::Error($crate::Err::Code($crate::ErrorKind::RegexpCapture)) - } - } - ) -); - -#[cfg(feature = "regexp_macros")] -/// `re_captures_static!(regexp) => &[T] -> IResult<&[T], Vec>>` -/// Returns all the capture groups. Regular expression calculated at compile time -/// -/// requires the `regexp_macros` feature -#[macro_export] -macro_rules! re_captures_static ( - ($i:expr, $re:expr) => ( - { - let re = regex!($re); - let v:Vec> = re.captures_iter($i).map(|c| c.iter_pos().filter(|el| el.is_some()).map(|el| el.unwrap()).map(|(begin,end)| &$i[begin..end]).collect()).collect(); - if v.len() != 0 { - let offset = { - let end = v.last().unwrap().last().unwrap(); - end.as_ptr() as usize + end.len() - $i.as_ptr() as usize - }; - $crate::IResult::Done(&$i[offset..], v) - } else { - $crate::IResult::Error($crate::Err::Code($crate::ErrorKind::RegexpCapture)) - } - } - ) -); - -#[cfg(test)] -mod tests { - use internal::IResult::*; - use internal::Err::*; - use util::ErrorKind; - - #[test] - fn re_match() { - named!(rm<&str,&str>, re_match!(r"^\d{4}-\d{2}-\d{2}")); - assert_eq!(rm("2015-09-07"), Done("", "2015-09-07")); - assert_eq!(rm("blah"), Error(Code(ErrorKind::RegexpMatch))); - assert_eq!(rm("2015-09-07blah"), Done("", "2015-09-07blah")); - } - - #[cfg(feature = "regexp_macros")] - #[test] - fn re_match_static() { - named!(rm<&str,&str>, re_match_static!(r"^\d{4}-\d{2}-\d{2}")); - assert_eq!(rm("2015-09-07"), Done("", "2015-09-07")); - assert_eq!(rm("blah"), Error(Code(ErrorKind::RegexpMatch))); - assert_eq!(rm("2015-09-07blah"), Done("", "2015-09-07blah")); - } - - #[test] - fn re_find() { - named!(rm<&str,&str>, re_find!(r"^\d{4}-\d{2}-\d{2}")); - assert_eq!(rm("2015-09-07"), Done("", "2015-09-07")); - assert_eq!(rm("blah"), Error(Code(ErrorKind::RegexpFind))); - assert_eq!(rm("2015-09-07blah"), Done("blah", "2015-09-07")); - } - - #[cfg(feature = "regexp_macros")] - #[test] - fn re_find_static() { - named!(rm<&str,&str>, re_find_static!(r"^\d{4}-\d{2}-\d{2}")); - assert_eq!(rm("2015-09-07"), Done("", "2015-09-07")); - assert_eq!(rm("blah"), Error(Code(ErrorKind::RegexpFind))); - assert_eq!(rm("2015-09-07blah"), Done("blah", "2015-09-07")); - } - - #[test] - fn re_matches() { - named!(rm< &str,Vec<&str> >, re_matches!(r"\d{4}-\d{2}-\d{2}")); - assert_eq!(rm("2015-09-07"), Done("", vec!["2015-09-07"])); - assert_eq!(rm("blah"), Error(Code(ErrorKind::RegexpMatches))); - assert_eq!(rm("aaa2015-09-07blah2015-09-09pouet"), Done("pouet", vec!["2015-09-07", "2015-09-09"])); - } - - #[cfg(feature = "regexp_macros")] - #[test] - fn re_matches_static() { - named!(rm< &str,Vec<&str> >, re_matches_static!(r"\d{4}-\d{2}-\d{2}")); - assert_eq!(rm("2015-09-07"), Done("", vec!["2015-09-07"])); - assert_eq!(rm("blah"), Error(Code(ErrorKind::RegexpMatches))); - assert_eq!(rm("aaa2015-09-07blah2015-09-09pouet"), Done("pouet", vec!["2015-09-07", "2015-09-09"])); - } - - #[test] - fn re_capture() { - named!(rm< &str,Vec<&str> >, re_capture!(r"([:alpha:]+)\s+((\d+).(\d+).(\d+))")); - assert_eq!(rm("blah nom 0.3.11pouet"), Done("pouet", vec!["nom 0.3.11", "nom", "0.3.11", "0", "3", "11"])); - assert_eq!(rm("blah"), Error(Code(ErrorKind::RegexpCapture))); - assert_eq!(rm("hello nom 0.3.11 world regex 0.1.41"), Done(" world regex 0.1.41", vec!["nom 0.3.11", "nom", "0.3.11", "0", "3", "11"])); - } - - #[cfg(feature = "regexp_macros")] - #[test] - fn re_capture_static() { - named!(rm< &str,Vec<&str> >, re_capture_static!(r"([:alpha:]+)\s+((\d+).(\d+).(\d+))")); - assert_eq!(rm("blah nom 0.3.11pouet"), Done("pouet", vec!["nom 0.3.11", "nom", "0.3.11", "0", "3", "11"])); - assert_eq!(rm("blah"), Error(Code(ErrorKind::RegexpCapture))); - assert_eq!(rm("hello nom 0.3.11 world regex 0.1.41"), Done(" world regex 0.1.41", vec!["nom 0.3.11", "nom", "0.3.11", "0", "3", "11"])); - } - - #[test] - fn re_captures() { - named!(rm< &str,Vec> >, re_captures!(r"([:alpha:]+)\s+((\d+).(\d+).(\d+))")); - assert_eq!(rm("blah nom 0.3.11pouet"), Done("pouet", vec![vec!["nom 0.3.11", "nom", "0.3.11", "0", "3", "11"]])); - assert_eq!(rm("blah"), Error(Code(ErrorKind::RegexpCapture))); - assert_eq!(rm("hello nom 0.3.11 world regex 0.1.41 aaa"), Done(" aaa", vec![ - vec!["nom 0.3.11", "nom", "0.3.11", "0", "3", "11"], - vec!["regex 0.1.41", "regex", "0.1.41", "0", "1", "41"], - ])); - } - - #[cfg(feature = "regexp_macros")] - #[test] - fn re_captures_static() { - named!(rm< &str,Vec> >, re_captures_static!(r"([:alpha:]+)\s+((\d+).(\d+).(\d+))")); - assert_eq!(rm("blah nom 0.3.11pouet"), Done("pouet", vec![vec!["nom 0.3.11", "nom", "0.3.11", "0", "3", "11"]])); - assert_eq!(rm("blah"), Error(Code(ErrorKind::RegexpCapture))); - assert_eq!(rm("hello nom 0.3.11 world regex 0.1.41 aaa"), Done(" aaa", vec![ - vec!["nom 0.3.11", "nom", "0.3.11", "0", "3", "11"], - vec!["regex 0.1.41", "regex", "0.1.41", "0", "1", "41"], - ])); - } - -} diff --git a/deps/nom-1.2.0/src/str.rs b/deps/nom-1.2.0/src/str.rs deleted file mode 100644 index dc22755b8..000000000 --- a/deps/nom-1.2.0/src/str.rs +++ /dev/null @@ -1,729 +0,0 @@ -//! Parsers and helper functions operating on strings, especially useful when writing parsers for -//! text-based formats. - -/// `tag_s!(&str) => &str -> IResult<&str, &str>` -/// declares a string as a suite to recognize -/// -/// consumes the recognized characters -/// -/// ``` -/// # #[macro_use] extern crate nom; -/// # use nom::IResult::{self,Done}; -/// # fn main() { -/// fn test(input: &str) -> IResult<&str, &str> { -/// tag_s!(input, "abcd") -/// } -/// let r = test("abcdefgh"); -/// assert_eq!(r, Done("efgh", "abcd")); -/// # } -/// ``` -#[macro_export] -macro_rules! tag_s ( - ($i:expr, $tag: expr) => ( - { - let res: $crate::IResult<_,_> = if $tag.len() > $i.len() { - $crate::IResult::Incomplete($crate::Needed::Size($tag.len())) - //} else if &$i[0..$tag.len()] == $tag { - } else if ($i).starts_with($tag) { - $crate::IResult::Done(&$i[$tag.len()..], &$i[0..$tag.len()]) - } else { - $crate::IResult::Error($crate::Err::Position($crate::ErrorKind::TagStr, $i)) - }; - res - } - ); -); - -/// `take_s!(nb) => &str -> IResult<&str, &str>` -/// generates a parser consuming the specified number of characters -/// -/// ``` -/// # #[macro_use] extern crate nom; -/// # use nom::IResult::Done; -/// # fn main() { -/// // Desmond parser -/// named!(take5<&str,&str>, take_s!( 5 ) ); -/// -/// let a = "abcdefgh"; -/// -/// assert_eq!(take5(a), Done("fgh", "abcde")); -/// # } -/// ``` -#[macro_export] -macro_rules! take_s ( - ($i:expr, $count:expr) => ( - { - let cnt = $count as usize; - let res: $crate::IResult<_,_> = if $i.chars().count() < cnt { - $crate::IResult::Incomplete($crate::Needed::Size(cnt)) - } else { - let mut offset = $i.len(); - let mut count = 0; - for (o, _) in $i.char_indices() { - if count == cnt { - offset = o; - break; - } - count += 1; - } - $crate::IResult::Done(&$i[offset..], &$i[..offset]) - }; - res - } - ); -); - - -/// `is_not_s!(&str) => &str -> IResult<&str, &str>` -/// returns the longest list of characters that do not appear in the provided array -/// -/// ``` -/// # #[macro_use] extern crate nom; -/// # use nom::IResult::Done; -/// # fn main() { -/// named!( not_space<&str,&str>, is_not_s!( " \t\r\n" ) ); -/// -/// let r = not_space("abcdefgh\nijkl"); -/// assert_eq!(r, Done("\nijkl", "abcdefgh")); -/// # } -/// ``` -#[macro_export] -macro_rules! is_not_s ( - ($input:expr, $arr:expr) => ( - { - use std::collections::HashSet; - let set: HashSet = $arr.chars().collect(); - let mut offset = $input.len(); - for (o, c) in $input.char_indices() { - if set.contains(&c) { - offset = o; - break; - } - } - if offset == 0 { - $crate::IResult::Error($crate::Err::Position($crate::ErrorKind::IsAStr,$input)) - } else if offset < $input.len() { - $crate::IResult::Done(&$input[offset..], &$input[..offset]) - } else { - $crate::IResult::Done("", $input) - } - } - ); -); - -/// `is_a_s!(&str) => &str -> IResult<&str, &str>` -/// returns the longest list of characters that appear in the provided array -/// -/// ``` -/// # #[macro_use] extern crate nom; -/// # use nom::IResult::Done; -/// # fn main() { -/// named!(abcd<&str, &str>, is_a_s!( "abcd" )); -/// -/// let r1 = abcd("aaaaefgh"); -/// assert_eq!(r1, Done("efgh", "aaaa")); -/// -/// let r2 = abcd("dcbaefgh"); -/// assert_eq!(r2, Done("efgh", "dcba")); -/// # } -/// ``` -#[macro_export] -macro_rules! is_a_s ( - ($input:expr, $arr:expr) => ( - { - use std::collections::HashSet; - let set: HashSet = $arr.chars().collect(); - let mut offset = $input.len(); - for (o, c) in $input.char_indices() { - if !set.contains(&c) { - offset = o; - break; - } - } - if offset == 0 { - $crate::IResult::Error($crate::Err::Position($crate::ErrorKind::IsAStr,$input)) - } else if offset < $input.len() { - $crate::IResult::Done(&$input[offset..], &$input[..offset]) - } else { - $crate::IResult::Done("", $input) - } - } - ); -); - - -/// `take_while_s!(char -> bool) => &str -> IResult<&str, &str>` -/// returns the longest list of characters until the provided function fails. -/// -/// The argument is either a function `char -> bool` or a macro returning a `bool -/// -/// ``` -/// # #[macro_use] extern crate nom; -/// # use nom::IResult::Done; -/// # use nom::is_alphanumeric; -/// # fn main() { -/// fn alphabetic(chr: char) -> bool { (chr >= 0x41 as char && chr <= 0x5A as char) || (chr >= 0x61 as char && chr <= 0x7A as char) } -/// named!( alpha<&str,&str>, take_while_s!( alphabetic ) ); -/// -/// let r = alpha("abcd\nefgh"); -/// assert_eq!(r, Done("\nefgh", "abcd")); -/// # } -/// ``` -#[macro_export] -macro_rules! take_while_s ( - ($input:expr, $submac:ident!( $($args:tt)* )) => ( - { - let mut offset = $input.len(); - for (o, c) in $input.char_indices() { - if !$submac!(c, $($args)*) { - offset = o; - break; - } - } - if offset < $input.len() { - $crate::IResult::Done(&$input[offset..], &$input[..offset]) - } else { - $crate::IResult::Done("", $input) - } - } - ); - ($input:expr, $f:expr) => ( - take_while_s!($input, call!($f)); - ); -); - -/// `take_while1_s!(char -> bool) => &str -> IResult<&str, &str>` -/// returns the longest (non empty) list of characters until the provided function fails. -/// -/// The argument is either a function `char -> bool` or a macro returning a `bool` -/// ``` -/// # #[macro_use] extern crate nom; -/// # use nom::IResult::Done; -/// # use nom::is_alphanumeric; -/// # fn main() { -/// fn alphabetic(chr: char) -> bool { (chr >= 0x41 as char && chr <= 0x5A as char) || (chr >= 0x61 as char && chr <= 0x7A as char) } -/// named!( alpha<&str,&str>, take_while1_s!( alphabetic ) ); -/// -/// let r = alpha("abcd\nefgh"); -/// assert_eq!(r, Done("\nefgh", "abcd")); -/// # } -/// ``` -#[macro_export] -macro_rules! take_while1_s ( - ($input:expr, $submac:ident!( $($args:tt)* )) => ( - { - let mut offset = $input.len(); - for (o, c) in $input.char_indices() { - if !$submac!(c, $($args)*) { - offset = o; - break; - } - } - if offset == 0 { - $crate::IResult::Error($crate::Err::Position($crate::ErrorKind::TakeWhile1Str,$input)) - } else if offset < $input.len() { - $crate::IResult::Done(&$input[offset..], &$input[..offset]) - } else { - $crate::IResult::Done("", $input) - } - } - ); - ($input:expr, $f:expr) => ( - take_while1_s!($input, call!($f)); - ); -); - - -/// `take_till_s!(&str -> bool) => &str -> IResult<&str, &str>` -/// returns the longest list of characters until the provided function succeeds -/// -/// The argument is either a function `char -> bool` or a macro returning a `bool -#[macro_export] -macro_rules! take_till_s ( - ($input:expr, $submac:ident!( $($args:tt)* )) => ( - - { - let mut offset = $input.len(); - for (o, c) in $input.char_indices() { - if $submac!(c, $($args)*) { - offset = o; - break; - } - } - if offset < $input.len() { - $crate::IResult::Done(&$input[offset..], &$input[..offset]) - } else { - $crate::IResult::Done("", $input) - } - } - ); - ($input:expr, $f:expr) => ( - take_till_s!($input, call!($f)); - ); -); - -/// `take_until_and_consume_s!(&str) => &str -> IResult<&str, &str>` -/// generates a parser consuming all chars until the specified string is found and consumes it -#[macro_export] -macro_rules! take_until_and_consume_s ( - ($input:expr, $substr:expr) => ( - { - #[inline(always)] - fn shift_window_and_cmp(window: & mut ::std::vec::Vec, c: char, substr_vec: & ::std::vec::Vec) -> bool { - window.push(c); - if window.len() > substr_vec.len() { - window.remove(0); - } - window == substr_vec - } - let res: $crate::IResult<_, _> = if $substr.len() > $input.len() { - $crate::IResult::Incomplete($crate::Needed::Size($substr.len())) - } else { - let substr_vec: ::std::vec::Vec = $substr.chars().collect(); - let mut window: ::std::vec::Vec = vec![]; - let mut offset = $input.len(); - let mut parsed = false; - for (o, c) in $input.char_indices() { - if parsed { - // The easiest way to get the byte offset of the char after the found string - offset = o; - break; - } - if shift_window_and_cmp(& mut window, c, &substr_vec) { - parsed = true; - } - } - if parsed { - if offset < $input.len() { - $crate::IResult::Done(&$input[offset..], &$input[..offset]) - } else { - $crate::IResult::Done("", $input) - } - } else { - $crate::IResult::Error($crate::Err::Position($crate::ErrorKind::TakeUntilAndConsumeStr,$input)) - } - }; - res - } - ); -); - -/// `take_until_s!(&str) => &str -> IResult<&str, &str>` -/// generates a parser consuming all chars until the specified string is found and leaves it in the remaining input -#[macro_export] -macro_rules! take_until_s ( - ($input:expr, $substr:expr) => ( - { - #[inline(always)] - fn shift_window_and_cmp(window: & mut Vec, c: char, substr_vec: &Vec) -> bool { - window.push(c); - if window.len() > substr_vec.len() { - window.remove(0); - } - window == substr_vec - } - let res: $crate::IResult<&str, &str> = if $substr.len() > $input.len() { - $crate::IResult::Incomplete($crate::Needed::Size($substr.len())) - } else { - let substr_vec: Vec = $substr.chars().collect(); - let mut window: Vec = vec![]; - let mut offset = $input.len(); - let mut parsed = false; - for (o, c) in $input.char_indices() { - if shift_window_and_cmp(& mut window, c, &substr_vec) { - parsed = true; - offset = o - window[1].len_utf8() - window[2].len_utf8() - } - } - if parsed { - $crate::IResult::Done(&$input[offset..], &$input[..offset]) - } else { - $crate::IResult::Error($crate::Err::Position($crate::ErrorKind::TakeUntilStr,$input)) - } - }; - res - } - ); -); - -#[cfg(test)] -mod test { - use ::IResult; - - #[test] - fn tag_str_succeed() { - const INPUT: &'static str = "Hello World!"; - const TAG: &'static str = "Hello"; - fn test(input: &str) -> IResult<&str, &str> { - tag_s!(input, TAG) - } - - match test(INPUT) { - IResult::Done(extra, output) => { - assert!(extra == " World!", "Parser `tag_s` consumed leftover input."); - assert!(output == TAG, - "Parser `tag_s` doesn't return the tag it matched on success. \ - Expected `{}`, got `{}`.", TAG, output); - }, - other => panic!("Parser `tag_s` didn't succeed when it should have. \ - Got `{:?}`.", other), - }; - } - - #[test] - fn tag_str_incomplete() { - const INPUT: &'static str = "Hello"; - const TAG: &'static str = "Hello World!"; - - match tag_s!(INPUT, TAG) { - IResult::Incomplete(_) => (), - other => { - panic!("Parser `tag_s` didn't require more input when it should have. \ - Got `{:?}`.", other); - } - }; - } - - #[test] - fn tag_str_error() { - const INPUT: &'static str = "Hello World!"; - const TAG: &'static str = "Random"; // TAG must be closer than INPUT. - - match tag_s!(INPUT, TAG) { - IResult::Error(_) => (), - other => { - panic!("Parser `tag_s` didn't fail when it should have. Got `{:?}`.`", other); - }, - }; - } - - #[test] - fn take_s_succeed() { - const INPUT: &'static str = "βèƒôřèÂßÇáƒƭèř"; - const CONSUMED: &'static str = "βèƒôřèÂßÇ"; - const LEFTOVER: &'static str = "áƒƭèř"; - - match take_s!(INPUT, 9) { - IResult::Done(extra, output) => { - assert!(extra == LEFTOVER, "Parser `take_s` consumed leftover input. Leftover `{}`.", extra); - assert!(output == CONSUMED, - "Parser `take_s` doens't return the string it consumed on success. Expected `{}`, got `{}`.", - CONSUMED, output); - }, - other => panic!("Parser `take_s` didn't succeed when it should have. \ - Got `{:?}`.", other), - }; - } - - #[test] - fn take_until_s_succeed() { - const INPUT: &'static str = "βèƒôřèÂßÇáƒƭèř"; - const FIND: &'static str = "姂"; - const CONSUMED: &'static str = "βèƒôřè"; - const LEFTOVER: &'static str = "ÂßÇáƒƭèř"; - - match take_until_s!(INPUT, FIND) { - IResult::Done(extra, output) => { - assert!(extra == LEFTOVER, "Parser `take_until_s`\ - consumed leftover input. Leftover `{}`.", extra); - assert!(output == CONSUMED, "Parser `take_until_s`\ - doens't return the string it consumed on success. Expected `{}`, got `{}`.", - CONSUMED, output); - } - other => panic!("Parser `take_until_s` didn't succeed when it should have. \ - Got `{:?}`.", other), - }; - } - - #[test] - fn take_s_incomplete() { - const INPUT: &'static str = "βèƒôřèÂßÇá"; - - match take_s!(INPUT, 13) { - IResult::Incomplete(_) => (), - other => panic!("Parser `take_s` didn't require more input when it should have. \ - Got `{:?}`.", other), - } - } - - use internal::IResult::{Done, Error}; - use internal::Err::Position; - use util::ErrorKind; - - pub fn is_alphabetic(c:char) -> bool { - (c as u8 >= 0x41 && c as u8 <= 0x5A) || (c as u8 >= 0x61 && c as u8 <= 0x7A) - } - #[test] - fn take_while_s() { - named!(f<&str,&str>, take_while_s!(is_alphabetic)); - let a = ""; - let b = "abcd"; - let c = "abcd123"; - let d = "123"; - - assert_eq!(f(&a[..]), Done(&a[..], &a[..])); - assert_eq!(f(&b[..]), Done(&a[..], &b[..])); - assert_eq!(f(&c[..]), Done(&d[..], &b[..])); - assert_eq!(f(&d[..]), Done(&d[..], &a[..])); - } - - #[test] - fn take_while1_s() { - named!(f<&str,&str>, take_while1_s!(is_alphabetic)); - let a = ""; - let b = "abcd"; - let c = "abcd123"; - let d = "123"; - - assert_eq!(f(&a[..]), Error(Position(ErrorKind::TakeWhile1Str, &""[..]))); - assert_eq!(f(&b[..]), Done(&a[..], &b[..])); - assert_eq!(f(&c[..]), Done(&"123"[..], &b[..])); - assert_eq!(f(&d[..]), Error(Position(ErrorKind::TakeWhile1Str, &d[..]))); - } - - #[test] - fn take_till_s_succeed() { - const INPUT: &'static str = "βèƒôřèÂßÇáƒƭèř"; - const CONSUMED: &'static str = "βèƒôřèÂßÇ"; - const LEFTOVER: &'static str = "áƒƭèř"; - fn till_s(c: char) -> bool { - c == 'á' - } - fn test(input: &str) -> IResult<&str, &str> { - take_till_s!(input, till_s) - } - match test(INPUT) { - IResult::Done(extra, output) => { - assert!(extra == LEFTOVER, "Parser `take_till_s` consumed leftover input."); - assert!(output == CONSUMED, - "Parser `take_till_s` doesn't return the string it consumed on success. \ - Expected `{}`, got `{}`.", CONSUMED, output); - }, - other => panic!("Parser `take_till_s` didn't succeed when it should have. \ - Got `{:?}`.", other), - }; - } - - #[test] - fn take_while_s_succeed_none() { - const INPUT: &'static str = "βèƒôřèÂßÇáƒƭèř"; - const CONSUMED: &'static str = ""; - const LEFTOVER: &'static str = "βèƒôřèÂßÇáƒƭèř"; - fn while_s(c: char) -> bool { - c == '9' - } - fn test(input: &str) -> IResult<&str, &str> { - take_while_s!(input, while_s) - } - match test(INPUT) { - IResult::Done(extra, output) => { - assert!(extra == LEFTOVER, "Parser `take_while_s` consumed leftover input."); - assert!(output == CONSUMED, - "Parser `take_while_s` doesn't return the string it consumed on success. \ - Expected `{}`, got `{}`.", CONSUMED, output); - }, - other => panic!("Parser `take_while_s` didn't succeed when it should have. \ - Got `{:?}`.", other), - }; - } - - #[test] - fn is_not_s_succeed() { - const INPUT: &'static str = "βèƒôřèÂßÇáƒƭèř"; - const AVOID: &'static str = "£úçƙ¥á"; - const CONSUMED: &'static str = "βèƒôřèÂßÇ"; - const LEFTOVER: &'static str = "áƒƭèř"; - fn test(input: &str) -> IResult<&str, &str> { - is_not_s!(input, AVOID) - } - match test(INPUT) { - IResult::Done(extra, output) => { - assert!(extra == LEFTOVER, "Parser `is_not_s` consumed leftover input. Leftover `{}`.", extra); - assert!(output == CONSUMED, - "Parser `is_not_s` doens't return the string it consumed on success. Expected `{}`, got `{}`.", - CONSUMED, output); - }, - other => panic!("Parser `is_not_s` didn't succeed when it should have. \ - Got `{:?}`.", other), - }; - } - - #[test] - fn take_until_and_consume_s_succeed() { - const INPUT: &'static str = "βèƒôřèÂßÇáƒƭèř"; - const FIND: &'static str = "姂"; - const CONSUMED: &'static str = "βèƒôřèÂßÇ"; - const LEFTOVER: &'static str = "áƒƭèř"; - - match take_until_and_consume_s!(INPUT, FIND) { - IResult::Done(extra, output) => { - assert!(extra == LEFTOVER, "Parser `take_until_and_consume_s`\ - consumed leftover input. Leftover `{}`.", extra); - assert!(output == CONSUMED, "Parser `take_until_and_consume_s`\ - doens't return the string it consumed on success. Expected `{}`, got `{}`.", - CONSUMED, output); - } - other => panic!("Parser `take_until_and_consume_s` didn't succeed when it should have. \ - Got `{:?}`.", other), - }; - } - - #[test] - fn take_while_s_succeed_some() { - const INPUT: &'static str = "βèƒôřèÂßÇáƒƭèř"; - const CONSUMED: &'static str = "βèƒôřèÂßÇ"; - const LEFTOVER: &'static str = "áƒƭèř"; - fn while_s(c: char) -> bool { - c == 'β' || c == 'è' || c == 'ƒ' || c == 'ô' || c == 'ř' || - c == 'è' || c == 'Â' || c == 'ß' || c == 'Ç' - } - fn test(input: &str) -> IResult<&str, &str> { - take_while_s!(input, while_s) - } - match test(INPUT) { - IResult::Done(extra, output) => { - assert!(extra == LEFTOVER, "Parser `take_while_s` consumed leftover input."); - assert!(output == CONSUMED, - "Parser `take_while_s` doesn't return the string it consumed on success. \ - Expected `{}`, got `{}`.", CONSUMED, output); - }, - other => panic!("Parser `take_while_s` didn't succeed when it should have. \ - Got `{:?}`.", other), - }; - } - - #[test] - fn is_not_s_fail() { - const INPUT: &'static str = "βèƒôřèÂßÇáƒƭèř"; - const AVOID: &'static str = "βúçƙ¥"; - fn test(input: &str) -> IResult<&str, &str> { - is_not_s!(input, AVOID) - } - match test(INPUT) { - IResult::Error(_) => (), - other => panic!("Parser `is_not_s` didn't fail when it should have. Got `{:?}`.", other), - }; - } - - #[test] - fn take_while1_s_succeed() { - const INPUT: &'static str = "βèƒôřèÂßÇáƒƭèř"; - const CONSUMED: &'static str = "βèƒôřèÂßÇ"; - const LEFTOVER: &'static str = "áƒƭèř"; - fn while1_s(c: char) -> bool { - c == 'β' || c == 'è' || c == 'ƒ' || c == 'ô' || c == 'ř' || - c == 'è' || c == 'Â' || c == 'ß' || c == 'Ç' - } - fn test(input: &str) -> IResult<&str, &str> { - take_while1_s!(input, while1_s) - } - match test(INPUT) { - IResult::Done(extra, output) => { - assert!(extra == LEFTOVER, "Parser `take_while1_s` consumed leftover input."); - assert!(output == CONSUMED, - "Parser `take_while1_s` doesn't return the string it consumed on success. \ - Expected `{}`, got `{}`.", CONSUMED, output); - }, - other => panic!("Parser `take_while1_s` didn't succeed when it should have. \ - Got `{:?}`.", other), - }; - } - - #[test] - fn take_until_and_consume_s_incomplete() { - const INPUT: &'static str = "βèƒôřè"; - const FIND: &'static str = "βèƒôřèÂßÇ"; - - match take_until_and_consume_s!(INPUT, FIND) { - IResult::Incomplete(_) => (), - other => panic!("Parser `take_until_and_consume_s` didn't require more input when it should have. \ - Got `{:?}`.", other), - }; - } - - #[test] - fn take_until_s_incomplete() { - const INPUT: &'static str = "βèƒôřè"; - const FIND: &'static str = "βèƒôřèÂßÇ"; - - match take_until_s!(INPUT, FIND) { - IResult::Incomplete(_) => (), - other => panic!("Parser `take_until_s` didn't require more input when it should have. \ - Got `{:?}`.", other), - }; - } - - #[test] - fn is_a_s_succeed() { - const INPUT: &'static str = "βèƒôřèÂßÇáƒƭèř"; - const MATCH: &'static str = "βèƒôřèÂßÇ"; - const CONSUMED: &'static str = "βèƒôřèÂßÇ"; - const LEFTOVER: &'static str = "áƒƭèř"; - fn test(input: &str) -> IResult<&str, &str> { - is_a_s!(input, MATCH) - } - match test(INPUT) { - IResult::Done(extra, output) => { - assert!(extra == LEFTOVER, "Parser `is_a_s` consumed leftover input. Leftover `{}`.", extra); - assert!(output == CONSUMED, - "Parser `is_a_s` doens't return the string it consumed on success. Expected `{}`, got `{}`.", - CONSUMED, output); - }, - other => panic!("Parser `is_a_s` didn't succeed when it should have. \ - Got `{:?}`.", other), - }; - } - - #[test] - fn take_while1_s_fail() { - const INPUT: &'static str = "βèƒôřèÂßÇáƒƭèř"; - fn while1_s(c: char) -> bool { - c == '9' - } - fn test(input: &str) -> IResult<&str, &str> { - take_while1_s!(input, while1_s) - } - match test(INPUT) { - IResult::Error(_) => (), - other => panic!("Parser `take_while1_s` didn't fail when it should have. \ - Got `{:?}`.", other), - }; - } - - #[test] - fn is_a_s_fail() { - const INPUT: &'static str = "βèƒôřèÂßÇáƒƭèř"; - const MATCH: &'static str = "Ûñℓúçƙ¥"; - fn test(input: &str) -> IResult<&str, &str> { - is_a_s!(input, MATCH) - } - match test(INPUT) { - IResult::Error(_) => (), - other => panic!("Parser `is_a_s` didn't fail when it should have. Got `{:?}`.", other), - }; - } - - #[test] - fn take_until_and_consume_s_error() { - const INPUT: &'static str = "βèƒôřèÂßÇáƒƭèř"; - const FIND: &'static str = "Ráñδô₥"; - - match take_until_and_consume_s!(INPUT, FIND) { - IResult::Error(_) => (), - other => panic!("Parser `take_until_and_consume_s` didn't fail when it should have. \ - Got `{:?}`.", other), - }; - } - - #[test] - fn take_until_s_error() { - const INPUT: &'static str = "βèƒôřèÂßÇáƒƭèř"; - const FIND: &'static str = "Ráñδô₥"; - - match take_until_s!(INPUT, FIND) { - IResult::Error(_) => (), - other => panic!("Parser `take_until_and_consume_s` didn't fail when it should have. \ - Got `{:?}`.", other), - }; - } -} diff --git a/deps/nom-1.2.0/src/util.rs b/deps/nom-1.2.0/src/util.rs deleted file mode 100644 index f4fcf8f44..000000000 --- a/deps/nom-1.2.0/src/util.rs +++ /dev/null @@ -1,688 +0,0 @@ -use internal::{IResult,Err}; - -#[cfg(not(feature = "core"))] -use std::collections::HashMap; - -#[cfg(feature = "core")] -use std::prelude::v1::*; -use std::vec::Vec; -use std::string::ToString; - -/// useful functions to calculate the offset between slices and show a hexdump of a slice -#[cfg(not(feature = "core"))] -pub trait HexDisplay { - /// offset between the first byte of self and the first byte of the argument - fn offset(&self, second:&[u8]) -> usize;// OFFSET SHOULD GO TO ITS OWN TRAIT - - /// Converts the value of `self` to a hex dump, returning the owned - /// string. - fn to_hex(&self, chunk_size: usize) -> String; - - /// Converts the value of `self` to a hex dump beginning at `from` address, returning the owned - /// string. - fn to_hex_from(&self, chunk_size: usize, from: usize) -> String; -} - -pub trait InputLength { - #[inline] - fn input_len(&self) -> usize; -} - -impl<'a, T> InputLength for &'a[T] { - #[inline] - fn input_len(&self) -> usize { - self.len() - } -} - -impl<'a> InputLength for &'a str { - #[inline] - fn input_len(&self) -> usize { - self.len() - } -} - -impl<'a> InputLength for (&'a [u8], usize) { - #[inline] - fn input_len(&self) -> usize { - //println!("bit input length for ({:?}, {}):", self.0, self.1); - let res = self.0.len() * 8 - self.1; - //println!("-> {}", res); - res - } -} - -use std::iter::Enumerate; -use std::str::CharIndices; - -pub trait AsChar { - #[inline] - fn as_char(self) -> char; - #[inline] - fn is_alpha(self) -> bool; - #[inline] - fn is_alphanum(self) -> bool; - #[inline] - fn is_0_to_9(self) -> bool; - #[inline] - fn is_hex_digit(self) -> bool; -} - -impl<'a> AsChar for &'a u8 { - #[inline] - fn as_char(self) -> char { *self as char } - #[inline] - fn is_alpha(self) -> bool { - (*self >= 0x41 && *self <= 0x5A) || (*self >= 0x61 && *self <= 0x7A) - } - #[inline] - fn is_alphanum(self) -> bool { self.is_alpha() || self.is_0_to_9() } - #[inline] - fn is_0_to_9(self) -> bool { - *self >= 0x30 && *self <= 0x39 - } - #[inline] - fn is_hex_digit(self) -> bool { - (*self >= 0x30 && *self <= 0x39) || - (*self >= 0x41 && *self <= 0x46) || - (*self >= 0x61 && *self <= 0x66) - } -} - -impl AsChar for char { - #[inline] - fn as_char(self) -> char { self } - #[inline] - fn is_alpha(self) -> bool { self.is_alphabetic() } - #[inline] - fn is_alphanum(self) -> bool { self.is_alpha() || self.is_0_to_9() } - #[inline] - fn is_0_to_9(self) -> bool { self.is_digit(10) } - #[inline] - fn is_hex_digit(self) -> bool { self.is_digit(16) } -} - -pub trait IterIndices { - type Item: AsChar; - type Iter : Iterator; - fn iter_indices(self) -> Self::Iter; -} - -impl<'a> IterIndices for &'a [u8] { - type Item = &'a u8; - type Iter = Enumerate<::std::slice::Iter<'a, u8>>; - #[inline] - fn iter_indices(self) -> Enumerate<::std::slice::Iter<'a, u8>> { - self.iter().enumerate() - } -} - -impl<'a> IterIndices for &'a str { - type Item = char; - type Iter = CharIndices<'a>; - #[inline] - fn iter_indices(self) -> CharIndices<'a> { - self.char_indices() - } -} - -static CHARS: &'static[u8] = b"0123456789abcdef"; - -#[cfg(not(feature = "core"))] -impl HexDisplay for [u8] { - fn offset(&self, second:&[u8]) -> usize { - let fst = self.as_ptr(); - let snd = second.as_ptr(); - - snd as usize - fst as usize - } - - #[allow(unused_variables)] - fn to_hex(&self, chunk_size: usize) -> String { - self.to_hex_from(chunk_size, 0) - } - - #[allow(unused_variables)] - fn to_hex_from(&self, chunk_size: usize, from: usize) -> String { - let mut v = Vec::with_capacity(self.len() * 3); - let mut i = from; - for chunk in self.chunks(chunk_size) { - let s = format!("{:08x}", i); - for &ch in s.as_bytes().iter() { - v.push(ch); - } - v.push('\t' as u8); - - i = i + chunk_size; - - for &byte in chunk { - v.push(CHARS[(byte >> 4) as usize]); - v.push(CHARS[(byte & 0xf) as usize]); - v.push(' ' as u8); - } - if chunk_size > chunk.len() { - for j in 0..(chunk_size - chunk.len()) { - v.push(' ' as u8); - v.push(' ' as u8); - v.push(' ' as u8); - } - } - v.push('\t' as u8); - - for &byte in chunk { - if (byte >=32 && byte <= 126) || byte >= 128 { - v.push(byte); - } else { - v.push('.' as u8); - } - } - v.push('\n' as u8); - } - - String::from_utf8_lossy(&v[..]).into_owned() - } -} - -/// Prints a message if the parser fails -/// -/// The message prints the `Error` or `Incomplete` -/// and the parser's calling code -/// -/// ``` -/// # #[macro_use] extern crate nom; -/// # fn main() { -/// named!(f, dbg!( tag!( "abcd" ) ) ); -/// -/// let a = &b"efgh"[..]; -/// -/// // Will print the following message: -/// // Error(Position(0, [101, 102, 103, 104])) at l.5 by ' tag ! ( "abcd" ) ' -/// f(a); -/// # } -/// ``` -#[macro_export] -macro_rules! dbg ( - ($i: expr, $submac:ident!( $($args:tt)* )) => ( - { - let l = line!(); - match $submac!($i, $($args)*) { - $crate::IResult::Error(a) => { - println!("Error({:?}) at l.{} by ' {} '", a, l, stringify!($submac!($($args)*))); - $crate::IResult::Error(a) - }, - $crate::IResult::Incomplete(a) => { - println!("Incomplete({:?}) at {} by ' {} '", a, l, stringify!($submac!($($args)*))); - $crate::IResult::Incomplete(a) - }, - a => a - } - } - ); - - ($i:expr, $f:ident) => ( - dbg!($i, call!($f)); - ); -); - -/// Prints a message and the input if the parser fails -/// -/// The message prints the `Error` or `Incomplete` -/// and the parser's calling code. -/// -/// It also displays the input in hexdump format -/// -/// ``` -/// # #[macro_use] extern crate nom; -/// # fn main() { -/// named!(f, dbg_dmp!( tag!( "abcd" ) ) ); -/// -/// let a = &b"efghijkl"[..]; -/// -/// // Will print the following message: -/// // Error(Position(0, [101, 102, 103, 104, 105, 106, 107, 108])) at l.5 by ' tag ! ( "abcd" ) ' -/// // 00000000 65 66 67 68 69 6a 6b 6c efghijkl -/// f(a); -/// # } -#[macro_export] -macro_rules! dbg_dmp ( - ($i: expr, $submac:ident!( $($args:tt)* )) => ( - { - use $crate::HexDisplay; - let l = line!(); - match $submac!($i, $($args)*) { - $crate::IResult::Error(a) => { - println!("Error({:?}) at l.{} by ' {} '\n{}", a, l, stringify!($submac!($($args)*)), $i.to_hex(8)); - $crate::IResult::Error(a) - }, - $crate::IResult::Incomplete(a) => { - println!("Incomplete({:?}) at {} by ' {} '\n{}", a, l, stringify!($submac!($($args)*)), $i.to_hex(8)); - $crate::IResult::Incomplete(a) - }, - a => a - } - } - ); - - ($i:expr, $f:ident) => ( - dbg_dmp!($i, call!($f)); - ); -); - -pub fn error_to_list(e:&Err) -> Vec> { - let mut v:Vec> = Vec::new(); - let mut err = e; - loop { - match *err { - Err::Code(ref i) | Err::Position(ref i,_) => { - v.push(i.clone()); - return v; - }, - Err::Node(ref i, ref next) | Err::NodePosition(ref i, _, ref next) => { - v.push(i.clone()); - err = &*next; - } - } - } -} - -pub fn compare_error_paths(e1:&Err, e2:&Err) -> bool { - error_to_list(e1) == error_to_list(e2) -} - -use std::hash::Hash; - -#[cfg(not(feature = "core"))] -pub fn add_error_pattern<'a,I,O,E: Clone+Hash+Eq>(h: &mut HashMap>, &'a str>, res: IResult, message: &'a str) -> bool { - if let IResult::Error(e) = res { - h.insert(error_to_list(&e), message); - true - } else { - false - } -} - -pub fn slice_to_offsets(input: &[u8], s: &[u8]) -> (usize, usize) { - let start = input.as_ptr(); - let off1 = s.as_ptr() as usize - start as usize; - let off2 = off1 + s.len(); - (off1, off2) -} - -#[cfg(not(feature = "core"))] -pub fn prepare_errors(input: &[u8], res: IResult<&[u8],O,E>) -> Option, usize, usize)> > { - if let IResult::Error(e) = res { - let mut v:Vec<(ErrorKind, usize, usize)> = Vec::new(); - let mut err = e.clone(); - loop { - match err { - Err::Position(i,s) => { - let (o1, o2) = slice_to_offsets(input, s); - v.push((i, o1, o2)); - //println!("v is: {:?}", v); - break; - }, - Err::NodePosition(i, s, next) => { - let (o1, o2) = slice_to_offsets(input, s); - v.push((i, o1, o2)); - err = *next; - }, - Err::Node(_, next) => { - err = *next; - }, - Err::Code(_) => { - break; - } - } - } - v.sort_by(|a, b| a.1.cmp(&b.1)); - Some(v) - } else { - None - } -} - -#[cfg(not(feature = "core"))] -pub fn print_error(input: &[u8], res: IResult<&[u8],O,E>) { - if let Some(v) = prepare_errors(input, res) { - let colors = generate_colors(&v); - println!("parser codes: {}", print_codes(colors, HashMap::new())); - println!("{}", print_offsets(input, 0, &v)); - - } else { - println!("not an error"); - } -} - -#[cfg(not(feature = "core"))] -pub fn generate_colors(v: &[(ErrorKind, usize, usize)]) -> HashMap { - let mut h: HashMap = HashMap::new(); - let mut color = 0; - - for &(ref c,_,_) in v.iter() { - h.insert(error_to_u32(c), color + 31); - color = color + 1 % 7; - } - - h -} - -pub fn code_from_offset(v: &[(ErrorKind, usize, usize)], offset: usize) -> Option { - let mut acc: Option<(u32, usize, usize)> = None; - for &(ref ek, s, e) in v.iter() { - let c = error_to_u32(ek); - if s <= offset && offset <=e { - if let Some((_, start, end)) = acc { - if start <= s && e <= end { - acc = Some((c, s, e)); - } - } else { - acc = Some((c, s, e)); - } - } - } - if let Some((code, _, _)) = acc { - return Some(code); - } else { - return None; - } -} - -pub fn reset_color(v: &mut Vec) { - v.push(0x1B); - v.push('[' as u8); - v.push(0); - v.push('m' as u8); -} - -pub fn write_color(v: &mut Vec, color: u8) { - v.push(0x1B); - v.push('[' as u8); - v.push(1); - v.push(';' as u8); - let s = color.to_string(); - let bytes = s.as_bytes(); - v.extend(bytes.iter().cloned()); - v.push('m' as u8); -} - -#[cfg(not(feature = "core"))] -pub fn print_codes(colors: HashMap, names: HashMap) -> String { - let mut v = Vec::new(); - for (code, &color) in &colors { - if let Some(&s) = names.get(&code) { - let bytes = s.as_bytes(); - write_color(&mut v, color); - v.extend(bytes.iter().cloned()); - } else { - let s = code.to_string(); - let bytes = s.as_bytes(); - write_color(&mut v, color); - v.extend(bytes.iter().cloned()); - } - reset_color(&mut v); - v.push(' ' as u8); - } - reset_color(&mut v); - - String::from_utf8_lossy(&v[..]).into_owned() -} - -#[cfg(not(feature = "core"))] -pub fn print_offsets(input: &[u8], from: usize, offsets: &[(ErrorKind, usize, usize)]) -> String { - let mut v = Vec::with_capacity(input.len() * 3); - let mut i = from; - let chunk_size = 8; - let mut current_code: Option = None; - let mut current_code2: Option = None; - - let colors = generate_colors(&offsets); - - for chunk in input.chunks(chunk_size) { - let s = format!("{:08x}", i); - for &ch in s.as_bytes().iter() { - v.push(ch); - } - v.push('\t' as u8); - - let mut k = i; - let mut l = i; - for &byte in chunk { - if let Some(code) = code_from_offset(&offsets, k) { - if let Some(current) = current_code { - if current != code { - reset_color(&mut v); - current_code = Some(code); - if let Some(&color) = colors.get(&code) { - write_color(&mut v, color); - } - } - } else { - current_code = Some(code); - if let Some(&color) = colors.get(&code) { - write_color(&mut v, color); - } - } - } - v.push(CHARS[(byte >> 4) as usize]); - v.push(CHARS[(byte & 0xf) as usize]); - v.push(' ' as u8); - k = k + 1; - } - - reset_color(&mut v); - - if chunk_size > chunk.len() { - for _ in 0..(chunk_size - chunk.len()) { - v.push(' ' as u8); - v.push(' ' as u8); - v.push(' ' as u8); - } - } - v.push('\t' as u8); - - for &byte in chunk { - if let Some(code) = code_from_offset(&offsets, l) { - if let Some(current) = current_code2 { - if current != code { - reset_color(&mut v); - current_code2 = Some(code); - if let Some(&color) = colors.get(&code) { - write_color(&mut v, color); - } - } - } else { - current_code2 = Some(code); - if let Some(&color) = colors.get(&code) { - write_color(&mut v, color); - } - } - } - if (byte >=32 && byte <= 126) || byte >= 128 { - v.push(byte); - } else { - v.push('.' as u8); - } - l = l + 1; - } - reset_color(&mut v); - - v.push('\n' as u8); - i = i + chunk_size; - } - - String::from_utf8_lossy(&v[..]).into_owned() -} - -pub trait AsBytes { - fn as_bytes(&self) -> &[u8]; -} - -impl<'a> AsBytes for &'a str { - #[inline(always)] - fn as_bytes(&self) -> &[u8] { - str::as_bytes(self) - } -} - -impl AsBytes for str { - #[inline(always)] - fn as_bytes(&self) -> &[u8] { - str::as_bytes(self) - } -} - -impl<'a> AsBytes for &'a [u8] { - #[inline(always)] - fn as_bytes(&self) -> &[u8] { - *self - } -} - -impl AsBytes for [u8] { - #[inline(always)] - fn as_bytes(&self) -> &[u8] { - self - } -} - -macro_rules! array_impls { - ($($N:expr)+) => { - $( - impl<'a> AsBytes for &'a [u8; $N] { - #[inline(always)] - fn as_bytes(&self) -> &[u8] { - *self - } - } - - impl AsBytes for [u8; $N] { - #[inline(always)] - fn as_bytes(&self) -> &[u8] { - self - } - } - )+ - }; -} - - -array_impls! { - 0 1 2 3 4 5 6 7 8 9 - 10 11 12 13 14 15 16 17 18 19 - 20 21 22 23 24 25 26 27 28 29 - 30 31 32 -} - -/// indicates which parser returned an error -#[derive(Debug,PartialEq,Eq,Hash,Clone)] -pub enum ErrorKind { - Custom(E), - Tag, - MapRes, - MapOpt, - Alt, - IsNot, - IsA, - SeparatedList, - SeparatedNonEmptyList, - Many1, - Count, - TakeUntilAndConsume, - TakeUntil, - TakeUntilEitherAndConsume, - TakeUntilEither, - LengthValue, - TagClosure, - Alpha, - Digit, - HexDigit, - AlphaNumeric, - Space, - MultiSpace, - LengthValueFn, - Eof, - ExprOpt, - ExprRes, - CondReduce, - Switch, - TagBits, - OneOf, - NoneOf, - Char, - CrLf, - RegexpMatch, - RegexpMatches, - RegexpFind, - RegexpCapture, - RegexpCaptures, - TakeWhile1, - Complete, - Fix, - Escaped, - EscapedTransform, - TagStr, - IsNotStr, - IsAStr, - TakeWhile1Str, - NonEmpty, - ManyMN, - TakeUntilAndConsumeStr, - TakeUntilStr, -} - -pub fn error_to_u32(e: &ErrorKind) -> u32 { - match *e { - ErrorKind::Custom(_) => 0, - ErrorKind::Tag => 1, - ErrorKind::MapRes => 2, - ErrorKind::MapOpt => 3, - ErrorKind::Alt => 4, - ErrorKind::IsNot => 5, - ErrorKind::IsA => 6, - ErrorKind::SeparatedList => 7, - ErrorKind::SeparatedNonEmptyList => 8, - ErrorKind::Many1 => 9, - ErrorKind::Count => 10, - ErrorKind::TakeUntilAndConsume => 11, - ErrorKind::TakeUntil => 12, - ErrorKind::TakeUntilEitherAndConsume => 13, - ErrorKind::TakeUntilEither => 14, - ErrorKind::LengthValue => 15, - ErrorKind::TagClosure => 16, - ErrorKind::Alpha => 17, - ErrorKind::Digit => 18, - ErrorKind::AlphaNumeric => 19, - ErrorKind::Space => 20, - ErrorKind::MultiSpace => 21, - ErrorKind::LengthValueFn => 22, - ErrorKind::Eof => 23, - ErrorKind::ExprOpt => 24, - ErrorKind::ExprRes => 25, - ErrorKind::CondReduce => 26, - ErrorKind::Switch => 27, - ErrorKind::TagBits => 28, - ErrorKind::OneOf => 29, - ErrorKind::NoneOf => 30, - ErrorKind::Char => 40, - ErrorKind::CrLf => 41, - ErrorKind::RegexpMatch => 42, - ErrorKind::RegexpMatches => 43, - ErrorKind::RegexpFind => 44, - ErrorKind::RegexpCapture => 45, - ErrorKind::RegexpCaptures => 46, - ErrorKind::TakeWhile1 => 47, - ErrorKind::Complete => 48, - ErrorKind::Fix => 49, - ErrorKind::Escaped => 50, - ErrorKind::EscapedTransform => 51, - ErrorKind::TagStr => 52, - ErrorKind::IsNotStr => 53, - ErrorKind::IsAStr => 54, - ErrorKind::TakeWhile1Str => 55, - ErrorKind::NonEmpty => 56, - ErrorKind::ManyMN => 57, - ErrorKind::TakeUntilAndConsumeStr => 58, - ErrorKind::HexDigit => 59, - ErrorKind::TakeUntilStr => 60, - } -} diff --git a/deps/nom-1.2.0/.gitignore b/deps/nom-1.2.2/.gitignore similarity index 100% rename from deps/nom-1.2.0/.gitignore rename to deps/nom-1.2.2/.gitignore diff --git a/deps/nom-1.2.2/.travis.yml b/deps/nom-1.2.2/.travis.yml new file mode 100644 index 000000000..adcb4e0eb --- /dev/null +++ b/deps/nom-1.2.2/.travis.yml @@ -0,0 +1,46 @@ +language: rust + +addons: + apt: + packages: + - libcurl4-openssl-dev + - libelf-dev + - libdw-dev + +rust: + - nightly + - beta + - stable + - 1.2.0 + +before_script: + - pip install 'travis-cargo<0.2' --user && export PATH=$HOME/.local/bin:$PATH + +script: + - | + travis-cargo --only 1.2 test -- --features regexp && + travis-cargo --only stable test -- --features "regexp regexp_macros" && + travis-cargo --only beta test -- --features "regexp regexp_macros" && + travis-cargo --only nightly build -- --features "nightly core regexp" && + travis-cargo --only nightly test -- --features "regexp regexp_macros" && + travis-cargo bench && + travis-cargo --only stable doc -- --features "regexp regexp_macros" + +after_success: + - travis-cargo coveralls --no-sudo + +notifications: + webhooks: + urls: + - https://webhooks.gitter.im/e/9c035a194ac4fd4cc061 + on_success: change + on_failure: always + on_start: false + + +env: + global: + # override the default `--features unstable` used for the nightly branch (optional) + - TRAVIS_CARGO_NIGHTLY_FEATURE=nightly + +sudo: false diff --git a/deps/nom-1.2.2/CHANGELOG.md b/deps/nom-1.2.2/CHANGELOG.md new file mode 100644 index 000000000..e41170685 --- /dev/null +++ b/deps/nom-1.2.2/CHANGELOG.md @@ -0,0 +1,497 @@ +# Change Log + +## [Unreleased][unreleased] + +### Changed + +## 1.2.2 - 2016-03-09 + +### Thanks +- @conradev for fixing take_until_s!` +- @GuillaumeGomez for some documentation fixes +- @frewsxcv for some documentation fixes +- @tstorch for some test refactorings + +### Added +- `nom::Err` now implements `std::error::Error` + +### Fixed +- `hex_u32` does not parses more than 8 chars now +- `take_while!` and `take_while1!` will not perturb the behaviour of `recognize!` anymore + +## 1.2.1 - 2016-02-23 + +### Thanks +- @sourrust for adding methods to `IResult` +- @tstorch for the test refactoring, and for adding methods to `IResult` and `Needed` +- @joelself for fixing the method system + +### Added + +- mapping methods over `IResult` and `Needed` + +### Changed + +- `apply_rf` is renamed to `apply_m`. This will not warrant a major version, since it is part missing from the methods feture added in the 1.2.0 release +- the `regexp_macros` feature that used `regex!` to precompile regular expressions has been replaced by the normal regex engine combined with `lazy_static` + +### Fixed + +- when a parser or combinator was returning an empty buffer as remaining part, it was generating one from a static empty string. This was messing with buffer offset calculation. Now, that empty slice is taken like this: `&input[input.len()..]`. +- The `regexp_macros` and `no_std` feature build again and are now tested with Travis CI + +## 1.2.0 - 2016-02-08 + +### Thanks +- @zentner-kyle for type inference fixes +- @joelself for his work on `&str` parsing and method parsers +- @GuillaumeGomez for implementing methods on `IResult` +- @dirk for the `alt_complete!` combinator +- @tstorch for a lot of refactoring work and unit tests additions +- @jansegre for the hex digit parsers +- @belgum for some documentation fixes +- @lwandrebeck for some documentation fixes and code fixes in `hex_digit` + +### Added +- `take_until_and_consume_s!` for consumption of string data until a tag +- more function patterns in `named!`. The error type can now be specified +- `alt_complete!` works like the `alt!` combinator, but tries the next branch if the current one returned `Incomplete`, instead of returning directly +- more unit tests for a lot of combinators +- hexadecimal digit parsers +- the `tuple!` combinator takes a list of parsers as argument, and applies them serially on the input. If all of them are successful, it willr eturn a tuple accumulating all the values. This combinator will (hopefully) replace most uses of `chain!` +- parsers can now be implemented as a method for a struct thanks to the `method!`, `call_m!` and `apply_rf!` combinators + +### Fixed +- there were type inference issues in a few combinators. They will now be easier to compile +- `peek!` compilation with bare functions +- `&str` parsers were splitting data at the byte level, not at the char level, which can result in inconsistencies in parsing UTF-8 characters. They now use character indexes +- some method implementations were missing on `ÌResult` (with specified error type instead of implicit) + +## 1.1.0 - 2016-01-01 + +This release adds a lot of features related to `&str` parsing. The previous versions +were focused on `&[u8]` and bit streams parsing, but there's a need for more text +parsing with nom. The parsing functions like `alpha`, `digit` and others will now +accept either a `&[u8]` or a `&str`, so there is no breaking change on that part. + +There are also a few performance improvements and documentation fixes. + +### Thanks +- @Binero for pushing the work on `&str` parsing +- @meh for fixing `Option` and `Vec` imports +- @hoodie for a documentation fix +- @joelself for some documentation fixes +- @vberger for his traits magic making `nom functions more generic + +### Added + +- string related parsers: `tag_s!`, `take_s!`, `is_a_s!`, `is_not_s!`, `take_while_s!`, `take_while1_s!`, `take_till_s! +- `value!` is a combinator that always returns the same value. If a child parser is passed as second argument, that value is returned when the child parser succeeds + +### Changed + +- `tag!` will now compare even on partial input. If it expects "abcd" but receives "ef", it will now return an `Error` instead of `Incomplete` +- `many0!` and others will preallocate a larger vector to avoid some copies and reallocations +- `alpha`, `digit`, `alphanumeric`, `space` and `multispace` now accept as input a `&[u8]` or a `&str`. Additionally, they return an error if they receive an empty input +- `take_while!`, `take_while1!`, `take_while_s!`, `take_while1_s!` wilreturn an error on empty input + +### Fixed + +- if the child parser of `many0!` or `many1!` returns `Incomplete`, it will return `Incomplete` too, possibly updating the needed size +- `Option,` `Some`, `None` and `Vec` are now used with full path imports + +## 1.0.1 - 2015-11-22 + +This releases makes the 1.0 version compatible with Rust 1.2 and 1.3 + +### Thanks +- @steveklabnik for fixing lifetime issues in Producers and Consumers + +## 1.0.0 - 2015-11-16 + +Stable release for nom. A lot of new features, a few breaking changes + +### Thanks +- @ahenry for macro fixes +- @bluss for fixing documentation +- @sourrust for cleaning code and debugging the new streaming utilities +- @meh for inline optimizations +- @ccmtaylor for fixing function imports +- @soro for improvements to the streaming utilities +- @breard-r for catching my typos +- @nelsonjchen for catching my typos too +- @divarvel for hex string parsers +- @mrordinaire for the `length_bytes!` combinator + +### Breaking changes +- `IResult::Error` can now use custom error types, and is generic over the input type +- Producers and consumers have been replaced. The new implementation uses less memory and integrates more with parsers +- `nom::ErrorCode` is now `nom::ErrorKind` +- `filter!` has been renamed to `take_while!` +- `chain!` will count how much data is consumed and use that number to calculate how much data is needed if a parser returned `Incomplete` +- `alt!` returns `Incomplete` if a child parser returned `Incomplete`, instead of skipping to the next parser +- `IResult` does not require a lifetime tag anymore, yay! + +### Added + +- `complete!` will return an error if the child parser returned `Incomplete` +- `add_error!` will wrap an error, but allow backtracking +- `hex_u32` parser + +### Fixed +- the behaviour around `Incomplete` is better for most parsers now + +## 0.5.0 - 2015-10-16 + +This release fixes a few issues and stabilizes the code. + +### Thanks +- @nox for documentation fixes +- @daboross for linting fixes +- @ahenry for fixing `tap!` and extending `dbg!` and `dbg_dmp!` +- @bluss for tracking down and fixing issues with unsafe code +- @meh for inlining parser functions +- @ccmtaylor for fixing import of `str::from_utf8` + +### Fixed +- `tap!`, `dbg!` and `dbg_dmp!` now accept function parameters + +### Changed +- the type used in `count_fixed!` must be `Copy` +- `chain!` calculates how much data is needed if one of the parsers returns `Incomplete +- optional parsers in `chain!` can return `Incomplete` + +## 0.4.0 - 2015-09-08 + +Considering the number of changes since the last release, this version can contain breaking changes, so the version number becomes 0.4.0. A lot of new features and performance improvements! + +### Thanks +- @frewsxcv for documentation fixes +- @ngrewe for his work on producers and consumers +- @meh for fixes on `chain!` and for the `rest` parser +- @daboross for refactoring `many0!` and `many1!` +- @aleksander for the `switch!` combinator idea +- @TechnoMancer for his help with bit level parsing +- @sxeraverx for pointing out a bug in `is_a!` + +### Fixed +- `count_fixed!` must take an explicit type as argument to generate the fixed-size array +- optional parsing behaviour in `chain!` +- `count!` can take 0 elements +- `is_a!` and `is_not!` can now consume the whole input + +### Added +- it is now possible to seek to the end of a `MemProducer` +- `opt!` returns `Done(input, None)` if `the child parser returned `Incomplete` +- `rest` will return the remaining input +- consumers can now seek to and from the end of input +- `switch!` applies a first parser then matches on its result to choose the next parser +- bit-level parsers +- character-level parsers +- regular expression parsers +- implementation of `take_till!`, `take_while!` and `take_while1!` + +### Changed +- `alt!` can return `Incomplete` +- the error analysis functions will now take references to functions instead of moving them +- performance improvements on producers +- performance improvement for `filter!` +- performance improvement for `count!`: a `Vec` of the right size is directly allocated + +## 0.3.11 - 2015-08-04 + +### Thanks +- @bluss for remarking that the crate included random junk lying non commited in my local repository + +### Fixed +- cleanup of my local repository will ship less files in the crates, resulting in a smaller download + +## 0.3.10 - 2015-08-03 + +### Added + +- `bits!` for bit level parsing. It indicates that all child parsers will take a `(&[u8], usize)`as input, with the second parameter indicating the bit offset in the first byte. This allows viewing a byte slice as a bit stream. Most combinators can be used directly under `bits!` +- `take_bits!` takes an integer type and a number of bits, consumes that number of bits and updates the offset, possibly by crossing byte boundaries +- bit level parsers are all written in `src/bits.rs` + +### Changed + +- Parsers that specifically handle bytes have been moved to src/bytes.rs`. This applies to `tag!`, `is_not!`, `is_a!`, `filter!`, `take!`, `take_str!`, `take_until_and_consume!`, `take_until!`, `take_until_either_and_consume!`, `take_until_either!` + +## 0.3.9 - 2015-07-20 + +### Thanks +- @badboy for fixing `filter!` +- @idmit for some documentation fixes + +### Added +- `opt_res!` applies a parser and transform its result in a Result. This parser never fails +- `cond_reduce!` takes an expression as parameter, applies the parser if the expression is true, and returns an error if the expression is false +- `tap!` pass the result of a parser to a block to manipulate it, but do not affect the parser's result +- `AccReader` is a Read+BufRead that supports data accumulation and partial consumption. The `consume` method must be called afterwardsto indicate how much was consumed +- Arithmetic expression evaluation and parsing example +- `u16!`, `u32!`, `u64!`, `i16!`, `i32!`, `i64!` take an expression as parameter, if the expression is true, apply the big endian integer parser, if false, the little endian version +- type information for combinators. This will make the documentation a bit easier to navigate + +### Fixed +- `map_opt!` and `map_res!` had issues with argument order due to bad macros +- `delimited!` did not compile for certain combinations of arguments +- `filter!` did not return a byte slice but a fixed array + +## 0.3.8 - 2015-07-03 + +### Added +- code coverage is now calculated automatically on Travis CI +- `Stepper`: wrap a `Producer`, and call the method `step` with a parser. This method will buffer data if there is not enough, apply the parser if there is, and keep the rest of the input in memory for the next call +- `ReadProducer`: takes something implementing `Read`, and makes a `Producer` out of it + +### Fixed +- the combinators `separated_pair!` and `delimited!` did not work because an implementation macro was not exported +- if a `MemProducer` reached its end, it should always return `Eof` +- `map!` had issues with argument matching + +## 0.3.7 - 2015-06-24 + +### Added +- `expr_res!` and `expr_opt!` evaluate an expression returning a Result or Opt and convert it to IResult +- `AsBytes` is implemented for fixed size arrays. This allows `tag!([41u8, 42u8])` + +### Fixed +- `count_fixed!` argument parsing works again + +## 0.3.6 - 2015-06-15 + +### Added +- documentation for a few functions +- the consumer trait now requires the `failed(&self, error_code)` method in case of parsing error +- `named!` now handles thge alternative `named!(pub fun_name, ...)` + +### Fixed +- `filter!` now returns the whole input if the filter function never returned false +- `take!` casts its argument as usize, so it can accepts any integer type now + +## 0.3.5 - 2015-06-10 + +### Thanks +- @cmr for some documentation fixes + +### Added +- `count_fixed!` returns a fixed array + +### Fixed +- `count!` is back to the previous behaviour, returning a `Vec` for sizes known at runtime + +### Changed +- functions and traits exported from `nom::util` are now directly in `nom::` + +## 0.3.4 - 2015-06-09 + +### Thanks +- @andrew-d for fixes on `cond!` +- @keruspe for features in `chain!` + +### Added +- `chain!` can now have mutable fields + +### Fixed +- `cond!` had an infinite macro recursion + +### Changed +- `chain!` generates less code now. No apprent compilation time improvement + +## 0.3.3 - 2015-06-09 + +### Thanks +- @andrew-d for the little endian signed integer parsers +- @keruspe for fixes on `count!` + +### Added +- `le_i8`, `le_i16`, `le_i32`, `le_i64`: little endian signed integer parsers + +### Changed +- the `alt!` parser compiles much faster, even with more than 8 branches +- `count!` can now return a fixed size array instead of a growable vector + +## 0.3.2 - 2015-05-31 + +### Thanks +- @keruspe for the `take_str` parser and the function application combinator + +### Added +- `take_str!`: takes the specified number of bytes and return a UTF-8 string +- `apply!`: do partial application on the parameters of a function + +### Changed +- `Needed::Size` now contains a `usize` instead of a `u32` + +## 0.3.1 - 2015-05-21 + +### Thanks +- @divarvel for the big endian signed integer parsers + +### Added +- `be_i8`, `be_i16`, `be_i32`, `be_i64`: big endian signed integer parsers +- the `core` feature can be passed to cargo to build with `no_std` +- colored hexdump can be generated from error chains + +## 0.3.0 - 2015-05-07 + +### Thanks +- @filipegoncalves for some documentation and the new eof parser +- @CrimsonVoid for putting fully qualified types in the macros +- @lu_zero for some documentation fixes + +### Added +- new error types that can contain an error code, an input slice, and a list of following errors +- `error!` will cut backtracking and return directly from the parser, with a specified error code +- `eof` parser, successful if there is no more input +- specific error codes for the parsers provided by nom + +### Changed +- fully qualified types in macros. A lot of imports are not needed anymore + +### Removed +- `FlatMap`, `FlatpMapOpt` and `Functor` traits (replaced by `map!`, `map_opt!` and `map_res!`) + +## 0.2.2 - 2015-04-12 + +### Thanks +- @filipegoncalves and @thehydroimpulse for debugging an infinite loop in many0 and many1 +- @thehydroimpulse for suggesting public named parsers +- @skade for removing the dependency on the collections gate + +### Added +- `named!` can now declare public functions like this: `named!(pub tst, tag!("abcd"));` +- `pair!(X,Y)` returns a tuple `(x, y)` +- `separated_pair!(X, sep, Y)` returns a tuple `(x, y)` +- `preceded!(opening, X)` returns `x` +- `terminated!(X, closing)` returns `x` +- `delimited(opening, X, closing)` returns `x` +- `separated_list(sep, X)` returns a `Vec` +- `separated_nonempty_list(sep, X)` returns a `Vec` of at list one element + +### Changed +- `many0!` and `many1!` forbid parsers that do not consume input +- `is_a!`, `is_not!`, `alpha`, `digit`, `space`, `multispace` will now return an error if they do not consume at least one byte + +## 0.2.1 - 2015-04-04 + +### Thanks +- @mtsr for catching the remaining debug println! +- @jag426 who killed a lot of warnings +- @skade for removing the dependency on the core feature gate + + +### Added +- little endian unsigned int parsers le_u8, le_u16, le_u32, le_u64 +- `count!` to apply a parser a specified number of times +- `cond!` applies a parser if the condition is met +- more parser development tools in `util::*` + +### Fixed +- in one case, `opt!` would not compile + +### Removed +- most of the feature gates are now removed. The only one still needed is `collections` + +## 0.2.0 - 2015-03-24 +*works with `rustc 1.0.0-dev (81e2396c7 2015-03-19) (built 2015-03-19)`* + +### Thanks +- Ryman for the AsBytes implementation +- jag426 and jaredly for documentation fixes +- eternaleye on #rust IRC for his help on the new macro syntax + +### Changed +- the AsBytes trait improves readability, no more b"...", but "..." instead +- Incomplete will now hold either Needed;;Unknown, or Needed::Size(u32). Matching on Incomplete without caring for the value is done with `Incomplete(_)`, but if more granularity is mandatory, `Needed` can be matched too +- `alt!` can pass the result of the parser to a closure +- the `take_*` macros changed behaviour, the default case is now not to consume the separator. The macros have been renamed as follows: `take_until!` -> `take_until_and_consume!`, `take_until_and_leave!` -> `take_until!`, `take_until_either_and_leave!` -> `take_until_either!`, `take_until_either!` -> `take_until_either_and_consume!` + +### Added +- `peek!` macro: matches the future input but does not consume it +- `length_value!` macro: the first argument is a parser returning a `n` that can cast to usize, then applies the second parser `n` times. The macro has a variant with a third argument indicating the expected input size for the second parser +- benchmarks are available at https://github.com/Geal/nom_benchmarks +- more documentation +- **Unnamed parser syntax**: warning, this is a breaking change. With this new syntax, the macro combinators do not generate functions anymore, they create blocks. That way, they can be nested, for better readability. The `named!` macro is provided to create functions from parsers. Please be aware that nesting parsers comes with a small cost of compilation time, negligible in most cases, but can quickly get to the minutes scale if not careful. If this happens, separate your parsers in multiple subfunctions. +- `named!`, `closure!` and `call!` macros used to support the unnamed syntax +- `map!`, `map_opt!` and `map_res!` to combine a parser with a normal function, transforming the input directly, or returning an `Option` or `Result` + +### Fixed +- `is_a!` is now working properly + +### Removed +- the `o!` macro does less than `chain!`, so it has been removed +- the `fold0!` and `fold1!` macros were too complex and awkward to use, the `many*` combinators will be useful for most uses for now + +## 0.1.6 - 2015-02-24 +### Changed +- consumers must have an end method that will be called after parsing + +### Added +- big endian unsigned int and float parsers: be_u8, be_u16, be_u32, be_u64, be_f32, be_f64 +- producers can seek +- function and macros documentation +- README documentation +### Fixed +- lifetime declarations +- tag! can return Incomplete + +## 0.1.5 - 2015-02-17 +### Changed +- traits were renamed: FlatMapper -> FlatMap, Mapper -> FlatMapOpt, Mapper2 -> Functor + +### Fixed +- woeks with rustc f1bb6c2f4 + +## 0.1.4 - 2015-02-17 +### Changed +- the chaining macro can take optional arguments with '?' + +## 0.1.3 - 2015-02-16 +### Changed +- the chaining macro now takes the closure at the end of the argument list + +## 0.1.2 - 2015-02-16 +### Added +- flat_map implementation for <&[u8], &[u8]> +- chaining macro +- partial MP4 parser example + + +## 0.1.1 - 2015-02-06 +### Fixed +- closure syntax change + +## Compare code + +* [unreleased]: https://github.com/Geal/nom/compare/1.2.2...HEAD +* [1.2.1]: https://github.com/Geal/nom/compare/1.2.1...1.2.2 +* [1.2.0]: https://github.com/Geal/nom/compare/1.2.0...1.2.1 +* [1.2.0]: https://github.com/Geal/nom/compare/1.1.0...1.2.0 +* [1.1.0]: https://github.com/Geal/nom/compare/1.0.1...1.1.0 +* [1.0.1]: https://github.com/Geal/nom/compare/1.0.0...1.0.1 +* [1.0.0]: https://github.com/Geal/nom/compare/0.5.0...1.0.0 +* [0.5.0]: https://github.com/geal/nom/compare/0.4.0...0.5.0 +* [0.4.0]: https://github.com/geal/nom/compare/0.3.11...0.4.0 +* [0.3.11]: https://github.com/geal/nom/compare/0.3.10...0.3.11 +* [0.3.10]: https://github.com/geal/nom/compare/0.3.9...0.3.10 +* [0.3.9]: https://github.com/geal/nom/compare/0.3.8...0.3.9 +* [0.3.8]: https://github.com/Geal/nom/compare/0.3.7...0.3.8 +* [0.3.7]: https://github.com/Geal/nom/compare/0.3.6...0.3.7 +* [0.3.6]: https://github.com/Geal/nom/compare/0.3.5...0.3.6 +* [0.3.5]: https://github.com/Geal/nom/compare/0.3.4...0.3.5 +* [0.3.4]: https://github.com/Geal/nom/compare/0.3.3...0.3.4 +* [0.3.3]: https://github.com/Geal/nom/compare/0.3.2...0.3.3 +* [0.3.2]: https://github.com/Geal/nom/compare/0.3.1...0.3.2 +* [0.3.1]: https://github.com/Geal/nom/compare/0.3.0...0.3.1 +* [0.3.0]: https://github.com/Geal/nom/compare/0.2.2...0.3.0 +* [0.2.2]: https://github.com/Geal/nom/compare/0.2.1...0.2.2 +* [0.2.1]: https://github.com/Geal/nom/compare/0.2.0...0.2.1 +* [0.2.0]: https://github.com/Geal/nom/compare/0.1.6...0.2.0 +* [0.1.6]: https://github.com/Geal/nom/compare/0.1.5...0.1.6 +* [0.1.5]: https://github.com/Geal/nom/compare/0.1.4...0.1.5 +* [0.1.4]: https://github.com/Geal/nom/compare/0.1.3...0.1.4 +* [0.1.3]: https://github.com/Geal/nom/compare/0.1.2...0.1.3 +* [0.1.2]: https://github.com/Geal/nom/compare/0.1.1...0.1.2 +* [0.1.1]: https://github.com/Geal/nom/compare/0.1.0...0.1.1 diff --git a/deps/nom-1.2.2/Cargo.toml b/deps/nom-1.2.2/Cargo.toml new file mode 100644 index 000000000..64c70dbf6 --- /dev/null +++ b/deps/nom-1.2.2/Cargo.toml @@ -0,0 +1,38 @@ +[package] + +name = "nom" +version = "1.2.2" +authors = [ "contact@geoffroycouprie.com" ] +description = "A byte-oriented, zero-copy, parser combinators library" +license = "MIT" +repository = "https://github.com/Geal/nom" +readme = "README.md" +documentation = "http://rust.unhandledexpression.com/nom/" +keywords = ["parser", "parser-combinators", "parsing", "streaming", "bit"] + +include = [ + "CHANGELOG.md", + "LICENSE", + ".gitignore", + ".travis.yml", + "Cargo.toml", + "src/*.rs", + "tests/*.rs" +] + +[features] +core = [] +nightly = [] +default = ["stream"] +regexp = ["regex"] +regexp_macros = ["regexp", "lazy_static"] +stream = [] + +[dependencies.regex] +version = "^0.1.41" +optional = true + +[dependencies.lazy_static] +version = "^0.1.15" +optional = true + diff --git a/deps/nom-1.2.0/LICENSE b/deps/nom-1.2.2/LICENSE similarity index 100% rename from deps/nom-1.2.0/LICENSE rename to deps/nom-1.2.2/LICENSE diff --git a/deps/nom-1.2.0/src/bits.rs b/deps/nom-1.2.2/src/bits.rs similarity index 100% rename from deps/nom-1.2.0/src/bits.rs rename to deps/nom-1.2.2/src/bits.rs diff --git a/deps/nom-1.2.2/src/bytes.rs b/deps/nom-1.2.2/src/bytes.rs new file mode 100644 index 000000000..2e3735091 --- /dev/null +++ b/deps/nom-1.2.2/src/bytes.rs @@ -0,0 +1,1023 @@ +//! Byte level parsers and combinators +//! + +/// `recognize!(&[T] -> IResult<&[T], O> ) => &[T] -> IResult<&[T], &[T]>` +/// if the child parser was successful, return the consumed input as produced value +/// +/// ``` +/// # #[macro_use] extern crate nom; +/// # use nom::IResult::Done; +/// # fn main() { +/// named!(x, recognize!(delimited!(tag!("")))); +/// let r = x(&b" aaa"[..]); +/// assert_eq!(r, Done(&b" aaa"[..], &b""[..])); +/// # } +/// ``` +#[macro_export] +macro_rules! recognize ( + ($i:expr, $submac:ident!( $($args:tt)* )) => ( + { + use $crate::HexDisplay; + match $submac!($i, $($args)*) { + $crate::IResult::Done(i,_) => { + let index = ($i).offset(i); + $crate::IResult::Done(i, &($i)[..index]) + }, + $crate::IResult::Error(e) => return $crate::IResult::Error(e), + $crate::IResult::Incomplete(i) => return $crate::IResult::Incomplete(i) + } + } + ); + ($i:expr, $f:expr) => ( + recognize!($i, call!($f)) + ); +); + +/// `tag!(&[T]: nom::AsBytes) => &[T] -> IResult<&[T], &[T]>` +/// declares a byte array as a suite to recognize +/// +/// consumes the recognized characters +/// +/// ``` +/// # #[macro_use] extern crate nom; +/// # use nom::IResult::Done; +/// # fn main() { +/// named!(x, tag!("abcd")); +/// let r = x(&b"abcdefgh"[..]); +/// assert_eq!(r, Done(&b"efgh"[..], &b"abcd"[..])); +/// # } +/// ``` +#[macro_export] +macro_rules! tag ( + ($i:expr, $inp: expr) => ( + { + #[inline(always)] + fn as_bytes(b: &T) -> &[u8] { + b.as_bytes() + } + + let expected = $inp; + let bytes = as_bytes(&expected); + + tag_bytes!($i,bytes) + } + ); +); + +#[doc(hidden)] +#[macro_export] +macro_rules! tag_bytes ( + ($i:expr, $bytes: expr) => ( + { + let len = $i.len(); + let blen = $bytes.len(); + let m = if len < blen { len } else { blen }; + let reduced = &$i[..m]; + let b = &$bytes[..m]; + + let res: $crate::IResult<_,_> = if reduced != b { + $crate::IResult::Error($crate::Err::Position($crate::ErrorKind::Tag, $i)) + } else if m < blen { + $crate::IResult::Incomplete($crate::Needed::Size(blen)) + } else { + $crate::IResult::Done(&$i[blen..], reduced) + }; + res + } + ); +); + +/// `is_not!(&[T:AsBytes]) => &[T] -> IResult<&[T], &[T]>` +/// returns the longest list of bytes that do not appear in the provided array +/// +/// ``` +/// # #[macro_use] extern crate nom; +/// # use nom::IResult::Done; +/// # fn main() { +/// named!( not_space, is_not!( " \t\r\n" ) ); +/// +/// let r = not_space(&b"abcdefgh\nijkl"[..]); +/// assert_eq!(r, Done(&b"\nijkl"[..], &b"abcdefgh"[..])); +/// # } +/// ``` +#[macro_export] +macro_rules! is_not( + ($input:expr, $arr:expr) => ( + { + #[inline(always)] + fn as_bytes(b: &T) -> &[u8] { + b.as_bytes() + } + + let expected = $arr; + let bytes = as_bytes(&expected); + + is_not_bytes!($input, bytes) + } + ); +); + +#[doc(hidden)] +#[macro_export] +macro_rules! is_not_bytes ( + ($input:expr, $bytes:expr) => ( + { + use $crate::InputLength; + let res: $crate::IResult<_,_> = match $input.iter().position(|c| { + for &i in $bytes.iter() { + if *c == i { return true } + } + false + }) { + Some(0) => $crate::IResult::Error($crate::Err::Position($crate::ErrorKind::IsNot,$input)), + Some(n) => { + let res = $crate::IResult::Done(&$input[n..], &$input[..n]); + res + }, + None => { + $crate::IResult::Done(&$input[$input.input_len()..], $input) + } + }; + res + } + ); +); + +/// `is_a!(&[T]) => &[T] -> IResult<&[T], &[T]>` +/// returns the longest list of bytes that appear in the provided array +/// +/// ``` +/// # #[macro_use] extern crate nom; +/// # use nom::IResult::Done; +/// # fn main() { +/// named!(abcd, is_a!( "abcd" )); +/// +/// let r1 = abcd(&b"aaaaefgh"[..]); +/// assert_eq!(r1, Done(&b"efgh"[..], &b"aaaa"[..])); +/// +/// let r2 = abcd(&b"dcbaefgh"[..]); +/// assert_eq!(r2, Done(&b"efgh"[..], &b"dcba"[..])); +/// # } +/// ``` +#[macro_export] +macro_rules! is_a ( + ($input:expr, $arr:expr) => ( + { + #[inline(always)] + fn as_bytes(b: &T) -> &[u8] { + b.as_bytes() + } + + let expected = $arr; + let bytes = as_bytes(&expected); + + is_a_bytes!($input, bytes) + } + ); +); + +#[doc(hidden)] +#[macro_export] +macro_rules! is_a_bytes ( + ($input:expr, $bytes:expr) => ( + { + use $crate::InputLength; + let res: $crate::IResult<_,_> = match $input.iter().position(|c| { + for &i in $bytes.iter() { + if *c == i { return false } + } + true + }) { + Some(0) => $crate::IResult::Error($crate::Err::Position($crate::ErrorKind::IsA,$input)), + Some(n) => { + let res: $crate::IResult<_,_> = $crate::IResult::Done(&$input[n..], &$input[..n]); + res + }, + None => { + $crate::IResult::Done(&$input[($input).input_len()..], $input) + } + }; + res + } + ); +); + +/// `escaped!(&[T] -> IResult<&[T], &[T]>, T, &[T] -> IResult<&[T], &[T]>) => &[T] -> IResult<&[T], &[T]>` +/// matches a byte string with escaped characters. +/// +/// The first argument matches the normal characters (it must not accept the control character), the second argument is the control character (like `\` in most languages), +/// the third argument matches the escaped characters +/// +/// ``` +/// # #[macro_use] extern crate nom; +/// # use nom::IResult::Done; +/// # use nom::alpha; +/// # fn main() { +/// named!(esc, escaped!(call!(alpha), '\\', is_a_bytes!(&b"\"n\\"[..]))); +/// assert_eq!(esc(&b"abcd"[..]), Done(&b""[..], &b"abcd"[..])); +/// assert_eq!(esc(&b"ab\\\"cd"[..]), Done(&b""[..], &b"ab\\\"cd"[..])); +/// # } +/// ``` +#[macro_export] +macro_rules! escaped ( + ($i:expr, $submac:ident!( $($args:tt)* ), $control_char: expr, $($rest:tt)+) => ( + { + escaped1!($i, $submac!($($args)*), $control_char, $($rest)*) + } + ); + + ($i:expr, $f:expr, $control_char: expr, $($rest:tt)+) => ( + escaped1!($i, call!($f), $control_char, $($rest)*) + ); +); + +/// Internal parser, do not use directly +#[doc(hidden)] +#[macro_export] +macro_rules! escaped1 ( + ($i:expr, $submac1:ident!( $($args:tt)* ), $control_char: expr, $submac2:ident!( $($args2:tt)*) ) => ( + { + escaped_impl!($i, $submac1!($($args)*), $control_char, $submac2!($($args2)*)) + } + ); + ($i:expr, $submac1:ident!( $($args:tt)* ), $control_char: expr, $g:expr) => ( + escaped_impl!($i, $submac1!($($args)*), $control_char, call!($g)) + ); +); + +#[doc(hidden)] +#[macro_export] +macro_rules! escaped_impl ( + ($i: expr, $normal:ident!( $($args:tt)* ), $control_char: expr, $escapable:ident!( $($args2:tt)* )) => ( + { + use $crate::InputLength; + let cl = || { + use $crate::HexDisplay; + let mut index = 0; + + while index < $i.len() { + if let $crate::IResult::Done(i,_) = $normal!(&$i[index..], $($args)*) { + if i.is_empty() { + return $crate::IResult::Done(&$i[$i.input_len()..], $i) + } else { + index = $i.offset(i); + } + } else if $i[index] == $control_char as u8 { + if index + 1 >= $i.len() { + return $crate::IResult::Error($crate::Err::Position($crate::ErrorKind::Escaped,&$i[index..])); + } else { + match $escapable!(&$i[index+1..], $($args2)*) { + $crate::IResult::Done(i,_) => { + if i.is_empty() { + return $crate::IResult::Done(&$i[$i.input_len()..], $i) + } else { + index = $i.offset(i); + } + }, + $crate::IResult::Incomplete(i) => return $crate::IResult::Incomplete(i), + $crate::IResult::Error(e) => return $crate::IResult::Error(e) + } + } + } else { + if index == 0 { + return $crate::IResult::Error($crate::Err::Position($crate::ErrorKind::Escaped,&$i[index..])) + } else { + return $crate::IResult::Done(&$i[index..], &$i[..index]) + } + } + } + $crate::IResult::Done(&$i[index..], &$i[..index]) + }; + match cl() { + $crate::IResult::Incomplete(x) => $crate::IResult::Incomplete(x), + $crate::IResult::Done(i, o) => $crate::IResult::Done(i, o), + $crate::IResult::Error(e) => { + return $crate::IResult::Error($crate::Err::NodePosition($crate::ErrorKind::Escaped, $i, Box::new(e))) + } + } + } + ); +); + +/// `escaped_transform!(&[T] -> IResult<&[T], &[T]>, T, &[T] -> IResult<&[T], &[T]>) => &[T] -> IResult<&[T], Vec>` +/// matches a byte string with escaped characters. +/// +/// The first argument matches the normal characters (it must not match the control character), the second argument is the control character (like `\` in most languages), +/// the third argument matches the escaped characters and trnasforms them. +/// +/// As an example, the chain `abc\tdef` could be `abc def` (it also consumes the control character) +/// +/// ``` +/// # #[macro_use] extern crate nom; +/// # use nom::IResult::Done; +/// # use nom::alpha; +/// # use std::str::from_utf8; +/// # fn main() { +/// fn to_s(i:Vec) -> String { +/// String::from_utf8_lossy(&i).into_owned() +/// } + +/// named!(transform < String >, +/// map!( +/// escaped_transform!(call!(alpha), '\\', +/// alt!( +/// tag!("\\") => { |_| &b"\\"[..] } +/// | tag!("\"") => { |_| &b"\""[..] } +/// | tag!("n") => { |_| &b"\n"[..] } +/// ) +/// ), to_s +/// ) +/// ); +/// assert_eq!(transform(&b"ab\\\"cd"[..]), Done(&b""[..], String::from("ab\"cd"))); +/// # } +/// ``` +#[macro_export] +macro_rules! escaped_transform ( + ($i:expr, $submac:ident!( $($args:tt)* ), $control_char: expr, $($rest:tt)+) => ( + { + escaped_transform1!($i, $submac!($($args)*), $control_char, $($rest)*) + } + ); + + ($i:expr, $f:expr, $control_char: expr, $($rest:tt)+) => ( + escaped_transform1!($i, call!($f), $control_char, $($rest)*) + ); +); + +/// Internal parser, do not use directly +#[doc(hidden)] +#[macro_export] +macro_rules! escaped_transform1 ( + ($i:expr, $submac1:ident!( $($args:tt)* ), $control_char: expr, $submac2:ident!( $($args2:tt)*) ) => ( + { + escaped_transform_impl!($i, $submac1!($($args)*), $control_char, $submac2!($($args2)*)) + } + ); + ($i:expr, $submac1:ident!( $($args:tt)* ), $control_char: expr, $g:expr) => ( + escaped_transform_impl!($i, $submac1!($($args)*), $control_char, call!($g)) + ); +); + +#[doc(hidden)] +#[macro_export] +macro_rules! escaped_transform_impl ( + ($i: expr, $normal:ident!( $($args:tt)* ), $control_char: expr, $transform:ident!( $($args2:tt)* )) => ( + { + use $crate::InputLength; + let cl = || { + use $crate::HexDisplay; + let mut index = 0; + let mut res = Vec::new(); + + while index < $i.len() { + if let $crate::IResult::Done(i,o) = $normal!(&$i[index..], $($args)*) { + res.extend(o.iter().cloned()); + if i.is_empty() { + return $crate::IResult::Done(&$i[$i.input_len()..], res) + } else { + index = $i.offset(i); + } + } else if $i[index] == $control_char as u8 { + if index + 1 >= $i.len() { + return $crate::IResult::Error($crate::Err::Position($crate::ErrorKind::EscapedTransform,&$i[index..])); + } else { + match $transform!(&$i[index+1..], $($args2)*) { + $crate::IResult::Done(i,o) => { + res.extend(o.iter().cloned()); + if i.is_empty() { + return $crate::IResult::Done(&$i[$i.input_len()..], res) + } else { + index = $i.offset(i); + } + }, + $crate::IResult::Incomplete(i) => return $crate::IResult::Incomplete(i), + $crate::IResult::Error(e) => return $crate::IResult::Error(e) + } + } + } else { + if index == 0 { + return $crate::IResult::Error($crate::Err::Position($crate::ErrorKind::EscapedTransform,&$i[index..])) + } else { + return $crate::IResult::Done(&$i[index..], res) + } + } + } + $crate::IResult::Done(&$i[index..], res) + }; + match cl() { + $crate::IResult::Incomplete(x) => $crate::IResult::Incomplete(x), + $crate::IResult::Done(i, o) => $crate::IResult::Done(i, o), + $crate::IResult::Error(e) => { + return $crate::IResult::Error($crate::Err::NodePosition($crate::ErrorKind::EscapedTransform, $i, Box::new(e))) + } + } + } + ) +); + +/// `take_while!(T -> bool) => &[T] -> IResult<&[T], &[T]>` +/// returns the longest list of bytes until the provided function fails. +/// +/// The argument is either a function `T -> bool` or a macro returning a `bool +/// +/// ``` +/// # #[macro_use] extern crate nom; +/// # use nom::IResult::Done; +/// # use nom::is_alphanumeric; +/// # fn main() { +/// named!( alpha, take_while!( is_alphanumeric ) ); +/// +/// let r = alpha(&b"abcd\nefgh"[..]); +/// assert_eq!(r, Done(&b"\nefgh"[..], &b"abcd"[..])); +/// # } +/// ``` +#[macro_export] +macro_rules! take_while ( + ($input:expr, $submac:ident!( $($args:tt)* )) => ( + { + match $input.iter().position(|c| !$submac!(*c, $($args)*)) { + Some(n) => { + let res:$crate::IResult<_,_> = $crate::IResult::Done(&$input[n..], &$input[..n]); + res + }, + None => { + $crate::IResult::Done(&$input[($input).len()..], $input) + } + } + } + ); + ($input:expr, $f:expr) => ( + take_while!($input, call!($f)); + ); +); + +/// `take_while1!(&[T] -> bool) => &[T] -> IResult<&[T], &[T]>` +/// returns the longest (non empty) list of bytes until the provided function fails. +/// +/// The argument is either a function `&[T] -> bool` or a macro returning a `bool +#[macro_export] +macro_rules! take_while1 ( + ($input:expr, $submac:ident!( $($args:tt)* )) => ( + { + use $crate::InputLength; + if ($input).input_len() == 0 { + $crate::IResult::Error($crate::Err::Position($crate::ErrorKind::TakeWhile1,$input)) + } else { + match $input.iter().position(|c| !$submac!(*c, $($args)*)) { + Some(0) => $crate::IResult::Error($crate::Err::Position($crate::ErrorKind::TakeWhile1,$input)), + Some(n) => { + $crate::IResult::Done(&$input[n..], &$input[..n]) + }, + None => { + $crate::IResult::Done(&$input[($input).len()..], $input) + } + } + } + } + ); + ($input:expr, $f:expr) => ( + take_while1!($input, call!($f)); + ); +); + +/// `take_till!(T -> bool) => &[T] -> IResult<&[T], &[T]>` +/// returns the longest list of bytes until the provided function succeeds +/// +/// The argument is either a function `&[T] -> bool` or a macro returning a `bool +#[macro_export] +macro_rules! take_till ( + ($input:expr, $submac:ident!( $($args:tt)* )) => ( + + { + match $input.iter().position(|c| $submac!(c, $($args)*)) { + Some(n) => $crate::IResult::Done(&$input[n..], &$input[..n]), + None => $crate::IResult::Done(&$input[($input).input_len()..], $input) + } + } + ); + ($input:expr, $f:expr) => ( + take_till!($input, call!($f)); + ); +); + +/// `take!(nb) => &[T] -> IResult<&[T], &[T]>` +/// generates a parser consuming the specified number of bytes +/// +/// ``` +/// # #[macro_use] extern crate nom; +/// # use nom::IResult::Done; +/// # fn main() { +/// // Desmond parser +/// named!(take5, take!( 5 ) ); +/// +/// let a = b"abcdefgh"; +/// +/// assert_eq!(take5(&a[..]), Done(&b"fgh"[..], &b"abcde"[..])); +/// # } +/// ``` +#[macro_export] +macro_rules! take ( + ($i:expr, $count:expr) => ( + { + let cnt = $count as usize; + let res: $crate::IResult<_,_> = if $i.len() < cnt { + $crate::IResult::Incomplete($crate::Needed::Size(cnt)) + } else { + $crate::IResult::Done(&$i[cnt..],&$i[0..cnt]) + }; + res + } + ); +); + +/// `take!(nb) => &[T] -> IResult<&[T], &str>` +/// same as take! but returning a &str +#[macro_export] +macro_rules! take_str ( + ( $i:expr, $size:expr ) => ( map_res!($i, take!($size), ::std::str::from_utf8) ); +); + +/// `take_until_and_consume!(tag) => &[T] -> IResult<&[T], &[T]>` +/// generates a parser consuming bytes until the specified byte sequence is found, and consumes it +#[macro_export] +macro_rules! take_until_and_consume( + ($i:expr, $inp:expr) => ( + { + #[inline(always)] + fn as_bytes(b: &T) -> &[u8] { + b.as_bytes() + } + + let expected = $inp; + let bytes = as_bytes(&expected); + take_until_and_consume_bytes!($i, bytes) + } + ); +); + +#[doc(hidden)] +#[macro_export] +macro_rules! take_until_and_consume_bytes ( + ($i:expr, $bytes:expr) => ( + { + let res: $crate::IResult<_,_> = if $bytes.len() > $i.len() { + $crate::IResult::Incomplete($crate::Needed::Size($bytes.len())) + } else { + let mut index = 0; + let mut parsed = false; + + for idx in 0..$i.len() { + if idx + $bytes.len() > $i.len() { + index = idx; + break; + } + if &$i[idx..idx + $bytes.len()] == $bytes { + parsed = true; + index = idx; + break; + } + } + + if parsed { + $crate::IResult::Done(&$i[(index + $bytes.len())..], &$i[0..index]) + } else { + $crate::IResult::Error($crate::Err::Position($crate::ErrorKind::TakeUntilAndConsume,$i)) + } + }; + res + } + ); +); + +/// `take_until!(tag) => &[T] -> IResult<&[T], &[T]>` +/// consumes data until it finds the specified tag +#[macro_export] +macro_rules! take_until( + ($i:expr, $inp:expr) => ( + { + #[inline(always)] + fn as_bytes(b: &T) -> &[u8] { + b.as_bytes() + } + + let expected = $inp; + let bytes = as_bytes(&expected); + take_until_bytes!($i, bytes) + } + ); +); + +#[doc(hidden)] +#[macro_export] +macro_rules! take_until_bytes( + ($i:expr, $bytes:expr) => ( + { + let res: $crate::IResult<_,_> = if $bytes.len() > $i.len() { + $crate::IResult::Incomplete($crate::Needed::Size($bytes.len())) + } else { + let mut index = 0; + let mut parsed = false; + + for idx in 0..$i.len() { + if idx + $bytes.len() > $i.len() { + index = idx; + break; + } + if &$i[idx..idx+$bytes.len()] == $bytes { + parsed = true; + index = idx; + break; + } + } + + if parsed { + $crate::IResult::Done(&$i[index..], &$i[0..index]) + } else { + $crate::IResult::Error($crate::Err::Position($crate::ErrorKind::TakeUntil,$i)) + } + }; + res + } + ); +); + +/// `take_until_either_and_consume!(tag) => &[T] -> IResult<&[T], &[T]>` +/// consumes data until it finds any of the specified characters, and consume it +#[macro_export] +macro_rules! take_until_either_and_consume( + ($i:expr, $inp:expr) => ( + { + #[inline(always)] + fn as_bytes(b: &T) -> &[u8] { + b.as_bytes() + } + + let expected = $inp; + let bytes = as_bytes(&expected); + take_until_either_and_consume_bytes!($i, bytes) + } + ); +); + +#[doc(hidden)] +#[macro_export] +macro_rules! take_until_either_and_consume_bytes( + ($i:expr, $bytes:expr) => ( + { + let res: $crate::IResult<_,_> = if 1 > $i.len() { + $crate::IResult::Incomplete($crate::Needed::Size(1)) + } else { + let mut index = 0; + let mut parsed = false; + + for idx in 0..$i.len() { + if idx + 1 > $i.len() { + index = idx; + break; + } + for &t in $bytes.iter() { + if $i[idx] == t { + parsed = true; + index = idx; + break; + } + } + if parsed { break; } + } + + if parsed { + $crate::IResult::Done(&$i[(index+1)..], &$i[0..index]) + } else { + $crate::IResult::Error($crate::Err::Position($crate::ErrorKind::TakeUntilEitherAndConsume,$i)) + } + }; + res + } + ); +); + +/// `take_until_either!(tag) => &[T] -> IResult<&[T], &[T]>` +#[macro_export] +macro_rules! take_until_either( + ($i:expr, $inp:expr) => ( + { + #[inline(always)] + fn as_bytes(b: &T) -> &[u8] { + b.as_bytes() + } + + let expected = $inp; + let bytes = as_bytes(&expected); + take_until_either_bytes!($i, bytes) + } + ); +); + +#[doc(hidden)] +#[macro_export] +macro_rules! take_until_either_bytes( + ($i:expr, $bytes:expr) => ( + { + let res: $crate::IResult<_,_> = if 1 > $i.len() { + $crate::IResult::Incomplete($crate::Needed::Size(1)) + } else { + let mut index = 0; + let mut parsed = false; + + for idx in 0..$i.len() { + if idx + 1 > $i.len() { + index = idx; + break; + } + for &t in $bytes.iter() { + if $i[idx] == t { + parsed = true; + index = idx; + break; + } + } + if parsed { break; } + } + + if parsed { + $crate::IResult::Done(&$i[index..], &$i[0..index]) + } else { + $crate::IResult::Error($crate::Err::Position($crate::ErrorKind::TakeUntilEither,$i)) + } + }; + res + } + ); +); + +/// `length_bytes!(&[T] -> IResult<&[T], nb>) => &[T] -> IResult<&[T], &[T]> +/// gets a number from the first parser, then extracts that many bytes from the +/// remaining stream +#[macro_export] +macro_rules! length_bytes( + ($i:expr, $f:expr) => ( + { + match $f($i) { + $crate::IResult::Error(a) => $crate::IResult::Error(a), + $crate::IResult::Incomplete(i) => $crate::IResult::Incomplete(i), + $crate::IResult::Done(i1,nb) => { + let length_remaining = i1.len(); + if length_remaining < nb { + $crate::IResult::Incomplete($crate::Needed::Size(nb - length_remaining)) + } else { + $crate::IResult::Done(&i1[nb..], &i1[..nb]) + } + } + } + } + ) +); + +#[cfg(test)] +mod tests { + use internal::Needed; + use internal::IResult::*; + use internal::Err::*; + use util::ErrorKind; + use nom::{alpha, digit, hex_digit, oct_digit, alphanumeric, space, multispace}; + + #[test] + fn is_a() { + named!(a_or_b, is_a!(&b"ab"[..])); + + let a = &b"abcd"[..]; + assert_eq!(a_or_b(a), Done(&b"cd"[..], &b"ab"[..])); + + let b = &b"bcde"[..]; + assert_eq!(a_or_b(b), Done(&b"cde"[..], &b"b"[..])); + + let c = &b"cdef"[..]; + assert_eq!(a_or_b(c), Error(Position(ErrorKind::IsA,c))); + + let d = &b"bacdef"[..]; + assert_eq!(a_or_b(d), Done(&b"cdef"[..], &b"ba"[..])); + } + + #[test] + fn is_not() { + named!(a_or_b, is_not!(&b"ab"[..])); + + let a = &b"cdab"[..]; + assert_eq!(a_or_b(a), Done(&b"ab"[..], &b"cd"[..])); + + let b = &b"cbde"[..]; + assert_eq!(a_or_b(b), Done(&b"bde"[..], &b"c"[..])); + + let c = &b"abab"[..]; + assert_eq!(a_or_b(c), Error(Position(ErrorKind::IsNot,c))); + + let d = &b"cdefba"[..]; + assert_eq!(a_or_b(d), Done(&b"ba"[..], &b"cdef"[..])); + + let e = &b"e"[..]; + assert_eq!(a_or_b(e), Done(&b""[..], &b"e"[..])); + + let f = &b"fghi"[..]; + assert_eq!(a_or_b(f), Done(&b""[..], &b"fghi"[..])); + } + + #[test] + fn escaping() { + named!(esc, escaped!(call!(alpha), '\\', is_a_bytes!(&b"\"n\\"[..]))); + assert_eq!(esc(&b"abcd"[..]), Done(&b""[..], &b"abcd"[..])); + assert_eq!(esc(&b"ab\\\"cd"[..]), Done(&b""[..], &b"ab\\\"cd"[..])); + assert_eq!(esc(&b"\\\"abcd"[..]), Done(&b""[..], &b"\\\"abcd"[..])); + assert_eq!(esc(&b"\\n"[..]), Done(&b""[..], &b"\\n"[..])); + assert_eq!(esc(&b"ab\\\"12"[..]), Done(&b"12"[..], &b"ab\\\""[..])); + assert_eq!(esc(&b"AB\\"[..]), Error(NodePosition(ErrorKind::Escaped, &b"AB\\"[..], Box::new(Position(ErrorKind::Escaped, &b"\\"[..]))))); + assert_eq!(esc(&b"AB\\A"[..]), Error(NodePosition(ErrorKind::Escaped, &b"AB\\A"[..], Box::new(Position(ErrorKind::IsA, &b"A"[..]))))); + } + + fn to_s(i:Vec) -> String { + String::from_utf8_lossy(&i).into_owned() + } + + #[test] + fn escape_transform() { + use std::str; + + named!(esc< String >, map!(escaped_transform!(alpha, '\\', + alt!( + tag!("\\") => { |_| &b"\\"[..] } + | tag!("\"") => { |_| &b"\""[..] } + | tag!("n") => { |_| &b"\n"[..] } + )), to_s) + ); + + assert_eq!(esc(&b"abcd"[..]), Done(&b""[..], String::from("abcd"))); + assert_eq!(esc(&b"ab\\\"cd"[..]), Done(&b""[..], String::from("ab\"cd"))); + assert_eq!(esc(&b"\\\"abcd"[..]), Done(&b""[..], String::from("\"abcd"))); + assert_eq!(esc(&b"\\n"[..]), Done(&b""[..], String::from("\n"))); + assert_eq!(esc(&b"ab\\\"12"[..]), Done(&b"12"[..], String::from("ab\""))); + assert_eq!(esc(&b"AB\\"[..]), Error(NodePosition(ErrorKind::EscapedTransform, &b"AB\\"[..], Box::new(Position(ErrorKind::EscapedTransform, &b"\\"[..]))))); + assert_eq!(esc(&b"AB\\A"[..]), Error(NodePosition(ErrorKind::EscapedTransform, &b"AB\\A"[..], Box::new(Position(ErrorKind::Alt, &b"A"[..]))))); + + let e = "è"; + let a = "à"; + println!("è: {:?} | à: {:?}", str::as_bytes(e), str::as_bytes(a)); + named!(esc2< String >, map!(escaped_transform!(call!(alpha), '&', + alt!( + tag!("egrave;") => { |_| str::as_bytes("è") } + | tag!("agrave;") => { |_| str::as_bytes("à") } + )), to_s) + ); + assert_eq!(esc2(&b"abèDEF"[..]), Done(&b""[..], String::from("abèDEF"))); + assert_eq!(esc2(&b"abèDàEF"[..]), Done(&b""[..], String::from("abèDàEF"))); + } + + #[test] + fn issue_84() { + let r0 = is_a!(&b"aaaaefgh"[..], "abcd"); + assert_eq!(r0, Done(&b"efgh"[..], &b"aaaa"[..])); + let r1 = is_a!(&b"aaaa"[..], "abcd"); + assert_eq!(r1, Done(&b""[..], &b"aaaa"[..])); + let r2 = is_a!(&b"1"[..], "123456789"); + assert_eq!(r2, Done(&b""[..], &b"1"[..])); + } + + #[test] + fn take_str_test() { + let a = b"omnomnom"; + + assert_eq!(take_str!(&a[..], 5), Done(&b"nom"[..], "omnom")); + assert_eq!(take_str!(&a[..], 9), Incomplete(Needed::Size(9))); + } + + #[test] + fn take_until_test() { + named!(x, take_until_and_consume!("efgh")); + let r = x(&b"abcdabcdefghijkl"[..]); + assert_eq!(r, Done(&b"ijkl"[..], &b"abcdabcd"[..])); + + println!("Done 1\n"); + + let r2 = x(&b"abcdabcdefgh"[..]); + assert_eq!(r2, Done(&b""[..], &b"abcdabcd"[..])); + + println!("Done 2\n"); + let r3 = x(&b"abcefg"[..]); + assert_eq!(r3, Error(Position(ErrorKind::TakeUntilAndConsume, &b"abcefg"[..]))); + + assert_eq!( + x(&b"ab"[..]), + Incomplete(Needed::Size(4)) + ); + } + + #[test] + fn take_until_either_incomplete() { + named!(x, take_until_either!("!.")); + assert_eq!( + x(&b"123"[..]), + Error(Position(ErrorKind::TakeUntilEither, &b"123"[..])) + ); + } + + #[test] + fn take_until_incomplete() { + named!(y, take_until!("end")); + assert_eq!( + y(&b"nd"[..]), + Incomplete(Needed::Size(3)) + ); + assert_eq!( + y(&b"123"[..]), + Error(Position(ErrorKind::TakeUntil, &b"123"[..])) + ); + } + + #[test] + fn recognize() { + named!(x, recognize!(delimited!(tag!("")))); + let r = x(&b" aaa"[..]); + assert_eq!(r, Done(&b" aaa"[..], &b""[..])); + + let empty = &b""[..]; + + named!(ya, recognize!(alpha)); + let ra = ya(&b"abc"[..]); + assert_eq!(ra, Done(empty, &b"abc"[..])); + + named!(yd, recognize!(digit)); + let rd = yd(&b"123"[..]); + assert_eq!(rd, Done(empty, &b"123"[..])); + + named!(yhd, recognize!(hex_digit)); + let rhd = yhd(&b"123abcDEF"[..]); + assert_eq!(rhd, Done(empty, &b"123abcDEF"[..])); + + named!(yod, recognize!(oct_digit)); + let rod = yod(&b"1234567"[..]); + assert_eq!(rod, Done(empty, &b"1234567"[..])); + + named!(yan, recognize!(alphanumeric)); + let ran = yan(&b"123abc"[..]); + assert_eq!(ran, Done(empty, &b"123abc"[..])); + + named!(ys, recognize!(space)); + let rs = ys(&b" \t"[..]); + assert_eq!(rs, Done(empty, &b" \t"[..])); + + named!(yms, recognize!(multispace)); + let rms = yms(&b" \t\r\n"[..]); + assert_eq!(rms, Done(empty, &b" \t\r\n"[..])); + } + + #[test] + fn take_while() { + use nom::is_alphabetic; + named!(f, take_while!(is_alphabetic)); + let a = b""; + let b = b"abcd"; + let c = b"abcd123"; + let d = b"123"; + + assert_eq!(f(&a[..]), Done(&a[..], &a[..])); + assert_eq!(f(&b[..]), Done(&a[..], &b[..])); + assert_eq!(f(&c[..]), Done(&d[..], &b[..])); + assert_eq!(f(&d[..]), Done(&d[..], &a[..])); + } + + #[test] + fn take_while1() { + use nom::is_alphabetic; + named!(f, take_while1!(is_alphabetic)); + let a = b""; + let b = b"abcd"; + let c = b"abcd123"; + let d = b"123"; + + assert_eq!(f(&a[..]), Error(Position(ErrorKind::TakeWhile1, &b""[..]))); + assert_eq!(f(&b[..]), Done(&a[..], &b[..])); + assert_eq!(f(&c[..]), Done(&b"123"[..], &b[..])); + assert_eq!(f(&d[..]), Error(Position(ErrorKind::TakeWhile1, &d[..]))); + } + + #[cfg(feature = "nightly")] + use test::Bencher; + + #[cfg(feature = "nightly")] + #[bench] + fn take_while_bench(b: &mut Bencher) { + use nom::is_alphabetic; + named!(f, take_while!(is_alphabetic)); + b.iter(|| { + f(&b"abcdefghijklABCDEejfrfrjgro12aa"[..]) + }); + } + + #[test] + fn recognize_take_while() { + use nom::is_alphanumeric; + named!(x, take_while!(is_alphanumeric)); + named!(y, recognize!(x)); + assert_eq!(x(&b"ab"[..]), Done(&[][..], &b"ab"[..])); + println!("X: {:?}", x(&b"ab"[..])); + assert_eq!(y(&b"ab"[..]), Done(&[][..], &b"ab"[..])); + } +} diff --git a/deps/nom-1.2.0/src/character.rs b/deps/nom-1.2.2/src/character.rs similarity index 100% rename from deps/nom-1.2.0/src/character.rs rename to deps/nom-1.2.2/src/character.rs diff --git a/deps/nom-1.2.2/src/internal.rs b/deps/nom-1.2.2/src/internal.rs new file mode 100644 index 000000000..167b76dd2 --- /dev/null +++ b/deps/nom-1.2.2/src/internal.rs @@ -0,0 +1,271 @@ +//! Basic types to build the parsers + +use self::IResult::*; +use self::Needed::*; +use util::ErrorKind; + +#[cfg(feature = "core")] +use std::prelude::v1::*; +use std::boxed::Box; + +/// Contains the error that a parser can return +/// +/// It can represent a linked list of errors, indicating the path taken in the parsing tree, with corresponding position in the input data. +/// It depends on P, the input position (for a &[u8] parser, it would be a &[u8]), and E, the custom error type (by default, u32) +#[derive(Debug,PartialEq,Eq,Clone)] +pub enum Err{ + /// An error code, represented by an ErrorKind, which can contain a custom error code represented by E + Code(ErrorKind), + /// An error code, and the next error + Node(ErrorKind, Box>), + /// An error code, and the input position + Position(ErrorKind, P), + /// An error code, the input position and the next error + NodePosition(ErrorKind, P, Box>) +} + +/// Contains information on needed data if a parser returned `Incomplete` +#[derive(Debug,PartialEq,Eq,Clone,Copy)] +pub enum Needed { + /// needs more data, but we do not know how much + Unknown, + /// contains the required data size + Size(usize) +} + +impl Needed { + pub fn is_known(&self) -> bool { + *self != Unknown + } + + /// Maps a `Needed` to `Needed` by appling a function to a contained `Size` value. + #[inline] + pub fn map usize>(self, f: F) -> Needed { + match self { + Unknown => Unknown, + Size(n) => Size(f(n)), + } + } +} + +/// Holds the result of parsing functions +/// +/// It depends on I, the input type, O, the output type, and E, the error type (by default u32) +/// +#[derive(Debug,PartialEq,Eq,Clone)] +pub enum IResult { + /// indicates a correct parsing, the first field containing the rest of the unparsed data, the second field contains the parsed data + Done(I,O), + /// contains a Err, an enum that can indicate an error code, a position in the input, and a pointer to another error, making a list of errors in the parsing tree + Error(Err), + /// Incomplete contains a Needed, an enum than can represent a known quantity of input data, or unknown + Incomplete(Needed) +} + +impl IResult { + pub fn is_done(&self) -> bool { + match *self { + Done(_,_) => true, + _ => false + } + } + + pub fn is_err(&self) -> bool { + match *self { + Error(_) => true, + _ => false + } + } + + pub fn is_incomplete(&self) -> bool { + match *self { + Incomplete(_) => true, + _ => false + } + } + + /// Maps a `IResult` to `IResult` by appling a function + /// to a contained `Done` value, leaving `Error` and `Incomplete` value + /// untouched. + #[inline] + pub fn map N>(self, f: F) -> IResult { + match self { + Done(i, o) => Done(i, f(o)), + Error(e) => Error(e), + Incomplete(n) => Incomplete(n), + } + } + + /// Maps a `IResult` to `IResult` by appling a function + /// to a contained `Incomplete` value, leaving `Done` and `Error` value + /// untouched. + #[inline] + pub fn map_inc(self, f: F) -> IResult + where F: FnOnce(Needed) -> Needed { + match self { + Error(e) => Error(e), + Incomplete(n) => Incomplete(f(n)), + Done(i, o) => Done(i, o), + } + } + + /// Maps a `IResult` to `IResult` by appling a function + /// to a contained `Error` value, leaving `Done` and `Incomplete` value + /// untouched. + #[inline] + pub fn map_err(self, f: F) -> IResult + where F: FnOnce(Err) -> Err { + match self { + Error(e) => Error(f(e)), + Incomplete(n) => Incomplete(n), + Done(i, o) => Done(i, o), + } + } +} + +pub trait GetInput { + fn remaining_input(&self) -> Option; +} + +pub trait GetOutput { + fn output(&self) -> Option; +} + +impl<'a,I,O,E> GetInput<&'a[I]> for IResult<&'a[I],O,E> { + fn remaining_input(&self) -> Option<&'a[I]> { + match *self { + Done(ref i,_) => Some(*i), + _ => None + } + } +} + +impl GetInput<()> for IResult<(),O,E> { + fn remaining_input(&self) -> Option<()> { + match *self { + Done((),_) => Some(()), + _ => None + } + } +} + +impl<'a,O,E> GetInput<&'a str> for IResult<&'a str,O,E> { + fn remaining_input(&self) -> Option<&'a str> { + match *self { + Done(ref i,_) => Some(*i), + _ => None + } + } +} + +impl<'a,I,O,E> GetOutput<&'a[O]> for IResult { + fn output(&self) -> Option<&'a[O]> { + match *self { + Done(_, ref o) => Some(*o), + _ => None + } + } +} + +impl GetOutput<()> for IResult { + fn output(&self) -> Option<()> { + match *self { + Done(_,()) => Some(()), + _ => None + } + } +} + +impl<'a,I,E> GetOutput<&'a str> for IResult { + fn output(&self) -> Option<&'a str> { + match *self { + Done(_,ref o) => Some(*o), + _ => None + } + } +} + +#[cfg(not(feature = "core"))] +use std::any::Any; +#[cfg(not(feature = "core"))] +use std::{error,fmt}; +#[cfg(not(feature = "core"))] +use std::fmt::Debug; +#[cfg(not(feature = "core"))] +impl error::Error for Err { + fn description(&self) -> &str { + let kind = match *self { + Err::Code(ref e) | Err::Node(ref e, _) | Err::Position(ref e, _) | Err::NodePosition(ref e, _, _) => e + }; + kind.description() + } +} + +#[cfg(not(feature = "core"))] +impl fmt::Display for Err { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + match *self { + Err::Code(ref e) | Err::Node(ref e, _) => { + write!(f, "{:?}", e) + }, + Err::Position(ref e, ref p) | Err::NodePosition(ref e, ref p, _) => { + write!(f, "{:?}:{:?}", p, e) + } + } + } +} + +#[cfg(test)] +mod tests { + use super::*; + use util::ErrorKind; + + #[test] + fn needed_map() { + let unknown = Needed::Unknown; + let size = Needed::Size(5); + + assert_eq!(size.map(|x| x * 2), Needed::Size(10)); + assert_eq!(unknown.map(|x| x * 2), Needed::Unknown); + } + + #[test] + fn iresult_map() { + let done: IResult<&[u8], u32> = IResult::Done(&b""[..], 5); + let error: IResult<&[u8], u32> = IResult::Error(Err::Code(ErrorKind::Tag)); + let incomplete: IResult<&[u8], u32> = IResult::Incomplete(Needed::Unknown); + + assert_eq!(done.map(|x| x * 2), IResult::Done(&b""[..], 10)); + assert_eq!(error.map(|x| x * 2), IResult::Error(Err::Code(ErrorKind::Tag))); + assert_eq!(incomplete.map(|x| x * 2), IResult::Incomplete(Needed::Unknown)); + } + + #[test] + fn iresult_map_inc() { + let done: IResult<&[u8], u32> = IResult::Done(&b""[..], 5); + let error: IResult<&[u8], u32> = IResult::Error(Err::Code(ErrorKind::Tag)); + let inc_unknown: IResult<&[u8], u32> = IResult::Incomplete(Needed::Unknown); + let inc_size: IResult<&[u8], u32> = IResult::Incomplete(Needed::Size(5)); + + assert_eq!(done.map_inc(|n| if let Needed::Size(i) = n {Needed::Size(i+1)} else {n}), IResult::Done(&b""[..], 5)); + assert_eq!(error.map_inc(|n| if let Needed::Size(i) = n {Needed::Size(i+1)} else {n}), IResult::Error(Err::Code(ErrorKind::Tag))); + assert_eq!(inc_unknown.map_inc(|n| if let Needed::Size(i) = n {Needed::Size(i+1)} else {n}), IResult::Incomplete(Needed::Unknown)); + assert_eq!(inc_size.map_inc(|n| if let Needed::Size(i) = n {Needed::Size(i+1)} else {n}), IResult::Incomplete(Needed::Size(6))); + } + + #[test] + fn iresult_map_err() { + #[derive(Clone, Copy, Debug, PartialEq, Eq)] + struct Error(u32); + + let error_kind = Err::Code(ErrorKind::Custom(Error(5))); + + let done: IResult<&[u8], u32> = IResult::Done(&b""[..], 5); + let error: IResult<&[u8], u32> = IResult::Error(Err::Code(ErrorKind::Tag)); + let incomplete: IResult<&[u8], u32> = IResult::Incomplete(Needed::Unknown); + + assert_eq!(done.map_err(|_| error_kind.clone()), IResult::Done(&b""[..], 5)); + assert_eq!(error.map_err(|x| {println!("err: {:?}", x); error_kind.clone()}), IResult::Error(error_kind.clone())); + assert_eq!(incomplete.map_err(|x| {println!("err: {:?}", x); error_kind.clone()}), IResult::Incomplete(Needed::Unknown)); + } +} diff --git a/deps/nom-1.2.2/src/lib.rs b/deps/nom-1.2.2/src/lib.rs new file mode 100644 index 000000000..11b475d59 --- /dev/null +++ b/deps/nom-1.2.2/src/lib.rs @@ -0,0 +1,151 @@ +//! nom, eating data byte by byte +//! +//! nom is a parser combinator library with a focus on safe parsing, +//! streaming patterns, and as much as possible zero copy. +//! +//! The code is available on [Github](https://github.com/Geal/nom) +//! +//! # Example +//! +//! ``` +//! #[macro_use] +//! extern crate nom; +//! +//! use nom::{IResult,digit}; +//! use nom::IResult::*; +//! +//! // Parser definition +//! +//! use std::str; +//! use std::str::FromStr; +//! +//! named!(parens, delimited!( +//! char!('('), +//! expr, +//! char!(')') +//! ) +//! ); +//! +//! named!(i64_digit, +//! map_res!( +//! map_res!( +//! digit, +//! str::from_utf8 +//! ), +//! FromStr::from_str +//! ) +//! ); +//! +//! // We transform an integer string into a i64 +//! // we look for a digit suite, and try to convert it. +//! // if either str::from_utf8 or FromStr::from_str fail, +//! // the parser will fail +//! named!(factor, +//! alt!( +//! i64_digit +//! | parens +//! ) +//! ); +//! +//! // we define acc as mutable to update its value whenever a new term is found +//! named!(term , +//! chain!( +//! mut acc: factor ~ +//! many0!( +//! alt!( +//! tap!(mul: preceded!(tag!("*"), factor) => acc = acc * mul) | +//! tap!(div: preceded!(tag!("/"), factor) => acc = acc / div) +//! ) +//! ), +//! || { return acc } +//! ) +//! ); +//! +//! named!(expr , +//! chain!( +//! mut acc: term ~ +//! many0!( +//! alt!( +//! tap!(add: preceded!(tag!("+"), term) => acc = acc + add) | +//! tap!(sub: preceded!(tag!("-"), term) => acc = acc - sub) +//! ) +//! ), +//! || { return acc } +//! ) +//! ); +//! +//! fn main() { +//! assert_eq!(expr(b"1+2"), IResult::Done(&b""[..], 3)); +//! assert_eq!(expr(b"12+6-4+3"), IResult::Done(&b""[..], 17)); +//! assert_eq!(expr(b"1+2*3+4"), IResult::Done(&b""[..], 11)); +//! +//! assert_eq!(expr(b"(2)"), IResult::Done(&b""[..], 2)); +//! assert_eq!(expr(b"2*(3+4)"), IResult::Done(&b""[..], 14)); +//! assert_eq!(expr(b"2*2/(5-1)+3"), IResult::Done(&b""[..], 4)); +//! } +//! ``` +#![cfg_attr(feature = "core", feature(no_std))] +#![cfg_attr(feature = "core", feature(collections))] +#![cfg_attr(feature = "core", no_std)] +#![cfg_attr(feature = "nightly", feature(test))] +#![cfg_attr(feature = "nightly", feature(const_fn))] + +#[cfg(feature = "core")] +extern crate collections; +#[cfg(feature = "regexp")] +extern crate regex; +#[cfg(feature = "regexp_macros")] +#[macro_use] extern crate lazy_static; +#[cfg(feature = "nightly")] +extern crate test; + +#[cfg(feature = "core")] +mod std { +#[macro_use] + pub use core::{fmt, iter, option, ops, slice, mem}; + pub use collections::{boxed, vec, string}; + pub mod prelude { + pub use core::prelude as v1; + } +} + +pub use self::util::*; +pub use self::internal::*; +pub use self::macros::*; +pub use self::methods::*; +pub use self::bytes::*; +pub use self::bits::*; + +pub use self::nom::*; +pub use self::character::*; + +#[cfg(feature = "regexp")] +pub use self::regexp::*; + +#[cfg(not(feature = "core"))] +#[cfg(feature = "stream")] +pub use self::stream::*; + +#[cfg(not(feature = "core"))] +pub use self::str::*; + +#[macro_use] mod util; +mod internal; +#[macro_use] mod macros; +#[macro_use] mod methods; +#[macro_use] mod bytes; +#[macro_use] mod bits; + +#[macro_use] mod nom; +#[macro_use] mod character; + +#[cfg(feature = "regexp")] +#[macro_use] mod regexp; + +#[macro_use] +#[cfg(not(feature = "core"))] +#[cfg(feature = "stream")] +mod stream; + +#[cfg(not(feature = "core"))] +mod str; diff --git a/deps/nom-1.2.2/src/macros.rs b/deps/nom-1.2.2/src/macros.rs new file mode 100644 index 000000000..b98e1a0a4 --- /dev/null +++ b/deps/nom-1.2.2/src/macros.rs @@ -0,0 +1,3106 @@ +//! Macro combinators +//! +//! Macros are used to make combination easier, +//! since they often do not depend on the type +//! of the data they manipulate or return. +//! +//! There is a trick to make them easier to assemble, +//! combinators are defined like this: +//! +//! ```ignore +//! macro_rules! tag ( +//! ($i:expr, $inp: expr) => ( +//! { +//! ... +//! } +//! ); +//! ); +//! ``` +//! +//! But when used in other combinators, are Used +//! like this: +//! +//! ```ignore +//! named!(my_function, tag!("abcd")); +//! ``` +//! +//! Internally, other combinators will rewrite +//! that call to pass the input as first argument: +//! +//! ```ignore +//! macro_rules! named ( +//! ($name:ident, $submac:ident!( $($args:tt)* )) => ( +//! fn $name<'a>( i: &'a [u8] ) -> $crate::IResult<'a,&[u8], &[u8]> { +//! $submac!(i, $($args)*) +//! } +//! ); +//! ); +//! ``` +//! +//! If you want to call a combinator directly, you can +//! do it like this: +//! +//! ```ignore +//! let res = { tag!(input, "abcd"); } +//! ``` +//! +//! Combinators must have a specific variant for +//! non-macro arguments. Example: passing a function +//! to take_while! instead of another combinator. +//! +//! ```ignore +//! macro_rules! take_while( +//! ($input:expr, $submac:ident!( $($args:tt)* )) => ( +//! { +//! ... +//! } +//! ); +//! +//! // wrap the function in a macro to pass it to the main implementation +//! ($input:expr, $f:expr) => ( +//! take_while!($input, call!($f)); +//! ); +//! ); +//! + +/// Wraps a parser in a closure +#[macro_export] +macro_rules! closure ( + ($ty:ty, $submac:ident!( $($args:tt)* )) => ( + |i: $ty| { $submac!(i, $($args)*) } + ); + ($submac:ident!( $($args:tt)* )) => ( + |i| { $submac!(i, $($args)*) } + ); +); + +/// Makes a function from a parser combination +/// +/// The type can be set up if the compiler needs +/// more information +/// +/// ```ignore +/// named!(my_function( &[u8] ) -> &[u8], tag!("abcd")); +/// // first type parameter is input, second is output +/// named!(my_function<&[u8], &[u8]>, tag!("abcd")); +/// // will have &[u8] as input type, &[u8] as output type +/// named!(my_function, tag!("abcd")); +/// // will use &[u8] as input type (use this if the compiler +/// // complains about lifetime issues +/// named!(my_function<&[u8]>, tag!("abcd")); +/// //prefix them with 'pub' to make the functions public +/// named!(pub my_function, tag!("abcd")); +/// ``` +#[macro_export] +macro_rules! named ( + ($name:ident( $i:ty ) -> $o:ty, $submac:ident!( $($args:tt)* )) => ( + fn $name( i: $i ) -> $crate::IResult<$i,$o,u32> { + $submac!(i, $($args)*) + } + ); + ($name:ident<$i:ty,$o:ty,$e:ty>, $submac:ident!( $($args:tt)* )) => ( + fn $name( i: $i ) -> $crate::IResult<$i, $o, $e> { + $submac!(i, $($args)*) + } + ); + ($name:ident<$i:ty,$o:ty>, $submac:ident!( $($args:tt)* )) => ( + fn $name( i: $i ) -> $crate::IResult<$i, $o, u32> { + $submac!(i, $($args)*) + } + ); + ($name:ident<$o:ty>, $submac:ident!( $($args:tt)* )) => ( + fn $name<'a>( i: &'a[u8] ) -> $crate::IResult<&'a [u8], $o, u32> { + $submac!(i, $($args)*) + } + ); + ($name:ident, $submac:ident!( $($args:tt)* )) => ( + fn $name( i: &[u8] ) -> $crate::IResult<&[u8], &[u8], u32> { + $submac!(i, $($args)*) + } + ); + (pub $name:ident( $i:ty ) -> $o:ty, $submac:ident!( $($args:tt)* )) => ( + pub fn $name( i: $i ) -> $crate::IResult<$i,$o, u32> { + $submac!(i, $($args)*) + } + ); + (pub $name:ident<$i:ty,$o:ty,$e:ty>, $submac:ident!( $($args:tt)* )) => ( + pub fn $name( i: $i ) -> $crate::IResult<$i, $o, $e> { + $submac!(i, $($args)*) + } + ); + (pub $name:ident<$i:ty,$o:ty>, $submac:ident!( $($args:tt)* )) => ( + pub fn $name( i: $i ) -> $crate::IResult<$i, $o, u32> { + $submac!(i, $($args)*) + } + ); + (pub $name:ident<$o:ty>, $submac:ident!( $($args:tt)* )) => ( + pub fn $name( i: &[u8] ) -> $crate::IResult<&[u8], $o, u32> { + $submac!(i, $($args)*) + } + ); + (pub $name:ident, $submac:ident!( $($args:tt)* )) => ( + pub fn $name<'a>( i: &'a [u8] ) -> $crate::IResult<&[u8], &[u8], u32> { + $submac!(i, $($args)*) + } + ); +); + +/// Used to wrap common expressions and function as macros +#[macro_export] +macro_rules! call ( + ($i:expr, $fun:expr) => ( $fun( $i ) ); + ($i:expr, $fun:expr, $($args:expr),* ) => ( $fun( $i, $($args),* ) ); +); + +/// emulate function currying: `apply!(my_function, arg1, arg2, ...)` becomes `my_function(input, arg1, arg2, ...)` +/// +/// Supports up to 6 arguments +#[macro_export] +macro_rules! apply ( + ($i:expr, $fun:expr, $($args:expr),* ) => ( $fun( $i, $($args),* ) ); +); + +/// Prevents backtracking if the child parser fails +/// +/// This parser will do an early return instead of sending +/// its result to the parent parser. +/// +/// If another `error!` combinator is present in the parent +/// chain, the error will be wrapped and another early +/// return will be made. +/// +/// This makes it easy to build report on which parser failed, +/// where it failed in the input, and the chain of parsers +/// that led it there. +/// +/// Additionally, the error chain contains number identifiers +/// that can be matched to provide useful error messages. +/// +/// ``` +/// # #[macro_use] extern crate nom; +/// # use std::collections; +/// # use nom::IResult::Error; +/// # use nom::Err::{Position,NodePosition}; +/// # use nom::ErrorKind; +/// # fn main() { +/// named!(err_test, alt!( +/// tag!("abcd") | +/// preceded!(tag!("efgh"), error!(ErrorKind::Custom(42), +/// chain!( +/// tag!("ijkl") ~ +/// res: error!(ErrorKind::Custom(128), tag!("mnop")) , +/// || { res } +/// ) +/// ) +/// ) +/// )); +/// let a = &b"efghblah"[..]; +/// let b = &b"efghijklblah"[..]; +/// let c = &b"efghijklmnop"[..]; +/// +/// let blah = &b"blah"[..]; +/// +/// let res_a = err_test(a); +/// let res_b = err_test(b); +/// let res_c = err_test(c); +/// assert_eq!(res_a, Error(NodePosition(ErrorKind::Custom(42), blah, Box::new(Position(ErrorKind::Tag, blah))))); +/// assert_eq!(res_b, Error(NodePosition(ErrorKind::Custom(42), &b"ijklblah"[..], +/// Box::new(NodePosition(ErrorKind::Custom(128), blah, Box::new(Position(ErrorKind::Tag, blah)))))) +/// ); +/// # } +/// ``` +/// +#[macro_export] +macro_rules! error ( + ($i:expr, $code:expr, $submac:ident!( $($args:tt)* )) => ( + { + let cl = || { + $submac!($i, $($args)*) + }; + + match cl() { + $crate::IResult::Incomplete(x) => $crate::IResult::Incomplete(x), + $crate::IResult::Done(i, o) => $crate::IResult::Done(i, o), + $crate::IResult::Error(e) => { + return $crate::IResult::Error($crate::Err::NodePosition($code, $i, Box::new(e))) + } + } + } + ); + ($i:expr, $code:expr, $f:expr) => ( + error!($i, $code, call!($f)); + ); +); + +/// Add an error if the child parser fails +/// +/// While error! does an early return and avoids backtracking, +/// add_error! backtracks normally. It just provides more context +/// for an error +/// +#[macro_export] +macro_rules! add_error ( + ($i:expr, $code:expr, $submac:ident!( $($args:tt)* )) => ( + { + match $submac!($i, $($args)*) { + $crate::IResult::Incomplete(x) => $crate::IResult::Incomplete(x), + $crate::IResult::Done(i, o) => $crate::IResult::Done(i, o), + $crate::IResult::Error(e) => { + $crate::IResult::Error($crate::Err::NodePosition($code, $i, Box::new(e))) + } + } + } + ); + ($i:expr, $code:expr, $f:expr) => ( + add_error!($i, $code, call!($f)); + ); +); + + +/// translate parser result from IResult to IResult woth a custom type +/// +#[macro_export] +macro_rules! fix_error ( + ($i:expr, $t:ty, $submac:ident!( $($args:tt)* )) => ( + { + match $submac!($i, $($args)*) { + $crate::IResult::Incomplete(x) => $crate::IResult::Incomplete(x), + $crate::IResult::Done(i, o) => $crate::IResult::Done(i, o), + $crate::IResult::Error(e) => { + let err = match e { + $crate::Err::Code(ErrorKind::Custom(_)) | + $crate::Err::Node(ErrorKind::Custom(_), _) => { + let e: ErrorKind<$t> = ErrorKind::Fix; + $crate::Err::Code(e) + }, + $crate::Err::Position(ErrorKind::Custom(_), p) | + $crate::Err::NodePosition(ErrorKind::Custom(_), p, _) => { + let e: ErrorKind<$t> = ErrorKind::Fix; + $crate::Err::Position(e, p) + }, + $crate::Err::Code(_) | + $crate::Err::Node(_, _) => { + let e: ErrorKind<$t> = ErrorKind::Fix; + $crate::Err::Code(e) + }, + $crate::Err::Position(_, p) | + $crate::Err::NodePosition(_, p, _) => { + let e: ErrorKind<$t> = ErrorKind::Fix; + $crate::Err::Position(e, p) + }, + }; + $crate::IResult::Error(err) + } + } + } + ); + ($i:expr, $t:ty, $f:expr) => ( + fix_error!($i, $t, call!($f)); + ); +); + +/// replaces a `Incomplete` returned by the child parser +/// with an `Error` +/// +#[macro_export] +macro_rules! complete ( + ($i:expr, $submac:ident!( $($args:tt)* )) => ( + { + match $submac!($i, $($args)*) { + $crate::IResult::Done(i, o) => $crate::IResult::Done(i, o), + $crate::IResult::Error(e) => $crate::IResult::Error(e), + $crate::IResult::Incomplete(_) => { + $crate::IResult::Error($crate::Err::Position($crate::ErrorKind::Complete, $i)) + }, + } + } + ); + ($i:expr, $f:expr) => ( + complete!($i, call!($f)); + ); +); + +/// A bit like `std::try!`, this macro will return the remaining input and parsed value if the child parser returned `Done`, +/// and will do an early return for `Error` and `Incomplete` +/// this can provide more flexibility than `chain!` if needed +/// +/// ``` +/// # #[macro_use] extern crate nom; +/// # use nom::IResult::{self, Done, Error}; +/// # use nom::Err::Position; +/// # use nom::{be_u8,ErrorKind}; +/// +/// fn take_add(input:&[u8], size: u8) -> IResult<&[u8],&[u8]> { +/// let (i1, sz) = try_parse!(input, be_u8); +/// let (i2, length) = try_parse!(i1, expr_opt!(size.checked_add(sz))); +/// let (i3, data) = try_parse!(i2, take!(length)); +/// return Done(i3, data); +/// } +/// # fn main() { +/// let arr1 = [1, 2, 3, 4, 5]; +/// let r1 = take_add(&arr1[..], 1); +/// assert_eq!(r1, Done(&[4,5][..], &[2,3][..])); +/// +/// let arr2 = [0xFE, 2, 3, 4, 5]; +/// // size is overflowing +/// let r1 = take_add(&arr2[..], 42); +/// assert_eq!(r1, Error(Position(ErrorKind::ExprOpt,&[2,3,4,5][..]))); +/// # } +/// ``` +#[macro_export] +macro_rules! try_parse ( + ($i:expr, $submac:ident!( $($args:tt)* )) => ( + match $submac!($i, $($args)*) { + $crate::IResult::Done(i,o) => (i,o), + $crate::IResult::Error(e) => return $crate::IResult::Error(e), + $crate::IResult::Incomplete(i) => return $crate::IResult::Incomplete(i) + } + ); + ($i:expr, $f:expr) => ( + try_parse!($i, call!($f)) + ); +); + +/// `flat_map!(R -> IResult, S -> IResult) => R -> IResult` +/// +/// combines a parser R -> IResult and +/// a parser S -> IResult to return another +/// parser R -> IResult +#[macro_export] +macro_rules! flat_map( + ($i:expr, $submac:ident!( $($args:tt)* ), $submac2:ident!( $($args2:tt)* )) => ( + { + match $submac!($i, $($args)*) { + $crate::IResult::Error(e) => $crate::IResult::Error(e), + $crate::IResult::Incomplete($crate::Needed::Unknown) => $crate::IResult::Incomplete($crate::Needed::Unknown), + $crate::IResult::Incomplete($crate::Needed::Size(i)) => $crate::IResult::Incomplete($crate::Needed::Size(i)), + $crate::IResult::Done(i, o) => match $submac2!(o, $($args2)*) { + $crate::IResult::Error(e) => { + let err = match e { + $crate::Err::Code(k) | $crate::Err::Node(k, _) | $crate::Err::Position(k, _) | $crate::Err::NodePosition(k, _, _) => { + $crate::Err::Position(k, $i) + } + }; + $crate::IResult::Error(err) + }, + $crate::IResult::Incomplete($crate::Needed::Unknown) => $crate::IResult::Incomplete($crate::Needed::Unknown), + $crate::IResult::Incomplete($crate::Needed::Size(ref i2)) => $crate::IResult::Incomplete($crate::Needed::Size(*i2)), + $crate::IResult::Done(_, o2) => $crate::IResult::Done(i, o2) + } + } + } + ); + ($i:expr, $submac:ident!( $($args:tt)* ), $g:expr) => ( + flat_map!($i, $submac!($($args)*), call!($g)); + ); + ($i:expr, $f:expr, $g:expr) => ( + flat_map!($i, call!($f), call!($g)); + ); + ($i:expr, $f:expr, $submac:ident!( $($args:tt)* )) => ( + flat_map!($i, call!($f), $submac!($($args)*)); + ); +); + +/// `map!(I -> IResult, O -> P) => I -> IResult` +/// maps a function on the result of a parser +#[macro_export] +macro_rules! map( + ($i:expr, $submac:ident!( $($args:tt)* ), $g:expr) => ( + map_impl!($i, $submac!($($args)*), call!($g)); + ); + ($i:expr, $submac:ident!( $($args:tt)* ), $submac2:ident!( $($args2:tt)* )) => ( + map_impl!($i, $submac!($($args)*), $submac2!($($args2)*)); + ); + ($i:expr, $f:expr, $g:expr) => ( + map_impl!($i, call!($f), call!($g)); + ); + ($i:expr, $f:expr, $submac:ident!( $($args:tt)* )) => ( + map_impl!($i, call!($f), $submac!($($args)*)); + ); +); + +/// Internal parser, do not use directly +#[doc(hidden)] +#[macro_export] +macro_rules! map_impl( + ($i:expr, $submac:ident!( $($args:tt)* ), $submac2:ident!( $($args2:tt)* )) => ( + { + match $submac!($i, $($args)*) { + $crate::IResult::Error(e) => $crate::IResult::Error(e), + $crate::IResult::Incomplete($crate::Needed::Unknown) => $crate::IResult::Incomplete($crate::Needed::Unknown), + $crate::IResult::Incomplete($crate::Needed::Size(i)) => $crate::IResult::Incomplete($crate::Needed::Size(i)), + $crate::IResult::Done(i, o) => $crate::IResult::Done(i, $submac2!(o, $($args2)*)) + } + } + ); +); + +/// `map_res!(I -> IResult, O -> Result

) => I -> IResult` +/// maps a function returning a Result on the output of a parser +#[macro_export] +macro_rules! map_res ( + ($i:expr, $submac:ident!( $($args:tt)* ), $g:expr) => ( + map_res_impl!($i, $submac!($($args)*), call!($g)); + ); + ($i:expr, $submac:ident!( $($args:tt)* ), $submac2:ident!( $($args2:tt)* )) => ( + map_res_impl!($i, $submac!($($args)*), $submac2!($($args2)*)); + ); + ($i:expr, $f:expr, $g:expr) => ( + map_res_impl!($i, call!($f), call!($g)); + ); + ($i:expr, $f:expr, $submac:ident!( $($args:tt)* )) => ( + map_res_impl!($i, call!($f), $submac!($($args)*)); + ); +); + +/// Internal parser, do not use directly +#[doc(hidden)] +#[macro_export] +macro_rules! map_res_impl ( + ($i:expr, $submac:ident!( $($args:tt)* ), $submac2:ident!( $($args2:tt)* )) => ( + { + match $submac!($i, $($args)*) { + $crate::IResult::Error(e) => $crate::IResult::Error(e), + $crate::IResult::Incomplete($crate::Needed::Unknown) => $crate::IResult::Incomplete($crate::Needed::Unknown), + $crate::IResult::Incomplete($crate::Needed::Size(i)) => $crate::IResult::Incomplete($crate::Needed::Size(i)), + $crate::IResult::Done(i, o) => match $submac2!(o, $($args2)*) { + Ok(output) => $crate::IResult::Done(i, output), + Err(_) => $crate::IResult::Error($crate::Err::Position($crate::ErrorKind::MapRes, $i)) + } + } + } + ); +); + + +/// `map_opt!(I -> IResult, O -> Option

) => I -> IResult` +/// maps a function returning an Option on the output of a parser +#[macro_export] +macro_rules! map_opt ( + ($i:expr, $submac:ident!( $($args:tt)* ), $g:expr) => ( + map_opt_impl!($i, $submac!($($args)*), call!($g)); + ); + ($i:expr, $submac:ident!( $($args:tt)* ), $submac2:ident!( $($args2:tt)* )) => ( + map_opt_impl!($i, $submac!($($args)*), $submac2!($($args2)*)); + ); + ($i:expr, $f:expr, $g:expr) => ( + map_opt_impl!($i, call!($f), call!($g)); + ); + ($i:expr, $f:expr, $submac:ident!( $($args:tt)* )) => ( + map_opt_impl!($i, call!($f), $submac!($($args)*)); + ); +); + +/// Internal parser, do not use directly +#[doc(hidden)] +#[macro_export] +macro_rules! map_opt_impl ( + ($i:expr, $submac:ident!( $($args:tt)* ), $submac2:ident!( $($args2:tt)* )) => ( + { + match $submac!($i, $($args)*) { + $crate::IResult::Error(e) => $crate::IResult::Error(e), + $crate::IResult::Incomplete($crate::Needed::Unknown) => $crate::IResult::Incomplete($crate::Needed::Unknown), + $crate::IResult::Incomplete($crate::Needed::Size(i)) => $crate::IResult::Incomplete($crate::Needed::Size(i)), + $crate::IResult::Done(i, o) => match $submac2!(o, $($args2)*) { + ::std::option::Option::Some(output) => $crate::IResult::Done(i, output), + ::std::option::Option::None => $crate::IResult::Error($crate::Err::Position($crate::ErrorKind::MapOpt, $i)) + } + } + } + ); +); + +/// `value!(T, R -> IResult ) => R -> IResult` +/// +/// or `value!(T) => R -> IResult` +/// +/// If the child parser was successful, return the value. +/// If no child parser is provided, always return the value +/// +/// ``` +/// # #[macro_use] extern crate nom; +/// # use nom::IResult::Done; +/// # fn main() { +/// named!(x, value!(42, delimited!(tag!("")))); +/// named!(y, delimited!(tag!(""))); +/// let r = x(&b" aaa"[..]); +/// assert_eq!(r, Done(&b" aaa"[..], 42)); +/// +/// let r2 = y(&b" aaa"[..]); +/// assert_eq!(r2, Done(&b" aaa"[..], 42)); +/// # } +/// ``` +#[macro_export] +macro_rules! value ( + ($i:expr, $res:expr, $submac:ident!( $($args:tt)* )) => ( + { + match $submac!($i, $($args)*) { + $crate::IResult::Done(i,_) => { + $crate::IResult::Done(i, $res) + }, + $crate::IResult::Error(e) => $crate::IResult::Error(e), + $crate::IResult::Incomplete(i) => $crate::IResult::Incomplete(i) + } + } + ); + ($i:expr, $res:expr, $f:expr) => ( + value!($i, $res, call!($f)) + ); + ($i:expr, $res:expr) => ( + $crate::IResult::Done($i, $res) + ); +); + +/// `expr_res!(Result) => I -> IResult` +/// evaluate an expression that returns a Result and returns a IResult::Done(I,T) if Ok +/// +/// See expr_opt for an example +#[macro_export] +macro_rules! expr_res ( + ($i:expr, $e:expr) => ( + { + match $e { + Ok(output) => $crate::IResult::Done($i, output), + Err(_) => $crate::IResult::Error($crate::Err::Position($crate::ErrorKind::ExprRes, $i)) + } + } + ); +); + +/// `expr_opt!(Option) => I -> IResult` +/// evaluate an expression that returns a Option and returns a IResult::Done(I,T) if Some +/// +/// Useful when doing computations in a chain +/// +/// ``` +/// # #[macro_use] extern crate nom; +/// # use nom::IResult::{self, Done, Error}; +/// # use nom::Err::Position; +/// # use nom::{be_u8,ErrorKind}; +/// +/// fn take_add(input:&[u8], size: u8) -> IResult<&[u8],&[u8]> { +/// chain!(input, +/// sz: be_u8 ~ +/// length: expr_opt!(size.checked_add(sz)) ~ // checking for integer overflow (returns an Option) +/// data: take!(length) , +/// ||{ data } +/// ) +/// } +/// # fn main() { +/// let arr1 = [1, 2, 3, 4, 5]; +/// let r1 = take_add(&arr1[..], 1); +/// assert_eq!(r1, Done(&[4,5][..], &[2,3][..])); +/// +/// let arr2 = [0xFE, 2, 3, 4, 5]; +/// // size is overflowing +/// let r1 = take_add(&arr2[..], 42); +/// assert_eq!(r1, Error(Position(ErrorKind::ExprOpt,&[2,3,4,5][..]))); +/// # } +/// ``` +#[macro_export] +macro_rules! expr_opt ( + ($i:expr, $e:expr) => ( + { + match $e { + ::std::option::Option::Some(output) => $crate::IResult::Done($i, output), + ::std::option::Option::None => $crate::IResult::Error($crate::Err::Position($crate::ErrorKind::ExprOpt, $i)) + } + } + ); +); + +/// `chain!(I->IResult ~ I->IResult ~ ... I->IResult , || { return O } ) => I -> IResult` +/// chains parsers and assemble the results through a closure +/// +/// The input type `I` must implement `nom::InputLength`. +/// +/// This combinator will count how much data is consumed by every child parser and take it into account if +/// there is not enough data +/// +/// ``` +/// # #[macro_use] extern crate nom; +/// # use nom::IResult::{self, Done, Error}; +/// # use nom::Err::Position; +/// # use nom::ErrorKind; +/// #[derive(PartialEq,Eq,Debug)] +/// struct B { +/// a: u8, +/// b: Option +/// } +/// +/// named!(y, tag!("efgh")); +/// +/// fn ret_int(i:&[u8]) -> IResult<&[u8], u8> { Done(i, 1) } +/// named!(ret_y<&[u8], u8>, map!(y, |_| 1)); // return 1 if the "efgh" tag is found +/// +/// named!(z<&[u8], B>, +/// chain!( +/// tag!("abcd") ~ // the '~' character is used as separator +/// aa: ret_int ~ // the result of that parser will be used in the closure +/// tag!("abcd")? ~ // this parser is optional +/// bb: ret_y? , // the result of that parser is an option +/// // the last parser in the chain is followed by a ',' +/// ||{B{a: aa, b: bb}} +/// ) +/// ); +/// +/// # fn main() { +/// // the first "abcd" tag is not present, we have an error +/// let r1 = z(&b"efgh"[..]); +/// assert_eq!(r1, Error(Position(ErrorKind::Tag,&b"efgh"[..]))); +/// +/// // everything is present, everything is parsed +/// let r2 = z(&b"abcdabcdefgh"[..]); +/// assert_eq!(r2, Done(&b""[..], B{a: 1, b: Some(1)})); +/// +/// // the second "abcd" tag is optional +/// let r3 = z(&b"abcdefgh"[..]); +/// assert_eq!(r3, Done(&b""[..], B{a: 1, b: Some(1)})); +/// +/// // the result of ret_y is optional, as seen in the B structure +/// let r4 = z(&b"abcdabcdwxyz"[..]); +/// assert_eq!(r4, Done(&b"wxyz"[..], B{a: 1, b: None})); +/// # } +/// ``` +#[macro_export] +macro_rules! chain ( + ($i:expr, $($rest:tt)*) => ( + { + //use $crate::InputLength; + chaining_parser!($i, 0usize, $($rest)*) + } + ); +); + +/// Internal parser, do not use directly +#[doc(hidden)] +#[macro_export] +macro_rules! chaining_parser ( + ($i:expr, $consumed:expr, $e:ident ~ $($rest:tt)*) => ( + chaining_parser!($i, $consumed, call!($e) ~ $($rest)*); + ); + ($i:expr, $consumed:expr, $submac:ident!( $($args:tt)* ) ~ $($rest:tt)*) => ( + { + use $crate::InputLength; + match $submac!($i, $($args)*) { + $crate::IResult::Error(e) => $crate::IResult::Error(e), + $crate::IResult::Incomplete($crate::Needed::Unknown) => $crate::IResult::Incomplete($crate::Needed::Unknown), + $crate::IResult::Incomplete($crate::Needed::Size(i)) => $crate::IResult::Incomplete($crate::Needed::Size($consumed + i)), + $crate::IResult::Done(i,_) => { + chaining_parser!(i, $consumed + (($i).input_len() - i.input_len()), $($rest)*) + } + } + } +); + + ($i:expr, $consumed:expr, $e:ident ? ~ $($rest:tt)*) => ( + chaining_parser!($i, $consumed, call!($e) ? ~ $($rest)*); + ); + + ($i:expr, $consumed:expr, $submac:ident!( $($args:tt)* ) ? ~ $($rest:tt)*) => ({ + { + use $crate::InputLength; + let res = $submac!($i, $($args)*); + if let $crate::IResult::Incomplete(inc) = res { + match inc { + $crate::Needed::Unknown => $crate::IResult::Incomplete($crate::Needed::Unknown), + $crate::Needed::Size(i) => $crate::IResult::Incomplete($crate::Needed::Size($consumed + i)), + } + } else { + let input = if let $crate::IResult::Done(i,_) = res { + i + } else { + $i + }; + chaining_parser!(input, $consumed + (($i).input_len() - input.input_len()), $($rest)*) + } + } + }); + + ($i:expr, $consumed:expr, $field:ident : $e:ident ~ $($rest:tt)*) => ( + chaining_parser!($i, $consumed, $field: call!($e) ~ $($rest)*); + ); + + ($i:expr, $consumed:expr, $field:ident : $submac:ident!( $($args:tt)* ) ~ $($rest:tt)*) => ( + { + use $crate::InputLength; + match $submac!($i, $($args)*) { + $crate::IResult::Error(e) => $crate::IResult::Error(e), + $crate::IResult::Incomplete($crate::Needed::Unknown) => $crate::IResult::Incomplete($crate::Needed::Unknown), + $crate::IResult::Incomplete($crate::Needed::Size(i)) => $crate::IResult::Incomplete($crate::Needed::Size($consumed + i)), + $crate::IResult::Done(i,o) => { + let $field = o; + chaining_parser!(i, $consumed + (($i).input_len() - i.input_len()), $($rest)*) + } + } + } + ); + + ($i:expr, $consumed:expr, mut $field:ident : $e:ident ~ $($rest:tt)*) => ( + chaining_parser!($i, $consumed, mut $field: call!($e) ~ $($rest)*); + ); + + ($i:expr, $consumed:expr, mut $field:ident : $submac:ident!( $($args:tt)* ) ~ $($rest:tt)*) => ( + { + use $crate::InputLength; + match $submac!($i, $($args)*) { + $crate::IResult::Error(e) => $crate::IResult::Error(e), + $crate::IResult::Incomplete($crate::Needed::Unknown) => $crate::IResult::Incomplete($crate::Needed::Unknown), + $crate::IResult::Incomplete($crate::Needed::Size(i)) => $crate::IResult::Incomplete($crate::Needed::Size($consumed + i)), + $crate::IResult::Done(i,o) => { + let mut $field = o; + chaining_parser!(i, $consumed + ($i).input_len() - i.input_len(), $($rest)*) + } + } + } + ); + + ($i:expr, $consumed:expr, $field:ident : $e:ident ? ~ $($rest:tt)*) => ( + chaining_parser!($i, $consumed, $field : call!($e) ? ~ $($rest)*); + ); + + ($i:expr, $consumed:expr, $field:ident : $submac:ident!( $($args:tt)* ) ? ~ $($rest:tt)*) => ({ + { + use $crate::InputLength; + let res = $submac!($i, $($args)*); + if let $crate::IResult::Incomplete(inc) = res { + match inc { + $crate::Needed::Unknown => $crate::IResult::Incomplete($crate::Needed::Unknown), + $crate::Needed::Size(i) => $crate::IResult::Incomplete($crate::Needed::Size($consumed + i)), + } + } else { + let ($field,input) = if let $crate::IResult::Done(i,o) = res { + (::std::option::Option::Some(o),i) + } else { + (::std::option::Option::None,$i) + }; + chaining_parser!(input, $consumed + ($i).input_len() - input.input_len(), $($rest)*) + } + } + }); + + ($i:expr, $consumed:expr, mut $field:ident : $e:ident ? ~ $($rest:tt)*) => ( + chaining_parser!($i, $consumed, mut $field : call!($e) ? ~ $($rest)*); + ); + + ($i:expr, $consumed:expr, mut $field:ident : $submac:ident!( $($args:tt)* ) ? ~ $($rest:tt)*) => ({ + { + use $crate::InputLength; + let res = $submac!($i, $($args)*); + if let $crate::IResult::Incomplete(inc) = res { + match inc { + $crate::Needed::Unknown => $crate::IResult::Incomplete($crate::Needed::Unknown), + $crate::Needed::Size(i) => $crate::IResult::Incomplete($crate::Needed::Size($consumed + i)), + } + } else { + let (mut $field,input) = if let $crate::IResult::Done(i,o) = res { + (::std::option::Option::Some(o),i) + } else { + (::std::option::Option::None,$i) + }; + chaining_parser!(input, $consumed + ($i).input_len() - input.input_len(), $($rest)*) + } + } + }); + + // ending the chain + ($i:expr, $consumed:expr, $e:ident, $assemble:expr) => ( + chaining_parser!($i, $consumed, call!($e), $assemble); + ); + + ($i:expr, $consumed:expr, $submac:ident!( $($args:tt)* ), $assemble:expr) => ( + match $submac!($i, $($args)*) { + $crate::IResult::Error(e) => $crate::IResult::Error(e), + $crate::IResult::Incomplete($crate::Needed::Unknown) => $crate::IResult::Incomplete($crate::Needed::Unknown), + $crate::IResult::Incomplete($crate::Needed::Size(i)) => $crate::IResult::Incomplete($crate::Needed::Size($consumed + i)), + $crate::IResult::Done(i,_) => { + $crate::IResult::Done(i, $assemble()) + } + } + ); + + ($i:expr, $consumed:expr, $e:ident ?, $assemble:expr) => ( + chaining_parser!($i, $consumed, call!($e) ?, $assemble); + ); + + ($i:expr, $consumed:expr, $submac:ident!( $($args:tt)* ) ?, $assemble:expr) => ({ + let res = $submac!($i, $($args)*); + if let $crate::IResult::Incomplete(inc) = res { + match inc { + $crate::Needed::Unknown => $crate::IResult::Incomplete($crate::Needed::Unknown), + $crate::Needed::Size(i) => $crate::IResult::Incomplete($crate::Needed::Size($consumed + i)), + } + } else { + let input = if let $crate::IResult::Done(i,_) = res { + i + } else { + $i + }; + $crate::IResult::Done(input, $assemble()) + } + }); + + ($i:expr, $consumed:expr, $field:ident : $e:ident, $assemble:expr) => ( + chaining_parser!($i, $consumed, $field: call!($e), $assemble); + ); + + ($i:expr, $consumed:expr, $field:ident : $submac:ident!( $($args:tt)* ), $assemble:expr) => ( + match $submac!($i, $($args)*) { + $crate::IResult::Error(e) => $crate::IResult::Error(e), + $crate::IResult::Incomplete($crate::Needed::Unknown) => $crate::IResult::Incomplete($crate::Needed::Unknown), + $crate::IResult::Incomplete($crate::Needed::Size(i)) => $crate::IResult::Incomplete($crate::Needed::Size($consumed + i)), + $crate::IResult::Done(i,o) => { + let $field = o; + $crate::IResult::Done(i, $assemble()) + } + } + ); + + ($i:expr, $consumed:expr, mut $field:ident : $e:ident, $assemble:expr) => ( + chaining_parser!($i, $consumed, mut $field: call!($e), $assemble); + ); + + ($i:expr, $consumed:expr, mut $field:ident : $submac:ident!( $($args:tt)* ), $assemble:expr) => ( + match $submac!($i, $($args)*) { + $crate::IResult::Error(e) => $crate::IResult::Error(e), + $crate::IResult::Incomplete($crate::Needed::Unknown) => $crate::IResult::Incomplete($crate::Needed::Unknown), + $crate::IResult::Incomplete($crate::Needed::Size(i)) => $crate::IResult::Incomplete($crate::Needed::Size($consumed + i)), + $crate::IResult::Done(i,o) => { + let mut $field = o; + $crate::IResult::Done(i, $assemble()) + } + } + ); + + ($i:expr, $consumed:expr, $field:ident : $e:ident ? , $assemble:expr) => ( + chaining_parser!($i, $consumed, $field : call!($e) ? , $assemble); + ); + + ($i:expr, $consumed:expr, $field:ident : $submac:ident!( $($args:tt)* ) ? , $assemble:expr) => ({ + let res = $submac!($i, $($args)*); + if let $crate::IResult::Incomplete(inc) = res { + match inc { + $crate::Needed::Unknown => $crate::IResult::Incomplete($crate::Needed::Unknown), + $crate::Needed::Size(i) => $crate::IResult::Incomplete($crate::Needed::Size($consumed + i)), + } + } else { + let ($field,input) = if let $crate::IResult::Done(i,o) = res { + (::std::option::Option::Some(o), i) + } else { + (::std::option::Option::None, $i) + }; + $crate::IResult::Done(input, $assemble()) + } + }); + + ($i:expr, $consumed:expr, mut $field:ident : $e:ident ? , $assemble:expr) => ( + chaining_parser!($i, $consumed, $field : call!($e) ? , $assemble); + ); + + ($i:expr, $consumed:expr, mut $field:ident : $submac:ident!( $($args:tt)* ) ? , $assemble:expr) => ({ + let res = $submac!($i, $($args)*); + if let $crate::IResult::Incomplete(inc) = res { + match inc { + $crate::Needed::Unknown => $crate::IResult::Incomplete($crate::Needed::Unknown), + $crate::Needed::Size(i) => $crate::IResult::Incomplete($crate::Needed::Size($consumed + i)), + } + } else { + let (mut $field,input) = if let $crate::IResult::Done(i,o) = res { + (::std::option::Option::Some(o), i) + } else { + (::std::option::Option::None, $i) + }; + $crate::IResult::Done(input, $assemble()) + } + }); + + ($i:expr, $consumed:expr, $assemble:expr) => ( + $crate::IResult::Done($i, $assemble()) + ) +); + + +/// `tuple!(I->IResult, I->IResult, ... I->IResult) => I -> IResult` +/// chains parsers and assemble the sub results in a tuple. +/// +/// The input type `I` must implement `nom::InputLength`. +/// +/// This combinator will count how much data is consumed by every child parser and take it into account if +/// there is not enough data +/// +/// ``` +/// # #[macro_use] extern crate nom; +/// # use nom::IResult::{self, Done, Error}; +/// # use nom::Err::Position; +/// # use nom::ErrorKind; +/// # use nom::be_u16; +/// // the return type depends of the children parsers +/// named!(parser<&[u8], (u16, &[u8], &[u8]) >, +/// tuple!( +/// be_u16 , +/// take!(3), +/// tag!("fg") +/// ) +/// ); +/// +/// # fn main() { +/// assert_eq!( +/// parser(&b"abcdefgh"[..]), +/// Done( +/// &b"h"[..], +/// (0x6162u16, &b"cde"[..], &b"fg"[..]) +/// ) +/// ); +/// # } +/// ``` +#[macro_export] +macro_rules! tuple ( + ($i:expr, $($rest:tt)*) => ( + { + tuple_parser!($i, 0usize, (), $($rest)*) + } + ); +); + +/// Internal parser, do not use directly +#[doc(hidden)] +#[macro_export] +macro_rules! tuple_parser ( + ($i:expr, $consumed:expr, ($($parsed:tt),*), $e:ident, $($rest:tt)*) => ( + tuple_parser!($i, $consumed, ($($parsed),*), call!($e), $($rest)*); + ); + ($i:expr, $consumed:expr, (), $submac:ident!( $($args:tt)* ), $($rest:tt)*) => ( + { + use $crate::InputLength; + match $submac!($i, $($args)*) { + $crate::IResult::Error(e) => $crate::IResult::Error(e), + $crate::IResult::Incomplete($crate::Needed::Unknown) => $crate::IResult::Incomplete($crate::Needed::Unknown), + $crate::IResult::Incomplete($crate::Needed::Size(i)) => $crate::IResult::Incomplete($crate::Needed::Size($consumed + i)), + $crate::IResult::Done(i,o) => { + tuple_parser!(i, $consumed + (($i).input_len() - i.input_len()), (o), $($rest)*) + } + } + } + ); + ($i:expr, $consumed:expr, ($($parsed:tt)*), $submac:ident!( $($args:tt)* ), $($rest:tt)*) => ( + { + use $crate::InputLength; + match $submac!($i, $($args)*) { + $crate::IResult::Error(e) => $crate::IResult::Error(e), + $crate::IResult::Incomplete($crate::Needed::Unknown) => $crate::IResult::Incomplete($crate::Needed::Unknown), + $crate::IResult::Incomplete($crate::Needed::Size(i)) => $crate::IResult::Incomplete($crate::Needed::Size($consumed + i)), + $crate::IResult::Done(i,o) => { + tuple_parser!(i, $consumed + (($i).input_len() - i.input_len()), ($($parsed)* , o), $($rest)*) + } + } + } + ); + ($i:expr, $consumed:expr, ($($parsed:tt),*), $e:ident) => ( + tuple_parser!($i, $consumed, ($($parsed),*), call!($e)); + ); + ($i:expr, $consumed:expr, (), $submac:ident!( $($args:tt)* )) => ( + { + use $crate::InputLength; + match $submac!($i, $($args)*) { + $crate::IResult::Error(e) => $crate::IResult::Error(e), + $crate::IResult::Incomplete($crate::Needed::Unknown) => $crate::IResult::Incomplete($crate::Needed::Unknown), + $crate::IResult::Incomplete($crate::Needed::Size(i)) => $crate::IResult::Incomplete($crate::Needed::Size($consumed + i)), + $crate::IResult::Done(i,o) => { + $crate::IResult::Done(i, (o)) + } + } + } + ); + ($i:expr, $consumed:expr, ($($parsed:expr),*), $submac:ident!( $($args:tt)* )) => ( + { + use $crate::InputLength; + match $submac!($i, $($args)*) { + $crate::IResult::Error(e) => $crate::IResult::Error(e), + $crate::IResult::Incomplete($crate::Needed::Unknown) => $crate::IResult::Incomplete($crate::Needed::Unknown), + $crate::IResult::Incomplete($crate::Needed::Size(i)) => $crate::IResult::Incomplete($crate::Needed::Size($consumed + i)), + $crate::IResult::Done(i,o) => { + $crate::IResult::Done(i, ($($parsed),* , o)) + } + } + } + ); + ($i:expr, $consumed:expr, ($($parsed:expr),*)) => ( + { + $crate::IResult::Done($i, ($($parsed),*)) + } + ); +); +/// `alt!(I -> IResult | I -> IResult | ... | I -> IResult ) => I -> IResult` +/// try a list of parsers, return the result of the first successful one +/// +/// If one of the parser returns Incomplete, alt will return Incomplete, to retry +/// once you get more input. Note that it is better for performance to know the +/// minimum size of data you need before you get into alt. +/// +/// ``` +/// # #[macro_use] extern crate nom; +/// # use nom::IResult::Done; +/// # fn main() { +/// named!( test, alt!( tag!( "abcd" ) | tag!( "efgh" ) ) ); +/// let r1 = test(b"abcdefgh"); +/// assert_eq!(r1, Done(&b"efgh"[..], &b"abcd"[..])); +/// let r2 = test(&b"efghijkl"[..]); +/// assert_eq!(r2, Done(&b"ijkl"[..], &b"efgh"[..])); +/// # } +/// ``` +/// +/// There is another syntax for alt allowing a block to manipulate the result: +/// +/// ``` +/// # #[macro_use] extern crate nom; +/// # use nom::IResult::Done; +/// # fn main() { +/// #[derive(Debug,PartialEq,Eq)] +/// enum Tagged { +/// Abcd, +/// Efgh, +/// Took(usize) +/// } +/// named!(test, alt!( +/// tag!("abcd") => { |_| Tagged::Abcd } +/// | tag!("efgh") => { |_| Tagged::Efgh } +/// | take!(5) => { |res: &[u8]| Tagged::Took(res.len()) } // the closure takes the result as argument if the parser is successful +/// )); +/// let r1 = test(b"abcdefgh"); +/// assert_eq!(r1, Done(&b"efgh"[..], Tagged::Abcd)); +/// let r2 = test(&b"efghijkl"[..]); +/// assert_eq!(r2, Done(&b"ijkl"[..], Tagged::Efgh)); +/// let r3 = test(&b"mnopqrst"[..]); +/// assert_eq!(r3, Done(&b"rst"[..], Tagged::Took(5))); +/// # } +/// ``` +/// +/// **BE CAREFUL** there is a case where the behaviour of `alt!` can be confusing: +/// +/// when the alternatives have different lengths, like this case: +/// +/// ```ignore +/// named!( test, alt!( tag!( "abcd" ) | tag!( "ef" ) | tag!( "ghi" ) | tag!( "kl" ) ) ); +/// ``` +/// +/// With this parser, if you pass `"abcd"` as input, the first alternative parses it correctly, +/// but if you pass `"efg"`, the first alternative will return `Incomplete`, since it needs an input +/// of 4 bytes. This behaviour of `alt!` is expected: if you get a partial input that isn't matched +/// by the first alternative, but would match if the input was complete, you want `alt!` to indicate +/// that it cannot decide with limited information. +/// +/// There are two ways to fix this behaviour. The first one consists in ordering the alternatives +/// by size, like this: +/// +/// ```ignore +/// named!( test, alt!( tag!( "ef" ) | tag!( "kl") | tag!( "ghi" ) | tag!( "abcd" ) ) ); +/// ``` +/// +/// With this solution, the largest alternative will be tested last. +/// +/// The other solution uses the `complete!` combinator, which transforms an `Incomplete` in an +/// `Error`. If one of the alternatives returns `Incomplete` but is wrapped by `complete!`, +/// `alt!` will try the next alternative. This is useful when you know that +/// you will not get partial input: +/// +/// ```ignore +/// named!( test, +/// alt!( +/// complete!( tag!( "abcd" ) ) | +/// complete!( tag!( "ef" ) ) | +/// complete!( tag!( "ghi" ) ) | +/// complete!( tag!( "kl" ) ) +/// ) +/// ); +/// ``` +/// +/// If you want the `complete!` combinator to be applied to all rules then use the convenience +/// `alt_complete!` macro (see below). +/// +/// This behaviour of `alt!` can get especially confusing if multiple alternatives have different +/// sizes but a common prefix, like this: +/// +/// ```ignore +/// named!( test, alt!( tag!( "abcd" ) | tag!( "ab" ) | tag!( "ef" ) ) ); +/// ``` +/// +/// in that case, if you order by size, passing `"abcd"` as input will always be matched by the +/// smallest parser, so the solution using `complete!` is better suited. +/// +/// You can also nest multiple `alt!`, like this: +/// +/// ```ignore +/// named!( test, +/// alt!( +/// preceded!( +/// tag!("ab"), +/// alt!( +/// tag!( "cd" ) | +/// eof +/// ) +/// ) +/// | tag!( "ef" ) +/// ) +/// ); +/// ``` +/// +/// `preceded!` will first parse `"ab"` then, if successful, try the alternatives "cd", +/// or empty input (End Of File). If none of them work, `preceded!` will fail and +/// "ef" will be tested. +/// +#[macro_export] +macro_rules! alt ( + ($i:expr, $($rest:tt)*) => ( + { + alt_parser!($i, $($rest)*) + } + ); +); + +/// Internal parser, do not use directly +#[doc(hidden)] +#[macro_export] +macro_rules! alt_parser ( + ($i:expr, $e:ident | $($rest:tt)*) => ( + alt_parser!($i, call!($e) | $($rest)*); + ); + + ($i:expr, $subrule:ident!( $($args:tt)*) | $($rest:tt)*) => ( + { + let res = $subrule!($i, $($args)*); + match res { + $crate::IResult::Done(_,_) => res, + $crate::IResult::Incomplete(_) => res, + _ => alt_parser!($i, $($rest)*) + } + } + ); + + ($i:expr, $subrule:ident!( $($args:tt)* ) => { $gen:expr } | $($rest:tt)+) => ( + { + match $subrule!( $i, $($args)* ) { + $crate::IResult::Done(i,o) => $crate::IResult::Done(i,$gen(o)), + $crate::IResult::Incomplete(x) => $crate::IResult::Incomplete(x), + $crate::IResult::Error(_) => { + alt_parser!($i, $($rest)*) + } + } + } + ); + + ($i:expr, $e:ident => { $gen:expr } | $($rest:tt)*) => ( + alt_parser!($i, call!($e) => { $gen } | $($rest)*); + ); + + ($i:expr, $e:ident => { $gen:expr }) => ( + alt_parser!($i, call!($e) => { $gen }); + ); + + ($i:expr, $subrule:ident!( $($args:tt)* ) => { $gen:expr }) => ( + { + match $subrule!( $i, $($args)* ) { + $crate::IResult::Done(i,o) => $crate::IResult::Done(i,$gen(o)), + $crate::IResult::Incomplete(x) => $crate::IResult::Incomplete(x), + $crate::IResult::Error(_) => { + alt_parser!($i) + } + } + } + ); + + ($i:expr, $e:ident) => ( + alt_parser!($i, call!($e)); + ); + + ($i:expr, $subrule:ident!( $($args:tt)*)) => ( + { + match $subrule!( $i, $($args)* ) { + $crate::IResult::Done(i,o) => $crate::IResult::Done(i,o), + $crate::IResult::Incomplete(x) => $crate::IResult::Incomplete(x), + $crate::IResult::Error(_) => { + alt_parser!($i) + } + } + } + ); + + ($i:expr) => ( + $crate::IResult::Error($crate::Err::Position($crate::ErrorKind::Alt,$i)) + ); +); + +/// This is a combination of the `alt!` and `complete!` combinators. Rather +/// than returning `Incomplete` on partial input, `alt_complete!` will try the +/// next alternative in the chain. You should use this only if you know you +/// will not receive partial input for the rules you're trying to match (this +/// is almost always the case for parsing programming languages). +#[macro_export] +macro_rules! alt_complete ( + // Recursive rules (must include `complete!` around the head) + + ($i:expr, $e:ident | $($rest:tt)*) => ( + alt_complete!($i, complete!(call!($e)) | $($rest)*); + ); + + ($i:expr, $subrule:ident!( $($args:tt)*) | $($rest:tt)*) => ( + { + let res = complete!($i, $subrule!($($args)*)); + match res { + $crate::IResult::Done(_,_) => res, + _ => alt_complete!($i, $($rest)*), + } + } + ); + + ($i:expr, $subrule:ident!( $($args:tt)* ) => { $gen:expr } | $($rest:tt)+) => ( + { + match complete!($i, $subrule!($($args)*)) { + $crate::IResult::Done(i,o) => $crate::IResult::Done(i,$gen(o)), + _ => alt_complete!($i, $($rest)*), + } + } + ); + + ($i:expr, $e:ident => { $gen:expr } | $($rest:tt)*) => ( + alt_complete!($i, complete!(call!($e)) => { $gen } | $($rest)*); + ); + + // Tail (non-recursive) rules + + ($i:expr, $e:ident => { $gen:expr }) => ( + alt_complete!($i, call!($e) => { $gen }); + ); + + ($i:expr, $subrule:ident!( $($args:tt)* ) => { $gen:expr }) => ( + alt_parser!($i, $subrule!($($args)*) => { $gen }) + ); + + ($i:expr, $e:ident) => ( + alt_complete!($i, call!($e)); + ); + + ($i:expr, $subrule:ident!( $($args:tt)*)) => ( + alt_parser!($i, $subrule!($($args)*)) + ); +); + +/// `switch!(I -> IResult, P => I -> IResult | ... | P => I -> IResult ) => I -> IResult` +/// choose the next parser depending on the result of the first one, if successful, +/// and returns the result of the second parser +/// +/// ``` +/// # #[macro_use] extern crate nom; +/// # use nom::IResult::{Done,Error}; +/// # use nom::Err::{Position, NodePosition}; +/// # use nom::ErrorKind; +/// # fn main() { +/// named!(sw, +/// switch!(take!(4), +/// b"abcd" => tag!("XYZ") | +/// b"efgh" => tag!("123") +/// ) +/// ); +/// +/// let a = b"abcdXYZ123"; +/// let b = b"abcdef"; +/// let c = b"efgh123"; +/// let d = b"blah"; +/// +/// assert_eq!(sw(&a[..]), Done(&b"123"[..], &b"XYZ"[..])); +/// assert_eq!(sw(&b[..]), Error(NodePosition(ErrorKind::Switch, &b"abcdef"[..], Box::new(Position(ErrorKind::Tag, &b"ef"[..]))))); +/// assert_eq!(sw(&c[..]), Done(&b""[..], &b"123"[..])); +/// assert_eq!(sw(&d[..]), Error(Position(ErrorKind::Switch, &b"blah"[..]))); +/// # } +/// ``` +/// +/// Due to limitations in Rust macros, it is not possible to have simple functions on the right hand +/// side of pattern, like this: +/// +/// ```ignore +/// named!(sw, +/// switch!(take!(4), +/// b"abcd" => tag!("XYZ") | +/// b"efgh" => tag!("123") +/// ) +/// ); +/// ``` +/// +/// If you want to pass your own functions instead, you can use the `call!` combinator as follows: +/// +/// ```ignore +/// named!(xyz, tag!("XYZ")); +/// named!(num, tag!("123")); +/// named!(sw, +/// switch!(take!(4), +/// b"abcd" => call!(xyz) | +/// b"efgh" => call!(num) +/// ) +/// ); +/// ``` +/// +#[macro_export] +macro_rules! switch ( + ($i:expr, $submac:ident!( $($args:tt)*), $($rest:tt)*) => ( + { + switch_impl!($i, $submac!($($args)*), $($rest)*) + } + ); + ($i:expr, $e:ident, $($rest:tt)*) => ( + { + switch_impl!($i, call!($e), $($rest)*) + } + ); +); + +/// Internal parser, do not use directly +#[doc(hidden)] +#[macro_export] +macro_rules! switch_impl ( + ($i:expr, $submac:ident!( $($args:tt)* ), $($p:pat => $subrule:ident!( $($args2:tt)* ))|* ) => ( + { + match $submac!($i, $($args)*) { + $crate::IResult::Error(e) => $crate::IResult::Error($crate::Err::NodePosition( + $crate::ErrorKind::Switch, $i, ::std::boxed::Box::new(e) + )), + $crate::IResult::Incomplete(i) => $crate::IResult::Incomplete(i), + $crate::IResult::Done(i, o) => { + match o { + $($p => match $subrule!(i, $($args2)*) { + $crate::IResult::Error(e) => $crate::IResult::Error($crate::Err::NodePosition( + $crate::ErrorKind::Switch, $i, ::std::boxed::Box::new(e) + )), + a => a, + }),*, + _ => $crate::IResult::Error($crate::Err::Position($crate::ErrorKind::Switch,$i)) + } + } + } + } + ); +); +/// `opt!(I -> IResult) => I -> IResult>` +/// make the underlying parser optional +/// +/// returns an Option of the returned type. This parser returns `Some(result)` if the child parser +/// succeeds,`None` if it fails, and `Incomplete` if it did not have enough data to decide +/// +/// ``` +/// # #[macro_use] extern crate nom; +/// # use nom::IResult::Done; +/// # fn main() { +/// named!( o<&[u8], Option<&[u8]> >, opt!( tag!( "abcd" ) ) ); +/// +/// let a = b"abcdef"; +/// let b = b"bcdefg"; +/// assert_eq!(o(&a[..]), Done(&b"ef"[..], Some(&b"abcd"[..]))); +/// assert_eq!(o(&b[..]), Done(&b"bcdefg"[..], None)); +/// # } +/// ``` +#[macro_export] +macro_rules! opt( + ($i:expr, $submac:ident!( $($args:tt)* )) => ( + { + match $submac!($i, $($args)*) { + $crate::IResult::Done(i,o) => $crate::IResult::Done(i, ::std::option::Option::Some(o)), + $crate::IResult::Error(_) => $crate::IResult::Done($i, ::std::option::Option::None), + $crate::IResult::Incomplete(i) => $crate::IResult::Incomplete(i) + } + } + ); + ($i:expr, $f:expr) => ( + opt!($i, call!($f)); + ); +); + +/// `opt_res!(I -> IResult) => I -> IResult>` +/// make the underlying parser optional +/// +/// returns a Result, with Err containing the parsing error +/// +/// ``` +/// # #[macro_use] extern crate nom; +/// # use nom::IResult::Done; +/// # use nom::Err::Position; +/// # use nom::ErrorKind; +/// # fn main() { +/// named!( o<&[u8], Result<&[u8], nom::Err<&[u8]> > >, opt_res!( tag!( "abcd" ) ) ); +/// +/// let a = b"abcdef"; +/// let b = b"bcdefg"; +/// assert_eq!(o(&a[..]), Done(&b"ef"[..], Ok(&b"abcd"[..]))); +/// assert_eq!(o(&b[..]), Done(&b"bcdefg"[..], Err(Position(ErrorKind::Tag, &b[..])))); +/// # } +/// ``` +#[macro_export] +macro_rules! opt_res ( + ($i:expr, $submac:ident!( $($args:tt)* )) => ( + { + match $submac!($i, $($args)*) { + $crate::IResult::Done(i,o) => $crate::IResult::Done(i, Ok(o)), + $crate::IResult::Error(e) => $crate::IResult::Done($i, Err(e)), + $crate::IResult::Incomplete(i) => $crate::IResult::Incomplete(i) + } + } + ); + ($i:expr, $f:expr) => ( + opt_res!($i, call!($f)); + ); +); + +/// `cond!(bool, I -> IResult) => I -> IResult>` +/// Conditional combinator +/// +/// Wraps another parser and calls it if the +/// condition is met. This combinator returns +/// an Option of the return type of the child +/// parser. +/// +/// This is especially useful if a parser depends +/// on the value return by a preceding parser in +/// a `chain!`. +/// +/// ``` +/// # #[macro_use] extern crate nom; +/// # use nom::IResult::Done; +/// # use nom::IResult; +/// # fn main() { +/// let b = true; +/// let f: Box IResult<&[u8],Option<&[u8]>>> = Box::new(closure!(&'static[u8], +/// cond!( b, tag!("abcd") )) +/// ); +/// +/// let a = b"abcdef"; +/// assert_eq!(f(&a[..]), Done(&b"ef"[..], Some(&b"abcd"[..]))); +/// +/// let b2 = false; +/// let f2:Box IResult<&[u8],Option<&[u8]>>> = Box::new(closure!(&'static[u8], +/// cond!( b2, tag!("abcd") )) +/// ); +/// assert_eq!(f2(&a[..]), Done(&b"abcdef"[..], None)); +/// # } +/// ``` +/// +#[macro_export] +macro_rules! cond( + ($i:expr, $cond:expr, $submac:ident!( $($args:tt)* )) => ( + { + if $cond { + match $submac!($i, $($args)*) { + $crate::IResult::Done(i,o) => $crate::IResult::Done(i, ::std::option::Option::Some(o)), + $crate::IResult::Error(_) => $crate::IResult::Done($i, ::std::option::Option::None), + $crate::IResult::Incomplete(i) => $crate::IResult::Incomplete(i) + } + } else { + $crate::IResult::Done($i, ::std::option::Option::None) + } + } + ); + ($i:expr, $cond:expr, $f:expr) => ( + cond!($i, $cond, call!($f)); + ); +); + +/// `cond_reduce!(bool, I -> IResult) => I -> IResult` +/// Conditional combinator with error +/// +/// Wraps another parser and calls it if the +/// condition is met. This combinator returns +/// an error if the condition is false +/// +/// This is especially useful if a parser depends +/// on the value return by a preceding parser in +/// a `chain!`. +/// +/// ``` +/// # #[macro_use] extern crate nom; +/// # use nom::IResult::{Done,Error}; +/// # use nom::{Err,ErrorKind}; +/// # fn main() { +/// let b = true; +/// let f = closure!(&'static[u8], +/// cond_reduce!( b, tag!("abcd") ) +/// ); +/// +/// let a = b"abcdef"; +/// assert_eq!(f(&a[..]), Done(&b"ef"[..], &b"abcd"[..])); +/// +/// let b2 = false; +/// let f2 = closure!(&'static[u8], +/// cond_reduce!( b2, tag!("abcd") ) +/// ); +/// assert_eq!(f2(&a[..]), Error(Err::Position(ErrorKind::CondReduce, &a[..]))); +/// # } +/// ``` +/// +#[macro_export] +macro_rules! cond_reduce( + ($i:expr, $cond:expr, $submac:ident!( $($args:tt)* )) => ( + { + if $cond { + match $submac!($i, $($args)*) { + $crate::IResult::Done(i,o) => $crate::IResult::Done(i, o), + $crate::IResult::Error(e) => $crate::IResult::Error(e), + $crate::IResult::Incomplete(i) => $crate::IResult::Incomplete(i) + } + } else { + $crate::IResult::Error($crate::Err::Position($crate::ErrorKind::CondReduce, $i)) + } + } + ); + ($i:expr, $cond:expr, $f:expr) => ( + cond_reduce!($i, $cond, call!($f)); + ); +); + +/// `peek!(I -> IResult) => I -> IResult` +/// returns a result without consuming the input +/// +/// the embedded parser may return Incomplete +/// +/// ``` +/// # #[macro_use] extern crate nom; +/// # use nom::IResult::Done; +/// # fn main() { +/// named!(ptag, peek!( tag!( "abcd" ) ) ); +/// +/// let r = ptag(&b"abcdefgh"[..]); +/// assert_eq!(r, Done(&b"abcdefgh"[..], &b"abcd"[..])); +/// # } +/// ``` +#[macro_export] +macro_rules! peek( + ($i:expr, $submac:ident!( $($args:tt)* )) => ( + { + match $submac!($i, $($args)*) { + $crate::IResult::Done(_,o) => $crate::IResult::Done($i, o), + $crate::IResult::Error(a) => $crate::IResult::Error(a), + $crate::IResult::Incomplete(i) => $crate::IResult::Incomplete(i) + } + } + ); + ($i:expr, $f:expr) => ( + peek!($i, call!($f)); + ); +); + +/// `tap!(name: I -> IResult => { block }) => I -> IResult` +/// allows access to the parser's result without affecting it +/// +/// ``` +/// # #[macro_use] extern crate nom; +/// # use nom::IResult::Done; +/// # use std::str; +/// # fn main() { +/// named!(ptag, tap!(res: tag!( "abcd" ) => { println!("recognized {}", str::from_utf8(res).unwrap()) } ) ); +/// +/// let r = ptag(&b"abcdefgh"[..]); +/// assert_eq!(r, Done(&b"efgh"[..], &b"abcd"[..])); +/// # } +/// ``` +#[macro_export] +macro_rules! tap ( + ($i:expr, $name:ident : $submac:ident!( $($args:tt)* ) => $e:expr) => ( + { + match $submac!($i, $($args)*) { + $crate::IResult::Done(i,o) => { + let $name = o; + $e; + $crate::IResult::Done(i, $name) + }, + $crate::IResult::Error(a) => $crate::IResult::Error(a), + $crate::IResult::Incomplete(i) => $crate::IResult::Incomplete(i) + } + } + ); + ($i:expr, $name: ident: $f:expr => $e:expr) => ( + tap!($i, $name: call!($f) => $e); + ); +); + +/// `pair!(I -> IResult, I -> IResult) => I -> IResult` +/// pair(X,Y), returns (x,y) +/// +#[macro_export] +macro_rules! pair( + ($i:expr, $submac:ident!( $($args:tt)* ), $submac2:ident!( $($args2:tt)* )) => ( + { + tuple!($i, $submac!($($args)*), $submac2!($($args2)*)) + } + ); + + ($i:expr, $submac:ident!( $($args:tt)* ), $g:expr) => ( + pair!($i, $submac!($($args)*), call!($g)); + ); + + ($i:expr, $f:expr, $submac:ident!( $($args:tt)* )) => ( + pair!($i, call!($f), $submac!($($args)*)); + ); + + ($i:expr, $f:expr, $g:expr) => ( + pair!($i, call!($f), call!($g)); + ); +); + +/// `separated_pair!(I -> IResult, I -> IResult, I -> IResult) => I -> IResult` +/// separated_pair(X,sep,Y) returns (x,y) +#[macro_export] +macro_rules! separated_pair( + ($i:expr, $submac:ident!( $($args:tt)* ), $($rest:tt)+) => ( + { + match tuple_parser!($i, 0usize, (), $submac!($($args)*), $($rest)*) { + $crate::IResult::Error(a) => $crate::IResult::Error(a), + $crate::IResult::Incomplete(i) => $crate::IResult::Incomplete(i), + $crate::IResult::Done(i1, (o1, _, o2)) => { + $crate::IResult::Done(i1, (o1, o2)) + } + } + } + ); + + ($i:expr, $f:expr, $($rest:tt)+) => ( + separated_pair!($i, call!($f), $($rest)*); + ); +); + +/// `preceded!(I -> IResult, I -> IResult) => I -> IResult` +/// preceded(opening, X) returns X +#[macro_export] +macro_rules! preceded( + ($i:expr, $submac:ident!( $($args:tt)* ), $submac2:ident!( $($args2:tt)* )) => ( + { + match tuple!($i, $submac!($($args)*), $submac2!($($args2)*)) { + $crate::IResult::Error(a) => $crate::IResult::Error(a), + $crate::IResult::Incomplete(i) => $crate::IResult::Incomplete(i), + $crate::IResult::Done(remaining, (_,o)) => { + $crate::IResult::Done(remaining, o) + } + } + } + ); + + ($i:expr, $submac:ident!( $($args:tt)* ), $g:expr) => ( + preceded!($i, $submac!($($args)*), call!($g)); + ); + + ($i:expr, $f:expr, $submac:ident!( $($args:tt)* )) => ( + preceded!($i, call!($f), $submac!($($args)*)); + ); + + ($i:expr, $f:expr, $g:expr) => ( + preceded!($i, call!($f), call!($g)); + ); +); + +/// `terminated!(I -> IResult, I -> IResult) => I -> IResult` +/// terminated(X, closing) returns X +#[macro_export] +macro_rules! terminated( + ($i:expr, $submac:ident!( $($args:tt)* ), $submac2:ident!( $($args2:tt)* )) => ( + { + match tuple!($i, $submac!($($args)*), $submac2!($($args2)*)) { + $crate::IResult::Error(a) => $crate::IResult::Error(a), + $crate::IResult::Incomplete(i) => $crate::IResult::Incomplete(i), + $crate::IResult::Done(remaining, (o,_)) => { + $crate::IResult::Done(remaining, o) + } + } + } + ); + + ($i:expr, $submac:ident!( $($args:tt)* ), $g:expr) => ( + terminated!($i, $submac!($($args)*), call!($g)); + ); + + ($i:expr, $f:expr, $submac:ident!( $($args:tt)* )) => ( + terminated!($i, call!($f), $submac!($($args)*)); + ); + + ($i:expr, $f:expr, $g:expr) => ( + terminated!($i, call!($f), call!($g)); + ); +); + +/// `delimited!(I -> IResult, I -> IResult, I -> IResult) => I -> IResult` +/// delimited(opening, X, closing) returns X +#[macro_export] +macro_rules! delimited( + ($i:expr, $submac:ident!( $($args:tt)* ), $($rest:tt)+) => ( + { + match tuple_parser!($i, 0usize, (), $submac!($($args)*), $($rest)*) { + $crate::IResult::Error(a) => $crate::IResult::Error(a), + $crate::IResult::Incomplete(i) => $crate::IResult::Incomplete(i), + $crate::IResult::Done(i1, (_, o, _)) => { + $crate::IResult::Done(i1, o) + } + } + } + ); + + ($i:expr, $f:expr, $($rest:tt)+) => ( + delimited!($i, call!($f), $($rest)*); + ); +); + +/// `separated_list!(I -> IResult, I -> IResult) => I -> IResult>` +/// separated_list(sep, X) returns Vec +#[macro_export] +macro_rules! separated_list( + ($i:expr, $sep:ident!( $($args:tt)* ), $submac:ident!( $($args2:tt)* )) => ( + { + let mut res = ::std::vec::Vec::new(); + let mut input = $i; + + // get the first element + match $submac!(input, $($args2)*) { + $crate::IResult::Error(_) => $crate::IResult::Done(input, ::std::vec::Vec::new()), + $crate::IResult::Incomplete(i) => $crate::IResult::Incomplete(i), + $crate::IResult::Done(i,o) => { + if i.len() == input.len() { + $crate::IResult::Error($crate::Err::Position($crate::ErrorKind::SeparatedList,input)) + } else { + res.push(o); + input = i; + + loop { + // get the separator first + if let $crate::IResult::Done(i2,_) = $sep!(input, $($args)*) { + if i2.len() == input.len() { + break; + } + input = i2; + + // get the element next + if let $crate::IResult::Done(i3,o3) = $submac!(input, $($args2)*) { + if i3.len() == input.len() { + break; + } + res.push(o3); + input = i3; + } else { + break; + } + } else { + break; + } + } + $crate::IResult::Done(input, res) + } + }, + } + } + ); + ($i:expr, $submac:ident!( $($args:tt)* ), $g:expr) => ( + separated_list!($i, $submac!($($args)*), call!($g)); + ); + ($i:expr, $f:expr, $submac:ident!( $($args:tt)* )) => ( + separated_list!($i, call!($f), $submac!($($args)*)); + ); + ($i:expr, $f:expr, $g:expr) => ( + separated_list!($i, call!($f), call!($g)); + ); +); + +/// `separated_nonempty_list!(I -> IResult, I -> IResult) => I -> IResult>` +/// separated_nonempty_list(sep, X) returns Vec +#[macro_export] +macro_rules! separated_nonempty_list( + ($i:expr, $sep:ident!( $($args:tt)* ), $submac:ident!( $($args2:tt)* )) => ( + { + let mut res = ::std::vec::Vec::new(); + let mut input = $i; + + // get the first element + match $submac!(input, $($args2)*) { + $crate::IResult::Error(a) => $crate::IResult::Error(a), + $crate::IResult::Incomplete(i) => $crate::IResult::Incomplete(i), + $crate::IResult::Done(i,o) => { + if i.len() == input.len() { + $crate::IResult::Error($crate::Err::Position($crate::ErrorKind::SeparatedNonEmptyList,input)) + } else { + res.push(o); + input = i; + + loop { + if let $crate::IResult::Done(i2,_) = $sep!(input, $($args)*) { + if i2.len() == input.len() { + break; + } + input = i2; + + if let $crate::IResult::Done(i3,o3) = $submac!(input, $($args2)*) { + if i3.len() == input.len() { + break; + } + res.push(o3); + input = i3; + } else { + break; + } + } else { + break; + } + } + $crate::IResult::Done(input, res) + } + }, + } + } + ); + ($i:expr, $submac:ident!( $($args:tt)* ), $g:expr) => ( + separated_nonempty_list!($i, $submac!($($args)*), call!($g)); + ); + ($i:expr, $f:expr, $submac:ident!( $($args:tt)* )) => ( + separated_nonempty_list!($i, call!($f), $submac!($($args)*)); + ); + ($i:expr, $f:expr, $g:expr) => ( + separated_nonempty_list!($i, call!($f), call!($g)); + ); +); + +/// `many0!(I -> IResult) => I -> IResult>` +/// Applies the parser 0 or more times and returns the list of results in a Vec +/// +/// the embedded parser may return Incomplete +/// +/// ``` +/// # #[macro_use] extern crate nom; +/// # use nom::IResult::Done; +/// # fn main() { +/// named!(multi<&[u8], Vec<&[u8]> >, many0!( tag!( "abcd" ) ) ); +/// +/// let a = b"abcdabcdefgh"; +/// let b = b"azerty"; +/// +/// let res = vec![&b"abcd"[..], &b"abcd"[..]]; +/// assert_eq!(multi(&a[..]), Done(&b"efgh"[..], res)); +/// assert_eq!(multi(&b[..]), Done(&b"azerty"[..], Vec::new())); +/// # } +/// ``` +/// 0 or more +#[macro_export] +macro_rules! many0( + ($i:expr, $submac:ident!( $($args:tt)* )) => ( + { + use $crate::InputLength; + if ($i).input_len() == 0 { + $crate::IResult::Done($i, ::std::vec::Vec::new()) + } else { + match $submac!($i, $($args)*) { + $crate::IResult::Error(_) => { + $crate::IResult::Done($i, ::std::vec::Vec::new()) + }, + $crate::IResult::Incomplete(i) => $crate::IResult::Incomplete(i), + $crate::IResult::Done(i1,o1) => { + if i1.input_len() == 0 { + $crate::IResult::Done(i1,vec![o1]) + } else { + let mut res = ::std::vec::Vec::with_capacity(4); + res.push(o1); + let mut input = i1; + let mut incomplete: ::std::option::Option<$crate::Needed> = ::std::option::Option::None; + loop { + match $submac!(input, $($args)*) { + $crate::IResult::Done(i, o) => { + // do not allow parsers that do not consume input (causes infinite loops) + if i.input_len() == input.input_len() { + break; + } + res.push(o); + input = i; + } + $crate::IResult::Error(_) => { + break; + }, + $crate::IResult::Incomplete($crate::Needed::Unknown) => { + incomplete = ::std::option::Option::Some($crate::Needed::Unknown); + break; + }, + $crate::IResult::Incomplete($crate::Needed::Size(i)) => { + incomplete = ::std::option::Option::Some($crate::Needed::Size(i + ($i).input_len() - input.input_len())); + break; + }, + } + if input.input_len() == 0 { + break; + } + } + + match incomplete { + ::std::option::Option::Some(i) => $crate::IResult::Incomplete(i), + ::std::option::Option::None => $crate::IResult::Done(input, res) + } + } + } + } + } + } + ); + ($i:expr, $f:expr) => ( + many0!($i, call!($f)); + ); +); + +/// `many1!(I -> IResult) => I -> IResult>` +/// Applies the parser 1 or more times and returns the list of results in a Vec +/// +/// the embedded parser may return Incomplete +/// +/// ``` +/// # #[macro_use] extern crate nom; +/// # use nom::IResult::{Done, Error}; +/// # use nom::Err::Position; +/// # use nom::ErrorKind; +/// # fn main() { +/// named!(multi<&[u8], Vec<&[u8]> >, many1!( tag!( "abcd" ) ) ); +/// +/// let a = b"abcdabcdefgh"; +/// let b = b"azerty"; +/// +/// let res = vec![&b"abcd"[..], &b"abcd"[..]]; +/// assert_eq!(multi(&a[..]), Done(&b"efgh"[..], res)); +/// assert_eq!(multi(&b[..]), Error(Position(ErrorKind::Many1,&b[..]))); +/// # } +/// ``` +#[macro_export] +macro_rules! many1( + ($i:expr, $submac:ident!( $($args:tt)* )) => ( + { + use $crate::InputLength; + match $submac!($i, $($args)*) { + $crate::IResult::Error(_) => $crate::IResult::Error($crate::Err::Position($crate::ErrorKind::Many1,$i)), + $crate::IResult::Incomplete(i) => $crate::IResult::Incomplete(i), + $crate::IResult::Done(i1,o1) => { + if i1.len() == 0 { + $crate::IResult::Done(i1,vec![o1]) + } else { + + let mut res = ::std::vec::Vec::with_capacity(4); + res.push(o1); + let mut input = i1; + let mut incomplete: ::std::option::Option<$crate::Needed> = ::std::option::Option::None; + loop { + if input.input_len() == 0 { + break; + } + match $submac!(input, $($args)*) { + $crate::IResult::Error(_) => { + break; + }, + $crate::IResult::Incomplete($crate::Needed::Unknown) => { + incomplete = ::std::option::Option::Some($crate::Needed::Unknown); + break; + }, + $crate::IResult::Incomplete($crate::Needed::Size(i)) => { + incomplete = ::std::option::Option::Some($crate::Needed::Size(i + ($i).input_len() - input.input_len())); + break; + }, + $crate::IResult::Done(i, o) => { + if i.input_len() == input.input_len() { + break; + } + res.push(o); + input = i; + } + } + } + + match incomplete { + ::std::option::Option::Some(i) => $crate::IResult::Incomplete(i), + ::std::option::Option::None => $crate::IResult::Done(input, res) + } + } + } + } + } + ); + ($i:expr, $f:expr) => ( + many1!($i, call!($f)); + ); +); + +/// `many_m_n!(usize, usize, I -> IResult) => I -> IResult>` +/// Applies the parser between m and n times (n included) and returns the list of results in a Vec +/// +/// the embedded parser may return Incomplete +/// +/// ``` +/// # #[macro_use] extern crate nom; +/// # use nom::IResult::{Done, Error}; +/// # use nom::Err::Position; +/// # use nom::ErrorKind; +/// # fn main() { +/// named!(multi<&[u8], Vec<&[u8]> >, many_m_n!(2, 4, tag!( "abcd" ) ) ); +/// +/// let a = b"abcdefgh"; +/// let b = b"abcdabcdefgh"; +/// let c = b"abcdabcdabcdabcdabcdefgh"; +/// +/// assert_eq!(multi(&a[..]),Error(Position(ErrorKind::ManyMN,&a[..]))); +/// let res = vec![&b"abcd"[..], &b"abcd"[..]]; +/// assert_eq!(multi(&b[..]), Done(&b"efgh"[..], res)); +/// let res2 = vec![&b"abcd"[..], &b"abcd"[..], &b"abcd"[..], &b"abcd"[..]]; +/// assert_eq!(multi(&c[..]), Done(&b"abcdefgh"[..], res2)); +/// # } +/// ``` +#[macro_export] +macro_rules! many_m_n( + ($i:expr, $m:expr, $n: expr, $submac:ident!( $($args:tt)* )) => ( + { + use $crate::InputLength; + let mut res = ::std::vec::Vec::with_capacity($m); + let mut input = $i; + let mut count: usize = 0; + let mut err = false; + let mut incomplete: ::std::option::Option<$crate::Needed> = ::std::option::Option::None; + loop { + if count == $n { break } + match $submac!(input, $($args)*) { + $crate::IResult::Done(i, o) => { + // do not allow parsers that do not consume input (causes infinite loops) + if i.input_len() == input.input_len() { + break; + } + res.push(o); + input = i; + count += 1; + } + $crate::IResult::Error(_) => { + err = true; + break; + }, + $crate::IResult::Incomplete($crate::Needed::Unknown) => { + incomplete = ::std::option::Option::Some($crate::Needed::Unknown); + break; + }, + $crate::IResult::Incomplete($crate::Needed::Size(i)) => { + incomplete = ::std::option::Option::Some($crate::Needed::Size(i + ($i).input_len() - input.input_len())); + break; + }, + } + if input.input_len() == 0 { + break; + } + } + + if count < $m { + if err { + $crate::IResult::Error($crate::Err::Position($crate::ErrorKind::ManyMN,$i)) + } else { + match incomplete { + ::std::option::Option::Some(i) => $crate::IResult::Incomplete(i), + ::std::option::Option::None => $crate::IResult::Incomplete($crate::Needed::Unknown) + } + } + } else { + match incomplete { + ::std::option::Option::Some(i) => $crate::IResult::Incomplete(i), + ::std::option::Option::None => $crate::IResult::Done(input, res) + } + } + } + ); + ($i:expr, $m:expr, $n: expr, $f:expr) => ( + many_m_n!($i, $m, $n, call!($f)); + ); +); + +/// `count!(I -> IResult, nb) => I -> IResult>` +/// Applies the child parser a specified number of times +/// +/// ``` +/// # #[macro_use] extern crate nom; +/// # use nom::IResult::{Done,Error}; +/// # use nom::Err::Position; +/// # use nom::ErrorKind; +/// # fn main() { +/// named!(counter< Vec<&[u8]> >, count!( tag!( "abcd" ), 2 ) ); +/// +/// let a = b"abcdabcdabcdef"; +/// let b = b"abcdefgh"; +/// let res = vec![&b"abcd"[..], &b"abcd"[..]]; +/// +/// assert_eq!(counter(&a[..]), Done(&b"abcdef"[..], res)); +/// assert_eq!(counter(&b[..]), Error(Position(ErrorKind::Count, &b[..]))); +/// # } +/// ``` +/// +#[macro_export] +macro_rules! count( + ($i:expr, $submac:ident!( $($args:tt)* ), $count: expr) => ( + { + let ret; + let mut input = $i; + let mut res = ::std::vec::Vec::with_capacity($count); + + loop { + if res.len() == $count { + ret = $crate::IResult::Done(input, res); break; + } + + match $submac!(input, $($args)*) { + $crate::IResult::Done(i,o) => { + res.push(o); + input = i; + }, + $crate::IResult::Error(_) => { + ret = $crate::IResult::Error($crate::Err::Position($crate::ErrorKind::Count,$i)); break; + }, + $crate::IResult::Incomplete(_) => { + ret = $crate::IResult::Incomplete($crate::Needed::Unknown); break; + } + } + } + + ret + } + ); + ($i:expr, $f:expr, $count: expr) => ( + count!($i, call!($f), $count); + ); +); + +/// `count_fixed!(O, I -> IResult, nb) => I -> IResult` +/// Applies the child parser a fixed number of times and returns a fixed size array +/// The type must be specified and it must be `Copy` +/// +/// ``` +/// # #[macro_use] extern crate nom; +/// # use nom::IResult::{Done,Error}; +/// # use nom::Err::Position; +/// # use nom::ErrorKind; +/// # fn main() { +/// named!(counter< [&[u8]; 2] >, count_fixed!( &[u8], tag!( "abcd" ), 2 ) ); +/// // can omit the type specifier if returning slices +/// // named!(counter< [&[u8]; 2] >, count_fixed!( tag!( "abcd" ), 2 ) ); +/// +/// let a = b"abcdabcdabcdef"; +/// let b = b"abcdefgh"; +/// let res = [&b"abcd"[..], &b"abcd"[..]]; +/// +/// assert_eq!(counter(&a[..]), Done(&b"abcdef"[..], res)); +/// assert_eq!(counter(&b[..]), Error(Position(ErrorKind::Count, &b[..]))); +/// # } +/// ``` +/// +#[macro_export] +macro_rules! count_fixed ( + ($i:expr, $typ:ty, $submac:ident!( $($args:tt)* ), $count: expr) => ( + { + let ret; + let mut input = $i; + // `$typ` must be Copy, and thus having no destructor, this is panic safe + let mut res: [$typ; $count] = unsafe{[::std::mem::uninitialized(); $count as usize]}; + let mut cnt: usize = 0; + + loop { + if cnt == $count { + ret = $crate::IResult::Done(input, res); break; + } + + match $submac!(input, $($args)*) { + $crate::IResult::Done(i,o) => { + res[cnt] = o; + cnt += 1; + input = i; + }, + $crate::IResult::Error(_) => { + ret = $crate::IResult::Error($crate::Err::Position($crate::ErrorKind::Count,$i)); break; + }, + $crate::IResult::Incomplete(_) => { + ret = $crate::IResult::Incomplete($crate::Needed::Unknown); break; + } + } + } + + ret + } + ); + ($i:expr, $typ: ty, $f:ident, $count: expr) => ( + count_fixed!($i, $typ, call!($f), $count); + ); +); + +/// `length_value!(I -> IResult, I -> IResult) => I -> IResult>` +/// gets a number from the first parser, then applies the second parser that many times +#[macro_export] +macro_rules! length_value( + ($i:expr, $f:expr, $g:expr) => ( + { + match $f($i) { + $crate::IResult::Error(a) => $crate::IResult::Error(a), + $crate::IResult::Incomplete(x) => $crate::IResult::Incomplete(x), + $crate::IResult::Done(inum, onum) => { + let ret; + let length_token = $i.len() - inum.len(); + let mut input = inum; + let mut res = ::std::vec::Vec::new(); + + loop { + if res.len() == onum as usize { + ret = $crate::IResult::Done(input, res); break; + } + + match $g(input) { + $crate::IResult::Done(iparse, oparse) => { + res.push(oparse); + input = iparse; + }, + $crate::IResult::Error(_) => { + ret = $crate::IResult::Error($crate::Err::Position($crate::ErrorKind::LengthValue,$i)); break; + }, + $crate::IResult::Incomplete(a) => { + ret = match a { + $crate::Needed::Unknown => $crate::IResult::Incomplete($crate::Needed::Unknown), + $crate::Needed::Size(length) => $crate::IResult::Incomplete($crate::Needed::Size(length_token + onum as usize * length)) + }; + break; + } + } + } + + ret + } + } + } + ); + ($i:expr, $f:expr, $g:expr, $length:expr) => ( + { + match $f($i) { + $crate::IResult::Error(a) => $crate::IResult::Error(a), + $crate::IResult::Incomplete(x) => $crate::IResult::Incomplete(x), + $crate::IResult::Done(inum, onum) => { + let ret; + let length_token = $i.len() - inum.len(); + let mut input = inum; + let mut res = ::std::vec::Vec::new(); + + loop { + if res.len() == onum as usize { + ret = $crate::IResult::Done(input, res); break; + } + + match $g(input) { + $crate::IResult::Done(iparse, oparse) => { + res.push(oparse); + input = iparse; + }, + $crate::IResult::Error(_) => { + ret = $crate::IResult::Error($crate::Err::Position($crate::ErrorKind::LengthValue,$i)); break; + }, + $crate::IResult::Incomplete(a) => { + ret = match a { + $crate::Needed::Unknown => $crate::IResult::Incomplete($crate::Needed::Unknown), + $crate::Needed::Size(_) => $crate::IResult::Incomplete($crate::Needed::Size(length_token + onum as usize * $length)) + }; + break; + } + } + } + + ret + } + } + } + ); +); + + +#[cfg(test)] +mod tests { + use internal::{Needed,IResult,Err}; + use internal::IResult::*; + use internal::Err::*; + use util::ErrorKind; + + // reproduce the tag and take macros, because of module import order + macro_rules! tag ( + ($i:expr, $inp: expr) => ( + { + #[inline(always)] + fn as_bytes(b: &T) -> &[u8] { + b.as_bytes() + } + + let expected = $inp; + let bytes = as_bytes(&expected); + + tag_bytes!($i,bytes) + } + ); + ); + + macro_rules! tag_bytes ( + ($i:expr, $bytes: expr) => ( + { + use std::cmp::min; + let len = $i.len(); + let blen = $bytes.len(); + let m = min(len, blen); + let reduced = &$i[..m]; + let b = &$bytes[..m]; + + let res: $crate::IResult<_,_> = if reduced != b { + $crate::IResult::Error($crate::Err::Position($crate::ErrorKind::Tag, $i)) + } else if m < blen { + $crate::IResult::Incomplete($crate::Needed::Size(blen)) + } else { + $crate::IResult::Done(&$i[blen..], reduced) + }; + res + } + ); + ); + + macro_rules! take( + ($i:expr, $count:expr) => ( + { + let cnt = $count as usize; + let res:$crate::IResult<&[u8],&[u8]> = if $i.len() < cnt { + $crate::IResult::Incomplete($crate::Needed::Size(cnt)) + } else { + $crate::IResult::Done(&$i[cnt..],&$i[0..cnt]) + }; + res + } + ); + ); + + + mod pub_named_mod { + named!(pub tst, tag!("abcd")); + } + + #[test] + fn pub_named_test() { + let a = &b"abcd"[..]; + let res = pub_named_mod::tst(a); + assert_eq!(res, Done(&b""[..], a)); + } + + #[test] + fn apply_test() { + fn sum2(a:u8, b:u8) -> u8 { a + b } + fn sum3(a:u8, b:u8, c:u8) -> u8 { a + b + c } + let a = apply!(1, sum2, 2); + let b = apply!(1, sum3, 2, 3); + + assert_eq!(a, 3); + assert_eq!(b, 6); + } + + #[derive(PartialEq,Eq,Debug)] + struct B { + a: u8, + b: u8 + } + + #[test] + fn chain2() { + fn ret_int1(i:&[u8]) -> IResult<&[u8], u8> { Done(i,1) }; + fn ret_int2(i:&[u8]) -> IResult<&[u8], u8> { Done(i,2) }; + + named!(chain_parser<&[u8],B>, + chain!( + tag!("abcd") ~ + tag!("abcd")? ~ + aa: ret_int1 ~ + tag!("efgh") ~ + bb: ret_int2 ~ + tag!("efgh") , + ||{B{a: aa, b: bb}} + ) + ); + + assert_eq!(chain_parser(&b"abcdabcdefghefghX"[..]), Done(&b"X"[..], B{a: 1, b: 2})); + assert_eq!(chain_parser(&b"abcdefghefghX"[..]), Done(&b"X"[..], B{a: 1, b: 2})); + assert_eq!(chain_parser(&b"abcdab"[..]), Incomplete(Needed::Size(8))); + assert_eq!(chain_parser(&b"abcdefghef"[..]), Incomplete(Needed::Size(12))); + } + + #[test] + fn nested_chain() { + fn ret_int1(i:&[u8]) -> IResult<&[u8], u8> { Done(i,1) }; + fn ret_int2(i:&[u8]) -> IResult<&[u8], u8> { Done(i,2) }; + + named!(chain_parser<&[u8],B>, + chain!( + chain!( + tag!("abcd") ~ + tag!("abcd")? , + || {} + ) ~ + aa: ret_int1 ~ + tag!("efgh") ~ + bb: ret_int2 ~ + tag!("efgh") , + ||{B{a: aa, b: bb}} + ) + ); + + assert_eq!(chain_parser(&b"abcdabcdefghefghX"[..]), Done(&b"X"[..], B{a: 1, b: 2})); + assert_eq!(chain_parser(&b"abcdefghefghX"[..]), Done(&b"X"[..], B{a: 1, b: 2})); + assert_eq!(chain_parser(&b"abcdab"[..]), Incomplete(Needed::Size(8))); + assert_eq!(chain_parser(&b"abcdefghef"[..]), Incomplete(Needed::Size(12))); + } + + #[derive(PartialEq,Eq,Debug)] + struct C { + a: u8, + b: Option + } + + #[test] + fn chain_mut() { + fn ret_b1_2(i:&[u8]) -> IResult<&[u8], B> { Done(i,B{a:1,b:2}) }; + named!(f<&[u8],B>, + chain!( + tag!("abcd") ~ + tag!("abcd")? ~ + tag!("efgh") ~ + mut bb: ret_b1_2 ~ + tag!("efgh") , + ||{ + bb.b = 3; + bb + } + ) + ); + + let r = f(&b"abcdabcdefghefghX"[..]); + assert_eq!(r, Done(&b"X"[..], B{a: 1, b: 3})); + } + + #[test] + fn chain_opt() { + named!(y, tag!("efgh")); + fn ret_int1(i:&[u8]) -> IResult<&[u8], u8> { Done(i,1) }; + named!(ret_y<&[u8], u8>, map!(y, |_| 2)); + + named!(chain_parser<&[u8],C>, + chain!( + tag!("abcd") ~ + aa: ret_int1 ~ + bb: ret_y? , + ||{C{a: aa, b: bb}} + ) + ); + + assert_eq!(chain_parser(&b"abcdefghX"[..]), Done(&b"X"[..], C{a: 1, b: Some(2)})); + assert_eq!(chain_parser(&b"abcdWXYZ"[..]), Done(&b"WXYZ"[..], C{a: 1, b: None})); + assert_eq!(chain_parser(&b"abcdX"[..]), Done(&b"X"[..], C{ a: 1, b: None })); + assert_eq!(chain_parser(&b"abcdef"[..]), Incomplete(Needed::Size(8))); + } + + use util::{error_to_list, add_error_pattern, print_error}; + + fn error_to_string

(e: &Err

) -> &'static str { + let v:Vec = error_to_list(e); + // do it this way if you can use slice patterns + /* + match &v[..] { + [ErrorKind::Custom(42), ErrorKind::Tag] => "missing `ijkl` tag", + [ErrorKind::Custom(42), ErrorKind::Custom(128), ErrorKind::Tag] => "missing `mnop` tag after `ijkl`", + _ => "unrecognized error" + } + */ + if &v[..] == [ErrorKind::Custom(42),ErrorKind::Tag] { + "missing `ijkl` tag" + } else if &v[..] == [ErrorKind::Custom(42), ErrorKind::Custom(128), ErrorKind::Tag] { + "missing `mnop` tag after `ijkl`" + } else { + "unrecognized error" + } + } + + // do it this way if you can use box patterns + /*use std::str; + fn error_to_string(e:Err) -> String + match e { + NodePosition(ErrorKind::Custom(42), i1, box Position(ErrorKind::Tag, i2)) => { + format!("missing `ijkl` tag, found '{}' instead", str::from_utf8(i2).unwrap()) + }, + NodePosition(ErrorKind::Custom(42), i1, box NodePosition(ErrorKind::Custom(128), i2, box Position(ErrorKind::Tag, i3))) => { + format!("missing `mnop` tag after `ijkl`, found '{}' instead", str::from_utf8(i3).unwrap()) + }, + _ => "unrecognized error".to_string() + } + }*/ + use std::collections; + #[test] + fn err() { + named!(err_test, alt!( + tag!("abcd") | + preceded!(tag!("efgh"), error!(ErrorKind::Custom(42), + chain!( + tag!("ijkl") ~ + res: error!(ErrorKind::Custom(128), tag!("mnop")) , + || { res } + ) + ) + ) + )); + let a = &b"efghblah"[..]; + let b = &b"efghijklblah"[..]; + let c = &b"efghijklmnop"[..]; + + let blah = &b"blah"[..]; + + let res_a = err_test(a); + let res_b = err_test(b); + let res_c = err_test(c); + assert_eq!(res_a, Error(NodePosition(ErrorKind::Custom(42), blah, Box::new(Position(ErrorKind::Tag, blah))))); + assert_eq!(res_b, Error(NodePosition(ErrorKind::Custom(42), &b"ijklblah"[..], Box::new(NodePosition(ErrorKind::Custom(128), blah, Box::new(Position(ErrorKind::Tag, blah))))))); + assert_eq!(res_c, Done(&b""[..], &b"mnop"[..])); + + // Merr-like error matching + let mut err_map = collections::HashMap::new(); + assert!(add_error_pattern(&mut err_map, err_test(&b"efghpouet"[..]), "missing `ijkl` tag")); + assert!(add_error_pattern(&mut err_map, err_test(&b"efghijklpouet"[..]), "missing `mnop` tag after `ijkl`")); + + let res_a2 = res_a.clone(); + match res_a { + Error(e) => { + assert_eq!(error_to_list(&e), [ErrorKind::Custom(42), ErrorKind::Tag]); + assert_eq!(error_to_string(&e), "missing `ijkl` tag"); + assert_eq!(err_map.get(&error_to_list(&e)), Some(&"missing `ijkl` tag")); + }, + _ => panic!() + }; + + let res_b2 = res_b.clone(); + match res_b { + Error(e) => { + assert_eq!(error_to_list(&e), [ErrorKind::Custom(42), ErrorKind::Custom(128), ErrorKind::Tag]); + assert_eq!(error_to_string(&e), "missing `mnop` tag after `ijkl`"); + assert_eq!(err_map.get(&error_to_list(&e)), Some(&"missing `mnop` tag after `ijkl`")); + }, + _ => panic!() + }; + + print_error(a, res_a2); + print_error(b, res_b2); + } + + #[test] + fn add_err() { + named!(err_test, + preceded!(tag!("efgh"), add_error!(ErrorKind::Custom(42), + chain!( + tag!("ijkl") ~ + res: add_error!(ErrorKind::Custom(128), tag!("mnop")) , + || { res } + ) + ) + )); + let a = &b"efghblah"[..]; + let b = &b"efghijklblah"[..]; + let c = &b"efghijklmnop"[..]; + + let blah = &b"blah"[..]; + + let res_a = err_test(a); + let res_b = err_test(b); + let res_c = err_test(c); + assert_eq!(res_a, Error(NodePosition(ErrorKind::Custom(42), blah, Box::new(Position(ErrorKind::Tag, blah))))); + assert_eq!(res_b, Error(NodePosition(ErrorKind::Custom(42), &b"ijklblah"[..], Box::new(NodePosition(ErrorKind::Custom(128), blah, Box::new(Position(ErrorKind::Tag, blah))))))); + assert_eq!(res_c, Done(&b""[..], &b"mnop"[..])); + } + + #[test] + fn complete() { + named!(err_test, + chain!( + tag!("ijkl") ~ + res: complete!(tag!("mnop")) , + || { res } + ) + ); + let a = &b"ijklmn"[..]; + + let res_a = err_test(a); + assert_eq!(res_a, Error(Position(ErrorKind::Complete, &b"mn"[..]))); + } + #[test] + fn alt() { + fn work(input: &[u8]) -> IResult<&[u8],&[u8], &'static str> { + Done(&b""[..], input) + } + + #[allow(unused_variables)] + fn dont_work(input: &[u8]) -> IResult<&[u8],&[u8],&'static str> { + Error(Code(ErrorKind::Custom("abcd"))) + } + + fn work2(input: &[u8]) -> IResult<&[u8],&[u8], &'static str> { + Done(input, &b""[..]) + } + + fn alt1(i:&[u8]) -> IResult<&[u8],&[u8], &'static str> { + alt!(i, dont_work | dont_work) + } + fn alt2(i:&[u8]) -> IResult<&[u8],&[u8], &'static str> { + alt!(i, dont_work | work) + } + fn alt3(i:&[u8]) -> IResult<&[u8],&[u8], &'static str> { + alt!(i, dont_work | dont_work | work2 | dont_work) + } + //named!(alt1, alt!(dont_work | dont_work)); + //named!(alt2, alt!(dont_work | work)); + //named!(alt3, alt!(dont_work | dont_work | work2 | dont_work)); + + let a = &b"abcd"[..]; + assert_eq!(alt1(a), Error(Position(ErrorKind::Alt, a))); + assert_eq!(alt2(a), Done(&b""[..], a)); + assert_eq!(alt3(a), Done(a, &b""[..])); + + named!(alt4, alt!(tag!("abcd") | tag!("efgh"))); + let b = &b"efgh"[..]; + assert_eq!(alt4(a), Done(&b""[..], a)); + assert_eq!(alt4(b), Done(&b""[..], b)); + + // test the alternative syntax + named!(alt5, alt!(tag!("abcd") => { |_| false } | tag!("efgh") => { |_| true })); + assert_eq!(alt5(a), Done(&b""[..], false)); + assert_eq!(alt5(b), Done(&b""[..], true)); + + } + + #[test] + fn alt_incomplete() { + named!(alt1, alt!(tag!("a") | tag!("bc") | tag!("def"))); + + let a = &b""[..]; + assert_eq!(alt1(a), Incomplete(Needed::Size(1))); + let a = &b"b"[..]; + assert_eq!(alt1(a), Incomplete(Needed::Size(2))); + let a = &b"bcd"[..]; + assert_eq!(alt1(a), Done(&b"d"[..], &b"bc"[..])); + let a = &b"cde"[..]; + assert_eq!(alt1(a), Error(Position(ErrorKind::Alt, a))); + let a = &b"de"[..]; + assert_eq!(alt1(a), Incomplete(Needed::Size(3))); + let a = &b"defg"[..]; + assert_eq!(alt1(a), Done(&b"g"[..], &b"def"[..])); + } + + #[test] + fn alt_complete() { + named!(ac<&[u8], &[u8]>, + alt_complete!(tag!("abcd") | tag!("ef") | tag!("ghi") | tag!("kl")) + ); + + let a = &b""[..]; + assert_eq!(ac(a), Incomplete(Needed::Size(2))); + let a = &b"ef"[..]; + assert_eq!(ac(a), Done(&b""[..], &b"ef"[..])); + let a = &b"cde"[..]; + assert_eq!(ac(a), Error(Position(ErrorKind::Alt, a))); + } + + #[test] + fn switch() { + named!(sw, + switch!(take!(4), + b"abcd" => take!(2) | + b"efgh" => take!(4) + ) + ); + + let a = &b"abcdefgh"[..]; + assert_eq!(sw(a), Done(&b"gh"[..], &b"ef"[..])); + + let b = &b"efghijkl"[..]; + assert_eq!(sw(b), Done(&b""[..], &b"ijkl"[..])); + let c = &b"afghijkl"[..]; + assert_eq!(sw(c), Error(Position(ErrorKind::Switch, &b"afghijkl"[..]))); + } + + #[test] + fn opt() { + named!(opt_abcd<&[u8],Option<&[u8]> >, opt!(tag!("abcd"))); + + let a = &b"abcdef"[..]; + let b = &b"bcdefg"[..]; + let c = &b"ab"[..]; + assert_eq!(opt_abcd(a), Done(&b"ef"[..], Some(&b"abcd"[..]))); + assert_eq!(opt_abcd(b), Done(&b"bcdefg"[..], None)); + assert_eq!(opt_abcd(c), Incomplete(Needed::Size(4))); + } + + #[test] + fn opt_res() { + named!(opt_res_abcd<&[u8], Result<&[u8], Err<&[u8]>> >, opt_res!(tag!("abcd"))); + + let a = &b"abcdef"[..]; + let b = &b"bcdefg"[..]; + let c = &b"ab"[..]; + assert_eq!(opt_res_abcd(a), Done(&b"ef"[..], Ok(&b"abcd"[..]))); + assert_eq!(opt_res_abcd(b), Done(&b"bcdefg"[..], Err(Position(ErrorKind::Tag, b)))); + assert_eq!(opt_res_abcd(c), Incomplete(Needed::Size(4))); + } + + #[test] + fn cond() { + let f_true: Box IResult<&[u8],Option<&[u8]>, &str>> = Box::new(closure!(&'static [u8], cond!( true, tag!("abcd") ) )); + let f_false: Box IResult<&[u8],Option<&[u8]>, &str>> = Box::new(closure!(&'static [u8], cond!( false, tag!("abcd") ) )); + //let f_false = closure!(&'static [u8], cond!( false, tag!("abcd") ) ); + + assert_eq!(f_true(&b"abcdef"[..]), Done(&b"ef"[..], Some(&b"abcd"[..]))); + assert_eq!(f_true(&b"ab"[..]), Incomplete(Needed::Size(4))); + assert_eq!(f_true(&b"xxx"[..]), Done(&b"xxx"[..], None)); + + assert_eq!(f_false(&b"abcdef"[..]), Done(&b"abcdef"[..], None)); + assert_eq!(f_false(&b"ab"[..]), Done(&b"ab"[..], None)); + assert_eq!(f_false(&b"xxx"[..]), Done(&b"xxx"[..], None)); + } + + #[test] + fn cond_wrapping() { + // Test that cond!() will wrap a given identifier in the call!() macro. + named!( tag_abcd, tag!("abcd") ); + let f_true: Box IResult<&[u8],Option<&[u8]>, &str>> = Box::new(closure!(&'static [u8], cond!( true, tag_abcd ) )); + let f_false: Box IResult<&[u8],Option<&[u8]>, &str>> = Box::new(closure!(&'static [u8], cond!( false, tag_abcd ) )); + //let f_false = closure!(&'static [u8], cond!( b2, tag!("abcd") ) ); + + assert_eq!(f_true(&b"abcdef"[..]), Done(&b"ef"[..], Some(&b"abcd"[..]))); + assert_eq!(f_true(&b"ab"[..]), Incomplete(Needed::Size(4))); + assert_eq!(f_true(&b"xxx"[..]), Done(&b"xxx"[..], None)); + + assert_eq!(f_false(&b"abcdef"[..]), Done(&b"abcdef"[..], None)); + assert_eq!(f_false(&b"ab"[..]), Done(&b"ab"[..], None)); + assert_eq!(f_false(&b"xxx"[..]), Done(&b"xxx"[..], None)); + } + + #[test] + fn peek() { + named!(peek_tag<&[u8],&[u8]>, peek!(tag!("abcd"))); + + assert_eq!(peek_tag(&b"abcdef"[..]), Done(&b"abcdef"[..], &b"abcd"[..])); + assert_eq!(peek_tag(&b"ab"[..]), Incomplete(Needed::Size(4))); + assert_eq!(peek_tag(&b"xxx"[..]), Error(Position(ErrorKind::Tag, &b"xxx"[..]))); + } + + #[test] + fn pair() { + named!( tag_abc, tag!("abc") ); + named!( tag_def, tag!("def") ); + named!( pair_abc_def<&[u8],(&[u8], &[u8])>, pair!(tag_abc, tag_def) ); + + assert_eq!(pair_abc_def(&b"abcdefghijkl"[..]), Done(&b"ghijkl"[..], (&b"abc"[..], &b"def"[..]))); + assert_eq!(pair_abc_def(&b"ab"[..]), Incomplete(Needed::Size(3))); + assert_eq!(pair_abc_def(&b"abcd"[..]), Incomplete(Needed::Size(6))); + assert_eq!(pair_abc_def(&b"xxx"[..]), Error(Position(ErrorKind::Tag, &b"xxx"[..]))); + assert_eq!(pair_abc_def(&b"xxxdef"[..]), Error(Position(ErrorKind::Tag, &b"xxxdef"[..]))); + assert_eq!(pair_abc_def(&b"abcxxx"[..]), Error(Position(ErrorKind::Tag, &b"xxx"[..]))); + } + + #[test] + fn separated_pair() { + named!( tag_abc, tag!("abc") ); + named!( tag_def, tag!("def") ); + named!( tag_separator, tag!(",") ); + named!( sep_pair_abc_def<&[u8],(&[u8], &[u8])>, separated_pair!(tag_abc, tag_separator, tag_def) ); + + assert_eq!(sep_pair_abc_def(&b"abc,defghijkl"[..]), Done(&b"ghijkl"[..], (&b"abc"[..], &b"def"[..]))); + assert_eq!(sep_pair_abc_def(&b"ab"[..]), Incomplete(Needed::Size(3))); + assert_eq!(sep_pair_abc_def(&b"abc,d"[..]), Incomplete(Needed::Size(7))); + assert_eq!(sep_pair_abc_def(&b"xxx"[..]), Error(Position(ErrorKind::Tag, &b"xxx"[..]))); + assert_eq!(sep_pair_abc_def(&b"xxx,def"[..]), Error(Position(ErrorKind::Tag, &b"xxx,def"[..]))); + assert_eq!(sep_pair_abc_def(&b"abc,xxx"[..]), Error(Position(ErrorKind::Tag, &b"xxx"[..]))); + } + + #[test] + fn preceded() { + named!( tag_abcd, tag!("abcd") ); + named!( tag_efgh, tag!("efgh") ); + named!( preceded_abcd_efgh<&[u8], &[u8]>, preceded!(tag_abcd, tag_efgh) ); + + assert_eq!(preceded_abcd_efgh(&b"abcdefghijkl"[..]), Done(&b"ijkl"[..], &b"efgh"[..])); + assert_eq!(preceded_abcd_efgh(&b"ab"[..]), Incomplete(Needed::Size(4))); + assert_eq!(preceded_abcd_efgh(&b"abcde"[..]), Incomplete(Needed::Size(8))); + assert_eq!(preceded_abcd_efgh(&b"xxx"[..]), Error(Position(ErrorKind::Tag, &b"xxx"[..]))); + assert_eq!(preceded_abcd_efgh(&b"xxxxdef"[..]), Error(Position(ErrorKind::Tag, &b"xxxxdef"[..]))); + assert_eq!(preceded_abcd_efgh(&b"abcdxxx"[..]), Error(Position(ErrorKind::Tag, &b"xxx"[..]))); + } + + #[test] + fn terminated() { + named!( tag_abcd, tag!("abcd") ); + named!( tag_efgh, tag!("efgh") ); + named!( terminated_abcd_efgh<&[u8], &[u8]>, terminated!(tag_abcd, tag_efgh) ); + + assert_eq!(terminated_abcd_efgh(&b"abcdefghijkl"[..]), Done(&b"ijkl"[..], &b"abcd"[..])); + assert_eq!(terminated_abcd_efgh(&b"ab"[..]), Incomplete(Needed::Size(4))); + assert_eq!(terminated_abcd_efgh(&b"abcde"[..]), Incomplete(Needed::Size(8))); + assert_eq!(terminated_abcd_efgh(&b"xxx"[..]), Error(Position(ErrorKind::Tag, &b"xxx"[..]))); + assert_eq!(terminated_abcd_efgh(&b"xxxxdef"[..]), Error(Position(ErrorKind::Tag, &b"xxxxdef"[..]))); + assert_eq!(terminated_abcd_efgh(&b"abcdxxxx"[..]), Error(Position(ErrorKind::Tag, &b"xxxx"[..]))); + } + + #[test] + fn delimited() { + named!( tag_abc, tag!("abc") ); + named!( tag_def, tag!("def") ); + named!( tag_ghi, tag!("ghi") ); + named!( delimited_abc_def_ghi<&[u8], &[u8]>, delimited!(tag_abc, tag_def, tag_ghi) ); + + assert_eq!(delimited_abc_def_ghi(&b"abcdefghijkl"[..]), Done(&b"jkl"[..], &b"def"[..])); + assert_eq!(delimited_abc_def_ghi(&b"ab"[..]), Incomplete(Needed::Size(3))); + assert_eq!(delimited_abc_def_ghi(&b"abcde"[..]), Incomplete(Needed::Size(6))); + assert_eq!(delimited_abc_def_ghi(&b"abcdefgh"[..]), Incomplete(Needed::Size(9))); + assert_eq!(delimited_abc_def_ghi(&b"xxx"[..]), Error(Position(ErrorKind::Tag, &b"xxx"[..]))); + assert_eq!(delimited_abc_def_ghi(&b"xxxdefghi"[..]), Error(Position(ErrorKind::Tag, &b"xxxdefghi"[..]))); + assert_eq!(delimited_abc_def_ghi(&b"abcxxxghi"[..]), Error(Position(ErrorKind::Tag, &b"xxxghi"[..]))); + assert_eq!(delimited_abc_def_ghi(&b"abcdefxxx"[..]), Error(Position(ErrorKind::Tag, &b"xxx"[..]))); + } + + #[test] + fn separated_list() { + named!(multi<&[u8],Vec<&[u8]> >, separated_list!(tag!(","), tag!("abcd"))); + named!(multi_empty<&[u8],Vec<&[u8]> >, separated_list!(tag!(","), tag!(""))); + + let a = &b"abcdef"[..]; + let b = &b"abcd,abcdef"[..]; + let c = &b"azerty"[..]; + let d = &b",,abc"[..]; + + let res1 = vec![&b"abcd"[..]]; + assert_eq!(multi(a), Done(&b"ef"[..], res1)); + let res2 = vec![&b"abcd"[..], &b"abcd"[..]]; + assert_eq!(multi(b), Done(&b"ef"[..], res2)); + assert_eq!(multi(c), Done(&b"azerty"[..], Vec::new())); + let res3 = vec![&b""[..], &b""[..], &b""[..]]; + //assert_eq!(multi_empty(d), Done(&b"abc"[..], res3)); + } + + #[test] + fn separated_nonempty_list() { + named!(multi<&[u8],Vec<&[u8]> >, separated_nonempty_list!(tag!(","), tag!("abcd"))); + + let a = &b"abcdef"[..]; + let b = &b"abcd,abcdef"[..]; + let c = &b"azerty"[..]; + + let res1 = vec![&b"abcd"[..]]; + assert_eq!(multi(a), Done(&b"ef"[..], res1)); + let res2 = vec![&b"abcd"[..], &b"abcd"[..]]; + assert_eq!(multi(b), Done(&b"ef"[..], res2)); + assert_eq!(multi(c), Error(Position(ErrorKind::Tag,c))); + } + + #[test] + fn many0() { + named!(multi<&[u8],Vec<&[u8]> >, many0!(tag!("abcd"))); + + let a = &b"abcdef"[..]; + let b = &b"abcdabcdefgh"[..]; + let c = &b"azerty"[..]; + let d = &b"abcdab"[..]; + + let res1 = vec![&b"abcd"[..]]; + assert_eq!(multi(a), Done(&b"ef"[..], res1)); + let res2 = vec![&b"abcd"[..], &b"abcd"[..]]; + assert_eq!(multi(b), Done(&b"efgh"[..], res2)); + assert_eq!(multi(c), Done(&b"azerty"[..], Vec::new())); + assert_eq!(multi(d), Incomplete(Needed::Size(8))); + } + + #[cfg(feature = "nightly")] + use test::Bencher; + + #[cfg(feature = "nightly")] + #[bench] + fn many0_bench(b: &mut Bencher) { + named!(multi<&[u8],Vec<&[u8]> >, many0!(tag!("abcd"))); + b.iter(|| { + multi(&b"abcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcd"[..]) + }); + } + + #[test] + fn many1() { + named!(multi<&[u8],Vec<&[u8]> >, many1!(tag!("abcd"))); + + let a = &b"abcdef"[..]; + let b = &b"abcdabcdefgh"[..]; + let c = &b"azerty"[..]; + let d = &b"abcdab"[..]; + + let res1 = vec![&b"abcd"[..]]; + assert_eq!(multi(a), Done(&b"ef"[..], res1)); + let res2 = vec![&b"abcd"[..], &b"abcd"[..]]; + assert_eq!(multi(b), Done(&b"efgh"[..], res2)); + assert_eq!(multi(c), Error(Position(ErrorKind::Many1,c))); + assert_eq!(multi(d), Incomplete(Needed::Size(8))); + } + + #[test] + fn infinite_many() { + fn tst(input: &[u8]) -> IResult<&[u8], &[u8]> { + println!("input: {:?}", input); + Error(Position(ErrorKind::Custom(0),input)) + } + + // should not go into an infinite loop + named!(multi0<&[u8],Vec<&[u8]> >, many0!(tst)); + let a = &b"abcdef"[..]; + assert_eq!(multi0(a), Done(a, Vec::new())); + + named!(multi1<&[u8],Vec<&[u8]> >, many1!(tst)); + let a = &b"abcdef"[..]; + assert_eq!(multi1(a), Error(Position(ErrorKind::Many1,a))); + } + + #[test] + fn many_m_n() { + named!(multi<&[u8],Vec<&[u8]> >, many_m_n!(2, 4, tag!("Abcd"))); + + let a = &b"Abcdef"[..]; + let b = &b"AbcdAbcdefgh"[..]; + let c = &b"AbcdAbcdAbcdAbcdefgh"[..]; + let d = &b"AbcdAbcdAbcdAbcdAbcdefgh"[..]; + let e = &b"AbcdAb"[..]; + + assert_eq!(multi(a), Error(Err::Position(ErrorKind::ManyMN,a))); + let res1 = vec![&b"Abcd"[..], &b"Abcd"[..]]; + assert_eq!(multi(b), Done(&b"efgh"[..], res1)); + let res2 = vec![&b"Abcd"[..], &b"Abcd"[..], &b"Abcd"[..], &b"Abcd"[..]]; + assert_eq!(multi(c), Done(&b"efgh"[..], res2)); + let res3 = vec![&b"Abcd"[..], &b"Abcd"[..], &b"Abcd"[..], &b"Abcd"[..]]; + assert_eq!(multi(d), Done(&b"Abcdefgh"[..], res3)); + assert_eq!(multi(e), Incomplete(Needed::Size(8))); + } + + #[test] + fn count() { + const TIMES: usize = 2; + named!( tag_abc, tag!("abc") ); + named!( cnt_2<&[u8], Vec<&[u8]> >, count!(tag_abc, TIMES ) ); + + assert_eq!(cnt_2(&b"abcabcabcdef"[..]), Done(&b"abcdef"[..], vec![&b"abc"[..], &b"abc"[..]])); + assert_eq!(cnt_2(&b"ab"[..]), Incomplete(Needed::Unknown)); + assert_eq!(cnt_2(&b"abcab"[..]), Incomplete(Needed::Unknown)); + assert_eq!(cnt_2(&b"xxx"[..]), Error(Position(ErrorKind::Count, &b"xxx"[..]))); + assert_eq!(cnt_2(&b"xxxabcabcdef"[..]), Error(Position(ErrorKind::Count, &b"xxxabcabcdef"[..]))); + assert_eq!(cnt_2(&b"abcxxxabcdef"[..]), Error(Position(ErrorKind::Count, &b"abcxxxabcdef"[..]))); + } + + #[test] + fn count_zero() { + const TIMES: usize = 0; + named!( tag_abc, tag!("abc") ); + named!( counter_2<&[u8], Vec<&[u8]> >, count!(tag_abc, TIMES ) ); + + let done = &b"abcabcabcdef"[..]; + let parsed_done = Vec::new(); + let rest = done; + let incomplete_1 = &b"ab"[..]; + let parsed_incompl_1 = Vec::new(); + let incomplete_2 = &b"abcab"[..]; + let parsed_incompl_2 = Vec::new(); + let error = &b"xxx"[..]; + let error_remain = &b"xxx"[..]; + let parsed_err = Vec::new(); + let error_1 = &b"xxxabcabcdef"[..]; + let parsed_err_1 = Vec::new(); + let error_1_remain = &b"xxxabcabcdef"[..]; + let error_2 = &b"abcxxxabcdef"[..]; + let parsed_err_2 = Vec::new(); + let error_2_remain = &b"abcxxxabcdef"[..]; + + assert_eq!(counter_2(done), Done(rest, parsed_done)); + assert_eq!(counter_2(incomplete_1), Done(incomplete_1, parsed_incompl_1)); + assert_eq!(counter_2(incomplete_2), Done(incomplete_2, parsed_incompl_2)); + assert_eq!(counter_2(error), Done(error_remain, parsed_err)); + assert_eq!(counter_2(error_1), Done(error_1_remain, parsed_err_1)); + assert_eq!(counter_2(error_2), Done(error_2_remain, parsed_err_2)); + } + + #[test] + fn count_fixed() { + const TIMES: usize = 2; + named!( tag_abc, tag!("abc") ); + named!( cnt_2<&[u8], [&[u8]; TIMES] >, count_fixed!(&[u8], tag_abc, TIMES ) ); + + assert_eq!(cnt_2(&b"abcabcabcdef"[..]), Done(&b"abcdef"[..], [&b"abc"[..], &b"abc"[..]])); + assert_eq!(cnt_2(&b"ab"[..]), Incomplete(Needed::Unknown)); + assert_eq!(cnt_2(&b"abcab"[..]), Incomplete(Needed::Unknown)); + assert_eq!(cnt_2(&b"xxx"[..]), Error(Position(ErrorKind::Count, &b"xxx"[..]))); + assert_eq!(cnt_2(&b"xxxabcabcdef"[..]), Error(Position(ErrorKind::Count, &b"xxxabcabcdef"[..]))); + assert_eq!(cnt_2(&b"abcxxxabcdef"[..]), Error(Position(ErrorKind::Count, &b"abcxxxabcdef"[..]))); + } + + use nom::{le_u16,eof}; + #[allow(dead_code)] + pub fn compile_count_fixed(input: &[u8]) -> IResult<&[u8], ()> { + chain!(input, + tag!("abcd") ~ + count_fixed!( u16, le_u16, 4 ) ~ + eof , + || { () } + ) + } + + #[test] + fn count_fixed_no_type() { + const TIMES: usize = 2; + named!( tag_abc, tag!("abc") ); + named!( counter_2<&[u8], [&[u8]; TIMES], () >, count_fixed!(&[u8], tag_abc, TIMES ) ); + + let done = &b"abcabcabcdef"[..]; + let parsed_main = [&b"abc"[..], &b"abc"[..]]; + let rest = &b"abcdef"[..]; + let incomplete_1 = &b"ab"[..]; + let incomplete_2 = &b"abcab"[..]; + let error = &b"xxx"[..]; + let error_1 = &b"xxxabcabcdef"[..]; + let error_1_remain = &b"xxxabcabcdef"[..]; + let error_2 = &b"abcxxxabcdef"[..]; + let error_2_remain = &b"abcxxxabcdef"[..]; + + assert_eq!(counter_2(done), Done(rest, parsed_main)); + assert_eq!(counter_2(incomplete_1), Incomplete(Needed::Unknown)); + assert_eq!(counter_2(incomplete_2), Incomplete(Needed::Unknown)); + assert_eq!(counter_2(error), Error(Position(ErrorKind::Count, error))); + assert_eq!(counter_2(error_1), Error(Position(ErrorKind::Count, error_1_remain))); + assert_eq!(counter_2(error_2), Error(Position(ErrorKind::Count, error_2_remain))); + } + + use nom::{be_u8,be_u16}; + #[test] + fn length_value_test() { + named!(length_value_1<&[u8], Vec >, length_value!(be_u8, be_u16)); + named!(length_value_2<&[u8], Vec >, length_value!(be_u8, be_u16, 2)); + + let i1 = vec![0, 5, 6]; + assert_eq!(length_value_1(&i1), IResult::Done(&i1[1..], vec![])); + assert_eq!(length_value_2(&i1), IResult::Done(&i1[1..], vec![])); + + let i2 = vec![1, 5, 6, 3]; + assert_eq!(length_value_1(&i2), IResult::Done(&i2[3..], vec![1286])); + assert_eq!(length_value_2(&i2), IResult::Done(&i2[3..], vec![1286])); + + let i3 = vec![2, 5, 6, 3, 4, 5, 7]; + assert_eq!(length_value_1(&i3), IResult::Done(&i3[5..], vec![1286, 772])); + assert_eq!(length_value_2(&i3), IResult::Done(&i3[5..], vec![1286, 772])); + + let i4 = vec![2, 5, 6, 3]; + assert_eq!(length_value_1(&i4), IResult::Incomplete(Needed::Size(5))); + assert_eq!(length_value_2(&i4), IResult::Incomplete(Needed::Size(5))); + + let i5 = vec![3, 5, 6, 3, 4, 5]; + assert_eq!(length_value_1(&i5), IResult::Incomplete(Needed::Size(7))); + assert_eq!(length_value_2(&i5), IResult::Incomplete(Needed::Size(7))); + } + + #[test] + fn tuple_test() { + named!(tuple_3<&[u8], (u16, &[u8], &[u8]) >, + tuple!( be_u16 , take!(3), tag!("fg") ) ); + + assert_eq!(tuple_3(&b"abcdefgh"[..]), Done(&b"h"[..], (0x6162u16, &b"cde"[..], &b"fg"[..]))); + assert_eq!(tuple_3(&b"abcd"[..]), Incomplete(Needed::Size(5))); + assert_eq!(tuple_3(&b"abcde"[..]), Incomplete(Needed::Size(7))); + assert_eq!(tuple_3(&b"abcdejk"[..]), Error(Position(ErrorKind::Tag, &b"jk"[..]))); + } +} diff --git a/deps/nom-1.2.2/src/methods.rs b/deps/nom-1.2.2/src/methods.rs new file mode 100644 index 000000000..22868541a --- /dev/null +++ b/deps/nom-1.2.2/src/methods.rs @@ -0,0 +1,480 @@ +//! Method macro combinators +//! +//! These macros make parsers as methods of structs +//! and that can take methods of structs to call +//! as parsers. +//! +//! There is a trick to make them easier to assemble, +//! combinators are defined like this: +//! +//! ```ignore +//! macro_rules! tag ( +//! ($i:expr, $inp: expr) => ( +//! { +//! ... +//! } +//! ); +//! ); +//! ``` +//! +//! But when used as methods in other combinators, are used +//! like this: +//! +//! ```ignore +//! method!(my_function >, self, tag!("abcd")); +//! ``` +//! +//! Internally, other combinators will rewrite +//! that call to pass the input as second argument: +//! +//! ```ignore +//! macro_rules! method ( +//! ($name:ident<$a:ty>, $self_:ident, $submac:ident!( $($args:tt)* )) => ( +//! fn $name( $self_: $a, i: &[u8] ) -> $crate::IResult<&[u8], &[u8]> { +//! $submac!(i, $($args)*) +//! } +//! ); +//! ); +//! ``` +//! +//! The `method!` macro is similar to the `named!` macro in the macros module. +//! While `named!` will create a parser function, `method!` will create a parser +//! method on the struct it is defined in. +//! +//! Compared to the `named!` macro there are a few differences in how they are +//! invoked. A `method!` invocation always has to have the type of `self` +//! declared and it can't be a reference due to Rust's borrow lifetime +//! restrictions: +//! ```ignore +//! // -`self`'s type- +//! method!(method_name< Parser<'a> >, ...); +//! ``` +//! `self`'s type always comes first. +//! The next difference is you have to input the self struct. Due to Rust's +//! macro hygiene the macro can't declare it on it's own. +//! ```ignore +//! // -self- +//! method!(method_name, &'a str, &'a str>, self, ...); +//! ``` +//! When making a parsing struct with parsing methods, due to the static borrow +//! checker,calling any parsing methods on self (or any other parsing struct) +//! will cause self to be moved for the rest of the method.To get around this +//! restriction all self is moved into the called method and then the called +//! method will return self to the caller. +//! +//! To call a method on self you need to use the `call_m!` macro. For example: +//! ```ignore +//! struct<'a> Parser<'a> { +//! parsed: &'a str, +//! } +//! impl<'a> Parser<'a> { +//! // Constructor omitted for brevity +//! method!(take4, &'a str, &'a str>, self, take!(4)); +//! method!(caller, &'a str, &'a str>, self, call_m!(self.take4)); +//! } +//! ``` +//! More complicated combinations still mostly look the same as their `named!` +//! counterparts: +//! ```ignore +//! method!(pub simple_chain<&mut Parser<'a>, &'a str, &'a str>, self, +//! chain!( +//! call_m!(self.tag_abc) ~ +//! call_m!(self.tag_def) ~ +//! call_m!(self.tag_ghi) ~ +//! last: call_m!(self.simple_peek) , +//! ||{sb.parsed = last; last} +//! ) +//! ); +//! ``` +//! The three additions to method definitions to remember are: +//! 1. Specify `self`'s type +//! 2. Pass `self` to the macro +//! 4. Call parser methods using the `call_m!` macro. + +/// Makes a method from a parser combination +/// +/// The must be set up because the compiler needs +/// the information +/// +/// ```ignore +/// method!(my_function >( &[u8] ) -> &[u8], tag!("abcd")); +/// // first type parameter is `self`'s type, second is input, third is output +/// method!(my_function, &[u8], &[u8]>, tag!("abcd")); +/// //prefix them with 'pub' to make the methods public +/// method!(pub my_function,&[u8], &[u8]>, tag!("abcd")); +/// ``` +#[macro_export] +macro_rules! method ( + // Non-public immutable self + ($name:ident<$a:ty>( $i:ty ) -> $o:ty, $self_:ident, $submac:ident!( $($args:tt)* )) => ( + fn $name( $self_: $a, i: $i ) -> ($a, $crate::IResult<$i,$o,u32>) { + let result = $submac!(i, $($args)*); + ($self_, result) + } + ); + ($name:ident<$a:ty,$i:ty,$o:ty,$e:ty>, $self_:ident, $submac:ident!( $($args:tt)* )) => ( + fn $name( $self_: $a, i: $i ) -> ($a, $crate::IResult<$i, $o, $e>) { + let result = $submac!(i, $($args)*); + ($self_, result) + } + ); + ($name:ident<$a:ty,$i:ty,$o:ty>, $self_:ident, $submac:ident!( $($args:tt)* )) => ( + fn $name( $self_: $a, i: $i ) -> ($a, $crate::IResult<$i,$o,u32>) { + let result = $submac!(i, $($args)*); + ($self_, result) + } + ); + ($name:ident<$a:ty,$o:ty>, $self_:ident, $submac:ident!( $($args:tt)* )) => ( + fn $name<'a>( $self_: $a, i: &'a[u8] ) -> ($a, $crate::IResult<&'a [u8], $o, u32>) { + let result = $submac!(i, $($args)*); + ($self_, result) + } + ); + ($name:ident<$a:ty>, $self_:ident, $submac:ident!( $($args:tt)* )) => ( + fn $name( $self_: $a, i: &[u8] ) -> ($a, $crate::IResult<&[u8], &[u8], u32>) { + let result = $submac!(i, $($args)*); + ($self_, result) + } + ); + // Public immutable self + (pub $name:ident<$a:ty>( $i:ty ) -> $o:ty, $self_:ident, $submac:ident!( $($args:tt)* )) => ( + pub fn $name( $self_: $a, i: $i ) -> ($a, $crate::IResult<$i,$o,u32>) { + let result = $submac!(i, $($args)*); + ($self_, result) + } + ); + (pub $name:ident<$a:ty,$i:ty,$o:ty,$e:ty>, $self_:ident, $submac:ident!( $($args:tt)* )) => ( + fn $name( $self_: $a, i: $i ) -> ($a, $crate::IResult<$i, $o, $e>) { + let result = $submac!(i, $($args)*); + ($self_, result) + } + ); + (pub $name:ident<$a:ty,$i:ty,$o:ty>, $self_:ident, $submac:ident!( $($args:tt)* )) => ( + pub fn $name( $self_: $a,i: $i ) -> ($a, $crate::IResult<$i,$o,u32>) { + let result = $submac!(i, $($args)*); + ($self_, result) + } + ); + (pub $name:ident<$a:ty,$o:ty>, $self_:ident, $submac:ident!( $($args:tt)* )) => ( + pub fn $name<'a>( $self_: $a, i: &'a[u8] ) -> ($a, $crate::IResult<&'a [u8], $o, u32>) { + let result = $submac!(i, $($args)*); + ($self_, result) + } + ); + (pub $name:ident<$a:ty>, $self_:ident, $submac:ident!( $($args:tt)* )) => ( + pub fn $name( $self_: $a, i: &[u8] ) -> ($a, $crate::IResult<&[u8], &[u8], u32>) { + let result = $submac!(i, $($args)*); + ($self_, result) + } + ); + // Non-public mutable self + ($name:ident<$a:ty>( $i:ty ) -> $o:ty, mut $self_:ident, $submac:ident!( $($args:tt)* )) => ( + fn $name( mut $self_: $a, i: $i ) -> ($a, $crate::IResult<$i,$o,u32>) { + let result = $submac!(i, $($args)*); + ($self_, result) + } + ); + ($name:ident<$a:ty,$i:ty,$o:ty,$e:ty>, mut $self_:ident, $submac:ident!( $($args:tt)* )) => ( + fn $name( mut $self_: $a, i: $i ) -> ($a, $crate::IResult<$i, $o, $e>) { + let result = $submac!(i, $($args)*); + ($self_, result) + } + ); + ($name:ident<$a:ty,$i:ty,$o:ty>, mut $self_:ident, $submac:ident!( $($args:tt)* )) => ( + fn $name( mut $self_: $a, i: $i ) -> ($a, $crate::IResult<$i,$o,u32>) { + let result = $submac!(i, $($args)*); + ($self_, result) + } + ); + ($name:ident<$a:ty,$o:ty>, mut $self_:ident, $submac:ident!( $($args:tt)* )) => ( + fn $name<'a>( mut $self_: $a, i: &'a[u8] ) -> ($a, $crate::IResult<&'a [u8], $o, u32>) { + let result = $submac!(i, $($args)*); + ($self_, result) + } + ); + ($name:ident<$a:ty>, mut $self_:ident, $submac:ident!( $($args:tt)* )) => ( + fn $name( mut $self_: $a, i: &[u8] ) -> ($a, $crate::IResult<&[u8], &[u8], u32>) { + let result = $submac!(i, $($args)*); + ($self_, result) + } + ); + // Public mutable self + (pub $name:ident<$a:ty>( $i:ty ) -> $o:ty, mut $self_:ident, $submac:ident!( $($args:tt)* )) => ( + pub fn $name( mut $self_: $a, i: $i ) -> ($a, $crate::IResult<$i,$o,u32>) { + let result = $submac!(i, $($args)*); + ($self_, result) + } + ); + (pub $name:ident<$a:ty,$i:ty,$o:ty,$e:ty>, mut $self_:ident, $submac:ident!( $($args:tt)* )) => ( + fn $name( mut $self_: $a, i: $i ) -> ($a, $crate::IResult<$i, $o, $e>) { + let result = $submac!(i, $($args)*); + ($self_, result) + } + ); + (pub $name:ident<$a:ty,$i:ty,$o:ty>, mut $self_:ident, $submac:ident!( $($args:tt)* )) => ( + pub fn $name( mut $self_: $a,i: $i ) -> ($a, $crate::IResult<$i,$o,u32>) { + let result = $submac!(i, $($args)*); + ($self_, result) + } + ); + (pub $name:ident<$a:ty,$o:ty>, mut $self_:ident, $submac:ident!( $($args:tt)* )) => ( + pub fn $name<'a>( mut $self_: $a, i: &'a[u8] ) -> ($a, $crate::IResult<&'a [u8], $o, u32>) { + let result = $submac!(i, $($args)*); + ($self_, result) + } + ); + (pub $name:ident<$a:ty>, mut $self_:ident, $submac:ident!( $($args:tt)* )) => ( + pub fn $name( mut $self_: $a, i: &[u8] ) -> ($a, $crate::IResult<&[u8], &[u8], u32>) { + let result = $submac!(i, $($args)*); + ($self_, result) + } + ); +); + +/// Used to called methods then move self back into self +#[macro_export] +macro_rules! call_m ( + ($i:expr, $self_:ident.$method:ident) => ( + { + let (tmp, res) = $self_.$method($i); + $self_ = tmp; + res + } + ); + ($i:expr, $self_:ident.$method:ident, $($args:expr),* ) => ( + { + let (tmp, res) = $self_.$method($i, $($args),*); + $self_ = tmp; + res + } + ); +); + + +/// emulate function currying for method calls on structs +/// `apply!(self.my_function, arg1, arg2, ...)` becomes `self.my_function(input, arg1, arg2, ...)` +/// +/// Supports up to 6 arguments +#[macro_export] +macro_rules! apply_m ( + ($i:expr, $self_:ident.$method:ident, $($args:expr),* ) => ( { let (tmp, res) = $self_.$method( $i, $($args),* ); $self_ = tmp; res } ); +); + +#[cfg(test)] +mod tests { + use internal::IResult::*; + + // reproduce the tag_s and take_s macros, because of module import order + macro_rules! tag_s ( + ($i:expr, $tag: expr) => ( + { + let res: $crate::IResult<_,_> = if $tag.len() > $i.len() { + $crate::IResult::Incomplete($crate::Needed::Size($tag.len())) + //} else if &$i[0..$tag.len()] == $tag { + } else if ($i).starts_with($tag) { + $crate::IResult::Done(&$i[$tag.len()..], &$i[0..$tag.len()]) + } else { + $crate::IResult::Error($crate::Err::Position($crate::ErrorKind::TagStr, $i)) + }; + res + } + ); + ); + + macro_rules! take_s ( + ($i:expr, $count:expr) => ( + { + let cnt = $count as usize; + let res: $crate::IResult<_,_> = if $i.chars().count() < cnt { + $crate::IResult::Incomplete($crate::Needed::Size(cnt)) + } else { + let mut offset = $i.len(); + let mut count = 0; + for (o, _) in $i.char_indices() { + if count == cnt { + offset = o; + break; + } + count += 1; + } + $crate::IResult::Done(&$i[offset..], &$i[..offset]) + }; + res + } + ); + ); + + struct Parser<'a> { + bcd: &'a str, + } + + impl<'a> Parser<'a> { + pub fn new() -> Parser<'a> { + Parser{bcd: ""} + } + + method!(tag_abc, &'a str, &'a str>, self, tag_s!("áβç")); + method!(tag_bcd >(&'a str) -> &'a str, self, tag_s!("βçδ")); + method!(pub tag_hij >(&'a str) -> &'a str, self, tag_s!("λïJ")); + method!(pub tag_ijk, &'a str, &'a str>, self, tag_s!("ïJƙ")); + method!(take3, &'a str, &'a str>, self, take_s!(3)); + method!(pub simple_call, &'a str, &'a str>, mut self, + call_m!(self.tag_abc) + ); + method!(pub simple_peek, &'a str, &'a str>, mut self, + peek!(call_m!(self.take3)) + ); + method!(pub simple_chain, &'a str, &'a str>, mut self, + chain!( + bcd: call_m!(self.tag_bcd) ~ + last: call_m!(self.simple_peek) , + ||{self.bcd = bcd; last} + ) + ); + fn tag_stuff(mut self: Parser<'a>, input: &'a str, something: &'a str) -> (Parser<'a>, ::IResult<&'a str, &'a str>) { + self.bcd = something; + let(tmp, res) = self.tag_abc(input); + self = tmp; + (self, res) + } + method!(use_apply, &'a str, &'a str>, mut self, apply_m!(self.tag_stuff, "βçδ")); + } + + #[test] + fn test_method_call_abc() { + let p = Parser::new(); + let input: &str = "áβçδèƒϱλïJƙ"; + let consumed: &str = "áβç"; + let leftover: &str = "δèƒϱλïJƙ"; + let(_, res) = p.tag_abc(input); + match res { + Done(extra, output) => { assert!(extra == leftover, "`Parser.tag_abc` consumed leftover input. leftover: {}", extra); + assert!(output == consumed, "`Parser.tag_abc` doesnt return the string it consumed \ + on success. Expected `{}`, got `{}`.", consumed, output); + }, + other => panic!("`Parser.tag_abc` didn't succeed when it should have. \ + Got `{:?}`.", other), + } + } + + #[test] + fn test_method_call_bcd() { + let p = Parser::new(); + let input: &str = "βçδèƒϱλïJƙ"; + let consumed: &str = "βçδ"; + let leftover: &str = "èƒϱλïJƙ"; + let(_, res) = p.tag_bcd(input); + match res { + Done(extra, output) => { assert!(extra == leftover, "`Parser.tag_bcd` consumed leftover input. leftover: {}", extra); + assert!(output == consumed, "`Parser.tag_bcd` doesn't return the string it consumed \ + on success. Expected `{}`, got `{}`.", consumed, output); + }, + other => panic!("`Parser.tag_bcd` didn't succeed when it should have. \ + Got `{:?}`.", other), + } + } + + #[test] + fn test_method_call_hij() { + let p = Parser::new(); + let input: &str = "λïJƙℓ₥ñôƥ9řƨ"; + let consumed: &str = "λïJ"; + let leftover: &str = "ƙℓ₥ñôƥ9řƨ"; + let(_, res) = p.tag_hij(input); + match res { + Done(extra, output) => { assert!(extra == leftover, "`Parser.tag_hij` consumed leftover input. leftover: {}", extra); + assert!(output == consumed, "`Parser.tag_hij` doesn't return the string it consumed \ + on success. Expected `{}`, got `{}`.", consumed, output); + }, + other => panic!("`Parser.tag_hij` didn't succeed when it should have. \ + Got `{:?}`.", other), + } + } + + #[test] + fn test_method_call_ijk() { + let p = Parser::new(); + let input: &str = "ïJƙℓ₥ñôƥ9řƨ"; + let consumed: &str = "ïJƙ"; + let leftover: &str = "ℓ₥ñôƥ9řƨ"; + let(_, res) = p.tag_ijk(input); + match res { + Done(extra, output) => { assert!(extra == leftover, "`Parser.tag_ijk` consumed leftover input. leftover: {}", extra); + assert!(output == consumed, "`Parser.tag_ijk` doesn't return the string it consumed \ + on success. Expected `{}`, got `{}`.", consumed, output); + }, + other => panic!("`Parser.tag_ijk` didn't succeed when it should have. \ + Got `{:?}`.", other), + } + } + #[test] + fn test_method_simple_call() { + let p = Parser::new(); + let input: &str = "áβçδèƒϱλïJƙ"; + let consumed: &str = "áβç"; + let leftover: &str = "δèƒϱλïJƙ"; + let(_, res) = p.simple_call(input); + match res { + Done(extra, output) => { assert!(extra == leftover, "`Parser.simple_call` consumed leftover input. leftover: {}", extra); + assert!(output == consumed, "`Parser.simple_call` doesn't return the string it consumed \ + on success. Expected `{}`, got `{}`.", consumed, output); + }, + other => panic!("`Parser.simple_call` didn't succeed when it should have. \ + Got `{:?}`.", other), + } + } + + #[test] + fn test_apply_m() { + let mut p = Parser::new(); + let input: &str = "áβçδèƒϱλïJƙ"; + let consumed: &str = "áβç"; + let leftover: &str = "δèƒϱλïJƙ"; + let(tmp, res) = p.use_apply(input); + p = tmp; + match res { + Done(extra, output) => { assert!(extra == leftover, "`Parser.use_apply` consumed leftover input. leftover: {}", extra); + assert!(output == consumed, "`Parser.use_apply` doesn't return the string it was supposed to \ + on success. Expected `{}`, got `{}`.", leftover, output); + assert!(p.bcd == "βçδ", "Parser.use_apply didn't modify the parser field correctly: {}", p.bcd); + }, + other => panic!("`Parser.use_apply` didn't succeed when it should have. \ + Got `{:?}`.", other), + } + } + + #[test] + fn test_method_call_peek() { + let p = Parser::new(); + let input: &str = "ж¥ƺáβçδèƒϱλïJƙ"; + let consumed: &str = "ж¥ƺ"; + let(_, res) = p.simple_peek(input); + match res { + Done(extra, output) => { assert!(extra == input, "`Parser.simple_peek` consumed leftover input. leftover: {}", extra); + assert!(output == consumed, "`Parser.simple_peek` doesn't return the string it consumed \ + on success. Expected `{}`, got `{}`.", consumed, output); + }, + other => panic!("`Parser.simple_peek` didn't succeed when it should have. \ + Got `{:?}`.", other), + } + } + + #[test] + fn test_method_call_chain() { + let mut p = Parser::new(); + let input : &str = "βçδδèƒϱλïJƙℓ"; + let leftover : &str = "δèƒϱλïJƙℓ"; + let output : &str = "δèƒ"; + let(tmp, res) = p.simple_chain(input); + p = tmp; + match res { + Done(extra, out) => { assert!(extra == leftover, "`Parser.simple_chain` consumed leftover input. leftover: {}", extra); + assert!(out == output, "`Parser.simple_chain` doesn't return the string it was supposed to \ + on success. Expected `{}`, got `{}`.", output, out); + assert!(p.bcd == "βçδ", "Parser.simple_chain didn't modify the parser field correctly: {}", p.bcd); + }, + other => panic!("`Parser.simple_chain` didn't succeed when it should have. \ + Got `{:?}`.", other), + } + } +} diff --git a/deps/nom-1.2.2/src/nom.rs b/deps/nom-1.2.2/src/nom.rs new file mode 100644 index 000000000..bc7c74b03 --- /dev/null +++ b/deps/nom-1.2.2/src/nom.rs @@ -0,0 +1,892 @@ +//! Useful parser combinators +//! +//! A number of useful parser combinators have already been implemented. +//! Some of them use macros, other are implemented through functions. +//! Hopefully, the syntax will converge to onely one way in the future, +//! but the macros system makes no promises. +//! + +#[cfg(feature = "core")] +use std::prelude::v1::*; +use std::boxed::Box; + +use std::fmt::Debug; +use internal::*; +use internal::IResult::*; +use internal::Err::*; +use util::{ErrorKind,IterIndices,AsChar,InputLength}; +use std::mem::transmute; + +#[inline] +pub fn tag_cl<'a,'b>(rec:&'a[u8]) -> Box IResult<&'b[u8], &'b[u8]> + 'a> { + Box::new(move |i: &'b[u8]| -> IResult<&'b[u8], &'b[u8]> { + if i.len() >= rec.len() && &i[0..rec.len()] == rec { + Done(&i[rec.len()..], &i[0..rec.len()]) + } else { + Error(Position(ErrorKind::TagClosure, i)) + } + }) +} + +#[cfg(not(feature = "core"))] +#[inline] +pub fn print(input: T) -> IResult { + println!("{:?}", input); + Done(input, ()) +} + +#[inline] +pub fn begin(input: &[u8]) -> IResult<(), &[u8]> { + Done((), input) +} + +// FIXME: when rust-lang/rust#17436 is fixed, macros will be able to export +// public methods +//pub is_not!(line_ending b"\r\n") +pub fn not_line_ending(input:&[u8]) -> IResult<&[u8], &[u8]> { + for (idx, item) in input.iter().enumerate() { + for &i in b"\r\n".iter() { + if *item == i { + return Done(&input[idx..], &input[0..idx]) + } + } + } + Done(&input[input.len()..], input) +} + +named!(tag_ln, tag!("\n")); + +/// Recognizes a line feed +#[inline] +pub fn line_ending(input:&[u8]) -> IResult<&[u8], &[u8]> { + tag_ln(input) +} + +#[inline] +pub fn is_alphabetic(chr:u8) -> bool { + (chr >= 0x41 && chr <= 0x5A) || (chr >= 0x61 && chr <= 0x7A) +} + +#[inline] +pub fn is_digit(chr: u8) -> bool { + chr >= 0x30 && chr <= 0x39 +} + +#[inline] +pub fn is_hex_digit(chr: u8) -> bool { + (chr >= 0x30 && chr <= 0x39) || + (chr >= 0x41 && chr <= 0x46) || + (chr >= 0x61 && chr <= 0x66) +} + +#[inline] +pub fn is_oct_digit(chr: u8) -> bool { + chr >= 0x30 && chr <= 0x37 +} + +#[inline] +pub fn is_alphanumeric(chr: u8) -> bool { + is_alphabetic(chr) || is_digit(chr) +} + +#[inline] +pub fn is_space(chr:u8) -> bool { + chr == ' ' as u8 || chr == '\t' as u8 +} + +// FIXME: when rust-lang/rust#17436 is fixed, macros will be able to export +//pub filter!(alpha is_alphabetic) +//pub filter!(digit is_digit) +//pub filter!(hex_digit is_hex_digit) +//pub filter!(oct_digit is_oct_digit) +//pub filter!(alphanumeric is_alphanumeric) + +use std::ops::{Index,Range,RangeFrom}; +/// Recognizes lowercase and uppercase alphabetic characters: a-zA-Z +pub fn alpha<'a, T: ?Sized>(input:&'a T) -> IResult<&'a T, &'a T> where + T:Index, Output=T>+Index, Output=T>, + &'a T: IterIndices+InputLength { + let input_length = input.input_len(); + if input_length == 0 { + return Error(Position(ErrorKind::Alpha, input)) + } + + for (idx, item) in input.iter_indices() { + if ! item.is_alpha() { + if idx == 0 { + return Error(Position(ErrorKind::Alpha, input)) + } else { + return Done(&input[idx..], &input[0..idx]) + } + } + } + Done(&input[input_length..], input) +} + +/// Recognizes numerical characters: 0-9 +pub fn digit<'a, T: ?Sized>(input:&'a T) -> IResult<&'a T, &'a T> where + T:Index, Output=T>+Index, Output=T>, + &'a T: IterIndices+InputLength { + let input_length = input.input_len(); + if input_length == 0 { + return Error(Position(ErrorKind::Digit, input)) + } + + for (idx, item) in input.iter_indices() { + if ! item.is_0_to_9() { + if idx == 0 { + return Error(Position(ErrorKind::Digit, input)) + } else { + return Done(&input[idx..], &input[0..idx]) + } + } + } + Done(&input[input_length..], input) +} + +/// Recognizes hexadecimal numerical characters: 0-9, A-F, a-f +pub fn hex_digit<'a, T: ?Sized>(input:&'a T) -> IResult<&'a T, &'a T> where + T:Index, Output=T>+Index, Output=T>, + &'a T: IterIndices+InputLength { + let input_length = input.input_len(); + if input_length == 0 { + return Error(Position(ErrorKind::HexDigit, input)) + } + + for (idx, item) in input.iter_indices() { + if ! item.is_hex_digit() { + if idx == 0 { + return Error(Position(ErrorKind::HexDigit, input)) + } else { + return Done(&input[idx..], &input[0..idx]) + } + } + } + Done(&input[input_length..], input) +} + +/// Recognizes octal characters: 0-7 +pub fn oct_digit<'a, T: ?Sized>(input:&'a T) -> IResult<&'a T, &'a T> where + T:Index, Output=T>+Index, Output=T>, + &'a T: IterIndices+InputLength { + let input_length = input.input_len(); + if input_length == 0 { + return Error(Position(ErrorKind::OctDigit, input)) + } + + for (idx, item) in input.iter_indices() { + if ! item.is_oct_digit() { + if idx == 0 { + return Error(Position(ErrorKind::OctDigit, input)) + } else { + return Done(&input[idx..], &input[0..idx]) + } + } + } + Done(&input[input_length..], input) +} + +/// Recognizes numerical and alphabetic characters: 0-9a-zA-Z +pub fn alphanumeric<'a, T: ?Sized>(input:&'a T) -> IResult<&'a T, &'a T> where + T:Index, Output=T>+Index, Output=T>, + &'a T: IterIndices+InputLength { + let input_length = input.input_len(); + if input_length == 0 { + return Error(Position(ErrorKind::AlphaNumeric, input)); + } + + for (idx, item) in input.iter_indices() { + if ! item.is_alphanum() { + if idx == 0 { + return Error(Position(ErrorKind::AlphaNumeric, input)) + } else { + return Done(&input[idx..], &input[0..idx]) + } + } + } + Done(&input[input_length..], input) +} + +/// Recognizes spaces and tabs +pub fn space<'a, T: ?Sized>(input:&'a T) -> IResult<&'a T, &'a T> where + T:Index, Output=T>+Index, Output=T>, + &'a T: IterIndices+InputLength { + let input_length = input.input_len(); + if input_length == 0 { + return Error(Position(ErrorKind::Space, input)); + } + + for (idx, item) in input.iter_indices() { + let chr = item.as_char(); + if ! (chr == ' ' || chr == '\t') { + if idx == 0 { + return Error(Position(ErrorKind::Space, input)) + } else { + return Done(&input[idx..], &input[0..idx]) + } + } + } + Done(&input[input_length..], input) +} + +/// Recognizes spaces, tabs, carriage returns and line feeds +pub fn multispace<'a, T: ?Sized>(input:&'a T) -> IResult<&'a T, &'a T> where + T:Index, Output=T>+Index, Output=T>, + &'a T: IterIndices+InputLength { + let input_length = input.input_len(); + if input_length == 0 { + return Error(Position(ErrorKind::MultiSpace, input)); + } + + for (idx, item) in input.iter_indices() { + let chr = item.as_char(); + if ! (chr == ' ' || chr == '\t' || chr == '\r' || chr == '\n') { + if idx == 0 { + return Error(Position(ErrorKind::MultiSpace, input)) + } else { + return Done(&input[idx..], &input[0..idx]) + } + } + } + Done(&input[input_length..], input) +} + +pub fn sized_buffer(input:&[u8]) -> IResult<&[u8], &[u8]> { + if input.is_empty() { + return Incomplete(Needed::Unknown) + } + + let len = input[0] as usize; + + if input.len() >= len + 1 { + Done(&input[len+1..], &input[1..len+1]) + } else { + Incomplete(Needed::Size(1 + len)) + } +} + +pub fn length_value(input:&[u8]) -> IResult<&[u8], &[u8]> { + let input_len = input.len(); + if input_len == 0 { + return Error(Position(ErrorKind::LengthValueFn, input)) + } + + let len = input[0] as usize; + if input_len - 1 >= len { + IResult::Done(&input[len+1..], &input[1..len+1]) + } else { + IResult::Incomplete(Needed::Size(1+len)) + } +} + +/// Recognizes an unsigned 1 byte integer (equivalent to take!(1) +#[inline] +pub fn be_u8(i: &[u8]) -> IResult<&[u8], u8> { + if i.len() < 1 { + Incomplete(Needed::Size(1)) + } else { + Done(&i[1..], i[0]) + } +} + +/// Recognizes big endian unsigned 2 bytes integer +#[inline] +pub fn be_u16(i: &[u8]) -> IResult<&[u8], u16> { + if i.len() < 2 { + Incomplete(Needed::Size(2)) + } else { + let res = ((i[0] as u16) << 8) + i[1] as u16; + Done(&i[2..], res) + } +} + +/// Recognizes big endian unsigned 4 bytes integer +#[inline] +pub fn be_u32(i: &[u8]) -> IResult<&[u8], u32> { + if i.len() < 4 { + Incomplete(Needed::Size(4)) + } else { + let res = ((i[0] as u32) << 24) + ((i[1] as u32) << 16) + ((i[2] as u32) << 8) + i[3] as u32; + Done(&i[4..], res) + } +} + +/// Recognizes big endian unsigned 8 bytes integer +#[inline] +pub fn be_u64(i: &[u8]) -> IResult<&[u8], u64> { + if i.len() < 8 { + Incomplete(Needed::Size(8)) + } else { + let res = ((i[0] as u64) << 56) + ((i[1] as u64) << 48) + ((i[2] as u64) << 40) + ((i[3] as u64) << 32) + + ((i[4] as u64) << 24) + ((i[5] as u64) << 16) + ((i[6] as u64) << 8) + i[7] as u64; + Done(&i[8..], res) + } +} + +/// Recognizes a signed 1 byte integer (equivalent to take!(1) +#[inline] +pub fn be_i8(i:&[u8]) -> IResult<&[u8], i8> { + map!(i, be_u8, | x | { x as i8 }) +} + +/// Recognizes big endian signed 2 bytes integer +#[inline] +pub fn be_i16(i:&[u8]) -> IResult<&[u8], i16> { + map!(i, be_u16, | x | { x as i16 }) +} + +/// Recognizes big endian signed 4 bytes integer +#[inline] +pub fn be_i32(i:&[u8]) -> IResult<&[u8], i32> { + map!(i, be_u32, | x | { x as i32 }) +} + +/// Recognizes big endian signed 8 bytes integer +#[inline] +pub fn be_i64(i:&[u8]) -> IResult<&[u8], i64> { + map!(i, be_u64, | x | { x as i64 }) +} + +/// Recognizes an unsigned 1 byte integer (equivalent to take!(1) +#[inline] +pub fn le_u8(i: &[u8]) -> IResult<&[u8], u8> { + if i.len() < 1 { + Incomplete(Needed::Size(1)) + } else { + Done(&i[1..], i[0]) + } +} + +/// Recognizes little endian unsigned 2 bytes integer +#[inline] +pub fn le_u16(i: &[u8]) -> IResult<&[u8], u16> { + if i.len() < 2 { + Incomplete(Needed::Size(2)) + } else { + let res = ((i[1] as u16) << 8) + i[0] as u16; + Done(&i[2..], res) + } +} + +/// Recognizes little endian unsigned 4 bytes integer +#[inline] +pub fn le_u32(i: &[u8]) -> IResult<&[u8], u32> { + if i.len() < 4 { + Incomplete(Needed::Size(4)) + } else { + let res = ((i[3] as u32) << 24) + ((i[2] as u32) << 16) + ((i[1] as u32) << 8) + i[0] as u32; + Done(&i[4..], res) + } +} + +/// Recognizes little endian unsigned 8 bytes integer +#[inline] +pub fn le_u64(i: &[u8]) -> IResult<&[u8], u64> { + if i.len() < 8 { + Incomplete(Needed::Size(8)) + } else { + let res = ((i[7] as u64) << 56) + ((i[6] as u64) << 48) + ((i[5] as u64) << 40) + ((i[4] as u64) << 32) + + ((i[3] as u64) << 24) + ((i[2] as u64) << 16) + ((i[1] as u64) << 8) + i[0] as u64; + Done(&i[8..], res) + } +} + +/// Recognizes a signed 1 byte integer (equivalent to take!(1) +#[inline] +pub fn le_i8(i:&[u8]) -> IResult<&[u8], i8> { + map!(i, le_u8, | x | { x as i8 }) +} + +/// Recognizes little endian signed 2 bytes integer +#[inline] +pub fn le_i16(i:&[u8]) -> IResult<&[u8], i16> { + map!(i, le_u16, | x | { x as i16 }) +} + +/// Recognizes little endian signed 4 bytes integer +#[inline] +pub fn le_i32(i:&[u8]) -> IResult<&[u8], i32> { + map!(i, le_u32, | x | { x as i32 }) +} + +/// Recognizes little endian signed 8 bytes integer +#[inline] +pub fn le_i64(i:&[u8]) -> IResult<&[u8], i64> { + map!(i, le_u64, | x | { x as i64 }) +} + +/// if parameter is true, parse a big endian u16 integer, +/// otherwise a little endian u16 integer +#[macro_export] +macro_rules! u16 ( ($i:expr, $e:expr) => ( {if $e { $crate::be_u16($i) } else { $crate::le_u16($i) } } );); +/// if parameter is true, parse a big endian u32 integer, +/// otherwise a little endian u32 integer +#[macro_export] +macro_rules! u32 ( ($i:expr, $e:expr) => ( {if $e { $crate::be_u32($i) } else { $crate::le_u32($i) } } );); +/// if parameter is true, parse a big endian u64 integer, +/// otherwise a little endian u64 integer +#[macro_export] +macro_rules! u64 ( ($i:expr, $e:expr) => ( {if $e { $crate::be_u64($i) } else { $crate::le_u64($i) } } );); + +/// if parameter is true, parse a big endian i16 integer, +/// otherwise a little endian i16 integer +#[macro_export] +macro_rules! i16 ( ($i:expr, $e:expr) => ( {if $e { $crate::be_i16($i) } else { $crate::le_i16($i) } } );); +/// if parameter is true, parse a big endian i32 integer, +/// otherwise a little endian i32 integer +#[macro_export] +macro_rules! i32 ( ($i:expr, $e:expr) => ( {if $e { $crate::be_i32($i) } else { $crate::le_i32($i) } } );); +/// if parameter is true, parse a big endian i64 integer, +/// otherwise a little endian i64 integer +#[macro_export] +macro_rules! i64 ( ($i:expr, $e:expr) => ( {if $e { $crate::be_i64($i) } else { $crate::le_i64($i) } } );); + +/// Recognizes big endian 4 bytes floating point number +#[inline] +pub fn be_f32(input: &[u8]) -> IResult<&[u8], f32> { + match be_u32(input) { + Error(e) => Error(e), + Incomplete(e) => Incomplete(e), + Done(i,o) => { + unsafe { + Done(i, transmute::(o)) + } + } + } +} + +/// Recognizes big endian 8 bytes floating point number +#[inline] +pub fn be_f64(input: &[u8]) -> IResult<&[u8], f64> { + match be_u64(input) { + Error(e) => Error(e), + Incomplete(e) => Incomplete(e), + Done(i,o) => { + unsafe { + Done(i, transmute::(o)) + } + } + } +} + +/// Recognizes a hex-encoded integer +#[inline] +pub fn hex_u32(input: &[u8]) -> IResult<&[u8], u32> { + match is_a!(input, &b"0123456789abcdef"[..]) { + Error(e) => Error(e), + Incomplete(e) => Incomplete(e), + Done(i,o) => { + let mut res = 0u32; + + // Do not parse more than 8 characters for a u32 + let mut remaining = i; + let mut parsed = o; + if o.len() > 8 { + remaining = &input[8..]; + parsed = &input[..8]; + } + + for &e in parsed { + let digit = e as char; + let value = digit.to_digit(16).unwrap_or(0); + res = value + (res << 4); + } + Done(remaining, res) + } + } +} + +/// Recognizes empty input buffers +/// +/// useful to verify that the previous parsers used all of the input +#[inline] +//pub fn eof(input:&[u8]) -> IResult<&[u8], &[u8]> { +pub fn eof<'a, T:?Sized>(input: &'a T) -> IResult<&'a T,&'a T> where + T:Index, Output=T>+Index, Output=T>, + &'a T: InputLength { + if input.input_len() == 0 { + Done(input, input) + } else { + Error(Position(ErrorKind::Eof, input)) + } +} + +/// Recognizes non empty buffers +#[inline] +pub fn non_empty<'a, T:?Sized>(input: &'a T) -> IResult<&'a T,&'a T> where + T:Index, Output=T>+Index, Output=T>, + &'a T: InputLength { + if input.input_len() == 0 { + Error(Position(ErrorKind::NonEmpty, input)) + } else { + Done(&input[input.input_len()..], input) + } +} + +/// Return the remaining input. +#[inline] +pub fn rest(input: &[u8]) -> IResult<&[u8], &[u8]> { + IResult::Done(&input[input.len()..], input) +} + +#[cfg(test)] +mod tests { + use super::*; + use internal::{Needed,IResult}; + use internal::IResult::*; + use internal::Err::*; + use util::ErrorKind; + + #[test] + fn tag_closure() { + let x = tag_cl(&b"abcd"[..]); + let r = x(&b"abcdabcdefgh"[..]); + assert_eq!(r, Done(&b"abcdefgh"[..], &b"abcd"[..])); + + let r2 = x(&b"abcefgh"[..]); + assert_eq!(r2, Error(Position(ErrorKind::TagClosure, &b"abcefgh"[..]))); + } + + #[test] + fn character() { + let empty: &[u8] = b""; + let a: &[u8] = b"abcd"; + let b: &[u8] = b"1234"; + let c: &[u8] = b"a123"; + let d: &[u8] = "azé12".as_bytes(); + let e: &[u8] = b" "; + assert_eq!(alpha(a), Done(empty, a)); + assert_eq!(alpha(b), Error(Position(ErrorKind::Alpha,b))); + assert_eq!(alpha(c), Done(&c[1..], &b"a"[..])); + assert_eq!(alpha(d), Done("é12".as_bytes(), &b"az"[..])); + assert_eq!(digit(a), Error(Position(ErrorKind::Digit,a))); + assert_eq!(digit(b), Done(empty, b)); + assert_eq!(digit(c), Error(Position(ErrorKind::Digit,c))); + assert_eq!(digit(d), Error(Position(ErrorKind::Digit,d))); + assert_eq!(hex_digit(a), Done(empty, a)); + assert_eq!(hex_digit(b), Done(empty, b)); + assert_eq!(hex_digit(c), Done(empty, c)); + assert_eq!(hex_digit(d), Done("zé12".as_bytes(), &b"a"[..])); + assert_eq!(hex_digit(e), Error(Position(ErrorKind::HexDigit,e))); + assert_eq!(oct_digit(a), Error(Position(ErrorKind::OctDigit,a))); + assert_eq!(oct_digit(b), Done(empty, b)); + assert_eq!(oct_digit(c), Error(Position(ErrorKind::OctDigit,c))); + assert_eq!(oct_digit(d), Error(Position(ErrorKind::OctDigit,d))); + assert_eq!(alphanumeric(a), Done(empty, a)); + assert_eq!(fix_error!(b,(), alphanumeric), Done(empty, b)); + assert_eq!(alphanumeric(c), Done(empty, c)); + assert_eq!(alphanumeric(d), Done("é12".as_bytes(), &b"az"[..])); + assert_eq!(space(e), Done(&b""[..], &b" "[..])); + } + + #[test] + fn character_s() { + let empty = ""; + let a = "abcd"; + let b = "1234"; + let c = "a123"; + let d = "azé12"; + let e = " "; + assert_eq!(alpha(a), Done(empty, a)); + assert_eq!(alpha(b), Error(Position(ErrorKind::Alpha,b))); + assert_eq!(alpha(c), Done(&c[1..], &"a"[..])); + assert_eq!(alpha(d), Done("12", &"azé"[..])); + assert_eq!(digit(a), Error(Position(ErrorKind::Digit,a))); + assert_eq!(digit(b), Done(empty, b)); + assert_eq!(digit(c), Error(Position(ErrorKind::Digit,c))); + assert_eq!(digit(d), Error(Position(ErrorKind::Digit,d))); + assert_eq!(hex_digit(a), Done(empty, a)); + assert_eq!(hex_digit(b), Done(empty, b)); + assert_eq!(hex_digit(c), Done(empty, c)); + assert_eq!(hex_digit(d), Done("zé12", &"a"[..])); + assert_eq!(hex_digit(e), Error(Position(ErrorKind::HexDigit,e))); + assert_eq!(oct_digit(a), Error(Position(ErrorKind::OctDigit,a))); + assert_eq!(oct_digit(b), Done(empty, b)); + assert_eq!(oct_digit(c), Error(Position(ErrorKind::OctDigit,c))); + assert_eq!(oct_digit(d), Error(Position(ErrorKind::OctDigit,d))); + assert_eq!(alphanumeric(a), Done(empty, a)); + assert_eq!(fix_error!(b,(), alphanumeric), Done(empty, b)); + assert_eq!(alphanumeric(c), Done(empty, c)); + assert_eq!(alphanumeric(d), Done("", &"azé12"[..])); + assert_eq!(space(e), Done(&""[..], &" "[..])); + } + + use util::HexDisplay; + #[test] + fn offset() { + let a = &b"abcd"[..]; + let b = &b"1234"[..]; + let c = &b"a123"[..]; + let d = &b" \t"[..]; + let e = &b" \t\r\n"[..]; + let f = &b"123abcDEF"[..]; + + match alpha(a) { + Done(i, _) => { assert_eq!(a.offset(i) + i.len(), a.len()); } + _ => { panic!("wrong return type in offset test for alpha") } + } + match digit(b) { + Done(i, _) => { assert_eq!(b.offset(i) + i.len(), b.len()); } + _ => { panic!("wrong return type in offset test for digit") } + } + match alphanumeric(c) { + Done(i, _) => { assert_eq!(c.offset(i) + i.len(), c.len()); } + _ => { panic!("wrong return type in offset test for alphanumeric") } + } + match space(d) { + Done(i, _) => { assert_eq!(d.offset(i) + i.len(), d.len()); } + _ => { panic!("wrong return type in offset test for space") } + } + match multispace(e) { + Done(i, _) => { assert_eq!(e.offset(i) + i.len(), e.len()); } + _ => { panic!("wrong return type in offset test for multispace") } + } + match hex_digit(f) { + Done(i, _) => { assert_eq!(f.offset(i) + i.len(), f.len()); } + _ => { panic!("wrong return type in offset test for hex_digit") } + } + match oct_digit(f) { + Done(i, _) => { assert_eq!(f.offset(i) + i.len(), f.len()); } + _ => { panic!("wrong return type in offset test for oct_digit") } + } + } + + #[test] + fn is_not() { + let a: &[u8] = b"ab12cd\nefgh"; + assert_eq!(not_line_ending(a), Done(&b"\nefgh"[..], &b"ab12cd"[..])); + + let b: &[u8] = b"ab12cd\nefgh\nijkl"; + assert_eq!(not_line_ending(b), Done(&b"\nefgh\nijkl"[..], &b"ab12cd"[..])); + + let c: &[u8] = b"ab12cd"; + assert_eq!(not_line_ending(c), Done(&b""[..], c)); + } + + #[test] + fn buffer_with_size() { + let i:Vec = vec![7,8]; + let o:Vec = vec![4,5,6]; + //let arr:[u8; 6usize] = [3, 4, 5, 6, 7, 8]; + let arr:[u8; 6usize] = [3, 4, 5, 6, 7, 8]; + let res = sized_buffer(&arr[..]); + assert_eq!(res, Done(&i[..], &o[..])) + } + + /*#[test] + fn t1() { + let v1:Vec = vec![1,2,3]; + let v2:Vec = vec![4,5,6]; + let d = Done(&v1[..], &v2[..]); + let res = d.flat_map(print); + assert_eq!(res, Done(&v2[..], ())); + }*/ + + #[test] + fn length_value_test() { + let i1 = vec![7,8]; + let o1 = vec![4, 5, 6]; + let arr1:[u8; 6usize] = [3, 4, 5, 6, 7, 8]; + let res1 = length_value(&arr1); + assert_eq!(Done(&i1[..], &o1[..]), res1); + + let i2:Vec = vec![4,5,6,7,8]; + let o2: &[u8] = b""; + let arr2:[u8; 6usize] = [0, 4, 5, 6, 7, 8]; + let res2 = length_value(&arr2); + assert_eq!(Done(&i2[..], o2), res2); + + let arr3:[u8; 7usize] = [8, 4, 5, 6, 7, 8, 9]; + let res3 = length_value(&arr3); + //FIXME: should be incomplete + assert_eq!(Incomplete(Needed::Size(9)), res3); + } + + #[test] + fn i8_tests() { + assert_eq!(be_i8(&[0x00]), Done(&b""[..], 0)); + assert_eq!(be_i8(&[0x7f]), Done(&b""[..], 127)); + assert_eq!(be_i8(&[0xff]), Done(&b""[..], -1)); + assert_eq!(be_i8(&[0x80]), Done(&b""[..], -128)); + } + + #[test] + fn i16_tests() { + assert_eq!(be_i16(&[0x00, 0x00]), Done(&b""[..], 0)); + assert_eq!(be_i16(&[0x7f, 0xff]), Done(&b""[..], 32767_i16)); + assert_eq!(be_i16(&[0xff, 0xff]), Done(&b""[..], -1)); + assert_eq!(be_i16(&[0x80, 0x00]), Done(&b""[..], -32768_i16)); + } + + #[test] + fn i32_tests() { + assert_eq!(be_i32(&[0x00, 0x00, 0x00, 0x00]), Done(&b""[..], 0)); + assert_eq!(be_i32(&[0x7f, 0xff, 0xff, 0xff]), Done(&b""[..], 2147483647_i32)); + assert_eq!(be_i32(&[0xff, 0xff, 0xff, 0xff]), Done(&b""[..], -1)); + assert_eq!(be_i32(&[0x80, 0x00, 0x00, 0x00]), Done(&b""[..], -2147483648_i32)); + } + + #[test] + fn i64_tests() { + assert_eq!(be_i64(&[0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]), Done(&b""[..], 0)); + assert_eq!(be_i64(&[0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), Done(&b""[..], 9223372036854775807_i64)); + assert_eq!(be_i64(&[0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), Done(&b""[..], -1)); + assert_eq!(be_i64(&[0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]), Done(&b""[..], -9223372036854775808_i64)); + } + + #[test] + fn le_i8_tests() { + assert_eq!(le_i8(&[0x00]), Done(&b""[..], 0)); + assert_eq!(le_i8(&[0x7f]), Done(&b""[..], 127)); + assert_eq!(le_i8(&[0xff]), Done(&b""[..], -1)); + assert_eq!(le_i8(&[0x80]), Done(&b""[..], -128)); + } + + #[test] + fn le_i16_tests() { + assert_eq!(le_i16(&[0x00, 0x00]), Done(&b""[..], 0)); + assert_eq!(le_i16(&[0xff, 0x7f]), Done(&b""[..], 32767_i16)); + assert_eq!(le_i16(&[0xff, 0xff]), Done(&b""[..], -1)); + assert_eq!(le_i16(&[0x00, 0x80]), Done(&b""[..], -32768_i16)); + } + + #[test] + fn le_i32_tests() { + assert_eq!(le_i32(&[0x00, 0x00, 0x00, 0x00]), Done(&b""[..], 0)); + assert_eq!(le_i32(&[0xff, 0xff, 0xff, 0x7f]), Done(&b""[..], 2147483647_i32)); + assert_eq!(le_i32(&[0xff, 0xff, 0xff, 0xff]), Done(&b""[..], -1)); + assert_eq!(le_i32(&[0x00, 0x00, 0x00, 0x80]), Done(&b""[..], -2147483648_i32)); + } + + #[test] + fn le_i64_tests() { + assert_eq!(le_i64(&[0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]), Done(&b""[..], 0)); + assert_eq!(le_i64(&[0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f]), Done(&b""[..], 9223372036854775807_i64)); + assert_eq!(le_i64(&[0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), Done(&b""[..], -1)); + assert_eq!(le_i64(&[0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80]), Done(&b""[..], -9223372036854775808_i64)); + } + + #[test] + fn hex_u32_tests() { + assert_eq!(hex_u32(&b""[..]), Done(&b""[..], 0)); + assert_eq!(hex_u32(&b"ff"[..]), Done(&b""[..], 255)); + assert_eq!(hex_u32(&b"1be2"[..]), Done(&b""[..], 7138)); + assert_eq!(hex_u32(&b"c5a31be2"[..]), Done(&b""[..], 3315801058)); + assert_eq!(hex_u32(&b"00c5a31be2"[..]), Done(&b"e2"[..], 12952347)); + assert_eq!(hex_u32(&b"c5a31be201"[..]), Done(&b"01"[..], 3315801058)); + assert_eq!(hex_u32(&b"ffffffff"[..]), Done(&b""[..], 4294967295)); + assert_eq!(hex_u32(&b"0x1be2"[..]), Done(&b"x1be2"[..], 0)); + } + + #[test] + fn end_of_input() { + let not_over = &b"Hello, world!"[..]; + let is_over = &b""[..]; + + let res_not_over = eof(not_over); + assert_eq!(res_not_over, Error(Position(ErrorKind::Eof, not_over))); + + let res_over = eof(is_over); + assert_eq!(res_over, Done(is_over, is_over)); + } + + #[test] + fn configurable_endianness() { + named!(be_tst16, u16!(true)); + named!(le_tst16, u16!(false)); + assert_eq!(be_tst16(&[0x80, 0x00]), Done(&b""[..], 32768_u16)); + assert_eq!(le_tst16(&[0x80, 0x00]), Done(&b""[..], 128_u16)); + + named!(be_tst32, u32!(true)); + named!(le_tst32, u32!(false)); + assert_eq!(be_tst32(&[0x12, 0x00, 0x60, 0x00]), Done(&b""[..], 302014464_u32)); + assert_eq!(le_tst32(&[0x12, 0x00, 0x60, 0x00]), Done(&b""[..], 6291474_u32)); + + named!(be_tst64, u64!(true)); + named!(le_tst64, u64!(false)); + assert_eq!(be_tst64(&[0x12, 0x00, 0x60, 0x00, 0x12, 0x00, 0x80, 0x00]), Done(&b""[..], 1297142246100992000_u64)); + assert_eq!(le_tst64(&[0x12, 0x00, 0x60, 0x00, 0x12, 0x00, 0x80, 0x00]), Done(&b""[..], 36028874334666770_u64)); + + named!(be_tsti16, i16!(true)); + named!(le_tsti16, i16!(false)); + assert_eq!(be_tsti16(&[0x00, 0x80]), Done(&b""[..], 128_i16)); + assert_eq!(le_tsti16(&[0x00, 0x80]), Done(&b""[..], -32768_i16)); + + named!(be_tsti32, i32!(true)); + named!(le_tsti32, i32!(false)); + assert_eq!(be_tsti32(&[0x00, 0x12, 0x60, 0x00]), Done(&b""[..], 1204224_i32)); + assert_eq!(le_tsti32(&[0x00, 0x12, 0x60, 0x00]), Done(&b""[..], 6296064_i32)); + + named!(be_tsti64, i64!(true)); + named!(le_tsti64, i64!(false)); + assert_eq!(be_tsti64(&[0x00, 0xFF, 0x60, 0x00, 0x12, 0x00, 0x80, 0x00]), Done(&b""[..], 71881672479506432_i64)); + assert_eq!(le_tsti64(&[0x00, 0xFF, 0x60, 0x00, 0x12, 0x00, 0x80, 0x00]), Done(&b""[..], 36028874334732032_i64)); + + } + + #[test] + fn manual_configurable_endianness_test() { + let x = 1; + let int_parse: Box IResult<&[u8], u16> > = if x == 2 { + Box::new(be_u16) + } else { + Box::new(le_u16) + }; + println!("{:?}", int_parse(&b"3"[..])); + assert_eq!(int_parse(&[0x80, 0x00]), Done(&b""[..], 128_u16)); + } + + #[allow(dead_code)] + fn custom_error(input: &[u8]) -> IResult<&[u8], &[u8], ()> { + fix_error!(input, (), alphanumeric) + } + + #[test] + fn hex_digit_test() { + let empty = &b""[..]; + + let i = &b"0123456789abcdefABCDEF"[..]; + assert_eq!(hex_digit(i), Done(empty, i)); + + let i = &b"g"[..]; + assert_eq!(hex_digit(i), Error(Position(ErrorKind::HexDigit,i))); + + let i = &b"G"[..]; + assert_eq!(hex_digit(i), Error(Position(ErrorKind::HexDigit,i))); + + assert!(is_hex_digit(b'0')); + assert!(is_hex_digit(b'9')); + assert!(is_hex_digit(b'a')); + assert!(is_hex_digit(b'f')); + assert!(is_hex_digit(b'A')); + assert!(is_hex_digit(b'F')); + assert!(!is_hex_digit(b'g')); + assert!(!is_hex_digit(b'G')); + assert!(!is_hex_digit(b'/')); + assert!(!is_hex_digit(b':')); + assert!(!is_hex_digit(b'@')); + assert!(!is_hex_digit(b'\x60')); + } + + #[test] + fn oct_digit_test() { + let empty = &b""[..]; + + let i = &b"01234567"[..]; + assert_eq!(oct_digit(i), Done(empty, i)); + + let i = &b"8"[..]; + assert_eq!(oct_digit(i), Error(Position(ErrorKind::OctDigit,i))); + + assert!(is_oct_digit(b'0')); + assert!(is_hex_digit(b'7')); + assert!(!is_oct_digit(b'8')); + assert!(!is_oct_digit(b'9')); + assert!(!is_oct_digit(b'a')); + assert!(!is_oct_digit(b'A')); + assert!(!is_oct_digit(b'/')); + assert!(!is_oct_digit(b':')); + assert!(!is_oct_digit(b'@')); + assert!(!is_oct_digit(b'\x60')); + } +} diff --git a/deps/nom-1.2.2/src/regexp.rs b/deps/nom-1.2.2/src/regexp.rs new file mode 100644 index 000000000..986f1a26f --- /dev/null +++ b/deps/nom-1.2.2/src/regexp.rs @@ -0,0 +1,328 @@ +#[doc(hidden)] +#[macro_export] +macro_rules! regex ( + ($re: ident, $s:expr) => ( + lazy_static! { + static ref $re: ::regex::Regex = ::regex::Regex::new($s).unwrap(); + } + ); +); + + +/// `re_match!(regexp) => &[T] -> IResult<&[T], &[T]>` +/// Returns the whole input if a match is found +/// +/// requires the `regexp` feature +#[macro_export] +macro_rules! re_match ( + ($i:expr, $re:expr) => ( + { + use $crate::InputLength; + let re = ::regex::Regex::new($re).unwrap(); + if re.is_match($i) { + $crate::IResult::Done(&$i[$i.input_len()..], $i) + } else { + $crate::IResult::Error($crate::Err::Code($crate::ErrorKind::RegexpMatch)) + } + } + ) +); + +#[cfg(feature = "regexp_macros")] +/// `re_match_static!(regexp) => &[T] -> IResult<&[T], &[T]>` +/// Returns the whole input if a match is found. Regular expression calculated at compile time +/// +/// requires the `regexp_macros` feature +#[macro_export] +macro_rules! re_match_static ( + ($i:expr, $re:expr) => ( + { + use $crate::InputLength; + regex!(RE, $re); + if RE.is_match($i) { + $crate::IResult::Done(&$i[$i.input_len()..], $i) + } else { + $crate::IResult::Error($crate::Err::Code($crate::ErrorKind::RegexpMatch)) + } + } + + ) +); + +/// `re_find!(regexp) => &[T] -> IResult<&[T], &[T]>` +/// Returns the first match +/// +/// requires the `regexp` feature +#[macro_export] +macro_rules! re_find ( + ($i:expr, $re:expr) => ( + { + let re = ::regex::Regex::new($re).unwrap(); + if let Some((begin, end)) = re.find($i) { + $crate::IResult::Done(&$i[end..], &$i[begin..end]) + } else { + $crate::IResult::Error($crate::Err::Code($crate::ErrorKind::RegexpFind)) + } + } + ) +); + +#[cfg(feature = "regexp_macros")] +/// `re_find!(regexp) => &[T] -> IResult<&[T], &[T]>` +/// Returns the first match. Regular expression calculated at compile time +/// +/// requires the `regexp_macros` feature +#[macro_export] +macro_rules! re_find_static ( + ($i:expr, $re:expr) => ( + { + regex!(RE, $re); + if let Some((begin, end)) = RE.find($i) { + $crate::IResult::Done(&$i[end..], &$i[begin..end]) + } else { + $crate::IResult::Error($crate::Err::Code($crate::ErrorKind::RegexpFind)) + } + } + + ) +); + +/// `re_matches!(regexp) => &[T] -> IResult<&[T], Vec<&[T]>>` +/// Returns all the matched parts +/// +/// requires the `regexp` feature +#[macro_export] +macro_rules! re_matches ( + ($i:expr, $re:expr) => ( + { + let re = ::regex::Regex::new($re).unwrap(); + let v: Vec<&str> = re.find_iter($i).map(|(begin,end)| &$i[begin..end]).collect(); + if v.len() != 0 { + let offset = { + let end = v.last().unwrap(); + end.as_ptr() as usize + end.len() - $i.as_ptr() as usize + }; + $crate::IResult::Done(&$i[offset..], v) + } else { + $crate::IResult::Error($crate::Err::Code($crate::ErrorKind::RegexpMatches)) + } + } + ) +); + +#[cfg(feature = "regexp_macros")] +/// `re_matches_static!(regexp) => &[T] -> IResult<&[T], Vec<&[T]>>` +/// Returns all the matched parts. Regular expression calculated at compile time +/// +/// requires the `regexp_macros` feature +#[macro_export] +macro_rules! re_matches_static ( + ($i:expr, $re:expr) => ( + { + regex!(RE, $re); + let v: Vec<&str> = RE.find_iter($i).map(|(begin,end)| &$i[begin..end]).collect(); + if v.len() != 0 { + let offset = { + let end = v.last().unwrap(); + end.as_ptr() as usize + end.len() - $i.as_ptr() as usize + }; + $crate::IResult::Done(&$i[offset..], v) + } else { + $crate::IResult::Error($crate::Err::Code($crate::ErrorKind::RegexpMatches)) + } + } + ) +); + +/// `re_capture!(regexp) => &[T] -> IResult<&[T], Vec<&[T]>>` +/// Returns the first capture group +/// +/// requires the `regexp` feature +#[macro_export] +macro_rules! re_capture ( + ($i:expr, $re:expr) => ( + { + let re = ::regex::Regex::new($re).unwrap(); + if let Some(c) = re.captures($i) { + let v:Vec<&str> = c.iter_pos().filter(|el| el.is_some()).map(|el| el.unwrap()).map(|(begin,end)| &$i[begin..end]).collect(); + let offset = { + let end = v.last().unwrap(); + end.as_ptr() as usize + end.len() - $i.as_ptr() as usize + }; + $crate::IResult::Done(&$i[offset..], v) + } else { + $crate::IResult::Error($crate::Err::Code($crate::ErrorKind::RegexpCapture)) + } + } + ) +); + +#[cfg(feature = "regexp_macros")] +/// `re_capture_static!(regexp) => &[T] -> IResult<&[T], Vec<&[T]>>` +/// Returns the first capture group. Regular expression calculated at compile time +/// +/// requires the `regexp_macros` feature +#[macro_export] +macro_rules! re_capture_static ( + ($i:expr, $re:expr) => ( + { + regex!(RE, $re); + if let Some(c) = RE.captures($i) { + let v:Vec<&str> = c.iter_pos().filter(|el| el.is_some()).map(|el| el.unwrap()).map(|(begin,end)| &$i[begin..end]).collect(); + let offset = { + let end = v.last().unwrap(); + end.as_ptr() as usize + end.len() - $i.as_ptr() as usize + }; + $crate::IResult::Done(&$i[offset..], v) + } else { + $crate::IResult::Error($crate::Err::Code($crate::ErrorKind::RegexpCapture)) + } + } + ) +); + +/// `re_captures!(regexp) => &[T] -> IResult<&[T], Vec>>` +/// Returns all the capture groups +/// +/// requires the `regexp` feature +#[macro_export] +macro_rules! re_captures ( + ($i:expr, $re:expr) => ( + { + let re = ::regex::Regex::new($re).unwrap(); + let v:Vec> = re.captures_iter($i).map(|c| c.iter_pos().filter(|el| el.is_some()).map(|el| el.unwrap()).map(|(begin,end)| &$i[begin..end]).collect()).collect(); + if v.len() != 0 { + let offset = { + let end = v.last().unwrap().last().unwrap(); + end.as_ptr() as usize + end.len() - $i.as_ptr() as usize + }; + $crate::IResult::Done(&$i[offset..], v) + } else { + $crate::IResult::Error($crate::Err::Code($crate::ErrorKind::RegexpCapture)) + } + } + ) +); + +#[cfg(feature = "regexp_macros")] +/// `re_captures_static!(regexp) => &[T] -> IResult<&[T], Vec>>` +/// Returns all the capture groups. Regular expression calculated at compile time +/// +/// requires the `regexp_macros` feature +#[macro_export] +macro_rules! re_captures_static ( + ($i:expr, $re:expr) => ( + { + regex!(RE, $re); + let v:Vec> = RE.captures_iter($i).map(|c| c.iter_pos().filter(|el| el.is_some()).map(|el| el.unwrap()).map(|(begin,end)| &$i[begin..end]).collect()).collect(); + if v.len() != 0 { + let offset = { + let end = v.last().unwrap().last().unwrap(); + end.as_ptr() as usize + end.len() - $i.as_ptr() as usize + }; + $crate::IResult::Done(&$i[offset..], v) + } else { + $crate::IResult::Error($crate::Err::Code($crate::ErrorKind::RegexpCapture)) + } + } + ) +); + +#[cfg(test)] +mod tests { + use internal::IResult::*; + use internal::Err::*; + use util::ErrorKind; + + #[test] + fn re_match() { + named!(rm<&str,&str>, re_match!(r"^\d{4}-\d{2}-\d{2}")); + assert_eq!(rm("2015-09-07"), Done("", "2015-09-07")); + assert_eq!(rm("blah"), Error(Code(ErrorKind::RegexpMatch))); + assert_eq!(rm("2015-09-07blah"), Done("", "2015-09-07blah")); + } + + #[cfg(feature = "regexp_macros")] + #[test] + fn re_match_static() { + named!(rm<&str,&str>, re_match_static!(r"^\d{4}-\d{2}-\d{2}")); + assert_eq!(rm("2015-09-07"), Done("", "2015-09-07")); + assert_eq!(rm("blah"), Error(Code(ErrorKind::RegexpMatch))); + assert_eq!(rm("2015-09-07blah"), Done("", "2015-09-07blah")); + } + + #[test] + fn re_find() { + named!(rm<&str,&str>, re_find!(r"^\d{4}-\d{2}-\d{2}")); + assert_eq!(rm("2015-09-07"), Done("", "2015-09-07")); + assert_eq!(rm("blah"), Error(Code(ErrorKind::RegexpFind))); + assert_eq!(rm("2015-09-07blah"), Done("blah", "2015-09-07")); + } + + #[cfg(feature = "regexp_macros")] + #[test] + fn re_find_static() { + named!(rm<&str,&str>, re_find_static!(r"^\d{4}-\d{2}-\d{2}")); + assert_eq!(rm("2015-09-07"), Done("", "2015-09-07")); + assert_eq!(rm("blah"), Error(Code(ErrorKind::RegexpFind))); + assert_eq!(rm("2015-09-07blah"), Done("blah", "2015-09-07")); + } + + #[test] + fn re_matches() { + named!(rm< &str,Vec<&str> >, re_matches!(r"\d{4}-\d{2}-\d{2}")); + assert_eq!(rm("2015-09-07"), Done("", vec!["2015-09-07"])); + assert_eq!(rm("blah"), Error(Code(ErrorKind::RegexpMatches))); + assert_eq!(rm("aaa2015-09-07blah2015-09-09pouet"), Done("pouet", vec!["2015-09-07", "2015-09-09"])); + } + + #[cfg(feature = "regexp_macros")] + #[test] + fn re_matches_static() { + named!(rm< &str,Vec<&str> >, re_matches_static!(r"\d{4}-\d{2}-\d{2}")); + assert_eq!(rm("2015-09-07"), Done("", vec!["2015-09-07"])); + assert_eq!(rm("blah"), Error(Code(ErrorKind::RegexpMatches))); + assert_eq!(rm("aaa2015-09-07blah2015-09-09pouet"), Done("pouet", vec!["2015-09-07", "2015-09-09"])); + } + + #[test] + fn re_capture() { + named!(rm< &str,Vec<&str> >, re_capture!(r"([:alpha:]+)\s+((\d+).(\d+).(\d+))")); + assert_eq!(rm("blah nom 0.3.11pouet"), Done("pouet", vec!["nom 0.3.11", "nom", "0.3.11", "0", "3", "11"])); + assert_eq!(rm("blah"), Error(Code(ErrorKind::RegexpCapture))); + assert_eq!(rm("hello nom 0.3.11 world regex 0.1.41"), Done(" world regex 0.1.41", vec!["nom 0.3.11", "nom", "0.3.11", "0", "3", "11"])); + } + + #[cfg(feature = "regexp_macros")] + #[test] + fn re_capture_static() { + named!(rm< &str,Vec<&str> >, re_capture_static!(r"([:alpha:]+)\s+((\d+).(\d+).(\d+))")); + assert_eq!(rm("blah nom 0.3.11pouet"), Done("pouet", vec!["nom 0.3.11", "nom", "0.3.11", "0", "3", "11"])); + assert_eq!(rm("blah"), Error(Code(ErrorKind::RegexpCapture))); + assert_eq!(rm("hello nom 0.3.11 world regex 0.1.41"), Done(" world regex 0.1.41", vec!["nom 0.3.11", "nom", "0.3.11", "0", "3", "11"])); + } + + #[test] + fn re_captures() { + named!(rm< &str,Vec> >, re_captures!(r"([:alpha:]+)\s+((\d+).(\d+).(\d+))")); + assert_eq!(rm("blah nom 0.3.11pouet"), Done("pouet", vec![vec!["nom 0.3.11", "nom", "0.3.11", "0", "3", "11"]])); + assert_eq!(rm("blah"), Error(Code(ErrorKind::RegexpCapture))); + assert_eq!(rm("hello nom 0.3.11 world regex 0.1.41 aaa"), Done(" aaa", vec![ + vec!["nom 0.3.11", "nom", "0.3.11", "0", "3", "11"], + vec!["regex 0.1.41", "regex", "0.1.41", "0", "1", "41"], + ])); + } + + #[cfg(feature = "regexp_macros")] + #[test] + fn re_captures_static() { + named!(rm< &str,Vec> >, re_captures_static!(r"([:alpha:]+)\s+((\d+).(\d+).(\d+))")); + assert_eq!(rm("blah nom 0.3.11pouet"), Done("pouet", vec![vec!["nom 0.3.11", "nom", "0.3.11", "0", "3", "11"]])); + assert_eq!(rm("blah"), Error(Code(ErrorKind::RegexpCapture))); + assert_eq!(rm("hello nom 0.3.11 world regex 0.1.41 aaa"), Done(" aaa", vec![ + vec!["nom 0.3.11", "nom", "0.3.11", "0", "3", "11"], + vec!["regex 0.1.41", "regex", "0.1.41", "0", "1", "41"], + ])); + } + +} diff --git a/deps/nom-1.2.2/src/str.rs b/deps/nom-1.2.2/src/str.rs new file mode 100644 index 000000000..768786eda --- /dev/null +++ b/deps/nom-1.2.2/src/str.rs @@ -0,0 +1,734 @@ +//! Parsers and helper functions operating on strings, especially useful when writing parsers for +//! text-based formats. + +/// `tag_s!(&str) => &str -> IResult<&str, &str>` +/// declares a string as a suite to recognize +/// +/// consumes the recognized characters +/// +/// ``` +/// # #[macro_use] extern crate nom; +/// # use nom::IResult::{self,Done}; +/// # fn main() { +/// fn test(input: &str) -> IResult<&str, &str> { +/// tag_s!(input, "abcd") +/// } +/// let r = test("abcdefgh"); +/// assert_eq!(r, Done("efgh", "abcd")); +/// # } +/// ``` +#[macro_export] +macro_rules! tag_s ( + ($i:expr, $tag: expr) => ( + { + let res: $crate::IResult<_,_> = if $tag.len() > $i.len() { + $crate::IResult::Incomplete($crate::Needed::Size($tag.len())) + //} else if &$i[0..$tag.len()] == $tag { + } else if ($i).starts_with($tag) { + $crate::IResult::Done(&$i[$tag.len()..], &$i[0..$tag.len()]) + } else { + $crate::IResult::Error($crate::Err::Position($crate::ErrorKind::TagStr, $i)) + }; + res + } + ); +); + +/// `take_s!(nb) => &str -> IResult<&str, &str>` +/// generates a parser consuming the specified number of characters +/// +/// ``` +/// # #[macro_use] extern crate nom; +/// # use nom::IResult::Done; +/// # fn main() { +/// // Desmond parser +/// named!(take5<&str,&str>, take_s!( 5 ) ); +/// +/// let a = "abcdefgh"; +/// +/// assert_eq!(take5(a), Done("fgh", "abcde")); +/// # } +/// ``` +#[macro_export] +macro_rules! take_s ( + ($i:expr, $count:expr) => ( + { + let cnt = $count as usize; + let res: $crate::IResult<_,_> = if $i.chars().count() < cnt { + $crate::IResult::Incomplete($crate::Needed::Size(cnt)) + } else { + let mut offset = $i.len(); + let mut count = 0; + for (o, _) in $i.char_indices() { + if count == cnt { + offset = o; + break; + } + count += 1; + } + $crate::IResult::Done(&$i[offset..], &$i[..offset]) + }; + res + } + ); +); + + +/// `is_not_s!(&str) => &str -> IResult<&str, &str>` +/// returns the longest list of characters that do not appear in the provided array +/// +/// ``` +/// # #[macro_use] extern crate nom; +/// # use nom::IResult::Done; +/// # fn main() { +/// named!( not_space<&str,&str>, is_not_s!( " \t\r\n" ) ); +/// +/// let r = not_space("abcdefgh\nijkl"); +/// assert_eq!(r, Done("\nijkl", "abcdefgh")); +/// # } +/// ``` +#[macro_export] +macro_rules! is_not_s ( + ($input:expr, $arr:expr) => ( + { + use std::collections::HashSet; + let set: HashSet = $arr.chars().collect(); + let mut offset = $input.len(); + for (o, c) in $input.char_indices() { + if set.contains(&c) { + offset = o; + break; + } + } + if offset == 0 { + $crate::IResult::Error($crate::Err::Position($crate::ErrorKind::IsAStr,$input)) + } else if offset < $input.len() { + $crate::IResult::Done(&$input[offset..], &$input[..offset]) + } else { + $crate::IResult::Done("", $input) + } + } + ); +); + +/// `is_a_s!(&str) => &str -> IResult<&str, &str>` +/// returns the longest list of characters that appear in the provided array +/// +/// ``` +/// # #[macro_use] extern crate nom; +/// # use nom::IResult::Done; +/// # fn main() { +/// named!(abcd<&str, &str>, is_a_s!( "abcd" )); +/// +/// let r1 = abcd("aaaaefgh"); +/// assert_eq!(r1, Done("efgh", "aaaa")); +/// +/// let r2 = abcd("dcbaefgh"); +/// assert_eq!(r2, Done("efgh", "dcba")); +/// # } +/// ``` +#[macro_export] +macro_rules! is_a_s ( + ($input:expr, $arr:expr) => ( + { + use std::collections::HashSet; + let set: HashSet = $arr.chars().collect(); + let mut offset = $input.len(); + for (o, c) in $input.char_indices() { + if !set.contains(&c) { + offset = o; + break; + } + } + if offset == 0 { + $crate::IResult::Error($crate::Err::Position($crate::ErrorKind::IsAStr,$input)) + } else if offset < $input.len() { + $crate::IResult::Done(&$input[offset..], &$input[..offset]) + } else { + $crate::IResult::Done("", $input) + } + } + ); +); + + +/// `take_while_s!(char -> bool) => &str -> IResult<&str, &str>` +/// returns the longest list of characters until the provided function fails. +/// +/// The argument is either a function `char -> bool` or a macro returning a `bool +/// +/// ``` +/// # #[macro_use] extern crate nom; +/// # use nom::IResult::Done; +/// # use nom::is_alphanumeric; +/// # fn main() { +/// fn alphabetic(chr: char) -> bool { (chr >= 0x41 as char && chr <= 0x5A as char) || (chr >= 0x61 as char && chr <= 0x7A as char) } +/// named!( alpha<&str,&str>, take_while_s!( alphabetic ) ); +/// +/// let r = alpha("abcd\nefgh"); +/// assert_eq!(r, Done("\nefgh", "abcd")); +/// # } +/// ``` +#[macro_export] +macro_rules! take_while_s ( + ($input:expr, $submac:ident!( $($args:tt)* )) => ( + { + let mut offset = $input.len(); + for (o, c) in $input.char_indices() { + if !$submac!(c, $($args)*) { + offset = o; + break; + } + } + if offset < $input.len() { + $crate::IResult::Done(&$input[offset..], &$input[..offset]) + } else { + $crate::IResult::Done("", $input) + } + } + ); + ($input:expr, $f:expr) => ( + take_while_s!($input, call!($f)); + ); +); + +/// `take_while1_s!(char -> bool) => &str -> IResult<&str, &str>` +/// returns the longest (non empty) list of characters until the provided function fails. +/// +/// The argument is either a function `char -> bool` or a macro returning a `bool` +/// ``` +/// # #[macro_use] extern crate nom; +/// # use nom::IResult::Done; +/// # use nom::is_alphanumeric; +/// # fn main() { +/// fn alphabetic(chr: char) -> bool { (chr >= 0x41 as char && chr <= 0x5A as char) || (chr >= 0x61 as char && chr <= 0x7A as char) } +/// named!( alpha<&str,&str>, take_while1_s!( alphabetic ) ); +/// +/// let r = alpha("abcd\nefgh"); +/// assert_eq!(r, Done("\nefgh", "abcd")); +/// # } +/// ``` +#[macro_export] +macro_rules! take_while1_s ( + ($input:expr, $submac:ident!( $($args:tt)* )) => ( + { + let mut offset = $input.len(); + for (o, c) in $input.char_indices() { + if !$submac!(c, $($args)*) { + offset = o; + break; + } + } + if offset == 0 { + $crate::IResult::Error($crate::Err::Position($crate::ErrorKind::TakeWhile1Str,$input)) + } else if offset < $input.len() { + $crate::IResult::Done(&$input[offset..], &$input[..offset]) + } else { + $crate::IResult::Done("", $input) + } + } + ); + ($input:expr, $f:expr) => ( + take_while1_s!($input, call!($f)); + ); +); + + +/// `take_till_s!(&str -> bool) => &str -> IResult<&str, &str>` +/// returns the longest list of characters until the provided function succeeds +/// +/// The argument is either a function `char -> bool` or a macro returning a `bool +#[macro_export] +macro_rules! take_till_s ( + ($input:expr, $submac:ident!( $($args:tt)* )) => ( + + { + let mut offset = $input.len(); + for (o, c) in $input.char_indices() { + if $submac!(c, $($args)*) { + offset = o; + break; + } + } + if offset < $input.len() { + $crate::IResult::Done(&$input[offset..], &$input[..offset]) + } else { + $crate::IResult::Done("", $input) + } + } + ); + ($input:expr, $f:expr) => ( + take_till_s!($input, call!($f)); + ); +); + +/// `take_until_and_consume_s!(&str) => &str -> IResult<&str, &str>` +/// generates a parser consuming all chars until the specified string is found and consumes it +#[macro_export] +macro_rules! take_until_and_consume_s ( + ($input:expr, $substr:expr) => ( + { + #[inline(always)] + fn shift_window_and_cmp(window: & mut ::std::vec::Vec, c: char, substr_vec: & ::std::vec::Vec) -> bool { + window.push(c); + if window.len() > substr_vec.len() { + window.remove(0); + } + window == substr_vec + } + let res: $crate::IResult<_, _> = if $substr.len() > $input.len() { + $crate::IResult::Incomplete($crate::Needed::Size($substr.len())) + } else { + let substr_vec: ::std::vec::Vec = $substr.chars().collect(); + let mut window: ::std::vec::Vec = vec![]; + let mut offset = $input.len(); + let mut parsed = false; + for (o, c) in $input.char_indices() { + if parsed { + // The easiest way to get the byte offset of the char after the found string + offset = o; + break; + } + if shift_window_and_cmp(& mut window, c, &substr_vec) { + parsed = true; + } + } + if parsed { + if offset < $input.len() { + $crate::IResult::Done(&$input[offset..], &$input[..offset]) + } else { + $crate::IResult::Done("", $input) + } + } else { + $crate::IResult::Error($crate::Err::Position($crate::ErrorKind::TakeUntilAndConsumeStr,$input)) + } + }; + res + } + ); +); + +/// `take_until_s!(&str) => &str -> IResult<&str, &str>` +/// generates a parser consuming all chars until the specified string is found and leaves it in the remaining input +#[macro_export] +macro_rules! take_until_s ( + ($input:expr, $substr:expr) => ( + { + #[inline(always)] + fn shift_window_and_cmp(window: & mut Vec, c: char, substr_vec: &Vec) -> bool { + window.push(c); + if window.len() > substr_vec.len() { + window.remove(0); + } + window == substr_vec + } + let res: $crate::IResult<&str, &str> = if $substr.len() > $input.len() { + $crate::IResult::Incomplete($crate::Needed::Size($substr.len())) + } else { + let substr_vec: Vec = $substr.chars().collect(); + let mut window: Vec = vec![]; + let mut offset = $input.len(); + let mut parsed = false; + for (o, c) in $input.char_indices() { + if shift_window_and_cmp(& mut window, c, &substr_vec) { + parsed = true; + window.pop(); + let window_len: usize = window.iter() + .map(|x| x.len_utf8()) + .fold(0, |x, y| x + y); + offset = o - window_len; + break; + } + } + if parsed { + $crate::IResult::Done(&$input[offset..], &$input[..offset]) + } else { + $crate::IResult::Error($crate::Err::Position($crate::ErrorKind::TakeUntilStr,$input)) + } + }; + res + } + ); +); + +#[cfg(test)] +mod test { + use ::IResult; + + #[test] + fn tag_str_succeed() { + const INPUT: &'static str = "Hello World!"; + const TAG: &'static str = "Hello"; + fn test(input: &str) -> IResult<&str, &str> { + tag_s!(input, TAG) + } + + match test(INPUT) { + IResult::Done(extra, output) => { + assert!(extra == " World!", "Parser `tag_s` consumed leftover input."); + assert!(output == TAG, + "Parser `tag_s` doesn't return the tag it matched on success. \ + Expected `{}`, got `{}`.", TAG, output); + }, + other => panic!("Parser `tag_s` didn't succeed when it should have. \ + Got `{:?}`.", other), + }; + } + + #[test] + fn tag_str_incomplete() { + const INPUT: &'static str = "Hello"; + const TAG: &'static str = "Hello World!"; + + match tag_s!(INPUT, TAG) { + IResult::Incomplete(_) => (), + other => { + panic!("Parser `tag_s` didn't require more input when it should have. \ + Got `{:?}`.", other); + } + }; + } + + #[test] + fn tag_str_error() { + const INPUT: &'static str = "Hello World!"; + const TAG: &'static str = "Random"; // TAG must be closer than INPUT. + + match tag_s!(INPUT, TAG) { + IResult::Error(_) => (), + other => { + panic!("Parser `tag_s` didn't fail when it should have. Got `{:?}`.`", other); + }, + }; + } + + #[test] + fn take_s_succeed() { + const INPUT: &'static str = "βèƒôřèÂßÇáƒƭèř"; + const CONSUMED: &'static str = "βèƒôřèÂßÇ"; + const LEFTOVER: &'static str = "áƒƭèř"; + + match take_s!(INPUT, 9) { + IResult::Done(extra, output) => { + assert!(extra == LEFTOVER, "Parser `take_s` consumed leftover input. Leftover `{}`.", extra); + assert!(output == CONSUMED, + "Parser `take_s` doens't return the string it consumed on success. Expected `{}`, got `{}`.", + CONSUMED, output); + }, + other => panic!("Parser `take_s` didn't succeed when it should have. \ + Got `{:?}`.", other), + }; + } + + #[test] + fn take_until_s_succeed() { + const INPUT: &'static str = "βèƒôřèÂßÇ∂áƒƭèř"; + const FIND: &'static str = "ÂßÇ∂"; + const CONSUMED: &'static str = "βèƒôřè"; + const LEFTOVER: &'static str = "ÂßÇ∂áƒƭèř"; + + match take_until_s!(INPUT, FIND) { + IResult::Done(extra, output) => { + assert!(extra == LEFTOVER, "Parser `take_until_s`\ + consumed leftover input. Leftover `{}`.", extra); + assert!(output == CONSUMED, "Parser `take_until_s`\ + doens't return the string it consumed on success. Expected `{}`, got `{}`.", + CONSUMED, output); + } + other => panic!("Parser `take_until_s` didn't succeed when it should have. \ + Got `{:?}`.", other), + }; + } + + #[test] + fn take_s_incomplete() { + const INPUT: &'static str = "βèƒôřèÂßÇá"; + + match take_s!(INPUT, 13) { + IResult::Incomplete(_) => (), + other => panic!("Parser `take_s` didn't require more input when it should have. \ + Got `{:?}`.", other), + } + } + + use internal::IResult::{Done, Error}; + use internal::Err::Position; + use util::ErrorKind; + + pub fn is_alphabetic(c:char) -> bool { + (c as u8 >= 0x41 && c as u8 <= 0x5A) || (c as u8 >= 0x61 && c as u8 <= 0x7A) + } + #[test] + fn take_while_s() { + named!(f<&str,&str>, take_while_s!(is_alphabetic)); + let a = ""; + let b = "abcd"; + let c = "abcd123"; + let d = "123"; + + assert_eq!(f(&a[..]), Done(&a[..], &a[..])); + assert_eq!(f(&b[..]), Done(&a[..], &b[..])); + assert_eq!(f(&c[..]), Done(&d[..], &b[..])); + assert_eq!(f(&d[..]), Done(&d[..], &a[..])); + } + + #[test] + fn take_while1_s() { + named!(f<&str,&str>, take_while1_s!(is_alphabetic)); + let a = ""; + let b = "abcd"; + let c = "abcd123"; + let d = "123"; + + assert_eq!(f(&a[..]), Error(Position(ErrorKind::TakeWhile1Str, &""[..]))); + assert_eq!(f(&b[..]), Done(&a[..], &b[..])); + assert_eq!(f(&c[..]), Done(&"123"[..], &b[..])); + assert_eq!(f(&d[..]), Error(Position(ErrorKind::TakeWhile1Str, &d[..]))); + } + + #[test] + fn take_till_s_succeed() { + const INPUT: &'static str = "βèƒôřèÂßÇáƒƭèř"; + const CONSUMED: &'static str = "βèƒôřèÂßÇ"; + const LEFTOVER: &'static str = "áƒƭèř"; + fn till_s(c: char) -> bool { + c == 'á' + } + fn test(input: &str) -> IResult<&str, &str> { + take_till_s!(input, till_s) + } + match test(INPUT) { + IResult::Done(extra, output) => { + assert!(extra == LEFTOVER, "Parser `take_till_s` consumed leftover input."); + assert!(output == CONSUMED, + "Parser `take_till_s` doesn't return the string it consumed on success. \ + Expected `{}`, got `{}`.", CONSUMED, output); + }, + other => panic!("Parser `take_till_s` didn't succeed when it should have. \ + Got `{:?}`.", other), + }; + } + + #[test] + fn take_while_s_succeed_none() { + const INPUT: &'static str = "βèƒôřèÂßÇáƒƭèř"; + const CONSUMED: &'static str = ""; + const LEFTOVER: &'static str = "βèƒôřèÂßÇáƒƭèř"; + fn while_s(c: char) -> bool { + c == '9' + } + fn test(input: &str) -> IResult<&str, &str> { + take_while_s!(input, while_s) + } + match test(INPUT) { + IResult::Done(extra, output) => { + assert!(extra == LEFTOVER, "Parser `take_while_s` consumed leftover input."); + assert!(output == CONSUMED, + "Parser `take_while_s` doesn't return the string it consumed on success. \ + Expected `{}`, got `{}`.", CONSUMED, output); + }, + other => panic!("Parser `take_while_s` didn't succeed when it should have. \ + Got `{:?}`.", other), + }; + } + + #[test] + fn is_not_s_succeed() { + const INPUT: &'static str = "βèƒôřèÂßÇáƒƭèř"; + const AVOID: &'static str = "£úçƙ¥á"; + const CONSUMED: &'static str = "βèƒôřèÂßÇ"; + const LEFTOVER: &'static str = "áƒƭèř"; + fn test(input: &str) -> IResult<&str, &str> { + is_not_s!(input, AVOID) + } + match test(INPUT) { + IResult::Done(extra, output) => { + assert!(extra == LEFTOVER, "Parser `is_not_s` consumed leftover input. Leftover `{}`.", extra); + assert!(output == CONSUMED, + "Parser `is_not_s` doens't return the string it consumed on success. Expected `{}`, got `{}`.", + CONSUMED, output); + }, + other => panic!("Parser `is_not_s` didn't succeed when it should have. \ + Got `{:?}`.", other), + }; + } + + #[test] + fn take_until_and_consume_s_succeed() { + const INPUT: &'static str = "βèƒôřèÂßÇáƒƭèř"; + const FIND: &'static str = "ÂßÇ"; + const CONSUMED: &'static str = "βèƒôřèÂßÇ"; + const LEFTOVER: &'static str = "áƒƭèř"; + + match take_until_and_consume_s!(INPUT, FIND) { + IResult::Done(extra, output) => { + assert!(extra == LEFTOVER, "Parser `take_until_and_consume_s`\ + consumed leftover input. Leftover `{}`.", extra); + assert!(output == CONSUMED, "Parser `take_until_and_consume_s`\ + doens't return the string it consumed on success. Expected `{}`, got `{}`.", + CONSUMED, output); + } + other => panic!("Parser `take_until_and_consume_s` didn't succeed when it should have. \ + Got `{:?}`.", other), + }; + } + + #[test] + fn take_while_s_succeed_some() { + const INPUT: &'static str = "βèƒôřèÂßÇáƒƭèř"; + const CONSUMED: &'static str = "βèƒôřèÂßÇ"; + const LEFTOVER: &'static str = "áƒƭèř"; + fn while_s(c: char) -> bool { + c == 'β' || c == 'è' || c == 'ƒ' || c == 'ô' || c == 'ř' || + c == 'è' || c == 'Â' || c == 'ß' || c == 'Ç' + } + fn test(input: &str) -> IResult<&str, &str> { + take_while_s!(input, while_s) + } + match test(INPUT) { + IResult::Done(extra, output) => { + assert!(extra == LEFTOVER, "Parser `take_while_s` consumed leftover input."); + assert!(output == CONSUMED, + "Parser `take_while_s` doesn't return the string it consumed on success. \ + Expected `{}`, got `{}`.", CONSUMED, output); + }, + other => panic!("Parser `take_while_s` didn't succeed when it should have. \ + Got `{:?}`.", other), + }; + } + + #[test] + fn is_not_s_fail() { + const INPUT: &'static str = "βèƒôřèÂßÇáƒƭèř"; + const AVOID: &'static str = "βúçƙ¥"; + fn test(input: &str) -> IResult<&str, &str> { + is_not_s!(input, AVOID) + } + match test(INPUT) { + IResult::Error(_) => (), + other => panic!("Parser `is_not_s` didn't fail when it should have. Got `{:?}`.", other), + }; + } + + #[test] + fn take_while1_s_succeed() { + const INPUT: &'static str = "βèƒôřèÂßÇáƒƭèř"; + const CONSUMED: &'static str = "βèƒôřèÂßÇ"; + const LEFTOVER: &'static str = "áƒƭèř"; + fn while1_s(c: char) -> bool { + c == 'β' || c == 'è' || c == 'ƒ' || c == 'ô' || c == 'ř' || + c == 'è' || c == 'Â' || c == 'ß' || c == 'Ç' + } + fn test(input: &str) -> IResult<&str, &str> { + take_while1_s!(input, while1_s) + } + match test(INPUT) { + IResult::Done(extra, output) => { + assert!(extra == LEFTOVER, "Parser `take_while1_s` consumed leftover input."); + assert!(output == CONSUMED, + "Parser `take_while1_s` doesn't return the string it consumed on success. \ + Expected `{}`, got `{}`.", CONSUMED, output); + }, + other => panic!("Parser `take_while1_s` didn't succeed when it should have. \ + Got `{:?}`.", other), + }; + } + + #[test] + fn take_until_and_consume_s_incomplete() { + const INPUT: &'static str = "βèƒôřè"; + const FIND: &'static str = "βèƒôřèÂßÇ"; + + match take_until_and_consume_s!(INPUT, FIND) { + IResult::Incomplete(_) => (), + other => panic!("Parser `take_until_and_consume_s` didn't require more input when it should have. \ + Got `{:?}`.", other), + }; + } + + #[test] + fn take_until_s_incomplete() { + const INPUT: &'static str = "βèƒôřè"; + const FIND: &'static str = "βèƒôřèÂßÇ"; + + match take_until_s!(INPUT, FIND) { + IResult::Incomplete(_) => (), + other => panic!("Parser `take_until_s` didn't require more input when it should have. \ + Got `{:?}`.", other), + }; + } + + #[test] + fn is_a_s_succeed() { + const INPUT: &'static str = "βèƒôřèÂßÇáƒƭèř"; + const MATCH: &'static str = "βèƒôřèÂßÇ"; + const CONSUMED: &'static str = "βèƒôřèÂßÇ"; + const LEFTOVER: &'static str = "áƒƭèř"; + fn test(input: &str) -> IResult<&str, &str> { + is_a_s!(input, MATCH) + } + match test(INPUT) { + IResult::Done(extra, output) => { + assert!(extra == LEFTOVER, "Parser `is_a_s` consumed leftover input. Leftover `{}`.", extra); + assert!(output == CONSUMED, + "Parser `is_a_s` doens't return the string it consumed on success. Expected `{}`, got `{}`.", + CONSUMED, output); + }, + other => panic!("Parser `is_a_s` didn't succeed when it should have. \ + Got `{:?}`.", other), + }; + } + + #[test] + fn take_while1_s_fail() { + const INPUT: &'static str = "βèƒôřèÂßÇáƒƭèř"; + fn while1_s(c: char) -> bool { + c == '9' + } + fn test(input: &str) -> IResult<&str, &str> { + take_while1_s!(input, while1_s) + } + match test(INPUT) { + IResult::Error(_) => (), + other => panic!("Parser `take_while1_s` didn't fail when it should have. \ + Got `{:?}`.", other), + }; + } + + #[test] + fn is_a_s_fail() { + const INPUT: &'static str = "βèƒôřèÂßÇáƒƭèř"; + const MATCH: &'static str = "Ûñℓúçƙ¥"; + fn test(input: &str) -> IResult<&str, &str> { + is_a_s!(input, MATCH) + } + match test(INPUT) { + IResult::Error(_) => (), + other => panic!("Parser `is_a_s` didn't fail when it should have. Got `{:?}`.", other), + }; + } + + #[test] + fn take_until_and_consume_s_error() { + const INPUT: &'static str = "βèƒôřèÂßÇáƒƭèř"; + const FIND: &'static str = "Ráñδô₥"; + + match take_until_and_consume_s!(INPUT, FIND) { + IResult::Error(_) => (), + other => panic!("Parser `take_until_and_consume_s` didn't fail when it should have. \ + Got `{:?}`.", other), + }; + } + + #[test] + fn take_until_s_error() { + const INPUT: &'static str = "βèƒôřèÂßÇáƒƭèř"; + const FIND: &'static str = "Ráñδô₥"; + + match take_until_s!(INPUT, FIND) { + IResult::Error(_) => (), + other => panic!("Parser `take_until_and_consume_s` didn't fail when it should have. \ + Got `{:?}`.", other), + }; + } +} diff --git a/deps/nom-1.2.0/src/stream.rs b/deps/nom-1.2.2/src/stream.rs similarity index 100% rename from deps/nom-1.2.0/src/stream.rs rename to deps/nom-1.2.2/src/stream.rs diff --git a/deps/nom-1.2.2/src/util.rs b/deps/nom-1.2.2/src/util.rs new file mode 100644 index 000000000..6750b0bbf --- /dev/null +++ b/deps/nom-1.2.2/src/util.rs @@ -0,0 +1,763 @@ +use internal::{IResult,Err}; + +#[cfg(not(feature = "core"))] +use std::collections::HashMap; + +#[cfg(feature = "core")] +use std::prelude::v1::*; +use std::vec::Vec; +use std::string::ToString; + +/// useful functions to calculate the offset between slices and show a hexdump of a slice +#[cfg(not(feature = "core"))] +pub trait HexDisplay { + /// offset between the first byte of self and the first byte of the argument + fn offset(&self, second:&[u8]) -> usize;// OFFSET SHOULD GO TO ITS OWN TRAIT + + /// Converts the value of `self` to a hex dump, returning the owned + /// string. + fn to_hex(&self, chunk_size: usize) -> String; + + /// Converts the value of `self` to a hex dump beginning at `from` address, returning the owned + /// string. + fn to_hex_from(&self, chunk_size: usize, from: usize) -> String; +} + +pub trait InputLength { + #[inline] + fn input_len(&self) -> usize; +} + +impl<'a, T> InputLength for &'a[T] { + #[inline] + fn input_len(&self) -> usize { + self.len() + } +} + +impl<'a> InputLength for &'a str { + #[inline] + fn input_len(&self) -> usize { + self.len() + } +} + +impl<'a> InputLength for (&'a [u8], usize) { + #[inline] + fn input_len(&self) -> usize { + //println!("bit input length for ({:?}, {}):", self.0, self.1); + let res = self.0.len() * 8 - self.1; + //println!("-> {}", res); + res + } +} + +use std::iter::Enumerate; +#[cfg(not(feature = "core"))] +use std::str::CharIndices; + +pub trait AsChar { + #[inline] + fn as_char(self) -> char; + #[inline] + fn is_alpha(self) -> bool; + #[inline] + fn is_alphanum(self) -> bool; + #[inline] + fn is_0_to_9(self) -> bool; + #[inline] + fn is_hex_digit(self) -> bool; + #[inline] + fn is_oct_digit(self) -> bool; +} + +impl<'a> AsChar for &'a u8 { + #[inline] + fn as_char(self) -> char { *self as char } + #[inline] + fn is_alpha(self) -> bool { + (*self >= 0x41 && *self <= 0x5A) || (*self >= 0x61 && *self <= 0x7A) + } + #[inline] + fn is_alphanum(self) -> bool { self.is_alpha() || self.is_0_to_9() } + #[inline] + fn is_0_to_9(self) -> bool { + *self >= 0x30 && *self <= 0x39 + } + #[inline] + fn is_hex_digit(self) -> bool { + (*self >= 0x30 && *self <= 0x39) || + (*self >= 0x41 && *self <= 0x46) || + (*self >= 0x61 && *self <= 0x66) + } + #[inline] + fn is_oct_digit(self) -> bool { + *self >= 0x30 && *self <= 0x37 + } +} + +impl AsChar for char { + #[inline] + fn as_char(self) -> char { self } + #[inline] + fn is_alpha(self) -> bool { self.is_alphabetic() } + #[inline] + fn is_alphanum(self) -> bool { self.is_alpha() || self.is_0_to_9() } + #[inline] + fn is_0_to_9(self) -> bool { self.is_digit(10) } + #[inline] + fn is_hex_digit(self) -> bool { self.is_digit(16) } + #[inline] + fn is_oct_digit(self) -> bool { self.is_digit(8) } +} + +pub trait IterIndices { + type Item: AsChar; + type Iter : Iterator; + fn iter_indices(self) -> Self::Iter; +} + +impl<'a> IterIndices for &'a [u8] { + type Item = &'a u8; + type Iter = Enumerate<::std::slice::Iter<'a, u8>>; + #[inline] + fn iter_indices(self) -> Enumerate<::std::slice::Iter<'a, u8>> { + self.iter().enumerate() + } +} + +#[cfg(not(feature = "core"))] +impl<'a> IterIndices for &'a str { + type Item = char; + type Iter = CharIndices<'a>; + #[inline] + fn iter_indices(self) -> CharIndices<'a> { + self.char_indices() + } +} + +static CHARS: &'static[u8] = b"0123456789abcdef"; + +#[cfg(not(feature = "core"))] +impl HexDisplay for [u8] { + fn offset(&self, second:&[u8]) -> usize { + let fst = self.as_ptr(); + let snd = second.as_ptr(); + + snd as usize - fst as usize + } + + #[allow(unused_variables)] + fn to_hex(&self, chunk_size: usize) -> String { + self.to_hex_from(chunk_size, 0) + } + + #[allow(unused_variables)] + fn to_hex_from(&self, chunk_size: usize, from: usize) -> String { + let mut v = Vec::with_capacity(self.len() * 3); + let mut i = from; + for chunk in self.chunks(chunk_size) { + let s = format!("{:08x}", i); + for &ch in s.as_bytes().iter() { + v.push(ch); + } + v.push('\t' as u8); + + i = i + chunk_size; + + for &byte in chunk { + v.push(CHARS[(byte >> 4) as usize]); + v.push(CHARS[(byte & 0xf) as usize]); + v.push(' ' as u8); + } + if chunk_size > chunk.len() { + for j in 0..(chunk_size - chunk.len()) { + v.push(' ' as u8); + v.push(' ' as u8); + v.push(' ' as u8); + } + } + v.push('\t' as u8); + + for &byte in chunk { + if (byte >=32 && byte <= 126) || byte >= 128 { + v.push(byte); + } else { + v.push('.' as u8); + } + } + v.push('\n' as u8); + } + + String::from_utf8_lossy(&v[..]).into_owned() + } +} + +/// Prints a message if the parser fails +/// +/// The message prints the `Error` or `Incomplete` +/// and the parser's calling code +/// +/// ``` +/// # #[macro_use] extern crate nom; +/// # fn main() { +/// named!(f, dbg!( tag!( "abcd" ) ) ); +/// +/// let a = &b"efgh"[..]; +/// +/// // Will print the following message: +/// // Error(Position(0, [101, 102, 103, 104])) at l.5 by ' tag ! ( "abcd" ) ' +/// f(a); +/// # } +/// ``` +#[macro_export] +macro_rules! dbg ( + ($i: expr, $submac:ident!( $($args:tt)* )) => ( + { + let l = line!(); + match $submac!($i, $($args)*) { + $crate::IResult::Error(a) => { + println!("Error({:?}) at l.{} by ' {} '", a, l, stringify!($submac!($($args)*))); + $crate::IResult::Error(a) + }, + $crate::IResult::Incomplete(a) => { + println!("Incomplete({:?}) at {} by ' {} '", a, l, stringify!($submac!($($args)*))); + $crate::IResult::Incomplete(a) + }, + a => a + } + } + ); + + ($i:expr, $f:ident) => ( + dbg!($i, call!($f)); + ); +); + +/// Prints a message and the input if the parser fails +/// +/// The message prints the `Error` or `Incomplete` +/// and the parser's calling code. +/// +/// It also displays the input in hexdump format +/// +/// ``` +/// # #[macro_use] extern crate nom; +/// # fn main() { +/// named!(f, dbg_dmp!( tag!( "abcd" ) ) ); +/// +/// let a = &b"efghijkl"[..]; +/// +/// // Will print the following message: +/// // Error(Position(0, [101, 102, 103, 104, 105, 106, 107, 108])) at l.5 by ' tag ! ( "abcd" ) ' +/// // 00000000 65 66 67 68 69 6a 6b 6c efghijkl +/// f(a); +/// # } +#[macro_export] +macro_rules! dbg_dmp ( + ($i: expr, $submac:ident!( $($args:tt)* )) => ( + { + use $crate::HexDisplay; + let l = line!(); + match $submac!($i, $($args)*) { + $crate::IResult::Error(a) => { + println!("Error({:?}) at l.{} by ' {} '\n{}", a, l, stringify!($submac!($($args)*)), $i.to_hex(8)); + $crate::IResult::Error(a) + }, + $crate::IResult::Incomplete(a) => { + println!("Incomplete({:?}) at {} by ' {} '\n{}", a, l, stringify!($submac!($($args)*)), $i.to_hex(8)); + $crate::IResult::Incomplete(a) + }, + a => a + } + } + ); + + ($i:expr, $f:ident) => ( + dbg_dmp!($i, call!($f)); + ); +); + +pub fn error_to_list(e:&Err) -> Vec> { + let mut v:Vec> = Vec::new(); + let mut err = e; + loop { + match *err { + Err::Code(ref i) | Err::Position(ref i,_) => { + v.push(i.clone()); + return v; + }, + Err::Node(ref i, ref next) | Err::NodePosition(ref i, _, ref next) => { + v.push(i.clone()); + err = &*next; + } + } + } +} + +pub fn compare_error_paths(e1:&Err, e2:&Err) -> bool { + error_to_list(e1) == error_to_list(e2) +} + + +#[cfg(not(feature = "core"))] +use std::hash::Hash; + +#[cfg(not(feature = "core"))] +pub fn add_error_pattern<'a,I,O,E: Clone+Hash+Eq>(h: &mut HashMap>, &'a str>, res: IResult, message: &'a str) -> bool { + if let IResult::Error(e) = res { + h.insert(error_to_list(&e), message); + true + } else { + false + } +} + +pub fn slice_to_offsets(input: &[u8], s: &[u8]) -> (usize, usize) { + let start = input.as_ptr(); + let off1 = s.as_ptr() as usize - start as usize; + let off2 = off1 + s.len(); + (off1, off2) +} + +#[cfg(not(feature = "core"))] +pub fn prepare_errors(input: &[u8], res: IResult<&[u8],O,E>) -> Option, usize, usize)> > { + if let IResult::Error(e) = res { + let mut v:Vec<(ErrorKind, usize, usize)> = Vec::new(); + let mut err = e.clone(); + loop { + match err { + Err::Position(i,s) => { + let (o1, o2) = slice_to_offsets(input, s); + v.push((i, o1, o2)); + //println!("v is: {:?}", v); + break; + }, + Err::NodePosition(i, s, next) => { + let (o1, o2) = slice_to_offsets(input, s); + v.push((i, o1, o2)); + err = *next; + }, + Err::Node(_, next) => { + err = *next; + }, + Err::Code(_) => { + break; + } + } + } + v.sort_by(|a, b| a.1.cmp(&b.1)); + Some(v) + } else { + None + } +} + +#[cfg(not(feature = "core"))] +pub fn print_error(input: &[u8], res: IResult<&[u8],O,E>) { + if let Some(v) = prepare_errors(input, res) { + let colors = generate_colors(&v); + println!("parser codes: {}", print_codes(colors, HashMap::new())); + println!("{}", print_offsets(input, 0, &v)); + + } else { + println!("not an error"); + } +} + +#[cfg(not(feature = "core"))] +pub fn generate_colors(v: &[(ErrorKind, usize, usize)]) -> HashMap { + let mut h: HashMap = HashMap::new(); + let mut color = 0; + + for &(ref c,_,_) in v.iter() { + h.insert(error_to_u32(c), color + 31); + color = color + 1 % 7; + } + + h +} + +pub fn code_from_offset(v: &[(ErrorKind, usize, usize)], offset: usize) -> Option { + let mut acc: Option<(u32, usize, usize)> = None; + for &(ref ek, s, e) in v.iter() { + let c = error_to_u32(ek); + if s <= offset && offset <=e { + if let Some((_, start, end)) = acc { + if start <= s && e <= end { + acc = Some((c, s, e)); + } + } else { + acc = Some((c, s, e)); + } + } + } + if let Some((code, _, _)) = acc { + return Some(code); + } else { + return None; + } +} + +pub fn reset_color(v: &mut Vec) { + v.push(0x1B); + v.push('[' as u8); + v.push(0); + v.push('m' as u8); +} + +pub fn write_color(v: &mut Vec, color: u8) { + v.push(0x1B); + v.push('[' as u8); + v.push(1); + v.push(';' as u8); + let s = color.to_string(); + let bytes = s.as_bytes(); + v.extend(bytes.iter().cloned()); + v.push('m' as u8); +} + +#[cfg(not(feature = "core"))] +pub fn print_codes(colors: HashMap, names: HashMap) -> String { + let mut v = Vec::new(); + for (code, &color) in &colors { + if let Some(&s) = names.get(&code) { + let bytes = s.as_bytes(); + write_color(&mut v, color); + v.extend(bytes.iter().cloned()); + } else { + let s = code.to_string(); + let bytes = s.as_bytes(); + write_color(&mut v, color); + v.extend(bytes.iter().cloned()); + } + reset_color(&mut v); + v.push(' ' as u8); + } + reset_color(&mut v); + + String::from_utf8_lossy(&v[..]).into_owned() +} + +#[cfg(not(feature = "core"))] +pub fn print_offsets(input: &[u8], from: usize, offsets: &[(ErrorKind, usize, usize)]) -> String { + let mut v = Vec::with_capacity(input.len() * 3); + let mut i = from; + let chunk_size = 8; + let mut current_code: Option = None; + let mut current_code2: Option = None; + + let colors = generate_colors(&offsets); + + for chunk in input.chunks(chunk_size) { + let s = format!("{:08x}", i); + for &ch in s.as_bytes().iter() { + v.push(ch); + } + v.push('\t' as u8); + + let mut k = i; + let mut l = i; + for &byte in chunk { + if let Some(code) = code_from_offset(&offsets, k) { + if let Some(current) = current_code { + if current != code { + reset_color(&mut v); + current_code = Some(code); + if let Some(&color) = colors.get(&code) { + write_color(&mut v, color); + } + } + } else { + current_code = Some(code); + if let Some(&color) = colors.get(&code) { + write_color(&mut v, color); + } + } + } + v.push(CHARS[(byte >> 4) as usize]); + v.push(CHARS[(byte & 0xf) as usize]); + v.push(' ' as u8); + k = k + 1; + } + + reset_color(&mut v); + + if chunk_size > chunk.len() { + for _ in 0..(chunk_size - chunk.len()) { + v.push(' ' as u8); + v.push(' ' as u8); + v.push(' ' as u8); + } + } + v.push('\t' as u8); + + for &byte in chunk { + if let Some(code) = code_from_offset(&offsets, l) { + if let Some(current) = current_code2 { + if current != code { + reset_color(&mut v); + current_code2 = Some(code); + if let Some(&color) = colors.get(&code) { + write_color(&mut v, color); + } + } + } else { + current_code2 = Some(code); + if let Some(&color) = colors.get(&code) { + write_color(&mut v, color); + } + } + } + if (byte >=32 && byte <= 126) || byte >= 128 { + v.push(byte); + } else { + v.push('.' as u8); + } + l = l + 1; + } + reset_color(&mut v); + + v.push('\n' as u8); + i = i + chunk_size; + } + + String::from_utf8_lossy(&v[..]).into_owned() +} + +pub trait AsBytes { + fn as_bytes(&self) -> &[u8]; +} + +impl<'a> AsBytes for &'a str { + #[inline(always)] + fn as_bytes(&self) -> &[u8] { + str::as_bytes(self) + } +} + +impl AsBytes for str { + #[inline(always)] + fn as_bytes(&self) -> &[u8] { + str::as_bytes(self) + } +} + +impl<'a> AsBytes for &'a [u8] { + #[inline(always)] + fn as_bytes(&self) -> &[u8] { + *self + } +} + +impl AsBytes for [u8] { + #[inline(always)] + fn as_bytes(&self) -> &[u8] { + self + } +} + +macro_rules! array_impls { + ($($N:expr)+) => { + $( + impl<'a> AsBytes for &'a [u8; $N] { + #[inline(always)] + fn as_bytes(&self) -> &[u8] { + *self + } + } + + impl AsBytes for [u8; $N] { + #[inline(always)] + fn as_bytes(&self) -> &[u8] { + self + } + } + )+ + }; +} + + +array_impls! { + 0 1 2 3 4 5 6 7 8 9 + 10 11 12 13 14 15 16 17 18 19 + 20 21 22 23 24 25 26 27 28 29 + 30 31 32 +} + +/// indicates which parser returned an error +#[derive(Debug,PartialEq,Eq,Hash,Clone)] +pub enum ErrorKind { + Custom(E), + Tag, + MapRes, + MapOpt, + Alt, + IsNot, + IsA, + SeparatedList, + SeparatedNonEmptyList, + Many1, + Count, + TakeUntilAndConsume, + TakeUntil, + TakeUntilEitherAndConsume, + TakeUntilEither, + LengthValue, + TagClosure, + Alpha, + Digit, + HexDigit, + OctDigit, + AlphaNumeric, + Space, + MultiSpace, + LengthValueFn, + Eof, + ExprOpt, + ExprRes, + CondReduce, + Switch, + TagBits, + OneOf, + NoneOf, + Char, + CrLf, + RegexpMatch, + RegexpMatches, + RegexpFind, + RegexpCapture, + RegexpCaptures, + TakeWhile1, + Complete, + Fix, + Escaped, + EscapedTransform, + TagStr, + IsNotStr, + IsAStr, + TakeWhile1Str, + NonEmpty, + ManyMN, + TakeUntilAndConsumeStr, + TakeUntilStr, +} + +pub fn error_to_u32(e: &ErrorKind) -> u32 { + match *e { + ErrorKind::Custom(_) => 0, + ErrorKind::Tag => 1, + ErrorKind::MapRes => 2, + ErrorKind::MapOpt => 3, + ErrorKind::Alt => 4, + ErrorKind::IsNot => 5, + ErrorKind::IsA => 6, + ErrorKind::SeparatedList => 7, + ErrorKind::SeparatedNonEmptyList => 8, + ErrorKind::Many1 => 9, + ErrorKind::Count => 10, + ErrorKind::TakeUntilAndConsume => 11, + ErrorKind::TakeUntil => 12, + ErrorKind::TakeUntilEitherAndConsume => 13, + ErrorKind::TakeUntilEither => 14, + ErrorKind::LengthValue => 15, + ErrorKind::TagClosure => 16, + ErrorKind::Alpha => 17, + ErrorKind::Digit => 18, + ErrorKind::AlphaNumeric => 19, + ErrorKind::Space => 20, + ErrorKind::MultiSpace => 21, + ErrorKind::LengthValueFn => 22, + ErrorKind::Eof => 23, + ErrorKind::ExprOpt => 24, + ErrorKind::ExprRes => 25, + ErrorKind::CondReduce => 26, + ErrorKind::Switch => 27, + ErrorKind::TagBits => 28, + ErrorKind::OneOf => 29, + ErrorKind::NoneOf => 30, + ErrorKind::Char => 40, + ErrorKind::CrLf => 41, + ErrorKind::RegexpMatch => 42, + ErrorKind::RegexpMatches => 43, + ErrorKind::RegexpFind => 44, + ErrorKind::RegexpCapture => 45, + ErrorKind::RegexpCaptures => 46, + ErrorKind::TakeWhile1 => 47, + ErrorKind::Complete => 48, + ErrorKind::Fix => 49, + ErrorKind::Escaped => 50, + ErrorKind::EscapedTransform => 51, + ErrorKind::TagStr => 52, + ErrorKind::IsNotStr => 53, + ErrorKind::IsAStr => 54, + ErrorKind::TakeWhile1Str => 55, + ErrorKind::NonEmpty => 56, + ErrorKind::ManyMN => 57, + ErrorKind::TakeUntilAndConsumeStr => 58, + ErrorKind::HexDigit => 59, + ErrorKind::TakeUntilStr => 60, + ErrorKind::OctDigit => 61, + } +} + + impl ErrorKind { + pub fn description(&self) -> &str { + match *self { + ErrorKind::Custom(_) => "Custom error", + ErrorKind::Tag => "Tag", + ErrorKind::MapRes => "Map on Result", + ErrorKind::MapOpt => "Map on Option", + ErrorKind::Alt => "Alternative", + ErrorKind::IsNot => "IsNot", + ErrorKind::IsA => "IsA", + ErrorKind::SeparatedList => "Separated list", + ErrorKind::SeparatedNonEmptyList => "Separated non empty list", + ErrorKind::Many1 => "Many1", + ErrorKind::Count => "Count", + ErrorKind::TakeUntilAndConsume => "Take until and consume", + ErrorKind::TakeUntil => "Take until", + ErrorKind::TakeUntilEitherAndConsume => "Take until either and consume", + ErrorKind::TakeUntilEither => "Take until either", + ErrorKind::LengthValue => "Length followed by value", + ErrorKind::TagClosure => "Tag closure", + ErrorKind::Alpha => "Alphabetic", + ErrorKind::Digit => "Digit", + ErrorKind::AlphaNumeric => "AlphaNumeric", + ErrorKind::Space => "Space", + ErrorKind::MultiSpace => "Multiple spaces", + ErrorKind::LengthValueFn => "LengthValueFn", + ErrorKind::Eof => "End of file", + ErrorKind::ExprOpt => "Evaluate Option", + ErrorKind::ExprRes => "Evaluate Result", + ErrorKind::CondReduce => "Condition reduce", + ErrorKind::Switch => "Switch", + ErrorKind::TagBits => "Tag on bitstream", + ErrorKind::OneOf => "OneOf", + ErrorKind::NoneOf => "NoneOf", + ErrorKind::Char => "Char", + ErrorKind::CrLf => "CrLf", + ErrorKind::RegexpMatch => "RegexpMatch", + ErrorKind::RegexpMatches => "RegexpMatches", + ErrorKind::RegexpFind => "RegexpFind", + ErrorKind::RegexpCapture => "RegexpCapture", + ErrorKind::RegexpCaptures => "RegexpCaptures", + ErrorKind::TakeWhile1 => "TakeWhile1", + ErrorKind::Complete => "Complete", + ErrorKind::Fix => "Fix", + ErrorKind::Escaped => "Escaped", + ErrorKind::EscapedTransform => "EscapedTransform", + ErrorKind::TagStr => "Tag on strings", + ErrorKind::IsNotStr => "IsNot on strings", + ErrorKind::IsAStr => "IsA on strings", + ErrorKind::TakeWhile1Str => "TakeWhile1 on strings", + ErrorKind::NonEmpty => "NonEmpty", + ErrorKind::ManyMN => "Many(m, n)", + ErrorKind::TakeUntilAndConsumeStr => "Take until and consume on strings", + ErrorKind::HexDigit => "Hexadecimal Digit", + ErrorKind::TakeUntilStr => "Take until on strings", + ErrorKind::OctDigit => "Octal digit", + } + + } + } diff --git a/deps/nom-1.2.0/tests/arithmetic.rs b/deps/nom-1.2.2/tests/arithmetic.rs similarity index 100% rename from deps/nom-1.2.0/tests/arithmetic.rs rename to deps/nom-1.2.2/tests/arithmetic.rs diff --git a/deps/nom-1.2.2/tests/cross_function_backtracking.rs b/deps/nom-1.2.2/tests/cross_function_backtracking.rs new file mode 100644 index 000000000..edbf91032 --- /dev/null +++ b/deps/nom-1.2.2/tests/cross_function_backtracking.rs @@ -0,0 +1,142 @@ +/// this file tests a different backtracking behaviour. With the current +/// `error!` macro, an early return is done in the current function, but +/// backtracking continues normally outside of that function. +/// +/// The solution here wraps `IResult` in a `Result`: a `Ok` indicates usual +/// backtracking, `Err` indicates that we must "cut". + +#[macro_use] +extern crate nom; + +use nom::IResult; + +macro_rules! n ( + ($name:ident( $i:ty ) -> $o:ty, $submac:ident!( $($args:tt)* )) => ( + fn $name( i: $i ) -> std::result::Result, nom::Err<$i, u32>> { + std::result::Result::Ok($submac!(i, $($args)*)) + } + ); + ($name:ident<$i:ty,$o:ty,$e:ty>, $submac:ident!( $($args:tt)* )) => ( + fn $name( i: $i ) -> std::result::Result, nom::Err<$i, $e>> { + std::result::Result::Ok($submac!(i, $($args)*)) + } + ); + ($name:ident<$i:ty,$o:ty>, $submac:ident!( $($args:tt)* )) => ( + fn $name( i: $i ) -> std::result::Result, nom::Err<$i, u32>> { + std::result::Result::Ok($submac!(i, $($args)*)) + } + ); + ($name:ident<$o:ty>, $submac:ident!( $($args:tt)* )) => ( + fn $name<'a>( i: &'a[u8] ) -> std::result::Result, nom::Err<&'a [u8], u32>> { + std::result::Result::Ok($submac!(i, $($args)*)) + } + ); + ($name:ident, $submac:ident!( $($args:tt)* )) => ( + fn $name( i: &[u8] ) -> std::result::Result, nom::Err<&[u8], u32>> { + std::result::Result::Ok($submac!(i, $($args)*)) + } + ); + (pub $name:ident( $i:ty ) -> $o:ty, $submac:ident!( $($args:tt)* )) => ( + pub fn $name( i: $i ) -> std::result::Result, nom::Err<$i, u32>> { + std::result::Result::Ok($submac!(i, $($args)*)) + } + ); + (pub $name:ident<$i:ty,$o:ty,$e:ty>, $submac:ident!( $($args:tt)* )) => ( + pub fn $name( i: $i ) -> std::result::Result, nom::Err<$i, $e>> { + std::result::Result::Ok($submac!(i, $($args)*)) + } + ); + (pub $name:ident<$i:ty,$o:ty>, $submac:ident!( $($args:tt)* )) => ( + pub fn $name( i: $i ) -> std::result::Result, nom::Err<$i, u32>> { + std::result::Result::Ok($submac!(i, $($args)*)) + } + ); + (pub $name:ident<$o:ty>, $submac:ident!( $($args:tt)* )) => ( + pub fn $name( i: &[u8] ) -> std::result::Result, nom::Err<&[u8], u32>> { + std::result::Result::Ok($submac!(i, $($args)*)) + } + ); + (pub $name:ident, $submac:ident!( $($args:tt)* )) => ( + pub fn $name<'a>( i: &'a [u8] ) -> std::result::Result, nom::Err<&[u8], u32>> { + std::result::Result::Ok($submac!(i, $($args)*)) + } + ); +); + +macro_rules! cut ( + ($i:expr, $code:expr, $submac:ident!( $($args:tt)* )) => ( + { + let cl = || { + Ok($submac!($i, $($args)*)) + }; + + match cl() { + std::result::Result::Ok(nom::IResult::Incomplete(x)) => nom::IResult::Incomplete(x), + std::result::Result::Ok(nom::IResult::Done(i, o)) => nom::IResult::Done(i, o), + std::result::Result::Ok(nom::IResult::Error(e)) | std::result::Result::Err(e) => { + return std::result::Result::Err(nom::Err::NodePosition($code, $i, Box::new(e))) + } + } + } + ); + ($i:expr, $code:expr, $f:expr) => ( + cut!($i, $code, call!($f)); + ); +); + +macro_rules! c ( + ($i:expr, $f:expr) => ( + { + match $f($i) { + std::result::Result::Ok(nom::IResult::Incomplete(x)) => nom::IResult::Incomplete(x), + std::result::Result::Ok(nom::IResult::Done(i, o)) => nom::IResult::Done(i, o), + std::result::Result::Ok(nom::IResult::Error(e)) => nom::IResult::Error(e), + std::result::Result::Err(e) => { + return std::result::Result::Err(e) + } + } + } + ); +); + +n!(pub foo< bool >, + chain!( + tag!("a") ~ + cut!(nom::ErrorKind::Custom(42),dbg_dmp!(tag!("b"))) , + || { true } + ) +); + +n!(pub foos< Vec >, + delimited!( + tag!("("), + many0!(c!(foo)), + tag!(")") + ) +); + +#[test] +fn test_ok() { + let r = foos(b"(abab)"); + println!("result: {:?}", r); + match r { + Ok(nom::IResult::Done(_,result)) => assert_eq!(result,vec![true,true]), + res => panic!("Oops {:?}.",res) + } +} + +#[test] +fn test_err() { + let input = b"(ac)"; + let r = foos(&input[..]); + println!("result: {:?}", r); + match r { + //Ok(nom::IResult::Error(nom::Err::Position(kind,_))) => assert_eq!(kind,nom::ErrorKind::Custom(42)), + Err(nom::Err::NodePosition(kind, position, _)) => { + assert_eq!(kind, nom::ErrorKind::Custom(42)); + assert_eq!(position, &input[2..]); + } + res => panic!("Oops, {:?}",res) + } +} + diff --git a/deps/nom-1.2.0/tests/ini.rs b/deps/nom-1.2.2/tests/ini.rs similarity index 100% rename from deps/nom-1.2.0/tests/ini.rs rename to deps/nom-1.2.2/tests/ini.rs diff --git a/deps/nom-1.2.0/tests/ini_str.rs b/deps/nom-1.2.2/tests/ini_str.rs similarity index 100% rename from deps/nom-1.2.0/tests/ini_str.rs rename to deps/nom-1.2.2/tests/ini_str.rs diff --git a/deps/nom-1.2.0/tests/issues.rs b/deps/nom-1.2.2/tests/issues.rs similarity index 100% rename from deps/nom-1.2.0/tests/issues.rs rename to deps/nom-1.2.2/tests/issues.rs diff --git a/deps/nom-1.2.0/tests/mp4.rs b/deps/nom-1.2.2/tests/mp4.rs similarity index 100% rename from deps/nom-1.2.0/tests/mp4.rs rename to deps/nom-1.2.2/tests/mp4.rs diff --git a/deps/nom-1.2.0/tests/omnom.rs b/deps/nom-1.2.2/tests/omnom.rs similarity index 100% rename from deps/nom-1.2.0/tests/omnom.rs rename to deps/nom-1.2.2/tests/omnom.rs diff --git a/deps/nom-1.2.0/tests/test1.rs b/deps/nom-1.2.2/tests/test1.rs similarity index 100% rename from deps/nom-1.2.0/tests/test1.rs rename to deps/nom-1.2.2/tests/test1.rs diff --git a/deps/num_cpus-0.2.10/Cargo.toml b/deps/num_cpus-0.2.10/Cargo.toml deleted file mode 100644 index be66d73bc..000000000 --- a/deps/num_cpus-0.2.10/Cargo.toml +++ /dev/null @@ -1,14 +0,0 @@ -[package] - -name = "num_cpus" -version = "0.2.10" -description = "Get the number of CPUs on a machine." -authors = ["Sean McArthur "] -license = "MIT" -repository = "https://github.com/seanmonstar/num_cpus" - - -[dependencies] -libc = "0.2" -winapi = "0.2" -kernel32-sys = "0.2" diff --git a/deps/num_cpus-0.2.10/src/lib.rs b/deps/num_cpus-0.2.10/src/lib.rs deleted file mode 100644 index 52e830931..000000000 --- a/deps/num_cpus-0.2.10/src/lib.rs +++ /dev/null @@ -1,102 +0,0 @@ -//! Replaces the deprecated functionality of std::os::num_cpus. -#![cfg_attr(test, deny(warnings))] -#![deny(missing_docs)] -#![allow(non_snake_case)] - -extern crate libc; -#[cfg(windows)] -extern crate winapi; -#[cfg(windows)] -extern crate kernel32; - -/// Returns the number of CPUs of the current machine. -#[inline] -pub fn get() -> usize { - get_num_cpus() -} - -#[cfg(windows)] -fn get_num_cpus() -> usize { - unsafe { - let mut sysinfo: winapi::SYSTEM_INFO = ::std::mem::uninitialized(); - kernel32::GetSystemInfo(&mut sysinfo); - sysinfo.dwNumberOfProcessors as usize - } -} - -#[cfg( - any( - target_os = "freebsd", - target_os = "dragonfly", - target_os = "bitrig", - target_os = "openbsd", - target_os = "netbsd" - ) -)] -fn get_num_cpus() -> usize { - use libc::{c_int, c_uint}; - use libc::sysctl; - use std::ptr; - - //XXX: uplift to libc? - const CTL_HW: c_int = 6; - const HW_AVAILCPU: c_int = 25; - const HW_NCPU: c_int = 3; - - let mut cpus: c_uint = 0; - let mut CPUS_SIZE = ::std::mem::size_of::(); - let mut mib: [c_int; 4] = [CTL_HW, HW_AVAILCPU, 0, 0]; - - unsafe { - sysctl(mib.as_mut_ptr(), 2, - &mut cpus as *mut _ as *mut _, &mut CPUS_SIZE as *mut _ as *mut _, - ptr::null_mut(), 0); - } - - if cpus < 1 { - mib[1] = HW_NCPU; - unsafe { - sysctl(mib.as_mut_ptr(), 2, - &mut cpus as *mut _ as *mut _, &mut CPUS_SIZE as *mut _ as *mut _, - ptr::null_mut(), 0); - } - if cpus < 1 { - cpus = 1; - } - } - - cpus as usize -} - -#[cfg( - any( - target_os = "linux", - target_os = "nacl", - target_os = "macos", - target_os = "ios" - ) -)] -fn get_num_cpus() -> usize { - unsafe { - libc::sysconf(libc::_SC_NPROCESSORS_ONLN) as usize - } -} - -#[cfg(target_os= "android")] -fn get_num_cpus() -> usize { - //to-do: replace with libc::_SC_NPROCESSORS_ONLN once available - unsafe { - libc::sysconf(97) as usize - } -} - -#[test] -fn lower_bound() { - assert!(get() > 0); -} - - -#[test] -fn upper_bound() { - assert!(get() < 236_451); -} diff --git a/deps/toml-0.1.27/.gitignore b/deps/num_cpus-0.2.11/.gitignore similarity index 100% rename from deps/toml-0.1.27/.gitignore rename to deps/num_cpus-0.2.11/.gitignore diff --git a/deps/num_cpus-0.2.11/Cargo.toml b/deps/num_cpus-0.2.11/Cargo.toml new file mode 100644 index 000000000..8a72fa0da --- /dev/null +++ b/deps/num_cpus-0.2.11/Cargo.toml @@ -0,0 +1,12 @@ +[package] + +name = "num_cpus" +version = "0.2.11" +description = "Get the number of CPUs on a machine." +authors = ["Sean McArthur "] +license = "MIT" +repository = "https://github.com/seanmonstar/num_cpus" + + +[dependencies] +libc = "0.2" diff --git a/deps/num_cpus-0.2.10/LICENSE b/deps/num_cpus-0.2.11/LICENSE similarity index 100% rename from deps/num_cpus-0.2.10/LICENSE rename to deps/num_cpus-0.2.11/LICENSE diff --git a/deps/num_cpus-0.2.10/README.md b/deps/num_cpus-0.2.11/README.md similarity index 100% rename from deps/num_cpus-0.2.10/README.md rename to deps/num_cpus-0.2.11/README.md diff --git a/deps/num_cpus-0.2.11/src/lib.rs b/deps/num_cpus-0.2.11/src/lib.rs new file mode 100644 index 000000000..54b2c79ed --- /dev/null +++ b/deps/num_cpus-0.2.11/src/lib.rs @@ -0,0 +1,115 @@ +//! Replaces the deprecated functionality of std::os::num_cpus. +#![cfg_attr(test, deny(warnings))] +#![deny(missing_docs)] +#![allow(non_snake_case)] + +#[cfg(not(windows))] +extern crate libc; + +/// Returns the number of CPUs of the current machine. +#[inline] +pub fn get() -> usize { + get_num_cpus() +} + +#[cfg(windows)] +fn get_num_cpus() -> usize { + #[repr(C)] + struct SYSTEM_INFO { + wProcessorArchitecture: u16, + wReserved: u16, + dwPageSize: u32, + lpMinimumApplicationAddress: *mut u8, + lpMaximumApplicationAddress: *mut u8, + dwActiveProcessorMask: *mut u8, + dwNumberOfProcessors: u32, + dwProcessorType: u32, + dwAllocationGranularity: u32, + wProcessorLevel: u16, + wProcessorRevision: u16, + } + + extern "system" { + fn GetSystemInfo(lpSystemInfo: *mut SYSTEM_INFO); + } + + unsafe { + let mut sysinfo: SYSTEM_INFO = std::mem::uninitialized(); + GetSystemInfo(&mut sysinfo); + sysinfo.dwNumberOfProcessors as usize + } +} + +#[cfg(any(target_os = "freebsd", + target_os = "dragonfly", + target_os = "bitrig", + target_os = "netbsd"))] +fn get_num_cpus() -> usize { + let mut cpus: libc::c_uint = 0; + let mut cpus_size = std::mem::size_of_val(&cpus); + + unsafe { + cpus = libc::sysconf(libc::_SC_NPROCESSORS_ONLN) as libc::c_uint; + } + if cpus < 1 { + let mut mib = [libc::CTL_HW, libc::HW_NCPU, 0, 0]; + unsafe { + libc::sysctl(mib.as_mut_ptr(), + 2, + &mut cpus as *mut _ as *mut _, + &mut cpus_size as *mut _ as *mut _, + 0 as *mut _, + 0); + } + if cpus < 1 { + cpus = 1; + } + } + cpus as usize +} + +#[cfg(target_os = "openbsd")] +fn get_num_cpus() -> usize { + let mut cpus: libc::c_uint = 0; + let mut cpus_size = std::mem::size_of_val(&cpus); + let mut mib = [libc::CTL_HW, libc::HW_NCPU, 0, 0]; + + unsafe { + libc::sysctl(mib.as_mut_ptr(), + 2, + &mut cpus as *mut _ as *mut _, + &mut cpus_size as *mut _ as *mut _, + 0 as *mut _, + 0); + } + if cpus < 1 { + cpus = 1; + } + cpus as usize +} + +#[cfg( + any( + target_os = "linux", + target_os = "nacl", + target_os = "macos", + target_os = "ios", + target_os = "android", + ) +)] +fn get_num_cpus() -> usize { + unsafe { + libc::sysconf(libc::_SC_NPROCESSORS_ONLN) as usize + } +} + +#[test] +fn lower_bound() { + assert!(get() > 0); +} + + +#[test] +fn upper_bound() { + assert!(get() < 236_451); +} diff --git a/deps/openssl-sys-0.7.6/Cargo.toml b/deps/openssl-sys-0.7.6/Cargo.toml deleted file mode 100644 index c84101042..000000000 --- a/deps/openssl-sys-0.7.6/Cargo.toml +++ /dev/null @@ -1,54 +0,0 @@ -[package] -name = "openssl-sys" -version = "0.7.6" -authors = ["Alex Crichton ", - "Steven Fackler "] -license = "MIT" -description = "FFI bindings to OpenSSL" -repository = "https://github.com/sfackler/rust-openssl" -documentation = "https://sfackler.github.io/rust-openssl/doc/v0.7.6/openssl_sys" -links = "openssl" -build = "build.rs" - -[features] -tlsv1_2 = [] -tlsv1_1 = [] -dtlsv1 = [] -dtlsv1_2 = [] -sslv2 = [] -sslv3 = [] -aes_xts = [] -aes_ctr = [] -npn = [] -alpn = [] -rfc5114 = [] -pkcs5_pbkdf2_hmac = [] - -[dependencies] -libc = "0.2" - -[build-dependencies] -pkg-config = "0.3" - -[target.le32-unknown-nacl.dependencies] -libressl-pnacl-sys = "2.1.0" -[target.x86_64-unknown-nacl.dependencies] -libressl-pnacl-sys = "2.1.0" -[target.i686-unknown-nacl.dependencies] -libressl-pnacl-sys = "2.1.0" -[target.arm-unknown-nacl.dependencies] -libressl-pnacl-sys = "2.1.0" - -# Only here to make sure we link to these in a static build on Windows -[target.i686-pc-windows-gnu.dependencies] -user32-sys = "0.1" -gdi32-sys = "0.1" -[target.x86_64-pc-windows-gnu.dependencies] -user32-sys = "0.1" -gdi32-sys = "0.1" -[target.i686-pc-windows-msvc.dependencies] -user32-sys = "0.1" -gdi32-sys = "0.1" -[target.x86_64-pc-windows-msvc.dependencies] -user32-sys = "0.1" -gdi32-sys = "0.1" diff --git a/deps/openssl-sys-0.7.6/src/lib.rs b/deps/openssl-sys-0.7.6/src/lib.rs deleted file mode 100644 index eb2717f39..000000000 --- a/deps/openssl-sys-0.7.6/src/lib.rs +++ /dev/null @@ -1,762 +0,0 @@ -#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] -#![allow(dead_code)] -#![doc(html_root_url="https://sfackler.github.io/rust-openssl/doc/v0.7.6")] - -extern crate libc; - -#[cfg(target_os = "nacl")] -extern crate libressl_pnacl_sys; - -use libc::{c_void, c_int, c_char, c_ulong, c_long, c_uint, c_uchar, size_t}; -use std::mem; -use std::sync::{Mutex, MutexGuard}; -use std::sync::{Once, ONCE_INIT}; - -pub type ASN1_INTEGER = c_void; -pub type ASN1_STRING = c_void; -pub type ASN1_TIME = c_void; -pub type BN_CTX = c_void; -pub type COMP_METHOD = c_void; -pub type DH = c_void; -pub type ENGINE = c_void; -pub type EVP_CIPHER = c_void; -pub type EVP_CIPHER_CTX = c_void; -pub type EVP_MD = c_void; -pub type EVP_PKEY_CTX = c_void; -pub type SSL = c_void; -pub type SSL_CTX = c_void; -pub type SSL_METHOD = c_void; -pub type X509 = c_void; -pub type X509_CRL = c_void; -pub type X509_EXTENSION = c_void; -pub type X509_NAME = c_void; -pub type X509_NAME_ENTRY = c_void; -pub type X509_REQ = c_void; -pub type X509_STORE_CTX = c_void; -pub type stack_st_X509_EXTENSION = c_void; -pub type stack_st_void = c_void; -pub type bio_st = c_void; - -pub type bio_info_cb = Option; - -#[repr(C)] -#[derive(Copy, Clone)] -pub struct BIO_METHOD { - pub type_: c_int, - pub name: *const c_char, - pub bwrite: Option c_int>, - pub bread: Option c_int>, - pub bputs: Option c_int>, - pub bgets: Option c_int>, - pub ctrl: Option c_long>, - pub create: Option c_int>, - pub destroy: Option c_int>, - pub callback_ctrl: Option c_long>, -} - -// so we can create static BIO_METHODs -unsafe impl Sync for BIO_METHOD {} - -#[repr(C)] -pub struct RSA { - pub pad: c_int, - pub version: c_long, - pub meth: *const c_void, - - pub engine: *mut c_void, - pub n: *mut BIGNUM, - pub e: *mut BIGNUM, - pub d: *mut BIGNUM, - pub p: *mut BIGNUM, - pub q: *mut BIGNUM, - pub dmp1: *mut BIGNUM, - pub dmq1: *mut BIGNUM, - pub iqmp: *mut BIGNUM, - - pub ex_data: *mut c_void, - pub references: c_int, - pub flags: c_int, - - pub _method_mod_n: *mut c_void, - pub _method_mod_p: *mut c_void, - pub _method_mod_q: *mut c_void, - - pub bignum_data: *mut c_char, - pub blinding: *mut c_void, - pub mt_blinding: *mut c_void, -} - -#[repr(C)] -pub struct EVP_PKEY { - pub type_: c_int, - pub save_type: c_int, - pub references: c_int, - pub ameth: *const c_void, - pub engine: *mut ENGINE, - pub pkey: *mut c_void, - pub save_parameters: c_int, - pub attributes: *mut c_void, -} - -#[repr(C)] -pub struct BIO { - pub method: *mut BIO_METHOD, - pub callback: Option c_long>, - pub cb_arg: *mut c_char, - pub init: c_int, - pub shutdown: c_int, - pub flags: c_int, - pub retry_reason: c_int, - pub num: c_int, - pub ptr: *mut c_void, - pub next_bio: *mut BIO, - pub prev_bio: *mut BIO, - pub references: c_int, - pub num_read: c_ulong, - pub num_write: c_ulong, - pub ex_data: CRYPTO_EX_DATA, -} - -#[repr(C)] -pub struct CRYPTO_EX_DATA { - pub sk: *mut stack_st_void, - pub dummy: c_int, -} - -#[repr(C)] -pub struct EVP_MD_CTX { - digest: *mut EVP_MD, - engine: *mut c_void, - flags: c_ulong, - md_data: *mut c_void, - pctx: *mut EVP_PKEY_CTX, - update: *mut c_void -} - -impl Copy for EVP_MD_CTX {} -impl Clone for EVP_MD_CTX { - fn clone(&self) -> EVP_MD_CTX { *self } -} - -#[repr(C)] -pub struct HMAC_CTX { - md: *mut EVP_MD, - md_ctx: EVP_MD_CTX, - i_ctx: EVP_MD_CTX, - o_ctx: EVP_MD_CTX, - key_length: c_uint, - key: [c_uchar; 128] -} - -impl Copy for HMAC_CTX {} -impl Clone for HMAC_CTX { - fn clone(&self) -> HMAC_CTX { *self } -} - -#[repr(C)] -pub struct X509V3_CTX { - flags: c_int, - issuer_cert: *mut c_void, - subject_cert: *mut c_void, - subject_req: *mut c_void, - crl: *mut c_void, - db_meth: *mut c_void, - db: *mut c_void, - // I like the last comment line, it is copied from OpenSSL sources: - // Maybe more here -} - -impl Copy for X509V3_CTX {} -impl Clone for X509V3_CTX { - fn clone(&self) -> X509V3_CTX { *self } -} - -#[repr(C)] -pub struct BIGNUM { - pub d: *mut c_void, - pub top: c_int, - pub dmax: c_int, - pub neg: c_int, - pub flags: c_int, -} - -impl Copy for BIGNUM {} -impl Clone for BIGNUM { - fn clone(&self) -> BIGNUM { *self } -} - -pub type CRYPTO_EX_new = extern "C" fn(parent: *mut c_void, ptr: *mut c_void, - ad: *const CRYPTO_EX_DATA, idx: c_int, - argl: c_long, argp: *const c_void) -> c_int; -pub type CRYPTO_EX_dup = extern "C" fn(to: *mut CRYPTO_EX_DATA, - from: *mut CRYPTO_EX_DATA, from_d: *mut c_void, - idx: c_int, argl: c_long, argp: *mut c_void) - -> c_int; -pub type CRYPTO_EX_free = extern "C" fn(parent: *mut c_void, ptr: *mut c_void, - ad: *mut CRYPTO_EX_DATA, idx: c_int, - argl: c_long, argp: *mut c_void); -pub type PasswordCallback = extern "C" fn(buf: *mut c_char, size: c_int, - rwflag: c_int, user_data: *mut c_void) - -> c_int; - -pub const BIO_TYPE_NONE: c_int = 0; - -pub const BIO_CTRL_EOF: c_int = 2; -pub const BIO_CTRL_FLUSH: c_int = 11; -pub const BIO_C_SET_BUF_MEM_EOF_RETURN: c_int = 130; - -pub const CRYPTO_LOCK: c_int = 1; - -pub const MBSTRING_ASC: c_int = MBSTRING_FLAG | 1; -pub const MBSTRING_BMP: c_int = MBSTRING_FLAG | 2; -pub const MBSTRING_FLAG: c_int = 0x1000; -pub const MBSTRING_UNIV: c_int = MBSTRING_FLAG | 4; -pub const MBSTRING_UTF8: c_int = MBSTRING_FLAG; - -pub const NID_ext_key_usage: c_int = 126; -pub const NID_key_usage: c_int = 83; - -pub const PKCS5_SALT_LEN: c_int = 8; - -pub const SSL_CTRL_OPTIONS: c_int = 32; -pub const SSL_CTRL_CLEAR_OPTIONS: c_int = 77; - -pub const SSL_CTRL_SET_TLSEXT_SERVERNAME_CB: c_int = 53; -pub const SSL_CTRL_SET_TLSEXT_SERVERNAME_ARG: c_int = 54; -pub const SSL_CTRL_SET_TLSEXT_HOSTNAME: c_int = 55; -pub const SSL_CTRL_EXTRA_CHAIN_CERT: c_int = 14; - -pub const SSL_CTRL_SET_READ_AHEAD: c_int = 41; -pub const SSL_ERROR_NONE: c_int = 0; -pub const SSL_ERROR_SSL: c_int = 1; -pub const SSL_ERROR_SYSCALL: c_int = 5; -pub const SSL_ERROR_WANT_ACCEPT: c_int = 8; -pub const SSL_ERROR_WANT_CONNECT: c_int = 7; -pub const SSL_ERROR_WANT_READ: c_int = 2; -pub const SSL_ERROR_WANT_WRITE: c_int = 3; -pub const SSL_ERROR_WANT_X509_LOOKUP: c_int = 4; -pub const SSL_ERROR_ZERO_RETURN: c_int = 6; -pub const SSL_VERIFY_NONE: c_int = 0; -pub const SSL_VERIFY_PEER: c_int = 1; -pub const SSL_VERIFY_FAIL_IF_NO_PEER_CERT: c_int = 2; - -pub const TLSEXT_NAMETYPE_host_name: c_long = 0; - -pub const SSL_TLSEXT_ERR_OK: c_int = 0; -pub const SSL_TLSEXT_ERR_ALERT_WARNING: c_int = 1; -pub const SSL_TLSEXT_ERR_ALERT_FATAL: c_int = 2; -pub const SSL_TLSEXT_ERR_NOACK: c_int = 3; - -#[cfg(any(feature = "npn", feature = "alpn"))] -pub const OPENSSL_NPN_UNSUPPORTED: c_int = 0; -#[cfg(any(feature = "npn", feature = "alpn"))] -pub const OPENSSL_NPN_NEGOTIATED: c_int = 1; -#[cfg(any(feature = "npn", feature = "alpn"))] -pub const OPENSSL_NPN_NO_OVERLAP: c_int = 2; - -pub const V_ASN1_GENERALIZEDTIME: c_int = 24; -pub const V_ASN1_UTCTIME: c_int = 23; - -pub const X509_FILETYPE_ASN1: c_int = 2; -pub const X509_FILETYPE_DEFAULT: c_int = 3; -pub const X509_FILETYPE_PEM: c_int = 1; -pub const X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH: c_int = 31; -pub const X509_V_ERR_AKID_SKID_MISMATCH: c_int = 30; -pub const X509_V_ERR_APPLICATION_VERIFICATION: c_int = 50; -pub const X509_V_ERR_CERT_CHAIN_TOO_LONG: c_int = 22; -pub const X509_V_ERR_CERT_HAS_EXPIRED: c_int = 10; -pub const X509_V_ERR_CERT_NOT_YET_VALID: c_int = 9; -pub const X509_V_ERR_CERT_REJECTED: c_int = 28; -pub const X509_V_ERR_CERT_REVOKED: c_int = 23; -pub const X509_V_ERR_CERT_SIGNATURE_FAILURE: c_int = 7; -pub const X509_V_ERR_CERT_UNTRUSTED: c_int = 27; -pub const X509_V_ERR_CRL_HAS_EXPIRED: c_int = 12; -pub const X509_V_ERR_CRL_NOT_YET_VALID: c_int = 11; -pub const X509_V_ERR_CRL_PATH_VALIDATION_ERROR: c_int = 54; -pub const X509_V_ERR_CRL_SIGNATURE_FAILURE: c_int = 8; -pub const X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT: c_int = 18; -pub const X509_V_ERR_DIFFERENT_CRL_SCOPE: c_int = 44; -pub const X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD: c_int = 14; -pub const X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD: c_int = 13; -pub const X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD: c_int = 15; -pub const X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD: c_int = 16; -pub const X509_V_ERR_EXCLUDED_VIOLATION: c_int = 48; -pub const X509_V_ERR_INVALID_CA: c_int = 24; -pub const X509_V_ERR_INVALID_EXTENSION: c_int = 41; -pub const X509_V_ERR_INVALID_NON_CA: c_int = 37; -pub const X509_V_ERR_INVALID_POLICY_EXTENSION: c_int = 42; -pub const X509_V_ERR_INVALID_PURPOSE: c_int = 26; -pub const X509_V_ERR_KEYUSAGE_NO_CERTSIGN: c_int = 32; -pub const X509_V_ERR_KEYUSAGE_NO_CRL_SIGN: c_int = 35; -pub const X509_V_ERR_KEYUSAGE_NO_DIGITAL_SIGNATURE: c_int = 39; -pub const X509_V_ERR_NO_EXPLICIT_POLICY: c_int = 43; -pub const X509_V_ERR_OUT_OF_MEM: c_int = 17; -pub const X509_V_ERR_PATH_LENGTH_EXCEEDED: c_int = 25; -pub const X509_V_ERR_PERMITTED_VIOLATION: c_int = 47; -pub const X509_V_ERR_PROXY_CERTIFICATES_NOT_ALLOWED: c_int = 40; -pub const X509_V_ERR_PROXY_PATH_LENGTH_EXCEEDED: c_int = 38; -pub const X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN: c_int = 19; -pub const X509_V_ERR_SUBJECT_ISSUER_MISMATCH: c_int = 29; -pub const X509_V_ERR_SUBTREE_MINMAX: c_int = 49; -pub const X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY: c_int = 6; -pub const X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE: c_int = 4; -pub const X509_V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE: c_int = 5; -pub const X509_V_ERR_UNABLE_TO_GET_CRL: c_int = 3; -pub const X509_V_ERR_UNABLE_TO_GET_CRL_ISSUER: c_int = 33; -pub const X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT: c_int = 2; -pub const X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY: c_int = 20; -pub const X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE: c_int = 21; -pub const X509_V_ERR_UNHANDLED_CRITICAL_CRL_EXTENSION: c_int = 36; -pub const X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION: c_int = 34; -pub const X509_V_ERR_UNNESTED_RESOURCE: c_int = 46; -pub const X509_V_ERR_UNSUPPORTED_CONSTRAINT_SYNTAX: c_int = 52; -pub const X509_V_ERR_UNSUPPORTED_CONSTRAINT_TYPE: c_int = 51; -pub const X509_V_ERR_UNSUPPORTED_EXTENSION_FEATURE: c_int = 45; -pub const X509_V_ERR_UNSUPPORTED_NAME_SYNTAX: c_int = 53; -pub const X509_V_OK: c_int = 0; - -static mut MUTEXES: *mut Vec> = 0 as *mut Vec>; -static mut GUARDS: *mut Vec>> = 0 as *mut Vec>>; - -unsafe extern fn locking_function(mode: c_int, n: c_int, _file: *const c_char, - _line: c_int) { - let mutex = &(*MUTEXES)[n as usize]; - - if mode & CRYPTO_LOCK != 0 { - (*GUARDS)[n as usize] = Some(mutex.lock().unwrap()); - } else { - &(*GUARDS)[n as usize].take(); - } -} - -pub fn init() { - static INIT: Once = ONCE_INIT; - - INIT.call_once(|| { - unsafe { - SSL_library_init(); - SSL_load_error_strings(); - - let num_locks = CRYPTO_num_locks(); - let mut mutexes = Box::new(Vec::new()); - for _ in 0..num_locks { - mutexes.push(Mutex::new(())); - } - MUTEXES = mem::transmute(mutexes); - let guards: Box>>> = - Box::new((0..num_locks).map(|_| None).collect()); - GUARDS = mem::transmute(guards); - - CRYPTO_set_locking_callback(locking_function); - set_id_callback(); - } - }) -} - -#[cfg(unix)] -fn set_id_callback() { - unsafe extern "C" fn thread_id() -> c_ulong { - libc::pthread_self() as c_ulong - } - - unsafe { - CRYPTO_set_id_callback(thread_id); - } -} - -#[cfg(not(unix))] -fn set_id_callback() {} - -// True functions -extern "C" { - pub fn ASN1_INTEGER_set(dest: *mut ASN1_INTEGER, value: c_long) -> c_int; - pub fn ASN1_STRING_type_new(ty: c_int) -> *mut ASN1_STRING; - pub fn ASN1_TIME_free(tm: *mut ASN1_TIME); - - pub fn BIO_ctrl(b: *mut BIO, cmd: c_int, larg: c_long, parg: *mut c_void) -> c_long; - pub fn BIO_free_all(b: *mut BIO); - pub fn BIO_new(type_: *const BIO_METHOD) -> *mut BIO; - pub fn BIO_new_socket(sock: c_int, close_flag: c_int) -> *mut BIO; - pub fn BIO_read(b: *mut BIO, buf: *mut c_void, len: c_int) -> c_int; - pub fn BIO_write(b: *mut BIO, buf: *const c_void, len: c_int) -> c_int; - pub fn BIO_s_mem() -> *const BIO_METHOD; - - pub fn BN_new() -> *mut BIGNUM; - pub fn BN_dup(n: *mut BIGNUM) -> *mut BIGNUM; - pub fn BN_clear_free(bn: *mut BIGNUM); - - pub fn BN_CTX_new() -> *mut BN_CTX; - pub fn BN_CTX_free(ctx: *mut BN_CTX); - - pub fn BN_num_bits(bn: *mut BIGNUM) -> c_int; - pub fn BN_set_negative(bn: *mut BIGNUM, n: c_int); - pub fn BN_set_word(bn: *mut BIGNUM, n: c_ulong) -> c_int; - - /* Arithmetic operations on BIGNUMs */ - pub fn BN_add(r: *mut BIGNUM, a: *mut BIGNUM, b: *mut BIGNUM) -> c_int; - pub fn BN_div(dv: *mut BIGNUM, rem: *mut BIGNUM, a: *mut BIGNUM, b: *mut BIGNUM, ctx: *mut BN_CTX) -> c_int; - pub fn BN_exp(r: *mut BIGNUM, a: *mut BIGNUM, p: *mut BIGNUM, ctx: *mut BN_CTX) -> c_int; - pub fn BN_gcd(r: *mut BIGNUM, a: *mut BIGNUM, b: *mut BIGNUM, ctx: *mut BN_CTX) -> c_int; - pub fn BN_mod_add(r: *mut BIGNUM, a: *mut BIGNUM, b: *mut BIGNUM, m: *mut BIGNUM, ctx: *mut BN_CTX) -> c_int; - pub fn BN_mod_exp(r: *mut BIGNUM, a: *mut BIGNUM, p: *mut BIGNUM, m: *mut BIGNUM, ctx: *mut BN_CTX) -> c_int; - pub fn BN_mod_inverse(r: *mut BIGNUM, a: *mut BIGNUM, n: *mut BIGNUM, ctx: *mut BN_CTX) -> *const BIGNUM; - pub fn BN_mod_mul(r: *mut BIGNUM, a: *mut BIGNUM, b: *mut BIGNUM, m: *mut BIGNUM, ctx: *mut BN_CTX) -> c_int; - pub fn BN_mod_sqr(r: *mut BIGNUM, a: *mut BIGNUM, m: *mut BIGNUM, ctx: *mut BN_CTX) -> c_int; - pub fn BN_mod_sub(r: *mut BIGNUM, a: *mut BIGNUM, b: *mut BIGNUM, m: *mut BIGNUM, ctx: *mut BN_CTX) -> c_int; - pub fn BN_mul(r: *mut BIGNUM, a: *mut BIGNUM, b: *mut BIGNUM, ctx: *mut BN_CTX) -> c_int; - pub fn BN_nnmod(rem: *mut BIGNUM, a: *mut BIGNUM, m: *mut BIGNUM, ctx: *mut BN_CTX) -> c_int; - pub fn BN_add_word(r: *mut BIGNUM, w: c_ulong) -> c_int; - pub fn BN_sub_word(r: *mut BIGNUM, w: c_ulong) -> c_int; - pub fn BN_mul_word(r: *mut BIGNUM, w: c_ulong) -> c_int; - pub fn BN_div_word(r: *mut BIGNUM, w: c_ulong) -> c_ulong; - pub fn BN_mod_word(r: *const BIGNUM, w: c_ulong) -> c_ulong; - pub fn BN_sqr(r: *mut BIGNUM, a: *mut BIGNUM, ctx: *mut BN_CTX) -> c_int; - pub fn BN_sub(r: *mut BIGNUM, a: *mut BIGNUM, b: *mut BIGNUM) -> c_int; - - /* Bit operations on BIGNUMs */ - pub fn BN_clear_bit(a: *mut BIGNUM, n: c_int) -> c_int; - pub fn BN_is_bit_set(a: *mut BIGNUM, n: c_int) -> c_int; - pub fn BN_lshift(r: *mut BIGNUM, a: *mut BIGNUM, n: c_int) -> c_int; - pub fn BN_lshift1(r: *mut BIGNUM, a: *mut BIGNUM) -> c_int; - pub fn BN_mask_bits(a: *mut BIGNUM, n: c_int) -> c_int; - pub fn BN_rshift(r: *mut BIGNUM, a: *mut BIGNUM, n: c_int) -> c_int; - pub fn BN_set_bit(a: *mut BIGNUM, n: c_int) -> c_int; - pub fn BN_rshift1(r: *mut BIGNUM, a: *mut BIGNUM) -> c_int; - - /* Comparisons on BIGNUMs */ - pub fn BN_cmp(a: *mut BIGNUM, b: *mut BIGNUM) -> c_int; - pub fn BN_ucmp(a: *mut BIGNUM, b: *mut BIGNUM) -> c_int; - - /* Prime handling */ - pub fn BN_generate_prime_ex(r: *mut BIGNUM, bits: c_int, safe: c_int, add: *mut BIGNUM, rem: *mut BIGNUM, cb: *const c_void) -> c_int; - pub fn BN_is_prime_ex(p: *mut BIGNUM, checks: c_int, ctx: *mut BN_CTX, cb: *const c_void) -> c_int; - pub fn BN_is_prime_fasttest_ex(p: *mut BIGNUM, checks: c_int, ctx: *mut BN_CTX, do_trial_division: c_int, cb: *const c_void) -> c_int; - - /* Random number handling */ - pub fn BN_rand(r: *mut BIGNUM, bits: c_int, top: c_int, bottom: c_int) -> c_int; - pub fn BN_pseudo_rand(r: *mut BIGNUM, bits: c_int, top: c_int, bottom: c_int) -> c_int; - pub fn BN_rand_range(r: *mut BIGNUM, range: *mut BIGNUM) -> c_int; - pub fn BN_pseudo_rand_range(r: *mut BIGNUM, range: *mut BIGNUM) -> c_int; - - /* Conversion from/to binary representation */ - pub fn BN_bin2bn(s: *const u8, size: c_int, ret: *mut BIGNUM) -> *mut BIGNUM; - pub fn BN_bn2bin(a: *mut BIGNUM, to: *mut u8) -> c_int; - - /* Conversion from/to decimal string representation */ - pub fn BN_dec2bn(a: *const *mut BIGNUM, s: *const c_char) -> c_int; - pub fn BN_bn2dec(a: *mut BIGNUM) -> *const c_char; - - /* Conversion from/to hexidecimal string representation */ - pub fn BN_hex2bn(a: *const *mut BIGNUM, s: *const c_char) -> c_int; - pub fn BN_bn2hex(a: *mut BIGNUM) -> *const c_char; - - pub fn CRYPTO_num_locks() -> c_int; - pub fn CRYPTO_set_locking_callback(func: unsafe extern "C" fn(mode: c_int, - n: c_int, - file: *const c_char, - line: c_int)); - pub fn CRYPTO_set_id_callback(func: unsafe extern "C" fn() -> c_ulong); - pub fn CRYPTO_free(buf: *mut c_void); - pub fn CRYPTO_memcmp(a: *const c_void, b: *const c_void, - len: size_t) -> c_int; - - pub fn DH_free(dh: *mut DH); - - #[cfg(feature = "rfc5114")] - pub fn DH_get_1024_160() -> *mut DH; - #[cfg(feature = "rfc5114")] - pub fn DH_get_2048_224() -> *mut DH; - #[cfg(feature = "rfc5114")] - pub fn DH_get_2048_256() -> *mut DH; - - pub fn DH_new_from_params(p: *mut BIGNUM, g: *mut BIGNUM, q: *mut BIGNUM) -> *mut DH; - - pub fn ERR_get_error() -> c_ulong; - - pub fn ERR_lib_error_string(err: c_ulong) -> *const c_char; - pub fn ERR_func_error_string(err: c_ulong) -> *const c_char; - pub fn ERR_reason_error_string(err: c_ulong) -> *const c_char; - - pub fn ERR_load_crypto_strings(); - - pub fn EVP_md5() -> *const EVP_MD; - pub fn EVP_ripemd160() -> *const EVP_MD; - pub fn EVP_sha1() -> *const EVP_MD; - pub fn EVP_sha224() -> *const EVP_MD; - pub fn EVP_sha256() -> *const EVP_MD; - pub fn EVP_sha384() -> *const EVP_MD; - pub fn EVP_sha512() -> *const EVP_MD; - - pub fn EVP_aes_128_cbc() -> *const EVP_CIPHER; - pub fn EVP_aes_128_ecb() -> *const EVP_CIPHER; - #[cfg(feature = "aes_xts")] - pub fn EVP_aes_128_xts() -> *const EVP_CIPHER; - #[cfg(feature = "aes_ctr")] - pub fn EVP_aes_128_ctr() -> *const EVP_CIPHER; - // fn EVP_aes_128_gcm() -> EVP_CIPHER; - pub fn EVP_aes_128_cfb1() -> *const EVP_CIPHER; - pub fn EVP_aes_128_cfb128() -> *const EVP_CIPHER; - pub fn EVP_aes_128_cfb8() -> *const EVP_CIPHER; - pub fn EVP_aes_256_cbc() -> *const EVP_CIPHER; - pub fn EVP_aes_256_ecb() -> *const EVP_CIPHER; - #[cfg(feature = "aes_xts")] - pub fn EVP_aes_256_xts() -> *const EVP_CIPHER; - #[cfg(feature = "aes_ctr")] - pub fn EVP_aes_256_ctr() -> *const EVP_CIPHER; - // fn EVP_aes_256_gcm() -> EVP_CIPHER; - pub fn EVP_aes_256_cfb1() -> *const EVP_CIPHER; - pub fn EVP_aes_256_cfb128() -> *const EVP_CIPHER; - pub fn EVP_aes_256_cfb8() -> *const EVP_CIPHER; - pub fn EVP_rc4() -> *const EVP_CIPHER; - - pub fn EVP_BytesToKey(typ: *const EVP_CIPHER, md: *const EVP_MD, - salt: *const u8, data: *const u8, datalen: c_int, - count: c_int, key: *mut u8, iv: *mut u8) -> c_int; - - pub fn EVP_CIPHER_CTX_new() -> *mut EVP_CIPHER_CTX; - pub fn EVP_CIPHER_CTX_set_padding(ctx: *mut EVP_CIPHER_CTX, padding: c_int) -> c_int; - pub fn EVP_CIPHER_CTX_free(ctx: *mut EVP_CIPHER_CTX); - - pub fn EVP_CipherInit(ctx: *mut EVP_CIPHER_CTX, evp: *const EVP_CIPHER, - key: *const u8, iv: *const u8, mode: c_int) -> c_int; - pub fn EVP_CipherUpdate(ctx: *mut EVP_CIPHER_CTX, outbuf: *mut u8, - outlen: &mut c_int, inbuf: *const u8, inlen: c_int) -> c_int; - pub fn EVP_CipherFinal(ctx: *mut EVP_CIPHER_CTX, res: *mut u8, len: &mut c_int) -> c_int; - - pub fn EVP_DigestInit(ctx: *mut EVP_MD_CTX, typ: *const EVP_MD) -> c_int; - pub fn EVP_DigestInit_ex(ctx: *mut EVP_MD_CTX, typ: *const EVP_MD, imple: *const ENGINE) -> c_int; - pub fn EVP_DigestUpdate(ctx: *mut EVP_MD_CTX, data: *const u8, n: c_uint) -> c_int; - pub fn EVP_DigestFinal(ctx: *mut EVP_MD_CTX, res: *mut u8, n: *mut u32) -> c_int; - pub fn EVP_DigestFinal_ex(ctx: *mut EVP_MD_CTX, res: *mut u8, n: *mut u32) -> c_int; - - pub fn EVP_MD_CTX_create() -> *mut EVP_MD_CTX; - pub fn EVP_MD_CTX_copy_ex(dst: *mut EVP_MD_CTX, src: *const EVP_MD_CTX) -> c_int; - pub fn EVP_MD_CTX_destroy(ctx: *mut EVP_MD_CTX); - - pub fn EVP_PKEY_new() -> *mut EVP_PKEY; - pub fn EVP_PKEY_free(k: *mut EVP_PKEY); - pub fn EVP_PKEY_assign(pkey: *mut EVP_PKEY, typ: c_int, key: *const c_void) -> c_int; - pub fn EVP_PKEY_get1_RSA(k: *mut EVP_PKEY) -> *mut RSA; - pub fn EVP_PKEY_set1_RSA(k: *mut EVP_PKEY, r: *mut RSA) -> c_int; - pub fn EVP_PKEY_cmp(a: *const EVP_PKEY, b: *const EVP_PKEY) -> c_int; - - pub fn HMAC_CTX_init(ctx: *mut HMAC_CTX); - pub fn HMAC_CTX_cleanup(ctx: *mut HMAC_CTX); - - pub fn PEM_read_bio_DHparams(bio: *mut BIO, out: *mut *mut DH, callback: Option, - user_data: *mut c_void) -> *mut DH; - pub fn PEM_read_bio_X509(bio: *mut BIO, out: *mut *mut X509, callback: Option, - user_data: *mut c_void) -> *mut X509; - pub fn PEM_read_bio_X509_REQ(bio: *mut BIO, out: *mut *mut X509_REQ, callback: Option, - user_data: *mut c_void) -> *mut X509_REQ; - pub fn PEM_read_bio_PrivateKey(bio: *mut BIO, out: *mut *mut EVP_PKEY, callback: Option, - user_data: *mut c_void) -> *mut X509; - pub fn PEM_read_bio_PUBKEY(bio: *mut BIO, out: *mut *mut EVP_PKEY, callback: Option, - user_data: *mut c_void) -> *mut X509; - - pub fn PEM_read_bio_RSAPrivateKey(bio: *mut BIO, rsa: *mut *mut RSA, callback: Option, user_data: *mut c_void) -> *mut RSA; - pub fn PEM_read_bio_RSA_PUBKEY(bio: *mut BIO, rsa: *mut *mut RSA, callback: Option, user_data: *mut c_void) -> *mut RSA; - - pub fn PEM_write_bio_PrivateKey(bio: *mut BIO, pkey: *mut EVP_PKEY, cipher: *const EVP_CIPHER, - kstr: *mut c_char, klen: c_int, - callback: Option, - user_data: *mut c_void) -> c_int; - pub fn PEM_write_bio_PUBKEY(bp: *mut BIO, x: *mut EVP_PKEY) -> c_int; - pub fn PEM_write_bio_X509(bio: *mut BIO, x509: *mut X509) -> c_int; - pub fn PEM_write_bio_X509_REQ(bio: *mut BIO, x509: *mut X509_REQ) -> c_int; - - pub fn PKCS5_PBKDF2_HMAC_SHA1(pass: *const u8, passlen: c_int, - salt: *const u8, saltlen: c_int, - iter: c_int, keylen: c_int, - out: *mut u8) -> c_int; - #[cfg(feature = "pkcs5_pbkdf2_hmac")] - pub fn PKCS5_PBKDF2_HMAC(pass: *const u8, passlen: c_int, - salt: *const u8, saltlen: c_int, - iter: c_int, digest: *const EVP_MD, keylen: c_int, - out: *mut u8) -> c_int; - - pub fn RAND_bytes(buf: *mut u8, num: c_int) -> c_int; - - pub fn RSA_free(rsa: *mut RSA); - pub fn RSA_generate_key(modsz: c_int, e: c_ulong, cb: *const c_void, cbarg: *const c_void) -> *mut RSA; - pub fn RSA_generate_key_ex(rsa: *mut RSA, bits: c_int, e: *mut BIGNUM, cb: *const c_void) -> c_int; - pub fn RSA_private_decrypt(flen: c_int, from: *const u8, to: *mut u8, k: *mut RSA, - pad: c_int) -> c_int; - pub fn RSA_public_decrypt(flen: c_int, from: *const u8, to: *mut u8, k: *mut RSA, - pad: c_int) -> c_int; - pub fn RSA_private_encrypt(flen: c_int, from: *const u8, to: *mut u8, k: *mut RSA, - pad: c_int) -> c_int; - pub fn RSA_public_encrypt(flen: c_int, from: *const u8, to: *mut u8, k: *mut RSA, - pad: c_int) -> c_int; - pub fn RSA_sign(t: c_int, m: *const u8, mlen: c_uint, sig: *mut u8, siglen: *mut c_uint, - k: *mut RSA) -> c_int; - pub fn RSA_size(k: *mut RSA) -> c_int; - pub fn RSA_verify(t: c_int, m: *const u8, mlen: c_uint, sig: *const u8, siglen: c_uint, - k: *mut RSA) -> c_int; - - pub fn SSL_library_init() -> c_int; - - pub fn SSL_load_error_strings(); - - #[cfg(feature = "sslv2")] - pub fn SSLv2_method() -> *const SSL_METHOD; - pub fn SSLv3_method() -> *const SSL_METHOD; - pub fn TLSv1_method() -> *const SSL_METHOD; - #[cfg(feature = "tlsv1_1")] - pub fn TLSv1_1_method() -> *const SSL_METHOD; - #[cfg(feature = "tlsv1_2")] - pub fn TLSv1_2_method() -> *const SSL_METHOD; - #[cfg(feature = "dtlsv1")] - pub fn DTLSv1_method() -> *const SSL_METHOD; - #[cfg(feature = "dtlsv1_2")] - pub fn DTLSv1_2_method() -> *const SSL_METHOD; - pub fn SSLv23_method() -> *const SSL_METHOD; - - pub fn SSL_new(ctx: *mut SSL_CTX) -> *mut SSL; - pub fn SSL_pending(ssl: *const SSL) -> c_int; - pub fn SSL_free(ssl: *mut SSL); - pub fn SSL_set_bio(ssl: *mut SSL, rbio: *mut BIO, wbio: *mut BIO); - pub fn SSL_get_rbio(ssl: *mut SSL) -> *mut BIO; - pub fn SSL_get_wbio(ssl: *mut SSL) -> *mut BIO; - pub fn SSL_accept(ssl: *mut SSL) -> c_int; - pub fn SSL_connect(ssl: *mut SSL) -> c_int; - pub fn SSL_ctrl(ssl: *mut SSL, cmd: c_int, larg: c_long, - parg: *mut c_void) -> c_long; - pub fn SSL_get_error(ssl: *mut SSL, ret: c_int) -> c_int; - pub fn SSL_read(ssl: *mut SSL, buf: *mut c_void, num: c_int) -> c_int; - pub fn SSL_write(ssl: *mut SSL, buf: *const c_void, num: c_int) -> c_int; - pub fn SSL_get_ex_data_X509_STORE_CTX_idx() -> c_int; - pub fn SSL_get_SSL_CTX(ssl: *mut SSL) -> *mut SSL_CTX; - pub fn SSL_set_SSL_CTX(ssl: *mut SSL, ctx: *mut SSL_CTX) -> *mut SSL_CTX; - pub fn SSL_get_current_compression(ssl: *mut SSL) -> *const COMP_METHOD; - pub fn SSL_get_peer_certificate(ssl: *mut SSL) -> *mut X509; - pub fn SSL_get_ssl_method(ssl: *mut SSL) -> *const SSL_METHOD; - pub fn SSL_state_string(ssl: *mut SSL) -> *const c_char; - pub fn SSL_state_string_long(ssl: *mut SSL) -> *const c_char; - - pub fn SSL_get_servername(ssl: *const SSL, name_type: c_long) -> *const c_char; - - pub fn SSL_COMP_get_name(comp: *const COMP_METHOD) -> *const c_char; - - pub fn SSL_CTX_new(method: *const SSL_METHOD) -> *mut SSL_CTX; - pub fn SSL_CTX_free(ctx: *mut SSL_CTX); - pub fn SSL_CTX_set_verify(ctx: *mut SSL_CTX, mode: c_int, - verify_callback: Option c_int>); - pub fn SSL_CTX_set_verify_depth(ctx: *mut SSL_CTX, depth: c_int); - pub fn SSL_CTX_load_verify_locations(ctx: *mut SSL_CTX, CAfile: *const c_char, - CApath: *const c_char) -> c_int; - pub fn SSL_CTX_get_ex_new_index(argl: c_long, argp: *const c_void, - new_func: Option, - dup_func: Option, - free_func: Option) - -> c_int; - pub fn SSL_CTX_set_ex_data(ctx: *mut SSL_CTX, idx: c_int, data: *mut c_void) - -> c_int; - pub fn SSL_CTX_get_ex_data(ctx: *mut SSL_CTX, idx: c_int) -> *mut c_void; - - pub fn SSL_CTX_use_certificate_file(ctx: *mut SSL_CTX, cert_file: *const c_char, file_type: c_int) -> c_int; - pub fn SSL_CTX_use_certificate_chain_file(ctx: *mut SSL_CTX, cert_chain_file: *const c_char, file_type: c_int) -> c_int; - pub fn SSL_CTX_use_certificate(ctx: *mut SSL_CTX, cert: *mut X509) -> c_int; - - pub fn SSL_CTX_use_PrivateKey_file(ctx: *mut SSL_CTX, key_file: *const c_char, file_type: c_int) -> c_int; - pub fn SSL_CTX_use_PrivateKey(ctx: *mut SSL_CTX, key: *mut EVP_PKEY) -> c_int; - pub fn SSL_CTX_check_private_key(ctx: *mut SSL_CTX) -> c_int; - - pub fn SSL_CTX_set_cipher_list(ssl: *mut SSL_CTX, s: *const c_char) -> c_int; - - #[cfg(feature = "npn")] - pub fn SSL_CTX_set_next_protos_advertised_cb(ssl: *mut SSL_CTX, - cb: extern "C" fn(ssl: *mut SSL, - out: *mut *const c_uchar, - outlen: *mut c_uint, - arg: *mut c_void) -> c_int, - arg: *mut c_void); - #[cfg(feature = "npn")] - pub fn SSL_CTX_set_next_proto_select_cb(ssl: *mut SSL_CTX, - cb: extern "C" fn(ssl: *mut SSL, - out: *mut *mut c_uchar, - outlen: *mut c_uchar, - inbuf: *const c_uchar, - inlen: c_uint, - arg: *mut c_void) -> c_int, - arg: *mut c_void); - #[cfg(any(feature = "alpn", feature = "npn"))] - pub fn SSL_select_next_proto(out: *mut *mut c_uchar, outlen: *mut c_uchar, - inbuf: *const c_uchar, inlen: c_uint, - client: *const c_uchar, client_len: c_uint) -> c_int; - #[cfg(feature = "npn")] - pub fn SSL_get0_next_proto_negotiated(s: *const SSL, data: *mut *const c_uchar, len: *mut c_uint); - - #[cfg(feature = "alpn")] - pub fn SSL_CTX_set_alpn_protos(s: *mut SSL_CTX, data: *const c_uchar, len: c_uint) -> c_int; - - #[cfg(feature = "alpn")] - pub fn SSL_set_alpn_protos(s: *mut SSL, data: *const c_uchar, len: c_uint) -> c_int; - - #[cfg(feature = "alpn")] - pub fn SSL_CTX_set_alpn_select_cb(ssl: *mut SSL_CTX, - cb: extern "C" fn(ssl: *mut SSL, - out: *mut *mut c_uchar, - outlen: *mut c_uchar, - inbuf: *const c_uchar, - inlen: c_uint, - arg: *mut c_void) -> c_int, - arg: *mut c_void); - #[cfg(feature = "alpn")] - pub fn SSL_get0_alpn_selected(s: *const SSL, data: *mut *const c_uchar, len: *mut c_uint); - - pub fn X509_add_ext(x: *mut X509, ext: *mut X509_EXTENSION, loc: c_int) -> c_int; - pub fn X509_digest(x: *mut X509, digest: *const EVP_MD, buf: *mut c_char, len: *mut c_uint) -> c_int; - pub fn X509_free(x: *mut X509); - pub fn X509_REQ_free(x: *mut X509_REQ); - pub fn X509_get_serialNumber(x: *mut X509) -> *mut ASN1_INTEGER; - pub fn X509_get_subject_name(x: *mut X509) -> *mut X509_NAME; - pub fn X509_gmtime_adj(time: *mut ASN1_TIME, adj: c_long) -> *mut ASN1_TIME; - pub fn X509_new() -> *mut X509; - pub fn X509_set_issuer_name(x: *mut X509, name: *mut X509_NAME) -> c_int; - pub fn X509_set_notAfter(x: *mut X509, tm: *const ASN1_TIME) -> c_int; - pub fn X509_set_notBefore(x: *mut X509, tm: *const ASN1_TIME) -> c_int; - pub fn X509_set_version(x: *mut X509, version: c_ulong) -> c_int; - pub fn X509_set_pubkey(x: *mut X509, pkey: *mut EVP_PKEY) -> c_int; - pub fn X509_sign(x: *mut X509, pkey: *mut EVP_PKEY, md: *const EVP_MD) -> c_int; - pub fn X509_get_pubkey(x: *mut X509) -> *mut EVP_PKEY; - pub fn X509_to_X509_REQ(x: *mut X509, pkey: *mut EVP_PKEY, md: *const EVP_MD) -> *mut X509_REQ; - - pub fn X509_EXTENSION_free(ext: *mut X509_EXTENSION); - - pub fn X509_NAME_add_entry_by_txt(x: *mut X509, field: *const c_char, ty: c_int, bytes: *const c_char, len: c_int, loc: c_int, set: c_int) -> c_int; - pub fn X509_NAME_get_index_by_NID(n: *mut X509_NAME, nid: c_int, last_pos: c_int) ->c_int; - pub fn X509_NAME_get_entry(n: *mut X509_NAME, loc: c_int) -> *mut X509_NAME_ENTRY; - pub fn X509_NAME_ENTRY_get_data(ne: *mut X509_NAME_ENTRY) -> *mut ASN1_STRING; - - pub fn ASN1_STRING_to_UTF8(out: *mut *mut c_char, s: *mut ASN1_STRING) -> c_int; - - pub fn X509_STORE_CTX_get_current_cert(ct: *mut X509_STORE_CTX) -> *mut X509; - pub fn X509_STORE_CTX_get_error(ctx: *mut X509_STORE_CTX) -> c_int; - pub fn X509_STORE_CTX_get_ex_data(ctx: *mut X509_STORE_CTX, idx: c_int) -> *mut c_void; - - pub fn X509V3_EXT_conf_nid(conf: *mut c_void, ctx: *mut X509V3_CTX, ext_nid: c_int, value: *mut c_char) -> *mut X509_EXTENSION; - pub fn X509V3_EXT_conf(conf: *mut c_void, ctx: *mut X509V3_CTX, name: *mut c_char, value: *mut c_char) -> *mut X509_EXTENSION; - pub fn X509V3_set_ctx(ctx: *mut X509V3_CTX, issuer: *mut X509, subject: *mut X509, req: *mut X509_REQ, crl: *mut X509_CRL, flags: c_int); - - pub fn X509_REQ_add_extensions(req: *mut X509_REQ, exts: *mut stack_st_X509_EXTENSION) -> c_int; - pub fn X509_REQ_sign(x: *mut X509_REQ, pkey: *mut EVP_PKEY, md: *const EVP_MD) -> c_int; - - pub fn i2d_RSA_PUBKEY(k: *mut RSA, buf: *const *mut u8) -> c_int; - pub fn d2i_RSA_PUBKEY(k: *const *mut RSA, buf: *const *const u8, len: c_uint) -> *mut RSA; - pub fn i2d_RSAPrivateKey(k: *mut RSA, buf: *const *mut u8) -> c_int; - pub fn d2i_RSAPrivateKey(k: *const *mut RSA, buf: *const *const u8, len: c_uint) -> *mut RSA; -} - -pub mod probe; diff --git a/deps/openssl-sys-0.7.8/Cargo.toml b/deps/openssl-sys-0.7.8/Cargo.toml new file mode 100644 index 000000000..2498c2342 --- /dev/null +++ b/deps/openssl-sys-0.7.8/Cargo.toml @@ -0,0 +1,54 @@ +[package] +name = "openssl-sys" +version = "0.7.8" +authors = ["Alex Crichton ", + "Steven Fackler "] +license = "MIT" +description = "FFI bindings to OpenSSL" +repository = "https://github.com/sfackler/rust-openssl" +documentation = "https://sfackler.github.io/rust-openssl/doc/v0.7.8/openssl_sys" +links = "openssl" +build = "build.rs" + +[features] +tlsv1_2 = [] +tlsv1_1 = [] +dtlsv1 = [] +dtlsv1_2 = [] +sslv2 = [] +sslv3 = [] +aes_xts = [] +aes_ctr = [] +npn = [] +alpn = [] +rfc5114 = [] +pkcs5_pbkdf2_hmac = [] + +[dependencies] +libc = "0.2" + +[build-dependencies] +pkg-config = "0.3" + +[target.le32-unknown-nacl.dependencies] +libressl-pnacl-sys = "2.1.0" +[target.x86_64-unknown-nacl.dependencies] +libressl-pnacl-sys = "2.1.0" +[target.i686-unknown-nacl.dependencies] +libressl-pnacl-sys = "2.1.0" +[target.arm-unknown-nacl.dependencies] +libressl-pnacl-sys = "2.1.0" + +# Only here to make sure we link to these in a static build on Windows +[target.i686-pc-windows-gnu.dependencies] +user32-sys = "0.1" +gdi32-sys = "0.1" +[target.x86_64-pc-windows-gnu.dependencies] +user32-sys = "0.1" +gdi32-sys = "0.1" +[target.i686-pc-windows-msvc.dependencies] +user32-sys = "0.1" +gdi32-sys = "0.1" +[target.x86_64-pc-windows-msvc.dependencies] +user32-sys = "0.1" +gdi32-sys = "0.1" diff --git a/deps/openssl-sys-0.7.6/LICENSE-MIT b/deps/openssl-sys-0.7.8/LICENSE-MIT similarity index 100% rename from deps/openssl-sys-0.7.6/LICENSE-MIT rename to deps/openssl-sys-0.7.8/LICENSE-MIT diff --git a/deps/openssl-sys-0.7.6/build.rs b/deps/openssl-sys-0.7.8/build.rs similarity index 100% rename from deps/openssl-sys-0.7.6/build.rs rename to deps/openssl-sys-0.7.8/build.rs diff --git a/deps/openssl-sys-0.7.8/src/lib.rs b/deps/openssl-sys-0.7.8/src/lib.rs new file mode 100644 index 000000000..6d6d6103c --- /dev/null +++ b/deps/openssl-sys-0.7.8/src/lib.rs @@ -0,0 +1,772 @@ +#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] +#![allow(dead_code)] +#![doc(html_root_url="https://sfackler.github.io/rust-openssl/doc/v0.7.8")] + +extern crate libc; + +#[cfg(target_os = "nacl")] +extern crate libressl_pnacl_sys; + +use libc::{c_void, c_int, c_char, c_ulong, c_long, c_uint, c_uchar, size_t}; +use std::mem; +use std::sync::{Mutex, MutexGuard}; +use std::sync::{Once, ONCE_INIT}; + +pub type ASN1_INTEGER = c_void; +pub type ASN1_STRING = c_void; +pub type ASN1_TIME = c_void; +pub type BN_CTX = c_void; +pub type COMP_METHOD = c_void; +pub type DH = c_void; +pub type ENGINE = c_void; +pub type EVP_CIPHER = c_void; +pub type EVP_CIPHER_CTX = c_void; +pub type EVP_MD = c_void; +pub type EVP_PKEY_CTX = c_void; +pub type SSL = c_void; +pub type SSL_CIPHER = c_void; +pub type SSL_CTX = c_void; +pub type SSL_METHOD = c_void; +pub type X509 = c_void; +pub type X509_CRL = c_void; +pub type X509_EXTENSION = c_void; +pub type X509_NAME = c_void; +pub type X509_NAME_ENTRY = c_void; +pub type X509_REQ = c_void; +pub type X509_STORE_CTX = c_void; +pub type stack_st_X509_EXTENSION = c_void; +pub type stack_st_void = c_void; +pub type bio_st = c_void; + +pub type bio_info_cb = Option; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct BIO_METHOD { + pub type_: c_int, + pub name: *const c_char, + pub bwrite: Option c_int>, + pub bread: Option c_int>, + pub bputs: Option c_int>, + pub bgets: Option c_int>, + pub ctrl: Option c_long>, + pub create: Option c_int>, + pub destroy: Option c_int>, + pub callback_ctrl: Option c_long>, +} + +// so we can create static BIO_METHODs +unsafe impl Sync for BIO_METHOD {} + +#[repr(C)] +pub struct RSA { + pub pad: c_int, + pub version: c_long, + pub meth: *const c_void, + + pub engine: *mut c_void, + pub n: *mut BIGNUM, + pub e: *mut BIGNUM, + pub d: *mut BIGNUM, + pub p: *mut BIGNUM, + pub q: *mut BIGNUM, + pub dmp1: *mut BIGNUM, + pub dmq1: *mut BIGNUM, + pub iqmp: *mut BIGNUM, + + pub ex_data: *mut c_void, + pub references: c_int, + pub flags: c_int, + + pub _method_mod_n: *mut c_void, + pub _method_mod_p: *mut c_void, + pub _method_mod_q: *mut c_void, + + pub bignum_data: *mut c_char, + pub blinding: *mut c_void, + pub mt_blinding: *mut c_void, +} + +#[repr(C)] +pub struct EVP_PKEY { + pub type_: c_int, + pub save_type: c_int, + pub references: c_int, + pub ameth: *const c_void, + pub engine: *mut ENGINE, + pub pkey: *mut c_void, + pub save_parameters: c_int, + pub attributes: *mut c_void, +} + +#[repr(C)] +pub struct BIO { + pub method: *mut BIO_METHOD, + pub callback: Option c_long>, + pub cb_arg: *mut c_char, + pub init: c_int, + pub shutdown: c_int, + pub flags: c_int, + pub retry_reason: c_int, + pub num: c_int, + pub ptr: *mut c_void, + pub next_bio: *mut BIO, + pub prev_bio: *mut BIO, + pub references: c_int, + pub num_read: c_ulong, + pub num_write: c_ulong, + pub ex_data: CRYPTO_EX_DATA, +} + +#[repr(C)] +pub struct CRYPTO_EX_DATA { + pub sk: *mut stack_st_void, + pub dummy: c_int, +} + +#[repr(C)] +pub struct EVP_MD_CTX { + digest: *mut EVP_MD, + engine: *mut c_void, + flags: c_ulong, + md_data: *mut c_void, + pctx: *mut EVP_PKEY_CTX, + update: *mut c_void +} + +impl Copy for EVP_MD_CTX {} +impl Clone for EVP_MD_CTX { + fn clone(&self) -> EVP_MD_CTX { *self } +} + +#[repr(C)] +pub struct HMAC_CTX { + md: *mut EVP_MD, + md_ctx: EVP_MD_CTX, + i_ctx: EVP_MD_CTX, + o_ctx: EVP_MD_CTX, + key_length: c_uint, + key: [c_uchar; 128] +} + +impl Copy for HMAC_CTX {} +impl Clone for HMAC_CTX { + fn clone(&self) -> HMAC_CTX { *self } +} + +#[repr(C)] +pub struct X509V3_CTX { + flags: c_int, + issuer_cert: *mut c_void, + subject_cert: *mut c_void, + subject_req: *mut c_void, + crl: *mut c_void, + db_meth: *mut c_void, + db: *mut c_void, + // I like the last comment line, it is copied from OpenSSL sources: + // Maybe more here +} + +impl Copy for X509V3_CTX {} +impl Clone for X509V3_CTX { + fn clone(&self) -> X509V3_CTX { *self } +} + +#[repr(C)] +pub struct BIGNUM { + pub d: *mut c_void, + pub top: c_int, + pub dmax: c_int, + pub neg: c_int, + pub flags: c_int, +} + +impl Copy for BIGNUM {} +impl Clone for BIGNUM { + fn clone(&self) -> BIGNUM { *self } +} + +pub type CRYPTO_EX_new = extern "C" fn(parent: *mut c_void, ptr: *mut c_void, + ad: *const CRYPTO_EX_DATA, idx: c_int, + argl: c_long, argp: *const c_void) -> c_int; +pub type CRYPTO_EX_dup = extern "C" fn(to: *mut CRYPTO_EX_DATA, + from: *mut CRYPTO_EX_DATA, from_d: *mut c_void, + idx: c_int, argl: c_long, argp: *mut c_void) + -> c_int; +pub type CRYPTO_EX_free = extern "C" fn(parent: *mut c_void, ptr: *mut c_void, + ad: *mut CRYPTO_EX_DATA, idx: c_int, + argl: c_long, argp: *mut c_void); +pub type PasswordCallback = extern "C" fn(buf: *mut c_char, size: c_int, + rwflag: c_int, user_data: *mut c_void) + -> c_int; + +pub const BIO_TYPE_NONE: c_int = 0; + +pub const BIO_CTRL_EOF: c_int = 2; +pub const BIO_CTRL_FLUSH: c_int = 11; +pub const BIO_C_SET_BUF_MEM_EOF_RETURN: c_int = 130; + +pub const CRYPTO_LOCK: c_int = 1; + +pub const MBSTRING_ASC: c_int = MBSTRING_FLAG | 1; +pub const MBSTRING_BMP: c_int = MBSTRING_FLAG | 2; +pub const MBSTRING_FLAG: c_int = 0x1000; +pub const MBSTRING_UNIV: c_int = MBSTRING_FLAG | 4; +pub const MBSTRING_UTF8: c_int = MBSTRING_FLAG; + +pub const NID_ext_key_usage: c_int = 126; +pub const NID_key_usage: c_int = 83; + +pub const PKCS5_SALT_LEN: c_int = 8; + +pub const SSL_CTRL_OPTIONS: c_int = 32; +pub const SSL_CTRL_CLEAR_OPTIONS: c_int = 77; + +pub const SSL_CTRL_SET_TLSEXT_SERVERNAME_CB: c_int = 53; +pub const SSL_CTRL_SET_TLSEXT_SERVERNAME_ARG: c_int = 54; +pub const SSL_CTRL_SET_TLSEXT_HOSTNAME: c_int = 55; +pub const SSL_CTRL_EXTRA_CHAIN_CERT: c_int = 14; + +pub const SSL_CTRL_SET_READ_AHEAD: c_int = 41; +pub const SSL_ERROR_NONE: c_int = 0; +pub const SSL_ERROR_SSL: c_int = 1; +pub const SSL_ERROR_SYSCALL: c_int = 5; +pub const SSL_ERROR_WANT_ACCEPT: c_int = 8; +pub const SSL_ERROR_WANT_CONNECT: c_int = 7; +pub const SSL_ERROR_WANT_READ: c_int = 2; +pub const SSL_ERROR_WANT_WRITE: c_int = 3; +pub const SSL_ERROR_WANT_X509_LOOKUP: c_int = 4; +pub const SSL_ERROR_ZERO_RETURN: c_int = 6; +pub const SSL_VERIFY_NONE: c_int = 0; +pub const SSL_VERIFY_PEER: c_int = 1; +pub const SSL_VERIFY_FAIL_IF_NO_PEER_CERT: c_int = 2; + +pub const TLSEXT_NAMETYPE_host_name: c_long = 0; + +pub const SSL_TLSEXT_ERR_OK: c_int = 0; +pub const SSL_TLSEXT_ERR_ALERT_WARNING: c_int = 1; +pub const SSL_TLSEXT_ERR_ALERT_FATAL: c_int = 2; +pub const SSL_TLSEXT_ERR_NOACK: c_int = 3; + +#[cfg(any(feature = "npn", feature = "alpn"))] +pub const OPENSSL_NPN_UNSUPPORTED: c_int = 0; +#[cfg(any(feature = "npn", feature = "alpn"))] +pub const OPENSSL_NPN_NEGOTIATED: c_int = 1; +#[cfg(any(feature = "npn", feature = "alpn"))] +pub const OPENSSL_NPN_NO_OVERLAP: c_int = 2; + +pub const V_ASN1_GENERALIZEDTIME: c_int = 24; +pub const V_ASN1_UTCTIME: c_int = 23; + +pub const X509_FILETYPE_ASN1: c_int = 2; +pub const X509_FILETYPE_DEFAULT: c_int = 3; +pub const X509_FILETYPE_PEM: c_int = 1; +pub const X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH: c_int = 31; +pub const X509_V_ERR_AKID_SKID_MISMATCH: c_int = 30; +pub const X509_V_ERR_APPLICATION_VERIFICATION: c_int = 50; +pub const X509_V_ERR_CERT_CHAIN_TOO_LONG: c_int = 22; +pub const X509_V_ERR_CERT_HAS_EXPIRED: c_int = 10; +pub const X509_V_ERR_CERT_NOT_YET_VALID: c_int = 9; +pub const X509_V_ERR_CERT_REJECTED: c_int = 28; +pub const X509_V_ERR_CERT_REVOKED: c_int = 23; +pub const X509_V_ERR_CERT_SIGNATURE_FAILURE: c_int = 7; +pub const X509_V_ERR_CERT_UNTRUSTED: c_int = 27; +pub const X509_V_ERR_CRL_HAS_EXPIRED: c_int = 12; +pub const X509_V_ERR_CRL_NOT_YET_VALID: c_int = 11; +pub const X509_V_ERR_CRL_PATH_VALIDATION_ERROR: c_int = 54; +pub const X509_V_ERR_CRL_SIGNATURE_FAILURE: c_int = 8; +pub const X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT: c_int = 18; +pub const X509_V_ERR_DIFFERENT_CRL_SCOPE: c_int = 44; +pub const X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD: c_int = 14; +pub const X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD: c_int = 13; +pub const X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD: c_int = 15; +pub const X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD: c_int = 16; +pub const X509_V_ERR_EXCLUDED_VIOLATION: c_int = 48; +pub const X509_V_ERR_INVALID_CA: c_int = 24; +pub const X509_V_ERR_INVALID_EXTENSION: c_int = 41; +pub const X509_V_ERR_INVALID_NON_CA: c_int = 37; +pub const X509_V_ERR_INVALID_POLICY_EXTENSION: c_int = 42; +pub const X509_V_ERR_INVALID_PURPOSE: c_int = 26; +pub const X509_V_ERR_KEYUSAGE_NO_CERTSIGN: c_int = 32; +pub const X509_V_ERR_KEYUSAGE_NO_CRL_SIGN: c_int = 35; +pub const X509_V_ERR_KEYUSAGE_NO_DIGITAL_SIGNATURE: c_int = 39; +pub const X509_V_ERR_NO_EXPLICIT_POLICY: c_int = 43; +pub const X509_V_ERR_OUT_OF_MEM: c_int = 17; +pub const X509_V_ERR_PATH_LENGTH_EXCEEDED: c_int = 25; +pub const X509_V_ERR_PERMITTED_VIOLATION: c_int = 47; +pub const X509_V_ERR_PROXY_CERTIFICATES_NOT_ALLOWED: c_int = 40; +pub const X509_V_ERR_PROXY_PATH_LENGTH_EXCEEDED: c_int = 38; +pub const X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN: c_int = 19; +pub const X509_V_ERR_SUBJECT_ISSUER_MISMATCH: c_int = 29; +pub const X509_V_ERR_SUBTREE_MINMAX: c_int = 49; +pub const X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY: c_int = 6; +pub const X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE: c_int = 4; +pub const X509_V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE: c_int = 5; +pub const X509_V_ERR_UNABLE_TO_GET_CRL: c_int = 3; +pub const X509_V_ERR_UNABLE_TO_GET_CRL_ISSUER: c_int = 33; +pub const X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT: c_int = 2; +pub const X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY: c_int = 20; +pub const X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE: c_int = 21; +pub const X509_V_ERR_UNHANDLED_CRITICAL_CRL_EXTENSION: c_int = 36; +pub const X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION: c_int = 34; +pub const X509_V_ERR_UNNESTED_RESOURCE: c_int = 46; +pub const X509_V_ERR_UNSUPPORTED_CONSTRAINT_SYNTAX: c_int = 52; +pub const X509_V_ERR_UNSUPPORTED_CONSTRAINT_TYPE: c_int = 51; +pub const X509_V_ERR_UNSUPPORTED_EXTENSION_FEATURE: c_int = 45; +pub const X509_V_ERR_UNSUPPORTED_NAME_SYNTAX: c_int = 53; +pub const X509_V_OK: c_int = 0; + +static mut MUTEXES: *mut Vec> = 0 as *mut Vec>; +static mut GUARDS: *mut Vec>> = 0 as *mut Vec>>; + +unsafe extern fn locking_function(mode: c_int, n: c_int, _file: *const c_char, + _line: c_int) { + let mutex = &(*MUTEXES)[n as usize]; + + if mode & CRYPTO_LOCK != 0 { + (*GUARDS)[n as usize] = Some(mutex.lock().unwrap()); + } else { + &(*GUARDS)[n as usize].take(); + } +} + +pub fn init() { + static INIT: Once = ONCE_INIT; + + INIT.call_once(|| { + unsafe { + SSL_library_init(); + SSL_load_error_strings(); + + let num_locks = CRYPTO_num_locks(); + let mut mutexes = Box::new(Vec::new()); + for _ in 0..num_locks { + mutexes.push(Mutex::new(())); + } + MUTEXES = mem::transmute(mutexes); + let guards: Box>>> = + Box::new((0..num_locks).map(|_| None).collect()); + GUARDS = mem::transmute(guards); + + CRYPTO_set_locking_callback(locking_function); + set_id_callback(); + } + }) +} + +#[cfg(unix)] +fn set_id_callback() { + unsafe extern "C" fn thread_id() -> c_ulong { + libc::pthread_self() as c_ulong + } + + unsafe { + CRYPTO_set_id_callback(thread_id); + } +} + +#[cfg(not(unix))] +fn set_id_callback() {} + +// True functions +extern "C" { + pub fn ASN1_INTEGER_set(dest: *mut ASN1_INTEGER, value: c_long) -> c_int; + pub fn ASN1_STRING_type_new(ty: c_int) -> *mut ASN1_STRING; + pub fn ASN1_TIME_free(tm: *mut ASN1_TIME); + + pub fn BIO_ctrl(b: *mut BIO, cmd: c_int, larg: c_long, parg: *mut c_void) -> c_long; + pub fn BIO_free_all(b: *mut BIO); + pub fn BIO_new(type_: *const BIO_METHOD) -> *mut BIO; + pub fn BIO_new_socket(sock: c_int, close_flag: c_int) -> *mut BIO; + pub fn BIO_read(b: *mut BIO, buf: *mut c_void, len: c_int) -> c_int; + pub fn BIO_write(b: *mut BIO, buf: *const c_void, len: c_int) -> c_int; + pub fn BIO_s_mem() -> *const BIO_METHOD; + + pub fn BN_new() -> *mut BIGNUM; + pub fn BN_dup(n: *mut BIGNUM) -> *mut BIGNUM; + pub fn BN_clear_free(bn: *mut BIGNUM); + + pub fn BN_CTX_new() -> *mut BN_CTX; + pub fn BN_CTX_free(ctx: *mut BN_CTX); + + pub fn BN_num_bits(bn: *mut BIGNUM) -> c_int; + pub fn BN_set_negative(bn: *mut BIGNUM, n: c_int); + pub fn BN_set_word(bn: *mut BIGNUM, n: c_ulong) -> c_int; + + /* Arithmetic operations on BIGNUMs */ + pub fn BN_add(r: *mut BIGNUM, a: *mut BIGNUM, b: *mut BIGNUM) -> c_int; + pub fn BN_div(dv: *mut BIGNUM, rem: *mut BIGNUM, a: *mut BIGNUM, b: *mut BIGNUM, ctx: *mut BN_CTX) -> c_int; + pub fn BN_exp(r: *mut BIGNUM, a: *mut BIGNUM, p: *mut BIGNUM, ctx: *mut BN_CTX) -> c_int; + pub fn BN_gcd(r: *mut BIGNUM, a: *mut BIGNUM, b: *mut BIGNUM, ctx: *mut BN_CTX) -> c_int; + pub fn BN_mod_add(r: *mut BIGNUM, a: *mut BIGNUM, b: *mut BIGNUM, m: *mut BIGNUM, ctx: *mut BN_CTX) -> c_int; + pub fn BN_mod_exp(r: *mut BIGNUM, a: *mut BIGNUM, p: *mut BIGNUM, m: *mut BIGNUM, ctx: *mut BN_CTX) -> c_int; + pub fn BN_mod_inverse(r: *mut BIGNUM, a: *mut BIGNUM, n: *mut BIGNUM, ctx: *mut BN_CTX) -> *const BIGNUM; + pub fn BN_mod_mul(r: *mut BIGNUM, a: *mut BIGNUM, b: *mut BIGNUM, m: *mut BIGNUM, ctx: *mut BN_CTX) -> c_int; + pub fn BN_mod_sqr(r: *mut BIGNUM, a: *mut BIGNUM, m: *mut BIGNUM, ctx: *mut BN_CTX) -> c_int; + pub fn BN_mod_sub(r: *mut BIGNUM, a: *mut BIGNUM, b: *mut BIGNUM, m: *mut BIGNUM, ctx: *mut BN_CTX) -> c_int; + pub fn BN_mul(r: *mut BIGNUM, a: *mut BIGNUM, b: *mut BIGNUM, ctx: *mut BN_CTX) -> c_int; + pub fn BN_nnmod(rem: *mut BIGNUM, a: *mut BIGNUM, m: *mut BIGNUM, ctx: *mut BN_CTX) -> c_int; + pub fn BN_add_word(r: *mut BIGNUM, w: c_ulong) -> c_int; + pub fn BN_sub_word(r: *mut BIGNUM, w: c_ulong) -> c_int; + pub fn BN_mul_word(r: *mut BIGNUM, w: c_ulong) -> c_int; + pub fn BN_div_word(r: *mut BIGNUM, w: c_ulong) -> c_ulong; + pub fn BN_mod_word(r: *const BIGNUM, w: c_ulong) -> c_ulong; + pub fn BN_sqr(r: *mut BIGNUM, a: *mut BIGNUM, ctx: *mut BN_CTX) -> c_int; + pub fn BN_sub(r: *mut BIGNUM, a: *mut BIGNUM, b: *mut BIGNUM) -> c_int; + + /* Bit operations on BIGNUMs */ + pub fn BN_clear_bit(a: *mut BIGNUM, n: c_int) -> c_int; + pub fn BN_is_bit_set(a: *mut BIGNUM, n: c_int) -> c_int; + pub fn BN_lshift(r: *mut BIGNUM, a: *mut BIGNUM, n: c_int) -> c_int; + pub fn BN_lshift1(r: *mut BIGNUM, a: *mut BIGNUM) -> c_int; + pub fn BN_mask_bits(a: *mut BIGNUM, n: c_int) -> c_int; + pub fn BN_rshift(r: *mut BIGNUM, a: *mut BIGNUM, n: c_int) -> c_int; + pub fn BN_set_bit(a: *mut BIGNUM, n: c_int) -> c_int; + pub fn BN_rshift1(r: *mut BIGNUM, a: *mut BIGNUM) -> c_int; + + /* Comparisons on BIGNUMs */ + pub fn BN_cmp(a: *mut BIGNUM, b: *mut BIGNUM) -> c_int; + pub fn BN_ucmp(a: *mut BIGNUM, b: *mut BIGNUM) -> c_int; + + /* Prime handling */ + pub fn BN_generate_prime_ex(r: *mut BIGNUM, bits: c_int, safe: c_int, add: *mut BIGNUM, rem: *mut BIGNUM, cb: *const c_void) -> c_int; + pub fn BN_is_prime_ex(p: *mut BIGNUM, checks: c_int, ctx: *mut BN_CTX, cb: *const c_void) -> c_int; + pub fn BN_is_prime_fasttest_ex(p: *mut BIGNUM, checks: c_int, ctx: *mut BN_CTX, do_trial_division: c_int, cb: *const c_void) -> c_int; + + /* Random number handling */ + pub fn BN_rand(r: *mut BIGNUM, bits: c_int, top: c_int, bottom: c_int) -> c_int; + pub fn BN_pseudo_rand(r: *mut BIGNUM, bits: c_int, top: c_int, bottom: c_int) -> c_int; + pub fn BN_rand_range(r: *mut BIGNUM, range: *mut BIGNUM) -> c_int; + pub fn BN_pseudo_rand_range(r: *mut BIGNUM, range: *mut BIGNUM) -> c_int; + + /* Conversion from/to binary representation */ + pub fn BN_bin2bn(s: *const u8, size: c_int, ret: *mut BIGNUM) -> *mut BIGNUM; + pub fn BN_bn2bin(a: *mut BIGNUM, to: *mut u8) -> c_int; + + /* Conversion from/to decimal string representation */ + pub fn BN_dec2bn(a: *const *mut BIGNUM, s: *const c_char) -> c_int; + pub fn BN_bn2dec(a: *mut BIGNUM) -> *const c_char; + + /* Conversion from/to hexidecimal string representation */ + pub fn BN_hex2bn(a: *const *mut BIGNUM, s: *const c_char) -> c_int; + pub fn BN_bn2hex(a: *mut BIGNUM) -> *const c_char; + + pub fn CRYPTO_num_locks() -> c_int; + pub fn CRYPTO_set_locking_callback(func: unsafe extern "C" fn(mode: c_int, + n: c_int, + file: *const c_char, + line: c_int)); + pub fn CRYPTO_set_id_callback(func: unsafe extern "C" fn() -> c_ulong); + pub fn CRYPTO_free(buf: *mut c_void); + pub fn CRYPTO_memcmp(a: *const c_void, b: *const c_void, + len: size_t) -> c_int; + + pub fn DH_free(dh: *mut DH); + + #[cfg(feature = "rfc5114")] + pub fn DH_get_1024_160() -> *mut DH; + #[cfg(feature = "rfc5114")] + pub fn DH_get_2048_224() -> *mut DH; + #[cfg(feature = "rfc5114")] + pub fn DH_get_2048_256() -> *mut DH; + + pub fn DH_new_from_params(p: *mut BIGNUM, g: *mut BIGNUM, q: *mut BIGNUM) -> *mut DH; + + pub fn ERR_get_error() -> c_ulong; + + pub fn ERR_lib_error_string(err: c_ulong) -> *const c_char; + pub fn ERR_func_error_string(err: c_ulong) -> *const c_char; + pub fn ERR_reason_error_string(err: c_ulong) -> *const c_char; + + pub fn ERR_load_crypto_strings(); + + pub fn EVP_md5() -> *const EVP_MD; + pub fn EVP_ripemd160() -> *const EVP_MD; + pub fn EVP_sha1() -> *const EVP_MD; + pub fn EVP_sha224() -> *const EVP_MD; + pub fn EVP_sha256() -> *const EVP_MD; + pub fn EVP_sha384() -> *const EVP_MD; + pub fn EVP_sha512() -> *const EVP_MD; + + pub fn EVP_aes_128_cbc() -> *const EVP_CIPHER; + pub fn EVP_aes_128_ecb() -> *const EVP_CIPHER; + #[cfg(feature = "aes_xts")] + pub fn EVP_aes_128_xts() -> *const EVP_CIPHER; + #[cfg(feature = "aes_ctr")] + pub fn EVP_aes_128_ctr() -> *const EVP_CIPHER; + // fn EVP_aes_128_gcm() -> EVP_CIPHER; + pub fn EVP_aes_128_cfb1() -> *const EVP_CIPHER; + pub fn EVP_aes_128_cfb128() -> *const EVP_CIPHER; + pub fn EVP_aes_128_cfb8() -> *const EVP_CIPHER; + pub fn EVP_aes_256_cbc() -> *const EVP_CIPHER; + pub fn EVP_aes_256_ecb() -> *const EVP_CIPHER; + #[cfg(feature = "aes_xts")] + pub fn EVP_aes_256_xts() -> *const EVP_CIPHER; + #[cfg(feature = "aes_ctr")] + pub fn EVP_aes_256_ctr() -> *const EVP_CIPHER; + // fn EVP_aes_256_gcm() -> EVP_CIPHER; + pub fn EVP_aes_256_cfb1() -> *const EVP_CIPHER; + pub fn EVP_aes_256_cfb128() -> *const EVP_CIPHER; + pub fn EVP_aes_256_cfb8() -> *const EVP_CIPHER; + pub fn EVP_rc4() -> *const EVP_CIPHER; + + pub fn EVP_BytesToKey(typ: *const EVP_CIPHER, md: *const EVP_MD, + salt: *const u8, data: *const u8, datalen: c_int, + count: c_int, key: *mut u8, iv: *mut u8) -> c_int; + + pub fn EVP_CIPHER_CTX_new() -> *mut EVP_CIPHER_CTX; + pub fn EVP_CIPHER_CTX_set_padding(ctx: *mut EVP_CIPHER_CTX, padding: c_int) -> c_int; + pub fn EVP_CIPHER_CTX_free(ctx: *mut EVP_CIPHER_CTX); + + pub fn EVP_CipherInit(ctx: *mut EVP_CIPHER_CTX, evp: *const EVP_CIPHER, + key: *const u8, iv: *const u8, mode: c_int) -> c_int; + pub fn EVP_CipherUpdate(ctx: *mut EVP_CIPHER_CTX, outbuf: *mut u8, + outlen: &mut c_int, inbuf: *const u8, inlen: c_int) -> c_int; + pub fn EVP_CipherFinal(ctx: *mut EVP_CIPHER_CTX, res: *mut u8, len: &mut c_int) -> c_int; + + pub fn EVP_DigestInit(ctx: *mut EVP_MD_CTX, typ: *const EVP_MD) -> c_int; + pub fn EVP_DigestInit_ex(ctx: *mut EVP_MD_CTX, typ: *const EVP_MD, imple: *const ENGINE) -> c_int; + pub fn EVP_DigestUpdate(ctx: *mut EVP_MD_CTX, data: *const u8, n: c_uint) -> c_int; + pub fn EVP_DigestFinal(ctx: *mut EVP_MD_CTX, res: *mut u8, n: *mut u32) -> c_int; + pub fn EVP_DigestFinal_ex(ctx: *mut EVP_MD_CTX, res: *mut u8, n: *mut u32) -> c_int; + + pub fn EVP_MD_CTX_create() -> *mut EVP_MD_CTX; + pub fn EVP_MD_CTX_copy_ex(dst: *mut EVP_MD_CTX, src: *const EVP_MD_CTX) -> c_int; + pub fn EVP_MD_CTX_destroy(ctx: *mut EVP_MD_CTX); + + pub fn EVP_PKEY_new() -> *mut EVP_PKEY; + pub fn EVP_PKEY_free(k: *mut EVP_PKEY); + pub fn EVP_PKEY_assign(pkey: *mut EVP_PKEY, typ: c_int, key: *const c_void) -> c_int; + pub fn EVP_PKEY_get1_RSA(k: *mut EVP_PKEY) -> *mut RSA; + pub fn EVP_PKEY_set1_RSA(k: *mut EVP_PKEY, r: *mut RSA) -> c_int; + pub fn EVP_PKEY_cmp(a: *const EVP_PKEY, b: *const EVP_PKEY) -> c_int; + + pub fn HMAC_CTX_init(ctx: *mut HMAC_CTX); + pub fn HMAC_CTX_cleanup(ctx: *mut HMAC_CTX); + + pub fn PEM_read_bio_DHparams(bio: *mut BIO, out: *mut *mut DH, callback: Option, + user_data: *mut c_void) -> *mut DH; + pub fn PEM_read_bio_X509(bio: *mut BIO, out: *mut *mut X509, callback: Option, + user_data: *mut c_void) -> *mut X509; + pub fn PEM_read_bio_X509_REQ(bio: *mut BIO, out: *mut *mut X509_REQ, callback: Option, + user_data: *mut c_void) -> *mut X509_REQ; + pub fn PEM_read_bio_PrivateKey(bio: *mut BIO, out: *mut *mut EVP_PKEY, callback: Option, + user_data: *mut c_void) -> *mut X509; + pub fn PEM_read_bio_PUBKEY(bio: *mut BIO, out: *mut *mut EVP_PKEY, callback: Option, + user_data: *mut c_void) -> *mut X509; + + pub fn PEM_read_bio_RSAPrivateKey(bio: *mut BIO, rsa: *mut *mut RSA, callback: Option, user_data: *mut c_void) -> *mut RSA; + pub fn PEM_read_bio_RSA_PUBKEY(bio: *mut BIO, rsa: *mut *mut RSA, callback: Option, user_data: *mut c_void) -> *mut RSA; + + pub fn PEM_write_bio_PrivateKey(bio: *mut BIO, pkey: *mut EVP_PKEY, cipher: *const EVP_CIPHER, + kstr: *mut c_char, klen: c_int, + callback: Option, + user_data: *mut c_void) -> c_int; + pub fn PEM_write_bio_PUBKEY(bp: *mut BIO, x: *mut EVP_PKEY) -> c_int; + pub fn PEM_write_bio_X509(bio: *mut BIO, x509: *mut X509) -> c_int; + pub fn PEM_write_bio_X509_REQ(bio: *mut BIO, x509: *mut X509_REQ) -> c_int; + + pub fn PKCS5_PBKDF2_HMAC_SHA1(pass: *const u8, passlen: c_int, + salt: *const u8, saltlen: c_int, + iter: c_int, keylen: c_int, + out: *mut u8) -> c_int; + #[cfg(feature = "pkcs5_pbkdf2_hmac")] + pub fn PKCS5_PBKDF2_HMAC(pass: *const u8, passlen: c_int, + salt: *const u8, saltlen: c_int, + iter: c_int, digest: *const EVP_MD, keylen: c_int, + out: *mut u8) -> c_int; + + pub fn RAND_bytes(buf: *mut u8, num: c_int) -> c_int; + + pub fn RSA_new() -> *mut RSA; + pub fn RSA_free(rsa: *mut RSA); + pub fn RSA_generate_key(modsz: c_int, e: c_ulong, cb: *const c_void, cbarg: *const c_void) -> *mut RSA; + pub fn RSA_generate_key_ex(rsa: *mut RSA, bits: c_int, e: *mut BIGNUM, cb: *const c_void) -> c_int; + pub fn RSA_private_decrypt(flen: c_int, from: *const u8, to: *mut u8, k: *mut RSA, + pad: c_int) -> c_int; + pub fn RSA_public_decrypt(flen: c_int, from: *const u8, to: *mut u8, k: *mut RSA, + pad: c_int) -> c_int; + pub fn RSA_private_encrypt(flen: c_int, from: *const u8, to: *mut u8, k: *mut RSA, + pad: c_int) -> c_int; + pub fn RSA_public_encrypt(flen: c_int, from: *const u8, to: *mut u8, k: *mut RSA, + pad: c_int) -> c_int; + pub fn RSA_sign(t: c_int, m: *const u8, mlen: c_uint, sig: *mut u8, siglen: *mut c_uint, + k: *mut RSA) -> c_int; + pub fn RSA_size(k: *mut RSA) -> c_int; + pub fn RSA_verify(t: c_int, m: *const u8, mlen: c_uint, sig: *const u8, siglen: c_uint, + k: *mut RSA) -> c_int; + + pub fn SSL_library_init() -> c_int; + + pub fn SSL_load_error_strings(); + + #[cfg(feature = "sslv2")] + pub fn SSLv2_method() -> *const SSL_METHOD; + pub fn SSLv3_method() -> *const SSL_METHOD; + pub fn TLSv1_method() -> *const SSL_METHOD; + #[cfg(feature = "tlsv1_1")] + pub fn TLSv1_1_method() -> *const SSL_METHOD; + #[cfg(feature = "tlsv1_2")] + pub fn TLSv1_2_method() -> *const SSL_METHOD; + #[cfg(feature = "dtlsv1")] + pub fn DTLSv1_method() -> *const SSL_METHOD; + #[cfg(feature = "dtlsv1_2")] + pub fn DTLSv1_2_method() -> *const SSL_METHOD; + pub fn SSLv23_method() -> *const SSL_METHOD; + + pub fn SSL_new(ctx: *mut SSL_CTX) -> *mut SSL; + pub fn SSL_pending(ssl: *const SSL) -> c_int; + pub fn SSL_free(ssl: *mut SSL); + pub fn SSL_set_bio(ssl: *mut SSL, rbio: *mut BIO, wbio: *mut BIO); + pub fn SSL_get_rbio(ssl: *mut SSL) -> *mut BIO; + pub fn SSL_get_wbio(ssl: *mut SSL) -> *mut BIO; + pub fn SSL_accept(ssl: *mut SSL) -> c_int; + pub fn SSL_connect(ssl: *mut SSL) -> c_int; + pub fn SSL_ctrl(ssl: *mut SSL, cmd: c_int, larg: c_long, + parg: *mut c_void) -> c_long; + pub fn SSL_get_error(ssl: *mut SSL, ret: c_int) -> c_int; + pub fn SSL_read(ssl: *mut SSL, buf: *mut c_void, num: c_int) -> c_int; + pub fn SSL_write(ssl: *mut SSL, buf: *const c_void, num: c_int) -> c_int; + pub fn SSL_get_ex_data_X509_STORE_CTX_idx() -> c_int; + pub fn SSL_get_SSL_CTX(ssl: *mut SSL) -> *mut SSL_CTX; + pub fn SSL_set_SSL_CTX(ssl: *mut SSL, ctx: *mut SSL_CTX) -> *mut SSL_CTX; + pub fn SSL_get_current_compression(ssl: *mut SSL) -> *const COMP_METHOD; + pub fn SSL_get_peer_certificate(ssl: *mut SSL) -> *mut X509; + pub fn SSL_get_ssl_method(ssl: *mut SSL) -> *const SSL_METHOD; + pub fn SSL_get_version(ssl: *mut SSL) -> *const c_char; + pub fn SSL_state_string(ssl: *mut SSL) -> *const c_char; + pub fn SSL_state_string_long(ssl: *mut SSL) -> *const c_char; + + pub fn SSL_get_servername(ssl: *const SSL, name_type: c_long) -> *const c_char; + + pub fn SSL_COMP_get_name(comp: *const COMP_METHOD) -> *const c_char; + + pub fn SSL_get_current_cipher(ssl: *const SSL) -> *const SSL_CIPHER; + + pub fn SSL_CIPHER_get_name(cipher: *const SSL_CIPHER) -> *const c_char; + pub fn SSL_CIPHER_get_bits(cipher: *const SSL_CIPHER, alg_bits: *const c_int) -> c_int; + pub fn SSL_CIPHER_get_version(cipher: *const SSL_CIPHER) -> *const c_char; + pub fn SSL_CIPHER_description(cipher: *const SSL_CIPHER, buf: *mut c_char, size: c_int) -> *const c_char; + + pub fn SSL_CTX_new(method: *const SSL_METHOD) -> *mut SSL_CTX; + pub fn SSL_CTX_free(ctx: *mut SSL_CTX); + pub fn SSL_CTX_set_verify(ctx: *mut SSL_CTX, mode: c_int, + verify_callback: Option c_int>); + pub fn SSL_CTX_set_verify_depth(ctx: *mut SSL_CTX, depth: c_int); + pub fn SSL_CTX_load_verify_locations(ctx: *mut SSL_CTX, CAfile: *const c_char, + CApath: *const c_char) -> c_int; + pub fn SSL_CTX_get_ex_new_index(argl: c_long, argp: *const c_void, + new_func: Option, + dup_func: Option, + free_func: Option) + -> c_int; + pub fn SSL_CTX_set_ex_data(ctx: *mut SSL_CTX, idx: c_int, data: *mut c_void) + -> c_int; + pub fn SSL_CTX_get_ex_data(ctx: *mut SSL_CTX, idx: c_int) -> *mut c_void; + + pub fn SSL_CTX_use_certificate_file(ctx: *mut SSL_CTX, cert_file: *const c_char, file_type: c_int) -> c_int; + pub fn SSL_CTX_use_certificate_chain_file(ctx: *mut SSL_CTX, cert_chain_file: *const c_char, file_type: c_int) -> c_int; + pub fn SSL_CTX_use_certificate(ctx: *mut SSL_CTX, cert: *mut X509) -> c_int; + + pub fn SSL_CTX_use_PrivateKey_file(ctx: *mut SSL_CTX, key_file: *const c_char, file_type: c_int) -> c_int; + pub fn SSL_CTX_use_PrivateKey(ctx: *mut SSL_CTX, key: *mut EVP_PKEY) -> c_int; + pub fn SSL_CTX_check_private_key(ctx: *mut SSL_CTX) -> c_int; + + pub fn SSL_CTX_set_cipher_list(ssl: *mut SSL_CTX, s: *const c_char) -> c_int; + + #[cfg(feature = "npn")] + pub fn SSL_CTX_set_next_protos_advertised_cb(ssl: *mut SSL_CTX, + cb: extern "C" fn(ssl: *mut SSL, + out: *mut *const c_uchar, + outlen: *mut c_uint, + arg: *mut c_void) -> c_int, + arg: *mut c_void); + #[cfg(feature = "npn")] + pub fn SSL_CTX_set_next_proto_select_cb(ssl: *mut SSL_CTX, + cb: extern "C" fn(ssl: *mut SSL, + out: *mut *mut c_uchar, + outlen: *mut c_uchar, + inbuf: *const c_uchar, + inlen: c_uint, + arg: *mut c_void) -> c_int, + arg: *mut c_void); + #[cfg(any(feature = "alpn", feature = "npn"))] + pub fn SSL_select_next_proto(out: *mut *mut c_uchar, outlen: *mut c_uchar, + inbuf: *const c_uchar, inlen: c_uint, + client: *const c_uchar, client_len: c_uint) -> c_int; + #[cfg(feature = "npn")] + pub fn SSL_get0_next_proto_negotiated(s: *const SSL, data: *mut *const c_uchar, len: *mut c_uint); + + #[cfg(feature = "alpn")] + pub fn SSL_CTX_set_alpn_protos(s: *mut SSL_CTX, data: *const c_uchar, len: c_uint) -> c_int; + + #[cfg(feature = "alpn")] + pub fn SSL_set_alpn_protos(s: *mut SSL, data: *const c_uchar, len: c_uint) -> c_int; + + #[cfg(feature = "alpn")] + pub fn SSL_CTX_set_alpn_select_cb(ssl: *mut SSL_CTX, + cb: extern "C" fn(ssl: *mut SSL, + out: *mut *mut c_uchar, + outlen: *mut c_uchar, + inbuf: *const c_uchar, + inlen: c_uint, + arg: *mut c_void) -> c_int, + arg: *mut c_void); + #[cfg(feature = "alpn")] + pub fn SSL_get0_alpn_selected(s: *const SSL, data: *mut *const c_uchar, len: *mut c_uint); + + pub fn X509_add_ext(x: *mut X509, ext: *mut X509_EXTENSION, loc: c_int) -> c_int; + pub fn X509_digest(x: *mut X509, digest: *const EVP_MD, buf: *mut c_char, len: *mut c_uint) -> c_int; + pub fn X509_free(x: *mut X509); + pub fn X509_REQ_free(x: *mut X509_REQ); + pub fn X509_get_serialNumber(x: *mut X509) -> *mut ASN1_INTEGER; + pub fn X509_get_subject_name(x: *mut X509) -> *mut X509_NAME; + pub fn X509_gmtime_adj(time: *mut ASN1_TIME, adj: c_long) -> *mut ASN1_TIME; + pub fn X509_new() -> *mut X509; + pub fn X509_set_issuer_name(x: *mut X509, name: *mut X509_NAME) -> c_int; + pub fn X509_set_notAfter(x: *mut X509, tm: *const ASN1_TIME) -> c_int; + pub fn X509_set_notBefore(x: *mut X509, tm: *const ASN1_TIME) -> c_int; + pub fn X509_set_version(x: *mut X509, version: c_ulong) -> c_int; + pub fn X509_set_pubkey(x: *mut X509, pkey: *mut EVP_PKEY) -> c_int; + pub fn X509_sign(x: *mut X509, pkey: *mut EVP_PKEY, md: *const EVP_MD) -> c_int; + pub fn X509_get_pubkey(x: *mut X509) -> *mut EVP_PKEY; + pub fn X509_to_X509_REQ(x: *mut X509, pkey: *mut EVP_PKEY, md: *const EVP_MD) -> *mut X509_REQ; + + pub fn X509_EXTENSION_free(ext: *mut X509_EXTENSION); + + pub fn X509_NAME_add_entry_by_txt(x: *mut X509, field: *const c_char, ty: c_int, bytes: *const c_char, len: c_int, loc: c_int, set: c_int) -> c_int; + pub fn X509_NAME_get_index_by_NID(n: *mut X509_NAME, nid: c_int, last_pos: c_int) ->c_int; + pub fn X509_NAME_get_entry(n: *mut X509_NAME, loc: c_int) -> *mut X509_NAME_ENTRY; + pub fn X509_NAME_ENTRY_get_data(ne: *mut X509_NAME_ENTRY) -> *mut ASN1_STRING; + + pub fn ASN1_STRING_to_UTF8(out: *mut *mut c_char, s: *mut ASN1_STRING) -> c_int; + + pub fn X509_STORE_CTX_get_current_cert(ct: *mut X509_STORE_CTX) -> *mut X509; + pub fn X509_STORE_CTX_get_error(ctx: *mut X509_STORE_CTX) -> c_int; + pub fn X509_STORE_CTX_get_ex_data(ctx: *mut X509_STORE_CTX, idx: c_int) -> *mut c_void; + + pub fn X509V3_EXT_conf_nid(conf: *mut c_void, ctx: *mut X509V3_CTX, ext_nid: c_int, value: *mut c_char) -> *mut X509_EXTENSION; + pub fn X509V3_EXT_conf(conf: *mut c_void, ctx: *mut X509V3_CTX, name: *mut c_char, value: *mut c_char) -> *mut X509_EXTENSION; + pub fn X509V3_set_ctx(ctx: *mut X509V3_CTX, issuer: *mut X509, subject: *mut X509, req: *mut X509_REQ, crl: *mut X509_CRL, flags: c_int); + + pub fn X509_REQ_add_extensions(req: *mut X509_REQ, exts: *mut stack_st_X509_EXTENSION) -> c_int; + pub fn X509_REQ_sign(x: *mut X509_REQ, pkey: *mut EVP_PKEY, md: *const EVP_MD) -> c_int; + + pub fn i2d_RSA_PUBKEY(k: *mut RSA, buf: *const *mut u8) -> c_int; + pub fn d2i_RSA_PUBKEY(k: *const *mut RSA, buf: *const *const u8, len: c_uint) -> *mut RSA; + pub fn i2d_RSAPrivateKey(k: *mut RSA, buf: *const *mut u8) -> c_int; + pub fn d2i_RSAPrivateKey(k: *const *mut RSA, buf: *const *const u8, len: c_uint) -> *mut RSA; +} + +pub mod probe; diff --git a/deps/openssl-sys-0.7.6/src/probe.rs b/deps/openssl-sys-0.7.8/src/probe.rs similarity index 100% rename from deps/openssl-sys-0.7.6/src/probe.rs rename to deps/openssl-sys-0.7.8/src/probe.rs diff --git a/deps/pkg-config-0.3.6/.travis.yml b/deps/pkg-config-0.3.6/.travis.yml deleted file mode 100644 index c56bccdb9..000000000 --- a/deps/pkg-config-0.3.6/.travis.yml +++ /dev/null @@ -1,25 +0,0 @@ -language: rust -rust: - - 1.0.0 - - beta - - nightly -sudo: false -script: - - cargo build --verbose - - | - [ $TRAVIS_RUST_VERSION != nightly ] || cargo test --verbose - - cargo doc -after_success: | - [ $TRAVIS_BRANCH = master ] && - [ $TRAVIS_PULL_REQUEST = false ] && - [ $TRAVIS_RUST_VERSION = nightly ] && - echo '' > target/doc/index.html && - pip install ghp-import --user $USER && - $HOME/.local/bin/ghp-import -n target/doc && - git push -qf https://${TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages -env: - global: - secure: XlfwiQ+fPgRWqFwHbyPTma2FAVtgN+IXFpkiIdh1sKxWEeHMqABrTtOKf/NugDYCGsOJfr2vb5qFL6teBV2lTXOffUIWj+1hMd0N/FbVKWzABBV02XdxQi8w2ptPez5LPRTEfXJRRHmJpc8ww2aCTIrdT3AQE2oqZM/jHJTi/1U= -notifications: - email: - on_success: never diff --git a/deps/pkg-config-0.3.6/Cargo.toml b/deps/pkg-config-0.3.6/Cargo.toml deleted file mode 100644 index 314861b9e..000000000 --- a/deps/pkg-config-0.3.6/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] - -name = "pkg-config" -version = "0.3.6" -authors = ["Alex Crichton "] -license = "MIT/Apache-2.0" -repository = "https://github.com/alexcrichton/pkg-config-rs" -documentation = "http://alexcrichton.com/pkg-config-rs" -description = """ -A library to run the pkg-config system tool at build time in order to be used in -Cargo build scripts. -""" -keywords = ["build-dependencies"] diff --git a/deps/pkg-config-0.3.6/src/lib.rs b/deps/pkg-config-0.3.6/src/lib.rs deleted file mode 100644 index 491789197..000000000 --- a/deps/pkg-config-0.3.6/src/lib.rs +++ /dev/null @@ -1,298 +0,0 @@ -//! A build dependency for Cargo libraries to find system artifacts through the -//! `pkg-config` utility. -//! -//! This library will shell out to `pkg-config` as part of build scripts and -//! probe the system to determine how to link to a specified library. The -//! `Config` structure serves as a method of configuring how `pkg-config` is -//! invoked in a builder style. -//! -//! A number of environment variables are available to globally configure how -//! this crate will invoke `pkg-config`: -//! -//! * `PKG_CONFIG_ALLOW_CROSS` - if this variable is not set, then `pkg-config` -//! will automatically be disabled for all cross compiles. -//! * `FOO_NO_PKG_CONFIG` - if set, this will disable running `pkg-config` when -//! probing for the library named `foo`. -//! -//! There are also a number of environment variables which can configure how a -//! library is linked to (dynamically vs statically). These variables control -//! whether the `--static` flag is passed. Note that this behavior can be -//! overridden by configuring explicitly on `Config`. The variables are checked -//! in the following order: -//! -//! * `FOO_STATIC` - pass `--static` for the library `foo` -//! * `FOO_DYNAMIC` - do not pass `--static` for the library `foo` -//! * `PKG_CONFIG_ALL_STATIC` - pass `--static` for all libraries -//! * `PKG_CONFIG_ALL_DYNAMIC` - do not pass `--static` for all libraries -//! -//! After running `pkg-config` all appropriate Cargo metadata will be printed on -//! stdout if the search was successful. -//! -//! # Example -//! -//! Find the system library named `foo`. -//! -//! ```no_run -//! extern crate pkg_config; -//! -//! fn main() { -//! pkg_config::find_library("foo").unwrap(); -//! } -//! ``` -//! -//! Configure how library `foo` is linked to. -//! -//! ```no_run -//! extern crate pkg_config; -//! -//! fn main() { -//! pkg_config::Config::new().statik(true).find("foo").unwrap(); -//! } -//! ``` - -#![doc(html_root_url = "http://alexcrichton.com/pkg-config-rs")] -#![cfg_attr(test, deny(warnings))] - -use std::ascii::AsciiExt; -use std::env; -use std::ffi::{OsStr, OsString}; -use std::fs; -use std::path::{PathBuf, Path}; -use std::process::Command; -use std::str; - -pub fn target_supported() -> bool { - let target = env::var("TARGET").unwrap_or(String::new()); - let host = env::var("HOST").unwrap_or(String::new()); - - // Only use pkg-config in host == target situations by default (allowing an - // override) and then also don't use pkg-config on MSVC as it's really not - // meant to work there but when building MSVC code in a MSYS shell we may be - // able to run pkg-config anyway. - (host == target || env::var_os("PKG_CONFIG_ALLOW_CROSS").is_some()) && - !target.contains("msvc") -} - -#[derive(Clone)] -pub struct Config { - statik: Option, - atleast_version: Option, - extra_args: Vec, -} - -#[derive(Debug)] -pub struct Library { - pub libs: Vec, - pub link_paths: Vec, - pub frameworks: Vec, - pub framework_paths: Vec, - pub include_paths: Vec, - pub version: String, - _priv: (), -} - -/// Simple shortcut for using all default options for finding a library. -pub fn find_library(name: &str) -> Result { - Config::new().find(name) -} - -impl Config { - /// Creates a new set of configuration options which are all initially set - /// to "blank". - pub fn new() -> Config { - Config { - statik: None, - atleast_version: None, - extra_args: vec![], - } - } - - /// Indicate whether the `--static` flag should be passed. - /// - /// This will override the inference from environment variables described in - /// the crate documentation. - pub fn statik(&mut self, statik: bool) -> &mut Config { - self.statik = Some(statik); - self - } - - /// Indicate that the library must be at least version `vers`. - pub fn atleast_version(&mut self, vers: &str) -> &mut Config { - self.atleast_version = Some(vers.to_string()); - self - } - - /// Add an argument to pass to pkg-config. - /// - /// It's placed after all of the arguments generated by this library. - pub fn arg>(&mut self, arg: S) -> &mut Config { - self.extra_args.push(arg.as_ref().to_os_string()); - self - } - - /// Run `pkg-config` to find the library `name`. - /// - /// This will use all configuration previously set to specify how - /// `pkg-config` is run. - pub fn find(&self, name: &str) -> Result { - if env::var_os(&format!("{}_NO_PKG_CONFIG", envify(name))).is_some() { - return Err(format!("pkg-config requested to be aborted for {}", name)) - } else if !target_supported() { - return Err("pkg-config doesn't handle cross compilation. Use \ - PKG_CONFIG_ALLOW_CROSS=1 to override".to_string()); - } - - let mut library = Library::new(); - - let output = try!(run(self.command(name, &["--libs", "--cflags"]))); - library.parse_libs_cflags(name, &output, self); - - let output = try!(run(self.command(name, &["--modversion"]))); - library.parse_modversion(&output); - - Ok(library) - } - - /// Run `pkg-config` to get the value of a variable from a package using - /// --variable. - pub fn get_variable(package: &str, variable: &str) -> Result { - let arg = format!("--variable={}", variable); - let cfg = Config::new(); - Ok(try!(run(cfg.command(package, &[&arg]))).trim_right().to_owned()) - } - - fn is_static(&self, name: &str) -> bool { - self.statik.unwrap_or_else(|| infer_static(name)) - } - - fn command(&self, name: &str, args: &[&str]) -> Command { - let mut cmd = Command::new("pkg-config"); - if self.is_static(name) { - cmd.arg("--static"); - } - cmd.args(args) - .args(&self.extra_args) - .env("PKG_CONFIG_ALLOW_SYSTEM_LIBS", "1"); - if let Some(ref version) = self.atleast_version { - cmd.arg(&format!("{} >= {}", name, version)); - } else { - cmd.arg(name); - } - cmd - } -} - -impl Library { - fn new() -> Library { - Library { - libs: Vec::new(), - link_paths: Vec::new(), - include_paths: Vec::new(), - frameworks: Vec::new(), - framework_paths: Vec::new(), - version: String::new(), - _priv: (), - } - } - - fn parse_libs_cflags(&mut self, name: &str, output: &str, config: &Config) { - let parts = output.split(' ') - .filter(|l| l.len() > 2) - .map(|arg| (&arg[0..2], &arg[2..])) - .collect::>(); - - let mut dirs = Vec::new(); - let statik = config.is_static(name); - for &(flag, val) in parts.iter() { - match flag { - "-L" => { - println!("cargo:rustc-link-search=native={}", val); - dirs.push(PathBuf::from(val)); - self.link_paths.push(PathBuf::from(val)); - } - "-F" => { - println!("cargo:rustc-link-search=framework={}", val); - self.framework_paths.push(PathBuf::from(val)); - } - "-I" => { - self.include_paths.push(PathBuf::from(val)); - } - "-l" => { - self.libs.push(val.to_string()); - if statik && !is_system(val, &dirs) { - println!("cargo:rustc-link-lib=static={}", val); - } else { - println!("cargo:rustc-link-lib={}", val); - } - } - _ => {} - } - } - - let mut iter = output.split(' '); - while let Some(part) = iter.next() { - if part != "-framework" { continue } - if let Some(lib) = iter.next() { - println!("cargo:rustc-link-lib=framework={}", lib); - self.frameworks.push(lib.to_string()); - } - } - } - - fn parse_modversion(&mut self, output: &str) { - self.version.push_str(output.trim()); - } -} - -fn infer_static(name: &str) -> bool { - let name = envify(name); - if env::var_os(&format!("{}_STATIC", name)).is_some() { - true - } else if env::var_os(&format!("{}_DYNAMIC", name)).is_some() { - false - } else if env::var_os("PKG_CONFIG_ALL_STATIC").is_some() { - true - } else if env::var_os("PKG_CONFIG_ALL_DYNAMIC").is_some() { - false - } else { - false - } -} - -fn envify(name: &str) -> String { - name.chars().map(|c| c.to_ascii_uppercase()).map(|c| { - if c == '-' {'_'} else {c} - }).collect() -} - -fn is_system(name: &str, dirs: &[PathBuf]) -> bool { - let libname = format!("lib{}.a", name); - let root = Path::new("/usr"); - !dirs.iter().any(|d| { - !d.starts_with(root) && fs::metadata(&d.join(&libname)).is_ok() - }) -} - -fn run(mut cmd: Command) -> Result { - let out = try!(cmd.output().map_err(|e| { - format!("failed to run `{:?}`: {}", cmd, e) - })); - - let stdout = String::from_utf8(out.stdout).unwrap(); - if out.status.success() { - return Ok(stdout); - } - - let stderr = str::from_utf8(&out.stderr).unwrap(); - let mut msg = format!("`{:?}` did not exit successfully: {}", cmd, out.status); - if stdout.len() > 0 { - msg.push_str("\n--- stdout\n"); - msg.push_str(&stdout); - } - if stderr.len() > 0 { - msg.push_str("\n--- stderr\n"); - msg.push_str(stderr); - } - - return Err(msg); -} diff --git a/deps/pkg-config-0.3.6/tests/test.rs b/deps/pkg-config-0.3.6/tests/test.rs deleted file mode 100644 index 370aa58f5..000000000 --- a/deps/pkg-config-0.3.6/tests/test.rs +++ /dev/null @@ -1,86 +0,0 @@ -#![feature(static_mutex)] - -extern crate pkg_config; - -use std::env; -use std::sync::{StaticMutex, MUTEX_INIT}; -use std::path::PathBuf; - -static LOCK: StaticMutex = MUTEX_INIT; - -fn reset() { - for (k, _) in env::vars() { - if k.contains("PKG_CONFIG") || k.contains("DYNAMIC") || - k.contains("STATIC") { - env::remove_var(&k); - } - } - env::remove_var("TARGET"); - env::remove_var("HOST"); - env::set_var("PKG_CONFIG_PATH", &env::current_dir().unwrap().join("tests")); -} - -fn find(name: &str) -> Result { - pkg_config::find_library(name) -} - -#[test] -fn cross_disabled() { - let _g = LOCK.lock(); - reset(); - env::set_var("TARGET", "foo"); - env::set_var("HOST", "bar"); - find("foo").unwrap_err(); -} - -#[test] -fn cross_enabled() { - let _g = LOCK.lock(); - reset(); - env::set_var("TARGET", "foo"); - env::set_var("HOST", "bar"); - env::set_var("PKG_CONFIG_ALLOW_CROSS", "1"); - find("foo").unwrap(); -} - -#[test] -fn package_disabled() { - let _g = LOCK.lock(); - reset(); - env::set_var("FOO_NO_PKG_CONFIG", "1"); - find("foo").unwrap_err(); -} - -#[test] -fn output_ok() { - let _g = LOCK.lock(); - reset(); - let lib = find("foo").unwrap(); - assert!(lib.libs.contains(&"gcc".to_string())); - assert!(lib.libs.contains(&"coregrind-amd64-linux".to_string())); - assert!(lib.link_paths.contains(&PathBuf::from("/usr/lib/valgrind"))); -} - -#[test] -fn framework() { - let _g = LOCK.lock(); - reset(); - let lib = find("framework").unwrap(); - assert!(lib.frameworks.contains(&"foo".to_string())); - assert!(lib.framework_paths.contains(&PathBuf::from("/usr/lib"))); -} - -#[test] -fn get_variable() { - let _g = LOCK.lock(); - reset(); - let prefix = pkg_config::Config::get_variable("foo", "prefix").unwrap(); - assert_eq!(prefix, "/usr"); -} - -#[test] -fn version() { - let _g = LOCK.lock(); - reset(); - assert_eq!(&find("foo").unwrap().version[..], "3.10.0.SVN"); -} diff --git a/deps/pkg-config-0.3.6/.gitignore b/deps/pkg-config-0.3.8/.gitignore similarity index 100% rename from deps/pkg-config-0.3.6/.gitignore rename to deps/pkg-config-0.3.8/.gitignore diff --git a/deps/pkg-config-0.3.8/.travis.yml b/deps/pkg-config-0.3.8/.travis.yml new file mode 100644 index 000000000..f02def70b --- /dev/null +++ b/deps/pkg-config-0.3.8/.travis.yml @@ -0,0 +1,25 @@ +language: rust +rust: + - stable + - beta + - nightly +sudo: false +script: + - cargo build --verbose + - | + [ $TRAVIS_RUST_VERSION != nightly ] || cargo test --verbose + - cargo doc +after_success: | + [ $TRAVIS_BRANCH = master ] && + [ $TRAVIS_PULL_REQUEST = false ] && + [ $TRAVIS_RUST_VERSION = nightly ] && + echo '' > target/doc/index.html && + pip install ghp-import --user $USER && + $HOME/.local/bin/ghp-import -n target/doc && + git push -qf https://${TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages +env: + global: + secure: XlfwiQ+fPgRWqFwHbyPTma2FAVtgN+IXFpkiIdh1sKxWEeHMqABrTtOKf/NugDYCGsOJfr2vb5qFL6teBV2lTXOffUIWj+1hMd0N/FbVKWzABBV02XdxQi8w2ptPez5LPRTEfXJRRHmJpc8ww2aCTIrdT3AQE2oqZM/jHJTi/1U= +notifications: + email: + on_success: never diff --git a/deps/pkg-config-0.3.8/Cargo.toml b/deps/pkg-config-0.3.8/Cargo.toml new file mode 100644 index 000000000..895bdd1b1 --- /dev/null +++ b/deps/pkg-config-0.3.8/Cargo.toml @@ -0,0 +1,13 @@ +[package] + +name = "pkg-config" +version = "0.3.8" +authors = ["Alex Crichton "] +license = "MIT/Apache-2.0" +repository = "https://github.com/alexcrichton/pkg-config-rs" +documentation = "http://alexcrichton.com/pkg-config-rs" +description = """ +A library to run the pkg-config system tool at build time in order to be used in +Cargo build scripts. +""" +keywords = ["build-dependencies"] diff --git a/deps/regex-0.1.48/LICENSE-APACHE b/deps/pkg-config-0.3.8/LICENSE-APACHE similarity index 100% rename from deps/regex-0.1.48/LICENSE-APACHE rename to deps/pkg-config-0.3.8/LICENSE-APACHE diff --git a/deps/pkg-config-0.3.6/LICENSE-MIT b/deps/pkg-config-0.3.8/LICENSE-MIT similarity index 100% rename from deps/pkg-config-0.3.6/LICENSE-MIT rename to deps/pkg-config-0.3.8/LICENSE-MIT diff --git a/deps/pkg-config-0.3.6/README.md b/deps/pkg-config-0.3.8/README.md similarity index 100% rename from deps/pkg-config-0.3.6/README.md rename to deps/pkg-config-0.3.8/README.md diff --git a/deps/pkg-config-0.3.8/src/lib.rs b/deps/pkg-config-0.3.8/src/lib.rs new file mode 100644 index 000000000..26f64adb7 --- /dev/null +++ b/deps/pkg-config-0.3.8/src/lib.rs @@ -0,0 +1,471 @@ +//! A build dependency for Cargo libraries to find system artifacts through the +//! `pkg-config` utility. +//! +//! This library will shell out to `pkg-config` as part of build scripts and +//! probe the system to determine how to link to a specified library. The +//! `Config` structure serves as a method of configuring how `pkg-config` is +//! invoked in a builder style. +//! +//! A number of environment variables are available to globally configure how +//! this crate will invoke `pkg-config`: +//! +//! * `PKG_CONFIG_ALLOW_CROSS` - if this variable is not set, then `pkg-config` +//! will automatically be disabled for all cross compiles. +//! * `FOO_NO_PKG_CONFIG` - if set, this will disable running `pkg-config` when +//! probing for the library named `foo`. +//! +//! There are also a number of environment variables which can configure how a +//! library is linked to (dynamically vs statically). These variables control +//! whether the `--static` flag is passed. Note that this behavior can be +//! overridden by configuring explicitly on `Config`. The variables are checked +//! in the following order: +//! +//! * `FOO_STATIC` - pass `--static` for the library `foo` +//! * `FOO_DYNAMIC` - do not pass `--static` for the library `foo` +//! * `PKG_CONFIG_ALL_STATIC` - pass `--static` for all libraries +//! * `PKG_CONFIG_ALL_DYNAMIC` - do not pass `--static` for all libraries +//! +//! After running `pkg-config` all appropriate Cargo metadata will be printed on +//! stdout if the search was successful. +//! +//! # Example +//! +//! Find the system library named `foo`. +//! +//! ```no_run +//! extern crate pkg_config; +//! +//! fn main() { +//! pkg_config::probe_library("foo").unwrap(); +//! } +//! ``` +//! +//! Configure how library `foo` is linked to. +//! +//! ```no_run +//! extern crate pkg_config; +//! +//! fn main() { +//! pkg_config::Config::new().statik(true).probe("foo").unwrap(); +//! } +//! ``` + +#![doc(html_root_url = "http://alexcrichton.com/pkg-config-rs")] +#![cfg_attr(test, deny(warnings))] + +use std::ascii::AsciiExt; +use std::env; +use std::error; +use std::ffi::{OsStr, OsString}; +use std::fmt; +use std::fs; +use std::io; +use std::path::{PathBuf, Path}; +use std::process::{Command, Output}; +use std::str; + +pub fn target_supported() -> bool { + let target = env::var("TARGET").unwrap_or(String::new()); + let host = env::var("HOST").unwrap_or(String::new()); + + // Only use pkg-config in host == target situations by default (allowing an + // override) and then also don't use pkg-config on MSVC as it's really not + // meant to work there but when building MSVC code in a MSYS shell we may be + // able to run pkg-config anyway. + (host == target || env::var_os("PKG_CONFIG_ALLOW_CROSS").is_some()) && + !target.contains("msvc") +} + +#[derive(Clone)] +pub struct Config { + statik: Option, + atleast_version: Option, + extra_args: Vec, + cargo_metadata: bool, +} + +#[derive(Debug)] +pub struct Library { + pub libs: Vec, + pub link_paths: Vec, + pub frameworks: Vec, + pub framework_paths: Vec, + pub include_paths: Vec, + pub version: String, + _priv: (), +} + +/// Represents all reasons `pkg-config` might not succeed or be run at all. +pub enum Error { + /// Aborted because of `*_NO_PKG_CONFIG` environment variable. + /// + /// Contains the name of the responsible environment variable. + EnvNoPkgConfig(String), + + /// Cross compilation detected. + /// + /// Override with `PKG_CONFIG_ALLOW_CROSS=1`. + CrossCompilation, + + /// Failed to run `pkg-config`. + /// + /// Contains the command and the cause. + Command { command: String, cause: io::Error }, + + /// `pkg-config` did not exit sucessfully. + /// + /// Contains the command and output. + Failure { command: String, output: Output }, + + #[doc(hidden)] + // please don't match on this, we're likely to add more variants over time + __Nonexhaustive, +} + +impl error::Error for Error { + fn description(&self) -> &str { + match *self { + Error::EnvNoPkgConfig(_) => "pkg-config requested to be aborted", + Error::CrossCompilation => { + "pkg-config doesn't handle cross compilation. \ + Use PKG_CONFIG_ALLOW_CROSS=1 to override" + } + Error::Command { .. } => "failed to run pkg-config", + Error::Failure { .. } => "pkg-config did not exit sucessfully", + Error::__Nonexhaustive => panic!(), + } + } + + fn cause(&self) -> Option<&error::Error> { + match *self { + Error::Command { ref cause, .. } => Some(cause), + _ => None, + } + } +} + +// Workaround for temporary lack of impl Debug for Output in stable std +struct OutputDebugger<'a>(&'a Output); + +// Lifted from 1.7 std +impl<'a> fmt::Debug for OutputDebugger<'a> { + fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { + let stdout_utf8 = str::from_utf8(&self.0.stdout); + let stdout_debug: &fmt::Debug = match stdout_utf8 { + Ok(ref str) => str, + Err(_) => &self.0.stdout + }; + + let stderr_utf8 = str::from_utf8(&self.0.stderr); + let stderr_debug: &fmt::Debug = match stderr_utf8 { + Ok(ref str) => str, + Err(_) => &self.0.stderr + }; + + fmt.debug_struct("Output") + .field("status", &self.0.status) + .field("stdout", stdout_debug) + .field("stderr", stderr_debug) + .finish() + } +} + +// Workaround for temporary lack of impl Debug for Output in stable std, continued +impl fmt::Debug for Error { + fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { + match *self { + Error::EnvNoPkgConfig(ref name) => { + f.debug_tuple("EnvNoPkgConfig") + .field(name) + .finish() + } + Error::CrossCompilation => write!(f, "CrossCompilation"), + Error::Command { ref command, ref cause } => { + f.debug_struct("Command") + .field("command", command) + .field("cause", cause) + .finish() + } + Error::Failure { ref command, ref output } => { + f.debug_struct("Failure") + .field("command", command) + .field("output", &OutputDebugger(output)) + .finish() + } + Error::__Nonexhaustive => panic!(), + } + } +} + +impl fmt::Display for Error { + fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { + match *self { + Error::EnvNoPkgConfig(ref name) => { + write!(f, "Aborted because {} is set", name) + } + Error::CrossCompilation => { + write!(f, "Cross compilation detected. \ + Use PKG_CONFIG_ALLOW_CROSS=1 to override") + } + Error::Command { ref command, ref cause } => { + write!(f, "Failed to run `{}`: {}", command, cause) + } + Error::Failure { ref command, ref output } => { + let stdout = str::from_utf8(&output.stdout).unwrap(); + let stderr = str::from_utf8(&output.stderr).unwrap(); + try!(write!(f, "`{}` did not exit successfully: {}", command, output.status)); + if !stdout.is_empty() { + try!(write!(f, "\n--- stdout\n{}", stdout)); + } + if !stderr.is_empty() { + try!(write!(f, "\n--- stdout\n{}", stderr)); + } + Ok(()) + } + Error::__Nonexhaustive => panic!(), + } + } +} + +/// Deprecated in favor of the probe_library function +#[doc(hidden)] +pub fn find_library(name: &str) -> Result { + probe_library(name).map_err(|e| e.to_string()) +} + +/// Simple shortcut for using all default options for finding a library. +pub fn probe_library(name: &str) -> Result { + Config::new().probe(name) +} + +/// Run `pkg-config` to get the value of a variable from a package using +/// --variable. +pub fn get_variable(package: &str, variable: &str) -> Result { + let arg = format!("--variable={}", variable); + let cfg = Config::new(); + Ok(try!(run(cfg.command(package, &[&arg]))).trim_right().to_owned()) +} + +impl Config { + /// Creates a new set of configuration options which are all initially set + /// to "blank". + pub fn new() -> Config { + Config { + statik: None, + atleast_version: None, + extra_args: vec![], + cargo_metadata: true, + } + } + + /// Indicate whether the `--static` flag should be passed. + /// + /// This will override the inference from environment variables described in + /// the crate documentation. + pub fn statik(&mut self, statik: bool) -> &mut Config { + self.statik = Some(statik); + self + } + + /// Indicate that the library must be at least version `vers`. + pub fn atleast_version(&mut self, vers: &str) -> &mut Config { + self.atleast_version = Some(vers.to_string()); + self + } + + /// Add an argument to pass to pkg-config. + /// + /// It's placed after all of the arguments generated by this library. + pub fn arg>(&mut self, arg: S) -> &mut Config { + self.extra_args.push(arg.as_ref().to_os_string()); + self + } + + /// Define whether metadata should be emitted for cargo allowing it to + /// automatically link the binary. Defaults to `true`. + pub fn cargo_metadata(&mut self, cargo_metadata: bool) -> &mut Config { + self.cargo_metadata = cargo_metadata; + self + } + + /// Deprecated in favor fo the `probe` function + #[doc(hidden)] + pub fn find(&self, name: &str) -> Result { + self.probe(name).map_err(|e| e.to_string()) + } + + /// Run `pkg-config` to find the library `name`. + /// + /// This will use all configuration previously set to specify how + /// `pkg-config` is run. + pub fn probe(&self, name: &str) -> Result { + let abort_var_name = format!("{}_NO_PKG_CONFIG", envify(name)); + if env::var_os(&abort_var_name).is_some() { + return Err(Error::EnvNoPkgConfig(abort_var_name)) + } else if !target_supported() { + return Err(Error::CrossCompilation); + } + + let mut library = Library::new(); + + let output = try!(run(self.command(name, &["--libs", "--cflags"]))); + library.parse_libs_cflags(name, &output, self); + + let output = try!(run(self.command(name, &["--modversion"]))); + library.parse_modversion(&output); + + Ok(library) + } + + /// Deprecated in favor of the top level `get_variable` function + #[doc(hidden)] + pub fn get_variable(package: &str, variable: &str) -> Result { + get_variable(package, variable).map_err(|e| e.to_string()) + } + + fn is_static(&self, name: &str) -> bool { + self.statik.unwrap_or_else(|| infer_static(name)) + } + + fn command(&self, name: &str, args: &[&str]) -> Command { + let exe = env::var("PKG_CONFIG").unwrap_or(String::from("pkg-config")); + let mut cmd = Command::new(exe); + if self.is_static(name) { + cmd.arg("--static"); + } + cmd.args(args) + .args(&self.extra_args) + .env("PKG_CONFIG_ALLOW_SYSTEM_LIBS", "1"); + if let Some(ref version) = self.atleast_version { + cmd.arg(&format!("{} >= {}", name, version)); + } else { + cmd.arg(name); + } + cmd + } + + fn print_metadata(&self, s: &str) { + if self.cargo_metadata { + println!("cargo:{}", s); + } + } +} + +impl Library { + fn new() -> Library { + Library { + libs: Vec::new(), + link_paths: Vec::new(), + include_paths: Vec::new(), + frameworks: Vec::new(), + framework_paths: Vec::new(), + version: String::new(), + _priv: (), + } + } + + fn parse_libs_cflags(&mut self, name: &str, output: &str, config: &Config) { + let parts = output.trim_right() + .split(' ') + .filter(|l| l.len() > 2) + .map(|arg| (&arg[0..2], &arg[2..])) + .collect::>(); + + let mut dirs = Vec::new(); + let statik = config.is_static(name); + for &(flag, val) in parts.iter() { + match flag { + "-L" => { + let meta = format!("rustc-link-search=native={}", val); + config.print_metadata(&meta); + dirs.push(PathBuf::from(val)); + self.link_paths.push(PathBuf::from(val)); + } + "-F" => { + let meta = format!("rustc-link-search=framework={}", val); + config.print_metadata(&meta); + self.framework_paths.push(PathBuf::from(val)); + } + "-I" => { + self.include_paths.push(PathBuf::from(val)); + } + "-l" => { + self.libs.push(val.to_string()); + if statik && !is_system(val, &dirs) { + let meta = format!("rustc-link-lib=static={}", val); + config.print_metadata(&meta); + } else { + let meta = format!("rustc-link-lib={}", val); + config.print_metadata(&meta); + } + } + _ => {} + } + } + + let mut iter = output.trim_right().split(' '); + while let Some(part) = iter.next() { + if part != "-framework" { + continue + } + if let Some(lib) = iter.next() { + let meta = format!("rustc-link-lib=framework={}", lib); + config.print_metadata(&meta); + self.frameworks.push(lib.to_string()); + } + } + } + + fn parse_modversion(&mut self, output: &str) { + self.version.push_str(output.trim()); + } +} + +fn infer_static(name: &str) -> bool { + let name = envify(name); + if env::var_os(&format!("{}_STATIC", name)).is_some() { + true + } else if env::var_os(&format!("{}_DYNAMIC", name)).is_some() { + false + } else if env::var_os("PKG_CONFIG_ALL_STATIC").is_some() { + true + } else if env::var_os("PKG_CONFIG_ALL_DYNAMIC").is_some() { + false + } else { + false + } +} + +fn envify(name: &str) -> String { + name.chars().map(|c| c.to_ascii_uppercase()).map(|c| { + if c == '-' {'_'} else {c} + }).collect() +} + +fn is_system(name: &str, dirs: &[PathBuf]) -> bool { + let libname = format!("lib{}.a", name); + let root = Path::new("/usr"); + !dirs.iter().any(|d| { + !d.starts_with(root) && fs::metadata(&d.join(&libname)).is_ok() + }) +} + +fn run(mut cmd: Command) -> Result { + match cmd.output() { + Ok(output) => { + if output.status.success() { + let stdout = String::from_utf8(output.stdout).unwrap(); + Ok(stdout) + } else { + Err(Error::Failure { + command: format!("{:?}", cmd), + output: output, + }) + } + } + Err(cause) => Err(Error::Command { + command: format!("{:?}", cmd), + cause: cause, + }), + } +} diff --git a/deps/pkg-config-0.3.6/tests/foo.pc b/deps/pkg-config-0.3.8/tests/foo.pc similarity index 100% rename from deps/pkg-config-0.3.6/tests/foo.pc rename to deps/pkg-config-0.3.8/tests/foo.pc diff --git a/deps/pkg-config-0.3.6/tests/framework.pc b/deps/pkg-config-0.3.8/tests/framework.pc similarity index 100% rename from deps/pkg-config-0.3.6/tests/framework.pc rename to deps/pkg-config-0.3.8/tests/framework.pc diff --git a/deps/pkg-config-0.3.8/tests/test.rs b/deps/pkg-config-0.3.8/tests/test.rs new file mode 100644 index 000000000..842516690 --- /dev/null +++ b/deps/pkg-config-0.3.8/tests/test.rs @@ -0,0 +1,97 @@ +#![feature(static_mutex)] + +extern crate pkg_config; + +use pkg_config::Error; +use std::env; +use std::sync::{StaticMutex, MUTEX_INIT}; +use std::path::PathBuf; + +static LOCK: StaticMutex = MUTEX_INIT; + +fn reset() { + for (k, _) in env::vars() { + if k.contains("DYNAMIC") || + k.contains("STATIC") || + k.contains("PKG_CONFIG_ALLOW_CROSS") || + k.contains("FOO_NO_PKG_CONFIG") { + env::remove_var(&k); + } + } + env::remove_var("TARGET"); + env::remove_var("HOST"); + env::set_var("PKG_CONFIG_PATH", &env::current_dir().unwrap().join("tests")); +} + +fn find(name: &str) -> Result { + pkg_config::probe_library(name) +} + +#[test] +fn cross_disabled() { + let _g = LOCK.lock(); + reset(); + env::set_var("TARGET", "foo"); + env::set_var("HOST", "bar"); + match find("foo") { + Err(Error::CrossCompilation) => {}, + x => panic!("Error::CrossCompilation expected, found `{:?}`", x), + } +} + +#[test] +fn cross_enabled() { + let _g = LOCK.lock(); + reset(); + env::set_var("TARGET", "foo"); + env::set_var("HOST", "bar"); + env::set_var("PKG_CONFIG_ALLOW_CROSS", "1"); + find("foo").unwrap(); +} + +#[test] +fn package_disabled() { + let _g = LOCK.lock(); + reset(); + env::set_var("FOO_NO_PKG_CONFIG", "1"); + match find("foo") { + Err(Error::EnvNoPkgConfig(name)) => { + assert_eq!(name, "FOO_NO_PKG_CONFIG") + } + x => panic!("Error::EnvNoPkgConfig expected, found `{:?}`", x), + } +} + +#[test] +fn output_ok() { + let _g = LOCK.lock(); + reset(); + let lib = find("foo").unwrap(); + assert!(lib.libs.contains(&"gcc".to_string())); + assert!(lib.libs.contains(&"coregrind-amd64-linux".to_string())); + assert!(lib.link_paths.contains(&PathBuf::from("/usr/lib/valgrind"))); +} + +#[test] +fn framework() { + let _g = LOCK.lock(); + reset(); + let lib = find("framework").unwrap(); + assert!(lib.frameworks.contains(&"foo".to_string())); + assert!(lib.framework_paths.contains(&PathBuf::from("/usr/lib"))); +} + +#[test] +fn get_variable() { + let _g = LOCK.lock(); + reset(); + let prefix = pkg_config::get_variable("foo", "prefix").unwrap(); + assert_eq!(prefix, "/usr"); +} + +#[test] +fn version() { + let _g = LOCK.lock(); + reset(); + assert_eq!(&find("foo").unwrap().version[..], "3.10.0.SVN"); +} diff --git a/deps/regex-0.1.48/.travis.yml b/deps/regex-0.1.48/.travis.yml deleted file mode 100644 index a7a77c149..000000000 --- a/deps/regex-0.1.48/.travis.yml +++ /dev/null @@ -1,40 +0,0 @@ -language: rust -rust: - - 1.0.0 - - beta - - nightly -sudo: false -script: - - cargo build --verbose - - cargo test --verbose - - ./run-shootout-test - - cargo doc - - cargo test --verbose --manifest-path=regex-syntax/Cargo.toml - - cargo doc --verbose --manifest-path=regex-syntax/Cargo.toml - - if [ "$TRAVIS_RUST_VERSION" = "nightly" ]; then - cargo test --verbose --features pattern; - cargo bench --verbose; - travis_wait cargo test --verbose --manifest-path=regex_macros/Cargo.toml; - travis_wait cargo bench --verbose --manifest-path=regex_macros/Cargo.toml; - fi - # - | - # [ $TRAVIS_RUST_VERSION != nightly ] || ( - # cargo test --verbose --features pattern && - # cargo bench --verbose && - # travis_wait cargo test --verbose --manifest-path=regex_macros/Cargo.toml && - # travis_wait cargo bench --verbose --manifest-path=regex_macros/Cargo.toml - # ) -after_success: | - [ $TRAVIS_BRANCH = master ] && - [ $TRAVIS_PULL_REQUEST = false ] && - [ $TRAVIS_RUST_VERSION = nightly ] && - echo '' > target/doc/index.html && - pip install ghp-import --user $USER && - $HOME/.local/bin/ghp-import -n target/doc && - git push -qf https://${TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages -env: - global: - secure: VvIrYRW/a8FmBA61hn1bDrqWwR92tANOT6PCeLYd9A9ViQrN07PE6uGsnd9iwr8itck10Ctl1mThZYUkK8BDFEmlvSxOFJ/Po5eRe6A1CYuFF40zizJ+3NllVkN20kwoQDe0kxwZVDGO9Yi1icHUrbRPWDfS+1tfobO/UT8Dlng= -notifications: - email: - on_success: never diff --git a/deps/regex-0.1.48/Cargo.toml b/deps/regex-0.1.48/Cargo.toml deleted file mode 100644 index 653b27b98..000000000 --- a/deps/regex-0.1.48/Cargo.toml +++ /dev/null @@ -1,48 +0,0 @@ -[package] -name = "regex" -version = "0.1.48" #:version -authors = ["The Rust Project Developers"] -license = "MIT/Apache-2.0" -readme = "README.md" -repository = "https://github.com/rust-lang/regex" -documentation = "https://doc.rust-lang.org/regex" -homepage = "https://github.com/rust-lang/regex" -description = """ -An implementation of regular expressions for Rust. -""" - -[[test]] -path = "src/lib.rs" -name = "regex" - -[[test]] -path = "regex_macros/tests/test_dynamic.rs" -name = "dynamic" - -[[test]] -path = "regex_macros/tests/test_dynamic_nfa.rs" -name = "dynamic_nfa" - -[[test]] -path = "regex_macros/tests/test_dynamic_backtrack.rs" -name = "dynamic_backtrack" - -[[bench]] -name = "all" -path = "regex_macros/benches/bench_dynamic.rs" -test = false -bench = true - -[dependencies] -aho-corasick = "0.4" -memchr = "0.1" -regex-syntax = { path = "regex-syntax", version = "0.2" } - -[dev-dependencies] -rand = "0.3" - -[features] -pattern = [] - -[profile.bench] -lto = true diff --git a/deps/regex-0.1.48/README.md b/deps/regex-0.1.48/README.md deleted file mode 100644 index 0a123ae46..000000000 --- a/deps/regex-0.1.48/README.md +++ /dev/null @@ -1,144 +0,0 @@ -regex -===== - -A Rust library for parsing, compiling, and executing regular expressions. -This particular implementation of regular expressions guarantees execution -in linear time with respect to the size of the regular expression and -search text. Much of the syntax and implementation is inspired by -[RE2](https://github.com/google/re2). - -[![Build Status](https://travis-ci.org/rust-lang-nursery/regex.svg?branch=master)](https://travis-ci.org/rust-lang-nursery/regex) -[![Build status](https://ci.appveyor.com/api/projects/status/22g48bo866qr4u77?svg=true)](https://ci.appveyor.com/project/alexcrichton/regex) -[![](http://meritbadge.herokuapp.com/regex)](https://crates.io/crates/regex) - -### Documentation - -[Module documentation with examples](https://doc.rust-lang.org/regex). -The module documentation also include a comprehensive description of the syntax -supported. - -Documentation with examples for the various matching functions and iterators -can be found on the -[`Regex` type](https://doc.rust-lang.org/regex/regex/enum.Regex.html). - - -### Usage - -Add this to your `Cargo.toml`: - -```toml -[dependencies] -regex = "0.1" -``` - -and this to your crate root: - -```rust -extern crate regex; -``` - -Here's a simple example that matches a date in YYYY-MM-DD format and prints the -year, month and day: - -```rust -extern crate regex; - -use regex::Regex; - -fn main() { - let re = Regex::new(r"(?x) -(?P\d{4}) # the year -- -(?P\d{2}) # the month -- -(?P\d{2}) # the day -").unwrap(); - let caps = re.captures("2010-03-14").unwrap(); - - assert_eq!("2010", caps.name("year").unwrap()); - assert_eq!("03", caps.name("month").unwrap()); - assert_eq!("14", caps.name("day").unwrap()); -} -``` - -If you have lots of dates in text that you'd like to iterate over, then it's -easy to adapt the above example with an iterator: - -```rust -extern crate regex; - -use regex::Regex; - -const TO_SEARCH: &'static str = " -On 2010-03-14, foo happened. On 2014-10-14, bar happened. -"; - -fn main() { - let re = Regex::new(r"(\d{4})-(\d{2})-(\d{2})").unwrap(); - - for caps in re.captures_iter(TO_SEARCH) { - // Note that all of the unwraps are actually OK for this regex - // because the only way for the regex to match is if all of the - // capture groups match. This is not true in general though! - println!("year: {}, month: {}, day: {}", - caps.at(1).unwrap(), - caps.at(2).unwrap(), - caps.at(3).unwrap()); - } -} -``` - -This example outputs: - -``` -year: 2010, month: 03, day: 14 -year: 2014, month: 10, day: 14 -``` - -### Usage: `regex!` compiler plugin - -The `regex!` compiler plugin will compile your regexes at compile time. **This -only works with a nightly compiler.** -The -[documentation explains the trade -offs](https://doc.rust-lang.org/regex/regex/index.html#the-regex!-macro). - -Here is a small example: - -```rust -#![feature(plugin)] - -#![plugin(regex_macros)] -extern crate regex; - -fn main() { - let re = regex!(r"(\d{4})-(\d{2})-(\d{2})"); - let caps = re.captures("2010-03-14").unwrap(); - - assert_eq!("2010", caps.at(1).unwrap()); - assert_eq!("03", caps.at(2).unwrap()); - assert_eq!("14", caps.at(3).unwrap()); -} -``` - -Notice that we never `unwrap` the result of `regex!`. This is because your -*program* won't compile if the regex doesn't compile. (Try `regex!("(")`.) - -### Usage: a regular expression parser - -This repository contains a crate that provides a well tested regular expression -parser and abstract syntax. It provides no facilities for compilation or -execution. This may be useful if you're implementing your own regex engine or -otherwise need to do analysis on the syntax of a regular expression. It is -otherwise not recommended for general use. - -[Documentation for `regex-syntax` with -examples](https://doc.rust-lang.org/regex/regex_syntax/index.html). - -# License - -`regex` is primarily distributed under the terms of both the MIT license and -the Apache License (Version 2.0), with portions covered by various BSD-like -licenses. - -See LICENSE-APACHE, and LICENSE-MIT for details. diff --git a/deps/regex-0.1.48/examples/shootout-regex-dna-cheat.rs b/deps/regex-0.1.48/examples/shootout-regex-dna-cheat.rs deleted file mode 100644 index 0222fd745..000000000 --- a/deps/regex-0.1.48/examples/shootout-regex-dna-cheat.rs +++ /dev/null @@ -1,94 +0,0 @@ -// The Computer Language Benchmarks Game -// http://benchmarksgame.alioth.debian.org/ -// -// contributed by the Rust Project Developers -// contributed by TeXitoi -// contributed by BurntSushi - -// This technically solves the problem posed in the `regex-dna` benchmark, but -// it cheats by combining all of the replacements into a single regex and -// replacing them with a single linear scan. i.e., it re-implements -// `replace_all`. As a result, this is around 25% faster. ---AG - -extern crate regex; - -use std::io::{self, Read}; -use std::sync::Arc; -use std::thread; - -macro_rules! regex { ($re:expr) => { ::regex::Regex::new($re).unwrap() } } - -fn main() { - let mut seq = String::with_capacity(50 * (1 << 20)); - io::stdin().read_to_string(&mut seq).unwrap(); - let ilen = seq.len(); - - seq = regex!(">[^\n]*\n|\n").replace_all(&seq, ""); - let clen = seq.len(); - let seq_arc = Arc::new(seq.clone()); - - let variants = vec![ - regex!("agggtaaa|tttaccct"), - regex!("[cgt]gggtaaa|tttaccc[acg]"), - regex!("a[act]ggtaaa|tttacc[agt]t"), - regex!("ag[act]gtaaa|tttac[agt]ct"), - regex!("agg[act]taaa|ttta[agt]cct"), - regex!("aggg[acg]aaa|ttt[cgt]ccct"), - regex!("agggt[cgt]aa|tt[acg]accct"), - regex!("agggta[cgt]a|t[acg]taccct"), - regex!("agggtaa[cgt]|[acg]ttaccct"), - ]; - let mut count_promises = vec![]; - for i in 0..3 { - let seq = seq_arc.clone(); - let res = variants[i * 3..i * 3 + 3].to_vec(); - count_promises.push(thread::spawn(move || { - res.into_iter() - .map(|re| (re.to_string(), re.find_iter(&seq).count())) - .collect::>() - })); - } - - let substs = vec![ - (b'B', "(c|g|t)"), - (b'D', "(a|g|t)"), - (b'H', "(a|c|t)"), - (b'K', "(g|t)"), - (b'M', "(a|c)"), - (b'N', "(a|c|g|t)"), - (b'R', "(a|g)"), - (b'S', "(c|g)"), - (b'V', "(a|c|g)"), - (b'W', "(a|t)"), - (b'Y', "(c|t)"), - ]; // combined into one regex in `replace_all` - let seq = replace_all(&seq, substs); - - for promise in count_promises { - for (re, count) in promise.join().unwrap() { - println!("{} {}", re, count); - } - } - println!("\n{}\n{}\n{}", ilen, clen, seq.len()); -} - -#[allow(deprecated)] // for connect -> join in Rust 1.3 -fn replace_all(text: &str, substs: Vec<(u8, &str)>) -> String { - let mut replacements = vec![""; 256]; - let mut alternates = vec![]; - for (re, replacement) in substs { - replacements[re as usize] = replacement; - alternates.push((re as char).to_string()); - } - - let re = regex!(&alternates.connect("|")); - let mut new = String::with_capacity(text.len()); - let mut last_match = 0; - for (s, e) in re.find_iter(text) { - new.push_str(&text[last_match..s]); - new.push_str(replacements[text.as_bytes()[s] as usize]); - last_match = e; - } - new.push_str(&text[last_match..]); - new -} diff --git a/deps/regex-0.1.48/examples/shootout-regex-dna.rs b/deps/regex-0.1.48/examples/shootout-regex-dna.rs deleted file mode 100644 index 586962402..000000000 --- a/deps/regex-0.1.48/examples/shootout-regex-dna.rs +++ /dev/null @@ -1,71 +0,0 @@ -// The Computer Language Benchmarks Game -// http://benchmarksgame.alioth.debian.org/ -// -// contributed by the Rust Project Developers -// contributed by TeXitoi -// contributed by BurntSushi - -extern crate regex; - -use std::io::{self, Read}; -use std::sync::Arc; -use std::thread; - -macro_rules! regex { ($re:expr) => { ::regex::Regex::new($re).unwrap() } } - -fn main() { - let mut seq = String::with_capacity(50 * (1 << 20)); - io::stdin().read_to_string(&mut seq).unwrap(); - let ilen = seq.len(); - - seq = regex!(">[^\n]*\n|\n").replace_all(&seq, ""); - let clen = seq.len(); - let seq_arc = Arc::new(seq.clone()); - - let variants = vec![ - regex!("agggtaaa|tttaccct"), - regex!("[cgt]gggtaaa|tttaccc[acg]"), - regex!("a[act]ggtaaa|tttacc[agt]t"), - regex!("ag[act]gtaaa|tttac[agt]ct"), - regex!("agg[act]taaa|ttta[agt]cct"), - regex!("aggg[acg]aaa|ttt[cgt]ccct"), - regex!("agggt[cgt]aa|tt[acg]accct"), - regex!("agggta[cgt]a|t[acg]taccct"), - regex!("agggtaa[cgt]|[acg]ttaccct"), - ]; - let mut count_promises = vec![]; - for i in 0..3 { - let seq = seq_arc.clone(); - let res = variants[i * 3..i * 3 + 3].to_vec(); - count_promises.push(thread::spawn(move || { - res.into_iter() - .map(|re| (re.to_string(), re.find_iter(&seq).count())) - .collect::>() - })); - } - - let substs = vec![ - (regex!("B"), "(c|g|t)"), - (regex!("D"), "(a|g|t)"), - (regex!("H"), "(a|c|t)"), - (regex!("K"), "(g|t)"), - (regex!("M"), "(a|c)"), - (regex!("N"), "(a|c|g|t)"), - (regex!("R"), "(a|g)"), - (regex!("S"), "(c|g)"), - (regex!("V"), "(a|c|g)"), - (regex!("W"), "(a|t)"), - (regex!("Y"), "(c|t)"), - ]; - let mut seq = seq; - for (re, replacement) in substs.into_iter() { - seq = re.replace_all(&seq, replacement); - } - - for promise in count_promises { - for (re, count) in promise.join().unwrap() { - println!("{} {}", re, count); - } - } - println!("\n{}\n{}\n{}", ilen, clen, seq.len()); -} diff --git a/deps/regex-0.1.48/src/backtrack.rs b/deps/regex-0.1.48/src/backtrack.rs deleted file mode 100644 index 1388a1b4e..000000000 --- a/deps/regex-0.1.48/src/backtrack.rs +++ /dev/null @@ -1,268 +0,0 @@ -// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -// This is the backtracking matching engine. It has the same exact capability -// as the full NFA simulation, except it is artificially restricted to small -// regexes on small inputs because of its memory requirements. -// -// In particular, this is a *bounded* backtracking engine. It retains worst -// case linear time by keeping track of the states that is has visited (using a -// bitmap). Namely, once a state is visited, it is never visited again. Since a -// state is keyed by `(instruction index, input index)`, we have that its time -// complexity is `O(mn)`. -// -// The backtracking engine can beat out the NFA simulation on small -// regexes/inputs because it doesn't have to keep track of multiple copies of -// the capture groups. In benchmarks, the backtracking engine is roughly twice -// as fast as the full NFA simulation. - -use input::{Input, InputAt, CharInput}; -use inst::InstIdx; -use program::Program; -use re::CaptureIdxs; - -type Bits = u32; -const BIT_SIZE: usize = 32; -const MAX_PROG_SIZE: usize = 100; -const MAX_INPUT_SIZE: usize = 256 * (1 << 10); - -// Total memory usage in bytes is determined by: -// -// ((len(insts) * (len(input) + 1) + bits - 1) / bits) / (bits / 8) -// -// With the above settings, this comes out to ~3.2MB. Mostly these numbers -// were picked empirically with suspicious benchmarks. - -/// A backtracking matching engine. -#[derive(Debug)] -pub struct Backtrack<'a, 'r, 't, 'c> { - prog: &'r Program, - input: CharInput<'t>, - caps: &'c mut CaptureIdxs, - m: &'a mut BackMachine, -} - -/// Shared cached state between multiple invocations of a backtracking engine -/// in the same thread. -/// -/// It is exported so that it can be cached by `program::Program`. -#[derive(Debug)] -pub struct BackMachine { - jobs: Vec, - visited: Vec, -} - -impl BackMachine { - /// Create new empty state for the backtracking engine. - pub fn new() -> BackMachine { - BackMachine { - jobs: vec![], - visited: vec![], - } - } -} - -/// A job is an explicit unit of stack space in the backtracking engine. -/// -/// The "normal" representation is a single state transition, which corresponds -/// to an NFA state and a character in the input. However, the backtracking -/// engine must keep track of old capture group values. We use the explicit -/// stack to do it. -#[derive(Clone, Copy, Debug)] -enum Job { - Inst { pc: InstIdx, at: InputAt }, - SaveRestore { slot: usize, old_pos: Option }, -} - -impl<'a, 'r, 't, 'c> Backtrack<'a, 'r, 't, 'c> { - /// Execute the backtracking matching engine. - /// - /// If there's a match, `exec` returns `true` and populates the given - /// captures accordingly. - pub fn exec( - prog: &'r Program, - mut caps: &mut CaptureIdxs, - text: &'t str, - start: usize, - ) -> bool { - let input = CharInput::new(text); - let start = input.at(start); - let mut m = prog.backtrack.get(); - let mut b = Backtrack { - prog: prog, - input: input, - caps: caps, - m: &mut m, - }; - b.exec_(start) - } - - /// Returns true iff the given regex and input can be executed by this - /// engine with reasonable memory usage. - pub fn should_exec(prog: &'r Program, input: &str) -> bool { - prog.insts.len() <= MAX_PROG_SIZE && input.len() <= MAX_INPUT_SIZE - } - - fn clear(&mut self) { - // Reset the job memory so that we start fresh. - self.m.jobs.truncate(0); - - // Now we need to clear the bit state set. - // We do this by figuring out how much space we need to keep track - // of the states we've visited. - // Then we reset all existing allocated space to 0. - // Finally, we request more space if we need it. - // - // This is all a little circuitous, but doing this unsafely - // doesn't seem to have a measurable impact on performance. - // (Probably because backtracking is limited to such small - // inputs/regexes in the first place.) - let visited_len = - (self.prog.insts.len() * (self.input.len() + 1) + BIT_SIZE - 1) - / - BIT_SIZE; - self.m.visited.truncate(visited_len); - for v in &mut self.m.visited { - *v = 0; - } - if visited_len > self.m.visited.len() { - let len = self.m.visited.len(); - self.m.visited.reserve_exact(visited_len - len); - for _ in 0..(visited_len - len) { - self.m.visited.push(0); - } - } - } - - fn exec_(&mut self, mut at: InputAt) -> bool { - self.clear(); - if self.prog.anchored_begin { - return if !at.is_beginning() { - false - } else { - match self.input.prefix_at(&self.prog.prefixes, at) { - None => false, - Some(at) => self.backtrack(at), - } - }; - } - loop { - if !self.prog.prefixes.is_empty() { - at = match self.input.prefix_at(&self.prog.prefixes, at) { - None => return false, - Some(at) => at, - }; - } - if self.backtrack(at) { - return true; - } - if at.char().is_none() { - return false; - } - at = self.input.at(at.next_pos()); - } - } - - // This `inline(always)` seems to result in about a 10-15% increase in - // throughput on the `hard` benchmarks (over a standard `inline`). ---AG - #[inline(always)] - fn backtrack(&mut self, start: InputAt) -> bool { - self.push(0, start); - while let Some(job) = self.m.jobs.pop() { - match job { - Job::Inst { pc, at } => { - if self.step(pc, at) { - return true; - } - } - Job::SaveRestore { slot, old_pos } => { - self.caps[slot] = old_pos; - } - } - } - false - } - - fn step(&mut self, mut pc: InstIdx, mut at: InputAt) -> bool { - use inst::Inst::*; - loop { - // This loop is an optimization to avoid constantly pushing/popping - // from the stack. Namely, if we're pushing a job only to run it - // next, avoid the push and just mutate `pc` (and possibly `at`) - // in place. - match self.prog.insts[pc] { - Match => return true, - Save(ref inst) => { - if inst.slot < self.caps.len() { - // If this path doesn't work out, then we save the old - // capture index (if one exists) in an alternate - // job. If the next path fails, then the alternate - // job is popped and the old capture index is restored. - let old_pos = self.caps[inst.slot]; - self.push_save_restore(inst.slot, old_pos); - self.caps[inst.slot] = Some(at.pos()); - } - pc = inst.goto; - } - Split(ref inst) => { - self.push(inst.goto2, at); - pc = inst.goto1; - } - EmptyLook(ref inst) => { - let prev = self.input.previous_at(at.pos()); - if inst.matches(prev.char(), at.char()) { - pc = inst.goto; - } else { - return false; - } - } - Char(ref inst) => { - if inst.c == at.char() { - pc = inst.goto; - at = self.input.at(at.next_pos()); - } else { - return false; - } - } - Ranges(ref inst) => { - if inst.matches(at.char()) { - pc = inst.goto; - at = self.input.at(at.next_pos()); - } else { - return false; - } - } - } - if self.has_visited(pc, at) { - return false; - } - } - } - - fn push(&mut self, pc: InstIdx, at: InputAt) { - self.m.jobs.push(Job::Inst { pc: pc, at: at }); - } - - fn push_save_restore(&mut self, slot: usize, old_pos: Option) { - self.m.jobs.push(Job::SaveRestore { slot: slot, old_pos: old_pos }); - } - - fn has_visited(&mut self, pc: InstIdx, at: InputAt) -> bool { - let k = pc * (self.input.len() + 1) + at.pos(); - let k1 = k / BIT_SIZE; - let k2 = (1 << (k & (BIT_SIZE - 1))) as Bits; - if self.m.visited[k1] & k2 == 0 { - self.m.visited[k1] |= k2; - false - } else { - true - } - } -} diff --git a/deps/regex-0.1.48/src/char.rs b/deps/regex-0.1.48/src/char.rs deleted file mode 100644 index a053fe2fd..000000000 --- a/deps/regex-0.1.48/src/char.rs +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -use std::char; -use std::cmp::Ordering; -use std::fmt; -use std::u32; - -use syntax; - -/// An inline representation of `Option`. -/// -/// This eliminates the need to do case analysis on `Option` to determine -/// ordinality with other characters. -/// -/// (The `Option` is not related to encoding. Instead, it is used in the -/// matching engines to represent the beginning and ending boundaries of the -/// search text.) -#[derive(Clone, Copy, Hash, PartialEq, Eq, PartialOrd, Ord)] -pub struct Char(u32); - -impl fmt::Debug for Char { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - match char::from_u32(self.0) { - None => write!(f, "Empty"), - Some(c) => write!(f, "{:?}", c), - } - } -} - -impl Char { - /// Returns true iff the character is absent. - #[inline] - pub fn is_none(self) -> bool { self.0 == u32::MAX } - - /// Returns the length of the character's UTF-8 encoding. - /// - /// If the character is absent, then `0` is returned. - #[inline] - pub fn len_utf8(self) -> usize { - char::from_u32(self.0).map_or(0, |c| c.len_utf8()) - } - - /// Returns true iff the character is a word character. - /// - /// If the character is absent, then false is returned. - pub fn is_word_char(self) -> bool { - char::from_u32(self.0).map_or(false, syntax::is_word_char) - } - - /// Converts the character to a real primitive `char`. - /// - /// If the character is absent, then `None` is returned. - pub fn as_char(self) -> Option { - // This is only used in the `regex!` macro because it expands char - // classes into `match` expressions (instead of binary search). - char::from_u32(self.0) - } -} - -impl From for Char { - fn from(c: char) -> Char { Char(c as u32) } -} - -impl From> for Char { - fn from(c: Option) -> Char { - c.map_or(Char(u32::MAX), |c| c.into()) - } -} - -impl PartialEq for Char { - #[inline] - fn eq(&self, other: &char) -> bool { self.0 == *other as u32 } -} - -impl PartialEq for char { - #[inline] - fn eq(&self, other: &Char) -> bool { *self as u32 == other.0 } -} - -impl PartialOrd for Char { - #[inline] - fn partial_cmp(&self, other: &char) -> Option { - self.0.partial_cmp(&(*other as u32)) - } -} - -impl PartialOrd for char { - #[inline] - fn partial_cmp(&self, other: &Char) -> Option { - (*self as u32).partial_cmp(&other.0) - } -} diff --git a/deps/regex-0.1.48/src/compile.rs b/deps/regex-0.1.48/src/compile.rs deleted file mode 100644 index 36a1d3c7c..000000000 --- a/deps/regex-0.1.48/src/compile.rs +++ /dev/null @@ -1,517 +0,0 @@ -// Copyright 2014-2016 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -use std::collections::HashSet; -use std::iter; - -use syntax::{Expr, Repeater, CharClass, ClassRange}; - -use Error; -use inst::{ - EmptyLook, - Inst, InstIdx, - InstSave, InstSplit, InstEmptyLook, InstChar, InstRanges, -}; - -pub type Compiled = (Vec, Vec>); - -type CompileResult = Result; - -pub struct Compiler { - size_limit: usize, - insts: Vec, - cap_names: Vec>, - seen_caps: HashSet, -} - -impl Compiler { - pub fn new(size_limit: usize) -> Compiler { - Compiler { - size_limit: size_limit, - insts: vec![], - cap_names: vec![None], - seen_caps: HashSet::new(), - } - } - - pub fn compile(mut self, expr: &Expr) -> Result { - let hole = try!(self.c_capture(0, expr)); - self.fill_to_next(hole); - self.push_compiled(Inst::Match); - - let insts = self.insts.into_iter().map(|inst| inst.unwrap()).collect(); - Ok((insts, self.cap_names)) - } - - fn c(&mut self, expr: &Expr) -> CompileResult { - use inst; - use syntax::Expr::*; - - try!(self.check_size()); - match *expr { - Empty => Ok(Hole::None), - Literal { ref chars, casei } => self.c_literal(chars, casei), - AnyChar => self.c_class(Some(('\x00', '\u{10ffff}'))), - AnyCharNoNL => { - let ranges = &[('\x00', '\x09'), ('\x0b', '\u{10ffff}')]; - self.c_class(ranges.iter().cloned()) - } - Class(ref cls) => { - let ranges = cls.iter().map(|c| (c.start, c.end)); - self.c_class(ranges) - } - StartLine => self.c_empty_look(inst::EmptyLook::StartLine), - EndLine => self.c_empty_look(inst::EmptyLook::EndLine), - StartText => self.c_empty_look(inst::EmptyLook::StartText), - EndText => self.c_empty_look(inst::EmptyLook::EndText), - WordBoundary => self.c_empty_look(inst::EmptyLook::WordBoundary), - NotWordBoundary => { - self.c_empty_look(inst::EmptyLook::NotWordBoundary) - } - Group { ref e, i: None, name: None } => self.c(e), - Group { ref e, i, ref name } => { - // it's impossible to have a named capture without an index - let i = i.expect("capture index"); - if !self.seen_caps.contains(&i) { - self.cap_names.push(name.clone()); - self.seen_caps.insert(i); - } - self.c_capture(2 * i, e) - } - Concat(ref es) => self.c_concat(es.iter()), - Alternate(ref es) => self.c_alternate(&**es), - Repeat { ref e, r, greedy } => self.c_repeat(e, r, greedy), - } - } - - fn c_capture(&mut self, first_slot: usize, expr: &Expr) -> CompileResult { - let hole = self.push_hole(MaybeInst::Save { slot: first_slot }); - self.fill_to_next(hole); - - let hole = try!(self.c(expr)); - self.fill_to_next(hole); - - Ok(self.push_hole(MaybeInst::Save { slot: first_slot + 1 })) - } - - fn c_literal(&mut self, chars: &[char], casei: bool) -> CompileResult { - assert!(!chars.is_empty()); - if casei { - let mut prev_hole = Hole::None; - for &c in chars { - self.fill_to_next(prev_hole); - let class = CharClass::new(vec![ - ClassRange { start: c, end: c }, - ]); - prev_hole = try!(self.c(&Expr::Class(class.case_fold()))); - } - Ok(prev_hole) - } else { - let mut prev_hole = Hole::None; - for &c in chars { - self.fill_to_next(prev_hole); - prev_hole = self.push_hole(MaybeInst::Char { c: c }); - } - Ok(prev_hole) - } - } - - fn c_class(&mut self, ranges: I) -> CompileResult - where I: IntoIterator { - let ranges: Vec<(char, char)> = ranges.into_iter().collect(); - Ok(if ranges.len() == 1 && ranges[0].0 == ranges[0].1 { - self.push_hole(MaybeInst::Char { c: ranges[0].0 }) - } else { - self.push_hole(MaybeInst::Ranges { ranges: ranges }) - }) - } - - fn c_empty_look(&mut self, look: EmptyLook) -> CompileResult { - Ok(self.push_hole(MaybeInst::EmptyLook { look: look })) - } - - fn c_concat<'a, I>(&mut self, exprs: I) -> CompileResult - where I: IntoIterator { - let mut prev_hole = Hole::None; - for e in exprs { - self.fill_to_next(prev_hole); - prev_hole = try!(self.c(e)); - } - Ok(prev_hole) - } - - fn c_alternate(&mut self, exprs: &[Expr]) -> CompileResult { - assert!(exprs.len() >= 2, "alternates must have at least 2 exprs"); - let mut holes = vec![]; - for e in &exprs[0..exprs.len() - 1] { - let split = self.push_split_hole(); - let goto1 = self.insts.len(); - holes.push(try!(self.c(e))); - let goto2 = self.insts.len(); - self.fill_split(split, Some(goto1), Some(goto2)); - } - holes.push(try!(self.c(&exprs[exprs.len() - 1]))); - Ok(Hole::Many(holes)) - } - - fn c_repeat( - &mut self, - expr: &Expr, - kind: Repeater, - greedy: bool, - ) -> CompileResult { - match kind { - Repeater::ZeroOrOne => self.c_repeat_zero_or_one(expr, greedy), - Repeater::ZeroOrMore => self.c_repeat_zero_or_more(expr, greedy), - Repeater::OneOrMore => self.c_repeat_one_or_more(expr, greedy), - Repeater::Range { min, max: None } => { - self.c_repeat_range_min_or_more(expr, greedy, min) - } - Repeater::Range { min, max: Some(max) } => { - self.c_repeat_range(expr, greedy, min, max) - } - } - } - - fn c_repeat_zero_or_one( - &mut self, - expr: &Expr, - greedy: bool, - ) -> CompileResult { - let split = self.push_split_hole(); - let goto1 = self.insts.len(); - let hole1 = try!(self.c(expr)); - - let hole2 = if greedy { - self.fill_split(split, Some(goto1), None) - } else { - self.fill_split(split, None, Some(goto1)) - }; - Ok(Hole::Many(vec![hole1, hole2])) - } - - fn c_repeat_zero_or_more( - &mut self, - expr: &Expr, - greedy: bool, - ) -> CompileResult { - let goto_split = self.insts.len(); - let split = self.push_split_hole(); - let goto_rep_expr = self.insts.len(); - let hole_rep_expr = try!(self.c(expr)); - - self.fill(hole_rep_expr, goto_split); - Ok(if greedy { - self.fill_split(split, Some(goto_rep_expr), None) - } else { - self.fill_split(split, None, Some(goto_rep_expr)) - }) - } - - fn c_repeat_one_or_more( - &mut self, - expr: &Expr, - greedy: bool, - ) -> CompileResult { - let goto_rep_expr = self.insts.len(); - let hole_rep_expr = try!(self.c(expr)); - self.fill_to_next(hole_rep_expr); - let split = self.push_split_hole(); - - Ok(if greedy { - self.fill_split(split, Some(goto_rep_expr), None) - } else { - self.fill_split(split, None, Some(goto_rep_expr)) - }) - } - - fn c_repeat_range_min_or_more( - &mut self, - expr: &Expr, - greedy: bool, - min: u32, - ) -> CompileResult { - let min = u32_to_usize(min); - if min == 0 { - return self.c_repeat_zero_or_more(expr, greedy); - } - let hole = try!(self.c_concat(iter::repeat(expr).take(min - 1))); - self.fill_to_next(hole); - self.c_repeat_one_or_more(expr, greedy) - } - - fn c_repeat_range( - &mut self, - expr: &Expr, - greedy: bool, - min: u32, - max: u32, - ) -> CompileResult { - let (min, max) = (u32_to_usize(min), u32_to_usize(max)); - let hole = try!(self.c_concat(iter::repeat(expr).take(min))); - if min == max { - return Ok(hole); - } - self.fill_to_next(hole); - // It is much simpler to compile, e.g., `a{2,5}` as: - // - // aaa?a?a? - // - // But you end up with a sequence of instructions like this: - // - // 0: 'a' - // 1: 'a', - // 2: split(3, 4) - // 3: 'a' - // 4: split(5, 6) - // 5: 'a' - // 6: split(7, 8) - // 7: 'a' - // 8: MATCH - // - // This is *incredibly* inefficient because the splits end - // up forming a chain. Given a much larger number than `5`, - // it is easy cause perverse behavior in the matching engines - // like stack overflows. We could fix the matching engine, - // but instead, we should just make the program smarter. - // Thus, we do a custom job here and instead of chaining the - // splits together, we simply point them to the MATCH - // instruction directly (for example). - let mut holes = vec![]; - let mut prev_hole = Hole::None; - for _ in min..max { - self.fill_to_next(prev_hole); - let split = self.push_split_hole(); - let goto_rep_expr = self.insts.len(); - prev_hole = try!(self.c(expr)); - if greedy { - holes.push(self.fill_split(split, Some(goto_rep_expr), None)); - } else { - holes.push(self.fill_split(split, None, Some(goto_rep_expr))); - } - } - holes.push(prev_hole); - Ok(Hole::Many(holes)) - } - - fn fill(&mut self, hole: Hole, goto: InstIdx) { - match hole { - Hole::None => {} - Hole::One(pc) => { - self.insts[pc].complete(goto); - } - Hole::Many(holes) => { - for hole in holes { - self.fill(hole, goto); - } - } - } - } - - fn fill_to_next(&mut self, hole: Hole) { - let next = self.insts.len(); - self.fill(hole, next); - } - - fn fill_split( - &mut self, - hole: Hole, - goto1: Option, - goto2: Option, - ) -> Hole { - match hole { - Hole::None => Hole::None, - Hole::One(pc) => { - match (goto1, goto2) { - (Some(goto1), Some(goto2)) => { - self.insts[pc].complete_split(goto1, goto2); - Hole::None - } - (Some(goto1), None) => { - self.insts[pc].complete_split_goto1(goto1); - Hole::One(pc) - } - (None, Some(goto2)) => { - self.insts[pc].complete_split_goto2(goto2); - Hole::One(pc) - } - (None, None) => unreachable!("at least one of the split \ - holes must be filled"), - } - } - Hole::Many(holes) => { - let mut new_holes = vec![]; - for hole in holes { - new_holes.push(self.fill_split(hole, goto1, goto2)); - } - if new_holes.is_empty() { - Hole::None - } else if new_holes.len() == 1 { - new_holes.pop().unwrap() - } else { - Hole::Many(new_holes) - } - } - } - } - - fn push_compiled(&mut self, inst: Inst) { - self.insts.push(MaybeInst::Compiled(inst)); - } - - fn push_hole(&mut self, inst: MaybeInst) -> Hole { - let hole = self.insts.len(); - self.insts.push(inst); - Hole::One(hole) - } - - fn push_split_hole(&mut self) -> Hole { - let hole = self.insts.len(); - self.insts.push(MaybeInst::Split); - Hole::One(hole) - } - - fn check_size(&self) -> Result<(), Error> { - use std::mem::size_of; - - if self.insts.len() * size_of::() > self.size_limit { - Err(Error::CompiledTooBig(self.size_limit)) - } else { - Ok(()) - } - } -} - -/// Hole represents a pointer to zero or more instructions in a regex program -/// that need to have their goto fields set to the same location. -#[derive(Debug)] -enum Hole { - None, - One(InstIdx), - Many(Vec), -} - -/// MaybeInst represents a possibly incomplete instruction in a regex program. -/// The nature of incompleteness is always determined by whether the -/// instruction's "goto" field has been set or not. -/// -/// In the case of Split, since it has two goto fields, it can be "incomplete" -/// in three different ways: either none of its fields are set, only the first -/// is set or only the second is set. The reason why the first and second -/// fields are distinguished is because the order of the branch matters. (i.e., -/// it's how "greedy" and "ungreedy" semantics are implemented.) -/// -/// When the compiler is finished, *all* of its possibly incomplete -/// instructions must have been fully compiled where all goto fields in all -/// instructions are set. Violation of this invariant is a bug. -#[derive(Clone, Debug)] -enum MaybeInst { - /// Compiled represents an instruction that is fully compiled. That is, - /// all of its "goto" fields have been filled. When the compiler is done, - /// all MaybeInsts must be of the Compiled form. - Compiled(Inst), - /// Split is a branch instruction where neither of its goto fields have - /// been set. - Split, - /// Split1 is a branch instruction where only the first goto field has - /// been set. - Split1(InstIdx), - /// Split2 is a branch instruction where only the second goto field has - /// been set. - Split2(InstIdx), - /// Save is a capture instruction whose goto field has not been set. - Save { slot: usize }, - /// EmptyLook is a zero-width assertion instruction whose goto field has - /// not been set. - EmptyLook { look: EmptyLook }, - /// Char is a character-match instruction whose goto field has not been - /// set. - Char { c: char }, - /// Ranges is a character-range-match instruction whose goto field has not - /// been set. - Ranges { ranges: Vec<(char, char)> }, -} - -impl MaybeInst { - fn complete(&mut self, goto: InstIdx) { - let filled = match *self { - MaybeInst::Save { slot } => Inst::Save(InstSave { - goto: goto, - slot: slot, - }), - MaybeInst::EmptyLook { look } => Inst::EmptyLook(InstEmptyLook { - goto: goto, - look: look, - }), - MaybeInst::Char { c } => Inst::Char(InstChar { - goto: goto, - c: c, - }), - MaybeInst::Ranges { ref ranges } => Inst::Ranges(InstRanges { - goto: goto, - ranges: ranges.clone(), - }), - MaybeInst::Split1(goto1) => { - Inst::Split(InstSplit { goto1: goto1, goto2: goto }) - } - MaybeInst::Split2(goto2) => { - Inst::Split(InstSplit { goto1: goto, goto2: goto2 }) - } - _ => unreachable!("must be called on an uncompiled instruction \ - with exactly one missing goto field, \ - instead it was called on: {:?}", self), - }; - *self = MaybeInst::Compiled(filled); - } - - fn complete_split(&mut self, goto1: InstIdx, goto2: InstIdx) { - let filled = match *self { - MaybeInst::Split => { - Inst::Split(InstSplit { goto1: goto1, goto2: goto2 }) - } - _ => unreachable!("must be called on Split instruction, \ - instead it was called on: {:?}", self), - }; - *self = MaybeInst::Compiled(filled); - } - - fn complete_split_goto1(&mut self, goto1: InstIdx) { - let half_filled = match *self { - MaybeInst::Split => goto1, - _ => unreachable!("must be called on Split instruction, \ - instead it was called on: {:?}", self), - }; - *self = MaybeInst::Split1(half_filled); - } - - fn complete_split_goto2(&mut self, goto2: InstIdx) { - let half_filled = match *self { - MaybeInst::Split => goto2, - _ => unreachable!("must be called on Split instruction, \ - instead it was called on: {:?}", self), - }; - *self = MaybeInst::Split2(half_filled); - } - - fn unwrap(self) -> Inst { - match self { - MaybeInst::Compiled(inst) => inst, - _ => unreachable!("must be called on a compiled instruction, \ - instead it was called on: {:?}", self), - } - } -} - -fn u32_to_usize(n: u32) -> usize { - if (n as u64) > (::std::usize::MAX as u64) { - panic!("BUG: {} is too big to be pointer sized", n) - } - n as usize -} diff --git a/deps/regex-0.1.48/src/input.rs b/deps/regex-0.1.48/src/input.rs deleted file mode 100644 index 446872bb4..000000000 --- a/deps/regex-0.1.48/src/input.rs +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -use std::ops; - -use char::Char; -use prefix::Prefix; - -/// Represents a location in the input. -#[derive(Clone, Copy, Debug)] -pub struct InputAt { - pos: usize, - c: Char, - len: usize, -} - -impl InputAt { - /// Returns true iff this position is at the beginning of the input. - pub fn is_beginning(&self) -> bool { - self.pos == 0 - } - - /// Returns the character at this position. - /// - /// If this position is just before or after the input, then an absent - /// character is returned. - pub fn char(&self) -> Char { - self.c - } - - /// Returns the UTF-8 width of the character at this position. - pub fn len(&self) -> usize { - self.len - } - - /// Returns the byte offset of this position. - pub fn pos(&self) -> usize { - self.pos - } - - /// Returns the byte offset of the next position in the input. - pub fn next_pos(&self) -> usize { - self.pos + self.len - } -} - -/// An abstraction over input used in the matching engines. -pub trait Input { - /// Return an encoding of the position at byte offset `i`. - fn at(&self, i: usize) -> InputAt; - /// Return an encoding of the char position just prior to byte offset `i`. - fn previous_at(&self, i: usize) -> InputAt; - /// Scan the input for a matching prefix. - fn prefix_at(&self, prefixes: &Prefix, at: InputAt) -> Option; -} - -/// An input reader over characters. -/// -/// (This is the only implementation of `Input` at the moment.) -#[derive(Debug)] -pub struct CharInput<'t>(&'t str); - -impl<'t> CharInput<'t> { - /// Return a new character input reader for the given string. - pub fn new(s: &'t str) -> CharInput<'t> { - CharInput(s) - } -} - -impl<'t> ops::Deref for CharInput<'t> { - type Target = str; - - fn deref(&self) -> &str { - self.0 - } -} - -impl<'t> Input for CharInput<'t> { - // This `inline(always)` increases throughput by almost 25% on the `hard` - // benchmarks over a normal `inline` annotation. - // - // I'm not sure why `#[inline]` isn't enough to convince LLVM, but it is - // used *a lot* in the guts of the matching engines. - #[inline(always)] - fn at(&self, i: usize) -> InputAt { - let c = self[i..].chars().next().into(); - InputAt { - pos: i, - c: c, - len: c.len_utf8(), - } - } - - fn previous_at(&self, i: usize) -> InputAt { - let c: Char = self[..i].chars().rev().next().into(); - let len = c.len_utf8(); - InputAt { - pos: i - len, - c: c, - len: len, - } - } - - fn prefix_at(&self, prefixes: &Prefix, at: InputAt) -> Option { - prefixes.find(&self[at.pos()..]).map(|(s, _)| self.at(at.pos() + s)) - } -} diff --git a/deps/regex-0.1.48/src/inst.rs b/deps/regex-0.1.48/src/inst.rs deleted file mode 100644 index 078a5b3f0..000000000 --- a/deps/regex-0.1.48/src/inst.rs +++ /dev/null @@ -1,142 +0,0 @@ -use std::cmp::Ordering; - -use char::Char; - -/// InstIdx represents the index of an instruction in a regex program. -pub type InstIdx = usize; - -/// Inst is an instruction code in a Regex program. -#[derive(Clone, Debug)] -pub enum Inst { - /// Match indicates that the program has reached a match state. - Match, - /// Save causes the program to save the current location of the input in - /// the slot indicated by InstSave. - Save(InstSave), - /// Split causes the program to diverge to one of two paths in the - /// program, preferring goto1 in InstSplit. - Split(InstSplit), - /// EmptyLook represents a zero-width assertion in a regex program. A - /// zero-width assertion does not consume any of the input text. - EmptyLook(InstEmptyLook), - /// Char requires the regex program to match the character in InstChar at - /// the current position in the input. - Char(InstChar), - /// Ranges requires the regex program to match the character at the current - /// position in the input with one of the ranges specified in InstRanges. - Ranges(InstRanges), -} - -/// Representation of the Save instruction. -#[derive(Clone, Debug)] -pub struct InstSave { - /// The next location to execute in the program. - pub goto: InstIdx, - /// The capture slot (there are two slots for every capture in a regex, - /// including the zeroth capture for the entire match). - pub slot: usize, -} - -/// Representation of the Split instruction. -#[derive(Clone, Debug)] -pub struct InstSplit { - /// The first instruction to try. A match resulting from following goto1 - /// has precedence over a match resulting from following goto2. - pub goto1: InstIdx, - /// The second instruction to try. A match resulting from following goto1 - /// has precedence over a match resulting from following goto2. - pub goto2: InstIdx, -} - -/// Representation of the EmptyLook instruction. -#[derive(Clone, Debug)] -pub struct InstEmptyLook { - /// The next location to execute in the program if this instruction - /// succeeds. - pub goto: InstIdx, - /// The type of zero-width assertion to check. - pub look: EmptyLook, -} - -/// The set of zero-width match instructions. -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum EmptyLook { - /// Start of line or input. - StartLine, - /// End of line or input. - EndLine, - /// Start of input. - StartText, - /// End of input. - EndText, - /// Word character on one side and non-word character on other. - WordBoundary, - /// Word character on both sides or non-word character on both sides. - NotWordBoundary, -} - -impl InstEmptyLook { - /// Tests whether the pair of characters matches this zero-width - /// instruction. - pub fn matches(&self, c1: Char, c2: Char) -> bool { - use self::EmptyLook::*; - match self.look { - StartLine => c1.is_none() || c1 == '\n', - EndLine => c2.is_none() || c2 == '\n', - StartText => c1.is_none(), - EndText => c2.is_none(), - ref wbty => { - let (w1, w2) = (c1.is_word_char(), c2.is_word_char()); - (*wbty == WordBoundary && w1 ^ w2) - || (*wbty == NotWordBoundary && !(w1 ^ w2)) - } - } - } -} - -/// Representation of the Char instruction. -#[derive(Clone, Debug)] -pub struct InstChar { - /// The next location to execute in the program if this instruction - /// succeeds. - pub goto: InstIdx, - /// The character to test. - pub c: char, -} - -/// Representation of the Ranges instruction. -#[derive(Clone, Debug)] -pub struct InstRanges { - /// The next location to execute in the program if this instruction - /// succeeds. - pub goto: InstIdx, - /// The set of Unicode scalar value ranges to test. - pub ranges: Vec<(char, char)>, -} - -impl InstRanges { - /// Tests whether the given input character matches this instruction. - #[inline(always)] // About ~5-15% more throughput then `#[inline]` - pub fn matches(&self, c: Char) -> bool { - // This speeds up the `match_class_unicode` benchmark by checking - // some common cases quickly without binary search. e.g., Matching - // a Unicode class on predominantly ASCII text. - for r in self.ranges.iter().take(4) { - if c < r.0 { - return false; - } - if c <= r.1 { - return true; - } - } - self.ranges.binary_search_by(|r| { - if r.1 < c { - Ordering::Less - } else if r.0 > c { - Ordering::Greater - } else { - Ordering::Equal - } - }).is_ok() - } -} diff --git a/deps/regex-0.1.48/src/lib.rs b/deps/regex-0.1.48/src/lib.rs deleted file mode 100644 index d30c41c0f..000000000 --- a/deps/regex-0.1.48/src/lib.rs +++ /dev/null @@ -1,440 +0,0 @@ -// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -//! This crate provides a native implementation of regular expressions that is -//! heavily based on RE2 both in syntax and in implementation. Notably, -//! backreferences and arbitrary lookahead/lookbehind assertions are not -//! provided. In return, regular expression searching provided by this package -//! has excellent worst-case performance. The specific syntax supported is -//! documented further down. -//! -//! This crate's documentation provides some simple examples, describes Unicode -//! support and exhaustively lists the supported syntax. For more specific -//! details on the API, please see the documentation for the `Regex` type. -//! -//! # Usage -//! -//! This crate is [on crates.io](https://crates.io/crates/regex) and can be -//! used by adding `regex` to your dependencies in your project's `Cargo.toml`. -//! -//! ```toml -//! [dependencies] -//! regex = "0.1" -//! ``` -//! -//! and this to your crate root: -//! -//! ```rust -//! extern crate regex; -//! ``` -//! -//! # First example: find a date -//! -//! General use of regular expressions in this package involves compiling an -//! expression and then using it to search, split or replace text. For example, -//! to confirm that some text resembles a date: -//! -//! ```rust -//! use regex::Regex; -//! let re = Regex::new(r"^\d{4}-\d{2}-\d{2}$").unwrap(); -//! assert!(re.is_match("2014-01-01")); -//! ``` -//! -//! Notice the use of the `^` and `$` anchors. In this crate, every expression -//! is executed with an implicit `.*?` at the beginning and end, which allows -//! it to match anywhere in the text. Anchors can be used to ensure that the -//! full text matches an expression. -//! -//! This example also demonstrates the utility of -//! [raw strings](https://doc.rust-lang.org/stable/reference.html#raw-string-literals) -//! in Rust, which -//! are just like regular strings except they are prefixed with an `r` and do -//! not process any escape sequences. For example, `"\\d"` is the same -//! expression as `r"\d"`. -//! -//! # The `regex!` macro -//! -//! Rust's compile-time meta-programming facilities provide a way to write a -//! `regex!` macro which compiles regular expressions *when your program -//! compiles*. Said differently, if you only use `regex!` to build regular -//! expressions in your program, then your program cannot compile with an -//! invalid regular expression. Moreover, the `regex!` macro compiles the -//! given expression to native Rust code, which ideally makes it faster. -//! Unfortunately (or fortunately), the dynamic implementation has had a lot -//! more optimization work put into it currently, so it is faster than -//! the `regex!` macro in most cases. -//! -//! To use the `regex!` macro, you must add `regex_macros` to your dependencies -//! in your project's `Cargo.toml`: -//! -//! ```toml -//! [dependencies] -//! regex = "0.1.8" -//! regex_macros = "0.1.8" -//! ``` -//! -//! and then enable the `plugin` feature and import the `regex_macros` crate as -//! a syntax extension: -//! -//! ```ignore -//! #![feature(plugin)] -//! #![plugin(regex_macros)] -//! extern crate regex; -//! -//! fn main() { -//! let re = regex!(r"^\d{4}-\d{2}-\d{2}$"); -//! assert!(re.is_match("2014-01-01")); -//! } -//! ``` -//! -//! There are a few things worth mentioning about using the `regex!` macro. -//! Firstly, the `regex!` macro *only* accepts string *literals*. -//! Secondly, the `regex` crate *must* be linked with the name `regex` since -//! the generated code depends on finding symbols in the `regex` crate. -//! -//! One downside of using the `regex!` macro is that it can increase the -//! size of your program's binary since it generates specialized Rust code. -//! The extra size probably won't be significant for a small number of -//! expressions, but 100+ calls to `regex!` will probably result in a -//! noticeably bigger binary. -//! -//! **NOTE**: This is implemented using a compiler plugin, which is not -//! available on the Rust 1.0 beta/stable channels. Therefore, you'll only -//! be able to use `regex!` on the nightlies. -//! -//! # Example: iterating over capture groups -//! -//! This crate provides convenient iterators for matching an expression -//! repeatedly against a search string to find successive non-overlapping -//! matches. For example, to find all dates in a string and be able to access -//! them by their component pieces: -//! -//! ```rust -//! # extern crate regex; use regex::Regex; -//! # fn main() { -//! let re = Regex::new(r"(\d{4})-(\d{2})-(\d{2})").unwrap(); -//! let text = "2012-03-14, 2013-01-01 and 2014-07-05"; -//! for cap in re.captures_iter(text) { -//! println!("Month: {} Day: {} Year: {}", -//! cap.at(2).unwrap_or(""), cap.at(3).unwrap_or(""), -//! cap.at(1).unwrap_or("")); -//! } -//! // Output: -//! // Month: 03 Day: 14 Year: 2012 -//! // Month: 01 Day: 01 Year: 2013 -//! // Month: 07 Day: 05 Year: 2014 -//! # } -//! ``` -//! -//! Notice that the year is in the capture group indexed at `1`. This is -//! because the *entire match* is stored in the capture group at index `0`. -//! -//! # Example: replacement with named capture groups -//! -//! Building on the previous example, perhaps we'd like to rearrange the date -//! formats. This can be done with text replacement. But to make the code -//! clearer, we can *name* our capture groups and use those names as variables -//! in our replacement text: -//! -//! ```rust -//! # extern crate regex; use regex::Regex; -//! # fn main() { -//! let re = Regex::new(r"(?P\d{4})-(?P\d{2})-(?P\d{2})").unwrap(); -//! let before = "2012-03-14, 2013-01-01 and 2014-07-05"; -//! let after = re.replace_all(before, "$m/$d/$y"); -//! assert_eq!(after, "03/14/2012, 01/01/2013 and 07/05/2014"); -//! # } -//! ``` -//! -//! The `replace` methods are actually polymorphic in the replacement, which -//! provides more flexibility than is seen here. (See the documentation for -//! `Regex::replace` for more details.) -//! -//! Note that if your regex gets complicated, you can use the `x` flag to -//! enable insigificant whitespace mode, which also lets you write comments: -//! -//! ```rust -//! # extern crate regex; use regex::Regex; -//! # fn main() { -//! let re = Regex::new(r"(?x) -//! (?P\d{4}) # the year -//! - -//! (?P\d{2}) # the month -//! - -//! (?P\d{2}) # the day -//! ").unwrap(); -//! let before = "2012-03-14, 2013-01-01 and 2014-07-05"; -//! let after = re.replace_all(before, "$m/$d/$y"); -//! assert_eq!(after, "03/14/2012, 01/01/2013 and 07/05/2014"); -//! # } -//! ``` -//! -//! # Pay for what you use -//! -//! With respect to searching text with a regular expression, there are three -//! questions that can be asked: -//! -//! 1. Does the text match this expression? -//! 2. If so, where does it match? -//! 3. Where are the submatches? -//! -//! Generally speaking, this crate could provide a function to answer only #3, -//! which would subsume #1 and #2 automatically. However, it can be -//! significantly more expensive to compute the location of submatches, so it's -//! best not to do it if you don't need to. -//! -//! Therefore, only use what you need. For example, don't use `find` if you -//! only need to test if an expression matches a string. (Use `is_match` -//! instead.) -//! -//! # Unicode -//! -//! This implementation executes regular expressions **only** on sequences of -//! Unicode scalar values while exposing match locations as byte indices into -//! the search string. -//! -//! Currently, only simple case folding is supported. Namely, when matching -//! case-insensitively, the characters are first mapped using the -//! [simple case folding](ftp://ftp.unicode.org/Public/UNIDATA/CaseFolding.txt) -//! mapping. -//! -//! Regular expressions themselves are also **only** interpreted as a sequence -//! of Unicode scalar values. This means you can use Unicode characters -//! directly in your expression: -//! -//! ```rust -//! # extern crate regex; use regex::Regex; -//! # fn main() { -//! let re = Regex::new(r"(?i)Δ+").unwrap(); -//! assert_eq!(re.find("ΔδΔ"), Some((0, 6))); -//! # } -//! ``` -//! -//! Finally, Unicode general categories and scripts are available as character -//! classes. For example, you can match a sequence of numerals, Greek or -//! Cherokee letters: -//! -//! ```rust -//! # extern crate regex; use regex::Regex; -//! # fn main() { -//! let re = Regex::new(r"[\pN\p{Greek}\p{Cherokee}]+").unwrap(); -//! assert_eq!(re.find("abcΔᎠβⅠᏴγδⅡxyz"), Some((3, 23))); -//! # } -//! ``` -//! -//! # Syntax -//! -//! The syntax supported in this crate is almost in an exact correspondence -//! with the syntax supported by RE2. It is documented below. -//! -//! Note that the regular expression parser and abstract syntax are exposed in -//! a separate crate, -//! [`regex-syntax`](../regex_syntax/index.html). -//! -//! ## Matching one character -//! -//!

-//! .           any character except new line (includes new line with s flag)
-//! [xyz]       A character class matching either x, y or z.
-//! [^xyz]      A character class matching any character except x, y and z.
-//! [a-z]       A character class matching any character in range a-z.
-//! \d          digit (\p{Nd})
-//! \D          not digit
-//! [:alpha:]   ASCII character class ([A-Za-z])
-//! [:^alpha:]  Negated ASCII character class ([^A-Za-z])
-//! \pN         One-letter name Unicode character class
-//! \p{Greek}   Unicode character class (general category or script)
-//! \PN         Negated one-letter name Unicode character class
-//! \P{Greek}   negated Unicode character class (general category or script)
-//! 
-//! -//! Any named character class may appear inside a bracketed `[...]` character -//! class. For example, `[\p{Greek}\pN]` matches any Greek or numeral -//! character. -//! -//! ## Composites -//! -//!
-//! xy    concatenation (x followed by y)
-//! x|y   alternation (x or y, prefer x)
-//! 
-//! -//! ## Repetitions -//! -//!
-//! x*        zero or more of x (greedy)
-//! x+        one or more of x (greedy)
-//! x?        zero or one of x (greedy)
-//! x*?       zero or more of x (ungreedy)
-//! x+?       one or more of x (ungreedy)
-//! x??       zero or one of x (ungreedy)
-//! x{n,m}    at least n x and at most m x (greedy)
-//! x{n,}     at least n x (greedy)
-//! x{n}      exactly n x
-//! x{n,m}?   at least n x and at most m x (ungreedy)
-//! x{n,}?    at least n x (ungreedy)
-//! x{n}?     exactly n x
-//! 
-//! -//! ## Empty matches -//! -//!
-//! ^     the beginning of text (or start-of-line with multi-line mode)
-//! $     the end of text (or end-of-line with multi-line mode)
-//! \A    only the beginning of text (even with multi-line mode enabled)
-//! \z    only the end of text (even with multi-line mode enabled)
-//! \b    a Unicode word boundary (\w on one side and \W, \A, or \z on other)
-//! \B    not a Unicode word boundary
-//! 
-//! -//! ## Grouping and flags -//! -//!
-//! (exp)          numbered capture group (indexed by opening parenthesis)
-//! (?P<name>exp)  named (also numbered) capture group (allowed chars: [_0-9a-zA-Z])
-//! (?:exp)        non-capturing group
-//! (?flags)       set flags within current group
-//! (?flags:exp)   set flags for exp (non-capturing)
-//! 
-//! -//! Flags are each a single character. For example, `(?x)` sets the flag `x` -//! and `(?-x)` clears the flag `x`. Multiple flags can be set or cleared at -//! the same time: `(?xy)` sets both the `x` and `y` flags and `(?x-y)` sets -//! the `x` flag and clears the `y` flag. -//! -//! All flags are by default disabled. They are: -//! -//!
-//! i     case-insensitive
-//! m     multi-line mode: ^ and $ match begin/end of line
-//! s     allow . to match \n
-//! U     swap the meaning of x* and x*?
-//! x     ignore whitespace and allow line comments (starting with `#`)
-//! 
-//! -//! Here's an example that matches case-insensitively for only part of the -//! expression: -//! -//! ```rust -//! # extern crate regex; use regex::Regex; -//! # fn main() { -//! let re = Regex::new(r"(?i)a+(?-i)b+").unwrap(); -//! let cap = re.captures("AaAaAbbBBBb").unwrap(); -//! assert_eq!(cap.at(0), Some("AaAaAbb")); -//! # } -//! ``` -//! -//! Notice that the `a+` matches either `a` or `A`, but the `b+` only matches -//! `b`. -//! -//! ## Escape sequences -//! -//!
-//! \*         literal *, works for any punctuation character: \.+*?()|[]{}^$
-//! \a         bell (\x07)
-//! \f         form feed (\x0C)
-//! \t         horizontal tab
-//! \n         new line
-//! \r         carriage return
-//! \v         vertical tab (\x0B)
-//! \123       octal character code (up to three digits)
-//! \x7F       hex character code (exactly two digits)
-//! \x{10FFFF} any hex character code corresponding to a Unicode code point
-//! 
-//! -//! ## Perl character classes (Unicode friendly) -//! -//! These classes are based on the definitions provided in -//! [UTS#18](http://www.unicode.org/reports/tr18/#Compatibility_Properties): -//! -//!
-//! \d     digit (\p{Nd})
-//! \D     not digit
-//! \s     whitespace (\p{White_Space})
-//! \S     not whitespace
-//! \w     word character (\p{Alphabetic} + \p{M} + \d + \p{Pc} + \p{Join_Control})
-//! \W     not word character
-//! 
-//! -//! ## ASCII character classes -//! -//!
-//! [:alnum:]    alphanumeric ([0-9A-Za-z])
-//! [:alpha:]    alphabetic ([A-Za-z])
-//! [:ascii:]    ASCII ([\x00-\x7F])
-//! [:blank:]    blank ([\t ])
-//! [:cntrl:]    control ([\x00-\x1F\x7F])
-//! [:digit:]    digits ([0-9])
-//! [:graph:]    graphical ([!-~])
-//! [:lower:]    lower case ([a-z])
-//! [:print:]    printable ([ -~])
-//! [:punct:]    punctuation ([!-/:-@[-`{-~])
-//! [:space:]    whitespace ([\t\n\v\f\r ])
-//! [:upper:]    upper case ([A-Z])
-//! [:word:]     word characters ([0-9A-Za-z_])
-//! [:xdigit:]   hex digit ([0-9A-Fa-f])
-//! 
-//! -//! # Untrusted input -//! -//! This crate can handle both untrusted regular expressions and untrusted -//! search text. -//! -//! Untrusted regular expressions are handled by capping the size of a compiled -//! regular expression. (See `Regex::with_size_limit`.) Without this, it would -//! be trivial for an attacker to exhaust your system's memory with expressions -//! like `a{100}{100}{100}`. -//! -//! Untrusted search text is allowed because the matching engine(s) in this -//! crate have time complexity `O(mn)` (with `m ~ regex` and `n ~ search -//! text`), which means there's no way to cause exponential blow-up like with -//! some other regular expression engines. (We pay for this by disallowing -//! features like arbitrary look-ahead and backreferences.) - -#![deny(missing_docs)] -#![cfg_attr(test, deny(warnings))] -#![cfg_attr(feature = "pattern", feature(pattern))] -#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", - html_favicon_url = "https://www.rust-lang.org/favicon.ico", - html_root_url = "https://doc.rust-lang.org/regex/")] - -extern crate aho_corasick; -extern crate memchr; -extern crate regex_syntax as syntax; - -pub use re::{ - Regex, Error, Captures, SubCaptures, SubCapturesPos, SubCapturesNamed, - CaptureNames, FindCaptures, FindMatches, - Replacer, NoExpand, RegexSplits, RegexSplitsN, - quote, is_match, -}; - -mod backtrack; -mod char; -mod compile; -mod input; -mod inst; -mod pool; -mod prefix; -mod program; -mod nfa; -mod re; - -/// The `internal` module exists to support the `regex!` macro and other -/// suspicious activity, such as testing different matching engines. -#[doc(hidden)] -pub mod internal { - pub use char::Char; - pub use input::{Input, CharInput, InputAt}; - pub use inst::{Inst, EmptyLook, InstRanges}; - pub use program::{Program, MatchEngine}; - pub use re::ExNative; - pub use re::Regex::{Dynamic, Native}; -} diff --git a/deps/regex-0.1.48/src/nfa.rs b/deps/regex-0.1.48/src/nfa.rs deleted file mode 100644 index 9743a1987..000000000 --- a/deps/regex-0.1.48/src/nfa.rs +++ /dev/null @@ -1,295 +0,0 @@ -// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -// FIXME: Currently, the VM simulates an NFA. It would be nice to have another -// VM that simulates a DFA. -// -// According to Russ Cox[1], a DFA performs better than an NFA, principally -// because it reuses states previously computed by the machine *and* doesn't -// keep track of capture groups. The drawback of a DFA (aside from its -// complexity) is that it can't accurately return the locations of submatches. -// The NFA *can* do that. (This is my understanding anyway.) -// -// Cox suggests that a DFA ought to be used to answer "does this match" and -// "where does it match" questions. (In the latter, the starting position of -// the match is computed by executing the regex backwards.) Cox also suggests -// that a DFA should be run when asking "where are the submatches", which can -// 1) quickly answer "no" is there's no match and 2) discover the substring -// that matches, which means running the NFA on smaller input. -// -// Currently, the NFA simulation implemented below does some dirty tricks to -// avoid tracking capture groups when they aren't needed (which only works -// for 'is_match', not 'find'). This is a half-measure, but does provide some -// perf improvement. -// -// AFAIK, the DFA/NFA approach is implemented in RE2/C++ but *not* in RE2/Go. -// -// UPDATE: We now have a backtracking matching engine and a DFA for prefix -// matching. The prefix DFA is used in both the NFA simulation below and the -// backtracking engine to skip along the input quickly. -// -// [1] - http://swtch.com/~rsc/regex/regex3.html - -use input::{Input, InputAt, CharInput}; -use program::Program; -use re::CaptureIdxs; - -/// An NFA simulation matching engine. -#[derive(Debug)] -pub struct Nfa<'r, 't> { - prog: &'r Program, - input: CharInput<'t>, -} - -impl<'r, 't> Nfa<'r, 't> { - /// Execute the NFA matching engine. - /// - /// If there's a match, `exec` returns `true` and populates the given - /// captures accordingly. - pub fn exec( - prog: &'r Program, - mut caps: &mut CaptureIdxs, - text: &'t str, - start: usize, - ) -> bool { - let mut q = prog.nfa_threads.get(); - let input = CharInput::new(text); - let at = input.at(start); - Nfa { - prog: prog, - input: input, - }.exec_(&mut q, &mut caps, at) - } - - fn exec_( - &mut self, - mut q: &mut NfaThreads, - mut caps: &mut CaptureIdxs, - mut at: InputAt, - ) -> bool { - let mut matched = false; - q.clist.empty(); q.nlist.empty(); -'LOOP: loop { - if q.clist.size == 0 { - // Three ways to bail out when our current set of threads is - // empty. - // - // 1. We have a match---so we're done exploring any possible - // alternatives. Time to quit. - // - // 2. If the expression starts with a '^' we can terminate as - // soon as the last thread dies. - if matched - || (!at.is_beginning() && self.prog.anchored_begin) { - break; - } - - // 3. If there's a literal prefix for the program, try to - // jump ahead quickly. If it can't be found, then we can - // bail out early. - if !self.prog.prefixes.is_empty() { - at = match self.input.prefix_at(&self.prog.prefixes, at) { - None => break, - Some(at) => at, - }; - } - } - - // This simulates a preceding '.*?' for every regex by adding - // a state starting at the current position in the input for the - // beginning of the program only if we don't already have a match. - if q.clist.size == 0 || (!self.prog.anchored_begin && !matched) { - self.add(&mut q.clist, &mut caps, 0, at) - } - // The previous call to "add" actually inspects the position just - // before the current character. For stepping through the machine, - // we can to look at the current character, so we advance the - // input. - let at_next = self.input.at(at.next_pos()); - for i in 0..q.clist.size { - let pc = q.clist.pc(i); - let tcaps = q.clist.caps(i); - if self.step(&mut q.nlist, caps, tcaps, pc, at, at_next) { - matched = true; - if caps.len() == 0 { - // If we only care if a match occurs (not its - // position), then we can quit right now. - break 'LOOP; - } - // We don't need to check the rest of the threads in this - // set because we've matched something ("leftmost-first"). - // However, we still need to check threads in the next set - // to support things like greedy matching. - break; - } - } - if at.char().is_none() { - break; - } - at = at_next; - q.swap(); - q.nlist.empty(); - } - matched - } - - fn step( - &self, - nlist: &mut Threads, - caps: &mut [Option], - thread_caps: &mut [Option], - pc: usize, - at: InputAt, - at_next: InputAt, - ) -> bool { - use inst::Inst::*; - match self.prog.insts[pc] { - Match => { - for (slot, val) in caps.iter_mut().zip(thread_caps.iter()) { - *slot = *val; - } - true - } - Char(ref inst) => { - if inst.c == at.char() { - self.add(nlist, thread_caps, inst.goto, at_next); - } - false - } - Ranges(ref inst) => { - if inst.matches(at.char()) { - self.add(nlist, thread_caps, inst.goto, at_next); - } - false - } - EmptyLook(_) | Save(_) | Split(_) => false, - } - } - - fn add( - &self, - nlist: &mut Threads, - thread_caps: &mut [Option], - pc: usize, - at: InputAt, - ) { - use inst::Inst::*; - - if nlist.contains(pc) { - return - } - let ti = nlist.add(pc); - match self.prog.insts[pc] { - EmptyLook(ref inst) => { - let prev = self.input.previous_at(at.pos()); - if inst.matches(prev.char(), at.char()) { - self.add(nlist, thread_caps, inst.goto, at); - } - } - Save(ref inst) => { - if inst.slot >= thread_caps.len() { - self.add(nlist, thread_caps, inst.goto, at); - } else { - let old = thread_caps[inst.slot]; - thread_caps[inst.slot] = Some(at.pos()); - self.add(nlist, thread_caps, inst.goto, at); - thread_caps[inst.slot] = old; - } - } - Split(ref inst) => { - self.add(nlist, thread_caps, inst.goto1, at); - self.add(nlist, thread_caps, inst.goto2, at); - } - Match | Char(_) | Ranges(_) => { - let mut t = &mut nlist.thread(ti); - for (slot, val) in t.caps.iter_mut().zip(thread_caps.iter()) { - *slot = *val; - } - } - } - } -} - -/// Shared cached state between multiple invocations of a NFA engine -/// in the same thread. -/// -/// It is exported so that it can be cached by `program::Program`. -#[derive(Debug)] -pub struct NfaThreads { - clist: Threads, - nlist: Threads, -} - -#[derive(Debug)] -struct Threads { - dense: Vec, - sparse: Vec, - size: usize, -} - -#[derive(Clone, Debug)] -struct Thread { - pc: usize, - caps: Vec>, -} - -impl NfaThreads { - /// Create new empty state for the NFA engine. - pub fn new(num_insts: usize, ncaps: usize) -> NfaThreads { - NfaThreads { - clist: Threads::new(num_insts, ncaps), - nlist: Threads::new(num_insts, ncaps), - } - } - - fn swap(&mut self) { - ::std::mem::swap(&mut self.clist, &mut self.nlist); - } -} - -impl Threads { - fn new(num_insts: usize, ncaps: usize) -> Threads { - let t = Thread { pc: 0, caps: vec![None; ncaps * 2] }; - Threads { - dense: vec![t; num_insts], - sparse: vec![0; num_insts], - size: 0, - } - } - - fn add(&mut self, pc: usize) -> usize { - let i = self.size; - self.dense[i].pc = pc; - self.sparse[pc] = i; - self.size += 1; - i - } - - fn thread(&mut self, i: usize) -> &mut Thread { - &mut self.dense[i] - } - - fn contains(&self, pc: usize) -> bool { - let s = self.sparse[pc]; - s < self.size && self.dense[s].pc == pc - } - - fn empty(&mut self) { - self.size = 0; - } - - fn pc(&self, i: usize) -> usize { - self.dense[i].pc - } - - fn caps(&mut self, i: usize) -> &mut [Option] { - &mut self.dense[i].caps - } -} diff --git a/deps/regex-0.1.48/src/prefix.rs b/deps/regex-0.1.48/src/prefix.rs deleted file mode 100644 index 92d7366e2..000000000 --- a/deps/regex-0.1.48/src/prefix.rs +++ /dev/null @@ -1,243 +0,0 @@ -// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -use std::fmt; - -use aho_corasick::{Automaton, AcAutomaton, FullAcAutomaton}; -use memchr::memchr; - -/// A prefix extracted from a compiled regular expression. -/// -/// A regex prefix is a set of literal strings that *must* be matched at the -/// beginning of a regex in order for the entire regex to match. -/// -/// There are a variety of ways to efficiently scan the search text for a -/// prefix. Currently, there are three implemented: -/// -/// 1. The prefix is a single byte. Just use memchr. -/// 2. If the prefix is a set of two or more single byte prefixes, then -/// a single sparse map is created. Checking if there is a match is a lookup -/// in this map for each byte in the search text. -/// 3. In all other cases, build an Aho-Corasick automaton. -/// -/// It's possible that there's room here for other substring algorithms, -/// such as Boyer-Moore for single-set prefixes greater than 1, or Rabin-Karp -/// for small sets of same-length prefixes. -#[derive(Clone)] -pub enum Prefix { - /// No prefixes. (Never advances through the input.) - Empty, - /// A single byte prefix. - Byte(u8), - /// A set of two or more single byte prefixes. - /// This could be reduced to a bitset, which would use only 8 bytes, - /// but I don't think we care. - Bytes { - chars: Vec, - sparse: Vec, - }, - Single(SingleSearch), - /// A full Aho-Corasick DFA automaton. - Automaton(FullAcAutomaton), -} - -impl Prefix { - /// Create a new prefix matching machine. - pub fn new(mut pfxs: Vec) -> Prefix { - if pfxs.is_empty() || pfxs[0].is_empty() { - Prefix::Empty - } else if pfxs.len() == 1 && pfxs[0].len() == 1 { - Prefix::Byte(pfxs[0].as_bytes()[0]) - } else if pfxs.len() >= 2 && pfxs.iter().all(|s| s.len() == 1) { - let mut set = vec![false; 256]; - let mut chars = vec![]; - for p in pfxs { - chars.push(p.as_bytes()[0]); - set[p.as_bytes()[0] as usize] = true; - } - Prefix::Bytes { chars: chars, sparse: set } - } else if pfxs.len() == 1 { - Prefix::Single(SingleSearch::new(pfxs.pop().unwrap())) - } else { - Prefix::Automaton(AcAutomaton::new(pfxs).into_full()) - } - } - - /// Find the position of a prefix in `haystack` if it exists. - /// - /// In the matching engines, we only actually need the starting index - /// because the prefix is used to only skip ahead---the matching engine - /// still needs to run over the prefix input. However, we return the ending - /// location as well in case the prefix corresponds to the entire regex, - /// in which case, you need the end of the match. - pub fn find(&self, haystack: &str) -> Option<(usize, usize)> { - use self::Prefix::*; - match *self { - Empty => Some((0, 0)), - Byte(b) => memchr(b, haystack.as_bytes()).map(|i| (i, i+1)), - Bytes { ref sparse, .. } => { - find_singles(sparse, haystack.as_bytes()) - } - Single(ref searcher) => { - searcher.find(haystack).map(|i| (i, i + searcher.pat.len())) - } - Automaton(ref aut) => { - aut.find(haystack).next().map(|m| (m.start, m.end)) - } - } - } - - /// Returns true iff this prefix is empty. - pub fn is_empty(&self) -> bool { - self.len() == 0 - } - - /// Returns the number of prefixes in this machine. - pub fn len(&self) -> usize { - match *self { - Prefix::Empty => 0, - Prefix::Byte(_) => 1, - Prefix::Bytes { ref chars, .. } => chars.len(), - Prefix::Single(_) => 1, - Prefix::Automaton(ref aut) => aut.len(), - } - } - - /// Returns true iff the prefix match preserves priority. - /// - /// For example, given the alternation `ab|a` and the target string `ab`, - /// does the prefix machine guarantee that `ab` will match? (A full - /// Aho-Corasick automaton does not!) - pub fn preserves_priority(&self) -> bool { - match *self { - Prefix::Empty => true, - Prefix::Byte(_) => true, - Prefix::Bytes{..} => true, - Prefix::Single(_) => true, - Prefix::Automaton(ref aut) => { - // Okay, so the automaton can respect priority in one - // particular case: when every pattern is of the same length. - // The trick is that the automaton will report the leftmost - // match, which in this case, corresponds to the correct - // match for the regex engine. If any other alternate matches - // at the same position, then they must be exactly equivalent. - - // Guaranteed at least one prefix by construction, so use - // that for the length. - aut.patterns().iter().all(|p| p.len() == aut.pattern(0).len()) - } - } - } - - /// Returns all of the prefixes participating in this machine. - /// - /// For debug/testing only! (It allocates.) - #[allow(dead_code)] - pub fn prefixes(&self) -> Vec { - match *self { - Prefix::Empty => vec![], - Prefix::Byte(b) => vec![format!("{}", b as char)], - Prefix::Bytes { ref chars, .. } => { - chars.iter().map(|&b| format!("{}", b as char)).collect() - } - Prefix::Single(ref searcher) => vec![searcher.pat.clone()], - Prefix::Automaton(ref aut) => aut.patterns().to_vec(), - } - } -} - -/// Provides an implementation of fast subtring search. -/// -/// In particular, this uses Boyer-Moore-Horspool with Tim Raita's twist: -/// https://en.wikipedia.org/wiki/Raita_Algorithm -/// -/// I'm skeptical of the utility here, because benchmarks suggest that it is -/// difficult to beat Aho-Corasick on random text. Namely, both algorithms are -/// dominated by the performance of `memchr` for the leading byte prefix. -/// With that said, BMH does seem to surpass AC when the search text gets -/// longer (see the `easy0_1MB` vs. `easy1_1MB` benchmarks). -/// -/// More analysis needs to be done to test this on different search texts. -#[derive(Clone, Debug)] -pub struct SingleSearch { - pat: String, - shift: Vec, -} - -impl SingleSearch { - fn new(pat: String) -> SingleSearch { - assert!(pat.len() >= 1); - let mut shift = vec![pat.len(); 256]; - for i in 0..(pat.len() - 1) { - shift[pat.as_bytes()[i] as usize] = pat.len() - i - 1; - } - SingleSearch { - pat: pat, - shift: shift, - } - } - - fn find(&self, haystack: &str) -> Option { - let pat = self.pat.as_bytes(); - let haystack = haystack.as_bytes(); - if haystack.len() < pat.len() { - return None; - } - let mut i = match memchr(pat[0], haystack) { - None => return None, - Some(i) => i, - }; - while i <= haystack.len() - pat.len() { - let b = haystack[i + pat.len() - 1]; - if b == pat[pat.len() - 1] - && haystack[i] == pat[0] - && haystack[i + (pat.len() / 2)] == pat[pat.len() / 2] - && pat == &haystack[i..i + pat.len()] { - return Some(i); - } - i += self.shift[b as usize]; - i += match memchr(pat[0], &haystack[i..]) { - None => return None, - Some(i) => i, - }; - } - None - } -} - -/// A quick scan for multiple single byte prefixes using a sparse map. -fn find_singles(sparse: &[bool], haystack: &[u8]) -> Option<(usize, usize)> { - // TODO: Improve this with ideas found in jetscii crate. - for (hi, &b) in haystack.iter().enumerate() { - if sparse[b as usize] { - return Some((hi, hi+1)); - } - } - None -} - -impl fmt::Debug for Prefix { - #[allow(deprecated)] // connect => join in 1.3 - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - match *self { - Prefix::Empty => write!(f, "Empty"), - Prefix::Byte(b) => write!(f, "{:?}", b as char), - Prefix::Bytes { ref chars, .. } => { - let chars: Vec = - chars.iter() - .map(|&c| format!("{:?}", c as char)) - .collect(); - write!(f, "{}", chars.connect(", ")) - } - Prefix::Single(ref searcher) => write!(f, "{:?}", searcher), - Prefix::Automaton(ref aut) => write!(f, "{:?}", aut), - } - } -} diff --git a/deps/regex-0.1.48/src/program.rs b/deps/regex-0.1.48/src/program.rs deleted file mode 100644 index ad6c2a261..000000000 --- a/deps/regex-0.1.48/src/program.rs +++ /dev/null @@ -1,437 +0,0 @@ -// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -use syntax; - -use Error; -use backtrack::{Backtrack, BackMachine}; -use compile::Compiler; -use inst::{EmptyLook, Inst}; -use nfa::{Nfa, NfaThreads}; -use pool::Pool; -use prefix::Prefix; -use re::CaptureIdxs; - -const NUM_PREFIX_LIMIT: usize = 30; -const PREFIX_LENGTH_LIMIT: usize = 15; - -/// The matching engines offered by this regex implementation. -/// -/// N.B. This is exported for use in testing. -#[doc(hidden)] -#[derive(Clone, Copy, Debug)] -pub enum MatchEngine { - /// A bounded backtracking implementation. About twice as fast as the - /// NFA, but can only work on small regexes and small input. - Backtrack, - /// A full NFA simulation. Can always be employed but almost always the - /// slowest choice. - Nfa, - /// If the entire regex is a literal and no capture groups have been - /// requested, then we can degrade to a simple substring match. - Literals, -} - -/// Program represents a compiled regular expression. Once an expression is -/// compiled, its representation is immutable and will never change. -/// (Well, almost. In fact, the matching engines cache state that can be -/// reused on subsequent searches. But this is interior mutability that -/// shouldn't be observable by the caller.) -#[derive(Debug)] -pub struct Program { - /// The original regular expression string. - pub original: String, - /// A sequence of instructions. - pub insts: Vec, - /// The sequence of capture group names. There is an entry for each capture - /// group index and a name exists only if the capture group is named. - pub cap_names: Vec>, - /// If the regular expression requires a literal prefix in order to have a - /// match, that prefix is stored here as a DFA. - pub prefixes: Prefix, - /// True iff matching any literal prefix indicates a match. - pub prefixes_complete: bool, - /// True iff program is anchored at the beginning. - pub anchored_begin: bool, - /// True iff program is anchored at the end. - pub anchored_end: bool, - /// The type of matching engine to use. - /// When `None` (the default), pick an engine automatically. - pub engine: Option, - /// Cached NFA threads. - pub nfa_threads: Pool, - /// Cached backtracking memory. - pub backtrack: Pool, -} - -impl Program { - /// Compiles a Regex. - pub fn new( - engine: Option, - size_limit: usize, - re: &str, - ) -> Result { - let expr = try!(syntax::Expr::parse(re)); - let compiler = Compiler::new(size_limit); - let (insts, cap_names) = try!(compiler.compile(&expr)); - let (insts_len, ncaps) = (insts.len(), num_captures(&insts)); - let create_threads = move || NfaThreads::new(insts_len, ncaps); - let create_backtrack = move || BackMachine::new(); - let mut prog = Program { - original: re.into(), - insts: insts, - cap_names: cap_names, - prefixes: Prefix::Empty, - prefixes_complete: false, - anchored_begin: false, - anchored_end: false, - engine: engine, - nfa_threads: Pool::new(Box::new(create_threads)), - backtrack: Pool::new(Box::new(create_backtrack)), - }; - - prog.find_prefixes(); - prog.anchored_begin = match prog.insts[1] { - Inst::EmptyLook(ref inst) => inst.look == EmptyLook::StartText, - _ => false, - }; - prog.anchored_end = match prog.insts[prog.insts.len() - 3] { - Inst::EmptyLook(ref inst) => inst.look == EmptyLook::EndText, - _ => false, - }; - Ok(prog) - } - - /// Executes a compiled regex program. - pub fn exec( - &self, - caps: &mut CaptureIdxs, - text: &str, - start: usize, - ) -> bool { - match self.choose_engine(caps.len(), text) { - MatchEngine::Backtrack => Backtrack::exec(self, caps, text, start), - MatchEngine::Nfa => Nfa::exec(self, caps, text, start), - MatchEngine::Literals => { - match self.prefixes.find(&text[start..]) { - None => false, - Some((s, e)) => { - if caps.len() == 2 { - caps[0] = Some(start + s); - caps[1] = Some(start + e); - } - true - } - } - } - } - } - - fn choose_engine(&self, cap_len: usize, text: &str) -> MatchEngine { - // If the engine is already chosen, then we use it. - // But that might not be a good idea. e.g., What if `Literals` is - // chosen and it can't work? I guess we should probably check whether - // the chosen engine is appropriate or not. - self.engine.unwrap_or_else(|| { - if cap_len <= 2 - && self.prefixes_complete - && self.prefixes.preserves_priority() { - MatchEngine::Literals - } else if Backtrack::should_exec(self, text) { - // We're only here if the input and regex combined are small. - MatchEngine::Backtrack - } else { - MatchEngine::Nfa - } - }) - } - - /// Returns the total number of capture groups in the regular expression. - /// This includes the zeroth capture. - pub fn num_captures(&self) -> usize { - num_captures(&self.insts) - } - - /// Allocate new capture groups. - pub fn alloc_captures(&self) -> Vec> { - vec![None; 2 * self.num_captures()] - } - - /// Find and store a prefix machine for the current program. - pub fn find_prefixes(&mut self) { - // First, look for a standard literal prefix---this includes things - // like `a+` and `[0-9]+`, but not `a|b`. - let (ps, complete) = self.literals(self.skip(1)); - if !ps.is_empty() { - self.prefixes = Prefix::new(ps); - self.prefixes_complete = complete; - return; - } - // Ok, now look for alternate prefixes, e.g., `a|b`. - if let Some((pfxs, complete)) = self.alternate_prefixes() { - self.prefixes = Prefix::new(pfxs); - self.prefixes_complete = complete; - } - } - - fn alternate_prefixes(&self) -> Option<(Vec, bool)> { - let mut prefixes = vec![]; - let mut pcomplete = true; - let mut stack = vec![self.skip(1)]; - while let Some(mut pc) = stack.pop() { - pc = self.skip(pc); - match self.insts[pc] { - Inst::Split(ref inst) => { - stack.push(inst.goto2); - stack.push(inst.goto1); - } - _ => { - let (alt_prefixes, complete) = self.literals(pc); - if alt_prefixes.is_empty() { - // If no prefixes could be identified for this - // alternate, then we can't use a prefix machine to - // skip through the input. Thus, we fail and report - // nothing. - return None; - } - if prefixes.len() + alt_prefixes.len() > NUM_PREFIX_LIMIT { - // Arg. We've over-extended ourselves, quit with - // nothing to show for it. - // - // This could happen if the regex is `a|b|c|...`, where - // the number of alternates is too much for us to - // handle given an empirically defined threshold limit. - // - // When this happens, we can't capture all of the - // prefixes, so our prefix machine becomes useless. - // Thus, fail and report nothing. - return None; - } - pcomplete = pcomplete && complete; - prefixes.extend(alt_prefixes); - } - } - } - if prefixes.is_empty() { - None - } else { - Some((prefixes, pcomplete)) - } - } - - /// Find required literals starting at the given instruction. - /// - /// Returns `true` in the tuple if the end of the literal leads trivially - /// to a match. (This may report false negatives, but being conservative - /// is OK.) - fn literals(&self, mut pc: usize) -> (Vec, bool) { - #![allow(unused_assignments)] - use inst::Inst::*; - - let mut complete = true; - let mut alts = vec![String::new()]; - loop { - let inst = &self.insts[pc]; - - // Each iteration adds one character to every alternate prefix *or* - // it stops. Thus, the prefix alternates grow in lock step, and it - // suffices to check one of them to see if the prefix limit has - // been exceeded. - if alts[0].len() > PREFIX_LENGTH_LIMIT { - complete = false; - break; - } - match *inst { - Save(ref inst) => { pc = inst.goto; continue } - Char(ref inst) => { - for alt in &mut alts { - alt.push(inst.c); - } - pc = inst.goto; - } - Ranges(ref inst) => { - // This adds a new literal for *each* character in this - // range. This has the potential to use way too much - // memory, so we bound it naively for now. - let nchars = num_chars_in_ranges(&inst.ranges); - if alts.len() * nchars > NUM_PREFIX_LIMIT { - complete = false; - break; - } - - let orig = alts; - alts = Vec::with_capacity(orig.len()); - for &(s, e) in &inst.ranges { - for c in (s as u32)..(e as u32 + 1){ - for alt in &orig { - let mut alt = alt.clone(); - alt.push(::std::char::from_u32(c).unwrap()); - alts.push(alt); - } - } - } - pc = inst.goto; - } - _ => { complete = self.leads_to_match(pc); break } - } - } - if alts[0].is_empty() { - (vec![], false) - } else { - (alts, complete) - } - } - - fn leads_to_match(&self, pc: usize) -> bool { - // I'm pretty sure this is conservative, so it might have some - // false negatives. - match self.insts[self.skip(pc)] { - Inst::Match => true, - _ => false, - } - } - - fn skip(&self, mut pc: usize) -> usize { - loop { - match self.insts[pc] { - Inst::Save(_) => pc += 1, - _ => return pc, - } - } - } -} - -impl Clone for Program { - fn clone(&self) -> Program { - let (insts_len, ncaps) = (self.insts.len(), self.num_captures()); - let create_threads = move || NfaThreads::new(insts_len, ncaps); - let create_backtrack = move || BackMachine::new(); - Program { - original: self.original.clone(), - insts: self.insts.clone(), - cap_names: self.cap_names.clone(), - prefixes: self.prefixes.clone(), - prefixes_complete: self.prefixes_complete, - anchored_begin: self.anchored_begin, - anchored_end: self.anchored_end, - engine: self.engine, - nfa_threads: Pool::new(Box::new(create_threads)), - backtrack: Pool::new(Box::new(create_backtrack)), - } - } -} - -/// Return the number of captures in the given sequence of instructions. -fn num_captures(insts: &[Inst]) -> usize { - let mut n = 0; - for inst in insts { - if let Inst::Save(ref inst) = *inst { - n = ::std::cmp::max(n, inst.slot + 1) - } - } - // There's exactly 2 Save slots for every capture. - n / 2 -} - -/// Count the number of characters in the given range. -/// -/// This is useful for pre-emptively limiting the number of prefix literals -/// we extract from a regex program. -fn num_chars_in_ranges(ranges: &[(char, char)]) -> usize { - ranges.iter() - .map(|&(s, e)| 1 + (e as u32) - (s as u32)) - .fold(0, |acc, len| acc + len) as usize -} - -#[cfg(test)] -mod tests { - use super::Program; - - macro_rules! prog { - ($re:expr) => { Program::new(None, 1 << 30, $re).unwrap() } - } - - macro_rules! prefixes { - ($re:expr) => {{ - let p = prog!($re); - assert!(!p.prefixes_complete); - p.prefixes.prefixes() - }} - } - macro_rules! prefixes_complete { - ($re:expr) => {{ - let p = prog!($re); - assert!(p.prefixes_complete); - p.prefixes.prefixes() - }} - } - - #[test] - fn single() { - assert_eq!(prefixes_complete!("a"), vec!["a"]); - assert_eq!(prefixes_complete!("[a]"), vec!["a"]); - assert_eq!(prefixes!("a+"), vec!["a"]); - assert_eq!(prefixes!("(?:a)+"), vec!["a"]); - assert_eq!(prefixes!("(a)+"), vec!["a"]); - } - - #[test] - fn single_alt() { - assert_eq!(prefixes_complete!("a|b"), vec!["a", "b"]); - assert_eq!(prefixes_complete!("b|a"), vec!["b", "a"]); - assert_eq!(prefixes_complete!("[a]|[b]"), vec!["a", "b"]); - assert_eq!(prefixes!("a+|b"), vec!["a", "b"]); - assert_eq!(prefixes!("a|b+"), vec!["a", "b"]); - assert_eq!(prefixes!("(?:a+)|b"), vec!["a", "b"]); - assert_eq!(prefixes!("(a+)|b"), vec!["a", "b"]); - } - - #[test] - fn many() { - assert_eq!(prefixes_complete!("abcdef"), vec!["abcdef"]); - assert_eq!(prefixes!("abcdef+"), vec!["abcdef"]); - assert_eq!(prefixes!("(?:abcdef)+"), vec!["abcdef"]); - assert_eq!(prefixes!("(abcdef)+"), vec!["abcdef"]); - } - - #[test] - fn many_alt() { - assert_eq!(prefixes_complete!("abc|def"), vec!["abc", "def"]); - assert_eq!(prefixes_complete!("def|abc"), vec!["def", "abc"]); - assert_eq!(prefixes!("abc+|def"), vec!["abc", "def"]); - assert_eq!(prefixes!("abc|def+"), vec!["abc", "def"]); - assert_eq!(prefixes!("(?:abc)+|def"), vec!["abc", "def"]); - assert_eq!(prefixes!("(abc)+|def"), vec!["abc", "def"]); - } - - #[test] - fn class() { - assert_eq!(prefixes_complete!("[0-9]"), vec![ - "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - ]); - assert_eq!(prefixes!("[0-9]+"), vec![ - "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - ]); - } - - #[test] - fn preceding_alt() { - assert_eq!(prefixes!("(?:a|b).+"), vec!["a", "b"]); - assert_eq!(prefixes!("(a|b).+"), vec!["a", "b"]); - } - - #[test] - fn nested_alt() { - assert_eq!(prefixes_complete!("(a|b|c|d)"), - vec!["a", "b", "c", "d"]); - assert_eq!(prefixes_complete!("((a|b)|(c|d))"), - vec!["a", "b", "c", "d"]); - } -} diff --git a/deps/regex-0.1.48/src/re.rs b/deps/regex-0.1.48/src/re.rs deleted file mode 100644 index 8c2907ff0..000000000 --- a/deps/regex-0.1.48/src/re.rs +++ /dev/null @@ -1,1265 +0,0 @@ -// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -use std::borrow::Cow; -use std::collections::HashMap; -use std::collections::hash_map::Iter; -use std::fmt; -use std::ops::Index; -#[cfg(feature = "pattern")] -use std::str::pattern::{Pattern, Searcher, SearchStep}; -use std::str::FromStr; - -use program::{Program, MatchEngine}; -use syntax; - -const REPLACE_EXPAND: &'static str = r"(?x) - (?P^|\b|[^$]) # Ignore `$$name`. - \$ - (?P # Match the actual capture name. Can be... - [0-9]+ # A sequence of digits (for indexed captures), or... - | - [_a-zA-Z][_0-9a-zA-Z]* # A name for named captures. - ) -"; - -/// Type alias for representing capture indices. -pub type CaptureIdxs = [Option]; - -/// Escapes all regular expression meta characters in `text`. -/// -/// The string returned may be safely used as a literal in a regular -/// expression. -pub fn quote(text: &str) -> String { - let mut quoted = String::with_capacity(text.len()); - for c in text.chars() { - if syntax::is_punct(c) { - quoted.push('\\') - } - quoted.push(c); - } - quoted -} - -/// Tests if the given regular expression matches somewhere in the text given. -/// -/// If there was a problem compiling the regular expression, an error is -/// returned. -/// -/// To find submatches, split or replace text, you'll need to compile an -/// expression first. -pub fn is_match(regex: &str, text: &str) -> Result { - Regex::new(regex).map(|r| r.is_match(text)) -} - -/// An error that occurred during parsing or compiling a regular expression. -#[derive(Debug)] -pub enum Error { - /// A syntax error. - Syntax(syntax::Error), - /// The compiled program exceeded the set size limit. - /// The argument is the size limit imposed. - CompiledTooBig(usize), - /// Hints that destructuring should not be exhaustive. - /// - /// This enum may grow additional variants, so this makes sure clients - /// don't count on exhaustive matching. (Otherwise, adding a new variant - /// could break existing code.) - #[doc(hidden)] - __Nonexhaustive, -} - -impl ::std::error::Error for Error { - fn description(&self) -> &str { - match *self { - Error::Syntax(ref err) => err.description(), - Error::CompiledTooBig(_) => "compiled program too big", - Error::__Nonexhaustive => unreachable!(), - } - } - - fn cause(&self) -> Option<&::std::error::Error> { - match *self { - Error::Syntax(ref err) => Some(err), - _ => None, - } - } -} - -impl fmt::Display for Error { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - match *self { - Error::Syntax(ref err) => err.fmt(f), - Error::CompiledTooBig(limit) => { - write!(f, "Compiled regex exceeds size limit of {} bytes.", - limit) - } - Error::__Nonexhaustive => unreachable!(), - } - } -} - -impl From for Error { - fn from(err: syntax::Error) -> Error { - Error::Syntax(err) - } -} - -/// A compiled regular expression -/// -/// It is represented as either a sequence of bytecode instructions (dynamic) -/// or as a specialized Rust function (native). It can be used to search, split -/// or replace text. All searching is done with an implicit `.*?` at the -/// beginning and end of an expression. To force an expression to match the -/// whole string (or a prefix or a suffix), you must use an anchor like `^` or -/// `$` (or `\A` and `\z`). -/// -/// While this crate will handle Unicode strings (whether in the regular -/// expression or in the search text), all positions returned are **byte -/// indices**. Every byte index is guaranteed to be at a Unicode code point -/// boundary. -/// -/// The lifetimes `'r` and `'t` in this crate correspond to the lifetime of a -/// compiled regular expression and text to search, respectively. -/// -/// The only methods that allocate new strings are the string replacement -/// methods. All other methods (searching and splitting) return borrowed -/// pointers into the string given. -/// -/// # Examples -/// -/// Find the location of a US phone number: -/// -/// ```rust -/// # use regex::Regex; -/// let re = Regex::new("[0-9]{3}-[0-9]{3}-[0-9]{4}").unwrap(); -/// assert_eq!(re.find("phone: 111-222-3333"), Some((7, 19))); -/// ``` -/// -/// # Using the `std::str::StrExt` methods with `Regex` -/// -/// > **Note**: This section requires that this crate is currently compiled with -/// > the `pattern` Cargo feature enabled. -/// -/// Since `Regex` implements `Pattern`, you can use regexes with methods -/// defined on `std::str::StrExt`. For example, `is_match`, `find`, `find_iter` -/// and `split` can be replaced with `StrExt::contains`, `StrExt::find`, -/// `StrExt::match_indices` and `StrExt::split`. -/// -/// Here are some examples: -/// -/// ```rust,ignore -/// # use regex::Regex; -/// let re = Regex::new(r"\d+").unwrap(); -/// let haystack = "a111b222c"; -/// -/// assert!(haystack.contains(&re)); -/// assert_eq!(haystack.find(&re), Some(1)); -/// assert_eq!(haystack.match_indices(&re).collect::>(), -/// vec![(1, 4), (5, 8)]); -/// assert_eq!(haystack.split(&re).collect::>(), vec!["a", "b", "c"]); -/// ``` -#[derive(Clone)] -pub enum Regex { - // The representation of `Regex` is exported to support the `regex!` - // syntax extension. Do not rely on it. - // - // See the comments for the `program` module in `lib.rs` for a more - // detailed explanation for what `regex!` requires. - #[doc(hidden)] - Dynamic(Program), - #[doc(hidden)] - Native(ExNative), -} - -#[doc(hidden)] -pub struct ExNative { - #[doc(hidden)] - pub original: &'static str, - #[doc(hidden)] - pub names: &'static &'static [Option<&'static str>], - #[doc(hidden)] - pub prog: fn(&mut CaptureIdxs, &str, usize) -> bool, -} - -impl Copy for ExNative {} - -impl Clone for ExNative { - fn clone(&self) -> ExNative { - *self - } -} - -impl fmt::Display for Regex { - /// Shows the original regular expression. - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "{}", self.as_str()) - } -} - -impl fmt::Debug for Regex { - /// Shows the original regular expression. - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - fmt::Display::fmt(self, f) - } -} - -/// Equality comparison is based on the original string. It is possible that -/// different regular expressions have the same matching behavior, but are -/// still compared unequal. For example, `\d+` and `\d\d*` match the same set -/// of strings, but are not considered equal. -impl PartialEq for Regex { - fn eq(&self, other: &Regex) -> bool { - self.as_str() == other.as_str() - } -} - -impl Eq for Regex {} - -impl FromStr for Regex { - type Err = Error; - - /// Attempts to parse a string into a regular expression - fn from_str(s: &str) -> Result { - Regex::new(s) - } -} - -impl Regex { - /// Compiles a dynamic regular expression. Once compiled, it can be - /// used repeatedly to search, split or replace text in a string. - /// - /// If an invalid expression is given, then an error is returned. - pub fn new(re: &str) -> Result { - Regex::with_size_limit(10 * (1 << 20), re) - } - - /// Compiles a dynamic regular expression with the given size limit. - /// - /// The size limit is applied to the size of the *compiled* data structure. - /// If the data structure exceeds the size given, then an error is - /// returned. - /// - /// The default size limit used in `new` is 10MB. - pub fn with_size_limit(size: usize, re: &str) -> Result { - Regex::with_engine(None, size, re) - } - - /// Compiles a dynamic regular expression and uses given matching engine. - /// - /// This is exposed for use in testing and shouldn't be used by clients. - /// Instead, the regex program should choose the correct matching engine - /// to use automatically. (Based on the regex, the size of the input and - /// the type of search.) - /// - /// A value of `None` means that the engine is automatically selected, - /// which is the default behavior. - /// - /// **WARNING**: Passing an unsuitable engine for the given regex/input - /// could lead to bad things. (Not unsafe things, but panics, incorrect - /// matches and large memory use are all things that could happen.) - #[doc(hidden)] - pub fn with_engine( - engine: Option, - size: usize, - re: &str, - ) -> Result { - Program::new(engine, size, re).map(Regex::Dynamic) - } - - - /// Returns true if and only if the regex matches the string given. - /// - /// # Example - /// - /// Test if some text contains at least one word with exactly 13 - /// characters: - /// - /// ```rust - /// # extern crate regex; use regex::Regex; - /// # fn main() { - /// let text = "I categorically deny having triskaidekaphobia."; - /// assert!(Regex::new(r"\b\w{13}\b").unwrap().is_match(text)); - /// # } - /// ``` - pub fn is_match(&self, text: &str) -> bool { - exec(self, &mut [], text, 0) - } - - /// Returns the start and end byte range of the leftmost-first match in - /// `text`. If no match exists, then `None` is returned. - /// - /// Note that this should only be used if you want to discover the position - /// of the match. Testing the existence of a match is faster if you use - /// `is_match`. - /// - /// # Example - /// - /// Find the start and end location of the first word with exactly 13 - /// characters: - /// - /// ```rust - /// # extern crate regex; use regex::Regex; - /// # fn main() { - /// let text = "I categorically deny having triskaidekaphobia."; - /// let pos = Regex::new(r"\b\w{13}\b").unwrap().find(text); - /// assert_eq!(pos, Some((2, 15))); - /// # } - /// ``` - pub fn find(&self, text: &str) -> Option<(usize, usize)> { - let mut caps = [None, None]; - if exec(self, &mut caps, text, 0) { - Some((caps[0].unwrap(), caps[1].unwrap())) - } else { - None - } - } - - /// Returns an iterator for each successive non-overlapping match in - /// `text`, returning the start and end byte indices with respect to - /// `text`. - /// - /// # Example - /// - /// Find the start and end location of every word with exactly 13 - /// characters: - /// - /// ```rust - /// # extern crate regex; use regex::Regex; - /// # fn main() { - /// let text = "Retroactively relinquishing remunerations is reprehensible."; - /// for pos in Regex::new(r"\b\w{13}\b").unwrap().find_iter(text) { - /// println!("{:?}", pos); - /// } - /// // Output: - /// // (0, 13) - /// // (14, 27) - /// // (28, 41) - /// // (45, 58) - /// # } - /// ``` - pub fn find_iter<'r, 't>(&'r self, text: &'t str) -> FindMatches<'r, 't> { - FindMatches { - re: self, - search: text, - last_end: 0, - last_match: None, - } - } - - /// Returns the capture groups corresponding to the leftmost-first - /// match in `text`. Capture group `0` always corresponds to the entire - /// match. If no match is found, then `None` is returned. - /// - /// You should only use `captures` if you need access to submatches. - /// Otherwise, `find` is faster for discovering the location of the overall - /// match. - /// - /// # Examples - /// - /// Say you have some text with movie names and their release years, - /// like "'Citizen Kane' (1941)". It'd be nice if we could search for text - /// looking like that, while also extracting the movie name and its release - /// year separately. - /// - /// ```rust - /// # extern crate regex; use regex::Regex; - /// # fn main() { - /// let re = Regex::new(r"'([^']+)'\s+\((\d{4})\)").unwrap(); - /// let text = "Not my favorite movie: 'Citizen Kane' (1941)."; - /// let caps = re.captures(text).unwrap(); - /// assert_eq!(caps.at(1), Some("Citizen Kane")); - /// assert_eq!(caps.at(2), Some("1941")); - /// assert_eq!(caps.at(0), Some("'Citizen Kane' (1941)")); - /// // You can also access the groups by index using the Index notation. - /// // Note that this will panic on an invalid index. - /// assert_eq!(&caps[1], "Citizen Kane"); - /// assert_eq!(&caps[2], "1941"); - /// assert_eq!(&caps[0], "'Citizen Kane' (1941)"); - /// # } - /// ``` - /// - /// Note that the full match is at capture group `0`. Each subsequent - /// capture group is indexed by the order of its opening `(`. - /// - /// We can make this example a bit clearer by using *named* capture groups: - /// - /// ```rust - /// # extern crate regex; use regex::Regex; - /// # fn main() { - /// let re = Regex::new(r"'(?P[^']+)'\s+\((?P<year>\d{4})\)") - /// .unwrap(); - /// let text = "Not my favorite movie: 'Citizen Kane' (1941)."; - /// let caps = re.captures(text).unwrap(); - /// assert_eq!(caps.name("title"), Some("Citizen Kane")); - /// assert_eq!(caps.name("year"), Some("1941")); - /// assert_eq!(caps.at(0), Some("'Citizen Kane' (1941)")); - /// // You can also access the groups by name using the Index notation. - /// // Note that this will panic on an invalid group name. - /// assert_eq!(&caps["title"], "Citizen Kane"); - /// assert_eq!(&caps["year"], "1941"); - /// assert_eq!(&caps[0], "'Citizen Kane' (1941)"); - /// - /// # } - /// ``` - /// - /// Here we name the capture groups, which we can access with the `name` - /// method or the `Index` notation with a `&str`. Note that the named capture groups - /// are still accessible with `at` or the `Index` notation with a `usize`. - /// - /// The `0`th capture group is always unnamed, so it must always be - /// accessed with `at(0)` or `[0]`. - pub fn captures<'t>(&self, text: &'t str) -> Option<Captures<'t>> { - let mut caps = self.alloc_captures(); - if exec(self, &mut caps, text, 0) { - Some(Captures::new(self, text, caps)) - } else { - None - } - } - - /// Returns an iterator over all the non-overlapping capture groups matched - /// in `text`. This is operationally the same as `find_iter` (except it - /// yields information about submatches). - /// - /// # Example - /// - /// We can use this to find all movie titles and their release years in - /// some text, where the movie is formatted like "'Title' (xxxx)": - /// - /// ```rust - /// # extern crate regex; use regex::Regex; - /// # fn main() { - /// let re = Regex::new(r"'(?P<title>[^']+)'\s+\((?P<year>\d{4})\)") - /// .unwrap(); - /// let text = "'Citizen Kane' (1941), 'The Wizard of Oz' (1939), 'M' (1931)."; - /// for caps in re.captures_iter(text) { - /// println!("Movie: {:?}, Released: {:?}", caps.name("title"), caps.name("year")); - /// } - /// // Output: - /// // Movie: Citizen Kane, Released: 1941 - /// // Movie: The Wizard of Oz, Released: 1939 - /// // Movie: M, Released: 1931 - /// # } - /// ``` - pub fn captures_iter<'r, 't>(&'r self, text: &'t str) - -> FindCaptures<'r, 't> { - FindCaptures { - re: self, - search: text, - last_match: None, - last_end: 0, - } - } - - /// Returns an iterator of substrings of `text` delimited by a match - /// of the regular expression. - /// Namely, each element of the iterator corresponds to text that *isn't* - /// matched by the regular expression. - /// - /// This method will *not* copy the text given. - /// - /// # Example - /// - /// To split a string delimited by arbitrary amounts of spaces or tabs: - /// - /// ```rust - /// # extern crate regex; use regex::Regex; - /// # fn main() { - /// let re = Regex::new(r"[ \t]+").unwrap(); - /// let fields: Vec<&str> = re.split("a b \t c\td e").collect(); - /// assert_eq!(fields, vec!("a", "b", "c", "d", "e")); - /// # } - /// ``` - pub fn split<'r, 't>(&'r self, text: &'t str) -> RegexSplits<'r, 't> { - RegexSplits { - finder: self.find_iter(text), - last: 0, - } - } - - /// Returns an iterator of at most `limit` substrings of `text` delimited - /// by a match of the regular expression. (A `limit` of `0` will return no - /// substrings.) - /// Namely, each element of the iterator corresponds to text that *isn't* - /// matched by the regular expression. - /// The remainder of the string that is not split will be the last element - /// in the iterator. - /// - /// This method will *not* copy the text given. - /// - /// # Example - /// - /// Get the first two words in some text: - /// - /// ```rust - /// # extern crate regex; use regex::Regex; - /// # fn main() { - /// let re = Regex::new(r"\W+").unwrap(); - /// let fields: Vec<&str> = re.splitn("Hey! How are you?", 3).collect(); - /// assert_eq!(fields, vec!("Hey", "How", "are you?")); - /// # } - /// ``` - pub fn splitn<'r, 't>(&'r self, text: &'t str, limit: usize) - -> RegexSplitsN<'r, 't> { - RegexSplitsN { - splits: self.split(text), - cur: 0, - limit: limit, - } - } - - /// Replaces the leftmost-first match with the replacement provided. - /// The replacement can be a regular string (where `$N` and `$name` are - /// expanded to match capture groups) or a function that takes the matches' - /// `Captures` and returns the replaced string. - /// - /// If no match is found, then a copy of the string is returned unchanged. - /// - /// # Examples - /// - /// Note that this function is polymorphic with respect to the replacement. - /// In typical usage, this can just be a normal string: - /// - /// ```rust - /// # extern crate regex; use regex::Regex; - /// # fn main() { - /// let re = Regex::new("[^01]+").unwrap(); - /// assert_eq!(re.replace("1078910", ""), "1010"); - /// # } - /// ``` - /// - /// But anything satisfying the `Replacer` trait will work. For example, - /// a closure of type `|&Captures| -> String` provides direct access to the - /// captures corresponding to a match. This allows one to access - /// submatches easily: - /// - /// ```rust - /// # extern crate regex; use regex::Regex; - /// # use regex::Captures; fn main() { - /// let re = Regex::new(r"([^,\s]+),\s+(\S+)").unwrap(); - /// let result = re.replace("Springsteen, Bruce", |caps: &Captures| { - /// format!("{} {}", caps.at(2).unwrap_or(""), caps.at(1).unwrap_or("")) - /// }); - /// assert_eq!(result, "Bruce Springsteen"); - /// # } - /// ``` - /// - /// But this is a bit cumbersome to use all the time. Instead, a simple - /// syntax is supported that expands `$name` into the corresponding capture - /// group. Here's the last example, but using this expansion technique - /// with named capture groups: - /// - /// ```rust - /// # extern crate regex; use regex::Regex; - /// # fn main() { - /// let re = Regex::new(r"(?P<last>[^,\s]+),\s+(?P<first>\S+)").unwrap(); - /// let result = re.replace("Springsteen, Bruce", "$first $last"); - /// assert_eq!(result, "Bruce Springsteen"); - /// # } - /// ``` - /// - /// Note that using `$2` instead of `$first` or `$1` instead of `$last` - /// would produce the same result. To write a literal `$` use `$$`. - /// - /// Finally, sometimes you just want to replace a literal string with no - /// submatch expansion. This can be done by wrapping a string with - /// `NoExpand`: - /// - /// ```rust - /// # extern crate regex; use regex::Regex; - /// # fn main() { - /// use regex::NoExpand; - /// - /// let re = Regex::new(r"(?P<last>[^,\s]+),\s+(\S+)").unwrap(); - /// let result = re.replace("Springsteen, Bruce", NoExpand("$2 $last")); - /// assert_eq!(result, "$2 $last"); - /// # } - /// ``` - pub fn replace<R: Replacer>(&self, text: &str, rep: R) -> String { - self.replacen(text, 1, rep) - } - - /// Replaces all non-overlapping matches in `text` with the - /// replacement provided. This is the same as calling `replacen` with - /// `limit` set to `0`. - /// - /// See the documentation for `replace` for details on how to access - /// submatches in the replacement string. - pub fn replace_all<R: Replacer>(&self, text: &str, rep: R) -> String { - self.replacen(text, 0, rep) - } - - /// Replaces at most `limit` non-overlapping matches in `text` with the - /// replacement provided. If `limit` is 0, then all non-overlapping matches - /// are replaced. - /// - /// See the documentation for `replace` for details on how to access - /// submatches in the replacement string. - pub fn replacen<R: Replacer> - (&self, text: &str, limit: usize, mut rep: R) -> String { - let mut new = String::with_capacity(text.len()); - let mut last_match = 0; - - if rep.no_expand().is_some() { - // borrow checker pains. `rep` is borrowed mutably in the `else` - // branch below. - let rep = rep.no_expand().unwrap(); - for (i, (s, e)) in self.find_iter(text).enumerate() { - if limit > 0 && i >= limit { - break - } - new.push_str(&text[last_match..s]); - new.push_str(&rep); - last_match = e; - } - } else { - for (i, cap) in self.captures_iter(text).enumerate() { - if limit > 0 && i >= limit { - break - } - // unwrap on 0 is OK because captures only reports matches - let (s, e) = cap.pos(0).unwrap(); - new.push_str(&text[last_match..s]); - new.push_str(&rep.reg_replace(&cap)); - last_match = e; - } - } - new.push_str(&text[last_match..]); - new - } - - /// Returns the original string of this regex. - pub fn as_str(&self) -> &str { - match *self { - Regex::Dynamic(Program { ref original, .. }) => original, - Regex::Native(ExNative { ref original, .. }) => original, - } - } - - /// Returns an iterator over the capture names. - pub fn capture_names(&self) -> CaptureNames { - match *self { - Regex::Native(ref n) => CaptureNames::Native(n.names.iter()), - Regex::Dynamic(ref d) => CaptureNames::Dynamic(d.cap_names.iter()) - } - } - - /// Returns the number of captures. - pub fn captures_len(&self) -> usize { - match *self { - Regex::Native(ref n) => n.names.len(), - Regex::Dynamic(ref d) => d.cap_names.len() - } - } - - fn alloc_captures(&self) -> Vec<Option<usize>> { - match *self { - Regex::Native(ref n) => vec![None; 2 * n.names.len()], - Regex::Dynamic(ref d) => d.alloc_captures(), - } - } -} - -/// Yields the names of all possible captures. -/// `None` indicates an unnamed capture; the first element -/// (capture 0, the whole matched region) is always unnamed. -/// -/// `'r` is the lifetime of the compiled expression. -pub enum CaptureNames<'r> { - #[doc(hidden)] - Native(::std::slice::Iter<'r, Option<&'static str>>), - #[doc(hidden)] - Dynamic(::std::slice::Iter<'r, Option<String>>) -} - -impl<'r> Iterator for CaptureNames<'r> { - type Item=Option<&'r str>; - - fn next(&mut self) -> Option<Option<&'r str>> { - match *self { - CaptureNames::Native(ref mut i) => - i.next().cloned(), - CaptureNames::Dynamic(ref mut i) => - i.next().as_ref().map(|o| o.as_ref().map(|s| s.as_ref())), - } - } - - fn size_hint(&self) -> (usize, Option<usize>) { - match *self { - CaptureNames::Native(ref i) => i.size_hint(), - CaptureNames::Dynamic(ref i) => i.size_hint(), - } - } -} - -/// NoExpand indicates literal string replacement. -/// -/// It can be used with `replace` and `replace_all` to do a literal -/// string replacement without expanding `$name` to their corresponding -/// capture groups. -/// -/// `'r` is the lifetime of the literal text. -pub struct NoExpand<'t>(pub &'t str); - -/// Replacer describes types that can be used to replace matches in a string. -pub trait Replacer { - /// Returns a possibly owned string that is used to replace the match - /// corresponding to the `caps` capture group. - /// - /// The `'a` lifetime refers to the lifetime of a borrowed string when - /// a new owned string isn't needed (e.g., for `NoExpand`). - fn reg_replace(&mut self, caps: &Captures) -> Cow<str>; - - /// Returns a possibly owned string that never needs expansion. - fn no_expand(&mut self) -> Option<Cow<str>> { None } -} - -impl<'t> Replacer for NoExpand<'t> { - fn reg_replace(&mut self, _: &Captures) -> Cow<str> { - self.0.into() - } - - fn no_expand(&mut self) -> Option<Cow<str>> { - Some(self.0.into()) - } -} - -impl<'t> Replacer for &'t str { - fn reg_replace<'a>(&'a mut self, caps: &Captures) -> Cow<'a, str> { - caps.expand(*self).into() - } - - fn no_expand(&mut self) -> Option<Cow<str>> { - // if there is a $ there may be an expansion - match self.find('$') { - Some(_) => None, - None => Some((*self).into()), - } - } -} - -impl<F> Replacer for F where F: FnMut(&Captures) -> String { - fn reg_replace<'a>(&'a mut self, caps: &Captures) -> Cow<'a, str> { - (*self)(caps).into() - } -} - -/// Yields all substrings delimited by a regular expression match. -/// -/// `'r` is the lifetime of the compiled expression and `'t` is the lifetime -/// of the string being split. -pub struct RegexSplits<'r, 't> { - finder: FindMatches<'r, 't>, - last: usize, -} - -impl<'r, 't> Iterator for RegexSplits<'r, 't> { - type Item = &'t str; - - fn next(&mut self) -> Option<&'t str> { - let text = self.finder.search; - match self.finder.next() { - None => { - if self.last >= text.len() { - None - } else { - let s = &text[self.last..]; - self.last = text.len(); - Some(s) - } - } - Some((s, e)) => { - let matched = &text[self.last..s]; - self.last = e; - Some(matched) - } - } - } -} - -/// Yields at most `N` substrings delimited by a regular expression match. -/// -/// The last substring will be whatever remains after splitting. -/// -/// `'r` is the lifetime of the compiled expression and `'t` is the lifetime -/// of the string being split. -pub struct RegexSplitsN<'r, 't> { - splits: RegexSplits<'r, 't>, - cur: usize, - limit: usize, -} - -impl<'r, 't> Iterator for RegexSplitsN<'r, 't> { - type Item = &'t str; - - fn next(&mut self) -> Option<&'t str> { - let text = self.splits.finder.search; - if self.cur >= self.limit { - None - } else { - self.cur += 1; - if self.cur >= self.limit { - Some(&text[self.splits.last..]) - } else { - self.splits.next() - } - } - } -} - -/// Captures represents a group of captured strings for a single match. -/// -/// The 0th capture always corresponds to the entire match. Each subsequent -/// index corresponds to the next capture group in the regex. -/// If a capture group is named, then the matched string is *also* available -/// via the `name` method. (Note that the 0th capture is always unnamed and so -/// must be accessed with the `at` method.) -/// -/// Positions returned from a capture group are always byte indices. -/// -/// `'t` is the lifetime of the matched text. -pub struct Captures<'t> { - text: &'t str, - locs: Vec<Option<usize>>, - named: Option<HashMap<String, usize>>, -} - -impl<'t> Captures<'t> { - fn new( - re: &Regex, - search: &'t str, - locs: Vec<Option<usize>>, - ) -> Captures<'t> { - let named = - if re.captures_len() == 0 { - None - } else { - let mut named = HashMap::new(); - for (i, name) in re.capture_names().enumerate() { - if let Some(name) = name { - named.insert(name.to_owned(), i); - } - } - Some(named) - }; - Captures { - text: search, - locs: locs, - named: named, - } - } - - /// Returns the start and end positions of the Nth capture group. - /// Returns `None` if `i` is not a valid capture group or if the capture - /// group did not match anything. - /// The positions returned are *always* byte indices with respect to the - /// original string matched. - pub fn pos(&self, i: usize) -> Option<(usize, usize)> { - let (s, e) = (i * 2, i * 2 + 1); - if e >= self.locs.len() || self.locs[s].is_none() { - // VM guarantees that each pair of locations are both Some or None. - return None - } - Some((self.locs[s].unwrap(), self.locs[e].unwrap())) - } - - /// Returns the matched string for the capture group `i`. If `i` isn't - /// a valid capture group or didn't match anything, then `None` is - /// returned. - pub fn at(&self, i: usize) -> Option<&'t str> { - match self.pos(i) { - None => None, - Some((s, e)) => Some(&self.text[s..e]) - } - } - - /// Returns the matched string for the capture group named `name`. If - /// `name` isn't a valid capture group or didn't match anything, then - /// `None` is returned. - pub fn name(&self, name: &str) -> Option<&'t str> { - match self.named { - None => None, - Some(ref h) => { - match h.get(name) { - None => None, - Some(i) => self.at(*i), - } - } - } - } - - /// Creates an iterator of all the capture groups in order of appearance - /// in the regular expression. - pub fn iter(&'t self) -> SubCaptures<'t> { - SubCaptures { idx: 0, caps: self, } - } - - /// Creates an iterator of all the capture group positions in order of - /// appearance in the regular expression. Positions are byte indices - /// in terms of the original string matched. - pub fn iter_pos(&'t self) -> SubCapturesPos<'t> { - SubCapturesPos { idx: 0, caps: self, } - } - - /// Creates an iterator of all named groups as an tuple with the group - /// name and the value. The iterator returns these values in arbitrary - /// order. - pub fn iter_named(&'t self) -> SubCapturesNamed<'t> { - SubCapturesNamed { caps: self, inner: self.named.as_ref().map(|n| n.iter()) } - } - - /// Expands all instances of `$name` in `text` to the corresponding capture - /// group `name`. - /// - /// `name` may be an integer corresponding to the index of the - /// capture group (counted by order of opening parenthesis where `0` is the - /// entire match) or it can be a name (consisting of letters, digits or - /// underscores) corresponding to a named capture group. - /// - /// If `name` isn't a valid capture group (whether the name doesn't exist or - /// isn't a valid index), then it is replaced with the empty string. - /// - /// To write a literal `$` use `$$`. - pub fn expand(&self, text: &str) -> String { - // How evil can you get? - let re = Regex::new(REPLACE_EXPAND).unwrap(); - let text = re.replace_all(text, |refs: &Captures| -> String { - let before = refs.name("before").unwrap_or(""); - let name = refs.name("name").unwrap_or(""); - format!("{}{}", before, match name.parse::<usize>() { - Err(_) => self.name(name).unwrap_or("").to_owned(), - Ok(i) => self.at(i).unwrap_or("").to_owned(), - }) - }); - let re = Regex::new(r"\$\$").unwrap(); - re.replace_all(&text, NoExpand("$")) - } - - /// Returns the number of captured groups. - #[inline] - pub fn len(&self) -> usize { self.locs.len() / 2 } - - /// Returns true if and only if there are no captured groups. - #[inline] - pub fn is_empty(&self) -> bool { self.len() == 0 } -} - -/// Get a group by index. -/// -/// # Panics -/// If there is no group at the given index. -impl<'t> Index<usize> for Captures<'t> { - - type Output = str; - - fn index(&self, i: usize) -> &str { - self.at(i).unwrap_or_else(|| panic!("no group at index '{}'", i)) - } - -} - -/// Get a group by name. -/// -/// # Panics -/// If there is no group named by the given value. -impl<'t> Index<&'t str> for Captures<'t> { - - type Output = str; - - fn index<'a>(&'a self, name: &str) -> &'a str { - match self.name(name) { - None => panic!("no group named '{}'", name), - Some(ref s) => s, - } - } - -} - -/// An iterator over capture groups for a particular match of a regular -/// expression. -/// -/// `'t` is the lifetime of the matched text. -pub struct SubCaptures<'t> { - idx: usize, - caps: &'t Captures<'t>, -} - -impl<'t> Iterator for SubCaptures<'t> { - type Item = Option<&'t str>; - - fn next(&mut self) -> Option<Option<&'t str>> { - if self.idx < self.caps.len() { - self.idx += 1; - Some(self.caps.at(self.idx - 1)) - } else { - None - } - } -} - -/// An iterator over capture group positions for a particular match of a -/// regular expression. -/// -/// Positions are byte indices in terms of the original string matched. -/// -/// `'t` is the lifetime of the matched text. -pub struct SubCapturesPos<'t> { - idx: usize, - caps: &'t Captures<'t>, -} - -impl<'t> Iterator for SubCapturesPos<'t> { - type Item = Option<(usize, usize)>; - - fn next(&mut self) -> Option<Option<(usize, usize)>> { - if self.idx < self.caps.len() { - self.idx += 1; - Some(self.caps.pos(self.idx - 1)) - } else { - None - } - } -} - -/// An Iterator over named capture groups as a tuple with the group -/// name and the value. -/// -/// `'t` is the lifetime of the matched text. -pub struct SubCapturesNamed<'t>{ - caps: &'t Captures<'t>, - inner: Option<Iter<'t, String, usize>>, -} - -impl<'t> Iterator for SubCapturesNamed<'t> { - type Item = (&'t str, Option<&'t str>); - - fn next(&mut self) -> Option<(&'t str, Option<&'t str>)> { - match self.inner.as_mut().map_or(None, |it| it.next()) { - Some((name, pos)) => Some((name, self.caps.at(*pos))), - None => None - } - } -} - -/// An iterator that yields all non-overlapping capture groups matching a -/// particular regular expression. -/// -/// The iterator stops when no more matches can be found. -/// -/// `'r` is the lifetime of the compiled expression and `'t` is the lifetime -/// of the matched string. -pub struct FindCaptures<'r, 't> { - re: &'r Regex, - search: &'t str, - last_match: Option<usize>, - last_end: usize, -} - -impl<'r, 't> Iterator for FindCaptures<'r, 't> { - type Item = Captures<'t>; - - fn next(&mut self) -> Option<Captures<'t>> { - if self.last_end > self.search.len() { - return None - } - - let mut caps = self.re.alloc_captures(); - if !exec(self.re, &mut caps, self.search, self.last_end) { - return None - } - let (s, e) = (caps[0].unwrap(), caps[1].unwrap()); - - // Don't accept empty matches immediately following a match. - // i.e., no infinite loops please. - if e == s && Some(self.last_end) == self.last_match { - if self.last_end >= self.search.len() { - return None; - } - self.last_end += self.search[self.last_end..].chars() - .next().unwrap().len_utf8(); - return self.next() - } - self.last_end = e; - self.last_match = Some(self.last_end); - Some(Captures::new(self.re, self.search, caps)) - } -} - -/// An iterator over all non-overlapping matches for a particular string. -/// -/// The iterator yields a tuple of integers corresponding to the start and end -/// of the match. The indices are byte offsets. The iterator stops when no more -/// matches can be found. -/// -/// `'r` is the lifetime of the compiled expression and `'t` is the lifetime -/// of the matched string. -pub struct FindMatches<'r, 't> { - re: &'r Regex, - search: &'t str, - last_match: Option<usize>, - last_end: usize, -} - -impl<'r, 't> Iterator for FindMatches<'r, 't> { - type Item = (usize, usize); - - fn next(&mut self) -> Option<(usize, usize)> { - if self.last_end > self.search.len() { - return None - } - - let mut caps = [None, None]; - if !exec(self.re, &mut caps, self.search, self.last_end) { - return None; - } - let (s, e) = (caps[0].unwrap(), caps[1].unwrap()); - - // Don't accept empty matches immediately following a match. - // i.e., no infinite loops please. - if e == s && Some(self.last_end) == self.last_match { - if self.last_end >= self.search.len() { - return None; - } - self.last_end += self.search[self.last_end..].chars() - .next().unwrap().len_utf8(); - return self.next() - } - self.last_end = e; - self.last_match = Some(self.last_end); - Some((s, e)) - } -} - -#[cfg(feature = "pattern")] -pub struct RegexSearcher<'r, 't> { - it: FindMatches<'r, 't>, - last_step_end: usize, - next_match: Option<(usize, usize)>, -} - -#[cfg(feature = "pattern")] -impl<'r, 't> Pattern<'t> for &'r Regex { - type Searcher = RegexSearcher<'r, 't>; - - fn into_searcher(self, haystack: &'t str) -> RegexSearcher<'r, 't> { - RegexSearcher { - it: self.find_iter(haystack), - last_step_end: 0, - next_match: None, - } - } -} - -#[cfg(feature = "pattern")] -unsafe impl<'r, 't> Searcher<'t> for RegexSearcher<'r, 't> { - #[inline] - fn haystack(&self) -> &'t str { - self.it.search - } - - #[inline] - fn next(&mut self) -> SearchStep { - if let Some((s, e)) = self.next_match { - self.next_match = None; - self.last_step_end = e; - return SearchStep::Match(s, e); - } - match self.it.next() { - None => { - if self.last_step_end < self.haystack().len() { - let last = self.last_step_end; - self.last_step_end = self.haystack().len(); - SearchStep::Reject(last, self.haystack().len()) - } else { - SearchStep::Done - } - } - Some((s, e)) => { - if s == self.last_step_end { - self.last_step_end = e; - SearchStep::Match(s, e) - } else { - self.next_match = Some((s, e)); - let last = self.last_step_end; - self.last_step_end = s; - SearchStep::Reject(last, s) - } - } - } - } -} - -fn exec(re: &Regex, caps: &mut CaptureIdxs, text: &str, start: usize) -> bool { - match *re { - Regex::Native(ExNative { ref prog, .. }) => (*prog)(caps, text, start), - Regex::Dynamic(ref prog) => prog.exec(caps, text, start), - } -} - -#[cfg(test)] -mod test { - use super::{NoExpand, Regex}; - - #[test] - fn test_simple_expand() { - let re = Regex::new(r"(\w) (\w)").unwrap(); - assert_eq!(re.replace_all("a b", "$2 $1"), "b a"); - } - - #[test] - fn test_literal_dollar() { - let re = Regex::new(r"(\w+) (\w+)").unwrap(); - assert_eq!(re.replace_all("a b", "$1"), "a"); - assert_eq!(re.replace_all("a b", "$$1"), "$1"); // $$ should become a $ - assert_eq!(re.replace_all("a b", "$2 $$c $1"), "b $c a"); - } - - #[test] - fn test_no_expand() { - let re = Regex::new(r"(\w+)").unwrap(); - assert_eq!(re.replace_all("a", NoExpand("$$1")), "$$1"); - assert_eq!(re.replace_all("a", NoExpand("$1")), "$1"); - } - - #[test] - fn test_capture_names() { - let re = Regex::new(r"(.)(?P<a>.)").unwrap(); - assert_eq!(re.capture_names().size_hint(), (3, Some(3))); - assert_eq!(re.capture_names().collect::<Vec<_>>(), [None, None, Some("a")]); - } - - #[test] - fn test_cap_index() { - let re = Regex::new(r"^(?P<name>.+)$").unwrap(); - let cap = re.captures("abc").unwrap(); - assert_eq!(&cap[0], "abc"); - assert_eq!(&cap[1], "abc"); - assert_eq!(&cap["name"], "abc"); - } - - #[test] - #[should_panic] - #[cfg_attr(all(target_env = "msvc", target_pointer_width = "32"), ignore)] - fn test_cap_index_panic_usize() { - let re = Regex::new(r"^(?P<name>.+)$").unwrap(); - let cap = re.captures("abc").unwrap(); - let _ = cap[2]; - } - - #[test] - #[should_panic] - #[cfg_attr(all(target_env = "msvc", target_pointer_width = "32"), ignore)] - fn test_cap_index_panic_name() { - let re = Regex::new(r"^(?P<name>.+)$").unwrap(); - let cap = re.captures("abc").unwrap(); - let _ = cap["bad name"]; - } -} diff --git a/deps/regex-0.1.48/.gitignore b/deps/regex-0.1.58/.gitignore similarity index 100% rename from deps/regex-0.1.48/.gitignore rename to deps/regex-0.1.58/.gitignore diff --git a/deps/regex-0.1.58/.travis.yml b/deps/regex-0.1.58/.travis.yml new file mode 100644 index 000000000..de51cdd80 --- /dev/null +++ b/deps/regex-0.1.58/.travis.yml @@ -0,0 +1,50 @@ +language: rust +rust: + - 1.3.0 + - stable + - beta + - nightly +sudo: false +script: + - cargo build --verbose + - if [ "$TRAVIS_RUST_VERSION" = "nightly" ]; then + travis_wait cargo test --verbose --features pattern; + else + travis_wait cargo test --verbose; + fi + - ./run-shootout-test + - cargo doc --verbose + - cargo test --verbose --manifest-path=regex-syntax/Cargo.toml + - cargo doc --verbose --manifest-path=regex-syntax/Cargo.toml + - if [ "$TRAVIS_RUST_VERSION" = "nightly" ]; then + travis_wait ./run-bench rust; + travis_wait ./run-bench rust-bytes --no-run; + travis_wait ./run-bench rust-plugin --no-run; + travis_wait ./run-bench pcre --no-run; + travis_wait ./run-bench onig --no-run; + travis_wait cargo test --verbose --manifest-path=regex_macros/Cargo.toml; + fi +addons: + apt: + packages: + - libcurl4-openssl-dev + - libelf-dev + - libdw-dev + - binutils-dev +after_success: | + [ $TRAVIS_BRANCH = master ] && + [ $TRAVIS_PULL_REQUEST = false ] && + [ $TRAVIS_RUST_VERSION = nightly ] && + echo '<meta http-equiv=refresh content=0;url=regex/index.html>' > target/doc/index.html && + pip install ghp-import --user $USER && + $HOME/.local/bin/ghp-import -n target/doc && + git push -qf https://${TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages && + wget https://github.com/SimonKagstrom/kcov/archive/master.tar.gz && + tar xzf master.tar.gz && mkdir kcov-master/build && cd kcov-master/build && cmake .. && make && make install DESTDIR=../tmp && cd ../.. && + PATH="./kcov-master/tmp/usr/local/bin:$PATH" ./run-kcov --coveralls-id $TRAVIS_JOB_ID +env: + global: + secure: VvIrYRW/a8FmBA61hn1bDrqWwR92tANOT6PCeLYd9A9ViQrN07PE6uGsnd9iwr8itck10Ctl1mThZYUkK8BDFEmlvSxOFJ/Po5eRe6A1CYuFF40zizJ+3NllVkN20kwoQDe0kxwZVDGO9Yi1icHUrbRPWDfS+1tfobO/UT8Dlng= +notifications: + email: + on_success: never diff --git a/deps/regex-0.1.58/Cargo.toml b/deps/regex-0.1.58/Cargo.toml new file mode 100644 index 000000000..c36b4ddab --- /dev/null +++ b/deps/regex-0.1.58/Cargo.toml @@ -0,0 +1,93 @@ +[package] +name = "regex" +version = "0.1.58" #:version +authors = ["The Rust Project Developers"] +license = "MIT/Apache-2.0" +readme = "README.md" +repository = "https://github.com/rust-lang/regex" +documentation = "https://doc.rust-lang.org/regex" +homepage = "https://github.com/rust-lang/regex" +description = """ +An implementation of regular expressions for Rust. This implementation uses +finite automata and guarantees linear time matching on all inputs. +""" + +[dependencies] +# For very fast prefix literal matching. +aho-corasick = "0.5" +# For skipping along search text quickly when a leading byte is known. +memchr = "0.1" +# For parsing regular expressions. +regex-syntax = { path = "regex-syntax", version = "0.3.0" } +# For compiling UTF-8 decoding into automata. +utf8-ranges = "0.1" + +[dev-dependencies] +# For examples. +lazy_static = "0.1" +# For property based tests. +quickcheck = "0.2" +# For generating random test data. +rand = "0.3" + +[features] +# Enable to use the unstable pattern traits defined in std. +pattern = [] + +[lib] +# There are no benchmarks in the library code itself +bench = false + +# Runs unit tests defined inside the regex package. +# Generally these tests specific pieces of the regex implementation. +[[test]] +path = "src/lib.rs" +name = "regex-inline" + +# Run the test suite on the default behavior of Regex::new. +# This includes a mish mash of NFAs and DFAs, which are chosen automatically +# based on the regex. We test both of the NFA implementations by forcing their +# usage with the test definitions below. (We can't test the DFA implementations +# in the same way since they can't be used for every regex tested.) +[[test]] +path = "tests/test_default.rs" +name = "default" + +# The same as the default tests, but run on bytes::Regex. +[[test]] +path = "tests/test_default_bytes.rs" +name = "default-bytes" + +# Run the test suite on the NFA algorithm over Unicode codepoints. +[[test]] +path = "tests/test_nfa.rs" +name = "nfa" + +# Run the test suite on the NFA algorithm over bytes that match UTF-8 only. +[[test]] +path = "tests/test_nfa_utf8bytes.rs" +name = "nfa-utf8bytes" + +# Run the test suite on the NFA algorithm over arbitrary bytes. +[[test]] +path = "tests/test_nfa_bytes.rs" +name = "nfa-bytes" + +# Run the test suite on the backtracking engine over Unicode codepoints. +[[test]] +path = "tests/test_backtrack.rs" +name = "backtrack" + +# Run the test suite on the backtracking engine over bytes that match UTF-8 +# only. +[[test]] +path = "tests/test_backtrack_utf8bytes.rs" +name = "backtrack-utf8bytes" + +# Run the test suite on the backtracking engine over arbitrary bytes. +[[test]] +path = "tests/test_backtrack_bytes.rs" +name = "backtrack-bytes" + +[profile.test] +debug = true diff --git a/deps/regex-0.1.58/HACKING.md b/deps/regex-0.1.58/HACKING.md new file mode 100644 index 000000000..bba1f55b2 --- /dev/null +++ b/deps/regex-0.1.58/HACKING.md @@ -0,0 +1,315 @@ +Your friendly guide to hacking and navigating the regex library. + +This guide assumes familiarity with Rust and Cargo, and at least a perusal of +the user facing documentation for this crate. + +If you're looking for background on the implementation in this library, then +you can do no better than Russ Cox's article series on implementing regular +expressions using finite automata: https://swtch.com/~rsc/regexp/ + + +## Architecture overview + +As you probably already know, this library executes regular expressions using +finite automata. In particular, a design goal is to make searching linear with +respect to both the regular expression and the text being searched. Meeting +that design goal on its own is not so hard and can be done with an +implementation of the NFA algorithm, as described in: +https://swtch.com/~rsc/regexp/regexp2.html --- This library contains such an +implementation in src/nfa.rs. (N.B. PCRE's documentation also claims to +implement the NFA algorithm by citing Jeffrey Friedl's book, "Mastering Regular +Expressions." The book unfortunately conflates terminology.) + +Making it fast is harder. One of the key problems with the NFA algorithm is +that it can be in more than one state at any point in time, and must shuffle +sub-capture positions between them. The NFA algorithm also spends a lot of +time following the same epsilon transitions over and over again. We can employ +one trick to speed up the NFA algorithm: extract one or more literal prefixes +from the regular expression and execute specialized code to quickly find +matches of those prefixes in the search text. The NFA algorithm can then be +avoided for most the search, and instead only executed when a prefix is found. +The code to find prefixes and search for prefixes is in src/literals.rs. When +more than one literal prefix is found, we fall back to an Aho-Corasick DFA +using the aho-corasick crate. For one literal, we use a variant of the +Boyer-Moore algorithm. Both Aho-Corasick and Boyer-Moore use `memchr` when +appropriate. + +Of course, detecting prefix literals can only take us so far. Not all regular +expressions have literal prefixes. To remedy this, we try another approach to +executing the NFA: backtracking, whose implementation can be found in +src/backtrack.rs. One reason why backtracking can be faster is that it avoids +excessive shuffling of capture groups. Of course, backtracking is susceptible +to exponential runtimes, so we keep track of every state we've visited to make +sure we never visit it again. This guarantees linear time execution, but we +pay for it with the memory required to track visited states. Because of the +memory requirement, we only use this engine on small search strings *and* small +regular expressions. + +Lastly, the real workhorse of this library is the "lazy" DFA in src/dfa.rs. +It is distinct from the NFA algorithm in that the DFA is explicitly represented +in memory and is only ever in one state at a time. It is said to be "lazy" +because the DFA is computed as text is searched, where each byte in the search +text results in at most one new DFA state. It is made fast by caching states. +DFAs are susceptible to exponential state blow up (where the worst case is +computing a new state for every input byte, regardless of what's in the state +cache). To avoid using a lot of memory, the lazy DFA uses a bounded cache. Once +the cache is full, it is wiped and state computation starts over again. + +All of the above matching engines expose precisely the matching semantics. This +is indeed tested. (See the section below about testing.) + +The following sub-sections describe the rest of the library and how each of the +matching engines are actually used. + +### Parsing + +Regular expressions are parsed using the regex-syntax crate, which is +maintained in this repository. The regex-syntax crate defines an abstract +syntax and provides very detailed error messages when a parse error is +encountered. Parsing is done in a separate crate so that others may benefit +from its existence, and because it is relatively divorced from the rest of the +regex library. + +### Compilation + +The compiler is in src/compile.rs. The input to the compiler is some abstract +syntax for a regular expression and the output is a sequence of opcodes that +matching engines use to execute a search. (One can think of matching engines as +mini virtual machines.) The sequence of opcodes is a particular encoding of a +non-deterministic finite automaton. In particular, the opcodes explicitly rely +on epsilon transitions. + +Consider a simple regular expression like `a|b`. Its compiled form looks like +this: + + 000 Save(0) + 001 Split(2, 3) + 002 'a' (goto: 4) + 003 'b' + 004 Save(1) + 005 Match + +The first column is the instruction pointer and the second column is the +instruction. Save instructions indicate that the current position in the input +should be stored in a captured location. Split instructions represent a binary +branch in the program (i.e., epsilon transitions). The instructions `'a'` and +`'b'` indicate that the literal bytes `'a'` or `'b'` should match. + +In older versions of this library, the compilation would looked like this: + + 000 Save(0) + 001 Split(2, 3) + 002 'a' + 003 Jump(5) + 004 'b' + 005 Save(1) + 006 Match + +In particular, empty instructions that merely served to move execution from one +point in the program to another were removed. Instead, every instruction has a +`goto` pointer embedded into it. This resulted in a small performance boost for +the NFA algorithm, because it was one fewer epsilon transition that it had to +follow. + +There exist more instructions and they are defined and documented in +src/prog.rs. + +Compilation has several knobs and a few unfortunately complicated invariants. +Namely, the output of compilation can be one of two types of programs: a +program that executes on Unicode scalar values or a program that executes on +raw bytes. In the former case, the matching engine is responsible for +performing UTF-8 decoding and executing instructions using Unicode codepoints. +In the latter case, the program handles UTF-8 decoding implicitly, so that the +matching engine can execute on raw bytes. All matching engines can execute +either Unicode or byte based programs except for the lazy DFA, which requires +byte based programs. In general, both representations were kept because (1) the +lazy DFA requires byte based programs so that states can be encoded in a memory +efficient manner and (2) the NFA algorithm benefits greatly from inlining +Unicode character classes into fewer instructions as it results in fewer +epsilon transitions. This means that every compiled program contains a proper +subset of all available instructions. + +N.B. UTF-8 decoding is built into the compiled program by making use of the +utf8-ranges crate. The compiler in this library factors out common suffixes to +reduce the size of huge character classes (e.g., `\pL`). + +A regrettable consequence of this split in instruction sets is we generally +need to compile two programs; one for NFA execution and one for the lazy DFA. + +In fact, it is worse than that: the lazy DFA is not capable of finding the +starting location of a match in a single scan, and must instead execute a +backwards search after finding the end location. To execute a backwards search, +we must have compiled the regular expression *in reverse*. + +This means that every compilation of a regular expression generally results in +three distinct programs. It would be possible to lazily compile the Unicode +program, since it is never needed if (1) the regular expression uses no word +boundary assertions and (2) the caller never asks for sub-capture locations. + +### Execution + +At the time of writing, there are four matching engines in this library: + +1. The NFA algorithm (supports captures). +2. Bounded backtracking (supports captures). +3. Literal substring or multi-substring search. +4. Lazy DFA (no support for word boundary assertions). + +Only the first two matching engines are capable of executing every regular +expression program. They also happen to be the slowest, which means we need +some logic that (1) knows various facts about the regular expression and (2) +knows what the caller wants. Using this information, we can determine which +engine (or engines) to use. + +The logic for choosing which engine to execute is in src/exec.rs and is +documented on the Exec type. Exec values collection regular expression +Programs (defined in src/prog.rs), which contain all the necessary tidbits +for actually executing a regular expression on search text. + +For the most part, the execution logic is straight-forward and follows the +limitations of each engine described above pretty faithfully. The hairiest part +of src/exec.rs by far is the execution of the lazy DFA, since it requires a +forwards and backwards search, and then falls back to either the NFA algorithm +or backtracking if the caller requested capture locations. + +### Programs + +A regular expression program is essentially a sequence of opcodes produced by +the compiler plus various caches for the matching engines plus various facts +about the regular expression (such as whether it is anchored, it capture names, +etc.). + +The regular expression program contains mutable caches for use by the matching +engines. For example, the NFA algorithm stores its "execution threads" there, +the backtracking engine stores its visited map and the lazy DFA stores its +state cache. In sum, they are beneficial to performance because it allows reuse +of previously done work (especially for the lazy DFA). Mutation of these caches +should not be observable by callers, so it is done using interior mutability. +To make it possible to share regular expressions across threads, the cache is +guarded by a mutex but is not held during matching. + +### The regex! macro (or why `regex::internal` exists) + +The `regex!` macro is defined in the `regex_macros` crate as a compiled plugin, +which is maintained in this repository. The `regex!` macro compiles a regular +expression at compile time into specialized Rust code. + +The `regex!` macro was written when this library was first conceived and +unfortunately hasn't changed much since then. In particular, it encodes the +entire NFA algorithm into stack allocated space (no heap allocation is done). +When `regex!` was first written, this provided a substantial speed boost over +so-called "dynamic" regexes compiled at runtime, and in particular had much +lower overhead per match. This was because the only matching engine at the time +was the NFA algorithm. The addition of other matching engines has inverted the +relationship; the `regex!` macro is almost never faster than the dynamic +variant. (In fact, it is typically substantially slower.) + +In order to build the `regex!` macro this way, it must have access to some +internals of the regex library, which is in a distinct crate. (Compiler plugins +must be part of a distinct crate.) Namely, it must be able to compile a regular +expression and access its opcodes. The necessary internals are exported as part +of the top-level `internal` module in the regex library, but is hidden from +public documentation. In order to present a uniform API between programs build +by the `regex!` macro and their dynamic analoges, the `Regex` type is an enum +whose variants are hidden from public documentation. + +In the future, the `regex!` macro should probably work more like Ragel, but +it's not clear how hard this is. In particular, the `regex!` macro should be +able to support all the features of dynamic regexes, which may be hard to do +with a Ragel-style implementation approach. (Which somewhat suggests that the +`regex!` macro may also need to grow conditional execution logic like the +dynamic variants, which seems rather grotesque.) + + +## Testing + +A key aspect of any mature regex library is its test suite. A subset of the +tests in this library come from Glenn Fowler's AT&T test suite (its online +presence seems gone at the time of writing). The source of the test suite is +located in src/testdata. The scripts/regex-match-tests.py takes the test suite +in src/testdata and generates tests/matches.rs. + +There are also many other manually crafted tests and regression tests in +tests/tests.rs. + +The biggest source of complexity in the tests is related to answering this +question: how can we reuse the tests to check all of our matching engines? +One approach would have been to encode every test into some kind of format +(like the AT&T test suite) and code generate tests for each matching engine. +The approach we use in this library is to create a Cargo.toml entry point for +each matching engine we want to test. The entry points are: + +* `tests/test_native.rs` - tests the `regex!` macro +* `tests/test_dynamic.rs` - tests `Regex::new` +* `tests/test_dynamic_nfa.rs` - tests `Regex::new`, forced to use the NFA + algorithm on every regex. +* `tests/test_dynamic_nfa_bytes.rs` - tests `Regex::new`, forced to use the NFA + algorithm on every regex and use byte based programs. +* `tests/test_dynamic_backtrack.rs` - tests `Regex::new`, forced to use + backtracking on every regex. +* `tests/test_dynamic_backtrack_bytes.rs` - tests `Regex::new`, forced to use + backtracking on every regex and use byte based programs. + +The lazy DFA and pure literal engines are absent from this list because they +cannot be used on every regular expression. Instead, we rely on +`tests/test_dynamic.rs` to test the lazy DFA and literal engines when possible. + +Since the tests are repeated several times, and because `cargo test` runs all +entry points, it can take a while to compile everything. To reduce compile +times slightly, try using `cargo test --test dynamic`, which will only use +the `tests/test_dynamic.rs` entry point. + +N.B. To run tests for the `regex!` macro, use: + + cargo test --manifest-path regex_macros/Cargo.toml --test native + + +## Benchmarking + +The benchmarking in this crate is made up of many micro-benchmarks. Currently, +there are two primary sets of benchmarks: the benchmarks that were adopted at +this library's inception (in `benches/bench.rs`) and a newer set of benchmarks +meant to test various optimizations. Specifically, the latter set contain some +analysis and are in `benches/bench_sherlock.rs`. Also, the latter set are all +executed on the same lengthy input whereas the former benchmarks are executed +on strings of varying length. + +There is also a smattering of benchmarks for parsing and compilation. + +Benchmarking follows a similarly wonky setup as tests. There are multiple +entry points: + +* `bench_native.rs` - benchmarks the `regex!` macro +* `bench_dynamic.rs` - benchmarks `Regex::new` +* `bench_dynamic_nfa.rs` benchmarks `Regex::new`, forced to use the NFA + algorithm on every regex. (N.B. This can take a few minutes to run.) +* `bench_pcre.rs` - benchmarks PCRE + +The PCRE benchmarks exist as a comparison point to a mature regular expression +library. In general, this regex library compares favorably (there are even a +few benchmarks that PCRE simply runs too slowly on or outright can't execute at +all). I would love to add other regular expression library benchmarks +(especially RE2), but PCRE is the only one with reasonable bindings. + +If you're hacking on one of the matching engines and just want to see +benchmarks, then all you need to run is: + + $ cargo bench --bench dynamic + +If you want to compare your results with older benchmarks, then try: + + $ cargo bench --bench dynamic | tee old + $ ... make it faster + $ cargo bench --bench dynamic | tee new + $ cargo-benchcmp old new --improvements + +The `cargo-benchcmp` utility is available here: +https://github.com/BurntSushi/cargo-benchcmp + +To run the same benchmarks on PCRE, you'll need to use the sub-crate in +`regex-pcre-benchmark` like so: + + $ cargo bench --manifest-path regex-pcre-benchmark/Cargo.toml + +The PCRE benchmarks are separated from the main regex crate so that its +dependency doesn't break builds in environments without PCRE. diff --git a/deps/semver-0.2.2/LICENSE-APACHE b/deps/regex-0.1.58/LICENSE-APACHE similarity index 100% rename from deps/semver-0.2.2/LICENSE-APACHE rename to deps/regex-0.1.58/LICENSE-APACHE diff --git a/deps/regex-0.1.48/LICENSE-MIT b/deps/regex-0.1.58/LICENSE-MIT similarity index 100% rename from deps/regex-0.1.48/LICENSE-MIT rename to deps/regex-0.1.58/LICENSE-MIT diff --git a/deps/regex-0.1.58/README.md b/deps/regex-0.1.58/README.md new file mode 100644 index 000000000..6fe45774b --- /dev/null +++ b/deps/regex-0.1.58/README.md @@ -0,0 +1,246 @@ +regex +===== + +A Rust library for parsing, compiling, and executing regular expressions. +This particular implementation of regular expressions guarantees execution +in linear time with respect to the size of the regular expression and +search text by using finite automata. In particular, it makes use of both +NFAs and DFAs when matching. Much of the syntax and implementation is inspired +by [RE2](https://github.com/google/re2). + +[![Build Status](https://travis-ci.org/rust-lang-nursery/regex.svg?branch=master)](https://travis-ci.org/rust-lang-nursery/regex) +[![Build status](https://ci.appveyor.com/api/projects/status/22g48bo866qr4u77?svg=true)](https://ci.appveyor.com/project/alexcrichton/regex) +[![Coverage Status](https://coveralls.io/repos/github/rust-lang-nursery/regex/badge.svg?branch=master)](https://coveralls.io/github/rust-lang-nursery/regex?branch=master) +[![](http://meritbadge.herokuapp.com/regex)](https://crates.io/crates/regex) + +### Documentation + +[Module documentation with examples](https://doc.rust-lang.org/regex). +The module documentation also include a comprehensive description of the syntax +supported. + +Documentation with examples for the various matching functions and iterators +can be found on the +[`Regex` type](https://doc.rust-lang.org/regex/regex/enum.Regex.html). + +### Usage + +Add this to your `Cargo.toml`: + +```toml +[dependencies] +regex = "0.1" +``` + +and this to your crate root: + +```rust +extern crate regex; +``` + +Here's a simple example that matches a date in YYYY-MM-DD format and prints the +year, month and day: + +```rust +extern crate regex; + +use regex::Regex; + +fn main() { + let re = Regex::new(r"(?x) +(?P<year>\d{4}) # the year +- +(?P<month>\d{2}) # the month +- +(?P<day>\d{2}) # the day +").unwrap(); + let caps = re.captures("2010-03-14").unwrap(); + + assert_eq!("2010", caps.name("year").unwrap()); + assert_eq!("03", caps.name("month").unwrap()); + assert_eq!("14", caps.name("day").unwrap()); +} +``` + +If you have lots of dates in text that you'd like to iterate over, then it's +easy to adapt the above example with an iterator: + +```rust +extern crate regex; + +use regex::Regex; + +const TO_SEARCH: &'static str = " +On 2010-03-14, foo happened. On 2014-10-14, bar happened. +"; + +fn main() { + let re = Regex::new(r"(\d{4})-(\d{2})-(\d{2})").unwrap(); + + for caps in re.captures_iter(TO_SEARCH) { + // Note that all of the unwraps are actually OK for this regex + // because the only way for the regex to match is if all of the + // capture groups match. This is not true in general though! + println!("year: {}, month: {}, day: {}", + caps.at(1).unwrap(), + caps.at(2).unwrap(), + caps.at(3).unwrap()); + } +} +``` + +This example outputs: + +``` +year: 2010, month: 03, day: 14 +year: 2014, month: 10, day: 14 +``` + +### Usage: Avoid compiling the same regex in a loop + +It is an anti-pattern to compile the same regular expression in a loop since +compilation is typically expensive. (It takes anywhere from a few microseconds +to a few **milliseconds** depending on the size of the regex.) Not only is +compilation itself expensive, but this also prevents optimizations that reuse +allocations internally to the matching engines. + +In Rust, it can sometimes be a pain to pass regular expressions around if +they're used from inside a helper function. Instead, we recommend using the +[`lazy_static`](https://crates.io/crates/lazy_static) crate to ensure that +regular expressions are compiled exactly once. + +For example: + +```rust +#[macro_use] extern crate lazy_static; +extern crate regex; + +use regex::Regex; + +fn some_helper_function(text: &str) -> bool { + lazy_static! { + static ref RE: Regex = Regex::new("...").unwrap(); + } + RE.is_match(text) +} +``` + +Specifically, in this example, the regex will be compiled when it is used for +the first time. On subsequent uses, it will reuse the previous compilation. + +### Usage: match regular expressions on `&[u8]` + +The main API of this crate (`regex::Regex`) requires the caller to pass a +`&str` for searching. In Rust, an `&str` is required to be valid UTF-8, which +means the main API can't be used for searching arbitrary bytes. + +To match on arbitrary bytes, use the `regex::bytes::Regex` API. The API +is identical to the main API, except that it takes an `&[u8]` to search +on instead of an `&str`. By default, `.` will match any *byte* using +`regex::bytes::Regex`, while `.` will match any encoded Unicode *codepoint* +using the main API. + +This example shows how to find all null-terminated strings in a slice of bytes: + +```rust +This shows how to find all null-terminated strings in a slice of bytes: + +```rust +use regex::bytes::Regex; + +let re = Regex::new(r"(?P<cstr>[^\x00]+)\x00").unwrap(); +let text = b"foo\x00bar\x00baz\x00"; + +// Extract all of the strings without the null terminator from each match. +// The unwrap is OK here since a match requires the `cstr` capture to match. +let cstrs: Vec<&[u8]> = + re.captures_iter(text) + .map(|c| c.name("cstr").unwrap()) + .collect(); +assert_eq!(vec![&b"foo"[..], &b"bar"[..], &b"baz"[..]], cstrs); +``` + +Notice here that the `[^\x00]+` will match any *byte* except for `NUL`. When +using the main API, `[^\x00]+` would instead match any valid UTF-8 sequence +except for `NUL`. + +### Usage: match multiple regular expressions simultaneously + +This demonstrates how to use a `RegexSet` to match multiple (possibly +overlapping) regular expressions in a single scan of the search text: + +```rust +use regex::RegexSet; + +let set = RegexSet::new(&[ + r"\w+", + r"\d+", + r"\pL+", + r"foo", + r"bar", + r"barfoo", + r"foobar", +]).unwrap(); + +// Iterate over and collect all of the matches. +let matches: Vec<_> = set.matches("foobar").into_iter().collect(); +assert_eq!(matches, vec![0, 2, 3, 4, 6]); + +// You can also test whether a particular regex matched: +let matches = set.matches("foobar"); +assert!(!matches.matched(5)); +assert!(matches.matched(6)); +``` + +### Usage: `regex!` compiler plugin + +The `regex!` compiler plugin will compile your regexes at compile time. **This +only works with a nightly compiler.** +The +[documentation explains the trade +offs](https://doc.rust-lang.org/regex/regex/index.html#the-regex!-macro). + +Here is a small example: + +```rust +#![feature(plugin)] + +#![plugin(regex_macros)] +extern crate regex; + +fn main() { + let re = regex!(r"(\d{4})-(\d{2})-(\d{2})"); + let caps = re.captures("2010-03-14").unwrap(); + + assert_eq!("2010", caps.at(1).unwrap()); + assert_eq!("03", caps.at(2).unwrap()); + assert_eq!("14", caps.at(3).unwrap()); +} +``` + +Notice that we never `unwrap` the result of `regex!`. This is because your +*program* won't compile if the regex doesn't compile. (Try `regex!("(")`.) + +Due to recent optimizations in the `regex` crate, the normal "dynamic" regex +created via `Regex::new(...)` is faster in almost all cases than `regex!(...)`. +In theory, this should be temporary, but the path to fixing it isn't quite +clear yet. + +### Usage: a regular expression parser + +This repository contains a crate that provides a well tested regular expression +parser and abstract syntax. It provides no facilities for compilation or +execution. This may be useful if you're implementing your own regex engine or +otherwise need to do analysis on the syntax of a regular expression. It is +otherwise not recommended for general use. + +[Documentation for `regex-syntax` with +examples](https://doc.rust-lang.org/regex/regex_syntax/index.html). + +# License + +`regex` is primarily distributed under the terms of both the MIT license and +the Apache License (Version 2.0), with portions covered by various BSD-like +licenses. + +See LICENSE-APACHE, and LICENSE-MIT for details. diff --git a/deps/regex-0.1.48/appveyor.yml b/deps/regex-0.1.58/appveyor.yml similarity index 100% rename from deps/regex-0.1.48/appveyor.yml rename to deps/regex-0.1.58/appveyor.yml diff --git a/deps/regex-0.1.48/examples/regexdna-input.txt b/deps/regex-0.1.58/examples/regexdna-input.txt similarity index 100% rename from deps/regex-0.1.48/examples/regexdna-input.txt rename to deps/regex-0.1.58/examples/regexdna-input.txt diff --git a/deps/regex-0.1.48/examples/regexdna-output.txt b/deps/regex-0.1.58/examples/regexdna-output.txt similarity index 100% rename from deps/regex-0.1.48/examples/regexdna-output.txt rename to deps/regex-0.1.58/examples/regexdna-output.txt diff --git a/deps/regex-0.1.58/examples/set.rs b/deps/regex-0.1.58/examples/set.rs new file mode 100644 index 000000000..caf0fead5 --- /dev/null +++ b/deps/regex-0.1.58/examples/set.rs @@ -0,0 +1,19 @@ +extern crate regex; + +use regex::RegexSet; + +fn main() { + let res = &[ + "abc", + "xyzz", + "^[ga-fh-z]+$", + ]; + let text = "abcggggggggxyz"; + let set = RegexSet::new(res).unwrap(); + println!("{:?}", set); + let m = set.is_match("abcggggggggxyz"); + println!("match? {:?}", m); + for mi in set.matches(text) { + println!("{:?}", mi); + } +} diff --git a/deps/regex-0.1.58/examples/shootout-regex-dna-bytes.rs b/deps/regex-0.1.58/examples/shootout-regex-dna-bytes.rs new file mode 100644 index 000000000..7bd0bf1bf --- /dev/null +++ b/deps/regex-0.1.58/examples/shootout-regex-dna-bytes.rs @@ -0,0 +1,66 @@ +// The Computer Language Benchmarks Game +// http://benchmarksgame.alioth.debian.org/ +// +// contributed by the Rust Project Developers +// contributed by TeXitoi +// contributed by BurntSushi + +extern crate regex; + +use std::io::{self, Read}; +use std::sync::Arc; +use std::thread; + +macro_rules! regex { ($re:expr) => { ::regex::bytes::Regex::new($re).unwrap() } } + +fn main() { + let mut seq = Vec::with_capacity(50 * (1 << 20)); + io::stdin().read_to_end(&mut seq).unwrap(); + let ilen = seq.len(); + + seq = regex!(">[^\n]*\n|\n").replace_all(&seq, &b""[..]); + let clen = seq.len(); + let seq_arc = Arc::new(seq.clone()); + + let variants = vec![ + regex!("agggtaaa|tttaccct"), + regex!("[cgt]gggtaaa|tttaccc[acg]"), + regex!("a[act]ggtaaa|tttacc[agt]t"), + regex!("ag[act]gtaaa|tttac[agt]ct"), + regex!("agg[act]taaa|ttta[agt]cct"), + regex!("aggg[acg]aaa|ttt[cgt]ccct"), + regex!("agggt[cgt]aa|tt[acg]accct"), + regex!("agggta[cgt]a|t[acg]taccct"), + regex!("agggtaa[cgt]|[acg]ttaccct"), + ]; + let mut counts = vec![]; + for variant in variants { + let seq = seq_arc.clone(); + let restr = variant.to_string(); + let future = thread::spawn(move || variant.find_iter(&seq).count()); + counts.push((restr, future)); + } + + let substs = vec![ + (regex!("B"), &b"(c|g|t)"[..]), + (regex!("D"), &b"(a|g|t)"[..]), + (regex!("H"), &b"(a|c|t)"[..]), + (regex!("K"), &b"(g|t)"[..]), + (regex!("M"), &b"(a|c)"[..]), + (regex!("N"), &b"(a|c|g|t)"[..]), + (regex!("R"), &b"(a|g)"[..]), + (regex!("S"), &b"(c|g)"[..]), + (regex!("V"), &b"(a|c|g)"[..]), + (regex!("W"), &b"(a|t)"[..]), + (regex!("Y"), &b"(c|t)"[..]), + ]; + let mut seq = seq; + for (re, replacement) in substs.into_iter() { + seq = re.replace_all(&seq, replacement); + } + + for (variant, count) in counts { + println!("{} {}", variant, count.join().unwrap()); + } + println!("\n{}\n{}\n{}", ilen, clen, seq.len()); +} diff --git a/deps/regex-0.1.58/examples/shootout-regex-dna-cheat.rs b/deps/regex-0.1.58/examples/shootout-regex-dna-cheat.rs new file mode 100644 index 000000000..57583218b --- /dev/null +++ b/deps/regex-0.1.58/examples/shootout-regex-dna-cheat.rs @@ -0,0 +1,88 @@ +// The Computer Language Benchmarks Game +// http://benchmarksgame.alioth.debian.org/ +// +// contributed by the Rust Project Developers +// contributed by TeXitoi +// contributed by BurntSushi + +// This technically solves the problem posed in the `regex-dna` benchmark, but +// it cheats by combining all of the replacements into a single regex and +// replacing them with a single linear scan. i.e., it re-implements +// `replace_all`. As a result, this is around 25% faster. ---AG + +extern crate regex; + +use std::io::{self, Read}; +use std::sync::Arc; +use std::thread; + +macro_rules! regex { ($re:expr) => { ::regex::Regex::new($re).unwrap() } } + +fn main() { + let mut seq = String::with_capacity(50 * (1 << 20)); + io::stdin().read_to_string(&mut seq).unwrap(); + let ilen = seq.len(); + + seq = regex!(">[^\n]*\n|\n").replace_all(&seq, ""); + let clen = seq.len(); + let seq_arc = Arc::new(seq.clone()); + + let variants = vec![ + regex!("agggtaaa|tttaccct"), + regex!("[cgt]gggtaaa|tttaccc[acg]"), + regex!("a[act]ggtaaa|tttacc[agt]t"), + regex!("ag[act]gtaaa|tttac[agt]ct"), + regex!("agg[act]taaa|ttta[agt]cct"), + regex!("aggg[acg]aaa|ttt[cgt]ccct"), + regex!("agggt[cgt]aa|tt[acg]accct"), + regex!("agggta[cgt]a|t[acg]taccct"), + regex!("agggtaa[cgt]|[acg]ttaccct"), + ]; + let mut counts = vec![]; + for variant in variants { + let seq = seq_arc.clone(); + let restr = variant.to_string(); + let future = thread::spawn(move || variant.find_iter(&seq).count()); + counts.push((restr, future)); + } + + let substs = vec![ + (b'B', "(c|g|t)"), + (b'D', "(a|g|t)"), + (b'H', "(a|c|t)"), + (b'K', "(g|t)"), + (b'M', "(a|c)"), + (b'N', "(a|c|g|t)"), + (b'R', "(a|g)"), + (b'S', "(c|g)"), + (b'V', "(a|c|g)"), + (b'W', "(a|t)"), + (b'Y', "(c|t)"), + ]; // combined into one regex in `replace_all` + let seq = replace_all(&seq, substs); + + for (variant, count) in counts { + println!("{} {}", variant, count.join().unwrap()); + } + println!("\n{}\n{}\n{}", ilen, clen, seq.len()); +} + +fn replace_all(text: &str, substs: Vec<(u8, &str)>) -> String { + let mut replacements = vec![""; 256]; + let mut alternates = vec![]; + for (re, replacement) in substs { + replacements[re as usize] = replacement; + alternates.push((re as char).to_string()); + } + + let re = regex!(&alternates.join("|")); + let mut new = String::with_capacity(text.len()); + let mut last_match = 0; + for (s, e) in re.find_iter(text) { + new.push_str(&text[last_match..s]); + new.push_str(replacements[text.as_bytes()[s] as usize]); + last_match = e; + } + new.push_str(&text[last_match..]); + new +} diff --git a/deps/regex-0.1.58/examples/shootout-regex-dna-replace.rs b/deps/regex-0.1.58/examples/shootout-regex-dna-replace.rs new file mode 100644 index 000000000..a3319ad29 --- /dev/null +++ b/deps/regex-0.1.58/examples/shootout-regex-dna-replace.rs @@ -0,0 +1,19 @@ +extern crate regex; + +use std::io::{self, Read}; + +macro_rules! regex { + ($re:expr) => {{ + use regex::internal::ExecBuilder; + ExecBuilder::new($re).build().unwrap().into_regex() + }} +} + +fn main() { + let mut seq = String::with_capacity(50 * (1 << 20)); + io::stdin().read_to_string(&mut seq).unwrap(); + let ilen = seq.len(); + + seq = regex!(">[^\n]*\n|\n").replace_all(&seq, ""); + println!("original: {}, replaced: {}", ilen, seq.len()); +} diff --git a/deps/regex-0.1.58/examples/shootout-regex-dna-single-cheat.rs b/deps/regex-0.1.58/examples/shootout-regex-dna-single-cheat.rs new file mode 100644 index 000000000..fbf464202 --- /dev/null +++ b/deps/regex-0.1.58/examples/shootout-regex-dna-single-cheat.rs @@ -0,0 +1,73 @@ +// The Computer Language Benchmarks Game +// http://benchmarksgame.alioth.debian.org/ +// +// contributed by the Rust Project Developers +// contributed by TeXitoi +// contributed by BurntSushi + +extern crate regex; + +use std::io::{self, Read}; + +macro_rules! regex { ($re:expr) => { ::regex::Regex::new($re).unwrap() } } + +fn main() { + let mut seq = String::with_capacity(50 * (1 << 20)); + io::stdin().read_to_string(&mut seq).unwrap(); + let ilen = seq.len(); + + seq = regex!(">[^\n]*\n|\n").replace_all(&seq, ""); + let clen = seq.len(); + + let variants = vec![ + regex!("agggtaaa|tttaccct"), + regex!("[cgt]gggtaaa|tttaccc[acg]"), + regex!("a[act]ggtaaa|tttacc[agt]t"), + regex!("ag[act]gtaaa|tttac[agt]ct"), + regex!("agg[act]taaa|ttta[agt]cct"), + regex!("aggg[acg]aaa|ttt[cgt]ccct"), + regex!("agggt[cgt]aa|tt[acg]accct"), + regex!("agggta[cgt]a|t[acg]taccct"), + regex!("agggtaa[cgt]|[acg]ttaccct"), + ]; + for re in variants { + println!("{} {}", re.to_string(), re.find_iter(&seq).count()); + } + + let substs = vec![ + (b'B', "(c|g|t)"), + (b'D', "(a|g|t)"), + (b'H', "(a|c|t)"), + (b'K', "(g|t)"), + (b'M', "(a|c)"), + (b'N', "(a|c|g|t)"), + (b'R', "(a|g)"), + (b'S', "(c|g)"), + (b'V', "(a|c|g)"), + (b'W', "(a|t)"), + (b'Y', "(c|t)"), + ]; // combined into one regex in `replace_all` + let seq = replace_all(&seq, substs); + + println!("\n{}\n{}\n{}", ilen, clen, seq.len()); +} + +fn replace_all(text: &str, substs: Vec<(u8, &str)>) -> String { + let mut replacements = vec![""; 256]; + let mut alternates = vec![]; + for (re, replacement) in substs { + replacements[re as usize] = replacement; + alternates.push((re as char).to_string()); + } + + let re = regex!(&alternates.join("|")); + let mut new = String::with_capacity(text.len()); + let mut last_match = 0; + for (s, e) in re.find_iter(text) { + new.push_str(&text[last_match..s]); + new.push_str(replacements[text.as_bytes()[s] as usize]); + last_match = e; + } + new.push_str(&text[last_match..]); + new +} diff --git a/deps/regex-0.1.48/examples/shootout-regex-dna-single.rs b/deps/regex-0.1.58/examples/shootout-regex-dna-single.rs similarity index 100% rename from deps/regex-0.1.48/examples/shootout-regex-dna-single.rs rename to deps/regex-0.1.58/examples/shootout-regex-dna-single.rs diff --git a/deps/regex-0.1.58/examples/shootout-regex-dna.rs b/deps/regex-0.1.58/examples/shootout-regex-dna.rs new file mode 100644 index 000000000..2cd0b65bb --- /dev/null +++ b/deps/regex-0.1.58/examples/shootout-regex-dna.rs @@ -0,0 +1,66 @@ +// The Computer Language Benchmarks Game +// http://benchmarksgame.alioth.debian.org/ +// +// contributed by the Rust Project Developers +// contributed by TeXitoi +// contributed by BurntSushi + +extern crate regex; + +use std::io::{self, Read}; +use std::sync::Arc; +use std::thread; + +macro_rules! regex { ($re:expr) => { ::regex::Regex::new($re).unwrap() } } + +fn main() { + let mut seq = String::with_capacity(50 * (1 << 20)); + io::stdin().read_to_string(&mut seq).unwrap(); + let ilen = seq.len(); + + seq = regex!(">[^\n]*\n|\n").replace_all(&seq, ""); + let clen = seq.len(); + let seq_arc = Arc::new(seq.clone()); + + let variants = vec![ + regex!("agggtaaa|tttaccct"), + regex!("[cgt]gggtaaa|tttaccc[acg]"), + regex!("a[act]ggtaaa|tttacc[agt]t"), + regex!("ag[act]gtaaa|tttac[agt]ct"), + regex!("agg[act]taaa|ttta[agt]cct"), + regex!("aggg[acg]aaa|ttt[cgt]ccct"), + regex!("agggt[cgt]aa|tt[acg]accct"), + regex!("agggta[cgt]a|t[acg]taccct"), + regex!("agggtaa[cgt]|[acg]ttaccct"), + ]; + let mut counts = vec![]; + for variant in variants { + let seq = seq_arc.clone(); + let restr = variant.to_string(); + let future = thread::spawn(move || variant.find_iter(&seq).count()); + counts.push((restr, future)); + } + + let substs = vec![ + (regex!("B"), "(c|g|t)"), + (regex!("D"), "(a|g|t)"), + (regex!("H"), "(a|c|t)"), + (regex!("K"), "(g|t)"), + (regex!("M"), "(a|c)"), + (regex!("N"), "(a|c|g|t)"), + (regex!("R"), "(a|g)"), + (regex!("S"), "(c|g)"), + (regex!("V"), "(a|c|g)"), + (regex!("W"), "(a|t)"), + (regex!("Y"), "(c|t)"), + ]; + let mut seq = seq; + for (re, replacement) in substs.into_iter() { + seq = re.replace_all(&seq, replacement); + } + + for (variant, count) in counts { + println!("{} {}", variant, count.join().unwrap()); + } + println!("\n{}\n{}\n{}", ilen, clen, seq.len()); +} diff --git a/deps/regex-0.1.58/run-bench b/deps/regex-0.1.58/run-bench new file mode 100755 index 000000000..8a7873d69 --- /dev/null +++ b/deps/regex-0.1.58/run-bench @@ -0,0 +1,46 @@ +#!/bin/bash + +if [ $# = 0 ] || [ $1 = '-h' ]; then + echo "Usage: $(basename $0) [rust | rust-bytes | rust-plugin | pcre | onig]" >&2 + exit 1 +fi + +which="$1" +shift +case $which in + rust) + exec cargo bench \ + --manifest-path benches/Cargo.toml \ + --bench rust \ + --features re-rust \ + "$@" + ;; + rust-bytes) + exec cargo bench \ + --manifest-path benches/Cargo.toml \ + --bench rust-bytes \ + --features re-rust-bytes \ + "$@" + ;; + rust-plugin) + exec cargo bench \ + --manifest-path benches/Cargo.toml \ + --bench rust-plugin \ + --features re-rust-plugin \ + "$@" + ;; + pcre) + exec cargo bench \ + --manifest-path benches/Cargo.toml \ + --bench pcre \ + --features re-pcre \ + "$@" + ;; + onig|oniguruma) + exec cargo bench \ + --manifest-path benches/Cargo.toml \ + --bench onig \ + --features re-onig \ + "$@" + ;; +esac diff --git a/deps/regex-0.1.58/run-kcov b/deps/regex-0.1.58/run-kcov new file mode 100755 index 000000000..6f977d213 --- /dev/null +++ b/deps/regex-0.1.58/run-kcov @@ -0,0 +1,59 @@ +#!/bin/bash + +set -e + +tests=( + default + default_bytes + backtrack + backtrack_utf8bytes + backtrack_bytes + nfa + nfa_utf8bytes + nfa_bytes + regex + regex_inline +) +tmpdir=$(mktemp -d) +with_plugin= +coveralls_id= + +while true; do + case "$1" in + --with-plugin) + with_plugin=yes + shift + ;; + --coveralls-id) + coveralls_id="$2" + shift 2 + ;; + *) + break + ;; + esac +done + +if [ -n "$with_plugin" ]; then + cargo test --manifest-path regex_macros/Cargo.toml --no-run --verbose + kcov \ + --verify \ + --include-pattern '/regex/src/' \ + "$tmpdir/plugin" \ + $(ls -t ./regex_macros/target/debug/plugin-* | head -n1) +fi + +cargo test --no-run --verbose +for t in ${tests[@]}; do + kcov \ + --verify \ + --include-pattern '/regex/src/' \ + "$tmpdir/$t" \ + $(ls -t ./target/debug/"$t"-* | head -n1) +done + +if [ -n "$coveralls_id" ]; then + kcov --verify --coveralls-id=$coveralls_id --merge target/cov "$tmpdir"/* +else + kcov --verify --merge target/cov "$tmpdir"/* +fi diff --git a/deps/regex-0.1.48/run-shootout-test b/deps/regex-0.1.58/run-shootout-test similarity index 100% rename from deps/regex-0.1.48/run-shootout-test rename to deps/regex-0.1.58/run-shootout-test diff --git a/deps/regex-0.1.48/scripts/regex-match-tests.py b/deps/regex-0.1.58/scripts/regex-match-tests.py similarity index 100% rename from deps/regex-0.1.48/scripts/regex-match-tests.py rename to deps/regex-0.1.58/scripts/regex-match-tests.py diff --git a/deps/regex-0.1.48/scripts/unicode.py b/deps/regex-0.1.58/scripts/unicode.py similarity index 100% rename from deps/regex-0.1.48/scripts/unicode.py rename to deps/regex-0.1.58/scripts/unicode.py diff --git a/deps/regex-0.1.58/src/backtrack.rs b/deps/regex-0.1.58/src/backtrack.rs new file mode 100644 index 000000000..88d829313 --- /dev/null +++ b/deps/regex-0.1.58/src/backtrack.rs @@ -0,0 +1,292 @@ +// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +// This is the backtracking matching engine. It has the same exact capability +// as the full NFA simulation, except it is artificially restricted to small +// regexes on small inputs because of its memory requirements. +// +// In particular, this is a *bounded* backtracking engine. It retains worst +// case linear time by keeping track of the states that is has visited (using a +// bitmap). Namely, once a state is visited, it is never visited again. Since a +// state is keyed by `(instruction index, input index)`, we have that its time +// complexity is `O(mn)` (i.e., linear in the size of the search text). +// +// The backtracking engine can beat out the NFA simulation on small +// regexes/inputs because it doesn't have to keep track of multiple copies of +// the capture groups. In benchmarks, the backtracking engine is roughly twice +// as fast as the full NFA simulation. Note though that its performance doesn't +// scale, even if you're willing to live with the memory requirements. Namely, +// the bitset has to be zeroed on each execution, which becomes quite expensive +// on large bitsets. + +use exec::Search; +use input::{Input, InputAt}; +use prog::{Program, InstPtr}; + +/// Returns true iff the given regex and input should be executed by this +/// engine with reasonable memory usage. +pub fn should_exec(num_insts: usize, text_len: usize) -> bool { + num_insts <= MAX_PROG_SIZE && text_len <= MAX_INPUT_SIZE +} + +// Total memory usage in bytes is determined by: +// +// ((len(insts) * (len(input) + 1) + bits - 1) / bits) * (size_of(u32)) +// +// With the constants below, this comes out to ~1.6MB. Mostly these numbers +// were picked empirically with suspicious benchmarks. + +type Bits = u32; +const BIT_SIZE: usize = 32; +const MAX_PROG_SIZE: usize = 100; +const MAX_INPUT_SIZE: usize = 128 * (1 << 10); + +/// A backtracking matching engine. +#[derive(Debug)] +pub struct Backtrack<'a, 'b, 'c: 'b, 'm: 'b, 'r, I> { + prog: &'r Program, + input: I, + search: &'b mut Search<'m, 'c>, + m: &'a mut BacktrackCache, +} + +/// Shared cached state between multiple invocations of a backtracking engine +/// in the same thread. +#[derive(Debug)] +pub struct BacktrackCache { + jobs: Vec<Job>, + visited: Vec<Bits>, +} + +impl BacktrackCache { + /// Create new empty cache for the backtracking engine. + pub fn new() -> Self { + BacktrackCache { jobs: vec![], visited: vec![] } + } +} + +/// A job is an explicit unit of stack space in the backtracking engine. +/// +/// The "normal" representation is a single state transition, which corresponds +/// to an NFA state and a character in the input. However, the backtracking +/// engine must keep track of old capture group values. We use the explicit +/// stack to do it. +#[derive(Clone, Copy, Debug)] +enum Job { + Inst { ip: InstPtr, at: InputAt }, + SaveRestore { slot: usize, old_pos: Option<usize> }, +} + +impl<'a, 'b, 'c, 'm, 'r, I: Input> Backtrack<'a, 'b, 'c, 'r, 'm, I> { + /// Execute the backtracking matching engine. + /// + /// If there's a match, `exec` returns `true` and populates the given + /// captures accordingly. + pub fn exec( + prog: &'r Program, + search: &'b mut Search<'c, 'm>, + input: I, + start: usize, + ) -> bool { + let start = input.at(start); + let mut m = prog.cache_backtrack(); + let mut b = Backtrack { + prog: prog, + input: input, + search: search, + m: &mut m, + }; + b.exec_(start) + } + + /// Clears the cache such that the backtracking engine can be executed + /// on some input of fixed length. + fn clear(&mut self) { + // Reset the job memory so that we start fresh. + self.m.jobs.clear(); + + // Now we need to clear the bit state set. + // We do this by figuring out how much space we need to keep track + // of the states we've visited. + // Then we reset all existing allocated space to 0. + // Finally, we request more space if we need it. + // + // This is all a little circuitous, but doing this unsafely + // doesn't seem to have a measurable impact on performance. + // (Probably because backtracking is limited to such small + // inputs/regexes in the first place.) + let visited_len = + (self.prog.len() * (self.input.len() + 1) + BIT_SIZE - 1) + / + BIT_SIZE; + self.m.visited.truncate(visited_len); + for v in &mut self.m.visited { + *v = 0; + } + if visited_len > self.m.visited.len() { + let len = self.m.visited.len(); + self.m.visited.reserve_exact(visited_len - len); + for _ in 0..(visited_len - len) { + self.m.visited.push(0); + } + } + } + + /// Start backtracking at the given position in the input, but also look + /// for literal prefixes. + fn exec_(&mut self, mut at: InputAt) -> bool { + self.clear(); + // If this is an anchored regex at the beginning of the input, then + // we're either already done or we only need to try backtracking once. + if self.prog.is_anchored_start { + return if !at.is_start() { + false + } else { + self.backtrack(at) + }; + } + loop { + if !self.prog.prefixes.is_empty() { + at = match self.input.prefix_at(&self.prog.prefixes, at) { + None => return false, + Some(at) => at, + }; + } + if self.backtrack(at) { + return true; + } + if at.is_end() { + return false; + } + at = self.input.at(at.next_pos()); + } + } + + /// The main backtracking loop starting at the given input position. + // This `inline(always)` seems to result in about a 10-15% increase in + // throughput on the `hard` benchmarks (over a standard `inline`). ---AG + #[inline(always)] + fn backtrack(&mut self, start: InputAt) -> bool { + // N.B. We use an explicit stack to avoid recursion. + // To avoid excessive pushing and popping, most transitions are handled + // in the `step` helper function, which only pushes to the stack when + // there's a capture or a branch. + self.m.jobs.push(Job::Inst { ip: 0, at: start }); + while let Some(job) = self.m.jobs.pop() { + match job { + Job::Inst { ip, at } => { + if self.step(ip, at) { + // Only quit if we're matching one regex. + // If we're matching a regex set, then mush on and + // try to find other matches. + if !self.search.find_many_matches() { + return true; + } + } + } + Job::SaveRestore { slot, old_pos } => { + self.search.set_capture(slot, old_pos); + } + } + } + false + } + + fn step(&mut self, mut ip: InstPtr, mut at: InputAt) -> bool { + use prog::Inst::*; + loop { + // This loop is an optimization to avoid constantly pushing/popping + // from the stack. Namely, if we're pushing a job only to run it + // next, avoid the push and just mutate `ip` (and possibly `at`) + // in place. + match self.prog[ip] { + Match(slot) => { + self.search.set_match(slot); + return true; + } + Save(ref inst) => { + if let Some(old_pos) = self.search.capture(inst.slot) { + // If this path doesn't work out, then we save the old + // capture index (if one exists) in an alternate + // job. If the next path fails, then the alternate + // job is popped and the old capture index is restored. + self.m.jobs.push(Job::SaveRestore { + slot: inst.slot, + old_pos: old_pos, + }); + self.search.set_capture(inst.slot, Some(at.pos())); + } + ip = inst.goto; + } + Split(ref inst) => { + self.m.jobs.push(Job::Inst { ip: inst.goto2, at: at }); + ip = inst.goto1; + } + EmptyLook(ref inst) => { + let prev = self.input.previous_char(at); + let next = self.input.next_char(at); + if inst.matches(prev, next) { + ip = inst.goto; + } else { + return false; + } + } + Char(ref inst) => { + if inst.c == at.char() { + ip = inst.goto; + at = self.input.at(at.next_pos()); + } else { + return false; + } + } + Ranges(ref inst) => { + if inst.matches(at.char()) { + ip = inst.goto; + at = self.input.at(at.next_pos()); + } else { + return false; + } + } + Bytes(ref inst) => { + if let Some(b) = at.byte() { + if inst.matches(b) { + ip = inst.goto; + at = self.input.at(at.next_pos()); + continue; + } + } + return false; + } + } + if self.has_visited(ip, at) { + return false; + } + } + } + + fn has_visited(&mut self, ip: InstPtr, at: InputAt) -> bool { + let k = ip * (self.input.len() + 1) + at.pos(); + let k1 = k / BIT_SIZE; + let k2 = usize_to_u32(1 << (k & (BIT_SIZE - 1))); + if self.m.visited[k1] & k2 == 0 { + self.m.visited[k1] |= k2; + false + } else { + true + } + } +} + +fn usize_to_u32(n: usize) -> u32 { + if (n as u64) > (::std::u32::MAX as u64) { + panic!("BUG: {} is too big to fit into u32", n) + } + n as u32 +} diff --git a/deps/regex-0.1.58/src/compile.rs b/deps/regex-0.1.58/src/compile.rs new file mode 100644 index 000000000..8f1efdf2b --- /dev/null +++ b/deps/regex-0.1.58/src/compile.rs @@ -0,0 +1,1055 @@ +// Copyright 2014-2016 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +use std::collections::HashMap; +use std::iter; +use std::result; +use std::sync::Arc; + +use syntax::{Expr, Repeater, CharClass, ClassRange, ByteClass, ByteRange}; +use utf8_ranges::{Utf8Range, Utf8Sequence, Utf8Sequences}; + +use prog::{ + Program, Inst, InstPtr, EmptyLook, + InstSave, InstSplit, InstEmptyLook, InstChar, InstRanges, InstBytes, +}; + +use Error; + +type InstHoleIdx = InstPtr; + +type Result = result::Result<Patch, Error>; + +#[derive(Debug)] +struct Patch { + hole: Hole, + entry: InstPtr, +} + +/// A compiler translates a regular expression AST to a sequence of +/// instructions. The sequence of instructions represents an NFA. +pub struct Compiler { + insts: Vec<MaybeInst>, + compiled: Program, + capture_name_idx: HashMap<String, usize>, + num_exprs: usize, + size_limit: usize, + suffix_cache: SuffixCache, + utf8_seqs: Option<Utf8Sequences>, + byte_classes: ByteClassSet, +} + +impl Compiler { + /// Create a new regular expression compiler. + /// + /// Various options can be set before calling `compile` on an expression. + pub fn new() -> Self { + Compiler { + insts: vec![], + compiled: Program::new(), + capture_name_idx: HashMap::new(), + num_exprs: 0, + size_limit: 10 * (1 << 20), + suffix_cache: SuffixCache::new(1000), + utf8_seqs: Some(Utf8Sequences::new('\x00', '\x00')), + byte_classes: ByteClassSet::new(), + } + } + + /// The size of the resulting program is limited by size_limit. If + /// the program approximately exceeds the given size (in bytes), then + /// compilation will stop and return an error. + pub fn size_limit(mut self, size_limit: usize) -> Self { + self.size_limit = size_limit; + self + } + + /// If bytes is true, then the program is compiled as a byte based + /// automaton, which incorporates UTF-8 decoding into the machine. If it's + /// false, then the automaton is Unicode scalar value based, e.g., an + /// engine utilizing such an automaton is resposible for UTF-8 decoding. + /// + /// The specific invariant is that when returning a byte based machine, + /// the neither the `Char` nor `Ranges` instructions are produced. + /// Conversely, when producing a Unicode scalar value machine, the `Bytes` + /// instruction is never produced. + /// + /// Note that `dfa(true)` implies `bytes(true)`. + pub fn bytes(mut self, yes: bool) -> Self { + self.compiled.is_bytes = yes; + self + } + + /// When disabled, the program compiled may match arbitrary bytes. + /// + /// When enabled (the default), all compiled programs exclusively match + /// valid UTF-8 bytes. + pub fn only_utf8(mut self, yes: bool) -> Self { + self.compiled.only_utf8 = yes; + self + } + + /// When set, the machine returned is suitable for use in the DFA matching + /// engine. + /// + /// In particular, this ensures that if the regex is not anchored in the + /// beginning, then a preceding `.*?` is included in the program. (The NFA + /// based engines handle the preceding `.*?` explicitly, which is difficult + /// or impossible in the DFA engine.) + pub fn dfa(mut self, yes: bool) -> Self { + self.compiled.is_dfa = yes; + self + } + + /// When set, the machine returned is suitable for matching text in + /// reverse. In particular, all concatenations are flipped. + pub fn reverse(mut self, yes: bool) -> Self { + self.compiled.is_reverse = yes; + self + } + + /// Compile a regular expression given its AST. + /// + /// The compiler is guaranteed to succeed unless the program exceeds the + /// specified size limit. If the size limit is exceeded, then compilation + /// stops and returns an error. + pub fn compile( + mut self, + exprs: &[Expr], + ) -> result::Result<Program, Error> { + debug_assert!(exprs.len() >= 1); + self.num_exprs = exprs.len(); + if exprs.len() == 1 { + self.compile_one(&exprs[0]) + } else { + self.compile_many(exprs) + } + } + + fn compile_one(mut self, expr: &Expr) -> result::Result<Program, Error> { + // If we're compiling a forward DFA and we aren't anchored, then + // add a `.*?` before the first capture group. + // Other matching engines handle this by baking the logic into the + // matching engine itself. + self.compiled.is_anchored_start = expr.is_anchored_start(); + self.compiled.is_anchored_end = expr.is_anchored_end(); + if self.compiled.needs_dotstar() { + try!(self.c_dotstar()); + } + self.compiled.captures = vec![None]; + self.compiled.start = self.insts.len(); + let patch = try!(self.c_capture(0, expr)); + self.fill_to_next(patch.hole); + self.compiled.matches = vec![self.insts.len()]; + self.push_compiled(Inst::Match(0)); + self.compile_finish() + } + + fn compile_many( + mut self, + exprs: &[Expr], + ) -> result::Result<Program, Error> { + debug_assert!(exprs.len() > 1); + + self.compiled.is_anchored_start = + exprs.iter().all(|e| e.is_anchored_start()); + self.compiled.is_anchored_end = + exprs.iter().all(|e| e.is_anchored_end()); + if self.compiled.needs_dotstar() { + try!(self.c_dotstar()); + } + + self.compiled.start = self.insts.len(); + for (i, expr) in exprs[0..exprs.len() - 1].iter().enumerate() { + let split = self.push_split_hole(); + let Patch { hole, entry } = try!(self.c_capture(0, expr)); + self.fill_to_next(hole); + self.compiled.matches.push(self.insts.len()); + self.push_compiled(Inst::Match(i)); + + let next = self.insts.len(); + self.fill_split(split, Some(entry), Some(next)); + } + let i = exprs.len() - 1; + let Patch { hole, .. } = try!(self.c_capture(0, &exprs[i])); + self.fill_to_next(hole); + self.compiled.matches.push(self.insts.len()); + self.push_compiled(Inst::Match(i)); + + self.compile_finish() + } + + fn compile_finish(mut self) -> result::Result<Program, Error> { + self.compiled.insts = + self.insts.into_iter().map(|inst| inst.unwrap()).collect(); + self.compiled.byte_classes = self.byte_classes.byte_classes(); + self.compiled.capture_name_idx = Arc::new(self.capture_name_idx); + Ok(self.compiled) + } + + fn c(&mut self, expr: &Expr) -> Result { + use prog; + use syntax::Expr::*; + + try!(self.check_size()); + match *expr { + Empty => Ok(Patch { hole: Hole::None, entry: self.insts.len() }), + Literal { ref chars, casei } => self.c_literal(chars, casei), + LiteralBytes { ref bytes, casei } => self.c_bytes(bytes, casei), + AnyChar => self.c_class(&[ClassRange { + start: '\x00', + end: '\u{10ffff}', + }]), + AnyCharNoNL => { + self.c_class(&[ + ClassRange { start: '\x00', end: '\x09' }, + ClassRange { start: '\x0b', end: '\u{10ffff}' }, + ]) + } + AnyByte => { + assert!(!self.compiled.only_utf8()); + self.c_class_bytes(&[ByteRange { start: 0, end: 0xFF }]) + } + AnyByteNoNL => { + assert!(!self.compiled.only_utf8()); + self.c_class_bytes(&[ + ByteRange { start: 0, end: 0x9 }, + ByteRange { start: 0xB, end: 0xFF }, + ]) + } + Class(ref cls) => { + self.c_class(cls) + } + ClassBytes(ref cls) => { + self.c_class_bytes(cls) + } + StartLine if self.compiled.is_reverse => { + self.byte_classes.set_range(b'\n', b'\n'); + self.c_empty_look(prog::EmptyLook::EndLine) + } + StartLine => { + self.byte_classes.set_range(b'\n', b'\n'); + self.c_empty_look(prog::EmptyLook::StartLine) + } + EndLine if self.compiled.is_reverse => { + self.byte_classes.set_range(b'\n', b'\n'); + self.c_empty_look(prog::EmptyLook::StartLine) + } + EndLine => { + self.byte_classes.set_range(b'\n', b'\n'); + self.c_empty_look(prog::EmptyLook::EndLine) + } + StartText if self.compiled.is_reverse => { + self.c_empty_look(prog::EmptyLook::EndText) + } + StartText => { + self.c_empty_look(prog::EmptyLook::StartText) + } + EndText if self.compiled.is_reverse => { + self.c_empty_look(prog::EmptyLook::StartText) + } + EndText => { + self.c_empty_look(prog::EmptyLook::EndText) + } + WordBoundary => self.c_empty_look(prog::EmptyLook::WordBoundary), + NotWordBoundary => { + self.c_empty_look(prog::EmptyLook::NotWordBoundary) + } + WordBoundaryAscii => { + self.c_empty_look(prog::EmptyLook::WordBoundaryAscii) + } + NotWordBoundaryAscii => { + self.c_empty_look(prog::EmptyLook::NotWordBoundaryAscii) + } + Group { ref e, i: None, name: None } => self.c(e), + Group { ref e, i, ref name } => { + // it's impossible to have a named capture without an index + let i = i.expect("capture index"); + if i >= self.compiled.captures.len() { + self.compiled.captures.push(name.clone()); + if let Some(ref name) = *name { + self.capture_name_idx.insert(name.to_owned(), i); + } + } + self.c_capture(2 * i, e) + } + Concat(ref es) => { + if self.compiled.is_reverse { + self.c_concat(es.iter().rev()) + } else { + self.c_concat(es) + } + } + Alternate(ref es) => self.c_alternate(&**es), + Repeat { ref e, r, greedy } => self.c_repeat(e, r, greedy), + } + } + + fn c_capture(&mut self, first_slot: usize, expr: &Expr) -> Result { + if self.num_exprs > 1 || self.compiled.is_dfa { + // Don't ever compile Save instructions for regex sets because + // they are never used. They are also never used in DFA programs + // because DFAs can't handle captures. + self.c(expr) + } else { + let entry = self.insts.len(); + let hole = self.push_hole(InstHole::Save { slot: first_slot }); + let patch = try!(self.c(expr)); + self.fill(hole, patch.entry); + self.fill_to_next(patch.hole); + let hole = self.push_hole(InstHole::Save { slot: first_slot + 1 }); + Ok(Patch { hole: hole, entry: entry }) + } + } + + fn c_dotstar(&mut self) -> result::Result<(), Error> { + let patch = if !self.compiled.only_utf8() { + try!(self.c(&Expr::Repeat { + e: Box::new(Expr::AnyByte), + r: Repeater::ZeroOrMore, + greedy: false, + })) + } else { + try!(self.c(&Expr::Repeat { + e: Box::new(Expr::AnyChar), + r: Repeater::ZeroOrMore, + greedy: false, + })) + }; + self.fill_to_next(patch.hole); + Ok(()) + } + + fn c_literal(&mut self, chars: &[char], casei: bool) -> Result { + assert!(!chars.is_empty()); + let mut chars: Box<Iterator<Item=&char>> = + if self.compiled.is_reverse { + Box::new(chars.iter().rev()) + } else { + Box::new(chars.iter()) + }; + let first = *chars.next().expect("non-empty literal"); + let Patch { mut hole, entry } = try!(self.c_char(first, casei)); + for &c in chars { + let p = try!(self.c_char(c, casei)); + self.fill(hole, p.entry); + hole = p.hole; + } + Ok(Patch { hole: hole, entry: entry }) + } + + fn c_char(&mut self, c: char, casei: bool) -> Result { + if casei { + self.c_class(&CharClass::new(vec![ + ClassRange { start: c, end: c }, + ]).case_fold()) + } else { + self.c_class(&[ClassRange { start: c, end: c }]) + } + } + + fn c_class(&mut self, ranges: &[ClassRange]) -> Result { + if self.compiled.uses_bytes() { + CompileClass { + c: self, + ranges: ranges, + }.compile() + } else { + let ranges: Vec<(char, char)> = + ranges.iter().map(|r| (r.start, r.end)).collect(); + let hole = if ranges.len() == 1 && ranges[0].0 == ranges[0].1 { + self.push_hole(InstHole::Char { c: ranges[0].0 }) + } else { + self.push_hole(InstHole::Ranges { ranges: ranges }) + }; + Ok(Patch { hole: hole, entry: self.insts.len() - 1 }) + } + } + + fn c_bytes(&mut self, bytes: &[u8], casei: bool) -> Result { + assert!(!bytes.is_empty()); + let mut bytes: Box<Iterator<Item=&u8>> = + if self.compiled.is_reverse { + Box::new(bytes.iter().rev()) + } else { + Box::new(bytes.iter()) + }; + let first = *bytes.next().expect("non-empty literal"); + let Patch { mut hole, entry } = try!(self.c_byte(first, casei)); + for &b in bytes { + let p = try!(self.c_byte(b, casei)); + self.fill(hole, p.entry); + hole = p.hole; + } + Ok(Patch { hole: hole, entry: entry }) + } + + fn c_byte(&mut self, b: u8, casei: bool) -> Result { + if casei { + self.c_class_bytes(&ByteClass::new(vec![ + ByteRange { start: b, end: b }, + ]).case_fold()) + } else { + self.c_class_bytes(&[ByteRange { start: b, end: b }]) + } + } + + fn c_class_bytes(&mut self, ranges: &[ByteRange]) -> Result { + assert!(!ranges.is_empty()); + + let first_split_entry = self.insts.len(); + let mut holes = vec![]; + let mut prev_hole = Hole::None; + for r in &ranges[0..ranges.len() - 1] { + self.fill_to_next(prev_hole); + let split = self.push_split_hole(); + let next = self.insts.len(); + self.byte_classes.set_range(r.start, r.end); + holes.push(self.push_hole(InstHole::Bytes { + start: r.start, end: r.end, + })); + prev_hole = self.fill_split(split, Some(next), None); + } + let next = self.insts.len(); + let r = &ranges[ranges.len() - 1]; + self.byte_classes.set_range(r.start, r.end); + holes.push(self.push_hole(InstHole::Bytes { + start: r.start, end: r.end, + })); + self.fill(prev_hole, next); + Ok(Patch { hole: Hole::Many(holes), entry: first_split_entry }) + } + + fn c_empty_look(&mut self, look: EmptyLook) -> Result { + let hole = self.push_hole(InstHole::EmptyLook { look: look }); + Ok(Patch { hole: hole, entry: self.insts.len() - 1 }) + } + + fn c_concat<'a, I>(&mut self, exprs: I) -> Result + where I: IntoIterator<Item=&'a Expr> { + let mut exprs = exprs.into_iter(); + let first = match exprs.next() { + Some(expr) => expr, + None => { + return Ok(Patch { hole: Hole::None, entry: self.insts.len() }) + } + }; + let Patch { mut hole, entry } = try!(self.c(first)); + for e in exprs { + let p = try!(self.c(e)); + self.fill(hole, p.entry); + hole = p.hole; + } + Ok(Patch { hole: hole, entry: entry }) + } + + fn c_alternate(&mut self, exprs: &[Expr]) -> Result { + assert!(exprs.len() >= 2, "alternates must have at least 2 exprs"); + + // Initial entry point is always the first split. + let first_split_entry = self.insts.len(); + + // Save up all of the holes from each alternate. They will all get + // patched to point to the same location. + let mut holes = vec![]; + + let mut prev_hole = Hole::None; + for e in &exprs[0..exprs.len() - 1] { + self.fill_to_next(prev_hole); + let split = self.push_split_hole(); + let Patch { hole, entry } = try!(self.c(e)); + holes.push(hole); + prev_hole = self.fill_split(split, Some(entry), None); + } + let Patch { hole, entry } = try!(self.c(&exprs[exprs.len() - 1])); + holes.push(hole); + self.fill(prev_hole, entry); + Ok(Patch { hole: Hole::Many(holes), entry: first_split_entry }) + } + + fn c_repeat( + &mut self, + expr: &Expr, + kind: Repeater, + greedy: bool, + ) -> Result { + match kind { + Repeater::ZeroOrOne => self.c_repeat_zero_or_one(expr, greedy), + Repeater::ZeroOrMore => self.c_repeat_zero_or_more(expr, greedy), + Repeater::OneOrMore => self.c_repeat_one_or_more(expr, greedy), + Repeater::Range { min, max: None } => { + self.c_repeat_range_min_or_more(expr, greedy, min) + } + Repeater::Range { min, max: Some(max) } => { + self.c_repeat_range(expr, greedy, min, max) + } + } + } + + fn c_repeat_zero_or_one( + &mut self, + expr: &Expr, + greedy: bool, + ) -> Result { + let split_entry = self.insts.len(); + let split = self.push_split_hole(); + let Patch { hole: hole_rep, entry: entry_rep } = try!(self.c(expr)); + + let split_hole = if greedy { + self.fill_split(split, Some(entry_rep), None) + } else { + self.fill_split(split, None, Some(entry_rep)) + }; + let holes = vec![hole_rep, split_hole]; + Ok(Patch { hole: Hole::Many(holes), entry: split_entry }) + } + + fn c_repeat_zero_or_more( + &mut self, + expr: &Expr, + greedy: bool, + ) -> Result { + let split_entry = self.insts.len(); + let split = self.push_split_hole(); + let Patch { hole: hole_rep, entry: entry_rep } = try!(self.c(expr)); + + self.fill(hole_rep, split_entry); + let split_hole = if greedy { + self.fill_split(split, Some(entry_rep), None) + } else { + self.fill_split(split, None, Some(entry_rep)) + }; + Ok(Patch { hole: split_hole, entry: split_entry }) + } + + fn c_repeat_one_or_more( + &mut self, + expr: &Expr, + greedy: bool, + ) -> Result { + let Patch { hole: hole_rep, entry: entry_rep } = try!(self.c(expr)); + self.fill_to_next(hole_rep); + let split = self.push_split_hole(); + + let split_hole = if greedy { + self.fill_split(split, Some(entry_rep), None) + } else { + self.fill_split(split, None, Some(entry_rep)) + }; + Ok(Patch { hole: split_hole, entry: entry_rep }) + } + + fn c_repeat_range_min_or_more( + &mut self, + expr: &Expr, + greedy: bool, + min: u32, + ) -> Result { + let min = u32_to_usize(min); + let patch_concat = try!(self.c_concat(iter::repeat(expr).take(min))); + let patch_rep = try!(self.c_repeat_zero_or_more(expr, greedy)); + self.fill(patch_concat.hole, patch_rep.entry); + Ok(Patch { hole: patch_rep.hole, entry: patch_concat.entry }) + } + + fn c_repeat_range( + &mut self, + expr: &Expr, + greedy: bool, + min: u32, + max: u32, + ) -> Result { + let (min, max) = (u32_to_usize(min), u32_to_usize(max)); + let patch_concat = try!(self.c_concat(iter::repeat(expr).take(min))); + let initial_entry = patch_concat.entry; + if min == max { + return Ok(patch_concat); + } + // It is much simpler to compile, e.g., `a{2,5}` as: + // + // aaa?a?a? + // + // But you end up with a sequence of instructions like this: + // + // 0: 'a' + // 1: 'a', + // 2: split(3, 4) + // 3: 'a' + // 4: split(5, 6) + // 5: 'a' + // 6: split(7, 8) + // 7: 'a' + // 8: MATCH + // + // This is *incredibly* inefficient because the splits end + // up forming a chain, which has to be resolved everything a + // transition is followed. + let mut holes = vec![]; + let mut prev_hole = patch_concat.hole; + for _ in min..max { + self.fill_to_next(prev_hole); + let split = self.push_split_hole(); + let Patch { hole, entry } = try!(self.c(expr)); + prev_hole = hole; + if greedy { + holes.push(self.fill_split(split, Some(entry), None)); + } else { + holes.push(self.fill_split(split, None, Some(entry))); + } + } + holes.push(prev_hole); + Ok(Patch { hole: Hole::Many(holes), entry: initial_entry }) + } + + fn fill(&mut self, hole: Hole, goto: InstPtr) { + match hole { + Hole::None => {} + Hole::One(pc) => { + self.insts[pc].fill(goto); + } + Hole::Many(holes) => { + for hole in holes { + self.fill(hole, goto); + } + } + } + } + + fn fill_to_next(&mut self, hole: Hole) { + let next = self.insts.len(); + self.fill(hole, next); + } + + fn fill_split( + &mut self, + hole: Hole, + goto1: Option<InstPtr>, + goto2: Option<InstPtr>, + ) -> Hole { + match hole { + Hole::None => Hole::None, + Hole::One(pc) => { + match (goto1, goto2) { + (Some(goto1), Some(goto2)) => { + self.insts[pc].fill_split(goto1, goto2); + Hole::None + } + (Some(goto1), None) => { + self.insts[pc].half_fill_split_goto1(goto1); + Hole::One(pc) + } + (None, Some(goto2)) => { + self.insts[pc].half_fill_split_goto2(goto2); + Hole::One(pc) + } + (None, None) => unreachable!("at least one of the split \ + holes must be filled"), + } + } + Hole::Many(holes) => { + let mut new_holes = vec![]; + for hole in holes { + new_holes.push(self.fill_split(hole, goto1, goto2)); + } + if new_holes.is_empty() { + Hole::None + } else if new_holes.len() == 1 { + new_holes.pop().unwrap() + } else { + Hole::Many(new_holes) + } + } + } + } + + fn push_compiled(&mut self, inst: Inst) { + self.insts.push(MaybeInst::Compiled(inst)); + } + + fn push_hole(&mut self, inst: InstHole) -> Hole { + let hole = self.insts.len(); + self.insts.push(MaybeInst::Uncompiled(inst)); + Hole::One(hole) + } + + fn push_split_hole(&mut self) -> Hole { + let hole = self.insts.len(); + self.insts.push(MaybeInst::Split); + Hole::One(hole) + } + + fn check_size(&self) -> result::Result<(), Error> { + use std::mem::size_of; + + if self.insts.len() * size_of::<Inst>() > self.size_limit { + Err(Error::CompiledTooBig(self.size_limit)) + } else { + Ok(()) + } + } +} + +#[derive(Debug)] +enum Hole { + None, + One(InstPtr), + Many(Vec<Hole>), +} + +#[derive(Clone, Debug)] +enum MaybeInst { + Compiled(Inst), + Uncompiled(InstHole), + Split, + Split1(InstPtr), + Split2(InstPtr), +} + +impl MaybeInst { + fn fill(&mut self, goto: InstPtr) { + let filled = match *self { + MaybeInst::Uncompiled(ref inst) => inst.fill(goto), + MaybeInst::Split1(goto1) => { + Inst::Split(InstSplit { goto1: goto1, goto2: goto }) + } + MaybeInst::Split2(goto2) => { + Inst::Split(InstSplit { goto1: goto, goto2: goto2 }) + } + _ => unreachable!("not all instructions were compiled! \ + found uncompiled instruction: {:?}", self), + }; + *self = MaybeInst::Compiled(filled); + } + + fn fill_split(&mut self, goto1: InstPtr, goto2: InstPtr) { + let filled = match *self { + MaybeInst::Split => { + Inst::Split(InstSplit { goto1: goto1, goto2: goto2 }) + } + _ => unreachable!("must be called on Split instruction, \ + instead it was called on: {:?}", self), + }; + *self = MaybeInst::Compiled(filled); + } + + fn half_fill_split_goto1(&mut self, goto1: InstPtr) { + let half_filled = match *self { + MaybeInst::Split => goto1, + _ => unreachable!("must be called on Split instruction, \ + instead it was called on: {:?}", self), + }; + *self = MaybeInst::Split1(half_filled); + } + + fn half_fill_split_goto2(&mut self, goto2: InstPtr) { + let half_filled = match *self { + MaybeInst::Split => goto2, + _ => unreachable!("must be called on Split instruction, \ + instead it was called on: {:?}", self), + }; + *self = MaybeInst::Split2(half_filled); + } + + fn unwrap(self) -> Inst { + match self { + MaybeInst::Compiled(inst) => inst, + _ => unreachable!("must be called on a compiled instruction, \ + instead it was called on: {:?}", self), + } + } +} + +#[derive(Clone, Debug)] +enum InstHole { + Save { slot: usize }, + EmptyLook { look: EmptyLook }, + Char { c: char }, + Ranges { ranges: Vec<(char, char)> }, + Bytes { start: u8, end: u8 }, +} + +impl InstHole { + fn fill(&self, goto: InstPtr) -> Inst { + match *self { + InstHole::Save { slot } => Inst::Save(InstSave { + goto: goto, + slot: slot, + }), + InstHole::EmptyLook { look } => Inst::EmptyLook(InstEmptyLook { + goto: goto, + look: look, + }), + InstHole::Char { c } => Inst::Char(InstChar { + goto: goto, + c: c, + }), + InstHole::Ranges { ref ranges } => Inst::Ranges(InstRanges { + goto: goto, + ranges: ranges.clone(), + }), + InstHole::Bytes { start, end } => Inst::Bytes(InstBytes { + goto: goto, + start: start, + end: end, + }), + } + } +} + +struct CompileClass<'a, 'b> { + c: &'a mut Compiler, + ranges: &'b [ClassRange], +} + +impl<'a, 'b> CompileClass<'a, 'b> { + fn compile(mut self) -> Result { + let mut holes = vec![]; + let mut initial_entry = None; + let mut last_split = Hole::None; + let mut utf8_seqs = self.c.utf8_seqs.take().unwrap(); + self.c.suffix_cache.clear(); + + for (i, ref range) in self.ranges.iter().enumerate() { + let is_last_range = i + 1 == self.ranges.len(); + utf8_seqs.reset(range.start, range.end); + let mut it = (&mut utf8_seqs).peekable(); + loop { + let utf8_seq = match it.next() { + None => break, + Some(utf8_seq) => utf8_seq, + }; + if is_last_range && it.peek().is_none() { + let Patch { hole, entry } = try!(self.c_utf8_seq(&utf8_seq)); + holes.push(hole); + self.c.fill(last_split, entry); + last_split = Hole::None; + if initial_entry.is_none() { + initial_entry = Some(entry); + } + } else { + if initial_entry.is_none() { + initial_entry = Some(self.c.insts.len()); + } + self.c.fill_to_next(last_split); + last_split = self.c.push_split_hole(); + let Patch { hole, entry } = try!(self.c_utf8_seq(&utf8_seq)); + holes.push(hole); + last_split = self.c.fill_split(last_split, Some(entry), None); + } + } + } + self.c.utf8_seqs = Some(utf8_seqs); + Ok(Patch { + hole: Hole::Many(holes), + entry: initial_entry.unwrap(), + }) + } + + fn c_utf8_seq(&mut self, seq: &Utf8Sequence) -> Result { + if self.c.compiled.is_reverse { + self.c_utf8_seq_(seq) + } else { + self.c_utf8_seq_(seq.into_iter().rev()) + } + } + + fn c_utf8_seq_<'r, I>(&mut self, seq: I) -> Result + where I: IntoIterator<Item=&'r Utf8Range> { + // The initial instruction for each UTF-8 sequence should be the same. + let mut from_inst = ::std::usize::MAX; + let mut last_hole = Hole::None; + for byte_range in seq { + let key = SuffixCacheKey { + from_inst: from_inst, + start: byte_range.start, + end: byte_range.end, + }; + { + let pc = self.c.insts.len(); + if let Some(cached_pc) = self.c.suffix_cache.get(key, pc) { + from_inst = cached_pc; + continue; + } + } + self.c.byte_classes.set_range(byte_range.start, byte_range.end); + if from_inst == ::std::usize::MAX { + last_hole = self.c.push_hole(InstHole::Bytes { + start: byte_range.start, + end: byte_range.end, + }); + } else { + self.c.push_compiled(Inst::Bytes(InstBytes { + goto: from_inst, + start: byte_range.start, + end: byte_range.end, + })); + } + from_inst = self.c.insts.len().checked_sub(1).unwrap(); + assert!(from_inst < ::std::usize::MAX); + } + assert!(from_inst < ::std::usize::MAX); + Ok(Patch { hole: last_hole, entry: from_inst }) + } +} + +/// SuffixCache is a simple bounded hash map for caching suffix entries in +/// UTF-8 automata. For example, consider the Unicode range \u{0}-\u{FFFF}. +/// The set of byte ranges looks like this: +/// +/// [0-7F] +/// [C2-DF][80-BF] +/// [E0][A0-BF][80-BF] +/// [E1-EC][80-BF][80-BF] +/// [ED][80-9F][80-BF] +/// [EE-EF][80-BF][80-BF] +/// +/// Each line above translates to one alternate in the compiled regex program. +/// However, all but one of the alternates end in the same suffix, which is +/// a waste of an instruction. The suffix cache facilitates reusing them across +/// alternates. +/// +/// Note that a HashMap could be trivially used for this, but we don't need its +/// overhead. Some small bounded space (LRU style) is more than enough. +struct SuffixCache { + table: Vec<SuffixCacheEntry>, + // Every time the cache is cleared, we increment the version number instead + // of actually zeroing memory. Since we store a copy of the current version + // in every element, all we need to do is make sure to invalidate any stale + // entries upon access. This saves quite a bit of time! + version: usize, +} + +#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)] +struct SuffixCacheEntry { + key: SuffixCacheKey, + pc: InstPtr, + version: usize, +} + +#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)] +struct SuffixCacheKey { + from_inst: InstPtr, + start: u8, + end: u8, +} + +impl SuffixCache { + fn new(size: usize) -> Self { + SuffixCache { + table: vec![SuffixCacheEntry::default(); size], + version: 0, + } + } + + fn get(&mut self, key: SuffixCacheKey, pc: InstPtr) -> Option<InstPtr> { + let h = self.hash(&key); + let e = self.table[h]; + if e.key == key && e.version == self.version { + Some(e.pc) + } else { + self.table[h] = SuffixCacheEntry { + key: key, + pc: pc, + version: self.version, + }; + None + } + } + + fn clear(&mut self) { + self.version += 1; + } + + fn hash(&self, suffix: &SuffixCacheKey) -> usize { + // Basic FNV-1a hash as described: + // https://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function + const FNV_PRIME: u64 = 1099511628211; + let mut h = 14695981039346656037; + h = (h ^ (suffix.from_inst as u64)).wrapping_mul(FNV_PRIME); + h = (h ^ (suffix.start as u64)).wrapping_mul(FNV_PRIME); + h = (h ^ (suffix.end as u64)).wrapping_mul(FNV_PRIME); + (h as usize) % self.table.len() + } +} + +struct ByteClassSet([bool; 256]); + +impl ByteClassSet { + fn new() -> Self { + ByteClassSet([false; 256]) + } + + fn set_range(&mut self, start: u8, end: u8) { + assert!(start <= end); + if start > 0 { + self.0[start as usize - 1] = true; + } + self.0[end as usize] = true; + } + + fn byte_classes(&self) -> Vec<u8> { + // N.B. If you're debugging the DFA, it's useful to simply return + // `(0..256).collect()`, which effectively removes the byte classes + // and makes the transitions easier to read. + // return (0..256).collect(); + let mut byte_classes = vec![0; 256]; + let mut class = 0u8; + for i in 0..256 { + byte_classes[i] = class; + if self.0[i] { + class = class.checked_add(1).unwrap(); + } + } + byte_classes + } +} + +fn u32_to_usize(n: u32) -> usize { + if (n as u64) > (::std::usize::MAX as u64) { + panic!("BUG: {} is too big to be pointer sized", n) + } + n as usize +} + +#[cfg(test)] +mod tests { + use super::ByteClassSet; + + #[test] + fn byte_classes() { + let mut set = ByteClassSet::new(); + set.set_range(b'a', b'z'); + let classes = set.byte_classes(); + assert_eq!(classes[0], 0); + assert_eq!(classes[1], 0); + assert_eq!(classes[2], 0); + assert_eq!(classes[b'a' as usize - 1], 0); + assert_eq!(classes[b'a' as usize], 1); + assert_eq!(classes[b'm' as usize], 1); + assert_eq!(classes[b'z' as usize], 1); + assert_eq!(classes[b'z' as usize + 1], 2); + assert_eq!(classes[254], 2); + assert_eq!(classes[255], 2); + + let mut set = ByteClassSet::new(); + set.set_range(0, 2); + set.set_range(4, 6); + let classes = set.byte_classes(); + assert_eq!(classes[0], 0); + assert_eq!(classes[1], 0); + assert_eq!(classes[2], 0); + assert_eq!(classes[3], 1); + assert_eq!(classes[4], 2); + assert_eq!(classes[5], 2); + assert_eq!(classes[6], 2); + assert_eq!(classes[7], 3); + assert_eq!(classes[255], 3); + } +} diff --git a/deps/regex-0.1.58/src/dfa.rs b/deps/regex-0.1.58/src/dfa.rs new file mode 100644 index 000000000..738f2fa29 --- /dev/null +++ b/deps/regex-0.1.58/src/dfa.rs @@ -0,0 +1,1293 @@ +// Copyright 2014-2016 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +/*! +The DFA matching engine. + +A DFA provides faster matching because the engine is in exactly one state at +any point in time. In the NFA, there may be multiple active states, and +considerable CPU cycles are spent shuffling them around. In finite automata +speak, the DFA follows epsilon transitions in the regex far less than the NFA. + +A DFA is a classic trade off between time and space. The NFA is slower, but +its memory requirements are typically small and predictable. The DFA is faster, +but given the right regex and the right input, the number of states in the +DFA can grow exponentially. To mitigate this space problem, we do two things: + +1. We implement an *online* DFA. That is, the DFA is constructed from the NFA + during a search. When a new state is computed, it is stored in a cache so + that it may be reused. An important consequence of this implementation + is that states that are never reached for a particular input are never + computed. (This is impossible in an "offline" DFA which needs to compute + all possible states up front.) +2. If the cache gets too big, we wipe it and continue matching. + +In pathological cases, a new state can be created for every byte of input. +(e.g., The regex `(a|b)*a(a|b){20}` on a long sequence of a's and b's.) +In this case, performance regresses to slightly slower than the full NFA +simulation, in large part because the cache becomes useless. (We could +investigate quitting the DFA and falling back to the NFA.) + +N.B. While this implementation is heavily commented, Russ Cox's series of +articles on regexes is strongly recommended: https://swtch.com/~rsc/regexp/ +(As is the DFA implementation in RE2, which heavily influenced this +implementation.) +*/ + +use std::collections::HashMap; +use std::fmt; +use std::mem; + +use exec::Search; +use prog::{Inst, Program}; +use sparse::SparseSet; + +/// The cache limit specifies approximately how much space we're willing to +/// give to the state cache. Once the state cache exceeds the size, it is wiped +/// and all states must be re-computed. +/// +/// Note that this value does not impact correctness. It can be set to 0 and +/// the DFA will run just fine. (It will only ever store exactly one state +/// in the cache, and will likely run very slowly, but it will work.) +/// +/// Also note that this limit is *per thread of execution*. That is, if the +/// same regex is used to search text across multiple threads simultaneously, +/// then the DFA cache is not shared. Instead, copies are made. +/// +/// TODO(burntsushi): This feels like a knob that a caller ought to be able to +/// configure. +const CACHE_LIMIT: usize = 2 * (1<<20); + +/// Return true if and only if the given program can be executed by a DFA. +/// +/// Generally, a DFA is possible only when there are no word boundary +/// assertions. This is due to the difficulty (but likely not impossibility) +/// of tracking multi-byte assertions in the DFA. +pub fn can_exec(insts: &Program) -> bool { + use prog::Inst::*; + use prog::EmptyLook::*; + // If for some reason we manage to allocate a regex program with more + // than 2^32-1 instructions, then we can't execute the DFA because we + // use 32 bit pointers. + if insts.len() > ::std::u32::MAX as usize { + return false; + } + for inst in insts { + match *inst { + Char(_) | Ranges(_) => return false, + EmptyLook(ref inst) => { + match inst.look { + WordBoundary | NotWordBoundary => return false, + // We have a hope of supporting at least these some day. + WordBoundaryAscii | NotWordBoundaryAscii => return false, + StartLine | EndLine | StartText | EndText => {} + } + } + Match(_) | Save(_) | Split(_) | Bytes(_) => {} + } + } + true +} + +/// A reusable cache of DFA states. +/// +/// This cache is reused between multiple invocations of the same regex +/// program. (It is not shared simultaneously between threads. If there is +/// contention, then new caches are created.) +#[derive(Debug)] +pub struct DfaCache { + /// A cache of pre-compiled DFA states, keyed by the set of NFA states + /// and the set of empty-width flags set at the byte in the input when the + /// state was observed. + /// + /// A StatePtr is effectively a `*State`, but to avoid reference counting, + /// we just pass indexes around manually. The performance impact of this + /// isn't particularly clear, but this does enable us to use 32 bit + /// indexes, which can significantly impact the number of states we can + /// cram into our memory bounds. + compiled: HashMap<StateKey, StatePtr>, + /// Our heap of states. Both `DfaCache.compiled` and `State.next` point + /// into this vec. + states: Vec<State>, + /// A set of cached start states, which are limited to the number of + /// permutations of flags set just before the initial byte of input. (The + /// index into this vec is a `Flags`.) + /// + /// N.B. A start state can be "dead" (i.e., no possible match), so we + /// represent it with a StatePtr. + start_states: Vec<StatePtr>, + /// Stack scratch space used to follow epsilon transitions in the NFA. + /// (This permits us to avoid recursion.) + /// + /// The maximum stack size is the number of NFA states. + stack: Vec<InstPtr>, + /// The total number of times this cache has been flushed by the DFA + /// because of space constraints. + cache_flush_count: u64, + /// qcur and qnext are ordered sets with constant time + /// addition/membership/clearing-whole-set and linear time iteration. They + /// are used to manage the sets of NFA states in DFA states when computing + /// cached DFA states. In particular, the order of the NFA states matters + /// for leftmost-first style matching. Namely, when computing a cached + /// state, the set of NFA states stops growing as soon as the first Match + /// instruction is observed. + qcur: SparseSet, + qnext: SparseSet, +} + +/// Dfa encapsulates the actual execution of the DFA. +/// +/// Most of the fields in this struct are mutable pointers to locations in the +/// DFA cache. +/// +/// Why don't we just store the DfaCache directly in this struct? Well, it +/// turns out that we often want to "iterate over {qcur,qnext} and perform +/// some possibly mutable operation." The borrow checker forbids this, even +/// if the callee doesn't mutate {qcur,qnext}. Therefore, we stick most of +/// DfaCache into Dfa directly as pointers and pass {qcur,qnext} around as +/// parameters. +/// +/// N.B. We only use a single lifetime here since all pointers are taken +/// from the same cache. +#[derive(Debug)] +pub struct Dfa<'a, 'b, 'c: 'b, 'm: 'b> { + /// prog contains the NFA instruction opcodes. DFA execution uses either + /// the `dfa` instructions or the `dfa_reverse` instructions from + /// `exec::Executor`. (It never uses `Executor.prog`, which may have + /// Unicode opcodes that cannot be executed by this DFA.) + prog: &'a Program, + /// The start state. We record it here because the pointer may change + /// when the cache is wiped. + start: StatePtr, + /// The search configuration, which includes capture groups. It also + /// includes space for indicating which regex matched if executing a + /// regex set. + search: &'b mut Search<'c, 'm>, + /// The current position in the input. + at: usize, + /// The last state that matched. + /// + /// When no match has occurred, this is set to STATE_UNKNOWN. + last_match_si: StatePtr, + /// The input position of the last cache flush. We use this to determine + /// if we're thrashing in the cache too often. If so, the DFA quits so + /// that we can fall back to the NFA algorithm. + last_cache_flush: usize, + /// These are all from DfaCache. (Only {qcur,qnext} are missing.) + compiled: &'a mut HashMap<StateKey, StatePtr>, + states: &'a mut Vec<State>, + start_states: &'a mut Vec<StatePtr>, + stack: &'a mut Vec<InstPtr>, + cache_flush_count: &'a mut u64, +} + +/// The result of running the DFA. +/// +/// Generally, the result is either a match or not a match, but sometimes the +/// DFA runs too slow because the cache size is too small. In that case, it +/// gives up with the intent of falling back to the NFA algorithm. +pub enum DfaResult { + Match, + NoMatch, + Quit, +} + +impl DfaResult { + pub fn is_match(&self) -> bool { + match *self { + DfaResult::Match => true, + DfaResult::NoMatch | DfaResult::Quit => false, + } + } +} + +/// State is a DFA state. It contains transitions to next states (given an +/// input byte), an ordered set of NFA states (not necessarily complete) and +/// the set of empty-width flags set in the input when this state was created. +/// (It also contains the set of empty-width flags in all of its constituent +/// NFA states, which is useful for determining where and when to try and +/// follow epsilon transitions.) +#[derive(Clone)] +struct State { + /// The set of transitions out of this state to other states. + /// + /// This is tricky and is NOT a simple vec with length 256. A vec with + /// length 256 would work fine if not for the following: + /// + /// 1. Empty assertions can lead to matches "at the boundary" of the input, + /// so it is useful to have one extra transition that corresponds to + /// EOF. So why doesn't a vec with length 257 work? + /// 2. If the vec has length 257 and each StatePtr is 4 bytes (even on 64 + /// bit), then every state occupies at least 1KB on the heap. That's + /// ridiculous. As an optimization, we compute the set of all + /// equivalence classes of bytes in the regex. Each equivalence class + /// is defined to be the set of bytes that are indistinguishable when + /// searching for a match. For example, in the regex `[a-z]`, the byte + /// ranges `0..ord(a)-1`, `ord(a)-ord(z)` and `ord(z)+1..257` all + /// correspond to distinct classes. Therefore, we only need a vec of + /// length *3* for that particular regex, which is quite a bit better. + /// (Equivalence classes are computed during compilation.) + next: Vec<StatePtr>, + /// The set of NFA states in this DFA state, which are computed by + /// following epsilon transitions from `insts[0]`. Note that not all + /// epsilon transitions are necessarily followed! Namely, epsilon + /// transitions that correspond to empty assertions are only followed if + /// the flags set at the current byte satisfy the assertion. + insts: Vec<InstPtr>, + /// Whether this is a match state or not. + is_match: bool, + /// The set of flags implied by the NFA states in `insts`. + /// + /// This never has the match flag set. + inst_flags: Flags, +} + +/// A state's key for identifying it in the cache. In particular, if two +/// state's cache keys are equivalent, then they cannot be discriminatory in +/// a match. +/// +/// We capture two bits of information: an ordered set of NFA states for the +/// DFA state and whether it corresponds to a match state. +#[derive(Clone, Debug, Eq, Hash, PartialEq)] +struct StateKey { + /// An ordered set of NFA states. + insts: Vec<InstPtr>, + /// Whether this is a matching state or not. + is_match: bool, +} + +/// InstPtr is a 32 bit pointer into a sequence of opcodes (i.e., it indexes +/// an NFA state). +/// +/// Throughout this library, this is usually set to `usize`, but we force a +/// `u32` here to save on space. +type InstPtr = u32; + +/// StatePtr is a 32 bit pointer into a sequence of states. +/// +/// It has two special values: STATE_UNKNOWN and STATE_DEAD. All other values +/// are valid indexes into a cache's state sequence. +/// +/// (We use sentinel values here to save on space. A more sensible +/// representation is a sum type.) +type StatePtr = u32; + +/// An unknown state means that the state has not been computed yet, and that +/// the only way to progress is to compute it. +const STATE_UNKNOWN: StatePtr = 0; + +/// A dead state means that the state has been computed and it is known that +/// once it is entered, no match can ever occur. +const STATE_DEAD: StatePtr = 1; + +/// Byte is a u8 in spirit, but a u16 in practice so that we can represent the +/// special EOF sentinel value. +#[derive(Copy, Clone, Debug)] +struct Byte(u16); + +/// A set of flags. All flags correspond to empty assertions (either in the +/// input or in the opcodes) except for one: the match flag. +#[derive(Clone, Copy, Eq, Hash, PartialEq)] +struct Flags(u8); + +impl DfaCache { + /// Create new empty cache for the DFA engine. + pub fn new() -> Self { + DfaCache { + compiled: HashMap::new(), + states: vec![State::invalid(), State::invalid()], + start_states: vec![STATE_UNKNOWN; 256], + stack: vec![], + cache_flush_count: 0, + qcur: SparseSet::new(0), + qnext: SparseSet::new(0), + } + } + + /// Resizes ensures that the cache is the right size for the given program. + /// + /// N.B. This exists because it is inconvenient (i.e., my failing) to tie + /// the initial creation of the cache with knowledge about the program, so + /// we resize it once. + fn resize(&mut self, num_insts: usize) { + if num_insts == self.qcur.capacity() { + return; + } + self.qcur = SparseSet::new(num_insts); + self.qnext = SparseSet::new(num_insts); + } +} + +impl<'a, 'b, 'c, 'm> Dfa<'a, 'b, 'c, 'm> { + /// The main entry point to executing a DFA, which returns the *end* of + /// a match if one exists, using Perl's "leftmost-first" semantics. + /// + /// text can safely be arbitrary bytes, and the location returned is still + /// guaranteed to correspond to a valid UTF-8 sequence boundary. (Note + /// though that whether arbitrary bytes are actually consumed depends on + /// the given program.) + /// + /// at is the position in text at which to start looking for a match. While + /// it may seem like we should omit `at` and just rely on the caller to + /// slice `text` appropriately, it is necessary to tell whether `at` is + /// at the beginning of `text` or not (i.e., for empty assertions). + pub fn exec( + prog: &'a Program, + search: &'b mut Search<'c, 'm>, + text: &[u8], + at: usize, + ) -> DfaResult { + // Retrieve our DFA cache from the program. If another thread tries to + // execute this DFA *simultaneously*, then a new independent cache is + // created. + let mut _cache = prog.cache_dfa(); + let mut cache = &mut **_cache; + cache.resize(prog.len()); + + let mut dfa = Dfa { + prog: prog, + start: 0, // filled in below + search: search, + at: at, + last_match_si: STATE_UNKNOWN, + last_cache_flush: at, + compiled: &mut cache.compiled, + states: &mut cache.states, + start_states: &mut cache.start_states, + stack: &mut cache.stack, + cache_flush_count: &mut cache.cache_flush_count, + }; + dfa.start = match dfa.start_state(&mut cache.qcur, text) { + None => return DfaResult::Quit, + Some(STATE_DEAD) => return DfaResult::NoMatch, + Some(si) => si, + }; + debug_assert!(dfa.start != STATE_UNKNOWN); + let result = if prog.is_reverse { + dfa.exec_at_reverse(&mut cache.qcur, &mut cache.qnext, text) + } else { + dfa.exec_at(&mut cache.qcur, &mut cache.qnext, text) + }; + if result.is_match() { + if dfa.search.find_one_match() { + dfa.search.set_match(0); + } else { + debug_assert!(dfa.last_match_si != STATE_UNKNOWN); + debug_assert!(dfa.last_match_si != STATE_DEAD); + for &ip in &dfa.states[dfa.last_match_si as usize].insts { + if let Inst::Match(slot) = dfa.prog[ip as usize] { + dfa.search.set_match(slot); + } + } + } + } + result + } + + /// Executes the DFA on a forward NFA. + /// + /// {qcur,qnext} are scratch ordered sets which may be non-empty. + fn exec_at( + &mut self, + qcur: &mut SparseSet, + qnext: &mut SparseSet, + text: &[u8], + ) -> DfaResult { + // For the most part, the DFA is basically: + // + // last_match = null + // while current_byte != EOF: + // si = current_state.next[current_byte] + // if si is match + // last_match = si + // return last_match + // + // However, we need to deal with a few things: + // + // 1. This is an *online* DFA, so the current state's next list + // may not point to anywhere yet, so we must go out and compute + // them. (They are then cached into the current state's next list + // to avoid re-computation.) + // 2. If we come across a state that is known to be dead (i.e., never + // leads to a match), then we can quit early. + // 3. If the caller just wants to know if a match occurs, then we + // can quit as soon as we know we have a match. (Full leftmost + // first semantics require continuing on.) + // 4. If we're in the start state, then we can use a pre-computed set + // of prefix literals to skip quickly along the input. + // 5. After the input is exhausted, we run the DFA on one symbol + // that stands for EOF. This is useful for handling empty width + // assertions. + // 6. We can't actually do state.next[byte]. Instead, we have to do + // state.next[byte_classes[byte]], which permits us to keep the + // 'next' list very small. + debug_assert!(!self.prog.is_reverse); + + // The last match is the currently known ending match position. It is + // reported as an index to the most recent byte that resulted in a + // transition to a match state and is always stored in capture slot `1` + // when searching forwards. Its maximum value is `text.len()`, + // which can only happen after the special EOF sentinel value is fed + // to the DFA. + let (mut si, mut result) = (self.start, DfaResult::NoMatch); + while self.at < text.len() { + // Our set of literal prefixes can itself be a DFA, but it is + // offline and can generally be quite a bit faster. (For instance, + // memchr is used if possible.) + if !self.prog.prefixes.is_empty() && si == self.start { + self.at = match self.prefix_at(text, self.at) { + None => return DfaResult::NoMatch, + Some(i) => i, + }; + } + + // The following logic is essentially what `self.next_state` does, + // but we inline it manually here to avoid the extra branch and + // also because we know we have a real `u8` (not a `Byte`, which + // may be the special EOF sentinel value). + let cls = self.prog.byte_classes[text[self.at] as usize]; + let mut next_si = self.states[si as usize].next[cls as usize]; + if next_si <= STATE_DEAD { + if next_si == STATE_DEAD { + return result; + } + // The next state may not have been cached, so re-compute it + // (i.e., follow epsilon transitions). + let b = Byte::byte(text[self.at]); + next_si = match self.exec_byte(qcur, qnext, si, b) { + None => return DfaResult::Quit, + Some(next_si) => next_si, + }; + debug_assert!(next_si != STATE_UNKNOWN); + if next_si == STATE_DEAD { + return result; + } + } + si = next_si; + if self.states[si as usize].is_match { + self.last_match_si = si; + if self.search.quit_after_first_match() { + return DfaResult::Match; + } + result = DfaResult::Match; + self.search.set_end(Some(self.at)); + } + self.at += 1; + } + // Run the DFA once more on the special EOF senitnel value. + si = match self.next_state(qcur, qnext, si, Byte::eof()) { + None => return DfaResult::Quit, + Some(si) => si, + }; + debug_assert!(si != STATE_UNKNOWN); + if si == STATE_DEAD { + return result; + } + if self.states[si as usize].is_match { + self.last_match_si = si; + if self.search.quit_after_first_match() { + return DfaResult::Match; + } + result = DfaResult::Match; + self.search.set_end(Some(text.len())); + } + result + } + + /// Executes the DFA on a reverse NFA. + fn exec_at_reverse( + &mut self, + qcur: &mut SparseSet, + qnext: &mut SparseSet, + text: &[u8], + ) -> DfaResult { + // The comments in `exec_at` above mostly apply here too. The main + // difference is that we move backwards over the input and we look for + // the longest possible match instead of the leftmost-first match. + // + // N.B. The code duplication here is regrettable. Efforts to improve + // it without sacrificing performance are welcome. ---AG + debug_assert!(self.prog.is_reverse); + let (mut si, mut result) = (self.start, DfaResult::NoMatch); + while self.at > 0 { + self.at -= 1; + + let cls = self.prog.byte_classes[text[self.at] as usize]; + let mut next_si = self.states[si as usize].next[cls as usize]; + if next_si <= STATE_DEAD { + if next_si == STATE_DEAD { + return result; + } + // The next state may not have been cached, so re-compute it + // (i.e., follow epsilon transitions). + let b = Byte::byte(text[self.at]); + next_si = match self.exec_byte(qcur, qnext, si, b) { + None => return DfaResult::Quit, + Some(next_si) => next_si, + }; + debug_assert!(next_si != STATE_UNKNOWN); + if next_si == STATE_DEAD { + return result; + } + } + si = next_si; + if self.states[si as usize].is_match { + self.last_match_si = si; + if self.search.quit_after_first_match() { + return DfaResult::NoMatch; + } + result = DfaResult::Match; + self.search.set_start(Some(self.at+1)); + } + } + // Run the DFA once more on the special EOF senitnel value. + si = match self.next_state(qcur, qnext, si, Byte::eof()) { + None => return DfaResult::Quit, + Some(si) => si, + }; + debug_assert!(si != STATE_UNKNOWN); + if si == STATE_DEAD { + return result; + } + if self.states[si as usize].is_match { + self.last_match_si = si; + if self.search.quit_after_first_match() { + return DfaResult::Match; + } + result = DfaResult::Match; + self.search.set_start(Some(0)); + } + result + } + + /// Computes the next state given the current state and the current input + /// byte (which may be EOF). + /// + /// If STATE_DEAD is returned, then there is no valid state transition. + /// This implies that no permutation of future input can lead to a match + /// state. + /// + /// STATE_UNKNOWN can never be returned. + fn exec_byte( + &mut self, + qcur: &mut SparseSet, + qnext: &mut SparseSet, + mut si: StatePtr, + b: Byte, + ) -> Option<StatePtr> { + use prog::Inst::*; + + // Initialize a queue with the current DFA state's NFA states. + qcur.clear(); + for &ip in &self.states[si as usize].insts { + qcur.add(ip as usize); + } + + // Before inspecting the current byte, we may need to also inspect + // whether the position immediately preceding the current byte + // satisfies the empty assertions found in the current state. + // + // We only need to do this step if there are any empty assertions in + // the current state. + if self.states[si as usize].inst_flags.has_non_match_flags() { + // Compute the flags immediately preceding the current byte. + // This means we only care about the "end" or "end line" flags. + // (The "start" flags are computed immediately proceding the + // current byte and is handled below.) + let mut flags = Flags::new(); + if b.is_eof() { + flags.set_end(true).set_end_line(true); + } else if b.as_byte().map_or(false, |b| b == b'\n') { + flags.set_end_line(true); + } + // Now follow epsilon transitions from every NFA state, but make + // sure we only follow transitions that satisfy our flags. + qnext.clear(); + for &ip in &*qcur { + self.follow_epsilons(usize_to_u32(ip), qnext, flags); + } + mem::swap(qcur, qnext); + } + + // Now we set flags for immediately after the current byte. Since start + // states are processed separately, and are the only states that can + // have the StartText flag set, we therefore only need to worry about + // the StartLine flag here. + // + // We do also keep track of whether this DFA state contains a NFA state + // that is a matching state. This is precisely how we delay the DFA + // matching by one byte in order to process the special EOF sentinel + // byte. Namely, if this DFA state containing a matching NFA state, + // then it is the *next* DFA state that is marked as a match. + let mut flags = Flags::new(); + let mut is_match = false; + if b.as_byte().map_or(false, |b| b == b'\n') { + flags.set_start_line(true); + } + // Now follow all epsilon transitions again, but only after consuming + // the current byte. + qnext.clear(); + for &ip in &*qcur { + match self.prog[ip as usize] { + // These states never happen in a byte-based program. + Char(_) | Ranges(_) => unreachable!(), + // These states are handled when following epsilon transitions. + Save(_) | Split(_) | EmptyLook(_) => {} + Match(_) => { + is_match = true; + if !self.continue_past_first_match() { + break; + } else if !self.search.find_one_match() + && !qnext.contains_ip(ip as usize) { + // If we are continuing on to find other matches, + // then keep a record of the match states we've seen. + qnext.add(ip); + // BREADCRUMBS: + // Perhaps we need another sparse set here and track + // these "recorded" matches separately. They should + // still make their way into cached states, but perhaps + // they shouldn't prevent a DEAD state from + // occurring. + } + } + Bytes(ref inst) => { + if b.as_byte().map_or(false, |b| inst.matches(b)) { + self.follow_epsilons( + inst.goto as InstPtr, qnext, flags); + } + } + } + } + let mut cache = true; + if b.is_eof() && !self.search.find_one_match() { + // If we're processing the last byte of the input and we're + // matching a regex set, then make the next state contain the + // previous states transitions. We do this so that the main + // matching loop can extract all of the match instructions. + mem::swap(qcur, qnext); + // And don't cache this state because it's totally bunk. + cache = false; + } + // We've now built up the set of NFA states that ought to comprise the + // next DFA state, so try to find it in the cache, and if it doesn't + // exist, cache it. + // + // N.B. We pass `&mut si` here because the cache may clear itself if + // it has gotten too full. When that happens, the location of the + // current state may change. + let next = match self.cached_state(qnext, is_match, Some(&mut si)) { + None => return None, + Some(next) => next, + }; + debug_assert!(next != STATE_UNKNOWN); + // And now store our state in the current state's next list. + let cls = self.byte_class(b); + if cache { + self.states[si as usize].next[cls] = next; + } + Some(next) + } + + /// Follows the epsilon transitions starting at (and including) `ip`. The + /// resulting states are inserted into the ordered set `q`. + /// + /// Conditional epsilon transitions (i.e., empty width assertions) are only + /// followed if they are satisfied by the given flags, which should + /// represent the flags set at the current location in the input. + /// + /// If the current location corresponds to the empty string, then only the + /// end line and/or end text flags may be set. If the current location + /// corresponds to a real byte in the input, then only the start line + /// and/or start text flags may be set. + /// + /// As an exception to the above, when finding the initial state, any of + /// the above flags may be set: + /// + /// If matching starts at the beginning of the input, then start text and + /// start line should be set. If the input is empty, then end text and end + /// line should also be set. + /// + /// If matching starts after the beginning of the input, then only start + /// line should be set if the preceding byte is `\n`. End line should never + /// be set in this case. (Even if the proceding byte is a `\n`, it will + /// be handled in a subsequent DFA state.) + fn follow_epsilons( + &mut self, + ip: InstPtr, + q: &mut SparseSet, + flags: Flags, + ) { + use prog::Inst::*; + use prog::EmptyLook::*; + + // We need to traverse the NFA to follow epsilon transitions, so avoid + // recursion with an explicit stack. + self.stack.push(ip); + while let Some(ip) = self.stack.pop() { + // Don't visit states we've already added. + if q.contains_ip(ip as usize) { + continue; + } + q.add(ip as usize); + match self.prog[ip as usize] { + Char(_) | Ranges(_) => unreachable!(), + Match(_) | Bytes(_) => {} + EmptyLook(ref inst) => { + // Only follow empty assertion states if our flags satisfy + // the assertion. + match inst.look { + StartLine if flags.is_start_line() => { + self.stack.push(inst.goto as InstPtr); + } + EndLine if flags.is_end_line() => { + self.stack.push(inst.goto as InstPtr); + } + StartText if flags.is_start() => { + self.stack.push(inst.goto as InstPtr); + } + EndText if flags.is_end() => { + self.stack.push(inst.goto as InstPtr); + } + StartLine | EndLine | StartText | EndText => {} + // The DFA doesn't support word boundaries. :-( + WordBoundary + | NotWordBoundary + | WordBoundaryAscii + | NotWordBoundaryAscii => unreachable!(), + } + } + Save(ref inst) => self.stack.push(inst.goto as InstPtr), + Split(ref inst) => { + self.stack.push(inst.goto2 as InstPtr); + self.stack.push(inst.goto1 as InstPtr); + } + } + } + } + + /// Find a previously computed state matching the given set of instructions + /// and is_match bool. + /// + /// The given set of instructions should represent a single state in the + /// NFA along with all states reachable without consuming any input. + /// + /// The is_match bool should be true if and only if the preceding DFA state + /// contains an NFA matching state. The cached state produced here will + /// then signify a match. (This enables us to delay a match by one byte, + /// in order to account for the EOF sentinel byte.) + /// + /// If the cache is full, then it is wiped before caching a new state. + /// + /// The current state should be specified if it exists, since it will need + /// to be preserved if the cache clears itself. (Start states are + /// always saved, so they should not be passed here.) It takes a mutable + /// pointer to the index because if the cache is cleared, the state's + /// location may change. + fn cached_state( + &mut self, + q: &SparseSet, + is_match: bool, + current_state: Option<&mut StatePtr>, + ) -> Option<StatePtr> { + // If we couldn't come up with a non-empty key to represent this state, + // then it is dead and can never lead to a match. + // + // Note that inst_flags represent the set of empty width assertions + // in q. We use this as an optimization in exec_byte to determine when + // we should follow epsilon transitions at the empty string preceding + // the current byte. + let (key, inst_flags) = match self.cached_state_key(q, is_match) { + None => return Some(STATE_DEAD), + Some(v) => v, + }; + // In the cache? Cool. Done. + if let Some(&si) = self.compiled.get(&key) { + return Some(si); + } + + // If the cache has gotten too big, wipe it. + if self.approximate_size() > CACHE_LIMIT { + if !self.clear_cache_and_save(current_state) { + // Ooops. DFA is giving up. + return None; + } + } + + // OK, now there's enough room to push our new state. + // We do this even if the cache size is set to 0! + let next = vec![STATE_UNKNOWN; self.num_byte_classes()]; + self.states.push(State { + next: next, + insts: key.insts.clone(), + is_match: is_match, + inst_flags: inst_flags, + }); + let si = usize_to_u32(self.states.len().checked_sub(1).unwrap()); + self.compiled.insert(key, si); + Some(si) + } + + /// Produces a key suitable for describing a state in the DFA cache. + /// + /// The key invariant here is that equivalent keys are produced for any two + /// sets of ordered NFA states (and toggling of whether the previous NFA + /// states contain a match state) that do not discriminate a match for any + /// input. + /// + /// Specifically, q should be an ordered set of NFA states and is_match + /// should be true if and only if the previous NFA states contained a match + /// state. + fn cached_state_key( + &mut self, + q: &SparseSet, + is_match: bool, + ) -> Option<(StateKey, Flags)> { + use prog::Inst::*; + use prog::EmptyLook::*; + + // We need to build up enough information to recognize pre-built states + // in the DFA. Generally speaking, this includes every instruction + // except for those which are purely epsilon transitions, e.g., the + // Save and Split instructions. + // + // Empty width assertions are also epsilon transitions, but since they + // are conditional, we need to make them part of a state's key in the + // cache. + let mut inst_flags = Flags::new(); + let mut insts = vec![]; + for &ip in q { + let ip = usize_to_u32(ip); + match self.prog[ip as usize] { + Char(_) | Ranges(_) => unreachable!(), + Save(_) => {} + Split(_) => {} + Bytes(_) => insts.push(ip), + EmptyLook(ref inst) => { + match inst.look { + StartLine => { + inst_flags.set_start_line(true); + insts.push(ip); + } + EndLine => { + inst_flags.set_end_line(true); + insts.push(ip); + } + StartText => { + inst_flags.set_start(true); + insts.push(ip); + } + EndText => { + inst_flags.set_end(true); + insts.push(ip); + } + WordBoundary + | NotWordBoundary + | WordBoundaryAscii + | NotWordBoundaryAscii => unreachable!(), + } + } + Match(_) => { + insts.push(ip); + if !self.continue_past_first_match() { + break; + } + } + } + } + // If we couldn't transition to any other instructions and we didn't + // see a match when expanding NFA states previously, then this is a + // dead state and no amount of additional input can transition out + // of this state. + if insts.len() == 0 && !is_match { + None + } else { + let key = StateKey { insts: insts, is_match: is_match }; + Some((key, inst_flags)) + } + } + + /// Clears the cache, but saves and restores current_state if it is not + /// none. + /// + /// The current state must be provided here in case its location in the + /// cache changes. + /// + /// This returns false if the cache is not cleared and the DFA should + /// give up. + fn clear_cache_and_save( + &mut self, + current_state: Option<&mut StatePtr>, + ) -> bool { + if self.states.len() <= 2 { + // Why <= 2? Well, the states list always has its first two + // positions filled by marker states for STATE_UNKNOWN and + // STATE_DEAD. These states aren't actually used, but exist to + // make sure no other state lives in those locations. Therefore, + // a state vec with length <= 2 is actually "empty." + return true; + } + match current_state { + None => self.clear_cache(), + Some(si) => { + let cur = self.copy_state(*si); + if !self.clear_cache() { + return false; + } + *si = self.restore_state(cur); + true + } + } + } + + /// Wipes the state cache, but saves and restores the current start state. + /// + /// This returns false if the cache is not cleared and the DFA should + /// give up. + fn clear_cache(&mut self) -> bool { + // Bail out of the DFA if we're moving too "slowly." + // A heuristic from RE2: assume the DFA is too slow if it is processing + // 10 or fewer bytes per state. + // Additionally, we permit the cache to be flushed a few times before + // caling it quits. + if *self.cache_flush_count >= 3 + && self.at >= self.last_cache_flush + && (self.at - self.last_cache_flush) <= 10 * self.states.len() { + return false; + } + // Update statistics tracking cache flushes. + self.last_cache_flush = self.at; + *self.cache_flush_count += 1; + + // OK, actually flush the cache. + let start = self.copy_state(self.start); + self.states.clear(); + self.compiled.clear(); + for start in self.start_states.iter_mut() { + *start = STATE_UNKNOWN; + } + self.states.push(State::invalid()); + self.states.push(State::invalid()); + self.start = self.restore_state(start); + true + } + + /// Returns a fresh copy of state si with all of its next pointers set to + /// unknown. + fn copy_state(&self, si: StatePtr) -> State { + let mut state = self.states[si as usize].clone(); + // Make sure to erase any pointers from this state, so that + // they are forced to be re-computed. + state.next = vec![STATE_UNKNOWN; self.num_byte_classes()]; + state + } + + /// Restores the given state back into the cache, and returns a pointer + /// to it. + fn restore_state(&mut self, state: State) -> StatePtr { + let key = StateKey { + insts: state.insts.clone(), + is_match: state.is_match, + }; + if let Some(&si) = self.compiled.get(&key) { + return si; + } + let si = usize_to_u32(self.states.len()); + self.states.push(state); + self.compiled.insert(key, si); + si + } + + /// Returns the next state given the current state si and current byte + /// b. {qcur,qnext} are used as scratch space for storing ordered NFA + /// states. + /// + /// This tries to fetch the next state from the cache, but if that fails, + /// it computes the next state, caches it and returns a pointer to it. + /// + /// The pointer can be to a real state, or it can be STATE_DEAD. + /// STATE_UNKNOWN cannot be returned. + /// + /// None is returned if a new state could not be allocated (i.e., the DFA + /// ran out of space and thinks it's running too slowly). + fn next_state( + &mut self, + qcur: &mut SparseSet, + qnext: &mut SparseSet, + si: StatePtr, + b: Byte, + ) -> Option<StatePtr> { + let cls = self.byte_class(b); + match self.states[si as usize].next[cls] { + STATE_UNKNOWN => self.exec_byte(qcur, qnext, si, b), + STATE_DEAD => return Some(STATE_DEAD), + nsi => return Some(nsi), + } + } + + /// Computes and returns the start state, where searching begins at + /// position `at` in `text`. If the state has already been computed, + /// then it is pulled from the cache. If the state hasn't been cached, + /// then it is computed, cached and a pointer to it is returned. + /// + /// This may return STATE_DEAD but never STATE_UNKNOWN. + fn start_state( + &mut self, + q: &mut SparseSet, + text: &[u8], + ) -> Option<StatePtr> { + let start_flags = if self.prog.is_reverse { + self.start_flags_reverse(text, self.at) + } else { + self.start_flags(text, self.at) + }; + let flagi = start_flags.0 as usize; + match self.start_states[flagi] { + STATE_UNKNOWN => {} + STATE_DEAD => return Some(STATE_DEAD), + si => return Some(si), + } + q.clear(); + self.follow_epsilons(0, q, start_flags); + // Start states can never be match states because we delay every match + // by one byte. Given an empty string and an empty match, the match + // won't actually occur until the DFA processes the special EOF + // sentinel byte. + let sp = match self.cached_state(q, false, None) { + None => return None, + Some(sp) => sp, + }; + self.start_states[flagi] = sp; + Some(sp) + } + + /// Computes the set of starting flags for the given position in text. + /// + /// This should only be used when executing the DFA forwards over the + /// input. + fn start_flags(&self, text: &[u8], at: usize) -> Flags { + let mut flags = Flags::new(); + flags.set_start(at == 0).set_end(text.len() == 0); + flags.set_start_line(at == 0 || text[at - 1] == b'\n'); + flags.set_end_line(text.len() == 0); + flags + } + + /// Computes the set of starting flags for the given position in text. + /// + /// This should only be used when executing the DFA in reverse over the + /// input. + fn start_flags_reverse(&self, text: &[u8], at: usize) -> Flags { + let mut flags = Flags::new(); + flags.set_start(at == text.len()).set_end(text.len() == 0); + flags.set_start_line(at == text.len() || text[at] == b'\n'); + flags.set_end_line(text.len() == 0); + flags + } + + /// Quickly finds the next occurrence of any literal prefixes in the regex. + /// If there are no literal prefixes, then the current position is + /// returned. If there are literal prefixes and one could not be found, + /// then None is returned. + /// + /// This should only be called when the DFA is in a start state. + fn prefix_at(&self, text: &[u8], at: usize) -> Option<usize> { + self.prog.prefixes.find(&text[at..]).map(|(s, _)| at + s) + } + + /// Returns the number of byte classes required to discriminate transitions + /// in each state. + /// + /// invariant: num_byte_classes() == len(State.next) + fn num_byte_classes(&self) -> usize { + // We add 1 to account for the special EOF byte. + (self.prog.byte_classes[255] as usize + 1) + 1 + } + + /// Given an input byte or the special EOF sentinel, return its + /// corresponding byte class. + fn byte_class(&self, b: Byte) -> usize { + if b.is_eof() { + self.num_byte_classes() - 1 + } else { + self.prog.byte_classes[b.0 as usize] as usize + } + } + + /// Returns true if the DFA should continue searching past the first match. + /// + /// Leftmost first semantics in the DFA are preserved by not following NFA + /// transitions after the first match is seen. + /// + /// On occasion, we want to avoid leftmost first semantics to find either + /// the longest match (for reverse search) or all possible matches (for + /// regex sets). + fn continue_past_first_match(&self) -> bool { + self.prog.is_reverse || !self.search.find_one_match() + } + + /// Approximate size returns the approximate heap space currently used by + /// the DFA. It is used to determine whether the DFA's state cache needs to + /// be wiped. Namely, it is possible that for certain regexes on certain + /// inputs, a new state could be created for every byte of input. (This is + /// bad for memory use, so we bound it with a cache.) + /// + /// The approximation is guaranteed to be done in constant time (and + /// indeed, this requirement is why it's approximate). + fn approximate_size(&self) -> usize { + use std::mem::size_of as size; + // Estimate that there are about 32 instructions per state consuming + // 128 = 32 * 4 bytes of space. (This is hopefully a blatant + // overestimate.) + let compiled = + (self.compiled.len() * (size::<StateKey>() + 128)) + + (self.compiled.len() * size::<StatePtr>()); + let states = + self.states.len() + * (size::<State>() + + 128 + + (self.num_byte_classes() * size::<StatePtr>())); + let start_states = self.start_states.len() * size::<StatePtr>(); + self.prog.approximate_size() + compiled + states + start_states + } +} + +impl State { + /// Return an invalid state. This is only used to "pad" the state cache so + /// that the special sentinel values (STATE_UNKNOWN and STATE_DEAD) are + /// never used. + fn invalid() -> State { + State { + next: vec![], + insts: vec![], + is_match: false, + inst_flags: Flags::new(), + } + } +} + +impl Flags { + #[inline] + fn new() -> Self { + Flags(0) + } + + #[inline] + fn has_non_match_flags(&self) -> bool { + self.0 & 0b0_1111111 > 0 + } + + #[inline] + fn set(&mut self, yes: bool, bit: u8) { + if yes { + self.0 = self.0 | bit; + } else { + self.0 = self.0 & !bit; + } + } + + #[inline] + fn is_start(&self) -> bool { self.0 & 0b0_1_000000 > 0 } + + #[inline] + fn set_start(&mut self, yes: bool) -> &mut Self { + self.set(yes, 0b0_1_000000); + self + } + + #[inline] + fn is_end(&self) -> bool { self.0 & 0b00_1_00000 > 0 } + + #[inline] + fn set_end(&mut self, yes: bool) -> &mut Self { + self.set(yes, 0b00_1_00000); + self + } + + #[inline] + fn is_start_line(&self) -> bool { self.0 & 0b000_1_0000 > 0 } + + #[inline] + fn set_start_line(&mut self, yes: bool) -> &mut Self { + self.set(yes, 0b000_1_0000); + self + } + + #[inline] + fn is_end_line(&self) -> bool { self.0 & 0b0000_1_000 > 0 } + + #[inline] + fn set_end_line(&mut self, yes: bool) -> &mut Self { + self.set(yes, 0b0000_1_000); + self + } +} + +impl Byte { + #[inline] fn byte(b: u8) -> Self { Byte(b as u16) } + #[inline] fn eof() -> Self { Byte(256) } + #[inline] fn is_eof(&self) -> bool { self.0 == 256 } + + #[inline] + fn as_byte(&self) -> Option<u8> { + if self.is_eof() { + None + } else { + Some(self.0 as u8) + } + } +} + +impl fmt::Debug for State { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + let mut next = vec![]; + for (b, next_sp) in self.next.iter().enumerate() { + match *next_sp { + STATE_UNKNOWN => {} + STATE_DEAD => next.push((vb(b as usize), "DEAD".to_string())), + si => next.push((vb(b as usize), si.to_string())), + } + } + f.debug_struct("State") + .field("is_match", &self.is_match) + .field("insts", &self.insts) + .field("next", &next) + .finish() + } +} + +impl fmt::Debug for Flags { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + f.debug_struct("Flags") + .field("start", &if self.is_start() { 1 } else { 0 }) + .field("end", &if self.is_end() { 1 } else { 0 }) + .field("start_line", &if self.is_start_line() { 1 } else { 0 }) + .field("end_line", &if self.is_end_line() { 1 } else { 0 }) + .finish() + } +} + +/// Helper function for formatting a byte as a nice-to-read escaped string. +fn vb(b: usize) -> String { + use std::ascii::escape_default; + + if b > ::std::u8::MAX as usize { + "EOF".to_owned() + } else { + let escaped = escape_default(b as u8).collect::<Vec<u8>>(); + String::from_utf8_lossy(&escaped).into_owned() + } +} + +fn usize_to_u32(n: usize) -> u32 { + if (n as u64) > (::std::u32::MAX as u64) { + panic!("BUG: {} is too big to fit into u32", n) + } + n as u32 +} diff --git a/deps/regex-0.1.58/src/error.rs b/deps/regex-0.1.58/src/error.rs new file mode 100644 index 000000000..8e1cbaaa2 --- /dev/null +++ b/deps/regex-0.1.58/src/error.rs @@ -0,0 +1,74 @@ +// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +use std::fmt; + +use syntax; + +/// An error that occurred during parsing or compiling a regular expression. +#[derive(Debug)] +pub enum Error { + /// A syntax error. + Syntax(syntax::Error), + /// The compiled program exceeded the set size limit. + /// The argument is the size limit imposed. + CompiledTooBig(usize), + /// An invalid set is a regex set with fewer than 2 regular expressions. + InvalidSet, + /// Hints that destructuring should not be exhaustive. + /// + /// This enum may grow additional variants, so this makes sure clients + /// don't count on exhaustive matching. (Otherwise, adding a new variant + /// could break existing code.) + #[doc(hidden)] + __Nonexhaustive, +} + +impl ::std::error::Error for Error { + fn description(&self) -> &str { + match *self { + Error::Syntax(ref err) => err.description(), + Error::CompiledTooBig(_) => "compiled program too big", + Error::InvalidSet => { + "sets must contain 2 or more regular expressions" + } + Error::__Nonexhaustive => unreachable!(), + } + } + + fn cause(&self) -> Option<&::std::error::Error> { + match *self { + Error::Syntax(ref err) => Some(err), + _ => None, + } + } +} + +impl fmt::Display for Error { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + match *self { + Error::Syntax(ref err) => err.fmt(f), + Error::CompiledTooBig(limit) => { + write!(f, "Compiled regex exceeds size limit of {} bytes.", + limit) + } + Error::InvalidSet => { + write!(f, "Sets must contain 2 or more regular expressions.") + } + Error::__Nonexhaustive => unreachable!(), + } + } +} + +impl From<syntax::Error> for Error { + fn from(err: syntax::Error) -> Error { + Error::Syntax(err) + } +} diff --git a/deps/regex-0.1.58/src/exec.rs b/deps/regex-0.1.58/src/exec.rs new file mode 100644 index 000000000..b436a9f92 --- /dev/null +++ b/deps/regex-0.1.58/src/exec.rs @@ -0,0 +1,570 @@ +// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +use std::collections::HashMap; +use std::sync::Arc; + +use syntax; + +use backtrack::{self, Backtrack}; +use compile::Compiler; +use dfa::{self, Dfa, DfaResult}; +use error::Error; +use input::{ByteInput, CharInput}; +use literals::Literals; +use nfa::Nfa; +use prog::{Program, InstPtr}; +use re_bytes; +use re_unicode; + +pub type CaptureSlots<'a> = &'a mut [CaptureSlot]; + +pub type CaptureSlot = Option<usize>; + +/// The parameters to running a regex search over some text. +#[derive(Debug)] +pub struct Search<'caps, 'matches> { + /// The matching engine writes capture locations to this slice. + /// + /// Note that some matching engines, like the DFA, have limited support + /// for this. The DFA can only fill in one capture location (the end + /// location of the match). + pub captures: CaptureSlots<'caps>, + /// The matching engine indicates which match instructions were executed + /// when searching stopped. + /// + /// In standard searches, there is exactly one value in this slice and it + /// should be initialized to `false`. When executing sets of regexes, + /// there should be a location for each regex. + matches: &'matches mut [bool], + /// Whether the matching engine has recorded any match. + matched_any: bool, +} + +impl<'caps, 'matches> Search<'caps, 'matches> { + pub fn new( + captures: CaptureSlots<'caps>, + matches: &'matches mut [bool], + ) -> Search<'caps, 'matches> { + Search { + captures: captures, + matches: matches, + matched_any: false, + } + } + + pub fn quit_after_first_match(&self) -> bool { + self.captures.is_empty() && self.matches.len() <= 1 + } + + pub fn find_many_matches(&self) -> bool { + self.matches.len() > 1 + } + + pub fn find_one_match(&self) -> bool { + self.matches.len() == 1 + } + + pub fn matched_all(&self) -> bool { + self.matches.iter().all(|m| *m) + } + + pub fn set_match(&mut self, match_slot: usize) { + self.matched_any = true; + if let Some(old) = self.matches.get_mut(match_slot) { + *old = true; + } + } + + pub fn capture(&self, i: usize) -> Option<CaptureSlot> { + self.captures.get(i).map(|&slot| slot) + } + + pub fn set_start(&mut self, slot: CaptureSlot) { + self.set_capture(0, slot); + } + + pub fn set_end(&mut self, slot: CaptureSlot) { + self.set_capture(1, slot); + } + + pub fn set_capture(&mut self, i: usize, slot: CaptureSlot) { + if let Some(old_slot) = self.captures.get_mut(i) { + *old_slot = slot; + } + } + + pub fn copy_captures_from(&mut self, caps: &[CaptureSlot]) { + for (slot, val) in self.captures.iter_mut().zip(caps.iter()) { + *slot = *val; + } + } + + pub fn reset(&mut self) { + for slot in self.captures.iter_mut() { + *slot = None; + } + for m in self.matches.iter_mut() { + *m = false; + } + } +} + +/// Exec manages the execution of a regular expression. +/// +/// In particular, this manages the various compiled forms of a single regular +/// expression and the choice of which matching engine to use to execute a +/// regular expression. +#[derive(Clone, Debug)] +pub struct Exec { + /// The original regular expressions given by the caller to compile. + res: Vec<String>, + /// A compiled program that is used in the NFA simulation and backtracking. + /// It can be byte-based or Unicode codepoint based. + /// + /// N.B. It is not possibly to make this byte-based from the public API. + /// It is only used for testing byte based programs in the NFA simulations. + prog: Program, + /// A compiled byte based program for DFA execution. This is only used + /// if a DFA can be executed. (Currently, only word boundary assertions are + /// not supported.) Note that this program contains an embedded `.*?` + /// preceding the first capture group, unless the regex is anchored at the + /// beginning. + dfa: Program, + /// The same as above, except the program is reversed (and there is no + /// preceding `.*?`). This is used by the DFA to find the starting location + /// of matches. + dfa_reverse: Program, + /// Set to true if and only if the DFA can be executed. + can_dfa: bool, + /// A preference for matching engine selection. + /// + /// This defaults to Automatic, which means the matching engine is selected + /// based on heuristics (such as the nature and size of the compiled + /// program, in addition to the size of the search text). + /// + /// If either Nfa or Backtrack is set, then it is always used because + /// either is capable of executing every compiled program on any input + /// size. + match_engine: MatchEngine, +} + +/// Facilitates the construction of an executor by exposing various knobs +/// to control how a regex is executed and what kinds of resources it's +/// permitted to use. +pub struct ExecBuilder { + res: Vec<String>, + match_engine: MatchEngine, + size_limit: usize, + bytes: bool, + only_utf8: bool, +} + +impl ExecBuilder { + /// Create a regex execution builder. + /// + /// This uses default settings for everything except the regex itself, + /// which must be provided. Further knobs can be set by calling methods, + /// and then finally, `build` to actually create the executor. + pub fn new(re: &str) -> Self { + Self::new_many(&[re]) + } + + /// Like new, but compiles the union of the given regular expressions. + /// + /// Note that when compiling 2 or more regular expressions, capture groups + /// are completely unsupported. (This means both `find` and `captures` + /// wont work.) + pub fn new_many<I, S>(res: I) -> Self + where S: AsRef<str>, I: IntoIterator<Item=S> { + ExecBuilder { + res: res.into_iter().map(|s| s.as_ref().to_owned()).collect(), + match_engine: MatchEngine::Automatic, + size_limit: 10 * (1 << 20), + bytes: false, + only_utf8: true, + } + } + + /// Set the matching engine to be automatically determined. + /// + /// This is the default state and will apply whatever optimizations are + /// possible, such as running a DFA. + /// + /// This overrides whatever was previously set via the `nfa` or + /// `bounded_backtracking` methods. + pub fn automatic(mut self) -> Self { + self.match_engine = MatchEngine::Automatic; + self + } + + /// Sets the matching engine to use the NFA algorithm no matter what + /// optimizations are possible. + /// + /// This overrides whatever was previously set via the `automatic` or + /// `bounded_backtracking` methods. + pub fn nfa(mut self) -> Self { + self.match_engine = MatchEngine::Nfa; + self + } + + /// Sets the matching engine to use a bounded backtracking engine no + /// matter what optimizations are possible. + /// + /// One must use this with care, since the bounded backtracking engine + /// uses memory proportion to `len(regex) * len(text)`. + /// + /// This overrides whatever was previously set via the `automatic` or + /// `nfa` methods. + pub fn bounded_backtracking(mut self) -> Self { + self.match_engine = MatchEngine::Backtrack; + self + } + + /// Sets the size limit on a single compiled regular expression program. + /// + /// The default is ~10MB. + /// + /// N.B. Typically, multiple programs are compiled for every regular + /// expression and this limit applies to *each* of them. + pub fn size_limit(mut self, bytes: usize) -> Self { + self.size_limit = bytes; + self + } + + /// Compiles byte based programs for use with the NFA matching engines. + /// + /// By default, the NFA engines match on Unicode scalar values. They can + /// be made to use byte based programs instead. In general, the byte based + /// programs are slower because of a less efficient encoding of character + /// classes. + /// + /// Note that this does not impact DFA matching engines, which always + /// execute on bytes. + pub fn bytes(mut self, yes: bool) -> Self { + self.bytes = yes; + self + } + + /// When disabled, the program compiled may match arbitrary bytes. + /// + /// When enabled (the default), all compiled programs exclusively match + /// valid UTF-8 bytes. + pub fn only_utf8(mut self, yes: bool) -> Self { + self.only_utf8 = yes; + self + } + + /// Build an executor that can run a regular expression. + pub fn build(self) -> Result<Exec, Error> { + if self.res.is_empty() { + return Err(Error::InvalidSet); + } + let mut exprs = vec![]; + for re in &self.res { + let parser = + syntax::ExprBuilder::new() + .allow_bytes(!self.only_utf8) + .unicode(self.only_utf8); + exprs.push(try!(parser.parse(re))); + } + let mut prog = try!( + Compiler::new() + .size_limit(self.size_limit) + .bytes(self.bytes) + .only_utf8(self.only_utf8) + .compile(&exprs)); + let mut dfa = try!( + Compiler::new() + .size_limit(self.size_limit) + .dfa(true) + .only_utf8(self.only_utf8) + .compile(&exprs)); + let dfa_reverse = try!( + Compiler::new() + .size_limit(self.size_limit) + .dfa(true) + .only_utf8(self.only_utf8) + .reverse(true) + .compile(&exprs)); + + // Compute literal prefixes for only `prog`, which is likely a Unicode + // based program. Literal prefix extract currently works better on + // Unicode programs. + prog.prefixes = Literals::prefixes(&prog); + // And give it to the DFA too, which can use Unicode prefixes even + // though the program itself is byte based. + dfa.prefixes = prog.prefixes.clone(); + let can_dfa = dfa::can_exec(&dfa); + Ok(Exec { + res: self.res, + prog: prog, + dfa: dfa, + dfa_reverse: dfa_reverse, + can_dfa: can_dfa, + match_engine: self.match_engine, + }) + } +} + +impl Exec { + /// The main entry point for execution of a regular expression on text. + /// + /// caps represents the capture locations that the caller wants. Generally, + /// there are three varieties: no captures requested (e.g., `is_match`), + /// one capture requested (e.g., `find` or `find_iter`) or multiple + /// captures requested (e.g., `captures` or `captures_iter` along with + /// at least one capturing group in the regex). Each of these three cases + /// provokes different behavior from the matching engines, where fewer + /// captures generally means faster matching. + /// + /// text should be the search text and start should be the position in + /// the text to start searching. Note that passing a simple slice here + /// isn't sufficient, since look-behind assertions sometimes need to + /// inspect the character immediately preceding the start location. + /// + /// Note that this method takes self.match_engine into account when + /// choosing the engine to use. If self.match_engine is Nfa or Backtrack, + /// then that engine is always used. Otherwise, one is selected + /// automatically. + pub fn exec<'c, 'm>( + &self, + search: &mut Search<'c, 'm>, + text: &[u8], + start: usize, + ) -> bool { + // Why isn't the DFA or literal engine checked for here? Well, it's + // only possible to execute those engines in exec_auto. See comment on + // MatchEngine below for more details. + match self.match_engine { + MatchEngine::Automatic => self.exec_auto(search, text, start), + MatchEngine::Backtrack => self.exec_backtrack(search, text, start), + MatchEngine::Nfa => self.exec_nfa(search, text, start), + } + } + + /// Like exec, but always selects the engine automatically. + fn exec_auto<'c, 'm>( + &self, + search: &mut Search<'c, 'm>, + text: &[u8], + start: usize, + ) -> bool { + if search.captures.len() <= 2 && self.prog.prefixes.at_match() { + // We should be able to execute the literal engine even if there + // are more captures by falling back to the NFA engine after a + // match. However, that's effectively what the NFA engine does + // already (since it will use the literal engine if it exists). + self.exec_literals(search, text, start) + } else if self.can_dfa { + self.exec_dfa(search, text, start) + } else { + self.exec_auto_nfa(search, text, start) + } + } + + /// Like exec, but always tries to execute the lazy DFA. + /// + /// Note that self.can_dfa must be true. This will panic otherwise. + fn exec_dfa<'a, 'c, 'm>( + &self, + search: &'a mut Search<'c, 'm>, + text: &[u8], + start: usize, + ) -> bool { + debug_assert!(self.can_dfa); + match Dfa::exec(&self.dfa, search, text, start) { + DfaResult::Match => {} // fallthrough + DfaResult::NoMatch => return false, + DfaResult::Quit => { + search.reset(); + return self.exec_auto_nfa(search, text, start); + } + } + let match_end = match search.captures.get(1) { + Some(&Some(i)) => i, + // The DFA returned true for a match, but did not set any capture + // location because the caller didn't ask for them. Therefore, we + // can quit immediately. + _ => return true, + }; + // invariant: caps.len() >= 2 && caps.len() % 2 == 0 + // If the reported end of the match is the same as the start, then we + // have an empty match and we can quit now. + if start == match_end { + // Be careful... If the caller wants sub-captures, than we are + // obliged to run the NFA to get them. + if search.captures.len() == 2 { + // The caller only needs the start/end, so we can avoid the + // NFA here. + search.captures[0] = Some(start); + search.captures[1] = Some(start); + return true; + } + return self.exec_auto_nfa(search, text, start); + } + // OK, now we find the start of the match by running the DFA backwards + // on the text. We *start* the search at the end of the match. + let result = Dfa::exec( + &self.dfa_reverse, search, &text[start..], match_end - start); + match result { + DfaResult::Match => {} // fallthrough + DfaResult::NoMatch => { + panic!("BUG: forward match implies backward match"); + } + DfaResult::Quit => { + search.reset(); + return self.exec_auto_nfa(search, text, start); + } + } + let match_start = match search.captures.get(0) { + Some(&Some(i)) => start + i, + _ => panic!("BUG: early match can't happen on reverse search"), + }; + if search.captures.len() == 2 { + // If the caller doesn't care about capture locations, then we can + // avoid running the NFA to fill them in. + search.captures[0] = Some(match_start); + search.captures[1] = Some(match_end); + return true; + } + self.exec_auto_nfa(search, text, match_start) + } + + /// This is like exec_auto, except it always chooses between either the + /// full NFA simulation or the bounded backtracking engine. + fn exec_auto_nfa<'c, 'm>( + &self, + search: &mut Search<'c, 'm>, + text: &[u8], + start: usize, + ) -> bool { + if backtrack::should_exec(self.prog.len(), text.len()) { + self.exec_backtrack(search, text, start) + } else { + self.exec_nfa(search, text, start) + } + } + + /// Always run the NFA algorithm. + fn exec_nfa<'c, 'm>( + &self, + search: &mut Search<'c, 'm>, + text: &[u8], + start: usize, + ) -> bool { + if self.prog.uses_bytes() { + Nfa::exec(&self.prog, search, ByteInput::new(text), start) + } else { + Nfa::exec(&self.prog, search, CharInput::new(text), start) + } + } + + /// Always runs the NFA using bounded backtracking. + fn exec_backtrack<'c, 'm>( + &self, + search: &mut Search<'c, 'm>, + text: &[u8], + start: usize, + ) -> bool { + if self.prog.uses_bytes() { + Backtrack::exec(&self.prog, search, ByteInput::new(text), start) + } else { + Backtrack::exec(&self.prog, search, CharInput::new(text), start) + } + } + + /// Executes the special literal matching engine. + /// + /// When a regular expression is small and can be expanded to a finite set + /// of literals that all result in matches, then we can avoid all of the + /// regex machinery and use specialized DFAs. + /// + /// This panics if the set of literals do not correspond to matches. + fn exec_literals<'c, 'm>( + &self, + search: &mut Search<'c, 'm>, + text: &[u8], + start: usize, + ) -> bool { + debug_assert!(self.prog.prefixes.at_match()); + match self.prog.prefixes.find(&text[start..]) { + None => false, + Some((s, e)) => { + if search.captures.len() == 2 { + search.captures[0] = Some(start + s); + search.captures[1] = Some(start + e); + } + true + } + } + } + + /// Build a dynamic Regex from this executor. + pub fn into_regex(self) -> re_unicode::Regex { + re_unicode::Regex::from(self) + } + + /// Build a dynamic Regex from this executor that can match arbitrary + /// bytes. + pub fn into_byte_regex(self) -> re_bytes::Regex { + re_bytes::Regex::from(self) + } + + /// The original regular expressions given by the caller that were + /// compiled. + pub fn regex_strings(&self) -> &[String] { + &self.res + } + + /// Return a slice of instruction pointers to match slots. + /// + /// There is a match slot for every regular expression in this executor. + pub fn matches(&self) -> &[InstPtr] { + &self.prog.matches + } + + /// Return a slice of capture names. + /// + /// Any capture that isn't named is None. + pub fn captures(&self) -> &[Option<String>] { + &self.prog.captures + } + + /// Return a reference to named groups mapping (from group name to + /// group position). + pub fn capture_name_idx(&self) -> &Arc<HashMap<String, usize>> { + &self.prog.capture_name_idx + } +} + +/// Some of the matching engines offered by this regex implementation. +/// +/// This is exported for use in testing. +/// +/// Note that only engines that can be used on *every* regex are exposed here. +/// For example, it is useful for testing purposes to say, "always execute +/// the backtracking engine" or "always execute the full NFA simulation." +/// However, we cannot say things like, "always execute the pure literals +/// engine" or "always execute the DFA" because they only work on a subset of +/// regexes supported by this crate. Specifically, the only way to run the +/// DFA or literal engines is to use Automatic. +#[doc(hidden)] +#[derive(Clone, Copy, Debug)] +enum MatchEngine { + /// Automatically choose the best matching engine based on heuristics. + Automatic, + /// A bounded backtracking implementation. About twice as fast as the + /// NFA, but can only work on small regexes and small input. + Backtrack, + /// A full NFA simulation. Can always be employed but almost always the + /// slowest choice. + Nfa, +} diff --git a/deps/regex-0.1.58/src/expand.rs b/deps/regex-0.1.58/src/expand.rs new file mode 100644 index 000000000..9bea70388 --- /dev/null +++ b/deps/regex-0.1.58/src/expand.rs @@ -0,0 +1,91 @@ +use std::str; + +use memchr::memchr; + +use bytes::Captures; + +pub fn expand(caps: &Captures, mut replacement: &[u8], dst: &mut Vec<u8>) { + while !replacement.is_empty() { + match memchr(b'$', replacement) { + None => break, + Some(i) => { + dst.extend(&replacement[..i]); + replacement = &replacement[i..]; + } + } + if replacement.get(1).map_or(false, |&b| b == b'$') { + dst.push(b'$'); + replacement = &replacement[2..]; + continue; + } + debug_assert!(!replacement.is_empty()); + let cap_ref = match find_cap_ref(replacement) { + Some(cap_ref) => cap_ref, + None => { + dst.push(b'$'); + replacement = &replacement[1..]; + continue; + } + }; + replacement = cap_ref.rest; + match cap_ref.cap { + Ref::Number(i) => dst.extend(caps.at(i).unwrap_or(b"")), + Ref::Named(name) => dst.extend(caps.name(name).unwrap_or(b"")), + } + } + dst.extend(replacement); +} + +struct CaptureRef<'a> { + rest: &'a [u8], + cap: Ref<'a>, +} + +enum Ref<'a> { + Named(&'a str), + Number(usize), +} + +fn find_cap_ref(mut replacement: &[u8]) -> Option<CaptureRef> { + if replacement.len() <= 1 || replacement[0] != b'$' { + return None; + } + let mut brace = false; + replacement = &replacement[1..]; + if replacement[0] == b'{' { + brace = true; + replacement = &replacement[1..]; + } + let mut cap_end = 0; + while replacement.get(cap_end).map_or(false, is_valid_cap_letter) { + cap_end += 1; + } + if cap_end == 0 { + return None; + } + // We just verified that the range 0..cap_end is valid ASCII, so it must + // therefore be valid UTF-8. If we really cared, we could avoid this UTF-8 + // check with either unsafe or by parsing the number straight from &[u8]. + let cap = str::from_utf8(&replacement[..cap_end]) + .ok().expect("valid UTF-8 capture name"); + if brace { + if !replacement.get(cap_end).map_or(false, |&b| b == b'}') { + return None; + } + cap_end += 1; + } + Some(CaptureRef { + rest: &replacement[cap_end..], + cap: match cap.parse::<u32>() { + Ok(i) => Ref::Number(i as usize), + Err(_) => Ref::Named(cap), + }, + }) +} + +fn is_valid_cap_letter(b: &u8) -> bool { + match *b { + b'0' ... b'9' | b'a' ... b'z' | b'A' ... b'Z' | b'_' => true, + _ => false, + } +} diff --git a/deps/regex-0.1.58/src/input.rs b/deps/regex-0.1.58/src/input.rs new file mode 100644 index 000000000..912646d4a --- /dev/null +++ b/deps/regex-0.1.58/src/input.rs @@ -0,0 +1,312 @@ +// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +use std::char; +use std::cmp::Ordering; +use std::fmt; +use std::ops; +use std::u32; + +use syntax; + +use utf8::{decode_utf8, decode_last_utf8}; +use literals::Literals; + +/// Represents a location in the input. +#[derive(Clone, Copy, Debug)] +pub struct InputAt { + pos: usize, + c: Char, + byte: Option<u8>, + len: usize, +} + +impl InputAt { + /// Returns true iff this position is at the beginning of the input. + pub fn is_start(&self) -> bool { + self.pos == 0 + } + + /// Returns true iff this position is past the end of the input. + pub fn is_end(&self) -> bool { + self.c.is_none() && self.byte.is_none() + } + + /// Returns the character at this position. + /// + /// If this position is just before or after the input, then an absent + /// character is returned. + pub fn char(&self) -> Char { + self.c + } + + /// Returns the byte at this position. + pub fn byte(&self) -> Option<u8> { + self.byte + } + + /// Returns the UTF-8 width of the character at this position. + pub fn len(&self) -> usize { + self.len + } + + /// Returns the byte offset of this position. + pub fn pos(&self) -> usize { + self.pos + } + + /// Returns the byte offset of the next position in the input. + pub fn next_pos(&self) -> usize { + self.pos + self.len + } +} + +/// An abstraction over input used in the matching engines. +pub trait Input { + /// Return an encoding of the position at byte offset `i`. + fn at(&self, i: usize) -> InputAt; + + /// Return the Unicode character occurring next to `at`. + /// + /// If no such character could be decoded, then `Char` is absent. + fn next_char(&self, at: InputAt) -> Char; + + /// Return the Unicode character occurring previous to `at`. + /// + /// If no such character could be decoded, then `Char` is absent. + fn previous_char(&self, at: InputAt) -> Char; + + /// Scan the input for a matching prefix. + fn prefix_at(&self, prefixes: &Literals, at: InputAt) -> Option<InputAt>; + + /// The number of bytes in the input. + fn len(&self) -> usize; + + /// Return the given input as a sequence of bytes. + fn as_bytes(&self) -> &[u8]; +} + +impl<'a, T: Input> Input for &'a T { + fn at(&self, i: usize) -> InputAt { (**self).at(i) } + fn next_char(&self, at: InputAt) -> Char { (**self).next_char(at) } + fn previous_char(&self, at: InputAt) -> Char { (**self).previous_char(at) } + fn prefix_at(&self, prefixes: &Literals, at: InputAt) -> Option<InputAt> { + (**self).prefix_at(prefixes, at) + } + fn len(&self) -> usize { (**self).len() } + fn as_bytes(&self) -> &[u8] { (**self).as_bytes() } +} + +/// An input reader over characters. +#[derive(Clone, Copy, Debug)] +pub struct CharInput<'t>(&'t [u8]); + +impl<'t> CharInput<'t> { + /// Return a new character input reader for the given string. + pub fn new(s: &'t [u8]) -> CharInput<'t> { + CharInput(s) + } +} + +impl<'t> ops::Deref for CharInput<'t> { + type Target = [u8]; + + fn deref(&self) -> &[u8] { + self.0 + } +} + +impl<'t> Input for CharInput<'t> { + // This `inline(always)` increases throughput by almost 25% on the `hard` + // benchmarks over a normal `inline` annotation. + // + // I'm not sure why `#[inline]` isn't enough to convince LLVM, but it is + // used *a lot* in the guts of the matching engines. + #[inline(always)] + fn at(&self, i: usize) -> InputAt { + let c = decode_utf8(&self[i..]).map(|(c, _)| c).into(); + InputAt { + pos: i, + c: c, + byte: None, + len: c.len_utf8(), + } + } + + fn next_char(&self, at: InputAt) -> Char { + at.char() + } + + fn previous_char(&self, at: InputAt) -> Char { + decode_last_utf8(&self[..at.pos()]).map(|(c, _)| c).into() + } + + fn prefix_at(&self, prefixes: &Literals, at: InputAt) -> Option<InputAt> { + prefixes.find(&self[at.pos()..]).map(|(s, _)| self.at(at.pos() + s)) + } + + fn len(&self) -> usize { + self.0.len() + } + + fn as_bytes(&self) -> &[u8] { + self.0 + } +} + +/// An input reader over bytes. +/// +/// N.B. We represent the reader with a string for now, since that gives us +/// easy access to necessary Unicode decoding (used for word boundary look +/// ahead/look behind). +#[derive(Clone, Copy, Debug)] +pub struct ByteInput<'t>(&'t [u8]); + +impl<'t> ByteInput<'t> { + /// Return a new byte-based input reader for the given string. + pub fn new(s: &'t [u8]) -> ByteInput<'t> { + ByteInput(s) + } +} + +impl<'t> ops::Deref for ByteInput<'t> { + type Target = [u8]; + + fn deref(&self) -> &[u8] { + self.0 + } +} + +impl<'t> Input for ByteInput<'t> { + #[inline(always)] + fn at(&self, i: usize) -> InputAt { + InputAt { + pos: i, + c: None.into(), + byte: self.get(i).map(|&b| b), + len: 1, + } + } + + fn next_char(&self, at: InputAt) -> Char { + decode_utf8(&self[at.pos()..]).map(|(c, _)| c).into() + } + + fn previous_char(&self, at: InputAt) -> Char { + decode_last_utf8(&self[..at.pos()]).map(|(c, _)| c).into() + } + + fn prefix_at(&self, prefixes: &Literals, at: InputAt) -> Option<InputAt> { + prefixes.find(&self[at.pos()..]).map(|(s, _)| self.at(at.pos() + s)) + } + + fn len(&self) -> usize { + self.0.len() + } + + fn as_bytes(&self) -> &[u8] { + self.0 + } +} + +/// An inline representation of `Option<char>`. +/// +/// This eliminates the need to do case analysis on `Option<char>` to determine +/// ordinality with other characters. +/// +/// (The `Option<char>` is not related to encoding. Instead, it is used in the +/// matching engines to represent the beginning and ending boundaries of the +/// search text.) +#[derive(Clone, Copy, Hash, PartialEq, Eq, PartialOrd, Ord)] +pub struct Char(u32); + +impl fmt::Debug for Char { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + match char::from_u32(self.0) { + None => write!(f, "Empty"), + Some(c) => write!(f, "{:?}", c), + } + } +} + +impl Char { + /// Returns true iff the character is absent. + #[inline] + pub fn is_none(self) -> bool { self.0 == u32::MAX } + + /// Returns the length of the character's UTF-8 encoding. + /// + /// If the character is absent, then `0` is returned. + #[inline] + pub fn len_utf8(self) -> usize { + char::from_u32(self.0).map_or(0, |c| c.len_utf8()) + } + + /// Returns true iff the character is a word character. + /// + /// If the character is absent, then false is returned. + pub fn is_word_char(self) -> bool { + char::from_u32(self.0).map_or(false, syntax::is_word_char) + } + + /// Returns true iff the byte is a word byte. + /// + /// If the byte is absent, then false is returned. + pub fn is_word_byte(self) -> bool { + match char::from_u32(self.0) { + None => false, + Some(c) if c <= '\u{FF}' => syntax::is_word_byte(c as u8), + Some(_) => false, + } + } + + /// Converts the character to a real primitive `char`. + /// + /// If the character is absent, then `None` is returned. + pub fn as_char(self) -> Option<char> { + // This is only used in the `regex!` macro because it expands char + // classes into `match` expressions (instead of binary search). + char::from_u32(self.0) + } +} + +impl From<char> for Char { + fn from(c: char) -> Char { Char(c as u32) } +} + +impl From<Option<char>> for Char { + fn from(c: Option<char>) -> Char { + c.map_or(Char(u32::MAX), |c| c.into()) + } +} + +impl PartialEq<char> for Char { + #[inline] + fn eq(&self, other: &char) -> bool { self.0 == *other as u32 } +} + +impl PartialEq<Char> for char { + #[inline] + fn eq(&self, other: &Char) -> bool { *self as u32 == other.0 } +} + +impl PartialOrd<char> for Char { + #[inline] + fn partial_cmp(&self, other: &char) -> Option<Ordering> { + self.0.partial_cmp(&(*other as u32)) + } +} + +impl PartialOrd<Char> for char { + #[inline] + fn partial_cmp(&self, other: &Char) -> Option<Ordering> { + (*self as u32).partial_cmp(&other.0) + } +} diff --git a/deps/regex-0.1.58/src/lib.rs b/deps/regex-0.1.58/src/lib.rs new file mode 100644 index 000000000..0cd810d3b --- /dev/null +++ b/deps/regex-0.1.58/src/lib.rs @@ -0,0 +1,619 @@ +// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +//! This crate provides a native implementation of regular expressions that is +//! heavily based on RE2 both in syntax and in implementation. Notably, +//! backreferences and arbitrary lookahead/lookbehind assertions are not +//! provided. In return, regular expression searching provided by this package +//! has excellent worst-case performance. The specific syntax supported is +//! documented further down. +//! +//! This crate's documentation provides some simple examples, describes Unicode +//! support and exhaustively lists the supported syntax. For more specific +//! details on the API, please see the documentation for the `Regex` type. +//! +//! # Usage +//! +//! This crate is [on crates.io](https://crates.io/crates/regex) and can be +//! used by adding `regex` to your dependencies in your project's `Cargo.toml`. +//! +//! ```toml +//! [dependencies] +//! regex = "0.1" +//! ``` +//! +//! and this to your crate root: +//! +//! ```rust +//! extern crate regex; +//! ``` +//! +//! # Example: find a date +//! +//! General use of regular expressions in this package involves compiling an +//! expression and then using it to search, split or replace text. For example, +//! to confirm that some text resembles a date: +//! +//! ```rust +//! use regex::Regex; +//! let re = Regex::new(r"^\d{4}-\d{2}-\d{2}$").unwrap(); +//! assert!(re.is_match("2014-01-01")); +//! ``` +//! +//! Notice the use of the `^` and `$` anchors. In this crate, every expression +//! is executed with an implicit `.*?` at the beginning and end, which allows +//! it to match anywhere in the text. Anchors can be used to ensure that the +//! full text matches an expression. +//! +//! This example also demonstrates the utility of +//! [raw strings](https://doc.rust-lang.org/stable/reference.html#raw-string-literals) +//! in Rust, which +//! are just like regular strings except they are prefixed with an `r` and do +//! not process any escape sequences. For example, `"\\d"` is the same +//! expression as `r"\d"`. +//! +//! # Example: Avoid compiling the same regex in a loop +//! +//! It is an anti-pattern to compile the same regular expression in a loop +//! since compilation is typically expensive. (It takes anywhere from a few +//! microseconds to a few **milliseconds** depending on the size of the +//! regex.) Not only is compilation itself expensive, but this also prevents +//! optimizations that reuse allocations internally to the matching engines. +//! +//! In Rust, it can sometimes be a pain to pass regular expressions around if +//! they're used from inside a helper function. Instead, we recommend using the +//! [`lazy_static`](https://crates.io/crates/lazy_static) crate to ensure that +//! regular expressions are compiled exactly once. +//! +//! For example: +//! +//! ```rust +//! #[macro_use] extern crate lazy_static; +//! extern crate regex; +//! +//! use regex::Regex; +//! +//! fn some_helper_function(text: &str) -> bool { +//! lazy_static! { +//! static ref RE: Regex = Regex::new("...").unwrap(); +//! } +//! RE.is_match(text) +//! } +//! +//! fn main() {} +//! ``` +//! +//! Specifically, in this example, the regex will be compiled when it is used for +//! the first time. On subsequent uses, it will reuse the previous compilation. +//! +//! # The `regex!` macro +//! +//! Rust's compile-time meta-programming facilities provide a way to write a +//! `regex!` macro which compiles regular expressions *when your program +//! compiles*. Said differently, if you only use `regex!` to build regular +//! expressions in your program, then your program cannot compile with an +//! invalid regular expression. Moreover, the `regex!` macro compiles the +//! given expression to native Rust code, which ideally makes it faster. +//! Unfortunately (or fortunately), the dynamic implementation has had a lot +//! more optimization work put into it currently, so it is faster than +//! the `regex!` macro in almost every case. +//! +//! To use the `regex!` macro, you must add `regex_macros` to your dependencies +//! in your project's `Cargo.toml`: +//! +//! ```toml +//! [dependencies] +//! regex = "0.1" +//! regex_macros = "0.1" +//! ``` +//! +//! and then enable the `plugin` feature and import the `regex_macros` crate as +//! a syntax extension: +//! +//! ```ignore +//! #![feature(plugin)] +//! #![plugin(regex_macros)] +//! extern crate regex; +//! +//! fn main() { +//! let re = regex!(r"^\d{4}-\d{2}-\d{2}$"); +//! assert!(re.is_match("2014-01-01")); +//! } +//! ``` +//! +//! There are a few things worth mentioning about using the `regex!` macro. +//! Firstly, the `regex!` macro *only* accepts string *literals*. +//! Secondly, the `regex` crate *must* be linked with the name `regex` since +//! the generated code depends on finding symbols in the `regex` crate. +//! +//! One downside of using the `regex!` macro is that it can increase the +//! size of your program's binary since it generates specialized Rust code. +//! The extra size probably won't be significant for a small number of +//! expressions, but 100+ calls to `regex!` will probably result in a +//! noticeably bigger binary. +//! +//! **NOTE**: This is implemented using a compiler plugin, which is not +//! available on the Rust 1.0 beta/stable channels. Therefore, you'll only +//! be able to use `regex!` on the nightly Rust releases. +//! +//! # Example: iterating over capture groups +//! +//! This crate provides convenient iterators for matching an expression +//! repeatedly against a search string to find successive non-overlapping +//! matches. For example, to find all dates in a string and be able to access +//! them by their component pieces: +//! +//! ```rust +//! # extern crate regex; use regex::Regex; +//! # fn main() { +//! let re = Regex::new(r"(\d{4})-(\d{2})-(\d{2})").unwrap(); +//! let text = "2012-03-14, 2013-01-01 and 2014-07-05"; +//! for cap in re.captures_iter(text) { +//! println!("Month: {} Day: {} Year: {}", +//! cap.at(2).unwrap_or(""), cap.at(3).unwrap_or(""), +//! cap.at(1).unwrap_or("")); +//! } +//! // Output: +//! // Month: 03 Day: 14 Year: 2012 +//! // Month: 01 Day: 01 Year: 2013 +//! // Month: 07 Day: 05 Year: 2014 +//! # } +//! ``` +//! +//! Notice that the year is in the capture group indexed at `1`. This is +//! because the *entire match* is stored in the capture group at index `0`. +//! +//! # Example: replacement with named capture groups +//! +//! Building on the previous example, perhaps we'd like to rearrange the date +//! formats. This can be done with text replacement. But to make the code +//! clearer, we can *name* our capture groups and use those names as variables +//! in our replacement text: +//! +//! ```rust +//! # extern crate regex; use regex::Regex; +//! # fn main() { +//! let re = Regex::new(r"(?P<y>\d{4})-(?P<m>\d{2})-(?P<d>\d{2})").unwrap(); +//! let before = "2012-03-14, 2013-01-01 and 2014-07-05"; +//! let after = re.replace_all(before, "$m/$d/$y"); +//! assert_eq!(after, "03/14/2012, 01/01/2013 and 07/05/2014"); +//! # } +//! ``` +//! +//! The `replace` methods are actually polymorphic in the replacement, which +//! provides more flexibility than is seen here. (See the documentation for +//! `Regex::replace` for more details.) +//! +//! Note that if your regex gets complicated, you can use the `x` flag to +//! enable insigificant whitespace mode, which also lets you write comments: +//! +//! ```rust +//! # extern crate regex; use regex::Regex; +//! # fn main() { +//! let re = Regex::new(r"(?x) +//! (?P<y>\d{4}) # the year +//! - +//! (?P<m>\d{2}) # the month +//! - +//! (?P<d>\d{2}) # the day +//! ").unwrap(); +//! let before = "2012-03-14, 2013-01-01 and 2014-07-05"; +//! let after = re.replace_all(before, "$m/$d/$y"); +//! assert_eq!(after, "03/14/2012, 01/01/2013 and 07/05/2014"); +//! # } +//! ``` +//! +//! # Example: match multiple regular expressions simultaneously +//! +//! This demonstrates how to use a `RegexSet` to match multiple (possibly +//! overlapping) regular expressions in a single scan of the search text: +//! +//! ```rust +//! use regex::RegexSet; +//! +//! let set = RegexSet::new(&[ +//! r"\w+", +//! r"\d+", +//! r"\pL+", +//! r"foo", +//! r"bar", +//! r"barfoo", +//! r"foobar", +//! ]).unwrap(); +//! +//! // Iterate over and collect all of the matches. +//! let matches: Vec<_> = set.matches("foobar").into_iter().collect(); +//! assert_eq!(matches, vec![0, 2, 3, 4, 6]); +//! +//! // You can also test whether a particular regex matched: +//! let matches = set.matches("foobar"); +//! assert!(!matches.matched(5)); +//! assert!(matches.matched(6)); +//! ``` +//! +//! # Pay for what you use +//! +//! With respect to searching text with a regular expression, there are three +//! questions that can be asked: +//! +//! 1. Does the text match this expression? +//! 2. If so, where does it match? +//! 3. Where are the submatches? +//! +//! Generally speaking, this crate could provide a function to answer only #3, +//! which would subsume #1 and #2 automatically. However, it can be +//! significantly more expensive to compute the location of submatches, so it's +//! best not to do it if you don't need to. +//! +//! Therefore, only use what you need. For example, don't use `find` if you +//! only need to test if an expression matches a string. (Use `is_match` +//! instead.) +//! +//! # Unicode +//! +//! This implementation executes regular expressions **only** on valid UTF-8 +//! while exposing match locations as byte indices into the search string. +//! +//! Currently, only simple case folding is supported. Namely, when matching +//! case-insensitively, the characters are first mapped using the +//! [simple case folding](ftp://ftp.unicode.org/Public/UNIDATA/CaseFolding.txt) +//! mapping. +//! +//! Regular expressions themselves are **only** interpreted as a sequence of +//! Unicode scalar values. This means you can use Unicode characters directly +//! in your expression: +//! +//! ```rust +//! # extern crate regex; use regex::Regex; +//! # fn main() { +//! let re = Regex::new(r"(?i)Δ+").unwrap(); +//! assert_eq!(re.find("ΔδΔ"), Some((0, 6))); +//! # } +//! ``` +//! +//! Finally, Unicode general categories and scripts are available as character +//! classes. For example, you can match a sequence of numerals, Greek or +//! Cherokee letters: +//! +//! ```rust +//! # extern crate regex; use regex::Regex; +//! # fn main() { +//! let re = Regex::new(r"[\pN\p{Greek}\p{Cherokee}]+").unwrap(); +//! assert_eq!(re.find("abcΔᎠβⅠᏴγδⅡxyz"), Some((3, 23))); +//! # } +//! ``` +//! +//! # Opt out of Unicode support +//! +//! The `bytes` sub-module provides a `Regex` type that can be used to match +//! on `&[u8]`. By default, text is interpreted as ASCII compatible text with +//! all Unicode support disabled (e.g., `.` matches any byte instead of any +//! Unicode codepoint). Unicode support can be selectively enabled with the +//! `u` flag. See the `bytes` module documentation for more details. +//! +//! Note that Unicode support *cannot* be selectively disabled on the main +//! `Regex` type that matches on `&str`. +//! +//! # Syntax +//! +//! The syntax supported in this crate is almost in an exact correspondence +//! with the syntax supported by RE2. It is documented below. +//! +//! Note that the regular expression parser and abstract syntax are exposed in +//! a separate crate, [`regex-syntax`](../regex_syntax/index.html). +//! +//! ## Matching one character +//! +//! <pre class="rust"> +//! . any character except new line (includes new line with s flag) +//! [xyz] A character class matching either x, y or z. +//! [^xyz] A character class matching any character except x, y and z. +//! [a-z] A character class matching any character in range a-z. +//! \d digit (\p{Nd}) +//! \D not digit +//! [:alpha:] ASCII character class ([A-Za-z]) +//! [:^alpha:] Negated ASCII character class ([^A-Za-z]) +//! \pN One-letter name Unicode character class +//! \p{Greek} Unicode character class (general category or script) +//! \PN Negated one-letter name Unicode character class +//! \P{Greek} negated Unicode character class (general category or script) +//! </pre> +//! +//! Any named character class may appear inside a bracketed `[...]` character +//! class. For example, `[\p{Greek}\pN]` matches any Greek or numeral +//! character. +//! +//! ## Composites +//! +//! <pre class="rust"> +//! xy concatenation (x followed by y) +//! x|y alternation (x or y, prefer x) +//! </pre> +//! +//! ## Repetitions +//! +//! <pre class="rust"> +//! x* zero or more of x (greedy) +//! x+ one or more of x (greedy) +//! x? zero or one of x (greedy) +//! x*? zero or more of x (ungreedy) +//! x+? one or more of x (ungreedy) +//! x?? zero or one of x (ungreedy) +//! x{n,m} at least n x and at most m x (greedy) +//! x{n,} at least n x (greedy) +//! x{n} exactly n x +//! x{n,m}? at least n x and at most m x (ungreedy) +//! x{n,}? at least n x (ungreedy) +//! x{n}? exactly n x +//! </pre> +//! +//! ## Empty matches +//! +//! <pre class="rust"> +//! ^ the beginning of text (or start-of-line with multi-line mode) +//! $ the end of text (or end-of-line with multi-line mode) +//! \A only the beginning of text (even with multi-line mode enabled) +//! \z only the end of text (even with multi-line mode enabled) +//! \b a Unicode word boundary (\w on one side and \W, \A, or \z on other) +//! \B not a Unicode word boundary +//! </pre> +//! +//! ## Grouping and flags +//! +//! <pre class="rust"> +//! (exp) numbered capture group (indexed by opening parenthesis) +//! (?P<name>exp) named (also numbered) capture group (allowed chars: [_0-9a-zA-Z]) +//! (?:exp) non-capturing group +//! (?flags) set flags within current group +//! (?flags:exp) set flags for exp (non-capturing) +//! </pre> +//! +//! Flags are each a single character. For example, `(?x)` sets the flag `x` +//! and `(?-x)` clears the flag `x`. Multiple flags can be set or cleared at +//! the same time: `(?xy)` sets both the `x` and `y` flags and `(?x-y)` sets +//! the `x` flag and clears the `y` flag. +//! +//! All flags are by default disabled. They are: +//! +//! <pre class="rust"> +//! i case-insensitive +//! m multi-line mode: ^ and $ match begin/end of line +//! s allow . to match \n +//! U swap the meaning of x* and x*? +//! x ignore whitespace and allow line comments (starting with `#`) +//! </pre> +//! +//! Here's an example that matches case-insensitively for only part of the +//! expression: +//! +//! ```rust +//! # extern crate regex; use regex::Regex; +//! # fn main() { +//! let re = Regex::new(r"(?i)a+(?-i)b+").unwrap(); +//! let cap = re.captures("AaAaAbbBBBb").unwrap(); +//! assert_eq!(cap.at(0), Some("AaAaAbb")); +//! # } +//! ``` +//! +//! Notice that the `a+` matches either `a` or `A`, but the `b+` only matches +//! `b`. +//! +//! ## Escape sequences +//! +//! <pre class="rust"> +//! \* literal *, works for any punctuation character: \.+*?()|[]{}^$ +//! \a bell (\x07) +//! \f form feed (\x0C) +//! \t horizontal tab +//! \n new line +//! \r carriage return +//! \v vertical tab (\x0B) +//! \123 octal character code (up to three digits) +//! \x7F hex character code (exactly two digits) +//! \x{10FFFF} any hex character code corresponding to a Unicode code point +//! </pre> +//! +//! ## Perl character classes (Unicode friendly) +//! +//! These classes are based on the definitions provided in +//! [UTS#18](http://www.unicode.org/reports/tr18/#Compatibility_Properties): +//! +//! <pre class="rust"> +//! \d digit (\p{Nd}) +//! \D not digit +//! \s whitespace (\p{White_Space}) +//! \S not whitespace +//! \w word character (\p{Alphabetic} + \p{M} + \d + \p{Pc} + \p{Join_Control}) +//! \W not word character +//! </pre> +//! +//! ## ASCII character classes +//! +//! <pre class="rust"> +//! [:alnum:] alphanumeric ([0-9A-Za-z]) +//! [:alpha:] alphabetic ([A-Za-z]) +//! [:ascii:] ASCII ([\x00-\x7F]) +//! [:blank:] blank ([\t ]) +//! [:cntrl:] control ([\x00-\x1F\x7F]) +//! [:digit:] digits ([0-9]) +//! [:graph:] graphical ([!-~]) +//! [:lower:] lower case ([a-z]) +//! [:print:] printable ([ -~]) +//! [:punct:] punctuation ([!-/:-@[-`{-~]) +//! [:space:] whitespace ([\t\n\v\f\r ]) +//! [:upper:] upper case ([A-Z]) +//! [:word:] word characters ([0-9A-Za-z_]) +//! [:xdigit:] hex digit ([0-9A-Fa-f]) +//! </pre> +//! +//! # Untrusted input +//! +//! This crate can handle both untrusted regular expressions and untrusted +//! search text. +//! +//! Untrusted regular expressions are handled by capping the size of a compiled +//! regular expression. (See `Regex::with_size_limit`.) Without this, it would +//! be trivial for an attacker to exhaust your system's memory with expressions +//! like `a{100}{100}{100}`. +//! +//! Untrusted search text is allowed because the matching engine(s) in this +//! crate have time complexity `O(mn)` (with `m ~ regex` and `n ~ search +//! text`), which means there's no way to cause exponential blow-up like with +//! some other regular expression engines. (We pay for this by disallowing +//! features like arbitrary look-ahead and backreferences.) +//! +//! When a DFA is used, pathological cases with exponential state blow up are +//! avoided by constructing the DFA lazily or in an "online" manner. Therefore, +//! at most one new state can be created for each byte of input. This satisfies +//! our time complexity guarantees, but can lead to unbounded memory growth +//! proportional to the size of the input. As a stopgap, the DFA is only +//! allowed to store a fixed number of states. (When the limit is reached, its +//! states are wiped and continues on, possibly duplicating previous work.) + +#![deny(missing_docs)] +#![cfg_attr(test, deny(warnings))] +#![cfg_attr(feature = "pattern", feature(pattern))] +#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", + html_favicon_url = "https://www.rust-lang.org/favicon.ico", + html_root_url = "https://doc.rust-lang.org/regex/")] + +extern crate aho_corasick; +extern crate memchr; +#[cfg(test)] extern crate quickcheck; +extern crate regex_syntax as syntax; +extern crate utf8_ranges; + +pub use error::Error; +pub use set::{RegexSet, SetMatches, SetMatchesIntoIter, SetMatchesIter}; +pub use re_unicode::{ + Regex, Captures, SubCaptures, SubCapturesPos, SubCapturesNamed, + CaptureNames, FindCaptures, FindMatches, + Replacer, NoExpand, RegexSplits, RegexSplitsN, + quote, is_match, +}; + +/** +Match regular expressions on arbitrary bytes. + +This module provides a nearly identical API to the one found in the +top-level of this crate. There are two important differences: + +1. Matching is done on `&[u8]` instead of `&str`. Additionally, `Vec<u8>` +is used where `String` would have been used. +2. Regular expressions are compiled with Unicode support *disabled* by +default. This means that while Unicode regular expressions can only match valid +UTF-8, regular expressions in this module can match arbitrary bytes. Unicode +support can be selectively enabled via the `u` flag in regular expressions +provided by this sub-module. + +# Example: match null terminated string + +This shows how to find all null-terminated strings in a slice of bytes: + +```rust +# use regex::bytes::Regex; +let re = Regex::new(r"(?P<cstr>[^\x00]+)\x00").unwrap(); +let text = b"foo\x00bar\x00baz\x00"; + +// Extract all of the strings without the null terminator from each match. +// The unwrap is OK here since a match requires the `cstr` capture to match. +let cstrs: Vec<&[u8]> = + re.captures_iter(text) + .map(|c| c.name("cstr").unwrap()) + .collect(); +assert_eq!(vec![&b"foo"[..], &b"bar"[..], &b"baz"[..]], cstrs); +``` + +# Example: selectively enable Unicode support + +This shows how to match an arbitrary byte pattern followed by a UTF-8 encoded +string (e.g., to extract a title from a Matroska file): + +```rust +# use std::str; +# use regex::bytes::Regex; +let re = Regex::new(r"\x7b\xa9(?:[\x80-\xfe]|[\x40-\xff].)(?u:(.*))").unwrap(); +let text = b"\x12\xd0\x3b\x5f\x7b\xa9\x85\xe2\x98\x83\x80\x98\x54\x76\x68\x65"; +let caps = re.captures(text).unwrap(); + +// Notice that despite the `.*` at the end, it will only match valid UTF-8 +// because Unicode mode was enabled with the `u` flag. Without the `u` flag, +// the `.*` would match the rest of the bytes. +assert_eq!((7, 10), caps.pos(1).unwrap()); + +// If there was a match, Unicode mode guarantees that `title` is valid UTF-8. +let title = str::from_utf8(caps.at(1).unwrap()).unwrap(); +assert_eq!("☃", title); +``` + +In general, if the Unicode flag is enabled in a capture group and that capture +is part of the overall match, then the capture is *guaranteed* to be valid +UTF-8. + +# Syntax + +The supported syntax is pretty much the same as the syntax for Unicode +regular expressions with a few changes that make sense for matching arbitrary +bytes: + +1. A new flag, `u`, is available for switching to Unicode mode. +2. By default, `u` is disabled, which roughly corresponds to "ASCII compatible" +mode. +3. In ASCII compatible mode, neither Unicode codepoints nor Unicode character +classes are allowed. +4. In ASCII compatible mode, Perl character classes (`\w`, `\d` and `\s`) +revert to their typical ASCII definition. `\w` maps to `[[:word:]]`, `\d` maps +to `[[:digit:]]` and `\s` maps to `[[:space:]]`. +5. In ASCII compatible mode, word boundaries use the ASCII compatible `\w` to +determine whether a byte is a word byte or not. +6. Hexadecimal notation can be used to specify arbitrary bytes instead of +Unicode codepoints. For example, in ASCII compatible mode, `\xFF` matches the +literal byte `\xFF`, while in Unicode mode, `\xFF` is a Unicode codepoint that +matches its UTF-8 encoding of `\xC3\xBF`. Similarly for octal notation. +7. `.` matches any *byte* except for `\n` instead of any codepoint. When the +`s` flag is enabled, `.` matches any byte. + +# Performance + +In general, one should expect performance on `&[u8]` to be roughly similar to +performance on `&str`. +*/ +pub mod bytes { + pub use re_bytes::*; +} + +mod backtrack; +mod utf8; +mod compile; +mod dfa; +mod error; +mod exec; +mod expand; +mod input; +mod literals; +mod nfa; +mod pool; +mod prog; +mod re_bytes; +mod re_unicode; +mod set; +mod sparse; + +/// The `internal` module exists to support the `regex!` macro and other +/// suspicious activity, such as testing different matching engines. +#[doc(hidden)] +pub mod internal { + pub use compile::Compiler; + pub use exec::{Exec, ExecBuilder}; + pub use input::{Char, Input, CharInput, InputAt}; + pub use literals::Literals; + pub use prog::{Program, Inst, EmptyLook, InstRanges}; + pub use re_unicode::{_Regex, ExNative}; +} diff --git a/deps/regex-0.1.58/src/literals.rs b/deps/regex-0.1.58/src/literals.rs new file mode 100644 index 000000000..5dbd6ef1b --- /dev/null +++ b/deps/regex-0.1.58/src/literals.rs @@ -0,0 +1,814 @@ +// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +use std::char; +use std::collections::HashSet; +use std::fmt; +use std::mem; + +use aho_corasick::{Automaton, AcAutomaton, FullAcAutomaton}; +use memchr::{memchr, memchr2, memchr3}; + +use utf8::encode_utf8; +use prog::{Program, Inst, InstBytes, InstRanges}; + +#[derive(Clone, Eq, PartialEq)] +pub struct AlternateLiterals { + at_match: bool, + literals: Vec<Vec<u8>>, +} + +impl AlternateLiterals { + pub fn into_matcher(self) -> Literals { + if self.literals.is_empty() { + Literals::empty() + } else { + let alts = self.unambiguous(); + let at_match = alts.at_match; + Literals { + at_match: at_match, + matcher: LiteralMatcher::new(alts), + } + } + } + + fn empty() -> AlternateLiterals { + AlternateLiterals { at_match: false, literals: vec![] } + } + + fn is_empty(&self) -> bool { + self.literals.is_empty() + } + + fn is_single_byte(&self) -> bool { + self.literals.len() == 1 && self.literals[0].len() == 1 + } + + fn all_single_bytes(&self) -> bool { + self.literals.len() >= 1 && self.literals.iter().all(|s| s.len() == 1) + } + + fn all_same_length(&self) -> bool { + if self.literals.is_empty() { + return true; + } + self.literals.iter().all(|s| s.len() == self.literals[0].len()) + } + + fn is_one_literal(&self) -> bool { + self.literals.len() == 1 + } + + fn distinct_single_bytes(&self) -> usize { + let mut seen = vec![false; 256]; + for lit in &self.literals { + if lit.len() == 1 { + seen[lit[0] as usize] = true; + } + } + seen.iter().filter(|yes| **yes).count() + } + + fn num_bytes(&self) -> usize { + self.literals.iter().map(|lit| lit.len()).fold(0, |acc, len| acc + len) + } + + fn add_alternates(&mut self, alts: AlternateLiterals) { + self.at_match = self.at_match && alts.at_match; + self.literals.extend(alts.literals); + } + + fn add_literal_char(&mut self, c: char) { + let scratch = &mut [0; 4]; + let n = encode_utf8(c, scratch).unwrap(); + for alt in &mut self.literals { + alt.extend(&scratch[0..n]); + } + } + + fn add_literal_char_ranges(&mut self, inst: &InstRanges) { + // This is tricky. We need to think of each range as its own set of + // alternations. For example, `[a-cx-z]` is comprised of two ranges: + // `a-c` and `x-z`. This is equivalent to the regex `a|b|c|x|y|z`. If + // we've already found two prefixes, e.g., `foo|bar`, then we need to + // extend all such prefixes with all alternates here. For e.g., `fooa`, + // ..., `fooz`, `bara`, ..., `barz`. + // + // To achieve this, we copy our existing literals for every char! + let scratch = &mut [0; 4]; + let nlits = self.literals.len(); + let orig = mem::replace(&mut self.literals, Vec::with_capacity(nlits)); + for &(s, e) in &inst.ranges { + for c in (s as u32)..(e as u32 + 1) { + for alt in &orig { + let mut alt = alt.clone(); + let ch = char::from_u32(c).unwrap(); + let n = encode_utf8(ch, scratch).unwrap(); + + alt.extend(&scratch[0..n]); + self.literals.push(alt); + } + } + } + } + + fn add_literal_byte_range(&mut self, inst: &InstBytes) { + // Pretty much the same process as for literal char ranges, but we + // only have one range. + let nlits = self.literals.len(); + let orig = mem::replace(&mut self.literals, Vec::with_capacity(nlits)); + for b in inst.start..(inst.end + 1) { + for alt in &orig { + let mut alt = alt.clone(); + alt.push(b); + self.literals.push(alt); + } + } + } + + /// Returns a new set of alternate literals that are guaranteed to be + /// unambiguous. + /// + /// State differently, the set of literals returned is guaranteed to never + /// result in any overlapping matches. + /// + /// Duplicate literals are dropped. Literals that are otherwise distinct + /// will be possibly truncated. + fn unambiguous(&self) -> AlternateLiterals { + fn position(needle: &[u8], mut haystack: &[u8]) -> Option<usize> { + let mut i = 0; + while haystack.len() >= needle.len() { + if needle == &haystack[..needle.len()] { + return Some(i); + } + i += 1; + haystack = &haystack[1..]; + } + None + } + + // This function is a bit gratuitous and allocation heavy, but in + // general, we limit the number of alternates to be pretty small. + + if self.all_same_length() { + return self.clone(); + } + let mut new = AlternateLiterals { + at_match: self.at_match, + literals: Vec::with_capacity(self.literals.len()), + }; +'OUTER: + for lit1 in &self.literals { + if new.literals.is_empty() { + new.literals.push(lit1.clone()); + continue; + } + let mut candidate = lit1.clone(); + for lit2 in &mut new.literals { + if &candidate == lit2 { + // If the literal is already in the set, then we can + // just drop it. + continue 'OUTER; + } + if lit1.len() <= lit2.len() { + if let Some(i) = position(&candidate, lit2) { + new.at_match = false; + lit2.truncate(i); + } + } else { + if let Some(i) = position(lit2, &candidate) { + new.at_match = false; + candidate.truncate(i); + } + } + } + new.literals.push(candidate); + } + new.literals.retain(|lit| !lit.is_empty()); + // This is OK only because the alternates are unambiguous. + new.literals.sort(); + new.literals.dedup(); + new + } +} + +struct BuildPrefixes<'a> { + insts: &'a Program, + limit: usize, + alts: AlternateLiterals, +} + +impl<'a> BuildPrefixes<'a> { + fn new(insts: &'a Program) -> Self { + BuildPrefixes { + insts: insts, + limit: 250, + alts: AlternateLiterals { at_match: true, literals: vec![] }, + } + } + + fn literals(mut self) -> AlternateLiterals { + let mut stack = vec![self.insts.skip(self.insts.start)]; + let mut seen = HashSet::new(); + while let Some(mut pc) = stack.pop() { + seen.insert(pc); + pc = self.insts.skip(pc); + if let Inst::Split(ref inst) = self.insts[pc] { + if !seen.contains(&inst.goto2) { + stack.push(inst.goto2); + } + if !seen.contains(&inst.goto1) { + stack.push(inst.goto1); + } + continue; + } + // When searching for required literals, set the local limit to + // something a bit less than our real limit. This prevents a single + // alternation from blowing our budget in most cases. (If a single + // alt blows the budget, then we can't consume literals from other + // alts, which means we end up with nothing to show for it.) + // + // For example, consider `a?[0-9]{3}`. This splits into two + // regexes `a[0-9]{3}` and `[0-9]{3}`. The latter regex can be + // expanded completely into a set of alternate literals that + // consumes exactly 3000 bytes. This is our entire budget if the + // limit is 3000. Therefore, we're left with no room to add the + // second branch (`a[0-9]{3}`) to our set of literals. If we can't + // represent all required alternates, then we have to give up. + // Therefore, as a heuristic, limit what each alternate is allowed + // to use. In this case, `[0-9]{3}` will only gather literals for + // `[0-9]{2}`, which leaves more than enough room for our second + // branch. + let alts = BuildRequiredLiterals::new(self.insts) + .set_limit(self.limit / 10) + .literals(pc); + if alts.is_empty() { + // If we couldn't find any literals required in this path + // through the program, then we can't conclude anything about + // prefix literals for this program. For example, if the regex + // is `a|b*`, then the second alternate has no prefix to search + // for. (`b*` matches the empty string!) + return AlternateLiterals::empty(); + } + if self.alts.num_bytes() + alts.num_bytes() > self.limit { + // We've blown our budget. Give up. + // We could do something a little smarter here and try to trim + // the literals we've got here. (e.g., If every literal is two + // characters, then it would be legal to remove the second char + // from every literal.) + return AlternateLiterals::empty(); + } + self.alts.add_alternates(alts); + } + self.alts + } +} + +pub struct BuildRequiredLiterals<'a> { + insts: &'a Program, + limit: usize, + alts: AlternateLiterals, +} + +impl<'a> BuildRequiredLiterals<'a> { + pub fn new(insts: &'a Program) -> Self { + BuildRequiredLiterals { + insts: insts, + limit: 250, + alts: AlternateLiterals { at_match: true, literals: vec![vec![]] }, + } + } + + pub fn set_limit(mut self, limit: usize) -> Self { + self.limit = limit; + self + } + + fn literals(mut self, mut pc: usize) -> AlternateLiterals { + use prog::Inst::*; + loop { + let inst = &self.insts[pc]; + match *inst { + Save(ref inst) => pc = inst.goto, + Char(ref inst) => { + if !self.add_literal_char(inst.c) { + self.alts.at_match = false; + break; + } + pc = inst.goto; + } + Ranges(ref inst) => { + if !self.add_literal_char_ranges(inst) { + self.alts.at_match = false; + break; + } + pc = inst.goto; + } + Bytes(ref inst) => { + if !self.add_literal_byte_range(inst) { + self.alts.at_match = false; + break; + } + pc = inst.goto; + } + Split(_) | EmptyLook(_) | Match(_) => { + self.alts.at_match = self.insts.leads_to_match(pc); + break; + } + } + } + if self.alts.literals.len() == 1 && self.alts.literals[0].is_empty() { + AlternateLiterals::empty() + } else { + self.alts + } + } + + fn add_literal_char(&mut self, c: char) -> bool { + if self.alts.num_bytes() + 1 > self.limit { + return false; + } + self.alts.add_literal_char(c); + true + } + + fn add_literal_char_ranges(&mut self, inst: &InstRanges) -> bool { + // Compute roughly how many bytes will be in our literals following + // the addition of the given ranges. If we blow our limit, then we + // can't add *any* of them. + let nchars = inst.num_chars(); + let new_byte_count = (self.alts.num_bytes() * nchars) + + (self.alts.literals.len() * nchars); + if new_byte_count > self.limit { + return false; + } + self.alts.add_literal_char_ranges(inst); + true + } + + fn add_literal_byte_range(&mut self, inst: &InstBytes) -> bool { + // Compute roughly how many bytes will be in our literals following + // the addition of the given range. If we blow our limit, then we + // can't add anything. + let nbytes = (inst.end as usize) - (inst.start as usize) + 1; + let new_byte_count = (self.alts.num_bytes() * nbytes) + + (self.alts.literals.len() * nbytes); + if new_byte_count > self.limit { + return false; + } + self.alts.add_literal_byte_range(inst); + true + } +} + +/// A prefix extracted from a compiled regular expression. +/// +/// A regex prefix is a set of literal strings that *must* be matched at the +/// beginning of a regex in order for the entire regex to match. +/// +/// There are a variety of ways to efficiently scan the search text for a +/// prefix. Currently, there are three implemented: +/// +/// 1. The prefix is a single byte. Just use memchr. +/// 2. If the prefix is a set of two or more single byte prefixes, then +/// a single sparse map is created. Checking if there is a match is a lookup +/// in this map for each byte in the search text. +/// 3. In all other cases, build an Aho-Corasick automaton. +/// +/// It's possible that there's room here for other substring algorithms, +/// such as Boyer-Moore for single-set prefixes greater than 1, or Rabin-Karp +/// for small sets of same-length prefixes. +#[derive(Clone)] +pub struct Literals { + at_match: bool, + matcher: LiteralMatcher, +} + +#[derive(Clone)] +enum LiteralMatcher { + /// No prefixes. (Never advances through the input.) + Empty, + /// A single byte prefix. + Byte(u8), + /// A set of two or more single byte prefixes. + Bytes { + chars: Vec<u8>, + sparse: Vec<bool>, + }, + /// A single substring. (Likely using Boyer-Moore with memchr.) + Single(SingleSearch), + /// An Aho-Corasick automaton. + AC(FullAcAutomaton<Vec<u8>>), +} + +impl Literals { + /// Returns a matcher that never matches and never advances the input. + pub fn empty() -> Self { + Literals { at_match: false, matcher: LiteralMatcher::Empty } + } + + /// Returns a matcher for literal prefixes in the given program. + pub fn prefixes(prog: &Program) -> Self { + BuildPrefixes::new(prog).literals().into_matcher() + } + + /// Returns true if and only if a literal match corresponds to a match + /// in the regex from which the literal was extracted. + pub fn at_match(&self) -> bool { + self.at_match && self.len() > 0 + } + + /// Find the position of a prefix in `haystack` if it exists. + /// + /// In the matching engines, we only actually need the starting index + /// because the prefix is used to only skip ahead---the matching engine + /// still needs to run over the prefix input. However, we return the ending + /// location as well in case the prefix corresponds to the entire regex, + /// in which case, you need the end of the match. + pub fn find(&self, haystack: &[u8]) -> Option<(usize, usize)> { + use self::LiteralMatcher::*; + match self.matcher { + Empty => Some((0, 0)), + Byte(b) => memchr(b, haystack).map(|i| (i, i+1)), + Bytes { ref sparse, ref chars } => { + if chars.len() == 2 { + memchr2(chars[0], chars[1], haystack).map(|i| (i, i+1)) + } else if chars.len() == 3 { + let (b0, b1, b2) = (chars[0], chars[1], chars[2]); + memchr3(b0, b1, b2, haystack).map(|i| (i, i+1)) + } else { + find_singles(sparse, haystack) + } + } + Single(ref searcher) => { + searcher.find(haystack).map(|i| (i, i + searcher.pat.len())) + } + AC(ref aut) => { + aut.find(haystack).next().map(|m| (m.start, m.end)) + } + } + } + + /// Returns true iff this prefix is empty. + pub fn is_empty(&self) -> bool { + self.len() == 0 + } + + /// Returns the number of prefixes in this machine. + pub fn len(&self) -> usize { + use self::LiteralMatcher::*; + match self.matcher { + Empty => 0, + Byte(_) => 1, + Bytes { ref chars, .. } => chars.len(), + Single(_) => 1, + AC(ref aut) => aut.len(), + } + } + + /// Return the approximate heap usage of literals in bytes. + pub fn approximate_size(&self) -> usize { + use self::LiteralMatcher::*; + match self.matcher { + Empty | Byte(_) => 0, + Bytes { ref chars, ref sparse } => { + (chars.len() * mem::size_of::<u8>()) + + (sparse.len() * mem::size_of::<bool>()) + } + Single(ref single) => { + (single.pat.len() * mem::size_of::<u8>()) + + (single.shift.len() * mem::size_of::<usize>()) + } + AC(ref aut) => aut.heap_bytes(), + } + } + + /// Returns all of the literal participating in this machine. + /// + /// For debug/testing only! (It allocates.) + #[allow(dead_code)] + fn strings(&self) -> Vec<String> { + self.byte_strings() + .into_iter() + .map(|p| String::from_utf8(p).unwrap()) + .collect() + } + + #[allow(dead_code)] + fn byte_strings(&self) -> Vec<Vec<u8>> { + use self::LiteralMatcher::*; + match self.matcher { + Empty => vec![], + Byte(b) => vec![vec![b]], + Bytes { ref chars, .. } => { + chars.iter().map(|&byte| vec![byte]).collect() + } + Single(ref searcher) => vec![searcher.pat.clone()], + AC(ref aut) => aut.patterns().iter().cloned().collect(), + } + } +} + +impl LiteralMatcher { + fn new(mut alts: AlternateLiterals) -> Self { + use self::LiteralMatcher::*; + + if alts.is_empty() { + Empty + } else if alts.distinct_single_bytes() >= 26 { + // Why do we do this? Well, it's a heuristic to prevent thrashing. + // Basically, if our literal matcher has lots of literals that are + // a single byte, then we lose a lot of the benefits of fast + // literal searching. In particular, single bytes have a high + // probability of matching. In a regex that rarely matches, we end + // up ping-ponging between the literal matcher and the regex engine + // for every byte of input. That's bad juju. + // + // Note that we only count distinct starting bytes from literals of + // length 1. For literals longer than that, we assume they have + // a lower probability of matching. + // + // This particular heuristic would be triggered on, e.g., + // `[a-z].+`. The prefix here is a single byte that is very likely + // to match on any given byte in the input, so it's quicker just + // to let the matching engine process it. + // + // TODO(burntsushi): Consider lowering the threshold! + Empty + } else if alts.is_single_byte() { + Byte(alts.literals[0][0]) + } else if alts.all_single_bytes() { + let mut set = vec![false; 256]; + let mut bytes = vec![]; + for lit in alts.literals { + bytes.push(lit[0]); + set[lit[0] as usize] = true; + } + Bytes { chars: bytes, sparse: set } + } else if alts.is_one_literal() { + Single(SingleSearch::new(alts.literals.pop().unwrap())) + } else { + AC(AcAutomaton::new(alts.literals).into_full()) + } + } +} + +/// Provides an implementation of fast subtring search. +/// +/// In particular, this uses Boyer-Moore-Horspool with Tim Raita's twist: +/// https://en.wikipedia.org/wiki/Raita_Algorithm +/// +/// I'm skeptical of the utility here, because benchmarks suggest that it is +/// difficult to beat Aho-Corasick on random text. Namely, both algorithms are +/// dominated by the performance of `memchr` for the leading byte prefix. +/// With that said, BMH does seem to surpass AC when the search text gets +/// longer (see the `easy0_1MB` vs. `easy1_1MB` benchmarks). +/// +/// More analysis needs to be done to test this on different search texts. +#[derive(Clone, Debug)] +pub struct SingleSearch { + pat: Vec<u8>, + shift: Vec<usize>, +} + +impl SingleSearch { + fn new(pat: Vec<u8>) -> SingleSearch { + assert!(pat.len() >= 1); + let mut shift = vec![pat.len(); 256]; + for i in 0..(pat.len() - 1) { + shift[pat[i] as usize] = pat.len() - i - 1; + } + SingleSearch { + pat: pat, + shift: shift, + } + } + + fn find(&self, haystack: &[u8]) -> Option<usize> { + let pat = &*self.pat; + if haystack.len() < pat.len() { + return None; + } + let mut i = match memchr(pat[0], haystack) { + None => return None, + Some(i) => i, + }; + while i <= haystack.len() - pat.len() { + let b = haystack[i + pat.len() - 1]; + if b == pat[pat.len() - 1] + && haystack[i] == pat[0] + && haystack[i + (pat.len() / 2)] == pat[pat.len() / 2] + && pat == &haystack[i..i + pat.len()] { + return Some(i); + } + i += self.shift[b as usize]; + i += match memchr(pat[0], &haystack[i..]) { + None => return None, + Some(i) => i, + }; + } + None + } +} + +/// A quick scan for multiple single byte prefixes using a sparse map. +fn find_singles( + sparse: &[bool], + text: &[u8], +) -> Option<(usize, usize)> { + for (hi, &b) in text.iter().enumerate() { + if sparse[b as usize] { + return Some((hi, hi+1)); + } + } + None +} + +impl fmt::Debug for AlternateLiterals { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + let mut strings = vec![]; + for lit in &self.literals { + strings.push(String::from_utf8_lossy(lit).into_owned()); + } + f.debug_struct("AlternateLiterals") + .field("at_match", &self.at_match) + .field("literals", &strings) + .finish() + } +} + +impl fmt::Debug for Literals { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + use self::LiteralMatcher::*; + try!(write!(f, "complete? {}, matcher: ", self.at_match)); + match self.matcher { + Empty => write!(f, "Empty"), + Byte(b) => write!(f, "one byte: {:?}", b as char), + Bytes { ref chars, .. } => { + let chars: Vec<String> = + chars.iter() + .map(|&c| format!("{:?}", c as char)) + .collect(); + write!(f, "alternate single bytes: {}", chars.join(", ")) + } + Single(ref searcher) => write!(f, "{:?}", searcher), + AC(ref aut) => write!(f, "{:?}", aut), + } + } +} + +#[cfg(test)] +mod tests { + use compile::Compiler; + use super::{AlternateLiterals, BuildPrefixes}; + use syntax::Expr; + + macro_rules! prog { + ($re:expr) => {{ + let expr = Expr::parse($re).unwrap(); + let prog = Compiler::new().compile(&[expr]).unwrap(); + prog + }} + } + + macro_rules! prefixes { + ($re:expr) => {{ + let p = prog!($re); + let prefixes = BuildPrefixes::new(&p).literals().into_matcher(); + assert!(!prefixes.at_match()); + prefixes.strings() + }} + } + macro_rules! prefixes_complete { + ($re:expr) => {{ + let p = prog!($re); + let prefixes = BuildPrefixes::new(&p).literals().into_matcher(); + assert!(prefixes.at_match()); + prefixes.strings() + }} + } + + #[test] + fn single() { + assert_eq!(prefixes_complete!("a"), vec!["a"]); + assert_eq!(prefixes_complete!("[a]"), vec!["a"]); + assert_eq!(prefixes!("a+"), vec!["a"]); + assert_eq!(prefixes!("(?:a)+"), vec!["a"]); + assert_eq!(prefixes!("(a)+"), vec!["a"]); + } + + #[test] + fn single_alt() { + assert_eq!(prefixes_complete!("a|b"), vec!["a", "b"]); + assert_eq!(prefixes_complete!("b|a"), vec!["b", "a"]); + assert_eq!(prefixes_complete!("[a]|[b]"), vec!["a", "b"]); + assert_eq!(prefixes!("a+|b"), vec!["a", "b"]); + assert_eq!(prefixes!("a|b+"), vec!["a", "b"]); + assert_eq!(prefixes!("(?:a+)|b"), vec!["a", "b"]); + assert_eq!(prefixes!("(a+)|b"), vec!["a", "b"]); + } + + #[test] + fn many() { + assert_eq!(prefixes_complete!("abcdef"), vec!["abcdef"]); + assert_eq!(prefixes!("abcdef+"), vec!["abcdef"]); + assert_eq!(prefixes!("(?:abcdef)+"), vec!["abcdef"]); + assert_eq!(prefixes!("(abcdef)+"), vec!["abcdef"]); + } + + #[test] + fn many_alt() { + assert_eq!(prefixes_complete!("abc|def"), vec!["abc", "def"]); + assert_eq!(prefixes_complete!("def|abc"), vec!["def", "abc"]); + assert_eq!(prefixes!("abc+|def"), vec!["abc", "def"]); + assert_eq!(prefixes!("abc|def+"), vec!["abc", "def"]); + assert_eq!(prefixes!("(?:abc)+|def"), vec!["abc", "def"]); + assert_eq!(prefixes!("(abc)+|def"), vec!["abc", "def"]); + } + + #[test] + fn class() { + assert_eq!(prefixes_complete!("[0-9]"), vec![ + "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", + ]); + assert_eq!(prefixes!("[0-9]+"), vec![ + "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", + ]); + } + + #[test] + fn preceding_alt() { + assert_eq!(prefixes!("(?:a|b).+"), vec!["a", "b"]); + assert_eq!(prefixes!("(a|b).+"), vec!["a", "b"]); + } + + #[test] + fn nested_alt() { + assert_eq!(prefixes_complete!("(a|b|c|d)"), + vec!["a", "b", "c", "d"]); + assert_eq!(prefixes_complete!("((a|b)|(c|d))"), + vec!["a", "b", "c", "d"]); + } + + #[test] + fn snowman() { + assert_eq!(prefixes_complete!("☃"), vec!["☃"]); + } + + macro_rules! alts { + ($($s:expr),*) => {{ + AlternateLiterals { + at_match: false, + literals: vec![$($s.as_bytes().to_owned()),*], + } + }} + } + + #[test] + fn unambiguous() { + let given = alts!("z", "azb"); + let expected = alts!("a", "z"); + assert_eq!(expected, given.unambiguous()); + + let given = alts!("zaaaaaaaaaa", "aa"); + let expected = alts!("aa", "z"); + assert_eq!(expected, given.unambiguous()); + + let given = alts!("Sherlock", "Watson"); + let expected = alts!("Sherlock", "Watson"); + assert_eq!(expected, given.unambiguous()); + + let given = alts!("abc", "bc"); + let expected = alts!("a", "bc"); + assert_eq!(expected, given.unambiguous()); + + let given = alts!("bc", "abc"); + let expected = alts!("a", "bc"); + assert_eq!(expected, given.unambiguous()); + + let given = alts!("a", "aa"); + let expected = alts!("a"); + assert_eq!(expected, given.unambiguous()); + + let given = alts!("ab", "a"); + let expected = alts!("a"); + assert_eq!(expected, given.unambiguous()); + } + + // That this test fails suggests that the literal finder needs to be + // completely rewritten. Ug. It's not that it is wrong currently, but + // it's not as good at finding literals as it should be. + /* + #[test] + fn non_contiguous() { + assert_eq!(prefixes_complete!("z(a|c)"), vec!["za", "zc"]); + } + */ +} diff --git a/deps/regex-0.1.58/src/nfa.rs b/deps/regex-0.1.58/src/nfa.rs new file mode 100644 index 000000000..508985d1b --- /dev/null +++ b/deps/regex-0.1.58/src/nfa.rs @@ -0,0 +1,360 @@ +// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +// This module implements the "NFA algorithm." That is, it guarantees linear +// time search of a regex on any text with memory use proportional to the size +// of the regex. +// +// It is equal in power to the backtracking engine in this crate, except the +// backtracking engine is typically faster on small regexes/texts at the +// expense of a bigger memory footprint. +// +// It can do more than the DFA can (specifically, record capture locations +// and execute word boundary assertions), but at a slower speed. Specifically, +// the NFA algorithm exectues a DFA implicitly by repeatedly expanding +// epsilon transitions. That is, the NFA engine can be in multiple states at +// once where as the DFA is only ever in one state at a time. +// +// Therefore, the NFA algorithm is generally treated as the fallback when the +// other matching engines either aren't feasible to run or are insufficient. + +use std::mem; + +use exec::Search; +use input::{Input, InputAt}; +use prog::{Program, InstPtr}; +use sparse::SparseSet; + +/// An NFA simulation matching engine. +#[derive(Debug)] +pub struct Nfa<'r, I> { + /// The sequence of opcodes (among other things) that is actually executed. + /// + /// The program may be byte oriented or Unicode codepoint oriented. + prog: &'r Program, + /// An explicit stack used for following epsilon transitions. (This is + /// borrowed from the cache.) + stack: &'r mut Vec<FollowEpsilon>, + /// The input to search. + input: I, +} + +/// A cached allocation that can be reused on each execution. +#[derive(Debug)] +pub struct NfaCache { + /// A pair of ordered sets for tracking NFA states. + clist: Threads, + nlist: Threads, + /// An explicit stack used for following epsilon transitions. + stack: Vec<FollowEpsilon>, +} + +/// An ordered set of NFA states and their captures. +#[derive(Debug)] +struct Threads { + /// An ordered set of opcodes (each opcode is an NFA state). + set: SparseSet, + /// Captures for every NFA state. + /// + /// It is stored in row-major order, where the columns are the capture + /// slots and the rows are the states. + caps: Vec<Option<usize>>, + /// The number of capture slots stored per thread. (Every capture has + /// two slots.) + slots_per_thread: usize, +} + +/// A representation of an explicit stack frame when following epsilon +/// transitions. This is used to avoid recursion. +#[derive(Debug)] +enum FollowEpsilon { + /// Follow transitions at the given instruction pointer. + IP(InstPtr), + /// Restore the capture slot with the given position in the input. + Capture { slot: usize, pos: Option<usize> }, +} + +impl NfaCache { + /// Create a new allocation used by the NFA machine to record execution + /// and captures. + pub fn new() -> Self { + NfaCache { + clist: Threads::new(), + nlist: Threads::new(), + stack: vec![], + } + } +} + +impl<'r, I: Input> Nfa<'r, I> { + /// Execute the NFA matching engine. + /// + /// If there's a match, `exec` returns `true` and populates the given + /// captures accordingly. + pub fn exec( + prog: &'r Program, + search: &mut Search, + input: I, + start: usize, + ) -> bool { + let mut _cache = prog.cache_nfa(); + let mut cache = &mut **_cache; + cache.clist.resize(prog.len(), prog.captures.len()); + cache.nlist.resize(prog.len(), prog.captures.len()); + let at = input.at(start); + Nfa { + prog: prog, + stack: &mut cache.stack, + input: input, + }.exec_(&mut cache.clist, &mut cache.nlist, search, at) + } + + fn exec_( + &mut self, + mut clist: &mut Threads, + mut nlist: &mut Threads, + mut search: &mut Search, + mut at: InputAt, + ) -> bool { + let mut matched = false; + clist.set.clear(); + nlist.set.clear(); +'LOOP: loop { + if clist.set.is_empty() { + // Three ways to bail out when our current set of threads is + // empty. + // + // 1. We have a match---so we're done exploring any possible + // alternatives. Time to quit. + // + // 2. If the expression starts with a '^' we can terminate as + // soon as the last thread dies. + if matched || (!at.is_start() && self.prog.is_anchored_start) { + break; + } + + // 3. If there's a literal prefix for the program, try to + // jump ahead quickly. If it can't be found, then we can + // bail out early. + if !self.prog.prefixes.is_empty() { + at = match self.input.prefix_at(&self.prog.prefixes, at) { + None => break, + Some(at) => at, + }; + } + } + + // This simulates a preceding '.*?' for every regex by adding + // a state starting at the current position in the input for the + // beginning of the program only if we don't already have a match. + if clist.set.is_empty() || (!self.prog.is_anchored_start && !matched) { + self.add(&mut clist, &mut search.captures, 0, at) + } + // The previous call to "add" actually inspects the position just + // before the current character. For stepping through the machine, + // we can to look at the current character, so we advance the + // input. + let at_next = self.input.at(at.next_pos()); + for i in 0..clist.set.len() { + let ip = clist.set[i]; + let step = self.step( + &mut nlist, + search, + clist.caps(ip), + ip, + at, + at_next, + ); + if step { + if !matched { + matched = search.matched_all(); + } + if search.quit_after_first_match() { + // If we only care if a match occurs (not its + // position), then we can quit right now. + break 'LOOP; + } + if !search.find_many_matches() { + // We don't need to check the rest of the threads + // in this set because we've matched something + // ("leftmost-first"). However, we still need to check + // threads in the next set to support things like + // greedy matching. + // + // This is only true on normal regexes. For regex sets, + // we need to mush on to observe other matches. + break; + } + } + } + if at.is_end() { + break; + } + at = at_next; + mem::swap(clist, nlist); + nlist.set.clear(); + } + matched + } + + /// Step through the input, one token (byte or codepoint) at a time. + /// + /// nlist is the set of states that will be processed on the next token + /// in the input. + /// + /// caps is the set of captures passed by the caller of the NFA. They are + /// written to only when a match state is visited. + /// + /// thread_caps is the set of captures set for the current NFA state, ip. + /// + /// at and at_next are the current and next positions in the input. at or + /// at_next may be EOF. + fn step( + &mut self, + nlist: &mut Threads, + search: &mut Search, + thread_caps: &mut [Option<usize>], + ip: usize, + at: InputAt, + at_next: InputAt, + ) -> bool { + use prog::Inst::*; + match self.prog[ip] { + Match(match_slot) => { + search.copy_captures_from(thread_caps); + search.set_match(match_slot); + true + } + Char(ref inst) => { + if inst.c == at.char() { + self.add(nlist, thread_caps, inst.goto, at_next); + } + false + } + Ranges(ref inst) => { + if inst.matches(at.char()) { + self.add(nlist, thread_caps, inst.goto, at_next); + } + false + } + Bytes(ref inst) => { + if let Some(b) = at.byte() { + if inst.matches(b) { + self.add(nlist, thread_caps, inst.goto, at_next); + } + } + false + } + EmptyLook(_) | Save(_) | Split(_) => false, + } + } + + /// Follows epsilon transitions and adds them for processing to nlist, + /// starting at and including ip. + /// + /// N.B. The inline(always) appears to increase throughput by about + /// 20% on micro-benchmarks. + #[inline(always)] + fn add( + &mut self, + nlist: &mut Threads, + thread_caps: &mut [Option<usize>], + ip: usize, + at: InputAt, + ) { + self.stack.push(FollowEpsilon::IP(ip)); + while let Some(frame) = self.stack.pop() { + match frame { + FollowEpsilon::IP(ip) => { + self.add_step(nlist, thread_caps, ip, at); + } + FollowEpsilon::Capture { slot, pos } => { + thread_caps[slot] = pos; + } + } + } + } + + /// A helper function for add that avoids excessive pushing to the stack. + fn add_step( + &mut self, + nlist: &mut Threads, + thread_caps: &mut [Option<usize>], + mut ip: usize, + at: InputAt, + ) { + // Instead of pushing and popping to the stack, we mutate ip as we + // traverse the set of states. We only push to the stack when we + // absolutely need recursion (restoring captures or following a + // branch). + use prog::Inst::*; + loop { + // Don't visit states we've already added. + if nlist.set.contains_ip(ip) { + return; + } + nlist.set.add(ip); + match self.prog[ip] { + EmptyLook(ref inst) => { + let prev = self.input.previous_char(at); + let next = self.input.next_char(at); + if inst.matches(prev, next) { + ip = inst.goto; + } + } + Save(ref inst) => { + if inst.slot < thread_caps.len() { + self.stack.push(FollowEpsilon::Capture { + slot: inst.slot, + pos: thread_caps[inst.slot], + }); + thread_caps[inst.slot] = Some(at.pos()); + } + ip = inst.goto; + } + Split(ref inst) => { + self.stack.push(FollowEpsilon::IP(inst.goto2)); + ip = inst.goto1; + } + Match(_) | Char(_) | Ranges(_) | Bytes(_) => { + let mut t = &mut nlist.caps(ip); + for (slot, val) in t.iter_mut().zip(thread_caps.iter()) { + *slot = *val; + } + return; + } + } + } + } +} + +impl Threads { + fn new() -> Self { + Threads { + set: SparseSet::new(0), + caps: vec![], + slots_per_thread: 0, + } + } + + fn resize(&mut self, num_insts: usize, ncaps: usize) { + if num_insts == self.set.capacity() { + return; + } + self.slots_per_thread = ncaps * 2; + self.set = SparseSet::new(num_insts); + self.caps = vec![None; self.slots_per_thread * num_insts]; + } + + fn caps(&mut self, pc: usize) -> &mut [Option<usize>] { + let i = pc * self.slots_per_thread; + &mut self.caps[i..i + self.slots_per_thread] + } +} diff --git a/deps/regex-0.1.48/src/pool.rs b/deps/regex-0.1.58/src/pool.rs similarity index 100% rename from deps/regex-0.1.48/src/pool.rs rename to deps/regex-0.1.58/src/pool.rs diff --git a/deps/regex-0.1.58/src/prog.rs b/deps/regex-0.1.58/src/prog.rs new file mode 100644 index 000000000..f58acc417 --- /dev/null +++ b/deps/regex-0.1.58/src/prog.rs @@ -0,0 +1,474 @@ +use std::collections::HashMap; +use std::cmp::Ordering; +use std::fmt; +use std::ops::Deref; +use std::mem; +use std::slice; +use std::sync::Arc; + +use backtrack::BacktrackCache; +use dfa::DfaCache; +use input::Char; +use literals::Literals; +use nfa::NfaCache; +use pool::{Pool, PoolGuard}; + +/// InstPtr represents the index of an instruction in a regex program. +pub type InstPtr = usize; + +/// Program is a sequence of instructions and various facts about thos +/// instructions. +#[derive(Clone)] +pub struct Program { + /// A sequence of instructions that represents an NFA. + pub insts: Vec<Inst>, + /// Pointers to each Match instruction in the sequence. + /// + /// This is always length 1 unless this program represents a regex set. + pub matches: Vec<InstPtr>, + /// The ordered sequence of all capture groups extracted from the AST. + /// Unnamed groups are `None`. + pub captures: Vec<Option<String>>, + /// Pointers to all named capture groups into `captures`. + pub capture_name_idx: Arc<HashMap<String, usize>>, + /// A pointer to the start instruction. This can vary depending on how + /// the program was compiled. For example, programs for use with the DFA + /// engine have a `.*?` inserted at the beginning of unanchored regular + /// expressions. The actual starting point of the program is after the + /// `.*?`. + pub start: InstPtr, + /// A set of equivalence classes for discriminating bytes in the compiled + /// program. + pub byte_classes: Vec<u8>, + /// When true, this program can only match valid UTF-8. + pub only_utf8: bool, + /// When true, this program uses byte range instructions instead of Unicode + /// range instructions. + pub is_bytes: bool, + /// When true, the program is compiled for DFA matching. For example, this + /// implies `is_bytes` and also inserts a preceding `.*?` for unanchored + /// regexes. + pub is_dfa: bool, + /// When true, the program matches text in reverse (for use only in the + /// DFA). + pub is_reverse: bool, + /// Whether the regex must match from the start of the input. + pub is_anchored_start: bool, + /// Whether the regex must match at the end of the input. + pub is_anchored_end: bool, + /// A possibly empty machine for very quickly matching prefix literals. + pub prefixes: Literals, + /// Caches for use by the matching engines. + pub cache: EngineCache, +} + +impl Program { + /// Creates an empty instruction sequence. Fields are given default + /// values. + pub fn new() -> Self { + Program { + insts: vec![], + matches: vec![], + captures: vec![], + capture_name_idx: Arc::new(HashMap::new()), + start: 0, + byte_classes: vec![], + only_utf8: true, + is_bytes: false, + is_dfa: false, + is_reverse: false, + is_anchored_start: false, + is_anchored_end: false, + prefixes: Literals::empty(), + cache: EngineCache::new(), + } + } + + /// If pc is an index to a no-op instruction (like Save), then return the + /// next pc that is not a no-op instruction. + pub fn skip(&self, mut pc: usize) -> usize { + loop { + match self[pc] { + Inst::Save(ref i) => pc = i.goto, + _ => return pc, + } + } + } + + /// Return true if and only if an execution engine at instruction `pc` will + /// always lead to a match. + pub fn leads_to_match(&self, pc: usize) -> bool { + if self.matches.len() > 1 { + // If we have a regex set, then we have more than one ending + // state, so leading to one of those states is generally + // meaningless. + return false; + } + match self[self.skip(pc)] { + Inst::Match(_) => true, + _ => false, + } + } + + /// Returns true if the current configuration demands that an implicit + /// `.*?` be prepended to the instruction sequence. + pub fn needs_dotstar(&self) -> bool { + self.is_dfa && !self.is_reverse && !self.is_anchored_start + } + + /// Returns true if this program uses Byte instructions instead of + /// Char/Range instructions. + pub fn uses_bytes(&self) -> bool { + self.is_bytes || self.is_dfa || !self.only_utf8 + } + + /// Returns true if this program exclusively matches valid UTF-8 bytes. + /// + /// That is, if an invalid UTF-8 byte is seen, then no match is possible. + pub fn only_utf8(&self) -> bool { + self.only_utf8 + } + + /// Retrieve cached state for NFA execution. + pub fn cache_nfa(&self) -> PoolGuard<Box<NfaCache>> { + self.cache.nfa.get() + } + + /// Retrieve cached state for backtracking execution. + pub fn cache_backtrack(&self) -> PoolGuard<Box<BacktrackCache>> { + self.cache.backtrack.get() + } + + /// Retrieve cached state for DFA execution. + pub fn cache_dfa(&self) -> PoolGuard<Box<DfaCache>> { + self.cache.dfa.get() + } + + /// Return the approximate heap usage of this instruction sequence in + /// bytes. + pub fn approximate_size(&self) -> usize { + // The only instruction that uses heap space is Ranges (for + // Unicode codepoint programs) to store non-overlapping codepoint + // ranges. To keep this operation constant time, we ignore them. + self.len() * mem::size_of::<Inst>() + } +} + +impl Deref for Program { + type Target = [Inst]; + + fn deref(&self) -> &Self::Target { + &*self.insts + } +} + +impl fmt::Debug for Program { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + use self::Inst::*; + + fn with_goto(cur: usize, goto: usize, fmtd: String) -> String { + if goto == cur + 1 { + fmtd + } else { + format!("{} (goto: {})", fmtd, goto) + } + } + + fn visible_byte(b: u8) -> String { + use std::ascii::escape_default; + let escaped = escape_default(b).collect::<Vec<u8>>(); + String::from_utf8_lossy(&escaped).into_owned() + } + + try!(writeln!(f, "--------------------------------")); + for (pc, inst) in self.iter().enumerate() { + match *inst { + Match(slot) => { + try!(writeln!(f, "{:04} Match({:?})", pc, slot)) + } + Save(ref inst) => { + let s = format!("{:04} Save({})", pc, inst.slot); + try!(writeln!(f, "{}", with_goto(pc, inst.goto, s))); + } + Split(ref inst) => { + try!(writeln!(f, "{:04} Split({}, {})", + pc, inst.goto1, inst.goto2)); + } + EmptyLook(ref inst) => { + let s = format!("{:?}", inst.look); + try!(writeln!(f, "{:04} {}", + pc, with_goto(pc, inst.goto, s))); + } + Char(ref inst) => { + let s = format!("{:?}", inst.c); + try!(writeln!(f, "{:04} {}", + pc, with_goto(pc, inst.goto, s))); + } + Ranges(ref inst) => { + let ranges = inst.ranges + .iter() + .map(|r| format!("{:?}-{:?}", r.0, r.1)) + .collect::<Vec<String>>() + .join(", "); + let s = format!("{}", ranges); + try!(writeln!(f, "{:04} {}", + pc, with_goto(pc, inst.goto, s))); + } + Bytes(ref inst) => { + let s = format!( + "Bytes({}, {})", + visible_byte(inst.start), + visible_byte(inst.end)); + try!(writeln!(f, "{:04} {}", + pc, with_goto(pc, inst.goto, s))); + } + } + } + try!(writeln!(f, "--------------------------------")); + Ok(()) + } +} + +impl<'a> IntoIterator for &'a Program { + type Item = &'a Inst; + type IntoIter = slice::Iter<'a, Inst>; + fn into_iter(self) -> Self::IntoIter { self.iter() } +} + +/// EngineCache maintains reusable allocations for each matching engine +/// available to a particular program. +/// +/// The allocations are created lazily, so we don't pay for caches that +/// aren't used. +/// +/// N.B. These are all behind a pointer because it's fewer bytes to memcpy. +/// These caches are pushed/popped from the pool a lot, and a smaller +/// footprint can have an impact on matching small inputs. See, for example, +/// the hard_32 benchmark. +#[derive(Debug)] +pub struct EngineCache { + nfa: Pool<Box<NfaCache>>, + backtrack: Pool<Box<BacktrackCache>>, + dfa: Pool<Box<DfaCache>>, +} + +impl EngineCache { + fn new() -> Self { + EngineCache { + nfa: Pool::new(Box::new(|| Box::new(NfaCache::new()))), + backtrack: Pool::new(Box::new(|| Box::new(BacktrackCache::new()))), + dfa: Pool::new(Box::new(|| Box::new(DfaCache::new()))), + } + } +} + +impl Clone for EngineCache { + fn clone(&self) -> EngineCache { + EngineCache::new() + } +} + +/// Inst is an instruction code in a Regex program. +/// +/// Regrettably, a regex program either contains Unicode codepoint +/// instructions (Char and Ranges) or it contains byte instructions (Bytes). +/// A regex program can never contain both. +/// +/// It would be worth investigating splitting this into two distinct types and +/// then figuring out how to make the matching engines polymorphic over those +/// types without sacrificing performance. +/// +/// Other than the benefit of moving invariants into the type system, another +/// benefit is the decreased size. If we remove the `Char` and `Ranges` +/// instructions from the `Inst` enum, then its size shrinks from 40 bytes to +/// 24 bytes. (This is because of the removal of a `Vec` in the `Ranges` +/// variant.) Given that byte based machines are typically much bigger than +/// their Unicode analogues (because they can decode UTF-8 directly), this ends +/// up being a pretty significant savings. +#[derive(Clone, Debug)] +pub enum Inst { + /// Match indicates that the program has reached a match state. + /// + /// The number in the match corresponds to the Nth logical regular + /// expression in this program. This index is always 0 for normal regex + /// programs. Values greater than 0 appear when compiling regex sets, and + /// each match instruction gets its own unique value. The value corresponds + /// to the Nth regex in the set. + Match(usize), + /// Save causes the program to save the current location of the input in + /// the slot indicated by InstSave. + Save(InstSave), + /// Split causes the program to diverge to one of two paths in the + /// program, preferring goto1 in InstSplit. + Split(InstSplit), + /// EmptyLook represents a zero-width assertion in a regex program. A + /// zero-width assertion does not consume any of the input text. + EmptyLook(InstEmptyLook), + /// Char requires the regex program to match the character in InstChar at + /// the current position in the input. + Char(InstChar), + /// Ranges requires the regex program to match the character at the current + /// position in the input with one of the ranges specified in InstRanges. + Ranges(InstRanges), + /// Bytes is like Ranges, except it expresses a single byte range. It is + /// used in conjunction with Split instructions to implement multi-byte + /// character classes. + Bytes(InstBytes), +} + +/// Representation of the Save instruction. +#[derive(Clone, Debug)] +pub struct InstSave { + /// The next location to execute in the program. + pub goto: InstPtr, + /// The capture slot (there are two slots for every capture in a regex, + /// including the zeroth capture for the entire match). + pub slot: usize, +} + +/// Representation of the Split instruction. +#[derive(Clone, Debug)] +pub struct InstSplit { + /// The first instruction to try. A match resulting from following goto1 + /// has precedence over a match resulting from following goto2. + pub goto1: InstPtr, + /// The second instruction to try. A match resulting from following goto1 + /// has precedence over a match resulting from following goto2. + pub goto2: InstPtr, +} + +/// Representation of the EmptyLook instruction. +#[derive(Clone, Debug)] +pub struct InstEmptyLook { + /// The next location to execute in the program if this instruction + /// succeeds. + pub goto: InstPtr, + /// The type of zero-width assertion to check. + pub look: EmptyLook, +} + +/// The set of zero-width match instructions. +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EmptyLook { + /// Start of line or input. + StartLine, + /// End of line or input. + EndLine, + /// Start of input. + StartText, + /// End of input. + EndText, + /// Word character on one side and non-word character on other. + WordBoundary, + /// Word character on both sides or non-word character on both sides. + NotWordBoundary, + /// ASCII word boundary. + WordBoundaryAscii, + /// Not ASCII word boundary. + NotWordBoundaryAscii, +} + +impl InstEmptyLook { + /// Tests whether the pair of characters matches this zero-width + /// instruction. + pub fn matches(&self, c1: Char, c2: Char) -> bool { + use self::EmptyLook::*; + match self.look { + StartLine => c1.is_none() || c1 == '\n', + EndLine => c2.is_none() || c2 == '\n', + StartText => c1.is_none(), + EndText => c2.is_none(), + WordBoundary => { + let (w1, w2) = (c1.is_word_char(), c2.is_word_char()); + w1 ^ w2 + } + NotWordBoundary => { + let (w1, w2) = (c1.is_word_char(), c2.is_word_char()); + !(w1 ^ w2) + } + WordBoundaryAscii => { + let (w1, w2) = (c1.is_word_byte(), c2.is_word_byte()); + w1 ^ w2 + } + NotWordBoundaryAscii => { + let (w1, w2) = (c1.is_word_byte(), c2.is_word_byte()); + !(w1 ^ w2) + } + } + } +} + +/// Representation of the Char instruction. +#[derive(Clone, Debug)] +pub struct InstChar { + /// The next location to execute in the program if this instruction + /// succeeds. + pub goto: InstPtr, + /// The character to test. + pub c: char, +} + +/// Representation of the Ranges instruction. +#[derive(Clone, Debug)] +pub struct InstRanges { + /// The next location to execute in the program if this instruction + /// succeeds. + pub goto: InstPtr, + /// The set of Unicode scalar value ranges to test. + pub ranges: Vec<(char, char)>, +} + +impl InstRanges { + /// Tests whether the given input character matches this instruction. + #[inline(always)] // About ~5-15% more throughput then `#[inline]` + pub fn matches(&self, c: Char) -> bool { + // This speeds up the `match_class_unicode` benchmark by checking + // some common cases quickly without binary search. e.g., Matching + // a Unicode class on predominantly ASCII text. + for r in self.ranges.iter().take(4) { + if c < r.0 { + return false; + } + if c <= r.1 { + return true; + } + } + self.ranges.binary_search_by(|r| { + if r.1 < c { + Ordering::Less + } else if r.0 > c { + Ordering::Greater + } else { + Ordering::Equal + } + }).is_ok() + } + + /// Return the number of distinct characters represented by all of the + /// ranges. + pub fn num_chars(&self) -> usize { + self.ranges.iter() + .map(|&(s, e)| 1 + (e as u32) - (s as u32)) + .fold(0, |acc, len| acc + len) + as usize + } +} + +/// Representation of the Bytes instruction. +#[derive(Clone, Debug)] +pub struct InstBytes { + /// The next location to execute in the program if this instruction + /// succeeds. + pub goto: InstPtr, + /// The start (inclusive) of this byte range. + pub start: u8, + /// The end (inclusive) of this byte range. + pub end: u8, +} + +impl InstBytes { + /// Returns true if and only if the given byte is in this range. + pub fn matches(&self, byte: u8) -> bool { + self.start <= byte && byte <= self.end + } +} diff --git a/deps/regex-0.1.58/src/re_bytes.rs b/deps/regex-0.1.58/src/re_bytes.rs new file mode 100644 index 000000000..427cf7701 --- /dev/null +++ b/deps/regex-0.1.58/src/re_bytes.rs @@ -0,0 +1,963 @@ +// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +use std::borrow::Cow; +use std::collections::HashMap; +use std::collections::hash_map; +use std::fmt; +use std::ops::Index; +use std::str::FromStr; +use std::sync::Arc; + +use memchr::memchr; + +use exec::{Exec, ExecBuilder, Search, CaptureSlots}; +use expand::expand; +use error::Error; + +pub use set::RegexSetBytes as RegexSet; +pub use set::SetMatchesBytes as SetMatches; +pub use set::SetMatchesIterBytes as SetMatchesIterBytes; +pub use set::SetMatchesIntoIterBytes as SetMatchesIntoIterBytes; + +/// A compiled regular expression for matching arbitrary bytes. +/// +/// It can be used to search, split or replace text. All searching is done with +/// an implicit `.*?` at the beginning and end of an expression. To force an +/// expression to match the whole string (or a prefix or a suffix), you must +/// use an anchor like `^` or `$` (or `\A` and `\z`). +/// +/// Like the `Regex` type in the parent module, matches with this regex return +/// byte offsets into the search text. **Unlike** the parent `Regex` type, +/// these byte offsets may not correspond to UTF-8 sequence boundaries since +/// the regexes in this module can match arbitrary bytes. +pub struct Regex(Exec); + +impl fmt::Display for Regex { + /// Shows the original regular expression. + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + write!(f, "{}", self.as_str()) + } +} + +impl fmt::Debug for Regex { + /// Shows the original regular expression. + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fmt::Display::fmt(self, f) + } +} + +/// A constructor for Regex from an Exec. +/// +/// This is hidden because Exec isn't actually part of the public API. +#[doc(hidden)] +impl From<Exec> for Regex { + fn from(exec: Exec) -> Regex { + Regex(exec) + } +} + +impl FromStr for Regex { + type Err = Error; + + /// Attempts to parse a string into a regular expression + fn from_str(s: &str) -> Result<Regex, Error> { + Regex::new(s) + } +} + +impl Regex { + /// Compiles a regular expression. Once compiled, it can be used repeatedly + /// to search, split or replace text in a string. + /// + /// If an invalid expression is given, then an error is returned. + pub fn new(re: &str) -> Result<Regex, Error> { + Regex::with_size_limit(10 * (1 << 20), re) + } + + /// Compiles a regular expression with the given size limit. + /// + /// The size limit is applied to the size of the *compiled* data structure. + /// If the data structure exceeds the size given, then an error is + /// returned. + pub fn with_size_limit(size: usize, re: &str) -> Result<Regex, Error> { + ExecBuilder::new(re) + .only_utf8(false) + .size_limit(size) + .build() + .map(Regex) + } + + /// Returns true if and only if the regex matches the string given. + /// + /// It is recommended to use this method if all you need to do is test + /// a match, since the underlying matching engine may be able to do less + /// work. + /// + /// # Example + /// + /// Test if some text contains at least one word with exactly 13 ASCII word + /// bytes: + /// + /// ```rust + /// # extern crate regex; use regex::bytes::Regex; + /// # fn main() { + /// let text = b"I categorically deny having triskaidekaphobia."; + /// assert!(Regex::new(r"\b\w{13}\b").unwrap().is_match(text)); + /// # } + /// ``` + pub fn is_match(&self, text: &[u8]) -> bool { + self.exec(&mut [], text, 0) + } + + /// Returns the start and end byte range of the leftmost-first match in + /// `text`. If no match exists, then `None` is returned. + /// + /// Note that this should only be used if you want to discover the position + /// of the match. Testing the existence of a match is faster if you use + /// `is_match`. + /// + /// # Example + /// + /// Find the start and end location of the first word with exactly 13 + /// ASCII word bytes: + /// + /// ```rust + /// # extern crate regex; use regex::bytes::Regex; + /// # fn main() { + /// let text = b"I categorically deny having triskaidekaphobia."; + /// let pos = Regex::new(r"\b\w{13}\b").unwrap().find(text); + /// assert_eq!(pos, Some((2, 15))); + /// # } + /// ``` + pub fn find(&self, text: &[u8]) -> Option<(usize, usize)> { + let mut caps = [None, None]; + if !self.exec(&mut caps, text, 0) { + None + } else { + Some((caps[0].unwrap(), caps[1].unwrap())) + } + } + + /// Returns an iterator for each successive non-overlapping match in + /// `text`, returning the start and end byte indices with respect to + /// `text`. + /// + /// # Example + /// + /// Find the start and end location of every word with exactly 13 ASCII + /// word bytes: + /// + /// ```rust + /// # extern crate regex; use regex::bytes::Regex; + /// # fn main() { + /// let text = b"Retroactively relinquishing remunerations is reprehensible."; + /// for pos in Regex::new(r"\b\w{13}\b").unwrap().find_iter(text) { + /// println!("{:?}", pos); + /// } + /// // Output: + /// // (0, 13) + /// // (14, 27) + /// // (28, 41) + /// // (45, 58) + /// # } + /// ``` + pub fn find_iter<'r, 't>(&'r self, text: &'t [u8]) -> FindMatches<'r, 't> { + FindMatches { + re: self, + text: text, + last_end: 0, + last_match: None, + } + } + + /// Returns the capture groups corresponding to the leftmost-first + /// match in `text`. Capture group `0` always corresponds to the entire + /// match. If no match is found, then `None` is returned. + /// + /// You should only use `captures` if you need access to submatches. + /// Otherwise, `find` is faster for discovering the location of the overall + /// match. + /// + /// # Examples + /// + /// Say you have some text with movie names and their release years, + /// like "'Citizen Kane' (1941)". It'd be nice if we could search for text + /// looking like that, while also extracting the movie name and its release + /// year separately. + /// + /// ```rust + /// # extern crate regex; use regex::bytes::Regex; + /// # fn main() { + /// let re = Regex::new(r"'([^']+)'\s+\((\d{4})\)").unwrap(); + /// let text = b"Not my favorite movie: 'Citizen Kane' (1941)."; + /// let caps = re.captures(text).unwrap(); + /// assert_eq!(caps.at(1), Some(&b"Citizen Kane"[..])); + /// assert_eq!(caps.at(2), Some(&b"1941"[..])); + /// assert_eq!(caps.at(0), Some(&b"'Citizen Kane' (1941)"[..])); + /// // You can also access the groups by index using the Index notation. + /// // Note that this will panic on an invalid index. + /// assert_eq!(&caps[1], b"Citizen Kane"); + /// assert_eq!(&caps[2], b"1941"); + /// assert_eq!(&caps[0], b"'Citizen Kane' (1941)"); + /// # } + /// ``` + /// + /// Note that the full match is at capture group `0`. Each subsequent + /// capture group is indexed by the order of its opening `(`. + /// + /// We can make this example a bit clearer by using *named* capture groups: + /// + /// ```rust + /// # extern crate regex; use regex::bytes::Regex; + /// # fn main() { + /// let re = Regex::new(r"'(?P<title>[^']+)'\s+\((?P<year>\d{4})\)") + /// .unwrap(); + /// let text = b"Not my favorite movie: 'Citizen Kane' (1941)."; + /// let caps = re.captures(text).unwrap(); + /// assert_eq!(caps.name("title"), Some(&b"Citizen Kane"[..])); + /// assert_eq!(caps.name("year"), Some(&b"1941"[..])); + /// assert_eq!(caps.at(0), Some(&b"'Citizen Kane' (1941)"[..])); + /// // You can also access the groups by name using the Index notation. + /// // Note that this will panic on an invalid group name. + /// assert_eq!(&caps["title"], b"Citizen Kane"); + /// assert_eq!(&caps["year"], b"1941"); + /// assert_eq!(&caps[0], b"'Citizen Kane' (1941)"); + /// + /// # } + /// ``` + /// + /// Here we name the capture groups, which we can access with the `name` + /// method or the `Index` notation with a `&str`. Note that the named + /// capture groups are still accessible with `at` or the `Index` notation + /// with a `usize`. + /// + /// The `0`th capture group is always unnamed, so it must always be + /// accessed with `at(0)` or `[0]`. + pub fn captures<'t>(&self, text: &'t [u8]) -> Option<Captures<'t>> { + let mut caps = self.alloc_captures(); + if !self.exec(&mut caps, text, 0) { + None + } else { + Some(Captures { + text: text, + caps: caps, + named_groups: self.0.capture_name_idx().clone(), + }) + } + } + + /// Returns an iterator over all the non-overlapping capture groups matched + /// in `text`. This is operationally the same as `find_iter`, except it + /// yields information about submatches. + /// + /// # Example + /// + /// We can use this to find all movie titles and their release years in + /// some text, where the movie is formatted like "'Title' (xxxx)": + /// + /// ```rust + /// # extern crate regex; use std::str; use regex::bytes::Regex; + /// # fn main() { + /// let re = Regex::new(r"'(?P<title>[^']+)'\s+\((?P<year>\d{4})\)") + /// .unwrap(); + /// let text = b"'Citizen Kane' (1941), 'The Wizard of Oz' (1939), 'M' (1931)."; + /// for caps in re.captures_iter(text) { + /// let title = str::from_utf8(&caps["title"]).unwrap(); + /// let year = str::from_utf8(&caps["year"]).unwrap(); + /// println!("Movie: {:?}, Released: {:?}", title, year); + /// } + /// // Output: + /// // Movie: Citizen Kane, Released: 1941 + /// // Movie: The Wizard of Oz, Released: 1939 + /// // Movie: M, Released: 1931 + /// # } + /// ``` + pub fn captures_iter<'r, 't>( + &'r self, + text: &'t [u8], + ) -> FindCaptures<'r, 't> { + FindCaptures { + re: self, + text: text, + last_end: 0, + last_match: None, + } + } + + /// Returns an iterator of substrings of `text` delimited by a match of the + /// regular expression. Namely, each element of the iterator corresponds to + /// text that *isn't* matched by the regular expression. + /// + /// This method will *not* copy the text given. + /// + /// # Example + /// + /// To split a string delimited by arbitrary amounts of spaces or tabs: + /// + /// ```rust + /// # extern crate regex; use regex::bytes::Regex; + /// # fn main() { + /// let re = Regex::new(r"[ \t]+").unwrap(); + /// let fields: Vec<&[u8]> = re.split(b"a b \t c\td e").collect(); + /// assert_eq!(fields, vec![ + /// &b"a"[..], &b"b"[..], &b"c"[..], &b"d"[..], &b"e"[..], + /// ]); + /// # } + /// ``` + pub fn split<'r, 't>(&'r self, text: &'t [u8]) -> Splits<'r, 't> { + Splits { + finder: self.find_iter(text), + last: 0, + } + } + + /// Returns an iterator of at most `limit` substrings of `text` delimited + /// by a match of the regular expression. (A `limit` of `0` will return no + /// substrings.) Namely, each element of the iterator corresponds to text + /// that *isn't* matched by the regular expression. The remainder of the + /// string that is not split will be the last element in the iterator. + /// + /// This method will *not* copy the text given. + /// + /// # Example + /// + /// Get the first two words in some text: + /// + /// ```rust + /// # extern crate regex; use regex::bytes::Regex; + /// # fn main() { + /// let re = Regex::new(r"\W+").unwrap(); + /// let fields: Vec<&[u8]> = re.splitn(b"Hey! How are you?", 3).collect(); + /// assert_eq!(fields, vec![&b"Hey"[..], &b"How"[..], &b"are you?"[..]]); + /// # } + /// ``` + pub fn splitn<'r, 't>( + &'r self, + text: &'t [u8], + limit: usize, + ) -> SplitsN<'r, 't> { + SplitsN { + splits: self.split(text), + n: limit, + } + } + + /// Replaces the leftmost-first match with the replacement provided. The + /// replacement can be a regular byte string (where `$N` and `$name` are + /// expanded to match capture groups) or a function that takes the matches' + /// `Captures` and returns the replaced byte string. + /// + /// If no match is found, then a copy of the byte string is returned + /// unchanged. + /// + /// # Examples + /// + /// Note that this function is polymorphic with respect to the replacement. + /// In typical usage, this can just be a normal byte string: + /// + /// ```rust + /// # extern crate regex; use regex::bytes::Regex; + /// # fn main() { + /// let re = Regex::new("[^01]+").unwrap(); + /// assert_eq!(re.replace(b"1078910", &b""[..]), b"1010"); + /// # } + /// ``` + /// + /// But anything satisfying the `Replacer` trait will work. For example, a + /// closure of type `|&Captures| -> Vec<u8>` provides direct access to the + /// captures corresponding to a match. This allows one to access submatches + /// easily: + /// + /// ```rust + /// # extern crate regex; use regex::bytes::Regex; + /// # use regex::bytes::Captures; fn main() { + /// let re = Regex::new(r"([^,\s]+),\s+(\S+)").unwrap(); + /// let result = re.replace(b"Springsteen, Bruce", |caps: &Captures| { + /// let mut replacement = caps[2].to_owned(); + /// replacement.push(b' '); + /// replacement.extend(&caps[1]); + /// replacement + /// }); + /// assert_eq!(result, b"Bruce Springsteen"); + /// # } + /// ``` + /// + /// But this is a bit cumbersome to use all the time. Instead, a simple + /// syntax is supported that expands `$name` into the corresponding capture + /// group. Here's the last example, but using this expansion technique + /// with named capture groups: + /// + /// ```rust + /// # extern crate regex; use regex::bytes::Regex; + /// # fn main() { + /// let re = Regex::new(r"(?P<last>[^,\s]+),\s+(?P<first>\S+)").unwrap(); + /// let result = re.replace(b"Springsteen, Bruce", &b"$first $last"[..]); + /// assert_eq!(result, b"Bruce Springsteen"); + /// # } + /// ``` + /// + /// Note that using `$2` instead of `$first` or `$1` instead of `$last` + /// would produce the same result. To write a literal `$` use `$$`. + /// + /// If `$name` isn't a valid capture group (whether the name doesn't exist + /// or isn't a valid index), then it is replaced with the empty string. + /// + /// The longest possible name is used. e.g., `$1a` looks up the capture + /// group named `1a` and not the capture group at index `1`. To exert more + /// precise control over the name, use braces, e.g., `${1}a`. + /// + /// Finally, sometimes you just want to replace a literal string with no + /// submatch expansion. This can be done by wrapping a byte string with + /// `NoExpand`: + /// + /// ```rust + /// # extern crate regex; use regex::bytes::Regex; + /// # fn main() { + /// use regex::bytes::NoExpand; + /// + /// let re = Regex::new(r"(?P<last>[^,\s]+),\s+(\S+)").unwrap(); + /// let result = re.replace(b"Springsteen, Bruce", NoExpand(b"$2 $last")); + /// assert_eq!(result, b"$2 $last"); + /// # } + /// ``` + pub fn replace<R: Replacer>(&self, text: &[u8], rep: R) -> Vec<u8> { + self.replacen(text, 1, rep) + } + + /// Replaces all non-overlapping matches in `text` with the replacement + /// provided. This is the same as calling `replacen` with `limit` set to + /// `0`. + /// + /// See the documentation for `replace` for details on how to access + /// submatches in the replacement text. + pub fn replace_all<R: Replacer>(&self, text: &[u8], rep: R) -> Vec<u8> { + self.replacen(text, 0, rep) + } + + /// Replaces at most `limit` non-overlapping matches in `text` with the + /// replacement provided. If `limit` is 0, then all non-overlapping matches + /// are replaced. + /// + /// See the documentation for `replace` for details on how to access + /// submatches in the replacement text. + pub fn replacen<R: Replacer>( + &self, + text: &[u8], + limit: usize, + mut rep: R, + ) -> Vec<u8> { + if let Some(rep) = rep.no_expansion() { + let mut new = Vec::with_capacity(text.len()); + let mut last_match = 0; + for (i, (s, e)) in self.find_iter(text).enumerate() { + if limit > 0 && i >= limit { + break + } + new.extend(&text[last_match..s]); + new.extend(&*rep); + last_match = e; + } + new.extend(&text[last_match..]); + return new; + } + + // The slower path, which we use if the replacement needs access to + // capture groups. + let mut new = Vec::with_capacity(text.len()); + let mut last_match = 0; + for (i, cap) in self.captures_iter(text).enumerate() { + if limit > 0 && i >= limit { + break + } + // unwrap on 0 is OK because captures only reports matches + let (s, e) = cap.pos(0).unwrap(); + new.extend(&text[last_match..s]); + rep.replace_append(&cap, &mut new); + last_match = e; + } + new.extend(&text[last_match..]); + new + } + + /// Returns the original string of this regex. + pub fn as_str(&self) -> &str { + &self.0.regex_strings()[0] + } + + /// Returns an iterator over the capture names. + pub fn capture_names(&self) -> CaptureNames { + CaptureNames(self.0.captures().iter()) + } + + /// Returns the number of captures. + pub fn captures_len(&self) -> usize { + self.0.captures().len() + } + + fn exec(&self, caps: CaptureSlots, text: &[u8], start: usize) -> bool { + let mut _matches = [false]; + let mut search = Search::new(caps, &mut _matches); + self.0.exec(&mut search, text, start) + } + + fn alloc_captures(&self) -> Vec<Option<usize>> { + vec![None; 2 * self.0.captures().len()] + } +} + +/// An iterator over all non-overlapping matches for a particular string. +/// +/// The iterator yields a tuple of integers corresponding to the start and end +/// of the match. The indices are byte offsets. The iterator stops when no more +/// matches can be found. +/// +/// `'r` is the lifetime of the compiled regular expression and `'t` is the +/// lifetime of the matched byte string. +pub struct FindMatches<'r, 't> { + re: &'r Regex, + text: &'t [u8], + last_end: usize, + last_match: Option<usize>, +} + +impl<'r, 't> Iterator for FindMatches<'r, 't> { + type Item = (usize, usize); + + fn next(&mut self) -> Option<(usize, usize)> { + if self.last_end > self.text.len() { + return None + } + + let mut caps = [None, None]; + if !self.re.exec(&mut caps, self.text, self.last_end) { + return None; + } + let (s, e) = (caps[0].unwrap(), caps[1].unwrap()); + // Don't accept empty matches immediately following a match. + // i.e., no infinite loops please. + if e == s && Some(self.last_end) == self.last_match { + if self.last_end >= self.text.len() { + return None; + } + self.last_end += 1; + return self.next(); + } + self.last_end = e; + self.last_match = Some(self.last_end); + Some((s, e)) + } +} + +/// An iterator that yields all non-overlapping capture groups matching a +/// particular regular expression. +/// +/// The iterator stops when no more matches can be found. +/// +/// `'r` is the lifetime of the compiled regular expression and `'t` is the +/// lifetime of the matched byte string. +pub struct FindCaptures<'r, 't> { + re: &'r Regex, + text: &'t [u8], + last_end: usize, + last_match: Option<usize>, +} + +impl<'r, 't> Iterator for FindCaptures<'r, 't> { + type Item = Captures<'t>; + + fn next(&mut self) -> Option<Captures<'t>> { + if self.last_end > self.text.len() { + return None + } + + let mut caps = self.re.alloc_captures(); + if !self.re.exec(&mut caps, self.text, self.last_end) { + return None; + } + let (s, e) = (caps[0].unwrap(), caps[1].unwrap()); + + // Don't accept empty matches immediately following a match. + // i.e., no infinite loops please. + if e == s && Some(self.last_end) == self.last_match { + if self.last_end >= self.text.len() { + return None; + } + self.last_end += 1; + return self.next(); + } + self.last_end = e; + self.last_match = Some(self.last_end); + Some(Captures { + text: self.text, + caps: caps, + named_groups: self.re.0.capture_name_idx().clone(), + }) + } +} + +/// Yields all substrings delimited by a regular expression match. +/// +/// `'r` is the lifetime of the compiled regular expression and `'t` is the +/// lifetime of the byte string being split. +pub struct Splits<'r, 't> { + finder: FindMatches<'r, 't>, + last: usize, +} + +impl<'r, 't> Iterator for Splits<'r, 't> { + type Item = &'t [u8]; + + fn next(&mut self) -> Option<&'t [u8]> { + let text = self.finder.text; + match self.finder.next() { + None => { + if self.last >= text.len() { + None + } else { + let s = &text[self.last..]; + self.last = text.len(); + Some(s) + } + } + Some((s, e)) => { + let matched = &text[self.last..s]; + self.last = e; + Some(matched) + } + } + } +} + +/// Yields at most `N` substrings delimited by a regular expression match. +/// +/// The last substring will be whatever remains after splitting. +/// +/// `'r` is the lifetime of the compiled regular expression and `'t` is the +/// lifetime of the byte string being split. +pub struct SplitsN<'r, 't> { + splits: Splits<'r, 't>, + n: usize, +} + +impl<'r, 't> Iterator for SplitsN<'r, 't> { + type Item = &'t [u8]; + + fn next(&mut self) -> Option<&'t [u8]> { + if self.n == 0 { + return None + } + self.n -= 1; + if self.n == 0 { + let text = self.splits.finder.text; + Some(&text[self.splits.last..]) + } else { + self.splits.next() + } + } +} + +/// An iterator over the names of all possible captures. +/// +/// `None` indicates an unnamed capture; the first element (capture 0, the +/// whole matched region) is always unnamed. +/// +/// `'r` is the lifetime of the compiled regular expression. +pub struct CaptureNames<'r>(::std::slice::Iter<'r, Option<String>>); + +impl<'r> Iterator for CaptureNames<'r> { + type Item = Option<&'r str>; + + fn next(&mut self) -> Option<Option<&'r str>> { + self.0.next().as_ref() + .map(|slot| slot.as_ref().map(|name| name.as_ref())) + } + + fn size_hint(&self) -> (usize, Option<usize>) { + self.0.size_hint() + } +} + +/// Captures represents a group of captured byte strings for a single match. +/// +/// The 0th capture always corresponds to the entire match. Each subsequent +/// index corresponds to the next capture group in the regex. If a capture +/// group is named, then the matched byte string is *also* available via the +/// `name` method. (Note that the 0th capture is always unnamed and so must be +/// accessed with the `at` method.) +/// +/// Positions returned from a capture group are always byte indices. +/// +/// `'t` is the lifetime of the matched text. +pub struct Captures<'t> { + text: &'t [u8], + caps: Vec<Option<usize>>, + named_groups: Arc<HashMap<String, usize>>, +} + +impl<'t> Captures<'t> { + /// Returns the start and end positions of the Nth capture group. Returns + /// `None` if `i` is not a valid capture group or if the capture group did + /// not match anything. The positions returned are *always* byte indices + /// with respect to the original byte string matched. + pub fn pos(&self, i: usize) -> Option<(usize, usize)> { + let (s, e) = (i * 2, i * 2 + 1); + match (self.caps.get(s), self.caps.get(e)) { + (Some(&Some(s)), Some(&Some(e))) => Some((s, e)), + _ => None, + } + } + + /// Returns the matched string for the capture group `i`. If `i` isn't + /// a valid capture group or didn't match anything, then `None` is + /// returned. + pub fn at(&self, i: usize) -> Option<&'t [u8]> { + match self.pos(i) { + None => None, + Some((s, e)) => Some(&self.text[s..e]) + } + } + + /// Returns the matched string for the capture group named `name`. If + /// `name` isn't a valid capture group or didn't match anything, then + /// `None` is returned. + pub fn name(&self, name: &str) -> Option<&'t [u8]> { + self.named_groups.get(name).and_then(|&i| self.at(i)) + } + + /// Creates an iterator of all the capture groups in order of appearance + /// in the regular expression. + pub fn iter<'a>(&'a self) -> SubCaptures<'a, 't> { + SubCaptures { idx: 0, caps: self, } + } + + /// Creates an iterator of all the capture group positions in order of + /// appearance in the regular expression. Positions are byte indices + /// in terms of the original string matched. + pub fn iter_pos(&'t self) -> SubCapturesPos<'t> { + SubCapturesPos { idx: 0, caps: &self.caps } + } + + /// Creates an iterator of all named groups as an tuple with the group + /// name and the value. The iterator returns these values in arbitrary + /// order. + pub fn iter_named<'a>(&'a self) -> SubCapturesNamed<'a, 't> { + SubCapturesNamed { + caps: self, + names: self.named_groups.iter() + } + } + + /// Expands all instances of `$name` in `text` to the corresponding capture + /// group `name`, and writes them to the `dst` buffer given. + /// + /// `name` may be an integer corresponding to the index of the + /// capture group (counted by order of opening parenthesis where `0` is the + /// entire match) or it can be a name (consisting of letters, digits or + /// underscores) corresponding to a named capture group. + /// + /// If `name` isn't a valid capture group (whether the name doesn't exist + /// or isn't a valid index), then it is replaced with the empty string. + /// + /// The longest possible name is used. e.g., `$1a` looks up the capture + /// group named `1a` and not the capture group at index `1`. To exert more + /// precise control over the name, use braces, e.g., `${1}a`. + /// + /// To write a literal `$` use `$$`. + pub fn expand(&self, replacement: &[u8], dst: &mut Vec<u8>) { + expand(self, replacement, dst) + } + + /// Returns the number of captured groups. + #[inline] + pub fn len(&self) -> usize { + self.caps.len() / 2 + } + + /// Returns true if and only if there are no captured groups. + #[inline] + pub fn is_empty(&self) -> bool { + self.len() == 0 + } +} + +/// Get a group by index. +/// +/// `'t` is the lifetime of the matched text. +/// +/// The text can't outlive the `Captures` object if this method is +/// used, because of how `Index` is defined (normally `a[i]` is part +/// of `a` and can't outlive it); to do that, use `at()` instead. +/// +/// # Panics +/// +/// If there is no group at the given index. +impl<'t> Index<usize> for Captures<'t> { + type Output = [u8]; + + fn index(&self, i: usize) -> &[u8] { + self.at(i).unwrap_or_else(|| panic!("no group at index '{}'", i)) + } +} + +/// Get a group by name. +/// +/// `'t` is the lifetime of the matched text and `'i` is the lifetime +/// of the group name (the index). +/// +/// The text can't outlive the `Captures` object if this method is +/// used, because of how `Index` is defined (normally `a[i]` is part +/// of `a` and can't outlive it); to do that, use `name` instead. +/// +/// # Panics +/// +/// If there is no group named by the given value. +impl<'t, 'i> Index<&'i str> for Captures<'t> { + type Output = [u8]; + + fn index<'a>(&'a self, name: &'i str) -> &'a [u8] { + self.name(name).unwrap_or_else(|| panic!("no group named '{}'", name)) + } +} + +/// An iterator over capture groups for a particular match of a regular +/// expression. +/// +/// `'c` is the lifetime of the captures and `'t` is the lifetime of the +/// matched text. +pub struct SubCaptures<'c, 't: 'c> { + idx: usize, + caps: &'c Captures<'t>, +} + +impl<'c, 't> Iterator for SubCaptures<'c, 't> { + type Item = Option<&'t [u8]>; + + fn next(&mut self) -> Option<Option<&'t [u8]>> { + if self.idx < self.caps.len() { + self.idx += 1; + Some(self.caps.at(self.idx - 1)) + } else { + None + } + } +} + +/// An iterator over capture group positions for a particular match of a +/// regular expression. +/// +/// Positions are byte indices in terms of the original byte string matched. +/// +/// `'c` is the lifetime of the captures. +pub struct SubCapturesPos<'c> { + idx: usize, + caps: &'c [Option<usize>] +} + +impl<'c> Iterator for SubCapturesPos<'c> { + type Item = Option<(usize, usize)>; + + fn next(&mut self) -> Option<Option<(usize, usize)>> { + if self.idx >= self.caps.len() { + return None + } + let r = match (self.caps[self.idx], self.caps[self.idx + 1]) { + (Some(s), Some(e)) => Some((s, e)), + _ => None, + }; + self.idx += 2; + Some(r) + } +} + +/// An Iterator over named capture groups as a tuple with the group name and +/// the value. +/// +/// `'c` is the lifetime of the captures and `'t` is the lifetime of the +/// matched text. +pub struct SubCapturesNamed<'c, 't: 'c> { + caps: &'c Captures<'t>, + names: hash_map::Iter<'c, String, usize>, +} + +impl<'c, 't> Iterator for SubCapturesNamed<'c, 't> { + type Item = (&'c str, Option<&'t [u8]>); + + fn next(&mut self) -> Option<(&'c str, Option<&'t [u8]>)> { + self.names.next().map(|(name, &pos)| (&**name, self.caps.at(pos))) + } +} + +/// Replacer describes types that can be used to replace matches in a byte +/// string. +/// +/// In general, users of this crate shouldn't need to implement this trait, +/// since implementations are already provided for `&[u8]` and +/// `FnMut(&Captures) -> Vec<u8>`, which covers most use cases. +pub trait Replacer { + /// Appends text to `dst` to replace the current match. + /// + /// The current match is represented by `caps`, which is guaranteed to + /// have a match at capture group `0`. + /// + /// For example, a no-op replacement would be + /// `dst.extend(caps.at(0).unwrap())`. + fn replace_append(&mut self, caps: &Captures, dst: &mut Vec<u8>); + + /// Return a fixed unchanging replacement byte string. + /// + /// When doing replacements, if access to `Captures` is not needed (e.g., + /// the replacement byte string does not need `$` expansion), then it can + /// be beneficial to avoid finding sub-captures. + /// + /// In general, this is called once for every call to `replacen`. + fn no_expansion<'r>(&'r mut self) -> Option<Cow<'r, [u8]>> { + None + } +} + +impl<'a> Replacer for &'a [u8] { + fn replace_append(&mut self, caps: &Captures, dst: &mut Vec<u8>) { + caps.expand(*self, dst); + } + + fn no_expansion<'r>(&'r mut self) -> Option<Cow<'r, [u8]>> { + match memchr(b'$', *self) { + Some(_) => None, + None => Some(Cow::Borrowed(*self)), + } + } +} + +impl<F> Replacer for F where F: FnMut(&Captures) -> Vec<u8> { + fn replace_append(&mut self, caps: &Captures, dst: &mut Vec<u8>) { + dst.extend((*self)(caps)) + } +} + +/// NoExpand indicates literal byte string replacement. +/// +/// It can be used with `replace` and `replace_all` to do a literal byte string +/// replacement without expanding `$name` to their corresponding capture +/// groups. This can be both convenient (to avoid escaping `$`, for example) +/// and performant (since capture groups don't need to be found). +/// +/// `'t` is the lifetime of the literal text. +pub struct NoExpand<'r>(pub &'r [u8]); + +impl<'a> Replacer for NoExpand<'a> { + fn replace_append(&mut self, _: &Captures, dst: &mut Vec<u8>) { + dst.extend(self.0) + } + + fn no_expansion<'r>(&'r mut self) -> Option<Cow<'r, [u8]>> { + Some(Cow::Borrowed(self.0)) + } +} diff --git a/deps/regex-0.1.58/src/re_unicode.rs b/deps/regex-0.1.58/src/re_unicode.rs new file mode 100644 index 000000000..40003618f --- /dev/null +++ b/deps/regex-0.1.58/src/re_unicode.rs @@ -0,0 +1,1277 @@ +// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +use std::borrow::Cow; +use std::collections::HashMap; +use std::fmt; +use std::ops::Index; +#[cfg(feature = "pattern")] +use std::str::pattern::{Pattern, Searcher, SearchStep}; +use std::str::FromStr; +use std::sync::Arc; + +use syntax; + +use exec::{CaptureSlots, Exec, ExecBuilder, Search}; +use error::Error; + +/// Escapes all regular expression meta characters in `text`. +/// +/// The string returned may be safely used as a literal in a regular +/// expression. +pub fn quote(text: &str) -> String { + syntax::quote(text) +} + +/// Tests if the given regular expression matches somewhere in the text given. +/// +/// If there was a problem compiling the regular expression, an error is +/// returned. +/// +/// To find submatches, split or replace text, you'll need to compile an +/// expression first. +pub fn is_match(regex: &str, text: &str) -> Result<bool, Error> { + Regex::new(regex).map(|r| r.is_match(text)) +} + +/// A compiled regular expression for matching Unicode strings. +/// +/// It is represented as either a sequence of bytecode instructions (dynamic) +/// or as a specialized Rust function (native). It can be used to search, split +/// or replace text. All searching is done with an implicit `.*?` at the +/// beginning and end of an expression. To force an expression to match the +/// whole string (or a prefix or a suffix), you must use an anchor like `^` or +/// `$` (or `\A` and `\z`). +/// +/// While this crate will handle Unicode strings (whether in the regular +/// expression or in the search text), all positions returned are **byte +/// indices**. Every byte index is guaranteed to be at a Unicode code point +/// boundary. +/// +/// The lifetimes `'r` and `'t` in this crate correspond to the lifetime of a +/// compiled regular expression and text to search, respectively. +/// +/// The only methods that allocate new strings are the string replacement +/// methods. All other methods (searching and splitting) return borrowed +/// pointers into the string given. +/// +/// # Examples +/// +/// Find the location of a US phone number: +/// +/// ```rust +/// # use regex::Regex; +/// let re = Regex::new("[0-9]{3}-[0-9]{3}-[0-9]{4}").unwrap(); +/// assert_eq!(re.find("phone: 111-222-3333"), Some((7, 19))); +/// ``` +/// +/// # Using the `std::str::StrExt` methods with `Regex` +/// +/// > **Note**: This section requires that this crate is currently compiled with +/// > the `pattern` Cargo feature enabled. +/// +/// Since `Regex` implements `Pattern`, you can use regexes with methods +/// defined on `std::str::StrExt`. For example, `is_match`, `find`, `find_iter` +/// and `split` can be replaced with `StrExt::contains`, `StrExt::find`, +/// `StrExt::match_indices` and `StrExt::split`. +/// +/// Here are some examples: +/// +/// ```rust,ignore +/// # use regex::Regex; +/// let re = Regex::new(r"\d+").unwrap(); +/// let haystack = "a111b222c"; +/// +/// assert!(haystack.contains(&re)); +/// assert_eq!(haystack.find(&re), Some(1)); +/// assert_eq!(haystack.match_indices(&re).collect::<Vec<_>>(), +/// vec![(1, 4), (5, 8)]); +/// assert_eq!(haystack.split(&re).collect::<Vec<_>>(), vec!["a", "b", "c"]); +/// ``` +#[derive(Clone)] +pub struct Regex(#[doc(hidden)] pub _Regex); + +#[derive(Clone)] +#[doc(hidden)] +pub enum _Regex { + // The representation of `Regex` is exported to support the `regex!` + // syntax extension. Do not rely on it. + // + // See the comments for the `program` module in `lib.rs` for a more + // detailed explanation for what `regex!` requires. + #[doc(hidden)] + Dynamic(Exec), + #[doc(hidden)] + Native(ExNative), +} + +#[doc(hidden)] +pub struct ExNative { + #[doc(hidden)] + pub original: &'static str, + #[doc(hidden)] + pub names: &'static &'static [Option<&'static str>], + #[doc(hidden)] + pub groups: &'static &'static [(&'static str, usize)], + #[doc(hidden)] + pub prog: fn(CaptureSlots, &str, usize) -> bool, +} + +impl Copy for ExNative {} + +impl Clone for ExNative { + fn clone(&self) -> ExNative { + *self + } +} + +impl fmt::Display for Regex { + /// Shows the original regular expression. + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + write!(f, "{}", self.as_str()) + } +} + +impl fmt::Debug for Regex { + /// Shows the original regular expression. + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fmt::Display::fmt(self, f) + } +} + +#[doc(hidden)] +impl From<Exec> for Regex { + fn from(exec: Exec) -> Regex { + Regex(_Regex::Dynamic(exec)) + } +} + +/// Equality comparison is based on the original string. It is possible that +/// different regular expressions have the same matching behavior, but are +/// still compared unequal. For example, `\d+` and `\d\d*` match the same set +/// of strings, but are not considered equal. +impl PartialEq for Regex { + fn eq(&self, other: &Regex) -> bool { + self.as_str() == other.as_str() + } +} + +impl Eq for Regex {} + +impl FromStr for Regex { + type Err = Error; + + /// Attempts to parse a string into a regular expression + fn from_str(s: &str) -> Result<Regex, Error> { + Regex::new(s) + } +} + +impl Regex { + /// Compiles a regular expression. Once compiled, it can be used repeatedly + /// to search, split or replace text in a string. + /// + /// If an invalid expression is given, then an error is returned. + pub fn new(re: &str) -> Result<Regex, Error> { + Regex::with_size_limit(10 * (1 << 20), re) + } + + /// Compiles a regular expression with the given size limit. + /// + /// The size limit is applied to the size of the *compiled* data structure. + /// If the data structure exceeds the size given, then an error is + /// returned. + pub fn with_size_limit(size: usize, re: &str) -> Result<Regex, Error> { + ExecBuilder::new(re).size_limit(size).build().map(Regex::from) + } + + /// Returns true if and only if the regex matches the string given. + /// + /// It is recommended to use this method if all you need to do is test + /// a match, since the underlying matching engine may be able to do less + /// work. + /// + /// # Example + /// + /// Test if some text contains at least one word with exactly 13 + /// Unicode word characters: + /// + /// ```rust + /// # extern crate regex; use regex::Regex; + /// # fn main() { + /// let text = "I categorically deny having triskaidekaphobia."; + /// assert!(Regex::new(r"\b\w{13}\b").unwrap().is_match(text)); + /// # } + /// ``` + pub fn is_match(&self, text: &str) -> bool { + self.exec(&mut [], text, 0) + } + + /// Returns the start and end byte range of the leftmost-first match in + /// `text`. If no match exists, then `None` is returned. + /// + /// Note that this should only be used if you want to discover the position + /// of the match. Testing the existence of a match is faster if you use + /// `is_match`. + /// + /// # Example + /// + /// Find the start and end location of the first word with exactly 13 + /// Unicode word characters: + /// + /// ```rust + /// # extern crate regex; use regex::Regex; + /// # fn main() { + /// let text = "I categorically deny having triskaidekaphobia."; + /// let pos = Regex::new(r"\b\w{13}\b").unwrap().find(text); + /// assert_eq!(pos, Some((2, 15))); + /// # } + /// ``` + pub fn find(&self, text: &str) -> Option<(usize, usize)> { + let mut caps = [None, None]; + if !self.exec(&mut caps, text, 0) { + None + } else { + Some((caps[0].unwrap(), caps[1].unwrap())) + } + } + + /// Returns an iterator for each successive non-overlapping match in + /// `text`, returning the start and end byte indices with respect to + /// `text`. + /// + /// # Example + /// + /// Find the start and end location of every word with exactly 13 Unicode + /// word characters: + /// + /// ```rust + /// # extern crate regex; use regex::Regex; + /// # fn main() { + /// let text = "Retroactively relinquishing remunerations is reprehensible."; + /// for pos in Regex::new(r"\b\w{13}\b").unwrap().find_iter(text) { + /// println!("{:?}", pos); + /// } + /// // Output: + /// // (0, 13) + /// // (14, 27) + /// // (28, 41) + /// // (45, 58) + /// # } + /// ``` + pub fn find_iter<'r, 't>(&'r self, text: &'t str) -> FindMatches<'r, 't> { + FindMatches { + re: self, + text: text, + last_end: 0, + last_match: None, + } + } + + /// Returns the capture groups corresponding to the leftmost-first + /// match in `text`. Capture group `0` always corresponds to the entire + /// match. If no match is found, then `None` is returned. + /// + /// You should only use `captures` if you need access to submatches. + /// Otherwise, `find` is faster for discovering the location of the overall + /// match. + /// + /// # Examples + /// + /// Say you have some text with movie names and their release years, + /// like "'Citizen Kane' (1941)". It'd be nice if we could search for text + /// looking like that, while also extracting the movie name and its release + /// year separately. + /// + /// ```rust + /// # extern crate regex; use regex::Regex; + /// # fn main() { + /// let re = Regex::new(r"'([^']+)'\s+\((\d{4})\)").unwrap(); + /// let text = "Not my favorite movie: 'Citizen Kane' (1941)."; + /// let caps = re.captures(text).unwrap(); + /// assert_eq!(caps.at(1), Some("Citizen Kane")); + /// assert_eq!(caps.at(2), Some("1941")); + /// assert_eq!(caps.at(0), Some("'Citizen Kane' (1941)")); + /// // You can also access the groups by index using the Index notation. + /// // Note that this will panic on an invalid index. + /// assert_eq!(&caps[1], "Citizen Kane"); + /// assert_eq!(&caps[2], "1941"); + /// assert_eq!(&caps[0], "'Citizen Kane' (1941)"); + /// # } + /// ``` + /// + /// Note that the full match is at capture group `0`. Each subsequent + /// capture group is indexed by the order of its opening `(`. + /// + /// We can make this example a bit clearer by using *named* capture groups: + /// + /// ```rust + /// # extern crate regex; use regex::Regex; + /// # fn main() { + /// let re = Regex::new(r"'(?P<title>[^']+)'\s+\((?P<year>\d{4})\)") + /// .unwrap(); + /// let text = "Not my favorite movie: 'Citizen Kane' (1941)."; + /// let caps = re.captures(text).unwrap(); + /// assert_eq!(caps.name("title"), Some("Citizen Kane")); + /// assert_eq!(caps.name("year"), Some("1941")); + /// assert_eq!(caps.at(0), Some("'Citizen Kane' (1941)")); + /// // You can also access the groups by name using the Index notation. + /// // Note that this will panic on an invalid group name. + /// assert_eq!(&caps["title"], "Citizen Kane"); + /// assert_eq!(&caps["year"], "1941"); + /// assert_eq!(&caps[0], "'Citizen Kane' (1941)"); + /// + /// # } + /// ``` + /// + /// Here we name the capture groups, which we can access with the `name` + /// method or the `Index` notation with a `&str`. Note that the named + /// capture groups are still accessible with `at` or the `Index` notation + /// with a `usize`. + /// + /// The `0`th capture group is always unnamed, so it must always be + /// accessed with `at(0)` or `[0]`. + pub fn captures<'t>(&self, text: &'t str) -> Option<Captures<'t>> { + let mut caps = self.alloc_captures(); + if !self.exec(&mut caps, text, 0) { + None + } else { + Some(Captures { + text: text, + caps: caps, + named_groups: NamedGroups::from_regex(self) + }) + } + } + + /// Returns an iterator over all the non-overlapping capture groups matched + /// in `text`. This is operationally the same as `find_iter`, except it + /// yields information about submatches. + /// + /// # Example + /// + /// We can use this to find all movie titles and their release years in + /// some text, where the movie is formatted like "'Title' (xxxx)": + /// + /// ```rust + /// # extern crate regex; use regex::Regex; + /// # fn main() { + /// let re = Regex::new(r"'(?P<title>[^']+)'\s+\((?P<year>\d{4})\)") + /// .unwrap(); + /// let text = "'Citizen Kane' (1941), 'The Wizard of Oz' (1939), 'M' (1931)."; + /// for caps in re.captures_iter(text) { + /// println!("Movie: {:?}, Released: {:?}", + /// caps.name("title"), caps.name("year")); + /// } + /// // Output: + /// // Movie: Citizen Kane, Released: 1941 + /// // Movie: The Wizard of Oz, Released: 1939 + /// // Movie: M, Released: 1931 + /// # } + /// ``` + pub fn captures_iter<'r, 't>( + &'r self, + text: &'t str, + ) -> FindCaptures<'r, 't> { + FindCaptures { + re: self, + text: text, + last_end: 0, + last_match: None, + } + } + + /// Returns an iterator of substrings of `text` delimited by a match of the + /// regular expression. Namely, each element of the iterator corresponds to + /// text that *isn't* matched by the regular expression. + /// + /// This method will *not* copy the text given. + /// + /// # Example + /// + /// To split a string delimited by arbitrary amounts of spaces or tabs: + /// + /// ```rust + /// # extern crate regex; use regex::Regex; + /// # fn main() { + /// let re = Regex::new(r"[ \t]+").unwrap(); + /// let fields: Vec<&str> = re.split("a b \t c\td e").collect(); + /// assert_eq!(fields, vec!["a", "b", "c", "d", "e"]); + /// # } + /// ``` + pub fn split<'r, 't>(&'r self, text: &'t str) -> RegexSplits<'r, 't> { + RegexSplits { + finder: self.find_iter(text), + last: 0, + } + } + + /// Returns an iterator of at most `limit` substrings of `text` delimited + /// by a match of the regular expression. (A `limit` of `0` will return no + /// substrings.) Namely, each element of the iterator corresponds to text + /// that *isn't* matched by the regular expression. The remainder of the + /// string that is not split will be the last element in the iterator. + /// + /// This method will *not* copy the text given. + /// + /// # Example + /// + /// Get the first two words in some text: + /// + /// ```rust + /// # extern crate regex; use regex::Regex; + /// # fn main() { + /// let re = Regex::new(r"\W+").unwrap(); + /// let fields: Vec<&str> = re.splitn("Hey! How are you?", 3).collect(); + /// assert_eq!(fields, vec!("Hey", "How", "are you?")); + /// # } + /// ``` + pub fn splitn<'r, 't>(&'r self, text: &'t str, limit: usize) + -> RegexSplitsN<'r, 't> { + RegexSplitsN { + splits: self.split(text), + n: limit, + } + } + + /// Replaces the leftmost-first match with the replacement provided. + /// The replacement can be a regular string (where `$N` and `$name` are + /// expanded to match capture groups) or a function that takes the matches' + /// `Captures` and returns the replaced string. + /// + /// If no match is found, then a copy of the string is returned unchanged. + /// + /// # Examples + /// + /// Note that this function is polymorphic with respect to the replacement. + /// In typical usage, this can just be a normal string: + /// + /// ```rust + /// # extern crate regex; use regex::Regex; + /// # fn main() { + /// let re = Regex::new("[^01]+").unwrap(); + /// assert_eq!(re.replace("1078910", ""), "1010"); + /// # } + /// ``` + /// + /// But anything satisfying the `Replacer` trait will work. For example, + /// a closure of type `|&Captures| -> String` provides direct access to the + /// captures corresponding to a match. This allows one to access + /// submatches easily: + /// + /// ```rust + /// # extern crate regex; use regex::Regex; + /// # use regex::Captures; fn main() { + /// let re = Regex::new(r"([^,\s]+),\s+(\S+)").unwrap(); + /// let result = re.replace("Springsteen, Bruce", |caps: &Captures| { + /// format!("{} {}", caps.at(2).unwrap_or(""), caps.at(1).unwrap_or("")) + /// }); + /// assert_eq!(result, "Bruce Springsteen"); + /// # } + /// ``` + /// + /// But this is a bit cumbersome to use all the time. Instead, a simple + /// syntax is supported that expands `$name` into the corresponding capture + /// group. Here's the last example, but using this expansion technique + /// with named capture groups: + /// + /// ```rust + /// # extern crate regex; use regex::Regex; + /// # fn main() { + /// let re = Regex::new(r"(?P<last>[^,\s]+),\s+(?P<first>\S+)").unwrap(); + /// let result = re.replace("Springsteen, Bruce", "$first $last"); + /// assert_eq!(result, "Bruce Springsteen"); + /// # } + /// ``` + /// + /// Note that using `$2` instead of `$first` or `$1` instead of `$last` + /// would produce the same result. To write a literal `$` use `$$`. + /// + /// Finally, sometimes you just want to replace a literal string with no + /// submatch expansion. This can be done by wrapping a string with + /// `NoExpand`: + /// + /// ```rust + /// # extern crate regex; use regex::Regex; + /// # fn main() { + /// use regex::NoExpand; + /// + /// let re = Regex::new(r"(?P<last>[^,\s]+),\s+(\S+)").unwrap(); + /// let result = re.replace("Springsteen, Bruce", NoExpand("$2 $last")); + /// assert_eq!(result, "$2 $last"); + /// # } + /// ``` + pub fn replace<R: Replacer>(&self, text: &str, rep: R) -> String { + self.replacen(text, 1, rep) + } + + /// Replaces all non-overlapping matches in `text` with the replacement + /// provided. This is the same as calling `replacen` with `limit` set to + /// `0`. + /// + /// See the documentation for `replace` for details on how to access + /// submatches in the replacement string. + pub fn replace_all<R: Replacer>(&self, text: &str, rep: R) -> String { + self.replacen(text, 0, rep) + } + + /// Replaces at most `limit` non-overlapping matches in `text` with the + /// replacement provided. If `limit` is 0, then all non-overlapping matches + /// are replaced. + /// + /// See the documentation for `replace` for details on how to access + /// submatches in the replacement string. + pub fn replacen<R: Replacer>( + &self, + text: &str, + limit: usize, + mut rep: R, + ) -> String { + + // If we know that the replacement doesn't have any capture expansions, + // then we can fast path. The fast path can make a tremendous + // difference: + // + // 1) We use `find_iter` instead of `captures_iter`. Not asking for + // captures generally makes the regex engines faster. + // 2) We don't need to look up all of the capture groups and do + // replacements inside the replacement string. We just push it + // at each match and be done with it. + if let Some(rep) = rep.no_expand() { + let mut new = String::with_capacity(text.len()); + let mut last_match = 0; + for (i, (s, e)) in self.find_iter(text).enumerate() { + if limit > 0 && i >= limit { + break + } + new.push_str(&text[last_match..s]); + new.push_str(&rep); + last_match = e; + } + new.push_str(&text[last_match..]); + return new; + } + + // The slower path, which we use if the replacement needs access to + // capture groups. + let mut new = String::with_capacity(text.len()); + let mut last_match = 0; + for (i, cap) in self.captures_iter(text).enumerate() { + if limit > 0 && i >= limit { + break + } + // unwrap on 0 is OK because captures only reports matches + let (s, e) = cap.pos(0).unwrap(); + new.push_str(&text[last_match..s]); + new.push_str(&rep.reg_replace(&cap)); + last_match = e; + } + new.push_str(&text[last_match..]); + new + } + + /// Returns the original string of this regex. + pub fn as_str(&self) -> &str { + match self.0 { + _Regex::Dynamic(ref exec) => &exec.regex_strings()[0], + _Regex::Native(ExNative { ref original, .. }) => original, + } + } + + /// Returns an iterator over the capture names. + pub fn capture_names(&self) -> CaptureNames { + CaptureNames(match self.0 { + _Regex::Native(ref n) => _CaptureNames::Native(n.names.iter()), + _Regex::Dynamic(ref d) => { + _CaptureNames::Dynamic(d.captures().iter()) + } + }) + } + + /// Returns the number of captures. + pub fn captures_len(&self) -> usize { + match self.0 { + _Regex::Native(ref n) => n.names.len(), + _Regex::Dynamic(ref d) => d.captures().len() + } + } + + fn alloc_captures(&self) -> Vec<Option<usize>> { + match self.0 { + _Regex::Native(ref n) => vec![None; 2 * n.names.len()], + _Regex::Dynamic(ref d) => vec![None; 2 * d.captures().len()], + } + } + + fn exec(&self, caps: CaptureSlots, text: &str, start: usize) -> bool { + match self.0 { + _Regex::Native(ExNative { ref prog, .. }) => { + (*prog)(caps, text, start) + } + _Regex::Dynamic(ref exec) => { + let mut _matches = [false]; + let mut search = Search::new(caps, &mut _matches); + exec.exec(&mut search, text.as_bytes(), start) + } + } + } +} + +/// An iterator over the names of all possible captures. +/// +/// `None` indicates an unnamed capture; the first element (capture 0, the +/// whole matched region) is always unnamed. +/// +/// `'r` is the lifetime of the compiled regular expression. +pub struct CaptureNames<'r>(_CaptureNames<'r>); + +enum _CaptureNames<'r> { + #[doc(hidden)] + Native(::std::slice::Iter<'r, Option<&'static str>>), + #[doc(hidden)] + Dynamic(::std::slice::Iter<'r, Option<String>>) +} + +impl<'r> Iterator for CaptureNames<'r> { + type Item = Option<&'r str>; + + fn next(&mut self) -> Option<Option<&'r str>> { + match self.0 { + _CaptureNames::Native(ref mut i) => i.next().cloned(), + _CaptureNames::Dynamic(ref mut i) => { + i.next().as_ref().map(|o| o.as_ref().map(|s| s.as_ref())) + } + } + } + + fn size_hint(&self) -> (usize, Option<usize>) { + match self.0 { + _CaptureNames::Native(ref i) => i.size_hint(), + _CaptureNames::Dynamic(ref i) => i.size_hint(), + } + } +} + +/// NoExpand indicates literal string replacement. +/// +/// It can be used with `replace` and `replace_all` to do a literal +/// string replacement without expanding `$name` to their corresponding +/// capture groups. +/// +/// `'t` is the lifetime of the literal text. +pub struct NoExpand<'t>(pub &'t str); + +/// Replacer describes types that can be used to replace matches in a string. +pub trait Replacer { + /// Returns a possibly owned string that is used to replace the match + /// corresponding to the `caps` capture group. + /// + /// The `'a` lifetime refers to the lifetime of a borrowed string when + /// a new owned string isn't needed (e.g., for `NoExpand`). + fn reg_replace(&mut self, caps: &Captures) -> Cow<str>; + + /// Returns a possibly owned string that never needs expansion. + fn no_expand(&mut self) -> Option<Cow<str>> { None } +} + +impl<'t> Replacer for NoExpand<'t> { + fn reg_replace(&mut self, _: &Captures) -> Cow<str> { + self.0.into() + } + + fn no_expand(&mut self) -> Option<Cow<str>> { + Some(self.0.into()) + } +} + +impl<'t> Replacer for &'t str { + fn reg_replace<'a>(&'a mut self, caps: &Captures) -> Cow<'a, str> { + caps.expand(*self).into() + } + + fn no_expand(&mut self) -> Option<Cow<str>> { + // if there is a $ there may be an expansion + match self.find('$') { + Some(_) => None, + None => Some((*self).into()), + } + } +} + +impl<F> Replacer for F where F: FnMut(&Captures) -> String { + fn reg_replace<'a>(&'a mut self, caps: &Captures) -> Cow<'a, str> { + (*self)(caps).into() + } +} + +/// Yields all substrings delimited by a regular expression match. +/// +/// `'r` is the lifetime of the compiled regular expression and `'t` is the +/// lifetime of the string being split. +pub struct RegexSplits<'r, 't> { + finder: FindMatches<'r, 't>, + last: usize, +} + +impl<'r, 't> Iterator for RegexSplits<'r, 't> { + type Item = &'t str; + + fn next(&mut self) -> Option<&'t str> { + let text = self.finder.text; + match self.finder.next() { + None => { + if self.last >= text.len() { + None + } else { + let s = &text[self.last..]; + self.last = text.len(); + Some(s) + } + } + Some((s, e)) => { + let matched = &text[self.last..s]; + self.last = e; + Some(matched) + } + } + } +} + +/// Yields at most `N` substrings delimited by a regular expression match. +/// +/// The last substring will be whatever remains after splitting. +/// +/// `'r` is the lifetime of the compiled regular expression and `'t` is the +/// lifetime of the string being split. +pub struct RegexSplitsN<'r, 't> { + splits: RegexSplits<'r, 't>, + n: usize, +} + +impl<'r, 't> Iterator for RegexSplitsN<'r, 't> { + type Item = &'t str; + + fn next(&mut self) -> Option<&'t str> { + if self.n == 0 { + return None + } + self.n -= 1; + if self.n == 0 { + let text = self.splits.finder.text; + Some(&text[self.splits.last..]) + } else { + self.splits.next() + } + } +} + +enum NamedGroups { + Native(&'static [(&'static str, usize)]), + Dynamic(Arc<HashMap<String, usize>>), +} + +impl NamedGroups { + fn from_regex(regex: &Regex) -> NamedGroups { + match regex.0 { + _Regex::Native(ExNative { ref groups, .. }) => { + NamedGroups::Native(groups) + } + _Regex::Dynamic(ref exec) => { + NamedGroups::Dynamic(exec.capture_name_idx().clone()) + } + } + } + + fn pos(&self, name: &str) -> Option<usize> { + match *self { + NamedGroups::Native(groups) => { + groups.binary_search_by(|&(n, _)| n.cmp(name)) + .ok().map(|i| groups[i].1) + }, + NamedGroups::Dynamic(ref groups) => { + groups.get(name).map(|i| *i) + }, + } + } + + fn iter<'n>(&'n self) -> NamedGroupsIter<'n> { + match *self { + NamedGroups::Native(g) => NamedGroupsIter::Native(g.iter()), + NamedGroups::Dynamic(ref g) => NamedGroupsIter::Dynamic(g.iter()), + } + } +} + +enum NamedGroupsIter<'n> { + Native(::std::slice::Iter<'static, (&'static str, usize)>), + Dynamic(::std::collections::hash_map::Iter<'n, String, usize>), +} + +impl<'n> Iterator for NamedGroupsIter<'n> { + type Item = (&'n str, usize); + + fn next(&mut self) -> Option<Self::Item> { + match *self { + NamedGroupsIter::Native(ref mut it) => it.next().map(|&v| v), + NamedGroupsIter::Dynamic(ref mut it) => { + it.next().map(|(s, i)| (s.as_ref(), *i)) + } + } + } +} + +/// Captures represents a group of captured strings for a single match. +/// +/// The 0th capture always corresponds to the entire match. Each subsequent +/// index corresponds to the next capture group in the regex. If a capture +/// group is named, then the matched string is *also* available via the `name` +/// method. (Note that the 0th capture is always unnamed and so must be +/// accessed with the `at` method.) +/// +/// Positions returned from a capture group are always byte indices. +/// +/// `'t` is the lifetime of the matched text. +pub struct Captures<'t> { + text: &'t str, + caps: Vec<Option<usize>>, + named_groups: NamedGroups, +} + +impl<'t> Captures<'t> { + /// Returns the start and end positions of the Nth capture group. Returns + /// `None` if `i` is not a valid capture group or if the capture group did + /// not match anything. The positions returned are *always* byte indices + /// with respect to the original string matched. + pub fn pos(&self, i: usize) -> Option<(usize, usize)> { + let (s, e) = (i * 2, i * 2 + 1); + match (self.caps.get(s), self.caps.get(e)) { + (Some(&Some(s)), Some(&Some(e))) => Some((s, e)), + _ => None, + } + } + + /// Returns the matched string for the capture group `i`. If `i` isn't + /// a valid capture group or didn't match anything, then `None` is + /// returned. + pub fn at(&self, i: usize) -> Option<&'t str> { + match self.pos(i) { + None => None, + Some((s, e)) => Some(&self.text[s..e]) + } + } + + /// Returns the matched string for the capture group named `name`. If + /// `name` isn't a valid capture group or didn't match anything, then + /// `None` is returned. + pub fn name(&self, name: &str) -> Option<&'t str> { + self.named_groups.pos(name).and_then(|i| self.at(i)) + } + + /// Creates an iterator of all the capture groups in order of appearance + /// in the regular expression. + pub fn iter(&'t self) -> SubCaptures<'t> { + SubCaptures { idx: 0, caps: self, } + } + + /// Creates an iterator of all the capture group positions in order of + /// appearance in the regular expression. Positions are byte indices + /// in terms of the original string matched. + pub fn iter_pos(&'t self) -> SubCapturesPos<'t> { + SubCapturesPos { idx: 0, caps: &self.caps } + } + + /// Creates an iterator of all named groups as an tuple with the group + /// name and the value. The iterator returns these values in arbitrary + /// order. + pub fn iter_named(&'t self) -> SubCapturesNamed<'t> { + SubCapturesNamed { + caps: self, + names: self.named_groups.iter() + } + } + + /// Expands all instances of `$name` in `text` to the corresponding capture + /// group `name`. + /// + /// `name` may be an integer corresponding to the index of the + /// capture group (counted by order of opening parenthesis where `0` is the + /// entire match) or it can be a name (consisting of letters, digits or + /// underscores) corresponding to a named capture group. + /// + /// If `name` isn't a valid capture group (whether the name doesn't exist or + /// isn't a valid index), then it is replaced with the empty string. + /// + /// To write a literal `$` use `$$`. + pub fn expand(&self, text: &str) -> String { + const REPLACE_EXPAND: &'static str = r"(?x) + (?P<before>^|\b|[^$]) # Ignore `$$name`. + \$ + (?P<name> # Match the actual capture name. Can be... + [0-9]+ # A sequence of digits (for indexed captures), or... + | + [_a-zA-Z][_0-9a-zA-Z]* # A name for named captures. + ) + "; + // How evil can you get? + let re = Regex::new(REPLACE_EXPAND).unwrap(); + let text = re.replace_all(text, |refs: &Captures| -> String { + let before = refs.name("before").unwrap_or(""); + let name = refs.name("name").unwrap_or(""); + format!("{}{}", before, match name.parse::<usize>() { + Err(_) => self.name(name).unwrap_or("").to_owned(), + Ok(i) => self.at(i).unwrap_or("").to_owned(), + }) + }); + let re = Regex::new(r"\$\$").unwrap(); + re.replace_all(&text, NoExpand("$")) + } + + /// Returns the number of captured groups. + #[inline] + pub fn len(&self) -> usize { + self.caps.len() / 2 + } + + /// Returns true if and only if there are no captured groups. + #[inline] + pub fn is_empty(&self) -> bool { + self.len() == 0 + } +} + +/// Get a group by index. +/// +/// `'t` is the lifetime of the matched text. +/// +/// The text can't outlive the `Captures` object if this method is +/// used, because of how `Index` is defined (normally `a[i]` is part +/// of `a` and can't outlive it); to do that, use `at()` instead. +/// +/// # Panics +/// +/// If there is no group at the given index. +impl<'t> Index<usize> for Captures<'t> { + type Output = str; + + fn index(&self, i: usize) -> &str { + self.at(i).unwrap_or_else(|| panic!("no group at index '{}'", i)) + } +} + +/// Get a group by name. +/// +/// `'t` is the lifetime of the matched text and `'i` is the lifetime +/// of the group name (the index). +/// +/// The text can't outlive the `Captures` object if this method is +/// used, because of how `Index` is defined (normally `a[i]` is part +/// of `a` and can't outlive it); to do that, use `name` instead. +/// +/// # Panics +/// +/// If there is no group named by the given value. +impl<'t, 'i> Index<&'i str> for Captures<'t> { + type Output = str; + + fn index<'a>(&'a self, name: &'i str) -> &'a str { + self.name(name).unwrap_or_else(|| panic!("no group named '{}'", name)) + } +} + +/// An iterator over capture groups for a particular match of a regular +/// expression. +/// +/// `'c` is the lifetime of the captures. +pub struct SubCaptures<'c> { + idx: usize, + caps: &'c Captures<'c>, +} + +impl<'c> Iterator for SubCaptures<'c> { + type Item = Option<&'c str>; + + fn next(&mut self) -> Option<Option<&'c str>> { + if self.idx < self.caps.len() { + self.idx += 1; + Some(self.caps.at(self.idx - 1)) + } else { + None + } + } +} + +/// An iterator over capture group positions for a particular match of a +/// regular expression. +/// +/// Positions are byte indices in terms of the original string matched. +/// +/// `'c` is the lifetime of the captures. +pub struct SubCapturesPos<'c> { + idx: usize, + caps: &'c [Option<usize>] +} + +impl<'c> Iterator for SubCapturesPos<'c> { + type Item = Option<(usize, usize)>; + + fn next(&mut self) -> Option<Option<(usize, usize)>> { + if self.idx >= self.caps.len() { + return None + } + let r = match (self.caps[self.idx], self.caps[self.idx + 1]) { + (Some(s), Some(e)) => Some((s, e)), + (None, None) => None, + _ => unreachable!() + }; + self.idx += 2; + Some(r) + } +} + +/// An Iterator over named capture groups as a tuple with the group +/// name and the value. +/// +/// `'c` is the lifetime of the captures. +pub struct SubCapturesNamed<'c> { + caps: &'c Captures<'c>, + names: NamedGroupsIter<'c>, +} + +impl<'c> Iterator for SubCapturesNamed<'c> { + type Item = (&'c str, Option<&'c str>); + + fn next(&mut self) -> Option<(&'c str, Option<&'c str>)> { + self.names.next().map(|(name, pos)| (name, self.caps.at(pos))) + } +} + +/// An iterator that yields all non-overlapping capture groups matching a +/// particular regular expression. +/// +/// The iterator stops when no more matches can be found. +/// +/// `'r` is the lifetime of the compiled regular expression and `'t` is the +/// lifetime of the matched string. +pub struct FindCaptures<'r, 't> { + re: &'r Regex, + text: &'t str, + last_end: usize, + last_match: Option<usize>, +} + +impl<'r, 't> Iterator for FindCaptures<'r, 't> { + type Item = Captures<'t>; + + fn next(&mut self) -> Option<Captures<'t>> { + if self.last_end > self.text.len() { + return None + } + + let mut caps = self.re.alloc_captures(); + if !self.re.exec(&mut caps, self.text, self.last_end) { + return None + } + let (s, e) = (caps[0].unwrap(), caps[1].unwrap()); + + // Don't accept empty matches immediately following a match. + // i.e., no infinite loops please. + if e == s && Some(self.last_end) == self.last_match { + if self.last_end >= self.text.len() { + return None; + } + self.last_end += self.text[self.last_end..].chars() + .next().unwrap().len_utf8(); + return self.next(); + } + self.last_end = e; + self.last_match = Some(self.last_end); + Some(Captures { + text: self.text, + caps: caps, + named_groups: NamedGroups::from_regex(self.re), + }) + } +} + +/// An iterator over all non-overlapping matches for a particular string. +/// +/// The iterator yields a tuple of integers corresponding to the start and end +/// of the match. The indices are byte offsets. The iterator stops when no more +/// matches can be found. +/// +/// `'r` is the lifetime of the compiled regular expression and `'t` is the +/// lifetime of the matched string. +pub struct FindMatches<'r, 't> { + re: &'r Regex, + text: &'t str, + last_end: usize, + last_match: Option<usize>, +} + +impl<'r, 't> Iterator for FindMatches<'r, 't> { + type Item = (usize, usize); + + fn next(&mut self) -> Option<(usize, usize)> { + if self.last_end > self.text.len() { + return None + } + + let mut caps = [None, None]; + if !self.re.exec(&mut caps, self.text, self.last_end) { + return None; + } + let (s, e) = (caps[0].unwrap(), caps[1].unwrap()); + + // Don't accept empty matches immediately following a match. + // i.e., no infinite loops please. + if e == s && Some(self.last_end) == self.last_match { + if self.last_end >= self.text.len() { + return None; + } + self.last_end += self.text[self.last_end..].chars() + .next().unwrap().len_utf8(); + return self.next(); + } + self.last_end = e; + self.last_match = Some(self.last_end); + Some((s, e)) + } +} + +#[cfg(feature = "pattern")] +pub struct RegexSearcher<'r, 't> { + it: FindMatches<'r, 't>, + last_step_end: usize, + next_match: Option<(usize, usize)>, +} + +#[cfg(feature = "pattern")] +impl<'r, 't> Pattern<'t> for &'r Regex { + type Searcher = RegexSearcher<'r, 't>; + + fn into_searcher(self, haystack: &'t str) -> RegexSearcher<'r, 't> { + RegexSearcher { + it: self.find_iter(haystack), + last_step_end: 0, + next_match: None, + } + } +} + +#[cfg(feature = "pattern")] +unsafe impl<'r, 't> Searcher<'t> for RegexSearcher<'r, 't> { + #[inline] + fn haystack(&self) -> &'t str { + self.it.text + } + + #[inline] + fn next(&mut self) -> SearchStep { + if let Some((s, e)) = self.next_match { + self.next_match = None; + self.last_step_end = e; + return SearchStep::Match(s, e); + } + match self.it.next() { + None => { + if self.last_step_end < self.haystack().len() { + let last = self.last_step_end; + self.last_step_end = self.haystack().len(); + SearchStep::Reject(last, self.haystack().len()) + } else { + SearchStep::Done + } + } + Some((s, e)) => { + if s == self.last_step_end { + self.last_step_end = e; + SearchStep::Match(s, e) + } else { + self.next_match = Some((s, e)); + let last = self.last_step_end; + self.last_step_end = s; + SearchStep::Reject(last, s) + } + } + } + } +} + +#[cfg(test)] +mod test { + use super::{NoExpand, Regex}; + + #[test] + fn test_simple_expand() { + let re = Regex::new(r"(\w) (\w)").unwrap(); + assert_eq!(re.replace_all("a b", "$2 $1"), "b a"); + } + + #[test] + fn test_literal_dollar() { + let re = Regex::new(r"(\w+) (\w+)").unwrap(); + assert_eq!(re.replace_all("a b", "$1"), "a"); + assert_eq!(re.replace_all("a b", "$$1"), "$1"); // $$ should become a $ + assert_eq!(re.replace_all("a b", "$2 $$c $1"), "b $c a"); + } + + #[test] + fn test_no_expand() { + let re = Regex::new(r"(\w+)").unwrap(); + assert_eq!(re.replace_all("a", NoExpand("$$1")), "$$1"); + assert_eq!(re.replace_all("a", NoExpand("$1")), "$1"); + } + + #[test] + fn test_capture_names() { + let re = Regex::new(r"(.)(?P<a>.)").unwrap(); + assert_eq!(re.capture_names().size_hint(), (3, Some(3))); + assert_eq!(re.capture_names().collect::<Vec<_>>(), [None, None, Some("a")]); + } + + #[test] + fn test_cap_index() { + let re = Regex::new(r"^(?P<name>.+)$").unwrap(); + let cap = re.captures("abc").unwrap(); + assert_eq!(&cap[0], "abc"); + assert_eq!(&cap[1], "abc"); + assert_eq!(&cap["name"], "abc"); + } + + #[test] + #[should_panic] + #[cfg_attr(all(target_env = "msvc", target_pointer_width = "32"), ignore)] + fn test_cap_index_panic_usize() { + let re = Regex::new(r"^(?P<name>.+)$").unwrap(); + let cap = re.captures("abc").unwrap(); + let _ = cap[2]; + } + + #[test] + #[should_panic] + #[cfg_attr(all(target_env = "msvc", target_pointer_width = "32"), ignore)] + fn test_cap_index_panic_name() { + let re = Regex::new(r"^(?P<name>.+)$").unwrap(); + let cap = re.captures("abc").unwrap(); + let _ = cap["bad name"]; + } + + #[test] + fn test_cap_index_lifetime() { + // This is a test of whether the types on `caps["..."]` are general + // enough. If not, this will fail to typecheck. + fn inner(s: &str) -> usize { + let re = Regex::new(r"(?P<number>\d+)").unwrap(); + let caps = re.captures(s).unwrap(); + caps["number"].len() + } + assert_eq!(inner("123"), 3); + } +} diff --git a/deps/regex-0.1.58/src/set.rs b/deps/regex-0.1.58/src/set.rs new file mode 100644 index 000000000..5d3bdfb7b --- /dev/null +++ b/deps/regex-0.1.58/src/set.rs @@ -0,0 +1,349 @@ +// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +use std::fmt; +use std::iter; +use std::slice; +use std::vec; + +use exec::{Exec, ExecBuilder, Search}; +use Error; + +macro_rules! define_set { + ( + $ty:ident, + $ty_set_matches:ident, + $ty_set_matches_iter:ident, + $ty_set_matches_into_iter:ident, + $exec_build:expr, + $text_ty:ty, + $as_bytes:expr + ) => { + +/// Match multiple (possibly overlapping) regular expressions in a single scan. +/// +/// A regex set corresponds to the union of two or more regular expressions. +/// That is, a regex set will match text where at least one of its +/// constituent regular expressions matches. A regex set as its formulated here +/// provides a touch more power: it will also report *which* regular +/// expressions in the set match. Indeed, this is the key difference between +/// regex sets and a single `Regex` with many alternates, since only one +/// alternate can match at a time. +/// +/// For example, consider regular expressions to match email addresses and +/// domains: `[a-z]+@[a-z]+\.(com|org|net)` and `[a-z]+\.(com|org|net)`. If a +/// regex set is constructed from those regexes, then searching the text +/// `foo@example.com` will report both regexes as matching. Of course, one +/// could accomplish this by compiling each regex on its own and doing two +/// searches over the text. The key advantage of using a regex set is that it +/// will report the matching regexes using a *single pass through the text*. +/// If one has hundreds or thousands of regexes to match repeatedly (like a URL +/// router for a complex web application or a user agent matcher), then a regex +/// set can realize huge performance gains. +/// +/// # Example +/// +/// This shows how the above two regexes (for matching email addresses and +/// domains) might work: +/// +/// ```rust +/// # use regex::RegexSet; +/// let set = RegexSet::new(&[ +/// r"[a-z]+@[a-z]+\.(com|org|net)", +/// r"[a-z]+\.(com|org|net)", +/// ]).unwrap(); +/// +/// // Ask whether any regexes in the set match. +/// assert!(set.is_match("foo@example.com")); +/// +/// // Identify which regexes in the set match. +/// let matches: Vec<_> = set.matches("foo@example.com").into_iter().collect(); +/// assert_eq!(vec![0, 1], matches); +/// +/// // Try again, but with text that only matches one of the regexes. +/// let matches: Vec<_> = set.matches("example.com").into_iter().collect(); +/// assert_eq!(vec![1], matches); +/// +/// // Try again, but with text that doesn't match any regex in the set. +/// let matches: Vec<_> = set.matches("example").into_iter().collect(); +/// assert!(matches.is_empty()); +/// ``` +/// +/// Note that it would be possible to adapt the above example to using `Regex` +/// with an expression like: +/// +/// ```ignore +/// (?P<email>[a-z]+@(?P<email_domain>[a-z]+[.](com|org|net)))|(?P<domain>[a-z]+[.](com|org|net)) +/// ``` +/// +/// After a match, one could then inspect the capture groups to figure out +/// which alternates matched. The problem is that it is hard to make this +/// approach scale when there are many regexes since the overlap between each +/// alternate isn't always obvious to reason about. +/// +/// # Limitations +/// +/// Regex sets are limited to answering the following two questions: +/// +/// 1. Does any regex in the set match? +/// 2. If so, which regexes in the set match? +/// +/// As with the main `Regex` type, it is cheaper to ask (1) instead of (2) +/// since the matching engines can stop after the first match is found. +/// +/// Other features like finding the location of successive matches or their +/// sub-captures aren't supported. If you need this functionality, the +/// recommended approach is to compile each regex in the set independently and +/// selectively match them based on which regexes in the set matched. +/// +/// # Performance +/// +/// A `RegexSet` has the same performance characteristics as `Regex`. Namely, +/// search takes `O(mn)` time, where `m` is proportional to the size of the +/// regex set and `n` is proportional to the length of the search text. +#[derive(Clone)] +pub struct $ty(Exec); + +impl $ty { + /// Create a new regex set with the given regular expressions. + /// + /// This takes an iterator of `S`, where `S` is something that can produce + /// a `&str`. If any of the strings in the iterator are not valid regular + /// expressions, then an error is returned. + /// + /// # Example + /// + /// Create a new regex set from an iterator of strings: + /// + /// ```rust + /// # use regex::RegexSet; + /// let set = RegexSet::new(&[r"\w+", r"\d+"]).unwrap(); + /// assert!(set.is_match("foo")); + /// ``` + pub fn new<I, S>(exprs: I) -> Result<$ty, Error> + where S: AsRef<str>, I: IntoIterator<Item=S> { + let exec = try!($exec_build(exprs)); + if exec.regex_strings().len() < 2 { + return Err(Error::InvalidSet); + } + Ok($ty(exec)) + } + + /// Returns true if and only if one of the regexes in this set matches + /// the text given. + /// + /// This method should be preferred if you only need to test whether any + /// of the regexes in the set should match, but don't care about *which* + /// regexes matched. This is because the underlying matching engine will + /// quit immediately after seeing the first match instead of continuing to + /// find all matches. + /// + /// Note that as with searches using `Regex`, the expression is unanchored + /// by default. That is, if the regex does not start with `^` or `\A`, or + /// end with `$` or `\z`, then it is permitted to match anywhere in the + /// text. + /// + /// # Example + /// + /// Tests whether a set matches some text: + /// + /// ```rust + /// # use regex::RegexSet; + /// let set = RegexSet::new(&[r"\w+", r"\d+"]).unwrap(); + /// assert!(set.is_match("foo")); + /// assert!(!set.is_match("☃")); + /// ``` + pub fn is_match(&self, text: $text_ty) -> bool { + let mut search = Search::new(&mut [], &mut []); + self.0.exec(&mut search, $as_bytes(text), 0) + } + + /// Returns the set of regular expressions that match in the given text. + /// + /// The set returned contains the index of each regular expression that + /// matches in the given text. The index is in correspondence with the + /// order of regular expressions given to `RegexSet`'s constructor. + /// + /// The set can also be used to iterate over the matched indices. + /// + /// Note that as with searches using `Regex`, the expression is unanchored + /// by default. That is, if the regex does not start with `^` or `\A`, or + /// end with `$` or `\z`, then it is permitted to match anywhere in the + /// text. + /// + /// # Example + /// + /// Tests which regular expressions match the given text: + /// + /// ```rust + /// # use regex::RegexSet; + /// let set = RegexSet::new(&[ + /// r"\w+", + /// r"\d+", + /// r"\pL+", + /// r"foo", + /// r"bar", + /// r"barfoo", + /// r"foobar", + /// ]).unwrap(); + /// let matches: Vec<_> = set.matches("foobar").into_iter().collect(); + /// assert_eq!(matches, vec![0, 2, 3, 4, 6]); + /// + /// // You can also test whether a particular regex matched: + /// let matches = set.matches("foobar"); + /// assert!(!matches.matched(5)); + /// assert!(matches.matched(6)); + /// ``` + pub fn matches(&self, text: $text_ty) -> SetMatches { + let mut matches = vec![false; self.0.matches().len()]; + let matched_any = { + let mut search = Search::new(&mut [], &mut matches); + self.0.exec(&mut search, $as_bytes(text), 0) + }; + SetMatches { + matched_any: matched_any, + matches: matches, + } + } + + /// Returns the total number of regular expressions in this set. + pub fn len(&self) -> usize { + self.0.regex_strings().len() + } +} + +/// A set of matches returned by a regex set. +#[derive(Clone, Debug)] +pub struct $ty_set_matches { + matched_any: bool, + matches: Vec<bool>, +} + +impl $ty_set_matches { + /// Whether this set contains any matches. + pub fn matched_any(&self) -> bool { + self.matched_any + } + + /// Whether the regex at the given index matched. + /// + /// The index for a regex is determined by its insertion order upon the + /// initial construction of a `RegexSet`, starting at `0`. + /// + /// # Panics + /// + /// If `regex_index` is greater than or equal to `self.len()`. + pub fn matched(&self, regex_index: usize) -> bool { + self.matches[regex_index] + } + + /// The total number of regexes in the set that created these matches. + pub fn len(&self) -> usize { + self.matches.len() + } + + /// Returns an iterator over indexes in the regex that matched. + pub fn iter(&self) -> $ty_set_matches_iter { + $ty_set_matches_iter((&*self.matches).into_iter().enumerate()) + } +} + +impl IntoIterator for $ty_set_matches { + type IntoIter = $ty_set_matches_into_iter; + type Item = usize; + + fn into_iter(self) -> Self::IntoIter { + $ty_set_matches_into_iter(self.matches.into_iter().enumerate()) + } +} + +impl<'a> IntoIterator for &'a $ty_set_matches { + type IntoIter = $ty_set_matches_iter<'a>; + type Item = usize; + + fn into_iter(self) -> Self::IntoIter { + self.iter() + } +} + +/// An owned iterator over the set of matches from a regex set. +pub struct $ty_set_matches_into_iter(iter::Enumerate<vec::IntoIter<bool>>); + +impl Iterator for $ty_set_matches_into_iter { + type Item = usize; + + fn next(&mut self) -> Option<usize> { + loop { + match self.0.next() { + None => return None, + Some((_, false)) => {} + Some((i, true)) => return Some(i), + } + } + } +} + +/// A borrowed iterator over the set of matches from a regex set. +/// +/// The lifetime `'a` refers to the lifetime of a `SetMatches` value. +#[derive(Clone)] +pub struct $ty_set_matches_iter<'a>(iter::Enumerate<slice::Iter<'a, bool>>); + +impl<'a> Iterator for $ty_set_matches_iter<'a> { + type Item = usize; + + fn next(&mut self) -> Option<usize> { + loop { + match self.0.next() { + None => return None, + Some((_, &false)) => {} + Some((i, &true)) => return Some(i), + } + } + } +} + + } +} + +fn as_bytes_str(text: &str) -> &[u8] { text.as_bytes() } +fn as_bytes_bytes(text: &[u8]) -> &[u8] { text } + +define_set! { + RegexSet, + SetMatches, + SetMatchesIter, + SetMatchesIntoIter, + |exprs| ExecBuilder::new_many(exprs).build(), + &str, + as_bytes_str +} + +define_set! { + RegexSetBytes, + SetMatchesBytes, + SetMatchesIterBytes, + SetMatchesIntoIterBytes, + |exprs| ExecBuilder::new_many(exprs).only_utf8(false).build(), + &[u8], + as_bytes_bytes +} + +impl fmt::Debug for RegexSet { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + write!(f, "RegexSet({:?})", self.0.regex_strings()) + } +} + +impl fmt::Debug for RegexSetBytes { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + write!(f, "RegexSet({:?})", self.0.regex_strings()) + } +} diff --git a/deps/regex-0.1.58/src/sparse.rs b/deps/regex-0.1.58/src/sparse.rs new file mode 100644 index 000000000..8f5bd9d5b --- /dev/null +++ b/deps/regex-0.1.58/src/sparse.rs @@ -0,0 +1,82 @@ +use std::ops::Deref; +use std::slice; + +/// A sparse set used for representing ordered NFA states. +/// +/// This supports constant time addition and membership testing. Clearing an +/// entire set can also be done in constant time. Iteration yields elements +/// in the order in which they were inserted. +/// +/// The data structure is based on: http://research.swtch.com/sparse +/// Note though that we don't actually use unitialized memory. We generally +/// reuse allocations, so the initial allocation cost is bareable. However, +/// its other properties listed above are extremely useful. +/// +/// N.B. The type parameter is misleading. For the most part, this is only +/// meant to work on instruction pointers. We use a touch of generics to +/// support 32 bit instruction pointers. +#[derive(Debug)] +pub struct SparseSet { + /// Dense contains the instruction pointers in the order in which they + /// were inserted. Accessing elements >= self.size is illegal. + dense: Vec<usize>, + /// Sparse maps instruction pointers to their location in dense. + /// + /// An instruction pointer is in the set if and only if + /// sparse[ip] < size && ip == dense[sparse[ip]]. + sparse: Vec<usize>, + /// The number of elements in the set. + size: usize, +} + +impl SparseSet { + pub fn new(size: usize) -> SparseSet { + SparseSet { + dense: vec![0; size], + sparse: vec![0; size], + size: 0, + } + } + + pub fn len(&self) -> usize { + self.size + } + + pub fn is_empty(&self) -> bool { + self.size == 0 + } + + pub fn capacity(&self) -> usize { + self.dense.len() + } + + pub fn add(&mut self, ip: usize) { + let i = self.size; + self.dense[i] = ip; + self.sparse[ip] = i; + self.size += 1; + } + + pub fn contains_ip(&self, ip: usize) -> bool { + let i = self.sparse[ip]; + i < self.size && self.dense[i] == ip + } + + pub fn clear(&mut self) { + self.size = 0; + } +} + +impl Deref for SparseSet { + type Target = [usize]; + + fn deref(&self) -> &Self::Target { + &self.dense[0..self.size] + } +} + +impl<'a> IntoIterator for &'a SparseSet { + type Item = &'a usize; + type IntoIter = slice::Iter<'a, usize>; + fn into_iter(self) -> Self::IntoIter { self.iter() } +} diff --git a/deps/regex-0.1.48/src/testdata/LICENSE b/deps/regex-0.1.58/src/testdata/LICENSE similarity index 100% rename from deps/regex-0.1.48/src/testdata/LICENSE rename to deps/regex-0.1.58/src/testdata/LICENSE diff --git a/deps/regex-0.1.48/src/testdata/README b/deps/regex-0.1.58/src/testdata/README similarity index 100% rename from deps/regex-0.1.48/src/testdata/README rename to deps/regex-0.1.58/src/testdata/README diff --git a/deps/regex-0.1.48/src/testdata/basic.dat b/deps/regex-0.1.58/src/testdata/basic.dat similarity index 100% rename from deps/regex-0.1.48/src/testdata/basic.dat rename to deps/regex-0.1.58/src/testdata/basic.dat diff --git a/deps/regex-0.1.48/src/testdata/nullsubexpr.dat b/deps/regex-0.1.58/src/testdata/nullsubexpr.dat similarity index 100% rename from deps/regex-0.1.48/src/testdata/nullsubexpr.dat rename to deps/regex-0.1.58/src/testdata/nullsubexpr.dat diff --git a/deps/regex-0.1.48/src/testdata/repetition.dat b/deps/regex-0.1.58/src/testdata/repetition.dat similarity index 100% rename from deps/regex-0.1.48/src/testdata/repetition.dat rename to deps/regex-0.1.58/src/testdata/repetition.dat diff --git a/deps/regex-0.1.58/src/utf8.rs b/deps/regex-0.1.58/src/utf8.rs new file mode 100644 index 000000000..c9b532779 --- /dev/null +++ b/deps/regex-0.1.58/src/utf8.rs @@ -0,0 +1,250 @@ +/// A few elementary UTF-8 encoding and decoding functions used by the matching +/// engines. +/// +/// In an ideal world, the matching engines operate on `&str` and we can just +/// lean on the standard library for all our UTF-8 needs. However, to support +/// byte based regexes (that can match on arbitrary bytes which may contain +/// UTF-8), we need to be capable of searching and decoding UTF-8 on a `&[u8]`. +/// The standard library doesn't really recognize this use case, so we have +/// to build it out ourselves. +/// +/// Should this be factored out into a separate crate? It seems independently +/// useful. There are other crates that already exist (e.g., `utf-8`) that have +/// overlapping use cases. Not sure what to do. + +use std::char; + +const TAG_CONT: u8 = 0b1000_0000; +const TAG_TWO: u8 = 0b1100_0000; +const TAG_THREE: u8 = 0b1110_0000; +const TAG_FOUR: u8 = 0b1111_0000; + +/// Encode the given Unicode character to `dst` as a single UTF-8 sequence. +/// +/// If `dst` is not long enough, then `None` is returned. Otherwise, the number +/// of bytes written is returned. +#[inline] +pub fn encode_utf8(character: char, dst: &mut [u8]) -> Option<usize> { + let code = character as u32; + if code <= 0x7F && !dst.is_empty() { + dst[0] = code as u8; + Some(1) + } else if code <= 0x7FF && dst.len() >= 2 { + dst[0] = (code >> 6 & 0x1F) as u8 | TAG_TWO; + dst[1] = (code & 0x3F) as u8 | TAG_CONT; + Some(2) + } else if code <= 0xFFFF && dst.len() >= 3 { + dst[0] = (code >> 12 & 0x0F) as u8 | TAG_THREE; + dst[1] = (code >> 6 & 0x3F) as u8 | TAG_CONT; + dst[2] = (code & 0x3F) as u8 | TAG_CONT; + Some(3) + } else if dst.len() >= 4 { + dst[0] = (code >> 18 & 0x07) as u8 | TAG_FOUR; + dst[1] = (code >> 12 & 0x3F) as u8 | TAG_CONT; + dst[2] = (code >> 6 & 0x3F) as u8 | TAG_CONT; + dst[3] = (code & 0x3F) as u8 | TAG_CONT; + Some(4) + } else { + None + } +} + +/// Decode a single UTF-8 sequence into a single Unicode codepoint from `src`. +/// +/// If no valid UTF-8 sequence could be found, then `None` is returned. +/// Otherwise, the decoded codepoint and the number of bytes read is returned. +/// The number of bytes read (for a valid UTF-8 sequence) is guaranteed to be +/// 1, 2, 3 or 4. +/// +/// Note that a UTF-8 sequence is invalid if it is incorrect UTF-8, encodes a +/// codepoint that is out of range (surrogate codepoints are out of range) or +/// is not the shortest possible UTF-8 sequence for that codepoint. +#[inline] +pub fn decode_utf8(src: &[u8]) -> Option<(char, usize)> { + let b0 = match src.get(0) { + None => return None, + Some(&b) if b <= 0x7F => return Some((b as char, 1)), + Some(&b) => b, + }; + match b0 { + 0b110_00000 ... 0b110_11111 => { + if src.len() < 2 { + return None; + } + let b1 = src[1]; + let cp = ((b0 & !TAG_TWO) as u32) << 6 + | ((b1 & !TAG_CONT) as u32); + match cp { + 0x80 ... 0x7FF => char::from_u32(cp).map(|cp| (cp, 2)), + _ => None, + } + } + 0b1110_0000 ... 0b1110_1111 => { + if src.len() < 3 { + return None; + } + let (b1, b2) = (src[1], src[2]); + let cp = ((b0 & !TAG_THREE) as u32) << 12 + | ((b1 & !TAG_CONT) as u32) << 6 + | ((b2 & !TAG_CONT) as u32); + match cp { + // char::from_u32 will disallow surrogate codepoints. + 0x800 ... 0xFFFF => char::from_u32(cp).map(|cp| (cp, 3)), + _ => None, + } + } + 0b11110_000 ... 0b11110_111 => { + if src.len() < 4 { + return None; + } + let (b1, b2, b3) = (src[1], src[2], src[3]); + let cp = ((b0 & !TAG_FOUR) as u32) << 18 + | ((b1 & !TAG_CONT) as u32) << 12 + | ((b2 & !TAG_CONT) as u32) << 6 + | ((b3 & !TAG_CONT) as u32); + match cp { + 0x10000 ... 0x10FFFF => char::from_u32(cp).map(|cp| (cp, 4)), + _ => None, + } + } + _ => None, + } +} + +/// Like decode_utf8, but decodes the last UTF-8 sequence in `src` instead of +/// the first. +pub fn decode_last_utf8(src: &[u8]) -> Option<(char, usize)> { + if src.is_empty() { + return None; + } + let mut start = src.len() - 1; + if src[start] <= 0x7F { + return Some((src[start] as char, 1)); + } + while start > src.len().saturating_sub(4) { + start -= 1; + if is_start_byte(src[start]) { + break; + } + } + match decode_utf8(&src[start..]) { + None => None, + Some((_, n)) if n < src.len() - start => None, + Some((cp, n)) => Some((cp, n)), + } +} + +fn is_start_byte(b: u8) -> bool { + b & 0b11_000000 != 0b1_0000000 +} + +#[cfg(test)] +mod tests { + use std::str; + + use quickcheck::quickcheck; + + use super::{ + TAG_CONT, TAG_TWO, TAG_THREE, TAG_FOUR, + decode_utf8, decode_last_utf8, encode_utf8, + }; + + #[test] + fn prop_roundtrip() { + fn p(given_cp: char) -> bool { + let mut tmp = [0; 4]; + let encoded_len = encode_utf8(given_cp, &mut tmp).unwrap(); + let (got_cp, got_len) = decode_utf8(&tmp[..encoded_len]).unwrap(); + encoded_len == got_len && given_cp == got_cp + } + quickcheck(p as fn(char) -> bool) + } + + #[test] + fn prop_roundtrip_last() { + fn p(given_cp: char) -> bool { + let mut tmp = [0; 4]; + let encoded_len = encode_utf8(given_cp, &mut tmp).unwrap(); + let (got_cp, got_len) = + decode_last_utf8(&tmp[..encoded_len]).unwrap(); + encoded_len == got_len && given_cp == got_cp + } + quickcheck(p as fn(char) -> bool) + } + + #[test] + fn prop_encode_matches_std() { + fn p(cp: char) -> bool { + let mut got = [0; 4]; + let n = encode_utf8(cp, &mut got).unwrap(); + let expected = cp.to_string(); + &got[..n] == expected.as_bytes() + } + quickcheck(p as fn(char) -> bool) + } + + #[test] + fn prop_decode_matches_std() { + fn p(given_cp: char) -> bool { + let mut tmp = [0; 4]; + let n = encode_utf8(given_cp, &mut tmp).unwrap(); + let (got_cp, _) = decode_utf8(&tmp[..n]).unwrap(); + let expected_cp = + str::from_utf8(&tmp[..n]).unwrap().chars().next().unwrap(); + got_cp == expected_cp + } + quickcheck(p as fn(char) -> bool) + } + + #[test] + fn prop_decode_last_matches_std() { + fn p(given_cp: char) -> bool { + let mut tmp = [0; 4]; + let n = encode_utf8(given_cp, &mut tmp).unwrap(); + let (got_cp, _) = decode_last_utf8(&tmp[..n]).unwrap(); + let expected_cp = + str::from_utf8(&tmp[..n]).unwrap() + .chars().rev().next().unwrap(); + got_cp == expected_cp + } + quickcheck(p as fn(char) -> bool) + } + + #[test] + fn reject_invalid() { + // Invalid start byte + assert_eq!(decode_utf8(&[0xFF]), None); + // Surrogate pair + assert_eq!(decode_utf8(&[0xED, 0xA0, 0x81]), None); + // Bad lengths + assert_eq!(decode_utf8(&[0xC3]), None); // 2 bytes + assert_eq!(decode_utf8(&[0xEF, 0xBF]), None); // 3 bytes + assert_eq!(decode_utf8(&[0xF4, 0x8F, 0xBF]), None); // 4 bytes + // Not a minimal UTF-8 sequence + assert_eq!(decode_utf8(&[TAG_TWO, TAG_CONT | b'a']), None); + assert_eq!(decode_utf8(&[TAG_THREE, TAG_CONT, TAG_CONT | b'a']), None); + assert_eq!(decode_utf8(&[ + TAG_FOUR, TAG_CONT, TAG_CONT, TAG_CONT | b'a', + ]), None); + } + + #[test] + fn reject_invalid_last() { + // Invalid start byte + assert_eq!(decode_last_utf8(&[0xFF]), None); + // Surrogate pair + assert_eq!(decode_last_utf8(&[0xED, 0xA0, 0x81]), None); + // Bad lengths + assert_eq!(decode_last_utf8(&[0xC3]), None); // 2 bytes + assert_eq!(decode_last_utf8(&[0xEF, 0xBF]), None); // 3 bytes + assert_eq!(decode_last_utf8(&[0xF4, 0x8F, 0xBF]), None); // 4 bytes + // Not a minimal UTF-8 sequence + assert_eq!(decode_last_utf8(&[TAG_TWO, TAG_CONT | b'a']), None); + assert_eq!(decode_last_utf8(&[ + TAG_THREE, TAG_CONT, TAG_CONT | b'a', + ]), None); + assert_eq!(decode_last_utf8(&[ + TAG_FOUR, TAG_CONT, TAG_CONT, TAG_CONT | b'a', + ]), None); + } +} diff --git a/deps/regex-0.1.58/tests/api.rs b/deps/regex-0.1.58/tests/api.rs new file mode 100644 index 000000000..275157bf0 --- /dev/null +++ b/deps/regex-0.1.58/tests/api.rs @@ -0,0 +1,236 @@ +#[test] +fn empty_regex_empty_match() { + let re = regex!(""); + assert_eq!(vec![(0, 0)], findall!(re, "")); +} + +#[test] +fn empty_regex_nonempty_match() { + let re = regex!(""); + assert_eq!(vec![(0, 0), (1, 1), (2, 2), (3, 3)], findall!(re, "abc")); +} + +#[test] +fn one_zero_length_match() { + let re = regex!(r"\d*"); + assert_eq!(vec![(0, 0), (1, 2), (3, 4)], findall!(re, "a1b2")); +} + +#[test] +fn many_zero_length_match() { + let re = regex!(r"\d*"); + assert_eq!(vec![(0, 0), (1, 2), (3, 3), (4, 4), (5, 6)], + findall!(re, "a1bbb2")); +} + +#[test] +fn many_sequential_zero_length_match() { + let re = regex!(r"\d?"); + assert_eq!(vec![(0, 0), (1, 2), (2, 3), (4, 5), (6, 6)], + findall!(re, "a12b3c")); +} + +#[test] +fn quoted_bracket_set() { + let re = regex!(r"([\x{5b}\x{5d}])"); + assert_eq!(vec![(0, 1), (1, 2)], findall!(re, "[]")); + let re = regex!(r"([\[\]])"); + assert_eq!(vec![(0, 1), (1, 2)], findall!(re, "[]")); +} + +#[test] +fn first_range_starts_with_left_bracket() { + let re = regex!(r"([[-z])"); + assert_eq!(vec![(0, 1), (1, 2)], findall!(re, "[]")); +} + +#[test] +fn range_ends_with_escape() { + let re = regex!(r"([\[-\x{5d}])"); + assert_eq!(vec![(0, 1), (1, 2)], findall!(re, "[]")); +} + +#[test] +fn empty_match_find_iter() { + let re = regex!(r".*?"); + assert_eq!(vec![(0, 0), (1, 1), (2, 2), (3, 3)], findall!(re, "abc")); +} + +#[test] +fn empty_match_captures_iter() { + let re = regex!(r".*?"); + let ms: Vec<_> = re.captures_iter(text!("abc")) + .map(|c| c.pos(0).unwrap()) + .collect(); + assert_eq!(ms, vec![(0, 0), (1, 1), (2, 2), (3, 3)]); +} + +#[test] +fn capture_names() { + let re = regex!(r"(.)(?P<a>.)"); + assert_eq!(3, re.captures_len()); + assert_eq!((3, Some(3)), re.capture_names().size_hint()); + assert_eq!(vec![None, None, Some("a")], + re.capture_names().collect::<Vec<_>>()); +} + +#[test] +fn regex_string() { + assert_eq!(r"[a-zA-Z0-9]+", regex!(r"[a-zA-Z0-9]+").as_str()); + assert_eq!(r"[a-zA-Z0-9]+", &format!("{}", regex!(r"[a-zA-Z0-9]+"))); + assert_eq!(r"[a-zA-Z0-9]+", &format!("{:?}", regex!(r"[a-zA-Z0-9]+"))); +} + +#[test] +fn capture_index() { + let re = regex!(r"^(?P<name>.+)$"); + let cap = re.captures(t!("abc")).unwrap(); + assert_eq!(&cap[0], t!("abc")); + assert_eq!(&cap[1], t!("abc")); + assert_eq!(&cap["name"], t!("abc")); +} + +#[test] +#[should_panic] +#[cfg_attr(all(target_env = "msvc", target_pointer_width = "32"), ignore)] +fn capture_index_panic_usize() { + let re = regex!(r"^(?P<name>.+)$"); + let cap = re.captures(t!("abc")).unwrap(); + let _ = cap[2]; +} + +#[test] +#[should_panic] +#[cfg_attr(all(target_env = "msvc", target_pointer_width = "32"), ignore)] +fn capture_index_panic_name() { + let re = regex!(r"^(?P<name>.+)$"); + let cap = re.captures(t!("abc")).unwrap(); + let _ = cap["bad name"]; +} + +#[test] +fn capture_index_lifetime() { + // This is a test of whether the types on `caps["..."]` are general + // enough. If not, this will fail to typecheck. + fn inner(s: &str) -> usize { + let re = regex!(r"(?P<number>\d+)"); + let caps = re.captures(t!(s)).unwrap(); + caps["number"].len() + } + assert_eq!(3, inner("123")); +} + +#[test] +fn capture_misc() { + let re = regex!(r"(.)(?P<a>a)?(.)(?P<b>.)"); + let cap = re.captures(t!("abc")).unwrap(); + + assert_eq!(5, cap.len()); + + assert_eq!(Some((0, 3)), cap.pos(0)); + assert_eq!(None, cap.pos(2)); + assert_eq!(Some((2, 3)), cap.pos(4)); + + assert_eq!(Some(t!("abc")), cap.at(0)); + assert_eq!(None, cap.at(2)); + assert_eq!(Some(t!("c")), cap.at(4)); + + assert_eq!(None, cap.name("a")); + assert_eq!(Some(t!("c")), cap.name("b")); +} + +#[test] +fn capture_iter() { + let re = regex!(r"(.)(?P<a>.)(.)(?P<b>.)"); + let cap = re.captures(t!("abcd")).unwrap(); + assert_eq!(5, cap.len()); + + let expected = vec![ + t!("abcd"), t!("a"), t!("b"), t!("c"), t!("d"), + ].into_iter().map(Some).collect::<Vec<_>>(); + let got = cap.iter().collect::<Vec<_>>(); + assert_eq!(expected, got); +} + +#[test] +fn capture_iter_missing() { + let re = regex!(r"(.)(?P<a>a)?(.)(?P<b>.)"); + let cap = re.captures(t!("abc")).unwrap(); + assert_eq!(5, cap.len()); + + let expected = vec![ + Some(t!("abc")), Some(t!("a")), None, Some(t!("b")), Some(t!("c")), + ]; + let got = cap.iter().collect::<Vec<_>>(); + assert_eq!(expected, got); +} + +#[test] +fn capture_iter_pos() { + let re = regex!(r"(.)(?P<a>.)(.)(?P<b>.)"); + let cap = re.captures(t!("abcd")).unwrap(); + + let expected = vec![ + (0, 4), (0, 1), (1, 2), (2, 3), (3, 4), + ].into_iter().map(Some).collect::<Vec<_>>(); + let got = cap.iter_pos().collect::<Vec<_>>(); + assert_eq!(expected, got); +} + +#[test] +fn capture_iter_pos_missing() { + let re = regex!(r"(.)(?P<a>a)?(.)(?P<b>.)"); + let cap = re.captures(t!("abc")).unwrap(); + + let expected = vec![ + Some((0, 3)), Some((0, 1)), None, Some((1, 2)), Some((2, 3)), + ]; + let got = cap.iter_pos().collect::<Vec<_>>(); + assert_eq!(expected, got); +} + +#[test] +fn capture_iter_named() { + let re = regex!(r"(.)(?P<a>.)(.)(?P<b>.)"); + let cap = re.captures(t!("abcd")).unwrap(); + + let expected1 = vec![ + ("a", Some(t!("b"))), ("b", Some(t!("d"))), + ]; + let expected2 = vec![ + ("b", Some(t!("d"))), ("a", Some(t!("b"))), + ]; + let got = cap.iter_named().collect::<Vec<_>>(); + assert!(got == expected1 || got == expected2); +} + +#[test] +fn capture_iter_named_missing() { + let re = regex!(r"(.)(?P<a>.)?(.)(?P<b>.)"); + let cap = re.captures(t!("abc")).unwrap(); + + let expected1 = vec![ + ("a", None), ("b", Some(t!("c"))), + ]; + let expected2 = vec![ + ("b", Some(t!("c"))), ("a", None), + ]; + let got = cap.iter_named().collect::<Vec<_>>(); + assert!(got == expected1 || got == expected2); +} + +expand!(expand1, r"(?P<foo>\w+)", "abc", "$foo", "abc"); +expand!(expand2, r"(?P<foo>\w+)", "abc", "$0", "abc"); +expand!(expand3, r"(?P<foo>\w+)", "abc", "$1", "abc"); +expand!(expand4, r"(?P<foo>\w+)", "abc", "$$1", "$1"); +expand!(expand5, r"(?P<foo>\w+)", "abc", "$$foo", "$foo"); +expand!(expand6, r"(?P<a>\w+)\s+(?P<b>\d+)", + "abc 123", "$b$a", "123abc"); +expand!(expand7, r"(?P<a>\w+)\s+(?P<b>\d+)", + "abc 123", "z$bz$az", "z"); +expand!(expand8, r"(?P<a>\w+)\s+(?P<b>\d+)", + "abc 123", ".$b.$a.", ".123.abc."); +expand!(expand9, r"(?P<a>\w+)\s+(?P<b>\d+)", + "abc 123", " $b $a ", " 123 abc "); +expand!(expand10, r"(?P<a>\w+)\s+(?P<b>\d+)", + "abc 123", "$bz$az", ""); diff --git a/deps/regex-0.1.58/tests/api_str.rs b/deps/regex-0.1.58/tests/api_str.rs new file mode 100644 index 000000000..266b6455b --- /dev/null +++ b/deps/regex-0.1.58/tests/api_str.rs @@ -0,0 +1,27 @@ +// These tests don't really make sense with the bytes API, so we only test them +// on the Unicode API. + +#[test] +fn empty_match_unicode_find_iter() { + // Tests that we still yield byte ranges at valid UTF-8 sequence boundaries + // even when we're susceptible to empty width matches. + let re = regex!(u!(r".*?")); + assert_eq!(vec![(0, 0), (3, 3), (4, 4), (7, 7), (8, 8)], + findall!(re, "Ⅰ1Ⅱ2")); +} + +#[test] +fn empty_match_unicode_captures_iter() { + // Same as empty_match_unicode_find_iter, but tests capture iteration. + let re = regex!(u!(r".*?")); + let ms: Vec<_> = re.captures_iter(text!("Ⅰ1Ⅱ2")) + .map(|c| c.pos(0).unwrap()) + .collect(); + assert_eq!(vec![(0, 0), (3, 3), (4, 4), (7, 7), (8, 8)], ms); +} + +#[test] +fn eq() { + use regex::Regex; + assert_eq!(regex!(r"[a-z]+"), Regex::new("[a-z]+").unwrap()); +} diff --git a/deps/regex-0.1.58/tests/bytes.rs b/deps/regex-0.1.58/tests/bytes.rs new file mode 100644 index 000000000..a290630d8 --- /dev/null +++ b/deps/regex-0.1.58/tests/bytes.rs @@ -0,0 +1,40 @@ +// These are tests specifically crafted for regexes that can match arbitrary +// bytes. + +// A silly wrapper to make it possible to write and match raw bytes. +struct R<'a>(&'a [u8]); +impl<'a> R<'a> { fn as_bytes(&self) -> &'a [u8] { &self.0 } } + +mat!(word_boundary, r" \b", " δ", None); +mat!(word_boundary_unicode, r"(?u) \b", " δ", Some((0, 1))); +mat!(word_not_boundary, r" \B", " δ", Some((0, 1))); +mat!(word_not_boundary_unicode, r"(?u) \B", " δ", None); + +mat!(perl_w_ascii, r"\w+", "aδ", Some((0, 1))); +mat!(perl_w_unicode, r"(?u)\w+", "aδ", Some((0, 3))); +mat!(perl_d_ascii, r"\d+", "1२३9", Some((0, 1))); +mat!(perl_d_unicode, r"(?u)\d+", "1२३9", Some((0, 8))); +mat!(perl_s_ascii, r"\s+", " \u{1680}", Some((0, 1))); +mat!(perl_s_unicode, r"(?u)\s+", " \u{1680}", Some((0, 4))); + +// The first `(.+)` matches two Unicode codepoints, but can't match the 5th +// byte, which isn't valid UTF-8. The second (byte based) `(.+)` takes over and +// matches. +mat!(mixed1, r"(?u)(.+)(?-u)(.+)", R(b"\xCE\x93\xCE\x94\xFF"), + Some((0, 5)), Some((0, 4)), Some((4, 5))); + +mat!(case_ascii_one, r"(?i)a", "A", Some((0, 1))); +mat!(case_ascii_class, r"(?i)[a-z]+", "AaAaA", Some((0, 5))); +mat!(case_unicode, r"(?iu)[a-z]+", "aA\u{212A}aA", Some((0, 7))); +mat!(case_not_unicode, r"(?i)[a-z]+", "aA\u{212A}aA", Some((0, 2))); + +mat!(negate_unicode, r"(?u)[^a]", "δ", Some((0, 2))); +mat!(negate_not_unicode, r"[^a]", "δ", Some((0, 1))); + +// This doesn't match in a normal Unicode regex because the implicit preceding +// `.*?` is Unicode aware. +mat!(dotstar_prefix_not_unicode, r"a", R(b"\xFFa"), Some((1, 2))); + +// Have fun with null bytes. +mat!(null_bytes, r"(?P<cstr>[^\x00]+)\x00", + R(b"foo\x00"), Some((0, 4)), Some((0, 3))); diff --git a/deps/regex-0.1.58/tests/crazy.rs b/deps/regex-0.1.58/tests/crazy.rs new file mode 100644 index 000000000..03ddb2dd9 --- /dev/null +++ b/deps/regex-0.1.58/tests/crazy.rs @@ -0,0 +1,76 @@ +// Some crazy expressions from regular-expressions.info. +mat!(match_ranges, + r"\b(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b", + "num: 255", Some((5, 8))); +mat!(match_ranges_not, + r"\b(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b", + "num: 256", None); +mat!(match_float1, r"[-+]?[0-9]*\.?[0-9]+", "0.1", Some((0, 3))); +mat!(match_float2, r"[-+]?[0-9]*\.?[0-9]+", "0.1.2", Some((0, 3))); +mat!(match_float3, r"[-+]?[0-9]*\.?[0-9]+", "a1.2", Some((1, 4))); +mat!(match_float4, r"^[-+]?[0-9]*\.?[0-9]+$", "1.a", None); +mat!(match_email, r"(?i)\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b", + "mine is jam.slam@gmail.com ", Some((8, 26))); +mat!(match_email_not, r"(?i)\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b", + "mine is jam.slam@gmail ", None); +mat!(match_email_big, r"[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?", + "mine is jam.slam@gmail.com ", Some((8, 26))); +mat!(match_date1, + r"^(19|20)\d\d[- /.](0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01])$", + "1900-01-01", Some((0, 10))); +mat!(match_date2, + r"^(19|20)\d\d[- /.](0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01])$", + "1900-00-01", None); +mat!(match_date3, + r"^(19|20)\d\d[- /.](0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01])$", + "1900-13-01", None); + +// Do some crazy dancing with the start/end assertions. +matiter!(match_start_end_empty, r"^$", "", (0, 0)); +matiter!(match_start_end_empty_many_1, r"^$^$^$", "", (0, 0)); +matiter!(match_start_end_empty_many_2, r"^^^$$$", "", (0, 0)); +matiter!(match_start_end_empty_rev, r"$^", "", (0, 0)); +matiter!(match_start_end_empty_rep, r"(?:^$)*", "a\nb\nc", + (0, 0), (1, 1), (2, 2), (3, 3), (4, 4), (5, 5)); +matiter!(match_start_end_empty_rep_rev, r"(?:$^)*", "a\nb\nc", + (0, 0), (1, 1), (2, 2), (3, 3), (4, 4), (5, 5)); + +// Test negated character classes. +mat!(negclass_letters, r"[^ac]", "acx", Some((2, 3))); +mat!(negclass_letter_comma, r"[^a,]", "a,x", Some((2, 3))); +mat!(negclass_letter_space, r"[^a\s]", "a x", Some((2, 3))); +mat!(negclass_comma, r"[^,]", ",,x", Some((2, 3))); +mat!(negclass_space, r"[^\s]", " a", Some((1, 2))); +mat!(negclass_space_comma, r"[^,\s]", ", a", Some((2, 3))); +mat!(negclass_comma_space, r"[^\s,]", " ,a", Some((2, 3))); +mat!(negclass_ascii, r"[^[:alpha:]Z]", "A1", Some((1, 2))); + +// Test that the DFA can handle pathological cases. +// (This should result in the DFA's cache being flushed too frequently, which +// should cause it to quit and fall back to the NFA algorithm.) +#[test] +fn dfa_handles_pathological_case() { + fn ones_and_zeroes(count: usize) -> String { + use rand::{Rng, thread_rng}; + + let mut rng = thread_rng(); + let mut s = String::new(); + for _ in 0..count { + if rng.gen() { + s.push('1'); + } else { + s.push('0'); + } + } + s + } + + let re = regex!(r"[01]*1[01]{20}$"); + let text = { + let mut pieces = ones_and_zeroes(100_000); + pieces.push('1'); + pieces.push_str(&ones_and_zeroes(20)); + pieces + }; + assert!(re.is_match(text!(&*text))); +} diff --git a/deps/regex-0.1.58/tests/flags.rs b/deps/regex-0.1.58/tests/flags.rs new file mode 100644 index 000000000..0c9b36c91 --- /dev/null +++ b/deps/regex-0.1.58/tests/flags.rs @@ -0,0 +1,11 @@ +mat!(match_flag_case, "(?i)abc", "ABC", Some((0, 3))); +mat!(match_flag_weird_case, "(?i)a(?-i)bc", "Abc", Some((0, 3))); +mat!(match_flag_weird_case_not, "(?i)a(?-i)bc", "ABC", None); +mat!(match_flag_case_dotnl, "(?is)a.", "A\n", Some((0, 2))); +mat!(match_flag_case_dotnl_toggle, "(?is)a.(?-is)a.", "A\nab", Some((0, 4))); +mat!(match_flag_case_dotnl_toggle_not, "(?is)a.(?-is)a.", "A\na\n", None); +mat!(match_flag_case_dotnl_toggle_ok, "(?is)a.(?-is:a.)?", "A\na\n", Some((0, 2))); +mat!(match_flag_multi, "(?m)(?:^\\d+$\n?)+", "123\n456\n789", Some((0, 11))); +mat!(match_flag_ungreedy, "(?U)a+", "aa", Some((0, 1))); +mat!(match_flag_ungreedy_greedy, "(?U)a+?", "aa", Some((0, 2))); +mat!(match_flag_ungreedy_noop, "(?U)(?-U)a+", "aa", Some((0, 2))); diff --git a/deps/regex-0.1.58/tests/fowler.rs b/deps/regex-0.1.58/tests/fowler.rs new file mode 100644 index 000000000..a4d1a5bdf --- /dev/null +++ b/deps/regex-0.1.58/tests/fowler.rs @@ -0,0 +1,371 @@ +// Copyright 2014 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +// DO NOT EDIT. Automatically generated by 'scripts/regex-match-tests.py' +// on 2015-02-28 11:00:00.161706. + +// Tests from basic.dat +mat!(match_basic_3, r"abracadabra$", r"abracadabracadabra", Some((7, 18))); +mat!(match_basic_4, r"a...b", r"abababbb", Some((2, 7))); +mat!(match_basic_5, r"XXXXXX", r"..XXXXXX", Some((2, 8))); +mat!(match_basic_6, r"\)", r"()", Some((1, 2))); +mat!(match_basic_7, r"a]", r"a]a", Some((0, 2))); +mat!(match_basic_9, r"\}", r"}", Some((0, 1))); +mat!(match_basic_10, r"\]", r"]", Some((0, 1))); +mat!(match_basic_12, r"]", r"]", Some((0, 1))); +mat!(match_basic_15, r"^a", r"ax", Some((0, 1))); +mat!(match_basic_16, r"\^a", r"a^a", Some((1, 3))); +mat!(match_basic_17, r"a\^", r"a^", Some((0, 2))); +mat!(match_basic_18, r"a$", r"aa", Some((1, 2))); +mat!(match_basic_19, r"a\$", r"a$", Some((0, 2))); +mat!(match_basic_20, r"^$", r"", Some((0, 0))); +mat!(match_basic_21, r"$^", r"", Some((0, 0))); +mat!(match_basic_22, r"a($)", r"aa", Some((1, 2)), Some((2, 2))); +mat!(match_basic_23, r"a*(^a)", r"aa", Some((0, 1)), Some((0, 1))); +mat!(match_basic_24, r"(..)*(...)*", r"a", Some((0, 0))); +mat!(match_basic_25, r"(..)*(...)*", r"abcd", Some((0, 4)), Some((2, 4))); +mat!(match_basic_26, r"(ab|a)(bc|c)", r"abc", Some((0, 3)), Some((0, 2)), Some((2, 3))); +mat!(match_basic_27, r"(ab)c|abc", r"abc", Some((0, 3)), Some((0, 2))); +mat!(match_basic_28, r"a{0}b", r"ab", Some((1, 2))); +mat!(match_basic_29, r"(a*)(b?)(b+)b{3}", r"aaabbbbbbb", Some((0, 10)), Some((0, 3)), Some((3, 4)), Some((4, 7))); +mat!(match_basic_30, r"(a*)(b{0,1})(b{1,})b{3}", r"aaabbbbbbb", Some((0, 10)), Some((0, 3)), Some((3, 4)), Some((4, 7))); +mat!(match_basic_32, r"((a|a)|a)", r"a", Some((0, 1)), Some((0, 1)), Some((0, 1))); +mat!(match_basic_33, r"(a*)(a|aa)", r"aaaa", Some((0, 4)), Some((0, 3)), Some((3, 4))); +mat!(match_basic_34, r"a*(a.|aa)", r"aaaa", Some((0, 4)), Some((2, 4))); +mat!(match_basic_35, r"a(b)|c(d)|a(e)f", r"aef", Some((0, 3)), None, None, Some((1, 2))); +mat!(match_basic_36, r"(a|b)?.*", r"b", Some((0, 1)), Some((0, 1))); +mat!(match_basic_37, r"(a|b)c|a(b|c)", r"ac", Some((0, 2)), Some((0, 1))); +mat!(match_basic_38, r"(a|b)c|a(b|c)", r"ab", Some((0, 2)), None, Some((1, 2))); +mat!(match_basic_39, r"(a|b)*c|(a|ab)*c", r"abc", Some((0, 3)), Some((1, 2))); +mat!(match_basic_40, r"(a|b)*c|(a|ab)*c", r"xc", Some((1, 2))); +mat!(match_basic_41, r"(.a|.b).*|.*(.a|.b)", r"xa", Some((0, 2)), Some((0, 2))); +mat!(match_basic_42, r"a?(ab|ba)ab", r"abab", Some((0, 4)), Some((0, 2))); +mat!(match_basic_43, r"a?(ac{0}b|ba)ab", r"abab", Some((0, 4)), Some((0, 2))); +mat!(match_basic_44, r"ab|abab", r"abbabab", Some((0, 2))); +mat!(match_basic_45, r"aba|bab|bba", r"baaabbbaba", Some((5, 8))); +mat!(match_basic_46, r"aba|bab", r"baaabbbaba", Some((6, 9))); +mat!(match_basic_47, r"(aa|aaa)*|(a|aaaaa)", r"aa", Some((0, 2)), Some((0, 2))); +mat!(match_basic_48, r"(a.|.a.)*|(a|.a...)", r"aa", Some((0, 2)), Some((0, 2))); +mat!(match_basic_49, r"ab|a", r"xabc", Some((1, 3))); +mat!(match_basic_50, r"ab|a", r"xxabc", Some((2, 4))); +mat!(match_basic_51, r"(?i)(Ab|cD)*", r"aBcD", Some((0, 4)), Some((2, 4))); +mat!(match_basic_52, r"[^-]", r"--a", Some((2, 3))); +mat!(match_basic_53, r"[a-]*", r"--a", Some((0, 3))); +mat!(match_basic_54, r"[a-m-]*", r"--amoma--", Some((0, 4))); +mat!(match_basic_55, r":::1:::0:|:::1:1:0:", r":::0:::1:::1:::0:", Some((8, 17))); +mat!(match_basic_56, r":::1:::0:|:::1:1:1:", r":::0:::1:::1:::0:", Some((8, 17))); +mat!(match_basic_57, r"[[:upper:]]", r"A", Some((0, 1))); +mat!(match_basic_58, r"[[:lower:]]+", r"`az{", Some((1, 3))); +mat!(match_basic_59, r"[[:upper:]]+", r"@AZ[", Some((1, 3))); +mat!(match_basic_65, r" +", r" +", Some((0, 1))); +mat!(match_basic_66, r" +", r" +", Some((0, 1))); +mat!(match_basic_67, r"[^a]", r" +", Some((0, 1))); +mat!(match_basic_68, r" +a", r" +a", Some((0, 2))); +mat!(match_basic_69, r"(a)(b)(c)", r"abc", Some((0, 3)), Some((0, 1)), Some((1, 2)), Some((2, 3))); +mat!(match_basic_70, r"xxx", r"xxx", Some((0, 3))); +mat!(match_basic_71, r"(^|[ (,;])((([Ff]eb[^ ]* *|0*2/|\* */?)0*[6-7]))([^0-9]|$)", r"feb 6,", Some((0, 6))); +mat!(match_basic_72, r"(^|[ (,;])((([Ff]eb[^ ]* *|0*2/|\* */?)0*[6-7]))([^0-9]|$)", r"2/7", Some((0, 3))); +mat!(match_basic_73, r"(^|[ (,;])((([Ff]eb[^ ]* *|0*2/|\* */?)0*[6-7]))([^0-9]|$)", r"feb 1,Feb 6", Some((5, 11))); +mat!(match_basic_74, r"((((((((((((((((((((((((((((((x))))))))))))))))))))))))))))))", r"x", Some((0, 1)), Some((0, 1)), Some((0, 1))); +mat!(match_basic_75, r"((((((((((((((((((((((((((((((x))))))))))))))))))))))))))))))*", r"xx", Some((0, 2)), Some((1, 2)), Some((1, 2))); +mat!(match_basic_76, r"a?(ab|ba)*", r"ababababababababababababababababababababababababababababababababababababababababa", Some((0, 81)), Some((79, 81))); +mat!(match_basic_77, r"abaa|abbaa|abbbaa|abbbbaa", r"ababbabbbabbbabbbbabbbbaa", Some((18, 25))); +mat!(match_basic_78, r"abaa|abbaa|abbbaa|abbbbaa", r"ababbabbbabbbabbbbabaa", Some((18, 22))); +mat!(match_basic_79, r"aaac|aabc|abac|abbc|baac|babc|bbac|bbbc", r"baaabbbabac", Some((7, 11))); +mat!(match_basic_80, r".*", r"", Some((0, 2))); +mat!(match_basic_81, r"aaaa|bbbb|cccc|ddddd|eeeeee|fffffff|gggg|hhhh|iiiii|jjjjj|kkkkk|llll", r"XaaaXbbbXcccXdddXeeeXfffXgggXhhhXiiiXjjjXkkkXlllXcbaXaaaa", Some((53, 57))); +mat!(match_basic_83, r"a*a*a*a*a*b", r"aaaaaaaaab", Some((0, 10))); +mat!(match_basic_84, r"^", r"", Some((0, 0))); +mat!(match_basic_85, r"$", r"", Some((0, 0))); +mat!(match_basic_86, r"^$", r"", Some((0, 0))); +mat!(match_basic_87, r"^a$", r"a", Some((0, 1))); +mat!(match_basic_88, r"abc", r"abc", Some((0, 3))); +mat!(match_basic_89, r"abc", r"xabcy", Some((1, 4))); +mat!(match_basic_90, r"abc", r"ababc", Some((2, 5))); +mat!(match_basic_91, r"ab*c", r"abc", Some((0, 3))); +mat!(match_basic_92, r"ab*bc", r"abc", Some((0, 3))); +mat!(match_basic_93, r"ab*bc", r"abbc", Some((0, 4))); +mat!(match_basic_94, r"ab*bc", r"abbbbc", Some((0, 6))); +mat!(match_basic_95, r"ab+bc", r"abbc", Some((0, 4))); +mat!(match_basic_96, r"ab+bc", r"abbbbc", Some((0, 6))); +mat!(match_basic_97, r"ab?bc", r"abbc", Some((0, 4))); +mat!(match_basic_98, r"ab?bc", r"abc", Some((0, 3))); +mat!(match_basic_99, r"ab?c", r"abc", Some((0, 3))); +mat!(match_basic_100, r"^abc$", r"abc", Some((0, 3))); +mat!(match_basic_101, r"^abc", r"abcc", Some((0, 3))); +mat!(match_basic_102, r"abc$", r"aabc", Some((1, 4))); +mat!(match_basic_103, r"^", r"abc", Some((0, 0))); +mat!(match_basic_104, r"$", r"abc", Some((3, 3))); +mat!(match_basic_105, r"a.c", r"abc", Some((0, 3))); +mat!(match_basic_106, r"a.c", r"axc", Some((0, 3))); +mat!(match_basic_107, r"a.*c", r"axyzc", Some((0, 5))); +mat!(match_basic_108, r"a[bc]d", r"abd", Some((0, 3))); +mat!(match_basic_109, r"a[b-d]e", r"ace", Some((0, 3))); +mat!(match_basic_110, r"a[b-d]", r"aac", Some((1, 3))); +mat!(match_basic_111, r"a[-b]", r"a-", Some((0, 2))); +mat!(match_basic_112, r"a[b-]", r"a-", Some((0, 2))); +mat!(match_basic_113, r"a]", r"a]", Some((0, 2))); +mat!(match_basic_114, r"a[]]b", r"a]b", Some((0, 3))); +mat!(match_basic_115, r"a[^bc]d", r"aed", Some((0, 3))); +mat!(match_basic_116, r"a[^-b]c", r"adc", Some((0, 3))); +mat!(match_basic_117, r"a[^]b]c", r"adc", Some((0, 3))); +mat!(match_basic_118, r"ab|cd", r"abc", Some((0, 2))); +mat!(match_basic_119, r"ab|cd", r"abcd", Some((0, 2))); +mat!(match_basic_120, r"a\(b", r"a(b", Some((0, 3))); +mat!(match_basic_121, r"a\(*b", r"ab", Some((0, 2))); +mat!(match_basic_122, r"a\(*b", r"a((b", Some((0, 4))); +mat!(match_basic_123, r"((a))", r"abc", Some((0, 1)), Some((0, 1)), Some((0, 1))); +mat!(match_basic_124, r"(a)b(c)", r"abc", Some((0, 3)), Some((0, 1)), Some((2, 3))); +mat!(match_basic_125, r"a+b+c", r"aabbabc", Some((4, 7))); +mat!(match_basic_126, r"a*", r"aaa", Some((0, 3))); +mat!(match_basic_128, r"(a*)*", r"-", Some((0, 0)), None); +mat!(match_basic_129, r"(a*)+", r"-", Some((0, 0)), Some((0, 0))); +mat!(match_basic_131, r"(a*|b)*", r"-", Some((0, 0)), None); +mat!(match_basic_132, r"(a+|b)*", r"ab", Some((0, 2)), Some((1, 2))); +mat!(match_basic_133, r"(a+|b)+", r"ab", Some((0, 2)), Some((1, 2))); +mat!(match_basic_134, r"(a+|b)?", r"ab", Some((0, 1)), Some((0, 1))); +mat!(match_basic_135, r"[^ab]*", r"cde", Some((0, 3))); +mat!(match_basic_137, r"(^)*", r"-", Some((0, 0)), None); +mat!(match_basic_138, r"a*", r"", Some((0, 0))); +mat!(match_basic_139, r"([abc])*d", r"abbbcd", Some((0, 6)), Some((4, 5))); +mat!(match_basic_140, r"([abc])*bcd", r"abcd", Some((0, 4)), Some((0, 1))); +mat!(match_basic_141, r"a|b|c|d|e", r"e", Some((0, 1))); +mat!(match_basic_142, r"(a|b|c|d|e)f", r"ef", Some((0, 2)), Some((0, 1))); +mat!(match_basic_144, r"((a*|b))*", r"-", Some((0, 0)), None, None); +mat!(match_basic_145, r"abcd*efg", r"abcdefg", Some((0, 7))); +mat!(match_basic_146, r"ab*", r"xabyabbbz", Some((1, 3))); +mat!(match_basic_147, r"ab*", r"xayabbbz", Some((1, 2))); +mat!(match_basic_148, r"(ab|cd)e", r"abcde", Some((2, 5)), Some((2, 4))); +mat!(match_basic_149, r"[abhgefdc]ij", r"hij", Some((0, 3))); +mat!(match_basic_150, r"(a|b)c*d", r"abcd", Some((1, 4)), Some((1, 2))); +mat!(match_basic_151, r"(ab|ab*)bc", r"abc", Some((0, 3)), Some((0, 1))); +mat!(match_basic_152, r"a([bc]*)c*", r"abc", Some((0, 3)), Some((1, 3))); +mat!(match_basic_153, r"a([bc]*)(c*d)", r"abcd", Some((0, 4)), Some((1, 3)), Some((3, 4))); +mat!(match_basic_154, r"a([bc]+)(c*d)", r"abcd", Some((0, 4)), Some((1, 3)), Some((3, 4))); +mat!(match_basic_155, r"a([bc]*)(c+d)", r"abcd", Some((0, 4)), Some((1, 2)), Some((2, 4))); +mat!(match_basic_156, r"a[bcd]*dcdcde", r"adcdcde", Some((0, 7))); +mat!(match_basic_157, r"(ab|a)b*c", r"abc", Some((0, 3)), Some((0, 2))); +mat!(match_basic_158, r"((a)(b)c)(d)", r"abcd", Some((0, 4)), Some((0, 3)), Some((0, 1)), Some((1, 2)), Some((3, 4))); +mat!(match_basic_159, r"[A-Za-z_][A-Za-z0-9_]*", r"alpha", Some((0, 5))); +mat!(match_basic_160, r"^a(bc+|b[eh])g|.h$", r"abh", Some((1, 3))); +mat!(match_basic_161, r"(bc+d$|ef*g.|h?i(j|k))", r"effgz", Some((0, 5)), Some((0, 5))); +mat!(match_basic_162, r"(bc+d$|ef*g.|h?i(j|k))", r"ij", Some((0, 2)), Some((0, 2)), Some((1, 2))); +mat!(match_basic_163, r"(bc+d$|ef*g.|h?i(j|k))", r"reffgz", Some((1, 6)), Some((1, 6))); +mat!(match_basic_164, r"(((((((((a)))))))))", r"a", Some((0, 1)), Some((0, 1)), Some((0, 1)), Some((0, 1)), Some((0, 1)), Some((0, 1)), Some((0, 1)), Some((0, 1)), Some((0, 1)), Some((0, 1))); +mat!(match_basic_165, r"multiple words", r"multiple words yeah", Some((0, 14))); +mat!(match_basic_166, r"(.*)c(.*)", r"abcde", Some((0, 5)), Some((0, 2)), Some((3, 5))); +mat!(match_basic_167, r"abcd", r"abcd", Some((0, 4))); +mat!(match_basic_168, r"a(bc)d", r"abcd", Some((0, 4)), Some((1, 3))); +mat!(match_basic_169, r"a[-]?c", r"ac", Some((0, 3))); +mat!(match_basic_170, r"M[ou]'?am+[ae]r .*([AEae]l[- ])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", r"Muammar Qaddafi", Some((0, 15)), None, Some((10, 12))); +mat!(match_basic_171, r"M[ou]'?am+[ae]r .*([AEae]l[- ])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", r"Mo'ammar Gadhafi", Some((0, 16)), None, Some((11, 13))); +mat!(match_basic_172, r"M[ou]'?am+[ae]r .*([AEae]l[- ])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", r"Muammar Kaddafi", Some((0, 15)), None, Some((10, 12))); +mat!(match_basic_173, r"M[ou]'?am+[ae]r .*([AEae]l[- ])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", r"Muammar Qadhafi", Some((0, 15)), None, Some((10, 12))); +mat!(match_basic_174, r"M[ou]'?am+[ae]r .*([AEae]l[- ])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", r"Muammar Gadafi", Some((0, 14)), None, Some((10, 11))); +mat!(match_basic_175, r"M[ou]'?am+[ae]r .*([AEae]l[- ])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", r"Mu'ammar Qadafi", Some((0, 15)), None, Some((11, 12))); +mat!(match_basic_176, r"M[ou]'?am+[ae]r .*([AEae]l[- ])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", r"Moamar Gaddafi", Some((0, 14)), None, Some((9, 11))); +mat!(match_basic_177, r"M[ou]'?am+[ae]r .*([AEae]l[- ])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", r"Mu'ammar Qadhdhafi", Some((0, 18)), None, Some((13, 15))); +mat!(match_basic_178, r"M[ou]'?am+[ae]r .*([AEae]l[- ])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", r"Muammar Khaddafi", Some((0, 16)), None, Some((11, 13))); +mat!(match_basic_179, r"M[ou]'?am+[ae]r .*([AEae]l[- ])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", r"Muammar Ghaddafy", Some((0, 16)), None, Some((11, 13))); +mat!(match_basic_180, r"M[ou]'?am+[ae]r .*([AEae]l[- ])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", r"Muammar Ghadafi", Some((0, 15)), None, Some((11, 12))); +mat!(match_basic_181, r"M[ou]'?am+[ae]r .*([AEae]l[- ])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", r"Muammar Ghaddafi", Some((0, 16)), None, Some((11, 13))); +mat!(match_basic_182, r"M[ou]'?am+[ae]r .*([AEae]l[- ])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", r"Muamar Kaddafi", Some((0, 14)), None, Some((9, 11))); +mat!(match_basic_183, r"M[ou]'?am+[ae]r .*([AEae]l[- ])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", r"Muammar Quathafi", Some((0, 16)), None, Some((11, 13))); +mat!(match_basic_184, r"M[ou]'?am+[ae]r .*([AEae]l[- ])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", r"Muammar Gheddafi", Some((0, 16)), None, Some((11, 13))); +mat!(match_basic_185, r"M[ou]'?am+[ae]r .*([AEae]l[- ])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", r"Moammar Khadafy", Some((0, 15)), None, Some((11, 12))); +mat!(match_basic_186, r"M[ou]'?am+[ae]r .*([AEae]l[- ])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", r"Moammar Qudhafi", Some((0, 15)), None, Some((10, 12))); +mat!(match_basic_187, r"a+(b|c)*d+", r"aabcdd", Some((0, 6)), Some((3, 4))); +mat!(match_basic_188, r"^.+$", r"vivi", Some((0, 4))); +mat!(match_basic_189, r"^(.+)$", r"vivi", Some((0, 4)), Some((0, 4))); +mat!(match_basic_190, r"^([^!.]+).att.com!(.+)$", r"gryphon.att.com!eby", Some((0, 19)), Some((0, 7)), Some((16, 19))); +mat!(match_basic_191, r"^([^!]+!)?([^!]+)$", r"bas", Some((0, 3)), None, Some((0, 3))); +mat!(match_basic_192, r"^([^!]+!)?([^!]+)$", r"bar!bas", Some((0, 7)), Some((0, 4)), Some((4, 7))); +mat!(match_basic_193, r"^([^!]+!)?([^!]+)$", r"foo!bas", Some((0, 7)), Some((0, 4)), Some((4, 7))); +mat!(match_basic_194, r"^.+!([^!]+!)([^!]+)$", r"foo!bar!bas", Some((0, 11)), Some((4, 8)), Some((8, 11))); +mat!(match_basic_195, r"((foo)|(bar))!bas", r"bar!bas", Some((0, 7)), Some((0, 3)), None, Some((0, 3))); +mat!(match_basic_196, r"((foo)|(bar))!bas", r"foo!bar!bas", Some((4, 11)), Some((4, 7)), None, Some((4, 7))); +mat!(match_basic_197, r"((foo)|(bar))!bas", r"foo!bas", Some((0, 7)), Some((0, 3)), Some((0, 3))); +mat!(match_basic_198, r"((foo)|bar)!bas", r"bar!bas", Some((0, 7)), Some((0, 3))); +mat!(match_basic_199, r"((foo)|bar)!bas", r"foo!bar!bas", Some((4, 11)), Some((4, 7))); +mat!(match_basic_200, r"((foo)|bar)!bas", r"foo!bas", Some((0, 7)), Some((0, 3)), Some((0, 3))); +mat!(match_basic_201, r"(foo|(bar))!bas", r"bar!bas", Some((0, 7)), Some((0, 3)), Some((0, 3))); +mat!(match_basic_202, r"(foo|(bar))!bas", r"foo!bar!bas", Some((4, 11)), Some((4, 7)), Some((4, 7))); +mat!(match_basic_203, r"(foo|(bar))!bas", r"foo!bas", Some((0, 7)), Some((0, 3))); +mat!(match_basic_204, r"(foo|bar)!bas", r"bar!bas", Some((0, 7)), Some((0, 3))); +mat!(match_basic_205, r"(foo|bar)!bas", r"foo!bar!bas", Some((4, 11)), Some((4, 7))); +mat!(match_basic_206, r"(foo|bar)!bas", r"foo!bas", Some((0, 7)), Some((0, 3))); +mat!(match_basic_207, r"^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))$", r"foo!bar!bas", Some((0, 11)), Some((0, 11)), None, None, Some((4, 8)), Some((8, 11))); +mat!(match_basic_208, r"^([^!]+!)?([^!]+)$|^.+!([^!]+!)([^!]+)$", r"bas", Some((0, 3)), None, Some((0, 3))); +mat!(match_basic_209, r"^([^!]+!)?([^!]+)$|^.+!([^!]+!)([^!]+)$", r"bar!bas", Some((0, 7)), Some((0, 4)), Some((4, 7))); +mat!(match_basic_210, r"^([^!]+!)?([^!]+)$|^.+!([^!]+!)([^!]+)$", r"foo!bar!bas", Some((0, 11)), None, None, Some((4, 8)), Some((8, 11))); +mat!(match_basic_211, r"^([^!]+!)?([^!]+)$|^.+!([^!]+!)([^!]+)$", r"foo!bas", Some((0, 7)), Some((0, 4)), Some((4, 7))); +mat!(match_basic_212, r"^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))$", r"bas", Some((0, 3)), Some((0, 3)), None, Some((0, 3))); +mat!(match_basic_213, r"^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))$", r"bar!bas", Some((0, 7)), Some((0, 7)), Some((0, 4)), Some((4, 7))); +mat!(match_basic_214, r"^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))$", r"foo!bar!bas", Some((0, 11)), Some((0, 11)), None, None, Some((4, 8)), Some((8, 11))); +mat!(match_basic_215, r"^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))$", r"foo!bas", Some((0, 7)), Some((0, 7)), Some((0, 4)), Some((4, 7))); +mat!(match_basic_216, r".*(/XXX).*", r"/XXX", Some((0, 4)), Some((0, 4))); +mat!(match_basic_217, r".*(\\XXX).*", r"\XXX", Some((0, 4)), Some((0, 4))); +mat!(match_basic_218, r"\\XXX", r"\XXX", Some((0, 4))); +mat!(match_basic_219, r".*(/000).*", r"/000", Some((0, 4)), Some((0, 4))); +mat!(match_basic_220, r".*(\\000).*", r"\000", Some((0, 4)), Some((0, 4))); +mat!(match_basic_221, r"\\000", r"\000", Some((0, 4))); + +// Tests from nullsubexpr.dat +mat!(match_nullsubexpr_3, r"(a*)*", r"a", Some((0, 1)), Some((0, 1))); +mat!(match_nullsubexpr_5, r"(a*)*", r"x", Some((0, 0)), None); +mat!(match_nullsubexpr_6, r"(a*)*", r"aaaaaa", Some((0, 6)), Some((0, 6))); +mat!(match_nullsubexpr_7, r"(a*)*", r"aaaaaax", Some((0, 6)), Some((0, 6))); +mat!(match_nullsubexpr_8, r"(a*)+", r"a", Some((0, 1)), Some((0, 1))); +mat!(match_nullsubexpr_9, r"(a*)+", r"x", Some((0, 0)), Some((0, 0))); +mat!(match_nullsubexpr_10, r"(a*)+", r"aaaaaa", Some((0, 6)), Some((0, 6))); +mat!(match_nullsubexpr_11, r"(a*)+", r"aaaaaax", Some((0, 6)), Some((0, 6))); +mat!(match_nullsubexpr_12, r"(a+)*", r"a", Some((0, 1)), Some((0, 1))); +mat!(match_nullsubexpr_13, r"(a+)*", r"x", Some((0, 0))); +mat!(match_nullsubexpr_14, r"(a+)*", r"aaaaaa", Some((0, 6)), Some((0, 6))); +mat!(match_nullsubexpr_15, r"(a+)*", r"aaaaaax", Some((0, 6)), Some((0, 6))); +mat!(match_nullsubexpr_16, r"(a+)+", r"a", Some((0, 1)), Some((0, 1))); +mat!(match_nullsubexpr_17, r"(a+)+", r"x", None); +mat!(match_nullsubexpr_18, r"(a+)+", r"aaaaaa", Some((0, 6)), Some((0, 6))); +mat!(match_nullsubexpr_19, r"(a+)+", r"aaaaaax", Some((0, 6)), Some((0, 6))); +mat!(match_nullsubexpr_21, r"([a]*)*", r"a", Some((0, 1)), Some((0, 1))); +mat!(match_nullsubexpr_23, r"([a]*)*", r"x", Some((0, 0)), None); +mat!(match_nullsubexpr_24, r"([a]*)*", r"aaaaaa", Some((0, 6)), Some((0, 6))); +mat!(match_nullsubexpr_25, r"([a]*)*", r"aaaaaax", Some((0, 6)), Some((0, 6))); +mat!(match_nullsubexpr_26, r"([a]*)+", r"a", Some((0, 1)), Some((0, 1))); +mat!(match_nullsubexpr_27, r"([a]*)+", r"x", Some((0, 0)), Some((0, 0))); +mat!(match_nullsubexpr_28, r"([a]*)+", r"aaaaaa", Some((0, 6)), Some((0, 6))); +mat!(match_nullsubexpr_29, r"([a]*)+", r"aaaaaax", Some((0, 6)), Some((0, 6))); +mat!(match_nullsubexpr_30, r"([^b]*)*", r"a", Some((0, 1)), Some((0, 1))); +mat!(match_nullsubexpr_32, r"([^b]*)*", r"b", Some((0, 0)), None); +mat!(match_nullsubexpr_33, r"([^b]*)*", r"aaaaaa", Some((0, 6)), Some((0, 6))); +mat!(match_nullsubexpr_34, r"([^b]*)*", r"aaaaaab", Some((0, 6)), Some((0, 6))); +mat!(match_nullsubexpr_35, r"([ab]*)*", r"a", Some((0, 1)), Some((0, 1))); +mat!(match_nullsubexpr_36, r"([ab]*)*", r"aaaaaa", Some((0, 6)), Some((0, 6))); +mat!(match_nullsubexpr_37, r"([ab]*)*", r"ababab", Some((0, 6)), Some((0, 6))); +mat!(match_nullsubexpr_38, r"([ab]*)*", r"bababa", Some((0, 6)), Some((0, 6))); +mat!(match_nullsubexpr_39, r"([ab]*)*", r"b", Some((0, 1)), Some((0, 1))); +mat!(match_nullsubexpr_40, r"([ab]*)*", r"bbbbbb", Some((0, 6)), Some((0, 6))); +mat!(match_nullsubexpr_41, r"([ab]*)*", r"aaaabcde", Some((0, 5)), Some((0, 5))); +mat!(match_nullsubexpr_42, r"([^a]*)*", r"b", Some((0, 1)), Some((0, 1))); +mat!(match_nullsubexpr_43, r"([^a]*)*", r"bbbbbb", Some((0, 6)), Some((0, 6))); +mat!(match_nullsubexpr_45, r"([^a]*)*", r"aaaaaa", Some((0, 0)), None); +mat!(match_nullsubexpr_46, r"([^ab]*)*", r"ccccxx", Some((0, 6)), Some((0, 6))); +mat!(match_nullsubexpr_48, r"([^ab]*)*", r"ababab", Some((0, 0)), None); +mat!(match_nullsubexpr_50, r"((z)+|a)*", r"zabcde", Some((0, 2)), Some((1, 2))); +mat!(match_nullsubexpr_69, r"(a*)*(x)", r"x", Some((0, 1)), None, Some((0, 1))); +mat!(match_nullsubexpr_70, r"(a*)*(x)", r"ax", Some((0, 2)), Some((0, 1)), Some((1, 2))); +mat!(match_nullsubexpr_71, r"(a*)*(x)", r"axa", Some((0, 2)), Some((0, 1)), Some((1, 2))); +mat!(match_nullsubexpr_73, r"(a*)+(x)", r"x", Some((0, 1)), Some((0, 0)), Some((0, 1))); +mat!(match_nullsubexpr_74, r"(a*)+(x)", r"ax", Some((0, 2)), Some((0, 1)), Some((1, 2))); +mat!(match_nullsubexpr_75, r"(a*)+(x)", r"axa", Some((0, 2)), Some((0, 1)), Some((1, 2))); +mat!(match_nullsubexpr_77, r"(a*){2}(x)", r"x", Some((0, 1)), Some((0, 0)), Some((0, 1))); +mat!(match_nullsubexpr_78, r"(a*){2}(x)", r"ax", Some((0, 2)), Some((1, 1)), Some((1, 2))); +mat!(match_nullsubexpr_79, r"(a*){2}(x)", r"axa", Some((0, 2)), Some((1, 1)), Some((1, 2))); + +// Tests from repetition.dat +mat!(match_repetition_10, r"((..)|(.))", r"", None); +mat!(match_repetition_11, r"((..)|(.))((..)|(.))", r"", None); +mat!(match_repetition_12, r"((..)|(.))((..)|(.))((..)|(.))", r"", None); +mat!(match_repetition_14, r"((..)|(.)){1}", r"", None); +mat!(match_repetition_15, r"((..)|(.)){2}", r"", None); +mat!(match_repetition_16, r"((..)|(.)){3}", r"", None); +mat!(match_repetition_18, r"((..)|(.))*", r"", Some((0, 0))); +mat!(match_repetition_20, r"((..)|(.))", r"a", Some((0, 1)), Some((0, 1)), None, Some((0, 1))); +mat!(match_repetition_21, r"((..)|(.))((..)|(.))", r"a", None); +mat!(match_repetition_22, r"((..)|(.))((..)|(.))((..)|(.))", r"a", None); +mat!(match_repetition_24, r"((..)|(.)){1}", r"a", Some((0, 1)), Some((0, 1)), None, Some((0, 1))); +mat!(match_repetition_25, r"((..)|(.)){2}", r"a", None); +mat!(match_repetition_26, r"((..)|(.)){3}", r"a", None); +mat!(match_repetition_28, r"((..)|(.))*", r"a", Some((0, 1)), Some((0, 1)), None, Some((0, 1))); +mat!(match_repetition_30, r"((..)|(.))", r"aa", Some((0, 2)), Some((0, 2)), Some((0, 2)), None); +mat!(match_repetition_31, r"((..)|(.))((..)|(.))", r"aa", Some((0, 2)), Some((0, 1)), None, Some((0, 1)), Some((1, 2)), None, Some((1, 2))); +mat!(match_repetition_32, r"((..)|(.))((..)|(.))((..)|(.))", r"aa", None); +mat!(match_repetition_34, r"((..)|(.)){1}", r"aa", Some((0, 2)), Some((0, 2)), Some((0, 2)), None); +mat!(match_repetition_35, r"((..)|(.)){2}", r"aa", Some((0, 2)), Some((1, 2)), None, Some((1, 2))); +mat!(match_repetition_36, r"((..)|(.)){3}", r"aa", None); +mat!(match_repetition_38, r"((..)|(.))*", r"aa", Some((0, 2)), Some((0, 2)), Some((0, 2)), None); +mat!(match_repetition_40, r"((..)|(.))", r"aaa", Some((0, 2)), Some((0, 2)), Some((0, 2)), None); +mat!(match_repetition_41, r"((..)|(.))((..)|(.))", r"aaa", Some((0, 3)), Some((0, 2)), Some((0, 2)), None, Some((2, 3)), None, Some((2, 3))); +mat!(match_repetition_42, r"((..)|(.))((..)|(.))((..)|(.))", r"aaa", Some((0, 3)), Some((0, 1)), None, Some((0, 1)), Some((1, 2)), None, Some((1, 2)), Some((2, 3)), None, Some((2, 3))); +mat!(match_repetition_44, r"((..)|(.)){1}", r"aaa", Some((0, 2)), Some((0, 2)), Some((0, 2)), None); +mat!(match_repetition_46, r"((..)|(.)){2}", r"aaa", Some((0, 3)), Some((2, 3)), Some((0, 2)), Some((2, 3))); +mat!(match_repetition_47, r"((..)|(.)){3}", r"aaa", Some((0, 3)), Some((2, 3)), None, Some((2, 3))); +mat!(match_repetition_50, r"((..)|(.))*", r"aaa", Some((0, 3)), Some((2, 3)), Some((0, 2)), Some((2, 3))); +mat!(match_repetition_52, r"((..)|(.))", r"aaaa", Some((0, 2)), Some((0, 2)), Some((0, 2)), None); +mat!(match_repetition_53, r"((..)|(.))((..)|(.))", r"aaaa", Some((0, 4)), Some((0, 2)), Some((0, 2)), None, Some((2, 4)), Some((2, 4)), None); +mat!(match_repetition_54, r"((..)|(.))((..)|(.))((..)|(.))", r"aaaa", Some((0, 4)), Some((0, 2)), Some((0, 2)), None, Some((2, 3)), None, Some((2, 3)), Some((3, 4)), None, Some((3, 4))); +mat!(match_repetition_56, r"((..)|(.)){1}", r"aaaa", Some((0, 2)), Some((0, 2)), Some((0, 2)), None); +mat!(match_repetition_57, r"((..)|(.)){2}", r"aaaa", Some((0, 4)), Some((2, 4)), Some((2, 4)), None); +mat!(match_repetition_59, r"((..)|(.)){3}", r"aaaa", Some((0, 4)), Some((3, 4)), Some((0, 2)), Some((3, 4))); +mat!(match_repetition_61, r"((..)|(.))*", r"aaaa", Some((0, 4)), Some((2, 4)), Some((2, 4)), None); +mat!(match_repetition_63, r"((..)|(.))", r"aaaaa", Some((0, 2)), Some((0, 2)), Some((0, 2)), None); +mat!(match_repetition_64, r"((..)|(.))((..)|(.))", r"aaaaa", Some((0, 4)), Some((0, 2)), Some((0, 2)), None, Some((2, 4)), Some((2, 4)), None); +mat!(match_repetition_65, r"((..)|(.))((..)|(.))((..)|(.))", r"aaaaa", Some((0, 5)), Some((0, 2)), Some((0, 2)), None, Some((2, 4)), Some((2, 4)), None, Some((4, 5)), None, Some((4, 5))); +mat!(match_repetition_67, r"((..)|(.)){1}", r"aaaaa", Some((0, 2)), Some((0, 2)), Some((0, 2)), None); +mat!(match_repetition_68, r"((..)|(.)){2}", r"aaaaa", Some((0, 4)), Some((2, 4)), Some((2, 4)), None); +mat!(match_repetition_70, r"((..)|(.)){3}", r"aaaaa", Some((0, 5)), Some((4, 5)), Some((2, 4)), Some((4, 5))); +mat!(match_repetition_73, r"((..)|(.))*", r"aaaaa", Some((0, 5)), Some((4, 5)), Some((2, 4)), Some((4, 5))); +mat!(match_repetition_75, r"((..)|(.))", r"aaaaaa", Some((0, 2)), Some((0, 2)), Some((0, 2)), None); +mat!(match_repetition_76, r"((..)|(.))((..)|(.))", r"aaaaaa", Some((0, 4)), Some((0, 2)), Some((0, 2)), None, Some((2, 4)), Some((2, 4)), None); +mat!(match_repetition_77, r"((..)|(.))((..)|(.))((..)|(.))", r"aaaaaa", Some((0, 6)), Some((0, 2)), Some((0, 2)), None, Some((2, 4)), Some((2, 4)), None, Some((4, 6)), Some((4, 6)), None); +mat!(match_repetition_79, r"((..)|(.)){1}", r"aaaaaa", Some((0, 2)), Some((0, 2)), Some((0, 2)), None); +mat!(match_repetition_80, r"((..)|(.)){2}", r"aaaaaa", Some((0, 4)), Some((2, 4)), Some((2, 4)), None); +mat!(match_repetition_81, r"((..)|(.)){3}", r"aaaaaa", Some((0, 6)), Some((4, 6)), Some((4, 6)), None); +mat!(match_repetition_83, r"((..)|(.))*", r"aaaaaa", Some((0, 6)), Some((4, 6)), Some((4, 6)), None); +mat!(match_repetition_90, r"X(.?){0,}Y", r"X1234567Y", Some((0, 9)), Some((7, 8))); +mat!(match_repetition_91, r"X(.?){1,}Y", r"X1234567Y", Some((0, 9)), Some((7, 8))); +mat!(match_repetition_92, r"X(.?){2,}Y", r"X1234567Y", Some((0, 9)), Some((7, 8))); +mat!(match_repetition_93, r"X(.?){3,}Y", r"X1234567Y", Some((0, 9)), Some((7, 8))); +mat!(match_repetition_94, r"X(.?){4,}Y", r"X1234567Y", Some((0, 9)), Some((7, 8))); +mat!(match_repetition_95, r"X(.?){5,}Y", r"X1234567Y", Some((0, 9)), Some((7, 8))); +mat!(match_repetition_96, r"X(.?){6,}Y", r"X1234567Y", Some((0, 9)), Some((7, 8))); +mat!(match_repetition_97, r"X(.?){7,}Y", r"X1234567Y", Some((0, 9)), Some((7, 8))); +mat!(match_repetition_98, r"X(.?){8,}Y", r"X1234567Y", Some((0, 9)), Some((8, 8))); +mat!(match_repetition_100, r"X(.?){0,8}Y", r"X1234567Y", Some((0, 9)), Some((8, 8))); +mat!(match_repetition_102, r"X(.?){1,8}Y", r"X1234567Y", Some((0, 9)), Some((8, 8))); +mat!(match_repetition_104, r"X(.?){2,8}Y", r"X1234567Y", Some((0, 9)), Some((8, 8))); +mat!(match_repetition_106, r"X(.?){3,8}Y", r"X1234567Y", Some((0, 9)), Some((8, 8))); +mat!(match_repetition_108, r"X(.?){4,8}Y", r"X1234567Y", Some((0, 9)), Some((8, 8))); +mat!(match_repetition_110, r"X(.?){5,8}Y", r"X1234567Y", Some((0, 9)), Some((8, 8))); +mat!(match_repetition_112, r"X(.?){6,8}Y", r"X1234567Y", Some((0, 9)), Some((8, 8))); +mat!(match_repetition_114, r"X(.?){7,8}Y", r"X1234567Y", Some((0, 9)), Some((8, 8))); +mat!(match_repetition_115, r"X(.?){8,8}Y", r"X1234567Y", Some((0, 9)), Some((8, 8))); +mat!(match_repetition_126, r"(a|ab|c|bcd){0,}(d*)", r"ababcd", Some((0, 1)), Some((0, 1)), Some((1, 1))); +mat!(match_repetition_127, r"(a|ab|c|bcd){1,}(d*)", r"ababcd", Some((0, 1)), Some((0, 1)), Some((1, 1))); +mat!(match_repetition_128, r"(a|ab|c|bcd){2,}(d*)", r"ababcd", Some((0, 6)), Some((3, 6)), Some((6, 6))); +mat!(match_repetition_129, r"(a|ab|c|bcd){3,}(d*)", r"ababcd", Some((0, 6)), Some((3, 6)), Some((6, 6))); +mat!(match_repetition_130, r"(a|ab|c|bcd){4,}(d*)", r"ababcd", None); +mat!(match_repetition_131, r"(a|ab|c|bcd){0,10}(d*)", r"ababcd", Some((0, 1)), Some((0, 1)), Some((1, 1))); +mat!(match_repetition_132, r"(a|ab|c|bcd){1,10}(d*)", r"ababcd", Some((0, 1)), Some((0, 1)), Some((1, 1))); +mat!(match_repetition_133, r"(a|ab|c|bcd){2,10}(d*)", r"ababcd", Some((0, 6)), Some((3, 6)), Some((6, 6))); +mat!(match_repetition_134, r"(a|ab|c|bcd){3,10}(d*)", r"ababcd", Some((0, 6)), Some((3, 6)), Some((6, 6))); +mat!(match_repetition_135, r"(a|ab|c|bcd){4,10}(d*)", r"ababcd", None); +mat!(match_repetition_136, r"(a|ab|c|bcd)*(d*)", r"ababcd", Some((0, 1)), Some((0, 1)), Some((1, 1))); +mat!(match_repetition_137, r"(a|ab|c|bcd)+(d*)", r"ababcd", Some((0, 1)), Some((0, 1)), Some((1, 1))); +mat!(match_repetition_143, r"(ab|a|c|bcd){0,}(d*)", r"ababcd", Some((0, 6)), Some((4, 5)), Some((5, 6))); +mat!(match_repetition_145, r"(ab|a|c|bcd){1,}(d*)", r"ababcd", Some((0, 6)), Some((4, 5)), Some((5, 6))); +mat!(match_repetition_147, r"(ab|a|c|bcd){2,}(d*)", r"ababcd", Some((0, 6)), Some((4, 5)), Some((5, 6))); +mat!(match_repetition_149, r"(ab|a|c|bcd){3,}(d*)", r"ababcd", Some((0, 6)), Some((4, 5)), Some((5, 6))); +mat!(match_repetition_150, r"(ab|a|c|bcd){4,}(d*)", r"ababcd", None); +mat!(match_repetition_152, r"(ab|a|c|bcd){0,10}(d*)", r"ababcd", Some((0, 6)), Some((4, 5)), Some((5, 6))); +mat!(match_repetition_154, r"(ab|a|c|bcd){1,10}(d*)", r"ababcd", Some((0, 6)), Some((4, 5)), Some((5, 6))); +mat!(match_repetition_156, r"(ab|a|c|bcd){2,10}(d*)", r"ababcd", Some((0, 6)), Some((4, 5)), Some((5, 6))); +mat!(match_repetition_158, r"(ab|a|c|bcd){3,10}(d*)", r"ababcd", Some((0, 6)), Some((4, 5)), Some((5, 6))); +mat!(match_repetition_159, r"(ab|a|c|bcd){4,10}(d*)", r"ababcd", None); +mat!(match_repetition_161, r"(ab|a|c|bcd)*(d*)", r"ababcd", Some((0, 6)), Some((4, 5)), Some((5, 6))); +mat!(match_repetition_163, r"(ab|a|c|bcd)+(d*)", r"ababcd", Some((0, 6)), Some((4, 5)), Some((5, 6))); + diff --git a/deps/regex-0.1.58/tests/macros.rs b/deps/regex-0.1.58/tests/macros.rs new file mode 100644 index 000000000..7e73e4fa9 --- /dev/null +++ b/deps/regex-0.1.58/tests/macros.rs @@ -0,0 +1,115 @@ +// Convenience macros. + +macro_rules! findall { + ($re:expr, $text:expr) => {{ + $re.find_iter(text!($text)).collect::<Vec<_>>() + }} +} + +// Macros for automatically producing tests. + +macro_rules! mat( + ($name:ident, $re:expr, $text:expr, $($loc:tt)+) => ( + #[test] + fn $name() { + let text = text!($text); + let expected: Vec<Option<_>> = vec![$($loc)+]; + let r = regex!($re); + let got: Vec<Option<_>> = match r.captures(text) { + Some(c) => { + assert!(r.is_match(text)); + c.iter_pos().collect() + } + None => vec![None], + }; + // The test set sometimes leave out capture groups, so truncate + // actual capture groups to match test set. + let mut sgot = &got[..]; + if sgot.len() > expected.len() { + sgot = &sgot[0..expected.len()] + } + if expected != sgot { + panic!("For RE '{}' against '{:?}', \ + expected '{:?}' but got '{:?}'", + $re, text, expected, sgot); + } + } + ); +); + +macro_rules! matiter( + ($name:ident, $re:expr, $text:expr) => ( + #[test] + fn $name() { + let text = text!($text); + let expected: Vec<(usize, usize)> = vec![]; + let r = regex!($re); + let got: Vec<_> = r.find_iter(text).collect(); + if expected != got { + panic!("For RE '{}' against '{:?}', \ + expected '{:?}' but got '{:?}'", + $re, text, expected, got); + } + let captures_got: Vec<_> = + r.captures_iter(text).map(|c| c.pos(0).unwrap()).collect(); + if captures_got != got { + panic!("For RE '{}' against '{:?}', \ + got '{:?}' using find_iter but got '{:?}' \ + using captures_iter", + $re, text, got, captures_got); + } + } + ); + ($name:ident, $re:expr, $text:expr, $($loc:tt)+) => ( + #[test] + fn $name() { + let text = text!($text); + let expected: Vec<_> = vec![$($loc)+]; + let r = regex!($re); + let got: Vec<_> = r.find_iter(text).collect(); + if expected != got { + panic!("For RE '{}' against '{:?}', \ + expected '{:?}' but got '{:?}'", + $re, text, expected, got); + } + let captures_got: Vec<_> = + r.captures_iter(text).map(|c| c.pos(0).unwrap()).collect(); + if captures_got != got { + panic!("For RE '{}' against '{:?}', \ + got '{:?}' using find_iter but got '{:?}' \ + using captures_iter", + $re, text, got, captures_got); + } + } + ); +); + +macro_rules! matset { + ($name:ident, $res:expr, $text:expr, $($match_index:expr),*) => { + #[test] + fn $name() { + let text = text!($text); + let set = regex_set!($res); + assert!(set.is_match(text)); + let expected = vec![$($match_index),*]; + let matches = set.matches(text); + assert!(matches.matched_any()); + let got: Vec<_> = matches.into_iter().collect(); + assert_eq!(expected, got); + } + } +} + +macro_rules! nomatset { + ($name:ident, $res:expr, $text:expr) => { + #[test] + fn $name() { + let text = text!($text); + let set = regex_set!($res); + assert!(!set.is_match(text)); + let matches = set.matches(text); + assert!(!matches.matched_any()); + assert_eq!(0, matches.into_iter().count()); + } + } +} diff --git a/deps/regex-0.1.58/tests/macros_bytes.rs b/deps/regex-0.1.58/tests/macros_bytes.rs new file mode 100644 index 000000000..a68fada74 --- /dev/null +++ b/deps/regex-0.1.58/tests/macros_bytes.rs @@ -0,0 +1,43 @@ +// Macros for use in writing tests generic over &str/&[u8]. +macro_rules! text { ($text:expr) => { $text.as_bytes() } } +macro_rules! t { ($re:expr) => { text!($re) } } + +macro_rules! bytes { ($text:expr) => { $text } } +macro_rules! b { ($text:expr) => { bytes!($text) } } + +macro_rules! u { ($re:expr) => { concat!("(?u)", $re) } } + +macro_rules! no_expand { + ($text:expr) => {{ + use regex::bytes::NoExpand; + NoExpand(text!($text)) + }} +} + +macro_rules! show { + ($text:expr) => {{ + use std::ascii::escape_default; + let mut s = vec![]; + for &b in bytes!($text) { + s.extend(escape_default(b)); + } + String::from_utf8(s).unwrap() + }} +} + +// N.B. The expansion API for &str and &[u8] APIs differs slightly for now, +// but they should be unified in 1.0. Then we can move this macro back into +// tests/api.rs where it is used. ---AG +macro_rules! expand { + ($name:ident, $re:expr, $text:expr, $expand:expr, $expected:expr) => { + #[test] + fn $name() { + let re = regex!($re); + let cap = re.captures(t!($text)).unwrap(); + + let mut got = vec![]; + cap.expand(t!($expand), &mut got); + assert_eq!(show!(t!($expected)), show!(&*got)); + } + } +} diff --git a/deps/regex-0.1.58/tests/macros_str.rs b/deps/regex-0.1.58/tests/macros_str.rs new file mode 100644 index 000000000..7ea29335d --- /dev/null +++ b/deps/regex-0.1.58/tests/macros_str.rs @@ -0,0 +1,33 @@ +// Macros for use in writing tests generic over &str/&[u8]. +macro_rules! text { ($text:expr) => { $text } } +macro_rules! t { ($text:expr) => { text!($text) } } + +macro_rules! bytes { ($text:expr) => { $text.as_bytes() } } +macro_rules! b { ($text:expr) => { bytes!($text) } } + +macro_rules! u { ($re:expr) => { $re } } + +macro_rules! no_expand { + ($text:expr) => {{ + use regex::NoExpand; + NoExpand(text!($text)) + }} +} + +macro_rules! show { ($text:expr) => { $text } } + +// N.B. The expansion API for &str and &[u8] APIs differs slightly for now, +// but they should be unified in 1.0. Then we can move this macro back into +// tests/api.rs where it is used. ---AG +macro_rules! expand { + ($name:ident, $re:expr, $text:expr, $expand:expr, $expected:expr) => { + #[test] + fn $name() { + let re = regex!($re); + let cap = re.captures(t!($text)).unwrap(); + + let got = cap.expand(t!($expand)); + assert_eq!(show!(t!($expected)), show!(&*got)); + } + } +} diff --git a/deps/regex-0.1.58/tests/misc.rs b/deps/regex-0.1.58/tests/misc.rs new file mode 100644 index 000000000..efd488dee --- /dev/null +++ b/deps/regex-0.1.58/tests/misc.rs @@ -0,0 +1,16 @@ +// Copyright 2014 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +use regex::Regex; + +#[test] +fn eq() { + assert_eq!(regex!(r"[a-z]+"), Regex::new("[a-z]+").unwrap()); +} diff --git a/deps/regex-0.1.58/tests/multiline.rs b/deps/regex-0.1.58/tests/multiline.rs new file mode 100644 index 000000000..191504aa7 --- /dev/null +++ b/deps/regex-0.1.58/tests/multiline.rs @@ -0,0 +1,49 @@ +matiter!(match_multi_1, r"(?m)^[a-z]+$", "abc\ndef\nxyz", + (0, 3), (4, 7), (8, 11)); +matiter!(match_multi_2, r"(?m)^$", "abc\ndef\nxyz"); +matiter!(match_multi_3, r"(?m)^", "abc\ndef\nxyz", + (0, 0), (4, 4), (8, 8)); +matiter!(match_multi_4, r"(?m)$", "abc\ndef\nxyz", + (3, 3), (7, 7), (11, 11)); +matiter!(match_multi_5, r"(?m)^[a-z]", "abc\ndef\nxyz", + (0, 1), (4, 5), (8, 9)); +matiter!(match_multi_6, r"(?m)[a-z]^", "abc\ndef\nxyz"); +matiter!(match_multi_7, r"(?m)[a-z]$", "abc\ndef\nxyz", + (2, 3), (6, 7), (10, 11)); +matiter!(match_multi_8, r"(?m)$[a-z]", "abc\ndef\nxyz"); +matiter!(match_multi_9, r"(?m)^$", "", (0, 0)); + +matiter!(match_multi_rep_1, r"(?m)(?:^$)*", "a\nb\nc", + (0, 0), (1, 1), (2, 2), (3, 3), (4, 4), (5, 5)); +matiter!(match_multi_rep_2, r"(?m)(?:^|a)+", "a\naaa\n", + (0, 0), (2, 2), (3, 5), (6, 6)); +matiter!(match_multi_rep_3, r"(?m)(?:^|a)*", "a\naaa\n", + (0, 1), (2, 5), (6, 6)); +matiter!(match_multi_rep_4, r"(?m)(?:^[a-z])+", "abc\ndef\nxyz", + (0, 1), (4, 5), (8, 9)); +matiter!(match_multi_rep_5, r"(?m)(?:^[a-z]{3}\n?)+", "abc\ndef\nxyz", + (0, 11)); +matiter!(match_multi_rep_6, r"(?m)(?:^[a-z]{3}\n?)*", "abc\ndef\nxyz", + (0, 11)); +matiter!(match_multi_rep_7, r"(?m)(?:\n?[a-z]{3}$)+", "abc\ndef\nxyz", + (0, 11)); +matiter!(match_multi_rep_8, r"(?m)(?:\n?[a-z]{3}$)*", "abc\ndef\nxyz", + (0, 11)); +matiter!(match_multi_rep_9, r"(?m)^*", "\naa\n", + (0, 0), (1, 1), (2, 2), (3, 3), (4, 4)); +matiter!(match_multi_rep_10, r"(?m)^+", "\naa\n", + (0, 0), (1, 1), (4, 4)); +matiter!(match_multi_rep_11, r"(?m)$*", "\naa\n", + (0, 0), (1, 1), (2, 2), (3, 3), (4, 4)); +matiter!(match_multi_rep_12, r"(?m)$+", "\naa\n", + (0, 0), (3, 3), (4, 4)); +matiter!(match_multi_rep_13, r"(?m)(?:$\n)+", "\n\naaa\n\n", + (0, 2), (5, 7)); +matiter!(match_multi_rep_14, r"(?m)(?:$\n)*", "\n\naaa\n\n", + (0, 2), (3, 3), (4, 4), (5, 7)); +matiter!(match_multi_rep_15, r"(?m)(?:$\n^)+", "\n\naaa\n\n", + (0, 2), (5, 7)); +matiter!(match_multi_rep_16, r"(?m)(?:^|$)+", "\n\naaa\n\n", + (0, 0), (1, 1), (2, 2), (5, 5), (6, 6), (7, 7)); +matiter!(match_multi_rep_17, r"(?m)(?:$\n)*", "\n\naaa\n\n", + (0, 2), (3, 3), (4, 4), (5, 7)); diff --git a/deps/regex-0.1.58/tests/noparse.rs b/deps/regex-0.1.58/tests/noparse.rs new file mode 100644 index 000000000..ce2d369e2 --- /dev/null +++ b/deps/regex-0.1.58/tests/noparse.rs @@ -0,0 +1,48 @@ +macro_rules! noparse( + ($name:ident, $re:expr) => ( + #[test] + fn $name() { + let re = $re; + match regex_new!(re) { + Err(_) => {}, + Ok(_) => panic!("Regex '{}' should cause a parse error.", re), + } + } + ); +); + +noparse!(fail_double_repeat, "a**"); +noparse!(fail_no_repeat_arg, "*"); +noparse!(fail_incomplete_escape, "\\"); +noparse!(fail_class_incomplete, "[A-"); +noparse!(fail_class_not_closed, "[A"); +noparse!(fail_class_no_begin, r"[\A]"); +noparse!(fail_class_no_end, r"[\z]"); +noparse!(fail_class_no_boundary, r"[\b]"); +noparse!(fail_open_paren, "("); +noparse!(fail_close_paren, ")"); +noparse!(fail_invalid_range, "[a-Z]"); +noparse!(fail_empty_capture_name, "(?P<>a)"); +noparse!(fail_empty_capture_exp, "(?P<name>)"); +noparse!(fail_bad_capture_name, "(?P<na-me>)"); +noparse!(fail_bad_flag, "(?a)a"); +noparse!(fail_empty_alt_before, "|a"); +noparse!(fail_empty_alt_after, "a|"); +noparse!(fail_too_big, "a{10000000}"); +noparse!(fail_counted_no_close, "a{1001"); +noparse!(fail_unfinished_cap, "(?"); +noparse!(fail_unfinished_escape, "\\"); +noparse!(fail_octal_digit, r"\8"); +noparse!(fail_hex_digit, r"\xG0"); +noparse!(fail_hex_short, r"\xF"); +noparse!(fail_hex_long_digits, r"\x{fffg}"); +noparse!(fail_flag_bad, "(?a)"); +noparse!(fail_flag_empty, "(?)"); +noparse!(fail_double_neg, "(?-i-i)"); +noparse!(fail_neg_empty, "(?i-)"); +noparse!(fail_empty_group, "()"); +noparse!(fail_dupe_named, "(?P<a>.)(?P<a>.)"); +noparse!(fail_range_end_no_class, "[a-[:lower:]]"); +noparse!(fail_range_end_no_begin, r"[a-\A]"); +noparse!(fail_range_end_no_end, r"[a-\z]"); +noparse!(fail_range_end_no_boundary, r"[a-\b]"); diff --git a/deps/regex-0.1.58/tests/plugin.rs b/deps/regex-0.1.58/tests/plugin.rs new file mode 100644 index 000000000..b22b5d2e9 --- /dev/null +++ b/deps/regex-0.1.58/tests/plugin.rs @@ -0,0 +1,26 @@ +// Copyright 2014 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +use regex::Regex; +static RE: Regex = regex!(r"\d+"); + +#[test] +fn splitn() { + let text = "cauchy123plato456tyler789binx"; + let subs: Vec<&str> = RE.splitn(text, 2).collect(); + assert_eq!(subs, vec!("cauchy", "plato456tyler789binx")); +} + +#[test] +fn split() { + let text = "cauchy123plato456tyler789binx"; + let subs: Vec<&str> = RE.split(text).collect(); + assert_eq!(subs, vec!("cauchy", "plato", "tyler", "binx")); +} diff --git a/deps/regex-0.1.58/tests/regression.rs b/deps/regex-0.1.58/tests/regression.rs new file mode 100644 index 000000000..8b65140ce --- /dev/null +++ b/deps/regex-0.1.58/tests/regression.rs @@ -0,0 +1,44 @@ +// See: https://github.com/rust-lang/regex/issues/48 +#[test] +fn invalid_regexes_no_crash() { + assert!(regex_new!("(*)").is_err()); + assert!(regex_new!("(?:?)").is_err()); + assert!(regex_new!("(?)").is_err()); + assert!(regex_new!("*").is_err()); +} + +// See: https://github.com/rust-lang/regex/issues/98 +#[test] +fn regression_many_repeat_stack_overflow() { + let re = regex!("^.{1,2500}"); + assert_eq!(vec![(0, 1)], findall!(re, "a")); +} + +// See: https://github.com/rust-lang/regex/issues/75 +mat!(regression_unsorted_binary_search_1, r"(?i)[a_]+", "A_", Some((0, 2))); +mat!(regression_unsorted_binary_search_2, r"(?i)[A_]+", "a_", Some((0, 2))); + +// See: https://github.com/rust-lang/regex/issues/99 +mat!(regression_negated_char_class_1, r"(?i)[^x]", "x", None); +mat!(regression_negated_char_class_2, r"(?i)[^x]", "X", None); + +// See: https://github.com/rust-lang/regex/issues/101 +mat!(regression_ascii_word_underscore, r"[:word:]", "_", Some((0, 1))); + +// See: https://github.com/rust-lang-nursery/regex/issues/129 +#[test] +fn regression_captures_rep() { + let re = regex!(r"([a-f]){2}(?P<foo>[x-z])"); + let caps = re.captures(text!("abx")).unwrap(); + assert_eq!(caps.name("foo").unwrap(), text!("x")); +} + +// See: https://github.com/rust-lang-nursery/regex/issues/153 +mat!(regression_alt_in_alt1, r"ab?|$", "az", Some((0, 1))); +mat!(regression_alt_in_alt2, r"^(.*?)(\n|\r\n?|$)", "ab\rcd", Some((0, 3))); + +// See: https://github.com/rust-lang-nursery/regex/issues/169 +mat!(regression_leftmost_first_prefix, r"z*azb", "azb", Some((0, 3))); + +// See: https://github.com/rust-lang/regex/issues/76 +mat!(uni_case_lower_nocase_flag, u!(r"(?i)\p{Ll}+"), "ΛΘΓΔα", Some((0, 10))); diff --git a/deps/regex-0.1.58/tests/replace.rs b/deps/regex-0.1.58/tests/replace.rs new file mode 100644 index 000000000..c4cc5d1a4 --- /dev/null +++ b/deps/regex-0.1.58/tests/replace.rs @@ -0,0 +1,35 @@ +macro_rules! replace( + ($name:ident, $which:ident, $re:expr, + $search:expr, $replace:expr, $result:expr) => ( + #[test] + fn $name() { + let re = regex!($re); + assert_eq!(re.$which(text!($search), $replace), text!($result)); + } + ); +); + +replace!(first, replace, r"\d", "age: 26", t!("Z"), "age: Z6"); +replace!(plus, replace, r"\d+", "age: 26", t!("Z"), "age: Z"); +replace!(all, replace_all, r"\d", "age: 26", t!("Z"), "age: ZZ"); +replace!(groups, replace, r"(\S+)\s+(\S+)", "w1 w2", t!("$2 $1"), "w2 w1"); +replace!(double_dollar, replace, + r"(\S+)\s+(\S+)", "w1 w2", t!("$2 $$1"), "w2 $1"); +// replace!(adjacent_index, replace, + // r"([^aeiouy])ies$", "skies", t!("$1y"), "sky"); +replace!(named, replace_all, + r"(?P<first>\S+)\s+(?P<last>\S+)(?P<space>\s*)", + "w1 w2 w3 w4", t!("$last $first$space"), "w2 w1 w4 w3"); +replace!(trim, replace_all, "^[ \t]+|[ \t]+$", " \t trim me\t \t", + t!(""), "trim me"); +replace!(number_hypen, replace, r"(.)(.)", "ab", t!("$1-$2"), "a-b"); +// replace!(number_underscore, replace, r"(.)(.)", "ab", t!("$1_$2"), "a_b"); +replace!(simple_expand, replace_all, r"(\w) (\w)", "a b", t!("$2 $1"), "b a"); +replace!(literal_dollar1, replace_all, + r"(\w+) (\w+)", "a b", t!("$$1"), "$1"); +replace!(literal_dollar2, replace_all, + r"(\w+) (\w+)", "a b", t!("$2 $$c $1"), "b $c a"); +replace!(no_expand1, replace, + r"(\S+)\s+(\S+)", "w1 w2", no_expand!("$2 $1"), "$2 $1"); +replace!(no_expand2, replace, + r"(\S+)\s+(\S+)", "w1 w2", no_expand!("$$1"), "$$1"); diff --git a/deps/regex-0.1.58/tests/searcher.rs b/deps/regex-0.1.58/tests/searcher.rs new file mode 100644 index 000000000..073fa5f96 --- /dev/null +++ b/deps/regex-0.1.58/tests/searcher.rs @@ -0,0 +1,66 @@ +macro_rules! searcher { + ($name:ident, $re:expr, $haystack:expr) => ( + searcher!($name, $re, $haystack, vec vec![]); + ); + ($name:ident, $re:expr, $haystack:expr, $($steps:expr,)*) => ( + searcher!($name, $re, $haystack, vec vec![$($steps),*]); + ); + ($name:ident, $re:expr, $haystack:expr, $($steps:expr),*) => ( + searcher!($name, $re, $haystack, vec vec![$($steps),*]); + ); + ($name:ident, $re:expr, $haystack:expr, vec $expect_steps:expr) => ( + #[test] + #[allow(unused_imports)] + fn $name() { + searcher_expr! {{ + use std::str::pattern::{Pattern, Searcher}; + use std::str::pattern::SearchStep::{Match, Reject, Done}; + let re = regex!($re); + let mut se = re.into_searcher($haystack); + let mut got_steps = vec![]; + loop { + match se.next() { + Done => break, + step => { got_steps.push(step); } + } + } + assert_eq!(got_steps, $expect_steps); + }} + } + ); +} + +searcher!(searcher_empty_regex_empty_haystack, r"", "", Match(0, 0)); +searcher!(searcher_empty_regex, r"", "ab", + Match(0, 0), Reject(0, 1), Match(1, 1), Reject(1, 2), Match(2, 2)); +searcher!(searcher_empty_haystack, r"\d", ""); +searcher!(searcher_one_match, r"\d", "5", + Match(0, 1)); +searcher!(searcher_no_match, r"\d", "a", + Reject(0, 1)); +searcher!(searcher_two_adjacent_matches, r"\d", "56", + Match(0, 1), Match(1, 2)); +searcher!(searcher_two_non_adjacent_matches, r"\d", "5a6", + Match(0, 1), Reject(1, 2), Match(2, 3)); +searcher!(searcher_reject_first, r"\d", "a6", + Reject(0, 1), Match(1, 2)); +searcher!(searcher_one_zero_length_matches, r"\d*", "a1b2", + Match(0, 0), // ^ + Reject(0, 1), // a + Match(1, 2), // a1 + Reject(2, 3), // a1b + Match(3, 4), // a1b2 +); +searcher!(searcher_many_zero_length_matches, r"\d*", "a1bbb2", + Match(0, 0), // ^ + Reject(0, 1), // a + Match(1, 2), // a1 + Reject(2, 3), // a1b + Match(3, 3), // a1bb + Reject(3, 4), // a1bb + Match(4, 4), // a1bbb + Reject(4, 5), // a1bbb + Match(5, 6), // a1bbba +); +searcher!(searcher_unicode, r".+?", "Ⅰ1Ⅱ2", + Match(0, 3), Match(3, 4), Match(4, 7), Match(7, 8)); diff --git a/deps/regex-0.1.58/tests/set.rs b/deps/regex-0.1.58/tests/set.rs new file mode 100644 index 000000000..a9dd098c1 --- /dev/null +++ b/deps/regex-0.1.58/tests/set.rs @@ -0,0 +1,26 @@ +matset!(set1, &["a", "a"], "a", 0, 1); +matset!(set2, &["a", "a"], "ba", 0, 1); +matset!(set3, &["a", "b"], "a", 0); +matset!(set4, &["a", "b"], "b", 1); +matset!(set5, &["a|b", "b|a"], "b", 0, 1); +matset!(set6, &["foo", "oo"], "foo", 0, 1); +matset!(set7, &["^foo", "bar$"], "foo", 0); +matset!(set8, &["^foo", "bar$"], "foo bar", 0, 1); +matset!(set9, &["^foo", "bar$"], "bar", 1); +matset!(set10, &[r"[a-z]+$", "foo"], "01234 foo", 0, 1); +matset!(set11, &[r"[a-z]+$", "foo"], "foo 01234", 1); +matset!(set12, &[r".*?", "a"], "zzzzzza", 0, 1); +matset!(set13, &[r".*", "a"], "zzzzzza", 0, 1); +matset!(set14, &[r".*", "a"], "zzzzzz", 0); + +nomatset!(nset1, &["a", "a"], "b"); +nomatset!(nset2, &["^foo", "bar$"], "bar foo"); + +// See: https://github.com/rust-lang-nursery/regex/issues/187 +#[test] +fn regression_subsequent_matches() { + let set = regex_set!(&["ab", "b"]); + let text = text!("ba"); + assert!(set.matches(text).matched(1)); + assert!(set.matches(text).matched(1)); +} diff --git a/deps/regex-0.1.58/tests/test_backtrack.rs b/deps/regex-0.1.58/tests/test_backtrack.rs new file mode 100644 index 000000000..880233096 --- /dev/null +++ b/deps/regex-0.1.58/tests/test_backtrack.rs @@ -0,0 +1,43 @@ +// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +#![cfg_attr(feature = "pattern", feature(pattern))] + +extern crate rand; +extern crate regex; + +macro_rules! regex_new { + ($re:expr) => {{ + use regex::internal::ExecBuilder; + ExecBuilder::new($re) + .bounded_backtracking().build().map(|e| e.into_regex()) + }} +} + +macro_rules! regex { + ($re:expr) => { + regex_new!($re).unwrap() + } +} + +// Must come before other module definitions. +include!("macros_str.rs"); +include!("macros.rs"); + +mod api; +mod api_str; +mod crazy; +mod flags; +mod fowler; +mod multiline; +mod noparse; +mod regression; +mod replace; +mod unicode; diff --git a/deps/regex-0.1.58/tests/test_backtrack_bytes.rs b/deps/regex-0.1.58/tests/test_backtrack_bytes.rs new file mode 100644 index 000000000..8b15f79ef --- /dev/null +++ b/deps/regex-0.1.58/tests/test_backtrack_bytes.rs @@ -0,0 +1,44 @@ +// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +extern crate rand; +extern crate regex; + +macro_rules! regex_new { + ($re:expr) => {{ + use regex::internal::ExecBuilder; + ExecBuilder::new($re) + .bounded_backtracking() + .only_utf8(false) + .build() + .map(|e| e.into_byte_regex()) + }} +} + +macro_rules! regex { + ($re:expr) => { + regex_new!($re).unwrap() + } +} + +// Must come before other module definitions. +include!("macros_bytes.rs"); +include!("macros.rs"); + +mod api; +mod bytes; +mod crazy; +mod flags; +mod fowler; +mod multiline; +mod noparse; +mod regression; +mod replace; +mod unicode; diff --git a/deps/regex-0.1.58/tests/test_backtrack_utf8bytes.rs b/deps/regex-0.1.58/tests/test_backtrack_utf8bytes.rs new file mode 100644 index 000000000..12ed55d36 --- /dev/null +++ b/deps/regex-0.1.58/tests/test_backtrack_utf8bytes.rs @@ -0,0 +1,43 @@ +// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +#![cfg_attr(feature = "pattern", feature(pattern))] + +extern crate rand; +extern crate regex; + +macro_rules! regex_new { + ($re:expr) => {{ + use regex::internal::ExecBuilder; + ExecBuilder::new($re) + .bounded_backtracking().bytes(true).build().map(|e| e.into_regex()) + }} +} + +macro_rules! regex { + ($re:expr) => { + regex_new!($re).unwrap() + } +} + +// Must come before other module definitions. +include!("macros_str.rs"); +include!("macros.rs"); + +mod api; +mod api_str; +mod crazy; +mod flags; +mod fowler; +mod multiline; +mod noparse; +mod regression; +mod replace; +mod unicode; diff --git a/deps/regex-0.1.58/tests/test_default.rs b/deps/regex-0.1.58/tests/test_default.rs new file mode 100644 index 000000000..40dbe9e42 --- /dev/null +++ b/deps/regex-0.1.58/tests/test_default.rs @@ -0,0 +1,94 @@ +// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +#![cfg_attr(feature = "pattern", feature(pattern))] + +extern crate rand; +extern crate regex; + +// Due to macro scoping rules, this definition only applies for the modules +// defined below. Effectively, it allows us to use the same tests for both +// native and dynamic regexes. +// +// This is also used to test the various matching engines. This one exercises +// the normal code path which automatically chooses the engine based on the +// regex and the input. Other dynamic tests explicitly set the engine to use. +macro_rules! regex_new { + ($re:expr) => {{ + use regex::Regex; + Regex::new($re) + }} +} + +macro_rules! regex_set_new { + ($re:expr) => {{ + use regex::RegexSet; + RegexSet::new($re) + }} +} + +macro_rules! regex { + ($re:expr) => { + regex_new!($re).unwrap() + } +} + +macro_rules! regex_set { + ($res:expr) => { + regex_set_new!($res).unwrap() + } +} + +#[cfg(feature = "pattern")] +macro_rules! searcher_expr { ($e:expr) => ($e) } +#[cfg(not(feature = "pattern"))] +macro_rules! searcher_expr { ($e:expr) => ({}) } + +// Must come before other module definitions. +include!("macros_str.rs"); +include!("macros.rs"); + +mod api; +mod api_str; +mod crazy; +mod flags; +mod fowler; +mod multiline; +mod noparse; +mod regression; +mod replace; +mod searcher; +mod set; +mod unicode; + +#[test] +fn set_empty() { + use regex::{Error, RegexSet}; + let err = RegexSet::new::<&[String], &String>(&[]).unwrap_err(); + match err { + Error::InvalidSet => {} + err => panic!("expected Error::InvalidSet but got {:?}", err), + } +} + +#[test] +fn set_one() { + use regex::{Error, RegexSet}; + let err = RegexSet::new(&["foo"]).unwrap_err(); + match err { + Error::InvalidSet => {} + err => panic!("expected Error::InvalidSet but got {:?}", err), + } +} + +#[test] +fn disallow_unicode_flag() { + assert!(regex::Regex::new("(?-u)a").is_err()); +} diff --git a/deps/regex-0.1.58/tests/test_default_bytes.rs b/deps/regex-0.1.58/tests/test_default_bytes.rs new file mode 100644 index 000000000..9f8dc5701 --- /dev/null +++ b/deps/regex-0.1.58/tests/test_default_bytes.rs @@ -0,0 +1,54 @@ +// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +extern crate rand; +extern crate regex; + +macro_rules! regex_new { + ($re:expr) => {{ + use regex::bytes::Regex; + Regex::new($re) + }} +} + +macro_rules! regex_set_new { + ($res:expr) => {{ + use regex::bytes::RegexSet; + RegexSet::new($res) + }} +} + +macro_rules! regex { + ($re:expr) => { + regex_new!($re).unwrap() + } +} + +macro_rules! regex_set { + ($res:expr) => { + regex_set_new!($res).unwrap() + } +} + +// Must come before other module definitions. +include!("macros_bytes.rs"); +include!("macros.rs"); + +mod api; +mod bytes; +mod crazy; +mod flags; +mod fowler; +mod multiline; +mod noparse; +mod regression; +mod replace; +mod set; +mod unicode; diff --git a/deps/regex-0.1.58/tests/test_nfa.rs b/deps/regex-0.1.58/tests/test_nfa.rs new file mode 100644 index 000000000..15686cd6f --- /dev/null +++ b/deps/regex-0.1.58/tests/test_nfa.rs @@ -0,0 +1,42 @@ +// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +#![cfg_attr(feature = "pattern", feature(pattern))] + +extern crate rand; +extern crate regex; + +macro_rules! regex_new { + ($re:expr) => {{ + use regex::internal::ExecBuilder; + ExecBuilder::new($re).nfa().build().map(|e| e.into_regex()) + }} +} + +macro_rules! regex { + ($re:expr) => { + regex_new!($re).unwrap() + } +} + +// Must come before other module definitions. +include!("macros_str.rs"); +include!("macros.rs"); + +mod api; +mod api_str; +mod crazy; +mod flags; +mod fowler; +mod multiline; +mod noparse; +mod regression; +mod replace; +mod unicode; diff --git a/deps/regex-0.1.58/tests/test_nfa_bytes.rs b/deps/regex-0.1.58/tests/test_nfa_bytes.rs new file mode 100644 index 000000000..2f0cb52f0 --- /dev/null +++ b/deps/regex-0.1.58/tests/test_nfa_bytes.rs @@ -0,0 +1,42 @@ + +// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +extern crate rand; +extern crate regex; + +macro_rules! regex_new { + ($re:expr) => {{ + use regex::internal::ExecBuilder; + ExecBuilder::new($re) + .nfa().only_utf8(false).build().map(|e| e.into_byte_regex()) + }} +} + +macro_rules! regex { + ($re:expr) => { + regex_new!($re).unwrap() + } +} + +// Must come before other module definitions. +include!("macros_bytes.rs"); +include!("macros.rs"); + +mod api; +mod bytes; +mod crazy; +mod flags; +mod fowler; +mod multiline; +mod noparse; +mod regression; +mod replace; +mod unicode; diff --git a/deps/regex-0.1.58/tests/test_nfa_utf8bytes.rs b/deps/regex-0.1.58/tests/test_nfa_utf8bytes.rs new file mode 100644 index 000000000..d8c45dc7a --- /dev/null +++ b/deps/regex-0.1.58/tests/test_nfa_utf8bytes.rs @@ -0,0 +1,42 @@ +// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +#![cfg_attr(feature = "pattern", feature(pattern))] + +extern crate rand; +extern crate regex; + +macro_rules! regex_new { + ($re:expr) => {{ + use regex::internal::ExecBuilder; + ExecBuilder::new($re).nfa().bytes(true).build().map(|e| e.into_regex()) + }} +} + +macro_rules! regex { + ($re:expr) => { + regex_new!($re).unwrap() + } +} + +// Must come before other module definitions. +include!("macros_str.rs"); +include!("macros.rs"); + +mod api; +mod api_str; +mod crazy; +mod flags; +mod fowler; +mod multiline; +mod noparse; +mod regression; +mod replace; +mod unicode; diff --git a/deps/regex-0.1.58/tests/test_plugin.rs b/deps/regex-0.1.58/tests/test_plugin.rs new file mode 100644 index 000000000..c58c5a38e --- /dev/null +++ b/deps/regex-0.1.58/tests/test_plugin.rs @@ -0,0 +1,30 @@ +// Copyright 2014 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +#![feature(plugin, test)] +#![plugin(regex_macros)] + +extern crate rand; +extern crate regex; +extern crate test; + +// Must come before other module definitions. +include!("macros_str.rs"); +include!("macros.rs"); + +mod api; +mod api_str; +mod crazy; +mod flags; +mod fowler; +mod multiline; +mod plugin; +mod replace; +mod unicode; diff --git a/deps/regex-0.1.58/tests/unicode.rs b/deps/regex-0.1.58/tests/unicode.rs new file mode 100644 index 000000000..bac42ed5f --- /dev/null +++ b/deps/regex-0.1.58/tests/unicode.rs @@ -0,0 +1,28 @@ +mat!(uni_literal, u!(r"☃"), "☃", Some((0, 3))); +mat!(uni_one, u!(r"\pN"), "Ⅰ", Some((0, 3))); +mat!(uni_mixed, u!(r"\pN+"), "Ⅰ1Ⅱ2", Some((0, 8))); +mat!(uni_not, u!(r"\PN+"), "abⅠ", Some((0, 2))); +mat!(uni_not_class, u!(r"[\PN]+"), "abⅠ", Some((0, 2))); +mat!(uni_not_class_neg, u!(r"[^\PN]+"), "abⅠ", Some((2, 5))); +mat!(uni_case, u!(r"(?i)Δ"), "δ", Some((0, 2))); +mat!(uni_case_upper, u!(r"\p{Lu}+"), "ΛΘΓΔα", Some((0, 8))); +mat!(uni_case_upper_nocase_flag, u!(r"(?i)\p{Lu}+"), "ΛΘΓΔα", Some((0, 10))); +mat!(uni_case_upper_nocase, u!(r"\p{L}+"), "ΛΘΓΔα", Some((0, 10))); +mat!(uni_case_lower, u!(r"\p{Ll}+"), "ΛΘΓΔα", Some((8, 10))); + +// Test the Unicode friendliness of Perl character classes. +mat!(uni_perl_w, u!(r"\w+"), "dδd", Some((0, 4))); +mat!(uni_perl_w_not, u!(r"\w+"), "⥡", None); +mat!(uni_perl_w_neg, u!(r"\W+"), "⥡", Some((0, 3))); +mat!(uni_perl_d, u!(r"\d+"), "1२३9", Some((0, 8))); +mat!(uni_perl_d_not, u!(r"\d+"), "Ⅱ", None); +mat!(uni_perl_d_neg, u!(r"\D+"), "Ⅱ", Some((0, 3))); +mat!(uni_perl_s, u!(r"\s+"), " ", Some((0, 3))); +mat!(uni_perl_s_not, u!(r"\s+"), "☃", None); +mat!(uni_perl_s_neg, u!(r"\S+"), "☃", Some((0, 3))); + +// And do the same for word boundaries. +mat!(uni_boundary_none, u!(r"\d\b"), "6δ", None); +mat!(uni_boundary_ogham, u!(r"\d\b"), "6 ", Some((0, 1))); +mat!(uni_not_boundary_none, u!(r"\d\B"), "6δ", Some((0, 1))); +mat!(uni_not_boundary_ogham, u!(r"\d\B"), "6 ", None); diff --git a/deps/regex-syntax-0.2.2/Cargo.toml b/deps/regex-syntax-0.2.2/Cargo.toml deleted file mode 100644 index 3d6eabb20..000000000 --- a/deps/regex-syntax-0.2.2/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -name = "regex-syntax" -version = "0.2.2" -authors = ["The Rust Project Developers"] -license = "MIT/Apache-2.0" -repository = "https://github.com/rust-lang/regex" -documentation = "http://doc.rust-lang.org/regex/regex_syntax/index.html" -homepage = "https://github.com/rust-lang/regex" -description = "A regular expression parser." - -[dev-dependencies] -quickcheck = "0.2" -rand = "0.3" diff --git a/deps/regex-syntax-0.2.2/src/lib.rs b/deps/regex-syntax-0.2.2/src/lib.rs deleted file mode 100644 index 0a63fa149..000000000 --- a/deps/regex-syntax-0.2.2/src/lib.rs +++ /dev/null @@ -1,1201 +0,0 @@ -// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -/*! -This crate provides a regular expression parser and an abstract syntax for -regular expressions. The abstract syntax is defined by the `Expr` type. The -concrete syntax is enumerated in the -[`regex`](../regex/index.html#syntax) -crate documentation. - -Note that since this crate is first and foremost an implementation detail for -the `regex` crate, it may experience more frequent breaking changes. It is -exposed as a separate crate so that others may use it to do analysis on regular -expressions or even build their own matching engine. - -# Example: parsing an expression - -Parsing a regular expression can be done with the `Expr::parse` function. - -```rust -use regex_syntax::Expr; - -assert_eq!(Expr::parse(r"ab|yz").unwrap(), Expr::Alternate(vec![ - Expr::Literal { chars: vec!['a', 'b'], casei: false }, - Expr::Literal { chars: vec!['y', 'z'], casei: false }, -])); -``` - -# Example: inspecting an error - -The parser in this crate provides very detailed error values. For example, -if an invalid character class range is given: - -```rust -use regex_syntax::{Expr, ErrorKind}; - -let err = Expr::parse(r"[z-a]").unwrap_err(); -assert_eq!(err.position(), 4); -assert_eq!(err.kind(), &ErrorKind::InvalidClassRange { - start: 'z', - end: 'a', -}); -``` - -Or unbalanced parentheses: - -```rust -use regex_syntax::{Expr, ErrorKind}; - -let err = Expr::parse(r"ab(cd").unwrap_err(); -assert_eq!(err.position(), 2); -assert_eq!(err.kind(), &ErrorKind::UnclosedParen); -``` -*/ - -#![deny(missing_docs)] - -#[cfg(test)] extern crate quickcheck; -#[cfg(test)] extern crate rand; - -mod parser; -mod unicode; - -use std::char; -use std::cmp::{Ordering, max, min}; -use std::fmt; -use std::iter::IntoIterator; -use std::ops::Deref; -use std::result; -use std::slice; -use std::vec; - -use unicode::case_folding; - -use self::Expr::*; -use self::Repeater::*; - -pub use parser::is_punct; - -/// A regular expression abstract syntax tree. -/// -/// An `Expr` represents the abstract syntax of a regular expression. -#[derive(Clone, Debug, PartialEq, Eq)] -pub enum Expr { - /// An empty regex (which never matches any text). - Empty, - /// A sequence of one or more literal characters to be matched. - Literal { - /// The characters. - chars: Vec<char>, - /// Whether to match case insensitively. - casei: bool, - }, - /// Match any character, excluding new line. - AnyChar, - /// Match any character. - AnyCharNoNL, - /// A character class. - Class(CharClass), - /// Match the start of a line or beginning of input. - StartLine, - /// Match the end of a line or end of input. - EndLine, - /// Match the beginning of input. - StartText, - /// Match the end of input. - EndText, - /// Match a word boundary (word character on one side and a non-word - /// character on the other). - WordBoundary, - /// Match a position that is not a word boundary (word or non-word - /// characters on both sides). - NotWordBoundary, - /// A group, possibly non-capturing. - Group { - /// The expression inside the group. - e: Box<Expr>, - /// The capture index (starting at `1`) only for capturing groups. - i: Option<usize>, - /// The capture name, only for capturing named groups. - name: Option<String>, - }, - /// A repeat operator (`?`, `*`, `+` or `{m,n}`). - Repeat { - /// The expression to be repeated. Limited to literals, `.`, classes - /// or grouped expressions. - e: Box<Expr>, - /// The type of repeat operator used. - r: Repeater, - /// Whether the repeat is greedy (match the most) or not (match the - /// least). - greedy: bool, - }, - /// A concatenation of expressions. Must be matched one after the other. - /// - /// N.B. A concat expression can only appear at the top-level or - /// immediately inside a group expression. - Concat(Vec<Expr>), - /// An alternation of expressions. Only one must match. - /// - /// N.B. An alternate expression can only appear at the top-level or - /// immediately inside a group expression. - Alternate(Vec<Expr>), -} - -type CaptureIndex = Option<usize>; - -type CaptureName = Option<String>; - -/// The type of a repeat operator expression. -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum Repeater { - /// Match zero or one (`?`). - ZeroOrOne, - /// Match zero or more (`*`). - ZeroOrMore, - /// Match one or more (`+`). - OneOrMore, - /// Match for at least `min` and at most `max` (`{m,n}`). - /// - /// When `max` is `None`, there is no upper bound on the number of matches. - Range { - /// Lower bound on the number of matches. - min: u32, - /// Optional upper bound on the number of matches. - max: Option<u32>, - }, -} - -/// A character class. -/// -/// A character class has a canonical format that the parser guarantees. Its -/// canonical format is defined by the following invariants: -/// -/// 1. Given any Unicode scalar value, it is matched by *at most* one character -/// range in a canonical character class. -/// 2. Every adjacent character range is separated by at least one Unicode -/// scalar value. -/// 3. Given any pair of character ranges `r1` and `r2`, if -/// `r1.end < r2.start`, then `r1` comes before `r2` in a canonical -/// character class. -/// -/// In sum, any `CharClass` produced by this crate's parser is a sorted -/// sequence of non-overlapping ranges. This makes it possible to test whether -/// a character is matched by a class with a binary search. -/// -/// Additionally, a character class may be marked *case insensitive*. If it's -/// case insensitive, then: -/// -/// 1. Simple case folding has been applied to all ranges. -/// 2. Simple case folding must be applied to a character before testing -/// whether it matches the character class. -#[derive(Clone, Debug, PartialEq, Eq)] -pub struct CharClass { - ranges: Vec<ClassRange>, -} - -/// A single inclusive range in a character class. -/// -/// Since range boundaries are defined by Unicode scalar values, the boundaries -/// can never be in the open interval `(0xD7FF, 0xE000)`. However, a range may -/// *cover* codepoints that are not scalar values. -/// -/// Note that this has a few convenient impls on `PartialEq` and `PartialOrd` -/// for testing whether a character is contained inside a given range. -#[derive(Clone, Copy, Debug, PartialEq, PartialOrd, Eq, Ord)] -pub struct ClassRange { - /// The start character of the range. - /// - /// This must be less than or equal to `end`. - pub start: char, - - /// The end character of the range. - /// - /// This must be greater than or equal to `end`. - pub end: char, -} - -impl Expr { - /// Parses a string in a regular expression syntax tree. - pub fn parse(s: &str) -> Result<Expr> { - parser::Parser::parse(s).map(|e| e.simplify()) - } - - /// Returns true iff the expression can be repeated by a quantifier. - fn can_repeat(&self) -> bool { - match *self { - Literal{..} - | AnyChar - | AnyCharNoNL - | Class(_) - | StartLine | EndLine | StartText | EndText - | WordBoundary | NotWordBoundary - | Group{..} - => true, - _ => false, - } - } - - fn simplify(self) -> Expr { - fn combine_literals(es: &mut Vec<Expr>, e: Expr) { - match (es.pop(), e) { - (None, e) => es.push(e), - (Some(Literal { chars: mut chars1, casei: casei1 }), - Literal { chars: chars2, casei: casei2 }) => { - if casei1 == casei2 { - chars1.extend(chars2); - es.push(Literal { chars: chars1, casei: casei1 }); - } else { - es.push(Literal { chars: chars1, casei: casei1 }); - es.push(Literal { chars: chars2, casei: casei2 }); - } - } - (Some(e1), e2) => { - es.push(e1); - es.push(e2); - } - } - } - match self { - Repeat { e, r, greedy } => Repeat { - e: Box::new(e.simplify()), - r: r, - greedy: greedy, - }, - Group { e, i, name } => { - let e = e.simplify(); - if i.is_none() && name.is_none() && e.can_repeat() { - e - } else { - Group { e: Box::new(e), i: i, name: name } - } - } - Concat(es) => { - let mut new_es = Vec::with_capacity(es.len()); - for e in es { - combine_literals(&mut new_es, e.simplify()); - } - if new_es.len() == 1 { - new_es.pop().unwrap() - } else { - Concat(new_es) - } - } - Alternate(es) => Alternate(es.into_iter() - .map(|e| e.simplify()) - .collect()), - e => e, - } - } -} - -impl Deref for CharClass { - type Target = Vec<ClassRange>; - fn deref(&self) -> &Vec<ClassRange> { &self.ranges } -} - -impl IntoIterator for CharClass { - type Item = ClassRange; - type IntoIter = vec::IntoIter<ClassRange>; - fn into_iter(self) -> vec::IntoIter<ClassRange> { self.ranges.into_iter() } -} - -impl<'a> IntoIterator for &'a CharClass { - type Item = &'a ClassRange; - type IntoIter = slice::Iter<'a, ClassRange>; - fn into_iter(self) -> slice::Iter<'a, ClassRange> { self.iter() } -} - -impl CharClass { - /// Create a new class from an existing set of ranges. - pub fn new(ranges: Vec<ClassRange>) -> CharClass { - CharClass { ranges: ranges } - } - - /// Create an empty class. - fn empty() -> CharClass { - CharClass::new(Vec::new()) - } - - /// Returns true if `c` is matched by this character class. - pub fn matches(&self, c: char) -> bool { - self.binary_search_by(|range| c.partial_cmp(range).unwrap()).is_ok() - } - - /// Create a new empty class from this one. - /// - /// Namely, its capacity and case insensitive setting will be the same. - fn to_empty(&self) -> CharClass { - CharClass { ranges: Vec::with_capacity(self.len()) } - } - - /// Merge two classes and canonicalize them. - #[cfg(test)] - fn merge(mut self, other: CharClass) -> CharClass { - self.ranges.extend(other); - self.canonicalize() - } - - /// Canonicalze any sequence of ranges. - /// - /// This is responsible for enforcing the canonical format invariants - /// as described on the docs for the `CharClass` type. - fn canonicalize(mut self) -> CharClass { - // TODO: Save some cycles here by checking if already canonicalized. - self.ranges.sort(); - let mut ordered = self.to_empty(); // TODO: Do this in place? - for candidate in self { - // If the candidate overlaps with an existing range, then it must - // be the most recent range added because we process the candidates - // in order. - if let Some(or) = ordered.ranges.last_mut() { - if or.overlapping(candidate) { - *or = or.merge(candidate); - continue; - } - } - ordered.ranges.push(candidate); - } - ordered - } - - /// Negates the character class. - /// - /// For all `c` where `c` is a Unicode scalar value, `c` matches `self` - /// if and only if `c` does not match `self.negate()`. - pub fn negate(mut self) -> CharClass { - fn range(s: char, e: char) -> ClassRange { ClassRange::new(s, e) } - - if self.is_empty() { return self; } - self = self.canonicalize(); - let mut inv = self.to_empty(); - if self[0].start > '\x00' { - inv.ranges.push(range('\x00', dec_char(self[0].start))); - } - for win in self.windows(2) { - inv.ranges.push(range(inc_char(win[0].end), - dec_char(win[1].start))); - } - if self[self.len() - 1].end < char::MAX { - inv.ranges.push(range(inc_char(self[self.len() - 1].end), - char::MAX)); - } - inv - } - - /// Apply case folding to this character class. - /// - /// N.B. Applying case folding to a negated character class probably - /// won't produce the expected result. e.g., `(?i)[^x]` really should - /// match any character sans `x` and `X`, but if `[^x]` is negated - /// before being case folded, you'll end up matching any character. - pub fn case_fold(self) -> CharClass { - let mut folded = self.to_empty(); - for r in self { - // Applying case folding to a range is expensive because *every* - // character needs to be examined. Thus, we avoid that drudgery - // if no character in the current range is in our case folding - // table. - if r.needs_case_folding() { - folded.ranges.extend(r.case_fold()); - } - folded.ranges.push(r); - } - folded.canonicalize() - } -} - -impl ClassRange { - /// Create a new class range. - /// - /// If `end < start`, then the two values are swapped so that - /// the invariant `start <= end` is preserved. - fn new(start: char, end: char) -> ClassRange { - if start <= end { - ClassRange { start: start, end: end } - } else { - ClassRange { start: end, end: start } - } - } - - /// Create a range of one character. - fn one(c: char) -> ClassRange { - ClassRange { start: c, end: c } - } - - /// Returns true if and only if the two ranges are overlapping. Note that - /// since ranges are inclusive, `a-c` and `d-f` are overlapping! - fn overlapping(self, other: ClassRange) -> bool { - max(self.start, other.start) <= inc_char(min(self.end, other.end)) - } - - /// Creates a new range representing the union of `self` and `other. - fn merge(self, other: ClassRange) -> ClassRange { - ClassRange { - start: min(self.start, other.start), - end: max(self.end, other.end), - } - } - - /// Returns true if and only if this range contains a character that is - /// in the case folding table. - fn needs_case_folding(self) -> bool { - case_folding::C_plus_S_both_table - .binary_search_by(|&(c, _)| self.partial_cmp(&c).unwrap()).is_ok() - } - - /// Apply case folding to this range. - /// - /// Since case folding might add characters such that the range is no - /// longer contiguous, this returns multiple class ranges. They are in - /// canonical order. - fn case_fold(self) -> Vec<ClassRange> { - let table = &case_folding::C_plus_S_both_table; - let (s, e) = (self.start as u32, self.end as u32 + 1); - let mut start = self.start; - let mut end = start; - let mut next_case_fold = '\x00'; - let mut ranges = Vec::with_capacity(10); - for mut c in (s..e).filter_map(char::from_u32) { - if c >= next_case_fold { - c = match simple_case_fold_both_result(c) { - Ok(i) => { - for &(c1, c2) in &table[i..] { - if c1 != c { - break; - } - if c2 != inc_char(end) { - ranges.push(ClassRange::new(start, end)); - start = c2; - } - end = c2; - } - continue; - } - Err(i) => { - if i < table.len() { - next_case_fold = table[i].0; - } else { - next_case_fold = '\u{10FFFF}'; - } - c - } - }; - } - // The fast path. We know this character doesn't have an entry - // in the case folding table. - if c != inc_char(end) { - ranges.push(ClassRange::new(start, end)); - start = c; - } - end = c; - } - ranges.push(ClassRange::new(start, end)); - ranges - } -} - -impl PartialEq<char> for ClassRange { - #[inline] - fn eq(&self, other: &char) -> bool { - self.start <= *other && *other <= self.end - } -} - -impl PartialEq<ClassRange> for char { - #[inline] - fn eq(&self, other: &ClassRange) -> bool { - other.eq(self) - } -} - -impl PartialOrd<char> for ClassRange { - #[inline] - fn partial_cmp(&self, other: &char) -> Option<Ordering> { - Some(if self == other { - Ordering::Equal - } else if *other > self.end { - Ordering::Greater - } else { - Ordering::Less - }) - } -} - -impl PartialOrd<ClassRange> for char { - #[inline] - fn partial_cmp(&self, other: &ClassRange) -> Option<Ordering> { - other.partial_cmp(self).map(|o| o.reverse()) - } -} - -/// This implementation of `Display` will write a regular expression from the -/// syntax tree. It does not write the original string parsed. -impl fmt::Display for Expr { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - match *self { - Empty => write!(f, ""), - Literal { ref chars, casei } => { - if casei { try!(write!(f, "(?i:")); } - for &c in chars { - try!(write!(f, "{}", quote_char(c))); - } - if casei { try!(write!(f, ")")); } - Ok(()) - } - AnyChar => write!(f, "(?s:.)"), - AnyCharNoNL => write!(f, "."), - Class(ref cls) => write!(f, "{}", cls), - StartLine => write!(f, "(?m:^)"), - EndLine => write!(f, "(?m:$)"), - StartText => write!(f, r"^"), - EndText => write!(f, r"$"), - WordBoundary => write!(f, r"\b"), - NotWordBoundary => write!(f, r"\B"), - Group { ref e, i: None, name: None } => write!(f, "(?:{})", e), - Group { ref e, name: None, .. } => write!(f, "({})", e), - Group { ref e, name: Some(ref n), .. } => { - write!(f, "(?P<{}>{})", n, e) - } - Repeat { ref e, r, greedy } => { - match &**e { - &Literal { ref chars, .. } if chars.len() > 1 => { - try!(write!(f, "(?:{}){}", e, r)) - } - _ => try!(write!(f, "{}{}", e, r)), - } - if !greedy { try!(write!(f, "?")); } - Ok(()) - } - Concat(ref es) => { - for e in es { - try!(write!(f, "{}", e)); - } - Ok(()) - } - Alternate(ref es) => { - for (i, e) in es.iter().enumerate() { - if i > 0 { try!(write!(f, "|")); } - try!(write!(f, "{}", e)); - } - Ok(()) - } - } - } -} - -impl fmt::Display for Repeater { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - match *self { - ZeroOrOne => write!(f, "?"), - ZeroOrMore => write!(f, "*"), - OneOrMore => write!(f, "+"), - Range { min: s, max: None } => write!(f, "{{{},}}", s), - Range { min: s, max: Some(e) } if s == e => write!(f, "{{{}}}", s), - Range { min: s, max: Some(e) } => write!(f, "{{{}, {}}}", s, e), - } - } -} - -impl fmt::Display for CharClass { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - try!(write!(f, "[")); - for range in self.iter() { - try!(write!(f, "{}", range)); - } - try!(write!(f, "]")); - Ok(()) - } -} - -impl fmt::Display for ClassRange { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "{}-{}", quote_char(self.start), quote_char(self.end)) - } -} - -/// An alias for computations that can return a `Error`. -pub type Result<T> = ::std::result::Result<T, Error>; - -/// A parse error. -/// -/// This includes details about the specific type of error and a rough -/// approximation of where it occurred. -#[derive(Clone, Debug, PartialEq)] -pub struct Error { - pos: usize, - surround: String, - kind: ErrorKind, -} - -/// The specific type of parse error that can occur. -#[derive(Clone, Debug, PartialEq)] -pub enum ErrorKind { - /// A negation symbol is used twice in flag settings. - /// e.g., `(?-i-s)`. - DoubleFlagNegation, - /// The same capture name was used more than once. - /// e.g., `(?P<a>.)(?P<a>.)`. - DuplicateCaptureName(String), - /// An alternate is empty. e.g., `(|a)`. - EmptyAlternate, - /// A capture group name is empty. e.g., `(?P<>a)`. - EmptyCaptureName, - /// A negation symbol was not proceded by any flags. e.g., `(?i-)`. - EmptyFlagNegation, - /// A group is empty. e.g., `()`. - EmptyGroup, - /// An invalid number was used in a counted repetition. e.g., `a{b}`. - InvalidBase10(String), - /// An invalid hexadecimal number was used in an escape sequence. - /// e.g., `\xAG`. - InvalidBase16(String), - /// An invalid capture name was used. e.g., `(?P<0a>b)`. - InvalidCaptureName(String), - /// An invalid class range was givien. Specifically, when the start of the - /// range is greater than the end. e.g., `[z-a]`. - InvalidClassRange { - /// The first character specified in the range. - start: char, - /// The second character specified in the range. - end: char, - }, - /// An escape sequence was used in a character class where it is not - /// allowed. e.g., `[a-\pN]` or `[\A]`. - InvalidClassEscape(Expr), - /// An invalid counted repetition min/max was given. e.g., `a{2,1}`. - InvalidRepeatRange { - /// The first number specified in the repetition. - min: u32, - /// The second number specified in the repetition. - max: u32, - }, - /// An invalid Unicode scalar value was used in a long hexadecimal - /// sequence. e.g., `\x{D800}`. - InvalidScalarValue(u32), - /// An empty counted repetition operator. e.g., `a{}`. - MissingBase10, - /// A repetition operator was not applied to an expression. e.g., `*`. - RepeaterExpectsExpr, - /// A repetition operator was applied to an expression that cannot be - /// repeated. e.g., `a+*` or `a|*`. - RepeaterUnexpectedExpr(Expr), - /// A capture group name that is never closed. e.g., `(?P<a`. - UnclosedCaptureName(String), - /// An unclosed hexadecimal literal. e.g., `\x{a`. - UnclosedHex, - /// An unclosed parenthesis. e.g., `(a`. - UnclosedParen, - /// An unclosed counted repetition operator. e.g., `a{2`. - UnclosedRepeat, - /// An unclosed named Unicode class. e.g., `\p{Yi`. - UnclosedUnicodeName, - /// Saw end of regex before class was closed. e.g., `[a`. - UnexpectedClassEof, - /// Saw end of regex before escape sequence was closed. e.g., `\`. - UnexpectedEscapeEof, - /// Saw end of regex before flags were closed. e.g., `(?i`. - UnexpectedFlagEof, - /// Saw end of regex before two hexadecimal digits were seen. e.g., `\xA`. - UnexpectedTwoDigitHexEof, - /// Unopened parenthesis. e.g., `)`. - UnopenedParen, - /// Unrecognized escape sequence. e.g., `\q`. - UnrecognizedEscape(char), - /// Unrecognized flag. e.g., `(?a)`. - UnrecognizedFlag(char), - /// Unrecognized named Unicode class. e.g., `\p{Foo}`. - UnrecognizedUnicodeClass(String), - /// Hints that destructuring should not be exhaustive. - /// - /// This enum may grow additional variants, so this makes sure clients - /// don't count on exhaustive matching. (Otherwise, adding a new variant - /// could break existing code.) - #[doc(hidden)] - __Nonexhaustive, -} - -impl Error { - /// Returns an approximate *character* offset at which the error occurred. - /// - /// The character offset may be equal to the number of characters in the - /// string, in which case it should be interpreted as pointing to the end - /// of the regex. - pub fn position(&self) -> usize { - self.pos - } - - /// Returns the type of the regex parse error. - pub fn kind(&self) -> &ErrorKind { - &self.kind - } -} - -impl ErrorKind { - fn description(&self) -> &str { - use ErrorKind::*; - match *self { - DoubleFlagNegation => "double flag negation", - DuplicateCaptureName(_) => "duplicate capture name", - EmptyAlternate => "empty alternate", - EmptyCaptureName => "empty capture name", - EmptyFlagNegation => "flag negation without any flags", - EmptyGroup => "empty group (e.g., '()')", - InvalidBase10(_) => "invalid base 10 number", - InvalidBase16(_) => "invalid base 16 number", - InvalidCaptureName(_) => "invalid capture name", - InvalidClassRange{..} => "invalid character class range", - InvalidClassEscape(_) => "invalid escape sequence in class", - InvalidRepeatRange{..} => "invalid counted repetition range", - InvalidScalarValue(_) => "invalid Unicode scalar value", - MissingBase10 => "missing count in repetition operator", - RepeaterExpectsExpr => "repetition operator missing expression", - RepeaterUnexpectedExpr(_) => "expression cannot be repeated", - UnclosedCaptureName(_) => "unclosed capture group name", - UnclosedHex => "unclosed hexadecimal literal", - UnclosedParen => "unclosed parenthesis", - UnclosedRepeat => "unclosed counted repetition operator", - UnclosedUnicodeName => "unclosed Unicode class literal", - UnexpectedClassEof => "unexpected EOF in character class", - UnexpectedEscapeEof => "unexpected EOF in escape sequence", - UnexpectedFlagEof => "unexpected EOF in flags", - UnexpectedTwoDigitHexEof => "unexpected EOF in hex literal", - UnopenedParen => "unopened parenthesis", - UnrecognizedEscape(_) => "unrecognized escape sequence", - UnrecognizedFlag(_) => "unrecognized flag", - UnrecognizedUnicodeClass(_) => "unrecognized Unicode class name", - __Nonexhaustive => unreachable!(), - } - } -} - -impl ::std::error::Error for Error { - fn description(&self) -> &str { - self.kind.description() - } -} - -impl fmt::Display for Error { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "Error parsing regex near '{}' at character offset {}: {}", - self.surround, self.pos, self.kind) - } -} - -impl fmt::Display for ErrorKind { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - use ErrorKind::*; - match *self { - DoubleFlagNegation => - write!(f, "Only one negation symbol is allowed in flags."), - DuplicateCaptureName(ref s) => - write!(f, "Capture name '{}' is used more than once.", s), - EmptyAlternate => - write!(f, "Alternations cannot be empty."), - EmptyCaptureName => - write!(f, "Capture names cannot be empty."), - EmptyFlagNegation => - write!(f, "Flag negation requires setting at least one flag."), - EmptyGroup => - write!(f, "Empty regex groups (e.g., '()') are not allowed."), - InvalidBase10(ref s) => - write!(f, "Not a valid base 10 number: '{}'", s), - InvalidBase16(ref s) => - write!(f, "Not a valid base 16 number: '{}'", s), - InvalidCaptureName(ref s) => - write!(f, "Invalid capture name: '{}'. Capture names must \ - consist of [_a-zA-Z0-9] and are not allowed to \ - start with with a number.", s), - InvalidClassRange { start, end } => - write!(f, "Invalid character class range '{}-{}'. \ - Character class ranges must start with the smaller \ - character, but {} > {}", start, end, start, end), - InvalidClassEscape(ref e) => - write!(f, "Invalid escape sequence in character \ - class: '{}'.", e), - InvalidRepeatRange { min, max } => - write!(f, "Invalid counted repetition range: {{{}, {}}}. \ - Counted repetition ranges must start with the \ - minimum, but {} > {}", min, max, min, max), - InvalidScalarValue(c) => - write!(f, "Number does not correspond to a Unicode scalar \ - value: '{}'.", c), - MissingBase10 => - write!(f, "Missing maximum in counted reptition operator."), - RepeaterExpectsExpr => - write!(f, "Missing expression for reptition operator."), - RepeaterUnexpectedExpr(ref e) => - write!(f, "Invalid application of reptition operator to: \ - '{}'.", e), - UnclosedCaptureName(ref s) => - write!(f, "Capture name group for '{}' is not closed. \ - (Missing a '>'.)", s), - UnclosedHex => - write!(f, "Unclosed hexadecimal literal (missing a '}}')."), - UnclosedParen => - write!(f, "Unclosed parenthesis."), - UnclosedRepeat => - write!(f, "Unclosed counted repetition (missing a '}}')."), - UnclosedUnicodeName => - write!(f, "Unclosed Unicode literal (missing a '}}')."), - UnexpectedClassEof => - write!(f, "Character class was not closed before the end of \ - the regex (missing a ']')."), - UnexpectedEscapeEof => - write!(f, "Started an escape sequence that didn't finish \ - before the end of the regex."), - UnexpectedFlagEof => - write!(f, "Inline flag settings was not closed before the end \ - of the regex (missing a ')' or ':')."), - UnexpectedTwoDigitHexEof => - write!(f, "Unexpected end of two digit hexadecimal literal."), - UnopenedParen => - write!(f, "Unopened parenthesis."), - UnrecognizedEscape(c) => - write!(f, "Unrecognized escape sequence: '\\{}'.", c), - UnrecognizedFlag(c) => - write!(f, "Unrecognized flag: '{}'. \ - (Allowed flags: i, s, m, U, x.)", c), - UnrecognizedUnicodeClass(ref s) => - write!(f, "Unrecognized Unicode class name: '{}'.", s), - __Nonexhaustive => unreachable!(), - } - } -} - -/// The result of binary search on the simple case folding table. -/// -/// Note that this binary search is done on the "both" table, such that -/// the index returned corresponds to the *first* location of `c1` in the -/// table. The table can then be scanned linearly starting from the position -/// returned to find other case mappings for `c1`. -fn simple_case_fold_both_result(c1: char) -> result::Result<usize, usize> { - let table = &case_folding::C_plus_S_both_table; - let i = binary_search(table, |&(c2, _)| c1 <= c2); - if i >= table.len() || table[i].0 != c1 { - Err(i) - } else { - Ok(i) - } -} - -/// Binary search to find first element such that `pred(T) == true`. -/// -/// Assumes that if `pred(xs[i]) == true` then `pred(xs[i+1]) == true`. -/// -/// If all elements yield `pred(T) == false`, then `xs.len()` is returned. -fn binary_search<T, F>(xs: &[T], mut pred: F) -> usize - where F: FnMut(&T) -> bool { - let (mut left, mut right) = (0, xs.len()); - while left < right { - let mid = (left + right) / 2; - if pred(&xs[mid]) { - right = mid; - } else { - left = mid + 1; - } - } - left -} - -/// Escapes all regular expression meta characters in `text`. -/// -/// The string returned may be safely used as a literal in a regular -/// expression. -pub fn quote(text: &str) -> String { - let mut quoted = String::with_capacity(text.len()); - for c in text.chars() { - if parser::is_punct(c) { - quoted.push('\\'); - } - quoted.push(c); - } - quoted -} - -fn quote_char(c: char) -> String { - let mut s = String::new(); - if parser::is_punct(c) { - s.push('\\'); - } - s.push(c); - s -} - -fn inc_char(c: char) -> char { - match c { - char::MAX => char::MAX, - '\u{D7FF}' => '\u{E000}', - c => char::from_u32(c as u32 + 1).unwrap(), - } -} - -fn dec_char(c: char) -> char { - match c { - '\x00' => '\x00', - '\u{E000}' => '\u{D7FF}', - c => char::from_u32(c as u32 - 1).unwrap(), - } -} - -/// Returns true if and only if `c` is a word character. -#[doc(hidden)] -pub fn is_word_char(c: char) -> bool { - match c { - '_' | '0' ... '9' | 'a' ... 'z' | 'A' ... 'Z' => true, - _ => ::unicode::regex::PERLW.binary_search_by(|&(start, end)| { - if c >= start && c <= end { - Ordering::Equal - } else if start > c { - Ordering::Greater - } else { - Ordering::Less - } - }).is_ok(), - } -} - -#[cfg(test)] -mod properties; - -#[cfg(test)] -mod tests { - use {CharClass, ClassRange}; - - fn class(ranges: &[(char, char)]) -> CharClass { - let ranges = ranges.iter().cloned() - .map(|(c1, c2)| ClassRange::new(c1, c2)).collect(); - CharClass::new(ranges) - } - - fn classi(ranges: &[(char, char)]) -> CharClass { class(ranges) } - - #[test] - fn class_canon_no_change() { - let cls = class(&[('a', 'c'), ('x', 'z')]); - assert_eq!(cls.clone().canonicalize(), cls); - } - - #[test] - fn class_canon_unordered() { - let cls = class(&[('x', 'z'), ('a', 'c')]); - assert_eq!(cls.canonicalize(), class(&[ - ('a', 'c'), ('x', 'z'), - ])); - } - - #[test] - fn class_canon_overlap() { - let cls = class(&[('x', 'z'), ('w', 'y')]); - assert_eq!(cls.canonicalize(), class(&[ - ('w', 'z'), - ])); - } - - #[test] - fn class_canon_overlap_many() { - let cls = class(&[ - ('c', 'f'), ('a', 'g'), ('d', 'j'), ('a', 'c'), - ('m', 'p'), ('l', 's'), - ]); - assert_eq!(cls.clone().canonicalize(), class(&[ - ('a', 'j'), ('l', 's'), - ])); - } - - #[test] - fn class_canon_overlap_many_case_fold() { - let cls = class(&[ - ('C', 'F'), ('A', 'G'), ('D', 'J'), ('A', 'C'), - ('M', 'P'), ('L', 'S'), ('c', 'f'), - ]); - assert_eq!(cls.case_fold(), classi(&[ - ('A', 'J'), ('L', 'S'), - ('a', 'j'), ('l', 's'), - ('\u{17F}', '\u{17F}'), - ])); - } - - #[test] - fn class_canon_overlap_boundary() { - let cls = class(&[('x', 'z'), ('u', 'w')]); - assert_eq!(cls.canonicalize(), class(&[ - ('u', 'z'), - ])); - } - - #[test] - fn class_canon_extreme_edge_case() { - let cls = class(&[('\x00', '\u{10FFFF}'), ('\x00', '\u{10FFFF}')]); - assert_eq!(cls.canonicalize(), class(&[ - ('\x00', '\u{10FFFF}'), - ])); - } - - #[test] - fn class_canon_singles() { - let cls = class(&[('a', 'a'), ('b', 'b')]); - assert_eq!(cls.canonicalize(), class(&[('a', 'b')])); - } - - #[test] - fn class_negate_single() { - let cls = class(&[('a', 'a')]); - assert_eq!(cls.negate(), class(&[ - ('\x00', '\x60'), ('\x62', '\u{10FFFF}'), - ])); - } - - #[test] - fn class_negate_singles() { - let cls = class(&[('a', 'a'), ('b', 'b')]); - assert_eq!(cls.negate(), class(&[ - ('\x00', '\x60'), ('\x63', '\u{10FFFF}'), - ])); - } - - #[test] - fn class_negate_multiples() { - let cls = class(&[('a', 'c'), ('x', 'z')]); - assert_eq!(cls.negate(), class(&[ - ('\x00', '\x60'), ('\x64', '\x77'), ('\x7b', '\u{10FFFF}'), - ])); - } - - #[test] - fn class_negate_min_scalar() { - let cls = class(&[('\x00', 'a')]); - assert_eq!(cls.negate(), class(&[ - ('\x62', '\u{10FFFF}'), - ])); - } - - #[test] - fn class_negate_max_scalar() { - let cls = class(&[('a', '\u{10FFFF}')]); - assert_eq!(cls.negate(), class(&[ - ('\x00', '\x60'), - ])); - } - - #[test] - fn class_negate_everything() { - let cls = class(&[('\x00', '\u{10FFFF}')]); - assert_eq!(cls.negate(), class(&[])); - } - - #[test] - fn class_negate_everything_sans_one() { - let cls = class(&[ - ('\x00', '\u{10FFFD}'), ('\u{10FFFF}', '\u{10FFFF}') - ]); - assert_eq!(cls.negate(), class(&[ - ('\u{10FFFE}', '\u{10FFFE}'), - ])); - } - - #[test] - fn class_negate_surrogates_min() { - let cls = class(&[('\x00', '\u{D7FF}')]); - assert_eq!(cls.negate(), class(&[ - ('\u{E000}', '\u{10FFFF}'), - ])); - } - - #[test] - fn class_negate_surrogates_min_edge() { - let cls = class(&[('\x00', '\u{D7FE}')]); - assert_eq!(cls.negate(), class(&[ - ('\u{D7FF}', '\u{10FFFF}'), - ])); - } - - #[test] - fn class_negate_surrogates_max() { - let cls = class(&[('\u{E000}', '\u{10FFFF}')]); - assert_eq!(cls.negate(), class(&[ - ('\x00', '\u{D7FF}'), - ])); - } - - #[test] - fn class_negate_surrogates_max_edge() { - let cls = class(&[('\u{E001}', '\u{10FFFF}')]); - assert_eq!(cls.negate(), class(&[ - ('\x00', '\u{E000}'), - ])); - } - - #[test] - fn class_fold_az() { - let cls = class(&[('A', 'Z')]); - assert_eq!(cls.case_fold(), classi(&[ - ('A', 'Z'), ('a', 'z'), - ('\u{17F}', '\u{17F}'), - ('\u{212A}', '\u{212A}'), - ])); - let cls = class(&[('a', 'z')]); - assert_eq!(cls.case_fold(), classi(&[ - ('A', 'Z'), ('a', 'z'), - ('\u{17F}', '\u{17F}'), - ('\u{212A}', '\u{212A}'), - ])); - } - - #[test] - fn class_fold_a_underscore() { - let cls = class(&[('A', 'A'), ('_', '_')]); - assert_eq!(cls.clone().canonicalize(), class(&[ - ('A', 'A'), ('_', '_'), - ])); - assert_eq!(cls.case_fold(), classi(&[ - ('A', 'A'), ('_', '_'), ('a', 'a'), - ])); - } - - #[test] - fn class_fold_a_equals() { - let cls = class(&[('A', 'A'), ('=', '=')]); - assert_eq!(cls.clone().canonicalize(), class(&[ - ('=', '='), ('A', 'A'), - ])); - assert_eq!(cls.case_fold(), classi(&[ - ('=', '='), ('A', 'A'), ('a', 'a'), - ])); - } - - #[test] - fn class_fold_no_folding_needed() { - let cls = class(&[('\x00', '\x10')]); - assert_eq!(cls.case_fold(), classi(&[ - ('\x00', '\x10'), - ])); - } - - #[test] - fn class_fold_negated() { - let cls = class(&[('x', 'x')]); - assert_eq!(cls.clone().case_fold(), classi(&[ - ('X', 'X'), ('x', 'x'), - ])); - assert_eq!(cls.case_fold().negate(), classi(&[ - ('\x00', 'W'), ('Y', 'w'), ('y', '\u{10FFFF}'), - ])); - } - - #[test] - fn class_fold_single_to_multiple() { - let cls = class(&[('k', 'k')]); - assert_eq!(cls.case_fold(), classi(&[ - ('K', 'K'), ('k', 'k'), ('\u{212A}', '\u{212A}'), - ])); - } -} diff --git a/deps/regex-syntax-0.2.2/src/parser.rs b/deps/regex-syntax-0.2.2/src/parser.rs deleted file mode 100644 index f2489d9d8..000000000 --- a/deps/regex-syntax-0.2.2/src/parser.rs +++ /dev/null @@ -1,2314 +0,0 @@ -// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -use std::cmp::{max, min}; - -use unicode::regex::UNICODE_CLASSES; - -use { - Expr, Repeater, CharClass, ClassRange, CaptureIndex, CaptureName, - Error, ErrorKind, Result, -}; - -/// Parser state. -/// -/// Keeps the entire input in memory and maintains a cursor (char offset). -/// -/// It also keeps an expression stack, which is responsible for managing -/// grouped expressions and flag state. -#[derive(Debug)] -pub struct Parser { - chars: Vec<char>, - chari: usize, - stack: Vec<Build>, - caps: usize, - names: Vec<String>, // to check for duplicates - flags: Flags, -} - -/// An empheral type for representing the expression stack. -/// -/// Everything on the stack is either a regular expression or a marker -/// indicating the opening of a group (possibly non-capturing). The opening -/// of a group copies the current flag state, which is reset on the parser -/// state once the group closes. -#[derive(Debug)] -enum Build { - Expr(Expr), - LeftParen { - i: CaptureIndex, - name: CaptureName, - chari: usize, - old_flags: Flags, - }, -} - -/// Flag state. -#[derive(Clone, Copy, Debug)] -struct Flags { - casei: bool, - multi: bool, - dotnl: bool, - swap_greed: bool, - ignore_space: bool, -} - -// Primary expression parsing routines. -impl Parser { - pub fn parse(s: &str) -> Result<Expr> { - Parser { - chars: s.chars().collect(), - chari: 0, - stack: vec![], - caps: 0, - names: vec![], - flags: Flags { - casei: false, - multi: false, - dotnl: false, - swap_greed: false, - ignore_space: false, - }, - }.parse_expr() - } - - // Top-level expression parser. - // - // Starts at the beginning of the input and consumes until either the end - // of input or an error. - fn parse_expr(mut self) -> Result<Expr> { - while !self.eof() { - let build_expr = match self.cur() { - '\\' => try!(self.parse_escape()), - '|' => { let e = try!(self.alternate()); self.bump(); e } - '?' => try!(self.parse_simple_repeat(Repeater::ZeroOrOne)), - '*' => try!(self.parse_simple_repeat(Repeater::ZeroOrMore)), - '+' => try!(self.parse_simple_repeat(Repeater::OneOrMore)), - '{' => try!(self.parse_counted_repeat()), - '[' => match self.maybe_parse_ascii() { - None => try!(self.parse_class()), - Some(cls) => Build::Expr(Expr::Class(cls)), - }, - '^' => { - if self.flags.multi { - self.parse_one(Expr::StartLine) - } else { - self.parse_one(Expr::StartText) - } - } - '$' => { - if self.flags.multi { - self.parse_one(Expr::EndLine) - } else { - self.parse_one(Expr::EndText) - } - } - '.' => { - if self.flags.dotnl { - self.parse_one(Expr::AnyChar) - } else { - self.parse_one(Expr::AnyCharNoNL) - } - } - '(' => try!(self.parse_group()), - ')' => { - let (old_flags, e) = try!(self.close_paren()); - self.bump(); - self.flags = old_flags; - e - } - _ => Build::Expr(Expr::Literal { - chars: vec![self.bump()], - casei: self.flags.casei, - }), - }; - if !build_expr.is_empty() { - self.stack.push(build_expr); - } - } - self.finish_concat() - } - - // Parses an escape sequence, e.g., \Ax - // - // Start: `\` - // End: `x` - fn parse_escape(&mut self) -> Result<Build> { - self.bump(); - if self.eof() { - return Err(self.err(ErrorKind::UnexpectedEscapeEof)); - } - let c = self.cur(); - if is_punct(c) { - return Ok(Build::Expr(Expr::Literal { - chars: vec![self.bump()], - casei: self.flags.casei, - })); - } - - fn lit(c: char) -> Build { - Build::Expr(Expr::Literal { chars: vec![c], casei: false }) - } - match c { - 'a' => { self.bump(); Ok(lit('\x07')) } - 'f' => { self.bump(); Ok(lit('\x0C')) } - 't' => { self.bump(); Ok(lit('\t')) } - 'n' => { self.bump(); Ok(lit('\n')) } - 'r' => { self.bump(); Ok(lit('\r')) } - 'v' => { self.bump(); Ok(lit('\x0B')) } - 'A' => { self.bump(); Ok(Build::Expr(Expr::StartText)) } - 'z' => { self.bump(); Ok(Build::Expr(Expr::EndText)) } - 'b' => { self.bump(); Ok(Build::Expr(Expr::WordBoundary)) } - 'B' => { self.bump(); Ok(Build::Expr(Expr::NotWordBoundary)) } - '0'|'1'|'2'|'3'|'4'|'5'|'6'|'7' => self.parse_octal(), - 'x' => { self.bump(); self.parse_hex() } - 'p'|'P' => { - self.bump(); - self.parse_unicode_class(c == 'P') - .map(|cls| Build::Expr(Expr::Class(cls))) - } - 'd'|'s'|'w'|'D'|'S'|'W' => { - self.bump(); - Ok(Build::Expr(Expr::Class(self.parse_perl_class(c)))) - } - c => Err(self.err(ErrorKind::UnrecognizedEscape(c))), - } - } - - // Parses a group, e.g., `(abc)`. - // - // Start: `(` - // End: `a` - // - // A more interesting example, `(?P<foo>abc)`. - // - // Start: `(` - // End: `a` - fn parse_group(&mut self) -> Result<Build> { - let chari = self.chari; - let mut name: CaptureName = None; - self.bump(); - if self.bump_if("?P<") { - let n = try!(self.parse_group_name()); - if self.names.iter().any(|n2| n2 == &n) { - return Err(self.err(ErrorKind::DuplicateCaptureName(n))); - } - self.names.push(n.clone()); - name = Some(n); - } else if self.bump_if("?") { - // This can never be capturing. It's either setting flags for - // the current group, or it's opening a non-capturing group or - // it's opening a group with a specific set of flags (which is - // also non-capturing). - // Anything else is an error. - return self.parse_group_flags(chari); - } - self.caps = checkadd(self.caps, 1); - Ok(Build::LeftParen { - i: Some(self.caps), - name: name, - chari: chari, - old_flags: self.flags, // no flags changed if we're here - }) - } - - // Parses flags (inline or grouped), e.g., `(?s-i:abc)`. - // - // Start: `s` - // End: `a` - // - // Another example, `(?s-i)a`. - // - // Start: `s` - // End: `a` - fn parse_group_flags(&mut self, opening_chari: usize) -> Result<Build> { - let old_flags = self.flags; - let mut sign = true; - let mut saw_flag = false; - loop { - if self.eof() { - // e.g., (?i - return Err(self.err(ErrorKind::UnexpectedFlagEof)); - } - match self.cur() { - 'i' => { self.flags.casei = sign; saw_flag = true } - 'm' => { self.flags.multi = sign; saw_flag = true } - 's' => { self.flags.dotnl = sign; saw_flag = true } - 'U' => { self.flags.swap_greed = sign; saw_flag = true } - 'x' => { self.flags.ignore_space = sign; saw_flag = true } - '-' => { - if !sign { - // e.g., (?-i-s) - return Err(self.err(ErrorKind::DoubleFlagNegation)); - } - sign = false; - saw_flag = false; - } - ')' => { - if !saw_flag { - // e.g., (?) - return Err(self.err(ErrorKind::EmptyFlagNegation)); - } - // At this point, we're just changing the flags inside - // the current group, which means the old flags have - // been saved elsewhere. Our modifications in place are - // okey dokey! - // - // This particular flag expression only has a stateful - // impact on a regex's AST, so nothing gets explicitly - // added. - self.bump(); - return Ok(Build::Expr(Expr::Empty)); - } - ':' => { - if !sign && !saw_flag { - // e.g., (?i-:a) - // Note that if there's no negation, it's OK not - // to see flag, because you end up with a regular - // non-capturing group: `(?:a)`. - return Err(self.err(ErrorKind::EmptyFlagNegation)); - } - self.bump(); - return Ok(Build::LeftParen { - i: None, - name: None, - chari: opening_chari, - old_flags: old_flags, - }); - } - // e.g., (?z:a) - c => return Err(self.err(ErrorKind::UnrecognizedFlag(c))), - } - self.bump(); - } - } - - // Parses a group name, e.g., `foo` in `(?P<foo>abc)`. - // - // Start: `f` - // End: `a` - fn parse_group_name(&mut self) -> Result<String> { - let mut name = String::new(); - while !self.eof() && !self.peek_is('>') { - name.push(self.bump()); - } - if self.eof() { - // e.g., (?P<a - return Err(self.err(ErrorKind::UnclosedCaptureName(name))); - } - let all_valid = name.chars().all(is_valid_capture_char); - match name.chars().next() { - // e.g., (?P<>a) - None => Err(self.err(ErrorKind::EmptyCaptureName)), - Some(c) if (c >= '0' && c <= '9') || !all_valid => { - // e.g., (?P<a#>x) - // e.g., (?P<1a>x) - Err(self.err(ErrorKind::InvalidCaptureName(name))) - } - _ => { - self.bump(); // for `>` - Ok(name) - } - } - } - - // Parses a counted repeition operator, e.g., `a{2,4}?z`. - // - // Start: `{` - // End: `z` - fn parse_counted_repeat(&mut self) -> Result<Build> { - let e = try!(self.pop(ErrorKind::RepeaterExpectsExpr)); // e.g., ({5} - if !e.can_repeat() { - // e.g., a*{5} - return Err(self.err(ErrorKind::RepeaterUnexpectedExpr(e))); - } - self.bump(); - let min = try!(self.parse_decimal(|c| c != ',' && c != '}')); - let mut max_opt = Some(min); - if self.bump_if(',') { - if self.peek_is('}') { - max_opt = None; - } else { - let max = try!(self.parse_decimal(|c| c != '}')); - if min > max { - // e.g., a{2,1} - return Err(self.err(ErrorKind::InvalidRepeatRange { - min: min, - max: max, - })); - } - max_opt = Some(max); - } - } - if !self.bump_if('}') { - Err(self.err(ErrorKind::UnclosedRepeat)) - } else { - Ok(Build::Expr(Expr::Repeat { - e: Box::new(e), - r: Repeater::Range { min: min, max: max_opt }, - greedy: !self.bump_if('?') ^ self.flags.swap_greed, - })) - } - } - - // Parses a simple repetition operator, e.g., `a+?z`. - // - // Start: `+` - // End: `z` - // - // N.B. "simple" in this context means "not min/max repetition", - // e.g., `a{1,2}`. - fn parse_simple_repeat(&mut self, rep: Repeater) -> Result<Build> { - let e = try!(self.pop(ErrorKind::RepeaterExpectsExpr)); // e.g., (* - if !e.can_repeat() { - // e.g., a** - return Err(self.err(ErrorKind::RepeaterUnexpectedExpr(e))); - } - self.bump(); - Ok(Build::Expr(Expr::Repeat { - e: Box::new(e), - r: rep, - greedy: !self.bump_if('?') ^ self.flags.swap_greed, - })) - } - - // Parses a decimal number until the given character, e.g., `a{123,456}`. - // - // Start: `1` - // End: `,` (where `until == ','`) - fn parse_decimal<B: Bumpable>(&mut self, until: B) -> Result<u32> { - match self.bump_get(until) { - // e.g., a{} - None => Err(self.err(ErrorKind::MissingBase10)), - Some(n) => { - // e.g., a{xyz - // e.g., a{9999999999} - let n = n.trim(); - u32::from_str_radix(n, 10) - .map_err(|_| self.err(ErrorKind::InvalidBase10(n.into()))) - } - } - } - - // Parses an octal number, up to 3 digits, e.g., `a\123b` - // - // Start: `1` - // End: `b` - fn parse_octal(&mut self) -> Result<Build> { - use std::char; - let mut i = 0; // counter for limiting octal to 3 digits. - let n = self.bump_get(|c| { i += 1; i <= 3 && c >= '0' && c <= '7' }) - .expect("octal string"); // guaranteed at least 1 digit - // I think both of the following unwraps are impossible to fail. - // We limit it to a three digit octal number, which maxes out at - // `0777` or `511` in decimal. Since all digits are in `0...7`, we'll - // always have a valid `u32` number. Moreover, since all numbers in - // the range `0...511` are valid Unicode scalar values, it will always - // be a valid `char`. - // - // Hence, we `unwrap` with reckless abandon. - let n = u32::from_str_radix(&n, 8).ok().expect("valid octal number"); - Ok(Build::Expr(Expr::Literal { - chars: vec![char::from_u32(n).expect("Unicode scalar value")], - casei: self.flags.casei, - })) - } - - // Parses a hex number, e.g., `a\x5ab`. - // - // Start: `5` - // End: `b` - // - // And also, `a\x{2603}b`. - // - // Start: `{` - // End: `b` - fn parse_hex(&mut self) -> Result<Build> { - if self.bump_if('{') { - self.parse_hex_many_digits() - } else { - self.parse_hex_two_digits() - } - } - - // Parses a many-digit hex number, e.g., `a\x{2603}b`. - // - // Start: `2` - // End: `b` - fn parse_hex_many_digits(&mut self) -> Result<Build> { - use std::char; - - let s = self.bump_get(|c| c != '}').unwrap_or("".into()); - let n = try!(u32::from_str_radix(&s, 16) - .map_err(|_| self.err(ErrorKind::InvalidBase16(s)))); - let c = try!(char::from_u32(n) - .ok_or(self.err(ErrorKind::InvalidScalarValue(n)))); - if !self.bump_if('}') { - // e.g., a\x{d - return Err(self.err(ErrorKind::UnclosedHex)); - } - Ok(Build::Expr(Expr::Literal { - chars: vec![c], - casei: self.flags.casei, - })) - } - - // Parses a two-digit hex number, e.g., `a\x5ab`. - // - // Start: `5` - // End: `b` - fn parse_hex_two_digits(&mut self) -> Result<Build> { - use std::char; - - let mut i = 0; - let s = self.bump_get(|_| { i += 1; i <= 2 }).unwrap_or("".into()); - if s.len() < 2 { - // e.g., a\x - // e.g., a\xf - return Err(self.err(ErrorKind::UnexpectedTwoDigitHexEof)); - } - let n = try!(u32::from_str_radix(&s, 16) - .map_err(|_| self.err(ErrorKind::InvalidBase16(s)))); - Ok(Build::Expr(Expr::Literal { - // Because 0...255 are all valid Unicode scalar values. - chars: vec![char::from_u32(n).expect("Unicode scalar value")], - casei: self.flags.casei, - })) - } - - // Parses a character class, e.g., `[^a-zA-Z0-9]+`. - // - // Start: `[` - // End: `+` - fn parse_class(&mut self) -> Result<Build> { - self.bump(); - let negated = self.bump_if('^'); - let mut class = CharClass::empty(); - while self.bump_if('-') { - class.ranges.push(ClassRange::one('-')); - } - loop { - if self.eof() { - // e.g., [a - return Err(self.err(ErrorKind::UnexpectedClassEof)); - } - match self.cur() { - // If no ranges have been added, then `]` is the first - // character (sans, perhaps, the `^` symbol), so it should - // be interpreted as a `]` instead of a closing class bracket. - ']' if class.len() > 0 => { self.bump(); break } - '[' => match self.maybe_parse_ascii() { - Some(class2) => class.ranges.extend(class2), - None => { - self.bump(); - try!(self.parse_class_range(&mut class, '[')) - } - }, - '\\' => match try!(self.parse_escape()) { - Build::Expr(Expr::Class(class2)) => { - class.ranges.extend(class2); - } - Build::Expr(Expr::Literal { chars, .. }) => { - try!(self.parse_class_range(&mut class, chars[0])); - } - Build::Expr(e) => { - let err = ErrorKind::InvalidClassEscape(e); - return Err(self.err(err)); - } - // Because `parse_escape` can never return `LeftParen`. - _ => unreachable!(), - }, - start => { - self.bump(); - try!(self.parse_class_range(&mut class, start)); - } - } - } - class = self.class_transform(negated, class).canonicalize(); - Ok(Build::Expr(Expr::Class(class))) - } - - // Parses a single range in a character class. - // - // Since this is a helper for `parse_class`, its signature sticks out. - // Namely, it requires the start character of the range and the char - // class to mutate. - // - // e.g., `[a-z]` - // - // Start: `-` (with start == `a`) - // End: `]` - fn parse_class_range(&mut self, class: &mut CharClass, start: char) - -> Result<()> { - if !self.bump_if('-') { - // Not a range, so just push a singleton range. - class.ranges.push(ClassRange::one(start)); - return Ok(()); - } - if self.eof() { - // e.g., [a- - return Err(self.err(ErrorKind::UnexpectedClassEof)); - } - if self.peek_is(']') { - // This is the end of the class, so we permit use of `-` as a - // regular char (just like we do in the beginning). - class.ranges.push(ClassRange::one(start)); - class.ranges.push(ClassRange::one('-')); - return Ok(()); - } - - // We have a real range. Just need to check to parse literal and - // make sure it's a valid range. - let end = match self.cur() { - '\\' => match try!(self.parse_escape()) { - Build::Expr(Expr::Literal { chars, .. }) => chars[0], - Build::Expr(e) => { - return Err(self.err(ErrorKind::InvalidClassEscape(e))); - } - // Because `parse_escape` can never return `LeftParen`. - _ => unreachable!(), - }, - _ => self.bump(), - }; - if end < start { - // e.g., [z-a] - return Err(self.err(ErrorKind::InvalidClassRange { - start: start, - end: end, - })); - } - class.ranges.push(ClassRange::new(start, end)); - Ok(()) - } - - // Parses an ASCII class, e.g., `[:alnum:]+`. - // - // Start: `[` - // End: `+` - // - // Also supports negation, e.g., `[:^alnum:]`. - // - // This parsing routine is distinct from the others in that it doesn't - // actually report any errors. Namely, if it fails, then the parser should - // fall back to parsing a regular class. - // - // This method will only make progress in the parser if it succeeds. - // Otherwise, the input remains where it started. - fn maybe_parse_ascii(&mut self) -> Option<CharClass> { - fn parse(p: &mut Parser) -> Option<CharClass> { - p.bump(); // the `[` - if !p.bump_if(':') { return None; } - let negate = p.bump_if('^'); - let name = match p.bump_get(|c| c != ':') { - None => return None, - Some(name) => name, - }; - if !p.bump_if(":]") { return None; } - ascii_class(&name).map(|cls| p.class_transform(negate, cls)) - } - let start = self.chari; - match parse(self) { - None => { self.chari = start; None } - result => result, - } - } - - // Parses a Uncode class name, e.g., `a\pLb`. - // - // Start: `L` - // End: `b` - // - // And also, `a\p{Greek}b`. - // - // Start: `{` - // End: `b` - // - // `negate` is true when the class name is used with `\P`. - fn parse_unicode_class(&mut self, neg: bool) -> Result<CharClass> { - let name = - if self.bump_if('{') { - let n = self.bump_get(|c| c != '}').unwrap_or("".into()); - if n.is_empty() || !self.bump_if('}') { - // e.g., \p{Greek - return Err(self.err(ErrorKind::UnclosedUnicodeName)); - } - n - } else { - if self.eof() { - // e.g., \p - return Err(self.err(ErrorKind::UnexpectedEscapeEof)); - } - self.bump().to_string() - }; - match unicode_class(&name) { - None => Err(self.err(ErrorKind::UnrecognizedUnicodeClass(name))), - Some(cls) => Ok(self.class_transform(neg, cls)), - } - } - - // Parses a perl character class with Unicode support. - // - // `name` must be one of d, s, w, D, S, W. If not, this function panics. - // - // No parser state is changed. - fn parse_perl_class(&mut self, name: char) -> CharClass { - use unicode::regex::{PERLD, PERLS, PERLW}; - let (cls, negate) = match name { - 'd' | 'D' => (raw_class_to_expr(PERLD), name == 'D'), - 's' | 'S' => (raw_class_to_expr(PERLS), name == 'S'), - 'w' | 'W' => (raw_class_to_expr(PERLW), name == 'W'), - _ => unreachable!(), - }; - self.class_transform(negate, cls) - } - - // Always bump to the next input and return the given expression as a - // `Build`. - // - // This is mostly for convenience when the surrounding context implies - // that the next character corresponds to the given expression. - fn parse_one(&mut self, e: Expr) -> Build { - self.bump(); - Build::Expr(e) - } -} - -// Auxiliary helper methods. -impl Parser { - fn chars(&self) -> Chars { - Chars::new(&self.chars[self.chari..], self.flags.ignore_space) - } - - fn bump(&mut self) -> char { - let c = self.cur(); - self.chari = checkadd(self.chari, self.chars().next_count()); - c - } - - fn cur(&self) -> char { self.chars().next().unwrap() } - - fn eof(&self) -> bool { self.chars().next().is_none() } - - fn bump_get<B: Bumpable>(&mut self, s: B) -> Option<String> { - let n = s.match_end(self); - if n == 0 { - None - } else { - let end = checkadd(self.chari, n); - let s = self.chars[self.chari..end] - .iter().cloned().collect::<String>(); - self.chari = end; - Some(s) - } - } - - fn bump_if<B: Bumpable>(&mut self, s: B) -> bool { - let n = s.match_end(self); - if n == 0 { - false - } else { - self.chari = checkadd(self.chari, n); - true - } - } - - fn peek_is<B: Bumpable>(&self, s: B) -> bool { - s.match_end(self) > 0 - } - - fn err(&self, kind: ErrorKind) -> Error { - self.errat(self.chari, kind) - } - - fn errat(&self, pos: usize, kind: ErrorKind) -> Error { - Error { pos: pos, surround: self.windowat(pos), kind: kind } - } - - fn windowat(&self, pos: usize) -> String { - let s = max(5, pos) - 5; - let e = min(self.chars.len(), checkadd(pos, 5)); - self.chars[s..e].iter().cloned().collect() - } - - fn pop(&mut self, expected: ErrorKind) -> Result<Expr> { - match self.stack.pop() { - None | Some(Build::LeftParen{..}) => Err(self.err(expected)), - Some(Build::Expr(e)) => Ok(e), - } - } - - // If the current context calls for case insensitivity, then apply - // case folding. Similarly, if `negate` is `true`, then negate the - // class. (Negation always proceeds case folding.) - fn class_transform(&self, negate: bool, mut cls: CharClass) -> CharClass { - if self.flags.casei { - cls = cls.case_fold(); - } - if negate { - cls = cls.negate(); - } - cls - } -} - -struct Chars<'a> { - chars: &'a [char], - cur: usize, - ignore_space: bool, -} - -impl<'a> Iterator for Chars<'a> { - type Item = char; - fn next(&mut self) -> Option<char> { - if !self.ignore_space { - let x = self.c(); - self.advance(); - return x; - } - while let Some(c) = self.c() { - self.advance(); - match c { - '\\' => return match self.c() { - Some('#') => {self.advance(); Some('#')} - _ => Some('\\') - }, - '#' => loop { - match self.c() { - Some(c) => { - self.advance(); - if c == '\n' { - break; - } - }, - None => return None - } - }, - _ => if !c.is_whitespace() {return Some(c);} - } - } - None - } -} - -impl<'a> Chars<'a> { - fn new(chars: &[char], ignore_space: bool) -> Chars { - Chars { - chars: chars, - cur: 0, - ignore_space: ignore_space, - } - } - - fn c(&self) -> Option<char> { - self.chars.get(self.cur).map(|&c| c) - } - - fn advance(&mut self) { - self.cur = checkadd(self.cur, 1); - } - - fn next_count(&mut self) -> usize { - self.next(); - self.cur - } -} - -// Auxiliary methods for manipulating the expression stack. -impl Parser { - // Called whenever an alternate (`|`) is found. - // - // This pops the expression stack until: - // - // 1. The stack is empty. Pushes an alternation with one arm. - // 2. An opening parenthesis is found. Leave the parenthesis - // on the stack and push an alternation with one arm. - // 3. An alternate (`|`) is found. Pop the existing alternation, - // add an arm and push the modified alternation. - // - // Each "arm" in the above corresponds to the concatenation of all - // popped expressions. - // - // In the first two cases, the stack is left in an invalid state - // because an alternation with one arm is not allowed. This - // particular state will be detected by `finish_concat` and an - // error will be reported. - // - // In none of the cases is an empty arm allowed. If an empty arm - // is found, an error is reported. - fn alternate(&mut self) -> Result<Build> { - let mut concat = vec![]; - let alts = |es| Ok(Build::Expr(Expr::Alternate(es))); - loop { - match self.stack.pop() { - None => { - if concat.is_empty() { - // e.g., |a - return Err(self.err(ErrorKind::EmptyAlternate)); - } - return alts(vec![rev_concat(concat)]); - } - Some(e @ Build::LeftParen{..}) => { - if concat.is_empty() { - // e.g., (|a) - return Err(self.err(ErrorKind::EmptyAlternate)); - } - self.stack.push(e); - return alts(vec![rev_concat(concat)]); - } - Some(Build::Expr(Expr::Alternate(mut es))) => { - if concat.is_empty() { - // e.g., a|| - return Err(self.err(ErrorKind::EmptyAlternate)); - } - es.push(rev_concat(concat)); - return alts(es); - } - Some(Build::Expr(e)) => { concat.push(e); } - } - } - } - - // Called whenever a closing parenthesis (`)`) is found. - // - // This pops the expression stack until: - // - // 1. The stack is empty. An error is reported because this - // indicates an unopened parenthesis. - // 2. An opening parenthesis is found. Pop the opening parenthesis - // and push a `Group` expression. - // 3. An alternate (`|`) is found. Pop the existing alternation - // and an arm to it in place. Pop one more item from the stack. - // If the stack was empty, then report an unopened parenthesis - // error, otherwise assume it is an opening parenthesis and - // push a `Group` expression with the popped alternation. - // (We can assume this is an opening parenthesis because an - // alternation either corresponds to the entire Regex or it - // corresponds to an entire group. This is guaranteed by the - // `alternate` method.) - // - // Each "arm" in the above corresponds to the concatenation of all - // popped expressions. - // - // Empty arms nor empty groups are allowed. - fn close_paren(&mut self) -> Result<(Flags, Build)> { - let mut concat = vec![]; - loop { - match self.stack.pop() { - // e.g., ) - None => return Err(self.err(ErrorKind::UnopenedParen)), - Some(Build::LeftParen { i, name, old_flags, .. }) => { - if concat.is_empty() { - // e.g., () - return Err(self.err(ErrorKind::EmptyGroup)); - } - return Ok((old_flags, Build::Expr(Expr::Group { - e: Box::new(rev_concat(concat)), - i: i, - name: name, - }))); - } - Some(Build::Expr(Expr::Alternate(mut es))) => { - if concat.is_empty() { - // e.g., (a|) - return Err(self.err(ErrorKind::EmptyAlternate)); - } - es.push(rev_concat(concat)); - match self.stack.pop() { - // e.g., a|b) - None => return Err(self.err(ErrorKind::UnopenedParen)), - Some(Build::Expr(_)) => unreachable!(), - Some(Build::LeftParen { i, name, old_flags, .. }) => { - return Ok((old_flags, Build::Expr(Expr::Group { - e: Box::new(Expr::Alternate(es)), - i: i, - name: name, - }))); - } - } - } - Some(Build::Expr(e)) => { concat.push(e); } - } - } - } - - // Called only when the parser reaches the end of input. - // - // This pops the expression stack until: - // - // 1. The stack is empty. Return concatenation of popped - // expressions. This concatenation may be empty! - // 2. An alternation is found. Pop the alternation and push - // a new arm. Return the alternation as the entire Regex. - // - // If an opening parenthesis is popped, then an error is - // returned since it indicates an unclosed parenthesis. - fn finish_concat(&mut self) -> Result<Expr> { - let mut concat = vec![]; - loop { - match self.stack.pop() { - None => { return Ok(rev_concat(concat)); } - Some(Build::LeftParen{ chari, ..}) => { - // e.g., a(b - return Err(self.errat(chari, ErrorKind::UnclosedParen)); - } - Some(Build::Expr(Expr::Alternate(mut es))) => { - if concat.is_empty() { - // e.g., a| - return Err(self.err(ErrorKind::EmptyAlternate)); - } - es.push(rev_concat(concat)); - return Ok(Expr::Alternate(es)); - } - Some(Build::Expr(e)) => { concat.push(e); } - } - } - } -} - -impl Build { - fn is_empty(&self) -> bool { - match *self { - Build::Expr(Expr::Empty) => true, - _ => false, - } - } -} - -// Make it ergonomic to conditionally bump the parser. -// i.e., `bump_if('a')` or `bump_if("abc")`. -trait Bumpable { - fn match_end(self, p: &Parser) -> usize; -} - -impl Bumpable for char { - fn match_end(self, p: &Parser) -> usize { - let mut chars = p.chars(); - if chars.next().map(|c| c == self).unwrap_or(false) { - chars.cur - } else { - 0 - } - } -} - -impl<'a> Bumpable for &'a str { - fn match_end(self, p: &Parser) -> usize { - let mut search = self.chars(); - let mut rest = p.chars(); - let mut count = 0; - loop { - match (rest.next(), search.next()) { - (Some(c1), Some(c2)) if c1 == c2 => count = rest.cur, - (_, None) => return count, - _ => return 0, - } - } - } -} - -impl<F: FnMut(char) -> bool> Bumpable for F { - fn match_end(mut self, p: &Parser) -> usize { - let mut chars = p.chars(); - let mut count = 0; - while let Some(c) = chars.next() { - if !self(c) { - break - } - count = chars.cur; - } - count - } -} - -// Turn a sequence of expressions into a concatenation. -// This only uses `Concat` if there are 2 or more expressions. -fn rev_concat(mut exprs: Vec<Expr>) -> Expr { - if exprs.len() == 0 { - Expr::Empty - } else if exprs.len() == 1 { - exprs.pop().unwrap() - } else { - exprs.reverse(); - Expr::Concat(exprs) - } -} - -// Returns true if and only if the given character is allowed in a capture -// name. Note that the first char of a capture name must not be numeric. -fn is_valid_capture_char(c: char) -> bool { - c == '_' || (c >= '0' && c <= '9') - || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') -} - -/// Returns true if the give character has significance in a regex. -#[doc(hidden)] -pub fn is_punct(c: char) -> bool { - match c { - '\\' | '.' | '+' | '*' | '?' | '(' | ')' | '|' | - '[' | ']' | '{' | '}' | '^' | '$' | '#' => true, - _ => false, - } -} - -fn checkadd(x: usize, y: usize) -> usize { - x.checked_add(y).expect("regex length overflow") -} - -fn unicode_class(name: &str) -> Option<CharClass> { - UNICODE_CLASSES.binary_search_by(|&(s, _)| s.cmp(name)).ok().map(|i| { - raw_class_to_expr(UNICODE_CLASSES[i].1) - }) -} - -fn ascii_class(name: &str) -> Option<CharClass> { - ASCII_CLASSES.binary_search_by(|&(s, _)| s.cmp(name)).ok().map(|i| { - raw_class_to_expr(ASCII_CLASSES[i].1) - }) -} - -fn raw_class_to_expr(raw: &[(char, char)]) -> CharClass { - let range = |&(s, e)| ClassRange { start: s, end: e }; - CharClass::new(raw.iter().map(range).collect()) -} - -type Class = &'static [(char, char)]; -type NamedClasses = &'static [(&'static str, Class)]; - -const ASCII_CLASSES: NamedClasses = &[ - // Classes must be in alphabetical order so that bsearch works. - // [:alnum:] alphanumeric (== [0-9A-Za-z]) - // [:alpha:] alphabetic (== [A-Za-z]) - // [:ascii:] ASCII (== [\x00-\x7F]) - // [:blank:] blank (== [\t ]) - // [:cntrl:] control (== [\x00-\x1F\x7F]) - // [:digit:] digits (== [0-9]) - // [:graph:] graphical (== [!-~]) - // [:lower:] lower case (== [a-z]) - // [:print:] printable (== [ -~] == [ [:graph:]]) - // [:punct:] punctuation (== [!-/:-@[-`{-~]) - // [:space:] whitespace (== [\t\n\v\f\r ]) - // [:upper:] upper case (== [A-Z]) - // [:word:] word characters (== [0-9A-Za-z_]) - // [:xdigit:] hex digit (== [0-9A-Fa-f]) - // Taken from: http://golang.org/pkg/regex/syntax/ - ("alnum", &ALNUM), - ("alpha", &ALPHA), - ("ascii", &ASCII), - ("blank", &BLANK), - ("cntrl", &CNTRL), - ("digit", &DIGIT), - ("graph", &GRAPH), - ("lower", &LOWER), - ("print", &PRINT), - ("punct", &PUNCT), - ("space", &SPACE), - ("upper", &UPPER), - ("word", &WORD), - ("xdigit", &XDIGIT), -]; - -const ALNUM: Class = &[('0', '9'), ('A', 'Z'), ('a', 'z')]; -const ALPHA: Class = &[('A', 'Z'), ('a', 'z')]; -const ASCII: Class = &[('\x00', '\x7F')]; -const BLANK: Class = &[(' ', ' '), ('\t', '\t')]; -const CNTRL: Class = &[('\x00', '\x1F'), ('\x7F', '\x7F')]; -const DIGIT: Class = &[('0', '9')]; -const GRAPH: Class = &[('!', '~')]; -const LOWER: Class = &[('a', 'z')]; -const PRINT: Class = &[(' ', '~')]; -const PUNCT: Class = &[('!', '/'), (':', '@'), ('[', '`'), ('{', '~')]; -const SPACE: Class = &[('\t', '\t'), ('\n', '\n'), ('\x0B', '\x0B'), - ('\x0C', '\x0C'), ('\r', '\r'), (' ', ' ')]; -const UPPER: Class = &[('A', 'Z')]; -const WORD: Class = &[('0', '9'), ('A', 'Z'), ('_', '_'), ('a', 'z')]; -const XDIGIT: Class = &[('0', '9'), ('A', 'F'), ('a', 'f')]; - -#[cfg(test)] -mod tests { - use { CharClass, ClassRange, Expr, Repeater, ErrorKind }; - use unicode::regex::{PERLD, PERLS, PERLW}; - use super::Parser; - use super::{LOWER, UPPER}; - - static YI: &'static [(char, char)] = &[ - ('\u{a000}', '\u{a48c}'), ('\u{a490}', '\u{a4c6}'), - ]; - - fn p(s: &str) -> Expr { Parser::parse(s).unwrap() } - fn lit(c: char) -> Expr { Expr::Literal { chars: vec![c], casei: false } } - fn liti(c: char) -> Expr { Expr::Literal { chars: vec![c], casei: true } } - fn b<T>(v: T) -> Box<T> { Box::new(v) } - fn c(es: &[Expr]) -> Expr { Expr::Concat(es.to_vec()) } - - fn class(ranges: &[(char, char)]) -> CharClass { - let ranges = ranges.iter().cloned() - .map(|(c1, c2)| ClassRange::new(c1, c2)).collect(); - CharClass::new(ranges) - } - - fn classes(classes: &[&[(char, char)]]) -> CharClass { - let mut cls = CharClass::empty(); - for &ranges in classes { - cls.ranges.extend(class(ranges)); - } - cls.canonicalize() - } - - #[test] - fn empty() { - assert_eq!(p(""), Expr::Empty); - } - - #[test] - fn literal() { - assert_eq!(p("a"), lit('a')); - } - - #[test] - fn literal_string() { - assert_eq!(p("ab"), Expr::Concat(vec![lit('a'), lit('b')])); - } - - #[test] - fn start_literal() { - assert_eq!(p("^a"), Expr::Concat(vec![ - Expr::StartText, - Expr::Literal { chars: vec!['a'], casei: false }, - ])); - } - - #[test] - fn repeat_zero_or_one_greedy() { - assert_eq!(p("a?"), Expr::Repeat { - e: b(lit('a')), - r: Repeater::ZeroOrOne, - greedy: true, - }); - } - - #[test] - fn repeat_zero_or_one_greedy_concat() { - assert_eq!(p("ab?"), Expr::Concat(vec![ - lit('a'), - Expr::Repeat { - e: b(lit('b')), - r: Repeater::ZeroOrOne, - greedy: true, - }, - ])); - } - - #[test] - fn repeat_zero_or_one_nongreedy() { - assert_eq!(p("a??"), Expr::Repeat { - e: b(lit('a')), - r: Repeater::ZeroOrOne, - greedy: false, - }); - } - - #[test] - fn repeat_one_or_more_greedy() { - assert_eq!(p("a+"), Expr::Repeat { - e: b(lit('a')), - r: Repeater::OneOrMore, - greedy: true, - }); - } - - #[test] - fn repeat_one_or_more_nongreedy() { - assert_eq!(p("a+?"), Expr::Repeat { - e: b(lit('a')), - r: Repeater::OneOrMore, - greedy: false, - }); - } - - #[test] - fn repeat_zero_or_more_greedy() { - assert_eq!(p("a*"), Expr::Repeat { - e: b(lit('a')), - r: Repeater::ZeroOrMore, - greedy: true, - }); - } - - #[test] - fn repeat_zero_or_more_nongreedy() { - assert_eq!(p("a*?"), Expr::Repeat { - e: b(lit('a')), - r: Repeater::ZeroOrMore, - greedy: false, - }); - } - - #[test] - fn repeat_counted_exact() { - assert_eq!(p("a{5}"), Expr::Repeat { - e: b(lit('a')), - r: Repeater::Range { min: 5, max: Some(5) }, - greedy: true, - }); - } - - #[test] - fn repeat_counted_min() { - assert_eq!(p("a{5,}"), Expr::Repeat { - e: b(lit('a')), - r: Repeater::Range { min: 5, max: None }, - greedy: true, - }); - } - - #[test] - fn repeat_counted_min_max() { - assert_eq!(p("a{5,10}"), Expr::Repeat { - e: b(lit('a')), - r: Repeater::Range { min: 5, max: Some(10) }, - greedy: true, - }); - } - - #[test] - fn repeat_counted_exact_nongreedy() { - assert_eq!(p("a{5}?"), Expr::Repeat { - e: b(lit('a')), - r: Repeater::Range { min: 5, max: Some(5) }, - greedy: false, - }); - } - - #[test] - fn repeat_counted_min_nongreedy() { - assert_eq!(p("a{5,}?"), Expr::Repeat { - e: b(lit('a')), - r: Repeater::Range { min: 5, max: None }, - greedy: false, - }); - } - - #[test] - fn repeat_counted_min_max_nongreedy() { - assert_eq!(p("a{5,10}?"), Expr::Repeat { - e: b(lit('a')), - r: Repeater::Range { min: 5, max: Some(10) }, - greedy: false, - }); - } - - #[test] - fn repeat_counted_whitespace() { - assert_eq!(p("a{ 5 }"), Expr::Repeat { - e: b(lit('a')), - r: Repeater::Range { min: 5, max: Some(5) }, - greedy: true, - }); - assert_eq!(p("a{ 5 , 10 }"), Expr::Repeat { - e: b(lit('a')), - r: Repeater::Range { min: 5, max: Some(10) }, - greedy: true, - }); - } - - #[test] - fn group_literal() { - assert_eq!(p("(a)"), Expr::Group { - e: b(lit('a')), - i: Some(1), - name: None, - }); - } - - #[test] - fn group_literal_concat() { - assert_eq!(p("(ab)"), Expr::Group { - e: b(c(&[lit('a'), lit('b')])), - i: Some(1), - name: None, - }); - } - - #[test] - fn alt_two() { - assert_eq!(p("a|b"), Expr::Alternate(vec![lit('a'), lit('b')])); - } - - #[test] - fn alt_many() { - assert_eq!(p("a|b|c"), Expr::Alternate(vec![ - lit('a'), lit('b'), lit('c'), - ])); - } - - #[test] - fn alt_many_concat() { - assert_eq!(p("ab|bc|cd"), Expr::Alternate(vec![ - c(&[lit('a'), lit('b')]), - c(&[lit('b'), lit('c')]), - c(&[lit('c'), lit('d')]), - ])); - } - - #[test] - fn alt_group_two() { - assert_eq!(p("(a|b)"), Expr::Group { - e: b(Expr::Alternate(vec![lit('a'), lit('b')])), - i: Some(1), - name: None, - }); - } - - #[test] - fn alt_group_many() { - assert_eq!(p("(a|b|c)"), Expr::Group { - e: b(Expr::Alternate(vec![lit('a'), lit('b'), lit('c')])), - i: Some(1), - name: None, - }); - } - - #[test] - fn alt_group_many_concat() { - assert_eq!(p("(ab|bc|cd)"), Expr::Group { - e: b(Expr::Alternate(vec![ - c(&[lit('a'), lit('b')]), - c(&[lit('b'), lit('c')]), - c(&[lit('c'), lit('d')]), - ])), - i: Some(1), - name: None, - }); - } - - #[test] - fn alt_group_nested() { - assert_eq!(p("(ab|(bc|(cd)))"), Expr::Group { - e: b(Expr::Alternate(vec![ - c(&[lit('a'), lit('b')]), - Expr::Group { - e: b(Expr::Alternate(vec![ - c(&[lit('b'), lit('c')]), - Expr::Group { - e: b(c(&[lit('c'), lit('d')])), - i: Some(3), - name: None, - } - ])), - i: Some(2), - name: None, - }, - ])), - i: Some(1), - name: None, - }); - } - - #[test] - fn group_name() { - assert_eq!(p("(?P<foo>a)"), Expr::Group { - e: b(lit('a')), - i: Some(1), - name: Some("foo".into()), - }); - } - - #[test] - fn group_no_capture() { - assert_eq!(p("(?:a)"), Expr::Group { - e: b(lit('a')), - i: None, - name: None, - }); - } - - #[test] - fn group_flags() { - assert_eq!(p("(?i:a)"), Expr::Group { - e: b(liti('a')), - i: None, - name: None, - }); - } - - #[test] - fn group_flags_returned() { - assert_eq!(p("(?i:a)a"), c(&[ - Expr::Group { - e: b(liti('a')), - i: None, - name: None, - }, - lit('a'), - ])); - } - - #[test] - fn group_flags_retained() { - assert_eq!(p("(?i)(?-i:a)a"), c(&[ - Expr::Group { - e: b(lit('a')), - i: None, - name: None, - }, - liti('a'), - ])); - } - - #[test] - fn flags_inline() { - assert_eq!(p("(?i)a"), liti('a')); - } - - #[test] - fn flags_inline_multiple() { - assert_eq!(p("(?is)a."), c(&[liti('a'), Expr::AnyChar])); - } - - #[test] - fn flags_inline_multiline() { - assert_eq!(p("(?m)^(?-m)$"), c(&[Expr::StartLine, Expr::EndText])); - } - - #[test] - fn flags_inline_swap_greed() { - assert_eq!(p("(?U)a*a*?(?i-U)a*a*?"), c(&[ - Expr::Repeat { - e: b(lit('a')), - r: Repeater::ZeroOrMore, - greedy: false, - }, - Expr::Repeat { - e: b(lit('a')), - r: Repeater::ZeroOrMore, - greedy: true, - }, - Expr::Repeat { - e: b(liti('a')), - r: Repeater::ZeroOrMore, - greedy: true, - }, - Expr::Repeat { - e: b(liti('a')), - r: Repeater::ZeroOrMore, - greedy: false, - }, - ])); - } - - #[test] - fn flags_inline_multiple_negate_one() { - assert_eq!(p("(?is)a.(?i-s)a."), c(&[ - liti('a'), Expr::AnyChar, liti('a'), Expr::AnyCharNoNL, - ])); - } - - #[test] - fn flags_inline_negate() { - assert_eq!(p("(?i)a(?-i)a"), c(&[liti('a'), lit('a')])); - } - - #[test] - fn flags_group_inline() { - assert_eq!(p("(a(?i)a)a"), c(&[ - Expr::Group { - e: b(c(&[lit('a'), liti('a')])), - i: Some(1), - name: None, - }, - lit('a'), - ])); - } - - #[test] - fn flags_group_inline_retain() { - assert_eq!(p("(?i)((?-i)a)a"), c(&[ - Expr::Group { - e: b(lit('a')), - i: Some(1), - name: None, - }, - liti('a'), - ])); - } - - #[test] - fn escape_simple() { - assert_eq!(p(r"\a\f\t\n\r\v"), c(&[ - lit('\x07'), lit('\x0C'), lit('\t'), - lit('\n'), lit('\r'), lit('\x0B'), - ])); - } - - #[test] - fn escape_boundaries() { - assert_eq!(p(r"\A\z\b\B"), c(&[ - Expr::StartText, Expr::EndText, - Expr::WordBoundary, Expr::NotWordBoundary, - ])); - } - - #[test] - fn escape_punctuation() { - assert_eq!(p(r"\\\.\+\*\?\(\)\|\[\]\{\}\^\$\#"), c(&[ - lit('\\'), lit('.'), lit('+'), lit('*'), lit('?'), - lit('('), lit(')'), lit('|'), lit('['), lit(']'), - lit('{'), lit('}'), lit('^'), lit('$'), lit('#'), - ])); - } - - #[test] - fn escape_octal() { - assert_eq!(p(r"\123"), lit('S')); - assert_eq!(p(r"\1234"), c(&[lit('S'), lit('4')])); - } - - #[test] - fn escape_hex2() { - assert_eq!(p(r"\x53"), lit('S')); - assert_eq!(p(r"\x534"), c(&[lit('S'), lit('4')])); - } - - #[test] - fn escape_hex() { - assert_eq!(p(r"\x{53}"), lit('S')); - assert_eq!(p(r"\x{53}4"), c(&[lit('S'), lit('4')])); - assert_eq!(p(r"\x{2603}"), lit('\u{2603}')); - } - - #[test] - fn escape_unicode_name() { - assert_eq!(p(r"\p{Yi}"), Expr::Class(class(YI))); - } - - #[test] - fn escape_unicode_letter() { - assert_eq!(p(r"\pZ"), Expr::Class(class(&[ - ('\u{20}', '\u{20}'), ('\u{a0}', '\u{a0}'), - ('\u{1680}', '\u{1680}'), ('\u{2000}', '\u{200a}'), - ('\u{2028}', '\u{2029}'), ('\u{202f}', '\u{202f}'), - ('\u{205f}', '\u{205f}'), ('\u{3000}', '\u{3000}'), - ]))); - } - - #[test] - fn escape_unicode_name_case_fold() { - assert_eq!(p(r"(?i)\p{Yi}"), Expr::Class(class(YI).case_fold())); - } - - #[test] - fn escape_unicode_letter_case_fold() { - assert_eq!(p(r"(?i)\pZ"), Expr::Class(class(&[ - ('\u{20}', '\u{20}'), ('\u{a0}', '\u{a0}'), - ('\u{1680}', '\u{1680}'), ('\u{2000}', '\u{200a}'), - ('\u{2028}', '\u{2029}'), ('\u{202f}', '\u{202f}'), - ('\u{205f}', '\u{205f}'), ('\u{3000}', '\u{3000}'), - ]).case_fold())); - } - - #[test] - fn escape_unicode_name_negate() { - assert_eq!(p(r"\P{Yi}"), Expr::Class(class(YI).negate())); - } - - #[test] - fn escape_unicode_letter_negate() { - assert_eq!(p(r"\PZ"), Expr::Class(class(&[ - ('\u{20}', '\u{20}'), ('\u{a0}', '\u{a0}'), - ('\u{1680}', '\u{1680}'), ('\u{2000}', '\u{200a}'), - ('\u{2028}', '\u{2029}'), ('\u{202f}', '\u{202f}'), - ('\u{205f}', '\u{205f}'), ('\u{3000}', '\u{3000}'), - ]).negate())); - } - - #[test] - fn escape_unicode_name_negate_case_fold() { - assert_eq!(p(r"(?i)\P{Yi}"), - Expr::Class(class(YI).negate().case_fold())); - } - - #[test] - fn escape_unicode_letter_negate_case_fold() { - assert_eq!(p(r"(?i)\PZ"), Expr::Class(class(&[ - ('\u{20}', '\u{20}'), ('\u{a0}', '\u{a0}'), - ('\u{1680}', '\u{1680}'), ('\u{2000}', '\u{200a}'), - ('\u{2028}', '\u{2029}'), ('\u{202f}', '\u{202f}'), - ('\u{205f}', '\u{205f}'), ('\u{3000}', '\u{3000}'), - ]).negate().case_fold())); - } - - #[test] - fn escape_perl_d() { - assert_eq!(p(r"\d"), Expr::Class(class(PERLD))); - } - - #[test] - fn escape_perl_s() { - assert_eq!(p(r"\s"), Expr::Class(class(PERLS))); - } - - #[test] - fn escape_perl_w() { - assert_eq!(p(r"\w"), Expr::Class(class(PERLW))); - } - - #[test] - fn escape_perl_d_negate() { - assert_eq!(p(r"\D"), Expr::Class(class(PERLD).negate())); - } - - #[test] - fn escape_perl_s_negate() { - assert_eq!(p(r"\S"), Expr::Class(class(PERLS).negate())); - } - - #[test] - fn escape_perl_w_negate() { - assert_eq!(p(r"\W"), Expr::Class(class(PERLW).negate())); - } - - #[test] - fn escape_perl_d_case_fold() { - assert_eq!(p(r"(?i)\d"), Expr::Class(class(PERLD).case_fold())); - } - - #[test] - fn escape_perl_s_case_fold() { - assert_eq!(p(r"(?i)\s"), Expr::Class(class(PERLS).case_fold())); - } - - #[test] - fn escape_perl_w_case_fold() { - assert_eq!(p(r"(?i)\w"), Expr::Class(class(PERLW).case_fold())); - } - - #[test] - fn escape_perl_d_case_fold_negate() { - assert_eq!(p(r"(?i)\D"), - Expr::Class(class(PERLD).negate().case_fold())); - } - - #[test] - fn escape_perl_s_case_fold_negate() { - assert_eq!(p(r"(?i)\S"), - Expr::Class(class(PERLS).negate().case_fold())); - } - - #[test] - fn escape_perl_w_case_fold_negate() { - assert_eq!(p(r"(?i)\W"), - Expr::Class(class(PERLW).negate().case_fold())); - } - - #[test] - fn class_singleton() { - assert_eq!(p(r"[a]"), Expr::Class(class(&[('a', 'a')]))); - assert_eq!(p(r"[\x00]"), Expr::Class(class(&[('\x00', '\x00')]))); - assert_eq!(p(r"[\n]"), Expr::Class(class(&[('\n', '\n')]))); - assert_eq!(p("[\n]"), Expr::Class(class(&[('\n', '\n')]))); - } - - #[test] - fn class_singleton_negate() { - assert_eq!(p(r"[^a]"), Expr::Class(class(&[ - ('\x00', '\x60'), ('\x62', '\u{10FFFF}'), - ]))); - assert_eq!(p(r"[^\x00]"), Expr::Class(class(&[ - ('\x01', '\u{10FFFF}'), - ]))); - assert_eq!(p(r"[^\n]"), Expr::Class(class(&[ - ('\x00', '\x09'), ('\x0b', '\u{10FFFF}'), - ]))); - assert_eq!(p("[^\n]"), Expr::Class(class(&[ - ('\x00', '\x09'), ('\x0b', '\u{10FFFF}'), - ]))); - } - - #[test] - fn class_singleton_class() { - assert_eq!(p(r"[\d]"), Expr::Class(class(PERLD))); - assert_eq!(p(r"[\p{Yi}]"), Expr::Class(class(YI))); - } - - #[test] - fn class_singleton_class_negate() { - assert_eq!(p(r"[^\d]"), Expr::Class(class(PERLD).negate())); - assert_eq!(p(r"[^\w]"), Expr::Class(class(PERLW).negate())); - assert_eq!(p(r"[^\s]"), Expr::Class(class(PERLS).negate())); - } - - #[test] - fn class_singleton_class_negate_negate() { - assert_eq!(p(r"[^\D]"), Expr::Class(class(PERLD))); - assert_eq!(p(r"[^\W]"), Expr::Class(class(PERLW))); - assert_eq!(p(r"[^\S]"), Expr::Class(class(PERLS))); - } - - #[test] - fn class_singleton_class_casei() { - assert_eq!(p(r"(?i)[\d]"), Expr::Class(class(PERLD).case_fold())); - assert_eq!(p(r"(?i)[\p{Yi}]"), Expr::Class(class(YI).case_fold())); - } - - #[test] - fn class_singleton_class_negate_casei() { - assert_eq!(p(r"(?i)[^\d]"), - Expr::Class(class(PERLD).negate().case_fold())); - assert_eq!(p(r"(?i)[^\w]"), - Expr::Class(class(PERLW).negate().case_fold())); - assert_eq!(p(r"(?i)[^\s]"), - Expr::Class(class(PERLS).negate().case_fold())); - } - - #[test] - fn class_singleton_class_negate_negate_casei() { - assert_eq!(p(r"(?i)[^\D]"), Expr::Class(class(PERLD).case_fold())); - assert_eq!(p(r"(?i)[^\W]"), Expr::Class(class(PERLW).case_fold())); - assert_eq!(p(r"(?i)[^\S]"), Expr::Class(class(PERLS).case_fold())); - } - - #[test] - fn class_multiple_class() { - assert_eq!(p(r"[\d\p{Yi}]"), Expr::Class(classes(&[ - PERLD, YI, - ]))); - } - - #[test] - fn class_multiple_class_negate() { - assert_eq!(p(r"[^\d\p{Yi}]"), Expr::Class(classes(&[ - PERLD, YI, - ]).negate())); - } - - #[test] - fn class_multiple_class_negate_negate() { - let nperld = class(PERLD).negate(); - let nyi = class(YI).negate(); - let cls = CharClass::empty().merge(nperld).merge(nyi); - assert_eq!(p(r"[^\D\P{Yi}]"), Expr::Class(cls.negate())); - } - - #[test] - fn class_multiple_class_casei() { - assert_eq!(p(r"(?i)[\d\p{Yi}]"), Expr::Class(classes(&[ - PERLD, YI, - ]).case_fold())); - } - - #[test] - fn class_multiple_class_negate_casei() { - assert_eq!(p(r"(?i)[^\d\p{Yi}]"), Expr::Class(classes(&[ - PERLD, YI, - ]).negate().case_fold())); - } - - #[test] - fn class_multiple_class_negate_negate_casei() { - let nperld = class(PERLD).negate(); - let nyi = class(YI).negate(); - let class = CharClass::empty().merge(nperld).merge(nyi); - assert_eq!(p(r"(?i)[^\D\P{Yi}]"), - Expr::Class(class.negate().case_fold())); - } - - #[test] - fn class_class_hypen() { - assert_eq!(p(r"[\p{Yi}-]"), Expr::Class(classes(&[ - &[('-', '-')], YI, - ]))); - assert_eq!(p(r"[\p{Yi}-a]"), Expr::Class(classes(&[ - &[('-', '-')], &[('a', 'a')], YI, - ]))); - } - - #[test] - fn class_brackets() { - assert_eq!(p("[]]"), Expr::Class(class(&[(']', ']')]))); - assert_eq!(p("[][]"), Expr::Class(class(&[('[', '['), (']', ']')]))); - assert_eq!(p("[[]]"), Expr::Concat(vec![ - Expr::Class(class(&[('[', '[')])), - lit(']'), - ])); - } - - #[test] - fn class_brackets_hypen() { - assert_eq!(p("[]-]"), Expr::Class(class(&[('-', '-'), (']', ']')]))); - assert_eq!(p("[-]]"), Expr::Concat(vec![ - Expr::Class(class(&[('-', '-')])), - lit(']'), - ])); - } - - #[test] - fn class_overlapping() { - assert_eq!(p("[a-fd-h]"), Expr::Class(class(&[('a', 'h')]))); - assert_eq!(p("[a-fg-m]"), Expr::Class(class(&[('a', 'm')]))); - } - - #[test] - fn ascii_class() { - assert_eq!(p("[:upper:]"), Expr::Class(class(UPPER))); - assert_eq!(p("[[:upper:]]"), Expr::Class(class(UPPER))); - } - - #[test] - fn ascii_class_not() { - assert_eq!(p("[:abc:]"), - Expr::Class(class(&[(':', ':'), ('a', 'c')]))); - } - - #[test] - fn ascii_class_multiple() { - assert_eq!(p("[[:lower:][:upper:]]"), - Expr::Class(classes(&[UPPER, LOWER]))); - } - - #[test] - fn ascii_class_negate() { - assert_eq!(p("[[:^upper:]]"), Expr::Class(class(UPPER).negate())); - assert_eq!(p("[^[:^upper:]]"), Expr::Class(class(UPPER))); - } - - #[test] - fn ascii_class_negate_multiple() { - let (nlower, nupper) = (class(LOWER).negate(), class(UPPER).negate()); - let cls = CharClass::empty().merge(nlower).merge(nupper); - assert_eq!(p("[[:^lower:][:^upper:]]"), Expr::Class(cls.clone())); - assert_eq!(p("[^[:^lower:][:^upper:]]"), Expr::Class(cls.negate())); - } - - #[test] - fn ascii_class_case_fold() { - assert_eq!(p("(?i)[:upper:]"), Expr::Class(class(UPPER).case_fold())); - assert_eq!(p("(?i)[[:upper:]]"), - Expr::Class(class(UPPER).case_fold())); - } - - #[test] - fn ascii_class_negate_case_fold() { - assert_eq!(p("(?i)[[:^upper:]]"), - Expr::Class(class(UPPER).case_fold().negate())); - assert_eq!(p("(?i)[^[:^upper:]]"), - Expr::Class(class(UPPER).case_fold())); - } - - #[test] - fn single_class_negate_case_fold() { - assert_eq!(p("(?i)[^x]"), - Expr::Class(class(&[('x', 'x')]).case_fold().negate())); - } - - #[test] - fn ignore_space_literal() { - assert_eq!(p("(?x) a b c"), Expr::Concat(vec![ - lit('a'), lit('b'), lit('c'), - ])); - } - - #[test] - fn ignore_space_literal_off() { - assert_eq!(p("(?x) a b c(?-x) a"), Expr::Concat(vec![ - lit('a'), lit('b'), lit('c'), lit(' '), lit('a'), - ])); - } - - #[test] - fn ignore_space_class() { - assert_eq!(p("(?x)[a - - z -]"), Expr::Class(class(&[('a', 'z')]))); - assert_eq!(p("(?x)[ ^ a - - z -]"), Expr::Class(class(&[('a', 'z')]).negate())); - } - - #[test] - fn ignore_space_escape() { - assert_eq!(p(r"(?x)\ d"), Expr::Class(class(PERLD))); - assert_eq!(p(r"(?x)\ - D"), Expr::Class(class(PERLD).negate())); - } - - #[test] - fn ignore_space_comments() { - assert_eq!(p(r"(?x)(?P<foo> - a # comment 1 -)(?P<bar> - z # comment 2 -)"), Expr::Concat(vec![ - Expr::Group { - e: Box::new(lit('a')), - i: Some(1), - name: Some("foo".into()), - }, - Expr::Group { - e: Box::new(lit('z')), - i: Some(2), - name: Some("bar".into()), - }, - ])); - } - - #[test] - fn ignore_space_comments_re_enable() { - assert_eq!(p(r"(?x)a # hi -(?-x:#) # sweet"), Expr::Concat(vec![ - lit('a'), - Expr::Group { - e: Box::new(lit('#')), - i: None, - name: None, - }, - ])); - } - - #[test] - fn ignore_space_escape_punctuation() { - assert_eq!(p(r"(?x)\\\.\+\*\?\(\)\|\[\]\{\}\^\$\#"), c(&[ - lit('\\'), lit('.'), lit('+'), lit('*'), lit('?'), - lit('('), lit(')'), lit('|'), lit('['), lit(']'), - lit('{'), lit('}'), lit('^'), lit('$'), lit('#'), - ])); - } - - #[test] - fn ignore_space_escape_hash() { - assert_eq!(p(r"(?x)a\# # hi there"), Expr::Concat(vec![ - lit('a'), - lit('#'), - ])); - } - - // Test every single possible error case. - - macro_rules! test_err { - ($re:expr, $pos:expr, $kind:expr) => {{ - let err = Parser::parse($re).unwrap_err(); - assert_eq!($pos, err.pos); - assert_eq!($kind, err.kind); - assert!($re.contains(&err.surround)); - }} - } - - #[test] - fn error_repeat_no_expr_simple() { - test_err!("(*", 1, ErrorKind::RepeaterExpectsExpr); - } - - #[test] - fn error_repeat_no_expr_counted() { - test_err!("({5}", 1, ErrorKind::RepeaterExpectsExpr); - } - - #[test] - fn error_repeat_beginning_counted() { - test_err!("{5}", 0, ErrorKind::RepeaterExpectsExpr); - } - - #[test] - fn error_repeat_illegal_exprs_simple() { - test_err!("a**", 2, ErrorKind::RepeaterUnexpectedExpr(Expr::Repeat { - e: b(lit('a')), - r: Repeater::ZeroOrMore, - greedy: true, - })); - test_err!("a|*", 2, - ErrorKind::RepeaterUnexpectedExpr(Expr::Alternate(vec![lit('a')])) - ); - } - - #[test] - fn error_repeat_illegal_exprs_counted() { - test_err!("a*{5}", 2, ErrorKind::RepeaterUnexpectedExpr(Expr::Repeat { - e: b(lit('a')), - r: Repeater::ZeroOrMore, - greedy: true, - })); - test_err!("a|{5}", 2, - ErrorKind::RepeaterUnexpectedExpr(Expr::Alternate(vec![lit('a')])) - ); - } - - #[test] - fn error_repeat_empty_number() { - test_err!("a{}", 2, ErrorKind::MissingBase10); - } - - #[test] - fn error_repeat_eof() { - test_err!("a{5", 3, ErrorKind::UnclosedRepeat); - } - - #[test] - fn error_repeat_empty_number_eof() { - test_err!("a{xyz", 5, ErrorKind::InvalidBase10("xyz".into())); - test_err!("a{12,xyz", 8, ErrorKind::InvalidBase10("xyz".into())); - } - - #[test] - fn error_repeat_invalid_number() { - test_err!("a{9999999999}", 12, - ErrorKind::InvalidBase10("9999999999".into())); - test_err!("a{1,9999999999}", 14, - ErrorKind::InvalidBase10("9999999999".into())); - } - - #[test] - fn error_repeat_invalid_number_extra() { - test_err!("a{12x}", 5, ErrorKind::InvalidBase10("12x".into())); - test_err!("a{1,12x}", 7, ErrorKind::InvalidBase10("12x".into())); - } - - #[test] - fn error_repeat_invalid_range() { - test_err!("a{2,1}", 5, - ErrorKind::InvalidRepeatRange { min: 2, max: 1 }); - } - - #[test] - fn error_alternate_empty() { - test_err!("|a", 0, ErrorKind::EmptyAlternate); - } - - #[test] - fn error_alternate_empty_with_group() { - test_err!("(|a)", 1, ErrorKind::EmptyAlternate); - } - - #[test] - fn error_alternate_empty_with_alternate() { - test_err!("a||", 2, ErrorKind::EmptyAlternate); - } - - #[test] - fn error_close_paren_unopened_empty() { - test_err!(")", 0, ErrorKind::UnopenedParen); - } - - #[test] - fn error_close_paren_unopened() { - test_err!("ab)", 2, ErrorKind::UnopenedParen); - } - - #[test] - fn error_close_paren_unopened_with_alt() { - test_err!("a|b)", 3, ErrorKind::UnopenedParen); - } - - #[test] - fn error_close_paren_empty_alt() { - test_err!("(a|)", 3, ErrorKind::EmptyAlternate); - } - - #[test] - fn error_close_paren_empty_group() { - test_err!("()", 1, ErrorKind::EmptyGroup); - } - - #[test] - fn error_close_paren_empty_group_with_name() { - test_err!("(?P<foo>)", 8, ErrorKind::EmptyGroup); - } - - #[test] - fn error_finish_concat_unclosed() { - test_err!("ab(xy", 2, ErrorKind::UnclosedParen); - } - - #[test] - fn error_finish_concat_empty_alt() { - test_err!("a|", 2, ErrorKind::EmptyAlternate); - } - - #[test] - fn error_group_name_invalid() { - test_err!("(?P<a#>x)", 6, ErrorKind::InvalidCaptureName("a#".into())); - } - - #[test] - fn error_group_name_invalid_leading() { - test_err!("(?P<1a>a)", 6, ErrorKind::InvalidCaptureName("1a".into())); - } - - #[test] - fn error_group_name_unexpected_eof() { - test_err!("(?P<a", 5, ErrorKind::UnclosedCaptureName("a".into())); - } - - #[test] - fn error_group_name_empty() { - test_err!("(?P<>a)", 4, ErrorKind::EmptyCaptureName); - } - - #[test] - fn error_group_opts_unrecognized_flag() { - test_err!("(?z:a)", 2, ErrorKind::UnrecognizedFlag('z')); - } - - #[test] - fn error_group_opts_unexpected_eof() { - test_err!("(?i", 3, ErrorKind::UnexpectedFlagEof); - } - - #[test] - fn error_group_opts_double_negation() { - test_err!("(?-i-s:a)", 4, ErrorKind::DoubleFlagNegation); - } - - #[test] - fn error_group_opts_empty_negation() { - test_err!("(?i-:a)", 4, ErrorKind::EmptyFlagNegation); - } - - #[test] - fn error_group_opts_empty() { - test_err!("(?)", 2, ErrorKind::EmptyFlagNegation); - } - - #[test] - fn error_escape_unexpected_eof() { - test_err!(r"\", 1, ErrorKind::UnexpectedEscapeEof); - } - - #[test] - fn error_escape_unrecognized() { - test_err!(r"\m", 1, ErrorKind::UnrecognizedEscape('m')); - } - - #[test] - fn error_escape_hex2_eof0() { - test_err!(r"\x", 2, ErrorKind::UnexpectedTwoDigitHexEof); - } - - #[test] - fn error_escape_hex2_eof1() { - test_err!(r"\xA", 3, ErrorKind::UnexpectedTwoDigitHexEof); - } - - #[test] - fn error_escape_hex2_invalid() { - test_err!(r"\xAG", 4, ErrorKind::InvalidBase16("AG".into())); - } - - #[test] - fn error_escape_hex_eof0() { - test_err!(r"\x{", 3, ErrorKind::InvalidBase16("".into())); - } - - #[test] - fn error_escape_hex_eof1() { - test_err!(r"\x{A", 4, ErrorKind::UnclosedHex); - } - - #[test] - fn error_escape_hex_invalid() { - test_err!(r"\x{AG}", 5, ErrorKind::InvalidBase16("AG".into())); - } - - #[test] - fn error_escape_hex_invalid_scalar_value_surrogate() { - test_err!(r"\x{D800}", 7, ErrorKind::InvalidScalarValue(0xD800)); - } - - #[test] - fn error_escape_hex_invalid_scalar_value_high() { - test_err!(r"\x{110000}", 9, ErrorKind::InvalidScalarValue(0x110000)); - } - - #[test] - fn error_escape_hex_invalid_u32() { - test_err!(r"\x{9999999999}", 13, - ErrorKind::InvalidBase16("9999999999".into())); - } - - #[test] - fn error_unicode_unclosed() { - test_err!(r"\p{", 3, ErrorKind::UnclosedUnicodeName); - test_err!(r"\p{Greek", 8, ErrorKind::UnclosedUnicodeName); - } - - #[test] - fn error_unicode_no_letter() { - test_err!(r"\p", 2, ErrorKind::UnexpectedEscapeEof); - } - - #[test] - fn error_unicode_unknown_letter() { - test_err!(r"\pA", 3, ErrorKind::UnrecognizedUnicodeClass("A".into())); - } - - #[test] - fn error_unicode_unknown_name() { - test_err!(r"\p{Yii}", 7, - ErrorKind::UnrecognizedUnicodeClass("Yii".into())); - } - - #[test] - fn error_class_eof_empty() { - test_err!("[", 1, ErrorKind::UnexpectedClassEof); - test_err!("[^", 2, ErrorKind::UnexpectedClassEof); - } - - #[test] - fn error_class_eof_non_empty() { - test_err!("[a", 2, ErrorKind::UnexpectedClassEof); - test_err!("[^a", 3, ErrorKind::UnexpectedClassEof); - } - - #[test] - fn error_class_eof_range() { - test_err!("[a-", 3, ErrorKind::UnexpectedClassEof); - test_err!("[^a-", 4, ErrorKind::UnexpectedClassEof); - test_err!("[---", 4, ErrorKind::UnexpectedClassEof); - } - - #[test] - fn error_class_invalid_escape() { - test_err!(r"[\pA]", 4, - ErrorKind::UnrecognizedUnicodeClass("A".into())); - } - - #[test] - fn error_class_valid_escape_not_allowed() { - test_err!(r"[\A]", 3, ErrorKind::InvalidClassEscape(Expr::StartText)); - } - - #[test] - fn error_class_range_valid_escape_not_allowed() { - test_err!(r"[a-\d]", 5, - ErrorKind::InvalidClassEscape(Expr::Class(class(PERLD)))); - test_err!(r"[a-\A]", 5, - ErrorKind::InvalidClassEscape(Expr::StartText)); - test_err!(r"[\A-a]", 3, - ErrorKind::InvalidClassEscape(Expr::StartText)); - } - - #[test] - fn error_class_invalid_range() { - test_err!("[z-a]", 4, ErrorKind::InvalidClassRange { - start: 'z', - end: 'a', - }); - } - - #[test] - fn error_class_empty_range() { - test_err!("[]", 2, ErrorKind::UnexpectedClassEof); - test_err!("[^]", 3, ErrorKind::UnexpectedClassEof); - } - - #[test] - fn error_duplicate_capture_name() { - test_err!("(?P<a>.)(?P<a>.)", 14, - ErrorKind::DuplicateCaptureName("a".into())); - } -} diff --git a/deps/regex-syntax-0.2.2/src/properties.rs b/deps/regex-syntax-0.2.2/src/properties.rs deleted file mode 100644 index 171e9a4a0..000000000 --- a/deps/regex-syntax-0.2.2/src/properties.rs +++ /dev/null @@ -1,398 +0,0 @@ -// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -use quickcheck::{Arbitrary, Gen, Testable, QuickCheck, StdGen}; -use rand::Rng; - -use {Expr, CharClass, ClassRange, Repeater, dec_char}; - -fn qc<T: Testable>(t: T) { - QuickCheck::new() - .tests(10_000) - .max_tests(20_000) - .quickcheck(t); -} - -fn class(ranges: &[(char, char)]) -> CharClass { - let ranges = ranges.iter().cloned() - .map(|(c1, c2)| ClassRange::new(c1, c2)).collect(); - CharClass::new(ranges) -} - -// Test invariants for canonicalizing character classes. - -#[test] -fn negate() { - fn prop(ranges: Vec<(char, char)>) -> bool { - class(&ranges).canonicalize() == class(&ranges).negate().negate() - } - qc(prop as fn(Vec<(char, char)>) -> bool); -} - -#[test] -fn classes_are_sorted_and_nonoverlapping() { - fn prop(ranges: Vec<(char, char)>) -> bool { - class(&ranges) - .canonicalize() - .windows(2) - .all(|w| w[0].end < dec_char(w[1].start)) - } - qc(prop as fn(Vec<(char, char)>) -> bool); -} - -#[test] -fn valid_class_ranges() { - fn prop(ranges: Vec<(char, char)>) -> bool { - class(&ranges).canonicalize().into_iter().all(|r| r.start <= r.end) - } - qc(prop as fn(Vec<(char, char)>) -> bool); -} - -/// A wrapper type for generating "regex-like" Unicode strings. -/// -/// In particular, this type's `Arbitrary` impl specifically biases toward -/// special regex characters to make test cases more interesting. -#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord)] -struct RegexLikeString(String); - -impl Arbitrary for RegexLikeString { - fn arbitrary<G: Gen>(g: &mut G) -> RegexLikeString { - const SPECIAL: &'static [char] = &[ - '\\', '.', '+', '*', '?', '(', ')', '|', '[', ']', '{', '}', - '^', '$', - ]; - // Generating random Unicode strings results in mostly uninteresting - // regexes. Namely, they'll mostly just be literals. - // To make properties using regex strings more interesting, we bias - // toward selecting characters of significance to a regex. - let size = { let s = g.size(); g.gen_range(0, s) }; - RegexLikeString((0..size).map(|_| { - if g.gen_weighted_bool(3) { - *g.choose(SPECIAL).unwrap() - } else { - g.gen() - } - }).collect()) - } - - fn shrink(&self) -> Box<Iterator<Item=RegexLikeString>> { - // The regular `String` shrinker is good enough. - Box::new(self.0.shrink().map(RegexLikeString)) - } -} - -/// A special type for generating small non-zero sized ASCII strings. -#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord)] -struct SmallAscii(String); - -impl Arbitrary for SmallAscii { - fn arbitrary<G: Gen>(g: &mut G) -> SmallAscii { - use std::char::from_u32; - let size = g.gen_range(1, 5); - SmallAscii((0..size) - .map(|_| from_u32(g.gen_range(97, 123)).unwrap()) - .collect()) - } - - fn shrink(&self) -> Box<Iterator<Item=SmallAscii>> { - Box::new(self.0.shrink().map(SmallAscii)) - } -} - -#[test] -fn parser_never_panics() { - fn prop(s: RegexLikeString) -> bool { - let _ = Expr::parse(&s.0); true - } - qc(prop as fn(RegexLikeString) -> bool); -} - -// Testing entire expressions. -// -// We only have one test at the moment, but the machinery could be useful -// for other things. -// -// In particular, Russ Cox writes about testing regexes by comparing the -// strings they match with other regex implementations. A fuzzer/shrinker -// (which is what's implemented below) would be a great way to drive that -// process. ---AG - -impl Arbitrary for Expr { - fn arbitrary<G: Gen>(g: &mut G) -> Expr { - fix_capture_indices(gen_expr(g, 0, ExprType::Anything)).simplify() - } - - fn shrink(&self) -> Box<Iterator<Item=Expr>> { - use Expr::*; - - let nada = || Box::new(None.into_iter()); - let es: Box<Iterator<Item=Expr>> = match *self { - Empty | AnyChar | AnyCharNoNL - | StartLine | EndLine | StartText | EndText - | WordBoundary | NotWordBoundary => nada(), - Literal { ref chars, .. } if chars.len() == 1 => nada(), - Literal { ref chars, casei } => { - Box::new((chars.clone(), casei) - .shrink() - .filter(|&(ref chars, _)| chars.len() > 0) - .map(|(chars, casei)| { - Literal { chars: chars, casei: casei } - })) - } - Class(ref cls) => Box::new(cls.shrink().map(Class)), - Group { ref e, ref i, ref name } => { - let (i, name) = (i.clone(), name.clone()); - Box::new(e.clone().shrink() - .chain(e.clone().shrink() - .map(move |e| Group { - e: Box::new(e), - i: i.clone(), - name: name.clone(), - }))) - } - Repeat { ref e, ref r, greedy } => { - Box::new((*e.clone(), r.clone()) - .shrink() - .filter(|&(ref e, _)| e.can_repeat()) - .map(move |(e, r)| Repeat { - e: Box::new(e), - r: r, - greedy: greedy, - })) - } - // Concat(ref es) if es.len() <= 2 => nada(), - Concat(ref es) => { - Box::new(es.clone() - .shrink() - .filter(|es| es.len() > 0) - .map(|mut es| if es.len() == 1 { - es.pop().unwrap() - } else { - Concat(es) - })) - } - // Alternate(ref es) if es.len() <= 2 => nada(), - Alternate(ref es) => { - Box::new(es.clone() - .shrink() - .filter(|es| es.len() > 0) - .map(|mut es| if es.len() == 1 { - es.pop().unwrap() - } else { - Alternate(es) - })) - } - }; - Box::new(es.map(|e| fix_capture_indices(e).simplify())) - } -} - -enum ExprType { - NoSequences, // disallow concat/alternate - Anything, -} - -fn gen_expr<G: Gen>(g: &mut G, depth: u32, ty: ExprType) -> Expr { - use Expr::*; - let ub = match (depth as usize >= g.size(), ty) { - (true, _) => 11, - (false, ExprType::NoSequences) => 13, - (false, ExprType::Anything) => 15, - }; - match g.gen_range(1, ub) { - 0 => Empty, - 1 => Literal { - chars: SmallAscii::arbitrary(g).0.chars().collect(), - casei: g.gen(), - }, - 2 => AnyChar, - 3 => AnyCharNoNL, - 4 => Class(CharClass::arbitrary(g)), - 5 => StartLine, - 6 => EndLine, - 7 => StartText, - 8 => EndText, - 9 => WordBoundary, - 10 => NotWordBoundary, - 11 => gen_group_expr(g, depth + 1), - 12 => Repeat { - e: Box::new(gen_repeatable_expr(g, depth + 1)), - r: Repeater::arbitrary(g), - greedy: bool::arbitrary(g), - }, - 13 => { - let size = { let s = g.size(); g.gen_range(2, s) }; - Concat((0..size) - .map(|_| { - gen_expr(g, depth + 1, ExprType::NoSequences) - }) - .collect()) - } - 14 => { - let size = { let s = g.size(); g.gen_range(2, s) }; - Alternate((0..size) - .map(|_| { - gen_expr(g, depth + 1, ExprType::NoSequences) - }) - .collect()) - } - _ => unreachable!() - } -} - -fn gen_repeatable_expr<G: Gen>(g: &mut G, depth: u32) -> Expr { - use Expr::*; - match g.gen_range(1, 6) { - 0 => Empty, - 1 => Literal { - chars: vec![Arbitrary::arbitrary(g)], - casei: g.gen(), - }, - 2 => AnyChar, - 3 => AnyCharNoNL, - 4 => Class(CharClass::arbitrary(g)), - 5 => gen_group_expr(g, depth + 1), - _ => unreachable!(), - } -} - -fn gen_group_expr<G: Gen>(g: &mut G, depth: u32) -> Expr { - let (i, name) = if g.gen() { - (None, None) - } else { - (Some(0), if g.gen() { - Some(SmallAscii::arbitrary(g).0) - } else { - None - }) - }; - Expr::Group { - e: Box::new(gen_expr(g, depth + 1, ExprType::Anything)), - i: i, - name: name, - } -} - -fn fix_capture_indices(e: Expr) -> Expr { - fn bx(e: Expr) -> Box<Expr> { Box::new(e) } - fn fix(e: Expr, capi: &mut usize, names: &mut Vec<String>) -> Expr { - use Expr::*; - match e { - Group { e, i: Some(_), mut name } => { - *capi += 1; - let i = *capi; - let mut dupe_name = false; - if let Some(ref n1) = name { - if names.iter().any(|n2| n1 == n2) { - dupe_name = true; - } else { - names.push(n1.clone()); - } - } - if dupe_name { name = None; } - Group { e: bx(fix(*e, capi, names)), i: Some(i), name: name } - } - Group { e, i, name } => { - Group { e: bx(fix(*e, capi, names)), i: i, name: name } - } - Repeat { e, r, greedy } => { - Repeat { e: bx(fix(*e, capi, names)), r: r, greedy: greedy } - } - Concat(es) => - Concat(es.into_iter().map(|e| fix(e, capi, names)).collect()), - Alternate(es) => - Alternate(es.into_iter().map(|e| fix(e, capi, names)).collect()), - e => e, - } - } - fix(e, &mut 0, &mut vec![]) -} - -impl Arbitrary for Repeater { - fn arbitrary<G: Gen>(g: &mut G) -> Repeater { - use Repeater::*; - match g.gen_range(0, 4) { - 0 => ZeroOrOne, - 1 => ZeroOrMore, - 2 => OneOrMore, - 3 => { - use std::cmp::{max, min}; - let n1 = Arbitrary::arbitrary(g); - let n2 = Arbitrary::arbitrary(g); - Range { - min: min(n1, n2), - max: if g.gen() { None } else { Some(max(n1, n2)) }, - } - }, - _ => unreachable!(), - } - } - - fn shrink(&self) -> Box<Iterator<Item=Repeater>> { - use Repeater::*; - match *self { - ZeroOrOne | ZeroOrMore | OneOrMore => Box::new(None.into_iter()), - Range { min, max } => { - Box::new((min, max) - .shrink() - .map(|(min, max)| Range { min: min, max: max })) - } - } - } -} - -impl Arbitrary for CharClass { - fn arbitrary<G: Gen>(g: &mut G) -> CharClass { - let mut ranges: Vec<ClassRange> = Arbitrary::arbitrary(g); - if ranges.is_empty() { - ranges.push(Arbitrary::arbitrary(g)); - } - let cls = CharClass { ranges: ranges }.canonicalize(); - if g.gen() { cls.case_fold() } else { cls } - } - - fn shrink(&self) -> Box<Iterator<Item=CharClass>> { - Box::new(self.ranges.clone() - .shrink() - .filter(|ranges| ranges.len() > 0) - .map(|ranges| CharClass { ranges: ranges }.canonicalize())) - } -} - -impl Arbitrary for ClassRange { - fn arbitrary<G: Gen>(g: &mut G) -> ClassRange { - use std::char::from_u32; - ClassRange::new( - from_u32(g.gen_range(97, 123)).unwrap(), - from_u32(g.gen_range(97, 123)).unwrap(), - ) - } - - fn shrink(&self) -> Box<Iterator<Item=ClassRange>> { - Box::new((self.start, self.end) - .shrink().map(|(s, e)| ClassRange::new(s, e))) - } -} - -#[test] -fn display_regex_roundtrips() { - // Given an AST, if we print it as a regex and then re-parse it, do we - // get back the same AST? - // A lot of this relies crucially on regex simplification. So this is - // testing `Expr::simplify` as much as it is testing the `Display` impl. - fn prop(e: Expr) -> bool { - e == Expr::parse(&e.to_string()).unwrap() - } - QuickCheck::new() - .tests(10_000) - .max_tests(20_000) - .gen(StdGen::new(::rand::thread_rng(), 50)) - .quickcheck(prop as fn(Expr) -> bool); -} diff --git a/deps/regex-syntax-0.3.0/Cargo.toml b/deps/regex-syntax-0.3.0/Cargo.toml new file mode 100644 index 000000000..a411105db --- /dev/null +++ b/deps/regex-syntax-0.3.0/Cargo.toml @@ -0,0 +1,13 @@ +[package] +name = "regex-syntax" +version = "0.3.0" +authors = ["The Rust Project Developers"] +license = "MIT/Apache-2.0" +repository = "https://github.com/rust-lang/regex" +documentation = "http://doc.rust-lang.org/regex/regex_syntax/index.html" +homepage = "https://github.com/rust-lang/regex" +description = "A regular expression parser." + +[dev-dependencies] +quickcheck = "0.2" +rand = "0.3" diff --git a/deps/regex-syntax-0.3.0/src/lib.rs b/deps/regex-syntax-0.3.0/src/lib.rs new file mode 100644 index 000000000..189523607 --- /dev/null +++ b/deps/regex-syntax-0.3.0/src/lib.rs @@ -0,0 +1,1844 @@ +// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +/*! +This crate provides a regular expression parser and an abstract syntax for +regular expressions. The abstract syntax is defined by the `Expr` type. The +concrete syntax is enumerated in the +[`regex`](../regex/index.html#syntax) +crate documentation. + +Note that since this crate is first and foremost an implementation detail for +the `regex` crate, it may experience more frequent breaking changes. It is +exposed as a separate crate so that others may use it to do analysis on regular +expressions or even build their own matching engine. + +# Example: parsing an expression + +Parsing a regular expression can be done with the `Expr::parse` function. + +```rust +use regex_syntax::Expr; + +assert_eq!(Expr::parse(r"ab|yz").unwrap(), Expr::Alternate(vec![ + Expr::Literal { chars: vec!['a', 'b'], casei: false }, + Expr::Literal { chars: vec!['y', 'z'], casei: false }, +])); +``` + +# Example: inspecting an error + +The parser in this crate provides very detailed error values. For example, +if an invalid character class range is given: + +```rust +use regex_syntax::{Expr, ErrorKind}; + +let err = Expr::parse(r"[z-a]").unwrap_err(); +assert_eq!(err.position(), 4); +assert_eq!(err.kind(), &ErrorKind::InvalidClassRange { + start: 'z', + end: 'a', +}); +``` + +Or unbalanced parentheses: + +```rust +use regex_syntax::{Expr, ErrorKind}; + +let err = Expr::parse(r"ab(cd").unwrap_err(); +assert_eq!(err.position(), 2); +assert_eq!(err.kind(), &ErrorKind::UnclosedParen); +``` +*/ + +#![deny(missing_docs)] + +#[cfg(test)] extern crate quickcheck; +#[cfg(test)] extern crate rand; + +mod parser; +mod unicode; + +use std::ascii; +use std::char; +use std::cmp::{Ordering, max, min}; +use std::fmt; +use std::iter::IntoIterator; +use std::ops::Deref; +use std::result; +use std::slice; +use std::u8; +use std::vec; + +use unicode::case_folding; + +use self::Expr::*; +use self::Repeater::*; + +use parser::{Flags, Parser}; + +/// A regular expression abstract syntax tree. +/// +/// An `Expr` represents the abstract syntax of a regular expression. +#[derive(Clone, Debug, PartialEq, Eq)] +pub enum Expr { + /// An empty regex (which never matches any text). + Empty, + /// A sequence of one or more literal characters to be matched. + Literal { + /// The characters. + chars: Vec<char>, + /// Whether to match case insensitively. + casei: bool, + }, + /// A sequence of one or more literal bytes to be matched. + LiteralBytes { + /// The bytes. + bytes: Vec<u8>, + /// Whether to match case insensitively. + /// + /// The interpretation of "case insensitive" in this context is + /// ambiguous since `bytes` can be arbitrary. However, a good heuristic + /// is to assume that the bytes are ASCII-compatible and do simple + /// ASCII case folding. + casei: bool, + }, + /// Match any character. + AnyChar, + /// Match any character, excluding new line (`0xA`). + AnyCharNoNL, + /// Match any byte. + AnyByte, + /// Match any byte, excluding new line (`0xA`). + AnyByteNoNL, + /// A character class. + Class(CharClass), + /// A character class with byte ranges only. + ClassBytes(ByteClass), + /// Match the start of a line or beginning of input. + StartLine, + /// Match the end of a line or end of input. + EndLine, + /// Match the beginning of input. + StartText, + /// Match the end of input. + EndText, + /// Match a word boundary (word character on one side and a non-word + /// character on the other). + WordBoundary, + /// Match a position that is not a word boundary (word or non-word + /// characters on both sides). + NotWordBoundary, + /// Match an ASCII word boundary. + WordBoundaryAscii, + /// Match a position that is not an ASCII word boundary. + NotWordBoundaryAscii, + /// A group, possibly non-capturing. + Group { + /// The expression inside the group. + e: Box<Expr>, + /// The capture index (starting at `1`) only for capturing groups. + i: Option<usize>, + /// The capture name, only for capturing named groups. + name: Option<String>, + }, + /// A repeat operator (`?`, `*`, `+` or `{m,n}`). + Repeat { + /// The expression to be repeated. Limited to literals, `.`, classes + /// or grouped expressions. + e: Box<Expr>, + /// The type of repeat operator used. + r: Repeater, + /// Whether the repeat is greedy (match the most) or not (match the + /// least). + greedy: bool, + }, + /// A concatenation of expressions. Must be matched one after the other. + /// + /// N.B. A concat expression can only appear at the top-level or + /// immediately inside a group expression. + Concat(Vec<Expr>), + /// An alternation of expressions. Only one must match. + /// + /// N.B. An alternate expression can only appear at the top-level or + /// immediately inside a group expression. + Alternate(Vec<Expr>), +} + +type CaptureIndex = Option<usize>; + +type CaptureName = Option<String>; + +/// The type of a repeat operator expression. +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum Repeater { + /// Match zero or one (`?`). + ZeroOrOne, + /// Match zero or more (`*`). + ZeroOrMore, + /// Match one or more (`+`). + OneOrMore, + /// Match for at least `min` and at most `max` (`{m,n}`). + /// + /// When `max` is `None`, there is no upper bound on the number of matches. + Range { + /// Lower bound on the number of matches. + min: u32, + /// Optional upper bound on the number of matches. + max: Option<u32>, + }, +} + +impl Repeater { + /// Returns true if and only if this repetition can match the empty string. + fn matches_empty(&self) -> bool { + use self::Repeater::*; + match *self { + ZeroOrOne => true, + ZeroOrMore => true, + OneOrMore => false, + Range { min, .. } => min == 0, + } + } +} + +/// A character class. +/// +/// A character class has a canonical format that the parser guarantees. Its +/// canonical format is defined by the following invariants: +/// +/// 1. Given any Unicode scalar value, it is matched by *at most* one character +/// range in a canonical character class. +/// 2. Every adjacent character range is separated by at least one Unicode +/// scalar value. +/// 3. Given any pair of character ranges `r1` and `r2`, if +/// `r1.end < r2.start`, then `r1` comes before `r2` in a canonical +/// character class. +/// +/// In sum, any `CharClass` produced by this crate's parser is a sorted +/// sequence of non-overlapping ranges. This makes it possible to test whether +/// a character is matched by a class with a binary search. +/// +/// If the case insensitive flag was set when parsing a character class, then +/// simple case folding is done automatically. For example, `(?i)[a-c]` is +/// automatically translated to `[a-cA-C]`. +#[derive(Clone, Debug, PartialEq, Eq)] +pub struct CharClass { + ranges: Vec<ClassRange>, +} + +/// A single inclusive range in a character class. +/// +/// Since range boundaries are defined by Unicode scalar values, the boundaries +/// can never be in the open interval `(0xD7FF, 0xE000)`. However, a range may +/// *cover* codepoints that are not scalar values. +/// +/// Note that this has a few convenient impls on `PartialEq` and `PartialOrd` +/// for testing whether a character is contained inside a given range. +#[derive(Clone, Copy, Debug, PartialEq, PartialOrd, Eq, Ord)] +pub struct ClassRange { + /// The start character of the range. + /// + /// This must be less than or equal to `end`. + pub start: char, + + /// The end character of the range. + /// + /// This must be greater than or equal to `end`. + pub end: char, +} + +/// A byte class for byte ranges only. +/// +/// A byte class has a canonical format that the parser guarantees. Its +/// canonical format is defined by the following invariants: +/// +/// 1. Given any byte, it is matched by *at most* one byte range in a canonical +/// character class. +/// 2. Every adjacent byte range is separated by at least one byte. +/// 3. Given any pair of byte ranges `r1` and `r2`, if +/// `r1.end < r2.start`, then `r1` comes before `r2` in a canonical +/// character class. +/// +/// In sum, any `ByteClass` produced by this crate's parser is a sorted +/// sequence of non-overlapping ranges. This makes it possible to test whether +/// a byte is matched by a class with a binary search. +/// +/// If the case insensitive flag was set when parsing a character class, +/// then simple ASCII-only case folding is done automatically. For example, +/// `(?i)[a-c]` is automatically translated to `[a-cA-C]`. +#[derive(Clone, Debug, PartialEq, Eq)] +pub struct ByteClass { + ranges: Vec<ByteRange>, +} + +/// A single inclusive range in a byte class. +/// +/// Note that this has a few convenient impls on `PartialEq` and `PartialOrd` +/// for testing whether a byte is contained inside a given range. +#[derive(Clone, Copy, Debug, PartialEq, PartialOrd, Eq, Ord)] +pub struct ByteRange { + /// The start byte of the range. + /// + /// This must be less than or equal to `end`. + pub start: u8, + + /// The end byte of the range. + /// + /// This must be greater than or equal to `end`. + pub end: u8, +} + +/// A builder for configuring regular expression parsing. +/// +/// This allows setting the default values of flags and other options, such +/// as the maximum nesting depth. +#[derive(Clone, Debug)] +pub struct ExprBuilder { + flags: Flags, + nest_limit: usize, +} + +impl ExprBuilder { + /// Create a new builder for configuring expression parsing. + /// + /// Note that all flags are disabled by default. + pub fn new() -> ExprBuilder { + ExprBuilder { + flags: Flags::default(), + nest_limit: 200, + } + } + + /// Set the default value for the case insensitive (`i`) flag. + pub fn case_insensitive(mut self, yes: bool) -> ExprBuilder { + self.flags.casei = yes; + self + } + + /// Set the default value for the multi-line matching (`m`) flag. + pub fn multi_line(mut self, yes: bool) -> ExprBuilder { + self.flags.multi = yes; + self + } + + /// Set the default value for the any character (`s`) flag. + pub fn dot_matches_new_line(mut self, yes: bool) -> ExprBuilder { + self.flags.dotnl = yes; + self + } + + /// Set the default value for the greedy swap (`U`) flag. + pub fn swap_greed(mut self, yes: bool) -> ExprBuilder { + self.flags.swap_greed = yes; + self + } + + /// Set the default value for the ignore whitespace (`x`) flag. + pub fn ignore_whitespace(mut self, yes: bool) -> ExprBuilder { + self.flags.ignore_space = yes; + self + } + + /// Set the default value for the Unicode (`u`) flag. + /// + /// If `yes` is false, then `allow_bytes` is set to true. + pub fn unicode(mut self, yes: bool) -> ExprBuilder { + self.flags.unicode = yes; + if !yes { + self.allow_bytes(true) + } else { + self + } + } + + /// Whether the Unicode flag can be used or not. By default, the flag is + /// enabled but it cannot be toggled. + /// + /// When disabled, use of the `u` flag will cause the parser to return an + /// error. + pub fn allow_bytes(mut self, yes: bool) -> ExprBuilder { + self.flags.allow_bytes = yes; + self + } + + /// Set the nesting limit for regular expression parsing. + /// + /// Regular expressions that nest more than this limit will result in a + /// `StackExhausted` error. + pub fn nest_limit(mut self, limit: usize) -> ExprBuilder { + self.nest_limit = limit; + self + } + + /// Parse a string as a regular expression using the current configuraiton. + pub fn parse(self, s: &str) -> Result<Expr> { + Parser::parse(s, self.flags).and_then(|e| e.simplify(self.nest_limit)) + } +} + +impl Expr { + /// Parses a string in a regular expression syntax tree. + /// + /// This is a convenience method for parsing an expression using the + /// default configuration. To tweak parsing options (such as which flags + /// are enabled by default), use the `ExprBuilder` type. + pub fn parse(s: &str) -> Result<Expr> { + ExprBuilder::new().parse(s) + } + + /// Returns true iff the expression can be repeated by a quantifier. + fn can_repeat(&self) -> bool { + match *self { + Literal{..} | LiteralBytes{..} + | AnyChar | AnyCharNoNL | AnyByte | AnyByteNoNL + | Class(_) | ClassBytes(_) + | StartLine | EndLine | StartText | EndText + | WordBoundary | NotWordBoundary + | WordBoundaryAscii | NotWordBoundaryAscii + | Group{..} + => true, + _ => false, + } + } + + fn simplify(self, nest_limit: usize) -> Result<Expr> { + fn combine_literals(es: &mut Vec<Expr>, e: Expr) { + match (es.pop(), e) { + (None, e) => es.push(e), + (Some(Literal { chars: mut chars1, casei: casei1 }), + Literal { chars: chars2, casei: casei2 }) => { + if casei1 == casei2 { + chars1.extend(chars2); + es.push(Literal { chars: chars1, casei: casei1 }); + } else { + es.push(Literal { chars: chars1, casei: casei1 }); + es.push(Literal { chars: chars2, casei: casei2 }); + } + } + (Some(LiteralBytes { bytes: mut bytes1, casei: casei1 }), + LiteralBytes { bytes: bytes2, casei: casei2 }) => { + if casei1 == casei2 { + bytes1.extend(bytes2); + es.push(LiteralBytes { bytes: bytes1, casei: casei1 }); + } else { + es.push(LiteralBytes { bytes: bytes1, casei: casei1 }); + es.push(LiteralBytes { bytes: bytes2, casei: casei2 }); + } + } + (Some(e1), e2) => { + es.push(e1); + es.push(e2); + } + } + } + fn simp(expr: Expr, recurse: usize, limit: usize) -> Result<Expr> { + if recurse > limit { + return Err(Error { + pos: 0, + surround: "".to_owned(), + kind: ErrorKind::StackExhausted, + }); + } + let simplify = |e| simp(e, recurse + 1, limit); + Ok(match expr { + Repeat { e, r, greedy } => Repeat { + e: Box::new(try!(simplify(*e))), + r: r, + greedy: greedy, + }, + Group { e, i, name } => { + let e = try!(simplify(*e)); + if i.is_none() && name.is_none() && e.can_repeat() { + e + } else { + Group { e: Box::new(e), i: i, name: name } + } + } + Concat(es) => { + let mut new_es = Vec::with_capacity(es.len()); + for e in es { + combine_literals(&mut new_es, try!(simplify(e))); + } + if new_es.len() == 1 { + new_es.pop().unwrap() + } else { + Concat(new_es) + } + } + Alternate(es) => { + let mut new_es = Vec::with_capacity(es.len()); + for e in es { + new_es.push(try!(simplify(e))); + } + Alternate(new_es) + } + e => e, + }) + } + simp(self, 0, nest_limit) + } + + /// Returns true if and only if the expression is required to match from + /// the beginning of text. + pub fn is_anchored_start(&self) -> bool { + match *self { + Repeat { ref e, r, .. } => { + !r.matches_empty() && e.is_anchored_start() + } + Group { ref e, .. } => e.is_anchored_start(), + Concat(ref es) => es[0].is_anchored_start(), + Alternate(ref es) => es.iter().all(|e| e.is_anchored_start()), + StartText => true, + _ => false, + } + } + + /// Returns true if and only if the expression is required to match at the + /// end of the text. + pub fn is_anchored_end(&self) -> bool { + match *self { + Repeat { ref e, r, .. } => { + !r.matches_empty() && e.is_anchored_end() + } + Group { ref e, .. } => e.is_anchored_end(), + Concat(ref es) => es[es.len() - 1].is_anchored_end(), + Alternate(ref es) => es.iter().all(|e| e.is_anchored_end()), + EndText => true, + _ => false, + } + } + + /// Returns true if and only if the expression contains sub-expressions + /// that can match arbitrary bytes. + pub fn has_bytes(&self) -> bool { + match *self { + Repeat { ref e, .. } => e.has_bytes(), + Group { ref e, .. } => e.has_bytes(), + Concat(ref es) => es.iter().any(|e| e.has_bytes()), + Alternate(ref es) => es.iter().any(|e| e.has_bytes()), + LiteralBytes{..} => true, + AnyByte | AnyByteNoNL => true, + ClassBytes(_) => true, + WordBoundaryAscii | NotWordBoundaryAscii => true, + _ => false, + } + } +} + +impl Deref for CharClass { + type Target = Vec<ClassRange>; + fn deref(&self) -> &Vec<ClassRange> { &self.ranges } +} + +impl IntoIterator for CharClass { + type Item = ClassRange; + type IntoIter = vec::IntoIter<ClassRange>; + fn into_iter(self) -> vec::IntoIter<ClassRange> { self.ranges.into_iter() } +} + +impl<'a> IntoIterator for &'a CharClass { + type Item = &'a ClassRange; + type IntoIter = slice::Iter<'a, ClassRange>; + fn into_iter(self) -> slice::Iter<'a, ClassRange> { self.iter() } +} + +impl CharClass { + /// Create a new class from an existing set of ranges. + pub fn new(ranges: Vec<ClassRange>) -> CharClass { + CharClass { ranges: ranges } + } + + /// Create an empty class. + fn empty() -> CharClass { + CharClass::new(Vec::new()) + } + + /// Returns true if `c` is matched by this character class. + pub fn matches(&self, c: char) -> bool { + self.binary_search_by(|range| c.partial_cmp(range).unwrap()).is_ok() + } + + /// Create a new empty class from this one. + fn to_empty(&self) -> CharClass { + CharClass { ranges: Vec::with_capacity(self.len()) } + } + + /// Create a byte class from this character class. + /// + /// Codepoints above 0xFF are removed. + fn to_byte_class(self) -> ByteClass { + ByteClass::new( + self.ranges.into_iter() + .filter_map(|r| r.to_byte_range()) + .collect()).canonicalize() + } + + /// Merge two classes and canonicalize them. + #[cfg(test)] + fn merge(mut self, other: CharClass) -> CharClass { + self.ranges.extend(other); + self.canonicalize() + } + + /// Canonicalze any sequence of ranges. + /// + /// This is responsible for enforcing the canonical format invariants + /// as described on the docs for the `CharClass` type. + fn canonicalize(mut self) -> CharClass { + // TODO: Save some cycles here by checking if already canonicalized. + self.ranges.sort(); + let mut ordered = self.to_empty(); // TODO: Do this in place? + for candidate in self { + // If the candidate overlaps with an existing range, then it must + // be the most recent range added because we process the candidates + // in order. + if let Some(or) = ordered.ranges.last_mut() { + if or.overlapping(candidate) { + *or = or.merge(candidate); + continue; + } + } + ordered.ranges.push(candidate); + } + ordered + } + + /// Negates the character class. + /// + /// For all `c` where `c` is a Unicode scalar value, `c` matches `self` + /// if and only if `c` does not match `self.negate()`. + pub fn negate(mut self) -> CharClass { + fn range(s: char, e: char) -> ClassRange { ClassRange::new(s, e) } + + if self.is_empty() { + // Inverting an empty range yields all of Unicode. + return CharClass { + ranges: vec![ClassRange { start: '\x00', end: '\u{10ffff}' }], + }; + } + self = self.canonicalize(); + let mut inv = self.to_empty(); + if self[0].start > '\x00' { + inv.ranges.push(range('\x00', dec_char(self[0].start))); + } + for win in self.windows(2) { + inv.ranges.push(range(inc_char(win[0].end), + dec_char(win[1].start))); + } + if self[self.len() - 1].end < char::MAX { + inv.ranges.push(range(inc_char(self[self.len() - 1].end), + char::MAX)); + } + inv + } + + /// Apply case folding to this character class. + /// + /// N.B. Applying case folding to a negated character class probably + /// won't produce the expected result. e.g., `(?i)[^x]` really should + /// match any character sans `x` and `X`, but if `[^x]` is negated + /// before being case folded, you'll end up matching any character. + pub fn case_fold(self) -> CharClass { + let mut folded = self.to_empty(); + for r in self { + // Applying case folding to a range is expensive because *every* + // character needs to be examined. Thus, we avoid that drudgery + // if no character in the current range is in our case folding + // table. + if r.needs_case_folding() { + folded.ranges.extend(r.case_fold()); + } + folded.ranges.push(r); + } + folded.canonicalize() + } +} + +impl ClassRange { + /// Create a new class range. + /// + /// If `end < start`, then the two values are swapped so that + /// the invariant `start <= end` is preserved. + fn new(start: char, end: char) -> ClassRange { + if start <= end { + ClassRange { start: start, end: end } + } else { + ClassRange { start: end, end: start } + } + } + + /// Translate this to a byte class. + /// + /// If the start codepoint exceeds 0xFF, then this returns `None`. + /// + /// If the end codepoint exceeds 0xFF, then it is set to 0xFF. + fn to_byte_range(self) -> Option<ByteRange> { + if self.start > '\u{FF}' { + None + } else { + let s = self.start as u8; + let e = min('\u{FF}', self.end) as u8; + Some(ByteRange::new(s, e)) + } + } + + /// Create a range of one character. + fn one(c: char) -> ClassRange { + ClassRange { start: c, end: c } + } + + /// Returns true if and only if the two ranges are overlapping. Note that + /// since ranges are inclusive, `a-c` and `d-f` are overlapping! + fn overlapping(self, other: ClassRange) -> bool { + max(self.start, other.start) <= inc_char(min(self.end, other.end)) + } + + /// Creates a new range representing the union of `self` and `other. + fn merge(self, other: ClassRange) -> ClassRange { + ClassRange { + start: min(self.start, other.start), + end: max(self.end, other.end), + } + } + + /// Returns true if and only if this range contains a character that is + /// in the case folding table. + fn needs_case_folding(self) -> bool { + case_folding::C_plus_S_both_table + .binary_search_by(|&(c, _)| self.partial_cmp(&c).unwrap()).is_ok() + } + + /// Apply case folding to this range. + /// + /// Since case folding might add characters such that the range is no + /// longer contiguous, this returns multiple class ranges. They are in + /// canonical order. + fn case_fold(self) -> Vec<ClassRange> { + let table = &case_folding::C_plus_S_both_table; + let (s, e) = (self.start as u32, self.end as u32 + 1); + let mut start = self.start; + let mut end = start; + let mut next_case_fold = '\x00'; + let mut ranges = Vec::with_capacity(10); + for mut c in (s..e).filter_map(char::from_u32) { + if c >= next_case_fold { + c = match simple_case_fold_both_result(c) { + Ok(i) => { + for &(c1, c2) in &table[i..] { + if c1 != c { + break; + } + if c2 != inc_char(end) { + ranges.push(ClassRange::new(start, end)); + start = c2; + } + end = c2; + } + continue; + } + Err(i) => { + if i < table.len() { + next_case_fold = table[i].0; + } else { + next_case_fold = '\u{10FFFF}'; + } + c + } + }; + } + // The fast path. We know this character doesn't have an entry + // in the case folding table. + if c != inc_char(end) { + ranges.push(ClassRange::new(start, end)); + start = c; + } + end = c; + } + ranges.push(ClassRange::new(start, end)); + ranges + } +} + +impl PartialEq<char> for ClassRange { + #[inline] + fn eq(&self, other: &char) -> bool { + self.start <= *other && *other <= self.end + } +} + +impl PartialEq<ClassRange> for char { + #[inline] + fn eq(&self, other: &ClassRange) -> bool { + other.eq(self) + } +} + +impl PartialOrd<char> for ClassRange { + #[inline] + fn partial_cmp(&self, other: &char) -> Option<Ordering> { + Some(if self == other { + Ordering::Equal + } else if *other > self.end { + Ordering::Greater + } else { + Ordering::Less + }) + } +} + +impl PartialOrd<ClassRange> for char { + #[inline] + fn partial_cmp(&self, other: &ClassRange) -> Option<Ordering> { + other.partial_cmp(self).map(|o| o.reverse()) + } +} + +impl ByteClass { + /// Create a new class from an existing set of ranges. + pub fn new(ranges: Vec<ByteRange>) -> ByteClass { + ByteClass { ranges: ranges } + } + + /// Returns true if `b` is matched by this byte class. + pub fn matches(&self, b: u8) -> bool { + self.binary_search_by(|range| b.partial_cmp(range).unwrap()).is_ok() + } + + /// Create a new empty class from this one. + fn to_empty(&self) -> ByteClass { + ByteClass { ranges: Vec::with_capacity(self.len()) } + } + + /// Canonicalze any sequence of ranges. + /// + /// This is responsible for enforcing the canonical format invariants + /// as described on the docs for the `ByteClass` type. + fn canonicalize(mut self) -> ByteClass { + // TODO: Save some cycles here by checking if already canonicalized. + self.ranges.sort(); + let mut ordered = self.to_empty(); // TODO: Do this in place? + for candidate in self { + // If the candidate overlaps with an existing range, then it must + // be the most recent range added because we process the candidates + // in order. + if let Some(or) = ordered.ranges.last_mut() { + if or.overlapping(candidate) { + *or = or.merge(candidate); + continue; + } + } + ordered.ranges.push(candidate); + } + ordered + } + + /// Negates the byte class. + /// + /// For all `b` where `b` is a byte, `b` matches `self` if and only if `b` + /// does not match `self.negate()`. + pub fn negate(mut self) -> ByteClass { + fn range(s: u8, e: u8) -> ByteRange { ByteRange::new(s, e) } + + if self.is_empty() { + // Inverting an empty range yields all bytes. + return ByteClass { + ranges: vec![ByteRange { start: b'\x00', end: b'\xff' }], + }; + } + self = self.canonicalize(); + let mut inv = self.to_empty(); + if self[0].start > b'\x00' { + inv.ranges.push(range(b'\x00', self[0].start.saturating_sub(1))); + } + for win in self.windows(2) { + inv.ranges.push(range(win[0].end.saturating_add(1), + win[1].start.saturating_sub(1))); + } + if self[self.len() - 1].end < u8::MAX { + inv.ranges.push(range(self[self.len() - 1].end.saturating_add(1), + u8::MAX)); + } + inv + } + + /// Apply case folding to this byte class. + /// + /// This assumes that the bytes in the ranges are ASCII compatible. + /// + /// N.B. Applying case folding to a negated character class probably + /// won't produce the expected result. e.g., `(?i)[^x]` really should + /// match any character sans `x` and `X`, but if `[^x]` is negated + /// before being case folded, you'll end up matching any character. + pub fn case_fold(self) -> ByteClass { + let mut folded = self.to_empty(); + for r in self { + folded.ranges.extend(r.case_fold()); + } + folded.canonicalize() + } +} + +impl ByteRange { + /// Create a new class range. + /// + /// If `end < start`, then the two values are swapped so that + /// the invariant `start <= end` is preserved. + fn new(start: u8, end: u8) -> ByteRange { + if start <= end { + ByteRange { start: start, end: end } + } else { + ByteRange { start: end, end: start } + } + } + + /// Returns true if and only if the two ranges are overlapping. Note that + /// since ranges are inclusive, `a-c` and `d-f` are overlapping! + fn overlapping(self, other: ByteRange) -> bool { + max(self.start, other.start) + <= min(self.end, other.end).saturating_add(1) + } + + /// Returns true if and only if the intersection of self and other is non + /// empty. + fn is_intersect_empty(self, other: ByteRange) -> bool { + max(self.start, other.start) > min(self.end, other.end) + } + + /// Creates a new range representing the union of `self` and `other. + fn merge(self, other: ByteRange) -> ByteRange { + ByteRange { + start: min(self.start, other.start), + end: max(self.end, other.end), + } + } + + /// Apply case folding to this range. + /// + /// Since case folding might add bytes such that the range is no + /// longer contiguous, this returns multiple byte ranges. + /// + /// This assumes that the bytes in this range are ASCII compatible. + fn case_fold(self) -> Vec<ByteRange> { + // So much easier than Unicode case folding! + let mut ranges = vec![self]; + if !ByteRange::new(b'a', b'z').is_intersect_empty(self) { + let lower = max(self.start, b'a'); + let upper = min(self.end, b'z'); + ranges.push(ByteRange::new(lower - 32, upper - 32)); + } + if !ByteRange::new(b'A', b'Z').is_intersect_empty(self) { + let lower = max(self.start, b'A'); + let upper = min(self.end, b'Z'); + ranges.push(ByteRange::new(lower + 32, upper + 32)); + } + ranges + } +} + +impl Deref for ByteClass { + type Target = Vec<ByteRange>; + fn deref(&self) -> &Vec<ByteRange> { &self.ranges } +} + +impl IntoIterator for ByteClass { + type Item = ByteRange; + type IntoIter = vec::IntoIter<ByteRange>; + fn into_iter(self) -> vec::IntoIter<ByteRange> { self.ranges.into_iter() } +} + +impl<'a> IntoIterator for &'a ByteClass { + type Item = &'a ByteRange; + type IntoIter = slice::Iter<'a, ByteRange>; + fn into_iter(self) -> slice::Iter<'a, ByteRange> { self.iter() } +} + +impl PartialEq<u8> for ByteRange { + #[inline] + fn eq(&self, other: &u8) -> bool { + self.start <= *other && *other <= self.end + } +} + +impl PartialEq<ByteRange> for u8 { + #[inline] + fn eq(&self, other: &ByteRange) -> bool { + other.eq(self) + } +} + +impl PartialOrd<u8> for ByteRange { + #[inline] + fn partial_cmp(&self, other: &u8) -> Option<Ordering> { + Some(if self == other { + Ordering::Equal + } else if *other > self.end { + Ordering::Greater + } else { + Ordering::Less + }) + } +} + +impl PartialOrd<ByteRange> for u8 { + #[inline] + fn partial_cmp(&self, other: &ByteRange) -> Option<Ordering> { + other.partial_cmp(self).map(|o| o.reverse()) + } +} + +/// This implementation of `Display` will write a regular expression from the +/// syntax tree. It does not write the original string parsed. +impl fmt::Display for Expr { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + match *self { + Empty => write!(f, ""), + Literal { ref chars, casei } => { + if casei { try!(write!(f, "(?i:")); } + for &c in chars { + try!(write!(f, "{}", quote_char(c))); + } + if casei { try!(write!(f, ")")); } + Ok(()) + } + LiteralBytes { ref bytes, casei } => { + if casei { + try!(write!(f, "(?i-u:")); + } else { + try!(write!(f, "(?-u:")); + } + for &b in bytes { + try!(write!(f, "{}", quote_byte(b))); + } + try!(write!(f, ")")); + Ok(()) + } + AnyChar => write!(f, "(?s:.)"), + AnyCharNoNL => write!(f, "."), + AnyByte => write!(f, "(?s-u:.)"), + AnyByteNoNL => write!(f, "(?-u:.)"), + Class(ref cls) => write!(f, "{}", cls), + ClassBytes(ref cls) => write!(f, "{}", cls), + StartLine => write!(f, "(?m:^)"), + EndLine => write!(f, "(?m:$)"), + StartText => write!(f, r"^"), + EndText => write!(f, r"$"), + WordBoundary => write!(f, r"\b"), + NotWordBoundary => write!(f, r"\B"), + WordBoundaryAscii => write!(f, r"(?-u:\b)"), + NotWordBoundaryAscii => write!(f, r"(?-u:\B)"), + Group { ref e, i: None, name: None } => write!(f, "(?:{})", e), + Group { ref e, name: None, .. } => write!(f, "({})", e), + Group { ref e, name: Some(ref n), .. } => { + write!(f, "(?P<{}>{})", n, e) + } + Repeat { ref e, r, greedy } => { + match &**e { + &Literal { ref chars, .. } if chars.len() > 1 => { + try!(write!(f, "(?:{}){}", e, r)) + } + _ => try!(write!(f, "{}{}", e, r)), + } + if !greedy { try!(write!(f, "?")); } + Ok(()) + } + Concat(ref es) => { + for e in es { + try!(write!(f, "{}", e)); + } + Ok(()) + } + Alternate(ref es) => { + for (i, e) in es.iter().enumerate() { + if i > 0 { try!(write!(f, "|")); } + try!(write!(f, "{}", e)); + } + Ok(()) + } + } + } +} + +impl fmt::Display for Repeater { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + match *self { + ZeroOrOne => write!(f, "?"), + ZeroOrMore => write!(f, "*"), + OneOrMore => write!(f, "+"), + Range { min: s, max: None } => write!(f, "{{{},}}", s), + Range { min: s, max: Some(e) } if s == e => write!(f, "{{{}}}", s), + Range { min: s, max: Some(e) } => write!(f, "{{{}, {}}}", s, e), + } + } +} + +impl fmt::Display for CharClass { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + try!(write!(f, "[")); + for range in self.iter() { + try!(write!(f, "{}", range)); + } + try!(write!(f, "]")); + Ok(()) + } +} + +impl fmt::Display for ClassRange { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + write!(f, "{}-{}", quote_char(self.start), quote_char(self.end)) + } +} + +impl fmt::Display for ByteClass { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + try!(write!(f, "(?-u:[")); + for range in self.iter() { + try!(write!(f, "{}", range)); + } + try!(write!(f, "])")); + Ok(()) + } +} + +impl fmt::Display for ByteRange { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + write!(f, "{}-{}", quote_byte(self.start), quote_byte(self.end)) + } +} + +/// An alias for computations that can return a `Error`. +pub type Result<T> = ::std::result::Result<T, Error>; + +/// A parse error. +/// +/// This includes details about the specific type of error and a rough +/// approximation of where it occurred. +#[derive(Clone, Debug, PartialEq)] +pub struct Error { + pos: usize, + surround: String, + kind: ErrorKind, +} + +/// The specific type of parse error that can occur. +#[derive(Clone, Debug, PartialEq)] +pub enum ErrorKind { + /// A negation symbol is used twice in flag settings. + /// e.g., `(?-i-s)`. + DoubleFlagNegation, + /// The same capture name was used more than once. + /// e.g., `(?P<a>.)(?P<a>.)`. + DuplicateCaptureName(String), + /// An alternate is empty. e.g., `(|a)`. + EmptyAlternate, + /// A capture group name is empty. e.g., `(?P<>a)`. + EmptyCaptureName, + /// A negation symbol was not proceded by any flags. e.g., `(?i-)`. + EmptyFlagNegation, + /// A group is empty. e.g., `()`. + EmptyGroup, + /// An invalid number was used in a counted repetition. e.g., `a{b}`. + InvalidBase10(String), + /// An invalid hexadecimal number was used in an escape sequence. + /// e.g., `\xAG`. + InvalidBase16(String), + /// An invalid capture name was used. e.g., `(?P<0a>b)`. + InvalidCaptureName(String), + /// An invalid class range was givien. Specifically, when the start of the + /// range is greater than the end. e.g., `[z-a]`. + InvalidClassRange { + /// The first character specified in the range. + start: char, + /// The second character specified in the range. + end: char, + }, + /// An escape sequence was used in a character class where it is not + /// allowed. e.g., `[a-\pN]` or `[\A]`. + InvalidClassEscape(Expr), + /// An invalid counted repetition min/max was given. e.g., `a{2,1}`. + InvalidRepeatRange { + /// The first number specified in the repetition. + min: u32, + /// The second number specified in the repetition. + max: u32, + }, + /// An invalid Unicode scalar value was used in a long hexadecimal + /// sequence. e.g., `\x{D800}`. + InvalidScalarValue(u32), + /// An empty counted repetition operator. e.g., `a{}`. + MissingBase10, + /// A repetition operator was not applied to an expression. e.g., `*`. + RepeaterExpectsExpr, + /// A repetition operator was applied to an expression that cannot be + /// repeated. e.g., `a+*` or `a|*`. + RepeaterUnexpectedExpr(Expr), + /// A capture group name that is never closed. e.g., `(?P<a`. + UnclosedCaptureName(String), + /// An unclosed hexadecimal literal. e.g., `\x{a`. + UnclosedHex, + /// An unclosed parenthesis. e.g., `(a`. + UnclosedParen, + /// An unclosed counted repetition operator. e.g., `a{2`. + UnclosedRepeat, + /// An unclosed named Unicode class. e.g., `\p{Yi`. + UnclosedUnicodeName, + /// Saw end of regex before class was closed. e.g., `[a`. + UnexpectedClassEof, + /// Saw end of regex before escape sequence was closed. e.g., `\`. + UnexpectedEscapeEof, + /// Saw end of regex before flags were closed. e.g., `(?i`. + UnexpectedFlagEof, + /// Saw end of regex before two hexadecimal digits were seen. e.g., `\xA`. + UnexpectedTwoDigitHexEof, + /// Unopened parenthesis. e.g., `)`. + UnopenedParen, + /// Unrecognized escape sequence. e.g., `\q`. + UnrecognizedEscape(char), + /// Unrecognized flag. e.g., `(?a)`. + UnrecognizedFlag(char), + /// Unrecognized named Unicode class. e.g., `\p{Foo}`. + UnrecognizedUnicodeClass(String), + /// Indicates that the regex uses too much nesting. + /// + /// (N.B. This error exists because traversing the Expr is recursive and + /// an explicit heap allocated stack is not (yet?) used. Regardless, some + /// sort of limit must be applied to avoid unbounded memory growth. + StackExhausted, + /// A disallowed flag was found (e.g., `b`). + FlagNotAllowed(char), + /// A Unicode class was used when the bytes (`b`) flag was enabled. + UnicodeNotAllowed, + /// Hints that destructuring should not be exhaustive. + /// + /// This enum may grow additional variants, so this makes sure clients + /// don't count on exhaustive matching. (Otherwise, adding a new variant + /// could break existing code.) + #[doc(hidden)] + __Nonexhaustive, +} + +impl Error { + /// Returns an approximate *character* offset at which the error occurred. + /// + /// The character offset may be equal to the number of characters in the + /// string, in which case it should be interpreted as pointing to the end + /// of the regex. + pub fn position(&self) -> usize { + self.pos + } + + /// Returns the type of the regex parse error. + pub fn kind(&self) -> &ErrorKind { + &self.kind + } +} + +impl ErrorKind { + fn description(&self) -> &str { + use ErrorKind::*; + match *self { + DoubleFlagNegation => "double flag negation", + DuplicateCaptureName(_) => "duplicate capture name", + EmptyAlternate => "empty alternate", + EmptyCaptureName => "empty capture name", + EmptyFlagNegation => "flag negation without any flags", + EmptyGroup => "empty group (e.g., '()')", + InvalidBase10(_) => "invalid base 10 number", + InvalidBase16(_) => "invalid base 16 number", + InvalidCaptureName(_) => "invalid capture name", + InvalidClassRange{..} => "invalid character class range", + InvalidClassEscape(_) => "invalid escape sequence in class", + InvalidRepeatRange{..} => "invalid counted repetition range", + InvalidScalarValue(_) => "invalid Unicode scalar value", + MissingBase10 => "missing count in repetition operator", + RepeaterExpectsExpr => "repetition operator missing expression", + RepeaterUnexpectedExpr(_) => "expression cannot be repeated", + UnclosedCaptureName(_) => "unclosed capture group name", + UnclosedHex => "unclosed hexadecimal literal", + UnclosedParen => "unclosed parenthesis", + UnclosedRepeat => "unclosed counted repetition operator", + UnclosedUnicodeName => "unclosed Unicode class literal", + UnexpectedClassEof => "unexpected EOF in character class", + UnexpectedEscapeEof => "unexpected EOF in escape sequence", + UnexpectedFlagEof => "unexpected EOF in flags", + UnexpectedTwoDigitHexEof => "unexpected EOF in hex literal", + UnopenedParen => "unopened parenthesis", + UnrecognizedEscape(_) => "unrecognized escape sequence", + UnrecognizedFlag(_) => "unrecognized flag", + UnrecognizedUnicodeClass(_) => "unrecognized Unicode class name", + StackExhausted => "stack exhausted, too much nesting", + FlagNotAllowed(_) => "flag not allowed", + UnicodeNotAllowed => "Unicode features not allowed", + __Nonexhaustive => unreachable!(), + } + } +} + +impl ::std::error::Error for Error { + fn description(&self) -> &str { + self.kind.description() + } +} + +impl fmt::Display for Error { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + if let ErrorKind::StackExhausted = self.kind { + write!(f, "Error parsing regex: {}", self.kind) + } else { + write!( + f, "Error parsing regex near '{}' at character offset {}: {}", + self.surround, self.pos, self.kind) + } + } +} + +impl fmt::Display for ErrorKind { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + use ErrorKind::*; + match *self { + DoubleFlagNegation => + write!(f, "Only one negation symbol is allowed in flags."), + DuplicateCaptureName(ref s) => + write!(f, "Capture name '{}' is used more than once.", s), + EmptyAlternate => + write!(f, "Alternations cannot be empty."), + EmptyCaptureName => + write!(f, "Capture names cannot be empty."), + EmptyFlagNegation => + write!(f, "Flag negation requires setting at least one flag."), + EmptyGroup => + write!(f, "Empty regex groups (e.g., '()') are not allowed."), + InvalidBase10(ref s) => + write!(f, "Not a valid base 10 number: '{}'", s), + InvalidBase16(ref s) => + write!(f, "Not a valid base 16 number: '{}'", s), + InvalidCaptureName(ref s) => + write!(f, "Invalid capture name: '{}'. Capture names must \ + consist of [_a-zA-Z0-9] and are not allowed to \ + start with with a number.", s), + InvalidClassRange { start, end } => + write!(f, "Invalid character class range '{}-{}'. \ + Character class ranges must start with the smaller \ + character, but {} > {}", start, end, start, end), + InvalidClassEscape(ref e) => + write!(f, "Invalid escape sequence in character \ + class: '{}'.", e), + InvalidRepeatRange { min, max } => + write!(f, "Invalid counted repetition range: {{{}, {}}}. \ + Counted repetition ranges must start with the \ + minimum, but {} > {}", min, max, min, max), + InvalidScalarValue(c) => + write!(f, "Number does not correspond to a Unicode scalar \ + value: '{}'.", c), + MissingBase10 => + write!(f, "Missing maximum in counted reptition operator."), + RepeaterExpectsExpr => + write!(f, "Missing expression for reptition operator."), + RepeaterUnexpectedExpr(ref e) => + write!(f, "Invalid application of reptition operator to: \ + '{}'.", e), + UnclosedCaptureName(ref s) => + write!(f, "Capture name group for '{}' is not closed. \ + (Missing a '>'.)", s), + UnclosedHex => + write!(f, "Unclosed hexadecimal literal (missing a '}}')."), + UnclosedParen => + write!(f, "Unclosed parenthesis."), + UnclosedRepeat => + write!(f, "Unclosed counted repetition (missing a '}}')."), + UnclosedUnicodeName => + write!(f, "Unclosed Unicode literal (missing a '}}')."), + UnexpectedClassEof => + write!(f, "Character class was not closed before the end of \ + the regex (missing a ']')."), + UnexpectedEscapeEof => + write!(f, "Started an escape sequence that didn't finish \ + before the end of the regex."), + UnexpectedFlagEof => + write!(f, "Inline flag settings was not closed before the end \ + of the regex (missing a ')' or ':')."), + UnexpectedTwoDigitHexEof => + write!(f, "Unexpected end of two digit hexadecimal literal."), + UnopenedParen => + write!(f, "Unopened parenthesis."), + UnrecognizedEscape(c) => + write!(f, "Unrecognized escape sequence: '\\{}'.", c), + UnrecognizedFlag(c) => + write!(f, "Unrecognized flag: '{}'. \ + (Allowed flags: i, s, m, U, x.)", c), + UnrecognizedUnicodeClass(ref s) => + write!(f, "Unrecognized Unicode class name: '{}'.", s), + StackExhausted => + write!(f, "Exhausted space required to parse regex with too \ + much nesting."), + FlagNotAllowed(flag) => + write!(f, "Use of the flag '{}' is not allowed.", flag), + UnicodeNotAllowed => + write!(f, "Unicode features are not allowed when the byte \ + (b) flag is set."), + __Nonexhaustive => unreachable!(), + } + } +} + +/// The result of binary search on the simple case folding table. +/// +/// Note that this binary search is done on the "both" table, such that +/// the index returned corresponds to the *first* location of `c1` in the +/// table. The table can then be scanned linearly starting from the position +/// returned to find other case mappings for `c1`. +fn simple_case_fold_both_result(c1: char) -> result::Result<usize, usize> { + let table = &case_folding::C_plus_S_both_table; + let i = binary_search(table, |&(c2, _)| c1 <= c2); + if i >= table.len() || table[i].0 != c1 { + Err(i) + } else { + Ok(i) + } +} + +/// Binary search to find first element such that `pred(T) == true`. +/// +/// Assumes that if `pred(xs[i]) == true` then `pred(xs[i+1]) == true`. +/// +/// If all elements yield `pred(T) == false`, then `xs.len()` is returned. +fn binary_search<T, F>(xs: &[T], mut pred: F) -> usize + where F: FnMut(&T) -> bool { + let (mut left, mut right) = (0, xs.len()); + while left < right { + let mid = (left + right) / 2; + if pred(&xs[mid]) { + right = mid; + } else { + left = mid + 1; + } + } + left +} + +/// Escapes all regular expression meta characters in `text`. +/// +/// The string returned may be safely used as a literal in a regular +/// expression. +pub fn quote(text: &str) -> String { + let mut quoted = String::with_capacity(text.len()); + for c in text.chars() { + if parser::is_punct(c) { + quoted.push('\\'); + } + quoted.push(c); + } + quoted +} + +fn quote_char(c: char) -> String { + let mut s = String::new(); + if parser::is_punct(c) { + s.push('\\'); + } + s.push(c); + s +} + +fn quote_byte(b: u8) -> String { + if parser::is_punct(b as char) || b == b'\'' || b == b'"' { + quote_char(b as char) + } else { + let escaped: Vec<u8> = ascii::escape_default(b).collect(); + String::from_utf8(escaped).unwrap() + } +} + +fn inc_char(c: char) -> char { + match c { + char::MAX => char::MAX, + '\u{D7FF}' => '\u{E000}', + c => char::from_u32(c as u32 + 1).unwrap(), + } +} + +fn dec_char(c: char) -> char { + match c { + '\x00' => '\x00', + '\u{E000}' => '\u{D7FF}', + c => char::from_u32(c as u32 - 1).unwrap(), + } +} + +/// Returns true if and only if `c` is a word character. +#[doc(hidden)] +pub fn is_word_char(c: char) -> bool { + match c { + '_' | '0' ... '9' | 'a' ... 'z' | 'A' ... 'Z' => true, + _ => ::unicode::regex::PERLW.binary_search_by(|&(start, end)| { + if c >= start && c <= end { + Ordering::Equal + } else if start > c { + Ordering::Greater + } else { + Ordering::Less + } + }).is_ok(), + } +} + +/// Returns true if and only if `c` is an ASCII word byte. +#[doc(hidden)] +pub fn is_word_byte(b: u8) -> bool { + match b { + b'_' | b'0' ... b'9' | b'a' ... b'z' | b'A' ... b'Z' => true, + _ => false, + } +} + +#[cfg(test)] +mod properties; + +#[cfg(test)] +mod tests { + use {CharClass, ClassRange, ByteClass, ByteRange, Expr}; + + fn class(ranges: &[(char, char)]) -> CharClass { + let ranges = ranges.iter().cloned() + .map(|(c1, c2)| ClassRange::new(c1, c2)).collect(); + CharClass::new(ranges) + } + + fn bclass(ranges: &[(u8, u8)]) -> ByteClass { + let ranges = ranges.iter().cloned() + .map(|(c1, c2)| ByteRange::new(c1, c2)).collect(); + ByteClass::new(ranges) + } + + fn e(re: &str) -> Expr { Expr::parse(re).unwrap() } + + #[test] + fn stack_exhaustion() { + use std::iter::repeat; + + let open: String = repeat('(').take(200).collect(); + let close: String = repeat(')').take(200).collect(); + assert!(Expr::parse(&format!("{}a{}", open, close)).is_ok()); + + let open: String = repeat('(').take(200 + 1).collect(); + let close: String = repeat(')').take(200 + 1).collect(); + assert!(Expr::parse(&format!("{}a{}", open, close)).is_err()); + } + + #[test] + fn anchored_start() { + assert!(e("^a").is_anchored_start()); + assert!(e("(^a)").is_anchored_start()); + assert!(e("^a|^b").is_anchored_start()); + assert!(e("(^a)|(^b)").is_anchored_start()); + assert!(e("(^(a|b))").is_anchored_start()); + + assert!(!e("^a|b").is_anchored_start()); + assert!(!e("a|^b").is_anchored_start()); + } + + #[test] + fn anchored_end() { + assert!(e("a$").is_anchored_end()); + assert!(e("(a$)").is_anchored_end()); + assert!(e("a$|b$").is_anchored_end()); + assert!(e("(a$)|(b$)").is_anchored_end()); + assert!(e("((a|b)$)").is_anchored_end()); + + assert!(!e("a$|b").is_anchored_end()); + assert!(!e("a|b$").is_anchored_end()); + } + + #[test] + fn class_canon_no_change() { + let cls = class(&[('a', 'c'), ('x', 'z')]); + assert_eq!(cls.clone().canonicalize(), cls); + } + + #[test] + fn class_canon_unordered() { + let cls = class(&[('x', 'z'), ('a', 'c')]); + assert_eq!(cls.canonicalize(), class(&[ + ('a', 'c'), ('x', 'z'), + ])); + } + + #[test] + fn class_canon_overlap() { + let cls = class(&[('x', 'z'), ('w', 'y')]); + assert_eq!(cls.canonicalize(), class(&[ + ('w', 'z'), + ])); + } + + #[test] + fn class_canon_overlap_many() { + let cls = class(&[ + ('c', 'f'), ('a', 'g'), ('d', 'j'), ('a', 'c'), + ('m', 'p'), ('l', 's'), + ]); + assert_eq!(cls.clone().canonicalize(), class(&[ + ('a', 'j'), ('l', 's'), + ])); + } + + #[test] + fn class_canon_overlap_boundary() { + let cls = class(&[('x', 'z'), ('u', 'w')]); + assert_eq!(cls.canonicalize(), class(&[ + ('u', 'z'), + ])); + } + + #[test] + fn class_canon_extreme_edge_case() { + let cls = class(&[('\x00', '\u{10FFFF}'), ('\x00', '\u{10FFFF}')]); + assert_eq!(cls.canonicalize(), class(&[ + ('\x00', '\u{10FFFF}'), + ])); + } + + #[test] + fn class_canon_singles() { + let cls = class(&[('a', 'a'), ('b', 'b')]); + assert_eq!(cls.canonicalize(), class(&[('a', 'b')])); + } + + #[test] + fn class_negate_single() { + let cls = class(&[('a', 'a')]); + assert_eq!(cls.negate(), class(&[ + ('\x00', '\x60'), ('\x62', '\u{10FFFF}'), + ])); + } + + #[test] + fn class_negate_singles() { + let cls = class(&[('a', 'a'), ('b', 'b')]); + assert_eq!(cls.negate(), class(&[ + ('\x00', '\x60'), ('\x63', '\u{10FFFF}'), + ])); + } + + #[test] + fn class_negate_multiples() { + let cls = class(&[('a', 'c'), ('x', 'z')]); + assert_eq!(cls.negate(), class(&[ + ('\x00', '\x60'), ('\x64', '\x77'), ('\x7b', '\u{10FFFF}'), + ])); + } + + #[test] + fn class_negate_min_scalar() { + let cls = class(&[('\x00', 'a')]); + assert_eq!(cls.negate(), class(&[ + ('\x62', '\u{10FFFF}'), + ])); + } + + #[test] + fn class_negate_max_scalar() { + let cls = class(&[('a', '\u{10FFFF}')]); + assert_eq!(cls.negate(), class(&[ + ('\x00', '\x60'), + ])); + } + + #[test] + fn class_negate_everything() { + let cls = class(&[('\x00', '\u{10FFFF}')]); + assert_eq!(cls.negate(), class(&[])); + } + + #[test] + fn class_negate_everything_sans_one() { + let cls = class(&[ + ('\x00', '\u{10FFFD}'), ('\u{10FFFF}', '\u{10FFFF}') + ]); + assert_eq!(cls.negate(), class(&[ + ('\u{10FFFE}', '\u{10FFFE}'), + ])); + } + + #[test] + fn class_negate_surrogates_min() { + let cls = class(&[('\x00', '\u{D7FF}')]); + assert_eq!(cls.negate(), class(&[ + ('\u{E000}', '\u{10FFFF}'), + ])); + } + + #[test] + fn class_negate_surrogates_min_edge() { + let cls = class(&[('\x00', '\u{D7FE}')]); + assert_eq!(cls.negate(), class(&[ + ('\u{D7FF}', '\u{10FFFF}'), + ])); + } + + #[test] + fn class_negate_surrogates_max() { + let cls = class(&[('\u{E000}', '\u{10FFFF}')]); + assert_eq!(cls.negate(), class(&[ + ('\x00', '\u{D7FF}'), + ])); + } + + #[test] + fn class_negate_surrogates_max_edge() { + let cls = class(&[('\u{E001}', '\u{10FFFF}')]); + assert_eq!(cls.negate(), class(&[ + ('\x00', '\u{E000}'), + ])); + } + + #[test] + fn class_canon_overlap_many_case_fold() { + let cls = class(&[ + ('C', 'F'), ('A', 'G'), ('D', 'J'), ('A', 'C'), + ('M', 'P'), ('L', 'S'), ('c', 'f'), + ]); + assert_eq!(cls.case_fold(), class(&[ + ('A', 'J'), ('L', 'S'), + ('a', 'j'), ('l', 's'), + ('\u{17F}', '\u{17F}'), + ])); + + let cls = bclass(&[ + (b'C', b'F'), (b'A', b'G'), (b'D', b'J'), (b'A', b'C'), + (b'M', b'P'), (b'L', b'S'), (b'c', b'f'), + ]); + assert_eq!(cls.case_fold(), bclass(&[ + (b'A', b'J'), (b'L', b'S'), + (b'a', b'j'), (b'l', b's'), + ])); + } + + #[test] + fn class_fold_az() { + let cls = class(&[('A', 'Z')]); + assert_eq!(cls.case_fold(), class(&[ + ('A', 'Z'), ('a', 'z'), + ('\u{17F}', '\u{17F}'), + ('\u{212A}', '\u{212A}'), + ])); + let cls = class(&[('a', 'z')]); + assert_eq!(cls.case_fold(), class(&[ + ('A', 'Z'), ('a', 'z'), + ('\u{17F}', '\u{17F}'), + ('\u{212A}', '\u{212A}'), + ])); + + let cls = bclass(&[(b'A', b'Z')]); + assert_eq!(cls.case_fold(), bclass(&[ + (b'A', b'Z'), (b'a', b'z'), + ])); + let cls = bclass(&[(b'a', b'z')]); + assert_eq!(cls.case_fold(), bclass(&[ + (b'A', b'Z'), (b'a', b'z'), + ])); + } + + #[test] + fn class_fold_a_underscore() { + let cls = class(&[('A', 'A'), ('_', '_')]); + assert_eq!(cls.clone().canonicalize(), class(&[ + ('A', 'A'), ('_', '_'), + ])); + assert_eq!(cls.case_fold(), class(&[ + ('A', 'A'), ('_', '_'), ('a', 'a'), + ])); + + let cls = bclass(&[(b'A', b'A'), (b'_', b'_')]); + assert_eq!(cls.clone().canonicalize(), bclass(&[ + (b'A', b'A'), (b'_', b'_'), + ])); + assert_eq!(cls.case_fold(), bclass(&[ + (b'A', b'A'), (b'_', b'_'), (b'a', b'a'), + ])); + } + + #[test] + fn class_fold_a_equals() { + let cls = class(&[('A', 'A'), ('=', '=')]); + assert_eq!(cls.clone().canonicalize(), class(&[ + ('=', '='), ('A', 'A'), + ])); + assert_eq!(cls.case_fold(), class(&[ + ('=', '='), ('A', 'A'), ('a', 'a'), + ])); + + let cls = bclass(&[(b'A', b'A'), (b'=', b'=')]); + assert_eq!(cls.clone().canonicalize(), bclass(&[ + (b'=', b'='), (b'A', b'A'), + ])); + assert_eq!(cls.case_fold(), bclass(&[ + (b'=', b'='), (b'A', b'A'), (b'a', b'a'), + ])); + } + + #[test] + fn class_fold_no_folding_needed() { + let cls = class(&[('\x00', '\x10')]); + assert_eq!(cls.case_fold(), class(&[ + ('\x00', '\x10'), + ])); + + let cls = bclass(&[(b'\x00', b'\x10')]); + assert_eq!(cls.case_fold(), bclass(&[ + (b'\x00', b'\x10'), + ])); + } + + #[test] + fn class_fold_negated() { + let cls = class(&[('x', 'x')]); + assert_eq!(cls.clone().case_fold(), class(&[ + ('X', 'X'), ('x', 'x'), + ])); + assert_eq!(cls.case_fold().negate(), class(&[ + ('\x00', 'W'), ('Y', 'w'), ('y', '\u{10FFFF}'), + ])); + + let cls = bclass(&[(b'x', b'x')]); + assert_eq!(cls.clone().case_fold(), bclass(&[ + (b'X', b'X'), (b'x', b'x'), + ])); + assert_eq!(cls.case_fold().negate(), bclass(&[ + (b'\x00', b'W'), (b'Y', b'w'), (b'y', b'\xff'), + ])); + } + + #[test] + fn class_fold_single_to_multiple() { + let cls = class(&[('k', 'k')]); + assert_eq!(cls.case_fold(), class(&[ + ('K', 'K'), ('k', 'k'), ('\u{212A}', '\u{212A}'), + ])); + + let cls = bclass(&[(b'k', b'k')]); + assert_eq!(cls.case_fold(), bclass(&[ + (b'K', b'K'), (b'k', b'k'), + ])); + } + + #[test] + fn class_fold_at() { + let cls = class(&[('@', '@')]); + assert_eq!(cls.clone().canonicalize(), class(&[('@', '@')])); + assert_eq!(cls.case_fold(), class(&[('@', '@')])); + + let cls = bclass(&[(b'@', b'@')]); + assert_eq!(cls.clone().canonicalize(), bclass(&[(b'@', b'@')])); + assert_eq!(cls.case_fold(), bclass(&[(b'@', b'@')])); + } +} diff --git a/deps/regex-syntax-0.3.0/src/parser.rs b/deps/regex-syntax-0.3.0/src/parser.rs new file mode 100644 index 000000000..70f840770 --- /dev/null +++ b/deps/regex-syntax-0.3.0/src/parser.rs @@ -0,0 +1,2715 @@ +// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +use std::cmp::{max, min}; +use std::u8; + +use unicode::regex::UNICODE_CLASSES; + +use { + Expr, Repeater, CharClass, ClassRange, + CaptureIndex, CaptureName, + Error, ErrorKind, Result, +}; + +/// Parser state. +/// +/// Keeps the entire input in memory and maintains a cursor (char offset). +/// +/// It also keeps an expression stack, which is responsible for managing +/// grouped expressions and flag state. +#[derive(Debug)] +pub struct Parser { + chars: Vec<char>, + chari: usize, + stack: Vec<Build>, + caps: usize, + names: Vec<String>, // to check for duplicates + flags: Flags, +} + +/// Flag state used in the parser. +#[derive(Clone, Copy, Debug)] +pub struct Flags { + /// i + pub casei: bool, + /// m + pub multi: bool, + /// s + pub dotnl: bool, + /// U + pub swap_greed: bool, + /// x + pub ignore_space: bool, + /// u + pub unicode: bool, + /// Not actually a flag, but when false, the `u` flag is forbidden and + /// setting `unicode` to `false` will result in an error. + pub allow_bytes: bool, +} + +impl Default for Flags { + fn default() -> Self { + Flags { + casei: false, + multi: false, + dotnl: false, + swap_greed: false, + ignore_space: false, + unicode: true, + allow_bytes: false, + } + } +} + +/// An ephemeral type for representing the expression stack. +/// +/// Everything on the stack is either a regular expression or a marker +/// indicating the opening of a group (possibly non-capturing). The opening +/// of a group copies the current flag state, which is reset on the parser +/// state once the group closes. +#[derive(Debug)] +enum Build { + Expr(Expr), + LeftParen { + i: CaptureIndex, + name: CaptureName, + chari: usize, + old_flags: Flags, + }, +} + +// Primary expression parsing routines. +impl Parser { + pub fn parse(s: &str, flags: Flags) -> Result<Expr> { + Parser { + chars: s.chars().collect(), + chari: 0, + stack: vec![], + caps: 0, + names: vec![], + flags: flags, + }.parse_expr() + } + + // Top-level expression parser. + // + // Starts at the beginning of the input and consumes until either the end + // of input or an error. + fn parse_expr(mut self) -> Result<Expr> { + if !self.flags.unicode && !self.flags.allow_bytes { + return Err(self.err(ErrorKind::FlagNotAllowed('u'))); + } + while !self.eof() { + let build_expr = match self.cur() { + '\\' => try!(self.parse_escape()), + '|' => { let e = try!(self.alternate()); self.bump(); e } + '?' => try!(self.parse_simple_repeat(Repeater::ZeroOrOne)), + '*' => try!(self.parse_simple_repeat(Repeater::ZeroOrMore)), + '+' => try!(self.parse_simple_repeat(Repeater::OneOrMore)), + '{' => try!(self.parse_counted_repeat()), + '[' => match self.maybe_parse_ascii() { + None => try!(self.parse_class()), + Some(cls) => { + Build::Expr(if self.flags.unicode { + Expr::Class(cls) + } else { + Expr::ClassBytes(cls.to_byte_class()) + }) + } + }, + '^' => { + if self.flags.multi { + self.parse_one(Expr::StartLine) + } else { + self.parse_one(Expr::StartText) + } + } + '$' => { + if self.flags.multi { + self.parse_one(Expr::EndLine) + } else { + self.parse_one(Expr::EndText) + } + } + '.' => { + if self.flags.dotnl { + if self.flags.unicode { + self.parse_one(Expr::AnyChar) + } else { + self.parse_one(Expr::AnyByte) + } + } else { + if self.flags.unicode { + self.parse_one(Expr::AnyCharNoNL) + } else { + self.parse_one(Expr::AnyByteNoNL) + } + } + } + '(' => try!(self.parse_group()), + ')' => { + let (old_flags, e) = try!(self.close_paren()); + self.bump(); + self.flags = old_flags; + e + } + _ => { + let c = self.bump(); + try!(self.lit(c)) + } + }; + if !build_expr.is_empty() { + self.stack.push(build_expr); + } + } + self.finish_concat() + } + + // Parses an escape sequence, e.g., \Ax + // + // Start: `\` + // End: `x` + fn parse_escape(&mut self) -> Result<Build> { + self.bump(); + if self.eof() { + return Err(self.err(ErrorKind::UnexpectedEscapeEof)); + } + let c = self.cur(); + if is_punct(c) { + let c = self.bump(); + return Ok(try!(self.lit(c))); + } + match c { + 'a' => { self.bump(); Ok(try!(self.lit('\x07'))) } + 'f' => { self.bump(); Ok(try!(self.lit('\x0C'))) } + 't' => { self.bump(); Ok(try!(self.lit('\t'))) } + 'n' => { self.bump(); Ok(try!(self.lit('\n'))) } + 'r' => { self.bump(); Ok(try!(self.lit('\r'))) } + 'v' => { self.bump(); Ok(try!(self.lit('\x0B'))) } + 'A' => { self.bump(); Ok(Build::Expr(Expr::StartText)) } + 'z' => { self.bump(); Ok(Build::Expr(Expr::EndText)) } + 'b' => { + self.bump(); + Ok(Build::Expr(if self.flags.unicode { + Expr::WordBoundary + } else { + Expr::WordBoundaryAscii + })) + } + 'B' => { + self.bump(); + Ok(Build::Expr(if self.flags.unicode { + Expr::NotWordBoundary + } else { + Expr::NotWordBoundaryAscii + })) + } + '0'|'1'|'2'|'3'|'4'|'5'|'6'|'7' => self.parse_octal(), + 'x' => { self.bump(); self.parse_hex() } + 'p'|'P' => { + self.bump(); + self.parse_unicode_class(c == 'P') + .map(|cls| Build::Expr(Expr::Class(cls))) + } + 'd'|'s'|'w'|'D'|'S'|'W' => { + self.bump(); + Ok(Build::Expr(if self.flags.unicode { + Expr::Class(self.parse_perl_class(c)) + } else { + Expr::ClassBytes(self.parse_perl_class(c).to_byte_class()) + })) + } + c => Err(self.err(ErrorKind::UnrecognizedEscape(c))), + } + } + + // Parses a group, e.g., `(abc)`. + // + // Start: `(` + // End: `a` + // + // A more interesting example, `(?P<foo>abc)`. + // + // Start: `(` + // End: `a` + fn parse_group(&mut self) -> Result<Build> { + let chari = self.chari; + let mut name: CaptureName = None; + self.bump(); + if self.bump_if("?P<") { + let n = try!(self.parse_group_name()); + if self.names.iter().any(|n2| n2 == &n) { + return Err(self.err(ErrorKind::DuplicateCaptureName(n))); + } + self.names.push(n.clone()); + name = Some(n); + } else if self.bump_if("?") { + // This can never be capturing. It's either setting flags for + // the current group, or it's opening a non-capturing group or + // it's opening a group with a specific set of flags (which is + // also non-capturing). + // Anything else is an error. + return self.parse_group_flags(chari); + } + self.caps = checkadd(self.caps, 1); + Ok(Build::LeftParen { + i: Some(self.caps), + name: name, + chari: chari, + old_flags: self.flags, // no flags changed if we're here + }) + } + + // Parses flags (inline or grouped), e.g., `(?s-i:abc)`. + // + // Start: `s` + // End: `a` + // + // Another example, `(?s-i)a`. + // + // Start: `s` + // End: `a` + fn parse_group_flags(&mut self, opening_chari: usize) -> Result<Build> { + let old_flags = self.flags; + let mut sign = true; + let mut saw_flag = false; + loop { + if self.eof() { + // e.g., (?i + return Err(self.err(ErrorKind::UnexpectedFlagEof)); + } + match self.cur() { + 'i' => { self.flags.casei = sign; saw_flag = true } + 'm' => { self.flags.multi = sign; saw_flag = true } + 's' => { self.flags.dotnl = sign; saw_flag = true } + 'U' => { self.flags.swap_greed = sign; saw_flag = true } + 'x' => { self.flags.ignore_space = sign; saw_flag = true } + 'u' => { + if !self.flags.allow_bytes { + return Err(self.err(ErrorKind::FlagNotAllowed('u'))); + } + self.flags.unicode = sign; + saw_flag = true; + } + '-' => { + if !sign { + // e.g., (?-i-s) + return Err(self.err(ErrorKind::DoubleFlagNegation)); + } + sign = false; + saw_flag = false; + } + ')' => { + if !saw_flag { + // e.g., (?) + return Err(self.err(ErrorKind::EmptyFlagNegation)); + } + // At this point, we're just changing the flags inside + // the current group, which means the old flags have + // been saved elsewhere. Our modifications in place are + // okey dokey! + // + // This particular flag expression only has a stateful + // impact on a regex's AST, so nothing gets explicitly + // added. + self.bump(); + return Ok(Build::Expr(Expr::Empty)); + } + ':' => { + if !sign && !saw_flag { + // e.g., (?i-:a) + // Note that if there's no negation, it's OK not + // to see flag, because you end up with a regular + // non-capturing group: `(?:a)`. + return Err(self.err(ErrorKind::EmptyFlagNegation)); + } + self.bump(); + return Ok(Build::LeftParen { + i: None, + name: None, + chari: opening_chari, + old_flags: old_flags, + }); + } + // e.g., (?z:a) + c => return Err(self.err(ErrorKind::UnrecognizedFlag(c))), + } + self.bump(); + } + } + + // Parses a group name, e.g., `foo` in `(?P<foo>abc)`. + // + // Start: `f` + // End: `a` + fn parse_group_name(&mut self) -> Result<String> { + let mut name = String::new(); + while !self.eof() && !self.peek_is('>') { + name.push(self.bump()); + } + if self.eof() { + // e.g., (?P<a + return Err(self.err(ErrorKind::UnclosedCaptureName(name))); + } + let all_valid = name.chars().all(is_valid_capture_char); + match name.chars().next() { + // e.g., (?P<>a) + None => Err(self.err(ErrorKind::EmptyCaptureName)), + Some(c) if (c >= '0' && c <= '9') || !all_valid => { + // e.g., (?P<a#>x) + // e.g., (?P<1a>x) + Err(self.err(ErrorKind::InvalidCaptureName(name))) + } + _ => { + self.bump(); // for `>` + Ok(name) + } + } + } + + // Parses a counted repeition operator, e.g., `a{2,4}?z`. + // + // Start: `{` + // End: `z` + fn parse_counted_repeat(&mut self) -> Result<Build> { + let e = try!(self.pop(ErrorKind::RepeaterExpectsExpr)); // e.g., ({5} + if !e.can_repeat() { + // e.g., a*{5} + return Err(self.err(ErrorKind::RepeaterUnexpectedExpr(e))); + } + self.bump(); + let min = try!(self.parse_decimal(|c| c != ',' && c != '}')); + let mut max_opt = Some(min); + if self.bump_if(',') { + if self.peek_is('}') { + max_opt = None; + } else { + let max = try!(self.parse_decimal(|c| c != '}')); + if min > max { + // e.g., a{2,1} + return Err(self.err(ErrorKind::InvalidRepeatRange { + min: min, + max: max, + })); + } + max_opt = Some(max); + } + } + if !self.bump_if('}') { + Err(self.err(ErrorKind::UnclosedRepeat)) + } else { + Ok(Build::Expr(Expr::Repeat { + e: Box::new(e), + r: Repeater::Range { min: min, max: max_opt }, + greedy: !self.bump_if('?') ^ self.flags.swap_greed, + })) + } + } + + // Parses a simple repetition operator, e.g., `a+?z`. + // + // Start: `+` + // End: `z` + // + // N.B. "simple" in this context means "not min/max repetition", + // e.g., `a{1,2}`. + fn parse_simple_repeat(&mut self, rep: Repeater) -> Result<Build> { + let e = try!(self.pop(ErrorKind::RepeaterExpectsExpr)); // e.g., (* + if !e.can_repeat() { + // e.g., a** + return Err(self.err(ErrorKind::RepeaterUnexpectedExpr(e))); + } + self.bump(); + Ok(Build::Expr(Expr::Repeat { + e: Box::new(e), + r: rep, + greedy: !self.bump_if('?') ^ self.flags.swap_greed, + })) + } + + // Parses a decimal number until the given character, e.g., `a{123,456}`. + // + // Start: `1` + // End: `,` (where `until == ','`) + fn parse_decimal<B: Bumpable>(&mut self, until: B) -> Result<u32> { + match self.bump_get(until) { + // e.g., a{} + None => Err(self.err(ErrorKind::MissingBase10)), + Some(n) => { + // e.g., a{xyz + // e.g., a{9999999999} + let n = n.trim(); + u32::from_str_radix(n, 10) + .map_err(|_| self.err(ErrorKind::InvalidBase10(n.into()))) + } + } + } + + // Parses an octal number, up to 3 digits, e.g., `a\123b` + // + // Start: `1` + // End: `b` + fn parse_octal(&mut self) -> Result<Build> { + use std::char; + let mut i = 0; // counter for limiting octal to 3 digits. + let n = self.bump_get(|c| { i += 1; i <= 3 && c >= '0' && c <= '7' }) + .expect("octal string"); // guaranteed at least 1 digit + // I think both of the following unwraps are impossible to fail. + // We limit it to a three digit octal number, which maxes out at + // `0777` or `511` in decimal. Since all digits are in `0...7`, we'll + // always have a valid `u32` number. Moreover, since all numbers in + // the range `0...511` are valid Unicode scalar values, it will always + // be a valid `char`. + // + // Hence, we `unwrap` with reckless abandon. + let n = u32::from_str_radix(&n, 8).ok().expect("valid octal number"); + if !self.flags.unicode { + return Ok(try!(self.u32_to_one_byte(n))); + } + let c = char::from_u32(n).expect("Unicode scalar value"); + Ok(try!(self.lit(c))) + } + + // Parses a hex number, e.g., `a\x5ab`. + // + // Start: `5` + // End: `b` + // + // And also, `a\x{2603}b`. + // + // Start: `{` + // End: `b` + fn parse_hex(&mut self) -> Result<Build> { + if self.bump_if('{') { + self.parse_hex_many_digits() + } else { + self.parse_hex_two_digits() + } + } + + // Parses a many-digit hex number, e.g., `a\x{2603}b`. + // + // Start: `2` + // End: `b` + fn parse_hex_many_digits(&mut self) -> Result<Build> { + use std::char; + + let s = self.bump_get(|c| c != '}').unwrap_or("".into()); + let n = try!(u32::from_str_radix(&s, 16) + .map_err(|_| self.err(ErrorKind::InvalidBase16(s)))); + if !self.bump_if('}') { + // e.g., a\x{d + return Err(self.err(ErrorKind::UnclosedHex)); + } + if !self.flags.unicode { + return Ok(try!(self.u32_to_one_byte(n))); + } + let c = try!(char::from_u32(n) + .ok_or(self.err(ErrorKind::InvalidScalarValue(n)))); + Ok(try!(self.lit(c))) + } + + // Parses a two-digit hex number, e.g., `a\x5ab`. + // + // Start: `5` + // End: `b` + fn parse_hex_two_digits(&mut self) -> Result<Build> { + use std::char; + + let mut i = 0; + let s = self.bump_get(|_| { i += 1; i <= 2 }).unwrap_or("".into()); + if s.len() < 2 { + // e.g., a\x + // e.g., a\xf + return Err(self.err(ErrorKind::UnexpectedTwoDigitHexEof)); + } + let n = try!(u32::from_str_radix(&s, 16) + .map_err(|_| self.err(ErrorKind::InvalidBase16(s)))); + if !self.flags.unicode { + return Ok(try!(self.u32_to_one_byte(n))); + } + let c = char::from_u32(n).expect("Unicode scalar value"); + Ok(try!(self.lit(c))) + } + + // Parses a character class, e.g., `[^a-zA-Z0-9]+`. + // + // Start: `[` + // End: `+` + fn parse_class(&mut self) -> Result<Build> { + self.bump(); + let negated = self.bump_if('^'); + let mut class = CharClass::empty(); + while self.bump_if('-') { + class.ranges.push(ClassRange::one('-')); + } + loop { + if self.eof() { + // e.g., [a + return Err(self.err(ErrorKind::UnexpectedClassEof)); + } + match self.cur() { + // If no ranges have been added, then `]` is the first + // character (sans, perhaps, the `^` symbol), so it should + // be interpreted as a `]` instead of a closing class bracket. + ']' if class.len() > 0 => { self.bump(); break } + '[' => match self.maybe_parse_ascii() { + Some(class2) => class.ranges.extend(class2), + None => { + self.bump(); + try!(self.parse_class_range(&mut class, '[')) + } + }, + '\\' => match try!(self.parse_escape()) { + Build::Expr(Expr::Class(class2)) => { + class.ranges.extend(class2); + } + Build::Expr(Expr::ClassBytes(class2)) => { + for byte_range in class2 { + let s = byte_range.start as char; + let e = byte_range.end as char; + class.ranges.push(ClassRange::new(s, e)); + } + } + Build::Expr(Expr::Literal { chars, .. }) => { + try!(self.parse_class_range(&mut class, chars[0])); + } + Build::Expr(Expr::LiteralBytes { bytes, .. }) => { + let start = bytes[0] as char; + try!(self.parse_class_range(&mut class, start)); + } + Build::Expr(e) => { + let err = ErrorKind::InvalidClassEscape(e); + return Err(self.err(err)); + } + // Because `parse_escape` can never return `LeftParen`. + _ => unreachable!(), + }, + start => { + self.bump(); + try!(self.parse_class_range(&mut class, start)); + } + } + } + class = self.class_transform(negated, class).canonicalize(); + Ok(Build::Expr(if self.flags.unicode { + Expr::Class(class) + } else { + Expr::ClassBytes(class.to_byte_class()) + })) + } + + // Parses a single range in a character class. + // + // Since this is a helper for `parse_class`, its signature sticks out. + // Namely, it requires the start character of the range and the char + // class to mutate. + // + // e.g., `[a-z]` + // + // Start: `-` (with start == `a`) + // End: `]` + fn parse_class_range(&mut self, class: &mut CharClass, start: char) + -> Result<()> { + if !self.bump_if('-') { + // Not a range, so just push a singleton range. + class.ranges.push(ClassRange::one(start)); + return Ok(()); + } + if self.eof() { + // e.g., [a- + return Err(self.err(ErrorKind::UnexpectedClassEof)); + } + if self.peek_is(']') { + // This is the end of the class, so we permit use of `-` as a + // regular char (just like we do in the beginning). + class.ranges.push(ClassRange::one(start)); + class.ranges.push(ClassRange::one('-')); + return Ok(()); + } + + // We have a real range. Just need to check to parse literal and + // make sure it's a valid range. + let end = match self.cur() { + '\\' => match try!(self.parse_escape()) { + Build::Expr(Expr::Literal { chars, .. }) => { + chars[0] + } + Build::Expr(Expr::LiteralBytes { bytes, .. }) => { + bytes[0] as char + } + Build::Expr(e) => { + return Err(self.err(ErrorKind::InvalidClassEscape(e))); + } + // Because `parse_escape` can never return `LeftParen`. + _ => unreachable!(), + }, + _ => self.bump(), + }; + if end < start { + // e.g., [z-a] + return Err(self.err(ErrorKind::InvalidClassRange { + start: start, + end: end, + })); + } + class.ranges.push(ClassRange::new(start, end)); + Ok(()) + } + + // Parses an ASCII class, e.g., `[:alnum:]+`. + // + // Start: `[` + // End: `+` + // + // Also supports negation, e.g., `[:^alnum:]`. + // + // This parsing routine is distinct from the others in that it doesn't + // actually report any errors. Namely, if it fails, then the parser should + // fall back to parsing a regular class. + // + // This method will only make progress in the parser if it succeeds. + // Otherwise, the input remains where it started. + fn maybe_parse_ascii(&mut self) -> Option<CharClass> { + fn parse(p: &mut Parser) -> Option<CharClass> { + p.bump(); // the `[` + if !p.bump_if(':') { return None; } + let negate = p.bump_if('^'); + let name = match p.bump_get(|c| c != ':') { + None => return None, + Some(name) => name, + }; + if !p.bump_if(":]") { return None; } + ascii_class(&name).map(|cls| p.class_transform(negate, cls)) + } + let start = self.chari; + match parse(self) { + None => { self.chari = start; None } + result => result, + } + } + + // Parses a Uncode class name, e.g., `a\pLb`. + // + // Start: `L` + // End: `b` + // + // And also, `a\p{Greek}b`. + // + // Start: `{` + // End: `b` + // + // `negate` is true when the class name is used with `\P`. + fn parse_unicode_class(&mut self, neg: bool) -> Result<CharClass> { + let name = + if self.bump_if('{') { + let n = self.bump_get(|c| c != '}').unwrap_or("".into()); + if n.is_empty() || !self.bump_if('}') { + // e.g., \p{Greek + return Err(self.err(ErrorKind::UnclosedUnicodeName)); + } + n + } else { + if self.eof() { + // e.g., \p + return Err(self.err(ErrorKind::UnexpectedEscapeEof)); + } + self.bump().to_string() + }; + match unicode_class(&name) { + None => Err(self.err(ErrorKind::UnrecognizedUnicodeClass(name))), + Some(cls) => { + if self.flags.unicode { + Ok(self.class_transform(neg, cls)) + } else { + Err(self.err(ErrorKind::UnicodeNotAllowed)) + } + } + } + } + + // Parses a perl character class with Unicode support. + // + // `name` must be one of d, s, w, D, S, W. If not, this function panics. + // + // No parser state is changed. + fn parse_perl_class(&mut self, name: char) -> CharClass { + use unicode::regex::{PERLD, PERLS, PERLW}; + let (cls, negate) = match (self.flags.unicode, name) { + (true, 'd') => (raw_class_to_expr(PERLD), false), + (true, 'D') => (raw_class_to_expr(PERLD), true), + (true, 's') => (raw_class_to_expr(PERLS), false), + (true, 'S') => (raw_class_to_expr(PERLS), true), + (true, 'w') => (raw_class_to_expr(PERLW), false), + (true, 'W') => (raw_class_to_expr(PERLW), true), + (false, 'd') => (ascii_class("digit").unwrap(), false), + (false, 'D') => (ascii_class("digit").unwrap(), true), + (false, 's') => (ascii_class("space").unwrap(), false), + (false, 'S') => (ascii_class("space").unwrap(), true), + (false, 'w') => (ascii_class("word").unwrap(), false), + (false, 'W') => (ascii_class("word").unwrap(), true), + _ => unreachable!(), + }; + self.class_transform(negate, cls) + } + + // Always bump to the next input and return the given expression as a + // `Build`. + // + // This is mostly for convenience when the surrounding context implies + // that the next character corresponds to the given expression. + fn parse_one(&mut self, e: Expr) -> Build { + self.bump(); + Build::Expr(e) + } +} + +// Auxiliary helper methods. +impl Parser { + fn chars(&self) -> Chars { + Chars::new(&self.chars[self.chari..], self.flags.ignore_space) + } + + fn bump(&mut self) -> char { + let c = self.cur(); + self.chari = checkadd(self.chari, self.chars().next_count()); + c + } + + fn cur(&self) -> char { self.chars().next().unwrap() } + + fn eof(&self) -> bool { self.chars().next().is_none() } + + fn bump_get<B: Bumpable>(&mut self, s: B) -> Option<String> { + let n = s.match_end(self); + if n == 0 { + None + } else { + let end = checkadd(self.chari, n); + let s = self.chars[self.chari..end] + .iter().cloned().collect::<String>(); + self.chari = end; + Some(s) + } + } + + fn bump_if<B: Bumpable>(&mut self, s: B) -> bool { + let n = s.match_end(self); + if n == 0 { + false + } else { + self.chari = checkadd(self.chari, n); + true + } + } + + fn peek_is<B: Bumpable>(&self, s: B) -> bool { + s.match_end(self) > 0 + } + + fn err(&self, kind: ErrorKind) -> Error { + self.errat(self.chari, kind) + } + + fn errat(&self, pos: usize, kind: ErrorKind) -> Error { + Error { pos: pos, surround: self.windowat(pos), kind: kind } + } + + fn windowat(&self, pos: usize) -> String { + let s = max(5, pos) - 5; + let e = min(self.chars.len(), checkadd(pos, 5)); + self.chars[s..e].iter().cloned().collect() + } + + fn pop(&mut self, expected: ErrorKind) -> Result<Expr> { + match self.stack.pop() { + None | Some(Build::LeftParen{..}) => Err(self.err(expected)), + Some(Build::Expr(e)) => Ok(e), + } + } + + // If the current context calls for case insensitivity, then apply + // case folding. Similarly, if `negate` is `true`, then negate the + // class. (Negation always proceeds case folding.) + fn class_transform(&self, negate: bool, mut cls: CharClass) -> CharClass { + if self.flags.casei { + cls = cls.case_fold(); + } + if negate { + cls = cls.negate(); + } + cls + } + + // Translates a Unicode codepoint into a single UTF-8 byte, and returns an + // error if it's not possible. + // + // This will panic if self.flags.unicode == true. + fn codepoint_to_one_byte(&self, c: char) -> Result<u8> { + assert!(!self.flags.unicode); + let bytes = c.to_string().as_bytes().to_owned(); + if bytes.len() > 1 { + return Err(self.err(ErrorKind::UnicodeNotAllowed)); + } + Ok(bytes[0]) + } + + // Creates a new byte literal from a single byte. + // + // If the given number can't fit into a single byte, then it is assumed + // to be a Unicode codepoint and an error is returned. + // + // This should only be called when the bytes flag is enabled. + fn u32_to_one_byte(&self, b: u32) -> Result<Build> { + assert!(!self.flags.unicode); + if b > u8::MAX as u32 { + Err(self.err(ErrorKind::UnicodeNotAllowed)) + } else { + Ok(Build::Expr(Expr::LiteralBytes { + bytes: vec![b as u8], + casei: self.flags.casei, + })) + } + } + + // Creates a new literal expr from a Unicode codepoint. + // + // Creates a byte literal if the `bytes` flag is set. + fn lit(&self, c: char) -> Result<Build> { + Ok(Build::Expr(if self.flags.unicode { + Expr::Literal { + chars: vec![c], + casei: self.flags.casei, + } + } else { + Expr::LiteralBytes { + bytes: vec![try!(self.codepoint_to_one_byte(c))], + casei: self.flags.casei, + } + })) + } +} + +struct Chars<'a> { + chars: &'a [char], + cur: usize, + ignore_space: bool, +} + +impl<'a> Iterator for Chars<'a> { + type Item = char; + fn next(&mut self) -> Option<char> { + if !self.ignore_space { + let x = self.c(); + self.advance(); + return x; + } + while let Some(c) = self.c() { + self.advance(); + match c { + '\\' => return match self.c() { + Some('#') => {self.advance(); Some('#')} + _ => Some('\\') + }, + '#' => loop { + match self.c() { + Some(c) => { + self.advance(); + if c == '\n' { + break; + } + }, + None => return None + } + }, + _ => if !c.is_whitespace() {return Some(c);} + } + } + None + } +} + +impl<'a> Chars<'a> { + fn new(chars: &[char], ignore_space: bool) -> Chars { + Chars { + chars: chars, + cur: 0, + ignore_space: ignore_space, + } + } + + fn c(&self) -> Option<char> { + self.chars.get(self.cur).map(|&c| c) + } + + fn advance(&mut self) { + self.cur = checkadd(self.cur, 1); + } + + fn next_count(&mut self) -> usize { + self.next(); + self.cur + } +} + +// Auxiliary methods for manipulating the expression stack. +impl Parser { + // Called whenever an alternate (`|`) is found. + // + // This pops the expression stack until: + // + // 1. The stack is empty. Pushes an alternation with one arm. + // 2. An opening parenthesis is found. Leave the parenthesis + // on the stack and push an alternation with one arm. + // 3. An alternate (`|`) is found. Pop the existing alternation, + // add an arm and push the modified alternation. + // + // Each "arm" in the above corresponds to the concatenation of all + // popped expressions. + // + // In the first two cases, the stack is left in an invalid state + // because an alternation with one arm is not allowed. This + // particular state will be detected by `finish_concat` and an + // error will be reported. + // + // In none of the cases is an empty arm allowed. If an empty arm + // is found, an error is reported. + fn alternate(&mut self) -> Result<Build> { + let mut concat = vec![]; + let alts = |es| Ok(Build::Expr(Expr::Alternate(es))); + loop { + match self.stack.pop() { + None => { + if concat.is_empty() { + // e.g., |a + return Err(self.err(ErrorKind::EmptyAlternate)); + } + return alts(vec![rev_concat(concat)]); + } + Some(e @ Build::LeftParen{..}) => { + if concat.is_empty() { + // e.g., (|a) + return Err(self.err(ErrorKind::EmptyAlternate)); + } + self.stack.push(e); + return alts(vec![rev_concat(concat)]); + } + Some(Build::Expr(Expr::Alternate(mut es))) => { + if concat.is_empty() { + // e.g., a|| + return Err(self.err(ErrorKind::EmptyAlternate)); + } + es.push(rev_concat(concat)); + return alts(es); + } + Some(Build::Expr(e)) => { concat.push(e); } + } + } + } + + // Called whenever a closing parenthesis (`)`) is found. + // + // This pops the expression stack until: + // + // 1. The stack is empty. An error is reported because this + // indicates an unopened parenthesis. + // 2. An opening parenthesis is found. Pop the opening parenthesis + // and push a `Group` expression. + // 3. An alternate (`|`) is found. Pop the existing alternation + // and an arm to it in place. Pop one more item from the stack. + // If the stack was empty, then report an unopened parenthesis + // error, otherwise assume it is an opening parenthesis and + // push a `Group` expression with the popped alternation. + // (We can assume this is an opening parenthesis because an + // alternation either corresponds to the entire Regex or it + // corresponds to an entire group. This is guaranteed by the + // `alternate` method.) + // + // Each "arm" in the above corresponds to the concatenation of all + // popped expressions. + // + // Empty arms nor empty groups are allowed. + fn close_paren(&mut self) -> Result<(Flags, Build)> { + let mut concat = vec![]; + loop { + match self.stack.pop() { + // e.g., ) + None => return Err(self.err(ErrorKind::UnopenedParen)), + Some(Build::LeftParen { i, name, old_flags, .. }) => { + if concat.is_empty() { + // e.g., () + return Err(self.err(ErrorKind::EmptyGroup)); + } + return Ok((old_flags, Build::Expr(Expr::Group { + e: Box::new(rev_concat(concat)), + i: i, + name: name, + }))); + } + Some(Build::Expr(Expr::Alternate(mut es))) => { + if concat.is_empty() { + // e.g., (a|) + return Err(self.err(ErrorKind::EmptyAlternate)); + } + es.push(rev_concat(concat)); + match self.stack.pop() { + // e.g., a|b) + None => return Err(self.err(ErrorKind::UnopenedParen)), + Some(Build::Expr(_)) => unreachable!(), + Some(Build::LeftParen { i, name, old_flags, .. }) => { + return Ok((old_flags, Build::Expr(Expr::Group { + e: Box::new(Expr::Alternate(es)), + i: i, + name: name, + }))); + } + } + } + Some(Build::Expr(e)) => { concat.push(e); } + } + } + } + + // Called only when the parser reaches the end of input. + // + // This pops the expression stack until: + // + // 1. The stack is empty. Return concatenation of popped + // expressions. This concatenation may be empty! + // 2. An alternation is found. Pop the alternation and push + // a new arm. Return the alternation as the entire Regex. + // + // If an opening parenthesis is popped, then an error is + // returned since it indicates an unclosed parenthesis. + fn finish_concat(&mut self) -> Result<Expr> { + let mut concat = vec![]; + loop { + match self.stack.pop() { + None => { return Ok(rev_concat(concat)); } + Some(Build::LeftParen{ chari, ..}) => { + // e.g., a(b + return Err(self.errat(chari, ErrorKind::UnclosedParen)); + } + Some(Build::Expr(Expr::Alternate(mut es))) => { + if concat.is_empty() { + // e.g., a| + return Err(self.err(ErrorKind::EmptyAlternate)); + } + es.push(rev_concat(concat)); + return Ok(Expr::Alternate(es)); + } + Some(Build::Expr(e)) => { concat.push(e); } + } + } + } +} + +impl Build { + fn is_empty(&self) -> bool { + match *self { + Build::Expr(Expr::Empty) => true, + _ => false, + } + } +} + +// Make it ergonomic to conditionally bump the parser. +// i.e., `bump_if('a')` or `bump_if("abc")`. +trait Bumpable { + fn match_end(self, p: &Parser) -> usize; +} + +impl Bumpable for char { + fn match_end(self, p: &Parser) -> usize { + let mut chars = p.chars(); + if chars.next().map(|c| c == self).unwrap_or(false) { + chars.cur + } else { + 0 + } + } +} + +impl<'a> Bumpable for &'a str { + fn match_end(self, p: &Parser) -> usize { + let mut search = self.chars(); + let mut rest = p.chars(); + let mut count = 0; + loop { + match (rest.next(), search.next()) { + (Some(c1), Some(c2)) if c1 == c2 => count = rest.cur, + (_, None) => return count, + _ => return 0, + } + } + } +} + +impl<F: FnMut(char) -> bool> Bumpable for F { + fn match_end(mut self, p: &Parser) -> usize { + let mut chars = p.chars(); + let mut count = 0; + while let Some(c) = chars.next() { + if !self(c) { + break + } + count = chars.cur; + } + count + } +} + +// Turn a sequence of expressions into a concatenation. +// This only uses `Concat` if there are 2 or more expressions. +fn rev_concat(mut exprs: Vec<Expr>) -> Expr { + if exprs.len() == 0 { + Expr::Empty + } else if exprs.len() == 1 { + exprs.pop().unwrap() + } else { + exprs.reverse(); + Expr::Concat(exprs) + } +} + +// Returns true if and only if the given character is allowed in a capture +// name. Note that the first char of a capture name must not be numeric. +fn is_valid_capture_char(c: char) -> bool { + c == '_' || (c >= '0' && c <= '9') + || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') +} + +/// Returns true if the give character has significance in a regex. +pub fn is_punct(c: char) -> bool { + match c { + '\\' | '.' | '+' | '*' | '?' | '(' | ')' | '|' | + '[' | ']' | '{' | '}' | '^' | '$' | '#' => true, + _ => false, + } +} + +fn checkadd(x: usize, y: usize) -> usize { + x.checked_add(y).expect("regex length overflow") +} + +fn unicode_class(name: &str) -> Option<CharClass> { + UNICODE_CLASSES.binary_search_by(|&(s, _)| s.cmp(name)).ok().map(|i| { + raw_class_to_expr(UNICODE_CLASSES[i].1) + }) +} + +fn ascii_class(name: &str) -> Option<CharClass> { + ASCII_CLASSES.binary_search_by(|&(s, _)| s.cmp(name)).ok().map(|i| { + raw_class_to_expr(ASCII_CLASSES[i].1) + }) +} + +fn raw_class_to_expr(raw: &[(char, char)]) -> CharClass { + let range = |&(s, e)| ClassRange { start: s, end: e }; + CharClass::new(raw.iter().map(range).collect()) +} + +type Class = &'static [(char, char)]; +type NamedClasses = &'static [(&'static str, Class)]; + +const ASCII_CLASSES: NamedClasses = &[ + // Classes must be in alphabetical order so that bsearch works. + // [:alnum:] alphanumeric (== [0-9A-Za-z]) + // [:alpha:] alphabetic (== [A-Za-z]) + // [:ascii:] ASCII (== [\x00-\x7F]) + // [:blank:] blank (== [\t ]) + // [:cntrl:] control (== [\x00-\x1F\x7F]) + // [:digit:] digits (== [0-9]) + // [:graph:] graphical (== [!-~]) + // [:lower:] lower case (== [a-z]) + // [:print:] printable (== [ -~] == [ [:graph:]]) + // [:punct:] punctuation (== [!-/:-@[-`{-~]) + // [:space:] whitespace (== [\t\n\v\f\r ]) + // [:upper:] upper case (== [A-Z]) + // [:word:] word characters (== [0-9A-Za-z_]) + // [:xdigit:] hex digit (== [0-9A-Fa-f]) + // Taken from: http://golang.org/pkg/regex/syntax/ + ("alnum", &ALNUM), + ("alpha", &ALPHA), + ("ascii", &ASCII), + ("blank", &BLANK), + ("cntrl", &CNTRL), + ("digit", &DIGIT), + ("graph", &GRAPH), + ("lower", &LOWER), + ("print", &PRINT), + ("punct", &PUNCT), + ("space", &SPACE), + ("upper", &UPPER), + ("word", &WORD), + ("xdigit", &XDIGIT), +]; + +const ALNUM: Class = &[('0', '9'), ('A', 'Z'), ('a', 'z')]; +const ALPHA: Class = &[('A', 'Z'), ('a', 'z')]; +const ASCII: Class = &[('\x00', '\x7F')]; +const BLANK: Class = &[(' ', ' '), ('\t', '\t')]; +const CNTRL: Class = &[('\x00', '\x1F'), ('\x7F', '\x7F')]; +const DIGIT: Class = &[('0', '9')]; +const GRAPH: Class = &[('!', '~')]; +const LOWER: Class = &[('a', 'z')]; +const PRINT: Class = &[(' ', '~')]; +const PUNCT: Class = &[('!', '/'), (':', '@'), ('[', '`'), ('{', '~')]; +const SPACE: Class = &[('\t', '\t'), ('\n', '\n'), ('\x0B', '\x0B'), + ('\x0C', '\x0C'), ('\r', '\r'), (' ', ' ')]; +const UPPER: Class = &[('A', 'Z')]; +const WORD: Class = &[('0', '9'), ('A', 'Z'), ('_', '_'), ('a', 'z')]; +const XDIGIT: Class = &[('0', '9'), ('A', 'F'), ('a', 'f')]; + +#[cfg(test)] +mod tests { + use { + CharClass, ClassRange, ByteClass, ByteRange, + Expr, Repeater, + ErrorKind, + }; + use unicode::regex::{PERLD, PERLS, PERLW}; + use super::{LOWER, UPPER, Flags, Parser, ascii_class}; + + static YI: &'static [(char, char)] = &[ + ('\u{a000}', '\u{a48c}'), ('\u{a490}', '\u{a4c6}'), + ]; + + fn p(s: &str) -> Expr { Parser::parse(s, Flags::default()).unwrap() } + fn pf(s: &str, flags: Flags) -> Expr { Parser::parse(s, flags).unwrap() } + fn lit(c: char) -> Expr { Expr::Literal { chars: vec![c], casei: false } } + fn liti(c: char) -> Expr { Expr::Literal { chars: vec![c], casei: true } } + fn b<T>(v: T) -> Box<T> { Box::new(v) } + fn c(es: &[Expr]) -> Expr { Expr::Concat(es.to_vec()) } + + fn pb(s: &str) -> Expr { + let flags = Flags { allow_bytes: true, .. Flags::default() }; + Parser::parse(s, flags).unwrap() + } + + fn blit(b: u8) -> Expr { + Expr::LiteralBytes { + bytes: vec![b], + casei: false, + } + } + + fn bliti(b: u8) -> Expr { + Expr::LiteralBytes { + bytes: vec![b], + casei: true, + } + } + + fn class(ranges: &[(char, char)]) -> CharClass { + let ranges = ranges.iter().cloned() + .map(|(c1, c2)| ClassRange::new(c1, c2)).collect(); + CharClass::new(ranges) + } + + fn classes(classes: &[&[(char, char)]]) -> CharClass { + let mut cls = CharClass::empty(); + for &ranges in classes { + cls.ranges.extend(class(ranges)); + } + cls.canonicalize() + } + + fn bclass(ranges: &[(u8, u8)]) -> ByteClass { + let ranges = ranges.iter().cloned() + .map(|(c1, c2)| ByteRange::new(c1, c2)).collect(); + ByteClass::new(ranges) + } + + fn asciid() -> ByteClass { + ascii_class("digit").unwrap().to_byte_class() + } + + fn asciis() -> ByteClass { + ascii_class("space").unwrap().to_byte_class() + } + + fn asciiw() -> ByteClass { + ascii_class("word").unwrap().to_byte_class() + } + + #[test] + fn empty() { + assert_eq!(p(""), Expr::Empty); + } + + #[test] + fn literal() { + assert_eq!(p("a"), lit('a')); + assert_eq!(pb("(?-u)a"), blit(b'a')); + } + + #[test] + fn literal_string() { + assert_eq!(p("ab"), Expr::Concat(vec![lit('a'), lit('b')])); + assert_eq!(pb("(?-u)ab"), Expr::Concat(vec![blit(b'a'), blit(b'b')])); + } + + #[test] + fn start_literal() { + assert_eq!(p("^a"), Expr::Concat(vec![ + Expr::StartText, + Expr::Literal { chars: vec!['a'], casei: false }, + ])); + } + + #[test] + fn repeat_zero_or_one_greedy() { + assert_eq!(p("a?"), Expr::Repeat { + e: b(lit('a')), + r: Repeater::ZeroOrOne, + greedy: true, + }); + } + + #[test] + fn repeat_zero_or_one_greedy_concat() { + assert_eq!(p("ab?"), Expr::Concat(vec![ + lit('a'), + Expr::Repeat { + e: b(lit('b')), + r: Repeater::ZeroOrOne, + greedy: true, + }, + ])); + } + + #[test] + fn repeat_zero_or_one_nongreedy() { + assert_eq!(p("a??"), Expr::Repeat { + e: b(lit('a')), + r: Repeater::ZeroOrOne, + greedy: false, + }); + } + + #[test] + fn repeat_one_or_more_greedy() { + assert_eq!(p("a+"), Expr::Repeat { + e: b(lit('a')), + r: Repeater::OneOrMore, + greedy: true, + }); + } + + #[test] + fn repeat_one_or_more_nongreedy() { + assert_eq!(p("a+?"), Expr::Repeat { + e: b(lit('a')), + r: Repeater::OneOrMore, + greedy: false, + }); + } + + #[test] + fn repeat_zero_or_more_greedy() { + assert_eq!(p("a*"), Expr::Repeat { + e: b(lit('a')), + r: Repeater::ZeroOrMore, + greedy: true, + }); + } + + #[test] + fn repeat_zero_or_more_nongreedy() { + assert_eq!(p("a*?"), Expr::Repeat { + e: b(lit('a')), + r: Repeater::ZeroOrMore, + greedy: false, + }); + } + + #[test] + fn repeat_counted_exact() { + assert_eq!(p("a{5}"), Expr::Repeat { + e: b(lit('a')), + r: Repeater::Range { min: 5, max: Some(5) }, + greedy: true, + }); + } + + #[test] + fn repeat_counted_min() { + assert_eq!(p("a{5,}"), Expr::Repeat { + e: b(lit('a')), + r: Repeater::Range { min: 5, max: None }, + greedy: true, + }); + } + + #[test] + fn repeat_counted_min_max() { + assert_eq!(p("a{5,10}"), Expr::Repeat { + e: b(lit('a')), + r: Repeater::Range { min: 5, max: Some(10) }, + greedy: true, + }); + } + + #[test] + fn repeat_counted_exact_nongreedy() { + assert_eq!(p("a{5}?"), Expr::Repeat { + e: b(lit('a')), + r: Repeater::Range { min: 5, max: Some(5) }, + greedy: false, + }); + } + + #[test] + fn repeat_counted_min_nongreedy() { + assert_eq!(p("a{5,}?"), Expr::Repeat { + e: b(lit('a')), + r: Repeater::Range { min: 5, max: None }, + greedy: false, + }); + } + + #[test] + fn repeat_counted_min_max_nongreedy() { + assert_eq!(p("a{5,10}?"), Expr::Repeat { + e: b(lit('a')), + r: Repeater::Range { min: 5, max: Some(10) }, + greedy: false, + }); + } + + #[test] + fn repeat_counted_whitespace() { + assert_eq!(p("a{ 5 }"), Expr::Repeat { + e: b(lit('a')), + r: Repeater::Range { min: 5, max: Some(5) }, + greedy: true, + }); + assert_eq!(p("a{ 5 , 10 }"), Expr::Repeat { + e: b(lit('a')), + r: Repeater::Range { min: 5, max: Some(10) }, + greedy: true, + }); + } + + #[test] + fn group_literal() { + assert_eq!(p("(a)"), Expr::Group { + e: b(lit('a')), + i: Some(1), + name: None, + }); + } + + #[test] + fn group_literal_concat() { + assert_eq!(p("(ab)"), Expr::Group { + e: b(c(&[lit('a'), lit('b')])), + i: Some(1), + name: None, + }); + } + + #[test] + fn alt_two() { + assert_eq!(p("a|b"), Expr::Alternate(vec![lit('a'), lit('b')])); + } + + #[test] + fn alt_many() { + assert_eq!(p("a|b|c"), Expr::Alternate(vec![ + lit('a'), lit('b'), lit('c'), + ])); + } + + #[test] + fn alt_many_concat() { + assert_eq!(p("ab|bc|cd"), Expr::Alternate(vec![ + c(&[lit('a'), lit('b')]), + c(&[lit('b'), lit('c')]), + c(&[lit('c'), lit('d')]), + ])); + } + + #[test] + fn alt_group_two() { + assert_eq!(p("(a|b)"), Expr::Group { + e: b(Expr::Alternate(vec![lit('a'), lit('b')])), + i: Some(1), + name: None, + }); + } + + #[test] + fn alt_group_many() { + assert_eq!(p("(a|b|c)"), Expr::Group { + e: b(Expr::Alternate(vec![lit('a'), lit('b'), lit('c')])), + i: Some(1), + name: None, + }); + } + + #[test] + fn alt_group_many_concat() { + assert_eq!(p("(ab|bc|cd)"), Expr::Group { + e: b(Expr::Alternate(vec![ + c(&[lit('a'), lit('b')]), + c(&[lit('b'), lit('c')]), + c(&[lit('c'), lit('d')]), + ])), + i: Some(1), + name: None, + }); + } + + #[test] + fn alt_group_nested() { + assert_eq!(p("(ab|(bc|(cd)))"), Expr::Group { + e: b(Expr::Alternate(vec![ + c(&[lit('a'), lit('b')]), + Expr::Group { + e: b(Expr::Alternate(vec![ + c(&[lit('b'), lit('c')]), + Expr::Group { + e: b(c(&[lit('c'), lit('d')])), + i: Some(3), + name: None, + } + ])), + i: Some(2), + name: None, + }, + ])), + i: Some(1), + name: None, + }); + } + + #[test] + fn group_name() { + assert_eq!(p("(?P<foo>a)"), Expr::Group { + e: b(lit('a')), + i: Some(1), + name: Some("foo".into()), + }); + } + + #[test] + fn group_no_capture() { + assert_eq!(p("(?:a)"), Expr::Group { + e: b(lit('a')), + i: None, + name: None, + }); + } + + #[test] + fn group_flags() { + assert_eq!(p("(?i:a)"), Expr::Group { + e: b(liti('a')), + i: None, + name: None, + }); + assert_eq!(pb("(?i-u:a)"), Expr::Group { + e: b(bliti(b'a')), + i: None, + name: None, + }); + } + + #[test] + fn group_flags_returned() { + assert_eq!(p("(?i:a)a"), c(&[ + Expr::Group { + e: b(liti('a')), + i: None, + name: None, + }, + lit('a'), + ])); + assert_eq!(pb("(?i-u:a)a"), c(&[ + Expr::Group { + e: b(bliti(b'a')), + i: None, + name: None, + }, + lit('a'), + ])); + } + + #[test] + fn group_flags_retained() { + assert_eq!(p("(?i)(?-i:a)a"), c(&[ + Expr::Group { + e: b(lit('a')), + i: None, + name: None, + }, + liti('a'), + ])); + assert_eq!(pb("(?i-u)(?u-i:a)a"), c(&[ + Expr::Group { + e: b(lit('a')), + i: None, + name: None, + }, + bliti(b'a'), + ])); + } + + #[test] + fn flags_inline() { + assert_eq!(p("(?i)a"), liti('a')); + } + + #[test] + fn flags_inline_multiple() { + assert_eq!(p("(?is)a."), c(&[liti('a'), Expr::AnyChar])); + } + + #[test] + fn flags_inline_multiline() { + assert_eq!(p("(?m)^(?-m)$"), c(&[Expr::StartLine, Expr::EndText])); + } + + #[test] + fn flags_inline_swap_greed() { + assert_eq!(p("(?U)a*a*?(?i-U)a*a*?"), c(&[ + Expr::Repeat { + e: b(lit('a')), + r: Repeater::ZeroOrMore, + greedy: false, + }, + Expr::Repeat { + e: b(lit('a')), + r: Repeater::ZeroOrMore, + greedy: true, + }, + Expr::Repeat { + e: b(liti('a')), + r: Repeater::ZeroOrMore, + greedy: true, + }, + Expr::Repeat { + e: b(liti('a')), + r: Repeater::ZeroOrMore, + greedy: false, + }, + ])); + } + + #[test] + fn flags_inline_multiple_negate_one() { + assert_eq!(p("(?is)a.(?i-s)a."), c(&[ + liti('a'), Expr::AnyChar, liti('a'), Expr::AnyCharNoNL, + ])); + } + + #[test] + fn any_byte() { + assert_eq!( + pb("(?-u).(?u)."), c(&[Expr::AnyByteNoNL, Expr::AnyCharNoNL])); + assert_eq!( + pb("(?s)(?-u).(?u)."), c(&[Expr::AnyByte, Expr::AnyChar])); + } + + #[test] + fn flags_inline_negate() { + assert_eq!(p("(?i)a(?-i)a"), c(&[liti('a'), lit('a')])); + } + + #[test] + fn flags_group_inline() { + assert_eq!(p("(a(?i)a)a"), c(&[ + Expr::Group { + e: b(c(&[lit('a'), liti('a')])), + i: Some(1), + name: None, + }, + lit('a'), + ])); + } + + #[test] + fn flags_group_inline_retain() { + assert_eq!(p("(?i)((?-i)a)a"), c(&[ + Expr::Group { + e: b(lit('a')), + i: Some(1), + name: None, + }, + liti('a'), + ])); + } + + #[test] + fn flags_default_casei() { + let flags = Flags { casei: true, .. Flags::default() }; + assert_eq!(pf("a", flags), liti('a')); + } + + #[test] + fn flags_default_multi() { + let flags = Flags { multi: true, .. Flags::default() }; + assert_eq!(pf("^", flags), Expr::StartLine); + } + + #[test] + fn flags_default_dotnl() { + let flags = Flags { dotnl: true, .. Flags::default() }; + assert_eq!(pf(".", flags), Expr::AnyChar); + } + + #[test] + fn flags_default_swap_greed() { + let flags = Flags { swap_greed: true, .. Flags::default() }; + assert_eq!(pf("a+", flags), Expr::Repeat { + e: b(lit('a')), + r: Repeater::OneOrMore, + greedy: false, + }); + } + + #[test] + fn flags_default_ignore_space() { + let flags = Flags { ignore_space: true, .. Flags::default() }; + assert_eq!(pf(" a ", flags), lit('a')); + } + + #[test] + fn escape_simple() { + assert_eq!(p(r"\a\f\t\n\r\v"), c(&[ + lit('\x07'), lit('\x0C'), lit('\t'), + lit('\n'), lit('\r'), lit('\x0B'), + ])); + } + + #[test] + fn escape_boundaries() { + assert_eq!(p(r"\A\z\b\B"), c(&[ + Expr::StartText, Expr::EndText, + Expr::WordBoundary, Expr::NotWordBoundary, + ])); + assert_eq!(pb(r"(?-u)\b\B"), c(&[ + Expr::WordBoundaryAscii, Expr::NotWordBoundaryAscii, + ])); + } + + #[test] + fn escape_punctuation() { + assert_eq!(p(r"\\\.\+\*\?\(\)\|\[\]\{\}\^\$\#"), c(&[ + lit('\\'), lit('.'), lit('+'), lit('*'), lit('?'), + lit('('), lit(')'), lit('|'), lit('['), lit(']'), + lit('{'), lit('}'), lit('^'), lit('$'), lit('#'), + ])); + } + + #[test] + fn escape_octal() { + assert_eq!(p(r"\123"), lit('S')); + assert_eq!(p(r"\1234"), c(&[lit('S'), lit('4')])); + + assert_eq!(pb(r"(?-u)\377"), blit(0xFF)); + } + + #[test] + fn escape_hex2() { + assert_eq!(p(r"\x53"), lit('S')); + assert_eq!(p(r"\x534"), c(&[lit('S'), lit('4')])); + + assert_eq!(pb(r"(?-u)\xff"), blit(0xFF)); + assert_eq!(pb(r"(?-u)\x00"), blit(0x0)); + assert_eq!(pb(r"(?-u)[\x00]"), + Expr::ClassBytes(bclass(&[(b'\x00', b'\x00')]))); + assert_eq!(pb(r"(?-u)[^\x00]"), + Expr::ClassBytes(bclass(&[(b'\x01', b'\xFF')]))); + } + + #[test] + fn escape_hex() { + assert_eq!(p(r"\x{53}"), lit('S')); + assert_eq!(p(r"\x{53}4"), c(&[lit('S'), lit('4')])); + assert_eq!(p(r"\x{2603}"), lit('\u{2603}')); + + assert_eq!(pb(r"(?-u)\x{00FF}"), blit(0xFF)); + } + + #[test] + fn escape_unicode_name() { + assert_eq!(p(r"\p{Yi}"), Expr::Class(class(YI))); + } + + #[test] + fn escape_unicode_letter() { + assert_eq!(p(r"\pZ"), Expr::Class(class(&[ + ('\u{20}', '\u{20}'), ('\u{a0}', '\u{a0}'), + ('\u{1680}', '\u{1680}'), ('\u{2000}', '\u{200a}'), + ('\u{2028}', '\u{2029}'), ('\u{202f}', '\u{202f}'), + ('\u{205f}', '\u{205f}'), ('\u{3000}', '\u{3000}'), + ]))); + } + + #[test] + fn escape_unicode_name_case_fold() { + assert_eq!(p(r"(?i)\p{Yi}"), Expr::Class(class(YI).case_fold())); + } + + #[test] + fn escape_unicode_letter_case_fold() { + assert_eq!(p(r"(?i)\pZ"), Expr::Class(class(&[ + ('\u{20}', '\u{20}'), ('\u{a0}', '\u{a0}'), + ('\u{1680}', '\u{1680}'), ('\u{2000}', '\u{200a}'), + ('\u{2028}', '\u{2029}'), ('\u{202f}', '\u{202f}'), + ('\u{205f}', '\u{205f}'), ('\u{3000}', '\u{3000}'), + ]).case_fold())); + } + + #[test] + fn escape_unicode_name_negate() { + assert_eq!(p(r"\P{Yi}"), Expr::Class(class(YI).negate())); + } + + #[test] + fn escape_unicode_letter_negate() { + assert_eq!(p(r"\PZ"), Expr::Class(class(&[ + ('\u{20}', '\u{20}'), ('\u{a0}', '\u{a0}'), + ('\u{1680}', '\u{1680}'), ('\u{2000}', '\u{200a}'), + ('\u{2028}', '\u{2029}'), ('\u{202f}', '\u{202f}'), + ('\u{205f}', '\u{205f}'), ('\u{3000}', '\u{3000}'), + ]).negate())); + } + + #[test] + fn escape_unicode_name_negate_case_fold() { + assert_eq!(p(r"(?i)\P{Yi}"), + Expr::Class(class(YI).negate().case_fold())); + } + + #[test] + fn escape_unicode_letter_negate_case_fold() { + assert_eq!(p(r"(?i)\PZ"), Expr::Class(class(&[ + ('\u{20}', '\u{20}'), ('\u{a0}', '\u{a0}'), + ('\u{1680}', '\u{1680}'), ('\u{2000}', '\u{200a}'), + ('\u{2028}', '\u{2029}'), ('\u{202f}', '\u{202f}'), + ('\u{205f}', '\u{205f}'), ('\u{3000}', '\u{3000}'), + ]).negate().case_fold())); + } + + #[test] + fn escape_perl_d() { + assert_eq!(p(r"\d"), Expr::Class(class(PERLD))); + assert_eq!(pb(r"(?-u)\d"), Expr::ClassBytes(asciid())); + } + + #[test] + fn escape_perl_s() { + assert_eq!(p(r"\s"), Expr::Class(class(PERLS))); + assert_eq!(pb(r"(?-u)\s"), Expr::ClassBytes(asciis())); + } + + #[test] + fn escape_perl_w() { + assert_eq!(p(r"\w"), Expr::Class(class(PERLW))); + assert_eq!(pb(r"(?-u)\w"), Expr::ClassBytes(asciiw())); + } + + #[test] + fn escape_perl_d_negate() { + assert_eq!(p(r"\D"), Expr::Class(class(PERLD).negate())); + assert_eq!(pb(r"(?-u)\D"), Expr::ClassBytes(asciid().negate())); + } + + #[test] + fn escape_perl_s_negate() { + assert_eq!(p(r"\S"), Expr::Class(class(PERLS).negate())); + assert_eq!(pb(r"(?-u)\S"), Expr::ClassBytes(asciis().negate())); + } + + #[test] + fn escape_perl_w_negate() { + assert_eq!(p(r"\W"), Expr::Class(class(PERLW).negate())); + assert_eq!(pb(r"(?-u)\W"), Expr::ClassBytes(asciiw().negate())); + } + + #[test] + fn escape_perl_d_case_fold() { + assert_eq!(p(r"(?i)\d"), Expr::Class(class(PERLD).case_fold())); + assert_eq!(pb(r"(?i-u)\d"), Expr::ClassBytes(asciid().case_fold())); + } + + #[test] + fn escape_perl_s_case_fold() { + assert_eq!(p(r"(?i)\s"), Expr::Class(class(PERLS).case_fold())); + assert_eq!(pb(r"(?i-u)\s"), Expr::ClassBytes(asciis().case_fold())); + } + + #[test] + fn escape_perl_w_case_fold() { + assert_eq!(p(r"(?i)\w"), Expr::Class(class(PERLW).case_fold())); + assert_eq!(pb(r"(?i-u)\w"), Expr::ClassBytes(asciiw().case_fold())); + } + + #[test] + fn escape_perl_d_case_fold_negate() { + assert_eq!(p(r"(?i)\D"), + Expr::Class(class(PERLD).case_fold().negate())); + let bytes = asciid().case_fold().negate(); + assert_eq!(pb(r"(?i-u)\D"), Expr::ClassBytes(bytes)); + } + + #[test] + fn escape_perl_s_case_fold_negate() { + assert_eq!(p(r"(?i)\S"), + Expr::Class(class(PERLS).case_fold().negate())); + let bytes = asciis().case_fold().negate(); + assert_eq!(pb(r"(?i-u)\S"), Expr::ClassBytes(bytes)); + } + + #[test] + fn escape_perl_w_case_fold_negate() { + assert_eq!(p(r"(?i)\W"), + Expr::Class(class(PERLW).case_fold().negate())); + let bytes = asciiw().case_fold().negate(); + assert_eq!(pb(r"(?i-u)\W"), Expr::ClassBytes(bytes)); + } + + #[test] + fn class_singleton() { + assert_eq!(p(r"[a]"), Expr::Class(class(&[('a', 'a')]))); + assert_eq!(p(r"[\x00]"), Expr::Class(class(&[('\x00', '\x00')]))); + assert_eq!(p(r"[\n]"), Expr::Class(class(&[('\n', '\n')]))); + assert_eq!(p("[\n]"), Expr::Class(class(&[('\n', '\n')]))); + + assert_eq!(pb(r"(?-u)[a]"), Expr::ClassBytes(bclass(&[(b'a', b'a')]))); + assert_eq!(pb(r"(?-u)[\x00]"), Expr::ClassBytes(bclass(&[(0, 0)]))); + assert_eq!(pb("(?-u)[\n]"), + Expr::ClassBytes(bclass(&[(b'\n', b'\n')]))); + assert_eq!(pb(r"(?-u)[\n]"), + Expr::ClassBytes(bclass(&[(b'\n', b'\n')]))); + } + + #[test] + fn class_singleton_negate() { + assert_eq!(p(r"[^a]"), Expr::Class(class(&[ + ('\x00', '\x60'), ('\x62', '\u{10FFFF}'), + ]))); + assert_eq!(p(r"[^\x00]"), Expr::Class(class(&[ + ('\x01', '\u{10FFFF}'), + ]))); + assert_eq!(p(r"[^\n]"), Expr::Class(class(&[ + ('\x00', '\x09'), ('\x0b', '\u{10FFFF}'), + ]))); + assert_eq!(p("[^\n]"), Expr::Class(class(&[ + ('\x00', '\x09'), ('\x0b', '\u{10FFFF}'), + ]))); + + assert_eq!(pb(r"(?-u)[^a]"), Expr::ClassBytes(bclass(&[ + (0x00, 0x60), (0x62, 0xFF), + ]))); + assert_eq!(pb(r"(?-u)[^\x00]"), Expr::ClassBytes(bclass(&[ + (0x01, 0xFF), + ]))); + assert_eq!(pb(r"(?-u)[^\n]"), Expr::ClassBytes(bclass(&[ + (0x00, 0x09), (0x0B, 0xFF), + ]))); + assert_eq!(pb("(?-u)[^\n]"), Expr::ClassBytes(bclass(&[ + (0x00, 0x09), (0x0B, 0xFF), + ]))); + } + + #[test] + fn class_singleton_class() { + assert_eq!(p(r"[\d]"), Expr::Class(class(PERLD))); + assert_eq!(p(r"[\p{Yi}]"), Expr::Class(class(YI))); + + let bytes = class(PERLD).to_byte_class(); + assert_eq!(pb(r"(?-u)[\d]"), Expr::ClassBytes(bytes)); + } + + #[test] + fn class_singleton_class_negate() { + assert_eq!(p(r"[^\d]"), Expr::Class(class(PERLD).negate())); + assert_eq!(p(r"[^\w]"), Expr::Class(class(PERLW).negate())); + assert_eq!(p(r"[^\s]"), Expr::Class(class(PERLS).negate())); + + let bytes = asciid().negate(); + assert_eq!(pb(r"(?-u)[^\d]"), Expr::ClassBytes(bytes)); + let bytes = asciiw().negate(); + assert_eq!(pb(r"(?-u)[^\w]"), Expr::ClassBytes(bytes)); + let bytes = asciis().negate(); + assert_eq!(pb(r"(?-u)[^\s]"), Expr::ClassBytes(bytes)); + } + + #[test] + fn class_singleton_class_negate_negate() { + assert_eq!(p(r"[^\D]"), Expr::Class(class(PERLD))); + assert_eq!(p(r"[^\W]"), Expr::Class(class(PERLW))); + assert_eq!(p(r"[^\S]"), Expr::Class(class(PERLS))); + + assert_eq!(pb(r"(?-u)[^\D]"), Expr::ClassBytes(asciid())); + assert_eq!(pb(r"(?-u)[^\W]"), Expr::ClassBytes(asciiw())); + assert_eq!(pb(r"(?-u)[^\S]"), Expr::ClassBytes(asciis())); + } + + #[test] + fn class_singleton_class_casei() { + assert_eq!(p(r"(?i)[\d]"), Expr::Class(class(PERLD).case_fold())); + assert_eq!(p(r"(?i)[\p{Yi}]"), Expr::Class(class(YI).case_fold())); + + assert_eq!(pb(r"(?i-u)[\d]"), Expr::ClassBytes(asciid().case_fold())); + } + + #[test] + fn class_singleton_class_negate_casei() { + assert_eq!(p(r"(?i)[^\d]"), + Expr::Class(class(PERLD).case_fold().negate())); + assert_eq!(p(r"(?i)[^\w]"), + Expr::Class(class(PERLW).case_fold().negate())); + assert_eq!(p(r"(?i)[^\s]"), + Expr::Class(class(PERLS).case_fold().negate())); + + let bytes = asciid().case_fold().negate(); + assert_eq!(pb(r"(?i-u)[^\d]"), Expr::ClassBytes(bytes)); + let bytes = asciiw().case_fold().negate(); + assert_eq!(pb(r"(?i-u)[^\w]"), Expr::ClassBytes(bytes)); + let bytes = asciis().case_fold().negate(); + assert_eq!(pb(r"(?i-u)[^\s]"), Expr::ClassBytes(bytes)); + } + + #[test] + fn class_singleton_class_negate_negate_casei() { + assert_eq!(p(r"(?i)[^\D]"), Expr::Class(class(PERLD).case_fold())); + assert_eq!(p(r"(?i)[^\W]"), Expr::Class(class(PERLW).case_fold())); + assert_eq!(p(r"(?i)[^\S]"), Expr::Class(class(PERLS).case_fold())); + + assert_eq!(pb(r"(?i-u)[^\D]"), Expr::ClassBytes(asciid().case_fold())); + assert_eq!(pb(r"(?i-u)[^\W]"), Expr::ClassBytes(asciiw().case_fold())); + assert_eq!(pb(r"(?i-u)[^\S]"), Expr::ClassBytes(asciis().case_fold())); + } + + #[test] + fn class_multiple_class() { + assert_eq!(p(r"[\d\p{Yi}]"), Expr::Class(classes(&[ + PERLD, YI, + ]))); + } + + #[test] + fn class_multiple_class_negate() { + assert_eq!(p(r"[^\d\p{Yi}]"), Expr::Class(classes(&[ + PERLD, YI, + ]).negate())); + } + + #[test] + fn class_multiple_class_negate_negate() { + let nperld = class(PERLD).negate(); + let nyi = class(YI).negate(); + let cls = CharClass::empty().merge(nperld).merge(nyi); + assert_eq!(p(r"[^\D\P{Yi}]"), Expr::Class(cls.negate())); + } + + #[test] + fn class_multiple_class_casei() { + assert_eq!(p(r"(?i)[\d\p{Yi}]"), Expr::Class(classes(&[ + PERLD, YI, + ]).case_fold())); + } + + #[test] + fn class_multiple_class_negate_casei() { + assert_eq!(p(r"(?i)[^\d\p{Yi}]"), Expr::Class(classes(&[ + PERLD, YI, + ]).case_fold().negate())); + } + + #[test] + fn class_multiple_class_negate_negate_casei() { + let nperld = class(PERLD).negate(); + let nyi = class(YI).negate(); + let class = CharClass::empty().merge(nperld).merge(nyi); + assert_eq!(p(r"(?i)[^\D\P{Yi}]"), + Expr::Class(class.case_fold().negate())); + } + + #[test] + fn class_class_hypen() { + assert_eq!(p(r"[\p{Yi}-]"), Expr::Class(classes(&[ + &[('-', '-')], YI, + ]))); + assert_eq!(p(r"[\p{Yi}-a]"), Expr::Class(classes(&[ + &[('-', '-')], &[('a', 'a')], YI, + ]))); + } + + #[test] + fn class_brackets() { + assert_eq!(p("[]]"), Expr::Class(class(&[(']', ']')]))); + assert_eq!(p("[][]"), Expr::Class(class(&[('[', '['), (']', ']')]))); + assert_eq!(p("[[]]"), Expr::Concat(vec![ + Expr::Class(class(&[('[', '[')])), + lit(']'), + ])); + } + + #[test] + fn class_brackets_hypen() { + assert_eq!(p("[]-]"), Expr::Class(class(&[('-', '-'), (']', ']')]))); + assert_eq!(p("[-]]"), Expr::Concat(vec![ + Expr::Class(class(&[('-', '-')])), + lit(']'), + ])); + } + + #[test] + fn class_overlapping() { + assert_eq!(p("[a-fd-h]"), Expr::Class(class(&[('a', 'h')]))); + assert_eq!(p("[a-fg-m]"), Expr::Class(class(&[('a', 'm')]))); + + assert_eq!(pb("(?-u)[a-fd-h]"), + Expr::ClassBytes(bclass(&[(b'a', b'h')]))); + assert_eq!(pb("(?-u)[a-fg-m]"), + Expr::ClassBytes(bclass(&[(b'a', b'm')]))); + } + + #[test] + fn ascii_classes() { + assert_eq!(p("[:upper:]"), Expr::Class(class(UPPER))); + assert_eq!(p("[[:upper:]]"), Expr::Class(class(UPPER))); + + assert_eq!(pb("(?-u)[:upper:]"), + Expr::ClassBytes(class(UPPER).to_byte_class())); + assert_eq!(pb("(?-u)[[:upper:]]"), + Expr::ClassBytes(class(UPPER).to_byte_class())); + } + + #[test] + fn ascii_classes_not() { + assert_eq!(p("[:abc:]"), + Expr::Class(class(&[(':', ':'), ('a', 'c')]))); + assert_eq!(pb("(?-u)[:abc:]"), + Expr::ClassBytes(bclass(&[(b':', b':'), (b'a', b'c')]))); + } + + #[test] + fn ascii_classes_multiple() { + assert_eq!(p("[[:lower:][:upper:]]"), + Expr::Class(classes(&[UPPER, LOWER]))); + + assert_eq!(pb("(?-u)[[:lower:][:upper:]]"), + Expr::ClassBytes(classes(&[UPPER, LOWER]).to_byte_class())); + } + + #[test] + fn ascii_classes_negate() { + assert_eq!(p("[[:^upper:]]"), Expr::Class(class(UPPER).negate())); + assert_eq!(p("[^[:^upper:]]"), Expr::Class(class(UPPER))); + + assert_eq!(pb("(?-u)[[:^upper:]]"), + Expr::ClassBytes(class(UPPER).to_byte_class().negate())); + assert_eq!(pb("(?-u)[^[:^upper:]]"), + Expr::ClassBytes(class(UPPER).to_byte_class())); + } + + #[test] + fn ascii_classes_negate_multiple() { + let (nlower, nupper) = (class(LOWER).negate(), class(UPPER).negate()); + let cls = CharClass::empty().merge(nlower).merge(nupper); + assert_eq!(p("[[:^lower:][:^upper:]]"), Expr::Class(cls.clone())); + assert_eq!(p("[^[:^lower:][:^upper:]]"), Expr::Class(cls.negate())); + } + + #[test] + fn ascii_classes_case_fold() { + assert_eq!(p("(?i)[:upper:]"), Expr::Class(class(UPPER).case_fold())); + assert_eq!(p("(?i)[[:upper:]]"), + Expr::Class(class(UPPER).case_fold())); + + assert_eq!(pb("(?i-u)[:upper:]"), + Expr::ClassBytes(class(UPPER).to_byte_class().case_fold())); + assert_eq!(pb("(?i-u)[[:upper:]]"), + Expr::ClassBytes(class(UPPER).to_byte_class().case_fold())); + } + + #[test] + fn ascii_classes_negate_case_fold() { + assert_eq!(p("(?i)[[:^upper:]]"), + Expr::Class(class(UPPER).case_fold().negate())); + assert_eq!(p("(?i)[^[:^upper:]]"), + Expr::Class(class(UPPER).case_fold())); + + assert_eq!(pb("(?i-u)[[:^upper:]]"), + Expr::ClassBytes( + class(UPPER).to_byte_class().case_fold().negate())); + assert_eq!(pb("(?i-u)[^[:^upper:]]"), + Expr::ClassBytes(class(UPPER).to_byte_class().case_fold())); + } + + #[test] + fn single_class_negate_case_fold() { + assert_eq!(p("(?i)[^x]"), + Expr::Class(class(&[('x', 'x')]).case_fold().negate())); + + assert_eq!(pb("(?i-u)[^x]"), + Expr::ClassBytes( + class(&[('x', 'x')]) + .to_byte_class().case_fold().negate())); + } + + #[test] + fn ignore_space_empty() { + assert_eq!(p("(?x) "), Expr::Empty); + } + + #[test] + fn ignore_space_literal() { + assert_eq!(p("(?x) a b c"), Expr::Concat(vec![ + lit('a'), lit('b'), lit('c'), + ])); + } + + #[test] + fn ignore_space_literal_off() { + assert_eq!(p("(?x) a b c(?-x) a"), Expr::Concat(vec![ + lit('a'), lit('b'), lit('c'), lit(' '), lit('a'), + ])); + } + + #[test] + fn ignore_space_class() { + assert_eq!(p("(?x)[a + - z +]"), Expr::Class(class(&[('a', 'z')]))); + assert_eq!(p("(?x)[ ^ a + - z +]"), Expr::Class(class(&[('a', 'z')]).negate())); + } + + #[test] + fn ignore_space_escape() { + assert_eq!(p(r"(?x)\ d"), Expr::Class(class(PERLD))); + assert_eq!(p(r"(?x)\ + D"), Expr::Class(class(PERLD).negate())); + } + + #[test] + fn ignore_space_comments() { + assert_eq!(p(r"(?x)(?P<foo> + a # comment 1 +)(?P<bar> + z # comment 2 +)"), Expr::Concat(vec![ + Expr::Group { + e: Box::new(lit('a')), + i: Some(1), + name: Some("foo".into()), + }, + Expr::Group { + e: Box::new(lit('z')), + i: Some(2), + name: Some("bar".into()), + }, + ])); + } + + #[test] + fn ignore_space_comments_re_enable() { + assert_eq!(p(r"(?x)a # hi +(?-x:#) # sweet"), Expr::Concat(vec![ + lit('a'), + Expr::Group { + e: Box::new(lit('#')), + i: None, + name: None, + }, + ])); + } + + #[test] + fn ignore_space_escape_punctuation() { + assert_eq!(p(r"(?x)\\\.\+\*\?\(\)\|\[\]\{\}\^\$\#"), c(&[ + lit('\\'), lit('.'), lit('+'), lit('*'), lit('?'), + lit('('), lit(')'), lit('|'), lit('['), lit(']'), + lit('{'), lit('}'), lit('^'), lit('$'), lit('#'), + ])); + } + + #[test] + fn ignore_space_escape_hash() { + assert_eq!(p(r"(?x)a\# # hi there"), Expr::Concat(vec![ + lit('a'), + lit('#'), + ])); + } + + // Test every single possible error case. + + macro_rules! test_err { + ($re:expr, $pos:expr, $kind:expr) => { + test_err!($re, $pos, $kind, Flags::default()); + }; + ($re:expr, $pos:expr, $kind:expr, $flags:expr) => {{ + let err = Parser::parse($re, $flags).unwrap_err(); + assert_eq!($pos, err.pos); + assert_eq!($kind, err.kind); + assert!($re.contains(&err.surround)); + }} + } + + #[test] + fn flags_default_byte_flag_not_allowed() { + let flags = Flags { unicode: false, .. Flags::default() }; + test_err!("a", 0, ErrorKind::FlagNotAllowed('u'), flags); + } + + #[test] + fn flags_byte_flag_not_allowed() { + test_err!("(?-u)a", 3, ErrorKind::FlagNotAllowed('u')); + } + + #[test] + fn unicode_char_not_allowed() { + let flags = Flags { allow_bytes: true, .. Flags::default() }; + test_err!("☃(?-u:☃)", 7, ErrorKind::UnicodeNotAllowed, flags); + } + + #[test] + fn unicode_class_not_allowed() { + let flags = Flags { allow_bytes: true, .. Flags::default() }; + test_err!(r"☃(?-u:\pL)", 9, ErrorKind::UnicodeNotAllowed, flags); + } + + #[test] + fn unicode_hex_not_allowed() { + let flags = Flags { allow_bytes: true, .. Flags::default() }; + test_err!(r"(?-u)\x{FFFF}", 13, ErrorKind::UnicodeNotAllowed, flags); + test_err!(r"(?-u)\x{100}", 12, ErrorKind::UnicodeNotAllowed, flags); + } + + #[test] + fn unicode_octal_not_allowed() { + let flags = Flags { allow_bytes: true, .. Flags::default() }; + test_err!(r"(?-u)\400", 9, ErrorKind::UnicodeNotAllowed, flags); + } + + #[test] + fn error_repeat_no_expr_simple() { + test_err!("(*", 1, ErrorKind::RepeaterExpectsExpr); + } + + #[test] + fn error_repeat_no_expr_counted() { + test_err!("({5}", 1, ErrorKind::RepeaterExpectsExpr); + } + + #[test] + fn error_repeat_beginning_counted() { + test_err!("{5}", 0, ErrorKind::RepeaterExpectsExpr); + } + + #[test] + fn error_repeat_illegal_exprs_simple() { + test_err!("a**", 2, ErrorKind::RepeaterUnexpectedExpr(Expr::Repeat { + e: b(lit('a')), + r: Repeater::ZeroOrMore, + greedy: true, + })); + test_err!("a|*", 2, + ErrorKind::RepeaterUnexpectedExpr(Expr::Alternate(vec![lit('a')])) + ); + } + + #[test] + fn error_repeat_illegal_exprs_counted() { + test_err!("a*{5}", 2, ErrorKind::RepeaterUnexpectedExpr(Expr::Repeat { + e: b(lit('a')), + r: Repeater::ZeroOrMore, + greedy: true, + })); + test_err!("a|{5}", 2, + ErrorKind::RepeaterUnexpectedExpr(Expr::Alternate(vec![lit('a')])) + ); + } + + #[test] + fn error_repeat_empty_number() { + test_err!("a{}", 2, ErrorKind::MissingBase10); + } + + #[test] + fn error_repeat_eof() { + test_err!("a{5", 3, ErrorKind::UnclosedRepeat); + } + + #[test] + fn error_repeat_empty_number_eof() { + test_err!("a{xyz", 5, ErrorKind::InvalidBase10("xyz".into())); + test_err!("a{12,xyz", 8, ErrorKind::InvalidBase10("xyz".into())); + } + + #[test] + fn error_repeat_invalid_number() { + test_err!("a{9999999999}", 12, + ErrorKind::InvalidBase10("9999999999".into())); + test_err!("a{1,9999999999}", 14, + ErrorKind::InvalidBase10("9999999999".into())); + } + + #[test] + fn error_repeat_invalid_number_extra() { + test_err!("a{12x}", 5, ErrorKind::InvalidBase10("12x".into())); + test_err!("a{1,12x}", 7, ErrorKind::InvalidBase10("12x".into())); + } + + #[test] + fn error_repeat_invalid_range() { + test_err!("a{2,1}", 5, + ErrorKind::InvalidRepeatRange { min: 2, max: 1 }); + } + + #[test] + fn error_alternate_empty() { + test_err!("|a", 0, ErrorKind::EmptyAlternate); + } + + #[test] + fn error_alternate_empty_with_group() { + test_err!("(|a)", 1, ErrorKind::EmptyAlternate); + } + + #[test] + fn error_alternate_empty_with_alternate() { + test_err!("a||", 2, ErrorKind::EmptyAlternate); + } + + #[test] + fn error_close_paren_unopened_empty() { + test_err!(")", 0, ErrorKind::UnopenedParen); + } + + #[test] + fn error_close_paren_unopened() { + test_err!("ab)", 2, ErrorKind::UnopenedParen); + } + + #[test] + fn error_close_paren_unopened_with_alt() { + test_err!("a|b)", 3, ErrorKind::UnopenedParen); + } + + #[test] + fn error_close_paren_empty_alt() { + test_err!("(a|)", 3, ErrorKind::EmptyAlternate); + } + + #[test] + fn error_close_paren_empty_group() { + test_err!("()", 1, ErrorKind::EmptyGroup); + } + + #[test] + fn error_close_paren_empty_group_with_name() { + test_err!("(?P<foo>)", 8, ErrorKind::EmptyGroup); + } + + #[test] + fn error_finish_concat_unclosed() { + test_err!("ab(xy", 2, ErrorKind::UnclosedParen); + } + + #[test] + fn error_finish_concat_empty_alt() { + test_err!("a|", 2, ErrorKind::EmptyAlternate); + } + + #[test] + fn error_group_name_invalid() { + test_err!("(?P<a#>x)", 6, ErrorKind::InvalidCaptureName("a#".into())); + } + + #[test] + fn error_group_name_invalid_leading() { + test_err!("(?P<1a>a)", 6, ErrorKind::InvalidCaptureName("1a".into())); + } + + #[test] + fn error_group_name_unexpected_eof() { + test_err!("(?P<a", 5, ErrorKind::UnclosedCaptureName("a".into())); + } + + #[test] + fn error_group_name_empty() { + test_err!("(?P<>a)", 4, ErrorKind::EmptyCaptureName); + } + + #[test] + fn error_group_opts_unrecognized_flag() { + test_err!("(?z:a)", 2, ErrorKind::UnrecognizedFlag('z')); + } + + #[test] + fn error_group_opts_unexpected_eof() { + test_err!("(?i", 3, ErrorKind::UnexpectedFlagEof); + } + + #[test] + fn error_group_opts_double_negation() { + test_err!("(?-i-s:a)", 4, ErrorKind::DoubleFlagNegation); + } + + #[test] + fn error_group_opts_empty_negation() { + test_err!("(?i-:a)", 4, ErrorKind::EmptyFlagNegation); + } + + #[test] + fn error_group_opts_empty() { + test_err!("(?)", 2, ErrorKind::EmptyFlagNegation); + } + + #[test] + fn error_escape_unexpected_eof() { + test_err!(r"\", 1, ErrorKind::UnexpectedEscapeEof); + } + + #[test] + fn error_escape_unrecognized() { + test_err!(r"\m", 1, ErrorKind::UnrecognizedEscape('m')); + } + + #[test] + fn error_escape_hex2_eof0() { + test_err!(r"\x", 2, ErrorKind::UnexpectedTwoDigitHexEof); + } + + #[test] + fn error_escape_hex2_eof1() { + test_err!(r"\xA", 3, ErrorKind::UnexpectedTwoDigitHexEof); + } + + #[test] + fn error_escape_hex2_invalid() { + test_err!(r"\xAG", 4, ErrorKind::InvalidBase16("AG".into())); + } + + #[test] + fn error_escape_hex_eof0() { + test_err!(r"\x{", 3, ErrorKind::InvalidBase16("".into())); + } + + #[test] + fn error_escape_hex_eof1() { + test_err!(r"\x{A", 4, ErrorKind::UnclosedHex); + } + + #[test] + fn error_escape_hex_invalid() { + test_err!(r"\x{AG}", 5, ErrorKind::InvalidBase16("AG".into())); + } + + #[test] + fn error_escape_hex_invalid_scalar_value_surrogate() { + test_err!(r"\x{D800}", 8, ErrorKind::InvalidScalarValue(0xD800)); + } + + #[test] + fn error_escape_hex_invalid_scalar_value_high() { + test_err!(r"\x{110000}", 10, ErrorKind::InvalidScalarValue(0x110000)); + } + + #[test] + fn error_escape_hex_invalid_u32() { + test_err!(r"\x{9999999999}", 13, + ErrorKind::InvalidBase16("9999999999".into())); + } + + #[test] + fn error_unicode_unclosed() { + test_err!(r"\p{", 3, ErrorKind::UnclosedUnicodeName); + test_err!(r"\p{Greek", 8, ErrorKind::UnclosedUnicodeName); + } + + #[test] + fn error_unicode_no_letter() { + test_err!(r"\p", 2, ErrorKind::UnexpectedEscapeEof); + } + + #[test] + fn error_unicode_unknown_letter() { + test_err!(r"\pA", 3, ErrorKind::UnrecognizedUnicodeClass("A".into())); + } + + #[test] + fn error_unicode_unknown_name() { + test_err!(r"\p{Yii}", 7, + ErrorKind::UnrecognizedUnicodeClass("Yii".into())); + } + + #[test] + fn error_class_eof_empty() { + test_err!("[", 1, ErrorKind::UnexpectedClassEof); + test_err!("[^", 2, ErrorKind::UnexpectedClassEof); + } + + #[test] + fn error_class_eof_non_empty() { + test_err!("[a", 2, ErrorKind::UnexpectedClassEof); + test_err!("[^a", 3, ErrorKind::UnexpectedClassEof); + } + + #[test] + fn error_class_eof_range() { + test_err!("[a-", 3, ErrorKind::UnexpectedClassEof); + test_err!("[^a-", 4, ErrorKind::UnexpectedClassEof); + test_err!("[---", 4, ErrorKind::UnexpectedClassEof); + } + + #[test] + fn error_class_invalid_escape() { + test_err!(r"[\pA]", 4, + ErrorKind::UnrecognizedUnicodeClass("A".into())); + } + + #[test] + fn error_class_valid_escape_not_allowed() { + test_err!(r"[\A]", 3, ErrorKind::InvalidClassEscape(Expr::StartText)); + } + + #[test] + fn error_class_range_valid_escape_not_allowed() { + test_err!(r"[a-\d]", 5, + ErrorKind::InvalidClassEscape(Expr::Class(class(PERLD)))); + test_err!(r"[a-\A]", 5, + ErrorKind::InvalidClassEscape(Expr::StartText)); + test_err!(r"[\A-a]", 3, + ErrorKind::InvalidClassEscape(Expr::StartText)); + } + + #[test] + fn error_class_invalid_range() { + test_err!("[z-a]", 4, ErrorKind::InvalidClassRange { + start: 'z', + end: 'a', + }); + } + + #[test] + fn error_class_empty_range() { + test_err!("[]", 2, ErrorKind::UnexpectedClassEof); + test_err!("[^]", 3, ErrorKind::UnexpectedClassEof); + } + + #[test] + fn error_duplicate_capture_name() { + test_err!("(?P<a>.)(?P<a>.)", 14, + ErrorKind::DuplicateCaptureName("a".into())); + } +} diff --git a/deps/regex-syntax-0.3.0/src/properties.rs b/deps/regex-syntax-0.3.0/src/properties.rs new file mode 100644 index 000000000..76a144103 --- /dev/null +++ b/deps/regex-syntax-0.3.0/src/properties.rs @@ -0,0 +1,460 @@ +// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +use quickcheck::{Arbitrary, Gen, Testable, QuickCheck, StdGen}; +use rand::Rng; + +use { + Expr, ExprBuilder, + CharClass, ClassRange, ByteClass, ByteRange, Repeater, dec_char, +}; + +fn qc<T: Testable>(t: T) { + QuickCheck::new() + .tests(10_000) + .max_tests(20_000) + .quickcheck(t); +} + +fn class(ranges: &[(char, char)]) -> CharClass { + let ranges = ranges.iter().cloned() + .map(|(c1, c2)| ClassRange::new(c1, c2)).collect(); + CharClass::new(ranges) +} + +// Test invariants for canonicalizing character classes. + +#[test] +fn negate() { + fn prop(ranges: Vec<(char, char)>) -> bool { + let expected = class(&ranges).canonicalize(); + let got = class(&ranges).negate().negate(); + expected == got + } + qc(prop as fn(Vec<(char, char)>) -> bool); +} + +#[test] +fn classes_are_sorted_and_nonoverlapping() { + fn prop(ranges: Vec<(char, char)>) -> bool { + class(&ranges) + .canonicalize() + .windows(2) + .all(|w| w[0].end < dec_char(w[1].start)) + } + qc(prop as fn(Vec<(char, char)>) -> bool); +} + +#[test] +fn valid_class_ranges() { + fn prop(ranges: Vec<(char, char)>) -> bool { + class(&ranges).canonicalize().into_iter().all(|r| r.start <= r.end) + } + qc(prop as fn(Vec<(char, char)>) -> bool); +} + +/// A wrapper type for generating "regex-like" Unicode strings. +/// +/// In particular, this type's `Arbitrary` impl specifically biases toward +/// special regex characters to make test cases more interesting. +#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord)] +struct RegexLikeString(String); + +impl Arbitrary for RegexLikeString { + fn arbitrary<G: Gen>(g: &mut G) -> RegexLikeString { + const SPECIAL: &'static [char] = &[ + '\\', '.', '+', '*', '?', '(', ')', '|', '[', ']', '{', '}', + '^', '$', + ]; + // Generating random Unicode strings results in mostly uninteresting + // regexes. Namely, they'll mostly just be literals. + // To make properties using regex strings more interesting, we bias + // toward selecting characters of significance to a regex. + let size = { let s = g.size(); g.gen_range(0, s) }; + RegexLikeString((0..size).map(|_| { + if g.gen_weighted_bool(3) { + *g.choose(SPECIAL).unwrap() + } else { + g.gen() + } + }).collect()) + } + + fn shrink(&self) -> Box<Iterator<Item=RegexLikeString>> { + // The regular `String` shrinker is good enough. + Box::new(self.0.shrink().map(RegexLikeString)) + } +} + +/// A special type for generating small non-zero sized ASCII strings. +#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord)] +struct SmallAscii(String); + +impl Arbitrary for SmallAscii { + fn arbitrary<G: Gen>(g: &mut G) -> SmallAscii { + use std::char::from_u32; + let size = g.gen_range(1, 5); + SmallAscii((0..size) + .map(|_| from_u32(g.gen_range(97, 123)).unwrap()) + .collect()) + } + + fn shrink(&self) -> Box<Iterator<Item=SmallAscii>> { + Box::new(self.0.shrink().map(SmallAscii)) + } +} + +#[test] +fn parser_never_panics() { + fn prop(s: RegexLikeString) -> bool { + let _ = Expr::parse(&s.0); true + } + qc(prop as fn(RegexLikeString) -> bool); +} + +// Testing entire expressions. +// +// We only have one test at the moment, but the machinery could be useful +// for other things. +// +// In particular, Russ Cox writes about testing regexes by comparing the +// strings they match with other regex implementations. A fuzzer/shrinker +// (which is what's implemented below) would be a great way to drive that +// process. ---AG + +impl Arbitrary for Expr { + fn arbitrary<G: Gen>(g: &mut G) -> Expr { + let e = fix_capture_indices(gen_expr(g, 0, ExprType::Anything)); + e.simplify(200).unwrap() + } + + fn shrink(&self) -> Box<Iterator<Item=Expr>> { + use Expr::*; + + let nada = || Box::new(None.into_iter()); + let es: Box<Iterator<Item=Expr>> = match *self { + Empty | AnyChar | AnyCharNoNL | AnyByte | AnyByteNoNL + | StartLine | EndLine | StartText | EndText + | WordBoundary | NotWordBoundary + | WordBoundaryAscii | NotWordBoundaryAscii => nada(), + Literal { ref chars, .. } if chars.len() == 1 => nada(), + Literal { ref chars, casei } => { + Box::new((chars.clone(), casei) + .shrink() + .filter(|&(ref chars, _)| chars.len() > 0) + .map(|(chars, casei)| { + Literal { chars: chars, casei: casei } + })) + } + LiteralBytes { ref bytes, .. } if bytes.len() == 1 => nada(), + LiteralBytes { ref bytes, casei } => { + Box::new((bytes.clone(), casei) + .shrink() + .filter(|&(ref bytes, _)| bytes.len() > 0) + .map(|(bytes, casei)| { + LiteralBytes { bytes: bytes, casei: casei } + })) + } + Class(ref cls) => Box::new(cls.shrink().map(Class)), + ClassBytes(ref cls) => Box::new(cls.shrink().map(ClassBytes)), + Group { ref e, ref i, ref name } => { + let (i, name) = (i.clone(), name.clone()); + Box::new(e.clone().shrink() + .chain(e.clone().shrink() + .map(move |e| Group { + e: Box::new(e), + i: i.clone(), + name: name.clone(), + }))) + } + Repeat { ref e, ref r, greedy } => { + Box::new((*e.clone(), r.clone()) + .shrink() + .filter(|&(ref e, _)| e.can_repeat()) + .map(move |(e, r)| Repeat { + e: Box::new(e), + r: r, + greedy: greedy, + })) + } + // Concat(ref es) if es.len() <= 2 => nada(), + Concat(ref es) => { + Box::new(es.clone() + .shrink() + .filter(|es| es.len() > 0) + .map(|mut es| if es.len() == 1 { + es.pop().unwrap() + } else { + Concat(es) + })) + } + // Alternate(ref es) if es.len() <= 2 => nada(), + Alternate(ref es) => { + Box::new(es.clone() + .shrink() + .filter(|es| es.len() > 0) + .map(|mut es| if es.len() == 1 { + es.pop().unwrap() + } else { + Alternate(es) + })) + } + }; + Box::new(es.map(|e| fix_capture_indices(e).simplify(200).unwrap())) + } +} + +enum ExprType { + NoSequences, // disallow concat/alternate + Anything, +} + +fn gen_expr<G: Gen>(g: &mut G, depth: u32, ty: ExprType) -> Expr { + use Expr::*; + let ub = match (depth as usize >= g.size(), ty) { + (true, _) => 16, + (false, ExprType::NoSequences) => 18, + (false, ExprType::Anything) => 20, + }; + match g.gen_range(1, ub) { + 0 => Empty, + 1 => Literal { + chars: SmallAscii::arbitrary(g).0.chars().collect(), + casei: g.gen(), + }, + 2 => LiteralBytes { + bytes: SmallAscii::arbitrary(g).0.as_bytes().to_owned(), + casei: g.gen(), + }, + 3 => AnyChar, + 4 => AnyCharNoNL, + 5 => AnyByte, + 6 => AnyByteNoNL, + 7 => Class(CharClass::arbitrary(g)), + 8 => StartLine, + 9 => EndLine, + 10 => StartText, + 11 => EndText, + 12 => WordBoundary, + 13 => NotWordBoundary, + 14 => WordBoundaryAscii, + 15 => NotWordBoundaryAscii, + 16 => gen_group_expr(g, depth + 1), + 17 => Repeat { + e: Box::new(gen_repeatable_expr(g, depth + 1)), + r: Repeater::arbitrary(g), + greedy: bool::arbitrary(g), + }, + 18 => { + let size = { let s = g.size(); g.gen_range(2, s) }; + Concat((0..size) + .map(|_| { + gen_expr(g, depth + 1, ExprType::NoSequences) + }) + .collect()) + } + 19 => { + let size = { let s = g.size(); g.gen_range(2, s) }; + Alternate((0..size) + .map(|_| { + gen_expr(g, depth + 1, ExprType::NoSequences) + }) + .collect()) + } + _ => unreachable!() + } +} + +fn gen_repeatable_expr<G: Gen>(g: &mut G, depth: u32) -> Expr { + use Expr::*; + match g.gen_range(1, 10) { + 0 => Empty, + 1 => Literal { + chars: vec![Arbitrary::arbitrary(g)], + casei: g.gen(), + }, + 2 => LiteralBytes { + bytes: vec![Arbitrary::arbitrary(g)], + casei: g.gen(), + }, + 3 => AnyChar, + 4 => AnyCharNoNL, + 5 => AnyByte, + 6 => AnyByteNoNL, + 7 => Class(CharClass::arbitrary(g)), + 8 => ClassBytes(ByteClass::arbitrary(g)), + 9 => gen_group_expr(g, depth + 1), + _ => unreachable!(), + } +} + +fn gen_group_expr<G: Gen>(g: &mut G, depth: u32) -> Expr { + let (i, name) = if g.gen() { + (None, None) + } else { + (Some(0), if g.gen() { + Some(SmallAscii::arbitrary(g).0) + } else { + None + }) + }; + Expr::Group { + e: Box::new(gen_expr(g, depth + 1, ExprType::Anything)), + i: i, + name: name, + } +} + +fn fix_capture_indices(e: Expr) -> Expr { + fn bx(e: Expr) -> Box<Expr> { Box::new(e) } + fn fix(e: Expr, capi: &mut usize, names: &mut Vec<String>) -> Expr { + use Expr::*; + match e { + Group { e, i: Some(_), mut name } => { + *capi += 1; + let i = *capi; + let mut dupe_name = false; + if let Some(ref n1) = name { + if names.iter().any(|n2| n1 == n2) { + dupe_name = true; + } else { + names.push(n1.clone()); + } + } + if dupe_name { name = None; } + Group { e: bx(fix(*e, capi, names)), i: Some(i), name: name } + } + Group { e, i, name } => { + Group { e: bx(fix(*e, capi, names)), i: i, name: name } + } + Repeat { e, r, greedy } => { + Repeat { e: bx(fix(*e, capi, names)), r: r, greedy: greedy } + } + Concat(es) => + Concat(es.into_iter().map(|e| fix(e, capi, names)).collect()), + Alternate(es) => + Alternate(es.into_iter().map(|e| fix(e, capi, names)).collect()), + e => e, + } + } + fix(e, &mut 0, &mut vec![]) +} + +impl Arbitrary for Repeater { + fn arbitrary<G: Gen>(g: &mut G) -> Repeater { + use Repeater::*; + match g.gen_range(0, 4) { + 0 => ZeroOrOne, + 1 => ZeroOrMore, + 2 => OneOrMore, + 3 => { + use std::cmp::{max, min}; + let n1 = Arbitrary::arbitrary(g); + let n2 = Arbitrary::arbitrary(g); + Range { + min: min(n1, n2), + max: if g.gen() { None } else { Some(max(n1, n2)) }, + } + }, + _ => unreachable!(), + } + } + + fn shrink(&self) -> Box<Iterator<Item=Repeater>> { + use Repeater::*; + match *self { + ZeroOrOne | ZeroOrMore | OneOrMore => Box::new(None.into_iter()), + Range { min, max } => { + Box::new((min, max) + .shrink() + .map(|(min, max)| Range { min: min, max: max })) + } + } + } +} + +impl Arbitrary for CharClass { + fn arbitrary<G: Gen>(g: &mut G) -> CharClass { + let mut ranges: Vec<ClassRange> = Arbitrary::arbitrary(g); + if ranges.is_empty() { + ranges.push(Arbitrary::arbitrary(g)); + } + let cls = CharClass { ranges: ranges }.canonicalize(); + if g.gen() { cls.case_fold() } else { cls } + } + + fn shrink(&self) -> Box<Iterator<Item=CharClass>> { + Box::new(self.ranges.clone() + .shrink() + .filter(|ranges| ranges.len() > 0) + .map(|ranges| CharClass { ranges: ranges }.canonicalize())) + } +} + +impl Arbitrary for ClassRange { + fn arbitrary<G: Gen>(g: &mut G) -> ClassRange { + use std::char::from_u32; + ClassRange::new( + from_u32(g.gen_range(97, 123)).unwrap(), + from_u32(g.gen_range(97, 123)).unwrap(), + ) + } + + fn shrink(&self) -> Box<Iterator<Item=ClassRange>> { + Box::new((self.start, self.end) + .shrink().map(|(s, e)| ClassRange::new(s, e))) + } +} + +impl Arbitrary for ByteClass { + fn arbitrary<G: Gen>(g: &mut G) -> ByteClass { + let mut ranges: Vec<ByteRange> = Arbitrary::arbitrary(g); + if ranges.is_empty() { + ranges.push(Arbitrary::arbitrary(g)); + } + let cls = ByteClass { ranges: ranges }.canonicalize(); + if g.gen() { cls.case_fold() } else { cls } + } + + fn shrink(&self) -> Box<Iterator<Item=ByteClass>> { + Box::new(self.ranges.clone() + .shrink() + .filter(|ranges| ranges.len() > 0) + .map(|ranges| ByteClass { ranges: ranges }.canonicalize())) + } +} + +impl Arbitrary for ByteRange { + fn arbitrary<G: Gen>(g: &mut G) -> ByteRange { + ByteRange::new(g.gen_range(97, 123), g.gen_range(97, 123)) + } + + fn shrink(&self) -> Box<Iterator<Item=ByteRange>> { + Box::new((self.start, self.end) + .shrink().map(|(s, e)| ByteRange::new(s, e))) + } +} + +#[test] +fn display_regex_roundtrips() { + // Given an AST, if we print it as a regex and then re-parse it, do we + // get back the same AST? + // A lot of this relies crucially on regex simplification. So this is + // testing `Expr::simplify` as much as it is testing the `Display` impl. + fn prop(e: Expr) -> bool { + let parser = ExprBuilder::new().allow_bytes(true); + e == parser.parse(&e.to_string()).unwrap() + } + QuickCheck::new() + .tests(10_000) + .max_tests(20_000) + .gen(StdGen::new(::rand::thread_rng(), 50)) + .quickcheck(prop as fn(Expr) -> bool); +} diff --git a/deps/regex-syntax-0.2.2/src/unicode.rs b/deps/regex-syntax-0.3.0/src/unicode.rs similarity index 100% rename from deps/regex-syntax-0.2.2/src/unicode.rs rename to deps/regex-syntax-0.3.0/src/unicode.rs diff --git a/deps/semver-0.2.2/.travis.yml b/deps/semver-0.2.2/.travis.yml deleted file mode 100644 index 2865c04c1..000000000 --- a/deps/semver-0.2.2/.travis.yml +++ /dev/null @@ -1,34 +0,0 @@ -language: rust -rust: - - 1.1.0 - - 1.2.0 - - 1.3.0 - - beta - - nightly - - stable -sudo: false -script: - - cargo build --verbose - - cargo test --verbose --features ci - - cargo doc -addons: - apt: - sources: - - kalakris-cmake - packages: - - cmake -after_success: | - [ $TRAVIS_BRANCH = master ] && - [ $TRAVIS_PULL_REQUEST = false ] && - [ $TRAVIS_RUST_VERSION = nightly ] && - echo '<meta http-equiv=refresh content=0;url=semver/index.html>' > target/doc/index.html && - pip install ghp-import --user $USER && - $HOME/.local/bin/ghp-import -n target/doc && - git push -qf https://${TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages -language: rust -env: - global: - secure: "I6tYuqMZ/NQ/lt+vl9rZutkoyG+AhTtIGloqNm8JIbrSHFSe/S4+Wou3z/BKR89k2OrkwOJnhTCeAu3kK+HGPkf5/iryI0JctelVYRLWxvUCSIyuc5fcBuCyikIeW8OnT9myE9QP7ZFBPo7s2uEboWKZC11A2Ub/ZdY303gBQTU=" -notifications: - email: - on_success: never diff --git a/deps/semver-0.2.2/Cargo.toml b/deps/semver-0.2.2/Cargo.toml deleted file mode 100644 index d4b3ea6a4..000000000 --- a/deps/semver-0.2.2/Cargo.toml +++ /dev/null @@ -1,25 +0,0 @@ -[package] - -name = "semver" -version = "0.2.2" -authors = ["Steve Klabnik <steve@steveklabnik.com>", "The Rust Project Developers"] -license = "MIT/Apache-2.0" -repository = "https://github.com/steveklabnik/semver" -homepage = "https://github.com/steveklabnik/semver" -documentation = "http://steveklabnik.github.io/semver" -description = """ -Semantic version parsing and comparison. -""" - -[dependencies] -nom = "1.0.1" - -[features] -default = [] - -# are we testing on CI? -ci = [] - -[dev-dependencies] -crates-index = "0.4.0" -tempdir = "0.3.4" diff --git a/deps/semver-0.2.2/src/lib.rs b/deps/semver-0.2.2/src/lib.rs deleted file mode 100644 index 1e7dcbe68..000000000 --- a/deps/semver-0.2.2/src/lib.rs +++ /dev/null @@ -1,182 +0,0 @@ -// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -//! Semantic version parsing and comparison. -//! -//! Semantic versioning (see http://semver.org/) is a set of rules for -//! assigning version numbers. -//! -//! ## SemVer overview -//! -//! Given a version number MAJOR.MINOR.PATCH, increment the: -//! -//! 1. MAJOR version when you make incompatible API changes, -//! 2. MINOR version when you add functionality in a backwards-compatible -//! manner, and -//! 3. PATCH version when you make backwards-compatible bug fixes. -//! -//! Additional labels for pre-release and build metadata are available as -//! extensions to the MAJOR.MINOR.PATCH format. -//! -//! Any references to 'the spec' in this documentation refer to [version 2.0 of -//! the SemVer spec](http://semver.org/spec/v2.0.0.html). -//! -//! ## SemVer and the Rust ecosystem -//! -//! Rust itself follows the SemVer specification, as does its standard -//! libraries. The two are not tied together. -//! -//! [Cargo](http://crates.io), Rust's package manager, uses SemVer to determine -//! which versions of packages you need installed. -//! -//! ## Versions -//! -//! At its simplest, the `semver` crate allows you to construct `Version` -//! objects using the `parse` method: -//! -//! ```{rust} -//! use semver::Version; -//! -//! assert!(Version::parse("1.2.3") == Ok(Version { -//! major: 1, -//! minor: 2, -//! patch: 3, -//! pre: vec!(), -//! build: vec!(), -//! })); -//! ``` -//! -//! If you have multiple `Version`s, you can use the usual comparison operators -//! to compare them: -//! -//! ```{rust} -//! use semver::Version; -//! -//! assert!(Version::parse("1.2.3-alpha") != Version::parse("1.2.3-beta")); -//! assert!(Version::parse("1.2.3-alpha2") > Version::parse("1.2.0")); -//! ``` -//! -//! If you explicitly need to modify a Version, SemVer also allows you to -//! increment the major, minor, and patch numbers in accordance with the spec. -//! -//! Please note that in order to do this, you must use a mutable Version: -//! -//! ```{rust} -//! use semver::Version; -//! -//! let mut bugfix_release = Version::parse("1.0.0").unwrap(); -//! bugfix_release.increment_patch(); -//! -//! assert_eq!(Ok(bugfix_release), Version::parse("1.0.1")); -//! ``` -//! -//! When incrementing the minor version number, the patch number resets to zero -//! (in accordance with section 7 of the spec) -//! -//! ```{rust} -//! use semver::Version; -//! -//! let mut feature_release = Version::parse("1.4.6").unwrap(); -//! feature_release.increment_minor(); -//! -//! assert_eq!(Ok(feature_release), Version::parse("1.5.0")); -//! ``` -//! -//! Similarly, when incrementing the major version number, the patch and minor -//! numbers reset to zero (in accordance with section 8 of the spec) -//! -//! ```{rust} -//! use semver::Version; -//! -//! let mut chrome_release = Version::parse("41.5.5377").unwrap(); -//! chrome_release.increment_major(); -//! -//! assert_eq!(Ok(chrome_release), Version::parse("42.0.0")); -//! ``` -//! -//! ## Requirements -//! -//! The `semver` crate also provides the ability to compare requirements, which -//! are more complex comparisons. -//! -//! For example, creating a requirement that only matches versions greater than -//! or equal to 1.0.0: -//! -//! ```{rust} -//! # #![allow(unstable)] -//! use semver::Version; -//! use semver::VersionReq; -//! -//! let r = VersionReq::parse(">= 1.0.0").unwrap(); -//! let v = Version::parse("1.0.0").unwrap(); -//! -//! assert!(r.to_string() == ">= 1.0.0".to_string()); -//! assert!(r.matches(&v)) -//! ``` -//! -//! It also allows parsing of `~x.y.z` and `^x.y.z` requirements as defined at -//! https://www.npmjs.org/doc/misc/semver.html -//! -//! **Tilde requirements** specify a minimal version with some updates: -//! -//! ```notrust -//! ~1.2.3 := >=1.2.3 <1.3.0 -//! ~1.2 := >=1.2.0 <1.3.0 -//! ~1 := >=1.0.0 <2.0.0 -//! ``` -//! -//! **Caret requirements** allow SemVer compatible updates to a specified -//! verion, `0.x` and `0.x+1` are not considered compatible, but `1.x` and -//! `1.x+1` are. -//! -//! `0.0.x` is not considered compatible with any other version. -//! Missing minor and patch versions are desugared to `0` but allow flexibility -//! for that value. -//! -//! ```notrust -//! ^1.2.3 := >=1.2.3 <2.0.0 -//! ^0.2.3 := >=0.2.3 <0.3.0 -//! ^0.0.3 := >=0.0.3 <0.0.4 -//! ^0.0 := >=0.0.0 <0.1.0 -//! ^0 := >=0.0.0 <1.0.0 -//! ``` -//! -//! **Wildcard requirements** allows parsing of version requirements of the -//! formats `*`, `x.*` and `x.y.*`. -//! -//! ```notrust -//! * := >=0.0.0 -//! 1.* := >=1.0.0 <2.0.0 -//! 1.2.* := >=1.2.0 <1.3.0 -//! ``` - -#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", - html_favicon_url = "https://www.rust-lang.org/favicon.ico")] -#![deny(missing_docs)] -#![cfg_attr(test, deny(warnings))] - -#[macro_use] -extern crate nom; - -// We take the common approach of keeping our own module system private, and -// just re-exporting the interface that we want. - -pub use version::{Version, Identifier}; -pub use version::Identifier::{Numeric, AlphaNumeric}; -pub use version_req::{VersionReq, ReqParseError}; - -// SemVer-compliant versions. -mod version; - -// advanced version comparisons -mod version_req; - -// parsing -mod parser; diff --git a/deps/semver-0.2.2/src/parser.rs b/deps/semver-0.2.2/src/parser.rs deleted file mode 100644 index 789f7d473..000000000 --- a/deps/semver-0.2.2/src/parser.rs +++ /dev/null @@ -1,211 +0,0 @@ -use std::str; -use nom; -use nom::IResult; - -use version::Identifier; - -/// Try to parse a version -/// -/// If there's an error, then you just get (). for now. -pub fn try_parse(i: &[u8]) -> Result<super::Version, String> { - match version(i) { - IResult::Done(rest, version) => { - if rest.len() > 0 { - let err = format!("Failed with unparsed input: '{}'", - String::from_utf8(rest.to_vec()).unwrap()); - Err(err) - } else{ - Ok(version) - } - }, - _ => Err("Parse error".to_string()), - } -} - -/// parse a u64 -fn number(i: &[u8]) -> IResult<&[u8], u64> { - use std::str::from_utf8; - map_res!(i, - map_res!(nom::digit, from_utf8), - |d| str::FromStr::from_str(d)) -} - -/// Parse an alphanumeric or a dot ("[0-9A-Za-z.]" in regex) -fn ascii_or_hyphen(chr: u8) -> bool { - // hyphen - chr == 45 || - // 0-9 - (chr >= 48 && chr <= 57) || - // A-Z - (chr >= 65 && chr <= 90) || - // a-z - (chr >= 97 && chr <= 122) -} - -named!(take_ascii_or_hyphen, take_while!(ascii_or_hyphen)); - -fn convert_identifiers(identifiers: Vec<&str>) -> Vec<Identifier> { - let mut result = Vec::new(); - - for identifier in identifiers { - match identifier.parse() { - Ok(n) => result.push(Identifier::Numeric(n)), - Err(_) => result.push(Identifier::AlphaNumeric(identifier.to_string())), - } - } - - result -} - -/// Parse an identifier -fn identifiers(i: &[u8]) -> IResult<&[u8], Vec<Identifier>> { - use std::str::from_utf8; - map!(i, - separated_list!(tag!("."), map_res!(take_ascii_or_hyphen, from_utf8)), - convert_identifiers) -} - -/// parse a . and then a u32 -named!(dot_number<&[u8], u64>, preceded!(char!('.'), number)); - -named!(pre<&[u8], Option<Vec<Identifier> > >, opt!(complete!(preceded!(tag!("-"), identifiers)))); -named!(build<&[u8], Option<Vec<Identifier> > >, opt!(complete!(preceded!(tag!("+"), identifiers)))); - -named!(extras<&[u8], (Option<Vec<Identifier>>, Option<Vec<Identifier>>) >, pair!(pre, build)); - -/// parse a version -/// -/// A version is currently: -/// -/// - a major version number -/// - optionally followed by a dot and a minor version number -/// - optionally followed by a dot and a patch version number -/// -/// If some of the versions aren't present, gives a zero. -named!(version<&[u8], super::Version>, chain!( - major: number ~ - minor: dot_number ~ - patch: dot_number ~ - extras: extras, - || { - super::Version { - major: major, - minor: minor, - patch: patch, - pre: extras.0.clone().unwrap_or(Vec::new()), - build: extras.1.clone().unwrap_or(Vec::new()), - } - } -)); - - -#[cfg(test)] -mod tests { - use super::number; - use super::dot_number; - use super::version; - use version::Identifier; - use Version; - - fn done<T>(x: T) -> ::nom::IResult<&'static [u8], T> { - ::nom::IResult::Done(&[][..], x) - } - - #[test] - fn parse_number() { - let v = "10".as_bytes(); - - assert_eq!(number(v), done(10)); - } - - #[test] - fn parse_dot_number() { - let v = ".10".as_bytes(); - - assert_eq!(dot_number(v), done(10)); - } - - #[test] - fn parse_version() { - let v1 = "10.11.12".as_bytes(); - let v2 = Version { - major: 10, - minor: 11, - patch: 12, - pre: Vec::new(), - build: Vec::new(), - }; - - assert_eq!(version(v1), done(v2)); - } - - #[test] - fn parse_pre_basic() { - let v1 = "1.0.0-alpha".as_bytes(); - let v2 = Version { - major: 1, - minor: 0, - patch: 0, - pre: vec![Identifier::AlphaNumeric(String::from("alpha"))], - build: Vec::new(), - }; - - assert_eq!(version(v1), done(v2)); - } - - #[test] - fn parse_pre_dot() { - let v1 = "1.0.0-alpha.1".as_bytes(); - let v2 = Version { - major: 1, - minor: 0, - patch: 0, - pre: vec![Identifier::AlphaNumeric(String::from("alpha")), Identifier::Numeric(1)], - build: Vec::new(), - }; - - assert_eq!(version(v1), done(v2)); - } - - #[test] - fn parse_build_basic() { - let v1 = "1.0.0-alpha+001".as_bytes(); - let v2 = Version { - major: 1, - minor: 0, - patch: 0, - pre: vec![Identifier::AlphaNumeric(String::from("alpha"))], - build: vec![Identifier::Numeric(1)], - }; - - assert_eq!(version(v1), done(v2)); - } - - #[test] - fn parse_build_no_pre() { - let v1 = "1.0.0+001".as_bytes(); - let v2 = Version { - major: 1, - minor: 0, - patch: 0, - pre: Vec::new(), - build: vec![Identifier::Numeric(1)], - }; - - assert_eq!(version(v1), done(v2)); - } - - #[test] - fn parse_hypen_in_pre() { - let v1 = "3.0.0-rc1-1".as_bytes(); - let v2 = Version { - major: 3, - minor: 0, - patch: 0, - pre: vec![Identifier::AlphaNumeric(String::from("rc1-1"))], - build: Vec::new(), - }; - - assert_eq!(version(v1), done(v2)); - } -} diff --git a/deps/semver-0.2.2/src/version.rs b/deps/semver-0.2.2/src/version.rs deleted file mode 100644 index 0d6e1ba48..000000000 --- a/deps/semver-0.2.2/src/version.rs +++ /dev/null @@ -1,482 +0,0 @@ -// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -//! The `version` module gives you tools to create and compare SemVer-compliant -//! versions. - -use std::cmp::{self, Ordering}; -use std::fmt; -use std::hash; -use std::error::Error; - -use std::result; - -use parser; - -/// An identifier in the pre-release or build metadata. -/// -/// See sections 9 and 10 of the spec for more about pre-release identifers and -/// build metadata. -#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)] -pub enum Identifier { - /// An identifier that's solely numbers. - Numeric(u64), - /// An identifier with letters and numbers. - AlphaNumeric(String) -} - -impl fmt::Display for Identifier { - #[inline] - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - match *self { - Identifier::Numeric(ref n) => fmt::Display::fmt(n, f), - Identifier::AlphaNumeric(ref s) => fmt::Display::fmt(s, f), - } - } -} - -/// Represents a version number conforming to the semantic versioning scheme. -#[derive(Clone, Eq, Debug)] -pub struct Version { - /// The major version, to be incremented on incompatible changes. - pub major: u64, - /// The minor version, to be incremented when functionality is added in a - /// backwards-compatible manner. - pub minor: u64, - /// The patch version, to be incremented when backwards-compatible bug - /// fixes are made. - pub patch: u64, - /// The pre-release version identifier, if one exists. - pub pre: Vec<Identifier>, - /// The build metadata, ignored when determining version precedence. - pub build: Vec<Identifier>, -} - -/// An error type for this crate -/// -/// Currently, just a generic error. Will make this nicer later. -#[derive(Clone,PartialEq,Debug,PartialOrd)] -pub enum SemVerError { - ParseError(String), -} - -impl fmt::Display for SemVerError { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - match self { - &SemVerError::ParseError(ref m) => write!(f, "{}", m), - } - } -} - -impl Error for SemVerError { - fn description(&self) -> &str { - match self { - &SemVerError::ParseError(ref m) => m, - } - } -} - -/// A Result type for errors -pub type Result<T> = result::Result<T, SemVerError>; - -impl Version { - /// Parse a string into a semver object. - pub fn parse(version: &str) -> Result<Version> { - let res = parser::try_parse(version.trim().as_bytes()); - - match res { - // Convert plain String error into proper ParseError - Err(e) => Err(SemVerError::ParseError(e)), - Ok(v) => Ok(v), - } - } - - /// Clears the build metadata - fn clear_metadata(&mut self) { - self.build = Vec::new(); - self.pre = Vec::new(); - } - - /// Increments the patch number for this Version (Must be mutable) - pub fn increment_patch(&mut self) { - self.patch += 1; - self.clear_metadata(); - } - - /// Increments the minor version number for this Version (Must be mutable) - /// - /// As instructed by section 7 of the spec, the patch number is reset to 0. - pub fn increment_minor(&mut self) { - self.minor += 1; - self.patch = 0; - self.clear_metadata(); - } - - /// Increments the major version number for this Version (Must be mutable) - /// - /// As instructed by section 8 of the spec, the minor and patch numbers are - /// reset to 0 - pub fn increment_major(&mut self) { - self.major += 1; - self.minor = 0; - self.patch = 0; - self.clear_metadata(); - } - - /// Checks to see if the current Version is in pre-release status - pub fn is_prerelease(&self) -> bool { - !self.pre.is_empty() - } -} - - -impl fmt::Display for Version { - #[inline] - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - try!(write!(f, "{}.{}.{}", self.major, self.minor, self.patch)); - if !self.pre.is_empty() { - try!(write!(f, "-")); - for (i, x) in self.pre.iter().enumerate() { - if i != 0 { try!(write!(f, ".")) }; - try!(write!(f, "{}", x)); - } - } - if !self.build.is_empty() { - try!(write!(f, "+")); - for (i, x) in self.build.iter().enumerate() { - if i != 0 { try!(write!(f, ".")) }; - try!(write!(f, "{}", x)); - } - } - Ok(()) - } -} - -impl cmp::PartialEq for Version { - #[inline] - fn eq(&self, other: &Version) -> bool { - // We should ignore build metadata here, otherwise versions v1 and v2 - // can exist such that !(v1 < v2) && !(v1 > v2) && v1 != v2, which - // violate strict total ordering rules. - self.major == other.major && - self.minor == other.minor && - self.patch == other.patch && - self.pre == other.pre - } -} - -impl cmp::PartialOrd for Version { - fn partial_cmp(&self, other: &Version) -> Option<Ordering> { - Some(self.cmp(other)) - } -} - -impl cmp::Ord for Version { - fn cmp(&self, other: &Version) -> Ordering { - match self.major.cmp(&other.major) { - Ordering::Equal => {} - r => return r, - } - - match self.minor.cmp(&other.minor) { - Ordering::Equal => {} - r => return r, - } - - match self.patch.cmp(&other.patch) { - Ordering::Equal => {} - r => return r, - } - - // NB: semver spec says 0.0.0-pre < 0.0.0 - // but the version of ord defined for vec - // says that [] < [pre] so we alter it here - match (self.pre.len(), other.pre.len()) { - (0, 0) => Ordering::Equal, - (0, _) => Ordering::Greater, - (_, 0) => Ordering::Less, - (_, _) => self.pre.cmp(&other.pre) - } - } -} - -impl hash::Hash for Version { - fn hash<H: hash::Hasher>(&self, into: &mut H) { - self.major.hash(into); - self.minor.hash(into); - self.patch.hash(into); - self.pre.hash(into); - } -} - -#[cfg(test)] -mod tests { - use std::result; - use super::Version; - use super::Identifier; - use super::SemVerError; - - #[test] - fn test_parse() { - fn parse_error(e: &str) -> result::Result<Version, SemVerError> { - return Err(SemVerError::ParseError(e.to_string())) - } - - assert_eq!(Version::parse(""), parse_error("Parse error")); - assert_eq!(Version::parse(" "), parse_error("Parse error")); - assert_eq!(Version::parse("1"), parse_error("Parse error")); - assert_eq!(Version::parse("1.2"), parse_error("Parse error")); - assert_eq!(Version::parse("1.2.3-"), parse_error("Failed with unparsed input: '-'")); - assert_eq!(Version::parse("a.b.c"), parse_error("Parse error")); - assert_eq!(Version::parse("1.2.3 abc"), parse_error("Failed with unparsed input: ' abc'")); - - assert_eq!(Version::parse("1.2.3"), Ok(Version { - major: 1, - minor: 2, - patch: 3, - pre: Vec::new(), - build: Vec::new(), - })); - assert_eq!(Version::parse(" 1.2.3 "), Ok(Version { - major: 1, - minor: 2, - patch: 3, - pre: Vec::new(), - build: Vec::new(), - })); - assert_eq!(Version::parse("1.2.3-alpha1"), Ok(Version { - major: 1, - minor: 2, - patch: 3, - pre: vec![Identifier::AlphaNumeric(String::from("alpha1"))], - build: Vec::new(), - })); - assert_eq!(Version::parse(" 1.2.3-alpha1 "), Ok(Version { - major: 1, - minor: 2, - patch: 3, - pre: vec![Identifier::AlphaNumeric(String::from("alpha1"))], - build: Vec::new(), - })); - assert_eq!(Version::parse("1.2.3+build5"), Ok(Version { - major: 1, - minor: 2, - patch: 3, - pre: Vec::new(), - build: vec![Identifier::AlphaNumeric(String::from("build5"))], - })); - assert_eq!(Version::parse(" 1.2.3+build5 "), Ok(Version { - major: 1, - minor: 2, - patch: 3, - pre: Vec::new(), - build: vec![Identifier::AlphaNumeric(String::from("build5"))], - })); - assert_eq!(Version::parse("1.2.3-alpha1+build5"), Ok(Version { - major: 1, - minor: 2, - patch: 3, - pre: vec![Identifier::AlphaNumeric(String::from("alpha1"))], - build: vec![Identifier::AlphaNumeric(String::from("build5"))], - })); - assert_eq!(Version::parse(" 1.2.3-alpha1+build5 "), Ok(Version { - major: 1, - minor: 2, - patch: 3, - pre: vec![Identifier::AlphaNumeric(String::from("alpha1"))], - build: vec![Identifier::AlphaNumeric(String::from("build5"))], - })); - assert_eq!(Version::parse("1.2.3-1.alpha1.9+build5.7.3aedf "), Ok(Version { - major: 1, - minor: 2, - patch: 3, - pre: vec![Identifier::Numeric(1), - Identifier::AlphaNumeric(String::from("alpha1")), - Identifier::Numeric(9), - ], - build: vec![Identifier::AlphaNumeric(String::from("build5")), - Identifier::Numeric(7), - Identifier::AlphaNumeric(String::from("3aedf")), - ], - })); - assert_eq!(Version::parse("0.4.0-beta.1+0851523"), Ok(Version { - major: 0, - minor: 4, - patch: 0, - pre: vec![Identifier::AlphaNumeric(String::from("beta")), - Identifier::Numeric(1), - ], - build: vec![Identifier::AlphaNumeric(String::from("0851523"))], - })); - - } - - #[test] - fn test_increment_patch() { - let mut buggy_release = Version::parse("0.1.0").unwrap(); - buggy_release.increment_patch(); - assert_eq!(buggy_release, Version::parse("0.1.1").unwrap()); - } - - #[test] - fn test_increment_minor() { - let mut feature_release = Version::parse("1.4.6").unwrap(); - feature_release.increment_minor(); - assert_eq!(feature_release, Version::parse("1.5.0").unwrap()); - } - - #[test] - fn test_increment_major() { - let mut chrome_release = Version::parse("46.1.246773").unwrap(); - chrome_release.increment_major(); - assert_eq!(chrome_release, Version::parse("47.0.0").unwrap()); - } - - #[test] - fn test_increment_keep_prerelease() { - let mut release = Version::parse("1.0.0-alpha").unwrap(); - release.increment_patch(); - - assert_eq!(release, Version::parse("1.0.1").unwrap()); - - release.increment_minor(); - - assert_eq!(release, Version::parse("1.1.0").unwrap()); - - release.increment_major(); - - assert_eq!(release, Version::parse("2.0.0").unwrap()); - } - - - #[test] - fn test_increment_clear_metadata() { - let mut release = Version::parse("1.0.0+4442").unwrap(); - release.increment_patch(); - - assert_eq!(release, Version::parse("1.0.1").unwrap()); - release = Version::parse("1.0.1+hello").unwrap(); - - release.increment_minor(); - - assert_eq!(release, Version::parse("1.1.0").unwrap()); - release = Version::parse("1.1.3747+hello").unwrap(); - - release.increment_major(); - - assert_eq!(release, Version::parse("2.0.0").unwrap()); - } - - #[test] - fn test_eq() { - assert_eq!(Version::parse("1.2.3"), Version::parse("1.2.3")); - assert_eq!(Version::parse("1.2.3-alpha1"), Version::parse("1.2.3-alpha1")); - assert_eq!(Version::parse("1.2.3+build.42"), Version::parse("1.2.3+build.42")); - assert_eq!(Version::parse("1.2.3-alpha1+42"), Version::parse("1.2.3-alpha1+42")); - assert_eq!(Version::parse("1.2.3+23"), Version::parse("1.2.3+42")); - } - - #[test] - fn test_ne() { - assert!(Version::parse("0.0.0") != Version::parse("0.0.1")); - assert!(Version::parse("0.0.0") != Version::parse("0.1.0")); - assert!(Version::parse("0.0.0") != Version::parse("1.0.0")); - assert!(Version::parse("1.2.3-alpha") != Version::parse("1.2.3-beta")); - } - - #[test] - fn test_show() { - assert_eq!(format!("{}", Version::parse("1.2.3").unwrap()), - "1.2.3".to_string()); - assert_eq!(format!("{}", Version::parse("1.2.3-alpha1").unwrap()), - "1.2.3-alpha1".to_string()); - assert_eq!(format!("{}", Version::parse("1.2.3+build.42").unwrap()), - "1.2.3+build.42".to_string()); - assert_eq!(format!("{}", Version::parse("1.2.3-alpha1+42").unwrap()), - "1.2.3-alpha1+42".to_string()); - } - - #[test] - fn test_to_string() { - assert_eq!(Version::parse("1.2.3").unwrap().to_string(), "1.2.3".to_string()); - assert_eq!(Version::parse("1.2.3-alpha1").unwrap().to_string(), "1.2.3-alpha1".to_string()); - assert_eq!(Version::parse("1.2.3+build.42").unwrap().to_string(), "1.2.3+build.42".to_string()); - assert_eq!(Version::parse("1.2.3-alpha1+42").unwrap().to_string(), "1.2.3-alpha1+42".to_string()); - } - - #[test] - fn test_lt() { - assert!(Version::parse("0.0.0") < Version::parse("1.2.3-alpha2")); - assert!(Version::parse("1.0.0") < Version::parse("1.2.3-alpha2")); - assert!(Version::parse("1.2.0") < Version::parse("1.2.3-alpha2")); - assert!(Version::parse("1.2.3-alpha1") < Version::parse("1.2.3")); - assert!(Version::parse("1.2.3-alpha1") < Version::parse("1.2.3-alpha2")); - assert!(!(Version::parse("1.2.3-alpha2") < Version::parse("1.2.3-alpha2"))); - assert!(!(Version::parse("1.2.3+23") < Version::parse("1.2.3+42"))); - } - - #[test] - fn test_le() { - assert!(Version::parse("0.0.0") <= Version::parse("1.2.3-alpha2")); - assert!(Version::parse("1.0.0") <= Version::parse("1.2.3-alpha2")); - assert!(Version::parse("1.2.0") <= Version::parse("1.2.3-alpha2")); - assert!(Version::parse("1.2.3-alpha1") <= Version::parse("1.2.3-alpha2")); - assert!(Version::parse("1.2.3-alpha2") <= Version::parse("1.2.3-alpha2")); - assert!(Version::parse("1.2.3+23") <= Version::parse("1.2.3+42")); - } - - #[test] - fn test_gt() { - assert!(Version::parse("1.2.3-alpha2") > Version::parse("0.0.0")); - assert!(Version::parse("1.2.3-alpha2") > Version::parse("1.0.0")); - assert!(Version::parse("1.2.3-alpha2") > Version::parse("1.2.0")); - assert!(Version::parse("1.2.3-alpha2") > Version::parse("1.2.3-alpha1")); - assert!(Version::parse("1.2.3") > Version::parse("1.2.3-alpha2")); - assert!(!(Version::parse("1.2.3-alpha2") > Version::parse("1.2.3-alpha2"))); - assert!(!(Version::parse("1.2.3+23") > Version::parse("1.2.3+42"))); - } - - #[test] - fn test_ge() { - assert!(Version::parse("1.2.3-alpha2") >= Version::parse("0.0.0")); - assert!(Version::parse("1.2.3-alpha2") >= Version::parse("1.0.0")); - assert!(Version::parse("1.2.3-alpha2") >= Version::parse("1.2.0")); - assert!(Version::parse("1.2.3-alpha2") >= Version::parse("1.2.3-alpha1")); - assert!(Version::parse("1.2.3-alpha2") >= Version::parse("1.2.3-alpha2")); - assert!(Version::parse("1.2.3+23") >= Version::parse("1.2.3+42")); - } - - #[test] - fn test_prerelease_check() { - assert!(Version::parse("1.0.0").unwrap().is_prerelease() == false); - assert!(Version::parse("0.0.1").unwrap().is_prerelease() == false); - assert!(Version::parse("4.1.4-alpha").unwrap().is_prerelease()); - assert!(Version::parse("1.0.0-beta294296").unwrap().is_prerelease()); - } - - #[test] - fn test_spec_order() { - let vs = ["1.0.0-alpha", - "1.0.0-alpha.1", - "1.0.0-alpha.beta", - "1.0.0-beta", - "1.0.0-beta.2", - "1.0.0-beta.11", - "1.0.0-rc.1", - "1.0.0"]; - let mut i = 1; - while i < vs.len() { - let a = Version::parse(vs[i-1]); - let b = Version::parse(vs[i]); - assert!(a < b, "nope {:?} < {:?}", a, b); - i += 1; - } - } -} diff --git a/deps/semver-0.2.2/src/version_req.rs b/deps/semver-0.2.2/src/version_req.rs deleted file mode 100644 index 41150b9c5..000000000 --- a/deps/semver-0.2.2/src/version_req.rs +++ /dev/null @@ -1,1082 +0,0 @@ -// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -use std::error::Error; -use std::fmt; -use std::str::CharIndices; - -use Version; -use version::Identifier; - -use self::VersionComponent::{NumericVersionComponent, WildcardVersionComponent}; -use self::Op::{Ex, Gt, GtEq, Lt, LtEq, Tilde, Compatible, Wildcard}; -use self::LexState::{LexInit, LexStart, LexVersionComponent, LexSigil, LexErr}; -use self::LexState::{LexIdentInit, LexIdentStart, LexIdent}; -use self::Token::{Sigil, AlphaNum, Comma, Dot, Dash}; -use self::WildcardVersion::{Major, Minor, Patch}; -use self::ReqParseError::{ - InvalidVersionRequirement, - OpAlreadySet, - InvalidSigil, - VersionComponentsMustBeNumeric, - InvalidIdentifier, - MajorVersionRequired, - UnimplementedVersionRequirement -}; - -/// A `VersionReq` is a struct containing a list of predicates that can apply to ranges of version -/// numbers. Matching operations can then be done with the `VersionReq` against a particular -/// version to see if it satisfies some or all of the constraints. -#[derive(PartialEq,Clone,Debug)] -pub struct VersionReq { - predicates: Vec<Predicate> -} - -enum VersionComponent { - NumericVersionComponent(u64), - WildcardVersionComponent -} - -#[derive(Clone, PartialEq, Debug)] -enum WildcardVersion { - Major, - Minor, - Patch -} - -#[derive(PartialEq,Clone,Debug)] -enum Op { - Ex, // Exact - Gt, // Greater than - GtEq, // Greater than or equal to - Lt, // Less than - LtEq, // Less than or equal to - Tilde, // e.g. ~1.0.0 - Compatible, // compatible by definition of semver, indicated by ^ - Wildcard(WildcardVersion), // x.y.*, x.*, * -} - -#[derive(PartialEq,Clone,Debug)] -struct Predicate { - op: Op, - major: u64, - minor: Option<u64>, - patch: Option<u64>, - pre: Vec<Identifier>, -} - -struct PredBuilder { - op: Option<Op>, - major: Option<u64>, - minor: Option<u64>, - patch: Option<u64>, - pre: Vec<Identifier>, - has_pre: bool, -} - -/// A `ReqParseError` is returned from methods which parse a string into a `VersionReq`. Each -/// enumeration is one of the possible errors that can occur. -#[derive(Copy, Clone, Debug, PartialEq)] -pub enum ReqParseError { - /// The given version requirement is invalid. - InvalidVersionRequirement, - /// You have already provided an operation, such as `=`, `~`, or `^`. Only use one. - OpAlreadySet, - /// The sigil you have written is not correct. - InvalidSigil, - /// All components of a version must be numeric. - VersionComponentsMustBeNumeric, - /// There was an error parsing an identifier. - InvalidIdentifier, - /// At least a major version is required. - MajorVersionRequired, - /// An unimplemented version requirement. - UnimplementedVersionRequirement, -} - -impl fmt::Display for ReqParseError { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - self.description().fmt(f) - } -} - -impl Error for ReqParseError { - fn description(&self) -> &str { - match *self { - InvalidVersionRequirement => "the given version requirement is invalid", - OpAlreadySet => "you have already provided an operation, such as =, ~, or ^; only use one", - InvalidSigil => "the sigil you have written is not correct", - VersionComponentsMustBeNumeric => "version components must be numeric", - InvalidIdentifier => "invalid identifier", - MajorVersionRequired => "at least a major version number is required", - UnimplementedVersionRequirement => "the given version requirement is not implemented, yet", - } - } -} - -impl VersionReq { - /// `any()` is a factory method which creates a `VersionReq` with no constraints. In other - /// words, any version will match against it. - /// - /// # Examples - /// - /// ``` - /// use semver::VersionReq; - /// - /// let anything = VersionReq::any(); - /// ``` - pub fn any() -> VersionReq { - VersionReq { predicates: vec!() } - } - - /// `parse()` is the main constructor of a `VersionReq`. It turns a string like `"^1.2.3"` - /// and turns it into a `VersionReq` that matches that particular constraint. - /// - /// A `Result` is returned which contains a `ReqParseError` if there was a problem parsing the - /// `VersionReq`. - /// - /// # Examples - /// - /// ``` - /// use semver::VersionReq; - /// - /// let version = VersionReq::parse("=1.2.3"); - /// let version = VersionReq::parse(">1.2.3"); - /// let version = VersionReq::parse("<1.2.3"); - /// let version = VersionReq::parse("~1.2.3"); - /// let version = VersionReq::parse("^1.2.3"); - /// let version = VersionReq::parse("<=1.2.3"); - /// let version = VersionReq::parse(">=1.2.3"); - /// ``` - /// - /// This example demonstrates error handling, and will panic. - /// - /// ```should-panic - /// use semver::VersionReq; - /// - /// let version = match VersionReq::parse("not a version") { - /// Ok(version) => version, - /// Err(e) => panic!("There was a problem parsing: {}", e), - /// } - /// ``` - pub fn parse(input: &str) -> Result<VersionReq, ReqParseError> { - if input == "" { - return Ok(VersionReq { predicates: vec![ - Predicate { - op: Wildcard(Major), - major: 0, - minor: None, - patch: None, - pre: vec!(), - } - ]}); - } - - let mut lexer = Lexer::new(input); - let mut builder = PredBuilder::new(); - let mut predicates = Vec::new(); - - for token in lexer.by_ref() { - let result = match token { - Sigil(x) => builder.set_sigil(x), - AlphaNum(x) => builder.set_version_part(x), - Dot => Ok(()), // Nothing to do for now - Comma => { - let result = builder.build().map(|p| predicates.push(p)); - builder = PredBuilder::new(); - result - } - Dash => { - builder.has_pre = true; - Ok(()) - } - }; - - match result { - Ok(_) => (), - Err(e) => return Err(e), - } - } - - if lexer.is_error() { - return Err(InvalidVersionRequirement); - } - - match builder.build() { - Ok(e) => predicates.push(e), - Err(e) => return Err(e), - } - - Ok(VersionReq { predicates: predicates }) - } - - /// `exact()` is a factory method which creates a `VersionReq` with one exact constraint. - /// - /// # Examples - /// - /// ``` - /// use semver::VersionReq; - /// use semver::Version; - /// - /// let version = Version { major: 1, minor: 1, patch: 1, pre: vec![], build: vec![] }; - /// let exact = VersionReq::exact(&version); - /// ``` - pub fn exact(version: &Version) -> VersionReq { - VersionReq { predicates: vec!(Predicate::exact(version)) } - } - - /// `matches()` matches a given `Version` against this `VersionReq`. - /// - /// # Examples - /// - /// ``` - /// use semver::VersionReq; - /// use semver::Version; - /// - /// let version = Version { major: 1, minor: 1, patch: 1, pre: vec![], build: vec![] }; - /// let exact = VersionReq::exact(&version); - /// - /// assert!(exact.matches(&version)); - /// ``` - pub fn matches(&self, version: &Version) -> bool { - // no predicates means anything matches - if self.predicates.is_empty() { - return true; - } - - self.predicates.iter().all(|p| p.matches(version)) && - self.predicates.iter().any(|p| p.pre_tag_is_compatible(version)) - } -} - -impl Predicate { - fn exact(version: &Version) -> Predicate { - Predicate { - op: Ex, - major: version.major, - minor: Some(version.minor), - patch: Some(version.patch), - pre: version.pre.clone(), - } - } - - /// `matches()` takes a `Version` and determines if it matches this particular `Predicate`. - pub fn matches(&self, ver: &Version) -> bool { - match self.op { - Ex => self.is_exact(ver), - Gt => self.is_greater(ver), - GtEq => self.is_exact(ver) || self.is_greater(ver), - Lt => !self.is_exact(ver) && !self.is_greater(ver), - LtEq => !self.is_greater(ver), - Tilde => self.matches_tilde(ver), - Compatible => self.is_compatible(ver), - Wildcard(_) => self.matches_wildcard(ver) - } - } - - fn is_exact(&self, ver: &Version) -> bool { - if self.major != ver.major { - return false; - } - - match self.minor { - Some(minor) => { - if minor != ver.minor { - return false; - } - } - None => return true - } - - match self.patch { - Some(patch) => { - if patch != ver.patch { - return false; - } - } - None => return true - } - - if self.pre != ver.pre { - return false; - } - - true - } - - // https://docs.npmjs.com/misc/semver#prerelease-tags - fn pre_tag_is_compatible(&self, ver: &Version) -> bool { - // If a version has a prerelease tag (for example, 1.2.3-alpha.3) then it will only be - // allowed to satisfy comparator sets if at least one comparator with the same [major, - // minor, patch] tuple also has a prerelease tag. - !ver.is_prerelease() || (self.major == ver.major && - self.minor == Some(ver.minor) && - self.patch == Some(ver.patch) && - !self.pre.is_empty()) - } - - fn is_greater(&self, ver: &Version) -> bool { - if self.major != ver.major { - return ver.major > self.major; - } - - match self.minor { - Some(minor) => { - if minor != ver.minor { - return ver.minor > minor - } - } - None => return false - } - - match self.patch { - Some(patch) => { - if patch != ver.patch { - return ver.patch > patch - } - } - None => return false - } - - if !self.pre.is_empty() { - return ver.pre.is_empty() || ver.pre > self.pre - } - - false - } - - // see https://www.npmjs.org/doc/misc/semver.html for behavior - fn matches_tilde(&self, ver: &Version) -> bool { - let minor = match self.minor { - Some(n) => n, - None => return self.major == ver.major - }; - - match self.patch { - Some(patch) => { - self.major == ver.major && minor == ver.minor && - (ver.patch > patch || (ver.patch == patch && self.pre_is_compatible(ver))) - } - None => { - self.major == ver.major && minor == ver.minor - } - } - } - - // see https://www.npmjs.org/doc/misc/semver.html for behavior - fn is_compatible(&self, ver: &Version) -> bool { - if self.major != ver.major { - return false; - } - - let minor = match self.minor { - Some(n) => n, - None => return self.major == ver.major - }; - - match self.patch { - Some(patch) => if self.major == 0 { - if minor == 0 { - ver.minor == minor && ver.patch == patch && self.pre_is_compatible(ver) - } else { - ver.minor == minor && (ver.patch > patch || - (ver.patch == patch && self.pre_is_compatible(ver))) - } - } else { - ver.minor > minor || - (ver.minor == minor && (ver.patch > patch || - (ver.patch == patch && self.pre_is_compatible(ver)))) - }, - None => if self.major == 0 { - ver.minor == minor - } else { - ver.minor >= minor - } - } - } - - fn pre_is_compatible(&self, ver: &Version) -> bool { - ver.pre.is_empty() || ver.pre >= self.pre - } - - // see https://www.npmjs.org/doc/misc/semver.html for behavior - fn matches_wildcard(&self, ver: &Version) -> bool { - match self.op { - Wildcard(Major) => true, - Wildcard(Minor) => self.major == ver.major, - Wildcard(Patch) => { - match self.minor { - Some(minor) => self.major == ver.major && minor == ver.minor, - None => false // unreachable - } - } - _ => false // unreachable - } - } -} - -impl PredBuilder { - fn new() -> PredBuilder { - PredBuilder { - op: None, - major: None, - minor: None, - patch: None, - pre: vec!(), - has_pre: false, - } - } - - fn set_sigil(&mut self, sigil: &str) -> Result<(), ReqParseError> { - if self.op.is_some() { - return Err(OpAlreadySet); - } - - match Op::from_sigil(sigil) { - Some(op) => self.op = Some(op), - _ => return Err(InvalidSigil), - } - - Ok(()) - } - - fn set_version_part(&mut self, part: &str) -> Result<(), ReqParseError> { - if self.op.is_none() { - // If no op is specified, then the predicate is an exact match on - // the version - self.op = Some(Compatible); - } - - if self.has_pre { - match parse_ident(part) { - Ok(ident) => self.pre.push(ident), - Err(e) => return Err(e), - } - } - else if self.major.is_none() { - match parse_version_part(part) { - Ok(NumericVersionComponent(e)) => self.major = Some(e), - Ok(WildcardVersionComponent) => { - self.major = Some(0); - self.op = Some(Wildcard(Major)) - } - Err(e) => return Err(e), - } - } else if self.minor.is_none() { - match parse_version_part(part) { - Ok(NumericVersionComponent(e)) => self.minor = Some(e), - Ok(WildcardVersionComponent) => self.op = Some(Wildcard(Minor)), - Err(e) => return Err(e), - } - } - else if self.patch.is_none() { - match parse_version_part(part) { - Ok(NumericVersionComponent(e)) => self.patch = Some(e), - Ok(WildcardVersionComponent) => self.op = Some(Wildcard(Patch)), - Err(e) => return Err(e), - } - } - - Ok(()) - } - - /// Validates that a version predicate can be created given the present - /// information. - fn build(self) -> Result<Predicate, ReqParseError> { - let op = match self.op { - Some(ref x) => x.clone(), - None => return Err(InvalidVersionRequirement), - }; - - let major = match self.major { - Some(x) => x, - None => return Err(MajorVersionRequired), - }; - - if self.has_pre && self.pre.is_empty() { - // Identifiers MUST NOT be empty. - return Err(InvalidIdentifier) - } - - Ok(Predicate { - op: op, - major: major, - minor: self.minor, - patch: self.patch, - pre: self.pre, - }) - } -} - -struct Lexer<'a> { - c: char, - idx: usize, - iter: CharIndices<'a>, - mark: Option<usize>, - input: &'a str, - state: LexState -} - -#[derive(Copy, Clone, Debug, PartialEq)] -enum LexState { - LexInit, - LexStart, - LexVersionComponent, - LexSigil, - LexErr, - LexIdentInit, - LexIdentStart, - LexIdent, -} - -#[derive(Debug)] -enum Token<'a> { - Sigil(&'a str), - AlphaNum(&'a str), - Comma, - Dot, - Dash, -} - -impl<'a> Lexer<'a> { - fn new(input: &'a str) -> Lexer<'a> { - Lexer { - c: '\0', - idx: 0, - iter: input.char_indices(), - mark: None, - input: input, - state: LexInit - } - } - - fn is_error(&self) -> bool { - self.state == LexErr - } - - fn mark(&mut self, at: usize) { - self.mark = Some(at) - } - - fn flush(&mut self, to: usize, kind: LexState) -> Option<Token<'a>> { - match self.mark { - Some(mark) => { - if to <= mark { - return None; - } - - let s = &self.input[mark..to]; - - self.mark = None; - - match kind { - LexVersionComponent => Some(AlphaNum(s)), - LexIdent => Some(AlphaNum(s)), - LexSigil => Some(Sigil(s)), - _ => None // bug - } - } - None => None - } - } -} - -impl<'a> Iterator for Lexer<'a> { - type Item = Token<'a>; - - fn next(&mut self) -> Option<Token<'a>> { - let mut c; - let mut idx = 0; - - macro_rules! next { - () => ( - match self.iter.next() { - Some((n_idx, n_char)) => { - c = n_char; - idx = n_idx; - } - _ => { - let s = self.state; - return self.flush(idx + 1, s) - } - } - ) - } - - macro_rules! flush { - ($s:expr) => ({ - self.c = c; - self.idx = idx; - self.flush(idx, $s) - }) - } - - - if self.state == LexInit { - self.state = LexStart; - next!(); - } else if self.state == LexIdentInit { - self.state = LexIdentStart; - next!(); - } else { - c = self.c; - idx = self.idx; - } - - loop { - match self.state { - LexStart => { - if c.is_whitespace() { - next!(); // Ignore - } - else if c.is_alphanumeric() || c == '*' { - self.mark(idx); - self.state = LexVersionComponent; - next!(); - } - else if is_sigil(c) { - self.mark(idx); - self.state = LexSigil; - next!(); - } - else if c == '.' { - self.state = LexInit; - return Some(Dot); - } - else if c == ',' { - self.state = LexInit; - return Some(Comma); - } - else if c == '-' { - self.state = LexIdentInit; - return Some(Dash); - } else { - self.state = LexErr; - return None; - } - } - LexVersionComponent => { - if c.is_alphanumeric() { - next!(); - } else { - self.state = LexStart; - return flush!(LexVersionComponent); - } - } - LexSigil => { - if is_sigil(c) { - next!(); - } else { - self.state = LexStart; - return flush!(LexSigil); - } - } - LexIdentStart => { - if c.is_alphanumeric() || c == '-' { - self.mark(idx); - self.state = LexIdent; - next!(); - } else if c == '.' { - self.state = LexIdentInit; - return Some(Dot) - } else if c == ',' { - self.state = LexInit; - return Some(Comma) - } else { - self.state = LexErr; - return None - } - } - LexIdent => { - if c.is_alphanumeric() || c == '-'{ - next!(); - } else { - self.state = LexIdentStart; - return flush!(LexIdent); - } - } - LexErr => return None, - LexInit | LexIdentInit => return None // bug - } - } - } -} - -impl Op { - fn from_sigil(sigil: &str) -> Option<Op> { - match sigil { - "=" => Some(Ex), - ">" => Some(Gt), - ">=" => Some(GtEq), - "<" => Some(Lt), - "<=" => Some(LtEq), - "~" => Some(Tilde), - "^" => Some(Compatible), - _ => None - } - } -} - -fn parse_version_part(s: &str) -> Result<VersionComponent, ReqParseError> { - let mut ret = 0; - - if ["*", "x", "X"].contains(&s) { - return Ok(WildcardVersionComponent) - } - - for c in s.chars() { - let n = (c as u64) - ('0' as u64); - - if n > 9 { - return Err(VersionComponentsMustBeNumeric); - } - - ret *= 10; - ret += n; - } - - Ok(NumericVersionComponent(ret)) -} - -fn parse_ident(s: &str) -> Result<Identifier, ReqParseError> { - if s.is_empty() { - return Err(InvalidIdentifier) - } else if s.chars().all(|c| c.is_digit(10)) { - s.parse::<u64>().map(Identifier::Numeric).or(Err(InvalidIdentifier)) - } else { - Ok(Identifier::AlphaNumeric(s.to_owned())) - } -} - -fn is_sigil(c: char) -> bool { - match c { - '>' | '<' | '=' | '~' | '^' => true, - _ => false - } -} - -impl fmt::Display for VersionReq { - fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { - if self.predicates.is_empty() { - try!(write!(fmt, "*")); - } else { - for (i, ref pred) in self.predicates.iter().enumerate() { - if i == 0 { - try!(write!(fmt, "{}", pred)); - } else { - try!(write!(fmt, ", {}", pred)); - } - } - } - - Ok(()) - } -} - -impl fmt::Display for Predicate { - fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { - match self.op { - Wildcard(Major) => try!(write!(fmt, "*")), - Wildcard(Minor) => try!(write!(fmt, "{}.*", self.major)), - Wildcard(Patch) => try!(write!(fmt, "{}.{}.*", self.major, self.minor.unwrap())), - _ => { - try!(write!(fmt, "{}{}", self.op, self.major)); - - match self.minor { - Some(v) => try!(write!(fmt, ".{}", v)), - None => () - } - - match self.patch { - Some(v) => try!(write!(fmt, ".{}", v)), - None => () - } - - if !self.pre.is_empty() { - try!(write!(fmt, "-")); - for (i, x) in self.pre.iter().enumerate() { - if i != 0 { try!(write!(fmt, ".")) }; - try!(write!(fmt, "{}", x)); - } - } - }, - } - - Ok(()) - } -} - -impl fmt::Display for Op { - fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { - match *self { - Ex => try!(write!(fmt, "= ")), - Gt => try!(write!(fmt, "> ")), - GtEq => try!(write!(fmt, ">= ")), - Lt => try!(write!(fmt, "< ")), - LtEq => try!(write!(fmt, "<= ")), - Tilde => try!(write!(fmt, "~")), - Compatible => try!(write!(fmt, "^")), - // gets handled specially in Predicate::fmt - Wildcard(_) => try!(write!(fmt, "")), - } - Ok(()) - } -} - -#[cfg(test)] -mod test { - use super::VersionReq; - use super::super::version::Version; - use super::ReqParseError::{ - InvalidVersionRequirement, - OpAlreadySet, - InvalidSigil, - VersionComponentsMustBeNumeric, - InvalidIdentifier, - MajorVersionRequired, - }; - - fn req(s: &str) -> VersionReq { - VersionReq::parse(s).unwrap() - } - - fn version(s: &str) -> Version { - match Version::parse(s) { - Ok(v) => v, - Err(e) => panic!("`{}` is not a valid version. Reason: {:?}", s, e) - } - } - - fn assert_match(req: &VersionReq, vers: &[&str]) { - for ver in vers.iter() { - assert!(req.matches(&version(*ver)), "did not match {}", ver); - } - } - - fn assert_not_match(req: &VersionReq, vers: &[&str]) { - for ver in vers.iter() { - assert!(!req.matches(&version(*ver)), "matched {}", ver); - } - } - - #[test] - fn test_parsing_default() { - let r = req("1.0.0"); - - assert_eq!(r.to_string(), "^1.0.0".to_string()); - - assert_match(&r, &["1.0.0", "1.0.1"]); - assert_not_match(&r, &["0.9.9", "0.10.0", "0.1.0"]); - } - - #[test] - fn test_parsing_exact() { - let r = req("=1.0.0"); - - assert!(r.to_string() == "= 1.0.0".to_string()); - assert_eq!(r.to_string(), "= 1.0.0".to_string()); - - assert_match(&r, &["1.0.0"]); - assert_not_match(&r, &["1.0.1", "0.9.9", "0.10.0", "0.1.0", "1.0.0-pre"]); - - let r = req("=0.9.0"); - - assert_eq!(r.to_string(), "= 0.9.0".to_string()); - - assert_match(&r, &["0.9.0"]); - assert_not_match(&r, &["0.9.1", "1.9.0", "0.0.9"]); - - let r = req("=0.1.0-beta2.a"); - - assert_eq!(r.to_string(), "= 0.1.0-beta2.a".to_string()); - - assert_match(&r, &["0.1.0-beta2.a"]); - assert_not_match(&r, &["0.9.1", "0.1.0", "0.1.1-beta2.a", "0.1.0-beta2"]); - } - - #[test] - pub fn test_parsing_greater_than() { - let r = req(">= 1.0.0"); - - assert_eq!(r.to_string(), ">= 1.0.0".to_string()); - - assert_match(&r, &["1.0.0", "2.0.0"]); - assert_not_match(&r, &["0.1.0", "0.0.1", "1.0.0-pre", "2.0.0-pre"]); - - let r = req(">= 2.1.0-alpha2"); - - assert_match(&r, &["2.1.0-alpha2", "2.1.0-alpha3", "2.1.0", "3.0.0"]); - assert_not_match(&r, &["2.0.0", "2.1.0-alpha1", "2.0.0-alpha2", "3.0.0-alpha2"]); - } - - #[test] - pub fn test_parsing_less_than() { - let r = req("< 1.0.0"); - - assert_eq!(r.to_string(), "< 1.0.0".to_string()); - - assert_match(&r, &["0.1.0", "0.0.1"]); - assert_not_match(&r, &["1.0.0", "1.0.0-beta", "1.0.1", "0.9.9-alpha"]); - - let r = req("<= 2.1.0-alpha2"); - - assert_match(&r, &["2.1.0-alpha2", "2.1.0-alpha1", "2.0.0", "1.0.0"]); - assert_not_match(&r, &["2.1.0", "2.2.0-alpha1", "2.0.0-alpha2", "1.0.0-alpha2"]); - } - - #[test] - pub fn test_multiple() { - let r = req("> 0.0.9, <= 2.5.3"); - assert_eq!(r.to_string(), "> 0.0.9, <= 2.5.3".to_string()); - assert_match(&r, &["0.0.10", "1.0.0", "2.5.3"]); - assert_not_match(&r, &["0.0.8", "2.5.4"]); - - let r = req("0.3.0, 0.4.0"); - assert_eq!(r.to_string(), "^0.3.0, ^0.4.0".to_string()); - assert_not_match(&r, &["0.0.8", "0.3.0", "0.4.0"]); - - let r = req("<= 0.2.0, >= 0.5.0"); - assert_eq!(r.to_string(), "<= 0.2.0, >= 0.5.0".to_string()); - assert_not_match(&r, &["0.0.8", "0.3.0", "0.5.1"]); - - let r = req("0.1.0, 0.1.4, 0.1.6"); - assert_eq!(r.to_string(), "^0.1.0, ^0.1.4, ^0.1.6".to_string()); - assert_match(&r, &["0.1.6", "0.1.9"]); - assert_not_match(&r, &["0.1.0", "0.1.4", "0.2.0"]); - - assert!(VersionReq::parse("> 0.1.0,").is_err()); - assert!(VersionReq::parse("> 0.3.0, ,").is_err()); - - let r = req(">=0.5.1-alpha3, <0.6"); - assert_eq!(r.to_string(), ">= 0.5.1-alpha3, < 0.6".to_string()); - assert_match(&r, &["0.5.1-alpha3", "0.5.1-alpha4", "0.5.1-beta", "0.5.1", "0.5.5"]); - assert_not_match(&r, &["0.5.1-alpha1", "0.5.2-alpha3", "0.5.5-pre", "0.5.0-pre"]); - assert_not_match(&r, &["0.6.0", "0.6.0-pre"]); - } - - #[test] - pub fn test_parsing_tilde() { - let r = req("~1"); - assert_match(&r, &["1.0.0", "1.0.1", "1.1.1"]); - assert_not_match(&r, &["0.9.1", "2.9.0", "0.0.9"]); - - let r = req("~1.2"); - assert_match(&r, &["1.2.0", "1.2.1"]); - assert_not_match(&r, &["1.1.1", "1.3.0", "0.0.9"]); - - let r = req("~1.2.2"); - assert_match(&r, &["1.2.2", "1.2.4"]); - assert_not_match(&r, &["1.2.1", "1.9.0", "1.0.9", "2.0.1", "0.1.3"]); - - let r = req("~1.2.3-beta.2"); - assert_match(&r, &["1.2.3", "1.2.4", "1.2.3-beta.2", "1.2.3-beta.4"]); - assert_not_match(&r, &["1.3.3", "1.1.4", "1.2.3-beta.1", "1.2.4-beta.2"]); - } - - #[test] - pub fn test_parsing_compatible() { - let r = req("^1"); - assert_match(&r, &["1.1.2", "1.1.0", "1.2.1", "1.0.1"]); - assert_not_match(&r, &["0.9.1", "2.9.0", "0.1.4"]); - assert_not_match(&r, &["1.0.0-beta1", "0.1.0-alpha", "1.0.1-pre"]); - - let r = req("^1.1"); - assert_match(&r, &["1.1.2", "1.1.0", "1.2.1"]); - assert_not_match(&r, &["0.9.1", "2.9.0", "1.0.1", "0.1.4"]); - - let r = req("^1.1.2"); - assert_match(&r, &["1.1.2", "1.1.4", "1.2.1"]); - assert_not_match(&r, &["0.9.1", "2.9.0", "1.1.1", "0.0.1"]); - assert_not_match(&r, &["1.1.2-alpha1", "1.1.3-alpha1", "2.9.0-alpha1"]); - - let r = req("^0.1.2"); - assert_match(&r, &["0.1.2", "0.1.4"]); - assert_not_match(&r, &["0.9.1", "2.9.0", "1.1.1", "0.0.1"]); - assert_not_match(&r, &["0.1.2-beta", "0.1.3-alpha", "0.2.0-pre"]); - - let r = req("^0.5.1-alpha3"); - assert_match(&r, &["0.5.1-alpha3", "0.5.1-alpha4", "0.5.1-beta", "0.5.1", "0.5.5"]); - assert_not_match(&r, &["0.5.1-alpha1", "0.5.2-alpha3", "0.5.5-pre", "0.5.0-pre", "0.6.0"]); - - let r = req("^0.0.2"); - assert_match(&r, &["0.0.2"]); - assert_not_match(&r, &["0.9.1", "2.9.0", "1.1.1", "0.0.1", "0.1.4"]); - - let r = req("^0.0"); - assert_match(&r, &["0.0.2", "0.0.0"]); - assert_not_match(&r, &["0.9.1", "2.9.0", "1.1.1", "0.1.4"]); - - let r = req("^0"); - assert_match(&r, &["0.9.1", "0.0.2", "0.0.0"]); - assert_not_match(&r, &["2.9.0", "1.1.1"]); - - let r = req("^1.4.2-beta.5"); - assert_match(&r, &["1.4.2", "1.4.3", "1.4.2-beta.5", "1.4.2-beta.6", "1.4.2-c"]); - assert_not_match(&r, &["0.9.9", "2.0.0", "1.4.2-alpha", "1.4.2-beta.4", "1.4.3-beta.5"]); - } - - #[test] - pub fn test_parsing_wildcard() { - let r = req(""); - assert_match(&r, &["0.9.1", "2.9.0", "0.0.9", "1.0.1", "1.1.1"]); - assert_not_match(&r, &[]); - let r = req("*"); - assert_match(&r, &["0.9.1", "2.9.0", "0.0.9", "1.0.1", "1.1.1"]); - assert_not_match(&r, &[]); - let r = req("x"); - assert_match(&r, &["0.9.1", "2.9.0", "0.0.9", "1.0.1", "1.1.1"]); - assert_not_match(&r, &[]); - let r = req("X"); - assert_match(&r, &["0.9.1", "2.9.0", "0.0.9", "1.0.1", "1.1.1"]); - assert_not_match(&r, &[]); - - let r = req("1.*"); - assert_match(&r, &["1.2.0", "1.2.1", "1.1.1", "1.3.0"]); - assert_not_match(&r, &["0.0.9"]); - let r = req("1.x"); - assert_match(&r, &["1.2.0", "1.2.1", "1.1.1", "1.3.0"]); - assert_not_match(&r, &["0.0.9"]); - let r = req("1.X"); - assert_match(&r, &["1.2.0", "1.2.1", "1.1.1", "1.3.0"]); - assert_not_match(&r, &["0.0.9"]); - - let r = req("1.2.*"); - assert_match(&r, &["1.2.0", "1.2.2", "1.2.4"]); - assert_not_match(&r, &["1.9.0", "1.0.9", "2.0.1", "0.1.3"]); - let r = req("1.2.x"); - assert_match(&r, &["1.2.0", "1.2.2", "1.2.4"]); - assert_not_match(&r, &["1.9.0", "1.0.9", "2.0.1", "0.1.3"]); - let r = req("1.2.X"); - assert_match(&r, &["1.2.0", "1.2.2", "1.2.4"]); - assert_not_match(&r, &["1.9.0", "1.0.9", "2.0.1", "0.1.3"]); - } - - #[test] - pub fn test_any() { - let r = VersionReq::any(); - assert_match(&r, &["0.0.1", "0.1.0", "1.0.0"]); - } - - #[test] - pub fn test_pre() { - let r = req("=2.1.1-really.0"); - assert_match(&r, &["2.1.1-really.0"]); - } - - #[test] - pub fn test_parse_errors() { - assert_eq!(Err(InvalidVersionRequirement), VersionReq::parse("\0")); - assert_eq!(Err(OpAlreadySet), VersionReq::parse(">= >= 0.0.2")); - assert_eq!(Err(InvalidSigil), VersionReq::parse(">== 0.0.2")); - assert_eq!(Err(VersionComponentsMustBeNumeric), VersionReq::parse("a.0.0")); - assert_eq!(Err(InvalidIdentifier), VersionReq::parse("1.0.0-")); - assert_eq!(Err(MajorVersionRequired), VersionReq::parse(">=")); - } -} diff --git a/deps/semver-0.2.2/.gitignore b/deps/semver-0.2.3/.gitignore similarity index 100% rename from deps/semver-0.2.2/.gitignore rename to deps/semver-0.2.3/.gitignore diff --git a/deps/semver-0.2.3/.travis.yml b/deps/semver-0.2.3/.travis.yml new file mode 100644 index 000000000..96b760e03 --- /dev/null +++ b/deps/semver-0.2.3/.travis.yml @@ -0,0 +1,31 @@ +language: rust +rust: + - nightly + - beta + - stable +sudo: false +script: + - cargo build --verbose + - cargo test --verbose --features ci + - cargo doc +addons: + apt: + sources: + - kalakris-cmake + packages: + - cmake +after_success: | + [ $TRAVIS_BRANCH = master ] && + [ $TRAVIS_PULL_REQUEST = false ] && + [ $TRAVIS_RUST_VERSION = nightly ] && + echo '<meta http-equiv=refresh content=0;url=semver/index.html>' > target/doc/index.html && + pip install ghp-import --user $USER && + $HOME/.local/bin/ghp-import -n target/doc && + git push -qf https://${TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages +language: rust +env: + global: + secure: "I6tYuqMZ/NQ/lt+vl9rZutkoyG+AhTtIGloqNm8JIbrSHFSe/S4+Wou3z/BKR89k2OrkwOJnhTCeAu3kK+HGPkf5/iryI0JctelVYRLWxvUCSIyuc5fcBuCyikIeW8OnT9myE9QP7ZFBPo7s2uEboWKZC11A2Ub/ZdY303gBQTU=" +notifications: + email: + on_success: never diff --git a/deps/semver-0.2.3/Cargo.toml b/deps/semver-0.2.3/Cargo.toml new file mode 100644 index 000000000..30d6bb693 --- /dev/null +++ b/deps/semver-0.2.3/Cargo.toml @@ -0,0 +1,25 @@ +[package] + +name = "semver" +version = "0.2.3" +authors = ["Steve Klabnik <steve@steveklabnik.com>", "The Rust Project Developers"] +license = "MIT/Apache-2.0" +repository = "https://github.com/steveklabnik/semver" +homepage = "https://github.com/steveklabnik/semver" +documentation = "http://steveklabnik.github.io/semver" +description = """ +Semantic version parsing and comparison. +""" + +[dependencies] +nom = "1.0.1" + +[features] +default = [] + +# are we testing on CI? +ci = [] + +[dev-dependencies] +crates-index = "0.4.0" +tempdir = "0.3.4" diff --git a/deps/tar-0.4.3/LICENSE-APACHE b/deps/semver-0.2.3/LICENSE-APACHE similarity index 100% rename from deps/tar-0.4.3/LICENSE-APACHE rename to deps/semver-0.2.3/LICENSE-APACHE diff --git a/deps/semver-0.2.2/LICENSE-MIT b/deps/semver-0.2.3/LICENSE-MIT similarity index 100% rename from deps/semver-0.2.2/LICENSE-MIT rename to deps/semver-0.2.3/LICENSE-MIT diff --git a/deps/semver-0.2.2/README.md b/deps/semver-0.2.3/README.md similarity index 100% rename from deps/semver-0.2.2/README.md rename to deps/semver-0.2.3/README.md diff --git a/deps/semver-0.2.3/src/lib.rs b/deps/semver-0.2.3/src/lib.rs new file mode 100644 index 000000000..218c81793 --- /dev/null +++ b/deps/semver-0.2.3/src/lib.rs @@ -0,0 +1,182 @@ +// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +//! Semantic version parsing and comparison. +//! +//! Semantic versioning (see http://semver.org/) is a set of rules for +//! assigning version numbers. +//! +//! ## SemVer overview +//! +//! Given a version number MAJOR.MINOR.PATCH, increment the: +//! +//! 1. MAJOR version when you make incompatible API changes, +//! 2. MINOR version when you add functionality in a backwards-compatible +//! manner, and +//! 3. PATCH version when you make backwards-compatible bug fixes. +//! +//! Additional labels for pre-release and build metadata are available as +//! extensions to the MAJOR.MINOR.PATCH format. +//! +//! Any references to 'the spec' in this documentation refer to [version 2.0 of +//! the SemVer spec](http://semver.org/spec/v2.0.0.html). +//! +//! ## SemVer and the Rust ecosystem +//! +//! Rust itself follows the SemVer specification, as does its standard +//! libraries. The two are not tied together. +//! +//! [Cargo](http://crates.io), Rust's package manager, uses SemVer to determine +//! which versions of packages you need installed. +//! +//! ## Versions +//! +//! At its simplest, the `semver` crate allows you to construct `Version` +//! objects using the `parse` method: +//! +//! ```{rust} +//! use semver::Version; +//! +//! assert!(Version::parse("1.2.3") == Ok(Version { +//! major: 1, +//! minor: 2, +//! patch: 3, +//! pre: vec!(), +//! build: vec!(), +//! })); +//! ``` +//! +//! If you have multiple `Version`s, you can use the usual comparison operators +//! to compare them: +//! +//! ```{rust} +//! use semver::Version; +//! +//! assert!(Version::parse("1.2.3-alpha") != Version::parse("1.2.3-beta")); +//! assert!(Version::parse("1.2.3-alpha2") > Version::parse("1.2.0")); +//! ``` +//! +//! If you explicitly need to modify a Version, SemVer also allows you to +//! increment the major, minor, and patch numbers in accordance with the spec. +//! +//! Please note that in order to do this, you must use a mutable Version: +//! +//! ```{rust} +//! use semver::Version; +//! +//! let mut bugfix_release = Version::parse("1.0.0").unwrap(); +//! bugfix_release.increment_patch(); +//! +//! assert_eq!(Ok(bugfix_release), Version::parse("1.0.1")); +//! ``` +//! +//! When incrementing the minor version number, the patch number resets to zero +//! (in accordance with section 7 of the spec) +//! +//! ```{rust} +//! use semver::Version; +//! +//! let mut feature_release = Version::parse("1.4.6").unwrap(); +//! feature_release.increment_minor(); +//! +//! assert_eq!(Ok(feature_release), Version::parse("1.5.0")); +//! ``` +//! +//! Similarly, when incrementing the major version number, the patch and minor +//! numbers reset to zero (in accordance with section 8 of the spec) +//! +//! ```{rust} +//! use semver::Version; +//! +//! let mut chrome_release = Version::parse("41.5.5377").unwrap(); +//! chrome_release.increment_major(); +//! +//! assert_eq!(Ok(chrome_release), Version::parse("42.0.0")); +//! ``` +//! +//! ## Requirements +//! +//! The `semver` crate also provides the ability to compare requirements, which +//! are more complex comparisons. +//! +//! For example, creating a requirement that only matches versions greater than +//! or equal to 1.0.0: +//! +//! ```{rust} +//! # #![allow(unstable)] +//! use semver::Version; +//! use semver::VersionReq; +//! +//! let r = VersionReq::parse(">= 1.0.0").unwrap(); +//! let v = Version::parse("1.0.0").unwrap(); +//! +//! assert!(r.to_string() == ">= 1.0.0".to_string()); +//! assert!(r.matches(&v)) +//! ``` +//! +//! It also allows parsing of `~x.y.z` and `^x.y.z` requirements as defined at +//! https://www.npmjs.org/doc/misc/semver.html +//! +//! **Tilde requirements** specify a minimal version with some updates: +//! +//! ```notrust +//! ~1.2.3 := >=1.2.3 <1.3.0 +//! ~1.2 := >=1.2.0 <1.3.0 +//! ~1 := >=1.0.0 <2.0.0 +//! ``` +//! +//! **Caret requirements** allow SemVer compatible updates to a specified +//! verion, `0.x` and `0.x+1` are not considered compatible, but `1.x` and +//! `1.x+1` are. +//! +//! `0.0.x` is not considered compatible with any other version. +//! Missing minor and patch versions are desugared to `0` but allow flexibility +//! for that value. +//! +//! ```notrust +//! ^1.2.3 := >=1.2.3 <2.0.0 +//! ^0.2.3 := >=0.2.3 <0.3.0 +//! ^0.0.3 := >=0.0.3 <0.0.4 +//! ^0.0 := >=0.0.0 <0.1.0 +//! ^0 := >=0.0.0 <1.0.0 +//! ``` +//! +//! **Wildcard requirements** allows parsing of version requirements of the +//! formats `*`, `x.*` and `x.y.*`. +//! +//! ```notrust +//! * := >=0.0.0 +//! 1.* := >=1.0.0 <2.0.0 +//! 1.2.* := >=1.2.0 <1.3.0 +//! ``` + +#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", + html_favicon_url = "https://www.rust-lang.org/favicon.ico")] +#![deny(missing_docs)] +#![cfg_attr(test, deny(warnings))] + +#[macro_use] +extern crate nom; + +// We take the common approach of keeping our own module system private, and +// just re-exporting the interface that we want. + +pub use version::{Version, Identifier, SemVerError}; +pub use version::Identifier::{Numeric, AlphaNumeric}; +pub use version_req::{VersionReq, ReqParseError}; + +// SemVer-compliant versions. +mod version; + +// advanced version comparisons +mod version_req; + +// parsing +mod parser; diff --git a/deps/semver-0.2.3/src/parser.rs b/deps/semver-0.2.3/src/parser.rs new file mode 100644 index 000000000..52c25afe1 --- /dev/null +++ b/deps/semver-0.2.3/src/parser.rs @@ -0,0 +1,205 @@ +use std::str; +use nom; +use nom::IResult; + +use version::Identifier; + +/// Try to parse a version +/// +/// If there's an error, then you just get (). for now. +pub fn try_parse(i: &[u8]) -> Result<super::Version, String> { + match version(i) { + IResult::Done(rest, version) => { + if rest.len() > 0 { + let err = format!("Failed with unparsed input: '{}'", + String::from_utf8(rest.to_vec()).unwrap()); + Err(err) + } else { + Ok(version) + } + } + _ => Err("Parse error".to_string()), + } +} + +/// parse a u64 +fn number(i: &[u8]) -> IResult<&[u8], u64> { + use std::str::from_utf8; + map_res!(i, + map_res!(nom::digit, from_utf8), + |d| str::FromStr::from_str(d)) +} + +/// Parse an alphanumeric or a dot ("[0-9A-Za-z.]" in regex) +fn ascii_or_hyphen(chr: u8) -> bool { + // hyphen + chr == 45 || (chr >= 48 && chr <= 57) || (chr >= 65 && chr <= 90) || (chr >= 97 && chr <= 122) +} + +named!(take_ascii_or_hyphen, take_while!(ascii_or_hyphen)); + +fn convert_identifiers(identifiers: Vec<&str>) -> Vec<Identifier> { + let mut result = Vec::new(); + + for identifier in identifiers { + match identifier.parse() { + Ok(n) => result.push(Identifier::Numeric(n)), + Err(_) => result.push(Identifier::AlphaNumeric(identifier.to_string())), + } + } + + result +} + +/// Parse an identifier +fn identifiers(i: &[u8]) -> IResult<&[u8], Vec<Identifier>> { + use std::str::from_utf8; + map!(i, + separated_list!(tag!("."), map_res!(take_ascii_or_hyphen, from_utf8)), + convert_identifiers) +} + +/// parse a . and then a u32 +named!(dot_number<&[u8], u64>, preceded!(char!('.'), number)); + +named!(pre<&[u8], Option<Vec<Identifier> > >, opt!(complete!(preceded!(tag!("-"), identifiers)))); +named!(build<&[u8], Option<Vec<Identifier> > >, opt!(complete!(preceded!(tag!("+"), identifiers)))); + +named!(extras<&[u8], (Option<Vec<Identifier>>, Option<Vec<Identifier>>) >, pair!(pre, build)); + +/// parse a version +/// +/// A version is currently: +/// +/// - a major version number +/// - optionally followed by a dot and a minor version number +/// - optionally followed by a dot and a patch version number +/// +/// If some of the versions aren't present, gives a zero. +named!(version<&[u8], super::Version>, chain!( + major: number ~ + minor: dot_number ~ + patch: dot_number ~ + extras: extras, + || { + super::Version { + major: major, + minor: minor, + patch: patch, + pre: extras.0.clone().unwrap_or(Vec::new()), + build: extras.1.clone().unwrap_or(Vec::new()), + } + } +)); + + +#[cfg(test)] +mod tests { + use super::number; + use super::dot_number; + use super::version; + use version::Identifier; + use Version; + + fn done<T>(x: T) -> ::nom::IResult<&'static [u8], T> { + ::nom::IResult::Done(&[][..], x) + } + + #[test] + fn parse_number() { + let v = "10".as_bytes(); + + assert_eq!(number(v), done(10)); + } + + #[test] + fn parse_dot_number() { + let v = ".10".as_bytes(); + + assert_eq!(dot_number(v), done(10)); + } + + #[test] + fn parse_version() { + let v1 = "10.11.12".as_bytes(); + let v2 = Version { + major: 10, + minor: 11, + patch: 12, + pre: Vec::new(), + build: Vec::new(), + }; + + assert_eq!(version(v1), done(v2)); + } + + #[test] + fn parse_pre_basic() { + let v1 = "1.0.0-alpha".as_bytes(); + let v2 = Version { + major: 1, + minor: 0, + patch: 0, + pre: vec![Identifier::AlphaNumeric(String::from("alpha"))], + build: Vec::new(), + }; + + assert_eq!(version(v1), done(v2)); + } + + #[test] + fn parse_pre_dot() { + let v1 = "1.0.0-alpha.1".as_bytes(); + let v2 = Version { + major: 1, + minor: 0, + patch: 0, + pre: vec![Identifier::AlphaNumeric(String::from("alpha")), Identifier::Numeric(1)], + build: Vec::new(), + }; + + assert_eq!(version(v1), done(v2)); + } + + #[test] + fn parse_build_basic() { + let v1 = "1.0.0-alpha+001".as_bytes(); + let v2 = Version { + major: 1, + minor: 0, + patch: 0, + pre: vec![Identifier::AlphaNumeric(String::from("alpha"))], + build: vec![Identifier::Numeric(1)], + }; + + assert_eq!(version(v1), done(v2)); + } + + #[test] + fn parse_build_no_pre() { + let v1 = "1.0.0+001".as_bytes(); + let v2 = Version { + major: 1, + minor: 0, + patch: 0, + pre: Vec::new(), + build: vec![Identifier::Numeric(1)], + }; + + assert_eq!(version(v1), done(v2)); + } + + #[test] + fn parse_hypen_in_pre() { + let v1 = "3.0.0-rc1-1".as_bytes(); + let v2 = Version { + major: 3, + minor: 0, + patch: 0, + pre: vec![Identifier::AlphaNumeric(String::from("rc1-1"))], + build: Vec::new(), + }; + + assert_eq!(version(v1), done(v2)); + } +} diff --git a/deps/semver-0.2.3/src/version.rs b/deps/semver-0.2.3/src/version.rs new file mode 100644 index 000000000..84a9d943b --- /dev/null +++ b/deps/semver-0.2.3/src/version.rs @@ -0,0 +1,622 @@ +// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +//! The `version` module gives you tools to create and compare SemVer-compliant +//! versions. + +use std::cmp::{self, Ordering}; +use std::fmt; +use std::hash; +use std::error::Error; + +use std::result; +use std::str; + +use parser; + +/// An identifier in the pre-release or build metadata. +/// +/// See sections 9 and 10 of the spec for more about pre-release identifers and +/// build metadata. +#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)] +pub enum Identifier { + /// An identifier that's solely numbers. + Numeric(u64), + /// An identifier with letters and numbers. + AlphaNumeric(String), +} + +impl fmt::Display for Identifier { + #[inline] + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + match *self { + Identifier::Numeric(ref n) => fmt::Display::fmt(n, f), + Identifier::AlphaNumeric(ref s) => fmt::Display::fmt(s, f), + } + } +} + +/// Represents a version number conforming to the semantic versioning scheme. +#[derive(Clone, Eq, Debug)] +pub struct Version { + /// The major version, to be incremented on incompatible changes. + pub major: u64, + /// The minor version, to be incremented when functionality is added in a + /// backwards-compatible manner. + pub minor: u64, + /// The patch version, to be incremented when backwards-compatible bug + /// fixes are made. + pub patch: u64, + /// The pre-release version identifier, if one exists. + pub pre: Vec<Identifier>, + /// The build metadata, ignored when determining version precedence. + pub build: Vec<Identifier>, +} + +/// An error type for this crate +/// +/// Currently, just a generic error. Will make this nicer later. +#[derive(Clone,PartialEq,Debug,PartialOrd)] +pub enum SemVerError { + /// An error ocurred while parsing. + ParseError(String), +} + +impl fmt::Display for SemVerError { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + match self { + &SemVerError::ParseError(ref m) => write!(f, "{}", m), + } + } +} + +impl Error for SemVerError { + fn description(&self) -> &str { + match self { + &SemVerError::ParseError(ref m) => m, + } + } +} + +/// A Result type for errors +pub type Result<T> = result::Result<T, SemVerError>; + +impl Version { + /// Parse a string into a semver object. + pub fn parse(version: &str) -> Result<Version> { + let res = parser::try_parse(version.trim().as_bytes()); + + match res { + // Convert plain String error into proper ParseError + Err(e) => Err(SemVerError::ParseError(e)), + Ok(v) => Ok(v), + } + } + + /// Clears the build metadata + fn clear_metadata(&mut self) { + self.build = Vec::new(); + self.pre = Vec::new(); + } + + /// Increments the patch number for this Version (Must be mutable) + pub fn increment_patch(&mut self) { + self.patch += 1; + self.clear_metadata(); + } + + /// Increments the minor version number for this Version (Must be mutable) + /// + /// As instructed by section 7 of the spec, the patch number is reset to 0. + pub fn increment_minor(&mut self) { + self.minor += 1; + self.patch = 0; + self.clear_metadata(); + } + + /// Increments the major version number for this Version (Must be mutable) + /// + /// As instructed by section 8 of the spec, the minor and patch numbers are + /// reset to 0 + pub fn increment_major(&mut self) { + self.major += 1; + self.minor = 0; + self.patch = 0; + self.clear_metadata(); + } + + /// Checks to see if the current Version is in pre-release status + pub fn is_prerelease(&self) -> bool { + !self.pre.is_empty() + } +} + +impl str::FromStr for Version { + type Err = SemVerError; + + fn from_str(s: &str) -> Result<Version> { + Version::parse(s) + } +} + +impl fmt::Display for Version { + #[inline] + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + try!(write!(f, "{}.{}.{}", self.major, self.minor, self.patch)); + if !self.pre.is_empty() { + try!(write!(f, "-")); + for (i, x) in self.pre.iter().enumerate() { + if i != 0 { + try!(write!(f, ".")) + } + try!(write!(f, "{}", x)); + } + } + if !self.build.is_empty() { + try!(write!(f, "+")); + for (i, x) in self.build.iter().enumerate() { + if i != 0 { + try!(write!(f, ".")) + } + try!(write!(f, "{}", x)); + } + } + Ok(()) + } +} + +impl cmp::PartialEq for Version { + #[inline] + fn eq(&self, other: &Version) -> bool { + // We should ignore build metadata here, otherwise versions v1 and v2 + // can exist such that !(v1 < v2) && !(v1 > v2) && v1 != v2, which + // violate strict total ordering rules. + self.major == other.major && self.minor == other.minor && self.patch == other.patch && + self.pre == other.pre + } +} + +impl cmp::PartialOrd for Version { + fn partial_cmp(&self, other: &Version) -> Option<Ordering> { + Some(self.cmp(other)) + } +} + +impl cmp::Ord for Version { + fn cmp(&self, other: &Version) -> Ordering { + match self.major.cmp(&other.major) { + Ordering::Equal => {} + r => return r, + } + + match self.minor.cmp(&other.minor) { + Ordering::Equal => {} + r => return r, + } + + match self.patch.cmp(&other.patch) { + Ordering::Equal => {} + r => return r, + } + + // NB: semver spec says 0.0.0-pre < 0.0.0 + // but the version of ord defined for vec + // says that [] < [pre] so we alter it here + match (self.pre.len(), other.pre.len()) { + (0, 0) => Ordering::Equal, + (0, _) => Ordering::Greater, + (_, 0) => Ordering::Less, + (_, _) => self.pre.cmp(&other.pre), + } + } +} + +impl hash::Hash for Version { + fn hash<H: hash::Hasher>(&self, into: &mut H) { + self.major.hash(into); + self.minor.hash(into); + self.patch.hash(into); + self.pre.hash(into); + } +} + +#[cfg(test)] +mod tests { + use std::result; + use super::Version; + use super::Identifier; + use super::SemVerError; + + #[test] + fn test_parse() { + fn parse_error(e: &str) -> result::Result<Version, SemVerError> { + return Err(SemVerError::ParseError(e.to_string())); + } + + assert_eq!(Version::parse(""), parse_error("Parse error")); + assert_eq!(Version::parse(" "), parse_error("Parse error")); + assert_eq!(Version::parse("1"), parse_error("Parse error")); + assert_eq!(Version::parse("1.2"), parse_error("Parse error")); + assert_eq!(Version::parse("1.2.3-"), + parse_error("Failed with unparsed input: '-'")); + assert_eq!(Version::parse("a.b.c"), parse_error("Parse error")); + assert_eq!(Version::parse("1.2.3 abc"), + parse_error("Failed with unparsed input: ' abc'")); + + assert_eq!(Version::parse("1.2.3"), + Ok(Version { + major: 1, + minor: 2, + patch: 3, + pre: Vec::new(), + build: Vec::new(), + })); + assert_eq!(Version::parse(" 1.2.3 "), + Ok(Version { + major: 1, + minor: 2, + patch: 3, + pre: Vec::new(), + build: Vec::new(), + })); + assert_eq!(Version::parse("1.2.3-alpha1"), + Ok(Version { + major: 1, + minor: 2, + patch: 3, + pre: vec![Identifier::AlphaNumeric(String::from("alpha1"))], + build: Vec::new(), + })); + assert_eq!(Version::parse(" 1.2.3-alpha1 "), + Ok(Version { + major: 1, + minor: 2, + patch: 3, + pre: vec![Identifier::AlphaNumeric(String::from("alpha1"))], + build: Vec::new(), + })); + assert_eq!(Version::parse("1.2.3+build5"), + Ok(Version { + major: 1, + minor: 2, + patch: 3, + pre: Vec::new(), + build: vec![Identifier::AlphaNumeric(String::from("build5"))], + })); + assert_eq!(Version::parse(" 1.2.3+build5 "), + Ok(Version { + major: 1, + minor: 2, + patch: 3, + pre: Vec::new(), + build: vec![Identifier::AlphaNumeric(String::from("build5"))], + })); + assert_eq!(Version::parse("1.2.3-alpha1+build5"), + Ok(Version { + major: 1, + minor: 2, + patch: 3, + pre: vec![Identifier::AlphaNumeric(String::from("alpha1"))], + build: vec![Identifier::AlphaNumeric(String::from("build5"))], + })); + assert_eq!(Version::parse(" 1.2.3-alpha1+build5 "), + Ok(Version { + major: 1, + minor: 2, + patch: 3, + pre: vec![Identifier::AlphaNumeric(String::from("alpha1"))], + build: vec![Identifier::AlphaNumeric(String::from("build5"))], + })); + assert_eq!(Version::parse("1.2.3-1.alpha1.9+build5.7.3aedf "), + Ok(Version { + major: 1, + minor: 2, + patch: 3, + pre: vec![Identifier::Numeric(1), + Identifier::AlphaNumeric(String::from("alpha1")), + Identifier::Numeric(9), + ], + build: vec![Identifier::AlphaNumeric(String::from("build5")), + Identifier::Numeric(7), + Identifier::AlphaNumeric(String::from("3aedf")), + ], + })); + assert_eq!(Version::parse("0.4.0-beta.1+0851523"), + Ok(Version { + major: 0, + minor: 4, + patch: 0, + pre: vec![Identifier::AlphaNumeric(String::from("beta")), + Identifier::Numeric(1), + ], + build: vec![Identifier::AlphaNumeric(String::from("0851523"))], + })); + + } + + #[test] + fn test_increment_patch() { + let mut buggy_release = Version::parse("0.1.0").unwrap(); + buggy_release.increment_patch(); + assert_eq!(buggy_release, Version::parse("0.1.1").unwrap()); + } + + #[test] + fn test_increment_minor() { + let mut feature_release = Version::parse("1.4.6").unwrap(); + feature_release.increment_minor(); + assert_eq!(feature_release, Version::parse("1.5.0").unwrap()); + } + + #[test] + fn test_increment_major() { + let mut chrome_release = Version::parse("46.1.246773").unwrap(); + chrome_release.increment_major(); + assert_eq!(chrome_release, Version::parse("47.0.0").unwrap()); + } + + #[test] + fn test_increment_keep_prerelease() { + let mut release = Version::parse("1.0.0-alpha").unwrap(); + release.increment_patch(); + + assert_eq!(release, Version::parse("1.0.1").unwrap()); + + release.increment_minor(); + + assert_eq!(release, Version::parse("1.1.0").unwrap()); + + release.increment_major(); + + assert_eq!(release, Version::parse("2.0.0").unwrap()); + } + + + #[test] + fn test_increment_clear_metadata() { + let mut release = Version::parse("1.0.0+4442").unwrap(); + release.increment_patch(); + + assert_eq!(release, Version::parse("1.0.1").unwrap()); + release = Version::parse("1.0.1+hello").unwrap(); + + release.increment_minor(); + + assert_eq!(release, Version::parse("1.1.0").unwrap()); + release = Version::parse("1.1.3747+hello").unwrap(); + + release.increment_major(); + + assert_eq!(release, Version::parse("2.0.0").unwrap()); + } + + #[test] + fn test_eq() { + assert_eq!(Version::parse("1.2.3"), Version::parse("1.2.3")); + assert_eq!(Version::parse("1.2.3-alpha1"), + Version::parse("1.2.3-alpha1")); + assert_eq!(Version::parse("1.2.3+build.42"), + Version::parse("1.2.3+build.42")); + assert_eq!(Version::parse("1.2.3-alpha1+42"), + Version::parse("1.2.3-alpha1+42")); + assert_eq!(Version::parse("1.2.3+23"), Version::parse("1.2.3+42")); + } + + #[test] + fn test_ne() { + assert!(Version::parse("0.0.0") != Version::parse("0.0.1")); + assert!(Version::parse("0.0.0") != Version::parse("0.1.0")); + assert!(Version::parse("0.0.0") != Version::parse("1.0.0")); + assert!(Version::parse("1.2.3-alpha") != Version::parse("1.2.3-beta")); + } + + #[test] + fn test_show() { + assert_eq!(format!("{}", Version::parse("1.2.3").unwrap()), + "1.2.3".to_string()); + assert_eq!(format!("{}", Version::parse("1.2.3-alpha1").unwrap()), + "1.2.3-alpha1".to_string()); + assert_eq!(format!("{}", Version::parse("1.2.3+build.42").unwrap()), + "1.2.3+build.42".to_string()); + assert_eq!(format!("{}", Version::parse("1.2.3-alpha1+42").unwrap()), + "1.2.3-alpha1+42".to_string()); + } + + #[test] + fn test_to_string() { + assert_eq!(Version::parse("1.2.3").unwrap().to_string(), + "1.2.3".to_string()); + assert_eq!(Version::parse("1.2.3-alpha1").unwrap().to_string(), + "1.2.3-alpha1".to_string()); + assert_eq!(Version::parse("1.2.3+build.42").unwrap().to_string(), + "1.2.3+build.42".to_string()); + assert_eq!(Version::parse("1.2.3-alpha1+42").unwrap().to_string(), + "1.2.3-alpha1+42".to_string()); + } + + #[test] + fn test_lt() { + assert!(Version::parse("0.0.0") < Version::parse("1.2.3-alpha2")); + assert!(Version::parse("1.0.0") < Version::parse("1.2.3-alpha2")); + assert!(Version::parse("1.2.0") < Version::parse("1.2.3-alpha2")); + assert!(Version::parse("1.2.3-alpha1") < Version::parse("1.2.3")); + assert!(Version::parse("1.2.3-alpha1") < Version::parse("1.2.3-alpha2")); + assert!(!(Version::parse("1.2.3-alpha2") < Version::parse("1.2.3-alpha2"))); + assert!(!(Version::parse("1.2.3+23") < Version::parse("1.2.3+42"))); + } + + #[test] + fn test_le() { + assert!(Version::parse("0.0.0") <= Version::parse("1.2.3-alpha2")); + assert!(Version::parse("1.0.0") <= Version::parse("1.2.3-alpha2")); + assert!(Version::parse("1.2.0") <= Version::parse("1.2.3-alpha2")); + assert!(Version::parse("1.2.3-alpha1") <= Version::parse("1.2.3-alpha2")); + assert!(Version::parse("1.2.3-alpha2") <= Version::parse("1.2.3-alpha2")); + assert!(Version::parse("1.2.3+23") <= Version::parse("1.2.3+42")); + } + + #[test] + fn test_gt() { + assert!(Version::parse("1.2.3-alpha2") > Version::parse("0.0.0")); + assert!(Version::parse("1.2.3-alpha2") > Version::parse("1.0.0")); + assert!(Version::parse("1.2.3-alpha2") > Version::parse("1.2.0")); + assert!(Version::parse("1.2.3-alpha2") > Version::parse("1.2.3-alpha1")); + assert!(Version::parse("1.2.3") > Version::parse("1.2.3-alpha2")); + assert!(!(Version::parse("1.2.3-alpha2") > Version::parse("1.2.3-alpha2"))); + assert!(!(Version::parse("1.2.3+23") > Version::parse("1.2.3+42"))); + } + + #[test] + fn test_ge() { + assert!(Version::parse("1.2.3-alpha2") >= Version::parse("0.0.0")); + assert!(Version::parse("1.2.3-alpha2") >= Version::parse("1.0.0")); + assert!(Version::parse("1.2.3-alpha2") >= Version::parse("1.2.0")); + assert!(Version::parse("1.2.3-alpha2") >= Version::parse("1.2.3-alpha1")); + assert!(Version::parse("1.2.3-alpha2") >= Version::parse("1.2.3-alpha2")); + assert!(Version::parse("1.2.3+23") >= Version::parse("1.2.3+42")); + } + + #[test] + fn test_prerelease_check() { + assert!(Version::parse("1.0.0").unwrap().is_prerelease() == false); + assert!(Version::parse("0.0.1").unwrap().is_prerelease() == false); + assert!(Version::parse("4.1.4-alpha").unwrap().is_prerelease()); + assert!(Version::parse("1.0.0-beta294296").unwrap().is_prerelease()); + } + + #[test] + fn test_spec_order() { + let vs = ["1.0.0-alpha", + "1.0.0-alpha.1", + "1.0.0-alpha.beta", + "1.0.0-beta", + "1.0.0-beta.2", + "1.0.0-beta.11", + "1.0.0-rc.1", + "1.0.0"]; + let mut i = 1; + while i < vs.len() { + let a = Version::parse(vs[i - 1]); + let b = Version::parse(vs[i]); + assert!(a < b, "nope {:?} < {:?}", a, b); + i += 1; + } + } + + #[test] + fn test_from_str() { + assert_eq!("1.2.3".parse(), + Ok(Version { + major: 1, + minor: 2, + patch: 3, + pre: Vec::new(), + build: Vec::new(), + })); + assert_eq!(" 1.2.3 ".parse(), + Ok(Version { + major: 1, + minor: 2, + patch: 3, + pre: Vec::new(), + build: Vec::new(), + })); + assert_eq!("1.2.3-alpha1".parse(), + Ok(Version { + major: 1, + minor: 2, + patch: 3, + pre: vec![Identifier::AlphaNumeric(String::from("alpha1"))], + build: Vec::new(), + })); + assert_eq!(" 1.2.3-alpha1 ".parse(), + Ok(Version { + major: 1, + minor: 2, + patch: 3, + pre: vec![Identifier::AlphaNumeric(String::from("alpha1"))], + build: Vec::new(), + })); + assert_eq!("1.2.3+build5".parse(), + Ok(Version { + major: 1, + minor: 2, + patch: 3, + pre: Vec::new(), + build: vec![Identifier::AlphaNumeric(String::from("build5"))], + })); + assert_eq!(" 1.2.3+build5 ".parse(), + Ok(Version { + major: 1, + minor: 2, + patch: 3, + pre: Vec::new(), + build: vec![Identifier::AlphaNumeric(String::from("build5"))], + })); + assert_eq!("1.2.3-alpha1+build5".parse(), + Ok(Version { + major: 1, + minor: 2, + patch: 3, + pre: vec![Identifier::AlphaNumeric(String::from("alpha1"))], + build: vec![Identifier::AlphaNumeric(String::from("build5"))], + })); + assert_eq!(" 1.2.3-alpha1+build5 ".parse(), + Ok(Version { + major: 1, + minor: 2, + patch: 3, + pre: vec![Identifier::AlphaNumeric(String::from("alpha1"))], + build: vec![Identifier::AlphaNumeric(String::from("build5"))], + })); + assert_eq!("1.2.3-1.alpha1.9+build5.7.3aedf ".parse(), + Ok(Version { + major: 1, + minor: 2, + patch: 3, + pre: vec![Identifier::Numeric(1), + Identifier::AlphaNumeric(String::from("alpha1")), + Identifier::Numeric(9), + ], + build: vec![Identifier::AlphaNumeric(String::from("build5")), + Identifier::Numeric(7), + Identifier::AlphaNumeric(String::from("3aedf")), + ], + })); + assert_eq!("0.4.0-beta.1+0851523".parse(), + Ok(Version { + major: 0, + minor: 4, + patch: 0, + pre: vec![Identifier::AlphaNumeric(String::from("beta")), + Identifier::Numeric(1), + ], + build: vec![Identifier::AlphaNumeric(String::from("0851523"))], + })); + + } + + #[test] + fn test_from_str_errors() { + fn parse_error(e: &str) -> result::Result<Version, SemVerError> { + return Err(SemVerError::ParseError(e.to_string())); + } + + assert_eq!("".parse(), parse_error("Parse error")); + assert_eq!(" ".parse(), parse_error("Parse error")); + assert_eq!("1".parse(), parse_error("Parse error")); + assert_eq!("1.2".parse(), parse_error("Parse error")); + assert_eq!("1.2.3-".parse(), + parse_error("Failed with unparsed input: '-'")); + assert_eq!("a.b.c".parse(), parse_error("Parse error")); + assert_eq!("1.2.3 abc".parse(), + parse_error("Failed with unparsed input: ' abc'")); + } +} diff --git a/deps/semver-0.2.3/src/version_req.rs b/deps/semver-0.2.3/src/version_req.rs new file mode 100644 index 000000000..b5b8d0b15 --- /dev/null +++ b/deps/semver-0.2.3/src/version_req.rs @@ -0,0 +1,1110 @@ +// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +use std::error::Error; +use std::fmt; +use std::str::{self, CharIndices}; + +use Version; +use version::Identifier; + +use self::VersionComponent::{NumericVersionComponent, WildcardVersionComponent}; +use self::Op::{Ex, Gt, GtEq, Lt, LtEq, Tilde, Compatible, Wildcard}; +use self::LexState::{LexInit, LexStart, LexVersionComponent, LexSigil, LexErr}; +use self::LexState::{LexIdentInit, LexIdentStart, LexIdent}; +use self::Token::{Sigil, AlphaNum, Comma, Dot, Dash}; +use self::WildcardVersion::{Major, Minor, Patch}; +use self::ReqParseError::{InvalidVersionRequirement, OpAlreadySet, InvalidSigil, + VersionComponentsMustBeNumeric, InvalidIdentifier, MajorVersionRequired, + UnimplementedVersionRequirement}; + +/// A `VersionReq` is a struct containing a list of predicates that can apply to ranges of version +/// numbers. Matching operations can then be done with the `VersionReq` against a particular +/// version to see if it satisfies some or all of the constraints. +#[derive(PartialEq,Clone,Debug)] +pub struct VersionReq { + predicates: Vec<Predicate>, +} + +enum VersionComponent { + NumericVersionComponent(u64), + WildcardVersionComponent, +} + +#[derive(Clone, PartialEq, Debug)] +enum WildcardVersion { + Major, + Minor, + Patch, +} + +#[derive(PartialEq,Clone,Debug)] +enum Op { + Ex, // Exact + Gt, // Greater than + GtEq, // Greater than or equal to + Lt, // Less than + LtEq, // Less than or equal to + Tilde, // e.g. ~1.0.0 + Compatible, // compatible by definition of semver, indicated by ^ + Wildcard(WildcardVersion), // x.y.*, x.*, * +} + +#[derive(PartialEq,Clone,Debug)] +struct Predicate { + op: Op, + major: u64, + minor: Option<u64>, + patch: Option<u64>, + pre: Vec<Identifier>, +} + +struct PredBuilder { + op: Option<Op>, + major: Option<u64>, + minor: Option<u64>, + patch: Option<u64>, + pre: Vec<Identifier>, + has_pre: bool, +} + +/// A `ReqParseError` is returned from methods which parse a string into a `VersionReq`. Each +/// enumeration is one of the possible errors that can occur. +#[derive(Copy, Clone, Debug, PartialEq)] +pub enum ReqParseError { + /// The given version requirement is invalid. + InvalidVersionRequirement, + /// You have already provided an operation, such as `=`, `~`, or `^`. Only use one. + OpAlreadySet, + /// The sigil you have written is not correct. + InvalidSigil, + /// All components of a version must be numeric. + VersionComponentsMustBeNumeric, + /// There was an error parsing an identifier. + InvalidIdentifier, + /// At least a major version is required. + MajorVersionRequired, + /// An unimplemented version requirement. + UnimplementedVersionRequirement, +} + +impl fmt::Display for ReqParseError { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + self.description().fmt(f) + } +} + +impl Error for ReqParseError { + fn description(&self) -> &str { + match *self { + InvalidVersionRequirement => "the given version requirement is invalid", + OpAlreadySet => + "you have already provided an operation, such as =, ~, or ^; only use one", + InvalidSigil => "the sigil you have written is not correct", + VersionComponentsMustBeNumeric => "version components must be numeric", + InvalidIdentifier => "invalid identifier", + MajorVersionRequired => "at least a major version number is required", + UnimplementedVersionRequirement => + "the given version requirement is not implemented, yet", + } + } +} + +impl VersionReq { + /// `any()` is a factory method which creates a `VersionReq` with no constraints. In other + /// words, any version will match against it. + /// + /// # Examples + /// + /// ``` + /// use semver::VersionReq; + /// + /// let anything = VersionReq::any(); + /// ``` + pub fn any() -> VersionReq { + VersionReq { predicates: vec![] } + } + + /// `parse()` is the main constructor of a `VersionReq`. It turns a string like `"^1.2.3"` + /// and turns it into a `VersionReq` that matches that particular constraint. + /// + /// A `Result` is returned which contains a `ReqParseError` if there was a problem parsing the + /// `VersionReq`. + /// + /// # Examples + /// + /// ``` + /// use semver::VersionReq; + /// + /// let version = VersionReq::parse("=1.2.3"); + /// let version = VersionReq::parse(">1.2.3"); + /// let version = VersionReq::parse("<1.2.3"); + /// let version = VersionReq::parse("~1.2.3"); + /// let version = VersionReq::parse("^1.2.3"); + /// let version = VersionReq::parse("<=1.2.3"); + /// let version = VersionReq::parse(">=1.2.3"); + /// ``` + /// + /// This example demonstrates error handling, and will panic. + /// + /// ```should-panic + /// use semver::VersionReq; + /// + /// let version = match VersionReq::parse("not a version") { + /// Ok(version) => version, + /// Err(e) => panic!("There was a problem parsing: {}", e), + /// } + /// ``` + pub fn parse(input: &str) -> Result<VersionReq, ReqParseError> { + if input == "" { + return Ok(VersionReq { + predicates: vec![Predicate { + op: Wildcard(Major), + major: 0, + minor: None, + patch: None, + pre: vec![], + }], + }); + } + + let mut lexer = Lexer::new(input); + let mut builder = PredBuilder::new(); + let mut predicates = Vec::new(); + + for token in lexer.by_ref() { + let result = match token { + Sigil(x) => builder.set_sigil(x), + AlphaNum(x) => builder.set_version_part(x), + Dot => Ok(()), // Nothing to do for now + Comma => { + let result = builder.build().map(|p| predicates.push(p)); + builder = PredBuilder::new(); + result + } + Dash => { + builder.has_pre = true; + Ok(()) + } + }; + + match result { + Ok(_) => (), + Err(e) => return Err(e), + } + } + + if lexer.is_error() { + return Err(InvalidVersionRequirement); + } + + match builder.build() { + Ok(e) => predicates.push(e), + Err(e) => return Err(e), + } + + Ok(VersionReq { predicates: predicates }) + } + + /// `exact()` is a factory method which creates a `VersionReq` with one exact constraint. + /// + /// # Examples + /// + /// ``` + /// use semver::VersionReq; + /// use semver::Version; + /// + /// let version = Version { major: 1, minor: 1, patch: 1, pre: vec![], build: vec![] }; + /// let exact = VersionReq::exact(&version); + /// ``` + pub fn exact(version: &Version) -> VersionReq { + VersionReq { predicates: vec![Predicate::exact(version)] } + } + + /// `matches()` matches a given `Version` against this `VersionReq`. + /// + /// # Examples + /// + /// ``` + /// use semver::VersionReq; + /// use semver::Version; + /// + /// let version = Version { major: 1, minor: 1, patch: 1, pre: vec![], build: vec![] }; + /// let exact = VersionReq::exact(&version); + /// + /// assert!(exact.matches(&version)); + /// ``` + pub fn matches(&self, version: &Version) -> bool { + // no predicates means anything matches + if self.predicates.is_empty() { + return true; + } + + self.predicates.iter().all(|p| p.matches(version)) && + self.predicates.iter().any(|p| p.pre_tag_is_compatible(version)) + } +} + +impl str::FromStr for VersionReq { + type Err = ReqParseError; + + fn from_str(s: &str) -> Result<VersionReq, ReqParseError> { + VersionReq::parse(s) + } +} + +impl Predicate { + fn exact(version: &Version) -> Predicate { + Predicate { + op: Ex, + major: version.major, + minor: Some(version.minor), + patch: Some(version.patch), + pre: version.pre.clone(), + } + } + + /// `matches()` takes a `Version` and determines if it matches this particular `Predicate`. + pub fn matches(&self, ver: &Version) -> bool { + match self.op { + Ex => self.is_exact(ver), + Gt => self.is_greater(ver), + GtEq => self.is_exact(ver) || self.is_greater(ver), + Lt => !self.is_exact(ver) && !self.is_greater(ver), + LtEq => !self.is_greater(ver), + Tilde => self.matches_tilde(ver), + Compatible => self.is_compatible(ver), + Wildcard(_) => self.matches_wildcard(ver), + } + } + + fn is_exact(&self, ver: &Version) -> bool { + if self.major != ver.major { + return false; + } + + match self.minor { + Some(minor) => { + if minor != ver.minor { + return false; + } + } + None => return true, + } + + match self.patch { + Some(patch) => { + if patch != ver.patch { + return false; + } + } + None => return true, + } + + if self.pre != ver.pre { + return false; + } + + true + } + + // https://docs.npmjs.com/misc/semver#prerelease-tags + fn pre_tag_is_compatible(&self, ver: &Version) -> bool { + // If a version has a prerelease tag (for example, 1.2.3-alpha.3) then it will + // only be + // allowed to satisfy comparator sets if at least one comparator with the same + // [major, + // minor, patch] tuple also has a prerelease tag. + !ver.is_prerelease() || + (self.major == ver.major && self.minor == Some(ver.minor) && + self.patch == Some(ver.patch) && !self.pre.is_empty()) + } + + fn is_greater(&self, ver: &Version) -> bool { + if self.major != ver.major { + return ver.major > self.major; + } + + match self.minor { + Some(minor) => { + if minor != ver.minor { + return ver.minor > minor; + } + } + None => return false, + } + + match self.patch { + Some(patch) => { + if patch != ver.patch { + return ver.patch > patch; + } + } + None => return false, + } + + if !self.pre.is_empty() { + return ver.pre.is_empty() || ver.pre > self.pre; + } + + false + } + + // see https://www.npmjs.org/doc/misc/semver.html for behavior + fn matches_tilde(&self, ver: &Version) -> bool { + let minor = match self.minor { + Some(n) => n, + None => return self.major == ver.major, + }; + + match self.patch { + Some(patch) => { + self.major == ver.major && minor == ver.minor && + (ver.patch > patch || (ver.patch == patch && self.pre_is_compatible(ver))) + } + None => { + self.major == ver.major && minor == ver.minor + } + } + } + + // see https://www.npmjs.org/doc/misc/semver.html for behavior + fn is_compatible(&self, ver: &Version) -> bool { + if self.major != ver.major { + return false; + } + + let minor = match self.minor { + Some(n) => n, + None => return self.major == ver.major, + }; + + match self.patch { + Some(patch) => if self.major == 0 { + if minor == 0 { + ver.minor == minor && ver.patch == patch && self.pre_is_compatible(ver) + } else { + ver.minor == minor && + (ver.patch > patch || (ver.patch == patch && self.pre_is_compatible(ver))) + } + } else { + ver.minor > minor || + (ver.minor == minor && + (ver.patch > patch || (ver.patch == patch && self.pre_is_compatible(ver)))) + }, + None => if self.major == 0 { + ver.minor == minor + } else { + ver.minor >= minor + }, + } + } + + fn pre_is_compatible(&self, ver: &Version) -> bool { + ver.pre.is_empty() || ver.pre >= self.pre + } + + // see https://www.npmjs.org/doc/misc/semver.html for behavior + fn matches_wildcard(&self, ver: &Version) -> bool { + match self.op { + Wildcard(Major) => true, + Wildcard(Minor) => self.major == ver.major, + Wildcard(Patch) => { + match self.minor { + Some(minor) => self.major == ver.major && minor == ver.minor, + None => false, // unreachable + } + } + _ => false, // unreachable + } + } +} + +impl PredBuilder { + fn new() -> PredBuilder { + PredBuilder { + op: None, + major: None, + minor: None, + patch: None, + pre: vec![], + has_pre: false, + } + } + + fn set_sigil(&mut self, sigil: &str) -> Result<(), ReqParseError> { + if self.op.is_some() { + return Err(OpAlreadySet); + } + + match Op::from_sigil(sigil) { + Some(op) => self.op = Some(op), + _ => return Err(InvalidSigil), + } + + Ok(()) + } + + fn set_version_part(&mut self, part: &str) -> Result<(), ReqParseError> { + if self.op.is_none() { + // If no op is specified, then the predicate is an exact match on + // the version + self.op = Some(Compatible); + } + + if self.has_pre { + match parse_ident(part) { + Ok(ident) => self.pre.push(ident), + Err(e) => return Err(e), + } + } else if self.major.is_none() { + match parse_version_part(part) { + Ok(NumericVersionComponent(e)) => self.major = Some(e), + Ok(WildcardVersionComponent) => { + self.major = Some(0); + self.op = Some(Wildcard(Major)) + } + Err(e) => return Err(e), + } + } else if self.minor.is_none() { + match parse_version_part(part) { + Ok(NumericVersionComponent(e)) => self.minor = Some(e), + Ok(WildcardVersionComponent) => self.op = Some(Wildcard(Minor)), + Err(e) => return Err(e), + } + } else if self.patch.is_none() { + match parse_version_part(part) { + Ok(NumericVersionComponent(e)) => self.patch = Some(e), + Ok(WildcardVersionComponent) => self.op = Some(Wildcard(Patch)), + Err(e) => return Err(e), + } + } + + Ok(()) + } + + /// Validates that a version predicate can be created given the present + /// information. + fn build(self) -> Result<Predicate, ReqParseError> { + let op = match self.op { + Some(ref x) => x.clone(), + None => return Err(InvalidVersionRequirement), + }; + + let major = match self.major { + Some(x) => x, + None => return Err(MajorVersionRequired), + }; + + if self.has_pre && self.pre.is_empty() { + // Identifiers MUST NOT be empty. + return Err(InvalidIdentifier); + } + + Ok(Predicate { + op: op, + major: major, + minor: self.minor, + patch: self.patch, + pre: self.pre, + }) + } +} + +struct Lexer<'a> { + c: char, + idx: usize, + iter: CharIndices<'a>, + mark: Option<usize>, + input: &'a str, + state: LexState, +} + +#[derive(Copy, Clone, Debug, PartialEq)] +enum LexState { + LexInit, + LexStart, + LexVersionComponent, + LexSigil, + LexErr, + LexIdentInit, + LexIdentStart, + LexIdent, +} + +#[derive(Debug)] +enum Token<'a> { + Sigil(&'a str), + AlphaNum(&'a str), + Comma, + Dot, + Dash, +} + +impl<'a> Lexer<'a> { + fn new(input: &'a str) -> Lexer<'a> { + Lexer { + c: '\0', + idx: 0, + iter: input.char_indices(), + mark: None, + input: input, + state: LexInit, + } + } + + fn is_error(&self) -> bool { + self.state == LexErr + } + + fn mark(&mut self, at: usize) { + self.mark = Some(at) + } + + fn flush(&mut self, to: usize, kind: LexState) -> Option<Token<'a>> { + match self.mark { + Some(mark) => { + if to <= mark { + return None; + } + + let s = &self.input[mark..to]; + + self.mark = None; + + match kind { + LexVersionComponent => Some(AlphaNum(s)), + LexIdent => Some(AlphaNum(s)), + LexSigil => Some(Sigil(s)), + _ => None, // bug + } + } + None => None, + } + } +} + +impl<'a> Iterator for Lexer<'a> { + type Item = Token<'a>; + + fn next(&mut self) -> Option<Token<'a>> { + let mut c; + let mut idx = 0; + + macro_rules! next { + () => ( + match self.iter.next() { + Some((n_idx, n_char)) => { + c = n_char; + idx = n_idx; + } + _ => { + let s = self.state; + return self.flush(idx + 1, s) + } + } + ) + } + + macro_rules! flush { + ($s:expr) => ({ + self.c = c; + self.idx = idx; + self.flush(idx, $s) + }) + } + + + if self.state == LexInit { + self.state = LexStart; + next!(); + } else if self.state == LexIdentInit { + self.state = LexIdentStart; + next!(); + } else { + c = self.c; + idx = self.idx; + } + + loop { + match self.state { + LexStart => { + if c.is_whitespace() { + next!(); // Ignore + } else if c.is_alphanumeric() || c == '*' { + self.mark(idx); + self.state = LexVersionComponent; + next!(); + } else if is_sigil(c) { + self.mark(idx); + self.state = LexSigil; + next!(); + } else if c == '.' { + self.state = LexInit; + return Some(Dot); + } else if c == ',' { + self.state = LexInit; + return Some(Comma); + } else if c == '-' { + self.state = LexIdentInit; + return Some(Dash); + } else { + self.state = LexErr; + return None; + } + } + LexVersionComponent => { + if c.is_alphanumeric() { + next!(); + } else { + self.state = LexStart; + return flush!(LexVersionComponent); + } + } + LexSigil => { + if is_sigil(c) { + next!(); + } else { + self.state = LexStart; + return flush!(LexSigil); + } + } + LexIdentStart => { + if c.is_alphanumeric() || c == '-' { + self.mark(idx); + self.state = LexIdent; + next!(); + } else if c == '.' { + self.state = LexIdentInit; + return Some(Dot); + } else if c == ',' { + self.state = LexInit; + return Some(Comma); + } else { + self.state = LexErr; + return None; + } + } + LexIdent => { + if c.is_alphanumeric() || c == '-' { + next!(); + } else { + self.state = LexIdentStart; + return flush!(LexIdent); + } + } + LexErr => return None, + LexInit | LexIdentInit => return None, // bug + } + } + } +} + +impl Op { + fn from_sigil(sigil: &str) -> Option<Op> { + match sigil { + "=" => Some(Ex), + ">" => Some(Gt), + ">=" => Some(GtEq), + "<" => Some(Lt), + "<=" => Some(LtEq), + "~" => Some(Tilde), + "^" => Some(Compatible), + _ => None, + } + } +} + +fn parse_version_part(s: &str) -> Result<VersionComponent, ReqParseError> { + let mut ret = 0; + + if ["*", "x", "X"].contains(&s) { + return Ok(WildcardVersionComponent); + } + + for c in s.chars() { + let n = (c as u64) - ('0' as u64); + + if n > 9 { + return Err(VersionComponentsMustBeNumeric); + } + + ret *= 10; + ret += n; + } + + Ok(NumericVersionComponent(ret)) +} + +fn parse_ident(s: &str) -> Result<Identifier, ReqParseError> { + if s.is_empty() { + return Err(InvalidIdentifier); + } else if s.chars().all(|c| c.is_digit(10)) { + s.parse::<u64>().map(Identifier::Numeric).or(Err(InvalidIdentifier)) + } else { + Ok(Identifier::AlphaNumeric(s.to_owned())) + } +} + +fn is_sigil(c: char) -> bool { + match c { + '>' | '<' | '=' | '~' | '^' => true, + _ => false, + } +} + +impl fmt::Display for VersionReq { + fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { + if self.predicates.is_empty() { + try!(write!(fmt, "*")); + } else { + for (i, ref pred) in self.predicates.iter().enumerate() { + if i == 0 { + try!(write!(fmt, "{}", pred)); + } else { + try!(write!(fmt, ", {}", pred)); + } + } + } + + Ok(()) + } +} + +impl fmt::Display for Predicate { + fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { + match self.op { + Wildcard(Major) => try!(write!(fmt, "*")), + Wildcard(Minor) => try!(write!(fmt, "{}.*", self.major)), + Wildcard(Patch) => try!(write!(fmt, "{}.{}.*", self.major, self.minor.unwrap())), + _ => { + try!(write!(fmt, "{}{}", self.op, self.major)); + + match self.minor { + Some(v) => try!(write!(fmt, ".{}", v)), + None => (), + } + + match self.patch { + Some(v) => try!(write!(fmt, ".{}", v)), + None => (), + } + + if !self.pre.is_empty() { + try!(write!(fmt, "-")); + for (i, x) in self.pre.iter().enumerate() { + if i != 0 { + try!(write!(fmt, ".")) + } + try!(write!(fmt, "{}", x)); + } + } + } + } + + Ok(()) + } +} + +impl fmt::Display for Op { + fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { + match *self { + Ex => try!(write!(fmt, "= ")), + Gt => try!(write!(fmt, "> ")), + GtEq => try!(write!(fmt, ">= ")), + Lt => try!(write!(fmt, "< ")), + LtEq => try!(write!(fmt, "<= ")), + Tilde => try!(write!(fmt, "~")), + Compatible => try!(write!(fmt, "^")), + // gets handled specially in Predicate::fmt + Wildcard(_) => try!(write!(fmt, "")), + } + Ok(()) + } +} + +#[cfg(test)] +mod test { + use super::VersionReq; + use super::super::version::Version; + use super::ReqParseError::{InvalidVersionRequirement, OpAlreadySet, InvalidSigil, + VersionComponentsMustBeNumeric, InvalidIdentifier, + MajorVersionRequired}; + + fn req(s: &str) -> VersionReq { + VersionReq::parse(s).unwrap() + } + + fn version(s: &str) -> Version { + match Version::parse(s) { + Ok(v) => v, + Err(e) => panic!("`{}` is not a valid version. Reason: {:?}", s, e), + } + } + + fn assert_match(req: &VersionReq, vers: &[&str]) { + for ver in vers.iter() { + assert!(req.matches(&version(*ver)), "did not match {}", ver); + } + } + + fn assert_not_match(req: &VersionReq, vers: &[&str]) { + for ver in vers.iter() { + assert!(!req.matches(&version(*ver)), "matched {}", ver); + } + } + + #[test] + fn test_parsing_default() { + let r = req("1.0.0"); + + assert_eq!(r.to_string(), "^1.0.0".to_string()); + + assert_match(&r, &["1.0.0", "1.0.1"]); + assert_not_match(&r, &["0.9.9", "0.10.0", "0.1.0"]); + } + + #[test] + fn test_parsing_exact() { + let r = req("=1.0.0"); + + assert!(r.to_string() == "= 1.0.0".to_string()); + assert_eq!(r.to_string(), "= 1.0.0".to_string()); + + assert_match(&r, &["1.0.0"]); + assert_not_match(&r, &["1.0.1", "0.9.9", "0.10.0", "0.1.0", "1.0.0-pre"]); + + let r = req("=0.9.0"); + + assert_eq!(r.to_string(), "= 0.9.0".to_string()); + + assert_match(&r, &["0.9.0"]); + assert_not_match(&r, &["0.9.1", "1.9.0", "0.0.9"]); + + let r = req("=0.1.0-beta2.a"); + + assert_eq!(r.to_string(), "= 0.1.0-beta2.a".to_string()); + + assert_match(&r, &["0.1.0-beta2.a"]); + assert_not_match(&r, &["0.9.1", "0.1.0", "0.1.1-beta2.a", "0.1.0-beta2"]); + } + + #[test] + pub fn test_parsing_greater_than() { + let r = req(">= 1.0.0"); + + assert_eq!(r.to_string(), ">= 1.0.0".to_string()); + + assert_match(&r, &["1.0.0", "2.0.0"]); + assert_not_match(&r, &["0.1.0", "0.0.1", "1.0.0-pre", "2.0.0-pre"]); + + let r = req(">= 2.1.0-alpha2"); + + assert_match(&r, &["2.1.0-alpha2", "2.1.0-alpha3", "2.1.0", "3.0.0"]); + assert_not_match(&r, + &["2.0.0", "2.1.0-alpha1", "2.0.0-alpha2", "3.0.0-alpha2"]); + } + + #[test] + pub fn test_parsing_less_than() { + let r = req("< 1.0.0"); + + assert_eq!(r.to_string(), "< 1.0.0".to_string()); + + assert_match(&r, &["0.1.0", "0.0.1"]); + assert_not_match(&r, &["1.0.0", "1.0.0-beta", "1.0.1", "0.9.9-alpha"]); + + let r = req("<= 2.1.0-alpha2"); + + assert_match(&r, &["2.1.0-alpha2", "2.1.0-alpha1", "2.0.0", "1.0.0"]); + assert_not_match(&r, + &["2.1.0", "2.2.0-alpha1", "2.0.0-alpha2", "1.0.0-alpha2"]); + } + + #[test] + pub fn test_multiple() { + let r = req("> 0.0.9, <= 2.5.3"); + assert_eq!(r.to_string(), "> 0.0.9, <= 2.5.3".to_string()); + assert_match(&r, &["0.0.10", "1.0.0", "2.5.3"]); + assert_not_match(&r, &["0.0.8", "2.5.4"]); + + let r = req("0.3.0, 0.4.0"); + assert_eq!(r.to_string(), "^0.3.0, ^0.4.0".to_string()); + assert_not_match(&r, &["0.0.8", "0.3.0", "0.4.0"]); + + let r = req("<= 0.2.0, >= 0.5.0"); + assert_eq!(r.to_string(), "<= 0.2.0, >= 0.5.0".to_string()); + assert_not_match(&r, &["0.0.8", "0.3.0", "0.5.1"]); + + let r = req("0.1.0, 0.1.4, 0.1.6"); + assert_eq!(r.to_string(), "^0.1.0, ^0.1.4, ^0.1.6".to_string()); + assert_match(&r, &["0.1.6", "0.1.9"]); + assert_not_match(&r, &["0.1.0", "0.1.4", "0.2.0"]); + + assert!(VersionReq::parse("> 0.1.0,").is_err()); + assert!(VersionReq::parse("> 0.3.0, ,").is_err()); + + let r = req(">=0.5.1-alpha3, <0.6"); + assert_eq!(r.to_string(), ">= 0.5.1-alpha3, < 0.6".to_string()); + assert_match(&r, + &["0.5.1-alpha3", "0.5.1-alpha4", "0.5.1-beta", "0.5.1", "0.5.5"]); + assert_not_match(&r, + &["0.5.1-alpha1", "0.5.2-alpha3", "0.5.5-pre", "0.5.0-pre"]); + assert_not_match(&r, &["0.6.0", "0.6.0-pre"]); + } + + #[test] + pub fn test_parsing_tilde() { + let r = req("~1"); + assert_match(&r, &["1.0.0", "1.0.1", "1.1.1"]); + assert_not_match(&r, &["0.9.1", "2.9.0", "0.0.9"]); + + let r = req("~1.2"); + assert_match(&r, &["1.2.0", "1.2.1"]); + assert_not_match(&r, &["1.1.1", "1.3.0", "0.0.9"]); + + let r = req("~1.2.2"); + assert_match(&r, &["1.2.2", "1.2.4"]); + assert_not_match(&r, &["1.2.1", "1.9.0", "1.0.9", "2.0.1", "0.1.3"]); + + let r = req("~1.2.3-beta.2"); + assert_match(&r, &["1.2.3", "1.2.4", "1.2.3-beta.2", "1.2.3-beta.4"]); + assert_not_match(&r, &["1.3.3", "1.1.4", "1.2.3-beta.1", "1.2.4-beta.2"]); + } + + #[test] + pub fn test_parsing_compatible() { + let r = req("^1"); + assert_match(&r, &["1.1.2", "1.1.0", "1.2.1", "1.0.1"]); + assert_not_match(&r, &["0.9.1", "2.9.0", "0.1.4"]); + assert_not_match(&r, &["1.0.0-beta1", "0.1.0-alpha", "1.0.1-pre"]); + + let r = req("^1.1"); + assert_match(&r, &["1.1.2", "1.1.0", "1.2.1"]); + assert_not_match(&r, &["0.9.1", "2.9.0", "1.0.1", "0.1.4"]); + + let r = req("^1.1.2"); + assert_match(&r, &["1.1.2", "1.1.4", "1.2.1"]); + assert_not_match(&r, &["0.9.1", "2.9.0", "1.1.1", "0.0.1"]); + assert_not_match(&r, &["1.1.2-alpha1", "1.1.3-alpha1", "2.9.0-alpha1"]); + + let r = req("^0.1.2"); + assert_match(&r, &["0.1.2", "0.1.4"]); + assert_not_match(&r, &["0.9.1", "2.9.0", "1.1.1", "0.0.1"]); + assert_not_match(&r, &["0.1.2-beta", "0.1.3-alpha", "0.2.0-pre"]); + + let r = req("^0.5.1-alpha3"); + assert_match(&r, + &["0.5.1-alpha3", "0.5.1-alpha4", "0.5.1-beta", "0.5.1", "0.5.5"]); + assert_not_match(&r, + &["0.5.1-alpha1", "0.5.2-alpha3", "0.5.5-pre", "0.5.0-pre", "0.6.0"]); + + let r = req("^0.0.2"); + assert_match(&r, &["0.0.2"]); + assert_not_match(&r, &["0.9.1", "2.9.0", "1.1.1", "0.0.1", "0.1.4"]); + + let r = req("^0.0"); + assert_match(&r, &["0.0.2", "0.0.0"]); + assert_not_match(&r, &["0.9.1", "2.9.0", "1.1.1", "0.1.4"]); + + let r = req("^0"); + assert_match(&r, &["0.9.1", "0.0.2", "0.0.0"]); + assert_not_match(&r, &["2.9.0", "1.1.1"]); + + let r = req("^1.4.2-beta.5"); + assert_match(&r, + &["1.4.2", "1.4.3", "1.4.2-beta.5", "1.4.2-beta.6", "1.4.2-c"]); + assert_not_match(&r, + &["0.9.9", "2.0.0", "1.4.2-alpha", "1.4.2-beta.4", "1.4.3-beta.5"]); + } + + #[test] + pub fn test_parsing_wildcard() { + let r = req(""); + assert_match(&r, &["0.9.1", "2.9.0", "0.0.9", "1.0.1", "1.1.1"]); + assert_not_match(&r, &[]); + let r = req("*"); + assert_match(&r, &["0.9.1", "2.9.0", "0.0.9", "1.0.1", "1.1.1"]); + assert_not_match(&r, &[]); + let r = req("x"); + assert_match(&r, &["0.9.1", "2.9.0", "0.0.9", "1.0.1", "1.1.1"]); + assert_not_match(&r, &[]); + let r = req("X"); + assert_match(&r, &["0.9.1", "2.9.0", "0.0.9", "1.0.1", "1.1.1"]); + assert_not_match(&r, &[]); + + let r = req("1.*"); + assert_match(&r, &["1.2.0", "1.2.1", "1.1.1", "1.3.0"]); + assert_not_match(&r, &["0.0.9"]); + let r = req("1.x"); + assert_match(&r, &["1.2.0", "1.2.1", "1.1.1", "1.3.0"]); + assert_not_match(&r, &["0.0.9"]); + let r = req("1.X"); + assert_match(&r, &["1.2.0", "1.2.1", "1.1.1", "1.3.0"]); + assert_not_match(&r, &["0.0.9"]); + + let r = req("1.2.*"); + assert_match(&r, &["1.2.0", "1.2.2", "1.2.4"]); + assert_not_match(&r, &["1.9.0", "1.0.9", "2.0.1", "0.1.3"]); + let r = req("1.2.x"); + assert_match(&r, &["1.2.0", "1.2.2", "1.2.4"]); + assert_not_match(&r, &["1.9.0", "1.0.9", "2.0.1", "0.1.3"]); + let r = req("1.2.X"); + assert_match(&r, &["1.2.0", "1.2.2", "1.2.4"]); + assert_not_match(&r, &["1.9.0", "1.0.9", "2.0.1", "0.1.3"]); + } + + #[test] + pub fn test_any() { + let r = VersionReq::any(); + assert_match(&r, &["0.0.1", "0.1.0", "1.0.0"]); + } + + #[test] + pub fn test_pre() { + let r = req("=2.1.1-really.0"); + assert_match(&r, &["2.1.1-really.0"]); + } + + #[test] + pub fn test_parse_errors() { + assert_eq!(Err(InvalidVersionRequirement), VersionReq::parse("\0")); + assert_eq!(Err(OpAlreadySet), VersionReq::parse(">= >= 0.0.2")); + assert_eq!(Err(InvalidSigil), VersionReq::parse(">== 0.0.2")); + assert_eq!(Err(VersionComponentsMustBeNumeric), + VersionReq::parse("a.0.0")); + assert_eq!(Err(InvalidIdentifier), VersionReq::parse("1.0.0-")); + assert_eq!(Err(MajorVersionRequired), VersionReq::parse(">=")); + } + + #[test] + pub fn test_from_str() { + assert_eq!("1.0.0".parse::<VersionReq>().unwrap().to_string(), "^1.0.0".to_string()); + assert_eq!("=1.0.0".parse::<VersionReq>().unwrap().to_string(), "= 1.0.0".to_string()); + assert_eq!("~1".parse::<VersionReq>().unwrap().to_string(), "~1".to_string()); + assert_eq!("~1.2".parse::<VersionReq>().unwrap().to_string(), "~1.2".to_string()); + assert_eq!("^1".parse::<VersionReq>().unwrap().to_string(), "^1".to_string()); + assert_eq!("^1.1".parse::<VersionReq>().unwrap().to_string(), "^1.1".to_string()); + assert_eq!("*".parse::<VersionReq>().unwrap().to_string(), "*".to_string()); + assert_eq!("1.*".parse::<VersionReq>().unwrap().to_string(), "1.*".to_string()); + assert_eq!("< 1.0.0".parse::<VersionReq>().unwrap().to_string(), "< 1.0.0".to_string()); + } + + #[test] + pub fn test_from_str_errors() { + assert_eq!(Err(InvalidVersionRequirement), "\0".parse::<VersionReq>()); + assert_eq!(Err(OpAlreadySet), ">= >= 0.0.2".parse::<VersionReq>()); + assert_eq!(Err(InvalidSigil), ">== 0.0.2".parse::<VersionReq>()); + assert_eq!(Err(VersionComponentsMustBeNumeric), + "a.0.0".parse::<VersionReq>()); + assert_eq!(Err(InvalidIdentifier), "1.0.0-".parse::<VersionReq>()); + assert_eq!(Err(MajorVersionRequired), ">=".parse::<VersionReq>()); + } +} diff --git a/deps/semver-0.2.2/tests/regression.rs b/deps/semver-0.2.3/tests/regression.rs similarity index 100% rename from deps/semver-0.2.2/tests/regression.rs rename to deps/semver-0.2.3/tests/regression.rs diff --git a/deps/tar-0.4.3/Cargo.toml b/deps/tar-0.4.3/Cargo.toml deleted file mode 100644 index 7f8afb778..000000000 --- a/deps/tar-0.4.3/Cargo.toml +++ /dev/null @@ -1,25 +0,0 @@ -[package] - -name = "tar" -version = "0.4.3" -authors = ["Alex Crichton <alex@alexcrichton.com>"] -homepage = "https://github.com/alexcrichton/tar-rs" -repository = "https://github.com/alexcrichton/tar-rs" -documentation = "http://alexcrichton.com/tar-rs" -license = "MIT/Apache-2.0" -keywords = ["tar", "tarfile", "encoding"] -readme = "README.md" - -description = """ -A Rust implementation of a TAR file reader and writer. This library does not -currently handle compression, but it is abstract over all I/O readers and -writers. Additionally, great lengths are taken to ensure that the entire -contents are never required to be entirely resident in memory all at once. -""" - -[dependencies] -libc = "0.2" -filetime = "0.1.5" - -[dev-dependencies] -tempdir = "0.3" diff --git a/deps/tar-0.4.3/src/archive.rs b/deps/tar-0.4.3/src/archive.rs deleted file mode 100644 index 3875a07e1..000000000 --- a/deps/tar-0.4.3/src/archive.rs +++ /dev/null @@ -1,364 +0,0 @@ -use std::cell::{RefCell, Cell}; -use std::cmp; -use std::fs; -use std::io::prelude::*; -use std::io; -use std::marker; -use std::path::{Path, Component}; - -use entry::EntryFields; -use error::TarError; -use other; -use {Entry, Header}; - -/// A top-level representation of an archive file. -/// -/// This archive can have an entry added to it and it can be iterated over. -pub struct Archive<R: ?Sized + Read> { - inner: ArchiveInner<R>, -} - -pub struct ArchiveInner<R: ?Sized> { - pos: Cell<u64>, - obj: RefCell<::AlignHigher<R>>, -} - -/// An iterator over the entries of an archive. -pub struct Entries<'a, R: 'a + Read> { - fields: EntriesFields<'a>, - _ignored: marker::PhantomData<&'a Archive<R>>, -} - -struct EntriesFields<'a> { - archive: &'a Archive<Read + 'a>, - next: u64, - done: bool, - raw: bool, -} - -impl<R: Read> Archive<R> { - /// Create a new archive with the underlying object as the reader. - pub fn new(obj: R) -> Archive<R> { - Archive { - inner: ArchiveInner { - obj: RefCell::new(::AlignHigher(0, obj)), - pos: Cell::new(0), - }, - } - } - - /// Unwrap this archive, returning the underlying object. - pub fn into_inner(self) -> R { - self.inner.obj.into_inner().1 - } - - /// Construct an iterator over the entries in this archive. - /// - /// Note that care must be taken to consider each entry within an archive in - /// sequence. If entries are processed out of sequence (from what the - /// iterator returns), then the contents read for each entry may be - /// corrupted. - pub fn entries(&mut self) -> io::Result<Entries<R>> { - let me: &mut Archive<Read> = self; - me._entries().map(|fields| { - Entries { fields: fields, _ignored: marker::PhantomData } - }) - } - - /// Unpacks the contents tarball into the specified `dst`. - /// - /// This function will iterate over the entire contents of this tarball, - /// extracting each file in turn to the location specified by the entry's - /// path name. - /// - /// This operation is relatively sensitive in that it will not write files - /// outside of the path specified by `dst`. Files in the archive which have - /// a '..' in their path are skipped during the unpacking process. - /// - /// # Examples - /// - /// ```no_run - /// use std::fs::File; - /// use tar::Archive; - /// - /// let mut ar = Archive::new(File::open("foo.tar").unwrap()); - /// ar.unpack("foo").unwrap(); - /// ``` - pub fn unpack<P: AsRef<Path>>(&mut self, dst: P) -> io::Result<()> { - let me: &mut Archive<Read> = self; - me._unpack(dst.as_ref()) - } -} - -impl<'a> Archive<Read + 'a> { - fn _entries(&mut self) -> io::Result<EntriesFields> { - if self.inner.pos.get() != 0 { - return Err(other("cannot call entries unless archive is at \ - position 0")) - } - Ok(EntriesFields { - archive: self, - done: false, - next: 0, - raw: false, - }) - } - - fn _unpack(&mut self, dst: &Path) -> io::Result<()> { - 'outer: for entry in try!(self._entries()) { - let mut file = try!(entry.map_err(|e| { - TarError::new("failed to iterate over archive", e) - })); - - // Notes regarding bsdtar 2.8.3 / libarchive 2.8.3: - // * Leading '/'s are trimmed. For example, `///test` is treated as - // `test`. - // * If the filename contains '..', then the file is skipped when - // extracting the tarball. - // * '//' within a filename is effectively skipped. An error is - // logged, but otherwise the effect is as if any two or more - // adjacent '/'s within the filename were consolidated into one - // '/'. - // - // Most of this is handled by the `path` module of the standard - // library, but we specially handle a few cases here as well. - - let mut file_dst = dst.to_path_buf(); - { - let path = try!(file.path().map_err(|e| { - TarError::new("invalid path in entry header", e) - })); - for part in path.components() { - match part { - // Leading '/' characters, root paths, and '.' - // components are just ignored and treated as "empty - // components" - Component::Prefix(..) | - Component::RootDir | - Component::CurDir => continue, - - // If any part of the filename is '..', then skip over - // unpacking the file to prevent directory traversal - // security issues. See, e.g.: CVE-2001-1267, - // CVE-2002-0399, CVE-2005-1918, CVE-2007-4131 - Component::ParentDir => continue 'outer, - - Component::Normal(part) => file_dst.push(part), - } - } - } - - // Skip cases where only slashes or '.' parts were seen, because - // this is effectively an empty filename. - if *dst == *file_dst { - continue - } - - if let Some(parent) = file_dst.parent() { - try!(fs::create_dir_all(&parent).map_err(|e| { - TarError::new(&format!("failed to create `{}`", - parent.display()), e) - })); - } - try!(file.unpack(&file_dst).map_err(|e| { - TarError::new(&format!("failed to unpacked `{}`", - file_dst.display()), e) - })); - } - Ok(()) - } - - fn skip(&self, mut amt: u64) -> io::Result<()> { - let mut buf = [0u8; 4096 * 8]; - while amt > 0 { - let n = cmp::min(amt, buf.len() as u64); - let n = try!((&self.inner).read(&mut buf[..n as usize])); - if n == 0 { - return Err(other("unexpected EOF during skip")) - } - amt -= n as u64; - } - Ok(()) - } -} - -impl<'a, R: Read> Entries<'a, R> { - /// Indicates whether this iterator will return raw entries or not. - /// - /// If the raw list of entries are returned, then no preprocessing happens - /// on account of this library, for example taking into accout GNU long name - /// or long link archive members. Raw iteration is disabled by default. - pub fn raw(self, raw: bool) -> Entries<'a, R> { - Entries { - fields: EntriesFields { - raw: raw, - ..self.fields - }, - _ignored: marker::PhantomData, - } - } -} -impl<'a, R: Read> Iterator for Entries<'a, R> { - type Item = io::Result<Entry<'a, R>>; - - fn next(&mut self) -> Option<io::Result<Entry<'a, R>>> { - self.fields.next().map(|result| { - result.map(|e| EntryFields::from(e).into_entry()) - }) - } -} - -impl<'a> EntriesFields<'a> { - fn next_entry_raw(&mut self) -> io::Result<Option<Entry<'a, io::Empty>>> { - // Seek to the start of the next header in the archive - let delta = self.next - self.archive.inner.pos.get(); - try!(self.archive.skip(delta)); - - let mut header = Header::new_old(); - try!(read_all(&mut &self.archive.inner, header.as_mut_bytes())); - self.next += 512; - - // If we have an all 0 block, then this should be the start of the end - // of the archive. A block of 0s is never valid as a header (because of - // the checksum), so if it's all zero it must be the first of the two - // end blocks - if header.as_bytes().iter().all(|i| *i == 0) { - try!(read_all(&mut &self.archive.inner, - header.as_mut_bytes())); - self.next += 512; - return if header.as_bytes().iter().all(|i| *i == 0) { - Ok(None) - } else { - Err(other("found block of 0s not followed by a second \ - block of 0s")) - } - } - - // Make sure the checksum is ok - let sum = header.as_bytes()[..148].iter() - .chain(&header.as_bytes()[156..]) - .fold(0, |a, b| a + (*b as u32)) + 8 * 32; - let cksum = try!(header.cksum()); - if sum != cksum { - return Err(other("archive header checksum mismatch")) - } - - let size = try!(header.size()); - let ret = EntryFields { - size: size, - header: header, - data: (&self.archive.inner).take(size), - long_pathname: None, - long_linkname: None, - pax_extensions: None, - }; - - // Store where the next entry is, rounding up by 512 bytes (the size of - // a header); - let size = (ret.size + 511) & !(512 - 1); - self.next += size; - - Ok(Some(ret.into_entry())) - } - - fn next_entry(&mut self) -> io::Result<Option<Entry<'a, io::Empty>>> { - if self.raw { - return self.next_entry_raw() - } - - let mut gnu_longname = None; - let mut gnu_longlink = None; - let mut pax_extensions = None; - let mut processed = 0; - - loop { - processed += 1; - let entry = match try!(self.next_entry_raw()) { - Some(entry) => entry, - None if processed > 1 => { - return Err(other("members found describing a future member \ - but no future member found")) - } - None => return Ok(None), - }; - - if entry.header().as_gnu().is_some() && - entry.header().entry_type().is_gnu_longname() { - if gnu_longname.is_some() { - return Err(other("two long name entries describing \ - the same member")) - } - gnu_longname = Some(try!(EntryFields::from(entry).read_all())); - continue - } - - if entry.header().as_gnu().is_some() && - entry.header().entry_type().is_gnu_longlink() { - if gnu_longlink.is_some() { - return Err(other("two long name entries describing \ - the same member")) - } - gnu_longlink = Some(try!(EntryFields::from(entry).read_all())); - continue - } - - if entry.header().as_ustar().is_some() && - entry.header().entry_type().is_pax_local_extensions() { - if pax_extensions.is_some() { - return Err(other("two pax extensions entries describing \ - the same member")) - } - pax_extensions = Some(try!(EntryFields::from(entry).read_all())); - continue - } - - let mut fields = EntryFields::from(entry); - fields.long_pathname = gnu_longname; - fields.long_linkname = gnu_longlink; - fields.pax_extensions = pax_extensions; - return Ok(Some(fields.into_entry())) - } - } -} - -impl<'a> Iterator for EntriesFields<'a> { - type Item = io::Result<Entry<'a, io::Empty>>; - - fn next(&mut self) -> Option<io::Result<Entry<'a, io::Empty>>> { - if self.done { - None - } else { - match self.next_entry() { - Ok(Some(e)) => Some(Ok(e)), - Ok(None) => { - self.done = true; - None - } - Err(e) => { - self.done = true; - Some(Err(e)) - } - } - } - } -} - -impl<'a, R: ?Sized + Read> Read for &'a ArchiveInner<R> { - fn read(&mut self, into: &mut [u8]) -> io::Result<usize> { - self.obj.borrow_mut().read(into).map(|i| { - self.pos.set(self.pos.get() + i as u64); - i - }) - } -} - -fn read_all<R: Read>(r: &mut R, buf: &mut [u8]) -> io::Result<()> { - let mut read = 0; - while read < buf.len() { - match try!(r.read(&mut buf[read..])) { - 0 => return Err(other("failed to read entire block")), - n => read += n, - } - } - Ok(()) -} diff --git a/deps/tar-0.4.3/src/builder.rs b/deps/tar-0.4.3/src/builder.rs deleted file mode 100644 index 8e1d7e053..000000000 --- a/deps/tar-0.4.3/src/builder.rs +++ /dev/null @@ -1,267 +0,0 @@ -use std::io; -use std::path::Path; -use std::io::prelude::*; -use std::fs; -use std::borrow::Cow; - -use {EntryType, Header, other}; -use header::{bytes2path, path2bytes}; - -/// A structure for building archives -/// -/// This structure has methods for building up an archive from scratch into any -/// arbitrary writer. -pub struct Builder<W: Write> { - finished: bool, - obj: Option<W>, -} - -impl<W: Write> Builder<W> { - /// Create a new archive builder with the underlying object as the - /// destination of all data written. - pub fn new(obj: W) -> Builder<W> { - Builder { - finished: false, - obj: Some(obj), - } - } - - fn inner(&mut self) -> &mut W { - self.obj.as_mut().unwrap() - } - - /// Unwrap this archive, returning the underlying object. - /// - /// This function will finish writing the archive if the `finish` function - /// hasn't yet been called, returning any I/O error which happens during - /// that operation. - pub fn into_inner(mut self) -> io::Result<W> { - if !self.finished { - try!(self.finish()); - } - Ok(self.obj.take().unwrap()) - } - - /// Adds a new entry to this archive. - /// - /// This function will append the header specified, followed by contents of - /// the stream specified by `data`. To produce a valid archive the `size` - /// field of `header` must be the same as the length of the stream that's - /// being written. Additionally the checksum for the header should have been - /// set via the `set_cksum` method. - /// - /// Note that this will not attempt to seek the archive to a valid position, - /// so if the archive is in the middle of a read or some other similar - /// operation then this may corrupt the archive. - /// - /// Also note that after all entries have been written to an archive the - /// `finish` function needs to be called to finish writing the archive. - /// - /// # Errors - /// - /// This function will return an error for any intermittent I/O error which - /// occurs when either reading or writing. - /// - /// # Examples - /// - /// ``` - /// use tar::{Builder, Header}; - /// - /// let mut header = Header::new_gnu(); - /// header.set_path("foo"); - /// header.set_size(4); - /// header.set_cksum(); - /// - /// let mut data: &[u8] = &[1, 2, 3, 4]; - /// - /// let mut ar = Builder::new(Vec::new()); - /// ar.append(&header, data).unwrap(); - /// let data = ar.into_inner().unwrap(); - /// ``` - pub fn append<R: Read>(&mut self, header: &Header, mut data: R) - -> io::Result<()> { - append(self.inner(), header, &mut data) - } - - /// Adds a file on the local filesystem to this archive. - /// - /// This function will open the file specified by `path` and insert the file - /// into the archive with the appropriate metadata set, returning any I/O - /// error which occurs while writing. The path name for the file inside of - /// this archive will be the same as `path`, and it is recommended that the - /// path is a relative path. - /// - /// Note that this will not attempt to seek the archive to a valid position, - /// so if the archive is in the middle of a read or some other similar - /// operation then this may corrupt the archive. - /// - /// Also note that after all files have been written to an archive the - /// `finish` function needs to be called to finish writing the archive. - /// - /// # Examples - /// - /// ```no_run - /// use tar::Builder; - /// - /// let mut ar = Builder::new(Vec::new()); - /// - /// ar.append_path("foo/bar.txt").unwrap(); - /// ``` - pub fn append_path<P: AsRef<Path>>(&mut self, path: P) -> io::Result<()> { - append_path(self.inner(), path.as_ref()) - } - - /// Adds a file to this archive with the given path as the name of the file - /// in the archive. - /// - /// This will use the metadata of `file` to populate a `Header`, and it will - /// then append the file to the archive with the name `path`. - /// - /// Note that this will not attempt to seek the archive to a valid position, - /// so if the archive is in the middle of a read or some other similar - /// operation then this may corrupt the archive. - /// - /// Also note that after all files have been written to an archive the - /// `finish` function needs to be called to finish writing the archive. - /// - /// # Examples - /// - /// ```no_run - /// use std::fs::File; - /// use tar::Builder; - /// - /// let mut ar = Builder::new(Vec::new()); - /// - /// // Open the file at one location, but insert it into the archive with a - /// // different name. - /// let mut f = File::open("foo/bar/baz.txt").unwrap(); - /// ar.append_file("bar/baz.txt", &mut f).unwrap(); - /// ``` - pub fn append_file<P: AsRef<Path>>(&mut self, path: P, file: &mut fs::File) - -> io::Result<()> { - append_file(self.inner(), path.as_ref(), file) - } - - /// Adds a directory to this archive with the given path as the name of the - /// directory in the archive. - /// - /// This will use `stat` to populate a `Header`, and it will then append the - /// directory to the archive with the name `path`. - /// - /// Note that this will not attempt to seek the archive to a valid position, - /// so if the archive is in the middle of a read or some other similar - /// operation then this may corrupt the archive. - /// - /// Also note that after all files have been written to an archive the - /// `finish` function needs to be called to finish writing the archive. - /// - /// # Examples - /// - /// ``` - /// use std::fs; - /// use tar::Builder; - /// - /// let mut ar = Builder::new(Vec::new()); - /// - /// // Use the directory at one location, but insert it into the archive - /// // with a different name. - /// ar.append_dir("bardir", ".").unwrap(); - /// ``` - pub fn append_dir<P, Q>(&mut self, path: P, src_path: Q) -> io::Result<()> - where P: AsRef<Path>, Q: AsRef<Path> - { - append_dir(self.inner(), path.as_ref(), src_path.as_ref()) - } - - /// Finish writing this archive, emitting the termination sections. - /// - /// This function should only be called when the archive has been written - /// entirely and if an I/O error happens the underlying object still needs - /// to be acquired. - /// - /// In most situations the `into_inner` method should be preferred. - pub fn finish(&mut self) -> io::Result<()> { - if self.finished { - return Ok(()) - } - self.finished = true; - self.inner().write_all(&[0; 1024]) - } -} - -fn append(mut dst: &mut Write, - header: &Header, - mut data: &mut Read) -> io::Result<()> { - try!(dst.write_all(header.as_bytes())); - let len = try!(io::copy(&mut data, &mut dst)); - - // Pad with zeros if necessary. - let buf = [0; 512]; - let remaining = 512 - (len % 512); - if remaining < 512 { - try!(dst.write_all(&buf[..remaining as usize])); - } - - Ok(()) -} - -fn append_path(dst: &mut Write, path: &Path) -> io::Result<()> { - let stat = try!(fs::metadata(path)); - if stat.is_file() { - append_fs(dst, path, &stat, &mut try!(fs::File::open(path))) - } else if stat.is_dir() { - append_fs(dst, path, &stat, &mut io::empty()) - } else { - Err(other("path has unknown file type")) - } -} - -fn append_file(dst: &mut Write, path: &Path, file: &mut fs::File) - -> io::Result<()> { - let stat = try!(file.metadata()); - append_fs(dst, path, &stat, file) -} - -fn append_dir(dst: &mut Write, path: &Path, src_path: &Path) -> io::Result<()> { - let stat = try!(fs::metadata(src_path)); - append_fs(dst, path, &stat, &mut io::empty()) -} - -fn append_fs(dst: &mut Write, - path: &Path, - meta: &fs::Metadata, - read: &mut Read) -> io::Result<()> { - let mut header = Header::new_gnu(); - - // Try to encode the path directly in the header, but if it ends up not - // working (e.g. it's too long) then use the GNU-specific long name - // extension by emitting an entry which indicates that it's the filename - if let Err(e) = header.set_path(path) { - let data = try!(path2bytes(&path)); - let max = header.as_old().name.len(); - if data.len() < max { - return Err(e) - } - let mut header2 = Header::new_gnu(); - try!(header2.set_path("././@LongLink")); - header2.set_size(data.len() as u64); - header2.set_entry_type(EntryType::new(b'L')); - header2.set_cksum(); - let mut data2 = data; - try!(append(dst, &header2, &mut data2)); - // Truncate the path to store in the header we're about to emit to - // ensure we've got something at least mentioned. - let path = try!(bytes2path(Cow::Borrowed(&data[..max]))); - try!(header.set_path(&path)); - } - - header.set_metadata(meta); - header.set_cksum(); - append(dst, &header, read) -} - -impl<W: Write> Drop for Builder<W> { - fn drop(&mut self) { - let _ = self.finish(); - } -} diff --git a/deps/tar-0.4.3/src/entry.rs b/deps/tar-0.4.3/src/entry.rs deleted file mode 100644 index f8c4e5ab6..000000000 --- a/deps/tar-0.4.3/src/entry.rs +++ /dev/null @@ -1,306 +0,0 @@ -use std::borrow::Cow; -use std::cmp; -use std::fs; -use std::io::prelude::*; -use std::io; -use std::marker; -use std::path::Path; - -use filetime::{self, FileTime}; - -use {Header, Archive, PaxExtensions}; -use archive::ArchiveInner; -use error::TarError; -use header::{deslash, bytes2path}; -use other; -use pax::pax_extensions; - -/// A read-only view into an entry of an archive. -/// -/// This structure is a window into a portion of a borrowed archive which can -/// be inspected. It acts as a file handle by implementing the Reader trait. An -/// entry cannot be rewritten once inserted into an archive. -pub struct Entry<'a, R: 'a + Read> { - fields: EntryFields<'a>, - _ignored: marker::PhantomData<&'a Archive<R>>, -} - -// private implementation detail of `Entry`, but concrete (no type parameters) -// and also all-public to be constructed from other modules. -pub struct EntryFields<'a> { - pub long_pathname: Option<Vec<u8>>, - pub long_linkname: Option<Vec<u8>>, - pub pax_extensions: Option<Vec<u8>>, - pub header: Header, - pub size: u64, - pub data: io::Take<&'a ArchiveInner<Read + 'a>>, -} - -impl<'a, R: Read> Entry<'a, R> { - /// Returns the path name for this entry. - /// - /// This method may fail if the pathname is not valid unicode and this is - /// called on a Windows platform. - /// - /// Note that this function will convert any `\` characters to directory - /// separators, and it will not always return the same value as - /// `self.header().path()` as some archive formats have support for longer - /// path names described in separate entries. - /// - /// It is recommended to use this method instead of inspecting the `header` - /// directly to ensure that various archive formats are handled correctly. - pub fn path(&self) -> io::Result<Cow<Path>> { - self.fields.path() - } - - /// Returns the raw bytes listed for this entry. - /// - /// Note that this function will convert any `\` characters to directory - /// separators, and it will not always return the same value as - /// `self.header().path_bytes()` as some archive formats have support for - /// longer path names described in separate entries. - pub fn path_bytes(&self) -> Cow<[u8]> { - self.fields.path_bytes() - } - - /// Returns the link name for this entry, if any is found. - /// - /// This method may fail if the pathname is not valid unicode and this is - /// called on a Windows platform. `Ok(None)` being returned, however, - /// indicates that the link name was not present. - /// - /// Note that this function will convert any `\` characters to directory - /// separators, and it will not always return the same value as - /// `self.header().link_name()` as some archive formats have support for - /// longer path names described in separate entries. - /// - /// It is recommended to use this method instead of inspecting the `header` - /// directly to ensure that various archive formats are handled correctly. - pub fn link_name(&self) -> io::Result<Option<Cow<Path>>> { - self.fields.link_name() - } - - /// Returns the link name for this entry, in bytes, if listed. - /// - /// Note that this will not always return the same value as - /// `self.header().link_name_bytes()` as some archive formats have support for - /// longer path names described in separate entries. - pub fn link_name_bytes(&self) -> Option<Cow<[u8]>> { - self.fields.link_name_bytes() - } - - /// Returns an iterator over the pax extensions contained in this entry. - /// - /// Pax extensions are a form of archive where extra metadata is stored in - /// key/value pairs in entries before the entry they're intended to - /// describe. For example this can be used to describe long file name or - /// other metadata like atime/ctime/mtime in more precision. - /// - /// The returned iterator will yield key/value pairs for each extension. - /// - /// `None` will be returned if this entry does not indicate that it itself - /// contains extensions, or if there were no previous extensions describing - /// it. - /// - /// Note that global pax extensions are intended to be applied to all - /// archive entries. - /// - /// Also note that this function will read the entire entry if the entry - /// itself is a list of extensions. - pub fn pax_extensions(&mut self) -> io::Result<Option<PaxExtensions>> { - self.fields.pax_extensions() - } - - /// Returns access to the header of this entry in the archive. - /// - /// This provides access to the the metadata for this entry in the archive. - pub fn header(&self) -> &Header { - &self.fields.header - } - - /// Writes this file to the specified location. - /// - /// This function will write the entire contents of this file into the - /// location specified by `dst`. Metadata will also be propagated to the - /// path `dst`. - /// - /// This function will create a file at the path `dst`, and it is required - /// that the intermediate directories are created. Any existing file at the - /// location `dst` will be overwritten. - /// - /// # Examples - /// - /// ```no_run - /// use std::fs::File; - /// use tar::Archive; - /// - /// let mut ar = Archive::new(File::open("foo.tar").unwrap()); - /// - /// for (i, file) in ar.entries().unwrap().enumerate() { - /// let mut file = file.unwrap(); - /// file.unpack(format!("file-{}", i)).unwrap(); - /// } - /// ``` - pub fn unpack<P: AsRef<Path>>(&mut self, dst: P) -> io::Result<()> { - self.fields.unpack(dst.as_ref()) - } -} - -impl<'a, R: Read> Read for Entry<'a, R> { - fn read(&mut self, into: &mut [u8]) -> io::Result<usize> { - self.fields.read(into) - } -} - -impl<'a> EntryFields<'a> { - pub fn from<R: Read>(entry: Entry<R>) -> EntryFields { - entry.fields - } - - pub fn into_entry<R: Read>(self) -> Entry<'a, R> { - Entry { - fields: self, - _ignored: marker::PhantomData, - } - } - - pub fn read_all(&mut self) -> io::Result<Vec<u8>> { - // Preallocate some data but don't let ourselves get too crazy now. - let cap = cmp::min(self.size, 128 * 1024); - let mut v = Vec::with_capacity(cap as usize); - self.read_to_end(&mut v).map(|_| v) - } - - fn path(&self) -> io::Result<Cow<Path>> { - bytes2path(self.path_bytes()) - } - - fn path_bytes(&self) -> Cow<[u8]> { - match self.long_pathname { - Some(ref bytes) => deslash(bytes), - None => self.header.path_bytes(), - } - } - - fn link_name(&self) -> io::Result<Option<Cow<Path>>> { - match self.link_name_bytes() { - Some(bytes) => bytes2path(bytes).map(Some), - None => Ok(None), - } - } - - fn link_name_bytes(&self) -> Option<Cow<[u8]>> { - match self.long_linkname { - Some(ref bytes) => Some(deslash(bytes)), - None => self.header.link_name_bytes(), - } - } - - fn pax_extensions(&mut self) -> io::Result<Option<PaxExtensions>> { - if self.pax_extensions.is_none() { - if !self.header.entry_type().is_pax_global_extensions() && - !self.header.entry_type().is_pax_local_extensions() { - return Ok(None) - } - self.pax_extensions = Some(try!(self.read_all())); - } - Ok(Some(pax_extensions(self.pax_extensions.as_ref().unwrap()))) - } - - /// Returns access to the header of this entry in the archive. - fn unpack(&mut self, dst: &Path) -> io::Result<()> { - let kind = self.header.entry_type(); - if kind.is_dir() { - // If the directory already exists just let it slide - let prev = fs::metadata(&dst); - if prev.map(|m| m.is_dir()).unwrap_or(false) { - return Ok(()) - } - return fs::create_dir(&dst) - } else if kind.is_hard_link() || kind.is_symlink() { - let src = match try!(self.link_name()) { - Some(name) => name, - None => return Err(other("hard link listed but no link \ - name found")) - }; - - return if kind.is_hard_link() { - fs::hard_link(&src, dst) - } else { - symlink(&src, dst) - }; - - #[cfg(windows)] - fn symlink(src: &Path, dst: &Path) -> io::Result<()> { - ::std::os::windows::fs::symlink_file(src, dst) - } - #[cfg(unix)] - fn symlink(src: &Path, dst: &Path) -> io::Result<()> { - ::std::os::unix::fs::symlink(src, dst) - } - } else if kind.is_pax_global_extensions() || - kind.is_pax_local_extensions() || - kind.is_gnu_longname() || - kind.is_gnu_longlink() { - return Ok(()) - }; - - // Note the lack of `else` clause above. According to the FreeBSD - // documentation: - // - // > A POSIX-compliant implementation must treat any unrecognized - // > typeflag value as a regular file. - // - // As a result if we don't recognize the kind we just write out the file - // as we would normally. - - try!(fs::File::create(dst).and_then(|mut f| { - if try!(io::copy(self, &mut f)) != self.size { - return Err(other("failed to write entire file")); - } - Ok(()) - }).map_err(|e| { - let header = self.header.path_bytes(); - TarError::new(&format!("failed to unpack `{}` into `{}`", - String::from_utf8_lossy(&header), - dst.display()), e) - })); - - if let Ok(mtime) = self.header.mtime() { - let mtime = FileTime::from_seconds_since_1970(mtime, 0); - try!(filetime::set_file_times(dst, mtime, mtime).map_err(|e| { - TarError::new(&format!("failed to set mtime for `{}`", - dst.display()), e) - })); - } - if let Ok(mode) = self.header.mode() { - try!(set_perms(dst, mode).map_err(|e| { - TarError::new(&format!("failed to set permissions to {:o} \ - for `{}`", mode, dst.display()), e) - })); - } - return Ok(()); - - #[cfg(unix)] - #[allow(deprecated)] // raw deprecated in 1.8 - fn set_perms(dst: &Path, mode: u32) -> io::Result<()> { - use std::os::unix::raw; - use std::os::unix::prelude::*; - - let perm = fs::Permissions::from_mode(mode as raw::mode_t); - fs::set_permissions(dst, perm) - } - #[cfg(windows)] - fn set_perms(dst: &Path, mode: u32) -> io::Result<()> { - let mut perm = try!(fs::metadata(dst)).permissions(); - perm.set_readonly(mode & 0o200 != 0o200); - fs::set_permissions(dst, perm) - } - } -} - -impl<'a> Read for EntryFields<'a> { - fn read(&mut self, into: &mut [u8]) -> io::Result<usize> { - self.data.read(into) - } -} diff --git a/deps/tar-0.4.3/src/header.rs b/deps/tar-0.4.3/src/header.rs deleted file mode 100644 index 6a6473436..000000000 --- a/deps/tar-0.4.3/src/header.rs +++ /dev/null @@ -1,895 +0,0 @@ -#[cfg(unix)] use std::os::unix::prelude::*; -#[cfg(windows)] use std::os::windows::prelude::*; - -use std::borrow::Cow; -use std::cmp; -use std::fmt; -use std::fs; -use std::io; -use std::iter::repeat; -use std::mem; -use std::path::{Path, PathBuf}; -use std::str; - -use EntryType; -use other; - -/// Representation of the header of an entry in an archive -#[repr(C)] -pub struct Header { - bytes: [u8; 512], -} - -/// Representation of the header of an entry in an archive -#[repr(C)] -#[allow(missing_docs)] -pub struct OldHeader { - pub name: [u8; 100], - pub mode: [u8; 8], - pub uid: [u8; 8], - pub gid: [u8; 8], - pub size: [u8; 12], - pub mtime: [u8; 12], - pub cksum: [u8; 8], - pub linkflag: [u8; 1], - pub linkname: [u8; 100], - pub pad: [u8; 255], -} - -/// Representation of the header of an entry in an archive -#[repr(C)] -#[allow(missing_docs)] -pub struct UstarHeader { - pub name: [u8; 100], - pub mode: [u8; 8], - pub uid: [u8; 8], - pub gid: [u8; 8], - pub size: [u8; 12], - pub mtime: [u8; 12], - pub cksum: [u8; 8], - pub typeflag: [u8; 1], - pub linkname: [u8; 100], - - // UStar format - pub magic: [u8; 6], - pub version: [u8; 2], - pub uname: [u8; 32], - pub gname: [u8; 32], - pub dev_major: [u8; 8], - pub dev_minor: [u8; 8], - pub prefix: [u8; 155], - pub pad: [u8; 12], -} - -/// Representation of the header of an entry in an archive -#[repr(C)] -#[allow(missing_docs)] -pub struct GnuHeader { - pub name: [u8; 100], - pub mode: [u8; 8], - pub uid: [u8; 8], - pub gid: [u8; 8], - pub size: [u8; 12], - pub mtime: [u8; 12], - pub cksum: [u8; 8], - pub typeflag: [u8; 1], - pub linkname: [u8; 100], - - // GNU format - pub magic: [u8; 6], - pub version: [u8; 2], - pub uname: [u8; 32], - pub gname: [u8; 32], - pub dev_major: [u8; 8], - pub dev_minor: [u8; 8], - pub atime: [u8; 12], - pub ctime: [u8; 12], - pub offset: [u8; 12], - pub longnames: [u8; 4], - pub unused: [u8; 1], - pub sparse: [GnuSparseHeader; 4], - pub isextended: [u8; 1], - pub realsize: [u8; 12], - pub pad: [u8; 17], -} - -#[repr(C)] -#[allow(missing_docs)] -pub struct GnuSparseHeader { - pub offset: [u8; 12], - pub numbytes: [u8; 12], -} - -impl Header { - /// Creates a new blank GNU header. - /// - /// The GNU style header is the default for this library and allows various - /// extensions such as long path names, long link names, and setting the - /// atime/ctime metadata attributes of files. - pub fn new_gnu() -> Header { - let mut header = Header { bytes: [0; 512] }; - { - let gnu = header.cast_mut::<GnuHeader>(); - gnu.magic = *b"ustar "; - gnu.version = *b" \0"; - } - return header - } - - /// Creates a new blank UStar header. - /// - /// The UStar style header is an extension of the original archive header - /// which enables some extra metadata along with storing a longer (but not - /// too long) path name. - /// - /// UStar is also the basis used for pax archives. - pub fn new_ustar() -> Header { - let mut header = Header { bytes: [0; 512] }; - { - let gnu = header.cast_mut::<UstarHeader>(); - gnu.magic = *b"ustar\0"; - gnu.version = *b"00"; - } - return header - } - - /// Creates a new blank old header. - /// - /// This header format is the original archive header format which all other - /// versions are compatible with (e.g. they are a superset). This header - /// format limits the path name limit and isn't able to contain extra - /// metadata like atime/ctime. - pub fn new_old() -> Header { - Header { bytes: [0; 512] } - } - - fn cast<T>(&self) -> &T { - assert_eq!(mem::size_of_val(self), mem::size_of::<T>()); - unsafe { &*(self as *const Header as *const T) } - } - - fn cast_mut<T>(&mut self) -> &mut T { - assert_eq!(mem::size_of_val(self), mem::size_of::<T>()); - unsafe { &mut *(self as *mut Header as *mut T) } - } - - fn is_ustar(&self) -> bool { - let ustar = self.cast::<UstarHeader>(); - ustar.magic[..] == b"ustar\0"[..] && ustar.version[..] == b"00"[..] - } - - fn is_gnu(&self) -> bool { - let ustar = self.cast::<UstarHeader>(); - ustar.magic[..] == b"ustar "[..] && ustar.version[..] == b" \0"[..] - } - - /// View this archive header as a raw "old" archive header. - /// - /// This view will always succeed as all archive header formats will fill - /// out at least the fields specified in the old header format. - pub fn as_old(&self) -> &OldHeader { - self.cast() - } - - /// Same as `as_old`, but the mutable version. - pub fn as_old_mut(&mut self) -> &mut OldHeader { - self.cast_mut() - } - - /// View this archive header as a raw UStar archive header. - /// - /// The UStar format is an extension to the tar archive format which enables - /// longer pathnames and a few extra attributes such as the group and user - /// name. - /// - /// This cast may not succeed as this function will test whether the - /// magic/version fields of the UStar format have the appropriate values, - /// returning `None` if they aren't correct. - pub fn as_ustar(&self) -> Option<&UstarHeader> { - if self.is_ustar() {Some(self.cast())} else {None} - } - - /// Same as `as_ustar_mut`, but the mutable version. - pub fn as_ustar_mut(&mut self) -> Option<&mut UstarHeader> { - if self.is_ustar() {Some(self.cast_mut())} else {None} - } - - /// View this archive header as a raw GNU archive header. - /// - /// The GNU format is an extension to the tar archive format which enables - /// longer pathnames and a few extra attributes such as the group and user - /// name. - /// - /// This cast may not succeed as this function will test whether the - /// magic/version fields of the GNU format have the appropriate values, - /// returning `None` if they aren't correct. - pub fn as_gnu(&self) -> Option<&GnuHeader> { - if self.is_gnu() {Some(self.cast())} else {None} - } - - /// Same as `as_gnu`, but the mutable version. - pub fn as_gnu_mut(&mut self) -> Option<&mut GnuHeader> { - if self.is_gnu() {Some(self.cast_mut())} else {None} - } - - /// Returns a view into this header as a byte array. - pub fn as_bytes(&self) -> &[u8; 512] { - &self.bytes - } - - /// Returns a view into this header as a byte array. - pub fn as_mut_bytes(&mut self) -> &mut [u8; 512] { - &mut self.bytes - } - - /// Blanket sets the metadata in this header from the metadata argument - /// provided. - /// - /// This is useful for initializing a `Header` from the OS's metadata from a - /// file. - pub fn set_metadata(&mut self, meta: &fs::Metadata) { - self.fill_from(meta); - // Set size of directories to zero - self.set_size(if meta.is_dir() { 0 } else { meta.len() }); - if let Some(ustar) = self.as_ustar_mut() { - ustar.set_device_major(0); - ustar.set_device_minor(0); - } - if let Some(gnu) = self.as_gnu_mut() { - gnu.set_device_major(0); - gnu.set_device_minor(0); - } - } - - /// Returns the file size this header represents. - /// - /// May return an error if the field is corrupted. - pub fn size(&self) -> io::Result<u64> { - octal_from(&self.as_old().size) - } - - /// Encodes the `size` argument into the size field of this header. - pub fn set_size(&mut self, size: u64) { - octal_into(&mut self.as_old_mut().size, size) - } - - /// Returns the raw path name stored in this header. - /// - /// This method may fail if the pathname is not valid unicode and this is - /// called on a Windows platform. - /// - /// Note that this function will convert any `\` characters to directory - /// separators. - pub fn path(&self) -> io::Result<Cow<Path>> { - bytes2path(self.path_bytes()) - } - - /// Returns the pathname stored in this header as a byte array. - /// - /// This function is guaranteed to succeed, but you may wish to call the - /// `path` method to convert to a `Path`. - /// - /// Note that this function will convert any `\` characters to directory - /// separators. - pub fn path_bytes(&self) -> Cow<[u8]> { - if let Some(ustar) = self.as_ustar() { - ustar.path_bytes() - } else { - let name = truncate(&self.as_old().name); - if !name.contains(&b'\\') { - Cow::Borrowed(truncate(name)) - } else { - Cow::Owned(truncate(name).iter().map(noslash).collect()) - } - } - } - - /// Sets the path name for this header. - /// - /// This function will set the pathname listed in this header, encoding it - /// in the appropriate format. May fail if the path is too long or if the - /// path specified is not unicode and this is a Windows platform. - pub fn set_path<P: AsRef<Path>>(&mut self, p: P) -> io::Result<()> { - self._set_path(p.as_ref()) - } - - fn _set_path(&mut self, path: &Path) -> io::Result<()> { - if let Some(ustar) = self.as_ustar_mut() { - return ustar.set_path(path) - } - let bytes = try!(path2bytes(path)); - copy_into(&mut self.as_old_mut().name, bytes, true) - } - - /// Returns the link name stored in this header, if any is found. - /// - /// This method may fail if the pathname is not valid unicode and this is - /// called on a Windows platform. `Ok(None)` being returned, however, - /// indicates that the link name was not present. - /// - /// Note that this function will convert any `\` characters to directory - /// separators. - pub fn link_name(&self) -> io::Result<Option<Cow<Path>>> { - match self.link_name_bytes() { - Some(bytes) => bytes2path(bytes).map(Some), - None => Ok(None), - } - } - - /// Returns the link name stored in this header as a byte array, if any. - /// - /// This function is guaranteed to succeed, but you may wish to call the - /// `link_name` method to convert to a `Path`. - /// - /// Note that this function will convert any `\` characters to directory - /// separators. - pub fn link_name_bytes(&self) -> Option<Cow<[u8]>> { - let old = self.as_old(); - if old.linkname[0] != 0 { - Some(deslash(&old.linkname)) - } else { - None - } - } - - /// Sets the path name for this header. - /// - /// This function will set the pathname listed in this header, encoding it - /// in the appropriate format. May fail if the path is too long or if the - /// path specified is not unicode and this is a Windows platform. - pub fn set_link_name<P: AsRef<Path>>(&mut self, p: P) -> io::Result<()> { - self._set_link_name(p.as_ref()) - } - - fn _set_link_name(&mut self, path: &Path) -> io::Result<()> { - let bytes = try!(path2bytes(path)); - try!(copy_into(&mut self.as_old_mut().linkname, bytes, true)); - Ok(()) - } - - /// Returns the mode bits for this file - /// - /// May return an error if the field is corrupted. - pub fn mode(&self) -> io::Result<u32> { - octal_from(&self.as_old().mode).map(|u| u as u32) - } - - /// Encodes the `mode` provided into this header. - pub fn set_mode(&mut self, mode: u32) { - octal_into(&mut self.as_old_mut().mode, mode & 0o3777); - } - - /// Returns the value of the owner's user ID field - /// - /// May return an error if the field is corrupted. - pub fn uid(&self) -> io::Result<u32> { - octal_from(&self.as_old().uid).map(|u| u as u32) - } - - /// Encodes the `uid` provided into this header. - pub fn set_uid(&mut self, uid: u32) { - octal_into(&mut self.as_old_mut().uid, uid); - } - - /// Returns the value of the group's user ID field - pub fn gid(&self) -> io::Result<u32> { - octal_from(&self.as_old().gid).map(|u| u as u32) - } - - /// Encodes the `gid` provided into this header. - pub fn set_gid(&mut self, gid: u32) { - octal_into(&mut self.as_old_mut().gid, gid); - } - - /// Returns the last modification time in Unix time format - pub fn mtime(&self) -> io::Result<u64> { - octal_from(&self.as_old().mtime) - } - - /// Encodes the `mtime` provided into this header. - /// - /// Note that this time is typically a number of seconds passed since - /// January 1, 1970. - pub fn set_mtime(&mut self, mtime: u64) { - octal_into(&mut self.as_old_mut().mtime, mtime); - } - - /// Return the user name of the owner of this file. - /// - /// A return value of `Ok(Some(..))` indicates that the user name was - /// present and was valid utf-8, `Ok(None)` indicates that the user name is - /// not present in this archive format, and `Err` indicates that the user - /// name was present but was not valid utf-8. - pub fn username(&self) -> Result<Option<&str>, str::Utf8Error> { - match self.username_bytes() { - Some(bytes) => str::from_utf8(bytes).map(Some), - None => Ok(None), - } - } - - /// Returns the user name of the owner of this file, if present. - /// - /// A return value of `None` indicates that the user name is not present in - /// this header format. - pub fn username_bytes(&self) -> Option<&[u8]> { - if let Some(ustar) = self.as_ustar() { - Some(ustar.username_bytes()) - } else if let Some(gnu) = self.as_gnu() { - Some(gnu.username_bytes()) - } else { - None - } - } - - /// Sets the username inside this header. - /// - /// This function will return an error if this header format cannot encode a - /// user name or the name is too long. - pub fn set_username(&mut self, name: &str) -> io::Result<()> { - if let Some(ustar) = self.as_ustar_mut() { - return ustar.set_username(name) - } - if let Some(gnu) = self.as_gnu_mut() { - gnu.set_username(name) - } else { - Err(other("not a ustar or gnu archive, cannot set username")) - } - } - - /// Return the group name of the owner of this file. - /// - /// A return value of `Ok(Some(..))` indicates that the group name was - /// present and was valid utf-8, `Ok(None)` indicates that the group name is - /// not present in this archive format, and `Err` indicates that the group - /// name was present but was not valid utf-8. - pub fn groupname(&self) -> Result<Option<&str>, str::Utf8Error> { - match self.groupname_bytes() { - Some(bytes) => str::from_utf8(bytes).map(Some), - None => Ok(None), - } - } - - /// Returns the group name of the owner of this file, if present. - /// - /// A return value of `None` indicates that the group name is not present in - /// this header format. - pub fn groupname_bytes(&self) -> Option<&[u8]> { - if let Some(ustar) = self.as_ustar() { - Some(ustar.groupname_bytes()) - } else if let Some(gnu) = self.as_gnu() { - Some(gnu.groupname_bytes()) - } else { - None - } - } - - /// Sets the group name inside this header. - /// - /// This function will return an error if this header format cannot encode a - /// group name or the name is too long. - pub fn set_groupname(&mut self, name: &str) -> io::Result<()> { - if let Some(ustar) = self.as_ustar_mut() { - return ustar.set_groupname(name) - } - if let Some(gnu) = self.as_gnu_mut() { - gnu.set_groupname(name) - } else { - Err(other("not a ustar or gnu archive, cannot set groupname")) - } - } - - /// Returns the device major number, if present. - /// - /// This field may not be present in all archives, and it may not be - /// correctly formed in all archives. `Ok(Some(..))` means it was present - /// and correctly decoded, `Ok(None)` indicates that this header format does - /// not include the device major number, and `Err` indicates that it was - /// present and failed to decode. - pub fn device_major(&self) -> io::Result<Option<u32>> { - if let Some(ustar) = self.as_ustar() { - ustar.device_major().map(Some) - } else if let Some(gnu) = self.as_gnu() { - gnu.device_major().map(Some) - } else { - Ok(None) - } - } - - /// Encodes the value `major` into the dev_major field of this header. - /// - /// This function will return an error if this header format cannot encode a - /// major device number. - pub fn set_device_major(&mut self, major: u32) -> io::Result<()> { - if let Some(ustar) = self.as_ustar_mut() { - return Ok(ustar.set_device_major(major)) - } - if let Some(gnu) = self.as_gnu_mut() { - Ok(gnu.set_device_major(major)) - } else { - Err(other("not a ustar or gnu archive, cannot set dev_major")) - } - } - - /// Returns the device minor number, if present. - /// - /// This field may not be present in all archives, and it may not be - /// correctly formed in all archives. `Ok(Some(..))` means it was present - /// and correctly decoded, `Ok(None)` indicates that this header format does - /// not include the device minor number, and `Err` indicates that it was - /// present and failed to decode. - pub fn device_minor(&self) -> io::Result<Option<u32>> { - if let Some(ustar) = self.as_ustar() { - ustar.device_minor().map(Some) - } else if let Some(gnu) = self.as_gnu() { - gnu.device_minor().map(Some) - } else { - Ok(None) - } - } - - /// Encodes the value `minor` into the dev_minor field of this header. - /// - /// This function will return an error if this header format cannot encode a - /// minor device number. - pub fn set_device_minor(&mut self, minor: u32) -> io::Result<()> { - if let Some(ustar) = self.as_ustar_mut() { - return Ok(ustar.set_device_minor(minor)) - } - if let Some(gnu) = self.as_gnu_mut() { - Ok(gnu.set_device_minor(minor)) - } else { - Err(other("not a ustar or gnu archive, cannot set dev_minor")) - } - } - - /// Returns the type of file described by this header. - pub fn entry_type(&self) -> EntryType { - EntryType::new(self.as_old().linkflag[0]) - } - - /// Sets the type of file that will be described by this header. - pub fn set_entry_type(&mut self, ty: EntryType) { - self.as_old_mut().linkflag = [ty.as_byte()]; - } - - /// Returns the checksum field of this header. - /// - /// May return an error if the field is corrupted. - pub fn cksum(&self) -> io::Result<u32> { - octal_from(&self.as_old().cksum).map(|u| u as u32) - } - - /// Sets the checksum field of this header based on the current fields in - /// this header. - pub fn set_cksum(&mut self) { - self.as_old_mut().cksum = *b" "; - let cksum = self.bytes.iter().fold(0, |a, b| a + (*b as u32)); - octal_into(&mut self.as_old_mut().cksum, cksum); - } - - #[cfg(unix)] - fn fill_from(&mut self, meta: &fs::Metadata) { - use libc; - - self.set_mode((meta.mode() & 0o3777) as u32); - self.set_mtime(meta.mtime() as u64); - if let Some(gnu) = self.as_gnu_mut() { - gnu.set_atime(meta.atime() as u64); - gnu.set_ctime(meta.ctime() as u64); - } - self.set_uid(meta.uid() as u32); - self.set_gid(meta.gid() as u32); - - // TODO: need to bind more file types - self.set_entry_type(match meta.mode() as libc::mode_t & libc::S_IFMT { - libc::S_IFREG => EntryType::file(), - libc::S_IFLNK => EntryType::symlink(), - libc::S_IFCHR => EntryType::character_special(), - libc::S_IFBLK => EntryType::block_special(), - libc::S_IFDIR => EntryType::dir(), - libc::S_IFIFO => EntryType::fifo(), - _ => EntryType::new(b' '), - }); - } - - #[cfg(windows)] - fn fill_from(&mut self, meta: &fs::Metadata) { - const FILE_ATTRIBUTE_READONLY: u32 = 0x00000001; - let readonly = meta.file_attributes() & FILE_ATTRIBUTE_READONLY; - - // There's no concept of a mode on windows, so do a best approximation - // here. - let mode = match (meta.is_dir(), readonly != 0) { - (true, false) => 0o755, - (true, true) => 0o555, - (false, false) => 0o644, - (false, true) => 0o444, - }; - self.set_mode(mode); - self.set_uid(0); - self.set_gid(0); - - let ft = meta.file_type(); - self.set_entry_type(if ft.is_dir() { - EntryType::dir() - } else if ft.is_file() { - EntryType::file() - } else if ft.is_symlink() { - EntryType::symlink() - } else { - EntryType::new(b' ') - }); - - // The dates listed in tarballs are always seconds relative to - // January 1, 1970. On Windows, however, the timestamps are returned as - // dates relative to January 1, 1601 (in 100ns intervals), so we need to - // add in some offset for those dates. - let mtime = (meta.last_write_time() / (1_000_000_000 / 100)) - 11644473600; - self.set_mtime(mtime); - } -} - -impl Clone for Header { - fn clone(&self) -> Header { - Header { bytes: self.bytes } - } -} - -impl UstarHeader { - /// See `Header::path_bytes` - pub fn path_bytes(&self) -> Cow<[u8]> { - if self.prefix[0] == 0 && !self.name.contains(&b'\\') { - Cow::Borrowed(truncate(&self.name)) - } else { - let mut bytes = Vec::new(); - let prefix = truncate(&self.prefix); - if prefix.len() > 0 { - bytes.extend(prefix.iter().map(noslash)); - bytes.push(b'/'); - } - bytes.extend(truncate(&self.name).iter().map(noslash)); - Cow::Owned(bytes) - } - } - - /// See `Header::set_path` - pub fn set_path<P: AsRef<Path>>(&mut self, p: P) -> io::Result<()> { - self._set_path(p.as_ref()) - } - - fn _set_path(&mut self, path: &Path) -> io::Result<()> { - let bytes = try!(path2bytes(path)); - let (namelen, prefixlen) = (self.name.len(), self.prefix.len()); - if bytes.len() <= namelen { - try!(copy_into(&mut self.name, bytes, true)); - } else { - let prefix = &bytes[..cmp::min(bytes.len(), prefixlen)]; - let pos = match prefix.iter().rposition(|&b| b == b'/' || b == b'\\') { - Some(i) => i, - None => return Err(other("path cannot be split to be inserted \ - into archive")), - }; - try!(copy_into(&mut self.name, &bytes[pos + 1..], true)); - try!(copy_into(&mut self.prefix, &bytes[..pos], true)); - } - Ok(()) - } - - /// See `Header::username_bytes` - pub fn username_bytes(&self) -> &[u8] { - truncate(&self.uname) - } - - /// See `Header::set_username` - pub fn set_username(&mut self, name: &str) -> io::Result<()> { - copy_into(&mut self.uname, name.as_bytes(), false) - } - - /// See `Header::groupname_bytes` - pub fn groupname_bytes(&self) -> &[u8] { - truncate(&self.gname) - } - - /// See `Header::set_groupname` - pub fn set_groupname(&mut self, name: &str) -> io::Result<()> { - copy_into(&mut self.gname, name.as_bytes(), false) - } - - /// See `Header::device_major` - pub fn device_major(&self) -> io::Result<u32> { - octal_from(&self.dev_major).map(|u| u as u32) - } - - /// See `Header::set_device_major` - pub fn set_device_major(&mut self, major: u32) { - octal_into(&mut self.dev_major, major); - } - - /// See `Header::device_minor` - pub fn device_minor(&self) -> io::Result<u32> { - octal_from(&self.dev_minor).map(|u| u as u32) - } - - /// See `Header::set_device_minor` - pub fn set_device_minor(&mut self, minor: u32) { - octal_into(&mut self.dev_minor, minor); - } -} - -impl GnuHeader { - /// See `Header::username_bytes` - pub fn username_bytes(&self) -> &[u8] { - truncate(&self.uname) - } - - /// See `Header::set_username` - pub fn set_username(&mut self, name: &str) -> io::Result<()> { - copy_into(&mut self.uname, name.as_bytes(), false) - } - - /// See `Header::groupname_bytes` - pub fn groupname_bytes(&self) -> &[u8] { - truncate(&self.gname) - } - - /// See `Header::set_groupname` - pub fn set_groupname(&mut self, name: &str) -> io::Result<()> { - copy_into(&mut self.gname, name.as_bytes(), false) - } - - /// See `Header::device_major` - pub fn device_major(&self) -> io::Result<u32> { - octal_from(&self.dev_major).map(|u| u as u32) - } - - /// See `Header::set_device_major` - pub fn set_device_major(&mut self, major: u32) { - octal_into(&mut self.dev_major, major); - } - - /// See `Header::device_minor` - pub fn device_minor(&self) -> io::Result<u32> { - octal_from(&self.dev_minor).map(|u| u as u32) - } - - /// See `Header::set_device_minor` - pub fn set_device_minor(&mut self, minor: u32) { - octal_into(&mut self.dev_minor, minor); - } - - /// Returns the last modification time in Unix time format - pub fn atime(&self) -> io::Result<u64> { - octal_from(&self.atime) - } - - /// Encodes the `atime` provided into this header. - /// - /// Note that this time is typically a number of seconds passed since - /// January 1, 1970. - pub fn set_atime(&mut self, atime: u64) { - octal_into(&mut self.atime, atime); - } - - /// Returns the last modification time in Unix time format - pub fn ctime(&self) -> io::Result<u64> { - octal_from(&self.ctime) - } - - /// Encodes the `ctime` provided into this header. - /// - /// Note that this time is typically a number of seconds passed since - /// January 1, 1970. - pub fn set_ctime(&mut self, ctime: u64) { - octal_into(&mut self.ctime, ctime); - } -} - -pub fn deslash(bytes: &[u8]) -> Cow<[u8]> { - let bytes = truncate(bytes); - if !bytes.contains(&b'\\') { - Cow::Borrowed(bytes) - } else { - Cow::Owned(bytes.iter().map(noslash).collect()) - } -} - -fn octal_from(slice: &[u8]) -> io::Result<u64> { - let num = match str::from_utf8(truncate(slice)) { - Ok(n) => n, - Err(_) => return Err(other("numeric field did not have utf-8 text")), - }; - match u64::from_str_radix(num.trim(), 8) { - Ok(n) => Ok(n), - Err(_) => Err(other("numeric field was not a number")) - } -} - -fn octal_into<T: fmt::Octal>(dst: &mut [u8], val: T) { - let o = format!("{:o}", val); - let value = o.bytes().rev().chain(repeat(b'0')); - for (slot, value) in dst.iter_mut().rev().skip(1).zip(value) { - *slot = value; - } -} - -fn truncate<'a>(slice: &'a [u8]) -> &'a [u8] { - match slice.iter().position(|i| *i == 0) { - Some(i) => &slice[..i], - None => slice, - } -} - -fn noslash(b: &u8) -> u8 { - if *b == b'\\' {b'/'} else {*b} -} - -/// Copies `bytes` into the `slot` provided, returning an error if the `bytes` -/// array is too long or if it contains any nul bytes. -/// -/// Also provides the option to map '\' characters to '/' characters for the -/// names of paths in archives. The `tar` utility doesn't seem to like windows -/// backslashes when unpacking on Unix. -fn copy_into(slot: &mut [u8], bytes: &[u8], map_slashes: bool) -> io::Result<()> { - if bytes.len() > slot.len() { - Err(other("provided value is too long")) - } else if bytes.iter().any(|b| *b == 0) { - Err(other("provided value contains a nul byte")) - } else { - for (slot, val) in slot.iter_mut().zip(bytes.iter().chain(Some(&0))) { - if map_slashes && *val == b'\\' { - *slot = b'/'; - } else { - *slot = *val; - } - } - Ok(()) - } -} - -#[cfg(windows)] -pub fn path2bytes(p: &Path) -> io::Result<&[u8]> { - p.as_os_str().to_str().map(|s| s.as_bytes()).ok_or_else(|| { - other("path was not valid unicode") - }) -} - -#[cfg(unix)] -pub fn path2bytes(p: &Path) -> io::Result<&[u8]> { - Ok(p.as_os_str().as_bytes()) -} - -#[cfg(windows)] -pub fn bytes2path(bytes: Cow<[u8]>) -> io::Result<Cow<Path>> { - return match bytes { - Cow::Borrowed(bytes) => { - let s = try!(str::from_utf8(bytes).map_err(|_| { - not_unicode() - })); - Ok(Cow::Borrowed(Path::new(s))) - } - Cow::Owned(bytes) => { - let s = try!(String::from_utf8(bytes).map_err(|_| { - not_unicode() - })); - Ok(Cow::Owned(PathBuf::from(s))) - } - }; - - fn not_unicode() -> io::Error { - other("only unicode paths are supported on windows") - } -} - -#[cfg(unix)] -pub fn bytes2path(bytes: Cow<[u8]>) -> io::Result<Cow<Path>> { - use std::ffi::{OsStr, OsString}; - - Ok(match bytes { - Cow::Borrowed(bytes) => Cow::Borrowed({ - Path::new(OsStr::from_bytes(bytes)) - }), - Cow::Owned(bytes) => Cow::Owned({ - PathBuf::from(OsString::from_vec(bytes)) - }) - }) -} diff --git a/deps/tar-0.4.3/src/lib.rs b/deps/tar-0.4.3/src/lib.rs deleted file mode 100644 index ed0fc6297..000000000 --- a/deps/tar-0.4.3/src/lib.rs +++ /dev/null @@ -1,65 +0,0 @@ -//! A library for reading and writing TAR archives -//! -//! This library provides utilities necessary to manage TAR archives [1] -//! abstracted over a reader or writer. Great strides are taken to ensure that -//! an archive is never required to be fully resident in memory, all objects -//! provide largely a streaming interface to read bytes from. -//! -//! [1]: http://en.wikipedia.org/wiki/Tar_%28computing%29 - -// More docs about the detailed tar format can also be found here: -// http://www.freebsd.org/cgi/man.cgi?query=tar&sektion=5&manpath=FreeBSD+8-current - -// NB: some of the coding patterns and idioms here may seem a little strange. -// This is currently attempting to expose a super generic interface while -// also not forcing clients to codegen the entire crate each time they use -// it. To that end lots of work is done to ensure that concrete -// implementations are all found in this crate and the generic functions are -// all just super thin wrappers (e.g. easy to codegen). - -#![doc(html_root_url = "http://alexcrichton.com/tar-rs")] -#![deny(missing_docs)] -#![cfg_attr(test, deny(warnings))] - -extern crate libc; -extern crate filetime; - -use std::io::{Error, ErrorKind}; -use std::ops::{Deref, DerefMut}; - -pub use header::{Header, UstarHeader, GnuHeader, GnuSparseHeader}; -pub use entry_type::EntryType; -pub use entry::Entry; -pub use archive::{Archive, Entries}; -pub use builder::Builder; -pub use pax::{PaxExtensions, PaxExtension}; - -mod archive; -mod builder; -mod entry; -mod entry_type; -mod error; -mod header; -mod pax; - -// FIXME(rust-lang/rust#26403): -// Right now there's a bug when a DST struct's last field has more -// alignment than the rest of a structure, causing invalid pointers to be -// created when it's casted around at runtime. To work around this we force -// our DST struct to instead have a forcibly higher alignment via a -// synthesized u64 (hopefully the largest alignment we'll run into in -// practice), and this should hopefully ensure that the pointers all work -// out. -struct AlignHigher<R: ?Sized>(u64, R); - -impl<R: ?Sized> Deref for AlignHigher<R> { - type Target = R; - fn deref(&self) -> &R { &self.1 } -} -impl<R: ?Sized> DerefMut for AlignHigher<R> { - fn deref_mut(&mut self) -> &mut R { &mut self.1 } -} - -fn other(msg: &str) -> Error { - Error::new(ErrorKind::Other, msg) -} diff --git a/deps/tar-0.4.3/tests/all.rs b/deps/tar-0.4.3/tests/all.rs deleted file mode 100644 index f9533b499..000000000 --- a/deps/tar-0.4.3/tests/all.rs +++ /dev/null @@ -1,467 +0,0 @@ -extern crate filetime; -extern crate tar; -extern crate tempdir; - -use std::io::prelude::*; -use std::io::{self, Cursor, SeekFrom}; -use std::iter::repeat; -use std::fs::{self, File}; -use std::path::Path; - -use filetime::FileTime; -use self::tempdir::TempDir; -use tar::{Archive, Builder, Header}; - -macro_rules! t { - ($e:expr) => (match $e { - Ok(v) => v, - Err(e) => panic!("{} returned {}", stringify!($e), e), - }) -} - -macro_rules! tar { - ($e:expr) => (&include_bytes!(concat!("archives/", $e))[..]) -} - -mod header; - -#[test] -fn simple() { - let mut ar = Archive::new(Cursor::new(tar!("simple.tar"))); - for entry in t!(ar.entries()) { - t!(entry); - } - let mut ar = Archive::new(Cursor::new(tar!("simple.tar"))); - for entry in t!(ar.entries()) { - t!(entry); - } -} - -#[test] -fn header_impls() { - let mut ar = Archive::new(Cursor::new(tar!("simple.tar"))); - let hn = Header::new_old(); - let hnb = hn.as_bytes(); - for file in t!(ar.entries()) { - let file = t!(file); - let h1 = file.header(); - let h1b = h1.as_bytes(); - let h2 = h1.clone(); - let h2b = h2.as_bytes(); - assert!(h1b[..] == h2b[..] && h2b[..] != hnb[..]) - } -} - -#[test] -fn reading_files() { - let rdr = Cursor::new(tar!("reading_files.tar")); - let mut ar = Archive::new(rdr); - let mut entries = t!(ar.entries()); - - let mut a = t!(entries.next().unwrap()); - assert_eq!(&*a.header().path_bytes(), b"a"); - let mut s = String::new(); - t!(a.read_to_string(&mut s)); - assert_eq!(s, "a\na\na\na\na\na\na\na\na\na\na\n"); - - let mut b = t!(entries.next().unwrap()); - assert_eq!(&*b.header().path_bytes(), b"b"); - s.truncate(0); - t!(b.read_to_string(&mut s)); - assert_eq!(s, "b\nb\nb\nb\nb\nb\nb\nb\nb\nb\nb\n"); - - assert!(entries.next().is_none()); -} - -#[test] -fn writing_files() { - let mut ar = Builder::new(Vec::new()); - let td = t!(TempDir::new("tar-rs")); - - let path = td.path().join("test"); - t!(t!(File::create(&path)).write_all(b"test")); - - t!(ar.append_file("test2", &mut t!(File::open(&path)))); - - let data = t!(ar.into_inner()); - let mut ar = Archive::new(Cursor::new(data)); - let mut entries = t!(ar.entries()); - let mut f = t!(entries.next().unwrap()); - - assert_eq!(&*f.header().path_bytes(), b"test2"); - assert_eq!(f.header().size().unwrap(), 4); - let mut s = String::new(); - t!(f.read_to_string(&mut s)); - assert_eq!(s, "test"); - - assert!(entries.next().is_none()); -} - -#[test] -fn large_filename() { - let mut ar = Builder::new(Vec::new()); - let td = t!(TempDir::new("tar-rs")); - - let path = td.path().join("test"); - t!(t!(File::create(&path)).write_all(b"test")); - - let filename = repeat("abcd/").take(50).collect::<String>(); - let mut header = Header::new_ustar(); - header.set_path(&filename).unwrap(); - header.set_metadata(&t!(fs::metadata(&path))); - header.set_cksum(); - t!(ar.append(&header, &b"test"[..])); - let too_long = repeat("abcd").take(200).collect::<String>(); - t!(ar.append_file(&too_long, &mut t!(File::open(&path)))); - - let rd = Cursor::new(t!(ar.into_inner())); - let mut ar = Archive::new(rd); - let mut entries = t!(ar.entries()); - - let mut f = entries.next().unwrap().unwrap(); - assert_eq!(&*f.header().path_bytes(), filename.as_bytes()); - assert_eq!(f.header().size().unwrap(), 4); - let mut s = String::new(); - t!(f.read_to_string(&mut s)); - assert_eq!(s, "test"); - - let mut f = entries.next().unwrap().unwrap(); - assert_eq!(&*f.path_bytes(), too_long.as_bytes()); - assert_eq!(f.header().size().unwrap(), 4); - let mut s = String::new(); - t!(f.read_to_string(&mut s)); - assert_eq!(s, "test"); - - assert!(entries.next().is_none()); -} - -#[test] -fn reading_entries() { - let rdr = Cursor::new(tar!("reading_files.tar")); - let mut ar = Archive::new(rdr); - let mut entries = t!(ar.entries()); - let mut a = t!(entries.next().unwrap()); - assert_eq!(&*a.header().path_bytes(), b"a"); - let mut s = String::new(); - t!(a.read_to_string(&mut s)); - assert_eq!(s, "a\na\na\na\na\na\na\na\na\na\na\n"); - s.truncate(0); - t!(a.read_to_string(&mut s)); - assert_eq!(s, ""); - let mut b = t!(entries.next().unwrap()); - - assert_eq!(&*b.header().path_bytes(), b"b"); - s.truncate(0); - t!(b.read_to_string(&mut s)); - assert_eq!(s, "b\nb\nb\nb\nb\nb\nb\nb\nb\nb\nb\n"); - assert!(entries.next().is_none()); -} - -fn check_dirtree(td: &TempDir) { - let dir_a = td.path().join("a"); - let dir_b = td.path().join("a/b"); - let file_c = td.path().join("a/c"); - assert!(fs::metadata(&dir_a).map(|m| m.is_dir()).unwrap_or(false)); - assert!(fs::metadata(&dir_b).map(|m| m.is_dir()).unwrap_or(false)); - assert!(fs::metadata(&file_c).map(|m| m.is_file()).unwrap_or(false)); -} - -#[test] -fn extracting_directories() { - let td = t!(TempDir::new("tar-rs")); - let rdr = Cursor::new(tar!("directory.tar")); - let mut ar = Archive::new(rdr); - t!(ar.unpack(td.path())); - check_dirtree(&td); -} - -#[test] -fn writing_and_extracting_directories() { - let td = t!(TempDir::new("tar-rs")); - - let mut ar = Builder::new(Vec::new()); - let tmppath = td.path().join("tmpfile"); - t!(t!(File::create(&tmppath)).write_all(b"c")); - t!(ar.append_dir("a", ".")); - t!(ar.append_dir("a/b", ".")); - t!(ar.append_file("a/c", &mut t!(File::open(&tmppath)))); - t!(ar.finish()); - - let rdr = Cursor::new(t!(ar.into_inner())); - let mut ar = Archive::new(rdr); - t!(ar.unpack(td.path())); - check_dirtree(&td); -} - -#[test] -fn extracting_duplicate_dirs() { - let td = t!(TempDir::new("tar-rs")); - let rdr = Cursor::new(tar!("duplicate_dirs.tar")); - let mut ar = Archive::new(rdr); - t!(ar.unpack(td.path())); - - let some_dir = td.path().join("some_dir"); - assert!(fs::metadata(&some_dir).map(|m| m.is_dir()).unwrap_or(false)); -} - -#[test] -fn handling_incorrect_file_size() { - let td = t!(TempDir::new("tar-rs")); - - let mut ar = Builder::new(Vec::new()); - - let path = td.path().join("tmpfile"); - t!(File::create(&path)); - let mut file = t!(File::open(&path)); - let mut header = Header::new_old(); - t!(header.set_path("somepath")); - header.set_metadata(&t!(file.metadata())); - header.set_size(2048); // past the end of file null blocks - header.set_cksum(); - t!(ar.append(&header, &mut file)); - - // Extracting - let rdr = Cursor::new(t!(ar.into_inner())); - let mut ar = Archive::new(rdr); - assert!(ar.unpack(td.path()).is_err()); - - // Iterating - let rdr = Cursor::new(ar.into_inner().into_inner()); - let mut ar = Archive::new(rdr); - assert!(t!(ar.entries()).any(|fr| fr.is_err())); -} - -#[test] -fn extracting_malicious_tarball() { - use std::fs; - use std::fs::OpenOptions; - use std::io::{Seek, Write}; - - let td = t!(TempDir::new("tar-rs")); - - let mut evil_tar = Cursor::new(Vec::new()); - - { - let mut a = Builder::new(&mut evil_tar); - let mut evil_txt_f = t!(OpenOptions::new().read(true).write(true) - .create(true) - .open(td.path().join("evil.txt"))); - t!(writeln!(evil_txt_f, "This is an evil file.")); - t!(evil_txt_f.seek(SeekFrom::Start(0))); - t!(a.append_file("/tmp/abs_evil.txt", &mut evil_txt_f)); - t!(evil_txt_f.seek(SeekFrom::Start(0))); - t!(a.append_file("//tmp/abs_evil2.txt", &mut evil_txt_f)); - t!(evil_txt_f.seek(SeekFrom::Start(0))); - t!(a.append_file("///tmp/abs_evil3.txt", &mut evil_txt_f)); - t!(evil_txt_f.seek(SeekFrom::Start(0))); - t!(a.append_file("/./tmp/abs_evil4.txt", &mut evil_txt_f)); - t!(evil_txt_f.seek(SeekFrom::Start(0))); - t!(a.append_file("//./tmp/abs_evil5.txt", &mut evil_txt_f)); - t!(evil_txt_f.seek(SeekFrom::Start(0))); - t!(a.append_file("///./tmp/abs_evil6.txt", &mut evil_txt_f)); - t!(evil_txt_f.seek(SeekFrom::Start(0))); - t!(a.append_file("/../tmp/rel_evil.txt", &mut evil_txt_f)); - t!(evil_txt_f.seek(SeekFrom::Start(0))); - t!(a.append_file("../rel_evil2.txt", &mut evil_txt_f)); - t!(evil_txt_f.seek(SeekFrom::Start(0))); - t!(a.append_file("./../rel_evil3.txt", &mut evil_txt_f)); - t!(evil_txt_f.seek(SeekFrom::Start(0))); - t!(a.append_file("some/../../rel_evil4.txt", &mut evil_txt_f)); - t!(evil_txt_f.seek(SeekFrom::Start(0))); - t!(a.append_file("", &mut evil_txt_f)); - t!(evil_txt_f.seek(SeekFrom::Start(0))); - t!(a.append_file("././//./", &mut evil_txt_f)); - t!(evil_txt_f.seek(SeekFrom::Start(0))); - t!(a.append_file(".", &mut evil_txt_f)); - t!(a.finish()); - } - - t!(evil_tar.seek(SeekFrom::Start(0))); - let mut ar = Archive::new(&mut evil_tar); - t!(ar.unpack(td.path())); - - assert!(fs::metadata("/tmp/abs_evil.txt").is_err()); - assert!(fs::metadata("/tmp/abs_evil.txt2").is_err()); - assert!(fs::metadata("/tmp/abs_evil.txt3").is_err()); - assert!(fs::metadata("/tmp/abs_evil.txt4").is_err()); - assert!(fs::metadata("/tmp/abs_evil.txt5").is_err()); - assert!(fs::metadata("/tmp/abs_evil.txt6").is_err()); - assert!(fs::metadata("/tmp/rel_evil.txt").is_err()); - assert!(fs::metadata("/tmp/rel_evil.txt").is_err()); - assert!(fs::metadata(td.path().join("../tmp/rel_evil.txt")).is_err()); - assert!(fs::metadata(td.path().join("../rel_evil2.txt")).is_err()); - assert!(fs::metadata(td.path().join("../rel_evil3.txt")).is_err()); - assert!(fs::metadata(td.path().join("../rel_evil4.txt")).is_err()); - - // The `some` subdirectory should not be created because the only - // filename that references this has '..'. - assert!(fs::metadata(td.path().join("some")).is_err()); - - // The `tmp` subdirectory should be created and within this - // subdirectory, there should be files named `abs_evil.txt` through - // `abs_evil6.txt`. - assert!(fs::metadata(td.path().join("tmp")).map(|m| m.is_dir()) - .unwrap_or(false)); - assert!(fs::metadata(td.path().join("tmp/abs_evil.txt")) - .map(|m| m.is_file()).unwrap_or(false)); - assert!(fs::metadata(td.path().join("tmp/abs_evil2.txt")) - .map(|m| m.is_file()).unwrap_or(false)); - assert!(fs::metadata(td.path().join("tmp/abs_evil3.txt")) - .map(|m| m.is_file()).unwrap_or(false)); - assert!(fs::metadata(td.path().join("tmp/abs_evil4.txt")) - .map(|m| m.is_file()).unwrap_or(false)); - assert!(fs::metadata(td.path().join("tmp/abs_evil5.txt")) - .map(|m| m.is_file()).unwrap_or(false)); - assert!(fs::metadata(td.path().join("tmp/abs_evil6.txt")) - .map(|m| m.is_file()).unwrap_or(false)); -} - -#[test] -fn octal_spaces() { - let rdr = Cursor::new(tar!("spaces.tar")); - let mut ar = Archive::new(rdr); - - let entry = ar.entries().unwrap().next().unwrap().unwrap(); - assert_eq!(entry.header().mode().unwrap() & 0o777, 0o777); - assert_eq!(entry.header().uid().unwrap(), 0); - assert_eq!(entry.header().gid().unwrap(), 0); - assert_eq!(entry.header().size().unwrap(), 2); - assert_eq!(entry.header().mtime().unwrap(), 0o12440016664); - assert_eq!(entry.header().cksum().unwrap(), 0o4253); -} - -#[test] -fn extracting_malformed_tar_null_blocks() { - let td = t!(TempDir::new("tar-rs")); - - let mut ar = Builder::new(Vec::new()); - - let path1 = td.path().join("tmpfile1"); - let path2 = td.path().join("tmpfile2"); - t!(File::create(&path1)); - t!(File::create(&path2)); - t!(ar.append_path(&path1)); - let mut data = t!(ar.into_inner()); - let amt = data.len(); - data.truncate(amt - 512); - let mut ar = Builder::new(data); - t!(ar.append_path(&path2)); - t!(ar.finish()); - - let data = t!(ar.into_inner()); - let mut ar = Archive::new(&data[..]); - assert!(ar.unpack(td.path()).is_err()); -} - -#[test] -fn empty_filename() -{ - let td = t!(TempDir::new("tar-rs")); - let rdr = Cursor::new(tar!("empty_filename.tar")); - let mut ar = Archive::new(rdr); - assert!(ar.unpack(td.path()).is_err()); -} - -#[test] -fn file_times() { - let td = t!(TempDir::new("tar-rs")); - let rdr = Cursor::new(tar!("file_times.tar")); - let mut ar = Archive::new(rdr); - t!(ar.unpack(td.path())); - - let meta = fs::metadata(td.path().join("a")).unwrap(); - let mtime = FileTime::from_last_modification_time(&meta); - let atime = FileTime::from_last_access_time(&meta); - assert_eq!(mtime.seconds_relative_to_1970(), 1000000000); - assert_eq!(mtime.nanoseconds(), 0); - assert_eq!(atime.seconds_relative_to_1970(), 1000000000); - assert_eq!(atime.nanoseconds(), 0); -} - -#[test] -fn backslash_same_as_slash() { - // Insert a file into an archive with a backslash - let td = t!(TempDir::new("tar-rs")); - let mut ar = Builder::new(Vec::<u8>::new()); - t!(ar.append_dir("foo\\bar", td.path())); - let mut ar = Archive::new(Cursor::new(t!(ar.into_inner()))); - let f = t!(t!(ar.entries()).next().unwrap()); - assert_eq!(&*f.header().path().unwrap(), Path::new("foo/bar")); - - // Unpack an archive with a backslash in the name - let mut ar = Builder::new(Vec::<u8>::new()); - let mut header = Header::new_gnu(); - header.set_metadata(&t!(fs::metadata(td.path()))); - header.set_size(0); - for (a, b) in header.as_old_mut().name.iter_mut().zip(b"foo\\bar\x00") { - *a = *b; - } - header.set_cksum(); - t!(ar.append(&header, &mut io::empty())); - let data = t!(ar.into_inner()); - let mut ar = Archive::new(&data[..]); - let f = t!(t!(ar.entries()).next().unwrap()); - assert_eq!(&*f.header().path().unwrap(), Path::new("foo/bar")); - - let mut ar = Archive::new(&data[..]); - t!(ar.unpack(td.path())); - assert!(fs::metadata(td.path().join("foo/bar")).is_ok()); -} - -#[cfg(unix)] -#[test] -fn nul_bytes_in_path() { - use std::os::unix::prelude::*; - use std::ffi::OsStr; - - let nul_path = OsStr::from_bytes(b"foo\0"); - let td = t!(TempDir::new("tar-rs")); - let mut ar = Builder::new(Vec::<u8>::new()); - let err = ar.append_dir(nul_path, td.path()).unwrap_err(); - assert!(err.to_string().contains("contains a nul byte")); -} - -#[test] -fn links() { - let mut ar = Archive::new(Cursor::new(tar!("link.tar"))); - let mut entries = t!(ar.entries()); - let link = t!(entries.next().unwrap()); - assert_eq!(t!(link.header().link_name()).as_ref().map(|p| &**p), - Some(Path::new("file"))); - let other = t!(entries.next().unwrap()); - assert!(t!(other.header().link_name()).is_none()); -} - -#[test] -#[cfg(unix)] // making symlinks on windows is hard -fn unpack_links() { - let td = t!(TempDir::new("tar-rs")); - let mut ar = Archive::new(Cursor::new(tar!("link.tar"))); - t!(ar.unpack(td.path())); - - let md = t!(fs::symlink_metadata(td.path().join("lnk"))); - assert!(md.file_type().is_symlink()); - assert_eq!(&*t!(fs::read_link(td.path().join("lnk"))), - Path::new("file")); - t!(File::open(td.path().join("lnk"))); -} - -#[test] -fn pax_simple() { - let mut ar = Archive::new(tar!("pax.tar")); - let mut entries = t!(ar.entries()); - - let mut first = t!(entries.next().unwrap()); - let mut attributes = t!(first.pax_extensions()).unwrap(); - let first = t!(attributes.next().unwrap()); - let second = t!(attributes.next().unwrap()); - let third = t!(attributes.next().unwrap()); - assert!(attributes.next().is_none()); - - assert_eq!(first.key(), Ok("mtime")); - assert_eq!(first.value(), Ok("1453146164.953123768")); - assert_eq!(second.key(), Ok("atime")); - assert_eq!(second.value(), Ok("1453251915.24892486")); - assert_eq!(third.key(), Ok("ctime")); - assert_eq!(third.value(), Ok("1453146164.953123768")); -} diff --git a/deps/tar-0.4.3/tests/header/mod.rs b/deps/tar-0.4.3/tests/header/mod.rs deleted file mode 100644 index c8a99af07..000000000 --- a/deps/tar-0.4.3/tests/header/mod.rs +++ /dev/null @@ -1,135 +0,0 @@ -use std::iter; - -use tar::Header; - -#[test] -fn default_gnu() { - let mut h = Header::new_gnu(); - assert!(h.as_gnu().is_some()); - assert!(h.as_gnu_mut().is_some()); - assert!(h.as_ustar().is_none()); - assert!(h.as_ustar_mut().is_none()); -} - -#[test] -fn goto_old() { - let mut h = Header::new_old(); - assert!(h.as_gnu().is_none()); - assert!(h.as_gnu_mut().is_none()); - assert!(h.as_ustar().is_none()); - assert!(h.as_ustar_mut().is_none()); -} - -#[test] -fn goto_ustar() { - let mut h = Header::new_ustar(); - assert!(h.as_gnu().is_none()); - assert!(h.as_gnu_mut().is_none()); - assert!(h.as_ustar().is_some()); - assert!(h.as_ustar_mut().is_some()); -} - -#[test] -fn link_name() { - let mut h = Header::new_gnu(); - t!(h.set_link_name("foo")); - assert_eq!(t!(h.link_name()).unwrap().to_str(), Some("foo")); - t!(h.set_link_name("foo/bar")); - assert_eq!(t!(h.link_name()).unwrap().to_str(), Some("foo/bar")); - t!(h.set_link_name("foo\\ba")); - assert_eq!(t!(h.link_name()).unwrap().to_str(), Some("foo/ba")); - - let name = "foo\\bar\0"; - for (slot, val) in h.as_old_mut().linkname.iter_mut().zip(name.as_bytes()) { - *slot = *val; - } - assert_eq!(t!(h.link_name()).unwrap().to_str(), Some("foo/bar")); - - assert!(h.set_link_name("\0").is_err()); -} - -#[test] -fn user_and_group_name() { - let mut h = Header::new_gnu(); - t!(h.set_username("foo")); - t!(h.set_groupname("bar")); - assert_eq!(t!(h.username()), Some("foo")); - assert_eq!(t!(h.groupname()), Some("bar")); - - h = Header::new_ustar(); - t!(h.set_username("foo")); - t!(h.set_groupname("bar")); - assert_eq!(t!(h.username()), Some("foo")); - assert_eq!(t!(h.groupname()), Some("bar")); - - h = Header::new_old(); - assert_eq!(t!(h.username()), None); - assert_eq!(t!(h.groupname()), None); - assert!(h.set_username("foo").is_err()); - assert!(h.set_groupname("foo").is_err()); -} - -#[test] -fn dev_major_minor() { - let mut h = Header::new_gnu(); - t!(h.set_device_major(1)); - t!(h.set_device_minor(2)); - assert_eq!(t!(h.device_major()), Some(1)); - assert_eq!(t!(h.device_minor()), Some(2)); - - h = Header::new_ustar(); - t!(h.set_device_major(1)); - t!(h.set_device_minor(2)); - assert_eq!(t!(h.device_major()), Some(1)); - assert_eq!(t!(h.device_minor()), Some(2)); - - h.as_ustar_mut().unwrap().dev_minor[0] = 0xff; - h.as_ustar_mut().unwrap().dev_major[0] = 0xff; - assert!(h.device_major().is_err()); - assert!(h.device_minor().is_err()); - - h.as_ustar_mut().unwrap().dev_minor[0] = b'g'; - h.as_ustar_mut().unwrap().dev_major[0] = b'h'; - assert!(h.device_major().is_err()); - assert!(h.device_minor().is_err()); - - h = Header::new_old(); - assert_eq!(t!(h.device_major()), None); - assert_eq!(t!(h.device_minor()), None); - assert!(h.set_device_major(1).is_err()); - assert!(h.set_device_minor(1).is_err()); -} - -#[test] -fn set_path() { - let mut h = Header::new_gnu(); - t!(h.set_path("foo")); - assert_eq!(t!(h.path()).to_str(), Some("foo")); - t!(h.set_path("foo/bar")); - assert_eq!(t!(h.path()).to_str(), Some("foo/bar")); - t!(h.set_path("foo\\bar")); - assert_eq!(t!(h.path()).to_str(), Some("foo/bar")); - let name = "foo\\bar\0"; - for (slot, val) in h.as_old_mut().name.iter_mut().zip(name.as_bytes()) { - *slot = *val; - } - assert_eq!(t!(h.path()).to_str(), Some("foo/bar")); - - let long_name = iter::repeat("foo").take(100).collect::<String>(); - let medium1 = iter::repeat("foo").take(52).collect::<String>(); - let medium2 = iter::repeat("fo/").take(52).collect::<String>(); - - assert!(h.set_path(&long_name).is_err()); - assert!(h.set_path(&medium1).is_err()); - assert!(h.set_path(&medium2).is_err()); - assert!(h.set_path("\0").is_err()); - - h = Header::new_ustar(); - t!(h.set_path("foo")); - assert_eq!(t!(h.path()).to_str(), Some("foo")); - - assert!(h.set_path(&long_name).is_err()); - assert!(h.set_path(&medium1).is_err()); - t!(h.set_path(&medium2)); - assert_eq!(t!(h.path()).to_str(), Some(&medium2[..])); -} diff --git a/deps/tar-0.4.3/.gitignore b/deps/tar-0.4.5/.gitignore similarity index 100% rename from deps/tar-0.4.3/.gitignore rename to deps/tar-0.4.5/.gitignore diff --git a/deps/tar-0.4.3/.travis.yml b/deps/tar-0.4.5/.travis.yml similarity index 100% rename from deps/tar-0.4.3/.travis.yml rename to deps/tar-0.4.5/.travis.yml diff --git a/deps/tar-0.4.5/Cargo.toml b/deps/tar-0.4.5/Cargo.toml new file mode 100644 index 000000000..c5a06e35b --- /dev/null +++ b/deps/tar-0.4.5/Cargo.toml @@ -0,0 +1,25 @@ +[package] + +name = "tar" +version = "0.4.5" +authors = ["Alex Crichton <alex@alexcrichton.com>"] +homepage = "https://github.com/alexcrichton/tar-rs" +repository = "https://github.com/alexcrichton/tar-rs" +documentation = "http://alexcrichton.com/tar-rs" +license = "MIT/Apache-2.0" +keywords = ["tar", "tarfile", "encoding"] +readme = "README.md" + +description = """ +A Rust implementation of a TAR file reader and writer. This library does not +currently handle compression, but it is abstract over all I/O readers and +writers. Additionally, great lengths are taken to ensure that the entire +contents are never required to be entirely resident in memory all at once. +""" + +[dependencies] +libc = "0.2" +filetime = "0.1.5" + +[dev-dependencies] +tempdir = "0.3" diff --git a/deps/time-0.1.34/LICENSE-APACHE b/deps/tar-0.4.5/LICENSE-APACHE similarity index 100% rename from deps/time-0.1.34/LICENSE-APACHE rename to deps/tar-0.4.5/LICENSE-APACHE diff --git a/deps/tar-0.4.3/LICENSE-MIT b/deps/tar-0.4.5/LICENSE-MIT similarity index 100% rename from deps/tar-0.4.3/LICENSE-MIT rename to deps/tar-0.4.5/LICENSE-MIT diff --git a/deps/tar-0.4.3/README.md b/deps/tar-0.4.5/README.md similarity index 100% rename from deps/tar-0.4.3/README.md rename to deps/tar-0.4.5/README.md diff --git a/deps/tar-0.4.3/appveyor.yml b/deps/tar-0.4.5/appveyor.yml similarity index 100% rename from deps/tar-0.4.3/appveyor.yml rename to deps/tar-0.4.5/appveyor.yml diff --git a/deps/tar-0.4.5/src/archive.rs b/deps/tar-0.4.5/src/archive.rs new file mode 100644 index 000000000..9cc504116 --- /dev/null +++ b/deps/tar-0.4.5/src/archive.rs @@ -0,0 +1,364 @@ +use std::cell::{RefCell, Cell}; +use std::cmp; +use std::fs; +use std::io::prelude::*; +use std::io; +use std::marker; +use std::path::{Path, Component}; + +use entry::EntryFields; +use error::TarError; +use other; +use {Entry, Header}; + +/// A top-level representation of an archive file. +/// +/// This archive can have an entry added to it and it can be iterated over. +pub struct Archive<R: ?Sized + Read> { + inner: ArchiveInner<R>, +} + +pub struct ArchiveInner<R: ?Sized> { + pos: Cell<u64>, + obj: RefCell<::AlignHigher<R>>, +} + +/// An iterator over the entries of an archive. +pub struct Entries<'a, R: 'a + Read> { + fields: EntriesFields<'a>, + _ignored: marker::PhantomData<&'a Archive<R>>, +} + +struct EntriesFields<'a> { + archive: &'a Archive<Read + 'a>, + next: u64, + done: bool, + raw: bool, +} + +impl<R: Read> Archive<R> { + /// Create a new archive with the underlying object as the reader. + pub fn new(obj: R) -> Archive<R> { + Archive { + inner: ArchiveInner { + obj: RefCell::new(::AlignHigher(0, obj)), + pos: Cell::new(0), + }, + } + } + + /// Unwrap this archive, returning the underlying object. + pub fn into_inner(self) -> R { + self.inner.obj.into_inner().1 + } + + /// Construct an iterator over the entries in this archive. + /// + /// Note that care must be taken to consider each entry within an archive in + /// sequence. If entries are processed out of sequence (from what the + /// iterator returns), then the contents read for each entry may be + /// corrupted. + pub fn entries(&mut self) -> io::Result<Entries<R>> { + let me: &mut Archive<Read> = self; + me._entries().map(|fields| { + Entries { fields: fields, _ignored: marker::PhantomData } + }) + } + + /// Unpacks the contents tarball into the specified `dst`. + /// + /// This function will iterate over the entire contents of this tarball, + /// extracting each file in turn to the location specified by the entry's + /// path name. + /// + /// This operation is relatively sensitive in that it will not write files + /// outside of the path specified by `dst`. Files in the archive which have + /// a '..' in their path are skipped during the unpacking process. + /// + /// # Examples + /// + /// ```no_run + /// use std::fs::File; + /// use tar::Archive; + /// + /// let mut ar = Archive::new(File::open("foo.tar").unwrap()); + /// ar.unpack("foo").unwrap(); + /// ``` + pub fn unpack<P: AsRef<Path>>(&mut self, dst: P) -> io::Result<()> { + let me: &mut Archive<Read> = self; + me._unpack(dst.as_ref()) + } +} + +impl<'a> Archive<Read + 'a> { + fn _entries(&mut self) -> io::Result<EntriesFields> { + if self.inner.pos.get() != 0 { + return Err(other("cannot call entries unless archive is at \ + position 0")) + } + Ok(EntriesFields { + archive: self, + done: false, + next: 0, + raw: false, + }) + } + + fn _unpack(&mut self, dst: &Path) -> io::Result<()> { + 'outer: for entry in try!(self._entries()) { + let mut file = try!(entry.map_err(|e| { + TarError::new("failed to iterate over archive", e) + })); + + // Notes regarding bsdtar 2.8.3 / libarchive 2.8.3: + // * Leading '/'s are trimmed. For example, `///test` is treated as + // `test`. + // * If the filename contains '..', then the file is skipped when + // extracting the tarball. + // * '//' within a filename is effectively skipped. An error is + // logged, but otherwise the effect is as if any two or more + // adjacent '/'s within the filename were consolidated into one + // '/'. + // + // Most of this is handled by the `path` module of the standard + // library, but we specially handle a few cases here as well. + + let mut file_dst = dst.to_path_buf(); + { + let path = try!(file.path().map_err(|e| { + TarError::new("invalid path in entry header", e) + })); + for part in path.components() { + match part { + // Leading '/' characters, root paths, and '.' + // components are just ignored and treated as "empty + // components" + Component::Prefix(..) | + Component::RootDir | + Component::CurDir => continue, + + // If any part of the filename is '..', then skip over + // unpacking the file to prevent directory traversal + // security issues. See, e.g.: CVE-2001-1267, + // CVE-2002-0399, CVE-2005-1918, CVE-2007-4131 + Component::ParentDir => continue 'outer, + + Component::Normal(part) => file_dst.push(part), + } + } + } + + // Skip cases where only slashes or '.' parts were seen, because + // this is effectively an empty filename. + if *dst == *file_dst { + continue + } + + if let Some(parent) = file_dst.parent() { + try!(fs::create_dir_all(&parent).map_err(|e| { + TarError::new(&format!("failed to create `{}`", + parent.display()), e) + })); + } + try!(file.unpack(&file_dst).map_err(|e| { + TarError::new(&format!("failed to unpack `{}`", + file_dst.display()), e) + })); + } + Ok(()) + } + + fn skip(&self, mut amt: u64) -> io::Result<()> { + let mut buf = [0u8; 4096 * 8]; + while amt > 0 { + let n = cmp::min(amt, buf.len() as u64); + let n = try!((&self.inner).read(&mut buf[..n as usize])); + if n == 0 { + return Err(other("unexpected EOF during skip")) + } + amt -= n as u64; + } + Ok(()) + } +} + +impl<'a, R: Read> Entries<'a, R> { + /// Indicates whether this iterator will return raw entries or not. + /// + /// If the raw list of entries are returned, then no preprocessing happens + /// on account of this library, for example taking into accout GNU long name + /// or long link archive members. Raw iteration is disabled by default. + pub fn raw(self, raw: bool) -> Entries<'a, R> { + Entries { + fields: EntriesFields { + raw: raw, + ..self.fields + }, + _ignored: marker::PhantomData, + } + } +} +impl<'a, R: Read> Iterator for Entries<'a, R> { + type Item = io::Result<Entry<'a, R>>; + + fn next(&mut self) -> Option<io::Result<Entry<'a, R>>> { + self.fields.next().map(|result| { + result.map(|e| EntryFields::from(e).into_entry()) + }) + } +} + +impl<'a> EntriesFields<'a> { + fn next_entry_raw(&mut self) -> io::Result<Option<Entry<'a, io::Empty>>> { + // Seek to the start of the next header in the archive + let delta = self.next - self.archive.inner.pos.get(); + try!(self.archive.skip(delta)); + + let mut header = Header::new_old(); + try!(read_all(&mut &self.archive.inner, header.as_mut_bytes())); + self.next += 512; + + // If we have an all 0 block, then this should be the start of the end + // of the archive. A block of 0s is never valid as a header (because of + // the checksum), so if it's all zero it must be the first of the two + // end blocks + if header.as_bytes().iter().all(|i| *i == 0) { + try!(read_all(&mut &self.archive.inner, + header.as_mut_bytes())); + self.next += 512; + return if header.as_bytes().iter().all(|i| *i == 0) { + Ok(None) + } else { + Err(other("found block of 0s not followed by a second \ + block of 0s")) + } + } + + // Make sure the checksum is ok + let sum = header.as_bytes()[..148].iter() + .chain(&header.as_bytes()[156..]) + .fold(0, |a, b| a + (*b as u32)) + 8 * 32; + let cksum = try!(header.cksum()); + if sum != cksum { + return Err(other("archive header checksum mismatch")) + } + + let size = try!(header.size()); + let ret = EntryFields { + size: size, + header: header, + data: (&self.archive.inner).take(size), + long_pathname: None, + long_linkname: None, + pax_extensions: None, + }; + + // Store where the next entry is, rounding up by 512 bytes (the size of + // a header); + let size = (ret.size + 511) & !(512 - 1); + self.next += size; + + Ok(Some(ret.into_entry())) + } + + fn next_entry(&mut self) -> io::Result<Option<Entry<'a, io::Empty>>> { + if self.raw { + return self.next_entry_raw() + } + + let mut gnu_longname = None; + let mut gnu_longlink = None; + let mut pax_extensions = None; + let mut processed = 0; + + loop { + processed += 1; + let entry = match try!(self.next_entry_raw()) { + Some(entry) => entry, + None if processed > 1 => { + return Err(other("members found describing a future member \ + but no future member found")) + } + None => return Ok(None), + }; + + if entry.header().as_gnu().is_some() && + entry.header().entry_type().is_gnu_longname() { + if gnu_longname.is_some() { + return Err(other("two long name entries describing \ + the same member")) + } + gnu_longname = Some(try!(EntryFields::from(entry).read_all())); + continue + } + + if entry.header().as_gnu().is_some() && + entry.header().entry_type().is_gnu_longlink() { + if gnu_longlink.is_some() { + return Err(other("two long name entries describing \ + the same member")) + } + gnu_longlink = Some(try!(EntryFields::from(entry).read_all())); + continue + } + + if entry.header().as_ustar().is_some() && + entry.header().entry_type().is_pax_local_extensions() { + if pax_extensions.is_some() { + return Err(other("two pax extensions entries describing \ + the same member")) + } + pax_extensions = Some(try!(EntryFields::from(entry).read_all())); + continue + } + + let mut fields = EntryFields::from(entry); + fields.long_pathname = gnu_longname; + fields.long_linkname = gnu_longlink; + fields.pax_extensions = pax_extensions; + return Ok(Some(fields.into_entry())) + } + } +} + +impl<'a> Iterator for EntriesFields<'a> { + type Item = io::Result<Entry<'a, io::Empty>>; + + fn next(&mut self) -> Option<io::Result<Entry<'a, io::Empty>>> { + if self.done { + None + } else { + match self.next_entry() { + Ok(Some(e)) => Some(Ok(e)), + Ok(None) => { + self.done = true; + None + } + Err(e) => { + self.done = true; + Some(Err(e)) + } + } + } + } +} + +impl<'a, R: ?Sized + Read> Read for &'a ArchiveInner<R> { + fn read(&mut self, into: &mut [u8]) -> io::Result<usize> { + self.obj.borrow_mut().read(into).map(|i| { + self.pos.set(self.pos.get() + i as u64); + i + }) + } +} + +fn read_all<R: Read>(r: &mut R, buf: &mut [u8]) -> io::Result<()> { + let mut read = 0; + while read < buf.len() { + match try!(r.read(&mut buf[read..])) { + 0 => return Err(other("failed to read entire block")), + n => read += n, + } + } + Ok(()) +} diff --git a/deps/tar-0.4.5/src/builder.rs b/deps/tar-0.4.5/src/builder.rs new file mode 100644 index 000000000..c0d561828 --- /dev/null +++ b/deps/tar-0.4.5/src/builder.rs @@ -0,0 +1,267 @@ +use std::io; +use std::path::Path; +use std::io::prelude::*; +use std::fs; +use std::borrow::Cow; + +use {EntryType, Header, other}; +use header::{bytes2path, path2bytes}; + +/// A structure for building archives +/// +/// This structure has methods for building up an archive from scratch into any +/// arbitrary writer. +pub struct Builder<W: Write> { + finished: bool, + obj: Option<W>, +} + +impl<W: Write> Builder<W> { + /// Create a new archive builder with the underlying object as the + /// destination of all data written. + pub fn new(obj: W) -> Builder<W> { + Builder { + finished: false, + obj: Some(obj), + } + } + + fn inner(&mut self) -> &mut W { + self.obj.as_mut().unwrap() + } + + /// Unwrap this archive, returning the underlying object. + /// + /// This function will finish writing the archive if the `finish` function + /// hasn't yet been called, returning any I/O error which happens during + /// that operation. + pub fn into_inner(mut self) -> io::Result<W> { + if !self.finished { + try!(self.finish()); + } + Ok(self.obj.take().unwrap()) + } + + /// Adds a new entry to this archive. + /// + /// This function will append the header specified, followed by contents of + /// the stream specified by `data`. To produce a valid archive the `size` + /// field of `header` must be the same as the length of the stream that's + /// being written. Additionally the checksum for the header should have been + /// set via the `set_cksum` method. + /// + /// Note that this will not attempt to seek the archive to a valid position, + /// so if the archive is in the middle of a read or some other similar + /// operation then this may corrupt the archive. + /// + /// Also note that after all entries have been written to an archive the + /// `finish` function needs to be called to finish writing the archive. + /// + /// # Errors + /// + /// This function will return an error for any intermittent I/O error which + /// occurs when either reading or writing. + /// + /// # Examples + /// + /// ``` + /// use tar::{Builder, Header}; + /// + /// let mut header = Header::new_gnu(); + /// header.set_path("foo"); + /// header.set_size(4); + /// header.set_cksum(); + /// + /// let mut data: &[u8] = &[1, 2, 3, 4]; + /// + /// let mut ar = Builder::new(Vec::new()); + /// ar.append(&header, data).unwrap(); + /// let data = ar.into_inner().unwrap(); + /// ``` + pub fn append<R: Read>(&mut self, header: &Header, mut data: R) + -> io::Result<()> { + append(self.inner(), header, &mut data) + } + + /// Adds a file on the local filesystem to this archive. + /// + /// This function will open the file specified by `path` and insert the file + /// into the archive with the appropriate metadata set, returning any I/O + /// error which occurs while writing. The path name for the file inside of + /// this archive will be the same as `path`, and it is required that the + /// path is a relative path. + /// + /// Note that this will not attempt to seek the archive to a valid position, + /// so if the archive is in the middle of a read or some other similar + /// operation then this may corrupt the archive. + /// + /// Also note that after all files have been written to an archive the + /// `finish` function needs to be called to finish writing the archive. + /// + /// # Examples + /// + /// ```no_run + /// use tar::Builder; + /// + /// let mut ar = Builder::new(Vec::new()); + /// + /// ar.append_path("foo/bar.txt").unwrap(); + /// ``` + pub fn append_path<P: AsRef<Path>>(&mut self, path: P) -> io::Result<()> { + append_path(self.inner(), path.as_ref()) + } + + /// Adds a file to this archive with the given path as the name of the file + /// in the archive. + /// + /// This will use the metadata of `file` to populate a `Header`, and it will + /// then append the file to the archive with the name `path`. + /// + /// Note that this will not attempt to seek the archive to a valid position, + /// so if the archive is in the middle of a read or some other similar + /// operation then this may corrupt the archive. + /// + /// Also note that after all files have been written to an archive the + /// `finish` function needs to be called to finish writing the archive. + /// + /// # Examples + /// + /// ```no_run + /// use std::fs::File; + /// use tar::Builder; + /// + /// let mut ar = Builder::new(Vec::new()); + /// + /// // Open the file at one location, but insert it into the archive with a + /// // different name. + /// let mut f = File::open("foo/bar/baz.txt").unwrap(); + /// ar.append_file("bar/baz.txt", &mut f).unwrap(); + /// ``` + pub fn append_file<P: AsRef<Path>>(&mut self, path: P, file: &mut fs::File) + -> io::Result<()> { + append_file(self.inner(), path.as_ref(), file) + } + + /// Adds a directory to this archive with the given path as the name of the + /// directory in the archive. + /// + /// This will use `stat` to populate a `Header`, and it will then append the + /// directory to the archive with the name `path`. + /// + /// Note that this will not attempt to seek the archive to a valid position, + /// so if the archive is in the middle of a read or some other similar + /// operation then this may corrupt the archive. + /// + /// Also note that after all files have been written to an archive the + /// `finish` function needs to be called to finish writing the archive. + /// + /// # Examples + /// + /// ``` + /// use std::fs; + /// use tar::Builder; + /// + /// let mut ar = Builder::new(Vec::new()); + /// + /// // Use the directory at one location, but insert it into the archive + /// // with a different name. + /// ar.append_dir("bardir", ".").unwrap(); + /// ``` + pub fn append_dir<P, Q>(&mut self, path: P, src_path: Q) -> io::Result<()> + where P: AsRef<Path>, Q: AsRef<Path> + { + append_dir(self.inner(), path.as_ref(), src_path.as_ref()) + } + + /// Finish writing this archive, emitting the termination sections. + /// + /// This function should only be called when the archive has been written + /// entirely and if an I/O error happens the underlying object still needs + /// to be acquired. + /// + /// In most situations the `into_inner` method should be preferred. + pub fn finish(&mut self) -> io::Result<()> { + if self.finished { + return Ok(()) + } + self.finished = true; + self.inner().write_all(&[0; 1024]) + } +} + +fn append(mut dst: &mut Write, + header: &Header, + mut data: &mut Read) -> io::Result<()> { + try!(dst.write_all(header.as_bytes())); + let len = try!(io::copy(&mut data, &mut dst)); + + // Pad with zeros if necessary. + let buf = [0; 512]; + let remaining = 512 - (len % 512); + if remaining < 512 { + try!(dst.write_all(&buf[..remaining as usize])); + } + + Ok(()) +} + +fn append_path(dst: &mut Write, path: &Path) -> io::Result<()> { + let stat = try!(fs::metadata(path)); + if stat.is_file() { + append_fs(dst, path, &stat, &mut try!(fs::File::open(path))) + } else if stat.is_dir() { + append_fs(dst, path, &stat, &mut io::empty()) + } else { + Err(other("path has unknown file type")) + } +} + +fn append_file(dst: &mut Write, path: &Path, file: &mut fs::File) + -> io::Result<()> { + let stat = try!(file.metadata()); + append_fs(dst, path, &stat, file) +} + +fn append_dir(dst: &mut Write, path: &Path, src_path: &Path) -> io::Result<()> { + let stat = try!(fs::metadata(src_path)); + append_fs(dst, path, &stat, &mut io::empty()) +} + +fn append_fs(dst: &mut Write, + path: &Path, + meta: &fs::Metadata, + read: &mut Read) -> io::Result<()> { + let mut header = Header::new_gnu(); + + // Try to encode the path directly in the header, but if it ends up not + // working (e.g. it's too long) then use the GNU-specific long name + // extension by emitting an entry which indicates that it's the filename + if let Err(e) = header.set_path(path) { + let data = try!(path2bytes(&path)); + let max = header.as_old().name.len(); + if data.len() < max { + return Err(e) + } + let mut header2 = Header::new_gnu(); + try!(header2.set_path("././@LongLink")); + header2.set_size((data.len() + 1) as u64); + header2.set_entry_type(EntryType::new(b'L')); + header2.set_cksum(); + let mut data2 = data.chain(io::repeat(0).take(0)); + try!(append(dst, &header2, &mut data2)); + // Truncate the path to store in the header we're about to emit to + // ensure we've got something at least mentioned. + let path = try!(bytes2path(Cow::Borrowed(&data[..max]))); + try!(header.set_path(&path)); + } + + header.set_metadata(meta); + header.set_cksum(); + append(dst, &header, read) +} + +impl<W: Write> Drop for Builder<W> { + fn drop(&mut self) { + let _ = self.finish(); + } +} diff --git a/deps/tar-0.4.5/src/entry.rs b/deps/tar-0.4.5/src/entry.rs new file mode 100644 index 000000000..3516c164a --- /dev/null +++ b/deps/tar-0.4.5/src/entry.rs @@ -0,0 +1,318 @@ +use std::borrow::Cow; +use std::cmp; +use std::fs; +use std::io::prelude::*; +use std::io; +use std::marker; +use std::path::Path; + +use filetime::{self, FileTime}; + +use {Header, Archive, PaxExtensions}; +use archive::ArchiveInner; +use error::TarError; +use header::bytes2path; +use other; +use pax::pax_extensions; + +/// A read-only view into an entry of an archive. +/// +/// This structure is a window into a portion of a borrowed archive which can +/// be inspected. It acts as a file handle by implementing the Reader trait. An +/// entry cannot be rewritten once inserted into an archive. +pub struct Entry<'a, R: 'a + Read> { + fields: EntryFields<'a>, + _ignored: marker::PhantomData<&'a Archive<R>>, +} + +// private implementation detail of `Entry`, but concrete (no type parameters) +// and also all-public to be constructed from other modules. +pub struct EntryFields<'a> { + pub long_pathname: Option<Vec<u8>>, + pub long_linkname: Option<Vec<u8>>, + pub pax_extensions: Option<Vec<u8>>, + pub header: Header, + pub size: u64, + pub data: io::Take<&'a ArchiveInner<Read + 'a>>, +} + +impl<'a, R: Read> Entry<'a, R> { + /// Returns the path name for this entry. + /// + /// This method may fail if the pathname is not valid unicode and this is + /// called on a Windows platform. + /// + /// Note that this function will convert any `\` characters to directory + /// separators, and it will not always return the same value as + /// `self.header().path()` as some archive formats have support for longer + /// path names described in separate entries. + /// + /// It is recommended to use this method instead of inspecting the `header` + /// directly to ensure that various archive formats are handled correctly. + pub fn path(&self) -> io::Result<Cow<Path>> { + self.fields.path() + } + + /// Returns the raw bytes listed for this entry. + /// + /// Note that this function will convert any `\` characters to directory + /// separators, and it will not always return the same value as + /// `self.header().path_bytes()` as some archive formats have support for + /// longer path names described in separate entries. + pub fn path_bytes(&self) -> Cow<[u8]> { + self.fields.path_bytes() + } + + /// Returns the link name for this entry, if any is found. + /// + /// This method may fail if the pathname is not valid unicode and this is + /// called on a Windows platform. `Ok(None)` being returned, however, + /// indicates that the link name was not present. + /// + /// Note that this function will convert any `\` characters to directory + /// separators, and it will not always return the same value as + /// `self.header().link_name()` as some archive formats have support for + /// longer path names described in separate entries. + /// + /// It is recommended to use this method instead of inspecting the `header` + /// directly to ensure that various archive formats are handled correctly. + pub fn link_name(&self) -> io::Result<Option<Cow<Path>>> { + self.fields.link_name() + } + + /// Returns the link name for this entry, in bytes, if listed. + /// + /// Note that this will not always return the same value as + /// `self.header().link_name_bytes()` as some archive formats have support for + /// longer path names described in separate entries. + pub fn link_name_bytes(&self) -> Option<Cow<[u8]>> { + self.fields.link_name_bytes() + } + + /// Returns an iterator over the pax extensions contained in this entry. + /// + /// Pax extensions are a form of archive where extra metadata is stored in + /// key/value pairs in entries before the entry they're intended to + /// describe. For example this can be used to describe long file name or + /// other metadata like atime/ctime/mtime in more precision. + /// + /// The returned iterator will yield key/value pairs for each extension. + /// + /// `None` will be returned if this entry does not indicate that it itself + /// contains extensions, or if there were no previous extensions describing + /// it. + /// + /// Note that global pax extensions are intended to be applied to all + /// archive entries. + /// + /// Also note that this function will read the entire entry if the entry + /// itself is a list of extensions. + pub fn pax_extensions(&mut self) -> io::Result<Option<PaxExtensions>> { + self.fields.pax_extensions() + } + + /// Returns access to the header of this entry in the archive. + /// + /// This provides access to the the metadata for this entry in the archive. + pub fn header(&self) -> &Header { + &self.fields.header + } + + /// Writes this file to the specified location. + /// + /// This function will write the entire contents of this file into the + /// location specified by `dst`. Metadata will also be propagated to the + /// path `dst`. + /// + /// This function will create a file at the path `dst`, and it is required + /// that the intermediate directories are created. Any existing file at the + /// location `dst` will be overwritten. + /// + /// # Examples + /// + /// ```no_run + /// use std::fs::File; + /// use tar::Archive; + /// + /// let mut ar = Archive::new(File::open("foo.tar").unwrap()); + /// + /// for (i, file) in ar.entries().unwrap().enumerate() { + /// let mut file = file.unwrap(); + /// file.unpack(format!("file-{}", i)).unwrap(); + /// } + /// ``` + pub fn unpack<P: AsRef<Path>>(&mut self, dst: P) -> io::Result<()> { + self.fields.unpack(dst.as_ref()) + } +} + +impl<'a, R: Read> Read for Entry<'a, R> { + fn read(&mut self, into: &mut [u8]) -> io::Result<usize> { + self.fields.read(into) + } +} + +impl<'a> EntryFields<'a> { + pub fn from<R: Read>(entry: Entry<R>) -> EntryFields { + entry.fields + } + + pub fn into_entry<R: Read>(self) -> Entry<'a, R> { + Entry { + fields: self, + _ignored: marker::PhantomData, + } + } + + pub fn read_all(&mut self) -> io::Result<Vec<u8>> { + // Preallocate some data but don't let ourselves get too crazy now. + let cap = cmp::min(self.size, 128 * 1024); + let mut v = Vec::with_capacity(cap as usize); + self.read_to_end(&mut v).map(|_| v) + } + + fn path(&self) -> io::Result<Cow<Path>> { + bytes2path(self.path_bytes()) + } + + fn path_bytes(&self) -> Cow<[u8]> { + match self.long_pathname { + Some(ref bytes) => { + if let Some(&0) = bytes.last() { + Cow::Borrowed(&bytes[..bytes.len() - 1]) + } else { + Cow::Borrowed(bytes) + } + } + None => self.header.path_bytes(), + } + } + + fn link_name(&self) -> io::Result<Option<Cow<Path>>> { + match self.link_name_bytes() { + Some(bytes) => bytes2path(bytes).map(Some), + None => Ok(None), + } + } + + fn link_name_bytes(&self) -> Option<Cow<[u8]>> { + match self.long_linkname { + Some(ref bytes) => { + if let Some(&0) = bytes.last() { + Some(Cow::Borrowed(&bytes[..bytes.len() - 1])) + } else { + Some(Cow::Borrowed(bytes)) + } + } + None => self.header.link_name_bytes(), + } + } + + fn pax_extensions(&mut self) -> io::Result<Option<PaxExtensions>> { + if self.pax_extensions.is_none() { + if !self.header.entry_type().is_pax_global_extensions() && + !self.header.entry_type().is_pax_local_extensions() { + return Ok(None) + } + self.pax_extensions = Some(try!(self.read_all())); + } + Ok(Some(pax_extensions(self.pax_extensions.as_ref().unwrap()))) + } + + /// Returns access to the header of this entry in the archive. + fn unpack(&mut self, dst: &Path) -> io::Result<()> { + let kind = self.header.entry_type(); + if kind.is_dir() { + // If the directory already exists just let it slide + let prev = fs::metadata(&dst); + if prev.map(|m| m.is_dir()).unwrap_or(false) { + return Ok(()) + } + return fs::create_dir(&dst) + } else if kind.is_hard_link() || kind.is_symlink() { + let src = match try!(self.link_name()) { + Some(name) => name, + None => return Err(other("hard link listed but no link \ + name found")) + }; + + return if kind.is_hard_link() { + fs::hard_link(&src, dst) + } else { + symlink(&src, dst) + }; + + #[cfg(windows)] + fn symlink(src: &Path, dst: &Path) -> io::Result<()> { + ::std::os::windows::fs::symlink_file(src, dst) + } + #[cfg(unix)] + fn symlink(src: &Path, dst: &Path) -> io::Result<()> { + ::std::os::unix::fs::symlink(src, dst) + } + } else if kind.is_pax_global_extensions() || + kind.is_pax_local_extensions() || + kind.is_gnu_longname() || + kind.is_gnu_longlink() { + return Ok(()) + }; + + // Note the lack of `else` clause above. According to the FreeBSD + // documentation: + // + // > A POSIX-compliant implementation must treat any unrecognized + // > typeflag value as a regular file. + // + // As a result if we don't recognize the kind we just write out the file + // as we would normally. + + try!(fs::File::create(dst).and_then(|mut f| { + if try!(io::copy(self, &mut f)) != self.size { + return Err(other("failed to write entire file")); + } + Ok(()) + }).map_err(|e| { + let header = self.header.path_bytes(); + TarError::new(&format!("failed to unpack `{}` into `{}`", + String::from_utf8_lossy(&header), + dst.display()), e) + })); + + if let Ok(mtime) = self.header.mtime() { + let mtime = FileTime::from_seconds_since_1970(mtime, 0); + try!(filetime::set_file_times(dst, mtime, mtime).map_err(|e| { + TarError::new(&format!("failed to set mtime for `{}`", + dst.display()), e) + })); + } + if let Ok(mode) = self.header.mode() { + try!(set_perms(dst, mode).map_err(|e| { + TarError::new(&format!("failed to set permissions to {:o} \ + for `{}`", mode, dst.display()), e) + })); + } + return Ok(()); + + #[cfg(unix)] + #[allow(deprecated)] // raw deprecated in 1.8 + fn set_perms(dst: &Path, mode: u32) -> io::Result<()> { + use std::os::unix::raw; + use std::os::unix::prelude::*; + + let perm = fs::Permissions::from_mode(mode as raw::mode_t); + fs::set_permissions(dst, perm) + } + #[cfg(windows)] + fn set_perms(dst: &Path, mode: u32) -> io::Result<()> { + let mut perm = try!(fs::metadata(dst)).permissions(); + perm.set_readonly(mode & 0o200 != 0o200); + fs::set_permissions(dst, perm) + } + } +} + +impl<'a> Read for EntryFields<'a> { + fn read(&mut self, into: &mut [u8]) -> io::Result<usize> { + self.data.read(into) + } +} diff --git a/deps/tar-0.4.3/src/entry_type.rs b/deps/tar-0.4.5/src/entry_type.rs similarity index 100% rename from deps/tar-0.4.3/src/entry_type.rs rename to deps/tar-0.4.5/src/entry_type.rs diff --git a/deps/tar-0.4.3/src/error.rs b/deps/tar-0.4.5/src/error.rs similarity index 100% rename from deps/tar-0.4.3/src/error.rs rename to deps/tar-0.4.5/src/error.rs diff --git a/deps/tar-0.4.5/src/header.rs b/deps/tar-0.4.5/src/header.rs new file mode 100644 index 000000000..19ed156d7 --- /dev/null +++ b/deps/tar-0.4.5/src/header.rs @@ -0,0 +1,940 @@ +#[cfg(unix)] use std::os::unix::prelude::*; +#[cfg(windows)] use std::os::windows::prelude::*; + +use std::borrow::Cow; +use std::fmt; +use std::fs; +use std::io; +use std::iter::repeat; +use std::mem; +use std::path::{Path, PathBuf, Component}; +use std::str; + +use EntryType; +use other; + +/// Representation of the header of an entry in an archive +#[repr(C)] +pub struct Header { + bytes: [u8; 512], +} + +/// Representation of the header of an entry in an archive +#[repr(C)] +#[allow(missing_docs)] +pub struct OldHeader { + pub name: [u8; 100], + pub mode: [u8; 8], + pub uid: [u8; 8], + pub gid: [u8; 8], + pub size: [u8; 12], + pub mtime: [u8; 12], + pub cksum: [u8; 8], + pub linkflag: [u8; 1], + pub linkname: [u8; 100], + pub pad: [u8; 255], +} + +/// Representation of the header of an entry in an archive +#[repr(C)] +#[allow(missing_docs)] +pub struct UstarHeader { + pub name: [u8; 100], + pub mode: [u8; 8], + pub uid: [u8; 8], + pub gid: [u8; 8], + pub size: [u8; 12], + pub mtime: [u8; 12], + pub cksum: [u8; 8], + pub typeflag: [u8; 1], + pub linkname: [u8; 100], + + // UStar format + pub magic: [u8; 6], + pub version: [u8; 2], + pub uname: [u8; 32], + pub gname: [u8; 32], + pub dev_major: [u8; 8], + pub dev_minor: [u8; 8], + pub prefix: [u8; 155], + pub pad: [u8; 12], +} + +/// Representation of the header of an entry in an archive +#[repr(C)] +#[allow(missing_docs)] +pub struct GnuHeader { + pub name: [u8; 100], + pub mode: [u8; 8], + pub uid: [u8; 8], + pub gid: [u8; 8], + pub size: [u8; 12], + pub mtime: [u8; 12], + pub cksum: [u8; 8], + pub typeflag: [u8; 1], + pub linkname: [u8; 100], + + // GNU format + pub magic: [u8; 6], + pub version: [u8; 2], + pub uname: [u8; 32], + pub gname: [u8; 32], + pub dev_major: [u8; 8], + pub dev_minor: [u8; 8], + pub atime: [u8; 12], + pub ctime: [u8; 12], + pub offset: [u8; 12], + pub longnames: [u8; 4], + pub unused: [u8; 1], + pub sparse: [GnuSparseHeader; 4], + pub isextended: [u8; 1], + pub realsize: [u8; 12], + pub pad: [u8; 17], +} + +#[repr(C)] +#[allow(missing_docs)] +pub struct GnuSparseHeader { + pub offset: [u8; 12], + pub numbytes: [u8; 12], +} + +impl Header { + /// Creates a new blank GNU header. + /// + /// The GNU style header is the default for this library and allows various + /// extensions such as long path names, long link names, and setting the + /// atime/ctime metadata attributes of files. + pub fn new_gnu() -> Header { + let mut header = Header { bytes: [0; 512] }; + { + let gnu = header.cast_mut::<GnuHeader>(); + gnu.magic = *b"ustar "; + gnu.version = *b" \0"; + } + return header + } + + /// Creates a new blank UStar header. + /// + /// The UStar style header is an extension of the original archive header + /// which enables some extra metadata along with storing a longer (but not + /// too long) path name. + /// + /// UStar is also the basis used for pax archives. + pub fn new_ustar() -> Header { + let mut header = Header { bytes: [0; 512] }; + { + let gnu = header.cast_mut::<UstarHeader>(); + gnu.magic = *b"ustar\0"; + gnu.version = *b"00"; + } + return header + } + + /// Creates a new blank old header. + /// + /// This header format is the original archive header format which all other + /// versions are compatible with (e.g. they are a superset). This header + /// format limits the path name limit and isn't able to contain extra + /// metadata like atime/ctime. + pub fn new_old() -> Header { + Header { bytes: [0; 512] } + } + + fn cast<T>(&self) -> &T { + assert_eq!(mem::size_of_val(self), mem::size_of::<T>()); + unsafe { &*(self as *const Header as *const T) } + } + + fn cast_mut<T>(&mut self) -> &mut T { + assert_eq!(mem::size_of_val(self), mem::size_of::<T>()); + unsafe { &mut *(self as *mut Header as *mut T) } + } + + fn is_ustar(&self) -> bool { + let ustar = self.cast::<UstarHeader>(); + ustar.magic[..] == b"ustar\0"[..] && ustar.version[..] == b"00"[..] + } + + fn is_gnu(&self) -> bool { + let ustar = self.cast::<UstarHeader>(); + ustar.magic[..] == b"ustar "[..] && ustar.version[..] == b" \0"[..] + } + + /// View this archive header as a raw "old" archive header. + /// + /// This view will always succeed as all archive header formats will fill + /// out at least the fields specified in the old header format. + pub fn as_old(&self) -> &OldHeader { + self.cast() + } + + /// Same as `as_old`, but the mutable version. + pub fn as_old_mut(&mut self) -> &mut OldHeader { + self.cast_mut() + } + + /// View this archive header as a raw UStar archive header. + /// + /// The UStar format is an extension to the tar archive format which enables + /// longer pathnames and a few extra attributes such as the group and user + /// name. + /// + /// This cast may not succeed as this function will test whether the + /// magic/version fields of the UStar format have the appropriate values, + /// returning `None` if they aren't correct. + pub fn as_ustar(&self) -> Option<&UstarHeader> { + if self.is_ustar() {Some(self.cast())} else {None} + } + + /// Same as `as_ustar_mut`, but the mutable version. + pub fn as_ustar_mut(&mut self) -> Option<&mut UstarHeader> { + if self.is_ustar() {Some(self.cast_mut())} else {None} + } + + /// View this archive header as a raw GNU archive header. + /// + /// The GNU format is an extension to the tar archive format which enables + /// longer pathnames and a few extra attributes such as the group and user + /// name. + /// + /// This cast may not succeed as this function will test whether the + /// magic/version fields of the GNU format have the appropriate values, + /// returning `None` if they aren't correct. + pub fn as_gnu(&self) -> Option<&GnuHeader> { + if self.is_gnu() {Some(self.cast())} else {None} + } + + /// Same as `as_gnu`, but the mutable version. + pub fn as_gnu_mut(&mut self) -> Option<&mut GnuHeader> { + if self.is_gnu() {Some(self.cast_mut())} else {None} + } + + /// Returns a view into this header as a byte array. + pub fn as_bytes(&self) -> &[u8; 512] { + &self.bytes + } + + /// Returns a view into this header as a byte array. + pub fn as_mut_bytes(&mut self) -> &mut [u8; 512] { + &mut self.bytes + } + + /// Blanket sets the metadata in this header from the metadata argument + /// provided. + /// + /// This is useful for initializing a `Header` from the OS's metadata from a + /// file. + pub fn set_metadata(&mut self, meta: &fs::Metadata) { + self.fill_from(meta); + // Set size of directories to zero + self.set_size(if meta.is_dir() { 0 } else { meta.len() }); + if let Some(ustar) = self.as_ustar_mut() { + ustar.set_device_major(0); + ustar.set_device_minor(0); + } + if let Some(gnu) = self.as_gnu_mut() { + gnu.set_device_major(0); + gnu.set_device_minor(0); + } + } + + /// Returns the file size this header represents. + /// + /// May return an error if the field is corrupted. + pub fn size(&self) -> io::Result<u64> { + octal_from(&self.as_old().size) + } + + /// Encodes the `size` argument into the size field of this header. + pub fn set_size(&mut self, size: u64) { + octal_into(&mut self.as_old_mut().size, size) + } + + /// Returns the raw path name stored in this header. + /// + /// This method may fail if the pathname is not valid unicode and this is + /// called on a Windows platform. + /// + /// Note that this function will convert any `\` characters to directory + /// separators. + pub fn path(&self) -> io::Result<Cow<Path>> { + bytes2path(self.path_bytes()) + } + + /// Returns the pathname stored in this header as a byte array. + /// + /// This function is guaranteed to succeed, but you may wish to call the + /// `path` method to convert to a `Path`. + /// + /// Note that this function will convert any `\` characters to directory + /// separators. + pub fn path_bytes(&self) -> Cow<[u8]> { + if let Some(ustar) = self.as_ustar() { + ustar.path_bytes() + } else { + let name = truncate(&self.as_old().name); + Cow::Borrowed(name) + } + } + + /// Sets the path name for this header. + /// + /// This function will set the pathname listed in this header, encoding it + /// in the appropriate format. May fail if the path is too long or if the + /// path specified is not unicode and this is a Windows platform. + pub fn set_path<P: AsRef<Path>>(&mut self, p: P) -> io::Result<()> { + self._set_path(p.as_ref()) + } + + fn _set_path(&mut self, path: &Path) -> io::Result<()> { + if let Some(ustar) = self.as_ustar_mut() { + return ustar.set_path(path) + } + copy_path_into(&mut self.as_old_mut().name, path) + } + + /// Returns the link name stored in this header, if any is found. + /// + /// This method may fail if the pathname is not valid unicode and this is + /// called on a Windows platform. `Ok(None)` being returned, however, + /// indicates that the link name was not present. + /// + /// Note that this function will convert any `\` characters to directory + /// separators. + pub fn link_name(&self) -> io::Result<Option<Cow<Path>>> { + match self.link_name_bytes() { + Some(bytes) => bytes2path(bytes).map(Some), + None => Ok(None), + } + } + + /// Returns the link name stored in this header as a byte array, if any. + /// + /// This function is guaranteed to succeed, but you may wish to call the + /// `link_name` method to convert to a `Path`. + /// + /// Note that this function will convert any `\` characters to directory + /// separators. + pub fn link_name_bytes(&self) -> Option<Cow<[u8]>> { + let old = self.as_old(); + if old.linkname[0] != 0 { + Some(Cow::Borrowed(truncate(&old.linkname))) + } else { + None + } + } + + /// Sets the path name for this header. + /// + /// This function will set the pathname listed in this header, encoding it + /// in the appropriate format. May fail if the path is too long or if the + /// path specified is not unicode and this is a Windows platform. + pub fn set_link_name<P: AsRef<Path>>(&mut self, p: P) -> io::Result<()> { + self._set_link_name(p.as_ref()) + } + + fn _set_link_name(&mut self, path: &Path) -> io::Result<()> { + copy_path_into(&mut self.as_old_mut().linkname, path) + } + + /// Returns the mode bits for this file + /// + /// May return an error if the field is corrupted. + pub fn mode(&self) -> io::Result<u32> { + octal_from(&self.as_old().mode).map(|u| u as u32) + } + + /// Encodes the `mode` provided into this header. + pub fn set_mode(&mut self, mode: u32) { + octal_into(&mut self.as_old_mut().mode, mode & 0o3777); + } + + /// Returns the value of the owner's user ID field + /// + /// May return an error if the field is corrupted. + pub fn uid(&self) -> io::Result<u32> { + octal_from(&self.as_old().uid).map(|u| u as u32) + } + + /// Encodes the `uid` provided into this header. + pub fn set_uid(&mut self, uid: u32) { + octal_into(&mut self.as_old_mut().uid, uid); + } + + /// Returns the value of the group's user ID field + pub fn gid(&self) -> io::Result<u32> { + octal_from(&self.as_old().gid).map(|u| u as u32) + } + + /// Encodes the `gid` provided into this header. + pub fn set_gid(&mut self, gid: u32) { + octal_into(&mut self.as_old_mut().gid, gid); + } + + /// Returns the last modification time in Unix time format + pub fn mtime(&self) -> io::Result<u64> { + octal_from(&self.as_old().mtime) + } + + /// Encodes the `mtime` provided into this header. + /// + /// Note that this time is typically a number of seconds passed since + /// January 1, 1970. + pub fn set_mtime(&mut self, mtime: u64) { + octal_into(&mut self.as_old_mut().mtime, mtime); + } + + /// Return the user name of the owner of this file. + /// + /// A return value of `Ok(Some(..))` indicates that the user name was + /// present and was valid utf-8, `Ok(None)` indicates that the user name is + /// not present in this archive format, and `Err` indicates that the user + /// name was present but was not valid utf-8. + pub fn username(&self) -> Result<Option<&str>, str::Utf8Error> { + match self.username_bytes() { + Some(bytes) => str::from_utf8(bytes).map(Some), + None => Ok(None), + } + } + + /// Returns the user name of the owner of this file, if present. + /// + /// A return value of `None` indicates that the user name is not present in + /// this header format. + pub fn username_bytes(&self) -> Option<&[u8]> { + if let Some(ustar) = self.as_ustar() { + Some(ustar.username_bytes()) + } else if let Some(gnu) = self.as_gnu() { + Some(gnu.username_bytes()) + } else { + None + } + } + + /// Sets the username inside this header. + /// + /// This function will return an error if this header format cannot encode a + /// user name or the name is too long. + pub fn set_username(&mut self, name: &str) -> io::Result<()> { + if let Some(ustar) = self.as_ustar_mut() { + return ustar.set_username(name) + } + if let Some(gnu) = self.as_gnu_mut() { + gnu.set_username(name) + } else { + Err(other("not a ustar or gnu archive, cannot set username")) + } + } + + /// Return the group name of the owner of this file. + /// + /// A return value of `Ok(Some(..))` indicates that the group name was + /// present and was valid utf-8, `Ok(None)` indicates that the group name is + /// not present in this archive format, and `Err` indicates that the group + /// name was present but was not valid utf-8. + pub fn groupname(&self) -> Result<Option<&str>, str::Utf8Error> { + match self.groupname_bytes() { + Some(bytes) => str::from_utf8(bytes).map(Some), + None => Ok(None), + } + } + + /// Returns the group name of the owner of this file, if present. + /// + /// A return value of `None` indicates that the group name is not present in + /// this header format. + pub fn groupname_bytes(&self) -> Option<&[u8]> { + if let Some(ustar) = self.as_ustar() { + Some(ustar.groupname_bytes()) + } else if let Some(gnu) = self.as_gnu() { + Some(gnu.groupname_bytes()) + } else { + None + } + } + + /// Sets the group name inside this header. + /// + /// This function will return an error if this header format cannot encode a + /// group name or the name is too long. + pub fn set_groupname(&mut self, name: &str) -> io::Result<()> { + if let Some(ustar) = self.as_ustar_mut() { + return ustar.set_groupname(name) + } + if let Some(gnu) = self.as_gnu_mut() { + gnu.set_groupname(name) + } else { + Err(other("not a ustar or gnu archive, cannot set groupname")) + } + } + + /// Returns the device major number, if present. + /// + /// This field may not be present in all archives, and it may not be + /// correctly formed in all archives. `Ok(Some(..))` means it was present + /// and correctly decoded, `Ok(None)` indicates that this header format does + /// not include the device major number, and `Err` indicates that it was + /// present and failed to decode. + pub fn device_major(&self) -> io::Result<Option<u32>> { + if let Some(ustar) = self.as_ustar() { + ustar.device_major().map(Some) + } else if let Some(gnu) = self.as_gnu() { + gnu.device_major().map(Some) + } else { + Ok(None) + } + } + + /// Encodes the value `major` into the dev_major field of this header. + /// + /// This function will return an error if this header format cannot encode a + /// major device number. + pub fn set_device_major(&mut self, major: u32) -> io::Result<()> { + if let Some(ustar) = self.as_ustar_mut() { + return Ok(ustar.set_device_major(major)) + } + if let Some(gnu) = self.as_gnu_mut() { + Ok(gnu.set_device_major(major)) + } else { + Err(other("not a ustar or gnu archive, cannot set dev_major")) + } + } + + /// Returns the device minor number, if present. + /// + /// This field may not be present in all archives, and it may not be + /// correctly formed in all archives. `Ok(Some(..))` means it was present + /// and correctly decoded, `Ok(None)` indicates that this header format does + /// not include the device minor number, and `Err` indicates that it was + /// present and failed to decode. + pub fn device_minor(&self) -> io::Result<Option<u32>> { + if let Some(ustar) = self.as_ustar() { + ustar.device_minor().map(Some) + } else if let Some(gnu) = self.as_gnu() { + gnu.device_minor().map(Some) + } else { + Ok(None) + } + } + + /// Encodes the value `minor` into the dev_minor field of this header. + /// + /// This function will return an error if this header format cannot encode a + /// minor device number. + pub fn set_device_minor(&mut self, minor: u32) -> io::Result<()> { + if let Some(ustar) = self.as_ustar_mut() { + return Ok(ustar.set_device_minor(minor)) + } + if let Some(gnu) = self.as_gnu_mut() { + Ok(gnu.set_device_minor(minor)) + } else { + Err(other("not a ustar or gnu archive, cannot set dev_minor")) + } + } + + /// Returns the type of file described by this header. + pub fn entry_type(&self) -> EntryType { + EntryType::new(self.as_old().linkflag[0]) + } + + /// Sets the type of file that will be described by this header. + pub fn set_entry_type(&mut self, ty: EntryType) { + self.as_old_mut().linkflag = [ty.as_byte()]; + } + + /// Returns the checksum field of this header. + /// + /// May return an error if the field is corrupted. + pub fn cksum(&self) -> io::Result<u32> { + octal_from(&self.as_old().cksum).map(|u| u as u32) + } + + /// Sets the checksum field of this header based on the current fields in + /// this header. + pub fn set_cksum(&mut self) { + self.as_old_mut().cksum = *b" "; + let cksum = self.bytes.iter().fold(0, |a, b| a + (*b as u32)); + octal_into(&mut self.as_old_mut().cksum, cksum); + } + + #[cfg(unix)] + fn fill_from(&mut self, meta: &fs::Metadata) { + use libc; + + self.set_mode((meta.mode() & 0o3777) as u32); + self.set_mtime(meta.mtime() as u64); + if let Some(gnu) = self.as_gnu_mut() { + gnu.set_atime(meta.atime() as u64); + gnu.set_ctime(meta.ctime() as u64); + } + self.set_uid(meta.uid() as u32); + self.set_gid(meta.gid() as u32); + + // TODO: need to bind more file types + self.set_entry_type(match meta.mode() as libc::mode_t & libc::S_IFMT { + libc::S_IFREG => EntryType::file(), + libc::S_IFLNK => EntryType::symlink(), + libc::S_IFCHR => EntryType::character_special(), + libc::S_IFBLK => EntryType::block_special(), + libc::S_IFDIR => EntryType::dir(), + libc::S_IFIFO => EntryType::fifo(), + _ => EntryType::new(b' '), + }); + } + + #[cfg(windows)] + fn fill_from(&mut self, meta: &fs::Metadata) { + const FILE_ATTRIBUTE_READONLY: u32 = 0x00000001; + let readonly = meta.file_attributes() & FILE_ATTRIBUTE_READONLY; + + // There's no concept of a mode on windows, so do a best approximation + // here. + let mode = match (meta.is_dir(), readonly != 0) { + (true, false) => 0o755, + (true, true) => 0o555, + (false, false) => 0o644, + (false, true) => 0o444, + }; + self.set_mode(mode); + self.set_uid(0); + self.set_gid(0); + + let ft = meta.file_type(); + self.set_entry_type(if ft.is_dir() { + EntryType::dir() + } else if ft.is_file() { + EntryType::file() + } else if ft.is_symlink() { + EntryType::symlink() + } else { + EntryType::new(b' ') + }); + + // The dates listed in tarballs are always seconds relative to + // January 1, 1970. On Windows, however, the timestamps are returned as + // dates relative to January 1, 1601 (in 100ns intervals), so we need to + // add in some offset for those dates. + let mtime = (meta.last_write_time() / (1_000_000_000 / 100)) - 11644473600; + self.set_mtime(mtime); + } +} + +impl Clone for Header { + fn clone(&self) -> Header { + Header { bytes: self.bytes } + } +} + +impl UstarHeader { + /// See `Header::path_bytes` + pub fn path_bytes(&self) -> Cow<[u8]> { + if self.prefix[0] == 0 && !self.name.contains(&b'\\') { + Cow::Borrowed(truncate(&self.name)) + } else { + let mut bytes = Vec::new(); + let prefix = truncate(&self.prefix); + if prefix.len() > 0 { + bytes.extend(prefix); + bytes.push(b'/'); + } + bytes.extend(truncate(&self.name)); + Cow::Owned(bytes) + } + } + + /// See `Header::set_path` + pub fn set_path<P: AsRef<Path>>(&mut self, p: P) -> io::Result<()> { + self._set_path(p.as_ref()) + } + + fn _set_path(&mut self, path: &Path) -> io::Result<()> { + // This can probably be optimized quite a bit more, but for now just do + // something that's relatively easy and readable. + // + // First up, if the path fits within `self.name` then we just shove it + // in there. If not then we try to split it between some existing path + // components where it can fit in name/prefix. To do that we peel off + // enough until the path fits in `prefix`, then we try to put both + // halves into their destination. + let bytes = try!(path2bytes(path)); + let (maxnamelen, maxprefixlen) = (self.name.len(), self.prefix.len()); + if bytes.len() <= maxnamelen { + try!(copy_path_into(&mut self.name, path)); + } else { + let mut prefix = path; + let mut prefixlen; + loop { + match prefix.parent() { + Some(parent) => prefix = parent, + None => return Err(other("path cannot be split to be \ + inserted into archive")), + } + prefixlen = try!(path2bytes(prefix)).len(); + if prefixlen <= maxprefixlen { + break + } + } + try!(copy_path_into(&mut self.prefix, prefix)); + let path = try!(bytes2path(Cow::Borrowed(&bytes[prefixlen + 1..]))); + try!(copy_path_into(&mut self.name, &path)); + } + Ok(()) + } + + /// See `Header::username_bytes` + pub fn username_bytes(&self) -> &[u8] { + truncate(&self.uname) + } + + /// See `Header::set_username` + pub fn set_username(&mut self, name: &str) -> io::Result<()> { + copy_into(&mut self.uname, name.as_bytes()) + } + + /// See `Header::groupname_bytes` + pub fn groupname_bytes(&self) -> &[u8] { + truncate(&self.gname) + } + + /// See `Header::set_groupname` + pub fn set_groupname(&mut self, name: &str) -> io::Result<()> { + copy_into(&mut self.gname, name.as_bytes()) + } + + /// See `Header::device_major` + pub fn device_major(&self) -> io::Result<u32> { + octal_from(&self.dev_major).map(|u| u as u32) + } + + /// See `Header::set_device_major` + pub fn set_device_major(&mut self, major: u32) { + octal_into(&mut self.dev_major, major); + } + + /// See `Header::device_minor` + pub fn device_minor(&self) -> io::Result<u32> { + octal_from(&self.dev_minor).map(|u| u as u32) + } + + /// See `Header::set_device_minor` + pub fn set_device_minor(&mut self, minor: u32) { + octal_into(&mut self.dev_minor, minor); + } +} + +impl GnuHeader { + /// See `Header::username_bytes` + pub fn username_bytes(&self) -> &[u8] { + truncate(&self.uname) + } + + /// See `Header::set_username` + pub fn set_username(&mut self, name: &str) -> io::Result<()> { + copy_into(&mut self.uname, name.as_bytes()) + } + + /// See `Header::groupname_bytes` + pub fn groupname_bytes(&self) -> &[u8] { + truncate(&self.gname) + } + + /// See `Header::set_groupname` + pub fn set_groupname(&mut self, name: &str) -> io::Result<()> { + copy_into(&mut self.gname, name.as_bytes()) + } + + /// See `Header::device_major` + pub fn device_major(&self) -> io::Result<u32> { + octal_from(&self.dev_major).map(|u| u as u32) + } + + /// See `Header::set_device_major` + pub fn set_device_major(&mut self, major: u32) { + octal_into(&mut self.dev_major, major); + } + + /// See `Header::device_minor` + pub fn device_minor(&self) -> io::Result<u32> { + octal_from(&self.dev_minor).map(|u| u as u32) + } + + /// See `Header::set_device_minor` + pub fn set_device_minor(&mut self, minor: u32) { + octal_into(&mut self.dev_minor, minor); + } + + /// Returns the last modification time in Unix time format + pub fn atime(&self) -> io::Result<u64> { + octal_from(&self.atime) + } + + /// Encodes the `atime` provided into this header. + /// + /// Note that this time is typically a number of seconds passed since + /// January 1, 1970. + pub fn set_atime(&mut self, atime: u64) { + octal_into(&mut self.atime, atime); + } + + /// Returns the last modification time in Unix time format + pub fn ctime(&self) -> io::Result<u64> { + octal_from(&self.ctime) + } + + /// Encodes the `ctime` provided into this header. + /// + /// Note that this time is typically a number of seconds passed since + /// January 1, 1970. + pub fn set_ctime(&mut self, ctime: u64) { + octal_into(&mut self.ctime, ctime); + } +} + +fn octal_from(slice: &[u8]) -> io::Result<u64> { + let num = match str::from_utf8(truncate(slice)) { + Ok(n) => n, + Err(_) => return Err(other("numeric field did not have utf-8 text")), + }; + match u64::from_str_radix(num.trim(), 8) { + Ok(n) => Ok(n), + Err(_) => Err(other("numeric field was not a number")) + } +} + +fn octal_into<T: fmt::Octal>(dst: &mut [u8], val: T) { + let o = format!("{:o}", val); + let value = o.bytes().rev().chain(repeat(b'0')); + for (slot, value) in dst.iter_mut().rev().skip(1).zip(value) { + *slot = value; + } +} + +fn truncate<'a>(slice: &'a [u8]) -> &'a [u8] { + match slice.iter().position(|i| *i == 0) { + Some(i) => &slice[..i], + None => slice, + } +} + +/// Copies `bytes` into the `slot` provided, returning an error if the `bytes` +/// array is too long or if it contains any nul bytes. +fn copy_into(slot: &mut [u8], bytes: &[u8]) -> io::Result<()> { + if bytes.len() > slot.len() { + Err(other("provided value is too long")) + } else if bytes.iter().any(|b| *b == 0) { + Err(other("provided value contains a nul byte")) + } else { + for (slot, val) in slot.iter_mut().zip(bytes.iter().chain(Some(&0))) { + *slot = *val; + } + Ok(()) + } +} + +/// Copies `path` into the `slot` provided +/// +/// Returns an error if: +/// +/// * the path is too long to fit +/// * a nul byte was found +/// * an invalid path component is encountered (e.g. a root path or parent dir) +/// * the path itself is empty +fn copy_path_into(mut slot: &mut [u8], path: &Path) -> io::Result<()> { + let mut emitted = false; + for part in path.components() { + let part = match part { + Component::Prefix(..) | + Component::RootDir => { + return Err(other("paths in archives must be relative")) + } + Component::ParentDir => { + return Err(other("paths in archives must not have `..`")) + } + Component::CurDir => continue, + Component::Normal(part) => part, + }; + if emitted { + try!(copy(&mut slot, &[b'/'])); + } + let bytes = try!(path2bytes(Path::new(part))); + if bytes.contains(&b'/') { + return Err(other("path component in archive cannot contain `/`")) + } + try!(copy(&mut slot, bytes)); + emitted = true; + } + if !emitted { + return Err(other("paths in archives must have at least one component")) + } + if ends_with_slash(path) { + try!(copy(&mut slot, &[b'/'])); + } + return Ok(()); + + fn copy(slot: &mut &mut [u8], bytes: &[u8]) -> io::Result<()> { + try!(copy_into(*slot, bytes)); + let tmp = mem::replace(slot, &mut []); + *slot = &mut tmp[bytes.len()..]; + Ok(()) + } +} + +#[cfg(windows)] +fn ends_with_slash(p: &Path) -> bool { + p.as_os_str().encode_wide().last() == Some(b'/' as u16) +} + +#[cfg(unix)] +fn ends_with_slash(p: &Path) -> bool { + p.as_os_str().as_bytes().ends_with(&[b'/']) +} + +#[cfg(windows)] +pub fn path2bytes(p: &Path) -> io::Result<&[u8]> { + p.as_os_str().to_str().map(|s| s.as_bytes()).ok_or_else(|| { + other("path was not valid unicode") + }) +} + +#[cfg(unix)] +pub fn path2bytes(p: &Path) -> io::Result<&[u8]> { + Ok(p.as_os_str().as_bytes()) +} + +#[cfg(windows)] +pub fn bytes2path(bytes: Cow<[u8]>) -> io::Result<Cow<Path>> { + return match bytes { + Cow::Borrowed(bytes) => { + let s = try!(str::from_utf8(bytes).map_err(|_| { + not_unicode() + })); + Ok(Cow::Borrowed(Path::new(s))) + } + Cow::Owned(bytes) => { + let s = try!(String::from_utf8(bytes).map_err(|_| { + not_unicode() + })); + Ok(Cow::Owned(PathBuf::from(s))) + } + }; + + fn not_unicode() -> io::Error { + other("only unicode paths are supported on windows") + } +} + +#[cfg(unix)] +pub fn bytes2path(bytes: Cow<[u8]>) -> io::Result<Cow<Path>> { + use std::ffi::{OsStr, OsString}; + + Ok(match bytes { + Cow::Borrowed(bytes) => Cow::Borrowed({ + Path::new(OsStr::from_bytes(bytes)) + }), + Cow::Owned(bytes) => Cow::Owned({ + PathBuf::from(OsString::from_vec(bytes)) + }) + }) +} diff --git a/deps/tar-0.4.5/src/lib.rs b/deps/tar-0.4.5/src/lib.rs new file mode 100644 index 000000000..f5cea41e3 --- /dev/null +++ b/deps/tar-0.4.5/src/lib.rs @@ -0,0 +1,65 @@ +//! A library for reading and writing TAR archives +//! +//! This library provides utilities necessary to manage [TAR archives][1] +//! abstracted over a reader or writer. Great strides are taken to ensure that +//! an archive is never required to be fully resident in memory, and all objects +//! provide largely a streaming interface to read bytes from. +//! +//! [1]: http://en.wikipedia.org/wiki/Tar_%28computing%29 + +// More docs about the detailed tar format can also be found here: +// http://www.freebsd.org/cgi/man.cgi?query=tar&sektion=5&manpath=FreeBSD+8-current + +// NB: some of the coding patterns and idioms here may seem a little strange. +// This is currently attempting to expose a super generic interface while +// also not forcing clients to codegen the entire crate each time they use +// it. To that end lots of work is done to ensure that concrete +// implementations are all found in this crate and the generic functions are +// all just super thin wrappers (e.g. easy to codegen). + +#![doc(html_root_url = "http://alexcrichton.com/tar-rs")] +#![deny(missing_docs)] +#![cfg_attr(test, deny(warnings))] + +extern crate libc; +extern crate filetime; + +use std::io::{Error, ErrorKind}; +use std::ops::{Deref, DerefMut}; + +pub use header::{Header, UstarHeader, GnuHeader, GnuSparseHeader}; +pub use entry_type::EntryType; +pub use entry::Entry; +pub use archive::{Archive, Entries}; +pub use builder::Builder; +pub use pax::{PaxExtensions, PaxExtension}; + +mod archive; +mod builder; +mod entry; +mod entry_type; +mod error; +mod header; +mod pax; + +// FIXME(rust-lang/rust#26403): +// Right now there's a bug when a DST struct's last field has more +// alignment than the rest of a structure, causing invalid pointers to be +// created when it's casted around at runtime. To work around this we force +// our DST struct to instead have a forcibly higher alignment via a +// synthesized u64 (hopefully the largest alignment we'll run into in +// practice), and this should hopefully ensure that the pointers all work +// out. +struct AlignHigher<R: ?Sized>(u64, R); + +impl<R: ?Sized> Deref for AlignHigher<R> { + type Target = R; + fn deref(&self) -> &R { &self.1 } +} +impl<R: ?Sized> DerefMut for AlignHigher<R> { + fn deref_mut(&mut self) -> &mut R { &mut self.1 } +} + +fn other(msg: &str) -> Error { + Error::new(ErrorKind::Other, msg) +} diff --git a/deps/tar-0.4.3/src/pax.rs b/deps/tar-0.4.5/src/pax.rs similarity index 100% rename from deps/tar-0.4.3/src/pax.rs rename to deps/tar-0.4.5/src/pax.rs diff --git a/deps/tar-0.4.5/tests/all.rs b/deps/tar-0.4.5/tests/all.rs new file mode 100644 index 000000000..3cbc56703 --- /dev/null +++ b/deps/tar-0.4.5/tests/all.rs @@ -0,0 +1,532 @@ +extern crate filetime; +extern crate tar; +extern crate tempdir; + +use std::fs::{self, File}; +use std::io::prelude::*; +use std::io::{self, Cursor}; +use std::iter::repeat; +use std::path::Path; + +use filetime::FileTime; +use self::tempdir::TempDir; +use tar::{Archive, Builder, Header, EntryType}; + +macro_rules! t { + ($e:expr) => (match $e { + Ok(v) => v, + Err(e) => panic!("{} returned {}", stringify!($e), e), + }) +} + +macro_rules! tar { + ($e:expr) => (&include_bytes!(concat!("archives/", $e))[..]) +} + +mod header; + +#[test] +fn simple() { + let mut ar = Archive::new(Cursor::new(tar!("simple.tar"))); + for entry in t!(ar.entries()) { + t!(entry); + } + let mut ar = Archive::new(Cursor::new(tar!("simple.tar"))); + for entry in t!(ar.entries()) { + t!(entry); + } +} + +#[test] +fn header_impls() { + let mut ar = Archive::new(Cursor::new(tar!("simple.tar"))); + let hn = Header::new_old(); + let hnb = hn.as_bytes(); + for file in t!(ar.entries()) { + let file = t!(file); + let h1 = file.header(); + let h1b = h1.as_bytes(); + let h2 = h1.clone(); + let h2b = h2.as_bytes(); + assert!(h1b[..] == h2b[..] && h2b[..] != hnb[..]) + } +} + +#[test] +fn reading_files() { + let rdr = Cursor::new(tar!("reading_files.tar")); + let mut ar = Archive::new(rdr); + let mut entries = t!(ar.entries()); + + let mut a = t!(entries.next().unwrap()); + assert_eq!(&*a.header().path_bytes(), b"a"); + let mut s = String::new(); + t!(a.read_to_string(&mut s)); + assert_eq!(s, "a\na\na\na\na\na\na\na\na\na\na\n"); + + let mut b = t!(entries.next().unwrap()); + assert_eq!(&*b.header().path_bytes(), b"b"); + s.truncate(0); + t!(b.read_to_string(&mut s)); + assert_eq!(s, "b\nb\nb\nb\nb\nb\nb\nb\nb\nb\nb\n"); + + assert!(entries.next().is_none()); +} + +#[test] +fn writing_files() { + let mut ar = Builder::new(Vec::new()); + let td = t!(TempDir::new("tar-rs")); + + let path = td.path().join("test"); + t!(t!(File::create(&path)).write_all(b"test")); + + t!(ar.append_file("test2", &mut t!(File::open(&path)))); + + let data = t!(ar.into_inner()); + let mut ar = Archive::new(Cursor::new(data)); + let mut entries = t!(ar.entries()); + let mut f = t!(entries.next().unwrap()); + + assert_eq!(&*f.header().path_bytes(), b"test2"); + assert_eq!(f.header().size().unwrap(), 4); + let mut s = String::new(); + t!(f.read_to_string(&mut s)); + assert_eq!(s, "test"); + + assert!(entries.next().is_none()); +} + +#[test] +fn large_filename() { + let mut ar = Builder::new(Vec::new()); + let td = t!(TempDir::new("tar-rs")); + + let path = td.path().join("test"); + t!(t!(File::create(&path)).write_all(b"test")); + + let filename = repeat("abcd/").take(50).collect::<String>(); + let mut header = Header::new_ustar(); + header.set_path(&filename).unwrap(); + header.set_metadata(&t!(fs::metadata(&path))); + header.set_cksum(); + t!(ar.append(&header, &b"test"[..])); + let too_long = repeat("abcd").take(200).collect::<String>(); + t!(ar.append_file(&too_long, &mut t!(File::open(&path)))); + + let rd = Cursor::new(t!(ar.into_inner())); + let mut ar = Archive::new(rd); + let mut entries = t!(ar.entries()); + + let mut f = entries.next().unwrap().unwrap(); + assert_eq!(&*f.header().path_bytes(), filename.as_bytes()); + assert_eq!(f.header().size().unwrap(), 4); + let mut s = String::new(); + t!(f.read_to_string(&mut s)); + assert_eq!(s, "test"); + + let mut f = entries.next().unwrap().unwrap(); + assert_eq!(&*f.path_bytes(), too_long.as_bytes()); + assert_eq!(f.header().size().unwrap(), 4); + let mut s = String::new(); + t!(f.read_to_string(&mut s)); + assert_eq!(s, "test"); + + assert!(entries.next().is_none()); +} + +#[test] +fn reading_entries() { + let rdr = Cursor::new(tar!("reading_files.tar")); + let mut ar = Archive::new(rdr); + let mut entries = t!(ar.entries()); + let mut a = t!(entries.next().unwrap()); + assert_eq!(&*a.header().path_bytes(), b"a"); + let mut s = String::new(); + t!(a.read_to_string(&mut s)); + assert_eq!(s, "a\na\na\na\na\na\na\na\na\na\na\n"); + s.truncate(0); + t!(a.read_to_string(&mut s)); + assert_eq!(s, ""); + let mut b = t!(entries.next().unwrap()); + + assert_eq!(&*b.header().path_bytes(), b"b"); + s.truncate(0); + t!(b.read_to_string(&mut s)); + assert_eq!(s, "b\nb\nb\nb\nb\nb\nb\nb\nb\nb\nb\n"); + assert!(entries.next().is_none()); +} + +fn check_dirtree(td: &TempDir) { + let dir_a = td.path().join("a"); + let dir_b = td.path().join("a/b"); + let file_c = td.path().join("a/c"); + assert!(fs::metadata(&dir_a).map(|m| m.is_dir()).unwrap_or(false)); + assert!(fs::metadata(&dir_b).map(|m| m.is_dir()).unwrap_or(false)); + assert!(fs::metadata(&file_c).map(|m| m.is_file()).unwrap_or(false)); +} + +#[test] +fn extracting_directories() { + let td = t!(TempDir::new("tar-rs")); + let rdr = Cursor::new(tar!("directory.tar")); + let mut ar = Archive::new(rdr); + t!(ar.unpack(td.path())); + check_dirtree(&td); +} + +#[test] +fn writing_and_extracting_directories() { + let td = t!(TempDir::new("tar-rs")); + + let mut ar = Builder::new(Vec::new()); + let tmppath = td.path().join("tmpfile"); + t!(t!(File::create(&tmppath)).write_all(b"c")); + t!(ar.append_dir("a", ".")); + t!(ar.append_dir("a/b", ".")); + t!(ar.append_file("a/c", &mut t!(File::open(&tmppath)))); + t!(ar.finish()); + + let rdr = Cursor::new(t!(ar.into_inner())); + let mut ar = Archive::new(rdr); + t!(ar.unpack(td.path())); + check_dirtree(&td); +} + +#[test] +fn extracting_duplicate_dirs() { + let td = t!(TempDir::new("tar-rs")); + let rdr = Cursor::new(tar!("duplicate_dirs.tar")); + let mut ar = Archive::new(rdr); + t!(ar.unpack(td.path())); + + let some_dir = td.path().join("some_dir"); + assert!(fs::metadata(&some_dir).map(|m| m.is_dir()).unwrap_or(false)); +} + +#[test] +fn handling_incorrect_file_size() { + let td = t!(TempDir::new("tar-rs")); + + let mut ar = Builder::new(Vec::new()); + + let path = td.path().join("tmpfile"); + t!(File::create(&path)); + let mut file = t!(File::open(&path)); + let mut header = Header::new_old(); + t!(header.set_path("somepath")); + header.set_metadata(&t!(file.metadata())); + header.set_size(2048); // past the end of file null blocks + header.set_cksum(); + t!(ar.append(&header, &mut file)); + + // Extracting + let rdr = Cursor::new(t!(ar.into_inner())); + let mut ar = Archive::new(rdr); + assert!(ar.unpack(td.path()).is_err()); + + // Iterating + let rdr = Cursor::new(ar.into_inner().into_inner()); + let mut ar = Archive::new(rdr); + assert!(t!(ar.entries()).any(|fr| fr.is_err())); +} + +#[test] +fn extracting_malicious_tarball() { + let td = t!(TempDir::new("tar-rs")); + + let mut evil_tar = Vec::new(); + + { + let mut a = Builder::new(&mut evil_tar); + let mut append = |path: &str| { + let mut header = Header::new_gnu(); + assert!(header.set_path(path).is_err(), + "was ok: {:?}", path); + { + let mut h = header.as_gnu_mut().unwrap(); + for (a, b) in h.name.iter_mut().zip(path.as_bytes()) { + *a = *b; + } + } + header.set_size(1); + header.set_cksum(); + t!(a.append(&header, io::repeat(1).take(1))); + }; + append("/tmp/abs_evil.txt"); + append("//tmp/abs_evil2.txt"); + append("///tmp/abs_evil3.txt"); + append("/./tmp/abs_evil4.txt"); + append("//./tmp/abs_evil5.txt"); + append("///./tmp/abs_evil6.txt"); + append("/../tmp/rel_evil.txt"); + append("../rel_evil2.txt"); + append("./../rel_evil3.txt"); + append("some/../../rel_evil4.txt"); + append(""); + append("././//./"); + append("."); + } + + let mut ar = Archive::new(&evil_tar[..]); + t!(ar.unpack(td.path())); + + assert!(fs::metadata("/tmp/abs_evil.txt").is_err()); + assert!(fs::metadata("/tmp/abs_evil.txt2").is_err()); + assert!(fs::metadata("/tmp/abs_evil.txt3").is_err()); + assert!(fs::metadata("/tmp/abs_evil.txt4").is_err()); + assert!(fs::metadata("/tmp/abs_evil.txt5").is_err()); + assert!(fs::metadata("/tmp/abs_evil.txt6").is_err()); + assert!(fs::metadata("/tmp/rel_evil.txt").is_err()); + assert!(fs::metadata("/tmp/rel_evil.txt").is_err()); + assert!(fs::metadata(td.path().join("../tmp/rel_evil.txt")).is_err()); + assert!(fs::metadata(td.path().join("../rel_evil2.txt")).is_err()); + assert!(fs::metadata(td.path().join("../rel_evil3.txt")).is_err()); + assert!(fs::metadata(td.path().join("../rel_evil4.txt")).is_err()); + + // The `some` subdirectory should not be created because the only + // filename that references this has '..'. + assert!(fs::metadata(td.path().join("some")).is_err()); + + // The `tmp` subdirectory should be created and within this + // subdirectory, there should be files named `abs_evil.txt` through + // `abs_evil6.txt`. + assert!(fs::metadata(td.path().join("tmp")).map(|m| m.is_dir()) + .unwrap_or(false)); + assert!(fs::metadata(td.path().join("tmp/abs_evil.txt")) + .map(|m| m.is_file()).unwrap_or(false)); + assert!(fs::metadata(td.path().join("tmp/abs_evil2.txt")) + .map(|m| m.is_file()).unwrap_or(false)); + assert!(fs::metadata(td.path().join("tmp/abs_evil3.txt")) + .map(|m| m.is_file()).unwrap_or(false)); + assert!(fs::metadata(td.path().join("tmp/abs_evil4.txt")) + .map(|m| m.is_file()).unwrap_or(false)); + assert!(fs::metadata(td.path().join("tmp/abs_evil5.txt")) + .map(|m| m.is_file()).unwrap_or(false)); + assert!(fs::metadata(td.path().join("tmp/abs_evil6.txt")) + .map(|m| m.is_file()).unwrap_or(false)); +} + +#[test] +fn octal_spaces() { + let rdr = Cursor::new(tar!("spaces.tar")); + let mut ar = Archive::new(rdr); + + let entry = ar.entries().unwrap().next().unwrap().unwrap(); + assert_eq!(entry.header().mode().unwrap() & 0o777, 0o777); + assert_eq!(entry.header().uid().unwrap(), 0); + assert_eq!(entry.header().gid().unwrap(), 0); + assert_eq!(entry.header().size().unwrap(), 2); + assert_eq!(entry.header().mtime().unwrap(), 0o12440016664); + assert_eq!(entry.header().cksum().unwrap(), 0o4253); +} + +#[test] +fn extracting_malformed_tar_null_blocks() { + let td = t!(TempDir::new("tar-rs")); + + let mut ar = Builder::new(Vec::new()); + + let path1 = td.path().join("tmpfile1"); + let path2 = td.path().join("tmpfile2"); + t!(File::create(&path1)); + t!(File::create(&path2)); + t!(ar.append_file("tmpfile1", &mut t!(File::open(&path1)))); + let mut data = t!(ar.into_inner()); + let amt = data.len(); + data.truncate(amt - 512); + let mut ar = Builder::new(data); + t!(ar.append_file("tmpfile2", &mut t!(File::open(&path2)))); + t!(ar.finish()); + + let data = t!(ar.into_inner()); + let mut ar = Archive::new(&data[..]); + assert!(ar.unpack(td.path()).is_err()); +} + +#[test] +fn empty_filename() +{ + let td = t!(TempDir::new("tar-rs")); + let rdr = Cursor::new(tar!("empty_filename.tar")); + let mut ar = Archive::new(rdr); + assert!(ar.unpack(td.path()).is_err()); +} + +#[test] +fn file_times() { + let td = t!(TempDir::new("tar-rs")); + let rdr = Cursor::new(tar!("file_times.tar")); + let mut ar = Archive::new(rdr); + t!(ar.unpack(td.path())); + + let meta = fs::metadata(td.path().join("a")).unwrap(); + let mtime = FileTime::from_last_modification_time(&meta); + let atime = FileTime::from_last_access_time(&meta); + assert_eq!(mtime.seconds_relative_to_1970(), 1000000000); + assert_eq!(mtime.nanoseconds(), 0); + assert_eq!(atime.seconds_relative_to_1970(), 1000000000); + assert_eq!(atime.nanoseconds(), 0); +} + +#[test] +fn backslash_treated_well() { + // Insert a file into an archive with a backslash + let td = t!(TempDir::new("tar-rs")); + let mut ar = Builder::new(Vec::<u8>::new()); + t!(ar.append_dir("foo\\bar", td.path())); + let mut ar = Archive::new(Cursor::new(t!(ar.into_inner()))); + let f = t!(t!(ar.entries()).next().unwrap()); + if cfg!(unix) { + assert_eq!(t!(f.header().path()).to_str(), Some("foo\\bar")); + } else { + assert_eq!(t!(f.header().path()).to_str(), Some("foo/bar")); + } + + // Unpack an archive with a backslash in the name + let mut ar = Builder::new(Vec::<u8>::new()); + let mut header = Header::new_gnu(); + header.set_metadata(&t!(fs::metadata(td.path()))); + header.set_size(0); + for (a, b) in header.as_old_mut().name.iter_mut().zip(b"foo\\bar\x00") { + *a = *b; + } + header.set_cksum(); + t!(ar.append(&header, &mut io::empty())); + let data = t!(ar.into_inner()); + let mut ar = Archive::new(&data[..]); + let f = t!(t!(ar.entries()).next().unwrap()); + assert_eq!(t!(f.header().path()).to_str(), Some("foo\\bar")); + + let mut ar = Archive::new(&data[..]); + t!(ar.unpack(td.path())); + assert!(fs::metadata(td.path().join("foo\\bar")).is_ok()); +} + +#[cfg(unix)] +#[test] +fn nul_bytes_in_path() { + use std::os::unix::prelude::*; + use std::ffi::OsStr; + + let nul_path = OsStr::from_bytes(b"foo\0"); + let td = t!(TempDir::new("tar-rs")); + let mut ar = Builder::new(Vec::<u8>::new()); + let err = ar.append_dir(nul_path, td.path()).unwrap_err(); + assert!(err.to_string().contains("contains a nul byte")); +} + +#[test] +fn links() { + let mut ar = Archive::new(Cursor::new(tar!("link.tar"))); + let mut entries = t!(ar.entries()); + let link = t!(entries.next().unwrap()); + assert_eq!(t!(link.header().link_name()).as_ref().map(|p| &**p), + Some(Path::new("file"))); + let other = t!(entries.next().unwrap()); + assert!(t!(other.header().link_name()).is_none()); +} + +#[test] +#[cfg(unix)] // making symlinks on windows is hard +fn unpack_links() { + let td = t!(TempDir::new("tar-rs")); + let mut ar = Archive::new(Cursor::new(tar!("link.tar"))); + t!(ar.unpack(td.path())); + + let md = t!(fs::symlink_metadata(td.path().join("lnk"))); + assert!(md.file_type().is_symlink()); + assert_eq!(&*t!(fs::read_link(td.path().join("lnk"))), + Path::new("file")); + t!(File::open(td.path().join("lnk"))); +} + +#[test] +fn pax_simple() { + let mut ar = Archive::new(tar!("pax.tar")); + let mut entries = t!(ar.entries()); + + let mut first = t!(entries.next().unwrap()); + let mut attributes = t!(first.pax_extensions()).unwrap(); + let first = t!(attributes.next().unwrap()); + let second = t!(attributes.next().unwrap()); + let third = t!(attributes.next().unwrap()); + assert!(attributes.next().is_none()); + + assert_eq!(first.key(), Ok("mtime")); + assert_eq!(first.value(), Ok("1453146164.953123768")); + assert_eq!(second.key(), Ok("atime")); + assert_eq!(second.value(), Ok("1453251915.24892486")); + assert_eq!(third.key(), Ok("ctime")); + assert_eq!(third.value(), Ok("1453146164.953123768")); +} + +#[test] +fn long_name_trailing_nul() { + let mut b = Builder::new(Vec::<u8>::new()); + + let mut h = Header::new_gnu(); + t!(h.set_path("././@LongLink")); + h.set_size(4); + h.set_entry_type(EntryType::new(b'L')); + h.set_cksum(); + t!(b.append(&h, "foo\0".as_bytes())); + let mut h = Header::new_gnu(); + + t!(h.set_path("bar")); + h.set_size(6); + h.set_entry_type(EntryType::file()); + h.set_cksum(); + t!(b.append(&h, "foobar".as_bytes())); + + let contents = t!(b.into_inner()); + let mut a = Archive::new(&contents[..]); + + let e = t!(t!(a.entries()).next().unwrap()); + assert_eq!(&*e.path_bytes(), b"foo"); +} + +#[test] +fn long_linkname_trailing_nul() { + let mut b = Builder::new(Vec::<u8>::new()); + + let mut h = Header::new_gnu(); + t!(h.set_path("././@LongLink")); + h.set_size(4); + h.set_entry_type(EntryType::new(b'K')); + h.set_cksum(); + t!(b.append(&h, "foo\0".as_bytes())); + let mut h = Header::new_gnu(); + + t!(h.set_path("bar")); + h.set_size(6); + h.set_entry_type(EntryType::file()); + h.set_cksum(); + t!(b.append(&h, "foobar".as_bytes())); + + let contents = t!(b.into_inner()); + let mut a = Archive::new(&contents[..]); + + let e = t!(t!(a.entries()).next().unwrap()); + assert_eq!(&*e.link_name_bytes().unwrap(), b"foo"); +} + +#[test] +fn encoded_long_name_has_trailing_nul() { + let td = t!(TempDir::new("tar-rs")); + let path = td.path().join("foo"); + t!(t!(File::create(&path)).write_all(b"test")); + + let mut b = Builder::new(Vec::<u8>::new()); + let long = repeat("abcd").take(200).collect::<String>(); + + t!(b.append_file(&long, &mut t!(File::open(&path)))); + + let contents = t!(b.into_inner()); + let mut a = Archive::new(&contents[..]); + + let mut e = t!(t!(a.entries()).raw(true).next().unwrap()); + let mut name = Vec::new(); + t!(e.read_to_end(&mut name)); + assert_eq!(name[name.len() - 1], 0); +} diff --git a/deps/tar-0.4.3/tests/archives/directory.tar b/deps/tar-0.4.5/tests/archives/directory.tar similarity index 100% rename from deps/tar-0.4.3/tests/archives/directory.tar rename to deps/tar-0.4.5/tests/archives/directory.tar diff --git a/deps/tar-0.4.3/tests/archives/duplicate_dirs.tar b/deps/tar-0.4.5/tests/archives/duplicate_dirs.tar similarity index 100% rename from deps/tar-0.4.3/tests/archives/duplicate_dirs.tar rename to deps/tar-0.4.5/tests/archives/duplicate_dirs.tar diff --git a/deps/tar-0.4.3/tests/archives/empty_filename.tar b/deps/tar-0.4.5/tests/archives/empty_filename.tar similarity index 100% rename from deps/tar-0.4.3/tests/archives/empty_filename.tar rename to deps/tar-0.4.5/tests/archives/empty_filename.tar diff --git a/deps/tar-0.4.3/tests/archives/file_times.tar b/deps/tar-0.4.5/tests/archives/file_times.tar similarity index 100% rename from deps/tar-0.4.3/tests/archives/file_times.tar rename to deps/tar-0.4.5/tests/archives/file_times.tar diff --git a/deps/tar-0.4.3/tests/archives/link.tar b/deps/tar-0.4.5/tests/archives/link.tar similarity index 100% rename from deps/tar-0.4.3/tests/archives/link.tar rename to deps/tar-0.4.5/tests/archives/link.tar diff --git a/deps/tar-0.4.3/tests/archives/pax.tar b/deps/tar-0.4.5/tests/archives/pax.tar similarity index 100% rename from deps/tar-0.4.3/tests/archives/pax.tar rename to deps/tar-0.4.5/tests/archives/pax.tar diff --git a/deps/tar-0.4.3/tests/archives/reading_files.tar b/deps/tar-0.4.5/tests/archives/reading_files.tar similarity index 100% rename from deps/tar-0.4.3/tests/archives/reading_files.tar rename to deps/tar-0.4.5/tests/archives/reading_files.tar diff --git a/deps/tar-0.4.3/tests/archives/simple.tar b/deps/tar-0.4.5/tests/archives/simple.tar similarity index 100% rename from deps/tar-0.4.3/tests/archives/simple.tar rename to deps/tar-0.4.5/tests/archives/simple.tar diff --git a/deps/tar-0.4.3/tests/archives/spaces.tar b/deps/tar-0.4.5/tests/archives/spaces.tar similarity index 100% rename from deps/tar-0.4.3/tests/archives/spaces.tar rename to deps/tar-0.4.5/tests/archives/spaces.tar diff --git a/deps/tar-0.4.5/tests/header/mod.rs b/deps/tar-0.4.5/tests/header/mod.rs new file mode 100644 index 000000000..93dbd874c --- /dev/null +++ b/deps/tar-0.4.5/tests/header/mod.rs @@ -0,0 +1,149 @@ +use std::iter; +use std::path::Path; + +use tar::Header; + +#[test] +fn default_gnu() { + let mut h = Header::new_gnu(); + assert!(h.as_gnu().is_some()); + assert!(h.as_gnu_mut().is_some()); + assert!(h.as_ustar().is_none()); + assert!(h.as_ustar_mut().is_none()); +} + +#[test] +fn goto_old() { + let mut h = Header::new_old(); + assert!(h.as_gnu().is_none()); + assert!(h.as_gnu_mut().is_none()); + assert!(h.as_ustar().is_none()); + assert!(h.as_ustar_mut().is_none()); +} + +#[test] +fn goto_ustar() { + let mut h = Header::new_ustar(); + assert!(h.as_gnu().is_none()); + assert!(h.as_gnu_mut().is_none()); + assert!(h.as_ustar().is_some()); + assert!(h.as_ustar_mut().is_some()); +} + +#[test] +fn link_name() { + let mut h = Header::new_gnu(); + t!(h.set_link_name("foo")); + assert_eq!(t!(h.link_name()).unwrap().to_str(), Some("foo")); + t!(h.set_link_name("foo/bar")); + assert_eq!(t!(h.link_name()).unwrap().to_str(), Some("foo/bar")); + t!(h.set_link_name("foo\\ba")); + if cfg!(windows) { + assert_eq!(t!(h.link_name()).unwrap().to_str(), Some("foo/ba")); + } else { + assert_eq!(t!(h.link_name()).unwrap().to_str(), Some("foo\\ba")); + } + + let name = "foo\\bar\0"; + for (slot, val) in h.as_old_mut().linkname.iter_mut().zip(name.as_bytes()) { + *slot = *val; + } + assert_eq!(t!(h.link_name()).unwrap().to_str(), Some("foo\\bar")); + + assert!(h.set_link_name("\0").is_err()); +} + +#[test] +fn user_and_group_name() { + let mut h = Header::new_gnu(); + t!(h.set_username("foo")); + t!(h.set_groupname("bar")); + assert_eq!(t!(h.username()), Some("foo")); + assert_eq!(t!(h.groupname()), Some("bar")); + + h = Header::new_ustar(); + t!(h.set_username("foo")); + t!(h.set_groupname("bar")); + assert_eq!(t!(h.username()), Some("foo")); + assert_eq!(t!(h.groupname()), Some("bar")); + + h = Header::new_old(); + assert_eq!(t!(h.username()), None); + assert_eq!(t!(h.groupname()), None); + assert!(h.set_username("foo").is_err()); + assert!(h.set_groupname("foo").is_err()); +} + +#[test] +fn dev_major_minor() { + let mut h = Header::new_gnu(); + t!(h.set_device_major(1)); + t!(h.set_device_minor(2)); + assert_eq!(t!(h.device_major()), Some(1)); + assert_eq!(t!(h.device_minor()), Some(2)); + + h = Header::new_ustar(); + t!(h.set_device_major(1)); + t!(h.set_device_minor(2)); + assert_eq!(t!(h.device_major()), Some(1)); + assert_eq!(t!(h.device_minor()), Some(2)); + + h.as_ustar_mut().unwrap().dev_minor[0] = 0xff; + h.as_ustar_mut().unwrap().dev_major[0] = 0xff; + assert!(h.device_major().is_err()); + assert!(h.device_minor().is_err()); + + h.as_ustar_mut().unwrap().dev_minor[0] = b'g'; + h.as_ustar_mut().unwrap().dev_major[0] = b'h'; + assert!(h.device_major().is_err()); + assert!(h.device_minor().is_err()); + + h = Header::new_old(); + assert_eq!(t!(h.device_major()), None); + assert_eq!(t!(h.device_minor()), None); + assert!(h.set_device_major(1).is_err()); + assert!(h.set_device_minor(1).is_err()); +} + +#[test] +fn set_path() { + let mut h = Header::new_gnu(); + t!(h.set_path("foo")); + assert_eq!(t!(h.path()).to_str(), Some("foo")); + t!(h.set_path("foo/")); + assert_eq!(t!(h.path()).to_str(), Some("foo/")); + t!(h.set_path("foo/bar")); + assert_eq!(t!(h.path()).to_str(), Some("foo/bar")); + t!(h.set_path("foo\\bar")); + if cfg!(windows) { + assert_eq!(t!(h.path()).to_str(), Some("foo/bar")); + } else { + assert_eq!(t!(h.path()).to_str(), Some("foo\\bar")); + } + + let long_name = iter::repeat("foo").take(100).collect::<String>(); + let medium1 = iter::repeat("foo").take(52).collect::<String>(); + let medium2 = iter::repeat("fo/").take(52).collect::<String>(); + + assert!(h.set_path(&long_name).is_err()); + assert!(h.set_path(&medium1).is_err()); + assert!(h.set_path(&medium2).is_err()); + assert!(h.set_path("\0").is_err()); + + h = Header::new_ustar(); + t!(h.set_path("foo")); + assert_eq!(t!(h.path()).to_str(), Some("foo")); + + assert!(h.set_path(&long_name).is_err()); + assert!(h.set_path(&medium1).is_err()); + t!(h.set_path(&medium2)); + assert_eq!(t!(h.path()).to_str(), Some(&medium2[..])); +} + +#[test] +fn set_ustar_path_hard() { + let mut h = Header::new_ustar(); + let p = Path::new("a").join(&vec!["a"; 100].join("")); + t!(h.set_path(&p)); + assert_eq!(t!(h.path()), p); +} diff --git a/deps/time-0.1.34/.gitignore b/deps/time-0.1.34/.gitignore deleted file mode 100644 index 4fffb2f89..000000000 --- a/deps/time-0.1.34/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/target -/Cargo.lock diff --git a/deps/time-0.1.34/.travis.yml b/deps/time-0.1.34/.travis.yml deleted file mode 100644 index cd7ed9cad..000000000 --- a/deps/time-0.1.34/.travis.yml +++ /dev/null @@ -1,30 +0,0 @@ -language: rust -rust: - - 1.0.0 - - beta - - nightly -sudo: false -script: - - cargo build --verbose - - cargo test --verbose - - cargo test --verbose --features rustc-serialize - - | - [ $TRAVIS_RUST_VERSION != nightly ] || cargo bench - - cargo doc -after_success: | - [ $TRAVIS_BRANCH = master ] && - [ $TRAVIS_PULL_REQUEST = false ] && - [ $TRAVIS_RUST_VERSION = nightly ] && - echo '<meta http-equiv=refresh content=0;url=time/index.html>' > target/doc/index.html && - pip install ghp-import --user $USER && - $HOME/.local/bin/ghp-import -n target/doc && - git push -qf https://${TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages -env: - global: - secure: qxCB/4AUtX5cQPDfmAccpxRkxkdoZtkjiYW5tbaThzFEJJ1SpkIJzS+IdhCPxDGhwF+aiLLky9KDZi1bXbtjkDS8n/bFaGc/k2vRNgLKuaLdztZ1dGHlBNN2J7j0bLGUm0MAy62OHLNXbPmvS0uGvv0q4pQ6sQB2+YItwqHPuyQ= -notifications: - email: - on_success: never -os: - - linux - - osx diff --git a/deps/time-0.1.34/Cargo.toml b/deps/time-0.1.34/Cargo.toml deleted file mode 100644 index a942f78b3..000000000 --- a/deps/time-0.1.34/Cargo.toml +++ /dev/null @@ -1,22 +0,0 @@ -[package] - -name = "time" -version = "0.1.34" -authors = ["The Rust Project Developers"] -license = "MIT/Apache-2.0" -homepage = "https://github.com/rust-lang/time" -repository = "https://github.com/rust-lang/time" -documentation = "https://doc.rust-lang.org/time" -description = """ -Utilities for working with time-related functions in Rust. -""" - -[dependencies] -libc = "0.2.1" -winapi = "0.2.0" -kernel32-sys = "0.2.0" -rustc-serialize = { version = "0.3", optional = true } - -[dev-dependencies] -log = "0.3" -advapi32-sys = "0.1.2" diff --git a/deps/time-0.1.34/LICENSE-MIT b/deps/time-0.1.34/LICENSE-MIT deleted file mode 100644 index 39d4bdb5a..000000000 --- a/deps/time-0.1.34/LICENSE-MIT +++ /dev/null @@ -1,25 +0,0 @@ -Copyright (c) 2014 The Rust Project Developers - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. diff --git a/deps/time-0.1.34/README.md b/deps/time-0.1.34/README.md deleted file mode 100644 index ad7fdb87e..000000000 --- a/deps/time-0.1.34/README.md +++ /dev/null @@ -1,24 +0,0 @@ -time -==== - -Utilities for working with time-related functions in Rust - -[![Build Status](https://travis-ci.org/rust-lang-deprecated/time.svg?branch=master)](https://travis-ci.org/rust-lang-deprecated/time) -[![Build status](https://ci.appveyor.com/api/projects/status/55m7rbaj9a5v3ad7?svg=true)](https://ci.appveyor.com/project/alexcrichton/time) - -[Documentation](https://doc.rust-lang.org/time) - -## Usage - -Put this in your `Cargo.toml`: - -```toml -[dependencies] -time = "0.1" -``` - -And this in your crate root: - -```rust -extern crate time; -``` diff --git a/deps/time-0.1.34/appveyor.yml b/deps/time-0.1.34/appveyor.yml deleted file mode 100644 index 6a1b8dc19..000000000 --- a/deps/time-0.1.34/appveyor.yml +++ /dev/null @@ -1,17 +0,0 @@ -environment: - matrix: - - TARGET: x86_64-pc-windows-msvc - - TARGET: i686-pc-windows-msvc - - TARGET: i686-pc-windows-gnu -install: - - ps: Start-FileDownload "https://static.rust-lang.org/dist/rust-nightly-${env:TARGET}.exe" - - rust-nightly-%TARGET%.exe /VERYSILENT /NORESTART /DIR="C:\Program Files (x86)\Rust" - - SET PATH=%PATH%;C:\Program Files (x86)\Rust\bin - - SET PATH=%PATH%;C:\MinGW\bin - - rustc -V - - cargo -V - -build: false - -test_script: - - cargo test --verbose diff --git a/deps/time-0.1.34/benches/precise_time_ns.rs b/deps/time-0.1.34/benches/precise_time_ns.rs deleted file mode 100644 index d9170ea26..000000000 --- a/deps/time-0.1.34/benches/precise_time_ns.rs +++ /dev/null @@ -1,11 +0,0 @@ -#![feature(test)] - -extern crate test; -extern crate time; - -use test::Bencher; - -#[bench] -fn bench_precise_time_ns(b: &mut Bencher) { - b.iter(|| time::precise_time_ns()) -} diff --git a/deps/time-0.1.34/src/display.rs b/deps/time-0.1.34/src/display.rs deleted file mode 100644 index 6c74afa10..000000000 --- a/deps/time-0.1.34/src/display.rs +++ /dev/null @@ -1,260 +0,0 @@ -use std::fmt::{self, Display}; - -use super::{TmFmt, Tm, Fmt}; - -impl<'a> fmt::Display for TmFmt<'a> { - fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { - match self.format { - Fmt::Str(ref s) => { - let mut chars = s.chars(); - while let Some(ch) = chars.next() { - if ch == '%' { - // we've already validated that % always precedes - // another char - try!(parse_type(fmt, chars.next().unwrap(), self.tm)); - } else { - try!(write!(fmt, "{}", ch)); - } - } - - Ok(()) - } - Fmt::Ctime => self.tm.to_local().asctime().fmt(fmt), - Fmt::Rfc3339 => { - if self.tm.tm_utcoff == 0 { - TmFmt { - tm: self.tm, - format: Fmt::Str("%Y-%m-%dT%H:%M:%SZ"), - }.fmt(fmt) - } else { - let s = TmFmt { - tm: self.tm, - format: Fmt::Str("%Y-%m-%dT%H:%M:%S"), - }; - let sign = if self.tm.tm_utcoff > 0 { '+' } else { '-' }; - let mut m = abs(self.tm.tm_utcoff) / 60; - let h = m / 60; - m -= h * 60; - write!(fmt, "{}{}{:02}:{:02}", s, sign, h, m) - } - } - } - } -} - -fn is_leap_year(year: i32) -> bool { - (year % 4 == 0) && ((year % 100 != 0) || (year % 400 == 0)) -} - -fn days_in_year(year: i32) -> i32 { - if is_leap_year(year) { 366 } - else { 365 } -} - -fn iso_week_days(yday: i32, wday: i32) -> i32 { - /* The number of days from the first day of the first ISO week of this - * year to the year day YDAY with week day WDAY. - * ISO weeks start on Monday. The first ISO week has the year's first - * Thursday. - * YDAY may be as small as yday_minimum. - */ - let iso_week_start_wday: i32 = 1; /* Monday */ - let iso_week1_wday: i32 = 4; /* Thursday */ - let yday_minimum: i32 = 366; - /* Add enough to the first operand of % to make it nonnegative. */ - let big_enough_multiple_of_7: i32 = (yday_minimum / 7 + 2) * 7; - - yday - (yday - wday + iso_week1_wday + big_enough_multiple_of_7) % 7 - + iso_week1_wday - iso_week_start_wday -} - -fn iso_week(fmt: &mut fmt::Formatter, ch:char, tm: &Tm) -> fmt::Result { - let mut year = tm.tm_year + 1900; - let mut days = iso_week_days(tm.tm_yday, tm.tm_wday); - - if days < 0 { - /* This ISO week belongs to the previous year. */ - year -= 1; - days = iso_week_days(tm.tm_yday + (days_in_year(year)), tm.tm_wday); - } else { - let d = iso_week_days(tm.tm_yday - (days_in_year(year)), - tm.tm_wday); - if 0 <= d { - /* This ISO week belongs to the next year. */ - year += 1; - days = d; - } - } - - match ch { - 'G' => write!(fmt, "{}", year), - 'g' => write!(fmt, "{:02}", (year % 100 + 100) % 100), - 'V' => write!(fmt, "{:02}", days / 7 + 1), - _ => Ok(()) - } -} - -fn parse_type(fmt: &mut fmt::Formatter, ch: char, tm: &Tm) -> fmt::Result { - match ch { - 'A' => write!(fmt, "{}", match tm.tm_wday { - 0 => "Sunday", - 1 => "Monday", - 2 => "Tuesday", - 3 => "Wednesday", - 4 => "Thursday", - 5 => "Friday", - 6 => "Saturday", - _ => unreachable!(), - }), - 'a' => write!(fmt, "{}", match tm.tm_wday { - 0 => "Sun", - 1 => "Mon", - 2 => "Tue", - 3 => "Wed", - 4 => "Thu", - 5 => "Fri", - 6 => "Sat", - _ => unreachable!(), - }), - 'B' => write!(fmt, "{}", match tm.tm_mon { - 0 => "January", - 1 => "February", - 2 => "March", - 3 => "April", - 4 => "May", - 5 => "June", - 6 => "July", - 7 => "August", - 8 => "September", - 9 => "October", - 10 => "November", - 11 => "December", - _ => unreachable!(), - }), - 'b' | 'h' => write!(fmt, "{}", match tm.tm_mon { - 0 => "Jan", - 1 => "Feb", - 2 => "Mar", - 3 => "Apr", - 4 => "May", - 5 => "Jun", - 6 => "Jul", - 7 => "Aug", - 8 => "Sep", - 9 => "Oct", - 10 => "Nov", - 11 => "Dec", - _ => unreachable!(), - }), - 'C' => write!(fmt, "{:02}", (tm.tm_year + 1900) / 100), - 'c' => { - try!(parse_type(fmt, 'a', tm)); - try!(write!(fmt, " ")); - try!(parse_type(fmt, 'b', tm)); - try!(write!(fmt, " ")); - try!(parse_type(fmt, 'e', tm)); - try!(write!(fmt, " ")); - try!(parse_type(fmt, 'T', tm)); - try!(write!(fmt, " ")); - parse_type(fmt, 'Y', tm) - } - 'D' | 'x' => { - try!(parse_type(fmt, 'm', tm)); - try!(write!(fmt, "/")); - try!(parse_type(fmt, 'd', tm)); - try!(write!(fmt, "/")); - parse_type(fmt, 'y', tm) - } - 'd' => write!(fmt, "{:02}", tm.tm_mday), - 'e' => write!(fmt, "{:2}", tm.tm_mday), - 'f' => write!(fmt, "{:09}", tm.tm_nsec), - 'F' => { - try!(parse_type(fmt, 'Y', tm)); - try!(write!(fmt, "-")); - try!(parse_type(fmt, 'm', tm)); - try!(write!(fmt, "-")); - parse_type(fmt, 'd', tm) - } - 'G' => iso_week(fmt, 'G', tm), - 'g' => iso_week(fmt, 'g', tm), - 'H' => write!(fmt, "{:02}", tm.tm_hour), - 'I' => { - let mut h = tm.tm_hour; - if h == 0 { h = 12 } - if h > 12 { h -= 12 } - write!(fmt, "{:02}", h) - } - 'j' => write!(fmt, "{:03}", tm.tm_yday + 1), - 'k' => write!(fmt, "{:2}", tm.tm_hour), - 'l' => { - let mut h = tm.tm_hour; - if h == 0 { h = 12 } - if h > 12 { h -= 12 } - write!(fmt, "{:2}", h) - } - 'M' => write!(fmt, "{:02}", tm.tm_min), - 'm' => write!(fmt, "{:02}", tm.tm_mon + 1), - 'n' => write!(fmt, "\n"), - 'P' => write!(fmt, "{}", if tm.tm_hour < 12 { "am" } else { "pm" }), - 'p' => write!(fmt, "{}", if (tm.tm_hour) < 12 { "AM" } else { "PM" }), - 'R' => { - try!(parse_type(fmt, 'H', tm)); - try!(write!(fmt, ":")); - parse_type(fmt, 'M', tm) - } - 'r' => { - try!(parse_type(fmt, 'I', tm)); - try!(write!(fmt, ":")); - try!(parse_type(fmt, 'M', tm)); - try!(write!(fmt, ":")); - try!(parse_type(fmt, 'S', tm)); - try!(write!(fmt, " ")); - parse_type(fmt, 'p', tm) - } - 'S' => write!(fmt, "{:02}", tm.tm_sec), - 's' => write!(fmt, "{}", tm.to_timespec().sec), - 'T' | 'X' => { - try!(parse_type(fmt, 'H', tm)); - try!(write!(fmt, ":")); - try!(parse_type(fmt, 'M', tm)); - try!(write!(fmt, ":")); - parse_type(fmt, 'S', tm) - } - 't' => write!(fmt, "\t"), - 'U' => write!(fmt, "{:02}", (tm.tm_yday - tm.tm_wday + 7) / 7), - 'u' => { - let i = tm.tm_wday; - write!(fmt, "{}", (if i == 0 { 7 } else { i })) - } - 'V' => iso_week(fmt, 'V', tm), - 'v' => { - try!(parse_type(fmt, 'e', tm)); - try!(write!(fmt, "-")); - try!(parse_type(fmt, 'b', tm)); - try!(write!(fmt, "-")); - parse_type(fmt, 'Y', tm) - } - 'W' => { - write!(fmt, "{:02}", (tm.tm_yday - (tm.tm_wday - 1 + 7) % 7 + 7) / 7) - } - 'w' => write!(fmt, "{}", tm.tm_wday), - 'Y' => write!(fmt, "{}", tm.tm_year + 1900), - 'y' => write!(fmt, "{:02}", (tm.tm_year + 1900) % 100), - // FIXME (#2350): support locale - 'Z' => write!(fmt, "{}", if tm.tm_utcoff == 0 { "UTC"} else { "" }), - 'z' => { - let sign = if tm.tm_utcoff > 0 { '+' } else { '-' }; - let mut m = abs(tm.tm_utcoff) / 60; - let h = m / 60; - m -= h * 60; - write!(fmt, "{}{:02}{:02}", sign, h, m) - } - '+' => write!(fmt, "{}", tm.rfc3339()), - '%' => write!(fmt, "{}", "%"), - _ => unreachable!(), - } -} - -fn abs(i: i32) -> i32 { - if i < 0 {-i} else {i} -} diff --git a/deps/time-0.1.34/src/duration.rs b/deps/time-0.1.34/src/duration.rs deleted file mode 100644 index ebfaf4385..000000000 --- a/deps/time-0.1.34/src/duration.rs +++ /dev/null @@ -1,560 +0,0 @@ -// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -//! Temporal quantification - -use std::{fmt, i64}; -use std::ops::{Add, Sub, Mul, Div, Neg, FnOnce}; - -/// The number of nanoseconds in a microsecond. -const NANOS_PER_MICRO: i32 = 1000; -/// The number of nanoseconds in a millisecond. -const NANOS_PER_MILLI: i32 = 1000_000; -/// The number of nanoseconds in seconds. -const NANOS_PER_SEC: i32 = 1_000_000_000; -/// The number of microseconds per second. -const MICROS_PER_SEC: i64 = 1000_000; -/// The number of milliseconds per second. -const MILLIS_PER_SEC: i64 = 1000; -/// The number of seconds in a minute. -const SECS_PER_MINUTE: i64 = 60; -/// The number of seconds in an hour. -const SECS_PER_HOUR: i64 = 3600; -/// The number of (non-leap) seconds in days. -const SECS_PER_DAY: i64 = 86400; -/// The number of (non-leap) seconds in a week. -const SECS_PER_WEEK: i64 = 604800; - -macro_rules! try_opt { - ($e:expr) => (match $e { Some(v) => v, None => return None }) -} - - -/// ISO 8601 time duration with nanosecond precision. -/// This also allows for the negative duration; see individual methods for details. -#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Debug)] -pub struct Duration { - secs: i64, - nanos: i32, // Always 0 <= nanos < NANOS_PER_SEC -} - -/// The minimum possible `Duration`: `i64::MIN` milliseconds. -pub const MIN: Duration = Duration { - secs: i64::MIN / MILLIS_PER_SEC - 1, - nanos: NANOS_PER_SEC + (i64::MIN % MILLIS_PER_SEC) as i32 * NANOS_PER_MILLI -}; - -/// The maximum possible `Duration`: `i64::MAX` milliseconds. -pub const MAX: Duration = Duration { - secs: i64::MAX / MILLIS_PER_SEC, - nanos: (i64::MAX % MILLIS_PER_SEC) as i32 * NANOS_PER_MILLI -}; - -impl Duration { - /// Makes a new `Duration` with given number of weeks. - /// Equivalent to `Duration::seconds(weeks * 7 * 24 * 60 * 60)` with overflow checks. - /// Panics when the duration is out of bounds. - #[inline] - pub fn weeks(weeks: i64) -> Duration { - let secs = weeks.checked_mul(SECS_PER_WEEK).expect("Duration::weeks out of bounds"); - Duration::seconds(secs) - } - - /// Makes a new `Duration` with given number of days. - /// Equivalent to `Duration::seconds(days * 24 * 60 * 60)` with overflow checks. - /// Panics when the duration is out of bounds. - #[inline] - pub fn days(days: i64) -> Duration { - let secs = days.checked_mul(SECS_PER_DAY).expect("Duration::days out of bounds"); - Duration::seconds(secs) - } - - /// Makes a new `Duration` with given number of hours. - /// Equivalent to `Duration::seconds(hours * 60 * 60)` with overflow checks. - /// Panics when the duration is out of bounds. - #[inline] - pub fn hours(hours: i64) -> Duration { - let secs = hours.checked_mul(SECS_PER_HOUR).expect("Duration::hours ouf of bounds"); - Duration::seconds(secs) - } - - /// Makes a new `Duration` with given number of minutes. - /// Equivalent to `Duration::seconds(minutes * 60)` with overflow checks. - /// Panics when the duration is out of bounds. - #[inline] - pub fn minutes(minutes: i64) -> Duration { - let secs = minutes.checked_mul(SECS_PER_MINUTE).expect("Duration::minutes out of bounds"); - Duration::seconds(secs) - } - - /// Makes a new `Duration` with given number of seconds. - /// Panics when the duration is more than `i64::MAX` milliseconds - /// or less than `i64::MIN` milliseconds. - #[inline] - pub fn seconds(seconds: i64) -> Duration { - let d = Duration { secs: seconds, nanos: 0 }; - if d < MIN || d > MAX { - panic!("Duration::seconds out of bounds"); - } - d - } - - /// Makes a new `Duration` with given number of milliseconds. - #[inline] - pub fn milliseconds(milliseconds: i64) -> Duration { - let (secs, millis) = div_mod_floor_64(milliseconds, MILLIS_PER_SEC); - let nanos = millis as i32 * NANOS_PER_MILLI; - Duration { secs: secs, nanos: nanos } - } - - /// Makes a new `Duration` with given number of microseconds. - #[inline] - pub fn microseconds(microseconds: i64) -> Duration { - let (secs, micros) = div_mod_floor_64(microseconds, MICROS_PER_SEC); - let nanos = micros as i32 * NANOS_PER_MICRO; - Duration { secs: secs, nanos: nanos } - } - - /// Makes a new `Duration` with given number of nanoseconds. - #[inline] - pub fn nanoseconds(nanos: i64) -> Duration { - let (secs, nanos) = div_mod_floor_64(nanos, NANOS_PER_SEC as i64); - Duration { secs: secs, nanos: nanos as i32 } - } - - /// Runs a closure, returning the duration of time it took to run the - /// closure. - pub fn span<F>(f: F) -> Duration where F: FnOnce() { - let before = super::precise_time_ns(); - f(); - Duration::nanoseconds((super::precise_time_ns() - before) as i64) - } - - /// Returns the total number of whole weeks in the duration. - #[inline] - pub fn num_weeks(&self) -> i64 { - self.num_days() / 7 - } - - /// Returns the total number of whole days in the duration. - pub fn num_days(&self) -> i64 { - self.num_seconds() / SECS_PER_DAY - } - - /// Returns the total number of whole hours in the duration. - #[inline] - pub fn num_hours(&self) -> i64 { - self.num_seconds() / SECS_PER_HOUR - } - - /// Returns the total number of whole minutes in the duration. - #[inline] - pub fn num_minutes(&self) -> i64 { - self.num_seconds() / SECS_PER_MINUTE - } - - /// Returns the total number of whole seconds in the duration. - pub fn num_seconds(&self) -> i64 { - // If secs is negative, nanos should be subtracted from the duration. - if self.secs < 0 && self.nanos > 0 { - self.secs + 1 - } else { - self.secs - } - } - - /// Returns the number of nanoseconds such that - /// `nanos_mod_sec() + num_seconds() * NANOS_PER_SEC` is the total number of - /// nanoseconds in the duration. - fn nanos_mod_sec(&self) -> i32 { - if self.secs < 0 && self.nanos > 0 { - self.nanos - NANOS_PER_SEC - } else { - self.nanos - } - } - - /// Returns the total number of whole milliseconds in the duration, - pub fn num_milliseconds(&self) -> i64 { - // A proper Duration will not overflow, because MIN and MAX are defined - // such that the range is exactly i64 milliseconds. - let secs_part = self.num_seconds() * MILLIS_PER_SEC; - let nanos_part = self.nanos_mod_sec() / NANOS_PER_MILLI; - secs_part + nanos_part as i64 - } - - /// Returns the total number of whole microseconds in the duration, - /// or `None` on overflow (exceeding 2^63 microseconds in either direction). - pub fn num_microseconds(&self) -> Option<i64> { - let secs_part = try_opt!(self.num_seconds().checked_mul(MICROS_PER_SEC)); - let nanos_part = self.nanos_mod_sec() / NANOS_PER_MICRO; - secs_part.checked_add(nanos_part as i64) - } - - /// Returns the total number of whole nanoseconds in the duration, - /// or `None` on overflow (exceeding 2^63 nanoseconds in either direction). - pub fn num_nanoseconds(&self) -> Option<i64> { - let secs_part = try_opt!(self.num_seconds().checked_mul(NANOS_PER_SEC as i64)); - let nanos_part = self.nanos_mod_sec(); - secs_part.checked_add(nanos_part as i64) - } - - /// Add two durations, returning `None` if overflow occurred. - pub fn checked_add(&self, rhs: &Duration) -> Option<Duration> { - let mut secs = try_opt!(self.secs.checked_add(rhs.secs)); - let mut nanos = self.nanos + rhs.nanos; - if nanos >= NANOS_PER_SEC { - nanos -= NANOS_PER_SEC; - secs = try_opt!(secs.checked_add(1)); - } - let d = Duration { secs: secs, nanos: nanos }; - // Even if d is within the bounds of i64 seconds, - // it might still overflow i64 milliseconds. - if d < MIN || d > MAX { None } else { Some(d) } - } - - /// Subtract two durations, returning `None` if overflow occurred. - pub fn checked_sub(&self, rhs: &Duration) -> Option<Duration> { - let mut secs = try_opt!(self.secs.checked_sub(rhs.secs)); - let mut nanos = self.nanos - rhs.nanos; - if nanos < 0 { - nanos += NANOS_PER_SEC; - secs = try_opt!(secs.checked_sub(1)); - } - let d = Duration { secs: secs, nanos: nanos }; - // Even if d is within the bounds of i64 seconds, - // it might still overflow i64 milliseconds. - if d < MIN || d > MAX { None } else { Some(d) } - } - - /// The minimum possible `Duration`: `i64::MIN` milliseconds. - #[inline] - pub fn min_value() -> Duration { MIN } - - /// The maximum possible `Duration`: `i64::MAX` milliseconds. - #[inline] - pub fn max_value() -> Duration { MAX } - - /// A duration where the stored seconds and nanoseconds are equal to zero. - #[inline] - pub fn zero() -> Duration { - Duration { secs: 0, nanos: 0 } - } - - /// Returns `true` if the duration equals `Duration::zero()`. - #[inline] - pub fn is_zero(&self) -> bool { - self.secs == 0 && self.nanos == 0 - } -} - -impl Neg for Duration { - type Output = Duration; - - #[inline] - fn neg(self) -> Duration { - if self.nanos == 0 { - Duration { secs: -self.secs, nanos: 0 } - } else { - Duration { secs: -self.secs - 1, nanos: NANOS_PER_SEC - self.nanos } - } - } -} - -impl Add for Duration { - type Output = Duration; - - fn add(self, rhs: Duration) -> Duration { - let mut secs = self.secs + rhs.secs; - let mut nanos = self.nanos + rhs.nanos; - if nanos >= NANOS_PER_SEC { - nanos -= NANOS_PER_SEC; - secs += 1; - } - Duration { secs: secs, nanos: nanos } - } -} - -impl Sub for Duration { - type Output = Duration; - - fn sub(self, rhs: Duration) -> Duration { - let mut secs = self.secs - rhs.secs; - let mut nanos = self.nanos - rhs.nanos; - if nanos < 0 { - nanos += NANOS_PER_SEC; - secs -= 1; - } - Duration { secs: secs, nanos: nanos } - } -} - -impl Mul<i32> for Duration { - type Output = Duration; - - fn mul(self, rhs: i32) -> Duration { - // Multiply nanoseconds as i64, because it cannot overflow that way. - let total_nanos = self.nanos as i64 * rhs as i64; - let (extra_secs, nanos) = div_mod_floor_64(total_nanos, NANOS_PER_SEC as i64); - let secs = self.secs * rhs as i64 + extra_secs; - Duration { secs: secs, nanos: nanos as i32 } - } -} - -impl Div<i32> for Duration { - type Output = Duration; - - fn div(self, rhs: i32) -> Duration { - let mut secs = self.secs / rhs as i64; - let carry = self.secs - secs * rhs as i64; - let extra_nanos = carry * NANOS_PER_SEC as i64 / rhs as i64; - let mut nanos = self.nanos / rhs + extra_nanos as i32; - if nanos >= NANOS_PER_SEC { - nanos -= NANOS_PER_SEC; - secs += 1; - } - if nanos < 0 { - nanos += NANOS_PER_SEC; - secs -= 1; - } - Duration { secs: secs, nanos: nanos } - } -} - -impl fmt::Display for Duration { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - // technically speaking, negative duration is not valid ISO 8601, - // but we need to print it anyway. - let (abs, sign) = if self.secs < 0 { (-*self, "-") } else { (*self, "") }; - - let days = abs.secs / SECS_PER_DAY; - let secs = abs.secs - days * SECS_PER_DAY; - let hasdate = days != 0; - let hastime = (secs != 0 || abs.nanos != 0) || !hasdate; - - try!(write!(f, "{}P", sign)); - - if hasdate { - try!(write!(f, "{}D", days)); - } - if hastime { - if abs.nanos == 0 { - try!(write!(f, "T{}S", secs)); - } else if abs.nanos % NANOS_PER_MILLI == 0 { - try!(write!(f, "T{}.{:03}S", secs, abs.nanos / NANOS_PER_MILLI)); - } else if abs.nanos % NANOS_PER_MICRO == 0 { - try!(write!(f, "T{}.{:06}S", secs, abs.nanos / NANOS_PER_MICRO)); - } else { - try!(write!(f, "T{}.{:09}S", secs, abs.nanos)); - } - } - Ok(()) - } -} - -// Copied from libnum -#[inline] -fn div_mod_floor_64(this: i64, other: i64) -> (i64, i64) { - (div_floor_64(this, other), mod_floor_64(this, other)) -} - -#[inline] -fn div_floor_64(this: i64, other: i64) -> i64 { - match div_rem_64(this, other) { - (d, r) if (r > 0 && other < 0) - || (r < 0 && other > 0) => d - 1, - (d, _) => d, - } -} - -#[inline] -fn mod_floor_64(this: i64, other: i64) -> i64 { - match this % other { - r if (r > 0 && other < 0) - || (r < 0 && other > 0) => r + other, - r => r, - } -} - -#[inline] -fn div_rem_64(this: i64, other: i64) -> (i64, i64) { - (this / other, this % other) -} - -#[cfg(test)] -mod tests { - use super::{Duration, MIN, MAX}; - use std::{i32, i64}; - - #[test] - fn test_duration() { - assert!(Duration::seconds(1) != Duration::zero()); - assert_eq!(Duration::seconds(1) + Duration::seconds(2), Duration::seconds(3)); - assert_eq!(Duration::seconds(86399) + Duration::seconds(4), - Duration::days(1) + Duration::seconds(3)); - assert_eq!(Duration::days(10) - Duration::seconds(1000), Duration::seconds(863000)); - assert_eq!(Duration::days(10) - Duration::seconds(1000000), Duration::seconds(-136000)); - assert_eq!(Duration::days(2) + Duration::seconds(86399) + - Duration::nanoseconds(1234567890), - Duration::days(3) + Duration::nanoseconds(234567890)); - assert_eq!(-Duration::days(3), Duration::days(-3)); - assert_eq!(-(Duration::days(3) + Duration::seconds(70)), - Duration::days(-4) + Duration::seconds(86400-70)); - } - - #[test] - fn test_duration_num_days() { - assert_eq!(Duration::zero().num_days(), 0); - assert_eq!(Duration::days(1).num_days(), 1); - assert_eq!(Duration::days(-1).num_days(), -1); - assert_eq!(Duration::seconds(86399).num_days(), 0); - assert_eq!(Duration::seconds(86401).num_days(), 1); - assert_eq!(Duration::seconds(-86399).num_days(), 0); - assert_eq!(Duration::seconds(-86401).num_days(), -1); - assert_eq!(Duration::days(i32::MAX as i64).num_days(), i32::MAX as i64); - assert_eq!(Duration::days(i32::MIN as i64).num_days(), i32::MIN as i64); - } - - #[test] - fn test_duration_num_seconds() { - assert_eq!(Duration::zero().num_seconds(), 0); - assert_eq!(Duration::seconds(1).num_seconds(), 1); - assert_eq!(Duration::seconds(-1).num_seconds(), -1); - assert_eq!(Duration::milliseconds(999).num_seconds(), 0); - assert_eq!(Duration::milliseconds(1001).num_seconds(), 1); - assert_eq!(Duration::milliseconds(-999).num_seconds(), 0); - assert_eq!(Duration::milliseconds(-1001).num_seconds(), -1); - } - - #[test] - fn test_duration_num_milliseconds() { - assert_eq!(Duration::zero().num_milliseconds(), 0); - assert_eq!(Duration::milliseconds(1).num_milliseconds(), 1); - assert_eq!(Duration::milliseconds(-1).num_milliseconds(), -1); - assert_eq!(Duration::microseconds(999).num_milliseconds(), 0); - assert_eq!(Duration::microseconds(1001).num_milliseconds(), 1); - assert_eq!(Duration::microseconds(-999).num_milliseconds(), 0); - assert_eq!(Duration::microseconds(-1001).num_milliseconds(), -1); - assert_eq!(Duration::milliseconds(i64::MAX).num_milliseconds(), i64::MAX); - assert_eq!(Duration::milliseconds(i64::MIN).num_milliseconds(), i64::MIN); - assert_eq!(MAX.num_milliseconds(), i64::MAX); - assert_eq!(MIN.num_milliseconds(), i64::MIN); - } - - #[test] - fn test_duration_num_microseconds() { - assert_eq!(Duration::zero().num_microseconds(), Some(0)); - assert_eq!(Duration::microseconds(1).num_microseconds(), Some(1)); - assert_eq!(Duration::microseconds(-1).num_microseconds(), Some(-1)); - assert_eq!(Duration::nanoseconds(999).num_microseconds(), Some(0)); - assert_eq!(Duration::nanoseconds(1001).num_microseconds(), Some(1)); - assert_eq!(Duration::nanoseconds(-999).num_microseconds(), Some(0)); - assert_eq!(Duration::nanoseconds(-1001).num_microseconds(), Some(-1)); - assert_eq!(Duration::microseconds(i64::MAX).num_microseconds(), Some(i64::MAX)); - assert_eq!(Duration::microseconds(i64::MIN).num_microseconds(), Some(i64::MIN)); - assert_eq!(MAX.num_microseconds(), None); - assert_eq!(MIN.num_microseconds(), None); - - // overflow checks - const MICROS_PER_DAY: i64 = 86400_000_000; - assert_eq!(Duration::days(i64::MAX / MICROS_PER_DAY).num_microseconds(), - Some(i64::MAX / MICROS_PER_DAY * MICROS_PER_DAY)); - assert_eq!(Duration::days(i64::MIN / MICROS_PER_DAY).num_microseconds(), - Some(i64::MIN / MICROS_PER_DAY * MICROS_PER_DAY)); - assert_eq!(Duration::days(i64::MAX / MICROS_PER_DAY + 1).num_microseconds(), None); - assert_eq!(Duration::days(i64::MIN / MICROS_PER_DAY - 1).num_microseconds(), None); - } - - #[test] - fn test_duration_num_nanoseconds() { - assert_eq!(Duration::zero().num_nanoseconds(), Some(0)); - assert_eq!(Duration::nanoseconds(1).num_nanoseconds(), Some(1)); - assert_eq!(Duration::nanoseconds(-1).num_nanoseconds(), Some(-1)); - assert_eq!(Duration::nanoseconds(i64::MAX).num_nanoseconds(), Some(i64::MAX)); - assert_eq!(Duration::nanoseconds(i64::MIN).num_nanoseconds(), Some(i64::MIN)); - assert_eq!(MAX.num_nanoseconds(), None); - assert_eq!(MIN.num_nanoseconds(), None); - - // overflow checks - const NANOS_PER_DAY: i64 = 86400_000_000_000; - assert_eq!(Duration::days(i64::MAX / NANOS_PER_DAY).num_nanoseconds(), - Some(i64::MAX / NANOS_PER_DAY * NANOS_PER_DAY)); - assert_eq!(Duration::days(i64::MIN / NANOS_PER_DAY).num_nanoseconds(), - Some(i64::MIN / NANOS_PER_DAY * NANOS_PER_DAY)); - assert_eq!(Duration::days(i64::MAX / NANOS_PER_DAY + 1).num_nanoseconds(), None); - assert_eq!(Duration::days(i64::MIN / NANOS_PER_DAY - 1).num_nanoseconds(), None); - } - - #[test] - fn test_duration_checked_ops() { - assert_eq!(Duration::milliseconds(i64::MAX - 1).checked_add(&Duration::microseconds(999)), - Some(Duration::milliseconds(i64::MAX - 2) + Duration::microseconds(1999))); - assert!(Duration::milliseconds(i64::MAX).checked_add(&Duration::microseconds(1000)) - .is_none()); - - assert_eq!(Duration::milliseconds(i64::MIN).checked_sub(&Duration::milliseconds(0)), - Some(Duration::milliseconds(i64::MIN))); - assert!(Duration::milliseconds(i64::MIN).checked_sub(&Duration::milliseconds(1)) - .is_none()); - } - - #[test] - fn test_duration_mul() { - assert_eq!(Duration::zero() * i32::MAX, Duration::zero()); - assert_eq!(Duration::zero() * i32::MIN, Duration::zero()); - assert_eq!(Duration::nanoseconds(1) * 0, Duration::zero()); - assert_eq!(Duration::nanoseconds(1) * 1, Duration::nanoseconds(1)); - assert_eq!(Duration::nanoseconds(1) * 1_000_000_000, Duration::seconds(1)); - assert_eq!(Duration::nanoseconds(1) * -1_000_000_000, -Duration::seconds(1)); - assert_eq!(-Duration::nanoseconds(1) * 1_000_000_000, -Duration::seconds(1)); - assert_eq!(Duration::nanoseconds(30) * 333_333_333, - Duration::seconds(10) - Duration::nanoseconds(10)); - assert_eq!((Duration::nanoseconds(1) + Duration::seconds(1) + Duration::days(1)) * 3, - Duration::nanoseconds(3) + Duration::seconds(3) + Duration::days(3)); - assert_eq!(Duration::milliseconds(1500) * -2, Duration::seconds(-3)); - assert_eq!(Duration::milliseconds(-1500) * 2, Duration::seconds(-3)); - } - - #[test] - fn test_duration_div() { - assert_eq!(Duration::zero() / i32::MAX, Duration::zero()); - assert_eq!(Duration::zero() / i32::MIN, Duration::zero()); - assert_eq!(Duration::nanoseconds(123_456_789) / 1, Duration::nanoseconds(123_456_789)); - assert_eq!(Duration::nanoseconds(123_456_789) / -1, -Duration::nanoseconds(123_456_789)); - assert_eq!(-Duration::nanoseconds(123_456_789) / -1, Duration::nanoseconds(123_456_789)); - assert_eq!(-Duration::nanoseconds(123_456_789) / 1, -Duration::nanoseconds(123_456_789)); - assert_eq!(Duration::seconds(1) / 3, Duration::nanoseconds(333_333_333)); - assert_eq!(Duration::seconds(4) / 3, Duration::nanoseconds(1_333_333_333)); - assert_eq!(Duration::seconds(-1) / 2, Duration::milliseconds(-500)); - assert_eq!(Duration::seconds(1) / -2, Duration::milliseconds(-500)); - assert_eq!(Duration::seconds(-1) / -2, Duration::milliseconds(500)); - assert_eq!(Duration::seconds(-4) / 3, Duration::nanoseconds(-1_333_333_333)); - assert_eq!(Duration::seconds(-4) / -3, Duration::nanoseconds(1_333_333_333)); - } - - #[test] - fn test_duration_fmt() { - assert_eq!(Duration::zero().to_string(), "PT0S"); - assert_eq!(Duration::days(42).to_string(), "P42D"); - assert_eq!(Duration::days(-42).to_string(), "-P42D"); - assert_eq!(Duration::seconds(42).to_string(), "PT42S"); - assert_eq!(Duration::milliseconds(42).to_string(), "PT0.042S"); - assert_eq!(Duration::microseconds(42).to_string(), "PT0.000042S"); - assert_eq!(Duration::nanoseconds(42).to_string(), "PT0.000000042S"); - assert_eq!((Duration::days(7) + Duration::milliseconds(6543)).to_string(), - "P7DT6.543S"); - assert_eq!(Duration::seconds(-86401).to_string(), "-P1DT1S"); - assert_eq!(Duration::nanoseconds(-1).to_string(), "-PT0.000000001S"); - - // the format specifier should have no effect on `Duration` - assert_eq!(format!("{:30}", Duration::days(1) + Duration::milliseconds(2345)), - "P1DT2.345S"); - } -} diff --git a/deps/time-0.1.34/src/lib.rs b/deps/time-0.1.34/src/lib.rs deleted file mode 100644 index 9a5fda234..000000000 --- a/deps/time-0.1.34/src/lib.rs +++ /dev/null @@ -1,1275 +0,0 @@ -// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -//! Simple time handling. -//! -//! # Usage -//! -//! This crate is [on crates.io](https://crates.io/crates/time) and can be -//! used by adding `time` to the dependencies in your project's `Cargo.toml`. -//! -//! ```toml -//! [dependencies] -//! time = "0.1" -//! ``` -//! -//! And this in your crate root: -//! -//! ```rust -//! extern crate time; -//! ``` -//! -//! This crate uses the same syntax for format strings as the [strftime()] -//! (http://man7.org/linux/man-pages/man3/strftime.3.html) function from the C -//! standard library. - -#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", - html_favicon_url = "https://www.rust-lang.org/favicon.ico", - html_root_url = "https://doc.rust-lang.org/time/")] -#![allow(trivial_numeric_casts)] -#![cfg_attr(test, deny(warnings))] - -#[cfg(unix)] extern crate libc; -#[cfg(windows)] extern crate kernel32; -#[cfg(windows)] extern crate winapi; -#[cfg(feature = "rustc-serialize")] extern crate rustc_serialize; - -#[cfg(test)] #[macro_use] extern crate log; -#[cfg(all(windows, test))] extern crate advapi32; - -use std::cmp::Ordering; -use std::error::Error; -use std::fmt; -use std::ops::{Add, Sub}; - -pub use duration::Duration; - -use self::ParseError::{InvalidDay, InvalidDayOfMonth, InvalidDayOfWeek, - InvalidDayOfYear, InvalidFormatSpecifier, InvalidHour, - InvalidMinute, InvalidMonth, InvalidSecond, InvalidTime, - InvalidYear, InvalidZoneOffset, InvalidSecondsSinceEpoch, - MissingFormatConverter, UnexpectedCharacter}; - -pub use parse::strptime; - -mod display; -mod duration; -mod parse; -mod sys; - -static NSEC_PER_SEC: i32 = 1_000_000_000; - -/// A record specifying a time value in seconds and nanoseconds, where -/// nanoseconds represent the offset from the given second. -/// -/// For example a timespec of 1.2 seconds after the beginning of the epoch would -/// be represented as {sec: 1, nsec: 200000000}. -#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Debug, Hash)] -#[cfg_attr(feature = "rustc-serialize", derive(RustcEncodable, RustcDecodable))] -pub struct Timespec { pub sec: i64, pub nsec: i32 } -/* - * Timespec assumes that pre-epoch Timespecs have negative sec and positive - * nsec fields. Darwin's and Linux's struct timespec functions handle pre- - * epoch timestamps using a "two steps back, one step forward" representation, - * though the man pages do not actually document this. For example, the time - * -1.2 seconds before the epoch is represented by `Timespec { sec: -2_i64, - * nsec: 800_000_000 }`. - */ -impl Timespec { - pub fn new(sec: i64, nsec: i32) -> Timespec { - assert!(nsec >= 0 && nsec < NSEC_PER_SEC); - Timespec { sec: sec, nsec: nsec } - } -} - -impl Add<Duration> for Timespec { - type Output = Timespec; - - fn add(self, other: Duration) -> Timespec { - let d_sec = other.num_seconds(); - // It is safe to unwrap the nanoseconds, because there cannot be - // more than one second left, which fits in i64 and in i32. - let d_nsec = (other - Duration::seconds(d_sec)) - .num_nanoseconds().unwrap() as i32; - let mut sec = self.sec + d_sec; - let mut nsec = self.nsec + d_nsec; - if nsec >= NSEC_PER_SEC { - nsec -= NSEC_PER_SEC; - sec += 1; - } else if nsec < 0 { - nsec += NSEC_PER_SEC; - sec -= 1; - } - Timespec::new(sec, nsec) - } -} - -impl Sub<Duration> for Timespec { - type Output = Timespec; - - fn sub(self, other: Duration) -> Timespec { - let d_sec = other.num_seconds(); - // It is safe to unwrap the nanoseconds, because there cannot be - // more than one second left, which fits in i64 and in i32. - let d_nsec = (other - Duration::seconds(d_sec)) - .num_nanoseconds().unwrap() as i32; - let mut sec = self.sec - d_sec; - let mut nsec = self.nsec - d_nsec; - if nsec >= NSEC_PER_SEC { - nsec -= NSEC_PER_SEC; - sec += 1; - } else if nsec < 0 { - nsec += NSEC_PER_SEC; - sec -= 1; - } - Timespec::new(sec, nsec) - } -} - -impl Sub<Timespec> for Timespec { - type Output = Duration; - - fn sub(self, other: Timespec) -> Duration { - let sec = self.sec - other.sec; - let nsec = self.nsec - other.nsec; - Duration::seconds(sec) + Duration::nanoseconds(nsec as i64) - } -} - -/** - * Returns the current time as a `timespec` containing the seconds and - * nanoseconds since 1970-01-01T00:00:00Z. - */ -pub fn get_time() -> Timespec { - let (sec, nsec) = sys::get_time(); - Timespec::new(sec, nsec) -} - - -/** - * Returns the current value of a high-resolution performance counter - * in nanoseconds since an unspecified epoch. - */ -pub fn precise_time_ns() -> u64 { - sys::get_precise_ns() -} - - -/** - * Returns the current value of a high-resolution performance counter - * in seconds since an unspecified epoch. - */ -pub fn precise_time_s() -> f64 { - return (precise_time_ns() as f64) / 1000000000.; -} - -/// An opaque structure representing a moment in time. -/// -/// The only operation that can be performed on a `PreciseTime` is the -/// calculation of the `Duration` of time that lies between them. -/// -/// # Examples -/// -/// Repeatedly call a function for 1 second: -/// -/// ```rust -/// use time::{Duration, PreciseTime}; -/// # fn do_some_work() {} -/// -/// let start = PreciseTime::now(); -/// -/// while start.to(PreciseTime::now()) < Duration::seconds(1) { -/// do_some_work(); -/// } -/// ``` -#[derive(Copy, Clone)] -pub struct PreciseTime(u64); - -impl PreciseTime { - /// Returns a `PreciseTime` representing the current moment in time. - pub fn now() -> PreciseTime { - PreciseTime(precise_time_ns()) - } - - /// Returns a `Duration` representing the span of time from the value of - /// `self` to the value of `later`. - /// - /// # Notes - /// - /// If `later` represents a time before `self`, the result of this method - /// is unspecified. - /// - /// If `later` represents a time more than 293 years after `self`, the - /// result of this method is unspecified. - #[inline] - pub fn to(&self, later: PreciseTime) -> Duration { - // NB: even if later is less than self due to overflow, this will work - // since the subtraction will underflow properly as well. - // - // We could deal with the overflow when casting to an i64, but all that - // gets us is the ability to handle intervals of up to 584 years, which - // seems not very useful :) - Duration::nanoseconds((later.0 - self.0) as i64) - } -} - -/// A structure representing a moment in time. -/// -/// `SteadyTime`s are generated by a "steady" clock, that is, a clock which -/// never experiences discontinuous jumps and for which time always flows at -/// the same rate. -/// -/// # Examples -/// -/// Repeatedly call a function for 1 second: -/// -/// ```rust -/// # use time::{Duration, SteadyTime}; -/// # fn do_some_work() {} -/// let start = SteadyTime::now(); -/// -/// while SteadyTime::now() - start < Duration::seconds(1) { -/// do_some_work(); -/// } -/// ``` -#[derive(Clone, Copy, PartialOrd, Ord, PartialEq, Eq, Debug)] -pub struct SteadyTime(sys::SteadyTime); - -impl SteadyTime { - /// Returns a `SteadyTime` representing the current moment in time. - pub fn now() -> SteadyTime { - SteadyTime(sys::SteadyTime::now()) - } -} - -impl fmt::Display for SteadyTime { - fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { - // TODO: needs a display customization - fmt::Debug::fmt(self, fmt) - } -} - -impl Sub for SteadyTime { - type Output = Duration; - - fn sub(self, other: SteadyTime) -> Duration { - self.0 - other.0 - } -} - -impl Sub<Duration> for SteadyTime { - type Output = SteadyTime; - - fn sub(self, other: Duration) -> SteadyTime { - SteadyTime(self.0 - other) - } -} - -impl Add<Duration> for SteadyTime { - type Output = SteadyTime; - - fn add(self, other: Duration) -> SteadyTime { - SteadyTime(self.0 + other) - } -} - -#[cfg(not(windows))] -pub fn tzset() { - extern { fn tzset(); } - unsafe { tzset() } -} - - -#[cfg(windows)] -pub fn tzset() {} - -/// Holds a calendar date and time broken down into its components (year, month, -/// day, and so on), also called a broken-down time value. -// FIXME: use c_int instead of i32? -#[repr(C)] -#[derive(Copy, Clone, PartialEq, Eq, Debug, Hash)] -#[cfg_attr(feature = "rustc-serialize", derive(RustcEncodable, RustcDecodable))] -pub struct Tm { - /// Seconds after the minute - [0, 60] - pub tm_sec: i32, - - /// Minutes after the hour - [0, 59] - pub tm_min: i32, - - /// Hours after midnight - [0, 23] - pub tm_hour: i32, - - /// Day of the month - [1, 31] - pub tm_mday: i32, - - /// Months since January - [0, 11] - pub tm_mon: i32, - - /// Years since 1900 - pub tm_year: i32, - - /// Days since Sunday - [0, 6]. 0 = Sunday, 1 = Monday, ..., 6 = Saturday. - pub tm_wday: i32, - - /// Days since January 1 - [0, 365] - pub tm_yday: i32, - - /// Daylight Saving Time flag. - /// - /// This value is positive if Daylight Saving Time is in effect, zero if - /// Daylight Saving Time is not in effect, and negative if this information - /// is not available. - pub tm_isdst: i32, - - /// Identifies the time zone that was used to compute this broken-down time - /// value, including any adjustment for Daylight Saving Time. This is the - /// number of seconds east of UTC. For example, for U.S. Pacific Daylight - /// Time, the value is -7*60*60 = -25200. - pub tm_utcoff: i32, - - /// Nanoseconds after the second - [0, 10<sup>9</sup> - 1] - pub tm_nsec: i32, -} - -impl Add<Duration> for Tm { - type Output = Tm; - - /// The resulting Tm is in UTC. - // FIXME: The resulting Tm should have the same timezone as `self`; - // however, we need a function such as `at_tm(clock: Timespec, offset: i32)` - // for this. - fn add(self, other: Duration) -> Tm { - at_utc(self.to_timespec() + other) - } -} - -impl Sub<Duration> for Tm { - type Output = Tm; - - /// The resulting Tm is in UTC. - // FIXME: The resulting Tm should have the same timezone as `self`; - // however, we need a function such as `at_tm(clock: Timespec, offset: i32)` - // for this. - fn sub(self, other: Duration) -> Tm { - at_utc(self.to_timespec() - other) - } -} - -impl Sub<Tm> for Tm { - type Output = Duration; - - fn sub(self, other: Tm) -> Duration { - self.to_timespec() - other.to_timespec() - } -} - -impl PartialOrd for Tm { - fn partial_cmp(&self, other: &Tm) -> Option<Ordering> { - self.to_timespec().partial_cmp(&other.to_timespec()) - } -} - -impl Ord for Tm { - fn cmp(&self, other: &Tm) -> Ordering { - self.to_timespec().cmp(&other.to_timespec()) - } -} - -pub fn empty_tm() -> Tm { - Tm { - tm_sec: 0, - tm_min: 0, - tm_hour: 0, - tm_mday: 0, - tm_mon: 0, - tm_year: 0, - tm_wday: 0, - tm_yday: 0, - tm_isdst: 0, - tm_utcoff: 0, - tm_nsec: 0, - } -} - -/// Returns the specified time in UTC -pub fn at_utc(clock: Timespec) -> Tm { - let Timespec { sec, nsec } = clock; - let mut tm = empty_tm(); - sys::time_to_utc_tm(sec, &mut tm); - tm.tm_nsec = nsec; - tm -} - -/// Returns the current time in UTC -pub fn now_utc() -> Tm { - at_utc(get_time()) -} - -/// Returns the specified time in the local timezone -pub fn at(clock: Timespec) -> Tm { - let Timespec { sec, nsec } = clock; - let mut tm = empty_tm(); - sys::time_to_local_tm(sec, &mut tm); - tm.tm_nsec = nsec; - tm -} - -/// Returns the current time in the local timezone -pub fn now() -> Tm { - at(get_time()) -} - -impl Tm { - /// Convert time to the seconds from January 1, 1970 - pub fn to_timespec(&self) -> Timespec { - let sec = match self.tm_utcoff { - 0 => sys::utc_tm_to_time(self), - _ => sys::local_tm_to_time(self) - }; - - Timespec::new(sec, self.tm_nsec) - } - - /// Convert time to the local timezone - pub fn to_local(&self) -> Tm { - at(self.to_timespec()) - } - - /// Convert time to the UTC - pub fn to_utc(&self) -> Tm { - match self.tm_utcoff { - 0 => *self, - _ => at_utc(self.to_timespec()) - } - } - - /** - * Returns a TmFmt that outputs according to the `asctime` format in ISO - * C, in the local timezone. - * - * Example: "Thu Jan 1 00:00:00 1970" - */ - pub fn ctime(&self) -> TmFmt { - TmFmt { - tm: self, - format: Fmt::Ctime, - } - } - - /** - * Returns a TmFmt that outputs according to the `asctime` format in ISO - * C. - * - * Example: "Thu Jan 1 00:00:00 1970" - */ - pub fn asctime(&self) -> TmFmt { - TmFmt { - tm: self, - format: Fmt::Str("%c"), - } - } - - /// Formats the time according to the format string. - pub fn strftime<'a>(&'a self, format: &'a str) -> Result<TmFmt<'a>, ParseError> { - validate_format(TmFmt { - tm: self, - format: Fmt::Str(format), - }) - } - - /** - * Returns a TmFmt that outputs according to RFC 822. - * - * local: "Thu, 22 Mar 2012 07:53:18 PST" - * utc: "Thu, 22 Mar 2012 14:53:18 GMT" - */ - pub fn rfc822(&self) -> TmFmt { - let fmt = if self.tm_utcoff == 0 { - "%a, %d %b %Y %T GMT" - } else { - "%a, %d %b %Y %T %Z" - }; - TmFmt { - tm: self, - format: Fmt::Str(fmt), - } - } - - /** - * Returns a TmFmt that outputs according to RFC 822 with Zulu time. - * - * local: "Thu, 22 Mar 2012 07:53:18 -0700" - * utc: "Thu, 22 Mar 2012 14:53:18 -0000" - */ - pub fn rfc822z(&self) -> TmFmt { - TmFmt { - tm: self, - format: Fmt::Str("%a, %d %b %Y %T %z"), - } - } - - /** - * Returns a TmFmt that outputs according to RFC 3339. RFC 3339 is - * compatible with ISO 8601. - * - * local: "2012-02-22T07:53:18-07:00" - * utc: "2012-02-22T14:53:18Z" - */ - pub fn rfc3339<'a>(&'a self) -> TmFmt { - TmFmt { - tm: self, - format: Fmt::Rfc3339, - } - } -} - -#[derive(Copy, PartialEq, Debug, Clone)] -pub enum ParseError { - InvalidSecond, - InvalidMinute, - InvalidHour, - InvalidDay, - InvalidMonth, - InvalidYear, - InvalidDayOfWeek, - InvalidDayOfMonth, - InvalidDayOfYear, - InvalidZoneOffset, - InvalidTime, - InvalidSecondsSinceEpoch, - MissingFormatConverter, - InvalidFormatSpecifier(char), - UnexpectedCharacter(char, char), -} - -impl fmt::Display for ParseError { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - match *self { - InvalidFormatSpecifier(ch) => { - write!(f, "{}: %{}", self.description(), ch) - } - UnexpectedCharacter(a, b) => { - write!(f, "expected: `{}`, found: `{}`", a, b) - } - _ => write!(f, "{}", self.description()) - } - } -} - -impl Error for ParseError { - fn description(&self) -> &str { - match *self { - InvalidSecond => "Invalid second.", - InvalidMinute => "Invalid minute.", - InvalidHour => "Invalid hour.", - InvalidDay => "Invalid day.", - InvalidMonth => "Invalid month.", - InvalidYear => "Invalid year.", - InvalidDayOfWeek => "Invalid day of the week.", - InvalidDayOfMonth => "Invalid day of the month.", - InvalidDayOfYear => "Invalid day of the year.", - InvalidZoneOffset => "Invalid zone offset.", - InvalidTime => "Invalid time.", - InvalidSecondsSinceEpoch => "Invalid seconds since epoch.", - MissingFormatConverter => "missing format converter after `%`", - InvalidFormatSpecifier(..) => "invalid format specifier", - UnexpectedCharacter(..) => "Unexpected character.", - } - } -} - -/// A wrapper around a `Tm` and format string that implements Display. -#[derive(Debug)] -pub struct TmFmt<'a> { - tm: &'a Tm, - format: Fmt<'a> -} - -#[derive(Debug)] -enum Fmt<'a> { - Str(&'a str), - Rfc3339, - Ctime, -} - -fn validate_format<'a>(fmt: TmFmt<'a>) -> Result<TmFmt<'a>, ParseError> { - - match (fmt.tm.tm_wday, fmt.tm.tm_mon) { - (0...6, 0...11) => (), - (_wday, 0...11) => return Err(InvalidDayOfWeek), - (0...6, _mon) => return Err(InvalidMonth), - _ => return Err(InvalidDay) - } - match fmt.format { - Fmt::Str(ref s) => { - let mut chars = s.chars(); - loop { - match chars.next() { - Some('%') => { - match chars.next() { - Some('A') | Some('a') | Some('B') | Some('b') | - Some('C') | Some('c') | Some('D') | Some('d') | - Some('e') | Some('F') | Some('f') | Some('G') | - Some('g') | Some('H') | Some('h') | Some('I') | - Some('j') | Some('k') | Some('l') | Some('M') | - Some('m') | Some('n') | Some('P') | Some('p') | - Some('R') | Some('r') | Some('S') | Some('s') | - Some('T') | Some('t') | Some('U') | Some('u') | - Some('V') | Some('v') | Some('W') | Some('w') | - Some('X') | Some('x') | Some('Y') | Some('y') | - Some('Z') | Some('z') | Some('+') | Some('%') => (), - - Some(c) => return Err(InvalidFormatSpecifier(c)), - None => return Err(MissingFormatConverter), - } - }, - None => break, - _ => () - } - } - }, - _ => () - } - Ok(fmt) -} - -/// Formats the time according to the format string. -pub fn strftime(format: &str, tm: &Tm) -> Result<String, ParseError> { - tm.strftime(format).map(|fmt| fmt.to_string()) -} - -#[cfg(test)] -mod tests { - use super::{Timespec, get_time, precise_time_ns, precise_time_s, - at_utc, at, strptime, PreciseTime, SteadyTime, ParseError, Duration}; - use super::ParseError::{InvalidTime, InvalidYear, MissingFormatConverter, - InvalidFormatSpecifier}; - - use std::sync::{Once, ONCE_INIT, Mutex, MutexGuard, LockResult}; - use std::mem; - - struct TzReset { - _tzreset: ::sys::TzReset, - _lock: LockResult<MutexGuard<'static, ()>>, - } - - fn set_time_zone_la_or_london(london: bool) -> TzReset { - // Lock manages current timezone because some tests require LA some - // London - static mut LOCK: *mut Mutex<()> = 0 as *mut _; - static INIT: Once = ONCE_INIT; - - unsafe { - INIT.call_once(|| { - LOCK = mem::transmute(Box::new(Mutex::new(()))); - }); - - let timezone_lock = (*LOCK).lock(); - let reset_func = if london { - ::sys::set_london_with_dst_time_zone() - } else { - ::sys::set_los_angeles_time_zone() - }; - TzReset { - _lock: timezone_lock, - _tzreset: reset_func, - } - } - } - - fn set_time_zone() -> TzReset { - set_time_zone_la_or_london(false) - } - - fn set_time_zone_london_dst() -> TzReset { - set_time_zone_la_or_london(true) - } - - #[test] - fn test_get_time() { - static SOME_RECENT_DATE: i64 = 1325376000i64; // 2012-01-01T00:00:00Z - static SOME_FUTURE_DATE: i64 = 1577836800i64; // 2020-01-01T00:00:00Z - - let tv1 = get_time(); - debug!("tv1={} sec + {} nsec", tv1.sec, tv1.nsec); - - assert!(tv1.sec > SOME_RECENT_DATE); - assert!(tv1.nsec < 1000000000i32); - - let tv2 = get_time(); - debug!("tv2={} sec + {} nsec", tv2.sec, tv2.nsec); - - assert!(tv2.sec >= tv1.sec); - assert!(tv2.sec < SOME_FUTURE_DATE); - assert!(tv2.nsec < 1000000000i32); - if tv2.sec == tv1.sec { - assert!(tv2.nsec >= tv1.nsec); - } - } - - #[test] - fn test_precise_time() { - let s0 = precise_time_s(); - debug!("s0={} sec", s0); - assert!(s0 > 0.); - - let ns0 = precise_time_ns(); - let ns1 = precise_time_ns(); - debug!("ns0={} ns", ns0); - debug!("ns1={} ns", ns1); - assert!(ns1 >= ns0); - - let ns2 = precise_time_ns(); - debug!("ns2={} ns", ns2); - assert!(ns2 >= ns1); - } - - #[test] - fn test_precise_time_to() { - let t0 = PreciseTime(1000); - let t1 = PreciseTime(1023); - assert_eq!(Duration::nanoseconds(23), t0.to(t1)); - } - - #[test] - fn test_at_utc() { - let _reset = set_time_zone(); - - let time = Timespec::new(1234567890, 54321); - let utc = at_utc(time); - - assert_eq!(utc.tm_sec, 30); - assert_eq!(utc.tm_min, 31); - assert_eq!(utc.tm_hour, 23); - assert_eq!(utc.tm_mday, 13); - assert_eq!(utc.tm_mon, 1); - assert_eq!(utc.tm_year, 109); - assert_eq!(utc.tm_wday, 5); - assert_eq!(utc.tm_yday, 43); - assert_eq!(utc.tm_isdst, 0); - assert_eq!(utc.tm_utcoff, 0); - assert_eq!(utc.tm_nsec, 54321); - } - - #[test] - fn test_at() { - let _reset = set_time_zone(); - - let time = Timespec::new(1234567890, 54321); - let local = at(time); - - debug!("time_at: {:?}", local); - - assert_eq!(local.tm_sec, 30); - assert_eq!(local.tm_min, 31); - assert_eq!(local.tm_hour, 15); - assert_eq!(local.tm_mday, 13); - assert_eq!(local.tm_mon, 1); - assert_eq!(local.tm_year, 109); - assert_eq!(local.tm_wday, 5); - assert_eq!(local.tm_yday, 43); - assert_eq!(local.tm_isdst, 0); - assert_eq!(local.tm_utcoff, -28800); - assert_eq!(local.tm_nsec, 54321); - } - - #[test] - fn test_to_timespec() { - let _reset = set_time_zone(); - - let time = Timespec::new(1234567890, 54321); - let utc = at_utc(time); - - assert_eq!(utc.to_timespec(), time); - assert_eq!(utc.to_local().to_timespec(), time); - } - - #[test] - fn test_conversions() { - let _reset = set_time_zone(); - - let time = Timespec::new(1234567890, 54321); - let utc = at_utc(time); - let local = at(time); - - assert!(local.to_local() == local); - assert!(local.to_utc() == utc); - assert!(local.to_utc().to_local() == local); - assert!(utc.to_utc() == utc); - assert!(utc.to_local() == local); - assert!(utc.to_local().to_utc() == utc); - } - - #[test] - fn test_strptime() { - let _reset = set_time_zone(); - - match strptime("", "") { - Ok(ref tm) => { - assert!(tm.tm_sec == 0); - assert!(tm.tm_min == 0); - assert!(tm.tm_hour == 0); - assert!(tm.tm_mday == 0); - assert!(tm.tm_mon == 0); - assert!(tm.tm_year == 0); - assert!(tm.tm_wday == 0); - assert!(tm.tm_isdst == 0); - assert!(tm.tm_utcoff == 0); - assert!(tm.tm_nsec == 0); - } - Err(_) => () - } - - let format = "%a %b %e %T.%f %Y"; - assert_eq!(strptime("", format), Err(ParseError::InvalidDay)); - assert_eq!(strptime("Fri Feb 13 15:31:30", format), - Err(InvalidTime)); - - match strptime("Fri Feb 13 15:31:30.01234 2009", format) { - Err(e) => panic!("{}", e), - Ok(ref tm) => { - assert_eq!(tm.tm_sec, 30); - assert_eq!(tm.tm_min, 31); - assert_eq!(tm.tm_hour, 15); - assert_eq!(tm.tm_mday, 13); - assert_eq!(tm.tm_mon, 1); - assert_eq!(tm.tm_year, 109); - assert_eq!(tm.tm_wday, 5); - assert_eq!(tm.tm_yday, 0); - assert_eq!(tm.tm_isdst, 0); - assert_eq!(tm.tm_utcoff, 0); - assert_eq!(tm.tm_nsec, 12340000); - } - } - - fn test(s: &str, format: &str) -> bool { - match strptime(s, format) { - Ok(tm) => { - tm.strftime(format).unwrap().to_string() == s.to_string() - }, - Err(e) => panic!("{:?}, s={:?}, format={:?}", e, s, format) - } - } - - fn test_oneway(s : &str, format : &str) -> bool { - match strptime(s, format) { - Ok(_) => { - // oneway tests are used when reformatting the parsed Tm - // back into a string can generate a different string - // from the original (i.e. leading zeroes) - true - }, - Err(e) => panic!("{:?}, s={:?}, format={:?}", e, s, format) - } - } - - let days = [ - "Sunday".to_string(), - "Monday".to_string(), - "Tuesday".to_string(), - "Wednesday".to_string(), - "Thursday".to_string(), - "Friday".to_string(), - "Saturday".to_string() - ]; - for day in days.iter() { - assert!(test(&day, "%A")); - } - - let days = [ - "Sun".to_string(), - "Mon".to_string(), - "Tue".to_string(), - "Wed".to_string(), - "Thu".to_string(), - "Fri".to_string(), - "Sat".to_string() - ]; - for day in days.iter() { - assert!(test(&day, "%a")); - } - - let months = [ - "January".to_string(), - "February".to_string(), - "March".to_string(), - "April".to_string(), - "May".to_string(), - "June".to_string(), - "July".to_string(), - "August".to_string(), - "September".to_string(), - "October".to_string(), - "November".to_string(), - "December".to_string() - ]; - for day in months.iter() { - assert!(test(&day, "%B")); - } - - let months = [ - "Jan".to_string(), - "Feb".to_string(), - "Mar".to_string(), - "Apr".to_string(), - "May".to_string(), - "Jun".to_string(), - "Jul".to_string(), - "Aug".to_string(), - "Sep".to_string(), - "Oct".to_string(), - "Nov".to_string(), - "Dec".to_string() - ]; - for day in months.iter() { - assert!(test(&day, "%b")); - } - - assert!(test("19", "%C")); - assert!(test("Fri Feb 3 23:31:30 2009", "%c")); - assert!(test("Fri Feb 13 23:31:30 2009", "%c")); - assert!(test("02/13/09", "%D")); - assert!(test("03", "%d")); - assert!(test("13", "%d")); - assert!(test(" 3", "%e")); - assert!(test("13", "%e")); - assert!(test("2009-02-13", "%F")); - assert!(test("03", "%H")); - assert!(test("13", "%H")); - assert!(test("03", "%I")); // FIXME (#2350): flesh out - assert!(test("11", "%I")); // FIXME (#2350): flesh out - assert!(test("044", "%j")); - assert!(test(" 3", "%k")); - assert!(test("13", "%k")); - assert!(test(" 1", "%l")); - assert!(test("11", "%l")); - assert!(test("03", "%M")); - assert!(test("13", "%M")); - assert!(test("\n", "%n")); - assert!(test("am", "%P")); - assert!(test("pm", "%P")); - assert!(test("AM", "%p")); - assert!(test("PM", "%p")); - assert!(test("23:31", "%R")); - assert!(test("11:31:30 AM", "%r")); - assert!(test("11:31:30 PM", "%r")); - assert!(test("03", "%S")); - assert!(test("13", "%S")); - assert!(test("15:31:30", "%T")); - assert!(test("\t", "%t")); - assert!(test("1", "%u")); - assert!(test("7", "%u")); - assert!(test("13-Feb-2009", "%v")); - assert!(test("0", "%w")); - assert!(test("6", "%w")); - assert!(test("2009", "%Y")); - assert!(test("09", "%y")); - - assert!(test_oneway("3", "%d")); - assert!(test_oneway("3", "%H")); - assert!(test_oneway("3", "%e")); - assert!(test_oneway("3", "%M")); - assert!(test_oneway("3", "%S")); - - assert!(strptime("-0000", "%z").unwrap().tm_utcoff == 0); - assert!(strptime("-00:00", "%z").unwrap().tm_utcoff == 0); - assert!(strptime("Z", "%z").unwrap().tm_utcoff == 0); - assert_eq!(-28800, strptime("-0800", "%z").unwrap().tm_utcoff); - assert_eq!(-28800, strptime("-08:00", "%z").unwrap().tm_utcoff); - assert_eq!(28800, strptime("+0800", "%z").unwrap().tm_utcoff); - assert_eq!(28800, strptime("+08:00", "%z").unwrap().tm_utcoff); - assert_eq!(5400, strptime("+0130", "%z").unwrap().tm_utcoff); - assert_eq!(5400, strptime("+01:30", "%z").unwrap().tm_utcoff); - assert!(test("%", "%%")); - - // Test for #7256 - assert_eq!(strptime("360", "%Y-%m-%d"), Err(InvalidYear)); - - // Test for epoch seconds parsing - { - assert!(test("1428035610", "%s")); - let tm = strptime("1428035610", "%s").unwrap(); - assert_eq!(tm.tm_utcoff, 0); - assert_eq!(tm.tm_isdst, 0); - assert_eq!(tm.tm_yday, 92); - assert_eq!(tm.tm_wday, 5); - assert_eq!(tm.tm_year, 115); - assert_eq!(tm.tm_mon, 3); - assert_eq!(tm.tm_mday, 3); - assert_eq!(tm.tm_hour, 4); - } - } - - #[test] - fn test_asctime() { - let _reset = set_time_zone(); - - let time = Timespec::new(1234567890, 54321); - let utc = at_utc(time); - let local = at(time); - - debug!("test_ctime: {} {}", utc.asctime(), local.asctime()); - - assert_eq!(utc.asctime().to_string(), "Fri Feb 13 23:31:30 2009".to_string()); - assert_eq!(local.asctime().to_string(), "Fri Feb 13 15:31:30 2009".to_string()); - } - - #[test] - fn test_ctime() { - let _reset = set_time_zone(); - - let time = Timespec::new(1234567890, 54321); - let utc = at_utc(time); - let local = at(time); - - debug!("test_ctime: {} {}", utc.ctime(), local.ctime()); - - assert_eq!(utc.ctime().to_string(), "Fri Feb 13 15:31:30 2009".to_string()); - assert_eq!(local.ctime().to_string(), "Fri Feb 13 15:31:30 2009".to_string()); - } - - #[test] - fn test_strftime() { - let _reset = set_time_zone(); - - let time = Timespec::new(1234567890, 54321); - let utc = at_utc(time); - let local = at(time); - - assert_eq!(local.strftime("").unwrap().to_string(), "".to_string()); - assert_eq!(local.strftime("%A").unwrap().to_string(), "Friday".to_string()); - assert_eq!(local.strftime("%a").unwrap().to_string(), "Fri".to_string()); - assert_eq!(local.strftime("%B").unwrap().to_string(), "February".to_string()); - assert_eq!(local.strftime("%b").unwrap().to_string(), "Feb".to_string()); - assert_eq!(local.strftime("%C").unwrap().to_string(), "20".to_string()); - assert_eq!(local.strftime("%c").unwrap().to_string(), - "Fri Feb 13 15:31:30 2009".to_string()); - assert_eq!(local.strftime("%D").unwrap().to_string(), "02/13/09".to_string()); - assert_eq!(local.strftime("%d").unwrap().to_string(), "13".to_string()); - assert_eq!(local.strftime("%e").unwrap().to_string(), "13".to_string()); - assert_eq!(local.strftime("%F").unwrap().to_string(), "2009-02-13".to_string()); - assert_eq!(local.strftime("%f").unwrap().to_string(), "000054321".to_string()); - assert_eq!(local.strftime("%G").unwrap().to_string(), "2009".to_string()); - assert_eq!(local.strftime("%g").unwrap().to_string(), "09".to_string()); - assert_eq!(local.strftime("%H").unwrap().to_string(), "15".to_string()); - assert_eq!(local.strftime("%h").unwrap().to_string(), "Feb".to_string()); - assert_eq!(local.strftime("%I").unwrap().to_string(), "03".to_string()); - assert_eq!(local.strftime("%j").unwrap().to_string(), "044".to_string()); - assert_eq!(local.strftime("%k").unwrap().to_string(), "15".to_string()); - assert_eq!(local.strftime("%l").unwrap().to_string(), " 3".to_string()); - assert_eq!(local.strftime("%M").unwrap().to_string(), "31".to_string()); - assert_eq!(local.strftime("%m").unwrap().to_string(), "02".to_string()); - assert_eq!(local.strftime("%n").unwrap().to_string(), "\n".to_string()); - assert_eq!(local.strftime("%P").unwrap().to_string(), "pm".to_string()); - assert_eq!(local.strftime("%p").unwrap().to_string(), "PM".to_string()); - assert_eq!(local.strftime("%R").unwrap().to_string(), "15:31".to_string()); - assert_eq!(local.strftime("%r").unwrap().to_string(), "03:31:30 PM".to_string()); - assert_eq!(local.strftime("%S").unwrap().to_string(), "30".to_string()); - assert_eq!(local.strftime("%s").unwrap().to_string(), "1234567890".to_string()); - assert_eq!(local.strftime("%T").unwrap().to_string(), "15:31:30".to_string()); - assert_eq!(local.strftime("%t").unwrap().to_string(), "\t".to_string()); - assert_eq!(local.strftime("%U").unwrap().to_string(), "06".to_string()); - assert_eq!(local.strftime("%u").unwrap().to_string(), "5".to_string()); - assert_eq!(local.strftime("%V").unwrap().to_string(), "07".to_string()); - assert_eq!(local.strftime("%v").unwrap().to_string(), "13-Feb-2009".to_string()); - assert_eq!(local.strftime("%W").unwrap().to_string(), "06".to_string()); - assert_eq!(local.strftime("%w").unwrap().to_string(), "5".to_string()); - // FIXME (#2350): support locale - assert_eq!(local.strftime("%X").unwrap().to_string(), "15:31:30".to_string()); - // FIXME (#2350): support locale - assert_eq!(local.strftime("%x").unwrap().to_string(), "02/13/09".to_string()); - assert_eq!(local.strftime("%Y").unwrap().to_string(), "2009".to_string()); - assert_eq!(local.strftime("%y").unwrap().to_string(), "09".to_string()); - // FIXME (#2350): support locale - assert_eq!(local.strftime("%Z").unwrap().to_string(), "".to_string()); - assert_eq!(local.strftime("%z").unwrap().to_string(), "-0800".to_string()); - assert_eq!(local.strftime("%+").unwrap().to_string(), - "2009-02-13T15:31:30-08:00".to_string()); - assert_eq!(local.strftime("%%").unwrap().to_string(), "%".to_string()); - - let invalid_specifiers = ["%E", "%J", "%K", "%L", "%N", "%O", "%o", "%Q", "%q"]; - for &sp in invalid_specifiers.iter() { - assert_eq!(local.strftime(sp).unwrap_err(), - InvalidFormatSpecifier(sp[1..].chars().next().unwrap())); - } - assert_eq!(local.strftime("%").unwrap_err(), MissingFormatConverter); - assert_eq!(local.strftime("%A %").unwrap_err(), MissingFormatConverter); - - assert_eq!(local.asctime().to_string(), "Fri Feb 13 15:31:30 2009".to_string()); - assert_eq!(local.ctime().to_string(), "Fri Feb 13 15:31:30 2009".to_string()); - assert_eq!(local.rfc822z().to_string(), "Fri, 13 Feb 2009 15:31:30 -0800".to_string()); - assert_eq!(local.rfc3339().to_string(), "2009-02-13T15:31:30-08:00".to_string()); - - assert_eq!(utc.asctime().to_string(), "Fri Feb 13 23:31:30 2009".to_string()); - assert_eq!(utc.ctime().to_string(), "Fri Feb 13 15:31:30 2009".to_string()); - assert_eq!(utc.rfc822().to_string(), "Fri, 13 Feb 2009 23:31:30 GMT".to_string()); - assert_eq!(utc.rfc822z().to_string(), "Fri, 13 Feb 2009 23:31:30 -0000".to_string()); - assert_eq!(utc.rfc3339().to_string(), "2009-02-13T23:31:30Z".to_string()); - } - - #[test] - fn test_timespec_eq_ord() { - let a = &Timespec::new(-2, 1); - let b = &Timespec::new(-1, 2); - let c = &Timespec::new(1, 2); - let d = &Timespec::new(2, 1); - let e = &Timespec::new(2, 1); - - assert!(d.eq(e)); - assert!(c.ne(e)); - - assert!(a.lt(b)); - assert!(b.lt(c)); - assert!(c.lt(d)); - - assert!(a.le(b)); - assert!(b.le(c)); - assert!(c.le(d)); - assert!(d.le(e)); - assert!(e.le(d)); - - assert!(b.ge(a)); - assert!(c.ge(b)); - assert!(d.ge(c)); - assert!(e.ge(d)); - assert!(d.ge(e)); - - assert!(b.gt(a)); - assert!(c.gt(b)); - assert!(d.gt(c)); - } - - #[test] - fn test_timespec_hash() { - use std::hash::{Hash, Hasher}; - - let c = &Timespec::new(3, 2); - let d = &Timespec::new(2, 1); - let e = &Timespec::new(2, 1); - - let mut hasher = ::std::hash::SipHasher::new(); - - let d_hash:u64 = { - d.hash(&mut hasher); - hasher.finish() - }; - - hasher = ::std::hash::SipHasher::new(); - - let e_hash:u64 = { - e.hash(&mut hasher); - hasher.finish() - }; - - hasher = ::std::hash::SipHasher::new(); - - let c_hash:u64 = { - c.hash(&mut hasher); - hasher.finish() - }; - - assert_eq!(d_hash, e_hash); - assert!(c_hash != e_hash); - } - - #[test] - fn test_timespec_add() { - let a = Timespec::new(1, 2); - let b = Duration::seconds(2) + Duration::nanoseconds(3); - let c = a + b; - assert_eq!(c.sec, 3); - assert_eq!(c.nsec, 5); - - let p = Timespec::new(1, super::NSEC_PER_SEC - 2); - let q = Duration::seconds(2) + Duration::nanoseconds(2); - let r = p + q; - assert_eq!(r.sec, 4); - assert_eq!(r.nsec, 0); - - let u = Timespec::new(1, super::NSEC_PER_SEC - 2); - let v = Duration::seconds(2) + Duration::nanoseconds(3); - let w = u + v; - assert_eq!(w.sec, 4); - assert_eq!(w.nsec, 1); - - let k = Timespec::new(1, 0); - let l = Duration::nanoseconds(-1); - let m = k + l; - assert_eq!(m.sec, 0); - assert_eq!(m.nsec, 999_999_999); - } - - #[test] - fn test_timespec_sub() { - let a = Timespec::new(2, 3); - let b = Timespec::new(1, 2); - let c = a - b; - assert_eq!(c.num_nanoseconds(), Some(super::NSEC_PER_SEC as i64 + 1)); - - let p = Timespec::new(2, 0); - let q = Timespec::new(1, 2); - let r = p - q; - assert_eq!(r.num_nanoseconds(), Some(super::NSEC_PER_SEC as i64 - 2)); - - let u = Timespec::new(1, 2); - let v = Timespec::new(2, 3); - let w = u - v; - assert_eq!(w.num_nanoseconds(), Some(-super::NSEC_PER_SEC as i64 - 1)); - } - - #[test] - fn test_time_sub() { - let a = ::now(); - let b = at(a.to_timespec() + Duration::seconds(5)); - let c = b - a; - assert_eq!(c.num_nanoseconds(), Some(super::NSEC_PER_SEC as i64 * 5)); - } - - #[test] - fn test_steadytime_sub() { - let a = SteadyTime::now(); - let b = a + Duration::seconds(1); - assert_eq!(b - a, Duration::seconds(1)); - assert_eq!(a - b, Duration::seconds(-1)); - } - - #[test] - fn test_date_before_1970() { - let early = strptime("1901-01-06", "%F").unwrap(); - let late = strptime("2000-01-01", "%F").unwrap(); - assert!(early < late); - } - - #[test] - fn test_dst() { - let _reset = set_time_zone_london_dst(); - let utc_in_feb = strptime("2015-02-01Z", "%F%z").unwrap(); - let utc_in_jun = strptime("2015-06-01Z", "%F%z").unwrap(); - let utc_in_nov = strptime("2015-11-01Z", "%F%z").unwrap(); - let local_in_feb = utc_in_feb.to_local(); - let local_in_jun = utc_in_jun.to_local(); - let local_in_nov = utc_in_nov.to_local(); - - assert_eq!(local_in_feb.tm_mon, 1); - assert_eq!(local_in_feb.tm_hour, 0); - assert_eq!(local_in_feb.tm_utcoff, 0); - assert_eq!(local_in_feb.tm_isdst, 0); - - assert_eq!(local_in_jun.tm_mon, 5); - assert_eq!(local_in_jun.tm_hour, 1); - assert_eq!(local_in_jun.tm_utcoff, 3600); - assert_eq!(local_in_jun.tm_isdst, 1); - - assert_eq!(local_in_nov.tm_mon, 10); - assert_eq!(local_in_nov.tm_hour, 0); - assert_eq!(local_in_nov.tm_utcoff, 0); - assert_eq!(local_in_nov.tm_isdst, 0) - } -} diff --git a/deps/time-0.1.34/src/parse.rs b/deps/time-0.1.34/src/parse.rs deleted file mode 100644 index c3b4e7c86..000000000 --- a/deps/time-0.1.34/src/parse.rs +++ /dev/null @@ -1,395 +0,0 @@ -use super::{Timespec, Tm, at_utc, ParseError, NSEC_PER_SEC}; -use super::ParseError::*; - -/// Parses the time from the string according to the format string. -pub fn strptime(mut s: &str, format: &str) -> Result<Tm, ParseError> { - let mut tm = Tm { - tm_sec: 0, - tm_min: 0, - tm_hour: 0, - tm_mday: 0, - tm_mon: 0, - tm_year: 0, - tm_wday: 0, - tm_yday: 0, - tm_isdst: 0, - tm_utcoff: 0, - tm_nsec: 0, - }; - let mut chars = format.chars(); - - while let Some(ch) = chars.next() { - if ch == '%' { - if let Some(ch) = chars.next() { - try!(parse_type(&mut s, ch, &mut tm)); - } - } else { - try!(parse_char(&mut s, ch)); - } - } - - Ok(tm) -} - -fn parse_type(s: &mut &str, ch: char, tm: &mut Tm) -> Result<(), ParseError> { - match ch { - 'A' => match match_strs(s, &[("Sunday", 0), - ("Monday", 1), - ("Tuesday", 2), - ("Wednesday", 3), - ("Thursday", 4), - ("Friday", 5), - ("Saturday", 6)]) { - Some(v) => { tm.tm_wday = v; Ok(()) } - None => Err(ParseError::InvalidDay) - }, - 'a' => match match_strs(s, &[("Sun", 0), - ("Mon", 1), - ("Tue", 2), - ("Wed", 3), - ("Thu", 4), - ("Fri", 5), - ("Sat", 6)]) { - Some(v) => { tm.tm_wday = v; Ok(()) } - None => Err(ParseError::InvalidDay) - }, - 'B' => match match_strs(s, &[("January", 0), - ("February", 1), - ("March", 2), - ("April", 3), - ("May", 4), - ("June", 5), - ("July", 6), - ("August", 7), - ("September", 8), - ("October", 9), - ("November", 10), - ("December", 11)]) { - Some(v) => { tm.tm_mon = v; Ok(()) } - None => Err(ParseError::InvalidMonth) - }, - 'b' | 'h' => match match_strs(s, &[("Jan", 0), - ("Feb", 1), - ("Mar", 2), - ("Apr", 3), - ("May", 4), - ("Jun", 5), - ("Jul", 6), - ("Aug", 7), - ("Sep", 8), - ("Oct", 9), - ("Nov", 10), - ("Dec", 11)]) { - Some(v) => { tm.tm_mon = v; Ok(()) } - None => Err(ParseError::InvalidMonth) - }, - 'C' => match match_digits_in_range(s, 1, 2, false, 0, 99) { - Some(v) => { tm.tm_year += (v * 100) - 1900; Ok(()) } - None => Err(ParseError::InvalidYear) - }, - 'c' => { - parse_type(s, 'a', tm) - .and_then(|()| parse_char(s, ' ')) - .and_then(|()| parse_type(s, 'b', tm)) - .and_then(|()| parse_char(s, ' ')) - .and_then(|()| parse_type(s, 'e', tm)) - .and_then(|()| parse_char(s, ' ')) - .and_then(|()| parse_type(s, 'T', tm)) - .and_then(|()| parse_char(s, ' ')) - .and_then(|()| parse_type(s, 'Y', tm)) - } - 'D' | 'x' => { - parse_type(s, 'm', tm) - .and_then(|()| parse_char(s, '/')) - .and_then(|()| parse_type(s, 'd', tm)) - .and_then(|()| parse_char(s, '/')) - .and_then(|()| parse_type(s, 'y', tm)) - } - 'd' => match match_digits_in_range(s, 1, 2, false, 1, 31) { - Some(v) => { tm.tm_mday = v; Ok(()) } - None => Err(ParseError::InvalidDayOfMonth) - }, - 'e' => match match_digits_in_range(s, 1, 2, true, 1, 31) { - Some(v) => { tm.tm_mday = v; Ok(()) } - None => Err(ParseError::InvalidDayOfMonth) - }, - 'f' => { - tm.tm_nsec = match_fractional_seconds(s); - Ok(()) - } - 'F' => { - parse_type(s, 'Y', tm) - .and_then(|()| parse_char(s, '-')) - .and_then(|()| parse_type(s, 'm', tm)) - .and_then(|()| parse_char(s, '-')) - .and_then(|()| parse_type(s, 'd', tm)) - } - 'H' => { - match match_digits_in_range(s, 1, 2, false, 0, 23) { - Some(v) => { tm.tm_hour = v; Ok(()) } - None => Err(ParseError::InvalidHour) - } - } - 'I' => { - match match_digits_in_range(s, 1, 2, false, 1, 12) { - Some(v) => { tm.tm_hour = if v == 12 { 0 } else { v }; Ok(()) } - None => Err(ParseError::InvalidHour) - } - } - 'j' => { - match match_digits_in_range(s, 1, 3, false, 1, 366) { - Some(v) => { tm.tm_yday = v - 1; Ok(()) } - None => Err(ParseError::InvalidDayOfYear) - } - } - 'k' => { - match match_digits_in_range(s, 1, 2, true, 0, 23) { - Some(v) => { tm.tm_hour = v; Ok(()) } - None => Err(ParseError::InvalidHour) - } - } - 'l' => { - match match_digits_in_range(s, 1, 2, true, 1, 12) { - Some(v) => { tm.tm_hour = if v == 12 { 0 } else { v }; Ok(()) } - None => Err(ParseError::InvalidHour) - } - } - 'M' => { - match match_digits_in_range(s, 1, 2, false, 0, 59) { - Some(v) => { tm.tm_min = v; Ok(()) } - None => Err(ParseError::InvalidMinute) - } - } - 'm' => { - match match_digits_in_range(s, 1, 2, false, 1, 12) { - Some(v) => { tm.tm_mon = v - 1; Ok(()) } - None => Err(ParseError::InvalidMonth) - } - } - 'n' => parse_char(s, '\n'), - 'P' => match match_strs(s, &[("am", 0), ("pm", 12)]) { - Some(v) => { tm.tm_hour += v; Ok(()) } - None => Err(ParseError::InvalidHour) - }, - 'p' => match match_strs(s, &[("AM", 0), ("PM", 12)]) { - Some(v) => { tm.tm_hour += v; Ok(()) } - None => Err(ParseError::InvalidHour) - }, - 'R' => { - parse_type(s, 'H', tm) - .and_then(|()| parse_char(s, ':')) - .and_then(|()| parse_type(s, 'M', tm)) - } - 'r' => { - parse_type(s, 'I', tm) - .and_then(|()| parse_char(s, ':')) - .and_then(|()| parse_type(s, 'M', tm)) - .and_then(|()| parse_char(s, ':')) - .and_then(|()| parse_type(s, 'S', tm)) - .and_then(|()| parse_char(s, ' ')) - .and_then(|()| parse_type(s, 'p', tm)) - } - 's' => { - match match_digits_i64(s, 1, 18, false) { - Some(v) => { - *tm = at_utc(Timespec::new(v, 0)); - Ok(()) - }, - None => Err(ParseError::InvalidSecondsSinceEpoch) - } - } - 'S' => { - match match_digits_in_range(s, 1, 2, false, 0, 60) { - Some(v) => { tm.tm_sec = v; Ok(()) } - None => Err(ParseError::InvalidSecond) - } - } - //'s' {} - 'T' | 'X' => { - parse_type(s, 'H', tm) - .and_then(|()| parse_char(s, ':')) - .and_then(|()| parse_type(s, 'M', tm)) - .and_then(|()| parse_char(s, ':')) - .and_then(|()| parse_type(s, 'S', tm)) - } - 't' => parse_char(s, '\t'), - 'u' => { - match match_digits_in_range(s, 1, 1, false, 1, 7) { - Some(v) => { tm.tm_wday = if v == 7 { 0 } else { v }; Ok(()) } - None => Err(ParseError::InvalidDayOfWeek) - } - } - 'v' => { - parse_type(s, 'e', tm) - .and_then(|()| parse_char(s, '-')) - .and_then(|()| parse_type(s, 'b', tm)) - .and_then(|()| parse_char(s, '-')) - .and_then(|()| parse_type(s, 'Y', tm)) - } - //'W' {} - 'w' => { - match match_digits_in_range(s, 1, 1, false, 0, 6) { - Some(v) => { tm.tm_wday = v; Ok(()) } - None => Err(ParseError::InvalidDayOfWeek) - } - } - 'Y' => { - match match_digits(s, 4, 4, false) { - Some(v) => { tm.tm_year = v - 1900; Ok(()) } - None => Err(ParseError::InvalidYear) - } - } - 'y' => { - match match_digits_in_range(s, 1, 2, false, 0, 99) { - Some(v) => { tm.tm_year = v; Ok(()) } - None => Err(ParseError::InvalidYear) - } - } - 'Z' => { - if match_str(s, "UTC") || match_str(s, "GMT") { - tm.tm_utcoff = 0; - Ok(()) - } else { - // It's odd, but to maintain compatibility with c's - // strptime we ignore the timezone. - for (i, ch) in s.char_indices() { - if ch == ' ' { - *s = &s[i..]; - return Ok(()) - } - } - *s = ""; - Ok(()) - } - } - 'z' => { - if parse_char(s, 'Z').is_ok() { - tm.tm_utcoff = 0; - Ok(()) - } else { - let sign = if parse_char(s, '+').is_ok() {1} - else if parse_char(s, '-').is_ok() {-1} - else { return Err(ParseError::InvalidZoneOffset) }; - - let hours; - let minutes; - - match match_digits(s, 2, 2, false) { - Some(h) => hours = h, - None => return Err(ParseError::InvalidZoneOffset) - } - - // consume the colon if its present, - // just ignore it otherwise - let _ = parse_char(s, ':'); - - match match_digits(s, 2, 2, false) { - Some(m) => minutes = m, - None => return Err(ParseError::InvalidZoneOffset) - } - - tm.tm_utcoff = sign * (hours * 60 * 60 + minutes * 60); - Ok(()) - } - } - '%' => parse_char(s, '%'), - ch => Err(ParseError::InvalidFormatSpecifier(ch)) - } -} - - -fn match_str(s: &mut &str, needle: &str) -> bool { - if s.starts_with(needle) { - *s = &s[needle.len()..]; - true - } else { - false - } -} - -fn match_strs(ss: &mut &str, strs: &[(&str, i32)]) -> Option<i32> { - for &(needle, value) in strs.iter() { - if match_str(ss, needle) { - return Some(value) - } - } - None -} - -fn match_digits(ss: &mut &str, min_digits : usize, max_digits: usize, ws: bool) -> Option<i32> { - match match_digits_i64(ss, min_digits, max_digits, ws) { - Some(v) => Some(v as i32), - None => None - } -} - -fn match_digits_i64(ss: &mut &str, min_digits : usize, max_digits: usize, ws: bool) -> Option<i64> { - let mut value : i64 = 0; - let mut n = 0; - if ws { - let s2 = ss.trim_left_matches(" "); - n = ss.len() - s2.len(); - if n > max_digits { return None } - } - let chars = ss[n..].char_indices(); - for (_, ch) in chars.take(max_digits - n) { - match ch { - '0' ... '9' => value = value * 10 + (ch as i64 - '0' as i64), - _ => break, - } - n += 1; - } - - if n >= min_digits && n <= max_digits { - *ss = &ss[n..]; - Some(value) - } else { - None - } -} - -fn match_fractional_seconds(ss: &mut &str) -> i32 { - let mut value = 0; - let mut multiplier = NSEC_PER_SEC / 10; - - let mut chars = ss.char_indices(); - let orig = *ss; - for (i, ch) in &mut chars { - *ss = &orig[i..]; - match ch { - '0' ... '9' => { - // This will drop digits after the nanoseconds place - let digit = ch as i32 - '0' as i32; - value += digit * multiplier; - multiplier /= 10; - } - _ => break - } - } - - value -} - -fn match_digits_in_range(ss: &mut &str, - min_digits : usize, max_digits : usize, - ws: bool, min: i32, max: i32) -> Option<i32> { - let before = *ss; - match match_digits(ss, min_digits, max_digits, ws) { - Some(val) if val >= min && val <= max => Some(val), - _ => { *ss = before; None } - } -} - -fn parse_char(s: &mut &str, c: char) -> Result<(), ParseError> { - match s.char_indices().next() { - Some((i, c2)) => { - if c == c2 { - *s = &s[i + c2.len_utf8()..]; - Ok(()) - } else { - Err(ParseError::UnexpectedCharacter(c, c2)) - } - } - None => Err(ParseError::InvalidTime), - } -} diff --git a/deps/time-0.1.34/src/sys.rs b/deps/time-0.1.34/src/sys.rs deleted file mode 100644 index e224f2701..000000000 --- a/deps/time-0.1.34/src/sys.rs +++ /dev/null @@ -1,648 +0,0 @@ -#![allow(bad_style)] - -pub use self::inner::*; - -#[cfg(unix)] -mod inner { - use libc::{self, time_t}; - use std::mem; - use std::io; - use Tm; - - #[cfg(any(target_os = "macos", target_os = "ios"))] - pub use self::mac::*; - #[cfg(all(not(target_os = "macos"), not(target_os = "ios")))] - pub use self::unix::*; - - fn rust_tm_to_tm(rust_tm: &Tm, tm: &mut libc::tm) { - tm.tm_sec = rust_tm.tm_sec; - tm.tm_min = rust_tm.tm_min; - tm.tm_hour = rust_tm.tm_hour; - tm.tm_mday = rust_tm.tm_mday; - tm.tm_mon = rust_tm.tm_mon; - tm.tm_year = rust_tm.tm_year; - tm.tm_wday = rust_tm.tm_wday; - tm.tm_yday = rust_tm.tm_yday; - tm.tm_isdst = rust_tm.tm_isdst; - } - - fn tm_to_rust_tm(tm: &libc::tm, utcoff: i32, rust_tm: &mut Tm) { - rust_tm.tm_sec = tm.tm_sec; - rust_tm.tm_min = tm.tm_min; - rust_tm.tm_hour = tm.tm_hour; - rust_tm.tm_mday = tm.tm_mday; - rust_tm.tm_mon = tm.tm_mon; - rust_tm.tm_year = tm.tm_year; - rust_tm.tm_wday = tm.tm_wday; - rust_tm.tm_yday = tm.tm_yday; - rust_tm.tm_isdst = tm.tm_isdst; - rust_tm.tm_utcoff = utcoff; - } - - type time64_t = i64; - - #[cfg(target_os = "nacl")] - unsafe fn timegm(tm: *const libc::tm) -> time_t { - use std::env::{set_var, var_os, remove_var}; - extern { - fn tzset(); - } - - let ret; - - let current_tz = var_os("TZ"); - set_var("TZ", "UTC"); - tzset(); - - ret = libc::mktime(tm); - - if let Some(tz) = current_tz { - set_var("TZ", tz); - } else { - remove_var("TZ"); - } - tzset(); - - ret - } - - pub fn time_to_utc_tm(sec: i64, tm: &mut Tm) { - unsafe { - let sec = sec as time_t; - let mut out = mem::zeroed(); - if libc::gmtime_r(&sec, &mut out).is_null() { - panic!("gmtime_r failed: {}", io::Error::last_os_error()); - } - tm_to_rust_tm(&out, 0, tm); - } - } - - pub fn time_to_local_tm(sec: i64, tm: &mut Tm) { - unsafe { - let sec = sec as time_t; - let mut out = mem::zeroed(); - if libc::localtime_r(&sec, &mut out).is_null() { - panic!("localtime_r failed: {}", io::Error::last_os_error()); - } - tm_to_rust_tm(&out, out.tm_gmtoff as i32, tm); - } - } - - pub fn utc_tm_to_time(rust_tm: &Tm) -> i64 { - #[cfg(all(target_os = "android", not(target_arch = "aarch64")))] - use libc::timegm64 as timegm; - #[cfg(not(all(target_os = "android", not(target_arch = "aarch64"))))] - use libc::timegm; - - let mut tm = unsafe { mem::zeroed() }; - rust_tm_to_tm(rust_tm, &mut tm); - unsafe { timegm(&mut tm) as i64 } - } - - pub fn local_tm_to_time(rust_tm: &Tm) -> i64 { - let mut tm = unsafe { mem::zeroed() }; - rust_tm_to_tm(rust_tm, &mut tm); - unsafe { libc::mktime(&mut tm) as i64 } - } - - #[cfg(any(target_os = "macos", target_os = "ios"))] - mod mac { - use libc::{self, timeval, mach_timebase_info}; - use std::sync::{Once, ONCE_INIT}; - use std::ops::{Add, Sub}; - use Duration; - - fn info() -> &'static mach_timebase_info { - static mut INFO: mach_timebase_info = mach_timebase_info { - numer: 0, - denom: 0, - }; - static ONCE: Once = ONCE_INIT; - - unsafe { - ONCE.call_once(|| { - mach_timebase_info(&mut INFO); - }); - &INFO - } - } - - pub fn get_time() -> (i64, i32) { - use std::ptr; - let mut tv = timeval { tv_sec: 0, tv_usec: 0 }; - unsafe { libc::gettimeofday(&mut tv, ptr::null_mut()); } - (tv.tv_sec as i64, tv.tv_usec * 1000) - } - - pub fn get_precise_ns() -> u64 { - unsafe { - let time = libc::mach_absolute_time(); - let info = info(); - time * info.numer as u64 / info.denom as u64 - } - } - - #[derive(Clone, Copy, PartialOrd, Ord, PartialEq, Eq, Debug)] - pub struct SteadyTime { t: u64 } - - impl SteadyTime { - pub fn now() -> SteadyTime { - SteadyTime { t: get_precise_ns() } - } - } - impl Sub for SteadyTime { - type Output = Duration; - fn sub(self, other: SteadyTime) -> Duration { - Duration::nanoseconds(self.t as i64 - other.t as i64) - } - } - impl Sub<Duration> for SteadyTime { - type Output = SteadyTime; - fn sub(self, other: Duration) -> SteadyTime { - self + -other - } - } - impl Add<Duration> for SteadyTime { - type Output = SteadyTime; - fn add(self, other: Duration) -> SteadyTime { - let delta = other.num_nanoseconds().unwrap(); - SteadyTime { - t: (self.t as i64 + delta) as u64 - } - } - } - } - - #[cfg(test)] - pub struct TzReset; - - #[cfg(test)] - pub fn set_los_angeles_time_zone() -> TzReset { - use std::env; - env::set_var("TZ", "America/Los_Angeles"); - ::tzset(); - TzReset - } - - #[cfg(test)] - pub fn set_london_with_dst_time_zone() -> TzReset { - use std::env; - env::set_var("TZ", "Europe/London"); - ::tzset(); - TzReset - } - - #[cfg(all(not(target_os = "macos"), not(target_os = "ios")))] - mod unix { - use std::fmt; - use std::cmp::Ordering; - use std::ops::{Add, Sub}; - use libc::{self, timespec}; - - use Duration; - - pub fn get_time() -> (i64, i32) { - let mut tv = libc::timespec { tv_sec: 0, tv_nsec: 0 }; - unsafe { libc::clock_gettime(libc::CLOCK_REALTIME, &mut tv); } - (tv.tv_sec as i64, tv.tv_nsec as i32) - } - - pub fn get_precise_ns() -> u64 { - let mut ts = libc::timespec { tv_sec: 0, tv_nsec: 0 }; - unsafe { - libc::clock_gettime(libc::CLOCK_MONOTONIC, &mut ts); - } - (ts.tv_sec as u64) * 1000000000 + (ts.tv_nsec as u64) - } - - #[derive(Copy)] - pub struct SteadyTime { - t: libc::timespec, - } - - impl fmt::Debug for SteadyTime { - fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { - write!(fmt, "SteadyTime {{ tv_sec: {:?}, tv_nsec: {:?} }}", - self.t.tv_sec, self.t.tv_nsec) - } - } - - impl Clone for SteadyTime { - fn clone(&self) -> SteadyTime { - SteadyTime { t: self.t } - } - } - - impl SteadyTime { - pub fn now() -> SteadyTime { - let mut t = SteadyTime { - t: libc::timespec { - tv_sec: 0, - tv_nsec: 0, - } - }; - unsafe { - assert_eq!(0, libc::clock_gettime(libc::CLOCK_MONOTONIC, - &mut t.t)); - } - t - } - } - - impl Sub for SteadyTime { - type Output = Duration; - fn sub(self, other: SteadyTime) -> Duration { - if self.t.tv_nsec >= other.t.tv_nsec { - Duration::seconds(self.t.tv_sec as i64 - other.t.tv_sec as i64) + - Duration::nanoseconds(self.t.tv_nsec as i64 - other.t.tv_nsec as i64) - } else { - Duration::seconds(self.t.tv_sec as i64 - 1 - other.t.tv_sec as i64) + - Duration::nanoseconds(self.t.tv_nsec as i64 + ::NSEC_PER_SEC as i64 - - other.t.tv_nsec as i64) - } - } - } - - impl Sub<Duration> for SteadyTime { - type Output = SteadyTime; - fn sub(self, other: Duration) -> SteadyTime { - self + -other - } - } - - impl Add<Duration> for SteadyTime { - type Output = SteadyTime; - fn add(mut self, other: Duration) -> SteadyTime { - let seconds = other.num_seconds(); - let nanoseconds = other - Duration::seconds(seconds); - let nanoseconds = nanoseconds.num_nanoseconds().unwrap(); - self.t.tv_sec += seconds as libc::time_t; - self.t.tv_nsec += nanoseconds as libc::c_long; - if self.t.tv_nsec >= ::NSEC_PER_SEC as libc::c_long { - self.t.tv_nsec -= ::NSEC_PER_SEC as libc::c_long; - self.t.tv_sec += 1; - } else if self.t.tv_nsec < 0 { - self.t.tv_sec -= 1; - self.t.tv_nsec += ::NSEC_PER_SEC as libc::c_long; - } - self - } - } - - impl PartialOrd for SteadyTime { - fn partial_cmp(&self, other: &SteadyTime) -> Option<Ordering> { - Some(self.cmp(other)) - } - } - - impl Ord for SteadyTime { - fn cmp(&self, other: &SteadyTime) -> Ordering { - match self.t.tv_sec.cmp(&other.t.tv_sec) { - Ordering::Equal => self.t.tv_nsec.cmp(&other.t.tv_nsec), - ord => ord - } - } - } - - impl PartialEq for SteadyTime { - fn eq(&self, other: &SteadyTime) -> bool { - self.t.tv_sec == other.t.tv_sec && - self.t.tv_nsec == other.t.tv_nsec - } - } - - impl Eq for SteadyTime {} - - } -} - -#[cfg(windows)] -#[allow(non_snake_case)] -mod inner { - use std::io; - use std::mem; - use std::sync::{Once, ONCE_INIT}; - use std::ops::{Add, Sub}; - use {Tm, Duration}; - - use kernel32::*; - use winapi::*; - - fn frequency() -> LARGE_INTEGER { - static mut FREQUENCY: LARGE_INTEGER = 0; - static ONCE: Once = ONCE_INIT; - - unsafe { - ONCE.call_once(|| { - QueryPerformanceFrequency(&mut FREQUENCY); - }); - FREQUENCY - } - } - - const HECTONANOSECS_IN_SEC: i64 = 10_000_000; - const HECTONANOSEC_TO_UNIX_EPOCH: i64 = 11_644_473_600 * HECTONANOSECS_IN_SEC; - - fn time_to_file_time(sec: i64) -> FILETIME { - let t = (((sec * HECTONANOSECS_IN_SEC) + HECTONANOSEC_TO_UNIX_EPOCH)) as u64; - FILETIME { - dwLowDateTime: t as DWORD, - dwHighDateTime: (t >> 32) as DWORD - } - } - - fn file_time_as_u64(ft: &FILETIME) -> u64 { - ((ft.dwHighDateTime as u64) << 32) | (ft.dwLowDateTime as u64) - } - - fn file_time_to_nsec(ft: &FILETIME) -> i32 { - let t = file_time_as_u64(ft) as i64; - ((t % HECTONANOSECS_IN_SEC) * 100) as i32 - } - - fn file_time_to_unix_seconds(ft: &FILETIME) -> i64 { - let t = file_time_as_u64(ft) as i64; - ((t - HECTONANOSEC_TO_UNIX_EPOCH) / HECTONANOSECS_IN_SEC) as i64 - } - - fn system_time_to_file_time(sys: &SYSTEMTIME) -> FILETIME { - unsafe { - let mut ft = mem::zeroed(); - SystemTimeToFileTime(sys, &mut ft); - ft - } - } - - fn tm_to_system_time(tm: &Tm) -> SYSTEMTIME { - let mut sys: SYSTEMTIME = unsafe { mem::zeroed() }; - sys.wSecond = tm.tm_sec as WORD; - sys.wMinute = tm.tm_min as WORD; - sys.wHour = tm.tm_hour as WORD; - sys.wDay = tm.tm_mday as WORD; - sys.wDayOfWeek = tm.tm_wday as WORD; - sys.wMonth = (tm.tm_mon + 1) as WORD; - sys.wYear = (tm.tm_year + 1900) as WORD; - sys - } - - fn system_time_to_tm(sys: &SYSTEMTIME, tm: &mut Tm) { - tm.tm_sec = sys.wSecond as i32; - tm.tm_min = sys.wMinute as i32; - tm.tm_hour = sys.wHour as i32; - tm.tm_mday = sys.wDay as i32; - tm.tm_wday = sys.wDayOfWeek as i32; - tm.tm_mon = (sys.wMonth - 1) as i32; - tm.tm_year = (sys.wYear - 1900) as i32; - tm.tm_yday = yday(tm.tm_year, tm.tm_mon + 1, tm.tm_mday); - - fn yday(year: i32, month: i32, day: i32) -> i32 { - let leap = if month > 2 { - if year % 4 == 0 { 1 } else { 2 } - } else { - 0 - }; - let july = if month > 7 { 1 } else { 0 }; - - (month - 1) * 30 + month / 2 + (day - 1) - leap + july - } - } - - macro_rules! call { - ($name:ident($($arg:expr),*)) => { - if $name($($arg),*) == 0 { - panic!(concat!(stringify!($name), " failed with: {}"), - io::Error::last_os_error()); - } - } - } - - pub fn time_to_utc_tm(sec: i64, tm: &mut Tm) { - let mut out = unsafe { mem::zeroed() }; - let ft = time_to_file_time(sec); - unsafe { - call!(FileTimeToSystemTime(&ft, &mut out)); - } - system_time_to_tm(&out, tm); - tm.tm_utcoff = 0; - } - - pub fn time_to_local_tm(sec: i64, tm: &mut Tm) { - let ft = time_to_file_time(sec); - unsafe { - let mut utc = mem::zeroed(); - let mut local = mem::zeroed(); - call!(FileTimeToSystemTime(&ft, &mut utc)); - call!(SystemTimeToTzSpecificLocalTime(0 as *const _, - &mut utc, &mut local)); - system_time_to_tm(&local, tm); - - let local = system_time_to_file_time(&local); - let local_sec = file_time_to_unix_seconds(&local); - - let mut tz = mem::zeroed(); - GetTimeZoneInformation(&mut tz); - - // SystemTimeToTzSpecificLocalTime already applied the biases so - // check if it non standard - tm.tm_utcoff = (local_sec - sec) as i32; - tm.tm_isdst = if tm.tm_utcoff == -60 * (tz.Bias + tz.StandardBias) { - 0 - } else { - 1 - }; - } - } - - pub fn utc_tm_to_time(tm: &Tm) -> i64 { - unsafe { - let mut ft = mem::zeroed(); - let sys_time = tm_to_system_time(tm); - call!(SystemTimeToFileTime(&sys_time, &mut ft)); - file_time_to_unix_seconds(&ft) - } - } - - pub fn local_tm_to_time(tm: &Tm) -> i64 { - unsafe { - let mut ft = mem::zeroed(); - let mut utc = mem::zeroed(); - let mut sys_time = tm_to_system_time(tm); - call!(TzSpecificLocalTimeToSystemTime(0 as *mut _, - &mut sys_time, &mut utc)); - call!(SystemTimeToFileTime(&utc, &mut ft)); - file_time_to_unix_seconds(&ft) - } - } - - pub fn get_time() -> (i64, i32) { - unsafe { - let mut ft = mem::zeroed(); - GetSystemTimeAsFileTime(&mut ft); - (file_time_to_unix_seconds(&ft), file_time_to_nsec(&ft)) - } - } - - pub fn get_precise_ns() -> u64 { - let mut ticks = 0; - unsafe { - assert!(QueryPerformanceCounter(&mut ticks) == 1); - } - mul_div_i64(ticks as i64, 1000000000, frequency() as i64) as u64 - - } - - #[derive(Clone, Copy, PartialOrd, Ord, PartialEq, Eq, Debug)] - pub struct SteadyTime { - t: LARGE_INTEGER, - } - - impl SteadyTime { - pub fn now() -> SteadyTime { - let mut t = SteadyTime { t: 0 }; - unsafe { QueryPerformanceCounter(&mut t.t); } - t - } - } - - impl Sub for SteadyTime { - type Output = Duration; - fn sub(self, other: SteadyTime) -> Duration { - let diff = self.t as i64 - other.t as i64; - Duration::nanoseconds(mul_div_i64(diff, 1000000000, - frequency() as i64)) - } - } - - impl Sub<Duration> for SteadyTime { - type Output = SteadyTime; - fn sub(self, other: Duration) -> SteadyTime { - self + -other - } - } - - impl Add<Duration> for SteadyTime { - type Output = SteadyTime; - fn add(mut self, other: Duration) -> SteadyTime { - self.t += (other.num_microseconds().unwrap() * frequency() as i64 / - 1_000_000) as LARGE_INTEGER; - self - } - } - - #[cfg(test)] - pub struct TzReset { - old: TIME_ZONE_INFORMATION, - } - - #[cfg(test)] - impl Drop for TzReset { - fn drop(&mut self) { - unsafe { - call!(SetTimeZoneInformation(&self.old)); - } - } - } - - #[cfg(test)] - pub fn set_los_angeles_time_zone() -> TzReset { - acquire_privileges(); - - unsafe { - let mut tz = mem::zeroed::<TIME_ZONE_INFORMATION>(); - GetTimeZoneInformation(&mut tz); - let ret = TzReset { old: tz }; - tz.Bias = 60 * 8; - call!(SetTimeZoneInformation(&tz)); - return ret - } - } - - #[cfg(test)] - pub fn set_london_with_dst_time_zone() -> TzReset { - acquire_privileges(); - - unsafe { - let mut tz = mem::zeroed::<TIME_ZONE_INFORMATION>(); - GetTimeZoneInformation(&mut tz); - let ret = TzReset { old: tz }; - // Since date set precisely this is 2015's dates - tz.Bias = 0; - tz.DaylightBias = -60; - tz.DaylightDate.wYear = 0; - tz.DaylightDate.wMonth = 3; - tz.DaylightDate.wDayOfWeek = 0; - tz.DaylightDate.wDay = 5; - tz.DaylightDate.wHour = 2; - tz.StandardBias = 0; - tz.StandardDate.wYear = 0; - tz.StandardDate.wMonth = 10; - tz.StandardDate.wDayOfWeek = 0; - tz.StandardDate.wDay = 5; - tz.StandardDate.wHour = 2; - call!(SetTimeZoneInformation(&tz)); - return ret - } - } - - // Ensures that this process has the necessary privileges to set a new time - // zone, and this is all transcribed from: - // https://msdn.microsoft.com/en-us/library/windows/desktop/ms724944%28v=vs.85%29.aspx - #[cfg(test)] - fn acquire_privileges() { - use std::sync::{ONCE_INIT, Once}; - use advapi32::*; - const SE_PRIVILEGE_ENABLED: DWORD = 2; - static INIT: Once = ONCE_INIT; - - #[repr(C)] - struct TKP { - tkp: TOKEN_PRIVILEGES, - laa: LUID_AND_ATTRIBUTES, - } - - INIT.call_once(|| unsafe { - let mut hToken = 0 as *mut _; - call!(OpenProcessToken(GetCurrentProcess(), - TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, - &mut hToken)); - - let mut tkp = mem::zeroed::<TKP>(); - assert_eq!(tkp.tkp.Privileges.len(), 0); - let c = ::std::ffi::CString::new("SeTimeZonePrivilege").unwrap(); - call!(LookupPrivilegeValueA(0 as *const _, c.as_ptr(), - &mut tkp.laa.Luid)); - tkp.tkp.PrivilegeCount = 1; - tkp.laa.Attributes = SE_PRIVILEGE_ENABLED; - call!(AdjustTokenPrivileges(hToken, FALSE, &mut tkp.tkp, 0, - 0 as *mut _, 0 as *mut _)); - }); - } - - - - // Computes (value*numer)/denom without overflow, as long as both - // (numer*denom) and the overall result fit into i64 (which is the case - // for our time conversions). - fn mul_div_i64(value: i64, numer: i64, denom: i64) -> i64 { - let q = value / denom; - let r = value % denom; - // Decompose value as (value/denom*denom + value%denom), - // substitute into (value*numer)/denom and simplify. - // r < denom, so (denom*numer) is the upper bound of (r*numer) - q * numer + r * numer / denom - } - - #[test] - fn test_muldiv() { - assert_eq!(mul_div_i64( 1_000_000_000_001, 1_000_000_000, 1_000_000), - 1_000_000_000_001_000); - assert_eq!(mul_div_i64(-1_000_000_000_001, 1_000_000_000, 1_000_000), - -1_000_000_000_001_000); - assert_eq!(mul_div_i64(-1_000_000_000_001,-1_000_000_000, 1_000_000), - 1_000_000_000_001_000); - assert_eq!(mul_div_i64( 1_000_000_000_001, 1_000_000_000,-1_000_000), - -1_000_000_000_001_000); - assert_eq!(mul_div_i64( 1_000_000_000_001,-1_000_000_000,-1_000_000), - 1_000_000_000_001_000); - } -} diff --git a/deps/toml-0.1.27/Cargo.toml b/deps/toml-0.1.27/Cargo.toml deleted file mode 100644 index 0b146ac5b..000000000 --- a/deps/toml-0.1.27/Cargo.toml +++ /dev/null @@ -1,26 +0,0 @@ -[package] - -name = "toml" -version = "0.1.27" -authors = ["Alex Crichton <alex@alexcrichton.com>"] -license = "MIT/Apache-2.0" -readme = "README.md" -keywords = ["encoding"] -repository = "https://github.com/alexcrichton/toml-rs" -homepage = "https://github.com/alexcrichton/toml-rs" -documentation = "http://alexcrichton.com/toml-rs" -description = """ -A native Rust encoder and decoder of TOML-formatted files and streams. Provides -implementations of the standard Encodable/Decodable traits for TOML data to -facilitate deserializing and serializing Rust structures. -""" - -[dependencies] -rustc-serialize = { optional = true, version = "0.3.0" } -serde = { optional = true, version = "0.6" } - -[features] -default = ["rustc-serialize"] - -[dev-dependencies] -rustc-serialize = "0.3" diff --git a/deps/toml-0.1.27/src/decoder/mod.rs b/deps/toml-0.1.27/src/decoder/mod.rs deleted file mode 100644 index 7c444e0cc..000000000 --- a/deps/toml-0.1.27/src/decoder/mod.rs +++ /dev/null @@ -1,223 +0,0 @@ -use std::error; -use std::fmt; -use std::collections::{btree_map, BTreeMap}; -use std::iter::Peekable; - -use Value; -use self::DecodeErrorKind::*; - -#[cfg(feature = "rustc-serialize")] mod rustc_serialize; -#[cfg(feature = "serde")] mod serde; - -/// A structure to transform TOML values into Rust values. -/// -/// This decoder implements the serialization `Decoder` interface, allowing -/// `Decodable` types to be generated by this decoder. The input is any -/// arbitrary TOML value. -pub struct Decoder { - /// The TOML value left over after decoding. This can be used to inspect - /// whether fields were decoded or not. - pub toml: Option<Value>, - cur_field: Option<String>, - cur_map: Peekable<btree_map::IntoIter<String, Value>>, - leftover_map: ::Table, -} - -/// Description for errors which can occur while decoding a type. -#[derive(PartialEq, Debug)] -pub struct DecodeError { - /// Field that this error applies to. - pub field: Option<String>, - /// The type of error which occurred while decoding, - pub kind: DecodeErrorKind, -} - -/// Enumeration of possible errors which can occur while decoding a structure. -#[derive(PartialEq, Debug)] -pub enum DecodeErrorKind { - /// An error flagged by the application, e.g. value out of range - ApplicationError(String), - /// A field was expected, but none was found. - ExpectedField(/* type */ Option<&'static str>), - /// A field was found, but it was not an expected one. - UnknownField, - /// A field was found, but it had the wrong type. - ExpectedType(/* expected */ &'static str, /* found */ &'static str), - /// The nth map key was expected, but none was found. - ExpectedMapKey(usize), - /// The nth map element was expected, but none was found. - ExpectedMapElement(usize), - /// An enum decoding was requested, but no variants were supplied - NoEnumVariants, - /// The unit type was being decoded, but a non-zero length string was found - NilTooLong, - /// There was an error with the syntactical structure of the TOML. - SyntaxError, - /// The end of the TOML input was reached too soon - EndOfStream, -} - -/// Decodes a TOML value into a decodable type. -/// -/// This function will consume the given TOML value and attempt to decode it -/// into the type specified. If decoding fails, `None` will be returned. If a -/// finer-grained error is desired, then it is recommended to use `Decodable` -/// directly. -#[cfg(feature = "rustc-serialize")] -pub fn decode<T: ::rustc_serialize::Decodable>(toml: Value) -> Option<T> { - ::rustc_serialize::Decodable::decode(&mut Decoder::new(toml)).ok() -} - -/// Decodes a TOML value into a decodable type. -/// -/// This function will consume the given TOML value and attempt to decode it -/// into the type specified. If decoding fails, `None` will be returned. If a -/// finer-grained error is desired, then it is recommended to use `Decodable` -/// directly. -#[cfg(all(not(feature = "rustc-serialize"), feature = "serde"))] -pub fn decode<T: ::serde::Deserialize>(toml: Value) -> Option<T> { - ::serde::Deserialize::deserialize(&mut Decoder::new(toml)).ok() -} - -/// Decodes a string into a toml-encoded value. -/// -/// This function will parse the given string into a TOML value, and then parse -/// the TOML value into the desired type. If any error occurs, `None` is -/// returned. -/// -/// If more fine-grained errors are desired, these steps should be driven -/// manually. -#[cfg(feature = "rustc-serialize")] -pub fn decode_str<T: ::rustc_serialize::Decodable>(s: &str) -> Option<T> { - ::Parser::new(s).parse().and_then(|t| decode(Value::Table(t))) -} - -/// Decodes a string into a toml-encoded value. -/// -/// This function will parse the given string into a TOML value, and then parse -/// the TOML value into the desired type. If any error occurs, `None` is -/// returned. -/// -/// If more fine-grained errors are desired, these steps should be driven -/// manually. -#[cfg(all(not(feature = "rustc-serialize"), feature = "serde"))] -pub fn decode_str<T: ::serde::Deserialize>(s: &str) -> Option<T> { - ::Parser::new(s).parse().and_then(|t| decode(Value::Table(t))) -} - -impl Decoder { - /// Creates a new decoder, consuming the TOML value to decode. - /// - /// This decoder can be passed to the `Decodable` methods or driven - /// manually. - pub fn new(toml: Value) -> Decoder { - Decoder { - toml: Some(toml), - cur_field: None, - leftover_map: BTreeMap::new(), - cur_map: BTreeMap::new().into_iter().peekable(), - } - } - - fn sub_decoder(&self, toml: Option<Value>, field: &str) -> Decoder { - Decoder { - toml: toml, - cur_field: if field.len() == 0 { - self.cur_field.clone() - } else { - match self.cur_field { - None => Some(format!("{}", field)), - Some(ref s) => Some(format!("{}.{}", s, field)) - } - }, - leftover_map: BTreeMap::new(), - cur_map: BTreeMap::new().into_iter().peekable(), - } - } - - fn err(&self, kind: DecodeErrorKind) -> DecodeError { - DecodeError { - field: self.cur_field.clone(), - kind: kind, - } - } - - fn mismatch(&self, expected: &'static str, - found: &Option<Value>) -> DecodeError{ - match *found { - Some(ref val) => self.err(ExpectedType(expected, val.type_str())), - None => self.err(ExpectedField(Some(expected))), - } - } -} - -impl fmt::Display for DecodeError { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - try!(match self.kind { - ApplicationError(ref err) => { - write!(f, "{}", err) - } - ExpectedField(expected_type) => { - match expected_type { - Some("table") => write!(f, "expected a section"), - Some(e) => write!(f, "expected a value of type `{}`", e), - None => write!(f, "expected a value"), - } - } - UnknownField => write!(f, "unknown field"), - ExpectedType(expected, found) => { - fn humanize(s: &str) -> String { - if s == "section" { - format!("a section") - } else { - format!("a value of type `{}`", s) - } - } - write!(f, "expected {}, but found {}", - humanize(expected), - humanize(found)) - } - ExpectedMapKey(idx) => { - write!(f, "expected at least {} keys", idx + 1) - } - ExpectedMapElement(idx) => { - write!(f, "expected at least {} elements", idx + 1) - } - NoEnumVariants => { - write!(f, "expected an enum variant to decode to") - } - NilTooLong => { - write!(f, "expected 0-length string") - } - SyntaxError => { - write!(f, "syntax error") - } - EndOfStream => { - write!(f, "end of stream") - } - }); - match self.field { - Some(ref s) => { - write!(f, " for the key `{}`", s) - } - None => Ok(()) - } - } -} - -impl error::Error for DecodeError { - fn description(&self) -> &str { - match self.kind { - ApplicationError(ref s) => &**s, - ExpectedField(..) => "expected a field", - UnknownField => "found an unknown field", - ExpectedType(..) => "expected a type", - ExpectedMapKey(..) => "expected a map key", - ExpectedMapElement(..) => "expected a map element", - NoEnumVariants => "no enum variants to decode to", - NilTooLong => "nonzero length string representing nil", - SyntaxError => "syntax error", - EndOfStream => "end of stream", - } - } -} diff --git a/deps/toml-0.1.27/src/decoder/serde.rs b/deps/toml-0.1.27/src/decoder/serde.rs deleted file mode 100644 index 47221b61f..000000000 --- a/deps/toml-0.1.27/src/decoder/serde.rs +++ /dev/null @@ -1,511 +0,0 @@ -use serde::de; -use Value; -use super::{Decoder, DecodeError, DecodeErrorKind}; -use std::collections::BTreeMap; - -fn se2toml(err: de::value::Error, ty: &'static str) -> DecodeError { - match err { - de::value::Error::SyntaxError => de::Error::syntax(ty), - de::value::Error::EndOfStreamError => de::Error::end_of_stream(), - de::value::Error::MissingFieldError(s) => { - DecodeError { - field: Some(s.to_string()), - kind: DecodeErrorKind::ExpectedField(Some(ty)), - } - }, - de::value::Error::UnknownFieldError(s) => { - DecodeError { - field: Some(s.to_string()), - kind: DecodeErrorKind::UnknownField, - } - }, - } -} - -impl de::Deserializer for Decoder { - type Error = DecodeError; - - fn visit<V>(&mut self, mut visitor: V) -> Result<V::Value, DecodeError> - where V: de::Visitor - { - match self.toml.take() { - Some(Value::String(s)) => { - visitor.visit_string(s).map_err(|e| se2toml(e, "string")) - } - Some(Value::Integer(i)) => { - visitor.visit_i64(i).map_err(|e| se2toml(e, "integer")) - } - Some(Value::Float(f)) => { - visitor.visit_f64(f).map_err(|e| se2toml(e, "float")) - } - Some(Value::Boolean(b)) => { - visitor.visit_bool(b).map_err(|e| se2toml(e, "bool")) - } - Some(Value::Datetime(s)) => { - visitor.visit_string(s).map_err(|e| se2toml(e, "date")) - } - Some(Value::Array(a)) => { - let len = a.len(); - let iter = a.into_iter(); - visitor.visit_seq(SeqDeserializer::new(iter, len, &mut self.toml)) - } - Some(Value::Table(t)) => { - visitor.visit_map(MapVisitor { - iter: t.into_iter(), - de: self, - key: None, - value: None, - }) - } - None => Err(de::Error::end_of_stream()), - } - } - - fn visit_isize<V>(&mut self, visitor: V) -> Result<V::Value, DecodeError> - where V: de::Visitor - { - self.visit_i64(visitor) - } - - fn visit_i8<V>(&mut self, visitor: V) -> Result<V::Value, DecodeError> - where V: de::Visitor - { - self.visit_i64(visitor) - } - fn visit_i16<V>(&mut self, visitor: V) -> Result<V::Value, DecodeError> - where V: de::Visitor - { - self.visit_i64(visitor) - } - - fn visit_i32<V>(&mut self, visitor: V) -> Result<V::Value, DecodeError> - where V: de::Visitor - { - self.visit_i64(visitor) - } - - fn visit_i64<V>(&mut self, mut visitor: V) -> Result<V::Value, DecodeError> - where V: de::Visitor - { - match self.toml.take() { - Some(Value::Integer(f)) => { - visitor.visit_i64(f).map_err(|e| se2toml(e, "integer")) - } - ref found => Err(self.mismatch("integer", found)), - } - } - - fn visit_usize<V>(&mut self, visitor: V) -> Result<V::Value, DecodeError> - where V: de::Visitor - { - self.visit_i64(visitor) - } - - fn visit_u8<V>(&mut self, visitor: V) -> Result<V::Value, DecodeError> - where V: de::Visitor - { - self.visit_i64(visitor) - } - fn visit_u16<V>(&mut self, visitor: V) -> Result<V::Value, DecodeError> - where V: de::Visitor - { - self.visit_i64(visitor) - } - - fn visit_u32<V>(&mut self, visitor: V) -> Result<V::Value, DecodeError> - where V: de::Visitor - { - self.visit_i64(visitor) - } - - fn visit_u64<V>(&mut self, visitor: V) -> Result<V::Value, DecodeError> - where V: de::Visitor - { - self.visit_i64(visitor) - } - - fn visit_f32<V>(&mut self, visitor: V) -> Result<V::Value, DecodeError> - where V: de::Visitor - { - self.visit_f64(visitor) - } - - fn visit_f64<V>(&mut self, mut visitor: V) -> Result<V::Value, DecodeError> - where V: de::Visitor - { - match self.toml.take() { - Some(Value::Float(f)) => { - visitor.visit_f64(f).map_err(|e| se2toml(e, "float")) - } - ref found => Err(self.mismatch("float", found)), - } - } - - fn visit_option<V>(&mut self, mut visitor: V) -> Result<V::Value, DecodeError> - where V: de::Visitor - { - if self.toml.is_none() { - visitor.visit_none() - } else { - visitor.visit_some(self) - } - } - - fn visit_seq<V>(&mut self, mut visitor: V) -> Result<V::Value, DecodeError> - where V: de::Visitor, - { - if self.toml.is_none() { - let iter = None::<i32>.into_iter(); - let e = visitor.visit_seq(de::value::SeqDeserializer::new(iter, 0)); - e.map_err(|e| se2toml(e, "array")) - } else { - self.visit(visitor) - } - } - - fn visit_enum<V>(&mut self, - _enum: &str, - variants: &[&str], - mut visitor: V) -> Result<V::Value, DecodeError> - where V: de::EnumVisitor, - { - // When decoding enums, this crate takes the strategy of trying to - // decode the current TOML as all of the possible variants, returning - // success on the first one that succeeds. - // - // Note that fidelity of the errors returned here is a little nebulous, - // but we try to return the error that had the relevant field as the - // longest field. This way we hopefully match an error against what was - // most likely being written down without losing too much info. - let mut first_error = None::<DecodeError>; - - for variant in 0..variants.len() { - let mut de = VariantVisitor { - de: self.sub_decoder(self.toml.clone(), ""), - variant: variant, - }; - - match visitor.visit(&mut de) { - Ok(value) => { - self.toml = de.de.toml; - return Ok(value); - } - Err(e) => { - if let Some(ref first) = first_error { - let my_len = e.field.as_ref().map(|s| s.len()); - let first_len = first.field.as_ref().map(|s| s.len()); - if my_len <= first_len { - continue - } - } - first_error = Some(e); - } - } - } - - Err(first_error.unwrap_or_else(|| self.err(DecodeErrorKind::NoEnumVariants))) - } -} - -struct VariantVisitor { - de: Decoder, - variant: usize, -} - -impl de::VariantVisitor for VariantVisitor { - type Error = DecodeError; - - fn visit_variant<V>(&mut self) -> Result<V, DecodeError> - where V: de::Deserialize - { - use serde::de::value::ValueDeserializer; - - let mut de = self.variant.into_deserializer(); - - de::Deserialize::deserialize(&mut de).map_err(|e| se2toml(e, "variant")) - } - - fn visit_unit(&mut self) -> Result<(), DecodeError> { - de::Deserialize::deserialize(&mut self.de) - } - - fn visit_newtype<T>(&mut self) -> Result<T, DecodeError> - where T: de::Deserialize, - { - de::Deserialize::deserialize(&mut self.de) - } - - fn visit_tuple<V>(&mut self, - _len: usize, - visitor: V) -> Result<V::Value, DecodeError> - where V: de::Visitor, - { - de::Deserializer::visit(&mut self.de, visitor) - } - - fn visit_struct<V>(&mut self, - _fields: &'static [&'static str], - visitor: V) -> Result<V::Value, DecodeError> - where V: de::Visitor, - { - de::Deserializer::visit(&mut self.de, visitor) - } -} - -struct SeqDeserializer<'a, I> { - iter: I, - len: usize, - toml: &'a mut Option<Value>, -} - -impl<'a, I> SeqDeserializer<'a, I> where I: Iterator<Item=Value> { - fn new(iter: I, len: usize, toml: &'a mut Option<Value>) -> Self { - SeqDeserializer { - iter: iter, - len: len, - toml: toml, - } - } - - fn put_value_back(&mut self, v: Value) { - *self.toml = self.toml.take().or(Some(Value::Array(Vec::new()))); - match self.toml.as_mut().unwrap() { - &mut Value::Array(ref mut a) => { - a.push(v); - }, - _ => unreachable!(), - } - } -} - -impl<'a, I> de::Deserializer for SeqDeserializer<'a, I> - where I: Iterator<Item=Value>, -{ - type Error = DecodeError; - - fn visit<V>(&mut self, mut visitor: V) -> Result<V::Value, DecodeError> - where V: de::Visitor, - { - visitor.visit_seq(self) - } -} - -impl<'a, I> de::SeqVisitor for SeqDeserializer<'a, I> - where I: Iterator<Item=Value> -{ - type Error = DecodeError; - - fn visit<V>(&mut self) -> Result<Option<V>, DecodeError> - where V: de::Deserialize - { - match self.iter.next() { - Some(value) => { - self.len -= 1; - let mut de = Decoder::new(value); - let v = try!(de::Deserialize::deserialize(&mut de)); - if let Some(t) = de.toml { - self.put_value_back(t); - } - Ok(Some(v)) - } - None => Ok(None), - } - } - - fn end(&mut self) -> Result<(), DecodeError> { - if self.len == 0 { - Ok(()) - } else { - Err(de::Error::end_of_stream()) - } - } - - fn size_hint(&self) -> (usize, Option<usize>) { - (self.len, Some(self.len)) - } -} - -impl de::Error for DecodeError { - fn syntax(_: &str) -> DecodeError { - DecodeError { field: None, kind: DecodeErrorKind::SyntaxError } - } - fn end_of_stream() -> DecodeError { - DecodeError { field: None, kind: DecodeErrorKind::EndOfStream } - } - fn missing_field(name: &'static str) -> DecodeError { - DecodeError { - field: Some(name.to_string()), - kind: DecodeErrorKind::ExpectedField(None), - } - } - fn unknown_field(name: &str) -> DecodeError { - DecodeError { - field: Some(name.to_string()), - kind: DecodeErrorKind::UnknownField, - } - } -} - -struct MapVisitor<'a, I> { - iter: I, - de: &'a mut Decoder, - key: Option<String>, - value: Option<Value>, -} - -impl<'a, I> MapVisitor<'a, I> { - fn put_value_back(&mut self, v: Value) { - self.de.toml = self.de.toml.take().or_else(|| { - Some(Value::Table(BTreeMap::new())) - }); - - match self.de.toml.as_mut().unwrap() { - &mut Value::Table(ref mut t) => { - t.insert(self.key.take().unwrap(), v); - }, - _ => unreachable!(), - } - } -} - -impl<'a, I> de::MapVisitor for MapVisitor<'a, I> - where I: Iterator<Item=(String, Value)> -{ - type Error = DecodeError; - - fn visit_key<K>(&mut self) -> Result<Option<K>, DecodeError> - where K: de::Deserialize - { - while let Some((k, v)) = self.iter.next() { - let mut dec = self.de.sub_decoder(Some(Value::String(k.clone())), &k); - self.key = Some(k); - - match de::Deserialize::deserialize(&mut dec) { - Ok(val) => { - self.value = Some(v); - return Ok(Some(val)) - } - - // If this was an unknown field, then we put the toml value - // back into the map and keep going. - Err(DecodeError {kind: DecodeErrorKind::UnknownField, ..}) => { - self.put_value_back(v); - } - - Err(e) => return Err(e), - } - } - Ok(None) - } - - fn visit_value<V>(&mut self) -> Result<V, DecodeError> - where V: de::Deserialize - { - match self.value.take() { - Some(t) => { - let mut dec = { - // Borrowing the key here because Rust doesn't have - // non-lexical borrows yet. - let key = match self.key { - Some(ref key) => &**key, - None => "" - }; - - self.de.sub_decoder(Some(t), key) - }; - let v = try!(de::Deserialize::deserialize(&mut dec)); - if let Some(t) = dec.toml { - self.put_value_back(t); - } - Ok(v) - }, - None => Err(de::Error::end_of_stream()) - } - } - - fn end(&mut self) -> Result<(), DecodeError> { - Ok(()) - } - - fn missing_field<V>(&mut self, field_name: &'static str) - -> Result<V, DecodeError> where V: de::Deserialize { - // See if the type can deserialize from a unit. - match de::Deserialize::deserialize(&mut UnitDeserializer) { - Err(DecodeError { - kind: DecodeErrorKind::SyntaxError, - field, - }) => Err(DecodeError { - field: field.or(Some(field_name.to_string())), - kind: DecodeErrorKind::ExpectedField(None), - }), - v => v, - } - } -} - -struct UnitDeserializer; - -impl de::Deserializer for UnitDeserializer { - type Error = DecodeError; - - fn visit<V>(&mut self, mut visitor: V) -> Result<V::Value, DecodeError> - where V: de::Visitor, - { - visitor.visit_unit() - } - - fn visit_option<V>(&mut self, mut visitor: V) -> Result<V::Value, DecodeError> - where V: de::Visitor, - { - visitor.visit_none() - } -} - -impl de::Deserialize for Value { - fn deserialize<D>(deserializer: &mut D) -> Result<Value, D::Error> - where D: de::Deserializer - { - struct ValueVisitor; - - impl de::Visitor for ValueVisitor { - type Value = Value; - - fn visit_bool<E>(&mut self, value: bool) -> Result<Value, E> { - Ok(Value::Boolean(value)) - } - - fn visit_i64<E>(&mut self, value: i64) -> Result<Value, E> { - Ok(Value::Integer(value)) - } - - fn visit_f64<E>(&mut self, value: f64) -> Result<Value, E> { - Ok(Value::Float(value)) - } - - fn visit_str<E>(&mut self, value: &str) -> Result<Value, E> { - Ok(Value::String(value.into())) - } - - fn visit_string<E>(&mut self, value: String) -> Result<Value, E> { - Ok(Value::String(value)) - } - - fn visit_seq<V>(&mut self, visitor: V) -> Result<Value, V::Error> - where V: de::SeqVisitor - { - let values = try!(de::impls::VecVisitor::new().visit_seq(visitor)); - Ok(Value::Array(values)) - } - - fn visit_map<V>(&mut self, visitor: V) -> Result<Value, V::Error> - where V: de::MapVisitor - { - let mut v = de::impls::BTreeMapVisitor::new(); - let values = try!(v.visit_map(visitor)); - Ok(Value::Table(values)) - } - } - - deserializer.visit(ValueVisitor) - } -} diff --git a/deps/toml-0.1.27/src/encoder/mod.rs b/deps/toml-0.1.27/src/encoder/mod.rs deleted file mode 100644 index cdfe8e2a1..000000000 --- a/deps/toml-0.1.27/src/encoder/mod.rs +++ /dev/null @@ -1,211 +0,0 @@ -use std::collections::BTreeMap; -use std::error; -use std::fmt; -use std::mem; - -use {Value, Table}; - -#[cfg(feature = "rustc-serialize")] mod rustc_serialize; -#[cfg(feature = "serde")] mod serde; - -/// A structure to transform Rust values into TOML values. -/// -/// This encoder implements the serialization `Encoder` interface, allowing -/// `Encodable` rust types to be fed into the encoder. The output of this -/// encoder is a TOML `Table` structure. The resulting TOML can be stringified -/// if necessary. -/// -/// # Example -/// -/// ``` -/// extern crate rustc_serialize; -/// extern crate toml; -/// -/// # fn main() { -/// use toml::{Encoder, Value}; -/// use rustc_serialize::Encodable; -/// -/// #[derive(RustcEncodable)] -/// struct MyStruct { foo: isize, bar: String } -/// let my_struct = MyStruct { foo: 4, bar: "hello!".to_string() }; -/// -/// let mut e = Encoder::new(); -/// my_struct.encode(&mut e).unwrap(); -/// -/// assert_eq!(e.toml.get(&"foo".to_string()), Some(&Value::Integer(4))) -/// # } -/// ``` -pub struct Encoder { - /// Output TOML that is emitted. The current version of this encoder forces - /// the top-level representation of a structure to be a table. - /// - /// This field can be used to extract the return value after feeding a value - /// into this `Encoder`. - pub toml: Table, - state: State, -} - -/// Enumeration of errors which can occur while encoding a rust value into a -/// TOML value. -#[allow(missing_copy_implementations)] -#[derive(Debug)] -pub enum Error { - /// Indication that a key was needed when a value was emitted, but no key - /// was previously emitted. - NeedsKey, - /// Indication that a key was emitted, but not value was emitted. - NoValue, - /// Indicates that a map key was attempted to be emitted at an invalid - /// location. - InvalidMapKeyLocation, - /// Indicates that a type other than a string was attempted to be used as a - /// map key type. - InvalidMapKeyType, -} - -#[derive(PartialEq)] -enum State { - Start, - NextKey(String), - NextArray(Vec<Value>), - NextMapKey, -} - -impl Encoder { - /// Constructs a new encoder which will emit to the given output stream. - pub fn new() -> Encoder { - Encoder { state: State::Start, toml: BTreeMap::new() } - } - - fn emit_value(&mut self, v: Value) -> Result<(), Error> { - match mem::replace(&mut self.state, State::Start) { - State::NextKey(key) => { self.toml.insert(key, v); Ok(()) } - State::NextArray(mut vec) => { - // TODO: validate types - vec.push(v); - self.state = State::NextArray(vec); - Ok(()) - } - State::NextMapKey => { - match v { - Value::String(s) => { self.state = State::NextKey(s); Ok(()) } - _ => Err(Error::InvalidMapKeyType) - } - } - _ => Err(Error::NeedsKey) - } - } - - fn emit_none(&mut self) -> Result<(), Error> { - match mem::replace(&mut self.state, State::Start) { - State::Start => unreachable!(), - State::NextKey(_) => Ok(()), - State::NextArray(..) => panic!("how to encode None in an array?"), - State::NextMapKey => Err(Error::InvalidMapKeyLocation), - } - } - - fn seq<F>(&mut self, f: F) -> Result<(), Error> - where F: FnOnce(&mut Encoder) -> Result<(), Error> - { - let old = mem::replace(&mut self.state, State::NextArray(Vec::new())); - try!(f(self)); - match mem::replace(&mut self.state, old) { - State::NextArray(v) => self.emit_value(Value::Array(v)), - _ => unreachable!(), - } - } - - fn table<F>(&mut self, f: F) -> Result<(), Error> - where F: FnOnce(&mut Encoder) -> Result<(), Error> - { - match mem::replace(&mut self.state, State::Start) { - State::NextKey(key) => { - let mut nested = Encoder::new(); - try!(f(&mut nested)); - self.toml.insert(key, Value::Table(nested.toml)); - Ok(()) - } - State::NextArray(mut arr) => { - let mut nested = Encoder::new(); - try!(f(&mut nested)); - arr.push(Value::Table(nested.toml)); - self.state = State::NextArray(arr); - Ok(()) - } - State::Start => f(self), - State::NextMapKey => Err(Error::InvalidMapKeyLocation), - } - } - - fn table_key<F>(&mut self, f: F) -> Result<(), Error> - where F: FnOnce(&mut Encoder) -> Result<(), Error> - { - match mem::replace(&mut self.state, State::NextMapKey) { - State::Start => {} - _ => return Err(Error::InvalidMapKeyLocation), - } - try!(f(self)); - match self.state { - State::NextKey(_) => Ok(()), - _ => Err(Error::InvalidMapKeyLocation), - } - } -} - -/// Encodes an encodable value into a TOML value. -/// -/// This function expects the type given to represent a TOML table in some form. -/// If encoding encounters an error, then this function will fail the task. -#[cfg(feature = "rustc-serialize")] -pub fn encode<T: ::rustc_serialize::Encodable>(t: &T) -> Value { - let mut e = Encoder::new(); - t.encode(&mut e).unwrap(); - Value::Table(e.toml) -} - -/// Encodes an encodable value into a TOML value. -/// -/// This function expects the type given to represent a TOML table in some form. -/// If encoding encounters an error, then this function will fail the task. -#[cfg(all(not(feature = "rustc-serialize"), feature = "serde"))] -pub fn encode<T: ::serde::Serialize>(t: &T) -> Value { - let mut e = Encoder::new(); - t.serialize(&mut e).unwrap(); - Value::Table(e.toml) -} - -/// Encodes an encodable value into a TOML string. -/// -/// This function expects the type given to represent a TOML table in some form. -/// If encoding encounters an error, then this function will fail the task. -#[cfg(feature = "rustc-serialize")] -pub fn encode_str<T: ::rustc_serialize::Encodable>(t: &T) -> String { - encode(t).to_string() -} - -/// Encodes an encodable value into a TOML string. -/// -/// This function expects the type given to represent a TOML table in some form. -/// If encoding encounters an error, then this function will fail the task. -#[cfg(all(not(feature = "rustc-serialize"), feature = "serde"))] -pub fn encode_str<T: ::serde::Serialize>(t: &T) -> String { - encode(t).to_string() -} - -impl fmt::Display for Error { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - match *self { - Error::NeedsKey => write!(f, "need a key to encode"), - Error::NoValue => write!(f, "no value to emit for a previous key"), - Error::InvalidMapKeyLocation => write!(f, "a map cannot be emitted \ - at this location"), - Error::InvalidMapKeyType => write!(f, "only strings can be used as \ - key types"), - } - } -} - -impl error::Error for Error { - fn description(&self) -> &str { "TOML encoding error" } -} diff --git a/deps/toml-0.1.27/src/encoder/serde.rs b/deps/toml-0.1.27/src/encoder/serde.rs deleted file mode 100644 index 3b5018128..000000000 --- a/deps/toml-0.1.27/src/encoder/serde.rs +++ /dev/null @@ -1,102 +0,0 @@ -use serde::ser; -use Value; -use super::{Encoder, Error}; - -impl ser::Serializer for Encoder { - type Error = Error; - - fn visit_bool(&mut self, v: bool) -> Result<(), Error> { - self.emit_value(Value::Boolean(v)) - } - fn visit_i64(&mut self, v: i64) -> Result<(), Error> { - self.emit_value(Value::Integer(v)) - } - fn visit_u64(&mut self, v: u64) -> Result<(), Error> { - self.visit_i64(v as i64) - } - fn visit_f64(&mut self, v: f64) -> Result<(), Error> { - self.emit_value(Value::Float(v)) - } - fn visit_str(&mut self, value: &str) -> Result<(), Error> { - self.emit_value(Value::String(value.to_string())) - } - fn visit_unit(&mut self) -> Result<(), Error> { - Ok(()) - } - fn visit_none(&mut self) -> Result<(), Error> { - self.emit_none() - } - fn visit_some<V>(&mut self, value: V) -> Result<(), Error> - where V: ser::Serialize - { - value.serialize(self) - } - fn visit_seq<V>(&mut self, mut visitor: V) -> Result<(), Error> - where V: ser::SeqVisitor - { - self.seq(|me| { - while try!(visitor.visit(me)).is_some() {} - Ok(()) - }) - } - fn visit_seq_elt<T>(&mut self, value: T) -> Result<(), Error> - where T: ser::Serialize - { - value.serialize(self) - } - fn visit_map<V>(&mut self, mut visitor: V) -> Result<(), Error> - where V: ser::MapVisitor - { - self.table(|me| { - while try!(visitor.visit(me)).is_some() {} - Ok(()) - }) - } - fn visit_map_elt<K, V>(&mut self, key: K, value: V) -> Result<(), Error> - where K: ser::Serialize, V: ser::Serialize - { - try!(self.table_key(|me| key.serialize(me))); - try!(value.serialize(self)); - Ok(()) - } - fn visit_newtype_struct<T>(&mut self, - _name: &'static str, - value: T) -> Result<(), Self::Error> - where T: ser::Serialize, - { - // Don't serialize the newtype struct in a tuple. - value.serialize(self) - } - fn visit_newtype_variant<T>(&mut self, - _name: &'static str, - _variant_index: usize, - _variant: &'static str, - value: T) -> Result<(), Self::Error> - where T: ser::Serialize, - { - // Don't serialize the newtype struct variant in a tuple. - value.serialize(self) - } -} - -impl ser::Serialize for Value { - fn serialize<E>(&self, e: &mut E) -> Result<(), E::Error> - where E: ser::Serializer - { - match *self { - Value::String(ref s) => e.visit_str(s), - Value::Integer(i) => e.visit_i64(i), - Value::Float(f) => e.visit_f64(f), - Value::Boolean(b) => e.visit_bool(b), - Value::Datetime(ref s) => e.visit_str(s), - Value::Array(ref a) => { - e.visit_seq(ser::impls::SeqIteratorVisitor::new(a.iter(), - Some(a.len()))) - } - Value::Table(ref t) => { - e.visit_map(ser::impls::MapIteratorVisitor::new(t.iter(), - Some(t.len()))) - } - } - } -} diff --git a/deps/toml-0.1.28/.gitignore b/deps/toml-0.1.28/.gitignore new file mode 100644 index 000000000..a9d37c560 --- /dev/null +++ b/deps/toml-0.1.28/.gitignore @@ -0,0 +1,2 @@ +target +Cargo.lock diff --git a/deps/toml-0.1.27/.travis.yml b/deps/toml-0.1.28/.travis.yml similarity index 100% rename from deps/toml-0.1.27/.travis.yml rename to deps/toml-0.1.28/.travis.yml diff --git a/deps/toml-0.1.28/Cargo.toml b/deps/toml-0.1.28/Cargo.toml new file mode 100644 index 000000000..4daf56c02 --- /dev/null +++ b/deps/toml-0.1.28/Cargo.toml @@ -0,0 +1,26 @@ +[package] + +name = "toml" +version = "0.1.28" +authors = ["Alex Crichton <alex@alexcrichton.com>"] +license = "MIT/Apache-2.0" +readme = "README.md" +keywords = ["encoding"] +repository = "https://github.com/alexcrichton/toml-rs" +homepage = "https://github.com/alexcrichton/toml-rs" +documentation = "http://alexcrichton.com/toml-rs" +description = """ +A native Rust encoder and decoder of TOML-formatted files and streams. Provides +implementations of the standard Encodable/Decodable traits for TOML data to +facilitate deserializing and serializing Rust structures. +""" + +[dependencies] +rustc-serialize = { optional = true, version = "0.3.0" } +serde = { optional = true, version = "0.7" } + +[features] +default = ["rustc-serialize"] + +[dev-dependencies] +rustc-serialize = "0.3" diff --git a/deps/toml-0.1.27/LICENSE-APACHE b/deps/toml-0.1.28/LICENSE-APACHE similarity index 100% rename from deps/toml-0.1.27/LICENSE-APACHE rename to deps/toml-0.1.28/LICENSE-APACHE diff --git a/deps/toml-0.1.27/LICENSE-MIT b/deps/toml-0.1.28/LICENSE-MIT similarity index 100% rename from deps/toml-0.1.27/LICENSE-MIT rename to deps/toml-0.1.28/LICENSE-MIT diff --git a/deps/toml-0.1.27/README.md b/deps/toml-0.1.28/README.md similarity index 100% rename from deps/toml-0.1.27/README.md rename to deps/toml-0.1.28/README.md diff --git a/deps/toml-0.1.27/examples/toml2json.rs b/deps/toml-0.1.28/examples/toml2json.rs similarity index 100% rename from deps/toml-0.1.27/examples/toml2json.rs rename to deps/toml-0.1.28/examples/toml2json.rs diff --git a/deps/toml-0.1.28/src/decoder/mod.rs b/deps/toml-0.1.28/src/decoder/mod.rs new file mode 100644 index 000000000..a59628038 --- /dev/null +++ b/deps/toml-0.1.28/src/decoder/mod.rs @@ -0,0 +1,235 @@ +use std::error; +use std::fmt; +use std::collections::{btree_map, BTreeMap}; +use std::iter::Peekable; + +use Value; +use self::DecodeErrorKind::*; + +#[cfg(feature = "rustc-serialize")] mod rustc_serialize; +#[cfg(feature = "serde")] mod serde; + +/// A structure to transform TOML values into Rust values. +/// +/// This decoder implements the serialization `Decoder` interface, allowing +/// `Decodable` types to be generated by this decoder. The input is any +/// arbitrary TOML value. +pub struct Decoder { + /// The TOML value left over after decoding. This can be used to inspect + /// whether fields were decoded or not. + pub toml: Option<Value>, + cur_field: Option<String>, + cur_map: Peekable<btree_map::IntoIter<String, Value>>, + leftover_map: ::Table, +} + +/// Description for errors which can occur while decoding a type. +#[derive(PartialEq, Debug)] +pub struct DecodeError { + /// Field that this error applies to. + pub field: Option<String>, + /// The type of error which occurred while decoding, + pub kind: DecodeErrorKind, +} + +/// Enumeration of possible errors which can occur while decoding a structure. +#[derive(PartialEq, Debug)] +pub enum DecodeErrorKind { + /// An error flagged by the application, e.g. value out of range + ApplicationError(String), + /// A field was expected, but none was found. + ExpectedField(/* type */ Option<&'static str>), + /// A field was found, but it was not an expected one. + UnknownField, + /// A field was found, but it had the wrong type. + ExpectedType(/* expected */ &'static str, /* found */ &'static str), + /// The nth map key was expected, but none was found. + ExpectedMapKey(usize), + /// The nth map element was expected, but none was found. + ExpectedMapElement(usize), + /// An enum decoding was requested, but no variants were supplied + NoEnumVariants, + /// The unit type was being decoded, but a non-zero length string was found + NilTooLong, + /// There was an error with the syntactical structure of the TOML. + SyntaxError, + /// A custom error was generated when decoding. + CustomError(String), + /// The end of the TOML input was reached too soon + EndOfStream, + /// Produced by serde ... + InvalidType(&'static str), +} + +/// Decodes a TOML value into a decodable type. +/// +/// This function will consume the given TOML value and attempt to decode it +/// into the type specified. If decoding fails, `None` will be returned. If a +/// finer-grained error is desired, then it is recommended to use `Decodable` +/// directly. +#[cfg(feature = "rustc-serialize")] +pub fn decode<T: ::rustc_serialize::Decodable>(toml: Value) -> Option<T> { + ::rustc_serialize::Decodable::decode(&mut Decoder::new(toml)).ok() +} + +/// Decodes a TOML value into a decodable type. +/// +/// This function will consume the given TOML value and attempt to decode it +/// into the type specified. If decoding fails, `None` will be returned. If a +/// finer-grained error is desired, then it is recommended to use `Decodable` +/// directly. +#[cfg(all(not(feature = "rustc-serialize"), feature = "serde"))] +pub fn decode<T: ::serde::Deserialize>(toml: Value) -> Option<T> { + ::serde::Deserialize::deserialize(&mut Decoder::new(toml)).ok() +} + +/// Decodes a string into a toml-encoded value. +/// +/// This function will parse the given string into a TOML value, and then parse +/// the TOML value into the desired type. If any error occurs, `None` is +/// returned. +/// +/// If more fine-grained errors are desired, these steps should be driven +/// manually. +#[cfg(feature = "rustc-serialize")] +pub fn decode_str<T: ::rustc_serialize::Decodable>(s: &str) -> Option<T> { + ::Parser::new(s).parse().and_then(|t| decode(Value::Table(t))) +} + +/// Decodes a string into a toml-encoded value. +/// +/// This function will parse the given string into a TOML value, and then parse +/// the TOML value into the desired type. If any error occurs, `None` is +/// returned. +/// +/// If more fine-grained errors are desired, these steps should be driven +/// manually. +#[cfg(all(not(feature = "rustc-serialize"), feature = "serde"))] +pub fn decode_str<T: ::serde::Deserialize>(s: &str) -> Option<T> { + ::Parser::new(s).parse().and_then(|t| decode(Value::Table(t))) +} + +impl Decoder { + /// Creates a new decoder, consuming the TOML value to decode. + /// + /// This decoder can be passed to the `Decodable` methods or driven + /// manually. + pub fn new(toml: Value) -> Decoder { + Decoder { + toml: Some(toml), + cur_field: None, + leftover_map: BTreeMap::new(), + cur_map: BTreeMap::new().into_iter().peekable(), + } + } + + fn sub_decoder(&self, toml: Option<Value>, field: &str) -> Decoder { + Decoder { + toml: toml, + cur_field: if field.len() == 0 { + self.cur_field.clone() + } else { + match self.cur_field { + None => Some(format!("{}", field)), + Some(ref s) => Some(format!("{}.{}", s, field)) + } + }, + leftover_map: BTreeMap::new(), + cur_map: BTreeMap::new().into_iter().peekable(), + } + } + + fn err(&self, kind: DecodeErrorKind) -> DecodeError { + DecodeError { + field: self.cur_field.clone(), + kind: kind, + } + } + + fn mismatch(&self, expected: &'static str, + found: &Option<Value>) -> DecodeError{ + match *found { + Some(ref val) => self.err(ExpectedType(expected, val.type_str())), + None => self.err(ExpectedField(Some(expected))), + } + } +} + +impl fmt::Display for DecodeError { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + try!(match self.kind { + ApplicationError(ref err) => { + write!(f, "{}", err) + } + ExpectedField(expected_type) => { + match expected_type { + Some("table") => write!(f, "expected a section"), + Some(e) => write!(f, "expected a value of type `{}`", e), + None => write!(f, "expected a value"), + } + } + UnknownField => write!(f, "unknown field"), + ExpectedType(expected, found) => { + fn humanize(s: &str) -> String { + if s == "section" { + format!("a section") + } else { + format!("a value of type `{}`", s) + } + } + write!(f, "expected {}, but found {}", + humanize(expected), + humanize(found)) + } + ExpectedMapKey(idx) => { + write!(f, "expected at least {} keys", idx + 1) + } + ExpectedMapElement(idx) => { + write!(f, "expected at least {} elements", idx + 1) + } + NoEnumVariants => { + write!(f, "expected an enum variant to decode to") + } + NilTooLong => { + write!(f, "expected 0-length string") + } + SyntaxError => { + write!(f, "syntax error") + } + EndOfStream => { + write!(f, "end of stream") + } + InvalidType(s) => { + write!(f, "invalid type: {}", s) + } + CustomError(ref s) => { + write!(f, "custom error: {}", s) + } + }); + match self.field { + Some(ref s) => { + write!(f, " for the key `{}`", s) + } + None => Ok(()) + } + } +} + +impl error::Error for DecodeError { + fn description(&self) -> &str { + match self.kind { + ApplicationError(ref s) => &**s, + ExpectedField(..) => "expected a field", + UnknownField => "found an unknown field", + ExpectedType(..) => "expected a type", + ExpectedMapKey(..) => "expected a map key", + ExpectedMapElement(..) => "expected a map element", + NoEnumVariants => "no enum variants to decode to", + NilTooLong => "nonzero length string representing nil", + SyntaxError => "syntax error", + EndOfStream => "end of stream", + InvalidType(..) => "invalid type", + CustomError(..) => "custom error", + } + } +} diff --git a/deps/toml-0.1.27/src/decoder/rustc_serialize.rs b/deps/toml-0.1.28/src/decoder/rustc_serialize.rs similarity index 100% rename from deps/toml-0.1.27/src/decoder/rustc_serialize.rs rename to deps/toml-0.1.28/src/decoder/rustc_serialize.rs diff --git a/deps/toml-0.1.28/src/decoder/serde.rs b/deps/toml-0.1.28/src/decoder/serde.rs new file mode 100644 index 000000000..91bc8acf5 --- /dev/null +++ b/deps/toml-0.1.28/src/decoder/serde.rs @@ -0,0 +1,544 @@ +use serde::de; +use Value; +use super::{Decoder, DecodeError, DecodeErrorKind}; +use std::collections::BTreeMap; + +impl de::Deserializer for Decoder { + type Error = DecodeError; + + fn deserialize<V>(&mut self, mut visitor: V) + -> Result<V::Value, DecodeError> + where V: de::Visitor + { + match self.toml.take() { + Some(Value::String(s)) => visitor.visit_string(s), + Some(Value::Integer(i)) => visitor.visit_i64(i), + Some(Value::Float(f)) => visitor.visit_f64(f), + Some(Value::Boolean(b)) => visitor.visit_bool(b), + Some(Value::Datetime(s)) => visitor.visit_string(s), + Some(Value::Array(a)) => { + let len = a.len(); + let iter = a.into_iter(); + visitor.visit_seq(SeqDeserializer::new(iter, len, &mut self.toml)) + } + Some(Value::Table(t)) => { + visitor.visit_map(MapVisitor { + iter: t.into_iter(), + de: self, + key: None, + value: None, + }) + } + None => Err(self.err(DecodeErrorKind::EndOfStream)), + } + } + + fn deserialize_bool<V>(&mut self, mut visitor: V) + -> Result<V::Value, DecodeError> + where V: de::Visitor + { + match self.toml.take() { + Some(Value::Boolean(b)) => visitor.visit_bool(b), + ref found => Err(self.mismatch("bool", found)), + } + } + + fn deserialize_i64<V>(&mut self, mut visitor: V) + -> Result<V::Value, DecodeError> + where V: de::Visitor + { + match self.toml.take() { + Some(Value::Integer(f)) => visitor.visit_i64(f), + ref found => Err(self.mismatch("integer", found)), + } + } + + fn deserialize_u64<V>(&mut self, v: V) -> Result<V::Value, DecodeError> + where V: de::Visitor + { + self.deserialize_i64(v) + } + + fn deserialize_f64<V>(&mut self, mut visitor: V) + -> Result<V::Value, DecodeError> + where V: de::Visitor + { + match self.toml.take() { + Some(Value::Float(f)) => visitor.visit_f64(f), + ref found => Err(self.mismatch("float", found)), + } + } + + fn deserialize_str<V>(&mut self, mut visitor: V) + -> Result<V::Value, Self::Error> + where V: de::Visitor, + { + match self.toml.take() { + Some(Value::String(s)) => visitor.visit_string(s), + ref found => Err(self.mismatch("string", found)), + } + } + + fn deserialize_char<V>(&mut self, mut visitor: V) + -> Result<V::Value, DecodeError> + where V: de::Visitor + { + match self.toml.take() { + Some(Value::String(ref s)) if s.chars().count() == 1 => { + visitor.visit_char(s.chars().next().unwrap()) + } + ref found => return Err(self.mismatch("string", found)), + } + } + + fn deserialize_option<V>(&mut self, mut visitor: V) + -> Result<V::Value, DecodeError> + where V: de::Visitor + { + if self.toml.is_none() { + visitor.visit_none() + } else { + visitor.visit_some(self) + } + } + + fn deserialize_seq<V>(&mut self, mut visitor: V) + -> Result<V::Value, DecodeError> + where V: de::Visitor, + { + if self.toml.is_none() { + let iter = None::<i32>.into_iter(); + visitor.visit_seq(de::value::SeqDeserializer::new(iter, 0)) + } else { + self.deserialize(visitor) + } + } + + fn deserialize_map<V>(&mut self, mut visitor: V) + -> Result<V::Value, DecodeError> + where V: de::Visitor, + { + match self.toml.take() { + Some(Value::Table(t)) => { + visitor.visit_map(MapVisitor { + iter: t.into_iter(), + de: self, + key: None, + value: None, + }) + } + ref found => Err(self.mismatch("table", found)), + } + } + + fn deserialize_enum<V>(&mut self, + _enum: &str, + variants: &[&str], + mut visitor: V) -> Result<V::Value, DecodeError> + where V: de::EnumVisitor, + { + // When decoding enums, this crate takes the strategy of trying to + // decode the current TOML as all of the possible variants, returning + // success on the first one that succeeds. + // + // Note that fidelity of the errors returned here is a little nebulous, + // but we try to return the error that had the relevant field as the + // longest field. This way we hopefully match an error against what was + // most likely being written down without losing too much info. + let mut first_error = None::<DecodeError>; + + for variant in 0..variants.len() { + let mut de = VariantVisitor { + de: self.sub_decoder(self.toml.clone(), ""), + variant: variant, + }; + + match visitor.visit(&mut de) { + Ok(value) => { + self.toml = de.de.toml; + return Ok(value); + } + Err(e) => { + if let Some(ref first) = first_error { + let my_len = e.field.as_ref().map(|s| s.len()); + let first_len = first.field.as_ref().map(|s| s.len()); + if my_len <= first_len { + continue + } + } + first_error = Some(e); + } + } + } + + Err(first_error.unwrap_or_else(|| self.err(DecodeErrorKind::NoEnumVariants))) + } + + // When #[derive(Deserialize)] encounters an unknown struct field it will + // call this method (somehow), and we want to preserve all unknown struct + // fields to return them upwards (to warn about unused keys), so we override + // that here to not tamper with our own internal state. + fn deserialize_ignored_any<V>(&mut self, visitor: V) + -> Result<V::Value, Self::Error> + where V: de::Visitor + { + use serde::de::value::ValueDeserializer; + let mut d = <() as ValueDeserializer<Self::Error>>::into_deserializer(()); + d.deserialize(visitor) + } +} + +struct VariantVisitor { + de: Decoder, + variant: usize, +} + +impl de::VariantVisitor for VariantVisitor { + type Error = DecodeError; + + fn visit_variant<V>(&mut self) -> Result<V, DecodeError> + where V: de::Deserialize + { + use serde::de::value::ValueDeserializer; + + let mut de = self.variant.into_deserializer(); + + de::Deserialize::deserialize(&mut de) + } + + fn visit_unit(&mut self) -> Result<(), DecodeError> { + de::Deserialize::deserialize(&mut self.de) + } + + fn visit_newtype<T>(&mut self) -> Result<T, DecodeError> + where T: de::Deserialize, + { + de::Deserialize::deserialize(&mut self.de) + } + + fn visit_tuple<V>(&mut self, + _len: usize, + visitor: V) -> Result<V::Value, DecodeError> + where V: de::Visitor, + { + de::Deserializer::deserialize(&mut self.de, visitor) + } + + fn visit_struct<V>(&mut self, + _fields: &'static [&'static str], + visitor: V) -> Result<V::Value, DecodeError> + where V: de::Visitor, + { + de::Deserializer::deserialize(&mut self.de, visitor) + } +} + +struct SeqDeserializer<'a, I> { + iter: I, + len: usize, + toml: &'a mut Option<Value>, +} + +impl<'a, I> SeqDeserializer<'a, I> where I: Iterator<Item=Value> { + fn new(iter: I, len: usize, toml: &'a mut Option<Value>) -> Self { + SeqDeserializer { + iter: iter, + len: len, + toml: toml, + } + } + + fn put_value_back(&mut self, v: Value) { + *self.toml = self.toml.take().or(Some(Value::Array(Vec::new()))); + match self.toml.as_mut().unwrap() { + &mut Value::Array(ref mut a) => { + a.push(v); + }, + _ => unreachable!(), + } + } +} + +impl<'a, I> de::Deserializer for SeqDeserializer<'a, I> + where I: Iterator<Item=Value>, +{ + type Error = DecodeError; + + fn deserialize<V>(&mut self, mut visitor: V) + -> Result<V::Value, DecodeError> + where V: de::Visitor, + { + visitor.visit_seq(self) + } +} + +impl<'a, I> de::SeqVisitor for SeqDeserializer<'a, I> + where I: Iterator<Item=Value> +{ + type Error = DecodeError; + + fn visit<V>(&mut self) -> Result<Option<V>, DecodeError> + where V: de::Deserialize + { + match self.iter.next() { + Some(value) => { + self.len -= 1; + let mut de = Decoder::new(value); + let v = try!(de::Deserialize::deserialize(&mut de)); + if let Some(t) = de.toml { + self.put_value_back(t); + } + Ok(Some(v)) + } + None => Ok(None), + } + } + + fn end(&mut self) -> Result<(), DecodeError> { + if self.len == 0 { + Ok(()) + } else { + Err(de::Error::end_of_stream()) + } + } + + fn size_hint(&self) -> (usize, Option<usize>) { + (self.len, Some(self.len)) + } +} + +impl de::Error for DecodeError { + fn custom<T: Into<String>>(msg: T) -> DecodeError { + DecodeError { + field: None, + kind: DecodeErrorKind::CustomError(msg.into()), + } + } + fn end_of_stream() -> DecodeError { + DecodeError { field: None, kind: DecodeErrorKind::EndOfStream } + } + fn missing_field(name: &'static str) -> DecodeError { + DecodeError { + field: Some(name.to_string()), + kind: DecodeErrorKind::ExpectedField(None), + } + } + fn unknown_field(name: &str) -> DecodeError { + DecodeError { + field: Some(name.to_string()), + kind: DecodeErrorKind::UnknownField, + } + } + fn invalid_type(ty: de::Type) -> Self { + DecodeError { + field: None, + kind: DecodeErrorKind::InvalidType(match ty { + de::Type::Bool => "bool", + de::Type::Usize | + de::Type::U8 | + de::Type::U16 | + de::Type::U32 | + de::Type::U64 | + de::Type::Isize | + de::Type::I8 | + de::Type::I16 | + de::Type::I32 | + de::Type::I64 => "integer", + de::Type::F32 | + de::Type::F64 => "float", + de::Type::Char | + de::Type::Str | + de::Type::String => "string", + de::Type::Seq => "array", + de::Type::Struct | + de::Type::Map => "table", + de::Type::Unit => "Unit", + de::Type::Option => "Option", + de::Type::UnitStruct => "UnitStruct", + de::Type::NewtypeStruct => "NewtypeStruct", + de::Type::TupleStruct => "TupleStruct", + de::Type::FieldName => "FieldName", + de::Type::Tuple => "Tuple", + de::Type::Enum => "Enum", + de::Type::VariantName => "VariantName", + de::Type::StructVariant => "StructVariant", + de::Type::TupleVariant => "TupleVariant", + de::Type::UnitVariant => "UnitVariant", + de::Type::Bytes => "Bytes", + }) + } + } +} + +struct MapVisitor<'a, I> { + iter: I, + de: &'a mut Decoder, + key: Option<String>, + value: Option<Value>, +} + +impl<'a, I> MapVisitor<'a, I> { + fn put_value_back(&mut self, v: Value) { + self.de.toml = self.de.toml.take().or_else(|| { + Some(Value::Table(BTreeMap::new())) + }); + + match self.de.toml.as_mut().unwrap() { + &mut Value::Table(ref mut t) => { + t.insert(self.key.take().unwrap(), v); + }, + _ => unreachable!(), + } + } +} + +impl<'a, I> de::MapVisitor for MapVisitor<'a, I> + where I: Iterator<Item=(String, Value)> +{ + type Error = DecodeError; + + fn visit_key<K>(&mut self) -> Result<Option<K>, DecodeError> + where K: de::Deserialize + { + while let Some((k, v)) = self.iter.next() { + let mut dec = self.de.sub_decoder(Some(Value::String(k.clone())), &k); + self.key = Some(k); + + match de::Deserialize::deserialize(&mut dec) { + Ok(val) => { + self.value = Some(v); + return Ok(Some(val)) + } + + // If this was an unknown field, then we put the toml value + // back into the map and keep going. + Err(DecodeError {kind: DecodeErrorKind::UnknownField, ..}) => { + self.put_value_back(v); + } + + Err(e) => return Err(e), + } + } + Ok(None) + } + + fn visit_value<V>(&mut self) -> Result<V, DecodeError> + where V: de::Deserialize + { + match self.value.take() { + Some(t) => { + let mut dec = { + // Borrowing the key here because Rust doesn't have + // non-lexical borrows yet. + let key = match self.key { + Some(ref key) => &**key, + None => "" + }; + + self.de.sub_decoder(Some(t), key) + }; + let v = try!(de::Deserialize::deserialize(&mut dec)); + if let Some(t) = dec.toml { + self.put_value_back(t); + } + Ok(v) + }, + None => Err(de::Error::end_of_stream()) + } + } + + fn end(&mut self) -> Result<(), DecodeError> { + if let Some(v) = self.value.take() { + self.put_value_back(v); + } + while let Some((k, v)) = self.iter.next() { + self.key = Some(k); + self.put_value_back(v); + } + Ok(()) + } + + fn missing_field<V>(&mut self, field_name: &'static str) + -> Result<V, DecodeError> where V: de::Deserialize { + // See if the type can deserialize from a unit. + match de::Deserialize::deserialize(&mut UnitDeserializer) { + Err(DecodeError { + kind: DecodeErrorKind::InvalidType(..), + field, + }) => Err(DecodeError { + field: field.or(Some(field_name.to_string())), + kind: DecodeErrorKind::ExpectedField(None), + }), + v => v, + } + } +} + +struct UnitDeserializer; + +impl de::Deserializer for UnitDeserializer { + type Error = DecodeError; + + fn deserialize<V>(&mut self, mut visitor: V) + -> Result<V::Value, DecodeError> + where V: de::Visitor, + { + visitor.visit_unit() + } + + fn deserialize_option<V>(&mut self, mut visitor: V) + -> Result<V::Value, DecodeError> + where V: de::Visitor, + { + visitor.visit_none() + } +} + +impl de::Deserialize for Value { + fn deserialize<D>(deserializer: &mut D) -> Result<Value, D::Error> + where D: de::Deserializer + { + struct ValueVisitor; + + impl de::Visitor for ValueVisitor { + type Value = Value; + + fn visit_bool<E>(&mut self, value: bool) -> Result<Value, E> { + Ok(Value::Boolean(value)) + } + + fn visit_i64<E>(&mut self, value: i64) -> Result<Value, E> { + Ok(Value::Integer(value)) + } + + fn visit_f64<E>(&mut self, value: f64) -> Result<Value, E> { + Ok(Value::Float(value)) + } + + fn visit_str<E>(&mut self, value: &str) -> Result<Value, E> { + Ok(Value::String(value.into())) + } + + fn visit_string<E>(&mut self, value: String) -> Result<Value, E> { + Ok(Value::String(value)) + } + + fn visit_seq<V>(&mut self, visitor: V) -> Result<Value, V::Error> + where V: de::SeqVisitor + { + let values = try!(de::impls::VecVisitor::new().visit_seq(visitor)); + Ok(Value::Array(values)) + } + + fn visit_map<V>(&mut self, visitor: V) -> Result<Value, V::Error> + where V: de::MapVisitor + { + let mut v = de::impls::BTreeMapVisitor::new(); + let values = try!(v.visit_map(visitor)); + Ok(Value::Table(values)) + } + } + + deserializer.deserialize(ValueVisitor) + } +} diff --git a/deps/toml-0.1.27/src/display.rs b/deps/toml-0.1.28/src/display.rs similarity index 100% rename from deps/toml-0.1.27/src/display.rs rename to deps/toml-0.1.28/src/display.rs diff --git a/deps/toml-0.1.28/src/encoder/mod.rs b/deps/toml-0.1.28/src/encoder/mod.rs new file mode 100644 index 000000000..fb628fa3d --- /dev/null +++ b/deps/toml-0.1.28/src/encoder/mod.rs @@ -0,0 +1,214 @@ +use std::collections::BTreeMap; +use std::error; +use std::fmt; +use std::mem; + +use {Value, Table}; + +#[cfg(feature = "rustc-serialize")] mod rustc_serialize; +#[cfg(feature = "serde")] mod serde; + +/// A structure to transform Rust values into TOML values. +/// +/// This encoder implements the serialization `Encoder` interface, allowing +/// `Encodable` rust types to be fed into the encoder. The output of this +/// encoder is a TOML `Table` structure. The resulting TOML can be stringified +/// if necessary. +/// +/// # Example +/// +/// ``` +/// extern crate rustc_serialize; +/// extern crate toml; +/// +/// # fn main() { +/// use toml::{Encoder, Value}; +/// use rustc_serialize::Encodable; +/// +/// #[derive(RustcEncodable)] +/// struct MyStruct { foo: isize, bar: String } +/// let my_struct = MyStruct { foo: 4, bar: "hello!".to_string() }; +/// +/// let mut e = Encoder::new(); +/// my_struct.encode(&mut e).unwrap(); +/// +/// assert_eq!(e.toml.get(&"foo".to_string()), Some(&Value::Integer(4))) +/// # } +/// ``` +pub struct Encoder { + /// Output TOML that is emitted. The current version of this encoder forces + /// the top-level representation of a structure to be a table. + /// + /// This field can be used to extract the return value after feeding a value + /// into this `Encoder`. + pub toml: Table, + state: State, +} + +/// Enumeration of errors which can occur while encoding a rust value into a +/// TOML value. +#[allow(missing_copy_implementations)] +#[derive(Debug)] +pub enum Error { + /// Indication that a key was needed when a value was emitted, but no key + /// was previously emitted. + NeedsKey, + /// Indication that a key was emitted, but not value was emitted. + NoValue, + /// Indicates that a map key was attempted to be emitted at an invalid + /// location. + InvalidMapKeyLocation, + /// Indicates that a type other than a string was attempted to be used as a + /// map key type. + InvalidMapKeyType, + /// A custom error type was generated + Custom(String), +} + +#[derive(PartialEq)] +enum State { + Start, + NextKey(String), + NextArray(Vec<Value>), + NextMapKey, +} + +impl Encoder { + /// Constructs a new encoder which will emit to the given output stream. + pub fn new() -> Encoder { + Encoder { state: State::Start, toml: BTreeMap::new() } + } + + fn emit_value(&mut self, v: Value) -> Result<(), Error> { + match mem::replace(&mut self.state, State::Start) { + State::NextKey(key) => { self.toml.insert(key, v); Ok(()) } + State::NextArray(mut vec) => { + // TODO: validate types + vec.push(v); + self.state = State::NextArray(vec); + Ok(()) + } + State::NextMapKey => { + match v { + Value::String(s) => { self.state = State::NextKey(s); Ok(()) } + _ => Err(Error::InvalidMapKeyType) + } + } + _ => Err(Error::NeedsKey) + } + } + + fn emit_none(&mut self) -> Result<(), Error> { + match mem::replace(&mut self.state, State::Start) { + State::Start => unreachable!(), + State::NextKey(_) => Ok(()), + State::NextArray(..) => panic!("how to encode None in an array?"), + State::NextMapKey => Err(Error::InvalidMapKeyLocation), + } + } + + fn seq<F>(&mut self, f: F) -> Result<(), Error> + where F: FnOnce(&mut Encoder) -> Result<(), Error> + { + let old = mem::replace(&mut self.state, State::NextArray(Vec::new())); + try!(f(self)); + match mem::replace(&mut self.state, old) { + State::NextArray(v) => self.emit_value(Value::Array(v)), + _ => unreachable!(), + } + } + + fn table<F>(&mut self, f: F) -> Result<(), Error> + where F: FnOnce(&mut Encoder) -> Result<(), Error> + { + match mem::replace(&mut self.state, State::Start) { + State::NextKey(key) => { + let mut nested = Encoder::new(); + try!(f(&mut nested)); + self.toml.insert(key, Value::Table(nested.toml)); + Ok(()) + } + State::NextArray(mut arr) => { + let mut nested = Encoder::new(); + try!(f(&mut nested)); + arr.push(Value::Table(nested.toml)); + self.state = State::NextArray(arr); + Ok(()) + } + State::Start => f(self), + State::NextMapKey => Err(Error::InvalidMapKeyLocation), + } + } + + fn table_key<F>(&mut self, f: F) -> Result<(), Error> + where F: FnOnce(&mut Encoder) -> Result<(), Error> + { + match mem::replace(&mut self.state, State::NextMapKey) { + State::Start => {} + _ => return Err(Error::InvalidMapKeyLocation), + } + try!(f(self)); + match self.state { + State::NextKey(_) => Ok(()), + _ => Err(Error::InvalidMapKeyLocation), + } + } +} + +/// Encodes an encodable value into a TOML value. +/// +/// This function expects the type given to represent a TOML table in some form. +/// If encoding encounters an error, then this function will fail the task. +#[cfg(feature = "rustc-serialize")] +pub fn encode<T: ::rustc_serialize::Encodable>(t: &T) -> Value { + let mut e = Encoder::new(); + t.encode(&mut e).unwrap(); + Value::Table(e.toml) +} + +/// Encodes an encodable value into a TOML value. +/// +/// This function expects the type given to represent a TOML table in some form. +/// If encoding encounters an error, then this function will fail the task. +#[cfg(all(not(feature = "rustc-serialize"), feature = "serde"))] +pub fn encode<T: ::serde::Serialize>(t: &T) -> Value { + let mut e = Encoder::new(); + t.serialize(&mut e).unwrap(); + Value::Table(e.toml) +} + +/// Encodes an encodable value into a TOML string. +/// +/// This function expects the type given to represent a TOML table in some form. +/// If encoding encounters an error, then this function will fail the task. +#[cfg(feature = "rustc-serialize")] +pub fn encode_str<T: ::rustc_serialize::Encodable>(t: &T) -> String { + encode(t).to_string() +} + +/// Encodes an encodable value into a TOML string. +/// +/// This function expects the type given to represent a TOML table in some form. +/// If encoding encounters an error, then this function will fail the task. +#[cfg(all(not(feature = "rustc-serialize"), feature = "serde"))] +pub fn encode_str<T: ::serde::Serialize>(t: &T) -> String { + encode(t).to_string() +} + +impl fmt::Display for Error { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + match *self { + Error::NeedsKey => write!(f, "need a key to encode"), + Error::NoValue => write!(f, "no value to emit for a previous key"), + Error::InvalidMapKeyLocation => write!(f, "a map cannot be emitted \ + at this location"), + Error::InvalidMapKeyType => write!(f, "only strings can be used as \ + key types"), + Error::Custom(ref s) => write!(f, "custom error: {}", s), + } + } +} + +impl error::Error for Error { + fn description(&self) -> &str { "TOML encoding error" } +} diff --git a/deps/toml-0.1.27/src/encoder/rustc_serialize.rs b/deps/toml-0.1.28/src/encoder/rustc_serialize.rs similarity index 100% rename from deps/toml-0.1.27/src/encoder/rustc_serialize.rs rename to deps/toml-0.1.28/src/encoder/rustc_serialize.rs diff --git a/deps/toml-0.1.28/src/encoder/serde.rs b/deps/toml-0.1.28/src/encoder/serde.rs new file mode 100644 index 000000000..d5bbb77a8 --- /dev/null +++ b/deps/toml-0.1.28/src/encoder/serde.rs @@ -0,0 +1,108 @@ +use serde::ser; +use Value; +use super::{Encoder, Error}; + +impl ser::Serializer for Encoder { + type Error = Error; + + fn serialize_bool(&mut self, v: bool) -> Result<(), Error> { + self.emit_value(Value::Boolean(v)) + } + fn serialize_i64(&mut self, v: i64) -> Result<(), Error> { + self.emit_value(Value::Integer(v)) + } + fn serialize_u64(&mut self, v: u64) -> Result<(), Error> { + self.serialize_i64(v as i64) + } + fn serialize_f64(&mut self, v: f64) -> Result<(), Error> { + self.emit_value(Value::Float(v)) + } + fn serialize_str(&mut self, value: &str) -> Result<(), Error> { + self.emit_value(Value::String(value.to_string())) + } + fn serialize_unit(&mut self) -> Result<(), Error> { + Ok(()) + } + fn serialize_none(&mut self) -> Result<(), Error> { + self.emit_none() + } + fn serialize_some<V>(&mut self, value: V) -> Result<(), Error> + where V: ser::Serialize + { + value.serialize(self) + } + fn serialize_seq<V>(&mut self, mut visitor: V) -> Result<(), Error> + where V: ser::SeqVisitor + { + self.seq(|me| { + while try!(visitor.visit(me)).is_some() {} + Ok(()) + }) + } + fn serialize_seq_elt<T>(&mut self, value: T) -> Result<(), Error> + where T: ser::Serialize + { + value.serialize(self) + } + fn serialize_map<V>(&mut self, mut visitor: V) -> Result<(), Error> + where V: ser::MapVisitor + { + self.table(|me| { + while try!(visitor.visit(me)).is_some() {} + Ok(()) + }) + } + fn serialize_map_elt<K, V>(&mut self, key: K, value: V) -> Result<(), Error> + where K: ser::Serialize, V: ser::Serialize + { + try!(self.table_key(|me| key.serialize(me))); + try!(value.serialize(self)); + Ok(()) + } + fn serialize_newtype_struct<T>(&mut self, + _name: &'static str, + value: T) -> Result<(), Self::Error> + where T: ser::Serialize, + { + // Don't serialize the newtype struct in a tuple. + value.serialize(self) + } + fn serialize_newtype_variant<T>(&mut self, + _name: &'static str, + _variant_index: usize, + _variant: &'static str, + value: T) -> Result<(), Self::Error> + where T: ser::Serialize, + { + // Don't serialize the newtype struct variant in a tuple. + value.serialize(self) + } +} + +impl ser::Serialize for Value { + fn serialize<E>(&self, e: &mut E) -> Result<(), E::Error> + where E: ser::Serializer + { + match *self { + Value::String(ref s) => e.serialize_str(s), + Value::Integer(i) => e.serialize_i64(i), + Value::Float(f) => e.serialize_f64(f), + Value::Boolean(b) => e.serialize_bool(b), + Value::Datetime(ref s) => e.serialize_str(s), + Value::Array(ref a) => { + e.serialize_seq(ser::impls::SeqIteratorVisitor::new(a.iter(), + Some(a.len()))) + } + Value::Table(ref t) => { + e.serialize_map(ser::impls::MapIteratorVisitor::new(t.iter(), + Some(t.len()))) + } + } + } +} + +impl ser::Error for Error { + fn custom<T: Into<String>>(msg: T) -> Error { + Error::Custom(msg.into()) + } +} diff --git a/deps/toml-0.1.27/src/lib.rs b/deps/toml-0.1.28/src/lib.rs similarity index 100% rename from deps/toml-0.1.27/src/lib.rs rename to deps/toml-0.1.28/src/lib.rs diff --git a/deps/toml-0.1.27/src/parser.rs b/deps/toml-0.1.28/src/parser.rs similarity index 100% rename from deps/toml-0.1.27/src/parser.rs rename to deps/toml-0.1.28/src/parser.rs diff --git a/deps/toml-0.1.27/tests/README.md b/deps/toml-0.1.28/tests/README.md similarity index 100% rename from deps/toml-0.1.27/tests/README.md rename to deps/toml-0.1.28/tests/README.md diff --git a/deps/toml-0.1.27/tests/invalid-encoder/array-mixed-types-ints-and-floats.json b/deps/toml-0.1.28/tests/invalid-encoder/array-mixed-types-ints-and-floats.json similarity index 100% rename from deps/toml-0.1.27/tests/invalid-encoder/array-mixed-types-ints-and-floats.json rename to deps/toml-0.1.28/tests/invalid-encoder/array-mixed-types-ints-and-floats.json diff --git a/deps/toml-0.1.27/tests/invalid.rs b/deps/toml-0.1.28/tests/invalid.rs similarity index 100% rename from deps/toml-0.1.27/tests/invalid.rs rename to deps/toml-0.1.28/tests/invalid.rs diff --git a/deps/toml-0.1.27/tests/invalid/array-mixed-types-arrays-and-ints.toml b/deps/toml-0.1.28/tests/invalid/array-mixed-types-arrays-and-ints.toml similarity index 100% rename from deps/toml-0.1.27/tests/invalid/array-mixed-types-arrays-and-ints.toml rename to deps/toml-0.1.28/tests/invalid/array-mixed-types-arrays-and-ints.toml diff --git a/deps/toml-0.1.27/tests/invalid/array-mixed-types-ints-and-floats.toml b/deps/toml-0.1.28/tests/invalid/array-mixed-types-ints-and-floats.toml similarity index 100% rename from deps/toml-0.1.27/tests/invalid/array-mixed-types-ints-and-floats.toml rename to deps/toml-0.1.28/tests/invalid/array-mixed-types-ints-and-floats.toml diff --git a/deps/toml-0.1.27/tests/invalid/array-mixed-types-strings-and-ints.toml b/deps/toml-0.1.28/tests/invalid/array-mixed-types-strings-and-ints.toml similarity index 100% rename from deps/toml-0.1.27/tests/invalid/array-mixed-types-strings-and-ints.toml rename to deps/toml-0.1.28/tests/invalid/array-mixed-types-strings-and-ints.toml diff --git a/deps/toml-0.1.27/tests/invalid/datetime-malformed-no-leads.toml b/deps/toml-0.1.28/tests/invalid/datetime-malformed-no-leads.toml similarity index 100% rename from deps/toml-0.1.27/tests/invalid/datetime-malformed-no-leads.toml rename to deps/toml-0.1.28/tests/invalid/datetime-malformed-no-leads.toml diff --git a/deps/toml-0.1.27/tests/invalid/datetime-malformed-no-secs.toml b/deps/toml-0.1.28/tests/invalid/datetime-malformed-no-secs.toml similarity index 100% rename from deps/toml-0.1.27/tests/invalid/datetime-malformed-no-secs.toml rename to deps/toml-0.1.28/tests/invalid/datetime-malformed-no-secs.toml diff --git a/deps/toml-0.1.27/tests/invalid/datetime-malformed-no-t.toml b/deps/toml-0.1.28/tests/invalid/datetime-malformed-no-t.toml similarity index 100% rename from deps/toml-0.1.27/tests/invalid/datetime-malformed-no-t.toml rename to deps/toml-0.1.28/tests/invalid/datetime-malformed-no-t.toml diff --git a/deps/toml-0.1.27/tests/invalid/datetime-malformed-no-z.toml b/deps/toml-0.1.28/tests/invalid/datetime-malformed-no-z.toml similarity index 100% rename from deps/toml-0.1.27/tests/invalid/datetime-malformed-no-z.toml rename to deps/toml-0.1.28/tests/invalid/datetime-malformed-no-z.toml diff --git a/deps/toml-0.1.27/tests/invalid/datetime-malformed-with-milli.toml b/deps/toml-0.1.28/tests/invalid/datetime-malformed-with-milli.toml similarity index 100% rename from deps/toml-0.1.27/tests/invalid/datetime-malformed-with-milli.toml rename to deps/toml-0.1.28/tests/invalid/datetime-malformed-with-milli.toml diff --git a/deps/toml-0.1.27/tests/invalid/duplicate-key-table.toml b/deps/toml-0.1.28/tests/invalid/duplicate-key-table.toml similarity index 100% rename from deps/toml-0.1.27/tests/invalid/duplicate-key-table.toml rename to deps/toml-0.1.28/tests/invalid/duplicate-key-table.toml diff --git a/deps/toml-0.1.27/tests/invalid/duplicate-keys.toml b/deps/toml-0.1.28/tests/invalid/duplicate-keys.toml similarity index 100% rename from deps/toml-0.1.27/tests/invalid/duplicate-keys.toml rename to deps/toml-0.1.28/tests/invalid/duplicate-keys.toml diff --git a/deps/toml-0.1.27/tests/invalid/duplicate-tables.toml b/deps/toml-0.1.28/tests/invalid/duplicate-tables.toml similarity index 100% rename from deps/toml-0.1.27/tests/invalid/duplicate-tables.toml rename to deps/toml-0.1.28/tests/invalid/duplicate-tables.toml diff --git a/deps/toml-0.1.27/tests/invalid/empty-implicit-table.toml b/deps/toml-0.1.28/tests/invalid/empty-implicit-table.toml similarity index 100% rename from deps/toml-0.1.27/tests/invalid/empty-implicit-table.toml rename to deps/toml-0.1.28/tests/invalid/empty-implicit-table.toml diff --git a/deps/toml-0.1.27/tests/invalid/empty-table.toml b/deps/toml-0.1.28/tests/invalid/empty-table.toml similarity index 100% rename from deps/toml-0.1.27/tests/invalid/empty-table.toml rename to deps/toml-0.1.28/tests/invalid/empty-table.toml diff --git a/deps/toml-0.1.27/tests/invalid/float-no-leading-zero.toml b/deps/toml-0.1.28/tests/invalid/float-no-leading-zero.toml similarity index 100% rename from deps/toml-0.1.27/tests/invalid/float-no-leading-zero.toml rename to deps/toml-0.1.28/tests/invalid/float-no-leading-zero.toml diff --git a/deps/toml-0.1.27/tests/invalid/float-no-trailing-digits.toml b/deps/toml-0.1.28/tests/invalid/float-no-trailing-digits.toml similarity index 100% rename from deps/toml-0.1.27/tests/invalid/float-no-trailing-digits.toml rename to deps/toml-0.1.28/tests/invalid/float-no-trailing-digits.toml diff --git a/deps/toml-0.1.27/tests/invalid/key-two-equals.toml b/deps/toml-0.1.28/tests/invalid/key-two-equals.toml similarity index 100% rename from deps/toml-0.1.27/tests/invalid/key-two-equals.toml rename to deps/toml-0.1.28/tests/invalid/key-two-equals.toml diff --git a/deps/toml-0.1.27/tests/invalid/string-bad-byte-escape.toml b/deps/toml-0.1.28/tests/invalid/string-bad-byte-escape.toml similarity index 100% rename from deps/toml-0.1.27/tests/invalid/string-bad-byte-escape.toml rename to deps/toml-0.1.28/tests/invalid/string-bad-byte-escape.toml diff --git a/deps/toml-0.1.27/tests/invalid/string-bad-escape.toml b/deps/toml-0.1.28/tests/invalid/string-bad-escape.toml similarity index 100% rename from deps/toml-0.1.27/tests/invalid/string-bad-escape.toml rename to deps/toml-0.1.28/tests/invalid/string-bad-escape.toml diff --git a/deps/toml-0.1.27/tests/invalid/string-byte-escapes.toml b/deps/toml-0.1.28/tests/invalid/string-byte-escapes.toml similarity index 100% rename from deps/toml-0.1.27/tests/invalid/string-byte-escapes.toml rename to deps/toml-0.1.28/tests/invalid/string-byte-escapes.toml diff --git a/deps/toml-0.1.27/tests/invalid/string-no-close.toml b/deps/toml-0.1.28/tests/invalid/string-no-close.toml similarity index 100% rename from deps/toml-0.1.27/tests/invalid/string-no-close.toml rename to deps/toml-0.1.28/tests/invalid/string-no-close.toml diff --git a/deps/toml-0.1.27/tests/invalid/table-array-implicit.toml b/deps/toml-0.1.28/tests/invalid/table-array-implicit.toml similarity index 100% rename from deps/toml-0.1.27/tests/invalid/table-array-implicit.toml rename to deps/toml-0.1.28/tests/invalid/table-array-implicit.toml diff --git a/deps/toml-0.1.27/tests/invalid/table-array-malformed-bracket.toml b/deps/toml-0.1.28/tests/invalid/table-array-malformed-bracket.toml similarity index 100% rename from deps/toml-0.1.27/tests/invalid/table-array-malformed-bracket.toml rename to deps/toml-0.1.28/tests/invalid/table-array-malformed-bracket.toml diff --git a/deps/toml-0.1.27/tests/invalid/table-array-malformed-empty.toml b/deps/toml-0.1.28/tests/invalid/table-array-malformed-empty.toml similarity index 100% rename from deps/toml-0.1.27/tests/invalid/table-array-malformed-empty.toml rename to deps/toml-0.1.28/tests/invalid/table-array-malformed-empty.toml diff --git a/deps/toml-0.1.27/tests/invalid/table-nested-brackets-close.toml b/deps/toml-0.1.28/tests/invalid/table-nested-brackets-close.toml similarity index 100% rename from deps/toml-0.1.27/tests/invalid/table-nested-brackets-close.toml rename to deps/toml-0.1.28/tests/invalid/table-nested-brackets-close.toml diff --git a/deps/toml-0.1.27/tests/invalid/table-nested-brackets-open.toml b/deps/toml-0.1.28/tests/invalid/table-nested-brackets-open.toml similarity index 100% rename from deps/toml-0.1.27/tests/invalid/table-nested-brackets-open.toml rename to deps/toml-0.1.28/tests/invalid/table-nested-brackets-open.toml diff --git a/deps/toml-0.1.27/tests/invalid/text-after-array-entries.toml b/deps/toml-0.1.28/tests/invalid/text-after-array-entries.toml similarity index 100% rename from deps/toml-0.1.27/tests/invalid/text-after-array-entries.toml rename to deps/toml-0.1.28/tests/invalid/text-after-array-entries.toml diff --git a/deps/toml-0.1.27/tests/invalid/text-after-integer.toml b/deps/toml-0.1.28/tests/invalid/text-after-integer.toml similarity index 100% rename from deps/toml-0.1.27/tests/invalid/text-after-integer.toml rename to deps/toml-0.1.28/tests/invalid/text-after-integer.toml diff --git a/deps/toml-0.1.27/tests/invalid/text-after-string.toml b/deps/toml-0.1.28/tests/invalid/text-after-string.toml similarity index 100% rename from deps/toml-0.1.27/tests/invalid/text-after-string.toml rename to deps/toml-0.1.28/tests/invalid/text-after-string.toml diff --git a/deps/toml-0.1.27/tests/invalid/text-after-table.toml b/deps/toml-0.1.28/tests/invalid/text-after-table.toml similarity index 100% rename from deps/toml-0.1.27/tests/invalid/text-after-table.toml rename to deps/toml-0.1.28/tests/invalid/text-after-table.toml diff --git a/deps/toml-0.1.27/tests/invalid/text-before-array-separator.toml b/deps/toml-0.1.28/tests/invalid/text-before-array-separator.toml similarity index 100% rename from deps/toml-0.1.27/tests/invalid/text-before-array-separator.toml rename to deps/toml-0.1.28/tests/invalid/text-before-array-separator.toml diff --git a/deps/toml-0.1.27/tests/invalid/text-in-array.toml b/deps/toml-0.1.28/tests/invalid/text-in-array.toml similarity index 100% rename from deps/toml-0.1.27/tests/invalid/text-in-array.toml rename to deps/toml-0.1.28/tests/invalid/text-in-array.toml diff --git a/deps/toml-0.1.27/tests/valid.rs b/deps/toml-0.1.28/tests/valid.rs similarity index 100% rename from deps/toml-0.1.27/tests/valid.rs rename to deps/toml-0.1.28/tests/valid.rs diff --git a/deps/toml-0.1.27/tests/valid/array-empty.json b/deps/toml-0.1.28/tests/valid/array-empty.json similarity index 100% rename from deps/toml-0.1.27/tests/valid/array-empty.json rename to deps/toml-0.1.28/tests/valid/array-empty.json diff --git a/deps/toml-0.1.27/tests/valid/array-empty.toml b/deps/toml-0.1.28/tests/valid/array-empty.toml similarity index 100% rename from deps/toml-0.1.27/tests/valid/array-empty.toml rename to deps/toml-0.1.28/tests/valid/array-empty.toml diff --git a/deps/toml-0.1.27/tests/valid/array-nospaces.json b/deps/toml-0.1.28/tests/valid/array-nospaces.json similarity index 100% rename from deps/toml-0.1.27/tests/valid/array-nospaces.json rename to deps/toml-0.1.28/tests/valid/array-nospaces.json diff --git a/deps/toml-0.1.27/tests/valid/array-nospaces.toml b/deps/toml-0.1.28/tests/valid/array-nospaces.toml similarity index 100% rename from deps/toml-0.1.27/tests/valid/array-nospaces.toml rename to deps/toml-0.1.28/tests/valid/array-nospaces.toml diff --git a/deps/toml-0.1.27/tests/valid/arrays-hetergeneous.json b/deps/toml-0.1.28/tests/valid/arrays-hetergeneous.json similarity index 100% rename from deps/toml-0.1.27/tests/valid/arrays-hetergeneous.json rename to deps/toml-0.1.28/tests/valid/arrays-hetergeneous.json diff --git a/deps/toml-0.1.27/tests/valid/arrays-hetergeneous.toml b/deps/toml-0.1.28/tests/valid/arrays-hetergeneous.toml similarity index 100% rename from deps/toml-0.1.27/tests/valid/arrays-hetergeneous.toml rename to deps/toml-0.1.28/tests/valid/arrays-hetergeneous.toml diff --git a/deps/toml-0.1.27/tests/valid/arrays-nested.json b/deps/toml-0.1.28/tests/valid/arrays-nested.json similarity index 100% rename from deps/toml-0.1.27/tests/valid/arrays-nested.json rename to deps/toml-0.1.28/tests/valid/arrays-nested.json diff --git a/deps/toml-0.1.27/tests/valid/arrays-nested.toml b/deps/toml-0.1.28/tests/valid/arrays-nested.toml similarity index 100% rename from deps/toml-0.1.27/tests/valid/arrays-nested.toml rename to deps/toml-0.1.28/tests/valid/arrays-nested.toml diff --git a/deps/toml-0.1.27/tests/valid/arrays.json b/deps/toml-0.1.28/tests/valid/arrays.json similarity index 100% rename from deps/toml-0.1.27/tests/valid/arrays.json rename to deps/toml-0.1.28/tests/valid/arrays.json diff --git a/deps/toml-0.1.27/tests/valid/arrays.toml b/deps/toml-0.1.28/tests/valid/arrays.toml similarity index 100% rename from deps/toml-0.1.27/tests/valid/arrays.toml rename to deps/toml-0.1.28/tests/valid/arrays.toml diff --git a/deps/toml-0.1.27/tests/valid/bool.json b/deps/toml-0.1.28/tests/valid/bool.json similarity index 100% rename from deps/toml-0.1.27/tests/valid/bool.json rename to deps/toml-0.1.28/tests/valid/bool.json diff --git a/deps/toml-0.1.27/tests/valid/bool.toml b/deps/toml-0.1.28/tests/valid/bool.toml similarity index 100% rename from deps/toml-0.1.27/tests/valid/bool.toml rename to deps/toml-0.1.28/tests/valid/bool.toml diff --git a/deps/toml-0.1.27/tests/valid/comments-everywhere.json b/deps/toml-0.1.28/tests/valid/comments-everywhere.json similarity index 100% rename from deps/toml-0.1.27/tests/valid/comments-everywhere.json rename to deps/toml-0.1.28/tests/valid/comments-everywhere.json diff --git a/deps/toml-0.1.27/tests/valid/comments-everywhere.toml b/deps/toml-0.1.28/tests/valid/comments-everywhere.toml similarity index 100% rename from deps/toml-0.1.27/tests/valid/comments-everywhere.toml rename to deps/toml-0.1.28/tests/valid/comments-everywhere.toml diff --git a/deps/toml-0.1.27/tests/valid/datetime.json b/deps/toml-0.1.28/tests/valid/datetime.json similarity index 100% rename from deps/toml-0.1.27/tests/valid/datetime.json rename to deps/toml-0.1.28/tests/valid/datetime.json diff --git a/deps/toml-0.1.27/tests/valid/datetime.toml b/deps/toml-0.1.28/tests/valid/datetime.toml similarity index 100% rename from deps/toml-0.1.27/tests/valid/datetime.toml rename to deps/toml-0.1.28/tests/valid/datetime.toml diff --git a/deps/toml-0.1.27/tests/valid/empty.json b/deps/toml-0.1.28/tests/valid/empty.json similarity index 100% rename from deps/toml-0.1.27/tests/valid/empty.json rename to deps/toml-0.1.28/tests/valid/empty.json diff --git a/deps/toml-0.1.27/tests/valid/empty.toml b/deps/toml-0.1.28/tests/valid/empty.toml similarity index 100% rename from deps/toml-0.1.27/tests/valid/empty.toml rename to deps/toml-0.1.28/tests/valid/empty.toml diff --git a/deps/toml-0.1.27/tests/valid/example-bom.toml b/deps/toml-0.1.28/tests/valid/example-bom.toml similarity index 100% rename from deps/toml-0.1.27/tests/valid/example-bom.toml rename to deps/toml-0.1.28/tests/valid/example-bom.toml diff --git a/deps/toml-0.1.27/tests/valid/example-v0.3.0.json b/deps/toml-0.1.28/tests/valid/example-v0.3.0.json similarity index 100% rename from deps/toml-0.1.27/tests/valid/example-v0.3.0.json rename to deps/toml-0.1.28/tests/valid/example-v0.3.0.json diff --git a/deps/toml-0.1.27/tests/valid/example-v0.3.0.toml b/deps/toml-0.1.28/tests/valid/example-v0.3.0.toml similarity index 100% rename from deps/toml-0.1.27/tests/valid/example-v0.3.0.toml rename to deps/toml-0.1.28/tests/valid/example-v0.3.0.toml diff --git a/deps/toml-0.1.27/tests/valid/example-v0.4.0.json b/deps/toml-0.1.28/tests/valid/example-v0.4.0.json similarity index 100% rename from deps/toml-0.1.27/tests/valid/example-v0.4.0.json rename to deps/toml-0.1.28/tests/valid/example-v0.4.0.json diff --git a/deps/toml-0.1.27/tests/valid/example-v0.4.0.toml b/deps/toml-0.1.28/tests/valid/example-v0.4.0.toml similarity index 100% rename from deps/toml-0.1.27/tests/valid/example-v0.4.0.toml rename to deps/toml-0.1.28/tests/valid/example-v0.4.0.toml diff --git a/deps/toml-0.1.27/tests/valid/example.json b/deps/toml-0.1.28/tests/valid/example.json similarity index 100% rename from deps/toml-0.1.27/tests/valid/example.json rename to deps/toml-0.1.28/tests/valid/example.json diff --git a/deps/toml-0.1.27/tests/valid/example.toml b/deps/toml-0.1.28/tests/valid/example.toml similarity index 100% rename from deps/toml-0.1.27/tests/valid/example.toml rename to deps/toml-0.1.28/tests/valid/example.toml diff --git a/deps/toml-0.1.27/tests/valid/example2.json b/deps/toml-0.1.28/tests/valid/example2.json similarity index 100% rename from deps/toml-0.1.27/tests/valid/example2.json rename to deps/toml-0.1.28/tests/valid/example2.json diff --git a/deps/toml-0.1.27/tests/valid/example2.toml b/deps/toml-0.1.28/tests/valid/example2.toml similarity index 100% rename from deps/toml-0.1.27/tests/valid/example2.toml rename to deps/toml-0.1.28/tests/valid/example2.toml diff --git a/deps/toml-0.1.27/tests/valid/float.json b/deps/toml-0.1.28/tests/valid/float.json similarity index 100% rename from deps/toml-0.1.27/tests/valid/float.json rename to deps/toml-0.1.28/tests/valid/float.json diff --git a/deps/toml-0.1.27/tests/valid/float.toml b/deps/toml-0.1.28/tests/valid/float.toml similarity index 100% rename from deps/toml-0.1.27/tests/valid/float.toml rename to deps/toml-0.1.28/tests/valid/float.toml diff --git a/deps/toml-0.1.27/tests/valid/hard_example.json b/deps/toml-0.1.28/tests/valid/hard_example.json similarity index 100% rename from deps/toml-0.1.27/tests/valid/hard_example.json rename to deps/toml-0.1.28/tests/valid/hard_example.json diff --git a/deps/toml-0.1.27/tests/valid/hard_example.toml b/deps/toml-0.1.28/tests/valid/hard_example.toml similarity index 100% rename from deps/toml-0.1.27/tests/valid/hard_example.toml rename to deps/toml-0.1.28/tests/valid/hard_example.toml diff --git a/deps/toml-0.1.27/tests/valid/implicit-and-explicit-after.json b/deps/toml-0.1.28/tests/valid/implicit-and-explicit-after.json similarity index 100% rename from deps/toml-0.1.27/tests/valid/implicit-and-explicit-after.json rename to deps/toml-0.1.28/tests/valid/implicit-and-explicit-after.json diff --git a/deps/toml-0.1.27/tests/valid/implicit-and-explicit-after.toml b/deps/toml-0.1.28/tests/valid/implicit-and-explicit-after.toml similarity index 100% rename from deps/toml-0.1.27/tests/valid/implicit-and-explicit-after.toml rename to deps/toml-0.1.28/tests/valid/implicit-and-explicit-after.toml diff --git a/deps/toml-0.1.27/tests/valid/implicit-and-explicit-before.json b/deps/toml-0.1.28/tests/valid/implicit-and-explicit-before.json similarity index 100% rename from deps/toml-0.1.27/tests/valid/implicit-and-explicit-before.json rename to deps/toml-0.1.28/tests/valid/implicit-and-explicit-before.json diff --git a/deps/toml-0.1.27/tests/valid/implicit-and-explicit-before.toml b/deps/toml-0.1.28/tests/valid/implicit-and-explicit-before.toml similarity index 100% rename from deps/toml-0.1.27/tests/valid/implicit-and-explicit-before.toml rename to deps/toml-0.1.28/tests/valid/implicit-and-explicit-before.toml diff --git a/deps/toml-0.1.27/tests/valid/implicit-groups.json b/deps/toml-0.1.28/tests/valid/implicit-groups.json similarity index 100% rename from deps/toml-0.1.27/tests/valid/implicit-groups.json rename to deps/toml-0.1.28/tests/valid/implicit-groups.json diff --git a/deps/toml-0.1.27/tests/valid/implicit-groups.toml b/deps/toml-0.1.28/tests/valid/implicit-groups.toml similarity index 100% rename from deps/toml-0.1.27/tests/valid/implicit-groups.toml rename to deps/toml-0.1.28/tests/valid/implicit-groups.toml diff --git a/deps/toml-0.1.27/tests/valid/integer.json b/deps/toml-0.1.28/tests/valid/integer.json similarity index 100% rename from deps/toml-0.1.27/tests/valid/integer.json rename to deps/toml-0.1.28/tests/valid/integer.json diff --git a/deps/toml-0.1.27/tests/valid/integer.toml b/deps/toml-0.1.28/tests/valid/integer.toml similarity index 100% rename from deps/toml-0.1.27/tests/valid/integer.toml rename to deps/toml-0.1.28/tests/valid/integer.toml diff --git a/deps/toml-0.1.27/tests/valid/key-equals-nospace.json b/deps/toml-0.1.28/tests/valid/key-equals-nospace.json similarity index 100% rename from deps/toml-0.1.27/tests/valid/key-equals-nospace.json rename to deps/toml-0.1.28/tests/valid/key-equals-nospace.json diff --git a/deps/toml-0.1.27/tests/valid/key-equals-nospace.toml b/deps/toml-0.1.28/tests/valid/key-equals-nospace.toml similarity index 100% rename from deps/toml-0.1.27/tests/valid/key-equals-nospace.toml rename to deps/toml-0.1.28/tests/valid/key-equals-nospace.toml diff --git a/deps/toml-0.1.27/tests/valid/key-special-chars.json b/deps/toml-0.1.28/tests/valid/key-special-chars.json similarity index 100% rename from deps/toml-0.1.27/tests/valid/key-special-chars.json rename to deps/toml-0.1.28/tests/valid/key-special-chars.json diff --git a/deps/toml-0.1.27/tests/valid/key-special-chars.toml b/deps/toml-0.1.28/tests/valid/key-special-chars.toml similarity index 100% rename from deps/toml-0.1.27/tests/valid/key-special-chars.toml rename to deps/toml-0.1.28/tests/valid/key-special-chars.toml diff --git a/deps/toml-0.1.27/tests/valid/key-with-pound.json b/deps/toml-0.1.28/tests/valid/key-with-pound.json similarity index 100% rename from deps/toml-0.1.27/tests/valid/key-with-pound.json rename to deps/toml-0.1.28/tests/valid/key-with-pound.json diff --git a/deps/toml-0.1.27/tests/valid/key-with-pound.toml b/deps/toml-0.1.28/tests/valid/key-with-pound.toml similarity index 100% rename from deps/toml-0.1.27/tests/valid/key-with-pound.toml rename to deps/toml-0.1.28/tests/valid/key-with-pound.toml diff --git a/deps/toml-0.1.27/tests/valid/long-float.json b/deps/toml-0.1.28/tests/valid/long-float.json similarity index 100% rename from deps/toml-0.1.27/tests/valid/long-float.json rename to deps/toml-0.1.28/tests/valid/long-float.json diff --git a/deps/toml-0.1.27/tests/valid/long-float.toml b/deps/toml-0.1.28/tests/valid/long-float.toml similarity index 100% rename from deps/toml-0.1.27/tests/valid/long-float.toml rename to deps/toml-0.1.28/tests/valid/long-float.toml diff --git a/deps/toml-0.1.27/tests/valid/long-integer.json b/deps/toml-0.1.28/tests/valid/long-integer.json similarity index 100% rename from deps/toml-0.1.27/tests/valid/long-integer.json rename to deps/toml-0.1.28/tests/valid/long-integer.json diff --git a/deps/toml-0.1.27/tests/valid/long-integer.toml b/deps/toml-0.1.28/tests/valid/long-integer.toml similarity index 100% rename from deps/toml-0.1.27/tests/valid/long-integer.toml rename to deps/toml-0.1.28/tests/valid/long-integer.toml diff --git a/deps/toml-0.1.27/tests/valid/string-empty.json b/deps/toml-0.1.28/tests/valid/string-empty.json similarity index 100% rename from deps/toml-0.1.27/tests/valid/string-empty.json rename to deps/toml-0.1.28/tests/valid/string-empty.json diff --git a/deps/toml-0.1.27/tests/valid/string-empty.toml b/deps/toml-0.1.28/tests/valid/string-empty.toml similarity index 100% rename from deps/toml-0.1.27/tests/valid/string-empty.toml rename to deps/toml-0.1.28/tests/valid/string-empty.toml diff --git a/deps/toml-0.1.27/tests/valid/string-escapes.json b/deps/toml-0.1.28/tests/valid/string-escapes.json similarity index 100% rename from deps/toml-0.1.27/tests/valid/string-escapes.json rename to deps/toml-0.1.28/tests/valid/string-escapes.json diff --git a/deps/toml-0.1.27/tests/valid/string-escapes.toml b/deps/toml-0.1.28/tests/valid/string-escapes.toml similarity index 100% rename from deps/toml-0.1.27/tests/valid/string-escapes.toml rename to deps/toml-0.1.28/tests/valid/string-escapes.toml diff --git a/deps/toml-0.1.27/tests/valid/string-simple.json b/deps/toml-0.1.28/tests/valid/string-simple.json similarity index 100% rename from deps/toml-0.1.27/tests/valid/string-simple.json rename to deps/toml-0.1.28/tests/valid/string-simple.json diff --git a/deps/toml-0.1.27/tests/valid/string-simple.toml b/deps/toml-0.1.28/tests/valid/string-simple.toml similarity index 100% rename from deps/toml-0.1.27/tests/valid/string-simple.toml rename to deps/toml-0.1.28/tests/valid/string-simple.toml diff --git a/deps/toml-0.1.27/tests/valid/string-with-pound.json b/deps/toml-0.1.28/tests/valid/string-with-pound.json similarity index 100% rename from deps/toml-0.1.27/tests/valid/string-with-pound.json rename to deps/toml-0.1.28/tests/valid/string-with-pound.json diff --git a/deps/toml-0.1.27/tests/valid/string-with-pound.toml b/deps/toml-0.1.28/tests/valid/string-with-pound.toml similarity index 100% rename from deps/toml-0.1.27/tests/valid/string-with-pound.toml rename to deps/toml-0.1.28/tests/valid/string-with-pound.toml diff --git a/deps/toml-0.1.27/tests/valid/table-array-implicit.json b/deps/toml-0.1.28/tests/valid/table-array-implicit.json similarity index 100% rename from deps/toml-0.1.27/tests/valid/table-array-implicit.json rename to deps/toml-0.1.28/tests/valid/table-array-implicit.json diff --git a/deps/toml-0.1.27/tests/valid/table-array-implicit.toml b/deps/toml-0.1.28/tests/valid/table-array-implicit.toml similarity index 100% rename from deps/toml-0.1.27/tests/valid/table-array-implicit.toml rename to deps/toml-0.1.28/tests/valid/table-array-implicit.toml diff --git a/deps/toml-0.1.27/tests/valid/table-array-many.json b/deps/toml-0.1.28/tests/valid/table-array-many.json similarity index 100% rename from deps/toml-0.1.27/tests/valid/table-array-many.json rename to deps/toml-0.1.28/tests/valid/table-array-many.json diff --git a/deps/toml-0.1.27/tests/valid/table-array-many.toml b/deps/toml-0.1.28/tests/valid/table-array-many.toml similarity index 100% rename from deps/toml-0.1.27/tests/valid/table-array-many.toml rename to deps/toml-0.1.28/tests/valid/table-array-many.toml diff --git a/deps/toml-0.1.27/tests/valid/table-array-nest.json b/deps/toml-0.1.28/tests/valid/table-array-nest.json similarity index 100% rename from deps/toml-0.1.27/tests/valid/table-array-nest.json rename to deps/toml-0.1.28/tests/valid/table-array-nest.json diff --git a/deps/toml-0.1.27/tests/valid/table-array-nest.toml b/deps/toml-0.1.28/tests/valid/table-array-nest.toml similarity index 100% rename from deps/toml-0.1.27/tests/valid/table-array-nest.toml rename to deps/toml-0.1.28/tests/valid/table-array-nest.toml diff --git a/deps/toml-0.1.27/tests/valid/table-array-one.json b/deps/toml-0.1.28/tests/valid/table-array-one.json similarity index 100% rename from deps/toml-0.1.27/tests/valid/table-array-one.json rename to deps/toml-0.1.28/tests/valid/table-array-one.json diff --git a/deps/toml-0.1.27/tests/valid/table-array-one.toml b/deps/toml-0.1.28/tests/valid/table-array-one.toml similarity index 100% rename from deps/toml-0.1.27/tests/valid/table-array-one.toml rename to deps/toml-0.1.28/tests/valid/table-array-one.toml diff --git a/deps/toml-0.1.27/tests/valid/table-empty.json b/deps/toml-0.1.28/tests/valid/table-empty.json similarity index 100% rename from deps/toml-0.1.27/tests/valid/table-empty.json rename to deps/toml-0.1.28/tests/valid/table-empty.json diff --git a/deps/toml-0.1.27/tests/valid/table-empty.toml b/deps/toml-0.1.28/tests/valid/table-empty.toml similarity index 100% rename from deps/toml-0.1.27/tests/valid/table-empty.toml rename to deps/toml-0.1.28/tests/valid/table-empty.toml diff --git a/deps/toml-0.1.27/tests/valid/table-sub-empty.json b/deps/toml-0.1.28/tests/valid/table-sub-empty.json similarity index 100% rename from deps/toml-0.1.27/tests/valid/table-sub-empty.json rename to deps/toml-0.1.28/tests/valid/table-sub-empty.json diff --git a/deps/toml-0.1.27/tests/valid/table-sub-empty.toml b/deps/toml-0.1.28/tests/valid/table-sub-empty.toml similarity index 100% rename from deps/toml-0.1.27/tests/valid/table-sub-empty.toml rename to deps/toml-0.1.28/tests/valid/table-sub-empty.toml diff --git a/deps/toml-0.1.27/tests/valid/table-whitespace.json b/deps/toml-0.1.28/tests/valid/table-whitespace.json similarity index 100% rename from deps/toml-0.1.27/tests/valid/table-whitespace.json rename to deps/toml-0.1.28/tests/valid/table-whitespace.json diff --git a/deps/toml-0.1.27/tests/valid/table-whitespace.toml b/deps/toml-0.1.28/tests/valid/table-whitespace.toml similarity index 100% rename from deps/toml-0.1.27/tests/valid/table-whitespace.toml rename to deps/toml-0.1.28/tests/valid/table-whitespace.toml diff --git a/deps/toml-0.1.27/tests/valid/table-with-pound.json b/deps/toml-0.1.28/tests/valid/table-with-pound.json similarity index 100% rename from deps/toml-0.1.27/tests/valid/table-with-pound.json rename to deps/toml-0.1.28/tests/valid/table-with-pound.json diff --git a/deps/toml-0.1.27/tests/valid/table-with-pound.toml b/deps/toml-0.1.28/tests/valid/table-with-pound.toml similarity index 100% rename from deps/toml-0.1.27/tests/valid/table-with-pound.toml rename to deps/toml-0.1.28/tests/valid/table-with-pound.toml diff --git a/deps/toml-0.1.27/tests/valid/unicode-escape.json b/deps/toml-0.1.28/tests/valid/unicode-escape.json similarity index 100% rename from deps/toml-0.1.27/tests/valid/unicode-escape.json rename to deps/toml-0.1.28/tests/valid/unicode-escape.json diff --git a/deps/toml-0.1.27/tests/valid/unicode-escape.toml b/deps/toml-0.1.28/tests/valid/unicode-escape.toml similarity index 100% rename from deps/toml-0.1.27/tests/valid/unicode-escape.toml rename to deps/toml-0.1.28/tests/valid/unicode-escape.toml diff --git a/deps/toml-0.1.27/tests/valid/unicode-literal.json b/deps/toml-0.1.28/tests/valid/unicode-literal.json similarity index 100% rename from deps/toml-0.1.27/tests/valid/unicode-literal.json rename to deps/toml-0.1.28/tests/valid/unicode-literal.json diff --git a/deps/toml-0.1.27/tests/valid/unicode-literal.toml b/deps/toml-0.1.28/tests/valid/unicode-literal.toml similarity index 100% rename from deps/toml-0.1.27/tests/valid/unicode-literal.toml rename to deps/toml-0.1.28/tests/valid/unicode-literal.toml diff --git a/deps/url-0.2.38/.gitignore b/deps/url-0.2.38/.gitignore deleted file mode 100644 index 7cbe84a5e..000000000 --- a/deps/url-0.2.38/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/target -/Cargo.lock -/.cargo/config diff --git a/deps/url-0.2.38/.travis.yml b/deps/url-0.2.38/.travis.yml deleted file mode 100644 index 97e22ba2b..000000000 --- a/deps/url-0.2.38/.travis.yml +++ /dev/null @@ -1,11 +0,0 @@ -language: rust -rust: - - nightly - - beta - - stable -script: make test -after_success: "[ $TRAVIS_RUST_VERSION == master ] && make upload-doc" -env: - - secure: Q5eFkWSv20gCxMXrF1BPBSY67qAi9XYKsGHbOc6c1hOf933AX9Wr2CqL8mBhgAZfe4TWEnazjMNHmVIs75W+DPRkxVjImDmPLlQSDNuQFKBGATL5rnx7UzgT7t6CZhG+aPr50VVuC/3IL1+Ok85DjT/LnOKaao3r+Wd+HMFVViM= -notifications: - webhooks: http://build.servo.org:54856/travis diff --git a/deps/url-0.2.38/Cargo.toml b/deps/url-0.2.38/Cargo.toml deleted file mode 100644 index 355d51362..000000000 --- a/deps/url-0.2.38/Cargo.toml +++ /dev/null @@ -1,38 +0,0 @@ -[package] - -name = "url" -version = "0.2.38" -authors = [ "Simon Sapin <simon.sapin@exyr.org>" ] - -description = "URL library for Rust, based on the WHATWG URL Standard" -documentation = "http://servo.github.io/rust-url/url/index.html" -repository = "https://github.com/servo/rust-url" -readme = "README.md" -keywords = ["url", "parser"] -license = "MIT/Apache-2.0" - -[features] -query_encoding = ["encoding"] -serde_serialization = ["serde"] -heap_size = ["heapsize", "heapsize_plugin"] - -[dependencies.heapsize] -version = "0.1.1" -optional = true - -[dependencies.heapsize_plugin] -version = "0.1.0" -optional = true - -[dependencies.encoding] -version = "0.2" -optional = true - -[dependencies.serde] -version = "0.6.1" -optional = true - -[dependencies] -uuid = "0.1.17" -rustc-serialize = "0.3" -matches = "0.1" diff --git a/deps/url-0.2.38/LICENSE-MIT b/deps/url-0.2.38/LICENSE-MIT deleted file mode 100644 index 1da3a5f6d..000000000 --- a/deps/url-0.2.38/LICENSE-MIT +++ /dev/null @@ -1,26 +0,0 @@ -Copyright (c) 2006-2009 Graydon Hoare -Copyright (c) 2009-2013 Mozilla Foundation - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. diff --git a/deps/url-0.2.38/Makefile b/deps/url-0.2.38/Makefile deleted file mode 100644 index e46603bee..000000000 --- a/deps/url-0.2.38/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -test: - cargo test --features query_encoding - cargo test --features serde_serialization - cargo test - [ x$$TRAVIS_RUST_VERSION != xnightly ] || cargo test --features heap_size - -doc: - cargo doc --features "query_encoding serde_serialization" - @echo '<meta http-equiv=refresh content=0;url=url/index.html>' > target/doc/index.html - @cp github.png target/doc/ - -upload-doc: doc - test "$(TRAVIS_BRANCH)" = master - test "$(TRAVIS_PULL_REQUEST)" = false - sudo pip install ghp-import - ghp-import -n target/doc - git push -qf https://$(TOKEN)@github.com/$(TRAVIS_REPO_SLUG).git gh-pages - -.PHONY: test doc upload-doc diff --git a/deps/url-0.2.38/make_encode_sets.py b/deps/url-0.2.38/make_encode_sets.py deleted file mode 100644 index eb859050f..000000000 --- a/deps/url-0.2.38/make_encode_sets.py +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright 2013-2014 Simon Sapin. -# -# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -# option. This file may not be copied, modified, or distributed -# except according to those terms. - - -# Run as: python make_encode_sets.py > src/encode_sets.rs - - -print('''\ -// Copyright 2013-2014 Simon Sapin. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -// Generated by make_encode_sets.py -''') -for name, encoded in [ - ('SIMPLE', ''), - ('QUERY', r''' "#<>'''), - ('DEFAULT', r''' "#<>`?{}'''), - ('USERINFO', r''' "#<>`?{}@'''), - ('PASSWORD', r''' "#<>`?{}@\/'''), - ('USERNAME', r''' "#<>`?{}@\/:'''), - ('FORM_URLENCODED', r''' !"#$%&\'()+,/:;<=>?@[\]^`{|}~'''), - ('HTTP_VALUE', r''' "%'()*,/:;<->?[\]{}'''), -]: - print( - "pub static %s: [&'static str; 256] = [\n%s\n];\n\n" - % (name, '\n'.join( - ' ' + ' '.join( - '"%s%s",' % ("\\" if chr(b) in '\\"' else "", chr(b)) - if 0x20 <= b <= 0x7E and chr(b) not in encoded - else '"%%%02X",' % b - for b in range(s, s + 8) - ) for s in range(0, 256, 8)))) diff --git a/deps/url-0.2.38/src/encode_sets.rs b/deps/url-0.2.38/src/encode_sets.rs deleted file mode 100644 index d7b5fb9d9..000000000 --- a/deps/url-0.2.38/src/encode_sets.rs +++ /dev/null @@ -1,298 +0,0 @@ -// Copyright 2013-2014 Simon Sapin. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -// Generated by make_encode_sets.py - -pub static SIMPLE: [&'static str; 256] = [ - "%00", "%01", "%02", "%03", "%04", "%05", "%06", "%07", - "%08", "%09", "%0A", "%0B", "%0C", "%0D", "%0E", "%0F", - "%10", "%11", "%12", "%13", "%14", "%15", "%16", "%17", - "%18", "%19", "%1A", "%1B", "%1C", "%1D", "%1E", "%1F", - " ", "!", "\"", "#", "$", "%", "&", "'", - "(", ")", "*", "+", ",", "-", ".", "/", - "0", "1", "2", "3", "4", "5", "6", "7", - "8", "9", ":", ";", "<", "=", ">", "?", - "@", "A", "B", "C", "D", "E", "F", "G", - "H", "I", "J", "K", "L", "M", "N", "O", - "P", "Q", "R", "S", "T", "U", "V", "W", - "X", "Y", "Z", "[", "\\", "]", "^", "_", - "`", "a", "b", "c", "d", "e", "f", "g", - "h", "i", "j", "k", "l", "m", "n", "o", - "p", "q", "r", "s", "t", "u", "v", "w", - "x", "y", "z", "{", "|", "}", "~", "%7F", - "%80", "%81", "%82", "%83", "%84", "%85", "%86", "%87", - "%88", "%89", "%8A", "%8B", "%8C", "%8D", "%8E", "%8F", - "%90", "%91", "%92", "%93", "%94", "%95", "%96", "%97", - "%98", "%99", "%9A", "%9B", "%9C", "%9D", "%9E", "%9F", - "%A0", "%A1", "%A2", "%A3", "%A4", "%A5", "%A6", "%A7", - "%A8", "%A9", "%AA", "%AB", "%AC", "%AD", "%AE", "%AF", - "%B0", "%B1", "%B2", "%B3", "%B4", "%B5", "%B6", "%B7", - "%B8", "%B9", "%BA", "%BB", "%BC", "%BD", "%BE", "%BF", - "%C0", "%C1", "%C2", "%C3", "%C4", "%C5", "%C6", "%C7", - "%C8", "%C9", "%CA", "%CB", "%CC", "%CD", "%CE", "%CF", - "%D0", "%D1", "%D2", "%D3", "%D4", "%D5", "%D6", "%D7", - "%D8", "%D9", "%DA", "%DB", "%DC", "%DD", "%DE", "%DF", - "%E0", "%E1", "%E2", "%E3", "%E4", "%E5", "%E6", "%E7", - "%E8", "%E9", "%EA", "%EB", "%EC", "%ED", "%EE", "%EF", - "%F0", "%F1", "%F2", "%F3", "%F4", "%F5", "%F6", "%F7", - "%F8", "%F9", "%FA", "%FB", "%FC", "%FD", "%FE", "%FF", -]; - - -pub static QUERY: [&'static str; 256] = [ - "%00", "%01", "%02", "%03", "%04", "%05", "%06", "%07", - "%08", "%09", "%0A", "%0B", "%0C", "%0D", "%0E", "%0F", - "%10", "%11", "%12", "%13", "%14", "%15", "%16", "%17", - "%18", "%19", "%1A", "%1B", "%1C", "%1D", "%1E", "%1F", - "%20", "!", "%22", "%23", "$", "%", "&", "'", - "(", ")", "*", "+", ",", "-", ".", "/", - "0", "1", "2", "3", "4", "5", "6", "7", - "8", "9", ":", ";", "%3C", "=", "%3E", "?", - "@", "A", "B", "C", "D", "E", "F", "G", - "H", "I", "J", "K", "L", "M", "N", "O", - "P", "Q", "R", "S", "T", "U", "V", "W", - "X", "Y", "Z", "[", "\\", "]", "^", "_", - "`", "a", "b", "c", "d", "e", "f", "g", - "h", "i", "j", "k", "l", "m", "n", "o", - "p", "q", "r", "s", "t", "u", "v", "w", - "x", "y", "z", "{", "|", "}", "~", "%7F", - "%80", "%81", "%82", "%83", "%84", "%85", "%86", "%87", - "%88", "%89", "%8A", "%8B", "%8C", "%8D", "%8E", "%8F", - "%90", "%91", "%92", "%93", "%94", "%95", "%96", "%97", - "%98", "%99", "%9A", "%9B", "%9C", "%9D", "%9E", "%9F", - "%A0", "%A1", "%A2", "%A3", "%A4", "%A5", "%A6", "%A7", - "%A8", "%A9", "%AA", "%AB", "%AC", "%AD", "%AE", "%AF", - "%B0", "%B1", "%B2", "%B3", "%B4", "%B5", "%B6", "%B7", - "%B8", "%B9", "%BA", "%BB", "%BC", "%BD", "%BE", "%BF", - "%C0", "%C1", "%C2", "%C3", "%C4", "%C5", "%C6", "%C7", - "%C8", "%C9", "%CA", "%CB", "%CC", "%CD", "%CE", "%CF", - "%D0", "%D1", "%D2", "%D3", "%D4", "%D5", "%D6", "%D7", - "%D8", "%D9", "%DA", "%DB", "%DC", "%DD", "%DE", "%DF", - "%E0", "%E1", "%E2", "%E3", "%E4", "%E5", "%E6", "%E7", - "%E8", "%E9", "%EA", "%EB", "%EC", "%ED", "%EE", "%EF", - "%F0", "%F1", "%F2", "%F3", "%F4", "%F5", "%F6", "%F7", - "%F8", "%F9", "%FA", "%FB", "%FC", "%FD", "%FE", "%FF", -]; - - -pub static DEFAULT: [&'static str; 256] = [ - "%00", "%01", "%02", "%03", "%04", "%05", "%06", "%07", - "%08", "%09", "%0A", "%0B", "%0C", "%0D", "%0E", "%0F", - "%10", "%11", "%12", "%13", "%14", "%15", "%16", "%17", - "%18", "%19", "%1A", "%1B", "%1C", "%1D", "%1E", "%1F", - "%20", "!", "%22", "%23", "$", "%", "&", "'", - "(", ")", "*", "+", ",", "-", ".", "/", - "0", "1", "2", "3", "4", "5", "6", "7", - "8", "9", ":", ";", "%3C", "=", "%3E", "%3F", - "@", "A", "B", "C", "D", "E", "F", "G", - "H", "I", "J", "K", "L", "M", "N", "O", - "P", "Q", "R", "S", "T", "U", "V", "W", - "X", "Y", "Z", "[", "\\", "]", "^", "_", - "%60", "a", "b", "c", "d", "e", "f", "g", - "h", "i", "j", "k", "l", "m", "n", "o", - "p", "q", "r", "s", "t", "u", "v", "w", - "x", "y", "z", "%7B", "|", "%7D", "~", "%7F", - "%80", "%81", "%82", "%83", "%84", "%85", "%86", "%87", - "%88", "%89", "%8A", "%8B", "%8C", "%8D", "%8E", "%8F", - "%90", "%91", "%92", "%93", "%94", "%95", "%96", "%97", - "%98", "%99", "%9A", "%9B", "%9C", "%9D", "%9E", "%9F", - "%A0", "%A1", "%A2", "%A3", "%A4", "%A5", "%A6", "%A7", - "%A8", "%A9", "%AA", "%AB", "%AC", "%AD", "%AE", "%AF", - "%B0", "%B1", "%B2", "%B3", "%B4", "%B5", "%B6", "%B7", - "%B8", "%B9", "%BA", "%BB", "%BC", "%BD", "%BE", "%BF", - "%C0", "%C1", "%C2", "%C3", "%C4", "%C5", "%C6", "%C7", - "%C8", "%C9", "%CA", "%CB", "%CC", "%CD", "%CE", "%CF", - "%D0", "%D1", "%D2", "%D3", "%D4", "%D5", "%D6", "%D7", - "%D8", "%D9", "%DA", "%DB", "%DC", "%DD", "%DE", "%DF", - "%E0", "%E1", "%E2", "%E3", "%E4", "%E5", "%E6", "%E7", - "%E8", "%E9", "%EA", "%EB", "%EC", "%ED", "%EE", "%EF", - "%F0", "%F1", "%F2", "%F3", "%F4", "%F5", "%F6", "%F7", - "%F8", "%F9", "%FA", "%FB", "%FC", "%FD", "%FE", "%FF", -]; - - -pub static USERINFO: [&'static str; 256] = [ - "%00", "%01", "%02", "%03", "%04", "%05", "%06", "%07", - "%08", "%09", "%0A", "%0B", "%0C", "%0D", "%0E", "%0F", - "%10", "%11", "%12", "%13", "%14", "%15", "%16", "%17", - "%18", "%19", "%1A", "%1B", "%1C", "%1D", "%1E", "%1F", - "%20", "!", "%22", "%23", "$", "%", "&", "'", - "(", ")", "*", "+", ",", "-", ".", "/", - "0", "1", "2", "3", "4", "5", "6", "7", - "8", "9", ":", ";", "%3C", "=", "%3E", "%3F", - "%40", "A", "B", "C", "D", "E", "F", "G", - "H", "I", "J", "K", "L", "M", "N", "O", - "P", "Q", "R", "S", "T", "U", "V", "W", - "X", "Y", "Z", "[", "\\", "]", "^", "_", - "%60", "a", "b", "c", "d", "e", "f", "g", - "h", "i", "j", "k", "l", "m", "n", "o", - "p", "q", "r", "s", "t", "u", "v", "w", - "x", "y", "z", "%7B", "|", "%7D", "~", "%7F", - "%80", "%81", "%82", "%83", "%84", "%85", "%86", "%87", - "%88", "%89", "%8A", "%8B", "%8C", "%8D", "%8E", "%8F", - "%90", "%91", "%92", "%93", "%94", "%95", "%96", "%97", - "%98", "%99", "%9A", "%9B", "%9C", "%9D", "%9E", "%9F", - "%A0", "%A1", "%A2", "%A3", "%A4", "%A5", "%A6", "%A7", - "%A8", "%A9", "%AA", "%AB", "%AC", "%AD", "%AE", "%AF", - "%B0", "%B1", "%B2", "%B3", "%B4", "%B5", "%B6", "%B7", - "%B8", "%B9", "%BA", "%BB", "%BC", "%BD", "%BE", "%BF", - "%C0", "%C1", "%C2", "%C3", "%C4", "%C5", "%C6", "%C7", - "%C8", "%C9", "%CA", "%CB", "%CC", "%CD", "%CE", "%CF", - "%D0", "%D1", "%D2", "%D3", "%D4", "%D5", "%D6", "%D7", - "%D8", "%D9", "%DA", "%DB", "%DC", "%DD", "%DE", "%DF", - "%E0", "%E1", "%E2", "%E3", "%E4", "%E5", "%E6", "%E7", - "%E8", "%E9", "%EA", "%EB", "%EC", "%ED", "%EE", "%EF", - "%F0", "%F1", "%F2", "%F3", "%F4", "%F5", "%F6", "%F7", - "%F8", "%F9", "%FA", "%FB", "%FC", "%FD", "%FE", "%FF", -]; - - -pub static PASSWORD: [&'static str; 256] = [ - "%00", "%01", "%02", "%03", "%04", "%05", "%06", "%07", - "%08", "%09", "%0A", "%0B", "%0C", "%0D", "%0E", "%0F", - "%10", "%11", "%12", "%13", "%14", "%15", "%16", "%17", - "%18", "%19", "%1A", "%1B", "%1C", "%1D", "%1E", "%1F", - "%20", "!", "%22", "%23", "$", "%", "&", "'", - "(", ")", "*", "+", ",", "-", ".", "%2F", - "0", "1", "2", "3", "4", "5", "6", "7", - "8", "9", ":", ";", "%3C", "=", "%3E", "%3F", - "%40", "A", "B", "C", "D", "E", "F", "G", - "H", "I", "J", "K", "L", "M", "N", "O", - "P", "Q", "R", "S", "T", "U", "V", "W", - "X", "Y", "Z", "[", "%5C", "]", "^", "_", - "%60", "a", "b", "c", "d", "e", "f", "g", - "h", "i", "j", "k", "l", "m", "n", "o", - "p", "q", "r", "s", "t", "u", "v", "w", - "x", "y", "z", "%7B", "|", "%7D", "~", "%7F", - "%80", "%81", "%82", "%83", "%84", "%85", "%86", "%87", - "%88", "%89", "%8A", "%8B", "%8C", "%8D", "%8E", "%8F", - "%90", "%91", "%92", "%93", "%94", "%95", "%96", "%97", - "%98", "%99", "%9A", "%9B", "%9C", "%9D", "%9E", "%9F", - "%A0", "%A1", "%A2", "%A3", "%A4", "%A5", "%A6", "%A7", - "%A8", "%A9", "%AA", "%AB", "%AC", "%AD", "%AE", "%AF", - "%B0", "%B1", "%B2", "%B3", "%B4", "%B5", "%B6", "%B7", - "%B8", "%B9", "%BA", "%BB", "%BC", "%BD", "%BE", "%BF", - "%C0", "%C1", "%C2", "%C3", "%C4", "%C5", "%C6", "%C7", - "%C8", "%C9", "%CA", "%CB", "%CC", "%CD", "%CE", "%CF", - "%D0", "%D1", "%D2", "%D3", "%D4", "%D5", "%D6", "%D7", - "%D8", "%D9", "%DA", "%DB", "%DC", "%DD", "%DE", "%DF", - "%E0", "%E1", "%E2", "%E3", "%E4", "%E5", "%E6", "%E7", - "%E8", "%E9", "%EA", "%EB", "%EC", "%ED", "%EE", "%EF", - "%F0", "%F1", "%F2", "%F3", "%F4", "%F5", "%F6", "%F7", - "%F8", "%F9", "%FA", "%FB", "%FC", "%FD", "%FE", "%FF", -]; - - -pub static USERNAME: [&'static str; 256] = [ - "%00", "%01", "%02", "%03", "%04", "%05", "%06", "%07", - "%08", "%09", "%0A", "%0B", "%0C", "%0D", "%0E", "%0F", - "%10", "%11", "%12", "%13", "%14", "%15", "%16", "%17", - "%18", "%19", "%1A", "%1B", "%1C", "%1D", "%1E", "%1F", - "%20", "!", "%22", "%23", "$", "%", "&", "'", - "(", ")", "*", "+", ",", "-", ".", "%2F", - "0", "1", "2", "3", "4", "5", "6", "7", - "8", "9", "%3A", ";", "%3C", "=", "%3E", "%3F", - "%40", "A", "B", "C", "D", "E", "F", "G", - "H", "I", "J", "K", "L", "M", "N", "O", - "P", "Q", "R", "S", "T", "U", "V", "W", - "X", "Y", "Z", "[", "%5C", "]", "^", "_", - "%60", "a", "b", "c", "d", "e", "f", "g", - "h", "i", "j", "k", "l", "m", "n", "o", - "p", "q", "r", "s", "t", "u", "v", "w", - "x", "y", "z", "%7B", "|", "%7D", "~", "%7F", - "%80", "%81", "%82", "%83", "%84", "%85", "%86", "%87", - "%88", "%89", "%8A", "%8B", "%8C", "%8D", "%8E", "%8F", - "%90", "%91", "%92", "%93", "%94", "%95", "%96", "%97", - "%98", "%99", "%9A", "%9B", "%9C", "%9D", "%9E", "%9F", - "%A0", "%A1", "%A2", "%A3", "%A4", "%A5", "%A6", "%A7", - "%A8", "%A9", "%AA", "%AB", "%AC", "%AD", "%AE", "%AF", - "%B0", "%B1", "%B2", "%B3", "%B4", "%B5", "%B6", "%B7", - "%B8", "%B9", "%BA", "%BB", "%BC", "%BD", "%BE", "%BF", - "%C0", "%C1", "%C2", "%C3", "%C4", "%C5", "%C6", "%C7", - "%C8", "%C9", "%CA", "%CB", "%CC", "%CD", "%CE", "%CF", - "%D0", "%D1", "%D2", "%D3", "%D4", "%D5", "%D6", "%D7", - "%D8", "%D9", "%DA", "%DB", "%DC", "%DD", "%DE", "%DF", - "%E0", "%E1", "%E2", "%E3", "%E4", "%E5", "%E6", "%E7", - "%E8", "%E9", "%EA", "%EB", "%EC", "%ED", "%EE", "%EF", - "%F0", "%F1", "%F2", "%F3", "%F4", "%F5", "%F6", "%F7", - "%F8", "%F9", "%FA", "%FB", "%FC", "%FD", "%FE", "%FF", -]; - - -pub static FORM_URLENCODED: [&'static str; 256] = [ - "%00", "%01", "%02", "%03", "%04", "%05", "%06", "%07", - "%08", "%09", "%0A", "%0B", "%0C", "%0D", "%0E", "%0F", - "%10", "%11", "%12", "%13", "%14", "%15", "%16", "%17", - "%18", "%19", "%1A", "%1B", "%1C", "%1D", "%1E", "%1F", - "%20", "%21", "%22", "%23", "%24", "%25", "%26", "%27", - "%28", "%29", "*", "%2B", "%2C", "-", ".", "%2F", - "0", "1", "2", "3", "4", "5", "6", "7", - "8", "9", "%3A", "%3B", "%3C", "%3D", "%3E", "%3F", - "%40", "A", "B", "C", "D", "E", "F", "G", - "H", "I", "J", "K", "L", "M", "N", "O", - "P", "Q", "R", "S", "T", "U", "V", "W", - "X", "Y", "Z", "%5B", "%5C", "%5D", "%5E", "_", - "%60", "a", "b", "c", "d", "e", "f", "g", - "h", "i", "j", "k", "l", "m", "n", "o", - "p", "q", "r", "s", "t", "u", "v", "w", - "x", "y", "z", "%7B", "%7C", "%7D", "%7E", "%7F", - "%80", "%81", "%82", "%83", "%84", "%85", "%86", "%87", - "%88", "%89", "%8A", "%8B", "%8C", "%8D", "%8E", "%8F", - "%90", "%91", "%92", "%93", "%94", "%95", "%96", "%97", - "%98", "%99", "%9A", "%9B", "%9C", "%9D", "%9E", "%9F", - "%A0", "%A1", "%A2", "%A3", "%A4", "%A5", "%A6", "%A7", - "%A8", "%A9", "%AA", "%AB", "%AC", "%AD", "%AE", "%AF", - "%B0", "%B1", "%B2", "%B3", "%B4", "%B5", "%B6", "%B7", - "%B8", "%B9", "%BA", "%BB", "%BC", "%BD", "%BE", "%BF", - "%C0", "%C1", "%C2", "%C3", "%C4", "%C5", "%C6", "%C7", - "%C8", "%C9", "%CA", "%CB", "%CC", "%CD", "%CE", "%CF", - "%D0", "%D1", "%D2", "%D3", "%D4", "%D5", "%D6", "%D7", - "%D8", "%D9", "%DA", "%DB", "%DC", "%DD", "%DE", "%DF", - "%E0", "%E1", "%E2", "%E3", "%E4", "%E5", "%E6", "%E7", - "%E8", "%E9", "%EA", "%EB", "%EC", "%ED", "%EE", "%EF", - "%F0", "%F1", "%F2", "%F3", "%F4", "%F5", "%F6", "%F7", - "%F8", "%F9", "%FA", "%FB", "%FC", "%FD", "%FE", "%FF", -]; - - -pub static HTTP_VALUE: [&'static str; 256] = [ - "%00", "%01", "%02", "%03", "%04", "%05", "%06", "%07", - "%08", "%09", "%0A", "%0B", "%0C", "%0D", "%0E", "%0F", - "%10", "%11", "%12", "%13", "%14", "%15", "%16", "%17", - "%18", "%19", "%1A", "%1B", "%1C", "%1D", "%1E", "%1F", - "%20", "!", "%22", "#", "$", "%25", "&", "%27", - "%28", "%29", "%2A", "+", "%2C", "%2D", ".", "%2F", - "0", "1", "2", "3", "4", "5", "6", "7", - "8", "9", "%3A", "%3B", "%3C", "=", "%3E", "%3F", - "@", "A", "B", "C", "D", "E", "F", "G", - "H", "I", "J", "K", "L", "M", "N", "O", - "P", "Q", "R", "S", "T", "U", "V", "W", - "X", "Y", "Z", "%5B", "%5C", "%5D", "^", "_", - "`", "a", "b", "c", "d", "e", "f", "g", - "h", "i", "j", "k", "l", "m", "n", "o", - "p", "q", "r", "s", "t", "u", "v", "w", - "x", "y", "z", "%7B", "|", "%7D", "~", "%7F", - "%80", "%81", "%82", "%83", "%84", "%85", "%86", "%87", - "%88", "%89", "%8A", "%8B", "%8C", "%8D", "%8E", "%8F", - "%90", "%91", "%92", "%93", "%94", "%95", "%96", "%97", - "%98", "%99", "%9A", "%9B", "%9C", "%9D", "%9E", "%9F", - "%A0", "%A1", "%A2", "%A3", "%A4", "%A5", "%A6", "%A7", - "%A8", "%A9", "%AA", "%AB", "%AC", "%AD", "%AE", "%AF", - "%B0", "%B1", "%B2", "%B3", "%B4", "%B5", "%B6", "%B7", - "%B8", "%B9", "%BA", "%BB", "%BC", "%BD", "%BE", "%BF", - "%C0", "%C1", "%C2", "%C3", "%C4", "%C5", "%C6", "%C7", - "%C8", "%C9", "%CA", "%CB", "%CC", "%CD", "%CE", "%CF", - "%D0", "%D1", "%D2", "%D3", "%D4", "%D5", "%D6", "%D7", - "%D8", "%D9", "%DA", "%DB", "%DC", "%DD", "%DE", "%DF", - "%E0", "%E1", "%E2", "%E3", "%E4", "%E5", "%E6", "%E7", - "%E8", "%E9", "%EA", "%EB", "%EC", "%ED", "%EE", "%EF", - "%F0", "%F1", "%F2", "%F3", "%F4", "%F5", "%F6", "%F7", - "%F8", "%F9", "%FA", "%FB", "%FC", "%FD", "%FE", "%FF", -]; - - diff --git a/deps/url-0.2.38/src/encoding.rs b/deps/url-0.2.38/src/encoding.rs deleted file mode 100644 index 5cdd71d3e..000000000 --- a/deps/url-0.2.38/src/encoding.rs +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright 2013-2014 Simon Sapin. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - - -//! Abstraction that conditionally compiles either to rust-encoding, -//! or to only support UTF-8. - -#[cfg(feature = "query_encoding")] extern crate encoding; - -use std::borrow::Cow; - -#[cfg(feature = "query_encoding")] use self::encoding::types::{DecoderTrap, EncoderTrap}; -#[cfg(feature = "query_encoding")] use self::encoding::label::encoding_from_whatwg_label; -#[cfg(feature = "query_encoding")] pub use self::encoding::types::EncodingRef; - -#[cfg(feature = "query_encoding")] -#[derive(Copy, Clone)] -pub struct EncodingOverride { - /// `None` means UTF-8. - encoding: Option<EncodingRef> -} - -#[cfg(feature = "query_encoding")] -impl EncodingOverride { - pub fn from_opt_encoding(encoding: Option<EncodingRef>) -> EncodingOverride { - encoding.map(EncodingOverride::from_encoding).unwrap_or_else(EncodingOverride::utf8) - } - - pub fn from_encoding(encoding: EncodingRef) -> EncodingOverride { - EncodingOverride { - encoding: if encoding.name() == "utf-8" { None } else { Some(encoding) } - } - } - - pub fn utf8() -> EncodingOverride { - EncodingOverride { encoding: None } - } - - pub fn lookup(label: &[u8]) -> Option<EncodingOverride> { - ::std::str::from_utf8(label) - .ok() - .and_then(encoding_from_whatwg_label) - .map(EncodingOverride::from_encoding) - } - - pub fn is_utf8(&self) -> bool { - self.encoding.is_none() - } - - pub fn decode(&self, input: &[u8]) -> String { - match self.encoding { - Some(encoding) => encoding.decode(input, DecoderTrap::Replace).unwrap(), - None => String::from_utf8_lossy(input).to_string(), - } - } - - pub fn encode<'a>(&self, input: &'a str) -> Cow<'a, [u8]> { - match self.encoding { - Some(encoding) => Cow::Owned( - encoding.encode(input, EncoderTrap::NcrEscape).unwrap()), - None => Cow::Borrowed(input.as_bytes()), // UTF-8 - } - } -} - - -#[cfg(not(feature = "query_encoding"))] -#[derive(Copy, Clone)] -pub struct EncodingOverride; - -#[cfg(not(feature = "query_encoding"))] -impl EncodingOverride { - pub fn utf8() -> EncodingOverride { - EncodingOverride - } - - pub fn lookup(_label: &[u8]) -> Option<EncodingOverride> { - None - } - - pub fn is_utf8(&self) -> bool { - true - } - - pub fn decode(&self, input: &[u8]) -> String { - String::from_utf8_lossy(input).into_owned() - } - - pub fn encode<'a>(&self, input: &'a str) -> Cow<'a, [u8]> { - Cow::Borrowed(input.as_bytes()) - } -} diff --git a/deps/url-0.2.38/src/form_urlencoded.rs b/deps/url-0.2.38/src/form_urlencoded.rs deleted file mode 100644 index 652090304..000000000 --- a/deps/url-0.2.38/src/form_urlencoded.rs +++ /dev/null @@ -1,177 +0,0 @@ -// Copyright 2013-2015 Simon Sapin. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -//! Parser and serializer for the [`application/x-www-form-urlencoded` format]( -//! http://url.spec.whatwg.org/#application/x-www-form-urlencoded), -//! as used by HTML forms. -//! -//! Converts between a string (such as an URL’s query string) -//! and a sequence of (name, value) pairs. - -use std::borrow::Borrow; -use std::ascii::AsciiExt; -use encoding::EncodingOverride; -use percent_encoding::{percent_encode_to, percent_decode, FORM_URLENCODED_ENCODE_SET}; - - -/// Convert a byte string in the `application/x-www-form-urlencoded` format -/// into a vector of (name, value) pairs. -/// -/// Use `parse(input.as_bytes())` to parse a `&str` string. -/// -/// The names and values are URL-decoded. For instance, `%23first=%25try%25` will be -/// converted to `[("#first", "%try%")]`. -#[inline] -pub fn parse(input: &[u8]) -> Vec<(String, String)> { - parse_internal(input, EncodingOverride::utf8(), false).unwrap() -} - - -/// Convert a byte string in the `application/x-www-form-urlencoded` format -/// into a vector of (name, value) pairs. -/// -/// Use `parse(input.as_bytes())` to parse a `&str` string. -/// -/// This function is only available if the `query_encoding` Cargo feature is enabled. -/// -/// Arguments: -/// -/// * `encoding_override`: The character encoding each name and values is decoded as -/// after percent-decoding. Defaults to UTF-8. -/// * `use_charset`: The *use _charset_ flag*. If in doubt, set to `false`. -#[cfg(feature = "query_encoding")] -#[inline] -pub fn parse_with_encoding(input: &[u8], encoding_override: Option<::encoding::EncodingRef>, - use_charset: bool) - -> Option<Vec<(String, String)>> { - parse_internal(input, EncodingOverride::from_opt_encoding(encoding_override), use_charset) -} - - -fn parse_internal(input: &[u8], mut encoding_override: EncodingOverride, mut use_charset: bool) - -> Option<Vec<(String, String)>> { - let mut pairs = Vec::new(); - for piece in input.split(|&b| b == b'&') { - if !piece.is_empty() { - let (name, value) = match piece.iter().position(|b| *b == b'=') { - Some(position) => (&piece[..position], &piece[position + 1..]), - None => (piece, &[][..]) - }; - - #[inline] - fn replace_plus(input: &[u8]) -> Vec<u8> { - input.iter().map(|&b| if b == b'+' { b' ' } else { b }).collect() - } - - let name = replace_plus(name); - let value = replace_plus(value); - if use_charset && name == b"_charset_" { - if let Some(encoding) = EncodingOverride::lookup(&value) { - encoding_override = encoding; - } - use_charset = false; - } - pairs.push((name, value)); - } - } - if !(encoding_override.is_utf8() || input.is_ascii()) { - return None - } - - Some(pairs.into_iter().map(|(name, value)| ( - encoding_override.decode(&percent_decode(&name)), - encoding_override.decode(&percent_decode(&value)) - )).collect()) -} - - -/// Convert an iterator of (name, value) pairs -/// into a string in the `application/x-www-form-urlencoded` format. -#[inline] -pub fn serialize<I, K, V>(pairs: I) -> String -where I: IntoIterator, I::Item: Borrow<(K, V)>, K: AsRef<str>, V: AsRef<str> { - serialize_internal(pairs, EncodingOverride::utf8()) -} - -/// Convert an iterator of (name, value) pairs -/// into a string in the `application/x-www-form-urlencoded` format. -/// -/// This function is only available if the `query_encoding` Cargo feature is enabled. -/// -/// Arguments: -/// -/// * `encoding_override`: The character encoding each name and values is encoded as -/// before percent-encoding. Defaults to UTF-8. -#[cfg(feature = "query_encoding")] -#[inline] -pub fn serialize_with_encoding<I, K, V>(pairs: I, - encoding_override: Option<::encoding::EncodingRef>) - -> String -where I: IntoIterator, I::Item: Borrow<(K, V)>, K: AsRef<str>, V: AsRef<str> { - serialize_internal(pairs, EncodingOverride::from_opt_encoding(encoding_override)) -} - -fn serialize_internal<I, K, V>(pairs: I, encoding_override: EncodingOverride) -> String -where I: IntoIterator, I::Item: Borrow<(K, V)>, K: AsRef<str>, V: AsRef<str> { - #[inline] - fn byte_serialize(input: &str, output: &mut String, - encoding_override: EncodingOverride) { - for &byte in encoding_override.encode(input).iter() { - if byte == b' ' { - output.push_str("+") - } else { - percent_encode_to(&[byte], FORM_URLENCODED_ENCODE_SET, output) - } - } - } - - let mut output = String::new(); - for pair in pairs { - let &(ref name, ref value) = pair.borrow(); - if output.len() > 0 { - output.push_str("&"); - } - byte_serialize(name.as_ref(), &mut output, encoding_override); - output.push_str("="); - byte_serialize(value.as_ref(), &mut output, encoding_override); - } - output -} - - - -#[cfg(test)] -mod tests { - use super::*; - - #[test] - fn test_form_urlencoded() { - let pairs = &[ - ("foo".to_string(), "é&".to_string()), - ("bar".to_string(), "".to_string()), - ("foo".to_string(), "#".to_string()) - ]; - let encoded = serialize(pairs); - assert_eq!(encoded, "foo=%C3%A9%26&bar=&foo=%23"); - assert_eq!(parse(encoded.as_bytes()), pairs.to_vec()); - } - - #[test] - fn test_form_serialize() { - let pairs = [("foo", "é&"), - ("bar", ""), - ("foo", "#")]; - - let want = "foo=%C3%A9%26&bar=&foo=%23"; - // Works with referenced tuples - assert_eq!(serialize(pairs.iter()), want); - // Works with owned tuples - assert_eq!(serialize(pairs.iter().map(|p| (p.0, p.1))), want); - - } -} diff --git a/deps/url-0.2.38/src/format.rs b/deps/url-0.2.38/src/format.rs deleted file mode 100644 index c448bd539..000000000 --- a/deps/url-0.2.38/src/format.rs +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright 2013-2015 Simon Sapin. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -//! Formatting utilities for URLs. -//! -//! These formatters can be used to coerce various URL parts into strings. -//! -//! You can use `<formatter>.to_string()`, as the formatters implement `fmt::Display`. - -use std::fmt::{self, Formatter}; -use super::Url; - -/// Formatter and serializer for URL path data. -pub struct PathFormatter<'a, T:'a> { - /// The path as a slice of string-like objects (String or &str). - pub path: &'a [T] -} - -impl<'a, T: fmt::Display> fmt::Display for PathFormatter<'a, T> { - fn fmt(&self, formatter: &mut Formatter) -> fmt::Result { - if self.path.is_empty() { - formatter.write_str("/") - } else { - for path_part in self.path { - try!("/".fmt(formatter)); - try!(path_part.fmt(formatter)); - } - Ok(()) - } - } -} - - -/// Formatter and serializer for URL username and password data. -pub struct UserInfoFormatter<'a> { - /// URL username as a string slice. - pub username: &'a str, - - /// URL password as an optional string slice. - /// - /// You can convert an `Option<String>` with `.as_ref().map(|s| s)`. - pub password: Option<&'a str> -} - -impl<'a> fmt::Display for UserInfoFormatter<'a> { - fn fmt(&self, formatter: &mut Formatter) -> fmt::Result { - if !self.username.is_empty() || self.password.is_some() { - try!(formatter.write_str(self.username)); - if let Some(password) = self.password { - try!(formatter.write_str(":")); - try!(formatter.write_str(password)); - } - try!(formatter.write_str("@")); - } - Ok(()) - } -} - - -/// Formatter for URLs which ignores the fragment field. -pub struct UrlNoFragmentFormatter<'a> { - pub url: &'a Url -} - -impl<'a> fmt::Display for UrlNoFragmentFormatter<'a> { - fn fmt(&self, formatter: &mut Formatter) -> fmt::Result { - try!(formatter.write_str(&self.url.scheme)); - try!(formatter.write_str(":")); - try!(self.url.scheme_data.fmt(formatter)); - if let Some(ref query) = self.url.query { - try!(formatter.write_str("?")); - try!(formatter.write_str(query)); - } - Ok(()) - } -} - - -/// Formatting Tests -#[cfg(test)] -mod tests { - use super::super::Url; - use super::{PathFormatter, UserInfoFormatter}; - - #[test] - fn path_formatting() { - let data = [ - (vec![], "/"), - (vec![""], "/"), - (vec!["test", "path"], "/test/path"), - (vec!["test", "path", ""], "/test/path/") - ]; - for &(ref path, result) in &data { - assert_eq!(PathFormatter { - path: path - }.to_string(), result.to_string()); - } - } - - #[test] - fn userinfo_formatting() { - // Test data as (username, password, result) tuples. - let data = [ - ("", None, ""), - ("", Some(""), ":@"), - ("", Some("password"), ":password@"), - ("username", None, "username@"), - ("username", Some(""), "username:@"), - ("username", Some("password"), "username:password@") - ]; - for &(username, password, result) in &data { - assert_eq!(UserInfoFormatter { - username: username, - password: password - }.to_string(), result.to_string()); - } - } - - #[test] - fn relative_scheme_url_formatting() { - let data = [ - ("http://example.com/", "http://example.com/"), - ("http://addslash.com", "http://addslash.com/"), - ("http://@emptyuser.com/", "http://emptyuser.com/"), - ("http://:@emptypass.com/", "http://:@emptypass.com/"), - ("http://user@user.com/", "http://user@user.com/"), - ("http://user:pass@userpass.com/", "http://user:pass@userpass.com/"), - ("http://slashquery.com/path/?q=something", "http://slashquery.com/path/?q=something"), - ("http://noslashquery.com/path?q=something", "http://noslashquery.com/path?q=something") - ]; - for &(input, result) in &data { - let url = Url::parse(input).unwrap(); - assert_eq!(url.to_string(), result.to_string()); - } - } -} diff --git a/deps/url-0.2.38/src/host.rs b/deps/url-0.2.38/src/host.rs deleted file mode 100644 index c65aa6d33..000000000 --- a/deps/url-0.2.38/src/host.rs +++ /dev/null @@ -1,283 +0,0 @@ -// Copyright 2013-2014 Simon Sapin. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -use std::ascii::AsciiExt; -use std::cmp; -use std::fmt::{self, Formatter}; -use parser::{ParseResult, ParseError}; -use percent_encoding::{from_hex, percent_decode}; - - -/// The host name of an URL. -#[derive(PartialEq, Eq, Clone, Debug, Hash, PartialOrd, Ord)] -#[cfg_attr(feature="heap_size", derive(HeapSizeOf))] -pub enum Host { - /// A (DNS) domain name or an IPv4 address. - /// - /// FIXME: IPv4 probably should be a separate variant. - /// See https://www.w3.org/Bugs/Public/show_bug.cgi?id=26431 - Domain(String), - - /// An IPv6 address, represented inside `[...]` square brackets - /// so that `:` colon characters in the address are not ambiguous - /// with the port number delimiter. - Ipv6(Ipv6Address), -} - - -/// A 128 bit IPv6 address -#[derive(Clone, Eq, PartialEq, Copy, Debug, Hash, PartialOrd, Ord)] -pub struct Ipv6Address { - pub pieces: [u16; 8] -} -#[cfg(feature="heap_size")] -known_heap_size!(0, Ipv6Address); - - -impl Host { - /// Parse a host: either an IPv6 address in [] square brackets, or a domain. - /// - /// Returns `Err` for an empty host, an invalid IPv6 address, - /// or a or invalid non-ASCII domain. - /// - /// FIXME: Add IDNA support for non-ASCII domains. - pub fn parse(input: &str) -> ParseResult<Host> { - if input.len() == 0 { - Err(ParseError::EmptyHost) - } else if input.starts_with("[") { - if input.ends_with("]") { - Ipv6Address::parse(&input[1..input.len() - 1]).map(Host::Ipv6) - } else { - Err(ParseError::InvalidIpv6Address) - } - } else { - let decoded = percent_decode(input.as_bytes()); - let domain = String::from_utf8_lossy(&decoded); - // TODO: Remove this check and use IDNA "domain to ASCII" - if !domain.is_ascii() { - Err(ParseError::NonAsciiDomainsNotSupportedYet) - } else if domain.find(&[ - '\0', '\t', '\n', '\r', ' ', '#', '%', '/', ':', '?', '@', '[', '\\', ']' - ][..]).is_some() { - Err(ParseError::InvalidDomainCharacter) - } else { - Ok(Host::Domain(domain.to_ascii_lowercase())) - } - } - } - - /// Serialize the host as a string. - /// - /// A domain a returned as-is, an IPv6 address between [] square brackets. - pub fn serialize(&self) -> String { - self.to_string() - } -} - - -impl fmt::Display for Host { - fn fmt(&self, formatter: &mut Formatter) -> fmt::Result { - match *self { - Host::Domain(ref domain) => domain.fmt(formatter), - Host::Ipv6(ref address) => { - try!(formatter.write_str("[")); - try!(address.fmt(formatter)); - formatter.write_str("]") - } - } - } -} - - -impl Ipv6Address { - /// Parse an IPv6 address, without the [] square brackets. - pub fn parse(input: &str) -> ParseResult<Ipv6Address> { - let input = input.as_bytes(); - let len = input.len(); - let mut is_ip_v4 = false; - let mut pieces = [0, 0, 0, 0, 0, 0, 0, 0]; - let mut piece_pointer = 0; - let mut compress_pointer = None; - let mut i = 0; - - if len < 2 { - return Err(ParseError::InvalidIpv6Address) - } - - if input[0] == b':' { - if input[1] != b':' { - return Err(ParseError::InvalidIpv6Address) - } - i = 2; - piece_pointer = 1; - compress_pointer = Some(1); - } - - while i < len { - if piece_pointer == 8 { - return Err(ParseError::InvalidIpv6Address) - } - if input[i] == b':' { - if compress_pointer.is_some() { - return Err(ParseError::InvalidIpv6Address) - } - i += 1; - piece_pointer += 1; - compress_pointer = Some(piece_pointer); - continue - } - let start = i; - let end = cmp::min(len, start + 4); - let mut value = 0u16; - while i < end { - match from_hex(input[i]) { - Some(digit) => { - value = value * 0x10 + digit as u16; - i += 1; - }, - None => break - } - } - if i < len { - match input[i] { - b'.' => { - if i == start { - return Err(ParseError::InvalidIpv6Address) - } - i = start; - is_ip_v4 = true; - }, - b':' => { - i += 1; - if i == len { - return Err(ParseError::InvalidIpv6Address) - } - }, - _ => return Err(ParseError::InvalidIpv6Address) - } - } - if is_ip_v4 { - break - } - pieces[piece_pointer] = value; - piece_pointer += 1; - } - - if is_ip_v4 { - if piece_pointer > 6 { - return Err(ParseError::InvalidIpv6Address) - } - let mut dots_seen = 0; - while i < len { - // FIXME: https://github.com/whatwg/url/commit/1c22aa119c354e0020117e02571cec53f7c01064 - let mut value = 0u16; - while i < len { - let digit = match input[i] { - c @ b'0' ... b'9' => c - b'0', - _ => break - }; - value = value * 10 + digit as u16; - if value == 0 || value > 255 { - return Err(ParseError::InvalidIpv6Address) - } - } - if dots_seen < 3 && !(i < len && input[i] == b'.') { - return Err(ParseError::InvalidIpv6Address) - } - pieces[piece_pointer] = pieces[piece_pointer] * 0x100 + value; - if dots_seen == 0 || dots_seen == 2 { - piece_pointer += 1; - } - i += 1; - if dots_seen == 3 && i < len { - return Err(ParseError::InvalidIpv6Address) - } - dots_seen += 1; - } - } - - match compress_pointer { - Some(compress_pointer) => { - let mut swaps = piece_pointer - compress_pointer; - piece_pointer = 7; - while swaps > 0 { - pieces[piece_pointer] = pieces[compress_pointer + swaps - 1]; - pieces[compress_pointer + swaps - 1] = 0; - swaps -= 1; - piece_pointer -= 1; - } - } - _ => if piece_pointer != 8 { - return Err(ParseError::InvalidIpv6Address) - } - } - Ok(Ipv6Address { pieces: pieces }) - } - - /// Serialize the IPv6 address to a string. - pub fn serialize(&self) -> String { - self.to_string() - } -} - - -impl fmt::Display for Ipv6Address { - fn fmt(&self, formatter: &mut Formatter) -> fmt::Result { - let (compress_start, compress_end) = longest_zero_sequence(&self.pieces); - let mut i = 0; - while i < 8 { - if i == compress_start { - try!(formatter.write_str(":")); - if i == 0 { - try!(formatter.write_str(":")); - } - if compress_end < 8 { - i = compress_end; - } else { - break; - } - } - try!(write!(formatter, "{:x}", self.pieces[i as usize])); - if i < 7 { - try!(formatter.write_str(":")); - } - i += 1; - } - Ok(()) - } -} - - -fn longest_zero_sequence(pieces: &[u16; 8]) -> (isize, isize) { - let mut longest = -1; - let mut longest_length = -1; - let mut start = -1; - macro_rules! finish_sequence( - ($end: expr) => { - if start >= 0 { - let length = $end - start; - if length > longest_length { - longest = start; - longest_length = length; - } - } - }; - ); - for i in 0..8 { - if pieces[i as usize] == 0 { - if start < 0 { - start = i; - } - } else { - finish_sequence!(i); - start = -1; - } - } - finish_sequence!(8); - (longest, longest + longest_length) -} diff --git a/deps/url-0.2.38/src/lib.rs b/deps/url-0.2.38/src/lib.rs deleted file mode 100644 index 08d32ef55..000000000 --- a/deps/url-0.2.38/src/lib.rs +++ /dev/null @@ -1,1143 +0,0 @@ -// Copyright 2013-2015 Simon Sapin. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -/*! - -<a href="https://github.com/servo/rust-url"><img style="position: absolute; top: 0; left: 0; border: 0;" src="../github.png" alt="Fork me on GitHub"></a> -<style>.sidebar { margin-top: 53px }</style> - -rust-url is an implementation of the [URL Standard](http://url.spec.whatwg.org/) -for the [Rust](http://rust-lang.org/) programming language. - -It builds with [Cargo](http://crates.io/). -To use it in your project, add this to your `Cargo.toml` file: - -```Cargo -[dependencies.url] -git = "https://github.com/servo/rust-url" -``` - -Supporting encodings other than UTF-8 in query strings is an optional feature -that requires [rust-encoding](https://github.com/lifthrasiir/rust-encoding) -and is off by default. -You can enable it with -[Cargo’s *features* mechanism](http://doc.crates.io/manifest.html#the-[features]-section): - -```Cargo -[dependencies.url] -git = "https://github.com/servo/rust-url" -features = ["query_encoding"] -``` - -… or by passing `--cfg 'feature="query_encoding"'` to rustc. - - -# URL parsing and data structures - -First, URL parsing may fail for various reasons and therefore returns a `Result`. - -``` -use url::{Url, ParseError}; - -assert!(Url::parse("http://[:::1]") == Err(ParseError::InvalidIpv6Address)) -``` - -Let’s parse a valid URL and look at its components. - -``` -use url::{Url, SchemeData}; - -let issue_list_url = Url::parse( - "https://github.com/rust-lang/rust/issues?labels=E-easy&state=open" -).unwrap(); - - -assert!(issue_list_url.scheme == "https".to_string()); -assert!(issue_list_url.domain() == Some("github.com")); -assert!(issue_list_url.port() == None); -assert!(issue_list_url.path() == Some(&["rust-lang".to_string(), - "rust".to_string(), - "issues".to_string()][..])); -assert!(issue_list_url.query == Some("labels=E-easy&state=open".to_string())); -assert!(issue_list_url.fragment == None); -match issue_list_url.scheme_data { - SchemeData::Relative(..) => {}, // Expected - SchemeData::NonRelative(..) => panic!(), -} -``` - -The `scheme`, `query`, and `fragment` are directly fields of the `Url` struct: -they apply to all URLs. -Every other components has accessors because they only apply to URLs said to be -“in a relative scheme”. `https` is a relative scheme, but `data` is not: - -``` -use url::{Url, SchemeData}; - -let data_url = Url::parse("data:text/plain,Hello#").unwrap(); - -assert!(data_url.scheme == "data".to_string()); -assert!(data_url.scheme_data == SchemeData::NonRelative("text/plain,Hello".to_string())); -assert!(data_url.non_relative_scheme_data() == Some("text/plain,Hello")); -assert!(data_url.query == None); -assert!(data_url.fragment == Some("".to_string())); -``` - - -# Base URL - -Many contexts allow URL *references* that can be relative to a *base URL*: - -```html -<link rel="stylesheet" href="../main.css"> -``` - -Since parsed URL are absolute, giving a base is required: - -``` -use url::{Url, ParseError}; - -assert!(Url::parse("../main.css") == Err(ParseError::RelativeUrlWithoutBase)) -``` - -`UrlParser` is a method-chaining API to provide various optional parameters -to URL parsing, including a base URL. - -``` -use url::{Url, UrlParser}; - -let this_document = Url::parse("http://servo.github.io/rust-url/url/index.html").unwrap(); -let css_url = UrlParser::new().base_url(&this_document).parse("../main.css").unwrap(); -assert!(css_url.serialize() == "http://servo.github.io/rust-url/main.css".to_string()); -``` - -*/ - -#![cfg_attr(feature="heap_size", feature(plugin, custom_derive))] -#![cfg_attr(feature="heap_size", plugin(heapsize_plugin))] - -extern crate rustc_serialize; -extern crate uuid; - -#[macro_use] -extern crate matches; - -#[cfg(feature="serde_serialization")] -extern crate serde; - -#[cfg(feature="heap_size")] -#[macro_use] extern crate heapsize; - -use std::fmt::{self, Formatter}; -use std::str; -use std::path::{Path, PathBuf}; -use std::borrow::Borrow; -use std::hash::{Hash, Hasher}; -use std::cmp::Ordering; - -#[cfg(feature="serde_serialization")] -use std::str::FromStr; - -pub use host::{Host, Ipv6Address}; -pub use parser::{ErrorHandler, ParseResult, ParseError}; - -use percent_encoding::{percent_encode, lossy_utf8_percent_decode, DEFAULT_ENCODE_SET}; - -use format::{PathFormatter, UserInfoFormatter, UrlNoFragmentFormatter}; -use encoding::EncodingOverride; - -use uuid::Uuid; - -mod encoding; -mod host; -mod parser; -pub mod urlutils; -pub mod percent_encoding; -pub mod form_urlencoded; -pub mod punycode; -pub mod format; - -#[cfg(test)] -mod tests; - - -/// The parsed representation of an absolute URL. -#[derive(PartialEq, Eq, Clone, Debug, Hash, PartialOrd, Ord)] -#[cfg_attr(feature="heap_size", derive(HeapSizeOf))] -pub struct Url { - /// The scheme (a.k.a. protocol) of the URL, in ASCII lower case. - pub scheme: String, - - /// The components of the URL whose representation depends on where the scheme is *relative*. - pub scheme_data: SchemeData, - - /// The query string of the URL. - /// - /// `None` if the `?` delimiter character was not part of the parsed input, - /// otherwise a possibly empty, percent-encoded string. - /// - /// Percent encoded strings are within the ASCII range. - /// - /// See also the `query_pairs`, `set_query_from_pairs`, - /// and `lossy_percent_decode_query` methods. - pub query: Option<String>, - - /// The fragment identifier of the URL. - /// - /// `None` if the `#` delimiter character was not part of the parsed input, - /// otherwise a possibly empty, percent-encoded string. - /// - /// Percent encoded strings are within the ASCII range. - /// - /// See also the `lossy_percent_decode_fragment` method. - pub fragment: Option<String>, -} - -/// Opaque identifier for URLs that have file or other schemes -#[derive(PartialEq, Eq, Clone, Debug)] -pub struct OpaqueOrigin(Uuid); - -/// The origin of the URL -#[derive(PartialEq, Eq, Clone, Debug)] -pub enum Origin { - /// A globally unique identifier - UID(OpaqueOrigin), - - /// Consists of the URL's scheme, host and port - Tuple(String, Host, u16) -} - -/// The components of the URL whose representation depends on where the scheme is *relative*. -#[derive(PartialEq, Eq, Clone, Debug, Hash, PartialOrd, Ord)] -#[cfg_attr(feature="heap_size", derive(HeapSizeOf))] -pub enum SchemeData { - /// Components for URLs in a *relative* scheme such as HTTP. - Relative(RelativeSchemeData), - - /// No further structure is assumed for *non-relative* schemes such as `data` and `mailto`. - /// - /// This is a single percent-encoded string, whose interpretation depends on the scheme. - /// - /// Percent encoded strings are within the ASCII range. - NonRelative(String), -} - -/// Components for URLs in a *relative* scheme such as HTTP. -#[derive(Clone, Debug)] -#[cfg_attr(feature="heap_size", derive(HeapSizeOf))] -pub struct RelativeSchemeData { - /// The username of the URL, as a possibly empty, percent-encoded string. - /// - /// Percent encoded strings are within the ASCII range. - /// - /// See also the `lossy_percent_decode_username` method. - pub username: String, - - /// The password of the URL. - /// - /// `None` if the `:` delimiter character was not part of the parsed input, - /// otherwise a possibly empty, percent-encoded string. - /// - /// Percent encoded strings are within the ASCII range. - /// - /// See also the `lossy_percent_decode_password` method. - pub password: Option<String>, - - /// The host of the URL, either a domain name or an IPv4 address - pub host: Host, - - /// The port number of the URL. - /// `None` for file-like schemes, or to indicate the default port number. - pub port: Option<u16>, - - /// The default port number for the URL’s scheme. - /// `None` for file-like schemes. - pub default_port: Option<u16>, - - /// The path of the URL, as vector of percent-encoded strings. - /// - /// Percent encoded strings are within the ASCII range. - /// - /// See also the `serialize_path` method and, - /// for URLs in the `file` scheme, the `to_file_path` method. - pub path: Vec<String>, -} - -impl RelativeSchemeData { - fn get_identity_key(&self) -> (&String, &Option<String>, &Host, Option<u16>, Option<u16>, &Vec<String>) { - ( - &self.username, - &self.password, - &self.host, - self.port.or(self.default_port), - self.default_port, - &self.path - ) - } -} - - -impl PartialEq for RelativeSchemeData { - fn eq(&self, other: &RelativeSchemeData) -> bool { - self.get_identity_key() == other.get_identity_key() - } -} - -impl Eq for RelativeSchemeData {} - -impl Hash for RelativeSchemeData { - fn hash<H: Hasher>(&self, state: &mut H) { - self.get_identity_key().hash(state) - } -} - -impl PartialOrd for RelativeSchemeData { - fn partial_cmp(&self, other: &RelativeSchemeData) -> Option<Ordering> { - self.get_identity_key().partial_cmp(&other.get_identity_key()) - } -} - -impl Ord for RelativeSchemeData { - fn cmp(&self, other: &Self) -> Ordering { - self.get_identity_key().cmp(&other.get_identity_key()) - } -} - -impl str::FromStr for Url { - type Err = ParseError; - - fn from_str(url: &str) -> ParseResult<Url> { - Url::parse(url) - } -} - -/// A set of optional parameters for URL parsing. -pub struct UrlParser<'a> { - base_url: Option<&'a Url>, - query_encoding_override: EncodingOverride, - error_handler: ErrorHandler, - scheme_type_mapper: fn(scheme: &str) -> SchemeType, -} - - -/// A method-chaining API to provide a set of optional parameters for URL parsing. -impl<'a> UrlParser<'a> { - /// Return a new UrlParser with default parameters. - #[inline] - pub fn new() -> UrlParser<'a> { - fn silent_handler(_reason: ParseError) -> ParseResult<()> { Ok(()) } - UrlParser { - base_url: None, - query_encoding_override: EncodingOverride::utf8(), - error_handler: silent_handler, - scheme_type_mapper: whatwg_scheme_type_mapper, - } - } - - /// Set the base URL used for resolving relative URL references, and return the `UrlParser`. - /// The default is no base URL, so that relative URLs references fail to parse. - #[inline] - pub fn base_url<'b>(&'b mut self, value: &'a Url) -> &'b mut UrlParser<'a> { - self.base_url = Some(value); - self - } - - /// Set the character encoding the query string is encoded as before percent-encoding, - /// and return the `UrlParser`. - /// - /// This legacy quirk is only relevant to HTML. - /// - /// This method is only available if the `query_encoding` Cargo feature is enabled. - #[cfg(feature = "query_encoding")] - #[inline] - pub fn query_encoding_override<'b>(&'b mut self, value: encoding::EncodingRef) - -> &'b mut UrlParser<'a> { - self.query_encoding_override = EncodingOverride::from_encoding(value); - self - } - - /// Set an error handler for non-fatal parse errors, and return the `UrlParser`. - /// - /// Non-fatal parse errors are normally ignored by the parser, - /// but indicate violations of authoring requirements. - /// An error handler can be used, for example, to log these errors in the console - /// of a browser’s developer tools. - /// - /// The error handler can choose to make the error fatal by returning `Err(..)` - #[inline] - pub fn error_handler<'b>(&'b mut self, value: ErrorHandler) -> &'b mut UrlParser<'a> { - self.error_handler = value; - self - } - - /// Set a *scheme type mapper*, and return the `UrlParser`. - /// - /// The URL parser behaves differently based on the `SchemeType` of the URL. - /// See the documentation for `SchemeType` for more details. - /// A *scheme type mapper* returns a `SchemeType` - /// based on the scheme as an ASCII lower case string, - /// as found in the `scheme` field of an `Url` struct. - /// - /// The default scheme type mapper is as follows: - /// - /// ```ignore - /// fn whatwg_scheme_type_mapper(scheme: &str) -> SchemeType { - /// match scheme { - /// "file" => SchemeType::FileLike, - /// "ftp" => SchemeType::Relative(21), - /// "gopher" => SchemeType::Relative(70), - /// "http" => SchemeType::Relative(80), - /// "https" => SchemeType::Relative(443), - /// "ws" => SchemeType::Relative(80), - /// "wss" => SchemeType::Relative(443), - /// _ => NonRelative, - /// } - /// } - /// ``` - /// - /// Note that unknown schemes default to non-relative. - /// Overriding the scheme type mapper can allow, for example, - /// parsing URLs in the `git` or `irc` scheme as relative. - #[inline] - pub fn scheme_type_mapper<'b>(&'b mut self, value: fn(scheme: &str) -> SchemeType) - -> &'b mut UrlParser<'a> { - self.scheme_type_mapper = value; - self - } - - /// Parse `input` as an URL, with all the parameters previously set in the `UrlParser`. - #[inline] - pub fn parse(&self, input: &str) -> ParseResult<Url> { - parser::parse_url(input, self) - } - - /// Parse `input` as a “standalone” URL path, - /// with an optional query string and fragment identifier. - /// - /// This is typically found in the start line of an HTTP header. - /// - /// Note that while the start line has no fragment identifier in the HTTP RFC, - /// servers typically parse it and ignore it - /// (rather than having it be part of the path or query string.) - /// - /// On success, return `(path, query_string, fragment_identifier)` - #[inline] - pub fn parse_path(&self, input: &str) - -> ParseResult<(Vec<String>, Option<String>, Option<String>)> { - parser::parse_standalone_path(input, self) - } -} - - -/// Parse `input` as a “standalone” URL path, -/// with an optional query string and fragment identifier. -/// -/// This is typically found in the start line of an HTTP header. -/// -/// Note that while the start line has no fragment identifier in the HTTP RFC, -/// servers typically parse it and ignore it -/// (rather than having it be part of the path or query string.) -/// -/// On success, return `(path, query_string, fragment_identifier)` -/// -/// ```rust -/// let (path, query, fragment) = url::parse_path("/foo/bar/../baz?q=42").unwrap(); -/// assert_eq!(path, vec!["foo".to_string(), "baz".to_string()]); -/// assert_eq!(query, Some("q=42".to_string())); -/// assert_eq!(fragment, None); -/// ``` -/// -/// The query string returned by `url::parse_path` can be decoded with -/// `url::form_urlencoded::parse`. -#[inline] -pub fn parse_path(input: &str) - -> ParseResult<(Vec<String>, Option<String>, Option<String>)> { - UrlParser::new().parse_path(input) -} - - -/// Private convenience methods for use in parser.rs -impl<'a> UrlParser<'a> { - #[inline] - fn parse_error(&self, error: ParseError) -> ParseResult<()> { - (self.error_handler)(error) - } - - #[inline] - fn get_scheme_type(&self, scheme: &str) -> SchemeType { - (self.scheme_type_mapper)(scheme) - } -} - - -/// Determines the behavior of the URL parser for a given scheme. -#[derive(PartialEq, Eq, Copy, Debug, Clone, Hash, PartialOrd, Ord)] -pub enum SchemeType { - /// Indicate that the scheme is *non-relative*. - /// - /// The *scheme data* of the URL - /// (everything other than the scheme, query string, and fragment identifier) - /// is parsed as a single percent-encoded string of which no structure is assumed. - /// That string may need to be parsed further, per a scheme-specific format. - NonRelative, - - /// Indicate that the scheme is *relative*, and what the default port number is. - /// - /// The *scheme data* is structured as - /// *username*, *password*, *host*, *port number*, and *path*. - /// Relative URL references are supported, if a base URL was given. - /// The string value indicates the default port number as a string of ASCII digits, - /// or the empty string to indicate no default port number. - Relative(u16), - - /// Indicate a *relative* scheme similar to the *file* scheme. - /// - /// For example, you might want to have distinct `git+file` and `hg+file` URL schemes. - /// - /// This is like `Relative` except the host can be empty, there is no port number, - /// and path parsing has (platform-independent) quirks to support Windows filenames. - FileLike, -} - -impl SchemeType { - pub fn default_port(&self) -> Option<u16> { - match self { - &SchemeType::Relative(default_port) => Some(default_port), - _ => None, - } - } - pub fn same_as(&self, other: SchemeType) -> bool { - match (self, other) { - (&SchemeType::NonRelative, SchemeType::NonRelative) => true, - (&SchemeType::Relative(_), SchemeType::Relative(_)) => true, - (&SchemeType::FileLike, SchemeType::FileLike) => true, - _ => false - } - } -} - -/// http://url.spec.whatwg.org/#relative-scheme -pub fn whatwg_scheme_type_mapper(scheme: &str) -> SchemeType { - match scheme { - "file" => SchemeType::FileLike, - "ftp" => SchemeType::Relative(21), - "gopher" => SchemeType::Relative(70), - "http" => SchemeType::Relative(80), - "https" => SchemeType::Relative(443), - "ws" => SchemeType::Relative(80), - "wss" => SchemeType::Relative(443), - _ => SchemeType::NonRelative, - } -} - - -impl Url { - /// Parse an URL with the default `UrlParser` parameters. - /// - /// In particular, relative URL references are parse errors since no base URL is provided. - #[inline] - pub fn parse(input: &str) -> ParseResult<Url> { - UrlParser::new().parse(input) - } - - /// Convert a file name as `std::path::Path` into an URL in the `file` scheme. - /// - /// This returns `Err` if the given path is not absolute - /// or, with a Windows path, if the prefix is not a disk prefix (e.g. `C:`). - pub fn from_file_path<P: AsRef<Path>>(path: P) -> Result<Url, ()> { - let path = try!(path_to_file_url_path(path.as_ref())); - Ok(Url::from_path_common(path)) - } - - /// Convert a directory name as `std::path::Path` into an URL in the `file` scheme. - /// - /// This returns `Err` if the given path is not absolute - /// or, with a Windows path, if the prefix is not a disk prefix (e.g. `C:`). - /// - /// Compared to `from_file_path`, this adds an empty component to the path - /// (or, in terms of URL syntax, adds a trailing slash) - /// so that the entire path is considered when using this URL as a base URL. - /// - /// For example: - /// - /// * `"index.html"` parsed with `Url::from_directory_path(Path::new("/var/www"))` - /// as the base URL is `file:///var/www/index.html` - /// * `"index.html"` parsed with `Url::from_file_path(Path::new("/var/www/"))` - /// as the base URL is `file:///var/index.html`, which might not be what was intended. - /// - /// (Note that `Path::new` removes any trailing slash.) - pub fn from_directory_path<P: AsRef<Path>>(path: P) -> Result<Url, ()> { - let mut path = try!(path_to_file_url_path(path.as_ref())); - // Add an empty path component (i.e. a trailing slash in serialization) - // so that the entire path is used as a base URL. - path.push("".to_string()); - Ok(Url::from_path_common(path)) - } - - fn from_path_common(path: Vec<String>) -> Url { - Url { - scheme: "file".to_string(), - scheme_data: SchemeData::Relative(RelativeSchemeData { - username: "".to_string(), - password: None, - port: None, - default_port: None, - host: Host::Domain("".to_string()), - path: path, - }), - query: None, - fragment: None, - } - } - - /// Assuming the URL is in the `file` scheme or similar, - /// convert its path to an absolute `std::path::Path`. - /// - /// **Note:** This does not actually check the URL’s `scheme`, - /// and may give nonsensical results for other schemes. - /// It is the user’s responsibility to check the URL’s scheme before calling this. - /// - /// The return type (when `Ok()`) is generic and can be either `std::path::posix::Path` - /// or `std::path::windows::Path`. - /// (Use `std::path::Path` to pick one of them depending on the local system.) - /// If the compiler can not infer the desired type from context, you may have to specify it: - /// - /// ```ignore - /// let path = url.to_file_path::<std::path::posix::Path>(); - /// ``` - /// - /// Returns `Err` if the host is neither empty nor `"localhost"`, - /// or if `Path::new_opt()` returns `None`. - /// (That is, if the percent-decoded path contains a NUL byte or, - /// for a Windows path, is not UTF-8.) - #[inline] - pub fn to_file_path(&self) -> Result<PathBuf, ()> { - match self.scheme_data { - SchemeData::Relative(ref scheme_data) => scheme_data.to_file_path(), - SchemeData::NonRelative(..) => Err(()), - } - } - - /// Return the serialization of this URL as a string. - pub fn serialize(&self) -> String { - self.to_string() - } - - // Return the origin of this URL (https://url.spec.whatwg.org/#origin) - pub fn origin(&self) -> Origin { - match &*self.scheme { - "blob" => { - let result = Url::parse(self.non_relative_scheme_data().unwrap()); - match result { - Ok(ref url) => url.origin(), - Err(_) => Origin::UID(OpaqueOrigin(Uuid::new_v4())) - } - }, - "ftp" | "gopher" | "http" | "https" | "ws" | "wss" => { - Origin::Tuple(self.scheme.clone(), self.host().unwrap().clone(), - self.port_or_default().unwrap()) - }, - // TODO: Figure out what to do if the scheme is a file - "file" => Origin::UID(OpaqueOrigin(Uuid::new_v4())), - _ => Origin::UID(OpaqueOrigin(Uuid::new_v4())) - } - } - - /// Return the serialization of this URL, without the fragment identifier, as a string - pub fn serialize_no_fragment(&self) -> String { - UrlNoFragmentFormatter{ url: self }.to_string() - } - - /// If the URL is *non-relative*, return the string scheme data. - #[inline] - pub fn non_relative_scheme_data<'a>(&'a self) -> Option<&'a str> { - match self.scheme_data { - SchemeData::Relative(..) => None, - SchemeData::NonRelative(ref scheme_data) => Some(scheme_data), - } - } - - /// If the URL is *non-relative*, return a mutable reference to the string scheme data. - #[inline] - pub fn non_relative_scheme_data_mut<'a>(&'a mut self) -> Option<&'a mut String> { - match self.scheme_data { - SchemeData::Relative(..) => None, - SchemeData::NonRelative(ref mut scheme_data) => Some(scheme_data), - } - } - - /// If the URL is in a *relative scheme*, return the structured scheme data. - #[inline] - pub fn relative_scheme_data<'a>(&'a self) -> Option<&'a RelativeSchemeData> { - match self.scheme_data { - SchemeData::Relative(ref scheme_data) => Some(scheme_data), - SchemeData::NonRelative(..) => None, - } - } - - /// If the URL is in a *relative scheme*, - /// return a mutable reference to the structured scheme data. - #[inline] - pub fn relative_scheme_data_mut<'a>(&'a mut self) -> Option<&'a mut RelativeSchemeData> { - match self.scheme_data { - SchemeData::Relative(ref mut scheme_data) => Some(scheme_data), - SchemeData::NonRelative(..) => None, - } - } - - /// If the URL is in a *relative scheme*, return its username. - #[inline] - pub fn username<'a>(&'a self) -> Option<&'a str> { - self.relative_scheme_data().map(|scheme_data| &*scheme_data.username) - } - - /// If the URL is in a *relative scheme*, return a mutable reference to its username. - #[inline] - pub fn username_mut<'a>(&'a mut self) -> Option<&'a mut String> { - self.relative_scheme_data_mut().map(|scheme_data| &mut scheme_data.username) - } - - /// Percent-decode the URL’s username, if any. - /// - /// This is “lossy”: invalid UTF-8 percent-encoded byte sequences - /// will be replaced � U+FFFD, the replacement character. - #[inline] - pub fn lossy_percent_decode_username(&self) -> Option<String> { - self.relative_scheme_data().map(|scheme_data| scheme_data.lossy_percent_decode_username()) - } - - /// If the URL is in a *relative scheme*, return its password, if any. - #[inline] - pub fn password<'a>(&'a self) -> Option<&'a str> { - self.relative_scheme_data().and_then(|scheme_data| - scheme_data.password.as_ref().map(|password| password as &str)) - } - - /// If the URL is in a *relative scheme*, return a mutable reference to its password, if any. - #[inline] - pub fn password_mut<'a>(&'a mut self) -> Option<&'a mut String> { - self.relative_scheme_data_mut().and_then(|scheme_data| scheme_data.password.as_mut()) - } - - /// Percent-decode the URL’s password, if any. - /// - /// This is “lossy”: invalid UTF-8 percent-encoded byte sequences - /// will be replaced � U+FFFD, the replacement character. - #[inline] - pub fn lossy_percent_decode_password(&self) -> Option<String> { - self.relative_scheme_data().and_then(|scheme_data| - scheme_data.lossy_percent_decode_password()) - } - - /// Serialize the URL's username and password, if any. - /// - /// Format: "<username>:<password>@" - #[inline] - pub fn serialize_userinfo<'a>(&'a mut self) -> Option<String> { - self.relative_scheme_data().map(|scheme_data| scheme_data.serialize_userinfo()) - } - - /// If the URL is in a *relative scheme*, return its structured host. - #[inline] - pub fn host<'a>(&'a self) -> Option<&'a Host> { - self.relative_scheme_data().map(|scheme_data| &scheme_data.host) - } - - /// If the URL is in a *relative scheme*, return a mutable reference to its structured host. - #[inline] - pub fn host_mut<'a>(&'a mut self) -> Option<&'a mut Host> { - self.relative_scheme_data_mut().map(|scheme_data| &mut scheme_data.host) - } - - /// If the URL is in a *relative scheme* and its host is a domain, - /// return the domain as a string. - #[inline] - pub fn domain<'a>(&'a self) -> Option<&'a str> { - self.relative_scheme_data().and_then(|scheme_data| scheme_data.domain()) - } - - /// If the URL is in a *relative scheme* and its host is a domain, - /// return a mutable reference to the domain string. - #[inline] - pub fn domain_mut<'a>(&'a mut self) -> Option<&'a mut String> { - self.relative_scheme_data_mut().and_then(|scheme_data| scheme_data.domain_mut()) - } - - /// If the URL is in a *relative scheme*, serialize its host as a string. - /// - /// A domain a returned as-is, an IPv6 address between [] square brackets. - #[inline] - pub fn serialize_host(&self) -> Option<String> { - self.relative_scheme_data().map(|scheme_data| scheme_data.host.serialize()) - } - - /// If the URL is in a *relative scheme* and has a port number, return it. - #[inline] - pub fn port<'a>(&'a self) -> Option<u16> { - self.relative_scheme_data().and_then(|scheme_data| scheme_data.port) - } - - /// If the URL is in a *relative scheme*, return a mutable reference to its port. - #[inline] - pub fn port_mut<'a>(&'a mut self) -> Option<&'a mut Option<u16>> { - self.relative_scheme_data_mut().map(|scheme_data| &mut scheme_data.port) - } - - /// If the URL is in a *relative scheme* that is not a file-like, - /// return its port number, even if it is the default. - #[inline] - pub fn port_or_default(&self) -> Option<u16> { - self.relative_scheme_data().and_then(|scheme_data| scheme_data.port_or_default()) - } - - /// If the URL is in a *relative scheme*, return its path components. - #[inline] - pub fn path<'a>(&'a self) -> Option<&'a [String]> { - self.relative_scheme_data().map(|scheme_data| &*scheme_data.path) - } - - /// If the URL is in a *relative scheme*, return a mutable reference to its path components. - #[inline] - pub fn path_mut<'a>(&'a mut self) -> Option<&'a mut Vec<String>> { - self.relative_scheme_data_mut().map(|scheme_data| &mut scheme_data.path) - } - - /// If the URL is in a *relative scheme*, serialize its path as a string. - /// - /// The returned string starts with a "/" slash, and components are separated by slashes. - /// A trailing slash represents an empty last component. - #[inline] - pub fn serialize_path(&self) -> Option<String> { - self.relative_scheme_data().map(|scheme_data| scheme_data.serialize_path()) - } - - /// Parse the URL’s query string, if any, as `application/x-www-form-urlencoded` - /// and return a vector of (key, value) pairs. - #[inline] - pub fn query_pairs(&self) -> Option<Vec<(String, String)>> { - self.query.as_ref().map(|query| form_urlencoded::parse(query.as_bytes())) - } - - /// Serialize an iterator of (key, value) pairs as `application/x-www-form-urlencoded` - /// and set it as the URL’s query string. - #[inline] - pub fn set_query_from_pairs<I, K, V>(&mut self, pairs: I) - where I: IntoIterator, I::Item: Borrow<(K, V)>, K: AsRef<str>, V: AsRef<str> { - self.query = Some(form_urlencoded::serialize(pairs)); - } - - /// Percent-decode the URL’s query string, if any. - /// - /// This is “lossy”: invalid UTF-8 percent-encoded byte sequences - /// will be replaced � U+FFFD, the replacement character. - #[inline] - pub fn lossy_percent_decode_query(&self) -> Option<String> { - self.query.as_ref().map(|value| lossy_utf8_percent_decode(value.as_bytes())) - } - - /// Percent-decode the URL’s fragment identifier, if any. - /// - /// This is “lossy”: invalid UTF-8 percent-encoded byte sequences - /// will be replaced � U+FFFD, the replacement character. - #[inline] - pub fn lossy_percent_decode_fragment(&self) -> Option<String> { - self.fragment.as_ref().map(|value| lossy_utf8_percent_decode(value.as_bytes())) - } -} - - -impl rustc_serialize::Encodable for Url { - fn encode<S: rustc_serialize::Encoder>(&self, encoder: &mut S) -> Result<(), S::Error> { - encoder.emit_str(&self.to_string()) - } -} - - -impl rustc_serialize::Decodable for Url { - fn decode<D: rustc_serialize::Decoder>(decoder: &mut D) -> Result<Url, D::Error> { - Url::parse(&*try!(decoder.read_str())).map_err(|error| { - decoder.error(&format!("URL parsing error: {}", error)) - }) - } -} - -/// Serializes this URL into a `serde` stream. -/// -/// This implementation is only available if the `serde_serialization` Cargo feature is enabled. -#[cfg(feature="serde_serialization")] -impl serde::Serialize for Url { - fn serialize<S>(&self, serializer: &mut S) -> Result<(), S::Error> where S: serde::Serializer { - format!("{}", self).serialize(serializer) - } -} - -/// Deserializes this URL from a `serde` stream. -/// -/// This implementation is only available if the `serde_serialization` Cargo feature is enabled. -#[cfg(feature="serde_serialization")] -impl serde::Deserialize for Url { - fn deserialize<D>(deserializer: &mut D) -> Result<Url, D::Error> where D: serde::Deserializer { - let string_representation: String = try!(serde::Deserialize::deserialize(deserializer)); - Ok(FromStr::from_str(&string_representation[..]).unwrap()) - } -} - -impl fmt::Display for Url { - fn fmt(&self, formatter: &mut Formatter) -> fmt::Result { - try!(UrlNoFragmentFormatter{ url: self }.fmt(formatter)); - if let Some(ref fragment) = self.fragment { - try!(formatter.write_str("#")); - try!(formatter.write_str(fragment)); - } - Ok(()) - } -} - - -impl fmt::Display for SchemeData { - fn fmt(&self, formatter: &mut Formatter) -> fmt::Result { - match *self { - SchemeData::Relative(ref scheme_data) => scheme_data.fmt(formatter), - SchemeData::NonRelative(ref scheme_data) => scheme_data.fmt(formatter), - } - } -} - - -impl RelativeSchemeData { - /// Percent-decode the URL’s username. - /// - /// This is “lossy”: invalid UTF-8 percent-encoded byte sequences - /// will be replaced � U+FFFD, the replacement character. - #[inline] - pub fn lossy_percent_decode_username(&self) -> String { - lossy_utf8_percent_decode(self.username.as_bytes()) - } - - /// Percent-decode the URL’s password, if any. - /// - /// This is “lossy”: invalid UTF-8 percent-encoded byte sequences - /// will be replaced � U+FFFD, the replacement character. - #[inline] - pub fn lossy_percent_decode_password(&self) -> Option<String> { - self.password.as_ref().map(|value| lossy_utf8_percent_decode(value.as_bytes())) - } - - /// Assuming the URL is in the `file` scheme or similar, - /// convert its path to an absolute `std::path::Path`. - /// - /// **Note:** This does not actually check the URL’s `scheme`, - /// and may give nonsensical results for other schemes. - /// It is the user’s responsibility to check the URL’s scheme before calling this. - /// - /// The return type (when `Ok()`) is generic and can be either `std::path::posix::Path` - /// or `std::path::windows::Path`. - /// (Use `std::path::Path` to pick one of them depending on the local system.) - /// If the compiler can not infer the desired type from context, you may have to specifiy it: - /// - /// ```ignore - /// let path = url.to_file_path::<std::path::posix::Path>(); - /// ``` - /// - /// Returns `Err` if the host is neither empty nor `"localhost"`, - /// or if `Path::new_opt()` returns `None`. - /// (That is, if the percent-decoded path contains a NUL byte or, - /// for a Windows path, is not UTF-8.) - #[inline] - pub fn to_file_path(&self) -> Result<PathBuf, ()> { - // FIXME: Figure out what to do w.r.t host. - if !matches!(self.domain(), Some("") | Some("localhost")) { - return Err(()) - } - file_url_path_to_pathbuf(&self.path) - } - - /// If the host is a domain, return the domain as a string. - #[inline] - pub fn domain<'a>(&'a self) -> Option<&'a str> { - match self.host { - Host::Domain(ref domain) => Some(domain), - _ => None, - } - } - - /// If the host is a domain, return a mutable reference to the domain string. - #[inline] - pub fn domain_mut<'a>(&'a mut self) -> Option<&'a mut String> { - match self.host { - Host::Domain(ref mut domain) => Some(domain), - _ => None, - } - } - - /// Return the port number of the URL, even if it is the default. - /// Return `None` for file-like URLs. - #[inline] - pub fn port_or_default(&self) -> Option<u16> { - self.port.or(self.default_port) - } - - /// Serialize the path as a string. - /// - /// The returned string starts with a "/" slash, and components are separated by slashes. - /// A trailing slash represents an empty last component. - pub fn serialize_path(&self) -> String { - PathFormatter { - path: &self.path - }.to_string() - } - - /// Serialize the userinfo as a string. - /// - /// Format: "<username>:<password>@". - pub fn serialize_userinfo(&self) -> String { - UserInfoFormatter { - username: &self.username, - password: self.password.as_ref().map(|s| s as &str) - }.to_string() - } -} - - -impl fmt::Display for RelativeSchemeData { - fn fmt(&self, formatter: &mut Formatter) -> fmt::Result { - // Write the scheme-trailing double slashes. - try!(formatter.write_str("//")); - - // Write the user info. - try!(UserInfoFormatter { - username: &self.username, - password: self.password.as_ref().map(|s| s as &str) - }.fmt(formatter)); - - // Write the host. - try!(self.host.fmt(formatter)); - - // Write the port. - match self.port { - Some(port) => { - try!(write!(formatter, ":{}", port)); - }, - None => {} - } - - // Write the path. - PathFormatter { - path: &self.path - }.fmt(formatter) - } -} - - -#[cfg(unix)] -fn path_to_file_url_path(path: &Path) -> Result<Vec<String>, ()> { - use std::os::unix::prelude::OsStrExt; - if !path.is_absolute() { - return Err(()) - } - // skip the root component - Ok(path.components().skip(1).map(|c| { - percent_encode(c.as_os_str().as_bytes(), DEFAULT_ENCODE_SET) - }).collect()) -} - -#[cfg(windows)] -fn path_to_file_url_path(path: &Path) -> Result<Vec<String>, ()> { - path_to_file_url_path_windows(path) -} - -// Build this unconditionally to alleviate https://github.com/servo/rust-url/issues/102 -#[cfg_attr(not(windows), allow(dead_code))] -fn path_to_file_url_path_windows(path: &Path) -> Result<Vec<String>, ()> { - use std::path::{Prefix, Component}; - if !path.is_absolute() { - return Err(()) - } - let mut components = path.components(); - let disk = match components.next() { - Some(Component::Prefix(ref p)) => match p.kind() { - Prefix::Disk(byte) => byte, - _ => return Err(()), - }, - - // FIXME: do something with UNC and other prefixes? - _ => return Err(()) - }; - - // Start with the prefix, e.g. "C:" - let mut path = vec![format!("{}:", disk as char)]; - - for component in components { - if component == Component::RootDir { continue } - // FIXME: somehow work with non-unicode? - let part = match component.as_os_str().to_str() { - Some(s) => s, - None => return Err(()), - }; - path.push(percent_encode(part.as_bytes(), DEFAULT_ENCODE_SET)); - } - Ok(path) -} - -#[cfg(unix)] -fn file_url_path_to_pathbuf(path: &[String]) -> Result<PathBuf, ()> { - use std::ffi::OsStr; - use std::os::unix::prelude::OsStrExt; - use std::path::PathBuf; - - use percent_encoding::percent_decode_to; - - if path.is_empty() { - return Ok(PathBuf::from("/")) - } - let mut bytes = Vec::new(); - for path_part in path { - bytes.push(b'/'); - percent_decode_to(path_part.as_bytes(), &mut bytes); - } - let os_str = OsStr::from_bytes(&bytes); - let path = PathBuf::from(os_str); - debug_assert!(path.is_absolute(), - "to_file_path() failed to produce an absolute Path"); - Ok(path) -} - -#[cfg(windows)] -fn file_url_path_to_pathbuf(path: &[String]) -> Result<PathBuf, ()> { - file_url_path_to_pathbuf_windows(path) -} - -// Build this unconditionally to alleviate https://github.com/servo/rust-url/issues/102 -#[cfg_attr(not(windows), allow(dead_code))] -fn file_url_path_to_pathbuf_windows(path: &[String]) -> Result<PathBuf, ()> { - use percent_encoding::percent_decode; - - if path.is_empty() { - return Err(()) - } - let prefix = &*path[0]; - if prefix.len() != 2 || !parser::starts_with_ascii_alpha(prefix) - || prefix.as_bytes()[1] != b':' { - return Err(()) - } - let mut string = prefix.to_string(); - for path_part in &path[1..] { - string.push('\\'); - - // Currently non-unicode windows paths cannot be represented - match String::from_utf8(percent_decode(path_part.as_bytes())) { - Ok(s) => string.push_str(&s), - Err(..) => return Err(()), - } - } - let path = PathBuf::from(string); - debug_assert!(path.is_absolute(), - "to_file_path() failed to produce an absolute Path"); - Ok(path) -} - diff --git a/deps/url-0.2.38/src/parser.rs b/deps/url-0.2.38/src/parser.rs deleted file mode 100644 index b03023511..000000000 --- a/deps/url-0.2.38/src/parser.rs +++ /dev/null @@ -1,748 +0,0 @@ -// Copyright 2013-2014 Simon Sapin. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -use std::ascii::AsciiExt; -use std::cmp::max; -use std::error::Error; -use std::fmt::{self, Formatter}; - -use super::{UrlParser, Url, SchemeData, RelativeSchemeData, Host, SchemeType}; -use percent_encoding::{ - utf8_percent_encode_to, percent_encode, - SIMPLE_ENCODE_SET, DEFAULT_ENCODE_SET, USERINFO_ENCODE_SET, QUERY_ENCODE_SET -}; - - -pub type ParseResult<T> = Result<T, ParseError>; - - -macro_rules! simple_enum_error { - ($($name: ident => $description: expr,)+) => { - /// Errors that can occur during parsing. - #[derive(PartialEq, Eq, Clone, Copy, Debug)] - pub enum ParseError { - $( - $name, - )+ - } - - impl Error for ParseError { - fn description(&self) -> &str { - match *self { - $( - ParseError::$name => $description, - )+ - } - } - } - } -} - -simple_enum_error! { - EmptyHost => "empty host", - InvalidScheme => "invalid scheme", - InvalidPort => "invalid port number", - InvalidIpv6Address => "invalid IPv6 address", - InvalidDomainCharacter => "invalid domain character", - InvalidCharacter => "invalid character", - InvalidBackslash => "invalid backslash", - InvalidPercentEncoded => "invalid percent-encoded sequence", - InvalidAtSymbolInUser => "invalid @-symbol in user", - ExpectedTwoSlashes => "expected two slashes (//)", - ExpectedInitialSlash => "expected the input to start with a slash", - NonUrlCodePoint => "non URL code point", - RelativeUrlWithScheme => "relative URL with scheme", - RelativeUrlWithoutBase => "relative URL without a base", - RelativeUrlWithNonRelativeBase => "relative URL with a non-relative base", - NonAsciiDomainsNotSupportedYet => "non-ASCII domains are not supported yet", - CannotSetJavascriptFragment => "cannot set fragment on javascript: URL", - CannotSetPortWithFileLikeScheme => "cannot set port with file-like scheme", - CannotSetUsernameWithNonRelativeScheme => "cannot set username with non-relative scheme", - CannotSetPasswordWithNonRelativeScheme => "cannot set password with non-relative scheme", - CannotSetHostPortWithNonRelativeScheme => "cannot set host and port with non-relative scheme", - CannotSetHostWithNonRelativeScheme => "cannot set host with non-relative scheme", - CannotSetPortWithNonRelativeScheme => "cannot set port with non-relative scheme", - CannotSetPathWithNonRelativeScheme => "cannot set path with non-relative scheme", -} - -impl fmt::Display for ParseError { - fn fmt(&self, fmt: &mut Formatter) -> fmt::Result { - self.description().fmt(fmt) - } -} - -/// This is called on non-fatal parse errors. -/// -/// The handler can choose to continue or abort parsing by returning Ok() or Err(), respectively. -/// See the `UrlParser::error_handler` method. -/// -/// FIXME: make this a by-ref closure when that’s supported. -pub type ErrorHandler = fn(reason: ParseError) -> ParseResult<()>; - - -#[derive(PartialEq, Eq)] -pub enum Context { - UrlParser, - Setter, -} - - -pub fn parse_url(input: &str, parser: &UrlParser) -> ParseResult<Url> { - let input = input.trim_matches(&[' ', '\t', '\n', '\r', '\x0C'][..]); - let (scheme, remaining) = match parse_scheme(input, Context::UrlParser) { - Some((scheme, remaining)) => (scheme, remaining), - // No-scheme state - None => return match parser.base_url { - Some(&Url { ref scheme, scheme_data: SchemeData::Relative(ref base), - ref query, .. }) => { - let scheme_type = parser.get_scheme_type(&scheme); - parse_relative_url(input, scheme.clone(), scheme_type, base, query, parser) - }, - Some(_) => Err(ParseError::RelativeUrlWithNonRelativeBase), - None => Err(ParseError::RelativeUrlWithoutBase), - }, - }; - let scheme_type = parser.get_scheme_type(&scheme); - match scheme_type { - SchemeType::FileLike => { - // Relative state? - match parser.base_url { - Some(&Url { scheme: ref base_scheme, scheme_data: SchemeData::Relative(ref base), - ref query, .. }) - if scheme == *base_scheme => { - parse_relative_url(remaining, scheme, scheme_type, base, query, parser) - }, - // FIXME: Should not have to use a made-up base URL. - _ => parse_relative_url(remaining, scheme, scheme_type, &RelativeSchemeData { - username: String::new(), password: None, host: Host::Domain(String::new()), - port: None, default_port: None, path: Vec::new() - }, &None, parser) - } - }, - SchemeType::Relative(..) => { - match parser.base_url { - Some(&Url { scheme: ref base_scheme, scheme_data: SchemeData::Relative(ref base), - ref query, .. }) - if scheme == *base_scheme && !remaining.starts_with("//") => { - try!(parser.parse_error(ParseError::RelativeUrlWithScheme)); - parse_relative_url(remaining, scheme, scheme_type, base, query, parser) - }, - _ => parse_absolute_url(scheme, scheme_type, remaining, parser), - } - }, - SchemeType::NonRelative => { - // Scheme data state - let (scheme_data, remaining) = try!(parse_scheme_data(remaining, parser)); - let (query, fragment) = try!(parse_query_and_fragment(remaining, parser)); - Ok(Url { scheme: scheme, scheme_data: SchemeData::NonRelative(scheme_data), - query: query, fragment: fragment }) - } - } -} - - -pub fn parse_scheme<'a>(input: &'a str, context: Context) -> Option<(String, &'a str)> { - if input.is_empty() || !starts_with_ascii_alpha(input) { - return None - } - for (i, c) in input.char_indices() { - match c { - 'a'...'z' | 'A'...'Z' | '0'...'9' | '+' | '-' | '.' => (), - ':' => return Some(( - input[..i].to_ascii_lowercase(), - &input[i + 1..], - )), - _ => return None, - } - } - // EOF before ':' - match context { - Context::Setter => Some((input.to_ascii_lowercase(), "")), - Context::UrlParser => None - } -} - - -fn parse_absolute_url<'a>(scheme: String, scheme_type: SchemeType, - input: &'a str, parser: &UrlParser) -> ParseResult<Url> { - // Authority first slash state - let remaining = try!(skip_slashes(input, parser)); - // Authority state - let (username, password, remaining) = try!(parse_userinfo(remaining, parser)); - // Host state - let (host, port, default_port, remaining) = try!(parse_host(remaining, scheme_type, parser)); - let (path, remaining) = try!(parse_path_start( - remaining, Context::UrlParser, scheme_type, parser)); - let scheme_data = SchemeData::Relative(RelativeSchemeData { - username: username, password: password, - host: host, port: port, default_port: default_port, - path: path }); - let (query, fragment) = try!(parse_query_and_fragment(remaining, parser)); - Ok(Url { scheme: scheme, scheme_data: scheme_data, query: query, fragment: fragment }) -} - - -fn parse_relative_url<'a>(input: &'a str, scheme: String, scheme_type: SchemeType, - base: &RelativeSchemeData, base_query: &Option<String>, - parser: &UrlParser) - -> ParseResult<Url> { - let mut chars = input.chars(); - match chars.next() { - Some('/') | Some('\\') => { - let ch = chars.next(); - // Relative slash state - if matches!(ch, Some('/') | Some('\\')) { - if ch == Some('\\') { - try!(parser.parse_error(ParseError::InvalidBackslash)) - } - if scheme_type == SchemeType::FileLike { - // File host state - let remaining = &input[2..]; - let (host, remaining) = if remaining.len() >= 2 - && starts_with_ascii_alpha(remaining) - && matches!(remaining.as_bytes()[1], b':' | b'|') - && (remaining.len() == 2 - || matches!(remaining.as_bytes()[2], - b'/' | b'\\' | b'?' | b'#')) - { - // Windows drive letter quirk - (Host::Domain(String::new()), remaining) - } else { - try!(parse_file_host(remaining, parser)) - }; - let (path, remaining) = try!(parse_path_start( - remaining, Context::UrlParser, scheme_type, parser)); - let scheme_data = SchemeData::Relative(RelativeSchemeData { - username: String::new(), password: None, - host: host, port: None, default_port: None, path: path - }); - let (query, fragment) = try!(parse_query_and_fragment(remaining, parser)); - Ok(Url { scheme: scheme, scheme_data: scheme_data, - query: query, fragment: fragment }) - } else { - parse_absolute_url(scheme, scheme_type, input, parser) - } - } else { - // Relative path state - let (path, remaining) = try!(parse_path( - &[], &input[1..], Context::UrlParser, scheme_type, parser)); - let scheme_data = SchemeData::Relative(if scheme_type == SchemeType::FileLike { - RelativeSchemeData { - username: String::new(), password: None, host: - Host::Domain(String::new()), port: None, default_port: None, path: path - } - } else { - RelativeSchemeData { - username: base.username.clone(), - password: base.password.clone(), - host: base.host.clone(), - port: base.port.clone(), - default_port: base.default_port.clone(), - path: path - } - }); - let (query, fragment) = try!( - parse_query_and_fragment(remaining, parser)); - Ok(Url { scheme: scheme, scheme_data: scheme_data, - query: query, fragment: fragment }) - } - }, - Some('?') => { - let (query, fragment) = try!(parse_query_and_fragment(input, parser)); - Ok(Url { scheme: scheme, scheme_data: SchemeData::Relative(base.clone()), - query: query, fragment: fragment }) - }, - Some('#') => { - let fragment = Some(try!(parse_fragment(&input[1..], parser))); - Ok(Url { scheme: scheme, scheme_data: SchemeData::Relative(base.clone()), - query: base_query.clone(), fragment: fragment }) - } - None => { - Ok(Url { scheme: scheme, scheme_data: SchemeData::Relative(base.clone()), - query: base_query.clone(), fragment: None }) - } - _ => { - let (scheme_data, remaining) = if scheme_type == SchemeType::FileLike - && input.len() >= 2 - && starts_with_ascii_alpha(input) - && matches!(input.as_bytes()[1], b':' | b'|') - && (input.len() == 2 - || matches!(input.as_bytes()[2], b'/' | b'\\' | b'?' | b'#')) - { - // Windows drive letter quirk - let (path, remaining) = try!(parse_path( - &[], input, Context::UrlParser, scheme_type, parser)); - (SchemeData::Relative(RelativeSchemeData { - username: String::new(), password: None, - host: Host::Domain(String::new()), - port: None, - default_port: None, - path: path - }), remaining) - } else { - let base_path = &base.path[..max(base.path.len(), 1) - 1]; - // Relative path state - let (path, remaining) = try!(parse_path( - base_path, input, Context::UrlParser, scheme_type, parser)); - (SchemeData::Relative(RelativeSchemeData { - username: base.username.clone(), - password: base.password.clone(), - host: base.host.clone(), - port: base.port.clone(), - default_port: base.default_port.clone(), - path: path - }), remaining) - }; - let (query, fragment) = try!(parse_query_and_fragment(remaining, parser)); - Ok(Url { scheme: scheme, scheme_data: scheme_data, - query: query, fragment: fragment }) - } - } -} - - -fn skip_slashes<'a>(input: &'a str, parser: &UrlParser) -> ParseResult<&'a str> { - let first_non_slash = input.find(|c| !matches!(c, '/' | '\\')).unwrap_or(input.len()); - if &input[..first_non_slash] != "//" { - try!(parser.parse_error(ParseError::ExpectedTwoSlashes)); - } - Ok(&input[first_non_slash..]) -} - - -fn parse_userinfo<'a>(input: &'a str, parser: &UrlParser) - -> ParseResult<(String, Option<String>, &'a str)> { - let mut last_at = None; - for (i, c) in input.char_indices() { - match c { - '@' => { - if last_at.is_some() { - try!(parser.parse_error(ParseError::InvalidAtSymbolInUser)) - } - last_at = Some(i) - }, - '/' | '\\' | '?' | '#' => break, - _ => (), - } - } - let (input, remaining) = match last_at { - Some(at) => (&input[..at], &input[at + 1..]), - None => return Ok((String::new(), None, input)), - }; - - let mut username = String::new(); - let mut password = None; - for (i, c, next_i) in input.char_ranges() { - match c { - ':' => { - password = Some(try!(parse_password(&input[i + 1..], parser))); - break - }, - '\t' | '\n' | '\r' => try!(parser.parse_error(ParseError::InvalidCharacter)), - _ => { - try!(check_url_code_point(input, i, c, parser)); - // The spec says to use the default encode set, - // but also replaces '@' by '%40' in an earlier step. - utf8_percent_encode_to(&input[i..next_i], - USERINFO_ENCODE_SET, &mut username); - } - } - } - Ok((username, password, remaining)) -} - - -fn parse_password(input: &str, parser: &UrlParser) -> ParseResult<String> { - let mut password = String::new(); - for (i, c, next_i) in input.char_ranges() { - match c { - '\t' | '\n' | '\r' => try!(parser.parse_error(ParseError::InvalidCharacter)), - _ => { - try!(check_url_code_point(input, i, c, parser)); - // The spec says to use the default encode set, - // but also replaces '@' by '%40' in an earlier step. - utf8_percent_encode_to(&input[i..next_i], - USERINFO_ENCODE_SET, &mut password); - } - } - } - Ok(password) -} - - -pub fn parse_host<'a>(input: &'a str, scheme_type: SchemeType, parser: &UrlParser) - -> ParseResult<(Host, Option<u16>, Option<u16>, &'a str)> { - let (host, remaining) = try!(parse_hostname(input, parser)); - let (port, default_port, remaining) = if remaining.starts_with(":") { - try!(parse_port(&remaining[1..], scheme_type, parser)) - } else { - (None, scheme_type.default_port(), remaining) - }; - Ok((host, port, default_port, remaining)) -} - - -pub fn parse_hostname<'a>(input: &'a str, parser: &UrlParser) - -> ParseResult<(Host, &'a str)> { - let mut inside_square_brackets = false; - let mut host_input = String::new(); - let mut end = input.len(); - for (i, c) in input.char_indices() { - match c { - ':' if !inside_square_brackets => { - end = i; - break - }, - '/' | '\\' | '?' | '#' => { - end = i; - break - }, - '\t' | '\n' | '\r' => try!(parser.parse_error(ParseError::InvalidCharacter)), - c => { - match c { - '[' => inside_square_brackets = true, - ']' => inside_square_brackets = false, - _ => (), - } - host_input.push(c) - } - } - } - let host = try!(Host::parse(&host_input)); - Ok((host, &input[end..])) -} - - -pub fn parse_port<'a>(input: &'a str, scheme_type: SchemeType, parser: &UrlParser) - -> ParseResult<(Option<u16>, Option<u16>, &'a str)> { - let mut port = 0; - let mut has_any_digit = false; - let mut end = input.len(); - for (i, c) in input.char_indices() { - match c { - '0'...'9' => { - port = port * 10 + (c as u32 - '0' as u32); - if port > ::std::u16::MAX as u32 { - return Err(ParseError::InvalidPort) - } - has_any_digit = true; - }, - '/' | '\\' | '?' | '#' => { - end = i; - break - }, - '\t' | '\n' | '\r' => try!(parser.parse_error(ParseError::InvalidCharacter)), - _ => return Err(ParseError::InvalidPort) - } - } - let default_port = scheme_type.default_port(); - let mut port = Some(port as u16); - if !has_any_digit || port == default_port { - port = None; - } - return Ok((port, default_port, &input[end..])) -} - - -fn parse_file_host<'a>(input: &'a str, parser: &UrlParser) -> ParseResult<(Host, &'a str)> { - let mut host_input = String::new(); - let mut end = input.len(); - for (i, c) in input.char_indices() { - match c { - '/' | '\\' | '?' | '#' => { - end = i; - break - }, - '\t' | '\n' | '\r' => try!(parser.parse_error(ParseError::InvalidCharacter)), - _ => host_input.push(c) - } - } - let host = if host_input.is_empty() { - Host::Domain(String::new()) - } else { - try!(Host::parse(&host_input)) - }; - Ok((host, &input[end..])) -} - - -pub fn parse_standalone_path(input: &str, parser: &UrlParser) - -> ParseResult<(Vec<String>, Option<String>, Option<String>)> { - if !input.starts_with("/") { - if input.starts_with("\\") { - try!(parser.parse_error(ParseError::InvalidBackslash)); - } else { - return Err(ParseError::ExpectedInitialSlash) - } - } - let (path, remaining) = try!(parse_path( - &[], &input[1..], Context::UrlParser, SchemeType::Relative(0), parser)); - let (query, fragment) = try!(parse_query_and_fragment(remaining, parser)); - Ok((path, query, fragment)) -} - - -pub fn parse_path_start<'a>(input: &'a str, context: Context, scheme_type: SchemeType, - parser: &UrlParser) - -> ParseResult<(Vec<String>, &'a str)> { - let mut i = 0; - // Relative path start state - match input.chars().next() { - Some('/') => i = 1, - Some('\\') => { - try!(parser.parse_error(ParseError::InvalidBackslash)); - i = 1; - }, - _ => () - } - parse_path(&[], &input[i..], context, scheme_type, parser) -} - - -fn parse_path<'a>(base_path: &[String], input: &'a str, context: Context, - scheme_type: SchemeType, parser: &UrlParser) - -> ParseResult<(Vec<String>, &'a str)> { - // Relative path state - let mut path = base_path.to_vec(); - let mut iter = input.char_ranges(); - let mut end; - loop { - let mut path_part = String::new(); - let mut ends_with_slash = false; - end = input.len(); - while let Some((i, c, next_i)) = iter.next() { - match c { - '/' => { - ends_with_slash = true; - end = i; - break - }, - '\\' => { - try!(parser.parse_error(ParseError::InvalidBackslash)); - ends_with_slash = true; - end = i; - break - }, - '?' | '#' if context == Context::UrlParser => { - end = i; - break - }, - '\t' | '\n' | '\r' => try!(parser.parse_error(ParseError::InvalidCharacter)), - _ => { - try!(check_url_code_point(input, i, c, parser)); - utf8_percent_encode_to(&input[i..next_i], - DEFAULT_ENCODE_SET, &mut path_part); - } - } - } - match &*path_part { - ".." | ".%2e" | ".%2E" | "%2e." | "%2E." | - "%2e%2e" | "%2E%2e" | "%2e%2E" | "%2E%2E" => { - path.pop(); - if !ends_with_slash { - path.push(String::new()); - } - }, - "." | "%2e" | "%2E" => { - if !ends_with_slash { - path.push(String::new()); - } - }, - _ => { - if scheme_type == SchemeType::FileLike - && path.is_empty() - && path_part.len() == 2 - && starts_with_ascii_alpha(&path_part) - && path_part.as_bytes()[1] == b'|' { - // Windows drive letter quirk - unsafe { - path_part.as_mut_vec()[1] = b':' - } - } - path.push(path_part) - } - } - if !ends_with_slash { - break - } - } - Ok((path, &input[end..])) -} - - -fn parse_scheme_data<'a>(input: &'a str, parser: &UrlParser) - -> ParseResult<(String, &'a str)> { - let mut scheme_data = String::new(); - let mut end = input.len(); - for (i, c, next_i) in input.char_ranges() { - match c { - '?' | '#' => { - end = i; - break - }, - '\t' | '\n' | '\r' => try!(parser.parse_error(ParseError::InvalidCharacter)), - _ => { - try!(check_url_code_point(input, i, c, parser)); - utf8_percent_encode_to(&input[i..next_i], - SIMPLE_ENCODE_SET, &mut scheme_data); - } - } - } - Ok((scheme_data, &input[end..])) -} - - -fn parse_query_and_fragment(input: &str, parser: &UrlParser) - -> ParseResult<(Option<String>, Option<String>)> { - match input.chars().next() { - Some('#') => Ok((None, Some(try!(parse_fragment(&input[1..], parser))))), - Some('?') => { - let (query, remaining) = try!(parse_query( - &input[1..], Context::UrlParser, parser)); - let fragment = match remaining { - Some(remaining) => Some(try!(parse_fragment(remaining, parser))), - None => None - }; - Ok((Some(query), fragment)) - }, - None => Ok((None, None)), - _ => panic!("Programming error. parse_query_and_fragment() should not \ - have been called with input \"{}\"", input) - } -} - - -pub fn parse_query<'a>(input: &'a str, context: Context, parser: &UrlParser) - -> ParseResult<(String, Option<&'a str>)> { - let mut query = String::new(); - let mut remaining = None; - for (i, c) in input.char_indices() { - match c { - '#' if context == Context::UrlParser => { - remaining = Some(&input[i + 1..]); - break - }, - '\t' | '\n' | '\r' => try!(parser.parse_error(ParseError::InvalidCharacter)), - _ => { - try!(check_url_code_point(input, i, c, parser)); - query.push(c); - } - } - } - - let query_bytes = parser.query_encoding_override.encode(&query); - Ok((percent_encode(&query_bytes, QUERY_ENCODE_SET), remaining)) -} - - -pub fn parse_fragment<'a>(input: &'a str, parser: &UrlParser) -> ParseResult<String> { - let mut fragment = String::new(); - for (i, c, next_i) in input.char_ranges() { - match c { - '\t' | '\n' | '\r' => try!(parser.parse_error(ParseError::InvalidCharacter)), - _ => { - try!(check_url_code_point(input, i, c, parser)); - utf8_percent_encode_to(&input[i..next_i], - SIMPLE_ENCODE_SET, &mut fragment); - } - } - } - Ok(fragment) -} - - -#[inline] -pub fn starts_with_ascii_alpha(string: &str) -> bool { - matches!(string.as_bytes()[0], b'a'...b'z' | b'A'...b'Z') -} - -#[inline] -fn is_ascii_hex_digit(byte: u8) -> bool { - matches!(byte, b'a'...b'f' | b'A'...b'F' | b'0'...b'9') -} - -#[inline] -fn starts_with_2_hex(input: &str) -> bool { - input.len() >= 2 - && is_ascii_hex_digit(input.as_bytes()[0]) - && is_ascii_hex_digit(input.as_bytes()[1]) -} - -#[inline] -fn is_url_code_point(c: char) -> bool { - matches!(c, - 'a'...'z' | - 'A'...'Z' | - '0'...'9' | - '!' | '$' | '&' | '\'' | '(' | ')' | '*' | '+' | ',' | '-' | - '.' | '/' | ':' | ';' | '=' | '?' | '@' | '_' | '~' | - '\u{A0}'...'\u{D7FF}' | '\u{E000}'...'\u{FDCF}' | '\u{FDF0}'...'\u{FFFD}' | - '\u{10000}'...'\u{1FFFD}' | '\u{20000}'...'\u{2FFFD}' | - '\u{30000}'...'\u{3FFFD}' | '\u{40000}'...'\u{4FFFD}' | - '\u{50000}'...'\u{5FFFD}' | '\u{60000}'...'\u{6FFFD}' | - '\u{70000}'...'\u{7FFFD}' | '\u{80000}'...'\u{8FFFD}' | - '\u{90000}'...'\u{9FFFD}' | '\u{A0000}'...'\u{AFFFD}' | - '\u{B0000}'...'\u{BFFFD}' | '\u{C0000}'...'\u{CFFFD}' | - '\u{D0000}'...'\u{DFFFD}' | '\u{E1000}'...'\u{EFFFD}' | - '\u{F0000}'...'\u{FFFFD}' | '\u{100000}'...'\u{10FFFD}') -} - -// Non URL code points: -// U+0000 to U+0020 (space) -// " # % < > [ \ ] ^ ` { | } -// U+007F to U+009F -// surrogates -// U+FDD0 to U+FDEF -// Last two of each plane: U+__FFFE to U+__FFFF for __ in 00 to 10 hex - - -pub trait StrCharRanges<'a> { - fn char_ranges(&self) -> CharRanges<'a>; -} - - -impl<'a> StrCharRanges<'a> for &'a str { - #[inline] - fn char_ranges(&self) -> CharRanges<'a> { - CharRanges { slice: *self, position: 0 } - } -} - -pub struct CharRanges<'a> { - slice: &'a str, - position: usize, -} - -impl<'a> Iterator for CharRanges<'a> { - type Item = (usize, char, usize); - - #[inline] - fn next(&mut self) -> Option<(usize, char, usize)> { - match self.slice[self.position..].chars().next() { - Some(ch) => { - let position = self.position; - self.position = position + ch.len_utf8(); - Some((position, ch, position + ch.len_utf8())) - } - None => None, - } - } -} - -#[inline] -fn check_url_code_point(input: &str, i: usize, c: char, parser: &UrlParser) - -> ParseResult<()> { - if c == '%' { - if !starts_with_2_hex(&input[i + 1..]) { - try!(parser.parse_error(ParseError::InvalidPercentEncoded)); - } - } else if !is_url_code_point(c) { - try!(parser.parse_error(ParseError::NonUrlCodePoint)); - } - Ok(()) -} diff --git a/deps/url-0.2.38/src/percent_encoding.rs b/deps/url-0.2.38/src/percent_encoding.rs deleted file mode 100644 index 146bede2f..000000000 --- a/deps/url-0.2.38/src/percent_encoding.rs +++ /dev/null @@ -1,149 +0,0 @@ -// Copyright 2013-2014 Simon Sapin. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - - -#[path = "encode_sets.rs"] -mod encode_sets; - -/// Represents a set of characters / bytes that should be percent-encoded. -/// -/// See [encode sets specification](http://url.spec.whatwg.org/#simple-encode-set). -/// -/// Different characters need to be encoded in different parts of an URL. -/// For example, a literal `?` question mark in an URL’s path would indicate -/// the start of the query string. -/// A question mark meant to be part of the path therefore needs to be percent-encoded. -/// In the query string however, a question mark does not have any special meaning -/// and does not need to be percent-encoded. -/// -/// Since the implementation details of `EncodeSet` are private, -/// the set of available encode sets is not extensible beyond the ones -/// provided here. -/// If you need a different encode set, -/// please [file a bug](https://github.com/servo/rust-url/issues) -/// explaining the use case. -#[derive(Copy, Clone)] -pub struct EncodeSet { - map: &'static [&'static str; 256], -} - -/// This encode set is used for fragment identifier and non-relative scheme data. -pub static SIMPLE_ENCODE_SET: EncodeSet = EncodeSet { map: &encode_sets::SIMPLE }; - -/// This encode set is used in the URL parser for query strings. -pub static QUERY_ENCODE_SET: EncodeSet = EncodeSet { map: &encode_sets::QUERY }; - -/// This encode set is used for path components. -pub static DEFAULT_ENCODE_SET: EncodeSet = EncodeSet { map: &encode_sets::DEFAULT }; - -/// This encode set is used in the URL parser for usernames and passwords. -pub static USERINFO_ENCODE_SET: EncodeSet = EncodeSet { map: &encode_sets::USERINFO }; - -/// This encode set should be used when setting the password field of a parsed URL. -pub static PASSWORD_ENCODE_SET: EncodeSet = EncodeSet { map: &encode_sets::PASSWORD }; - -/// This encode set should be used when setting the username field of a parsed URL. -pub static USERNAME_ENCODE_SET: EncodeSet = EncodeSet { map: &encode_sets::USERNAME }; - -/// This encode set is used in `application/x-www-form-urlencoded` serialization. -pub static FORM_URLENCODED_ENCODE_SET: EncodeSet = EncodeSet { - map: &encode_sets::FORM_URLENCODED, -}; - -/// This encode set is used for HTTP header values and is defined at -/// https://tools.ietf.org/html/rfc5987#section-3.2 -pub static HTTP_VALUE_ENCODE_SET: EncodeSet = EncodeSet { map: &encode_sets::HTTP_VALUE }; - -/// Percent-encode the given bytes, and push the result to `output`. -/// -/// The pushed strings are within the ASCII range. -#[inline] -pub fn percent_encode_to(input: &[u8], encode_set: EncodeSet, output: &mut String) { - for &byte in input { - output.push_str(encode_set.map[byte as usize]) - } -} - - -/// Percent-encode the given bytes. -/// -/// The returned string is within the ASCII range. -#[inline] -pub fn percent_encode(input: &[u8], encode_set: EncodeSet) -> String { - let mut output = String::new(); - percent_encode_to(input, encode_set, &mut output); - output -} - - -/// Percent-encode the UTF-8 encoding of the given string, and push the result to `output`. -/// -/// The pushed strings are within the ASCII range. -#[inline] -pub fn utf8_percent_encode_to(input: &str, encode_set: EncodeSet, output: &mut String) { - percent_encode_to(input.as_bytes(), encode_set, output) -} - - -/// Percent-encode the UTF-8 encoding of the given string. -/// -/// The returned string is within the ASCII range. -#[inline] -pub fn utf8_percent_encode(input: &str, encode_set: EncodeSet) -> String { - let mut output = String::new(); - utf8_percent_encode_to(input, encode_set, &mut output); - output -} - - -/// Percent-decode the given bytes, and push the result to `output`. -pub fn percent_decode_to(input: &[u8], output: &mut Vec<u8>) { - let mut i = 0; - while i < input.len() { - let c = input[i]; - if c == b'%' && i + 2 < input.len() { - if let (Some(h), Some(l)) = (from_hex(input[i + 1]), from_hex(input[i + 2])) { - output.push(h * 0x10 + l); - i += 3; - continue - } - } - - output.push(c); - i += 1; - } -} - - -/// Percent-decode the given bytes. -#[inline] -pub fn percent_decode(input: &[u8]) -> Vec<u8> { - let mut output = Vec::new(); - percent_decode_to(input, &mut output); - output -} - - -/// Percent-decode the given bytes, and decode the result as UTF-8. -/// -/// This is “lossy”: invalid UTF-8 percent-encoded byte sequences -/// will be replaced � U+FFFD, the replacement character. -#[inline] -pub fn lossy_utf8_percent_decode(input: &[u8]) -> String { - String::from_utf8_lossy(&percent_decode(input)).to_string() -} - -#[inline] -pub fn from_hex(byte: u8) -> Option<u8> { - match byte { - b'0' ... b'9' => Some(byte - b'0'), // 0..9 - b'A' ... b'F' => Some(byte + 10 - b'A'), // A..F - b'a' ... b'f' => Some(byte + 10 - b'a'), // a..f - _ => None - } -} diff --git a/deps/url-0.2.38/src/punycode.rs b/deps/url-0.2.38/src/punycode.rs deleted file mode 100644 index 3ca7f4b26..000000000 --- a/deps/url-0.2.38/src/punycode.rs +++ /dev/null @@ -1,267 +0,0 @@ -// Copyright 2013 Simon Sapin. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -//! Punycode ([RFC 3492](http://tools.ietf.org/html/rfc3492)) implementation. -//! -//! Since Punycode fundamentally works on unicode code points, -//! `encode` and `decode` take and return slices and vectors of `char`. -//! `encode_str` and `decode_to_string` provide convenience wrappers -//! that convert from and to Rust’s UTF-8 based `str` and `String` types. - -use std::u32; -use std::char; -use std::ascii::AsciiExt; - -// Bootstring parameters for Punycode -static BASE: u32 = 36; -static T_MIN: u32 = 1; -static T_MAX: u32 = 26; -static SKEW: u32 = 38; -static DAMP: u32 = 700; -static INITIAL_BIAS: u32 = 72; -static INITIAL_N: u32 = 0x80; -static DELIMITER: char = '-'; - - -#[inline] -fn adapt(mut delta: u32, num_points: u32, first_time: bool) -> u32 { - delta /= if first_time { DAMP } else { 2 }; - delta += delta / num_points; - let mut k = 0; - while delta > ((BASE - T_MIN) * T_MAX) / 2 { - delta /= BASE - T_MIN; - k += BASE; - } - k + (((BASE - T_MIN + 1) * delta) / (delta + SKEW)) -} - - -/// Convert Punycode to an Unicode `String`. -/// -/// This is a convenience wrapper around `decode`. -#[inline] -pub fn decode_to_string(input: &str) -> Option<String> { - decode(input).map(|chars| chars.into_iter().collect()) -} - - -/// Convert Punycode to Unicode. -/// -/// Return None on malformed input or overflow. -/// Overflow can only happen on inputs that take more than -/// 63 encoded bytes, the DNS limit on domain name labels. -pub fn decode(input: &str) -> Option<Vec<char>> { - // Handle "basic" (ASCII) code points. - // They are encoded as-is before the last delimiter, if any. - let (mut output, input) = match input.rfind(DELIMITER) { - None => (Vec::new(), input), - Some(position) => ( - input[..position].chars().collect(), - if position > 0 { &input[position + 1..] } else { input } - ) - }; - let mut code_point = INITIAL_N; - let mut bias = INITIAL_BIAS; - let mut i = 0; - let mut iter = input.bytes(); - loop { - let previous_i = i; - let mut weight = 1; - let mut k = BASE; - let mut byte = match iter.next() { - None => break, - Some(byte) => byte, - }; - // Decode a generalized variable-length integer into delta, - // which gets added to i. - loop { - let digit = match byte { - byte @ b'0' ... b'9' => byte - b'0' + 26, - byte @ b'A' ... b'Z' => byte - b'A', - byte @ b'a' ... b'z' => byte - b'a', - _ => return None - } as u32; - if digit > (u32::MAX - i) / weight { - return None // Overflow - } - i += digit * weight; - let t = if k <= bias { T_MIN } - else if k >= bias + T_MAX { T_MAX } - else { k - bias }; - if digit < t { - break - } - if weight > u32::MAX / (BASE - t) { - return None // Overflow - } - weight *= BASE - t; - k += BASE; - byte = match iter.next() { - None => return None, // End of input before the end of this delta - Some(byte) => byte, - }; - } - let length = output.len() as u32; - bias = adapt(i - previous_i, length + 1, previous_i == 0); - if i / (length + 1) > u32::MAX - code_point { - return None // Overflow - } - // i was supposed to wrap around from length+1 to 0, - // incrementing code_point each time. - code_point += i / (length + 1); - i %= length + 1; - let c = match char::from_u32(code_point) { - Some(c) => c, - None => return None - }; - output.insert(i as usize, c); - i += 1; - } - Some(output) -} - - -/// Convert an Unicode `str` to Punycode. -/// -/// This is a convenience wrapper around `encode`. -#[inline] -pub fn encode_str(input: &str) -> Option<String> { - encode(&input.chars().collect::<Vec<char>>()) -} - - -/// Convert Unicode to Punycode. -/// -/// Return None on overflow, which can only happen on inputs that would take more than -/// 63 encoded bytes, the DNS limit on domain name labels. -pub fn encode(input: &[char]) -> Option<String> { - // Handle "basic" (ASCII) code points. They are encoded as-is. - let output_bytes = input.iter().filter_map(|&c| - if c.is_ascii() { Some(c as u8) } else { None } - ).collect(); - let mut output = unsafe { String::from_utf8_unchecked(output_bytes) }; - let basic_length = output.len() as u32; - if basic_length > 0 { - output.push_str("-") - } - let mut code_point = INITIAL_N; - let mut delta = 0; - let mut bias = INITIAL_BIAS; - let mut processed = basic_length; - let input_length = input.len() as u32; - while processed < input_length { - // All code points < code_point have been handled already. - // Find the next larger one. - let min_code_point = input.iter().map(|&c| c as u32) - .filter(|&c| c >= code_point).min().unwrap(); - if min_code_point - code_point > (u32::MAX - delta) / (processed + 1) { - return None // Overflow - } - // Increase delta to advance the decoder’s <code_point,i> state to <min_code_point,0> - delta += (min_code_point - code_point) * (processed + 1); - code_point = min_code_point; - for &c in input { - let c = c as u32; - if c < code_point { - delta += 1; - if delta == 0 { - return None // Overflow - } - } - if c == code_point { - // Represent delta as a generalized variable-length integer: - let mut q = delta; - let mut k = BASE; - loop { - let t = if k <= bias { T_MIN } - else if k >= bias + T_MAX { T_MAX } - else { k - bias }; - if q < t { - break - } - let value = t + ((q - t) % (BASE - t)); - value_to_digit(value, &mut output); - q = (q - t) / (BASE - t); - k += BASE; - } - value_to_digit(q, &mut output); - bias = adapt(delta, processed + 1, processed == basic_length); - delta = 0; - processed += 1; - } - } - delta += 1; - code_point += 1; - } - Some(output) -} - - -#[inline] -fn value_to_digit(value: u32, output: &mut String) { - let code_point = match value { - 0 ... 25 => value + 0x61, // a..z - 26 ... 35 => value - 26 + 0x30, // 0..9 - _ => panic!() - }; - unsafe { output.as_mut_vec().push(code_point as u8) } -} - - -#[cfg(test)] -mod tests { - use super::{decode, encode_str}; - use rustc_serialize::json::{Json, Object}; - - fn one_test(description: &str, decoded: &str, encoded: &str) { - match decode(encoded) { - None => panic!("Decoding {} failed.", encoded), - Some(result) => { - let result = result.into_iter().collect::<String>(); - assert!(result == decoded, - format!("Incorrect decoding of {}:\n {}\n!= {}\n{}", - encoded, result, decoded, description)) - } - } - - match encode_str(decoded) { - None => panic!("Encoding {} failed.", decoded), - Some(result) => { - assert!(result == encoded, - format!("Incorrect encoding of {}:\n {}\n!= {}\n{}", - decoded, result, encoded, description)) - } - } - } - - fn get_string<'a>(map: &'a Object, key: &str) -> &'a str { - match map.get(&key.to_string()) { - Some(&Json::String(ref s)) => s, - None => "", - _ => panic!(), - } - } - - #[test] - fn test_punycode() { - - match Json::from_str(include_str!("punycode_tests.json")) { - Ok(Json::Array(tests)) => for test in &tests { - match test { - &Json::Object(ref o) => one_test( - get_string(o, "description"), - get_string(o, "decoded"), - get_string(o, "encoded") - ), - _ => panic!(), - } - }, - other => panic!("{:?}", other) - } - } -} diff --git a/deps/url-0.2.38/src/tests.rs b/deps/url-0.2.38/src/tests.rs deleted file mode 100644 index e25500f5c..000000000 --- a/deps/url-0.2.38/src/tests.rs +++ /dev/null @@ -1,349 +0,0 @@ -// Copyright 2013-2014 Simon Sapin. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - - -use std::char; -use super::{UrlParser, Url, SchemeData, RelativeSchemeData, Host}; - - -#[test] -fn url_parsing() { - for test in parse_test_data(include_str!("urltestdata.txt")) { - let Test { - input, - base, - scheme: expected_scheme, - username: expected_username, - password: expected_password, - host: expected_host, - port: expected_port, - path: expected_path, - query: expected_query, - fragment: expected_fragment, - expected_failure, - } = test; - let base = match Url::parse(&base) { - Ok(base) => base, - Err(message) => panic!("Error parsing base {}: {}", base, message) - }; - let url = UrlParser::new().base_url(&base).parse(&input); - if expected_scheme.is_none() { - if url.is_ok() && !expected_failure { - panic!("Expected a parse error for URL {}", input); - } - continue - } - let Url { scheme, scheme_data, query, fragment, .. } = match url { - Ok(url) => url, - Err(message) => { - if expected_failure { - continue - } else { - panic!("Error parsing URL {}: {}", input, message) - } - } - }; - - macro_rules! assert_eq { - ($a: expr, $b: expr) => { - { - let a = $a; - let b = $b; - if a != b { - if expected_failure { - continue - } else { - panic!("{:?} != {:?}", a, b) - } - } - } - } - } - - assert_eq!(Some(scheme), expected_scheme); - match scheme_data { - SchemeData::Relative(RelativeSchemeData { - username, password, host, port, default_port: _, path, - }) => { - assert_eq!(username, expected_username); - assert_eq!(password, expected_password); - let host = host.serialize(); - assert_eq!(host, expected_host); - assert_eq!(port, expected_port); - assert_eq!(Some(format!("/{}", str_join(&path, "/"))), expected_path); - }, - SchemeData::NonRelative(scheme_data) => { - assert_eq!(Some(scheme_data), expected_path); - assert_eq!(String::new(), expected_username); - assert_eq!(None, expected_password); - assert_eq!(String::new(), expected_host); - assert_eq!(None, expected_port); - }, - } - fn opt_prepend(prefix: &str, opt_s: Option<String>) -> Option<String> { - opt_s.map(|s| format!("{}{}", prefix, s)) - } - assert_eq!(opt_prepend("?", query), expected_query); - assert_eq!(opt_prepend("#", fragment), expected_fragment); - - assert!(!expected_failure, "Unexpected success for {}", input); - } -} - -// FIMXE: Remove this when &[&str]::join (the new name) lands in the stable channel. -#[allow(deprecated)] -fn str_join<T: ::std::borrow::Borrow<str>>(pieces: &[T], separator: &str) -> String { - pieces.connect(separator) -} - -struct Test { - input: String, - base: String, - scheme: Option<String>, - username: String, - password: Option<String>, - host: String, - port: Option<u16>, - path: Option<String>, - query: Option<String>, - fragment: Option<String>, - expected_failure: bool, -} - -fn parse_test_data(input: &str) -> Vec<Test> { - let mut tests: Vec<Test> = Vec::new(); - for line in input.lines() { - if line == "" || line.starts_with("#") { - continue - } - let mut pieces = line.split(' ').collect::<Vec<&str>>(); - let expected_failure = pieces[0] == "XFAIL"; - if expected_failure { - pieces.remove(0); - } - let input = unescape(pieces.remove(0)); - let mut test = Test { - input: input, - base: if pieces.is_empty() || pieces[0] == "" { - tests.last().unwrap().base.clone() - } else { - unescape(pieces.remove(0)) - }, - scheme: None, - username: String::new(), - password: None, - host: String::new(), - port: None, - path: None, - query: None, - fragment: None, - expected_failure: expected_failure, - }; - for piece in pieces { - if piece == "" || piece.starts_with("#") { - continue - } - let colon = piece.find(':').unwrap(); - let value = unescape(&piece[colon + 1..]); - match &piece[..colon] { - "s" => test.scheme = Some(value), - "u" => test.username = value, - "pass" => test.password = Some(value), - "h" => test.host = value, - "port" => test.port = Some(value.parse().unwrap()), - "p" => test.path = Some(value), - "q" => test.query = Some(value), - "f" => test.fragment = Some(value), - _ => panic!("Invalid token") - } - } - tests.push(test) - } - tests -} - -fn unescape(input: &str) -> String { - let mut output = String::new(); - let mut chars = input.chars(); - loop { - match chars.next() { - None => return output, - Some(c) => output.push( - if c == '\\' { - match chars.next().unwrap() { - '\\' => '\\', - 'n' => '\n', - 'r' => '\r', - 's' => ' ', - 't' => '\t', - 'f' => '\x0C', - 'u' => { - char::from_u32(((( - chars.next().unwrap().to_digit(16).unwrap()) * 16 + - chars.next().unwrap().to_digit(16).unwrap()) * 16 + - chars.next().unwrap().to_digit(16).unwrap()) * 16 + - chars.next().unwrap().to_digit(16).unwrap()).unwrap() - } - _ => panic!("Invalid test data input"), - } - } else { - c - } - ) - } - } -} - - -#[test] -fn new_file_paths() { - use std::path::{Path, PathBuf}; - if cfg!(unix) { - assert_eq!(Url::from_file_path(Path::new("relative")), Err(())); - assert_eq!(Url::from_file_path(Path::new("../relative")), Err(())); - } else { - assert_eq!(Url::from_file_path(Path::new("relative")), Err(())); - assert_eq!(Url::from_file_path(Path::new(r"..\relative")), Err(())); - assert_eq!(Url::from_file_path(Path::new(r"\drive-relative")), Err(())); - assert_eq!(Url::from_file_path(Path::new(r"\\ucn\")), Err(())); - } - - if cfg!(unix) { - let mut url = Url::from_file_path(Path::new("/foo/bar")).unwrap(); - assert_eq!(url.host(), Some(&Host::Domain("".to_string()))); - assert_eq!(url.path(), Some(&["foo".to_string(), "bar".to_string()][..])); - assert!(url.to_file_path() == Ok(PathBuf::from("/foo/bar"))); - - url.path_mut().unwrap()[1] = "ba\0r".to_string(); - url.to_file_path().is_ok(); - - url.path_mut().unwrap()[1] = "ba%00r".to_string(); - url.to_file_path().is_ok(); - } -} - -#[test] -#[cfg(unix)] -fn new_path_bad_utf8() { - use std::ffi::OsStr; - use std::os::unix::prelude::*; - use std::path::{Path, PathBuf}; - - let url = Url::from_file_path(Path::new("/foo/ba%80r")).unwrap(); - let os_str = OsStr::from_bytes(b"/foo/ba\x80r"); - assert_eq!(url.to_file_path(), Ok(PathBuf::from(os_str))); -} - -#[test] -fn new_path_windows_fun() { - if cfg!(windows) { - use std::path::{Path, PathBuf}; - let mut url = Url::from_file_path(Path::new(r"C:\foo\bar")).unwrap(); - assert_eq!(url.host(), Some(&Host::Domain("".to_string()))); - assert_eq!(url.path(), Some(&["C:".to_string(), "foo".to_string(), "bar".to_string()][..])); - assert_eq!(url.to_file_path(), - Ok(PathBuf::from(r"C:\foo\bar"))); - - url.path_mut().unwrap()[2] = "ba\0r".to_string(); - assert!(url.to_file_path().is_ok()); - - url.path_mut().unwrap()[2] = "ba%00r".to_string(); - assert!(url.to_file_path().is_ok()); - - // Invalid UTF-8 - url.path_mut().unwrap()[2] = "ba%80r".to_string(); - assert!(url.to_file_path().is_err()); - } -} - - -#[test] -fn new_directory_paths() { - use std::path::Path; - - if cfg!(unix) { - assert_eq!(Url::from_directory_path(Path::new("relative")), Err(())); - assert_eq!(Url::from_directory_path(Path::new("../relative")), Err(())); - - let url = Url::from_directory_path(Path::new("/foo/bar")).unwrap(); - assert_eq!(url.host(), Some(&Host::Domain("".to_string()))); - assert_eq!(url.path(), Some(&["foo".to_string(), "bar".to_string(), - "".to_string()][..])); - } else { - assert_eq!(Url::from_directory_path(Path::new("relative")), Err(())); - assert_eq!(Url::from_directory_path(Path::new(r"..\relative")), Err(())); - assert_eq!(Url::from_directory_path(Path::new(r"\drive-relative")), Err(())); - assert_eq!(Url::from_directory_path(Path::new(r"\\ucn\")), Err(())); - - let url = Url::from_directory_path(Path::new(r"C:\foo\bar")).unwrap(); - assert_eq!(url.host(), Some(&Host::Domain("".to_string()))); - assert_eq!(url.path(), Some(&["C:".to_string(), "foo".to_string(), - "bar".to_string(), "".to_string()][..])); - } -} - -#[test] -fn from_str() { - assert!("http://testing.com/this".parse::<Url>().is_ok()); -} - -#[test] -fn issue_124() { - let url: Url = "file:a".parse().unwrap(); - assert_eq!(url.path().unwrap(), ["a"]); - let url: Url = "file:...".parse().unwrap(); - assert_eq!(url.path().unwrap(), ["..."]); - let url: Url = "file:..".parse().unwrap(); - assert_eq!(url.path().unwrap(), [""]); -} - -#[test] -fn relative_scheme_data_equality() { - use std::hash::{Hash, Hasher, SipHasher}; - - fn check_eq(a: &Url, b: &Url) { - assert_eq!(a, b); - - let mut h1 = SipHasher::new(); - a.hash(&mut h1); - let mut h2 = SipHasher::new(); - b.hash(&mut h2); - assert_eq!(h1.finish(), h2.finish()); - } - - fn url(s: &str) -> Url { - let rv = s.parse().unwrap(); - check_eq(&rv, &rv); - rv - } - - // Doesn't care if default port is given. - let a: Url = url("https://example.com/"); - let b: Url = url("https://example.com:443/"); - check_eq(&a, &b); - - // Different ports - let a: Url = url("http://example.com/"); - let b: Url = url("http://example.com:8080/"); - assert!(a != b); - - // Different scheme - let a: Url = url("http://example.com/"); - let b: Url = url("https://example.com/"); - assert!(a != b); - - // Different host - let a: Url = url("http://foo.com/"); - let b: Url = url("http://bar.com/"); - assert!(a != b); - - // Missing path, automatically substituted. Semantically the same. - let a: Url = url("http://foo.com"); - let b: Url = url("http://foo.com/"); - check_eq(&a, &b); -} diff --git a/deps/url-0.2.38/src/urltestdata.txt b/deps/url-0.2.38/src/urltestdata.txt deleted file mode 100644 index ece4e7131..000000000 --- a/deps/url-0.2.38/src/urltestdata.txt +++ /dev/null @@ -1,329 +0,0 @@ -# This file is from https://github.com/w3c/web-platform-tests/blob/master/url/urltestdata.txt -# and used under a 3-clause BSD license. - -# FORMAT NOT DOCUMENTED YET (parser is urltestparser.js) -# https://github.com/w3c/web-platform-tests/blob/master/url/urltestparser.js - -# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/script-tests/segments.js -http://example\t.\norg http://example.org/foo/bar s:http h:example.org p:/ -http://user:pass@foo:21/bar;par?b#c s:http u:user pass:pass h:foo port:21 p:/bar;par q:?b f:#c -http:foo.com s:http h:example.org p:/foo/foo.com -\t\s\s\s:foo.com\s\s\s\n s:http h:example.org p:/foo/:foo.com -\sfoo.com\s\s s:http h:example.org p:/foo/foo.com -a:\t\sfoo.com s:a p:\sfoo.com -http://f:21/\sb\s?\sd\s#\se\s s:http h:f port:21 p:/%20b%20 q:?%20d%20 f:#\se -http://f:/c s:http h:f p:/c -http://f:0/c s:http h:f port:0 p:/c -http://f:00000000000000/c s:http h:f port:0 p:/c -http://f:00000000000000000000080/c s:http h:f p:/c -http://f:b/c -http://f:\s/c -http://f:\n/c s:http h:f p:/c -http://f:fifty-two/c -http://f:9999/c s:http h:f port:9999 p:/c -http://f:\s21\s/\sb\s?\sd\s#\se\s - s:http h:example.org p:/foo/bar -\s\s\t s:http h:example.org p:/foo/bar -:foo.com/ s:http h:example.org p:/foo/:foo.com/ -:foo.com\\ s:http h:example.org p:/foo/:foo.com/ -: s:http h:example.org p:/foo/: -:a s:http h:example.org p:/foo/:a -:/ s:http h:example.org p:/foo/:/ -:\\ s:http h:example.org p:/foo/:/ -:# s:http h:example.org p:/foo/: f:# -# s:http h:example.org p:/foo/bar f:# -#/ s:http h:example.org p:/foo/bar f:#/ -#\\ s:http h:example.org p:/foo/bar f:#\\ -#;? s:http h:example.org p:/foo/bar f:#;? -? s:http h:example.org p:/foo/bar q:? -/ s:http h:example.org p:/ -:23 s:http h:example.org p:/foo/:23 -/:23 s:http h:example.org p:/:23 -:: s:http h:example.org p:/foo/:: -::23 s:http h:example.org p:/foo/::23 -foo:// s:foo p:// -http://a:b@c:29/d s:http u:a pass:b h:c port:29 p:/d -http::@c:29 s:http h:example.org p:/foo/:@c:29 -http://&a:foo(b]c@d:2/ s:http u:&a pass:foo(b]c h:d port:2 p:/ -http://::@c@d:2 s:http pass::%40c h:d port:2 p:/ -http://foo.com:b@d/ s:http u:foo.com pass:b h:d p:/ -http://foo.com/\\@ s:http h:foo.com p://@ -http:\\\\foo.com\\ s:http h:foo.com p:/ -http:\\\\a\\b:c\\d@foo.com\\ s:http h:a p:/b:c/d@foo.com/ -foo:/ s:foo p:/ -foo:/bar.com/ s:foo p:/bar.com/ -foo:///////// s:foo p:///////// -foo://///////bar.com/ s:foo p://///////bar.com/ -foo:////:///// s:foo p:////:///// -c:/foo s:c p:/foo -//foo/bar s:http h:foo p:/bar -http://foo/path;a??e#f#g s:http h:foo p:/path;a q:??e f:#f#g -http://foo/abcd?efgh?ijkl s:http h:foo p:/abcd q:?efgh?ijkl -http://foo/abcd#foo?bar s:http h:foo p:/abcd f:#foo?bar -[61:24:74]:98 s:http h:example.org p:/foo/[61:24:74]:98 -http:[61:27]/:foo s:http h:example.org p:/foo/[61:27]/:foo -http://[1::2]:3:4 -http://2001::1 -http://2001::1] -http://2001::1]:80 -http://[2001::1] s:http h:[2001::1] p:/ -http://[2001::1]:80 s:http h:[2001::1] p:/ -http:/example.com/ s:http h:example.org p:/example.com/ -ftp:/example.com/ s:ftp h:example.com p:/ -https:/example.com/ s:https h:example.com p:/ -madeupscheme:/example.com/ s:madeupscheme p:/example.com/ -file:/example.com/ s:file p:/example.com/ -ftps:/example.com/ s:ftps p:/example.com/ -gopher:/example.com/ s:gopher h:example.com p:/ -ws:/example.com/ s:ws h:example.com p:/ -wss:/example.com/ s:wss h:example.com p:/ -data:/example.com/ s:data p:/example.com/ -javascript:/example.com/ s:javascript p:/example.com/ -mailto:/example.com/ s:mailto p:/example.com/ -http:example.com/ s:http h:example.org p:/foo/example.com/ -ftp:example.com/ s:ftp h:example.com p:/ -https:example.com/ s:https h:example.com p:/ -madeupscheme:example.com/ s:madeupscheme p:example.com/ -ftps:example.com/ s:ftps p:example.com/ -gopher:example.com/ s:gopher h:example.com p:/ -ws:example.com/ s:ws h:example.com p:/ -wss:example.com/ s:wss h:example.com p:/ -data:example.com/ s:data p:example.com/ -javascript:example.com/ s:javascript p:example.com/ -mailto:example.com/ s:mailto p:example.com/ -/a/b/c s:http h:example.org p:/a/b/c -/a/\s/c s:http h:example.org p:/a/%20/c -/a%2fc s:http h:example.org p:/a%2fc -/a/%2f/c s:http h:example.org p:/a/%2f/c -#\u03B2 s:http h:example.org p:/foo/bar f:#\u03B2 -data:text/html,test#test s:data p:text/html,test f:#test - -# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/file.html -file:c:\\foo\\bar.html file:///tmp/mock/path s:file p:/c:/foo/bar.html -\s\sFile:c|////foo\\bar.html s:file p:/c:////foo/bar.html -C|/foo/bar s:file p:/C:/foo/bar -/C|\\foo\\bar s:file p:/C:/foo/bar -//C|/foo/bar s:file p:/C:/foo/bar -//server/file s:file h:server p:/file -\\\\server\\file s:file h:server p:/file -/\\server/file s:file h:server p:/file -file:///foo/bar.txt s:file p:/foo/bar.txt -file:///home/me s:file p:/home/me -// s:file p:/ -/// s:file p:/ -///test s:file p:/test -file://test s:file h:test p:/ -file://localhost s:file h:localhost p:/ -file://localhost/ s:file h:localhost p:/ -file://localhost/test s:file h:localhost p:/test -test s:file p:/tmp/mock/test -file:test s:file p:/tmp/mock/test - -# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/script-tests/path.js -http://example.com/././foo about:blank s:http h:example.com p:/foo -http://example.com/./.foo s:http h:example.com p:/.foo -http://example.com/foo/. s:http h:example.com p:/foo/ -http://example.com/foo/./ s:http h:example.com p:/foo/ -http://example.com/foo/bar/.. s:http h:example.com p:/foo/ -http://example.com/foo/bar/../ s:http h:example.com p:/foo/ -http://example.com/foo/..bar s:http h:example.com p:/foo/..bar -http://example.com/foo/bar/../ton s:http h:example.com p:/foo/ton -http://example.com/foo/bar/../ton/../../a s:http h:example.com p:/a -http://example.com/foo/../../.. s:http h:example.com p:/ -http://example.com/foo/../../../ton s:http h:example.com p:/ton -http://example.com/foo/%2e s:http h:example.com p:/foo/ -http://example.com/foo/%2e%2 s:http h:example.com p:/foo/%2e%2 -http://example.com/foo/%2e./%2e%2e/.%2e/%2e.bar s:http h:example.com p:/%2e.bar -http://example.com////../.. s:http h:example.com p:// -http://example.com/foo/bar//../.. s:http h:example.com p:/foo/ -http://example.com/foo/bar//.. s:http h:example.com p:/foo/bar/ -http://example.com/foo s:http h:example.com p:/foo -http://example.com/%20foo s:http h:example.com p:/%20foo -http://example.com/foo% s:http h:example.com p:/foo% -http://example.com/foo%2 s:http h:example.com p:/foo%2 -http://example.com/foo%2zbar s:http h:example.com p:/foo%2zbar -http://example.com/foo%2\u00C2\u00A9zbar s:http h:example.com p:/foo%2%C3%82%C2%A9zbar -http://example.com/foo%41%7a s:http h:example.com p:/foo%41%7a -http://example.com/foo\t\u0091%91 s:http h:example.com p:/foo%C2%91%91 -http://example.com/foo%00%51 s:http h:example.com p:/foo%00%51 -http://example.com/(%28:%3A%29) s:http h:example.com p:/(%28:%3A%29) -http://example.com/%3A%3a%3C%3c s:http h:example.com p:/%3A%3a%3C%3c -http://example.com/foo\tbar s:http h:example.com p:/foobar -http://example.com\\\\foo\\\\bar s:http h:example.com p://foo//bar -http://example.com/%7Ffp3%3Eju%3Dduvgw%3Dd s:http h:example.com p:/%7Ffp3%3Eju%3Dduvgw%3Dd -http://example.com/@asdf%40 s:http h:example.com p:/@asdf%40 -http://example.com/\u4F60\u597D\u4F60\u597D s:http h:example.com p:/%E4%BD%A0%E5%A5%BD%E4%BD%A0%E5%A5%BD -http://example.com/\u2025/foo s:http h:example.com p:/%E2%80%A5/foo -http://example.com/\uFEFF/foo s:http h:example.com p:/%EF%BB%BF/foo -http://example.com/\u202E/foo/\u202D/bar s:http h:example.com p:/%E2%80%AE/foo/%E2%80%AD/bar - -# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/script-tests/relative.js -http://www.google.com/foo?bar=baz# about:blank s:http h:www.google.com p:/foo q:?bar=baz f:# -http://www.google.com/foo?bar=baz#\s\u00BB s:http h:www.google.com p:/foo q:?bar=baz f:#\s%C2%BB -http://[www.google.com]/ -http://www.google.com s:http h:www.google.com p:/ -http://192.0x00A80001 s:http h:192.0x00a80001 p:/ -http://www/foo%2Ehtml s:http h:www p:/foo%2Ehtml -http://www/foo/%2E/html s:http h:www p:/foo/html -http://user:pass@/ -http://%25DOMAIN:foobar@foodomain.com/ s:http u:%25DOMAIN pass:foobar h:foodomain.com p:/ -http:\\\\www.google.com\\foo s:http h:www.google.com p:/foo -http://foo:80/ s:http h:foo p:/ -http://foo:81/ s:http h:foo port:81 p:/ -httpa://foo:80/ s:httpa p://foo:80/ -http://foo:-80/ -https://foo:443/ s:https h:foo p:/ -https://foo:80/ s:https h:foo port:80 p:/ -ftp://foo:21/ s:ftp h:foo p:/ -ftp://foo:80/ s:ftp h:foo port:80 p:/ -gopher://foo:70/ s:gopher h:foo p:/ -gopher://foo:443/ s:gopher h:foo port:443 p:/ -ws://foo:80/ s:ws h:foo p:/ -ws://foo:81/ s:ws h:foo port:81 p:/ -ws://foo:443/ s:ws h:foo port:443 p:/ -ws://foo:815/ s:ws h:foo port:815 p:/ -wss://foo:80/ s:wss h:foo port:80 p:/ -wss://foo:81/ s:wss h:foo port:81 p:/ -wss://foo:443/ s:wss h:foo p:/ -wss://foo:815/ s:wss h:foo port:815 p:/ -http:/example.com/ s:http h:example.com p:/ -ftp:/example.com/ s:ftp h:example.com p:/ -https:/example.com/ s:https h:example.com p:/ -madeupscheme:/example.com/ s:madeupscheme p:/example.com/ -file:/example.com/ s:file p:/example.com/ -ftps:/example.com/ s:ftps p:/example.com/ -gopher:/example.com/ s:gopher h:example.com p:/ -ws:/example.com/ s:ws h:example.com p:/ -wss:/example.com/ s:wss h:example.com p:/ -data:/example.com/ s:data p:/example.com/ -javascript:/example.com/ s:javascript p:/example.com/ -mailto:/example.com/ s:mailto p:/example.com/ -http:example.com/ s:http h:example.com p:/ -ftp:example.com/ s:ftp h:example.com p:/ -https:example.com/ s:https h:example.com p:/ -madeupscheme:example.com/ s:madeupscheme p:example.com/ -ftps:example.com/ s:ftps p:example.com/ -gopher:example.com/ s:gopher h:example.com p:/ -ws:example.com/ s:ws h:example.com p:/ -wss:example.com/ s:wss h:example.com p:/ -data:example.com/ s:data p:example.com/ -javascript:example.com/ s:javascript p:example.com/ -mailto:example.com/ s:mailto p:example.com/ - -# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/segments-userinfo-vs-host.html -http:@www.example.com about:blank s:http h:www.example.com p:/ -http:/@www.example.com s:http h:www.example.com p:/ -http://@www.example.com s:http h:www.example.com p:/ -http:a:b@www.example.com s:http u:a pass:b h:www.example.com p:/ -http:/a:b@www.example.com s:http u:a pass:b h:www.example.com p:/ -http://a:b@www.example.com s:http u:a pass:b h:www.example.com p:/ -http://@pple.com s:http h:pple.com p:/ -http::b@www.example.com s:http pass:b h:www.example.com p:/ -http:/:b@www.example.com s:http pass:b h:www.example.com p:/ -http://:b@www.example.com s:http pass:b h:www.example.com p:/ -http:/:@/www.example.com -http://user@/www.example.com -http:@/www.example.com -http:/@/www.example.com -http://@/www.example.com -https:@/www.example.com -http:a:b@/www.example.com -http:/a:b@/www.example.com -http://a:b@/www.example.com -http::@/www.example.com -http:a:@www.example.com s:http u:a pass: h:www.example.com p:/ -http:/a:@www.example.com s:http u:a pass: h:www.example.com p:/ -http://a:@www.example.com s:http u:a pass: h:www.example.com p:/ -http://www.@pple.com s:http u:www. h:pple.com p:/ -http:@:www.example.com -http:/@:www.example.com -http://@:www.example.com -http://:@www.example.com s:http pass: h:www.example.com p:/ - -#Others -/ http://www.example.com/test s:http h:www.example.com p:/ -/test.txt s:http h:www.example.com p:/test.txt -. s:http h:www.example.com p:/ -.. s:http h:www.example.com p:/ -test.txt s:http h:www.example.com p:/test.txt -./test.txt s:http h:www.example.com p:/test.txt -../test.txt s:http h:www.example.com p:/test.txt -../aaa/test.txt s:http h:www.example.com p:/aaa/test.txt -../../test.txt s:http h:www.example.com p:/test.txt -\u4E2D/test.txt s:http h:www.example.com p:/%E4%B8%AD/test.txt -http://www.example2.com s:http h:www.example2.com p:/ - -# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/host.html - -# Basic canonicalization, uppercase should be converted to lowercase -http://ExAmPlE.CoM http://other.com/ s:http p:/ h:example.com - -# Spaces should fail -http://example\sexample.com - -# This should fail -http://Goo%20\sgoo%7C|.com - -# This should fail -http://GOO\u00a0\u3000goo.com - -# This should fail -http://[] -http://[:] - -# Other types of space (no-break, zero-width, zero-width-no-break) are -# name-prepped away to nothing. -XFAIL http://GOO\u200b\u2060\ufeffgoo.com s:http p:/ h:googoo.com - -# Ideographic full stop (full-width period for Chinese, etc.) should be -# treated as a dot. -XFAIL http://www.foo\u3002bar.com s:http p:/ h:www.foo.bar.com - -# Invalid unicode characters should fail... -http://\ufdd0zyx.com - -# ...This is the same as previous but with with escaped. -http://%ef%b7%90zyx.com - -# Test name prepping, fullwidth input should be converted to ASCII and NOT -# IDN-ized. This is "Go" in fullwidth UTF-8/UTF-16. -XFAIL http://\uff27\uff4f.com s:http p:/ h:go.com - -# URL spec forbids the following. -# https://www.w3.org/Bugs/Public/show_bug.cgi?id=24257 -http://\uff05\uff14\uff11.com -http://%ef%bc%85%ef%bc%94%ef%bc%91.com - -# ...%00 in fullwidth should fail (also as escaped UTF-8 input) -http://\uff05\uff10\uff10.com -http://%ef%bc%85%ef%bc%90%ef%bc%90.com - -# Basic IDN support, UTF-8 and UTF-16 input should be converted to IDN -XFAIL http://\u4f60\u597d\u4f60\u597d s:http p:/ h:xn--6qqa088eba - -# Invalid escaped characters should fail and the percents should be -# escaped. https://www.w3.org/Bugs/Public/show_bug.cgi?id=24191 -http://%zz%66%a.com - -# If we get an invalid character that has been escaped. -http://%25 -http://hello%00 - -# Escaped numbers should be treated like IP addresses if they are. -XFAIL http://%30%78%63%30%2e%30%32%35%30.01 s:http p:/ h:127.0.0.1 -XFAIL http://%30%78%63%30%2e%30%32%35%30.01%2e - -# Invalid escaping should trigger the regular host error handling. -http://%3g%78%63%30%2e%30%32%35%30%2E.01 - -# Something that isn't exactly an IP should get treated as a host and -# spaces escaped. -http://192.168.0.1\shello - -# Fullwidth and escaped UTF-8 fullwidth should still be treated as IP. -# These are "0Xc0.0250.01" in fullwidth. -XFAIL http://\uff10\uff38\uff43\uff10\uff0e\uff10\uff12\uff15\uff10\uff0e\uff10\uff11 s:http p:/ h:192.168.0.1 - -# Broken IP addresses. -XFAIL http://192.168.0.257 -http://[google.com] diff --git a/deps/url-0.2.38/src/urlutils.rs b/deps/url-0.2.38/src/urlutils.rs deleted file mode 100644 index cd57b501b..000000000 --- a/deps/url-0.2.38/src/urlutils.rs +++ /dev/null @@ -1,169 +0,0 @@ -// Copyright 2013-2014 Simon Sapin. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - - -//! These methods are not meant for use in Rust code, -//! only to help implement the JavaScript URLUtils API: http://url.spec.whatwg.org/#urlutils - -use super::{Url, UrlParser, SchemeType, SchemeData, RelativeSchemeData}; -use parser::{ParseError, ParseResult, Context}; -use percent_encoding::{utf8_percent_encode_to, USERNAME_ENCODE_SET, PASSWORD_ENCODE_SET}; - - -#[allow(dead_code)] -pub struct UrlUtilsWrapper<'a> { - pub url: &'a mut Url, - pub parser: &'a UrlParser<'a>, -} - -#[doc(hidden)] -pub trait UrlUtils { - fn set_scheme(&mut self, input: &str) -> ParseResult<()>; - fn set_username(&mut self, input: &str) -> ParseResult<()>; - fn set_password(&mut self, input: &str) -> ParseResult<()>; - fn set_host_and_port(&mut self, input: &str) -> ParseResult<()>; - fn set_host(&mut self, input: &str) -> ParseResult<()>; - fn set_port(&mut self, input: &str) -> ParseResult<()>; - fn set_path(&mut self, input: &str) -> ParseResult<()>; - fn set_query(&mut self, input: &str) -> ParseResult<()>; - fn set_fragment(&mut self, input: &str) -> ParseResult<()>; -} - -impl<'a> UrlUtils for UrlUtilsWrapper<'a> { - /// `URLUtils.protocol` setter - fn set_scheme(&mut self, input: &str) -> ParseResult<()> { - match ::parser::parse_scheme(input, Context::Setter) { - Some((scheme, _)) => { - if self.parser.get_scheme_type(&self.url.scheme).same_as(self.parser.get_scheme_type(&scheme)) { - return Err(ParseError::InvalidScheme); - } - self.url.scheme = scheme; - Ok(()) - }, - None => Err(ParseError::InvalidScheme), - } - } - - /// `URLUtils.username` setter - fn set_username(&mut self, input: &str) -> ParseResult<()> { - match self.url.scheme_data { - SchemeData::Relative(RelativeSchemeData { ref mut username, .. }) => { - username.truncate(0); - utf8_percent_encode_to(input, USERNAME_ENCODE_SET, username); - Ok(()) - }, - SchemeData::NonRelative(_) => Err(ParseError::CannotSetUsernameWithNonRelativeScheme) - } - } - - /// `URLUtils.password` setter - fn set_password(&mut self, input: &str) -> ParseResult<()> { - match self.url.scheme_data { - SchemeData::Relative(RelativeSchemeData { ref mut password, .. }) => { - if input.len() == 0 { - *password = None; - return Ok(()); - } - let mut new_password = String::new(); - utf8_percent_encode_to(input, PASSWORD_ENCODE_SET, &mut new_password); - *password = Some(new_password); - Ok(()) - }, - SchemeData::NonRelative(_) => Err(ParseError::CannotSetPasswordWithNonRelativeScheme) - } - } - - /// `URLUtils.host` setter - fn set_host_and_port(&mut self, input: &str) -> ParseResult<()> { - match self.url.scheme_data { - SchemeData::Relative(RelativeSchemeData { - ref mut host, ref mut port, ref mut default_port, .. - }) => { - let scheme_type = self.parser.get_scheme_type(&self.url.scheme); - let (new_host, new_port, new_default_port, _) = try!(::parser::parse_host( - input, scheme_type, self.parser)); - *host = new_host; - *port = new_port; - *default_port = new_default_port; - Ok(()) - }, - SchemeData::NonRelative(_) => Err(ParseError::CannotSetHostPortWithNonRelativeScheme) - } - } - - /// `URLUtils.hostname` setter - fn set_host(&mut self, input: &str) -> ParseResult<()> { - match self.url.scheme_data { - SchemeData::Relative(RelativeSchemeData { ref mut host, .. }) => { - let (new_host, _) = try!(::parser::parse_hostname(input, self.parser)); - *host = new_host; - Ok(()) - }, - SchemeData::NonRelative(_) => Err(ParseError::CannotSetHostWithNonRelativeScheme) - } - } - - /// `URLUtils.port` setter - fn set_port(&mut self, input: &str) -> ParseResult<()> { - match self.url.scheme_data { - SchemeData::Relative(RelativeSchemeData { ref mut port, ref mut default_port, .. }) => { - let scheme_type = self.parser.get_scheme_type(&self.url.scheme); - if scheme_type == SchemeType::FileLike { - return Err(ParseError::CannotSetPortWithFileLikeScheme); - } - let (new_port, new_default_port, _) = try!(::parser::parse_port( - input, scheme_type, self.parser)); - *port = new_port; - *default_port = new_default_port; - Ok(()) - }, - SchemeData::NonRelative(_) => Err(ParseError::CannotSetPortWithNonRelativeScheme) - } - } - - /// `URLUtils.pathname` setter - fn set_path(&mut self, input: &str) -> ParseResult<()> { - match self.url.scheme_data { - SchemeData::Relative(RelativeSchemeData { ref mut path, .. }) => { - let scheme_type = self.parser.get_scheme_type(&self.url.scheme); - let (new_path, _) = try!(::parser::parse_path_start( - input, Context::Setter, scheme_type, self.parser)); - *path = new_path; - Ok(()) - }, - SchemeData::NonRelative(_) => Err(ParseError::CannotSetPathWithNonRelativeScheme) - } - } - - /// `URLUtils.search` setter - fn set_query(&mut self, input: &str) -> ParseResult<()> { - self.url.query = if input.is_empty() { - None - } else { - let input = if input.starts_with("?") { &input[1..] } else { input }; - let (new_query, _) = try!(::parser::parse_query( - input, Context::Setter, self.parser)); - Some(new_query) - }; - Ok(()) - } - - /// `URLUtils.hash` setter - fn set_fragment(&mut self, input: &str) -> ParseResult<()> { - if self.url.scheme == "javascript" { - return Err(ParseError::CannotSetJavascriptFragment) - } - self.url.fragment = if input.is_empty() { - None - } else { - let input = if input.starts_with("#") { &input[1..] } else { input }; - Some(try!(::parser::parse_fragment(input, self.parser))) - }; - Ok(()) - } -} diff --git a/deps/url-0.5.5/.gitignore b/deps/url-0.5.5/.gitignore deleted file mode 100644 index 7cbe84a5e..000000000 --- a/deps/url-0.5.5/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/target -/Cargo.lock -/.cargo/config diff --git a/deps/url-0.5.5/.travis.yml b/deps/url-0.5.5/.travis.yml deleted file mode 100644 index 97e22ba2b..000000000 --- a/deps/url-0.5.5/.travis.yml +++ /dev/null @@ -1,11 +0,0 @@ -language: rust -rust: - - nightly - - beta - - stable -script: make test -after_success: "[ $TRAVIS_RUST_VERSION == master ] && make upload-doc" -env: - - secure: Q5eFkWSv20gCxMXrF1BPBSY67qAi9XYKsGHbOc6c1hOf933AX9Wr2CqL8mBhgAZfe4TWEnazjMNHmVIs75W+DPRkxVjImDmPLlQSDNuQFKBGATL5rnx7UzgT7t6CZhG+aPr50VVuC/3IL1+Ok85DjT/LnOKaao3r+Wd+HMFVViM= -notifications: - webhooks: http://build.servo.org:54856/travis diff --git a/deps/url-0.5.5/Cargo.toml b/deps/url-0.5.5/Cargo.toml deleted file mode 100644 index 88336c334..000000000 --- a/deps/url-0.5.5/Cargo.toml +++ /dev/null @@ -1,52 +0,0 @@ -[package] - -name = "url" -version = "0.5.5" -authors = [ "Simon Sapin <simon.sapin@exyr.org>" ] - -description = "URL library for Rust, based on the WHATWG URL Standard" -documentation = "http://servo.github.io/rust-url/url/index.html" -repository = "https://github.com/servo/rust-url" -readme = "README.md" -keywords = ["url", "parser"] -license = "MIT/Apache-2.0" - -[[test]] name = "format" -[[test]] name = "form_urlencoded" -[[test]] name = "idna" -[[test]] name = "punycode" -[[test]] name = "tests" -[[test]] -name = "wpt" -harness = false - -[dev-dependencies] -rustc-test = "0.1" - -[features] -query_encoding = ["encoding"] -serde_serialization = ["serde"] -heap_size = ["heapsize", "heapsize_plugin"] - -[dependencies.heapsize] -version = ">=0.1.1, <0.4" -optional = true - -[dependencies.heapsize_plugin] -version = "0.1.0" -optional = true - -[dependencies.encoding] -version = "0.2" -optional = true - -[dependencies.serde] -version = "0.6.1" -optional = true - -[dependencies] -uuid = "0.1.17" -rustc-serialize = "0.3" -unicode-bidi = "0.2.3" -unicode-normalization = "0.1.2" -matches = "0.1" diff --git a/deps/url-0.5.5/LICENSE-APACHE b/deps/url-0.5.5/LICENSE-APACHE deleted file mode 100644 index 16fe87b06..000000000 --- a/deps/url-0.5.5/LICENSE-APACHE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - -Copyright [yyyy] [name of copyright owner] - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/deps/url-0.5.5/LICENSE-MIT b/deps/url-0.5.5/LICENSE-MIT deleted file mode 100644 index 1da3a5f6d..000000000 --- a/deps/url-0.5.5/LICENSE-MIT +++ /dev/null @@ -1,26 +0,0 @@ -Copyright (c) 2006-2009 Graydon Hoare -Copyright (c) 2009-2013 Mozilla Foundation - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. diff --git a/deps/url-0.5.5/Makefile b/deps/url-0.5.5/Makefile deleted file mode 100644 index e46603bee..000000000 --- a/deps/url-0.5.5/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -test: - cargo test --features query_encoding - cargo test --features serde_serialization - cargo test - [ x$$TRAVIS_RUST_VERSION != xnightly ] || cargo test --features heap_size - -doc: - cargo doc --features "query_encoding serde_serialization" - @echo '<meta http-equiv=refresh content=0;url=url/index.html>' > target/doc/index.html - @cp github.png target/doc/ - -upload-doc: doc - test "$(TRAVIS_BRANCH)" = master - test "$(TRAVIS_PULL_REQUEST)" = false - sudo pip install ghp-import - ghp-import -n target/doc - git push -qf https://$(TOKEN)@github.com/$(TRAVIS_REPO_SLUG).git gh-pages - -.PHONY: test doc upload-doc diff --git a/deps/url-0.5.5/README.md b/deps/url-0.5.5/README.md deleted file mode 100644 index 3585d74e9..000000000 --- a/deps/url-0.5.5/README.md +++ /dev/null @@ -1,8 +0,0 @@ -rust-url -======== - -[![Travis build Status](https://travis-ci.org/servo/rust-url.svg?branch=master)](https://travis-ci.org/servo/rust-url) [![Appveyor build status](https://ci.appveyor.com/api/projects/status/ulkqx2xcemyod6xa?svg=true)](https://ci.appveyor.com/project/Manishearth/rust-url) - -URL library for Rust, based on the [URL Standard](http://url.spec.whatwg.org/). - -[Documentation](http://servo.github.io/rust-url/url/index.html) diff --git a/deps/url-0.5.5/appveyor.yml b/deps/url-0.5.5/appveyor.yml deleted file mode 100644 index 5819d38b1..000000000 --- a/deps/url-0.5.5/appveyor.yml +++ /dev/null @@ -1,13 +0,0 @@ -install: - - ps: Start-FileDownload 'https://static.rust-lang.org/dist/rust-nightly-i686-pc-windows-gnu.exe' - - rust-nightly-i686-pc-windows-gnu.exe /VERYSILENT /NORESTART /DIR="C:\Program Files (x86)\Rust" - - SET PATH=%PATH%;C:\Program Files (x86)\Rust\bin - - rustc -V - - cargo -V - - git submodule update --init --recursive - -build: false - -test_script: - - cargo build - - cargo test --verbose diff --git a/deps/url-0.5.5/github.png b/deps/url-0.5.5/github.png deleted file mode 100644 index b2c327097e33667628759b5b8194cbe364f471fc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7786 zcmV-w9+lyVP)<h;3K|Lk000e1NJLTq005N$005N;1^@s6QKGm{0000PbVXQnQ*UN; zcVTj606}DLVr3vnZDD6+Qe|Oed2z{QJOBV53`s;mRCwC#T?tfFXO_Mcn+q<08h5b@ zl(?d}#WgA<YSbhun4V73S+VDwnRL3RyJ5P|%$eykJq_LIbmExw6ah?POj@wBk4c0W zw?q>GcSR6n6-Bh%aKnOm-+fg@)#JUYf<h?Zzd7#|7A3x-zTD-z_kO=mV`C!;Ynk~- zX8qD~=`5G8bonVRf4(9pG;~eqdlQFG3=i}Rq~eRkbh`GmSG=ErK?7;t=y}vDpcfsj zK1zqr9R3r%LBEr}WtOf6%VVSEYqESTf1!dOKLL?@0w{ln%RmEZ32lrHiw+;ydmwE+ zvXyS%z3nyc>7g+X(U87F=*{omq#IXmyh?wiKiIv$7MlRoy#Z8!?NLty`>*c5(J<Ix z=o{FV4pbcQ8bF2i4y8#$CQ(SQ5c<04Yr0{&@j4kP#nYcFK-IQ@3a|rJ0F9<Wy5+jG z`D5oB%nfG#;I7=d;uY`5SLaKsCa$8p4R>kFp)F*pF})!H>J__}G}>JbA<vcR1YGV3 zpaL0CD|Bg5VNu}&dJmw3RR_s*(?ku84PF7L`TF@ZwC_;bRlJL8s%qY>|KIvoEIE@a zAh`sWk4V(p6i|Wubr=omAKyQHhGB*tf3fgFA(dV#^@{fs+%uS#-oKO+>_cY{(aD07 zM%qY!mcE6Ud`G(KE!SPUM7=@9b7>~(!c*M?K+y_%YtqO`dU%4}#k;)*P_PAt1*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G zx61jT$}{dY%2nP60#E`}tpQY{Ol+c;#~aOsI|QJFX@JU2K;g_`7RxZ#)0Vs~R9jw~ zApj*z=T`ot@*L)vv6Bb6YxMG}&s3+^zbATm!jzuMjfC7fzJhruo%A2XGRlg|M934S z0F^u1opxVCECa&#ukCzIo`({E66OG^7F2llVi{ka_)-8$nCG7A(TR`ppdFa<t7or@ zq+FOrqV5KudieL?0Xu9EqnBr@G^Lw23#MF{JDy4fU|`4}oA{V4e4m#|#f8Np<Oy@r zQ>l3@$>!<j@qpbI$G@PWQ$^_w?~7>zVXe%m(94@KY6h>Oe|qFoKI=tzC}AzD{uE(w z*|=rYuSY*h-<K{A*a<)hYpthZv5etSOdDV?PXJ1oN1h5R=xd_Z$VqvACY>ug2SBa2 z07(E!n45{ZUFgGr-KdaJ^iAP6R8d^<R{f^>*Mx@>)+$d0rhGy80t)mCqz?~$NR_3P zM#)3HZUIic;u3%o<~pZZ6tRdkHaG0rKy?@D-lWa+8rjZZw_O5I!rTMZ!ia^eu?hLa zx{Gxi=so%~Ii7Z`1eXAmFz28GvAHFG3tg$bvYy_hKT-1|AkB8b5`Yrs8dQ5u@1fcY zwXaeJr8K4Nn&*lNKnZhcKJ)_pk<#c7cF);^N(nGWnb;TX2niSM9=E=B^*vXwclMkx zb^E}xzpi@XgLDOvqZ%iXqj+@#H5aoMADu8wQ2ALrkUgl}Jsnw?FilFKK_zf#9kDF{ zCCn{QnVn=Mjc#N)!h|&gRclgcVZz)Fe<W%tVQm2_0U}}dH2et@=CSF-uRxdpl`yY2 wAJMuKCOnle0V-hvRKkP_Pzm!s`+orj0DmM6pw6$!i~s-t07*qoM6N<$f>-V9>Hq)$ diff --git a/deps/url-0.5.5/make_encode_sets.py b/deps/url-0.5.5/make_encode_sets.py deleted file mode 100644 index eb859050f..000000000 --- a/deps/url-0.5.5/make_encode_sets.py +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright 2013-2014 Simon Sapin. -# -# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -# option. This file may not be copied, modified, or distributed -# except according to those terms. - - -# Run as: python make_encode_sets.py > src/encode_sets.rs - - -print('''\ -// Copyright 2013-2014 Simon Sapin. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -// Generated by make_encode_sets.py -''') -for name, encoded in [ - ('SIMPLE', ''), - ('QUERY', r''' "#<>'''), - ('DEFAULT', r''' "#<>`?{}'''), - ('USERINFO', r''' "#<>`?{}@'''), - ('PASSWORD', r''' "#<>`?{}@\/'''), - ('USERNAME', r''' "#<>`?{}@\/:'''), - ('FORM_URLENCODED', r''' !"#$%&\'()+,/:;<=>?@[\]^`{|}~'''), - ('HTTP_VALUE', r''' "%'()*,/:;<->?[\]{}'''), -]: - print( - "pub static %s: [&'static str; 256] = [\n%s\n];\n\n" - % (name, '\n'.join( - ' ' + ' '.join( - '"%s%s",' % ("\\" if chr(b) in '\\"' else "", chr(b)) - if 0x20 <= b <= 0x7E and chr(b) not in encoded - else '"%%%02X",' % b - for b in range(s, s + 8) - ) for s in range(0, 256, 8)))) diff --git a/deps/url-0.5.5/make_idna_table.py b/deps/url-0.5.5/make_idna_table.py deleted file mode 100644 index bd1bc8110..000000000 --- a/deps/url-0.5.5/make_idna_table.py +++ /dev/null @@ -1,60 +0,0 @@ -# Copyright 2013-2014 Valentin Gosu. -# -# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -# option. This file may not be copied, modified, or distributed -# except according to those terms. - - -# Run as: python make_idna_table.py idna_table.txt > src/idna_table.rs -# You can get the latest idna table from -# http://www.unicode.org/Public/idna/latest/IdnaMappingTable.txt - -print('''\ -// Copyright 2013-2014 Valentin Gosu. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -// Generated by make_idna_table.py - -use idna::Mapping::*; -use idna::Range; - -pub static TABLE: &'static [Range] = &[ -''') - -txt = open("IdnaMappingTable.txt") - -def char(s): - return (unichr(int(s, 16)) - .encode('utf8') - .replace('\\', '\\\\') - .replace('"', '\\"') - .replace('\0', '\\0')) - -for line in txt: - # remove comments - line, _, _ = line.partition('#') - # skip empty lines - if len(line.strip()) == 0: - continue - fields = line.split(';') - if fields[0].strip() == 'D800..DFFF': - continue # Surrogates don't occur in Rust strings. - first, _, last = fields[0].strip().partition('..') - if not last: - last = first - mapping = fields[1].strip().replace('_', ' ').title().replace(' ', '') - if len(fields) > 2: - if fields[2].strip(): - mapping += '("%s")' % ''.join(char(c) for c in fields[2].strip().split(' ')) - elif mapping == "Deviation": - mapping += '("")' - print(" Range { from: '%s', to: '%s', mapping: %s }," % (char(first), char(last), mapping)) - -print("];") diff --git a/deps/url-0.5.5/src/encode_sets.rs b/deps/url-0.5.5/src/encode_sets.rs deleted file mode 100644 index d7b5fb9d9..000000000 --- a/deps/url-0.5.5/src/encode_sets.rs +++ /dev/null @@ -1,298 +0,0 @@ -// Copyright 2013-2014 Simon Sapin. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -// Generated by make_encode_sets.py - -pub static SIMPLE: [&'static str; 256] = [ - "%00", "%01", "%02", "%03", "%04", "%05", "%06", "%07", - "%08", "%09", "%0A", "%0B", "%0C", "%0D", "%0E", "%0F", - "%10", "%11", "%12", "%13", "%14", "%15", "%16", "%17", - "%18", "%19", "%1A", "%1B", "%1C", "%1D", "%1E", "%1F", - " ", "!", "\"", "#", "$", "%", "&", "'", - "(", ")", "*", "+", ",", "-", ".", "/", - "0", "1", "2", "3", "4", "5", "6", "7", - "8", "9", ":", ";", "<", "=", ">", "?", - "@", "A", "B", "C", "D", "E", "F", "G", - "H", "I", "J", "K", "L", "M", "N", "O", - "P", "Q", "R", "S", "T", "U", "V", "W", - "X", "Y", "Z", "[", "\\", "]", "^", "_", - "`", "a", "b", "c", "d", "e", "f", "g", - "h", "i", "j", "k", "l", "m", "n", "o", - "p", "q", "r", "s", "t", "u", "v", "w", - "x", "y", "z", "{", "|", "}", "~", "%7F", - "%80", "%81", "%82", "%83", "%84", "%85", "%86", "%87", - "%88", "%89", "%8A", "%8B", "%8C", "%8D", "%8E", "%8F", - "%90", "%91", "%92", "%93", "%94", "%95", "%96", "%97", - "%98", "%99", "%9A", "%9B", "%9C", "%9D", "%9E", "%9F", - "%A0", "%A1", "%A2", "%A3", "%A4", "%A5", "%A6", "%A7", - "%A8", "%A9", "%AA", "%AB", "%AC", "%AD", "%AE", "%AF", - "%B0", "%B1", "%B2", "%B3", "%B4", "%B5", "%B6", "%B7", - "%B8", "%B9", "%BA", "%BB", "%BC", "%BD", "%BE", "%BF", - "%C0", "%C1", "%C2", "%C3", "%C4", "%C5", "%C6", "%C7", - "%C8", "%C9", "%CA", "%CB", "%CC", "%CD", "%CE", "%CF", - "%D0", "%D1", "%D2", "%D3", "%D4", "%D5", "%D6", "%D7", - "%D8", "%D9", "%DA", "%DB", "%DC", "%DD", "%DE", "%DF", - "%E0", "%E1", "%E2", "%E3", "%E4", "%E5", "%E6", "%E7", - "%E8", "%E9", "%EA", "%EB", "%EC", "%ED", "%EE", "%EF", - "%F0", "%F1", "%F2", "%F3", "%F4", "%F5", "%F6", "%F7", - "%F8", "%F9", "%FA", "%FB", "%FC", "%FD", "%FE", "%FF", -]; - - -pub static QUERY: [&'static str; 256] = [ - "%00", "%01", "%02", "%03", "%04", "%05", "%06", "%07", - "%08", "%09", "%0A", "%0B", "%0C", "%0D", "%0E", "%0F", - "%10", "%11", "%12", "%13", "%14", "%15", "%16", "%17", - "%18", "%19", "%1A", "%1B", "%1C", "%1D", "%1E", "%1F", - "%20", "!", "%22", "%23", "$", "%", "&", "'", - "(", ")", "*", "+", ",", "-", ".", "/", - "0", "1", "2", "3", "4", "5", "6", "7", - "8", "9", ":", ";", "%3C", "=", "%3E", "?", - "@", "A", "B", "C", "D", "E", "F", "G", - "H", "I", "J", "K", "L", "M", "N", "O", - "P", "Q", "R", "S", "T", "U", "V", "W", - "X", "Y", "Z", "[", "\\", "]", "^", "_", - "`", "a", "b", "c", "d", "e", "f", "g", - "h", "i", "j", "k", "l", "m", "n", "o", - "p", "q", "r", "s", "t", "u", "v", "w", - "x", "y", "z", "{", "|", "}", "~", "%7F", - "%80", "%81", "%82", "%83", "%84", "%85", "%86", "%87", - "%88", "%89", "%8A", "%8B", "%8C", "%8D", "%8E", "%8F", - "%90", "%91", "%92", "%93", "%94", "%95", "%96", "%97", - "%98", "%99", "%9A", "%9B", "%9C", "%9D", "%9E", "%9F", - "%A0", "%A1", "%A2", "%A3", "%A4", "%A5", "%A6", "%A7", - "%A8", "%A9", "%AA", "%AB", "%AC", "%AD", "%AE", "%AF", - "%B0", "%B1", "%B2", "%B3", "%B4", "%B5", "%B6", "%B7", - "%B8", "%B9", "%BA", "%BB", "%BC", "%BD", "%BE", "%BF", - "%C0", "%C1", "%C2", "%C3", "%C4", "%C5", "%C6", "%C7", - "%C8", "%C9", "%CA", "%CB", "%CC", "%CD", "%CE", "%CF", - "%D0", "%D1", "%D2", "%D3", "%D4", "%D5", "%D6", "%D7", - "%D8", "%D9", "%DA", "%DB", "%DC", "%DD", "%DE", "%DF", - "%E0", "%E1", "%E2", "%E3", "%E4", "%E5", "%E6", "%E7", - "%E8", "%E9", "%EA", "%EB", "%EC", "%ED", "%EE", "%EF", - "%F0", "%F1", "%F2", "%F3", "%F4", "%F5", "%F6", "%F7", - "%F8", "%F9", "%FA", "%FB", "%FC", "%FD", "%FE", "%FF", -]; - - -pub static DEFAULT: [&'static str; 256] = [ - "%00", "%01", "%02", "%03", "%04", "%05", "%06", "%07", - "%08", "%09", "%0A", "%0B", "%0C", "%0D", "%0E", "%0F", - "%10", "%11", "%12", "%13", "%14", "%15", "%16", "%17", - "%18", "%19", "%1A", "%1B", "%1C", "%1D", "%1E", "%1F", - "%20", "!", "%22", "%23", "$", "%", "&", "'", - "(", ")", "*", "+", ",", "-", ".", "/", - "0", "1", "2", "3", "4", "5", "6", "7", - "8", "9", ":", ";", "%3C", "=", "%3E", "%3F", - "@", "A", "B", "C", "D", "E", "F", "G", - "H", "I", "J", "K", "L", "M", "N", "O", - "P", "Q", "R", "S", "T", "U", "V", "W", - "X", "Y", "Z", "[", "\\", "]", "^", "_", - "%60", "a", "b", "c", "d", "e", "f", "g", - "h", "i", "j", "k", "l", "m", "n", "o", - "p", "q", "r", "s", "t", "u", "v", "w", - "x", "y", "z", "%7B", "|", "%7D", "~", "%7F", - "%80", "%81", "%82", "%83", "%84", "%85", "%86", "%87", - "%88", "%89", "%8A", "%8B", "%8C", "%8D", "%8E", "%8F", - "%90", "%91", "%92", "%93", "%94", "%95", "%96", "%97", - "%98", "%99", "%9A", "%9B", "%9C", "%9D", "%9E", "%9F", - "%A0", "%A1", "%A2", "%A3", "%A4", "%A5", "%A6", "%A7", - "%A8", "%A9", "%AA", "%AB", "%AC", "%AD", "%AE", "%AF", - "%B0", "%B1", "%B2", "%B3", "%B4", "%B5", "%B6", "%B7", - "%B8", "%B9", "%BA", "%BB", "%BC", "%BD", "%BE", "%BF", - "%C0", "%C1", "%C2", "%C3", "%C4", "%C5", "%C6", "%C7", - "%C8", "%C9", "%CA", "%CB", "%CC", "%CD", "%CE", "%CF", - "%D0", "%D1", "%D2", "%D3", "%D4", "%D5", "%D6", "%D7", - "%D8", "%D9", "%DA", "%DB", "%DC", "%DD", "%DE", "%DF", - "%E0", "%E1", "%E2", "%E3", "%E4", "%E5", "%E6", "%E7", - "%E8", "%E9", "%EA", "%EB", "%EC", "%ED", "%EE", "%EF", - "%F0", "%F1", "%F2", "%F3", "%F4", "%F5", "%F6", "%F7", - "%F8", "%F9", "%FA", "%FB", "%FC", "%FD", "%FE", "%FF", -]; - - -pub static USERINFO: [&'static str; 256] = [ - "%00", "%01", "%02", "%03", "%04", "%05", "%06", "%07", - "%08", "%09", "%0A", "%0B", "%0C", "%0D", "%0E", "%0F", - "%10", "%11", "%12", "%13", "%14", "%15", "%16", "%17", - "%18", "%19", "%1A", "%1B", "%1C", "%1D", "%1E", "%1F", - "%20", "!", "%22", "%23", "$", "%", "&", "'", - "(", ")", "*", "+", ",", "-", ".", "/", - "0", "1", "2", "3", "4", "5", "6", "7", - "8", "9", ":", ";", "%3C", "=", "%3E", "%3F", - "%40", "A", "B", "C", "D", "E", "F", "G", - "H", "I", "J", "K", "L", "M", "N", "O", - "P", "Q", "R", "S", "T", "U", "V", "W", - "X", "Y", "Z", "[", "\\", "]", "^", "_", - "%60", "a", "b", "c", "d", "e", "f", "g", - "h", "i", "j", "k", "l", "m", "n", "o", - "p", "q", "r", "s", "t", "u", "v", "w", - "x", "y", "z", "%7B", "|", "%7D", "~", "%7F", - "%80", "%81", "%82", "%83", "%84", "%85", "%86", "%87", - "%88", "%89", "%8A", "%8B", "%8C", "%8D", "%8E", "%8F", - "%90", "%91", "%92", "%93", "%94", "%95", "%96", "%97", - "%98", "%99", "%9A", "%9B", "%9C", "%9D", "%9E", "%9F", - "%A0", "%A1", "%A2", "%A3", "%A4", "%A5", "%A6", "%A7", - "%A8", "%A9", "%AA", "%AB", "%AC", "%AD", "%AE", "%AF", - "%B0", "%B1", "%B2", "%B3", "%B4", "%B5", "%B6", "%B7", - "%B8", "%B9", "%BA", "%BB", "%BC", "%BD", "%BE", "%BF", - "%C0", "%C1", "%C2", "%C3", "%C4", "%C5", "%C6", "%C7", - "%C8", "%C9", "%CA", "%CB", "%CC", "%CD", "%CE", "%CF", - "%D0", "%D1", "%D2", "%D3", "%D4", "%D5", "%D6", "%D7", - "%D8", "%D9", "%DA", "%DB", "%DC", "%DD", "%DE", "%DF", - "%E0", "%E1", "%E2", "%E3", "%E4", "%E5", "%E6", "%E7", - "%E8", "%E9", "%EA", "%EB", "%EC", "%ED", "%EE", "%EF", - "%F0", "%F1", "%F2", "%F3", "%F4", "%F5", "%F6", "%F7", - "%F8", "%F9", "%FA", "%FB", "%FC", "%FD", "%FE", "%FF", -]; - - -pub static PASSWORD: [&'static str; 256] = [ - "%00", "%01", "%02", "%03", "%04", "%05", "%06", "%07", - "%08", "%09", "%0A", "%0B", "%0C", "%0D", "%0E", "%0F", - "%10", "%11", "%12", "%13", "%14", "%15", "%16", "%17", - "%18", "%19", "%1A", "%1B", "%1C", "%1D", "%1E", "%1F", - "%20", "!", "%22", "%23", "$", "%", "&", "'", - "(", ")", "*", "+", ",", "-", ".", "%2F", - "0", "1", "2", "3", "4", "5", "6", "7", - "8", "9", ":", ";", "%3C", "=", "%3E", "%3F", - "%40", "A", "B", "C", "D", "E", "F", "G", - "H", "I", "J", "K", "L", "M", "N", "O", - "P", "Q", "R", "S", "T", "U", "V", "W", - "X", "Y", "Z", "[", "%5C", "]", "^", "_", - "%60", "a", "b", "c", "d", "e", "f", "g", - "h", "i", "j", "k", "l", "m", "n", "o", - "p", "q", "r", "s", "t", "u", "v", "w", - "x", "y", "z", "%7B", "|", "%7D", "~", "%7F", - "%80", "%81", "%82", "%83", "%84", "%85", "%86", "%87", - "%88", "%89", "%8A", "%8B", "%8C", "%8D", "%8E", "%8F", - "%90", "%91", "%92", "%93", "%94", "%95", "%96", "%97", - "%98", "%99", "%9A", "%9B", "%9C", "%9D", "%9E", "%9F", - "%A0", "%A1", "%A2", "%A3", "%A4", "%A5", "%A6", "%A7", - "%A8", "%A9", "%AA", "%AB", "%AC", "%AD", "%AE", "%AF", - "%B0", "%B1", "%B2", "%B3", "%B4", "%B5", "%B6", "%B7", - "%B8", "%B9", "%BA", "%BB", "%BC", "%BD", "%BE", "%BF", - "%C0", "%C1", "%C2", "%C3", "%C4", "%C5", "%C6", "%C7", - "%C8", "%C9", "%CA", "%CB", "%CC", "%CD", "%CE", "%CF", - "%D0", "%D1", "%D2", "%D3", "%D4", "%D5", "%D6", "%D7", - "%D8", "%D9", "%DA", "%DB", "%DC", "%DD", "%DE", "%DF", - "%E0", "%E1", "%E2", "%E3", "%E4", "%E5", "%E6", "%E7", - "%E8", "%E9", "%EA", "%EB", "%EC", "%ED", "%EE", "%EF", - "%F0", "%F1", "%F2", "%F3", "%F4", "%F5", "%F6", "%F7", - "%F8", "%F9", "%FA", "%FB", "%FC", "%FD", "%FE", "%FF", -]; - - -pub static USERNAME: [&'static str; 256] = [ - "%00", "%01", "%02", "%03", "%04", "%05", "%06", "%07", - "%08", "%09", "%0A", "%0B", "%0C", "%0D", "%0E", "%0F", - "%10", "%11", "%12", "%13", "%14", "%15", "%16", "%17", - "%18", "%19", "%1A", "%1B", "%1C", "%1D", "%1E", "%1F", - "%20", "!", "%22", "%23", "$", "%", "&", "'", - "(", ")", "*", "+", ",", "-", ".", "%2F", - "0", "1", "2", "3", "4", "5", "6", "7", - "8", "9", "%3A", ";", "%3C", "=", "%3E", "%3F", - "%40", "A", "B", "C", "D", "E", "F", "G", - "H", "I", "J", "K", "L", "M", "N", "O", - "P", "Q", "R", "S", "T", "U", "V", "W", - "X", "Y", "Z", "[", "%5C", "]", "^", "_", - "%60", "a", "b", "c", "d", "e", "f", "g", - "h", "i", "j", "k", "l", "m", "n", "o", - "p", "q", "r", "s", "t", "u", "v", "w", - "x", "y", "z", "%7B", "|", "%7D", "~", "%7F", - "%80", "%81", "%82", "%83", "%84", "%85", "%86", "%87", - "%88", "%89", "%8A", "%8B", "%8C", "%8D", "%8E", "%8F", - "%90", "%91", "%92", "%93", "%94", "%95", "%96", "%97", - "%98", "%99", "%9A", "%9B", "%9C", "%9D", "%9E", "%9F", - "%A0", "%A1", "%A2", "%A3", "%A4", "%A5", "%A6", "%A7", - "%A8", "%A9", "%AA", "%AB", "%AC", "%AD", "%AE", "%AF", - "%B0", "%B1", "%B2", "%B3", "%B4", "%B5", "%B6", "%B7", - "%B8", "%B9", "%BA", "%BB", "%BC", "%BD", "%BE", "%BF", - "%C0", "%C1", "%C2", "%C3", "%C4", "%C5", "%C6", "%C7", - "%C8", "%C9", "%CA", "%CB", "%CC", "%CD", "%CE", "%CF", - "%D0", "%D1", "%D2", "%D3", "%D4", "%D5", "%D6", "%D7", - "%D8", "%D9", "%DA", "%DB", "%DC", "%DD", "%DE", "%DF", - "%E0", "%E1", "%E2", "%E3", "%E4", "%E5", "%E6", "%E7", - "%E8", "%E9", "%EA", "%EB", "%EC", "%ED", "%EE", "%EF", - "%F0", "%F1", "%F2", "%F3", "%F4", "%F5", "%F6", "%F7", - "%F8", "%F9", "%FA", "%FB", "%FC", "%FD", "%FE", "%FF", -]; - - -pub static FORM_URLENCODED: [&'static str; 256] = [ - "%00", "%01", "%02", "%03", "%04", "%05", "%06", "%07", - "%08", "%09", "%0A", "%0B", "%0C", "%0D", "%0E", "%0F", - "%10", "%11", "%12", "%13", "%14", "%15", "%16", "%17", - "%18", "%19", "%1A", "%1B", "%1C", "%1D", "%1E", "%1F", - "%20", "%21", "%22", "%23", "%24", "%25", "%26", "%27", - "%28", "%29", "*", "%2B", "%2C", "-", ".", "%2F", - "0", "1", "2", "3", "4", "5", "6", "7", - "8", "9", "%3A", "%3B", "%3C", "%3D", "%3E", "%3F", - "%40", "A", "B", "C", "D", "E", "F", "G", - "H", "I", "J", "K", "L", "M", "N", "O", - "P", "Q", "R", "S", "T", "U", "V", "W", - "X", "Y", "Z", "%5B", "%5C", "%5D", "%5E", "_", - "%60", "a", "b", "c", "d", "e", "f", "g", - "h", "i", "j", "k", "l", "m", "n", "o", - "p", "q", "r", "s", "t", "u", "v", "w", - "x", "y", "z", "%7B", "%7C", "%7D", "%7E", "%7F", - "%80", "%81", "%82", "%83", "%84", "%85", "%86", "%87", - "%88", "%89", "%8A", "%8B", "%8C", "%8D", "%8E", "%8F", - "%90", "%91", "%92", "%93", "%94", "%95", "%96", "%97", - "%98", "%99", "%9A", "%9B", "%9C", "%9D", "%9E", "%9F", - "%A0", "%A1", "%A2", "%A3", "%A4", "%A5", "%A6", "%A7", - "%A8", "%A9", "%AA", "%AB", "%AC", "%AD", "%AE", "%AF", - "%B0", "%B1", "%B2", "%B3", "%B4", "%B5", "%B6", "%B7", - "%B8", "%B9", "%BA", "%BB", "%BC", "%BD", "%BE", "%BF", - "%C0", "%C1", "%C2", "%C3", "%C4", "%C5", "%C6", "%C7", - "%C8", "%C9", "%CA", "%CB", "%CC", "%CD", "%CE", "%CF", - "%D0", "%D1", "%D2", "%D3", "%D4", "%D5", "%D6", "%D7", - "%D8", "%D9", "%DA", "%DB", "%DC", "%DD", "%DE", "%DF", - "%E0", "%E1", "%E2", "%E3", "%E4", "%E5", "%E6", "%E7", - "%E8", "%E9", "%EA", "%EB", "%EC", "%ED", "%EE", "%EF", - "%F0", "%F1", "%F2", "%F3", "%F4", "%F5", "%F6", "%F7", - "%F8", "%F9", "%FA", "%FB", "%FC", "%FD", "%FE", "%FF", -]; - - -pub static HTTP_VALUE: [&'static str; 256] = [ - "%00", "%01", "%02", "%03", "%04", "%05", "%06", "%07", - "%08", "%09", "%0A", "%0B", "%0C", "%0D", "%0E", "%0F", - "%10", "%11", "%12", "%13", "%14", "%15", "%16", "%17", - "%18", "%19", "%1A", "%1B", "%1C", "%1D", "%1E", "%1F", - "%20", "!", "%22", "#", "$", "%25", "&", "%27", - "%28", "%29", "%2A", "+", "%2C", "%2D", ".", "%2F", - "0", "1", "2", "3", "4", "5", "6", "7", - "8", "9", "%3A", "%3B", "%3C", "=", "%3E", "%3F", - "@", "A", "B", "C", "D", "E", "F", "G", - "H", "I", "J", "K", "L", "M", "N", "O", - "P", "Q", "R", "S", "T", "U", "V", "W", - "X", "Y", "Z", "%5B", "%5C", "%5D", "^", "_", - "`", "a", "b", "c", "d", "e", "f", "g", - "h", "i", "j", "k", "l", "m", "n", "o", - "p", "q", "r", "s", "t", "u", "v", "w", - "x", "y", "z", "%7B", "|", "%7D", "~", "%7F", - "%80", "%81", "%82", "%83", "%84", "%85", "%86", "%87", - "%88", "%89", "%8A", "%8B", "%8C", "%8D", "%8E", "%8F", - "%90", "%91", "%92", "%93", "%94", "%95", "%96", "%97", - "%98", "%99", "%9A", "%9B", "%9C", "%9D", "%9E", "%9F", - "%A0", "%A1", "%A2", "%A3", "%A4", "%A5", "%A6", "%A7", - "%A8", "%A9", "%AA", "%AB", "%AC", "%AD", "%AE", "%AF", - "%B0", "%B1", "%B2", "%B3", "%B4", "%B5", "%B6", "%B7", - "%B8", "%B9", "%BA", "%BB", "%BC", "%BD", "%BE", "%BF", - "%C0", "%C1", "%C2", "%C3", "%C4", "%C5", "%C6", "%C7", - "%C8", "%C9", "%CA", "%CB", "%CC", "%CD", "%CE", "%CF", - "%D0", "%D1", "%D2", "%D3", "%D4", "%D5", "%D6", "%D7", - "%D8", "%D9", "%DA", "%DB", "%DC", "%DD", "%DE", "%DF", - "%E0", "%E1", "%E2", "%E3", "%E4", "%E5", "%E6", "%E7", - "%E8", "%E9", "%EA", "%EB", "%EC", "%ED", "%EE", "%EF", - "%F0", "%F1", "%F2", "%F3", "%F4", "%F5", "%F6", "%F7", - "%F8", "%F9", "%FA", "%FB", "%FC", "%FD", "%FE", "%FF", -]; - - diff --git a/deps/url-0.5.5/src/encoding.rs b/deps/url-0.5.5/src/encoding.rs deleted file mode 100644 index 5cdd71d3e..000000000 --- a/deps/url-0.5.5/src/encoding.rs +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright 2013-2014 Simon Sapin. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - - -//! Abstraction that conditionally compiles either to rust-encoding, -//! or to only support UTF-8. - -#[cfg(feature = "query_encoding")] extern crate encoding; - -use std::borrow::Cow; - -#[cfg(feature = "query_encoding")] use self::encoding::types::{DecoderTrap, EncoderTrap}; -#[cfg(feature = "query_encoding")] use self::encoding::label::encoding_from_whatwg_label; -#[cfg(feature = "query_encoding")] pub use self::encoding::types::EncodingRef; - -#[cfg(feature = "query_encoding")] -#[derive(Copy, Clone)] -pub struct EncodingOverride { - /// `None` means UTF-8. - encoding: Option<EncodingRef> -} - -#[cfg(feature = "query_encoding")] -impl EncodingOverride { - pub fn from_opt_encoding(encoding: Option<EncodingRef>) -> EncodingOverride { - encoding.map(EncodingOverride::from_encoding).unwrap_or_else(EncodingOverride::utf8) - } - - pub fn from_encoding(encoding: EncodingRef) -> EncodingOverride { - EncodingOverride { - encoding: if encoding.name() == "utf-8" { None } else { Some(encoding) } - } - } - - pub fn utf8() -> EncodingOverride { - EncodingOverride { encoding: None } - } - - pub fn lookup(label: &[u8]) -> Option<EncodingOverride> { - ::std::str::from_utf8(label) - .ok() - .and_then(encoding_from_whatwg_label) - .map(EncodingOverride::from_encoding) - } - - pub fn is_utf8(&self) -> bool { - self.encoding.is_none() - } - - pub fn decode(&self, input: &[u8]) -> String { - match self.encoding { - Some(encoding) => encoding.decode(input, DecoderTrap::Replace).unwrap(), - None => String::from_utf8_lossy(input).to_string(), - } - } - - pub fn encode<'a>(&self, input: &'a str) -> Cow<'a, [u8]> { - match self.encoding { - Some(encoding) => Cow::Owned( - encoding.encode(input, EncoderTrap::NcrEscape).unwrap()), - None => Cow::Borrowed(input.as_bytes()), // UTF-8 - } - } -} - - -#[cfg(not(feature = "query_encoding"))] -#[derive(Copy, Clone)] -pub struct EncodingOverride; - -#[cfg(not(feature = "query_encoding"))] -impl EncodingOverride { - pub fn utf8() -> EncodingOverride { - EncodingOverride - } - - pub fn lookup(_label: &[u8]) -> Option<EncodingOverride> { - None - } - - pub fn is_utf8(&self) -> bool { - true - } - - pub fn decode(&self, input: &[u8]) -> String { - String::from_utf8_lossy(input).into_owned() - } - - pub fn encode<'a>(&self, input: &'a str) -> Cow<'a, [u8]> { - Cow::Borrowed(input.as_bytes()) - } -} diff --git a/deps/url-0.5.5/src/form_urlencoded.rs b/deps/url-0.5.5/src/form_urlencoded.rs deleted file mode 100644 index 9af1cc347..000000000 --- a/deps/url-0.5.5/src/form_urlencoded.rs +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright 2013-2015 Simon Sapin. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -//! Parser and serializer for the [`application/x-www-form-urlencoded` format]( -//! http://url.spec.whatwg.org/#application/x-www-form-urlencoded), -//! as used by HTML forms. -//! -//! Converts between a string (such as an URL’s query string) -//! and a sequence of (name, value) pairs. - -use std::borrow::Borrow; -use std::ascii::AsciiExt; -use encoding::EncodingOverride; -use percent_encoding::{percent_encode_to, percent_decode, FORM_URLENCODED_ENCODE_SET}; - - -/// Convert a byte string in the `application/x-www-form-urlencoded` format -/// into a vector of (name, value) pairs. -/// -/// Use `parse(input.as_bytes())` to parse a `&str` string. -/// -/// The names and values are URL-decoded. For instance, `%23first=%25try%25` will be -/// converted to `[("#first", "%try%")]`. -#[inline] -pub fn parse(input: &[u8]) -> Vec<(String, String)> { - parse_internal(input, EncodingOverride::utf8(), false).unwrap() -} - - -/// Convert a byte string in the `application/x-www-form-urlencoded` format -/// into a vector of (name, value) pairs. -/// -/// Use `parse(input.as_bytes())` to parse a `&str` string. -/// -/// This function is only available if the `query_encoding` Cargo feature is enabled. -/// -/// Arguments: -/// -/// * `encoding_override`: The character encoding each name and values is decoded as -/// after percent-decoding. Defaults to UTF-8. -/// * `use_charset`: The *use _charset_ flag*. If in doubt, set to `false`. -#[cfg(feature = "query_encoding")] -#[inline] -pub fn parse_with_encoding(input: &[u8], encoding_override: Option<::encoding::EncodingRef>, - use_charset: bool) - -> Option<Vec<(String, String)>> { - parse_internal(input, EncodingOverride::from_opt_encoding(encoding_override), use_charset) -} - - -fn parse_internal(input: &[u8], mut encoding_override: EncodingOverride, mut use_charset: bool) - -> Option<Vec<(String, String)>> { - let mut pairs = Vec::new(); - for piece in input.split(|&b| b == b'&') { - if !piece.is_empty() { - let (name, value) = match piece.iter().position(|b| *b == b'=') { - Some(position) => (&piece[..position], &piece[position + 1..]), - None => (piece, &[][..]) - }; - - #[inline] - fn replace_plus(input: &[u8]) -> Vec<u8> { - input.iter().map(|&b| if b == b'+' { b' ' } else { b }).collect() - } - - let name = replace_plus(name); - let value = replace_plus(value); - if use_charset && name == b"_charset_" { - if let Some(encoding) = EncodingOverride::lookup(&value) { - encoding_override = encoding; - } - use_charset = false; - } - pairs.push((name, value)); - } - } - if !(encoding_override.is_utf8() || input.is_ascii()) { - return None - } - - Some(pairs.into_iter().map(|(name, value)| ( - encoding_override.decode(&percent_decode(&name)), - encoding_override.decode(&percent_decode(&value)) - )).collect()) -} - - -/// Convert an iterator of (name, value) pairs -/// into a string in the `application/x-www-form-urlencoded` format. -#[inline] -pub fn serialize<I, K, V>(pairs: I) -> String -where I: IntoIterator, I::Item: Borrow<(K, V)>, K: AsRef<str>, V: AsRef<str> { - serialize_internal(pairs, EncodingOverride::utf8()) -} - -/// Convert an iterator of (name, value) pairs -/// into a string in the `application/x-www-form-urlencoded` format. -/// -/// This function is only available if the `query_encoding` Cargo feature is enabled. -/// -/// Arguments: -/// -/// * `encoding_override`: The character encoding each name and values is encoded as -/// before percent-encoding. Defaults to UTF-8. -#[cfg(feature = "query_encoding")] -#[inline] -pub fn serialize_with_encoding<I, K, V>(pairs: I, - encoding_override: Option<::encoding::EncodingRef>) - -> String -where I: IntoIterator, I::Item: Borrow<(K, V)>, K: AsRef<str>, V: AsRef<str> { - serialize_internal(pairs, EncodingOverride::from_opt_encoding(encoding_override)) -} - -fn serialize_internal<I, K, V>(pairs: I, encoding_override: EncodingOverride) -> String -where I: IntoIterator, I::Item: Borrow<(K, V)>, K: AsRef<str>, V: AsRef<str> { - #[inline] - fn byte_serialize(input: &str, output: &mut String, - encoding_override: EncodingOverride) { - for &byte in encoding_override.encode(input).iter() { - if byte == b' ' { - output.push_str("+") - } else { - percent_encode_to(&[byte], FORM_URLENCODED_ENCODE_SET, output) - } - } - } - - let mut output = String::new(); - for pair in pairs { - let &(ref name, ref value) = pair.borrow(); - if !output.is_empty() { - output.push_str("&"); - } - byte_serialize(name.as_ref(), &mut output, encoding_override); - output.push_str("="); - byte_serialize(value.as_ref(), &mut output, encoding_override); - } - output -} diff --git a/deps/url-0.5.5/src/format.rs b/deps/url-0.5.5/src/format.rs deleted file mode 100644 index ad6560561..000000000 --- a/deps/url-0.5.5/src/format.rs +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright 2013-2015 Simon Sapin. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -//! Formatting utilities for URLs. -//! -//! These formatters can be used to coerce various URL parts into strings. -//! -//! You can use `<formatter>.to_string()`, as the formatters implement `fmt::Display`. - -use std::fmt::{self, Formatter}; -use super::Url; - -/// Formatter and serializer for URL path data. -pub struct PathFormatter<'a, T:'a> { - /// The path as a slice of string-like objects (String or &str). - pub path: &'a [T] -} - -impl<'a, T: fmt::Display> fmt::Display for PathFormatter<'a, T> { - fn fmt(&self, formatter: &mut Formatter) -> fmt::Result { - if self.path.is_empty() { - formatter.write_str("/") - } else { - for path_part in self.path { - try!("/".fmt(formatter)); - try!(path_part.fmt(formatter)); - } - Ok(()) - } - } -} - - -/// Formatter and serializer for URL username and password data. -pub struct UserInfoFormatter<'a> { - /// URL username as a string slice. - pub username: &'a str, - - /// URL password as an optional string slice. - /// - /// You can convert an `Option<String>` with `.as_ref().map(|s| s)`. - pub password: Option<&'a str> -} - -impl<'a> fmt::Display for UserInfoFormatter<'a> { - fn fmt(&self, formatter: &mut Formatter) -> fmt::Result { - if !self.username.is_empty() || self.password.is_some() { - try!(formatter.write_str(self.username)); - if let Some(password) = self.password { - try!(formatter.write_str(":")); - try!(formatter.write_str(password)); - } - try!(formatter.write_str("@")); - } - Ok(()) - } -} - - -/// Formatter for URLs which ignores the fragment field. -pub struct UrlNoFragmentFormatter<'a> { - pub url: &'a Url -} - -impl<'a> fmt::Display for UrlNoFragmentFormatter<'a> { - fn fmt(&self, formatter: &mut Formatter) -> fmt::Result { - try!(formatter.write_str(&self.url.scheme)); - try!(formatter.write_str(":")); - try!(self.url.scheme_data.fmt(formatter)); - if let Some(ref query) = self.url.query { - try!(formatter.write_str("?")); - try!(formatter.write_str(query)); - } - Ok(()) - } -} diff --git a/deps/url-0.5.5/src/host.rs b/deps/url-0.5.5/src/host.rs deleted file mode 100644 index 06ac78181..000000000 --- a/deps/url-0.5.5/src/host.rs +++ /dev/null @@ -1,323 +0,0 @@ -// Copyright 2013-2014 Simon Sapin. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -use std::ascii::AsciiExt; -use std::cmp; -use std::fmt::{self, Formatter}; -use std::net::{Ipv4Addr, Ipv6Addr}; -use parser::{ParseResult, ParseError}; -use percent_encoding::{from_hex, percent_decode}; -use idna; - - -/// The host name of an URL. -#[derive(PartialEq, Eq, Clone, Debug, Hash, PartialOrd, Ord)] -#[cfg_attr(feature="heap_size", derive(HeapSizeOf))] -pub enum Host { - /// A (DNS) domain name. - Domain(String), - /// A IPv4 address, represented by four sequences of up to three ASCII digits. - Ipv4(Ipv4Addr), - /// An IPv6 address, represented inside `[...]` square brackets - /// so that `:` colon characters in the address are not ambiguous - /// with the port number delimiter. - Ipv6(Ipv6Addr), -} - - -impl Host { - /// Parse a host: either an IPv6 address in [] square brackets, or a domain. - /// - /// Returns `Err` for an empty host, an invalid IPv6 address, - /// or a or invalid non-ASCII domain. - pub fn parse(input: &str) -> ParseResult<Host> { - if input.len() == 0 { - return Err(ParseError::EmptyHost) - } - if input.starts_with("[") { - if !input.ends_with("]") { - return Err(ParseError::InvalidIpv6Address) - } - return parse_ipv6addr(&input[1..input.len() - 1]).map(Host::Ipv6) - } - let decoded = percent_decode(input.as_bytes()); - let domain = String::from_utf8_lossy(&decoded); - - let domain = match idna::domain_to_ascii(&domain) { - Ok(s) => s, - Err(_) => return Err(ParseError::InvalidDomainCharacter) - }; - - if domain.find(&[ - '\0', '\t', '\n', '\r', ' ', '#', '%', '/', ':', '?', '@', '[', '\\', ']' - ][..]).is_some() { - return Err(ParseError::InvalidDomainCharacter) - } - match parse_ipv4addr(&domain[..]) { - Ok(Some(ipv4addr)) => Ok(Host::Ipv4(ipv4addr)), - Ok(None) => Ok(Host::Domain(domain.to_ascii_lowercase())), - Err(e) => Err(e), - } - } - - /// Serialize the host as a string. - /// - /// A domain a returned as-is, an IPv6 address between [] square brackets. - pub fn serialize(&self) -> String { - self.to_string() - } -} - - -impl fmt::Display for Host { - fn fmt(&self, f: &mut Formatter) -> fmt::Result { - match *self { - Host::Domain(ref domain) => domain.fmt(f), - Host::Ipv4(ref addr) => addr.fmt(f), - Host::Ipv6(ref addr) => { - try!(f.write_str("[")); - try!(write_ipv6(addr, f)); - f.write_str("]") - } - } - } -} - -fn write_ipv6(addr: &Ipv6Addr, f: &mut Formatter) -> fmt::Result { - let segments = addr.segments(); - let (compress_start, compress_end) = longest_zero_sequence(&segments); - let mut i = 0; - while i < 8 { - if i == compress_start { - try!(f.write_str(":")); - if i == 0 { - try!(f.write_str(":")); - } - if compress_end < 8 { - i = compress_end; - } else { - break; - } - } - try!(write!(f, "{:x}", segments[i as usize])); - if i < 7 { - try!(f.write_str(":")); - } - i += 1; - } - Ok(()) -} - -fn longest_zero_sequence(pieces: &[u16; 8]) -> (isize, isize) { - let mut longest = -1; - let mut longest_length = -1; - let mut start = -1; - macro_rules! finish_sequence( - ($end: expr) => { - if start >= 0 { - let length = $end - start; - if length > longest_length { - longest = start; - longest_length = length; - } - } - }; - ); - for i in 0..8 { - if pieces[i as usize] == 0 { - if start < 0 { - start = i; - } - } else { - finish_sequence!(i); - start = -1; - } - } - finish_sequence!(8); - (longest, longest + longest_length) -} - - -fn parse_ipv4number(mut input: &str) -> ParseResult<u32> { - let mut r = 10; - if input.starts_with("0x") || input.starts_with("0X") { - input = &input[2..]; - r = 16; - } else if input.len() >= 2 && input.starts_with("0") { - input = &input[1..]; - r = 8; - } - if input.is_empty() { - return Ok(0); - } - if input.starts_with("+") { - return Err(ParseError::InvalidIpv4Address) - } - match u32::from_str_radix(&input, r) { - Ok(number) => Ok(number), - Err(_) => Err(ParseError::InvalidIpv4Address), - } -} - -fn parse_ipv4addr(input: &str) -> ParseResult<Option<Ipv4Addr>> { - let mut parts: Vec<&str> = input.split('.').collect(); - if parts.last() == Some(&"") { - parts.pop(); - } - if parts.len() > 4 { - return Ok(None); - } - let mut numbers: Vec<u32> = Vec::new(); - for part in parts { - if part == "" { - return Ok(None); - } - if let Ok(n) = parse_ipv4number(part) { - numbers.push(n); - } else { - return Ok(None); - } - } - let mut ipv4 = numbers.pop().expect("a non-empty list of numbers"); - // Equivalent to: ipv4 >= 256 ** (4 − numbers.len()) - if ipv4 > u32::max_value() >> (8 * numbers.len() as u32) { - return Err(ParseError::InvalidIpv4Address); - } - if numbers.iter().any(|x| *x > 255) { - return Err(ParseError::InvalidIpv4Address); - } - for (counter, n) in numbers.iter().enumerate() { - ipv4 += n << (8 * (3 - counter as u32)) - } - Ok(Some(Ipv4Addr::from(ipv4))) -} - - -fn parse_ipv6addr(input: &str) -> ParseResult<Ipv6Addr> { - let input = input.as_bytes(); - let len = input.len(); - let mut is_ip_v4 = false; - let mut pieces = [0, 0, 0, 0, 0, 0, 0, 0]; - let mut piece_pointer = 0; - let mut compress_pointer = None; - let mut i = 0; - - if len < 2 { - return Err(ParseError::InvalidIpv6Address) - } - - if input[0] == b':' { - if input[1] != b':' { - return Err(ParseError::InvalidIpv6Address) - } - i = 2; - piece_pointer = 1; - compress_pointer = Some(1); - } - - while i < len { - if piece_pointer == 8 { - return Err(ParseError::InvalidIpv6Address) - } - if input[i] == b':' { - if compress_pointer.is_some() { - return Err(ParseError::InvalidIpv6Address) - } - i += 1; - piece_pointer += 1; - compress_pointer = Some(piece_pointer); - continue - } - let start = i; - let end = cmp::min(len, start + 4); - let mut value = 0u16; - while i < end { - match from_hex(input[i]) { - Some(digit) => { - value = value * 0x10 + digit as u16; - i += 1; - }, - None => break - } - } - if i < len { - match input[i] { - b'.' => { - if i == start { - return Err(ParseError::InvalidIpv6Address) - } - i = start; - is_ip_v4 = true; - }, - b':' => { - i += 1; - if i == len { - return Err(ParseError::InvalidIpv6Address) - } - }, - _ => return Err(ParseError::InvalidIpv6Address) - } - } - if is_ip_v4 { - break - } - pieces[piece_pointer] = value; - piece_pointer += 1; - } - - if is_ip_v4 { - if piece_pointer > 6 { - return Err(ParseError::InvalidIpv6Address) - } - let mut dots_seen = 0; - while i < len { - // FIXME: https://github.com/whatwg/url/commit/1c22aa119c354e0020117e02571cec53f7c01064 - let mut value = 0u16; - while i < len { - let digit = match input[i] { - c @ b'0' ... b'9' => c - b'0', - _ => break - }; - value = value * 10 + digit as u16; - if value == 0 || value > 255 { - return Err(ParseError::InvalidIpv6Address) - } - } - if dots_seen < 3 && !(i < len && input[i] == b'.') { - return Err(ParseError::InvalidIpv6Address) - } - pieces[piece_pointer] = pieces[piece_pointer] * 0x100 + value; - if dots_seen == 0 || dots_seen == 2 { - piece_pointer += 1; - } - i += 1; - if dots_seen == 3 && i < len { - return Err(ParseError::InvalidIpv6Address) - } - dots_seen += 1; - } - } - - match compress_pointer { - Some(compress_pointer) => { - let mut swaps = piece_pointer - compress_pointer; - piece_pointer = 7; - while swaps > 0 { - pieces[piece_pointer] = pieces[compress_pointer + swaps - 1]; - pieces[compress_pointer + swaps - 1] = 0; - swaps -= 1; - piece_pointer -= 1; - } - } - _ => if piece_pointer != 8 { - return Err(ParseError::InvalidIpv6Address) - } - } - Ok(Ipv6Addr::new(pieces[0], pieces[1], pieces[2], pieces[3], - pieces[4], pieces[5], pieces[6], pieces[7])) -} diff --git a/deps/url-0.5.5/src/idna.rs b/deps/url-0.5.5/src/idna.rs deleted file mode 100644 index 9fe95d18b..000000000 --- a/deps/url-0.5.5/src/idna.rs +++ /dev/null @@ -1,299 +0,0 @@ -//! International domain names -//! -//! https://url.spec.whatwg.org/#idna - -use idna_mapping::TABLE; -use punycode; -use std::ascii::AsciiExt; -use unicode_normalization::UnicodeNormalization; -use unicode_normalization::char::is_combining_mark; -use unicode_bidi::{BidiClass, bidi_class}; - -#[derive(Debug)] -pub enum Mapping { - Valid, - Ignored, - Mapped(&'static str), - Deviation(&'static str), - Disallowed, - DisallowedStd3Valid, - DisallowedStd3Mapped(&'static str), -} - -pub struct Range { - pub from: char, - pub to: char, - pub mapping: Mapping, -} - -fn find_char(codepoint: char) -> &'static Mapping { - let mut min = 0; - let mut max = TABLE.len() - 1; - while max > min { - let mid = (min + max) >> 1; - if codepoint > TABLE[mid].to { - min = mid; - } else if codepoint < TABLE[mid].from { - max = mid; - } else { - min = mid; - max = mid; - } - } - &TABLE[min].mapping -} - -fn map_char(codepoint: char, flags: Uts46Flags, output: &mut String) -> Result<(), Error> { - match *find_char(codepoint) { - Mapping::Valid => output.push(codepoint), - Mapping::Ignored => {}, - Mapping::Mapped(mapping) => output.push_str(mapping), - Mapping::Deviation(mapping) => { - if flags.transitional_processing { - output.push_str(mapping) - } else { - output.push(codepoint) - } - } - Mapping::Disallowed => return Err(Error::DissallowedCharacter), - Mapping::DisallowedStd3Valid => { - if flags.use_std3_ascii_rules { - return Err(Error::DissallowedByStd3AsciiRules); - } else { - output.push(codepoint) - } - } - Mapping::DisallowedStd3Mapped(mapping) => { - if flags.use_std3_ascii_rules { - return Err(Error::DissallowedMappedInStd3); - } else { - output.push_str(mapping) - } - } - } - Ok(()) -} - -// http://tools.ietf.org/html/rfc5893#section-2 -fn passes_bidi(label: &str, transitional_processing: bool) -> bool { - let mut chars = label.chars(); - let class = match chars.next() { - Some(c) => bidi_class(c), - None => return true, // empty string - }; - - if class == BidiClass::L - || (class == BidiClass::ON && transitional_processing) // starts with \u200D - || (class == BidiClass::ES && transitional_processing) // hack: 1.35.+33.49 - || class == BidiClass::EN // hack: starts with number 0à.\u05D0 - { // LTR - // Rule 5 - loop { - match chars.next() { - Some(c) => { - let c = bidi_class(c); - if !matches!(c, BidiClass::L | BidiClass::EN | - BidiClass::ES | BidiClass::CS | - BidiClass::ET | BidiClass::ON | - BidiClass::BN | BidiClass::NSM) { - return false; - } - }, - None => { break; }, - } - } - - // Rule 6 - let mut rev_chars = label.chars().rev(); - let mut last = rev_chars.next(); - loop { // must end in L or EN followed by 0 or more NSM - match last { - Some(c) if bidi_class(c) == BidiClass::NSM => { - last = rev_chars.next(); - continue; - } - _ => { break; }, - } - } - - // TODO: does not pass for àˇ.\u05D0 - // match last { - // Some(c) if bidi_class(c) == BidiClass::L - // || bidi_class(c) == BidiClass::EN => {}, - // Some(c) => { return false; }, - // _ => {} - // } - - } else if class == BidiClass::R || class == BidiClass::AL { // RTL - let mut found_en = false; - let mut found_an = false; - - // Rule 2 - loop { - match chars.next() { - Some(c) => { - let char_class = bidi_class(c); - - if char_class == BidiClass::EN { - found_en = true; - } - if char_class == BidiClass::AN { - found_an = true; - } - - if !matches!(char_class, BidiClass::R | BidiClass::AL | - BidiClass::AN | BidiClass::EN | - BidiClass::ES | BidiClass::CS | - BidiClass::ET | BidiClass::ON | - BidiClass::BN | BidiClass::NSM) { - return false; - } - }, - None => { break; }, - } - } - // Rule 3 - let mut rev_chars = label.chars().rev(); - let mut last = rev_chars.next(); - loop { // must end in L or EN followed by 0 or more NSM - match last { - Some(c) if bidi_class(c) == BidiClass::NSM => { - last = rev_chars.next(); - continue; - } - _ => { break; }, - } - } - match last { - Some(c) if matches!(bidi_class(c), BidiClass::R | BidiClass::AL | - BidiClass::EN | BidiClass::AN) => {}, - _ => { return false; } - } - - // Rule 4 - if found_an && found_en { - return false; - } - } else { - // Rule 2: Should start with L or R/AL - return false; - } - - return true; -} - -/// http://www.unicode.org/reports/tr46/#Validity_Criteria -fn validate(label: &str, flags: Uts46Flags) -> Result<(), Error> { - if label.nfc().ne(label.chars()) { - return Err(Error::ValidityCriteria); - } - - // Can not contain '.' since the input is from .split('.') - if { - let mut chars = label.chars().skip(2); - let third = chars.next(); - let fourth = chars.next(); - (third, fourth) == (Some('-'), Some('-')) - } || label.starts_with("-") - || label.ends_with("-") - || label.chars().next().map_or(false, is_combining_mark) - || label.chars().any(|c| match *find_char(c) { - Mapping::Valid => false, - Mapping::Deviation(_) => flags.transitional_processing, - Mapping::DisallowedStd3Valid => flags.use_std3_ascii_rules, - _ => true, - }) - || !passes_bidi(label, flags.transitional_processing) - { - Err(Error::ValidityCriteria) - } else { - Ok(()) - } -} - -/// http://www.unicode.org/reports/tr46/#Processing -fn uts46_processing(domain: &str, flags: Uts46Flags) -> Result<String, Error> { - let mut mapped = String::new(); - for c in domain.chars() { - try!(map_char(c, flags, &mut mapped)) - } - let normalized: String = mapped.nfc().collect(); - let mut validated = String::new(); - for label in normalized.split('.') { - if validated.len() > 0 { - validated.push('.'); - } - if label.starts_with("xn--") { - match punycode::decode_to_string(&label["xn--".len()..]) { - Some(label) => { - try!(validate(&label, Uts46Flags { - transitional_processing: false, - ..flags - })); - validated.push_str(&label) - } - None => return Err(Error::PunycodeError), - } - } else { - try!(validate(label, flags)); - validated.push_str(label) - } - } - Ok(validated) -} - -#[derive(Copy, Clone)] -pub struct Uts46Flags { - pub use_std3_ascii_rules: bool, - pub transitional_processing: bool, - pub verify_dns_length: bool, -} - -#[derive(PartialEq, Eq, Clone, Copy, Debug)] -pub enum Error { - PunycodeError, - ValidityCriteria, - DissallowedByStd3AsciiRules, - DissallowedMappedInStd3, - DissallowedCharacter, - TooLongForDns, -} - -/// http://www.unicode.org/reports/tr46/#ToASCII -pub fn uts46_to_ascii(domain: &str, flags: Uts46Flags) -> Result<String, Error> { - let mut result = String::new(); - for label in try!(uts46_processing(domain, flags)).split('.') { - if result.len() > 0 { - result.push('.'); - } - if label.is_ascii() { - result.push_str(label); - } else { - match punycode::encode_str(label) { - Some(x) => { - result.push_str("xn--"); - result.push_str(&x); - }, - None => return Err(Error::PunycodeError) - } - } - } - - if flags.verify_dns_length { - let domain = if result.ends_with(".") { &result[..result.len()-1] } else { &*result }; - if domain.len() < 1 || domain.len() > 253 || - domain.split('.').any(|label| label.len() < 1 || label.len() > 63) { - return Err(Error::TooLongForDns) - } - } - Ok(result) -} - -/// https://url.spec.whatwg.org/#concept-domain-to-ascii -pub fn domain_to_ascii(domain: &str) -> Result<String, Error> { - uts46_to_ascii(domain, Uts46Flags { - use_std3_ascii_rules: false, - transitional_processing: true, // XXX: switch when Firefox does - verify_dns_length: false, - }) -} diff --git a/deps/url-0.5.5/src/idna_mapping.rs b/deps/url-0.5.5/src/idna_mapping.rs deleted file mode 100644 index 45d613268..000000000 --- a/deps/url-0.5.5/src/idna_mapping.rs +++ /dev/null @@ -1,8194 +0,0 @@ -// Copyright 2013-2014 Valentin Gosu. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -// Generated by make_idna_table.py - -use idna::Mapping::*; -use idna::Range; - -pub static TABLE: &'static [Range] = &[ - - Range { from: '\0', to: ',', mapping: DisallowedStd3Valid }, - Range { from: '-', to: '.', mapping: Valid }, - Range { from: '/', to: '/', mapping: DisallowedStd3Valid }, - Range { from: '0', to: '9', mapping: Valid }, - Range { from: ':', to: '@', mapping: DisallowedStd3Valid }, - Range { from: 'A', to: 'A', mapping: Mapped("a") }, - Range { from: 'B', to: 'B', mapping: Mapped("b") }, - Range { from: 'C', to: 'C', mapping: Mapped("c") }, - Range { from: 'D', to: 'D', mapping: Mapped("d") }, - Range { from: 'E', to: 'E', mapping: Mapped("e") }, - Range { from: 'F', to: 'F', mapping: Mapped("f") }, - Range { from: 'G', to: 'G', mapping: Mapped("g") }, - Range { from: 'H', to: 'H', mapping: Mapped("h") }, - Range { from: 'I', to: 'I', mapping: Mapped("i") }, - Range { from: 'J', to: 'J', mapping: Mapped("j") }, - Range { from: 'K', to: 'K', mapping: Mapped("k") }, - Range { from: 'L', to: 'L', mapping: Mapped("l") }, - Range { from: 'M', to: 'M', mapping: Mapped("m") }, - Range { from: 'N', to: 'N', mapping: Mapped("n") }, - Range { from: 'O', to: 'O', mapping: Mapped("o") }, - Range { from: 'P', to: 'P', mapping: Mapped("p") }, - Range { from: 'Q', to: 'Q', mapping: Mapped("q") }, - Range { from: 'R', to: 'R', mapping: Mapped("r") }, - Range { from: 'S', to: 'S', mapping: Mapped("s") }, - Range { from: 'T', to: 'T', mapping: Mapped("t") }, - Range { from: 'U', to: 'U', mapping: Mapped("u") }, - Range { from: 'V', to: 'V', mapping: Mapped("v") }, - Range { from: 'W', to: 'W', mapping: Mapped("w") }, - Range { from: 'X', to: 'X', mapping: Mapped("x") }, - Range { from: 'Y', to: 'Y', mapping: Mapped("y") }, - Range { from: 'Z', to: 'Z', mapping: Mapped("z") }, - Range { from: '[', to: '`', mapping: DisallowedStd3Valid }, - Range { from: 'a', to: 'z', mapping: Valid }, - Range { from: '{', to: '', mapping: DisallowedStd3Valid }, - Range { from: '€', to: 'Ÿ', mapping: Disallowed }, - Range { from: ' ', to: ' ', mapping: DisallowedStd3Mapped(" ") }, - Range { from: '¡', to: '§', mapping: Valid }, - Range { from: '¨', to: '¨', mapping: DisallowedStd3Mapped(" ̈") }, - Range { from: '©', to: '©', mapping: Valid }, - Range { from: 'ª', to: 'ª', mapping: Mapped("a") }, - Range { from: '«', to: '¬', mapping: Valid }, - Range { from: '­', to: '­', mapping: Ignored }, - Range { from: '®', to: '®', mapping: Valid }, - Range { from: '¯', to: '¯', mapping: DisallowedStd3Mapped(" ̄") }, - Range { from: '°', to: '±', mapping: Valid }, - Range { from: '²', to: '²', mapping: Mapped("2") }, - Range { from: '³', to: '³', mapping: Mapped("3") }, - Range { from: '´', to: '´', mapping: DisallowedStd3Mapped(" ́") }, - Range { from: 'µ', to: 'µ', mapping: Mapped("μ") }, - Range { from: '¶', to: '¶', mapping: Valid }, - Range { from: '·', to: '·', mapping: Valid }, - Range { from: '¸', to: '¸', mapping: DisallowedStd3Mapped(" ̧") }, - Range { from: '¹', to: '¹', mapping: Mapped("1") }, - Range { from: 'º', to: 'º', mapping: Mapped("o") }, - Range { from: '»', to: '»', mapping: Valid }, - Range { from: '¼', to: '¼', mapping: Mapped("1⁄4") }, - Range { from: '½', to: '½', mapping: Mapped("1⁄2") }, - Range { from: '¾', to: '¾', mapping: Mapped("3⁄4") }, - Range { from: '¿', to: '¿', mapping: Valid }, - Range { from: 'À', to: 'À', mapping: Mapped("à") }, - Range { from: 'Á', to: 'Á', mapping: Mapped("á") }, - Range { from: 'Â', to: 'Â', mapping: Mapped("â") }, - Range { from: 'Ã', to: 'Ã', mapping: Mapped("ã") }, - Range { from: 'Ä', to: 'Ä', mapping: Mapped("ä") }, - Range { from: 'Å', to: 'Å', mapping: Mapped("å") }, - Range { from: 'Æ', to: 'Æ', mapping: Mapped("æ") }, - Range { from: 'Ç', to: 'Ç', mapping: Mapped("ç") }, - Range { from: 'È', to: 'È', mapping: Mapped("è") }, - Range { from: 'É', to: 'É', mapping: Mapped("é") }, - Range { from: 'Ê', to: 'Ê', mapping: Mapped("ê") }, - Range { from: 'Ë', to: 'Ë', mapping: Mapped("ë") }, - Range { from: 'Ì', to: 'Ì', mapping: Mapped("ì") }, - Range { from: 'Í', to: 'Í', mapping: Mapped("í") }, - Range { from: 'Î', to: 'Î', mapping: Mapped("î") }, - Range { from: 'Ï', to: 'Ï', mapping: Mapped("ï") }, - Range { from: 'Ð', to: 'Ð', mapping: Mapped("ð") }, - Range { from: 'Ñ', to: 'Ñ', mapping: Mapped("ñ") }, - Range { from: 'Ò', to: 'Ò', mapping: Mapped("ò") }, - Range { from: 'Ó', to: 'Ó', mapping: Mapped("ó") }, - Range { from: 'Ô', to: 'Ô', mapping: Mapped("ô") }, - Range { from: 'Õ', to: 'Õ', mapping: Mapped("õ") }, - Range { from: 'Ö', to: 'Ö', mapping: Mapped("ö") }, - Range { from: '×', to: '×', mapping: Valid }, - Range { from: 'Ø', to: 'Ø', mapping: Mapped("ø") }, - Range { from: 'Ù', to: 'Ù', mapping: Mapped("ù") }, - Range { from: 'Ú', to: 'Ú', mapping: Mapped("ú") }, - Range { from: 'Û', to: 'Û', mapping: Mapped("û") }, - Range { from: 'Ü', to: 'Ü', mapping: Mapped("ü") }, - Range { from: 'Ý', to: 'Ý', mapping: Mapped("ý") }, - Range { from: 'Þ', to: 'Þ', mapping: Mapped("þ") }, - Range { from: 'ß', to: 'ß', mapping: Deviation("ss") }, - Range { from: 'à', to: 'ö', mapping: Valid }, - Range { from: '÷', to: '÷', mapping: Valid }, - Range { from: 'ø', to: 'ÿ', mapping: Valid }, - Range { from: 'Ā', to: 'Ā', mapping: Mapped("ā") }, - Range { from: 'ā', to: 'ā', mapping: Valid }, - Range { from: 'Ă', to: 'Ă', mapping: Mapped("ă") }, - Range { from: 'ă', to: 'ă', mapping: Valid }, - Range { from: 'Ą', to: 'Ą', mapping: Mapped("ą") }, - Range { from: 'ą', to: 'ą', mapping: Valid }, - Range { from: 'Ć', to: 'Ć', mapping: Mapped("ć") }, - Range { from: 'ć', to: 'ć', mapping: Valid }, - Range { from: 'Ĉ', to: 'Ĉ', mapping: Mapped("ĉ") }, - Range { from: 'ĉ', to: 'ĉ', mapping: Valid }, - Range { from: 'Ċ', to: 'Ċ', mapping: Mapped("ċ") }, - Range { from: 'ċ', to: 'ċ', mapping: Valid }, - Range { from: 'Č', to: 'Č', mapping: Mapped("č") }, - Range { from: 'č', to: 'č', mapping: Valid }, - Range { from: 'Ď', to: 'Ď', mapping: Mapped("ď") }, - Range { from: 'ď', to: 'ď', mapping: Valid }, - Range { from: 'Đ', to: 'Đ', mapping: Mapped("đ") }, - Range { from: 'đ', to: 'đ', mapping: Valid }, - Range { from: 'Ē', to: 'Ē', mapping: Mapped("ē") }, - Range { from: 'ē', to: 'ē', mapping: Valid }, - Range { from: 'Ĕ', to: 'Ĕ', mapping: Mapped("ĕ") }, - Range { from: 'ĕ', to: 'ĕ', mapping: Valid }, - Range { from: 'Ė', to: 'Ė', mapping: Mapped("ė") }, - Range { from: 'ė', to: 'ė', mapping: Valid }, - Range { from: 'Ę', to: 'Ę', mapping: Mapped("ę") }, - Range { from: 'ę', to: 'ę', mapping: Valid }, - Range { from: 'Ě', to: 'Ě', mapping: Mapped("ě") }, - Range { from: 'ě', to: 'ě', mapping: Valid }, - Range { from: 'Ĝ', to: 'Ĝ', mapping: Mapped("ĝ") }, - Range { from: 'ĝ', to: 'ĝ', mapping: Valid }, - Range { from: 'Ğ', to: 'Ğ', mapping: Mapped("ğ") }, - Range { from: 'ğ', to: 'ğ', mapping: Valid }, - Range { from: 'Ġ', to: 'Ġ', mapping: Mapped("ġ") }, - Range { from: 'ġ', to: 'ġ', mapping: Valid }, - Range { from: 'Ģ', to: 'Ģ', mapping: Mapped("ģ") }, - Range { from: 'ģ', to: 'ģ', mapping: Valid }, - Range { from: 'Ĥ', to: 'Ĥ', mapping: Mapped("ĥ") }, - Range { from: 'ĥ', to: 'ĥ', mapping: Valid }, - Range { from: 'Ħ', to: 'Ħ', mapping: Mapped("ħ") }, - Range { from: 'ħ', to: 'ħ', mapping: Valid }, - Range { from: 'Ĩ', to: 'Ĩ', mapping: Mapped("ĩ") }, - Range { from: 'ĩ', to: 'ĩ', mapping: Valid }, - Range { from: 'Ī', to: 'Ī', mapping: Mapped("ī") }, - Range { from: 'ī', to: 'ī', mapping: Valid }, - Range { from: 'Ĭ', to: 'Ĭ', mapping: Mapped("ĭ") }, - Range { from: 'ĭ', to: 'ĭ', mapping: Valid }, - Range { from: 'Į', to: 'Į', mapping: Mapped("į") }, - Range { from: 'į', to: 'į', mapping: Valid }, - Range { from: 'İ', to: 'İ', mapping: Mapped("i̇") }, - Range { from: 'ı', to: 'ı', mapping: Valid }, - Range { from: 'IJ', to: 'ij', mapping: Mapped("ij") }, - Range { from: 'Ĵ', to: 'Ĵ', mapping: Mapped("ĵ") }, - Range { from: 'ĵ', to: 'ĵ', mapping: Valid }, - Range { from: 'Ķ', to: 'Ķ', mapping: Mapped("ķ") }, - Range { from: 'ķ', to: 'ĸ', mapping: Valid }, - Range { from: 'Ĺ', to: 'Ĺ', mapping: Mapped("ĺ") }, - Range { from: 'ĺ', to: 'ĺ', mapping: Valid }, - Range { from: 'Ļ', to: 'Ļ', mapping: Mapped("ļ") }, - Range { from: 'ļ', to: 'ļ', mapping: Valid }, - Range { from: 'Ľ', to: 'Ľ', mapping: Mapped("ľ") }, - Range { from: 'ľ', to: 'ľ', mapping: Valid }, - Range { from: 'Ŀ', to: 'ŀ', mapping: Mapped("l·") }, - Range { from: 'Ł', to: 'Ł', mapping: Mapped("ł") }, - Range { from: 'ł', to: 'ł', mapping: Valid }, - Range { from: 'Ń', to: 'Ń', mapping: Mapped("ń") }, - Range { from: 'ń', to: 'ń', mapping: Valid }, - Range { from: 'Ņ', to: 'Ņ', mapping: Mapped("ņ") }, - Range { from: 'ņ', to: 'ņ', mapping: Valid }, - Range { from: 'Ň', to: 'Ň', mapping: Mapped("ň") }, - Range { from: 'ň', to: 'ň', mapping: Valid }, - Range { from: 'ʼn', to: 'ʼn', mapping: Mapped("ʼn") }, - Range { from: 'Ŋ', to: 'Ŋ', mapping: Mapped("ŋ") }, - Range { from: 'ŋ', to: 'ŋ', mapping: Valid }, - Range { from: 'Ō', to: 'Ō', mapping: Mapped("ō") }, - Range { from: 'ō', to: 'ō', mapping: Valid }, - Range { from: 'Ŏ', to: 'Ŏ', mapping: Mapped("ŏ") }, - Range { from: 'ŏ', to: 'ŏ', mapping: Valid }, - Range { from: 'Ő', to: 'Ő', mapping: Mapped("ő") }, - Range { from: 'ő', to: 'ő', mapping: Valid }, - Range { from: 'Œ', to: 'Œ', mapping: Mapped("œ") }, - Range { from: 'œ', to: 'œ', mapping: Valid }, - Range { from: 'Ŕ', to: 'Ŕ', mapping: Mapped("ŕ") }, - Range { from: 'ŕ', to: 'ŕ', mapping: Valid }, - Range { from: 'Ŗ', to: 'Ŗ', mapping: Mapped("ŗ") }, - Range { from: 'ŗ', to: 'ŗ', mapping: Valid }, - Range { from: 'Ř', to: 'Ř', mapping: Mapped("ř") }, - Range { from: 'ř', to: 'ř', mapping: Valid }, - Range { from: 'Ś', to: 'Ś', mapping: Mapped("ś") }, - Range { from: 'ś', to: 'ś', mapping: Valid }, - Range { from: 'Ŝ', to: 'Ŝ', mapping: Mapped("ŝ") }, - Range { from: 'ŝ', to: 'ŝ', mapping: Valid }, - Range { from: 'Ş', to: 'Ş', mapping: Mapped("ş") }, - Range { from: 'ş', to: 'ş', mapping: Valid }, - Range { from: 'Š', to: 'Š', mapping: Mapped("š") }, - Range { from: 'š', to: 'š', mapping: Valid }, - Range { from: 'Ţ', to: 'Ţ', mapping: Mapped("ţ") }, - Range { from: 'ţ', to: 'ţ', mapping: Valid }, - Range { from: 'Ť', to: 'Ť', mapping: Mapped("ť") }, - Range { from: 'ť', to: 'ť', mapping: Valid }, - Range { from: 'Ŧ', to: 'Ŧ', mapping: Mapped("ŧ") }, - Range { from: 'ŧ', to: 'ŧ', mapping: Valid }, - Range { from: 'Ũ', to: 'Ũ', mapping: Mapped("ũ") }, - Range { from: 'ũ', to: 'ũ', mapping: Valid }, - Range { from: 'Ū', to: 'Ū', mapping: Mapped("ū") }, - Range { from: 'ū', to: 'ū', mapping: Valid }, - Range { from: 'Ŭ', to: 'Ŭ', mapping: Mapped("ŭ") }, - Range { from: 'ŭ', to: 'ŭ', mapping: Valid }, - Range { from: 'Ů', to: 'Ů', mapping: Mapped("ů") }, - Range { from: 'ů', to: 'ů', mapping: Valid }, - Range { from: 'Ű', to: 'Ű', mapping: Mapped("ű") }, - Range { from: 'ű', to: 'ű', mapping: Valid }, - Range { from: 'Ų', to: 'Ų', mapping: Mapped("ų") }, - Range { from: 'ų', to: 'ų', mapping: Valid }, - Range { from: 'Ŵ', to: 'Ŵ', mapping: Mapped("ŵ") }, - Range { from: 'ŵ', to: 'ŵ', mapping: Valid }, - Range { from: 'Ŷ', to: 'Ŷ', mapping: Mapped("ŷ") }, - Range { from: 'ŷ', to: 'ŷ', mapping: Valid }, - Range { from: 'Ÿ', to: 'Ÿ', mapping: Mapped("ÿ") }, - Range { from: 'Ź', to: 'Ź', mapping: Mapped("ź") }, - Range { from: 'ź', to: 'ź', mapping: Valid }, - Range { from: 'Ż', to: 'Ż', mapping: Mapped("ż") }, - Range { from: 'ż', to: 'ż', mapping: Valid }, - Range { from: 'Ž', to: 'Ž', mapping: Mapped("ž") }, - Range { from: 'ž', to: 'ž', mapping: Valid }, - Range { from: 'ſ', to: 'ſ', mapping: Mapped("s") }, - Range { from: 'ƀ', to: 'ƀ', mapping: Valid }, - Range { from: 'Ɓ', to: 'Ɓ', mapping: Mapped("ɓ") }, - Range { from: 'Ƃ', to: 'Ƃ', mapping: Mapped("ƃ") }, - Range { from: 'ƃ', to: 'ƃ', mapping: Valid }, - Range { from: 'Ƅ', to: 'Ƅ', mapping: Mapped("ƅ") }, - Range { from: 'ƅ', to: 'ƅ', mapping: Valid }, - Range { from: 'Ɔ', to: 'Ɔ', mapping: Mapped("ɔ") }, - Range { from: 'Ƈ', to: 'Ƈ', mapping: Mapped("ƈ") }, - Range { from: 'ƈ', to: 'ƈ', mapping: Valid }, - Range { from: 'Ɖ', to: 'Ɖ', mapping: Mapped("ɖ") }, - Range { from: 'Ɗ', to: 'Ɗ', mapping: Mapped("ɗ") }, - Range { from: 'Ƌ', to: 'Ƌ', mapping: Mapped("ƌ") }, - Range { from: 'ƌ', to: 'ƍ', mapping: Valid }, - Range { from: 'Ǝ', to: 'Ǝ', mapping: Mapped("ǝ") }, - Range { from: 'Ə', to: 'Ə', mapping: Mapped("ə") }, - Range { from: 'Ɛ', to: 'Ɛ', mapping: Mapped("ɛ") }, - Range { from: 'Ƒ', to: 'Ƒ', mapping: Mapped("ƒ") }, - Range { from: 'ƒ', to: 'ƒ', mapping: Valid }, - Range { from: 'Ɠ', to: 'Ɠ', mapping: Mapped("ɠ") }, - Range { from: 'Ɣ', to: 'Ɣ', mapping: Mapped("ɣ") }, - Range { from: 'ƕ', to: 'ƕ', mapping: Valid }, - Range { from: 'Ɩ', to: 'Ɩ', mapping: Mapped("ɩ") }, - Range { from: 'Ɨ', to: 'Ɨ', mapping: Mapped("ɨ") }, - Range { from: 'Ƙ', to: 'Ƙ', mapping: Mapped("ƙ") }, - Range { from: 'ƙ', to: 'ƛ', mapping: Valid }, - Range { from: 'Ɯ', to: 'Ɯ', mapping: Mapped("ɯ") }, - Range { from: 'Ɲ', to: 'Ɲ', mapping: Mapped("ɲ") }, - Range { from: 'ƞ', to: 'ƞ', mapping: Valid }, - Range { from: 'Ɵ', to: 'Ɵ', mapping: Mapped("ɵ") }, - Range { from: 'Ơ', to: 'Ơ', mapping: Mapped("ơ") }, - Range { from: 'ơ', to: 'ơ', mapping: Valid }, - Range { from: 'Ƣ', to: 'Ƣ', mapping: Mapped("ƣ") }, - Range { from: 'ƣ', to: 'ƣ', mapping: Valid }, - Range { from: 'Ƥ', to: 'Ƥ', mapping: Mapped("ƥ") }, - Range { from: 'ƥ', to: 'ƥ', mapping: Valid }, - Range { from: 'Ʀ', to: 'Ʀ', mapping: Mapped("ʀ") }, - Range { from: 'Ƨ', to: 'Ƨ', mapping: Mapped("ƨ") }, - Range { from: 'ƨ', to: 'ƨ', mapping: Valid }, - Range { from: 'Ʃ', to: 'Ʃ', mapping: Mapped("ʃ") }, - Range { from: 'ƪ', to: 'ƫ', mapping: Valid }, - Range { from: 'Ƭ', to: 'Ƭ', mapping: Mapped("ƭ") }, - Range { from: 'ƭ', to: 'ƭ', mapping: Valid }, - Range { from: 'Ʈ', to: 'Ʈ', mapping: Mapped("ʈ") }, - Range { from: 'Ư', to: 'Ư', mapping: Mapped("ư") }, - Range { from: 'ư', to: 'ư', mapping: Valid }, - Range { from: 'Ʊ', to: 'Ʊ', mapping: Mapped("ʊ") }, - Range { from: 'Ʋ', to: 'Ʋ', mapping: Mapped("ʋ") }, - Range { from: 'Ƴ', to: 'Ƴ', mapping: Mapped("ƴ") }, - Range { from: 'ƴ', to: 'ƴ', mapping: Valid }, - Range { from: 'Ƶ', to: 'Ƶ', mapping: Mapped("ƶ") }, - Range { from: 'ƶ', to: 'ƶ', mapping: Valid }, - Range { from: 'Ʒ', to: 'Ʒ', mapping: Mapped("ʒ") }, - Range { from: 'Ƹ', to: 'Ƹ', mapping: Mapped("ƹ") }, - Range { from: 'ƹ', to: 'ƻ', mapping: Valid }, - Range { from: 'Ƽ', to: 'Ƽ', mapping: Mapped("ƽ") }, - Range { from: 'ƽ', to: 'ǃ', mapping: Valid }, - Range { from: 'DŽ', to: 'dž', mapping: Mapped("dž") }, - Range { from: 'LJ', to: 'lj', mapping: Mapped("lj") }, - Range { from: 'NJ', to: 'nj', mapping: Mapped("nj") }, - Range { from: 'Ǎ', to: 'Ǎ', mapping: Mapped("ǎ") }, - Range { from: 'ǎ', to: 'ǎ', mapping: Valid }, - Range { from: 'Ǐ', to: 'Ǐ', mapping: Mapped("ǐ") }, - Range { from: 'ǐ', to: 'ǐ', mapping: Valid }, - Range { from: 'Ǒ', to: 'Ǒ', mapping: Mapped("ǒ") }, - Range { from: 'ǒ', to: 'ǒ', mapping: Valid }, - Range { from: 'Ǔ', to: 'Ǔ', mapping: Mapped("ǔ") }, - Range { from: 'ǔ', to: 'ǔ', mapping: Valid }, - Range { from: 'Ǖ', to: 'Ǖ', mapping: Mapped("ǖ") }, - Range { from: 'ǖ', to: 'ǖ', mapping: Valid }, - Range { from: 'Ǘ', to: 'Ǘ', mapping: Mapped("ǘ") }, - Range { from: 'ǘ', to: 'ǘ', mapping: Valid }, - Range { from: 'Ǚ', to: 'Ǚ', mapping: Mapped("ǚ") }, - Range { from: 'ǚ', to: 'ǚ', mapping: Valid }, - Range { from: 'Ǜ', to: 'Ǜ', mapping: Mapped("ǜ") }, - Range { from: 'ǜ', to: 'ǝ', mapping: Valid }, - Range { from: 'Ǟ', to: 'Ǟ', mapping: Mapped("ǟ") }, - Range { from: 'ǟ', to: 'ǟ', mapping: Valid }, - Range { from: 'Ǡ', to: 'Ǡ', mapping: Mapped("ǡ") }, - Range { from: 'ǡ', to: 'ǡ', mapping: Valid }, - Range { from: 'Ǣ', to: 'Ǣ', mapping: Mapped("ǣ") }, - Range { from: 'ǣ', to: 'ǣ', mapping: Valid }, - Range { from: 'Ǥ', to: 'Ǥ', mapping: Mapped("ǥ") }, - Range { from: 'ǥ', to: 'ǥ', mapping: Valid }, - Range { from: 'Ǧ', to: 'Ǧ', mapping: Mapped("ǧ") }, - Range { from: 'ǧ', to: 'ǧ', mapping: Valid }, - Range { from: 'Ǩ', to: 'Ǩ', mapping: Mapped("ǩ") }, - Range { from: 'ǩ', to: 'ǩ', mapping: Valid }, - Range { from: 'Ǫ', to: 'Ǫ', mapping: Mapped("ǫ") }, - Range { from: 'ǫ', to: 'ǫ', mapping: Valid }, - Range { from: 'Ǭ', to: 'Ǭ', mapping: Mapped("ǭ") }, - Range { from: 'ǭ', to: 'ǭ', mapping: Valid }, - Range { from: 'Ǯ', to: 'Ǯ', mapping: Mapped("ǯ") }, - Range { from: 'ǯ', to: 'ǰ', mapping: Valid }, - Range { from: 'DZ', to: 'dz', mapping: Mapped("dz") }, - Range { from: 'Ǵ', to: 'Ǵ', mapping: Mapped("ǵ") }, - Range { from: 'ǵ', to: 'ǵ', mapping: Valid }, - Range { from: 'Ƕ', to: 'Ƕ', mapping: Mapped("ƕ") }, - Range { from: 'Ƿ', to: 'Ƿ', mapping: Mapped("ƿ") }, - Range { from: 'Ǹ', to: 'Ǹ', mapping: Mapped("ǹ") }, - Range { from: 'ǹ', to: 'ǹ', mapping: Valid }, - Range { from: 'Ǻ', to: 'Ǻ', mapping: Mapped("ǻ") }, - Range { from: 'ǻ', to: 'ǻ', mapping: Valid }, - Range { from: 'Ǽ', to: 'Ǽ', mapping: Mapped("ǽ") }, - Range { from: 'ǽ', to: 'ǽ', mapping: Valid }, - Range { from: 'Ǿ', to: 'Ǿ', mapping: Mapped("ǿ") }, - Range { from: 'ǿ', to: 'ǿ', mapping: Valid }, - Range { from: 'Ȁ', to: 'Ȁ', mapping: Mapped("ȁ") }, - Range { from: 'ȁ', to: 'ȁ', mapping: Valid }, - Range { from: 'Ȃ', to: 'Ȃ', mapping: Mapped("ȃ") }, - Range { from: 'ȃ', to: 'ȃ', mapping: Valid }, - Range { from: 'Ȅ', to: 'Ȅ', mapping: Mapped("ȅ") }, - Range { from: 'ȅ', to: 'ȅ', mapping: Valid }, - Range { from: 'Ȇ', to: 'Ȇ', mapping: Mapped("ȇ") }, - Range { from: 'ȇ', to: 'ȇ', mapping: Valid }, - Range { from: 'Ȉ', to: 'Ȉ', mapping: Mapped("ȉ") }, - Range { from: 'ȉ', to: 'ȉ', mapping: Valid }, - Range { from: 'Ȋ', to: 'Ȋ', mapping: Mapped("ȋ") }, - Range { from: 'ȋ', to: 'ȋ', mapping: Valid }, - Range { from: 'Ȍ', to: 'Ȍ', mapping: Mapped("ȍ") }, - Range { from: 'ȍ', to: 'ȍ', mapping: Valid }, - Range { from: 'Ȏ', to: 'Ȏ', mapping: Mapped("ȏ") }, - Range { from: 'ȏ', to: 'ȏ', mapping: Valid }, - Range { from: 'Ȑ', to: 'Ȑ', mapping: Mapped("ȑ") }, - Range { from: 'ȑ', to: 'ȑ', mapping: Valid }, - Range { from: 'Ȓ', to: 'Ȓ', mapping: Mapped("ȓ") }, - Range { from: 'ȓ', to: 'ȓ', mapping: Valid }, - Range { from: 'Ȕ', to: 'Ȕ', mapping: Mapped("ȕ") }, - Range { from: 'ȕ', to: 'ȕ', mapping: Valid }, - Range { from: 'Ȗ', to: 'Ȗ', mapping: Mapped("ȗ") }, - Range { from: 'ȗ', to: 'ȗ', mapping: Valid }, - Range { from: 'Ș', to: 'Ș', mapping: Mapped("ș") }, - Range { from: 'ș', to: 'ș', mapping: Valid }, - Range { from: 'Ț', to: 'Ț', mapping: Mapped("ț") }, - Range { from: 'ț', to: 'ț', mapping: Valid }, - Range { from: 'Ȝ', to: 'Ȝ', mapping: Mapped("ȝ") }, - Range { from: 'ȝ', to: 'ȝ', mapping: Valid }, - Range { from: 'Ȟ', to: 'Ȟ', mapping: Mapped("ȟ") }, - Range { from: 'ȟ', to: 'ȟ', mapping: Valid }, - Range { from: 'Ƞ', to: 'Ƞ', mapping: Mapped("ƞ") }, - Range { from: 'ȡ', to: 'ȡ', mapping: Valid }, - Range { from: 'Ȣ', to: 'Ȣ', mapping: Mapped("ȣ") }, - Range { from: 'ȣ', to: 'ȣ', mapping: Valid }, - Range { from: 'Ȥ', to: 'Ȥ', mapping: Mapped("ȥ") }, - Range { from: 'ȥ', to: 'ȥ', mapping: Valid }, - Range { from: 'Ȧ', to: 'Ȧ', mapping: Mapped("ȧ") }, - Range { from: 'ȧ', to: 'ȧ', mapping: Valid }, - Range { from: 'Ȩ', to: 'Ȩ', mapping: Mapped("ȩ") }, - Range { from: 'ȩ', to: 'ȩ', mapping: Valid }, - Range { from: 'Ȫ', to: 'Ȫ', mapping: Mapped("ȫ") }, - Range { from: 'ȫ', to: 'ȫ', mapping: Valid }, - Range { from: 'Ȭ', to: 'Ȭ', mapping: Mapped("ȭ") }, - Range { from: 'ȭ', to: 'ȭ', mapping: Valid }, - Range { from: 'Ȯ', to: 'Ȯ', mapping: Mapped("ȯ") }, - Range { from: 'ȯ', to: 'ȯ', mapping: Valid }, - Range { from: 'Ȱ', to: 'Ȱ', mapping: Mapped("ȱ") }, - Range { from: 'ȱ', to: 'ȱ', mapping: Valid }, - Range { from: 'Ȳ', to: 'Ȳ', mapping: Mapped("ȳ") }, - Range { from: 'ȳ', to: 'ȳ', mapping: Valid }, - Range { from: 'ȴ', to: 'ȶ', mapping: Valid }, - Range { from: 'ȷ', to: 'ȹ', mapping: Valid }, - Range { from: 'Ⱥ', to: 'Ⱥ', mapping: Mapped("ⱥ") }, - Range { from: 'Ȼ', to: 'Ȼ', mapping: Mapped("ȼ") }, - Range { from: 'ȼ', to: 'ȼ', mapping: Valid }, - Range { from: 'Ƚ', to: 'Ƚ', mapping: Mapped("ƚ") }, - Range { from: 'Ⱦ', to: 'Ⱦ', mapping: Mapped("ⱦ") }, - Range { from: 'ȿ', to: 'ɀ', mapping: Valid }, - Range { from: 'Ɂ', to: 'Ɂ', mapping: Mapped("ɂ") }, - Range { from: 'ɂ', to: 'ɂ', mapping: Valid }, - Range { from: 'Ƀ', to: 'Ƀ', mapping: Mapped("ƀ") }, - Range { from: 'Ʉ', to: 'Ʉ', mapping: Mapped("ʉ") }, - Range { from: 'Ʌ', to: 'Ʌ', mapping: Mapped("ʌ") }, - Range { from: 'Ɇ', to: 'Ɇ', mapping: Mapped("ɇ") }, - Range { from: 'ɇ', to: 'ɇ', mapping: Valid }, - Range { from: 'Ɉ', to: 'Ɉ', mapping: Mapped("ɉ") }, - Range { from: 'ɉ', to: 'ɉ', mapping: Valid }, - Range { from: 'Ɋ', to: 'Ɋ', mapping: Mapped("ɋ") }, - Range { from: 'ɋ', to: 'ɋ', mapping: Valid }, - Range { from: 'Ɍ', to: 'Ɍ', mapping: Mapped("ɍ") }, - Range { from: 'ɍ', to: 'ɍ', mapping: Valid }, - Range { from: 'Ɏ', to: 'Ɏ', mapping: Mapped("ɏ") }, - Range { from: 'ɏ', to: 'ɏ', mapping: Valid }, - Range { from: 'ɐ', to: 'ʨ', mapping: Valid }, - Range { from: 'ʩ', to: 'ʭ', mapping: Valid }, - Range { from: 'ʮ', to: 'ʯ', mapping: Valid }, - Range { from: 'ʰ', to: 'ʰ', mapping: Mapped("h") }, - Range { from: 'ʱ', to: 'ʱ', mapping: Mapped("ɦ") }, - Range { from: 'ʲ', to: 'ʲ', mapping: Mapped("j") }, - Range { from: 'ʳ', to: 'ʳ', mapping: Mapped("r") }, - Range { from: 'ʴ', to: 'ʴ', mapping: Mapped("ɹ") }, - Range { from: 'ʵ', to: 'ʵ', mapping: Mapped("ɻ") }, - Range { from: 'ʶ', to: 'ʶ', mapping: Mapped("ʁ") }, - Range { from: 'ʷ', to: 'ʷ', mapping: Mapped("w") }, - Range { from: 'ʸ', to: 'ʸ', mapping: Mapped("y") }, - Range { from: 'ʹ', to: 'ˁ', mapping: Valid }, - Range { from: '˂', to: '˅', mapping: Valid }, - Range { from: 'ˆ', to: 'ˑ', mapping: Valid }, - Range { from: '˒', to: '˗', mapping: Valid }, - Range { from: '˘', to: '˘', mapping: DisallowedStd3Mapped(" ̆") }, - Range { from: '˙', to: '˙', mapping: DisallowedStd3Mapped(" ̇") }, - Range { from: '˚', to: '˚', mapping: DisallowedStd3Mapped(" ̊") }, - Range { from: '˛', to: '˛', mapping: DisallowedStd3Mapped(" ̨") }, - Range { from: '˜', to: '˜', mapping: DisallowedStd3Mapped(" ̃") }, - Range { from: '˝', to: '˝', mapping: DisallowedStd3Mapped(" ̋") }, - Range { from: '˞', to: '˞', mapping: Valid }, - Range { from: '˟', to: '˟', mapping: Valid }, - Range { from: 'ˠ', to: 'ˠ', mapping: Mapped("ɣ") }, - Range { from: 'ˡ', to: 'ˡ', mapping: Mapped("l") }, - Range { from: 'ˢ', to: 'ˢ', mapping: Mapped("s") }, - Range { from: 'ˣ', to: 'ˣ', mapping: Mapped("x") }, - Range { from: 'ˤ', to: 'ˤ', mapping: Mapped("ʕ") }, - Range { from: '˥', to: '˩', mapping: Valid }, - Range { from: '˪', to: '˫', mapping: Valid }, - Range { from: 'ˬ', to: 'ˬ', mapping: Valid }, - Range { from: '˭', to: '˭', mapping: Valid }, - Range { from: 'ˮ', to: 'ˮ', mapping: Valid }, - Range { from: '˯', to: '˿', mapping: Valid }, - Range { from: '̀', to: '̿', mapping: Valid }, - Range { from: '̀', to: '̀', mapping: Mapped("̀") }, - Range { from: '́', to: '́', mapping: Mapped("́") }, - Range { from: '͂', to: '͂', mapping: Valid }, - Range { from: '̓', to: '̓', mapping: Mapped("̓") }, - Range { from: '̈́', to: '̈́', mapping: Mapped("̈́") }, - Range { from: 'ͅ', to: 'ͅ', mapping: Mapped("ι") }, - Range { from: '͆', to: '͎', mapping: Valid }, - Range { from: '͏', to: '͏', mapping: Ignored }, - Range { from: '͐', to: '͗', mapping: Valid }, - Range { from: '͘', to: '͜', mapping: Valid }, - Range { from: '͝', to: '͟', mapping: Valid }, - Range { from: '͠', to: '͡', mapping: Valid }, - Range { from: '͢', to: '͢', mapping: Valid }, - Range { from: 'ͣ', to: 'ͯ', mapping: Valid }, - Range { from: 'Ͱ', to: 'Ͱ', mapping: Mapped("ͱ") }, - Range { from: 'ͱ', to: 'ͱ', mapping: Valid }, - Range { from: 'Ͳ', to: 'Ͳ', mapping: Mapped("ͳ") }, - Range { from: 'ͳ', to: 'ͳ', mapping: Valid }, - Range { from: 'ʹ', to: 'ʹ', mapping: Mapped("ʹ") }, - Range { from: '͵', to: '͵', mapping: Valid }, - Range { from: 'Ͷ', to: 'Ͷ', mapping: Mapped("ͷ") }, - Range { from: 'ͷ', to: 'ͷ', mapping: Valid }, - Range { from: '͸', to: '͹', mapping: Disallowed }, - Range { from: 'ͺ', to: 'ͺ', mapping: DisallowedStd3Mapped(" ι") }, - Range { from: 'ͻ', to: 'ͽ', mapping: Valid }, - Range { from: ';', to: ';', mapping: DisallowedStd3Mapped(";") }, - Range { from: 'Ϳ', to: 'Ϳ', mapping: Mapped("ϳ") }, - Range { from: '΀', to: '΃', mapping: Disallowed }, - Range { from: '΄', to: '΄', mapping: DisallowedStd3Mapped(" ́") }, - Range { from: '΅', to: '΅', mapping: DisallowedStd3Mapped(" ̈́") }, - Range { from: 'Ά', to: 'Ά', mapping: Mapped("ά") }, - Range { from: '·', to: '·', mapping: Mapped("·") }, - Range { from: 'Έ', to: 'Έ', mapping: Mapped("έ") }, - Range { from: 'Ή', to: 'Ή', mapping: Mapped("ή") }, - Range { from: 'Ί', to: 'Ί', mapping: Mapped("ί") }, - Range { from: '΋', to: '΋', mapping: Disallowed }, - Range { from: 'Ό', to: 'Ό', mapping: Mapped("ό") }, - Range { from: '΍', to: '΍', mapping: Disallowed }, - Range { from: 'Ύ', to: 'Ύ', mapping: Mapped("ύ") }, - Range { from: 'Ώ', to: 'Ώ', mapping: Mapped("ώ") }, - Range { from: 'ΐ', to: 'ΐ', mapping: Valid }, - Range { from: 'Α', to: 'Α', mapping: Mapped("α") }, - Range { from: 'Β', to: 'Β', mapping: Mapped("β") }, - Range { from: 'Γ', to: 'Γ', mapping: Mapped("γ") }, - Range { from: 'Δ', to: 'Δ', mapping: Mapped("δ") }, - Range { from: 'Ε', to: 'Ε', mapping: Mapped("ε") }, - Range { from: 'Ζ', to: 'Ζ', mapping: Mapped("ζ") }, - Range { from: 'Η', to: 'Η', mapping: Mapped("η") }, - Range { from: 'Θ', to: 'Θ', mapping: Mapped("θ") }, - Range { from: 'Ι', to: 'Ι', mapping: Mapped("ι") }, - Range { from: 'Κ', to: 'Κ', mapping: Mapped("κ") }, - Range { from: 'Λ', to: 'Λ', mapping: Mapped("λ") }, - Range { from: 'Μ', to: 'Μ', mapping: Mapped("μ") }, - Range { from: 'Ν', to: 'Ν', mapping: Mapped("ν") }, - Range { from: 'Ξ', to: 'Ξ', mapping: Mapped("ξ") }, - Range { from: 'Ο', to: 'Ο', mapping: Mapped("ο") }, - Range { from: 'Π', to: 'Π', mapping: Mapped("π") }, - Range { from: 'Ρ', to: 'Ρ', mapping: Mapped("ρ") }, - Range { from: '΢', to: '΢', mapping: Disallowed }, - Range { from: 'Σ', to: 'Σ', mapping: Mapped("σ") }, - Range { from: 'Τ', to: 'Τ', mapping: Mapped("τ") }, - Range { from: 'Υ', to: 'Υ', mapping: Mapped("υ") }, - Range { from: 'Φ', to: 'Φ', mapping: Mapped("φ") }, - Range { from: 'Χ', to: 'Χ', mapping: Mapped("χ") }, - Range { from: 'Ψ', to: 'Ψ', mapping: Mapped("ψ") }, - Range { from: 'Ω', to: 'Ω', mapping: Mapped("ω") }, - Range { from: 'Ϊ', to: 'Ϊ', mapping: Mapped("ϊ") }, - Range { from: 'Ϋ', to: 'Ϋ', mapping: Mapped("ϋ") }, - Range { from: 'ά', to: 'ρ', mapping: Valid }, - Range { from: 'ς', to: 'ς', mapping: Deviation("σ") }, - Range { from: 'σ', to: 'ώ', mapping: Valid }, - Range { from: 'Ϗ', to: 'Ϗ', mapping: Mapped("ϗ") }, - Range { from: 'ϐ', to: 'ϐ', mapping: Mapped("β") }, - Range { from: 'ϑ', to: 'ϑ', mapping: Mapped("θ") }, - Range { from: 'ϒ', to: 'ϒ', mapping: Mapped("υ") }, - Range { from: 'ϓ', to: 'ϓ', mapping: Mapped("ύ") }, - Range { from: 'ϔ', to: 'ϔ', mapping: Mapped("ϋ") }, - Range { from: 'ϕ', to: 'ϕ', mapping: Mapped("φ") }, - Range { from: 'ϖ', to: 'ϖ', mapping: Mapped("π") }, - Range { from: 'ϗ', to: 'ϗ', mapping: Valid }, - Range { from: 'Ϙ', to: 'Ϙ', mapping: Mapped("ϙ") }, - Range { from: 'ϙ', to: 'ϙ', mapping: Valid }, - Range { from: 'Ϛ', to: 'Ϛ', mapping: Mapped("ϛ") }, - Range { from: 'ϛ', to: 'ϛ', mapping: Valid }, - Range { from: 'Ϝ', to: 'Ϝ', mapping: Mapped("ϝ") }, - Range { from: 'ϝ', to: 'ϝ', mapping: Valid }, - Range { from: 'Ϟ', to: 'Ϟ', mapping: Mapped("ϟ") }, - Range { from: 'ϟ', to: 'ϟ', mapping: Valid }, - Range { from: 'Ϡ', to: 'Ϡ', mapping: Mapped("ϡ") }, - Range { from: 'ϡ', to: 'ϡ', mapping: Valid }, - Range { from: 'Ϣ', to: 'Ϣ', mapping: Mapped("ϣ") }, - Range { from: 'ϣ', to: 'ϣ', mapping: Valid }, - Range { from: 'Ϥ', to: 'Ϥ', mapping: Mapped("ϥ") }, - Range { from: 'ϥ', to: 'ϥ', mapping: Valid }, - Range { from: 'Ϧ', to: 'Ϧ', mapping: Mapped("ϧ") }, - Range { from: 'ϧ', to: 'ϧ', mapping: Valid }, - Range { from: 'Ϩ', to: 'Ϩ', mapping: Mapped("ϩ") }, - Range { from: 'ϩ', to: 'ϩ', mapping: Valid }, - Range { from: 'Ϫ', to: 'Ϫ', mapping: Mapped("ϫ") }, - Range { from: 'ϫ', to: 'ϫ', mapping: Valid }, - Range { from: 'Ϭ', to: 'Ϭ', mapping: Mapped("ϭ") }, - Range { from: 'ϭ', to: 'ϭ', mapping: Valid }, - Range { from: 'Ϯ', to: 'Ϯ', mapping: Mapped("ϯ") }, - Range { from: 'ϯ', to: 'ϯ', mapping: Valid }, - Range { from: 'ϰ', to: 'ϰ', mapping: Mapped("κ") }, - Range { from: 'ϱ', to: 'ϱ', mapping: Mapped("ρ") }, - Range { from: 'ϲ', to: 'ϲ', mapping: Mapped("σ") }, - Range { from: 'ϳ', to: 'ϳ', mapping: Valid }, - Range { from: 'ϴ', to: 'ϴ', mapping: Mapped("θ") }, - Range { from: 'ϵ', to: 'ϵ', mapping: Mapped("ε") }, - Range { from: '϶', to: '϶', mapping: Valid }, - Range { from: 'Ϸ', to: 'Ϸ', mapping: Mapped("ϸ") }, - Range { from: 'ϸ', to: 'ϸ', mapping: Valid }, - Range { from: 'Ϲ', to: 'Ϲ', mapping: Mapped("σ") }, - Range { from: 'Ϻ', to: 'Ϻ', mapping: Mapped("ϻ") }, - Range { from: 'ϻ', to: 'ϻ', mapping: Valid }, - Range { from: 'ϼ', to: 'ϼ', mapping: Valid }, - Range { from: 'Ͻ', to: 'Ͻ', mapping: Mapped("ͻ") }, - Range { from: 'Ͼ', to: 'Ͼ', mapping: Mapped("ͼ") }, - Range { from: 'Ͽ', to: 'Ͽ', mapping: Mapped("ͽ") }, - Range { from: 'Ѐ', to: 'Ѐ', mapping: Mapped("ѐ") }, - Range { from: 'Ё', to: 'Ё', mapping: Mapped("ё") }, - Range { from: 'Ђ', to: 'Ђ', mapping: Mapped("ђ") }, - Range { from: 'Ѓ', to: 'Ѓ', mapping: Mapped("ѓ") }, - Range { from: 'Є', to: 'Є', mapping: Mapped("є") }, - Range { from: 'Ѕ', to: 'Ѕ', mapping: Mapped("ѕ") }, - Range { from: 'І', to: 'І', mapping: Mapped("і") }, - Range { from: 'Ї', to: 'Ї', mapping: Mapped("ї") }, - Range { from: 'Ј', to: 'Ј', mapping: Mapped("ј") }, - Range { from: 'Љ', to: 'Љ', mapping: Mapped("љ") }, - Range { from: 'Њ', to: 'Њ', mapping: Mapped("њ") }, - Range { from: 'Ћ', to: 'Ћ', mapping: Mapped("ћ") }, - Range { from: 'Ќ', to: 'Ќ', mapping: Mapped("ќ") }, - Range { from: 'Ѝ', to: 'Ѝ', mapping: Mapped("ѝ") }, - Range { from: 'Ў', to: 'Ў', mapping: Mapped("ў") }, - Range { from: 'Џ', to: 'Џ', mapping: Mapped("џ") }, - Range { from: 'А', to: 'А', mapping: Mapped("а") }, - Range { from: 'Б', to: 'Б', mapping: Mapped("б") }, - Range { from: 'В', to: 'В', mapping: Mapped("в") }, - Range { from: 'Г', to: 'Г', mapping: Mapped("г") }, - Range { from: 'Д', to: 'Д', mapping: Mapped("д") }, - Range { from: 'Е', to: 'Е', mapping: Mapped("е") }, - Range { from: 'Ж', to: 'Ж', mapping: Mapped("ж") }, - Range { from: 'З', to: 'З', mapping: Mapped("з") }, - Range { from: 'И', to: 'И', mapping: Mapped("и") }, - Range { from: 'Й', to: 'Й', mapping: Mapped("й") }, - Range { from: 'К', to: 'К', mapping: Mapped("к") }, - Range { from: 'Л', to: 'Л', mapping: Mapped("л") }, - Range { from: 'М', to: 'М', mapping: Mapped("м") }, - Range { from: 'Н', to: 'Н', mapping: Mapped("н") }, - Range { from: 'О', to: 'О', mapping: Mapped("о") }, - Range { from: 'П', to: 'П', mapping: Mapped("п") }, - Range { from: 'Р', to: 'Р', mapping: Mapped("р") }, - Range { from: 'С', to: 'С', mapping: Mapped("с") }, - Range { from: 'Т', to: 'Т', mapping: Mapped("т") }, - Range { from: 'У', to: 'У', mapping: Mapped("у") }, - Range { from: 'Ф', to: 'Ф', mapping: Mapped("ф") }, - Range { from: 'Х', to: 'Х', mapping: Mapped("х") }, - Range { from: 'Ц', to: 'Ц', mapping: Mapped("ц") }, - Range { from: 'Ч', to: 'Ч', mapping: Mapped("ч") }, - Range { from: 'Ш', to: 'Ш', mapping: Mapped("ш") }, - Range { from: 'Щ', to: 'Щ', mapping: Mapped("щ") }, - Range { from: 'Ъ', to: 'Ъ', mapping: Mapped("ъ") }, - Range { from: 'Ы', to: 'Ы', mapping: Mapped("ы") }, - Range { from: 'Ь', to: 'Ь', mapping: Mapped("ь") }, - Range { from: 'Э', to: 'Э', mapping: Mapped("э") }, - Range { from: 'Ю', to: 'Ю', mapping: Mapped("ю") }, - Range { from: 'Я', to: 'Я', mapping: Mapped("я") }, - Range { from: 'а', to: 'я', mapping: Valid }, - Range { from: 'ѐ', to: 'ѐ', mapping: Valid }, - Range { from: 'ё', to: 'ќ', mapping: Valid }, - Range { from: 'ѝ', to: 'ѝ', mapping: Valid }, - Range { from: 'ў', to: 'џ', mapping: Valid }, - Range { from: 'Ѡ', to: 'Ѡ', mapping: Mapped("ѡ") }, - Range { from: 'ѡ', to: 'ѡ', mapping: Valid }, - Range { from: 'Ѣ', to: 'Ѣ', mapping: Mapped("ѣ") }, - Range { from: 'ѣ', to: 'ѣ', mapping: Valid }, - Range { from: 'Ѥ', to: 'Ѥ', mapping: Mapped("ѥ") }, - Range { from: 'ѥ', to: 'ѥ', mapping: Valid }, - Range { from: 'Ѧ', to: 'Ѧ', mapping: Mapped("ѧ") }, - Range { from: 'ѧ', to: 'ѧ', mapping: Valid }, - Range { from: 'Ѩ', to: 'Ѩ', mapping: Mapped("ѩ") }, - Range { from: 'ѩ', to: 'ѩ', mapping: Valid }, - Range { from: 'Ѫ', to: 'Ѫ', mapping: Mapped("ѫ") }, - Range { from: 'ѫ', to: 'ѫ', mapping: Valid }, - Range { from: 'Ѭ', to: 'Ѭ', mapping: Mapped("ѭ") }, - Range { from: 'ѭ', to: 'ѭ', mapping: Valid }, - Range { from: 'Ѯ', to: 'Ѯ', mapping: Mapped("ѯ") }, - Range { from: 'ѯ', to: 'ѯ', mapping: Valid }, - Range { from: 'Ѱ', to: 'Ѱ', mapping: Mapped("ѱ") }, - Range { from: 'ѱ', to: 'ѱ', mapping: Valid }, - Range { from: 'Ѳ', to: 'Ѳ', mapping: Mapped("ѳ") }, - Range { from: 'ѳ', to: 'ѳ', mapping: Valid }, - Range { from: 'Ѵ', to: 'Ѵ', mapping: Mapped("ѵ") }, - Range { from: 'ѵ', to: 'ѵ', mapping: Valid }, - Range { from: 'Ѷ', to: 'Ѷ', mapping: Mapped("ѷ") }, - Range { from: 'ѷ', to: 'ѷ', mapping: Valid }, - Range { from: 'Ѹ', to: 'Ѹ', mapping: Mapped("ѹ") }, - Range { from: 'ѹ', to: 'ѹ', mapping: Valid }, - Range { from: 'Ѻ', to: 'Ѻ', mapping: Mapped("ѻ") }, - Range { from: 'ѻ', to: 'ѻ', mapping: Valid }, - Range { from: 'Ѽ', to: 'Ѽ', mapping: Mapped("ѽ") }, - Range { from: 'ѽ', to: 'ѽ', mapping: Valid }, - Range { from: 'Ѿ', to: 'Ѿ', mapping: Mapped("ѿ") }, - Range { from: 'ѿ', to: 'ѿ', mapping: Valid }, - Range { from: 'Ҁ', to: 'Ҁ', mapping: Mapped("ҁ") }, - Range { from: 'ҁ', to: 'ҁ', mapping: Valid }, - Range { from: '҂', to: '҂', mapping: Valid }, - Range { from: '҃', to: '҆', mapping: Valid }, - Range { from: '҇', to: '҇', mapping: Valid }, - Range { from: '҈', to: '҉', mapping: Valid }, - Range { from: 'Ҋ', to: 'Ҋ', mapping: Mapped("ҋ") }, - Range { from: 'ҋ', to: 'ҋ', mapping: Valid }, - Range { from: 'Ҍ', to: 'Ҍ', mapping: Mapped("ҍ") }, - Range { from: 'ҍ', to: 'ҍ', mapping: Valid }, - Range { from: 'Ҏ', to: 'Ҏ', mapping: Mapped("ҏ") }, - Range { from: 'ҏ', to: 'ҏ', mapping: Valid }, - Range { from: 'Ґ', to: 'Ґ', mapping: Mapped("ґ") }, - Range { from: 'ґ', to: 'ґ', mapping: Valid }, - Range { from: 'Ғ', to: 'Ғ', mapping: Mapped("ғ") }, - Range { from: 'ғ', to: 'ғ', mapping: Valid }, - Range { from: 'Ҕ', to: 'Ҕ', mapping: Mapped("ҕ") }, - Range { from: 'ҕ', to: 'ҕ', mapping: Valid }, - Range { from: 'Җ', to: 'Җ', mapping: Mapped("җ") }, - Range { from: 'җ', to: 'җ', mapping: Valid }, - Range { from: 'Ҙ', to: 'Ҙ', mapping: Mapped("ҙ") }, - Range { from: 'ҙ', to: 'ҙ', mapping: Valid }, - Range { from: 'Қ', to: 'Қ', mapping: Mapped("қ") }, - Range { from: 'қ', to: 'қ', mapping: Valid }, - Range { from: 'Ҝ', to: 'Ҝ', mapping: Mapped("ҝ") }, - Range { from: 'ҝ', to: 'ҝ', mapping: Valid }, - Range { from: 'Ҟ', to: 'Ҟ', mapping: Mapped("ҟ") }, - Range { from: 'ҟ', to: 'ҟ', mapping: Valid }, - Range { from: 'Ҡ', to: 'Ҡ', mapping: Mapped("ҡ") }, - Range { from: 'ҡ', to: 'ҡ', mapping: Valid }, - Range { from: 'Ң', to: 'Ң', mapping: Mapped("ң") }, - Range { from: 'ң', to: 'ң', mapping: Valid }, - Range { from: 'Ҥ', to: 'Ҥ', mapping: Mapped("ҥ") }, - Range { from: 'ҥ', to: 'ҥ', mapping: Valid }, - Range { from: 'Ҧ', to: 'Ҧ', mapping: Mapped("ҧ") }, - Range { from: 'ҧ', to: 'ҧ', mapping: Valid }, - Range { from: 'Ҩ', to: 'Ҩ', mapping: Mapped("ҩ") }, - Range { from: 'ҩ', to: 'ҩ', mapping: Valid }, - Range { from: 'Ҫ', to: 'Ҫ', mapping: Mapped("ҫ") }, - Range { from: 'ҫ', to: 'ҫ', mapping: Valid }, - Range { from: 'Ҭ', to: 'Ҭ', mapping: Mapped("ҭ") }, - Range { from: 'ҭ', to: 'ҭ', mapping: Valid }, - Range { from: 'Ү', to: 'Ү', mapping: Mapped("ү") }, - Range { from: 'ү', to: 'ү', mapping: Valid }, - Range { from: 'Ұ', to: 'Ұ', mapping: Mapped("ұ") }, - Range { from: 'ұ', to: 'ұ', mapping: Valid }, - Range { from: 'Ҳ', to: 'Ҳ', mapping: Mapped("ҳ") }, - Range { from: 'ҳ', to: 'ҳ', mapping: Valid }, - Range { from: 'Ҵ', to: 'Ҵ', mapping: Mapped("ҵ") }, - Range { from: 'ҵ', to: 'ҵ', mapping: Valid }, - Range { from: 'Ҷ', to: 'Ҷ', mapping: Mapped("ҷ") }, - Range { from: 'ҷ', to: 'ҷ', mapping: Valid }, - Range { from: 'Ҹ', to: 'Ҹ', mapping: Mapped("ҹ") }, - Range { from: 'ҹ', to: 'ҹ', mapping: Valid }, - Range { from: 'Һ', to: 'Һ', mapping: Mapped("һ") }, - Range { from: 'һ', to: 'һ', mapping: Valid }, - Range { from: 'Ҽ', to: 'Ҽ', mapping: Mapped("ҽ") }, - Range { from: 'ҽ', to: 'ҽ', mapping: Valid }, - Range { from: 'Ҿ', to: 'Ҿ', mapping: Mapped("ҿ") }, - Range { from: 'ҿ', to: 'ҿ', mapping: Valid }, - Range { from: 'Ӏ', to: 'Ӏ', mapping: Disallowed }, - Range { from: 'Ӂ', to: 'Ӂ', mapping: Mapped("ӂ") }, - Range { from: 'ӂ', to: 'ӂ', mapping: Valid }, - Range { from: 'Ӄ', to: 'Ӄ', mapping: Mapped("ӄ") }, - Range { from: 'ӄ', to: 'ӄ', mapping: Valid }, - Range { from: 'Ӆ', to: 'Ӆ', mapping: Mapped("ӆ") }, - Range { from: 'ӆ', to: 'ӆ', mapping: Valid }, - Range { from: 'Ӈ', to: 'Ӈ', mapping: Mapped("ӈ") }, - Range { from: 'ӈ', to: 'ӈ', mapping: Valid }, - Range { from: 'Ӊ', to: 'Ӊ', mapping: Mapped("ӊ") }, - Range { from: 'ӊ', to: 'ӊ', mapping: Valid }, - Range { from: 'Ӌ', to: 'Ӌ', mapping: Mapped("ӌ") }, - Range { from: 'ӌ', to: 'ӌ', mapping: Valid }, - Range { from: 'Ӎ', to: 'Ӎ', mapping: Mapped("ӎ") }, - Range { from: 'ӎ', to: 'ӎ', mapping: Valid }, - Range { from: 'ӏ', to: 'ӏ', mapping: Valid }, - Range { from: 'Ӑ', to: 'Ӑ', mapping: Mapped("ӑ") }, - Range { from: 'ӑ', to: 'ӑ', mapping: Valid }, - Range { from: 'Ӓ', to: 'Ӓ', mapping: Mapped("ӓ") }, - Range { from: 'ӓ', to: 'ӓ', mapping: Valid }, - Range { from: 'Ӕ', to: 'Ӕ', mapping: Mapped("ӕ") }, - Range { from: 'ӕ', to: 'ӕ', mapping: Valid }, - Range { from: 'Ӗ', to: 'Ӗ', mapping: Mapped("ӗ") }, - Range { from: 'ӗ', to: 'ӗ', mapping: Valid }, - Range { from: 'Ә', to: 'Ә', mapping: Mapped("ә") }, - Range { from: 'ә', to: 'ә', mapping: Valid }, - Range { from: 'Ӛ', to: 'Ӛ', mapping: Mapped("ӛ") }, - Range { from: 'ӛ', to: 'ӛ', mapping: Valid }, - Range { from: 'Ӝ', to: 'Ӝ', mapping: Mapped("ӝ") }, - Range { from: 'ӝ', to: 'ӝ', mapping: Valid }, - Range { from: 'Ӟ', to: 'Ӟ', mapping: Mapped("ӟ") }, - Range { from: 'ӟ', to: 'ӟ', mapping: Valid }, - Range { from: 'Ӡ', to: 'Ӡ', mapping: Mapped("ӡ") }, - Range { from: 'ӡ', to: 'ӡ', mapping: Valid }, - Range { from: 'Ӣ', to: 'Ӣ', mapping: Mapped("ӣ") }, - Range { from: 'ӣ', to: 'ӣ', mapping: Valid }, - Range { from: 'Ӥ', to: 'Ӥ', mapping: Mapped("ӥ") }, - Range { from: 'ӥ', to: 'ӥ', mapping: Valid }, - Range { from: 'Ӧ', to: 'Ӧ', mapping: Mapped("ӧ") }, - Range { from: 'ӧ', to: 'ӧ', mapping: Valid }, - Range { from: 'Ө', to: 'Ө', mapping: Mapped("ө") }, - Range { from: 'ө', to: 'ө', mapping: Valid }, - Range { from: 'Ӫ', to: 'Ӫ', mapping: Mapped("ӫ") }, - Range { from: 'ӫ', to: 'ӫ', mapping: Valid }, - Range { from: 'Ӭ', to: 'Ӭ', mapping: Mapped("ӭ") }, - Range { from: 'ӭ', to: 'ӭ', mapping: Valid }, - Range { from: 'Ӯ', to: 'Ӯ', mapping: Mapped("ӯ") }, - Range { from: 'ӯ', to: 'ӯ', mapping: Valid }, - Range { from: 'Ӱ', to: 'Ӱ', mapping: Mapped("ӱ") }, - Range { from: 'ӱ', to: 'ӱ', mapping: Valid }, - Range { from: 'Ӳ', to: 'Ӳ', mapping: Mapped("ӳ") }, - Range { from: 'ӳ', to: 'ӳ', mapping: Valid }, - Range { from: 'Ӵ', to: 'Ӵ', mapping: Mapped("ӵ") }, - Range { from: 'ӵ', to: 'ӵ', mapping: Valid }, - Range { from: 'Ӷ', to: 'Ӷ', mapping: Mapped("ӷ") }, - Range { from: 'ӷ', to: 'ӷ', mapping: Valid }, - Range { from: 'Ӹ', to: 'Ӹ', mapping: Mapped("ӹ") }, - Range { from: 'ӹ', to: 'ӹ', mapping: Valid }, - Range { from: 'Ӻ', to: 'Ӻ', mapping: Mapped("ӻ") }, - Range { from: 'ӻ', to: 'ӻ', mapping: Valid }, - Range { from: 'Ӽ', to: 'Ӽ', mapping: Mapped("ӽ") }, - Range { from: 'ӽ', to: 'ӽ', mapping: Valid }, - Range { from: 'Ӿ', to: 'Ӿ', mapping: Mapped("ӿ") }, - Range { from: 'ӿ', to: 'ӿ', mapping: Valid }, - Range { from: 'Ԁ', to: 'Ԁ', mapping: Mapped("ԁ") }, - Range { from: 'ԁ', to: 'ԁ', mapping: Valid }, - Range { from: 'Ԃ', to: 'Ԃ', mapping: Mapped("ԃ") }, - Range { from: 'ԃ', to: 'ԃ', mapping: Valid }, - Range { from: 'Ԅ', to: 'Ԅ', mapping: Mapped("ԅ") }, - Range { from: 'ԅ', to: 'ԅ', mapping: Valid }, - Range { from: 'Ԇ', to: 'Ԇ', mapping: Mapped("ԇ") }, - Range { from: 'ԇ', to: 'ԇ', mapping: Valid }, - Range { from: 'Ԉ', to: 'Ԉ', mapping: Mapped("ԉ") }, - Range { from: 'ԉ', to: 'ԉ', mapping: Valid }, - Range { from: 'Ԋ', to: 'Ԋ', mapping: Mapped("ԋ") }, - Range { from: 'ԋ', to: 'ԋ', mapping: Valid }, - Range { from: 'Ԍ', to: 'Ԍ', mapping: Mapped("ԍ") }, - Range { from: 'ԍ', to: 'ԍ', mapping: Valid }, - Range { from: 'Ԏ', to: 'Ԏ', mapping: Mapped("ԏ") }, - Range { from: 'ԏ', to: 'ԏ', mapping: Valid }, - Range { from: 'Ԑ', to: 'Ԑ', mapping: Mapped("ԑ") }, - Range { from: 'ԑ', to: 'ԑ', mapping: Valid }, - Range { from: 'Ԓ', to: 'Ԓ', mapping: Mapped("ԓ") }, - Range { from: 'ԓ', to: 'ԓ', mapping: Valid }, - Range { from: 'Ԕ', to: 'Ԕ', mapping: Mapped("ԕ") }, - Range { from: 'ԕ', to: 'ԕ', mapping: Valid }, - Range { from: 'Ԗ', to: 'Ԗ', mapping: Mapped("ԗ") }, - Range { from: 'ԗ', to: 'ԗ', mapping: Valid }, - Range { from: 'Ԙ', to: 'Ԙ', mapping: Mapped("ԙ") }, - Range { from: 'ԙ', to: 'ԙ', mapping: Valid }, - Range { from: 'Ԛ', to: 'Ԛ', mapping: Mapped("ԛ") }, - Range { from: 'ԛ', to: 'ԛ', mapping: Valid }, - Range { from: 'Ԝ', to: 'Ԝ', mapping: Mapped("ԝ") }, - Range { from: 'ԝ', to: 'ԝ', mapping: Valid }, - Range { from: 'Ԟ', to: 'Ԟ', mapping: Mapped("ԟ") }, - Range { from: 'ԟ', to: 'ԟ', mapping: Valid }, - Range { from: 'Ԡ', to: 'Ԡ', mapping: Mapped("ԡ") }, - Range { from: 'ԡ', to: 'ԡ', mapping: Valid }, - Range { from: 'Ԣ', to: 'Ԣ', mapping: Mapped("ԣ") }, - Range { from: 'ԣ', to: 'ԣ', mapping: Valid }, - Range { from: 'Ԥ', to: 'Ԥ', mapping: Mapped("ԥ") }, - Range { from: 'ԥ', to: 'ԥ', mapping: Valid }, - Range { from: 'Ԧ', to: 'Ԧ', mapping: Mapped("ԧ") }, - Range { from: 'ԧ', to: 'ԧ', mapping: Valid }, - Range { from: 'Ԩ', to: 'Ԩ', mapping: Mapped("ԩ") }, - Range { from: 'ԩ', to: 'ԩ', mapping: Valid }, - Range { from: 'Ԫ', to: 'Ԫ', mapping: Mapped("ԫ") }, - Range { from: 'ԫ', to: 'ԫ', mapping: Valid }, - Range { from: 'Ԭ', to: 'Ԭ', mapping: Mapped("ԭ") }, - Range { from: 'ԭ', to: 'ԭ', mapping: Valid }, - Range { from: 'Ԯ', to: 'Ԯ', mapping: Mapped("ԯ") }, - Range { from: 'ԯ', to: 'ԯ', mapping: Valid }, - Range { from: '԰', to: '԰', mapping: Disallowed }, - Range { from: 'Ա', to: 'Ա', mapping: Mapped("ա") }, - Range { from: 'Բ', to: 'Բ', mapping: Mapped("բ") }, - Range { from: 'Գ', to: 'Գ', mapping: Mapped("գ") }, - Range { from: 'Դ', to: 'Դ', mapping: Mapped("դ") }, - Range { from: 'Ե', to: 'Ե', mapping: Mapped("ե") }, - Range { from: 'Զ', to: 'Զ', mapping: Mapped("զ") }, - Range { from: 'Է', to: 'Է', mapping: Mapped("է") }, - Range { from: 'Ը', to: 'Ը', mapping: Mapped("ը") }, - Range { from: 'Թ', to: 'Թ', mapping: Mapped("թ") }, - Range { from: 'Ժ', to: 'Ժ', mapping: Mapped("ժ") }, - Range { from: 'Ի', to: 'Ի', mapping: Mapped("ի") }, - Range { from: 'Լ', to: 'Լ', mapping: Mapped("լ") }, - Range { from: 'Խ', to: 'Խ', mapping: Mapped("խ") }, - Range { from: 'Ծ', to: 'Ծ', mapping: Mapped("ծ") }, - Range { from: 'Կ', to: 'Կ', mapping: Mapped("կ") }, - Range { from: 'Հ', to: 'Հ', mapping: Mapped("հ") }, - Range { from: 'Ձ', to: 'Ձ', mapping: Mapped("ձ") }, - Range { from: 'Ղ', to: 'Ղ', mapping: Mapped("ղ") }, - Range { from: 'Ճ', to: 'Ճ', mapping: Mapped("ճ") }, - Range { from: 'Մ', to: 'Մ', mapping: Mapped("մ") }, - Range { from: 'Յ', to: 'Յ', mapping: Mapped("յ") }, - Range { from: 'Ն', to: 'Ն', mapping: Mapped("ն") }, - Range { from: 'Շ', to: 'Շ', mapping: Mapped("շ") }, - Range { from: 'Ո', to: 'Ո', mapping: Mapped("ո") }, - Range { from: 'Չ', to: 'Չ', mapping: Mapped("չ") }, - Range { from: 'Պ', to: 'Պ', mapping: Mapped("պ") }, - Range { from: 'Ջ', to: 'Ջ', mapping: Mapped("ջ") }, - Range { from: 'Ռ', to: 'Ռ', mapping: Mapped("ռ") }, - Range { from: 'Ս', to: 'Ս', mapping: Mapped("ս") }, - Range { from: 'Վ', to: 'Վ', mapping: Mapped("վ") }, - Range { from: 'Տ', to: 'Տ', mapping: Mapped("տ") }, - Range { from: 'Ր', to: 'Ր', mapping: Mapped("ր") }, - Range { from: 'Ց', to: 'Ց', mapping: Mapped("ց") }, - Range { from: 'Ւ', to: 'Ւ', mapping: Mapped("ւ") }, - Range { from: 'Փ', to: 'Փ', mapping: Mapped("փ") }, - Range { from: 'Ք', to: 'Ք', mapping: Mapped("ք") }, - Range { from: 'Օ', to: 'Օ', mapping: Mapped("օ") }, - Range { from: 'Ֆ', to: 'Ֆ', mapping: Mapped("ֆ") }, - Range { from: '՗', to: '՘', mapping: Disallowed }, - Range { from: 'ՙ', to: 'ՙ', mapping: Valid }, - Range { from: '՚', to: '՟', mapping: Valid }, - Range { from: 'ՠ', to: 'ՠ', mapping: Disallowed }, - Range { from: 'ա', to: 'ֆ', mapping: Valid }, - Range { from: 'և', to: 'և', mapping: Mapped("եւ") }, - Range { from: 'ֈ', to: 'ֈ', mapping: Disallowed }, - Range { from: '։', to: '։', mapping: Valid }, - Range { from: '֊', to: '֊', mapping: Valid }, - Range { from: '֋', to: '֌', mapping: Disallowed }, - Range { from: '֍', to: '֎', mapping: Valid }, - Range { from: '֏', to: '֏', mapping: Valid }, - Range { from: '֐', to: '֐', mapping: Disallowed }, - Range { from: '֑', to: '֡', mapping: Valid }, - Range { from: '֢', to: '֢', mapping: Valid }, - Range { from: '֣', to: '֯', mapping: Valid }, - Range { from: 'ְ', to: 'ֹ', mapping: Valid }, - Range { from: 'ֺ', to: 'ֺ', mapping: Valid }, - Range { from: 'ֻ', to: 'ֽ', mapping: Valid }, - Range { from: '־', to: '־', mapping: Valid }, - Range { from: 'ֿ', to: 'ֿ', mapping: Valid }, - Range { from: '׀', to: '׀', mapping: Valid }, - Range { from: 'ׁ', to: 'ׂ', mapping: Valid }, - Range { from: '׃', to: '׃', mapping: Valid }, - Range { from: 'ׄ', to: 'ׄ', mapping: Valid }, - Range { from: 'ׅ', to: 'ׅ', mapping: Valid }, - Range { from: '׆', to: '׆', mapping: Valid }, - Range { from: 'ׇ', to: 'ׇ', mapping: Valid }, - Range { from: '׈', to: '׏', mapping: Disallowed }, - Range { from: 'א', to: 'ת', mapping: Valid }, - Range { from: '׫', to: 'ׯ', mapping: Disallowed }, - Range { from: 'װ', to: '״', mapping: Valid }, - Range { from: '׵', to: '׿', mapping: Disallowed }, - Range { from: '؀', to: '؃', mapping: Disallowed }, - Range { from: '؄', to: '؄', mapping: Disallowed }, - Range { from: '؅', to: '؅', mapping: Disallowed }, - Range { from: '؆', to: '؊', mapping: Valid }, - Range { from: '؋', to: '؋', mapping: Valid }, - Range { from: '،', to: '،', mapping: Valid }, - Range { from: '؍', to: '؏', mapping: Valid }, - Range { from: 'ؐ', to: 'ؕ', mapping: Valid }, - Range { from: 'ؖ', to: 'ؚ', mapping: Valid }, - Range { from: '؛', to: '؛', mapping: Valid }, - Range { from: '؜', to: '؜', mapping: Disallowed }, - Range { from: '؝', to: '؝', mapping: Disallowed }, - Range { from: '؞', to: '؞', mapping: Valid }, - Range { from: '؟', to: '؟', mapping: Valid }, - Range { from: 'ؠ', to: 'ؠ', mapping: Valid }, - Range { from: 'ء', to: 'غ', mapping: Valid }, - Range { from: 'ػ', to: 'ؿ', mapping: Valid }, - Range { from: 'ـ', to: 'ـ', mapping: Valid }, - Range { from: 'ف', to: 'ْ', mapping: Valid }, - Range { from: 'ٓ', to: 'ٕ', mapping: Valid }, - Range { from: 'ٖ', to: '٘', mapping: Valid }, - Range { from: 'ٙ', to: 'ٞ', mapping: Valid }, - Range { from: 'ٟ', to: 'ٟ', mapping: Valid }, - Range { from: '٠', to: '٩', mapping: Valid }, - Range { from: '٪', to: '٭', mapping: Valid }, - Range { from: 'ٮ', to: 'ٯ', mapping: Valid }, - Range { from: 'ٰ', to: 'ٴ', mapping: Valid }, - Range { from: 'ٵ', to: 'ٵ', mapping: Mapped("اٴ") }, - Range { from: 'ٶ', to: 'ٶ', mapping: Mapped("وٴ") }, - Range { from: 'ٷ', to: 'ٷ', mapping: Mapped("ۇٴ") }, - Range { from: 'ٸ', to: 'ٸ', mapping: Mapped("يٴ") }, - Range { from: 'ٹ', to: 'ڷ', mapping: Valid }, - Range { from: 'ڸ', to: 'ڹ', mapping: Valid }, - Range { from: 'ں', to: 'ھ', mapping: Valid }, - Range { from: 'ڿ', to: 'ڿ', mapping: Valid }, - Range { from: 'ۀ', to: 'ێ', mapping: Valid }, - Range { from: 'ۏ', to: 'ۏ', mapping: Valid }, - Range { from: 'ې', to: 'ۓ', mapping: Valid }, - Range { from: '۔', to: '۔', mapping: Valid }, - Range { from: 'ە', to: 'ۜ', mapping: Valid }, - Range { from: '۝', to: '۝', mapping: Disallowed }, - Range { from: '۞', to: '۞', mapping: Valid }, - Range { from: '۟', to: 'ۨ', mapping: Valid }, - Range { from: '۩', to: '۩', mapping: Valid }, - Range { from: '۪', to: 'ۭ', mapping: Valid }, - Range { from: 'ۮ', to: 'ۯ', mapping: Valid }, - Range { from: '۰', to: '۹', mapping: Valid }, - Range { from: 'ۺ', to: '۾', mapping: Valid }, - Range { from: 'ۿ', to: 'ۿ', mapping: Valid }, - Range { from: '܀', to: '܍', mapping: Valid }, - Range { from: '܎', to: '܎', mapping: Disallowed }, - Range { from: '܏', to: '܏', mapping: Disallowed }, - Range { from: 'ܐ', to: 'ܬ', mapping: Valid }, - Range { from: 'ܭ', to: 'ܯ', mapping: Valid }, - Range { from: 'ܰ', to: '݊', mapping: Valid }, - Range { from: '݋', to: '݌', mapping: Disallowed }, - Range { from: 'ݍ', to: 'ݏ', mapping: Valid }, - Range { from: 'ݐ', to: 'ݭ', mapping: Valid }, - Range { from: 'ݮ', to: 'ݿ', mapping: Valid }, - Range { from: 'ހ', to: 'ް', mapping: Valid }, - Range { from: 'ޱ', to: 'ޱ', mapping: Valid }, - Range { from: '޲', to: '޿', mapping: Disallowed }, - Range { from: '߀', to: 'ߵ', mapping: Valid }, - Range { from: '߶', to: 'ߺ', mapping: Valid }, - Range { from: '߻', to: '߿', mapping: Disallowed }, - Range { from: 'ࠀ', to: '࠭', mapping: Valid }, - Range { from: '࠮', to: '࠯', mapping: Disallowed }, - Range { from: '࠰', to: '࠾', mapping: Valid }, - Range { from: '࠿', to: '࠿', mapping: Disallowed }, - Range { from: 'ࡀ', to: '࡛', mapping: Valid }, - Range { from: '࡜', to: '࡝', mapping: Disallowed }, - Range { from: '࡞', to: '࡞', mapping: Valid }, - Range { from: '࡟', to: '࢟', mapping: Disallowed }, - Range { from: 'ࢠ', to: 'ࢠ', mapping: Valid }, - Range { from: 'ࢡ', to: 'ࢡ', mapping: Valid }, - Range { from: 'ࢢ', to: 'ࢬ', mapping: Valid }, - Range { from: 'ࢭ', to: 'ࢲ', mapping: Valid }, - Range { from: 'ࢳ', to: 'ࢴ', mapping: Valid }, - Range { from: 'ࢵ', to: '࣢', mapping: Disallowed }, - Range { from: 'ࣣ', to: 'ࣣ', mapping: Valid }, - Range { from: 'ࣤ', to: 'ࣾ', mapping: Valid }, - Range { from: 'ࣿ', to: 'ࣿ', mapping: Valid }, - Range { from: 'ऀ', to: 'ऀ', mapping: Valid }, - Range { from: 'ँ', to: 'ः', mapping: Valid }, - Range { from: 'ऄ', to: 'ऄ', mapping: Valid }, - Range { from: 'अ', to: 'ह', mapping: Valid }, - Range { from: 'ऺ', to: 'ऻ', mapping: Valid }, - Range { from: '़', to: '्', mapping: Valid }, - Range { from: 'ॎ', to: 'ॎ', mapping: Valid }, - Range { from: 'ॏ', to: 'ॏ', mapping: Valid }, - Range { from: 'ॐ', to: '॔', mapping: Valid }, - Range { from: 'ॕ', to: 'ॕ', mapping: Valid }, - Range { from: 'ॖ', to: 'ॗ', mapping: Valid }, - Range { from: 'क़', to: 'क़', mapping: Mapped("क़") }, - Range { from: 'ख़', to: 'ख़', mapping: Mapped("ख़") }, - Range { from: 'ग़', to: 'ग़', mapping: Mapped("ग़") }, - Range { from: 'ज़', to: 'ज़', mapping: Mapped("ज़") }, - Range { from: 'ड़', to: 'ड़', mapping: Mapped("ड़") }, - Range { from: 'ढ़', to: 'ढ़', mapping: Mapped("ढ़") }, - Range { from: 'फ़', to: 'फ़', mapping: Mapped("फ़") }, - Range { from: 'य़', to: 'य़', mapping: Mapped("य़") }, - Range { from: 'ॠ', to: 'ॣ', mapping: Valid }, - Range { from: '।', to: '॥', mapping: Valid }, - Range { from: '०', to: '९', mapping: Valid }, - Range { from: '॰', to: '॰', mapping: Valid }, - Range { from: 'ॱ', to: 'ॲ', mapping: Valid }, - Range { from: 'ॳ', to: 'ॷ', mapping: Valid }, - Range { from: 'ॸ', to: 'ॸ', mapping: Valid }, - Range { from: 'ॹ', to: 'ॺ', mapping: Valid }, - Range { from: 'ॻ', to: 'ॼ', mapping: Valid }, - Range { from: 'ॽ', to: 'ॽ', mapping: Valid }, - Range { from: 'ॾ', to: 'ॿ', mapping: Valid }, - Range { from: 'ঀ', to: 'ঀ', mapping: Valid }, - Range { from: 'ঁ', to: 'ঃ', mapping: Valid }, - Range { from: '঄', to: '঄', mapping: Disallowed }, - Range { from: 'অ', to: 'ঌ', mapping: Valid }, - Range { from: '঍', to: '঎', mapping: Disallowed }, - Range { from: 'এ', to: 'ঐ', mapping: Valid }, - Range { from: '঑', to: '঒', mapping: Disallowed }, - Range { from: 'ও', to: 'ন', mapping: Valid }, - Range { from: '঩', to: '঩', mapping: Disallowed }, - Range { from: 'প', to: 'র', mapping: Valid }, - Range { from: '঱', to: '঱', mapping: Disallowed }, - Range { from: 'ল', to: 'ল', mapping: Valid }, - Range { from: '঳', to: '঵', mapping: Disallowed }, - Range { from: 'শ', to: 'হ', mapping: Valid }, - Range { from: '঺', to: '঻', mapping: Disallowed }, - Range { from: '়', to: '়', mapping: Valid }, - Range { from: 'ঽ', to: 'ঽ', mapping: Valid }, - Range { from: 'া', to: 'ৄ', mapping: Valid }, - Range { from: '৅', to: '৆', mapping: Disallowed }, - Range { from: 'ে', to: 'ৈ', mapping: Valid }, - Range { from: '৉', to: '৊', mapping: Disallowed }, - Range { from: 'ো', to: '্', mapping: Valid }, - Range { from: 'ৎ', to: 'ৎ', mapping: Valid }, - Range { from: '৏', to: '৖', mapping: Disallowed }, - Range { from: 'ৗ', to: 'ৗ', mapping: Valid }, - Range { from: '৘', to: '৛', mapping: Disallowed }, - Range { from: 'ড়', to: 'ড়', mapping: Mapped("ড়") }, - Range { from: 'ঢ়', to: 'ঢ়', mapping: Mapped("ঢ়") }, - Range { from: '৞', to: '৞', mapping: Disallowed }, - Range { from: 'য়', to: 'য়', mapping: Mapped("য়") }, - Range { from: 'ৠ', to: 'ৣ', mapping: Valid }, - Range { from: '৤', to: '৥', mapping: Disallowed }, - Range { from: '০', to: 'ৱ', mapping: Valid }, - Range { from: '৲', to: '৺', mapping: Valid }, - Range { from: '৻', to: '৻', mapping: Valid }, - Range { from: 'ৼ', to: '਀', mapping: Disallowed }, - Range { from: 'ਁ', to: 'ਁ', mapping: Valid }, - Range { from: 'ਂ', to: 'ਂ', mapping: Valid }, - Range { from: 'ਃ', to: 'ਃ', mapping: Valid }, - Range { from: '਄', to: '਄', mapping: Disallowed }, - Range { from: 'ਅ', to: 'ਊ', mapping: Valid }, - Range { from: '਋', to: '਎', mapping: Disallowed }, - Range { from: 'ਏ', to: 'ਐ', mapping: Valid }, - Range { from: '਑', to: '਒', mapping: Disallowed }, - Range { from: 'ਓ', to: 'ਨ', mapping: Valid }, - Range { from: '਩', to: '਩', mapping: Disallowed }, - Range { from: 'ਪ', to: 'ਰ', mapping: Valid }, - Range { from: '਱', to: '਱', mapping: Disallowed }, - Range { from: 'ਲ', to: 'ਲ', mapping: Valid }, - Range { from: 'ਲ਼', to: 'ਲ਼', mapping: Mapped("ਲ਼") }, - Range { from: '਴', to: '਴', mapping: Disallowed }, - Range { from: 'ਵ', to: 'ਵ', mapping: Valid }, - Range { from: 'ਸ਼', to: 'ਸ਼', mapping: Mapped("ਸ਼") }, - Range { from: '਷', to: '਷', mapping: Disallowed }, - Range { from: 'ਸ', to: 'ਹ', mapping: Valid }, - Range { from: '਺', to: '਻', mapping: Disallowed }, - Range { from: '਼', to: '਼', mapping: Valid }, - Range { from: '਽', to: '਽', mapping: Disallowed }, - Range { from: 'ਾ', to: 'ੂ', mapping: Valid }, - Range { from: '੃', to: '੆', mapping: Disallowed }, - Range { from: 'ੇ', to: 'ੈ', mapping: Valid }, - Range { from: '੉', to: '੊', mapping: Disallowed }, - Range { from: 'ੋ', to: '੍', mapping: Valid }, - Range { from: '੎', to: '੐', mapping: Disallowed }, - Range { from: 'ੑ', to: 'ੑ', mapping: Valid }, - Range { from: '੒', to: '੘', mapping: Disallowed }, - Range { from: 'ਖ਼', to: 'ਖ਼', mapping: Mapped("ਖ਼") }, - Range { from: 'ਗ਼', to: 'ਗ਼', mapping: Mapped("ਗ਼") }, - Range { from: 'ਜ਼', to: 'ਜ਼', mapping: Mapped("ਜ਼") }, - Range { from: 'ੜ', to: 'ੜ', mapping: Valid }, - Range { from: '੝', to: '੝', mapping: Disallowed }, - Range { from: 'ਫ਼', to: 'ਫ਼', mapping: Mapped("ਫ਼") }, - Range { from: '੟', to: '੥', mapping: Disallowed }, - Range { from: '੦', to: 'ੴ', mapping: Valid }, - Range { from: 'ੵ', to: 'ੵ', mapping: Valid }, - Range { from: '੶', to: '઀', mapping: Disallowed }, - Range { from: 'ઁ', to: 'ઃ', mapping: Valid }, - Range { from: '઄', to: '઄', mapping: Disallowed }, - Range { from: 'અ', to: 'ઋ', mapping: Valid }, - Range { from: 'ઌ', to: 'ઌ', mapping: Valid }, - Range { from: 'ઍ', to: 'ઍ', mapping: Valid }, - Range { from: '઎', to: '઎', mapping: Disallowed }, - Range { from: 'એ', to: 'ઑ', mapping: Valid }, - Range { from: '઒', to: '઒', mapping: Disallowed }, - Range { from: 'ઓ', to: 'ન', mapping: Valid }, - Range { from: '઩', to: '઩', mapping: Disallowed }, - Range { from: 'પ', to: 'ર', mapping: Valid }, - Range { from: '઱', to: '઱', mapping: Disallowed }, - Range { from: 'લ', to: 'ળ', mapping: Valid }, - Range { from: '઴', to: '઴', mapping: Disallowed }, - Range { from: 'વ', to: 'હ', mapping: Valid }, - Range { from: '઺', to: '઻', mapping: Disallowed }, - Range { from: '઼', to: 'ૅ', mapping: Valid }, - Range { from: '૆', to: '૆', mapping: Disallowed }, - Range { from: 'ે', to: 'ૉ', mapping: Valid }, - Range { from: '૊', to: '૊', mapping: Disallowed }, - Range { from: 'ો', to: '્', mapping: Valid }, - Range { from: '૎', to: '૏', mapping: Disallowed }, - Range { from: 'ૐ', to: 'ૐ', mapping: Valid }, - Range { from: '૑', to: '૟', mapping: Disallowed }, - Range { from: 'ૠ', to: 'ૠ', mapping: Valid }, - Range { from: 'ૡ', to: 'ૣ', mapping: Valid }, - Range { from: '૤', to: '૥', mapping: Disallowed }, - Range { from: '૦', to: '૯', mapping: Valid }, - Range { from: '૰', to: '૰', mapping: Valid }, - Range { from: '૱', to: '૱', mapping: Valid }, - Range { from: '૲', to: '૸', mapping: Disallowed }, - Range { from: 'ૹ', to: 'ૹ', mapping: Valid }, - Range { from: 'ૺ', to: '଀', mapping: Disallowed }, - Range { from: 'ଁ', to: 'ଃ', mapping: Valid }, - Range { from: '଄', to: '଄', mapping: Disallowed }, - Range { from: 'ଅ', to: 'ଌ', mapping: Valid }, - Range { from: '଍', to: '଎', mapping: Disallowed }, - Range { from: 'ଏ', to: 'ଐ', mapping: Valid }, - Range { from: '଑', to: '଒', mapping: Disallowed }, - Range { from: 'ଓ', to: 'ନ', mapping: Valid }, - Range { from: '଩', to: '଩', mapping: Disallowed }, - Range { from: 'ପ', to: 'ର', mapping: Valid }, - Range { from: '଱', to: '଱', mapping: Disallowed }, - Range { from: 'ଲ', to: 'ଳ', mapping: Valid }, - Range { from: '଴', to: '଴', mapping: Disallowed }, - Range { from: 'ଵ', to: 'ଵ', mapping: Valid }, - Range { from: 'ଶ', to: 'ହ', mapping: Valid }, - Range { from: '଺', to: '଻', mapping: Disallowed }, - Range { from: '଼', to: 'ୃ', mapping: Valid }, - Range { from: 'ୄ', to: 'ୄ', mapping: Valid }, - Range { from: '୅', to: '୆', mapping: Disallowed }, - Range { from: 'େ', to: 'ୈ', mapping: Valid }, - Range { from: '୉', to: '୊', mapping: Disallowed }, - Range { from: 'ୋ', to: '୍', mapping: Valid }, - Range { from: '୎', to: '୕', mapping: Disallowed }, - Range { from: 'ୖ', to: 'ୗ', mapping: Valid }, - Range { from: '୘', to: '୛', mapping: Disallowed }, - Range { from: 'ଡ଼', to: 'ଡ଼', mapping: Mapped("ଡ଼") }, - Range { from: 'ଢ଼', to: 'ଢ଼', mapping: Mapped("ଢ଼") }, - Range { from: '୞', to: '୞', mapping: Disallowed }, - Range { from: 'ୟ', to: 'ୡ', mapping: Valid }, - Range { from: 'ୢ', to: 'ୣ', mapping: Valid }, - Range { from: '୤', to: '୥', mapping: Disallowed }, - Range { from: '୦', to: '୯', mapping: Valid }, - Range { from: '୰', to: '୰', mapping: Valid }, - Range { from: 'ୱ', to: 'ୱ', mapping: Valid }, - Range { from: '୲', to: '୷', mapping: Valid }, - Range { from: '୸', to: '஁', mapping: Disallowed }, - Range { from: 'ஂ', to: 'ஃ', mapping: Valid }, - Range { from: '஄', to: '஄', mapping: Disallowed }, - Range { from: 'அ', to: 'ஊ', mapping: Valid }, - Range { from: '஋', to: '஍', mapping: Disallowed }, - Range { from: 'எ', to: 'ஐ', mapping: Valid }, - Range { from: '஑', to: '஑', mapping: Disallowed }, - Range { from: 'ஒ', to: 'க', mapping: Valid }, - Range { from: '஖', to: '஘', mapping: Disallowed }, - Range { from: 'ங', to: 'ச', mapping: Valid }, - Range { from: '஛', to: '஛', mapping: Disallowed }, - Range { from: 'ஜ', to: 'ஜ', mapping: Valid }, - Range { from: '஝', to: '஝', mapping: Disallowed }, - Range { from: 'ஞ', to: 'ட', mapping: Valid }, - Range { from: '஠', to: '஢', mapping: Disallowed }, - Range { from: 'ண', to: 'த', mapping: Valid }, - Range { from: '஥', to: '஧', mapping: Disallowed }, - Range { from: 'ந', to: 'ப', mapping: Valid }, - Range { from: '஫', to: '஭', mapping: Disallowed }, - Range { from: 'ம', to: 'வ', mapping: Valid }, - Range { from: 'ஶ', to: 'ஶ', mapping: Valid }, - Range { from: 'ஷ', to: 'ஹ', mapping: Valid }, - Range { from: '஺', to: '஽', mapping: Disallowed }, - Range { from: 'ா', to: 'ூ', mapping: Valid }, - Range { from: '௃', to: '௅', mapping: Disallowed }, - Range { from: 'ெ', to: 'ை', mapping: Valid }, - Range { from: '௉', to: '௉', mapping: Disallowed }, - Range { from: 'ொ', to: '்', mapping: Valid }, - Range { from: '௎', to: '௏', mapping: Disallowed }, - Range { from: 'ௐ', to: 'ௐ', mapping: Valid }, - Range { from: '௑', to: '௖', mapping: Disallowed }, - Range { from: 'ௗ', to: 'ௗ', mapping: Valid }, - Range { from: '௘', to: '௥', mapping: Disallowed }, - Range { from: '௦', to: '௦', mapping: Valid }, - Range { from: '௧', to: '௯', mapping: Valid }, - Range { from: '௰', to: '௲', mapping: Valid }, - Range { from: '௳', to: '௺', mapping: Valid }, - Range { from: '௻', to: '௿', mapping: Disallowed }, - Range { from: 'ఀ', to: 'ఀ', mapping: Valid }, - Range { from: 'ఁ', to: 'ః', mapping: Valid }, - Range { from: 'ఄ', to: 'ఄ', mapping: Disallowed }, - Range { from: 'అ', to: 'ఌ', mapping: Valid }, - Range { from: '఍', to: '఍', mapping: Disallowed }, - Range { from: 'ఎ', to: 'ఐ', mapping: Valid }, - Range { from: '఑', to: '఑', mapping: Disallowed }, - Range { from: 'ఒ', to: 'న', mapping: Valid }, - Range { from: '఩', to: '఩', mapping: Disallowed }, - Range { from: 'ప', to: 'ళ', mapping: Valid }, - Range { from: 'ఴ', to: 'ఴ', mapping: Valid }, - Range { from: 'వ', to: 'హ', mapping: Valid }, - Range { from: '఺', to: '఼', mapping: Disallowed }, - Range { from: 'ఽ', to: 'ఽ', mapping: Valid }, - Range { from: 'ా', to: 'ౄ', mapping: Valid }, - Range { from: '౅', to: '౅', mapping: Disallowed }, - Range { from: 'ె', to: 'ై', mapping: Valid }, - Range { from: '౉', to: '౉', mapping: Disallowed }, - Range { from: 'ొ', to: '్', mapping: Valid }, - Range { from: '౎', to: '౔', mapping: Disallowed }, - Range { from: 'ౕ', to: 'ౖ', mapping: Valid }, - Range { from: '౗', to: '౗', mapping: Disallowed }, - Range { from: 'ౘ', to: 'ౙ', mapping: Valid }, - Range { from: 'ౚ', to: 'ౚ', mapping: Valid }, - Range { from: '౛', to: '౟', mapping: Disallowed }, - Range { from: 'ౠ', to: 'ౡ', mapping: Valid }, - Range { from: 'ౢ', to: 'ౣ', mapping: Valid }, - Range { from: '౤', to: '౥', mapping: Disallowed }, - Range { from: '౦', to: '౯', mapping: Valid }, - Range { from: '౰', to: '౷', mapping: Disallowed }, - Range { from: '౸', to: '౿', mapping: Valid }, - Range { from: 'ಀ', to: 'ಀ', mapping: Disallowed }, - Range { from: 'ಁ', to: 'ಁ', mapping: Valid }, - Range { from: 'ಂ', to: 'ಃ', mapping: Valid }, - Range { from: '಄', to: '಄', mapping: Disallowed }, - Range { from: 'ಅ', to: 'ಌ', mapping: Valid }, - Range { from: '಍', to: '಍', mapping: Disallowed }, - Range { from: 'ಎ', to: 'ಐ', mapping: Valid }, - Range { from: '಑', to: '಑', mapping: Disallowed }, - Range { from: 'ಒ', to: 'ನ', mapping: Valid }, - Range { from: '಩', to: '಩', mapping: Disallowed }, - Range { from: 'ಪ', to: 'ಳ', mapping: Valid }, - Range { from: '಴', to: '಴', mapping: Disallowed }, - Range { from: 'ವ', to: 'ಹ', mapping: Valid }, - Range { from: '಺', to: '಻', mapping: Disallowed }, - Range { from: '಼', to: 'ಽ', mapping: Valid }, - Range { from: 'ಾ', to: 'ೄ', mapping: Valid }, - Range { from: '೅', to: '೅', mapping: Disallowed }, - Range { from: 'ೆ', to: 'ೈ', mapping: Valid }, - Range { from: '೉', to: '೉', mapping: Disallowed }, - Range { from: 'ೊ', to: '್', mapping: Valid }, - Range { from: '೎', to: '೔', mapping: Disallowed }, - Range { from: 'ೕ', to: 'ೖ', mapping: Valid }, - Range { from: '೗', to: 'ೝ', mapping: Disallowed }, - Range { from: 'ೞ', to: 'ೞ', mapping: Valid }, - Range { from: '೟', to: '೟', mapping: Disallowed }, - Range { from: 'ೠ', to: 'ೡ', mapping: Valid }, - Range { from: 'ೢ', to: 'ೣ', mapping: Valid }, - Range { from: '೤', to: '೥', mapping: Disallowed }, - Range { from: '೦', to: '೯', mapping: Valid }, - Range { from: '೰', to: '೰', mapping: Disallowed }, - Range { from: 'ೱ', to: 'ೲ', mapping: Valid }, - Range { from: 'ೳ', to: 'ഀ', mapping: Disallowed }, - Range { from: 'ഁ', to: 'ഁ', mapping: Valid }, - Range { from: 'ം', to: 'ഃ', mapping: Valid }, - Range { from: 'ഄ', to: 'ഄ', mapping: Disallowed }, - Range { from: 'അ', to: 'ഌ', mapping: Valid }, - Range { from: '഍', to: '഍', mapping: Disallowed }, - Range { from: 'എ', to: 'ഐ', mapping: Valid }, - Range { from: '഑', to: '഑', mapping: Disallowed }, - Range { from: 'ഒ', to: 'ന', mapping: Valid }, - Range { from: 'ഩ', to: 'ഩ', mapping: Valid }, - Range { from: 'പ', to: 'ഹ', mapping: Valid }, - Range { from: 'ഺ', to: 'ഺ', mapping: Valid }, - Range { from: '഻', to: '഼', mapping: Disallowed }, - Range { from: 'ഽ', to: 'ഽ', mapping: Valid }, - Range { from: 'ാ', to: 'ൃ', mapping: Valid }, - Range { from: 'ൄ', to: 'ൄ', mapping: Valid }, - Range { from: '൅', to: '൅', mapping: Disallowed }, - Range { from: 'െ', to: 'ൈ', mapping: Valid }, - Range { from: '൉', to: '൉', mapping: Disallowed }, - Range { from: 'ൊ', to: '്', mapping: Valid }, - Range { from: 'ൎ', to: 'ൎ', mapping: Valid }, - Range { from: '൏', to: 'ൖ', mapping: Disallowed }, - Range { from: 'ൗ', to: 'ൗ', mapping: Valid }, - Range { from: '൘', to: '൞', mapping: Disallowed }, - Range { from: 'ൟ', to: 'ൟ', mapping: Valid }, - Range { from: 'ൠ', to: 'ൡ', mapping: Valid }, - Range { from: 'ൢ', to: 'ൣ', mapping: Valid }, - Range { from: '൤', to: '൥', mapping: Disallowed }, - Range { from: '൦', to: '൯', mapping: Valid }, - Range { from: '൰', to: '൵', mapping: Valid }, - Range { from: '൶', to: '൸', mapping: Disallowed }, - Range { from: '൹', to: '൹', mapping: Valid }, - Range { from: 'ൺ', to: 'ൿ', mapping: Valid }, - Range { from: '඀', to: 'ඁ', mapping: Disallowed }, - Range { from: 'ං', to: 'ඃ', mapping: Valid }, - Range { from: '඄', to: '඄', mapping: Disallowed }, - Range { from: 'අ', to: 'ඖ', mapping: Valid }, - Range { from: '඗', to: '඙', mapping: Disallowed }, - Range { from: 'ක', to: 'න', mapping: Valid }, - Range { from: '඲', to: '඲', mapping: Disallowed }, - Range { from: 'ඳ', to: 'ර', mapping: Valid }, - Range { from: '඼', to: '඼', mapping: Disallowed }, - Range { from: 'ල', to: 'ල', mapping: Valid }, - Range { from: '඾', to: '඿', mapping: Disallowed }, - Range { from: 'ව', to: 'ෆ', mapping: Valid }, - Range { from: '෇', to: '෉', mapping: Disallowed }, - Range { from: '්', to: '්', mapping: Valid }, - Range { from: '෋', to: '෎', mapping: Disallowed }, - Range { from: 'ා', to: 'ු', mapping: Valid }, - Range { from: '෕', to: '෕', mapping: Disallowed }, - Range { from: 'ූ', to: 'ූ', mapping: Valid }, - Range { from: '෗', to: '෗', mapping: Disallowed }, - Range { from: 'ෘ', to: 'ෟ', mapping: Valid }, - Range { from: '෠', to: '෥', mapping: Disallowed }, - Range { from: '෦', to: '෯', mapping: Valid }, - Range { from: '෰', to: '෱', mapping: Disallowed }, - Range { from: 'ෲ', to: 'ෳ', mapping: Valid }, - Range { from: '෴', to: '෴', mapping: Valid }, - Range { from: '෵', to: '฀', mapping: Disallowed }, - Range { from: 'ก', to: 'า', mapping: Valid }, - Range { from: 'ำ', to: 'ำ', mapping: Mapped("ํา") }, - Range { from: 'ิ', to: 'ฺ', mapping: Valid }, - Range { from: '฻', to: '฾', mapping: Disallowed }, - Range { from: '฿', to: '฿', mapping: Valid }, - Range { from: 'เ', to: '๎', mapping: Valid }, - Range { from: '๏', to: '๏', mapping: Valid }, - Range { from: '๐', to: '๙', mapping: Valid }, - Range { from: '๚', to: '๛', mapping: Valid }, - Range { from: '๜', to: '຀', mapping: Disallowed }, - Range { from: 'ກ', to: 'ຂ', mapping: Valid }, - Range { from: '຃', to: '຃', mapping: Disallowed }, - Range { from: 'ຄ', to: 'ຄ', mapping: Valid }, - Range { from: '຅', to: 'ຆ', mapping: Disallowed }, - Range { from: 'ງ', to: 'ຈ', mapping: Valid }, - Range { from: 'ຉ', to: 'ຉ', mapping: Disallowed }, - Range { from: 'ຊ', to: 'ຊ', mapping: Valid }, - Range { from: '຋', to: 'ຌ', mapping: Disallowed }, - Range { from: 'ຍ', to: 'ຍ', mapping: Valid }, - Range { from: 'ຎ', to: 'ຓ', mapping: Disallowed }, - Range { from: 'ດ', to: 'ທ', mapping: Valid }, - Range { from: 'ຘ', to: 'ຘ', mapping: Disallowed }, - Range { from: 'ນ', to: 'ຟ', mapping: Valid }, - Range { from: 'ຠ', to: 'ຠ', mapping: Disallowed }, - Range { from: 'ມ', to: 'ຣ', mapping: Valid }, - Range { from: '຤', to: '຤', mapping: Disallowed }, - Range { from: 'ລ', to: 'ລ', mapping: Valid }, - Range { from: '຦', to: '຦', mapping: Disallowed }, - Range { from: 'ວ', to: 'ວ', mapping: Valid }, - Range { from: 'ຨ', to: 'ຩ', mapping: Disallowed }, - Range { from: 'ສ', to: 'ຫ', mapping: Valid }, - Range { from: 'ຬ', to: 'ຬ', mapping: Disallowed }, - Range { from: 'ອ', to: 'າ', mapping: Valid }, - Range { from: 'ຳ', to: 'ຳ', mapping: Mapped("ໍາ") }, - Range { from: 'ິ', to: 'ູ', mapping: Valid }, - Range { from: '຺', to: '຺', mapping: Disallowed }, - Range { from: 'ົ', to: 'ຽ', mapping: Valid }, - Range { from: '຾', to: '຿', mapping: Disallowed }, - Range { from: 'ເ', to: 'ໄ', mapping: Valid }, - Range { from: '໅', to: '໅', mapping: Disallowed }, - Range { from: 'ໆ', to: 'ໆ', mapping: Valid }, - Range { from: '໇', to: '໇', mapping: Disallowed }, - Range { from: '່', to: 'ໍ', mapping: Valid }, - Range { from: '໎', to: '໏', mapping: Disallowed }, - Range { from: '໐', to: '໙', mapping: Valid }, - Range { from: '໚', to: '໛', mapping: Disallowed }, - Range { from: 'ໜ', to: 'ໜ', mapping: Mapped("ຫນ") }, - Range { from: 'ໝ', to: 'ໝ', mapping: Mapped("ຫມ") }, - Range { from: 'ໞ', to: 'ໟ', mapping: Valid }, - Range { from: '໠', to: '໿', mapping: Disallowed }, - Range { from: 'ༀ', to: 'ༀ', mapping: Valid }, - Range { from: '༁', to: '༊', mapping: Valid }, - Range { from: '་', to: '་', mapping: Valid }, - Range { from: '༌', to: '༌', mapping: Mapped("་") }, - Range { from: '།', to: '༗', mapping: Valid }, - Range { from: '༘', to: '༙', mapping: Valid }, - Range { from: '༚', to: '༟', mapping: Valid }, - Range { from: '༠', to: '༩', mapping: Valid }, - Range { from: '༪', to: '༴', mapping: Valid }, - Range { from: '༵', to: '༵', mapping: Valid }, - Range { from: '༶', to: '༶', mapping: Valid }, - Range { from: '༷', to: '༷', mapping: Valid }, - Range { from: '༸', to: '༸', mapping: Valid }, - Range { from: '༹', to: '༹', mapping: Valid }, - Range { from: '༺', to: '༽', mapping: Valid }, - Range { from: '༾', to: 'ག', mapping: Valid }, - Range { from: 'གྷ', to: 'གྷ', mapping: Mapped("གྷ") }, - Range { from: 'ང', to: 'ཇ', mapping: Valid }, - Range { from: '཈', to: '཈', mapping: Disallowed }, - Range { from: 'ཉ', to: 'ཌ', mapping: Valid }, - Range { from: 'ཌྷ', to: 'ཌྷ', mapping: Mapped("ཌྷ") }, - Range { from: 'ཎ', to: 'ད', mapping: Valid }, - Range { from: 'དྷ', to: 'དྷ', mapping: Mapped("དྷ") }, - Range { from: 'ན', to: 'བ', mapping: Valid }, - Range { from: 'བྷ', to: 'བྷ', mapping: Mapped("བྷ") }, - Range { from: 'མ', to: 'ཛ', mapping: Valid }, - Range { from: 'ཛྷ', to: 'ཛྷ', mapping: Mapped("ཛྷ") }, - Range { from: 'ཝ', to: 'ཨ', mapping: Valid }, - Range { from: 'ཀྵ', to: 'ཀྵ', mapping: Mapped("ཀྵ") }, - Range { from: 'ཪ', to: 'ཪ', mapping: Valid }, - Range { from: 'ཫ', to: 'ཬ', mapping: Valid }, - Range { from: '཭', to: '཰', mapping: Disallowed }, - Range { from: 'ཱ', to: 'ི', mapping: Valid }, - Range { from: 'ཱི', to: 'ཱི', mapping: Mapped("ཱི") }, - Range { from: 'ུ', to: 'ུ', mapping: Valid }, - Range { from: 'ཱུ', to: 'ཱུ', mapping: Mapped("ཱུ") }, - Range { from: 'ྲྀ', to: 'ྲྀ', mapping: Mapped("ྲྀ") }, - Range { from: 'ཷ', to: 'ཷ', mapping: Mapped("ྲཱྀ") }, - Range { from: 'ླྀ', to: 'ླྀ', mapping: Mapped("ླྀ") }, - Range { from: 'ཹ', to: 'ཹ', mapping: Mapped("ླཱྀ") }, - Range { from: 'ེ', to: 'ྀ', mapping: Valid }, - Range { from: 'ཱྀ', to: 'ཱྀ', mapping: Mapped("ཱྀ") }, - Range { from: 'ྂ', to: '྄', mapping: Valid }, - Range { from: '྅', to: '྅', mapping: Valid }, - Range { from: '྆', to: 'ྋ', mapping: Valid }, - Range { from: 'ྌ', to: 'ྏ', mapping: Valid }, - Range { from: 'ྐ', to: 'ྒ', mapping: Valid }, - Range { from: 'ྒྷ', to: 'ྒྷ', mapping: Mapped("ྒྷ") }, - Range { from: 'ྔ', to: 'ྕ', mapping: Valid }, - Range { from: 'ྖ', to: 'ྖ', mapping: Valid }, - Range { from: 'ྗ', to: 'ྗ', mapping: Valid }, - Range { from: '྘', to: '྘', mapping: Disallowed }, - Range { from: 'ྙ', to: 'ྜ', mapping: Valid }, - Range { from: 'ྜྷ', to: 'ྜྷ', mapping: Mapped("ྜྷ") }, - Range { from: 'ྞ', to: 'ྡ', mapping: Valid }, - Range { from: 'ྡྷ', to: 'ྡྷ', mapping: Mapped("ྡྷ") }, - Range { from: 'ྣ', to: 'ྦ', mapping: Valid }, - Range { from: 'ྦྷ', to: 'ྦྷ', mapping: Mapped("ྦྷ") }, - Range { from: 'ྨ', to: 'ྫ', mapping: Valid }, - Range { from: 'ྫྷ', to: 'ྫྷ', mapping: Mapped("ྫྷ") }, - Range { from: 'ྭ', to: 'ྭ', mapping: Valid }, - Range { from: 'ྮ', to: 'ྰ', mapping: Valid }, - Range { from: 'ྱ', to: 'ྷ', mapping: Valid }, - Range { from: 'ྸ', to: 'ྸ', mapping: Valid }, - Range { from: 'ྐྵ', to: 'ྐྵ', mapping: Mapped("ྐྵ") }, - Range { from: 'ྺ', to: 'ྼ', mapping: Valid }, - Range { from: '྽', to: '྽', mapping: Disallowed }, - Range { from: '྾', to: '࿅', mapping: Valid }, - Range { from: '࿆', to: '࿆', mapping: Valid }, - Range { from: '࿇', to: '࿌', mapping: Valid }, - Range { from: '࿍', to: '࿍', mapping: Disallowed }, - Range { from: '࿎', to: '࿎', mapping: Valid }, - Range { from: '࿏', to: '࿏', mapping: Valid }, - Range { from: '࿐', to: '࿑', mapping: Valid }, - Range { from: '࿒', to: '࿔', mapping: Valid }, - Range { from: '࿕', to: '࿘', mapping: Valid }, - Range { from: '࿙', to: '࿚', mapping: Valid }, - Range { from: '࿛', to: '࿿', mapping: Disallowed }, - Range { from: 'က', to: 'အ', mapping: Valid }, - Range { from: 'ဢ', to: 'ဢ', mapping: Valid }, - Range { from: 'ဣ', to: 'ဧ', mapping: Valid }, - Range { from: 'ဨ', to: 'ဨ', mapping: Valid }, - Range { from: 'ဩ', to: 'ဪ', mapping: Valid }, - Range { from: 'ါ', to: 'ါ', mapping: Valid }, - Range { from: 'ာ', to: 'ဲ', mapping: Valid }, - Range { from: 'ဳ', to: 'ဵ', mapping: Valid }, - Range { from: 'ံ', to: '္', mapping: Valid }, - Range { from: '်', to: 'ဿ', mapping: Valid }, - Range { from: '၀', to: '၉', mapping: Valid }, - Range { from: '၊', to: '၏', mapping: Valid }, - Range { from: 'ၐ', to: 'ၙ', mapping: Valid }, - Range { from: 'ၚ', to: '႙', mapping: Valid }, - Range { from: 'ႚ', to: 'ႝ', mapping: Valid }, - Range { from: '႞', to: '႟', mapping: Valid }, - Range { from: 'Ⴀ', to: 'Ⴥ', mapping: Disallowed }, - Range { from: '჆', to: '჆', mapping: Disallowed }, - Range { from: 'Ⴧ', to: 'Ⴧ', mapping: Mapped("ⴧ") }, - Range { from: '჈', to: '჌', mapping: Disallowed }, - Range { from: 'Ⴭ', to: 'Ⴭ', mapping: Mapped("ⴭ") }, - Range { from: '჎', to: '჏', mapping: Disallowed }, - Range { from: 'ა', to: 'ჶ', mapping: Valid }, - Range { from: 'ჷ', to: 'ჸ', mapping: Valid }, - Range { from: 'ჹ', to: 'ჺ', mapping: Valid }, - Range { from: '჻', to: '჻', mapping: Valid }, - Range { from: 'ჼ', to: 'ჼ', mapping: Mapped("ნ") }, - Range { from: 'ჽ', to: 'ჿ', mapping: Valid }, - Range { from: 'ᄀ', to: 'ᅙ', mapping: Valid }, - Range { from: 'ᅚ', to: 'ᅞ', mapping: Valid }, - Range { from: 'ᅟ', to: 'ᅠ', mapping: Disallowed }, - Range { from: 'ᅡ', to: 'ᆢ', mapping: Valid }, - Range { from: 'ᆣ', to: 'ᆧ', mapping: Valid }, - Range { from: 'ᆨ', to: 'ᇹ', mapping: Valid }, - Range { from: 'ᇺ', to: 'ᇿ', mapping: Valid }, - Range { from: 'ሀ', to: 'ሆ', mapping: Valid }, - Range { from: 'ሇ', to: 'ሇ', mapping: Valid }, - Range { from: 'ለ', to: 'ቆ', mapping: Valid }, - Range { from: 'ቇ', to: 'ቇ', mapping: Valid }, - Range { from: 'ቈ', to: 'ቈ', mapping: Valid }, - Range { from: '቉', to: '቉', mapping: Disallowed }, - Range { from: 'ቊ', to: 'ቍ', mapping: Valid }, - Range { from: '቎', to: '቏', mapping: Disallowed }, - Range { from: 'ቐ', to: 'ቖ', mapping: Valid }, - Range { from: '቗', to: '቗', mapping: Disallowed }, - Range { from: 'ቘ', to: 'ቘ', mapping: Valid }, - Range { from: '቙', to: '቙', mapping: Disallowed }, - Range { from: 'ቚ', to: 'ቝ', mapping: Valid }, - Range { from: '቞', to: '቟', mapping: Disallowed }, - Range { from: 'በ', to: 'ኆ', mapping: Valid }, - Range { from: 'ኇ', to: 'ኇ', mapping: Valid }, - Range { from: 'ኈ', to: 'ኈ', mapping: Valid }, - Range { from: '኉', to: '኉', mapping: Disallowed }, - Range { from: 'ኊ', to: 'ኍ', mapping: Valid }, - Range { from: '኎', to: '኏', mapping: Disallowed }, - Range { from: 'ነ', to: 'ኮ', mapping: Valid }, - Range { from: 'ኯ', to: 'ኯ', mapping: Valid }, - Range { from: 'ኰ', to: 'ኰ', mapping: Valid }, - Range { from: '኱', to: '኱', mapping: Disallowed }, - Range { from: 'ኲ', to: 'ኵ', mapping: Valid }, - Range { from: '኶', to: '኷', mapping: Disallowed }, - Range { from: 'ኸ', to: 'ኾ', mapping: Valid }, - Range { from: '኿', to: '኿', mapping: Disallowed }, - Range { from: 'ዀ', to: 'ዀ', mapping: Valid }, - Range { from: '዁', to: '዁', mapping: Disallowed }, - Range { from: 'ዂ', to: 'ዅ', mapping: Valid }, - Range { from: '዆', to: '዇', mapping: Disallowed }, - Range { from: 'ወ', to: 'ዎ', mapping: Valid }, - Range { from: 'ዏ', to: 'ዏ', mapping: Valid }, - Range { from: 'ዐ', to: 'ዖ', mapping: Valid }, - Range { from: '዗', to: '዗', mapping: Disallowed }, - Range { from: 'ዘ', to: 'ዮ', mapping: Valid }, - Range { from: 'ዯ', to: 'ዯ', mapping: Valid }, - Range { from: 'ደ', to: 'ጎ', mapping: Valid }, - Range { from: 'ጏ', to: 'ጏ', mapping: Valid }, - Range { from: 'ጐ', to: 'ጐ', mapping: Valid }, - Range { from: '጑', to: '጑', mapping: Disallowed }, - Range { from: 'ጒ', to: 'ጕ', mapping: Valid }, - Range { from: '጖', to: '጗', mapping: Disallowed }, - Range { from: 'ጘ', to: 'ጞ', mapping: Valid }, - Range { from: 'ጟ', to: 'ጟ', mapping: Valid }, - Range { from: 'ጠ', to: 'ፆ', mapping: Valid }, - Range { from: 'ፇ', to: 'ፇ', mapping: Valid }, - Range { from: 'ፈ', to: 'ፚ', mapping: Valid }, - Range { from: '፛', to: '፜', mapping: Disallowed }, - Range { from: '፝', to: '፞', mapping: Valid }, - Range { from: '፟', to: '፟', mapping: Valid }, - Range { from: '፠', to: '፠', mapping: Valid }, - Range { from: '፡', to: '፼', mapping: Valid }, - Range { from: '፽', to: '፿', mapping: Disallowed }, - Range { from: 'ᎀ', to: 'ᎏ', mapping: Valid }, - Range { from: '᎐', to: '᎙', mapping: Valid }, - Range { from: '᎚', to: '᎟', mapping: Disallowed }, - Range { from: 'Ꭰ', to: 'Ᏼ', mapping: Valid }, - Range { from: 'Ᏽ', to: 'Ᏽ', mapping: Valid }, - Range { from: '᏶', to: '᏷', mapping: Disallowed }, - Range { from: 'ᏸ', to: 'ᏸ', mapping: Mapped("Ᏸ") }, - Range { from: 'ᏹ', to: 'ᏹ', mapping: Mapped("Ᏹ") }, - Range { from: 'ᏺ', to: 'ᏺ', mapping: Mapped("Ᏺ") }, - Range { from: 'ᏻ', to: 'ᏻ', mapping: Mapped("Ᏻ") }, - Range { from: 'ᏼ', to: 'ᏼ', mapping: Mapped("Ᏼ") }, - Range { from: 'ᏽ', to: 'ᏽ', mapping: Mapped("Ᏽ") }, - Range { from: '᏾', to: '᏿', mapping: Disallowed }, - Range { from: '᐀', to: '᐀', mapping: Valid }, - Range { from: 'ᐁ', to: 'ᙬ', mapping: Valid }, - Range { from: '᙭', to: '᙮', mapping: Valid }, - Range { from: 'ᙯ', to: 'ᙶ', mapping: Valid }, - Range { from: 'ᙷ', to: 'ᙿ', mapping: Valid }, - Range { from: ' ', to: ' ', mapping: Disallowed }, - Range { from: 'ᚁ', to: 'ᚚ', mapping: Valid }, - Range { from: '᚛', to: '᚜', mapping: Valid }, - Range { from: '᚝', to: '᚟', mapping: Disallowed }, - Range { from: 'ᚠ', to: 'ᛪ', mapping: Valid }, - Range { from: '᛫', to: 'ᛰ', mapping: Valid }, - Range { from: 'ᛱ', to: 'ᛸ', mapping: Valid }, - Range { from: '᛹', to: '᛿', mapping: Disallowed }, - Range { from: 'ᜀ', to: 'ᜌ', mapping: Valid }, - Range { from: 'ᜍ', to: 'ᜍ', mapping: Disallowed }, - Range { from: 'ᜎ', to: '᜔', mapping: Valid }, - Range { from: '᜕', to: 'ᜟ', mapping: Disallowed }, - Range { from: 'ᜠ', to: '᜴', mapping: Valid }, - Range { from: '᜵', to: '᜶', mapping: Valid }, - Range { from: '᜷', to: '᜿', mapping: Disallowed }, - Range { from: 'ᝀ', to: 'ᝓ', mapping: Valid }, - Range { from: '᝔', to: '᝟', mapping: Disallowed }, - Range { from: 'ᝠ', to: 'ᝬ', mapping: Valid }, - Range { from: '᝭', to: '᝭', mapping: Disallowed }, - Range { from: 'ᝮ', to: 'ᝰ', mapping: Valid }, - Range { from: '᝱', to: '᝱', mapping: Disallowed }, - Range { from: 'ᝲ', to: 'ᝳ', mapping: Valid }, - Range { from: '᝴', to: '᝿', mapping: Disallowed }, - Range { from: 'ក', to: 'ឳ', mapping: Valid }, - Range { from: '឴', to: '឵', mapping: Disallowed }, - Range { from: 'ា', to: '៓', mapping: Valid }, - Range { from: '។', to: '៖', mapping: Valid }, - Range { from: 'ៗ', to: 'ៗ', mapping: Valid }, - Range { from: '៘', to: '៛', mapping: Valid }, - Range { from: 'ៜ', to: 'ៜ', mapping: Valid }, - Range { from: '៝', to: '៝', mapping: Valid }, - Range { from: '៞', to: '៟', mapping: Disallowed }, - Range { from: '០', to: '៩', mapping: Valid }, - Range { from: '៪', to: '៯', mapping: Disallowed }, - Range { from: '៰', to: '៹', mapping: Valid }, - Range { from: '៺', to: '៿', mapping: Disallowed }, - Range { from: '᠀', to: '᠅', mapping: Valid }, - Range { from: '᠆', to: '᠆', mapping: Disallowed }, - Range { from: '᠇', to: '᠊', mapping: Valid }, - Range { from: '᠋', to: '᠍', mapping: Ignored }, - Range { from: '᠎', to: '᠎', mapping: Disallowed }, - Range { from: '᠏', to: '᠏', mapping: Disallowed }, - Range { from: '᠐', to: '᠙', mapping: Valid }, - Range { from: '᠚', to: '᠟', mapping: Disallowed }, - Range { from: 'ᠠ', to: 'ᡷ', mapping: Valid }, - Range { from: 'ᡸ', to: '᡿', mapping: Disallowed }, - Range { from: 'ᢀ', to: 'ᢩ', mapping: Valid }, - Range { from: 'ᢪ', to: 'ᢪ', mapping: Valid }, - Range { from: '᢫', to: '᢯', mapping: Disallowed }, - Range { from: 'ᢰ', to: 'ᣵ', mapping: Valid }, - Range { from: '᣶', to: '᣿', mapping: Disallowed }, - Range { from: 'ᤀ', to: 'ᤜ', mapping: Valid }, - Range { from: 'ᤝ', to: 'ᤞ', mapping: Valid }, - Range { from: '᤟', to: '᤟', mapping: Disallowed }, - Range { from: 'ᤠ', to: 'ᤫ', mapping: Valid }, - Range { from: '᤬', to: '᤯', mapping: Disallowed }, - Range { from: 'ᤰ', to: '᤻', mapping: Valid }, - Range { from: '᤼', to: '᤿', mapping: Disallowed }, - Range { from: '᥀', to: '᥀', mapping: Valid }, - Range { from: '᥁', to: '᥃', mapping: Disallowed }, - Range { from: '᥄', to: '᥅', mapping: Valid }, - Range { from: '᥆', to: 'ᥭ', mapping: Valid }, - Range { from: '᥮', to: '᥯', mapping: Disallowed }, - Range { from: 'ᥰ', to: 'ᥴ', mapping: Valid }, - Range { from: '᥵', to: '᥿', mapping: Disallowed }, - Range { from: 'ᦀ', to: 'ᦩ', mapping: Valid }, - Range { from: 'ᦪ', to: 'ᦫ', mapping: Valid }, - Range { from: '᦬', to: '᦯', mapping: Disallowed }, - Range { from: 'ᦰ', to: 'ᧉ', mapping: Valid }, - Range { from: '᧊', to: '᧏', mapping: Disallowed }, - Range { from: '᧐', to: '᧙', mapping: Valid }, - Range { from: '᧚', to: '᧚', mapping: Valid }, - Range { from: '᧛', to: '᧝', mapping: Disallowed }, - Range { from: '᧞', to: '᧟', mapping: Valid }, - Range { from: '᧠', to: '᧿', mapping: Valid }, - Range { from: 'ᨀ', to: 'ᨛ', mapping: Valid }, - Range { from: '᨜', to: '᨝', mapping: Disallowed }, - Range { from: '᨞', to: '᨟', mapping: Valid }, - Range { from: 'ᨠ', to: 'ᩞ', mapping: Valid }, - Range { from: '᩟', to: '᩟', mapping: Disallowed }, - Range { from: '᩠', to: '᩼', mapping: Valid }, - Range { from: '᩽', to: '᩾', mapping: Disallowed }, - Range { from: '᩿', to: '᪉', mapping: Valid }, - Range { from: '᪊', to: '᪏', mapping: Disallowed }, - Range { from: '᪐', to: '᪙', mapping: Valid }, - Range { from: '᪚', to: '᪟', mapping: Disallowed }, - Range { from: '᪠', to: '᪦', mapping: Valid }, - Range { from: 'ᪧ', to: 'ᪧ', mapping: Valid }, - Range { from: '᪨', to: '᪭', mapping: Valid }, - Range { from: '᪮', to: '᪯', mapping: Disallowed }, - Range { from: '᪰', to: '᪽', mapping: Valid }, - Range { from: '᪾', to: '᪾', mapping: Valid }, - Range { from: 'ᪿ', to: '᫿', mapping: Disallowed }, - Range { from: 'ᬀ', to: 'ᭋ', mapping: Valid }, - Range { from: 'ᭌ', to: '᭏', mapping: Disallowed }, - Range { from: '᭐', to: '᭙', mapping: Valid }, - Range { from: '᭚', to: '᭪', mapping: Valid }, - Range { from: '᭫', to: '᭳', mapping: Valid }, - Range { from: '᭴', to: '᭼', mapping: Valid }, - Range { from: '᭽', to: '᭿', mapping: Disallowed }, - Range { from: 'ᮀ', to: '᮪', mapping: Valid }, - Range { from: '᮫', to: 'ᮭ', mapping: Valid }, - Range { from: 'ᮮ', to: '᮹', mapping: Valid }, - Range { from: 'ᮺ', to: 'ᮿ', mapping: Valid }, - Range { from: 'ᯀ', to: '᯳', mapping: Valid }, - Range { from: '᯴', to: '᯻', mapping: Disallowed }, - Range { from: '᯼', to: '᯿', mapping: Valid }, - Range { from: 'ᰀ', to: '᰷', mapping: Valid }, - Range { from: '᰸', to: '᰺', mapping: Disallowed }, - Range { from: '᰻', to: '᰿', mapping: Valid }, - Range { from: '᱀', to: '᱉', mapping: Valid }, - Range { from: '᱊', to: '᱌', mapping: Disallowed }, - Range { from: 'ᱍ', to: 'ᱽ', mapping: Valid }, - Range { from: '᱾', to: '᱿', mapping: Valid }, - Range { from: 'ᲀ', to: 'Ჿ', mapping: Disallowed }, - Range { from: '᳀', to: '᳇', mapping: Valid }, - Range { from: '᳈', to: '᳏', mapping: Disallowed }, - Range { from: '᳐', to: '᳒', mapping: Valid }, - Range { from: '᳓', to: '᳓', mapping: Valid }, - Range { from: '᳔', to: 'ᳲ', mapping: Valid }, - Range { from: 'ᳳ', to: 'ᳶ', mapping: Valid }, - Range { from: '᳷', to: '᳷', mapping: Disallowed }, - Range { from: '᳸', to: '᳹', mapping: Valid }, - Range { from: 'ᳺ', to: '᳿', mapping: Disallowed }, - Range { from: 'ᴀ', to: 'ᴫ', mapping: Valid }, - Range { from: 'ᴬ', to: 'ᴬ', mapping: Mapped("a") }, - Range { from: 'ᴭ', to: 'ᴭ', mapping: Mapped("æ") }, - Range { from: 'ᴮ', to: 'ᴮ', mapping: Mapped("b") }, - Range { from: 'ᴯ', to: 'ᴯ', mapping: Valid }, - Range { from: 'ᴰ', to: 'ᴰ', mapping: Mapped("d") }, - Range { from: 'ᴱ', to: 'ᴱ', mapping: Mapped("e") }, - Range { from: 'ᴲ', to: 'ᴲ', mapping: Mapped("ǝ") }, - Range { from: 'ᴳ', to: 'ᴳ', mapping: Mapped("g") }, - Range { from: 'ᴴ', to: 'ᴴ', mapping: Mapped("h") }, - Range { from: 'ᴵ', to: 'ᴵ', mapping: Mapped("i") }, - Range { from: 'ᴶ', to: 'ᴶ', mapping: Mapped("j") }, - Range { from: 'ᴷ', to: 'ᴷ', mapping: Mapped("k") }, - Range { from: 'ᴸ', to: 'ᴸ', mapping: Mapped("l") }, - Range { from: 'ᴹ', to: 'ᴹ', mapping: Mapped("m") }, - Range { from: 'ᴺ', to: 'ᴺ', mapping: Mapped("n") }, - Range { from: 'ᴻ', to: 'ᴻ', mapping: Valid }, - Range { from: 'ᴼ', to: 'ᴼ', mapping: Mapped("o") }, - Range { from: 'ᴽ', to: 'ᴽ', mapping: Mapped("ȣ") }, - Range { from: 'ᴾ', to: 'ᴾ', mapping: Mapped("p") }, - Range { from: 'ᴿ', to: 'ᴿ', mapping: Mapped("r") }, - Range { from: 'ᵀ', to: 'ᵀ', mapping: Mapped("t") }, - Range { from: 'ᵁ', to: 'ᵁ', mapping: Mapped("u") }, - Range { from: 'ᵂ', to: 'ᵂ', mapping: Mapped("w") }, - Range { from: 'ᵃ', to: 'ᵃ', mapping: Mapped("a") }, - Range { from: 'ᵄ', to: 'ᵄ', mapping: Mapped("ɐ") }, - Range { from: 'ᵅ', to: 'ᵅ', mapping: Mapped("ɑ") }, - Range { from: 'ᵆ', to: 'ᵆ', mapping: Mapped("ᴂ") }, - Range { from: 'ᵇ', to: 'ᵇ', mapping: Mapped("b") }, - Range { from: 'ᵈ', to: 'ᵈ', mapping: Mapped("d") }, - Range { from: 'ᵉ', to: 'ᵉ', mapping: Mapped("e") }, - Range { from: 'ᵊ', to: 'ᵊ', mapping: Mapped("ə") }, - Range { from: 'ᵋ', to: 'ᵋ', mapping: Mapped("ɛ") }, - Range { from: 'ᵌ', to: 'ᵌ', mapping: Mapped("ɜ") }, - Range { from: 'ᵍ', to: 'ᵍ', mapping: Mapped("g") }, - Range { from: 'ᵎ', to: 'ᵎ', mapping: Valid }, - Range { from: 'ᵏ', to: 'ᵏ', mapping: Mapped("k") }, - Range { from: 'ᵐ', to: 'ᵐ', mapping: Mapped("m") }, - Range { from: 'ᵑ', to: 'ᵑ', mapping: Mapped("ŋ") }, - Range { from: 'ᵒ', to: 'ᵒ', mapping: Mapped("o") }, - Range { from: 'ᵓ', to: 'ᵓ', mapping: Mapped("ɔ") }, - Range { from: 'ᵔ', to: 'ᵔ', mapping: Mapped("ᴖ") }, - Range { from: 'ᵕ', to: 'ᵕ', mapping: Mapped("ᴗ") }, - Range { from: 'ᵖ', to: 'ᵖ', mapping: Mapped("p") }, - Range { from: 'ᵗ', to: 'ᵗ', mapping: Mapped("t") }, - Range { from: 'ᵘ', to: 'ᵘ', mapping: Mapped("u") }, - Range { from: 'ᵙ', to: 'ᵙ', mapping: Mapped("ᴝ") }, - Range { from: 'ᵚ', to: 'ᵚ', mapping: Mapped("ɯ") }, - Range { from: 'ᵛ', to: 'ᵛ', mapping: Mapped("v") }, - Range { from: 'ᵜ', to: 'ᵜ', mapping: Mapped("ᴥ") }, - Range { from: 'ᵝ', to: 'ᵝ', mapping: Mapped("β") }, - Range { from: 'ᵞ', to: 'ᵞ', mapping: Mapped("γ") }, - Range { from: 'ᵟ', to: 'ᵟ', mapping: Mapped("δ") }, - Range { from: 'ᵠ', to: 'ᵠ', mapping: Mapped("φ") }, - Range { from: 'ᵡ', to: 'ᵡ', mapping: Mapped("χ") }, - Range { from: 'ᵢ', to: 'ᵢ', mapping: Mapped("i") }, - Range { from: 'ᵣ', to: 'ᵣ', mapping: Mapped("r") }, - Range { from: 'ᵤ', to: 'ᵤ', mapping: Mapped("u") }, - Range { from: 'ᵥ', to: 'ᵥ', mapping: Mapped("v") }, - Range { from: 'ᵦ', to: 'ᵦ', mapping: Mapped("β") }, - Range { from: 'ᵧ', to: 'ᵧ', mapping: Mapped("γ") }, - Range { from: 'ᵨ', to: 'ᵨ', mapping: Mapped("ρ") }, - Range { from: 'ᵩ', to: 'ᵩ', mapping: Mapped("φ") }, - Range { from: 'ᵪ', to: 'ᵪ', mapping: Mapped("χ") }, - Range { from: 'ᵫ', to: 'ᵫ', mapping: Valid }, - Range { from: 'ᵬ', to: 'ᵷ', mapping: Valid }, - Range { from: 'ᵸ', to: 'ᵸ', mapping: Mapped("н") }, - Range { from: 'ᵹ', to: 'ᶚ', mapping: Valid }, - Range { from: 'ᶛ', to: 'ᶛ', mapping: Mapped("ɒ") }, - Range { from: 'ᶜ', to: 'ᶜ', mapping: Mapped("c") }, - Range { from: 'ᶝ', to: 'ᶝ', mapping: Mapped("ɕ") }, - Range { from: 'ᶞ', to: 'ᶞ', mapping: Mapped("ð") }, - Range { from: 'ᶟ', to: 'ᶟ', mapping: Mapped("ɜ") }, - Range { from: 'ᶠ', to: 'ᶠ', mapping: Mapped("f") }, - Range { from: 'ᶡ', to: 'ᶡ', mapping: Mapped("ɟ") }, - Range { from: 'ᶢ', to: 'ᶢ', mapping: Mapped("ɡ") }, - Range { from: 'ᶣ', to: 'ᶣ', mapping: Mapped("ɥ") }, - Range { from: 'ᶤ', to: 'ᶤ', mapping: Mapped("ɨ") }, - Range { from: 'ᶥ', to: 'ᶥ', mapping: Mapped("ɩ") }, - Range { from: 'ᶦ', to: 'ᶦ', mapping: Mapped("ɪ") }, - Range { from: 'ᶧ', to: 'ᶧ', mapping: Mapped("ᵻ") }, - Range { from: 'ᶨ', to: 'ᶨ', mapping: Mapped("ʝ") }, - Range { from: 'ᶩ', to: 'ᶩ', mapping: Mapped("ɭ") }, - Range { from: 'ᶪ', to: 'ᶪ', mapping: Mapped("ᶅ") }, - Range { from: 'ᶫ', to: 'ᶫ', mapping: Mapped("ʟ") }, - Range { from: 'ᶬ', to: 'ᶬ', mapping: Mapped("ɱ") }, - Range { from: 'ᶭ', to: 'ᶭ', mapping: Mapped("ɰ") }, - Range { from: 'ᶮ', to: 'ᶮ', mapping: Mapped("ɲ") }, - Range { from: 'ᶯ', to: 'ᶯ', mapping: Mapped("ɳ") }, - Range { from: 'ᶰ', to: 'ᶰ', mapping: Mapped("ɴ") }, - Range { from: 'ᶱ', to: 'ᶱ', mapping: Mapped("ɵ") }, - Range { from: 'ᶲ', to: 'ᶲ', mapping: Mapped("ɸ") }, - Range { from: 'ᶳ', to: 'ᶳ', mapping: Mapped("ʂ") }, - Range { from: 'ᶴ', to: 'ᶴ', mapping: Mapped("ʃ") }, - Range { from: 'ᶵ', to: 'ᶵ', mapping: Mapped("ƫ") }, - Range { from: 'ᶶ', to: 'ᶶ', mapping: Mapped("ʉ") }, - Range { from: 'ᶷ', to: 'ᶷ', mapping: Mapped("ʊ") }, - Range { from: 'ᶸ', to: 'ᶸ', mapping: Mapped("ᴜ") }, - Range { from: 'ᶹ', to: 'ᶹ', mapping: Mapped("ʋ") }, - Range { from: 'ᶺ', to: 'ᶺ', mapping: Mapped("ʌ") }, - Range { from: 'ᶻ', to: 'ᶻ', mapping: Mapped("z") }, - Range { from: 'ᶼ', to: 'ᶼ', mapping: Mapped("ʐ") }, - Range { from: 'ᶽ', to: 'ᶽ', mapping: Mapped("ʑ") }, - Range { from: 'ᶾ', to: 'ᶾ', mapping: Mapped("ʒ") }, - Range { from: 'ᶿ', to: 'ᶿ', mapping: Mapped("θ") }, - Range { from: '᷀', to: '᷃', mapping: Valid }, - Range { from: '᷄', to: '᷊', mapping: Valid }, - Range { from: '᷋', to: 'ᷦ', mapping: Valid }, - Range { from: 'ᷧ', to: '᷵', mapping: Valid }, - Range { from: '᷶', to: '᷻', mapping: Disallowed }, - Range { from: '᷼', to: '᷼', mapping: Valid }, - Range { from: '᷽', to: '᷽', mapping: Valid }, - Range { from: '᷾', to: '᷿', mapping: Valid }, - Range { from: 'Ḁ', to: 'Ḁ', mapping: Mapped("ḁ") }, - Range { from: 'ḁ', to: 'ḁ', mapping: Valid }, - Range { from: 'Ḃ', to: 'Ḃ', mapping: Mapped("ḃ") }, - Range { from: 'ḃ', to: 'ḃ', mapping: Valid }, - Range { from: 'Ḅ', to: 'Ḅ', mapping: Mapped("ḅ") }, - Range { from: 'ḅ', to: 'ḅ', mapping: Valid }, - Range { from: 'Ḇ', to: 'Ḇ', mapping: Mapped("ḇ") }, - Range { from: 'ḇ', to: 'ḇ', mapping: Valid }, - Range { from: 'Ḉ', to: 'Ḉ', mapping: Mapped("ḉ") }, - Range { from: 'ḉ', to: 'ḉ', mapping: Valid }, - Range { from: 'Ḋ', to: 'Ḋ', mapping: Mapped("ḋ") }, - Range { from: 'ḋ', to: 'ḋ', mapping: Valid }, - Range { from: 'Ḍ', to: 'Ḍ', mapping: Mapped("ḍ") }, - Range { from: 'ḍ', to: 'ḍ', mapping: Valid }, - Range { from: 'Ḏ', to: 'Ḏ', mapping: Mapped("ḏ") }, - Range { from: 'ḏ', to: 'ḏ', mapping: Valid }, - Range { from: 'Ḑ', to: 'Ḑ', mapping: Mapped("ḑ") }, - Range { from: 'ḑ', to: 'ḑ', mapping: Valid }, - Range { from: 'Ḓ', to: 'Ḓ', mapping: Mapped("ḓ") }, - Range { from: 'ḓ', to: 'ḓ', mapping: Valid }, - Range { from: 'Ḕ', to: 'Ḕ', mapping: Mapped("ḕ") }, - Range { from: 'ḕ', to: 'ḕ', mapping: Valid }, - Range { from: 'Ḗ', to: 'Ḗ', mapping: Mapped("ḗ") }, - Range { from: 'ḗ', to: 'ḗ', mapping: Valid }, - Range { from: 'Ḙ', to: 'Ḙ', mapping: Mapped("ḙ") }, - Range { from: 'ḙ', to: 'ḙ', mapping: Valid }, - Range { from: 'Ḛ', to: 'Ḛ', mapping: Mapped("ḛ") }, - Range { from: 'ḛ', to: 'ḛ', mapping: Valid }, - Range { from: 'Ḝ', to: 'Ḝ', mapping: Mapped("ḝ") }, - Range { from: 'ḝ', to: 'ḝ', mapping: Valid }, - Range { from: 'Ḟ', to: 'Ḟ', mapping: Mapped("ḟ") }, - Range { from: 'ḟ', to: 'ḟ', mapping: Valid }, - Range { from: 'Ḡ', to: 'Ḡ', mapping: Mapped("ḡ") }, - Range { from: 'ḡ', to: 'ḡ', mapping: Valid }, - Range { from: 'Ḣ', to: 'Ḣ', mapping: Mapped("ḣ") }, - Range { from: 'ḣ', to: 'ḣ', mapping: Valid }, - Range { from: 'Ḥ', to: 'Ḥ', mapping: Mapped("ḥ") }, - Range { from: 'ḥ', to: 'ḥ', mapping: Valid }, - Range { from: 'Ḧ', to: 'Ḧ', mapping: Mapped("ḧ") }, - Range { from: 'ḧ', to: 'ḧ', mapping: Valid }, - Range { from: 'Ḩ', to: 'Ḩ', mapping: Mapped("ḩ") }, - Range { from: 'ḩ', to: 'ḩ', mapping: Valid }, - Range { from: 'Ḫ', to: 'Ḫ', mapping: Mapped("ḫ") }, - Range { from: 'ḫ', to: 'ḫ', mapping: Valid }, - Range { from: 'Ḭ', to: 'Ḭ', mapping: Mapped("ḭ") }, - Range { from: 'ḭ', to: 'ḭ', mapping: Valid }, - Range { from: 'Ḯ', to: 'Ḯ', mapping: Mapped("ḯ") }, - Range { from: 'ḯ', to: 'ḯ', mapping: Valid }, - Range { from: 'Ḱ', to: 'Ḱ', mapping: Mapped("ḱ") }, - Range { from: 'ḱ', to: 'ḱ', mapping: Valid }, - Range { from: 'Ḳ', to: 'Ḳ', mapping: Mapped("ḳ") }, - Range { from: 'ḳ', to: 'ḳ', mapping: Valid }, - Range { from: 'Ḵ', to: 'Ḵ', mapping: Mapped("ḵ") }, - Range { from: 'ḵ', to: 'ḵ', mapping: Valid }, - Range { from: 'Ḷ', to: 'Ḷ', mapping: Mapped("ḷ") }, - Range { from: 'ḷ', to: 'ḷ', mapping: Valid }, - Range { from: 'Ḹ', to: 'Ḹ', mapping: Mapped("ḹ") }, - Range { from: 'ḹ', to: 'ḹ', mapping: Valid }, - Range { from: 'Ḻ', to: 'Ḻ', mapping: Mapped("ḻ") }, - Range { from: 'ḻ', to: 'ḻ', mapping: Valid }, - Range { from: 'Ḽ', to: 'Ḽ', mapping: Mapped("ḽ") }, - Range { from: 'ḽ', to: 'ḽ', mapping: Valid }, - Range { from: 'Ḿ', to: 'Ḿ', mapping: Mapped("ḿ") }, - Range { from: 'ḿ', to: 'ḿ', mapping: Valid }, - Range { from: 'Ṁ', to: 'Ṁ', mapping: Mapped("ṁ") }, - Range { from: 'ṁ', to: 'ṁ', mapping: Valid }, - Range { from: 'Ṃ', to: 'Ṃ', mapping: Mapped("ṃ") }, - Range { from: 'ṃ', to: 'ṃ', mapping: Valid }, - Range { from: 'Ṅ', to: 'Ṅ', mapping: Mapped("ṅ") }, - Range { from: 'ṅ', to: 'ṅ', mapping: Valid }, - Range { from: 'Ṇ', to: 'Ṇ', mapping: Mapped("ṇ") }, - Range { from: 'ṇ', to: 'ṇ', mapping: Valid }, - Range { from: 'Ṉ', to: 'Ṉ', mapping: Mapped("ṉ") }, - Range { from: 'ṉ', to: 'ṉ', mapping: Valid }, - Range { from: 'Ṋ', to: 'Ṋ', mapping: Mapped("ṋ") }, - Range { from: 'ṋ', to: 'ṋ', mapping: Valid }, - Range { from: 'Ṍ', to: 'Ṍ', mapping: Mapped("ṍ") }, - Range { from: 'ṍ', to: 'ṍ', mapping: Valid }, - Range { from: 'Ṏ', to: 'Ṏ', mapping: Mapped("ṏ") }, - Range { from: 'ṏ', to: 'ṏ', mapping: Valid }, - Range { from: 'Ṑ', to: 'Ṑ', mapping: Mapped("ṑ") }, - Range { from: 'ṑ', to: 'ṑ', mapping: Valid }, - Range { from: 'Ṓ', to: 'Ṓ', mapping: Mapped("ṓ") }, - Range { from: 'ṓ', to: 'ṓ', mapping: Valid }, - Range { from: 'Ṕ', to: 'Ṕ', mapping: Mapped("ṕ") }, - Range { from: 'ṕ', to: 'ṕ', mapping: Valid }, - Range { from: 'Ṗ', to: 'Ṗ', mapping: Mapped("ṗ") }, - Range { from: 'ṗ', to: 'ṗ', mapping: Valid }, - Range { from: 'Ṙ', to: 'Ṙ', mapping: Mapped("ṙ") }, - Range { from: 'ṙ', to: 'ṙ', mapping: Valid }, - Range { from: 'Ṛ', to: 'Ṛ', mapping: Mapped("ṛ") }, - Range { from: 'ṛ', to: 'ṛ', mapping: Valid }, - Range { from: 'Ṝ', to: 'Ṝ', mapping: Mapped("ṝ") }, - Range { from: 'ṝ', to: 'ṝ', mapping: Valid }, - Range { from: 'Ṟ', to: 'Ṟ', mapping: Mapped("ṟ") }, - Range { from: 'ṟ', to: 'ṟ', mapping: Valid }, - Range { from: 'Ṡ', to: 'Ṡ', mapping: Mapped("ṡ") }, - Range { from: 'ṡ', to: 'ṡ', mapping: Valid }, - Range { from: 'Ṣ', to: 'Ṣ', mapping: Mapped("ṣ") }, - Range { from: 'ṣ', to: 'ṣ', mapping: Valid }, - Range { from: 'Ṥ', to: 'Ṥ', mapping: Mapped("ṥ") }, - Range { from: 'ṥ', to: 'ṥ', mapping: Valid }, - Range { from: 'Ṧ', to: 'Ṧ', mapping: Mapped("ṧ") }, - Range { from: 'ṧ', to: 'ṧ', mapping: Valid }, - Range { from: 'Ṩ', to: 'Ṩ', mapping: Mapped("ṩ") }, - Range { from: 'ṩ', to: 'ṩ', mapping: Valid }, - Range { from: 'Ṫ', to: 'Ṫ', mapping: Mapped("ṫ") }, - Range { from: 'ṫ', to: 'ṫ', mapping: Valid }, - Range { from: 'Ṭ', to: 'Ṭ', mapping: Mapped("ṭ") }, - Range { from: 'ṭ', to: 'ṭ', mapping: Valid }, - Range { from: 'Ṯ', to: 'Ṯ', mapping: Mapped("ṯ") }, - Range { from: 'ṯ', to: 'ṯ', mapping: Valid }, - Range { from: 'Ṱ', to: 'Ṱ', mapping: Mapped("ṱ") }, - Range { from: 'ṱ', to: 'ṱ', mapping: Valid }, - Range { from: 'Ṳ', to: 'Ṳ', mapping: Mapped("ṳ") }, - Range { from: 'ṳ', to: 'ṳ', mapping: Valid }, - Range { from: 'Ṵ', to: 'Ṵ', mapping: Mapped("ṵ") }, - Range { from: 'ṵ', to: 'ṵ', mapping: Valid }, - Range { from: 'Ṷ', to: 'Ṷ', mapping: Mapped("ṷ") }, - Range { from: 'ṷ', to: 'ṷ', mapping: Valid }, - Range { from: 'Ṹ', to: 'Ṹ', mapping: Mapped("ṹ") }, - Range { from: 'ṹ', to: 'ṹ', mapping: Valid }, - Range { from: 'Ṻ', to: 'Ṻ', mapping: Mapped("ṻ") }, - Range { from: 'ṻ', to: 'ṻ', mapping: Valid }, - Range { from: 'Ṽ', to: 'Ṽ', mapping: Mapped("ṽ") }, - Range { from: 'ṽ', to: 'ṽ', mapping: Valid }, - Range { from: 'Ṿ', to: 'Ṿ', mapping: Mapped("ṿ") }, - Range { from: 'ṿ', to: 'ṿ', mapping: Valid }, - Range { from: 'Ẁ', to: 'Ẁ', mapping: Mapped("ẁ") }, - Range { from: 'ẁ', to: 'ẁ', mapping: Valid }, - Range { from: 'Ẃ', to: 'Ẃ', mapping: Mapped("ẃ") }, - Range { from: 'ẃ', to: 'ẃ', mapping: Valid }, - Range { from: 'Ẅ', to: 'Ẅ', mapping: Mapped("ẅ") }, - Range { from: 'ẅ', to: 'ẅ', mapping: Valid }, - Range { from: 'Ẇ', to: 'Ẇ', mapping: Mapped("ẇ") }, - Range { from: 'ẇ', to: 'ẇ', mapping: Valid }, - Range { from: 'Ẉ', to: 'Ẉ', mapping: Mapped("ẉ") }, - Range { from: 'ẉ', to: 'ẉ', mapping: Valid }, - Range { from: 'Ẋ', to: 'Ẋ', mapping: Mapped("ẋ") }, - Range { from: 'ẋ', to: 'ẋ', mapping: Valid }, - Range { from: 'Ẍ', to: 'Ẍ', mapping: Mapped("ẍ") }, - Range { from: 'ẍ', to: 'ẍ', mapping: Valid }, - Range { from: 'Ẏ', to: 'Ẏ', mapping: Mapped("ẏ") }, - Range { from: 'ẏ', to: 'ẏ', mapping: Valid }, - Range { from: 'Ẑ', to: 'Ẑ', mapping: Mapped("ẑ") }, - Range { from: 'ẑ', to: 'ẑ', mapping: Valid }, - Range { from: 'Ẓ', to: 'Ẓ', mapping: Mapped("ẓ") }, - Range { from: 'ẓ', to: 'ẓ', mapping: Valid }, - Range { from: 'Ẕ', to: 'Ẕ', mapping: Mapped("ẕ") }, - Range { from: 'ẕ', to: 'ẙ', mapping: Valid }, - Range { from: 'ẚ', to: 'ẚ', mapping: Mapped("aʾ") }, - Range { from: 'ẛ', to: 'ẛ', mapping: Mapped("ṡ") }, - Range { from: 'ẜ', to: 'ẝ', mapping: Valid }, - Range { from: 'ẞ', to: 'ẞ', mapping: Mapped("ss") }, - Range { from: 'ẟ', to: 'ẟ', mapping: Valid }, - Range { from: 'Ạ', to: 'Ạ', mapping: Mapped("ạ") }, - Range { from: 'ạ', to: 'ạ', mapping: Valid }, - Range { from: 'Ả', to: 'Ả', mapping: Mapped("ả") }, - Range { from: 'ả', to: 'ả', mapping: Valid }, - Range { from: 'Ấ', to: 'Ấ', mapping: Mapped("ấ") }, - Range { from: 'ấ', to: 'ấ', mapping: Valid }, - Range { from: 'Ầ', to: 'Ầ', mapping: Mapped("ầ") }, - Range { from: 'ầ', to: 'ầ', mapping: Valid }, - Range { from: 'Ẩ', to: 'Ẩ', mapping: Mapped("ẩ") }, - Range { from: 'ẩ', to: 'ẩ', mapping: Valid }, - Range { from: 'Ẫ', to: 'Ẫ', mapping: Mapped("ẫ") }, - Range { from: 'ẫ', to: 'ẫ', mapping: Valid }, - Range { from: 'Ậ', to: 'Ậ', mapping: Mapped("ậ") }, - Range { from: 'ậ', to: 'ậ', mapping: Valid }, - Range { from: 'Ắ', to: 'Ắ', mapping: Mapped("ắ") }, - Range { from: 'ắ', to: 'ắ', mapping: Valid }, - Range { from: 'Ằ', to: 'Ằ', mapping: Mapped("ằ") }, - Range { from: 'ằ', to: 'ằ', mapping: Valid }, - Range { from: 'Ẳ', to: 'Ẳ', mapping: Mapped("ẳ") }, - Range { from: 'ẳ', to: 'ẳ', mapping: Valid }, - Range { from: 'Ẵ', to: 'Ẵ', mapping: Mapped("ẵ") }, - Range { from: 'ẵ', to: 'ẵ', mapping: Valid }, - Range { from: 'Ặ', to: 'Ặ', mapping: Mapped("ặ") }, - Range { from: 'ặ', to: 'ặ', mapping: Valid }, - Range { from: 'Ẹ', to: 'Ẹ', mapping: Mapped("ẹ") }, - Range { from: 'ẹ', to: 'ẹ', mapping: Valid }, - Range { from: 'Ẻ', to: 'Ẻ', mapping: Mapped("ẻ") }, - Range { from: 'ẻ', to: 'ẻ', mapping: Valid }, - Range { from: 'Ẽ', to: 'Ẽ', mapping: Mapped("ẽ") }, - Range { from: 'ẽ', to: 'ẽ', mapping: Valid }, - Range { from: 'Ế', to: 'Ế', mapping: Mapped("ế") }, - Range { from: 'ế', to: 'ế', mapping: Valid }, - Range { from: 'Ề', to: 'Ề', mapping: Mapped("ề") }, - Range { from: 'ề', to: 'ề', mapping: Valid }, - Range { from: 'Ể', to: 'Ể', mapping: Mapped("ể") }, - Range { from: 'ể', to: 'ể', mapping: Valid }, - Range { from: 'Ễ', to: 'Ễ', mapping: Mapped("ễ") }, - Range { from: 'ễ', to: 'ễ', mapping: Valid }, - Range { from: 'Ệ', to: 'Ệ', mapping: Mapped("ệ") }, - Range { from: 'ệ', to: 'ệ', mapping: Valid }, - Range { from: 'Ỉ', to: 'Ỉ', mapping: Mapped("ỉ") }, - Range { from: 'ỉ', to: 'ỉ', mapping: Valid }, - Range { from: 'Ị', to: 'Ị', mapping: Mapped("ị") }, - Range { from: 'ị', to: 'ị', mapping: Valid }, - Range { from: 'Ọ', to: 'Ọ', mapping: Mapped("ọ") }, - Range { from: 'ọ', to: 'ọ', mapping: Valid }, - Range { from: 'Ỏ', to: 'Ỏ', mapping: Mapped("ỏ") }, - Range { from: 'ỏ', to: 'ỏ', mapping: Valid }, - Range { from: 'Ố', to: 'Ố', mapping: Mapped("ố") }, - Range { from: 'ố', to: 'ố', mapping: Valid }, - Range { from: 'Ồ', to: 'Ồ', mapping: Mapped("ồ") }, - Range { from: 'ồ', to: 'ồ', mapping: Valid }, - Range { from: 'Ổ', to: 'Ổ', mapping: Mapped("ổ") }, - Range { from: 'ổ', to: 'ổ', mapping: Valid }, - Range { from: 'Ỗ', to: 'Ỗ', mapping: Mapped("ỗ") }, - Range { from: 'ỗ', to: 'ỗ', mapping: Valid }, - Range { from: 'Ộ', to: 'Ộ', mapping: Mapped("ộ") }, - Range { from: 'ộ', to: 'ộ', mapping: Valid }, - Range { from: 'Ớ', to: 'Ớ', mapping: Mapped("ớ") }, - Range { from: 'ớ', to: 'ớ', mapping: Valid }, - Range { from: 'Ờ', to: 'Ờ', mapping: Mapped("ờ") }, - Range { from: 'ờ', to: 'ờ', mapping: Valid }, - Range { from: 'Ở', to: 'Ở', mapping: Mapped("ở") }, - Range { from: 'ở', to: 'ở', mapping: Valid }, - Range { from: 'Ỡ', to: 'Ỡ', mapping: Mapped("ỡ") }, - Range { from: 'ỡ', to: 'ỡ', mapping: Valid }, - Range { from: 'Ợ', to: 'Ợ', mapping: Mapped("ợ") }, - Range { from: 'ợ', to: 'ợ', mapping: Valid }, - Range { from: 'Ụ', to: 'Ụ', mapping: Mapped("ụ") }, - Range { from: 'ụ', to: 'ụ', mapping: Valid }, - Range { from: 'Ủ', to: 'Ủ', mapping: Mapped("ủ") }, - Range { from: 'ủ', to: 'ủ', mapping: Valid }, - Range { from: 'Ứ', to: 'Ứ', mapping: Mapped("ứ") }, - Range { from: 'ứ', to: 'ứ', mapping: Valid }, - Range { from: 'Ừ', to: 'Ừ', mapping: Mapped("ừ") }, - Range { from: 'ừ', to: 'ừ', mapping: Valid }, - Range { from: 'Ử', to: 'Ử', mapping: Mapped("ử") }, - Range { from: 'ử', to: 'ử', mapping: Valid }, - Range { from: 'Ữ', to: 'Ữ', mapping: Mapped("ữ") }, - Range { from: 'ữ', to: 'ữ', mapping: Valid }, - Range { from: 'Ự', to: 'Ự', mapping: Mapped("ự") }, - Range { from: 'ự', to: 'ự', mapping: Valid }, - Range { from: 'Ỳ', to: 'Ỳ', mapping: Mapped("ỳ") }, - Range { from: 'ỳ', to: 'ỳ', mapping: Valid }, - Range { from: 'Ỵ', to: 'Ỵ', mapping: Mapped("ỵ") }, - Range { from: 'ỵ', to: 'ỵ', mapping: Valid }, - Range { from: 'Ỷ', to: 'Ỷ', mapping: Mapped("ỷ") }, - Range { from: 'ỷ', to: 'ỷ', mapping: Valid }, - Range { from: 'Ỹ', to: 'Ỹ', mapping: Mapped("ỹ") }, - Range { from: 'ỹ', to: 'ỹ', mapping: Valid }, - Range { from: 'Ỻ', to: 'Ỻ', mapping: Mapped("ỻ") }, - Range { from: 'ỻ', to: 'ỻ', mapping: Valid }, - Range { from: 'Ỽ', to: 'Ỽ', mapping: Mapped("ỽ") }, - Range { from: 'ỽ', to: 'ỽ', mapping: Valid }, - Range { from: 'Ỿ', to: 'Ỿ', mapping: Mapped("ỿ") }, - Range { from: 'ỿ', to: 'ỿ', mapping: Valid }, - Range { from: 'ἀ', to: 'ἇ', mapping: Valid }, - Range { from: 'Ἀ', to: 'Ἀ', mapping: Mapped("ἀ") }, - Range { from: 'Ἁ', to: 'Ἁ', mapping: Mapped("ἁ") }, - Range { from: 'Ἂ', to: 'Ἂ', mapping: Mapped("ἂ") }, - Range { from: 'Ἃ', to: 'Ἃ', mapping: Mapped("ἃ") }, - Range { from: 'Ἄ', to: 'Ἄ', mapping: Mapped("ἄ") }, - Range { from: 'Ἅ', to: 'Ἅ', mapping: Mapped("ἅ") }, - Range { from: 'Ἆ', to: 'Ἆ', mapping: Mapped("ἆ") }, - Range { from: 'Ἇ', to: 'Ἇ', mapping: Mapped("ἇ") }, - Range { from: 'ἐ', to: 'ἕ', mapping: Valid }, - Range { from: '἖', to: '἗', mapping: Disallowed }, - Range { from: 'Ἐ', to: 'Ἐ', mapping: Mapped("ἐ") }, - Range { from: 'Ἑ', to: 'Ἑ', mapping: Mapped("ἑ") }, - Range { from: 'Ἒ', to: 'Ἒ', mapping: Mapped("ἒ") }, - Range { from: 'Ἓ', to: 'Ἓ', mapping: Mapped("ἓ") }, - Range { from: 'Ἔ', to: 'Ἔ', mapping: Mapped("ἔ") }, - Range { from: 'Ἕ', to: 'Ἕ', mapping: Mapped("ἕ") }, - Range { from: '἞', to: '἟', mapping: Disallowed }, - Range { from: 'ἠ', to: 'ἧ', mapping: Valid }, - Range { from: 'Ἠ', to: 'Ἠ', mapping: Mapped("ἠ") }, - Range { from: 'Ἡ', to: 'Ἡ', mapping: Mapped("ἡ") }, - Range { from: 'Ἢ', to: 'Ἢ', mapping: Mapped("ἢ") }, - Range { from: 'Ἣ', to: 'Ἣ', mapping: Mapped("ἣ") }, - Range { from: 'Ἤ', to: 'Ἤ', mapping: Mapped("ἤ") }, - Range { from: 'Ἥ', to: 'Ἥ', mapping: Mapped("ἥ") }, - Range { from: 'Ἦ', to: 'Ἦ', mapping: Mapped("ἦ") }, - Range { from: 'Ἧ', to: 'Ἧ', mapping: Mapped("ἧ") }, - Range { from: 'ἰ', to: 'ἷ', mapping: Valid }, - Range { from: 'Ἰ', to: 'Ἰ', mapping: Mapped("ἰ") }, - Range { from: 'Ἱ', to: 'Ἱ', mapping: Mapped("ἱ") }, - Range { from: 'Ἲ', to: 'Ἲ', mapping: Mapped("ἲ") }, - Range { from: 'Ἳ', to: 'Ἳ', mapping: Mapped("ἳ") }, - Range { from: 'Ἴ', to: 'Ἴ', mapping: Mapped("ἴ") }, - Range { from: 'Ἵ', to: 'Ἵ', mapping: Mapped("ἵ") }, - Range { from: 'Ἶ', to: 'Ἶ', mapping: Mapped("ἶ") }, - Range { from: 'Ἷ', to: 'Ἷ', mapping: Mapped("ἷ") }, - Range { from: 'ὀ', to: 'ὅ', mapping: Valid }, - Range { from: '὆', to: '὇', mapping: Disallowed }, - Range { from: 'Ὀ', to: 'Ὀ', mapping: Mapped("ὀ") }, - Range { from: 'Ὁ', to: 'Ὁ', mapping: Mapped("ὁ") }, - Range { from: 'Ὂ', to: 'Ὂ', mapping: Mapped("ὂ") }, - Range { from: 'Ὃ', to: 'Ὃ', mapping: Mapped("ὃ") }, - Range { from: 'Ὄ', to: 'Ὄ', mapping: Mapped("ὄ") }, - Range { from: 'Ὅ', to: 'Ὅ', mapping: Mapped("ὅ") }, - Range { from: '὎', to: '὏', mapping: Disallowed }, - Range { from: 'ὐ', to: 'ὗ', mapping: Valid }, - Range { from: '὘', to: '὘', mapping: Disallowed }, - Range { from: 'Ὑ', to: 'Ὑ', mapping: Mapped("ὑ") }, - Range { from: '὚', to: '὚', mapping: Disallowed }, - Range { from: 'Ὓ', to: 'Ὓ', mapping: Mapped("ὓ") }, - Range { from: '὜', to: '὜', mapping: Disallowed }, - Range { from: 'Ὕ', to: 'Ὕ', mapping: Mapped("ὕ") }, - Range { from: '὞', to: '὞', mapping: Disallowed }, - Range { from: 'Ὗ', to: 'Ὗ', mapping: Mapped("ὗ") }, - Range { from: 'ὠ', to: 'ὧ', mapping: Valid }, - Range { from: 'Ὠ', to: 'Ὠ', mapping: Mapped("ὠ") }, - Range { from: 'Ὡ', to: 'Ὡ', mapping: Mapped("ὡ") }, - Range { from: 'Ὢ', to: 'Ὢ', mapping: Mapped("ὢ") }, - Range { from: 'Ὣ', to: 'Ὣ', mapping: Mapped("ὣ") }, - Range { from: 'Ὤ', to: 'Ὤ', mapping: Mapped("ὤ") }, - Range { from: 'Ὥ', to: 'Ὥ', mapping: Mapped("ὥ") }, - Range { from: 'Ὦ', to: 'Ὦ', mapping: Mapped("ὦ") }, - Range { from: 'Ὧ', to: 'Ὧ', mapping: Mapped("ὧ") }, - Range { from: 'ὰ', to: 'ὰ', mapping: Valid }, - Range { from: 'ά', to: 'ά', mapping: Mapped("ά") }, - Range { from: 'ὲ', to: 'ὲ', mapping: Valid }, - Range { from: 'έ', to: 'έ', mapping: Mapped("έ") }, - Range { from: 'ὴ', to: 'ὴ', mapping: Valid }, - Range { from: 'ή', to: 'ή', mapping: Mapped("ή") }, - Range { from: 'ὶ', to: 'ὶ', mapping: Valid }, - Range { from: 'ί', to: 'ί', mapping: Mapped("ί") }, - Range { from: 'ὸ', to: 'ὸ', mapping: Valid }, - Range { from: 'ό', to: 'ό', mapping: Mapped("ό") }, - Range { from: 'ὺ', to: 'ὺ', mapping: Valid }, - Range { from: 'ύ', to: 'ύ', mapping: Mapped("ύ") }, - Range { from: 'ὼ', to: 'ὼ', mapping: Valid }, - Range { from: 'ώ', to: 'ώ', mapping: Mapped("ώ") }, - Range { from: '὾', to: '὿', mapping: Disallowed }, - Range { from: 'ᾀ', to: 'ᾀ', mapping: Mapped("ἀι") }, - Range { from: 'ᾁ', to: 'ᾁ', mapping: Mapped("ἁι") }, - Range { from: 'ᾂ', to: 'ᾂ', mapping: Mapped("ἂι") }, - Range { from: 'ᾃ', to: 'ᾃ', mapping: Mapped("ἃι") }, - Range { from: 'ᾄ', to: 'ᾄ', mapping: Mapped("ἄι") }, - Range { from: 'ᾅ', to: 'ᾅ', mapping: Mapped("ἅι") }, - Range { from: 'ᾆ', to: 'ᾆ', mapping: Mapped("ἆι") }, - Range { from: 'ᾇ', to: 'ᾇ', mapping: Mapped("ἇι") }, - Range { from: 'ᾈ', to: 'ᾈ', mapping: Mapped("ἀι") }, - Range { from: 'ᾉ', to: 'ᾉ', mapping: Mapped("ἁι") }, - Range { from: 'ᾊ', to: 'ᾊ', mapping: Mapped("ἂι") }, - Range { from: 'ᾋ', to: 'ᾋ', mapping: Mapped("ἃι") }, - Range { from: 'ᾌ', to: 'ᾌ', mapping: Mapped("ἄι") }, - Range { from: 'ᾍ', to: 'ᾍ', mapping: Mapped("ἅι") }, - Range { from: 'ᾎ', to: 'ᾎ', mapping: Mapped("ἆι") }, - Range { from: 'ᾏ', to: 'ᾏ', mapping: Mapped("ἇι") }, - Range { from: 'ᾐ', to: 'ᾐ', mapping: Mapped("ἠι") }, - Range { from: 'ᾑ', to: 'ᾑ', mapping: Mapped("ἡι") }, - Range { from: 'ᾒ', to: 'ᾒ', mapping: Mapped("ἢι") }, - Range { from: 'ᾓ', to: 'ᾓ', mapping: Mapped("ἣι") }, - Range { from: 'ᾔ', to: 'ᾔ', mapping: Mapped("ἤι") }, - Range { from: 'ᾕ', to: 'ᾕ', mapping: Mapped("ἥι") }, - Range { from: 'ᾖ', to: 'ᾖ', mapping: Mapped("ἦι") }, - Range { from: 'ᾗ', to: 'ᾗ', mapping: Mapped("ἧι") }, - Range { from: 'ᾘ', to: 'ᾘ', mapping: Mapped("ἠι") }, - Range { from: 'ᾙ', to: 'ᾙ', mapping: Mapped("ἡι") }, - Range { from: 'ᾚ', to: 'ᾚ', mapping: Mapped("ἢι") }, - Range { from: 'ᾛ', to: 'ᾛ', mapping: Mapped("ἣι") }, - Range { from: 'ᾜ', to: 'ᾜ', mapping: Mapped("ἤι") }, - Range { from: 'ᾝ', to: 'ᾝ', mapping: Mapped("ἥι") }, - Range { from: 'ᾞ', to: 'ᾞ', mapping: Mapped("ἦι") }, - Range { from: 'ᾟ', to: 'ᾟ', mapping: Mapped("ἧι") }, - Range { from: 'ᾠ', to: 'ᾠ', mapping: Mapped("ὠι") }, - Range { from: 'ᾡ', to: 'ᾡ', mapping: Mapped("ὡι") }, - Range { from: 'ᾢ', to: 'ᾢ', mapping: Mapped("ὢι") }, - Range { from: 'ᾣ', to: 'ᾣ', mapping: Mapped("ὣι") }, - Range { from: 'ᾤ', to: 'ᾤ', mapping: Mapped("ὤι") }, - Range { from: 'ᾥ', to: 'ᾥ', mapping: Mapped("ὥι") }, - Range { from: 'ᾦ', to: 'ᾦ', mapping: Mapped("ὦι") }, - Range { from: 'ᾧ', to: 'ᾧ', mapping: Mapped("ὧι") }, - Range { from: 'ᾨ', to: 'ᾨ', mapping: Mapped("ὠι") }, - Range { from: 'ᾩ', to: 'ᾩ', mapping: Mapped("ὡι") }, - Range { from: 'ᾪ', to: 'ᾪ', mapping: Mapped("ὢι") }, - Range { from: 'ᾫ', to: 'ᾫ', mapping: Mapped("ὣι") }, - Range { from: 'ᾬ', to: 'ᾬ', mapping: Mapped("ὤι") }, - Range { from: 'ᾭ', to: 'ᾭ', mapping: Mapped("ὥι") }, - Range { from: 'ᾮ', to: 'ᾮ', mapping: Mapped("ὦι") }, - Range { from: 'ᾯ', to: 'ᾯ', mapping: Mapped("ὧι") }, - Range { from: 'ᾰ', to: 'ᾱ', mapping: Valid }, - Range { from: 'ᾲ', to: 'ᾲ', mapping: Mapped("ὰι") }, - Range { from: 'ᾳ', to: 'ᾳ', mapping: Mapped("αι") }, - Range { from: 'ᾴ', to: 'ᾴ', mapping: Mapped("άι") }, - Range { from: '᾵', to: '᾵', mapping: Disallowed }, - Range { from: 'ᾶ', to: 'ᾶ', mapping: Valid }, - Range { from: 'ᾷ', to: 'ᾷ', mapping: Mapped("ᾶι") }, - Range { from: 'Ᾰ', to: 'Ᾰ', mapping: Mapped("ᾰ") }, - Range { from: 'Ᾱ', to: 'Ᾱ', mapping: Mapped("ᾱ") }, - Range { from: 'Ὰ', to: 'Ὰ', mapping: Mapped("ὰ") }, - Range { from: 'Ά', to: 'Ά', mapping: Mapped("ά") }, - Range { from: 'ᾼ', to: 'ᾼ', mapping: Mapped("αι") }, - Range { from: '᾽', to: '᾽', mapping: DisallowedStd3Mapped(" ̓") }, - Range { from: 'ι', to: 'ι', mapping: Mapped("ι") }, - Range { from: '᾿', to: '᾿', mapping: DisallowedStd3Mapped(" ̓") }, - Range { from: '῀', to: '῀', mapping: DisallowedStd3Mapped(" ͂") }, - Range { from: '῁', to: '῁', mapping: DisallowedStd3Mapped(" ̈͂") }, - Range { from: 'ῂ', to: 'ῂ', mapping: Mapped("ὴι") }, - Range { from: 'ῃ', to: 'ῃ', mapping: Mapped("ηι") }, - Range { from: 'ῄ', to: 'ῄ', mapping: Mapped("ήι") }, - Range { from: '῅', to: '῅', mapping: Disallowed }, - Range { from: 'ῆ', to: 'ῆ', mapping: Valid }, - Range { from: 'ῇ', to: 'ῇ', mapping: Mapped("ῆι") }, - Range { from: 'Ὲ', to: 'Ὲ', mapping: Mapped("ὲ") }, - Range { from: 'Έ', to: 'Έ', mapping: Mapped("έ") }, - Range { from: 'Ὴ', to: 'Ὴ', mapping: Mapped("ὴ") }, - Range { from: 'Ή', to: 'Ή', mapping: Mapped("ή") }, - Range { from: 'ῌ', to: 'ῌ', mapping: Mapped("ηι") }, - Range { from: '῍', to: '῍', mapping: DisallowedStd3Mapped(" ̓̀") }, - Range { from: '῎', to: '῎', mapping: DisallowedStd3Mapped(" ̓́") }, - Range { from: '῏', to: '῏', mapping: DisallowedStd3Mapped(" ̓͂") }, - Range { from: 'ῐ', to: 'ῒ', mapping: Valid }, - Range { from: 'ΐ', to: 'ΐ', mapping: Mapped("ΐ") }, - Range { from: '῔', to: '῕', mapping: Disallowed }, - Range { from: 'ῖ', to: 'ῗ', mapping: Valid }, - Range { from: 'Ῐ', to: 'Ῐ', mapping: Mapped("ῐ") }, - Range { from: 'Ῑ', to: 'Ῑ', mapping: Mapped("ῑ") }, - Range { from: 'Ὶ', to: 'Ὶ', mapping: Mapped("ὶ") }, - Range { from: 'Ί', to: 'Ί', mapping: Mapped("ί") }, - Range { from: '῜', to: '῜', mapping: Disallowed }, - Range { from: '῝', to: '῝', mapping: DisallowedStd3Mapped(" ̔̀") }, - Range { from: '῞', to: '῞', mapping: DisallowedStd3Mapped(" ̔́") }, - Range { from: '῟', to: '῟', mapping: DisallowedStd3Mapped(" ̔͂") }, - Range { from: 'ῠ', to: 'ῢ', mapping: Valid }, - Range { from: 'ΰ', to: 'ΰ', mapping: Mapped("ΰ") }, - Range { from: 'ῤ', to: 'ῧ', mapping: Valid }, - Range { from: 'Ῠ', to: 'Ῠ', mapping: Mapped("ῠ") }, - Range { from: 'Ῡ', to: 'Ῡ', mapping: Mapped("ῡ") }, - Range { from: 'Ὺ', to: 'Ὺ', mapping: Mapped("ὺ") }, - Range { from: 'Ύ', to: 'Ύ', mapping: Mapped("ύ") }, - Range { from: 'Ῥ', to: 'Ῥ', mapping: Mapped("ῥ") }, - Range { from: '῭', to: '῭', mapping: DisallowedStd3Mapped(" ̈̀") }, - Range { from: '΅', to: '΅', mapping: DisallowedStd3Mapped(" ̈́") }, - Range { from: '`', to: '`', mapping: DisallowedStd3Mapped("`") }, - Range { from: '῰', to: '῱', mapping: Disallowed }, - Range { from: 'ῲ', to: 'ῲ', mapping: Mapped("ὼι") }, - Range { from: 'ῳ', to: 'ῳ', mapping: Mapped("ωι") }, - Range { from: 'ῴ', to: 'ῴ', mapping: Mapped("ώι") }, - Range { from: '῵', to: '῵', mapping: Disallowed }, - Range { from: 'ῶ', to: 'ῶ', mapping: Valid }, - Range { from: 'ῷ', to: 'ῷ', mapping: Mapped("ῶι") }, - Range { from: 'Ὸ', to: 'Ὸ', mapping: Mapped("ὸ") }, - Range { from: 'Ό', to: 'Ό', mapping: Mapped("ό") }, - Range { from: 'Ὼ', to: 'Ὼ', mapping: Mapped("ὼ") }, - Range { from: 'Ώ', to: 'Ώ', mapping: Mapped("ώ") }, - Range { from: 'ῼ', to: 'ῼ', mapping: Mapped("ωι") }, - Range { from: '´', to: '´', mapping: DisallowedStd3Mapped(" ́") }, - Range { from: '῾', to: '῾', mapping: DisallowedStd3Mapped(" ̔") }, - Range { from: '῿', to: '῿', mapping: Disallowed }, - Range { from: ' ', to: ' ', mapping: DisallowedStd3Mapped(" ") }, - Range { from: '​', to: '​', mapping: Ignored }, - Range { from: '‌', to: '‍', mapping: Deviation("") }, - Range { from: '‎', to: '‏', mapping: Disallowed }, - Range { from: '‐', to: '‐', mapping: Valid }, - Range { from: '‑', to: '‑', mapping: Mapped("‐") }, - Range { from: '‒', to: '‖', mapping: Valid }, - Range { from: '‗', to: '‗', mapping: DisallowedStd3Mapped(" ̳") }, - Range { from: '‘', to: '‣', mapping: Valid }, - Range { from: '․', to: '…', mapping: Disallowed }, - Range { from: '‧', to: '‧', mapping: Valid }, - Range { from: '
', to: '‮', mapping: Disallowed }, - Range { from: ' ', to: ' ', mapping: DisallowedStd3Mapped(" ") }, - Range { from: '‰', to: '′', mapping: Valid }, - Range { from: '″', to: '″', mapping: Mapped("′′") }, - Range { from: '‴', to: '‴', mapping: Mapped("′′′") }, - Range { from: '‵', to: '‵', mapping: Valid }, - Range { from: '‶', to: '‶', mapping: Mapped("‵‵") }, - Range { from: '‷', to: '‷', mapping: Mapped("‵‵‵") }, - Range { from: '‸', to: '※', mapping: Valid }, - Range { from: '‼', to: '‼', mapping: DisallowedStd3Mapped("!!") }, - Range { from: '‽', to: '‽', mapping: Valid }, - Range { from: '‾', to: '‾', mapping: DisallowedStd3Mapped(" ̅") }, - Range { from: '‿', to: '⁆', mapping: Valid }, - Range { from: '⁇', to: '⁇', mapping: DisallowedStd3Mapped("??") }, - Range { from: '⁈', to: '⁈', mapping: DisallowedStd3Mapped("?!") }, - Range { from: '⁉', to: '⁉', mapping: DisallowedStd3Mapped("!?") }, - Range { from: '⁊', to: '⁍', mapping: Valid }, - Range { from: '⁎', to: '⁒', mapping: Valid }, - Range { from: '⁓', to: '⁔', mapping: Valid }, - Range { from: '⁕', to: '⁖', mapping: Valid }, - Range { from: '⁗', to: '⁗', mapping: Mapped("′′′′") }, - Range { from: '⁘', to: '⁞', mapping: Valid }, - Range { from: ' ', to: ' ', mapping: DisallowedStd3Mapped(" ") }, - Range { from: '⁠', to: '⁠', mapping: Ignored }, - Range { from: '⁡', to: '⁣', mapping: Disallowed }, - Range { from: '⁤', to: '⁤', mapping: Ignored }, - Range { from: '⁥', to: '⁥', mapping: Disallowed }, - Range { from: '⁦', to: '⁩', mapping: Disallowed }, - Range { from: '', to: '', mapping: Disallowed }, - Range { from: '⁰', to: '⁰', mapping: Mapped("0") }, - Range { from: 'ⁱ', to: 'ⁱ', mapping: Mapped("i") }, - Range { from: '⁲', to: '⁳', mapping: Disallowed }, - Range { from: '⁴', to: '⁴', mapping: Mapped("4") }, - Range { from: '⁵', to: '⁵', mapping: Mapped("5") }, - Range { from: '⁶', to: '⁶', mapping: Mapped("6") }, - Range { from: '⁷', to: '⁷', mapping: Mapped("7") }, - Range { from: '⁸', to: '⁸', mapping: Mapped("8") }, - Range { from: '⁹', to: '⁹', mapping: Mapped("9") }, - Range { from: '⁺', to: '⁺', mapping: DisallowedStd3Mapped("+") }, - Range { from: '⁻', to: '⁻', mapping: Mapped("−") }, - Range { from: '⁼', to: '⁼', mapping: DisallowedStd3Mapped("=") }, - Range { from: '⁽', to: '⁽', mapping: DisallowedStd3Mapped("(") }, - Range { from: '⁾', to: '⁾', mapping: DisallowedStd3Mapped(")") }, - Range { from: 'ⁿ', to: 'ⁿ', mapping: Mapped("n") }, - Range { from: '₀', to: '₀', mapping: Mapped("0") }, - Range { from: '₁', to: '₁', mapping: Mapped("1") }, - Range { from: '₂', to: '₂', mapping: Mapped("2") }, - Range { from: '₃', to: '₃', mapping: Mapped("3") }, - Range { from: '₄', to: '₄', mapping: Mapped("4") }, - Range { from: '₅', to: '₅', mapping: Mapped("5") }, - Range { from: '₆', to: '₆', mapping: Mapped("6") }, - Range { from: '₇', to: '₇', mapping: Mapped("7") }, - Range { from: '₈', to: '₈', mapping: Mapped("8") }, - Range { from: '₉', to: '₉', mapping: Mapped("9") }, - Range { from: '₊', to: '₊', mapping: DisallowedStd3Mapped("+") }, - Range { from: '₋', to: '₋', mapping: Mapped("−") }, - Range { from: '₌', to: '₌', mapping: DisallowedStd3Mapped("=") }, - Range { from: '₍', to: '₍', mapping: DisallowedStd3Mapped("(") }, - Range { from: '₎', to: '₎', mapping: DisallowedStd3Mapped(")") }, - Range { from: '₏', to: '₏', mapping: Disallowed }, - Range { from: 'ₐ', to: 'ₐ', mapping: Mapped("a") }, - Range { from: 'ₑ', to: 'ₑ', mapping: Mapped("e") }, - Range { from: 'ₒ', to: 'ₒ', mapping: Mapped("o") }, - Range { from: 'ₓ', to: 'ₓ', mapping: Mapped("x") }, - Range { from: 'ₔ', to: 'ₔ', mapping: Mapped("ə") }, - Range { from: 'ₕ', to: 'ₕ', mapping: Mapped("h") }, - Range { from: 'ₖ', to: 'ₖ', mapping: Mapped("k") }, - Range { from: 'ₗ', to: 'ₗ', mapping: Mapped("l") }, - Range { from: 'ₘ', to: 'ₘ', mapping: Mapped("m") }, - Range { from: 'ₙ', to: 'ₙ', mapping: Mapped("n") }, - Range { from: 'ₚ', to: 'ₚ', mapping: Mapped("p") }, - Range { from: 'ₛ', to: 'ₛ', mapping: Mapped("s") }, - Range { from: 'ₜ', to: 'ₜ', mapping: Mapped("t") }, - Range { from: '₝', to: '₟', mapping: Disallowed }, - Range { from: '₠', to: '₧', mapping: Valid }, - Range { from: '₨', to: '₨', mapping: Mapped("rs") }, - Range { from: '₩', to: '₪', mapping: Valid }, - Range { from: '₫', to: '₫', mapping: Valid }, - Range { from: '€', to: '€', mapping: Valid }, - Range { from: '₭', to: '₯', mapping: Valid }, - Range { from: '₰', to: '₱', mapping: Valid }, - Range { from: '₲', to: '₵', mapping: Valid }, - Range { from: '₶', to: '₸', mapping: Valid }, - Range { from: '₹', to: '₹', mapping: Valid }, - Range { from: '₺', to: '₺', mapping: Valid }, - Range { from: '₻', to: '₽', mapping: Valid }, - Range { from: '₾', to: '₾', mapping: Valid }, - Range { from: '₿', to: '⃏', mapping: Disallowed }, - Range { from: '⃐', to: '⃡', mapping: Valid }, - Range { from: '⃢', to: '⃣', mapping: Valid }, - Range { from: '⃤', to: '⃪', mapping: Valid }, - Range { from: '⃫', to: '⃫', mapping: Valid }, - Range { from: '⃬', to: '⃯', mapping: Valid }, - Range { from: '⃰', to: '⃰', mapping: Valid }, - Range { from: '⃱', to: '⃿', mapping: Disallowed }, - Range { from: '℀', to: '℀', mapping: DisallowedStd3Mapped("a/c") }, - Range { from: '℁', to: '℁', mapping: DisallowedStd3Mapped("a/s") }, - Range { from: 'ℂ', to: 'ℂ', mapping: Mapped("c") }, - Range { from: '℃', to: '℃', mapping: Mapped("°c") }, - Range { from: '℄', to: '℄', mapping: Valid }, - Range { from: '℅', to: '℅', mapping: DisallowedStd3Mapped("c/o") }, - Range { from: '℆', to: '℆', mapping: DisallowedStd3Mapped("c/u") }, - Range { from: 'ℇ', to: 'ℇ', mapping: Mapped("ɛ") }, - Range { from: '℈', to: '℈', mapping: Valid }, - Range { from: '℉', to: '℉', mapping: Mapped("°f") }, - Range { from: 'ℊ', to: 'ℊ', mapping: Mapped("g") }, - Range { from: 'ℋ', to: 'ℎ', mapping: Mapped("h") }, - Range { from: 'ℏ', to: 'ℏ', mapping: Mapped("ħ") }, - Range { from: 'ℐ', to: 'ℑ', mapping: Mapped("i") }, - Range { from: 'ℒ', to: 'ℓ', mapping: Mapped("l") }, - Range { from: '℔', to: '℔', mapping: Valid }, - Range { from: 'ℕ', to: 'ℕ', mapping: Mapped("n") }, - Range { from: '№', to: '№', mapping: Mapped("no") }, - Range { from: '℗', to: '℘', mapping: Valid }, - Range { from: 'ℙ', to: 'ℙ', mapping: Mapped("p") }, - Range { from: 'ℚ', to: 'ℚ', mapping: Mapped("q") }, - Range { from: 'ℛ', to: 'ℝ', mapping: Mapped("r") }, - Range { from: '℞', to: '℟', mapping: Valid }, - Range { from: '℠', to: '℠', mapping: Mapped("sm") }, - Range { from: '℡', to: '℡', mapping: Mapped("tel") }, - Range { from: '™', to: '™', mapping: Mapped("tm") }, - Range { from: '℣', to: '℣', mapping: Valid }, - Range { from: 'ℤ', to: 'ℤ', mapping: Mapped("z") }, - Range { from: '℥', to: '℥', mapping: Valid }, - Range { from: 'Ω', to: 'Ω', mapping: Mapped("ω") }, - Range { from: '℧', to: '℧', mapping: Valid }, - Range { from: 'ℨ', to: 'ℨ', mapping: Mapped("z") }, - Range { from: '℩', to: '℩', mapping: Valid }, - Range { from: 'K', to: 'K', mapping: Mapped("k") }, - Range { from: 'Å', to: 'Å', mapping: Mapped("å") }, - Range { from: 'ℬ', to: 'ℬ', mapping: Mapped("b") }, - Range { from: 'ℭ', to: 'ℭ', mapping: Mapped("c") }, - Range { from: '℮', to: '℮', mapping: Valid }, - Range { from: 'ℯ', to: 'ℰ', mapping: Mapped("e") }, - Range { from: 'ℱ', to: 'ℱ', mapping: Mapped("f") }, - Range { from: 'Ⅎ', to: 'Ⅎ', mapping: Disallowed }, - Range { from: 'ℳ', to: 'ℳ', mapping: Mapped("m") }, - Range { from: 'ℴ', to: 'ℴ', mapping: Mapped("o") }, - Range { from: 'ℵ', to: 'ℵ', mapping: Mapped("א") }, - Range { from: 'ℶ', to: 'ℶ', mapping: Mapped("ב") }, - Range { from: 'ℷ', to: 'ℷ', mapping: Mapped("ג") }, - Range { from: 'ℸ', to: 'ℸ', mapping: Mapped("ד") }, - Range { from: 'ℹ', to: 'ℹ', mapping: Mapped("i") }, - Range { from: '℺', to: '℺', mapping: Valid }, - Range { from: '℻', to: '℻', mapping: Mapped("fax") }, - Range { from: 'ℼ', to: 'ℼ', mapping: Mapped("π") }, - Range { from: 'ℽ', to: 'ℾ', mapping: Mapped("γ") }, - Range { from: 'ℿ', to: 'ℿ', mapping: Mapped("π") }, - Range { from: '⅀', to: '⅀', mapping: Mapped("∑") }, - Range { from: '⅁', to: '⅄', mapping: Valid }, - Range { from: 'ⅅ', to: 'ⅆ', mapping: Mapped("d") }, - Range { from: 'ⅇ', to: 'ⅇ', mapping: Mapped("e") }, - Range { from: 'ⅈ', to: 'ⅈ', mapping: Mapped("i") }, - Range { from: 'ⅉ', to: 'ⅉ', mapping: Mapped("j") }, - Range { from: '⅊', to: '⅋', mapping: Valid }, - Range { from: '⅌', to: '⅌', mapping: Valid }, - Range { from: '⅍', to: '⅍', mapping: Valid }, - Range { from: 'ⅎ', to: 'ⅎ', mapping: Valid }, - Range { from: '⅏', to: '⅏', mapping: Valid }, - Range { from: '⅐', to: '⅐', mapping: Mapped("1⁄7") }, - Range { from: '⅑', to: '⅑', mapping: Mapped("1⁄9") }, - Range { from: '⅒', to: '⅒', mapping: Mapped("1⁄10") }, - Range { from: '⅓', to: '⅓', mapping: Mapped("1⁄3") }, - Range { from: '⅔', to: '⅔', mapping: Mapped("2⁄3") }, - Range { from: '⅕', to: '⅕', mapping: Mapped("1⁄5") }, - Range { from: '⅖', to: '⅖', mapping: Mapped("2⁄5") }, - Range { from: '⅗', to: '⅗', mapping: Mapped("3⁄5") }, - Range { from: '⅘', to: '⅘', mapping: Mapped("4⁄5") }, - Range { from: '⅙', to: '⅙', mapping: Mapped("1⁄6") }, - Range { from: '⅚', to: '⅚', mapping: Mapped("5⁄6") }, - Range { from: '⅛', to: '⅛', mapping: Mapped("1⁄8") }, - Range { from: '⅜', to: '⅜', mapping: Mapped("3⁄8") }, - Range { from: '⅝', to: '⅝', mapping: Mapped("5⁄8") }, - Range { from: '⅞', to: '⅞', mapping: Mapped("7⁄8") }, - Range { from: '⅟', to: '⅟', mapping: Mapped("1⁄") }, - Range { from: 'Ⅰ', to: 'Ⅰ', mapping: Mapped("i") }, - Range { from: 'Ⅱ', to: 'Ⅱ', mapping: Mapped("ii") }, - Range { from: 'Ⅲ', to: 'Ⅲ', mapping: Mapped("iii") }, - Range { from: 'Ⅳ', to: 'Ⅳ', mapping: Mapped("iv") }, - Range { from: 'Ⅴ', to: 'Ⅴ', mapping: Mapped("v") }, - Range { from: 'Ⅵ', to: 'Ⅵ', mapping: Mapped("vi") }, - Range { from: 'Ⅶ', to: 'Ⅶ', mapping: Mapped("vii") }, - Range { from: 'Ⅷ', to: 'Ⅷ', mapping: Mapped("viii") }, - Range { from: 'Ⅸ', to: 'Ⅸ', mapping: Mapped("ix") }, - Range { from: 'Ⅹ', to: 'Ⅹ', mapping: Mapped("x") }, - Range { from: 'Ⅺ', to: 'Ⅺ', mapping: Mapped("xi") }, - Range { from: 'Ⅻ', to: 'Ⅻ', mapping: Mapped("xii") }, - Range { from: 'Ⅼ', to: 'Ⅼ', mapping: Mapped("l") }, - Range { from: 'Ⅽ', to: 'Ⅽ', mapping: Mapped("c") }, - Range { from: 'Ⅾ', to: 'Ⅾ', mapping: Mapped("d") }, - Range { from: 'Ⅿ', to: 'Ⅿ', mapping: Mapped("m") }, - Range { from: 'ⅰ', to: 'ⅰ', mapping: Mapped("i") }, - Range { from: 'ⅱ', to: 'ⅱ', mapping: Mapped("ii") }, - Range { from: 'ⅲ', to: 'ⅲ', mapping: Mapped("iii") }, - Range { from: 'ⅳ', to: 'ⅳ', mapping: Mapped("iv") }, - Range { from: 'ⅴ', to: 'ⅴ', mapping: Mapped("v") }, - Range { from: 'ⅵ', to: 'ⅵ', mapping: Mapped("vi") }, - Range { from: 'ⅶ', to: 'ⅶ', mapping: Mapped("vii") }, - Range { from: 'ⅷ', to: 'ⅷ', mapping: Mapped("viii") }, - Range { from: 'ⅸ', to: 'ⅸ', mapping: Mapped("ix") }, - Range { from: 'ⅹ', to: 'ⅹ', mapping: Mapped("x") }, - Range { from: 'ⅺ', to: 'ⅺ', mapping: Mapped("xi") }, - Range { from: 'ⅻ', to: 'ⅻ', mapping: Mapped("xii") }, - Range { from: 'ⅼ', to: 'ⅼ', mapping: Mapped("l") }, - Range { from: 'ⅽ', to: 'ⅽ', mapping: Mapped("c") }, - Range { from: 'ⅾ', to: 'ⅾ', mapping: Mapped("d") }, - Range { from: 'ⅿ', to: 'ⅿ', mapping: Mapped("m") }, - Range { from: 'ↀ', to: 'ↂ', mapping: Valid }, - Range { from: 'Ↄ', to: 'Ↄ', mapping: Disallowed }, - Range { from: 'ↄ', to: 'ↄ', mapping: Valid }, - Range { from: 'ↅ', to: 'ↈ', mapping: Valid }, - Range { from: '↉', to: '↉', mapping: Mapped("0⁄3") }, - Range { from: '↊', to: '↋', mapping: Valid }, - Range { from: '↌', to: '↏', mapping: Disallowed }, - Range { from: '←', to: '⇪', mapping: Valid }, - Range { from: '⇫', to: '⇳', mapping: Valid }, - Range { from: '⇴', to: '⇿', mapping: Valid }, - Range { from: '∀', to: '∫', mapping: Valid }, - Range { from: '∬', to: '∬', mapping: Mapped("∫∫") }, - Range { from: '∭', to: '∭', mapping: Mapped("∫∫∫") }, - Range { from: '∮', to: '∮', mapping: Valid }, - Range { from: '∯', to: '∯', mapping: Mapped("∮∮") }, - Range { from: '∰', to: '∰', mapping: Mapped("∮∮∮") }, - Range { from: '∱', to: '≟', mapping: Valid }, - Range { from: '≠', to: '≠', mapping: DisallowedStd3Valid }, - Range { from: '≡', to: '≭', mapping: Valid }, - Range { from: '≮', to: '≯', mapping: DisallowedStd3Valid }, - Range { from: '≰', to: '⋱', mapping: Valid }, - Range { from: '⋲', to: '⋿', mapping: Valid }, - Range { from: '⌀', to: '⌀', mapping: Valid }, - Range { from: '⌁', to: '⌁', mapping: Valid }, - Range { from: '⌂', to: '⌨', mapping: Valid }, - Range { from: '〈', to: '〈', mapping: Mapped("〈") }, - Range { from: '〉', to: '〉', mapping: Mapped("〉") }, - Range { from: '⌫', to: '⍺', mapping: Valid }, - Range { from: '⍻', to: '⍻', mapping: Valid }, - Range { from: '⍼', to: '⍼', mapping: Valid }, - Range { from: '⍽', to: '⎚', mapping: Valid }, - Range { from: '⎛', to: '⏎', mapping: Valid }, - Range { from: '⏏', to: '⏐', mapping: Valid }, - Range { from: '⏑', to: '⏛', mapping: Valid }, - Range { from: '⏜', to: '⏧', mapping: Valid }, - Range { from: '⏨', to: '⏨', mapping: Valid }, - Range { from: '⏩', to: '⏳', mapping: Valid }, - Range { from: '⏴', to: '⏺', mapping: Valid }, - Range { from: '⏻', to: '⏿', mapping: Disallowed }, - Range { from: '␀', to: '␤', mapping: Valid }, - Range { from: '␥', to: '␦', mapping: Valid }, - Range { from: '␧', to: '␿', mapping: Disallowed }, - Range { from: '⑀', to: '⑊', mapping: Valid }, - Range { from: '⑋', to: '⑟', mapping: Disallowed }, - Range { from: '①', to: '①', mapping: Mapped("1") }, - Range { from: '②', to: '②', mapping: Mapped("2") }, - Range { from: '③', to: '③', mapping: Mapped("3") }, - Range { from: '④', to: '④', mapping: Mapped("4") }, - Range { from: '⑤', to: '⑤', mapping: Mapped("5") }, - Range { from: '⑥', to: '⑥', mapping: Mapped("6") }, - Range { from: '⑦', to: '⑦', mapping: Mapped("7") }, - Range { from: '⑧', to: '⑧', mapping: Mapped("8") }, - Range { from: '⑨', to: '⑨', mapping: Mapped("9") }, - Range { from: '⑩', to: '⑩', mapping: Mapped("10") }, - Range { from: '⑪', to: '⑪', mapping: Mapped("11") }, - Range { from: '⑫', to: '⑫', mapping: Mapped("12") }, - Range { from: '⑬', to: '⑬', mapping: Mapped("13") }, - Range { from: '⑭', to: '⑭', mapping: Mapped("14") }, - Range { from: '⑮', to: '⑮', mapping: Mapped("15") }, - Range { from: '⑯', to: '⑯', mapping: Mapped("16") }, - Range { from: '⑰', to: '⑰', mapping: Mapped("17") }, - Range { from: '⑱', to: '⑱', mapping: Mapped("18") }, - Range { from: '⑲', to: '⑲', mapping: Mapped("19") }, - Range { from: '⑳', to: '⑳', mapping: Mapped("20") }, - Range { from: '⑴', to: '⑴', mapping: DisallowedStd3Mapped("(1)") }, - Range { from: '⑵', to: '⑵', mapping: DisallowedStd3Mapped("(2)") }, - Range { from: '⑶', to: '⑶', mapping: DisallowedStd3Mapped("(3)") }, - Range { from: '⑷', to: '⑷', mapping: DisallowedStd3Mapped("(4)") }, - Range { from: '⑸', to: '⑸', mapping: DisallowedStd3Mapped("(5)") }, - Range { from: '⑹', to: '⑹', mapping: DisallowedStd3Mapped("(6)") }, - Range { from: '⑺', to: '⑺', mapping: DisallowedStd3Mapped("(7)") }, - Range { from: '⑻', to: '⑻', mapping: DisallowedStd3Mapped("(8)") }, - Range { from: '⑼', to: '⑼', mapping: DisallowedStd3Mapped("(9)") }, - Range { from: '⑽', to: '⑽', mapping: DisallowedStd3Mapped("(10)") }, - Range { from: '⑾', to: '⑾', mapping: DisallowedStd3Mapped("(11)") }, - Range { from: '⑿', to: '⑿', mapping: DisallowedStd3Mapped("(12)") }, - Range { from: '⒀', to: '⒀', mapping: DisallowedStd3Mapped("(13)") }, - Range { from: '⒁', to: '⒁', mapping: DisallowedStd3Mapped("(14)") }, - Range { from: '⒂', to: '⒂', mapping: DisallowedStd3Mapped("(15)") }, - Range { from: '⒃', to: '⒃', mapping: DisallowedStd3Mapped("(16)") }, - Range { from: '⒄', to: '⒄', mapping: DisallowedStd3Mapped("(17)") }, - Range { from: '⒅', to: '⒅', mapping: DisallowedStd3Mapped("(18)") }, - Range { from: '⒆', to: '⒆', mapping: DisallowedStd3Mapped("(19)") }, - Range { from: '⒇', to: '⒇', mapping: DisallowedStd3Mapped("(20)") }, - Range { from: '⒈', to: '⒛', mapping: Disallowed }, - Range { from: '⒜', to: '⒜', mapping: DisallowedStd3Mapped("(a)") }, - Range { from: '⒝', to: '⒝', mapping: DisallowedStd3Mapped("(b)") }, - Range { from: '⒞', to: '⒞', mapping: DisallowedStd3Mapped("(c)") }, - Range { from: '⒟', to: '⒟', mapping: DisallowedStd3Mapped("(d)") }, - Range { from: '⒠', to: '⒠', mapping: DisallowedStd3Mapped("(e)") }, - Range { from: '⒡', to: '⒡', mapping: DisallowedStd3Mapped("(f)") }, - Range { from: '⒢', to: '⒢', mapping: DisallowedStd3Mapped("(g)") }, - Range { from: '⒣', to: '⒣', mapping: DisallowedStd3Mapped("(h)") }, - Range { from: '⒤', to: '⒤', mapping: DisallowedStd3Mapped("(i)") }, - Range { from: '⒥', to: '⒥', mapping: DisallowedStd3Mapped("(j)") }, - Range { from: '⒦', to: '⒦', mapping: DisallowedStd3Mapped("(k)") }, - Range { from: '⒧', to: '⒧', mapping: DisallowedStd3Mapped("(l)") }, - Range { from: '⒨', to: '⒨', mapping: DisallowedStd3Mapped("(m)") }, - Range { from: '⒩', to: '⒩', mapping: DisallowedStd3Mapped("(n)") }, - Range { from: '⒪', to: '⒪', mapping: DisallowedStd3Mapped("(o)") }, - Range { from: '⒫', to: '⒫', mapping: DisallowedStd3Mapped("(p)") }, - Range { from: '⒬', to: '⒬', mapping: DisallowedStd3Mapped("(q)") }, - Range { from: '⒭', to: '⒭', mapping: DisallowedStd3Mapped("(r)") }, - Range { from: '⒮', to: '⒮', mapping: DisallowedStd3Mapped("(s)") }, - Range { from: '⒯', to: '⒯', mapping: DisallowedStd3Mapped("(t)") }, - Range { from: '⒰', to: '⒰', mapping: DisallowedStd3Mapped("(u)") }, - Range { from: '⒱', to: '⒱', mapping: DisallowedStd3Mapped("(v)") }, - Range { from: '⒲', to: '⒲', mapping: DisallowedStd3Mapped("(w)") }, - Range { from: '⒳', to: '⒳', mapping: DisallowedStd3Mapped("(x)") }, - Range { from: '⒴', to: '⒴', mapping: DisallowedStd3Mapped("(y)") }, - Range { from: '⒵', to: '⒵', mapping: DisallowedStd3Mapped("(z)") }, - Range { from: 'Ⓐ', to: 'Ⓐ', mapping: Mapped("a") }, - Range { from: 'Ⓑ', to: 'Ⓑ', mapping: Mapped("b") }, - Range { from: 'Ⓒ', to: 'Ⓒ', mapping: Mapped("c") }, - Range { from: 'Ⓓ', to: 'Ⓓ', mapping: Mapped("d") }, - Range { from: 'Ⓔ', to: 'Ⓔ', mapping: Mapped("e") }, - Range { from: 'Ⓕ', to: 'Ⓕ', mapping: Mapped("f") }, - Range { from: 'Ⓖ', to: 'Ⓖ', mapping: Mapped("g") }, - Range { from: 'Ⓗ', to: 'Ⓗ', mapping: Mapped("h") }, - Range { from: 'Ⓘ', to: 'Ⓘ', mapping: Mapped("i") }, - Range { from: 'Ⓙ', to: 'Ⓙ', mapping: Mapped("j") }, - Range { from: 'Ⓚ', to: 'Ⓚ', mapping: Mapped("k") }, - Range { from: 'Ⓛ', to: 'Ⓛ', mapping: Mapped("l") }, - Range { from: 'Ⓜ', to: 'Ⓜ', mapping: Mapped("m") }, - Range { from: 'Ⓝ', to: 'Ⓝ', mapping: Mapped("n") }, - Range { from: 'Ⓞ', to: 'Ⓞ', mapping: Mapped("o") }, - Range { from: 'Ⓟ', to: 'Ⓟ', mapping: Mapped("p") }, - Range { from: 'Ⓠ', to: 'Ⓠ', mapping: Mapped("q") }, - Range { from: 'Ⓡ', to: 'Ⓡ', mapping: Mapped("r") }, - Range { from: 'Ⓢ', to: 'Ⓢ', mapping: Mapped("s") }, - Range { from: 'Ⓣ', to: 'Ⓣ', mapping: Mapped("t") }, - Range { from: 'Ⓤ', to: 'Ⓤ', mapping: Mapped("u") }, - Range { from: 'Ⓥ', to: 'Ⓥ', mapping: Mapped("v") }, - Range { from: 'Ⓦ', to: 'Ⓦ', mapping: Mapped("w") }, - Range { from: 'Ⓧ', to: 'Ⓧ', mapping: Mapped("x") }, - Range { from: 'Ⓨ', to: 'Ⓨ', mapping: Mapped("y") }, - Range { from: 'Ⓩ', to: 'Ⓩ', mapping: Mapped("z") }, - Range { from: 'ⓐ', to: 'ⓐ', mapping: Mapped("a") }, - Range { from: 'ⓑ', to: 'ⓑ', mapping: Mapped("b") }, - Range { from: 'ⓒ', to: 'ⓒ', mapping: Mapped("c") }, - Range { from: 'ⓓ', to: 'ⓓ', mapping: Mapped("d") }, - Range { from: 'ⓔ', to: 'ⓔ', mapping: Mapped("e") }, - Range { from: 'ⓕ', to: 'ⓕ', mapping: Mapped("f") }, - Range { from: 'ⓖ', to: 'ⓖ', mapping: Mapped("g") }, - Range { from: 'ⓗ', to: 'ⓗ', mapping: Mapped("h") }, - Range { from: 'ⓘ', to: 'ⓘ', mapping: Mapped("i") }, - Range { from: 'ⓙ', to: 'ⓙ', mapping: Mapped("j") }, - Range { from: 'ⓚ', to: 'ⓚ', mapping: Mapped("k") }, - Range { from: 'ⓛ', to: 'ⓛ', mapping: Mapped("l") }, - Range { from: 'ⓜ', to: 'ⓜ', mapping: Mapped("m") }, - Range { from: 'ⓝ', to: 'ⓝ', mapping: Mapped("n") }, - Range { from: 'ⓞ', to: 'ⓞ', mapping: Mapped("o") }, - Range { from: 'ⓟ', to: 'ⓟ', mapping: Mapped("p") }, - Range { from: 'ⓠ', to: 'ⓠ', mapping: Mapped("q") }, - Range { from: 'ⓡ', to: 'ⓡ', mapping: Mapped("r") }, - Range { from: 'ⓢ', to: 'ⓢ', mapping: Mapped("s") }, - Range { from: 'ⓣ', to: 'ⓣ', mapping: Mapped("t") }, - Range { from: 'ⓤ', to: 'ⓤ', mapping: Mapped("u") }, - Range { from: 'ⓥ', to: 'ⓥ', mapping: Mapped("v") }, - Range { from: 'ⓦ', to: 'ⓦ', mapping: Mapped("w") }, - Range { from: 'ⓧ', to: 'ⓧ', mapping: Mapped("x") }, - Range { from: 'ⓨ', to: 'ⓨ', mapping: Mapped("y") }, - Range { from: 'ⓩ', to: 'ⓩ', mapping: Mapped("z") }, - Range { from: '⓪', to: '⓪', mapping: Mapped("0") }, - Range { from: '⓫', to: '⓾', mapping: Valid }, - Range { from: '⓿', to: '⓿', mapping: Valid }, - Range { from: '─', to: '▕', mapping: Valid }, - Range { from: '▖', to: '▟', mapping: Valid }, - Range { from: '■', to: '◯', mapping: Valid }, - Range { from: '◰', to: '◷', mapping: Valid }, - Range { from: '◸', to: '◿', mapping: Valid }, - Range { from: '☀', to: '☓', mapping: Valid }, - Range { from: '☔', to: '☕', mapping: Valid }, - Range { from: '☖', to: '☗', mapping: Valid }, - Range { from: '☘', to: '☘', mapping: Valid }, - Range { from: '☙', to: '☙', mapping: Valid }, - Range { from: '☚', to: '♯', mapping: Valid }, - Range { from: '♰', to: '♱', mapping: Valid }, - Range { from: '♲', to: '♽', mapping: Valid }, - Range { from: '♾', to: '♿', mapping: Valid }, - Range { from: '⚀', to: '⚉', mapping: Valid }, - Range { from: '⚊', to: '⚑', mapping: Valid }, - Range { from: '⚒', to: '⚜', mapping: Valid }, - Range { from: '⚝', to: '⚝', mapping: Valid }, - Range { from: '⚞', to: '⚟', mapping: Valid }, - Range { from: '⚠', to: '⚡', mapping: Valid }, - Range { from: '⚢', to: '⚱', mapping: Valid }, - Range { from: '⚲', to: '⚲', mapping: Valid }, - Range { from: '⚳', to: '⚼', mapping: Valid }, - Range { from: '⚽', to: '⚿', mapping: Valid }, - Range { from: '⛀', to: '⛃', mapping: Valid }, - Range { from: '⛄', to: '⛍', mapping: Valid }, - Range { from: '⛎', to: '⛎', mapping: Valid }, - Range { from: '⛏', to: '⛡', mapping: Valid }, - Range { from: '⛢', to: '⛢', mapping: Valid }, - Range { from: '⛣', to: '⛣', mapping: Valid }, - Range { from: '⛤', to: '⛧', mapping: Valid }, - Range { from: '⛨', to: '⛿', mapping: Valid }, - Range { from: '✀', to: '✀', mapping: Valid }, - Range { from: '✁', to: '✄', mapping: Valid }, - Range { from: '✅', to: '✅', mapping: Valid }, - Range { from: '✆', to: '✉', mapping: Valid }, - Range { from: '✊', to: '✋', mapping: Valid }, - Range { from: '✌', to: '✧', mapping: Valid }, - Range { from: '✨', to: '✨', mapping: Valid }, - Range { from: '✩', to: '❋', mapping: Valid }, - Range { from: '❌', to: '❌', mapping: Valid }, - Range { from: '❍', to: '❍', mapping: Valid }, - Range { from: '❎', to: '❎', mapping: Valid }, - Range { from: '❏', to: '❒', mapping: Valid }, - Range { from: '❓', to: '❕', mapping: Valid }, - Range { from: '❖', to: '❖', mapping: Valid }, - Range { from: '❗', to: '❗', mapping: Valid }, - Range { from: '❘', to: '❞', mapping: Valid }, - Range { from: '❟', to: '❠', mapping: Valid }, - Range { from: '❡', to: '❧', mapping: Valid }, - Range { from: '❨', to: '❵', mapping: Valid }, - Range { from: '❶', to: '➔', mapping: Valid }, - Range { from: '➕', to: '➗', mapping: Valid }, - Range { from: '➘', to: '➯', mapping: Valid }, - Range { from: '➰', to: '➰', mapping: Valid }, - Range { from: '➱', to: '➾', mapping: Valid }, - Range { from: '➿', to: '➿', mapping: Valid }, - Range { from: '⟀', to: '⟆', mapping: Valid }, - Range { from: '⟇', to: '⟊', mapping: Valid }, - Range { from: '⟋', to: '⟋', mapping: Valid }, - Range { from: '⟌', to: '⟌', mapping: Valid }, - Range { from: '⟍', to: '⟍', mapping: Valid }, - Range { from: '⟎', to: '⟏', mapping: Valid }, - Range { from: '⟐', to: '⟫', mapping: Valid }, - Range { from: '⟬', to: '⟯', mapping: Valid }, - Range { from: '⟰', to: '⟿', mapping: Valid }, - Range { from: '⠀', to: '⣿', mapping: Valid }, - Range { from: '⤀', to: '⨋', mapping: Valid }, - Range { from: '⨌', to: '⨌', mapping: Mapped("∫∫∫∫") }, - Range { from: '⨍', to: '⩳', mapping: Valid }, - Range { from: '⩴', to: '⩴', mapping: DisallowedStd3Mapped("::=") }, - Range { from: '⩵', to: '⩵', mapping: DisallowedStd3Mapped("==") }, - Range { from: '⩶', to: '⩶', mapping: DisallowedStd3Mapped("===") }, - Range { from: '⩷', to: '⫛', mapping: Valid }, - Range { from: '⫝̸', to: '⫝̸', mapping: Mapped("⫝̸") }, - Range { from: '⫝', to: '⫿', mapping: Valid }, - Range { from: '⬀', to: '⬍', mapping: Valid }, - Range { from: '⬎', to: '⬓', mapping: Valid }, - Range { from: '⬔', to: '⬚', mapping: Valid }, - Range { from: '⬛', to: '⬟', mapping: Valid }, - Range { from: '⬠', to: '⬣', mapping: Valid }, - Range { from: '⬤', to: '⭌', mapping: Valid }, - Range { from: '⭍', to: '⭏', mapping: Valid }, - Range { from: '⭐', to: '⭔', mapping: Valid }, - Range { from: '⭕', to: '⭙', mapping: Valid }, - Range { from: '⭚', to: '⭳', mapping: Valid }, - Range { from: '⭴', to: '⭵', mapping: Disallowed }, - Range { from: '⭶', to: '⮕', mapping: Valid }, - Range { from: '⮖', to: '⮗', mapping: Disallowed }, - Range { from: '⮘', to: '⮹', mapping: Valid }, - Range { from: '⮺', to: '⮼', mapping: Disallowed }, - Range { from: '⮽', to: '⯈', mapping: Valid }, - Range { from: '⯉', to: '⯉', mapping: Disallowed }, - Range { from: '⯊', to: '⯑', mapping: Valid }, - Range { from: '⯒', to: '⯫', mapping: Disallowed }, - Range { from: '⯬', to: '⯯', mapping: Valid }, - Range { from: '⯰', to: '⯿', mapping: Disallowed }, - Range { from: 'Ⰰ', to: 'Ⰰ', mapping: Mapped("ⰰ") }, - Range { from: 'Ⰱ', to: 'Ⰱ', mapping: Mapped("ⰱ") }, - Range { from: 'Ⰲ', to: 'Ⰲ', mapping: Mapped("ⰲ") }, - Range { from: 'Ⰳ', to: 'Ⰳ', mapping: Mapped("ⰳ") }, - Range { from: 'Ⰴ', to: 'Ⰴ', mapping: Mapped("ⰴ") }, - Range { from: 'Ⰵ', to: 'Ⰵ', mapping: Mapped("ⰵ") }, - Range { from: 'Ⰶ', to: 'Ⰶ', mapping: Mapped("ⰶ") }, - Range { from: 'Ⰷ', to: 'Ⰷ', mapping: Mapped("ⰷ") }, - Range { from: 'Ⰸ', to: 'Ⰸ', mapping: Mapped("ⰸ") }, - Range { from: 'Ⰹ', to: 'Ⰹ', mapping: Mapped("ⰹ") }, - Range { from: 'Ⰺ', to: 'Ⰺ', mapping: Mapped("ⰺ") }, - Range { from: 'Ⰻ', to: 'Ⰻ', mapping: Mapped("ⰻ") }, - Range { from: 'Ⰼ', to: 'Ⰼ', mapping: Mapped("ⰼ") }, - Range { from: 'Ⰽ', to: 'Ⰽ', mapping: Mapped("ⰽ") }, - Range { from: 'Ⰾ', to: 'Ⰾ', mapping: Mapped("ⰾ") }, - Range { from: 'Ⰿ', to: 'Ⰿ', mapping: Mapped("ⰿ") }, - Range { from: 'Ⱀ', to: 'Ⱀ', mapping: Mapped("ⱀ") }, - Range { from: 'Ⱁ', to: 'Ⱁ', mapping: Mapped("ⱁ") }, - Range { from: 'Ⱂ', to: 'Ⱂ', mapping: Mapped("ⱂ") }, - Range { from: 'Ⱃ', to: 'Ⱃ', mapping: Mapped("ⱃ") }, - Range { from: 'Ⱄ', to: 'Ⱄ', mapping: Mapped("ⱄ") }, - Range { from: 'Ⱅ', to: 'Ⱅ', mapping: Mapped("ⱅ") }, - Range { from: 'Ⱆ', to: 'Ⱆ', mapping: Mapped("ⱆ") }, - Range { from: 'Ⱇ', to: 'Ⱇ', mapping: Mapped("ⱇ") }, - Range { from: 'Ⱈ', to: 'Ⱈ', mapping: Mapped("ⱈ") }, - Range { from: 'Ⱉ', to: 'Ⱉ', mapping: Mapped("ⱉ") }, - Range { from: 'Ⱊ', to: 'Ⱊ', mapping: Mapped("ⱊ") }, - Range { from: 'Ⱋ', to: 'Ⱋ', mapping: Mapped("ⱋ") }, - Range { from: 'Ⱌ', to: 'Ⱌ', mapping: Mapped("ⱌ") }, - Range { from: 'Ⱍ', to: 'Ⱍ', mapping: Mapped("ⱍ") }, - Range { from: 'Ⱎ', to: 'Ⱎ', mapping: Mapped("ⱎ") }, - Range { from: 'Ⱏ', to: 'Ⱏ', mapping: Mapped("ⱏ") }, - Range { from: 'Ⱐ', to: 'Ⱐ', mapping: Mapped("ⱐ") }, - Range { from: 'Ⱑ', to: 'Ⱑ', mapping: Mapped("ⱑ") }, - Range { from: 'Ⱒ', to: 'Ⱒ', mapping: Mapped("ⱒ") }, - Range { from: 'Ⱓ', to: 'Ⱓ', mapping: Mapped("ⱓ") }, - Range { from: 'Ⱔ', to: 'Ⱔ', mapping: Mapped("ⱔ") }, - Range { from: 'Ⱕ', to: 'Ⱕ', mapping: Mapped("ⱕ") }, - Range { from: 'Ⱖ', to: 'Ⱖ', mapping: Mapped("ⱖ") }, - Range { from: 'Ⱗ', to: 'Ⱗ', mapping: Mapped("ⱗ") }, - Range { from: 'Ⱘ', to: 'Ⱘ', mapping: Mapped("ⱘ") }, - Range { from: 'Ⱙ', to: 'Ⱙ', mapping: Mapped("ⱙ") }, - Range { from: 'Ⱚ', to: 'Ⱚ', mapping: Mapped("ⱚ") }, - Range { from: 'Ⱛ', to: 'Ⱛ', mapping: Mapped("ⱛ") }, - Range { from: 'Ⱜ', to: 'Ⱜ', mapping: Mapped("ⱜ") }, - Range { from: 'Ⱝ', to: 'Ⱝ', mapping: Mapped("ⱝ") }, - Range { from: 'Ⱞ', to: 'Ⱞ', mapping: Mapped("ⱞ") }, - Range { from: 'Ⱟ', to: 'Ⱟ', mapping: Disallowed }, - Range { from: 'ⰰ', to: 'ⱞ', mapping: Valid }, - Range { from: 'ⱟ', to: 'ⱟ', mapping: Disallowed }, - Range { from: 'Ⱡ', to: 'Ⱡ', mapping: Mapped("ⱡ") }, - Range { from: 'ⱡ', to: 'ⱡ', mapping: Valid }, - Range { from: 'Ɫ', to: 'Ɫ', mapping: Mapped("ɫ") }, - Range { from: 'Ᵽ', to: 'Ᵽ', mapping: Mapped("ᵽ") }, - Range { from: 'Ɽ', to: 'Ɽ', mapping: Mapped("ɽ") }, - Range { from: 'ⱥ', to: 'ⱦ', mapping: Valid }, - Range { from: 'Ⱨ', to: 'Ⱨ', mapping: Mapped("ⱨ") }, - Range { from: 'ⱨ', to: 'ⱨ', mapping: Valid }, - Range { from: 'Ⱪ', to: 'Ⱪ', mapping: Mapped("ⱪ") }, - Range { from: 'ⱪ', to: 'ⱪ', mapping: Valid }, - Range { from: 'Ⱬ', to: 'Ⱬ', mapping: Mapped("ⱬ") }, - Range { from: 'ⱬ', to: 'ⱬ', mapping: Valid }, - Range { from: 'Ɑ', to: 'Ɑ', mapping: Mapped("ɑ") }, - Range { from: 'Ɱ', to: 'Ɱ', mapping: Mapped("ɱ") }, - Range { from: 'Ɐ', to: 'Ɐ', mapping: Mapped("ɐ") }, - Range { from: 'Ɒ', to: 'Ɒ', mapping: Mapped("ɒ") }, - Range { from: 'ⱱ', to: 'ⱱ', mapping: Valid }, - Range { from: 'Ⱳ', to: 'Ⱳ', mapping: Mapped("ⱳ") }, - Range { from: 'ⱳ', to: 'ⱳ', mapping: Valid }, - Range { from: 'ⱴ', to: 'ⱴ', mapping: Valid }, - Range { from: 'Ⱶ', to: 'Ⱶ', mapping: Mapped("ⱶ") }, - Range { from: 'ⱶ', to: 'ⱷ', mapping: Valid }, - Range { from: 'ⱸ', to: 'ⱻ', mapping: Valid }, - Range { from: 'ⱼ', to: 'ⱼ', mapping: Mapped("j") }, - Range { from: 'ⱽ', to: 'ⱽ', mapping: Mapped("v") }, - Range { from: 'Ȿ', to: 'Ȿ', mapping: Mapped("ȿ") }, - Range { from: 'Ɀ', to: 'Ɀ', mapping: Mapped("ɀ") }, - Range { from: 'Ⲁ', to: 'Ⲁ', mapping: Mapped("ⲁ") }, - Range { from: 'ⲁ', to: 'ⲁ', mapping: Valid }, - Range { from: 'Ⲃ', to: 'Ⲃ', mapping: Mapped("ⲃ") }, - Range { from: 'ⲃ', to: 'ⲃ', mapping: Valid }, - Range { from: 'Ⲅ', to: 'Ⲅ', mapping: Mapped("ⲅ") }, - Range { from: 'ⲅ', to: 'ⲅ', mapping: Valid }, - Range { from: 'Ⲇ', to: 'Ⲇ', mapping: Mapped("ⲇ") }, - Range { from: 'ⲇ', to: 'ⲇ', mapping: Valid }, - Range { from: 'Ⲉ', to: 'Ⲉ', mapping: Mapped("ⲉ") }, - Range { from: 'ⲉ', to: 'ⲉ', mapping: Valid }, - Range { from: 'Ⲋ', to: 'Ⲋ', mapping: Mapped("ⲋ") }, - Range { from: 'ⲋ', to: 'ⲋ', mapping: Valid }, - Range { from: 'Ⲍ', to: 'Ⲍ', mapping: Mapped("ⲍ") }, - Range { from: 'ⲍ', to: 'ⲍ', mapping: Valid }, - Range { from: 'Ⲏ', to: 'Ⲏ', mapping: Mapped("ⲏ") }, - Range { from: 'ⲏ', to: 'ⲏ', mapping: Valid }, - Range { from: 'Ⲑ', to: 'Ⲑ', mapping: Mapped("ⲑ") }, - Range { from: 'ⲑ', to: 'ⲑ', mapping: Valid }, - Range { from: 'Ⲓ', to: 'Ⲓ', mapping: Mapped("ⲓ") }, - Range { from: 'ⲓ', to: 'ⲓ', mapping: Valid }, - Range { from: 'Ⲕ', to: 'Ⲕ', mapping: Mapped("ⲕ") }, - Range { from: 'ⲕ', to: 'ⲕ', mapping: Valid }, - Range { from: 'Ⲗ', to: 'Ⲗ', mapping: Mapped("ⲗ") }, - Range { from: 'ⲗ', to: 'ⲗ', mapping: Valid }, - Range { from: 'Ⲙ', to: 'Ⲙ', mapping: Mapped("ⲙ") }, - Range { from: 'ⲙ', to: 'ⲙ', mapping: Valid }, - Range { from: 'Ⲛ', to: 'Ⲛ', mapping: Mapped("ⲛ") }, - Range { from: 'ⲛ', to: 'ⲛ', mapping: Valid }, - Range { from: 'Ⲝ', to: 'Ⲝ', mapping: Mapped("ⲝ") }, - Range { from: 'ⲝ', to: 'ⲝ', mapping: Valid }, - Range { from: 'Ⲟ', to: 'Ⲟ', mapping: Mapped("ⲟ") }, - Range { from: 'ⲟ', to: 'ⲟ', mapping: Valid }, - Range { from: 'Ⲡ', to: 'Ⲡ', mapping: Mapped("ⲡ") }, - Range { from: 'ⲡ', to: 'ⲡ', mapping: Valid }, - Range { from: 'Ⲣ', to: 'Ⲣ', mapping: Mapped("ⲣ") }, - Range { from: 'ⲣ', to: 'ⲣ', mapping: Valid }, - Range { from: 'Ⲥ', to: 'Ⲥ', mapping: Mapped("ⲥ") }, - Range { from: 'ⲥ', to: 'ⲥ', mapping: Valid }, - Range { from: 'Ⲧ', to: 'Ⲧ', mapping: Mapped("ⲧ") }, - Range { from: 'ⲧ', to: 'ⲧ', mapping: Valid }, - Range { from: 'Ⲩ', to: 'Ⲩ', mapping: Mapped("ⲩ") }, - Range { from: 'ⲩ', to: 'ⲩ', mapping: Valid }, - Range { from: 'Ⲫ', to: 'Ⲫ', mapping: Mapped("ⲫ") }, - Range { from: 'ⲫ', to: 'ⲫ', mapping: Valid }, - Range { from: 'Ⲭ', to: 'Ⲭ', mapping: Mapped("ⲭ") }, - Range { from: 'ⲭ', to: 'ⲭ', mapping: Valid }, - Range { from: 'Ⲯ', to: 'Ⲯ', mapping: Mapped("ⲯ") }, - Range { from: 'ⲯ', to: 'ⲯ', mapping: Valid }, - Range { from: 'Ⲱ', to: 'Ⲱ', mapping: Mapped("ⲱ") }, - Range { from: 'ⲱ', to: 'ⲱ', mapping: Valid }, - Range { from: 'Ⲳ', to: 'Ⲳ', mapping: Mapped("ⲳ") }, - Range { from: 'ⲳ', to: 'ⲳ', mapping: Valid }, - Range { from: 'Ⲵ', to: 'Ⲵ', mapping: Mapped("ⲵ") }, - Range { from: 'ⲵ', to: 'ⲵ', mapping: Valid }, - Range { from: 'Ⲷ', to: 'Ⲷ', mapping: Mapped("ⲷ") }, - Range { from: 'ⲷ', to: 'ⲷ', mapping: Valid }, - Range { from: 'Ⲹ', to: 'Ⲹ', mapping: Mapped("ⲹ") }, - Range { from: 'ⲹ', to: 'ⲹ', mapping: Valid }, - Range { from: 'Ⲻ', to: 'Ⲻ', mapping: Mapped("ⲻ") }, - Range { from: 'ⲻ', to: 'ⲻ', mapping: Valid }, - Range { from: 'Ⲽ', to: 'Ⲽ', mapping: Mapped("ⲽ") }, - Range { from: 'ⲽ', to: 'ⲽ', mapping: Valid }, - Range { from: 'Ⲿ', to: 'Ⲿ', mapping: Mapped("ⲿ") }, - Range { from: 'ⲿ', to: 'ⲿ', mapping: Valid }, - Range { from: 'Ⳁ', to: 'Ⳁ', mapping: Mapped("ⳁ") }, - Range { from: 'ⳁ', to: 'ⳁ', mapping: Valid }, - Range { from: 'Ⳃ', to: 'Ⳃ', mapping: Mapped("ⳃ") }, - Range { from: 'ⳃ', to: 'ⳃ', mapping: Valid }, - Range { from: 'Ⳅ', to: 'Ⳅ', mapping: Mapped("ⳅ") }, - Range { from: 'ⳅ', to: 'ⳅ', mapping: Valid }, - Range { from: 'Ⳇ', to: 'Ⳇ', mapping: Mapped("ⳇ") }, - Range { from: 'ⳇ', to: 'ⳇ', mapping: Valid }, - Range { from: 'Ⳉ', to: 'Ⳉ', mapping: Mapped("ⳉ") }, - Range { from: 'ⳉ', to: 'ⳉ', mapping: Valid }, - Range { from: 'Ⳋ', to: 'Ⳋ', mapping: Mapped("ⳋ") }, - Range { from: 'ⳋ', to: 'ⳋ', mapping: Valid }, - Range { from: 'Ⳍ', to: 'Ⳍ', mapping: Mapped("ⳍ") }, - Range { from: 'ⳍ', to: 'ⳍ', mapping: Valid }, - Range { from: 'Ⳏ', to: 'Ⳏ', mapping: Mapped("ⳏ") }, - Range { from: 'ⳏ', to: 'ⳏ', mapping: Valid }, - Range { from: 'Ⳑ', to: 'Ⳑ', mapping: Mapped("ⳑ") }, - Range { from: 'ⳑ', to: 'ⳑ', mapping: Valid }, - Range { from: 'Ⳓ', to: 'Ⳓ', mapping: Mapped("ⳓ") }, - Range { from: 'ⳓ', to: 'ⳓ', mapping: Valid }, - Range { from: 'Ⳕ', to: 'Ⳕ', mapping: Mapped("ⳕ") }, - Range { from: 'ⳕ', to: 'ⳕ', mapping: Valid }, - Range { from: 'Ⳗ', to: 'Ⳗ', mapping: Mapped("ⳗ") }, - Range { from: 'ⳗ', to: 'ⳗ', mapping: Valid }, - Range { from: 'Ⳙ', to: 'Ⳙ', mapping: Mapped("ⳙ") }, - Range { from: 'ⳙ', to: 'ⳙ', mapping: Valid }, - Range { from: 'Ⳛ', to: 'Ⳛ', mapping: Mapped("ⳛ") }, - Range { from: 'ⳛ', to: 'ⳛ', mapping: Valid }, - Range { from: 'Ⳝ', to: 'Ⳝ', mapping: Mapped("ⳝ") }, - Range { from: 'ⳝ', to: 'ⳝ', mapping: Valid }, - Range { from: 'Ⳟ', to: 'Ⳟ', mapping: Mapped("ⳟ") }, - Range { from: 'ⳟ', to: 'ⳟ', mapping: Valid }, - Range { from: 'Ⳡ', to: 'Ⳡ', mapping: Mapped("ⳡ") }, - Range { from: 'ⳡ', to: 'ⳡ', mapping: Valid }, - Range { from: 'Ⳣ', to: 'Ⳣ', mapping: Mapped("ⳣ") }, - Range { from: 'ⳣ', to: 'ⳤ', mapping: Valid }, - Range { from: '⳥', to: '⳪', mapping: Valid }, - Range { from: 'Ⳬ', to: 'Ⳬ', mapping: Mapped("ⳬ") }, - Range { from: 'ⳬ', to: 'ⳬ', mapping: Valid }, - Range { from: 'Ⳮ', to: 'Ⳮ', mapping: Mapped("ⳮ") }, - Range { from: 'ⳮ', to: '⳱', mapping: Valid }, - Range { from: 'Ⳳ', to: 'Ⳳ', mapping: Mapped("ⳳ") }, - Range { from: 'ⳳ', to: 'ⳳ', mapping: Valid }, - Range { from: '⳴', to: '⳸', mapping: Disallowed }, - Range { from: '⳹', to: '⳿', mapping: Valid }, - Range { from: 'ⴀ', to: 'ⴥ', mapping: Valid }, - Range { from: '⴦', to: '⴦', mapping: Disallowed }, - Range { from: 'ⴧ', to: 'ⴧ', mapping: Valid }, - Range { from: '⴨', to: '⴬', mapping: Disallowed }, - Range { from: 'ⴭ', to: 'ⴭ', mapping: Valid }, - Range { from: '⴮', to: '⴯', mapping: Disallowed }, - Range { from: 'ⴰ', to: 'ⵥ', mapping: Valid }, - Range { from: 'ⵦ', to: 'ⵧ', mapping: Valid }, - Range { from: '⵨', to: '⵮', mapping: Disallowed }, - Range { from: 'ⵯ', to: 'ⵯ', mapping: Mapped("ⵡ") }, - Range { from: '⵰', to: '⵰', mapping: Valid }, - Range { from: '⵱', to: '⵾', mapping: Disallowed }, - Range { from: '⵿', to: '⵿', mapping: Valid }, - Range { from: 'ⶀ', to: 'ⶖ', mapping: Valid }, - Range { from: '⶗', to: '⶟', mapping: Disallowed }, - Range { from: 'ⶠ', to: 'ⶦ', mapping: Valid }, - Range { from: '⶧', to: '⶧', mapping: Disallowed }, - Range { from: 'ⶨ', to: 'ⶮ', mapping: Valid }, - Range { from: '⶯', to: '⶯', mapping: Disallowed }, - Range { from: 'ⶰ', to: 'ⶶ', mapping: Valid }, - Range { from: '⶷', to: '⶷', mapping: Disallowed }, - Range { from: 'ⶸ', to: 'ⶾ', mapping: Valid }, - Range { from: '⶿', to: '⶿', mapping: Disallowed }, - Range { from: 'ⷀ', to: 'ⷆ', mapping: Valid }, - Range { from: '⷇', to: '⷇', mapping: Disallowed }, - Range { from: 'ⷈ', to: 'ⷎ', mapping: Valid }, - Range { from: '⷏', to: '⷏', mapping: Disallowed }, - Range { from: 'ⷐ', to: 'ⷖ', mapping: Valid }, - Range { from: '⷗', to: '⷗', mapping: Disallowed }, - Range { from: 'ⷘ', to: 'ⷞ', mapping: Valid }, - Range { from: '⷟', to: '⷟', mapping: Disallowed }, - Range { from: 'ⷠ', to: 'ⷿ', mapping: Valid }, - Range { from: '⸀', to: '⸗', mapping: Valid }, - Range { from: '⸘', to: '⸛', mapping: Valid }, - Range { from: '⸜', to: '⸝', mapping: Valid }, - Range { from: '⸞', to: '⸮', mapping: Valid }, - Range { from: 'ⸯ', to: 'ⸯ', mapping: Valid }, - Range { from: '⸰', to: '⸰', mapping: Valid }, - Range { from: '⸱', to: '⸱', mapping: Valid }, - Range { from: '⸲', to: '⸻', mapping: Valid }, - Range { from: '⸼', to: '⹂', mapping: Valid }, - Range { from: '⹃', to: '⹿', mapping: Disallowed }, - Range { from: '⺀', to: '⺙', mapping: Valid }, - Range { from: '⺚', to: '⺚', mapping: Disallowed }, - Range { from: '⺛', to: '⺞', mapping: Valid }, - Range { from: '⺟', to: '⺟', mapping: Mapped("母") }, - Range { from: '⺠', to: '⻲', mapping: Valid }, - Range { from: '⻳', to: '⻳', mapping: Mapped("龟") }, - Range { from: '⻴', to: '⻿', mapping: Disallowed }, - Range { from: '⼀', to: '⼀', mapping: Mapped("一") }, - Range { from: '⼁', to: '⼁', mapping: Mapped("丨") }, - Range { from: '⼂', to: '⼂', mapping: Mapped("丶") }, - Range { from: '⼃', to: '⼃', mapping: Mapped("丿") }, - Range { from: '⼄', to: '⼄', mapping: Mapped("乙") }, - Range { from: '⼅', to: '⼅', mapping: Mapped("亅") }, - Range { from: '⼆', to: '⼆', mapping: Mapped("二") }, - Range { from: '⼇', to: '⼇', mapping: Mapped("亠") }, - Range { from: '⼈', to: '⼈', mapping: Mapped("人") }, - Range { from: '⼉', to: '⼉', mapping: Mapped("儿") }, - Range { from: '⼊', to: '⼊', mapping: Mapped("入") }, - Range { from: '⼋', to: '⼋', mapping: Mapped("八") }, - Range { from: '⼌', to: '⼌', mapping: Mapped("冂") }, - Range { from: '⼍', to: '⼍', mapping: Mapped("冖") }, - Range { from: '⼎', to: '⼎', mapping: Mapped("冫") }, - Range { from: '⼏', to: '⼏', mapping: Mapped("几") }, - Range { from: '⼐', to: '⼐', mapping: Mapped("凵") }, - Range { from: '⼑', to: '⼑', mapping: Mapped("刀") }, - Range { from: '⼒', to: '⼒', mapping: Mapped("力") }, - Range { from: '⼓', to: '⼓', mapping: Mapped("勹") }, - Range { from: '⼔', to: '⼔', mapping: Mapped("匕") }, - Range { from: '⼕', to: '⼕', mapping: Mapped("匚") }, - Range { from: '⼖', to: '⼖', mapping: Mapped("匸") }, - Range { from: '⼗', to: '⼗', mapping: Mapped("十") }, - Range { from: '⼘', to: '⼘', mapping: Mapped("卜") }, - Range { from: '⼙', to: '⼙', mapping: Mapped("卩") }, - Range { from: '⼚', to: '⼚', mapping: Mapped("厂") }, - Range { from: '⼛', to: '⼛', mapping: Mapped("厶") }, - Range { from: '⼜', to: '⼜', mapping: Mapped("又") }, - Range { from: '⼝', to: '⼝', mapping: Mapped("口") }, - Range { from: '⼞', to: '⼞', mapping: Mapped("囗") }, - Range { from: '⼟', to: '⼟', mapping: Mapped("土") }, - Range { from: '⼠', to: '⼠', mapping: Mapped("士") }, - Range { from: '⼡', to: '⼡', mapping: Mapped("夂") }, - Range { from: '⼢', to: '⼢', mapping: Mapped("夊") }, - Range { from: '⼣', to: '⼣', mapping: Mapped("夕") }, - Range { from: '⼤', to: '⼤', mapping: Mapped("大") }, - Range { from: '⼥', to: '⼥', mapping: Mapped("女") }, - Range { from: '⼦', to: '⼦', mapping: Mapped("子") }, - Range { from: '⼧', to: '⼧', mapping: Mapped("宀") }, - Range { from: '⼨', to: '⼨', mapping: Mapped("寸") }, - Range { from: '⼩', to: '⼩', mapping: Mapped("小") }, - Range { from: '⼪', to: '⼪', mapping: Mapped("尢") }, - Range { from: '⼫', to: '⼫', mapping: Mapped("尸") }, - Range { from: '⼬', to: '⼬', mapping: Mapped("屮") }, - Range { from: '⼭', to: '⼭', mapping: Mapped("山") }, - Range { from: '⼮', to: '⼮', mapping: Mapped("巛") }, - Range { from: '⼯', to: '⼯', mapping: Mapped("工") }, - Range { from: '⼰', to: '⼰', mapping: Mapped("己") }, - Range { from: '⼱', to: '⼱', mapping: Mapped("巾") }, - Range { from: '⼲', to: '⼲', mapping: Mapped("干") }, - Range { from: '⼳', to: '⼳', mapping: Mapped("幺") }, - Range { from: '⼴', to: '⼴', mapping: Mapped("广") }, - Range { from: '⼵', to: '⼵', mapping: Mapped("廴") }, - Range { from: '⼶', to: '⼶', mapping: Mapped("廾") }, - Range { from: '⼷', to: '⼷', mapping: Mapped("弋") }, - Range { from: '⼸', to: '⼸', mapping: Mapped("弓") }, - Range { from: '⼹', to: '⼹', mapping: Mapped("彐") }, - Range { from: '⼺', to: '⼺', mapping: Mapped("彡") }, - Range { from: '⼻', to: '⼻', mapping: Mapped("彳") }, - Range { from: '⼼', to: '⼼', mapping: Mapped("心") }, - Range { from: '⼽', to: '⼽', mapping: Mapped("戈") }, - Range { from: '⼾', to: '⼾', mapping: Mapped("戶") }, - Range { from: '⼿', to: '⼿', mapping: Mapped("手") }, - Range { from: '⽀', to: '⽀', mapping: Mapped("支") }, - Range { from: '⽁', to: '⽁', mapping: Mapped("攴") }, - Range { from: '⽂', to: '⽂', mapping: Mapped("文") }, - Range { from: '⽃', to: '⽃', mapping: Mapped("斗") }, - Range { from: '⽄', to: '⽄', mapping: Mapped("斤") }, - Range { from: '⽅', to: '⽅', mapping: Mapped("方") }, - Range { from: '⽆', to: '⽆', mapping: Mapped("无") }, - Range { from: '⽇', to: '⽇', mapping: Mapped("日") }, - Range { from: '⽈', to: '⽈', mapping: Mapped("曰") }, - Range { from: '⽉', to: '⽉', mapping: Mapped("月") }, - Range { from: '⽊', to: '⽊', mapping: Mapped("木") }, - Range { from: '⽋', to: '⽋', mapping: Mapped("欠") }, - Range { from: '⽌', to: '⽌', mapping: Mapped("止") }, - Range { from: '⽍', to: '⽍', mapping: Mapped("歹") }, - Range { from: '⽎', to: '⽎', mapping: Mapped("殳") }, - Range { from: '⽏', to: '⽏', mapping: Mapped("毋") }, - Range { from: '⽐', to: '⽐', mapping: Mapped("比") }, - Range { from: '⽑', to: '⽑', mapping: Mapped("毛") }, - Range { from: '⽒', to: '⽒', mapping: Mapped("氏") }, - Range { from: '⽓', to: '⽓', mapping: Mapped("气") }, - Range { from: '⽔', to: '⽔', mapping: Mapped("水") }, - Range { from: '⽕', to: '⽕', mapping: Mapped("火") }, - Range { from: '⽖', to: '⽖', mapping: Mapped("爪") }, - Range { from: '⽗', to: '⽗', mapping: Mapped("父") }, - Range { from: '⽘', to: '⽘', mapping: Mapped("爻") }, - Range { from: '⽙', to: '⽙', mapping: Mapped("爿") }, - Range { from: '⽚', to: '⽚', mapping: Mapped("片") }, - Range { from: '⽛', to: '⽛', mapping: Mapped("牙") }, - Range { from: '⽜', to: '⽜', mapping: Mapped("牛") }, - Range { from: '⽝', to: '⽝', mapping: Mapped("犬") }, - Range { from: '⽞', to: '⽞', mapping: Mapped("玄") }, - Range { from: '⽟', to: '⽟', mapping: Mapped("玉") }, - Range { from: '⽠', to: '⽠', mapping: Mapped("瓜") }, - Range { from: '⽡', to: '⽡', mapping: Mapped("瓦") }, - Range { from: '⽢', to: '⽢', mapping: Mapped("甘") }, - Range { from: '⽣', to: '⽣', mapping: Mapped("生") }, - Range { from: '⽤', to: '⽤', mapping: Mapped("用") }, - Range { from: '⽥', to: '⽥', mapping: Mapped("田") }, - Range { from: '⽦', to: '⽦', mapping: Mapped("疋") }, - Range { from: '⽧', to: '⽧', mapping: Mapped("疒") }, - Range { from: '⽨', to: '⽨', mapping: Mapped("癶") }, - Range { from: '⽩', to: '⽩', mapping: Mapped("白") }, - Range { from: '⽪', to: '⽪', mapping: Mapped("皮") }, - Range { from: '⽫', to: '⽫', mapping: Mapped("皿") }, - Range { from: '⽬', to: '⽬', mapping: Mapped("目") }, - Range { from: '⽭', to: '⽭', mapping: Mapped("矛") }, - Range { from: '⽮', to: '⽮', mapping: Mapped("矢") }, - Range { from: '⽯', to: '⽯', mapping: Mapped("石") }, - Range { from: '⽰', to: '⽰', mapping: Mapped("示") }, - Range { from: '⽱', to: '⽱', mapping: Mapped("禸") }, - Range { from: '⽲', to: '⽲', mapping: Mapped("禾") }, - Range { from: '⽳', to: '⽳', mapping: Mapped("穴") }, - Range { from: '⽴', to: '⽴', mapping: Mapped("立") }, - Range { from: '⽵', to: '⽵', mapping: Mapped("竹") }, - Range { from: '⽶', to: '⽶', mapping: Mapped("米") }, - Range { from: '⽷', to: '⽷', mapping: Mapped("糸") }, - Range { from: '⽸', to: '⽸', mapping: Mapped("缶") }, - Range { from: '⽹', to: '⽹', mapping: Mapped("网") }, - Range { from: '⽺', to: '⽺', mapping: Mapped("羊") }, - Range { from: '⽻', to: '⽻', mapping: Mapped("羽") }, - Range { from: '⽼', to: '⽼', mapping: Mapped("老") }, - Range { from: '⽽', to: '⽽', mapping: Mapped("而") }, - Range { from: '⽾', to: '⽾', mapping: Mapped("耒") }, - Range { from: '⽿', to: '⽿', mapping: Mapped("耳") }, - Range { from: '⾀', to: '⾀', mapping: Mapped("聿") }, - Range { from: '⾁', to: '⾁', mapping: Mapped("肉") }, - Range { from: '⾂', to: '⾂', mapping: Mapped("臣") }, - Range { from: '⾃', to: '⾃', mapping: Mapped("自") }, - Range { from: '⾄', to: '⾄', mapping: Mapped("至") }, - Range { from: '⾅', to: '⾅', mapping: Mapped("臼") }, - Range { from: '⾆', to: '⾆', mapping: Mapped("舌") }, - Range { from: '⾇', to: '⾇', mapping: Mapped("舛") }, - Range { from: '⾈', to: '⾈', mapping: Mapped("舟") }, - Range { from: '⾉', to: '⾉', mapping: Mapped("艮") }, - Range { from: '⾊', to: '⾊', mapping: Mapped("色") }, - Range { from: '⾋', to: '⾋', mapping: Mapped("艸") }, - Range { from: '⾌', to: '⾌', mapping: Mapped("虍") }, - Range { from: '⾍', to: '⾍', mapping: Mapped("虫") }, - Range { from: '⾎', to: '⾎', mapping: Mapped("血") }, - Range { from: '⾏', to: '⾏', mapping: Mapped("行") }, - Range { from: '⾐', to: '⾐', mapping: Mapped("衣") }, - Range { from: '⾑', to: '⾑', mapping: Mapped("襾") }, - Range { from: '⾒', to: '⾒', mapping: Mapped("見") }, - Range { from: '⾓', to: '⾓', mapping: Mapped("角") }, - Range { from: '⾔', to: '⾔', mapping: Mapped("言") }, - Range { from: '⾕', to: '⾕', mapping: Mapped("谷") }, - Range { from: '⾖', to: '⾖', mapping: Mapped("豆") }, - Range { from: '⾗', to: '⾗', mapping: Mapped("豕") }, - Range { from: '⾘', to: '⾘', mapping: Mapped("豸") }, - Range { from: '⾙', to: '⾙', mapping: Mapped("貝") }, - Range { from: '⾚', to: '⾚', mapping: Mapped("赤") }, - Range { from: '⾛', to: '⾛', mapping: Mapped("走") }, - Range { from: '⾜', to: '⾜', mapping: Mapped("足") }, - Range { from: '⾝', to: '⾝', mapping: Mapped("身") }, - Range { from: '⾞', to: '⾞', mapping: Mapped("車") }, - Range { from: '⾟', to: '⾟', mapping: Mapped("辛") }, - Range { from: '⾠', to: '⾠', mapping: Mapped("辰") }, - Range { from: '⾡', to: '⾡', mapping: Mapped("辵") }, - Range { from: '⾢', to: '⾢', mapping: Mapped("邑") }, - Range { from: '⾣', to: '⾣', mapping: Mapped("酉") }, - Range { from: '⾤', to: '⾤', mapping: Mapped("釆") }, - Range { from: '⾥', to: '⾥', mapping: Mapped("里") }, - Range { from: '⾦', to: '⾦', mapping: Mapped("金") }, - Range { from: '⾧', to: '⾧', mapping: Mapped("長") }, - Range { from: '⾨', to: '⾨', mapping: Mapped("門") }, - Range { from: '⾩', to: '⾩', mapping: Mapped("阜") }, - Range { from: '⾪', to: '⾪', mapping: Mapped("隶") }, - Range { from: '⾫', to: '⾫', mapping: Mapped("隹") }, - Range { from: '⾬', to: '⾬', mapping: Mapped("雨") }, - Range { from: '⾭', to: '⾭', mapping: Mapped("靑") }, - Range { from: '⾮', to: '⾮', mapping: Mapped("非") }, - Range { from: '⾯', to: '⾯', mapping: Mapped("面") }, - Range { from: '⾰', to: '⾰', mapping: Mapped("革") }, - Range { from: '⾱', to: '⾱', mapping: Mapped("韋") }, - Range { from: '⾲', to: '⾲', mapping: Mapped("韭") }, - Range { from: '⾳', to: '⾳', mapping: Mapped("音") }, - Range { from: '⾴', to: '⾴', mapping: Mapped("頁") }, - Range { from: '⾵', to: '⾵', mapping: Mapped("風") }, - Range { from: '⾶', to: '⾶', mapping: Mapped("飛") }, - Range { from: '⾷', to: '⾷', mapping: Mapped("食") }, - Range { from: '⾸', to: '⾸', mapping: Mapped("首") }, - Range { from: '⾹', to: '⾹', mapping: Mapped("香") }, - Range { from: '⾺', to: '⾺', mapping: Mapped("馬") }, - Range { from: '⾻', to: '⾻', mapping: Mapped("骨") }, - Range { from: '⾼', to: '⾼', mapping: Mapped("高") }, - Range { from: '⾽', to: '⾽', mapping: Mapped("髟") }, - Range { from: '⾾', to: '⾾', mapping: Mapped("鬥") }, - Range { from: '⾿', to: '⾿', mapping: Mapped("鬯") }, - Range { from: '⿀', to: '⿀', mapping: Mapped("鬲") }, - Range { from: '⿁', to: '⿁', mapping: Mapped("鬼") }, - Range { from: '⿂', to: '⿂', mapping: Mapped("魚") }, - Range { from: '⿃', to: '⿃', mapping: Mapped("鳥") }, - Range { from: '⿄', to: '⿄', mapping: Mapped("鹵") }, - Range { from: '⿅', to: '⿅', mapping: Mapped("鹿") }, - Range { from: '⿆', to: '⿆', mapping: Mapped("麥") }, - Range { from: '⿇', to: '⿇', mapping: Mapped("麻") }, - Range { from: '⿈', to: '⿈', mapping: Mapped("黃") }, - Range { from: '⿉', to: '⿉', mapping: Mapped("黍") }, - Range { from: '⿊', to: '⿊', mapping: Mapped("黑") }, - Range { from: '⿋', to: '⿋', mapping: Mapped("黹") }, - Range { from: '⿌', to: '⿌', mapping: Mapped("黽") }, - Range { from: '⿍', to: '⿍', mapping: Mapped("鼎") }, - Range { from: '⿎', to: '⿎', mapping: Mapped("鼓") }, - Range { from: '⿏', to: '⿏', mapping: Mapped("鼠") }, - Range { from: '⿐', to: '⿐', mapping: Mapped("鼻") }, - Range { from: '⿑', to: '⿑', mapping: Mapped("齊") }, - Range { from: '⿒', to: '⿒', mapping: Mapped("齒") }, - Range { from: '⿓', to: '⿓', mapping: Mapped("龍") }, - Range { from: '⿔', to: '⿔', mapping: Mapped("龜") }, - Range { from: '⿕', to: '⿕', mapping: Mapped("龠") }, - Range { from: '⿖', to: '⿯', mapping: Disallowed }, - Range { from: '⿰', to: '⿻', mapping: Disallowed }, - Range { from: '⿼', to: '⿿', mapping: Disallowed }, - Range { from: ' ', to: ' ', mapping: DisallowedStd3Mapped(" ") }, - Range { from: '、', to: '、', mapping: Valid }, - Range { from: '。', to: '。', mapping: Mapped(".") }, - Range { from: '〃', to: '〄', mapping: Valid }, - Range { from: '々', to: '〇', mapping: Valid }, - Range { from: '〈', to: '〩', mapping: Valid }, - Range { from: '〪', to: '〭', mapping: Valid }, - Range { from: '〮', to: '〵', mapping: Valid }, - Range { from: '〶', to: '〶', mapping: Mapped("〒") }, - Range { from: '〷', to: '〷', mapping: Valid }, - Range { from: '〸', to: '〸', mapping: Mapped("十") }, - Range { from: '〹', to: '〹', mapping: Mapped("卄") }, - Range { from: '〺', to: '〺', mapping: Mapped("卅") }, - Range { from: '〻', to: '〻', mapping: Valid }, - Range { from: '〼', to: '〼', mapping: Valid }, - Range { from: '〽', to: '〽', mapping: Valid }, - Range { from: '〾', to: '〾', mapping: Valid }, - Range { from: '〿', to: '〿', mapping: Valid }, - Range { from: '぀', to: '぀', mapping: Disallowed }, - Range { from: 'ぁ', to: 'ゔ', mapping: Valid }, - Range { from: 'ゕ', to: 'ゖ', mapping: Valid }, - Range { from: '゗', to: '゘', mapping: Disallowed }, - Range { from: '゙', to: '゚', mapping: Valid }, - Range { from: '゛', to: '゛', mapping: DisallowedStd3Mapped(" ゙") }, - Range { from: '゜', to: '゜', mapping: DisallowedStd3Mapped(" ゚") }, - Range { from: 'ゝ', to: 'ゞ', mapping: Valid }, - Range { from: 'ゟ', to: 'ゟ', mapping: Mapped("より") }, - Range { from: '゠', to: '゠', mapping: Valid }, - Range { from: 'ァ', to: 'ヾ', mapping: Valid }, - Range { from: 'ヿ', to: 'ヿ', mapping: Mapped("コト") }, - Range { from: '㄀', to: '㄄', mapping: Disallowed }, - Range { from: 'ㄅ', to: 'ㄬ', mapping: Valid }, - Range { from: 'ㄭ', to: 'ㄭ', mapping: Valid }, - Range { from: 'ㄮ', to: '㄰', mapping: Disallowed }, - Range { from: 'ㄱ', to: 'ㄱ', mapping: Mapped("ᄀ") }, - Range { from: 'ㄲ', to: 'ㄲ', mapping: Mapped("ᄁ") }, - Range { from: 'ㄳ', to: 'ㄳ', mapping: Mapped("ᆪ") }, - Range { from: 'ㄴ', to: 'ㄴ', mapping: Mapped("ᄂ") }, - Range { from: 'ㄵ', to: 'ㄵ', mapping: Mapped("ᆬ") }, - Range { from: 'ㄶ', to: 'ㄶ', mapping: Mapped("ᆭ") }, - Range { from: 'ㄷ', to: 'ㄷ', mapping: Mapped("ᄃ") }, - Range { from: 'ㄸ', to: 'ㄸ', mapping: Mapped("ᄄ") }, - Range { from: 'ㄹ', to: 'ㄹ', mapping: Mapped("ᄅ") }, - Range { from: 'ㄺ', to: 'ㄺ', mapping: Mapped("ᆰ") }, - Range { from: 'ㄻ', to: 'ㄻ', mapping: Mapped("ᆱ") }, - Range { from: 'ㄼ', to: 'ㄼ', mapping: Mapped("ᆲ") }, - Range { from: 'ㄽ', to: 'ㄽ', mapping: Mapped("ᆳ") }, - Range { from: 'ㄾ', to: 'ㄾ', mapping: Mapped("ᆴ") }, - Range { from: 'ㄿ', to: 'ㄿ', mapping: Mapped("ᆵ") }, - Range { from: 'ㅀ', to: 'ㅀ', mapping: Mapped("ᄚ") }, - Range { from: 'ㅁ', to: 'ㅁ', mapping: Mapped("ᄆ") }, - Range { from: 'ㅂ', to: 'ㅂ', mapping: Mapped("ᄇ") }, - Range { from: 'ㅃ', to: 'ㅃ', mapping: Mapped("ᄈ") }, - Range { from: 'ㅄ', to: 'ㅄ', mapping: Mapped("ᄡ") }, - Range { from: 'ㅅ', to: 'ㅅ', mapping: Mapped("ᄉ") }, - Range { from: 'ㅆ', to: 'ㅆ', mapping: Mapped("ᄊ") }, - Range { from: 'ㅇ', to: 'ㅇ', mapping: Mapped("ᄋ") }, - Range { from: 'ㅈ', to: 'ㅈ', mapping: Mapped("ᄌ") }, - Range { from: 'ㅉ', to: 'ㅉ', mapping: Mapped("ᄍ") }, - Range { from: 'ㅊ', to: 'ㅊ', mapping: Mapped("ᄎ") }, - Range { from: 'ㅋ', to: 'ㅋ', mapping: Mapped("ᄏ") }, - Range { from: 'ㅌ', to: 'ㅌ', mapping: Mapped("ᄐ") }, - Range { from: 'ㅍ', to: 'ㅍ', mapping: Mapped("ᄑ") }, - Range { from: 'ㅎ', to: 'ㅎ', mapping: Mapped("ᄒ") }, - Range { from: 'ㅏ', to: 'ㅏ', mapping: Mapped("ᅡ") }, - Range { from: 'ㅐ', to: 'ㅐ', mapping: Mapped("ᅢ") }, - Range { from: 'ㅑ', to: 'ㅑ', mapping: Mapped("ᅣ") }, - Range { from: 'ㅒ', to: 'ㅒ', mapping: Mapped("ᅤ") }, - Range { from: 'ㅓ', to: 'ㅓ', mapping: Mapped("ᅥ") }, - Range { from: 'ㅔ', to: 'ㅔ', mapping: Mapped("ᅦ") }, - Range { from: 'ㅕ', to: 'ㅕ', mapping: Mapped("ᅧ") }, - Range { from: 'ㅖ', to: 'ㅖ', mapping: Mapped("ᅨ") }, - Range { from: 'ㅗ', to: 'ㅗ', mapping: Mapped("ᅩ") }, - Range { from: 'ㅘ', to: 'ㅘ', mapping: Mapped("ᅪ") }, - Range { from: 'ㅙ', to: 'ㅙ', mapping: Mapped("ᅫ") }, - Range { from: 'ㅚ', to: 'ㅚ', mapping: Mapped("ᅬ") }, - Range { from: 'ㅛ', to: 'ㅛ', mapping: Mapped("ᅭ") }, - Range { from: 'ㅜ', to: 'ㅜ', mapping: Mapped("ᅮ") }, - Range { from: 'ㅝ', to: 'ㅝ', mapping: Mapped("ᅯ") }, - Range { from: 'ㅞ', to: 'ㅞ', mapping: Mapped("ᅰ") }, - Range { from: 'ㅟ', to: 'ㅟ', mapping: Mapped("ᅱ") }, - Range { from: 'ㅠ', to: 'ㅠ', mapping: Mapped("ᅲ") }, - Range { from: 'ㅡ', to: 'ㅡ', mapping: Mapped("ᅳ") }, - Range { from: 'ㅢ', to: 'ㅢ', mapping: Mapped("ᅴ") }, - Range { from: 'ㅣ', to: 'ㅣ', mapping: Mapped("ᅵ") }, - Range { from: 'ㅤ', to: 'ㅤ', mapping: Disallowed }, - Range { from: 'ㅥ', to: 'ㅥ', mapping: Mapped("ᄔ") }, - Range { from: 'ㅦ', to: 'ㅦ', mapping: Mapped("ᄕ") }, - Range { from: 'ㅧ', to: 'ㅧ', mapping: Mapped("ᇇ") }, - Range { from: 'ㅨ', to: 'ㅨ', mapping: Mapped("ᇈ") }, - Range { from: 'ㅩ', to: 'ㅩ', mapping: Mapped("ᇌ") }, - Range { from: 'ㅪ', to: 'ㅪ', mapping: Mapped("ᇎ") }, - Range { from: 'ㅫ', to: 'ㅫ', mapping: Mapped("ᇓ") }, - Range { from: 'ㅬ', to: 'ㅬ', mapping: Mapped("ᇗ") }, - Range { from: 'ㅭ', to: 'ㅭ', mapping: Mapped("ᇙ") }, - Range { from: 'ㅮ', to: 'ㅮ', mapping: Mapped("ᄜ") }, - Range { from: 'ㅯ', to: 'ㅯ', mapping: Mapped("ᇝ") }, - Range { from: 'ㅰ', to: 'ㅰ', mapping: Mapped("ᇟ") }, - Range { from: 'ㅱ', to: 'ㅱ', mapping: Mapped("ᄝ") }, - Range { from: 'ㅲ', to: 'ㅲ', mapping: Mapped("ᄞ") }, - Range { from: 'ㅳ', to: 'ㅳ', mapping: Mapped("ᄠ") }, - Range { from: 'ㅴ', to: 'ㅴ', mapping: Mapped("ᄢ") }, - Range { from: 'ㅵ', to: 'ㅵ', mapping: Mapped("ᄣ") }, - Range { from: 'ㅶ', to: 'ㅶ', mapping: Mapped("ᄧ") }, - Range { from: 'ㅷ', to: 'ㅷ', mapping: Mapped("ᄩ") }, - Range { from: 'ㅸ', to: 'ㅸ', mapping: Mapped("ᄫ") }, - Range { from: 'ㅹ', to: 'ㅹ', mapping: Mapped("ᄬ") }, - Range { from: 'ㅺ', to: 'ㅺ', mapping: Mapped("ᄭ") }, - Range { from: 'ㅻ', to: 'ㅻ', mapping: Mapped("ᄮ") }, - Range { from: 'ㅼ', to: 'ㅼ', mapping: Mapped("ᄯ") }, - Range { from: 'ㅽ', to: 'ㅽ', mapping: Mapped("ᄲ") }, - Range { from: 'ㅾ', to: 'ㅾ', mapping: Mapped("ᄶ") }, - Range { from: 'ㅿ', to: 'ㅿ', mapping: Mapped("ᅀ") }, - Range { from: 'ㆀ', to: 'ㆀ', mapping: Mapped("ᅇ") }, - Range { from: 'ㆁ', to: 'ㆁ', mapping: Mapped("ᅌ") }, - Range { from: 'ㆂ', to: 'ㆂ', mapping: Mapped("ᇱ") }, - Range { from: 'ㆃ', to: 'ㆃ', mapping: Mapped("ᇲ") }, - Range { from: 'ㆄ', to: 'ㆄ', mapping: Mapped("ᅗ") }, - Range { from: 'ㆅ', to: 'ㆅ', mapping: Mapped("ᅘ") }, - Range { from: 'ㆆ', to: 'ㆆ', mapping: Mapped("ᅙ") }, - Range { from: 'ㆇ', to: 'ㆇ', mapping: Mapped("ᆄ") }, - Range { from: 'ㆈ', to: 'ㆈ', mapping: Mapped("ᆅ") }, - Range { from: 'ㆉ', to: 'ㆉ', mapping: Mapped("ᆈ") }, - Range { from: 'ㆊ', to: 'ㆊ', mapping: Mapped("ᆑ") }, - Range { from: 'ㆋ', to: 'ㆋ', mapping: Mapped("ᆒ") }, - Range { from: 'ㆌ', to: 'ㆌ', mapping: Mapped("ᆔ") }, - Range { from: 'ㆍ', to: 'ㆍ', mapping: Mapped("ᆞ") }, - Range { from: 'ㆎ', to: 'ㆎ', mapping: Mapped("ᆡ") }, - Range { from: '㆏', to: '㆏', mapping: Disallowed }, - Range { from: '㆐', to: '㆑', mapping: Valid }, - Range { from: '㆒', to: '㆒', mapping: Mapped("一") }, - Range { from: '㆓', to: '㆓', mapping: Mapped("二") }, - Range { from: '㆔', to: '㆔', mapping: Mapped("三") }, - Range { from: '㆕', to: '㆕', mapping: Mapped("四") }, - Range { from: '㆖', to: '㆖', mapping: Mapped("上") }, - Range { from: '㆗', to: '㆗', mapping: Mapped("中") }, - Range { from: '㆘', to: '㆘', mapping: Mapped("下") }, - Range { from: '㆙', to: '㆙', mapping: Mapped("甲") }, - Range { from: '㆚', to: '㆚', mapping: Mapped("乙") }, - Range { from: '㆛', to: '㆛', mapping: Mapped("丙") }, - Range { from: '㆜', to: '㆜', mapping: Mapped("丁") }, - Range { from: '㆝', to: '㆝', mapping: Mapped("天") }, - Range { from: '㆞', to: '㆞', mapping: Mapped("地") }, - Range { from: '㆟', to: '㆟', mapping: Mapped("人") }, - Range { from: 'ㆠ', to: 'ㆷ', mapping: Valid }, - Range { from: 'ㆸ', to: 'ㆺ', mapping: Valid }, - Range { from: 'ㆻ', to: 'ㆿ', mapping: Disallowed }, - Range { from: '㇀', to: '㇏', mapping: Valid }, - Range { from: '㇐', to: '㇣', mapping: Valid }, - Range { from: '㇤', to: '㇯', mapping: Disallowed }, - Range { from: 'ㇰ', to: 'ㇿ', mapping: Valid }, - Range { from: '㈀', to: '㈀', mapping: DisallowedStd3Mapped("(ᄀ)") }, - Range { from: '㈁', to: '㈁', mapping: DisallowedStd3Mapped("(ᄂ)") }, - Range { from: '㈂', to: '㈂', mapping: DisallowedStd3Mapped("(ᄃ)") }, - Range { from: '㈃', to: '㈃', mapping: DisallowedStd3Mapped("(ᄅ)") }, - Range { from: '㈄', to: '㈄', mapping: DisallowedStd3Mapped("(ᄆ)") }, - Range { from: '㈅', to: '㈅', mapping: DisallowedStd3Mapped("(ᄇ)") }, - Range { from: '㈆', to: '㈆', mapping: DisallowedStd3Mapped("(ᄉ)") }, - Range { from: '㈇', to: '㈇', mapping: DisallowedStd3Mapped("(ᄋ)") }, - Range { from: '㈈', to: '㈈', mapping: DisallowedStd3Mapped("(ᄌ)") }, - Range { from: '㈉', to: '㈉', mapping: DisallowedStd3Mapped("(ᄎ)") }, - Range { from: '㈊', to: '㈊', mapping: DisallowedStd3Mapped("(ᄏ)") }, - Range { from: '㈋', to: '㈋', mapping: DisallowedStd3Mapped("(ᄐ)") }, - Range { from: '㈌', to: '㈌', mapping: DisallowedStd3Mapped("(ᄑ)") }, - Range { from: '㈍', to: '㈍', mapping: DisallowedStd3Mapped("(ᄒ)") }, - Range { from: '㈎', to: '㈎', mapping: DisallowedStd3Mapped("(가)") }, - Range { from: '㈏', to: '㈏', mapping: DisallowedStd3Mapped("(나)") }, - Range { from: '㈐', to: '㈐', mapping: DisallowedStd3Mapped("(다)") }, - Range { from: '㈑', to: '㈑', mapping: DisallowedStd3Mapped("(라)") }, - Range { from: '㈒', to: '㈒', mapping: DisallowedStd3Mapped("(마)") }, - Range { from: '㈓', to: '㈓', mapping: DisallowedStd3Mapped("(바)") }, - Range { from: '㈔', to: '㈔', mapping: DisallowedStd3Mapped("(사)") }, - Range { from: '㈕', to: '㈕', mapping: DisallowedStd3Mapped("(아)") }, - Range { from: '㈖', to: '㈖', mapping: DisallowedStd3Mapped("(자)") }, - Range { from: '㈗', to: '㈗', mapping: DisallowedStd3Mapped("(차)") }, - Range { from: '㈘', to: '㈘', mapping: DisallowedStd3Mapped("(카)") }, - Range { from: '㈙', to: '㈙', mapping: DisallowedStd3Mapped("(타)") }, - Range { from: '㈚', to: '㈚', mapping: DisallowedStd3Mapped("(파)") }, - Range { from: '㈛', to: '㈛', mapping: DisallowedStd3Mapped("(하)") }, - Range { from: '㈜', to: '㈜', mapping: DisallowedStd3Mapped("(주)") }, - Range { from: '㈝', to: '㈝', mapping: DisallowedStd3Mapped("(오전)") }, - Range { from: '㈞', to: '㈞', mapping: DisallowedStd3Mapped("(오후)") }, - Range { from: '㈟', to: '㈟', mapping: Disallowed }, - Range { from: '㈠', to: '㈠', mapping: DisallowedStd3Mapped("(一)") }, - Range { from: '㈡', to: '㈡', mapping: DisallowedStd3Mapped("(二)") }, - Range { from: '㈢', to: '㈢', mapping: DisallowedStd3Mapped("(三)") }, - Range { from: '㈣', to: '㈣', mapping: DisallowedStd3Mapped("(四)") }, - Range { from: '㈤', to: '㈤', mapping: DisallowedStd3Mapped("(五)") }, - Range { from: '㈥', to: '㈥', mapping: DisallowedStd3Mapped("(六)") }, - Range { from: '㈦', to: '㈦', mapping: DisallowedStd3Mapped("(七)") }, - Range { from: '㈧', to: '㈧', mapping: DisallowedStd3Mapped("(八)") }, - Range { from: '㈨', to: '㈨', mapping: DisallowedStd3Mapped("(九)") }, - Range { from: '㈩', to: '㈩', mapping: DisallowedStd3Mapped("(十)") }, - Range { from: '㈪', to: '㈪', mapping: DisallowedStd3Mapped("(月)") }, - Range { from: '㈫', to: '㈫', mapping: DisallowedStd3Mapped("(火)") }, - Range { from: '㈬', to: '㈬', mapping: DisallowedStd3Mapped("(水)") }, - Range { from: '㈭', to: '㈭', mapping: DisallowedStd3Mapped("(木)") }, - Range { from: '㈮', to: '㈮', mapping: DisallowedStd3Mapped("(金)") }, - Range { from: '㈯', to: '㈯', mapping: DisallowedStd3Mapped("(土)") }, - Range { from: '㈰', to: '㈰', mapping: DisallowedStd3Mapped("(日)") }, - Range { from: '㈱', to: '㈱', mapping: DisallowedStd3Mapped("(株)") }, - Range { from: '㈲', to: '㈲', mapping: DisallowedStd3Mapped("(有)") }, - Range { from: '㈳', to: '㈳', mapping: DisallowedStd3Mapped("(社)") }, - Range { from: '㈴', to: '㈴', mapping: DisallowedStd3Mapped("(名)") }, - Range { from: '㈵', to: '㈵', mapping: DisallowedStd3Mapped("(特)") }, - Range { from: '㈶', to: '㈶', mapping: DisallowedStd3Mapped("(財)") }, - Range { from: '㈷', to: '㈷', mapping: DisallowedStd3Mapped("(祝)") }, - Range { from: '㈸', to: '㈸', mapping: DisallowedStd3Mapped("(労)") }, - Range { from: '㈹', to: '㈹', mapping: DisallowedStd3Mapped("(代)") }, - Range { from: '㈺', to: '㈺', mapping: DisallowedStd3Mapped("(呼)") }, - Range { from: '㈻', to: '㈻', mapping: DisallowedStd3Mapped("(学)") }, - Range { from: '㈼', to: '㈼', mapping: DisallowedStd3Mapped("(監)") }, - Range { from: '㈽', to: '㈽', mapping: DisallowedStd3Mapped("(企)") }, - Range { from: '㈾', to: '㈾', mapping: DisallowedStd3Mapped("(資)") }, - Range { from: '㈿', to: '㈿', mapping: DisallowedStd3Mapped("(協)") }, - Range { from: '㉀', to: '㉀', mapping: DisallowedStd3Mapped("(祭)") }, - Range { from: '㉁', to: '㉁', mapping: DisallowedStd3Mapped("(休)") }, - Range { from: '㉂', to: '㉂', mapping: DisallowedStd3Mapped("(自)") }, - Range { from: '㉃', to: '㉃', mapping: DisallowedStd3Mapped("(至)") }, - Range { from: '㉄', to: '㉄', mapping: Mapped("問") }, - Range { from: '㉅', to: '㉅', mapping: Mapped("幼") }, - Range { from: '㉆', to: '㉆', mapping: Mapped("文") }, - Range { from: '㉇', to: '㉇', mapping: Mapped("箏") }, - Range { from: '㉈', to: '㉏', mapping: Valid }, - Range { from: '㉐', to: '㉐', mapping: Mapped("pte") }, - Range { from: '㉑', to: '㉑', mapping: Mapped("21") }, - Range { from: '㉒', to: '㉒', mapping: Mapped("22") }, - Range { from: '㉓', to: '㉓', mapping: Mapped("23") }, - Range { from: '㉔', to: '㉔', mapping: Mapped("24") }, - Range { from: '㉕', to: '㉕', mapping: Mapped("25") }, - Range { from: '㉖', to: '㉖', mapping: Mapped("26") }, - Range { from: '㉗', to: '㉗', mapping: Mapped("27") }, - Range { from: '㉘', to: '㉘', mapping: Mapped("28") }, - Range { from: '㉙', to: '㉙', mapping: Mapped("29") }, - Range { from: '㉚', to: '㉚', mapping: Mapped("30") }, - Range { from: '㉛', to: '㉛', mapping: Mapped("31") }, - Range { from: '㉜', to: '㉜', mapping: Mapped("32") }, - Range { from: '㉝', to: '㉝', mapping: Mapped("33") }, - Range { from: '㉞', to: '㉞', mapping: Mapped("34") }, - Range { from: '㉟', to: '㉟', mapping: Mapped("35") }, - Range { from: '㉠', to: '㉠', mapping: Mapped("ᄀ") }, - Range { from: '㉡', to: '㉡', mapping: Mapped("ᄂ") }, - Range { from: '㉢', to: '㉢', mapping: Mapped("ᄃ") }, - Range { from: '㉣', to: '㉣', mapping: Mapped("ᄅ") }, - Range { from: '㉤', to: '㉤', mapping: Mapped("ᄆ") }, - Range { from: '㉥', to: '㉥', mapping: Mapped("ᄇ") }, - Range { from: '㉦', to: '㉦', mapping: Mapped("ᄉ") }, - Range { from: '㉧', to: '㉧', mapping: Mapped("ᄋ") }, - Range { from: '㉨', to: '㉨', mapping: Mapped("ᄌ") }, - Range { from: '㉩', to: '㉩', mapping: Mapped("ᄎ") }, - Range { from: '㉪', to: '㉪', mapping: Mapped("ᄏ") }, - Range { from: '㉫', to: '㉫', mapping: Mapped("ᄐ") }, - Range { from: '㉬', to: '㉬', mapping: Mapped("ᄑ") }, - Range { from: '㉭', to: '㉭', mapping: Mapped("ᄒ") }, - Range { from: '㉮', to: '㉮', mapping: Mapped("가") }, - Range { from: '㉯', to: '㉯', mapping: Mapped("나") }, - Range { from: '㉰', to: '㉰', mapping: Mapped("다") }, - Range { from: '㉱', to: '㉱', mapping: Mapped("라") }, - Range { from: '㉲', to: '㉲', mapping: Mapped("마") }, - Range { from: '㉳', to: '㉳', mapping: Mapped("바") }, - Range { from: '㉴', to: '㉴', mapping: Mapped("사") }, - Range { from: '㉵', to: '㉵', mapping: Mapped("아") }, - Range { from: '㉶', to: '㉶', mapping: Mapped("자") }, - Range { from: '㉷', to: '㉷', mapping: Mapped("차") }, - Range { from: '㉸', to: '㉸', mapping: Mapped("카") }, - Range { from: '㉹', to: '㉹', mapping: Mapped("타") }, - Range { from: '㉺', to: '㉺', mapping: Mapped("파") }, - Range { from: '㉻', to: '㉻', mapping: Mapped("하") }, - Range { from: '㉼', to: '㉼', mapping: Mapped("참고") }, - Range { from: '㉽', to: '㉽', mapping: Mapped("주의") }, - Range { from: '㉾', to: '㉾', mapping: Mapped("우") }, - Range { from: '㉿', to: '㉿', mapping: Valid }, - Range { from: '㊀', to: '㊀', mapping: Mapped("一") }, - Range { from: '㊁', to: '㊁', mapping: Mapped("二") }, - Range { from: '㊂', to: '㊂', mapping: Mapped("三") }, - Range { from: '㊃', to: '㊃', mapping: Mapped("四") }, - Range { from: '㊄', to: '㊄', mapping: Mapped("五") }, - Range { from: '㊅', to: '㊅', mapping: Mapped("六") }, - Range { from: '㊆', to: '㊆', mapping: Mapped("七") }, - Range { from: '㊇', to: '㊇', mapping: Mapped("八") }, - Range { from: '㊈', to: '㊈', mapping: Mapped("九") }, - Range { from: '㊉', to: '㊉', mapping: Mapped("十") }, - Range { from: '㊊', to: '㊊', mapping: Mapped("月") }, - Range { from: '㊋', to: '㊋', mapping: Mapped("火") }, - Range { from: '㊌', to: '㊌', mapping: Mapped("水") }, - Range { from: '㊍', to: '㊍', mapping: Mapped("木") }, - Range { from: '㊎', to: '㊎', mapping: Mapped("金") }, - Range { from: '㊏', to: '㊏', mapping: Mapped("土") }, - Range { from: '㊐', to: '㊐', mapping: Mapped("日") }, - Range { from: '㊑', to: '㊑', mapping: Mapped("株") }, - Range { from: '㊒', to: '㊒', mapping: Mapped("有") }, - Range { from: '㊓', to: '㊓', mapping: Mapped("社") }, - Range { from: '㊔', to: '㊔', mapping: Mapped("名") }, - Range { from: '㊕', to: '㊕', mapping: Mapped("特") }, - Range { from: '㊖', to: '㊖', mapping: Mapped("財") }, - Range { from: '㊗', to: '㊗', mapping: Mapped("祝") }, - Range { from: '㊘', to: '㊘', mapping: Mapped("労") }, - Range { from: '㊙', to: '㊙', mapping: Mapped("秘") }, - Range { from: '㊚', to: '㊚', mapping: Mapped("男") }, - Range { from: '㊛', to: '㊛', mapping: Mapped("女") }, - Range { from: '㊜', to: '㊜', mapping: Mapped("適") }, - Range { from: '㊝', to: '㊝', mapping: Mapped("優") }, - Range { from: '㊞', to: '㊞', mapping: Mapped("印") }, - Range { from: '㊟', to: '㊟', mapping: Mapped("注") }, - Range { from: '㊠', to: '㊠', mapping: Mapped("項") }, - Range { from: '㊡', to: '㊡', mapping: Mapped("休") }, - Range { from: '㊢', to: '㊢', mapping: Mapped("写") }, - Range { from: '㊣', to: '㊣', mapping: Mapped("正") }, - Range { from: '㊤', to: '㊤', mapping: Mapped("上") }, - Range { from: '㊥', to: '㊥', mapping: Mapped("中") }, - Range { from: '㊦', to: '㊦', mapping: Mapped("下") }, - Range { from: '㊧', to: '㊧', mapping: Mapped("左") }, - Range { from: '㊨', to: '㊨', mapping: Mapped("右") }, - Range { from: '㊩', to: '㊩', mapping: Mapped("医") }, - Range { from: '㊪', to: '㊪', mapping: Mapped("宗") }, - Range { from: '㊫', to: '㊫', mapping: Mapped("学") }, - Range { from: '㊬', to: '㊬', mapping: Mapped("監") }, - Range { from: '㊭', to: '㊭', mapping: Mapped("企") }, - Range { from: '㊮', to: '㊮', mapping: Mapped("資") }, - Range { from: '㊯', to: '㊯', mapping: Mapped("協") }, - Range { from: '㊰', to: '㊰', mapping: Mapped("夜") }, - Range { from: '㊱', to: '㊱', mapping: Mapped("36") }, - Range { from: '㊲', to: '㊲', mapping: Mapped("37") }, - Range { from: '㊳', to: '㊳', mapping: Mapped("38") }, - Range { from: '㊴', to: '㊴', mapping: Mapped("39") }, - Range { from: '㊵', to: '㊵', mapping: Mapped("40") }, - Range { from: '㊶', to: '㊶', mapping: Mapped("41") }, - Range { from: '㊷', to: '㊷', mapping: Mapped("42") }, - Range { from: '㊸', to: '㊸', mapping: Mapped("43") }, - Range { from: '㊹', to: '㊹', mapping: Mapped("44") }, - Range { from: '㊺', to: '㊺', mapping: Mapped("45") }, - Range { from: '㊻', to: '㊻', mapping: Mapped("46") }, - Range { from: '㊼', to: '㊼', mapping: Mapped("47") }, - Range { from: '㊽', to: '㊽', mapping: Mapped("48") }, - Range { from: '㊾', to: '㊾', mapping: Mapped("49") }, - Range { from: '㊿', to: '㊿', mapping: Mapped("50") }, - Range { from: '㋀', to: '㋀', mapping: Mapped("1月") }, - Range { from: '㋁', to: '㋁', mapping: Mapped("2月") }, - Range { from: '㋂', to: '㋂', mapping: Mapped("3月") }, - Range { from: '㋃', to: '㋃', mapping: Mapped("4月") }, - Range { from: '㋄', to: '㋄', mapping: Mapped("5月") }, - Range { from: '㋅', to: '㋅', mapping: Mapped("6月") }, - Range { from: '㋆', to: '㋆', mapping: Mapped("7月") }, - Range { from: '㋇', to: '㋇', mapping: Mapped("8月") }, - Range { from: '㋈', to: '㋈', mapping: Mapped("9月") }, - Range { from: '㋉', to: '㋉', mapping: Mapped("10月") }, - Range { from: '㋊', to: '㋊', mapping: Mapped("11月") }, - Range { from: '㋋', to: '㋋', mapping: Mapped("12月") }, - Range { from: '㋌', to: '㋌', mapping: Mapped("hg") }, - Range { from: '㋍', to: '㋍', mapping: Mapped("erg") }, - Range { from: '㋎', to: '㋎', mapping: Mapped("ev") }, - Range { from: '㋏', to: '㋏', mapping: Mapped("ltd") }, - Range { from: '㋐', to: '㋐', mapping: Mapped("ア") }, - Range { from: '㋑', to: '㋑', mapping: Mapped("イ") }, - Range { from: '㋒', to: '㋒', mapping: Mapped("ウ") }, - Range { from: '㋓', to: '㋓', mapping: Mapped("エ") }, - Range { from: '㋔', to: '㋔', mapping: Mapped("オ") }, - Range { from: '㋕', to: '㋕', mapping: Mapped("カ") }, - Range { from: '㋖', to: '㋖', mapping: Mapped("キ") }, - Range { from: '㋗', to: '㋗', mapping: Mapped("ク") }, - Range { from: '㋘', to: '㋘', mapping: Mapped("ケ") }, - Range { from: '㋙', to: '㋙', mapping: Mapped("コ") }, - Range { from: '㋚', to: '㋚', mapping: Mapped("サ") }, - Range { from: '㋛', to: '㋛', mapping: Mapped("シ") }, - Range { from: '㋜', to: '㋜', mapping: Mapped("ス") }, - Range { from: '㋝', to: '㋝', mapping: Mapped("セ") }, - Range { from: '㋞', to: '㋞', mapping: Mapped("ソ") }, - Range { from: '㋟', to: '㋟', mapping: Mapped("タ") }, - Range { from: '㋠', to: '㋠', mapping: Mapped("チ") }, - Range { from: '㋡', to: '㋡', mapping: Mapped("ツ") }, - Range { from: '㋢', to: '㋢', mapping: Mapped("テ") }, - Range { from: '㋣', to: '㋣', mapping: Mapped("ト") }, - Range { from: '㋤', to: '㋤', mapping: Mapped("ナ") }, - Range { from: '㋥', to: '㋥', mapping: Mapped("ニ") }, - Range { from: '㋦', to: '㋦', mapping: Mapped("ヌ") }, - Range { from: '㋧', to: '㋧', mapping: Mapped("ネ") }, - Range { from: '㋨', to: '㋨', mapping: Mapped("ノ") }, - Range { from: '㋩', to: '㋩', mapping: Mapped("ハ") }, - Range { from: '㋪', to: '㋪', mapping: Mapped("ヒ") }, - Range { from: '㋫', to: '㋫', mapping: Mapped("フ") }, - Range { from: '㋬', to: '㋬', mapping: Mapped("ヘ") }, - Range { from: '㋭', to: '㋭', mapping: Mapped("ホ") }, - Range { from: '㋮', to: '㋮', mapping: Mapped("マ") }, - Range { from: '㋯', to: '㋯', mapping: Mapped("ミ") }, - Range { from: '㋰', to: '㋰', mapping: Mapped("ム") }, - Range { from: '㋱', to: '㋱', mapping: Mapped("メ") }, - Range { from: '㋲', to: '㋲', mapping: Mapped("モ") }, - Range { from: '㋳', to: '㋳', mapping: Mapped("ヤ") }, - Range { from: '㋴', to: '㋴', mapping: Mapped("ユ") }, - Range { from: '㋵', to: '㋵', mapping: Mapped("ヨ") }, - Range { from: '㋶', to: '㋶', mapping: Mapped("ラ") }, - Range { from: '㋷', to: '㋷', mapping: Mapped("リ") }, - Range { from: '㋸', to: '㋸', mapping: Mapped("ル") }, - Range { from: '㋹', to: '㋹', mapping: Mapped("レ") }, - Range { from: '㋺', to: '㋺', mapping: Mapped("ロ") }, - Range { from: '㋻', to: '㋻', mapping: Mapped("ワ") }, - Range { from: '㋼', to: '㋼', mapping: Mapped("ヰ") }, - Range { from: '㋽', to: '㋽', mapping: Mapped("ヱ") }, - Range { from: '㋾', to: '㋾', mapping: Mapped("ヲ") }, - Range { from: '㋿', to: '㋿', mapping: Disallowed }, - Range { from: '㌀', to: '㌀', mapping: Mapped("アパート") }, - Range { from: '㌁', to: '㌁', mapping: Mapped("アルファ") }, - Range { from: '㌂', to: '㌂', mapping: Mapped("アンペア") }, - Range { from: '㌃', to: '㌃', mapping: Mapped("アール") }, - Range { from: '㌄', to: '㌄', mapping: Mapped("イニング") }, - Range { from: '㌅', to: '㌅', mapping: Mapped("インチ") }, - Range { from: '㌆', to: '㌆', mapping: Mapped("ウォン") }, - Range { from: '㌇', to: '㌇', mapping: Mapped("エスクード") }, - Range { from: '㌈', to: '㌈', mapping: Mapped("エーカー") }, - Range { from: '㌉', to: '㌉', mapping: Mapped("オンス") }, - Range { from: '㌊', to: '㌊', mapping: Mapped("オーム") }, - Range { from: '㌋', to: '㌋', mapping: Mapped("カイリ") }, - Range { from: '㌌', to: '㌌', mapping: Mapped("カラット") }, - Range { from: '㌍', to: '㌍', mapping: Mapped("カロリー") }, - Range { from: '㌎', to: '㌎', mapping: Mapped("ガロン") }, - Range { from: '㌏', to: '㌏', mapping: Mapped("ガンマ") }, - Range { from: '㌐', to: '㌐', mapping: Mapped("ギガ") }, - Range { from: '㌑', to: '㌑', mapping: Mapped("ギニー") }, - Range { from: '㌒', to: '㌒', mapping: Mapped("キュリー") }, - Range { from: '㌓', to: '㌓', mapping: Mapped("ギルダー") }, - Range { from: '㌔', to: '㌔', mapping: Mapped("キロ") }, - Range { from: '㌕', to: '㌕', mapping: Mapped("キログラム") }, - Range { from: '㌖', to: '㌖', mapping: Mapped("キロメートル") }, - Range { from: '㌗', to: '㌗', mapping: Mapped("キロワット") }, - Range { from: '㌘', to: '㌘', mapping: Mapped("グラム") }, - Range { from: '㌙', to: '㌙', mapping: Mapped("グラムトン") }, - Range { from: '㌚', to: '㌚', mapping: Mapped("クルゼイロ") }, - Range { from: '㌛', to: '㌛', mapping: Mapped("クローネ") }, - Range { from: '㌜', to: '㌜', mapping: Mapped("ケース") }, - Range { from: '㌝', to: '㌝', mapping: Mapped("コルナ") }, - Range { from: '㌞', to: '㌞', mapping: Mapped("コーポ") }, - Range { from: '㌟', to: '㌟', mapping: Mapped("サイクル") }, - Range { from: '㌠', to: '㌠', mapping: Mapped("サンチーム") }, - Range { from: '㌡', to: '㌡', mapping: Mapped("シリング") }, - Range { from: '㌢', to: '㌢', mapping: Mapped("センチ") }, - Range { from: '㌣', to: '㌣', mapping: Mapped("セント") }, - Range { from: '㌤', to: '㌤', mapping: Mapped("ダース") }, - Range { from: '㌥', to: '㌥', mapping: Mapped("デシ") }, - Range { from: '㌦', to: '㌦', mapping: Mapped("ドル") }, - Range { from: '㌧', to: '㌧', mapping: Mapped("トン") }, - Range { from: '㌨', to: '㌨', mapping: Mapped("ナノ") }, - Range { from: '㌩', to: '㌩', mapping: Mapped("ノット") }, - Range { from: '㌪', to: '㌪', mapping: Mapped("ハイツ") }, - Range { from: '㌫', to: '㌫', mapping: Mapped("パーセント") }, - Range { from: '㌬', to: '㌬', mapping: Mapped("パーツ") }, - Range { from: '㌭', to: '㌭', mapping: Mapped("バーレル") }, - Range { from: '㌮', to: '㌮', mapping: Mapped("ピアストル") }, - Range { from: '㌯', to: '㌯', mapping: Mapped("ピクル") }, - Range { from: '㌰', to: '㌰', mapping: Mapped("ピコ") }, - Range { from: '㌱', to: '㌱', mapping: Mapped("ビル") }, - Range { from: '㌲', to: '㌲', mapping: Mapped("ファラッド") }, - Range { from: '㌳', to: '㌳', mapping: Mapped("フィート") }, - Range { from: '㌴', to: '㌴', mapping: Mapped("ブッシェル") }, - Range { from: '㌵', to: '㌵', mapping: Mapped("フラン") }, - Range { from: '㌶', to: '㌶', mapping: Mapped("ヘクタール") }, - Range { from: '㌷', to: '㌷', mapping: Mapped("ペソ") }, - Range { from: '㌸', to: '㌸', mapping: Mapped("ペニヒ") }, - Range { from: '㌹', to: '㌹', mapping: Mapped("ヘルツ") }, - Range { from: '㌺', to: '㌺', mapping: Mapped("ペンス") }, - Range { from: '㌻', to: '㌻', mapping: Mapped("ページ") }, - Range { from: '㌼', to: '㌼', mapping: Mapped("ベータ") }, - Range { from: '㌽', to: '㌽', mapping: Mapped("ポイント") }, - Range { from: '㌾', to: '㌾', mapping: Mapped("ボルト") }, - Range { from: '㌿', to: '㌿', mapping: Mapped("ホン") }, - Range { from: '㍀', to: '㍀', mapping: Mapped("ポンド") }, - Range { from: '㍁', to: '㍁', mapping: Mapped("ホール") }, - Range { from: '㍂', to: '㍂', mapping: Mapped("ホーン") }, - Range { from: '㍃', to: '㍃', mapping: Mapped("マイクロ") }, - Range { from: '㍄', to: '㍄', mapping: Mapped("マイル") }, - Range { from: '㍅', to: '㍅', mapping: Mapped("マッハ") }, - Range { from: '㍆', to: '㍆', mapping: Mapped("マルク") }, - Range { from: '㍇', to: '㍇', mapping: Mapped("マンション") }, - Range { from: '㍈', to: '㍈', mapping: Mapped("ミクロン") }, - Range { from: '㍉', to: '㍉', mapping: Mapped("ミリ") }, - Range { from: '㍊', to: '㍊', mapping: Mapped("ミリバール") }, - Range { from: '㍋', to: '㍋', mapping: Mapped("メガ") }, - Range { from: '㍌', to: '㍌', mapping: Mapped("メガトン") }, - Range { from: '㍍', to: '㍍', mapping: Mapped("メートル") }, - Range { from: '㍎', to: '㍎', mapping: Mapped("ヤード") }, - Range { from: '㍏', to: '㍏', mapping: Mapped("ヤール") }, - Range { from: '㍐', to: '㍐', mapping: Mapped("ユアン") }, - Range { from: '㍑', to: '㍑', mapping: Mapped("リットル") }, - Range { from: '㍒', to: '㍒', mapping: Mapped("リラ") }, - Range { from: '㍓', to: '㍓', mapping: Mapped("ルピー") }, - Range { from: '㍔', to: '㍔', mapping: Mapped("ルーブル") }, - Range { from: '㍕', to: '㍕', mapping: Mapped("レム") }, - Range { from: '㍖', to: '㍖', mapping: Mapped("レントゲン") }, - Range { from: '㍗', to: '㍗', mapping: Mapped("ワット") }, - Range { from: '㍘', to: '㍘', mapping: Mapped("0点") }, - Range { from: '㍙', to: '㍙', mapping: Mapped("1点") }, - Range { from: '㍚', to: '㍚', mapping: Mapped("2点") }, - Range { from: '㍛', to: '㍛', mapping: Mapped("3点") }, - Range { from: '㍜', to: '㍜', mapping: Mapped("4点") }, - Range { from: '㍝', to: '㍝', mapping: Mapped("5点") }, - Range { from: '㍞', to: '㍞', mapping: Mapped("6点") }, - Range { from: '㍟', to: '㍟', mapping: Mapped("7点") }, - Range { from: '㍠', to: '㍠', mapping: Mapped("8点") }, - Range { from: '㍡', to: '㍡', mapping: Mapped("9点") }, - Range { from: '㍢', to: '㍢', mapping: Mapped("10点") }, - Range { from: '㍣', to: '㍣', mapping: Mapped("11点") }, - Range { from: '㍤', to: '㍤', mapping: Mapped("12点") }, - Range { from: '㍥', to: '㍥', mapping: Mapped("13点") }, - Range { from: '㍦', to: '㍦', mapping: Mapped("14点") }, - Range { from: '㍧', to: '㍧', mapping: Mapped("15点") }, - Range { from: '㍨', to: '㍨', mapping: Mapped("16点") }, - Range { from: '㍩', to: '㍩', mapping: Mapped("17点") }, - Range { from: '㍪', to: '㍪', mapping: Mapped("18点") }, - Range { from: '㍫', to: '㍫', mapping: Mapped("19点") }, - Range { from: '㍬', to: '㍬', mapping: Mapped("20点") }, - Range { from: '㍭', to: '㍭', mapping: Mapped("21点") }, - Range { from: '㍮', to: '㍮', mapping: Mapped("22点") }, - Range { from: '㍯', to: '㍯', mapping: Mapped("23点") }, - Range { from: '㍰', to: '㍰', mapping: Mapped("24点") }, - Range { from: '㍱', to: '㍱', mapping: Mapped("hpa") }, - Range { from: '㍲', to: '㍲', mapping: Mapped("da") }, - Range { from: '㍳', to: '㍳', mapping: Mapped("au") }, - Range { from: '㍴', to: '㍴', mapping: Mapped("bar") }, - Range { from: '㍵', to: '㍵', mapping: Mapped("ov") }, - Range { from: '㍶', to: '㍶', mapping: Mapped("pc") }, - Range { from: '㍷', to: '㍷', mapping: Mapped("dm") }, - Range { from: '㍸', to: '㍸', mapping: Mapped("dm2") }, - Range { from: '㍹', to: '㍹', mapping: Mapped("dm3") }, - Range { from: '㍺', to: '㍺', mapping: Mapped("iu") }, - Range { from: '㍻', to: '㍻', mapping: Mapped("平成") }, - Range { from: '㍼', to: '㍼', mapping: Mapped("昭和") }, - Range { from: '㍽', to: '㍽', mapping: Mapped("大正") }, - Range { from: '㍾', to: '㍾', mapping: Mapped("明治") }, - Range { from: '㍿', to: '㍿', mapping: Mapped("株式会社") }, - Range { from: '㎀', to: '㎀', mapping: Mapped("pa") }, - Range { from: '㎁', to: '㎁', mapping: Mapped("na") }, - Range { from: '㎂', to: '㎂', mapping: Mapped("μa") }, - Range { from: '㎃', to: '㎃', mapping: Mapped("ma") }, - Range { from: '㎄', to: '㎄', mapping: Mapped("ka") }, - Range { from: '㎅', to: '㎅', mapping: Mapped("kb") }, - Range { from: '㎆', to: '㎆', mapping: Mapped("mb") }, - Range { from: '㎇', to: '㎇', mapping: Mapped("gb") }, - Range { from: '㎈', to: '㎈', mapping: Mapped("cal") }, - Range { from: '㎉', to: '㎉', mapping: Mapped("kcal") }, - Range { from: '㎊', to: '㎊', mapping: Mapped("pf") }, - Range { from: '㎋', to: '㎋', mapping: Mapped("nf") }, - Range { from: '㎌', to: '㎌', mapping: Mapped("μf") }, - Range { from: '㎍', to: '㎍', mapping: Mapped("μg") }, - Range { from: '㎎', to: '㎎', mapping: Mapped("mg") }, - Range { from: '㎏', to: '㎏', mapping: Mapped("kg") }, - Range { from: '㎐', to: '㎐', mapping: Mapped("hz") }, - Range { from: '㎑', to: '㎑', mapping: Mapped("khz") }, - Range { from: '㎒', to: '㎒', mapping: Mapped("mhz") }, - Range { from: '㎓', to: '㎓', mapping: Mapped("ghz") }, - Range { from: '㎔', to: '㎔', mapping: Mapped("thz") }, - Range { from: '㎕', to: '㎕', mapping: Mapped("μl") }, - Range { from: '㎖', to: '㎖', mapping: Mapped("ml") }, - Range { from: '㎗', to: '㎗', mapping: Mapped("dl") }, - Range { from: '㎘', to: '㎘', mapping: Mapped("kl") }, - Range { from: '㎙', to: '㎙', mapping: Mapped("fm") }, - Range { from: '㎚', to: '㎚', mapping: Mapped("nm") }, - Range { from: '㎛', to: '㎛', mapping: Mapped("μm") }, - Range { from: '㎜', to: '㎜', mapping: Mapped("mm") }, - Range { from: '㎝', to: '㎝', mapping: Mapped("cm") }, - Range { from: '㎞', to: '㎞', mapping: Mapped("km") }, - Range { from: '㎟', to: '㎟', mapping: Mapped("mm2") }, - Range { from: '㎠', to: '㎠', mapping: Mapped("cm2") }, - Range { from: '㎡', to: '㎡', mapping: Mapped("m2") }, - Range { from: '㎢', to: '㎢', mapping: Mapped("km2") }, - Range { from: '㎣', to: '㎣', mapping: Mapped("mm3") }, - Range { from: '㎤', to: '㎤', mapping: Mapped("cm3") }, - Range { from: '㎥', to: '㎥', mapping: Mapped("m3") }, - Range { from: '㎦', to: '㎦', mapping: Mapped("km3") }, - Range { from: '㎧', to: '㎧', mapping: Mapped("m∕s") }, - Range { from: '㎨', to: '㎨', mapping: Mapped("m∕s2") }, - Range { from: '㎩', to: '㎩', mapping: Mapped("pa") }, - Range { from: '㎪', to: '㎪', mapping: Mapped("kpa") }, - Range { from: '㎫', to: '㎫', mapping: Mapped("mpa") }, - Range { from: '㎬', to: '㎬', mapping: Mapped("gpa") }, - Range { from: '㎭', to: '㎭', mapping: Mapped("rad") }, - Range { from: '㎮', to: '㎮', mapping: Mapped("rad∕s") }, - Range { from: '㎯', to: '㎯', mapping: Mapped("rad∕s2") }, - Range { from: '㎰', to: '㎰', mapping: Mapped("ps") }, - Range { from: '㎱', to: '㎱', mapping: Mapped("ns") }, - Range { from: '㎲', to: '㎲', mapping: Mapped("μs") }, - Range { from: '㎳', to: '㎳', mapping: Mapped("ms") }, - Range { from: '㎴', to: '㎴', mapping: Mapped("pv") }, - Range { from: '㎵', to: '㎵', mapping: Mapped("nv") }, - Range { from: '㎶', to: '㎶', mapping: Mapped("μv") }, - Range { from: '㎷', to: '㎷', mapping: Mapped("mv") }, - Range { from: '㎸', to: '㎸', mapping: Mapped("kv") }, - Range { from: '㎹', to: '㎹', mapping: Mapped("mv") }, - Range { from: '㎺', to: '㎺', mapping: Mapped("pw") }, - Range { from: '㎻', to: '㎻', mapping: Mapped("nw") }, - Range { from: '㎼', to: '㎼', mapping: Mapped("μw") }, - Range { from: '㎽', to: '㎽', mapping: Mapped("mw") }, - Range { from: '㎾', to: '㎾', mapping: Mapped("kw") }, - Range { from: '㎿', to: '㎿', mapping: Mapped("mw") }, - Range { from: '㏀', to: '㏀', mapping: Mapped("kω") }, - Range { from: '㏁', to: '㏁', mapping: Mapped("mω") }, - Range { from: '㏂', to: '㏂', mapping: Disallowed }, - Range { from: '㏃', to: '㏃', mapping: Mapped("bq") }, - Range { from: '㏄', to: '㏄', mapping: Mapped("cc") }, - Range { from: '㏅', to: '㏅', mapping: Mapped("cd") }, - Range { from: '㏆', to: '㏆', mapping: Mapped("c∕kg") }, - Range { from: '㏇', to: '㏇', mapping: Disallowed }, - Range { from: '㏈', to: '㏈', mapping: Mapped("db") }, - Range { from: '㏉', to: '㏉', mapping: Mapped("gy") }, - Range { from: '㏊', to: '㏊', mapping: Mapped("ha") }, - Range { from: '㏋', to: '㏋', mapping: Mapped("hp") }, - Range { from: '㏌', to: '㏌', mapping: Mapped("in") }, - Range { from: '㏍', to: '㏍', mapping: Mapped("kk") }, - Range { from: '㏎', to: '㏎', mapping: Mapped("km") }, - Range { from: '㏏', to: '㏏', mapping: Mapped("kt") }, - Range { from: '㏐', to: '㏐', mapping: Mapped("lm") }, - Range { from: '㏑', to: '㏑', mapping: Mapped("ln") }, - Range { from: '㏒', to: '㏒', mapping: Mapped("log") }, - Range { from: '㏓', to: '㏓', mapping: Mapped("lx") }, - Range { from: '㏔', to: '㏔', mapping: Mapped("mb") }, - Range { from: '㏕', to: '㏕', mapping: Mapped("mil") }, - Range { from: '㏖', to: '㏖', mapping: Mapped("mol") }, - Range { from: '㏗', to: '㏗', mapping: Mapped("ph") }, - Range { from: '㏘', to: '㏘', mapping: Disallowed }, - Range { from: '㏙', to: '㏙', mapping: Mapped("ppm") }, - Range { from: '㏚', to: '㏚', mapping: Mapped("pr") }, - Range { from: '㏛', to: '㏛', mapping: Mapped("sr") }, - Range { from: '㏜', to: '㏜', mapping: Mapped("sv") }, - Range { from: '㏝', to: '㏝', mapping: Mapped("wb") }, - Range { from: '㏞', to: '㏞', mapping: Mapped("v∕m") }, - Range { from: '㏟', to: '㏟', mapping: Mapped("a∕m") }, - Range { from: '㏠', to: '㏠', mapping: Mapped("1日") }, - Range { from: '㏡', to: '㏡', mapping: Mapped("2日") }, - Range { from: '㏢', to: '㏢', mapping: Mapped("3日") }, - Range { from: '㏣', to: '㏣', mapping: Mapped("4日") }, - Range { from: '㏤', to: '㏤', mapping: Mapped("5日") }, - Range { from: '㏥', to: '㏥', mapping: Mapped("6日") }, - Range { from: '㏦', to: '㏦', mapping: Mapped("7日") }, - Range { from: '㏧', to: '㏧', mapping: Mapped("8日") }, - Range { from: '㏨', to: '㏨', mapping: Mapped("9日") }, - Range { from: '㏩', to: '㏩', mapping: Mapped("10日") }, - Range { from: '㏪', to: '㏪', mapping: Mapped("11日") }, - Range { from: '㏫', to: '㏫', mapping: Mapped("12日") }, - Range { from: '㏬', to: '㏬', mapping: Mapped("13日") }, - Range { from: '㏭', to: '㏭', mapping: Mapped("14日") }, - Range { from: '㏮', to: '㏮', mapping: Mapped("15日") }, - Range { from: '㏯', to: '㏯', mapping: Mapped("16日") }, - Range { from: '㏰', to: '㏰', mapping: Mapped("17日") }, - Range { from: '㏱', to: '㏱', mapping: Mapped("18日") }, - Range { from: '㏲', to: '㏲', mapping: Mapped("19日") }, - Range { from: '㏳', to: '㏳', mapping: Mapped("20日") }, - Range { from: '㏴', to: '㏴', mapping: Mapped("21日") }, - Range { from: '㏵', to: '㏵', mapping: Mapped("22日") }, - Range { from: '㏶', to: '㏶', mapping: Mapped("23日") }, - Range { from: '㏷', to: '㏷', mapping: Mapped("24日") }, - Range { from: '㏸', to: '㏸', mapping: Mapped("25日") }, - Range { from: '㏹', to: '㏹', mapping: Mapped("26日") }, - Range { from: '㏺', to: '㏺', mapping: Mapped("27日") }, - Range { from: '㏻', to: '㏻', mapping: Mapped("28日") }, - Range { from: '㏼', to: '㏼', mapping: Mapped("29日") }, - Range { from: '㏽', to: '㏽', mapping: Mapped("30日") }, - Range { from: '㏾', to: '㏾', mapping: Mapped("31日") }, - Range { from: '㏿', to: '㏿', mapping: Mapped("gal") }, - Range { from: '㐀', to: '䶵', mapping: Valid }, - Range { from: '䶶', to: '䶿', mapping: Disallowed }, - Range { from: '䷀', to: '䷿', mapping: Valid }, - Range { from: '一', to: '龥', mapping: Valid }, - Range { from: '龦', to: '龻', mapping: Valid }, - Range { from: '龼', to: '鿃', mapping: Valid }, - Range { from: '鿄', to: '鿋', mapping: Valid }, - Range { from: '鿌', to: '鿌', mapping: Valid }, - Range { from: '鿍', to: '鿕', mapping: Valid }, - Range { from: '鿖', to: '鿿', mapping: Disallowed }, - Range { from: 'ꀀ', to: 'ꒌ', mapping: Valid }, - Range { from: '꒍', to: '꒏', mapping: Disallowed }, - Range { from: '꒐', to: '꒡', mapping: Valid }, - Range { from: '꒢', to: '꒣', mapping: Valid }, - Range { from: '꒤', to: '꒳', mapping: Valid }, - Range { from: '꒴', to: '꒴', mapping: Valid }, - Range { from: '꒵', to: '꓀', mapping: Valid }, - Range { from: '꓁', to: '꓁', mapping: Valid }, - Range { from: '꓂', to: '꓄', mapping: Valid }, - Range { from: '꓅', to: '꓅', mapping: Valid }, - Range { from: '꓆', to: '꓆', mapping: Valid }, - Range { from: '꓇', to: '꓏', mapping: Disallowed }, - Range { from: 'ꓐ', to: 'ꓽ', mapping: Valid }, - Range { from: '꓾', to: '꓿', mapping: Valid }, - Range { from: 'ꔀ', to: 'ꘌ', mapping: Valid }, - Range { from: '꘍', to: '꘏', mapping: Valid }, - Range { from: 'ꘐ', to: 'ꘫ', mapping: Valid }, - Range { from: '꘬', to: '꘿', mapping: Disallowed }, - Range { from: 'Ꙁ', to: 'Ꙁ', mapping: Mapped("ꙁ") }, - Range { from: 'ꙁ', to: 'ꙁ', mapping: Valid }, - Range { from: 'Ꙃ', to: 'Ꙃ', mapping: Mapped("ꙃ") }, - Range { from: 'ꙃ', to: 'ꙃ', mapping: Valid }, - Range { from: 'Ꙅ', to: 'Ꙅ', mapping: Mapped("ꙅ") }, - Range { from: 'ꙅ', to: 'ꙅ', mapping: Valid }, - Range { from: 'Ꙇ', to: 'Ꙇ', mapping: Mapped("ꙇ") }, - Range { from: 'ꙇ', to: 'ꙇ', mapping: Valid }, - Range { from: 'Ꙉ', to: 'Ꙉ', mapping: Mapped("ꙉ") }, - Range { from: 'ꙉ', to: 'ꙉ', mapping: Valid }, - Range { from: 'Ꙋ', to: 'Ꙋ', mapping: Mapped("ꙋ") }, - Range { from: 'ꙋ', to: 'ꙋ', mapping: Valid }, - Range { from: 'Ꙍ', to: 'Ꙍ', mapping: Mapped("ꙍ") }, - Range { from: 'ꙍ', to: 'ꙍ', mapping: Valid }, - Range { from: 'Ꙏ', to: 'Ꙏ', mapping: Mapped("ꙏ") }, - Range { from: 'ꙏ', to: 'ꙏ', mapping: Valid }, - Range { from: 'Ꙑ', to: 'Ꙑ', mapping: Mapped("ꙑ") }, - Range { from: 'ꙑ', to: 'ꙑ', mapping: Valid }, - Range { from: 'Ꙓ', to: 'Ꙓ', mapping: Mapped("ꙓ") }, - Range { from: 'ꙓ', to: 'ꙓ', mapping: Valid }, - Range { from: 'Ꙕ', to: 'Ꙕ', mapping: Mapped("ꙕ") }, - Range { from: 'ꙕ', to: 'ꙕ', mapping: Valid }, - Range { from: 'Ꙗ', to: 'Ꙗ', mapping: Mapped("ꙗ") }, - Range { from: 'ꙗ', to: 'ꙗ', mapping: Valid }, - Range { from: 'Ꙙ', to: 'Ꙙ', mapping: Mapped("ꙙ") }, - Range { from: 'ꙙ', to: 'ꙙ', mapping: Valid }, - Range { from: 'Ꙛ', to: 'Ꙛ', mapping: Mapped("ꙛ") }, - Range { from: 'ꙛ', to: 'ꙛ', mapping: Valid }, - Range { from: 'Ꙝ', to: 'Ꙝ', mapping: Mapped("ꙝ") }, - Range { from: 'ꙝ', to: 'ꙝ', mapping: Valid }, - Range { from: 'Ꙟ', to: 'Ꙟ', mapping: Mapped("ꙟ") }, - Range { from: 'ꙟ', to: 'ꙟ', mapping: Valid }, - Range { from: 'Ꙡ', to: 'Ꙡ', mapping: Mapped("ꙡ") }, - Range { from: 'ꙡ', to: 'ꙡ', mapping: Valid }, - Range { from: 'Ꙣ', to: 'Ꙣ', mapping: Mapped("ꙣ") }, - Range { from: 'ꙣ', to: 'ꙣ', mapping: Valid }, - Range { from: 'Ꙥ', to: 'Ꙥ', mapping: Mapped("ꙥ") }, - Range { from: 'ꙥ', to: 'ꙥ', mapping: Valid }, - Range { from: 'Ꙧ', to: 'Ꙧ', mapping: Mapped("ꙧ") }, - Range { from: 'ꙧ', to: 'ꙧ', mapping: Valid }, - Range { from: 'Ꙩ', to: 'Ꙩ', mapping: Mapped("ꙩ") }, - Range { from: 'ꙩ', to: 'ꙩ', mapping: Valid }, - Range { from: 'Ꙫ', to: 'Ꙫ', mapping: Mapped("ꙫ") }, - Range { from: 'ꙫ', to: 'ꙫ', mapping: Valid }, - Range { from: 'Ꙭ', to: 'Ꙭ', mapping: Mapped("ꙭ") }, - Range { from: 'ꙭ', to: '꙯', mapping: Valid }, - Range { from: '꙰', to: '꙳', mapping: Valid }, - Range { from: 'ꙴ', to: 'ꙻ', mapping: Valid }, - Range { from: '꙼', to: '꙽', mapping: Valid }, - Range { from: '꙾', to: '꙾', mapping: Valid }, - Range { from: 'ꙿ', to: 'ꙿ', mapping: Valid }, - Range { from: 'Ꚁ', to: 'Ꚁ', mapping: Mapped("ꚁ") }, - Range { from: 'ꚁ', to: 'ꚁ', mapping: Valid }, - Range { from: 'Ꚃ', to: 'Ꚃ', mapping: Mapped("ꚃ") }, - Range { from: 'ꚃ', to: 'ꚃ', mapping: Valid }, - Range { from: 'Ꚅ', to: 'Ꚅ', mapping: Mapped("ꚅ") }, - Range { from: 'ꚅ', to: 'ꚅ', mapping: Valid }, - Range { from: 'Ꚇ', to: 'Ꚇ', mapping: Mapped("ꚇ") }, - Range { from: 'ꚇ', to: 'ꚇ', mapping: Valid }, - Range { from: 'Ꚉ', to: 'Ꚉ', mapping: Mapped("ꚉ") }, - Range { from: 'ꚉ', to: 'ꚉ', mapping: Valid }, - Range { from: 'Ꚋ', to: 'Ꚋ', mapping: Mapped("ꚋ") }, - Range { from: 'ꚋ', to: 'ꚋ', mapping: Valid }, - Range { from: 'Ꚍ', to: 'Ꚍ', mapping: Mapped("ꚍ") }, - Range { from: 'ꚍ', to: 'ꚍ', mapping: Valid }, - Range { from: 'Ꚏ', to: 'Ꚏ', mapping: Mapped("ꚏ") }, - Range { from: 'ꚏ', to: 'ꚏ', mapping: Valid }, - Range { from: 'Ꚑ', to: 'Ꚑ', mapping: Mapped("ꚑ") }, - Range { from: 'ꚑ', to: 'ꚑ', mapping: Valid }, - Range { from: 'Ꚓ', to: 'Ꚓ', mapping: Mapped("ꚓ") }, - Range { from: 'ꚓ', to: 'ꚓ', mapping: Valid }, - Range { from: 'Ꚕ', to: 'Ꚕ', mapping: Mapped("ꚕ") }, - Range { from: 'ꚕ', to: 'ꚕ', mapping: Valid }, - Range { from: 'Ꚗ', to: 'Ꚗ', mapping: Mapped("ꚗ") }, - Range { from: 'ꚗ', to: 'ꚗ', mapping: Valid }, - Range { from: 'Ꚙ', to: 'Ꚙ', mapping: Mapped("ꚙ") }, - Range { from: 'ꚙ', to: 'ꚙ', mapping: Valid }, - Range { from: 'Ꚛ', to: 'Ꚛ', mapping: Mapped("ꚛ") }, - Range { from: 'ꚛ', to: 'ꚛ', mapping: Valid }, - Range { from: 'ꚜ', to: 'ꚜ', mapping: Mapped("ъ") }, - Range { from: 'ꚝ', to: 'ꚝ', mapping: Mapped("ь") }, - Range { from: 'ꚞ', to: 'ꚞ', mapping: Valid }, - Range { from: 'ꚟ', to: 'ꚟ', mapping: Valid }, - Range { from: 'ꚠ', to: 'ꛥ', mapping: Valid }, - Range { from: 'ꛦ', to: 'ꛯ', mapping: Valid }, - Range { from: '꛰', to: '꛱', mapping: Valid }, - Range { from: '꛲', to: '꛷', mapping: Valid }, - Range { from: '꛸', to: '꛿', mapping: Disallowed }, - Range { from: '꜀', to: '꜖', mapping: Valid }, - Range { from: 'ꜗ', to: 'ꜚ', mapping: Valid }, - Range { from: 'ꜛ', to: 'ꜟ', mapping: Valid }, - Range { from: '꜠', to: '꜡', mapping: Valid }, - Range { from: 'Ꜣ', to: 'Ꜣ', mapping: Mapped("ꜣ") }, - Range { from: 'ꜣ', to: 'ꜣ', mapping: Valid }, - Range { from: 'Ꜥ', to: 'Ꜥ', mapping: Mapped("ꜥ") }, - Range { from: 'ꜥ', to: 'ꜥ', mapping: Valid }, - Range { from: 'Ꜧ', to: 'Ꜧ', mapping: Mapped("ꜧ") }, - Range { from: 'ꜧ', to: 'ꜧ', mapping: Valid }, - Range { from: 'Ꜩ', to: 'Ꜩ', mapping: Mapped("ꜩ") }, - Range { from: 'ꜩ', to: 'ꜩ', mapping: Valid }, - Range { from: 'Ꜫ', to: 'Ꜫ', mapping: Mapped("ꜫ") }, - Range { from: 'ꜫ', to: 'ꜫ', mapping: Valid }, - Range { from: 'Ꜭ', to: 'Ꜭ', mapping: Mapped("ꜭ") }, - Range { from: 'ꜭ', to: 'ꜭ', mapping: Valid }, - Range { from: 'Ꜯ', to: 'Ꜯ', mapping: Mapped("ꜯ") }, - Range { from: 'ꜯ', to: 'ꜱ', mapping: Valid }, - Range { from: 'Ꜳ', to: 'Ꜳ', mapping: Mapped("ꜳ") }, - Range { from: 'ꜳ', to: 'ꜳ', mapping: Valid }, - Range { from: 'Ꜵ', to: 'Ꜵ', mapping: Mapped("ꜵ") }, - Range { from: 'ꜵ', to: 'ꜵ', mapping: Valid }, - Range { from: 'Ꜷ', to: 'Ꜷ', mapping: Mapped("ꜷ") }, - Range { from: 'ꜷ', to: 'ꜷ', mapping: Valid }, - Range { from: 'Ꜹ', to: 'Ꜹ', mapping: Mapped("ꜹ") }, - Range { from: 'ꜹ', to: 'ꜹ', mapping: Valid }, - Range { from: 'Ꜻ', to: 'Ꜻ', mapping: Mapped("ꜻ") }, - Range { from: 'ꜻ', to: 'ꜻ', mapping: Valid }, - Range { from: 'Ꜽ', to: 'Ꜽ', mapping: Mapped("ꜽ") }, - Range { from: 'ꜽ', to: 'ꜽ', mapping: Valid }, - Range { from: 'Ꜿ', to: 'Ꜿ', mapping: Mapped("ꜿ") }, - Range { from: 'ꜿ', to: 'ꜿ', mapping: Valid }, - Range { from: 'Ꝁ', to: 'Ꝁ', mapping: Mapped("ꝁ") }, - Range { from: 'ꝁ', to: 'ꝁ', mapping: Valid }, - Range { from: 'Ꝃ', to: 'Ꝃ', mapping: Mapped("ꝃ") }, - Range { from: 'ꝃ', to: 'ꝃ', mapping: Valid }, - Range { from: 'Ꝅ', to: 'Ꝅ', mapping: Mapped("ꝅ") }, - Range { from: 'ꝅ', to: 'ꝅ', mapping: Valid }, - Range { from: 'Ꝇ', to: 'Ꝇ', mapping: Mapped("ꝇ") }, - Range { from: 'ꝇ', to: 'ꝇ', mapping: Valid }, - Range { from: 'Ꝉ', to: 'Ꝉ', mapping: Mapped("ꝉ") }, - Range { from: 'ꝉ', to: 'ꝉ', mapping: Valid }, - Range { from: 'Ꝋ', to: 'Ꝋ', mapping: Mapped("ꝋ") }, - Range { from: 'ꝋ', to: 'ꝋ', mapping: Valid }, - Range { from: 'Ꝍ', to: 'Ꝍ', mapping: Mapped("ꝍ") }, - Range { from: 'ꝍ', to: 'ꝍ', mapping: Valid }, - Range { from: 'Ꝏ', to: 'Ꝏ', mapping: Mapped("ꝏ") }, - Range { from: 'ꝏ', to: 'ꝏ', mapping: Valid }, - Range { from: 'Ꝑ', to: 'Ꝑ', mapping: Mapped("ꝑ") }, - Range { from: 'ꝑ', to: 'ꝑ', mapping: Valid }, - Range { from: 'Ꝓ', to: 'Ꝓ', mapping: Mapped("ꝓ") }, - Range { from: 'ꝓ', to: 'ꝓ', mapping: Valid }, - Range { from: 'Ꝕ', to: 'Ꝕ', mapping: Mapped("ꝕ") }, - Range { from: 'ꝕ', to: 'ꝕ', mapping: Valid }, - Range { from: 'Ꝗ', to: 'Ꝗ', mapping: Mapped("ꝗ") }, - Range { from: 'ꝗ', to: 'ꝗ', mapping: Valid }, - Range { from: 'Ꝙ', to: 'Ꝙ', mapping: Mapped("ꝙ") }, - Range { from: 'ꝙ', to: 'ꝙ', mapping: Valid }, - Range { from: 'Ꝛ', to: 'Ꝛ', mapping: Mapped("ꝛ") }, - Range { from: 'ꝛ', to: 'ꝛ', mapping: Valid }, - Range { from: 'Ꝝ', to: 'Ꝝ', mapping: Mapped("ꝝ") }, - Range { from: 'ꝝ', to: 'ꝝ', mapping: Valid }, - Range { from: 'Ꝟ', to: 'Ꝟ', mapping: Mapped("ꝟ") }, - Range { from: 'ꝟ', to: 'ꝟ', mapping: Valid }, - Range { from: 'Ꝡ', to: 'Ꝡ', mapping: Mapped("ꝡ") }, - Range { from: 'ꝡ', to: 'ꝡ', mapping: Valid }, - Range { from: 'Ꝣ', to: 'Ꝣ', mapping: Mapped("ꝣ") }, - Range { from: 'ꝣ', to: 'ꝣ', mapping: Valid }, - Range { from: 'Ꝥ', to: 'Ꝥ', mapping: Mapped("ꝥ") }, - Range { from: 'ꝥ', to: 'ꝥ', mapping: Valid }, - Range { from: 'Ꝧ', to: 'Ꝧ', mapping: Mapped("ꝧ") }, - Range { from: 'ꝧ', to: 'ꝧ', mapping: Valid }, - Range { from: 'Ꝩ', to: 'Ꝩ', mapping: Mapped("ꝩ") }, - Range { from: 'ꝩ', to: 'ꝩ', mapping: Valid }, - Range { from: 'Ꝫ', to: 'Ꝫ', mapping: Mapped("ꝫ") }, - Range { from: 'ꝫ', to: 'ꝫ', mapping: Valid }, - Range { from: 'Ꝭ', to: 'Ꝭ', mapping: Mapped("ꝭ") }, - Range { from: 'ꝭ', to: 'ꝭ', mapping: Valid }, - Range { from: 'Ꝯ', to: 'Ꝯ', mapping: Mapped("ꝯ") }, - Range { from: 'ꝯ', to: 'ꝯ', mapping: Valid }, - Range { from: 'ꝰ', to: 'ꝰ', mapping: Mapped("ꝯ") }, - Range { from: 'ꝱ', to: 'ꝸ', mapping: Valid }, - Range { from: 'Ꝺ', to: 'Ꝺ', mapping: Mapped("ꝺ") }, - Range { from: 'ꝺ', to: 'ꝺ', mapping: Valid }, - Range { from: 'Ꝼ', to: 'Ꝼ', mapping: Mapped("ꝼ") }, - Range { from: 'ꝼ', to: 'ꝼ', mapping: Valid }, - Range { from: 'Ᵹ', to: 'Ᵹ', mapping: Mapped("ᵹ") }, - Range { from: 'Ꝿ', to: 'Ꝿ', mapping: Mapped("ꝿ") }, - Range { from: 'ꝿ', to: 'ꝿ', mapping: Valid }, - Range { from: 'Ꞁ', to: 'Ꞁ', mapping: Mapped("ꞁ") }, - Range { from: 'ꞁ', to: 'ꞁ', mapping: Valid }, - Range { from: 'Ꞃ', to: 'Ꞃ', mapping: Mapped("ꞃ") }, - Range { from: 'ꞃ', to: 'ꞃ', mapping: Valid }, - Range { from: 'Ꞅ', to: 'Ꞅ', mapping: Mapped("ꞅ") }, - Range { from: 'ꞅ', to: 'ꞅ', mapping: Valid }, - Range { from: 'Ꞇ', to: 'Ꞇ', mapping: Mapped("ꞇ") }, - Range { from: 'ꞇ', to: 'ꞈ', mapping: Valid }, - Range { from: '꞉', to: '꞊', mapping: Valid }, - Range { from: 'Ꞌ', to: 'Ꞌ', mapping: Mapped("ꞌ") }, - Range { from: 'ꞌ', to: 'ꞌ', mapping: Valid }, - Range { from: 'Ɥ', to: 'Ɥ', mapping: Mapped("ɥ") }, - Range { from: 'ꞎ', to: 'ꞎ', mapping: Valid }, - Range { from: 'ꞏ', to: 'ꞏ', mapping: Valid }, - Range { from: 'Ꞑ', to: 'Ꞑ', mapping: Mapped("ꞑ") }, - Range { from: 'ꞑ', to: 'ꞑ', mapping: Valid }, - Range { from: 'Ꞓ', to: 'Ꞓ', mapping: Mapped("ꞓ") }, - Range { from: 'ꞓ', to: 'ꞓ', mapping: Valid }, - Range { from: 'ꞔ', to: 'ꞕ', mapping: Valid }, - Range { from: 'Ꞗ', to: 'Ꞗ', mapping: Mapped("ꞗ") }, - Range { from: 'ꞗ', to: 'ꞗ', mapping: Valid }, - Range { from: 'Ꞙ', to: 'Ꞙ', mapping: Mapped("ꞙ") }, - Range { from: 'ꞙ', to: 'ꞙ', mapping: Valid }, - Range { from: 'Ꞛ', to: 'Ꞛ', mapping: Mapped("ꞛ") }, - Range { from: 'ꞛ', to: 'ꞛ', mapping: Valid }, - Range { from: 'Ꞝ', to: 'Ꞝ', mapping: Mapped("ꞝ") }, - Range { from: 'ꞝ', to: 'ꞝ', mapping: Valid }, - Range { from: 'Ꞟ', to: 'Ꞟ', mapping: Mapped("ꞟ") }, - Range { from: 'ꞟ', to: 'ꞟ', mapping: Valid }, - Range { from: 'Ꞡ', to: 'Ꞡ', mapping: Mapped("ꞡ") }, - Range { from: 'ꞡ', to: 'ꞡ', mapping: Valid }, - Range { from: 'Ꞣ', to: 'Ꞣ', mapping: Mapped("ꞣ") }, - Range { from: 'ꞣ', to: 'ꞣ', mapping: Valid }, - Range { from: 'Ꞥ', to: 'Ꞥ', mapping: Mapped("ꞥ") }, - Range { from: 'ꞥ', to: 'ꞥ', mapping: Valid }, - Range { from: 'Ꞧ', to: 'Ꞧ', mapping: Mapped("ꞧ") }, - Range { from: 'ꞧ', to: 'ꞧ', mapping: Valid }, - Range { from: 'Ꞩ', to: 'Ꞩ', mapping: Mapped("ꞩ") }, - Range { from: 'ꞩ', to: 'ꞩ', mapping: Valid }, - Range { from: 'Ɦ', to: 'Ɦ', mapping: Mapped("ɦ") }, - Range { from: 'Ɜ', to: 'Ɜ', mapping: Mapped("ɜ") }, - Range { from: 'Ɡ', to: 'Ɡ', mapping: Mapped("ɡ") }, - Range { from: 'Ɬ', to: 'Ɬ', mapping: Mapped("ɬ") }, - Range { from: 'Ɪ', to: 'ꞯ', mapping: Disallowed }, - Range { from: 'Ʞ', to: 'Ʞ', mapping: Mapped("ʞ") }, - Range { from: 'Ʇ', to: 'Ʇ', mapping: Mapped("ʇ") }, - Range { from: 'Ʝ', to: 'Ʝ', mapping: Mapped("ʝ") }, - Range { from: 'Ꭓ', to: 'Ꭓ', mapping: Mapped("ꭓ") }, - Range { from: 'Ꞵ', to: 'Ꞵ', mapping: Mapped("ꞵ") }, - Range { from: 'ꞵ', to: 'ꞵ', mapping: Valid }, - Range { from: 'Ꞷ', to: 'Ꞷ', mapping: Mapped("ꞷ") }, - Range { from: 'ꞷ', to: 'ꞷ', mapping: Valid }, - Range { from: 'Ꞹ', to: 'ꟶ', mapping: Disallowed }, - Range { from: 'ꟷ', to: 'ꟷ', mapping: Valid }, - Range { from: 'ꟸ', to: 'ꟸ', mapping: Mapped("ħ") }, - Range { from: 'ꟹ', to: 'ꟹ', mapping: Mapped("œ") }, - Range { from: 'ꟺ', to: 'ꟺ', mapping: Valid }, - Range { from: 'ꟻ', to: 'ꟿ', mapping: Valid }, - Range { from: 'ꠀ', to: 'ꠧ', mapping: Valid }, - Range { from: '꠨', to: '꠫', mapping: Valid }, - Range { from: '꠬', to: '꠯', mapping: Disallowed }, - Range { from: '꠰', to: '꠹', mapping: Valid }, - Range { from: '꠺', to: '꠿', mapping: Disallowed }, - Range { from: 'ꡀ', to: 'ꡳ', mapping: Valid }, - Range { from: '꡴', to: '꡷', mapping: Valid }, - Range { from: '꡸', to: '꡿', mapping: Disallowed }, - Range { from: 'ꢀ', to: '꣄', mapping: Valid }, - Range { from: 'ꣅ', to: '꣍', mapping: Disallowed }, - Range { from: '꣎', to: '꣏', mapping: Valid }, - Range { from: '꣐', to: '꣙', mapping: Valid }, - Range { from: '꣚', to: '꣟', mapping: Disallowed }, - Range { from: '꣠', to: 'ꣷ', mapping: Valid }, - Range { from: '꣸', to: '꣺', mapping: Valid }, - Range { from: 'ꣻ', to: 'ꣻ', mapping: Valid }, - Range { from: '꣼', to: '꣼', mapping: Valid }, - Range { from: 'ꣽ', to: 'ꣽ', mapping: Valid }, - Range { from: 'ꣾ', to: 'ꣿ', mapping: Disallowed }, - Range { from: '꤀', to: '꤭', mapping: Valid }, - Range { from: '꤮', to: '꤯', mapping: Valid }, - Range { from: 'ꤰ', to: '꥓', mapping: Valid }, - Range { from: '꥔', to: '꥞', mapping: Disallowed }, - Range { from: '꥟', to: '꥟', mapping: Valid }, - Range { from: 'ꥠ', to: 'ꥼ', mapping: Valid }, - Range { from: '꥽', to: '꥿', mapping: Disallowed }, - Range { from: 'ꦀ', to: '꧀', mapping: Valid }, - Range { from: '꧁', to: '꧍', mapping: Valid }, - Range { from: '꧎', to: '꧎', mapping: Disallowed }, - Range { from: 'ꧏ', to: '꧙', mapping: Valid }, - Range { from: '꧚', to: '꧝', mapping: Disallowed }, - Range { from: '꧞', to: '꧟', mapping: Valid }, - Range { from: 'ꧠ', to: 'ꧾ', mapping: Valid }, - Range { from: '꧿', to: '꧿', mapping: Disallowed }, - Range { from: 'ꨀ', to: 'ꨶ', mapping: Valid }, - Range { from: '꨷', to: '꨿', mapping: Disallowed }, - Range { from: 'ꩀ', to: 'ꩍ', mapping: Valid }, - Range { from: '꩎', to: '꩏', mapping: Disallowed }, - Range { from: '꩐', to: '꩙', mapping: Valid }, - Range { from: '꩚', to: '꩛', mapping: Disallowed }, - Range { from: '꩜', to: '꩟', mapping: Valid }, - Range { from: 'ꩠ', to: 'ꩶ', mapping: Valid }, - Range { from: '꩷', to: '꩹', mapping: Valid }, - Range { from: 'ꩺ', to: 'ꩻ', mapping: Valid }, - Range { from: 'ꩼ', to: 'ꩿ', mapping: Valid }, - Range { from: 'ꪀ', to: 'ꫂ', mapping: Valid }, - Range { from: '꫃', to: '꫚', mapping: Disallowed }, - Range { from: 'ꫛ', to: 'ꫝ', mapping: Valid }, - Range { from: '꫞', to: '꫟', mapping: Valid }, - Range { from: 'ꫠ', to: 'ꫯ', mapping: Valid }, - Range { from: '꫰', to: '꫱', mapping: Valid }, - Range { from: 'ꫲ', to: '꫶', mapping: Valid }, - Range { from: '꫷', to: '꬀', mapping: Disallowed }, - Range { from: 'ꬁ', to: 'ꬆ', mapping: Valid }, - Range { from: '꬇', to: '꬈', mapping: Disallowed }, - Range { from: 'ꬉ', to: 'ꬎ', mapping: Valid }, - Range { from: '꬏', to: '꬐', mapping: Disallowed }, - Range { from: 'ꬑ', to: 'ꬖ', mapping: Valid }, - Range { from: '꬗', to: '꬟', mapping: Disallowed }, - Range { from: 'ꬠ', to: 'ꬦ', mapping: Valid }, - Range { from: '꬧', to: '꬧', mapping: Disallowed }, - Range { from: 'ꬨ', to: 'ꬮ', mapping: Valid }, - Range { from: '꬯', to: '꬯', mapping: Disallowed }, - Range { from: 'ꬰ', to: 'ꭚ', mapping: Valid }, - Range { from: '꭛', to: '꭛', mapping: Valid }, - Range { from: 'ꭜ', to: 'ꭜ', mapping: Mapped("ꜧ") }, - Range { from: 'ꭝ', to: 'ꭝ', mapping: Mapped("ꬷ") }, - Range { from: 'ꭞ', to: 'ꭞ', mapping: Mapped("ɫ") }, - Range { from: 'ꭟ', to: 'ꭟ', mapping: Mapped("ꭒ") }, - Range { from: 'ꭠ', to: 'ꭣ', mapping: Valid }, - Range { from: 'ꭤ', to: 'ꭥ', mapping: Valid }, - Range { from: 'ꭦ', to: '꭯', mapping: Disallowed }, - Range { from: 'ꭰ', to: 'ꭰ', mapping: Mapped("Ꭰ") }, - Range { from: 'ꭱ', to: 'ꭱ', mapping: Mapped("Ꭱ") }, - Range { from: 'ꭲ', to: 'ꭲ', mapping: Mapped("Ꭲ") }, - Range { from: 'ꭳ', to: 'ꭳ', mapping: Mapped("Ꭳ") }, - Range { from: 'ꭴ', to: 'ꭴ', mapping: Mapped("Ꭴ") }, - Range { from: 'ꭵ', to: 'ꭵ', mapping: Mapped("Ꭵ") }, - Range { from: 'ꭶ', to: 'ꭶ', mapping: Mapped("Ꭶ") }, - Range { from: 'ꭷ', to: 'ꭷ', mapping: Mapped("Ꭷ") }, - Range { from: 'ꭸ', to: 'ꭸ', mapping: Mapped("Ꭸ") }, - Range { from: 'ꭹ', to: 'ꭹ', mapping: Mapped("Ꭹ") }, - Range { from: 'ꭺ', to: 'ꭺ', mapping: Mapped("Ꭺ") }, - Range { from: 'ꭻ', to: 'ꭻ', mapping: Mapped("Ꭻ") }, - Range { from: 'ꭼ', to: 'ꭼ', mapping: Mapped("Ꭼ") }, - Range { from: 'ꭽ', to: 'ꭽ', mapping: Mapped("Ꭽ") }, - Range { from: 'ꭾ', to: 'ꭾ', mapping: Mapped("Ꭾ") }, - Range { from: 'ꭿ', to: 'ꭿ', mapping: Mapped("Ꭿ") }, - Range { from: 'ꮀ', to: 'ꮀ', mapping: Mapped("Ꮀ") }, - Range { from: 'ꮁ', to: 'ꮁ', mapping: Mapped("Ꮁ") }, - Range { from: 'ꮂ', to: 'ꮂ', mapping: Mapped("Ꮂ") }, - Range { from: 'ꮃ', to: 'ꮃ', mapping: Mapped("Ꮃ") }, - Range { from: 'ꮄ', to: 'ꮄ', mapping: Mapped("Ꮄ") }, - Range { from: 'ꮅ', to: 'ꮅ', mapping: Mapped("Ꮅ") }, - Range { from: 'ꮆ', to: 'ꮆ', mapping: Mapped("Ꮆ") }, - Range { from: 'ꮇ', to: 'ꮇ', mapping: Mapped("Ꮇ") }, - Range { from: 'ꮈ', to: 'ꮈ', mapping: Mapped("Ꮈ") }, - Range { from: 'ꮉ', to: 'ꮉ', mapping: Mapped("Ꮉ") }, - Range { from: 'ꮊ', to: 'ꮊ', mapping: Mapped("Ꮊ") }, - Range { from: 'ꮋ', to: 'ꮋ', mapping: Mapped("Ꮋ") }, - Range { from: 'ꮌ', to: 'ꮌ', mapping: Mapped("Ꮌ") }, - Range { from: 'ꮍ', to: 'ꮍ', mapping: Mapped("Ꮍ") }, - Range { from: 'ꮎ', to: 'ꮎ', mapping: Mapped("Ꮎ") }, - Range { from: 'ꮏ', to: 'ꮏ', mapping: Mapped("Ꮏ") }, - Range { from: 'ꮐ', to: 'ꮐ', mapping: Mapped("Ꮐ") }, - Range { from: 'ꮑ', to: 'ꮑ', mapping: Mapped("Ꮑ") }, - Range { from: 'ꮒ', to: 'ꮒ', mapping: Mapped("Ꮒ") }, - Range { from: 'ꮓ', to: 'ꮓ', mapping: Mapped("Ꮓ") }, - Range { from: 'ꮔ', to: 'ꮔ', mapping: Mapped("Ꮔ") }, - Range { from: 'ꮕ', to: 'ꮕ', mapping: Mapped("Ꮕ") }, - Range { from: 'ꮖ', to: 'ꮖ', mapping: Mapped("Ꮖ") }, - Range { from: 'ꮗ', to: 'ꮗ', mapping: Mapped("Ꮗ") }, - Range { from: 'ꮘ', to: 'ꮘ', mapping: Mapped("Ꮘ") }, - Range { from: 'ꮙ', to: 'ꮙ', mapping: Mapped("Ꮙ") }, - Range { from: 'ꮚ', to: 'ꮚ', mapping: Mapped("Ꮚ") }, - Range { from: 'ꮛ', to: 'ꮛ', mapping: Mapped("Ꮛ") }, - Range { from: 'ꮜ', to: 'ꮜ', mapping: Mapped("Ꮜ") }, - Range { from: 'ꮝ', to: 'ꮝ', mapping: Mapped("Ꮝ") }, - Range { from: 'ꮞ', to: 'ꮞ', mapping: Mapped("Ꮞ") }, - Range { from: 'ꮟ', to: 'ꮟ', mapping: Mapped("Ꮟ") }, - Range { from: 'ꮠ', to: 'ꮠ', mapping: Mapped("Ꮠ") }, - Range { from: 'ꮡ', to: 'ꮡ', mapping: Mapped("Ꮡ") }, - Range { from: 'ꮢ', to: 'ꮢ', mapping: Mapped("Ꮢ") }, - Range { from: 'ꮣ', to: 'ꮣ', mapping: Mapped("Ꮣ") }, - Range { from: 'ꮤ', to: 'ꮤ', mapping: Mapped("Ꮤ") }, - Range { from: 'ꮥ', to: 'ꮥ', mapping: Mapped("Ꮥ") }, - Range { from: 'ꮦ', to: 'ꮦ', mapping: Mapped("Ꮦ") }, - Range { from: 'ꮧ', to: 'ꮧ', mapping: Mapped("Ꮧ") }, - Range { from: 'ꮨ', to: 'ꮨ', mapping: Mapped("Ꮨ") }, - Range { from: 'ꮩ', to: 'ꮩ', mapping: Mapped("Ꮩ") }, - Range { from: 'ꮪ', to: 'ꮪ', mapping: Mapped("Ꮪ") }, - Range { from: 'ꮫ', to: 'ꮫ', mapping: Mapped("Ꮫ") }, - Range { from: 'ꮬ', to: 'ꮬ', mapping: Mapped("Ꮬ") }, - Range { from: 'ꮭ', to: 'ꮭ', mapping: Mapped("Ꮭ") }, - Range { from: 'ꮮ', to: 'ꮮ', mapping: Mapped("Ꮮ") }, - Range { from: 'ꮯ', to: 'ꮯ', mapping: Mapped("Ꮯ") }, - Range { from: 'ꮰ', to: 'ꮰ', mapping: Mapped("Ꮰ") }, - Range { from: 'ꮱ', to: 'ꮱ', mapping: Mapped("Ꮱ") }, - Range { from: 'ꮲ', to: 'ꮲ', mapping: Mapped("Ꮲ") }, - Range { from: 'ꮳ', to: 'ꮳ', mapping: Mapped("Ꮳ") }, - Range { from: 'ꮴ', to: 'ꮴ', mapping: Mapped("Ꮴ") }, - Range { from: 'ꮵ', to: 'ꮵ', mapping: Mapped("Ꮵ") }, - Range { from: 'ꮶ', to: 'ꮶ', mapping: Mapped("Ꮶ") }, - Range { from: 'ꮷ', to: 'ꮷ', mapping: Mapped("Ꮷ") }, - Range { from: 'ꮸ', to: 'ꮸ', mapping: Mapped("Ꮸ") }, - Range { from: 'ꮹ', to: 'ꮹ', mapping: Mapped("Ꮹ") }, - Range { from: 'ꮺ', to: 'ꮺ', mapping: Mapped("Ꮺ") }, - Range { from: 'ꮻ', to: 'ꮻ', mapping: Mapped("Ꮻ") }, - Range { from: 'ꮼ', to: 'ꮼ', mapping: Mapped("Ꮼ") }, - Range { from: 'ꮽ', to: 'ꮽ', mapping: Mapped("Ꮽ") }, - Range { from: 'ꮾ', to: 'ꮾ', mapping: Mapped("Ꮾ") }, - Range { from: 'ꮿ', to: 'ꮿ', mapping: Mapped("Ꮿ") }, - Range { from: 'ꯀ', to: 'ꯪ', mapping: Valid }, - Range { from: '꯫', to: '꯫', mapping: Valid }, - Range { from: '꯬', to: '꯭', mapping: Valid }, - Range { from: '꯮', to: '꯯', mapping: Disallowed }, - Range { from: '꯰', to: '꯹', mapping: Valid }, - Range { from: '꯺', to: '꯿', mapping: Disallowed }, - Range { from: '가', to: '힣', mapping: Valid }, - Range { from: '힤', to: '힯', mapping: Disallowed }, - Range { from: 'ힰ', to: 'ퟆ', mapping: Valid }, - Range { from: '퟇', to: '퟊', mapping: Disallowed }, - Range { from: 'ퟋ', to: 'ퟻ', mapping: Valid }, - Range { from: '퟼', to: '퟿', mapping: Disallowed }, - Range { from: '', to: '', mapping: Disallowed }, - Range { from: '豈', to: '豈', mapping: Mapped("豈") }, - Range { from: '更', to: '更', mapping: Mapped("更") }, - Range { from: '車', to: '車', mapping: Mapped("車") }, - Range { from: '賈', to: '賈', mapping: Mapped("賈") }, - Range { from: '滑', to: '滑', mapping: Mapped("滑") }, - Range { from: '串', to: '串', mapping: Mapped("串") }, - Range { from: '句', to: '句', mapping: Mapped("句") }, - Range { from: '龜', to: '龜', mapping: Mapped("龜") }, - Range { from: '契', to: '契', mapping: Mapped("契") }, - Range { from: '金', to: '金', mapping: Mapped("金") }, - Range { from: '喇', to: '喇', mapping: Mapped("喇") }, - Range { from: '奈', to: '奈', mapping: Mapped("奈") }, - Range { from: '懶', to: '懶', mapping: Mapped("懶") }, - Range { from: '癩', to: '癩', mapping: Mapped("癩") }, - Range { from: '羅', to: '羅', mapping: Mapped("羅") }, - Range { from: '蘿', to: '蘿', mapping: Mapped("蘿") }, - Range { from: '螺', to: '螺', mapping: Mapped("螺") }, - Range { from: '裸', to: '裸', mapping: Mapped("裸") }, - Range { from: '邏', to: '邏', mapping: Mapped("邏") }, - Range { from: '樂', to: '樂', mapping: Mapped("樂") }, - Range { from: '洛', to: '洛', mapping: Mapped("洛") }, - Range { from: '烙', to: '烙', mapping: Mapped("烙") }, - Range { from: '珞', to: '珞', mapping: Mapped("珞") }, - Range { from: '落', to: '落', mapping: Mapped("落") }, - Range { from: '酪', to: '酪', mapping: Mapped("酪") }, - Range { from: '駱', to: '駱', mapping: Mapped("駱") }, - Range { from: '亂', to: '亂', mapping: Mapped("亂") }, - Range { from: '卵', to: '卵', mapping: Mapped("卵") }, - Range { from: '欄', to: '欄', mapping: Mapped("欄") }, - Range { from: '爛', to: '爛', mapping: Mapped("爛") }, - Range { from: '蘭', to: '蘭', mapping: Mapped("蘭") }, - Range { from: '鸞', to: '鸞', mapping: Mapped("鸞") }, - Range { from: '嵐', to: '嵐', mapping: Mapped("嵐") }, - Range { from: '濫', to: '濫', mapping: Mapped("濫") }, - Range { from: '藍', to: '藍', mapping: Mapped("藍") }, - Range { from: '襤', to: '襤', mapping: Mapped("襤") }, - Range { from: '拉', to: '拉', mapping: Mapped("拉") }, - Range { from: '臘', to: '臘', mapping: Mapped("臘") }, - Range { from: '蠟', to: '蠟', mapping: Mapped("蠟") }, - Range { from: '廊', to: '廊', mapping: Mapped("廊") }, - Range { from: '朗', to: '朗', mapping: Mapped("朗") }, - Range { from: '浪', to: '浪', mapping: Mapped("浪") }, - Range { from: '狼', to: '狼', mapping: Mapped("狼") }, - Range { from: '郎', to: '郎', mapping: Mapped("郎") }, - Range { from: '來', to: '來', mapping: Mapped("來") }, - Range { from: '冷', to: '冷', mapping: Mapped("冷") }, - Range { from: '勞', to: '勞', mapping: Mapped("勞") }, - Range { from: '擄', to: '擄', mapping: Mapped("擄") }, - Range { from: '櫓', to: '櫓', mapping: Mapped("櫓") }, - Range { from: '爐', to: '爐', mapping: Mapped("爐") }, - Range { from: '盧', to: '盧', mapping: Mapped("盧") }, - Range { from: '老', to: '老', mapping: Mapped("老") }, - Range { from: '蘆', to: '蘆', mapping: Mapped("蘆") }, - Range { from: '虜', to: '虜', mapping: Mapped("虜") }, - Range { from: '路', to: '路', mapping: Mapped("路") }, - Range { from: '露', to: '露', mapping: Mapped("露") }, - Range { from: '魯', to: '魯', mapping: Mapped("魯") }, - Range { from: '鷺', to: '鷺', mapping: Mapped("鷺") }, - Range { from: '碌', to: '碌', mapping: Mapped("碌") }, - Range { from: '祿', to: '祿', mapping: Mapped("祿") }, - Range { from: '綠', to: '綠', mapping: Mapped("綠") }, - Range { from: '菉', to: '菉', mapping: Mapped("菉") }, - Range { from: '錄', to: '錄', mapping: Mapped("錄") }, - Range { from: '鹿', to: '鹿', mapping: Mapped("鹿") }, - Range { from: '論', to: '論', mapping: Mapped("論") }, - Range { from: '壟', to: '壟', mapping: Mapped("壟") }, - Range { from: '弄', to: '弄', mapping: Mapped("弄") }, - Range { from: '籠', to: '籠', mapping: Mapped("籠") }, - Range { from: '聾', to: '聾', mapping: Mapped("聾") }, - Range { from: '牢', to: '牢', mapping: Mapped("牢") }, - Range { from: '磊', to: '磊', mapping: Mapped("磊") }, - Range { from: '賂', to: '賂', mapping: Mapped("賂") }, - Range { from: '雷', to: '雷', mapping: Mapped("雷") }, - Range { from: '壘', to: '壘', mapping: Mapped("壘") }, - Range { from: '屢', to: '屢', mapping: Mapped("屢") }, - Range { from: '樓', to: '樓', mapping: Mapped("樓") }, - Range { from: '淚', to: '淚', mapping: Mapped("淚") }, - Range { from: '漏', to: '漏', mapping: Mapped("漏") }, - Range { from: '累', to: '累', mapping: Mapped("累") }, - Range { from: '縷', to: '縷', mapping: Mapped("縷") }, - Range { from: '陋', to: '陋', mapping: Mapped("陋") }, - Range { from: '勒', to: '勒', mapping: Mapped("勒") }, - Range { from: '肋', to: '肋', mapping: Mapped("肋") }, - Range { from: '凜', to: '凜', mapping: Mapped("凜") }, - Range { from: '凌', to: '凌', mapping: Mapped("凌") }, - Range { from: '稜', to: '稜', mapping: Mapped("稜") }, - Range { from: '綾', to: '綾', mapping: Mapped("綾") }, - Range { from: '菱', to: '菱', mapping: Mapped("菱") }, - Range { from: '陵', to: '陵', mapping: Mapped("陵") }, - Range { from: '讀', to: '讀', mapping: Mapped("讀") }, - Range { from: '拏', to: '拏', mapping: Mapped("拏") }, - Range { from: '樂', to: '樂', mapping: Mapped("樂") }, - Range { from: '諾', to: '諾', mapping: Mapped("諾") }, - Range { from: '丹', to: '丹', mapping: Mapped("丹") }, - Range { from: '寧', to: '寧', mapping: Mapped("寧") }, - Range { from: '怒', to: '怒', mapping: Mapped("怒") }, - Range { from: '率', to: '率', mapping: Mapped("率") }, - Range { from: '異', to: '異', mapping: Mapped("異") }, - Range { from: '北', to: '北', mapping: Mapped("北") }, - Range { from: '磻', to: '磻', mapping: Mapped("磻") }, - Range { from: '便', to: '便', mapping: Mapped("便") }, - Range { from: '復', to: '復', mapping: Mapped("復") }, - Range { from: '不', to: '不', mapping: Mapped("不") }, - Range { from: '泌', to: '泌', mapping: Mapped("泌") }, - Range { from: '數', to: '數', mapping: Mapped("數") }, - Range { from: '索', to: '索', mapping: Mapped("索") }, - Range { from: '參', to: '參', mapping: Mapped("參") }, - Range { from: '塞', to: '塞', mapping: Mapped("塞") }, - Range { from: '省', to: '省', mapping: Mapped("省") }, - Range { from: '葉', to: '葉', mapping: Mapped("葉") }, - Range { from: '說', to: '說', mapping: Mapped("說") }, - Range { from: '殺', to: '殺', mapping: Mapped("殺") }, - Range { from: '辰', to: '辰', mapping: Mapped("辰") }, - Range { from: '沈', to: '沈', mapping: Mapped("沈") }, - Range { from: '拾', to: '拾', mapping: Mapped("拾") }, - Range { from: '若', to: '若', mapping: Mapped("若") }, - Range { from: '掠', to: '掠', mapping: Mapped("掠") }, - Range { from: '略', to: '略', mapping: Mapped("略") }, - Range { from: '亮', to: '亮', mapping: Mapped("亮") }, - Range { from: '兩', to: '兩', mapping: Mapped("兩") }, - Range { from: '凉', to: '凉', mapping: Mapped("凉") }, - Range { from: '梁', to: '梁', mapping: Mapped("梁") }, - Range { from: '糧', to: '糧', mapping: Mapped("糧") }, - Range { from: '良', to: '良', mapping: Mapped("良") }, - Range { from: '諒', to: '諒', mapping: Mapped("諒") }, - Range { from: '量', to: '量', mapping: Mapped("量") }, - Range { from: '勵', to: '勵', mapping: Mapped("勵") }, - Range { from: '呂', to: '呂', mapping: Mapped("呂") }, - Range { from: '女', to: '女', mapping: Mapped("女") }, - Range { from: '廬', to: '廬', mapping: Mapped("廬") }, - Range { from: '旅', to: '旅', mapping: Mapped("旅") }, - Range { from: '濾', to: '濾', mapping: Mapped("濾") }, - Range { from: '礪', to: '礪', mapping: Mapped("礪") }, - Range { from: '閭', to: '閭', mapping: Mapped("閭") }, - Range { from: '驪', to: '驪', mapping: Mapped("驪") }, - Range { from: '麗', to: '麗', mapping: Mapped("麗") }, - Range { from: '黎', to: '黎', mapping: Mapped("黎") }, - Range { from: '力', to: '力', mapping: Mapped("力") }, - Range { from: '曆', to: '曆', mapping: Mapped("曆") }, - Range { from: '歷', to: '歷', mapping: Mapped("歷") }, - Range { from: '轢', to: '轢', mapping: Mapped("轢") }, - Range { from: '年', to: '年', mapping: Mapped("年") }, - Range { from: '憐', to: '憐', mapping: Mapped("憐") }, - Range { from: '戀', to: '戀', mapping: Mapped("戀") }, - Range { from: '撚', to: '撚', mapping: Mapped("撚") }, - Range { from: '漣', to: '漣', mapping: Mapped("漣") }, - Range { from: '煉', to: '煉', mapping: Mapped("煉") }, - Range { from: '璉', to: '璉', mapping: Mapped("璉") }, - Range { from: '秊', to: '秊', mapping: Mapped("秊") }, - Range { from: '練', to: '練', mapping: Mapped("練") }, - Range { from: '聯', to: '聯', mapping: Mapped("聯") }, - Range { from: '輦', to: '輦', mapping: Mapped("輦") }, - Range { from: '蓮', to: '蓮', mapping: Mapped("蓮") }, - Range { from: '連', to: '連', mapping: Mapped("連") }, - Range { from: '鍊', to: '鍊', mapping: Mapped("鍊") }, - Range { from: '列', to: '列', mapping: Mapped("列") }, - Range { from: '劣', to: '劣', mapping: Mapped("劣") }, - Range { from: '咽', to: '咽', mapping: Mapped("咽") }, - Range { from: '烈', to: '烈', mapping: Mapped("烈") }, - Range { from: '裂', to: '裂', mapping: Mapped("裂") }, - Range { from: '說', to: '說', mapping: Mapped("說") }, - Range { from: '廉', to: '廉', mapping: Mapped("廉") }, - Range { from: '念', to: '念', mapping: Mapped("念") }, - Range { from: '捻', to: '捻', mapping: Mapped("捻") }, - Range { from: '殮', to: '殮', mapping: Mapped("殮") }, - Range { from: '簾', to: '簾', mapping: Mapped("簾") }, - Range { from: '獵', to: '獵', mapping: Mapped("獵") }, - Range { from: '令', to: '令', mapping: Mapped("令") }, - Range { from: '囹', to: '囹', mapping: Mapped("囹") }, - Range { from: '寧', to: '寧', mapping: Mapped("寧") }, - Range { from: '嶺', to: '嶺', mapping: Mapped("嶺") }, - Range { from: '怜', to: '怜', mapping: Mapped("怜") }, - Range { from: '玲', to: '玲', mapping: Mapped("玲") }, - Range { from: '瑩', to: '瑩', mapping: Mapped("瑩") }, - Range { from: '羚', to: '羚', mapping: Mapped("羚") }, - Range { from: '聆', to: '聆', mapping: Mapped("聆") }, - Range { from: '鈴', to: '鈴', mapping: Mapped("鈴") }, - Range { from: '零', to: '零', mapping: Mapped("零") }, - Range { from: '靈', to: '靈', mapping: Mapped("靈") }, - Range { from: '領', to: '領', mapping: Mapped("領") }, - Range { from: '例', to: '例', mapping: Mapped("例") }, - Range { from: '禮', to: '禮', mapping: Mapped("禮") }, - Range { from: '醴', to: '醴', mapping: Mapped("醴") }, - Range { from: '隸', to: '隸', mapping: Mapped("隸") }, - Range { from: '惡', to: '惡', mapping: Mapped("惡") }, - Range { from: '了', to: '了', mapping: Mapped("了") }, - Range { from: '僚', to: '僚', mapping: Mapped("僚") }, - Range { from: '寮', to: '寮', mapping: Mapped("寮") }, - Range { from: '尿', to: '尿', mapping: Mapped("尿") }, - Range { from: '料', to: '料', mapping: Mapped("料") }, - Range { from: '樂', to: '樂', mapping: Mapped("樂") }, - Range { from: '燎', to: '燎', mapping: Mapped("燎") }, - Range { from: '療', to: '療', mapping: Mapped("療") }, - Range { from: '蓼', to: '蓼', mapping: Mapped("蓼") }, - Range { from: '遼', to: '遼', mapping: Mapped("遼") }, - Range { from: '龍', to: '龍', mapping: Mapped("龍") }, - Range { from: '暈', to: '暈', mapping: Mapped("暈") }, - Range { from: '阮', to: '阮', mapping: Mapped("阮") }, - Range { from: '劉', to: '劉', mapping: Mapped("劉") }, - Range { from: '杻', to: '杻', mapping: Mapped("杻") }, - Range { from: '柳', to: '柳', mapping: Mapped("柳") }, - Range { from: '流', to: '流', mapping: Mapped("流") }, - Range { from: '溜', to: '溜', mapping: Mapped("溜") }, - Range { from: '琉', to: '琉', mapping: Mapped("琉") }, - Range { from: '留', to: '留', mapping: Mapped("留") }, - Range { from: '硫', to: '硫', mapping: Mapped("硫") }, - Range { from: '紐', to: '紐', mapping: Mapped("紐") }, - Range { from: '類', to: '類', mapping: Mapped("類") }, - Range { from: '六', to: '六', mapping: Mapped("六") }, - Range { from: '戮', to: '戮', mapping: Mapped("戮") }, - Range { from: '陸', to: '陸', mapping: Mapped("陸") }, - Range { from: '倫', to: '倫', mapping: Mapped("倫") }, - Range { from: '崙', to: '崙', mapping: Mapped("崙") }, - Range { from: '淪', to: '淪', mapping: Mapped("淪") }, - Range { from: '輪', to: '輪', mapping: Mapped("輪") }, - Range { from: '律', to: '律', mapping: Mapped("律") }, - Range { from: '慄', to: '慄', mapping: Mapped("慄") }, - Range { from: '栗', to: '栗', mapping: Mapped("栗") }, - Range { from: '率', to: '率', mapping: Mapped("率") }, - Range { from: '隆', to: '隆', mapping: Mapped("隆") }, - Range { from: '利', to: '利', mapping: Mapped("利") }, - Range { from: '吏', to: '吏', mapping: Mapped("吏") }, - Range { from: '履', to: '履', mapping: Mapped("履") }, - Range { from: '易', to: '易', mapping: Mapped("易") }, - Range { from: '李', to: '李', mapping: Mapped("李") }, - Range { from: '梨', to: '梨', mapping: Mapped("梨") }, - Range { from: '泥', to: '泥', mapping: Mapped("泥") }, - Range { from: '理', to: '理', mapping: Mapped("理") }, - Range { from: '痢', to: '痢', mapping: Mapped("痢") }, - Range { from: '罹', to: '罹', mapping: Mapped("罹") }, - Range { from: '裏', to: '裏', mapping: Mapped("裏") }, - Range { from: '裡', to: '裡', mapping: Mapped("裡") }, - Range { from: '里', to: '里', mapping: Mapped("里") }, - Range { from: '離', to: '離', mapping: Mapped("離") }, - Range { from: '匿', to: '匿', mapping: Mapped("匿") }, - Range { from: '溺', to: '溺', mapping: Mapped("溺") }, - Range { from: '吝', to: '吝', mapping: Mapped("吝") }, - Range { from: '燐', to: '燐', mapping: Mapped("燐") }, - Range { from: '璘', to: '璘', mapping: Mapped("璘") }, - Range { from: '藺', to: '藺', mapping: Mapped("藺") }, - Range { from: '隣', to: '隣', mapping: Mapped("隣") }, - Range { from: '鱗', to: '鱗', mapping: Mapped("鱗") }, - Range { from: '麟', to: '麟', mapping: Mapped("麟") }, - Range { from: '林', to: '林', mapping: Mapped("林") }, - Range { from: '淋', to: '淋', mapping: Mapped("淋") }, - Range { from: '臨', to: '臨', mapping: Mapped("臨") }, - Range { from: '立', to: '立', mapping: Mapped("立") }, - Range { from: '笠', to: '笠', mapping: Mapped("笠") }, - Range { from: '粒', to: '粒', mapping: Mapped("粒") }, - Range { from: '狀', to: '狀', mapping: Mapped("狀") }, - Range { from: '炙', to: '炙', mapping: Mapped("炙") }, - Range { from: '識', to: '識', mapping: Mapped("識") }, - Range { from: '什', to: '什', mapping: Mapped("什") }, - Range { from: '茶', to: '茶', mapping: Mapped("茶") }, - Range { from: '刺', to: '刺', mapping: Mapped("刺") }, - Range { from: '切', to: '切', mapping: Mapped("切") }, - Range { from: '度', to: '度', mapping: Mapped("度") }, - Range { from: '拓', to: '拓', mapping: Mapped("拓") }, - Range { from: '糖', to: '糖', mapping: Mapped("糖") }, - Range { from: '宅', to: '宅', mapping: Mapped("宅") }, - Range { from: '洞', to: '洞', mapping: Mapped("洞") }, - Range { from: '暴', to: '暴', mapping: Mapped("暴") }, - Range { from: '輻', to: '輻', mapping: Mapped("輻") }, - Range { from: '行', to: '行', mapping: Mapped("行") }, - Range { from: '降', to: '降', mapping: Mapped("降") }, - Range { from: '見', to: '見', mapping: Mapped("見") }, - Range { from: '廓', to: '廓', mapping: Mapped("廓") }, - Range { from: '兀', to: '兀', mapping: Mapped("兀") }, - Range { from: '嗀', to: '嗀', mapping: Mapped("嗀") }, - Range { from: '﨎', to: '﨏', mapping: Valid }, - Range { from: '塚', to: '塚', mapping: Mapped("塚") }, - Range { from: '﨑', to: '﨑', mapping: Valid }, - Range { from: '晴', to: '晴', mapping: Mapped("晴") }, - Range { from: '﨓', to: '﨔', mapping: Valid }, - Range { from: '凞', to: '凞', mapping: Mapped("凞") }, - Range { from: '猪', to: '猪', mapping: Mapped("猪") }, - Range { from: '益', to: '益', mapping: Mapped("益") }, - Range { from: '礼', to: '礼', mapping: Mapped("礼") }, - Range { from: '神', to: '神', mapping: Mapped("神") }, - Range { from: '祥', to: '祥', mapping: Mapped("祥") }, - Range { from: '福', to: '福', mapping: Mapped("福") }, - Range { from: '靖', to: '靖', mapping: Mapped("靖") }, - Range { from: '精', to: '精', mapping: Mapped("精") }, - Range { from: '羽', to: '羽', mapping: Mapped("羽") }, - Range { from: '﨟', to: '﨟', mapping: Valid }, - Range { from: '蘒', to: '蘒', mapping: Mapped("蘒") }, - Range { from: '﨡', to: '﨡', mapping: Valid }, - Range { from: '諸', to: '諸', mapping: Mapped("諸") }, - Range { from: '﨣', to: '﨤', mapping: Valid }, - Range { from: '逸', to: '逸', mapping: Mapped("逸") }, - Range { from: '都', to: '都', mapping: Mapped("都") }, - Range { from: '﨧', to: '﨩', mapping: Valid }, - Range { from: '飯', to: '飯', mapping: Mapped("飯") }, - Range { from: '飼', to: '飼', mapping: Mapped("飼") }, - Range { from: '館', to: '館', mapping: Mapped("館") }, - Range { from: '鶴', to: '鶴', mapping: Mapped("鶴") }, - Range { from: '郞', to: '郞', mapping: Mapped("郞") }, - Range { from: '隷', to: '隷', mapping: Mapped("隷") }, - Range { from: '侮', to: '侮', mapping: Mapped("侮") }, - Range { from: '僧', to: '僧', mapping: Mapped("僧") }, - Range { from: '免', to: '免', mapping: Mapped("免") }, - Range { from: '勉', to: '勉', mapping: Mapped("勉") }, - Range { from: '勤', to: '勤', mapping: Mapped("勤") }, - Range { from: '卑', to: '卑', mapping: Mapped("卑") }, - Range { from: '喝', to: '喝', mapping: Mapped("喝") }, - Range { from: '嘆', to: '嘆', mapping: Mapped("嘆") }, - Range { from: '器', to: '器', mapping: Mapped("器") }, - Range { from: '塀', to: '塀', mapping: Mapped("塀") }, - Range { from: '墨', to: '墨', mapping: Mapped("墨") }, - Range { from: '層', to: '層', mapping: Mapped("層") }, - Range { from: '屮', to: '屮', mapping: Mapped("屮") }, - Range { from: '悔', to: '悔', mapping: Mapped("悔") }, - Range { from: '慨', to: '慨', mapping: Mapped("慨") }, - Range { from: '憎', to: '憎', mapping: Mapped("憎") }, - Range { from: '懲', to: '懲', mapping: Mapped("懲") }, - Range { from: '敏', to: '敏', mapping: Mapped("敏") }, - Range { from: '既', to: '既', mapping: Mapped("既") }, - Range { from: '暑', to: '暑', mapping: Mapped("暑") }, - Range { from: '梅', to: '梅', mapping: Mapped("梅") }, - Range { from: '海', to: '海', mapping: Mapped("海") }, - Range { from: '渚', to: '渚', mapping: Mapped("渚") }, - Range { from: '漢', to: '漢', mapping: Mapped("漢") }, - Range { from: '煮', to: '煮', mapping: Mapped("煮") }, - Range { from: '爫', to: '爫', mapping: Mapped("爫") }, - Range { from: '琢', to: '琢', mapping: Mapped("琢") }, - Range { from: '碑', to: '碑', mapping: Mapped("碑") }, - Range { from: '社', to: '社', mapping: Mapped("社") }, - Range { from: '祉', to: '祉', mapping: Mapped("祉") }, - Range { from: '祈', to: '祈', mapping: Mapped("祈") }, - Range { from: '祐', to: '祐', mapping: Mapped("祐") }, - Range { from: '祖', to: '祖', mapping: Mapped("祖") }, - Range { from: '祝', to: '祝', mapping: Mapped("祝") }, - Range { from: '禍', to: '禍', mapping: Mapped("禍") }, - Range { from: '禎', to: '禎', mapping: Mapped("禎") }, - Range { from: '穀', to: '穀', mapping: Mapped("穀") }, - Range { from: '突', to: '突', mapping: Mapped("突") }, - Range { from: '節', to: '節', mapping: Mapped("節") }, - Range { from: '練', to: '練', mapping: Mapped("練") }, - Range { from: '縉', to: '縉', mapping: Mapped("縉") }, - Range { from: '繁', to: '繁', mapping: Mapped("繁") }, - Range { from: '署', to: '署', mapping: Mapped("署") }, - Range { from: '者', to: '者', mapping: Mapped("者") }, - Range { from: '臭', to: '臭', mapping: Mapped("臭") }, - Range { from: '艹', to: '艹', mapping: Mapped("艹") }, - Range { from: '著', to: '著', mapping: Mapped("著") }, - Range { from: '褐', to: '褐', mapping: Mapped("褐") }, - Range { from: '視', to: '視', mapping: Mapped("視") }, - Range { from: '謁', to: '謁', mapping: Mapped("謁") }, - Range { from: '謹', to: '謹', mapping: Mapped("謹") }, - Range { from: '賓', to: '賓', mapping: Mapped("賓") }, - Range { from: '贈', to: '贈', mapping: Mapped("贈") }, - Range { from: '辶', to: '辶', mapping: Mapped("辶") }, - Range { from: '逸', to: '逸', mapping: Mapped("逸") }, - Range { from: '難', to: '難', mapping: Mapped("難") }, - Range { from: '響', to: '響', mapping: Mapped("響") }, - Range { from: '頻', to: '頻', mapping: Mapped("頻") }, - Range { from: '恵', to: '恵', mapping: Mapped("恵") }, - Range { from: '𤋮', to: '𤋮', mapping: Mapped("𤋮") }, - Range { from: '舘', to: '舘', mapping: Mapped("舘") }, - Range { from: '﩮', to: '﩯', mapping: Disallowed }, - Range { from: '並', to: '並', mapping: Mapped("並") }, - Range { from: '况', to: '况', mapping: Mapped("况") }, - Range { from: '全', to: '全', mapping: Mapped("全") }, - Range { from: '侀', to: '侀', mapping: Mapped("侀") }, - Range { from: '充', to: '充', mapping: Mapped("充") }, - Range { from: '冀', to: '冀', mapping: Mapped("冀") }, - Range { from: '勇', to: '勇', mapping: Mapped("勇") }, - Range { from: '勺', to: '勺', mapping: Mapped("勺") }, - Range { from: '喝', to: '喝', mapping: Mapped("喝") }, - Range { from: '啕', to: '啕', mapping: Mapped("啕") }, - Range { from: '喙', to: '喙', mapping: Mapped("喙") }, - Range { from: '嗢', to: '嗢', mapping: Mapped("嗢") }, - Range { from: '塚', to: '塚', mapping: Mapped("塚") }, - Range { from: '墳', to: '墳', mapping: Mapped("墳") }, - Range { from: '奄', to: '奄', mapping: Mapped("奄") }, - Range { from: '奔', to: '奔', mapping: Mapped("奔") }, - Range { from: '婢', to: '婢', mapping: Mapped("婢") }, - Range { from: '嬨', to: '嬨', mapping: Mapped("嬨") }, - Range { from: '廒', to: '廒', mapping: Mapped("廒") }, - Range { from: '廙', to: '廙', mapping: Mapped("廙") }, - Range { from: '彩', to: '彩', mapping: Mapped("彩") }, - Range { from: '徭', to: '徭', mapping: Mapped("徭") }, - Range { from: '惘', to: '惘', mapping: Mapped("惘") }, - Range { from: '慎', to: '慎', mapping: Mapped("慎") }, - Range { from: '愈', to: '愈', mapping: Mapped("愈") }, - Range { from: '憎', to: '憎', mapping: Mapped("憎") }, - Range { from: '慠', to: '慠', mapping: Mapped("慠") }, - Range { from: '懲', to: '懲', mapping: Mapped("懲") }, - Range { from: '戴', to: '戴', mapping: Mapped("戴") }, - Range { from: '揄', to: '揄', mapping: Mapped("揄") }, - Range { from: '搜', to: '搜', mapping: Mapped("搜") }, - Range { from: '摒', to: '摒', mapping: Mapped("摒") }, - Range { from: '敖', to: '敖', mapping: Mapped("敖") }, - Range { from: '晴', to: '晴', mapping: Mapped("晴") }, - Range { from: '朗', to: '朗', mapping: Mapped("朗") }, - Range { from: '望', to: '望', mapping: Mapped("望") }, - Range { from: '杖', to: '杖', mapping: Mapped("杖") }, - Range { from: '歹', to: '歹', mapping: Mapped("歹") }, - Range { from: '殺', to: '殺', mapping: Mapped("殺") }, - Range { from: '流', to: '流', mapping: Mapped("流") }, - Range { from: '滛', to: '滛', mapping: Mapped("滛") }, - Range { from: '滋', to: '滋', mapping: Mapped("滋") }, - Range { from: '漢', to: '漢', mapping: Mapped("漢") }, - Range { from: '瀞', to: '瀞', mapping: Mapped("瀞") }, - Range { from: '煮', to: '煮', mapping: Mapped("煮") }, - Range { from: '瞧', to: '瞧', mapping: Mapped("瞧") }, - Range { from: '爵', to: '爵', mapping: Mapped("爵") }, - Range { from: '犯', to: '犯', mapping: Mapped("犯") }, - Range { from: '猪', to: '猪', mapping: Mapped("猪") }, - Range { from: '瑱', to: '瑱', mapping: Mapped("瑱") }, - Range { from: '甆', to: '甆', mapping: Mapped("甆") }, - Range { from: '画', to: '画', mapping: Mapped("画") }, - Range { from: '瘝', to: '瘝', mapping: Mapped("瘝") }, - Range { from: '瘟', to: '瘟', mapping: Mapped("瘟") }, - Range { from: '益', to: '益', mapping: Mapped("益") }, - Range { from: '盛', to: '盛', mapping: Mapped("盛") }, - Range { from: '直', to: '直', mapping: Mapped("直") }, - Range { from: '睊', to: '睊', mapping: Mapped("睊") }, - Range { from: '着', to: '着', mapping: Mapped("着") }, - Range { from: '磌', to: '磌', mapping: Mapped("磌") }, - Range { from: '窱', to: '窱', mapping: Mapped("窱") }, - Range { from: '節', to: '節', mapping: Mapped("節") }, - Range { from: '类', to: '类', mapping: Mapped("类") }, - Range { from: '絛', to: '絛', mapping: Mapped("絛") }, - Range { from: '練', to: '練', mapping: Mapped("練") }, - Range { from: '缾', to: '缾', mapping: Mapped("缾") }, - Range { from: '者', to: '者', mapping: Mapped("者") }, - Range { from: '荒', to: '荒', mapping: Mapped("荒") }, - Range { from: '華', to: '華', mapping: Mapped("華") }, - Range { from: '蝹', to: '蝹', mapping: Mapped("蝹") }, - Range { from: '襁', to: '襁', mapping: Mapped("襁") }, - Range { from: '覆', to: '覆', mapping: Mapped("覆") }, - Range { from: '視', to: '視', mapping: Mapped("視") }, - Range { from: '調', to: '調', mapping: Mapped("調") }, - Range { from: '諸', to: '諸', mapping: Mapped("諸") }, - Range { from: '請', to: '請', mapping: Mapped("請") }, - Range { from: '謁', to: '謁', mapping: Mapped("謁") }, - Range { from: '諾', to: '諾', mapping: Mapped("諾") }, - Range { from: '諭', to: '諭', mapping: Mapped("諭") }, - Range { from: '謹', to: '謹', mapping: Mapped("謹") }, - Range { from: '變', to: '變', mapping: Mapped("變") }, - Range { from: '贈', to: '贈', mapping: Mapped("贈") }, - Range { from: '輸', to: '輸', mapping: Mapped("輸") }, - Range { from: '遲', to: '遲', mapping: Mapped("遲") }, - Range { from: '醙', to: '醙', mapping: Mapped("醙") }, - Range { from: '鉶', to: '鉶', mapping: Mapped("鉶") }, - Range { from: '陼', to: '陼', mapping: Mapped("陼") }, - Range { from: '難', to: '難', mapping: Mapped("難") }, - Range { from: '靖', to: '靖', mapping: Mapped("靖") }, - Range { from: '韛', to: '韛', mapping: Mapped("韛") }, - Range { from: '響', to: '響', mapping: Mapped("響") }, - Range { from: '頋', to: '頋', mapping: Mapped("頋") }, - Range { from: '頻', to: '頻', mapping: Mapped("頻") }, - Range { from: '鬒', to: '鬒', mapping: Mapped("鬒") }, - Range { from: '龜', to: '龜', mapping: Mapped("龜") }, - Range { from: '𢡊', to: '𢡊', mapping: Mapped("𢡊") }, - Range { from: '𢡄', to: '𢡄', mapping: Mapped("𢡄") }, - Range { from: '𣏕', to: '𣏕', mapping: Mapped("𣏕") }, - Range { from: '㮝', to: '㮝', mapping: Mapped("㮝") }, - Range { from: '䀘', to: '䀘', mapping: Mapped("䀘") }, - Range { from: '䀹', to: '䀹', mapping: Mapped("䀹") }, - Range { from: '𥉉', to: '𥉉', mapping: Mapped("𥉉") }, - Range { from: '𥳐', to: '𥳐', mapping: Mapped("𥳐") }, - Range { from: '𧻓', to: '𧻓', mapping: Mapped("𧻓") }, - Range { from: '齃', to: '齃', mapping: Mapped("齃") }, - Range { from: '龎', to: '龎', mapping: Mapped("龎") }, - Range { from: '﫚', to: '﫿', mapping: Disallowed }, - Range { from: 'ff', to: 'ff', mapping: Mapped("ff") }, - Range { from: 'fi', to: 'fi', mapping: Mapped("fi") }, - Range { from: 'fl', to: 'fl', mapping: Mapped("fl") }, - Range { from: 'ffi', to: 'ffi', mapping: Mapped("ffi") }, - Range { from: 'ffl', to: 'ffl', mapping: Mapped("ffl") }, - Range { from: 'ſt', to: 'st', mapping: Mapped("st") }, - Range { from: '﬇', to: '﬒', mapping: Disallowed }, - Range { from: 'ﬓ', to: 'ﬓ', mapping: Mapped("մն") }, - Range { from: 'ﬔ', to: 'ﬔ', mapping: Mapped("մե") }, - Range { from: 'ﬕ', to: 'ﬕ', mapping: Mapped("մի") }, - Range { from: 'ﬖ', to: 'ﬖ', mapping: Mapped("վն") }, - Range { from: 'ﬗ', to: 'ﬗ', mapping: Mapped("մխ") }, - Range { from: '﬘', to: '﬜', mapping: Disallowed }, - Range { from: 'יִ', to: 'יִ', mapping: Mapped("יִ") }, - Range { from: 'ﬞ', to: 'ﬞ', mapping: Valid }, - Range { from: 'ײַ', to: 'ײַ', mapping: Mapped("ײַ") }, - Range { from: 'ﬠ', to: 'ﬠ', mapping: Mapped("ע") }, - Range { from: 'ﬡ', to: 'ﬡ', mapping: Mapped("א") }, - Range { from: 'ﬢ', to: 'ﬢ', mapping: Mapped("ד") }, - Range { from: 'ﬣ', to: 'ﬣ', mapping: Mapped("ה") }, - Range { from: 'ﬤ', to: 'ﬤ', mapping: Mapped("כ") }, - Range { from: 'ﬥ', to: 'ﬥ', mapping: Mapped("ל") }, - Range { from: 'ﬦ', to: 'ﬦ', mapping: Mapped("ם") }, - Range { from: 'ﬧ', to: 'ﬧ', mapping: Mapped("ר") }, - Range { from: 'ﬨ', to: 'ﬨ', mapping: Mapped("ת") }, - Range { from: '﬩', to: '﬩', mapping: DisallowedStd3Mapped("+") }, - Range { from: 'שׁ', to: 'שׁ', mapping: Mapped("שׁ") }, - Range { from: 'שׂ', to: 'שׂ', mapping: Mapped("שׂ") }, - Range { from: 'שּׁ', to: 'שּׁ', mapping: Mapped("שּׁ") }, - Range { from: 'שּׂ', to: 'שּׂ', mapping: Mapped("שּׂ") }, - Range { from: 'אַ', to: 'אַ', mapping: Mapped("אַ") }, - Range { from: 'אָ', to: 'אָ', mapping: Mapped("אָ") }, - Range { from: 'אּ', to: 'אּ', mapping: Mapped("אּ") }, - Range { from: 'בּ', to: 'בּ', mapping: Mapped("בּ") }, - Range { from: 'גּ', to: 'גּ', mapping: Mapped("גּ") }, - Range { from: 'דּ', to: 'דּ', mapping: Mapped("דּ") }, - Range { from: 'הּ', to: 'הּ', mapping: Mapped("הּ") }, - Range { from: 'וּ', to: 'וּ', mapping: Mapped("וּ") }, - Range { from: 'זּ', to: 'זּ', mapping: Mapped("זּ") }, - Range { from: '﬷', to: '﬷', mapping: Disallowed }, - Range { from: 'טּ', to: 'טּ', mapping: Mapped("טּ") }, - Range { from: 'יּ', to: 'יּ', mapping: Mapped("יּ") }, - Range { from: 'ךּ', to: 'ךּ', mapping: Mapped("ךּ") }, - Range { from: 'כּ', to: 'כּ', mapping: Mapped("כּ") }, - Range { from: 'לּ', to: 'לּ', mapping: Mapped("לּ") }, - Range { from: '﬽', to: '﬽', mapping: Disallowed }, - Range { from: 'מּ', to: 'מּ', mapping: Mapped("מּ") }, - Range { from: '﬿', to: '﬿', mapping: Disallowed }, - Range { from: 'נּ', to: 'נּ', mapping: Mapped("נּ") }, - Range { from: 'סּ', to: 'סּ', mapping: Mapped("סּ") }, - Range { from: '﭂', to: '﭂', mapping: Disallowed }, - Range { from: 'ףּ', to: 'ףּ', mapping: Mapped("ףּ") }, - Range { from: 'פּ', to: 'פּ', mapping: Mapped("פּ") }, - Range { from: '﭅', to: '﭅', mapping: Disallowed }, - Range { from: 'צּ', to: 'צּ', mapping: Mapped("צּ") }, - Range { from: 'קּ', to: 'קּ', mapping: Mapped("קּ") }, - Range { from: 'רּ', to: 'רּ', mapping: Mapped("רּ") }, - Range { from: 'שּ', to: 'שּ', mapping: Mapped("שּ") }, - Range { from: 'תּ', to: 'תּ', mapping: Mapped("תּ") }, - Range { from: 'וֹ', to: 'וֹ', mapping: Mapped("וֹ") }, - Range { from: 'בֿ', to: 'בֿ', mapping: Mapped("בֿ") }, - Range { from: 'כֿ', to: 'כֿ', mapping: Mapped("כֿ") }, - Range { from: 'פֿ', to: 'פֿ', mapping: Mapped("פֿ") }, - Range { from: 'ﭏ', to: 'ﭏ', mapping: Mapped("אל") }, - Range { from: 'ﭐ', to: 'ﭑ', mapping: Mapped("ٱ") }, - Range { from: 'ﭒ', to: 'ﭕ', mapping: Mapped("ٻ") }, - Range { from: 'ﭖ', to: 'ﭙ', mapping: Mapped("پ") }, - Range { from: 'ﭚ', to: 'ﭝ', mapping: Mapped("ڀ") }, - Range { from: 'ﭞ', to: 'ﭡ', mapping: Mapped("ٺ") }, - Range { from: 'ﭢ', to: 'ﭥ', mapping: Mapped("ٿ") }, - Range { from: 'ﭦ', to: 'ﭩ', mapping: Mapped("ٹ") }, - Range { from: 'ﭪ', to: 'ﭭ', mapping: Mapped("ڤ") }, - Range { from: 'ﭮ', to: 'ﭱ', mapping: Mapped("ڦ") }, - Range { from: 'ﭲ', to: 'ﭵ', mapping: Mapped("ڄ") }, - Range { from: 'ﭶ', to: 'ﭹ', mapping: Mapped("ڃ") }, - Range { from: 'ﭺ', to: 'ﭽ', mapping: Mapped("چ") }, - Range { from: 'ﭾ', to: 'ﮁ', mapping: Mapped("ڇ") }, - Range { from: 'ﮂ', to: 'ﮃ', mapping: Mapped("ڍ") }, - Range { from: 'ﮄ', to: 'ﮅ', mapping: Mapped("ڌ") }, - Range { from: 'ﮆ', to: 'ﮇ', mapping: Mapped("ڎ") }, - Range { from: 'ﮈ', to: 'ﮉ', mapping: Mapped("ڈ") }, - Range { from: 'ﮊ', to: 'ﮋ', mapping: Mapped("ژ") }, - Range { from: 'ﮌ', to: 'ﮍ', mapping: Mapped("ڑ") }, - Range { from: 'ﮎ', to: 'ﮑ', mapping: Mapped("ک") }, - Range { from: 'ﮒ', to: 'ﮕ', mapping: Mapped("گ") }, - Range { from: 'ﮖ', to: 'ﮙ', mapping: Mapped("ڳ") }, - Range { from: 'ﮚ', to: 'ﮝ', mapping: Mapped("ڱ") }, - Range { from: 'ﮞ', to: 'ﮟ', mapping: Mapped("ں") }, - Range { from: 'ﮠ', to: 'ﮣ', mapping: Mapped("ڻ") }, - Range { from: 'ﮤ', to: 'ﮥ', mapping: Mapped("ۀ") }, - Range { from: 'ﮦ', to: 'ﮩ', mapping: Mapped("ہ") }, - Range { from: 'ﮪ', to: 'ﮭ', mapping: Mapped("ھ") }, - Range { from: 'ﮮ', to: 'ﮯ', mapping: Mapped("ے") }, - Range { from: 'ﮰ', to: 'ﮱ', mapping: Mapped("ۓ") }, - Range { from: '﮲', to: '﯁', mapping: Valid }, - Range { from: '﯂', to: '﯒', mapping: Disallowed }, - Range { from: 'ﯓ', to: 'ﯖ', mapping: Mapped("ڭ") }, - Range { from: 'ﯗ', to: 'ﯘ', mapping: Mapped("ۇ") }, - Range { from: 'ﯙ', to: 'ﯚ', mapping: Mapped("ۆ") }, - Range { from: 'ﯛ', to: 'ﯜ', mapping: Mapped("ۈ") }, - Range { from: 'ﯝ', to: 'ﯝ', mapping: Mapped("ۇٴ") }, - Range { from: 'ﯞ', to: 'ﯟ', mapping: Mapped("ۋ") }, - Range { from: 'ﯠ', to: 'ﯡ', mapping: Mapped("ۅ") }, - Range { from: 'ﯢ', to: 'ﯣ', mapping: Mapped("ۉ") }, - Range { from: 'ﯤ', to: 'ﯧ', mapping: Mapped("ې") }, - Range { from: 'ﯨ', to: 'ﯩ', mapping: Mapped("ى") }, - Range { from: 'ﯪ', to: 'ﯫ', mapping: Mapped("ئا") }, - Range { from: 'ﯬ', to: 'ﯭ', mapping: Mapped("ئە") }, - Range { from: 'ﯮ', to: 'ﯯ', mapping: Mapped("ئو") }, - Range { from: 'ﯰ', to: 'ﯱ', mapping: Mapped("ئۇ") }, - Range { from: 'ﯲ', to: 'ﯳ', mapping: Mapped("ئۆ") }, - Range { from: 'ﯴ', to: 'ﯵ', mapping: Mapped("ئۈ") }, - Range { from: 'ﯶ', to: 'ﯸ', mapping: Mapped("ئې") }, - Range { from: 'ﯹ', to: 'ﯻ', mapping: Mapped("ئى") }, - Range { from: 'ﯼ', to: 'ﯿ', mapping: Mapped("ی") }, - Range { from: 'ﰀ', to: 'ﰀ', mapping: Mapped("ئج") }, - Range { from: 'ﰁ', to: 'ﰁ', mapping: Mapped("ئح") }, - Range { from: 'ﰂ', to: 'ﰂ', mapping: Mapped("ئم") }, - Range { from: 'ﰃ', to: 'ﰃ', mapping: Mapped("ئى") }, - Range { from: 'ﰄ', to: 'ﰄ', mapping: Mapped("ئي") }, - Range { from: 'ﰅ', to: 'ﰅ', mapping: Mapped("بج") }, - Range { from: 'ﰆ', to: 'ﰆ', mapping: Mapped("بح") }, - Range { from: 'ﰇ', to: 'ﰇ', mapping: Mapped("بخ") }, - Range { from: 'ﰈ', to: 'ﰈ', mapping: Mapped("بم") }, - Range { from: 'ﰉ', to: 'ﰉ', mapping: Mapped("بى") }, - Range { from: 'ﰊ', to: 'ﰊ', mapping: Mapped("بي") }, - Range { from: 'ﰋ', to: 'ﰋ', mapping: Mapped("تج") }, - Range { from: 'ﰌ', to: 'ﰌ', mapping: Mapped("تح") }, - Range { from: 'ﰍ', to: 'ﰍ', mapping: Mapped("تخ") }, - Range { from: 'ﰎ', to: 'ﰎ', mapping: Mapped("تم") }, - Range { from: 'ﰏ', to: 'ﰏ', mapping: Mapped("تى") }, - Range { from: 'ﰐ', to: 'ﰐ', mapping: Mapped("تي") }, - Range { from: 'ﰑ', to: 'ﰑ', mapping: Mapped("ثج") }, - Range { from: 'ﰒ', to: 'ﰒ', mapping: Mapped("ثم") }, - Range { from: 'ﰓ', to: 'ﰓ', mapping: Mapped("ثى") }, - Range { from: 'ﰔ', to: 'ﰔ', mapping: Mapped("ثي") }, - Range { from: 'ﰕ', to: 'ﰕ', mapping: Mapped("جح") }, - Range { from: 'ﰖ', to: 'ﰖ', mapping: Mapped("جم") }, - Range { from: 'ﰗ', to: 'ﰗ', mapping: Mapped("حج") }, - Range { from: 'ﰘ', to: 'ﰘ', mapping: Mapped("حم") }, - Range { from: 'ﰙ', to: 'ﰙ', mapping: Mapped("خج") }, - Range { from: 'ﰚ', to: 'ﰚ', mapping: Mapped("خح") }, - Range { from: 'ﰛ', to: 'ﰛ', mapping: Mapped("خم") }, - Range { from: 'ﰜ', to: 'ﰜ', mapping: Mapped("سج") }, - Range { from: 'ﰝ', to: 'ﰝ', mapping: Mapped("سح") }, - Range { from: 'ﰞ', to: 'ﰞ', mapping: Mapped("سخ") }, - Range { from: 'ﰟ', to: 'ﰟ', mapping: Mapped("سم") }, - Range { from: 'ﰠ', to: 'ﰠ', mapping: Mapped("صح") }, - Range { from: 'ﰡ', to: 'ﰡ', mapping: Mapped("صم") }, - Range { from: 'ﰢ', to: 'ﰢ', mapping: Mapped("ضج") }, - Range { from: 'ﰣ', to: 'ﰣ', mapping: Mapped("ضح") }, - Range { from: 'ﰤ', to: 'ﰤ', mapping: Mapped("ضخ") }, - Range { from: 'ﰥ', to: 'ﰥ', mapping: Mapped("ضم") }, - Range { from: 'ﰦ', to: 'ﰦ', mapping: Mapped("طح") }, - Range { from: 'ﰧ', to: 'ﰧ', mapping: Mapped("طم") }, - Range { from: 'ﰨ', to: 'ﰨ', mapping: Mapped("ظم") }, - Range { from: 'ﰩ', to: 'ﰩ', mapping: Mapped("عج") }, - Range { from: 'ﰪ', to: 'ﰪ', mapping: Mapped("عم") }, - Range { from: 'ﰫ', to: 'ﰫ', mapping: Mapped("غج") }, - Range { from: 'ﰬ', to: 'ﰬ', mapping: Mapped("غم") }, - Range { from: 'ﰭ', to: 'ﰭ', mapping: Mapped("فج") }, - Range { from: 'ﰮ', to: 'ﰮ', mapping: Mapped("فح") }, - Range { from: 'ﰯ', to: 'ﰯ', mapping: Mapped("فخ") }, - Range { from: 'ﰰ', to: 'ﰰ', mapping: Mapped("فم") }, - Range { from: 'ﰱ', to: 'ﰱ', mapping: Mapped("فى") }, - Range { from: 'ﰲ', to: 'ﰲ', mapping: Mapped("في") }, - Range { from: 'ﰳ', to: 'ﰳ', mapping: Mapped("قح") }, - Range { from: 'ﰴ', to: 'ﰴ', mapping: Mapped("قم") }, - Range { from: 'ﰵ', to: 'ﰵ', mapping: Mapped("قى") }, - Range { from: 'ﰶ', to: 'ﰶ', mapping: Mapped("قي") }, - Range { from: 'ﰷ', to: 'ﰷ', mapping: Mapped("كا") }, - Range { from: 'ﰸ', to: 'ﰸ', mapping: Mapped("كج") }, - Range { from: 'ﰹ', to: 'ﰹ', mapping: Mapped("كح") }, - Range { from: 'ﰺ', to: 'ﰺ', mapping: Mapped("كخ") }, - Range { from: 'ﰻ', to: 'ﰻ', mapping: Mapped("كل") }, - Range { from: 'ﰼ', to: 'ﰼ', mapping: Mapped("كم") }, - Range { from: 'ﰽ', to: 'ﰽ', mapping: Mapped("كى") }, - Range { from: 'ﰾ', to: 'ﰾ', mapping: Mapped("كي") }, - Range { from: 'ﰿ', to: 'ﰿ', mapping: Mapped("لج") }, - Range { from: 'ﱀ', to: 'ﱀ', mapping: Mapped("لح") }, - Range { from: 'ﱁ', to: 'ﱁ', mapping: Mapped("لخ") }, - Range { from: 'ﱂ', to: 'ﱂ', mapping: Mapped("لم") }, - Range { from: 'ﱃ', to: 'ﱃ', mapping: Mapped("لى") }, - Range { from: 'ﱄ', to: 'ﱄ', mapping: Mapped("لي") }, - Range { from: 'ﱅ', to: 'ﱅ', mapping: Mapped("مج") }, - Range { from: 'ﱆ', to: 'ﱆ', mapping: Mapped("مح") }, - Range { from: 'ﱇ', to: 'ﱇ', mapping: Mapped("مخ") }, - Range { from: 'ﱈ', to: 'ﱈ', mapping: Mapped("مم") }, - Range { from: 'ﱉ', to: 'ﱉ', mapping: Mapped("مى") }, - Range { from: 'ﱊ', to: 'ﱊ', mapping: Mapped("مي") }, - Range { from: 'ﱋ', to: 'ﱋ', mapping: Mapped("نج") }, - Range { from: 'ﱌ', to: 'ﱌ', mapping: Mapped("نح") }, - Range { from: 'ﱍ', to: 'ﱍ', mapping: Mapped("نخ") }, - Range { from: 'ﱎ', to: 'ﱎ', mapping: Mapped("نم") }, - Range { from: 'ﱏ', to: 'ﱏ', mapping: Mapped("نى") }, - Range { from: 'ﱐ', to: 'ﱐ', mapping: Mapped("ني") }, - Range { from: 'ﱑ', to: 'ﱑ', mapping: Mapped("هج") }, - Range { from: 'ﱒ', to: 'ﱒ', mapping: Mapped("هم") }, - Range { from: 'ﱓ', to: 'ﱓ', mapping: Mapped("هى") }, - Range { from: 'ﱔ', to: 'ﱔ', mapping: Mapped("هي") }, - Range { from: 'ﱕ', to: 'ﱕ', mapping: Mapped("يج") }, - Range { from: 'ﱖ', to: 'ﱖ', mapping: Mapped("يح") }, - Range { from: 'ﱗ', to: 'ﱗ', mapping: Mapped("يخ") }, - Range { from: 'ﱘ', to: 'ﱘ', mapping: Mapped("يم") }, - Range { from: 'ﱙ', to: 'ﱙ', mapping: Mapped("يى") }, - Range { from: 'ﱚ', to: 'ﱚ', mapping: Mapped("يي") }, - Range { from: 'ﱛ', to: 'ﱛ', mapping: Mapped("ذٰ") }, - Range { from: 'ﱜ', to: 'ﱜ', mapping: Mapped("رٰ") }, - Range { from: 'ﱝ', to: 'ﱝ', mapping: Mapped("ىٰ") }, - Range { from: 'ﱞ', to: 'ﱞ', mapping: DisallowedStd3Mapped(" ٌّ") }, - Range { from: 'ﱟ', to: 'ﱟ', mapping: DisallowedStd3Mapped(" ٍّ") }, - Range { from: 'ﱠ', to: 'ﱠ', mapping: DisallowedStd3Mapped(" َّ") }, - Range { from: 'ﱡ', to: 'ﱡ', mapping: DisallowedStd3Mapped(" ُّ") }, - Range { from: 'ﱢ', to: 'ﱢ', mapping: DisallowedStd3Mapped(" ِّ") }, - Range { from: 'ﱣ', to: 'ﱣ', mapping: DisallowedStd3Mapped(" ّٰ") }, - Range { from: 'ﱤ', to: 'ﱤ', mapping: Mapped("ئر") }, - Range { from: 'ﱥ', to: 'ﱥ', mapping: Mapped("ئز") }, - Range { from: 'ﱦ', to: 'ﱦ', mapping: Mapped("ئم") }, - Range { from: 'ﱧ', to: 'ﱧ', mapping: Mapped("ئن") }, - Range { from: 'ﱨ', to: 'ﱨ', mapping: Mapped("ئى") }, - Range { from: 'ﱩ', to: 'ﱩ', mapping: Mapped("ئي") }, - Range { from: 'ﱪ', to: 'ﱪ', mapping: Mapped("بر") }, - Range { from: 'ﱫ', to: 'ﱫ', mapping: Mapped("بز") }, - Range { from: 'ﱬ', to: 'ﱬ', mapping: Mapped("بم") }, - Range { from: 'ﱭ', to: 'ﱭ', mapping: Mapped("بن") }, - Range { from: 'ﱮ', to: 'ﱮ', mapping: Mapped("بى") }, - Range { from: 'ﱯ', to: 'ﱯ', mapping: Mapped("بي") }, - Range { from: 'ﱰ', to: 'ﱰ', mapping: Mapped("تر") }, - Range { from: 'ﱱ', to: 'ﱱ', mapping: Mapped("تز") }, - Range { from: 'ﱲ', to: 'ﱲ', mapping: Mapped("تم") }, - Range { from: 'ﱳ', to: 'ﱳ', mapping: Mapped("تن") }, - Range { from: 'ﱴ', to: 'ﱴ', mapping: Mapped("تى") }, - Range { from: 'ﱵ', to: 'ﱵ', mapping: Mapped("تي") }, - Range { from: 'ﱶ', to: 'ﱶ', mapping: Mapped("ثر") }, - Range { from: 'ﱷ', to: 'ﱷ', mapping: Mapped("ثز") }, - Range { from: 'ﱸ', to: 'ﱸ', mapping: Mapped("ثم") }, - Range { from: 'ﱹ', to: 'ﱹ', mapping: Mapped("ثن") }, - Range { from: 'ﱺ', to: 'ﱺ', mapping: Mapped("ثى") }, - Range { from: 'ﱻ', to: 'ﱻ', mapping: Mapped("ثي") }, - Range { from: 'ﱼ', to: 'ﱼ', mapping: Mapped("فى") }, - Range { from: 'ﱽ', to: 'ﱽ', mapping: Mapped("في") }, - Range { from: 'ﱾ', to: 'ﱾ', mapping: Mapped("قى") }, - Range { from: 'ﱿ', to: 'ﱿ', mapping: Mapped("قي") }, - Range { from: 'ﲀ', to: 'ﲀ', mapping: Mapped("كا") }, - Range { from: 'ﲁ', to: 'ﲁ', mapping: Mapped("كل") }, - Range { from: 'ﲂ', to: 'ﲂ', mapping: Mapped("كم") }, - Range { from: 'ﲃ', to: 'ﲃ', mapping: Mapped("كى") }, - Range { from: 'ﲄ', to: 'ﲄ', mapping: Mapped("كي") }, - Range { from: 'ﲅ', to: 'ﲅ', mapping: Mapped("لم") }, - Range { from: 'ﲆ', to: 'ﲆ', mapping: Mapped("لى") }, - Range { from: 'ﲇ', to: 'ﲇ', mapping: Mapped("لي") }, - Range { from: 'ﲈ', to: 'ﲈ', mapping: Mapped("ما") }, - Range { from: 'ﲉ', to: 'ﲉ', mapping: Mapped("مم") }, - Range { from: 'ﲊ', to: 'ﲊ', mapping: Mapped("نر") }, - Range { from: 'ﲋ', to: 'ﲋ', mapping: Mapped("نز") }, - Range { from: 'ﲌ', to: 'ﲌ', mapping: Mapped("نم") }, - Range { from: 'ﲍ', to: 'ﲍ', mapping: Mapped("نن") }, - Range { from: 'ﲎ', to: 'ﲎ', mapping: Mapped("نى") }, - Range { from: 'ﲏ', to: 'ﲏ', mapping: Mapped("ني") }, - Range { from: 'ﲐ', to: 'ﲐ', mapping: Mapped("ىٰ") }, - Range { from: 'ﲑ', to: 'ﲑ', mapping: Mapped("ير") }, - Range { from: 'ﲒ', to: 'ﲒ', mapping: Mapped("يز") }, - Range { from: 'ﲓ', to: 'ﲓ', mapping: Mapped("يم") }, - Range { from: 'ﲔ', to: 'ﲔ', mapping: Mapped("ين") }, - Range { from: 'ﲕ', to: 'ﲕ', mapping: Mapped("يى") }, - Range { from: 'ﲖ', to: 'ﲖ', mapping: Mapped("يي") }, - Range { from: 'ﲗ', to: 'ﲗ', mapping: Mapped("ئج") }, - Range { from: 'ﲘ', to: 'ﲘ', mapping: Mapped("ئح") }, - Range { from: 'ﲙ', to: 'ﲙ', mapping: Mapped("ئخ") }, - Range { from: 'ﲚ', to: 'ﲚ', mapping: Mapped("ئم") }, - Range { from: 'ﲛ', to: 'ﲛ', mapping: Mapped("ئه") }, - Range { from: 'ﲜ', to: 'ﲜ', mapping: Mapped("بج") }, - Range { from: 'ﲝ', to: 'ﲝ', mapping: Mapped("بح") }, - Range { from: 'ﲞ', to: 'ﲞ', mapping: Mapped("بخ") }, - Range { from: 'ﲟ', to: 'ﲟ', mapping: Mapped("بم") }, - Range { from: 'ﲠ', to: 'ﲠ', mapping: Mapped("به") }, - Range { from: 'ﲡ', to: 'ﲡ', mapping: Mapped("تج") }, - Range { from: 'ﲢ', to: 'ﲢ', mapping: Mapped("تح") }, - Range { from: 'ﲣ', to: 'ﲣ', mapping: Mapped("تخ") }, - Range { from: 'ﲤ', to: 'ﲤ', mapping: Mapped("تم") }, - Range { from: 'ﲥ', to: 'ﲥ', mapping: Mapped("ته") }, - Range { from: 'ﲦ', to: 'ﲦ', mapping: Mapped("ثم") }, - Range { from: 'ﲧ', to: 'ﲧ', mapping: Mapped("جح") }, - Range { from: 'ﲨ', to: 'ﲨ', mapping: Mapped("جم") }, - Range { from: 'ﲩ', to: 'ﲩ', mapping: Mapped("حج") }, - Range { from: 'ﲪ', to: 'ﲪ', mapping: Mapped("حم") }, - Range { from: 'ﲫ', to: 'ﲫ', mapping: Mapped("خج") }, - Range { from: 'ﲬ', to: 'ﲬ', mapping: Mapped("خم") }, - Range { from: 'ﲭ', to: 'ﲭ', mapping: Mapped("سج") }, - Range { from: 'ﲮ', to: 'ﲮ', mapping: Mapped("سح") }, - Range { from: 'ﲯ', to: 'ﲯ', mapping: Mapped("سخ") }, - Range { from: 'ﲰ', to: 'ﲰ', mapping: Mapped("سم") }, - Range { from: 'ﲱ', to: 'ﲱ', mapping: Mapped("صح") }, - Range { from: 'ﲲ', to: 'ﲲ', mapping: Mapped("صخ") }, - Range { from: 'ﲳ', to: 'ﲳ', mapping: Mapped("صم") }, - Range { from: 'ﲴ', to: 'ﲴ', mapping: Mapped("ضج") }, - Range { from: 'ﲵ', to: 'ﲵ', mapping: Mapped("ضح") }, - Range { from: 'ﲶ', to: 'ﲶ', mapping: Mapped("ضخ") }, - Range { from: 'ﲷ', to: 'ﲷ', mapping: Mapped("ضم") }, - Range { from: 'ﲸ', to: 'ﲸ', mapping: Mapped("طح") }, - Range { from: 'ﲹ', to: 'ﲹ', mapping: Mapped("ظم") }, - Range { from: 'ﲺ', to: 'ﲺ', mapping: Mapped("عج") }, - Range { from: 'ﲻ', to: 'ﲻ', mapping: Mapped("عم") }, - Range { from: 'ﲼ', to: 'ﲼ', mapping: Mapped("غج") }, - Range { from: 'ﲽ', to: 'ﲽ', mapping: Mapped("غم") }, - Range { from: 'ﲾ', to: 'ﲾ', mapping: Mapped("فج") }, - Range { from: 'ﲿ', to: 'ﲿ', mapping: Mapped("فح") }, - Range { from: 'ﳀ', to: 'ﳀ', mapping: Mapped("فخ") }, - Range { from: 'ﳁ', to: 'ﳁ', mapping: Mapped("فم") }, - Range { from: 'ﳂ', to: 'ﳂ', mapping: Mapped("قح") }, - Range { from: 'ﳃ', to: 'ﳃ', mapping: Mapped("قم") }, - Range { from: 'ﳄ', to: 'ﳄ', mapping: Mapped("كج") }, - Range { from: 'ﳅ', to: 'ﳅ', mapping: Mapped("كح") }, - Range { from: 'ﳆ', to: 'ﳆ', mapping: Mapped("كخ") }, - Range { from: 'ﳇ', to: 'ﳇ', mapping: Mapped("كل") }, - Range { from: 'ﳈ', to: 'ﳈ', mapping: Mapped("كم") }, - Range { from: 'ﳉ', to: 'ﳉ', mapping: Mapped("لج") }, - Range { from: 'ﳊ', to: 'ﳊ', mapping: Mapped("لح") }, - Range { from: 'ﳋ', to: 'ﳋ', mapping: Mapped("لخ") }, - Range { from: 'ﳌ', to: 'ﳌ', mapping: Mapped("لم") }, - Range { from: 'ﳍ', to: 'ﳍ', mapping: Mapped("له") }, - Range { from: 'ﳎ', to: 'ﳎ', mapping: Mapped("مج") }, - Range { from: 'ﳏ', to: 'ﳏ', mapping: Mapped("مح") }, - Range { from: 'ﳐ', to: 'ﳐ', mapping: Mapped("مخ") }, - Range { from: 'ﳑ', to: 'ﳑ', mapping: Mapped("مم") }, - Range { from: 'ﳒ', to: 'ﳒ', mapping: Mapped("نج") }, - Range { from: 'ﳓ', to: 'ﳓ', mapping: Mapped("نح") }, - Range { from: 'ﳔ', to: 'ﳔ', mapping: Mapped("نخ") }, - Range { from: 'ﳕ', to: 'ﳕ', mapping: Mapped("نم") }, - Range { from: 'ﳖ', to: 'ﳖ', mapping: Mapped("نه") }, - Range { from: 'ﳗ', to: 'ﳗ', mapping: Mapped("هج") }, - Range { from: 'ﳘ', to: 'ﳘ', mapping: Mapped("هم") }, - Range { from: 'ﳙ', to: 'ﳙ', mapping: Mapped("هٰ") }, - Range { from: 'ﳚ', to: 'ﳚ', mapping: Mapped("يج") }, - Range { from: 'ﳛ', to: 'ﳛ', mapping: Mapped("يح") }, - Range { from: 'ﳜ', to: 'ﳜ', mapping: Mapped("يخ") }, - Range { from: 'ﳝ', to: 'ﳝ', mapping: Mapped("يم") }, - Range { from: 'ﳞ', to: 'ﳞ', mapping: Mapped("يه") }, - Range { from: 'ﳟ', to: 'ﳟ', mapping: Mapped("ئم") }, - Range { from: 'ﳠ', to: 'ﳠ', mapping: Mapped("ئه") }, - Range { from: 'ﳡ', to: 'ﳡ', mapping: Mapped("بم") }, - Range { from: 'ﳢ', to: 'ﳢ', mapping: Mapped("به") }, - Range { from: 'ﳣ', to: 'ﳣ', mapping: Mapped("تم") }, - Range { from: 'ﳤ', to: 'ﳤ', mapping: Mapped("ته") }, - Range { from: 'ﳥ', to: 'ﳥ', mapping: Mapped("ثم") }, - Range { from: 'ﳦ', to: 'ﳦ', mapping: Mapped("ثه") }, - Range { from: 'ﳧ', to: 'ﳧ', mapping: Mapped("سم") }, - Range { from: 'ﳨ', to: 'ﳨ', mapping: Mapped("سه") }, - Range { from: 'ﳩ', to: 'ﳩ', mapping: Mapped("شم") }, - Range { from: 'ﳪ', to: 'ﳪ', mapping: Mapped("شه") }, - Range { from: 'ﳫ', to: 'ﳫ', mapping: Mapped("كل") }, - Range { from: 'ﳬ', to: 'ﳬ', mapping: Mapped("كم") }, - Range { from: 'ﳭ', to: 'ﳭ', mapping: Mapped("لم") }, - Range { from: 'ﳮ', to: 'ﳮ', mapping: Mapped("نم") }, - Range { from: 'ﳯ', to: 'ﳯ', mapping: Mapped("نه") }, - Range { from: 'ﳰ', to: 'ﳰ', mapping: Mapped("يم") }, - Range { from: 'ﳱ', to: 'ﳱ', mapping: Mapped("يه") }, - Range { from: 'ﳲ', to: 'ﳲ', mapping: Mapped("ـَّ") }, - Range { from: 'ﳳ', to: 'ﳳ', mapping: Mapped("ـُّ") }, - Range { from: 'ﳴ', to: 'ﳴ', mapping: Mapped("ـِّ") }, - Range { from: 'ﳵ', to: 'ﳵ', mapping: Mapped("طى") }, - Range { from: 'ﳶ', to: 'ﳶ', mapping: Mapped("طي") }, - Range { from: 'ﳷ', to: 'ﳷ', mapping: Mapped("عى") }, - Range { from: 'ﳸ', to: 'ﳸ', mapping: Mapped("عي") }, - Range { from: 'ﳹ', to: 'ﳹ', mapping: Mapped("غى") }, - Range { from: 'ﳺ', to: 'ﳺ', mapping: Mapped("غي") }, - Range { from: 'ﳻ', to: 'ﳻ', mapping: Mapped("سى") }, - Range { from: 'ﳼ', to: 'ﳼ', mapping: Mapped("سي") }, - Range { from: 'ﳽ', to: 'ﳽ', mapping: Mapped("شى") }, - Range { from: 'ﳾ', to: 'ﳾ', mapping: Mapped("شي") }, - Range { from: 'ﳿ', to: 'ﳿ', mapping: Mapped("حى") }, - Range { from: 'ﴀ', to: 'ﴀ', mapping: Mapped("حي") }, - Range { from: 'ﴁ', to: 'ﴁ', mapping: Mapped("جى") }, - Range { from: 'ﴂ', to: 'ﴂ', mapping: Mapped("جي") }, - Range { from: 'ﴃ', to: 'ﴃ', mapping: Mapped("خى") }, - Range { from: 'ﴄ', to: 'ﴄ', mapping: Mapped("خي") }, - Range { from: 'ﴅ', to: 'ﴅ', mapping: Mapped("صى") }, - Range { from: 'ﴆ', to: 'ﴆ', mapping: Mapped("صي") }, - Range { from: 'ﴇ', to: 'ﴇ', mapping: Mapped("ضى") }, - Range { from: 'ﴈ', to: 'ﴈ', mapping: Mapped("ضي") }, - Range { from: 'ﴉ', to: 'ﴉ', mapping: Mapped("شج") }, - Range { from: 'ﴊ', to: 'ﴊ', mapping: Mapped("شح") }, - Range { from: 'ﴋ', to: 'ﴋ', mapping: Mapped("شخ") }, - Range { from: 'ﴌ', to: 'ﴌ', mapping: Mapped("شم") }, - Range { from: 'ﴍ', to: 'ﴍ', mapping: Mapped("شر") }, - Range { from: 'ﴎ', to: 'ﴎ', mapping: Mapped("سر") }, - Range { from: 'ﴏ', to: 'ﴏ', mapping: Mapped("صر") }, - Range { from: 'ﴐ', to: 'ﴐ', mapping: Mapped("ضر") }, - Range { from: 'ﴑ', to: 'ﴑ', mapping: Mapped("طى") }, - Range { from: 'ﴒ', to: 'ﴒ', mapping: Mapped("طي") }, - Range { from: 'ﴓ', to: 'ﴓ', mapping: Mapped("عى") }, - Range { from: 'ﴔ', to: 'ﴔ', mapping: Mapped("عي") }, - Range { from: 'ﴕ', to: 'ﴕ', mapping: Mapped("غى") }, - Range { from: 'ﴖ', to: 'ﴖ', mapping: Mapped("غي") }, - Range { from: 'ﴗ', to: 'ﴗ', mapping: Mapped("سى") }, - Range { from: 'ﴘ', to: 'ﴘ', mapping: Mapped("سي") }, - Range { from: 'ﴙ', to: 'ﴙ', mapping: Mapped("شى") }, - Range { from: 'ﴚ', to: 'ﴚ', mapping: Mapped("شي") }, - Range { from: 'ﴛ', to: 'ﴛ', mapping: Mapped("حى") }, - Range { from: 'ﴜ', to: 'ﴜ', mapping: Mapped("حي") }, - Range { from: 'ﴝ', to: 'ﴝ', mapping: Mapped("جى") }, - Range { from: 'ﴞ', to: 'ﴞ', mapping: Mapped("جي") }, - Range { from: 'ﴟ', to: 'ﴟ', mapping: Mapped("خى") }, - Range { from: 'ﴠ', to: 'ﴠ', mapping: Mapped("خي") }, - Range { from: 'ﴡ', to: 'ﴡ', mapping: Mapped("صى") }, - Range { from: 'ﴢ', to: 'ﴢ', mapping: Mapped("صي") }, - Range { from: 'ﴣ', to: 'ﴣ', mapping: Mapped("ضى") }, - Range { from: 'ﴤ', to: 'ﴤ', mapping: Mapped("ضي") }, - Range { from: 'ﴥ', to: 'ﴥ', mapping: Mapped("شج") }, - Range { from: 'ﴦ', to: 'ﴦ', mapping: Mapped("شح") }, - Range { from: 'ﴧ', to: 'ﴧ', mapping: Mapped("شخ") }, - Range { from: 'ﴨ', to: 'ﴨ', mapping: Mapped("شم") }, - Range { from: 'ﴩ', to: 'ﴩ', mapping: Mapped("شر") }, - Range { from: 'ﴪ', to: 'ﴪ', mapping: Mapped("سر") }, - Range { from: 'ﴫ', to: 'ﴫ', mapping: Mapped("صر") }, - Range { from: 'ﴬ', to: 'ﴬ', mapping: Mapped("ضر") }, - Range { from: 'ﴭ', to: 'ﴭ', mapping: Mapped("شج") }, - Range { from: 'ﴮ', to: 'ﴮ', mapping: Mapped("شح") }, - Range { from: 'ﴯ', to: 'ﴯ', mapping: Mapped("شخ") }, - Range { from: 'ﴰ', to: 'ﴰ', mapping: Mapped("شم") }, - Range { from: 'ﴱ', to: 'ﴱ', mapping: Mapped("سه") }, - Range { from: 'ﴲ', to: 'ﴲ', mapping: Mapped("شه") }, - Range { from: 'ﴳ', to: 'ﴳ', mapping: Mapped("طم") }, - Range { from: 'ﴴ', to: 'ﴴ', mapping: Mapped("سج") }, - Range { from: 'ﴵ', to: 'ﴵ', mapping: Mapped("سح") }, - Range { from: 'ﴶ', to: 'ﴶ', mapping: Mapped("سخ") }, - Range { from: 'ﴷ', to: 'ﴷ', mapping: Mapped("شج") }, - Range { from: 'ﴸ', to: 'ﴸ', mapping: Mapped("شح") }, - Range { from: 'ﴹ', to: 'ﴹ', mapping: Mapped("شخ") }, - Range { from: 'ﴺ', to: 'ﴺ', mapping: Mapped("طم") }, - Range { from: 'ﴻ', to: 'ﴻ', mapping: Mapped("ظم") }, - Range { from: 'ﴼ', to: 'ﴽ', mapping: Mapped("اً") }, - Range { from: '﴾', to: '﴿', mapping: Valid }, - Range { from: '﵀', to: '﵏', mapping: Disallowed }, - Range { from: 'ﵐ', to: 'ﵐ', mapping: Mapped("تجم") }, - Range { from: 'ﵑ', to: 'ﵒ', mapping: Mapped("تحج") }, - Range { from: 'ﵓ', to: 'ﵓ', mapping: Mapped("تحم") }, - Range { from: 'ﵔ', to: 'ﵔ', mapping: Mapped("تخم") }, - Range { from: 'ﵕ', to: 'ﵕ', mapping: Mapped("تمج") }, - Range { from: 'ﵖ', to: 'ﵖ', mapping: Mapped("تمح") }, - Range { from: 'ﵗ', to: 'ﵗ', mapping: Mapped("تمخ") }, - Range { from: 'ﵘ', to: 'ﵙ', mapping: Mapped("جمح") }, - Range { from: 'ﵚ', to: 'ﵚ', mapping: Mapped("حمي") }, - Range { from: 'ﵛ', to: 'ﵛ', mapping: Mapped("حمى") }, - Range { from: 'ﵜ', to: 'ﵜ', mapping: Mapped("سحج") }, - Range { from: 'ﵝ', to: 'ﵝ', mapping: Mapped("سجح") }, - Range { from: 'ﵞ', to: 'ﵞ', mapping: Mapped("سجى") }, - Range { from: 'ﵟ', to: 'ﵠ', mapping: Mapped("سمح") }, - Range { from: 'ﵡ', to: 'ﵡ', mapping: Mapped("سمج") }, - Range { from: 'ﵢ', to: 'ﵣ', mapping: Mapped("سمم") }, - Range { from: 'ﵤ', to: 'ﵥ', mapping: Mapped("صحح") }, - Range { from: 'ﵦ', to: 'ﵦ', mapping: Mapped("صمم") }, - Range { from: 'ﵧ', to: 'ﵨ', mapping: Mapped("شحم") }, - Range { from: 'ﵩ', to: 'ﵩ', mapping: Mapped("شجي") }, - Range { from: 'ﵪ', to: 'ﵫ', mapping: Mapped("شمخ") }, - Range { from: 'ﵬ', to: 'ﵭ', mapping: Mapped("شمم") }, - Range { from: 'ﵮ', to: 'ﵮ', mapping: Mapped("ضحى") }, - Range { from: 'ﵯ', to: 'ﵰ', mapping: Mapped("ضخم") }, - Range { from: 'ﵱ', to: 'ﵲ', mapping: Mapped("طمح") }, - Range { from: 'ﵳ', to: 'ﵳ', mapping: Mapped("طمم") }, - Range { from: 'ﵴ', to: 'ﵴ', mapping: Mapped("طمي") }, - Range { from: 'ﵵ', to: 'ﵵ', mapping: Mapped("عجم") }, - Range { from: 'ﵶ', to: 'ﵷ', mapping: Mapped("عمم") }, - Range { from: 'ﵸ', to: 'ﵸ', mapping: Mapped("عمى") }, - Range { from: 'ﵹ', to: 'ﵹ', mapping: Mapped("غمم") }, - Range { from: 'ﵺ', to: 'ﵺ', mapping: Mapped("غمي") }, - Range { from: 'ﵻ', to: 'ﵻ', mapping: Mapped("غمى") }, - Range { from: 'ﵼ', to: 'ﵽ', mapping: Mapped("فخم") }, - Range { from: 'ﵾ', to: 'ﵾ', mapping: Mapped("قمح") }, - Range { from: 'ﵿ', to: 'ﵿ', mapping: Mapped("قمم") }, - Range { from: 'ﶀ', to: 'ﶀ', mapping: Mapped("لحم") }, - Range { from: 'ﶁ', to: 'ﶁ', mapping: Mapped("لحي") }, - Range { from: 'ﶂ', to: 'ﶂ', mapping: Mapped("لحى") }, - Range { from: 'ﶃ', to: 'ﶄ', mapping: Mapped("لجج") }, - Range { from: 'ﶅ', to: 'ﶆ', mapping: Mapped("لخم") }, - Range { from: 'ﶇ', to: 'ﶈ', mapping: Mapped("لمح") }, - Range { from: 'ﶉ', to: 'ﶉ', mapping: Mapped("محج") }, - Range { from: 'ﶊ', to: 'ﶊ', mapping: Mapped("محم") }, - Range { from: 'ﶋ', to: 'ﶋ', mapping: Mapped("محي") }, - Range { from: 'ﶌ', to: 'ﶌ', mapping: Mapped("مجح") }, - Range { from: 'ﶍ', to: 'ﶍ', mapping: Mapped("مجم") }, - Range { from: 'ﶎ', to: 'ﶎ', mapping: Mapped("مخج") }, - Range { from: 'ﶏ', to: 'ﶏ', mapping: Mapped("مخم") }, - Range { from: '﶐', to: '﶑', mapping: Disallowed }, - Range { from: 'ﶒ', to: 'ﶒ', mapping: Mapped("مجخ") }, - Range { from: 'ﶓ', to: 'ﶓ', mapping: Mapped("همج") }, - Range { from: 'ﶔ', to: 'ﶔ', mapping: Mapped("همم") }, - Range { from: 'ﶕ', to: 'ﶕ', mapping: Mapped("نحم") }, - Range { from: 'ﶖ', to: 'ﶖ', mapping: Mapped("نحى") }, - Range { from: 'ﶗ', to: 'ﶘ', mapping: Mapped("نجم") }, - Range { from: 'ﶙ', to: 'ﶙ', mapping: Mapped("نجى") }, - Range { from: 'ﶚ', to: 'ﶚ', mapping: Mapped("نمي") }, - Range { from: 'ﶛ', to: 'ﶛ', mapping: Mapped("نمى") }, - Range { from: 'ﶜ', to: 'ﶝ', mapping: Mapped("يمم") }, - Range { from: 'ﶞ', to: 'ﶞ', mapping: Mapped("بخي") }, - Range { from: 'ﶟ', to: 'ﶟ', mapping: Mapped("تجي") }, - Range { from: 'ﶠ', to: 'ﶠ', mapping: Mapped("تجى") }, - Range { from: 'ﶡ', to: 'ﶡ', mapping: Mapped("تخي") }, - Range { from: 'ﶢ', to: 'ﶢ', mapping: Mapped("تخى") }, - Range { from: 'ﶣ', to: 'ﶣ', mapping: Mapped("تمي") }, - Range { from: 'ﶤ', to: 'ﶤ', mapping: Mapped("تمى") }, - Range { from: 'ﶥ', to: 'ﶥ', mapping: Mapped("جمي") }, - Range { from: 'ﶦ', to: 'ﶦ', mapping: Mapped("جحى") }, - Range { from: 'ﶧ', to: 'ﶧ', mapping: Mapped("جمى") }, - Range { from: 'ﶨ', to: 'ﶨ', mapping: Mapped("سخى") }, - Range { from: 'ﶩ', to: 'ﶩ', mapping: Mapped("صحي") }, - Range { from: 'ﶪ', to: 'ﶪ', mapping: Mapped("شحي") }, - Range { from: 'ﶫ', to: 'ﶫ', mapping: Mapped("ضحي") }, - Range { from: 'ﶬ', to: 'ﶬ', mapping: Mapped("لجي") }, - Range { from: 'ﶭ', to: 'ﶭ', mapping: Mapped("لمي") }, - Range { from: 'ﶮ', to: 'ﶮ', mapping: Mapped("يحي") }, - Range { from: 'ﶯ', to: 'ﶯ', mapping: Mapped("يجي") }, - Range { from: 'ﶰ', to: 'ﶰ', mapping: Mapped("يمي") }, - Range { from: 'ﶱ', to: 'ﶱ', mapping: Mapped("ممي") }, - Range { from: 'ﶲ', to: 'ﶲ', mapping: Mapped("قمي") }, - Range { from: 'ﶳ', to: 'ﶳ', mapping: Mapped("نحي") }, - Range { from: 'ﶴ', to: 'ﶴ', mapping: Mapped("قمح") }, - Range { from: 'ﶵ', to: 'ﶵ', mapping: Mapped("لحم") }, - Range { from: 'ﶶ', to: 'ﶶ', mapping: Mapped("عمي") }, - Range { from: 'ﶷ', to: 'ﶷ', mapping: Mapped("كمي") }, - Range { from: 'ﶸ', to: 'ﶸ', mapping: Mapped("نجح") }, - Range { from: 'ﶹ', to: 'ﶹ', mapping: Mapped("مخي") }, - Range { from: 'ﶺ', to: 'ﶺ', mapping: Mapped("لجم") }, - Range { from: 'ﶻ', to: 'ﶻ', mapping: Mapped("كمم") }, - Range { from: 'ﶼ', to: 'ﶼ', mapping: Mapped("لجم") }, - Range { from: 'ﶽ', to: 'ﶽ', mapping: Mapped("نجح") }, - Range { from: 'ﶾ', to: 'ﶾ', mapping: Mapped("جحي") }, - Range { from: 'ﶿ', to: 'ﶿ', mapping: Mapped("حجي") }, - Range { from: 'ﷀ', to: 'ﷀ', mapping: Mapped("مجي") }, - Range { from: 'ﷁ', to: 'ﷁ', mapping: Mapped("فمي") }, - Range { from: 'ﷂ', to: 'ﷂ', mapping: Mapped("بحي") }, - Range { from: 'ﷃ', to: 'ﷃ', mapping: Mapped("كمم") }, - Range { from: 'ﷄ', to: 'ﷄ', mapping: Mapped("عجم") }, - Range { from: 'ﷅ', to: 'ﷅ', mapping: Mapped("صمم") }, - Range { from: 'ﷆ', to: 'ﷆ', mapping: Mapped("سخي") }, - Range { from: 'ﷇ', to: 'ﷇ', mapping: Mapped("نجي") }, - Range { from: '﷈', to: '﷏', mapping: Disallowed }, - Range { from: '﷐', to: '﷯', mapping: Disallowed }, - Range { from: 'ﷰ', to: 'ﷰ', mapping: Mapped("صلے") }, - Range { from: 'ﷱ', to: 'ﷱ', mapping: Mapped("قلے") }, - Range { from: 'ﷲ', to: 'ﷲ', mapping: Mapped("الله") }, - Range { from: 'ﷳ', to: 'ﷳ', mapping: Mapped("اكبر") }, - Range { from: 'ﷴ', to: 'ﷴ', mapping: Mapped("محمد") }, - Range { from: 'ﷵ', to: 'ﷵ', mapping: Mapped("صلعم") }, - Range { from: 'ﷶ', to: 'ﷶ', mapping: Mapped("رسول") }, - Range { from: 'ﷷ', to: 'ﷷ', mapping: Mapped("عليه") }, - Range { from: 'ﷸ', to: 'ﷸ', mapping: Mapped("وسلم") }, - Range { from: 'ﷹ', to: 'ﷹ', mapping: Mapped("صلى") }, - Range { from: 'ﷺ', to: 'ﷺ', mapping: DisallowedStd3Mapped("صلى الله عليه وسلم") }, - Range { from: 'ﷻ', to: 'ﷻ', mapping: DisallowedStd3Mapped("جل جلاله") }, - Range { from: '﷼', to: '﷼', mapping: Mapped("ریال") }, - Range { from: '﷽', to: '﷽', mapping: Valid }, - Range { from: '﷾', to: '﷿', mapping: Disallowed }, - Range { from: '︀', to: '️', mapping: Ignored }, - Range { from: '︐', to: '︐', mapping: DisallowedStd3Mapped(",") }, - Range { from: '︑', to: '︑', mapping: Mapped("、") }, - Range { from: '︒', to: '︒', mapping: Disallowed }, - Range { from: '︓', to: '︓', mapping: DisallowedStd3Mapped(":") }, - Range { from: '︔', to: '︔', mapping: DisallowedStd3Mapped(";") }, - Range { from: '︕', to: '︕', mapping: DisallowedStd3Mapped("!") }, - Range { from: '︖', to: '︖', mapping: DisallowedStd3Mapped("?") }, - Range { from: '︗', to: '︗', mapping: Mapped("〖") }, - Range { from: '︘', to: '︘', mapping: Mapped("〗") }, - Range { from: '︙', to: '︙', mapping: Disallowed }, - Range { from: '︚', to: '︟', mapping: Disallowed }, - Range { from: '︠', to: '︣', mapping: Valid }, - Range { from: '︤', to: '︦', mapping: Valid }, - Range { from: '︧', to: '︭', mapping: Valid }, - Range { from: '︮', to: '︯', mapping: Valid }, - Range { from: '︰', to: '︰', mapping: Disallowed }, - Range { from: '︱', to: '︱', mapping: Mapped("—") }, - Range { from: '︲', to: '︲', mapping: Mapped("–") }, - Range { from: '︳', to: '︴', mapping: DisallowedStd3Mapped("_") }, - Range { from: '︵', to: '︵', mapping: DisallowedStd3Mapped("(") }, - Range { from: '︶', to: '︶', mapping: DisallowedStd3Mapped(")") }, - Range { from: '︷', to: '︷', mapping: DisallowedStd3Mapped("{") }, - Range { from: '︸', to: '︸', mapping: DisallowedStd3Mapped("}") }, - Range { from: '︹', to: '︹', mapping: Mapped("〔") }, - Range { from: '︺', to: '︺', mapping: Mapped("〕") }, - Range { from: '︻', to: '︻', mapping: Mapped("【") }, - Range { from: '︼', to: '︼', mapping: Mapped("】") }, - Range { from: '︽', to: '︽', mapping: Mapped("《") }, - Range { from: '︾', to: '︾', mapping: Mapped("》") }, - Range { from: '︿', to: '︿', mapping: Mapped("〈") }, - Range { from: '﹀', to: '﹀', mapping: Mapped("〉") }, - Range { from: '﹁', to: '﹁', mapping: Mapped("「") }, - Range { from: '﹂', to: '﹂', mapping: Mapped("」") }, - Range { from: '﹃', to: '﹃', mapping: Mapped("『") }, - Range { from: '﹄', to: '﹄', mapping: Mapped("』") }, - Range { from: '﹅', to: '﹆', mapping: Valid }, - Range { from: '﹇', to: '﹇', mapping: DisallowedStd3Mapped("[") }, - Range { from: '﹈', to: '﹈', mapping: DisallowedStd3Mapped("]") }, - Range { from: '﹉', to: '﹌', mapping: DisallowedStd3Mapped(" ̅") }, - Range { from: '﹍', to: '﹏', mapping: DisallowedStd3Mapped("_") }, - Range { from: '﹐', to: '﹐', mapping: DisallowedStd3Mapped(",") }, - Range { from: '﹑', to: '﹑', mapping: Mapped("、") }, - Range { from: '﹒', to: '﹒', mapping: Disallowed }, - Range { from: '﹓', to: '﹓', mapping: Disallowed }, - Range { from: '﹔', to: '﹔', mapping: DisallowedStd3Mapped(";") }, - Range { from: '﹕', to: '﹕', mapping: DisallowedStd3Mapped(":") }, - Range { from: '﹖', to: '﹖', mapping: DisallowedStd3Mapped("?") }, - Range { from: '﹗', to: '﹗', mapping: DisallowedStd3Mapped("!") }, - Range { from: '﹘', to: '﹘', mapping: Mapped("—") }, - Range { from: '﹙', to: '﹙', mapping: DisallowedStd3Mapped("(") }, - Range { from: '﹚', to: '﹚', mapping: DisallowedStd3Mapped(")") }, - Range { from: '﹛', to: '﹛', mapping: DisallowedStd3Mapped("{") }, - Range { from: '﹜', to: '﹜', mapping: DisallowedStd3Mapped("}") }, - Range { from: '﹝', to: '﹝', mapping: Mapped("〔") }, - Range { from: '﹞', to: '﹞', mapping: Mapped("〕") }, - Range { from: '﹟', to: '﹟', mapping: DisallowedStd3Mapped("#") }, - Range { from: '﹠', to: '﹠', mapping: DisallowedStd3Mapped("&") }, - Range { from: '﹡', to: '﹡', mapping: DisallowedStd3Mapped("*") }, - Range { from: '﹢', to: '﹢', mapping: DisallowedStd3Mapped("+") }, - Range { from: '﹣', to: '﹣', mapping: Mapped("-") }, - Range { from: '﹤', to: '﹤', mapping: DisallowedStd3Mapped("<") }, - Range { from: '﹥', to: '﹥', mapping: DisallowedStd3Mapped(">") }, - Range { from: '﹦', to: '﹦', mapping: DisallowedStd3Mapped("=") }, - Range { from: '﹧', to: '﹧', mapping: Disallowed }, - Range { from: '﹨', to: '﹨', mapping: DisallowedStd3Mapped("\\") }, - Range { from: '﹩', to: '﹩', mapping: DisallowedStd3Mapped("$") }, - Range { from: '﹪', to: '﹪', mapping: DisallowedStd3Mapped("%") }, - Range { from: '﹫', to: '﹫', mapping: DisallowedStd3Mapped("@") }, - Range { from: '﹬', to: '﹯', mapping: Disallowed }, - Range { from: 'ﹰ', to: 'ﹰ', mapping: DisallowedStd3Mapped(" ً") }, - Range { from: 'ﹱ', to: 'ﹱ', mapping: Mapped("ـً") }, - Range { from: 'ﹲ', to: 'ﹲ', mapping: DisallowedStd3Mapped(" ٌ") }, - Range { from: 'ﹳ', to: 'ﹳ', mapping: Valid }, - Range { from: 'ﹴ', to: 'ﹴ', mapping: DisallowedStd3Mapped(" ٍ") }, - Range { from: '﹵', to: '﹵', mapping: Disallowed }, - Range { from: 'ﹶ', to: 'ﹶ', mapping: DisallowedStd3Mapped(" َ") }, - Range { from: 'ﹷ', to: 'ﹷ', mapping: Mapped("ـَ") }, - Range { from: 'ﹸ', to: 'ﹸ', mapping: DisallowedStd3Mapped(" ُ") }, - Range { from: 'ﹹ', to: 'ﹹ', mapping: Mapped("ـُ") }, - Range { from: 'ﹺ', to: 'ﹺ', mapping: DisallowedStd3Mapped(" ِ") }, - Range { from: 'ﹻ', to: 'ﹻ', mapping: Mapped("ـِ") }, - Range { from: 'ﹼ', to: 'ﹼ', mapping: DisallowedStd3Mapped(" ّ") }, - Range { from: 'ﹽ', to: 'ﹽ', mapping: Mapped("ـّ") }, - Range { from: 'ﹾ', to: 'ﹾ', mapping: DisallowedStd3Mapped(" ْ") }, - Range { from: 'ﹿ', to: 'ﹿ', mapping: Mapped("ـْ") }, - Range { from: 'ﺀ', to: 'ﺀ', mapping: Mapped("ء") }, - Range { from: 'ﺁ', to: 'ﺂ', mapping: Mapped("آ") }, - Range { from: 'ﺃ', to: 'ﺄ', mapping: Mapped("أ") }, - Range { from: 'ﺅ', to: 'ﺆ', mapping: Mapped("ؤ") }, - Range { from: 'ﺇ', to: 'ﺈ', mapping: Mapped("إ") }, - Range { from: 'ﺉ', to: 'ﺌ', mapping: Mapped("ئ") }, - Range { from: 'ﺍ', to: 'ﺎ', mapping: Mapped("ا") }, - Range { from: 'ﺏ', to: 'ﺒ', mapping: Mapped("ب") }, - Range { from: 'ﺓ', to: 'ﺔ', mapping: Mapped("ة") }, - Range { from: 'ﺕ', to: 'ﺘ', mapping: Mapped("ت") }, - Range { from: 'ﺙ', to: 'ﺜ', mapping: Mapped("ث") }, - Range { from: 'ﺝ', to: 'ﺠ', mapping: Mapped("ج") }, - Range { from: 'ﺡ', to: 'ﺤ', mapping: Mapped("ح") }, - Range { from: 'ﺥ', to: 'ﺨ', mapping: Mapped("خ") }, - Range { from: 'ﺩ', to: 'ﺪ', mapping: Mapped("د") }, - Range { from: 'ﺫ', to: 'ﺬ', mapping: Mapped("ذ") }, - Range { from: 'ﺭ', to: 'ﺮ', mapping: Mapped("ر") }, - Range { from: 'ﺯ', to: 'ﺰ', mapping: Mapped("ز") }, - Range { from: 'ﺱ', to: 'ﺴ', mapping: Mapped("س") }, - Range { from: 'ﺵ', to: 'ﺸ', mapping: Mapped("ش") }, - Range { from: 'ﺹ', to: 'ﺼ', mapping: Mapped("ص") }, - Range { from: 'ﺽ', to: 'ﻀ', mapping: Mapped("ض") }, - Range { from: 'ﻁ', to: 'ﻄ', mapping: Mapped("ط") }, - Range { from: 'ﻅ', to: 'ﻈ', mapping: Mapped("ظ") }, - Range { from: 'ﻉ', to: 'ﻌ', mapping: Mapped("ع") }, - Range { from: 'ﻍ', to: 'ﻐ', mapping: Mapped("غ") }, - Range { from: 'ﻑ', to: 'ﻔ', mapping: Mapped("ف") }, - Range { from: 'ﻕ', to: 'ﻘ', mapping: Mapped("ق") }, - Range { from: 'ﻙ', to: 'ﻜ', mapping: Mapped("ك") }, - Range { from: 'ﻝ', to: 'ﻠ', mapping: Mapped("ل") }, - Range { from: 'ﻡ', to: 'ﻤ', mapping: Mapped("م") }, - Range { from: 'ﻥ', to: 'ﻨ', mapping: Mapped("ن") }, - Range { from: 'ﻩ', to: 'ﻬ', mapping: Mapped("ه") }, - Range { from: 'ﻭ', to: 'ﻮ', mapping: Mapped("و") }, - Range { from: 'ﻯ', to: 'ﻰ', mapping: Mapped("ى") }, - Range { from: 'ﻱ', to: 'ﻴ', mapping: Mapped("ي") }, - Range { from: 'ﻵ', to: 'ﻶ', mapping: Mapped("لآ") }, - Range { from: 'ﻷ', to: 'ﻸ', mapping: Mapped("لأ") }, - Range { from: 'ﻹ', to: 'ﻺ', mapping: Mapped("لإ") }, - Range { from: 'ﻻ', to: 'ﻼ', mapping: Mapped("لا") }, - Range { from: '﻽', to: '﻾', mapping: Disallowed }, - Range { from: '', to: '', mapping: Ignored }, - Range { from: '＀', to: '＀', mapping: Disallowed }, - Range { from: '!', to: '!', mapping: DisallowedStd3Mapped("!") }, - Range { from: '"', to: '"', mapping: DisallowedStd3Mapped("\"") }, - Range { from: '#', to: '#', mapping: DisallowedStd3Mapped("#") }, - Range { from: '$', to: '$', mapping: DisallowedStd3Mapped("$") }, - Range { from: '%', to: '%', mapping: DisallowedStd3Mapped("%") }, - Range { from: '&', to: '&', mapping: DisallowedStd3Mapped("&") }, - Range { from: ''', to: ''', mapping: DisallowedStd3Mapped("'") }, - Range { from: '(', to: '(', mapping: DisallowedStd3Mapped("(") }, - Range { from: ')', to: ')', mapping: DisallowedStd3Mapped(")") }, - Range { from: '*', to: '*', mapping: DisallowedStd3Mapped("*") }, - Range { from: '+', to: '+', mapping: DisallowedStd3Mapped("+") }, - Range { from: ',', to: ',', mapping: DisallowedStd3Mapped(",") }, - Range { from: '-', to: '-', mapping: Mapped("-") }, - Range { from: '.', to: '.', mapping: Mapped(".") }, - Range { from: '/', to: '/', mapping: DisallowedStd3Mapped("/") }, - Range { from: '0', to: '0', mapping: Mapped("0") }, - Range { from: '1', to: '1', mapping: Mapped("1") }, - Range { from: '2', to: '2', mapping: Mapped("2") }, - Range { from: '3', to: '3', mapping: Mapped("3") }, - Range { from: '4', to: '4', mapping: Mapped("4") }, - Range { from: '5', to: '5', mapping: Mapped("5") }, - Range { from: '6', to: '6', mapping: Mapped("6") }, - Range { from: '7', to: '7', mapping: Mapped("7") }, - Range { from: '8', to: '8', mapping: Mapped("8") }, - Range { from: '9', to: '9', mapping: Mapped("9") }, - Range { from: ':', to: ':', mapping: DisallowedStd3Mapped(":") }, - Range { from: ';', to: ';', mapping: DisallowedStd3Mapped(";") }, - Range { from: '<', to: '<', mapping: DisallowedStd3Mapped("<") }, - Range { from: '=', to: '=', mapping: DisallowedStd3Mapped("=") }, - Range { from: '>', to: '>', mapping: DisallowedStd3Mapped(">") }, - Range { from: '?', to: '?', mapping: DisallowedStd3Mapped("?") }, - Range { from: '@', to: '@', mapping: DisallowedStd3Mapped("@") }, - Range { from: 'A', to: 'A', mapping: Mapped("a") }, - Range { from: 'B', to: 'B', mapping: Mapped("b") }, - Range { from: 'C', to: 'C', mapping: Mapped("c") }, - Range { from: 'D', to: 'D', mapping: Mapped("d") }, - Range { from: 'E', to: 'E', mapping: Mapped("e") }, - Range { from: 'F', to: 'F', mapping: Mapped("f") }, - Range { from: 'G', to: 'G', mapping: Mapped("g") }, - Range { from: 'H', to: 'H', mapping: Mapped("h") }, - Range { from: 'I', to: 'I', mapping: Mapped("i") }, - Range { from: 'J', to: 'J', mapping: Mapped("j") }, - Range { from: 'K', to: 'K', mapping: Mapped("k") }, - Range { from: 'L', to: 'L', mapping: Mapped("l") }, - Range { from: 'M', to: 'M', mapping: Mapped("m") }, - Range { from: 'N', to: 'N', mapping: Mapped("n") }, - Range { from: 'O', to: 'O', mapping: Mapped("o") }, - Range { from: 'P', to: 'P', mapping: Mapped("p") }, - Range { from: 'Q', to: 'Q', mapping: Mapped("q") }, - Range { from: 'R', to: 'R', mapping: Mapped("r") }, - Range { from: 'S', to: 'S', mapping: Mapped("s") }, - Range { from: 'T', to: 'T', mapping: Mapped("t") }, - Range { from: 'U', to: 'U', mapping: Mapped("u") }, - Range { from: 'V', to: 'V', mapping: Mapped("v") }, - Range { from: 'W', to: 'W', mapping: Mapped("w") }, - Range { from: 'X', to: 'X', mapping: Mapped("x") }, - Range { from: 'Y', to: 'Y', mapping: Mapped("y") }, - Range { from: 'Z', to: 'Z', mapping: Mapped("z") }, - Range { from: '[', to: '[', mapping: DisallowedStd3Mapped("[") }, - Range { from: '\', to: '\', mapping: DisallowedStd3Mapped("\\") }, - Range { from: ']', to: ']', mapping: DisallowedStd3Mapped("]") }, - Range { from: '^', to: '^', mapping: DisallowedStd3Mapped("^") }, - Range { from: '_', to: '_', mapping: DisallowedStd3Mapped("_") }, - Range { from: '`', to: '`', mapping: DisallowedStd3Mapped("`") }, - Range { from: 'a', to: 'a', mapping: Mapped("a") }, - Range { from: 'b', to: 'b', mapping: Mapped("b") }, - Range { from: 'c', to: 'c', mapping: Mapped("c") }, - Range { from: 'd', to: 'd', mapping: Mapped("d") }, - Range { from: 'e', to: 'e', mapping: Mapped("e") }, - Range { from: 'f', to: 'f', mapping: Mapped("f") }, - Range { from: 'g', to: 'g', mapping: Mapped("g") }, - Range { from: 'h', to: 'h', mapping: Mapped("h") }, - Range { from: 'i', to: 'i', mapping: Mapped("i") }, - Range { from: 'j', to: 'j', mapping: Mapped("j") }, - Range { from: 'k', to: 'k', mapping: Mapped("k") }, - Range { from: 'l', to: 'l', mapping: Mapped("l") }, - Range { from: 'm', to: 'm', mapping: Mapped("m") }, - Range { from: 'n', to: 'n', mapping: Mapped("n") }, - Range { from: 'o', to: 'o', mapping: Mapped("o") }, - Range { from: 'p', to: 'p', mapping: Mapped("p") }, - Range { from: 'q', to: 'q', mapping: Mapped("q") }, - Range { from: 'r', to: 'r', mapping: Mapped("r") }, - Range { from: 's', to: 's', mapping: Mapped("s") }, - Range { from: 't', to: 't', mapping: Mapped("t") }, - Range { from: 'u', to: 'u', mapping: Mapped("u") }, - Range { from: 'v', to: 'v', mapping: Mapped("v") }, - Range { from: 'w', to: 'w', mapping: Mapped("w") }, - Range { from: 'x', to: 'x', mapping: Mapped("x") }, - Range { from: 'y', to: 'y', mapping: Mapped("y") }, - Range { from: 'z', to: 'z', mapping: Mapped("z") }, - Range { from: '{', to: '{', mapping: DisallowedStd3Mapped("{") }, - Range { from: '|', to: '|', mapping: DisallowedStd3Mapped("|") }, - Range { from: '}', to: '}', mapping: DisallowedStd3Mapped("}") }, - Range { from: '~', to: '~', mapping: DisallowedStd3Mapped("~") }, - Range { from: '⦅', to: '⦅', mapping: Mapped("⦅") }, - Range { from: '⦆', to: '⦆', mapping: Mapped("⦆") }, - Range { from: '。', to: '。', mapping: Mapped(".") }, - Range { from: '「', to: '「', mapping: Mapped("「") }, - Range { from: '」', to: '」', mapping: Mapped("」") }, - Range { from: '、', to: '、', mapping: Mapped("、") }, - Range { from: '・', to: '・', mapping: Mapped("・") }, - Range { from: 'ヲ', to: 'ヲ', mapping: Mapped("ヲ") }, - Range { from: 'ァ', to: 'ァ', mapping: Mapped("ァ") }, - Range { from: 'ィ', to: 'ィ', mapping: Mapped("ィ") }, - Range { from: 'ゥ', to: 'ゥ', mapping: Mapped("ゥ") }, - Range { from: 'ェ', to: 'ェ', mapping: Mapped("ェ") }, - Range { from: 'ォ', to: 'ォ', mapping: Mapped("ォ") }, - Range { from: 'ャ', to: 'ャ', mapping: Mapped("ャ") }, - Range { from: 'ュ', to: 'ュ', mapping: Mapped("ュ") }, - Range { from: 'ョ', to: 'ョ', mapping: Mapped("ョ") }, - Range { from: 'ッ', to: 'ッ', mapping: Mapped("ッ") }, - Range { from: 'ー', to: 'ー', mapping: Mapped("ー") }, - Range { from: 'ア', to: 'ア', mapping: Mapped("ア") }, - Range { from: 'イ', to: 'イ', mapping: Mapped("イ") }, - Range { from: 'ウ', to: 'ウ', mapping: Mapped("ウ") }, - Range { from: 'エ', to: 'エ', mapping: Mapped("エ") }, - Range { from: 'オ', to: 'オ', mapping: Mapped("オ") }, - Range { from: 'カ', to: 'カ', mapping: Mapped("カ") }, - Range { from: 'キ', to: 'キ', mapping: Mapped("キ") }, - Range { from: 'ク', to: 'ク', mapping: Mapped("ク") }, - Range { from: 'ケ', to: 'ケ', mapping: Mapped("ケ") }, - Range { from: 'コ', to: 'コ', mapping: Mapped("コ") }, - Range { from: 'サ', to: 'サ', mapping: Mapped("サ") }, - Range { from: 'シ', to: 'シ', mapping: Mapped("シ") }, - Range { from: 'ス', to: 'ス', mapping: Mapped("ス") }, - Range { from: 'セ', to: 'セ', mapping: Mapped("セ") }, - Range { from: 'ソ', to: 'ソ', mapping: Mapped("ソ") }, - Range { from: 'タ', to: 'タ', mapping: Mapped("タ") }, - Range { from: 'チ', to: 'チ', mapping: Mapped("チ") }, - Range { from: 'ツ', to: 'ツ', mapping: Mapped("ツ") }, - Range { from: 'テ', to: 'テ', mapping: Mapped("テ") }, - Range { from: 'ト', to: 'ト', mapping: Mapped("ト") }, - Range { from: 'ナ', to: 'ナ', mapping: Mapped("ナ") }, - Range { from: 'ニ', to: 'ニ', mapping: Mapped("ニ") }, - Range { from: 'ヌ', to: 'ヌ', mapping: Mapped("ヌ") }, - Range { from: 'ネ', to: 'ネ', mapping: Mapped("ネ") }, - Range { from: 'ノ', to: 'ノ', mapping: Mapped("ノ") }, - Range { from: 'ハ', to: 'ハ', mapping: Mapped("ハ") }, - Range { from: 'ヒ', to: 'ヒ', mapping: Mapped("ヒ") }, - Range { from: 'フ', to: 'フ', mapping: Mapped("フ") }, - Range { from: 'ヘ', to: 'ヘ', mapping: Mapped("ヘ") }, - Range { from: 'ホ', to: 'ホ', mapping: Mapped("ホ") }, - Range { from: 'マ', to: 'マ', mapping: Mapped("マ") }, - Range { from: 'ミ', to: 'ミ', mapping: Mapped("ミ") }, - Range { from: 'ム', to: 'ム', mapping: Mapped("ム") }, - Range { from: 'メ', to: 'メ', mapping: Mapped("メ") }, - Range { from: 'モ', to: 'モ', mapping: Mapped("モ") }, - Range { from: 'ヤ', to: 'ヤ', mapping: Mapped("ヤ") }, - Range { from: 'ユ', to: 'ユ', mapping: Mapped("ユ") }, - Range { from: 'ヨ', to: 'ヨ', mapping: Mapped("ヨ") }, - Range { from: 'ラ', to: 'ラ', mapping: Mapped("ラ") }, - Range { from: 'リ', to: 'リ', mapping: Mapped("リ") }, - Range { from: 'ル', to: 'ル', mapping: Mapped("ル") }, - Range { from: 'レ', to: 'レ', mapping: Mapped("レ") }, - Range { from: 'ロ', to: 'ロ', mapping: Mapped("ロ") }, - Range { from: 'ワ', to: 'ワ', mapping: Mapped("ワ") }, - Range { from: 'ン', to: 'ン', mapping: Mapped("ン") }, - Range { from: '゙', to: '゙', mapping: Mapped("゙") }, - Range { from: '゚', to: '゚', mapping: Mapped("゚") }, - Range { from: 'ᅠ', to: 'ᅠ', mapping: Disallowed }, - Range { from: 'ᄀ', to: 'ᄀ', mapping: Mapped("ᄀ") }, - Range { from: 'ᄁ', to: 'ᄁ', mapping: Mapped("ᄁ") }, - Range { from: 'ᆪ', to: 'ᆪ', mapping: Mapped("ᆪ") }, - Range { from: 'ᄂ', to: 'ᄂ', mapping: Mapped("ᄂ") }, - Range { from: 'ᆬ', to: 'ᆬ', mapping: Mapped("ᆬ") }, - Range { from: 'ᆭ', to: 'ᆭ', mapping: Mapped("ᆭ") }, - Range { from: 'ᄃ', to: 'ᄃ', mapping: Mapped("ᄃ") }, - Range { from: 'ᄄ', to: 'ᄄ', mapping: Mapped("ᄄ") }, - Range { from: 'ᄅ', to: 'ᄅ', mapping: Mapped("ᄅ") }, - Range { from: 'ᆰ', to: 'ᆰ', mapping: Mapped("ᆰ") }, - Range { from: 'ᆱ', to: 'ᆱ', mapping: Mapped("ᆱ") }, - Range { from: 'ᆲ', to: 'ᆲ', mapping: Mapped("ᆲ") }, - Range { from: 'ᆳ', to: 'ᆳ', mapping: Mapped("ᆳ") }, - Range { from: 'ᆴ', to: 'ᆴ', mapping: Mapped("ᆴ") }, - Range { from: 'ᆵ', to: 'ᆵ', mapping: Mapped("ᆵ") }, - Range { from: 'ᄚ', to: 'ᄚ', mapping: Mapped("ᄚ") }, - Range { from: 'ᄆ', to: 'ᄆ', mapping: Mapped("ᄆ") }, - Range { from: 'ᄇ', to: 'ᄇ', mapping: Mapped("ᄇ") }, - Range { from: 'ᄈ', to: 'ᄈ', mapping: Mapped("ᄈ") }, - Range { from: 'ᄡ', to: 'ᄡ', mapping: Mapped("ᄡ") }, - Range { from: 'ᄉ', to: 'ᄉ', mapping: Mapped("ᄉ") }, - Range { from: 'ᄊ', to: 'ᄊ', mapping: Mapped("ᄊ") }, - Range { from: 'ᄋ', to: 'ᄋ', mapping: Mapped("ᄋ") }, - Range { from: 'ᄌ', to: 'ᄌ', mapping: Mapped("ᄌ") }, - Range { from: 'ᄍ', to: 'ᄍ', mapping: Mapped("ᄍ") }, - Range { from: 'ᄎ', to: 'ᄎ', mapping: Mapped("ᄎ") }, - Range { from: 'ᄏ', to: 'ᄏ', mapping: Mapped("ᄏ") }, - Range { from: 'ᄐ', to: 'ᄐ', mapping: Mapped("ᄐ") }, - Range { from: 'ᄑ', to: 'ᄑ', mapping: Mapped("ᄑ") }, - Range { from: 'ᄒ', to: 'ᄒ', mapping: Mapped("ᄒ") }, - Range { from: '﾿', to: '￁', mapping: Disallowed }, - Range { from: 'ᅡ', to: 'ᅡ', mapping: Mapped("ᅡ") }, - Range { from: 'ᅢ', to: 'ᅢ', mapping: Mapped("ᅢ") }, - Range { from: 'ᅣ', to: 'ᅣ', mapping: Mapped("ᅣ") }, - Range { from: 'ᅤ', to: 'ᅤ', mapping: Mapped("ᅤ") }, - Range { from: 'ᅥ', to: 'ᅥ', mapping: Mapped("ᅥ") }, - Range { from: 'ᅦ', to: 'ᅦ', mapping: Mapped("ᅦ") }, - Range { from: '￈', to: '￉', mapping: Disallowed }, - Range { from: 'ᅧ', to: 'ᅧ', mapping: Mapped("ᅧ") }, - Range { from: 'ᅨ', to: 'ᅨ', mapping: Mapped("ᅨ") }, - Range { from: 'ᅩ', to: 'ᅩ', mapping: Mapped("ᅩ") }, - Range { from: 'ᅪ', to: 'ᅪ', mapping: Mapped("ᅪ") }, - Range { from: 'ᅫ', to: 'ᅫ', mapping: Mapped("ᅫ") }, - Range { from: 'ᅬ', to: 'ᅬ', mapping: Mapped("ᅬ") }, - Range { from: '￐', to: '￑', mapping: Disallowed }, - Range { from: 'ᅭ', to: 'ᅭ', mapping: Mapped("ᅭ") }, - Range { from: 'ᅮ', to: 'ᅮ', mapping: Mapped("ᅮ") }, - Range { from: 'ᅯ', to: 'ᅯ', mapping: Mapped("ᅯ") }, - Range { from: 'ᅰ', to: 'ᅰ', mapping: Mapped("ᅰ") }, - Range { from: 'ᅱ', to: 'ᅱ', mapping: Mapped("ᅱ") }, - Range { from: 'ᅲ', to: 'ᅲ', mapping: Mapped("ᅲ") }, - Range { from: '￘', to: '￙', mapping: Disallowed }, - Range { from: 'ᅳ', to: 'ᅳ', mapping: Mapped("ᅳ") }, - Range { from: 'ᅴ', to: 'ᅴ', mapping: Mapped("ᅴ") }, - Range { from: 'ᅵ', to: 'ᅵ', mapping: Mapped("ᅵ") }, - Range { from: '￝', to: '￟', mapping: Disallowed }, - Range { from: '¢', to: '¢', mapping: Mapped("¢") }, - Range { from: '£', to: '£', mapping: Mapped("£") }, - Range { from: '¬', to: '¬', mapping: Mapped("¬") }, - Range { from: ' ̄', to: ' ̄', mapping: DisallowedStd3Mapped(" ̄") }, - Range { from: '¦', to: '¦', mapping: Mapped("¦") }, - Range { from: '¥', to: '¥', mapping: Mapped("¥") }, - Range { from: '₩', to: '₩', mapping: Mapped("₩") }, - Range { from: '￧', to: '￧', mapping: Disallowed }, - Range { from: '│', to: '│', mapping: Mapped("│") }, - Range { from: '←', to: '←', mapping: Mapped("←") }, - Range { from: '↑', to: '↑', mapping: Mapped("↑") }, - Range { from: '→', to: '→', mapping: Mapped("→") }, - Range { from: '↓', to: '↓', mapping: Mapped("↓") }, - Range { from: '■', to: '■', mapping: Mapped("■") }, - Range { from: '○', to: '○', mapping: Mapped("○") }, - Range { from: '￯', to: '￸', mapping: Disallowed }, - Range { from: '', to: '', mapping: Disallowed }, - Range { from: '', to: '', mapping: Disallowed }, - Range { from: '�', to: '�', mapping: Disallowed }, - Range { from: '￾', to: '￿', mapping: Disallowed }, - Range { from: '𐀀', to: '𐀋', mapping: Valid }, - Range { from: '𐀌', to: '𐀌', mapping: Disallowed }, - Range { from: '𐀍', to: '𐀦', mapping: Valid }, - Range { from: '𐀧', to: '𐀧', mapping: Disallowed }, - Range { from: '𐀨', to: '𐀺', mapping: Valid }, - Range { from: '𐀻', to: '𐀻', mapping: Disallowed }, - Range { from: '𐀼', to: '𐀽', mapping: Valid }, - Range { from: '𐀾', to: '𐀾', mapping: Disallowed }, - Range { from: '𐀿', to: '𐁍', mapping: Valid }, - Range { from: '𐁎', to: '𐁏', mapping: Disallowed }, - Range { from: '𐁐', to: '𐁝', mapping: Valid }, - Range { from: '𐁞', to: '𐁿', mapping: Disallowed }, - Range { from: '𐂀', to: '𐃺', mapping: Valid }, - Range { from: '𐃻', to: '𐃿', mapping: Disallowed }, - Range { from: '𐄀', to: '𐄂', mapping: Valid }, - Range { from: '𐄃', to: '𐄆', mapping: Disallowed }, - Range { from: '𐄇', to: '𐄳', mapping: Valid }, - Range { from: '𐄴', to: '𐄶', mapping: Disallowed }, - Range { from: '𐄷', to: '𐄿', mapping: Valid }, - Range { from: '𐅀', to: '𐆊', mapping: Valid }, - Range { from: '𐆋', to: '𐆌', mapping: Valid }, - Range { from: '𐆍', to: '𐆏', mapping: Disallowed }, - Range { from: '𐆐', to: '𐆛', mapping: Valid }, - Range { from: '𐆜', to: '𐆟', mapping: Disallowed }, - Range { from: '𐆠', to: '𐆠', mapping: Valid }, - Range { from: '𐆡', to: '𐇏', mapping: Disallowed }, - Range { from: '𐇐', to: '𐇼', mapping: Valid }, - Range { from: '𐇽', to: '𐇽', mapping: Valid }, - Range { from: '𐇾', to: '𐉿', mapping: Disallowed }, - Range { from: '𐊀', to: '𐊜', mapping: Valid }, - Range { from: '𐊝', to: '𐊟', mapping: Disallowed }, - Range { from: '𐊠', to: '𐋐', mapping: Valid }, - Range { from: '𐋑', to: '𐋟', mapping: Disallowed }, - Range { from: '𐋠', to: '𐋠', mapping: Valid }, - Range { from: '𐋡', to: '𐋻', mapping: Valid }, - Range { from: '𐋼', to: '𐋿', mapping: Disallowed }, - Range { from: '𐌀', to: '𐌞', mapping: Valid }, - Range { from: '𐌟', to: '𐌟', mapping: Valid }, - Range { from: '𐌠', to: '𐌣', mapping: Valid }, - Range { from: '𐌤', to: '𐌯', mapping: Disallowed }, - Range { from: '𐌰', to: '𐍀', mapping: Valid }, - Range { from: '𐍁', to: '𐍁', mapping: Valid }, - Range { from: '𐍂', to: '𐍉', mapping: Valid }, - Range { from: '𐍊', to: '𐍊', mapping: Valid }, - Range { from: '𐍋', to: '𐍏', mapping: Disallowed }, - Range { from: '𐍐', to: '𐍺', mapping: Valid }, - Range { from: '𐍻', to: '𐍿', mapping: Disallowed }, - Range { from: '𐎀', to: '𐎝', mapping: Valid }, - Range { from: '𐎞', to: '𐎞', mapping: Disallowed }, - Range { from: '𐎟', to: '𐎟', mapping: Valid }, - Range { from: '𐎠', to: '𐏃', mapping: Valid }, - Range { from: '𐏄', to: '𐏇', mapping: Disallowed }, - Range { from: '𐏈', to: '𐏏', mapping: Valid }, - Range { from: '𐏐', to: '𐏕', mapping: Valid }, - Range { from: '𐏖', to: '𐏿', mapping: Disallowed }, - Range { from: '𐐀', to: '𐐀', mapping: Mapped("𐐨") }, - Range { from: '𐐁', to: '𐐁', mapping: Mapped("𐐩") }, - Range { from: '𐐂', to: '𐐂', mapping: Mapped("𐐪") }, - Range { from: '𐐃', to: '𐐃', mapping: Mapped("𐐫") }, - Range { from: '𐐄', to: '𐐄', mapping: Mapped("𐐬") }, - Range { from: '𐐅', to: '𐐅', mapping: Mapped("𐐭") }, - Range { from: '𐐆', to: '𐐆', mapping: Mapped("𐐮") }, - Range { from: '𐐇', to: '𐐇', mapping: Mapped("𐐯") }, - Range { from: '𐐈', to: '𐐈', mapping: Mapped("𐐰") }, - Range { from: '𐐉', to: '𐐉', mapping: Mapped("𐐱") }, - Range { from: '𐐊', to: '𐐊', mapping: Mapped("𐐲") }, - Range { from: '𐐋', to: '𐐋', mapping: Mapped("𐐳") }, - Range { from: '𐐌', to: '𐐌', mapping: Mapped("𐐴") }, - Range { from: '𐐍', to: '𐐍', mapping: Mapped("𐐵") }, - Range { from: '𐐎', to: '𐐎', mapping: Mapped("𐐶") }, - Range { from: '𐐏', to: '𐐏', mapping: Mapped("𐐷") }, - Range { from: '𐐐', to: '𐐐', mapping: Mapped("𐐸") }, - Range { from: '𐐑', to: '𐐑', mapping: Mapped("𐐹") }, - Range { from: '𐐒', to: '𐐒', mapping: Mapped("𐐺") }, - Range { from: '𐐓', to: '𐐓', mapping: Mapped("𐐻") }, - Range { from: '𐐔', to: '𐐔', mapping: Mapped("𐐼") }, - Range { from: '𐐕', to: '𐐕', mapping: Mapped("𐐽") }, - Range { from: '𐐖', to: '𐐖', mapping: Mapped("𐐾") }, - Range { from: '𐐗', to: '𐐗', mapping: Mapped("𐐿") }, - Range { from: '𐐘', to: '𐐘', mapping: Mapped("𐑀") }, - Range { from: '𐐙', to: '𐐙', mapping: Mapped("𐑁") }, - Range { from: '𐐚', to: '𐐚', mapping: Mapped("𐑂") }, - Range { from: '𐐛', to: '𐐛', mapping: Mapped("𐑃") }, - Range { from: '𐐜', to: '𐐜', mapping: Mapped("𐑄") }, - Range { from: '𐐝', to: '𐐝', mapping: Mapped("𐑅") }, - Range { from: '𐐞', to: '𐐞', mapping: Mapped("𐑆") }, - Range { from: '𐐟', to: '𐐟', mapping: Mapped("𐑇") }, - Range { from: '𐐠', to: '𐐠', mapping: Mapped("𐑈") }, - Range { from: '𐐡', to: '𐐡', mapping: Mapped("𐑉") }, - Range { from: '𐐢', to: '𐐢', mapping: Mapped("𐑊") }, - Range { from: '𐐣', to: '𐐣', mapping: Mapped("𐑋") }, - Range { from: '𐐤', to: '𐐤', mapping: Mapped("𐑌") }, - Range { from: '𐐥', to: '𐐥', mapping: Mapped("𐑍") }, - Range { from: '𐐦', to: '𐐦', mapping: Mapped("𐑎") }, - Range { from: '𐐧', to: '𐐧', mapping: Mapped("𐑏") }, - Range { from: '𐐨', to: '𐑍', mapping: Valid }, - Range { from: '𐑎', to: '𐒝', mapping: Valid }, - Range { from: '𐒞', to: '𐒟', mapping: Disallowed }, - Range { from: '𐒠', to: '𐒩', mapping: Valid }, - Range { from: '𐒪', to: '𐓿', mapping: Disallowed }, - Range { from: '𐔀', to: '𐔧', mapping: Valid }, - Range { from: '𐔨', to: '𐔯', mapping: Disallowed }, - Range { from: '𐔰', to: '𐕣', mapping: Valid }, - Range { from: '𐕤', to: '𐕮', mapping: Disallowed }, - Range { from: '𐕯', to: '𐕯', mapping: Valid }, - Range { from: '𐕰', to: '𐗿', mapping: Disallowed }, - Range { from: '𐘀', to: '𐜶', mapping: Valid }, - Range { from: '𐜷', to: '𐜿', mapping: Disallowed }, - Range { from: '𐝀', to: '𐝕', mapping: Valid }, - Range { from: '𐝖', to: '𐝟', mapping: Disallowed }, - Range { from: '𐝠', to: '𐝧', mapping: Valid }, - Range { from: '𐝨', to: '𐟿', mapping: Disallowed }, - Range { from: '𐠀', to: '𐠅', mapping: Valid }, - Range { from: '𐠆', to: '𐠇', mapping: Disallowed }, - Range { from: '𐠈', to: '𐠈', mapping: Valid }, - Range { from: '𐠉', to: '𐠉', mapping: Disallowed }, - Range { from: '𐠊', to: '𐠵', mapping: Valid }, - Range { from: '𐠶', to: '𐠶', mapping: Disallowed }, - Range { from: '𐠷', to: '𐠸', mapping: Valid }, - Range { from: '𐠹', to: '𐠻', mapping: Disallowed }, - Range { from: '𐠼', to: '𐠼', mapping: Valid }, - Range { from: '𐠽', to: '𐠾', mapping: Disallowed }, - Range { from: '𐠿', to: '𐠿', mapping: Valid }, - Range { from: '𐡀', to: '𐡕', mapping: Valid }, - Range { from: '𐡖', to: '𐡖', mapping: Disallowed }, - Range { from: '𐡗', to: '𐡟', mapping: Valid }, - Range { from: '𐡠', to: '𐡶', mapping: Valid }, - Range { from: '𐡷', to: '𐡿', mapping: Valid }, - Range { from: '𐢀', to: '𐢞', mapping: Valid }, - Range { from: '𐢟', to: '𐢦', mapping: Disallowed }, - Range { from: '𐢧', to: '𐢯', mapping: Valid }, - Range { from: '𐢰', to: '𐣟', mapping: Disallowed }, - Range { from: '𐣠', to: '𐣲', mapping: Valid }, - Range { from: '𐣳', to: '𐣳', mapping: Disallowed }, - Range { from: '𐣴', to: '𐣵', mapping: Valid }, - Range { from: '𐣶', to: '𐣺', mapping: Disallowed }, - Range { from: '𐣻', to: '𐣿', mapping: Valid }, - Range { from: '𐤀', to: '𐤕', mapping: Valid }, - Range { from: '𐤖', to: '𐤙', mapping: Valid }, - Range { from: '𐤚', to: '𐤛', mapping: Valid }, - Range { from: '𐤜', to: '𐤞', mapping: Disallowed }, - Range { from: '𐤟', to: '𐤟', mapping: Valid }, - Range { from: '𐤠', to: '𐤹', mapping: Valid }, - Range { from: '𐤺', to: '𐤾', mapping: Disallowed }, - Range { from: '𐤿', to: '𐤿', mapping: Valid }, - Range { from: '𐥀', to: '𐥿', mapping: Disallowed }, - Range { from: '𐦀', to: '𐦷', mapping: Valid }, - Range { from: '𐦸', to: '𐦻', mapping: Disallowed }, - Range { from: '𐦼', to: '𐦽', mapping: Valid }, - Range { from: '𐦾', to: '𐦿', mapping: Valid }, - Range { from: '𐧀', to: '𐧏', mapping: Valid }, - Range { from: '𐧐', to: '𐧑', mapping: Disallowed }, - Range { from: '𐧒', to: '𐧿', mapping: Valid }, - Range { from: '𐨀', to: '𐨃', mapping: Valid }, - Range { from: '𐨄', to: '𐨄', mapping: Disallowed }, - Range { from: '𐨅', to: '𐨆', mapping: Valid }, - Range { from: '𐨇', to: '𐨋', mapping: Disallowed }, - Range { from: '𐨌', to: '𐨓', mapping: Valid }, - Range { from: '𐨔', to: '𐨔', mapping: Disallowed }, - Range { from: '𐨕', to: '𐨗', mapping: Valid }, - Range { from: '𐨘', to: '𐨘', mapping: Disallowed }, - Range { from: '𐨙', to: '𐨳', mapping: Valid }, - Range { from: '𐨴', to: '𐨷', mapping: Disallowed }, - Range { from: '𐨸', to: '𐨺', mapping: Valid }, - Range { from: '𐨻', to: '𐨾', mapping: Disallowed }, - Range { from: '𐨿', to: '𐨿', mapping: Valid }, - Range { from: '𐩀', to: '𐩇', mapping: Valid }, - Range { from: '𐩈', to: '𐩏', mapping: Disallowed }, - Range { from: '𐩐', to: '𐩘', mapping: Valid }, - Range { from: '𐩙', to: '𐩟', mapping: Disallowed }, - Range { from: '𐩠', to: '𐩼', mapping: Valid }, - Range { from: '𐩽', to: '𐩿', mapping: Valid }, - Range { from: '𐪀', to: '𐪜', mapping: Valid }, - Range { from: '𐪝', to: '𐪟', mapping: Valid }, - Range { from: '𐪠', to: '𐪿', mapping: Disallowed }, - Range { from: '𐫀', to: '𐫇', mapping: Valid }, - Range { from: '𐫈', to: '𐫈', mapping: Valid }, - Range { from: '𐫉', to: '𐫦', mapping: Valid }, - Range { from: '𐫧', to: '𐫪', mapping: Disallowed }, - Range { from: '𐫫', to: '𐫶', mapping: Valid }, - Range { from: '𐫷', to: '𐫿', mapping: Disallowed }, - Range { from: '𐬀', to: '𐬵', mapping: Valid }, - Range { from: '𐬶', to: '𐬸', mapping: Disallowed }, - Range { from: '𐬹', to: '𐬿', mapping: Valid }, - Range { from: '𐭀', to: '𐭕', mapping: Valid }, - Range { from: '𐭖', to: '𐭗', mapping: Disallowed }, - Range { from: '𐭘', to: '𐭟', mapping: Valid }, - Range { from: '𐭠', to: '𐭲', mapping: Valid }, - Range { from: '𐭳', to: '𐭷', mapping: Disallowed }, - Range { from: '𐭸', to: '𐭿', mapping: Valid }, - Range { from: '𐮀', to: '𐮑', mapping: Valid }, - Range { from: '𐮒', to: '𐮘', mapping: Disallowed }, - Range { from: '𐮙', to: '𐮜', mapping: Valid }, - Range { from: '𐮝', to: '𐮨', mapping: Disallowed }, - Range { from: '𐮩', to: '𐮯', mapping: Valid }, - Range { from: '𐮰', to: '𐯿', mapping: Disallowed }, - Range { from: '𐰀', to: '𐱈', mapping: Valid }, - Range { from: '𐱉', to: '𐱿', mapping: Disallowed }, - Range { from: '𐲀', to: '𐲀', mapping: Mapped("𐳀") }, - Range { from: '𐲁', to: '𐲁', mapping: Mapped("𐳁") }, - Range { from: '𐲂', to: '𐲂', mapping: Mapped("𐳂") }, - Range { from: '𐲃', to: '𐲃', mapping: Mapped("𐳃") }, - Range { from: '𐲄', to: '𐲄', mapping: Mapped("𐳄") }, - Range { from: '𐲅', to: '𐲅', mapping: Mapped("𐳅") }, - Range { from: '𐲆', to: '𐲆', mapping: Mapped("𐳆") }, - Range { from: '𐲇', to: '𐲇', mapping: Mapped("𐳇") }, - Range { from: '𐲈', to: '𐲈', mapping: Mapped("𐳈") }, - Range { from: '𐲉', to: '𐲉', mapping: Mapped("𐳉") }, - Range { from: '𐲊', to: '𐲊', mapping: Mapped("𐳊") }, - Range { from: '𐲋', to: '𐲋', mapping: Mapped("𐳋") }, - Range { from: '𐲌', to: '𐲌', mapping: Mapped("𐳌") }, - Range { from: '𐲍', to: '𐲍', mapping: Mapped("𐳍") }, - Range { from: '𐲎', to: '𐲎', mapping: Mapped("𐳎") }, - Range { from: '𐲏', to: '𐲏', mapping: Mapped("𐳏") }, - Range { from: '𐲐', to: '𐲐', mapping: Mapped("𐳐") }, - Range { from: '𐲑', to: '𐲑', mapping: Mapped("𐳑") }, - Range { from: '𐲒', to: '𐲒', mapping: Mapped("𐳒") }, - Range { from: '𐲓', to: '𐲓', mapping: Mapped("𐳓") }, - Range { from: '𐲔', to: '𐲔', mapping: Mapped("𐳔") }, - Range { from: '𐲕', to: '𐲕', mapping: Mapped("𐳕") }, - Range { from: '𐲖', to: '𐲖', mapping: Mapped("𐳖") }, - Range { from: '𐲗', to: '𐲗', mapping: Mapped("𐳗") }, - Range { from: '𐲘', to: '𐲘', mapping: Mapped("𐳘") }, - Range { from: '𐲙', to: '𐲙', mapping: Mapped("𐳙") }, - Range { from: '𐲚', to: '𐲚', mapping: Mapped("𐳚") }, - Range { from: '𐲛', to: '𐲛', mapping: Mapped("𐳛") }, - Range { from: '𐲜', to: '𐲜', mapping: Mapped("𐳜") }, - Range { from: '𐲝', to: '𐲝', mapping: Mapped("𐳝") }, - Range { from: '𐲞', to: '𐲞', mapping: Mapped("𐳞") }, - Range { from: '𐲟', to: '𐲟', mapping: Mapped("𐳟") }, - Range { from: '𐲠', to: '𐲠', mapping: Mapped("𐳠") }, - Range { from: '𐲡', to: '𐲡', mapping: Mapped("𐳡") }, - Range { from: '𐲢', to: '𐲢', mapping: Mapped("𐳢") }, - Range { from: '𐲣', to: '𐲣', mapping: Mapped("𐳣") }, - Range { from: '𐲤', to: '𐲤', mapping: Mapped("𐳤") }, - Range { from: '𐲥', to: '𐲥', mapping: Mapped("𐳥") }, - Range { from: '𐲦', to: '𐲦', mapping: Mapped("𐳦") }, - Range { from: '𐲧', to: '𐲧', mapping: Mapped("𐳧") }, - Range { from: '𐲨', to: '𐲨', mapping: Mapped("𐳨") }, - Range { from: '𐲩', to: '𐲩', mapping: Mapped("𐳩") }, - Range { from: '𐲪', to: '𐲪', mapping: Mapped("𐳪") }, - Range { from: '𐲫', to: '𐲫', mapping: Mapped("𐳫") }, - Range { from: '𐲬', to: '𐲬', mapping: Mapped("𐳬") }, - Range { from: '𐲭', to: '𐲭', mapping: Mapped("𐳭") }, - Range { from: '𐲮', to: '𐲮', mapping: Mapped("𐳮") }, - Range { from: '𐲯', to: '𐲯', mapping: Mapped("𐳯") }, - Range { from: '𐲰', to: '𐲰', mapping: Mapped("𐳰") }, - Range { from: '𐲱', to: '𐲱', mapping: Mapped("𐳱") }, - Range { from: '𐲲', to: '𐲲', mapping: Mapped("𐳲") }, - Range { from: '𐲳', to: '𐲿', mapping: Disallowed }, - Range { from: '𐳀', to: '𐳲', mapping: Valid }, - Range { from: '𐳳', to: '𐳹', mapping: Disallowed }, - Range { from: '𐳺', to: '𐳿', mapping: Valid }, - Range { from: '𐴀', to: '𐹟', mapping: Disallowed }, - Range { from: '𐹠', to: '𐹾', mapping: Valid }, - Range { from: '𐹿', to: '𐿿', mapping: Disallowed }, - Range { from: '𑀀', to: '𑁆', mapping: Valid }, - Range { from: '𑁇', to: '𑁍', mapping: Valid }, - Range { from: '𑁎', to: '𑁑', mapping: Disallowed }, - Range { from: '𑁒', to: '𑁥', mapping: Valid }, - Range { from: '𑁦', to: '𑁯', mapping: Valid }, - Range { from: '𑁰', to: '𑁾', mapping: Disallowed }, - Range { from: '𑁿', to: '𑁿', mapping: Valid }, - Range { from: '𑂀', to: '𑂺', mapping: Valid }, - Range { from: '𑂻', to: '𑂼', mapping: Valid }, - Range { from: '𑂽', to: '𑂽', mapping: Disallowed }, - Range { from: '𑂾', to: '𑃁', mapping: Valid }, - Range { from: '𑃂', to: '𑃏', mapping: Disallowed }, - Range { from: '𑃐', to: '𑃨', mapping: Valid }, - Range { from: '𑃩', to: '𑃯', mapping: Disallowed }, - Range { from: '𑃰', to: '𑃹', mapping: Valid }, - Range { from: '𑃺', to: '𑃿', mapping: Disallowed }, - Range { from: '𑄀', to: '𑄴', mapping: Valid }, - Range { from: '𑄵', to: '𑄵', mapping: Disallowed }, - Range { from: '𑄶', to: '𑄿', mapping: Valid }, - Range { from: '𑅀', to: '𑅃', mapping: Valid }, - Range { from: '𑅄', to: '𑅏', mapping: Disallowed }, - Range { from: '𑅐', to: '𑅳', mapping: Valid }, - Range { from: '𑅴', to: '𑅵', mapping: Valid }, - Range { from: '𑅶', to: '𑅶', mapping: Valid }, - Range { from: '𑅷', to: '𑅿', mapping: Disallowed }, - Range { from: '𑆀', to: '𑇄', mapping: Valid }, - Range { from: '𑇅', to: '𑇈', mapping: Valid }, - Range { from: '𑇉', to: '𑇉', mapping: Valid }, - Range { from: '𑇊', to: '𑇌', mapping: Valid }, - Range { from: '𑇍', to: '𑇍', mapping: Valid }, - Range { from: '𑇎', to: '𑇏', mapping: Disallowed }, - Range { from: '𑇐', to: '𑇙', mapping: Valid }, - Range { from: '𑇚', to: '𑇚', mapping: Valid }, - Range { from: '𑇛', to: '𑇛', mapping: Valid }, - Range { from: '𑇜', to: '𑇜', mapping: Valid }, - Range { from: '𑇝', to: '𑇟', mapping: Valid }, - Range { from: '𑇠', to: '𑇠', mapping: Disallowed }, - Range { from: '𑇡', to: '𑇴', mapping: Valid }, - Range { from: '𑇵', to: '𑇿', mapping: Disallowed }, - Range { from: '𑈀', to: '𑈑', mapping: Valid }, - Range { from: '𑈒', to: '𑈒', mapping: Disallowed }, - Range { from: '𑈓', to: '𑈷', mapping: Valid }, - Range { from: '𑈸', to: '𑈽', mapping: Valid }, - Range { from: '𑈾', to: '𑉿', mapping: Disallowed }, - Range { from: '𑊀', to: '𑊆', mapping: Valid }, - Range { from: '𑊇', to: '𑊇', mapping: Disallowed }, - Range { from: '𑊈', to: '𑊈', mapping: Valid }, - Range { from: '𑊉', to: '𑊉', mapping: Disallowed }, - Range { from: '𑊊', to: '𑊍', mapping: Valid }, - Range { from: '𑊎', to: '𑊎', mapping: Disallowed }, - Range { from: '𑊏', to: '𑊝', mapping: Valid }, - Range { from: '𑊞', to: '𑊞', mapping: Disallowed }, - Range { from: '𑊟', to: '𑊨', mapping: Valid }, - Range { from: '𑊩', to: '𑊩', mapping: Valid }, - Range { from: '𑊪', to: '𑊯', mapping: Disallowed }, - Range { from: '𑊰', to: '𑋪', mapping: Valid }, - Range { from: '𑋫', to: '𑋯', mapping: Disallowed }, - Range { from: '𑋰', to: '𑋹', mapping: Valid }, - Range { from: '𑋺', to: '𑋿', mapping: Disallowed }, - Range { from: '𑌀', to: '𑌀', mapping: Valid }, - Range { from: '𑌁', to: '𑌃', mapping: Valid }, - Range { from: '𑌄', to: '𑌄', mapping: Disallowed }, - Range { from: '𑌅', to: '𑌌', mapping: Valid }, - Range { from: '𑌍', to: '𑌎', mapping: Disallowed }, - Range { from: '𑌏', to: '𑌐', mapping: Valid }, - Range { from: '𑌑', to: '𑌒', mapping: Disallowed }, - Range { from: '𑌓', to: '𑌨', mapping: Valid }, - Range { from: '𑌩', to: '𑌩', mapping: Disallowed }, - Range { from: '𑌪', to: '𑌰', mapping: Valid }, - Range { from: '𑌱', to: '𑌱', mapping: Disallowed }, - Range { from: '𑌲', to: '𑌳', mapping: Valid }, - Range { from: '𑌴', to: '𑌴', mapping: Disallowed }, - Range { from: '𑌵', to: '𑌹', mapping: Valid }, - Range { from: '𑌺', to: '𑌻', mapping: Disallowed }, - Range { from: '𑌼', to: '𑍄', mapping: Valid }, - Range { from: '𑍅', to: '𑍆', mapping: Disallowed }, - Range { from: '𑍇', to: '𑍈', mapping: Valid }, - Range { from: '𑍉', to: '𑍊', mapping: Disallowed }, - Range { from: '𑍋', to: '𑍍', mapping: Valid }, - Range { from: '𑍎', to: '𑍏', mapping: Disallowed }, - Range { from: '𑍐', to: '𑍐', mapping: Valid }, - Range { from: '𑍑', to: '𑍖', mapping: Disallowed }, - Range { from: '𑍗', to: '𑍗', mapping: Valid }, - Range { from: '𑍘', to: '𑍜', mapping: Disallowed }, - Range { from: '𑍝', to: '𑍣', mapping: Valid }, - Range { from: '𑍤', to: '𑍥', mapping: Disallowed }, - Range { from: '𑍦', to: '𑍬', mapping: Valid }, - Range { from: '𑍭', to: '𑍯', mapping: Disallowed }, - Range { from: '𑍰', to: '𑍴', mapping: Valid }, - Range { from: '𑍵', to: '𑑿', mapping: Disallowed }, - Range { from: '𑒀', to: '𑓅', mapping: Valid }, - Range { from: '𑓆', to: '𑓆', mapping: Valid }, - Range { from: '𑓇', to: '𑓇', mapping: Valid }, - Range { from: '𑓈', to: '𑓏', mapping: Disallowed }, - Range { from: '𑓐', to: '𑓙', mapping: Valid }, - Range { from: '𑓚', to: '𑕿', mapping: Disallowed }, - Range { from: '𑖀', to: '𑖵', mapping: Valid }, - Range { from: '𑖶', to: '𑖷', mapping: Disallowed }, - Range { from: '𑖸', to: '𑗀', mapping: Valid }, - Range { from: '𑗁', to: '𑗉', mapping: Valid }, - Range { from: '𑗊', to: '𑗗', mapping: Valid }, - Range { from: '𑗘', to: '𑗝', mapping: Valid }, - Range { from: '𑗞', to: '𑗿', mapping: Disallowed }, - Range { from: '𑘀', to: '𑙀', mapping: Valid }, - Range { from: '𑙁', to: '𑙃', mapping: Valid }, - Range { from: '𑙄', to: '𑙄', mapping: Valid }, - Range { from: '𑙅', to: '𑙏', mapping: Disallowed }, - Range { from: '𑙐', to: '𑙙', mapping: Valid }, - Range { from: '𑙚', to: '𑙿', mapping: Disallowed }, - Range { from: '𑚀', to: '𑚷', mapping: Valid }, - Range { from: '𑚸', to: '𑚿', mapping: Disallowed }, - Range { from: '𑛀', to: '𑛉', mapping: Valid }, - Range { from: '𑛊', to: '𑛿', mapping: Disallowed }, - Range { from: '𑜀', to: '𑜙', mapping: Valid }, - Range { from: '𑜚', to: '𑜜', mapping: Disallowed }, - Range { from: '𑜝', to: '𑜫', mapping: Valid }, - Range { from: '𑜬', to: '𑜯', mapping: Disallowed }, - Range { from: '𑜰', to: '𑜹', mapping: Valid }, - Range { from: '𑜺', to: '𑜿', mapping: Valid }, - Range { from: '𑝀', to: '𑢟', mapping: Disallowed }, - Range { from: '𑢠', to: '𑢠', mapping: Mapped("𑣀") }, - Range { from: '𑢡', to: '𑢡', mapping: Mapped("𑣁") }, - Range { from: '𑢢', to: '𑢢', mapping: Mapped("𑣂") }, - Range { from: '𑢣', to: '𑢣', mapping: Mapped("𑣃") }, - Range { from: '𑢤', to: '𑢤', mapping: Mapped("𑣄") }, - Range { from: '𑢥', to: '𑢥', mapping: Mapped("𑣅") }, - Range { from: '𑢦', to: '𑢦', mapping: Mapped("𑣆") }, - Range { from: '𑢧', to: '𑢧', mapping: Mapped("𑣇") }, - Range { from: '𑢨', to: '𑢨', mapping: Mapped("𑣈") }, - Range { from: '𑢩', to: '𑢩', mapping: Mapped("𑣉") }, - Range { from: '𑢪', to: '𑢪', mapping: Mapped("𑣊") }, - Range { from: '𑢫', to: '𑢫', mapping: Mapped("𑣋") }, - Range { from: '𑢬', to: '𑢬', mapping: Mapped("𑣌") }, - Range { from: '𑢭', to: '𑢭', mapping: Mapped("𑣍") }, - Range { from: '𑢮', to: '𑢮', mapping: Mapped("𑣎") }, - Range { from: '𑢯', to: '𑢯', mapping: Mapped("𑣏") }, - Range { from: '𑢰', to: '𑢰', mapping: Mapped("𑣐") }, - Range { from: '𑢱', to: '𑢱', mapping: Mapped("𑣑") }, - Range { from: '𑢲', to: '𑢲', mapping: Mapped("𑣒") }, - Range { from: '𑢳', to: '𑢳', mapping: Mapped("𑣓") }, - Range { from: '𑢴', to: '𑢴', mapping: Mapped("𑣔") }, - Range { from: '𑢵', to: '𑢵', mapping: Mapped("𑣕") }, - Range { from: '𑢶', to: '𑢶', mapping: Mapped("𑣖") }, - Range { from: '𑢷', to: '𑢷', mapping: Mapped("𑣗") }, - Range { from: '𑢸', to: '𑢸', mapping: Mapped("𑣘") }, - Range { from: '𑢹', to: '𑢹', mapping: Mapped("𑣙") }, - Range { from: '𑢺', to: '𑢺', mapping: Mapped("𑣚") }, - Range { from: '𑢻', to: '𑢻', mapping: Mapped("𑣛") }, - Range { from: '𑢼', to: '𑢼', mapping: Mapped("𑣜") }, - Range { from: '𑢽', to: '𑢽', mapping: Mapped("𑣝") }, - Range { from: '𑢾', to: '𑢾', mapping: Mapped("𑣞") }, - Range { from: '𑢿', to: '𑢿', mapping: Mapped("𑣟") }, - Range { from: '𑣀', to: '𑣩', mapping: Valid }, - Range { from: '𑣪', to: '𑣲', mapping: Valid }, - Range { from: '𑣳', to: '𑣾', mapping: Disallowed }, - Range { from: '𑣿', to: '𑣿', mapping: Valid }, - Range { from: '𑤀', to: '𑪿', mapping: Disallowed }, - Range { from: '𑫀', to: '𑫸', mapping: Valid }, - Range { from: '𑫹', to: '𑿿', mapping: Disallowed }, - Range { from: '𒀀', to: '𒍮', mapping: Valid }, - Range { from: '𒍯', to: '𒎘', mapping: Valid }, - Range { from: '𒎙', to: '𒎙', mapping: Valid }, - Range { from: '𒎚', to: '𒏿', mapping: Disallowed }, - Range { from: '𒐀', to: '𒑢', mapping: Valid }, - Range { from: '𒑣', to: '𒑮', mapping: Valid }, - Range { from: '𒑯', to: '𒑯', mapping: Disallowed }, - Range { from: '𒑰', to: '𒑳', mapping: Valid }, - Range { from: '𒑴', to: '𒑴', mapping: Valid }, - Range { from: '𒑵', to: '𒑿', mapping: Disallowed }, - Range { from: '𒒀', to: '𒕃', mapping: Valid }, - Range { from: '𒕄', to: '𒿿', mapping: Disallowed }, - Range { from: '𓀀', to: '𓐮', mapping: Valid }, - Range { from: '𓐯', to: '𔏿', mapping: Disallowed }, - Range { from: '𔐀', to: '𔙆', mapping: Valid }, - Range { from: '𔙇', to: '𖟿', mapping: Disallowed }, - Range { from: '𖠀', to: '𖨸', mapping: Valid }, - Range { from: '𖨹', to: '𖨿', mapping: Disallowed }, - Range { from: '𖩀', to: '𖩞', mapping: Valid }, - Range { from: '𖩟', to: '𖩟', mapping: Disallowed }, - Range { from: '𖩠', to: '𖩩', mapping: Valid }, - Range { from: '𖩪', to: '𖩭', mapping: Disallowed }, - Range { from: '𖩮', to: '𖩯', mapping: Valid }, - Range { from: '𖩰', to: '𖫏', mapping: Disallowed }, - Range { from: '𖫐', to: '𖫭', mapping: Valid }, - Range { from: '𖫮', to: '𖫯', mapping: Disallowed }, - Range { from: '𖫰', to: '𖫴', mapping: Valid }, - Range { from: '𖫵', to: '𖫵', mapping: Valid }, - Range { from: '𖫶', to: '𖫿', mapping: Disallowed }, - Range { from: '𖬀', to: '𖬶', mapping: Valid }, - Range { from: '𖬷', to: '𖬿', mapping: Valid }, - Range { from: '𖭀', to: '𖭃', mapping: Valid }, - Range { from: '𖭄', to: '𖭅', mapping: Valid }, - Range { from: '𖭆', to: '𖭏', mapping: Disallowed }, - Range { from: '𖭐', to: '𖭙', mapping: Valid }, - Range { from: '𖭚', to: '𖭚', mapping: Disallowed }, - Range { from: '𖭛', to: '𖭡', mapping: Valid }, - Range { from: '𖭢', to: '𖭢', mapping: Disallowed }, - Range { from: '𖭣', to: '𖭷', mapping: Valid }, - Range { from: '𖭸', to: '𖭼', mapping: Disallowed }, - Range { from: '𖭽', to: '𖮏', mapping: Valid }, - Range { from: '𖮐', to: '𖻿', mapping: Disallowed }, - Range { from: '𖼀', to: '𖽄', mapping: Valid }, - Range { from: '𖽅', to: '𖽏', mapping: Disallowed }, - Range { from: '𖽐', to: '𖽾', mapping: Valid }, - Range { from: '𖽿', to: '𖾎', mapping: Disallowed }, - Range { from: '𖾏', to: '𖾟', mapping: Valid }, - Range { from: '𖾠', to: '𚿿', mapping: Disallowed }, - Range { from: '𛀀', to: '𛀁', mapping: Valid }, - Range { from: '𛀂', to: '𛯿', mapping: Disallowed }, - Range { from: '𛰀', to: '𛱪', mapping: Valid }, - Range { from: '𛱫', to: '𛱯', mapping: Disallowed }, - Range { from: '𛱰', to: '𛱼', mapping: Valid }, - Range { from: '𛱽', to: '𛱿', mapping: Disallowed }, - Range { from: '𛲀', to: '𛲈', mapping: Valid }, - Range { from: '𛲉', to: '𛲏', mapping: Disallowed }, - Range { from: '𛲐', to: '𛲙', mapping: Valid }, - Range { from: '𛲚', to: '𛲛', mapping: Disallowed }, - Range { from: '𛲜', to: '𛲜', mapping: Valid }, - Range { from: '𛲝', to: '𛲞', mapping: Valid }, - Range { from: '𛲟', to: '𛲟', mapping: Valid }, - Range { from: '𛲠', to: '𛲣', mapping: Ignored }, - Range { from: '𛲤', to: '𜿿', mapping: Disallowed }, - Range { from: '𝀀', to: '𝃵', mapping: Valid }, - Range { from: '𝃶', to: '𝃿', mapping: Disallowed }, - Range { from: '𝄀', to: '𝄦', mapping: Valid }, - Range { from: '𝄧', to: '𝄨', mapping: Disallowed }, - Range { from: '𝄩', to: '𝄩', mapping: Valid }, - Range { from: '𝄪', to: '𝅝', mapping: Valid }, - Range { from: '𝅗𝅥', to: '𝅗𝅥', mapping: Mapped("𝅗𝅥") }, - Range { from: '𝅘𝅥', to: '𝅘𝅥', mapping: Mapped("𝅘𝅥") }, - Range { from: '𝅘𝅥𝅮', to: '𝅘𝅥𝅮', mapping: Mapped("𝅘𝅥𝅮") }, - Range { from: '𝅘𝅥𝅯', to: '𝅘𝅥𝅯', mapping: Mapped("𝅘𝅥𝅯") }, - Range { from: '𝅘𝅥𝅰', to: '𝅘𝅥𝅰', mapping: Mapped("𝅘𝅥𝅰") }, - Range { from: '𝅘𝅥𝅱', to: '𝅘𝅥𝅱', mapping: Mapped("𝅘𝅥𝅱") }, - Range { from: '𝅘𝅥𝅲', to: '𝅘𝅥𝅲', mapping: Mapped("𝅘𝅥𝅲") }, - Range { from: '𝅥', to: '𝅲', mapping: Valid }, - Range { from: '𝅳', to: '𝅺', mapping: Disallowed }, - Range { from: '𝅻', to: '𝆺', mapping: Valid }, - Range { from: '𝆹𝅥', to: '𝆹𝅥', mapping: Mapped("𝆹𝅥") }, - Range { from: '𝆺𝅥', to: '𝆺𝅥', mapping: Mapped("𝆺𝅥") }, - Range { from: '𝆹𝅥𝅮', to: '𝆹𝅥𝅮', mapping: Mapped("𝆹𝅥𝅮") }, - Range { from: '𝆺𝅥𝅮', to: '𝆺𝅥𝅮', mapping: Mapped("𝆺𝅥𝅮") }, - Range { from: '𝆹𝅥𝅯', to: '𝆹𝅥𝅯', mapping: Mapped("𝆹𝅥𝅯") }, - Range { from: '𝆺𝅥𝅯', to: '𝆺𝅥𝅯', mapping: Mapped("𝆺𝅥𝅯") }, - Range { from: '𝇁', to: '𝇝', mapping: Valid }, - Range { from: '𝇞', to: '𝇨', mapping: Valid }, - Range { from: '𝇩', to: '𝇿', mapping: Disallowed }, - Range { from: '𝈀', to: '𝉅', mapping: Valid }, - Range { from: '𝉆', to: '𝋿', mapping: Disallowed }, - Range { from: '𝌀', to: '𝍖', mapping: Valid }, - Range { from: '𝍗', to: '𝍟', mapping: Disallowed }, - Range { from: '𝍠', to: '𝍱', mapping: Valid }, - Range { from: '𝍲', to: '𝏿', mapping: Disallowed }, - Range { from: '𝐀', to: '𝐀', mapping: Mapped("a") }, - Range { from: '𝐁', to: '𝐁', mapping: Mapped("b") }, - Range { from: '𝐂', to: '𝐂', mapping: Mapped("c") }, - Range { from: '𝐃', to: '𝐃', mapping: Mapped("d") }, - Range { from: '𝐄', to: '𝐄', mapping: Mapped("e") }, - Range { from: '𝐅', to: '𝐅', mapping: Mapped("f") }, - Range { from: '𝐆', to: '𝐆', mapping: Mapped("g") }, - Range { from: '𝐇', to: '𝐇', mapping: Mapped("h") }, - Range { from: '𝐈', to: '𝐈', mapping: Mapped("i") }, - Range { from: '𝐉', to: '𝐉', mapping: Mapped("j") }, - Range { from: '𝐊', to: '𝐊', mapping: Mapped("k") }, - Range { from: '𝐋', to: '𝐋', mapping: Mapped("l") }, - Range { from: '𝐌', to: '𝐌', mapping: Mapped("m") }, - Range { from: '𝐍', to: '𝐍', mapping: Mapped("n") }, - Range { from: '𝐎', to: '𝐎', mapping: Mapped("o") }, - Range { from: '𝐏', to: '𝐏', mapping: Mapped("p") }, - Range { from: '𝐐', to: '𝐐', mapping: Mapped("q") }, - Range { from: '𝐑', to: '𝐑', mapping: Mapped("r") }, - Range { from: '𝐒', to: '𝐒', mapping: Mapped("s") }, - Range { from: '𝐓', to: '𝐓', mapping: Mapped("t") }, - Range { from: '𝐔', to: '𝐔', mapping: Mapped("u") }, - Range { from: '𝐕', to: '𝐕', mapping: Mapped("v") }, - Range { from: '𝐖', to: '𝐖', mapping: Mapped("w") }, - Range { from: '𝐗', to: '𝐗', mapping: Mapped("x") }, - Range { from: '𝐘', to: '𝐘', mapping: Mapped("y") }, - Range { from: '𝐙', to: '𝐙', mapping: Mapped("z") }, - Range { from: '𝐚', to: '𝐚', mapping: Mapped("a") }, - Range { from: '𝐛', to: '𝐛', mapping: Mapped("b") }, - Range { from: '𝐜', to: '𝐜', mapping: Mapped("c") }, - Range { from: '𝐝', to: '𝐝', mapping: Mapped("d") }, - Range { from: '𝐞', to: '𝐞', mapping: Mapped("e") }, - Range { from: '𝐟', to: '𝐟', mapping: Mapped("f") }, - Range { from: '𝐠', to: '𝐠', mapping: Mapped("g") }, - Range { from: '𝐡', to: '𝐡', mapping: Mapped("h") }, - Range { from: '𝐢', to: '𝐢', mapping: Mapped("i") }, - Range { from: '𝐣', to: '𝐣', mapping: Mapped("j") }, - Range { from: '𝐤', to: '𝐤', mapping: Mapped("k") }, - Range { from: '𝐥', to: '𝐥', mapping: Mapped("l") }, - Range { from: '𝐦', to: '𝐦', mapping: Mapped("m") }, - Range { from: '𝐧', to: '𝐧', mapping: Mapped("n") }, - Range { from: '𝐨', to: '𝐨', mapping: Mapped("o") }, - Range { from: '𝐩', to: '𝐩', mapping: Mapped("p") }, - Range { from: '𝐪', to: '𝐪', mapping: Mapped("q") }, - Range { from: '𝐫', to: '𝐫', mapping: Mapped("r") }, - Range { from: '𝐬', to: '𝐬', mapping: Mapped("s") }, - Range { from: '𝐭', to: '𝐭', mapping: Mapped("t") }, - Range { from: '𝐮', to: '𝐮', mapping: Mapped("u") }, - Range { from: '𝐯', to: '𝐯', mapping: Mapped("v") }, - Range { from: '𝐰', to: '𝐰', mapping: Mapped("w") }, - Range { from: '𝐱', to: '𝐱', mapping: Mapped("x") }, - Range { from: '𝐲', to: '𝐲', mapping: Mapped("y") }, - Range { from: '𝐳', to: '𝐳', mapping: Mapped("z") }, - Range { from: '𝐴', to: '𝐴', mapping: Mapped("a") }, - Range { from: '𝐵', to: '𝐵', mapping: Mapped("b") }, - Range { from: '𝐶', to: '𝐶', mapping: Mapped("c") }, - Range { from: '𝐷', to: '𝐷', mapping: Mapped("d") }, - Range { from: '𝐸', to: '𝐸', mapping: Mapped("e") }, - Range { from: '𝐹', to: '𝐹', mapping: Mapped("f") }, - Range { from: '𝐺', to: '𝐺', mapping: Mapped("g") }, - Range { from: '𝐻', to: '𝐻', mapping: Mapped("h") }, - Range { from: '𝐼', to: '𝐼', mapping: Mapped("i") }, - Range { from: '𝐽', to: '𝐽', mapping: Mapped("j") }, - Range { from: '𝐾', to: '𝐾', mapping: Mapped("k") }, - Range { from: '𝐿', to: '𝐿', mapping: Mapped("l") }, - Range { from: '𝑀', to: '𝑀', mapping: Mapped("m") }, - Range { from: '𝑁', to: '𝑁', mapping: Mapped("n") }, - Range { from: '𝑂', to: '𝑂', mapping: Mapped("o") }, - Range { from: '𝑃', to: '𝑃', mapping: Mapped("p") }, - Range { from: '𝑄', to: '𝑄', mapping: Mapped("q") }, - Range { from: '𝑅', to: '𝑅', mapping: Mapped("r") }, - Range { from: '𝑆', to: '𝑆', mapping: Mapped("s") }, - Range { from: '𝑇', to: '𝑇', mapping: Mapped("t") }, - Range { from: '𝑈', to: '𝑈', mapping: Mapped("u") }, - Range { from: '𝑉', to: '𝑉', mapping: Mapped("v") }, - Range { from: '𝑊', to: '𝑊', mapping: Mapped("w") }, - Range { from: '𝑋', to: '𝑋', mapping: Mapped("x") }, - Range { from: '𝑌', to: '𝑌', mapping: Mapped("y") }, - Range { from: '𝑍', to: '𝑍', mapping: Mapped("z") }, - Range { from: '𝑎', to: '𝑎', mapping: Mapped("a") }, - Range { from: '𝑏', to: '𝑏', mapping: Mapped("b") }, - Range { from: '𝑐', to: '𝑐', mapping: Mapped("c") }, - Range { from: '𝑑', to: '𝑑', mapping: Mapped("d") }, - Range { from: '𝑒', to: '𝑒', mapping: Mapped("e") }, - Range { from: '𝑓', to: '𝑓', mapping: Mapped("f") }, - Range { from: '𝑔', to: '𝑔', mapping: Mapped("g") }, - Range { from: '𝑕', to: '𝑕', mapping: Disallowed }, - Range { from: '𝑖', to: '𝑖', mapping: Mapped("i") }, - Range { from: '𝑗', to: '𝑗', mapping: Mapped("j") }, - Range { from: '𝑘', to: '𝑘', mapping: Mapped("k") }, - Range { from: '𝑙', to: '𝑙', mapping: Mapped("l") }, - Range { from: '𝑚', to: '𝑚', mapping: Mapped("m") }, - Range { from: '𝑛', to: '𝑛', mapping: Mapped("n") }, - Range { from: '𝑜', to: '𝑜', mapping: Mapped("o") }, - Range { from: '𝑝', to: '𝑝', mapping: Mapped("p") }, - Range { from: '𝑞', to: '𝑞', mapping: Mapped("q") }, - Range { from: '𝑟', to: '𝑟', mapping: Mapped("r") }, - Range { from: '𝑠', to: '𝑠', mapping: Mapped("s") }, - Range { from: '𝑡', to: '𝑡', mapping: Mapped("t") }, - Range { from: '𝑢', to: '𝑢', mapping: Mapped("u") }, - Range { from: '𝑣', to: '𝑣', mapping: Mapped("v") }, - Range { from: '𝑤', to: '𝑤', mapping: Mapped("w") }, - Range { from: '𝑥', to: '𝑥', mapping: Mapped("x") }, - Range { from: '𝑦', to: '𝑦', mapping: Mapped("y") }, - Range { from: '𝑧', to: '𝑧', mapping: Mapped("z") }, - Range { from: '𝑨', to: '𝑨', mapping: Mapped("a") }, - Range { from: '𝑩', to: '𝑩', mapping: Mapped("b") }, - Range { from: '𝑪', to: '𝑪', mapping: Mapped("c") }, - Range { from: '𝑫', to: '𝑫', mapping: Mapped("d") }, - Range { from: '𝑬', to: '𝑬', mapping: Mapped("e") }, - Range { from: '𝑭', to: '𝑭', mapping: Mapped("f") }, - Range { from: '𝑮', to: '𝑮', mapping: Mapped("g") }, - Range { from: '𝑯', to: '𝑯', mapping: Mapped("h") }, - Range { from: '𝑰', to: '𝑰', mapping: Mapped("i") }, - Range { from: '𝑱', to: '𝑱', mapping: Mapped("j") }, - Range { from: '𝑲', to: '𝑲', mapping: Mapped("k") }, - Range { from: '𝑳', to: '𝑳', mapping: Mapped("l") }, - Range { from: '𝑴', to: '𝑴', mapping: Mapped("m") }, - Range { from: '𝑵', to: '𝑵', mapping: Mapped("n") }, - Range { from: '𝑶', to: '𝑶', mapping: Mapped("o") }, - Range { from: '𝑷', to: '𝑷', mapping: Mapped("p") }, - Range { from: '𝑸', to: '𝑸', mapping: Mapped("q") }, - Range { from: '𝑹', to: '𝑹', mapping: Mapped("r") }, - Range { from: '𝑺', to: '𝑺', mapping: Mapped("s") }, - Range { from: '𝑻', to: '𝑻', mapping: Mapped("t") }, - Range { from: '𝑼', to: '𝑼', mapping: Mapped("u") }, - Range { from: '𝑽', to: '𝑽', mapping: Mapped("v") }, - Range { from: '𝑾', to: '𝑾', mapping: Mapped("w") }, - Range { from: '𝑿', to: '𝑿', mapping: Mapped("x") }, - Range { from: '𝒀', to: '𝒀', mapping: Mapped("y") }, - Range { from: '𝒁', to: '𝒁', mapping: Mapped("z") }, - Range { from: '𝒂', to: '𝒂', mapping: Mapped("a") }, - Range { from: '𝒃', to: '𝒃', mapping: Mapped("b") }, - Range { from: '𝒄', to: '𝒄', mapping: Mapped("c") }, - Range { from: '𝒅', to: '𝒅', mapping: Mapped("d") }, - Range { from: '𝒆', to: '𝒆', mapping: Mapped("e") }, - Range { from: '𝒇', to: '𝒇', mapping: Mapped("f") }, - Range { from: '𝒈', to: '𝒈', mapping: Mapped("g") }, - Range { from: '𝒉', to: '𝒉', mapping: Mapped("h") }, - Range { from: '𝒊', to: '𝒊', mapping: Mapped("i") }, - Range { from: '𝒋', to: '𝒋', mapping: Mapped("j") }, - Range { from: '𝒌', to: '𝒌', mapping: Mapped("k") }, - Range { from: '𝒍', to: '𝒍', mapping: Mapped("l") }, - Range { from: '𝒎', to: '𝒎', mapping: Mapped("m") }, - Range { from: '𝒏', to: '𝒏', mapping: Mapped("n") }, - Range { from: '𝒐', to: '𝒐', mapping: Mapped("o") }, - Range { from: '𝒑', to: '𝒑', mapping: Mapped("p") }, - Range { from: '𝒒', to: '𝒒', mapping: Mapped("q") }, - Range { from: '𝒓', to: '𝒓', mapping: Mapped("r") }, - Range { from: '𝒔', to: '𝒔', mapping: Mapped("s") }, - Range { from: '𝒕', to: '𝒕', mapping: Mapped("t") }, - Range { from: '𝒖', to: '𝒖', mapping: Mapped("u") }, - Range { from: '𝒗', to: '𝒗', mapping: Mapped("v") }, - Range { from: '𝒘', to: '𝒘', mapping: Mapped("w") }, - Range { from: '𝒙', to: '𝒙', mapping: Mapped("x") }, - Range { from: '𝒚', to: '𝒚', mapping: Mapped("y") }, - Range { from: '𝒛', to: '𝒛', mapping: Mapped("z") }, - Range { from: '𝒜', to: '𝒜', mapping: Mapped("a") }, - Range { from: '𝒝', to: '𝒝', mapping: Disallowed }, - Range { from: '𝒞', to: '𝒞', mapping: Mapped("c") }, - Range { from: '𝒟', to: '𝒟', mapping: Mapped("d") }, - Range { from: '𝒠', to: '𝒡', mapping: Disallowed }, - Range { from: '𝒢', to: '𝒢', mapping: Mapped("g") }, - Range { from: '𝒣', to: '𝒤', mapping: Disallowed }, - Range { from: '𝒥', to: '𝒥', mapping: Mapped("j") }, - Range { from: '𝒦', to: '𝒦', mapping: Mapped("k") }, - Range { from: '𝒧', to: '𝒨', mapping: Disallowed }, - Range { from: '𝒩', to: '𝒩', mapping: Mapped("n") }, - Range { from: '𝒪', to: '𝒪', mapping: Mapped("o") }, - Range { from: '𝒫', to: '𝒫', mapping: Mapped("p") }, - Range { from: '𝒬', to: '𝒬', mapping: Mapped("q") }, - Range { from: '𝒭', to: '𝒭', mapping: Disallowed }, - Range { from: '𝒮', to: '𝒮', mapping: Mapped("s") }, - Range { from: '𝒯', to: '𝒯', mapping: Mapped("t") }, - Range { from: '𝒰', to: '𝒰', mapping: Mapped("u") }, - Range { from: '𝒱', to: '𝒱', mapping: Mapped("v") }, - Range { from: '𝒲', to: '𝒲', mapping: Mapped("w") }, - Range { from: '𝒳', to: '𝒳', mapping: Mapped("x") }, - Range { from: '𝒴', to: '𝒴', mapping: Mapped("y") }, - Range { from: '𝒵', to: '𝒵', mapping: Mapped("z") }, - Range { from: '𝒶', to: '𝒶', mapping: Mapped("a") }, - Range { from: '𝒷', to: '𝒷', mapping: Mapped("b") }, - Range { from: '𝒸', to: '𝒸', mapping: Mapped("c") }, - Range { from: '𝒹', to: '𝒹', mapping: Mapped("d") }, - Range { from: '𝒺', to: '𝒺', mapping: Disallowed }, - Range { from: '𝒻', to: '𝒻', mapping: Mapped("f") }, - Range { from: '𝒼', to: '𝒼', mapping: Disallowed }, - Range { from: '𝒽', to: '𝒽', mapping: Mapped("h") }, - Range { from: '𝒾', to: '𝒾', mapping: Mapped("i") }, - Range { from: '𝒿', to: '𝒿', mapping: Mapped("j") }, - Range { from: '𝓀', to: '𝓀', mapping: Mapped("k") }, - Range { from: '𝓁', to: '𝓁', mapping: Mapped("l") }, - Range { from: '𝓂', to: '𝓂', mapping: Mapped("m") }, - Range { from: '𝓃', to: '𝓃', mapping: Mapped("n") }, - Range { from: '𝓄', to: '𝓄', mapping: Disallowed }, - Range { from: '𝓅', to: '𝓅', mapping: Mapped("p") }, - Range { from: '𝓆', to: '𝓆', mapping: Mapped("q") }, - Range { from: '𝓇', to: '𝓇', mapping: Mapped("r") }, - Range { from: '𝓈', to: '𝓈', mapping: Mapped("s") }, - Range { from: '𝓉', to: '𝓉', mapping: Mapped("t") }, - Range { from: '𝓊', to: '𝓊', mapping: Mapped("u") }, - Range { from: '𝓋', to: '𝓋', mapping: Mapped("v") }, - Range { from: '𝓌', to: '𝓌', mapping: Mapped("w") }, - Range { from: '𝓍', to: '𝓍', mapping: Mapped("x") }, - Range { from: '𝓎', to: '𝓎', mapping: Mapped("y") }, - Range { from: '𝓏', to: '𝓏', mapping: Mapped("z") }, - Range { from: '𝓐', to: '𝓐', mapping: Mapped("a") }, - Range { from: '𝓑', to: '𝓑', mapping: Mapped("b") }, - Range { from: '𝓒', to: '𝓒', mapping: Mapped("c") }, - Range { from: '𝓓', to: '𝓓', mapping: Mapped("d") }, - Range { from: '𝓔', to: '𝓔', mapping: Mapped("e") }, - Range { from: '𝓕', to: '𝓕', mapping: Mapped("f") }, - Range { from: '𝓖', to: '𝓖', mapping: Mapped("g") }, - Range { from: '𝓗', to: '𝓗', mapping: Mapped("h") }, - Range { from: '𝓘', to: '𝓘', mapping: Mapped("i") }, - Range { from: '𝓙', to: '𝓙', mapping: Mapped("j") }, - Range { from: '𝓚', to: '𝓚', mapping: Mapped("k") }, - Range { from: '𝓛', to: '𝓛', mapping: Mapped("l") }, - Range { from: '𝓜', to: '𝓜', mapping: Mapped("m") }, - Range { from: '𝓝', to: '𝓝', mapping: Mapped("n") }, - Range { from: '𝓞', to: '𝓞', mapping: Mapped("o") }, - Range { from: '𝓟', to: '𝓟', mapping: Mapped("p") }, - Range { from: '𝓠', to: '𝓠', mapping: Mapped("q") }, - Range { from: '𝓡', to: '𝓡', mapping: Mapped("r") }, - Range { from: '𝓢', to: '𝓢', mapping: Mapped("s") }, - Range { from: '𝓣', to: '𝓣', mapping: Mapped("t") }, - Range { from: '𝓤', to: '𝓤', mapping: Mapped("u") }, - Range { from: '𝓥', to: '𝓥', mapping: Mapped("v") }, - Range { from: '𝓦', to: '𝓦', mapping: Mapped("w") }, - Range { from: '𝓧', to: '𝓧', mapping: Mapped("x") }, - Range { from: '𝓨', to: '𝓨', mapping: Mapped("y") }, - Range { from: '𝓩', to: '𝓩', mapping: Mapped("z") }, - Range { from: '𝓪', to: '𝓪', mapping: Mapped("a") }, - Range { from: '𝓫', to: '𝓫', mapping: Mapped("b") }, - Range { from: '𝓬', to: '𝓬', mapping: Mapped("c") }, - Range { from: '𝓭', to: '𝓭', mapping: Mapped("d") }, - Range { from: '𝓮', to: '𝓮', mapping: Mapped("e") }, - Range { from: '𝓯', to: '𝓯', mapping: Mapped("f") }, - Range { from: '𝓰', to: '𝓰', mapping: Mapped("g") }, - Range { from: '𝓱', to: '𝓱', mapping: Mapped("h") }, - Range { from: '𝓲', to: '𝓲', mapping: Mapped("i") }, - Range { from: '𝓳', to: '𝓳', mapping: Mapped("j") }, - Range { from: '𝓴', to: '𝓴', mapping: Mapped("k") }, - Range { from: '𝓵', to: '𝓵', mapping: Mapped("l") }, - Range { from: '𝓶', to: '𝓶', mapping: Mapped("m") }, - Range { from: '𝓷', to: '𝓷', mapping: Mapped("n") }, - Range { from: '𝓸', to: '𝓸', mapping: Mapped("o") }, - Range { from: '𝓹', to: '𝓹', mapping: Mapped("p") }, - Range { from: '𝓺', to: '𝓺', mapping: Mapped("q") }, - Range { from: '𝓻', to: '𝓻', mapping: Mapped("r") }, - Range { from: '𝓼', to: '𝓼', mapping: Mapped("s") }, - Range { from: '𝓽', to: '𝓽', mapping: Mapped("t") }, - Range { from: '𝓾', to: '𝓾', mapping: Mapped("u") }, - Range { from: '𝓿', to: '𝓿', mapping: Mapped("v") }, - Range { from: '𝔀', to: '𝔀', mapping: Mapped("w") }, - Range { from: '𝔁', to: '𝔁', mapping: Mapped("x") }, - Range { from: '𝔂', to: '𝔂', mapping: Mapped("y") }, - Range { from: '𝔃', to: '𝔃', mapping: Mapped("z") }, - Range { from: '𝔄', to: '𝔄', mapping: Mapped("a") }, - Range { from: '𝔅', to: '𝔅', mapping: Mapped("b") }, - Range { from: '𝔆', to: '𝔆', mapping: Disallowed }, - Range { from: '𝔇', to: '𝔇', mapping: Mapped("d") }, - Range { from: '𝔈', to: '𝔈', mapping: Mapped("e") }, - Range { from: '𝔉', to: '𝔉', mapping: Mapped("f") }, - Range { from: '𝔊', to: '𝔊', mapping: Mapped("g") }, - Range { from: '𝔋', to: '𝔌', mapping: Disallowed }, - Range { from: '𝔍', to: '𝔍', mapping: Mapped("j") }, - Range { from: '𝔎', to: '𝔎', mapping: Mapped("k") }, - Range { from: '𝔏', to: '𝔏', mapping: Mapped("l") }, - Range { from: '𝔐', to: '𝔐', mapping: Mapped("m") }, - Range { from: '𝔑', to: '𝔑', mapping: Mapped("n") }, - Range { from: '𝔒', to: '𝔒', mapping: Mapped("o") }, - Range { from: '𝔓', to: '𝔓', mapping: Mapped("p") }, - Range { from: '𝔔', to: '𝔔', mapping: Mapped("q") }, - Range { from: '𝔕', to: '𝔕', mapping: Disallowed }, - Range { from: '𝔖', to: '𝔖', mapping: Mapped("s") }, - Range { from: '𝔗', to: '𝔗', mapping: Mapped("t") }, - Range { from: '𝔘', to: '𝔘', mapping: Mapped("u") }, - Range { from: '𝔙', to: '𝔙', mapping: Mapped("v") }, - Range { from: '𝔚', to: '𝔚', mapping: Mapped("w") }, - Range { from: '𝔛', to: '𝔛', mapping: Mapped("x") }, - Range { from: '𝔜', to: '𝔜', mapping: Mapped("y") }, - Range { from: '𝔝', to: '𝔝', mapping: Disallowed }, - Range { from: '𝔞', to: '𝔞', mapping: Mapped("a") }, - Range { from: '𝔟', to: '𝔟', mapping: Mapped("b") }, - Range { from: '𝔠', to: '𝔠', mapping: Mapped("c") }, - Range { from: '𝔡', to: '𝔡', mapping: Mapped("d") }, - Range { from: '𝔢', to: '𝔢', mapping: Mapped("e") }, - Range { from: '𝔣', to: '𝔣', mapping: Mapped("f") }, - Range { from: '𝔤', to: '𝔤', mapping: Mapped("g") }, - Range { from: '𝔥', to: '𝔥', mapping: Mapped("h") }, - Range { from: '𝔦', to: '𝔦', mapping: Mapped("i") }, - Range { from: '𝔧', to: '𝔧', mapping: Mapped("j") }, - Range { from: '𝔨', to: '𝔨', mapping: Mapped("k") }, - Range { from: '𝔩', to: '𝔩', mapping: Mapped("l") }, - Range { from: '𝔪', to: '𝔪', mapping: Mapped("m") }, - Range { from: '𝔫', to: '𝔫', mapping: Mapped("n") }, - Range { from: '𝔬', to: '𝔬', mapping: Mapped("o") }, - Range { from: '𝔭', to: '𝔭', mapping: Mapped("p") }, - Range { from: '𝔮', to: '𝔮', mapping: Mapped("q") }, - Range { from: '𝔯', to: '𝔯', mapping: Mapped("r") }, - Range { from: '𝔰', to: '𝔰', mapping: Mapped("s") }, - Range { from: '𝔱', to: '𝔱', mapping: Mapped("t") }, - Range { from: '𝔲', to: '𝔲', mapping: Mapped("u") }, - Range { from: '𝔳', to: '𝔳', mapping: Mapped("v") }, - Range { from: '𝔴', to: '𝔴', mapping: Mapped("w") }, - Range { from: '𝔵', to: '𝔵', mapping: Mapped("x") }, - Range { from: '𝔶', to: '𝔶', mapping: Mapped("y") }, - Range { from: '𝔷', to: '𝔷', mapping: Mapped("z") }, - Range { from: '𝔸', to: '𝔸', mapping: Mapped("a") }, - Range { from: '𝔹', to: '𝔹', mapping: Mapped("b") }, - Range { from: '𝔺', to: '𝔺', mapping: Disallowed }, - Range { from: '𝔻', to: '𝔻', mapping: Mapped("d") }, - Range { from: '𝔼', to: '𝔼', mapping: Mapped("e") }, - Range { from: '𝔽', to: '𝔽', mapping: Mapped("f") }, - Range { from: '𝔾', to: '𝔾', mapping: Mapped("g") }, - Range { from: '𝔿', to: '𝔿', mapping: Disallowed }, - Range { from: '𝕀', to: '𝕀', mapping: Mapped("i") }, - Range { from: '𝕁', to: '𝕁', mapping: Mapped("j") }, - Range { from: '𝕂', to: '𝕂', mapping: Mapped("k") }, - Range { from: '𝕃', to: '𝕃', mapping: Mapped("l") }, - Range { from: '𝕄', to: '𝕄', mapping: Mapped("m") }, - Range { from: '𝕅', to: '𝕅', mapping: Disallowed }, - Range { from: '𝕆', to: '𝕆', mapping: Mapped("o") }, - Range { from: '𝕇', to: '𝕉', mapping: Disallowed }, - Range { from: '𝕊', to: '𝕊', mapping: Mapped("s") }, - Range { from: '𝕋', to: '𝕋', mapping: Mapped("t") }, - Range { from: '𝕌', to: '𝕌', mapping: Mapped("u") }, - Range { from: '𝕍', to: '𝕍', mapping: Mapped("v") }, - Range { from: '𝕎', to: '𝕎', mapping: Mapped("w") }, - Range { from: '𝕏', to: '𝕏', mapping: Mapped("x") }, - Range { from: '𝕐', to: '𝕐', mapping: Mapped("y") }, - Range { from: '𝕑', to: '𝕑', mapping: Disallowed }, - Range { from: '𝕒', to: '𝕒', mapping: Mapped("a") }, - Range { from: '𝕓', to: '𝕓', mapping: Mapped("b") }, - Range { from: '𝕔', to: '𝕔', mapping: Mapped("c") }, - Range { from: '𝕕', to: '𝕕', mapping: Mapped("d") }, - Range { from: '𝕖', to: '𝕖', mapping: Mapped("e") }, - Range { from: '𝕗', to: '𝕗', mapping: Mapped("f") }, - Range { from: '𝕘', to: '𝕘', mapping: Mapped("g") }, - Range { from: '𝕙', to: '𝕙', mapping: Mapped("h") }, - Range { from: '𝕚', to: '𝕚', mapping: Mapped("i") }, - Range { from: '𝕛', to: '𝕛', mapping: Mapped("j") }, - Range { from: '𝕜', to: '𝕜', mapping: Mapped("k") }, - Range { from: '𝕝', to: '𝕝', mapping: Mapped("l") }, - Range { from: '𝕞', to: '𝕞', mapping: Mapped("m") }, - Range { from: '𝕟', to: '𝕟', mapping: Mapped("n") }, - Range { from: '𝕠', to: '𝕠', mapping: Mapped("o") }, - Range { from: '𝕡', to: '𝕡', mapping: Mapped("p") }, - Range { from: '𝕢', to: '𝕢', mapping: Mapped("q") }, - Range { from: '𝕣', to: '𝕣', mapping: Mapped("r") }, - Range { from: '𝕤', to: '𝕤', mapping: Mapped("s") }, - Range { from: '𝕥', to: '𝕥', mapping: Mapped("t") }, - Range { from: '𝕦', to: '𝕦', mapping: Mapped("u") }, - Range { from: '𝕧', to: '𝕧', mapping: Mapped("v") }, - Range { from: '𝕨', to: '𝕨', mapping: Mapped("w") }, - Range { from: '𝕩', to: '𝕩', mapping: Mapped("x") }, - Range { from: '𝕪', to: '𝕪', mapping: Mapped("y") }, - Range { from: '𝕫', to: '𝕫', mapping: Mapped("z") }, - Range { from: '𝕬', to: '𝕬', mapping: Mapped("a") }, - Range { from: '𝕭', to: '𝕭', mapping: Mapped("b") }, - Range { from: '𝕮', to: '𝕮', mapping: Mapped("c") }, - Range { from: '𝕯', to: '𝕯', mapping: Mapped("d") }, - Range { from: '𝕰', to: '𝕰', mapping: Mapped("e") }, - Range { from: '𝕱', to: '𝕱', mapping: Mapped("f") }, - Range { from: '𝕲', to: '𝕲', mapping: Mapped("g") }, - Range { from: '𝕳', to: '𝕳', mapping: Mapped("h") }, - Range { from: '𝕴', to: '𝕴', mapping: Mapped("i") }, - Range { from: '𝕵', to: '𝕵', mapping: Mapped("j") }, - Range { from: '𝕶', to: '𝕶', mapping: Mapped("k") }, - Range { from: '𝕷', to: '𝕷', mapping: Mapped("l") }, - Range { from: '𝕸', to: '𝕸', mapping: Mapped("m") }, - Range { from: '𝕹', to: '𝕹', mapping: Mapped("n") }, - Range { from: '𝕺', to: '𝕺', mapping: Mapped("o") }, - Range { from: '𝕻', to: '𝕻', mapping: Mapped("p") }, - Range { from: '𝕼', to: '𝕼', mapping: Mapped("q") }, - Range { from: '𝕽', to: '𝕽', mapping: Mapped("r") }, - Range { from: '𝕾', to: '𝕾', mapping: Mapped("s") }, - Range { from: '𝕿', to: '𝕿', mapping: Mapped("t") }, - Range { from: '𝖀', to: '𝖀', mapping: Mapped("u") }, - Range { from: '𝖁', to: '𝖁', mapping: Mapped("v") }, - Range { from: '𝖂', to: '𝖂', mapping: Mapped("w") }, - Range { from: '𝖃', to: '𝖃', mapping: Mapped("x") }, - Range { from: '𝖄', to: '𝖄', mapping: Mapped("y") }, - Range { from: '𝖅', to: '𝖅', mapping: Mapped("z") }, - Range { from: '𝖆', to: '𝖆', mapping: Mapped("a") }, - Range { from: '𝖇', to: '𝖇', mapping: Mapped("b") }, - Range { from: '𝖈', to: '𝖈', mapping: Mapped("c") }, - Range { from: '𝖉', to: '𝖉', mapping: Mapped("d") }, - Range { from: '𝖊', to: '𝖊', mapping: Mapped("e") }, - Range { from: '𝖋', to: '𝖋', mapping: Mapped("f") }, - Range { from: '𝖌', to: '𝖌', mapping: Mapped("g") }, - Range { from: '𝖍', to: '𝖍', mapping: Mapped("h") }, - Range { from: '𝖎', to: '𝖎', mapping: Mapped("i") }, - Range { from: '𝖏', to: '𝖏', mapping: Mapped("j") }, - Range { from: '𝖐', to: '𝖐', mapping: Mapped("k") }, - Range { from: '𝖑', to: '𝖑', mapping: Mapped("l") }, - Range { from: '𝖒', to: '𝖒', mapping: Mapped("m") }, - Range { from: '𝖓', to: '𝖓', mapping: Mapped("n") }, - Range { from: '𝖔', to: '𝖔', mapping: Mapped("o") }, - Range { from: '𝖕', to: '𝖕', mapping: Mapped("p") }, - Range { from: '𝖖', to: '𝖖', mapping: Mapped("q") }, - Range { from: '𝖗', to: '𝖗', mapping: Mapped("r") }, - Range { from: '𝖘', to: '𝖘', mapping: Mapped("s") }, - Range { from: '𝖙', to: '𝖙', mapping: Mapped("t") }, - Range { from: '𝖚', to: '𝖚', mapping: Mapped("u") }, - Range { from: '𝖛', to: '𝖛', mapping: Mapped("v") }, - Range { from: '𝖜', to: '𝖜', mapping: Mapped("w") }, - Range { from: '𝖝', to: '𝖝', mapping: Mapped("x") }, - Range { from: '𝖞', to: '𝖞', mapping: Mapped("y") }, - Range { from: '𝖟', to: '𝖟', mapping: Mapped("z") }, - Range { from: '𝖠', to: '𝖠', mapping: Mapped("a") }, - Range { from: '𝖡', to: '𝖡', mapping: Mapped("b") }, - Range { from: '𝖢', to: '𝖢', mapping: Mapped("c") }, - Range { from: '𝖣', to: '𝖣', mapping: Mapped("d") }, - Range { from: '𝖤', to: '𝖤', mapping: Mapped("e") }, - Range { from: '𝖥', to: '𝖥', mapping: Mapped("f") }, - Range { from: '𝖦', to: '𝖦', mapping: Mapped("g") }, - Range { from: '𝖧', to: '𝖧', mapping: Mapped("h") }, - Range { from: '𝖨', to: '𝖨', mapping: Mapped("i") }, - Range { from: '𝖩', to: '𝖩', mapping: Mapped("j") }, - Range { from: '𝖪', to: '𝖪', mapping: Mapped("k") }, - Range { from: '𝖫', to: '𝖫', mapping: Mapped("l") }, - Range { from: '𝖬', to: '𝖬', mapping: Mapped("m") }, - Range { from: '𝖭', to: '𝖭', mapping: Mapped("n") }, - Range { from: '𝖮', to: '𝖮', mapping: Mapped("o") }, - Range { from: '𝖯', to: '𝖯', mapping: Mapped("p") }, - Range { from: '𝖰', to: '𝖰', mapping: Mapped("q") }, - Range { from: '𝖱', to: '𝖱', mapping: Mapped("r") }, - Range { from: '𝖲', to: '𝖲', mapping: Mapped("s") }, - Range { from: '𝖳', to: '𝖳', mapping: Mapped("t") }, - Range { from: '𝖴', to: '𝖴', mapping: Mapped("u") }, - Range { from: '𝖵', to: '𝖵', mapping: Mapped("v") }, - Range { from: '𝖶', to: '𝖶', mapping: Mapped("w") }, - Range { from: '𝖷', to: '𝖷', mapping: Mapped("x") }, - Range { from: '𝖸', to: '𝖸', mapping: Mapped("y") }, - Range { from: '𝖹', to: '𝖹', mapping: Mapped("z") }, - Range { from: '𝖺', to: '𝖺', mapping: Mapped("a") }, - Range { from: '𝖻', to: '𝖻', mapping: Mapped("b") }, - Range { from: '𝖼', to: '𝖼', mapping: Mapped("c") }, - Range { from: '𝖽', to: '𝖽', mapping: Mapped("d") }, - Range { from: '𝖾', to: '𝖾', mapping: Mapped("e") }, - Range { from: '𝖿', to: '𝖿', mapping: Mapped("f") }, - Range { from: '𝗀', to: '𝗀', mapping: Mapped("g") }, - Range { from: '𝗁', to: '𝗁', mapping: Mapped("h") }, - Range { from: '𝗂', to: '𝗂', mapping: Mapped("i") }, - Range { from: '𝗃', to: '𝗃', mapping: Mapped("j") }, - Range { from: '𝗄', to: '𝗄', mapping: Mapped("k") }, - Range { from: '𝗅', to: '𝗅', mapping: Mapped("l") }, - Range { from: '𝗆', to: '𝗆', mapping: Mapped("m") }, - Range { from: '𝗇', to: '𝗇', mapping: Mapped("n") }, - Range { from: '𝗈', to: '𝗈', mapping: Mapped("o") }, - Range { from: '𝗉', to: '𝗉', mapping: Mapped("p") }, - Range { from: '𝗊', to: '𝗊', mapping: Mapped("q") }, - Range { from: '𝗋', to: '𝗋', mapping: Mapped("r") }, - Range { from: '𝗌', to: '𝗌', mapping: Mapped("s") }, - Range { from: '𝗍', to: '𝗍', mapping: Mapped("t") }, - Range { from: '𝗎', to: '𝗎', mapping: Mapped("u") }, - Range { from: '𝗏', to: '𝗏', mapping: Mapped("v") }, - Range { from: '𝗐', to: '𝗐', mapping: Mapped("w") }, - Range { from: '𝗑', to: '𝗑', mapping: Mapped("x") }, - Range { from: '𝗒', to: '𝗒', mapping: Mapped("y") }, - Range { from: '𝗓', to: '𝗓', mapping: Mapped("z") }, - Range { from: '𝗔', to: '𝗔', mapping: Mapped("a") }, - Range { from: '𝗕', to: '𝗕', mapping: Mapped("b") }, - Range { from: '𝗖', to: '𝗖', mapping: Mapped("c") }, - Range { from: '𝗗', to: '𝗗', mapping: Mapped("d") }, - Range { from: '𝗘', to: '𝗘', mapping: Mapped("e") }, - Range { from: '𝗙', to: '𝗙', mapping: Mapped("f") }, - Range { from: '𝗚', to: '𝗚', mapping: Mapped("g") }, - Range { from: '𝗛', to: '𝗛', mapping: Mapped("h") }, - Range { from: '𝗜', to: '𝗜', mapping: Mapped("i") }, - Range { from: '𝗝', to: '𝗝', mapping: Mapped("j") }, - Range { from: '𝗞', to: '𝗞', mapping: Mapped("k") }, - Range { from: '𝗟', to: '𝗟', mapping: Mapped("l") }, - Range { from: '𝗠', to: '𝗠', mapping: Mapped("m") }, - Range { from: '𝗡', to: '𝗡', mapping: Mapped("n") }, - Range { from: '𝗢', to: '𝗢', mapping: Mapped("o") }, - Range { from: '𝗣', to: '𝗣', mapping: Mapped("p") }, - Range { from: '𝗤', to: '𝗤', mapping: Mapped("q") }, - Range { from: '𝗥', to: '𝗥', mapping: Mapped("r") }, - Range { from: '𝗦', to: '𝗦', mapping: Mapped("s") }, - Range { from: '𝗧', to: '𝗧', mapping: Mapped("t") }, - Range { from: '𝗨', to: '𝗨', mapping: Mapped("u") }, - Range { from: '𝗩', to: '𝗩', mapping: Mapped("v") }, - Range { from: '𝗪', to: '𝗪', mapping: Mapped("w") }, - Range { from: '𝗫', to: '𝗫', mapping: Mapped("x") }, - Range { from: '𝗬', to: '𝗬', mapping: Mapped("y") }, - Range { from: '𝗭', to: '𝗭', mapping: Mapped("z") }, - Range { from: '𝗮', to: '𝗮', mapping: Mapped("a") }, - Range { from: '𝗯', to: '𝗯', mapping: Mapped("b") }, - Range { from: '𝗰', to: '𝗰', mapping: Mapped("c") }, - Range { from: '𝗱', to: '𝗱', mapping: Mapped("d") }, - Range { from: '𝗲', to: '𝗲', mapping: Mapped("e") }, - Range { from: '𝗳', to: '𝗳', mapping: Mapped("f") }, - Range { from: '𝗴', to: '𝗴', mapping: Mapped("g") }, - Range { from: '𝗵', to: '𝗵', mapping: Mapped("h") }, - Range { from: '𝗶', to: '𝗶', mapping: Mapped("i") }, - Range { from: '𝗷', to: '𝗷', mapping: Mapped("j") }, - Range { from: '𝗸', to: '𝗸', mapping: Mapped("k") }, - Range { from: '𝗹', to: '𝗹', mapping: Mapped("l") }, - Range { from: '𝗺', to: '𝗺', mapping: Mapped("m") }, - Range { from: '𝗻', to: '𝗻', mapping: Mapped("n") }, - Range { from: '𝗼', to: '𝗼', mapping: Mapped("o") }, - Range { from: '𝗽', to: '𝗽', mapping: Mapped("p") }, - Range { from: '𝗾', to: '𝗾', mapping: Mapped("q") }, - Range { from: '𝗿', to: '𝗿', mapping: Mapped("r") }, - Range { from: '𝘀', to: '𝘀', mapping: Mapped("s") }, - Range { from: '𝘁', to: '𝘁', mapping: Mapped("t") }, - Range { from: '𝘂', to: '𝘂', mapping: Mapped("u") }, - Range { from: '𝘃', to: '𝘃', mapping: Mapped("v") }, - Range { from: '𝘄', to: '𝘄', mapping: Mapped("w") }, - Range { from: '𝘅', to: '𝘅', mapping: Mapped("x") }, - Range { from: '𝘆', to: '𝘆', mapping: Mapped("y") }, - Range { from: '𝘇', to: '𝘇', mapping: Mapped("z") }, - Range { from: '𝘈', to: '𝘈', mapping: Mapped("a") }, - Range { from: '𝘉', to: '𝘉', mapping: Mapped("b") }, - Range { from: '𝘊', to: '𝘊', mapping: Mapped("c") }, - Range { from: '𝘋', to: '𝘋', mapping: Mapped("d") }, - Range { from: '𝘌', to: '𝘌', mapping: Mapped("e") }, - Range { from: '𝘍', to: '𝘍', mapping: Mapped("f") }, - Range { from: '𝘎', to: '𝘎', mapping: Mapped("g") }, - Range { from: '𝘏', to: '𝘏', mapping: Mapped("h") }, - Range { from: '𝘐', to: '𝘐', mapping: Mapped("i") }, - Range { from: '𝘑', to: '𝘑', mapping: Mapped("j") }, - Range { from: '𝘒', to: '𝘒', mapping: Mapped("k") }, - Range { from: '𝘓', to: '𝘓', mapping: Mapped("l") }, - Range { from: '𝘔', to: '𝘔', mapping: Mapped("m") }, - Range { from: '𝘕', to: '𝘕', mapping: Mapped("n") }, - Range { from: '𝘖', to: '𝘖', mapping: Mapped("o") }, - Range { from: '𝘗', to: '𝘗', mapping: Mapped("p") }, - Range { from: '𝘘', to: '𝘘', mapping: Mapped("q") }, - Range { from: '𝘙', to: '𝘙', mapping: Mapped("r") }, - Range { from: '𝘚', to: '𝘚', mapping: Mapped("s") }, - Range { from: '𝘛', to: '𝘛', mapping: Mapped("t") }, - Range { from: '𝘜', to: '𝘜', mapping: Mapped("u") }, - Range { from: '𝘝', to: '𝘝', mapping: Mapped("v") }, - Range { from: '𝘞', to: '𝘞', mapping: Mapped("w") }, - Range { from: '𝘟', to: '𝘟', mapping: Mapped("x") }, - Range { from: '𝘠', to: '𝘠', mapping: Mapped("y") }, - Range { from: '𝘡', to: '𝘡', mapping: Mapped("z") }, - Range { from: '𝘢', to: '𝘢', mapping: Mapped("a") }, - Range { from: '𝘣', to: '𝘣', mapping: Mapped("b") }, - Range { from: '𝘤', to: '𝘤', mapping: Mapped("c") }, - Range { from: '𝘥', to: '𝘥', mapping: Mapped("d") }, - Range { from: '𝘦', to: '𝘦', mapping: Mapped("e") }, - Range { from: '𝘧', to: '𝘧', mapping: Mapped("f") }, - Range { from: '𝘨', to: '𝘨', mapping: Mapped("g") }, - Range { from: '𝘩', to: '𝘩', mapping: Mapped("h") }, - Range { from: '𝘪', to: '𝘪', mapping: Mapped("i") }, - Range { from: '𝘫', to: '𝘫', mapping: Mapped("j") }, - Range { from: '𝘬', to: '𝘬', mapping: Mapped("k") }, - Range { from: '𝘭', to: '𝘭', mapping: Mapped("l") }, - Range { from: '𝘮', to: '𝘮', mapping: Mapped("m") }, - Range { from: '𝘯', to: '𝘯', mapping: Mapped("n") }, - Range { from: '𝘰', to: '𝘰', mapping: Mapped("o") }, - Range { from: '𝘱', to: '𝘱', mapping: Mapped("p") }, - Range { from: '𝘲', to: '𝘲', mapping: Mapped("q") }, - Range { from: '𝘳', to: '𝘳', mapping: Mapped("r") }, - Range { from: '𝘴', to: '𝘴', mapping: Mapped("s") }, - Range { from: '𝘵', to: '𝘵', mapping: Mapped("t") }, - Range { from: '𝘶', to: '𝘶', mapping: Mapped("u") }, - Range { from: '𝘷', to: '𝘷', mapping: Mapped("v") }, - Range { from: '𝘸', to: '𝘸', mapping: Mapped("w") }, - Range { from: '𝘹', to: '𝘹', mapping: Mapped("x") }, - Range { from: '𝘺', to: '𝘺', mapping: Mapped("y") }, - Range { from: '𝘻', to: '𝘻', mapping: Mapped("z") }, - Range { from: '𝘼', to: '𝘼', mapping: Mapped("a") }, - Range { from: '𝘽', to: '𝘽', mapping: Mapped("b") }, - Range { from: '𝘾', to: '𝘾', mapping: Mapped("c") }, - Range { from: '𝘿', to: '𝘿', mapping: Mapped("d") }, - Range { from: '𝙀', to: '𝙀', mapping: Mapped("e") }, - Range { from: '𝙁', to: '𝙁', mapping: Mapped("f") }, - Range { from: '𝙂', to: '𝙂', mapping: Mapped("g") }, - Range { from: '𝙃', to: '𝙃', mapping: Mapped("h") }, - Range { from: '𝙄', to: '𝙄', mapping: Mapped("i") }, - Range { from: '𝙅', to: '𝙅', mapping: Mapped("j") }, - Range { from: '𝙆', to: '𝙆', mapping: Mapped("k") }, - Range { from: '𝙇', to: '𝙇', mapping: Mapped("l") }, - Range { from: '𝙈', to: '𝙈', mapping: Mapped("m") }, - Range { from: '𝙉', to: '𝙉', mapping: Mapped("n") }, - Range { from: '𝙊', to: '𝙊', mapping: Mapped("o") }, - Range { from: '𝙋', to: '𝙋', mapping: Mapped("p") }, - Range { from: '𝙌', to: '𝙌', mapping: Mapped("q") }, - Range { from: '𝙍', to: '𝙍', mapping: Mapped("r") }, - Range { from: '𝙎', to: '𝙎', mapping: Mapped("s") }, - Range { from: '𝙏', to: '𝙏', mapping: Mapped("t") }, - Range { from: '𝙐', to: '𝙐', mapping: Mapped("u") }, - Range { from: '𝙑', to: '𝙑', mapping: Mapped("v") }, - Range { from: '𝙒', to: '𝙒', mapping: Mapped("w") }, - Range { from: '𝙓', to: '𝙓', mapping: Mapped("x") }, - Range { from: '𝙔', to: '𝙔', mapping: Mapped("y") }, - Range { from: '𝙕', to: '𝙕', mapping: Mapped("z") }, - Range { from: '𝙖', to: '𝙖', mapping: Mapped("a") }, - Range { from: '𝙗', to: '𝙗', mapping: Mapped("b") }, - Range { from: '𝙘', to: '𝙘', mapping: Mapped("c") }, - Range { from: '𝙙', to: '𝙙', mapping: Mapped("d") }, - Range { from: '𝙚', to: '𝙚', mapping: Mapped("e") }, - Range { from: '𝙛', to: '𝙛', mapping: Mapped("f") }, - Range { from: '𝙜', to: '𝙜', mapping: Mapped("g") }, - Range { from: '𝙝', to: '𝙝', mapping: Mapped("h") }, - Range { from: '𝙞', to: '𝙞', mapping: Mapped("i") }, - Range { from: '𝙟', to: '𝙟', mapping: Mapped("j") }, - Range { from: '𝙠', to: '𝙠', mapping: Mapped("k") }, - Range { from: '𝙡', to: '𝙡', mapping: Mapped("l") }, - Range { from: '𝙢', to: '𝙢', mapping: Mapped("m") }, - Range { from: '𝙣', to: '𝙣', mapping: Mapped("n") }, - Range { from: '𝙤', to: '𝙤', mapping: Mapped("o") }, - Range { from: '𝙥', to: '𝙥', mapping: Mapped("p") }, - Range { from: '𝙦', to: '𝙦', mapping: Mapped("q") }, - Range { from: '𝙧', to: '𝙧', mapping: Mapped("r") }, - Range { from: '𝙨', to: '𝙨', mapping: Mapped("s") }, - Range { from: '𝙩', to: '𝙩', mapping: Mapped("t") }, - Range { from: '𝙪', to: '𝙪', mapping: Mapped("u") }, - Range { from: '𝙫', to: '𝙫', mapping: Mapped("v") }, - Range { from: '𝙬', to: '𝙬', mapping: Mapped("w") }, - Range { from: '𝙭', to: '𝙭', mapping: Mapped("x") }, - Range { from: '𝙮', to: '𝙮', mapping: Mapped("y") }, - Range { from: '𝙯', to: '𝙯', mapping: Mapped("z") }, - Range { from: '𝙰', to: '𝙰', mapping: Mapped("a") }, - Range { from: '𝙱', to: '𝙱', mapping: Mapped("b") }, - Range { from: '𝙲', to: '𝙲', mapping: Mapped("c") }, - Range { from: '𝙳', to: '𝙳', mapping: Mapped("d") }, - Range { from: '𝙴', to: '𝙴', mapping: Mapped("e") }, - Range { from: '𝙵', to: '𝙵', mapping: Mapped("f") }, - Range { from: '𝙶', to: '𝙶', mapping: Mapped("g") }, - Range { from: '𝙷', to: '𝙷', mapping: Mapped("h") }, - Range { from: '𝙸', to: '𝙸', mapping: Mapped("i") }, - Range { from: '𝙹', to: '𝙹', mapping: Mapped("j") }, - Range { from: '𝙺', to: '𝙺', mapping: Mapped("k") }, - Range { from: '𝙻', to: '𝙻', mapping: Mapped("l") }, - Range { from: '𝙼', to: '𝙼', mapping: Mapped("m") }, - Range { from: '𝙽', to: '𝙽', mapping: Mapped("n") }, - Range { from: '𝙾', to: '𝙾', mapping: Mapped("o") }, - Range { from: '𝙿', to: '𝙿', mapping: Mapped("p") }, - Range { from: '𝚀', to: '𝚀', mapping: Mapped("q") }, - Range { from: '𝚁', to: '𝚁', mapping: Mapped("r") }, - Range { from: '𝚂', to: '𝚂', mapping: Mapped("s") }, - Range { from: '𝚃', to: '𝚃', mapping: Mapped("t") }, - Range { from: '𝚄', to: '𝚄', mapping: Mapped("u") }, - Range { from: '𝚅', to: '𝚅', mapping: Mapped("v") }, - Range { from: '𝚆', to: '𝚆', mapping: Mapped("w") }, - Range { from: '𝚇', to: '𝚇', mapping: Mapped("x") }, - Range { from: '𝚈', to: '𝚈', mapping: Mapped("y") }, - Range { from: '𝚉', to: '𝚉', mapping: Mapped("z") }, - Range { from: '𝚊', to: '𝚊', mapping: Mapped("a") }, - Range { from: '𝚋', to: '𝚋', mapping: Mapped("b") }, - Range { from: '𝚌', to: '𝚌', mapping: Mapped("c") }, - Range { from: '𝚍', to: '𝚍', mapping: Mapped("d") }, - Range { from: '𝚎', to: '𝚎', mapping: Mapped("e") }, - Range { from: '𝚏', to: '𝚏', mapping: Mapped("f") }, - Range { from: '𝚐', to: '𝚐', mapping: Mapped("g") }, - Range { from: '𝚑', to: '𝚑', mapping: Mapped("h") }, - Range { from: '𝚒', to: '𝚒', mapping: Mapped("i") }, - Range { from: '𝚓', to: '𝚓', mapping: Mapped("j") }, - Range { from: '𝚔', to: '𝚔', mapping: Mapped("k") }, - Range { from: '𝚕', to: '𝚕', mapping: Mapped("l") }, - Range { from: '𝚖', to: '𝚖', mapping: Mapped("m") }, - Range { from: '𝚗', to: '𝚗', mapping: Mapped("n") }, - Range { from: '𝚘', to: '𝚘', mapping: Mapped("o") }, - Range { from: '𝚙', to: '𝚙', mapping: Mapped("p") }, - Range { from: '𝚚', to: '𝚚', mapping: Mapped("q") }, - Range { from: '𝚛', to: '𝚛', mapping: Mapped("r") }, - Range { from: '𝚜', to: '𝚜', mapping: Mapped("s") }, - Range { from: '𝚝', to: '𝚝', mapping: Mapped("t") }, - Range { from: '𝚞', to: '𝚞', mapping: Mapped("u") }, - Range { from: '𝚟', to: '𝚟', mapping: Mapped("v") }, - Range { from: '𝚠', to: '𝚠', mapping: Mapped("w") }, - Range { from: '𝚡', to: '𝚡', mapping: Mapped("x") }, - Range { from: '𝚢', to: '𝚢', mapping: Mapped("y") }, - Range { from: '𝚣', to: '𝚣', mapping: Mapped("z") }, - Range { from: '𝚤', to: '𝚤', mapping: Mapped("ı") }, - Range { from: '𝚥', to: '𝚥', mapping: Mapped("ȷ") }, - Range { from: '𝚦', to: '𝚧', mapping: Disallowed }, - Range { from: '𝚨', to: '𝚨', mapping: Mapped("α") }, - Range { from: '𝚩', to: '𝚩', mapping: Mapped("β") }, - Range { from: '𝚪', to: '𝚪', mapping: Mapped("γ") }, - Range { from: '𝚫', to: '𝚫', mapping: Mapped("δ") }, - Range { from: '𝚬', to: '𝚬', mapping: Mapped("ε") }, - Range { from: '𝚭', to: '𝚭', mapping: Mapped("ζ") }, - Range { from: '𝚮', to: '𝚮', mapping: Mapped("η") }, - Range { from: '𝚯', to: '𝚯', mapping: Mapped("θ") }, - Range { from: '𝚰', to: '𝚰', mapping: Mapped("ι") }, - Range { from: '𝚱', to: '𝚱', mapping: Mapped("κ") }, - Range { from: '𝚲', to: '𝚲', mapping: Mapped("λ") }, - Range { from: '𝚳', to: '𝚳', mapping: Mapped("μ") }, - Range { from: '𝚴', to: '𝚴', mapping: Mapped("ν") }, - Range { from: '𝚵', to: '𝚵', mapping: Mapped("ξ") }, - Range { from: '𝚶', to: '𝚶', mapping: Mapped("ο") }, - Range { from: '𝚷', to: '𝚷', mapping: Mapped("π") }, - Range { from: '𝚸', to: '𝚸', mapping: Mapped("ρ") }, - Range { from: '𝚹', to: '𝚹', mapping: Mapped("θ") }, - Range { from: '𝚺', to: '𝚺', mapping: Mapped("σ") }, - Range { from: '𝚻', to: '𝚻', mapping: Mapped("τ") }, - Range { from: '𝚼', to: '𝚼', mapping: Mapped("υ") }, - Range { from: '𝚽', to: '𝚽', mapping: Mapped("φ") }, - Range { from: '𝚾', to: '𝚾', mapping: Mapped("χ") }, - Range { from: '𝚿', to: '𝚿', mapping: Mapped("ψ") }, - Range { from: '𝛀', to: '𝛀', mapping: Mapped("ω") }, - Range { from: '𝛁', to: '𝛁', mapping: Mapped("∇") }, - Range { from: '𝛂', to: '𝛂', mapping: Mapped("α") }, - Range { from: '𝛃', to: '𝛃', mapping: Mapped("β") }, - Range { from: '𝛄', to: '𝛄', mapping: Mapped("γ") }, - Range { from: '𝛅', to: '𝛅', mapping: Mapped("δ") }, - Range { from: '𝛆', to: '𝛆', mapping: Mapped("ε") }, - Range { from: '𝛇', to: '𝛇', mapping: Mapped("ζ") }, - Range { from: '𝛈', to: '𝛈', mapping: Mapped("η") }, - Range { from: '𝛉', to: '𝛉', mapping: Mapped("θ") }, - Range { from: '𝛊', to: '𝛊', mapping: Mapped("ι") }, - Range { from: '𝛋', to: '𝛋', mapping: Mapped("κ") }, - Range { from: '𝛌', to: '𝛌', mapping: Mapped("λ") }, - Range { from: '𝛍', to: '𝛍', mapping: Mapped("μ") }, - Range { from: '𝛎', to: '𝛎', mapping: Mapped("ν") }, - Range { from: '𝛏', to: '𝛏', mapping: Mapped("ξ") }, - Range { from: '𝛐', to: '𝛐', mapping: Mapped("ο") }, - Range { from: '𝛑', to: '𝛑', mapping: Mapped("π") }, - Range { from: '𝛒', to: '𝛒', mapping: Mapped("ρ") }, - Range { from: '𝛓', to: '𝛔', mapping: Mapped("σ") }, - Range { from: '𝛕', to: '𝛕', mapping: Mapped("τ") }, - Range { from: '𝛖', to: '𝛖', mapping: Mapped("υ") }, - Range { from: '𝛗', to: '𝛗', mapping: Mapped("φ") }, - Range { from: '𝛘', to: '𝛘', mapping: Mapped("χ") }, - Range { from: '𝛙', to: '𝛙', mapping: Mapped("ψ") }, - Range { from: '𝛚', to: '𝛚', mapping: Mapped("ω") }, - Range { from: '𝛛', to: '𝛛', mapping: Mapped("∂") }, - Range { from: '𝛜', to: '𝛜', mapping: Mapped("ε") }, - Range { from: '𝛝', to: '𝛝', mapping: Mapped("θ") }, - Range { from: '𝛞', to: '𝛞', mapping: Mapped("κ") }, - Range { from: '𝛟', to: '𝛟', mapping: Mapped("φ") }, - Range { from: '𝛠', to: '𝛠', mapping: Mapped("ρ") }, - Range { from: '𝛡', to: '𝛡', mapping: Mapped("π") }, - Range { from: '𝛢', to: '𝛢', mapping: Mapped("α") }, - Range { from: '𝛣', to: '𝛣', mapping: Mapped("β") }, - Range { from: '𝛤', to: '𝛤', mapping: Mapped("γ") }, - Range { from: '𝛥', to: '𝛥', mapping: Mapped("δ") }, - Range { from: '𝛦', to: '𝛦', mapping: Mapped("ε") }, - Range { from: '𝛧', to: '𝛧', mapping: Mapped("ζ") }, - Range { from: '𝛨', to: '𝛨', mapping: Mapped("η") }, - Range { from: '𝛩', to: '𝛩', mapping: Mapped("θ") }, - Range { from: '𝛪', to: '𝛪', mapping: Mapped("ι") }, - Range { from: '𝛫', to: '𝛫', mapping: Mapped("κ") }, - Range { from: '𝛬', to: '𝛬', mapping: Mapped("λ") }, - Range { from: '𝛭', to: '𝛭', mapping: Mapped("μ") }, - Range { from: '𝛮', to: '𝛮', mapping: Mapped("ν") }, - Range { from: '𝛯', to: '𝛯', mapping: Mapped("ξ") }, - Range { from: '𝛰', to: '𝛰', mapping: Mapped("ο") }, - Range { from: '𝛱', to: '𝛱', mapping: Mapped("π") }, - Range { from: '𝛲', to: '𝛲', mapping: Mapped("ρ") }, - Range { from: '𝛳', to: '𝛳', mapping: Mapped("θ") }, - Range { from: '𝛴', to: '𝛴', mapping: Mapped("σ") }, - Range { from: '𝛵', to: '𝛵', mapping: Mapped("τ") }, - Range { from: '𝛶', to: '𝛶', mapping: Mapped("υ") }, - Range { from: '𝛷', to: '𝛷', mapping: Mapped("φ") }, - Range { from: '𝛸', to: '𝛸', mapping: Mapped("χ") }, - Range { from: '𝛹', to: '𝛹', mapping: Mapped("ψ") }, - Range { from: '𝛺', to: '𝛺', mapping: Mapped("ω") }, - Range { from: '𝛻', to: '𝛻', mapping: Mapped("∇") }, - Range { from: '𝛼', to: '𝛼', mapping: Mapped("α") }, - Range { from: '𝛽', to: '𝛽', mapping: Mapped("β") }, - Range { from: '𝛾', to: '𝛾', mapping: Mapped("γ") }, - Range { from: '𝛿', to: '𝛿', mapping: Mapped("δ") }, - Range { from: '𝜀', to: '𝜀', mapping: Mapped("ε") }, - Range { from: '𝜁', to: '𝜁', mapping: Mapped("ζ") }, - Range { from: '𝜂', to: '𝜂', mapping: Mapped("η") }, - Range { from: '𝜃', to: '𝜃', mapping: Mapped("θ") }, - Range { from: '𝜄', to: '𝜄', mapping: Mapped("ι") }, - Range { from: '𝜅', to: '𝜅', mapping: Mapped("κ") }, - Range { from: '𝜆', to: '𝜆', mapping: Mapped("λ") }, - Range { from: '𝜇', to: '𝜇', mapping: Mapped("μ") }, - Range { from: '𝜈', to: '𝜈', mapping: Mapped("ν") }, - Range { from: '𝜉', to: '𝜉', mapping: Mapped("ξ") }, - Range { from: '𝜊', to: '𝜊', mapping: Mapped("ο") }, - Range { from: '𝜋', to: '𝜋', mapping: Mapped("π") }, - Range { from: '𝜌', to: '𝜌', mapping: Mapped("ρ") }, - Range { from: '𝜍', to: '𝜎', mapping: Mapped("σ") }, - Range { from: '𝜏', to: '𝜏', mapping: Mapped("τ") }, - Range { from: '𝜐', to: '𝜐', mapping: Mapped("υ") }, - Range { from: '𝜑', to: '𝜑', mapping: Mapped("φ") }, - Range { from: '𝜒', to: '𝜒', mapping: Mapped("χ") }, - Range { from: '𝜓', to: '𝜓', mapping: Mapped("ψ") }, - Range { from: '𝜔', to: '𝜔', mapping: Mapped("ω") }, - Range { from: '𝜕', to: '𝜕', mapping: Mapped("∂") }, - Range { from: '𝜖', to: '𝜖', mapping: Mapped("ε") }, - Range { from: '𝜗', to: '𝜗', mapping: Mapped("θ") }, - Range { from: '𝜘', to: '𝜘', mapping: Mapped("κ") }, - Range { from: '𝜙', to: '𝜙', mapping: Mapped("φ") }, - Range { from: '𝜚', to: '𝜚', mapping: Mapped("ρ") }, - Range { from: '𝜛', to: '𝜛', mapping: Mapped("π") }, - Range { from: '𝜜', to: '𝜜', mapping: Mapped("α") }, - Range { from: '𝜝', to: '𝜝', mapping: Mapped("β") }, - Range { from: '𝜞', to: '𝜞', mapping: Mapped("γ") }, - Range { from: '𝜟', to: '𝜟', mapping: Mapped("δ") }, - Range { from: '𝜠', to: '𝜠', mapping: Mapped("ε") }, - Range { from: '𝜡', to: '𝜡', mapping: Mapped("ζ") }, - Range { from: '𝜢', to: '𝜢', mapping: Mapped("η") }, - Range { from: '𝜣', to: '𝜣', mapping: Mapped("θ") }, - Range { from: '𝜤', to: '𝜤', mapping: Mapped("ι") }, - Range { from: '𝜥', to: '𝜥', mapping: Mapped("κ") }, - Range { from: '𝜦', to: '𝜦', mapping: Mapped("λ") }, - Range { from: '𝜧', to: '𝜧', mapping: Mapped("μ") }, - Range { from: '𝜨', to: '𝜨', mapping: Mapped("ν") }, - Range { from: '𝜩', to: '𝜩', mapping: Mapped("ξ") }, - Range { from: '𝜪', to: '𝜪', mapping: Mapped("ο") }, - Range { from: '𝜫', to: '𝜫', mapping: Mapped("π") }, - Range { from: '𝜬', to: '𝜬', mapping: Mapped("ρ") }, - Range { from: '𝜭', to: '𝜭', mapping: Mapped("θ") }, - Range { from: '𝜮', to: '𝜮', mapping: Mapped("σ") }, - Range { from: '𝜯', to: '𝜯', mapping: Mapped("τ") }, - Range { from: '𝜰', to: '𝜰', mapping: Mapped("υ") }, - Range { from: '𝜱', to: '𝜱', mapping: Mapped("φ") }, - Range { from: '𝜲', to: '𝜲', mapping: Mapped("χ") }, - Range { from: '𝜳', to: '𝜳', mapping: Mapped("ψ") }, - Range { from: '𝜴', to: '𝜴', mapping: Mapped("ω") }, - Range { from: '𝜵', to: '𝜵', mapping: Mapped("∇") }, - Range { from: '𝜶', to: '𝜶', mapping: Mapped("α") }, - Range { from: '𝜷', to: '𝜷', mapping: Mapped("β") }, - Range { from: '𝜸', to: '𝜸', mapping: Mapped("γ") }, - Range { from: '𝜹', to: '𝜹', mapping: Mapped("δ") }, - Range { from: '𝜺', to: '𝜺', mapping: Mapped("ε") }, - Range { from: '𝜻', to: '𝜻', mapping: Mapped("ζ") }, - Range { from: '𝜼', to: '𝜼', mapping: Mapped("η") }, - Range { from: '𝜽', to: '𝜽', mapping: Mapped("θ") }, - Range { from: '𝜾', to: '𝜾', mapping: Mapped("ι") }, - Range { from: '𝜿', to: '𝜿', mapping: Mapped("κ") }, - Range { from: '𝝀', to: '𝝀', mapping: Mapped("λ") }, - Range { from: '𝝁', to: '𝝁', mapping: Mapped("μ") }, - Range { from: '𝝂', to: '𝝂', mapping: Mapped("ν") }, - Range { from: '𝝃', to: '𝝃', mapping: Mapped("ξ") }, - Range { from: '𝝄', to: '𝝄', mapping: Mapped("ο") }, - Range { from: '𝝅', to: '𝝅', mapping: Mapped("π") }, - Range { from: '𝝆', to: '𝝆', mapping: Mapped("ρ") }, - Range { from: '𝝇', to: '𝝈', mapping: Mapped("σ") }, - Range { from: '𝝉', to: '𝝉', mapping: Mapped("τ") }, - Range { from: '𝝊', to: '𝝊', mapping: Mapped("υ") }, - Range { from: '𝝋', to: '𝝋', mapping: Mapped("φ") }, - Range { from: '𝝌', to: '𝝌', mapping: Mapped("χ") }, - Range { from: '𝝍', to: '𝝍', mapping: Mapped("ψ") }, - Range { from: '𝝎', to: '𝝎', mapping: Mapped("ω") }, - Range { from: '𝝏', to: '𝝏', mapping: Mapped("∂") }, - Range { from: '𝝐', to: '𝝐', mapping: Mapped("ε") }, - Range { from: '𝝑', to: '𝝑', mapping: Mapped("θ") }, - Range { from: '𝝒', to: '𝝒', mapping: Mapped("κ") }, - Range { from: '𝝓', to: '𝝓', mapping: Mapped("φ") }, - Range { from: '𝝔', to: '𝝔', mapping: Mapped("ρ") }, - Range { from: '𝝕', to: '𝝕', mapping: Mapped("π") }, - Range { from: '𝝖', to: '𝝖', mapping: Mapped("α") }, - Range { from: '𝝗', to: '𝝗', mapping: Mapped("β") }, - Range { from: '𝝘', to: '𝝘', mapping: Mapped("γ") }, - Range { from: '𝝙', to: '𝝙', mapping: Mapped("δ") }, - Range { from: '𝝚', to: '𝝚', mapping: Mapped("ε") }, - Range { from: '𝝛', to: '𝝛', mapping: Mapped("ζ") }, - Range { from: '𝝜', to: '𝝜', mapping: Mapped("η") }, - Range { from: '𝝝', to: '𝝝', mapping: Mapped("θ") }, - Range { from: '𝝞', to: '𝝞', mapping: Mapped("ι") }, - Range { from: '𝝟', to: '𝝟', mapping: Mapped("κ") }, - Range { from: '𝝠', to: '𝝠', mapping: Mapped("λ") }, - Range { from: '𝝡', to: '𝝡', mapping: Mapped("μ") }, - Range { from: '𝝢', to: '𝝢', mapping: Mapped("ν") }, - Range { from: '𝝣', to: '𝝣', mapping: Mapped("ξ") }, - Range { from: '𝝤', to: '𝝤', mapping: Mapped("ο") }, - Range { from: '𝝥', to: '𝝥', mapping: Mapped("π") }, - Range { from: '𝝦', to: '𝝦', mapping: Mapped("ρ") }, - Range { from: '𝝧', to: '𝝧', mapping: Mapped("θ") }, - Range { from: '𝝨', to: '𝝨', mapping: Mapped("σ") }, - Range { from: '𝝩', to: '𝝩', mapping: Mapped("τ") }, - Range { from: '𝝪', to: '𝝪', mapping: Mapped("υ") }, - Range { from: '𝝫', to: '𝝫', mapping: Mapped("φ") }, - Range { from: '𝝬', to: '𝝬', mapping: Mapped("χ") }, - Range { from: '𝝭', to: '𝝭', mapping: Mapped("ψ") }, - Range { from: '𝝮', to: '𝝮', mapping: Mapped("ω") }, - Range { from: '𝝯', to: '𝝯', mapping: Mapped("∇") }, - Range { from: '𝝰', to: '𝝰', mapping: Mapped("α") }, - Range { from: '𝝱', to: '𝝱', mapping: Mapped("β") }, - Range { from: '𝝲', to: '𝝲', mapping: Mapped("γ") }, - Range { from: '𝝳', to: '𝝳', mapping: Mapped("δ") }, - Range { from: '𝝴', to: '𝝴', mapping: Mapped("ε") }, - Range { from: '𝝵', to: '𝝵', mapping: Mapped("ζ") }, - Range { from: '𝝶', to: '𝝶', mapping: Mapped("η") }, - Range { from: '𝝷', to: '𝝷', mapping: Mapped("θ") }, - Range { from: '𝝸', to: '𝝸', mapping: Mapped("ι") }, - Range { from: '𝝹', to: '𝝹', mapping: Mapped("κ") }, - Range { from: '𝝺', to: '𝝺', mapping: Mapped("λ") }, - Range { from: '𝝻', to: '𝝻', mapping: Mapped("μ") }, - Range { from: '𝝼', to: '𝝼', mapping: Mapped("ν") }, - Range { from: '𝝽', to: '𝝽', mapping: Mapped("ξ") }, - Range { from: '𝝾', to: '𝝾', mapping: Mapped("ο") }, - Range { from: '𝝿', to: '𝝿', mapping: Mapped("π") }, - Range { from: '𝞀', to: '𝞀', mapping: Mapped("ρ") }, - Range { from: '𝞁', to: '𝞂', mapping: Mapped("σ") }, - Range { from: '𝞃', to: '𝞃', mapping: Mapped("τ") }, - Range { from: '𝞄', to: '𝞄', mapping: Mapped("υ") }, - Range { from: '𝞅', to: '𝞅', mapping: Mapped("φ") }, - Range { from: '𝞆', to: '𝞆', mapping: Mapped("χ") }, - Range { from: '𝞇', to: '𝞇', mapping: Mapped("ψ") }, - Range { from: '𝞈', to: '𝞈', mapping: Mapped("ω") }, - Range { from: '𝞉', to: '𝞉', mapping: Mapped("∂") }, - Range { from: '𝞊', to: '𝞊', mapping: Mapped("ε") }, - Range { from: '𝞋', to: '𝞋', mapping: Mapped("θ") }, - Range { from: '𝞌', to: '𝞌', mapping: Mapped("κ") }, - Range { from: '𝞍', to: '𝞍', mapping: Mapped("φ") }, - Range { from: '𝞎', to: '𝞎', mapping: Mapped("ρ") }, - Range { from: '𝞏', to: '𝞏', mapping: Mapped("π") }, - Range { from: '𝞐', to: '𝞐', mapping: Mapped("α") }, - Range { from: '𝞑', to: '𝞑', mapping: Mapped("β") }, - Range { from: '𝞒', to: '𝞒', mapping: Mapped("γ") }, - Range { from: '𝞓', to: '𝞓', mapping: Mapped("δ") }, - Range { from: '𝞔', to: '𝞔', mapping: Mapped("ε") }, - Range { from: '𝞕', to: '𝞕', mapping: Mapped("ζ") }, - Range { from: '𝞖', to: '𝞖', mapping: Mapped("η") }, - Range { from: '𝞗', to: '𝞗', mapping: Mapped("θ") }, - Range { from: '𝞘', to: '𝞘', mapping: Mapped("ι") }, - Range { from: '𝞙', to: '𝞙', mapping: Mapped("κ") }, - Range { from: '𝞚', to: '𝞚', mapping: Mapped("λ") }, - Range { from: '𝞛', to: '𝞛', mapping: Mapped("μ") }, - Range { from: '𝞜', to: '𝞜', mapping: Mapped("ν") }, - Range { from: '𝞝', to: '𝞝', mapping: Mapped("ξ") }, - Range { from: '𝞞', to: '𝞞', mapping: Mapped("ο") }, - Range { from: '𝞟', to: '𝞟', mapping: Mapped("π") }, - Range { from: '𝞠', to: '𝞠', mapping: Mapped("ρ") }, - Range { from: '𝞡', to: '𝞡', mapping: Mapped("θ") }, - Range { from: '𝞢', to: '𝞢', mapping: Mapped("σ") }, - Range { from: '𝞣', to: '𝞣', mapping: Mapped("τ") }, - Range { from: '𝞤', to: '𝞤', mapping: Mapped("υ") }, - Range { from: '𝞥', to: '𝞥', mapping: Mapped("φ") }, - Range { from: '𝞦', to: '𝞦', mapping: Mapped("χ") }, - Range { from: '𝞧', to: '𝞧', mapping: Mapped("ψ") }, - Range { from: '𝞨', to: '𝞨', mapping: Mapped("ω") }, - Range { from: '𝞩', to: '𝞩', mapping: Mapped("∇") }, - Range { from: '𝞪', to: '𝞪', mapping: Mapped("α") }, - Range { from: '𝞫', to: '𝞫', mapping: Mapped("β") }, - Range { from: '𝞬', to: '𝞬', mapping: Mapped("γ") }, - Range { from: '𝞭', to: '𝞭', mapping: Mapped("δ") }, - Range { from: '𝞮', to: '𝞮', mapping: Mapped("ε") }, - Range { from: '𝞯', to: '𝞯', mapping: Mapped("ζ") }, - Range { from: '𝞰', to: '𝞰', mapping: Mapped("η") }, - Range { from: '𝞱', to: '𝞱', mapping: Mapped("θ") }, - Range { from: '𝞲', to: '𝞲', mapping: Mapped("ι") }, - Range { from: '𝞳', to: '𝞳', mapping: Mapped("κ") }, - Range { from: '𝞴', to: '𝞴', mapping: Mapped("λ") }, - Range { from: '𝞵', to: '𝞵', mapping: Mapped("μ") }, - Range { from: '𝞶', to: '𝞶', mapping: Mapped("ν") }, - Range { from: '𝞷', to: '𝞷', mapping: Mapped("ξ") }, - Range { from: '𝞸', to: '𝞸', mapping: Mapped("ο") }, - Range { from: '𝞹', to: '𝞹', mapping: Mapped("π") }, - Range { from: '𝞺', to: '𝞺', mapping: Mapped("ρ") }, - Range { from: '𝞻', to: '𝞼', mapping: Mapped("σ") }, - Range { from: '𝞽', to: '𝞽', mapping: Mapped("τ") }, - Range { from: '𝞾', to: '𝞾', mapping: Mapped("υ") }, - Range { from: '𝞿', to: '𝞿', mapping: Mapped("φ") }, - Range { from: '𝟀', to: '𝟀', mapping: Mapped("χ") }, - Range { from: '𝟁', to: '𝟁', mapping: Mapped("ψ") }, - Range { from: '𝟂', to: '𝟂', mapping: Mapped("ω") }, - Range { from: '𝟃', to: '𝟃', mapping: Mapped("∂") }, - Range { from: '𝟄', to: '𝟄', mapping: Mapped("ε") }, - Range { from: '𝟅', to: '𝟅', mapping: Mapped("θ") }, - Range { from: '𝟆', to: '𝟆', mapping: Mapped("κ") }, - Range { from: '𝟇', to: '𝟇', mapping: Mapped("φ") }, - Range { from: '𝟈', to: '𝟈', mapping: Mapped("ρ") }, - Range { from: '𝟉', to: '𝟉', mapping: Mapped("π") }, - Range { from: '𝟊', to: '𝟋', mapping: Mapped("ϝ") }, - Range { from: '𝟌', to: '𝟍', mapping: Disallowed }, - Range { from: '𝟎', to: '𝟎', mapping: Mapped("0") }, - Range { from: '𝟏', to: '𝟏', mapping: Mapped("1") }, - Range { from: '𝟐', to: '𝟐', mapping: Mapped("2") }, - Range { from: '𝟑', to: '𝟑', mapping: Mapped("3") }, - Range { from: '𝟒', to: '𝟒', mapping: Mapped("4") }, - Range { from: '𝟓', to: '𝟓', mapping: Mapped("5") }, - Range { from: '𝟔', to: '𝟔', mapping: Mapped("6") }, - Range { from: '𝟕', to: '𝟕', mapping: Mapped("7") }, - Range { from: '𝟖', to: '𝟖', mapping: Mapped("8") }, - Range { from: '𝟗', to: '𝟗', mapping: Mapped("9") }, - Range { from: '𝟘', to: '𝟘', mapping: Mapped("0") }, - Range { from: '𝟙', to: '𝟙', mapping: Mapped("1") }, - Range { from: '𝟚', to: '𝟚', mapping: Mapped("2") }, - Range { from: '𝟛', to: '𝟛', mapping: Mapped("3") }, - Range { from: '𝟜', to: '𝟜', mapping: Mapped("4") }, - Range { from: '𝟝', to: '𝟝', mapping: Mapped("5") }, - Range { from: '𝟞', to: '𝟞', mapping: Mapped("6") }, - Range { from: '𝟟', to: '𝟟', mapping: Mapped("7") }, - Range { from: '𝟠', to: '𝟠', mapping: Mapped("8") }, - Range { from: '𝟡', to: '𝟡', mapping: Mapped("9") }, - Range { from: '𝟢', to: '𝟢', mapping: Mapped("0") }, - Range { from: '𝟣', to: '𝟣', mapping: Mapped("1") }, - Range { from: '𝟤', to: '𝟤', mapping: Mapped("2") }, - Range { from: '𝟥', to: '𝟥', mapping: Mapped("3") }, - Range { from: '𝟦', to: '𝟦', mapping: Mapped("4") }, - Range { from: '𝟧', to: '𝟧', mapping: Mapped("5") }, - Range { from: '𝟨', to: '𝟨', mapping: Mapped("6") }, - Range { from: '𝟩', to: '𝟩', mapping: Mapped("7") }, - Range { from: '𝟪', to: '𝟪', mapping: Mapped("8") }, - Range { from: '𝟫', to: '𝟫', mapping: Mapped("9") }, - Range { from: '𝟬', to: '𝟬', mapping: Mapped("0") }, - Range { from: '𝟭', to: '𝟭', mapping: Mapped("1") }, - Range { from: '𝟮', to: '𝟮', mapping: Mapped("2") }, - Range { from: '𝟯', to: '𝟯', mapping: Mapped("3") }, - Range { from: '𝟰', to: '𝟰', mapping: Mapped("4") }, - Range { from: '𝟱', to: '𝟱', mapping: Mapped("5") }, - Range { from: '𝟲', to: '𝟲', mapping: Mapped("6") }, - Range { from: '𝟳', to: '𝟳', mapping: Mapped("7") }, - Range { from: '𝟴', to: '𝟴', mapping: Mapped("8") }, - Range { from: '𝟵', to: '𝟵', mapping: Mapped("9") }, - Range { from: '𝟶', to: '𝟶', mapping: Mapped("0") }, - Range { from: '𝟷', to: '𝟷', mapping: Mapped("1") }, - Range { from: '𝟸', to: '𝟸', mapping: Mapped("2") }, - Range { from: '𝟹', to: '𝟹', mapping: Mapped("3") }, - Range { from: '𝟺', to: '𝟺', mapping: Mapped("4") }, - Range { from: '𝟻', to: '𝟻', mapping: Mapped("5") }, - Range { from: '𝟼', to: '𝟼', mapping: Mapped("6") }, - Range { from: '𝟽', to: '𝟽', mapping: Mapped("7") }, - Range { from: '𝟾', to: '𝟾', mapping: Mapped("8") }, - Range { from: '𝟿', to: '𝟿', mapping: Mapped("9") }, - Range { from: '𝠀', to: '𝧿', mapping: Valid }, - Range { from: '𝨀', to: '𝨶', mapping: Valid }, - Range { from: '𝨷', to: '𝨺', mapping: Valid }, - Range { from: '𝨻', to: '𝩬', mapping: Valid }, - Range { from: '𝩭', to: '𝩴', mapping: Valid }, - Range { from: '𝩵', to: '𝩵', mapping: Valid }, - Range { from: '𝩶', to: '𝪃', mapping: Valid }, - Range { from: '𝪄', to: '𝪄', mapping: Valid }, - Range { from: '𝪅', to: '𝪋', mapping: Valid }, - Range { from: '𝪌', to: '𝪚', mapping: Disallowed }, - Range { from: '𝪛', to: '𝪟', mapping: Valid }, - Range { from: '𝪠', to: '𝪠', mapping: Disallowed }, - Range { from: '𝪡', to: '𝪯', mapping: Valid }, - Range { from: '𝪰', to: '𞟿', mapping: Disallowed }, - Range { from: '𞠀', to: '𞣄', mapping: Valid }, - Range { from: '𞣅', to: '𞣆', mapping: Disallowed }, - Range { from: '𞣇', to: '𞣏', mapping: Valid }, - Range { from: '𞣐', to: '𞣖', mapping: Valid }, - Range { from: '𞣗', to: '𞷿', mapping: Disallowed }, - Range { from: '𞸀', to: '𞸀', mapping: Mapped("ا") }, - Range { from: '𞸁', to: '𞸁', mapping: Mapped("ب") }, - Range { from: '𞸂', to: '𞸂', mapping: Mapped("ج") }, - Range { from: '𞸃', to: '𞸃', mapping: Mapped("د") }, - Range { from: '𞸄', to: '𞸄', mapping: Disallowed }, - Range { from: '𞸅', to: '𞸅', mapping: Mapped("و") }, - Range { from: '𞸆', to: '𞸆', mapping: Mapped("ز") }, - Range { from: '𞸇', to: '𞸇', mapping: Mapped("ح") }, - Range { from: '𞸈', to: '𞸈', mapping: Mapped("ط") }, - Range { from: '𞸉', to: '𞸉', mapping: Mapped("ي") }, - Range { from: '𞸊', to: '𞸊', mapping: Mapped("ك") }, - Range { from: '𞸋', to: '𞸋', mapping: Mapped("ل") }, - Range { from: '𞸌', to: '𞸌', mapping: Mapped("م") }, - Range { from: '𞸍', to: '𞸍', mapping: Mapped("ن") }, - Range { from: '𞸎', to: '𞸎', mapping: Mapped("س") }, - Range { from: '𞸏', to: '𞸏', mapping: Mapped("ع") }, - Range { from: '𞸐', to: '𞸐', mapping: Mapped("ف") }, - Range { from: '𞸑', to: '𞸑', mapping: Mapped("ص") }, - Range { from: '𞸒', to: '𞸒', mapping: Mapped("ق") }, - Range { from: '𞸓', to: '𞸓', mapping: Mapped("ر") }, - Range { from: '𞸔', to: '𞸔', mapping: Mapped("ش") }, - Range { from: '𞸕', to: '𞸕', mapping: Mapped("ت") }, - Range { from: '𞸖', to: '𞸖', mapping: Mapped("ث") }, - Range { from: '𞸗', to: '𞸗', mapping: Mapped("خ") }, - Range { from: '𞸘', to: '𞸘', mapping: Mapped("ذ") }, - Range { from: '𞸙', to: '𞸙', mapping: Mapped("ض") }, - Range { from: '𞸚', to: '𞸚', mapping: Mapped("ظ") }, - Range { from: '𞸛', to: '𞸛', mapping: Mapped("غ") }, - Range { from: '𞸜', to: '𞸜', mapping: Mapped("ٮ") }, - Range { from: '𞸝', to: '𞸝', mapping: Mapped("ں") }, - Range { from: '𞸞', to: '𞸞', mapping: Mapped("ڡ") }, - Range { from: '𞸟', to: '𞸟', mapping: Mapped("ٯ") }, - Range { from: '𞸠', to: '𞸠', mapping: Disallowed }, - Range { from: '𞸡', to: '𞸡', mapping: Mapped("ب") }, - Range { from: '𞸢', to: '𞸢', mapping: Mapped("ج") }, - Range { from: '𞸣', to: '𞸣', mapping: Disallowed }, - Range { from: '𞸤', to: '𞸤', mapping: Mapped("ه") }, - Range { from: '𞸥', to: '𞸦', mapping: Disallowed }, - Range { from: '𞸧', to: '𞸧', mapping: Mapped("ح") }, - Range { from: '𞸨', to: '𞸨', mapping: Disallowed }, - Range { from: '𞸩', to: '𞸩', mapping: Mapped("ي") }, - Range { from: '𞸪', to: '𞸪', mapping: Mapped("ك") }, - Range { from: '𞸫', to: '𞸫', mapping: Mapped("ل") }, - Range { from: '𞸬', to: '𞸬', mapping: Mapped("م") }, - Range { from: '𞸭', to: '𞸭', mapping: Mapped("ن") }, - Range { from: '𞸮', to: '𞸮', mapping: Mapped("س") }, - Range { from: '𞸯', to: '𞸯', mapping: Mapped("ع") }, - Range { from: '𞸰', to: '𞸰', mapping: Mapped("ف") }, - Range { from: '𞸱', to: '𞸱', mapping: Mapped("ص") }, - Range { from: '𞸲', to: '𞸲', mapping: Mapped("ق") }, - Range { from: '𞸳', to: '𞸳', mapping: Disallowed }, - Range { from: '𞸴', to: '𞸴', mapping: Mapped("ش") }, - Range { from: '𞸵', to: '𞸵', mapping: Mapped("ت") }, - Range { from: '𞸶', to: '𞸶', mapping: Mapped("ث") }, - Range { from: '𞸷', to: '𞸷', mapping: Mapped("خ") }, - Range { from: '𞸸', to: '𞸸', mapping: Disallowed }, - Range { from: '𞸹', to: '𞸹', mapping: Mapped("ض") }, - Range { from: '𞸺', to: '𞸺', mapping: Disallowed }, - Range { from: '𞸻', to: '𞸻', mapping: Mapped("غ") }, - Range { from: '𞸼', to: '𞹁', mapping: Disallowed }, - Range { from: '𞹂', to: '𞹂', mapping: Mapped("ج") }, - Range { from: '𞹃', to: '𞹆', mapping: Disallowed }, - Range { from: '𞹇', to: '𞹇', mapping: Mapped("ح") }, - Range { from: '𞹈', to: '𞹈', mapping: Disallowed }, - Range { from: '𞹉', to: '𞹉', mapping: Mapped("ي") }, - Range { from: '𞹊', to: '𞹊', mapping: Disallowed }, - Range { from: '𞹋', to: '𞹋', mapping: Mapped("ل") }, - Range { from: '𞹌', to: '𞹌', mapping: Disallowed }, - Range { from: '𞹍', to: '𞹍', mapping: Mapped("ن") }, - Range { from: '𞹎', to: '𞹎', mapping: Mapped("س") }, - Range { from: '𞹏', to: '𞹏', mapping: Mapped("ع") }, - Range { from: '𞹐', to: '𞹐', mapping: Disallowed }, - Range { from: '𞹑', to: '𞹑', mapping: Mapped("ص") }, - Range { from: '𞹒', to: '𞹒', mapping: Mapped("ق") }, - Range { from: '𞹓', to: '𞹓', mapping: Disallowed }, - Range { from: '𞹔', to: '𞹔', mapping: Mapped("ش") }, - Range { from: '𞹕', to: '𞹖', mapping: Disallowed }, - Range { from: '𞹗', to: '𞹗', mapping: Mapped("خ") }, - Range { from: '𞹘', to: '𞹘', mapping: Disallowed }, - Range { from: '𞹙', to: '𞹙', mapping: Mapped("ض") }, - Range { from: '𞹚', to: '𞹚', mapping: Disallowed }, - Range { from: '𞹛', to: '𞹛', mapping: Mapped("غ") }, - Range { from: '𞹜', to: '𞹜', mapping: Disallowed }, - Range { from: '𞹝', to: '𞹝', mapping: Mapped("ں") }, - Range { from: '𞹞', to: '𞹞', mapping: Disallowed }, - Range { from: '𞹟', to: '𞹟', mapping: Mapped("ٯ") }, - Range { from: '𞹠', to: '𞹠', mapping: Disallowed }, - Range { from: '𞹡', to: '𞹡', mapping: Mapped("ب") }, - Range { from: '𞹢', to: '𞹢', mapping: Mapped("ج") }, - Range { from: '𞹣', to: '𞹣', mapping: Disallowed }, - Range { from: '𞹤', to: '𞹤', mapping: Mapped("ه") }, - Range { from: '𞹥', to: '𞹦', mapping: Disallowed }, - Range { from: '𞹧', to: '𞹧', mapping: Mapped("ح") }, - Range { from: '𞹨', to: '𞹨', mapping: Mapped("ط") }, - Range { from: '𞹩', to: '𞹩', mapping: Mapped("ي") }, - Range { from: '𞹪', to: '𞹪', mapping: Mapped("ك") }, - Range { from: '𞹫', to: '𞹫', mapping: Disallowed }, - Range { from: '𞹬', to: '𞹬', mapping: Mapped("م") }, - Range { from: '𞹭', to: '𞹭', mapping: Mapped("ن") }, - Range { from: '𞹮', to: '𞹮', mapping: Mapped("س") }, - Range { from: '𞹯', to: '𞹯', mapping: Mapped("ع") }, - Range { from: '𞹰', to: '𞹰', mapping: Mapped("ف") }, - Range { from: '𞹱', to: '𞹱', mapping: Mapped("ص") }, - Range { from: '𞹲', to: '𞹲', mapping: Mapped("ق") }, - Range { from: '𞹳', to: '𞹳', mapping: Disallowed }, - Range { from: '𞹴', to: '𞹴', mapping: Mapped("ش") }, - Range { from: '𞹵', to: '𞹵', mapping: Mapped("ت") }, - Range { from: '𞹶', to: '𞹶', mapping: Mapped("ث") }, - Range { from: '𞹷', to: '𞹷', mapping: Mapped("خ") }, - Range { from: '𞹸', to: '𞹸', mapping: Disallowed }, - Range { from: '𞹹', to: '𞹹', mapping: Mapped("ض") }, - Range { from: '𞹺', to: '𞹺', mapping: Mapped("ظ") }, - Range { from: '𞹻', to: '𞹻', mapping: Mapped("غ") }, - Range { from: '𞹼', to: '𞹼', mapping: Mapped("ٮ") }, - Range { from: '𞹽', to: '𞹽', mapping: Disallowed }, - Range { from: '𞹾', to: '𞹾', mapping: Mapped("ڡ") }, - Range { from: '𞹿', to: '𞹿', mapping: Disallowed }, - Range { from: '𞺀', to: '𞺀', mapping: Mapped("ا") }, - Range { from: '𞺁', to: '𞺁', mapping: Mapped("ب") }, - Range { from: '𞺂', to: '𞺂', mapping: Mapped("ج") }, - Range { from: '𞺃', to: '𞺃', mapping: Mapped("د") }, - Range { from: '𞺄', to: '𞺄', mapping: Mapped("ه") }, - Range { from: '𞺅', to: '𞺅', mapping: Mapped("و") }, - Range { from: '𞺆', to: '𞺆', mapping: Mapped("ز") }, - Range { from: '𞺇', to: '𞺇', mapping: Mapped("ح") }, - Range { from: '𞺈', to: '𞺈', mapping: Mapped("ط") }, - Range { from: '𞺉', to: '𞺉', mapping: Mapped("ي") }, - Range { from: '𞺊', to: '𞺊', mapping: Disallowed }, - Range { from: '𞺋', to: '𞺋', mapping: Mapped("ل") }, - Range { from: '𞺌', to: '𞺌', mapping: Mapped("م") }, - Range { from: '𞺍', to: '𞺍', mapping: Mapped("ن") }, - Range { from: '𞺎', to: '𞺎', mapping: Mapped("س") }, - Range { from: '𞺏', to: '𞺏', mapping: Mapped("ع") }, - Range { from: '𞺐', to: '𞺐', mapping: Mapped("ف") }, - Range { from: '𞺑', to: '𞺑', mapping: Mapped("ص") }, - Range { from: '𞺒', to: '𞺒', mapping: Mapped("ق") }, - Range { from: '𞺓', to: '𞺓', mapping: Mapped("ر") }, - Range { from: '𞺔', to: '𞺔', mapping: Mapped("ش") }, - Range { from: '𞺕', to: '𞺕', mapping: Mapped("ت") }, - Range { from: '𞺖', to: '𞺖', mapping: Mapped("ث") }, - Range { from: '𞺗', to: '𞺗', mapping: Mapped("خ") }, - Range { from: '𞺘', to: '𞺘', mapping: Mapped("ذ") }, - Range { from: '𞺙', to: '𞺙', mapping: Mapped("ض") }, - Range { from: '𞺚', to: '𞺚', mapping: Mapped("ظ") }, - Range { from: '𞺛', to: '𞺛', mapping: Mapped("غ") }, - Range { from: '𞺜', to: '𞺠', mapping: Disallowed }, - Range { from: '𞺡', to: '𞺡', mapping: Mapped("ب") }, - Range { from: '𞺢', to: '𞺢', mapping: Mapped("ج") }, - Range { from: '𞺣', to: '𞺣', mapping: Mapped("د") }, - Range { from: '𞺤', to: '𞺤', mapping: Disallowed }, - Range { from: '𞺥', to: '𞺥', mapping: Mapped("و") }, - Range { from: '𞺦', to: '𞺦', mapping: Mapped("ز") }, - Range { from: '𞺧', to: '𞺧', mapping: Mapped("ح") }, - Range { from: '𞺨', to: '𞺨', mapping: Mapped("ط") }, - Range { from: '𞺩', to: '𞺩', mapping: Mapped("ي") }, - Range { from: '𞺪', to: '𞺪', mapping: Disallowed }, - Range { from: '𞺫', to: '𞺫', mapping: Mapped("ل") }, - Range { from: '𞺬', to: '𞺬', mapping: Mapped("م") }, - Range { from: '𞺭', to: '𞺭', mapping: Mapped("ن") }, - Range { from: '𞺮', to: '𞺮', mapping: Mapped("س") }, - Range { from: '𞺯', to: '𞺯', mapping: Mapped("ع") }, - Range { from: '𞺰', to: '𞺰', mapping: Mapped("ف") }, - Range { from: '𞺱', to: '𞺱', mapping: Mapped("ص") }, - Range { from: '𞺲', to: '𞺲', mapping: Mapped("ق") }, - Range { from: '𞺳', to: '𞺳', mapping: Mapped("ر") }, - Range { from: '𞺴', to: '𞺴', mapping: Mapped("ش") }, - Range { from: '𞺵', to: '𞺵', mapping: Mapped("ت") }, - Range { from: '𞺶', to: '𞺶', mapping: Mapped("ث") }, - Range { from: '𞺷', to: '𞺷', mapping: Mapped("خ") }, - Range { from: '𞺸', to: '𞺸', mapping: Mapped("ذ") }, - Range { from: '𞺹', to: '𞺹', mapping: Mapped("ض") }, - Range { from: '𞺺', to: '𞺺', mapping: Mapped("ظ") }, - Range { from: '𞺻', to: '𞺻', mapping: Mapped("غ") }, - Range { from: '𞺼', to: '𞻯', mapping: Disallowed }, - Range { from: '𞻰', to: '𞻱', mapping: Valid }, - Range { from: '𞻲', to: '𞿿', mapping: Disallowed }, - Range { from: '🀀', to: '🀫', mapping: Valid }, - Range { from: '🀬', to: '🀯', mapping: Disallowed }, - Range { from: '🀰', to: '🂓', mapping: Valid }, - Range { from: '🂔', to: '🂟', mapping: Disallowed }, - Range { from: '🂠', to: '🂮', mapping: Valid }, - Range { from: '🂯', to: '🂰', mapping: Disallowed }, - Range { from: '🂱', to: '🂾', mapping: Valid }, - Range { from: '🂿', to: '🂿', mapping: Valid }, - Range { from: '🃀', to: '🃀', mapping: Disallowed }, - Range { from: '🃁', to: '🃏', mapping: Valid }, - Range { from: '🃐', to: '🃐', mapping: Disallowed }, - Range { from: '🃑', to: '🃟', mapping: Valid }, - Range { from: '🃠', to: '🃵', mapping: Valid }, - Range { from: '🃶', to: '🃿', mapping: Disallowed }, - Range { from: '🄀', to: '🄀', mapping: Disallowed }, - Range { from: '🄁', to: '🄁', mapping: DisallowedStd3Mapped("0,") }, - Range { from: '🄂', to: '🄂', mapping: DisallowedStd3Mapped("1,") }, - Range { from: '🄃', to: '🄃', mapping: DisallowedStd3Mapped("2,") }, - Range { from: '🄄', to: '🄄', mapping: DisallowedStd3Mapped("3,") }, - Range { from: '🄅', to: '🄅', mapping: DisallowedStd3Mapped("4,") }, - Range { from: '🄆', to: '🄆', mapping: DisallowedStd3Mapped("5,") }, - Range { from: '🄇', to: '🄇', mapping: DisallowedStd3Mapped("6,") }, - Range { from: '🄈', to: '🄈', mapping: DisallowedStd3Mapped("7,") }, - Range { from: '🄉', to: '🄉', mapping: DisallowedStd3Mapped("8,") }, - Range { from: '🄊', to: '🄊', mapping: DisallowedStd3Mapped("9,") }, - Range { from: '🄋', to: '🄌', mapping: Valid }, - Range { from: '🄍', to: '🄏', mapping: Disallowed }, - Range { from: '🄐', to: '🄐', mapping: DisallowedStd3Mapped("(a)") }, - Range { from: '🄑', to: '🄑', mapping: DisallowedStd3Mapped("(b)") }, - Range { from: '🄒', to: '🄒', mapping: DisallowedStd3Mapped("(c)") }, - Range { from: '🄓', to: '🄓', mapping: DisallowedStd3Mapped("(d)") }, - Range { from: '🄔', to: '🄔', mapping: DisallowedStd3Mapped("(e)") }, - Range { from: '🄕', to: '🄕', mapping: DisallowedStd3Mapped("(f)") }, - Range { from: '🄖', to: '🄖', mapping: DisallowedStd3Mapped("(g)") }, - Range { from: '🄗', to: '🄗', mapping: DisallowedStd3Mapped("(h)") }, - Range { from: '🄘', to: '🄘', mapping: DisallowedStd3Mapped("(i)") }, - Range { from: '🄙', to: '🄙', mapping: DisallowedStd3Mapped("(j)") }, - Range { from: '🄚', to: '🄚', mapping: DisallowedStd3Mapped("(k)") }, - Range { from: '🄛', to: '🄛', mapping: DisallowedStd3Mapped("(l)") }, - Range { from: '🄜', to: '🄜', mapping: DisallowedStd3Mapped("(m)") }, - Range { from: '🄝', to: '🄝', mapping: DisallowedStd3Mapped("(n)") }, - Range { from: '🄞', to: '🄞', mapping: DisallowedStd3Mapped("(o)") }, - Range { from: '🄟', to: '🄟', mapping: DisallowedStd3Mapped("(p)") }, - Range { from: '🄠', to: '🄠', mapping: DisallowedStd3Mapped("(q)") }, - Range { from: '🄡', to: '🄡', mapping: DisallowedStd3Mapped("(r)") }, - Range { from: '🄢', to: '🄢', mapping: DisallowedStd3Mapped("(s)") }, - Range { from: '🄣', to: '🄣', mapping: DisallowedStd3Mapped("(t)") }, - Range { from: '🄤', to: '🄤', mapping: DisallowedStd3Mapped("(u)") }, - Range { from: '🄥', to: '🄥', mapping: DisallowedStd3Mapped("(v)") }, - Range { from: '🄦', to: '🄦', mapping: DisallowedStd3Mapped("(w)") }, - Range { from: '🄧', to: '🄧', mapping: DisallowedStd3Mapped("(x)") }, - Range { from: '🄨', to: '🄨', mapping: DisallowedStd3Mapped("(y)") }, - Range { from: '🄩', to: '🄩', mapping: DisallowedStd3Mapped("(z)") }, - Range { from: '🄪', to: '🄪', mapping: Mapped("〔s〕") }, - Range { from: '🄫', to: '🄫', mapping: Mapped("c") }, - Range { from: '🄬', to: '🄬', mapping: Mapped("r") }, - Range { from: '🄭', to: '🄭', mapping: Mapped("cd") }, - Range { from: '🄮', to: '🄮', mapping: Mapped("wz") }, - Range { from: '🄯', to: '🄯', mapping: Disallowed }, - Range { from: '🄰', to: '🄰', mapping: Mapped("a") }, - Range { from: '🄱', to: '🄱', mapping: Mapped("b") }, - Range { from: '🄲', to: '🄲', mapping: Mapped("c") }, - Range { from: '🄳', to: '🄳', mapping: Mapped("d") }, - Range { from: '🄴', to: '🄴', mapping: Mapped("e") }, - Range { from: '🄵', to: '🄵', mapping: Mapped("f") }, - Range { from: '🄶', to: '🄶', mapping: Mapped("g") }, - Range { from: '🄷', to: '🄷', mapping: Mapped("h") }, - Range { from: '🄸', to: '🄸', mapping: Mapped("i") }, - Range { from: '🄹', to: '🄹', mapping: Mapped("j") }, - Range { from: '🄺', to: '🄺', mapping: Mapped("k") }, - Range { from: '🄻', to: '🄻', mapping: Mapped("l") }, - Range { from: '🄼', to: '🄼', mapping: Mapped("m") }, - Range { from: '🄽', to: '🄽', mapping: Mapped("n") }, - Range { from: '🄾', to: '🄾', mapping: Mapped("o") }, - Range { from: '🄿', to: '🄿', mapping: Mapped("p") }, - Range { from: '🅀', to: '🅀', mapping: Mapped("q") }, - Range { from: '🅁', to: '🅁', mapping: Mapped("r") }, - Range { from: '🅂', to: '🅂', mapping: Mapped("s") }, - Range { from: '🅃', to: '🅃', mapping: Mapped("t") }, - Range { from: '🅄', to: '🅄', mapping: Mapped("u") }, - Range { from: '🅅', to: '🅅', mapping: Mapped("v") }, - Range { from: '🅆', to: '🅆', mapping: Mapped("w") }, - Range { from: '🅇', to: '🅇', mapping: Mapped("x") }, - Range { from: '🅈', to: '🅈', mapping: Mapped("y") }, - Range { from: '🅉', to: '🅉', mapping: Mapped("z") }, - Range { from: '🅊', to: '🅊', mapping: Mapped("hv") }, - Range { from: '🅋', to: '🅋', mapping: Mapped("mv") }, - Range { from: '🅌', to: '🅌', mapping: Mapped("sd") }, - Range { from: '🅍', to: '🅍', mapping: Mapped("ss") }, - Range { from: '🅎', to: '🅎', mapping: Mapped("ppv") }, - Range { from: '🅏', to: '🅏', mapping: Mapped("wc") }, - Range { from: '🅐', to: '🅖', mapping: Valid }, - Range { from: '🅗', to: '🅗', mapping: Valid }, - Range { from: '🅘', to: '🅞', mapping: Valid }, - Range { from: '🅟', to: '🅟', mapping: Valid }, - Range { from: '🅠', to: '🅩', mapping: Valid }, - Range { from: '🅪', to: '🅪', mapping: Mapped("mc") }, - Range { from: '🅫', to: '🅫', mapping: Mapped("md") }, - Range { from: '🅬', to: '🅯', mapping: Disallowed }, - Range { from: '🅰', to: '🅸', mapping: Valid }, - Range { from: '🅹', to: '🅹', mapping: Valid }, - Range { from: '🅺', to: '🅺', mapping: Valid }, - Range { from: '🅻', to: '🅼', mapping: Valid }, - Range { from: '🅽', to: '🅾', mapping: Valid }, - Range { from: '🅿', to: '🅿', mapping: Valid }, - Range { from: '🆀', to: '🆉', mapping: Valid }, - Range { from: '🆊', to: '🆍', mapping: Valid }, - Range { from: '🆎', to: '🆏', mapping: Valid }, - Range { from: '🆐', to: '🆐', mapping: Mapped("dj") }, - Range { from: '🆑', to: '🆚', mapping: Valid }, - Range { from: '🆛', to: '🇥', mapping: Disallowed }, - Range { from: '🇦', to: '🇿', mapping: Valid }, - Range { from: '🈀', to: '🈀', mapping: Mapped("ほか") }, - Range { from: '🈁', to: '🈁', mapping: Mapped("ココ") }, - Range { from: '🈂', to: '🈂', mapping: Mapped("サ") }, - Range { from: '🈃', to: '🈏', mapping: Disallowed }, - Range { from: '🈐', to: '🈐', mapping: Mapped("手") }, - Range { from: '🈑', to: '🈑', mapping: Mapped("字") }, - Range { from: '🈒', to: '🈒', mapping: Mapped("双") }, - Range { from: '🈓', to: '🈓', mapping: Mapped("デ") }, - Range { from: '🈔', to: '🈔', mapping: Mapped("二") }, - Range { from: '🈕', to: '🈕', mapping: Mapped("多") }, - Range { from: '🈖', to: '🈖', mapping: Mapped("解") }, - Range { from: '🈗', to: '🈗', mapping: Mapped("天") }, - Range { from: '🈘', to: '🈘', mapping: Mapped("交") }, - Range { from: '🈙', to: '🈙', mapping: Mapped("映") }, - Range { from: '🈚', to: '🈚', mapping: Mapped("無") }, - Range { from: '🈛', to: '🈛', mapping: Mapped("料") }, - Range { from: '🈜', to: '🈜', mapping: Mapped("前") }, - Range { from: '🈝', to: '🈝', mapping: Mapped("後") }, - Range { from: '🈞', to: '🈞', mapping: Mapped("再") }, - Range { from: '🈟', to: '🈟', mapping: Mapped("新") }, - Range { from: '🈠', to: '🈠', mapping: Mapped("初") }, - Range { from: '🈡', to: '🈡', mapping: Mapped("終") }, - Range { from: '🈢', to: '🈢', mapping: Mapped("生") }, - Range { from: '🈣', to: '🈣', mapping: Mapped("販") }, - Range { from: '🈤', to: '🈤', mapping: Mapped("声") }, - Range { from: '🈥', to: '🈥', mapping: Mapped("吹") }, - Range { from: '🈦', to: '🈦', mapping: Mapped("演") }, - Range { from: '🈧', to: '🈧', mapping: Mapped("投") }, - Range { from: '🈨', to: '🈨', mapping: Mapped("捕") }, - Range { from: '🈩', to: '🈩', mapping: Mapped("一") }, - Range { from: '🈪', to: '🈪', mapping: Mapped("三") }, - Range { from: '🈫', to: '🈫', mapping: Mapped("遊") }, - Range { from: '🈬', to: '🈬', mapping: Mapped("左") }, - Range { from: '🈭', to: '🈭', mapping: Mapped("中") }, - Range { from: '🈮', to: '🈮', mapping: Mapped("右") }, - Range { from: '🈯', to: '🈯', mapping: Mapped("指") }, - Range { from: '🈰', to: '🈰', mapping: Mapped("走") }, - Range { from: '🈱', to: '🈱', mapping: Mapped("打") }, - Range { from: '🈲', to: '🈲', mapping: Mapped("禁") }, - Range { from: '🈳', to: '🈳', mapping: Mapped("空") }, - Range { from: '🈴', to: '🈴', mapping: Mapped("合") }, - Range { from: '🈵', to: '🈵', mapping: Mapped("満") }, - Range { from: '🈶', to: '🈶', mapping: Mapped("有") }, - Range { from: '🈷', to: '🈷', mapping: Mapped("月") }, - Range { from: '🈸', to: '🈸', mapping: Mapped("申") }, - Range { from: '🈹', to: '🈹', mapping: Mapped("割") }, - Range { from: '🈺', to: '🈺', mapping: Mapped("営") }, - Range { from: '🈻', to: '🈿', mapping: Disallowed }, - Range { from: '🉀', to: '🉀', mapping: Mapped("〔本〕") }, - Range { from: '🉁', to: '🉁', mapping: Mapped("〔三〕") }, - Range { from: '🉂', to: '🉂', mapping: Mapped("〔二〕") }, - Range { from: '🉃', to: '🉃', mapping: Mapped("〔安〕") }, - Range { from: '🉄', to: '🉄', mapping: Mapped("〔点〕") }, - Range { from: '🉅', to: '🉅', mapping: Mapped("〔打〕") }, - Range { from: '🉆', to: '🉆', mapping: Mapped("〔盗〕") }, - Range { from: '🉇', to: '🉇', mapping: Mapped("〔勝〕") }, - Range { from: '🉈', to: '🉈', mapping: Mapped("〔敗〕") }, - Range { from: '🉉', to: '🉏', mapping: Disallowed }, - Range { from: '🉐', to: '🉐', mapping: Mapped("得") }, - Range { from: '🉑', to: '🉑', mapping: Mapped("可") }, - Range { from: '🉒', to: '🋿', mapping: Disallowed }, - Range { from: '🌀', to: '🌠', mapping: Valid }, - Range { from: '🌡', to: '🌬', mapping: Valid }, - Range { from: '🌭', to: '🌯', mapping: Valid }, - Range { from: '🌰', to: '🌵', mapping: Valid }, - Range { from: '🌶', to: '🌶', mapping: Valid }, - Range { from: '🌷', to: '🍼', mapping: Valid }, - Range { from: '🍽', to: '🍽', mapping: Valid }, - Range { from: '🍾', to: '🍿', mapping: Valid }, - Range { from: '🎀', to: '🎓', mapping: Valid }, - Range { from: '🎔', to: '🎟', mapping: Valid }, - Range { from: '🎠', to: '🏄', mapping: Valid }, - Range { from: '🏅', to: '🏅', mapping: Valid }, - Range { from: '🏆', to: '🏊', mapping: Valid }, - Range { from: '🏋', to: '🏎', mapping: Valid }, - Range { from: '🏏', to: '🏓', mapping: Valid }, - Range { from: '🏔', to: '🏟', mapping: Valid }, - Range { from: '🏠', to: '🏰', mapping: Valid }, - Range { from: '🏱', to: '🏷', mapping: Valid }, - Range { from: '🏸', to: '🏿', mapping: Valid }, - Range { from: '🐀', to: '🐾', mapping: Valid }, - Range { from: '🐿', to: '🐿', mapping: Valid }, - Range { from: '👀', to: '👀', mapping: Valid }, - Range { from: '👁', to: '👁', mapping: Valid }, - Range { from: '👂', to: '📷', mapping: Valid }, - Range { from: '📸', to: '📸', mapping: Valid }, - Range { from: '📹', to: '📼', mapping: Valid }, - Range { from: '📽', to: '📾', mapping: Valid }, - Range { from: '📿', to: '📿', mapping: Valid }, - Range { from: '🔀', to: '🔽', mapping: Valid }, - Range { from: '🔾', to: '🔿', mapping: Valid }, - Range { from: '🕀', to: '🕃', mapping: Valid }, - Range { from: '🕄', to: '🕊', mapping: Valid }, - Range { from: '🕋', to: '🕏', mapping: Valid }, - Range { from: '🕐', to: '🕧', mapping: Valid }, - Range { from: '🕨', to: '🕹', mapping: Valid }, - Range { from: '🕺', to: '🕺', mapping: Disallowed }, - Range { from: '🕻', to: '🖣', mapping: Valid }, - Range { from: '🖤', to: '🖤', mapping: Disallowed }, - Range { from: '🖥', to: '🗺', mapping: Valid }, - Range { from: '🗻', to: '🗿', mapping: Valid }, - Range { from: '😀', to: '😀', mapping: Valid }, - Range { from: '😁', to: '😐', mapping: Valid }, - Range { from: '😑', to: '😑', mapping: Valid }, - Range { from: '😒', to: '😔', mapping: Valid }, - Range { from: '😕', to: '😕', mapping: Valid }, - Range { from: '😖', to: '😖', mapping: Valid }, - Range { from: '😗', to: '😗', mapping: Valid }, - Range { from: '😘', to: '😘', mapping: Valid }, - Range { from: '😙', to: '😙', mapping: Valid }, - Range { from: '😚', to: '😚', mapping: Valid }, - Range { from: '😛', to: '😛', mapping: Valid }, - Range { from: '😜', to: '😞', mapping: Valid }, - Range { from: '😟', to: '😟', mapping: Valid }, - Range { from: '😠', to: '😥', mapping: Valid }, - Range { from: '😦', to: '😧', mapping: Valid }, - Range { from: '😨', to: '😫', mapping: Valid }, - Range { from: '😬', to: '😬', mapping: Valid }, - Range { from: '😭', to: '😭', mapping: Valid }, - Range { from: '😮', to: '😯', mapping: Valid }, - Range { from: '😰', to: '😳', mapping: Valid }, - Range { from: '😴', to: '😴', mapping: Valid }, - Range { from: '😵', to: '🙀', mapping: Valid }, - Range { from: '🙁', to: '🙂', mapping: Valid }, - Range { from: '🙃', to: '🙄', mapping: Valid }, - Range { from: '🙅', to: '🙏', mapping: Valid }, - Range { from: '🙐', to: '🙿', mapping: Valid }, - Range { from: '🚀', to: '🛅', mapping: Valid }, - Range { from: '🛆', to: '🛏', mapping: Valid }, - Range { from: '🛐', to: '🛐', mapping: Valid }, - Range { from: '🛑', to: '🛟', mapping: Disallowed }, - Range { from: '🛠', to: '🛬', mapping: Valid }, - Range { from: '🛭', to: '🛯', mapping: Disallowed }, - Range { from: '🛰', to: '🛳', mapping: Valid }, - Range { from: '🛴', to: '🛿', mapping: Disallowed }, - Range { from: '🜀', to: '🝳', mapping: Valid }, - Range { from: '🝴', to: '🝿', mapping: Disallowed }, - Range { from: '🞀', to: '🟔', mapping: Valid }, - Range { from: '🟕', to: '🟿', mapping: Disallowed }, - Range { from: '🠀', to: '🠋', mapping: Valid }, - Range { from: '🠌', to: '🠏', mapping: Disallowed }, - Range { from: '🠐', to: '🡇', mapping: Valid }, - Range { from: '🡈', to: '🡏', mapping: Disallowed }, - Range { from: '🡐', to: '🡙', mapping: Valid }, - Range { from: '🡚', to: '🡟', mapping: Disallowed }, - Range { from: '🡠', to: '🢇', mapping: Valid }, - Range { from: '🢈', to: '🢏', mapping: Disallowed }, - Range { from: '🢐', to: '🢭', mapping: Valid }, - Range { from: '🢮', to: '🤏', mapping: Disallowed }, - Range { from: '🤐', to: '🤘', mapping: Valid }, - Range { from: '🤙', to: '🥿', mapping: Disallowed }, - Range { from: '🦀', to: '🦄', mapping: Valid }, - Range { from: '🦅', to: '🦿', mapping: Disallowed }, - Range { from: '🧀', to: '🧀', mapping: Valid }, - Range { from: '🧁', to: '🿽', mapping: Disallowed }, - Range { from: '🿾', to: '🿿', mapping: Disallowed }, - Range { from: '𠀀', to: '𪛖', mapping: Valid }, - Range { from: '𪛗', to: '𪛿', mapping: Disallowed }, - Range { from: '𪜀', to: '𫜴', mapping: Valid }, - Range { from: '𫜵', to: '𫜿', mapping: Disallowed }, - Range { from: '𫝀', to: '𫠝', mapping: Valid }, - Range { from: '𫠞', to: '𫠟', mapping: Disallowed }, - Range { from: '𫠠', to: '𬺡', mapping: Valid }, - Range { from: '𬺢', to: '𯟿', mapping: Disallowed }, - Range { from: '丽', to: '丽', mapping: Mapped("丽") }, - Range { from: '丸', to: '丸', mapping: Mapped("丸") }, - Range { from: '乁', to: '乁', mapping: Mapped("乁") }, - Range { from: '𠄢', to: '𠄢', mapping: Mapped("𠄢") }, - Range { from: '你', to: '你', mapping: Mapped("你") }, - Range { from: '侮', to: '侮', mapping: Mapped("侮") }, - Range { from: '侻', to: '侻', mapping: Mapped("侻") }, - Range { from: '倂', to: '倂', mapping: Mapped("倂") }, - Range { from: '偺', to: '偺', mapping: Mapped("偺") }, - Range { from: '備', to: '備', mapping: Mapped("備") }, - Range { from: '僧', to: '僧', mapping: Mapped("僧") }, - Range { from: '像', to: '像', mapping: Mapped("像") }, - Range { from: '㒞', to: '㒞', mapping: Mapped("㒞") }, - Range { from: '𠘺', to: '𠘺', mapping: Mapped("𠘺") }, - Range { from: '免', to: '免', mapping: Mapped("免") }, - Range { from: '兔', to: '兔', mapping: Mapped("兔") }, - Range { from: '兤', to: '兤', mapping: Mapped("兤") }, - Range { from: '具', to: '具', mapping: Mapped("具") }, - Range { from: '𠔜', to: '𠔜', mapping: Mapped("𠔜") }, - Range { from: '㒹', to: '㒹', mapping: Mapped("㒹") }, - Range { from: '內', to: '內', mapping: Mapped("內") }, - Range { from: '再', to: '再', mapping: Mapped("再") }, - Range { from: '𠕋', to: '𠕋', mapping: Mapped("𠕋") }, - Range { from: '冗', to: '冗', mapping: Mapped("冗") }, - Range { from: '冤', to: '冤', mapping: Mapped("冤") }, - Range { from: '仌', to: '仌', mapping: Mapped("仌") }, - Range { from: '冬', to: '冬', mapping: Mapped("冬") }, - Range { from: '况', to: '况', mapping: Mapped("况") }, - Range { from: '𩇟', to: '𩇟', mapping: Mapped("𩇟") }, - Range { from: '凵', to: '凵', mapping: Mapped("凵") }, - Range { from: '刃', to: '刃', mapping: Mapped("刃") }, - Range { from: '㓟', to: '㓟', mapping: Mapped("㓟") }, - Range { from: '刻', to: '刻', mapping: Mapped("刻") }, - Range { from: '剆', to: '剆', mapping: Mapped("剆") }, - Range { from: '割', to: '割', mapping: Mapped("割") }, - Range { from: '剷', to: '剷', mapping: Mapped("剷") }, - Range { from: '㔕', to: '㔕', mapping: Mapped("㔕") }, - Range { from: '勇', to: '勇', mapping: Mapped("勇") }, - Range { from: '勉', to: '勉', mapping: Mapped("勉") }, - Range { from: '勤', to: '勤', mapping: Mapped("勤") }, - Range { from: '勺', to: '勺', mapping: Mapped("勺") }, - Range { from: '包', to: '包', mapping: Mapped("包") }, - Range { from: '匆', to: '匆', mapping: Mapped("匆") }, - Range { from: '北', to: '北', mapping: Mapped("北") }, - Range { from: '卉', to: '卉', mapping: Mapped("卉") }, - Range { from: '卑', to: '卑', mapping: Mapped("卑") }, - Range { from: '博', to: '博', mapping: Mapped("博") }, - Range { from: '即', to: '即', mapping: Mapped("即") }, - Range { from: '卽', to: '卽', mapping: Mapped("卽") }, - Range { from: '卿', to: '卿', mapping: Mapped("卿") }, - Range { from: '𠨬', to: '𠨬', mapping: Mapped("𠨬") }, - Range { from: '灰', to: '灰', mapping: Mapped("灰") }, - Range { from: '及', to: '及', mapping: Mapped("及") }, - Range { from: '叟', to: '叟', mapping: Mapped("叟") }, - Range { from: '𠭣', to: '𠭣', mapping: Mapped("𠭣") }, - Range { from: '叫', to: '叫', mapping: Mapped("叫") }, - Range { from: '叱', to: '叱', mapping: Mapped("叱") }, - Range { from: '吆', to: '吆', mapping: Mapped("吆") }, - Range { from: '咞', to: '咞', mapping: Mapped("咞") }, - Range { from: '吸', to: '吸', mapping: Mapped("吸") }, - Range { from: '呈', to: '呈', mapping: Mapped("呈") }, - Range { from: '周', to: '周', mapping: Mapped("周") }, - Range { from: '咢', to: '咢', mapping: Mapped("咢") }, - Range { from: '哶', to: '哶', mapping: Mapped("哶") }, - Range { from: '唐', to: '唐', mapping: Mapped("唐") }, - Range { from: '啓', to: '啓', mapping: Mapped("啓") }, - Range { from: '啣', to: '啣', mapping: Mapped("啣") }, - Range { from: '善', to: '善', mapping: Mapped("善") }, - Range { from: '喙', to: '喙', mapping: Mapped("喙") }, - Range { from: '喫', to: '喫', mapping: Mapped("喫") }, - Range { from: '喳', to: '喳', mapping: Mapped("喳") }, - Range { from: '嗂', to: '嗂', mapping: Mapped("嗂") }, - Range { from: '圖', to: '圖', mapping: Mapped("圖") }, - Range { from: '嘆', to: '嘆', mapping: Mapped("嘆") }, - Range { from: '圗', to: '圗', mapping: Mapped("圗") }, - Range { from: '噑', to: '噑', mapping: Mapped("噑") }, - Range { from: '噴', to: '噴', mapping: Mapped("噴") }, - Range { from: '切', to: '切', mapping: Mapped("切") }, - Range { from: '壮', to: '壮', mapping: Mapped("壮") }, - Range { from: '城', to: '城', mapping: Mapped("城") }, - Range { from: '埴', to: '埴', mapping: Mapped("埴") }, - Range { from: '堍', to: '堍', mapping: Mapped("堍") }, - Range { from: '型', to: '型', mapping: Mapped("型") }, - Range { from: '堲', to: '堲', mapping: Mapped("堲") }, - Range { from: '報', to: '報', mapping: Mapped("報") }, - Range { from: '墬', to: '墬', mapping: Mapped("墬") }, - Range { from: '𡓤', to: '𡓤', mapping: Mapped("𡓤") }, - Range { from: '売', to: '売', mapping: Mapped("売") }, - Range { from: '壷', to: '壷', mapping: Mapped("壷") }, - Range { from: '夆', to: '夆', mapping: Mapped("夆") }, - Range { from: '多', to: '多', mapping: Mapped("多") }, - Range { from: '夢', to: '夢', mapping: Mapped("夢") }, - Range { from: '奢', to: '奢', mapping: Mapped("奢") }, - Range { from: '𡚨', to: '𡚨', mapping: Mapped("𡚨") }, - Range { from: '𡛪', to: '𡛪', mapping: Mapped("𡛪") }, - Range { from: '姬', to: '姬', mapping: Mapped("姬") }, - Range { from: '娛', to: '娛', mapping: Mapped("娛") }, - Range { from: '娧', to: '娧', mapping: Mapped("娧") }, - Range { from: '姘', to: '姘', mapping: Mapped("姘") }, - Range { from: '婦', to: '婦', mapping: Mapped("婦") }, - Range { from: '㛮', to: '㛮', mapping: Mapped("㛮") }, - Range { from: '㛼', to: '㛼', mapping: Disallowed }, - Range { from: '嬈', to: '嬈', mapping: Mapped("嬈") }, - Range { from: '嬾', to: '嬾', mapping: Mapped("嬾") }, - Range { from: '𡧈', to: '𡧈', mapping: Mapped("𡧈") }, - Range { from: '寃', to: '寃', mapping: Mapped("寃") }, - Range { from: '寘', to: '寘', mapping: Mapped("寘") }, - Range { from: '寧', to: '寧', mapping: Mapped("寧") }, - Range { from: '寳', to: '寳', mapping: Mapped("寳") }, - Range { from: '𡬘', to: '𡬘', mapping: Mapped("𡬘") }, - Range { from: '寿', to: '寿', mapping: Mapped("寿") }, - Range { from: '将', to: '将', mapping: Mapped("将") }, - Range { from: '当', to: '当', mapping: Disallowed }, - Range { from: '尢', to: '尢', mapping: Mapped("尢") }, - Range { from: '㞁', to: '㞁', mapping: Mapped("㞁") }, - Range { from: '屠', to: '屠', mapping: Mapped("屠") }, - Range { from: '屮', to: '屮', mapping: Mapped("屮") }, - Range { from: '峀', to: '峀', mapping: Mapped("峀") }, - Range { from: '岍', to: '岍', mapping: Mapped("岍") }, - Range { from: '𡷤', to: '𡷤', mapping: Mapped("𡷤") }, - Range { from: '嵃', to: '嵃', mapping: Mapped("嵃") }, - Range { from: '𡷦', to: '𡷦', mapping: Mapped("𡷦") }, - Range { from: '嵮', to: '嵮', mapping: Mapped("嵮") }, - Range { from: '嵫', to: '嵫', mapping: Mapped("嵫") }, - Range { from: '嵼', to: '嵼', mapping: Mapped("嵼") }, - Range { from: '巡', to: '巡', mapping: Mapped("巡") }, - Range { from: '巢', to: '巢', mapping: Mapped("巢") }, - Range { from: '㠯', to: '㠯', mapping: Mapped("㠯") }, - Range { from: '巽', to: '巽', mapping: Mapped("巽") }, - Range { from: '帨', to: '帨', mapping: Mapped("帨") }, - Range { from: '帽', to: '帽', mapping: Mapped("帽") }, - Range { from: '幩', to: '幩', mapping: Mapped("幩") }, - Range { from: '㡢', to: '㡢', mapping: Mapped("㡢") }, - Range { from: '𢆃', to: '𢆃', mapping: Mapped("𢆃") }, - Range { from: '㡼', to: '㡼', mapping: Mapped("㡼") }, - Range { from: '庰', to: '庰', mapping: Mapped("庰") }, - Range { from: '庳', to: '庳', mapping: Mapped("庳") }, - Range { from: '庶', to: '庶', mapping: Mapped("庶") }, - Range { from: '廊', to: '廊', mapping: Mapped("廊") }, - Range { from: '𪎒', to: '𪎒', mapping: Mapped("𪎒") }, - Range { from: '廾', to: '廾', mapping: Mapped("廾") }, - Range { from: '𢌱', to: '𢌱', mapping: Mapped("𢌱") }, - Range { from: '舁', to: '舁', mapping: Mapped("舁") }, - Range { from: '弢', to: '弢', mapping: Mapped("弢") }, - Range { from: '㣇', to: '㣇', mapping: Mapped("㣇") }, - Range { from: '𣊸', to: '𣊸', mapping: Mapped("𣊸") }, - Range { from: '𦇚', to: '𦇚', mapping: Mapped("𦇚") }, - Range { from: '形', to: '形', mapping: Mapped("形") }, - Range { from: '彫', to: '彫', mapping: Mapped("彫") }, - Range { from: '㣣', to: '㣣', mapping: Mapped("㣣") }, - Range { from: '徚', to: '徚', mapping: Mapped("徚") }, - Range { from: '忍', to: '忍', mapping: Mapped("忍") }, - Range { from: '志', to: '志', mapping: Mapped("志") }, - Range { from: '忹', to: '忹', mapping: Mapped("忹") }, - Range { from: '悁', to: '悁', mapping: Mapped("悁") }, - Range { from: '㤺', to: '㤺', mapping: Mapped("㤺") }, - Range { from: '㤜', to: '㤜', mapping: Mapped("㤜") }, - Range { from: '悔', to: '悔', mapping: Mapped("悔") }, - Range { from: '𢛔', to: '𢛔', mapping: Mapped("𢛔") }, - Range { from: '惇', to: '惇', mapping: Mapped("惇") }, - Range { from: '慈', to: '慈', mapping: Mapped("慈") }, - Range { from: '慌', to: '慌', mapping: Mapped("慌") }, - Range { from: '慎', to: '慎', mapping: Mapped("慎") }, - Range { from: '慌', to: '慌', mapping: Mapped("慌") }, - Range { from: '慺', to: '慺', mapping: Mapped("慺") }, - Range { from: '憎', to: '憎', mapping: Mapped("憎") }, - Range { from: '憲', to: '憲', mapping: Mapped("憲") }, - Range { from: '憤', to: '憤', mapping: Mapped("憤") }, - Range { from: '憯', to: '憯', mapping: Mapped("憯") }, - Range { from: '懞', to: '懞', mapping: Mapped("懞") }, - Range { from: '懲', to: '懲', mapping: Mapped("懲") }, - Range { from: '懶', to: '懶', mapping: Mapped("懶") }, - Range { from: '成', to: '成', mapping: Mapped("成") }, - Range { from: '戛', to: '戛', mapping: Mapped("戛") }, - Range { from: '扝', to: '扝', mapping: Mapped("扝") }, - Range { from: '抱', to: '抱', mapping: Mapped("抱") }, - Range { from: '拔', to: '拔', mapping: Mapped("拔") }, - Range { from: '捐', to: '捐', mapping: Mapped("捐") }, - Range { from: '𢬌', to: '𢬌', mapping: Mapped("𢬌") }, - Range { from: '挽', to: '挽', mapping: Mapped("挽") }, - Range { from: '拼', to: '拼', mapping: Mapped("拼") }, - Range { from: '捨', to: '捨', mapping: Mapped("捨") }, - Range { from: '掃', to: '掃', mapping: Mapped("掃") }, - Range { from: '揤', to: '揤', mapping: Mapped("揤") }, - Range { from: '𢯱', to: '𢯱', mapping: Mapped("𢯱") }, - Range { from: '搢', to: '搢', mapping: Mapped("搢") }, - Range { from: '揅', to: '揅', mapping: Mapped("揅") }, - Range { from: '掩', to: '掩', mapping: Mapped("掩") }, - Range { from: '㨮', to: '㨮', mapping: Mapped("㨮") }, - Range { from: '摩', to: '摩', mapping: Mapped("摩") }, - Range { from: '摾', to: '摾', mapping: Mapped("摾") }, - Range { from: '撝', to: '撝', mapping: Mapped("撝") }, - Range { from: '摷', to: '摷', mapping: Mapped("摷") }, - Range { from: '㩬', to: '㩬', mapping: Mapped("㩬") }, - Range { from: '敏', to: '敏', mapping: Mapped("敏") }, - Range { from: '敬', to: '敬', mapping: Mapped("敬") }, - Range { from: '𣀊', to: '𣀊', mapping: Mapped("𣀊") }, - Range { from: '旣', to: '旣', mapping: Mapped("旣") }, - Range { from: '書', to: '書', mapping: Mapped("書") }, - Range { from: '晉', to: '晉', mapping: Mapped("晉") }, - Range { from: '㬙', to: '㬙', mapping: Mapped("㬙") }, - Range { from: '暑', to: '暑', mapping: Mapped("暑") }, - Range { from: '㬈', to: '㬈', mapping: Mapped("㬈") }, - Range { from: '㫤', to: '㫤', mapping: Mapped("㫤") }, - Range { from: '冒', to: '冒', mapping: Mapped("冒") }, - Range { from: '冕', to: '冕', mapping: Mapped("冕") }, - Range { from: '最', to: '最', mapping: Mapped("最") }, - Range { from: '暜', to: '暜', mapping: Mapped("暜") }, - Range { from: '肭', to: '肭', mapping: Mapped("肭") }, - Range { from: '䏙', to: '䏙', mapping: Mapped("䏙") }, - Range { from: '朗', to: '朗', mapping: Mapped("朗") }, - Range { from: '望', to: '望', mapping: Mapped("望") }, - Range { from: '朡', to: '朡', mapping: Mapped("朡") }, - Range { from: '杞', to: '杞', mapping: Mapped("杞") }, - Range { from: '杓', to: '杓', mapping: Mapped("杓") }, - Range { from: '𣏃', to: '𣏃', mapping: Mapped("𣏃") }, - Range { from: '㭉', to: '㭉', mapping: Mapped("㭉") }, - Range { from: '柺', to: '柺', mapping: Mapped("柺") }, - Range { from: '枅', to: '枅', mapping: Mapped("枅") }, - Range { from: '桒', to: '桒', mapping: Mapped("桒") }, - Range { from: '梅', to: '梅', mapping: Mapped("梅") }, - Range { from: '𣑭', to: '𣑭', mapping: Mapped("𣑭") }, - Range { from: '梎', to: '梎', mapping: Mapped("梎") }, - Range { from: '栟', to: '栟', mapping: Mapped("栟") }, - Range { from: '椔', to: '椔', mapping: Mapped("椔") }, - Range { from: '㮝', to: '㮝', mapping: Mapped("㮝") }, - Range { from: '楂', to: '楂', mapping: Mapped("楂") }, - Range { from: '榣', to: '榣', mapping: Mapped("榣") }, - Range { from: '槪', to: '槪', mapping: Mapped("槪") }, - Range { from: '檨', to: '檨', mapping: Mapped("檨") }, - Range { from: '𣚣', to: '𣚣', mapping: Mapped("𣚣") }, - Range { from: '櫛', to: '櫛', mapping: Mapped("櫛") }, - Range { from: '㰘', to: '㰘', mapping: Mapped("㰘") }, - Range { from: '次', to: '次', mapping: Mapped("次") }, - Range { from: '𣢧', to: '𣢧', mapping: Mapped("𣢧") }, - Range { from: '歔', to: '歔', mapping: Mapped("歔") }, - Range { from: '㱎', to: '㱎', mapping: Mapped("㱎") }, - Range { from: '歲', to: '歲', mapping: Mapped("歲") }, - Range { from: '殟', to: '殟', mapping: Mapped("殟") }, - Range { from: '殺', to: '殺', mapping: Mapped("殺") }, - Range { from: '殻', to: '殻', mapping: Mapped("殻") }, - Range { from: '𣪍', to: '𣪍', mapping: Mapped("𣪍") }, - Range { from: '𡴋', to: '𡴋', mapping: Mapped("𡴋") }, - Range { from: '𣫺', to: '𣫺', mapping: Mapped("𣫺") }, - Range { from: '汎', to: '汎', mapping: Mapped("汎") }, - Range { from: '𣲼', to: '𣲼', mapping: Mapped("𣲼") }, - Range { from: '沿', to: '沿', mapping: Mapped("沿") }, - Range { from: '泍', to: '泍', mapping: Mapped("泍") }, - Range { from: '汧', to: '汧', mapping: Mapped("汧") }, - Range { from: '洖', to: '洖', mapping: Mapped("洖") }, - Range { from: '派', to: '派', mapping: Mapped("派") }, - Range { from: '海', to: '海', mapping: Mapped("海") }, - Range { from: '流', to: '流', mapping: Mapped("流") }, - Range { from: '浩', to: '浩', mapping: Mapped("浩") }, - Range { from: '浸', to: '浸', mapping: Mapped("浸") }, - Range { from: '涅', to: '涅', mapping: Mapped("涅") }, - Range { from: '𣴞', to: '𣴞', mapping: Mapped("𣴞") }, - Range { from: '洴', to: '洴', mapping: Mapped("洴") }, - Range { from: '港', to: '港', mapping: Mapped("港") }, - Range { from: '湮', to: '湮', mapping: Mapped("湮") }, - Range { from: '㴳', to: '㴳', mapping: Mapped("㴳") }, - Range { from: '滋', to: '滋', mapping: Mapped("滋") }, - Range { from: '滇', to: '滇', mapping: Mapped("滇") }, - Range { from: '𣻑', to: '𣻑', mapping: Mapped("𣻑") }, - Range { from: '淹', to: '淹', mapping: Mapped("淹") }, - Range { from: '潮', to: '潮', mapping: Mapped("潮") }, - Range { from: '𣽞', to: '𣽞', mapping: Mapped("𣽞") }, - Range { from: '𣾎', to: '𣾎', mapping: Mapped("𣾎") }, - Range { from: '濆', to: '濆', mapping: Mapped("濆") }, - Range { from: '瀹', to: '瀹', mapping: Mapped("瀹") }, - Range { from: '瀞', to: '瀞', mapping: Mapped("瀞") }, - Range { from: '瀛', to: '瀛', mapping: Mapped("瀛") }, - Range { from: '㶖', to: '㶖', mapping: Mapped("㶖") }, - Range { from: '灊', to: '灊', mapping: Mapped("灊") }, - Range { from: '災', to: '災', mapping: Mapped("災") }, - Range { from: '灷', to: '灷', mapping: Mapped("灷") }, - Range { from: '炭', to: '炭', mapping: Mapped("炭") }, - Range { from: '𠔥', to: '𠔥', mapping: Mapped("𠔥") }, - Range { from: '煅', to: '煅', mapping: Mapped("煅") }, - Range { from: '𤉣', to: '𤉣', mapping: Mapped("𤉣") }, - Range { from: '熜', to: '熜', mapping: Mapped("熜") }, - Range { from: '𤎫', to: '𤎫', mapping: Disallowed }, - Range { from: '爨', to: '爨', mapping: Mapped("爨") }, - Range { from: '爵', to: '爵', mapping: Mapped("爵") }, - Range { from: '牐', to: '牐', mapping: Mapped("牐") }, - Range { from: '𤘈', to: '𤘈', mapping: Mapped("𤘈") }, - Range { from: '犀', to: '犀', mapping: Mapped("犀") }, - Range { from: '犕', to: '犕', mapping: Mapped("犕") }, - Range { from: '𤜵', to: '𤜵', mapping: Mapped("𤜵") }, - Range { from: '𤠔', to: '𤠔', mapping: Mapped("𤠔") }, - Range { from: '獺', to: '獺', mapping: Mapped("獺") }, - Range { from: '王', to: '王', mapping: Mapped("王") }, - Range { from: '㺬', to: '㺬', mapping: Mapped("㺬") }, - Range { from: '玥', to: '玥', mapping: Mapped("玥") }, - Range { from: '㺸', to: '㺸', mapping: Mapped("㺸") }, - Range { from: '瑇', to: '瑇', mapping: Mapped("瑇") }, - Range { from: '瑜', to: '瑜', mapping: Mapped("瑜") }, - Range { from: '瑱', to: '瑱', mapping: Mapped("瑱") }, - Range { from: '璅', to: '璅', mapping: Mapped("璅") }, - Range { from: '瓊', to: '瓊', mapping: Mapped("瓊") }, - Range { from: '㼛', to: '㼛', mapping: Mapped("㼛") }, - Range { from: '甤', to: '甤', mapping: Mapped("甤") }, - Range { from: '𤰶', to: '𤰶', mapping: Mapped("𤰶") }, - Range { from: '甾', to: '甾', mapping: Mapped("甾") }, - Range { from: '𤲒', to: '𤲒', mapping: Mapped("𤲒") }, - Range { from: '異', to: '異', mapping: Mapped("異") }, - Range { from: '𢆟', to: '𢆟', mapping: Mapped("𢆟") }, - Range { from: '瘐', to: '瘐', mapping: Mapped("瘐") }, - Range { from: '𤾡', to: '𤾡', mapping: Mapped("𤾡") }, - Range { from: '𤾸', to: '𤾸', mapping: Mapped("𤾸") }, - Range { from: '𥁄', to: '𥁄', mapping: Mapped("𥁄") }, - Range { from: '㿼', to: '㿼', mapping: Mapped("㿼") }, - Range { from: '䀈', to: '䀈', mapping: Mapped("䀈") }, - Range { from: '直', to: '直', mapping: Mapped("直") }, - Range { from: '𥃳', to: '𥃳', mapping: Mapped("𥃳") }, - Range { from: '𥃲', to: '𥃲', mapping: Mapped("𥃲") }, - Range { from: '𥄙', to: '𥄙', mapping: Mapped("𥄙") }, - Range { from: '𥄳', to: '𥄳', mapping: Mapped("𥄳") }, - Range { from: '眞', to: '眞', mapping: Mapped("眞") }, - Range { from: '真', to: '真', mapping: Mapped("真") }, - Range { from: '睊', to: '睊', mapping: Mapped("睊") }, - Range { from: '䀹', to: '䀹', mapping: Mapped("䀹") }, - Range { from: '瞋', to: '瞋', mapping: Mapped("瞋") }, - Range { from: '䁆', to: '䁆', mapping: Mapped("䁆") }, - Range { from: '䂖', to: '䂖', mapping: Mapped("䂖") }, - Range { from: '𥐝', to: '𥐝', mapping: Mapped("𥐝") }, - Range { from: '硎', to: '硎', mapping: Mapped("硎") }, - Range { from: '碌', to: '碌', mapping: Mapped("碌") }, - Range { from: '磌', to: '磌', mapping: Mapped("磌") }, - Range { from: '䃣', to: '䃣', mapping: Mapped("䃣") }, - Range { from: '𥘦', to: '𥘦', mapping: Mapped("𥘦") }, - Range { from: '祖', to: '祖', mapping: Mapped("祖") }, - Range { from: '𥚚', to: '𥚚', mapping: Mapped("𥚚") }, - Range { from: '𥛅', to: '𥛅', mapping: Mapped("𥛅") }, - Range { from: '福', to: '福', mapping: Mapped("福") }, - Range { from: '秫', to: '秫', mapping: Mapped("秫") }, - Range { from: '䄯', to: '䄯', mapping: Mapped("䄯") }, - Range { from: '穀', to: '穀', mapping: Mapped("穀") }, - Range { from: '穊', to: '穊', mapping: Mapped("穊") }, - Range { from: '穏', to: '穏', mapping: Mapped("穏") }, - Range { from: '𥥼', to: '𥥼', mapping: Mapped("𥥼") }, - Range { from: '𥪧', to: '𥪧', mapping: Mapped("𥪧") }, - Range { from: '竮', to: '竮', mapping: Disallowed }, - Range { from: '䈂', to: '䈂', mapping: Mapped("䈂") }, - Range { from: '𥮫', to: '𥮫', mapping: Mapped("𥮫") }, - Range { from: '篆', to: '篆', mapping: Mapped("篆") }, - Range { from: '築', to: '築', mapping: Mapped("築") }, - Range { from: '䈧', to: '䈧', mapping: Mapped("䈧") }, - Range { from: '𥲀', to: '𥲀', mapping: Mapped("𥲀") }, - Range { from: '糒', to: '糒', mapping: Mapped("糒") }, - Range { from: '䊠', to: '䊠', mapping: Mapped("䊠") }, - Range { from: '糨', to: '糨', mapping: Mapped("糨") }, - Range { from: '糣', to: '糣', mapping: Mapped("糣") }, - Range { from: '紀', to: '紀', mapping: Mapped("紀") }, - Range { from: '𥾆', to: '𥾆', mapping: Mapped("𥾆") }, - Range { from: '絣', to: '絣', mapping: Mapped("絣") }, - Range { from: '䌁', to: '䌁', mapping: Mapped("䌁") }, - Range { from: '緇', to: '緇', mapping: Mapped("緇") }, - Range { from: '縂', to: '縂', mapping: Mapped("縂") }, - Range { from: '繅', to: '繅', mapping: Mapped("繅") }, - Range { from: '䌴', to: '䌴', mapping: Mapped("䌴") }, - Range { from: '𦈨', to: '𦈨', mapping: Mapped("𦈨") }, - Range { from: '𦉇', to: '𦉇', mapping: Mapped("𦉇") }, - Range { from: '䍙', to: '䍙', mapping: Mapped("䍙") }, - Range { from: '𦋙', to: '𦋙', mapping: Mapped("𦋙") }, - Range { from: '罺', to: '罺', mapping: Mapped("罺") }, - Range { from: '𦌾', to: '𦌾', mapping: Mapped("𦌾") }, - Range { from: '羕', to: '羕', mapping: Mapped("羕") }, - Range { from: '翺', to: '翺', mapping: Mapped("翺") }, - Range { from: '者', to: '者', mapping: Mapped("者") }, - Range { from: '𦓚', to: '𦓚', mapping: Mapped("𦓚") }, - Range { from: '𦔣', to: '𦔣', mapping: Mapped("𦔣") }, - Range { from: '聠', to: '聠', mapping: Mapped("聠") }, - Range { from: '𦖨', to: '𦖨', mapping: Mapped("𦖨") }, - Range { from: '聰', to: '聰', mapping: Mapped("聰") }, - Range { from: '𣍟', to: '𣍟', mapping: Mapped("𣍟") }, - Range { from: '䏕', to: '䏕', mapping: Mapped("䏕") }, - Range { from: '育', to: '育', mapping: Mapped("育") }, - Range { from: '脃', to: '脃', mapping: Mapped("脃") }, - Range { from: '䐋', to: '䐋', mapping: Mapped("䐋") }, - Range { from: '脾', to: '脾', mapping: Mapped("脾") }, - Range { from: '媵', to: '媵', mapping: Mapped("媵") }, - Range { from: '𦞧', to: '𦞧', mapping: Mapped("𦞧") }, - Range { from: '𦞵', to: '𦞵', mapping: Mapped("𦞵") }, - Range { from: '𣎓', to: '𣎓', mapping: Mapped("𣎓") }, - Range { from: '𣎜', to: '𣎜', mapping: Mapped("𣎜") }, - Range { from: '舁', to: '舁', mapping: Mapped("舁") }, - Range { from: '舄', to: '舄', mapping: Mapped("舄") }, - Range { from: '辞', to: '辞', mapping: Mapped("辞") }, - Range { from: '䑫', to: '䑫', mapping: Mapped("䑫") }, - Range { from: '芑', to: '芑', mapping: Mapped("芑") }, - Range { from: '芋', to: '芋', mapping: Mapped("芋") }, - Range { from: '芝', to: '芝', mapping: Mapped("芝") }, - Range { from: '劳', to: '劳', mapping: Mapped("劳") }, - Range { from: '花', to: '花', mapping: Mapped("花") }, - Range { from: '芳', to: '芳', mapping: Mapped("芳") }, - Range { from: '芽', to: '芽', mapping: Mapped("芽") }, - Range { from: '苦', to: '苦', mapping: Mapped("苦") }, - Range { from: '𦬼', to: '𦬼', mapping: Mapped("𦬼") }, - Range { from: '若', to: '若', mapping: Mapped("若") }, - Range { from: '茝', to: '茝', mapping: Mapped("茝") }, - Range { from: '荣', to: '荣', mapping: Mapped("荣") }, - Range { from: '莭', to: '莭', mapping: Mapped("莭") }, - Range { from: '茣', to: '茣', mapping: Mapped("茣") }, - Range { from: '莽', to: '莽', mapping: Mapped("莽") }, - Range { from: '菧', to: '菧', mapping: Mapped("菧") }, - Range { from: '著', to: '著', mapping: Mapped("著") }, - Range { from: '荓', to: '荓', mapping: Mapped("荓") }, - Range { from: '菊', to: '菊', mapping: Mapped("菊") }, - Range { from: '菌', to: '菌', mapping: Mapped("菌") }, - Range { from: '菜', to: '菜', mapping: Mapped("菜") }, - Range { from: '𦰶', to: '𦰶', mapping: Mapped("𦰶") }, - Range { from: '𦵫', to: '𦵫', mapping: Mapped("𦵫") }, - Range { from: '𦳕', to: '𦳕', mapping: Mapped("𦳕") }, - Range { from: '䔫', to: '䔫', mapping: Mapped("䔫") }, - Range { from: '蓱', to: '蓱', mapping: Mapped("蓱") }, - Range { from: '蓳', to: '蓳', mapping: Mapped("蓳") }, - Range { from: '蔖', to: '蔖', mapping: Mapped("蔖") }, - Range { from: '𧏊', to: '𧏊', mapping: Mapped("𧏊") }, - Range { from: '蕤', to: '蕤', mapping: Mapped("蕤") }, - Range { from: '𦼬', to: '𦼬', mapping: Mapped("𦼬") }, - Range { from: '䕝', to: '䕝', mapping: Mapped("䕝") }, - Range { from: '䕡', to: '䕡', mapping: Mapped("䕡") }, - Range { from: '𦾱', to: '𦾱', mapping: Mapped("𦾱") }, - Range { from: '𧃒', to: '𧃒', mapping: Mapped("𧃒") }, - Range { from: '䕫', to: '䕫', mapping: Mapped("䕫") }, - Range { from: '虐', to: '虐', mapping: Mapped("虐") }, - Range { from: '虜', to: '虜', mapping: Mapped("虜") }, - Range { from: '虧', to: '虧', mapping: Mapped("虧") }, - Range { from: '虩', to: '虩', mapping: Mapped("虩") }, - Range { from: '蚩', to: '蚩', mapping: Mapped("蚩") }, - Range { from: '蚈', to: '蚈', mapping: Mapped("蚈") }, - Range { from: '蜎', to: '蜎', mapping: Mapped("蜎") }, - Range { from: '蛢', to: '蛢', mapping: Mapped("蛢") }, - Range { from: '蝹', to: '蝹', mapping: Mapped("蝹") }, - Range { from: '蜨', to: '蜨', mapping: Mapped("蜨") }, - Range { from: '蝫', to: '蝫', mapping: Mapped("蝫") }, - Range { from: '螆', to: '螆', mapping: Mapped("螆") }, - Range { from: '䗗', to: '䗗', mapping: Disallowed }, - Range { from: '蟡', to: '蟡', mapping: Mapped("蟡") }, - Range { from: '蠁', to: '蠁', mapping: Mapped("蠁") }, - Range { from: '䗹', to: '䗹', mapping: Mapped("䗹") }, - Range { from: '衠', to: '衠', mapping: Mapped("衠") }, - Range { from: '衣', to: '衣', mapping: Mapped("衣") }, - Range { from: '𧙧', to: '𧙧', mapping: Mapped("𧙧") }, - Range { from: '裗', to: '裗', mapping: Mapped("裗") }, - Range { from: '裞', to: '裞', mapping: Mapped("裞") }, - Range { from: '䘵', to: '䘵', mapping: Mapped("䘵") }, - Range { from: '裺', to: '裺', mapping: Mapped("裺") }, - Range { from: '㒻', to: '㒻', mapping: Mapped("㒻") }, - Range { from: '𧢮', to: '𧢮', mapping: Mapped("𧢮") }, - Range { from: '𧥦', to: '𧥦', mapping: Mapped("𧥦") }, - Range { from: '䚾', to: '䚾', mapping: Mapped("䚾") }, - Range { from: '䛇', to: '䛇', mapping: Mapped("䛇") }, - Range { from: '誠', to: '誠', mapping: Mapped("誠") }, - Range { from: '諭', to: '諭', mapping: Mapped("諭") }, - Range { from: '變', to: '變', mapping: Mapped("變") }, - Range { from: '豕', to: '豕', mapping: Mapped("豕") }, - Range { from: '𧲨', to: '𧲨', mapping: Mapped("𧲨") }, - Range { from: '貫', to: '貫', mapping: Mapped("貫") }, - Range { from: '賁', to: '賁', mapping: Mapped("賁") }, - Range { from: '贛', to: '贛', mapping: Mapped("贛") }, - Range { from: '起', to: '起', mapping: Mapped("起") }, - Range { from: '𧼯', to: '𧼯', mapping: Mapped("𧼯") }, - Range { from: '𠠄', to: '𠠄', mapping: Mapped("𠠄") }, - Range { from: '跋', to: '跋', mapping: Mapped("跋") }, - Range { from: '趼', to: '趼', mapping: Mapped("趼") }, - Range { from: '跰', to: '跰', mapping: Mapped("跰") }, - Range { from: '𠣞', to: '𠣞', mapping: Mapped("𠣞") }, - Range { from: '軔', to: '軔', mapping: Mapped("軔") }, - Range { from: '輸', to: '輸', mapping: Mapped("輸") }, - Range { from: '𨗒', to: '𨗒', mapping: Mapped("𨗒") }, - Range { from: '𨗭', to: '𨗭', mapping: Mapped("𨗭") }, - Range { from: '邔', to: '邔', mapping: Mapped("邔") }, - Range { from: '郱', to: '郱', mapping: Mapped("郱") }, - Range { from: '鄑', to: '鄑', mapping: Mapped("鄑") }, - Range { from: '𨜮', to: '𨜮', mapping: Mapped("𨜮") }, - Range { from: '鄛', to: '鄛', mapping: Mapped("鄛") }, - Range { from: '鈸', to: '鈸', mapping: Mapped("鈸") }, - Range { from: '鋗', to: '鋗', mapping: Mapped("鋗") }, - Range { from: '鋘', to: '鋘', mapping: Mapped("鋘") }, - Range { from: '鉼', to: '鉼', mapping: Mapped("鉼") }, - Range { from: '鏹', to: '鏹', mapping: Mapped("鏹") }, - Range { from: '鐕', to: '鐕', mapping: Mapped("鐕") }, - Range { from: '𨯺', to: '𨯺', mapping: Mapped("𨯺") }, - Range { from: '開', to: '開', mapping: Mapped("開") }, - Range { from: '䦕', to: '䦕', mapping: Mapped("䦕") }, - Range { from: '閷', to: '閷', mapping: Mapped("閷") }, - Range { from: '𨵷', to: '𨵷', mapping: Mapped("𨵷") }, - Range { from: '䧦', to: '䧦', mapping: Mapped("䧦") }, - Range { from: '雃', to: '雃', mapping: Mapped("雃") }, - Range { from: '嶲', to: '嶲', mapping: Mapped("嶲") }, - Range { from: '霣', to: '霣', mapping: Mapped("霣") }, - Range { from: '𩅅', to: '𩅅', mapping: Mapped("𩅅") }, - Range { from: '𩈚', to: '𩈚', mapping: Mapped("𩈚") }, - Range { from: '䩮', to: '䩮', mapping: Mapped("䩮") }, - Range { from: '䩶', to: '䩶', mapping: Mapped("䩶") }, - Range { from: '韠', to: '韠', mapping: Mapped("韠") }, - Range { from: '𩐊', to: '𩐊', mapping: Mapped("𩐊") }, - Range { from: '䪲', to: '䪲', mapping: Mapped("䪲") }, - Range { from: '𩒖', to: '𩒖', mapping: Mapped("𩒖") }, - Range { from: '頋', to: '頋', mapping: Mapped("頋") }, - Range { from: '頩', to: '頩', mapping: Mapped("頩") }, - Range { from: '𩖶', to: '𩖶', mapping: Mapped("𩖶") }, - Range { from: '飢', to: '飢', mapping: Mapped("飢") }, - Range { from: '䬳', to: '䬳', mapping: Mapped("䬳") }, - Range { from: '餩', to: '餩', mapping: Mapped("餩") }, - Range { from: '馧', to: '馧', mapping: Mapped("馧") }, - Range { from: '駂', to: '駂', mapping: Mapped("駂") }, - Range { from: '駾', to: '駾', mapping: Mapped("駾") }, - Range { from: '䯎', to: '䯎', mapping: Mapped("䯎") }, - Range { from: '𩬰', to: '𩬰', mapping: Mapped("𩬰") }, - Range { from: '鬒', to: '鬒', mapping: Mapped("鬒") }, - Range { from: '鱀', to: '鱀', mapping: Mapped("鱀") }, - Range { from: '鳽', to: '鳽', mapping: Mapped("鳽") }, - Range { from: '䳎', to: '䳎', mapping: Mapped("䳎") }, - Range { from: '䳭', to: '䳭', mapping: Mapped("䳭") }, - Range { from: '鵧', to: '鵧', mapping: Mapped("鵧") }, - Range { from: '𪃎', to: '𪃎', mapping: Mapped("𪃎") }, - Range { from: '䳸', to: '䳸', mapping: Mapped("䳸") }, - Range { from: '𪄅', to: '𪄅', mapping: Mapped("𪄅") }, - Range { from: '𪈎', to: '𪈎', mapping: Mapped("𪈎") }, - Range { from: '𪊑', to: '𪊑', mapping: Mapped("𪊑") }, - Range { from: '麻', to: '麻', mapping: Mapped("麻") }, - Range { from: '䵖', to: '䵖', mapping: Mapped("䵖") }, - Range { from: '黹', to: '黹', mapping: Mapped("黹") }, - Range { from: '黾', to: '黾', mapping: Mapped("黾") }, - Range { from: '鼅', to: '鼅', mapping: Mapped("鼅") }, - Range { from: '鼏', to: '鼏', mapping: Mapped("鼏") }, - Range { from: '鼖', to: '鼖', mapping: Mapped("鼖") }, - Range { from: '鼻', to: '鼻', mapping: Mapped("鼻") }, - Range { from: '𪘀', to: '𪘀', mapping: Mapped("𪘀") }, - Range { from: '𯨞', to: '𯿽', mapping: Disallowed }, - Range { from: '𯿾', to: '𯿿', mapping: Disallowed }, - Range { from: '𰀀', to: '𿿽', mapping: Disallowed }, - Range { from: '𿿾', to: '𿿿', mapping: Disallowed }, - Range { from: '񀀀', to: '񏿽', mapping: Disallowed }, - Range { from: '񏿾', to: '񏿿', mapping: Disallowed }, - Range { from: '񐀀', to: '񟿽', mapping: Disallowed }, - Range { from: '񟿾', to: '񟿿', mapping: Disallowed }, - Range { from: '񠀀', to: '񯿽', mapping: Disallowed }, - Range { from: '񯿾', to: '񯿿', mapping: Disallowed }, - Range { from: '񰀀', to: '񿿽', mapping: Disallowed }, - Range { from: '񿿾', to: '񿿿', mapping: Disallowed }, - Range { from: '򀀀', to: '򏿽', mapping: Disallowed }, - Range { from: '򏿾', to: '򏿿', mapping: Disallowed }, - Range { from: '򐀀', to: '򟿽', mapping: Disallowed }, - Range { from: '򟿾', to: '򟿿', mapping: Disallowed }, - Range { from: '򠀀', to: '򯿽', mapping: Disallowed }, - Range { from: '򯿾', to: '򯿿', mapping: Disallowed }, - Range { from: '򰀀', to: '򿿽', mapping: Disallowed }, - Range { from: '򿿾', to: '򿿿', mapping: Disallowed }, - Range { from: '󀀀', to: '󏿽', mapping: Disallowed }, - Range { from: '󏿾', to: '󏿿', mapping: Disallowed }, - Range { from: '󐀀', to: '󟿽', mapping: Disallowed }, - Range { from: '󟿾', to: '󟿿', mapping: Disallowed }, - Range { from: '󠀀', to: '󠀀', mapping: Disallowed }, - Range { from: '󠀁', to: '󠀁', mapping: Disallowed }, - Range { from: '󠀂', to: '󠀟', mapping: Disallowed }, - Range { from: '󠀠', to: '󠁿', mapping: Disallowed }, - Range { from: '󠂀', to: '󠃿', mapping: Disallowed }, - Range { from: '󠄀', to: '󠇯', mapping: Ignored }, - Range { from: '󠇰', to: '󯿽', mapping: Disallowed }, - Range { from: '󯿾', to: '󯿿', mapping: Disallowed }, - Range { from: '󰀀', to: '󿿽', mapping: Disallowed }, - Range { from: '󿿾', to: '󿿿', mapping: Disallowed }, - Range { from: '􀀀', to: '􏿽', mapping: Disallowed }, - Range { from: '􏿾', to: '􏿿', mapping: Disallowed }, -]; diff --git a/deps/url-0.5.5/src/lib.rs b/deps/url-0.5.5/src/lib.rs deleted file mode 100644 index be81b1391..000000000 --- a/deps/url-0.5.5/src/lib.rs +++ /dev/null @@ -1,1165 +0,0 @@ -// Copyright 2013-2015 Simon Sapin. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -/*! - -<a href="https://github.com/servo/rust-url"><img style="position: absolute; top: 0; left: 0; border: 0;" src="../github.png" alt="Fork me on GitHub"></a> -<style>.sidebar { margin-top: 53px }</style> - -rust-url is an implementation of the [URL Standard](http://url.spec.whatwg.org/) -for the [Rust](http://rust-lang.org/) programming language. - -It builds with [Cargo](http://crates.io/). -To use it in your project, add this to your `Cargo.toml` file: - -```Cargo -[dependencies.url] -git = "https://github.com/servo/rust-url" -``` - -Supporting encodings other than UTF-8 in query strings is an optional feature -that requires [rust-encoding](https://github.com/lifthrasiir/rust-encoding) -and is off by default. -You can enable it with -[Cargo’s *features* mechanism](http://doc.crates.io/manifest.html#the-[features]-section): - -```Cargo -[dependencies.url] -git = "https://github.com/servo/rust-url" -features = ["query_encoding"] -``` - -… or by passing `--cfg 'feature="query_encoding"'` to rustc. - - -# URL parsing and data structures - -First, URL parsing may fail for various reasons and therefore returns a `Result`. - -``` -use url::{Url, ParseError}; - -assert!(Url::parse("http://[:::1]") == Err(ParseError::InvalidIpv6Address)) -``` - -Let’s parse a valid URL and look at its components. - -``` -use url::{Url, SchemeData}; - -let issue_list_url = Url::parse( - "https://github.com/rust-lang/rust/issues?labels=E-easy&state=open" -).unwrap(); - - -assert!(issue_list_url.scheme == "https".to_string()); -assert!(issue_list_url.domain() == Some("github.com")); -assert!(issue_list_url.port() == None); -assert!(issue_list_url.path() == Some(&["rust-lang".to_string(), - "rust".to_string(), - "issues".to_string()][..])); -assert!(issue_list_url.query == Some("labels=E-easy&state=open".to_string())); -assert!(issue_list_url.fragment == None); -match issue_list_url.scheme_data { - SchemeData::Relative(..) => {}, // Expected - SchemeData::NonRelative(..) => panic!(), -} -``` - -The `scheme`, `query`, and `fragment` are directly fields of the `Url` struct: -they apply to all URLs. -Every other components has accessors because they only apply to URLs said to be -“in a relative scheme”. `https` is a relative scheme, but `data` is not: - -``` -use url::{Url, SchemeData}; - -let data_url = Url::parse("data:text/plain,Hello#").unwrap(); - -assert!(data_url.scheme == "data".to_string()); -assert!(data_url.scheme_data == SchemeData::NonRelative("text/plain,Hello".to_string())); -assert!(data_url.non_relative_scheme_data() == Some("text/plain,Hello")); -assert!(data_url.query == None); -assert!(data_url.fragment == Some("".to_string())); -``` - - -# Base URL - -Many contexts allow URL *references* that can be relative to a *base URL*: - -```html -<link rel="stylesheet" href="../main.css"> -``` - -Since parsed URL are absolute, giving a base is required: - -``` -use url::{Url, ParseError}; - -assert!(Url::parse("../main.css") == Err(ParseError::RelativeUrlWithoutBase)) -``` - -`UrlParser` is a method-chaining API to provide various optional parameters -to URL parsing, including a base URL. - -``` -use url::{Url, UrlParser}; - -let this_document = Url::parse("http://servo.github.io/rust-url/url/index.html").unwrap(); -let css_url = UrlParser::new().base_url(&this_document).parse("../main.css").unwrap(); -assert!(css_url.serialize() == "http://servo.github.io/rust-url/main.css".to_string()); -``` - -For convenience, the `join` method on `Url` is also provided to achieve the same result: - -``` -use url::Url; - -let this_document = Url::parse("http://servo.github.io/rust-url/url/index.html").unwrap(); -let css_url = this_document.join("../main.css").unwrap(); -assert!(&*css_url.serialize() == "http://servo.github.io/rust-url/main.css") -*/ - -#![cfg_attr(feature="heap_size", feature(plugin, custom_derive))] -#![cfg_attr(feature="heap_size", plugin(heapsize_plugin))] - -extern crate rustc_serialize; -extern crate uuid; - -#[macro_use] -extern crate matches; - -#[cfg(feature="serde_serialization")] -extern crate serde; - -#[cfg(feature="heap_size")] -#[macro_use] extern crate heapsize; - -extern crate unicode_normalization; -extern crate unicode_bidi; - -use std::fmt::{self, Formatter}; -use std::str; -use std::path::{Path, PathBuf}; -use std::borrow::Borrow; -use std::hash::{Hash, Hasher}; -use std::cmp::Ordering; - -#[cfg(feature="serde_serialization")] -use std::str::FromStr; - -pub use host::Host; -pub use parser::{ErrorHandler, ParseResult, ParseError}; - -use percent_encoding::{percent_encode, lossy_utf8_percent_decode, DEFAULT_ENCODE_SET}; - -use format::{PathFormatter, UserInfoFormatter, UrlNoFragmentFormatter}; -use encoding::EncodingOverride; - -use uuid::Uuid; - -mod encoding; -mod host; -mod parser; -pub mod urlutils; -pub mod percent_encoding; -pub mod form_urlencoded; -pub mod punycode; -pub mod format; -pub mod idna; -mod idna_mapping; - -/// The parsed representation of an absolute URL. -#[derive(PartialEq, Eq, Clone, Debug, Hash, PartialOrd, Ord)] -#[cfg_attr(feature="heap_size", derive(HeapSizeOf))] -pub struct Url { - /// The scheme (a.k.a. protocol) of the URL, in ASCII lower case. - pub scheme: String, - - /// The components of the URL whose representation depends on where the scheme is *relative*. - pub scheme_data: SchemeData, - - /// The query string of the URL. - /// - /// `None` if the `?` delimiter character was not part of the parsed input, - /// otherwise a possibly empty, percent-encoded string. - /// - /// Percent encoded strings are within the ASCII range. - /// - /// See also the `query_pairs`, `set_query_from_pairs`, - /// and `lossy_percent_decode_query` methods. - pub query: Option<String>, - - /// The fragment identifier of the URL. - /// - /// `None` if the `#` delimiter character was not part of the parsed input, - /// otherwise a possibly empty, percent-encoded string. - /// - /// Percent encoded strings are within the ASCII range. - /// - /// See also the `lossy_percent_decode_fragment` method. - pub fragment: Option<String>, -} - -/// Opaque identifier for URLs that have file or other schemes -#[derive(PartialEq, Eq, Clone, Debug)] -pub struct OpaqueOrigin(Uuid); - -#[cfg(feature="heap_size")] -known_heap_size!(0, OpaqueOrigin); - -impl OpaqueOrigin { - /// Creates a new opaque origin with a random UUID. - pub fn new() -> OpaqueOrigin { - OpaqueOrigin(Uuid::new_v4()) - } -} - -/// The origin of the URL -#[derive(PartialEq, Eq, Clone, Debug)] -#[cfg_attr(feature="heap_size", derive(HeapSizeOf))] -pub enum Origin { - /// A globally unique identifier - UID(OpaqueOrigin), - - /// Consists of the URL's scheme, host and port - Tuple(String, Host, u16) -} - -/// The components of the URL whose representation depends on where the scheme is *relative*. -#[derive(PartialEq, Eq, Clone, Debug, Hash, PartialOrd, Ord)] -#[cfg_attr(feature="heap_size", derive(HeapSizeOf))] -pub enum SchemeData { - /// Components for URLs in a *relative* scheme such as HTTP. - Relative(RelativeSchemeData), - - /// No further structure is assumed for *non-relative* schemes such as `data` and `mailto`. - /// - /// This is a single percent-encoded string, whose interpretation depends on the scheme. - /// - /// Percent encoded strings are within the ASCII range. - NonRelative(String), -} - -/// Components for URLs in a *relative* scheme such as HTTP. -#[derive(Clone, Debug)] -#[cfg_attr(feature="heap_size", derive(HeapSizeOf))] -pub struct RelativeSchemeData { - /// The username of the URL, as a possibly empty, percent-encoded string. - /// - /// Percent encoded strings are within the ASCII range. - /// - /// See also the `lossy_percent_decode_username` method. - pub username: String, - - /// The password of the URL. - /// - /// `None` if the `:` delimiter character was not part of the parsed input, - /// otherwise a possibly empty, percent-encoded string. - /// - /// Percent encoded strings are within the ASCII range. - /// - /// See also the `lossy_percent_decode_password` method. - pub password: Option<String>, - - /// The host of the URL, either a domain name or an IPv4 address - pub host: Host, - - /// The port number of the URL. - /// `None` for file-like schemes, or to indicate the default port number. - pub port: Option<u16>, - - /// The default port number for the URL’s scheme. - /// `None` for file-like schemes. - pub default_port: Option<u16>, - - /// The path of the URL, as vector of percent-encoded strings. - /// - /// Percent encoded strings are within the ASCII range. - /// - /// See also the `serialize_path` method and, - /// for URLs in the `file` scheme, the `to_file_path` method. - pub path: Vec<String>, -} - -impl RelativeSchemeData { - fn get_identity_key(&self) -> (&String, &Option<String>, &Host, Option<u16>, Option<u16>, &Vec<String>) { - ( - &self.username, - &self.password, - &self.host, - self.port.or(self.default_port), - self.default_port, - &self.path - ) - } -} - - -impl PartialEq for RelativeSchemeData { - fn eq(&self, other: &RelativeSchemeData) -> bool { - self.get_identity_key() == other.get_identity_key() - } -} - -impl Eq for RelativeSchemeData {} - -impl Hash for RelativeSchemeData { - fn hash<H: Hasher>(&self, state: &mut H) { - self.get_identity_key().hash(state) - } -} - -impl PartialOrd for RelativeSchemeData { - fn partial_cmp(&self, other: &RelativeSchemeData) -> Option<Ordering> { - self.get_identity_key().partial_cmp(&other.get_identity_key()) - } -} - -impl Ord for RelativeSchemeData { - fn cmp(&self, other: &Self) -> Ordering { - self.get_identity_key().cmp(&other.get_identity_key()) - } -} - -impl str::FromStr for Url { - type Err = ParseError; - - fn from_str(url: &str) -> ParseResult<Url> { - Url::parse(url) - } -} - -/// A set of optional parameters for URL parsing. -pub struct UrlParser<'a> { - base_url: Option<&'a Url>, - query_encoding_override: EncodingOverride, - error_handler: ErrorHandler, - scheme_type_mapper: fn(scheme: &str) -> SchemeType, -} - - -/// A method-chaining API to provide a set of optional parameters for URL parsing. -impl<'a> UrlParser<'a> { - /// Return a new UrlParser with default parameters. - #[inline] - pub fn new() -> UrlParser<'a> { - fn silent_handler(_reason: ParseError) -> ParseResult<()> { Ok(()) } - UrlParser { - base_url: None, - query_encoding_override: EncodingOverride::utf8(), - error_handler: silent_handler, - scheme_type_mapper: whatwg_scheme_type_mapper, - } - } - - /// Set the base URL used for resolving relative URL references, and return the `UrlParser`. - /// The default is no base URL, so that relative URLs references fail to parse. - #[inline] - pub fn base_url<'b>(&'b mut self, value: &'a Url) -> &'b mut UrlParser<'a> { - self.base_url = Some(value); - self - } - - /// Set the character encoding the query string is encoded as before percent-encoding, - /// and return the `UrlParser`. - /// - /// This legacy quirk is only relevant to HTML. - /// - /// This method is only available if the `query_encoding` Cargo feature is enabled. - #[cfg(feature = "query_encoding")] - #[inline] - pub fn query_encoding_override<'b>(&'b mut self, value: encoding::EncodingRef) - -> &'b mut UrlParser<'a> { - self.query_encoding_override = EncodingOverride::from_encoding(value); - self - } - - /// Set an error handler for non-fatal parse errors, and return the `UrlParser`. - /// - /// Non-fatal parse errors are normally ignored by the parser, - /// but indicate violations of authoring requirements. - /// An error handler can be used, for example, to log these errors in the console - /// of a browser’s developer tools. - /// - /// The error handler can choose to make the error fatal by returning `Err(..)` - #[inline] - pub fn error_handler<'b>(&'b mut self, value: ErrorHandler) -> &'b mut UrlParser<'a> { - self.error_handler = value; - self - } - - /// Set a *scheme type mapper*, and return the `UrlParser`. - /// - /// The URL parser behaves differently based on the `SchemeType` of the URL. - /// See the documentation for `SchemeType` for more details. - /// A *scheme type mapper* returns a `SchemeType` - /// based on the scheme as an ASCII lower case string, - /// as found in the `scheme` field of an `Url` struct. - /// - /// The default scheme type mapper is as follows: - /// - /// ``` - /// # use url::SchemeType; - /// fn whatwg_scheme_type_mapper(scheme: &str) -> SchemeType { - /// match scheme { - /// "file" => SchemeType::FileLike, - /// "ftp" => SchemeType::Relative(21), - /// "gopher" => SchemeType::Relative(70), - /// "http" => SchemeType::Relative(80), - /// "https" => SchemeType::Relative(443), - /// "ws" => SchemeType::Relative(80), - /// "wss" => SchemeType::Relative(443), - /// _ => SchemeType::NonRelative, - /// } - /// } - /// ``` - /// - /// Note that unknown schemes default to non-relative. - /// Overriding the scheme type mapper can allow, for example, - /// parsing URLs in the `git` or `irc` scheme as relative. - #[inline] - pub fn scheme_type_mapper<'b>(&'b mut self, value: fn(scheme: &str) -> SchemeType) - -> &'b mut UrlParser<'a> { - self.scheme_type_mapper = value; - self - } - - /// Parse `input` as an URL, with all the parameters previously set in the `UrlParser`. - #[inline] - pub fn parse(&self, input: &str) -> ParseResult<Url> { - parser::parse_url(input, self) - } - - /// Parse `input` as a “standalone” URL path, - /// with an optional query string and fragment identifier. - /// - /// This is typically found in the start line of an HTTP header. - /// - /// Note that while the start line has no fragment identifier in the HTTP RFC, - /// servers typically parse it and ignore it - /// (rather than having it be part of the path or query string.) - /// - /// On success, return `(path, query_string, fragment_identifier)` - #[inline] - pub fn parse_path(&self, input: &str) - -> ParseResult<(Vec<String>, Option<String>, Option<String>)> { - parser::parse_standalone_path(input, self) - } -} - - -/// Parse `input` as a “standalone” URL path, -/// with an optional query string and fragment identifier. -/// -/// This is typically found in the start line of an HTTP header. -/// -/// Note that while the start line has no fragment identifier in the HTTP RFC, -/// servers typically parse it and ignore it -/// (rather than having it be part of the path or query string.) -/// -/// On success, return `(path, query_string, fragment_identifier)` -/// -/// ```rust -/// let (path, query, fragment) = url::parse_path("/foo/bar/../baz?q=42").unwrap(); -/// assert_eq!(path, vec!["foo".to_string(), "baz".to_string()]); -/// assert_eq!(query, Some("q=42".to_string())); -/// assert_eq!(fragment, None); -/// ``` -/// -/// The query string returned by `url::parse_path` can be decoded with -/// `url::form_urlencoded::parse`. -#[inline] -pub fn parse_path(input: &str) - -> ParseResult<(Vec<String>, Option<String>, Option<String>)> { - UrlParser::new().parse_path(input) -} - - -/// Private convenience methods for use in parser.rs -impl<'a> UrlParser<'a> { - #[inline] - fn parse_error(&self, error: ParseError) -> ParseResult<()> { - (self.error_handler)(error) - } - - #[inline] - fn get_scheme_type(&self, scheme: &str) -> SchemeType { - (self.scheme_type_mapper)(scheme) - } -} - - -/// Determines the behavior of the URL parser for a given scheme. -#[derive(PartialEq, Eq, Copy, Debug, Clone, Hash, PartialOrd, Ord)] -pub enum SchemeType { - /// Indicate that the scheme is *non-relative*. - /// - /// The *scheme data* of the URL - /// (everything other than the scheme, query string, and fragment identifier) - /// is parsed as a single percent-encoded string of which no structure is assumed. - /// That string may need to be parsed further, per a scheme-specific format. - NonRelative, - - /// Indicate that the scheme is *relative*, and what the default port number is. - /// - /// The *scheme data* is structured as - /// *username*, *password*, *host*, *port number*, and *path*. - /// Relative URL references are supported, if a base URL was given. - /// The string value indicates the default port number as a string of ASCII digits, - /// or the empty string to indicate no default port number. - Relative(u16), - - /// Indicate a *relative* scheme similar to the *file* scheme. - /// - /// For example, you might want to have distinct `git+file` and `hg+file` URL schemes. - /// - /// This is like `Relative` except the host can be empty, there is no port number, - /// and path parsing has (platform-independent) quirks to support Windows filenames. - FileLike, -} - -impl SchemeType { - pub fn default_port(&self) -> Option<u16> { - match *self { - SchemeType::Relative(default_port) => Some(default_port), - _ => None, - } - } - pub fn same_as(&self, other: SchemeType) -> bool { - match (self, other) { - (&SchemeType::NonRelative, SchemeType::NonRelative) => true, - (&SchemeType::Relative(_), SchemeType::Relative(_)) => true, - (&SchemeType::FileLike, SchemeType::FileLike) => true, - _ => false - } - } -} - -/// http://url.spec.whatwg.org/#relative-scheme -pub fn whatwg_scheme_type_mapper(scheme: &str) -> SchemeType { - match scheme { - "file" => SchemeType::FileLike, - "ftp" => SchemeType::Relative(21), - "gopher" => SchemeType::Relative(70), - "http" => SchemeType::Relative(80), - "https" => SchemeType::Relative(443), - "ws" => SchemeType::Relative(80), - "wss" => SchemeType::Relative(443), - _ => SchemeType::NonRelative, - } -} - - -impl Url { - /// Parse an URL with the default `UrlParser` parameters. - /// - /// In particular, relative URL references are parse errors since no base URL is provided. - #[inline] - pub fn parse(input: &str) -> ParseResult<Url> { - UrlParser::new().parse(input) - } - - /// Convert a file name as `std::path::Path` into an URL in the `file` scheme. - /// - /// This returns `Err` if the given path is not absolute - /// or, with a Windows path, if the prefix is not a disk prefix (e.g. `C:`). - pub fn from_file_path<P: AsRef<Path>>(path: P) -> Result<Url, ()> { - let path = try!(path_to_file_url_path(path.as_ref())); - Ok(Url::from_path_common(path)) - } - - /// Convert a directory name as `std::path::Path` into an URL in the `file` scheme. - /// - /// This returns `Err` if the given path is not absolute - /// or, with a Windows path, if the prefix is not a disk prefix (e.g. `C:`). - /// - /// Compared to `from_file_path`, this adds an empty component to the path - /// (or, in terms of URL syntax, adds a trailing slash) - /// so that the entire path is considered when using this URL as a base URL. - /// - /// For example: - /// - /// * `"index.html"` parsed with `Url::from_directory_path(Path::new("/var/www"))` - /// as the base URL is `file:///var/www/index.html` - /// * `"index.html"` parsed with `Url::from_file_path(Path::new("/var/www/"))` - /// as the base URL is `file:///var/index.html`, which might not be what was intended. - /// - /// (Note that `Path::new` removes any trailing slash.) - pub fn from_directory_path<P: AsRef<Path>>(path: P) -> Result<Url, ()> { - let mut path = try!(path_to_file_url_path(path.as_ref())); - // Add an empty path component (i.e. a trailing slash in serialization) - // so that the entire path is used as a base URL. - path.push("".to_owned()); - Ok(Url::from_path_common(path)) - } - - fn from_path_common(path: Vec<String>) -> Url { - Url { - scheme: "file".to_owned(), - scheme_data: SchemeData::Relative(RelativeSchemeData { - username: "".to_owned(), - password: None, - port: None, - default_port: None, - host: Host::Domain("".to_owned()), - path: path, - }), - query: None, - fragment: None, - } - } - - /// Assuming the URL is in the `file` scheme or similar, - /// convert its path to an absolute `std::path::Path`. - /// - /// **Note:** This does not actually check the URL’s `scheme`, - /// and may give nonsensical results for other schemes. - /// It is the user’s responsibility to check the URL’s scheme before calling this. - /// - /// ``` - /// # use url::Url; - /// # let url = Url::parse("file:///etc/passwd").unwrap(); - /// let path = url.to_file_path(); - /// ``` - /// - /// Returns `Err` if the host is neither empty nor `"localhost"`, - /// or if `Path::new_opt()` returns `None`. - /// (That is, if the percent-decoded path contains a NUL byte or, - /// for a Windows path, is not UTF-8.) - #[inline] - pub fn to_file_path(&self) -> Result<PathBuf, ()> { - match self.scheme_data { - SchemeData::Relative(ref scheme_data) => scheme_data.to_file_path(), - SchemeData::NonRelative(..) => Err(()), - } - } - - /// Return the serialization of this URL as a string. - pub fn serialize(&self) -> String { - self.to_string() - } - - /// Return the origin of this URL (https://url.spec.whatwg.org/#origin) - pub fn origin(&self) -> Origin { - match &*self.scheme { - "blob" => { - let result = Url::parse(self.non_relative_scheme_data().unwrap()); - match result { - Ok(ref url) => url.origin(), - Err(_) => Origin::UID(OpaqueOrigin::new()) - } - }, - "ftp" | "gopher" | "http" | "https" | "ws" | "wss" => { - Origin::Tuple(self.scheme.clone(), self.host().unwrap().clone(), - self.port_or_default().unwrap()) - }, - // TODO: Figure out what to do if the scheme is a file - "file" => Origin::UID(OpaqueOrigin::new()), - _ => Origin::UID(OpaqueOrigin::new()) - } - } - - /// Return the serialization of this URL, without the fragment identifier, as a string - pub fn serialize_no_fragment(&self) -> String { - UrlNoFragmentFormatter{ url: self }.to_string() - } - - /// If the URL is *non-relative*, return the string scheme data. - #[inline] - pub fn non_relative_scheme_data(&self) -> Option<&str> { - match self.scheme_data { - SchemeData::Relative(..) => None, - SchemeData::NonRelative(ref scheme_data) => Some(scheme_data), - } - } - - /// If the URL is *non-relative*, return a mutable reference to the string scheme data. - #[inline] - pub fn non_relative_scheme_data_mut(&mut self) -> Option<&mut String> { - match self.scheme_data { - SchemeData::Relative(..) => None, - SchemeData::NonRelative(ref mut scheme_data) => Some(scheme_data), - } - } - - /// If the URL is in a *relative scheme*, return the structured scheme data. - #[inline] - pub fn relative_scheme_data(&self) -> Option<&RelativeSchemeData> { - match self.scheme_data { - SchemeData::Relative(ref scheme_data) => Some(scheme_data), - SchemeData::NonRelative(..) => None, - } - } - - /// If the URL is in a *relative scheme*, - /// return a mutable reference to the structured scheme data. - #[inline] - pub fn relative_scheme_data_mut(&mut self) -> Option<&mut RelativeSchemeData> { - match self.scheme_data { - SchemeData::Relative(ref mut scheme_data) => Some(scheme_data), - SchemeData::NonRelative(..) => None, - } - } - - /// If the URL is in a *relative scheme*, return its username. - #[inline] - pub fn username(&self) -> Option<&str> { - self.relative_scheme_data().map(|scheme_data| &*scheme_data.username) - } - - /// If the URL is in a *relative scheme*, return a mutable reference to its username. - #[inline] - pub fn username_mut(&mut self) -> Option<&mut String> { - self.relative_scheme_data_mut().map(|scheme_data| &mut scheme_data.username) - } - - /// Percent-decode the URL’s username, if any. - /// - /// This is “lossy”: invalid UTF-8 percent-encoded byte sequences - /// will be replaced � U+FFFD, the replacement character. - #[inline] - pub fn lossy_percent_decode_username(&self) -> Option<String> { - self.relative_scheme_data().map(|scheme_data| scheme_data.lossy_percent_decode_username()) - } - - /// If the URL is in a *relative scheme*, return its password, if any. - #[inline] - pub fn password(&self) -> Option<&str> { - self.relative_scheme_data().and_then(|scheme_data| - scheme_data.password.as_ref().map(|password| password as &str)) - } - - /// If the URL is in a *relative scheme*, return a mutable reference to its password, if any. - #[inline] - pub fn password_mut(&mut self) -> Option<&mut String> { - self.relative_scheme_data_mut().and_then(|scheme_data| scheme_data.password.as_mut()) - } - - /// Percent-decode the URL’s password, if any. - /// - /// This is “lossy”: invalid UTF-8 percent-encoded byte sequences - /// will be replaced � U+FFFD, the replacement character. - #[inline] - pub fn lossy_percent_decode_password(&self) -> Option<String> { - self.relative_scheme_data().and_then(|scheme_data| - scheme_data.lossy_percent_decode_password()) - } - - /// Serialize the URL's username and password, if any. - /// - /// Format: "<username>:<password>@" - #[inline] - pub fn serialize_userinfo(&mut self) -> Option<String> { - self.relative_scheme_data().map(|scheme_data| scheme_data.serialize_userinfo()) - } - - /// If the URL is in a *relative scheme*, return its structured host. - #[inline] - pub fn host(&self) -> Option<&Host> { - self.relative_scheme_data().map(|scheme_data| &scheme_data.host) - } - - /// If the URL is in a *relative scheme*, return a mutable reference to its structured host. - #[inline] - pub fn host_mut(&mut self) -> Option<&mut Host> { - self.relative_scheme_data_mut().map(|scheme_data| &mut scheme_data.host) - } - - /// If the URL is in a *relative scheme* and its host is a domain, - /// return the domain as a string. - #[inline] - pub fn domain(&self) -> Option<&str> { - self.relative_scheme_data().and_then(|scheme_data| scheme_data.domain()) - } - - /// If the URL is in a *relative scheme* and its host is a domain, - /// return a mutable reference to the domain string. - #[inline] - pub fn domain_mut(&mut self) -> Option<&mut String> { - self.relative_scheme_data_mut().and_then(|scheme_data| scheme_data.domain_mut()) - } - - /// If the URL is in a *relative scheme*, serialize its host as a string. - /// - /// A domain a returned as-is, an IPv6 address between [] square brackets. - #[inline] - pub fn serialize_host(&self) -> Option<String> { - self.relative_scheme_data().map(|scheme_data| scheme_data.host.serialize()) - } - - /// If the URL is in a *relative scheme* and has a port number, return it. - #[inline] - pub fn port(&self) -> Option<u16> { - self.relative_scheme_data().and_then(|scheme_data| scheme_data.port) - } - - /// If the URL is in a *relative scheme*, return a mutable reference to its port. - #[inline] - pub fn port_mut(&mut self) -> Option<&mut Option<u16>> { - self.relative_scheme_data_mut().map(|scheme_data| &mut scheme_data.port) - } - - /// If the URL is in a *relative scheme* that is not a file-like, - /// return its port number, even if it is the default. - #[inline] - pub fn port_or_default(&self) -> Option<u16> { - self.relative_scheme_data().and_then(|scheme_data| scheme_data.port_or_default()) - } - - /// If the URL is in a *relative scheme*, return its path components. - #[inline] - pub fn path(&self) -> Option<&[String]> { - self.relative_scheme_data().map(|scheme_data| &*scheme_data.path) - } - - /// If the URL is in a *relative scheme*, return a mutable reference to its path components. - #[inline] - pub fn path_mut(&mut self) -> Option<&mut Vec<String>> { - self.relative_scheme_data_mut().map(|scheme_data| &mut scheme_data.path) - } - - /// If the URL is in a *relative scheme*, serialize its path as a string. - /// - /// The returned string starts with a "/" slash, and components are separated by slashes. - /// A trailing slash represents an empty last component. - #[inline] - pub fn serialize_path(&self) -> Option<String> { - self.relative_scheme_data().map(|scheme_data| scheme_data.serialize_path()) - } - - /// Parse the URL’s query string, if any, as `application/x-www-form-urlencoded` - /// and return a vector of (key, value) pairs. - #[inline] - pub fn query_pairs(&self) -> Option<Vec<(String, String)>> { - self.query.as_ref().map(|query| form_urlencoded::parse(query.as_bytes())) - } - - /// Serialize an iterator of (key, value) pairs as `application/x-www-form-urlencoded` - /// and set it as the URL’s query string. - #[inline] - pub fn set_query_from_pairs<I, K, V>(&mut self, pairs: I) - where I: IntoIterator, I::Item: Borrow<(K, V)>, K: AsRef<str>, V: AsRef<str> { - self.query = Some(form_urlencoded::serialize(pairs)); - } - - /// Percent-decode the URL’s query string, if any. - /// - /// This is “lossy”: invalid UTF-8 percent-encoded byte sequences - /// will be replaced � U+FFFD, the replacement character. - #[inline] - pub fn lossy_percent_decode_query(&self) -> Option<String> { - self.query.as_ref().map(|value| lossy_utf8_percent_decode(value.as_bytes())) - } - - /// Percent-decode the URL’s fragment identifier, if any. - /// - /// This is “lossy”: invalid UTF-8 percent-encoded byte sequences - /// will be replaced � U+FFFD, the replacement character. - #[inline] - pub fn lossy_percent_decode_fragment(&self) -> Option<String> { - self.fragment.as_ref().map(|value| lossy_utf8_percent_decode(value.as_bytes())) - } - - /// Join a path with a base URL. - /// - /// Corresponds to the basic URL parser where `self` is the given base URL. - #[inline] - pub fn join(&self, input: &str) -> ParseResult<Url> { - UrlParser::new().base_url(self).parse(input) - } -} - - -impl rustc_serialize::Encodable for Url { - fn encode<S: rustc_serialize::Encoder>(&self, encoder: &mut S) -> Result<(), S::Error> { - encoder.emit_str(&self.to_string()) - } -} - - -impl rustc_serialize::Decodable for Url { - fn decode<D: rustc_serialize::Decoder>(decoder: &mut D) -> Result<Url, D::Error> { - Url::parse(&*try!(decoder.read_str())).map_err(|error| { - decoder.error(&format!("URL parsing error: {}", error)) - }) - } -} - -/// Serializes this URL into a `serde` stream. -/// -/// This implementation is only available if the `serde_serialization` Cargo feature is enabled. -#[cfg(feature="serde_serialization")] -impl serde::Serialize for Url { - fn serialize<S>(&self, serializer: &mut S) -> Result<(), S::Error> where S: serde::Serializer { - format!("{}", self).serialize(serializer) - } -} - -/// Deserializes this URL from a `serde` stream. -/// -/// This implementation is only available if the `serde_serialization` Cargo feature is enabled. -#[cfg(feature="serde_serialization")] -impl serde::Deserialize for Url { - fn deserialize<D>(deserializer: &mut D) -> Result<Url, D::Error> where D: serde::Deserializer { - let string_representation: String = try!(serde::Deserialize::deserialize(deserializer)); - Ok(FromStr::from_str(&string_representation[..]).unwrap()) - } -} - -impl fmt::Display for Url { - fn fmt(&self, formatter: &mut Formatter) -> fmt::Result { - try!(UrlNoFragmentFormatter{ url: self }.fmt(formatter)); - if let Some(ref fragment) = self.fragment { - try!(formatter.write_str("#")); - try!(formatter.write_str(fragment)); - } - Ok(()) - } -} - - -impl fmt::Display for SchemeData { - fn fmt(&self, formatter: &mut Formatter) -> fmt::Result { - match *self { - SchemeData::Relative(ref scheme_data) => scheme_data.fmt(formatter), - SchemeData::NonRelative(ref scheme_data) => scheme_data.fmt(formatter), - } - } -} - - -impl RelativeSchemeData { - /// Percent-decode the URL’s username. - /// - /// This is “lossy”: invalid UTF-8 percent-encoded byte sequences - /// will be replaced � U+FFFD, the replacement character. - #[inline] - pub fn lossy_percent_decode_username(&self) -> String { - lossy_utf8_percent_decode(self.username.as_bytes()) - } - - /// Percent-decode the URL’s password, if any. - /// - /// This is “lossy”: invalid UTF-8 percent-encoded byte sequences - /// will be replaced � U+FFFD, the replacement character. - #[inline] - pub fn lossy_percent_decode_password(&self) -> Option<String> { - self.password.as_ref().map(|value| lossy_utf8_percent_decode(value.as_bytes())) - } - - /// Assuming the URL is in the `file` scheme or similar, - /// convert its path to an absolute `std::path::Path`. - /// - /// **Note:** This does not actually check the URL’s `scheme`, - /// and may give nonsensical results for other schemes. - /// It is the user’s responsibility to check the URL’s scheme before calling this. - /// - /// ``` - /// # use url::Url; - /// # let url = Url::parse("file:///etc/passwd").unwrap(); - /// let path = url.to_file_path(); - /// ``` - /// - /// Returns `Err` if the host is neither empty nor `"localhost"`, - /// or if `Path::new_opt()` returns `None`. - /// (That is, if the percent-decoded path contains a NUL byte or, - /// for a Windows path, is not UTF-8.) - #[inline] - pub fn to_file_path(&self) -> Result<PathBuf, ()> { - // FIXME: Figure out what to do w.r.t host. - if !matches!(self.domain(), Some("") | Some("localhost")) { - return Err(()) - } - file_url_path_to_pathbuf(&self.path) - } - - /// If the host is a domain, return the domain as a string. - #[inline] - pub fn domain(&self) -> Option<&str> { - match self.host { - Host::Domain(ref domain) => Some(domain), - _ => None, - } - } - - /// If the host is a domain, return a mutable reference to the domain string. - #[inline] - pub fn domain_mut(&mut self) -> Option<&mut String> { - match self.host { - Host::Domain(ref mut domain) => Some(domain), - _ => None, - } - } - - /// Return the port number of the URL, even if it is the default. - /// Return `None` for file-like URLs. - #[inline] - pub fn port_or_default(&self) -> Option<u16> { - self.port.or(self.default_port) - } - - /// Serialize the path as a string. - /// - /// The returned string starts with a "/" slash, and components are separated by slashes. - /// A trailing slash represents an empty last component. - pub fn serialize_path(&self) -> String { - PathFormatter { - path: &self.path - }.to_string() - } - - /// Serialize the userinfo as a string. - /// - /// Format: "<username>:<password>@". - pub fn serialize_userinfo(&self) -> String { - UserInfoFormatter { - username: &self.username, - password: self.password.as_ref().map(|s| s as &str) - }.to_string() - } -} - - -impl fmt::Display for RelativeSchemeData { - fn fmt(&self, formatter: &mut Formatter) -> fmt::Result { - // Write the scheme-trailing double slashes. - try!(formatter.write_str("//")); - - // Write the user info. - try!(UserInfoFormatter { - username: &self.username, - password: self.password.as_ref().map(|s| s as &str) - }.fmt(formatter)); - - // Write the host. - try!(self.host.fmt(formatter)); - - // Write the port. - match self.port { - Some(port) => { - try!(write!(formatter, ":{}", port)); - }, - None => {} - } - - // Write the path. - PathFormatter { - path: &self.path - }.fmt(formatter) - } -} - - -#[cfg(unix)] -fn path_to_file_url_path(path: &Path) -> Result<Vec<String>, ()> { - use std::os::unix::prelude::OsStrExt; - if !path.is_absolute() { - return Err(()) - } - // skip the root component - Ok(path.components().skip(1).map(|c| { - percent_encode(c.as_os_str().as_bytes(), DEFAULT_ENCODE_SET) - }).collect()) -} - -#[cfg(windows)] -fn path_to_file_url_path(path: &Path) -> Result<Vec<String>, ()> { - path_to_file_url_path_windows(path) -} - -// Build this unconditionally to alleviate https://github.com/servo/rust-url/issues/102 -#[cfg_attr(not(windows), allow(dead_code))] -fn path_to_file_url_path_windows(path: &Path) -> Result<Vec<String>, ()> { - use std::path::{Prefix, Component}; - if !path.is_absolute() { - return Err(()) - } - let mut components = path.components(); - let disk = match components.next() { - Some(Component::Prefix(ref p)) => match p.kind() { - Prefix::Disk(byte) => byte, - _ => return Err(()), - }, - - // FIXME: do something with UNC and other prefixes? - _ => return Err(()) - }; - - // Start with the prefix, e.g. "C:" - let mut path = vec![format!("{}:", disk as char)]; - - for component in components { - if component == Component::RootDir { continue } - // FIXME: somehow work with non-unicode? - let part = match component.as_os_str().to_str() { - Some(s) => s, - None => return Err(()), - }; - path.push(percent_encode(part.as_bytes(), DEFAULT_ENCODE_SET)); - } - Ok(path) -} - -#[cfg(unix)] -fn file_url_path_to_pathbuf(path: &[String]) -> Result<PathBuf, ()> { - use std::ffi::OsStr; - use std::os::unix::prelude::OsStrExt; - use std::path::PathBuf; - - use percent_encoding::percent_decode_to; - - if path.is_empty() { - return Ok(PathBuf::from("/")) - } - let mut bytes = Vec::new(); - for path_part in path { - bytes.push(b'/'); - percent_decode_to(path_part.as_bytes(), &mut bytes); - } - let os_str = OsStr::from_bytes(&bytes); - let path = PathBuf::from(os_str); - debug_assert!(path.is_absolute(), - "to_file_path() failed to produce an absolute Path"); - Ok(path) -} - -#[cfg(windows)] -fn file_url_path_to_pathbuf(path: &[String]) -> Result<PathBuf, ()> { - file_url_path_to_pathbuf_windows(path) -} - -// Build this unconditionally to alleviate https://github.com/servo/rust-url/issues/102 -#[cfg_attr(not(windows), allow(dead_code))] -fn file_url_path_to_pathbuf_windows(path: &[String]) -> Result<PathBuf, ()> { - use percent_encoding::percent_decode; - - if path.is_empty() { - return Err(()) - } - let prefix = &*path[0]; - if prefix.len() != 2 || !parser::starts_with_ascii_alpha(prefix) - || prefix.as_bytes()[1] != b':' { - return Err(()) - } - let mut string = prefix.to_owned(); - for path_part in &path[1..] { - string.push('\\'); - - // Currently non-unicode windows paths cannot be represented - match String::from_utf8(percent_decode(path_part.as_bytes())) { - Ok(s) => string.push_str(&s), - Err(..) => return Err(()), - } - } - let path = PathBuf::from(string); - debug_assert!(path.is_absolute(), - "to_file_path() failed to produce an absolute Path"); - Ok(path) -} diff --git a/deps/url-0.5.5/src/parser.rs b/deps/url-0.5.5/src/parser.rs deleted file mode 100644 index ae8182dd5..000000000 --- a/deps/url-0.5.5/src/parser.rs +++ /dev/null @@ -1,749 +0,0 @@ -// Copyright 2013-2014 Simon Sapin. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -use std::ascii::AsciiExt; -use std::cmp::max; -use std::error::Error; -use std::fmt::{self, Formatter}; - -use super::{UrlParser, Url, SchemeData, RelativeSchemeData, Host, SchemeType}; -use percent_encoding::{ - utf8_percent_encode_to, percent_encode, - SIMPLE_ENCODE_SET, DEFAULT_ENCODE_SET, USERINFO_ENCODE_SET, QUERY_ENCODE_SET -}; - - -pub type ParseResult<T> = Result<T, ParseError>; - - -macro_rules! simple_enum_error { - ($($name: ident => $description: expr,)+) => { - /// Errors that can occur during parsing. - #[derive(PartialEq, Eq, Clone, Copy, Debug)] - pub enum ParseError { - $( - $name, - )+ - } - - impl Error for ParseError { - fn description(&self) -> &str { - match *self { - $( - ParseError::$name => $description, - )+ - } - } - } - } -} - -simple_enum_error! { - EmptyHost => "empty host", - InvalidScheme => "invalid scheme", - InvalidPort => "invalid port number", - InvalidIpv4Address => "invalid IPv4 address", - InvalidIpv6Address => "invalid IPv6 address", - InvalidDomainCharacter => "invalid domain character", - InvalidCharacter => "invalid character", - InvalidBackslash => "invalid backslash", - InvalidPercentEncoded => "invalid percent-encoded sequence", - InvalidAtSymbolInUser => "invalid @-symbol in user", - ExpectedTwoSlashes => "expected two slashes (//)", - ExpectedInitialSlash => "expected the input to start with a slash", - NonUrlCodePoint => "non URL code point", - RelativeUrlWithScheme => "relative URL with scheme", - RelativeUrlWithoutBase => "relative URL without a base", - RelativeUrlWithNonRelativeBase => "relative URL with a non-relative base", - NonAsciiDomainsNotSupportedYet => "non-ASCII domains are not supported yet", - CannotSetJavascriptFragment => "cannot set fragment on javascript: URL", - CannotSetPortWithFileLikeScheme => "cannot set port with file-like scheme", - CannotSetUsernameWithNonRelativeScheme => "cannot set username with non-relative scheme", - CannotSetPasswordWithNonRelativeScheme => "cannot set password with non-relative scheme", - CannotSetHostPortWithNonRelativeScheme => "cannot set host and port with non-relative scheme", - CannotSetHostWithNonRelativeScheme => "cannot set host with non-relative scheme", - CannotSetPortWithNonRelativeScheme => "cannot set port with non-relative scheme", - CannotSetPathWithNonRelativeScheme => "cannot set path with non-relative scheme", -} - -impl fmt::Display for ParseError { - fn fmt(&self, fmt: &mut Formatter) -> fmt::Result { - self.description().fmt(fmt) - } -} - -/// This is called on non-fatal parse errors. -/// -/// The handler can choose to continue or abort parsing by returning Ok() or Err(), respectively. -/// See the `UrlParser::error_handler` method. -/// -/// FIXME: make this a by-ref closure when that’s supported. -pub type ErrorHandler = fn(reason: ParseError) -> ParseResult<()>; - - -#[derive(PartialEq, Eq)] -pub enum Context { - UrlParser, - Setter, -} - - -pub fn parse_url(input: &str, parser: &UrlParser) -> ParseResult<Url> { - let input = input.trim_matches(&[' ', '\t', '\n', '\r', '\x0C'][..]); - let (scheme, remaining) = match parse_scheme(input, Context::UrlParser) { - Some((scheme, remaining)) => (scheme, remaining), - // No-scheme state - None => return match parser.base_url { - Some(&Url { ref scheme, scheme_data: SchemeData::Relative(ref base), - ref query, .. }) => { - let scheme_type = parser.get_scheme_type(&scheme); - parse_relative_url(input, scheme.clone(), scheme_type, base, query, parser) - }, - Some(_) => Err(ParseError::RelativeUrlWithNonRelativeBase), - None => Err(ParseError::RelativeUrlWithoutBase), - }, - }; - let scheme_type = parser.get_scheme_type(&scheme); - match scheme_type { - SchemeType::FileLike => { - // Relative state? - match parser.base_url { - Some(&Url { scheme: ref base_scheme, scheme_data: SchemeData::Relative(ref base), - ref query, .. }) - if scheme == *base_scheme => { - parse_relative_url(remaining, scheme, scheme_type, base, query, parser) - }, - // FIXME: Should not have to use a made-up base URL. - _ => parse_relative_url(remaining, scheme, scheme_type, &RelativeSchemeData { - username: String::new(), password: None, host: Host::Domain(String::new()), - port: None, default_port: None, path: Vec::new() - }, &None, parser) - } - }, - SchemeType::Relative(..) => { - match parser.base_url { - Some(&Url { scheme: ref base_scheme, scheme_data: SchemeData::Relative(ref base), - ref query, .. }) - if scheme == *base_scheme && !remaining.starts_with("//") => { - try!(parser.parse_error(ParseError::RelativeUrlWithScheme)); - parse_relative_url(remaining, scheme, scheme_type, base, query, parser) - }, - _ => parse_absolute_url(scheme, scheme_type, remaining, parser), - } - }, - SchemeType::NonRelative => { - // Scheme data state - let (scheme_data, remaining) = try!(parse_scheme_data(remaining, parser)); - let (query, fragment) = try!(parse_query_and_fragment(remaining, parser)); - Ok(Url { scheme: scheme, scheme_data: SchemeData::NonRelative(scheme_data), - query: query, fragment: fragment }) - } - } -} - - -pub fn parse_scheme(input: &str, context: Context) -> Option<(String, &str)> { - if input.is_empty() || !starts_with_ascii_alpha(input) { - return None - } - for (i, c) in input.char_indices() { - match c { - 'a'...'z' | 'A'...'Z' | '0'...'9' | '+' | '-' | '.' => (), - ':' => return Some(( - input[..i].to_ascii_lowercase(), - &input[i + 1..], - )), - _ => return None, - } - } - // EOF before ':' - match context { - Context::Setter => Some((input.to_ascii_lowercase(), "")), - Context::UrlParser => None - } -} - - -fn parse_absolute_url<'a>(scheme: String, scheme_type: SchemeType, - input: &'a str, parser: &UrlParser) -> ParseResult<Url> { - // Authority first slash state - let remaining = try!(skip_slashes(input, parser)); - // Authority state - let (username, password, remaining) = try!(parse_userinfo(remaining, parser)); - // Host state - let (host, port, default_port, remaining) = try!(parse_host(remaining, scheme_type, parser)); - let (path, remaining) = try!(parse_path_start( - remaining, Context::UrlParser, scheme_type, parser)); - let scheme_data = SchemeData::Relative(RelativeSchemeData { - username: username, password: password, - host: host, port: port, default_port: default_port, - path: path }); - let (query, fragment) = try!(parse_query_and_fragment(remaining, parser)); - Ok(Url { scheme: scheme, scheme_data: scheme_data, query: query, fragment: fragment }) -} - - -fn parse_relative_url<'a>(input: &'a str, scheme: String, scheme_type: SchemeType, - base: &RelativeSchemeData, base_query: &Option<String>, - parser: &UrlParser) - -> ParseResult<Url> { - let mut chars = input.chars(); - match chars.next() { - Some('/') | Some('\\') => { - let ch = chars.next(); - // Relative slash state - if matches!(ch, Some('/') | Some('\\')) { - if ch == Some('\\') { - try!(parser.parse_error(ParseError::InvalidBackslash)) - } - if scheme_type == SchemeType::FileLike { - // File host state - let remaining = &input[2..]; - let (host, remaining) = if remaining.len() >= 2 - && starts_with_ascii_alpha(remaining) - && matches!(remaining.as_bytes()[1], b':' | b'|') - && (remaining.len() == 2 - || matches!(remaining.as_bytes()[2], - b'/' | b'\\' | b'?' | b'#')) - { - // Windows drive letter quirk - (Host::Domain(String::new()), remaining) - } else { - try!(parse_file_host(remaining, parser)) - }; - let (path, remaining) = try!(parse_path_start( - remaining, Context::UrlParser, scheme_type, parser)); - let scheme_data = SchemeData::Relative(RelativeSchemeData { - username: String::new(), password: None, - host: host, port: None, default_port: None, path: path - }); - let (query, fragment) = try!(parse_query_and_fragment(remaining, parser)); - Ok(Url { scheme: scheme, scheme_data: scheme_data, - query: query, fragment: fragment }) - } else { - parse_absolute_url(scheme, scheme_type, input, parser) - } - } else { - // Relative path state - let (path, remaining) = try!(parse_path( - &[], &input[1..], Context::UrlParser, scheme_type, parser)); - let scheme_data = SchemeData::Relative(if scheme_type == SchemeType::FileLike { - RelativeSchemeData { - username: String::new(), password: None, host: - Host::Domain(String::new()), port: None, default_port: None, path: path - } - } else { - RelativeSchemeData { - username: base.username.clone(), - password: base.password.clone(), - host: base.host.clone(), - port: base.port.clone(), - default_port: base.default_port.clone(), - path: path - } - }); - let (query, fragment) = try!( - parse_query_and_fragment(remaining, parser)); - Ok(Url { scheme: scheme, scheme_data: scheme_data, - query: query, fragment: fragment }) - } - }, - Some('?') => { - let (query, fragment) = try!(parse_query_and_fragment(input, parser)); - Ok(Url { scheme: scheme, scheme_data: SchemeData::Relative(base.clone()), - query: query, fragment: fragment }) - }, - Some('#') => { - let fragment = Some(try!(parse_fragment(&input[1..], parser))); - Ok(Url { scheme: scheme, scheme_data: SchemeData::Relative(base.clone()), - query: base_query.clone(), fragment: fragment }) - } - None => { - Ok(Url { scheme: scheme, scheme_data: SchemeData::Relative(base.clone()), - query: base_query.clone(), fragment: None }) - } - _ => { - let (scheme_data, remaining) = if scheme_type == SchemeType::FileLike - && input.len() >= 2 - && starts_with_ascii_alpha(input) - && matches!(input.as_bytes()[1], b':' | b'|') - && (input.len() == 2 - || matches!(input.as_bytes()[2], b'/' | b'\\' | b'?' | b'#')) - { - // Windows drive letter quirk - let (path, remaining) = try!(parse_path( - &[], input, Context::UrlParser, scheme_type, parser)); - (SchemeData::Relative(RelativeSchemeData { - username: String::new(), password: None, - host: Host::Domain(String::new()), - port: None, - default_port: None, - path: path - }), remaining) - } else { - let base_path = &base.path[..max(base.path.len(), 1) - 1]; - // Relative path state - let (path, remaining) = try!(parse_path( - base_path, input, Context::UrlParser, scheme_type, parser)); - (SchemeData::Relative(RelativeSchemeData { - username: base.username.clone(), - password: base.password.clone(), - host: base.host.clone(), - port: base.port.clone(), - default_port: base.default_port.clone(), - path: path - }), remaining) - }; - let (query, fragment) = try!(parse_query_and_fragment(remaining, parser)); - Ok(Url { scheme: scheme, scheme_data: scheme_data, - query: query, fragment: fragment }) - } - } -} - - -fn skip_slashes<'a>(input: &'a str, parser: &UrlParser) -> ParseResult<&'a str> { - let first_non_slash = input.find(|c| !matches!(c, '/' | '\\')).unwrap_or(input.len()); - if &input[..first_non_slash] != "//" { - try!(parser.parse_error(ParseError::ExpectedTwoSlashes)); - } - Ok(&input[first_non_slash..]) -} - - -fn parse_userinfo<'a>(input: &'a str, parser: &UrlParser) - -> ParseResult<(String, Option<String>, &'a str)> { - let mut last_at = None; - for (i, c) in input.char_indices() { - match c { - '@' => { - if last_at.is_some() { - try!(parser.parse_error(ParseError::InvalidAtSymbolInUser)) - } - last_at = Some(i) - }, - '/' | '\\' | '?' | '#' => break, - _ => (), - } - } - let (input, remaining) = match last_at { - Some(at) => (&input[..at], &input[at + 1..]), - None => return Ok((String::new(), None, input)), - }; - - let mut username = String::new(); - let mut password = None; - for (i, c, next_i) in input.char_ranges() { - match c { - ':' => { - password = Some(try!(parse_password(&input[i + 1..], parser))); - break - }, - '\t' | '\n' | '\r' => try!(parser.parse_error(ParseError::InvalidCharacter)), - _ => { - try!(check_url_code_point(input, i, c, parser)); - // The spec says to use the default encode set, - // but also replaces '@' by '%40' in an earlier step. - utf8_percent_encode_to(&input[i..next_i], - USERINFO_ENCODE_SET, &mut username); - } - } - } - Ok((username, password, remaining)) -} - - -fn parse_password(input: &str, parser: &UrlParser) -> ParseResult<String> { - let mut password = String::new(); - for (i, c, next_i) in input.char_ranges() { - match c { - '\t' | '\n' | '\r' => try!(parser.parse_error(ParseError::InvalidCharacter)), - _ => { - try!(check_url_code_point(input, i, c, parser)); - // The spec says to use the default encode set, - // but also replaces '@' by '%40' in an earlier step. - utf8_percent_encode_to(&input[i..next_i], - USERINFO_ENCODE_SET, &mut password); - } - } - } - Ok(password) -} - - -pub fn parse_host<'a>(input: &'a str, scheme_type: SchemeType, parser: &UrlParser) - -> ParseResult<(Host, Option<u16>, Option<u16>, &'a str)> { - let (host, remaining) = try!(parse_hostname(input, parser)); - let (port, default_port, remaining) = if remaining.starts_with(":") { - try!(parse_port(&remaining[1..], scheme_type, parser)) - } else { - (None, scheme_type.default_port(), remaining) - }; - Ok((host, port, default_port, remaining)) -} - - -pub fn parse_hostname<'a>(input: &'a str, parser: &UrlParser) - -> ParseResult<(Host, &'a str)> { - let mut inside_square_brackets = false; - let mut host_input = String::new(); - let mut end = input.len(); - for (i, c) in input.char_indices() { - match c { - ':' if !inside_square_brackets => { - end = i; - break - }, - '/' | '\\' | '?' | '#' => { - end = i; - break - }, - '\t' | '\n' | '\r' => try!(parser.parse_error(ParseError::InvalidCharacter)), - c => { - match c { - '[' => inside_square_brackets = true, - ']' => inside_square_brackets = false, - _ => (), - } - host_input.push(c) - } - } - } - let host = try!(Host::parse(&host_input)); - Ok((host, &input[end..])) -} - - -pub fn parse_port<'a>(input: &'a str, scheme_type: SchemeType, parser: &UrlParser) - -> ParseResult<(Option<u16>, Option<u16>, &'a str)> { - let mut port = 0; - let mut has_any_digit = false; - let mut end = input.len(); - for (i, c) in input.char_indices() { - match c { - '0'...'9' => { - port = port * 10 + (c as u32 - '0' as u32); - if port > ::std::u16::MAX as u32 { - return Err(ParseError::InvalidPort) - } - has_any_digit = true; - }, - '/' | '\\' | '?' | '#' => { - end = i; - break - }, - '\t' | '\n' | '\r' => try!(parser.parse_error(ParseError::InvalidCharacter)), - _ => return Err(ParseError::InvalidPort) - } - } - let default_port = scheme_type.default_port(); - let mut port = Some(port as u16); - if !has_any_digit || port == default_port { - port = None; - } - Ok((port, default_port, &input[end..])) -} - - -fn parse_file_host<'a>(input: &'a str, parser: &UrlParser) -> ParseResult<(Host, &'a str)> { - let mut host_input = String::new(); - let mut end = input.len(); - for (i, c) in input.char_indices() { - match c { - '/' | '\\' | '?' | '#' => { - end = i; - break - }, - '\t' | '\n' | '\r' => try!(parser.parse_error(ParseError::InvalidCharacter)), - _ => host_input.push(c) - } - } - let host = if host_input.is_empty() { - Host::Domain(String::new()) - } else { - try!(Host::parse(&host_input)) - }; - Ok((host, &input[end..])) -} - - -pub fn parse_standalone_path(input: &str, parser: &UrlParser) - -> ParseResult<(Vec<String>, Option<String>, Option<String>)> { - if !input.starts_with("/") { - if input.starts_with("\\") { - try!(parser.parse_error(ParseError::InvalidBackslash)); - } else { - return Err(ParseError::ExpectedInitialSlash) - } - } - let (path, remaining) = try!(parse_path( - &[], &input[1..], Context::UrlParser, SchemeType::Relative(0), parser)); - let (query, fragment) = try!(parse_query_and_fragment(remaining, parser)); - Ok((path, query, fragment)) -} - - -pub fn parse_path_start<'a>(input: &'a str, context: Context, scheme_type: SchemeType, - parser: &UrlParser) - -> ParseResult<(Vec<String>, &'a str)> { - let mut i = 0; - // Relative path start state - match input.chars().next() { - Some('/') => i = 1, - Some('\\') => { - try!(parser.parse_error(ParseError::InvalidBackslash)); - i = 1; - }, - _ => () - } - parse_path(&[], &input[i..], context, scheme_type, parser) -} - - -fn parse_path<'a>(base_path: &[String], input: &'a str, context: Context, - scheme_type: SchemeType, parser: &UrlParser) - -> ParseResult<(Vec<String>, &'a str)> { - // Relative path state - let mut path = base_path.to_vec(); - let mut iter = input.char_ranges(); - let mut end; - loop { - let mut path_part = String::new(); - let mut ends_with_slash = false; - end = input.len(); - while let Some((i, c, next_i)) = iter.next() { - match c { - '/' => { - ends_with_slash = true; - end = i; - break - }, - '\\' => { - try!(parser.parse_error(ParseError::InvalidBackslash)); - ends_with_slash = true; - end = i; - break - }, - '?' | '#' if context == Context::UrlParser => { - end = i; - break - }, - '\t' | '\n' | '\r' => try!(parser.parse_error(ParseError::InvalidCharacter)), - _ => { - try!(check_url_code_point(input, i, c, parser)); - utf8_percent_encode_to(&input[i..next_i], - DEFAULT_ENCODE_SET, &mut path_part); - } - } - } - match &*path_part { - ".." | ".%2e" | ".%2E" | "%2e." | "%2E." | - "%2e%2e" | "%2E%2e" | "%2e%2E" | "%2E%2E" => { - path.pop(); - if !ends_with_slash { - path.push(String::new()); - } - }, - "." | "%2e" | "%2E" => { - if !ends_with_slash { - path.push(String::new()); - } - }, - _ => { - if scheme_type == SchemeType::FileLike - && path.is_empty() - && path_part.len() == 2 - && starts_with_ascii_alpha(&path_part) - && path_part.as_bytes()[1] == b'|' { - // Windows drive letter quirk - unsafe { - path_part.as_mut_vec()[1] = b':' - } - } - path.push(path_part) - } - } - if !ends_with_slash { - break - } - } - Ok((path, &input[end..])) -} - - -fn parse_scheme_data<'a>(input: &'a str, parser: &UrlParser) - -> ParseResult<(String, &'a str)> { - let mut scheme_data = String::new(); - let mut end = input.len(); - for (i, c, next_i) in input.char_ranges() { - match c { - '?' | '#' => { - end = i; - break - }, - '\t' | '\n' | '\r' => try!(parser.parse_error(ParseError::InvalidCharacter)), - _ => { - try!(check_url_code_point(input, i, c, parser)); - utf8_percent_encode_to(&input[i..next_i], - SIMPLE_ENCODE_SET, &mut scheme_data); - } - } - } - Ok((scheme_data, &input[end..])) -} - - -fn parse_query_and_fragment(input: &str, parser: &UrlParser) - -> ParseResult<(Option<String>, Option<String>)> { - match input.chars().next() { - Some('#') => Ok((None, Some(try!(parse_fragment(&input[1..], parser))))), - Some('?') => { - let (query, remaining) = try!(parse_query( - &input[1..], Context::UrlParser, parser)); - let fragment = match remaining { - Some(remaining) => Some(try!(parse_fragment(remaining, parser))), - None => None - }; - Ok((Some(query), fragment)) - }, - None => Ok((None, None)), - _ => panic!("Programming error. parse_query_and_fragment() should not \ - have been called with input \"{}\"", input) - } -} - - -pub fn parse_query<'a>(input: &'a str, context: Context, parser: &UrlParser) - -> ParseResult<(String, Option<&'a str>)> { - let mut query = String::new(); - let mut remaining = None; - for (i, c) in input.char_indices() { - match c { - '#' if context == Context::UrlParser => { - remaining = Some(&input[i + 1..]); - break - }, - '\t' | '\n' | '\r' => try!(parser.parse_error(ParseError::InvalidCharacter)), - _ => { - try!(check_url_code_point(input, i, c, parser)); - query.push(c); - } - } - } - - let query_bytes = parser.query_encoding_override.encode(&query); - Ok((percent_encode(&query_bytes, QUERY_ENCODE_SET), remaining)) -} - - -pub fn parse_fragment<'a>(input: &'a str, parser: &UrlParser) -> ParseResult<String> { - let mut fragment = String::new(); - for (i, c, next_i) in input.char_ranges() { - match c { - '\t' | '\n' | '\r' => try!(parser.parse_error(ParseError::InvalidCharacter)), - _ => { - try!(check_url_code_point(input, i, c, parser)); - utf8_percent_encode_to(&input[i..next_i], - SIMPLE_ENCODE_SET, &mut fragment); - } - } - } - Ok(fragment) -} - - -#[inline] -pub fn starts_with_ascii_alpha(string: &str) -> bool { - matches!(string.as_bytes()[0], b'a'...b'z' | b'A'...b'Z') -} - -#[inline] -fn is_ascii_hex_digit(byte: u8) -> bool { - matches!(byte, b'a'...b'f' | b'A'...b'F' | b'0'...b'9') -} - -#[inline] -fn starts_with_2_hex(input: &str) -> bool { - input.len() >= 2 - && is_ascii_hex_digit(input.as_bytes()[0]) - && is_ascii_hex_digit(input.as_bytes()[1]) -} - -#[inline] -fn is_url_code_point(c: char) -> bool { - matches!(c, - 'a'...'z' | - 'A'...'Z' | - '0'...'9' | - '!' | '$' | '&' | '\'' | '(' | ')' | '*' | '+' | ',' | '-' | - '.' | '/' | ':' | ';' | '=' | '?' | '@' | '_' | '~' | - '\u{A0}'...'\u{D7FF}' | '\u{E000}'...'\u{FDCF}' | '\u{FDF0}'...'\u{FFFD}' | - '\u{10000}'...'\u{1FFFD}' | '\u{20000}'...'\u{2FFFD}' | - '\u{30000}'...'\u{3FFFD}' | '\u{40000}'...'\u{4FFFD}' | - '\u{50000}'...'\u{5FFFD}' | '\u{60000}'...'\u{6FFFD}' | - '\u{70000}'...'\u{7FFFD}' | '\u{80000}'...'\u{8FFFD}' | - '\u{90000}'...'\u{9FFFD}' | '\u{A0000}'...'\u{AFFFD}' | - '\u{B0000}'...'\u{BFFFD}' | '\u{C0000}'...'\u{CFFFD}' | - '\u{D0000}'...'\u{DFFFD}' | '\u{E1000}'...'\u{EFFFD}' | - '\u{F0000}'...'\u{FFFFD}' | '\u{100000}'...'\u{10FFFD}') -} - -// Non URL code points: -// U+0000 to U+0020 (space) -// " # % < > [ \ ] ^ ` { | } -// U+007F to U+009F -// surrogates -// U+FDD0 to U+FDEF -// Last two of each plane: U+__FFFE to U+__FFFF for __ in 00 to 10 hex - - -pub trait StrCharRanges<'a> { - fn char_ranges(&self) -> CharRanges<'a>; -} - - -impl<'a> StrCharRanges<'a> for &'a str { - #[inline] - fn char_ranges(&self) -> CharRanges<'a> { - CharRanges { slice: *self, position: 0 } - } -} - -pub struct CharRanges<'a> { - slice: &'a str, - position: usize, -} - -impl<'a> Iterator for CharRanges<'a> { - type Item = (usize, char, usize); - - #[inline] - fn next(&mut self) -> Option<(usize, char, usize)> { - match self.slice[self.position..].chars().next() { - Some(ch) => { - let position = self.position; - self.position = position + ch.len_utf8(); - Some((position, ch, position + ch.len_utf8())) - } - None => None, - } - } -} - -#[inline] -fn check_url_code_point(input: &str, i: usize, c: char, parser: &UrlParser) - -> ParseResult<()> { - if c == '%' { - if !starts_with_2_hex(&input[i + 1..]) { - try!(parser.parse_error(ParseError::InvalidPercentEncoded)); - } - } else if !is_url_code_point(c) { - try!(parser.parse_error(ParseError::NonUrlCodePoint)); - } - Ok(()) -} diff --git a/deps/url-0.5.5/src/percent_encoding.rs b/deps/url-0.5.5/src/percent_encoding.rs deleted file mode 100644 index ee11cc3d7..000000000 --- a/deps/url-0.5.5/src/percent_encoding.rs +++ /dev/null @@ -1,167 +0,0 @@ -// Copyright 2013-2014 Simon Sapin. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - - -#[path = "encode_sets.rs"] -mod encode_sets; - -/// Represents a set of characters / bytes that should be percent-encoded. -/// -/// See [encode sets specification](http://url.spec.whatwg.org/#simple-encode-set). -/// -/// Different characters need to be encoded in different parts of an URL. -/// For example, a literal `?` question mark in an URL’s path would indicate -/// the start of the query string. -/// A question mark meant to be part of the path therefore needs to be percent-encoded. -/// In the query string however, a question mark does not have any special meaning -/// and does not need to be percent-encoded. -/// -/// Since the implementation details of `EncodeSet` are private, -/// the set of available encode sets is not extensible beyond the ones -/// provided here. -/// If you need a different encode set, -/// please [file a bug](https://github.com/servo/rust-url/issues) -/// explaining the use case. -#[derive(Copy, Clone)] -pub struct EncodeSet { - map: &'static [&'static str; 256], -} - -/// This encode set is used for fragment identifier and non-relative scheme data. -pub static SIMPLE_ENCODE_SET: EncodeSet = EncodeSet { map: &encode_sets::SIMPLE }; - -/// This encode set is used in the URL parser for query strings. -pub static QUERY_ENCODE_SET: EncodeSet = EncodeSet { map: &encode_sets::QUERY }; - -/// This encode set is used for path components. -pub static DEFAULT_ENCODE_SET: EncodeSet = EncodeSet { map: &encode_sets::DEFAULT }; - -/// This encode set is used in the URL parser for usernames and passwords. -pub static USERINFO_ENCODE_SET: EncodeSet = EncodeSet { map: &encode_sets::USERINFO }; - -/// This encode set should be used when setting the password field of a parsed URL. -pub static PASSWORD_ENCODE_SET: EncodeSet = EncodeSet { map: &encode_sets::PASSWORD }; - -/// This encode set should be used when setting the username field of a parsed URL. -pub static USERNAME_ENCODE_SET: EncodeSet = EncodeSet { map: &encode_sets::USERNAME }; - -/// This encode set is used in `application/x-www-form-urlencoded` serialization. -pub static FORM_URLENCODED_ENCODE_SET: EncodeSet = EncodeSet { - map: &encode_sets::FORM_URLENCODED, -}; - -/// This encode set is used for HTTP header values and is defined at -/// https://tools.ietf.org/html/rfc5987#section-3.2 -pub static HTTP_VALUE_ENCODE_SET: EncodeSet = EncodeSet { map: &encode_sets::HTTP_VALUE }; - -/// Percent-encode the given bytes, and push the result to `output`. -/// -/// The pushed strings are within the ASCII range. -#[inline] -pub fn percent_encode_to(input: &[u8], encode_set: EncodeSet, output: &mut String) { - for &byte in input { - output.push_str(encode_set.map[byte as usize]) - } -} - - -/// Percent-encode the given bytes. -/// -/// The returned string is within the ASCII range. -#[inline] -pub fn percent_encode(input: &[u8], encode_set: EncodeSet) -> String { - let mut output = String::new(); - percent_encode_to(input, encode_set, &mut output); - output -} - - -/// Percent-encode the UTF-8 encoding of the given string, and push the result to `output`. -/// -/// The pushed strings are within the ASCII range. -#[inline] -pub fn utf8_percent_encode_to(input: &str, encode_set: EncodeSet, output: &mut String) { - percent_encode_to(input.as_bytes(), encode_set, output) -} - - -/// Percent-encode the UTF-8 encoding of the given string. -/// -/// The returned string is within the ASCII range. -#[inline] -pub fn utf8_percent_encode(input: &str, encode_set: EncodeSet) -> String { - let mut output = String::new(); - utf8_percent_encode_to(input, encode_set, &mut output); - output -} - - -/// Percent-decode the given bytes, and push the result to `output`. -pub fn percent_decode_to(input: &[u8], output: &mut Vec<u8>) { - let mut i = 0; - while i < input.len() { - let c = input[i]; - if c == b'%' && i + 2 < input.len() { - if let (Some(h), Some(l)) = (from_hex(input[i + 1]), from_hex(input[i + 2])) { - output.push(h * 0x10 + l); - i += 3; - continue - } - } - - output.push(c); - i += 1; - } -} - - -/// Percent-decode the given bytes. -#[inline] -pub fn percent_decode(input: &[u8]) -> Vec<u8> { - let mut output = Vec::new(); - percent_decode_to(input, &mut output); - output -} - - -/// Percent-decode the given bytes, and decode the result as UTF-8. -/// -/// This is “lossy”: invalid UTF-8 percent-encoded byte sequences -/// will be replaced � U+FFFD, the replacement character. -#[inline] -pub fn lossy_utf8_percent_decode(input: &[u8]) -> String { - String::from_utf8_lossy(&percent_decode(input)).to_string() -} - -/// Convert the given hex character into its numeric value. -/// -/// # Examples -/// -/// ``` -/// use url::percent_encoding::from_hex; -/// assert_eq!(from_hex('0' as u8), Some(0)); -/// assert_eq!(from_hex('1' as u8), Some(1)); -/// assert_eq!(from_hex('9' as u8), Some(9)); -/// assert_eq!(from_hex('A' as u8), Some(10)); -/// assert_eq!(from_hex('a' as u8), Some(10)); -/// assert_eq!(from_hex('F' as u8), Some(15)); -/// assert_eq!(from_hex('f' as u8), Some(15)); -/// assert_eq!(from_hex('G' as u8), None); -/// assert_eq!(from_hex('g' as u8), None); -/// assert_eq!(from_hex('Z' as u8), None); -/// assert_eq!(from_hex('z' as u8), None); -/// ``` -#[inline] -pub fn from_hex(byte: u8) -> Option<u8> { - match byte { - b'0' ... b'9' => Some(byte - b'0'), // 0..9 - b'A' ... b'F' => Some(byte + 10 - b'A'), // A..F - b'a' ... b'f' => Some(byte + 10 - b'a'), // a..f - _ => None - } -} diff --git a/deps/url-0.5.5/src/urlutils.rs b/deps/url-0.5.5/src/urlutils.rs deleted file mode 100644 index cd57b501b..000000000 --- a/deps/url-0.5.5/src/urlutils.rs +++ /dev/null @@ -1,169 +0,0 @@ -// Copyright 2013-2014 Simon Sapin. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - - -//! These methods are not meant for use in Rust code, -//! only to help implement the JavaScript URLUtils API: http://url.spec.whatwg.org/#urlutils - -use super::{Url, UrlParser, SchemeType, SchemeData, RelativeSchemeData}; -use parser::{ParseError, ParseResult, Context}; -use percent_encoding::{utf8_percent_encode_to, USERNAME_ENCODE_SET, PASSWORD_ENCODE_SET}; - - -#[allow(dead_code)] -pub struct UrlUtilsWrapper<'a> { - pub url: &'a mut Url, - pub parser: &'a UrlParser<'a>, -} - -#[doc(hidden)] -pub trait UrlUtils { - fn set_scheme(&mut self, input: &str) -> ParseResult<()>; - fn set_username(&mut self, input: &str) -> ParseResult<()>; - fn set_password(&mut self, input: &str) -> ParseResult<()>; - fn set_host_and_port(&mut self, input: &str) -> ParseResult<()>; - fn set_host(&mut self, input: &str) -> ParseResult<()>; - fn set_port(&mut self, input: &str) -> ParseResult<()>; - fn set_path(&mut self, input: &str) -> ParseResult<()>; - fn set_query(&mut self, input: &str) -> ParseResult<()>; - fn set_fragment(&mut self, input: &str) -> ParseResult<()>; -} - -impl<'a> UrlUtils for UrlUtilsWrapper<'a> { - /// `URLUtils.protocol` setter - fn set_scheme(&mut self, input: &str) -> ParseResult<()> { - match ::parser::parse_scheme(input, Context::Setter) { - Some((scheme, _)) => { - if self.parser.get_scheme_type(&self.url.scheme).same_as(self.parser.get_scheme_type(&scheme)) { - return Err(ParseError::InvalidScheme); - } - self.url.scheme = scheme; - Ok(()) - }, - None => Err(ParseError::InvalidScheme), - } - } - - /// `URLUtils.username` setter - fn set_username(&mut self, input: &str) -> ParseResult<()> { - match self.url.scheme_data { - SchemeData::Relative(RelativeSchemeData { ref mut username, .. }) => { - username.truncate(0); - utf8_percent_encode_to(input, USERNAME_ENCODE_SET, username); - Ok(()) - }, - SchemeData::NonRelative(_) => Err(ParseError::CannotSetUsernameWithNonRelativeScheme) - } - } - - /// `URLUtils.password` setter - fn set_password(&mut self, input: &str) -> ParseResult<()> { - match self.url.scheme_data { - SchemeData::Relative(RelativeSchemeData { ref mut password, .. }) => { - if input.len() == 0 { - *password = None; - return Ok(()); - } - let mut new_password = String::new(); - utf8_percent_encode_to(input, PASSWORD_ENCODE_SET, &mut new_password); - *password = Some(new_password); - Ok(()) - }, - SchemeData::NonRelative(_) => Err(ParseError::CannotSetPasswordWithNonRelativeScheme) - } - } - - /// `URLUtils.host` setter - fn set_host_and_port(&mut self, input: &str) -> ParseResult<()> { - match self.url.scheme_data { - SchemeData::Relative(RelativeSchemeData { - ref mut host, ref mut port, ref mut default_port, .. - }) => { - let scheme_type = self.parser.get_scheme_type(&self.url.scheme); - let (new_host, new_port, new_default_port, _) = try!(::parser::parse_host( - input, scheme_type, self.parser)); - *host = new_host; - *port = new_port; - *default_port = new_default_port; - Ok(()) - }, - SchemeData::NonRelative(_) => Err(ParseError::CannotSetHostPortWithNonRelativeScheme) - } - } - - /// `URLUtils.hostname` setter - fn set_host(&mut self, input: &str) -> ParseResult<()> { - match self.url.scheme_data { - SchemeData::Relative(RelativeSchemeData { ref mut host, .. }) => { - let (new_host, _) = try!(::parser::parse_hostname(input, self.parser)); - *host = new_host; - Ok(()) - }, - SchemeData::NonRelative(_) => Err(ParseError::CannotSetHostWithNonRelativeScheme) - } - } - - /// `URLUtils.port` setter - fn set_port(&mut self, input: &str) -> ParseResult<()> { - match self.url.scheme_data { - SchemeData::Relative(RelativeSchemeData { ref mut port, ref mut default_port, .. }) => { - let scheme_type = self.parser.get_scheme_type(&self.url.scheme); - if scheme_type == SchemeType::FileLike { - return Err(ParseError::CannotSetPortWithFileLikeScheme); - } - let (new_port, new_default_port, _) = try!(::parser::parse_port( - input, scheme_type, self.parser)); - *port = new_port; - *default_port = new_default_port; - Ok(()) - }, - SchemeData::NonRelative(_) => Err(ParseError::CannotSetPortWithNonRelativeScheme) - } - } - - /// `URLUtils.pathname` setter - fn set_path(&mut self, input: &str) -> ParseResult<()> { - match self.url.scheme_data { - SchemeData::Relative(RelativeSchemeData { ref mut path, .. }) => { - let scheme_type = self.parser.get_scheme_type(&self.url.scheme); - let (new_path, _) = try!(::parser::parse_path_start( - input, Context::Setter, scheme_type, self.parser)); - *path = new_path; - Ok(()) - }, - SchemeData::NonRelative(_) => Err(ParseError::CannotSetPathWithNonRelativeScheme) - } - } - - /// `URLUtils.search` setter - fn set_query(&mut self, input: &str) -> ParseResult<()> { - self.url.query = if input.is_empty() { - None - } else { - let input = if input.starts_with("?") { &input[1..] } else { input }; - let (new_query, _) = try!(::parser::parse_query( - input, Context::Setter, self.parser)); - Some(new_query) - }; - Ok(()) - } - - /// `URLUtils.hash` setter - fn set_fragment(&mut self, input: &str) -> ParseResult<()> { - if self.url.scheme == "javascript" { - return Err(ParseError::CannotSetJavascriptFragment) - } - self.url.fragment = if input.is_empty() { - None - } else { - let input = if input.starts_with("#") { &input[1..] } else { input }; - Some(try!(::parser::parse_fragment(input, self.parser))) - }; - Ok(()) - } -} diff --git a/deps/url-0.5.5/tests/form_urlencoded.rs b/deps/url-0.5.5/tests/form_urlencoded.rs deleted file mode 100644 index 59080cf98..000000000 --- a/deps/url-0.5.5/tests/form_urlencoded.rs +++ /dev/null @@ -1,29 +0,0 @@ -extern crate url; - -use url::form_urlencoded::*; - -#[test] -fn test_form_urlencoded() { - let pairs = &[ - ("foo".to_string(), "é&".to_string()), - ("bar".to_string(), "".to_string()), - ("foo".to_string(), "#".to_string()) - ]; - let encoded = serialize(pairs); - assert_eq!(encoded, "foo=%C3%A9%26&bar=&foo=%23"); - assert_eq!(parse(encoded.as_bytes()), pairs.to_vec()); -} - -#[test] -fn test_form_serialize() { - let pairs = [("foo", "é&"), - ("bar", ""), - ("foo", "#")]; - - let want = "foo=%C3%A9%26&bar=&foo=%23"; - // Works with referenced tuples - assert_eq!(serialize(pairs.iter()), want); - // Works with owned tuples - assert_eq!(serialize(pairs.iter().map(|p| (p.0, p.1))), want); - -} diff --git a/deps/url-0.5.5/tests/format.rs b/deps/url-0.5.5/tests/format.rs deleted file mode 100644 index 39aac62a6..000000000 --- a/deps/url-0.5.5/tests/format.rs +++ /dev/null @@ -1,67 +0,0 @@ -extern crate url; - -use url::{Url, Host}; -use url::format::{PathFormatter, UserInfoFormatter}; - -#[test] -fn path_formatting() { - let data = [ - (vec![], "/"), - (vec![""], "/"), - (vec!["test", "path"], "/test/path"), - (vec!["test", "path", ""], "/test/path/") - ]; - for &(ref path, result) in &data { - assert_eq!(PathFormatter { - path: path - }.to_string(), result.to_string()); - } -} - -#[test] -fn host() { - // libstd’s `Display for Ipv6Addr` serializes 0:0:0:0:0:0:_:_ and 0:0:0:0:0:ffff:_:_ - // using IPv4-like syntax, as suggested in https://tools.ietf.org/html/rfc5952#section-4 - // but https://url.spec.whatwg.org/#concept-ipv6-serializer specifies not to. - - // Not [::0.0.0.2] / [::ffff:0.0.0.2] - assert_eq!(Host::parse("[0::2]").unwrap().to_string(), "[::2]"); - assert_eq!(Host::parse("[0::ffff:0:2]").unwrap().to_string(), "[::ffff:0:2]"); -} - -#[test] -fn userinfo_formatting() { - // Test data as (username, password, result) tuples. - let data = [ - ("", None, ""), - ("", Some(""), ":@"), - ("", Some("password"), ":password@"), - ("username", None, "username@"), - ("username", Some(""), "username:@"), - ("username", Some("password"), "username:password@") - ]; - for &(username, password, result) in &data { - assert_eq!(UserInfoFormatter { - username: username, - password: password - }.to_string(), result.to_string()); - } -} - -#[test] -fn relative_scheme_url_formatting() { - let data = [ - ("http://example.com/", "http://example.com/"), - ("http://addslash.com", "http://addslash.com/"), - ("http://@emptyuser.com/", "http://emptyuser.com/"), - ("http://:@emptypass.com/", "http://:@emptypass.com/"), - ("http://user@user.com/", "http://user@user.com/"), - ("http://user:pass@userpass.com/", "http://user:pass@userpass.com/"), - ("http://slashquery.com/path/?q=something", "http://slashquery.com/path/?q=something"), - ("http://noslashquery.com/path?q=something", "http://noslashquery.com/path?q=something") - ]; - for &(input, result) in &data { - let url = Url::parse(input).unwrap(); - assert_eq!(url.to_string(), result.to_string()); - } -} diff --git a/deps/url-0.5.5/tests/idna.rs b/deps/url-0.5.5/tests/idna.rs deleted file mode 100644 index bb03f39d0..000000000 --- a/deps/url-0.5.5/tests/idna.rs +++ /dev/null @@ -1,104 +0,0 @@ -extern crate url; - -use std::char; -use url::idna; - -#[test] -fn test_uts46() { - // http://www.unicode.org/Public/idna/latest/IdnaTest.txt - for line in include_str!("IdnaTest.txt").lines() { - if line == "" || line.starts_with("#") { - continue - } - // Remove comments - let mut line = match line.find("#") { - Some(index) => &line[0..index], - None => line - }; - - let mut expected_failure = false; - if line.starts_with("XFAIL") { - expected_failure = true; - line = &line[5..line.len()]; - }; - - let mut pieces = line.split(';').map(|x| x.trim()).collect::<Vec<&str>>(); - - let test_type = pieces.remove(0); - let original = pieces.remove(0); - let source = unescape(original); - let to_unicode = pieces.remove(0); - let to_ascii = pieces.remove(0); - let _nv8 = if pieces.len() > 0 { pieces.remove(0) } else { "" }; - - if expected_failure { - continue; - } - - let result = idna::uts46_to_ascii(&source, idna::Uts46Flags { - use_std3_ascii_rules: true, - transitional_processing: test_type == "T", - verify_dns_length: true, - }); - - if to_ascii.starts_with("[") { - if to_ascii.starts_with("[C") { - // http://unicode.org/reports/tr46/#Deviations - // applications that perform IDNA2008 lookup are not required to check for these contexts - continue; - } - let res = result.ok(); - assert!(res == None, "Expected error. result: {} | original: {} | source: {}", res.unwrap(), original, source); - continue; - } - - let to_ascii = if to_ascii.len() > 0 { - to_ascii.to_string() - } else { - if to_unicode.len() > 0 { - to_unicode.to_string() - } else { - source.clone() - } - }; - - if _nv8 == "NV8" { - // This result isn't valid under IDNA2008. Skip it - continue; - } - - assert!(result.is_ok(), "Couldn't parse {} | original: {} | error: {:?}", source, original, result.err()); - let output = result.ok().unwrap(); - assert!(output == to_ascii, "result: {} | expected: {} | original: {} | source: {}", output, to_ascii, original, source); - } -} - -fn unescape(input: &str) -> String { - let mut output = String::new(); - let mut chars = input.chars(); - loop { - match chars.next() { - None => return output, - Some(c) => - if c == '\\' { - match chars.next().unwrap() { - '\\' => output.push('\\'), - 'u' => { - let c1 = chars.next().unwrap().to_digit(16).unwrap(); - let c2 = chars.next().unwrap().to_digit(16).unwrap(); - let c3 = chars.next().unwrap().to_digit(16).unwrap(); - let c4 = chars.next().unwrap().to_digit(16).unwrap(); - match char::from_u32((((c1 * 16 + c2) * 16 + c3) * 16 + c4)) - { - Some(c) => output.push(c), - None => { output.push_str(&format!("\\u{:X}{:X}{:X}{:X}",c1,c2,c3,c4)); } - }; - } - _ => panic!("Invalid test data input"), - } - } else { - output.push(c); - } - } - } -} diff --git a/deps/url-0.5.5/tests/punycode.rs b/deps/url-0.5.5/tests/punycode.rs deleted file mode 100644 index ae42b34d1..000000000 --- a/deps/url-0.5.5/tests/punycode.rs +++ /dev/null @@ -1,52 +0,0 @@ -extern crate url; -extern crate rustc_serialize; - -use url::punycode::{decode, encode_str}; -use rustc_serialize::json::{Json, Object}; - -fn one_test(description: &str, decoded: &str, encoded: &str) { - match decode(encoded) { - None => panic!("Decoding {} failed.", encoded), - Some(result) => { - let result = result.into_iter().collect::<String>(); - assert!(result == decoded, - format!("Incorrect decoding of {}:\n {}\n!= {}\n{}", - encoded, result, decoded, description)) - } - } - - match encode_str(decoded) { - None => panic!("Encoding {} failed.", decoded), - Some(result) => { - assert!(result == encoded, - format!("Incorrect encoding of {}:\n {}\n!= {}\n{}", - decoded, result, encoded, description)) - } - } -} - -fn get_string<'a>(map: &'a Object, key: &str) -> &'a str { - match map.get(&key.to_string()) { - Some(&Json::String(ref s)) => s, - None => "", - _ => panic!(), - } -} - -#[test] -fn test_punycode() { - - match Json::from_str(include_str!("punycode_tests.json")) { - Ok(Json::Array(tests)) => for test in &tests { - match test { - &Json::Object(ref o) => one_test( - get_string(o, "description"), - get_string(o, "decoded"), - get_string(o, "encoded") - ), - _ => panic!(), - } - }, - other => panic!("{:?}", other) - } -} diff --git a/deps/url-0.5.5/tests/punycode_tests.json b/deps/url-0.5.5/tests/punycode_tests.json deleted file mode 100644 index 86785b124..000000000 --- a/deps/url-0.5.5/tests/punycode_tests.json +++ /dev/null @@ -1,120 +0,0 @@ -[ -{ - "description": "These tests are copied from https://github.com/bestiejs/punycode.js/blob/master/tests/tests.js , used under the MIT license.", - "decoded": "", - "encoded": "" -}, -{ - "description": "a single basic code point", - "decoded": "Bach", - "encoded": "Bach-" -}, -{ - "description": "a single non-ASCII character", - "decoded": "\u00FC", - "encoded": "tda" -}, -{ - "description": "multiple non-ASCII characters", - "decoded": "\u00FC\u00EB\u00E4\u00F6\u2665", - "encoded": "4can8av2009b" -}, -{ - "description": "mix of ASCII and non-ASCII characters", - "decoded": "b\u00FCcher", - "encoded": "bcher-kva" -}, -{ - "description": "long string with both ASCII and non-ASCII characters", - "decoded": "Willst du die Bl\u00FCthe des fr\u00FChen, die Fr\u00FCchte des sp\u00E4teren Jahres", - "encoded": "Willst du die Blthe des frhen, die Frchte des spteren Jahres-x9e96lkal" -}, -{ - "description": "Arabic (Egyptian)", - "decoded": "\u0644\u064A\u0647\u0645\u0627\u0628\u062A\u0643\u0644\u0645\u0648\u0634\u0639\u0631\u0628\u064A\u061F", - "encoded": "egbpdaj6bu4bxfgehfvwxn" -}, -{ - "description": "Chinese (simplified)", - "decoded": "\u4ED6\u4EEC\u4E3A\u4EC0\u4E48\u4E0D\u8BF4\u4E2d\u6587", - "encoded": "ihqwcrb4cv8a8dqg056pqjye" -}, -{ - "description": "Chinese (traditional)", - "decoded": "\u4ED6\u5011\u7232\u4EC0\u9EBD\u4E0D\u8AAA\u4E2D\u6587", - "encoded": "ihqwctvzc91f659drss3x8bo0yb" -}, -{ - "description": "Czech", - "decoded": "Pro\u010Dprost\u011Bnemluv\u00ED\u010Desky", - "encoded": "Proprostnemluvesky-uyb24dma41a" -}, -{ - "description": "Hebrew", - "decoded": "\u05DC\u05DE\u05D4\u05D4\u05DD\u05E4\u05E9\u05D5\u05D8\u05DC\u05D0\u05DE\u05D3\u05D1\u05E8\u05D9\u05DD\u05E2\u05D1\u05E8\u05D9\u05EA", - "encoded": "4dbcagdahymbxekheh6e0a7fei0b" -}, -{ - "description": "Hindi (Devanagari)", - "decoded": "\u092F\u0939\u0932\u094B\u0917\u0939\u093F\u0928\u094D\u0926\u0940\u0915\u094D\u092F\u094B\u0902\u0928\u0939\u0940\u0902\u092C\u094B\u0932\u0938\u0915\u0924\u0947\u0939\u0948\u0902", - "encoded": "i1baa7eci9glrd9b2ae1bj0hfcgg6iyaf8o0a1dig0cd" -}, -{ - "description": "Japanese (kanji and hiragana)", - "decoded": "\u306A\u305C\u307F\u3093\u306A\u65E5\u672C\u8A9E\u3092\u8A71\u3057\u3066\u304F\u308C\u306A\u3044\u306E\u304B", - "encoded": "n8jok5ay5dzabd5bym9f0cm5685rrjetr6pdxa" -}, -{ - "description": "Korean (Hangul syllables)", - "decoded": "\uC138\uACC4\uC758\uBAA8\uB4E0\uC0AC\uB78C\uB4E4\uC774\uD55C\uAD6D\uC5B4\uB97C\uC774\uD574\uD55C\uB2E4\uBA74\uC5BC\uB9C8\uB098\uC88B\uC744\uAE4C", - "encoded": "989aomsvi5e83db1d2a355cv1e0vak1dwrv93d5xbh15a0dt30a5jpsd879ccm6fea98c" -}, -{ - "description": "Russian (Cyrillic)", - "decoded": "\u043F\u043E\u0447\u0435\u043C\u0443\u0436\u0435\u043E\u043D\u0438\u043D\u0435\u0433\u043E\u0432\u043E\u0440\u044F\u0442\u043F\u043E\u0440\u0443\u0441\u0441\u043A\u0438", - "encoded": "b1abfaaepdrnnbgefbadotcwatmq2g4l" -}, -{ - "description": "Spanish", - "decoded": "Porqu\u00E9nopuedensimplementehablarenEspa\u00F1ol", - "encoded": "PorqunopuedensimplementehablarenEspaol-fmd56a" -}, -{ - "description": "Vietnamese", - "decoded": "T\u1EA1isaoh\u1ECDkh\u00F4ngth\u1EC3ch\u1EC9n\u00F3iti\u1EBFngVi\u1EC7t", - "encoded": "TisaohkhngthchnitingVit-kjcr8268qyxafd2f1b9g" -}, -{ - "decoded": "3\u5E74B\u7D44\u91D1\u516B\u5148\u751F", - "encoded": "3B-ww4c5e180e575a65lsy2b" -}, -{ - "decoded": "\u5B89\u5BA4\u5948\u7F8E\u6075-with-SUPER-MONKEYS", - "encoded": "-with-SUPER-MONKEYS-pc58ag80a8qai00g7n9n" -}, -{ - "decoded": "Hello-Another-Way-\u305D\u308C\u305E\u308C\u306E\u5834\u6240", - "encoded": "Hello-Another-Way--fc4qua05auwb3674vfr0b" -}, -{ - "decoded": "\u3072\u3068\u3064\u5C4B\u6839\u306E\u4E0B2", - "encoded": "2-u9tlzr9756bt3uc0v" -}, -{ - "decoded": "Maji\u3067Koi\u3059\u308B5\u79D2\u524D", - "encoded": "MajiKoi5-783gue6qz075azm5e" -}, -{ - "decoded": "\u30D1\u30D5\u30A3\u30FCde\u30EB\u30F3\u30D0", - "encoded": "de-jg4avhby1noc0d" -}, -{ - "decoded": "\u305D\u306E\u30B9\u30D4\u30FC\u30C9\u3067", - "encoded": "d9juau41awczczp" -}, -{ - "description": "ASCII string that breaks the existing rules for host-name labels (It's not a realistic example for IDNA, because IDNA never encodes pure ASCII labels.)", - "decoded": "-> $1.00 <-", - "encoded": "-> $1.00 <--" -} -] diff --git a/deps/url-0.5.5/tests/tests.rs b/deps/url-0.5.5/tests/tests.rs deleted file mode 100644 index 45c403db8..000000000 --- a/deps/url-0.5.5/tests/tests.rs +++ /dev/null @@ -1,187 +0,0 @@ -// Copyright 2013-2014 Simon Sapin. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -extern crate url; - -use std::net::{Ipv4Addr, Ipv6Addr}; -use url::{Host, Url}; - -#[test] -fn new_file_paths() { - use std::path::{Path, PathBuf}; - if cfg!(unix) { - assert_eq!(Url::from_file_path(Path::new("relative")), Err(())); - assert_eq!(Url::from_file_path(Path::new("../relative")), Err(())); - } else { - assert_eq!(Url::from_file_path(Path::new("relative")), Err(())); - assert_eq!(Url::from_file_path(Path::new(r"..\relative")), Err(())); - assert_eq!(Url::from_file_path(Path::new(r"\drive-relative")), Err(())); - assert_eq!(Url::from_file_path(Path::new(r"\\ucn\")), Err(())); - } - - if cfg!(unix) { - let mut url = Url::from_file_path(Path::new("/foo/bar")).unwrap(); - assert_eq!(url.host(), Some(&Host::Domain("".to_string()))); - assert_eq!(url.path(), Some(&["foo".to_string(), "bar".to_string()][..])); - assert!(url.to_file_path() == Ok(PathBuf::from("/foo/bar"))); - - url.path_mut().unwrap()[1] = "ba\0r".to_string(); - url.to_file_path().is_ok(); - - url.path_mut().unwrap()[1] = "ba%00r".to_string(); - url.to_file_path().is_ok(); - } -} - -#[test] -#[cfg(unix)] -fn new_path_bad_utf8() { - use std::ffi::OsStr; - use std::os::unix::prelude::*; - use std::path::{Path, PathBuf}; - - let url = Url::from_file_path(Path::new("/foo/ba%80r")).unwrap(); - let os_str = OsStr::from_bytes(b"/foo/ba\x80r"); - assert_eq!(url.to_file_path(), Ok(PathBuf::from(os_str))); -} - -#[test] -fn new_path_windows_fun() { - if cfg!(windows) { - use std::path::{Path, PathBuf}; - let mut url = Url::from_file_path(Path::new(r"C:\foo\bar")).unwrap(); - assert_eq!(url.host(), Some(&Host::Domain("".to_string()))); - assert_eq!(url.path(), Some(&["C:".to_string(), "foo".to_string(), "bar".to_string()][..])); - assert_eq!(url.to_file_path(), - Ok(PathBuf::from(r"C:\foo\bar"))); - - url.path_mut().unwrap()[2] = "ba\0r".to_string(); - assert!(url.to_file_path().is_ok()); - - url.path_mut().unwrap()[2] = "ba%00r".to_string(); - assert!(url.to_file_path().is_ok()); - - // Invalid UTF-8 - url.path_mut().unwrap()[2] = "ba%80r".to_string(); - assert!(url.to_file_path().is_err()); - } -} - - -#[test] -fn new_directory_paths() { - use std::path::Path; - - if cfg!(unix) { - assert_eq!(Url::from_directory_path(Path::new("relative")), Err(())); - assert_eq!(Url::from_directory_path(Path::new("../relative")), Err(())); - - let url = Url::from_directory_path(Path::new("/foo/bar")).unwrap(); - assert_eq!(url.host(), Some(&Host::Domain("".to_string()))); - assert_eq!(url.path(), Some(&["foo".to_string(), "bar".to_string(), - "".to_string()][..])); - } else { - assert_eq!(Url::from_directory_path(Path::new("relative")), Err(())); - assert_eq!(Url::from_directory_path(Path::new(r"..\relative")), Err(())); - assert_eq!(Url::from_directory_path(Path::new(r"\drive-relative")), Err(())); - assert_eq!(Url::from_directory_path(Path::new(r"\\ucn\")), Err(())); - - let url = Url::from_directory_path(Path::new(r"C:\foo\bar")).unwrap(); - assert_eq!(url.host(), Some(&Host::Domain("".to_string()))); - assert_eq!(url.path(), Some(&["C:".to_string(), "foo".to_string(), - "bar".to_string(), "".to_string()][..])); - } -} - -#[test] -fn from_str() { - assert!("http://testing.com/this".parse::<Url>().is_ok()); -} - -#[test] -fn issue_124() { - let url: Url = "file:a".parse().unwrap(); - assert_eq!(url.path().unwrap(), ["a"]); - let url: Url = "file:...".parse().unwrap(); - assert_eq!(url.path().unwrap(), ["..."]); - let url: Url = "file:..".parse().unwrap(); - assert_eq!(url.path().unwrap(), [""]); -} - -#[test] -fn relative_scheme_data_equality() { - use std::hash::{Hash, Hasher, SipHasher}; - - fn check_eq(a: &Url, b: &Url) { - assert_eq!(a, b); - - let mut h1 = SipHasher::new(); - a.hash(&mut h1); - let mut h2 = SipHasher::new(); - b.hash(&mut h2); - assert_eq!(h1.finish(), h2.finish()); - } - - fn url(s: &str) -> Url { - let rv = s.parse().unwrap(); - check_eq(&rv, &rv); - rv - } - - // Doesn't care if default port is given. - let a: Url = url("https://example.com/"); - let b: Url = url("https://example.com:443/"); - check_eq(&a, &b); - - // Different ports - let a: Url = url("http://example.com/"); - let b: Url = url("http://example.com:8080/"); - assert!(a != b); - - // Different scheme - let a: Url = url("http://example.com/"); - let b: Url = url("https://example.com/"); - assert!(a != b); - - // Different host - let a: Url = url("http://foo.com/"); - let b: Url = url("http://bar.com/"); - assert!(a != b); - - // Missing path, automatically substituted. Semantically the same. - let a: Url = url("http://foo.com"); - let b: Url = url("http://foo.com/"); - check_eq(&a, &b); -} - -#[test] -fn host() { - let a = Host::parse("www.mozilla.org").unwrap(); - let b = Host::parse("1.35.33.49").unwrap(); - let c = Host::parse("[2001:0db8:85a3:08d3:1319:8a2e:0370:7344]").unwrap(); - let d = Host::parse("1.35.+33.49").unwrap(); - assert_eq!(a, Host::Domain("www.mozilla.org".to_owned())); - assert_eq!(b, Host::Ipv4(Ipv4Addr::new(1, 35, 33, 49))); - assert_eq!(c, Host::Ipv6(Ipv6Addr::new(0x2001, 0x0db8, 0x85a3, 0x08d3, - 0x1319, 0x8a2e, 0x0370, 0x7344))); - assert_eq!(d, Host::Domain("1.35.+33.49".to_owned())); - assert_eq!(Host::parse("[::]").unwrap(), Host::Ipv6(Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 0))); - assert_eq!(Host::parse("[::1]").unwrap(), Host::Ipv6(Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 1))); - assert_eq!(Host::parse("0x1.0X23.0x21.061").unwrap(), Host::Ipv4(Ipv4Addr::new(1, 35, 33, 49))); - assert_eq!(Host::parse("0x1232131").unwrap(), Host::Ipv4(Ipv4Addr::new(1, 35, 33, 49))); - assert!(Host::parse("42.0x1232131").is_err()); - assert_eq!(Host::parse("111").unwrap(), Host::Ipv4(Ipv4Addr::new(0, 0, 0, 111))); - assert_eq!(Host::parse("2..2.3").unwrap(), Host::Domain("2..2.3".to_owned())); - assert!(Host::parse("192.168.0.257").is_err()); -} - -#[test] -fn test_idna() { - assert!("http://goșu.ro".parse::<Url>().is_ok()); - assert_eq!(Url::parse("http://☃.net/").unwrap().domain(), Some("xn--n3h.net")); -} diff --git a/deps/url-0.5.5/tests/urltestdata.txt b/deps/url-0.5.5/tests/urltestdata.txt deleted file mode 100644 index 88a63c18f..000000000 --- a/deps/url-0.5.5/tests/urltestdata.txt +++ /dev/null @@ -1,329 +0,0 @@ -# This file is from https://github.com/w3c/web-platform-tests/blob/master/url/urltestdata.txt -# and used under a 3-clause BSD license. - -# FORMAT NOT DOCUMENTED YET (parser is urltestparser.js) -# https://github.com/w3c/web-platform-tests/blob/master/url/urltestparser.js - -# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/script-tests/segments.js -http://example\t.\norg http://example.org/foo/bar s:http h:example.org p:/ -http://user:pass@foo:21/bar;par?b#c s:http u:user pass:pass h:foo port:21 p:/bar;par q:?b f:#c -http:foo.com s:http h:example.org p:/foo/foo.com -\t\s\s\s:foo.com\s\s\s\n s:http h:example.org p:/foo/:foo.com -\sfoo.com\s\s s:http h:example.org p:/foo/foo.com -a:\t\sfoo.com s:a p:\sfoo.com -http://f:21/\sb\s?\sd\s#\se\s s:http h:f port:21 p:/%20b%20 q:?%20d%20 f:#\se -http://f:/c s:http h:f p:/c -http://f:0/c s:http h:f port:0 p:/c -http://f:00000000000000/c s:http h:f port:0 p:/c -http://f:00000000000000000000080/c s:http h:f p:/c -http://f:b/c -http://f:\s/c -http://f:\n/c s:http h:f p:/c -http://f:fifty-two/c -http://f:9999/c s:http h:f port:9999 p:/c -http://f:\s21\s/\sb\s?\sd\s#\se\s - s:http h:example.org p:/foo/bar -\s\s\t s:http h:example.org p:/foo/bar -:foo.com/ s:http h:example.org p:/foo/:foo.com/ -:foo.com\\ s:http h:example.org p:/foo/:foo.com/ -: s:http h:example.org p:/foo/: -:a s:http h:example.org p:/foo/:a -:/ s:http h:example.org p:/foo/:/ -:\\ s:http h:example.org p:/foo/:/ -:# s:http h:example.org p:/foo/: f:# -# s:http h:example.org p:/foo/bar f:# -#/ s:http h:example.org p:/foo/bar f:#/ -#\\ s:http h:example.org p:/foo/bar f:#\\ -#;? s:http h:example.org p:/foo/bar f:#;? -? s:http h:example.org p:/foo/bar q:? -/ s:http h:example.org p:/ -:23 s:http h:example.org p:/foo/:23 -/:23 s:http h:example.org p:/:23 -:: s:http h:example.org p:/foo/:: -::23 s:http h:example.org p:/foo/::23 -foo:// s:foo p:// -http://a:b@c:29/d s:http u:a pass:b h:c port:29 p:/d -http::@c:29 s:http h:example.org p:/foo/:@c:29 -http://&a:foo(b]c@d:2/ s:http u:&a pass:foo(b]c h:d port:2 p:/ -http://::@c@d:2 s:http pass::%40c h:d port:2 p:/ -http://foo.com:b@d/ s:http u:foo.com pass:b h:d p:/ -http://foo.com/\\@ s:http h:foo.com p://@ -http:\\\\foo.com\\ s:http h:foo.com p:/ -http:\\\\a\\b:c\\d@foo.com\\ s:http h:a p:/b:c/d@foo.com/ -foo:/ s:foo p:/ -foo:/bar.com/ s:foo p:/bar.com/ -foo:///////// s:foo p:///////// -foo://///////bar.com/ s:foo p://///////bar.com/ -foo:////:///// s:foo p:////:///// -c:/foo s:c p:/foo -//foo/bar s:http h:foo p:/bar -http://foo/path;a??e#f#g s:http h:foo p:/path;a q:??e f:#f#g -http://foo/abcd?efgh?ijkl s:http h:foo p:/abcd q:?efgh?ijkl -http://foo/abcd#foo?bar s:http h:foo p:/abcd f:#foo?bar -[61:24:74]:98 s:http h:example.org p:/foo/[61:24:74]:98 -http:[61:27]/:foo s:http h:example.org p:/foo/[61:27]/:foo -http://[1::2]:3:4 -http://2001::1 -http://2001::1] -http://2001::1]:80 -http://[2001::1] s:http h:[2001::1] p:/ -http://[2001::1]:80 s:http h:[2001::1] p:/ -http:/example.com/ s:http h:example.org p:/example.com/ -ftp:/example.com/ s:ftp h:example.com p:/ -https:/example.com/ s:https h:example.com p:/ -madeupscheme:/example.com/ s:madeupscheme p:/example.com/ -file:/example.com/ s:file p:/example.com/ -ftps:/example.com/ s:ftps p:/example.com/ -gopher:/example.com/ s:gopher h:example.com p:/ -ws:/example.com/ s:ws h:example.com p:/ -wss:/example.com/ s:wss h:example.com p:/ -data:/example.com/ s:data p:/example.com/ -javascript:/example.com/ s:javascript p:/example.com/ -mailto:/example.com/ s:mailto p:/example.com/ -http:example.com/ s:http h:example.org p:/foo/example.com/ -ftp:example.com/ s:ftp h:example.com p:/ -https:example.com/ s:https h:example.com p:/ -madeupscheme:example.com/ s:madeupscheme p:example.com/ -ftps:example.com/ s:ftps p:example.com/ -gopher:example.com/ s:gopher h:example.com p:/ -ws:example.com/ s:ws h:example.com p:/ -wss:example.com/ s:wss h:example.com p:/ -data:example.com/ s:data p:example.com/ -javascript:example.com/ s:javascript p:example.com/ -mailto:example.com/ s:mailto p:example.com/ -/a/b/c s:http h:example.org p:/a/b/c -/a/\s/c s:http h:example.org p:/a/%20/c -/a%2fc s:http h:example.org p:/a%2fc -/a/%2f/c s:http h:example.org p:/a/%2f/c -#\u03B2 s:http h:example.org p:/foo/bar f:#\u03B2 -data:text/html,test#test s:data p:text/html,test f:#test - -# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/file.html -file:c:\\foo\\bar.html file:///tmp/mock/path s:file p:/c:/foo/bar.html -\s\sFile:c|////foo\\bar.html s:file p:/c:////foo/bar.html -C|/foo/bar s:file p:/C:/foo/bar -/C|\\foo\\bar s:file p:/C:/foo/bar -//C|/foo/bar s:file p:/C:/foo/bar -//server/file s:file h:server p:/file -\\\\server\\file s:file h:server p:/file -/\\server/file s:file h:server p:/file -file:///foo/bar.txt s:file p:/foo/bar.txt -file:///home/me s:file p:/home/me -// s:file p:/ -/// s:file p:/ -///test s:file p:/test -file://test s:file h:test p:/ -file://localhost s:file h:localhost p:/ -file://localhost/ s:file h:localhost p:/ -file://localhost/test s:file h:localhost p:/test -test s:file p:/tmp/mock/test -file:test s:file p:/tmp/mock/test - -# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/script-tests/path.js -http://example.com/././foo about:blank s:http h:example.com p:/foo -http://example.com/./.foo s:http h:example.com p:/.foo -http://example.com/foo/. s:http h:example.com p:/foo/ -http://example.com/foo/./ s:http h:example.com p:/foo/ -http://example.com/foo/bar/.. s:http h:example.com p:/foo/ -http://example.com/foo/bar/../ s:http h:example.com p:/foo/ -http://example.com/foo/..bar s:http h:example.com p:/foo/..bar -http://example.com/foo/bar/../ton s:http h:example.com p:/foo/ton -http://example.com/foo/bar/../ton/../../a s:http h:example.com p:/a -http://example.com/foo/../../.. s:http h:example.com p:/ -http://example.com/foo/../../../ton s:http h:example.com p:/ton -http://example.com/foo/%2e s:http h:example.com p:/foo/ -http://example.com/foo/%2e%2 s:http h:example.com p:/foo/%2e%2 -http://example.com/foo/%2e./%2e%2e/.%2e/%2e.bar s:http h:example.com p:/%2e.bar -http://example.com////../.. s:http h:example.com p:// -http://example.com/foo/bar//../.. s:http h:example.com p:/foo/ -http://example.com/foo/bar//.. s:http h:example.com p:/foo/bar/ -http://example.com/foo s:http h:example.com p:/foo -http://example.com/%20foo s:http h:example.com p:/%20foo -http://example.com/foo% s:http h:example.com p:/foo% -http://example.com/foo%2 s:http h:example.com p:/foo%2 -http://example.com/foo%2zbar s:http h:example.com p:/foo%2zbar -http://example.com/foo%2\u00C2\u00A9zbar s:http h:example.com p:/foo%2%C3%82%C2%A9zbar -http://example.com/foo%41%7a s:http h:example.com p:/foo%41%7a -http://example.com/foo\t\u0091%91 s:http h:example.com p:/foo%C2%91%91 -http://example.com/foo%00%51 s:http h:example.com p:/foo%00%51 -http://example.com/(%28:%3A%29) s:http h:example.com p:/(%28:%3A%29) -http://example.com/%3A%3a%3C%3c s:http h:example.com p:/%3A%3a%3C%3c -http://example.com/foo\tbar s:http h:example.com p:/foobar -http://example.com\\\\foo\\\\bar s:http h:example.com p://foo//bar -http://example.com/%7Ffp3%3Eju%3Dduvgw%3Dd s:http h:example.com p:/%7Ffp3%3Eju%3Dduvgw%3Dd -http://example.com/@asdf%40 s:http h:example.com p:/@asdf%40 -http://example.com/\u4F60\u597D\u4F60\u597D s:http h:example.com p:/%E4%BD%A0%E5%A5%BD%E4%BD%A0%E5%A5%BD -http://example.com/\u2025/foo s:http h:example.com p:/%E2%80%A5/foo -http://example.com/\uFEFF/foo s:http h:example.com p:/%EF%BB%BF/foo -http://example.com/\u202E/foo/\u202D/bar s:http h:example.com p:/%E2%80%AE/foo/%E2%80%AD/bar - -# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/script-tests/relative.js -http://www.google.com/foo?bar=baz# about:blank s:http h:www.google.com p:/foo q:?bar=baz f:# -http://www.google.com/foo?bar=baz#\s\u00BB s:http h:www.google.com p:/foo q:?bar=baz f:#\s%C2%BB -http://[www.google.com]/ -http://www.google.com s:http h:www.google.com p:/ -http://192.0x00A80001 s:http h:192.168.0.1 p:/ -http://www/foo%2Ehtml s:http h:www p:/foo%2Ehtml -http://www/foo/%2E/html s:http h:www p:/foo/html -http://user:pass@/ -http://%25DOMAIN:foobar@foodomain.com/ s:http u:%25DOMAIN pass:foobar h:foodomain.com p:/ -http:\\\\www.google.com\\foo s:http h:www.google.com p:/foo -http://foo:80/ s:http h:foo p:/ -http://foo:81/ s:http h:foo port:81 p:/ -httpa://foo:80/ s:httpa p://foo:80/ -http://foo:-80/ -https://foo:443/ s:https h:foo p:/ -https://foo:80/ s:https h:foo port:80 p:/ -ftp://foo:21/ s:ftp h:foo p:/ -ftp://foo:80/ s:ftp h:foo port:80 p:/ -gopher://foo:70/ s:gopher h:foo p:/ -gopher://foo:443/ s:gopher h:foo port:443 p:/ -ws://foo:80/ s:ws h:foo p:/ -ws://foo:81/ s:ws h:foo port:81 p:/ -ws://foo:443/ s:ws h:foo port:443 p:/ -ws://foo:815/ s:ws h:foo port:815 p:/ -wss://foo:80/ s:wss h:foo port:80 p:/ -wss://foo:81/ s:wss h:foo port:81 p:/ -wss://foo:443/ s:wss h:foo p:/ -wss://foo:815/ s:wss h:foo port:815 p:/ -http:/example.com/ s:http h:example.com p:/ -ftp:/example.com/ s:ftp h:example.com p:/ -https:/example.com/ s:https h:example.com p:/ -madeupscheme:/example.com/ s:madeupscheme p:/example.com/ -file:/example.com/ s:file p:/example.com/ -ftps:/example.com/ s:ftps p:/example.com/ -gopher:/example.com/ s:gopher h:example.com p:/ -ws:/example.com/ s:ws h:example.com p:/ -wss:/example.com/ s:wss h:example.com p:/ -data:/example.com/ s:data p:/example.com/ -javascript:/example.com/ s:javascript p:/example.com/ -mailto:/example.com/ s:mailto p:/example.com/ -http:example.com/ s:http h:example.com p:/ -ftp:example.com/ s:ftp h:example.com p:/ -https:example.com/ s:https h:example.com p:/ -madeupscheme:example.com/ s:madeupscheme p:example.com/ -ftps:example.com/ s:ftps p:example.com/ -gopher:example.com/ s:gopher h:example.com p:/ -ws:example.com/ s:ws h:example.com p:/ -wss:example.com/ s:wss h:example.com p:/ -data:example.com/ s:data p:example.com/ -javascript:example.com/ s:javascript p:example.com/ -mailto:example.com/ s:mailto p:example.com/ - -# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/segments-userinfo-vs-host.html -http:@www.example.com about:blank s:http h:www.example.com p:/ -http:/@www.example.com s:http h:www.example.com p:/ -http://@www.example.com s:http h:www.example.com p:/ -http:a:b@www.example.com s:http u:a pass:b h:www.example.com p:/ -http:/a:b@www.example.com s:http u:a pass:b h:www.example.com p:/ -http://a:b@www.example.com s:http u:a pass:b h:www.example.com p:/ -http://@pple.com s:http h:pple.com p:/ -http::b@www.example.com s:http pass:b h:www.example.com p:/ -http:/:b@www.example.com s:http pass:b h:www.example.com p:/ -http://:b@www.example.com s:http pass:b h:www.example.com p:/ -http:/:@/www.example.com -http://user@/www.example.com -http:@/www.example.com -http:/@/www.example.com -http://@/www.example.com -https:@/www.example.com -http:a:b@/www.example.com -http:/a:b@/www.example.com -http://a:b@/www.example.com -http::@/www.example.com -http:a:@www.example.com s:http u:a pass: h:www.example.com p:/ -http:/a:@www.example.com s:http u:a pass: h:www.example.com p:/ -http://a:@www.example.com s:http u:a pass: h:www.example.com p:/ -http://www.@pple.com s:http u:www. h:pple.com p:/ -http:@:www.example.com -http:/@:www.example.com -http://@:www.example.com -http://:@www.example.com s:http pass: h:www.example.com p:/ - -#Others -/ http://www.example.com/test s:http h:www.example.com p:/ -/test.txt s:http h:www.example.com p:/test.txt -. s:http h:www.example.com p:/ -.. s:http h:www.example.com p:/ -test.txt s:http h:www.example.com p:/test.txt -./test.txt s:http h:www.example.com p:/test.txt -../test.txt s:http h:www.example.com p:/test.txt -../aaa/test.txt s:http h:www.example.com p:/aaa/test.txt -../../test.txt s:http h:www.example.com p:/test.txt -\u4E2D/test.txt s:http h:www.example.com p:/%E4%B8%AD/test.txt -http://www.example2.com s:http h:www.example2.com p:/ - -# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/host.html - -# Basic canonicalization, uppercase should be converted to lowercase -http://ExAmPlE.CoM http://other.com/ s:http p:/ h:example.com - -# Spaces should fail -http://example\sexample.com - -# This should fail -http://Goo%20\sgoo%7C|.com - -# This should fail -http://GOO\u00a0\u3000goo.com - -# This should fail -http://[] -http://[:] - -# Other types of space (no-break, zero-width, zero-width-no-break) are -# name-prepped away to nothing. -http://GOO\u200b\u2060\ufeffgoo.com s:http p:/ h:googoo.com - -# Ideographic full stop (full-width period for Chinese, etc.) should be -# treated as a dot. -http://www.foo\u3002bar.com s:http p:/ h:www.foo.bar.com - -# Invalid unicode characters should fail... -http://\ufdd0zyx.com - -# ...This is the same as previous but with with escaped. -http://%ef%b7%90zyx.com - -# Test name prepping, fullwidth input should be converted to ASCII and NOT -# IDN-ized. This is "Go" in fullwidth UTF-8/UTF-16. -http://\uff27\uff4f.com s:http p:/ h:go.com - -# URL spec forbids the following. -# https://www.w3.org/Bugs/Public/show_bug.cgi?id=24257 -http://\uff05\uff14\uff11.com -http://%ef%bc%85%ef%bc%94%ef%bc%91.com - -# ...%00 in fullwidth should fail (also as escaped UTF-8 input) -http://\uff05\uff10\uff10.com -http://%ef%bc%85%ef%bc%90%ef%bc%90.com - -# Basic IDN support, UTF-8 and UTF-16 input should be converted to IDN -http://\u4f60\u597d\u4f60\u597d s:http p:/ h:xn--6qqa088eba - -# Invalid escaped characters should fail and the percents should be -# escaped. https://www.w3.org/Bugs/Public/show_bug.cgi?id=24191 -http://%zz%66%a.com - -# If we get an invalid character that has been escaped. -http://%25 -http://hello%00 - -# Escaped numbers should be treated like IP addresses if they are. -XFAIL http://%30%78%63%30%2e%30%32%35%30.01 s:http p:/ h:127.0.0.1 -XFAIL http://%30%78%63%30%2e%30%32%35%30.01%2e - -# Invalid escaping should trigger the regular host error handling. -http://%3g%78%63%30%2e%30%32%35%30%2E.01 - -# Something that isn't exactly an IP should get treated as a host and -# spaces escaped. -http://192.168.0.1\shello - -# Fullwidth and escaped UTF-8 fullwidth should still be treated as IP. -# These are "0Xc0.0250.01" in fullwidth. -http://\uff10\uff38\uff43\uff10\uff0e\uff10\uff12\uff15\uff10\uff0e\uff10\uff11 s:http p:/ h:192.168.0.1 - -# Broken IP addresses. -XFAIL http://192.168.0.257 -http://[google.com] diff --git a/deps/url-0.5.5/tests/wpt.rs b/deps/url-0.5.5/tests/wpt.rs deleted file mode 100644 index 6a32287b0..000000000 --- a/deps/url-0.5.5/tests/wpt.rs +++ /dev/null @@ -1,223 +0,0 @@ -// Copyright 2013-2014 Simon Sapin. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -//! Tests copied form https://github.com/w3c/web-platform-tests/blob/master/url/ - -extern crate test; -extern crate url; - -use std::char; -use url::{RelativeSchemeData, SchemeData, Url}; - - -fn run_one(entry: Entry) { - // FIXME: Don’t re-indent to make merging the 1.0 branch easier. - { - let Entry { - input, - base, - scheme: expected_scheme, - username: expected_username, - password: expected_password, - host: expected_host, - port: expected_port, - path: expected_path, - query: expected_query, - fragment: expected_fragment, - expected_failure, - } = entry; - let base = match Url::parse(&base) { - Ok(base) => base, - Err(message) => panic!("Error parsing base {}: {}", base, message) - }; - let url = base.join(&input); - if expected_scheme.is_none() { - if url.is_ok() && !expected_failure { - panic!("Expected a parse error for URL {}", input); - } - return - } - let Url { scheme, scheme_data, query, fragment, .. } = match url { - Ok(url) => url, - Err(message) => { - if expected_failure { - return - } else { - panic!("Error parsing URL {}: {}", input, message) - } - } - }; - - macro_rules! assert_eq { - ($a: expr, $b: expr) => { - { - let a = $a; - let b = $b; - if a != b { - if expected_failure { - return - } else { - panic!("{:?} != {:?}", a, b) - } - } - } - } - } - - assert_eq!(Some(scheme), expected_scheme); - match scheme_data { - SchemeData::Relative(RelativeSchemeData { - username, password, host, port, default_port: _, path, - }) => { - assert_eq!(username, expected_username); - assert_eq!(password, expected_password); - let host = host.serialize(); - assert_eq!(host, expected_host); - assert_eq!(port, expected_port); - assert_eq!(Some(format!("/{}", str_join(&path, "/"))), expected_path); - }, - SchemeData::NonRelative(scheme_data) => { - assert_eq!(Some(scheme_data), expected_path); - assert_eq!(String::new(), expected_username); - assert_eq!(None, expected_password); - assert_eq!(String::new(), expected_host); - assert_eq!(None, expected_port); - }, - } - fn opt_prepend(prefix: &str, opt_s: Option<String>) -> Option<String> { - opt_s.map(|s| format!("{}{}", prefix, s)) - } - assert_eq!(opt_prepend("?", query), expected_query); - assert_eq!(opt_prepend("#", fragment), expected_fragment); - - assert!(!expected_failure, "Unexpected success for {}", input); - } -} - -// FIMXE: Remove this when &[&str]::join (the new name) lands in the stable channel. -#[allow(deprecated)] -fn str_join<T: ::std::borrow::Borrow<str>>(pieces: &[T], separator: &str) -> String { - pieces.connect(separator) -} - -struct Entry { - input: String, - base: String, - scheme: Option<String>, - username: String, - password: Option<String>, - host: String, - port: Option<u16>, - path: Option<String>, - query: Option<String>, - fragment: Option<String>, - expected_failure: bool, -} - -fn parse_test_data(input: &str) -> Vec<Entry> { - let mut tests: Vec<Entry> = Vec::new(); - for line in input.lines() { - if line == "" || line.starts_with("#") { - continue - } - let mut pieces = line.split(' ').collect::<Vec<&str>>(); - let expected_failure = pieces[0] == "XFAIL"; - if expected_failure { - pieces.remove(0); - } - let input = unescape(pieces.remove(0)); - let mut test = Entry { - input: input, - base: if pieces.is_empty() || pieces[0] == "" { - tests.last().unwrap().base.clone() - } else { - unescape(pieces.remove(0)) - }, - scheme: None, - username: String::new(), - password: None, - host: String::new(), - port: None, - path: None, - query: None, - fragment: None, - expected_failure: expected_failure, - }; - for piece in pieces { - if piece == "" || piece.starts_with("#") { - continue - } - let colon = piece.find(':').unwrap(); - let value = unescape(&piece[colon + 1..]); - match &piece[..colon] { - "s" => test.scheme = Some(value), - "u" => test.username = value, - "pass" => test.password = Some(value), - "h" => test.host = value, - "port" => test.port = Some(value.parse().unwrap()), - "p" => test.path = Some(value), - "q" => test.query = Some(value), - "f" => test.fragment = Some(value), - _ => panic!("Invalid token") - } - } - tests.push(test) - } - tests -} - -fn unescape(input: &str) -> String { - let mut output = String::new(); - let mut chars = input.chars(); - loop { - match chars.next() { - None => return output, - Some(c) => output.push( - if c == '\\' { - match chars.next().unwrap() { - '\\' => '\\', - 'n' => '\n', - 'r' => '\r', - 's' => ' ', - 't' => '\t', - 'f' => '\x0C', - 'u' => { - char::from_u32(((( - chars.next().unwrap().to_digit(16).unwrap()) * 16 + - chars.next().unwrap().to_digit(16).unwrap()) * 16 + - chars.next().unwrap().to_digit(16).unwrap()) * 16 + - chars.next().unwrap().to_digit(16).unwrap()).unwrap() - } - _ => panic!("Invalid test data input"), - } - } else { - c - } - ) - } - } -} - -fn make_test(entry: Entry) -> test::TestDescAndFn { - test::TestDescAndFn { - desc: test::TestDesc { - name: test::DynTestName(format!("{:?} base {:?}", entry.input, entry.base)), - ignore: false, - should_panic: test::ShouldPanic::No, - }, - testfn: test::TestFn::dyn_test_fn(move || run_one(entry)), - } - -} - -fn main() { - test::test_main( - &std::env::args().collect::<Vec<_>>(), - parse_test_data(include_str!("urltestdata.txt")).into_iter().map(make_test).collect(), - ) -} diff --git a/deps/url-1.1.0/.gitignore b/deps/url-1.1.0/.gitignore new file mode 100644 index 000000000..0284c25cc --- /dev/null +++ b/deps/url-1.1.0/.gitignore @@ -0,0 +1,3 @@ +target +Cargo.lock +/.cargo/config diff --git a/deps/url-1.1.0/.travis.yml b/deps/url-1.1.0/.travis.yml new file mode 100644 index 000000000..bd2f382de --- /dev/null +++ b/deps/url-1.1.0/.travis.yml @@ -0,0 +1,15 @@ +language: rust +rust: + - nightly + - beta + - stable +script: make test +after_success: | + [ $TRAVIS_RUST_VERSION = nightly ] && + [ $TRAVIS_BRANCH = master ] && + [ $TRAVIS_PULL_REQUEST = false ] && + make upload-doc +env: + - secure: Q5eFkWSv20gCxMXrF1BPBSY67qAi9XYKsGHbOc6c1hOf933AX9Wr2CqL8mBhgAZfe4TWEnazjMNHmVIs75W+DPRkxVjImDmPLlQSDNuQFKBGATL5rnx7UzgT7t6CZhG+aPr50VVuC/3IL1+Ok85DjT/LnOKaao3r+Wd+HMFVViM= +notifications: + webhooks: http://build.servo.org:54856/travis diff --git a/deps/url-1.1.0/Cargo.toml b/deps/url-1.1.0/Cargo.toml new file mode 100644 index 000000000..d8c501dc2 --- /dev/null +++ b/deps/url-1.1.0/Cargo.toml @@ -0,0 +1,39 @@ +[package] + +name = "url" +version = "1.1.0" +authors = ["The rust-url developers"] + +description = "URL library for Rust, based on the WHATWG URL Standard" +documentation = "http://servo.github.io/rust-url/url/index.html" +repository = "https://github.com/servo/rust-url" +readme = "README.md" +keywords = ["url", "parser"] +license = "MIT/Apache-2.0" + +[[test]] +name = "unit" + +[[test]] +name = "data" +harness = false + +[lib] +test = false + +[dev-dependencies] +rustc-test = "0.1" +rustc-serialize = "0.3" + +[features] +query_encoding = ["encoding"] +heap_size = ["heapsize", "heapsize_plugin"] + +[dependencies] +idna = { version = "0.1.0", path = "./idna" } +heapsize = {version = ">=0.1.1, <0.4", optional = true} +heapsize_plugin = {version = "0.1.0", optional = true} +encoding = {version = "0.2", optional = true} +serde = {version = ">=0.6.1, <0.8", optional = true} +rustc-serialize = {version = "0.3", optional = true} +matches = "0.1" diff --git a/deps/url-0.2.38/LICENSE-APACHE b/deps/url-1.1.0/LICENSE-APACHE similarity index 100% rename from deps/url-0.2.38/LICENSE-APACHE rename to deps/url-1.1.0/LICENSE-APACHE diff --git a/deps/url-1.1.0/LICENSE-MIT b/deps/url-1.1.0/LICENSE-MIT new file mode 100644 index 000000000..24de6b418 --- /dev/null +++ b/deps/url-1.1.0/LICENSE-MIT @@ -0,0 +1,25 @@ +Copyright (c) 2013-2016 The rust-url developers + +Permission is hereby granted, free of charge, to any +person obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the +Software without restriction, including without +limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software +is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions +of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF +ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED +TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT +SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. diff --git a/deps/url-1.1.0/Makefile b/deps/url-1.1.0/Makefile new file mode 100644 index 000000000..a80d8a5f5 --- /dev/null +++ b/deps/url-1.1.0/Makefile @@ -0,0 +1,17 @@ +test: + cargo test --features "query_encoding serde rustc-serialize" + [ x$$TRAVIS_RUST_VERSION != xnightly ] || cargo test --features heap_size + +doc: + cargo doc --features "query_encoding serde rustc-serialize" + @echo '<meta http-equiv=refresh content=0;url=url/index.html>' > target/doc/index.html + @cp github.png target/doc/ + +upload-doc: doc + test "$(TRAVIS_BRANCH)" = master + test "$(TRAVIS_PULL_REQUEST)" = false + sudo pip install ghp-import + ghp-import -n target/doc + @git push -qf https://$(TOKEN)@github.com/$(TRAVIS_REPO_SLUG).git gh-pages + +.PHONY: test doc upload-doc diff --git a/deps/url-0.2.38/README.md b/deps/url-1.1.0/README.md similarity index 100% rename from deps/url-0.2.38/README.md rename to deps/url-1.1.0/README.md diff --git a/deps/url-0.2.38/appveyor.yml b/deps/url-1.1.0/appveyor.yml similarity index 100% rename from deps/url-0.2.38/appveyor.yml rename to deps/url-1.1.0/appveyor.yml diff --git a/deps/url-0.2.38/github.png b/deps/url-1.1.0/github.png similarity index 100% rename from deps/url-0.2.38/github.png rename to deps/url-1.1.0/github.png diff --git a/deps/url-1.1.0/src/encoding.rs b/deps/url-1.1.0/src/encoding.rs new file mode 100644 index 000000000..0703c788f --- /dev/null +++ b/deps/url-1.1.0/src/encoding.rs @@ -0,0 +1,135 @@ +// Copyright 2013-2014 The rust-url developers. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + + +//! Abstraction that conditionally compiles either to rust-encoding, +//! or to only support UTF-8. + +#[cfg(feature = "query_encoding")] extern crate encoding; + +use std::borrow::Cow; + +#[cfg(feature = "query_encoding")] use self::encoding::types::{DecoderTrap, EncoderTrap}; +#[cfg(feature = "query_encoding")] use self::encoding::label::encoding_from_whatwg_label; +#[cfg(feature = "query_encoding")] pub use self::encoding::types::EncodingRef; + +#[cfg(feature = "query_encoding")] +#[derive(Copy, Clone)] +pub struct EncodingOverride { + /// `None` means UTF-8. + encoding: Option<EncodingRef> +} + +#[cfg(feature = "query_encoding")] +impl EncodingOverride { + pub fn from_opt_encoding(encoding: Option<EncodingRef>) -> Self { + encoding.map(Self::from_encoding).unwrap_or_else(Self::utf8) + } + + pub fn from_encoding(encoding: EncodingRef) -> Self { + EncodingOverride { + encoding: if encoding.name() == "utf-8" { None } else { Some(encoding) } + } + } + + #[inline] + pub fn utf8() -> Self { + EncodingOverride { encoding: None } + } + + pub fn lookup(label: &[u8]) -> Option<Self> { + // Don't use String::from_utf8_lossy since no encoding label contains U+FFFD + // https://encoding.spec.whatwg.org/#names-and-labels + ::std::str::from_utf8(label) + .ok() + .and_then(encoding_from_whatwg_label) + .map(Self::from_encoding) + } + + /// https://encoding.spec.whatwg.org/#get-an-output-encoding + pub fn to_output_encoding(self) -> Self { + if let Some(encoding) = self.encoding { + if matches!(encoding.name(), "utf-16le" | "utf-16be") { + return Self::utf8() + } + } + self + } + + pub fn is_utf8(&self) -> bool { + self.encoding.is_none() + } + + pub fn name(&self) -> &'static str { + match self.encoding { + Some(encoding) => encoding.name(), + None => "utf-8", + } + } + + pub fn decode<'a>(&self, input: Cow<'a, [u8]>) -> Cow<'a, str> { + match self.encoding { + // `encoding.decode` never returns `Err` when called with `DecoderTrap::Replace` + Some(encoding) => encoding.decode(&input, DecoderTrap::Replace).unwrap().into(), + None => decode_utf8_lossy(input), + } + } + + pub fn encode<'a>(&self, input: Cow<'a, str>) -> Cow<'a, [u8]> { + match self.encoding { + // `encoding.encode` never returns `Err` when called with `EncoderTrap::NcrEscape` + Some(encoding) => Cow::Owned(encoding.encode(&input, EncoderTrap::NcrEscape).unwrap()), + None => encode_utf8(input) + } + } +} + + +#[cfg(not(feature = "query_encoding"))] +#[derive(Copy, Clone)] +pub struct EncodingOverride; + +#[cfg(not(feature = "query_encoding"))] +impl EncodingOverride { + #[inline] + pub fn utf8() -> Self { + EncodingOverride + } + + pub fn decode<'a>(&self, input: Cow<'a, [u8]>) -> Cow<'a, str> { + decode_utf8_lossy(input) + } + + pub fn encode<'a>(&self, input: Cow<'a, str>) -> Cow<'a, [u8]> { + encode_utf8(input) + } +} + +pub fn decode_utf8_lossy(input: Cow<[u8]>) -> Cow<str> { + match input { + Cow::Borrowed(bytes) => String::from_utf8_lossy(bytes), + Cow::Owned(bytes) => { + let raw_utf8: *const [u8]; + match String::from_utf8_lossy(&bytes) { + Cow::Borrowed(utf8) => raw_utf8 = utf8.as_bytes(), + Cow::Owned(s) => return s.into(), + } + // from_utf8_lossy returned a borrow of `bytes` unchanged. + debug_assert!(raw_utf8 == &*bytes as *const [u8]); + // Reuse the existing `Vec` allocation. + unsafe { String::from_utf8_unchecked(bytes) }.into() + } + } +} + +pub fn encode_utf8(input: Cow<str>) -> Cow<[u8]> { + match input { + Cow::Borrowed(s) => Cow::Borrowed(s.as_bytes()), + Cow::Owned(s) => Cow::Owned(s.into_bytes()) + } +} diff --git a/deps/url-1.1.0/src/form_urlencoded.rs b/deps/url-1.1.0/src/form_urlencoded.rs new file mode 100644 index 000000000..f4a655507 --- /dev/null +++ b/deps/url-1.1.0/src/form_urlencoded.rs @@ -0,0 +1,364 @@ +// Copyright 2013-2016 The rust-url developers. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +//! Parser and serializer for the [`application/x-www-form-urlencoded` syntax]( +//! http://url.spec.whatwg.org/#application/x-www-form-urlencoded), +//! as used by HTML forms. +//! +//! Converts between a string (such as an URL’s query string) +//! and a sequence of (name, value) pairs. + +use encoding::EncodingOverride; +use percent_encoding::{percent_encode_byte, percent_decode}; +use std::borrow::{Borrow, Cow}; +use std::str; + + +/// Convert a byte string in the `application/x-www-form-urlencoded` syntax +/// into a iterator of (name, value) pairs. +/// +/// Use `parse(input.as_bytes())` to parse a `&str` string. +/// +/// The names and values are percent-decoded. For instance, `%23first=%25try%25` will be +/// converted to `[("#first", "%try%")]`. +#[inline] +pub fn parse(input: &[u8]) -> Parse { + Parse { + input: input, + encoding: EncodingOverride::utf8(), + } +} + + +/// Convert a byte string in the `application/x-www-form-urlencoded` syntax +/// into a iterator of (name, value) pairs. +/// +/// Use `parse(input.as_bytes())` to parse a `&str` string. +/// +/// This function is only available if the `query_encoding` Cargo feature is enabled. +/// +/// Arguments: +/// +/// * `encoding_override`: The character encoding each name and values is decoded as +/// after percent-decoding. Defaults to UTF-8. +/// * `use_charset`: The *use _charset_ flag*. If in doubt, set to `false`. +#[cfg(feature = "query_encoding")] +pub fn parse_with_encoding<'a>(input: &'a [u8], + encoding_override: Option<::encoding::EncodingRef>, + use_charset: bool) + -> Result<Parse<'a>, ()> { + use std::ascii::AsciiExt; + + let mut encoding = EncodingOverride::from_opt_encoding(encoding_override); + if !(encoding.is_utf8() || input.is_ascii()) { + return Err(()) + } + if use_charset { + for sequence in input.split(|&b| b == b'&') { + // No '+' in "_charset_" to replace with ' '. + if sequence.starts_with(b"_charset_=") { + let value = &sequence[b"_charset_=".len()..]; + // Skip replacing '+' with ' ' in value since no encoding label contains either: + // https://encoding.spec.whatwg.org/#names-and-labels + if let Some(e) = EncodingOverride::lookup(value) { + encoding = e; + break + } + } + } + } + Ok(Parse { + input: input, + encoding: encoding, + }) +} + +/// The return type of `parse()`. +#[derive(Copy, Clone)] +pub struct Parse<'a> { + input: &'a [u8], + encoding: EncodingOverride, +} + +impl<'a> Iterator for Parse<'a> { + type Item = (Cow<'a, str>, Cow<'a, str>); + + fn next(&mut self) -> Option<Self::Item> { + loop { + if self.input.is_empty() { + return None + } + let mut split2 = self.input.splitn(2, |&b| b == b'&'); + let sequence = split2.next().unwrap(); + self.input = split2.next().unwrap_or(&[][..]); + if sequence.is_empty() { + continue + } + let mut split2 = sequence.splitn(2, |&b| b == b'='); + let name = split2.next().unwrap(); + let value = split2.next().unwrap_or(&[][..]); + return Some(( + decode(name, self.encoding), + decode(value, self.encoding), + )) + } + } +} + +fn decode(input: &[u8], encoding: EncodingOverride) -> Cow<str> { + let replaced = replace_plus(input); + encoding.decode(match percent_decode(&replaced).if_any() { + Some(vec) => Cow::Owned(vec), + None => replaced, + }) +} + +/// Replace b'+' with b' ' +fn replace_plus<'a>(input: &'a [u8]) -> Cow<'a, [u8]> { + match input.iter().position(|&b| b == b'+') { + None => Cow::Borrowed(input), + Some(first_position) => { + let mut replaced = input.to_owned(); + replaced[first_position] = b' '; + for byte in &mut replaced[first_position + 1..] { + if *byte == b'+' { + *byte = b' '; + } + } + Cow::Owned(replaced) + } + } +} + +impl<'a> Parse<'a> { + /// Return a new iterator that yields pairs of `String` instead of pairs of `Cow<str>`. + pub fn into_owned(self) -> ParseIntoOwned<'a> { + ParseIntoOwned { inner: self } + } +} + +/// Like `Parse`, but yields pairs of `String` instead of pairs of `Cow<str>`. +pub struct ParseIntoOwned<'a> { + inner: Parse<'a> +} + +impl<'a> Iterator for ParseIntoOwned<'a> { + type Item = (String, String); + + fn next(&mut self) -> Option<Self::Item> { + self.inner.next().map(|(k, v)| (k.into_owned(), v.into_owned())) + } +} + +/// The [`application/x-www-form-urlencoded` byte serializer]( +/// https://url.spec.whatwg.org/#concept-urlencoded-byte-serializer). +/// +/// Return an iterator of `&str` slices. +pub fn byte_serialize(input: &[u8]) -> ByteSerialize { + ByteSerialize { + bytes: input, + } +} + +/// Return value of `byte_serialize()`. +pub struct ByteSerialize<'a> { + bytes: &'a [u8], +} + +fn byte_serialized_unchanged(byte: u8) -> bool { + matches!(byte, b'*' | b'-' | b'.' | b'0' ... b'9' | b'A' ... b'Z' | b'_' | b'a' ... b'z') +} + +impl<'a> Iterator for ByteSerialize<'a> { + type Item = &'a str; + + fn next(&mut self) -> Option<&'a str> { + if let Some((&first, tail)) = self.bytes.split_first() { + if !byte_serialized_unchanged(first) { + self.bytes = tail; + return Some(if first == b' ' { "+" } else { percent_encode_byte(first) }) + } + let position = tail.iter().position(|&b| !byte_serialized_unchanged(b)); + let (unchanged_slice, remaining) = match position { + // 1 for first_byte + i unchanged in tail + Some(i) => self.bytes.split_at(1 + i), + None => (self.bytes, &[][..]), + }; + self.bytes = remaining; + Some(unsafe { str::from_utf8_unchecked(unchanged_slice) }) + } else { + None + } + } + + fn size_hint(&self) -> (usize, Option<usize>) { + if self.bytes.is_empty() { + (0, Some(0)) + } else { + (1, Some(self.bytes.len())) + } + } +} + +/// The [`application/x-www-form-urlencoded` serializer]( +/// https://url.spec.whatwg.org/#concept-urlencoded-serializer). +pub struct Serializer<T: Target> { + target: Option<T>, + start_position: usize, + encoding: EncodingOverride, +} + +pub trait Target { + fn as_mut_string(&mut self) -> &mut String; + fn finish(self) -> Self::Finished; + type Finished; +} + +impl Target for String { + fn as_mut_string(&mut self) -> &mut String { self } + fn finish(self) -> Self { self } + type Finished = Self; +} + +impl<'a> Target for &'a mut String { + fn as_mut_string(&mut self) -> &mut String { &mut **self } + fn finish(self) -> Self { self } + type Finished = Self; +} + +// `as_mut_string` string here exposes the internal serialization of an `Url`, +// which should not be exposed to users. +// We achieve that by not giving users direct access to `UrlQuery`: +// * Its fields are private +// (and so can not be constructed with struct literal syntax outside of this crate), +// * It has no constructor +// * It is only visible (on the type level) to users in the return type of +// `Url::query_pairs_mut` which is `Serializer<UrlQuery>` +// * `Serializer` keeps its target in a private field +// * Unlike in other `Target` impls, `UrlQuery::finished` does not return `Self`. +impl<'a> Target for ::UrlQuery<'a> { + fn as_mut_string(&mut self) -> &mut String { &mut self.url.serialization } + fn finish(self) -> &'a mut ::Url { self.url } + type Finished = &'a mut ::Url; +} + +impl<T: Target> Serializer<T> { + /// Create a new `application/x-www-form-urlencoded` serializer for the given target. + /// + /// If the target is non-empty, + /// its content is assumed to already be in `application/x-www-form-urlencoded` syntax. + pub fn new(target: T) -> Self { + Self::for_suffix(target, 0) + } + + /// Create a new `application/x-www-form-urlencoded` serializer + /// for a suffix of the given target. + /// + /// If that suffix is non-empty, + /// its content is assumed to already be in `application/x-www-form-urlencoded` syntax. + pub fn for_suffix(mut target: T, start_position: usize) -> Self { + &target.as_mut_string()[start_position..]; // Panic if out of bounds + Serializer { + target: Some(target), + start_position: start_position, + encoding: EncodingOverride::utf8(), + } + } + + /// Remove any existing name/value pair. + /// + /// Panics if called after `.finish()`. + pub fn clear(&mut self) -> &mut Self { + string(&mut self.target).truncate(self.start_position); + self + } + + /// Set the character encoding to be used for names and values before percent-encoding. + #[cfg(feature = "query_encoding")] + pub fn encoding_override(&mut self, new: Option<::encoding::EncodingRef>) -> &mut Self { + self.encoding = EncodingOverride::from_opt_encoding(new).to_output_encoding(); + self + } + + /// Serialize and append a name/value pair. + /// + /// Panics if called after `.finish()`. + pub fn append_pair(&mut self, name: &str, value: &str) -> &mut Self { + append_pair(string(&mut self.target), self.start_position, self.encoding, name, value); + self + } + + /// Serialize and append a number of name/value pairs. + /// + /// This simply calls `append_pair` repeatedly. + /// This can be more convenient, so the user doesn’t need to introduce a block + /// to limit the scope of `Serializer`’s borrow of its string. + /// + /// Panics if called after `.finish()`. + pub fn extend_pairs<I, K, V>(&mut self, iter: I) -> &mut Self + where I: IntoIterator, I::Item: Borrow<(K, V)>, K: AsRef<str>, V: AsRef<str> { + { + let string = string(&mut self.target); + for pair in iter { + let &(ref k, ref v) = pair.borrow(); + append_pair(string, self.start_position, self.encoding, k.as_ref(), v.as_ref()); + } + } + self + } + + /// Add a name/value pair whose name is `_charset_` + /// and whose value is the character encoding’s name. + /// (See the `encoding_override()` method.) + /// + /// Panics if called after `.finish()`. + #[cfg(feature = "query_encoding")] + pub fn append_charset(&mut self) -> &mut Self { + { + let string = string(&mut self.target); + append_separator_if_needed(string, self.start_position); + string.push_str("_charset_="); + string.push_str(self.encoding.name()); + } + self + } + + /// If this serializer was constructed with a string, take and return that string. + /// + /// ```rust + /// use url::form_urlencoded; + /// let encoded: String = form_urlencoded::Serializer::new(String::new()) + /// .append_pair("foo", "bar & baz") + /// .append_pair("saison", "Été+hiver") + /// .finish(); + /// assert_eq!(encoded, "foo=bar+%26+baz&saison=%C3%89t%C3%A9%2Bhiver"); + /// ``` + /// + /// Panics if called more than once. + pub fn finish(&mut self) -> T::Finished { + self.target.take().expect("url::form_urlencoded::Serializer double finish").finish() + } +} + +fn append_separator_if_needed(string: &mut String, start_position: usize) { + if string.len() > start_position { + string.push('&') + } +} + +fn string<T: Target>(target: &mut Option<T>) -> &mut String { + target.as_mut().expect("url::form_urlencoded::Serializer finished").as_mut_string() +} + +fn append_pair(string: &mut String, start_position: usize, encoding: EncodingOverride, + name: &str, value: &str) { + append_separator_if_needed(string, start_position); + string.extend(byte_serialize(&encoding.encode(name.into()))); + string.push('='); + string.extend(byte_serialize(&encoding.encode(value.into()))); +} diff --git a/deps/url-1.1.0/src/host.rs b/deps/url-1.1.0/src/host.rs new file mode 100644 index 000000000..47ebbd79e --- /dev/null +++ b/deps/url-1.1.0/src/host.rs @@ -0,0 +1,406 @@ +// Copyright 2013-2016 The rust-url developers. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +use std::cmp; +use std::fmt::{self, Formatter, Write}; +use std::io; +use std::net::{Ipv4Addr, Ipv6Addr, SocketAddr, SocketAddrV4, SocketAddrV6, ToSocketAddrs}; +use std::vec; +use parser::{ParseResult, ParseError}; +use percent_encoding::percent_decode; +use idna; + +#[derive(Copy, Clone, Debug, Eq, PartialEq)] +#[cfg_attr(feature="heap_size", derive(HeapSizeOf))] +pub enum HostInternal { + None, + Domain, + Ipv4(Ipv4Addr), + Ipv6(Ipv6Addr), +} + +impl<S> From<Host<S>> for HostInternal { + fn from(host: Host<S>) -> HostInternal { + match host { + Host::Domain(_) => HostInternal::Domain, + Host::Ipv4(address) => HostInternal::Ipv4(address), + Host::Ipv6(address) => HostInternal::Ipv6(address), + } + } +} + +/// The host name of an URL. +#[derive(Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] +#[cfg_attr(feature="heap_size", derive(HeapSizeOf))] +pub enum Host<S=String> { + /// A DNS domain name, as '.' dot-separated labels. + /// Non-ASCII labels are encoded in punycode per IDNA. + Domain(S), + + /// An IPv4 address. + /// `Url::host_str` returns the serialization of this address, + /// as four decimal integers separated by `.` dots. + Ipv4(Ipv4Addr), + + /// An IPv6 address. + /// `Url::host_str` returns the serialization of that address between `[` and `]` brackets, + /// in the format per [RFC 5952 *A Recommendation + /// for IPv6 Address Text Representation*](https://tools.ietf.org/html/rfc5952): + /// lowercase hexadecimal with maximal `::` compression. + Ipv6(Ipv6Addr), +} + +impl<'a> Host<&'a str> { + /// Return a copy of `self` that owns an allocated `String` but does not borrow an `&Url`. + pub fn to_owned(&self) -> Host<String> { + match *self { + Host::Domain(domain) => Host::Domain(domain.to_owned()), + Host::Ipv4(address) => Host::Ipv4(address), + Host::Ipv6(address) => Host::Ipv6(address), + } + } +} + +impl Host<String> { + /// Parse a host: either an IPv6 address in [] square brackets, or a domain. + /// + /// https://url.spec.whatwg.org/#host-parsing + pub fn parse(input: &str) -> Result<Self, ParseError> { + if input.starts_with("[") { + if !input.ends_with("]") { + return Err(ParseError::InvalidIpv6Address) + } + return parse_ipv6addr(&input[1..input.len() - 1]).map(Host::Ipv6) + } + let domain = percent_decode(input.as_bytes()).decode_utf8_lossy(); + let domain = try!(idna::domain_to_ascii(&domain)); + if domain.find(|c| matches!(c, + '\0' | '\t' | '\n' | '\r' | ' ' | '#' | '%' | '/' | ':' | '?' | '@' | '[' | '\\' | ']' + )).is_some() { + return Err(ParseError::InvalidDomainCharacter) + } + if let Some(address) = try!(parse_ipv4addr(&domain)) { + Ok(Host::Ipv4(address)) + } else { + Ok(Host::Domain(domain.into())) + } + } +} + +impl<S: AsRef<str>> fmt::Display for Host<S> { + fn fmt(&self, f: &mut Formatter) -> fmt::Result { + match *self { + Host::Domain(ref domain) => domain.as_ref().fmt(f), + Host::Ipv4(ref addr) => addr.fmt(f), + Host::Ipv6(ref addr) => { + try!(f.write_str("[")); + try!(write_ipv6(addr, f)); + f.write_str("]") + } + } + } +} + +/// This mostly exists because coherence rules don’t allow us to implement +/// `ToSocketAddrs for (Host<S>, u16)`. +pub struct HostAndPort<S=String> { + pub host: Host<S>, + pub port: u16, +} + +impl<'a> HostAndPort<&'a str> { + /// Return a copy of `self` that owns an allocated `String` but does not borrow an `&Url`. + pub fn to_owned(&self) -> HostAndPort<String> { + HostAndPort { + host: self.host.to_owned(), + port: self.port + } + } +} + +impl<S: AsRef<str>> ToSocketAddrs for HostAndPort<S> { + type Iter = SocketAddrs; + + fn to_socket_addrs(&self) -> io::Result<Self::Iter> { + let port = self.port; + match self.host { + Host::Domain(ref domain) => Ok(SocketAddrs { + // FIXME: use std::net::lookup_host when it’s stable. + state: SocketAddrsState::Domain(try!((domain.as_ref(), port).to_socket_addrs())) + }), + Host::Ipv4(address) => Ok(SocketAddrs { + state: SocketAddrsState::One(SocketAddr::V4(SocketAddrV4::new(address, port))) + }), + Host::Ipv6(address) => Ok(SocketAddrs { + state: SocketAddrsState::One(SocketAddr::V6(SocketAddrV6::new(address, port, 0, 0))) + }), + } + } +} + +/// Socket addresses for an URL. +pub struct SocketAddrs { + state: SocketAddrsState +} + +enum SocketAddrsState { + Domain(vec::IntoIter<SocketAddr>), + One(SocketAddr), + Done, +} + +impl Iterator for SocketAddrs { + type Item = SocketAddr; + fn next(&mut self) -> Option<SocketAddr> { + match self.state { + SocketAddrsState::Domain(ref mut iter) => iter.next(), + SocketAddrsState::One(s) => { + self.state = SocketAddrsState::Done; + Some(s) + } + SocketAddrsState::Done => None + } + } +} + +fn write_ipv6(addr: &Ipv6Addr, f: &mut Formatter) -> fmt::Result { + let segments = addr.segments(); + let (compress_start, compress_end) = longest_zero_sequence(&segments); + let mut i = 0; + while i < 8 { + if i == compress_start { + try!(f.write_str(":")); + if i == 0 { + try!(f.write_str(":")); + } + if compress_end < 8 { + i = compress_end; + } else { + break; + } + } + try!(write!(f, "{:x}", segments[i as usize])); + if i < 7 { + try!(f.write_str(":")); + } + i += 1; + } + Ok(()) +} + +fn longest_zero_sequence(pieces: &[u16; 8]) -> (isize, isize) { + let mut longest = -1; + let mut longest_length = -1; + let mut start = -1; + macro_rules! finish_sequence( + ($end: expr) => { + if start >= 0 { + let length = $end - start; + if length > longest_length { + longest = start; + longest_length = length; + } + } + }; + ); + for i in 0..8 { + if pieces[i as usize] == 0 { + if start < 0 { + start = i; + } + } else { + finish_sequence!(i); + start = -1; + } + } + finish_sequence!(8); + (longest, longest + longest_length) +} + + +fn parse_ipv4number(mut input: &str) -> Result<u32, ()> { + let mut r = 10; + if input.starts_with("0x") || input.starts_with("0X") { + input = &input[2..]; + r = 16; + } else if input.len() >= 2 && input.starts_with("0") { + input = &input[1..]; + r = 8; + } + if input.is_empty() { + return Ok(0); + } + if input.starts_with("+") { + return Err(()) + } + match u32::from_str_radix(&input, r) { + Ok(number) => Ok(number), + Err(_) => Err(()), + } +} + +fn parse_ipv4addr(input: &str) -> ParseResult<Option<Ipv4Addr>> { + if input.is_empty() { + return Ok(None) + } + let mut parts: Vec<&str> = input.split('.').collect(); + if parts.last() == Some(&"") { + parts.pop(); + } + if parts.len() > 4 { + return Ok(None); + } + let mut numbers: Vec<u32> = Vec::new(); + for part in parts { + if part == "" { + return Ok(None); + } + if let Ok(n) = parse_ipv4number(part) { + numbers.push(n); + } else { + return Ok(None); + } + } + let mut ipv4 = numbers.pop().expect("a non-empty list of numbers"); + // Equivalent to: ipv4 >= 256 ** (4 − numbers.len()) + if ipv4 > u32::max_value() >> (8 * numbers.len() as u32) { + return Err(ParseError::InvalidIpv4Address); + } + if numbers.iter().any(|x| *x > 255) { + return Err(ParseError::InvalidIpv4Address); + } + for (counter, n) in numbers.iter().enumerate() { + ipv4 += n << (8 * (3 - counter as u32)) + } + Ok(Some(Ipv4Addr::from(ipv4))) +} + + +fn parse_ipv6addr(input: &str) -> ParseResult<Ipv6Addr> { + let input = input.as_bytes(); + let len = input.len(); + let mut is_ip_v4 = false; + let mut pieces = [0, 0, 0, 0, 0, 0, 0, 0]; + let mut piece_pointer = 0; + let mut compress_pointer = None; + let mut i = 0; + + if len < 2 { + return Err(ParseError::InvalidIpv6Address) + } + + if input[0] == b':' { + if input[1] != b':' { + return Err(ParseError::InvalidIpv6Address) + } + i = 2; + piece_pointer = 1; + compress_pointer = Some(1); + } + + while i < len { + if piece_pointer == 8 { + return Err(ParseError::InvalidIpv6Address) + } + if input[i] == b':' { + if compress_pointer.is_some() { + return Err(ParseError::InvalidIpv6Address) + } + i += 1; + piece_pointer += 1; + compress_pointer = Some(piece_pointer); + continue + } + let start = i; + let end = cmp::min(len, start + 4); + let mut value = 0u16; + while i < end { + match (input[i] as char).to_digit(16) { + Some(digit) => { + value = value * 0x10 + digit as u16; + i += 1; + }, + None => break + } + } + if i < len { + match input[i] { + b'.' => { + if i == start { + return Err(ParseError::InvalidIpv6Address) + } + i = start; + is_ip_v4 = true; + }, + b':' => { + i += 1; + if i == len { + return Err(ParseError::InvalidIpv6Address) + } + }, + _ => return Err(ParseError::InvalidIpv6Address) + } + } + if is_ip_v4 { + break + } + pieces[piece_pointer] = value; + piece_pointer += 1; + } + + if is_ip_v4 { + if piece_pointer > 6 { + return Err(ParseError::InvalidIpv6Address) + } + let mut dots_seen = 0; + while i < len { + // FIXME: https://github.com/whatwg/url/commit/1c22aa119c354e0020117e02571cec53f7c01064 + let mut value = 0u16; + while i < len { + let digit = match input[i] { + c @ b'0' ... b'9' => c - b'0', + _ => break + }; + value = value * 10 + digit as u16; + if value == 0 || value > 255 { + return Err(ParseError::InvalidIpv6Address) + } + } + if dots_seen < 3 && !(i < len && input[i] == b'.') { + return Err(ParseError::InvalidIpv6Address) + } + pieces[piece_pointer] = pieces[piece_pointer] * 0x100 + value; + if dots_seen == 0 || dots_seen == 2 { + piece_pointer += 1; + } + i += 1; + if dots_seen == 3 && i < len { + return Err(ParseError::InvalidIpv6Address) + } + dots_seen += 1; + } + } + + match compress_pointer { + Some(compress_pointer) => { + let mut swaps = piece_pointer - compress_pointer; + piece_pointer = 7; + while swaps > 0 { + pieces[piece_pointer] = pieces[compress_pointer + swaps - 1]; + pieces[compress_pointer + swaps - 1] = 0; + swaps -= 1; + piece_pointer -= 1; + } + } + _ => if piece_pointer != 8 { + return Err(ParseError::InvalidIpv6Address) + } + } + Ok(Ipv6Addr::new(pieces[0], pieces[1], pieces[2], pieces[3], + pieces[4], pieces[5], pieces[6], pieces[7])) +} diff --git a/deps/url-1.1.0/src/lib.rs b/deps/url-1.1.0/src/lib.rs new file mode 100644 index 000000000..f1f487c2a --- /dev/null +++ b/deps/url-1.1.0/src/lib.rs @@ -0,0 +1,1355 @@ +// Copyright 2013-2015 The rust-url developers. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +/*! + +<a href="https://github.com/servo/rust-url"><img style="position: absolute; top: 0; left: 0; border: 0;" src="../github.png" alt="Fork me on GitHub"></a> +<style>.sidebar { margin-top: 53px }</style> + +rust-url is an implementation of the [URL Standard](http://url.spec.whatwg.org/) +for the [Rust](http://rust-lang.org/) programming language. + +It builds with [Cargo](http://crates.io/). +To use it in your project, add this to your `Cargo.toml` file: + +```Cargo +[dependencies.url] +git = "https://github.com/servo/rust-url" +``` + +Supporting encodings other than UTF-8 in query strings is an optional feature +that requires [rust-encoding](https://github.com/lifthrasiir/rust-encoding) +and is off by default. +You can enable it with +[Cargo’s *features* mechanism](http://doc.crates.io/manifest.html#the-[features]-section): + +```Cargo +[dependencies.url] +git = "https://github.com/servo/rust-url" +features = ["query_encoding"] +``` + +… or by passing `--cfg 'feature="query_encoding"'` to rustc. + + +# URL parsing and data structures + +First, URL parsing may fail for various reasons and therefore returns a `Result`. + +``` +use url::{Url, ParseError}; + +assert!(Url::parse("http://[:::1]") == Err(ParseError::InvalidIpv6Address)) +``` + +Let’s parse a valid URL and look at its components. + +``` +use url::{Url, Host}; + +let issue_list_url = Url::parse( + "https://github.com/rust-lang/rust/issues?labels=E-easy&state=open" +).unwrap(); + + +assert!(issue_list_url.scheme() == "https"); +assert!(issue_list_url.username() == ""); +assert!(issue_list_url.password() == None); +assert!(issue_list_url.host_str() == Some("github.com")); +assert!(issue_list_url.host() == Some(Host::Domain("github.com"))); +assert!(issue_list_url.port() == None); +assert!(issue_list_url.path() == "/rust-lang/rust/issues"); +assert!(issue_list_url.path_segments().map(|c| c.collect::<Vec<_>>()) == + Some(vec!["rust-lang", "rust", "issues"])); +assert!(issue_list_url.query() == Some("labels=E-easy&state=open")); +assert!(issue_list_url.fragment() == None); +assert!(!issue_list_url.cannot_be_a_base()); +``` + +Some URLs are said to be *cannot-be-a-base*: +they don’t have a username, password, host, or port, +and their "path" is an arbitrary string rather than slash-separated segments: + +``` +use url::Url; + +let data_url = Url::parse("data:text/plain,Hello?World#").unwrap(); + +assert!(data_url.cannot_be_a_base()); +assert!(data_url.scheme() == "data"); +assert!(data_url.path() == "text/plain,Hello"); +assert!(data_url.path_segments().is_none()); +assert!(data_url.query() == Some("World")); +assert!(data_url.fragment() == Some("")); +``` + + +# Base URL + +Many contexts allow URL *references* that can be relative to a *base URL*: + +```html +<link rel="stylesheet" href="../main.css"> +``` + +Since parsed URL are absolute, giving a base is required for parsing relative URLs: + +``` +use url::{Url, ParseError}; + +assert!(Url::parse("../main.css") == Err(ParseError::RelativeUrlWithoutBase)) +``` + +Use the `join` method on an `Url` to use it as a base URL: + +``` +use url::Url; + +let this_document = Url::parse("http://servo.github.io/rust-url/url/index.html").unwrap(); +let css_url = this_document.join("../main.css").unwrap(); +assert_eq!(css_url.as_str(), "http://servo.github.io/rust-url/main.css") +*/ + +#![cfg_attr(feature="heap_size", feature(plugin, custom_derive))] +#![cfg_attr(feature="heap_size", plugin(heapsize_plugin))] + +#[cfg(feature="rustc-serialize")] extern crate rustc_serialize; +#[macro_use] extern crate matches; +#[cfg(feature="serde")] extern crate serde; +#[cfg(feature="heap_size")] #[macro_use] extern crate heapsize; + +pub extern crate idna; + +use encoding::EncodingOverride; +use host::HostInternal; +use parser::{Parser, Context, SchemeType, to_u32}; +use percent_encoding::{PATH_SEGMENT_ENCODE_SET, USERINFO_ENCODE_SET, + percent_encode, percent_decode, utf8_percent_encode}; +use std::cmp; +use std::fmt::{self, Write}; +use std::hash; +use std::io; +use std::mem; +use std::net::{ToSocketAddrs, IpAddr}; +use std::ops::{Range, RangeFrom, RangeTo}; +use std::path::{Path, PathBuf}; +use std::str; + +pub use origin::{Origin, OpaqueOrigin}; +pub use host::{Host, HostAndPort, SocketAddrs}; +pub use path_segments::PathSegmentsMut; +pub use parser::ParseError; +pub use slicing::Position; + +mod encoding; +mod host; +mod origin; +mod path_segments; +mod parser; +mod slicing; + +pub mod form_urlencoded; +pub mod percent_encoding; +pub mod quirks; + +/// A parsed URL record. +#[derive(Clone)] +#[cfg_attr(feature="heap_size", derive(HeapSizeOf))] +pub struct Url { + /// Syntax in pseudo-BNF: + /// + /// url = scheme ":" [ hierarchical | non-hierarchical ] [ "?" query ]? [ "#" fragment ]? + /// non-hierarchical = non-hierarchical-path + /// non-hierarchical-path = /* Does not start with "/" */ + /// hierarchical = authority? hierarchical-path + /// authority = "//" userinfo? host [ ":" port ]? + /// userinfo = username [ ":" password ]? "@" + /// hierarchical-path = [ "/" path-segment ]+ + serialization: String, + + // Components + scheme_end: u32, // Before ':' + username_end: u32, // Before ':' (if a password is given) or '@' (if not) + host_start: u32, + host_end: u32, + host: HostInternal, + port: Option<u16>, + path_start: u32, // Before initial '/', if any + query_start: Option<u32>, // Before '?', unlike Position::QueryStart + fragment_start: Option<u32>, // Before '#', unlike Position::FragmentStart +} + +/// Full configuration for the URL parser. +#[derive(Copy, Clone)] +pub struct ParseOptions<'a> { + base_url: Option<&'a Url>, + encoding_override: encoding::EncodingOverride, + log_syntax_violation: Option<&'a Fn(&'static str)>, +} + +impl<'a> ParseOptions<'a> { + /// Change the base URL + pub fn base_url(mut self, new: Option<&'a Url>) -> Self { + self.base_url = new; + self + } + + /// Override the character encoding of query strings. + /// This is a legacy concept only relevant for HTML. + #[cfg(feature = "query_encoding")] + pub fn encoding_override(mut self, new: Option<encoding::EncodingRef>) -> Self { + self.encoding_override = EncodingOverride::from_opt_encoding(new).to_output_encoding(); + self + } + + /// Call the provided function or closure on non-fatal parse errors. + pub fn log_syntax_violation(mut self, new: Option<&'a Fn(&'static str)>) -> Self { + self.log_syntax_violation = new; + self + } + + /// Parse an URL string with the configuration so far. + pub fn parse(self, input: &str) -> Result<Url, ::ParseError> { + Parser { + serialization: String::with_capacity(input.len()), + base_url: self.base_url, + query_encoding_override: self.encoding_override, + log_syntax_violation: self.log_syntax_violation, + context: Context::UrlParser, + }.parse_url(input) + } +} + +impl Url { + /// Parse an absolute URL from a string. + #[inline] + pub fn parse(input: &str) -> Result<Url, ::ParseError> { + Url::options().parse(input) + } + + /// Parse a string as an URL, with this URL as the base URL. + #[inline] + pub fn join(&self, input: &str) -> Result<Url, ::ParseError> { + Url::options().base_url(Some(self)).parse(input) + } + + /// Return a default `ParseOptions` that can fully configure the URL parser. + pub fn options<'a>() -> ParseOptions<'a> { + ParseOptions { + base_url: None, + encoding_override: EncodingOverride::utf8(), + log_syntax_violation: None, + } + } + + /// Return the serialization of this URL. + /// + /// This is fast since that serialization is already stored in the `Url` struct. + #[inline] + pub fn as_str(&self) -> &str { + &self.serialization + } + + /// Return the serialization of this URL. + /// + /// This consumes the `Url` and takes ownership of the `String` stored in it. + #[inline] + pub fn into_string(self) -> String { + self.serialization + } + + /// For internal testing, not part of the public API. + /// + /// Methods of the `Url` struct assume a number of invariants. + /// This checks each of these invariants and panic if one is not met. + /// This is for testing rust-url itself. + #[doc(hidden)] + pub fn assert_invariants(&self) { + macro_rules! assert { + ($x: expr) => { + if !$x { + panic!("!( {} ) for URL {:?}", stringify!($x), self.serialization) + } + } + } + + macro_rules! assert_eq { + ($a: expr, $b: expr) => { + { + let a = $a; + let b = $b; + if a != b { + panic!("{:?} != {:?} ({} != {}) for URL {:?}", + a, b, stringify!($a), stringify!($b), self.serialization) + } + } + } + } + + assert!(self.scheme_end >= 1); + assert!(matches!(self.byte_at(0), b'a'...b'z' | b'A'...b'Z')); + assert!(self.slice(1..self.scheme_end).chars() + .all(|c| matches!(c, 'a'...'z' | 'A'...'Z' | '0'...'9' | '+' | '-' | '.'))); + assert_eq!(self.byte_at(self.scheme_end), b':'); + + if self.slice(self.scheme_end + 1 ..).starts_with("//") { + // URL with authority + match self.byte_at(self.username_end) { + b':' => { + assert!(self.host_start >= self.username_end + 2); + assert_eq!(self.byte_at(self.host_start - 1), b'@'); + } + b'@' => assert!(self.host_start == self.username_end + 1), + _ => assert_eq!(self.username_end, self.scheme_end + 3), + } + assert!(self.host_start >= self.username_end); + assert!(self.host_end >= self.host_start); + let host_str = self.slice(self.host_start..self.host_end); + match self.host { + HostInternal::None => assert_eq!(host_str, ""), + HostInternal::Ipv4(address) => assert_eq!(host_str, address.to_string()), + HostInternal::Ipv6(address) => assert_eq!(host_str, format!("[{}]", address)), + HostInternal::Domain => { + if SchemeType::from(self.scheme()).is_special() { + assert!(!host_str.is_empty()) + } + } + } + if self.path_start == self.host_end { + assert_eq!(self.port, None); + } else { + assert_eq!(self.byte_at(self.host_end), b':'); + let port_str = self.slice(self.host_end + 1..self.path_start); + assert_eq!(self.port, Some(port_str.parse::<u16>().unwrap())); + } + assert_eq!(self.byte_at(self.path_start), b'/'); + } else { + // Anarchist URL (no authority) + assert_eq!(self.username_end, self.scheme_end + 1); + assert_eq!(self.host_start, self.scheme_end + 1); + assert_eq!(self.host_end, self.scheme_end + 1); + assert_eq!(self.host, HostInternal::None); + assert_eq!(self.port, None); + assert_eq!(self.path_start, self.scheme_end + 1); + } + if let Some(start) = self.query_start { + assert!(start > self.path_start); + assert_eq!(self.byte_at(start), b'?'); + } + if let Some(start) = self.fragment_start { + assert!(start > self.path_start); + assert_eq!(self.byte_at(start), b'#'); + } + if let (Some(query_start), Some(fragment_start)) = (self.query_start, self.fragment_start) { + assert!(fragment_start > query_start); + } + + let other = Url::parse(self.as_str()).unwrap(); + assert_eq!(&self.serialization, &other.serialization); + assert_eq!(self.scheme_end, other.scheme_end); + assert_eq!(self.username_end, other.username_end); + assert_eq!(self.host_start, other.host_start); + assert_eq!(self.host_end, other.host_end); + assert!(self.host == other.host || + // XXX No host round-trips to empty host. + // See https://github.com/whatwg/url/issues/79 + (self.host_str(), other.host_str()) == (None, Some(""))); + assert_eq!(self.port, other.port); + assert_eq!(self.path_start, other.path_start); + assert_eq!(self.query_start, other.query_start); + assert_eq!(self.fragment_start, other.fragment_start); + } + + /// Return the origin of this URL (https://url.spec.whatwg.org/#origin) + /// + /// Note: this return an opaque origin for `file:` URLs, which causes + /// `url.origin() != url.origin()`. + #[inline] + pub fn origin(&self) -> Origin { + origin::url_origin(self) + } + + /// Return the scheme of this URL, lower-cased, as an ASCII string without the ':' delimiter. + #[inline] + pub fn scheme(&self) -> &str { + self.slice(..self.scheme_end) + } + + /// Return whether the URL has an 'authority', + /// which can contain a username, password, host, and port number. + /// + /// URLs that do *not* are either path-only like `unix:/run/foo.socket` + /// or cannot-be-a-base like `data:text/plain,Stuff`. + #[inline] + pub fn has_authority(&self) -> bool { + debug_assert!(self.byte_at(self.scheme_end) == b':'); + self.slice(self.scheme_end..).starts_with("://") + } + + /// Return whether this URL is a cannot-be-a-base URL, + /// meaning that parsing a relative URL string with this URL as the base will return an error. + /// + /// This is the case if the scheme and `:` delimiter are not followed by a `/` slash, + /// as is typically the case of `data:` and `mailto:` URLs. + #[inline] + pub fn cannot_be_a_base(&self) -> bool { + self.byte_at(self.path_start) != b'/' + } + + /// Return the username for this URL (typically the empty string) + /// as a percent-encoded ASCII string. + pub fn username(&self) -> &str { + if self.has_authority() { + self.slice(self.scheme_end + ("://".len() as u32)..self.username_end) + } else { + "" + } + } + + /// Return the password for this URL, if any, as a percent-encoded ASCII string. + pub fn password(&self) -> Option<&str> { + // This ':' is not the one marking a port number since a host can not be empty. + // (Except for file: URLs, which do not have port numbers.) + if self.has_authority() && self.byte_at(self.username_end) == b':' { + debug_assert!(self.byte_at(self.host_start - 1) == b'@'); + Some(self.slice(self.username_end + 1..self.host_start - 1)) + } else { + None + } + } + + /// Equivalent to `url.host().is_some()`. + pub fn has_host(&self) -> bool { + !matches!(self.host, HostInternal::None) + } + + /// Return the string representation of the host (domain or IP address) for this URL, if any. + /// + /// Non-ASCII domains are punycode-encoded per IDNA. + /// IPv6 addresses are given between `[` and `]` brackets. + /// + /// Cannot-be-a-base URLs (typical of `data:` and `mailto:`) and some `file:` URLs + /// don’t have a host. + /// + /// See also the `host` method. + pub fn host_str(&self) -> Option<&str> { + if self.has_host() { + Some(self.slice(self.host_start..self.host_end)) + } else { + None + } + } + + /// Return the parsed representation of the host for this URL. + /// Non-ASCII domain labels are punycode-encoded per IDNA. + /// + /// Cannot-be-a-base URLs (typical of `data:` and `mailto:`) and some `file:` URLs + /// don’t have a host. + /// + /// See also the `host_str` method. + pub fn host(&self) -> Option<Host<&str>> { + match self.host { + HostInternal::None => None, + HostInternal::Domain => Some(Host::Domain(self.slice(self.host_start..self.host_end))), + HostInternal::Ipv4(address) => Some(Host::Ipv4(address)), + HostInternal::Ipv6(address) => Some(Host::Ipv6(address)), + } + } + + /// If this URL has a host and it is a domain name (not an IP address), return it. + pub fn domain(&self) -> Option<&str> { + match self.host { + HostInternal::Domain => Some(self.slice(self.host_start..self.host_end)), + _ => None, + } + } + + /// Return the port number for this URL, if any. + #[inline] + pub fn port(&self) -> Option<u16> { + self.port + } + + /// Return the port number for this URL, or the default port number if it is known. + /// + /// This method only knows the default port number + /// of the `http`, `https`, `ws`, `wss`, `ftp`, and `gopher` schemes. + /// + /// For URLs in these schemes, this method always returns `Some(_)`. + /// For other schemes, it is the same as `Url::port()`. + #[inline] + pub fn port_or_known_default(&self) -> Option<u16> { + self.port.or_else(|| parser::default_port(self.scheme())) + } + + /// If the URL has a host, return something that implements `ToSocketAddrs`. + /// + /// If the URL has no port number and the scheme’s default port number is not known + /// (see `Url::port_or_known_default`), + /// the closure is called to obtain a port number. + /// Typically, this closure can match on the result `Url::scheme` + /// to have per-scheme default port numbers, + /// and panic for schemes it’s not prepared to handle. + /// For example: + /// + /// ```rust + /// # use url::Url; + /// # use std::net::TcpStream; + /// # use std::io; + /// + /// fn connect(url: &Url) -> io::Result<TcpStream> { + /// TcpStream::connect(try!(url.with_default_port(default_port))) + /// } + /// + /// fn default_port(url: &Url) -> Result<u16, ()> { + /// match url.scheme() { + /// "git" => Ok(9418), + /// "git+ssh" => Ok(22), + /// "git+https" => Ok(443), + /// "git+http" => Ok(80), + /// _ => Err(()), + /// } + /// } + /// ``` + pub fn with_default_port<F>(&self, f: F) -> io::Result<HostAndPort<&str>> + where F: FnOnce(&Url) -> Result<u16, ()> { + Ok(HostAndPort { + host: try!(self.host() + .ok_or(()) + .or_else(|()| io_error("URL has no host"))), + port: try!(self.port_or_known_default() + .ok_or(()) + .or_else(|()| f(self)) + .or_else(|()| io_error("URL has no port number"))) + }) + } + + /// Return the path for this URL, as a percent-encoded ASCII string. + /// For cannot-be-a-base URLs, this is an arbitrary string that doesn’t start with '/'. + /// For other URLs, this starts with a '/' slash + /// and continues with slash-separated path segments. + pub fn path(&self) -> &str { + match (self.query_start, self.fragment_start) { + (None, None) => self.slice(self.path_start..), + (Some(next_component_start), _) | + (None, Some(next_component_start)) => { + self.slice(self.path_start..next_component_start) + } + } + } + + /// Unless this URL is cannot-be-a-base, + /// return an iterator of '/' slash-separated path segments, + /// each as a percent-encoded ASCII string. + /// + /// Return `None` for cannot-be-a-base URLs. + /// + /// When `Some` is returned, the iterator always contains at least one string + /// (which may be empty). + pub fn path_segments(&self) -> Option<str::Split<char>> { + let path = self.path(); + if path.starts_with('/') { + Some(path[1..].split('/')) + } else { + None + } + } + + /// Return this URL’s query string, if any, as a percent-encoded ASCII string. + pub fn query(&self) -> Option<&str> { + match (self.query_start, self.fragment_start) { + (None, _) => None, + (Some(query_start), None) => { + debug_assert!(self.byte_at(query_start) == b'?'); + Some(self.slice(query_start + 1..)) + } + (Some(query_start), Some(fragment_start)) => { + debug_assert!(self.byte_at(query_start) == b'?'); + Some(self.slice(query_start + 1..fragment_start)) + } + } + } + + /// Parse the URL’s query string, if any, as `application/x-www-form-urlencoded` + /// and return an iterator of (key, value) pairs. + #[inline] + pub fn query_pairs(&self) -> form_urlencoded::Parse { + form_urlencoded::parse(self.query().unwrap_or("").as_bytes()) + } + + /// Return this URL’s fragment identifier, if any. + /// + /// **Note:** the parser did *not* percent-encode this component, + /// but the input may have been percent-encoded already. + pub fn fragment(&self) -> Option<&str> { + self.fragment_start.map(|start| { + debug_assert!(self.byte_at(start) == b'#'); + self.slice(start + 1..) + }) + } + + fn mutate<F: FnOnce(&mut Parser) -> R, R>(&mut self, f: F) -> R { + let mut parser = Parser::for_setter(mem::replace(&mut self.serialization, String::new())); + let result = f(&mut parser); + self.serialization = parser.serialization; + result + } + + /// Change this URL’s fragment identifier. + pub fn set_fragment(&mut self, fragment: Option<&str>) { + // Remove any previous fragment + if let Some(start) = self.fragment_start { + debug_assert!(self.byte_at(start) == b'#'); + self.serialization.truncate(start as usize); + } + // Write the new one + if let Some(input) = fragment { + self.fragment_start = Some(to_u32(self.serialization.len()).unwrap()); + self.serialization.push('#'); + self.mutate(|parser| parser.parse_fragment(parser::Input::new(input))) + } else { + self.fragment_start = None + } + } + + fn take_fragment(&mut self) -> Option<String> { + self.fragment_start.take().map(|start| { + debug_assert!(self.byte_at(start) == b'#'); + let fragment = self.slice(start + 1..).to_owned(); + self.serialization.truncate(start as usize); + fragment + }) + } + + fn restore_already_parsed_fragment(&mut self, fragment: Option<String>) { + if let Some(ref fragment) = fragment { + assert!(self.fragment_start.is_none()); + self.fragment_start = Some(to_u32(self.serialization.len()).unwrap()); + self.serialization.push('#'); + self.serialization.push_str(fragment); + } + } + + /// Change this URL’s query string. + pub fn set_query(&mut self, query: Option<&str>) { + let fragment = self.take_fragment(); + + // Remove any previous query + if let Some(start) = self.query_start.take() { + debug_assert!(self.byte_at(start) == b'?'); + self.serialization.truncate(start as usize); + } + // Write the new query, if any + if let Some(input) = query { + self.query_start = Some(to_u32(self.serialization.len()).unwrap()); + self.serialization.push('?'); + let scheme_end = self.scheme_end; + self.mutate(|parser| parser.parse_query(scheme_end, parser::Input::new(input))); + } + + self.restore_already_parsed_fragment(fragment); + } + + /// Manipulate this URL’s query string, viewed as a sequence of name/value pairs + /// in `application/x-www-form-urlencoded` syntax. + /// + /// The return value has a method-chaining API: + /// + /// ```rust + /// # use url::Url; + /// let mut url = Url::parse("https://example.net?lang=fr#nav").unwrap(); + /// assert_eq!(url.query(), Some("lang=fr")); + /// + /// url.query_pairs_mut().append_pair("foo", "bar"); + /// assert_eq!(url.query(), Some("lang=fr&foo=bar")); + /// assert_eq!(url.as_str(), "https://example.net/?lang=fr&foo=bar#nav"); + /// + /// url.query_pairs_mut() + /// .clear() + /// .append_pair("foo", "bar & baz") + /// .append_pair("saisons", "Été+hiver"); + /// assert_eq!(url.query(), Some("foo=bar+%26+baz&saisons=%C3%89t%C3%A9%2Bhiver")); + /// assert_eq!(url.as_str(), + /// "https://example.net/?foo=bar+%26+baz&saisons=%C3%89t%C3%A9%2Bhiver#nav"); + /// ``` + /// + /// Note: `url.query_pairs_mut().clear();` is equivalent to `url.set_query(Some(""))`, + /// not `url.set_query(None)`. + /// + /// The state of `Url` is unspecified if this return value is leaked without being dropped. + pub fn query_pairs_mut(&mut self) -> form_urlencoded::Serializer<UrlQuery> { + let fragment = self.take_fragment(); + + let query_start; + if let Some(start) = self.query_start { + debug_assert!(self.byte_at(start) == b'?'); + query_start = start as usize; + } else { + query_start = self.serialization.len(); + self.query_start = Some(to_u32(query_start).unwrap()); + self.serialization.push('?'); + } + + let query = UrlQuery { url: self, fragment: fragment }; + form_urlencoded::Serializer::for_suffix(query, query_start + "?".len()) + } + + fn take_after_path(&mut self) -> (u32, String) { + match (self.query_start, self.fragment_start) { + (Some(i), _) | (None, Some(i)) => (i, self.slice(i..).to_owned()), + (None, None) => (to_u32(self.serialization.len()).unwrap(), String::new()) + } + } + + /// Change this URL’s path. + pub fn set_path(&mut self, mut path: &str) { + let (old_after_path_pos, after_path) = self.take_after_path(); + let cannot_be_a_base = self.cannot_be_a_base(); + let scheme_type = SchemeType::from(self.scheme()); + self.serialization.truncate(self.path_start as usize); + self.mutate(|parser| { + if cannot_be_a_base { + if path.starts_with('/') { + parser.serialization.push_str("%2F"); + path = &path[1..]; + } + parser.parse_cannot_be_a_base_path(parser::Input::new(path)); + } else { + let mut has_host = true; // FIXME + parser.parse_path_start(scheme_type, &mut has_host, parser::Input::new(path)); + } + }); + self.restore_after_path(old_after_path_pos, &after_path); + } + + /// Return an object with methods to manipulate this URL’s path segments. + /// + /// Return `Err(())` if this URl is cannot-be-a-base. + pub fn path_segments_mut(&mut self) -> Result<PathSegmentsMut, ()> { + if self.cannot_be_a_base() { + Err(()) + } else { + Ok(path_segments::new(self)) + } + } + + fn restore_after_path(&mut self, old_after_path_position: u32, after_path: &str) { + let new_after_path_position = to_u32(self.serialization.len()).unwrap(); + let adjust = |index: &mut u32| { + *index -= old_after_path_position; + *index += new_after_path_position; + }; + if let Some(ref mut index) = self.query_start { adjust(index) } + if let Some(ref mut index) = self.fragment_start { adjust(index) } + self.serialization.push_str(after_path) + } + + /// Change this URL’s port number. + /// + /// If this URL is cannot-be-a-base, does not have a host, or has the `file` scheme; + /// do nothing and return `Err`. + pub fn set_port(&mut self, mut port: Option<u16>) -> Result<(), ()> { + if !self.has_host() || self.scheme() == "file" { + return Err(()) + } + if port.is_some() && port == parser::default_port(self.scheme()) { + port = None + } + self.set_port_internal(port); + Ok(()) + } + + fn set_port_internal(&mut self, port: Option<u16>) { + match (self.port, port) { + (None, None) => {} + (Some(_), None) => { + self.serialization.drain(self.host_end as usize .. self.path_start as usize); + let offset = self.path_start - self.host_end; + self.path_start = self.host_end; + if let Some(ref mut index) = self.query_start { *index -= offset } + if let Some(ref mut index) = self.fragment_start { *index -= offset } + } + (Some(old), Some(new)) if old == new => {} + (_, Some(new)) => { + let path_and_after = self.slice(self.path_start..).to_owned(); + self.serialization.truncate(self.host_end as usize); + write!(&mut self.serialization, ":{}", new).unwrap(); + let old_path_start = self.path_start; + let new_path_start = to_u32(self.serialization.len()).unwrap(); + self.path_start = new_path_start; + let adjust = |index: &mut u32| { + *index -= old_path_start; + *index += new_path_start; + }; + if let Some(ref mut index) = self.query_start { adjust(index) } + if let Some(ref mut index) = self.fragment_start { adjust(index) } + self.serialization.push_str(&path_and_after); + } + } + self.port = port; + } + + /// Change this URL’s host. + /// + /// If this URL is cannot-be-a-base or there is an error parsing the given `host`, + /// do nothing and return `Err`. + /// + /// Removing the host (calling this with `None`) + /// will also remove any username, password, and port number. + pub fn set_host(&mut self, host: Option<&str>) -> Result<(), ParseError> { + if self.cannot_be_a_base() { + return Err(ParseError::SetHostOnCannotBeABaseUrl) + } + + if let Some(host) = host { + self.set_host_internal(try!(Host::parse(host)), None) + } else if self.has_host() { + debug_assert!(self.byte_at(self.scheme_end) == b':'); + debug_assert!(self.byte_at(self.path_start) == b'/'); + let new_path_start = self.scheme_end + 1; + self.serialization.drain(self.path_start as usize..new_path_start as usize); + let offset = self.path_start - new_path_start; + self.path_start = new_path_start; + self.username_end = new_path_start; + self.host_start = new_path_start; + self.host_end = new_path_start; + self.port = None; + if let Some(ref mut index) = self.query_start { *index -= offset } + if let Some(ref mut index) = self.fragment_start { *index -= offset } + } + Ok(()) + } + + /// opt_new_port: None means leave unchanged, Some(None) means remove any port number. + fn set_host_internal(&mut self, host: Host<String>, opt_new_port: Option<Option<u16>>) { + let old_suffix_pos = if opt_new_port.is_some() { self.path_start } else { self.host_end }; + let suffix = self.slice(old_suffix_pos..).to_owned(); + self.serialization.truncate(self.host_start as usize); + if !self.has_authority() { + debug_assert!(self.slice(self.scheme_end..self.host_start) == ":"); + debug_assert!(self.username_end == self.host_start); + self.serialization.push('/'); + self.serialization.push('/'); + self.username_end += 2; + self.host_start += 2; + } + write!(&mut self.serialization, "{}", host).unwrap(); + self.host_end = to_u32(self.serialization.len()).unwrap(); + self.host = host.into(); + + if let Some(new_port) = opt_new_port { + self.port = new_port; + if let Some(port) = new_port { + write!(&mut self.serialization, ":{}", port).unwrap(); + } + } + let new_suffix_pos = to_u32(self.serialization.len()).unwrap(); + self.serialization.push_str(&suffix); + + let adjust = |index: &mut u32| { + *index -= old_suffix_pos; + *index += new_suffix_pos; + }; + adjust(&mut self.path_start); + if let Some(ref mut index) = self.query_start { adjust(index) } + if let Some(ref mut index) = self.fragment_start { adjust(index) } + } + + /// Change this URL’s host to the given IP address. + /// + /// If this URL is cannot-be-a-base, do nothing and return `Err`. + /// + /// Compared to `Url::set_host`, this skips the host parser. + pub fn set_ip_host(&mut self, address: IpAddr) -> Result<(), ()> { + if self.cannot_be_a_base() { + return Err(()) + } + + let address = match address { + IpAddr::V4(address) => Host::Ipv4(address), + IpAddr::V6(address) => Host::Ipv6(address), + }; + self.set_host_internal(address, None); + Ok(()) + } + + /// Change this URL’s password. + /// + /// If this URL is cannot-be-a-base or does not have a host, do nothing and return `Err`. + pub fn set_password(&mut self, password: Option<&str>) -> Result<(), ()> { + if !self.has_host() { + return Err(()) + } + if let Some(password) = password { + let host_and_after = self.slice(self.host_start..).to_owned(); + self.serialization.truncate(self.username_end as usize); + self.serialization.push(':'); + self.serialization.extend(utf8_percent_encode(password, USERINFO_ENCODE_SET)); + self.serialization.push('@'); + + let old_host_start = self.host_start; + let new_host_start = to_u32(self.serialization.len()).unwrap(); + let adjust = |index: &mut u32| { + *index -= old_host_start; + *index += new_host_start; + }; + self.host_start = new_host_start; + adjust(&mut self.host_end); + adjust(&mut self.path_start); + if let Some(ref mut index) = self.query_start { adjust(index) } + if let Some(ref mut index) = self.fragment_start { adjust(index) } + + self.serialization.push_str(&host_and_after); + } else if self.byte_at(self.username_end) == b':' { // If there is a password to remove + let has_username_or_password = self.byte_at(self.host_start - 1) == b'@'; + debug_assert!(has_username_or_password); + let username_start = self.scheme_end + 3; + let empty_username = username_start == self.username_end; + let start = self.username_end; // Remove the ':' + let end = if empty_username { + self.host_start // Remove the '@' as well + } else { + self.host_start - 1 // Keep the '@' to separate the username from the host + }; + self.serialization.drain(start as usize .. end as usize); + let offset = end - start; + self.host_start -= offset; + self.host_end -= offset; + self.path_start -= offset; + if let Some(ref mut index) = self.query_start { *index -= offset } + if let Some(ref mut index) = self.fragment_start { *index -= offset } + } + Ok(()) + } + + /// Change this URL’s username. + /// + /// If this URL is cannot-be-a-base or does not have a host, do nothing and return `Err`. + pub fn set_username(&mut self, username: &str) -> Result<(), ()> { + if !self.has_host() { + return Err(()) + } + let username_start = self.scheme_end + 3; + debug_assert!(self.slice(self.scheme_end..username_start) == "://"); + if self.slice(username_start..self.username_end) == username { + return Ok(()) + } + let after_username = self.slice(self.username_end..).to_owned(); + self.serialization.truncate(username_start as usize); + self.serialization.extend(utf8_percent_encode(username, USERINFO_ENCODE_SET)); + + let mut removed_bytes = self.username_end; + self.username_end = to_u32(self.serialization.len()).unwrap(); + let mut added_bytes = self.username_end; + + let new_username_is_empty = self.username_end == username_start; + match (new_username_is_empty, after_username.chars().next()) { + (true, Some('@')) => { + removed_bytes += 1; + self.serialization.push_str(&after_username[1..]); + } + (false, Some('@')) | (_, Some(':')) | (true, _) => { + self.serialization.push_str(&after_username); + } + (false, _) => { + added_bytes += 1; + self.serialization.push('@'); + self.serialization.push_str(&after_username); + } + } + + let adjust = |index: &mut u32| { + *index -= removed_bytes; + *index += added_bytes; + }; + adjust(&mut self.host_start); + adjust(&mut self.host_end); + adjust(&mut self.path_start); + if let Some(ref mut index) = self.query_start { adjust(index) } + if let Some(ref mut index) = self.fragment_start { adjust(index) } + Ok(()) + } + + /// Change this URL’s scheme. + /// + /// Do nothing and return `Err` if: + /// * The new scheme is not in `[a-zA-Z][a-zA-Z0-9+.-]+` + /// * This URL is cannot-be-a-base and the new scheme is one of + /// `http`, `https`, `ws`, `wss`, `ftp`, or `gopher` + pub fn set_scheme(&mut self, scheme: &str) -> Result<(), ()> { + let mut parser = Parser::for_setter(String::new()); + let remaining = try!(parser.parse_scheme(parser::Input::new(scheme))); + if !remaining.is_empty() || + (!self.has_host() && SchemeType::from(&parser.serialization).is_special()) { + return Err(()) + } + let old_scheme_end = self.scheme_end; + let new_scheme_end = to_u32(parser.serialization.len()).unwrap(); + let adjust = |index: &mut u32| { + *index -= old_scheme_end; + *index += new_scheme_end; + }; + + self.scheme_end = new_scheme_end; + adjust(&mut self.username_end); + adjust(&mut self.host_start); + adjust(&mut self.host_end); + adjust(&mut self.path_start); + if let Some(ref mut index) = self.query_start { adjust(index) } + if let Some(ref mut index) = self.fragment_start { adjust(index) } + + parser.serialization.push_str(self.slice(old_scheme_end..)); + self.serialization = parser.serialization; + Ok(()) + } + + /// Convert a file name as `std::path::Path` into an URL in the `file` scheme. + /// + /// This returns `Err` if the given path is not absolute or, + /// on Windows, if the prefix is not a disk prefix (e.g. `C:`). + pub fn from_file_path<P: AsRef<Path>>(path: P) -> Result<Url, ()> { + let mut serialization = "file://".to_owned(); + let path_start = serialization.len() as u32; + try!(path_to_file_url_segments(path.as_ref(), &mut serialization)); + Ok(Url { + serialization: serialization, + scheme_end: "file".len() as u32, + username_end: path_start, + host_start: path_start, + host_end: path_start, + host: HostInternal::None, + port: None, + path_start: path_start, + query_start: None, + fragment_start: None, + }) + } + + /// Convert a directory name as `std::path::Path` into an URL in the `file` scheme. + /// + /// This returns `Err` if the given path is not absolute or, + /// on Windows, if the prefix is not a disk prefix (e.g. `C:`). + /// + /// Compared to `from_file_path`, this ensure that URL’s the path has a trailing slash + /// so that the entire path is considered when using this URL as a base URL. + /// + /// For example: + /// + /// * `"index.html"` parsed with `Url::from_directory_path(Path::new("/var/www"))` + /// as the base URL is `file:///var/www/index.html` + /// * `"index.html"` parsed with `Url::from_file_path(Path::new("/var/www"))` + /// as the base URL is `file:///var/index.html`, which might not be what was intended. + /// + /// Note that `std::path` does not consider trailing slashes significant + /// and usually does not include them (e.g. in `Path::parent()`). + pub fn from_directory_path<P: AsRef<Path>>(path: P) -> Result<Url, ()> { + let mut url = try!(Url::from_file_path(path)); + if !url.serialization.ends_with('/') { + url.serialization.push('/') + } + Ok(url) + } + + /// Assuming the URL is in the `file` scheme or similar, + /// convert its path to an absolute `std::path::Path`. + /// + /// **Note:** This does not actually check the URL’s `scheme`, + /// and may give nonsensical results for other schemes. + /// It is the user’s responsibility to check the URL’s scheme before calling this. + /// + /// ``` + /// # use url::Url; + /// # let url = Url::parse("file:///etc/passwd").unwrap(); + /// let path = url.to_file_path(); + /// ``` + /// + /// Returns `Err` if the host is neither empty nor `"localhost"`, + /// or if `Path::new_opt()` returns `None`. + /// (That is, if the percent-decoded path contains a NUL byte or, + /// for a Windows path, is not UTF-8.) + #[inline] + pub fn to_file_path(&self) -> Result<PathBuf, ()> { + // FIXME: Figure out what to do w.r.t host. + if matches!(self.host(), None | Some(Host::Domain("localhost"))) { + if let Some(segments) = self.path_segments() { + return file_url_segments_to_pathbuf(segments) + } + } + Err(()) + } + + // Private helper methods: + + #[inline] + fn slice<R>(&self, range: R) -> &str where R: RangeArg { + range.slice_of(&self.serialization) + } + + #[inline] + fn byte_at(&self, i: u32) -> u8 { + self.serialization.as_bytes()[i as usize] + } +} + +/// Return an error if `Url::host` or `Url::port_or_known_default` return `None`. +impl ToSocketAddrs for Url { + type Iter = SocketAddrs; + + fn to_socket_addrs(&self) -> io::Result<Self::Iter> { + try!(self.with_default_port(|_| Err(()))).to_socket_addrs() + } +} + +/// Parse a string as an URL, without a base URL or encoding override. +impl str::FromStr for Url { + type Err = ParseError; + + #[inline] + fn from_str(input: &str) -> Result<Url, ::ParseError> { + Url::parse(input) + } +} + +/// Display the serialization of this URL. +impl fmt::Display for Url { + #[inline] + fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { + fmt::Display::fmt(&self.serialization, formatter) + } +} + +/// Debug the serialization of this URL. +impl fmt::Debug for Url { + #[inline] + fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { + fmt::Debug::fmt(&self.serialization, formatter) + } +} + +/// URLs compare like their serialization. +impl Eq for Url {} + +/// URLs compare like their serialization. +impl PartialEq for Url { + #[inline] + fn eq(&self, other: &Self) -> bool { + self.serialization == other.serialization + } +} + +/// URLs compare like their serialization. +impl Ord for Url { + #[inline] + fn cmp(&self, other: &Self) -> cmp::Ordering { + self.serialization.cmp(&other.serialization) + } +} + +/// URLs compare like their serialization. +impl PartialOrd for Url { + #[inline] + fn partial_cmp(&self, other: &Self) -> Option<cmp::Ordering> { + self.serialization.partial_cmp(&other.serialization) + } +} + +/// URLs hash like their serialization. +impl hash::Hash for Url { + #[inline] + fn hash<H>(&self, state: &mut H) where H: hash::Hasher { + hash::Hash::hash(&self.serialization, state) + } +} + +/// Return the serialization of this URL. +impl AsRef<str> for Url { + #[inline] + fn as_ref(&self) -> &str { + &self.serialization + } +} + +trait RangeArg { + fn slice_of<'a>(&self, s: &'a str) -> &'a str; +} + +impl RangeArg for Range<u32> { + #[inline] + fn slice_of<'a>(&self, s: &'a str) -> &'a str { + &s[self.start as usize .. self.end as usize] + } +} + +impl RangeArg for RangeFrom<u32> { + #[inline] + fn slice_of<'a>(&self, s: &'a str) -> &'a str { + &s[self.start as usize ..] + } +} + +impl RangeArg for RangeTo<u32> { + #[inline] + fn slice_of<'a>(&self, s: &'a str) -> &'a str { + &s[.. self.end as usize] + } +} + +#[cfg(feature="rustc-serialize")] +impl rustc_serialize::Encodable for Url { + fn encode<S: rustc_serialize::Encoder>(&self, encoder: &mut S) -> Result<(), S::Error> { + encoder.emit_str(self.as_str()) + } +} + + +#[cfg(feature="rustc-serialize")] +impl rustc_serialize::Decodable for Url { + fn decode<D: rustc_serialize::Decoder>(decoder: &mut D) -> Result<Url, D::Error> { + Url::parse(&*try!(decoder.read_str())).map_err(|error| { + decoder.error(&format!("URL parsing error: {}", error)) + }) + } +} + +/// Serializes this URL into a `serde` stream. +/// +/// This implementation is only available if the `serde` Cargo feature is enabled. +#[cfg(feature="serde")] +impl serde::Serialize for Url { + fn serialize<S>(&self, serializer: &mut S) -> Result<(), S::Error> where S: serde::Serializer { + format!("{}", self).serialize(serializer) + } +} + +/// Deserializes this URL from a `serde` stream. +/// +/// This implementation is only available if the `serde` Cargo feature is enabled. +#[cfg(feature="serde")] +impl serde::Deserialize for Url { + fn deserialize<D>(deserializer: &mut D) -> Result<Url, D::Error> where D: serde::Deserializer { + let string_representation: String = try!(serde::Deserialize::deserialize(deserializer)); + Ok(Url::parse(&string_representation).unwrap()) + } +} + +#[cfg(unix)] +fn path_to_file_url_segments(path: &Path, serialization: &mut String) -> Result<(), ()> { + use std::os::unix::prelude::OsStrExt; + if !path.is_absolute() { + return Err(()) + } + // skip the root component + for component in path.components().skip(1) { + serialization.push('/'); + serialization.extend(percent_encode( + component.as_os_str().as_bytes(), PATH_SEGMENT_ENCODE_SET)) + } + Ok(()) +} + +#[cfg(windows)] +fn path_to_file_url_segments(path: &Path, serialization: &mut String) -> Result<(), ()> { + path_to_file_url_segments_windows(path, serialization) +} + +// Build this unconditionally to alleviate https://github.com/servo/rust-url/issues/102 +#[cfg_attr(not(windows), allow(dead_code))] +fn path_to_file_url_segments_windows(path: &Path, serialization: &mut String) -> Result<(), ()> { + use std::path::{Prefix, Component}; + if !path.is_absolute() { + return Err(()) + } + let mut components = path.components(); + let disk = match components.next() { + Some(Component::Prefix(ref p)) => match p.kind() { + Prefix::Disk(byte) => byte, + Prefix::VerbatimDisk(byte) => byte, + _ => return Err(()), + }, + + // FIXME: do something with UNC and other prefixes? + _ => return Err(()) + }; + + // Start with the prefix, e.g. "C:" + serialization.push('/'); + serialization.push(disk as char); + serialization.push(':'); + + for component in components { + if component == Component::RootDir { continue } + // FIXME: somehow work with non-unicode? + let component = try!(component.as_os_str().to_str().ok_or(())); + serialization.push('/'); + serialization.extend(percent_encode(component.as_bytes(), PATH_SEGMENT_ENCODE_SET)); + } + Ok(()) +} + +#[cfg(unix)] +fn file_url_segments_to_pathbuf(segments: str::Split<char>) -> Result<PathBuf, ()> { + use std::ffi::OsStr; + use std::os::unix::prelude::OsStrExt; + use std::path::PathBuf; + + let mut bytes = Vec::new(); + for segment in segments { + bytes.push(b'/'); + bytes.extend(percent_decode(segment.as_bytes())); + } + let os_str = OsStr::from_bytes(&bytes); + let path = PathBuf::from(os_str); + debug_assert!(path.is_absolute(), + "to_file_path() failed to produce an absolute Path"); + Ok(path) +} + +#[cfg(windows)] +fn file_url_segments_to_pathbuf(segments: str::Split<char>) -> Result<PathBuf, ()> { + file_url_segments_to_pathbuf_windows(segments) +} + +// Build this unconditionally to alleviate https://github.com/servo/rust-url/issues/102 +#[cfg_attr(not(windows), allow(dead_code))] +fn file_url_segments_to_pathbuf_windows(mut segments: str::Split<char>) -> Result<PathBuf, ()> { + let first = try!(segments.next().ok_or(())); + if first.len() != 2 || !first.starts_with(parser::ascii_alpha) + || first.as_bytes()[1] != b':' { + return Err(()) + } + let mut string = first.to_owned(); + for segment in segments { + string.push('\\'); + + // Currently non-unicode windows paths cannot be represented + match String::from_utf8(percent_decode(segment.as_bytes()).collect()) { + Ok(s) => string.push_str(&s), + Err(..) => return Err(()), + } + } + let path = PathBuf::from(string); + debug_assert!(path.is_absolute(), + "to_file_path() failed to produce an absolute Path"); + Ok(path) +} + +fn io_error<T>(reason: &str) -> io::Result<T> { + Err(io::Error::new(io::ErrorKind::InvalidData, reason)) +} + +/// Implementation detail of `Url::query_pairs_mut`. Typically not used directly. +pub struct UrlQuery<'a> { + url: &'a mut Url, + fragment: Option<String>, +} + +impl<'a> Drop for UrlQuery<'a> { + fn drop(&mut self) { + self.url.restore_already_parsed_fragment(self.fragment.take()) + } +} diff --git a/deps/url-1.1.0/src/origin.rs b/deps/url-1.1.0/src/origin.rs new file mode 100644 index 000000000..a78b939fc --- /dev/null +++ b/deps/url-1.1.0/src/origin.rs @@ -0,0 +1,99 @@ +// Copyright 2016 The rust-url developers. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +use host::Host; +use idna::domain_to_unicode; +use parser::default_port; +use std::sync::atomic::{AtomicUsize, ATOMIC_USIZE_INIT, Ordering}; +use Url; + +pub fn url_origin(url: &Url) -> Origin { + let scheme = url.scheme(); + match scheme { + "blob" => { + let result = Url::parse(url.path()); + match result { + Ok(ref url) => url_origin(url), + Err(_) => Origin::new_opaque() + } + }, + "ftp" | "gopher" | "http" | "https" | "ws" | "wss" => { + Origin::Tuple(scheme.to_owned(), url.host().unwrap().to_owned(), + url.port_or_known_default().unwrap()) + }, + // TODO: Figure out what to do if the scheme is a file + "file" => Origin::new_opaque(), + _ => Origin::new_opaque() + } +} + +/// The origin of an URL +#[derive(PartialEq, Eq, Clone, Debug)] +#[cfg_attr(feature="heap_size", derive(HeapSizeOf))] +pub enum Origin { + /// A globally unique identifier + Opaque(OpaqueOrigin), + + /// Consists of the URL's scheme, host and port + Tuple(String, Host<String>, u16) +} + + +impl Origin { + /// Creates a new opaque origin that is only equal to itself. + pub fn new_opaque() -> Origin { + static COUNTER: AtomicUsize = ATOMIC_USIZE_INIT; + Origin::Opaque(OpaqueOrigin(COUNTER.fetch_add(1, Ordering::SeqCst))) + } + + /// Return whether this origin is a (scheme, host, port) tuple + /// (as opposed to an opaque origin). + pub fn is_tuple(&self) -> bool { + matches!(*self, Origin::Tuple(..)) + } + + /// https://html.spec.whatwg.org/multipage/#ascii-serialisation-of-an-origin + pub fn ascii_serialization(&self) -> String { + match *self { + Origin::Opaque(_) => "null".to_owned(), + Origin::Tuple(ref scheme, ref host, port) => { + if default_port(scheme) == Some(port) { + format!("{}://{}", scheme, host) + } else { + format!("{}://{}:{}", scheme, host, port) + } + } + } + } + + /// https://html.spec.whatwg.org/multipage/#unicode-serialisation-of-an-origin + pub fn unicode_serialization(&self) -> String { + match *self { + Origin::Opaque(_) => "null".to_owned(), + Origin::Tuple(ref scheme, ref host, port) => { + let host = match *host { + Host::Domain(ref domain) => { + let (domain, _errors) = domain_to_unicode(domain); + Host::Domain(domain) + } + _ => host.clone() + }; + if default_port(scheme) == Some(port) { + format!("{}://{}", scheme, host) + } else { + format!("{}://{}:{}", scheme, host, port) + } + } + } + } +} + +/// Opaque identifier for URLs that have file or other schemes +#[derive(Eq, PartialEq, Clone, Debug)] +#[cfg_attr(feature="heap_size", derive(HeapSizeOf))] +pub struct OpaqueOrigin(usize); diff --git a/deps/url-1.1.0/src/parser.rs b/deps/url-1.1.0/src/parser.rs new file mode 100644 index 000000000..2945432fc --- /dev/null +++ b/deps/url-1.1.0/src/parser.rs @@ -0,0 +1,1179 @@ +// Copyright 2013-2016 The rust-url developers. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +use std::ascii::AsciiExt; +use std::error::Error; +use std::fmt::{self, Formatter, Write}; +use std::str; + +use Url; +use encoding::EncodingOverride; +use host::{Host, HostInternal}; +use percent_encoding::{ + utf8_percent_encode, percent_encode, + SIMPLE_ENCODE_SET, DEFAULT_ENCODE_SET, USERINFO_ENCODE_SET, QUERY_ENCODE_SET, + PATH_SEGMENT_ENCODE_SET +}; + +pub type ParseResult<T> = Result<T, ParseError>; + +macro_rules! simple_enum_error { + ($($name: ident => $description: expr,)+) => { + /// Errors that can occur during parsing. + #[derive(PartialEq, Eq, Clone, Copy, Debug)] + pub enum ParseError { + $( + $name, + )+ + } + + impl Error for ParseError { + fn description(&self) -> &str { + match *self { + $( + ParseError::$name => $description, + )+ + } + } + } + } +} + +simple_enum_error! { + EmptyHost => "empty host", + IdnaError => "invalid international domain name", + InvalidPort => "invalid port number", + InvalidIpv4Address => "invalid IPv4 address", + InvalidIpv6Address => "invalid IPv6 address", + InvalidDomainCharacter => "invalid domain character", + RelativeUrlWithoutBase => "relative URL without a base", + RelativeUrlWithCannotBeABaseBase => "relative URL with a cannot-be-a-base base", + SetHostOnCannotBeABaseUrl => "a cannot-be-a-base URL doesn’t have a host to set", + Overflow => "URLs more than 4 GB are not supported", +} + +impl fmt::Display for ParseError { + fn fmt(&self, fmt: &mut Formatter) -> fmt::Result { + self.description().fmt(fmt) + } +} + +impl From<::idna::uts46::Errors> for ParseError { + fn from(_: ::idna::uts46::Errors) -> ParseError { ParseError::IdnaError } +} + +#[derive(Copy, Clone)] +pub enum SchemeType { + File, + SpecialNotFile, + NotSpecial, +} + +impl SchemeType { + pub fn is_special(&self) -> bool { + !matches!(*self, SchemeType::NotSpecial) + } + + pub fn is_file(&self) -> bool { + matches!(*self, SchemeType::File) + } + + pub fn from(s: &str) -> Self { + match s { + "http" | "https" | "ws" | "wss" | "ftp" | "gopher" => SchemeType::SpecialNotFile, + "file" => SchemeType::File, + _ => SchemeType::NotSpecial, + } + } +} + +pub fn default_port(scheme: &str) -> Option<u16> { + match scheme { + "http" | "ws" => Some(80), + "https" | "wss" => Some(443), + "ftp" => Some(21), + "gopher" => Some(70), + _ => None, + } +} + +#[derive(Clone)] +pub struct Input<'i> { + chars: str::Chars<'i>, +} + +impl<'i> Input<'i> { + pub fn new(input: &'i str) -> Self { + Input::with_log(input, None) + } + + pub fn with_log(original_input: &'i str, log_syntax_violation: Option<&Fn(&'static str)>) + -> Self { + let input = original_input.trim_matches(c0_control_or_space); + if let Some(log) = log_syntax_violation { + if input.len() < original_input.len() { + log("leading or trailing control or space character are ignored in URLs") + } + if input.chars().any(|c| matches!(c, '\t' | '\n' | '\r')) { + log("tabs or newlines are ignored in URLs") + } + } + Input { chars: input.chars() } + } + + #[inline] + pub fn is_empty(&self) -> bool { + self.clone().next().is_none() + } + + #[inline] + fn starts_with<P: Pattern>(&self, p: P) -> bool { + p.split_prefix(&mut self.clone()) + } + + #[inline] + pub fn split_prefix<P: Pattern>(&self, p: P) -> Option<Self> { + let mut remaining = self.clone(); + if p.split_prefix(&mut remaining) { + Some(remaining) + } else { + None + } + } + + #[inline] + fn split_first(&self) -> (Option<char>, Self) { + let mut remaining = self.clone(); + (remaining.next(), remaining) + } + + #[inline] + fn count_matching<F: Fn(char) -> bool>(&self, f: F) -> (u32, Self) { + let mut count = 0; + let mut remaining = self.clone(); + loop { + let mut input = remaining.clone(); + if matches!(input.next(), Some(c) if f(c)) { + remaining = input; + count += 1; + } else { + return (count, remaining) + } + } + } + + #[inline] + fn next_utf8(&mut self) -> Option<(char, &'i str)> { + loop { + let utf8 = self.chars.as_str(); + match self.chars.next() { + Some(c) => { + if !matches!(c, '\t' | '\n' | '\r') { + return Some((c, &utf8[..c.len_utf8()])) + } + } + None => return None + } + } + } +} + +pub trait Pattern { + fn split_prefix<'i>(self, input: &mut Input<'i>) -> bool; +} + +impl Pattern for char { + fn split_prefix<'i>(self, input: &mut Input<'i>) -> bool { input.next() == Some(self) } +} + +impl<'a> Pattern for &'a str { + fn split_prefix<'i>(self, input: &mut Input<'i>) -> bool { + for c in self.chars() { + if input.next() != Some(c) { + return false + } + } + true + } +} + +impl<F: FnMut(char) -> bool> Pattern for F { + fn split_prefix<'i>(self, input: &mut Input<'i>) -> bool { input.next().map_or(false, self) } +} + +impl<'i> Iterator for Input<'i> { + type Item = char; + fn next(&mut self) -> Option<char> { + self.chars.by_ref().filter(|&c| !matches!(c, '\t' | '\n' | '\r')).next() + } +} + +pub struct Parser<'a> { + pub serialization: String, + pub base_url: Option<&'a Url>, + pub query_encoding_override: EncodingOverride, + pub log_syntax_violation: Option<&'a Fn(&'static str)>, + pub context: Context, +} + +#[derive(PartialEq, Eq, Copy, Clone)] +pub enum Context { + UrlParser, + Setter, + PathSegmentSetter, +} + +impl<'a> Parser<'a> { + pub fn for_setter(serialization: String) -> Parser<'a> { + Parser { + serialization: serialization, + base_url: None, + query_encoding_override: EncodingOverride::utf8(), + log_syntax_violation: None, + context: Context::Setter, + } + } + + fn syntax_violation(&self, reason: &'static str) { + if let Some(log) = self.log_syntax_violation { + log(reason) + } + } + + fn syntax_violation_if<F: Fn() -> bool>(&self, reason: &'static str, test: F) { + // Skip test if not logging. + if let Some(log) = self.log_syntax_violation { + if test() { + log(reason) + } + } + } + + /// https://url.spec.whatwg.org/#concept-basic-url-parser + pub fn parse_url(mut self, input: &str) -> ParseResult<Url> { + let input = Input::with_log(input, self.log_syntax_violation); + if let Ok(remaining) = self.parse_scheme(input.clone()) { + return self.parse_with_scheme(remaining) + } + + // No-scheme state + if let Some(base_url) = self.base_url { + if input.starts_with('#') { + self.fragment_only(base_url, input) + } else if base_url.cannot_be_a_base() { + Err(ParseError::RelativeUrlWithCannotBeABaseBase) + } else { + let scheme_type = SchemeType::from(base_url.scheme()); + if scheme_type.is_file() { + self.parse_file(input, Some(base_url)) + } else { + self.parse_relative(input, scheme_type, base_url) + } + } + } else { + Err(ParseError::RelativeUrlWithoutBase) + } + } + + pub fn parse_scheme<'i>(&mut self, mut input: Input<'i>) -> Result<Input<'i>, ()> { + if input.is_empty() || !input.starts_with(ascii_alpha) { + return Err(()) + } + debug_assert!(self.serialization.is_empty()); + while let Some(c) = input.next() { + match c { + 'a'...'z' | 'A'...'Z' | '0'...'9' | '+' | '-' | '.' => { + self.serialization.push(c.to_ascii_lowercase()) + } + ':' => return Ok(input), + _ => { + self.serialization.clear(); + return Err(()) + } + } + } + // EOF before ':' + if self.context == Context::Setter { + Ok(input) + } else { + self.serialization.clear(); + Err(()) + } + } + + fn parse_with_scheme(mut self, input: Input) -> ParseResult<Url> { + let scheme_end = try!(to_u32(self.serialization.len())); + let scheme_type = SchemeType::from(&self.serialization); + self.serialization.push(':'); + match scheme_type { + SchemeType::File => { + self.syntax_violation_if("expected // after file:", || !input.starts_with("//")); + let base_file_url = self.base_url.and_then(|base| { + if base.scheme() == "file" { Some(base) } else { None } + }); + self.serialization.clear(); + self.parse_file(input, base_file_url) + } + SchemeType::SpecialNotFile => { + // special relative or authority state + let (slashes_count, remaining) = input.count_matching(|c| matches!(c, '/' | '\\')); + if let Some(base_url) = self.base_url { + if slashes_count < 2 && + base_url.scheme() == &self.serialization[..scheme_end as usize] { + // "Cannot-be-a-base" URLs only happen with "not special" schemes. + debug_assert!(!base_url.cannot_be_a_base()); + self.serialization.clear(); + return self.parse_relative(input, scheme_type, base_url) + } + } + // special authority slashes state + self.syntax_violation_if("expected //", || { + input.clone().take_while(|&c| matches!(c, '/' | '\\')) + .collect::<String>() != "//" + }); + self.after_double_slash(remaining, scheme_type, scheme_end) + } + SchemeType::NotSpecial => self.parse_non_special(input, scheme_type, scheme_end) + } + } + + /// Scheme other than file, http, https, ws, ws, ftp, gopher. + fn parse_non_special(mut self, input: Input, scheme_type: SchemeType, scheme_end: u32) + -> ParseResult<Url> { + // path or authority state ( + if let Some(input) = input.split_prefix("//") { + return self.after_double_slash(input, scheme_type, scheme_end) + } + // Anarchist URL (no authority) + let path_start = try!(to_u32(self.serialization.len())); + let username_end = path_start; + let host_start = path_start; + let host_end = path_start; + let host = HostInternal::None; + let port = None; + let remaining = if let Some(input) = input.split_prefix('/') { + let path_start = self.serialization.len(); + self.serialization.push('/'); + self.parse_path(scheme_type, &mut false, path_start, input) + } else { + self.parse_cannot_be_a_base_path(input) + }; + self.with_query_and_fragment(scheme_end, username_end, host_start, + host_end, host, port, path_start, remaining) + } + + fn parse_file(mut self, input: Input, mut base_file_url: Option<&Url>) -> ParseResult<Url> { + // file state + debug_assert!(self.serialization.is_empty()); + let (first_char, input_after_first_char) = input.split_first(); + match first_char { + None => { + if let Some(base_url) = base_file_url { + // Copy everything except the fragment + let before_fragment = match base_url.fragment_start { + Some(i) => &base_url.serialization[..i as usize], + None => &*base_url.serialization, + }; + self.serialization.push_str(before_fragment); + Ok(Url { + serialization: self.serialization, + fragment_start: None, + ..*base_url + }) + } else { + self.serialization.push_str("file:///"); + let scheme_end = "file".len() as u32; + let path_start = "file://".len() as u32; + Ok(Url { + serialization: self.serialization, + scheme_end: scheme_end, + username_end: path_start, + host_start: path_start, + host_end: path_start, + host: HostInternal::None, + port: None, + path_start: path_start, + query_start: None, + fragment_start: None, + }) + } + }, + Some('?') => { + if let Some(base_url) = base_file_url { + // Copy everything up to the query string + let before_query = match (base_url.query_start, base_url.fragment_start) { + (None, None) => &*base_url.serialization, + (Some(i), _) | + (None, Some(i)) => base_url.slice(..i) + }; + self.serialization.push_str(before_query); + let (query_start, fragment_start) = + try!(self.parse_query_and_fragment(base_url.scheme_end, input)); + Ok(Url { + serialization: self.serialization, + query_start: query_start, + fragment_start: fragment_start, + ..*base_url + }) + } else { + self.serialization.push_str("file:///"); + let scheme_end = "file".len() as u32; + let path_start = "file://".len() as u32; + let (query_start, fragment_start) = + try!(self.parse_query_and_fragment(scheme_end, input)); + Ok(Url { + serialization: self.serialization, + scheme_end: scheme_end, + username_end: path_start, + host_start: path_start, + host_end: path_start, + host: HostInternal::None, + port: None, + path_start: path_start, + query_start: query_start, + fragment_start: fragment_start, + }) + } + }, + Some('#') => { + if let Some(base_url) = base_file_url { + self.fragment_only(base_url, input) + } else { + self.serialization.push_str("file:///"); + let scheme_end = "file".len() as u32; + let path_start = "file://".len() as u32; + let fragment_start = "file:///".len() as u32; + self.parse_fragment(input_after_first_char); + Ok(Url { + serialization: self.serialization, + scheme_end: scheme_end, + username_end: path_start, + host_start: path_start, + host_end: path_start, + host: HostInternal::None, + port: None, + path_start: path_start, + query_start: None, + fragment_start: Some(fragment_start), + }) + } + } + Some('/') | Some('\\') => { + self.syntax_violation_if("backslash", || first_char == Some('\\')); + // file slash state + let (next_char, input_after_next_char) = input_after_first_char.split_first(); + self.syntax_violation_if("backslash", || next_char == Some('\\')); + if matches!(next_char, Some('/') | Some('\\')) { + // file host state + self.serialization.push_str("file://"); + let scheme_end = "file".len() as u32; + let host_start = "file://".len() as u32; + let (path_start, host, remaining) = + try!(self.parse_file_host(input_after_next_char)); + let host_end = try!(to_u32(self.serialization.len())); + let mut has_host = !matches!(host, HostInternal::None); + let remaining = if path_start { + self.parse_path_start(SchemeType::File, &mut has_host, remaining) + } else { + let path_start = self.serialization.len(); + self.serialization.push('/'); + self.parse_path(SchemeType::File, &mut has_host, path_start, remaining) + }; + // FIXME: deal with has_host + let (query_start, fragment_start) = + try!(self.parse_query_and_fragment(scheme_end, remaining)); + Ok(Url { + serialization: self.serialization, + scheme_end: scheme_end, + username_end: host_start, + host_start: host_start, + host_end: host_end, + host: host, + port: None, + path_start: host_end, + query_start: query_start, + fragment_start: fragment_start, + }) + } else { + self.serialization.push_str("file:///"); + let scheme_end = "file".len() as u32; + let path_start = "file://".len(); + if let Some(base_url) = base_file_url { + let first_segment = base_url.path_segments().unwrap().next().unwrap(); + // FIXME: *normalized* drive letter + if is_windows_drive_letter(first_segment) { + self.serialization.push_str(first_segment); + self.serialization.push('/'); + } + } + let remaining = self.parse_path( + SchemeType::File, &mut false, path_start, input_after_first_char); + let (query_start, fragment_start) = + try!(self.parse_query_and_fragment(scheme_end, remaining)); + let path_start = path_start as u32; + Ok(Url { + serialization: self.serialization, + scheme_end: scheme_end, + username_end: path_start, + host_start: path_start, + host_end: path_start, + host: HostInternal::None, + port: None, + path_start: path_start, + query_start: query_start, + fragment_start: fragment_start, + }) + } + } + _ => { + if starts_with_windows_drive_letter_segment(&input) { + base_file_url = None; + } + if let Some(base_url) = base_file_url { + let before_query = match (base_url.query_start, base_url.fragment_start) { + (None, None) => &*base_url.serialization, + (Some(i), _) | + (None, Some(i)) => base_url.slice(..i) + }; + self.serialization.push_str(before_query); + self.pop_path(SchemeType::File, base_url.path_start as usize); + let remaining = self.parse_path( + SchemeType::File, &mut true, base_url.path_start as usize, input); + self.with_query_and_fragment( + base_url.scheme_end, base_url.username_end, base_url.host_start, + base_url.host_end, base_url.host, base_url.port, base_url.path_start, remaining) + } else { + self.serialization.push_str("file:///"); + let scheme_end = "file".len() as u32; + let path_start = "file://".len(); + let remaining = self.parse_path( + SchemeType::File, &mut false, path_start, input); + let (query_start, fragment_start) = + try!(self.parse_query_and_fragment(scheme_end, remaining)); + let path_start = path_start as u32; + Ok(Url { + serialization: self.serialization, + scheme_end: scheme_end, + username_end: path_start, + host_start: path_start, + host_end: path_start, + host: HostInternal::None, + port: None, + path_start: path_start, + query_start: query_start, + fragment_start: fragment_start, + }) + } + } + } + } + + fn parse_relative(mut self, input: Input, scheme_type: SchemeType, base_url: &Url) + -> ParseResult<Url> { + // relative state + debug_assert!(self.serialization.is_empty()); + let (first_char, input_after_first_char) = input.split_first(); + match first_char { + None => { + // Copy everything except the fragment + let before_fragment = match base_url.fragment_start { + Some(i) => &base_url.serialization[..i as usize], + None => &*base_url.serialization, + }; + self.serialization.push_str(before_fragment); + Ok(Url { + serialization: self.serialization, + fragment_start: None, + ..*base_url + }) + }, + Some('?') => { + // Copy everything up to the query string + let before_query = match (base_url.query_start, base_url.fragment_start) { + (None, None) => &*base_url.serialization, + (Some(i), _) | + (None, Some(i)) => base_url.slice(..i) + }; + self.serialization.push_str(before_query); + let (query_start, fragment_start) = + try!(self.parse_query_and_fragment(base_url.scheme_end, input)); + Ok(Url { + serialization: self.serialization, + query_start: query_start, + fragment_start: fragment_start, + ..*base_url + }) + }, + Some('#') => self.fragment_only(base_url, input), + Some('/') | Some('\\') => { + let (slashes_count, remaining) = input.count_matching(|c| matches!(c, '/' | '\\')); + if slashes_count >= 2 { + self.syntax_violation_if("expected //", || { + input.clone().take_while(|&c| matches!(c, '/' | '\\')) + .collect::<String>() != "//" + }); + let scheme_end = base_url.scheme_end; + debug_assert!(base_url.byte_at(scheme_end) == b':'); + self.serialization.push_str(base_url.slice(..scheme_end + 1)); + return self.after_double_slash(remaining, scheme_type, scheme_end) + } + let path_start = base_url.path_start; + debug_assert!(base_url.byte_at(path_start) == b'/'); + self.serialization.push_str(base_url.slice(..path_start + 1)); + let remaining = self.parse_path( + scheme_type, &mut true, path_start as usize, input_after_first_char); + self.with_query_and_fragment( + base_url.scheme_end, base_url.username_end, base_url.host_start, + base_url.host_end, base_url.host, base_url.port, base_url.path_start, remaining) + } + _ => { + let before_query = match (base_url.query_start, base_url.fragment_start) { + (None, None) => &*base_url.serialization, + (Some(i), _) | + (None, Some(i)) => base_url.slice(..i) + }; + self.serialization.push_str(before_query); + // FIXME spec says just "remove last entry", not the "pop" algorithm + self.pop_path(scheme_type, base_url.path_start as usize); + let remaining = self.parse_path( + scheme_type, &mut true, base_url.path_start as usize, input); + self.with_query_and_fragment( + base_url.scheme_end, base_url.username_end, base_url.host_start, + base_url.host_end, base_url.host, base_url.port, base_url.path_start, remaining) + } + } + } + + fn after_double_slash(mut self, input: Input, scheme_type: SchemeType, scheme_end: u32) + -> ParseResult<Url> { + self.serialization.push('/'); + self.serialization.push('/'); + // authority state + let (username_end, remaining) = try!(self.parse_userinfo(input, scheme_type)); + // host state + let host_start = try!(to_u32(self.serialization.len())); + let (host_end, host, port, remaining) = + try!(self.parse_host_and_port(remaining, scheme_end, scheme_type)); + // path state + let path_start = try!(to_u32(self.serialization.len())); + let remaining = self.parse_path_start( + scheme_type, &mut true, remaining); + self.with_query_and_fragment(scheme_end, username_end, host_start, + host_end, host, port, path_start, remaining) + } + + /// Return (username_end, remaining) + fn parse_userinfo<'i>(&mut self, mut input: Input<'i>, scheme_type: SchemeType) + -> ParseResult<(u32, Input<'i>)> { + let mut last_at = None; + let mut remaining = input.clone(); + let mut char_count = 0; + while let Some(c) = remaining.next() { + match c { + '@' => { + if last_at.is_some() { + self.syntax_violation("unencoded @ sign in username or password") + } else { + self.syntax_violation( + "embedding authentification information (username or password) \ + in an URL is not recommended") + } + last_at = Some((char_count, remaining.clone())) + }, + '/' | '?' | '#' => break, + '\\' if scheme_type.is_special() => break, + _ => (), + } + char_count += 1; + } + let (mut userinfo_char_count, remaining) = match last_at { + None => return Ok((try!(to_u32(self.serialization.len())), input)), + Some((0, remaining)) => return Ok((try!(to_u32(self.serialization.len())), remaining)), + Some(x) => x + }; + + let mut username_end = None; + while userinfo_char_count > 0 { + let (c, utf8_c) = input.next_utf8().unwrap(); + userinfo_char_count -= 1; + if c == ':' && username_end.is_none() { + // Start parsing password + username_end = Some(try!(to_u32(self.serialization.len()))); + self.serialization.push(':'); + } else { + self.check_url_code_point(c, &input); + self.serialization.extend(utf8_percent_encode(utf8_c, USERINFO_ENCODE_SET)); + } + } + let username_end = match username_end { + Some(i) => i, + None => try!(to_u32(self.serialization.len())), + }; + self.serialization.push('@'); + Ok((username_end, remaining)) + } + + fn parse_host_and_port<'i>(&mut self, input: Input<'i>, + scheme_end: u32, scheme_type: SchemeType) + -> ParseResult<(u32, HostInternal, Option<u16>, Input<'i>)> { + let (host, remaining) = try!( + Parser::parse_host(input, scheme_type)); + write!(&mut self.serialization, "{}", host).unwrap(); + let host_end = try!(to_u32(self.serialization.len())); + let (port, remaining) = if let Some(remaining) = remaining.split_prefix(':') { + let scheme = || default_port(&self.serialization[..scheme_end as usize]); + try!(Parser::parse_port(remaining, scheme, self.context)) + } else { + (None, remaining) + }; + if let Some(port) = port { + write!(&mut self.serialization, ":{}", port).unwrap() + } + Ok((host_end, host.into(), port, remaining)) + } + + pub fn parse_host<'i>(mut input: Input<'i>, scheme_type: SchemeType) + -> ParseResult<(Host<String>, Input<'i>)> { + // Undo the Input abstraction here to avoid allocating in the common case + // where the host part of the input does not contain any tab or newline + let input_str = input.chars.as_str(); + let mut inside_square_brackets = false; + let mut has_ignored_chars = false; + let mut non_ignored_chars = 0; + let mut bytes = 0; + for c in input_str.chars() { + match c { + ':' if !inside_square_brackets => break, + '\\' if scheme_type.is_special() => break, + '/' | '?' | '#' => break, + '\t' | '\n' | '\r' => { + has_ignored_chars = true; + } + '[' => { + inside_square_brackets = true; + non_ignored_chars += 1 + } + ']' => { + inside_square_brackets = false; + non_ignored_chars += 1 + } + _ => non_ignored_chars += 1 + } + bytes += c.len_utf8(); + } + let replaced: String; + let host_str; + { + let host_input = input.by_ref().take(non_ignored_chars); + if has_ignored_chars { + replaced = host_input.collect(); + host_str = &*replaced + } else { + for _ in host_input {} + host_str = &input_str[..bytes] + } + } + if scheme_type.is_special() && host_str.is_empty() { + return Err(ParseError::EmptyHost) + } + let host = try!(Host::parse(host_str)); + Ok((host, input)) + } + + pub fn parse_file_host<'i>(&mut self, input: Input<'i>) + -> ParseResult<(bool, HostInternal, Input<'i>)> { + // Undo the Input abstraction here to avoid allocating in the common case + // where the host part of the input does not contain any tab or newline + let input_str = input.chars.as_str(); + let mut has_ignored_chars = false; + let mut non_ignored_chars = 0; + let mut bytes = 0; + for c in input_str.chars() { + match c { + '/' | '\\' | '?' | '#' => break, + '\t' | '\n' | '\r' => has_ignored_chars = true, + _ => non_ignored_chars += 1, + } + bytes += c.len_utf8(); + } + let replaced: String; + let host_str; + let mut remaining = input.clone(); + { + let host_input = remaining.by_ref().take(non_ignored_chars); + if has_ignored_chars { + replaced = host_input.collect(); + host_str = &*replaced + } else { + for _ in host_input {} + host_str = &input_str[..bytes] + } + } + if is_windows_drive_letter(host_str) { + return Ok((false, HostInternal::None, input)) + } + let host = if host_str.is_empty() { + HostInternal::None + } else { + match try!(Host::parse(host_str)) { + Host::Domain(ref d) if d == "localhost" => HostInternal::None, + host => { + write!(&mut self.serialization, "{}", host).unwrap(); + host.into() + } + } + }; + Ok((true, host, remaining)) + } + + pub fn parse_port<'i, P>(mut input: Input<'i>, default_port: P, + context: Context) + -> ParseResult<(Option<u16>, Input<'i>)> + where P: Fn() -> Option<u16> { + let mut port: u32 = 0; + let mut has_any_digit = false; + while let (Some(c), remaining) = input.split_first() { + if let Some(digit) = c.to_digit(10) { + port = port * 10 + digit; + if port > ::std::u16::MAX as u32 { + return Err(ParseError::InvalidPort) + } + has_any_digit = true; + } else if context == Context::UrlParser && !matches!(c, '/' | '\\' | '?' | '#') { + return Err(ParseError::InvalidPort) + } else { + break + } + input = remaining; + } + let mut opt_port = Some(port as u16); + if !has_any_digit || opt_port == default_port() { + opt_port = None; + } + return Ok((opt_port, input)) + } + + pub fn parse_path_start<'i>(&mut self, scheme_type: SchemeType, has_host: &mut bool, + mut input: Input<'i>) + -> Input<'i> { + // Path start state + match input.split_first() { + (Some('/'), remaining) => input = remaining, + (Some('\\'), remaining) => if scheme_type.is_special() { + self.syntax_violation("backslash"); + input = remaining + }, + _ => {} + } + let path_start = self.serialization.len(); + self.serialization.push('/'); + self.parse_path(scheme_type, has_host, path_start, input) + } + + pub fn parse_path<'i>(&mut self, scheme_type: SchemeType, has_host: &mut bool, + path_start: usize, mut input: Input<'i>) + -> Input<'i> { + // Relative path state + debug_assert!(self.serialization.ends_with("/")); + loop { + let segment_start = self.serialization.len(); + let mut ends_with_slash = false; + loop { + let input_before_c = input.clone(); + let (c, utf8_c) = if let Some(x) = input.next_utf8() { x } else { break }; + match c { + '/' if self.context != Context::PathSegmentSetter => { + ends_with_slash = true; + break + }, + '\\' if self.context != Context::PathSegmentSetter && + scheme_type.is_special() => { + self.syntax_violation("backslash"); + ends_with_slash = true; + break + }, + '?' | '#' if self.context == Context::UrlParser => { + input = input_before_c; + break + }, + _ => { + self.check_url_code_point(c, &input); + if c == '%' { + let after_percent_sign = input.clone(); + if matches!(input.next(), Some('2')) && + matches!(input.next(), Some('E') | Some('e')) { + self.serialization.push('.'); + continue + } + input = after_percent_sign + } + if self.context == Context::PathSegmentSetter { + self.serialization.extend(utf8_percent_encode( + utf8_c, PATH_SEGMENT_ENCODE_SET)); + } else { + self.serialization.extend(utf8_percent_encode( + utf8_c, DEFAULT_ENCODE_SET)); + } + } + } + } + match &self.serialization[segment_start..] { + ".." => { + debug_assert!(self.serialization.as_bytes()[segment_start - 1] == b'/'); + self.serialization.truncate(segment_start - 1); // Truncate "/.." + self.pop_path(scheme_type, path_start); + if !self.serialization[path_start..].ends_with("/") { + self.serialization.push('/') + } + }, + "." => { + self.serialization.truncate(segment_start); + }, + _ => { + if scheme_type.is_file() && is_windows_drive_letter( + &self.serialization[path_start + 1..] + ) { + if self.serialization.ends_with('|') { + self.serialization.pop(); + self.serialization.push(':'); + } + if *has_host { + self.syntax_violation("file: with host and Windows drive letter"); + *has_host = false; // FIXME account for this in callers + } + } + if ends_with_slash { + self.serialization.push('/') + } + } + } + if !ends_with_slash { + break + } + } + input + } + + /// https://url.spec.whatwg.org/#pop-a-urls-path + fn pop_path(&mut self, scheme_type: SchemeType, path_start: usize) { + if self.serialization.len() > path_start { + let slash_position = self.serialization[path_start..].rfind('/').unwrap(); + // + 1 since rfind returns the position before the slash. + let segment_start = path_start + slash_position + 1; + // Don’t pop a Windows drive letter + // FIXME: *normalized* Windows drive letter + if !( + scheme_type.is_file() && + is_windows_drive_letter(&self.serialization[segment_start..]) + ) { + self.serialization.truncate(segment_start); + } + } + + } + + pub fn parse_cannot_be_a_base_path<'i>(&mut self, mut input: Input<'i>) -> Input<'i> { + loop { + let input_before_c = input.clone(); + match input.next_utf8() { + Some(('?', _)) | Some(('#', _)) if self.context == Context::UrlParser => { + return input_before_c + } + Some((c, utf8_c)) => { + self.check_url_code_point(c, &input); + self.serialization.extend(utf8_percent_encode( + utf8_c, SIMPLE_ENCODE_SET)); + } + None => return input + } + } + } + + fn with_query_and_fragment(mut self, scheme_end: u32, username_end: u32, + host_start: u32, host_end: u32, host: HostInternal, + port: Option<u16>, path_start: u32, remaining: Input) + -> ParseResult<Url> { + let (query_start, fragment_start) = + try!(self.parse_query_and_fragment(scheme_end, remaining)); + Ok(Url { + serialization: self.serialization, + scheme_end: scheme_end, + username_end: username_end, + host_start: host_start, + host_end: host_end, + host: host, + port: port, + path_start: path_start, + query_start: query_start, + fragment_start: fragment_start + }) + } + + /// Return (query_start, fragment_start) + fn parse_query_and_fragment(&mut self, scheme_end: u32, mut input: Input) + -> ParseResult<(Option<u32>, Option<u32>)> { + let mut query_start = None; + match input.next() { + Some('#') => {} + Some('?') => { + query_start = Some(try!(to_u32(self.serialization.len()))); + self.serialization.push('?'); + let remaining = self.parse_query(scheme_end, input); + if let Some(remaining) = remaining { + input = remaining + } else { + return Ok((query_start, None)) + } + } + None => return Ok((None, None)), + _ => panic!("Programming error. parse_query_and_fragment() called without ? or # {:?}") + } + + let fragment_start = try!(to_u32(self.serialization.len())); + self.serialization.push('#'); + self.parse_fragment(input); + Ok((query_start, Some(fragment_start))) + } + + pub fn parse_query<'i>(&mut self, scheme_end: u32, mut input: Input<'i>) + -> Option<Input<'i>> { + let mut query = String::new(); // FIXME: use a streaming decoder instead + let mut remaining = None; + while let Some(c) = input.next() { + if c == '#' && self.context == Context::UrlParser { + remaining = Some(input); + break + } else { + self.check_url_code_point(c, &input); + query.push(c); + } + } + + let encoding = match &self.serialization[..scheme_end as usize] { + "http" | "https" | "file" | "ftp" | "gopher" => self.query_encoding_override, + _ => EncodingOverride::utf8(), + }; + let query_bytes = encoding.encode(query.into()); + self.serialization.extend(percent_encode(&query_bytes, QUERY_ENCODE_SET)); + remaining + } + + fn fragment_only(mut self, base_url: &Url, mut input: Input) -> ParseResult<Url> { + let before_fragment = match base_url.fragment_start { + Some(i) => base_url.slice(..i), + None => &*base_url.serialization, + }; + debug_assert!(self.serialization.is_empty()); + self.serialization.reserve(before_fragment.len() + input.chars.as_str().len()); + self.serialization.push_str(before_fragment); + self.serialization.push('#'); + let next = input.next(); + debug_assert!(next == Some('#')); + self.parse_fragment(input); + Ok(Url { + serialization: self.serialization, + fragment_start: Some(try!(to_u32(before_fragment.len()))), + ..*base_url + }) + } + + pub fn parse_fragment(&mut self, mut input: Input) { + while let Some(c) = input.next() { + if c == '\0' { + self.syntax_violation("NULL characters are ignored in URL fragment identifiers") + } else { + self.check_url_code_point(c, &input); + self.serialization.push(c); // No percent-encoding here. + } + } + } + + fn check_url_code_point(&self, c: char, input: &Input) { + if let Some(log) = self.log_syntax_violation { + if c == '%' { + let mut input = input.clone(); + if !matches!((input.next(), input.next()), (Some(a), Some(b)) + if is_ascii_hex_digit(a) && is_ascii_hex_digit(b)) { + log("expected 2 hex digits after %") + } + } else if !is_url_code_point(c) { + log("non-URL code point") + } + } + } +} + +#[inline] +fn is_ascii_hex_digit(c: char) -> bool { + matches!(c, 'a'...'f' | 'A'...'F' | '0'...'9') +} + +// Non URL code points: +// U+0000 to U+0020 (space) +// " # % < > [ \ ] ^ ` { | } +// U+007F to U+009F +// surrogates +// U+FDD0 to U+FDEF +// Last two of each plane: U+__FFFE to U+__FFFF for __ in 00 to 10 hex +#[inline] +fn is_url_code_point(c: char) -> bool { + matches!(c, + 'a'...'z' | + 'A'...'Z' | + '0'...'9' | + '!' | '$' | '&' | '\'' | '(' | ')' | '*' | '+' | ',' | '-' | + '.' | '/' | ':' | ';' | '=' | '?' | '@' | '_' | '~' | + '\u{A0}'...'\u{D7FF}' | '\u{E000}'...'\u{FDCF}' | '\u{FDF0}'...'\u{FFFD}' | + '\u{10000}'...'\u{1FFFD}' | '\u{20000}'...'\u{2FFFD}' | + '\u{30000}'...'\u{3FFFD}' | '\u{40000}'...'\u{4FFFD}' | + '\u{50000}'...'\u{5FFFD}' | '\u{60000}'...'\u{6FFFD}' | + '\u{70000}'...'\u{7FFFD}' | '\u{80000}'...'\u{8FFFD}' | + '\u{90000}'...'\u{9FFFD}' | '\u{A0000}'...'\u{AFFFD}' | + '\u{B0000}'...'\u{BFFFD}' | '\u{C0000}'...'\u{CFFFD}' | + '\u{D0000}'...'\u{DFFFD}' | '\u{E1000}'...'\u{EFFFD}' | + '\u{F0000}'...'\u{FFFFD}' | '\u{100000}'...'\u{10FFFD}') +} + +/// https://url.spec.whatwg.org/#c0-controls-and-space +#[inline] +fn c0_control_or_space(ch: char) -> bool { + ch <= ' ' // U+0000 to U+0020 +} + +/// https://url.spec.whatwg.org/#ascii-alpha +#[inline] +pub fn ascii_alpha(ch: char) -> bool { + matches!(ch, 'a'...'z' | 'A'...'Z') +} + +#[inline] +pub fn to_u32(i: usize) -> ParseResult<u32> { + if i <= ::std::u32::MAX as usize { + Ok(i as u32) + } else { + Err(ParseError::Overflow) + } +} + +/// Wether the scheme is file:, the path has a single segment, and that segment +/// is a Windows drive letter +fn is_windows_drive_letter(segment: &str) -> bool { + segment.len() == 2 + && starts_with_windows_drive_letter(segment) +} + +fn starts_with_windows_drive_letter(s: &str) -> bool { + ascii_alpha(s.as_bytes()[0] as char) + && matches!(s.as_bytes()[1], b':' | b'|') +} + +fn starts_with_windows_drive_letter_segment(input: &Input) -> bool { + let mut input = input.clone(); + matches!((input.next(), input.next(), input.next()), (Some(a), Some(b), Some(c)) + if ascii_alpha(a) && matches!(b, ':' | '|') && matches!(c, '/' | '\\' | '?' | '#')) +} diff --git a/deps/url-1.1.0/src/path_segments.rs b/deps/url-1.1.0/src/path_segments.rs new file mode 100644 index 000000000..a624ff39b --- /dev/null +++ b/deps/url-1.1.0/src/path_segments.rs @@ -0,0 +1,186 @@ +// Copyright 2016 The rust-url developers. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +use parser::{self, SchemeType}; +use std::str; +use Url; + +/// Exposes methods to manipulate the path of an URL that is not cannot-be-base. +/// +/// The path always starts with a `/` slash, and is made of slash-separated segments. +/// There is always at least one segment (which may be the empty string). +/// +/// Examples: +/// +/// ```rust +/// # use url::Url; +/// let mut url = Url::parse("mailto:me@example.com").unwrap(); +/// assert!(url.path_segments_mut().is_err()); +/// +/// let mut url = Url::parse("http://example.net/foo/index.html").unwrap(); +/// url.path_segments_mut().unwrap().pop().push("img").push("2/100%.png"); +/// assert_eq!(url.as_str(), "http://example.net/foo/img/2%2F100%25.png"); +/// ``` +pub struct PathSegmentsMut<'a> { + url: &'a mut Url, + after_first_slash: usize, + after_path: String, + old_after_path_position: u32, +} + +// Not re-exported outside the crate +pub fn new(url: &mut Url) -> PathSegmentsMut { + let (old_after_path_position, after_path) = url.take_after_path(); + debug_assert!(url.byte_at(url.path_start) == b'/'); + PathSegmentsMut { + after_first_slash: url.path_start as usize + "/".len(), + url: url, + old_after_path_position: old_after_path_position, + after_path: after_path, + } +} + +impl<'a> Drop for PathSegmentsMut<'a> { + fn drop(&mut self) { + self.url.restore_after_path(self.old_after_path_position, &self.after_path) + } +} + +impl<'a> PathSegmentsMut<'a> { + /// Remove all segments in the path, leaving the minimal `url.path() == "/"`. + /// + /// Returns `&mut Self` so that method calls can be chained. + /// + /// Example: + /// + /// ```rust + /// # use url::Url; + /// let mut url = Url::parse("https://github.com/servo/rust-url/").unwrap(); + /// url.path_segments_mut().unwrap().clear().push("logout"); + /// assert_eq!(url.as_str(), "https://github.com/logout"); + /// ``` + pub fn clear(&mut self) -> &mut Self { + self.url.serialization.truncate(self.after_first_slash); + self + } + + /// Remove the last segment of this URL’s path if it is empty, + /// except if these was only one segment to begin with. + /// + /// In other words, remove one path trailing slash, if any, + /// unless it is also the initial slash (so this does nothing if `url.path() == "/")`. + /// + /// Returns `&mut Self` so that method calls can be chained. + /// + /// Example: + /// + /// ```rust + /// # use url::Url; + /// let mut url = Url::parse("https://github.com/servo/rust-url/").unwrap(); + /// url.path_segments_mut().unwrap().push("pulls"); + /// assert_eq!(url.as_str(), "https://github.com/servo/rust-url//pulls"); + /// + /// let mut url = Url::parse("https://github.com/servo/rust-url/").unwrap(); + /// url.path_segments_mut().unwrap().pop_if_empty().push("pulls"); + /// assert_eq!(url.as_str(), "https://github.com/servo/rust-url/pulls"); + /// ``` + pub fn pop_if_empty(&mut self) -> &mut Self { + if self.url.serialization[self.after_first_slash..].ends_with('/') { + self.url.serialization.pop(); + } + self + } + + /// Remove the last segment of this URL’s path. + /// + /// If the path only has one segment, make it empty such that `url.path() == "/"`. + /// + /// Returns `&mut Self` so that method calls can be chained. + pub fn pop(&mut self) -> &mut Self { + let last_slash = self.url.serialization[self.after_first_slash..].rfind('/').unwrap_or(0); + self.url.serialization.truncate(self.after_first_slash + last_slash); + self + } + + /// Append the given segment at the end of this URL’s path. + /// + /// See the documentation for `.extend()`. + /// + /// Returns `&mut Self` so that method calls can be chained. + pub fn push(&mut self, segment: &str) -> &mut Self { + self.extend(Some(segment)) + } + + /// Append each segment from the given iterator at the end of this URL’s path. + /// + /// Each segment is percent-encoded like in `Url::parse` or `Url::join`, + /// except that `%` and `/` characters are also encoded (to `%25` and `%2F`). + /// This is unlike `Url::parse` where `%` is left as-is in case some of the input + /// is already percent-encoded, and `/` denotes a path segment separator.) + /// + /// Note that, in addition to slashes between new segments, + /// this always adds a slash between the existing path and the new segments + /// *except* if the existing path is `"/"`. + /// If the previous last segment was empty (if the path had a trailing slash) + /// the path after `.extend()` will contain two consecutive slashes. + /// If that is undesired, call `.pop_if_empty()` first. + /// + /// To obtain a behavior similar to `Url::join`, call `.pop()` unconditionally first. + /// + /// Returns `&mut Self` so that method calls can be chained. + /// + /// Example: + /// + /// ```rust + /// # use url::Url; + /// let mut url = Url::parse("https://github.com/").unwrap(); + /// let org = "servo"; + /// let repo = "rust-url"; + /// let issue_number = "188"; + /// url.path_segments_mut().unwrap().extend(&[org, repo, "issues", issue_number]); + /// assert_eq!(url.as_str(), "https://github.com/servo/rust-url/issues/188"); + /// ``` + /// + /// In order to make sure that parsing the serialization of an URL gives the same URL, + /// a segment is ignored if it is `"."` or `".."`: + /// + /// ```rust + /// # use url::Url; + /// let mut url = Url::parse("https://github.com/servo").unwrap(); + /// url.path_segments_mut().unwrap().extend(&["..", "rust-url", ".", "pulls"]); + /// assert_eq!(url.as_str(), "https://github.com/servo/rust-url/pulls"); + /// ``` + pub fn extend<I>(&mut self, segments: I) -> &mut Self + where I: IntoIterator, I::Item: AsRef<str> { + let scheme_type = SchemeType::from(self.url.scheme()); + let path_start = self.url.path_start as usize; + self.url.mutate(|parser| { + parser.context = parser::Context::PathSegmentSetter; + for segment in segments { + let segment = segment.as_ref(); + if matches!(segment, "." | "..") { + continue + } + if parser.serialization.len() > path_start + 1 { + parser.serialization.push('/'); + } + let mut has_host = true; // FIXME account for this? + parser.parse_path(scheme_type, &mut has_host, path_start, + parser::Input::new(segment)); + } + }); + self + } + + /// For internal testing, not part of the public API. + #[doc(hidden)] + pub fn assert_url_invariants(&mut self) -> &mut Self { + self.url.assert_invariants(); + self + } +} diff --git a/deps/url-1.1.0/src/percent_encoding.rs b/deps/url-1.1.0/src/percent_encoding.rs new file mode 100644 index 000000000..72b47245d --- /dev/null +++ b/deps/url-1.1.0/src/percent_encoding.rs @@ -0,0 +1,344 @@ +// Copyright 2013-2016 The rust-url developers. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +use encoding; +use std::ascii::AsciiExt; +use std::borrow::Cow; +use std::fmt::{self, Write}; +use std::slice; +use std::str; + +/// Represents a set of characters / bytes that should be percent-encoded. +/// +/// See [encode sets specification](http://url.spec.whatwg.org/#simple-encode-set). +/// +/// Different characters need to be encoded in different parts of an URL. +/// For example, a literal `?` question mark in an URL’s path would indicate +/// the start of the query string. +/// A question mark meant to be part of the path therefore needs to be percent-encoded. +/// In the query string however, a question mark does not have any special meaning +/// and does not need to be percent-encoded. +/// +/// A few sets are defined in this module. +/// Use the [`define_encode_set!`](../macro.define_encode_set!.html) macro to define different ones. +pub trait EncodeSet: Clone { + /// Called with UTF-8 bytes rather than code points. + /// Should return true for all non-ASCII bytes. + fn contains(&self, byte: u8) -> bool; +} + +/// Define a new struct +/// that implements the [`EncodeSet`](percent_encoding/trait.EncodeSet.html) trait, +/// for use in [`percent_decode()`](percent_encoding/fn.percent_encode.html) +/// and related functions. +/// +/// Parameters are characters to include in the set in addition to those of the base set. +/// See [encode sets specification](http://url.spec.whatwg.org/#simple-encode-set). +/// +/// Example +/// ======= +/// +/// ```rust +/// #[macro_use] extern crate url; +/// use url::percent_encoding::{utf8_percent_encode, SIMPLE_ENCODE_SET}; +/// define_encode_set! { +/// /// This encode set is used in the URL parser for query strings. +/// pub QUERY_ENCODE_SET = [SIMPLE_ENCODE_SET] | {' ', '"', '#', '<', '>'} +/// } +/// # fn main() { +/// assert_eq!(utf8_percent_encode("foo bar", QUERY_ENCODE_SET).collect::<String>(), "foo%20bar"); +/// # } +/// ``` +#[macro_export] +macro_rules! define_encode_set { + ($(#[$attr: meta])* pub $name: ident = [$base_set: expr] | {$($ch: pat),*}) => { + $(#[$attr])* + #[derive(Copy, Clone)] + #[allow(non_camel_case_types)] + pub struct $name; + + impl $crate::percent_encoding::EncodeSet for $name { + #[inline] + fn contains(&self, byte: u8) -> bool { + match byte as char { + $( + $ch => true, + )* + _ => $base_set.contains(byte) + } + } + } + } +} + +/// This encode set is used for the path of cannot-be-a-base URLs. +#[derive(Copy, Clone)] +#[allow(non_camel_case_types)] +pub struct SIMPLE_ENCODE_SET; + +impl EncodeSet for SIMPLE_ENCODE_SET { + #[inline] + fn contains(&self, byte: u8) -> bool { + byte < 0x20 || byte > 0x7E + } +} + +define_encode_set! { + /// This encode set is used in the URL parser for query strings. + pub QUERY_ENCODE_SET = [SIMPLE_ENCODE_SET] | {' ', '"', '#', '<', '>'} +} + +define_encode_set! { + /// This encode set is used for path components. + pub DEFAULT_ENCODE_SET = [QUERY_ENCODE_SET] | {'`', '?', '{', '}'} +} + +define_encode_set! { + /// This encode set is used for on '/'-separated path segment + pub PATH_SEGMENT_ENCODE_SET = [DEFAULT_ENCODE_SET] | {'%', '/'} +} + +define_encode_set! { + /// This encode set is used for username and password. + pub USERINFO_ENCODE_SET = [DEFAULT_ENCODE_SET] | { + '/', ':', ';', '=', '@', '[', '\\', ']', '^', '|' + } +} + +/// Return the percent-encoding of the given bytes. +/// +/// This is unconditional, unlike `percent_encode()` which uses an encode set. +pub fn percent_encode_byte(byte: u8) -> &'static str { + let index = usize::from(byte) * 3; + &"\ + %00%01%02%03%04%05%06%07%08%09%0A%0B%0C%0D%0E%0F\ + %10%11%12%13%14%15%16%17%18%19%1A%1B%1C%1D%1E%1F\ + %20%21%22%23%24%25%26%27%28%29%2A%2B%2C%2D%2E%2F\ + %30%31%32%33%34%35%36%37%38%39%3A%3B%3C%3D%3E%3F\ + %40%41%42%43%44%45%46%47%48%49%4A%4B%4C%4D%4E%4F\ + %50%51%52%53%54%55%56%57%58%59%5A%5B%5C%5D%5E%5F\ + %60%61%62%63%64%65%66%67%68%69%6A%6B%6C%6D%6E%6F\ + %70%71%72%73%74%75%76%77%78%79%7A%7B%7C%7D%7E%7F\ + %80%81%82%83%84%85%86%87%88%89%8A%8B%8C%8D%8E%8F\ + %90%91%92%93%94%95%96%97%98%99%9A%9B%9C%9D%9E%9F\ + %A0%A1%A2%A3%A4%A5%A6%A7%A8%A9%AA%AB%AC%AD%AE%AF\ + %B0%B1%B2%B3%B4%B5%B6%B7%B8%B9%BA%BB%BC%BD%BE%BF\ + %C0%C1%C2%C3%C4%C5%C6%C7%C8%C9%CA%CB%CC%CD%CE%CF\ + %D0%D1%D2%D3%D4%D5%D6%D7%D8%D9%DA%DB%DC%DD%DE%DF\ + %E0%E1%E2%E3%E4%E5%E6%E7%E8%E9%EA%EB%EC%ED%EE%EF\ + %F0%F1%F2%F3%F4%F5%F6%F7%F8%F9%FA%FB%FC%FD%FE%FF\ + "[index..index + 3] +} + +/// Percent-encode the given bytes with the given encode set. +/// +/// The encode set define which bytes (in addition to non-ASCII and controls) +/// need to be percent-encoded. +/// The choice of this set depends on context. +/// For example, `?` needs to be encoded in an URL path but not in a query string. +/// +/// The return value is an iterator of `&str` slices (so it has a `.collect::<String>()` method) +/// that also implements `Display` and `Into<Cow<str>>`. +/// The latter returns `Cow::Borrowed` when none of the bytes in `input` +/// are in the given encode set. +#[inline] +pub fn percent_encode<E: EncodeSet>(input: &[u8], encode_set: E) -> PercentEncode<E> { + PercentEncode { + bytes: input, + encode_set: encode_set, + } +} + +/// Percent-encode the UTF-8 encoding of the given string. +/// +/// See `percent_encode()` for how to use the return value. +#[inline] +pub fn utf8_percent_encode<E: EncodeSet>(input: &str, encode_set: E) -> PercentEncode<E> { + percent_encode(input.as_bytes(), encode_set) +} + +/// The return type of `percent_decode()`. +#[derive(Clone)] +pub struct PercentEncode<'a, E: EncodeSet> { + bytes: &'a [u8], + encode_set: E, +} + +impl<'a, E: EncodeSet> Iterator for PercentEncode<'a, E> { + type Item = &'a str; + + fn next(&mut self) -> Option<&'a str> { + if let Some((&first_byte, remaining)) = self.bytes.split_first() { + if self.encode_set.contains(first_byte) { + self.bytes = remaining; + Some(percent_encode_byte(first_byte)) + } else { + assert!(first_byte.is_ascii()); + for (i, &byte) in remaining.iter().enumerate() { + if self.encode_set.contains(byte) { + // 1 for first_byte + i for previous iterations of this loop + let (unchanged_slice, remaining) = self.bytes.split_at(1 + i); + self.bytes = remaining; + return Some(unsafe { str::from_utf8_unchecked(unchanged_slice) }) + } else { + assert!(byte.is_ascii()); + } + } + let unchanged_slice = self.bytes; + self.bytes = &[][..]; + Some(unsafe { str::from_utf8_unchecked(unchanged_slice) }) + } + } else { + None + } + } + + fn size_hint(&self) -> (usize, Option<usize>) { + if self.bytes.is_empty() { + (0, Some(0)) + } else { + (1, Some(self.bytes.len())) + } + } +} + +impl<'a, E: EncodeSet> fmt::Display for PercentEncode<'a, E> { + fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { + for c in (*self).clone() { + try!(formatter.write_str(c)) + } + Ok(()) + } +} + +impl<'a, E: EncodeSet> From<PercentEncode<'a, E>> for Cow<'a, str> { + fn from(mut iter: PercentEncode<'a, E>) -> Self { + match iter.next() { + None => "".into(), + Some(first) => { + match iter.next() { + None => first.into(), + Some(second) => { + let mut string = first.to_owned(); + string.push_str(second); + string.extend(iter); + string.into() + } + } + } + } + } +} + +/// Percent-decode the given bytes. +/// +/// The return value is an iterator of decoded `u8` bytes +/// that also implements `Into<Cow<u8>>` +/// (which returns `Cow::Borrowed` when `input` contains no percent-encoded sequence) +/// and has `decode_utf8()` and `decode_utf8_lossy()` methods. +#[inline] +pub fn percent_decode<'a>(input: &'a [u8]) -> PercentDecode<'a> { + PercentDecode { + bytes: input.iter() + } +} + +/// The return type of `percent_decode()`. +#[derive(Clone)] +pub struct PercentDecode<'a> { + bytes: slice::Iter<'a, u8>, +} + +fn after_percent_sign(iter: &mut slice::Iter<u8>) -> Option<u8> { + let initial_iter = iter.clone(); + let h = iter.next().and_then(|&b| (b as char).to_digit(16)); + let l = iter.next().and_then(|&b| (b as char).to_digit(16)); + if let (Some(h), Some(l)) = (h, l) { + Some(h as u8 * 0x10 + l as u8) + } else { + *iter = initial_iter; + None + } +} + +impl<'a> Iterator for PercentDecode<'a> { + type Item = u8; + + fn next(&mut self) -> Option<u8> { + self.bytes.next().map(|&byte| { + if byte == b'%' { + after_percent_sign(&mut self.bytes).unwrap_or(byte) + } else { + byte + } + }) + } + + fn size_hint(&self) -> (usize, Option<usize>) { + let bytes = self.bytes.len(); + (bytes / 3, Some(bytes)) + } +} + +impl<'a> From<PercentDecode<'a>> for Cow<'a, [u8]> { + fn from(iter: PercentDecode<'a>) -> Self { + match iter.if_any() { + Some(vec) => Cow::Owned(vec), + None => Cow::Borrowed(iter.bytes.as_slice()), + } + } +} + +impl<'a> PercentDecode<'a> { + /// If the percent-decoding is different from the input, return it as a new bytes vector. + pub fn if_any(&self) -> Option<Vec<u8>> { + let mut bytes_iter = self.bytes.clone(); + while bytes_iter.find(|&&b| b == b'%').is_some() { + if let Some(decoded_byte) = after_percent_sign(&mut bytes_iter) { + let initial_bytes = self.bytes.as_slice(); + let unchanged_bytes_len = initial_bytes.len() - bytes_iter.len() - 3; + let mut decoded = initial_bytes[..unchanged_bytes_len].to_owned(); + decoded.push(decoded_byte); + decoded.extend(PercentDecode { + bytes: bytes_iter + }); + return Some(decoded) + } + } + // Nothing to decode + None + } + + /// Decode the result of percent-decoding as UTF-8. + /// + /// This is return `Err` when the percent-decoded bytes are not well-formed in UTF-8. + pub fn decode_utf8(self) -> Result<Cow<'a, str>, str::Utf8Error> { + match self.clone().into() { + Cow::Borrowed(bytes) => { + match str::from_utf8(bytes) { + Ok(s) => Ok(s.into()), + Err(e) => Err(e), + } + } + Cow::Owned(bytes) => { + match String::from_utf8(bytes) { + Ok(s) => Ok(s.into()), + Err(e) => Err(e.utf8_error()), + } + } + } + } + + /// Decode the result of percent-decoding as UTF-8, lossily. + /// + /// Invalid UTF-8 percent-encoded byte sequences will be replaced � U+FFFD, + /// the replacement character. + pub fn decode_utf8_lossy(self) -> Cow<'a, str> { + encoding::decode_utf8_lossy(self.clone().into()) + } +} diff --git a/deps/url-1.1.0/src/quirks.rs b/deps/url-1.1.0/src/quirks.rs new file mode 100644 index 000000000..9a7537f47 --- /dev/null +++ b/deps/url-1.1.0/src/quirks.rs @@ -0,0 +1,217 @@ +// Copyright 2016 The rust-url developers. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +//! Getters and setters for URL components implemented per https://url.spec.whatwg.org/#api +//! +//! Unless you need to be interoperable with web browsers, +//! you probably want to use `Url` method instead. + +use {Url, Position, Host, ParseError, idna}; +use parser::{Parser, SchemeType, default_port, Context, Input}; + +/// https://url.spec.whatwg.org/#dom-url-domaintoascii +pub fn domain_to_ascii(domain: &str) -> String { + match Host::parse(domain) { + Ok(Host::Domain(domain)) => domain, + _ => String::new(), + } +} + +/// https://url.spec.whatwg.org/#dom-url-domaintounicode +pub fn domain_to_unicode(domain: &str) -> String { + match Host::parse(domain) { + Ok(Host::Domain(ref domain)) => { + let (unicode, _errors) = idna::domain_to_unicode(domain); + unicode + } + _ => String::new(), + } +} + +/// Getter for https://url.spec.whatwg.org/#dom-url-href +pub fn href(url: &Url) -> &str { + url.as_str() +} + +/// Setter for https://url.spec.whatwg.org/#dom-url-href +pub fn set_href(url: &mut Url, value: &str) -> Result<(), ParseError> { + *url = try!(Url::parse(value)); + Ok(()) +} + +/// Getter for https://url.spec.whatwg.org/#dom-url-origin +pub fn origin(url: &Url) -> String { + url.origin().unicode_serialization() +} + +/// Getter for https://url.spec.whatwg.org/#dom-url-protocol +#[inline] +pub fn protocol(url: &Url) -> &str { + &url.as_str()[..url.scheme().len() + ":".len()] +} + +/// Setter for https://url.spec.whatwg.org/#dom-url-protocol +pub fn set_protocol(url: &mut Url, mut new_protocol: &str) -> Result<(), ()> { + // The scheme state in the spec ignores everything after the first `:`, + // but `set_scheme` errors if there is more. + if let Some(position) = new_protocol.find(':') { + new_protocol = &new_protocol[..position]; + } + url.set_scheme(new_protocol) +} + +/// Getter for https://url.spec.whatwg.org/#dom-url-username +#[inline] +pub fn username(url: &Url) -> &str { + url.username() +} + +/// Setter for https://url.spec.whatwg.org/#dom-url-username +pub fn set_username(url: &mut Url, new_username: &str) -> Result<(), ()> { + url.set_username(new_username) +} + +/// Getter for https://url.spec.whatwg.org/#dom-url-password +#[inline] +pub fn password(url: &Url) -> &str { + url.password().unwrap_or("") +} + +/// Setter for https://url.spec.whatwg.org/#dom-url-password +pub fn set_password(url: &mut Url, new_password: &str) -> Result<(), ()> { + url.set_password(if new_password.is_empty() { None } else { Some(new_password) }) +} + +/// Getter for https://url.spec.whatwg.org/#dom-url-host +#[inline] +pub fn host(url: &Url) -> &str { + &url[Position::BeforeHost..Position::AfterPort] +} + +/// Setter for https://url.spec.whatwg.org/#dom-url-host +pub fn set_host(url: &mut Url, new_host: &str) -> Result<(), ()> { + if url.cannot_be_a_base() { + return Err(()) + } + let host; + let opt_port; + { + let scheme = url.scheme(); + let result = Parser::parse_host(Input::new(new_host), SchemeType::from(scheme)); + match result { + Ok((h, remaining)) => { + host = h; + opt_port = if let Some(remaining) = remaining.split_prefix(':') { + Parser::parse_port(remaining, || default_port(scheme), Context::Setter) + .ok().map(|(port, _remaining)| port) + } else { + None + }; + } + Err(_) => return Err(()) + } + } + url.set_host_internal(host, opt_port); + Ok(()) +} + +/// Getter for https://url.spec.whatwg.org/#dom-url-hostname +#[inline] +pub fn hostname(url: &Url) -> &str { + url.host_str().unwrap_or("") +} + +/// Setter for https://url.spec.whatwg.org/#dom-url-hostname +pub fn set_hostname(url: &mut Url, new_hostname: &str) -> Result<(), ()> { + if url.cannot_be_a_base() { + return Err(()) + } + let result = Parser::parse_host(Input::new(new_hostname), SchemeType::from(url.scheme())); + if let Ok((host, _remaining)) = result { + url.set_host_internal(host, None); + Ok(()) + } else { + Err(()) + } +} + +/// Getter for https://url.spec.whatwg.org/#dom-url-port +#[inline] +pub fn port(url: &Url) -> &str { + &url[Position::BeforePort..Position::AfterPort] +} + +/// Setter for https://url.spec.whatwg.org/#dom-url-port +pub fn set_port(url: &mut Url, new_port: &str) -> Result<(), ()> { + let result; + { + // has_host implies !cannot_be_a_base + let scheme = url.scheme(); + if !url.has_host() || scheme == "file" { + return Err(()) + } + result = Parser::parse_port(Input::new(new_port), || default_port(scheme), Context::Setter) + } + if let Ok((new_port, _remaining)) = result { + url.set_port_internal(new_port); + Ok(()) + } else { + Err(()) + } +} + +/// Getter for https://url.spec.whatwg.org/#dom-url-pathname +#[inline] +pub fn pathname(url: &Url) -> &str { + url.path() +} + +/// Setter for https://url.spec.whatwg.org/#dom-url-pathname +pub fn set_pathname(url: &mut Url, new_pathname: &str) { + if !url.cannot_be_a_base() { + url.set_path(new_pathname) + } +} + +/// Getter for https://url.spec.whatwg.org/#dom-url-search +pub fn search(url: &Url) -> &str { + trim(&url[Position::AfterPath..Position::AfterQuery]) +} + +/// Setter for https://url.spec.whatwg.org/#dom-url-search +pub fn set_search(url: &mut Url, new_search: &str) { + url.set_query(match new_search { + "" => None, + _ if new_search.starts_with('?') => Some(&new_search[1..]), + _ => Some(new_search), + }) +} + +/// Getter for https://url.spec.whatwg.org/#dom-url-hash +pub fn hash(url: &Url) -> &str { + trim(&url[Position::AfterQuery..]) +} + +/// Setter for https://url.spec.whatwg.org/#dom-url-hash +pub fn set_hash(url: &mut Url, new_hash: &str) { + if url.scheme() != "javascript" { + url.set_fragment(match new_hash { + "" => None, + _ if new_hash.starts_with('#') => Some(&new_hash[1..]), + _ => Some(new_hash), + }) + } +} + +fn trim(s: &str) -> &str { + if s.len() == 1 { + "" + } else { + s + } +} diff --git a/deps/url-1.1.0/src/slicing.rs b/deps/url-1.1.0/src/slicing.rs new file mode 100644 index 000000000..926f3c796 --- /dev/null +++ b/deps/url-1.1.0/src/slicing.rs @@ -0,0 +1,182 @@ +// Copyright 2016 The rust-url developers. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +use std::ops::{Range, RangeFrom, RangeTo, RangeFull, Index}; +use Url; + +impl Index<RangeFull> for Url { + type Output = str; + fn index(&self, _: RangeFull) -> &str { + &self.serialization + } +} + +impl Index<RangeFrom<Position>> for Url { + type Output = str; + fn index(&self, range: RangeFrom<Position>) -> &str { + &self.serialization[self.index(range.start)..] + } +} + +impl Index<RangeTo<Position>> for Url { + type Output = str; + fn index(&self, range: RangeTo<Position>) -> &str { + &self.serialization[..self.index(range.end)] + } +} + +impl Index<Range<Position>> for Url { + type Output = str; + fn index(&self, range: Range<Position>) -> &str { + &self.serialization[self.index(range.start)..self.index(range.end)] + } +} + +/// Indicates a position within a URL based on its components. +/// +/// A range of positions can be used for slicing `Url`: +/// +/// ```rust +/// # use url::{Url, Position}; +/// # fn something(some_url: Url) { +/// let serialization: &str = &some_url[..]; +/// let serialization_without_fragment: &str = &some_url[..Position::AfterQuery]; +/// let authority: &str = &some_url[Position::BeforeUsername..Position::AfterPort]; +/// let data_url_payload: &str = &some_url[Position::BeforePath..Position::AfterQuery]; +/// let scheme_relative: &str = &some_url[Position::BeforeUsername..]; +/// # } +/// ``` +/// +/// In a pseudo-grammar (where `[`…`]?` makes a sub-sequence optional), +/// URL components and delimiters that separate them are: +/// +/// ```notrust +/// url = +/// scheme ":" +/// [ "//" [ username [ ":" password ]? "@" ]? host [ ":" port ]? ]? +/// path [ "?" query ]? [ "#" fragment ]? +/// ``` +/// +/// When a given component is not present, +/// its "before" and "after" position are the same +/// (so that `&some_url[BeforeFoo..AfterFoo]` is the empty string) +/// and component ordering is preserved +/// (so that a missing query "is between" a path and a fragment). +/// +/// The end of a component and the start of the next are either the same or separate +/// by a delimiter. +/// (Not that the initial `/` of a path is considered part of the path here, not a delimiter.) +/// For example, `&url[..BeforeFragment]` would include a `#` delimiter (if present in `url`), +/// so `&url[..AfterQuery]` might be desired instead. +/// +/// `BeforeScheme` and `AfterFragment` are always the start and end of the entire URL, +/// so `&url[BeforeScheme..X]` is the same as `&url[..X]` +/// and `&url[X..AfterFragment]` is the same as `&url[X..]`. +#[derive(Copy, Clone, Debug)] +pub enum Position { + BeforeScheme, + AfterScheme, + BeforeUsername, + AfterUsername, + BeforePassword, + AfterPassword, + BeforeHost, + AfterHost, + BeforePort, + AfterPort, + BeforePath, + AfterPath, + BeforeQuery, + AfterQuery, + BeforeFragment, + AfterFragment +} + +impl Url { + #[inline] + fn index(&self, position: Position) -> usize { + match position { + Position::BeforeScheme => 0, + + Position::AfterScheme => self.scheme_end as usize, + + Position::BeforeUsername => if self.has_authority() { + self.scheme_end as usize + "://".len() + } else { + debug_assert!(self.byte_at(self.scheme_end) == b':'); + debug_assert!(self.scheme_end + ":".len() as u32 == self.username_end); + self.scheme_end as usize + ":".len() + }, + + Position::AfterUsername => self.username_end as usize, + + Position::BeforePassword => if self.has_authority() && + self.byte_at(self.username_end) == b':' { + self.username_end as usize + ":".len() + } else { + debug_assert!(self.username_end == self.host_start); + self.username_end as usize + }, + + Position::AfterPassword => if self.has_authority() && + self.byte_at(self.username_end) == b':' { + debug_assert!(self.byte_at(self.host_start - "@".len() as u32) == b'@'); + self.host_start as usize - "@".len() + } else { + debug_assert!(self.username_end == self.host_start); + self.host_start as usize + }, + + Position::BeforeHost => self.host_start as usize, + + Position::AfterHost => self.host_end as usize, + + Position::BeforePort => if self.port.is_some() { + debug_assert!(self.byte_at(self.host_end) == b':'); + self.host_end as usize + ":".len() + } else { + self.host_end as usize + }, + + Position::AfterPort => self.path_start as usize, + + Position::BeforePath => self.path_start as usize, + + Position::AfterPath => match (self.query_start, self.fragment_start) { + (Some(q), _) => q as usize, + (None, Some(f)) => f as usize, + (None, None) => self.serialization.len(), + }, + + Position::BeforeQuery => match (self.query_start, self.fragment_start) { + (Some(q), _) => { + debug_assert!(self.byte_at(q) == b'?'); + q as usize + "?".len() + } + (None, Some(f)) => f as usize, + (None, None) => self.serialization.len(), + }, + + Position::AfterQuery => match self.fragment_start { + None => self.serialization.len(), + Some(f) => f as usize, + }, + + Position::BeforeFragment => match self.fragment_start { + Some(f) => { + debug_assert!(self.byte_at(f) == b'#'); + f as usize + "#".len() + } + None => self.serialization.len(), + }, + + Position::AfterFragment => self.serialization.len(), + } + } +} + diff --git a/deps/url-1.1.0/tests/data.rs b/deps/url-1.1.0/tests/data.rs new file mode 100644 index 000000000..b8945aa48 --- /dev/null +++ b/deps/url-1.1.0/tests/data.rs @@ -0,0 +1,193 @@ +// Copyright 2013-2014 The rust-url developers. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +//! Data-driven tests + +extern crate rustc_serialize; +extern crate test; +extern crate url; + +use rustc_serialize::json::{self, Json}; +use url::{Url, quirks}; + + +fn run_parsing(input: String, base: String, expected: Result<ExpectedAttributes, ()>) { + let base = match Url::parse(&base) { + Ok(base) => base, + Err(message) => panic!("Error parsing base {:?}: {}", base, message) + }; + let (url, expected) = match (base.join(&input), expected) { + (Ok(url), Ok(expected)) => (url, expected), + (Err(_), Err(())) => return, + (Err(message), Ok(_)) => panic!("Error parsing URL {:?}: {}", input, message), + (Ok(_), Err(())) => panic!("Expected a parse error for URL {:?}", input), + }; + + url.assert_invariants(); + + macro_rules! assert_eq { + ($expected: expr, $got: expr) => { + { + let expected = $expected; + let got = $got; + assert!(expected == got, "{:?} != {} {:?} for URL {:?}", + got, stringify!($expected), expected, url); + } + } + } + + macro_rules! assert_attributes { + ($($attr: ident)+) => { + { + $( + assert_eq!(expected.$attr, quirks::$attr(&url)); + )+; + } + } + } + + assert_attributes!(href protocol username password host hostname port pathname search hash); + + if let Some(expected_origin) = expected.origin { + assert_eq!(expected_origin, quirks::origin(&url)); + } +} + +struct ExpectedAttributes { + href: String, + origin: Option<String>, + protocol: String, + username: String, + password: String, + host: String, + hostname: String, + port: String, + pathname: String, + search: String, + hash: String, +} + +trait JsonExt { + fn take(&mut self, key: &str) -> Option<Json>; + fn object(self) -> json::Object; + fn string(self) -> String; + fn take_string(&mut self, key: &str) -> String; +} + +impl JsonExt for Json { + fn take(&mut self, key: &str) -> Option<Json> { + self.as_object_mut().unwrap().remove(key) + } + + fn object(self) -> json::Object { + if let Json::Object(o) = self { o } else { panic!("Not a Json::Object") } + } + + fn string(self) -> String { + if let Json::String(s) = self { s } else { panic!("Not a Json::String") } + } + + fn take_string(&mut self, key: &str) -> String { + self.take(key).unwrap().string() + } +} + +fn collect_parsing<F: FnMut(String, test::TestFn)>(add_test: &mut F) { + // Copied form https://github.com/w3c/web-platform-tests/blob/master/url/ + let mut json = Json::from_str(include_str!("urltestdata.json")) + .expect("JSON parse error in urltestdata.json"); + for entry in json.as_array_mut().unwrap() { + if entry.is_string() { + continue // ignore comments + } + let base = entry.take_string("base"); + let input = entry.take_string("input"); + let expected = if entry.find("failure").is_some() { + Err(()) + } else { + Ok(ExpectedAttributes { + href: entry.take_string("href"), + origin: entry.take("origin").map(Json::string), + protocol: entry.take_string("protocol"), + username: entry.take_string("username"), + password: entry.take_string("password"), + host: entry.take_string("host"), + hostname: entry.take_string("hostname"), + port: entry.take_string("port"), + pathname: entry.take_string("pathname"), + search: entry.take_string("search"), + hash: entry.take_string("hash"), + }) + }; + add_test(format!("{:?} @ base {:?}", input, base), + test::TestFn::dyn_test_fn(move || run_parsing(input, base, expected))); + } +} + +fn collect_setters<F>(add_test: &mut F) where F: FnMut(String, test::TestFn) { + let mut json = Json::from_str(include_str!("setters_tests.json")) + .expect("JSON parse error in setters_tests.json"); + + macro_rules! setter { + ($attr: expr, $setter: ident) => {{ + let mut tests = json.take($attr).unwrap(); + for mut test in tests.as_array_mut().unwrap().drain(..) { + let comment = test.take("comment").map(Json::string).unwrap_or(String::new()); + let href = test.take_string("href"); + let new_value = test.take_string("new_value"); + let name = format!("{:?}.{} = {:?} {}", href, $attr, new_value, comment); + let mut expected = test.take("expected").unwrap(); + add_test(name, test::TestFn::dyn_test_fn(move || { + let mut url = Url::parse(&href).unwrap(); + url.assert_invariants(); + let _ = quirks::$setter(&mut url, &new_value); + assert_attributes!(url, expected, + href protocol username password host hostname port pathname search hash); + url.assert_invariants(); + })) + } + }} + } + macro_rules! assert_attributes { + ($url: expr, $expected: expr, $($attr: ident)+) => { + $( + if let Some(value) = $expected.take(stringify!($attr)) { + assert_eq!(quirks::$attr(&$url), value.string()) + } + )+ + } + } + setter!("protocol", set_protocol); + setter!("username", set_username); + setter!("password", set_password); + setter!("hostname", set_hostname); + setter!("host", set_host); + setter!("port", set_port); + setter!("pathname", set_pathname); + setter!("search", set_search); + setter!("hash", set_hash); +} + +fn main() { + let mut tests = Vec::new(); + { + let mut add_one = |name: String, run: test::TestFn| { + tests.push(test::TestDescAndFn { + desc: test::TestDesc { + name: test::DynTestName(name), + ignore: false, + should_panic: test::ShouldPanic::No, + }, + testfn: run, + }) + }; + collect_parsing(&mut add_one); + collect_setters(&mut add_one); + } + test::test_main(&std::env::args().collect::<Vec<_>>(), tests) +} diff --git a/deps/url-1.1.0/tests/setters_tests.json b/deps/url-1.1.0/tests/setters_tests.json new file mode 100644 index 000000000..669cc084a --- /dev/null +++ b/deps/url-1.1.0/tests/setters_tests.json @@ -0,0 +1,1148 @@ +{ + "comment": [ + "## Tests for setters of https://url.spec.whatwg.org/#urlutils-members", + "", + "This file contains a JSON object.", + "Other than 'comment', each key is an attribute of the `URL` interface", + "defined in WHATWG’s URL Standard.", + "The values are arrays of test case objects for that attribute.", + "", + "To run a test case for the attribute `attr`:", + "", + "* Create a new `URL` object with the value for the 'href' key", + " the constructor single parameter. (Without a base URL.)", + " This must not throw.", + "* Set the attribute `attr` to (invoke its setter with)", + " with the value of for 'new_value' key.", + "* The value for the 'expected' key is another object.", + " For each `key` / `value` pair of that object,", + " get the attribute `key` (invoke its getter).", + " The returned string must be equal to `value`.", + "", + "Note: the 'href' setter is already covered by urltestdata.json." + ], + "protocol": [ + { + "comment": "The empty string is not a valid scheme. Setter leaves the URL unchanged.", + "href": "a://example.net", + "new_value": "", + "expected": { + "href": "a://example.net/", + "protocol": "a:" + } + }, + { + "href": "a://example.net", + "new_value": "b", + "expected": { + "href": "b://example.net/", + "protocol": "b:" + } + }, + { + "comment": "Upper-case ASCII is lower-cased", + "href": "a://example.net", + "new_value": "B", + "expected": { + "href": "b://example.net/", + "protocol": "b:" + } + }, + { + "comment": "Non-ASCII is rejected", + "href": "a://example.net", + "new_value": "é", + "expected": { + "href": "a://example.net/", + "protocol": "a:" + } + }, + { + "comment": "No leading digit", + "href": "a://example.net", + "new_value": "0b", + "expected": { + "href": "a://example.net/", + "protocol": "a:" + } + }, + { + "comment": "No leading punctuation", + "href": "a://example.net", + "new_value": "+b", + "expected": { + "href": "a://example.net/", + "protocol": "a:" + } + }, + { + "href": "a://example.net", + "new_value": "bC0+-.", + "expected": { + "href": "bc0+-.://example.net/", + "protocol": "bc0+-.:" + } + }, + { + "comment": "Only some punctuation is acceptable", + "href": "a://example.net", + "new_value": "b,c", + "expected": { + "href": "a://example.net/", + "protocol": "a:" + } + }, + { + "comment": "Non-ASCII is rejected", + "href": "a://example.net", + "new_value": "bé", + "expected": { + "href": "a://example.net/", + "protocol": "a:" + } + }, + { + "comment": "Spec deviation: from special scheme to not is not problematic. https://github.com/whatwg/url/issues/104", + "href": "http://example.net", + "new_value": "b", + "expected": { + "href": "b://example.net/", + "protocol": "b:" + } + }, + { + "comment": "Cannot-be-a-base URL doesn’t have a host, but URL in a special scheme must.", + "href": "mailto:me@example.net", + "new_value": "http", + "expected": { + "href": "mailto:me@example.net", + "protocol": "mailto:" + } + }, + { + "comment": "Spec deviation: from non-special scheme with a host to special is not problematic. https://github.com/whatwg/url/issues/104", + "href": "ssh://me@example.net", + "new_value": "http", + "expected": { + "href": "http://me@example.net/", + "protocol": "http:" + } + }, + { + "comment": "Stuff after the first ':' is ignored", + "href": "http://example.net", + "new_value": "https:foo : bar", + "expected": { + "href": "https://example.net/", + "protocol": "https:" + } + }, + { + "comment": "Stuff after the first ':' is ignored", + "href": "data:text/html,<p>Test", + "new_value": "view-source+data:foo : bar", + "expected": { + "href": "view-source+data:text/html,<p>Test", + "protocol": "view-source+data:" + } + } + ], + "username": [ + { + "comment": "No host means no username", + "href": "file:///home/you/index.html", + "new_value": "me", + "expected": { + "href": "file:///home/you/index.html", + "username": "" + } + }, + { + "comment": "No host means no username", + "href": "unix:/run/foo.socket", + "new_value": "me", + "expected": { + "href": "unix:/run/foo.socket", + "username": "" + } + }, + { + "comment": "Cannot-be-a-base means no username", + "href": "mailto:you@example.net", + "new_value": "me", + "expected": { + "href": "mailto:you@example.net", + "username": "" + } + }, + { + "href": "http://example.net", + "new_value": "me", + "expected": { + "href": "http://me@example.net/", + "username": "me" + } + }, + { + "href": "http://:secret@example.net", + "new_value": "me", + "expected": { + "href": "http://me:secret@example.net/", + "username": "me" + } + }, + { + "href": "http://me@example.net", + "new_value": "", + "expected": { + "href": "http://example.net/", + "username": "" + } + }, + { + "href": "http://me:secret@example.net", + "new_value": "", + "expected": { + "href": "http://:secret@example.net/", + "username": "" + } + }, + { + "comment": "UTF-8 percent encoding with the userinfo encode set.", + "href": "http://example.net", + "new_value": "\u0000\u0001\t\n\r\u001f !\"#$%&'()*+,-./09:;<=>?@AZ[\\]^_`az{|}~\u007f\u0080\u0081Éé", + "expected": { + "href": "http://%00%01%09%0A%0D%1F%20!%22%23$%&'()*+,-.%2F09%3A%3B%3C%3D%3E%3F%40AZ%5B%5C%5D%5E_%60az%7B%7C%7D~%7F%C2%80%C2%81%C3%89%C3%A9@example.net/", + "username": "%00%01%09%0A%0D%1F%20!%22%23$%&'()*+,-.%2F09%3A%3B%3C%3D%3E%3F%40AZ%5B%5C%5D%5E_%60az%7B%7C%7D~%7F%C2%80%C2%81%C3%89%C3%A9" + } + }, + { + "comment": "Bytes already percent-encoded are left as-is.", + "href": "http://example.net", + "new_value": "%c3%89té", + "expected": { + "href": "http://%c3%89t%C3%A9@example.net/", + "username": "%c3%89t%C3%A9" + } + } + ], + "password": [ + { + "comment": "No host means no password", + "href": "file:///home/me/index.html", + "new_value": "secret", + "expected": { + "href": "file:///home/me/index.html", + "password": "" + } + }, + { + "comment": "No host means no password", + "href": "unix:/run/foo.socket", + "new_value": "secret", + "expected": { + "href": "unix:/run/foo.socket", + "password": "" + } + }, + { + "comment": "Cannot-be-a-base means no password", + "href": "mailto:me@example.net", + "new_value": "secret", + "expected": { + "href": "mailto:me@example.net", + "password": "" + } + }, + { + "href": "http://example.net", + "new_value": "secret", + "expected": { + "href": "http://:secret@example.net/", + "password": "secret" + } + }, + { + "href": "http://me@example.net", + "new_value": "secret", + "expected": { + "href": "http://me:secret@example.net/", + "password": "secret" + } + }, + { + "href": "http://:secret@example.net", + "new_value": "", + "expected": { + "href": "http://example.net/", + "password": "" + } + }, + { + "href": "http://me:secret@example.net", + "new_value": "", + "expected": { + "href": "http://me@example.net/", + "password": "" + } + }, + { + "comment": "UTF-8 percent encoding with the userinfo encode set.", + "href": "http://example.net", + "new_value": "\u0000\u0001\t\n\r\u001f !\"#$%&'()*+,-./09:;<=>?@AZ[\\]^_`az{|}~\u007f\u0080\u0081Éé", + "expected": { + "href": "http://:%00%01%09%0A%0D%1F%20!%22%23$%&'()*+,-.%2F09%3A%3B%3C%3D%3E%3F%40AZ%5B%5C%5D%5E_%60az%7B%7C%7D~%7F%C2%80%C2%81%C3%89%C3%A9@example.net/", + "password": "%00%01%09%0A%0D%1F%20!%22%23$%&'()*+,-.%2F09%3A%3B%3C%3D%3E%3F%40AZ%5B%5C%5D%5E_%60az%7B%7C%7D~%7F%C2%80%C2%81%C3%89%C3%A9" + } + }, + { + "comment": "Bytes already percent-encoded are left as-is.", + "href": "http://example.net", + "new_value": "%c3%89té", + "expected": { + "href": "http://:%c3%89t%C3%A9@example.net/", + "password": "%c3%89t%C3%A9" + } + } + ], + "host": [ + { + "comment": "Cannot-be-a-base means no host", + "href": "mailto:me@example.net", + "new_value": "example.com", + "expected": { + "href": "mailto:me@example.net", + "host": "" + } + }, + { + "comment": "Cannot-be-a-base means no password", + "href": "data:text/plain,Stuff", + "new_value": "example.net", + "expected": { + "href": "data:text/plain,Stuff", + "host": "" + } + }, + { + "href": "http://example.net", + "new_value": "example.com:8080", + "expected": { + "href": "http://example.com:8080/", + "host": "example.com:8080", + "hostname": "example.com", + "port": "8080" + } + }, + { + "comment": "Port number is unchanged if not specified in the new value", + "href": "http://example.net:8080", + "new_value": "example.com", + "expected": { + "href": "http://example.com:8080/", + "host": "example.com:8080", + "hostname": "example.com", + "port": "8080" + } + }, + { + "comment": "Port number is removed if empty in the new value: https://github.com/whatwg/url/pull/113", + "href": "http://example.net:8080", + "new_value": "example.com:", + "expected": { + "href": "http://example.com/", + "host": "example.com", + "hostname": "example.com", + "port": "" + } + }, + { + "comment": "The empty host is not valid for special schemes", + "href": "http://example.net", + "new_value": "", + "expected": { + "href": "http://example.net/", + "host": "example.net" + } + }, + { + "comment": "The empty host is OK for non-special schemes", + "href": "view-source+http://example.net/foo", + "new_value": "", + "expected": { + "href": "view-source+http:///foo", + "host": "" + } + }, + { + "comment": "Path-only URLs can gain a host", + "href": "a:/foo", + "new_value": "example.net", + "expected": { + "href": "a://example.net/foo", + "host": "example.net" + } + }, + { + "comment": "Path-only URLs can gain a host", + "href": "a:/foo", + "new_value": "example.net", + "expected": { + "href": "a://example.net/foo", + "host": "example.net" + } + }, + { + "comment": "IPv4 address syntax is normalized", + "href": "http://example.net", + "new_value": "0x7F000001:8080", + "expected": { + "href": "http://127.0.0.1:8080/", + "host": "127.0.0.1:8080", + "hostname": "127.0.0.1", + "port": "8080" + } + }, + { + "comment": "IPv6 address syntax is normalized", + "href": "http://example.net", + "new_value": "[::0:01]:2", + "expected": { + "href": "http://[::1]:2/", + "host": "[::1]:2", + "hostname": "[::1]", + "port": "2" + } + }, + { + "comment": "Default port number is removed", + "href": "http://example.net", + "new_value": "example.com:80", + "expected": { + "href": "http://example.com/", + "host": "example.com", + "hostname": "example.com", + "port": "" + } + }, + { + "comment": "Default port number is removed", + "href": "https://example.net", + "new_value": "example.com:443", + "expected": { + "href": "https://example.com/", + "host": "example.com", + "hostname": "example.com", + "port": "" + } + }, + { + "comment": "Default port number is only removed for the relevant scheme", + "href": "https://example.net", + "new_value": "example.com:80", + "expected": { + "href": "https://example.com:80/", + "host": "example.com:80", + "hostname": "example.com", + "port": "80" + } + }, + { + "comment": "Stuff after a / delimiter is ignored", + "href": "http://example.net/path", + "new_value": "example.com/stuff", + "expected": { + "href": "http://example.com/path", + "host": "example.com", + "hostname": "example.com", + "port": "" + } + }, + { + "comment": "Stuff after a / delimiter is ignored", + "href": "http://example.net/path", + "new_value": "example.com:8080/stuff", + "expected": { + "href": "http://example.com:8080/path", + "host": "example.com:8080", + "hostname": "example.com", + "port": "8080" + } + }, + { + "comment": "Stuff after a ? delimiter is ignored", + "href": "http://example.net/path", + "new_value": "example.com?stuff", + "expected": { + "href": "http://example.com/path", + "host": "example.com", + "hostname": "example.com", + "port": "" + } + }, + { + "comment": "Stuff after a ? delimiter is ignored", + "href": "http://example.net/path", + "new_value": "example.com:8080?stuff", + "expected": { + "href": "http://example.com:8080/path", + "host": "example.com:8080", + "hostname": "example.com", + "port": "8080" + } + }, + { + "comment": "Stuff after a # delimiter is ignored", + "href": "http://example.net/path", + "new_value": "example.com#stuff", + "expected": { + "href": "http://example.com/path", + "host": "example.com", + "hostname": "example.com", + "port": "" + } + }, + { + "comment": "Stuff after a # delimiter is ignored", + "href": "http://example.net/path", + "new_value": "example.com:8080#stuff", + "expected": { + "href": "http://example.com:8080/path", + "host": "example.com:8080", + "hostname": "example.com", + "port": "8080" + } + }, + { + "comment": "Stuff after a \\ delimiter is ignored for special schemes", + "href": "http://example.net/path", + "new_value": "example.com\\stuff", + "expected": { + "href": "http://example.com/path", + "host": "example.com", + "hostname": "example.com", + "port": "" + } + }, + { + "comment": "Stuff after a \\ delimiter is ignored for special schemes", + "href": "http://example.net/path", + "new_value": "example.com:8080\\stuff", + "expected": { + "href": "http://example.com:8080/path", + "host": "example.com:8080", + "hostname": "example.com", + "port": "8080" + } + }, + { + "comment": "\\ is not a delimiter for non-special schemes, and it’s invalid in a domain", + "href": "view-source+http://example.net/path", + "new_value": "example.com\\stuff", + "expected": { + "href": "view-source+http://example.net/path", + "host": "example.net", + "hostname": "example.net", + "port": "" + } + }, + { + "comment": "Anything other than ASCII digit stops the port parser in a setter but is not an error", + "href": "view-source+http://example.net/path", + "new_value": "example.com:8080stuff2", + "expected": { + "href": "view-source+http://example.com:8080/path", + "host": "example.com:8080", + "hostname": "example.com", + "port": "8080" + } + }, + { + "comment": "Anything other than ASCII digit stops the port parser in a setter but is not an error", + "href": "http://example.net/path", + "new_value": "example.com:8080stuff2", + "expected": { + "href": "http://example.com:8080/path", + "host": "example.com:8080", + "hostname": "example.com", + "port": "8080" + } + }, + { + "comment": "Anything other than ASCII digit stops the port parser in a setter but is not an error", + "href": "http://example.net/path", + "new_value": "example.com:8080+2", + "expected": { + "href": "http://example.com:8080/path", + "host": "example.com:8080", + "hostname": "example.com", + "port": "8080" + } + }, + { + "comment": "Port numbers are 16 bit integers", + "href": "http://example.net/path", + "new_value": "example.com:65535", + "expected": { + "href": "http://example.com:65535/path", + "host": "example.com:65535", + "hostname": "example.com", + "port": "65535" + } + }, + { + "comment": "Port numbers are 16 bit integers, overflowing is an error. Hostname is still set, though.", + "href": "http://example.net/path", + "new_value": "example.com:65536", + "expected": { + "href": "http://example.com/path", + "host": "example.com", + "hostname": "example.com", + "port": "" + } + } + ], + "hostname": [ + { + "comment": "Cannot-be-a-base means no host", + "href": "mailto:me@example.net", + "new_value": "example.com", + "expected": { + "href": "mailto:me@example.net", + "host": "" + } + }, + { + "comment": "Cannot-be-a-base means no password", + "href": "data:text/plain,Stuff", + "new_value": "example.net", + "expected": { + "href": "data:text/plain,Stuff", + "host": "" + } + }, + { + "href": "http://example.net:8080", + "new_value": "example.com", + "expected": { + "href": "http://example.com:8080/", + "host": "example.com:8080", + "hostname": "example.com", + "port": "8080" + } + }, + { + "comment": "The empty host is not valid for special schemes", + "href": "http://example.net", + "new_value": "", + "expected": { + "href": "http://example.net/", + "host": "example.net" + } + }, + { + "comment": "The empty host is OK for non-special schemes", + "href": "view-source+http://example.net/foo", + "new_value": "", + "expected": { + "href": "view-source+http:///foo", + "host": "" + } + }, + { + "comment": "Path-only URLs can gain a host", + "href": "a:/foo", + "new_value": "example.net", + "expected": { + "href": "a://example.net/foo", + "host": "example.net" + } + }, + { + "comment": "Path-only URLs can gain a host", + "href": "a:/foo", + "new_value": "example.net", + "expected": { + "href": "a://example.net/foo", + "host": "example.net" + } + }, + { + "comment": "IPv4 address syntax is normalized", + "href": "http://example.net:8080", + "new_value": "0x7F000001", + "expected": { + "href": "http://127.0.0.1:8080/", + "host": "127.0.0.1:8080", + "hostname": "127.0.0.1", + "port": "8080" + } + }, + { + "comment": "IPv6 address syntax is normalized", + "href": "http://example.net", + "new_value": "[::0:01]", + "expected": { + "href": "http://[::1]/", + "host": "[::1]", + "hostname": "[::1]", + "port": "" + } + }, + { + "comment": "Stuff after a : delimiter is ignored", + "href": "http://example.net/path", + "new_value": "example.com:8080", + "expected": { + "href": "http://example.com/path", + "host": "example.com", + "hostname": "example.com", + "port": "" + } + }, + { + "comment": "Stuff after a : delimiter is ignored", + "href": "http://example.net:8080/path", + "new_value": "example.com:", + "expected": { + "href": "http://example.com:8080/path", + "host": "example.com:8080", + "hostname": "example.com", + "port": "8080" + } + }, + { + "comment": "Stuff after a / delimiter is ignored", + "href": "http://example.net/path", + "new_value": "example.com/stuff", + "expected": { + "href": "http://example.com/path", + "host": "example.com", + "hostname": "example.com", + "port": "" + } + }, + { + "comment": "Stuff after a ? delimiter is ignored", + "href": "http://example.net/path", + "new_value": "example.com?stuff", + "expected": { + "href": "http://example.com/path", + "host": "example.com", + "hostname": "example.com", + "port": "" + } + }, + { + "comment": "Stuff after a # delimiter is ignored", + "href": "http://example.net/path", + "new_value": "example.com#stuff", + "expected": { + "href": "http://example.com/path", + "host": "example.com", + "hostname": "example.com", + "port": "" + } + }, + { + "comment": "Stuff after a \\ delimiter is ignored for special schemes", + "href": "http://example.net/path", + "new_value": "example.com\\stuff", + "expected": { + "href": "http://example.com/path", + "host": "example.com", + "hostname": "example.com", + "port": "" + } + }, + { + "comment": "\\ is not a delimiter for non-special schemes, and it’s invalid in a domain", + "href": "view-source+http://example.net/path", + "new_value": "example.com\\stuff", + "expected": { + "href": "view-source+http://example.net/path", + "host": "example.net", + "hostname": "example.net", + "port": "" + } + } + ], + "port": [ + { + "href": "http://example.net", + "new_value": "8080", + "expected": { + "href": "http://example.net:8080/", + "host": "example.net:8080", + "hostname": "example.net", + "port": "8080" + } + }, + { + "comment": "Port number is removed if empty in the new value: https://github.com/whatwg/url/pull/113", + "href": "http://example.net:8080", + "new_value": "", + "expected": { + "href": "http://example.net/", + "host": "example.net", + "hostname": "example.net", + "port": "" + } + }, + { + "comment": "Default port number is removed", + "href": "http://example.net:8080", + "new_value": "80", + "expected": { + "href": "http://example.net/", + "host": "example.net", + "hostname": "example.net", + "port": "" + } + }, + { + "comment": "Default port number is removed", + "href": "https://example.net:4433", + "new_value": "443", + "expected": { + "href": "https://example.net/", + "host": "example.net", + "hostname": "example.net", + "port": "" + } + }, + { + "comment": "Default port number is only removed for the relevant scheme", + "href": "https://example.net", + "new_value": "80", + "expected": { + "href": "https://example.net:80/", + "host": "example.net:80", + "hostname": "example.net", + "port": "80" + } + }, + { + "comment": "Stuff after a / delimiter is ignored", + "href": "http://example.net/path", + "new_value": "8080/stuff", + "expected": { + "href": "http://example.net:8080/path", + "host": "example.net:8080", + "hostname": "example.net", + "port": "8080" + } + }, + { + "comment": "Stuff after a ? delimiter is ignored", + "href": "http://example.net/path", + "new_value": "8080?stuff", + "expected": { + "href": "http://example.net:8080/path", + "host": "example.net:8080", + "hostname": "example.net", + "port": "8080" + } + }, + { + "comment": "Stuff after a # delimiter is ignored", + "href": "http://example.net/path", + "new_value": "8080#stuff", + "expected": { + "href": "http://example.net:8080/path", + "host": "example.net:8080", + "hostname": "example.net", + "port": "8080" + } + }, + { + "comment": "Stuff after a \\ delimiter is ignored for special schemes", + "href": "http://example.net/path", + "new_value": "8080\\stuff", + "expected": { + "href": "http://example.net:8080/path", + "host": "example.net:8080", + "hostname": "example.net", + "port": "8080" + } + }, + { + "comment": "Anything other than ASCII digit stops the port parser in a setter but is not an error", + "href": "view-source+http://example.net/path", + "new_value": "8080stuff2", + "expected": { + "href": "view-source+http://example.net:8080/path", + "host": "example.net:8080", + "hostname": "example.net", + "port": "8080" + } + }, + { + "comment": "Anything other than ASCII digit stops the port parser in a setter but is not an error", + "href": "http://example.net/path", + "new_value": "8080stuff2", + "expected": { + "href": "http://example.net:8080/path", + "host": "example.net:8080", + "hostname": "example.net", + "port": "8080" + } + }, + { + "comment": "Anything other than ASCII digit stops the port parser in a setter but is not an error", + "href": "http://example.net/path", + "new_value": "8080+2", + "expected": { + "href": "http://example.net:8080/path", + "host": "example.net:8080", + "hostname": "example.net", + "port": "8080" + } + }, + { + "comment": "Port numbers are 16 bit integers", + "href": "http://example.net/path", + "new_value": "65535", + "expected": { + "href": "http://example.net:65535/path", + "host": "example.net:65535", + "hostname": "example.net", + "port": "65535" + } + }, + { + "comment": "Port numbers are 16 bit integers, overflowing is an error", + "href": "http://example.net:8080/path", + "new_value": "65536", + "expected": { + "href": "http://example.net:8080/path", + "host": "example.net:8080", + "hostname": "example.net", + "port": "8080" + } + } + ], + "pathname": [ + { + "comment": "Cannot-be-a-base don’t have a path", + "href": "mailto:me@example.net", + "new_value": "/foo", + "expected": { + "href": "mailto:me@example.net", + "pathname": "me@example.net" + } + }, + { + "href": "unix:/run/foo.socket?timeout=10", + "new_value": "/var/log/../run/bar.socket", + "expected": { + "href": "unix:/var/run/bar.socket?timeout=10", + "pathname": "/var/run/bar.socket" + } + }, + { + "href": "https://example.net#nav", + "new_value": "home", + "expected": { + "href": "https://example.net/home#nav", + "pathname": "/home" + } + }, + { + "href": "https://example.net#nav", + "new_value": "../home", + "expected": { + "href": "https://example.net/home#nav", + "pathname": "/home" + } + }, + { + "comment": "\\ is a segment delimiter for 'special' URLs", + "href": "http://example.net/home?lang=fr#nav", + "new_value": "\\a\\%2E\\b\\%2e.\\c", + "expected": { + "href": "http://example.net/a/c?lang=fr#nav", + "pathname": "/a/c" + } + }, + { + "comment": "\\ is *not* a segment delimiter for non-'special' URLs", + "href": "view-source+http://example.net/home?lang=fr#nav", + "new_value": "\\a\\%2E\\b\\%2e.\\c", + "expected": { + "href": "view-source+http://example.net/\\a\\.\\b\\..\\c?lang=fr#nav", + "pathname": "/\\a\\.\\b\\..\\c" + } + }, + { + "comment": "UTF-8 percent encoding with the default encode set. Tabs and newlines are removed. Leading or training C0 controls and space are removed.", + "href": "a:/", + "new_value": "\u0000\u0001\t\n\r\u001f !\u0000\u0001\t\n\r\u001f !\"#$%&'()*+,-./09:;<=>?@AZ[\\]^_`az{|}~\u007f\u0080\u0081Éé", + "expected": { + "href": "a:/!%00%01%1F%20!%22%23$%&'()*+,-./09:;%3C=%3E%3F@AZ[\\]^_%60az%7B|%7D~%7F%C2%80%C2%81%C3%89%C3%A9", + "pathname": "/!%00%01%1F%20!%22%23$%&'()*+,-./09:;%3C=%3E%3F@AZ[\\]^_%60az%7B|%7D~%7F%C2%80%C2%81%C3%89%C3%A9" + } + }, + { + "comment": "Bytes already percent-encoded are left as-is, except %2E.", + "href": "http://example.net", + "new_value": "%2e%2E%c3%89té", + "expected": { + "href": "http://example.net/..%c3%89t%C3%A9", + "pathname": "/..%c3%89t%C3%A9" + } + } + ], + "search": [ + { + "href": "https://example.net#nav", + "new_value": "lang=fr", + "expected": { + "href": "https://example.net/?lang=fr#nav", + "search": "?lang=fr" + } + }, + { + "href": "https://example.net?lang=en-US#nav", + "new_value": "lang=fr", + "expected": { + "href": "https://example.net/?lang=fr#nav", + "search": "?lang=fr" + } + }, + { + "href": "https://example.net?lang=en-US#nav", + "new_value": "?lang=fr", + "expected": { + "href": "https://example.net/?lang=fr#nav", + "search": "?lang=fr" + } + }, + { + "href": "https://example.net?lang=en-US#nav", + "new_value": "??lang=fr", + "expected": { + "href": "https://example.net/??lang=fr#nav", + "search": "??lang=fr" + } + }, + { + "href": "https://example.net?lang=en-US#nav", + "new_value": "?", + "expected": { + "href": "https://example.net/?#nav", + "search": "" + } + }, + { + "href": "https://example.net?lang=en-US#nav", + "new_value": "", + "expected": { + "href": "https://example.net/#nav", + "search": "" + } + }, + { + "href": "https://example.net?lang=en-US", + "new_value": "", + "expected": { + "href": "https://example.net/", + "search": "" + } + }, + { + "href": "https://example.net", + "new_value": "", + "expected": { + "href": "https://example.net/", + "search": "" + } + }, + { + "comment": "UTF-8 percent encoding with the query encode set. Tabs and newlines are removed. Leading or training C0 controls and space are removed.", + "href": "a:/", + "new_value": "\u0000\u0001\t\n\r\u001f !\u0000\u0001\t\n\r\u001f !\"#$%&'()*+,-./09:;<=>?@AZ[\\]^_`az{|}~\u007f\u0080\u0081Éé", + "expected": { + "href": "a:/?!%00%01%1F%20!%22%23$%&'()*+,-./09:;%3C=%3E?@AZ[\\]^_`az{|}~%7F%C2%80%C2%81%C3%89%C3%A9", + "search": "?!%00%01%1F%20!%22%23$%&'()*+,-./09:;%3C=%3E?@AZ[\\]^_`az{|}~%7F%C2%80%C2%81%C3%89%C3%A9" + } + }, + { + "comment": "Bytes already percent-encoded are left as-is", + "href": "http://example.net", + "new_value": "%c3%89té", + "expected": { + "href": "http://example.net/?%c3%89t%C3%A9", + "search": "?%c3%89t%C3%A9" + } + } + ], + "hash": [ + { + "href": "https://example.net", + "new_value": "main", + "expected": { + "href": "https://example.net/#main", + "hash": "#main" + } + }, + { + "href": "https://example.net#nav", + "new_value": "main", + "expected": { + "href": "https://example.net/#main", + "hash": "#main" + } + }, + { + "href": "https://example.net?lang=en-US", + "new_value": "##nav", + "expected": { + "href": "https://example.net/?lang=en-US##nav", + "hash": "##nav" + } + }, + { + "href": "https://example.net?lang=en-US#nav", + "new_value": "#main", + "expected": { + "href": "https://example.net/?lang=en-US#main", + "hash": "#main" + } + }, + { + "href": "https://example.net?lang=en-US#nav", + "new_value": "#", + "expected": { + "href": "https://example.net/?lang=en-US#", + "hash": "" + } + }, + { + "href": "https://example.net?lang=en-US#nav", + "new_value": "", + "expected": { + "href": "https://example.net/?lang=en-US", + "hash": "" + } + }, + { + "comment": "No percent-encoding at all (!); nuls, tabs, and newlines are removed. Leading or training C0 controls and space are removed.", + "href": "a:/", + "new_value": "\u0000\u0001\t\n\r\u001f !\u0000\u0001\t\n\r\u001f !\"#$%&'()*+,-./09:;<=>?@AZ[\\]^_`az{|}~\u007f\u0080\u0081Éé", + "expected": { + "href": "a:/#!\u0001\u001f !\"#$%&'()*+,-./09:;<=>?@AZ[\\]^_`az{|}~\u007f\u0080\u0081Éé", + "hash": "#!\u0001\u001f !\"#$%&'()*+,-./09:;<=>?@AZ[\\]^_`az{|}~\u007f\u0080\u0081Éé" + } + }, + { + "comment": "Bytes already percent-encoded are left as-is", + "href": "http://example.net", + "new_value": "%c3%89té", + "expected": { + "href": "http://example.net/#%c3%89té", + "hash": "#%c3%89té" + } + } + ] +} diff --git a/deps/url-1.1.0/tests/unit.rs b/deps/url-1.1.0/tests/unit.rs new file mode 100644 index 000000000..09df7efa2 --- /dev/null +++ b/deps/url-1.1.0/tests/unit.rs @@ -0,0 +1,261 @@ +// Copyright 2013-2014 The rust-url developers. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +//! Unit tests + +extern crate url; + +use std::borrow::Cow; +use std::net::{Ipv4Addr, Ipv6Addr}; +use std::path::{Path, PathBuf}; +use url::{Host, Url, form_urlencoded}; + +macro_rules! assert_from_file_path { + ($path: expr) => { assert_from_file_path!($path, $path) }; + ($path: expr, $url_path: expr) => {{ + let url = Url::from_file_path(Path::new($path)).unwrap(); + assert_eq!(url.host(), None); + assert_eq!(url.path(), $url_path); + assert_eq!(url.to_file_path(), Ok(PathBuf::from($path))); + }}; +} + + + +#[test] +fn new_file_paths() { + if cfg!(unix) { + assert_eq!(Url::from_file_path(Path::new("relative")), Err(())); + assert_eq!(Url::from_file_path(Path::new("../relative")), Err(())); + } + if cfg!(windows) { + assert_eq!(Url::from_file_path(Path::new("relative")), Err(())); + assert_eq!(Url::from_file_path(Path::new(r"..\relative")), Err(())); + assert_eq!(Url::from_file_path(Path::new(r"\drive-relative")), Err(())); + assert_eq!(Url::from_file_path(Path::new(r"\\ucn\")), Err(())); + } + + if cfg!(unix) { + assert_from_file_path!("/foo/bar"); + assert_from_file_path!("/foo/ba\0r", "/foo/ba%00r"); + assert_from_file_path!("/foo/ba%00r", "/foo/ba%2500r"); + } +} + +#[test] +#[cfg(unix)] +fn new_path_bad_utf8() { + use std::ffi::OsStr; + use std::os::unix::prelude::*; + + let url = Url::from_file_path(Path::new(OsStr::from_bytes(b"/foo/ba\x80r"))).unwrap(); + let os_str = OsStr::from_bytes(b"/foo/ba\x80r"); + assert_eq!(url.to_file_path(), Ok(PathBuf::from(os_str))); +} + +#[test] +fn new_path_windows_fun() { + if cfg!(windows) { + assert_from_file_path!(r"C:\foo\bar", "/C:/foo/bar"); + assert_from_file_path!("C:\\foo\\ba\0r", "/C:/foo/ba%00r"); + + // Invalid UTF-8 + assert!(Url::parse("file:///C:/foo/ba%80r").unwrap().to_file_path().is_err()); + + // test windows canonicalized path + let path = PathBuf::from(r"\\?\C:\foo\bar"); + assert!(Url::from_file_path(path).is_ok()); + } +} + + +#[test] +fn new_directory_paths() { + if cfg!(unix) { + assert_eq!(Url::from_directory_path(Path::new("relative")), Err(())); + assert_eq!(Url::from_directory_path(Path::new("../relative")), Err(())); + + let url = Url::from_directory_path(Path::new("/foo/bar")).unwrap(); + assert_eq!(url.host(), None); + assert_eq!(url.path(), "/foo/bar/"); + } + if cfg!(windows) { + assert_eq!(Url::from_directory_path(Path::new("relative")), Err(())); + assert_eq!(Url::from_directory_path(Path::new(r"..\relative")), Err(())); + assert_eq!(Url::from_directory_path(Path::new(r"\drive-relative")), Err(())); + assert_eq!(Url::from_directory_path(Path::new(r"\\ucn\")), Err(())); + + let url = Url::from_directory_path(Path::new(r"C:\foo\bar")).unwrap(); + assert_eq!(url.host(), None); + assert_eq!(url.path(), "/C:/foo/bar/"); + } +} + +#[test] +fn from_str() { + assert!("http://testing.com/this".parse::<Url>().is_ok()); +} + +#[test] +fn issue_124() { + let url: Url = "file:a".parse().unwrap(); + assert_eq!(url.path(), "/a"); + let url: Url = "file:...".parse().unwrap(); + assert_eq!(url.path(), "/..."); + let url: Url = "file:..".parse().unwrap(); + assert_eq!(url.path(), "/"); +} + +#[test] +fn test_equality() { + use std::hash::{Hash, Hasher, SipHasher}; + + fn check_eq(a: &Url, b: &Url) { + assert_eq!(a, b); + + let mut h1 = SipHasher::new(); + a.hash(&mut h1); + let mut h2 = SipHasher::new(); + b.hash(&mut h2); + assert_eq!(h1.finish(), h2.finish()); + } + + fn url(s: &str) -> Url { + let rv = s.parse().unwrap(); + check_eq(&rv, &rv); + rv + } + + // Doesn't care if default port is given. + let a: Url = url("https://example.com/"); + let b: Url = url("https://example.com:443/"); + check_eq(&a, &b); + + // Different ports + let a: Url = url("http://example.com/"); + let b: Url = url("http://example.com:8080/"); + assert!(a != b, "{:?} != {:?}", a, b); + + // Different scheme + let a: Url = url("http://example.com/"); + let b: Url = url("https://example.com/"); + assert!(a != b); + + // Different host + let a: Url = url("http://foo.com/"); + let b: Url = url("http://bar.com/"); + assert!(a != b); + + // Missing path, automatically substituted. Semantically the same. + let a: Url = url("http://foo.com"); + let b: Url = url("http://foo.com/"); + check_eq(&a, &b); +} + +#[test] +fn host() { + fn assert_host(input: &str, host: Host<&str>) { + assert_eq!(Url::parse(input).unwrap().host(), Some(host)); + } + assert_host("http://www.mozilla.org", Host::Domain("www.mozilla.org")); + assert_host("http://1.35.33.49", Host::Ipv4(Ipv4Addr::new(1, 35, 33, 49))); + assert_host("http://[2001:0db8:85a3:08d3:1319:8a2e:0370:7344]", Host::Ipv6(Ipv6Addr::new( + 0x2001, 0x0db8, 0x85a3, 0x08d3, 0x1319, 0x8a2e, 0x0370, 0x7344))); + assert_host("http://1.35.+33.49", Host::Domain("1.35.+33.49")); + assert_host("http://[::]", Host::Ipv6(Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 0))); + assert_host("http://[::1]", Host::Ipv6(Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 1))); + assert_host("http://0x1.0X23.0x21.061", Host::Ipv4(Ipv4Addr::new(1, 35, 33, 49))); + assert_host("http://0x1232131", Host::Ipv4(Ipv4Addr::new(1, 35, 33, 49))); + assert_host("http://111", Host::Ipv4(Ipv4Addr::new(0, 0, 0, 111))); + assert_host("http://2..2.3", Host::Domain("2..2.3")); + assert!(Url::parse("http://42.0x1232131").is_err()); + assert!(Url::parse("http://192.168.0.257").is_err()); +} + +#[test] +fn host_serialization() { + // libstd’s `Display for Ipv6Addr` serializes 0:0:0:0:0:0:_:_ and 0:0:0:0:0:ffff:_:_ + // using IPv4-like syntax, as suggested in https://tools.ietf.org/html/rfc5952#section-4 + // but https://url.spec.whatwg.org/#concept-ipv6-serializer specifies not to. + + // Not [::0.0.0.2] / [::ffff:0.0.0.2] + assert_eq!(Url::parse("http://[0::2]").unwrap().host_str(), Some("[::2]")); + assert_eq!(Url::parse("http://[0::ffff:0:2]").unwrap().host_str(), Some("[::ffff:0:2]")); +} + +#[test] +fn test_idna() { + assert!("http://goșu.ro".parse::<Url>().is_ok()); + assert_eq!(Url::parse("http://☃.net/").unwrap().host(), Some(Host::Domain("xn--n3h.net"))); +} + +#[test] +fn test_serialization() { + let data = [ + ("http://example.com/", "http://example.com/"), + ("http://addslash.com", "http://addslash.com/"), + ("http://@emptyuser.com/", "http://emptyuser.com/"), + ("http://:@emptypass.com/", "http://:@emptypass.com/"), + ("http://user@user.com/", "http://user@user.com/"), + ("http://user:pass@userpass.com/", "http://user:pass@userpass.com/"), + ("http://slashquery.com/path/?q=something", "http://slashquery.com/path/?q=something"), + ("http://noslashquery.com/path?q=something", "http://noslashquery.com/path?q=something") + ]; + for &(input, result) in &data { + let url = Url::parse(input).unwrap(); + assert_eq!(url.as_str(), result); + } +} + +#[test] +fn test_form_urlencoded() { + let pairs: &[(Cow<str>, Cow<str>)] = &[ + ("foo".into(), "é&".into()), + ("bar".into(), "".into()), + ("foo".into(), "#".into()) + ]; + let encoded = form_urlencoded::Serializer::new(String::new()).extend_pairs(pairs).finish(); + assert_eq!(encoded, "foo=%C3%A9%26&bar=&foo=%23"); + assert_eq!(form_urlencoded::parse(encoded.as_bytes()).collect::<Vec<_>>(), pairs.to_vec()); +} + +#[test] +fn test_form_serialize() { + let encoded = form_urlencoded::Serializer::new(String::new()) + .append_pair("foo", "é&") + .append_pair("bar", "") + .append_pair("foo", "#") + .finish(); + assert_eq!(encoded, "foo=%C3%A9%26&bar=&foo=%23"); +} + +#[test] +/// https://github.com/servo/rust-url/issues/25 +fn issue_25() { + let filename = if cfg!(windows) { r"C:\run\pg.sock" } else { "/run/pg.sock" }; + let mut url = Url::from_file_path(filename).unwrap(); + url.assert_invariants(); + url.set_scheme("postgres").unwrap(); + url.assert_invariants(); + url.set_host(Some("")).unwrap(); + url.assert_invariants(); + url.set_username("me").unwrap(); + url.assert_invariants(); + let expected = format!("postgres://me@/{}run/pg.sock", if cfg!(windows) { "C:/" } else { "" }); + assert_eq!(url.as_str(), expected); +} + +#[test] +/// https://github.com/servo/rust-url/issues/61 +fn issue_61() { + let mut url = Url::parse("http://mozilla.org").unwrap(); + url.set_scheme("https").unwrap(); + assert_eq!(url.port(), None); + assert_eq!(url.port_or_known_default(), Some(443)); + url.assert_invariants(); +} diff --git a/deps/url-1.1.0/tests/urltestdata.json b/deps/url-1.1.0/tests/urltestdata.json new file mode 100644 index 000000000..ee5416ecf --- /dev/null +++ b/deps/url-1.1.0/tests/urltestdata.json @@ -0,0 +1,4277 @@ +[ + "# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/script-tests/segments.js", + { + "input": "http://example\t.\norg", + "base": "http://example.org/foo/bar", + "href": "http://example.org/", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http://user:pass@foo:21/bar;par?b#c", + "base": "http://example.org/foo/bar", + "href": "http://user:pass@foo:21/bar;par?b#c", + "origin": "http://foo:21", + "protocol": "http:", + "username": "user", + "password": "pass", + "host": "foo:21", + "hostname": "foo", + "port": "21", + "pathname": "/bar;par", + "search": "?b", + "hash": "#c" + }, + { + "input": "http:foo.com", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/foo.com", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/foo.com", + "search": "", + "hash": "" + }, + { + "input": "\t :foo.com \n", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/:foo.com", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/:foo.com", + "search": "", + "hash": "" + }, + { + "input": " foo.com ", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/foo.com", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/foo.com", + "search": "", + "hash": "" + }, + { + "input": "a:\t foo.com", + "base": "http://example.org/foo/bar", + "href": "a: foo.com", + "origin": "null", + "protocol": "a:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": " foo.com", + "search": "", + "hash": "" + }, + { + "input": "http://f:21/ b ? d # e ", + "base": "http://example.org/foo/bar", + "href": "http://f:21/%20b%20?%20d%20# e", + "origin": "http://f:21", + "protocol": "http:", + "username": "", + "password": "", + "host": "f:21", + "hostname": "f", + "port": "21", + "pathname": "/%20b%20", + "search": "?%20d%20", + "hash": "# e" + }, + { + "input": "http://f:/c", + "base": "http://example.org/foo/bar", + "href": "http://f/c", + "origin": "http://f", + "protocol": "http:", + "username": "", + "password": "", + "host": "f", + "hostname": "f", + "port": "", + "pathname": "/c", + "search": "", + "hash": "" + }, + { + "input": "http://f:0/c", + "base": "http://example.org/foo/bar", + "href": "http://f:0/c", + "origin": "http://f:0", + "protocol": "http:", + "username": "", + "password": "", + "host": "f:0", + "hostname": "f", + "port": "0", + "pathname": "/c", + "search": "", + "hash": "" + }, + { + "input": "http://f:00000000000000/c", + "base": "http://example.org/foo/bar", + "href": "http://f:0/c", + "origin": "http://f:0", + "protocol": "http:", + "username": "", + "password": "", + "host": "f:0", + "hostname": "f", + "port": "0", + "pathname": "/c", + "search": "", + "hash": "" + }, + { + "input": "http://f:00000000000000000000080/c", + "base": "http://example.org/foo/bar", + "href": "http://f/c", + "origin": "http://f", + "protocol": "http:", + "username": "", + "password": "", + "host": "f", + "hostname": "f", + "port": "", + "pathname": "/c", + "search": "", + "hash": "" + }, + { + "input": "http://f:b/c", + "base": "http://example.org/foo/bar", + "failure": true + }, + { + "input": "http://f: /c", + "base": "http://example.org/foo/bar", + "failure": true + }, + { + "input": "http://f:\n/c", + "base": "http://example.org/foo/bar", + "href": "http://f/c", + "origin": "http://f", + "protocol": "http:", + "username": "", + "password": "", + "host": "f", + "hostname": "f", + "port": "", + "pathname": "/c", + "search": "", + "hash": "" + }, + { + "input": "http://f:fifty-two/c", + "base": "http://example.org/foo/bar", + "failure": true + }, + { + "input": "http://f:999999/c", + "base": "http://example.org/foo/bar", + "failure": true + }, + { + "input": "http://f: 21 / b ? d # e ", + "base": "http://example.org/foo/bar", + "failure": true + }, + { + "input": "", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/bar", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/bar", + "search": "", + "hash": "" + }, + { + "input": " \t", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/bar", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/bar", + "search": "", + "hash": "" + }, + { + "input": ":foo.com/", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/:foo.com/", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/:foo.com/", + "search": "", + "hash": "" + }, + { + "input": ":foo.com\\", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/:foo.com/", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/:foo.com/", + "search": "", + "hash": "" + }, + { + "input": ":", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/:", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/:", + "search": "", + "hash": "" + }, + { + "input": ":a", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/:a", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/:a", + "search": "", + "hash": "" + }, + { + "input": ":/", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/:/", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/:/", + "search": "", + "hash": "" + }, + { + "input": ":\\", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/:/", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/:/", + "search": "", + "hash": "" + }, + { + "input": ":#", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/:#", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/:", + "search": "", + "hash": "" + }, + { + "input": "#", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/bar#", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/bar", + "search": "", + "hash": "" + }, + { + "input": "#/", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/bar#/", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/bar", + "search": "", + "hash": "#/" + }, + { + "input": "#\\", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/bar#\\", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/bar", + "search": "", + "hash": "#\\" + }, + { + "input": "#;?", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/bar#;?", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/bar", + "search": "", + "hash": "#;?" + }, + { + "input": "?", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/bar?", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/bar", + "search": "", + "hash": "" + }, + { + "input": "/", + "base": "http://example.org/foo/bar", + "href": "http://example.org/", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": ":23", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/:23", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/:23", + "search": "", + "hash": "" + }, + { + "input": "/:23", + "base": "http://example.org/foo/bar", + "href": "http://example.org/:23", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/:23", + "search": "", + "hash": "" + }, + { + "input": "::", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/::", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/::", + "search": "", + "hash": "" + }, + { + "input": "::23", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/::23", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/::23", + "search": "", + "hash": "" + }, + { + "input": "foo://", + "base": "http://example.org/foo/bar", + "href": "foo:///", + "origin": "null", + "protocol": "foo:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http://a:b@c:29/d", + "base": "http://example.org/foo/bar", + "href": "http://a:b@c:29/d", + "origin": "http://c:29", + "protocol": "http:", + "username": "a", + "password": "b", + "host": "c:29", + "hostname": "c", + "port": "29", + "pathname": "/d", + "search": "", + "hash": "" + }, + { + "input": "http::@c:29", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/:@c:29", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/:@c:29", + "search": "", + "hash": "" + }, + { + "input": "http://&a:foo(b]c@d:2/", + "base": "http://example.org/foo/bar", + "href": "http://&a:foo(b%5Dc@d:2/", + "origin": "http://d:2", + "protocol": "http:", + "username": "&a", + "password": "foo(b%5Dc", + "host": "d:2", + "hostname": "d", + "port": "2", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http://::@c@d:2", + "base": "http://example.org/foo/bar", + "href": "http://:%3A%40c@d:2/", + "origin": "http://d:2", + "protocol": "http:", + "username": "", + "password": "%3A%40c", + "host": "d:2", + "hostname": "d", + "port": "2", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http://foo.com:b@d/", + "base": "http://example.org/foo/bar", + "href": "http://foo.com:b@d/", + "origin": "http://d", + "protocol": "http:", + "username": "foo.com", + "password": "b", + "host": "d", + "hostname": "d", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http://foo.com/\\@", + "base": "http://example.org/foo/bar", + "href": "http://foo.com//@", + "origin": "http://foo.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "foo.com", + "hostname": "foo.com", + "port": "", + "pathname": "//@", + "search": "", + "hash": "" + }, + { + "input": "http:\\\\foo.com\\", + "base": "http://example.org/foo/bar", + "href": "http://foo.com/", + "origin": "http://foo.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "foo.com", + "hostname": "foo.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http:\\\\a\\b:c\\d@foo.com\\", + "base": "http://example.org/foo/bar", + "href": "http://a/b:c/d@foo.com/", + "origin": "http://a", + "protocol": "http:", + "username": "", + "password": "", + "host": "a", + "hostname": "a", + "port": "", + "pathname": "/b:c/d@foo.com/", + "search": "", + "hash": "" + }, + { + "input": "foo:/", + "base": "http://example.org/foo/bar", + "href": "foo:/", + "origin": "null", + "protocol": "foo:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "foo:/bar.com/", + "base": "http://example.org/foo/bar", + "href": "foo:/bar.com/", + "origin": "null", + "protocol": "foo:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/bar.com/", + "search": "", + "hash": "" + }, + { + "input": "foo://///////", + "base": "http://example.org/foo/bar", + "href": "foo://///////", + "origin": "null", + "protocol": "foo:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "///////", + "search": "", + "hash": "" + }, + { + "input": "foo://///////bar.com/", + "base": "http://example.org/foo/bar", + "href": "foo://///////bar.com/", + "origin": "null", + "protocol": "foo:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "///////bar.com/", + "search": "", + "hash": "" + }, + { + "input": "foo:////://///", + "base": "http://example.org/foo/bar", + "href": "foo:////://///", + "origin": "null", + "protocol": "foo:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "//://///", + "search": "", + "hash": "" + }, + { + "input": "c:/foo", + "base": "http://example.org/foo/bar", + "href": "c:/foo", + "origin": "null", + "protocol": "c:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/foo", + "search": "", + "hash": "" + }, + { + "input": "//foo/bar", + "base": "http://example.org/foo/bar", + "href": "http://foo/bar", + "origin": "http://foo", + "protocol": "http:", + "username": "", + "password": "", + "host": "foo", + "hostname": "foo", + "port": "", + "pathname": "/bar", + "search": "", + "hash": "" + }, + { + "input": "http://foo/path;a??e#f#g", + "base": "http://example.org/foo/bar", + "href": "http://foo/path;a??e#f#g", + "origin": "http://foo", + "protocol": "http:", + "username": "", + "password": "", + "host": "foo", + "hostname": "foo", + "port": "", + "pathname": "/path;a", + "search": "??e", + "hash": "#f#g" + }, + { + "input": "http://foo/abcd?efgh?ijkl", + "base": "http://example.org/foo/bar", + "href": "http://foo/abcd?efgh?ijkl", + "origin": "http://foo", + "protocol": "http:", + "username": "", + "password": "", + "host": "foo", + "hostname": "foo", + "port": "", + "pathname": "/abcd", + "search": "?efgh?ijkl", + "hash": "" + }, + { + "input": "http://foo/abcd#foo?bar", + "base": "http://example.org/foo/bar", + "href": "http://foo/abcd#foo?bar", + "origin": "http://foo", + "protocol": "http:", + "username": "", + "password": "", + "host": "foo", + "hostname": "foo", + "port": "", + "pathname": "/abcd", + "search": "", + "hash": "#foo?bar" + }, + { + "input": "[61:24:74]:98", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/[61:24:74]:98", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/[61:24:74]:98", + "search": "", + "hash": "" + }, + { + "input": "http:[61:27]/:foo", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/[61:27]/:foo", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/[61:27]/:foo", + "search": "", + "hash": "" + }, + { + "input": "http://[1::2]:3:4", + "base": "http://example.org/foo/bar", + "failure": true + }, + { + "input": "http://2001::1", + "base": "http://example.org/foo/bar", + "failure": true + }, + { + "input": "http://2001::1]", + "base": "http://example.org/foo/bar", + "failure": true + }, + { + "input": "http://2001::1]:80", + "base": "http://example.org/foo/bar", + "failure": true + }, + { + "input": "http://[2001::1]", + "base": "http://example.org/foo/bar", + "href": "http://[2001::1]/", + "origin": "http://[2001::1]", + "protocol": "http:", + "username": "", + "password": "", + "host": "[2001::1]", + "hostname": "[2001::1]", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http://[2001::1]:80", + "base": "http://example.org/foo/bar", + "href": "http://[2001::1]/", + "origin": "http://[2001::1]", + "protocol": "http:", + "username": "", + "password": "", + "host": "[2001::1]", + "hostname": "[2001::1]", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http:/example.com/", + "base": "http://example.org/foo/bar", + "href": "http://example.org/example.com/", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/example.com/", + "search": "", + "hash": "" + }, + { + "input": "ftp:/example.com/", + "base": "http://example.org/foo/bar", + "href": "ftp://example.com/", + "origin": "ftp://example.com", + "protocol": "ftp:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "https:/example.com/", + "base": "http://example.org/foo/bar", + "href": "https://example.com/", + "origin": "https://example.com", + "protocol": "https:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "madeupscheme:/example.com/", + "base": "http://example.org/foo/bar", + "href": "madeupscheme:/example.com/", + "origin": "null", + "protocol": "madeupscheme:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/example.com/", + "search": "", + "hash": "" + }, + { + "input": "file:/example.com/", + "base": "http://example.org/foo/bar", + "href": "file:///example.com/", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/example.com/", + "search": "", + "hash": "" + }, + { + "input": "ftps:/example.com/", + "base": "http://example.org/foo/bar", + "href": "ftps:/example.com/", + "origin": "null", + "protocol": "ftps:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/example.com/", + "search": "", + "hash": "" + }, + { + "input": "gopher:/example.com/", + "base": "http://example.org/foo/bar", + "href": "gopher://example.com/", + "origin": "gopher://example.com", + "protocol": "gopher:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "ws:/example.com/", + "base": "http://example.org/foo/bar", + "href": "ws://example.com/", + "origin": "ws://example.com", + "protocol": "ws:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "wss:/example.com/", + "base": "http://example.org/foo/bar", + "href": "wss://example.com/", + "origin": "wss://example.com", + "protocol": "wss:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "data:/example.com/", + "base": "http://example.org/foo/bar", + "href": "data:/example.com/", + "origin": "null", + "protocol": "data:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/example.com/", + "search": "", + "hash": "" + }, + { + "input": "javascript:/example.com/", + "base": "http://example.org/foo/bar", + "href": "javascript:/example.com/", + "origin": "null", + "protocol": "javascript:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/example.com/", + "search": "", + "hash": "" + }, + { + "input": "mailto:/example.com/", + "base": "http://example.org/foo/bar", + "href": "mailto:/example.com/", + "origin": "null", + "protocol": "mailto:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/example.com/", + "search": "", + "hash": "" + }, + { + "input": "http:example.com/", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/example.com/", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/example.com/", + "search": "", + "hash": "" + }, + { + "input": "ftp:example.com/", + "base": "http://example.org/foo/bar", + "href": "ftp://example.com/", + "origin": "ftp://example.com", + "protocol": "ftp:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "https:example.com/", + "base": "http://example.org/foo/bar", + "href": "https://example.com/", + "origin": "https://example.com", + "protocol": "https:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "madeupscheme:example.com/", + "base": "http://example.org/foo/bar", + "href": "madeupscheme:example.com/", + "origin": "null", + "protocol": "madeupscheme:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "example.com/", + "search": "", + "hash": "" + }, + { + "input": "ftps:example.com/", + "base": "http://example.org/foo/bar", + "href": "ftps:example.com/", + "origin": "null", + "protocol": "ftps:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "example.com/", + "search": "", + "hash": "" + }, + { + "input": "gopher:example.com/", + "base": "http://example.org/foo/bar", + "href": "gopher://example.com/", + "origin": "gopher://example.com", + "protocol": "gopher:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "ws:example.com/", + "base": "http://example.org/foo/bar", + "href": "ws://example.com/", + "origin": "ws://example.com", + "protocol": "ws:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "wss:example.com/", + "base": "http://example.org/foo/bar", + "href": "wss://example.com/", + "origin": "wss://example.com", + "protocol": "wss:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "data:example.com/", + "base": "http://example.org/foo/bar", + "href": "data:example.com/", + "origin": "null", + "protocol": "data:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "example.com/", + "search": "", + "hash": "" + }, + { + "input": "javascript:example.com/", + "base": "http://example.org/foo/bar", + "href": "javascript:example.com/", + "origin": "null", + "protocol": "javascript:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "example.com/", + "search": "", + "hash": "" + }, + { + "input": "mailto:example.com/", + "base": "http://example.org/foo/bar", + "href": "mailto:example.com/", + "origin": "null", + "protocol": "mailto:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "example.com/", + "search": "", + "hash": "" + }, + { + "input": "/a/b/c", + "base": "http://example.org/foo/bar", + "href": "http://example.org/a/b/c", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/a/b/c", + "search": "", + "hash": "" + }, + { + "input": "/a/ /c", + "base": "http://example.org/foo/bar", + "href": "http://example.org/a/%20/c", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/a/%20/c", + "search": "", + "hash": "" + }, + { + "input": "/a%2fc", + "base": "http://example.org/foo/bar", + "href": "http://example.org/a%2fc", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/a%2fc", + "search": "", + "hash": "" + }, + { + "input": "/a/%2f/c", + "base": "http://example.org/foo/bar", + "href": "http://example.org/a/%2f/c", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/a/%2f/c", + "search": "", + "hash": "" + }, + { + "input": "#β", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/bar#β", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/bar", + "search": "", + "hash": "#β" + }, + { + "input": "data:text/html,test#test", + "base": "http://example.org/foo/bar", + "href": "data:text/html,test#test", + "origin": "null", + "protocol": "data:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "text/html,test", + "search": "", + "hash": "#test" + }, + "# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/file.html", + { + "input": "file:c:\\foo\\bar.html", + "base": "file:///tmp/mock/path", + "href": "file:///c:/foo/bar.html", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/c:/foo/bar.html", + "search": "", + "hash": "" + }, + { + "input": " File:c|////foo\\bar.html", + "base": "file:///tmp/mock/path", + "href": "file:///c:////foo/bar.html", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/c:////foo/bar.html", + "search": "", + "hash": "" + }, + { + "input": "C|/foo/bar", + "base": "file:///tmp/mock/path", + "href": "file:///C:/foo/bar", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/C:/foo/bar", + "search": "", + "hash": "" + }, + { + "input": "/C|\\foo\\bar", + "base": "file:///tmp/mock/path", + "href": "file:///C:/foo/bar", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/C:/foo/bar", + "search": "", + "hash": "" + }, + { + "input": "//C|/foo/bar", + "base": "file:///tmp/mock/path", + "href": "file:///C:/foo/bar", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/C:/foo/bar", + "search": "", + "hash": "" + }, + { + "input": "//server/file", + "base": "file:///tmp/mock/path", + "href": "file://server/file", + "protocol": "file:", + "username": "", + "password": "", + "host": "server", + "hostname": "server", + "port": "", + "pathname": "/file", + "search": "", + "hash": "" + }, + { + "input": "\\\\server\\file", + "base": "file:///tmp/mock/path", + "href": "file://server/file", + "protocol": "file:", + "username": "", + "password": "", + "host": "server", + "hostname": "server", + "port": "", + "pathname": "/file", + "search": "", + "hash": "" + }, + { + "input": "/\\server/file", + "base": "file:///tmp/mock/path", + "href": "file://server/file", + "protocol": "file:", + "username": "", + "password": "", + "host": "server", + "hostname": "server", + "port": "", + "pathname": "/file", + "search": "", + "hash": "" + }, + { + "input": "file:///foo/bar.txt", + "base": "file:///tmp/mock/path", + "href": "file:///foo/bar.txt", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/foo/bar.txt", + "search": "", + "hash": "" + }, + { + "input": "file:///home/me", + "base": "file:///tmp/mock/path", + "href": "file:///home/me", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/home/me", + "search": "", + "hash": "" + }, + { + "input": "//", + "base": "file:///tmp/mock/path", + "href": "file:///", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "///", + "base": "file:///tmp/mock/path", + "href": "file:///", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "///test", + "base": "file:///tmp/mock/path", + "href": "file:///test", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/test", + "search": "", + "hash": "" + }, + { + "input": "file://test", + "base": "file:///tmp/mock/path", + "href": "file://test/", + "protocol": "file:", + "username": "", + "password": "", + "host": "test", + "hostname": "test", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "file://localhost", + "base": "file:///tmp/mock/path", + "href": "file:///", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "file://localhost/", + "base": "file:///tmp/mock/path", + "href": "file:///", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "file://localhost/test", + "base": "file:///tmp/mock/path", + "href": "file:///test", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/test", + "search": "", + "hash": "" + }, + { + "input": "test", + "base": "file:///tmp/mock/path", + "href": "file:///tmp/mock/test", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/tmp/mock/test", + "search": "", + "hash": "" + }, + { + "input": "file:test", + "base": "file:///tmp/mock/path", + "href": "file:///tmp/mock/test", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/tmp/mock/test", + "search": "", + "hash": "" + }, + "# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/script-tests/path.js", + { + "input": "http://example.com/././foo", + "base": "about:blank", + "href": "http://example.com/foo", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/foo", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/./.foo", + "base": "about:blank", + "href": "http://example.com/.foo", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/.foo", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/foo/.", + "base": "about:blank", + "href": "http://example.com/foo/", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/foo/", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/foo/./", + "base": "about:blank", + "href": "http://example.com/foo/", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/foo/", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/foo/bar/..", + "base": "about:blank", + "href": "http://example.com/foo/", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/foo/", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/foo/bar/../", + "base": "about:blank", + "href": "http://example.com/foo/", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/foo/", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/foo/..bar", + "base": "about:blank", + "href": "http://example.com/foo/..bar", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/foo/..bar", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/foo/bar/../ton", + "base": "about:blank", + "href": "http://example.com/foo/ton", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/foo/ton", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/foo/bar/../ton/../../a", + "base": "about:blank", + "href": "http://example.com/a", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/a", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/foo/../../..", + "base": "about:blank", + "href": "http://example.com/", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/foo/../../../ton", + "base": "about:blank", + "href": "http://example.com/ton", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/ton", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/foo/%2e", + "base": "about:blank", + "href": "http://example.com/foo/", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/foo/", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/foo/%2e%2", + "base": "about:blank", + "href": "http://example.com/foo/.%2", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/foo/.%2", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/foo/%2e./%2e%2e/.%2e/%2e.bar", + "base": "about:blank", + "href": "http://example.com/..bar", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/..bar", + "search": "", + "hash": "" + }, + { + "input": "http://example.com////../..", + "base": "about:blank", + "href": "http://example.com//", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "//", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/foo/bar//../..", + "base": "about:blank", + "href": "http://example.com/foo/", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/foo/", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/foo/bar//..", + "base": "about:blank", + "href": "http://example.com/foo/bar/", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/foo/bar/", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/foo", + "base": "about:blank", + "href": "http://example.com/foo", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/foo", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/%20foo", + "base": "about:blank", + "href": "http://example.com/%20foo", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/%20foo", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/foo%", + "base": "about:blank", + "href": "http://example.com/foo%", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/foo%", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/foo%2", + "base": "about:blank", + "href": "http://example.com/foo%2", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/foo%2", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/foo%2zbar", + "base": "about:blank", + "href": "http://example.com/foo%2zbar", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/foo%2zbar", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/foo%2©zbar", + "base": "about:blank", + "href": "http://example.com/foo%2%C3%82%C2%A9zbar", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/foo%2%C3%82%C2%A9zbar", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/foo%41%7a", + "base": "about:blank", + "href": "http://example.com/foo%41%7a", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/foo%41%7a", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/foo\t\u0091%91", + "base": "about:blank", + "href": "http://example.com/foo%C2%91%91", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/foo%C2%91%91", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/foo%00%51", + "base": "about:blank", + "href": "http://example.com/foo%00%51", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/foo%00%51", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/(%28:%3A%29)", + "base": "about:blank", + "href": "http://example.com/(%28:%3A%29)", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/(%28:%3A%29)", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/%3A%3a%3C%3c", + "base": "about:blank", + "href": "http://example.com/%3A%3a%3C%3c", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/%3A%3a%3C%3c", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/foo\tbar", + "base": "about:blank", + "href": "http://example.com/foobar", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/foobar", + "search": "", + "hash": "" + }, + { + "input": "http://example.com\\\\foo\\\\bar", + "base": "about:blank", + "href": "http://example.com//foo//bar", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "//foo//bar", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/%7Ffp3%3Eju%3Dduvgw%3Dd", + "base": "about:blank", + "href": "http://example.com/%7Ffp3%3Eju%3Dduvgw%3Dd", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/%7Ffp3%3Eju%3Dduvgw%3Dd", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/@asdf%40", + "base": "about:blank", + "href": "http://example.com/@asdf%40", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/@asdf%40", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/你好你好", + "base": "about:blank", + "href": "http://example.com/%E4%BD%A0%E5%A5%BD%E4%BD%A0%E5%A5%BD", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/%E4%BD%A0%E5%A5%BD%E4%BD%A0%E5%A5%BD", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/‥/foo", + "base": "about:blank", + "href": "http://example.com/%E2%80%A5/foo", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/%E2%80%A5/foo", + "search": "", + "hash": "" + }, + { + "input": "http://example.com//foo", + "base": "about:blank", + "href": "http://example.com/%EF%BB%BF/foo", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/%EF%BB%BF/foo", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/‮/foo/‭/bar", + "base": "about:blank", + "href": "http://example.com/%E2%80%AE/foo/%E2%80%AD/bar", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/%E2%80%AE/foo/%E2%80%AD/bar", + "search": "", + "hash": "" + }, + "# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/script-tests/relative.js", + { + "input": "http://www.google.com/foo?bar=baz#", + "base": "about:blank", + "href": "http://www.google.com/foo?bar=baz#", + "origin": "http://www.google.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "www.google.com", + "hostname": "www.google.com", + "port": "", + "pathname": "/foo", + "search": "?bar=baz", + "hash": "" + }, + { + "input": "http://www.google.com/foo?bar=baz# »", + "base": "about:blank", + "href": "http://www.google.com/foo?bar=baz# »", + "origin": "http://www.google.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "www.google.com", + "hostname": "www.google.com", + "port": "", + "pathname": "/foo", + "search": "?bar=baz", + "hash": "# »" + }, + { + "input": "data:test# »", + "base": "about:blank", + "href": "data:test# »", + "origin": "null", + "protocol": "data:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "test", + "search": "", + "hash": "# »" + }, + { + "input": "http://[www.google.com]/", + "base": "about:blank", + "failure": true + }, + { + "input": "http://www.google.com", + "base": "about:blank", + "href": "http://www.google.com/", + "origin": "http://www.google.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "www.google.com", + "hostname": "www.google.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http://192.0x00A80001", + "base": "about:blank", + "href": "http://192.168.0.1/", + "origin": "http://192.168.0.1", + "protocol": "http:", + "username": "", + "password": "", + "host": "192.168.0.1", + "hostname": "192.168.0.1", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http://www/foo%2Ehtml", + "base": "about:blank", + "href": "http://www/foo.html", + "origin": "http://www", + "protocol": "http:", + "username": "", + "password": "", + "host": "www", + "hostname": "www", + "port": "", + "pathname": "/foo.html", + "search": "", + "hash": "" + }, + { + "input": "http://www/foo/%2E/html", + "base": "about:blank", + "href": "http://www/foo/html", + "origin": "http://www", + "protocol": "http:", + "username": "", + "password": "", + "host": "www", + "hostname": "www", + "port": "", + "pathname": "/foo/html", + "search": "", + "hash": "" + }, + { + "input": "http://user:pass@/", + "base": "about:blank", + "failure": true + }, + { + "input": "http://%25DOMAIN:foobar@foodomain.com/", + "base": "about:blank", + "href": "http://%25DOMAIN:foobar@foodomain.com/", + "origin": "http://foodomain.com", + "protocol": "http:", + "username": "%25DOMAIN", + "password": "foobar", + "host": "foodomain.com", + "hostname": "foodomain.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http:\\\\www.google.com\\foo", + "base": "about:blank", + "href": "http://www.google.com/foo", + "origin": "http://www.google.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "www.google.com", + "hostname": "www.google.com", + "port": "", + "pathname": "/foo", + "search": "", + "hash": "" + }, + { + "input": "http://foo:80/", + "base": "about:blank", + "href": "http://foo/", + "origin": "http://foo", + "protocol": "http:", + "username": "", + "password": "", + "host": "foo", + "hostname": "foo", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http://foo:81/", + "base": "about:blank", + "href": "http://foo:81/", + "origin": "http://foo:81", + "protocol": "http:", + "username": "", + "password": "", + "host": "foo:81", + "hostname": "foo", + "port": "81", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "httpa://foo:80/", + "base": "about:blank", + "href": "httpa://foo:80/", + "origin": "null", + "protocol": "httpa:", + "username": "", + "password": "", + "host": "foo:80", + "hostname": "foo", + "port": "80", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http://foo:-80/", + "base": "about:blank", + "failure": true + }, + { + "input": "https://foo:443/", + "base": "about:blank", + "href": "https://foo/", + "origin": "https://foo", + "protocol": "https:", + "username": "", + "password": "", + "host": "foo", + "hostname": "foo", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "https://foo:80/", + "base": "about:blank", + "href": "https://foo:80/", + "origin": "https://foo:80", + "protocol": "https:", + "username": "", + "password": "", + "host": "foo:80", + "hostname": "foo", + "port": "80", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "ftp://foo:21/", + "base": "about:blank", + "href": "ftp://foo/", + "origin": "ftp://foo", + "protocol": "ftp:", + "username": "", + "password": "", + "host": "foo", + "hostname": "foo", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "ftp://foo:80/", + "base": "about:blank", + "href": "ftp://foo:80/", + "origin": "ftp://foo:80", + "protocol": "ftp:", + "username": "", + "password": "", + "host": "foo:80", + "hostname": "foo", + "port": "80", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "gopher://foo:70/", + "base": "about:blank", + "href": "gopher://foo/", + "origin": "gopher://foo", + "protocol": "gopher:", + "username": "", + "password": "", + "host": "foo", + "hostname": "foo", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "gopher://foo:443/", + "base": "about:blank", + "href": "gopher://foo:443/", + "origin": "gopher://foo:443", + "protocol": "gopher:", + "username": "", + "password": "", + "host": "foo:443", + "hostname": "foo", + "port": "443", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "ws://foo:80/", + "base": "about:blank", + "href": "ws://foo/", + "origin": "ws://foo", + "protocol": "ws:", + "username": "", + "password": "", + "host": "foo", + "hostname": "foo", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "ws://foo:81/", + "base": "about:blank", + "href": "ws://foo:81/", + "origin": "ws://foo:81", + "protocol": "ws:", + "username": "", + "password": "", + "host": "foo:81", + "hostname": "foo", + "port": "81", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "ws://foo:443/", + "base": "about:blank", + "href": "ws://foo:443/", + "origin": "ws://foo:443", + "protocol": "ws:", + "username": "", + "password": "", + "host": "foo:443", + "hostname": "foo", + "port": "443", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "ws://foo:815/", + "base": "about:blank", + "href": "ws://foo:815/", + "origin": "ws://foo:815", + "protocol": "ws:", + "username": "", + "password": "", + "host": "foo:815", + "hostname": "foo", + "port": "815", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "wss://foo:80/", + "base": "about:blank", + "href": "wss://foo:80/", + "origin": "wss://foo:80", + "protocol": "wss:", + "username": "", + "password": "", + "host": "foo:80", + "hostname": "foo", + "port": "80", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "wss://foo:81/", + "base": "about:blank", + "href": "wss://foo:81/", + "origin": "wss://foo:81", + "protocol": "wss:", + "username": "", + "password": "", + "host": "foo:81", + "hostname": "foo", + "port": "81", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "wss://foo:443/", + "base": "about:blank", + "href": "wss://foo/", + "origin": "wss://foo", + "protocol": "wss:", + "username": "", + "password": "", + "host": "foo", + "hostname": "foo", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "wss://foo:815/", + "base": "about:blank", + "href": "wss://foo:815/", + "origin": "wss://foo:815", + "protocol": "wss:", + "username": "", + "password": "", + "host": "foo:815", + "hostname": "foo", + "port": "815", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http:/example.com/", + "base": "about:blank", + "href": "http://example.com/", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "ftp:/example.com/", + "base": "about:blank", + "href": "ftp://example.com/", + "origin": "ftp://example.com", + "protocol": "ftp:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "https:/example.com/", + "base": "about:blank", + "href": "https://example.com/", + "origin": "https://example.com", + "protocol": "https:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "madeupscheme:/example.com/", + "base": "about:blank", + "href": "madeupscheme:/example.com/", + "origin": "null", + "protocol": "madeupscheme:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/example.com/", + "search": "", + "hash": "" + }, + { + "input": "file:/example.com/", + "base": "about:blank", + "href": "file:///example.com/", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/example.com/", + "search": "", + "hash": "" + }, + { + "input": "ftps:/example.com/", + "base": "about:blank", + "href": "ftps:/example.com/", + "origin": "null", + "protocol": "ftps:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/example.com/", + "search": "", + "hash": "" + }, + { + "input": "gopher:/example.com/", + "base": "about:blank", + "href": "gopher://example.com/", + "origin": "gopher://example.com", + "protocol": "gopher:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "ws:/example.com/", + "base": "about:blank", + "href": "ws://example.com/", + "origin": "ws://example.com", + "protocol": "ws:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "wss:/example.com/", + "base": "about:blank", + "href": "wss://example.com/", + "origin": "wss://example.com", + "protocol": "wss:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "data:/example.com/", + "base": "about:blank", + "href": "data:/example.com/", + "origin": "null", + "protocol": "data:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/example.com/", + "search": "", + "hash": "" + }, + { + "input": "javascript:/example.com/", + "base": "about:blank", + "href": "javascript:/example.com/", + "origin": "null", + "protocol": "javascript:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/example.com/", + "search": "", + "hash": "" + }, + { + "input": "mailto:/example.com/", + "base": "about:blank", + "href": "mailto:/example.com/", + "origin": "null", + "protocol": "mailto:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/example.com/", + "search": "", + "hash": "" + }, + { + "input": "http:example.com/", + "base": "about:blank", + "href": "http://example.com/", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "ftp:example.com/", + "base": "about:blank", + "href": "ftp://example.com/", + "origin": "ftp://example.com", + "protocol": "ftp:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "https:example.com/", + "base": "about:blank", + "href": "https://example.com/", + "origin": "https://example.com", + "protocol": "https:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "madeupscheme:example.com/", + "base": "about:blank", + "href": "madeupscheme:example.com/", + "origin": "null", + "protocol": "madeupscheme:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "example.com/", + "search": "", + "hash": "" + }, + { + "input": "ftps:example.com/", + "base": "about:blank", + "href": "ftps:example.com/", + "origin": "null", + "protocol": "ftps:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "example.com/", + "search": "", + "hash": "" + }, + { + "input": "gopher:example.com/", + "base": "about:blank", + "href": "gopher://example.com/", + "origin": "gopher://example.com", + "protocol": "gopher:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "ws:example.com/", + "base": "about:blank", + "href": "ws://example.com/", + "origin": "ws://example.com", + "protocol": "ws:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "wss:example.com/", + "base": "about:blank", + "href": "wss://example.com/", + "origin": "wss://example.com", + "protocol": "wss:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "data:example.com/", + "base": "about:blank", + "href": "data:example.com/", + "origin": "null", + "protocol": "data:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "example.com/", + "search": "", + "hash": "" + }, + { + "input": "javascript:example.com/", + "base": "about:blank", + "href": "javascript:example.com/", + "origin": "null", + "protocol": "javascript:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "example.com/", + "search": "", + "hash": "" + }, + { + "input": "mailto:example.com/", + "base": "about:blank", + "href": "mailto:example.com/", + "origin": "null", + "protocol": "mailto:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "example.com/", + "search": "", + "hash": "" + }, + "# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/segments-userinfo-vs-host.html", + { + "input": "http:@www.example.com", + "base": "about:blank", + "href": "http://www.example.com/", + "origin": "http://www.example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "www.example.com", + "hostname": "www.example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http:/@www.example.com", + "base": "about:blank", + "href": "http://www.example.com/", + "origin": "http://www.example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "www.example.com", + "hostname": "www.example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http://@www.example.com", + "base": "about:blank", + "href": "http://www.example.com/", + "origin": "http://www.example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "www.example.com", + "hostname": "www.example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http:a:b@www.example.com", + "base": "about:blank", + "href": "http://a:b@www.example.com/", + "origin": "http://www.example.com", + "protocol": "http:", + "username": "a", + "password": "b", + "host": "www.example.com", + "hostname": "www.example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http:/a:b@www.example.com", + "base": "about:blank", + "href": "http://a:b@www.example.com/", + "origin": "http://www.example.com", + "protocol": "http:", + "username": "a", + "password": "b", + "host": "www.example.com", + "hostname": "www.example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http://a:b@www.example.com", + "base": "about:blank", + "href": "http://a:b@www.example.com/", + "origin": "http://www.example.com", + "protocol": "http:", + "username": "a", + "password": "b", + "host": "www.example.com", + "hostname": "www.example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http://@pple.com", + "base": "about:blank", + "href": "http://pple.com/", + "origin": "http://pple.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "pple.com", + "hostname": "pple.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http::b@www.example.com", + "base": "about:blank", + "href": "http://:b@www.example.com/", + "origin": "http://www.example.com", + "protocol": "http:", + "username": "", + "password": "b", + "host": "www.example.com", + "hostname": "www.example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http:/:b@www.example.com", + "base": "about:blank", + "href": "http://:b@www.example.com/", + "origin": "http://www.example.com", + "protocol": "http:", + "username": "", + "password": "b", + "host": "www.example.com", + "hostname": "www.example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http://:b@www.example.com", + "base": "about:blank", + "href": "http://:b@www.example.com/", + "origin": "http://www.example.com", + "protocol": "http:", + "username": "", + "password": "b", + "host": "www.example.com", + "hostname": "www.example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http:/:@/www.example.com", + "base": "about:blank", + "failure": true + }, + { + "input": "http://user@/www.example.com", + "base": "about:blank", + "failure": true + }, + { + "input": "http:@/www.example.com", + "base": "about:blank", + "failure": true + }, + { + "input": "http:/@/www.example.com", + "base": "about:blank", + "failure": true + }, + { + "input": "http://@/www.example.com", + "base": "about:blank", + "failure": true + }, + { + "input": "https:@/www.example.com", + "base": "about:blank", + "failure": true + }, + { + "input": "http:a:b@/www.example.com", + "base": "about:blank", + "failure": true + }, + { + "input": "http:/a:b@/www.example.com", + "base": "about:blank", + "failure": true + }, + { + "input": "http://a:b@/www.example.com", + "base": "about:blank", + "failure": true + }, + { + "input": "http::@/www.example.com", + "base": "about:blank", + "failure": true + }, + { + "input": "http:a:@www.example.com", + "base": "about:blank", + "href": "http://a:@www.example.com/", + "origin": "http://www.example.com", + "protocol": "http:", + "username": "a", + "password": "", + "host": "www.example.com", + "hostname": "www.example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http:/a:@www.example.com", + "base": "about:blank", + "href": "http://a:@www.example.com/", + "origin": "http://www.example.com", + "protocol": "http:", + "username": "a", + "password": "", + "host": "www.example.com", + "hostname": "www.example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http://a:@www.example.com", + "base": "about:blank", + "href": "http://a:@www.example.com/", + "origin": "http://www.example.com", + "protocol": "http:", + "username": "a", + "password": "", + "host": "www.example.com", + "hostname": "www.example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http://www.@pple.com", + "base": "about:blank", + "href": "http://www.@pple.com/", + "origin": "http://pple.com", + "protocol": "http:", + "username": "www.", + "password": "", + "host": "pple.com", + "hostname": "pple.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http:@:www.example.com", + "base": "about:blank", + "failure": true + }, + { + "input": "http:/@:www.example.com", + "base": "about:blank", + "failure": true + }, + { + "input": "http://@:www.example.com", + "base": "about:blank", + "failure": true + }, + { + "input": "http://:@www.example.com", + "base": "about:blank", + "href": "http://:@www.example.com/", + "origin": "http://www.example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "www.example.com", + "hostname": "www.example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + "# Others", + { + "input": "/", + "base": "http://www.example.com/test", + "href": "http://www.example.com/", + "origin": "http://www.example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "www.example.com", + "hostname": "www.example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "/test.txt", + "base": "http://www.example.com/test", + "href": "http://www.example.com/test.txt", + "origin": "http://www.example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "www.example.com", + "hostname": "www.example.com", + "port": "", + "pathname": "/test.txt", + "search": "", + "hash": "" + }, + { + "input": ".", + "base": "http://www.example.com/test", + "href": "http://www.example.com/", + "origin": "http://www.example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "www.example.com", + "hostname": "www.example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "..", + "base": "http://www.example.com/test", + "href": "http://www.example.com/", + "origin": "http://www.example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "www.example.com", + "hostname": "www.example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "test.txt", + "base": "http://www.example.com/test", + "href": "http://www.example.com/test.txt", + "origin": "http://www.example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "www.example.com", + "hostname": "www.example.com", + "port": "", + "pathname": "/test.txt", + "search": "", + "hash": "" + }, + { + "input": "./test.txt", + "base": "http://www.example.com/test", + "href": "http://www.example.com/test.txt", + "origin": "http://www.example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "www.example.com", + "hostname": "www.example.com", + "port": "", + "pathname": "/test.txt", + "search": "", + "hash": "" + }, + { + "input": "../test.txt", + "base": "http://www.example.com/test", + "href": "http://www.example.com/test.txt", + "origin": "http://www.example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "www.example.com", + "hostname": "www.example.com", + "port": "", + "pathname": "/test.txt", + "search": "", + "hash": "" + }, + { + "input": "../aaa/test.txt", + "base": "http://www.example.com/test", + "href": "http://www.example.com/aaa/test.txt", + "origin": "http://www.example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "www.example.com", + "hostname": "www.example.com", + "port": "", + "pathname": "/aaa/test.txt", + "search": "", + "hash": "" + }, + { + "input": "../../test.txt", + "base": "http://www.example.com/test", + "href": "http://www.example.com/test.txt", + "origin": "http://www.example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "www.example.com", + "hostname": "www.example.com", + "port": "", + "pathname": "/test.txt", + "search": "", + "hash": "" + }, + { + "input": "中/test.txt", + "base": "http://www.example.com/test", + "href": "http://www.example.com/%E4%B8%AD/test.txt", + "origin": "http://www.example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "www.example.com", + "hostname": "www.example.com", + "port": "", + "pathname": "/%E4%B8%AD/test.txt", + "search": "", + "hash": "" + }, + { + "input": "http://www.example2.com", + "base": "http://www.example.com/test", + "href": "http://www.example2.com/", + "origin": "http://www.example2.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "www.example2.com", + "hostname": "www.example2.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "//www.example2.com", + "base": "http://www.example.com/test", + "href": "http://www.example2.com/", + "origin": "http://www.example2.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "www.example2.com", + "hostname": "www.example2.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "file:...", + "base": "http://www.example.com/test", + "href": "file:///...", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/...", + "search": "", + "hash": "" + }, + { + "input": "file:..", + "base": "http://www.example.com/test", + "href": "file:///", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "file:a", + "base": "http://www.example.com/test", + "href": "file:///a", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/a", + "search": "", + "hash": "" + }, + "# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/host.html", + "Basic canonicalization, uppercase should be converted to lowercase", + { + "input": "http://ExAmPlE.CoM", + "base": "http://other.com/", + "href": "http://example.com/", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http://example example.com", + "base": "http://other.com/", + "failure": true + }, + { + "input": "http://Goo%20 goo%7C|.com", + "base": "http://other.com/", + "failure": true + }, + { + "input": "http://[]", + "base": "http://other.com/", + "failure": true + }, + { + "input": "http://[:]", + "base": "http://other.com/", + "failure": true + }, + "U+3000 is mapped to U+0020 (space) which is disallowed", + { + "input": "http://GOO\u00a0\u3000goo.com", + "base": "http://other.com/", + "failure": true + }, + "Other types of space (no-break, zero-width, zero-width-no-break) are name-prepped away to nothing. U+200B, U+2060, and U+FEFF, are ignored", + { + "input": "http://GOO\u200b\u2060\ufeffgoo.com", + "base": "http://other.com/", + "href": "http://googoo.com/", + "origin": "http://googoo.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "googoo.com", + "hostname": "googoo.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + "Ideographic full stop (full-width period for Chinese, etc.) should be treated as a dot. U+3002 is mapped to U+002E (dot)", + { + "input": "http://www.foo。bar.com", + "base": "http://other.com/", + "href": "http://www.foo.bar.com/", + "origin": "http://www.foo.bar.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "www.foo.bar.com", + "hostname": "www.foo.bar.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + "Invalid unicode characters should fail... U+FDD0 is disallowed; %ef%b7%90 is U+FDD0", + { + "input": "http://\ufdd0zyx.com", + "base": "http://other.com/", + "failure": true + }, + "This is the same as previous but escaped", + { + "input": "http://%ef%b7%90zyx.com", + "base": "http://other.com/", + "failure": true + }, + "Test name prepping, fullwidth input should be converted to ASCII and NOT IDN-ized. This is 'Go' in fullwidth UTF-8/UTF-16.", + { + "input": "http://Go.com", + "base": "http://other.com/", + "href": "http://go.com/", + "origin": "http://go.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "go.com", + "hostname": "go.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + "URL spec forbids the following. https://www.w3.org/Bugs/Public/show_bug.cgi?id=24257", + { + "input": "http://%41.com", + "base": "http://other.com/", + "failure": true + }, + { + "input": "http://%ef%bc%85%ef%bc%94%ef%bc%91.com", + "base": "http://other.com/", + "failure": true + }, + "...%00 in fullwidth should fail (also as escaped UTF-8 input)", + { + "input": "http://%00.com", + "base": "http://other.com/", + "failure": true + }, + { + "input": "http://%ef%bc%85%ef%bc%90%ef%bc%90.com", + "base": "http://other.com/", + "failure": true + }, + "Basic IDN support, UTF-8 and UTF-16 input should be converted to IDN", + { + "input": "http://你好你好", + "base": "http://other.com/", + "href": "http://xn--6qqa088eba/", + "origin": "http://你好你好", + "protocol": "http:", + "username": "", + "password": "", + "host": "xn--6qqa088eba", + "hostname": "xn--6qqa088eba", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + "Invalid escaped characters should fail and the percents should be escaped. https://www.w3.org/Bugs/Public/show_bug.cgi?id=24191", + { + "input": "http://%zz%66%a.com", + "base": "http://other.com/", + "failure": true + }, + "If we get an invalid character that has been escaped.", + { + "input": "http://%25", + "base": "http://other.com/", + "failure": true + }, + { + "input": "http://hello%00", + "base": "http://other.com/", + "failure": true + }, + "Escaped numbers should be treated like IP addresses if they are.", + { + "input": "http://%30%78%63%30%2e%30%32%35%30.01", + "base": "http://other.com/", + "href": "http://192.168.0.1/", + "origin": "http://192.168.0.1", + "protocol": "http:", + "username": "", + "password": "", + "host": "192.168.0.1", + "hostname": "192.168.0.1", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http://%30%78%63%30%2e%30%32%35%30.01%2e", + "base": "http://other.com/", + "href": "http://192.168.0.1/", + "origin": "http://192.168.0.1", + "protocol": "http:", + "username": "", + "password": "", + "host": "192.168.0.1", + "hostname": "192.168.0.1", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http://192.168.0.257", + "base": "http://other.com/", + "failure": true + }, + "Invalid escaping should trigger the regular host error handling", + { + "input": "http://%3g%78%63%30%2e%30%32%35%30%2E.01", + "base": "http://other.com/", + "failure": true + }, + "Something that isn't exactly an IP should get treated as a host and spaces escaped", + { + "input": "http://192.168.0.1 hello", + "base": "http://other.com/", + "failure": true + }, + "Fullwidth and escaped UTF-8 fullwidth should still be treated as IP", + { + "input": "http://0Xc0.0250.01", + "base": "http://other.com/", + "href": "http://192.168.0.1/", + "origin": "http://192.168.0.1", + "protocol": "http:", + "username": "", + "password": "", + "host": "192.168.0.1", + "hostname": "192.168.0.1", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + "Broken IPv6", + { + "input": "http://[google.com]", + "base": "http://other.com/", + "failure": true + }, + "Misc Unicode", + { + "input": "http://foo:💩@example.com/bar", + "base": "http://other.com/", + "href": "http://foo:%F0%9F%92%A9@example.com/bar", + "origin": "http://example.com", + "protocol": "http:", + "username": "foo", + "password": "%F0%9F%92%A9", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/bar", + "search": "", + "hash": "" + }, + "# resolving a fragment against any scheme succeeds", + { + "input": "#", + "base": "test:test", + "href": "test:test#", + "origin": "null", + "protocol": "test:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "test", + "search": "", + "hash": "" + }, + { + "input": "#x", + "base": "mailto:x@x.com", + "href": "mailto:x@x.com#x", + "origin": "null", + "protocol": "mailto:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "x@x.com", + "search": "", + "hash": "#x" + }, + { + "input": "#x", + "base": "data:,", + "href": "data:,#x", + "origin": "null", + "protocol": "data:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": ",", + "search": "", + "hash": "#x" + }, + { + "input": "#x", + "base": "about:blank", + "href": "about:blank#x", + "origin": "null", + "protocol": "about:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "blank", + "search": "", + "hash": "#x" + }, + { + "input": "#", + "base": "test:test?test", + "href": "test:test?test#", + "origin": "null", + "protocol": "test:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "test", + "search": "?test", + "hash": "" + }, + "# multiple @ in authority state", + { + "input": "https://@test@test@example:800/", + "base": "http://doesnotmatter/", + "href": "https://%40test%40test@example:800/", + "origin": "https://example:800", + "protocol": "https:", + "username": "%40test%40test", + "password": "", + "host": "example:800", + "hostname": "example", + "port": "800", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "https://@@@example", + "base": "http://doesnotmatter/", + "href": "https://%40%40@example/", + "origin": "https://example", + "protocol": "https:", + "username": "%40%40", + "password": "", + "host": "example", + "hostname": "example", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + "non-az-09 characters", + { + "input": "http://`{}:`{}@h/`{}?`{}", + "base": "http://doesnotmatter/", + "href": "http://%60%7B%7D:%60%7B%7D@h/%60%7B%7D?`{}", + "origin": "http://h", + "protocol": "http:", + "username": "%60%7B%7D", + "password": "%60%7B%7D", + "host": "h", + "hostname": "h", + "port": "", + "pathname": "/%60%7B%7D", + "search": "?`{}", + "hash": "" + }, + "# Credentials in base", + { + "input": "/some/path", + "base": "http://user@example.org/smth", + "href": "http://user@example.org/some/path", + "origin": "http://example.org", + "protocol": "http:", + "username": "user", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/some/path", + "search": "", + "hash": "" + }, + { + "input": "", + "base": "http://user:pass@example.org:21/smth", + "href": "http://user:pass@example.org:21/smth", + "origin": "http://example.org:21", + "protocol": "http:", + "username": "user", + "password": "pass", + "host": "example.org:21", + "hostname": "example.org", + "port": "21", + "pathname": "/smth", + "search": "", + "hash": "" + }, + { + "input": "/some/path", + "base": "http://user:pass@example.org:21/smth", + "href": "http://user:pass@example.org:21/some/path", + "origin": "http://example.org:21", + "protocol": "http:", + "username": "user", + "password": "pass", + "host": "example.org:21", + "hostname": "example.org", + "port": "21", + "pathname": "/some/path", + "search": "", + "hash": "" + }, + "# a set of tests designed by zcorpan for relative URLs with unknown schemes", + { + "input": "i", + "base": "sc:sd", + "failure": true + }, + { + "input": "i", + "base": "sc:sd/sd", + "failure": true + }, + { + "input": "i", + "base": "sc:/pa/pa", + "href": "sc:/pa/i", + "origin": "null", + "protocol": "sc:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/pa/i", + "search": "", + "hash": "" + }, + { + "input": "i", + "base": "sc://ho/pa", + "href": "sc://ho/i", + "origin": "null", + "protocol": "sc:", + "username": "", + "password": "", + "host": "ho", + "hostname": "ho", + "port": "", + "pathname": "/i", + "search": "", + "hash": "" + }, + { + "input": "i", + "base": "sc:///pa/pa", + "href": "sc:///pa/i", + "origin": "null", + "protocol": "sc:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/pa/i", + "search": "", + "hash": "" + }, + { + "input": "../i", + "base": "sc:sd", + "failure": true + }, + { + "input": "../i", + "base": "sc:sd/sd", + "failure": true + }, + { + "input": "../i", + "base": "sc:/pa/pa", + "href": "sc:/i", + "origin": "null", + "protocol": "sc:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/i", + "search": "", + "hash": "" + }, + { + "input": "../i", + "base": "sc://ho/pa", + "href": "sc://ho/i", + "origin": "null", + "protocol": "sc:", + "username": "", + "password": "", + "host": "ho", + "hostname": "ho", + "port": "", + "pathname": "/i", + "search": "", + "hash": "" + }, + { + "input": "../i", + "base": "sc:///pa/pa", + "href": "sc:///i", + "origin": "null", + "protocol": "sc:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/i", + "search": "", + "hash": "" + }, + { + "input": "/i", + "base": "sc:sd", + "failure": true + }, + { + "input": "/i", + "base": "sc:sd/sd", + "failure": true + }, + { + "input": "/i", + "base": "sc:/pa/pa", + "href": "sc:/i", + "origin": "null", + "protocol": "sc:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/i", + "search": "", + "hash": "" + }, + { + "input": "/i", + "base": "sc://ho/pa", + "href": "sc://ho/i", + "origin": "null", + "protocol": "sc:", + "username": "", + "password": "", + "host": "ho", + "hostname": "ho", + "port": "", + "pathname": "/i", + "search": "", + "hash": "" + }, + { + "input": "/i", + "base": "sc:///pa/pa", + "href": "sc:///i", + "origin": "null", + "protocol": "sc:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/i", + "search": "", + "hash": "" + }, + { + "input": "?i", + "base": "sc:sd", + "failure": true + }, + { + "input": "?i", + "base": "sc:sd/sd", + "failure": true + }, + { + "input": "?i", + "base": "sc:/pa/pa", + "href": "sc:/pa/pa?i", + "origin": "null", + "protocol": "sc:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/pa/pa", + "search": "?i", + "hash": "" + }, + { + "input": "?i", + "base": "sc://ho/pa", + "href": "sc://ho/pa?i", + "origin": "null", + "protocol": "sc:", + "username": "", + "password": "", + "host": "ho", + "hostname": "ho", + "port": "", + "pathname": "/pa", + "search": "?i", + "hash": "" + }, + { + "input": "?i", + "base": "sc:///pa/pa", + "href": "sc:///pa/pa?i", + "origin": "null", + "protocol": "sc:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/pa/pa", + "search": "?i", + "hash": "" + }, + { + "input": "#i", + "base": "sc:sd", + "href": "sc:sd#i", + "origin": "null", + "protocol": "sc:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "sd", + "search": "", + "hash": "#i" + }, + { + "input": "#i", + "base": "sc:sd/sd", + "href": "sc:sd/sd#i", + "origin": "null", + "protocol": "sc:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "sd/sd", + "search": "", + "hash": "#i" + }, + { + "input": "#i", + "base": "sc:/pa/pa", + "href": "sc:/pa/pa#i", + "origin": "null", + "protocol": "sc:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/pa/pa", + "search": "", + "hash": "#i" + }, + { + "input": "#i", + "base": "sc://ho/pa", + "href": "sc://ho/pa#i", + "origin": "null", + "protocol": "sc:", + "username": "", + "password": "", + "host": "ho", + "hostname": "ho", + "port": "", + "pathname": "/pa", + "search": "", + "hash": "#i" + }, + { + "input": "#i", + "base": "sc:///pa/pa", + "href": "sc:///pa/pa#i", + "origin": "null", + "protocol": "sc:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/pa/pa", + "search": "", + "hash": "#i" + }, + "# make sure that relative URL logic works on known typically non-relative schemes too", + { + "input": "about:/../", + "base": "about:blank", + "href": "about:/", + "origin": "null", + "protocol": "about:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "data:/../", + "base": "about:blank", + "href": "data:/", + "origin": "null", + "protocol": "data:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "javascript:/../", + "base": "about:blank", + "href": "javascript:/", + "origin": "null", + "protocol": "javascript:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "mailto:/../", + "base": "about:blank", + "href": "mailto:/", + "origin": "null", + "protocol": "mailto:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + "# unknown schemes and non-ASCII domains", + { + "input": "sc://ñ.test/", + "base": "about:blank", + "href": "sc://xn--ida.test/", + "origin": "null", + "protocol": "sc:", + "username": "", + "password": "", + "host": "xn--ida.test", + "hostname": "xn--ida.test", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + "# unknown schemes and backslashes", + { + "input": "sc:\\../", + "base": "about:blank", + "href": "sc:\\../", + "origin": "null", + "protocol": "sc:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "\\../", + "search": "", + "hash": "" + }, + "# unknown scheme with path looking like a password", + { + "input": "sc::a@example.net", + "base": "about:blank", + "href": "sc::a@example.net", + "origin": "null", + "protocol": "sc:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": ":a@example.net", + "search": "", + "hash": "" + }, + "# tests from jsdom/whatwg-url designed for code coverage", + { + "input": "http://127.0.0.1:10100/relative_import.html", + "base": "about:blank", + "href": "http://127.0.0.1:10100/relative_import.html", + "origin": "http://127.0.0.1:10100", + "protocol": "http:", + "username": "", + "password": "", + "host": "127.0.0.1:10100", + "hostname": "127.0.0.1", + "port": "10100", + "pathname": "/relative_import.html", + "search": "", + "hash": "" + }, + { + "input": "http://facebook.com/?foo=%7B%22abc%22", + "base": "about:blank", + "href": "http://facebook.com/?foo=%7B%22abc%22", + "origin": "http://facebook.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "facebook.com", + "hostname": "facebook.com", + "port": "", + "pathname": "/", + "search": "?foo=%7B%22abc%22", + "hash": "" + }, + { + "input": "https://localhost:3000/jqueryui@1.2.3", + "base": "about:blank", + "href": "https://localhost:3000/jqueryui@1.2.3", + "origin": "https://localhost:3000", + "protocol": "https:", + "username": "", + "password": "", + "host": "localhost:3000", + "hostname": "localhost", + "port": "3000", + "pathname": "/jqueryui@1.2.3", + "search": "", + "hash": "" + }, + "# tab/LF/CR", + { + "input": "h\tt\nt\rp://h\to\ns\rt:9\t0\n0\r0/p\ta\nt\rh?q\tu\ne\rry#f\tr\na\rg", + "base": "about:blank", + "href": "http://host:9000/path?query#frag", + "origin": "http://host:9000", + "protocol": "http:", + "username": "", + "password": "", + "host": "host:9000", + "hostname": "host", + "port": "9000", + "pathname": "/path", + "search": "?query", + "hash": "#frag" + }, + "# Stringification of URL.searchParams", + { + "input": "?a=b&c=d", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/bar?a=b&c=d", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/bar", + "search": "?a=b&c=d", + "searchParams": "a=b&c=d", + "hash": "" + }, + { + "input": "??a=b&c=d", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/bar??a=b&c=d", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/bar", + "search": "??a=b&c=d", + "searchParams": "%3Fa=b&c=d", + "hash": "" + } +] diff --git a/deps/url-1.1.0/todo b/deps/url-1.1.0/todo new file mode 100644 index 000000000..6aeefbf13 --- /dev/null +++ b/deps/url-1.1.0/todo @@ -0,0 +1,14 @@ +* standalone path parsing? +* Test setters + * Test trim C0/space + * Test remove tab & newline + + + +#[test] +fn test_path_segments() { + let mut url = Url::parse("http://example.net").unwrap(); + url.push_path_segment("foo").unwrap(); + url.extend_path_segments(&["bar", "b/az"]).unwrap(); + assert_eq!(url.as_str(), "http://example.net/foo"); +} diff --git a/deps/utf8-ranges-0.1.3/.gitignore b/deps/utf8-ranges-0.1.3/.gitignore new file mode 100644 index 000000000..d24edbd87 --- /dev/null +++ b/deps/utf8-ranges-0.1.3/.gitignore @@ -0,0 +1,9 @@ +.*.swp +doc +tags +examples/ss10pusa.csv +build +target +Cargo.lock +scratch* +bench_large/huge diff --git a/deps/utf8-ranges-0.1.3/.travis.yml b/deps/utf8-ranges-0.1.3/.travis.yml new file mode 100644 index 000000000..e1ccf114e --- /dev/null +++ b/deps/utf8-ranges-0.1.3/.travis.yml @@ -0,0 +1,9 @@ +language: rust +rust: + - 1.3.0 + - beta + - nightly +script: + - cargo build --verbose + - cargo test --verbose + - cargo doc diff --git a/deps/utf8-ranges-0.1.3/COPYING b/deps/utf8-ranges-0.1.3/COPYING new file mode 100644 index 000000000..bb9c20a09 --- /dev/null +++ b/deps/utf8-ranges-0.1.3/COPYING @@ -0,0 +1,3 @@ +This project is dual-licensed under the Unlicense and MIT licenses. + +You may use this code under the terms of either license. diff --git a/deps/utf8-ranges-0.1.3/Cargo.toml b/deps/utf8-ranges-0.1.3/Cargo.toml new file mode 100644 index 000000000..546e774a1 --- /dev/null +++ b/deps/utf8-ranges-0.1.3/Cargo.toml @@ -0,0 +1,14 @@ +[package] +name = "utf8-ranges" +version = "0.1.3" #:version +authors = ["Andrew Gallant <jamslam@gmail.com>"] +description = "Convert ranges of Unicode codepoints to UTF-8 byte ranges." +documentation = "http://burntsushi.net/rustdoc/utf8_ranges/" +homepage = "https://github.com/BurntSushi/utf8-ranges" +repository = "https://github.com/BurntSushi/utf8-ranges" +readme = "README.md" +keywords = ["codepoint", "utf8", "automaton", "range"] +license = "Unlicense/MIT" + +[dev-dependencies] +quickcheck = "0.2" diff --git a/deps/utf8-ranges-0.1.3/LICENSE-MIT b/deps/utf8-ranges-0.1.3/LICENSE-MIT new file mode 100644 index 000000000..3b0a5dc09 --- /dev/null +++ b/deps/utf8-ranges-0.1.3/LICENSE-MIT @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Andrew Gallant + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/deps/utf8-ranges-0.1.3/Makefile b/deps/utf8-ranges-0.1.3/Makefile new file mode 100644 index 000000000..9f956f4c4 --- /dev/null +++ b/deps/utf8-ranges-0.1.3/Makefile @@ -0,0 +1,14 @@ +all: + echo Nothing to do... + +ctags: + ctags --recurse --options=ctags.rust --languages=Rust + +docs: + cargo doc + in-dir ./target/doc fix-perms + rscp ./target/doc/* gopher:~/www/burntsushi.net/rustdoc/ + +push: + git push origin master + git push github master diff --git a/deps/utf8-ranges-0.1.3/README.md b/deps/utf8-ranges-0.1.3/README.md new file mode 100644 index 000000000..882fb9356 --- /dev/null +++ b/deps/utf8-ranges-0.1.3/README.md @@ -0,0 +1,54 @@ +utf8-ranges +=========== +This crate converts contiguous ranges of Unicode scalar values to UTF-8 byte +ranges. This is useful when constructing byte based automata from Unicode. +Stated differently, this lets one embed UTF-8 decoding as part of one's +automaton. + +[![Linux build status](https://api.travis-ci.org/BurntSushi/utf8-ranges.png)](https://travis-ci.org/BurntSushi/utf8-ranges) +[![](http://meritbadge.herokuapp.com/utf8-ranges)](https://crates.io/crates/walkdir) + +Dual-licensed under MIT or the [UNLICENSE](http://unlicense.org). + + +### Documentation + +[http://burntsushi.net/rustdoc/utf8_ranges/](http://burntsushi.net/rustdoc/utf8_ranges/) + + +### Example + +This shows how to convert a scalar value range (e.g., the basic multilingual +plane) to a sequence of byte based character classes. + + +```rust +extern crate utf8_ranges; + +use utf8_ranges::Utf8Sequences; + +fn main() { + for range in Utf8Sequences::new('\u{0}', '\u{FFFF}') { + println!("{:?}", range); + } +} +``` + +The output: + +``` +[0-7F] +[C2-DF][80-BF] +[E0][A0-BF][80-BF] +[E1-EC][80-BF][80-BF] +[ED][80-9F][80-BF] +[EE-EF][80-BF][80-BF] +``` + +These ranges can then be used to build an automaton. Namely: + +1. Every arbitrary sequence of bytes matches exactly one of the sequences of + ranges or none of them. +2. Every match sequence of bytes is guaranteed to be valid UTF-8. (Erroneous + encodings of surrogate codepoints in UTF-8 cannot match any of the byte + ranges above.) diff --git a/deps/utf8-ranges-0.1.3/UNLICENSE b/deps/utf8-ranges-0.1.3/UNLICENSE new file mode 100644 index 000000000..68a49daad --- /dev/null +++ b/deps/utf8-ranges-0.1.3/UNLICENSE @@ -0,0 +1,24 @@ +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or +distribute this software, either in source code form or as a compiled +binary, for any purpose, commercial or non-commercial, and by any +means. + +In jurisdictions that recognize copyright laws, the author or authors +of this software dedicate any and all copyright interest in the +software to the public domain. We make this dedication for the benefit +of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of +relinquishment in perpetuity of all present and future rights to this +software under copyright law. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +For more information, please refer to <http://unlicense.org/> diff --git a/deps/utf8-ranges-0.1.3/benches/bench.rs b/deps/utf8-ranges-0.1.3/benches/bench.rs new file mode 100644 index 000000000..ccffa896f --- /dev/null +++ b/deps/utf8-ranges-0.1.3/benches/bench.rs @@ -0,0 +1,25 @@ +#![feature(test)] + +extern crate test; +extern crate utf8_ranges; + +use test::Bencher; +use utf8_ranges::Utf8Sequences; + +#[bench] +fn no_reuse(b: &mut Bencher) { + b.iter(|| { + let count = Utf8Sequences::new('\u{0}', '\u{10FFFF}').count(); + assert_eq!(count, 9); + }) +} + +#[bench] +fn reuse(b: &mut Bencher) { + let mut seqs = Utf8Sequences::new('\u{0}', '\u{10FFFF}'); + b.iter(|| { + seqs.reset('\u{0}', '\u{10FFFF}'); + let count = (&mut seqs).count(); + assert_eq!(count, 9); + }) +} diff --git a/deps/utf8-ranges-0.1.3/ctags.rust b/deps/utf8-ranges-0.1.3/ctags.rust new file mode 100644 index 000000000..b42edf757 --- /dev/null +++ b/deps/utf8-ranges-0.1.3/ctags.rust @@ -0,0 +1,11 @@ +--langdef=Rust +--langmap=Rust:.rs +--regex-Rust=/^[ \t]*(#\[[^\]]\][ \t]*)*(pub[ \t]+)?(extern[ \t]+)?("[^"]+"[ \t]+)?(unsafe[ \t]+)?fn[ \t]+([a-zA-Z0-9_]+)/\6/f,functions,function definitions/ +--regex-Rust=/^[ \t]*(pub[ \t]+)?type[ \t]+([a-zA-Z0-9_]+)/\2/T,types,type definitions/ +--regex-Rust=/^[ \t]*(pub[ \t]+)?enum[ \t]+([a-zA-Z0-9_]+)/\2/g,enum,enumeration names/ +--regex-Rust=/^[ \t]*(pub[ \t]+)?struct[ \t]+([a-zA-Z0-9_]+)/\2/s,structure names/ +--regex-Rust=/^[ \t]*(pub[ \t]+)?mod[ \t]+([a-zA-Z0-9_]+)/\2/m,modules,module names/ +--regex-Rust=/^[ \t]*(pub[ \t]+)?static[ \t]+([a-zA-Z0-9_]+)/\2/c,consts,static constants/ +--regex-Rust=/^[ \t]*(pub[ \t]+)?trait[ \t]+([a-zA-Z0-9_]+)/\2/t,traits,traits/ +--regex-Rust=/^[ \t]*(pub[ \t]+)?impl([ \t\n]+<.*>)?[ \t]+([a-zA-Z0-9_]+)/\3/i,impls,trait implementations/ +--regex-Rust=/^[ \t]*macro_rules![ \t]+([a-zA-Z0-9_]+)/\1/d,macros,macro definitions/ diff --git a/deps/utf8-ranges-0.1.3/session.vim b/deps/utf8-ranges-0.1.3/session.vim new file mode 100644 index 000000000..213c95660 --- /dev/null +++ b/deps/utf8-ranges-0.1.3/session.vim @@ -0,0 +1 @@ +au BufWritePost *.rs silent!make ctags > /dev/null 2>&1 diff --git a/deps/utf8-ranges-0.1.3/src/char_utf8.rs b/deps/utf8-ranges-0.1.3/src/char_utf8.rs new file mode 100644 index 000000000..ac6be5490 --- /dev/null +++ b/deps/utf8-ranges-0.1.3/src/char_utf8.rs @@ -0,0 +1,36 @@ +// Pulled from std::char until encode_utf8 stabilizes. ---AG + +// UTF-8 ranges and tags for encoding characters +const TAG_CONT: u8 = 0b1000_0000; +const TAG_TWO_B: u8 = 0b1100_0000; +const TAG_THREE_B: u8 = 0b1110_0000; +const TAG_FOUR_B: u8 = 0b1111_0000; +const MAX_ONE_B: u32 = 0x80; +const MAX_TWO_B: u32 = 0x800; +const MAX_THREE_B: u32 = 0x10000; + +#[inline] +pub fn encode_utf8(character: char, dst: &mut [u8]) -> Option<usize> { + let code = character as u32; + if code < MAX_ONE_B && !dst.is_empty() { + dst[0] = code as u8; + Some(1) + } else if code < MAX_TWO_B && dst.len() >= 2 { + dst[0] = (code >> 6 & 0x1F) as u8 | TAG_TWO_B; + dst[1] = (code & 0x3F) as u8 | TAG_CONT; + Some(2) + } else if code < MAX_THREE_B && dst.len() >= 3 { + dst[0] = (code >> 12 & 0x0F) as u8 | TAG_THREE_B; + dst[1] = (code >> 6 & 0x3F) as u8 | TAG_CONT; + dst[2] = (code & 0x3F) as u8 | TAG_CONT; + Some(3) + } else if dst.len() >= 4 { + dst[0] = (code >> 18 & 0x07) as u8 | TAG_FOUR_B; + dst[1] = (code >> 12 & 0x3F) as u8 | TAG_CONT; + dst[2] = (code >> 6 & 0x3F) as u8 | TAG_CONT; + dst[3] = (code & 0x3F) as u8 | TAG_CONT; + Some(4) + } else { + None + } +} diff --git a/deps/utf8-ranges-0.1.3/src/lib.rs b/deps/utf8-ranges-0.1.3/src/lib.rs new file mode 100644 index 000000000..95c4ee2b7 --- /dev/null +++ b/deps/utf8-ranges-0.1.3/src/lib.rs @@ -0,0 +1,511 @@ +/*! +Crate `utf8-ranges` converts ranges of Unicode scalar values to equivalent +ranges of UTF-8 bytes. This is useful for constructing byte based automatons +that need to embed UTF-8 decoding. + +See the documentation on the `Utf8Sequences` iterator for more details and +an example. + +# Wait, what is this? + +This is simplest to explain with an example. Let's say you wanted to test +whether a particular byte sequence was a Cyrillic character. One possible +scalar value range is `[0400-04FF]`. The set of allowed bytes for this +range can be expressed as a sequence of byte ranges: + +```ignore +[D0-D3][80-BF] +``` + +This is simple enough: simply encode the boundaries, `0400` encodes to +`D0 80` and `04FF` encodes to `D3 BF`, and create ranges from each +corresponding pair of bytes: `D0` to `D3` and `80` to `BF`. + +However, what if you wanted to add the Cyrillic Supplementary characters to +your range? Your range might then become `[0400-052F]`. The same procedure +as above doesn't quite work because `052F` encodes to `D4 AF`. The byte ranges +you'd get from the previous transformation would be `[D0-D4][80-AF]`. However, +this isn't quite correct because this range doesn't capture many characters, +for example, `04FF` (because its last byte, `BF` isn't in the range `80-AF`). + +Instead, you need multiple sequences of byte ranges: + +```ignore +[D0-D3][80-BF] # matches codepoints 0400-04FF +[D4][80-AF] # matches codepoints 0500-052F +``` + +This gets even more complicated if you want bigger ranges, particularly if +they naively contain surrogate codepoints. For example, the sequence of byte +ranges for the basic multilingual plane (`[0000-FFFF]`) look like this: + +```ignore +[0-7F] +[C2-DF][80-BF] +[E0][A0-BF][80-BF] +[E1-EC][80-BF][80-BF] +[ED][80-9F][80-BF] +[EE-EF][80-BF][80-BF] +``` + +Note that the byte ranges above will *not* match any erroneous encoding of +UTF-8, including encodings of surrogate codepoints. + +And, of course, for all of Unicode (`[000000-10FFFF]`): + +```ignore +[0-7F] +[C2-DF][80-BF] +[E0][A0-BF][80-BF] +[E1-EC][80-BF][80-BF] +[ED][80-9F][80-BF] +[EE-EF][80-BF][80-BF] +[F0][90-BF][80-BF][80-BF] +[F1-F3][80-BF][80-BF][80-BF] +[F4][80-8F][80-BF][80-BF] +``` + +This crate automates the process of creating these byte ranges from ranges of +Unicode scalar values. + +# Why would I ever use this? + +You probably won't ever need this. In 99% of cases, you just decode the byte +sequence into a Unicode scalar value and compare scalar values directly. +However, this explicit decoding step isn't always possible. For example, the +construction of some finite state machines may benefit from converting ranges +of scalar values into UTF-8 decoder automata (e.g., for character classes in +regular expressions). + +# Lineage + +I got the idea and general implementation strategy from Russ Cox in his +[article on regexps](https://swtch.com/~rsc/regexp/regexp3.html) and RE2. +Russ Cox got it from Ken Thompson's `grep` (no source, folk lore?). +I also got the idea from +[Lucene](https://github.com/apache/lucene-solr/blob/trunk/lucene/core/src/java/org/apache/lucene/util/automaton/UTF32ToUTF8.java), +which uses it for executing automata on their term index. +*/ + +#![deny(missing_docs)] + +#[cfg(test)] extern crate quickcheck; + +use std::char; +use std::fmt; +use std::slice; + +use char_utf8::encode_utf8; + +const MAX_UTF8_BYTES: usize = 4; + +mod char_utf8; + +/// Utf8Sequence represents a sequence of byte ranges. +/// +/// To match a Utf8Sequence, a candidate byte sequence must match each +/// successive range. +/// +/// For example, if there are two ranges, `[C2-DF][80-BF]`, then the byte +/// sequence `\xDD\x61` would not match because `0x61 < 0x80`. +#[derive(Copy, Clone, Eq, PartialEq)] +pub enum Utf8Sequence { + /// One byte range. + One(Utf8Range), + /// Two successive byte ranges. + Two([Utf8Range; 2]), + /// Three successive byte ranges. + Three([Utf8Range; 3]), + /// Four successive byte ranges. + Four([Utf8Range; 4]), +} + +impl Utf8Sequence { + /// Creates a new UTF-8 sequence from the encoded bytes of a scalar value + /// range. + /// + /// This assumes that `start` and `end` have the same length. + fn from_encoded_range(start: &[u8], end: &[u8]) -> Self { + assert_eq!(start.len(), end.len()); + match start.len() { + 2 => Utf8Sequence::Two([ + Utf8Range::new(start[0], end[0]), + Utf8Range::new(start[1], end[1]), + ]), + 3 => Utf8Sequence::Three([ + Utf8Range::new(start[0], end[0]), + Utf8Range::new(start[1], end[1]), + Utf8Range::new(start[2], end[2]), + ]), + 4 => Utf8Sequence::Four([ + Utf8Range::new(start[0], end[0]), + Utf8Range::new(start[1], end[1]), + Utf8Range::new(start[2], end[2]), + Utf8Range::new(start[3], end[3]), + ]), + n => unreachable!("invalid encoded length: {}", n), + } + } + + /// Returns the underlying sequence of byte ranges as a slice. + pub fn as_slice(&self) -> &[Utf8Range] { + use self::Utf8Sequence::*; + match *self { + One(ref r) => unsafe { slice::from_raw_parts(r, 1) }, + Two(ref r) => &r[..], + Three(ref r) => &r[..], + Four(ref r) => &r[..], + } + } + + /// Returns the number of byte ranges in this sequence. + /// + /// The length is guaranteed to be in the closed interval `[1, 4]`. + pub fn len(&self) -> usize { + self.as_slice().len() + } + + /// Returns true if and only if a prefix of `bytes` matches this sequence + /// of byte ranges. + pub fn matches(&self, bytes: &[u8]) -> bool { + if bytes.len() < self.len() { + return false; + } + for (&b, r) in bytes.iter().zip(self) { + if !r.matches(b) { + return false; + } + } + true + } +} + +impl<'a> IntoIterator for &'a Utf8Sequence { + type IntoIter = slice::Iter<'a, Utf8Range>; + type Item = &'a Utf8Range; + + fn into_iter(self) -> Self::IntoIter { + self.as_slice().into_iter() + } +} + +impl fmt::Debug for Utf8Sequence { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + use self::Utf8Sequence::*; + match *self { + One(ref r) => write!(f, "{:?}", r), + Two(ref r) => write!(f, "{:?}{:?}", r[0], r[1]), + Three(ref r) => write!(f, "{:?}{:?}{:?}", r[0], r[1], r[2]), + Four(ref r) => write!(f, "{:?}{:?}{:?}{:?}", + r[0], r[1], r[2], r[3]), + } + } +} + +/// A single inclusive range of UTF-8 bytes. +#[derive(Clone, Copy, PartialEq, Eq)] +pub struct Utf8Range { + /// Start of byte range (inclusive). + pub start: u8, + /// End of byte range (inclusive). + pub end: u8, +} + +impl Utf8Range { + fn new(start: u8, end: u8) -> Self { + Utf8Range { start: start, end: end } + } + + /// Returns true if and only if the given byte is in this range. + pub fn matches(&self, b: u8) -> bool { + self.start <= b && b <= self.end + } +} + +impl fmt::Debug for Utf8Range { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + if self.start == self.end { + write!(f, "[{:X}]", self.start) + } else { + write!(f, "[{:X}-{:X}]", self.start, self.end) + } + } +} + +/// An iterator over ranges of matching UTF-8 byte sequences. +/// +/// The iteration represents an alternation of comprehensive byte sequences +/// that match precisely the set of UTF-8 encoded scalar values. +/// +/// A byte sequence corresponds to one of the scalar values in the range given +/// if and only if it completely matches exactly one of the sequences of byte +/// ranges produced by this iterator. +/// +/// Each sequence of byte ranges matches a unique set of bytes. That is, no two +/// sequences will match the same bytes. +/// +/// # Example +/// +/// This shows how to match an arbitrary byte sequence against a range of +/// scalar values. +/// +/// ```rust +/// use utf8_ranges::{Utf8Sequences, Utf8Sequence}; +/// +/// fn matches(seqs: &[Utf8Sequence], bytes: &[u8]) -> bool { +/// for range in seqs { +/// if range.matches(bytes) { +/// return true; +/// } +/// } +/// false +/// } +/// +/// // Test the basic multilingual plane. +/// let seqs: Vec<_> = Utf8Sequences::new('\u{0}', '\u{FFFF}').collect(); +/// +/// // UTF-8 encoding of 'a'. +/// assert!(matches(&seqs, &[0x61])); +/// // UTF-8 encoding of '☃' (`\u{2603}`). +/// assert!(matches(&seqs, &[0xE2, 0x98, 0x83])); +/// // UTF-8 encoding of `\u{10348}` (outside the BMP). +/// assert!(!matches(&seqs, &[0xF0, 0x90, 0x8D, 0x88])); +/// // Tries to match against a UTF-8 encoding of a surrogate codepoint, +/// // which is invalid UTF-8, and therefore fails, despite the fact that +/// // the corresponding codepoint (0xD800) falls in the range given. +/// assert!(!matches(&seqs, &[0xED, 0xA0, 0x80])); +/// // And fails against plain old invalid UTF-8. +/// assert!(!matches(&seqs, &[0xFF, 0xFF])); +/// ``` +/// +/// If this example seems circuitous, that's because it is! It's meant to be +/// illustrative. In practice, you could just try to decode your byte sequence +/// and compare it with the scalar value range directly. However, this is not +/// always possible (for example, in a byte based automaton). +pub struct Utf8Sequences { + range_stack: Vec<ScalarRange>, +} + +impl Utf8Sequences { + /// Create a new iterator over UTF-8 byte ranges for the scalar value range + /// given. + pub fn new(start: char, end: char) -> Self { + let mut it = Utf8Sequences { range_stack: vec![] }; + it.push(start as u32, end as u32); + it + } + + /// reset resets the scalar value range. + /// Any existing state is cleared, but resources may be reused. + /// + /// N.B. Benchmarks say that this method is dubious. + #[doc(hidden)] + pub fn reset(&mut self, start: char, end: char) { + self.range_stack.clear(); + self.push(start as u32, end as u32); + } + + fn push(&mut self, start: u32, end: u32) { + self.range_stack.push(ScalarRange { start: start, end: end }); + } +} + +struct ScalarRange { + start: u32, + end: u32, +} + +impl fmt::Debug for ScalarRange { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + write!(f, "ScalarRange({:X}, {:X})", self.start, self.end) + } +} + +impl Iterator for Utf8Sequences { + type Item = Utf8Sequence; + + fn next(&mut self) -> Option<Self::Item> { + 'TOP: + while let Some(mut r) = self.range_stack.pop() { + 'INNER: + loop { + if let Some((r1, r2)) = r.split() { + self.push(r2.start, r2.end); + r.start = r1.start; + r.end = r1.end; + continue 'INNER; + } + if !r.is_valid() { + continue 'TOP; + } + for i in 1..MAX_UTF8_BYTES { + let max = max_scalar_value(i); + if r.start <= max && max < r.end { + self.push(max + 1, r.end); + r.end = max; + continue 'INNER; + } + } + if let Some(ascii_range) = r.as_ascii() { + return Some(Utf8Sequence::One(ascii_range)); + } + for i in 1..MAX_UTF8_BYTES { + let m = (1 << (6 * i)) - 1; + if (r.start & !m) != (r.end & !m) { + if (r.start & m) != 0 { + self.push((r.start | m) + 1, r.end); + r.end = r.start | m; + continue 'INNER; + } + if (r.end & m) != m { + self.push(r.end & !m, r.end); + r.end = (r.end & !m) - 1; + continue 'INNER; + } + } + } + let mut start = [0; MAX_UTF8_BYTES]; + let mut end = [0; MAX_UTF8_BYTES]; + let n = r.encode(&mut start, &mut end); + return Some(Utf8Sequence::from_encoded_range( + &start[0..n], &end[0..n])); + } + } + None + } +} + +impl ScalarRange { + /// split splits this range if it overlaps with a surrogate codepoint. + /// + /// Either or both ranges may be invalid. + fn split(&self) -> Option<(ScalarRange, ScalarRange)> { + if self.start < 0xE000 && self.end > 0xD7FF { + Some((ScalarRange { + start: self.start, + end: 0xD7FF, + }, ScalarRange { + start: 0xE000, + end: self.end, + })) + } else { + None + } + } + + /// is_valid returns true if and only if start <= end. + fn is_valid(&self) -> bool { + self.start <= self.end + } + + /// as_ascii returns this range as a Utf8Range if and only if all scalar + /// values in this range can be encoded as a single byte. + fn as_ascii(&self) -> Option<Utf8Range> { + if self.is_ascii() { + Some(Utf8Range::new(self.start as u8, self.end as u8)) + } else { + None + } + } + + /// is_ascii returns true if the range is ASCII only (i.e., takes a single + /// byte to encode any scalar value). + fn is_ascii(&self) -> bool { + self.is_valid() && self.end <= 0x7f + } + + /// encode writes the UTF-8 encoding of the start and end of this range + /// to the corresponding destination slices. + /// + /// The slices should have room for at least `MAX_UTF8_BYTES`. + fn encode(&self, start: &mut [u8], end: &mut [u8]) -> usize { + let cs = char::from_u32(self.start).unwrap(); + let ce = char::from_u32(self.end).unwrap(); + let n = encode_utf8(cs, start).unwrap(); + let m = encode_utf8(ce, end).unwrap(); + assert_eq!(n, m); + n + } +} + +fn max_scalar_value(nbytes: usize) -> u32 { + match nbytes { + 1 => 0x007F, + 2 => 0x07FF, + 3 => 0xFFFF, + 4 => 0x10FFFF, + _ => unreachable!("invalid UTF-8 byte sequence size"), + } +} + +#[cfg(test)] +mod tests { + use quickcheck::{TestResult, quickcheck}; + + use char_utf8::encode_utf8; + use {MAX_UTF8_BYTES, Utf8Range, Utf8Sequences}; + + fn rutf8(s: u8, e: u8) -> Utf8Range { + Utf8Range::new(s, e) + } + + fn never_accepts_surrogate_codepoints(start: char, end: char) { + let mut buf = [0; MAX_UTF8_BYTES]; + for cp in 0xD800..0xE000 { + let c = unsafe { ::std::mem::transmute(cp) }; + let n = encode_utf8(c, &mut buf).unwrap(); + for r in Utf8Sequences::new(start, end) { + if r.matches(&buf[0..n]) { + panic!("Sequence ({:X}, {:X}) contains range {:?}, \ + which matches surrogate code point {:X} \ + with encoded bytes {:?}", + start as u32, end as u32, r, cp, &buf[0..n]); + } + } + } + } + + #[test] + fn codepoints_no_surrogates() { + never_accepts_surrogate_codepoints('\u{0}', '\u{FFFF}'); + never_accepts_surrogate_codepoints('\u{0}', '\u{10FFFF}'); + never_accepts_surrogate_codepoints('\u{0}', '\u{10FFFE}'); + never_accepts_surrogate_codepoints('\u{80}', '\u{10FFFF}'); + never_accepts_surrogate_codepoints('\u{D7FF}', '\u{E000}'); + } + + #[test] + fn qc_codepoints_no_surrogate() { + fn p(s: char, e: char) -> TestResult { + if s > e { + return TestResult::discard(); + } + never_accepts_surrogate_codepoints(s, e); + TestResult::passed() + } + quickcheck(p as fn(char, char) -> TestResult); + } + + #[test] + fn bmp() { + use Utf8Sequence::*; + + let seqs = Utf8Sequences::new('\u{0}', '\u{FFFF}') + .collect::<Vec<_>>(); + assert_eq!(seqs, vec![ + One(rutf8(0x0, 0x7F)), + Two([rutf8(0xC2, 0xDF), rutf8(0x80, 0xBF)]), + Three([rutf8(0xE0, 0xE0), rutf8(0xA0, 0xBF), rutf8(0x80, 0xBF)]), + Three([rutf8(0xE1, 0xEC), rutf8(0x80, 0xBF), rutf8(0x80, 0xBF)]), + Three([rutf8(0xED, 0xED), rutf8(0x80, 0x9F), rutf8(0x80, 0xBF)]), + Three([rutf8(0xEE, 0xEF), rutf8(0x80, 0xBF), rutf8(0x80, 0xBF)]), + ]); + } + + #[test] + fn scratch() { + for range in Utf8Sequences::new('\u{0}', '\u{FFFF}') { + println!("{:?}", range); + } + } +} diff --git a/deps/uuid-0.1.18/.gitignore b/deps/uuid-0.1.18/.gitignore deleted file mode 100644 index 4fffb2f89..000000000 --- a/deps/uuid-0.1.18/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/target -/Cargo.lock diff --git a/deps/uuid-0.1.18/.travis.yml b/deps/uuid-0.1.18/.travis.yml deleted file mode 100644 index f0abd5d0a..000000000 --- a/deps/uuid-0.1.18/.travis.yml +++ /dev/null @@ -1,28 +0,0 @@ -language: rust -rust: - - 1.0.0 - - beta - - nightly -sudo: false -script: - - cargo build --verbose - - cargo test --verbose - - | - [ $TRAVIS_RUST_VERSION != nightly ] || ( - cargo bench - ) - - cargo doc -after_success: | - [ $TRAVIS_BRANCH = master ] && - [ $TRAVIS_PULL_REQUEST = false ] && - [ $TRAVIS_RUST_VERSION = nightly ] && - echo '<meta http-equiv=refresh content=0;url=uuid/index.html>' > target/doc/index.html && - pip install ghp-import --user $USER && - $HOME/.local/bin/ghp-import -n target/doc && - git push -qf https://${TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages -env: - global: - secure: OiQj6NSyu634pS+qWCAeaibuBdiRsDMz5k0bi8hhdom3W24L8I9KkdWlBm2K8Ef97Uzgg6Xsr7LSWX0CONxX2eU3QaB1v3mXNxModa7ftW/w9y7B8MThxS5nRTUmHZC17OvoQ3EoNyrktnTAkyIr0E0YxBruJYAi4EH+54guRN8= -notifications: - email: - on_success: never diff --git a/deps/uuid-0.1.18/Cargo.toml b/deps/uuid-0.1.18/Cargo.toml deleted file mode 100644 index 98e59eb7a..000000000 --- a/deps/uuid-0.1.18/Cargo.toml +++ /dev/null @@ -1,18 +0,0 @@ -[package] - -name = "uuid" -version = "0.1.18" -authors = ["The Rust Project Developers"] -license = "MIT/Apache-2.0" -readme = "README.md" -repository = "https://github.com/rust-lang/uuid" -homepage = "https://github.com/rust-lang/uuid" -documentation = "https://doc.rust-lang.org/uuid" -description = """ -A library to generate and parse UUIDs. -""" - -[dependencies] -rustc-serialize = "0.3" -serde = { version = "^0.6.0", optional = true } -rand = "0.3" diff --git a/deps/uuid-0.1.18/LICENSE-APACHE b/deps/uuid-0.1.18/LICENSE-APACHE deleted file mode 100644 index 16fe87b06..000000000 --- a/deps/uuid-0.1.18/LICENSE-APACHE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - -Copyright [yyyy] [name of copyright owner] - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/deps/uuid-0.1.18/LICENSE-MIT b/deps/uuid-0.1.18/LICENSE-MIT deleted file mode 100644 index 39d4bdb5a..000000000 --- a/deps/uuid-0.1.18/LICENSE-MIT +++ /dev/null @@ -1,25 +0,0 @@ -Copyright (c) 2014 The Rust Project Developers - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. diff --git a/deps/uuid-0.1.18/README.md b/deps/uuid-0.1.18/README.md deleted file mode 100644 index f16fb8517..000000000 --- a/deps/uuid-0.1.18/README.md +++ /dev/null @@ -1,77 +0,0 @@ -uuid -==== - -[![Build Status](https://travis-ci.org/rust-lang-nursery/uuid.svg?branch=master)](https://travis-ci.org/rust-lang-nursery/uuid) -[![](http://meritbadge.herokuapp.com/uuid)](https://crates.io/crates/uuid) - -A Rust library to generate and parse UUIDs. - -Provides support for Universally Unique Identifiers (UUIDs). A UUID is a unique -128-bit number, stored as 16 octets. UUIDs are used to assign unique identifiers -to entities without requiring a central allocating authority. - -They are particularly useful in distributed systems, though can be used in -disparate areas, such as databases and network protocols. Typically a UUID is -displayed in a readable string form as a sequence of hexadecimal digits, -separated into groups by hyphens. - -The uniqueness property is not strictly guaranteed, however for all practical -purposes, it can be assumed that an unintentional collision would be extremely -unlikely. - -[Documentation](https://doc.rust-lang.org/uuid) - -## Usage - -Add this to your `Cargo.toml`: - -```toml -[dependencies] - -uuid = "0.1" -``` - -and this to your crate root: - -```rust -extern crate uuid; -``` - -## Examples - -To create a new random (V4) UUID and print it out in hexadecimal form: - -```rust -use uuid::Uuid; - -fn main() { - let my_uuid = Uuid::new_v4(); - println!("{}", my_uuid); -} -``` - -The library supports 5 versions of UUID: - -Name | Version ----------|---------- -Mac | Version 1: MAC address -Dce | Version 2: DCE Security -Md5 | Version 3: MD5 hash -Random | Version 4: Random -Sha1 | Version 5: SHA-1 hash - -To parse a simple UUID, then print the version and urn string format: - -```rust -use uuid::Uuid; - -fn main() { - let my_uuid = Uuid::parse_str("936DA01F9ABD4d9d80C702AF85C822A8").unwrap(); - println!("Parsed a version {} UUID.", my_uuid.get_version_num()); - println!("{}", my_uuid.to_urn_string()); -} -``` - -## References - -[Wikipedia: Universally Unique Identifier](https://en.wikipedia.org/wiki/Universally_unique_identifier) diff --git a/deps/uuid-0.1.18/benches/parse_str.rs b/deps/uuid-0.1.18/benches/parse_str.rs deleted file mode 100644 index c1ed5da8a..000000000 --- a/deps/uuid-0.1.18/benches/parse_str.rs +++ /dev/null @@ -1,87 +0,0 @@ -#![feature(test)] - -extern crate test; -extern crate uuid; - -use test::Bencher; -use uuid::Uuid; - -#[bench] -fn bench_parse(b: &mut Bencher) { - b.iter(|| { - let _ = Uuid::parse_str(""); - let _ = Uuid::parse_str("!"); - let _ = Uuid::parse_str("F9168C5E-CEB2-4faa-B6BF-329BF39FA1E45"); - let _ = Uuid::parse_str("F9168C5E-CEB2-4faa-BBF-329BF39FA1E4"); - let _ = Uuid::parse_str("F9168C5E-CEB2-4faa-BGBF-329BF39FA1E4"); - let _ = Uuid::parse_str("F9168C5E-CEB2-4faa-B6BFF329BF39FA1E4"); - let _ = Uuid::parse_str("F9168C5E-CEB2-4faa"); - let _ = Uuid::parse_str("F9168C5E-CEB2-4faaXB6BFF329BF39FA1E4"); - let _ = Uuid::parse_str("F9168C5E-CEB-24fa-eB6BFF32-BF39FA1E4"); - let _ = Uuid::parse_str("01020304-1112-2122-3132-41424344"); - let _ = Uuid::parse_str("67e5504410b1426f9247bb680e5fe0c88"); - let _ = Uuid::parse_str("67e5504410b1426f9247bb680e5fe0cg8"); - let _ = Uuid::parse_str("67e5504410b1426%9247bb680e5fe0c8"); - - // Valid - let _ = Uuid::parse_str("00000000000000000000000000000000"); - let _ = Uuid::parse_str("67e55044-10b1-426f-9247-bb680e5fe0c8"); - let _ = Uuid::parse_str("67e55044-10b1-426f-9247-bb680e5fe0c8"); - let _ = Uuid::parse_str("F9168C5E-CEB2-4faa-B6BF-329BF39FA1E4"); - let _ = Uuid::parse_str("67e5504410b1426f9247bb680e5fe0c8"); - let _ = Uuid::parse_str("01020304-1112-2122-3132-414243444546"); - let _ = Uuid::parse_str("urn:uuid:67e55044-10b1-426f-9247-bb680e5fe0c8"); - - // Nil - let _ = Uuid::parse_str("00000000000000000000000000000000"); - let _ = Uuid::parse_str("00000000-0000-0000-0000-000000000000"); - - // Test error reporting - let _ = Uuid::parse_str("67e5504410b1426f9247bb680e5fe0c"); - let _ = Uuid::parse_str("67e550X410b1426f9247bb680e5fe0cd"); - let _ = Uuid::parse_str("67e550-4105b1426f9247bb680e5fe0c"); - let _ = Uuid::parse_str("F9168C5E-CEB2-4faa-B6BF1-02BF39FA1E4"); - }); -} - -#[bench] -fn bench_parse_invalid_len(b: &mut Bencher) { - b.iter(|| { - let _ = Uuid::parse_str("F9168C5E-CEB2-4faa-BBF-329BF39FA1E4"); - }) -} - -#[bench] -fn bench_parse_invalid_character(b: &mut Bencher) { - b.iter(|| { - let _ = Uuid::parse_str("F9168C5E-CEB2-4faa-BGBF-329BF39FA1E4"); - }) -} - -#[bench] -fn bench_parse_invalid_group_len(b: &mut Bencher) { - b.iter(|| { - let _ = Uuid::parse_str("01020304-1112-2122-3132-41424344"); - }); -} - -#[bench] -fn bench_parse_invalid_groups(b: &mut Bencher) { - b.iter(|| { - let _ = Uuid::parse_str("F9168C5E-CEB2-4faa-B6BFF329BF39FA1E4"); - }); -} - -#[bench] -fn bench_valid_hyphenated(b: &mut Bencher) { - b.iter(|| { - let _ = Uuid::parse_str("67e55044-10b1-426f-9247-bb680e5fe0c8"); - }); -} - -#[bench] -fn bench_valid_short(b: &mut Bencher) { - b.iter(|| { - let _ = Uuid::parse_str("67e5504410b1426f9247bb680e5fe0c8"); - }); -} diff --git a/deps/uuid-0.1.18/src/lib.rs b/deps/uuid-0.1.18/src/lib.rs deleted file mode 100644 index 34e410345..000000000 --- a/deps/uuid-0.1.18/src/lib.rs +++ /dev/null @@ -1,913 +0,0 @@ -// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -//! Generate and parse UUIDs -//! -//! Provides support for Universally Unique Identifiers (UUIDs). A UUID is a -//! unique 128-bit number, stored as 16 octets. UUIDs are used to assign unique -//! identifiers to entities without requiring a central allocating authority. -//! -//! They are particularly useful in distributed systems, though can be used in -//! disparate areas, such as databases and network protocols. Typically a UUID is -//! displayed in a readable string form as a sequence of hexadecimal digits, -//! separated into groups by hyphens. -//! -//! The uniqueness property is not strictly guaranteed, however for all practical -//! purposes, it can be assumed that an unintentional collision would be extremely -//! unlikely. -//! -//! # Examples -//! -//! To create a new random (V4) UUID and print it out in hexadecimal form: -//! -//! ```rust -//! use uuid::Uuid; -//! -//! fn main() { -//! let my_uuid = Uuid::new_v4(); -//! println!("{}", my_uuid); -//! } -//! ``` -//! -//! To parse parse a UUID in the simple format and print it as a urn: -//! -//! ```rust -//! use uuid::Uuid; -//! -//! fn main() { -//! let my_uuid = Uuid::parse_str("936DA01F9ABD4d9d80C702AF85C822A8").unwrap(); -//! println!("{}", my_uuid.to_urn_string()); -//! } -//! ``` -//! -//! # Strings -//! -//! Examples of string representations: -//! -//! * simple: `936DA01F9ABD4d9d80C702AF85C822A8` -//! * hyphenated: `550e8400-e29b-41d4-a716-446655440000` -//! * urn: `urn:uuid:F9168C5E-CEB2-4faa-B6BF-329BF39FA1E4` -//! -//! # References -//! -//! * [Wikipedia: Universally Unique Identifier]( -//! http://en.wikipedia.org/wiki/Universally_unique_identifier) -//! * [RFC4122: A Universally Unique IDentifier (UUID) URN Namespace]( -//! http://tools.ietf.org/html/rfc4122) - -#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", - html_favicon_url = "https://www.rust-lang.org/favicon.ico", - html_root_url = "https://doc.rust-lang.org/uuid/")] - -#![cfg_attr(test, deny(warnings))] - -extern crate rustc_serialize; -#[cfg(feature = "serde")] -extern crate serde; -extern crate rand; - -use std::default::Default; -use std::error::Error; -use std::fmt; -use std::hash; -use std::iter::repeat; -use std::mem::{transmute, transmute_copy}; -use std::str::FromStr; - -use rand::Rng; -use rustc_serialize::{Encoder, Encodable, Decoder, Decodable}; -#[cfg(feature = "serde")] -use serde::{de, Deserialize, Deserializer, Serialize, Serializer}; - -/// A 128-bit (16 byte) buffer containing the ID -pub type UuidBytes = [u8; 16]; - -/// The version of the UUID, denoting the generating algorithm -#[derive(PartialEq, Copy, Clone)] -pub enum UuidVersion { - /// Version 1: MAC address - Mac = 1, - /// Version 2: DCE Security - Dce = 2, - /// Version 3: MD5 hash - Md5 = 3, - /// Version 4: Random - Random = 4, - /// Version 5: SHA-1 hash - Sha1 = 5, -} - -/// The reserved variants of UUIDs -#[derive(PartialEq, Copy, Clone)] -pub enum UuidVariant { - /// Reserved by the NCS for backward compatibility - NCS, - /// As described in the RFC4122 Specification (default) - RFC4122, - /// Reserved by Microsoft for backward compatibility - Microsoft, - /// Reserved for future expansion - Future, -} - -/// A Universally Unique Identifier (UUID) -#[derive(Copy, Clone)] -pub struct Uuid { - /// The 128-bit number stored in 16 bytes - bytes: UuidBytes, -} - -impl hash::Hash for Uuid { - fn hash<S: hash::Hasher>(&self, state: &mut S) { - self.bytes.hash(state) - } -} - -/// A UUID stored as fields (identical to UUID, used only for conversions) -#[derive(Copy, Clone)] -struct UuidFields { - /// First field, 32-bit word - data1: u32, - /// Second field, 16-bit short - data2: u16, - /// Third field, 16-bit short - data3: u16, - /// Fourth field, 8 bytes - data4: [u8; 8], -} - -/// Error details for string parsing failures -#[allow(missing_docs)] -#[derive(PartialEq, Eq, Copy, Clone, Debug)] -pub enum ParseError { - InvalidLength(usize), - InvalidCharacter(char, usize), - InvalidGroups(usize), - InvalidGroupLength(usize, usize, u8), -} - -/// Converts a ParseError to a string -impl fmt::Display for ParseError { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - match *self { - ParseError::InvalidLength(found) => - write!(f, - "Invalid length; expecting 32 or 36 chars, found {}", - found), - ParseError::InvalidCharacter(found, pos) => - write!(f, - "Invalid character; found `{}` (0x{:02x}) at offset {}", - found, - found as usize, - pos), - ParseError::InvalidGroups(found) => - write!(f, - "Malformed; wrong number of groups: expected 1 or 5, found {}", - found), - ParseError::InvalidGroupLength(group, found, expecting) => - write!(f, - "Malformed; length of group {} was {}, expecting {}", - group, - found, - expecting), - } - } -} - -impl Error for ParseError { - fn description(&self) -> &str { - "UUID parse error" - } -} - -// Length of each hyphenated group in hex digits. -const GROUP_LENS: [u8; 5] = [8, 4, 4, 4, 12]; -// Accumulated length of each hyphenated group in hex digits. -const ACC_GROUP_LENS: [u8; 5] = [8, 12, 16, 20, 32]; - -/// UUID support -impl Uuid { - /// Returns a nil or empty UUID (containing all zeroes) - pub fn nil() -> Uuid { - Uuid { bytes: [0; 16] } - } - - /// Create a new UUID of the specified version - pub fn new(v: UuidVersion) -> Option<Uuid> { - match v { - UuidVersion::Random => Some(Uuid::new_v4()), - _ => None, - } - } - - /// Creates a new random UUID - /// - /// Uses the `rand` module's default RNG task as the source - /// of random numbers. Use the rand::Rand trait to supply - /// a custom generator if required. - pub fn new_v4() -> Uuid { - let ub = rand::thread_rng().gen_iter::<u8>().take(16).collect::<Vec<_>>(); - let mut uuid = Uuid { bytes: [0; 16] }; - copy_memory(&mut uuid.bytes, &ub); - uuid.set_variant(UuidVariant::RFC4122); - uuid.set_version(UuidVersion::Random); - uuid - } - - /// Creates a UUID using the supplied field values - /// - /// # Arguments - /// * `d1` A 32-bit word - /// * `d2` A 16-bit word - /// * `d3` A 16-bit word - /// * `d4` Array of 8 octets - pub fn from_fields(d1: u32, d2: u16, d3: u16, d4: &[u8]) -> Uuid { - // First construct a temporary field-based struct - let mut fields = UuidFields { - data1: 0, - data2: 0, - data3: 0, - data4: [0; 8], - }; - - fields.data1 = d1.to_be(); - fields.data2 = d2.to_be(); - fields.data3 = d3.to_be(); - copy_memory(&mut fields.data4, d4); - - unsafe { transmute(fields) } - } - - /// Creates a UUID using the supplied bytes - /// - /// # Arguments - /// * `b` An array or slice of 16 bytes - pub fn from_bytes(b: &[u8]) -> Option<Uuid> { - if b.len() != 16 { - return None - } - - let mut uuid = Uuid { bytes: [0; 16] }; - copy_memory(&mut uuid.bytes, b); - Some(uuid) - } - - /// Specifies the variant of the UUID structure - fn set_variant(&mut self, v: UuidVariant) { - // Octet 8 contains the variant in the most significant 3 bits - self.bytes[8] = match v { - UuidVariant::NCS => self.bytes[8] & 0x7f, // b0xx... - UuidVariant::RFC4122 => (self.bytes[8] & 0x3f) | 0x80, // b10x... - UuidVariant::Microsoft => (self.bytes[8] & 0x1f) | 0xc0, // b110... - UuidVariant::Future => (self.bytes[8] & 0x1f) | 0xe0, // b111... - } - } - - /// Returns the variant of the UUID structure - /// - /// This determines the interpretation of the structure of the UUID. - /// Currently only the RFC4122 variant is generated by this module. - /// - /// * [Variant Reference](http://tools.ietf.org/html/rfc4122#section-4.1.1) - pub fn get_variant(&self) -> Option<UuidVariant> { - match self.bytes[8] { - x if x & 0x80 == 0x00 => Some(UuidVariant::NCS), - x if x & 0xc0 == 0x80 => Some(UuidVariant::RFC4122), - x if x & 0xe0 == 0xc0 => Some(UuidVariant::Microsoft), - x if x & 0xe0 == 0xe0 => Some(UuidVariant::Future), - _ => None, - } - } - - /// Specifies the version number of the UUID - fn set_version(&mut self, v: UuidVersion) { - self.bytes[6] = (self.bytes[6] & 0xF) | ((v as u8) << 4); - } - - /// Returns the version number of the UUID - /// - /// This represents the algorithm used to generate the contents. - /// - /// Currently only the Random (V4) algorithm is supported by this - /// module. There are security and privacy implications for using - /// older versions - see [Wikipedia: Universally Unique Identifier]( - /// http://en.wikipedia.org/wiki/Universally_unique_identifier) for - /// details. - /// - /// * [Version Reference](http://tools.ietf.org/html/rfc4122#section-4.1.3) - pub fn get_version_num(&self) -> usize { - (self.bytes[6] >> 4) as usize - } - - /// Returns the version of the UUID - /// - /// This represents the algorithm used to generate the contents - pub fn get_version(&self) -> Option<UuidVersion> { - let v = self.bytes[6] >> 4; - match v { - 1 => Some(UuidVersion::Mac), - 2 => Some(UuidVersion::Dce), - 3 => Some(UuidVersion::Md5), - 4 => Some(UuidVersion::Random), - 5 => Some(UuidVersion::Sha1), - _ => None, - } - } - - /// Return an array of 16 octets containing the UUID data - pub fn as_bytes<'a>(&'a self) -> &'a [u8] { - &self.bytes - } - - /// Returns the UUID as a string of 32 hexadecimal digits - /// - /// Example: `936DA01F9ABD4d9d80C702AF85C822A8` - pub fn to_simple_string(&self) -> String { - let mut s = repeat(0u8).take(32).collect::<Vec<_>>(); - for i in 0..16 { - let digit = format!("{:02x}", self.bytes[i] as usize); - s[i * 2 + 0] = digit.as_bytes()[0]; - s[i * 2 + 1] = digit.as_bytes()[1]; - } - String::from_utf8(s).unwrap() - } - - /// Returns a string of hexadecimal digits, separated into groups with a hyphen. - /// - /// Example: `550e8400-e29b-41d4-a716-446655440000` - pub fn to_hyphenated_string(&self) -> String { - // Convert to field-based struct as it matches groups in output. - // Ensure fields are in network byte order, as per RFC. - let mut uf: UuidFields; - unsafe { - uf = transmute_copy(&self.bytes); - } - uf.data1 = uf.data1.to_be(); - uf.data2 = uf.data2.to_be(); - uf.data3 = uf.data3.to_be(); - let s = format!("{:08x}-{:04x}-{:04x}-{:02x}{:02x}-{:02x}{:02x}{:02x}{:02x}{:02x}{:02x}", - uf.data1, - uf.data2, - uf.data3, - uf.data4[0], - uf.data4[1], - uf.data4[2], - uf.data4[3], - uf.data4[4], - uf.data4[5], - uf.data4[6], - uf.data4[7]); - s - } - - /// Returns the UUID formatted as a full URN string - /// - /// This is the same as the hyphenated format, but with the "urn:uuid:" prefix. - /// - /// Example: `urn:uuid:F9168C5E-CEB2-4faa-B6BF-329BF39FA1E4` - pub fn to_urn_string(&self) -> String { - format!("urn:uuid:{}", self.to_hyphenated_string()) - } - - /// Parses a UUID from a string of hexadecimal digits with optional hyphens - /// - /// Any of the formats generated by this module (simple, hyphenated, urn) are - /// supported by this parsing function. - pub fn parse_str(mut input: &str) -> Result<Uuid, ParseError> { - // Ensure length is valid for any of the supported formats - let len = input.len(); - if len == 45 && input.starts_with("urn:uuid:") { - input = &input[9..]; - } else if len != 32 && len != 36 { - return Err(ParseError::InvalidLength(len)); - } - - // `digit` counts only hexadecimal digits, `i_char` counts all chars. - let mut digit = 0; - let mut group = 0; - let mut acc = 0; - let mut buffer = [0u8; 16]; - - for (i_char, chr) in input.chars().enumerate() { - if digit % 2 == 0 { - // First digit of the byte. - match chr { - // Calulate upper half. - '0'...'9' => acc = chr as u8 - '0' as u8, - 'a'...'f' => acc = chr as u8 - 'a' as u8 + 10, - 'A'...'F' => acc = chr as u8 - 'A' as u8 + 10, - // Found a group delimiter - '-' => { - if ACC_GROUP_LENS[group] != digit { - // Calculate how many digits this group consists of in the input. - let found = if group > 0 { - digit - ACC_GROUP_LENS[group - 1] - } else { - digit - }; - return Err(ParseError::InvalidGroupLength(group, - found as usize, - GROUP_LENS[group])); - } - // Next group, decrement digit, it is incremented again at the bottom. - group += 1; - digit -= 1; - } - _ => return Err(ParseError::InvalidCharacter(chr, i_char)), - } - } else { - // Second digit of the byte, shift the upper half. - acc *= 16; - match chr { - '0'...'9' => acc += chr as u8 - '0' as u8, - 'a'...'f' => acc += chr as u8 - 'a' as u8 + 10, - 'A'...'F' => acc += chr as u8 - 'A' as u8 + 10, - '-' => { - // The byte isn't complete yet. - let found = if group > 0 { - digit - ACC_GROUP_LENS[group - 1] - } else { - digit - }; - return Err(ParseError::InvalidGroupLength(group, - found as usize, - GROUP_LENS[group])); - } - _ => return Err(ParseError::InvalidCharacter(chr, i_char)), - } - buffer[(digit / 2) as usize] = acc; - } - digit += 1; - } - - // Now check the last group. - if group != 0 && group != 4 { - return Err(ParseError::InvalidGroups(group + 1)); - } else if ACC_GROUP_LENS[4] != digit { - return Err(ParseError::InvalidGroupLength(group, - (digit - ACC_GROUP_LENS[3]) as usize, - GROUP_LENS[4])); - } - - Ok(Uuid::from_bytes(&mut buffer).unwrap()) - } - - /// Tests if the UUID is nil - pub fn is_nil(&self) -> bool { - self.bytes.iter().all(|&b| b == 0) - } -} - -fn copy_memory(dst: &mut [u8], src: &[u8]) { - for (slot, val) in dst.iter_mut().zip(src.iter()) { - *slot = *val; - } -} - -impl Default for Uuid { - /// Returns the nil UUID, which is all zeroes - fn default() -> Uuid { - Uuid::nil() - } -} - -impl FromStr for Uuid { - type Err = ParseError; - - /// Parse a hex string and interpret as a UUID - /// - /// Accepted formats are a sequence of 32 hexadecimal characters, - /// with or without hyphens (grouped as 8, 4, 4, 4, 12). - fn from_str(us: &str) -> Result<Uuid, ParseError> { - Uuid::parse_str(us) - } -} - -/// Convert the UUID to a hexadecimal-based string representation wrapped in `Uuid()` -impl fmt::Debug for Uuid { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "Uuid(\"{}\")", self.to_hyphenated_string()) - } -} - -/// Convert the UUID to a hexadecimal-based string representation -impl fmt::Display for Uuid { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "{}", self.to_hyphenated_string()) - } -} - -/// Test two UUIDs for equality -/// -/// UUIDs are equal only when they are byte-for-byte identical -impl PartialEq for Uuid { - fn eq(&self, other: &Uuid) -> bool { - self.bytes == other.bytes - } -} - -impl Eq for Uuid {} - -// FIXME #9845: Test these more thoroughly -impl Encodable for Uuid { - /// Encode a UUID as a hyphenated string - fn encode<E: Encoder>(&self, e: &mut E) -> Result<(), E::Error> { - e.emit_str(&self.to_hyphenated_string()) - } -} - -impl Decodable for Uuid { - /// Decode a UUID from a string - fn decode<D: Decoder>(d: &mut D) -> Result<Uuid, D::Error> { - let string = try!(d.read_str()); - string.parse().map_err(|err| d.error(&format!("{}", err))) - } -} - -#[cfg(feature = "serde")] -impl Serialize for Uuid { - fn serialize<S: Serializer>(&self, serializer: &mut S) -> Result<(), S::Error> { - serializer.visit_str(&self.to_hyphenated_string()) - } -} - -#[cfg(feature = "serde")] -impl Deserialize for Uuid { - fn deserialize<D: Deserializer>(deserializer: &mut D) -> Result<Self, D::Error> { - struct UuidVisitor; - - impl de::Visitor for UuidVisitor { - type Value = Uuid; - - fn visit_str<E: de::Error>(&mut self, value: &str) -> Result<Uuid, E> { - value.parse().map_err(|err| E::syntax(&format!("{}", err))) - } - - fn visit_bytes<E: de::Error>(&mut self, value: &[u8]) -> Result<Uuid, E> { - Uuid::from_bytes(value).ok_or(E::syntax("Expected 16 bytes.")) - } - } - - deserializer.visit(UuidVisitor) - } -} - -/// Generates a random instance of UUID (V4 conformant) -impl rand::Rand for Uuid { - #[inline] - fn rand<R: rand::Rng>(rng: &mut R) -> Uuid { - let ub = rng.gen_iter::<u8>().take(16).collect::<Vec<_>>(); - let mut uuid = Uuid { bytes: [0; 16] }; - copy_memory(&mut uuid.bytes, &ub); - uuid.set_variant(UuidVariant::RFC4122); - uuid.set_version(UuidVersion::Random); - uuid - } -} - -#[cfg(test)] -mod tests { - use super::{Uuid, UuidVariant, UuidVersion}; - use rand; - - #[test] - fn test_nil() { - let nil = Uuid::nil(); - let not_nil = Uuid::new_v4(); - - assert!(nil.is_nil()); - assert!(!not_nil.is_nil()); - } - - #[test] - fn test_new() { - // Supported - let uuid1 = Uuid::new(UuidVersion::Random).unwrap(); - let s = uuid1.to_simple_string(); - - assert!(s.len() == 32); - assert!(uuid1.get_version().unwrap() == UuidVersion::Random); - - // Test unsupported versions - assert!(Uuid::new(UuidVersion::Mac) == None); - assert!(Uuid::new(UuidVersion::Dce) == None); - assert!(Uuid::new(UuidVersion::Md5) == None); - assert!(Uuid::new(UuidVersion::Sha1) == None); - } - - #[test] - fn test_new_v4() { - let uuid1 = Uuid::new_v4(); - - assert!(uuid1.get_version().unwrap() == UuidVersion::Random); - assert!(uuid1.get_variant().unwrap() == UuidVariant::RFC4122); - } - - #[test] - fn test_get_version() { - let uuid1 = Uuid::new_v4(); - - assert!(uuid1.get_version().unwrap() == UuidVersion::Random); - assert!(uuid1.get_version_num() == 4); - } - - #[test] - fn test_get_variant() { - let uuid1 = Uuid::new_v4(); - let uuid2 = Uuid::parse_str("550e8400-e29b-41d4-a716-446655440000").unwrap(); - let uuid3 = Uuid::parse_str("67e55044-10b1-426f-9247-bb680e5fe0c8").unwrap(); - let uuid4 = Uuid::parse_str("936DA01F9ABD4d9dC0C702AF85C822A8").unwrap(); - let uuid5 = Uuid::parse_str("F9168C5E-CEB2-4faa-D6BF-329BF39FA1E4").unwrap(); - let uuid6 = Uuid::parse_str("f81d4fae-7dec-11d0-7765-00a0c91e6bf6").unwrap(); - - assert!(uuid1.get_variant().unwrap() == UuidVariant::RFC4122); - assert!(uuid2.get_variant().unwrap() == UuidVariant::RFC4122); - assert!(uuid3.get_variant().unwrap() == UuidVariant::RFC4122); - assert!(uuid4.get_variant().unwrap() == UuidVariant::Microsoft); - assert!(uuid5.get_variant().unwrap() == UuidVariant::Microsoft); - assert!(uuid6.get_variant().unwrap() == UuidVariant::NCS); - } - - #[test] - fn test_parse_uuid_v4() { - use super::ParseError::*; - - // Invalid - assert_eq!(Uuid::parse_str(""), Err(InvalidLength(0))); - assert_eq!(Uuid::parse_str("!"), Err(InvalidLength(1))); - assert_eq!(Uuid::parse_str("F9168C5E-CEB2-4faa-B6BF-329BF39FA1E45"), - Err(InvalidLength(37))); - assert_eq!(Uuid::parse_str("F9168C5E-CEB2-4faa-BBF-329BF39FA1E4"), - Err(InvalidLength(35))); - assert_eq!(Uuid::parse_str("F9168C5E-CEB2-4faa-BGBF-329BF39FA1E4"), - Err(InvalidCharacter('G', 20))); - assert_eq!(Uuid::parse_str("F9168C5E-CEB2-4faa-B6BFF329BF39FA1E4"), - Err(InvalidGroups(4))); - assert_eq!(Uuid::parse_str("F9168C5E-CEB2-4faa"), - Err(InvalidLength(18))); - assert_eq!(Uuid::parse_str("F9168C5E-CEB2-4faaXB6BFF329BF39FA1E4"), - Err(InvalidCharacter('X', 18))); - assert_eq!(Uuid::parse_str("F9168C5E-CEB-24fa-eB6BFF32-BF39FA1E4"), - Err(InvalidGroupLength(1, 3, 4))); - assert_eq!(Uuid::parse_str("01020304-1112-2122-3132-41424344"), - Err(InvalidGroupLength(4, 8, 12))); - assert_eq!(Uuid::parse_str("67e5504410b1426f9247bb680e5fe0c"), - Err(InvalidLength(31))); - assert_eq!(Uuid::parse_str("67e5504410b1426f9247bb680e5fe0c88"), - Err(InvalidLength(33))); - assert_eq!(Uuid::parse_str("67e5504410b1426f9247bb680e5fe0cg8"), - Err(InvalidLength(33))); - assert_eq!(Uuid::parse_str("67e5504410b1426%9247bb680e5fe0c8"), - Err(InvalidCharacter('%', 15))); - - // Valid - assert!(Uuid::parse_str("00000000000000000000000000000000").is_ok()); - assert!(Uuid::parse_str("67e55044-10b1-426f-9247-bb680e5fe0c8").is_ok()); - assert!(Uuid::parse_str("F9168C5E-CEB2-4faa-B6BF-329BF39FA1E4").is_ok()); - assert!(Uuid::parse_str("67e5504410b1426f9247bb680e5fe0c8").is_ok()); - assert!(Uuid::parse_str("01020304-1112-2122-3132-414243444546").is_ok()); - assert!(Uuid::parse_str("urn:uuid:67e55044-10b1-426f-9247-bb680e5fe0c8").is_ok()); - - // Nil - let nil = Uuid::nil(); - assert!(Uuid::parse_str("00000000000000000000000000000000").unwrap() == nil); - assert!(Uuid::parse_str("00000000-0000-0000-0000-000000000000").unwrap() == nil); - - // Round-trip - let uuid_orig = Uuid::new_v4(); - let orig_str = uuid_orig.to_string(); - let uuid_out = Uuid::parse_str(&orig_str).unwrap(); - assert!(uuid_orig == uuid_out); - - // Test error reporting - assert_eq!(Uuid::parse_str("67e5504410b1426f9247bb680e5fe0c"), - Err(InvalidLength(31))); - assert_eq!(Uuid::parse_str("67e550X410b1426f9247bb680e5fe0cd"), - Err(InvalidCharacter('X', 6))); - assert_eq!(Uuid::parse_str("67e550-4105b1426f9247bb680e5fe0c"), - Err(InvalidGroupLength(0, 6, 8))); - assert_eq!(Uuid::parse_str("F9168C5E-CEB2-4faa-B6BF1-02BF39FA1E4"), - Err(InvalidGroupLength(3, 5, 4))); - } - - #[test] - fn test_to_simple_string() { - let uuid1 = Uuid::new_v4(); - let s = uuid1.to_simple_string(); - - assert!(s.len() == 32); - assert!(s.chars().all(|c| c.is_digit(16))); - } - - #[test] - fn test_to_string() { - let uuid1 = Uuid::new_v4(); - let s = uuid1.to_string(); - - assert!(s.len() == 36); - assert!(s.chars().all(|c| c.is_digit(16) || c == '-')); - } - - #[test] - fn test_to_hyphenated_string() { - let uuid1 = Uuid::new_v4(); - let s = uuid1.to_hyphenated_string(); - - assert!(s.len() == 36); - assert!(s.chars().all(|c| c.is_digit(16) || c == '-')); - } - - #[test] - fn test_to_urn_string() { - let uuid1 = Uuid::new_v4(); - let ss = uuid1.to_urn_string(); - let s = &ss[9..]; - - assert!(ss.starts_with("urn:uuid:")); - assert!(s.len() == 36); - assert!(s.chars().all(|c| c.is_digit(16) || c == '-')); - } - - #[test] - fn test_to_simple_string_matching() { - let uuid1 = Uuid::new_v4(); - - let hs = uuid1.to_hyphenated_string(); - let ss = uuid1.to_simple_string(); - - let hsn = hs.chars().filter(|&c| c != '-').collect::<String>(); - - assert!(hsn == ss); - } - - #[test] - fn test_string_roundtrip() { - let uuid = Uuid::new_v4(); - - let hs = uuid.to_hyphenated_string(); - let uuid_hs = Uuid::parse_str(&hs).unwrap(); - assert!(uuid_hs == uuid); - - let ss = uuid.to_string(); - let uuid_ss = Uuid::parse_str(&ss).unwrap(); - assert!(uuid_ss == uuid); - } - - #[test] - fn test_compare() { - let uuid1 = Uuid::new_v4(); - let uuid2 = Uuid::new_v4(); - - assert!(uuid1 == uuid1); - assert!(uuid2 == uuid2); - assert!(uuid1 != uuid2); - assert!(uuid2 != uuid1); - } - - #[test] - fn test_from_fields() { - let d1: u32 = 0xa1a2a3a4; - let d2: u16 = 0xb1b2; - let d3: u16 = 0xc1c2; - let d4: Vec<u8> = vec!(0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8); - - let u = Uuid::from_fields(d1, d2, d3, &d4); - - let expected = "a1a2a3a4b1b2c1c2d1d2d3d4d5d6d7d8".to_string(); - let result = u.to_simple_string(); - assert!(result == expected); - } - - #[test] - fn test_from_bytes() { - let b = vec!(0xa1, - 0xa2, - 0xa3, - 0xa4, - 0xb1, - 0xb2, - 0xc1, - 0xc2, - 0xd1, - 0xd2, - 0xd3, - 0xd4, - 0xd5, - 0xd6, - 0xd7, - 0xd8); - - let u = Uuid::from_bytes(&b).unwrap(); - let expected = "a1a2a3a4b1b2c1c2d1d2d3d4d5d6d7d8".to_string(); - - assert!(u.to_simple_string() == expected); - } - - #[test] - fn test_as_bytes() { - let u = Uuid::new_v4(); - let ub = u.as_bytes(); - - assert!(ub.len() == 16); - assert!(!ub.iter().all(|&b| b == 0)); - } - - #[test] - fn test_bytes_roundtrip() { - let b_in: [u8; 16] = [0xa1, 0xa2, 0xa3, 0xa4, 0xb1, 0xb2, 0xc1, 0xc2, 0xd1, 0xd2, 0xd3, - 0xd4, 0xd5, 0xd6, 0xd7, 0xd8]; - - let u = Uuid::from_bytes(&b_in).unwrap(); - - let b_out = u.as_bytes(); - - assert_eq!(&b_in, b_out); - } - - #[test] - fn test_operator_eq() { - let u1 = Uuid::new_v4(); - let u2 = u1.clone(); - let u3 = Uuid::new_v4(); - - assert!(u1 == u1); - assert!(u1 == u2); - assert!(u2 == u1); - - assert!(u1 != u3); - assert!(u3 != u1); - assert!(u2 != u3); - assert!(u3 != u2); - } - - #[test] - fn test_rand_rand() { - let mut rng = rand::thread_rng(); - let u: Uuid = rand::Rand::rand(&mut rng); - let ub = u.as_bytes(); - - assert!(ub.len() == 16); - assert!(!ub.iter().all(|&b| b == 0)); - } - - #[test] - fn test_serialize_round_trip() { - use rustc_serialize::json; - - let u = Uuid::new_v4(); - let s = json::encode(&u).unwrap(); - let u2 = json::decode(&s).unwrap(); - assert_eq!(u, u2); - } - - #[test] - fn test_iterbytes_impl_for_uuid() { - use std::collections::HashSet; - let mut set = HashSet::new(); - let id1 = Uuid::new_v4(); - let id2 = Uuid::new_v4(); - set.insert(id1.clone()); - assert!(set.contains(&id1)); - assert!(!set.contains(&id2)); - } -} - -/* -TODO: when benchmarking is stable, re-add these -#[cfg(test)] -mod bench { - extern crate test; - use self::test::Bencher; - use super::Uuid; - - #[bench] - pub fn create_uuids(b: &mut Bencher) { - b.iter(|| { - Uuid::new_v4(); - }) - } - - #[bench] - pub fn uuid_to_string(b: &mut Bencher) { - let u = Uuid::new_v4(); - b.iter(|| { - u.to_string(); - }) - } - - #[bench] - pub fn parse_str(b: &mut Bencher) { - let s = "urn:uuid:F9168C5E-CEB2-4faa-B6BF-329BF39FA1E4"; - b.iter(|| { - Uuid::parse_str(s).unwrap(); - }) - } -} -*/ diff --git a/deps/winapi-0.2.5/.travis.yml b/deps/winapi-0.2.5/.travis.yml deleted file mode 100644 index 3ee86c043..000000000 --- a/deps/winapi-0.2.5/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -language: rust -sudo: false -script: - - cargo build - - cargo package - - cargo test - - cargo doc -notifications: - email: false - webhooks: - - https://webhooks.gitter.im/e/295a1e640ebd30d63457 - irc: - channels: - - "irc.mozilla.org#winapi" - template: - - "%{repository_slug}/%{branch} (%{commit} - %{author}): %{message}" - skip_join: true diff --git a/deps/winapi-0.2.5/Cargo.toml b/deps/winapi-0.2.5/Cargo.toml deleted file mode 100644 index 2b0889df4..000000000 --- a/deps/winapi-0.2.5/Cargo.toml +++ /dev/null @@ -1,52 +0,0 @@ -[package] -name = "winapi" -version = "0.2.5" -authors = ["Peter Atashian <retep998@gmail.com>"] -description = "Types and constants for WinAPI bindings. See README for list of crates providing function bindings." -documentation = "https://retep998.github.io/doc/winapi/" -repository = "https://github.com/retep998/winapi-rs" -readme = "README.md" -keywords = ["windows", "ffi", "win32", "com", "directx"] -license = "MIT" - -[dev-dependencies] -advapi32-sys = { version = "*", path = "lib/advapi32" } -bcrypt-sys = { version = "*", path = "lib/bcrypt" } -comctl32-sys = { version = "*", path = "lib/comctl32" } -comdlg32-sys = { version = "*", path = "lib/comdlg32" } -credui-sys = { version = "*", path = "lib/credui" } -crypt32-sys = { version = "*", path = "lib/crypt32" } -d2d1-sys = { version = "*", path = "lib/d2d1" } -d3d11-sys = { version = "*", path = "lib/d3d11" } -d3d12-sys = { version = "*", path = "lib/d3d12" } -d3d9-sys = { version = "*", path = "lib/d3d9" } -dbghelp-sys = { version = "*", path = "lib/dbghelp" } -dsound-sys = { version = "*", path = "lib/dsound" } -dwmapi-sys = { version = "*", path = "lib/dwmapi" } -dwrite-sys = { version = "*", path = "lib/dwrite" } -dxgi-sys = { version = "*", path = "lib/dxgi" } -dxguid-sys = { version = "*", path = "lib/dxguid" } -gdi32-sys = { version = "*", path = "lib/gdi32" } -httpapi-sys = { version = "*", path = "lib/httpapi" } -kernel32-sys = { version = "*", path = "lib/kernel32" } -ktmw32-sys = { version = "*", path = "lib/ktmw32" } -mpr-sys = { version = "*", path = "lib/mpr" } -netapi32-sys = { version = "*", path = "lib/netapi32" } -ole32-sys = { version = "*", path = "lib/ole32" } -oleaut32-sys = { version = "*", path = "lib/oleaut32" } -opengl32-sys = { version = "*", path = "lib/opengl32" } -psapi-sys = { version = "*", path = "lib/psapi" } -secur32-sys = { version = "*", path = "lib/secur32" } -setupapi-sys = { version = "*", path = "lib/setupapi" } -shell32-sys = { version = "*", path = "lib/shell32" } -user32-sys = { version = "*", path = "lib/user32" } -usp10-sys = { version = "*", path = "lib/usp10" } -uuid-sys = { version = "*", path = "lib/uuid" } -vssapi-sys = { version = "*", path = "lib/vssapi" } -wevtapi-sys = { version = "*", path = "lib/wevtapi" } -winhttp-sys = { version = "*", path = "lib/winhttp" } -winmm-sys = { version = "*", path = "lib/winmm" } -winscard-sys = { version = "*", path = "lib/winscard" } -winspool-sys = { version = "*", path = "lib/winspool" } -ws2_32-sys = { version = "*", path = "lib/ws2_32" } -xinput-sys = { version = "*", path = "lib/xinput" } diff --git a/deps/winapi-0.2.5/README.md b/deps/winapi-0.2.5/README.md deleted file mode 100644 index 936160ea1..000000000 --- a/deps/winapi-0.2.5/README.md +++ /dev/null @@ -1,458 +0,0 @@ -# winapi-rs [![Build status](https://ci.appveyor.com/api/projects/status/i47oonf5e7qm5utq/branch/master?svg=true)](https://ci.appveyor.com/project/retep998/winapi-rs/branch/master) [![Build Status](https://travis-ci.org/retep998/winapi-rs.svg?branch=master)](https://travis-ci.org/retep998/winapi-rs) [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/retep998/winapi-rs) [![Crates.io](https://img.shields.io/crates/v/winapi.svg)](https://crates.io/crates/winapi) # - -[Documentation](https://retep998.github.io/doc/winapi/) - -Official IRC channel: #winapi on [Mozilla IRC](https://wiki.mozilla.org/IRC) - -This crate provides types and constants for WinAPI FFI bindings. They are gathered by hand using the Windows 8.1 SDK from Microsoft. I aim to replace all existing Windows FFI in other crates with this set of crates through the "[Embrace, extend, and extinguish](http://en.wikipedia.org/wiki/Embrace,_extend_and_extinguish)" technique. - -If this crate is missing something you need, feel free to create an issue, open a pull request, or contact me via [other means](http://www.rustaceans.org/retep998). - -As of version 0.2, this crate depends on Rust 1.1 (in order to lose the dependency on libc). If you need compatibility with Rust 1.0 you must continue to use older 0.1.x versions. - -## Example ## - -Cargo.toml: -```toml -[dependencies] -winapi = "0.2" -winmm-sys = "0.1" -``` -example.rs: -```Rust -extern crate winapi; -extern crate winmm; -fn func() { - winmm::PlaySoundA(...); -} -``` - -## Functions ## - -Bindings to library functions are in separate crates. The source to each crate is in the relevant subdirectory under the `lib` directory. - -### Usable crates ### -These are the ones that actually have functions in them: -* [advapi32-sys ![Crates.io](https://img.shields.io/crates/v/advapi32-sys.svg)](https://crates.io/crates/advapi32-sys) -* [crypt32-sys ![Crates.io](https://img.shields.io/crates/v/crypt32-sys.svg)](https://crates.io/crates/crypt32-sys) -* [d3d9-sys ![Crates.io](https://img.shields.io/crates/v/d3d9-sys.svg)](https://crates.io/crates/d3d9-sys) -* [d3d11-sys ![Crates.io](https://img.shields.io/crates/v/d3d11-sys.svg)](https://crates.io/crates/d3d11-sys) -* [dbghelp-sys ![Crates.io](https://img.shields.io/crates/v/dbghelp-sys.svg)](https://crates.io/crates/dbghelp-sys) -* [dsound-sys ![Crates.io](https://img.shields.io/crates/v/dsound-sys.svg)](https://crates.io/crates/dsound-sys) -* [dwmapi-sys ![Crates.io](https://img.shields.io/crates/v/dwmapi-sys.svg)](https://crates.io/crates/dwmapi-sys) -* [gdi32-sys ![Crates.io](https://img.shields.io/crates/v/gdi32-sys.svg)](https://crates.io/crates/gdi32-sys) -* [kernel32-sys ![Crates.io](https://img.shields.io/crates/v/kernel32-sys.svg)](https://crates.io/crates/kernel32-sys) -* [ktmw32-sys ![Crates.io](https://img.shields.io/crates/v/ktmw32-sys.svg)](https://crates.io/crates/ktmw32-sys) -* [mpr-sys ![Crates.io](https://img.shields.io/crates/v/mpr-sys.svg)](https://crates.io/crates/mpr-sys) -* [ole32-sys ![Crates.io](https://img.shields.io/crates/v/ole32-sys.svg)](https://crates.io/crates/ole32-sys) -* [oleaut32-sys ![Crates.io](https://img.shields.io/crates/v/oleaut32-sys.svg)](https://crates.io/crates/oleaut32-sys) -* [opengl32-sys ![Crates.io](https://img.shields.io/crates/v/opengl32-sys.svg)](https://crates.io/crates/opengl32-sys) -* [psapi-sys ![Crates.io](https://img.shields.io/crates/v/psapi-sys.svg)](https://crates.io/crates/psapi-sys) -* [secur32-sys ![Crates.io](https://img.shields.io/crates/v/secur32-sys.svg)](https://crates.io/crates/secur32-sys) -* [shell32-sys ![Crates.io](https://img.shields.io/crates/v/shell32-sys.svg)](https://crates.io/crates/shell32-sys) -* [user32-sys ![Crates.io](https://img.shields.io/crates/v/user32-sys.svg)](https://crates.io/crates/user32-sys) -* [uuid-sys ![Crates.io](https://img.shields.io/crates/v/uuid-sys.svg)](https://crates.io/crates/uuid-sys) -* [vssapi-sys ![Crates.io](https://img.shields.io/crates/v/vssapi-sys.svg)](https://crates.io/crates/vssapi-sys) -* [winmm-sys ![Crates.io](https://img.shields.io/crates/v/winmm-sys.svg)](https://crates.io/crates/winmm-sys) -* [ws2_32-sys ![Crates.io](https://img.shields.io/crates/v/ws2_32-sys.svg)](https://crates.io/crates/ws2_32-sys) -* [xinput-sys ![Crates.io](https://img.shields.io/crates/v/xinput-sys.svg)](https://crates.io/crates/xinput-sys) - -### Reserved crates ### -These are the ones that are reserved for future use: -* [aclui-sys ![Crates.io](https://img.shields.io/crates/v/aclui-sys.svg)](https://crates.io/crates/aclui-sys) -* [activeds-sys ![Crates.io](https://img.shields.io/crates/v/activeds-sys.svg)](https://crates.io/crates/activeds-sys) -* [adsiid-sys ![Crates.io](https://img.shields.io/crates/v/adsiid-sys.svg)](https://crates.io/crates/adsiid-sys) -* [advpack-sys ![Crates.io](https://img.shields.io/crates/v/advpack-sys.svg)](https://crates.io/crates/advpack-sys) -* [ahadmin-sys ![Crates.io](https://img.shields.io/crates/v/ahadmin-sys.svg)](https://crates.io/crates/ahadmin-sys) -* [alink-sys ![Crates.io](https://img.shields.io/crates/v/alink-sys.svg)](https://crates.io/crates/alink-sys) -* [amstrmid-sys ![Crates.io](https://img.shields.io/crates/v/amstrmid-sys.svg)](https://crates.io/crates/amstrmid-sys) -* [api-ms-win-net-isolation-l1-1-0-sys ![Crates.io](https://img.shields.io/crates/v/api-ms-win-net-isolation-l1-1-0-sys.svg)](https://crates.io/crates/api-ms-win-net-isolation-l1-1-0-sys) -* [apidll-sys ![Crates.io](https://img.shields.io/crates/v/apidll-sys.svg)](https://crates.io/crates/apidll-sys) -* [appmgmts-sys ![Crates.io](https://img.shields.io/crates/v/appmgmts-sys.svg)](https://crates.io/crates/appmgmts-sys) -* [appmgr-sys ![Crates.io](https://img.shields.io/crates/v/appmgr-sys.svg)](https://crates.io/crates/appmgr-sys) -* [appnotify-sys ![Crates.io](https://img.shields.io/crates/v/appnotify-sys.svg)](https://crates.io/crates/appnotify-sys) -* [asycfilt-sys ![Crates.io](https://img.shields.io/crates/v/asycfilt-sys.svg)](https://crates.io/crates/asycfilt-sys) -* [audiobaseprocessingobject-sys ![Crates.io](https://img.shields.io/crates/v/audiobaseprocessingobject-sys.svg)](https://crates.io/crates/audiobaseprocessingobject-sys) -* [audioeng-sys ![Crates.io](https://img.shields.io/crates/v/audioeng-sys.svg)](https://crates.io/crates/audioeng-sys) -* [audiomediatypecrt-sys ![Crates.io](https://img.shields.io/crates/v/audiomediatypecrt-sys.svg)](https://crates.io/crates/audiomediatypecrt-sys) -* [authz-sys ![Crates.io](https://img.shields.io/crates/v/authz-sys.svg)](https://crates.io/crates/authz-sys) -* [aux_ulib-sys ![Crates.io](https://img.shields.io/crates/v/aux_ulib-sys.svg)](https://crates.io/crates/aux_ulib-sys) -* [avifil32-sys ![Crates.io](https://img.shields.io/crates/v/avifil32-sys.svg)](https://crates.io/crates/avifil32-sys) -* [avrt-sys ![Crates.io](https://img.shields.io/crates/v/avrt-sys.svg)](https://crates.io/crates/avrt-sys) -* [basesrv-sys ![Crates.io](https://img.shields.io/crates/v/basesrv-sys.svg)](https://crates.io/crates/basesrv-sys) -* [bcrypt-sys ![Crates.io](https://img.shields.io/crates/v/bcrypt-sys.svg)](https://crates.io/crates/bcrypt-sys) -* [bits-sys ![Crates.io](https://img.shields.io/crates/v/bits-sys.svg)](https://crates.io/crates/bits-sys) -* [bluetoothapis-sys ![Crates.io](https://img.shields.io/crates/v/bluetoothapis-sys.svg)](https://crates.io/crates/bluetoothapis-sys) -* [bthprops-sys ![Crates.io](https://img.shields.io/crates/v/bthprops-sys.svg)](https://crates.io/crates/bthprops-sys) -* [bufferoverflow-sys ![Crates.io](https://img.shields.io/crates/v/bufferoverflow-sys.svg)](https://crates.io/crates/bufferoverflow-sys) -* [bufferoverflowu-sys ![Crates.io](https://img.shields.io/crates/v/bufferoverflowu-sys.svg)](https://crates.io/crates/bufferoverflowu-sys) -* [cabinet-sys ![Crates.io](https://img.shields.io/crates/v/cabinet-sys.svg)](https://crates.io/crates/cabinet-sys) -* [certadm-sys ![Crates.io](https://img.shields.io/crates/v/certadm-sys.svg)](https://crates.io/crates/certadm-sys) -* [certca-sys ![Crates.io](https://img.shields.io/crates/v/certca-sys.svg)](https://crates.io/crates/certca-sys) -* [certcli-sys ![Crates.io](https://img.shields.io/crates/v/certcli-sys.svg)](https://crates.io/crates/certcli-sys) -* [certidl-sys ![Crates.io](https://img.shields.io/crates/v/certidl-sys.svg)](https://crates.io/crates/certidl-sys) -* [certpoleng-sys ![Crates.io](https://img.shields.io/crates/v/certpoleng-sys.svg)](https://crates.io/crates/certpoleng-sys) -* [cfgmgr32-sys ![Crates.io](https://img.shields.io/crates/v/cfgmgr32-sys.svg)](https://crates.io/crates/cfgmgr32-sys) -* [clfsmgmt-sys ![Crates.io](https://img.shields.io/crates/v/clfsmgmt-sys.svg)](https://crates.io/crates/clfsmgmt-sys) -* [clfsw32-sys ![Crates.io](https://img.shields.io/crates/v/clfsw32-sys.svg)](https://crates.io/crates/clfsw32-sys) -* [clusapi-sys ![Crates.io](https://img.shields.io/crates/v/clusapi-sys.svg)](https://crates.io/crates/clusapi-sys) -* [comctl32-sys ![Crates.io](https://img.shields.io/crates/v/comctl32-sys.svg)](https://crates.io/crates/comctl32-sys) -* [comdlg32-sys ![Crates.io](https://img.shields.io/crates/v/comdlg32-sys.svg)](https://crates.io/crates/comdlg32-sys) -* [comppkgsup-sys ![Crates.io](https://img.shields.io/crates/v/comppkgsup-sys.svg)](https://crates.io/crates/comppkgsup-sys) -* [compstui-sys ![Crates.io](https://img.shields.io/crates/v/compstui-sys.svg)](https://crates.io/crates/compstui-sys) -* [comsvcs-sys ![Crates.io](https://img.shields.io/crates/v/comsvcs-sys.svg)](https://crates.io/crates/comsvcs-sys) -* [corguids-sys ![Crates.io](https://img.shields.io/crates/v/corguids-sys.svg)](https://crates.io/crates/corguids-sys) -* [correngine-sys ![Crates.io](https://img.shields.io/crates/v/correngine-sys.svg)](https://crates.io/crates/correngine-sys) -* [credui-sys ![Crates.io](https://img.shields.io/crates/v/credui-sys.svg)](https://crates.io/crates/credui-sys) -* [cryptdll-sys ![Crates.io](https://img.shields.io/crates/v/cryptdll-sys.svg)](https://crates.io/crates/cryptdll-sys) -* [cryptnet-sys ![Crates.io](https://img.shields.io/crates/v/cryptnet-sys.svg)](https://crates.io/crates/cryptnet-sys) -* [cryptui-sys ![Crates.io](https://img.shields.io/crates/v/cryptui-sys.svg)](https://crates.io/crates/cryptui-sys) -* [cryptxml-sys ![Crates.io](https://img.shields.io/crates/v/cryptxml-sys.svg)](https://crates.io/crates/cryptxml-sys) -* [cscapi-sys ![Crates.io](https://img.shields.io/crates/v/cscapi-sys.svg)](https://crates.io/crates/cscapi-sys) -* [cscdll-sys ![Crates.io](https://img.shields.io/crates/v/cscdll-sys.svg)](https://crates.io/crates/cscdll-sys) -* [d2d1-sys ![Crates.io](https://img.shields.io/crates/v/d2d1-sys.svg)](https://crates.io/crates/d2d1-sys) -* [d3d10-sys ![Crates.io](https://img.shields.io/crates/v/d3d10-sys.svg)](https://crates.io/crates/d3d10-sys) -* [d3d10_1-sys ![Crates.io](https://img.shields.io/crates/v/d3d10_1-sys.svg)](https://crates.io/crates/d3d10_1-sys) -* [d3dcompiler-sys ![Crates.io](https://img.shields.io/crates/v/d3dcompiler-sys.svg)](https://crates.io/crates/d3dcompiler-sys) -* [d3dcsx-sys ![Crates.io](https://img.shields.io/crates/v/d3dcsx-sys.svg)](https://crates.io/crates/d3dcsx-sys) -* [d3dcsxd-sys ![Crates.io](https://img.shields.io/crates/v/d3dcsxd-sys.svg)](https://crates.io/crates/d3dcsxd-sys) -* [davclnt-sys ![Crates.io](https://img.shields.io/crates/v/davclnt-sys.svg)](https://crates.io/crates/davclnt-sys) -* [dbgeng-sys ![Crates.io](https://img.shields.io/crates/v/dbgeng-sys.svg)](https://crates.io/crates/dbgeng-sys) -* [dciman32-sys ![Crates.io](https://img.shields.io/crates/v/dciman32-sys.svg)](https://crates.io/crates/dciman32-sys) -* [dcomp-sys ![Crates.io](https://img.shields.io/crates/v/dcomp-sys.svg)](https://crates.io/crates/dcomp-sys) -* [ddraw-sys ![Crates.io](https://img.shields.io/crates/v/ddraw-sys.svg)](https://crates.io/crates/ddraw-sys) -* [devenum-sys ![Crates.io](https://img.shields.io/crates/v/devenum-sys.svg)](https://crates.io/crates/devenum-sys) -* [deviceaccess-sys ![Crates.io](https://img.shields.io/crates/v/deviceaccess-sys.svg)](https://crates.io/crates/deviceaccess-sys) -* [devmgr-sys ![Crates.io](https://img.shields.io/crates/v/devmgr-sys.svg)](https://crates.io/crates/devmgr-sys) -* [dflayout-sys ![Crates.io](https://img.shields.io/crates/v/dflayout-sys.svg)](https://crates.io/crates/dflayout-sys) -* [dhcpcsvc-sys ![Crates.io](https://img.shields.io/crates/v/dhcpcsvc-sys.svg)](https://crates.io/crates/dhcpcsvc-sys) -* [dhcpcsvc6-sys ![Crates.io](https://img.shields.io/crates/v/dhcpcsvc6-sys.svg)](https://crates.io/crates/dhcpcsvc6-sys) -* [dhcpsapi-sys ![Crates.io](https://img.shields.io/crates/v/dhcpsapi-sys.svg)](https://crates.io/crates/dhcpsapi-sys) -* [difxapi-sys ![Crates.io](https://img.shields.io/crates/v/difxapi-sys.svg)](https://crates.io/crates/difxapi-sys) -* [dinput8-sys ![Crates.io](https://img.shields.io/crates/v/dinput8-sys.svg)](https://crates.io/crates/dinput8-sys) -* [dloadhelper-sys ![Crates.io](https://img.shields.io/crates/v/dloadhelper-sys.svg)](https://crates.io/crates/dloadhelper-sys) -* [dmoguids-sys ![Crates.io](https://img.shields.io/crates/v/dmoguids-sys.svg)](https://crates.io/crates/dmoguids-sys) -* [dnsapi-sys ![Crates.io](https://img.shields.io/crates/v/dnsapi-sys.svg)](https://crates.io/crates/dnsapi-sys) -* [dnscrcli-sys ![Crates.io](https://img.shields.io/crates/v/dnscrcli-sys.svg)](https://crates.io/crates/dnscrcli-sys) -* [dnslib-sys ![Crates.io](https://img.shields.io/crates/v/dnslib-sys.svg)](https://crates.io/crates/dnslib-sys) -* [dnsperf-sys ![Crates.io](https://img.shields.io/crates/v/dnsperf-sys.svg)](https://crates.io/crates/dnsperf-sys) -* [dnsrpc-sys ![Crates.io](https://img.shields.io/crates/v/dnsrpc-sys.svg)](https://crates.io/crates/dnsrpc-sys) -* [dnsrslvr-sys ![Crates.io](https://img.shields.io/crates/v/dnsrslvr-sys.svg)](https://crates.io/crates/dnsrslvr-sys) -* [dpx-sys ![Crates.io](https://img.shields.io/crates/v/dpx-sys.svg)](https://crates.io/crates/dpx-sys) -* [drt-sys ![Crates.io](https://img.shields.io/crates/v/drt-sys.svg)](https://crates.io/crates/drt-sys) -* [drtprov-sys ![Crates.io](https://img.shields.io/crates/v/drtprov-sys.svg)](https://crates.io/crates/drtprov-sys) -* [drttransport-sys ![Crates.io](https://img.shields.io/crates/v/drttransport-sys.svg)](https://crates.io/crates/drttransport-sys) -* [dsprop-sys ![Crates.io](https://img.shields.io/crates/v/dsprop-sys.svg)](https://crates.io/crates/dsprop-sys) -* [dssec-sys ![Crates.io](https://img.shields.io/crates/v/dssec-sys.svg)](https://crates.io/crates/dssec-sys) -* [dststlog-sys ![Crates.io](https://img.shields.io/crates/v/dststlog-sys.svg)](https://crates.io/crates/dststlog-sys) -* [dsuiext-sys ![Crates.io](https://img.shields.io/crates/v/dsuiext-sys.svg)](https://crates.io/crates/dsuiext-sys) -* [dtchelp-sys ![Crates.io](https://img.shields.io/crates/v/dtchelp-sys.svg)](https://crates.io/crates/dtchelp-sys) -* [dwrite-sys ![Crates.io](https://img.shields.io/crates/v/dwrite-sys.svg)](https://crates.io/crates/dwrite-sys) -* [dxgi-sys ![Crates.io](https://img.shields.io/crates/v/dxgi-sys.svg)](https://crates.io/crates/dxgi-sys) -* [dxguid-sys ![Crates.io](https://img.shields.io/crates/v/dxguid-sys.svg)](https://crates.io/crates/dxguid-sys) -* [dxtmsft-sys ![Crates.io](https://img.shields.io/crates/v/dxtmsft-sys.svg)](https://crates.io/crates/dxtmsft-sys) -* [dxtrans-sys ![Crates.io](https://img.shields.io/crates/v/dxtrans-sys.svg)](https://crates.io/crates/dxtrans-sys) -* [dxva2-sys ![Crates.io](https://img.shields.io/crates/v/dxva2-sys.svg)](https://crates.io/crates/dxva2-sys) -* [eappcfg-sys ![Crates.io](https://img.shields.io/crates/v/eappcfg-sys.svg)](https://crates.io/crates/eappcfg-sys) -* [eappprxy-sys ![Crates.io](https://img.shields.io/crates/v/eappprxy-sys.svg)](https://crates.io/crates/eappprxy-sys) -* [easregprov-sys ![Crates.io](https://img.shields.io/crates/v/easregprov-sys.svg)](https://crates.io/crates/easregprov-sys) -* [efswrt-sys ![Crates.io](https://img.shields.io/crates/v/efswrt-sys.svg)](https://crates.io/crates/efswrt-sys) -* [ehstorguids-sys ![Crates.io](https://img.shields.io/crates/v/ehstorguids-sys.svg)](https://crates.io/crates/ehstorguids-sys) -* [elfapi-sys ![Crates.io](https://img.shields.io/crates/v/elfapi-sys.svg)](https://crates.io/crates/elfapi-sys) -* [els-sys ![Crates.io](https://img.shields.io/crates/v/els-sys.svg)](https://crates.io/crates/els-sys) -* [elscore-sys ![Crates.io](https://img.shields.io/crates/v/elscore-sys.svg)](https://crates.io/crates/elscore-sys) -* [esent-sys ![Crates.io](https://img.shields.io/crates/v/esent-sys.svg)](https://crates.io/crates/esent-sys) -* [evr-sys ![Crates.io](https://img.shields.io/crates/v/evr-sys.svg)](https://crates.io/crates/evr-sys) -* [evr_vista-sys ![Crates.io](https://img.shields.io/crates/v/evr_vista-sys.svg)](https://crates.io/crates/evr_vista-sys) -* [faultrep-sys ![Crates.io](https://img.shields.io/crates/v/faultrep-sys.svg)](https://crates.io/crates/faultrep-sys) -* [feclient-sys ![Crates.io](https://img.shields.io/crates/v/feclient-sys.svg)](https://crates.io/crates/feclient-sys) -* [fhsvcctl-sys ![Crates.io](https://img.shields.io/crates/v/fhsvcctl-sys.svg)](https://crates.io/crates/fhsvcctl-sys) -* [fileextd-sys ![Crates.io](https://img.shields.io/crates/v/fileextd-sys.svg)](https://crates.io/crates/fileextd-sys) -* [fltlib-sys ![Crates.io](https://img.shields.io/crates/v/fltlib-sys.svg)](https://crates.io/crates/fltlib-sys) -* [fontsub-sys ![Crates.io](https://img.shields.io/crates/v/fontsub-sys.svg)](https://crates.io/crates/fontsub-sys) -* [format-sys ![Crates.io](https://img.shields.io/crates/v/format-sys.svg)](https://crates.io/crates/format-sys) -* [framedyd-sys ![Crates.io](https://img.shields.io/crates/v/framedyd-sys.svg)](https://crates.io/crates/framedyd-sys) -* [framedyn-sys ![Crates.io](https://img.shields.io/crates/v/framedyn-sys.svg)](https://crates.io/crates/framedyn-sys) -* [fwpuclnt-sys ![Crates.io](https://img.shields.io/crates/v/fwpuclnt-sys.svg)](https://crates.io/crates/fwpuclnt-sys) -* [fxsutility-sys ![Crates.io](https://img.shields.io/crates/v/fxsutility-sys.svg)](https://crates.io/crates/fxsutility-sys) -* [gdiplus-sys ![Crates.io](https://img.shields.io/crates/v/gdiplus-sys.svg)](https://crates.io/crates/gdiplus-sys) -* [glmf32-sys ![Crates.io](https://img.shields.io/crates/v/glmf32-sys.svg)](https://crates.io/crates/glmf32-sys) -* [glu32-sys ![Crates.io](https://img.shields.io/crates/v/glu32-sys.svg)](https://crates.io/crates/glu32-sys) -* [gpedit-sys ![Crates.io](https://img.shields.io/crates/v/gpedit-sys.svg)](https://crates.io/crates/gpedit-sys) -* [gpmuuid-sys ![Crates.io](https://img.shields.io/crates/v/gpmuuid-sys.svg)](https://crates.io/crates/gpmuuid-sys) -* [hbaapi-sys ![Crates.io](https://img.shields.io/crates/v/hbaapi-sys.svg)](https://crates.io/crates/hbaapi-sys) -* [hhsetup-sys ![Crates.io](https://img.shields.io/crates/v/hhsetup-sys.svg)](https://crates.io/crates/hhsetup-sys) -* [hid-sys ![Crates.io](https://img.shields.io/crates/v/hid-sys.svg)](https://crates.io/crates/hid-sys) -* [hlink-sys ![Crates.io](https://img.shields.io/crates/v/hlink-sys.svg)](https://crates.io/crates/hlink-sys) -* [htmlhelp-sys ![Crates.io](https://img.shields.io/crates/v/htmlhelp-sys.svg)](https://crates.io/crates/htmlhelp-sys) -* [httpapi-sys ![Crates.io](https://img.shields.io/crates/v/httpapi-sys.svg)](https://crates.io/crates/httpapi-sys) -* [iashlpr-sys ![Crates.io](https://img.shields.io/crates/v/iashlpr-sys.svg)](https://crates.io/crates/iashlpr-sys) -* [icm32-sys ![Crates.io](https://img.shields.io/crates/v/icm32-sys.svg)](https://crates.io/crates/icm32-sys) -* [icmui-sys ![Crates.io](https://img.shields.io/crates/v/icmui-sys.svg)](https://crates.io/crates/icmui-sys) -* [iepmapi-sys ![Crates.io](https://img.shields.io/crates/v/iepmapi-sys.svg)](https://crates.io/crates/iepmapi-sys) -* [iesetup-sys ![Crates.io](https://img.shields.io/crates/v/iesetup-sys.svg)](https://crates.io/crates/iesetup-sys) -* [imagehlp-sys ![Crates.io](https://img.shields.io/crates/v/imagehlp-sys.svg)](https://crates.io/crates/imagehlp-sys) -* [imgutil-sys ![Crates.io](https://img.shields.io/crates/v/imgutil-sys.svg)](https://crates.io/crates/imgutil-sys) -* [imm32-sys ![Crates.io](https://img.shields.io/crates/v/imm32-sys.svg)](https://crates.io/crates/imm32-sys) -* [infocardapi-sys ![Crates.io](https://img.shields.io/crates/v/infocardapi-sys.svg)](https://crates.io/crates/infocardapi-sys) -* [inseng-sys ![Crates.io](https://img.shields.io/crates/v/inseng-sys.svg)](https://crates.io/crates/inseng-sys) -* [int64-sys ![Crates.io](https://img.shields.io/crates/v/int64-sys.svg)](https://crates.io/crates/int64-sys) -* [iphlpapi-sys ![Crates.io](https://img.shields.io/crates/v/iphlpapi-sys.svg)](https://crates.io/crates/iphlpapi-sys) -* [iprop-sys ![Crates.io](https://img.shields.io/crates/v/iprop-sys.svg)](https://crates.io/crates/iprop-sys) -* [irprops-sys ![Crates.io](https://img.shields.io/crates/v/irprops-sys.svg)](https://crates.io/crates/irprops-sys) -* [iscsidsc-sys ![Crates.io](https://img.shields.io/crates/v/iscsidsc-sys.svg)](https://crates.io/crates/iscsidsc-sys) -* [jetoledb-sys ![Crates.io](https://img.shields.io/crates/v/jetoledb-sys.svg)](https://crates.io/crates/jetoledb-sys) -* [jsrt-sys ![Crates.io](https://img.shields.io/crates/v/jsrt-sys.svg)](https://crates.io/crates/jsrt-sys) -* [kerbcli-sys ![Crates.io](https://img.shields.io/crates/v/kerbcli-sys.svg)](https://crates.io/crates/kerbcli-sys) -* [ksproxy-sys ![Crates.io](https://img.shields.io/crates/v/ksproxy-sys.svg)](https://crates.io/crates/ksproxy-sys) -* [ksuser-sys ![Crates.io](https://img.shields.io/crates/v/ksuser-sys.svg)](https://crates.io/crates/ksuser-sys) -* [loadperf-sys ![Crates.io](https://img.shields.io/crates/v/loadperf-sys.svg)](https://crates.io/crates/loadperf-sys) -* [locationapi-sys ![Crates.io](https://img.shields.io/crates/v/locationapi-sys.svg)](https://crates.io/crates/locationapi-sys) -* [lz32-sys ![Crates.io](https://img.shields.io/crates/v/lz32-sys.svg)](https://crates.io/crates/lz32-sys) -* [magnification-sys ![Crates.io](https://img.shields.io/crates/v/magnification-sys.svg)](https://crates.io/crates/magnification-sys) -* [mapi32-sys ![Crates.io](https://img.shields.io/crates/v/mapi32-sys.svg)](https://crates.io/crates/mapi32-sys) -* [mbnapi_uuid-sys ![Crates.io](https://img.shields.io/crates/v/mbnapi_uuid-sys.svg)](https://crates.io/crates/mbnapi_uuid-sys) -* [mciole32-sys ![Crates.io](https://img.shields.io/crates/v/mciole32-sys.svg)](https://crates.io/crates/mciole32-sys) -* [mdmregistration-sys ![Crates.io](https://img.shields.io/crates/v/mdmregistration-sys.svg)](https://crates.io/crates/mdmregistration-sys) -* [mf-sys ![Crates.io](https://img.shields.io/crates/v/mf-sys.svg)](https://crates.io/crates/mf-sys) -* [mf_vista-sys ![Crates.io](https://img.shields.io/crates/v/mf_vista-sys.svg)](https://crates.io/crates/mf_vista-sys) -* [mfcore-sys ![Crates.io](https://img.shields.io/crates/v/mfcore-sys.svg)](https://crates.io/crates/mfcore-sys) -* [mfplat-sys ![Crates.io](https://img.shields.io/crates/v/mfplat-sys.svg)](https://crates.io/crates/mfplat-sys) -* [mfplat_vista-sys ![Crates.io](https://img.shields.io/crates/v/mfplat_vista-sys.svg)](https://crates.io/crates/mfplat_vista-sys) -* [mfplay-sys ![Crates.io](https://img.shields.io/crates/v/mfplay-sys.svg)](https://crates.io/crates/mfplay-sys) -* [mfreadwrite-sys ![Crates.io](https://img.shields.io/crates/v/mfreadwrite-sys.svg)](https://crates.io/crates/mfreadwrite-sys) -* [mfsrcsnk-sys ![Crates.io](https://img.shields.io/crates/v/mfsrcsnk-sys.svg)](https://crates.io/crates/mfsrcsnk-sys) -* [mfuuid-sys ![Crates.io](https://img.shields.io/crates/v/mfuuid-sys.svg)](https://crates.io/crates/mfuuid-sys) -* [mgmtapi-sys ![Crates.io](https://img.shields.io/crates/v/mgmtapi-sys.svg)](https://crates.io/crates/mgmtapi-sys) -* [mi-sys ![Crates.io](https://img.shields.io/crates/v/mi-sys.svg)](https://crates.io/crates/mi-sys) -* [mincore-sys ![Crates.io](https://img.shields.io/crates/v/mincore-sys.svg)](https://crates.io/crates/mincore-sys) -* [mincore_downlevel-sys ![Crates.io](https://img.shields.io/crates/v/mincore_downlevel-sys.svg)](https://crates.io/crates/mincore_downlevel-sys) -* [mmc-sys ![Crates.io](https://img.shields.io/crates/v/mmc-sys.svg)](https://crates.io/crates/mmc-sys) -* [mmdevapi-sys ![Crates.io](https://img.shields.io/crates/v/mmdevapi-sys.svg)](https://crates.io/crates/mmdevapi-sys) -* [mprapi-sys ![Crates.io](https://img.shields.io/crates/v/mprapi-sys.svg)](https://crates.io/crates/mprapi-sys) -* [mprsnap-sys ![Crates.io](https://img.shields.io/crates/v/mprsnap-sys.svg)](https://crates.io/crates/mprsnap-sys) -* [mqoa-sys ![Crates.io](https://img.shields.io/crates/v/mqoa-sys.svg)](https://crates.io/crates/mqoa-sys) -* [mqrt-sys ![Crates.io](https://img.shields.io/crates/v/mqrt-sys.svg)](https://crates.io/crates/mqrt-sys) -* [msaatext-sys ![Crates.io](https://img.shields.io/crates/v/msaatext-sys.svg)](https://crates.io/crates/msaatext-sys) -* [msacm32-sys ![Crates.io](https://img.shields.io/crates/v/msacm32-sys.svg)](https://crates.io/crates/msacm32-sys) -* [mscms-sys ![Crates.io](https://img.shields.io/crates/v/mscms-sys.svg)](https://crates.io/crates/mscms-sys) -* [mscoree-sys ![Crates.io](https://img.shields.io/crates/v/mscoree-sys.svg)](https://crates.io/crates/mscoree-sys) -* [mscorsn-sys ![Crates.io](https://img.shields.io/crates/v/mscorsn-sys.svg)](https://crates.io/crates/mscorsn-sys) -* [msctfmonitor-sys ![Crates.io](https://img.shields.io/crates/v/msctfmonitor-sys.svg)](https://crates.io/crates/msctfmonitor-sys) -* [msdasc-sys ![Crates.io](https://img.shields.io/crates/v/msdasc-sys.svg)](https://crates.io/crates/msdasc-sys) -* [msdelta-sys ![Crates.io](https://img.shields.io/crates/v/msdelta-sys.svg)](https://crates.io/crates/msdelta-sys) -* [msdmo-sys ![Crates.io](https://img.shields.io/crates/v/msdmo-sys.svg)](https://crates.io/crates/msdmo-sys) -* [msdrm-sys ![Crates.io](https://img.shields.io/crates/v/msdrm-sys.svg)](https://crates.io/crates/msdrm-sys) -* [msi-sys ![Crates.io](https://img.shields.io/crates/v/msi-sys.svg)](https://crates.io/crates/msi-sys) -* [msimg32-sys ![Crates.io](https://img.shields.io/crates/v/msimg32-sys.svg)](https://crates.io/crates/msimg32-sys) -* [mspatcha-sys ![Crates.io](https://img.shields.io/crates/v/mspatcha-sys.svg)](https://crates.io/crates/mspatcha-sys) -* [mspatchc-sys ![Crates.io](https://img.shields.io/crates/v/mspatchc-sys.svg)](https://crates.io/crates/mspatchc-sys) -* [mspbase-sys ![Crates.io](https://img.shields.io/crates/v/mspbase-sys.svg)](https://crates.io/crates/mspbase-sys) -* [msports-sys ![Crates.io](https://img.shields.io/crates/v/msports-sys.svg)](https://crates.io/crates/msports-sys) -* [msrating-sys ![Crates.io](https://img.shields.io/crates/v/msrating-sys.svg)](https://crates.io/crates/msrating-sys) -* [mstask-sys ![Crates.io](https://img.shields.io/crates/v/mstask-sys.svg)](https://crates.io/crates/mstask-sys) -* [msv1_0-sys ![Crates.io](https://img.shields.io/crates/v/msv1_0-sys.svg)](https://crates.io/crates/msv1_0-sys) -* [msvfw32-sys ![Crates.io](https://img.shields.io/crates/v/msvfw32-sys.svg)](https://crates.io/crates/msvfw32-sys) -* [mswsock-sys ![Crates.io](https://img.shields.io/crates/v/mswsock-sys.svg)](https://crates.io/crates/mswsock-sys) -* [msxml2-sys ![Crates.io](https://img.shields.io/crates/v/msxml2-sys.svg)](https://crates.io/crates/msxml2-sys) -* [msxml6-sys ![Crates.io](https://img.shields.io/crates/v/msxml6-sys.svg)](https://crates.io/crates/msxml6-sys) -* [mtx-sys ![Crates.io](https://img.shields.io/crates/v/mtx-sys.svg)](https://crates.io/crates/mtx-sys) -* [mtxdm-sys ![Crates.io](https://img.shields.io/crates/v/mtxdm-sys.svg)](https://crates.io/crates/mtxdm-sys) -* [muiload-sys ![Crates.io](https://img.shields.io/crates/v/muiload-sys.svg)](https://crates.io/crates/muiload-sys) -* [ncrypt-sys ![Crates.io](https://img.shields.io/crates/v/ncrypt-sys.svg)](https://crates.io/crates/ncrypt-sys) -* [nddeapi-sys ![Crates.io](https://img.shields.io/crates/v/nddeapi-sys.svg)](https://crates.io/crates/nddeapi-sys) -* [ndfapi-sys ![Crates.io](https://img.shields.io/crates/v/ndfapi-sys.svg)](https://crates.io/crates/ndfapi-sys) -* [ndproxystub-sys ![Crates.io](https://img.shields.io/crates/v/ndproxystub-sys.svg)](https://crates.io/crates/ndproxystub-sys) -* [netapi32-sys ![Crates.io](https://img.shields.io/crates/v/netapi32-sys.svg)](https://crates.io/crates/netapi32-sys) -* [netlib-sys ![Crates.io](https://img.shields.io/crates/v/netlib-sys.svg)](https://crates.io/crates/netlib-sys) -* [netsh-sys ![Crates.io](https://img.shields.io/crates/v/netsh-sys.svg)](https://crates.io/crates/netsh-sys) -* [newdev-sys ![Crates.io](https://img.shields.io/crates/v/newdev-sys.svg)](https://crates.io/crates/newdev-sys) -* [ninput-sys ![Crates.io](https://img.shields.io/crates/v/ninput-sys.svg)](https://crates.io/crates/ninput-sys) -* [normaliz-sys ![Crates.io](https://img.shields.io/crates/v/normaliz-sys.svg)](https://crates.io/crates/normaliz-sys) -* [nt-sys ![Crates.io](https://img.shields.io/crates/v/nt-sys.svg)](https://crates.io/crates/nt-sys) -* [ntdll-sys ![Crates.io](https://img.shields.io/crates/v/ntdll-sys.svg)](https://crates.io/crates/ntdll-sys) -* [ntdsa-sys ![Crates.io](https://img.shields.io/crates/v/ntdsa-sys.svg)](https://crates.io/crates/ntdsa-sys) -* [ntdsapi-sys ![Crates.io](https://img.shields.io/crates/v/ntdsapi-sys.svg)](https://crates.io/crates/ntdsapi-sys) -* [ntdsatq-sys ![Crates.io](https://img.shields.io/crates/v/ntdsatq-sys.svg)](https://crates.io/crates/ntdsatq-sys) -* [ntdsetup-sys ![Crates.io](https://img.shields.io/crates/v/ntdsetup-sys.svg)](https://crates.io/crates/ntdsetup-sys) -* [ntfrsapi-sys ![Crates.io](https://img.shields.io/crates/v/ntfrsapi-sys.svg)](https://crates.io/crates/ntfrsapi-sys) -* [ntlanman-sys ![Crates.io](https://img.shields.io/crates/v/ntlanman-sys.svg)](https://crates.io/crates/ntlanman-sys) -* [ntmarta-sys ![Crates.io](https://img.shields.io/crates/v/ntmarta-sys.svg)](https://crates.io/crates/ntmarta-sys) -* [ntquery-sys ![Crates.io](https://img.shields.io/crates/v/ntquery-sys.svg)](https://crates.io/crates/ntquery-sys) -* [ntstc_libcmt-sys ![Crates.io](https://img.shields.io/crates/v/ntstc_libcmt-sys.svg)](https://crates.io/crates/ntstc_libcmt-sys) -* [ntstc_msvcrt-sys ![Crates.io](https://img.shields.io/crates/v/ntstc_msvcrt-sys.svg)](https://crates.io/crates/ntstc_msvcrt-sys) -* [ntvdm-sys ![Crates.io](https://img.shields.io/crates/v/ntvdm-sys.svg)](https://crates.io/crates/ntvdm-sys) -* [objsel-sys ![Crates.io](https://img.shields.io/crates/v/objsel-sys.svg)](https://crates.io/crates/objsel-sys) -* [odbc32-sys ![Crates.io](https://img.shields.io/crates/v/odbc32-sys.svg)](https://crates.io/crates/odbc32-sys) -* [odbcbcp-sys ![Crates.io](https://img.shields.io/crates/v/odbcbcp-sys.svg)](https://crates.io/crates/odbcbcp-sys) -* [odbccp32-sys ![Crates.io](https://img.shields.io/crates/v/odbccp32-sys.svg)](https://crates.io/crates/odbccp32-sys) -* [oemlicense-sys ![Crates.io](https://img.shields.io/crates/v/oemlicense-sys.svg)](https://crates.io/crates/oemlicense-sys) -* [oleacc-sys ![Crates.io](https://img.shields.io/crates/v/oleacc-sys.svg)](https://crates.io/crates/oleacc-sys) -* [olecli32-sys ![Crates.io](https://img.shields.io/crates/v/olecli32-sys.svg)](https://crates.io/crates/olecli32-sys) -* [oledb-sys ![Crates.io](https://img.shields.io/crates/v/oledb-sys.svg)](https://crates.io/crates/oledb-sys) -* [oledlg-sys ![Crates.io](https://img.shields.io/crates/v/oledlg-sys.svg)](https://crates.io/crates/oledlg-sys) -* [olepro32-sys ![Crates.io](https://img.shields.io/crates/v/olepro32-sys.svg)](https://crates.io/crates/olepro32-sys) -* [olesvr32-sys ![Crates.io](https://img.shields.io/crates/v/olesvr32-sys.svg)](https://crates.io/crates/olesvr32-sys) -* [ondemandconnroutehelper-sys ![Crates.io](https://img.shields.io/crates/v/ondemandconnroutehelper-sys.svg)](https://crates.io/crates/ondemandconnroutehelper-sys) -* [osptk-sys ![Crates.io](https://img.shields.io/crates/v/osptk-sys.svg)](https://crates.io/crates/osptk-sys) -* [p2p-sys ![Crates.io](https://img.shields.io/crates/v/p2p-sys.svg)](https://crates.io/crates/p2p-sys) -* [p2pgraph-sys ![Crates.io](https://img.shields.io/crates/v/p2pgraph-sys.svg)](https://crates.io/crates/p2pgraph-sys) -* [patchwiz-sys ![Crates.io](https://img.shields.io/crates/v/patchwiz-sys.svg)](https://crates.io/crates/patchwiz-sys) -* [pathcch-sys ![Crates.io](https://img.shields.io/crates/v/pathcch-sys.svg)](https://crates.io/crates/pathcch-sys) -* [pdh-sys ![Crates.io](https://img.shields.io/crates/v/pdh-sys.svg)](https://crates.io/crates/pdh-sys) -* [peerdist-sys ![Crates.io](https://img.shields.io/crates/v/peerdist-sys.svg)](https://crates.io/crates/peerdist-sys) -* [photoacquireuid-sys ![Crates.io](https://img.shields.io/crates/v/photoacquireuid-sys.svg)](https://crates.io/crates/photoacquireuid-sys) -* [portabledeviceguids-sys ![Crates.io](https://img.shields.io/crates/v/portabledeviceguids-sys.svg)](https://crates.io/crates/portabledeviceguids-sys) -* [powrprof-sys ![Crates.io](https://img.shields.io/crates/v/powrprof-sys.svg)](https://crates.io/crates/powrprof-sys) -* [prntvpt-sys ![Crates.io](https://img.shields.io/crates/v/prntvpt-sys.svg)](https://crates.io/crates/prntvpt-sys) -* [propsys-sys ![Crates.io](https://img.shields.io/crates/v/propsys-sys.svg)](https://crates.io/crates/propsys-sys) -* [quartz-sys ![Crates.io](https://img.shields.io/crates/v/quartz-sys.svg)](https://crates.io/crates/quartz-sys) -* [query-sys ![Crates.io](https://img.shields.io/crates/v/query-sys.svg)](https://crates.io/crates/query-sys) -* [qutil-sys ![Crates.io](https://img.shields.io/crates/v/qutil-sys.svg)](https://crates.io/crates/qutil-sys) -* [qwave-sys ![Crates.io](https://img.shields.io/crates/v/qwave-sys.svg)](https://crates.io/crates/qwave-sys) -* [rasapi32-sys ![Crates.io](https://img.shields.io/crates/v/rasapi32-sys.svg)](https://crates.io/crates/rasapi32-sys) -* [rasdlg-sys ![Crates.io](https://img.shields.io/crates/v/rasdlg-sys.svg)](https://crates.io/crates/rasdlg-sys) -* [rasuser-sys ![Crates.io](https://img.shields.io/crates/v/rasuser-sys.svg)](https://crates.io/crates/rasuser-sys) -* [resutils-sys ![Crates.io](https://img.shields.io/crates/v/resutils-sys.svg)](https://crates.io/crates/resutils-sys) -* [rometadata-sys ![Crates.io](https://img.shields.io/crates/v/rometadata-sys.svg)](https://crates.io/crates/rometadata-sys) -* [rpcexts-sys ![Crates.io](https://img.shields.io/crates/v/rpcexts-sys.svg)](https://crates.io/crates/rpcexts-sys) -* [rpcns4-sys ![Crates.io](https://img.shields.io/crates/v/rpcns4-sys.svg)](https://crates.io/crates/rpcns4-sys) -* [rpcproxy-sys ![Crates.io](https://img.shields.io/crates/v/rpcproxy-sys.svg)](https://crates.io/crates/rpcproxy-sys) -* [rpcrt4-sys ![Crates.io](https://img.shields.io/crates/v/rpcrt4-sys.svg)](https://crates.io/crates/rpcrt4-sys) -* [rpcutil-sys ![Crates.io](https://img.shields.io/crates/v/rpcutil-sys.svg)](https://crates.io/crates/rpcutil-sys) -* [rstrtmgr-sys ![Crates.io](https://img.shields.io/crates/v/rstrtmgr-sys.svg)](https://crates.io/crates/rstrtmgr-sys) -* [rtm-sys ![Crates.io](https://img.shields.io/crates/v/rtm-sys.svg)](https://crates.io/crates/rtm-sys) -* [rtutils-sys ![Crates.io](https://img.shields.io/crates/v/rtutils-sys.svg)](https://crates.io/crates/rtutils-sys) -* [rtworkq-sys ![Crates.io](https://img.shields.io/crates/v/rtworkq-sys.svg)](https://crates.io/crates/rtworkq-sys) -* [runtimeobject-sys ![Crates.io](https://img.shields.io/crates/v/runtimeobject-sys.svg)](https://crates.io/crates/runtimeobject-sys) -* [samlib-sys ![Crates.io](https://img.shields.io/crates/v/samlib-sys.svg)](https://crates.io/crates/samlib-sys) -* [samsrv-sys ![Crates.io](https://img.shields.io/crates/v/samsrv-sys.svg)](https://crates.io/crates/samsrv-sys) -* [sapi-sys ![Crates.io](https://img.shields.io/crates/v/sapi-sys.svg)](https://crates.io/crates/sapi-sys) -* [sas-sys ![Crates.io](https://img.shields.io/crates/v/sas-sys.svg)](https://crates.io/crates/sas-sys) -* [sbtsv-sys ![Crates.io](https://img.shields.io/crates/v/sbtsv-sys.svg)](https://crates.io/crates/sbtsv-sys) -* [scarddlg-sys ![Crates.io](https://img.shields.io/crates/v/scarddlg-sys.svg)](https://crates.io/crates/scarddlg-sys) -* [scecli-sys ![Crates.io](https://img.shields.io/crates/v/scecli-sys.svg)](https://crates.io/crates/scecli-sys) -* [scesrv-sys ![Crates.io](https://img.shields.io/crates/v/scesrv-sys.svg)](https://crates.io/crates/scesrv-sys) -* [schannel-sys ![Crates.io](https://img.shields.io/crates/v/schannel-sys.svg)](https://crates.io/crates/schannel-sys) -* [scrnsave-sys ![Crates.io](https://img.shields.io/crates/v/scrnsave-sys.svg)](https://crates.io/crates/scrnsave-sys) -* [scrnsavw-sys ![Crates.io](https://img.shields.io/crates/v/scrnsavw-sys.svg)](https://crates.io/crates/scrnsavw-sys) -* [searchsdk-sys ![Crates.io](https://img.shields.io/crates/v/searchsdk-sys.svg)](https://crates.io/crates/searchsdk-sys) -* [security-sys ![Crates.io](https://img.shields.io/crates/v/security-sys.svg)](https://crates.io/crates/security-sys) -* [sens-sys ![Crates.io](https://img.shields.io/crates/v/sens-sys.svg)](https://crates.io/crates/sens-sys) -* [sensapi-sys ![Crates.io](https://img.shields.io/crates/v/sensapi-sys.svg)](https://crates.io/crates/sensapi-sys) -* [sensorsapi-sys ![Crates.io](https://img.shields.io/crates/v/sensorsapi-sys.svg)](https://crates.io/crates/sensorsapi-sys) -* [setupapi-sys ![Crates.io](https://img.shields.io/crates/v/setupapi-sys.svg)](https://crates.io/crates/setupapi-sys) -* [sfc-sys ![Crates.io](https://img.shields.io/crates/v/sfc-sys.svg)](https://crates.io/crates/sfc-sys) -* [shcore-sys ![Crates.io](https://img.shields.io/crates/v/shcore-sys.svg)](https://crates.io/crates/shcore-sys) -* [shdocvw-sys ![Crates.io](https://img.shields.io/crates/v/shdocvw-sys.svg)](https://crates.io/crates/shdocvw-sys) -* [shfolder-sys ![Crates.io](https://img.shields.io/crates/v/shfolder-sys.svg)](https://crates.io/crates/shfolder-sys) -* [shlwapi-sys ![Crates.io](https://img.shields.io/crates/v/shlwapi-sys.svg)](https://crates.io/crates/shlwapi-sys) -* [sisbkup-sys ![Crates.io](https://img.shields.io/crates/v/sisbkup-sys.svg)](https://crates.io/crates/sisbkup-sys) -* [slc-sys ![Crates.io](https://img.shields.io/crates/v/slc-sys.svg)](https://crates.io/crates/slc-sys) -* [slcext-sys ![Crates.io](https://img.shields.io/crates/v/slcext-sys.svg)](https://crates.io/crates/slcext-sys) -* [slwga-sys ![Crates.io](https://img.shields.io/crates/v/slwga-sys.svg)](https://crates.io/crates/slwga-sys) -* [snmpapi-sys ![Crates.io](https://img.shields.io/crates/v/snmpapi-sys.svg)](https://crates.io/crates/snmpapi-sys) -* [spoolss-sys ![Crates.io](https://img.shields.io/crates/v/spoolss-sys.svg)](https://crates.io/crates/spoolss-sys) -* [sporder-sys ![Crates.io](https://img.shields.io/crates/v/sporder-sys.svg)](https://crates.io/crates/sporder-sys) -* [srclient-sys ![Crates.io](https://img.shields.io/crates/v/srclient-sys.svg)](https://crates.io/crates/srclient-sys) -* [ssdpapi-sys ![Crates.io](https://img.shields.io/crates/v/ssdpapi-sys.svg)](https://crates.io/crates/ssdpapi-sys) -* [sti-sys ![Crates.io](https://img.shields.io/crates/v/sti-sys.svg)](https://crates.io/crates/sti-sys) -* [strmbase-sys ![Crates.io](https://img.shields.io/crates/v/strmbase-sys.svg)](https://crates.io/crates/strmbase-sys) -* [strmiids-sys ![Crates.io](https://img.shields.io/crates/v/strmiids-sys.svg)](https://crates.io/crates/strmiids-sys) -* [strsafe-sys ![Crates.io](https://img.shields.io/crates/v/strsafe-sys.svg)](https://crates.io/crates/strsafe-sys) -* [structuredquery-sys ![Crates.io](https://img.shields.io/crates/v/structuredquery-sys.svg)](https://crates.io/crates/structuredquery-sys) -* [svcguid-sys ![Crates.io](https://img.shields.io/crates/v/svcguid-sys.svg)](https://crates.io/crates/svcguid-sys) -* [swdevice-sys ![Crates.io](https://img.shields.io/crates/v/swdevice-sys.svg)](https://crates.io/crates/swdevice-sys) -* [synchronization-sys ![Crates.io](https://img.shields.io/crates/v/synchronization-sys.svg)](https://crates.io/crates/synchronization-sys) -* [t2embed-sys ![Crates.io](https://img.shields.io/crates/v/t2embed-sys.svg)](https://crates.io/crates/t2embed-sys) -* [tapi32-sys ![Crates.io](https://img.shields.io/crates/v/tapi32-sys.svg)](https://crates.io/crates/tapi32-sys) -* [tapi32l-sys ![Crates.io](https://img.shields.io/crates/v/tapi32l-sys.svg)](https://crates.io/crates/tapi32l-sys) -* [taskschd-sys ![Crates.io](https://img.shields.io/crates/v/taskschd-sys.svg)](https://crates.io/crates/taskschd-sys) -* [tbs-sys ![Crates.io](https://img.shields.io/crates/v/tbs-sys.svg)](https://crates.io/crates/tbs-sys) -* [tdh-sys ![Crates.io](https://img.shields.io/crates/v/tdh-sys.svg)](https://crates.io/crates/tdh-sys) -* [thunk32-sys ![Crates.io](https://img.shields.io/crates/v/thunk32-sys.svg)](https://crates.io/crates/thunk32-sys) -* [tlbref-sys ![Crates.io](https://img.shields.io/crates/v/tlbref-sys.svg)](https://crates.io/crates/tlbref-sys) -* [traffic-sys ![Crates.io](https://img.shields.io/crates/v/traffic-sys.svg)](https://crates.io/crates/traffic-sys) -* [transcodeimageuid-sys ![Crates.io](https://img.shields.io/crates/v/transcodeimageuid-sys.svg)](https://crates.io/crates/transcodeimageuid-sys) -* [tsec-sys ![Crates.io](https://img.shields.io/crates/v/tsec-sys.svg)](https://crates.io/crates/tsec-sys) -* [tspubplugincom-sys ![Crates.io](https://img.shields.io/crates/v/tspubplugincom-sys.svg)](https://crates.io/crates/tspubplugincom-sys) -* [twain_32-sys ![Crates.io](https://img.shields.io/crates/v/twain_32-sys.svg)](https://crates.io/crates/twain_32-sys) -* [twinapi-sys ![Crates.io](https://img.shields.io/crates/v/twinapi-sys.svg)](https://crates.io/crates/twinapi-sys) -* [txfw32-sys ![Crates.io](https://img.shields.io/crates/v/txfw32-sys.svg)](https://crates.io/crates/txfw32-sys) -* [ualapi-sys ![Crates.io](https://img.shields.io/crates/v/ualapi-sys.svg)](https://crates.io/crates/ualapi-sys) -* [uiautomationcore-sys ![Crates.io](https://img.shields.io/crates/v/uiautomationcore-sys.svg)](https://crates.io/crates/uiautomationcore-sys) -* [umpdddi-sys ![Crates.io](https://img.shields.io/crates/v/umpdddi-sys.svg)](https://crates.io/crates/umpdddi-sys) -* [unicows-sys ![Crates.io](https://img.shields.io/crates/v/unicows-sys.svg)](https://crates.io/crates/unicows-sys) -* [urlmon-sys ![Crates.io](https://img.shields.io/crates/v/urlmon-sys.svg)](https://crates.io/crates/urlmon-sys) -* [userenv-sys ![Crates.io](https://img.shields.io/crates/v/userenv-sys.svg)](https://crates.io/crates/userenv-sys) -* [usp10-sys ![Crates.io](https://img.shields.io/crates/v/usp10-sys.svg)](https://crates.io/crates/usp10-sys) -* [uxtheme-sys ![Crates.io](https://img.shields.io/crates/v/uxtheme-sys.svg)](https://crates.io/crates/uxtheme-sys) -* [vccomsup-sys ![Crates.io](https://img.shields.io/crates/v/vccomsup-sys.svg)](https://crates.io/crates/vccomsup-sys) -* [vdmdbg-sys ![Crates.io](https://img.shields.io/crates/v/vdmdbg-sys.svg)](https://crates.io/crates/vdmdbg-sys) -* [vds_uuid-sys ![Crates.io](https://img.shields.io/crates/v/vds_uuid-sys.svg)](https://crates.io/crates/vds_uuid-sys) -* [version-sys ![Crates.io](https://img.shields.io/crates/v/version-sys.svg)](https://crates.io/crates/version-sys) -* [vfw32-sys ![Crates.io](https://img.shields.io/crates/v/vfw32-sys.svg)](https://crates.io/crates/vfw32-sys) -* [virtdisk-sys ![Crates.io](https://img.shields.io/crates/v/virtdisk-sys.svg)](https://crates.io/crates/virtdisk-sys) -* [vscmgr-sys ![Crates.io](https://img.shields.io/crates/v/vscmgr-sys.svg)](https://crates.io/crates/vscmgr-sys) -* [vss_uuid-sys ![Crates.io](https://img.shields.io/crates/v/vss_uuid-sys.svg)](https://crates.io/crates/vss_uuid-sys) -* [vstorinterface-sys ![Crates.io](https://img.shields.io/crates/v/vstorinterface-sys.svg)](https://crates.io/crates/vstorinterface-sys) -* [wbemuuid-sys ![Crates.io](https://img.shields.io/crates/v/wbemuuid-sys.svg)](https://crates.io/crates/wbemuuid-sys) -* [wcmapi-sys ![Crates.io](https://img.shields.io/crates/v/wcmapi-sys.svg)](https://crates.io/crates/wcmapi-sys) -* [wcmguid-sys ![Crates.io](https://img.shields.io/crates/v/wcmguid-sys.svg)](https://crates.io/crates/wcmguid-sys) -* [wdsbp-sys ![Crates.io](https://img.shields.io/crates/v/wdsbp-sys.svg)](https://crates.io/crates/wdsbp-sys) -* [wdsclientapi-sys ![Crates.io](https://img.shields.io/crates/v/wdsclientapi-sys.svg)](https://crates.io/crates/wdsclientapi-sys) -* [wdsmc-sys ![Crates.io](https://img.shields.io/crates/v/wdsmc-sys.svg)](https://crates.io/crates/wdsmc-sys) -* [wdspxe-sys ![Crates.io](https://img.shields.io/crates/v/wdspxe-sys.svg)](https://crates.io/crates/wdspxe-sys) -* [wdstptc-sys ![Crates.io](https://img.shields.io/crates/v/wdstptc-sys.svg)](https://crates.io/crates/wdstptc-sys) -* [webservices-sys ![Crates.io](https://img.shields.io/crates/v/webservices-sys.svg)](https://crates.io/crates/webservices-sys) -* [websocket-sys ![Crates.io](https://img.shields.io/crates/v/websocket-sys.svg)](https://crates.io/crates/websocket-sys) -* [wecapi-sys ![Crates.io](https://img.shields.io/crates/v/wecapi-sys.svg)](https://crates.io/crates/wecapi-sys) -* [wer-sys ![Crates.io](https://img.shields.io/crates/v/wer-sys.svg)](https://crates.io/crates/wer-sys) -* [wevtapi-sys ![Crates.io](https://img.shields.io/crates/v/wevtapi-sys.svg)](https://crates.io/crates/wevtapi-sys) -* [wiaguid-sys ![Crates.io](https://img.shields.io/crates/v/wiaguid-sys.svg)](https://crates.io/crates/wiaguid-sys) -* [wiaservc-sys ![Crates.io](https://img.shields.io/crates/v/wiaservc-sys.svg)](https://crates.io/crates/wiaservc-sys) -* [wiautil-sys ![Crates.io](https://img.shields.io/crates/v/wiautil-sys.svg)](https://crates.io/crates/wiautil-sys) -* [winbio-sys ![Crates.io](https://img.shields.io/crates/v/winbio-sys.svg)](https://crates.io/crates/winbio-sys) -* [windows-data-pdf-sys ![Crates.io](https://img.shields.io/crates/v/windows-data-pdf-sys.svg)](https://crates.io/crates/windows-data-pdf-sys) -* [windows-networking-sys ![Crates.io](https://img.shields.io/crates/v/windows-networking-sys.svg)](https://crates.io/crates/windows-networking-sys) -* [windows-ui-sys ![Crates.io](https://img.shields.io/crates/v/windows-ui-sys.svg)](https://crates.io/crates/windows-ui-sys) -* [windowscodecs-sys ![Crates.io](https://img.shields.io/crates/v/windowscodecs-sys.svg)](https://crates.io/crates/windowscodecs-sys) -* [windowssideshowguids-sys ![Crates.io](https://img.shields.io/crates/v/windowssideshowguids-sys.svg)](https://crates.io/crates/windowssideshowguids-sys) -* [winfax-sys ![Crates.io](https://img.shields.io/crates/v/winfax-sys.svg)](https://crates.io/crates/winfax-sys) -* [winhttp-sys ![Crates.io](https://img.shields.io/crates/v/winhttp-sys.svg)](https://crates.io/crates/winhttp-sys) -* [wininet-sys ![Crates.io](https://img.shields.io/crates/v/wininet-sys.svg)](https://crates.io/crates/wininet-sys) -* [winsatapi-sys ![Crates.io](https://img.shields.io/crates/v/winsatapi-sys.svg)](https://crates.io/crates/winsatapi-sys) -* [winscard-sys ![Crates.io](https://img.shields.io/crates/v/winscard-sys.svg)](https://crates.io/crates/winscard-sys) -* [winspool-sys ![Crates.io](https://img.shields.io/crates/v/winspool-sys.svg)](https://crates.io/crates/winspool-sys) -* [winsta-sys ![Crates.io](https://img.shields.io/crates/v/winsta-sys.svg)](https://crates.io/crates/winsta-sys) -* [winstrm-sys ![Crates.io](https://img.shields.io/crates/v/winstrm-sys.svg)](https://crates.io/crates/winstrm-sys) -* [wintrust-sys ![Crates.io](https://img.shields.io/crates/v/wintrust-sys.svg)](https://crates.io/crates/wintrust-sys) -* [winusb-sys ![Crates.io](https://img.shields.io/crates/v/winusb-sys.svg)](https://crates.io/crates/winusb-sys) -* [wlanapi-sys ![Crates.io](https://img.shields.io/crates/v/wlanapi-sys.svg)](https://crates.io/crates/wlanapi-sys) -* [wlanui-sys ![Crates.io](https://img.shields.io/crates/v/wlanui-sys.svg)](https://crates.io/crates/wlanui-sys) -* [wldap32-sys ![Crates.io](https://img.shields.io/crates/v/wldap32-sys.svg)](https://crates.io/crates/wldap32-sys) -* [wmcodecdspuuid-sys ![Crates.io](https://img.shields.io/crates/v/wmcodecdspuuid-sys.svg)](https://crates.io/crates/wmcodecdspuuid-sys) -* [wmdrmsdk-sys ![Crates.io](https://img.shields.io/crates/v/wmdrmsdk-sys.svg)](https://crates.io/crates/wmdrmsdk-sys) -* [wmip-sys ![Crates.io](https://img.shields.io/crates/v/wmip-sys.svg)](https://crates.io/crates/wmip-sys) -* [wmiutils-sys ![Crates.io](https://img.shields.io/crates/v/wmiutils-sys.svg)](https://crates.io/crates/wmiutils-sys) -* [wmvcore-sys ![Crates.io](https://img.shields.io/crates/v/wmvcore-sys.svg)](https://crates.io/crates/wmvcore-sys) -* [wnvapi-sys ![Crates.io](https://img.shields.io/crates/v/wnvapi-sys.svg)](https://crates.io/crates/wnvapi-sys) -* [workspaceax-sys ![Crates.io](https://img.shields.io/crates/v/workspaceax-sys.svg)](https://crates.io/crates/workspaceax-sys) -* [wow32-sys ![Crates.io](https://img.shields.io/crates/v/wow32-sys.svg)](https://crates.io/crates/wow32-sys) -* [wsbapp_uuid-sys ![Crates.io](https://img.shields.io/crates/v/wsbapp_uuid-sys.svg)](https://crates.io/crates/wsbapp_uuid-sys) -* [wsbonline-sys ![Crates.io](https://img.shields.io/crates/v/wsbonline-sys.svg)](https://crates.io/crates/wsbonline-sys) -* [wscapi-sys ![Crates.io](https://img.shields.io/crates/v/wscapi-sys.svg)](https://crates.io/crates/wscapi-sys) -* [wsclient-sys ![Crates.io](https://img.shields.io/crates/v/wsclient-sys.svg)](https://crates.io/crates/wsclient-sys) -* [wsdapi-sys ![Crates.io](https://img.shields.io/crates/v/wsdapi-sys.svg)](https://crates.io/crates/wsdapi-sys) -* [wsmsvc-sys ![Crates.io](https://img.shields.io/crates/v/wsmsvc-sys.svg)](https://crates.io/crates/wsmsvc-sys) -* [wsnmp32-sys ![Crates.io](https://img.shields.io/crates/v/wsnmp32-sys.svg)](https://crates.io/crates/wsnmp32-sys) -* [wsock32-sys ![Crates.io](https://img.shields.io/crates/v/wsock32-sys.svg)](https://crates.io/crates/wsock32-sys) -* [wtsapi32-sys ![Crates.io](https://img.shields.io/crates/v/wtsapi32-sys.svg)](https://crates.io/crates/wtsapi32-sys) -* [wuguid-sys ![Crates.io](https://img.shields.io/crates/v/wuguid-sys.svg)](https://crates.io/crates/wuguid-sys) -* [xapobase-sys ![Crates.io](https://img.shields.io/crates/v/xapobase-sys.svg)](https://crates.io/crates/xapobase-sys) -* [xaswitch-sys ![Crates.io](https://img.shields.io/crates/v/xaswitch-sys.svg)](https://crates.io/crates/xaswitch-sys) -* [xaudio2-sys ![Crates.io](https://img.shields.io/crates/v/xaudio2-sys.svg)](https://crates.io/crates/xaudio2-sys) -* [xinput9_1_0-sys ![Crates.io](https://img.shields.io/crates/v/xinput9_1_0-sys.svg)](https://crates.io/crates/xinput9_1_0-sys) -* [xmllite-sys ![Crates.io](https://img.shields.io/crates/v/xmllite-sys.svg)](https://crates.io/crates/xmllite-sys) -* [xolehlp-sys ![Crates.io](https://img.shields.io/crates/v/xolehlp-sys.svg)](https://crates.io/crates/xolehlp-sys) -* [xpsprint-sys ![Crates.io](https://img.shields.io/crates/v/xpsprint-sys.svg)](https://crates.io/crates/xpsprint-sys) diff --git a/deps/winapi-0.2.5/appveyor.yml b/deps/winapi-0.2.5/appveyor.yml deleted file mode 100644 index 7b1bf287b..000000000 --- a/deps/winapi-0.2.5/appveyor.yml +++ /dev/null @@ -1,20 +0,0 @@ -environment: - matrix: - - TARGET: x86_64-pc-windows-msvc - - TARGET: i686-pc-windows-msvc - - TARGET: x86_64-pc-windows-gnu - - TARGET: i686-pc-windows-gnu -install: - - ps: Start-FileDownload "https://static.rust-lang.org/dist/rust-nightly-${env:TARGET}.exe" -FileName "rust-nightly.exe" - - ps: .\rust-nightly.exe /VERYSILENT /NORESTART /DIR="C:\rust" | Out-Null - - ps: $env:PATH="$env:PATH;C:\rust\bin" - - rustc -vV - - cargo -vV -build_script: - - cargo build - - cargo package -test_script: - - cargo test -notifications: - - provider: Webhook - url: https://webhooks.gitter.im/e/9907ad94eb7a5ff291c3 diff --git a/deps/winapi-0.2.5/src/cfgmgr32.rs b/deps/winapi-0.2.5/src/cfgmgr32.rs deleted file mode 100644 index 880a268ac..000000000 --- a/deps/winapi-0.2.5/src/cfgmgr32.rs +++ /dev/null @@ -1,772 +0,0 @@ -// Copyright © 2015, skdltmxn -// Licensed under the MIT License <LICENSE.md> -//! user APIs for the Configuration Manager -pub type PCVOID = *const ::VOID; -pub const MAX_DEVICE_ID_LEN: usize = 200; -pub const MAX_DEVNODE_ID_LEN: usize = MAX_DEVICE_ID_LEN; -pub const MAX_GUID_STRING_LEN: usize = 39; -pub const MAX_CLASS_NAME_LEN: usize = 32; -pub const MAX_PROFILE_LEN: usize = 80; -pub const MAX_CONFIG_VALUE: ::DWORD = 9999; -pub const MAX_INSTANCE_VALUE: ::DWORD = 9999; -pub const MAX_MEM_REGISTERS: ::DWORD = 9; -pub const MAX_IO_PORTS: ::DWORD = 20; -pub const MAX_IRQS: ::DWORD = 7; -pub const MAX_DMA_CHANNELS: ::DWORD = 7; -pub const DWORD_MAX: ::DWORD = 0xffffffff; -pub const DWORDLONG_MAX: ::DWORDLONG = 0xffffffffffffffff; -pub const CONFIGMG_VERSION: ::DWORD = 0x0400; -pub type RETURN_TYPE = ::DWORD; -pub type CONFIGRET = RETURN_TYPE; -pub type DEVNODE = ::DWORD; -pub type DEVINST = ::DWORD; -pub type PDEVNODE = *mut DEVNODE; -pub type PDEVINST = *mut DEVNODE; -pub type DEVNODEID_A = *mut ::CHAR; -pub type DEVINSTID_A = *mut ::CHAR; -pub type DEVNODEID_W = *mut ::WCHAR; -pub type DEVINSTID_W = *mut ::WCHAR; -pub type LOG_CONF = ::DWORD_PTR; -pub type PLOG_CONF = *mut LOG_CONF; -pub type RES_DES = ::DWORD_PTR; -pub type PRES_DES = *mut RES_DES; -pub type RESOURCEID = ::ULONG; -pub type PRESOURCEID = *mut RESOURCEID; -pub type PRIORITY = ::ULONG; -pub type PPRIORITY = *mut PRIORITY; -pub type RANGE_LIST = ::DWORD_PTR; -pub type PRANGE_LIST = *mut RANGE_LIST; -pub type RANGE_ELEMENT = ::DWORD_PTR; -pub type PRANGE_ELEMENT = *mut RANGE_ELEMENT; -pub type HMACHINE = ::HANDLE; -pub type PHMACHINE = *mut HMACHINE; -pub type CONFLICT_LIST = ::ULONG_PTR; -pub type PCONFLICT_LIST = *mut CONFLICT_LIST; -#[repr(C)] #[derive(Copy)] -pub struct CONFLICT_DETAILS_A { - pub CD_ulSize: ::ULONG, - pub CD_ulMask: ::ULONG, - pub CD_dnDevInst: DEVINST, - pub CD_rdResDes: RES_DES, - pub CD_ulFlags: ::ULONG, - pub CD_szDescription: [::CHAR; ::MAX_PATH], -} -impl Clone for CONFLICT_DETAILS_A { fn clone(&self) -> CONFLICT_DETAILS_A { *self } } -pub type PCONFLICT_DETAILS_A = *mut CONFLICT_DETAILS_A; -#[repr(C)] #[derive(Copy)] -pub struct CONFLICT_DETAILS_W { - pub CD_ulSize: ::ULONG, - pub CD_ulMask: ::ULONG, - pub CD_dnDevInst: DEVINST, - pub CD_rdResDes: RES_DES, - pub CD_ulFlags: ::ULONG, - pub CD_szDescription: [::WCHAR; ::MAX_PATH], -} -impl Clone for CONFLICT_DETAILS_W { fn clone(&self) -> CONFLICT_DETAILS_W { *self } } -pub type PCONFLICT_DETAILS_W = *mut CONFLICT_DETAILS_W; -pub const CM_CDMASK_DEVINST: ::ULONG = 0x00000001; -pub const CM_CDMASK_RESDES: ::ULONG = 0x00000002; -pub const CM_CDMASK_FLAGS: ::ULONG = 0x00000004; -pub const CM_CDMASK_DESCRIPTION: ::ULONG = 0x00000008; -pub const CM_CDMASK_VALID: ::ULONG = 0x0000000F; -pub const CM_CDFLAGS_DRIVER: ::ULONG = 0x00000001; -pub const CM_CDFLAGS_ROOT_OWNED: ::ULONG = 0x00000002; -pub const CM_CDFLAGS_RESERVED: ::ULONG = 0x00000004; -pub type REGDISPOSITION = ::ULONG; -pub const mMD_MemoryType: ::DWORD = 0x1; -pub const fMD_MemoryType: ::DWORD = mMD_MemoryType; -pub const fMD_ROM: ::DWORD = 0x0; -pub const fMD_RAM: ::DWORD = 0x1; -pub const mMD_32_24: ::DWORD = 0x2; -pub const fMD_32_24: ::DWORD = mMD_32_24; -pub const fMD_24: ::DWORD = 0x0; -pub const fMD_32: ::DWORD = 0x2; -pub const mMD_Prefetchable: ::DWORD = 0x4; -pub const fMD_Prefetchable: ::DWORD = mMD_Prefetchable; -pub const fMD_Pref: ::DWORD = mMD_Prefetchable; -pub const fMD_PrefetchDisallowed: ::DWORD = 0x0; -pub const fMD_PrefetchAllowed: ::DWORD = 0x4; -pub const mMD_Readable: ::DWORD = 0x8; -pub const fMD_Readable: ::DWORD = mMD_Readable; -pub const fMD_ReadAllowed: ::DWORD = 0x0; -pub const fMD_ReadDisallowed: ::DWORD = 0x8; -pub const mMD_CombinedWrite: ::DWORD = 0x10; -pub const fMD_CombinedWrite: ::DWORD = mMD_CombinedWrite; -pub const fMD_CombinedWriteDisallowed: ::DWORD = 0x0; -pub const fMD_CombinedWriteAllowed: ::DWORD = 0x10; -pub const mMD_Cacheable: ::DWORD = 0x20; -pub const fMD_NonCacheable: ::DWORD = 0x0; -pub const fMD_Cacheable: ::DWORD = 0x20; -pub const fMD_WINDOW_DECODE: ::DWORD = 0x40; -pub const fMD_MEMORY_BAR: ::DWORD = 0x80; -STRUCT!{struct MEM_RANGE { - MR_Align: ::DWORDLONG, - MR_nBytes: ::ULONG, - MR_Min: ::DWORDLONG, - MR_Max: ::DWORDLONG, - MR_Flags: ::DWORD, - MR_Reserved: ::DWORD, -}} -pub type PMEM_RANGE = *mut MEM_RANGE; -STRUCT!{struct MEM_DES { - MD_Count: ::DWORD, - MD_Type: ::DWORD, - MD_Alloc_Base: ::DWORDLONG, - MD_Alloc_End: ::DWORDLONG, - MD_Flags: ::DWORD, - MD_Reserved: ::DWORD, -}} -pub type PMEM_DES = *mut MEM_DES; -STRUCT!{struct MEM_RESOURCE { - MEM_Header: MEM_DES, - MEM_Data: [MEM_RANGE; ::ANYSIZE_ARRAY], -}} -pub type PMEM_RESOURCE = *mut MEM_RESOURCE; -STRUCT!{struct MEM_LARGE_RANGE { - MLR_Align: ::DWORDLONG, - MLR_nBytes: ::ULONGLONG, - MLR_Min: ::DWORDLONG, - MLR_Max: ::DWORDLONG, - MLR_Flags: ::DWORD, - MLR_Reserved: ::DWORD, -}} -pub type PMEM_LARGE_RANGE = *mut MEM_LARGE_RANGE; -STRUCT!{struct MEM_LARGE_DES { - MLD_Count: ::DWORD, - MLD_Type: ::DWORD, - MLD_Alloc_Base: ::DWORDLONG, - MLD_Alloc_End: ::DWORDLONG, - MLD_Flags: ::DWORD, - MLD_Reserved: ::DWORD, -}} -pub type PMEM_LARGE_DES = *mut MEM_LARGE_DES; -STRUCT!{struct MEM_LARGE_RESOURCE { - MEM_LARGE_Header: MEM_LARGE_DES, - MEM_LARGE_Data: [MEM_LARGE_RANGE; ::ANYSIZE_ARRAY], -}} -pub type PMEM_LARGE_RESOURCE = *mut MEM_LARGE_RESOURCE; -pub const fIOD_PortType: ::DWORD = 0x1; -pub const fIOD_Memory: ::DWORD = 0x0; -pub const fIOD_IO: ::DWORD = 0x1; -pub const fIOD_DECODE: ::DWORD = 0x00fc; -pub const fIOD_10_BIT_DECODE: ::DWORD = 0x0004; -pub const fIOD_12_BIT_DECODE: ::DWORD = 0x0008; -pub const fIOD_16_BIT_DECODE: ::DWORD = 0x0010; -pub const fIOD_POSITIVE_DECODE: ::DWORD = 0x0020; -pub const fIOD_PASSIVE_DECODE: ::DWORD = 0x0040; -pub const fIOD_WINDOW_DECODE: ::DWORD = 0x0080; -pub const fIOD_PORT_BAR: ::DWORD = 0x0100; -pub const IO_ALIAS_10_BIT_DECODE: ::DWORDLONG = 0x00000004; -pub const IO_ALIAS_12_BIT_DECODE: ::DWORDLONG = 0x00000010; -pub const IO_ALIAS_16_BIT_DECODE: ::DWORDLONG = 0x00000000; -pub const IO_ALIAS_POSITIVE_DECODE: ::DWORDLONG = 0x000000FF; -STRUCT!{struct IO_RANGE { - IOR_Align: ::DWORDLONG, - IOR_nPorts: ::DWORD, - IOR_Min: ::DWORDLONG, - IOR_Max: ::DWORDLONG, - IOR_RangeFlags: ::DWORD, - IOR_Alias: ::DWORDLONG, -}} -pub type PIO_RANGE = *mut IO_RANGE; -STRUCT!{struct IO_DES { - IOD_Count: ::DWORD, - IOD_Type: ::DWORD, - IOD_Alloc_Base: ::DWORDLONG, - IOD_Alloc_End: ::DWORDLONG, - IOD_DesFlags: ::DWORD, -}} -pub type PIO_DES = *mut IO_DES; -STRUCT!{struct IO_RESOURCE { - IO_Header: IO_DES, - IO_Data: [IO_RANGE; ::ANYSIZE_ARRAY], -}} -pub type PIO_RESOURCE = *mut IO_RESOURCE; -pub const mDD_Width: ::ULONG = 0x3; -pub const fDD_BYTE: ::ULONG = 0x0; -pub const fDD_WORD: ::ULONG = 0x1; -pub const fDD_DWORD: ::ULONG = 0x2; -pub const fDD_BYTE_AND_WORD: ::ULONG = 0x3; -pub const mDD_BusMaster: ::ULONG = 0x4; -pub const fDD_NoBusMaster: ::ULONG = 0x0; -pub const fDD_BusMaster: ::ULONG = 0x4; -pub const mDD_Type: ::ULONG = 0x18; -pub const fDD_TypeStandard: ::ULONG = 0x00; -pub const fDD_TypeA: ::ULONG = 0x08; -pub const fDD_TypeB: ::ULONG = 0x10; -pub const fDD_TypeF: ::ULONG = 0x18; -STRUCT!{struct DMA_RANGE { - DR_Min: ::ULONG, - DR_Max: ::ULONG, - DR_Flags: ::ULONG, -}} -pub type PDMA_RANGE = *mut DMA_RANGE; -STRUCT!{struct DMA_DES { - DD_Count: ::DWORD, - DD_Type: ::DWORD, - DD_Flags: ::DWORD, - DD_Alloc_Chan: ::ULONG, -}} -pub type PDMA_DES = *mut DMA_DES; -STRUCT!{struct DMA_RESOURCE { - DMA_Header: DMA_DES, - DMA_Data: [DMA_RANGE; ::ANYSIZE_ARRAY], -}} -pub type PDMA_RESOURCE = *mut DMA_RESOURCE; -pub const mIRQD_Share: ::ULONG = 0x1; -pub const fIRQD_Exclusive: ::ULONG = 0x0; -pub const fIRQD_Share: ::ULONG = 0x1; -pub const fIRQD_Share_Bit: ::ULONG = 0; -pub const fIRQD_Level_Bit: ::ULONG = 1; -pub const mIRQD_Edge_Level: ::ULONG = 0x2; -pub const fIRQD_Level: ::ULONG = 0x0; -pub const fIRQD_Edge: ::ULONG = 0x2; -STRUCT!{struct IRQ_RANGE { - IRQR_Min: ::ULONG, - IRQR_Max: ::ULONG, - IRQR_Flags: ::ULONG, -}} -pub type PIRQ_RANGE = *mut IRQ_RANGE; -STRUCT!{struct IRQ_DES_32 { - IRQD_Count: ::DWORD, - IRQD_Type: ::DWORD, - IRQD_Flags: ::DWORD, - IRQD_Alloc_Num: ::ULONG, - IRQD_Affinity: ::ULONG32, -}} -pub type PIRQ_DES_32 = *mut IRQ_DES_32; -STRUCT!{struct IRQ_DES_64 { - IRQD_Count: ::DWORD, - IRQD_Type: ::DWORD, - IRQD_Flags: ::DWORD, - IRQD_Alloc_Num: ::ULONG, - IRQD_Affinity: ::ULONG64, -}} -pub type PIRQ_DES_64 = *mut IRQ_DES_64; -STRUCT!{struct IRQ_RESOURCE_32 { - IRQ_Header: IRQ_DES_32, - IRQ_Data: [IRQ_RANGE; ::ANYSIZE_ARRAY], -}} -pub type PIRQ_RESOURCE_32 = *mut IRQ_RESOURCE_32; -STRUCT!{struct IRQ_RESOURCE_64 { - IRQ_Header: IRQ_DES_64, - IRQ_Data: [IRQ_RANGE; ::ANYSIZE_ARRAY], -}} -pub type PIRQ_RESOURCE_64 = *mut IRQ_RESOURCE_64; -STRUCT!{struct DEVPRIVATE_RANGE { - PR_Data1: ::DWORD, - PR_Data2: ::DWORD, - PR_Data3: ::DWORD, -}} -pub type PDEVPRIVATE_RANGE = *mut DEVPRIVATE_RANGE; -STRUCT!{struct DEVPRIVATE_DES { - PD_Count: ::DWORD, - PD_Type: ::DWORD, - PD_Data1: ::DWORD, - PD_Data2: ::DWORD, - PD_Data3: ::DWORD, - PD_Flags: ::DWORD, -}} -pub type PDEVPRIVATE_DES = *mut DEVPRIVATE_DES; -STRUCT!{struct DEVPRIVATE_RESOURCE { - PRV_Header: DEVPRIVATE_DES, - PRV_Data: [DEVPRIVATE_RANGE; ::ANYSIZE_ARRAY], -}} -pub type PDEVPRIVATE_RESOURCE = *mut DEVPRIVATE_RESOURCE; -STRUCT!{struct CS_DES { - CSD_SignatureLength: ::DWORD, - CSD_LegacyDataOffset: ::DWORD, - CSD_LegacyDataSize: ::DWORD, - CSD_Flags: ::DWORD, - CSD_ClassGuid: ::GUID, - CSD_Signature: [::BYTE; ::ANYSIZE_ARRAY], -}} -pub type PCS_DES = *mut CS_DES; -STRUCT!{struct CS_RESOURCE { - CS_Header: CS_DES, -}} -pub type PCS_RESOURCE = *mut CS_RESOURCE; -pub const mPCD_IO_8_16: ::DWORD = 0x1; -pub const fPCD_IO_8: ::DWORD = 0x0; -pub const fPCD_IO_16: ::DWORD = 0x1; -pub const mPCD_MEM_8_16: ::DWORD = 0x2; -pub const fPCD_MEM_8: ::DWORD = 0x0; -pub const fPCD_MEM_16: ::DWORD = 0x2; -pub const mPCD_MEM_A_C: ::DWORD = 0xC; -pub const fPCD_MEM1_A: ::DWORD = 0x4; -pub const fPCD_MEM2_A: ::DWORD = 0x8; -pub const fPCD_IO_ZW_8: ::DWORD = 0x10; -pub const fPCD_IO_SRC_16: ::DWORD = 0x20; -pub const fPCD_IO_WS_16: ::DWORD = 0x40; -pub const mPCD_MEM_WS: ::DWORD = 0x300; -pub const fPCD_MEM_WS_ONE: ::DWORD = 0x100; -pub const fPCD_MEM_WS_TWO: ::DWORD = 0x200; -pub const fPCD_MEM_WS_THREE: ::DWORD = 0x300; -pub const fPCD_MEM_A: ::DWORD = 0x4; -pub const fPCD_ATTRIBUTES_PER_WINDOW: ::DWORD = 0x8000; -pub const fPCD_IO1_16: ::DWORD = 0x00010000; -pub const fPCD_IO1_ZW_8: ::DWORD = 0x00020000; -pub const fPCD_IO1_SRC_16: ::DWORD = 0x00040000; -pub const fPCD_IO1_WS_16: ::DWORD = 0x00080000; -pub const fPCD_IO2_16: ::DWORD = 0x00100000; -pub const fPCD_IO2_ZW_8: ::DWORD = 0x00200000; -pub const fPCD_IO2_SRC_16: ::DWORD = 0x00400000; -pub const fPCD_IO2_WS_16: ::DWORD = 0x00800000; -pub const mPCD_MEM1_WS: ::DWORD = 0x03000000; -pub const fPCD_MEM1_WS_TWO: ::DWORD = 0x02000000; -pub const fPCD_MEM1_WS_THREE: ::DWORD = 0x03000000; -pub const fPCD_MEM1_16: ::DWORD = 0x04000000; -pub const mPCD_MEM2_WS: ::DWORD = 0x30000000; -pub const fPCD_MEM2_WS_ONE: ::DWORD = 0x10000000; -pub const fPCD_MEM2_WS_TWO: ::DWORD = 0x20000000; -pub const fPCD_MEM2_WS_THREE: ::DWORD = 0x30000000; -pub const fPCD_MEM2_16: ::DWORD = 0x40000000; -pub const PCD_MAX_MEMORY: usize = 2; -pub const PCD_MAX_IO: usize = 2; -STRUCT!{struct PCCARD_DES { - PCD_Count: ::DWORD, - PCD_Type: ::DWORD, - PCD_Flags: ::DWORD, - PCD_ConfigIndex: ::BYTE, - PCD_Reserved: [::BYTE; 3], - PCD_MemoryCardBase1: ::DWORD, - PCD_MemoryCardBase2: ::DWORD, - PCD_MemoryCardBase: [::DWORD; PCD_MAX_MEMORY], - PCD_MemoryFlags: [::WORD; PCD_MAX_MEMORY], - PCD_IoFlags: [::BYTE; PCD_MAX_IO], -}} -pub type PPCCARD_DES = *mut PCCARD_DES; -STRUCT!{struct PCCARD_RESOURCE { - PcCard_Header: PCCARD_DES, -}} -pub type PPCCARD_RESOURCE = *mut PCCARD_RESOURCE; -pub const mPMF_AUDIO_ENABLE: ::DWORD = 0x8; -pub const fPMF_AUDIO_ENABLE: ::DWORD = 0x8; -STRUCT!{struct MFCARD_DES { - PMF_Count: ::DWORD, - PMF_Type: ::DWORD, - PMF_Flags: ::DWORD, - PMF_ConfigOptions: ::BYTE, - PMF_IoResourceIndex: ::BYTE, - PMF_Reserved: [::BYTE; 2], - PMF_ConfigRegisterBase: ::DWORD, -}} -pub type PMFCARD_DES = *mut MFCARD_DES; -STRUCT!{struct MFCARD_RESOURCE { - MfCard_Header: MFCARD_DES, -}} -pub type PMFCARD_RESOURCE = *mut MFCARD_RESOURCE; -STRUCT!{struct BUSNUMBER_RANGE { - BUSR_Min: ::ULONG, - BUSR_Max: ::ULONG, - BUSR_nBusNumbers: ::ULONG, - BUSR_Flags: ::ULONG, -}} -pub type PBUSNUMBER_RANGE = *mut BUSNUMBER_RANGE; -STRUCT!{struct BUSNUMBER_DES { - BUSD_Count: ::DWORD, - BUSD_Type: ::DWORD, - BUSD_Flags: ::DWORD, - BUSD_Alloc_Base: ::ULONG, - BUSD_Alloc_End: ::ULONG, -}} -pub type PBUSNUMBER_DES = *mut BUSNUMBER_DES; -STRUCT!{struct BUSNUMBER_RESOURCE { - BusNumber_Header: BUSNUMBER_DES, - BusNumber_Data: [BUSNUMBER_RANGE; ::ANYSIZE_ARRAY], -}} -pub type PBUSNUMBER_RESOURCE = *mut BUSNUMBER_RESOURCE; -STRUCT!{struct CONNECTION_DES { - COND_Type: ::DWORD, - COND_Flags: ::DWORD, - COND_Class: ::BYTE, - COND_ClassType: ::BYTE, - COND_Reserved1: ::BYTE, - COND_Reserved2: ::BYTE, - COND_Id: ::LARGE_INTEGER, -}} -pub type PCONNECTION_DES = *mut CONNECTION_DES; -STRUCT!{struct CONNECTION_RESOURCE { - Connection_Header: CONNECTION_DES, -}} -pub type PCONNECTION_RESOURCE = *mut CONNECTION_RESOURCE; -pub const CM_HWPI_NOT_DOCKABLE: ::DWORD = 0x00000000; -pub const CM_HWPI_UNDOCKED: ::DWORD = 0x00000001; -pub const CM_HWPI_DOCKED: ::DWORD = 0x00000002; -#[repr(C)] #[derive(Copy)] -pub struct HWPROFILEINFO_A { - pub HWPI_ulHWProfile: ::ULONG, - pub HWPI_szFriendlyName: [::CHAR; MAX_PROFILE_LEN], - pub HWPI_dwFlags: ::DWORD, -} -impl Clone for HWPROFILEINFO_A { fn clone(&self) -> HWPROFILEINFO_A { *self } } -pub type PHWPROFILEINFO_A = *mut HWPROFILEINFO_A; -#[repr(C)] #[derive(Copy)] -pub struct HWPROFILEINFO_W { - pub HWPI_ulHWProfile: ::ULONG, - pub HWPI_szFriendlyName: [::WCHAR; MAX_PROFILE_LEN], - pub HWPI_dwFlags: ::DWORD, -} -impl Clone for HWPROFILEINFO_W { fn clone(&self) -> HWPROFILEINFO_W { *self } } -pub type PHWPROFILEINFO_W = *mut HWPROFILEINFO_W; -pub const ResType_All: RESOURCEID = 0x00000000; -pub const ResType_None: RESOURCEID = 0x00000000; -pub const ResType_Mem: RESOURCEID = 0x00000001; -pub const ResType_IO: RESOURCEID = 0x00000002; -pub const ResType_DMA: RESOURCEID = 0x00000003; -pub const ResType_IRQ: RESOURCEID = 0x00000004; -pub const ResType_DoNotUse: RESOURCEID = 0x00000005; -pub const ResType_BusNumber: RESOURCEID = 0x00000006; -pub const ResType_MemLarge: RESOURCEID = 0x00000007; -pub const ResType_MAX: RESOURCEID = 0x00000007; -pub const ResType_Ignored_Bit: RESOURCEID = 0x00008000; -pub const ResType_ClassSpecific: RESOURCEID = 0x0000FFFF; -pub const ResType_Reserved: RESOURCEID = 0x00008000; -pub const ResType_DevicePrivate: RESOURCEID = 0x00008001; -pub const ResType_PcCardConfig: RESOURCEID = 0x00008002; -pub const ResType_MfCardConfig: RESOURCEID = 0x00008003; -pub const ResType_Connection: RESOURCEID = 0x00008004; -pub const CM_ADD_RANGE_ADDIFCONFLICT: ::ULONG = 0x00000000; -pub const CM_ADD_RANGE_DONOTADDIFCONFLICT: ::ULONG = 0x00000001; -pub const CM_ADD_RANGE_BITS: ::ULONG = 0x00000001; -pub const BASIC_LOG_CONF: ::ULONG = 0x00000000; -pub const FILTERED_LOG_CONF: ::ULONG = 0x00000001; -pub const ALLOC_LOG_CONF: ::ULONG = 0x00000002; -pub const BOOT_LOG_CONF: ::ULONG = 0x00000003; -pub const FORCED_LOG_CONF: ::ULONG = 0x00000004; -pub const OVERRIDE_LOG_CONF: ::ULONG = 0x00000005; -pub const NUM_LOG_CONF: ::ULONG = 0x00000006; -pub const LOG_CONF_BITS: ::ULONG = 0x00000007; -pub const PRIORITY_EQUAL_FIRST: ::ULONG = 0x00000008; -pub const PRIORITY_EQUAL_LAST: ::ULONG = 0x00000000; -pub const PRIORITY_BIT: ::ULONG = 0x00000008; -pub const RegDisposition_OpenAlways: REGDISPOSITION = 0x00000000; -pub const RegDisposition_OpenExisting: REGDISPOSITION = 0x00000001; -pub const RegDisposition_Bits: REGDISPOSITION = 0x00000001; -pub const CM_ADD_ID_HARDWARE: ::ULONG = 0x00000000; -pub const CM_ADD_ID_COMPATIBLE: ::ULONG = 0x00000001; -pub const CM_ADD_ID_BITS: ::ULONG = 0x00000001; -pub const CM_CREATE_DEVNODE_NORMAL: ::ULONG = 0x00000000; -pub const CM_CREATE_DEVNODE_NO_WAIT_INSTALL: ::ULONG = 0x00000001; -pub const CM_CREATE_DEVNODE_PHANTOM: ::ULONG = 0x00000002; -pub const CM_CREATE_DEVNODE_GENERATE_ID: ::ULONG = 0x00000004; -pub const CM_CREATE_DEVNODE_DO_NOT_INSTALL: ::ULONG = 0x00000008; -pub const CM_CREATE_DEVNODE_BITS: ::ULONG = 0x0000000F; -pub const CM_CREATE_DEVINST_NORMAL: ::ULONG = CM_CREATE_DEVNODE_NORMAL; -pub const CM_CREATE_DEVINST_NO_WAIT_INSTALL: ::ULONG = CM_CREATE_DEVNODE_NO_WAIT_INSTALL; -pub const CM_CREATE_DEVINST_PHANTOM: ::ULONG = CM_CREATE_DEVNODE_PHANTOM; -pub const CM_CREATE_DEVINST_GENERATE_ID: ::ULONG = CM_CREATE_DEVNODE_GENERATE_ID; -pub const CM_CREATE_DEVINST_DO_NOT_INSTALL: ::ULONG = CM_CREATE_DEVNODE_DO_NOT_INSTALL; -pub const CM_CREATE_DEVINST_BITS: ::ULONG = CM_CREATE_DEVNODE_BITS; -pub const CM_DELETE_CLASS_ONLY: ::ULONG = 0x00000000; -pub const CM_DELETE_CLASS_SUBKEYS: ::ULONG = 0x00000001; -pub const CM_DELETE_CLASS_INTERFACE: ::ULONG = 0x00000002; -pub const CM_DELETE_CLASS_BITS: ::ULONG = 0x00000003; -pub const CM_ENUMERATE_CLASSES_INSTALLER: ::ULONG = 0x00000000; -pub const CM_ENUMERATE_CLASSES_INTERFACE: ::ULONG = 0x00000001; -pub const CM_ENUMERATE_CLASSES_BITS: ::ULONG = 0x00000001; -pub const CM_DETECT_NEW_PROFILE: ::ULONG = 0x00000001; -pub const CM_DETECT_CRASHED: ::ULONG = 0x00000002; -pub const CM_DETECT_HWPROF_FIRST_BOOT: ::ULONG = 0x00000004; -pub const CM_DETECT_RUN: ::ULONG = 0x80000000; -pub const CM_DETECT_BITS: ::ULONG = 0x80000007; -pub const CM_DISABLE_POLITE: ::ULONG = 0x00000000; -pub const CM_DISABLE_ABSOLUTE: ::ULONG = 0x00000001; -pub const CM_DISABLE_HARDWARE: ::ULONG = 0x00000002; -pub const CM_DISABLE_UI_NOT_OK: ::ULONG = 0x00000004; -pub const CM_DISABLE_BITS: ::ULONG = 0x00000007; -pub const CM_GETIDLIST_FILTER_NONE: ::ULONG = 0x00000000; -pub const CM_GETIDLIST_FILTER_ENUMERATOR: ::ULONG = 0x00000001; -pub const CM_GETIDLIST_FILTER_SERVICE: ::ULONG = 0x00000002; -pub const CM_GETIDLIST_FILTER_EJECTRELATIONS: ::ULONG = 0x00000004; -pub const CM_GETIDLIST_FILTER_REMOVALRELATIONS: ::ULONG = 0x00000008; -pub const CM_GETIDLIST_FILTER_POWERRELATIONS: ::ULONG = 0x00000010; -pub const CM_GETIDLIST_FILTER_BUSRELATIONS: ::ULONG = 0x00000020; -pub const CM_GETIDLIST_DONOTGENERATE: ::ULONG = 0x10000040; -pub const CM_GETIDLIST_FILTER_TRANSPORTRELATIONS: ::ULONG = 0x00000080; -pub const CM_GETIDLIST_FILTER_PRESENT: ::ULONG = 0x00000100; -pub const CM_GETIDLIST_FILTER_CLASS: ::ULONG = 0x00000200; -pub const CM_GETIDLIST_FILTER_BITS: ::ULONG = 0x100003FF; -pub const CM_GET_DEVICE_INTERFACE_LIST_PRESENT: ::ULONG = 0x00000000; -pub const CM_GET_DEVICE_INTERFACE_LIST_ALL_DEVICES: ::ULONG = 0x00000001; -pub const CM_GET_DEVICE_INTERFACE_LIST_BITS: ::ULONG = 0x00000001; -pub const CM_DRP_DEVICEDESC: ::ULONG = 0x00000001; -pub const CM_DRP_HARDWAREID: ::ULONG = 0x00000002; -pub const CM_DRP_COMPATIBLEIDS: ::ULONG = 0x00000003; -pub const CM_DRP_UNUSED0: ::ULONG = 0x00000004; -pub const CM_DRP_SERVICE: ::ULONG = 0x00000005; -pub const CM_DRP_UNUSED1: ::ULONG = 0x00000006; -pub const CM_DRP_UNUSED2: ::ULONG = 0x00000007; -pub const CM_DRP_CLASS: ::ULONG = 0x00000008; -pub const CM_DRP_CLASSGUID: ::ULONG = 0x00000009; -pub const CM_DRP_DRIVER: ::ULONG = 0x0000000A; -pub const CM_DRP_CONFIGFLAGS: ::ULONG = 0x0000000B; -pub const CM_DRP_MFG: ::ULONG = 0x0000000C; -pub const CM_DRP_FRIENDLYNAME: ::ULONG = 0x0000000D; -pub const CM_DRP_LOCATION_INFORMATION: ::ULONG = 0x0000000E; -pub const CM_DRP_PHYSICAL_DEVICE_OBJECT_NAME: ::ULONG = 0x0000000F; -pub const CM_DRP_CAPABILITIES: ::ULONG = 0x00000010; -pub const CM_DRP_UI_NUMBER: ::ULONG = 0x00000011; -pub const CM_DRP_UPPERFILTERS: ::ULONG = 0x00000012; -pub const CM_CRP_UPPERFILTERS: ::ULONG = CM_DRP_UPPERFILTERS; -pub const CM_DRP_LOWERFILTERS: ::ULONG = 0x00000013; -pub const CM_CRP_LOWERFILTERS: ::ULONG = CM_DRP_LOWERFILTERS; -pub const CM_DRP_BUSTYPEGUID: ::ULONG = 0x00000014; -pub const CM_DRP_LEGACYBUSTYPE: ::ULONG = 0x00000015; -pub const CM_DRP_BUSNUMBER: ::ULONG = 0x00000016; -pub const CM_DRP_ENUMERATOR_NAME: ::ULONG = 0x00000017; -pub const CM_DRP_SECURITY: ::ULONG = 0x00000018; -pub const CM_CRP_SECURITY: ::ULONG = CM_DRP_SECURITY; -pub const CM_DRP_SECURITY_SDS: ::ULONG = 0x00000019; -pub const CM_CRP_SECURITY_SDS: ::ULONG = CM_DRP_SECURITY_SDS; -pub const CM_DRP_DEVTYPE: ::ULONG = 0x0000001A; -pub const CM_CRP_DEVTYPE: ::ULONG = CM_DRP_DEVTYPE; -pub const CM_DRP_EXCLUSIVE: ::ULONG = 0x0000001B; -pub const CM_CRP_EXCLUSIVE: ::ULONG = CM_DRP_EXCLUSIVE; -pub const CM_DRP_CHARACTERISTICS: ::ULONG = 0x0000001C; -pub const CM_CRP_CHARACTERISTICS: ::ULONG = CM_DRP_CHARACTERISTICS; -pub const CM_DRP_ADDRESS: ::ULONG = 0x0000001D; -pub const CM_DRP_UI_NUMBER_DESC_FORMAT: ::ULONG = 0x0000001E; -pub const CM_DRP_DEVICE_POWER_DATA: ::ULONG = 0x0000001F; -pub const CM_DRP_REMOVAL_POLICY: ::ULONG = 0x00000020; -pub const CM_DRP_REMOVAL_POLICY_HW_DEFAULT: ::ULONG = 0x00000021; -pub const CM_DRP_REMOVAL_POLICY_OVERRIDE: ::ULONG = 0x00000022; -pub const CM_DRP_INSTALL_STATE: ::ULONG = 0x00000023; -pub const CM_DRP_LOCATION_PATHS: ::ULONG = 0x00000024; -pub const CM_DRP_BASE_CONTAINERID: ::ULONG = 0x00000025; -pub const CM_DRP_MIN: ::ULONG = 0x00000001; -pub const CM_CRP_MIN: ::ULONG = CM_DRP_MIN; -pub const CM_DRP_MAX: ::ULONG = 0x00000025; -pub const CM_CRP_MAX: ::ULONG = CM_DRP_MAX; -pub const CM_DEVCAP_LOCKSUPPORTED: ::ULONG = 0x00000001; -pub const CM_DEVCAP_EJECTSUPPORTED: ::ULONG = 0x00000002; -pub const CM_DEVCAP_REMOVABLE: ::ULONG = 0x00000004; -pub const CM_DEVCAP_DOCKDEVICE: ::ULONG = 0x00000008; -pub const CM_DEVCAP_UNIQUEID: ::ULONG = 0x00000010; -pub const CM_DEVCAP_SILENTINSTALL: ::ULONG = 0x00000020; -pub const CM_DEVCAP_RAWDEVICEOK: ::ULONG = 0x00000040; -pub const CM_DEVCAP_SURPRISEREMOVALOK: ::ULONG = 0x00000080; -pub const CM_DEVCAP_HARDWAREDISABLED: ::ULONG = 0x00000100; -pub const CM_DEVCAP_NONDYNAMIC: ::ULONG = 0x00000200; -pub const CM_REMOVAL_POLICY_EXPECT_NO_REMOVAL: ::ULONG = 1; -pub const CM_REMOVAL_POLICY_EXPECT_ORDERLY_REMOVAL: ::ULONG = 2; -pub const CM_REMOVAL_POLICY_EXPECT_SURPRISE_REMOVAL: ::ULONG = 3; -pub const CM_INSTALL_STATE_INSTALLED: ::ULONG = 0; -pub const CM_INSTALL_STATE_NEEDS_REINSTALL: ::ULONG = 1; -pub const CM_INSTALL_STATE_FAILED_INSTALL: ::ULONG = 2; -pub const CM_INSTALL_STATE_FINISH_INSTALL: ::ULONG = 3; -pub const CM_LOCATE_DEVNODE_NORMAL: ::ULONG = 0x00000000; -pub const CM_LOCATE_DEVNODE_PHANTOM: ::ULONG = 0x00000001; -pub const CM_LOCATE_DEVNODE_CANCELREMOVE: ::ULONG = 0x00000002; -pub const CM_LOCATE_DEVNODE_NOVALIDATION: ::ULONG = 0x00000004; -pub const CM_LOCATE_DEVNODE_BITS: ::ULONG = 0x00000007; -pub const CM_LOCATE_DEVINST_NORMAL: ::ULONG = CM_LOCATE_DEVNODE_NORMAL; -pub const CM_LOCATE_DEVINST_PHANTOM: ::ULONG = CM_LOCATE_DEVNODE_PHANTOM; -pub const CM_LOCATE_DEVINST_CANCELREMOVE: ::ULONG = CM_LOCATE_DEVNODE_CANCELREMOVE; -pub const CM_LOCATE_DEVINST_NOVALIDATION: ::ULONG = CM_LOCATE_DEVNODE_NOVALIDATION; -pub const CM_LOCATE_DEVINST_BITS: ::ULONG = CM_LOCATE_DEVNODE_BITS; -pub const CM_OPEN_CLASS_KEY_INSTALLER: ::ULONG = 0x00000000; -pub const CM_OPEN_CLASS_KEY_INTERFACE: ::ULONG = 0x00000001; -pub const CM_OPEN_CLASS_KEY_BITS: ::ULONG = 0x00000001; -pub const CM_REMOVE_UI_OK: ::ULONG = 0x00000000; -pub const CM_REMOVE_UI_NOT_OK: ::ULONG = 0x00000001; -pub const CM_REMOVE_NO_RESTART: ::ULONG = 0x00000002; -pub const CM_REMOVE_BITS: ::ULONG = 0x00000003; -pub const CM_QUERY_REMOVE_UI_OK: ::ULONG = CM_REMOVE_UI_OK; -pub const CM_QUERY_REMOVE_UI_NOT_OK: ::ULONG = CM_REMOVE_UI_NOT_OK; -pub const CM_QUERY_REMOVE_BITS: ::ULONG = CM_QUERY_REMOVE_UI_OK | CM_QUERY_REMOVE_UI_NOT_OK; -pub const CM_REENUMERATE_NORMAL: ::ULONG = 0x00000000; -pub const CM_REENUMERATE_SYNCHRONOUS: ::ULONG = 0x00000001; -pub const CM_REENUMERATE_RETRY_INSTALLATION: ::ULONG = 0x00000002; -pub const CM_REENUMERATE_ASYNCHRONOUS: ::ULONG = 0x00000004; -pub const CM_REENUMERATE_BITS: ::ULONG = 0x00000007; -pub const CM_REGISTER_DEVICE_DRIVER_STATIC: ::ULONG = 0x00000000; -pub const CM_REGISTER_DEVICE_DRIVER_DISABLEABLE: ::ULONG = 0x00000001; -pub const CM_REGISTER_DEVICE_DRIVER_REMOVABLE: ::ULONG = 0x00000002; -pub const CM_REGISTER_DEVICE_DRIVER_BITS: ::ULONG = 0x00000003; -pub const CM_REGISTRY_HARDWARE: ::ULONG = 0x00000000; -pub const CM_REGISTRY_SOFTWARE: ::ULONG = 0x00000001; -pub const CM_REGISTRY_USER: ::ULONG = 0x00000100; -pub const CM_REGISTRY_CONFIG: ::ULONG = 0x00000200; -pub const CM_REGISTRY_BITS: ::ULONG = 0x00000301; -pub const CM_SET_DEVNODE_PROBLEM_NORMAL: ::ULONG = 0x00000000; -pub const CM_SET_DEVNODE_PROBLEM_OVERRIDE: ::ULONG = 0x00000001; -pub const CM_SET_DEVNODE_PROBLEM_BITS: ::ULONG = 0x00000001; -pub const CM_SET_DEVINST_PROBLEM_NORMAL: ::ULONG = CM_SET_DEVNODE_PROBLEM_NORMAL; -pub const CM_SET_DEVINST_PROBLEM_OVERRIDE: ::ULONG = CM_SET_DEVNODE_PROBLEM_OVERRIDE; -pub const CM_SET_DEVINST_PROBLEM_BITS: ::ULONG = CM_SET_DEVNODE_PROBLEM_BITS; -pub const CM_SET_HW_PROF_FLAGS_UI_NOT_OK: ::ULONG = 0x00000001; -pub const CM_SET_HW_PROF_FLAGS_BITS: ::ULONG = 0x00000001; -pub const CM_SETUP_DEVNODE_READY: ::ULONG = 0x00000000; -pub const CM_SETUP_DEVINST_READY: ::ULONG = CM_SETUP_DEVNODE_READY; -pub const CM_SETUP_DOWNLOAD: ::ULONG = 0x00000001; -pub const CM_SETUP_WRITE_LOG_CONFS: ::ULONG = 0x00000002; -pub const CM_SETUP_PROP_CHANGE: ::ULONG = 0x00000003; -pub const CM_SETUP_DEVNODE_RESET: ::ULONG = 0x00000004; -pub const CM_SETUP_DEVINST_RESET: ::ULONG = CM_SETUP_DEVNODE_RESET; -pub const CM_SETUP_DEVNODE_CONFIG: ::ULONG = 0x00000005; -pub const CM_SETUP_DEVINST_CONFIG: ::ULONG = CM_SETUP_DEVNODE_CONFIG; -pub const CM_SETUP_DEVNODE_CONFIG_CLASS: ::ULONG = 0x00000006; -pub const CM_SETUP_DEVINST_CONFIG_CLASS: ::ULONG = CM_SETUP_DEVNODE_CONFIG_CLASS; -pub const CM_SETUP_DEVNODE_CONFIG_EXTENSIONS: ::ULONG = 0x00000007; -pub const CM_SETUP_DEVINST_CONFIG_EXTENSIONS: ::ULONG = CM_SETUP_DEVNODE_CONFIG_EXTENSIONS; -pub const CM_SETUP_BITS: ::ULONG = 0x00000007; -pub const CM_QUERY_ARBITRATOR_RAW: ::ULONG = 0x00000000; -pub const CM_QUERY_ARBITRATOR_TRANSLATED: ::ULONG = 0x00000001; -pub const CM_QUERY_ARBITRATOR_BITS: ::ULONG = 0x00000001; -pub const CM_CUSTOMDEVPROP_MERGE_MULTISZ: ::ULONG = 0x00000001; -pub const CM_CUSTOMDEVPROP_BITS: ::ULONG = 0x00000001; -pub const CM_NAME_ATTRIBUTE_NAME_RETRIEVED_FROM_DEVICE: ::ULONG = 0x1; -pub const CM_NAME_ATTRIBUTE_USER_ASSIGNED_NAME: ::ULONG = 0x2; -pub const CM_CLASS_PROPERTY_INSTALLER: ::ULONG = 0x00000000; -pub const CM_CLASS_PROPERTY_INTERFACE: ::ULONG = 0x00000001; -pub const CM_CLASS_PROPERTY_BITS: ::ULONG = 0x00000001; -DECLARE_HANDLE!(HCMNOTIFICATION, HCMNOTIFICATION__); -pub type PHCMNOTIFICATION = *mut HCMNOTIFICATION; -pub const CM_NOTIFY_FILTER_FLAG_ALL_INTERFACE_CLASSES: ::ULONG = 0x00000001; -pub const CM_NOTIFY_FILTER_FLAG_ALL_DEVICE_INSTANCES: ::ULONG = 0x00000002; -pub const CM_NOTIFY_FILTER_VALID_FLAGS: ::ULONG = CM_NOTIFY_FILTER_FLAG_ALL_INTERFACE_CLASSES - | CM_NOTIFY_FILTER_FLAG_ALL_DEVICE_INSTANCES; -ENUM!{enum CM_NOTIFY_FILTER_TYPE { - CM_NOTIFY_FILTER_TYPE_DEVICEINTERFACE = 0, - CM_NOTIFY_FILTER_TYPE_DEVICEHANDLE, - CM_NOTIFY_FILTER_TYPE_DEVICEINSTANCE, - CM_NOTIFY_FILTER_TYPE_MAX, -}} -pub type PCM_NOTIFY_FILTER_TYPE = *mut CM_NOTIFY_FILTER_TYPE; -STRUCT!{struct CM_NOTIFY_FILTER_DeviceInterface { - ClassGuid: ::GUID, -}} -STRUCT!{struct CM_NOTIFY_FILTER_DeviceHandle { - hTarget: ::HANDLE, -}} -#[repr(C)] #[derive(Copy)] -pub struct CM_NOTIFY_FILTER_DeviceInstance { - pub InstanceId: [::WCHAR; MAX_DEVICE_ID_LEN], -} -impl Clone for CM_NOTIFY_FILTER_DeviceInstance { - fn clone(&self) -> CM_NOTIFY_FILTER_DeviceInstance { *self } -} -#[repr(C)] #[derive(Copy)] -pub struct CM_NOTIFY_FILTER { - pub cbSize: ::DWORD, - pub Flags: ::DWORD, - pub FilterType: CM_NOTIFY_FILTER_TYPE, - pub Reserved: ::DWORD, - pub u: [::BYTE; 400], -} -impl Clone for CM_NOTIFY_FILTER { fn clone(&self) -> CM_NOTIFY_FILTER { *self } } -UNION!(CM_NOTIFY_FILTER, u, DeviceInterface, DeviceInterface_mut, CM_NOTIFY_FILTER_DeviceInterface); -UNION!(CM_NOTIFY_FILTER, u, DeviceHandle, DeviceHandle_mut, CM_NOTIFY_FILTER_DeviceHandle); -UNION!(CM_NOTIFY_FILTER, u, DeviceInstance, DeviceInstance_mut, CM_NOTIFY_FILTER_DeviceInstance); -pub type PCM_NOTIFY_FILTER = *mut CM_NOTIFY_FILTER; -ENUM!{enum CM_NOTIFY_ACTION { - CM_NOTIFY_ACTION_DEVICEINTERFACEARRIVAL = 0, - CM_NOTIFY_ACTION_DEVICEINTERFACEREMOVAL, - CM_NOTIFY_ACTION_DEVICEQUERYREMOVE, - CM_NOTIFY_ACTION_DEVICEQUERYREMOVEFAILED, - CM_NOTIFY_ACTION_DEVICEREMOVEPENDING, - CM_NOTIFY_ACTION_DEVICEREMOVECOMPLETE, - CM_NOTIFY_ACTION_DEVICECUSTOMEVENT, - CM_NOTIFY_ACTION_DEVICEINSTANCEENUMERATED, - CM_NOTIFY_ACTION_DEVICEINSTANCESTARTED, - CM_NOTIFY_ACTION_DEVICEINSTANCEREMOVED, - CM_NOTIFY_ACTION_MAX, -}} -pub type PCM_NOTIFY_ACTION = *mut CM_NOTIFY_ACTION; -STRUCT!{struct CM_NOTIFY_EVENT_DATA_DeviceInterface { - ClassGuid: ::GUID, - SymbolicLink: [::WCHAR; ::ANYSIZE_ARRAY], -}} -STRUCT!{struct CM_NOTIFY_EVENT_DATA_DeviceHandle { - EventGuid: ::GUID, - NameOffset: ::LONG, - DataSize: ::DWORD, - Data: [::BYTE; ::ANYSIZE_ARRAY], -}} -STRUCT!{struct CM_NOTIFY_EVENT_DATA_DeviceInstance { - InstanceId: [::WCHAR; ::ANYSIZE_ARRAY], -}} -STRUCT!{struct CM_NOTIFY_EVENT_DATA { - FilterType: CM_NOTIFY_FILTER_TYPE, - Reserved: ::DWORD, - u: [::BYTE; 25], -}} -UNION!( - CM_NOTIFY_EVENT_DATA, u, DeviceInterface, DeviceInterface_mut, - CM_NOTIFY_EVENT_DATA_DeviceInterface -); -UNION!(CM_NOTIFY_EVENT_DATA, u, DeviceHandle, DeviceHandle_mut, CM_NOTIFY_EVENT_DATA_DeviceHandle); -UNION!( - CM_NOTIFY_EVENT_DATA, u, DeviceInstance, DeviceInstance_mut, CM_NOTIFY_EVENT_DATA_DeviceInstance -); -pub type PCM_NOTIFY_EVENT_DATA = *mut CM_NOTIFY_EVENT_DATA; -pub type PCM_NOTIFY_CALLBACK = Option<unsafe extern "system" fn( - hNotify: HCMNOTIFICATION, Context: ::PVOID, Action: CM_NOTIFY_ACTION, - EventData: PCM_NOTIFY_EVENT_DATA, EventDataSize: ::DWORD, -) -> ::DWORD>; -pub const CR_SUCCESS: CONFIGRET = 0x00000000; -pub const CR_DEFAULT: CONFIGRET = 0x00000001; -pub const CR_OUT_OF_MEMORY: CONFIGRET = 0x00000002; -pub const CR_INVALID_POINTER: CONFIGRET = 0x00000003; -pub const CR_INVALID_FLAG: CONFIGRET = 0x00000004; -pub const CR_INVALID_DEVNODE: CONFIGRET = 0x00000005; -pub const CR_INVALID_DEVINST: CONFIGRET = CR_INVALID_DEVNODE; -pub const CR_INVALID_RES_DES: CONFIGRET = 0x00000006; -pub const CR_INVALID_LOG_CONF: CONFIGRET = 0x00000007; -pub const CR_INVALID_ARBITRATOR: CONFIGRET = 0x00000008; -pub const CR_INVALID_NODELIST: CONFIGRET = 0x00000009; -pub const CR_DEVNODE_HAS_REQS: CONFIGRET = 0x0000000A; -pub const CR_DEVINST_HAS_REQS: CONFIGRET = CR_DEVNODE_HAS_REQS; -pub const CR_INVALID_RESOURCEID: CONFIGRET = 0x0000000B; -pub const CR_DLVXD_NOT_FOUND: CONFIGRET = 0x0000000C; -pub const CR_NO_SUCH_DEVNODE: CONFIGRET = 0x0000000D; -pub const CR_NO_SUCH_DEVINST: CONFIGRET = CR_NO_SUCH_DEVNODE; -pub const CR_NO_MORE_LOG_CONF: CONFIGRET = 0x0000000E; -pub const CR_NO_MORE_RES_DES: CONFIGRET = 0x0000000F; -pub const CR_ALREADY_SUCH_DEVNODE: CONFIGRET = 0x00000010; -pub const CR_ALREADY_SUCH_DEVINST: CONFIGRET = CR_ALREADY_SUCH_DEVNODE; -pub const CR_INVALID_RANGE_LIST: CONFIGRET = 0x00000011; -pub const CR_INVALID_RANGE: CONFIGRET = 0x00000012; -pub const CR_FAILURE: CONFIGRET = 0x00000013; -pub const CR_NO_SUCH_LOGICAL_DEV: CONFIGRET = 0x00000014; -pub const CR_CREATE_BLOCKED: CONFIGRET = 0x00000015; -pub const CR_NOT_SYSTEM_VM: CONFIGRET = 0x00000016; -pub const CR_REMOVE_VETOED: CONFIGRET = 0x00000017; -pub const CR_APM_VETOED: CONFIGRET = 0x00000018; -pub const CR_INVALID_LOAD_TYPE: CONFIGRET = 0x00000019; -pub const CR_BUFFER_SMALL: CONFIGRET = 0x0000001A; -pub const CR_NO_ARBITRATOR: CONFIGRET = 0x0000001B; -pub const CR_NO_REGISTRY_HANDLE: CONFIGRET = 0x0000001C; -pub const CR_REGISTRY_ERROR: CONFIGRET = 0x0000001D; -pub const CR_INVALID_DEVICE_ID: CONFIGRET = 0x0000001E; -pub const CR_INVALID_DATA: CONFIGRET = 0x0000001F; -pub const CR_INVALID_API: CONFIGRET = 0x00000020; -pub const CR_DEVLOADER_NOT_READY: CONFIGRET = 0x00000021; -pub const CR_NEED_RESTART: CONFIGRET = 0x00000022; -pub const CR_NO_MORE_HW_PROFILES: CONFIGRET = 0x00000023; -pub const CR_DEVICE_NOT_THERE: CONFIGRET = 0x00000024; -pub const CR_NO_SUCH_VALUE: CONFIGRET = 0x00000025; -pub const CR_WRONG_TYPE: CONFIGRET = 0x00000026; -pub const CR_INVALID_PRIORITY: CONFIGRET = 0x00000027; -pub const CR_NOT_DISABLEABLE: CONFIGRET = 0x00000028; -pub const CR_FREE_RESOURCES: CONFIGRET = 0x00000029; -pub const CR_QUERY_VETOED: CONFIGRET = 0x0000002A; -pub const CR_CANT_SHARE_IRQ: CONFIGRET = 0x0000002B; -pub const CR_NO_DEPENDENT: CONFIGRET = 0x0000002C; -pub const CR_SAME_RESOURCES: CONFIGRET = 0x0000002D; -pub const CR_NO_SUCH_REGISTRY_KEY: CONFIGRET = 0x0000002E; -pub const CR_INVALID_MACHINENAME: CONFIGRET = 0x0000002F; -pub const CR_REMOTE_COMM_FAILURE: CONFIGRET = 0x00000030; -pub const CR_MACHINE_UNAVAILABLE: CONFIGRET = 0x00000031; -pub const CR_NO_CM_SERVICES: CONFIGRET = 0x00000032; -pub const CR_ACCESS_DENIED: CONFIGRET = 0x00000033; -pub const CR_CALL_NOT_IMPLEMENTED: CONFIGRET = 0x00000034; -pub const CR_INVALID_PROPERTY: CONFIGRET = 0x00000035; -pub const CR_DEVICE_INTERFACE_ACTIVE: CONFIGRET = 0x00000036; -pub const CR_NO_SUCH_DEVICE_INTERFACE: CONFIGRET = 0x00000037; -pub const CR_INVALID_REFERENCE_STRING: CONFIGRET = 0x00000038; -pub const CR_INVALID_CONFLICT_LIST: CONFIGRET = 0x00000039; -pub const CR_INVALID_INDEX: CONFIGRET = 0x0000003A; -pub const CR_INVALID_STRUCTURE_SIZE: CONFIGRET = 0x0000003B; -pub const NUM_CR_RESULTS: CONFIGRET = 0x0000003C; diff --git a/deps/winapi-0.2.5/src/commctrl.rs b/deps/winapi-0.2.5/src/commctrl.rs deleted file mode 100644 index 54c877d36..000000000 --- a/deps/winapi-0.2.5/src/commctrl.rs +++ /dev/null @@ -1,3614 +0,0 @@ -// Copyright © 2015, Peter Atashian -// Licensed under the MIT License <LICENSE.md> -//138 -STRUCT!{struct INITCOMMONCONTROLSEX { - dwSize: ::DWORD, - dwICC: ::DWORD, -}} -pub type LPINITCOMMONCONTROLSEX = *mut INITCOMMONCONTROLSEX; -pub const ICC_LISTVIEW_CLASSES: ::DWORD = 0x1; -pub const ICC_TREEVIEW_CLASSES: ::DWORD = 0x2; -pub const ICC_BAR_CLASSES: ::DWORD = 0x4; -pub const ICC_TAB_CLASSES: ::DWORD = 0x8; -pub const ICC_UPDOWN_CLASS: ::DWORD = 0x10; -pub const ICC_PROGRESS_CLASS: ::DWORD = 0x20; -pub const ICC_HOTKEY_CLASS: ::DWORD = 0x40; -pub const ICC_ANIMATE_CLASS: ::DWORD = 0x80; -pub const ICC_WIN95_CLASSES: ::DWORD = 0xFF; -pub const ICC_DATE_CLASSES: ::DWORD = 0x100; -pub const ICC_USEREX_CLASSES: ::DWORD = 0x200; -pub const ICC_COOL_CLASSES: ::DWORD = 0x400; -pub const ICC_INTERNET_CLASSES: ::DWORD = 0x800; -pub const ICC_PAGESCROLLER_CLASS: ::DWORD = 0x1000; -pub const ICC_NATIVEFNTCTL_CLASS: ::DWORD = 0x2000; -pub const ICC_STANDARD_CLASSES: ::DWORD = 0x4000; -pub const ICC_LINK_CLASS: ::DWORD = 0x8000; -pub const ODT_HEADER: ::UINT = 100; -pub const ODT_TAB: ::UINT = 101; -pub const ODT_LISTVIEW: ::UINT = 102; -pub const LVM_FIRST: ::UINT = 0x1000; -pub const TV_FIRST: ::UINT = 0x1100; -pub const HDM_FIRST: ::UINT = 0x1200; -pub const TCM_FIRST: ::UINT = 0x1300; -pub const PGM_FIRST: ::UINT = 0x1400; -pub const ECM_FIRST: ::UINT = 0x1500; -pub const BCM_FIRST: ::UINT = 0x1600; -pub const CBM_FIRST: ::UINT = 0x1700; -pub const CCM_FIRST: ::UINT = 0x2000; -pub const CCM_LAST: ::UINT = CCM_FIRST + 0x200; -pub const CCM_SETBKCOLOR: ::UINT = CCM_FIRST + 1; -STRUCT!{struct COLORSCHEME { - dwSize: ::DWORD, - clrBtnHighlight: ::COLORREF, - clrBtnShadow: ::COLORREF, -}} -pub type LPCOLORSCHEME = *mut COLORSCHEME; -pub const CCM_SETCOLORSCHEME: ::UINT = CCM_FIRST + 2; -pub const CCM_GETCOLORSCHEME: ::UINT = CCM_FIRST + 3; -pub const CCM_GETDROPTARGET: ::UINT = CCM_FIRST + 4; -pub const CCM_SETUNICODEFORMAT: ::UINT = CCM_FIRST + 5; -pub const CCM_GETUNICODEFORMAT: ::UINT = CCM_FIRST + 6; -pub const CCM_SETVERSION: ::UINT = CCM_FIRST + 7; -pub const CCM_GETVERSION: ::UINT = CCM_FIRST + 8; -pub const CCM_SETNOTIFYWINDOW: ::UINT = CCM_FIRST + 9; -pub const CCM_SETWINDOWTHEME: ::UINT = CCM_FIRST + 0xb; -pub const CCM_DPISCALE: ::UINT = CCM_FIRST + 0xc; -pub const INFOTIPSIZE: ::c_int = 1024; -pub const NM_OUTOFMEMORY: ::UINT = NM_FIRST-1; -pub const NM_CLICK: ::UINT = NM_FIRST-2; -pub const NM_DBLCLK: ::UINT = NM_FIRST-3; -pub const NM_RETURN: ::UINT = NM_FIRST-4; -pub const NM_RCLICK: ::UINT = NM_FIRST-5; -pub const NM_RDBLCLK: ::UINT = NM_FIRST-6; -pub const NM_SETFOCUS: ::UINT = NM_FIRST-7; -pub const NM_KILLFOCUS: ::UINT = NM_FIRST-8; -pub const NM_CUSTOMDRAW: ::UINT = NM_FIRST-12; -pub const NM_HOVER: ::UINT = NM_FIRST-13; -pub const NM_NCHITTEST: ::UINT = NM_FIRST-14; -pub const NM_KEYDOWN: ::UINT = NM_FIRST-15; -pub const NM_RELEASEDCAPTURE: ::UINT = NM_FIRST-16; -pub const NM_SETCURSOR: ::UINT = NM_FIRST-17; -pub const NM_CHAR: ::UINT = NM_FIRST-18; -pub const NM_TOOLTIPSCREATED: ::UINT = NM_FIRST-19; -pub const NM_LDOWN: ::UINT = NM_FIRST-20; -pub const NM_RDOWN: ::UINT = NM_FIRST-21; -pub const NM_THEMECHANGED: ::UINT = NM_FIRST-22; -pub const NM_FONTCHANGED: ::UINT = NM_FIRST-23; -pub const NM_CUSTOMTEXT: ::UINT = NM_FIRST-24; -pub const NM_TVSTATEIMAGECHANGING: ::UINT = NM_FIRST-24; -STRUCT!{struct NMTOOLTIPSCREATED { - hdr: ::NMHDR, - hwndToolTips: ::HWND, -}} -pub type LPNMTOOLTIPSCREATED = *mut NMTOOLTIPSCREATED; -STRUCT!{struct NMMOUSE { - hdr : ::NMHDR, - dwItemSpec: ::DWORD_PTR, - dwItemData: ::DWORD_PTR, - pt: ::POINT, - dwHitInfo: ::LPARAM, -}} -pub type LPNMMOUSE = *mut NMMOUSE; -pub type NMCLICK = NMMOUSE; -pub type LPNMCLICK = LPNMMOUSE; -STRUCT!{struct NMOBJECTNOTIFY { - hdr: ::NMHDR, - iItem: ::c_int, - piid: *const ::IID, - pObject: *mut ::c_void, - hResult: ::HRESULT, - dwFlags: ::DWORD, -}} -pub type LPNMOBJECTNOTIFY = *mut NMOBJECTNOTIFY; -STRUCT!{struct NMKEY { - hdr: ::NMHDR, - nVKey: ::UINT, - uFlags: ::UINT, -}} -pub type LPNMKEY = *mut NMKEY; -STRUCT!{struct NMCHAR { - hdr: ::NMHDR, - ch: ::UINT, - dwItemPrev: ::DWORD, - dwItemNext: ::DWORD, -}} -pub type LPNMCHAR = *mut NMCHAR; -STRUCT!{struct NMCUSTOMTEXT { - hdr: ::NMHDR, - hDC: ::HDC, - lpString: ::LPCWSTR, - nCount: ::c_int, - lpRect: ::LPRECT, - uFormat: ::UINT, - fLink: ::BOOL, -}} -pub type LPNMCUSTOMTEXT = *mut NMCUSTOMTEXT; -pub const NM_FIRST: ::UINT = 0; -pub const NM_LAST: ::UINT = 0 - 99; -pub const LVN_FIRST: ::UINT = 0 - 100; -pub const LVN_LAST: ::UINT = 0 - 199; -pub const HDN_FIRST: ::UINT = 0 - 300; -pub const HDN_LAST: ::UINT = 0 - 399; -pub const TVN_FIRST: ::UINT = 0 - 400; -pub const TVN_LAST: ::UINT = 0 - 499; -pub const TTN_FIRST: ::UINT = 0 - 520; -pub const TTN_LAST: ::UINT = 0 - 549; -pub const TCN_FIRST: ::UINT = 0 - 550; -pub const TCN_LAST: ::UINT = 0 - 580; -// pub const CDN_FIRST: ::UINT = 0 - 601; -// pub const CDN_LAST: ::UINT = 0 - 699; -pub const TBN_FIRST: ::UINT = 0 - 700; -pub const TBN_LAST: ::UINT = 0 - 720; -pub const UDN_FIRST: ::UINT = 0 - 721; -pub const UDN_LAST: ::UINT = 0 - 729; -pub const DTN_FIRST: ::UINT = 0 - 740; -pub const DTN_LAST: ::UINT = 0 - 745; -pub const MCN_FIRST: ::UINT = 0 - 746; -pub const MCN_LAST: ::UINT = 0 - 752; -pub const DTN_FIRST2: ::UINT = 0 - 753; -pub const DTN_LAST2: ::UINT = 0 - 799; -pub const CBEN_FIRST: ::UINT = 0 - 800; -pub const CBEN_LAST: ::UINT = 0 - 830; -pub const RBN_FIRST: ::UINT = 0 - 831; -pub const RBN_LAST: ::UINT = 0 - 859; -pub const IPN_FIRST: ::UINT = 0 - 860; -pub const IPN_LAST: ::UINT = 0 - 879; -pub const SBN_FIRST: ::UINT = 0 - 880; -pub const SBN_LAST: ::UINT = 0 - 899; -pub const PGN_FIRST: ::UINT = 0 - 900; -pub const PGN_LAST: ::UINT = 0 - 950; -pub const WMN_FIRST: ::UINT = 0 - 1000; -pub const WMN_LAST: ::UINT = 0 - 1200; -pub const BCN_FIRST: ::UINT = 0 - 1250; -pub const BCN_LAST: ::UINT = 0 - 1350; -pub const TRBN_FIRST: ::UINT = 0 - 1501; -pub const TRBN_LAST: ::UINT = 0 - 1519; -pub const CDRF_DODEFAULT: ::LRESULT = 0x00000000; -pub const CDRF_NEWFONT: ::LRESULT = 0x00000002; -pub const CDRF_SKIPDEFAULT: ::LRESULT = 0x00000004; -pub const CDRF_DOERASE: ::LRESULT = 0x00000008; -pub const CDRF_SKIPPOSTPAINT: ::LRESULT = 0x00000100; -pub const CDRF_NOTIFYPOSTPAINT: ::LRESULT = 0x00000010; -pub const CDRF_NOTIFYITEMDRAW: ::LRESULT = 0x00000020; -pub const CDRF_NOTIFYSUBITEMDRAW: ::LRESULT = 0x00000020; -pub const CDRF_NOTIFYPOSTERASE: ::LRESULT = 0x00000040; -pub const CDDS_PREPAINT: ::DWORD = 0x00000001; -pub const CDDS_POSTPAINT: ::DWORD = 0x00000002; -pub const CDDS_PREERASE: ::DWORD = 0x00000003; -pub const CDDS_POSTERASE: ::DWORD = 0x00000004; -pub const CDDS_ITEM: ::DWORD = 0x00010000; -pub const CDDS_ITEMPREPAINT: ::DWORD = CDDS_ITEM | CDDS_PREPAINT; -pub const CDDS_ITEMPOSTPAINT: ::DWORD = CDDS_ITEM | CDDS_POSTPAINT; -pub const CDDS_ITEMPREERASE: ::DWORD = CDDS_ITEM | CDDS_PREERASE; -pub const CDDS_ITEMPOSTERASE: ::DWORD = CDDS_ITEM | CDDS_POSTERASE; -pub const CDDS_SUBITEM: ::DWORD = 0x00020000; -pub const CDIS_SELECTED: ::UINT = 0x0001; -pub const CDIS_GRAYED: ::UINT = 0x0002; -pub const CDIS_DISABLED: ::UINT = 0x0004; -pub const CDIS_CHECKED: ::UINT = 0x0008; -pub const CDIS_FOCUS: ::UINT = 0x0010; -pub const CDIS_DEFAULT: ::UINT = 0x0020; -pub const CDIS_HOT: ::UINT = 0x0040; -pub const CDIS_MARKED: ::UINT = 0x0080; -pub const CDIS_INDETERMINATE: ::UINT = 0x0100; -pub const CDIS_SHOWKEYBOARDCUES: ::UINT = 0x0200; -pub const CDIS_NEARHOT: ::UINT = 0x0400; -pub const CDIS_OTHERSIDEHOT: ::UINT = 0x0800; -pub const CDIS_DROPHILITED: ::UINT = 0x1000; -STRUCT!{struct NMCUSTOMDRAW { - hdr: ::NMHDR, - dwDrawStage: ::DWORD, - hdc: ::HDC, - rc: ::RECT, - dwItemSpec: ::DWORD_PTR, - uItemState: ::UINT, - lItemlParam: ::LPARAM, -}} -pub type LPNMCUSTOMDRAW = *mut NMCUSTOMDRAW; -STRUCT!{struct NMTTCUSTOMDRAW { - nmcd: NMCUSTOMDRAW, - uDrawFlags: ::UINT, -}} -pub type LPNMTTCUSTOMDRAW = *mut NMTTCUSTOMDRAW; -STRUCT!{struct NMCUSTOMSPLITRECTINFO { - hdr: ::NMHDR, - rcClient: ::RECT, - rcButton: ::RECT, - rcSplit: ::RECT, -}} -pub type LPNMCUSTOMSPLITRECTINFO = *mut NMCUSTOMSPLITRECTINFO; -pub const NM_GETCUSTOMSPLITRECT: ::UINT = BCN_FIRST + 0x0003; -pub const CLR_NONE: ::DWORD = 0xFFFFFFFF; -pub const CLR_DEFAULT: ::DWORD = 0xFF000000; -#[repr(C)] #[allow(missing_copy_implementations)] -pub struct IMAGELIST { - unused: ::c_void, -} -pub type HIMAGELIST = *mut IMAGELIST; -STRUCT!{struct IMAGELISTDRAWPARAMS { - cbSize: ::DWORD, - himl: HIMAGELIST, - i: ::c_int, - hdcDst: ::HDC, - x: ::c_int, - y: ::c_int, - cx: ::c_int, - cy: ::c_int, - xBitmap: ::c_int, - yBitmap: ::c_int, - rgbBk: ::COLORREF, - rgbFg: ::COLORREF, - fStyle: ::UINT, - dwRop: ::DWORD, - fState: ::DWORD, - Frame: ::DWORD, - crEffect: ::COLORREF, -}} -pub type LPIMAGELISTDRAWPARAMS = *mut IMAGELISTDRAWPARAMS; -pub const ILC_MASK: ::UINT = 0x00000001; -pub const ILC_COLOR: ::UINT = 0x00000000; -pub const ILC_COLORDDB: ::UINT = 0x000000FE; -pub const ILC_COLOR4: ::UINT = 0x00000004; -pub const ILC_COLOR8: ::UINT = 0x00000008; -pub const ILC_COLOR16: ::UINT = 0x00000010; -pub const ILC_COLOR24: ::UINT = 0x00000018; -pub const ILC_COLOR32: ::UINT = 0x00000020; -pub const ILC_PALETTE: ::UINT = 0x00000800; -pub const ILC_MIRROR: ::UINT = 0x00002000; -pub const ILC_PERITEMMIRROR: ::UINT = 0x00008000; -pub const ILC_ORIGINALSIZE: ::UINT = 0x00010000; -pub const ILC_HIGHQUALITYSCALE: ::UINT = 0x00020000; -pub const ILD_NORMAL: ::UINT = 0x00000000; -pub const ILD_TRANSPARENT: ::UINT = 0x00000001; -pub const ILD_MASK: ::UINT = 0x00000010; -pub const ILD_IMAGE: ::UINT = 0x00000020; -pub const ILD_ROP: ::UINT = 0x00000040; -pub const ILD_BLEND25: ::UINT = 0x00000002; -pub const ILD_BLEND50: ::UINT = 0x00000004; -pub const ILD_OVERLAYMASK: ::UINT = 0x00000F00; -#[inline] #[allow(dead_code)] -pub fn INDEXTOOVERLAYMASK(i: ::UINT) -> ::UINT { i << 8 } -pub const ILD_PRESERVEALPHA: ::UINT = 0x00001000; -pub const ILD_SCALE: ::UINT = 0x00002000; -pub const ILD_DPISCALE: ::UINT = 0x00004000; -pub const ILD_ASYNC: ::UINT = 0x00008000; -pub const ILD_SELECTED: ::UINT = ILD_BLEND50; -pub const ILD_FOCUS: ::UINT = ILD_BLEND25; -pub const ILD_BLEND: ::UINT = ILD_BLEND50; -pub const CLR_HILIGHT: ::DWORD = CLR_DEFAULT; -pub const ILS_NORMAL: ::DWORD = 0x00000000; -pub const ILS_GLOW: ::DWORD = 0x00000001; -pub const ILS_SHADOW: ::DWORD = 0x00000002; -pub const ILS_SATURATE: ::DWORD = 0x00000004; -pub const ILS_ALPHA: ::DWORD = 0x00000008; -pub const HBITMAP_CALLBACK: ::HBITMAP = (0-1) as ::HBITMAP; -pub const ILCF_MOVE: ::UINT = 0x00000000; -pub const ILCF_SWAP: ::UINT = 0x00000001; -STRUCT!{struct IMAGEINFO { - hbmImage: ::HBITMAP, - hbmMask: ::HBITMAP, - Unused1: ::c_int, - Unused2: ::c_int, - rcImage: ::RECT, -}} -pub type LPIMAGEINFO = *mut IMAGEINFO; -pub const HDS_HORZ: ::DWORD = 0x0000; -pub const HDS_BUTTONS: ::DWORD = 0x0002; -pub const HDS_HOTTRACK: ::DWORD = 0x0004; -pub const HDS_HIDDEN: ::DWORD = 0x0008; -pub const HDS_DRAGDROP: ::DWORD = 0x0040; -pub const HDS_FULLDRAG: ::DWORD = 0x0080; -pub const HDS_FILTERBAR: ::DWORD = 0x0100; -pub const HDS_FLAT: ::DWORD = 0x0200; -pub const HDS_CHECKBOXES: ::DWORD = 0x0400; -pub const HDS_NOSIZING: ::DWORD = 0x0800; -pub const HDS_OVERFLOW: ::DWORD = 0x1000; -pub const HDFT_ISSTRING: ::UINT = 0x0000; -pub const HDFT_ISNUMBER: ::UINT = 0x0001; -pub const HDFT_ISDATE: ::UINT = 0x0002; -pub const HDFT_HASNOVALUE: ::UINT = 0x8000; -STRUCT!{struct HD_TEXTFILTERA { - pszText: ::LPSTR, - cchTextMax: ::INT, -}} -pub type LPHD_TEXTFILTERA = *mut HD_TEXTFILTERA; -STRUCT!{struct HD_TEXTFILTERW { - pszText: ::LPWSTR, - cchTextMax: ::INT, -}} -pub type LPHD_TEXTFILTERW = *mut HD_TEXTFILTERW; -STRUCT!{struct HDITEMA { - mask: ::UINT, - cxy: ::c_int, - pszText: ::LPSTR, - hbm: ::HBITMAP, - cchTextMax: ::c_int, - fmt: ::c_int, - lParam: ::LPARAM, - iImage: ::c_int, - iOrder: ::c_int, - _type: ::UINT, - pvFilter: *mut ::c_void, - state: ::UINT, -}} -pub type LPHDITEMA = *mut HDITEMA; -STRUCT!{struct HDITEMW { - mask: ::UINT, - cxy: ::c_int, - pszText: ::LPWSTR, - hbm: ::HBITMAP, - cchTextMax: ::c_int, - fmt: ::c_int, - lParam: ::LPARAM, - iImage: ::c_int, - iOrder: ::c_int, - _type: ::UINT, - pvFilter: *mut ::c_void, - state: ::UINT, -}} -pub type LPHDITEMW = *mut HDITEMW; -pub const HDI_WIDTH: ::UINT = 0x0001; -pub const HDI_HEIGHT: ::UINT = HDI_WIDTH; -pub const HDI_TEXT: ::UINT = 0x0002; -pub const HDI_FORMAT: ::UINT = 0x0004; -pub const HDI_LPARAM: ::UINT = 0x0008; -pub const HDI_BITMAP: ::UINT = 0x0010; -pub const HDI_IMAGE: ::UINT = 0x0020; -pub const HDI_DI_SETITEM: ::UINT = 0x0040; -pub const HDI_ORDER: ::UINT = 0x0080; -pub const HDI_FILTER: ::UINT = 0x0100; -pub const HDI_STATE: ::UINT = 0x0200; -pub const HDF_LEFT: ::c_int = 0x0000; -pub const HDF_RIGHT: ::c_int = 0x0001; -pub const HDF_CENTER: ::c_int = 0x0002; -pub const HDF_JUSTIFYMASK: ::c_int = 0x0003; -pub const HDF_RTLREADING: ::c_int = 0x0004; -pub const HDF_BITMAP: ::c_int = 0x2000; -pub const HDF_STRING: ::c_int = 0x4000; -pub const HDF_OWNERDRAW: ::c_int = 0x8000; -pub const HDF_IMAGE: ::c_int = 0x0800; -pub const HDF_BITMAP_ON_RIGHT: ::c_int = 0x1000; -pub const HDF_SORTUP: ::c_int = 0x0400; -pub const HDF_SORTDOWN: ::c_int = 0x0200; -pub const HDF_CHECKBOX: ::c_int = 0x0040; -pub const HDF_CHECKED: ::c_int = 0x0080; -pub const HDF_FIXEDWIDTH: ::c_int = 0x0100; -pub const HDF_SPLITBUTTON: ::c_int = 0x1000000; -pub const HDIS_FOCUSED: ::UINT = 0x00000001; -pub const HDM_GETITEMCOUNT: ::UINT = HDM_FIRST + 0; -pub const HDM_INSERTITEMA: ::UINT = HDM_FIRST + 1; -pub const HDM_INSERTITEMW: ::UINT = HDM_FIRST + 10; -pub const HDM_DELETEITEM: ::UINT = HDM_FIRST + 2; -pub const HDM_GETITEMA: ::UINT = HDM_FIRST + 3; -pub const HDM_GETITEMW: ::UINT = HDM_FIRST + 11; -pub const HDM_SETITEMA: ::UINT = HDM_FIRST + 4; -pub const HDM_SETITEMW: ::UINT = HDM_FIRST + 12; -STRUCT!{struct HDLAYOUT { - prc: *mut ::RECT, - pwpos: *mut ::WINDOWPOS, -}} -pub type LPHDLAYOUT = *mut HDLAYOUT; -pub const HDM_LAYOUT: ::UINT = HDM_FIRST + 5; -pub const HHT_NOWHERE: ::UINT = 0x0001; -pub const HHT_ONHEADER: ::UINT = 0x0002; -pub const HHT_ONDIVIDER: ::UINT = 0x0004; -pub const HHT_ONDIVOPEN: ::UINT = 0x0008; -pub const HHT_ONFILTER: ::UINT = 0x0010; -pub const HHT_ONFILTERBUTTON: ::UINT = 0x0020; -pub const HHT_ABOVE: ::UINT = 0x0100; -pub const HHT_BELOW: ::UINT = 0x0200; -pub const HHT_TORIGHT: ::UINT = 0x0400; -pub const HHT_TOLEFT: ::UINT = 0x0800; -pub const HHT_ONITEMSTATEICON: ::UINT = 0x1000; -pub const HHT_ONDROPDOWN: ::UINT = 0x2000; -pub const HHT_ONOVERFLOW: ::UINT = 0x4000; -STRUCT!{struct HDHITTESTINFO { - pt: ::POINT, - flags: ::UINT, - iItem: ::c_int, -}} -pub type LPHDHITTESTINFO = *mut HDHITTESTINFO; -pub const HDSIL_NORMAL: ::WPARAM = 0; -pub const HDSIL_STATE: ::WPARAM = 1; -pub const HDM_HITTEST: ::UINT = HDM_FIRST + 6; -pub const HDM_GETITEMRECT: ::UINT = HDM_FIRST + 7; -pub const HDM_SETIMAGELIST: ::UINT = HDM_FIRST + 8; -pub const HDM_GETIMAGELIST: ::UINT = HDM_FIRST + 9; -pub const HDM_ORDERTOINDEX: ::UINT = HDM_FIRST + 15; -pub const HDM_CREATEDRAGIMAGE: ::UINT = HDM_FIRST + 16; -pub const HDM_GETORDERARRAY: ::UINT = HDM_FIRST + 17; -pub const HDM_SETORDERARRAY: ::UINT = HDM_FIRST + 18; -pub const HDM_SETHOTDIVIDER: ::UINT = HDM_FIRST + 19; -pub const HDM_SETBITMAPMARGIN: ::UINT = HDM_FIRST + 20; -pub const HDM_GETBITMAPMARGIN: ::UINT = HDM_FIRST + 21; -pub const HDM_SETFILTERCHANGETIMEOUT: ::UINT = HDM_FIRST + 22; -pub const HDM_EDITFILTER: ::UINT = HDM_FIRST + 23; -pub const HDM_CLEARFILTER: ::UINT = HDM_FIRST + 24; -pub const HDM_GETITEMDROPDOWNRECT: ::UINT = HDM_FIRST + 25; -pub const HDM_GETOVERFLOWRECT: ::UINT = HDM_FIRST + 26; -pub const HDM_GETFOCUSEDITEM: ::UINT = HDM_FIRST + 27; -pub const HDM_SETFOCUSEDITEM: ::UINT = HDM_FIRST + 28; -pub const HDN_ITEMCHANGINGA: ::UINT = HDN_FIRST-0; -pub const HDN_ITEMCHANGINGW: ::UINT = HDN_FIRST-20; -pub const HDN_ITEMCHANGEDA: ::UINT = HDN_FIRST-1; -pub const HDN_ITEMCHANGEDW: ::UINT = HDN_FIRST-21; -pub const HDN_ITEMCLICKA: ::UINT = HDN_FIRST-2; -pub const HDN_ITEMCLICKW: ::UINT = HDN_FIRST-22; -pub const HDN_ITEMDBLCLICKA: ::UINT = HDN_FIRST-3; -pub const HDN_ITEMDBLCLICKW: ::UINT = HDN_FIRST-23; -pub const HDN_DIVIDERDBLCLICKA: ::UINT = HDN_FIRST-5; -pub const HDN_DIVIDERDBLCLICKW: ::UINT = HDN_FIRST-25; -pub const HDN_BEGINTRACKA: ::UINT = HDN_FIRST-6; -pub const HDN_BEGINTRACKW: ::UINT = HDN_FIRST-26; -pub const HDN_ENDTRACKA: ::UINT = HDN_FIRST-7; -pub const HDN_ENDTRACKW: ::UINT = HDN_FIRST-27; -pub const HDN_TRACKA: ::UINT = HDN_FIRST-8; -pub const HDN_TRACKW: ::UINT = HDN_FIRST-28; -pub const HDN_GETDISPINFOA: ::UINT = HDN_FIRST-9; -pub const HDN_GETDISPINFOW: ::UINT = HDN_FIRST-29; -pub const HDN_BEGINDRAG: ::UINT = HDN_FIRST-10; -pub const HDN_ENDDRAG: ::UINT = HDN_FIRST-11; -pub const HDN_FILTERCHANGE: ::UINT = HDN_FIRST-12; -pub const HDN_FILTERBTNCLICK: ::UINT = HDN_FIRST-13; -pub const HDN_BEGINFILTEREDIT: ::UINT = HDN_FIRST-14; -pub const HDN_ENDFILTEREDIT: ::UINT = HDN_FIRST-15; -pub const HDN_ITEMSTATEICONCLICK: ::UINT = HDN_FIRST-16; -pub const HDN_ITEMKEYDOWN: ::UINT = HDN_FIRST-17; -pub const HDN_DROPDOWN: ::UINT = HDN_FIRST-18; -pub const HDN_OVERFLOWCLICK: ::UINT = HDN_FIRST-19; -STRUCT!{struct NMHEADERA { - hdr: ::NMHDR, - iItem: ::c_int, - iButton: ::c_int, - pitem: *mut HDITEMA, -}} -pub type LPNMHEADERA = *mut NMHEADERA; -STRUCT!{struct NMHEADERW { - hdr: ::NMHDR, - iItem: ::c_int, - iButton: ::c_int, - pitem: *mut HDITEMW, -}} -pub type LPNMHEADERW = *mut NMHEADERW; -STRUCT!{struct NMHDDISPINFOW { - hdr: ::NMHDR, - iItem: ::c_int, - mask: ::UINT, - pszText: ::LPWSTR, - cchTextMax: ::c_int, - iImage: ::c_int, - lParam: ::LPARAM, -}} -pub type LPNMHDDISPINFOW = *mut NMHDDISPINFOW; -STRUCT!{struct NMHDDISPINFOA { - hdr: ::NMHDR, - iItem: ::c_int, - mask: ::UINT, - pszText: ::LPSTR, - cchTextMax: ::c_int, - iImage: ::c_int, - lParam: ::LPARAM, -}} -pub type LPNMHDDISPINFOA = *mut NMHDDISPINFOA; -STRUCT!{struct NMHDFILTERBTNCLICK { - hdr: ::NMHDR, - iItem: ::INT, - rc: ::RECT, -}} -pub type LPNMHDFILTERBTNCLICK = *mut NMHDFILTERBTNCLICK; -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct TBBUTTON { - pub iBitmap: ::c_int, - pub idCommand: ::c_int, - pub fsState: ::BYTE, - pub fsStyle: ::BYTE, - #[cfg(target_arch="x86_64")] - pub bReserved: [::BYTE; 6], - #[cfg(target_arch="x86")] - pub bReserved: [::BYTE; 2], - pub dwData: ::DWORD_PTR, - pub iString: ::INT_PTR, -} -pub type PTBBUTTON = *mut TBBUTTON; -pub type LPTBBUTTON = *mut TBBUTTON; -pub type LPCTBBUTTON = *const TBBUTTON; -STRUCT!{struct COLORMAP { - from: ::COLORREF, - to: ::COLORREF, -}} -pub type LPCOLORMAP = *mut COLORMAP; -pub const CMB_MASKED: ::UINT = 0x02; -pub const TBSTATE_CHECKED: ::BYTE = 0x01; -pub const TBSTATE_PRESSED: ::BYTE = 0x02; -pub const TBSTATE_ENABLED: ::BYTE = 0x04; -pub const TBSTATE_HIDDEN: ::BYTE = 0x08; -pub const TBSTATE_INDETERMINATE: ::BYTE = 0x10; -pub const TBSTATE_WRAP: ::BYTE = 0x20; -pub const TBSTATE_ELLIPSES: ::BYTE = 0x40; -pub const TBSTATE_MARKED: ::BYTE = 0x80; -pub const TBSTYLE_BUTTON: ::DWORD = 0x0000; -pub const TBSTYLE_SEP: ::DWORD = 0x0001; -pub const TBSTYLE_CHECK: ::DWORD = 0x0002; -pub const TBSTYLE_GROUP: ::DWORD = 0x0004; -pub const TBSTYLE_CHECKGROUP: ::DWORD = TBSTYLE_GROUP | TBSTYLE_CHECK; -pub const TBSTYLE_DROPDOWN: ::DWORD = 0x0008; -pub const TBSTYLE_AUTOSIZE: ::DWORD = 0x0010; -pub const TBSTYLE_NOPREFIX: ::DWORD = 0x0020; -pub const TBSTYLE_TOOLTIPS: ::DWORD = 0x0100; -pub const TBSTYLE_WRAPABLE: ::DWORD = 0x0200; -pub const TBSTYLE_ALTDRAG: ::DWORD = 0x0400; -pub const TBSTYLE_FLAT: ::DWORD = 0x0800; -pub const TBSTYLE_LIST: ::DWORD = 0x1000; -pub const TBSTYLE_CUSTOMERASE: ::DWORD = 0x2000; -pub const TBSTYLE_REGISTERDROP: ::DWORD = 0x4000; -pub const TBSTYLE_TRANSPARENT: ::DWORD = 0x8000; -pub const TBSTYLE_EX_DRAWDDARROWS: ::DWORD = 0x00000001; -pub const BTNS_BUTTON: ::DWORD = TBSTYLE_BUTTON; -pub const BTNS_SEP: ::DWORD = TBSTYLE_SEP; -pub const BTNS_CHECK: ::DWORD = TBSTYLE_CHECK; -pub const BTNS_GROUP: ::DWORD = TBSTYLE_GROUP; -pub const BTNS_CHECKGROUP: ::DWORD = TBSTYLE_CHECKGROUP; -pub const BTNS_DROPDOWN: ::DWORD = TBSTYLE_DROPDOWN; -pub const BTNS_AUTOSIZE: ::DWORD = TBSTYLE_AUTOSIZE; -pub const BTNS_NOPREFIX: ::DWORD = TBSTYLE_NOPREFIX; -pub const BTNS_SHOWTEXT: ::DWORD = 0x0040; -pub const BTNS_WHOLEDROPDOWN: ::DWORD = 0x0080; -pub const TBSTYLE_EX_MIXEDBUTTONS: ::DWORD = 0x00000008; -pub const TBSTYLE_EX_HIDECLIPPEDBUTTONS: ::DWORD = 0x00000010; -pub const TBSTYLE_EX_MULTICOLUMN: ::DWORD = 0x00000002; -pub const TBSTYLE_EX_VERTICAL: ::DWORD = 0x00000004; -pub const TBSTYLE_EX_DOUBLEBUFFER: ::DWORD = 0x00000080; -STRUCT!{struct NMTBCUSTOMDRAW { - nmcd: NMCUSTOMDRAW, - hbrMonoDither: ::HBRUSH, - hbrLines: ::HBRUSH, - hpenLines: ::HPEN, - clrText: ::COLORREF, - clrMark: ::COLORREF, - clrTextHighlight: ::COLORREF, - clrBtnFace: ::COLORREF, - clrBtnHighlight: ::COLORREF, - clrHighlightHotTrack: ::COLORREF, - rcText: ::RECT, - nStringBkMode: ::c_int, - nHLStringBkMode: ::c_int, - iListGap: ::c_int, -}} -pub type LPNMTBCUSTOMDRAW = *mut NMTBCUSTOMDRAW; -pub const TBCDRF_NOEDGES: ::LRESULT = 0x00010000; -pub const TBCDRF_HILITEHOTTRACK: ::LRESULT = 0x00020000; -pub const TBCDRF_NOOFFSET: ::LRESULT = 0x00040000; -pub const TBCDRF_NOMARK: ::LRESULT = 0x00080000; -pub const TBCDRF_NOETCHEDEFFECT: ::LRESULT = 0x00100000; -pub const TBCDRF_BLENDICON: ::LRESULT = 0x00200000; -pub const TBCDRF_NOBACKGROUND: ::LRESULT = 0x00400000; -pub const TBCDRF_USECDCOLORS: ::LRESULT = 0x00800000; -pub const TB_ENABLEBUTTON: ::UINT = ::WM_USER + 1; -pub const TB_CHECKBUTTON: ::UINT = ::WM_USER + 2; -pub const TB_PRESSBUTTON: ::UINT = ::WM_USER + 3; -pub const TB_HIDEBUTTON: ::UINT = ::WM_USER + 4; -pub const TB_INDETERMINATE: ::UINT = ::WM_USER + 5; -pub const TB_MARKBUTTON: ::UINT = ::WM_USER + 6; -pub const TB_ISBUTTONENABLED: ::UINT = ::WM_USER + 9; -pub const TB_ISBUTTONCHECKED: ::UINT = ::WM_USER + 10; -pub const TB_ISBUTTONPRESSED: ::UINT = ::WM_USER + 11; -pub const TB_ISBUTTONHIDDEN: ::UINT = ::WM_USER + 12; -pub const TB_ISBUTTONINDETERMINATE : ::UINT = ::WM_USER + 13; -pub const TB_ISBUTTONHIGHLIGHTED: ::UINT = ::WM_USER + 14; -pub const TB_SETSTATE: ::UINT = ::WM_USER + 17; -pub const TB_GETSTATE: ::UINT = ::WM_USER + 18; -pub const TB_ADDBITMAP: ::UINT = ::WM_USER + 19; -STRUCT!{struct TBADDBITMAP { - hInst: ::HINSTANCE, - nID: ::UINT_PTR, -}} -pub type LPTBADDBITMAP = *mut TBADDBITMAP; -pub const HINST_COMMCTRL: ::HINSTANCE = (0 - 1) as ::HINSTANCE; -pub const IDB_STD_SMALL_COLOR: ::WPARAM = 0; -pub const IDB_STD_LARGE_COLOR: ::WPARAM = 1; -pub const IDB_VIEW_SMALL_COLOR: ::WPARAM = 4; -pub const IDB_VIEW_LARGE_COLOR: ::WPARAM = 5; -pub const IDB_HIST_SMALL_COLOR: ::WPARAM = 8; -pub const IDB_HIST_LARGE_COLOR: ::WPARAM = 9; -pub const IDB_HIST_NORMAL: ::WPARAM = 12; -pub const IDB_HIST_HOT: ::WPARAM = 13; -pub const IDB_HIST_DISABLED: ::WPARAM = 14; -pub const IDB_HIST_PRESSED: ::WPARAM = 15; -pub const STD_CUT: ::c_int = 0; -pub const STD_COPY: ::c_int = 1; -pub const STD_PASTE: ::c_int = 2; -pub const STD_UNDO: ::c_int = 3; -pub const STD_REDOW: ::c_int = 4; -pub const STD_DELETE: ::c_int = 5; -pub const STD_FILENEW: ::c_int = 6; -pub const STD_FILEOPEN: ::c_int = 7; -pub const STD_FILESAVE: ::c_int = 8; -pub const STD_PRINTPRE: ::c_int = 9; -pub const STD_PROPERTIES: ::c_int = 10; -pub const STD_HELP: ::c_int = 11; -pub const STD_FIND: ::c_int = 12; -pub const STD_REPLACE: ::c_int = 13; -pub const STD_PRINT: ::c_int = 14; -pub const VIEW_LARGEICONS: ::c_int = 0; -pub const VIEW_SMALLICONS: ::c_int = 1; -pub const VIEW_LIST: ::c_int = 2; -pub const VIEW_DETAILS: ::c_int = 3; -pub const VIEW_SORTNAME: ::c_int = 4; -pub const VIEW_SORTSIZE: ::c_int = 5; -pub const VIEW_SORTDATE: ::c_int = 6; -pub const VIEW_SORTTYPE: ::c_int = 7; -pub const VIEW_PARENTFOLDER: ::c_int = 8; -pub const VIEW_NETCONNECT: ::c_int = 9; -pub const VIEW_NETDISCONNECT: ::c_int = 10; -pub const VIEW_NEWFOLDER: ::c_int = 11; -pub const VIEW_VIEWMENU: ::c_int = 12; -pub const HIST_BACK: ::c_int = 0; -pub const HIST_FORWARD: ::c_int = 1; -pub const HIST_FAVORITES: ::c_int = 2; -pub const HIST_ADDTOFAVORITES: ::c_int = 3; -pub const HIST_VIEWTREE: ::c_int = 4; -pub const TB_ADDBUTTONSA: ::UINT = ::WM_USER + 20; -pub const TB_INSERTBUTTONA: ::UINT = ::WM_USER + 21; -pub const TB_DELETEBUTTON: ::UINT = ::WM_USER + 22; -pub const TB_GETBUTTON: ::UINT = ::WM_USER + 23; -pub const TB_BUTTONCOUNT: ::UINT = ::WM_USER + 24; -pub const TB_COMMANDTOINDEX: ::UINT = ::WM_USER + 25; -STRUCT!{struct TBSAVEPARAMSA { - hkr: ::HKEY, - pszSubKey: ::LPCSTR, - pszValueName: ::LPCSTR, -}} -pub type LPTBSAVEPARAMSA = *mut TBSAVEPARAMSA; -STRUCT!{struct TBSAVEPARAMSW { - hkr: ::HKEY, - pszSubKey: ::LPCWSTR, - pszValueName: ::LPCWSTR, -}} -pub type LPTBSAVEPARAMSW = *mut TBSAVEPARAMSW; -pub const TB_SAVERESTOREA: ::UINT = ::WM_USER + 26; -pub const TB_SAVERESTOREW: ::UINT = ::WM_USER + 76; -pub const TB_CUSTOMIZE: ::UINT = ::WM_USER + 27; -pub const TB_ADDSTRINGA: ::UINT = ::WM_USER + 28; -pub const TB_ADDSTRINGW: ::UINT = ::WM_USER + 77; -pub const TB_GETITEMRECT: ::UINT = ::WM_USER + 29; -pub const TB_BUTTONSTRUCTSIZE: ::UINT = ::WM_USER + 30; -pub const TB_SETBUTTONSIZE: ::UINT = ::WM_USER + 31; -pub const TB_SETBITMAPSIZE: ::UINT = ::WM_USER + 32; -pub const TB_AUTOSIZE: ::UINT = ::WM_USER + 33; -pub const TB_GETTOOLTIPS: ::UINT = ::WM_USER + 35; -pub const TB_SETTOOLTIPS: ::UINT = ::WM_USER + 36; -pub const TB_SETPARENT: ::UINT = ::WM_USER + 37; -pub const TB_SETROWS: ::UINT = ::WM_USER + 39; -pub const TB_GETROWS: ::UINT = ::WM_USER + 40; -pub const TB_SETCMDID: ::UINT = ::WM_USER + 42; -pub const TB_CHANGEBITMAP: ::UINT = ::WM_USER + 43; -pub const TB_GETBITMAP: ::UINT = ::WM_USER + 44; -pub const TB_GETBUTTONTEXTA: ::UINT = ::WM_USER + 45; -pub const TB_GETBUTTONTEXTW: ::UINT = ::WM_USER + 75; -pub const TB_REPLACEBITMAP: ::UINT = ::WM_USER + 46; -pub const TB_SETINDENT: ::UINT = ::WM_USER + 47; -pub const TB_SETIMAGELIST: ::UINT = ::WM_USER + 48; -pub const TB_GETIMAGELIST: ::UINT = ::WM_USER + 49; -pub const TB_LOADIMAGES: ::UINT = ::WM_USER + 50; -pub const TB_GETRECT: ::UINT = ::WM_USER + 51; -pub const TB_SETHOTIMAGELIST: ::UINT = ::WM_USER + 52; -pub const TB_GETHOTIMAGELIST: ::UINT = ::WM_USER + 53; -pub const TB_SETDISABLEDIMAGELIST: ::UINT = ::WM_USER + 54; -pub const TB_GETDISABLEDIMAGELIST: ::UINT = ::WM_USER + 55; -pub const TB_SETSTYLE: ::UINT = ::WM_USER + 56; -pub const TB_GETSTYLE: ::UINT = ::WM_USER + 57; -pub const TB_GETBUTTONSIZE: ::UINT = ::WM_USER + 58; -pub const TB_SETBUTTONWIDTH: ::UINT = ::WM_USER + 59; -pub const TB_SETMAXTEXTROWS: ::UINT = ::WM_USER + 60; -pub const TB_GETTEXTROWS: ::UINT = ::WM_USER + 61; -pub const TB_GETOBJECT: ::UINT = ::WM_USER + 62; -pub const TB_GETHOTITEM: ::UINT = ::WM_USER + 71; -pub const TB_SETHOTITEM: ::UINT = ::WM_USER + 72; -pub const TB_SETANCHORHIGHLIGHT: ::UINT = ::WM_USER + 73; -pub const TB_GETANCHORHIGHLIGHT: ::UINT = ::WM_USER + 74; -pub const TB_MAPACCELERATORA: ::UINT = ::WM_USER + 78; -STRUCT!{struct TBINSERTMARK { - iButton: ::c_int, - dwFlags: ::DWORD, -}} -pub type LPTBINSERTMARK = *mut TBINSERTMARK; -pub const TBIMHT_AFTER: ::DWORD = 0x00000001; -pub const TBIMHT_BACKGROUND: ::DWORD = 0x00000002; -pub const TB_GETINSERTMARK: ::UINT = ::WM_USER + 79; -pub const TB_SETINSERTMARK: ::UINT = ::WM_USER + 80; -pub const TB_INSERTMARKHITTEST: ::UINT = ::WM_USER + 81; -pub const TB_MOVEBUTTON: ::UINT = ::WM_USER + 82; -pub const TB_GETMAXSIZE: ::UINT = ::WM_USER + 83; -pub const TB_SETEXTENDEDSTYLE: ::UINT = ::WM_USER + 84; -pub const TB_GETEXTENDEDSTYLE: ::UINT = ::WM_USER + 85; -pub const TB_GETPADDING: ::UINT = ::WM_USER + 86; -pub const TB_SETPADDING: ::UINT = ::WM_USER + 87; -pub const TB_SETINSERTMARKCOLOR: ::UINT = ::WM_USER + 88; -pub const TB_GETINSERTMARKCOLOR: ::UINT = ::WM_USER + 89; -pub const TB_SETCOLORSCHEME: ::UINT = CCM_SETCOLORSCHEME; -pub const TB_GETCOLORSCHEME: ::UINT = CCM_GETCOLORSCHEME; -pub const TB_SETUNICODEFORMAT: ::UINT = CCM_SETUNICODEFORMAT; -pub const TB_GETUNICODEFORMAT: ::UINT = CCM_GETUNICODEFORMAT; -pub const TB_MAPACCELERATORW: ::UINT = ::WM_USER + 90; -STRUCT!{struct TBREPLACEBITMAP { - hInstOld: ::HINSTANCE, - nIDOld: ::UINT_PTR, - hInstNew: ::HINSTANCE, - nIDNew: ::UINT_PTR, - nButtons: ::c_int, -}} -pub type LPTBREPLACEBITMAP = *mut TBREPLACEBITMAP; -pub const TBBF_LARGE: ::DWORD = 0x0001; -pub const TB_GETBITMAPFLAGS: ::UINT = ::WM_USER + 41; -pub const TBIF_IMAGE: ::DWORD = 0x00000001; -pub const TBIF_TEXT: ::DWORD = 0x00000002; -pub const TBIF_STATE: ::DWORD = 0x00000004; -pub const TBIF_STYLE: ::DWORD = 0x00000008; -pub const TBIF_LPARAM: ::DWORD = 0x00000010; -pub const TBIF_COMMAND: ::DWORD = 0x00000020; -pub const TBIF_SIZE: ::DWORD = 0x00000040; -pub const TBIF_BYINDEX: ::DWORD = 0x80000000; -STRUCT!{struct TBBUTTONINFOA { - cbSize: ::UINT, - dwMask: ::DWORD, - idCommand: ::c_int, - iImage: ::c_int, - fsState: ::BYTE, - fsStyle: ::BYTE, - cx: ::WORD, - lParam: ::DWORD_PTR, - pszText: ::LPSTR, - cchText: ::c_int, -}} -pub type LPTBBUTTONINFOA = *mut TBBUTTONINFOA; -STRUCT!{struct TBBUTTONINFOW { - cbSize: ::UINT, - dwMask: ::DWORD, - idCommand: ::c_int, - iImage: ::c_int, - fsState: ::BYTE, - fsStyle: ::BYTE, - cx: ::WORD, - lParam: ::DWORD_PTR, - pszText: ::LPWSTR, - cchText: ::c_int, -}} -pub type LPTBBUTTONINFOW = *mut TBBUTTONINFOW; -pub const TB_GETBUTTONINFOW: ::UINT = ::WM_USER + 63; -pub const TB_SETBUTTONINFOW: ::UINT = ::WM_USER + 64; -pub const TB_GETBUTTONINFOA: ::UINT = ::WM_USER + 65; -pub const TB_SETBUTTONINFOA: ::UINT = ::WM_USER + 66; -pub const TB_INSERTBUTTONW: ::UINT = ::WM_USER + 67; -pub const TB_ADDBUTTONSW: ::UINT = ::WM_USER + 68; -pub const TB_HITTEST: ::UINT = ::WM_USER + 69; -pub const TB_SETDRAWTEXTFLAGS: ::UINT = ::WM_USER + 70; -pub const TB_GETSTRINGW: ::UINT = ::WM_USER + 91; -pub const TB_GETSTRINGA: ::UINT = ::WM_USER + 92; -pub const TB_SETBOUNDINGSIZE: ::UINT = ::WM_USER + 93; -pub const TB_SETHOTITEM2: ::UINT = ::WM_USER + 94; -pub const TB_HASACCELERATOR: ::UINT = ::WM_USER + 95; -pub const TB_SETLISTGAP: ::UINT = ::WM_USER + 96; -pub const TB_GETIMAGELISTCOUNT: ::UINT = ::WM_USER + 98; -pub const TB_GETIDEALSIZE: ::UINT = ::WM_USER + 99; -pub const TBMF_PAD: ::DWORD = 0x00000001; -pub const TBMF_BARPAD: ::DWORD = 0x00000002; -pub const TBMF_BUTTONSPACING: ::DWORD = 0x00000004; -STRUCT!{struct TBMETRICS { - cbSize: ::UINT, - dwMask: ::DWORD, - cxPad: ::c_int, - cyPad: ::c_int, - cxBarPad: ::c_int, - cyBarPad: ::c_int, - cxButtonSpacing: ::c_int, - cyButtonSpacing: ::c_int, -}} -pub type LPTBMETRICS = *mut TBMETRICS; -pub const TB_GETMETRICS: ::UINT = ::WM_USER + 101; -pub const TB_SETMETRICS: ::UINT = ::WM_USER + 102; -pub const TB_GETITEMDROPDOWNRECT: ::UINT = ::WM_USER + 103; -pub const TB_SETPRESSEDIMAGELIST: ::UINT = ::WM_USER + 104; -pub const TB_GETPRESSEDIMAGELIST: ::UINT = ::WM_USER + 105; -pub const TB_SETWINDOWTHEME: ::UINT = CCM_SETWINDOWTHEME; -pub const TBN_GETBUTTONINFOA: ::UINT = TBN_FIRST - 0; -pub const TBN_BEGINDRAG: ::UINT = TBN_FIRST - 1; -pub const TBN_ENDDRAG: ::UINT = TBN_FIRST - 2; -pub const TBN_BEGINADJUST: ::UINT = TBN_FIRST - 3; -pub const TBN_ENDADJUST: ::UINT = TBN_FIRST - 4; -pub const TBN_RESET: ::UINT = TBN_FIRST - 5; -pub const TBN_QUERYINSERT: ::UINT = TBN_FIRST - 6; -pub const TBN_QUERYDELETE: ::UINT = TBN_FIRST - 7; -pub const TBN_TOOLBARCHANGE: ::UINT = TBN_FIRST - 8; -pub const TBN_CUSTHELP: ::UINT = TBN_FIRST - 9; -pub const TBN_DROPDOWN: ::UINT = TBN_FIRST - 10; -pub const TBN_GETOBJECT: ::UINT = TBN_FIRST - 12; -STRUCT!{struct NMTBHOTITEM { - hdr: ::NMHDR, - idOld: ::c_int, - idNew: ::c_int, - dwFlags: ::DWORD, -}} -pub type LPNMTBHOTITEM = *mut NMTBHOTITEM; -pub const HICF_OTHER: ::DWORD = 0x00000000; -pub const HICF_MOUSE: ::DWORD = 0x00000001; -pub const HICF_ARROWKEYS: ::DWORD = 0x00000002; -pub const HICF_ACCELERATOR: ::DWORD = 0x00000004; -pub const HICF_DUPACCEL: ::DWORD = 0x00000008; -pub const HICF_ENTERING: ::DWORD = 0x00000010; -pub const HICF_LEAVING: ::DWORD = 0x00000020; -pub const HICF_RESELECT: ::DWORD = 0x00000040; -pub const HICF_LMOUSE: ::DWORD = 0x00000080; -pub const HICF_TOGGLEDROPDOWN: ::DWORD = 0x00000100; -pub const TBN_HOTITEMCHANGE: ::UINT = TBN_FIRST - 13; -pub const TBN_DRAGOUT: ::UINT = TBN_FIRST - 14; -pub const TBN_DELETINGBUTTON: ::UINT = TBN_FIRST - 15; -pub const TBN_GETDISPINFOA: ::UINT = TBN_FIRST - 16; -pub const TBN_GETDISPINFOW: ::UINT = TBN_FIRST - 17; -pub const TBN_GETINFOTIPA: ::UINT = TBN_FIRST - 18; -pub const TBN_GETINFOTIPW: ::UINT = TBN_FIRST - 19; -pub const TBN_GETBUTTONINFOW: ::UINT = TBN_FIRST - 20; -pub const TBN_RESTORE: ::UINT = TBN_FIRST - 21; -pub const TBN_SAVE: ::UINT = TBN_FIRST - 22; -pub const TBN_INITCUSTOMIZE: ::UINT = TBN_FIRST - 23; -pub const TBN_WRAPHOTITEM: ::UINT = TBN_FIRST - 24; -pub const TBN_DUPACCELERATOR: ::UINT = TBN_FIRST - 25; -pub const TBN_WRAPACCELERATOR: ::UINT = TBN_FIRST - 26; -pub const TBN_DRAGOVER: ::UINT = TBN_FIRST - 27; -pub const TBN_MAPACCELERATOR: ::UINT = TBN_FIRST - 28; -pub const TBNRF_HIDEHELP: ::LRESULT = 0x00000001; -pub const TBNRF_ENDCUSTOMIZE: ::LRESULT = 0x00000002; -STRUCT!{struct NMTBSAVE { - hdr: ::NMHDR, - pData: *mut ::DWORD, - pCurrent: *mut ::DWORD, - cbData: ::UINT, - iItem: ::c_int, - cButtons: ::c_int, - tbButton: TBBUTTON, -}} -pub type LPNMTBSAVE = *mut NMTBSAVE; -STRUCT!{struct NMTBRESTORE { - hdr: ::NMHDR, - pData: *mut ::DWORD, - pCurrent: *mut ::DWORD, - cbData: ::UINT, - iItem: ::c_int, - cButtons: ::c_int, - cbBytesPerRecord: ::c_int, - tbButton: TBBUTTON, -}} -pub type LPNMTBRESTORE = *mut NMTBRESTORE; -STRUCT!{struct NMTBGETINFOTIPA { - hdr: ::NMHDR, - pszText: ::LPSTR, - cchTextMax: ::c_int, - iItem: ::c_int, - lParal: ::LPARAM, -}} -pub type LPNMTBGETINFOTIPA = *mut NMTBGETINFOTIPA; -STRUCT!{struct NMTBGETINFOTIPW { - hdr: ::NMHDR, - pszText: ::LPWSTR, - cchTextMax: ::c_int, - iItem: ::c_int, - lParal: ::LPARAM, -}} -pub type LPNMTBGETINFOTIPW = *mut NMTBGETINFOTIPW; -pub const TBNF_IMAGE: ::DWORD = 0x00000001; -pub const TBNF_TEXT: ::DWORD = 0x00000002; -pub const TBNF_DI_SETITEM: ::DWORD = 0x10000000; -STRUCT!{struct NMTBDISPINFOA { - hdr: ::NMHDR, - dwMask: ::DWORD, - idCommand: ::c_int, - lParam: ::DWORD_PTR, - iImage: ::c_int, - pszText: ::LPSTR, - cchText: ::c_int, -}} -pub type LPNMTBDISPINFOA = *mut NMTBDISPINFOA; -STRUCT!{struct NMTBDISPINFOW { - hdr: ::NMHDR, - dwMask: ::DWORD, - idCommand: ::c_int, - lParam: ::DWORD_PTR, - iImage: ::c_int, - pszText: ::LPWSTR, - cchText: ::c_int, -}} -pub type LPNMTBDISPINFOW = *mut NMTBDISPINFOW; -pub const TBDDRET_DEFAULT: ::LRESULT = 0; -pub const TBDDRET_NODEFAULT: ::LRESULT = 1; -pub const TBDDRET_TREATPRESSED: ::LRESULT = 2; -pub type TBNOTIFYA = NMTOOLBARA; -pub type TBNOTIFYW = NMTOOLBARW; -pub type LPTBNOTIFYA = LPNMTOOLBARA; -pub type LPTBNOTIFYW = LPNMTOOLBARW; -STRUCT!{struct NMTOOLBARA { - hdr: ::NMHDR, - iItem: ::c_int, - tbButton: TBBUTTON, - cchText: ::c_int, - pszText: ::LPSTR, - rcButton: ::RECT, -}} -pub type LPNMTOOLBARA = *mut NMTOOLBARA; -STRUCT!{struct NMTOOLBARW { - hdr: ::NMHDR, - iItem: ::c_int, - tbButton: TBBUTTON, - cchText: ::c_int, - pszText: ::LPWSTR, - rcButton: ::RECT, -}} -pub type LPNMTOOLBARW = *mut NMTOOLBARW; -pub const RBIM_IMAGELIST: ::UINT = 0x00000001; -pub const RBS_TOOLTIPS: ::DWORD = 0x00000100; -pub const RBS_VARHEIGHT: ::DWORD = 0x00000200; -pub const RBS_BANDBORDERS: ::DWORD = 0x00000400; -pub const RBS_FIXEDORDER: ::DWORD = 0x00000800; -pub const RBS_REGISTERDROP: ::DWORD = 0x00001000; -pub const RBS_AUTOSIZE: ::DWORD = 0x00002000; -pub const RBS_VERTICALGRIPPER: ::DWORD = 0x00004000; -pub const RBS_DBLCLKTOGGLE: ::DWORD = 0x00008000; -STRUCT!{struct REBARINFO { - cbSize: ::UINT, - fMask: ::UINT, - himl: HIMAGELIST, -}} -pub type LPREBARINFO = *mut REBARINFO; -pub const RBBS_BREAK: ::UINT = 0x00000001; -pub const RBBS_FIXEDSIZE: ::UINT = 0x00000002; -pub const RBBS_CHILDEDGE: ::UINT = 0x00000004; -pub const RBBS_HIDDEN: ::UINT = 0x00000008; -pub const RBBS_NOVERT: ::UINT = 0x00000010; -pub const RBBS_FIXEDBMP: ::UINT = 0x00000020; -pub const RBBS_VARIABLEHEIGHT: ::UINT = 0x00000040; -pub const RBBS_GRIPPERALWAYS: ::UINT = 0x00000080; -pub const RBBS_NOGRIPPER: ::UINT = 0x00000100; -pub const RBBS_USECHEVRON: ::UINT = 0x00000200; -pub const RBBS_HIDETITLE: ::UINT = 0x00000400; -pub const RBBS_TOPALIGN: ::UINT = 0x00000800; -pub const RBBIM_STYLE: ::UINT = 0x00000001; -pub const RBBIM_COLORS: ::UINT = 0x00000002; -pub const RBBIM_TEXT: ::UINT = 0x00000004; -pub const RBBIM_IMAGE: ::UINT = 0x00000008; -pub const RBBIM_CHILD: ::UINT = 0x00000010; -pub const RBBIM_CHILDSIZE: ::UINT = 0x00000020; -pub const RBBIM_SIZE: ::UINT = 0x00000040; -pub const RBBIM_BACKGROUND: ::UINT = 0x00000080; -pub const RBBIM_ID: ::UINT = 0x00000100; -pub const RBBIM_IDEALSIZE: ::UINT = 0x00000200; -pub const RBBIM_LPARAM: ::UINT = 0x00000400; -pub const RBBIM_HEADERSIZE: ::UINT = 0x00000800; -pub const RBBIM_CHEVRONLOCATION: ::UINT = 0x00001000; -pub const RBBIM_CHEVRONSTATE: ::UINT = 0x00002000; -STRUCT!{struct REBARBANDINFOA { - cbSize: ::UINT, - fMask: ::UINT, - fStyle: ::UINT, - clrFore: ::COLORREF, - clrBack: ::COLORREF, - lpText: ::LPSTR, - cch: ::UINT, - iImage: ::c_int, - hwndChild: ::HWND, - cxMinChild: ::UINT, - cyMinChild: ::UINT, - cx: ::UINT, - hbmBack: ::HBITMAP, - wID: ::UINT, - cyChild: ::UINT, - cyMaxChild: ::UINT, - cyIntegral: ::UINT, - cxIdeal: ::UINT, - lParam: ::LPARAM, - cxHeader: ::UINT, - rcChevronLocation: ::RECT, - uChevronState: ::UINT, -}} -pub type LPREBARBANDINFOA = *mut REBARBANDINFOA; -pub type LPCREBARBANDINFOA = *const REBARBANDINFOA; -STRUCT!{struct REBARBANDINFOW { - cbSize: ::UINT, - fMask: ::UINT, - fStyle: ::UINT, - clrFore: ::COLORREF, - clrBack: ::COLORREF, - lpText: ::LPWSTR, - cch: ::UINT, - iImage: ::c_int, - hwndChild: ::HWND, - cxMinChild: ::UINT, - cyMinChild: ::UINT, - cx: ::UINT, - hbmBack: ::HBITMAP, - wID: ::UINT, - cyChild: ::UINT, - cyMaxChild: ::UINT, - cyIntegral: ::UINT, - cxIdeal: ::UINT, - lParam: ::LPARAM, - cxHeader: ::UINT, - rcChevronLocation: ::RECT, - uChevronState: ::UINT, -}} -pub type LPREBARBANDINFOW = *mut REBARBANDINFOW; -pub type LPCREBARBANDINFOW = *const REBARBANDINFOW; -pub const RB_INSERTBANDA: ::UINT = ::WM_USER + 1; -pub const RB_DELETEBAND: ::UINT = ::WM_USER + 2; -pub const RB_GETBARINFO: ::UINT = ::WM_USER + 3; -pub const RB_SETBARINFO: ::UINT = ::WM_USER + 4; -pub const RB_SETBANDINFOA: ::UINT = ::WM_USER + 6; -pub const RB_SETPARENT: ::UINT = ::WM_USER + 7; -pub const RB_HITTEST: ::UINT = ::WM_USER + 8; -pub const RB_GETRECT: ::UINT = ::WM_USER + 9; -pub const RB_INSERTBANDW: ::UINT = ::WM_USER + 10; -pub const RB_SETBANDINFOW: ::UINT = ::WM_USER + 11; -pub const RB_GETBANDCOUNT: ::UINT = ::WM_USER + 12; -pub const RB_GETROWCOUNT: ::UINT = ::WM_USER + 13; -pub const RB_GETROWHEIGHT: ::UINT = ::WM_USER + 14; -pub const RB_IDTOINDEX: ::UINT = ::WM_USER + 16; -pub const RB_GETTOOLTIPS: ::UINT = ::WM_USER + 17; -pub const RB_SETTOOLTIPS: ::UINT = ::WM_USER + 18; -pub const RB_SETBKCOLOR: ::UINT = ::WM_USER + 19; -pub const RB_GETBKCOLOR: ::UINT = ::WM_USER + 20; -pub const RB_SETTEXTCOLOR: ::UINT = ::WM_USER + 21; -pub const RB_GETTEXTCOLOR: ::UINT = ::WM_USER + 22; -pub const RBSTR_CHANGERECT: ::WPARAM = 0x0001; -pub const RB_SIZETORECT: ::UINT = ::WM_USER + 23; -pub const RB_SETCOLORSCHEME: ::UINT = CCM_SETCOLORSCHEME; -pub const RB_GETCOLORSCHEME: ::UINT = CCM_GETCOLORSCHEME; -pub const RB_BEGINDRAG: ::UINT = ::WM_USER + 24; -pub const RB_ENDDRAG: ::UINT = ::WM_USER + 25; -pub const RB_DRAGMOVE: ::UINT = ::WM_USER + 26; -pub const RB_GETBARHEIGHT: ::UINT = ::WM_USER + 27; -pub const RB_GETBANDINFOW: ::UINT = ::WM_USER + 28; -pub const RB_GETBANDINFOA: ::UINT = ::WM_USER + 29; -pub const RB_MINIMIZEBAND: ::UINT = ::WM_USER + 30; -pub const RB_MAXIMIZEBAND: ::UINT = ::WM_USER + 31; -pub const RB_GETDROPTARGET: ::UINT = CCM_GETDROPTARGET; -pub const RB_GETBANDBORDERS: ::UINT = ::WM_USER + 34; -pub const RB_SHOWBAND: ::UINT = ::WM_USER + 35; -pub const RB_SETPALETTE: ::UINT = ::WM_USER + 37; -pub const RB_GETPALETTE: ::UINT = ::WM_USER + 38; -pub const RB_MOVEBAND: ::UINT = ::WM_USER + 39; -pub const RB_SETUNICODEFORMAT: ::UINT = CCM_SETUNICODEFORMAT; -pub const RB_GETUNICODEFORMAT: ::UINT = CCM_GETUNICODEFORMAT; -pub const RB_GETBANDMARGINS: ::UINT = ::WM_USER + 40; -pub const RB_SETWINDOWTHEME: ::UINT = CCM_SETWINDOWTHEME; -pub const RB_SETEXTENDEDSTYLE: ::UINT = ::WM_USER + 41; -pub const RB_GETEXTENDEDSTYLE: ::UINT = ::WM_USER + 42; -pub const RB_PUSHCHEVRON: ::UINT = ::WM_USER + 43; -pub const RB_SETBANDWIDTH: ::UINT = ::WM_USER + 44; -pub const RBN_HEIGHTCHANGE: ::UINT = RBN_FIRST - 0; -pub const RBN_GETOBJECT: ::UINT = RBN_FIRST - 1; -pub const RBN_LAYOUTCHANGED: ::UINT = RBN_FIRST - 2; -pub const RBN_AUTOSIZE: ::UINT = RBN_FIRST - 3; -pub const RBN_BEGINDRAG: ::UINT = RBN_FIRST - 4; -pub const RBN_ENDDRAG: ::UINT = RBN_FIRST - 5; -pub const RBN_DELETINGBAND: ::UINT = RBN_FIRST - 6; -pub const RBN_DELETEDBAND: ::UINT = RBN_FIRST - 7; -pub const RBN_CHILDSIZE: ::UINT = RBN_FIRST - 8; -pub const RBN_CHEVRONPUSHED: ::UINT = RBN_FIRST - 10; -pub const RBN_SPLITTERDRAG: ::UINT = RBN_FIRST - 11; -pub const RBN_MINMAX: ::UINT = RBN_FIRST - 21; -pub const RBN_AUTOBREAK: ::UINT = RBN_FIRST - 22; -STRUCT!{struct NMREBARCHILDSIZE { - hdr: ::NMHDR, - uBand: ::UINT, - wID: ::UINT, - rcChild: ::RECT, - rcBand: ::RECT, -}} -pub type LPNMREBARCHILDSIZE = *mut NMREBARCHILDSIZE; -STRUCT!{struct NMREBAR { - hdr: ::NMHDR, - dwMask: ::DWORD, - uBand: ::UINT, - fStyle: ::UINT, - wID: ::UINT, - lParam: ::LPARAM, -}} -pub type LPNMREBAR = *mut NMREBAR; -pub const RBNM_ID: ::DWORD = 0x00000001; -pub const RBNM_STYLE: ::DWORD = 0x00000002; -pub const RBNM_LPARAM: ::DWORD = 0x00000004; -STRUCT!{struct NMRBAUTOSIZE { - hdr: ::NMHDR, - fChanged: ::BOOL, - rcTarget: ::RECT, - rcActual: ::RECT, -}} -pub type LPNMRBAUTOSIZE = *mut NMRBAUTOSIZE; -STRUCT!{struct NMREBARCHEVRON { - hdr: ::NMHDR, - uBand: ::UINT, - wID: ::UINT, - lParam: ::LPARAM, - rc: ::RECT, - lParamNM: ::LPARAM, -}} -pub type LPNMREBARCHEVRON = *mut NMREBARCHEVRON; -STRUCT!{struct NMREBARSPLITTER { - hdr: ::NMHDR, - rcSizing: ::RECT, -}} -pub type LPNMREBARSPLITTER = *mut NMREBARSPLITTER; -pub const RBAB_AUTOSIZE: ::UINT = 0x0001; -pub const RBAB_ADDBAND: ::UINT = 0x0002; -STRUCT!{struct NMREBARAUTOBREAK { - hdr: ::NMHDR, - uBand: ::UINT, - wID: ::UINT, - lParam: ::LPARAM, - uMsg: ::UINT, - fStyleCurrent: ::UINT, - fAutoBreak: ::UINT, -}} -pub type LPNMREBARAUTOBREAK = *mut NMREBARAUTOBREAK; -pub const RBHT_NOWHERE: ::UINT = 0x0001; -pub const RBHT_CAPTION: ::UINT = 0x0002; -pub const RBHT_CLIENT: ::UINT = 0x0003; -pub const RBHT_GRABBER: ::UINT = 0x0004; -pub const RBHT_CHEVRON: ::UINT = 0x0008; -pub const RBHT_SPLITTER: ::UINT = 0x0010; -STRUCT!{struct RBHITTESTINFO { - pt: ::POINT, - flags: ::UINT, - iBand: ::c_int, -}} -pub type LPRBHITTESTINFO = *mut RBHITTESTINFO; -pub type LPTOOLINFOA = LPTTTOOLINFOA; -pub type LPTOOLINFOW = LPTTTOOLINFOW; -pub type TOOLINFOA = TTTOOLINFOA; -pub type TOOLINFOW = TTTOOLINFOW; -STRUCT!{struct TTTOOLINFOA { - cbSize: ::UINT, - uFlags: ::UINT, - hwnd: ::HWND, - uId: ::UINT_PTR, - rect: ::RECT, - hinst: ::HINSTANCE, - lpszText: ::LPSTR, - lParam: ::LPARAM, - lpReserved: *mut ::c_void, -}} -pub type PTTTOOLINFOA = *mut TTTOOLINFOA; -pub type LPTTTOOLINFOA = *mut TTTOOLINFOA; -STRUCT!{struct TTTOOLINFOW { - cbSize: ::UINT, - uFlags: ::UINT, - hwnd: ::HWND, - uId: ::UINT_PTR, - rect: ::RECT, - hinst: ::HINSTANCE, - lpszText: ::LPSTR, - lParam: ::LPARAM, - lpReserved: *mut ::c_void, -}} -pub type PTTTOOLINFOW = *mut TTTOOLINFOW; -pub type LPTTTOOLINFOW = *mut TTTOOLINFOW; -pub const TTS_ALWAYSTIP: ::DWORD = 0x01; -pub const TTS_NOPREFIX: ::DWORD = 0x02; -pub const TTS_NOANIMATE: ::DWORD = 0x10; -pub const TTS_NOFADE: ::DWORD = 0x20; -pub const TTS_BALLOON: ::DWORD = 0x40; -pub const TTS_CLOSE: ::DWORD = 0x80; -pub const TTS_USEVISUALSTYLE: ::DWORD = 0x100; -pub const TTF_IDISHWND: ::UINT = 0x0001; -pub const TTF_CENTERTIP: ::UINT = 0x0002; -pub const TTF_RTLREADING: ::UINT = 0x0004; -pub const TTF_SUBCLASS: ::UINT = 0x0010; -pub const TTF_TRACK: ::UINT = 0x0020; -pub const TTF_ABSOLUTE: ::UINT = 0x0080; -pub const TTF_TRANSPARENT: ::UINT = 0x0100; -pub const TTF_PARSELINKS: ::UINT = 0x1000; -pub const TTF_DI_SETITEM: ::UINT = 0x8000; -pub const TTDT_AUTOMATIC: ::WPARAM = 0; -pub const TTDT_RESHOW: ::WPARAM = 1; -pub const TTDT_AUTOPOP: ::WPARAM = 2; -pub const TTDT_INITIAL: ::WPARAM = 3; -pub const TTI_NONE: ::WPARAM = 0; -pub const TTI_INFO: ::WPARAM = 1; -pub const TTI_WARNING: ::WPARAM = 2; -pub const TTI_ERROR: ::WPARAM = 3; -pub const TTI_INFO_LARGE: ::WPARAM = 4; -pub const TTI_WARNING_LARGE: ::WPARAM = 5; -pub const TTI_ERROR_LARGE: ::WPARAM = 6; -pub const TTM_ACTIVATE: ::UINT = ::WM_USER + 1; -pub const TTM_SETDELAYTIME: ::UINT = ::WM_USER + 3; -pub const TTM_ADDTOOLA: ::UINT = ::WM_USER + 4; -pub const TTM_ADDTOOLW: ::UINT = ::WM_USER + 50; -pub const TTM_DELTOOLA: ::UINT = ::WM_USER + 5; -pub const TTM_DELTOOLW: ::UINT = ::WM_USER + 51; -pub const TTM_NEWTOOLRECTA: ::UINT = ::WM_USER + 6; -pub const TTM_NEWTOOLRECTW: ::UINT = ::WM_USER + 52; -pub const TTM_RELAYEVENT: ::UINT = ::WM_USER + 7; -pub const TTM_GETTOOLINFOA: ::UINT = ::WM_USER + 8; -pub const TTM_GETTOOLINFOW: ::UINT = ::WM_USER + 53; -pub const TTM_SETTOOLINFOA: ::UINT = ::WM_USER + 9; -pub const TTM_SETTOOLINFOW: ::UINT = ::WM_USER + 54; -pub const TTM_HITTESTA: ::UINT = ::WM_USER + 10; -pub const TTM_HITTESTW: ::UINT = ::WM_USER + 55; -pub const TTM_GETTEXTA: ::UINT = ::WM_USER + 11; -pub const TTM_GETTEXTW: ::UINT = ::WM_USER + 56; -pub const TTM_UPDATETIPTEXTA: ::UINT = ::WM_USER + 12; -pub const TTM_UPDATETIPTEXTW: ::UINT = ::WM_USER + 57; -pub const TTM_GETTOOLCOUNT: ::UINT = ::WM_USER + 13; -pub const TTM_ENUMTOOLSA: ::UINT = ::WM_USER + 14; -pub const TTM_ENUMTOOLSW: ::UINT = ::WM_USER + 58; -pub const TTM_GETCURRENTTOOLA: ::UINT = ::WM_USER + 15; -pub const TTM_GETCURRENTTOOLW: ::UINT = ::WM_USER + 59; -pub const TTM_WINDOWFROMPOINT: ::UINT = ::WM_USER + 16; -pub const TTM_TRACKACTIVATE: ::UINT = ::WM_USER + 17; -pub const TTM_TRACKPOSITION: ::UINT = ::WM_USER + 18; -pub const TTM_SETTIPBKCOLOR: ::UINT = ::WM_USER + 19; -pub const TTM_SETTIPTEXTCOLOR: ::UINT = ::WM_USER + 20; -pub const TTM_GETDELAYTIME: ::UINT = ::WM_USER + 21; -pub const TTM_GETTIPBKCOLOR: ::UINT = ::WM_USER + 22; -pub const TTM_GETTIPTEXTCOLOR: ::UINT = ::WM_USER + 23; -pub const TTM_SETMAXTIPWIDTH: ::UINT = ::WM_USER + 24; -pub const TTM_GETMAXTIPWIDTH: ::UINT = ::WM_USER + 25; -pub const TTM_SETMARGIN: ::UINT = ::WM_USER + 26; -pub const TTM_GETMARGIN: ::UINT = ::WM_USER + 27; -pub const TTM_POP: ::UINT = ::WM_USER + 28; -pub const TTM_UPDATE: ::UINT = ::WM_USER + 29; -pub const TTM_GETBUBBLESIZE: ::UINT = ::WM_USER + 30; -pub const TTM_ADJUSTRECT: ::UINT = ::WM_USER + 31; -pub const TTM_SETTITLEA: ::UINT = ::WM_USER + 32; -pub const TTM_SETTITLEW: ::UINT = ::WM_USER + 33; -pub const TTM_POPUP: ::UINT = ::WM_USER + 34; -pub const TTM_GETTITLE: ::UINT = ::WM_USER + 35; -STRUCT!{struct TTGETTITLE { - dwSize: ::DWORD, - uTitleBitmap: ::UINT, - cch: ::UINT, - pszTitle: *mut ::WCHAR, -}} -pub type LPTTGETTITLE = *mut TTGETTITLE; -pub const TTM_SETWINDOWTHEME: ::UINT = CCM_SETWINDOWTHEME; -pub type LPHITTESTINFOW = LPTTHITTESTINFOW; -pub type LPHITTESTINFOA = LPTTHITTESTINFOA; -STRUCT!{struct TTHITTESTINFOA { - hwnd: ::HWND, - pt: ::POINT, - ti: TTTOOLINFOA, -}} -pub type LPTTHITTESTINFOA = *mut TTHITTESTINFOA; -STRUCT!{struct TTHITTESTINFOW { - hwnd: ::HWND, - pt: ::POINT, - ti: TTTOOLINFOW, -}} -pub type LPTTHITTESTINFOW = *mut TTHITTESTINFOW; -pub const TTN_GETDISPINFOA: ::UINT = TTN_FIRST - 0; -pub const TTN_GETDISPINFOW: ::UINT = TTN_FIRST - 10; -pub const TTN_SHOW: ::UINT = TTN_FIRST - 1; -pub const TTN_POP: ::UINT = TTN_FIRST - 2; -pub const TTN_LINKCLICK: ::UINT = TTN_FIRST - 3; -pub const TTN_NEEDTEXTA: ::UINT = TTN_GETDISPINFOA; -pub const TTN_NEEDTEXTW: ::UINT = TTN_GETDISPINFOW; -pub type TOOLTIPTEXTW = NMTTDISPINFOW; -pub type TOOLTIPTEXTA = NMTTDISPINFOA; -pub type LPTOOLTIPTEXTA = LPNMTTDISPINFOA; -pub type LPTOOLTIPTEXTW = LPNMTTDISPINFOW; -#[repr(C)] #[derive(Copy)] -pub struct NMTTDISPINFOA { - pub hdr: ::NMHDR, - pub lpszText: ::LPSTR, - pub szText: [::c_char; 80], - pub hinst: ::HINSTANCE, - pub uFlags: ::UINT, - pub lParam: ::LPARAM, -} -impl Clone for NMTTDISPINFOA { fn clone(&self) -> NMTTDISPINFOA { *self } } -pub type LPNMTTDISPINFOA = *mut NMTTDISPINFOA; -#[repr(C)] #[derive(Copy)] -pub struct NMTTDISPINFOW { - pub hdr: ::NMHDR, - pub lpszText: ::LPWSTR, - pub szText: [::WCHAR; 80], - pub hinst: ::HINSTANCE, - pub uFlags: ::UINT, - pub lParam: ::LPARAM, -} -impl Clone for NMTTDISPINFOW { fn clone(&self) -> NMTTDISPINFOW { *self } } -pub type LPNMTTDISPINFOW = *mut NMTTDISPINFOW; -pub const SBARS_SIZEGRIP: ::DWORD = 0x0100; -pub const SBARS_TOOLTIPS: ::DWORD = 0x0800; -pub const SBT_TOOLTIPS: ::DWORD = 0x0800; -pub const SB_SETTEXTA: ::UINT = ::WM_USER + 1; -pub const SB_SETTEXTW: ::UINT = ::WM_USER + 11; -pub const SB_GETTEXTA: ::UINT = ::WM_USER + 2; -pub const SB_GETTEXTW: ::UINT = ::WM_USER + 13; -pub const SB_GETTEXTLENGTHA: ::UINT = ::WM_USER + 3; -pub const SB_GETTEXTLENGTHW: ::UINT = ::WM_USER + 12; -pub const SB_SETPARTS: ::UINT = ::WM_USER + 4; -pub const SB_GETPARTS: ::UINT = ::WM_USER + 6; -pub const SB_GETBORDERS: ::UINT = ::WM_USER + 7; -pub const SB_SETMINHEIGHT: ::UINT = ::WM_USER + 8; -pub const SB_SIMPLE: ::UINT = ::WM_USER + 9; -pub const SB_GETRECT: ::UINT = ::WM_USER + 10; -pub const SB_ISSIMPLE: ::UINT = ::WM_USER + 14; -pub const SB_SETICON: ::UINT = ::WM_USER + 15; -pub const SB_SETTIPTEXTA: ::UINT = ::WM_USER + 16; -pub const SB_SETTIPTEXTW: ::UINT = ::WM_USER + 17; -pub const SB_GETTIPTEXTA: ::UINT = ::WM_USER + 18; -pub const SB_GETTIPTEXTW: ::UINT = ::WM_USER + 19; -pub const SB_GETICON: ::UINT = ::WM_USER + 20; -pub const SB_SETUNICODEFORMAT: ::UINT = CCM_SETUNICODEFORMAT; -pub const SB_GETUNICODEFORMAT: ::UINT = CCM_GETUNICODEFORMAT; -pub const SBT_OWNERDRAW: ::WPARAM = 0x1000; -pub const SBT_NOBORDERS: ::WPARAM = 0x0100; -pub const SBT_POPOUT: ::WPARAM = 0x0200; -pub const SBT_RTLREADING: ::WPARAM = 0x0400; -pub const SBT_NOTABPARSING: ::WPARAM = 0x0800; -pub const SB_SETBKCOLOR: ::UINT = CCM_SETBKCOLOR; -pub const SBN_SIMPLEMODECHANGE: ::UINT = SBN_FIRST - 0; -pub const SB_SIMPLEID: ::WPARAM = 0x00ff; -pub const TBS_AUTOTICKS: ::DWORD = 0x0001; -pub const TBS_VERT: ::DWORD = 0x0002; -pub const TBS_HORZ: ::DWORD = 0x0000; -pub const TBS_TOP: ::DWORD = 0x0004; -pub const TBS_BOTTOM: ::DWORD = 0x0000; -pub const TBS_LEFT: ::DWORD = 0x0004; -pub const TBS_RIGHT: ::DWORD = 0x0000; -pub const TBS_BOTH: ::DWORD = 0x0008; -pub const TBS_NOTICKS: ::DWORD = 0x0010; -pub const TBS_ENABLESELRANGE: ::DWORD = 0x0020; -pub const TBS_FIXEDLENGTH: ::DWORD = 0x0040; -pub const TBS_NOTHUMB: ::DWORD = 0x0080; -pub const TBS_TOOLTIPS: ::DWORD = 0x0100; -pub const TBS_REVERSED: ::DWORD = 0x0200; -pub const TBS_DOWNISLEFT: ::DWORD = 0x0400; -pub const TBS_NOTIFYBEFOREMOVE: ::DWORD = 0x0800; -pub const TBS_TRANSPARENTBKGND: ::DWORD = 0x1000; -pub const TBM_GETPOS: ::UINT = ::WM_USER; -pub const TBM_GETRANGEMIN: ::UINT = ::WM_USER + 1; -pub const TBM_GETRANGEMAX: ::UINT = ::WM_USER + 2; -pub const TBM_GETTIC: ::UINT = ::WM_USER + 3; -pub const TBM_SETTIC: ::UINT = ::WM_USER + 4; -pub const TBM_SETPOS: ::UINT = ::WM_USER + 5; -pub const TBM_SETRANGE: ::UINT = ::WM_USER + 6; -pub const TBM_SETRANGEMIN: ::UINT = ::WM_USER + 7; -pub const TBM_SETRANGEMAX: ::UINT = ::WM_USER + 8; -pub const TBM_CLEARTICS: ::UINT = ::WM_USER + 9; -pub const TBM_SETSEL: ::UINT = ::WM_USER + 10; -pub const TBM_SETSELSTART: ::UINT = ::WM_USER + 11; -pub const TBM_SETSELEND: ::UINT = ::WM_USER + 12; -pub const TBM_GETPTICS: ::UINT = ::WM_USER + 14; -pub const TBM_GETTICPOS: ::UINT = ::WM_USER + 15; -pub const TBM_GETNUMTICS: ::UINT = ::WM_USER + 16; -pub const TBM_GETSELSTART: ::UINT = ::WM_USER + 17; -pub const TBM_GETSELEND: ::UINT = ::WM_USER + 18; -pub const TBM_CLEARSEL: ::UINT = ::WM_USER + 19; -pub const TBM_SETTICFREQ: ::UINT = ::WM_USER + 20; -pub const TBM_SETPAGESIZE: ::UINT = ::WM_USER + 21; -pub const TBM_GETPAGESIZE: ::UINT = ::WM_USER + 22; -pub const TBM_SETLINESIZE: ::UINT = ::WM_USER + 23; -pub const TBM_GETLINESIZE: ::UINT = ::WM_USER + 24; -pub const TBM_GETTHUMBRECT: ::UINT = ::WM_USER + 25; -pub const TBM_GETCHANNELRECT: ::UINT = ::WM_USER + 26; -pub const TBM_SETTHUMBLENGTH: ::UINT = ::WM_USER + 27; -pub const TBM_GETTHUMBLENGTH: ::UINT = ::WM_USER + 28; -pub const TBM_SETTOOLTIPS: ::UINT = ::WM_USER + 29; -pub const TBM_GETTOOLTIPS: ::UINT = ::WM_USER + 30; -pub const TBM_SETTIPSIDE: ::UINT = ::WM_USER + 31; -pub const TBTS_TOP: ::WPARAM = 0; -pub const TBTS_LEFT: ::WPARAM = 1; -pub const TBTS_BOTTOM: ::WPARAM = 2; -pub const TBTS_RIGHT: ::WPARAM = 3; -pub const TBM_SETBUDDY: ::UINT = ::WM_USER + 32; -pub const TBM_GETBUDDY: ::UINT = ::WM_USER + 33; -pub const TBM_SETPOSNOTIFY: ::UINT = ::WM_USER + 34; -pub const TBM_SETUNICODEFORMAT: ::UINT = CCM_SETUNICODEFORMAT; -pub const TBM_GETUNICODEFORMAT: ::UINT = CCM_GETUNICODEFORMAT; -pub const TBCD_TICS: ::DWORD_PTR = 0x0001; -pub const TBCD_THUMB: ::DWORD_PTR = 0x0001; -pub const TBCD_CHANNEL: ::DWORD_PTR = 0x0001; -pub const TB_LINEUP: ::WPARAM = 0; -pub const TB_LINEDOWN: ::WPARAM = 1; -pub const TB_PAGEUP: ::WPARAM = 2; -pub const TB_PAGEDOWN: ::WPARAM = 3; -pub const TB_THUMBPOSITION: ::WPARAM = 4; -pub const TB_THUMBTRACK: ::WPARAM = 5; -pub const TB_TOP: ::WPARAM = 6; -pub const TB_BOTTOM: ::WPARAM = 7; -pub const TB_ENDTRACK: ::WPARAM = 8; -pub const TRBN_THUMBPOSCHANGING: ::UINT = TRBN_FIRST - 1; -STRUCT!{struct NMTRBTHUMBPOSCHANGING { - hdr: ::NMHDR, - dwPos: ::DWORD, - nReason: ::c_int, -}} -STRUCT!{struct DRAGLISTINFO { - uNotification: ::UINT, - hWnd: ::HWND, - ptCursor: ::POINT, -}} -pub type LPDRAGLISTINFO = *mut DRAGLISTINFO; -pub const DL_BEGINDRAG: ::UINT = ::WM_USER + 133; -pub const DL_DRAGGING: ::UINT = ::WM_USER + 134; -pub const DL_DROPPED: ::UINT = ::WM_USER + 135; -pub const DL_CANCELDRAG: ::UINT = ::WM_USER + 136; -pub const DL_CURSORSET: ::UINT = 0; -pub const DL_STOPCURSOR: ::UINT = 1; -pub const DL_COPYCURSOR: ::UINT = 2; -pub const DL_MOVECURSOR: ::UINT = 3; -STRUCT!{struct UDACCEL { - nSec: ::UINT, - nInc: ::UINT, -}} -pub type LPUDACCEL = *mut UDACCEL; -pub const UD_MAXVAL: ::c_short = 0x7fff; -pub const UD_MINVAL: ::c_short = 0 - UD_MAXVAL; -pub const UDS_WRAP: ::DWORD = 0x0001; -pub const UDS_SETBUDDYINT: ::DWORD = 0x0002; -pub const UDS_ALIGNRIGHT: ::DWORD = 0x0004; -pub const UDS_ALIGNLEFT: ::DWORD = 0x0008; -pub const UDS_AUTOBUDDY: ::DWORD = 0x0010; -pub const UDS_ARROWKEYS: ::DWORD = 0x0020; -pub const UDS_HORZ: ::DWORD = 0x0040; -pub const UDS_NOTHOUSANDS: ::DWORD = 0x0080; -pub const UDS_HOTTRACK: ::DWORD = 0x0100; -pub const UDM_SETRANGE: ::UINT = ::WM_USER + 101; -pub const UDM_GETRANGE: ::UINT = ::WM_USER + 102; -pub const UDM_SETPOS: ::UINT = ::WM_USER + 103; -pub const UDM_GETPOS: ::UINT = ::WM_USER + 104; -pub const UDM_SETBUDDY: ::UINT = ::WM_USER + 105; -pub const UDM_GETBUDDY: ::UINT = ::WM_USER + 106; -pub const UDM_SETACCEL: ::UINT = ::WM_USER + 107; -pub const UDM_GETACCEL: ::UINT = ::WM_USER + 108; -pub const UDM_SETBASE: ::UINT = ::WM_USER + 109; -pub const UDM_GETBASE: ::UINT = ::WM_USER + 110; -pub const UDM_SETRANGE32: ::UINT = ::WM_USER + 111; -pub const UDM_GETRANGE32: ::UINT = ::WM_USER + 112; -pub const UDM_SETUNICODEFORMAT: ::UINT = CCM_SETUNICODEFORMAT; -pub const UDM_GETUNICODEFORMAT: ::UINT = CCM_GETUNICODEFORMAT; -pub const UDM_SETPOS32: ::UINT = ::WM_USER + 113; -pub const UDM_GETPOS32: ::UINT = ::WM_USER + 114; -pub type NM_UPDOWN = NMUPDOWN; -pub type LPNM_UPDOWN = LPNMUPDOWN; -STRUCT!{struct NMUPDOWN { - hdr: ::NMHDR, - iPos: ::c_int, - iDelta: ::c_int, -}} -pub type LPNMUPDOWN = *mut NMUPDOWN; -pub const UDN_DELTAPOS: ::UINT = UDN_FIRST - 1; -pub const PBS_SMOOTH: ::DWORD = 0x01; -pub const PBS_VERTICAL: ::DWORD = 0x04; -pub const PBM_SETRANGE: ::UINT = ::WM_USER + 1; -pub const PBM_SETPOS: ::UINT = ::WM_USER + 2; -pub const PBM_DELTAPOS: ::UINT = ::WM_USER + 3; -pub const PBM_SETSTEP: ::UINT = ::WM_USER + 4; -pub const PBM_STEPIT: ::UINT = ::WM_USER + 5; -pub const PBM_SETRANGE32: ::UINT = ::WM_USER + 6; -STRUCT!{struct PBRANGE { - iLow: ::c_int, - iHigh: ::c_int, -}} -pub type LPPBRANGE = *mut PBRANGE; -pub const PBM_GETRANGE: ::UINT = ::WM_USER + 7; -pub const PBM_GETPOS: ::UINT = ::WM_USER + 8; -pub const PBM_SETBARCOLOR: ::UINT = ::WM_USER + 9; -pub const PBM_SETBKCOLOR: ::UINT = CCM_SETBKCOLOR; -pub const PBM_SETMARQUEE: ::UINT = ::WM_USER + 10; -pub const PBS_MARQUEE: ::DWORD = 0x08; -pub const PBS_SMOOTHREVERSE: ::DWORD = 0x10; -pub const PBM_GETSTEP: ::UINT = ::WM_USER + 13; -pub const PBM_GETBKCOLOR: ::UINT = ::WM_USER + 14; -pub const PBM_GETBARCOLOR: ::UINT = ::WM_USER + 15; -pub const PBM_SETSTATE: ::UINT = ::WM_USER + 16; -pub const PBM_GETSTATE: ::UINT = ::WM_USER + 17; -pub const PBST_NORMAL: ::c_int = 0x0001; -pub const PBST_ERROR: ::c_int = 0x0002; -pub const PBST_PAUSED: ::c_int = 0x0003; -pub const HOTKEYF_SHIFT: ::BYTE = 0x01; -pub const HOTKEYF_CONTROL: ::BYTE = 0x02; -pub const HOTKEYF_ALT: ::BYTE = 0x04; -pub const HOTKEYF_EXT: ::BYTE = 0x08; -pub const HKCOMB_NONE: ::WPARAM = 0x0001; -pub const HKCOMB_S: ::WPARAM = 0x0002; -pub const HKCOMB_C: ::WPARAM = 0x0004; -pub const HKCOMB_A: ::WPARAM = 0x0008; -pub const HKCOMB_SC: ::WPARAM = 0x0010; -pub const HKCOMB_SA: ::WPARAM = 0x0020; -pub const HKCOMB_CA: ::WPARAM = 0x0040; -pub const HKCOMB_SCA: ::WPARAM = 0x0080; -pub const HKM_SETHOTKEY: ::UINT = ::WM_USER + 1; -pub const HKM_GETHOTKEY: ::UINT = ::WM_USER + 2; -pub const HKM_SETRULES: ::UINT = ::WM_USER + 3; -pub const CCS_TOP: ::DWORD = 0x00000001; -pub const CCS_NOMOVEY: ::DWORD = 0x00000002; -pub const CCS_BOTTOM: ::DWORD = 0x00000003; -pub const CCS_NORESIZE: ::DWORD = 0x00000004; -pub const CCS_NOPARENTALIGN: ::DWORD = 0x00000008; -pub const CCS_ADJUSTABLE: ::DWORD = 0x00000020; -pub const CCS_NODIVIDER: ::DWORD = 0x00000040; -pub const CCS_VERT: ::DWORD = 0x00000080; -pub const CCS_LEFT: ::DWORD = CCS_VERT | CCS_TOP; -pub const CCS_RIGHT: ::DWORD = CCS_VERT | CCS_BOTTOM; -pub const CCS_NOMOVEX: ::DWORD = CCS_VERT | CCS_NOMOVEY; -pub const MAX_LINKID_TEXT: usize = 48; -pub const L_MAX_URL_LENGTH: usize = 2048 + 32 + 4; -pub const LWS_TRANSPARENT: ::DWORD = 0x0001; -pub const LWS_IGNORERETURN: ::DWORD = 0x0002; -pub const LWS_NOPREFIX: ::DWORD = 0x0004; -pub const LWS_USEVISUALSTYLE: ::DWORD = 0x0008; -pub const LWS_USECUSTOMTEXT: ::DWORD = 0x0010; -pub const LWS_RIGHT: ::DWORD = 0x0020; -pub const LIF_ITEMINDEX: ::UINT = 0x00000001; -pub const LIF_STATE: ::UINT = 0x00000002; -pub const LIF_ITEMID: ::UINT = 0x00000004; -pub const LIF_URL: ::UINT = 0x00000008; -pub const LIS_FOCUSED: ::UINT = 0x00000001; -pub const LIS_ENABLED: ::UINT = 0x00000002; -pub const LIS_VISITED: ::UINT = 0x00000004; -pub const LIS_HOTTRACK: ::UINT = 0x00000008; -pub const LIS_DEFAULTCOLORS: ::UINT = 0x00000010; -#[repr(C)] #[derive(Copy)] -pub struct LITEM { - pub mask: ::UINT, - pub iLink: ::c_int, - pub state: ::UINT, - pub stateMask: ::UINT, - pub szID: [::WCHAR; MAX_LINKID_TEXT], - pub szUrl: [::WCHAR; L_MAX_URL_LENGTH], -} -impl Clone for LITEM { fn clone(&self) -> LITEM { *self } } -pub type PLITEM = *mut LITEM; -#[repr(C)] #[derive(Copy)] -pub struct LHITTESTINFO { - pub pt: ::POINT, - pub item: LITEM, -} -impl Clone for LHITTESTINFO { fn clone(&self) -> LHITTESTINFO { *self } } -pub type PLHITTESTINFO = *mut LHITTESTINFO; -#[repr(C)] #[derive(Copy)] -pub struct NMLINK { - pub hdr: ::NMHDR, - pub item: LITEM, -} -impl Clone for NMLINK { fn clone(&self) -> NMLINK { *self } } -pub type PNMLINK = *mut NMLINK; -pub const LM_HITTEST: ::UINT = ::WM_USER + 0x300; -pub const LM_GETIDEALHEIGHT: ::UINT = ::WM_USER + 0x301; -pub const LM_SETITEM: ::UINT = ::WM_USER + 0x302; -pub const LM_GETITEM: ::UINT = ::WM_USER + 0x303; -pub const LM_GETIDEALSIZE: ::UINT = LM_GETIDEALHEIGHT; -pub const LVS_ICON: ::DWORD = 0x0000; -pub const LVS_REPORT: ::DWORD = 0x0001; -pub const LVS_SMALLICON: ::DWORD = 0x0002; -pub const LVS_LIST: ::DWORD = 0x0003; -pub const LVS_TYPEMASK: ::DWORD = 0x0003; -pub const LVS_SINGLESEL: ::DWORD = 0x0004; -pub const LVS_SHOWSELALWAYS: ::DWORD = 0x0008; -pub const LVS_SORTASCENDING: ::DWORD = 0x0010; -pub const LVS_SORTDESCENDING: ::DWORD = 0x0020; -pub const LVS_SHAREIMAGELISTS: ::DWORD = 0x0040; -pub const LVS_NOLABELWRAP: ::DWORD = 0x0080; -pub const LVS_AUTOARRANGE: ::DWORD = 0x0100; -pub const LVS_EDITLABELS: ::DWORD = 0x0200; -pub const LVS_OWNERDATA: ::DWORD = 0x1000; -pub const LVS_NOSCROLL: ::DWORD = 0x2000; -pub const LVS_TYPESTYLEMASK: ::DWORD = 0xfc00; -pub const LVS_ALIGNTOP: ::DWORD = 0x0000; -pub const LVS_ALIGNLEFT: ::DWORD = 0x0800; -pub const LVS_ALIGNMASK: ::DWORD = 0x0c00; -pub const LVS_OWNERDRAWFIXED: ::DWORD = 0x0400; -pub const LVS_NOCOLUMNHEADER: ::DWORD = 0x4000; -pub const LVS_NOSORTHEADER: ::DWORD = 0x8000; -pub const LVM_SETUNICODEFORMAT: ::UINT = CCM_SETUNICODEFORMAT; -pub const LVM_GETUNICODEFORMAT: ::UINT = CCM_GETUNICODEFORMAT; -pub const LVM_GETBKCOLOR: ::UINT = LVM_FIRST + 0; -pub const LVM_SETBKCOLOR: ::UINT = LVM_FIRST + 1; -pub const LVM_GETIMAGELIST: ::UINT = LVM_FIRST + 2; -pub const LVM_SETIMAGELIST: ::UINT = LVM_FIRST + 3; -pub const LVM_GETITEMCOUNT: ::UINT = LVM_FIRST + 4; -pub const LVSIL_NORMAL: ::c_int = 0; -pub const LVSIL_SMALL: ::c_int = 1; -pub const LVSIL_STATE: ::c_int = 2; -pub const LVSIL_GROUPHEADER: ::c_int = 3; -pub const LVIF_TEXT: ::UINT = 0x00000001; -pub const LVIF_IMAGE: ::UINT = 0x00000002; -pub const LVIF_PARAM: ::UINT = 0x00000004; -pub const LVIF_STATE: ::UINT = 0x00000008; -pub const LVIF_INDENT: ::UINT = 0x00000010; -pub const LVIF_NORECOMPUTE: ::UINT = 0x00000800; -pub const LVIF_GROUPID: ::UINT = 0x00000100; -pub const LVIF_COLUMNS: ::UINT = 0x00000200; -pub const LVIF_COLFMT: ::UINT = 0x00010000; -pub const LVIS_FOCUSED: ::UINT = 0x0001; -pub const LVIS_SELECTED: ::UINT = 0x0002; -pub const LVIS_CUT: ::UINT = 0x0004; -pub const LVIS_DROPHILITED: ::UINT = 0x0008; -pub const LVIS_GLOW: ::UINT = 0x0010; -pub const LVIS_ACTIVATING: ::UINT = 0x0020; -pub const LVIS_OVERLAYMASK: ::UINT = 0x0F00; -pub const LVIS_STATEIMAGEMASK: ::UINT = 0xF000; -#[inline] #[allow(dead_code)] -pub fn INDEXTOSTATEIMAGEMASK(i: ::UINT) -> ::UINT { i << 12 } -pub const I_INDENTCALLBACK: ::c_int = -1; -pub type LV_ITEMA = LVITEMA; -pub type LV_ITEMW = LVITEMW; -pub const I_GROUPIDCALLBACK: ::c_int = -1; -pub const I_GROUPIDNONE: ::c_int = -2; -STRUCT!{struct LVITEMA { - mask: ::UINT, - iItem: ::c_int, - iSubItem: ::c_int, - state: ::UINT, - stateMask: ::UINT, - pszText: ::LPSTR, - cchTextMax: ::c_int, - iImage: ::c_int, - lParam: ::LPARAM, - iIndent: ::c_int, - iGroupId: ::c_int, - cColumns: ::UINT, - puColumns: ::PUINT, - piColFmt: *mut ::c_int, - iGroup: ::c_int, -}} -pub type LPLVITEMA = *mut LVITEMA; -STRUCT!{struct LVITEMW { - mask: ::UINT, - iItem: ::c_int, - iSubItem: ::c_int, - state: ::UINT, - stateMask: ::UINT, - pszText: ::LPWSTR, - cchTextMax: ::c_int, - iImage: ::c_int, - lParam: ::LPARAM, - iIndent: ::c_int, - iGroupId: ::c_int, - cColumns: ::UINT, - puColumns: ::PUINT, - piColFmt: *mut ::c_int, - iGroup: ::c_int, -}} -pub type LPLVITEMW = *mut LVITEMW; -pub const LPSTR_TEXTCALLBACKW: ::LPWSTR = (0 - 1) as ::LPWSTR; -pub const LPSTR_TEXTCALLBACKA: ::LPSTR = (0 - 1) as ::LPSTR; -pub const I_IMAGECALLBACK: ::c_int = -1; -pub const I_IMAGENONE: ::c_int = -2; -pub const I_COLUMNSCALLBACK: ::UINT = 0 - 1; -pub const LVM_GETITEMA: ::UINT = LVM_FIRST + 5; -pub const LVM_GETITEMW: ::UINT = LVM_FIRST + 75; -pub const LVM_SETITEMA: ::UINT = LVM_FIRST + 6; -pub const LVM_SETITEMW: ::UINT = LVM_FIRST + 76; -pub const LVM_INSERTITEMA: ::UINT = LVM_FIRST + 7; -pub const LVM_INSERTITEMW: ::UINT = LVM_FIRST + 77; -pub const LVM_DELETEITEM: ::UINT = LVM_FIRST + 8; -pub const LVM_DELETEALLITEMS: ::UINT = LVM_FIRST + 9; -pub const LVM_GETCALLBACKMASK: ::UINT = LVM_FIRST + 10; -pub const LVM_SETCALLBACKMASK: ::UINT = LVM_FIRST + 11; -pub const LVM_GETNEXTITEM: ::UINT = LVM_FIRST + 12; -pub const LVNI_ALL: ::LPARAM = 0x0000; -pub const LVNI_FOCUSED: ::LPARAM = 0x0001; -pub const LVNI_SELECTED: ::LPARAM = 0x0002; -pub const LVNI_CUT: ::LPARAM = 0x0004; -pub const LVNI_DROPHILITED: ::LPARAM = 0x0008; -pub const LVNI_STATEMASK: ::LPARAM = LVNI_FOCUSED | LVNI_SELECTED | LVNI_CUT | LVNI_DROPHILITED; -pub const LVNI_VISIBLEORDER: ::LPARAM = 0x0010; -pub const LVNI_PREVIOUS: ::LPARAM = 0x0020; -pub const LVNI_VISIBLEONLY: ::LPARAM = 0x0040; -pub const LVNI_SAMEGROUPONLY: ::LPARAM = 0x0080; -pub const LVNI_ABOVE: ::LPARAM = 0x0100; -pub const LVNI_BELOW: ::LPARAM = 0x0200; -pub const LVNI_TOLEFT: ::LPARAM = 0x0400; -pub const LVNI_TORIGHT: ::LPARAM = 0x0800; -pub const LVNI_DIRECTIONMASK: ::LPARAM = LVNI_ABOVE | LVNI_BELOW | LVNI_TOLEFT | LVNI_TORIGHT; -pub const LVFI_PARAM: ::UINT = 0x0001; -pub const LVFI_STRING: ::UINT = 0x0002; -pub const LVFI_SUBSTRING: ::UINT = 0x0004; -pub const LVFI_PARTIAL: ::UINT = 0x0008; -pub const LVFI_WRAP: ::UINT = 0x0020; -pub const LVFI_NEARESTXY: ::UINT = 0x0040; -pub type LV_FINDINFOA = LVFINDINFOA; -pub type LV_FINDINFOW = LVFINDINFOW; -STRUCT!{struct LVFINDINFOA { - flags: ::UINT, - psz: ::LPCSTR, - lParam: ::LPARAM, - pt: ::POINT, - vkDirection: ::UINT, -}} -pub type LPLVFINDINFOA = *mut LVFINDINFOA; -STRUCT!{struct LVFINDINFOW { - flags: ::UINT, - psz: ::LPCWSTR, - lParam: ::LPARAM, - pt: ::POINT, - vkDirection: ::UINT, -}} -pub type LPLVFINDINFOW = *mut LVFINDINFOW; -pub const LVM_FINDITEMA: ::UINT = LVM_FIRST + 13; -pub const LVM_FINDITEMW: ::UINT = LVM_FIRST + 83; -pub const LVIR_BOUNDS: ::c_int = 0; -pub const LVIR_ICON: ::c_int = 1; -pub const LVIR_LABEL: ::c_int = 2; -pub const LVIR_SELECTBOUNDS: ::c_int = 3; -pub const LVM_GETITEMRECT: ::UINT = LVM_FIRST + 14; -pub const LVM_SETITEMPOSITION: ::UINT = LVM_FIRST + 15; -pub const LVM_GETITEMPOSITION: ::UINT = LVM_FIRST + 16; -pub const LVM_GETSTRINGWIDTHA: ::UINT = LVM_FIRST + 17; -pub const LVM_GETSTRINGWIDTHW: ::UINT = LVM_FIRST + 87; -pub const LVHT_NOWHERE: ::UINT = 0x00000001; -pub const LVHT_ONITEMICON: ::UINT = 0x00000002; -pub const LVHT_ONITEMLABEL: ::UINT = 0x00000004; -pub const LVHT_ONITEMSTATEICON: ::UINT = 0x00000008; -pub const LVHT_ONITEM: ::UINT = LVHT_ONITEMICON | LVHT_ONITEMLABEL | LVHT_ONITEMSTATEICON; -pub const LVHT_ABOVE: ::UINT = 0x00000008; -pub const LVHT_BELOW: ::UINT = 0x00000010; -pub const LVHT_TORIGHT: ::UINT = 0x00000020; -pub const LVHT_TOLEFT: ::UINT = 0x00000040; -pub const LVHT_EX_GROUP_HEADER: ::UINT = 0x10000000; -pub const LVHT_EX_GROUP_FOOTER: ::UINT = 0x20000000; -pub const LVHT_EX_GROUP_COLLAPSE: ::UINT = 0x40000000; -pub const LVHT_EX_GROUP_BACKGROUND: ::UINT = 0x80000000; -pub const LVHT_EX_GROUP_STATEICON: ::UINT = 0x01000000; -pub const LVHT_EX_GROUP_SUBSETLINK: ::UINT = 0x02000000; -pub const LVHT_EX_GROUP: ::UINT = LVHT_EX_GROUP_BACKGROUND | LVHT_EX_GROUP_COLLAPSE - | LVHT_EX_GROUP_FOOTER | LVHT_EX_GROUP_HEADER | LVHT_EX_GROUP_STATEICON - | LVHT_EX_GROUP_SUBSETLINK; -pub const LVHT_EX_ONCONTENTS: ::UINT = 0x04000000; -pub const LVHT_EX_FOOTER: ::UINT = 0x08000000; -pub type LV_HITTESTINFO = LVHITTESTINFO; -STRUCT!{struct LVHITTESTINFO { - pt: ::POINT, - flags: ::UINT, - iItem: ::c_int, - iSubItem: ::c_int, - iGroup: ::c_int, -}} -pub type LPLVHITTESTINFO = *mut LVHITTESTINFO; -pub const LVM_HITTEST: ::UINT = LVM_FIRST + 18; -pub const LVM_ENSUREVISIBLE: ::UINT = LVM_FIRST + 19; -pub const LVM_SCROLL: ::UINT = LVM_FIRST + 20; -pub const LVM_REDRAWITEMS: ::UINT = LVM_FIRST + 21; -pub const LVA_DEFAULT: ::WPARAM = 0x0000; -pub const LVA_ALIGNLEFT: ::WPARAM = 0x0001; -pub const LVA_ALIGNTOP: ::WPARAM = 0x0002; -pub const LVA_SNAPTOGRID: ::WPARAM = 0x0005; -pub const LVM_ARRANGE: ::UINT = LVM_FIRST + 22; -pub const LVM_EDITLABELA: ::UINT = LVM_FIRST + 23; -pub const LVM_EDITLABELW: ::UINT = LVM_FIRST + 118; -pub const LVM_GETEDITCONTROL: ::UINT = LVM_FIRST + 24; -pub type LV_COLUMNA = LVCOLUMNA; -pub type LV_COLUMNW = LVCOLUMNW; -STRUCT!{struct LVCOLUMNA { - mask: ::UINT, - fmt: ::c_int, - cx: ::c_int, - pszText: ::LPSTR, - cchTextMax: ::c_int, - iSubItem: ::c_int, - iImage: ::c_int, - iOrder: ::c_int, - cxMin: ::c_int, - cxDefault: ::c_int, - cxIdeal: ::c_int, -}} -pub type LPLVCOLUMNA = *mut LVCOLUMNA; -STRUCT!{struct LVCOLUMNW { - mask: ::UINT, - fmt: ::c_int, - cx: ::c_int, - pszText: ::LPWSTR, - cchTextMax: ::c_int, - iSubItem: ::c_int, - iImage: ::c_int, - iOrder: ::c_int, - cxMin: ::c_int, - cxDefault: ::c_int, - cxIdeal: ::c_int, -}} -pub type LPLVCOLUMNW = *mut LVCOLUMNW; -pub const LVCF_FMT: ::UINT = 0x0001; -pub const LVCF_WIDTH: ::UINT = 0x0002; -pub const LVCF_TEXT: ::UINT = 0x0004; -pub const LVCF_SUBITEM: ::UINT = 0x0008; -pub const LVCF_IMAGE: ::UINT = 0x0010; -pub const LVCF_ORDER: ::UINT = 0x0020; -pub const LVCF_MINWIDTH: ::UINT = 0x0040; -pub const LVCF_DEFAULTWIDTH: ::UINT = 0x0080; -pub const LVCF_IDEALWIDTH: ::UINT = 0x0100; -pub const LVCFMT_LEFT: ::c_int = 0x0000; -pub const LVCFMT_RIGHT: ::c_int = 0x0001; -pub const LVCFMT_CENTER: ::c_int = 0x0002; -pub const LVCFMT_JUSTIFYMASK: ::c_int = 0x0003; -pub const LVCFMT_IMAGE: ::c_int = 0x0800; -pub const LVCFMT_BITMAP_ON_RIGHT: ::c_int = 0x1000; -pub const LVCFMT_COL_HAS_IMAGES: ::c_int = 0x8000; -pub const LVCFMT_FIXED_WIDTH: ::c_int = 0x00100; -pub const LVCFMT_NO_DPI_SCALE: ::c_int = 0x40000; -pub const LVCFMT_FIXED_RATIO: ::c_int = 0x80000; -pub const LVCFMT_LINE_BREAK: ::c_int = 0x100000; -pub const LVCFMT_FILL: ::c_int = 0x200000; -pub const LVCFMT_WRAP: ::c_int = 0x400000; -pub const LVCFMT_NO_TITLE: ::c_int = 0x800000; -pub const LVCFMT_TILE_PLACEMENTMASK: ::c_int = LVCFMT_LINE_BREAK | LVCFMT_FILL; -pub const LVCFMT_SPLITBUTTON: ::c_int = 0x1000000; -pub const LVM_GETCOLUMNA: ::UINT = LVM_FIRST + 25; -pub const LVM_GETCOLUMNW: ::UINT = LVM_FIRST + 95; -pub const LVM_SETCOLUMNA: ::UINT = LVM_FIRST + 26; -pub const LVM_SETCOLUMNW: ::UINT = LVM_FIRST + 96; -pub const LVM_INSERTCOLUMNA: ::UINT = LVM_FIRST + 27; -pub const LVM_INSERTCOLUMNW: ::UINT = LVM_FIRST + 97; -pub const LVM_DELETECOLUMN: ::UINT = LVM_FIRST + 28; -pub const LVM_GETCOLUMNWIDTH: ::UINT = LVM_FIRST + 29; -pub const LVM_SETCOLUMNWIDTH: ::UINT = LVM_FIRST + 30; -pub const LVM_GETHEADER: ::UINT = LVM_FIRST + 31; -pub const LVM_CREATEDRAGIMAGE: ::UINT = LVM_FIRST + 33; -pub const LVM_GETVIEWRECT: ::UINT = LVM_FIRST + 34; -pub const LVM_GETTEXTCOLOR: ::UINT = LVM_FIRST + 35; -pub const LVM_SETTEXTCOLOR: ::UINT = LVM_FIRST + 36; -pub const LVM_GETTEXTBKCOLOR: ::UINT = LVM_FIRST + 37; -pub const LVM_SETTEXTBKCOLOR: ::UINT = LVM_FIRST + 38; -pub const LVM_GETTOPINDEX: ::UINT = LVM_FIRST + 39; -pub const LVM_GETCOUNTPERPAGE: ::UINT = LVM_FIRST + 40; -pub const LVM_GETORIGIN: ::UINT = LVM_FIRST + 41; -pub const LVM_UPDATE: ::UINT = LVM_FIRST + 42; -pub const LVM_SETITEMSTATE: ::UINT = LVM_FIRST + 43; -pub const LVM_GETITEMSTATE: ::UINT = LVM_FIRST + 44; -pub const LVM_GETITEMTEXTA: ::UINT = LVM_FIRST + 45; -pub const LVM_GETITEMTEXTW: ::UINT = LVM_FIRST + 115; -pub const LVM_SETITEMTEXTA: ::UINT = LVM_FIRST + 46; -pub const LVM_SETITEMTEXTW: ::UINT = LVM_FIRST + 116; -pub const LVM_SETITEMCOUNT: ::UINT = LVM_FIRST + 47; -pub const LVM_SORTITEMS: ::UINT = LVM_FIRST + 48; -pub const LVM_SETITEMPOSITION32: ::UINT = LVM_FIRST + 49; -pub const LVM_GETSELECTEDCOUNT: ::UINT = LVM_FIRST + 50; -pub const LVM_GETITEMSPACING: ::UINT = LVM_FIRST + 51; -pub const LVM_GETISEARCHSTRINGA: ::UINT = LVM_FIRST + 52; -pub const LVM_GETISEARCHSTRINGW: ::UINT = LVM_FIRST + 117; -pub const LVM_SETICONSPACING: ::UINT = LVM_FIRST + 53; -pub const LVM_SETEXTENDEDLISTVIEWSTYLE: ::UINT = LVM_FIRST + 54; -pub const LVM_GETEXTENDEDLISTVIEWSTYLE: ::UINT = LVM_FIRST + 55; -pub const LVSICF_NOINVALIDATEALL: ::LPARAM = 0x00000001; -pub const LVSICF_NOSCROLL: ::LPARAM = 0x00000002; -pub const LVS_EX_GRIDLINES: ::DWORD = 0x00000001; -pub const LVS_EX_SUBITEMIMAGES: ::DWORD = 0x00000002; -pub const LVS_EX_CHECKBOXES: ::DWORD = 0x00000004; -pub const LVS_EX_TRACKSELECT: ::DWORD = 0x00000008; -pub const LVS_EX_HEADERDRAGDROP: ::DWORD = 0x00000010; -pub const LVS_EX_FULLROWSELECT: ::DWORD = 0x00000020; -pub const LVS_EX_ONECLICKACTIVATE: ::DWORD = 0x00000040; -pub const LVS_EX_TWOCLICKACTIVATE: ::DWORD = 0x00000080; -pub const LVS_EX_FLATSB: ::DWORD = 0x00000100; -pub const LVS_EX_REGIONAL: ::DWORD = 0x00000200; -pub const LVS_EX_INFOTIP: ::DWORD = 0x00000400; -pub const LVS_EX_UNDERLINEHOT: ::DWORD = 0x00000800; -pub const LVS_EX_UNDERLINECOLD: ::DWORD = 0x00001000; -pub const LVS_EX_MULTIWORKAREAS: ::DWORD = 0x00002000; -pub const LVS_EX_LABELTIP: ::DWORD = 0x00004000; -pub const LVS_EX_BORDERSELECT: ::DWORD = 0x00008000; -pub const LVS_EX_DOUBLEBUFFER: ::DWORD = 0x00010000; -pub const LVS_EX_HIDELABELS: ::DWORD = 0x00020000; -pub const LVS_EX_SINGLEROW: ::DWORD = 0x00040000; -pub const LVS_EX_SNAPTOGRID: ::DWORD = 0x00080000; -pub const LVS_EX_SIMPLESELECT: ::DWORD = 0x00100000; -pub const LVS_EX_JUSTIFYCOLUMNS: ::DWORD = 0x00200000; -pub const LVS_EX_TRANSPARENTBKGND: ::DWORD = 0x00400000; -pub const LVS_EX_TRANSPARENTSHADOWTEXT: ::DWORD = 0x00800000; -pub const LVS_EX_AUTOAUTOARRANGE: ::DWORD = 0x01000000; -pub const LVS_EX_HEADERINALLVIEWS: ::DWORD = 0x02000000; -pub const LVS_EX_AUTOCHECKSELECT: ::DWORD = 0x08000000; -pub const LVS_EX_AUTOSIZECOLUMNS: ::DWORD = 0x10000000; -pub const LVS_EX_COLUMNSNAPPOINTS: ::DWORD = 0x40000000; -pub const LVS_EX_COLUMNOVERFLOW: ::DWORD = 0x80000000; -pub const LVM_GETSUBITEMRECT: ::UINT = LVM_FIRST + 56; -pub const LVM_SUBITEMHITTEST: ::UINT = LVM_FIRST + 57; -pub const LVM_SETCOLUMNORDERARRAY: ::UINT = LVM_FIRST + 58; -pub const LVM_GETCOLUMNORDERARRAY: ::UINT = LVM_FIRST + 59; -pub const LVM_SETHOTITEM: ::UINT = LVM_FIRST + 60; -pub const LVM_GETHOTITEM: ::UINT = LVM_FIRST + 61; -pub const LVM_SETHOTCURSOR: ::UINT = LVM_FIRST + 62; -pub const LVM_GETHOTCURSOR: ::UINT = LVM_FIRST + 63; -pub const LVM_APPROXIMATEVIEWRECT: ::UINT = LVM_FIRST + 64; -pub const LV_MAX_WORKAREAS: ::WPARAM = 16; -pub const LVM_SETWORKAREAS: ::UINT = LVM_FIRST + 65; -pub const LVM_GETWORKAREAS: ::UINT = LVM_FIRST + 70; -pub const LVM_GETNUMBEROFWORKAREAS: ::UINT = LVM_FIRST + 73; -pub const LVM_GETSELECTIONMARK: ::UINT = LVM_FIRST + 66; -pub const LVM_SETSELECTIONMARK: ::UINT = LVM_FIRST + 67; -pub const LVM_SETHOVERTIME: ::UINT = LVM_FIRST + 71; -pub const LVM_GETHOVERTIME: ::UINT = LVM_FIRST + 72; -pub const LVM_SETTOOLTIPS: ::UINT = LVM_FIRST + 74; -pub const LVM_GETTOOLTIPS: ::UINT = LVM_FIRST + 78; -pub const LVM_SORTITEMSEX: ::UINT = LVM_FIRST + 81; -STRUCT!{struct LVBKIMAGEA { - ulFlags: ::ULONG, - hbm: ::HBITMAP, - pszImage: ::LPSTR, - cchImageMax: ::UINT, - xOffsetPercent: ::c_int, - yOffsetPercent: ::c_int, -}} -pub type LPLVBKIMAGEA = *mut LVBKIMAGEA; -STRUCT!{struct LVBKIMAGEW { - ulFlags: ::ULONG, - hbm: ::HBITMAP, - pszImage: ::LPWSTR, - cchImageMax: ::UINT, - xOffsetPercent: ::c_int, - yOffsetPercent: ::c_int, -}} -pub type LPLVBKIMAGEW = *mut LVBKIMAGEW; -pub const LVBKIF_SOURCE_NONE: ::ULONG = 0x00000000; -pub const LVBKIF_SOURCE_HBITMAP: ::ULONG = 0x00000001; -pub const LVBKIF_SOURCE_URL: ::ULONG = 0x00000002; -pub const LVBKIF_SOURCE_MASK: ::ULONG = 0x00000003; -pub const LVBKIF_STYLE_NORMAL: ::ULONG = 0x00000000; -pub const LVBKIF_STYLE_TILE: ::ULONG = 0x00000010; -pub const LVBKIF_STYLE_MASK: ::ULONG = 0x00000010; -pub const LVBKIF_FLAG_TILEOFFSET: ::ULONG = 0x00000100; -pub const LVBKIF_TYPE_WATERMARK: ::ULONG = 0x10000000; -pub const LVBKIF_FLAG_ALPHABLEND: ::ULONG = 0x20000000; -pub const LVM_SETBKIMAGEA: ::UINT = LVM_FIRST + 68; -pub const LVM_SETBKIMAGEW: ::UINT = LVM_FIRST + 138; -pub const LVM_GETBKIMAGEA: ::UINT = LVM_FIRST + 69; -pub const LVM_GETBKIMAGEW: ::UINT = LVM_FIRST + 139; -pub const LVM_SETSELECTEDCOLUMN: ::UINT = LVM_FIRST + 140; -pub const LV_VIEW_ICON: ::DWORD = 0x0000; -pub const LV_VIEW_DETAILS: ::DWORD = 0x0001; -pub const LV_VIEW_SMALLICON: ::DWORD = 0x0002; -pub const LV_VIEW_LIST: ::DWORD = 0x0003; -pub const LV_VIEW_TILE: ::DWORD = 0x0004; -pub const LV_VIEW_MAX: ::DWORD = 0x0004; -pub const LVM_SETVIEW: ::UINT = LVM_FIRST + 142; -pub const LVM_GETVIEW: ::UINT = LVM_FIRST + 143; -pub const LVGF_NONE: ::UINT = 0x00000000; -pub const LVGF_HEADER: ::UINT = 0x00000001; -pub const LVGF_FOOTER: ::UINT = 0x00000002; -pub const LVGF_STATE: ::UINT = 0x00000004; -pub const LVGF_ALIGN: ::UINT = 0x00000008; -pub const LVGF_GROUPID: ::UINT = 0x00000010; -pub const LVGF_SUBTITLE: ::UINT = 0x00000100; -pub const LVGF_TASK: ::UINT = 0x00000200; -pub const LVGF_DESCRIPTIONTOP: ::UINT = 0x00000400; -pub const LVGF_DESCRIPTIONBOTTOM: ::UINT = 0x00000800; -pub const LVGF_TITLEIMAGE: ::UINT = 0x00001000; -pub const LVGF_EXTENDEDIMAGE: ::UINT = 0x00002000; -pub const LVGF_ITEMS: ::UINT = 0x00004000; -pub const LVGF_SUBSET: ::UINT = 0x00008000; -pub const LVGF_SUBSETITEMS: ::UINT = 0x00010000; -pub const LVGS_NORMAL: ::UINT = 0x00000000; -pub const LVGS_COLLAPSED: ::UINT = 0x00000001; -pub const LVGS_HIDDEN: ::UINT = 0x00000002; -pub const LVGS_NOHEADER: ::UINT = 0x00000004; -pub const LVGS_COLLAPSIBLE: ::UINT = 0x00000008; -pub const LVGS_FOCUSED: ::UINT = 0x00000010; -pub const LVGS_SELECTED: ::UINT = 0x00000020; -pub const LVGS_SUBSETED: ::UINT = 0x00000040; -pub const LVGS_SUBSETLINKFOCUSED: ::UINT = 0x00000080; -pub const LVGA_HEADER_LEFT: ::UINT = 0x00000001; -pub const LVGA_HEADER_CENTER: ::UINT = 0x00000002; -pub const LVGA_HEADER_RIGHT: ::UINT = 0x00000004; -pub const LVGA_FOOTER_LEFT: ::UINT = 0x00000008; -pub const LVGA_FOOTER_CENTER: ::UINT = 0x00000010; -pub const LVGA_FOOTER_RIGHT: ::UINT = 0x00000020; -STRUCT!{struct LVGROUP { - cbSize: ::UINT, - mask: ::UINT, - pszHeader: ::LPWSTR, - cchHeader: ::c_int, - pszFooter: ::LPWSTR, - cchFooter: ::c_int, - iGroupId: ::c_int, - stateMask: ::UINT, - state: ::UINT, - uAlign: ::UINT, - pszSubtitle: ::LPWSTR, - cchSubtitle: ::UINT, - pszTask: ::LPWSTR, - cchTask: ::UINT, - pszDescriptionTop: ::LPWSTR, - cchDescriptionTop: ::UINT, - pszDescriptionBottom: ::LPWSTR, - cchDescriptionBottom: ::UINT, - iTitleImage: ::c_int, - iExtendedImage: ::c_int, - iFirstItem: ::c_int, - cItems: ::UINT, - pszSubsetTitle: ::LPWSTR, - cchSubsetTitle: ::UINT, -}} -pub type PLVGROUP = *mut LVGROUP; -pub const LVM_INSERTGROUP: ::UINT = LVM_FIRST + 145; -pub const LVM_SETGROUPINFO: ::UINT = LVM_FIRST + 147; -pub const LVM_GETGROUPINFO: ::UINT = LVM_FIRST + 149; -pub const LVM_REMOVEGROUP: ::UINT = LVM_FIRST + 150; -pub const LVM_MOVEGROUP: ::UINT = LVM_FIRST + 151; -pub const LVM_GETGROUPCOUNT: ::UINT = LVM_FIRST + 152; -pub const LVM_GETGROUPINFOBYINDEX: ::UINT = LVM_FIRST + 153; -pub const LVM_MOVEITEMTOGROUP: ::UINT = LVM_FIRST + 154; -pub const LVM_GETGROUPRECT: ::UINT = LVM_FIRST + 98; -pub const LVGGR_GROUP: ::LPARAM = 0; -pub const LVGGR_HEADER: ::LPARAM = 1; -pub const LVGGR_LABEL: ::LPARAM = 2; -pub const LVGGR_SUBSETLINK: ::LPARAM = 3; -pub const LVGMF_NONE: ::UINT = 0x00000000; -pub const LVGMF_BORDERSIZE: ::UINT = 0x00000001; -pub const LVGMF_BORDERCOLOR: ::UINT = 0x00000002; -pub const LVGMF_TEXTCOLOR: ::UINT = 0x00000004; -STRUCT!{struct LVGROUPMETRICS { - cbSize: ::UINT, - mask: ::UINT, - Left: ::UINT, - Top: ::UINT, - Right: ::UINT, - Bottom: ::UINT, - crLeft: ::COLORREF, - crTop: ::COLORREF, - crRight: ::COLORREF, - crBottom: ::COLORREF, - crHeader: ::COLORREF, - crFooter: ::COLORREF, -}} -pub type PLVGROUPMETRICS = *mut LVGROUPMETRICS; -pub const LVM_SETGROUPMETRICS: ::UINT = LVM_FIRST + 155; -pub const LVM_GETGROUPMETRICS: ::UINT = LVM_FIRST + 156; -pub const LVM_ENABLEGROUPVIEW: ::UINT = LVM_FIRST + 157; -pub const LVM_SORTGROUPS: ::UINT = LVM_FIRST + 158; -pub type PFNLVGROUPCOMPARE = Option<unsafe extern "system" fn( - ::c_int, ::c_int, *mut ::c_void, -) -> ::c_int>; -#[repr(C)] #[derive(Copy)] -pub struct LVINSERTGROUPSORTED { - pub pfnGroupCompare: PFNLVGROUPCOMPARE, - pub pvData: *mut ::c_void, - pub lvGroup: LVGROUP, -} -impl Clone for LVINSERTGROUPSORTED { fn clone(&self) -> LVINSERTGROUPSORTED { *self } } -pub type PLVINSERTGROUPSORTED = *mut LVINSERTGROUPSORTED; -pub const LVM_INSERTGROUPSORTED: ::UINT = LVM_FIRST + 159; -pub const LVM_REMOVEALLGROUPS: ::UINT = LVM_FIRST + 160; -pub const LVM_HASGROUP: ::UINT = LVM_FIRST + 161; -pub const LVM_GETGROUPSTATE: ::UINT = LVM_FIRST + 92; -pub const LVM_GETFOCUSEDGROUP: ::UINT = LVM_FIRST + 93; -pub const LVTVIF_AUTOSIZE: ::DWORD = 0x00000000; -pub const LVTVIF_FIXEDWIDTH: ::DWORD = 0x00000001; -pub const LVTVIF_FIXEDHEIGHT: ::DWORD = 0x00000002; -pub const LVTVIF_FIXEDSIZE: ::DWORD = 0x00000003; -pub const LVTVIF_EXTENDED: ::DWORD = 0x00000004; -pub const LVTVIM_TILESIZE: ::DWORD = 0x00000001; -pub const LVTVIM_COLUMNS: ::DWORD = 0x00000002; -pub const LVTVIM_LABELMARGIN: ::DWORD = 0x00000004; -STRUCT!{struct LVTILEVIEWINFO { - cbSize: ::UINT, - dwMask: ::DWORD, - dwFlags: ::DWORD, - sizeTile: ::SIZE, - cLines: ::c_int, - rcLabelMargin: ::RECT, -}} -pub type PLVTILEVIEWINFO = *mut LVTILEVIEWINFO; -STRUCT!{struct LVTILEINFO { - cbSize: ::UINT, - iItem: ::c_int, - cColumns: ::UINT, - puColumns: ::PUINT, - piColFmt: *mut ::c_int, -}} -pub type PLVTILEINFO = *mut LVTILEINFO; -pub const LVM_SETTILEVIEWINFO: ::UINT = LVM_FIRST + 162; -pub const LVM_GETTILEVIEWINFO: ::UINT = LVM_FIRST + 163; -pub const LVM_SETTILEINFO: ::UINT = LVM_FIRST + 164; -pub const LVM_GETTILEINFO: ::UINT = LVM_FIRST + 165; -STRUCT!{struct LVINSERTMARK { - cbSize: ::UINT, - dwFlags: ::DWORD, - iItem: ::c_int, - dwReserved: ::DWORD, -}} -pub type LPLVINSERTMARK = *mut LVINSERTMARK; -pub const LVIM_AFTER: ::DWORD = 0x00000001; -pub const LVM_SETINSERTMARK: ::UINT = LVM_FIRST + 166; -pub const LVM_GETINSERTMARK: ::UINT = LVM_FIRST + 167; -pub const LVM_INSERTMARKHITTEST: ::UINT = LVM_FIRST + 168; -pub const LVM_GETINSERTMARKRECT: ::UINT = LVM_FIRST + 169; -pub const LVM_SETINSERTMARKCOLOR: ::UINT = LVM_FIRST + 170; -pub const LVM_GETINSERTMARKCOLOR: ::UINT = LVM_FIRST + 171; -STRUCT!{struct LVSETINFOTIP { - cbSize: ::UINT, - dwFlags: ::DWORD, - pszText: ::LPWSTR, - iItem: ::c_int, - iSubItem: ::c_int, -}} -pub type PLVSETINFOTIP = *mut LVSETINFOTIP; -pub const LVM_SETINFOTIP: ::UINT = LVM_FIRST + 173; -pub const LVM_GETSELECTEDCOLUMN: ::UINT = LVM_FIRST + 174; -pub const LVM_ISGROUPVIEWENABLED: ::UINT = LVM_FIRST + 175; -pub const LVM_GETOUTLINECOLOR: ::UINT = LVM_FIRST + 176; -pub const LVM_SETOUTLINECOLOR: ::UINT = LVM_FIRST + 177; -pub const LVM_CANCELEDITLABEL: ::UINT = LVM_FIRST + 179; -pub const LVM_MAPINDEXTOID: ::UINT = LVM_FIRST + 180; -pub const LVM_MAPIDTOINDEX: ::UINT = LVM_FIRST + 181; -pub const LVM_ISITEMVISIBLE: ::UINT = LVM_FIRST + 182; -pub const LVM_GETEMPTYTEXT: ::UINT = LVM_FIRST + 204; -pub const LVM_GETFOOTERRECT: ::UINT = LVM_FIRST + 205; -pub const LVFF_ITEMCOUNT: ::UINT = 0x00000001; -STRUCT!{struct LVFOOTERINFO { - mask: ::UINT, - pszText: ::LPWSTR, - cchTextMax: ::c_int, - cItems: ::UINT, -}} -pub type LPLVFOOTERINFO = *mut LVFOOTERINFO; -pub const LVM_GETFOOTERINFO: ::UINT = LVM_FIRST + 206; -pub const LVM_GETFOOTERITEMRECT: ::UINT = LVM_FIRST + 207; -pub const LVFIF_TEXT: ::UINT = 0x00000001; -pub const LVFIF_STATE: ::UINT = 0x00000002; -pub const LVFIS_FOCUSED: ::UINT = 0x0001; -STRUCT!{struct LVFOOTERITEM { - mask: ::UINT, - iItem: ::c_int, - pszText: ::LPWSTR, - cchTextMax: ::c_int, - state: ::UINT, - stateMask: ::UINT, -}} -pub type LPLVFOOTERITEM = *mut LVFOOTERITEM; -pub const LVM_GETFOOTERITEM: ::UINT = LVM_FIRST + 208; -STRUCT!{struct LVITEMINDEX { - iItem: ::c_int, - iGroup: ::c_int, -}} -pub type PLVITEMINDEX = *mut LVITEMINDEX; -pub const LVM_GETITEMINDEXRECT: ::UINT = LVM_FIRST + 209; -pub const LVM_SETITEMINDEXSTATE: ::UINT = LVM_FIRST + 210; -pub const LVM_GETNEXTITEMINDEX: ::UINT = LVM_FIRST + 211; -pub type LPNM_LISTVIEW = LPNMLISTVIEW; -pub type NM_LISTVIEW = NMLISTVIEW; -STRUCT!{struct NMLISTVIEW { - hdr: ::NMHDR, - iItem: ::c_int, - iSubItem: ::c_int, - uNewState: ::UINT, - uOldState: ::UINT, - uChanged: ::UINT, - ptAction: ::POINT, - lParam: ::LPARAM, -}} -pub type LPNMLISTVIEW = *mut NMLISTVIEW; -STRUCT!{struct NMITEMACTIVATE { - hdr: ::NMHDR, - iItem: ::c_int, - iSubItem: ::c_int, - uNewState: ::UINT, - uOldState: ::UINT, - uChanged: ::UINT, - ptAction: ::POINT, - lParam: ::LPARAM, - uKeyFlags: ::UINT, -}} -pub type LPNMITEMACTIVATE = *mut NMITEMACTIVATE; -pub const LVKF_ALT: ::UINT = 0x0001; -pub const LVKF_CONTROL: ::UINT = 0x0002; -pub const LVKF_SHIFT: ::UINT = 0x0004; -STRUCT!{struct NMLVCUSTOMDRAW { - nmcd: NMCUSTOMDRAW, - clrText: ::COLORREF, - clrTextBk: ::COLORREF, - iSubItem: ::c_int, - dwItemType: ::DWORD, - clrFace: ::COLORREF, - iIconEffect: ::c_int, - iIconPhase: ::c_int, - iPartId: ::c_int, - iStateId: ::c_int, - rcText: ::RECT, - uAlign: ::UINT, -}} -pub type LPNMLVCUSTOMDRAW = *mut NMLVCUSTOMDRAW; -pub const LVCDI_ITEM: ::DWORD = 0x00000000; -pub const LVCDI_GROUP: ::DWORD = 0x00000001; -pub const LVCDI_ITEMSLIST: ::DWORD = 0x00000002; -pub const LVCDRF_NOSELECT: ::LRESULT = 0x00010000; -pub const LVCDRF_NOGROUPFRAME: ::LRESULT = 0x00020000; -STRUCT!{struct NMLVCACHEHINT { - hdr: ::NMHDR, - iFrom: ::c_int, - iTo: ::c_int, -}} -pub type LPNMLVCACHEHINT = *mut NMLVCACHEHINT; -pub type LPNM_CACHEHINT = LPNMLVCACHEHINT; -pub type PNM_CACHEHINT = LPNMLVCACHEHINT; -pub type NM_CACHEHINT = NMLVCACHEHINT; -STRUCT!{struct NMLVFINDITEMA { - hdr: ::NMHDR, - iStart: ::c_int, - lvfi: LVFINDINFOA, -}} -pub type LPNMLVFINDITEMA = *mut NMLVFINDITEMA; -STRUCT!{struct NMLVFINDITEMW { - hdr: ::NMHDR, - iStart: ::c_int, - lvfi: LVFINDINFOW, -}} -pub type LPNMLVFINDITEMW = *mut NMLVFINDITEMW; -pub type PNM_FINDITEMA = LPNMLVFINDITEMA; -pub type LPNM_FINDITEMA = LPNMLVFINDITEMA; -pub type NM_FINDITEMA = NMLVFINDITEMA; -pub type PNM_FINDITEMW = LPNMLVFINDITEMW; -pub type LPNM_FINDITEMW = LPNMLVFINDITEMW; -pub type NM_FINDITEMW = NMLVFINDITEMW; -STRUCT!{struct NMLVODSTATECHANGE { - hdr: ::NMHDR, - iFrom: ::c_int, - iTo: ::c_int, - uNewState: ::UINT, - uOldState: ::UINT, -}} -pub type LPNMLVODSTATECHANGE = *mut NMLVODSTATECHANGE; -pub type PNM_ODSTATECHANGE = LPNMLVODSTATECHANGE; -pub type LPNM_ODSTATECHANGE = LPNMLVODSTATECHANGE; -pub type NM_ODSTATECHANGE = NMLVODSTATECHANGE; -pub const LVN_ITEMCHANGING: ::UINT = LVN_FIRST - 0; -pub const LVN_ITEMCHANGED: ::UINT = LVN_FIRST - 1; -pub const LVN_INSERTITEM: ::UINT = LVN_FIRST - 2; -pub const LVN_DELETEITEM: ::UINT = LVN_FIRST - 3; -pub const LVN_DELETEALLITEMS: ::UINT = LVN_FIRST - 4; -pub const LVN_BEGINLABELEDITA: ::UINT = LVN_FIRST - 5; -pub const LVN_BEGINLABELEDITW: ::UINT = LVN_FIRST - 75; -pub const LVN_ENDLABELEDITA: ::UINT = LVN_FIRST - 6; -pub const LVN_ENDLABELEDITW: ::UINT = LVN_FIRST - 76; -pub const LVN_COLUMNCLICK: ::UINT = LVN_FIRST - 8; -pub const LVN_BEGINDRAG: ::UINT = LVN_FIRST - 9; -pub const LVN_BEGINRDRAG: ::UINT = LVN_FIRST - 11; -pub const LVN_ODCACHEHINT: ::UINT = LVN_FIRST - 13; -pub const LVN_ODFINDITEMA: ::UINT = LVN_FIRST - 52; -pub const LVN_ODFINDITEMW: ::UINT = LVN_FIRST - 79; -pub const LVN_ITEMACTIVATE: ::UINT = LVN_FIRST - 14; -pub const LVN_ODSTATECHANGED: ::UINT = LVN_FIRST - 15; -pub const LVN_HOTTRACK: ::UINT = LVN_FIRST - 21; -pub const LVN_GETDISPINFOA: ::UINT = LVN_FIRST - 50; -pub const LVN_GETDISPINFOW: ::UINT = LVN_FIRST - 77; -pub const LVN_SETDISPINFOA: ::UINT = LVN_FIRST - 51; -pub const LVN_SETDISPINFOW: ::UINT = LVN_FIRST - 78; -pub const LVIF_DI_SETITEM: ::UINT = 0x1000; -pub type LV_DISPINFOA = NMLVDISPINFOA; -pub type LV_DISPINFOW = NMLVDISPINFOW; -STRUCT!{struct NMLVDISPINFOA { - hdr: ::NMHDR, - item: LVITEMA, -}} -pub type LPNMLVDISPINFOA = *mut NMLVDISPINFOA; -STRUCT!{struct NMLVDISPINFOW { - hdr: ::NMHDR, - item: LVITEMW, -}} -pub type LPNMLVDISPINFOW = *mut NMLVDISPINFOW; -pub const LVN_KEYDOWN: ::UINT = LVN_FIRST - 55; -pub type LV_KEYDOWN = NMLVKEYDOWN; -STRUCT!{struct NMLVKEYDOWN { - hdr: ::NMHDR, - wVKey: ::WORD, - flags: ::UINT, -}} -pub type LPNMLVKEYDOWN = *mut NMLVKEYDOWN; -pub const LVN_MARQUEEBEGIN: ::UINT = LVN_FIRST - 56; -#[repr(C)] #[derive(Clone, Copy)] -pub struct NMLVLINK { - pub hdr: ::NMHDR, - pub link: LITEM, - pub iItem: ::c_int, - pub iSubItem: ::c_int, -} -pub type PNMLVLINK = *mut NMLVLINK; -STRUCT!{struct NMLVGETINFOTIPA { - hdr: ::NMHDR, - dwFlags: ::DWORD, - pszText: ::LPSTR, - cchTextMax: ::c_int, - iItem: ::c_int, - iSubItem: ::c_int, - lParam: ::LPARAM, -}} -pub type LPNMLVGETINFOTIPA = *mut NMLVGETINFOTIPA; -STRUCT!{struct NMLVGETINFOTIPW { - hdr: ::NMHDR, - dwFlags: ::DWORD, - pszText: ::LPWSTR, - cchTextMax: ::c_int, - iItem: ::c_int, - iSubItem: ::c_int, - lParam: ::LPARAM, -}} -pub type LPNMLVGETINFOTIPW = *mut NMLVGETINFOTIPW; -pub const LVGIT_UNFOLDED: ::DWORD = 0x0001; -pub const LVN_GETINFOTIPA: ::UINT = LVN_FIRST - 57; -pub const LVN_GETINFOTIPW: ::UINT = LVN_FIRST - 58; -pub const LVNSCH_DEFAULT: ::LPARAM = -1; -pub const LVNSCH_ERROR: ::LPARAM = -2; -pub const LVNSCH_IGNORE: ::LPARAM = -3; -pub const LVN_INCREMENTALSEARCHA: ::UINT = LVN_FIRST - 62; -pub const LVN_INCREMENTALSEARCHW: ::UINT = LVN_FIRST - 63; -pub const LVN_COLUMNDROPDOWN: ::UINT = LVN_FIRST - 64; -pub const LVN_COLUMNOVERFLOWCLICK: ::UINT = LVN_FIRST - 66; -STRUCT!{struct NMLVSCROLL { - hdr: ::NMHDR, - dx: ::c_int, - dy: ::c_int, -}} -pub type LPNMLVSCROLL = *mut NMLVSCROLL; -pub const LVN_BEGINSCROLL: ::UINT = LVN_FIRST - 80; -pub const LVN_ENDSCROLL: ::UINT = LVN_FIRST - 81; -pub const LVN_LINKCLICK: ::UINT = LVN_FIRST - 84; -pub const EMF_CENTERED: ::DWORD = 0x00000001; -#[repr(C)] #[derive(Copy)] -pub struct NMLVEMPTYMARKUP { - pub hdr: ::NMHDR, - pub dwFlags: ::DWORD, - pub szMarkup: [::WCHAR; L_MAX_URL_LENGTH], -} -impl Clone for NMLVEMPTYMARKUP { fn clone(&self) -> NMLVEMPTYMARKUP { *self } } -pub const LVN_GETEMPTYMARKUP: ::UINT = LVN_FIRST - 87; -pub const TVS_HASBUTTONS: ::DWORD = 0x0001; -pub const TVS_HASLINES: ::DWORD = 0x0002; -pub const TVS_LINESATROOT: ::DWORD = 0x0004; -pub const TVS_EDITLABELS: ::DWORD = 0x0008; -pub const TVS_DISABLEDRAGDROP: ::DWORD = 0x0010; -pub const TVS_SHOWSELALWAYS: ::DWORD = 0x0020; -pub const TVS_RTLREADING: ::DWORD = 0x0040; -pub const TVS_NOTOOLTIPS: ::DWORD = 0x0080; -pub const TVS_CHECKBOXES: ::DWORD = 0x0100; -pub const TVS_TRACKSELECT: ::DWORD = 0x0200; -pub const TVS_SINGLEEXPAND: ::DWORD = 0x0400; -pub const TVS_INFOTIP: ::DWORD = 0x0800; -pub const TVS_FULLROWSELECT: ::DWORD = 0x1000; -pub const TVS_NOSCROLL: ::DWORD = 0x2000; -pub const TVS_NONEVENHEIGHT: ::DWORD = 0x4000; -pub const TVS_NOHSCROLL: ::DWORD = 0x8000; -pub const TVS_EX_NOSINGLECOLLAPSE: ::DWORD = 0x0001; -pub const TVS_EX_MULTISELECT: ::DWORD = 0x0002; -pub const TVS_EX_DOUBLEBUFFER: ::DWORD = 0x0004; -pub const TVS_EX_NOINDENTSTATE: ::DWORD = 0x0008; -pub const TVS_EX_RICHTOOLTIP: ::DWORD = 0x0010; -pub const TVS_EX_AUTOHSCROLL: ::DWORD = 0x0020; -pub const TVS_EX_FADEINOUTEXPANDOS: ::DWORD = 0x0040; -pub const TVS_EX_PARTIALCHECKBOXES: ::DWORD = 0x0080; -pub const TVS_EX_EXCLUSIONCHECKBOXES: ::DWORD = 0x0100; -pub const TVS_EX_DIMMEDCHECKBOXES: ::DWORD = 0x0200; -pub const TVS_EX_DRAWIMAGEASYNC: ::DWORD = 0x0400; -#[repr(C)] #[allow(missing_copy_implementations)] -pub struct TREEITEM { - unused: ::c_void, -} -pub type HTREEITEM = *mut TREEITEM; -pub const TVIF_TEXT: ::UINT = 0x0001; -pub const TVIF_IMAGE: ::UINT = 0x0002; -pub const TVIF_PARAM: ::UINT = 0x0004; -pub const TVIF_STATE: ::UINT = 0x0008; -pub const TVIF_HANDLE: ::UINT = 0x0010; -pub const TVIF_SELECTEDIMAGE: ::UINT = 0x0020; -pub const TVIF_CHILDREN: ::UINT = 0x0040; -pub const TVIF_INTEGRAL: ::UINT = 0x0080; -pub const TVIF_STATEEX: ::UINT = 0x0100; -pub const TVIF_EXPANDEDIMAGE: ::UINT = 0x0200; -pub const TVIS_SELECTED: ::UINT = 0x0002; -pub const TVIS_CUT: ::UINT = 0x0004; -pub const TVIS_DROPHILITED: ::UINT = 0x0008; -pub const TVIS_BOLD: ::UINT = 0x0010; -pub const TVIS_EXPANDED: ::UINT = 0x0020; -pub const TVIS_EXPANDEDONCE: ::UINT = 0x0040; -pub const TVIS_EXPANDPARTIAL: ::UINT = 0x0080; -pub const TVIS_OVERLAYMASK: ::UINT = 0x0F00; -pub const TVIS_STATEIMAGEMASK: ::UINT = 0xF000; -pub const TVIS_USERMASK: ::UINT = 0xF000; -pub const TVIS_EX_FLAT: ::UINT = 0x0001; -pub const TVIS_EX_DISABLED: ::UINT = 0x0002; -pub const TVIS_EX_ALL: ::UINT = 0x0002; -STRUCT!{struct NMTVSTATEIMAGECHANGING { - hdr: ::NMHDR, - hti: HTREEITEM, - iOldStateImageIndex: ::c_int, - iNewStateImageIndex: ::c_int, -}} -pub type LPNMTVSTATEIMAGECHANGING = *mut NMTVSTATEIMAGECHANGING; -pub const I_CHILDRENCALLBACK: ::c_int = -1; -pub const I_CHILDRENAUTO: ::c_int = -2; -pub type LPTV_ITEMW = LPTVITEMW; -pub type LPTV_ITEMA = LPTVITEMA; -pub type TV_ITEMW = TVITEMW; -pub type TV_ITEMA = TVITEMA; -STRUCT!{struct TVITEMA { - mask: ::UINT, - hItem: HTREEITEM, - state: ::UINT, - stateMask: ::UINT, - pszText: ::LPSTR, - cchTextMax: ::c_int, - iImage: ::c_int, - iSelectedImage: ::c_int, - cChildren: ::c_int, - lParam: ::LPARAM, -}} -pub type LPTVITEMA = *mut TVITEMA; -STRUCT!{struct TVITEMW { - mask: ::UINT, - hItem: HTREEITEM, - state: ::UINT, - stateMask: ::UINT, - pszText: ::LPWSTR, - cchTextMax: ::c_int, - iImage: ::c_int, - iSelectedImage: ::c_int, - cChildren: ::c_int, - lParam: ::LPARAM, -}} -pub type LPTVITEMW = *mut TVITEMW; -STRUCT!{struct TVITEMEXA { - mask: ::UINT, - hItem: HTREEITEM, - state: ::UINT, - stateMask: ::UINT, - pszText: ::LPSTR, - cchTextMax: ::c_int, - iImage: ::c_int, - iSelectedImage: ::c_int, - cChildren: ::c_int, - lParam: ::LPARAM, - iIntegral: ::c_int, - uStateEx: ::UINT, - hwnd: ::HWND, - iExpandedImage: ::c_int, - iReserved: ::c_int, -}} -pub type LPTVITEMEXA = *mut TVITEMEXA; -STRUCT!{struct TVITEMEXW { - mask: ::UINT, - hItem: HTREEITEM, - state: ::UINT, - stateMask: ::UINT, - pszText: ::LPWSTR, - cchTextMax: ::c_int, - iImage: ::c_int, - iSelectedImage: ::c_int, - cChildren: ::c_int, - lParam: ::LPARAM, - iIntegral: ::c_int, - uStateEx: ::UINT, - hwnd: ::HWND, - iExpandedImage: ::c_int, - iReserved: ::c_int, -}} -pub type LPTVITEMEXW = *mut TVITEMEXW; -pub const TVI_ROOT: HTREEITEM = (0 - 0x10000) as HTREEITEM; -pub const TVI_FIRST: HTREEITEM = (0 - 0x0FFFF) as HTREEITEM; -pub const TVI_LAST: HTREEITEM = (0 - 0x0FFFE) as HTREEITEM; -pub const TVI_SORT: HTREEITEM = (0 - 0x0FFFD) as HTREEITEM; -pub type LPTV_INSERTSTRUCTA = LPTVINSERTSTRUCTA; -pub type LPTV_INSERTSTRUCTW = LPTVINSERTSTRUCTW; -pub type TV_INSERTSTRUCTA = TVINSERTSTRUCTA; -pub type TV_INSERTSTRUCTW = TVINSERTSTRUCTW; -STRUCT!{struct TVINSERTSTRUCTA { - hParent: HTREEITEM, - hInsertAfter: HTREEITEM, - itemex: TVITEMEXA, -}} -UNION!(TVINSERTSTRUCTA, itemex, item, item_mut, TV_ITEMA); -pub type LPTVINSERTSTRUCTA = *mut TVINSERTSTRUCTA; -STRUCT!{struct TVINSERTSTRUCTW { - hParent: HTREEITEM, - hInsertAfter: HTREEITEM, - itemex: TVITEMEXW, -}} -UNION!(TVINSERTSTRUCTA, itemex, item, item_mut, TV_ITEMW); -pub type LPTVINSERTSTRUCTW = *mut TVINSERTSTRUCTW; -pub const TVM_INSERTITEMA: ::UINT = TV_FIRST + 0; -pub const TVM_INSERTITEMW: ::UINT = TV_FIRST + 50; -pub const TVM_DELETEITEM: ::UINT = TV_FIRST + 1; -pub const TVM_EXPAND: ::UINT = TV_FIRST + 2; -pub const TVM_GETITEMRECT: ::UINT = TV_FIRST + 4; -pub const TVE_COLLAPSE: ::WPARAM = 0x0001; -pub const TVE_EXPAND: ::WPARAM = 0x0002; -pub const TVE_TOGGLE: ::WPARAM = 0x0003; -pub const TVE_EXPANDPARTIAL: ::WPARAM = 0x4000; -pub const TVE_COLLAPSERESET: ::WPARAM = 0x8000; -pub const TVM_GETCOUNT: ::UINT = TV_FIRST + 5; -pub const TVM_GETINDENT: ::UINT = TV_FIRST + 6; -pub const TVM_SETINDENT: ::UINT = TV_FIRST + 7; -pub const TVM_GETIMAGELIST: ::UINT = TV_FIRST + 8; -pub const TVM_SETIMAGELIST: ::UINT = TV_FIRST + 9; -pub const TVM_GETNEXTITEM: ::UINT = TV_FIRST + 10; -pub const TVSIL_NORMAL: ::WPARAM = 0; -pub const TVSIL_STATE: ::WPARAM = 2; -pub const TVGN_ROOT: ::WPARAM = 0x0000; -pub const TVGN_NEXT: ::WPARAM = 0x0001; -pub const TVGN_PREVIOUS: ::WPARAM = 0x0002; -pub const TVGN_PARENT: ::WPARAM = 0x0003; -pub const TVGN_CHILD: ::WPARAM = 0x0004; -pub const TVGN_FIRSTVISIBLE: ::WPARAM = 0x0005; -pub const TVGN_NEXTVISIBLE: ::WPARAM = 0x0006; -pub const TVGN_PREVIOUSVISIBLE: ::WPARAM = 0x0007; -pub const TVGN_DROPHILITE: ::WPARAM = 0x0008; -pub const TVGN_CARET: ::WPARAM = 0x0009; -pub const TVGN_LASTVISIBLE: ::WPARAM = 0x000A; -pub const TVGN_NEXTSELECTED: ::WPARAM = 0x000B; -pub const TVSI_NOSINGLEEXPAND: ::WPARAM = 0x8000; -pub const TVM_SELECTITEM: ::UINT = TV_FIRST + 11; -pub const TVM_GETITEMA: ::UINT = TV_FIRST + 12; -pub const TVM_GETITEMW: ::UINT = TV_FIRST + 62; -pub const TVM_SETITEMA: ::UINT = TV_FIRST + 13; -pub const TVM_SETITEMW: ::UINT = TV_FIRST + 63; -pub const TVM_EDITLABELA: ::UINT = TV_FIRST + 14; -pub const TVM_EDITLABELW: ::UINT = TV_FIRST + 65; -pub const TVM_GETEDITCONTROL: ::UINT = TV_FIRST + 15; -pub const TVM_GETVISIBLECOUNT: ::UINT = TV_FIRST + 16; -pub const TVM_HITTEST: ::UINT = TV_FIRST + 17; -pub type LPTV_HITTESTINFO = LPTVHITTESTINFO; -pub type TV_HITTESTINFO = TVHITTESTINFO; -STRUCT!{struct TVHITTESTINFO { - pt: ::POINT, - flags: ::UINT, - hItem: HTREEITEM, -}} -pub type LPTVHITTESTINFO = *mut TVHITTESTINFO; -pub const TVHT_NOWHERE: ::UINT = 0x0001; -pub const TVHT_ONITEMICON: ::UINT = 0x0002; -pub const TVHT_ONITEMLABEL: ::UINT = 0x0004; -pub const TVHT_ONITEM: ::UINT = TVHT_ONITEMICON | TVHT_ONITEMLABEL | TVHT_ONITEMSTATEICON; -pub const TVHT_ONITEMINDENT: ::UINT = 0x0008; -pub const TVHT_ONITEMBUTTON: ::UINT = 0x0010; -pub const TVHT_ONITEMRIGHT: ::UINT = 0x0020; -pub const TVHT_ONITEMSTATEICON: ::UINT = 0x0040; -pub const TVHT_ABOVE: ::UINT = 0x0100; -pub const TVHT_BELOW: ::UINT = 0x0200; -pub const TVHT_TORIGHT: ::UINT = 0x0400; -pub const TVHT_TOLEFT: ::UINT = 0x0800; -pub const TVM_CREATEDRAGIMAGE: ::UINT = TV_FIRST + 18; -pub const TVM_SORTCHILDREN: ::UINT = TV_FIRST + 19; -pub const TVM_ENSUREVISIBLE: ::UINT = TV_FIRST + 20; -pub const TVM_SORTCHILDRENCB: ::UINT = TV_FIRST + 21; -pub const TVM_ENDEDITLABELNOW: ::UINT = TV_FIRST + 22; -pub const TVM_GETISEARCHSTRINGA: ::UINT = TV_FIRST + 23; -pub const TVM_GETISEARCHSTRINGW: ::UINT = TV_FIRST + 64; -pub const TVM_SETTOOLTIPS: ::UINT = TV_FIRST + 24; -pub const TVM_GETTOOLTIPS: ::UINT = TV_FIRST + 25; -pub const TVM_SETINSERTMARK: ::UINT = TV_FIRST + 26; -pub const TVM_SETUNICODEFORMAT: ::UINT = CCM_SETUNICODEFORMAT; -pub const TVM_GETUNICODEFORMAT: ::UINT = CCM_GETUNICODEFORMAT; -pub const TVM_SETITEMHEIGHT: ::UINT = TV_FIRST + 27; -pub const TVM_GETITEMHEIGHT: ::UINT = TV_FIRST + 28; -pub const TVM_SETBKCOLOR: ::UINT = TV_FIRST + 29; -pub const TVM_SETTEXTCOLOR: ::UINT = TV_FIRST + 30; -pub const TVM_GETBKCOLOR: ::UINT = TV_FIRST + 31; -pub const TVM_GETTEXTCOLOR: ::UINT = TV_FIRST + 32; -pub const TVM_SETSCROLLTIME: ::UINT = TV_FIRST + 33; -pub const TVM_GETSCROLLTIME: ::UINT = TV_FIRST + 34; -pub const TVM_SETINSERTMARKCOLOR: ::UINT = TV_FIRST + 37; -pub const TVM_GETINSERTMARKCOLOR: ::UINT = TV_FIRST + 38; -pub const TVM_SETBORDER: ::UINT = TV_FIRST + 35; -pub const TVSBF_XBORDER: ::WPARAM = 0x00000001; -pub const TVSBF_YBORDER: ::WPARAM = 0x00000002; -pub const TVM_GETITEMSTATE: ::UINT = TV_FIRST + 39; -pub const TVM_SETLINECOLOR: ::UINT = TV_FIRST + 40; -pub const TVM_GETLINECOLOR: ::UINT = TV_FIRST + 41; -pub const TVM_MAPACCIDTOHTREEITEM: ::UINT = TV_FIRST + 42; -pub const TVM_MAPHTREEITEMTOACCID: ::UINT = TV_FIRST + 43; -pub const TVM_SETEXTENDEDSTYLE: ::UINT = TV_FIRST + 44; -pub const TVM_GETEXTENDEDSTYLE: ::UINT = TV_FIRST + 45; -pub const TVM_SETAUTOSCROLLINFO: ::UINT = TV_FIRST + 59; -pub const TVM_SETHOT: ::UINT = TV_FIRST + 58; -pub const TVM_GETSELECTEDCOUNT: ::UINT = TV_FIRST + 70; -pub const TVM_SHOWINFOTIP: ::UINT = TV_FIRST + 71; -ENUM!{enum TVITEMPART { - TVGIPR_BUTTON = 0x0001, -}} -STRUCT!{struct TVGETITEMPARTRECTINFO { - hti: HTREEITEM, - prc: *mut ::RECT, - partID: TVITEMPART, -}} -pub const TVM_GETITEMPARTRECT: ::UINT = TV_FIRST + 72; -pub type PFNTVCOMPARE = Option<unsafe extern "system" fn( - lParam1: ::LPARAM, lParam2: ::LPARAM, lParamSort: ::LPARAM, -) -> ::c_int>; -pub type LPTV_SORTCB = LPTVSORTCB; -pub type TV_SORTCB = TVSORTCB; -#[repr(C)] #[derive(Copy)] -pub struct TVSORTCB { - pub hParent: HTREEITEM, - pub lpfnCompare: PFNTVCOMPARE, - pub lParam: ::LPARAM, -} -impl Clone for TVSORTCB { fn clone(&self) -> TVSORTCB { *self } } -pub type LPTVSORTCB = *mut TVSORTCB; -pub type LPNM_TREEVIEWA = LPNMTREEVIEWA; -pub type LPNM_TREEVIEWW = LPNMTREEVIEWW; -pub type NM_TREEVIEWA = NMTREEVIEWA; -pub type NM_TREEVIEWW = NMTREEVIEWW; -STRUCT!{struct NMTREEVIEWA { - hdr: ::NMHDR, - action: ::UINT, - itemOld: TVITEMA, - itemNew: TVITEMA, - ptDrag: ::POINT, -}} -pub type LPNMTREEVIEWA = *mut NMTREEVIEWA; -STRUCT!{struct NMTREEVIEWW { - hdr: ::NMHDR, - action: ::UINT, - itemOld: TVITEMW, - itemNew: TVITEMW, - ptDrag: ::POINT, -}} -pub type LPNMTREEVIEWW = *mut NMTREEVIEWW; -pub const TVN_SELCHANGINGA: ::UINT = TVN_FIRST - 1; -pub const TVN_SELCHANGINGW: ::UINT = TVN_FIRST - 50; -pub const TVN_SELCHANGEDA: ::UINT = TVN_FIRST - 2; -pub const TVN_SELCHANGEDW: ::UINT = TVN_FIRST - 51; -pub const TVN_GETDISPINFOA: ::UINT = TVN_FIRST - 3; -pub const TVN_GETDISPINFOW: ::UINT = TVN_FIRST - 52; -pub const TVN_SETDISPINFOA: ::UINT = TVN_FIRST - 4; -pub const TVN_SETDISPINFOW: ::UINT = TVN_FIRST - 53; -pub const TVC_UNKNOWN: ::LPARAM = 0x0000; -pub const TVC_BYMOUSE: ::LPARAM = 0x0001; -pub const TVC_BYKEYBOARD: ::LPARAM = 0x0002; -pub const TVIF_DI_SETITEM: ::UINT = 0x1000; -pub type TV_DISPINFOA = NMTVDISPINFOA; -pub type TV_DISPINFOW = NMTVDISPINFOW; -STRUCT!{struct NMTVDISPINFOA { - hdr: ::NMHDR, - item: TVITEMA, -}} -pub type LPNMTVDISPINFOA = *mut NMTVDISPINFOA; -STRUCT!{struct NMTVDISPINFOW { - hdr: ::NMHDR, - item: TVITEMW, -}} -pub type LPNMTVDISPINFOW = *mut NMTVDISPINFOW; -STRUCT!{struct NMTVDISPINFOEXA { - hdr: ::NMHDR, - item: TVITEMEXA, -}} -pub type LPNMTVDISPINFOEXA = *mut NMTVDISPINFOEXA; -STRUCT!{struct NMTVDISPINFOEXW { - hdr: ::NMHDR, - item: TVITEMEXW, -}} -pub type LPNMTVDISPINFOEXW = *mut NMTVDISPINFOEXW; -pub type TV_DISPINFOEXA = NMTVDISPINFOEXA; -pub type TV_DISPINFOEXW = NMTVDISPINFOEXW; -pub const TVN_ITEMEXPANDINGA: ::UINT = TVN_FIRST - 5; -pub const TVN_ITEMEXPANDINGW: ::UINT = TVN_FIRST - 54; -pub const TVN_ITEMEXPANDEDA: ::UINT = TVN_FIRST - 6; -pub const TVN_ITEMEXPANDEDW: ::UINT = TVN_FIRST - 55; -pub const TVN_BEGINDRAGA: ::UINT = TVN_FIRST - 7; -pub const TVN_BEGINDRAGW: ::UINT = TVN_FIRST - 56; -pub const TVN_BEGINRDRAGA: ::UINT = TVN_FIRST - 8; -pub const TVN_BEGINRDRAGW: ::UINT = TVN_FIRST - 57; -pub const TVN_DELETEITEMA: ::UINT = TVN_FIRST - 9; -pub const TVN_DELETEITEMW: ::UINT = TVN_FIRST - 58; -pub const TVN_BEGINLABELEDITA: ::UINT = TVN_FIRST - 10; -pub const TVN_BEGINLABELEDITW: ::UINT = TVN_FIRST - 59; -pub const TVN_ENDLABELEDITA: ::UINT = TVN_FIRST - 11; -pub const TVN_ENDLABELEDITW: ::UINT = TVN_FIRST - 60; -pub const TVN_KEYDOWN: ::UINT = TVN_FIRST - 12; -pub const TVN_GETINFOTIPA: ::UINT = TVN_FIRST - 13; -pub const TVN_GETINFOTIPW: ::UINT = TVN_FIRST - 14; -pub const TVN_SINGLEEXPAND: ::UINT = TVN_FIRST - 15; -pub const TVN_ITEMCHANGINGA: ::UINT = TVN_FIRST - 16; -pub const TVN_ITEMCHANGINGW: ::UINT = TVN_FIRST - 17; -pub const TVN_ITEMCHANGEDA: ::UINT = TVN_FIRST - 18; -pub const TVN_ITEMCHANGEDW: ::UINT = TVN_FIRST - 19; -pub const TVN_ASYNCDRAW: ::UINT = TVN_FIRST - 20; -pub const TVNRET_DEFAULT: ::LRESULT = 0; -pub const TVNRET_SKIPOLD: ::LRESULT = 1; -pub const TVNRET_SKIPNEW: ::LRESULT = 2; -pub type TV_KEYDOWN = NMTVKEYDOWN; -STRUCT!{struct NMTVKEYDOWN { - hdr: ::NMHDR, - wVKey: ::WORD, - flags: ::UINT, -}} -pub type LPNMTVKEYDOWN = *mut NMTVKEYDOWN; -STRUCT!{struct NMTVCUSTOMDRAW { - nmcd: NMCUSTOMDRAW, - clrText: ::COLORREF, - clrTextBk: ::COLORREF, - iLevel: ::c_int, -}} -pub type LPNMTVCUSTOMDRAW = *mut NMTVCUSTOMDRAW; -STRUCT!{struct NMTVGETINFOTIPA { - hdr: ::NMHDR, - pszText: ::LPSTR, - cchTextMax: ::c_int, - hItem: HTREEITEM, - lParam: ::LPARAM, -}} -pub type LPNMTVGETINFOTIPA = *mut NMTVGETINFOTIPA; -STRUCT!{struct NMTVGETINFOTIPW { - hdr: ::NMHDR, - pszText: ::LPWSTR, - cchTextMax: ::c_int, - hItem: HTREEITEM, - lParam: ::LPARAM, -}} -pub type LPNMTVGETINFOTIPW = *mut NMTVGETINFOTIPW; -pub const TVCDRF_NOIMAGES: ::LRESULT = 0x00010000; -STRUCT!{struct NMTVITEMCHANGE { - hdr: ::NMHDR, - uChanged: ::UINT, - hItem: HTREEITEM, - uStateNew: ::UINT, - uStateOld: ::UINT, - lParam: ::LPARAM, -}} -STRUCT!{struct NMTVASYNCDRAW { - hdr: ::NMHDR, - pimldp: *mut IMAGELISTDRAWPARAMS, - hr: ::HRESULT, - hItem: HTREEITEM, - lParam: ::LPARAM, - dwRetFlags: ::DWORD, - iRetImageIndex: ::c_int, -}} -pub const CBEIF_TEXT: ::UINT = 0x00000001; -pub const CBEIF_IMAGE: ::UINT = 0x00000002; -pub const CBEIF_SELECTEDIMAGE: ::UINT = 0x00000004; -pub const CBEIF_OVERLAY: ::UINT = 0x00000008; -pub const CBEIF_INDENT: ::UINT = 0x00000010; -pub const CBEIF_LPARAM: ::UINT = 0x00000020; -pub const CBEIF_DI_SETITEM: ::UINT = 0x10000000; -STRUCT!{struct COMBOBOXEXITEMA { - mask: ::UINT, - iItem: ::INT_PTR, - pszText: ::LPSTR, - cchTextMax: ::c_int, - iImage: ::c_int, - iSelectedImage: ::c_int, - iOverlay: ::c_int, - iIndent: ::c_int, - lParam: ::LPARAM, -}} -pub type PCOMBOBOXEXITEMA = *mut COMBOBOXEXITEMA; -pub type PCCOMBOBOXEXITEMA = *const COMBOBOXEXITEMA; -STRUCT!{struct COMBOBOXEXITEMW { - mask: ::UINT, - iItem: ::INT_PTR, - pszText: ::LPWSTR, - cchTextMax: ::c_int, - iImage: ::c_int, - iSelectedImage: ::c_int, - iOverlay: ::c_int, - iIndent: ::c_int, - lParam: ::LPARAM, -}} -pub type PCOMBOBOXEXITEMW = *mut COMBOBOXEXITEMW; -pub type PCCOMBOBOXEXITEMW = *const COMBOBOXEXITEMW; -pub const CBEM_INSERTITEMA: ::UINT = ::WM_USER + 1; -pub const CBEM_SETIMAGELIST: ::UINT = ::WM_USER + 2; -pub const CBEM_GETIMAGELIST: ::UINT = ::WM_USER + 3; -pub const CBEM_GETITEMA: ::UINT = ::WM_USER + 4; -pub const CBEM_SETITEMA: ::UINT = ::WM_USER + 5; -pub const CBEM_DELETEITEM: ::UINT = ::CB_DELETESTRING; -pub const CBEM_GETCOMBOCONTROL: ::UINT = ::WM_USER + 6; -pub const CBEM_GETEDITCONTROL: ::UINT = ::WM_USER + 7; -pub const CBEM_SETEXSTYLE: ::UINT = ::WM_USER + 8; -pub const CBEM_SETEXTENDEDSTYLE: ::UINT = ::WM_USER + 14; -pub const CBEM_GETEXSTYLE: ::UINT = ::WM_USER + 9; -pub const CBEM_GETEXTENDEDSTYLE: ::UINT = ::WM_USER + 9; -pub const CBEM_SETUNICODEFORMAT: ::UINT = CCM_SETUNICODEFORMAT; -pub const CBEM_GETUNICODEFORMAT: ::UINT = CCM_GETUNICODEFORMAT; -pub const CBEM_HASEDITCHANGED: ::UINT = ::WM_USER + 10; -pub const CBEM_INSERTITEMW: ::UINT = ::WM_USER + 11; -pub const CBEM_SETITEMW: ::UINT = ::WM_USER + 12; -pub const CBEM_GETITEMW: ::UINT = ::WM_USER + 13; -pub const CBEM_SETWINDOWTHEME: ::UINT = CCM_SETWINDOWTHEME; -pub const CBES_EX_NOEDITIMAGE: ::DWORD = 0x00000001; -pub const CBES_EX_NOEDITIMAGEINDENT: ::DWORD = 0x00000002; -pub const CBES_EX_PATHWORDBREAKPROC: ::DWORD = 0x00000004; -pub const CBES_EX_NOSIZELIMIT: ::DWORD = 0x00000008; -pub const CBES_EX_CASESENSITIVE: ::DWORD = 0x00000010; -pub const CBES_EX_TEXTENDELLIPSIS: ::DWORD = 0x00000020; -STRUCT!{struct NMCOMBOBOXEXA { - hdr: ::NMHDR, - ceItem: COMBOBOXEXITEMA, -}} -pub type PNMCOMBOBOXEXA = *mut NMCOMBOBOXEXA; -STRUCT!{struct NMCOMBOBOXEXW { - hdr: ::NMHDR, - ceItem: COMBOBOXEXITEMW, -}} -pub type PNMCOMBOBOXEXW = *mut NMCOMBOBOXEXW; -pub const CBEN_GETDISPINFOA: ::UINT = CBEN_FIRST - 0; -pub const CBEN_INSERTITEM: ::UINT = CBEN_FIRST - 1; -pub const CBEN_DELETEITEM: ::UINT = CBEN_FIRST - 2; -pub const CBEN_BEGINEDIT: ::UINT = CBEN_FIRST - 4; -pub const CBEN_ENDEDITA: ::UINT = CBEN_FIRST - 5; -pub const CBEN_ENDEDITW: ::UINT = CBEN_FIRST - 6; -pub const CBEN_GETDISPINFOW: ::UINT = CBEN_FIRST - 7; -pub const CBEN_DRAGBEGINA: ::UINT = CBEN_FIRST - 8; -pub const CBEN_DRAGBEGINW: ::UINT = CBEN_FIRST - 9; -pub const CBENF_KILLFOCUS: ::c_int = 1; -pub const CBENF_RETURN: ::c_int = 2; -pub const CBENF_ESCAPE: ::c_int = 3; -pub const CBENF_DROPDOWN: ::c_int = 4; -pub const CBEMAXSTRLEN: usize = 260; -#[repr(C)] #[derive(Copy)] -pub struct NMCBEDRAGBEGINW { - pub hdr: ::NMHDR, - pub iItemid: ::c_int, - pub szText: [::WCHAR; CBEMAXSTRLEN], -} -impl Clone for NMCBEDRAGBEGINW { fn clone(&self) -> NMCBEDRAGBEGINW { *self } } -pub type PNMCBEDRAGBEGINW = *mut NMCBEDRAGBEGINW; -pub type LPNMCBEDRAGBEGINW = *mut NMCBEDRAGBEGINW; -#[repr(C)] #[derive(Copy)] -pub struct NMCBEDRAGBEGINA { - pub hdr: ::NMHDR, - pub iItemid: ::c_int, - pub szText: [::c_char; CBEMAXSTRLEN], -} -impl Clone for NMCBEDRAGBEGINA { fn clone(&self) -> NMCBEDRAGBEGINA { *self } } -pub type PNMCBEDRAGBEGINA = *mut NMCBEDRAGBEGINA; -pub type LPNMCBEDRAGBEGINA = *mut NMCBEDRAGBEGINA; -#[repr(C)] #[derive(Copy)] -pub struct NMCBEENDEDITW { - pub hdr: ::NMHDR, - pub fChanged: ::BOOL, - pub iNewSelection: ::c_int, - pub szText: [::WCHAR; CBEMAXSTRLEN], - pub iWhy: ::c_int, -} -impl Clone for NMCBEENDEDITW { fn clone(&self) -> NMCBEENDEDITW { *self } } -pub type PNMCBEENDEDITW = *mut NMCBEENDEDITW; -pub type LPNMCBEENDEDITW = *mut NMCBEENDEDITW; -#[repr(C)] #[derive(Copy)] -pub struct NMCBEENDEDITA { - pub hdr: ::NMHDR, - pub fChanged: ::BOOL, - pub iNewSelection: ::c_int, - pub szText: [::c_char; CBEMAXSTRLEN], - pub iWhy: ::c_int, -} -impl Clone for NMCBEENDEDITA { fn clone(&self) -> NMCBEENDEDITA { *self } } -pub type PNMCBEENDEDITA = *mut NMCBEENDEDITA; -pub type LPNMCBEENDEDITA = *mut NMCBEENDEDITA; -pub const TCS_SCROLLOPPOSITE: ::DWORD = 0x0001; -pub const TCS_BOTTOM: ::DWORD = 0x0002; -pub const TCS_RIGHT: ::DWORD = 0x0002; -pub const TCS_MULTISELECT: ::DWORD = 0x0004; -pub const TCS_FLATBUTTONS: ::DWORD = 0x0008; -pub const TCS_FORCEICONLEFT: ::DWORD = 0x0010; -pub const TCS_FORCELABELLEFT: ::DWORD = 0x0020; -pub const TCS_HOTTRACK: ::DWORD = 0x0040; -pub const TCS_VERTICAL: ::DWORD = 0x0080; -pub const TCS_TABS: ::DWORD = 0x0000; -pub const TCS_BUTTONS: ::DWORD = 0x0100; -pub const TCS_SINGLELINE: ::DWORD = 0x0000; -pub const TCS_MULTILINE: ::DWORD = 0x0200; -pub const TCS_RIGHTJUSTIFY: ::DWORD = 0x0000; -pub const TCS_FIXEDWIDTH: ::DWORD = 0x0400; -pub const TCS_RAGGEDRIGHT: ::DWORD = 0x0800; -pub const TCS_FOCUSONBUTTONDOWN: ::DWORD = 0x1000; -pub const TCS_OWNERDRAWFIXED: ::DWORD = 0x2000; -pub const TCS_TOOLTIPS: ::DWORD = 0x4000; -pub const TCS_FOCUSNEVER: ::DWORD = 0x8000; -pub const TCS_EX_FLATSEPARATORS: ::DWORD = 0x00000001; -pub const TCS_EX_REGISTERDROP: ::DWORD = 0x00000002; -pub const TCM_GETIMAGELIST: ::UINT = TCM_FIRST + 2; -pub const TCM_SETIMAGELIST: ::UINT = TCM_FIRST + 3; -pub const TCM_GETITEMCOUNT: ::UINT = TCM_FIRST + 4; -pub const TCIF_TEXT: ::UINT = 0x0001; -pub const TCIF_IMAGE: ::UINT = 0x0002; -pub const TCIF_RTLREADING: ::UINT = 0x0004; -pub const TCIF_PARAM: ::UINT = 0x0008; -pub const TCIF_STATE: ::UINT = 0x0010; -pub const TCIS_BUTTONPRESSED: ::DWORD = 0x0001; -pub const TCIS_HIGHLIGHTED: ::DWORD = 0x0002; -pub type TC_ITEMHEADERA = TCITEMHEADERA; -pub type TC_ITEMHEADERW = TCITEMHEADERW; -STRUCT!{struct TCITEMHEADERA { - mask: ::UINT, - lpReserved1: ::UINT, - lpReserved2: ::UINT, - pszText: ::LPSTR, - cchTextMax: ::c_int, - iImage: ::c_int, -}} -pub type LPTCITEMHEADERA = *mut TCITEMHEADERA; -STRUCT!{struct TCITEMHEADERW { - mask: ::UINT, - lpReserved1: ::UINT, - lpReserved2: ::UINT, - pszText: ::LPWSTR, - cchTextMax: ::c_int, - iImage: ::c_int, -}} -pub type LPTCITEMHEADERW = *mut TCITEMHEADERW; -pub type TC_ITEMA = TCITEMA; -pub type TC_ITEMW = TCITEMW; -STRUCT!{struct TCITEMA { - mask: ::UINT, - dwState: ::DWORD, - dwStateMask: ::DWORD, - pszText: ::LPSTR, - cchTextMax: ::c_int, - iImage: ::c_int, - lParam: ::LPARAM, -}} -pub type LPTCITEMA = *mut TCITEMA; -STRUCT!{struct TCITEMW { - mask: ::UINT, - dwState: ::DWORD, - dwStateMask: ::DWORD, - pszText: ::LPWSTR, - cchTextMax: ::c_int, - iImage: ::c_int, - lParam: ::LPARAM, -}} -pub type LPTCITEMW = *mut TCITEMW; -pub const TCM_GETITEMA: ::UINT = TCM_FIRST + 5; -pub const TCM_GETITEMW: ::UINT = TCM_FIRST + 60; -pub const TCM_SETITEMA: ::UINT = TCM_FIRST + 6; -pub const TCM_SETITEMW: ::UINT = TCM_FIRST + 61; -pub const TCM_INSERTITEMA: ::UINT = TCM_FIRST + 7; -pub const TCM_INSERTITEMW: ::UINT = TCM_FIRST + 62; -pub const TCM_DELETEITEM: ::UINT = TCM_FIRST + 8; -pub const TCM_DELETEALLITEMS: ::UINT = TCM_FIRST + 9; -pub const TCM_GETITEMRECT: ::UINT = TCM_FIRST + 10; -pub const TCM_GETCURSEL: ::UINT = TCM_FIRST + 11; -pub const TCM_SETCURSEL: ::UINT = TCM_FIRST + 12; -pub const TCHT_NOWHERE: ::UINT = 0x0001; -pub const TCHT_ONITEMICON: ::UINT = 0x0002; -pub const TCHT_ONITEMLABEL: ::UINT = 0x0004; -pub const TCHT_ONITEM: ::UINT = TCHT_ONITEMICON | TCHT_ONITEMLABEL; -pub type LPTC_HITTESTINFO = LPTCHITTESTINFO; -pub type TC_HITTESTINFO = TCHITTESTINFO; -STRUCT!{struct TCHITTESTINFO { - pt: ::POINT, - flags: ::UINT, -}} -pub type LPTCHITTESTINFO = *mut TCHITTESTINFO; -pub const TCM_HITTEST: ::UINT = TCM_FIRST + 13; -pub const TCM_SETITEMEXTRA: ::UINT = TCM_FIRST + 14; -pub const TCM_ADJUSTRECT: ::UINT = TCM_FIRST + 40; -pub const TCM_SETITEMSIZE: ::UINT = TCM_FIRST + 41; -pub const TCM_REMOVEIMAGE: ::UINT = TCM_FIRST + 42; -pub const TCM_SETPADDING: ::UINT = TCM_FIRST + 43; -pub const TCM_GETROWCOUNT: ::UINT = TCM_FIRST + 44; -pub const TCM_GETTOOLTIPS: ::UINT = TCM_FIRST + 45; -pub const TCM_SETTOOLTIPS: ::UINT = TCM_FIRST + 46; -pub const TCM_GETCURFOCUS: ::UINT = TCM_FIRST + 47; -pub const TCM_SETCURFOCUS: ::UINT = TCM_FIRST + 48; -pub const TCM_SETMINTABWIDTH: ::UINT = TCM_FIRST + 49; -pub const TCM_DESELECTALL: ::UINT = TCM_FIRST + 50; -pub const TCM_HIGHLIGHTITEM: ::UINT = TCM_FIRST + 51; -pub const TCM_SETEXTENDEDSTYLE: ::UINT = TCM_FIRST + 52; -pub const TCM_GETEXTENDEDSTYLE: ::UINT = TCM_FIRST + 53; -pub const TCM_SETUNICODEFORMAT: ::UINT = CCM_SETUNICODEFORMAT; -pub const TCM_GETUNICODEFORMAT: ::UINT = CCM_GETUNICODEFORMAT; -pub const TCN_KEYDOWN: ::UINT = TCN_FIRST - 0; -pub type TC_KEYDOWN = NMTCKEYDOWN; -STRUCT!{struct NMTCKEYDOWN { - hdr: ::NMHDR, - wVKey: ::WORD, - flags: ::UINT, -}} -pub const TCN_SELCHANGE: ::UINT = TCN_FIRST - 1; -pub const TCN_SELCHANGING: ::UINT = TCN_FIRST - 2; -pub const TCN_GETOBJECT: ::UINT = TCN_FIRST - 3; -pub const TCN_FOCUSCHANGE: ::UINT = TCN_FIRST - 4; -pub const ACS_CENTER: ::DWORD = 0x0001; -pub const ACS_TRANSPARENT: ::DWORD = 0x0002; -pub const ACS_AUTOPLAY: ::DWORD = 0x0004; -pub const ACS_TIMER: ::DWORD = 0x0008; -pub const ACM_OPENA: ::UINT = ::WM_USER + 100; -pub const ACM_OPENW: ::UINT = ::WM_USER + 103; -pub const ACM_PLAY: ::UINT = ::WM_USER + 101; -pub const ACM_STOP: ::UINT = ::WM_USER + 102; -pub const ACM_ISPLAYING: ::UINT = ::WM_USER + 104; -pub const ACN_START: ::WPARAM = 1; -pub const ACN_STOP: ::WPARAM = 2; -pub type MONTHDAYSTATE = ::DWORD; -pub type LPMONTHDAYSTATE = *mut ::DWORD; -pub const MCM_FIRST: ::UINT = 0x1000; -pub const MCM_GETCURSEL: ::UINT = MCM_FIRST + 1; -pub const MCM_SETCURSEL: ::UINT = MCM_FIRST + 2; -pub const MCM_GETMAXSELCOUNT: ::UINT = MCM_FIRST + 3; -pub const MCM_SETMAXSELCOUNT: ::UINT = MCM_FIRST + 4; -pub const MCM_GETSELRANGE: ::UINT = MCM_FIRST + 5; -pub const MCM_SETSELRANGE: ::UINT = MCM_FIRST + 6; -pub const MCM_GETMONTHRANGE: ::UINT = MCM_FIRST + 7; -pub const MCM_SETDAYSTATE: ::UINT = MCM_FIRST + 8; -pub const MCM_GETMINREQRECT: ::UINT = MCM_FIRST + 9; -pub const MCM_SETCOLOR: ::UINT = MCM_FIRST + 10; -pub const MCM_GETCOLOR: ::UINT = MCM_FIRST + 11; -pub const MCM_SETTODAY: ::UINT = MCM_FIRST + 12; -pub const MCM_GETTODAY: ::UINT = MCM_FIRST + 13; -pub const MCM_HITTEST: ::UINT = MCM_FIRST + 14; -pub const MCSC_BACKGROUND: ::WPARAM = 0; -pub const MCSC_TEXT: ::WPARAM = 1; -pub const MCSC_TITLEBK: ::WPARAM = 2; -pub const MCSC_TITLETEXT: ::WPARAM = 3; -pub const MCSC_MONTHBK: ::WPARAM = 4; -pub const MCSC_TRAILINGTEXT: ::WPARAM = 5; -STRUCT!{struct MCHITTESTINFO { - cbSize: ::UINT, - pt: ::POINT, - uHit: ::UINT, - st: ::SYSTEMTIME, - rc: ::RECT, - iOffset: ::c_int, - iRow: ::c_int, - iCol: ::c_int, -}} -pub type PMCHITTESTINFO = *mut MCHITTESTINFO; -pub const MCHT_TITLE: ::UINT = 0x00010000; -pub const MCHT_CALENDAR: ::UINT = 0x00020000; -pub const MCHT_TODAYLINK: ::UINT = 0x00030000; -pub const MCHT_CALENDARCONTROL: ::UINT = 0x00100000; -pub const MCHT_NEXT: ::UINT = 0x01000000; -pub const MCHT_PREV: ::UINT = 0x02000000; -pub const MCHT_NOWHERE: ::UINT = 0x00000000; -pub const MCHT_TITLEBK: ::UINT = MCHT_TITLE; -pub const MCHT_TITLEMONTH: ::UINT = MCHT_TITLE | 0x0001; -pub const MCHT_TITLEYEAR: ::UINT = MCHT_TITLE | 0x0002; -pub const MCHT_TITLEBTNNEXT: ::UINT = MCHT_TITLE | MCHT_NEXT | 0x0003; -pub const MCHT_TITLEBTNPREV: ::UINT = MCHT_TITLE | MCHT_PREV | 0x0003; -pub const MCHT_CALENDARBK: ::UINT = MCHT_CALENDAR; -pub const MCHT_CALENDARDATE: ::UINT = MCHT_CALENDAR | 0x0001; -pub const MCHT_CALENDARDATENEXT: ::UINT = MCHT_CALENDARDATE | MCHT_NEXT; -pub const MCHT_CALENDARDATEPREV: ::UINT = MCHT_CALENDARDATE | MCHT_PREV; -pub const MCHT_CALENDARDAY: ::UINT = MCHT_CALENDAR | 0x0002; -pub const MCHT_CALENDARWEEKNUM: ::UINT = MCHT_CALENDAR | 0x0003; -pub const MCHT_CALENDARDATEMIN: ::UINT = MCHT_CALENDAR | 0x0004; -pub const MCHT_CALENDARDATEMAX: ::UINT = MCHT_CALENDAR | 0x0005; -pub const MCM_SETFIRSTDAYOFWEEK: ::UINT = MCM_FIRST + 15; -pub const MCM_GETFIRSTDAYOFWEEK: ::UINT = MCM_FIRST + 16; -pub const MCM_GETRANGE: ::UINT = MCM_FIRST + 17; -pub const MCM_SETRANGE: ::UINT = MCM_FIRST + 18; -pub const MCM_GETMONTHDELTA: ::UINT = MCM_FIRST + 19; -pub const MCM_SETMONTHDELTA: ::UINT = MCM_FIRST + 20; -pub const MCM_GETMAXTODAYWIDTH: ::UINT = MCM_FIRST + 21; -pub const MCM_SETUNICODEFORMAT: ::UINT = CCM_SETUNICODEFORMAT; -pub const MCM_GETUNICODEFORMAT: ::UINT = CCM_GETUNICODEFORMAT; -pub const MCM_GETCURRENTVIEW: ::UINT = MCM_FIRST + 22; -pub const MCM_GETCALENDARCOUNT: ::UINT = MCM_FIRST + 23; -pub const MCMV_MONTH: ::DWORD = 0; -pub const MCMV_YEAR: ::DWORD = 1; -pub const MCMV_DECADE: ::DWORD = 2; -pub const MCMV_CENTURY: ::DWORD = 3; -pub const MCMV_MAX: ::DWORD = MCMV_CENTURY; -pub const MCGIP_CALENDARCONTROL: ::DWORD = 0; -pub const MCGIP_NEXT: ::DWORD = 1; -pub const MCGIP_PREV: ::DWORD = 2; -pub const MCGIP_FOOTER: ::DWORD = 3; -pub const MCGIP_CALENDAR: ::DWORD = 4; -pub const MCGIP_CALENDARHEADER: ::DWORD = 5; -pub const MCGIP_CALENDARBODY: ::DWORD = 6; -pub const MCGIP_CALENDARROW: ::DWORD = 7; -pub const MCGIP_CALENDARCELL: ::DWORD = 8; -pub const MCGIF_DATE: ::DWORD = 0x00000001; -pub const MCGIF_RECT: ::DWORD = 0x00000002; -pub const MCGIF_NAME: ::DWORD = 0x00000004; -STRUCT!{struct MCGRIDINFO { - cbSize: ::UINT, - dwPart: ::DWORD, - dwFlags: ::DWORD, - iCalendar: ::c_int, - iRow: ::c_int, - iCol: ::c_int, - bSelected: ::BOOL, - stStart: ::SYSTEMTIME, - stEnd: ::SYSTEMTIME, - rc: ::RECT, - pszName: ::PWSTR, - cchName: ::size_t, -}} -pub type PMCGRIDINFO = *mut MCGRIDINFO; -pub const MCM_GETCALENDARGRIDINFO: ::UINT = MCM_FIRST + 24; -pub const MCM_GETCALID: ::UINT = MCM_FIRST + 27; -pub const MCM_SETCALID: ::UINT = MCM_FIRST + 28; -pub const MCM_SIZERECTTOMIN: ::UINT = MCM_FIRST + 29; -pub const MCM_SETCALENDARBORDER: ::UINT = MCM_FIRST + 30; -pub const MCM_GETCALENDARBORDER: ::UINT = MCM_FIRST + 31; -pub const MCM_SETCURRENTVIEW: ::UINT = MCM_FIRST + 32; -STRUCT!{struct NMSELCHANGE { - nmhdr: ::NMHDR, - stSelStart: ::SYSTEMTIME, - stSelEnd: ::SYSTEMTIME, -}} -pub type LPNMSELCHANGE = *mut NMSELCHANGE; -pub const MCN_SELCHANGE: ::UINT = MCN_FIRST - 3; -STRUCT!{struct NMDAYSTATE { - nmhdr: ::NMHDR, - stStart: ::SYSTEMTIME, - cDayState: ::c_int, - prgDayState: LPMONTHDAYSTATE, -}} -pub type LPNMDAYSTATE = *mut NMDAYSTATE; -pub const MCN_GETDAYSTATE: ::UINT = MCN_FIRST - 1; -pub type NMSELECT = NMSELCHANGE; -pub type LPNMSELECT = *mut NMSELCHANGE; -pub const MCN_SELECT: ::UINT = MCN_FIRST; -STRUCT!{struct NMVIEWCHANGE { - nmhdr: ::NMHDR, - dwOldView: ::DWORD, - dwNewView: ::DWORD, -}} -pub type LPNMVIEWCHANGE = *mut NMVIEWCHANGE; -pub const MCN_VIEWCHANGE: ::UINT = MCN_FIRST - 4; -pub const MCS_DAYSTATE: ::DWORD = 0x0001; -pub const MCS_MULTISELECT: ::DWORD = 0x0002; -pub const MCS_WEEKNUMBERS: ::DWORD = 0x0004; -pub const MCS_NOTODAYCIRCLE: ::DWORD = 0x0008; -pub const MCS_NOTODAY: ::DWORD = 0x0010; -pub const MCS_NOTRAILINGDATES: ::DWORD = 0x0040; -pub const MCS_SHORTDAYSOFWEEK: ::DWORD = 0x0080; -pub const MCS_NOSELCHANGEONNAV: ::DWORD = 0x0100; -pub const GMR_VISIBLE: ::DWORD = 0; -pub const GMR_DAYSTATE: ::DWORD = 1; -STRUCT!{struct DATETIMEPICKERINFO { - cbSize: ::UINT, - rcCheck: ::RECT, - stateCheck: ::DWORD, - rcButton: ::RECT, - stateButton: ::DWORD, - hwndEdit: ::HWND, - hwndUD: ::HWND, - hwndDropDown: ::HWND, -}} -pub type LPDATETIMEPICKERINFO = *mut DATETIMEPICKERINFO; -pub const DTM_FIRST: ::UINT = 0x1000; -pub const DTM_GETSYSTEMTIME: ::UINT = DTM_FIRST + 1; -pub const DTM_SETSYSTEMTIME: ::UINT = DTM_FIRST + 2; -pub const DTM_GETRANGE: ::UINT = DTM_FIRST + 3; -pub const DTM_SETRANGE: ::UINT = DTM_FIRST + 4; -pub const DTM_SETFORMATA: ::UINT = DTM_FIRST + 5; -pub const DTM_SETFORMATW: ::UINT = DTM_FIRST + 50; -pub const DTM_SETMCCOLOR: ::UINT = DTM_FIRST + 6; -pub const DTM_GETMCCOLOR: ::UINT = DTM_FIRST + 7; -pub const DTM_GETMONTHCAL: ::UINT = DTM_FIRST + 8; -pub const DTM_SETMCFONT: ::UINT = DTM_FIRST + 9; -pub const DTM_GETMCFONT: ::UINT = DTM_FIRST + 10; -pub const DTM_SETMCSTYLE: ::UINT = DTM_FIRST + 11; -pub const DTM_GETMCSTYLE: ::UINT = DTM_FIRST + 12; -pub const DTM_CLOSEMONTHCAL: ::UINT = DTM_FIRST + 13; -pub const DTM_GETDATETIMEPICKERINFO: ::UINT = DTM_FIRST + 14; -pub const DTM_GETIDEALSIZE: ::UINT = DTM_FIRST + 15; -pub const DTS_UPDOWN: ::DWORD = 0x0001; -pub const DTS_SHOWNONE: ::DWORD = 0x0002; -pub const DTS_SHORTDATEFORMAT: ::DWORD = 0x0000; -pub const DTS_LONGDATEFORMAT: ::DWORD = 0x0004; -pub const DTS_SHORTDATECENTURYFORMAT: ::DWORD = 0x000C; -pub const DTS_TIMEFORMAT: ::DWORD = 0x0009; -pub const DTS_APPCANPARSE: ::DWORD = 0x0010; -pub const DTS_RIGHTALIGN: ::DWORD = 0x0020; -pub const DTN_DATETIMECHANGE: ::UINT = DTN_FIRST2 - 6; -STRUCT!{struct NMDATETIMECHANGE { - nmhdr: ::NMHDR, - dwFlags: ::DWORD, - st: ::SYSTEMTIME, -}} -pub type LPNMDATETIMECHANGE = *mut NMDATETIMECHANGE; -pub const DTN_USERSTRINGA: ::UINT = DTN_FIRST2 - 5; -pub const DTN_USERSTRINGW: ::UINT = DTN_FIRST - 5; -STRUCT!{struct NMDATETIMESTRINGA { - nmhdr: ::NMHDR, - pszUserString: ::LPCSTR, - st: ::SYSTEMTIME, - dwFlags: ::DWORD, -}} -pub type LPNMDATETIMESTRINGA = *mut NMDATETIMESTRINGA; -STRUCT!{struct NMDATETIMESTRINGW { - nmhdr: ::NMHDR, - pszUserString: ::LPCWSTR, - st: ::SYSTEMTIME, - dwFlags: ::DWORD, -}} -pub type LPNMDATETIMESTRINGW = *mut NMDATETIMESTRINGW; -pub const DTN_WMKEYDOWNA: ::UINT = DTN_FIRST2 - 4; -pub const DTN_WMKEYDOWNW: ::UINT = DTN_FIRST - 4; -STRUCT!{struct NMDATETIMEWMKEYDOWNA { - nmhdr: ::NMHDR, - nVirtKey: ::c_int, - pszFormat: ::LPCSTR, - st: ::SYSTEMTIME, -}} -pub type LPNMDATETIMEWMKEYDOWNA = *mut NMDATETIMEWMKEYDOWNA; -STRUCT!{struct NMDATETIMEWMKEYDOWNW { - nmhdr: ::NMHDR, - nVirtKey: ::c_int, - pszFormat: ::LPCWSTR, - st: ::SYSTEMTIME, -}} -pub type LPNMDATETIMEWMKEYDOWNW = *mut NMDATETIMEWMKEYDOWNW; -pub const DTN_FORMATA: ::UINT = DTN_FIRST2 - 3; -pub const DTN_FORMATW: ::UINT = DTN_FIRST - 3; -#[repr(C)] #[derive(Copy)] -pub struct NMDATETIMEFORMATA { - pub nmhdr: ::NMHDR, - pub pszFormat: ::LPCSTR, - pub st: ::SYSTEMTIME, - pub pszDisplay: ::LPCSTR, - pub szDisplay: [::CHAR; 64], -} -impl Clone for NMDATETIMEFORMATA { fn clone(&self) -> NMDATETIMEFORMATA { *self } } -pub type LPNMDATETIMEFORMATA = *mut NMDATETIMEFORMATA; -#[repr(C)] #[derive(Copy)] -pub struct NMDATETIMEFORMATW { - pub nmhdr: ::NMHDR, - pub pszFormat: ::LPCWSTR, - pub st: ::SYSTEMTIME, - pub pszDisplay: ::LPCWSTR, - pub szDisplay: [::WCHAR; 64], -} -impl Clone for NMDATETIMEFORMATW { fn clone(&self) -> NMDATETIMEFORMATW { *self } } -pub type LPNMDATETIMEFORMATW = *mut NMDATETIMEFORMATW; -pub const DTN_FORMATQUERYA: ::UINT = DTN_FIRST2 - 2; -pub const DTN_FORMATQUERYW: ::UINT = DTN_FIRST - 2; -STRUCT!{struct NMDATETIMEFORMATQUERYA { - nmhdr: ::NMHDR, - pszFormat: ::LPCSTR, - szMax: ::SIZE, -}} -pub type LPNMDATETIMEFORMATQUERYA = *mut NMDATETIMEFORMATQUERYA; -STRUCT!{struct NMDATETIMEFORMATQUERYW { - nmhdr: ::NMHDR, - pszFormat: ::LPCWSTR, - szMax: ::SIZE, -}} -pub type LPNMDATETIMEFORMATQUERYW = *mut NMDATETIMEFORMATQUERYW; -pub const DTN_DROPDOWN: ::UINT = DTN_FIRST2 - 1; -pub const DTN_CLOSEUP: ::UINT = DTN_FIRST2; -pub const GDTR_MIN: ::WPARAM = 0x0001; -pub const GDTR_MAX: ::WPARAM = 0x0002; -pub const GDT_ERROR: ::LRESULT = -1; -pub const GDT_VALID: ::LRESULT = 0; -pub const GDT_NONE: ::LRESULT = 1; -pub const IPM_CLEARADDRESS: ::UINT = ::WM_USER + 100; -pub const IPM_SETADDRESS: ::UINT = ::WM_USER + 101; -pub const IPM_GETADDRESS: ::UINT = ::WM_USER + 102; -pub const IPM_SETRANGE: ::UINT = ::WM_USER + 103; -pub const IPM_SETFOCUS: ::UINT = ::WM_USER + 104; -pub const IPM_ISBLANK: ::UINT = ::WM_USER + 105; -pub const IPN_FIELDCHANGED: ::UINT = IPN_FIRST - 0; -STRUCT!{struct NMIPADDRESS { - hdr: ::NMHDR, - iField: ::c_int, - iValue: ::c_int, -}} -pub type LPNMIPADDRESS = *mut NMIPADDRESS; -#[inline] #[allow(dead_code)] -pub fn MAKEIPRANGE(low: ::BYTE, high: ::BYTE) -> ::LPARAM { - (high << 8 + low) as ::LPARAM -} -#[inline] #[allow(dead_code)] -pub fn MAKEIPADDRESS(b1: ::DWORD, b2: ::DWORD, b3: ::DWORD, b4: ::DWORD) -> ::LPARAM { - ((b1 << 24) + (b2 << 16) + (b3 << 8) + b4) as ::LPARAM -} -pub const PGS_VERT: ::DWORD = 0x00000000; -pub const PGS_HORZ: ::DWORD = 0x00000001; -pub const PGS_AUTOSCROLL: ::DWORD = 0x00000002; -pub const PGS_DRAGNDROP: ::DWORD = 0x00000004; -pub const PGF_INVISIBLE: ::DWORD = 0; -pub const PGF_NORMAL: ::DWORD = 1; -pub const PGF_GRAYED: ::DWORD = 2; -pub const PGF_DEPRESSED: ::DWORD = 4; -pub const PGF_HOT: ::DWORD = 8; -pub const PGB_TOPORLEFT: ::c_int = 0; -pub const PGB_BOTTOMORRIGHT: ::c_int = 1; -pub const PGM_SETCHILD: ::UINT = PGM_FIRST + 1; -pub const PGM_RECALCSIZE: ::UINT = PGM_FIRST + 2; -pub const PGM_FORWARDMOUSE: ::UINT = PGM_FIRST + 3; -pub const PGM_SETBKCOLOR: ::UINT = PGM_FIRST + 4; -pub const PGM_GETBKCOLOR: ::UINT = PGM_FIRST + 5; -pub const PGM_SETBORDER: ::UINT = PGM_FIRST + 6; -pub const PGM_GETBORDER: ::UINT = PGM_FIRST + 7; -pub const PGM_SETPOS: ::UINT = PGM_FIRST + 8; -pub const PGM_GETPOS: ::UINT = PGM_FIRST + 9; -pub const PGM_SETBUTTONSIZE: ::UINT = PGM_FIRST + 10; -pub const PGM_GETBUTTONSIZE: ::UINT = PGM_FIRST + 11; -pub const PGM_GETBUTTONSTATE: ::UINT = PGM_FIRST + 12; -pub const PGM_GETDROPTARGET: ::UINT = CCM_GETDROPTARGET; -pub const PGM_SETSCROLLINFO: ::UINT = PGM_FIRST + 13; -pub const PGN_SCROLL: ::UINT = PGN_FIRST - 1; -pub const PGF_SCROLLUP: ::c_int = 1; -pub const PGF_SCROLLDOWN: ::c_int = 2; -pub const PGF_SCROLLLEFT: ::c_int = 4; -pub const PGF_SCROLLRIGHT: ::c_int = 8; -pub const PGK_SHIFT: ::BOOL = 1; -pub const PGK_CONTROL: ::BOOL = 2; -pub const PGK_MENU: ::BOOL = 4; -STRUCT!{struct NMPGSCROLL { - hdr: ::NMHDR, - fwKeys: ::BOOL, - rcParent: ::RECT, - iDir: ::c_int, - iXpos: ::c_int, - iYpos: ::c_int, - iScroll: ::c_int, -}} -pub type LPNMPGSCROLL = *mut NMPGSCROLL; -pub const PGN_CALCSIZE: ::UINT = PGN_FIRST - 2; -pub const PGF_CALCWIDTH: ::DWORD = 1; -pub const PGF_CALCHEIGHT: ::DWORD = 2; -STRUCT!{struct NMPGCALCSIZE { - hdr: ::NMHDR, - dwFlag: ::DWORD, - iWidth: ::c_int, - iHeight: ::c_int, -}} -pub type LPNMPGCALCSIZE = *mut NMPGCALCSIZE; -pub const PGN_HOTITEMCHANGE: ::UINT = PGN_FIRST - 3; -STRUCT!{struct NMPGHOTITEM { - hdr: ::NMHDR, - idOld: ::c_int, - idNew: ::c_int, - dwFlags: ::DWORD, -}} -pub type LPNMPGHOTITEM = *mut NMPGHOTITEM; -pub const NFS_EDIT: ::DWORD = 0x0001; -pub const NFS_STATIC: ::DWORD = 0x0002; -pub const NFS_LISTCOMBO: ::DWORD = 0x0004; -pub const NFS_BUTTON: ::DWORD = 0x0008; -pub const NFS_ALL: ::DWORD = 0x0010; -pub const NFS_USEFONTASSOC: ::DWORD = 0x0020; -pub const BUTTON_IMAGELIST_ALIGN_LEFT: ::UINT = 0; -pub const BUTTON_IMAGELIST_ALIGN_RIGHT: ::UINT = 1; -pub const BUTTON_IMAGELIST_ALIGN_TOP: ::UINT = 2; -pub const BUTTON_IMAGELIST_ALIGN_BOTTOM: ::UINT = 3; -pub const BUTTON_IMAGELIST_ALIGN_CENTER: ::UINT = 4; -STRUCT!{struct BUTTON_IMAGELIST { - himl: HIMAGELIST, - margin: ::RECT, - uAlign: ::UINT, -}} -pub type PBUTTON_IMAGELIST = *mut BUTTON_IMAGELIST; -pub const BCM_GETIDEALSIZE: ::UINT = BCM_FIRST + 0x0001; -pub const BCM_SETIMAGELIST: ::UINT = BCM_FIRST + 0x0002; -pub const BCM_GETIMAGELIST: ::UINT = BCM_FIRST + 0x0003; -pub const BCM_SETTEXTMARGIN: ::UINT = BCM_FIRST + 0x0004; -pub const BCM_GETTEXTMARGIN: ::UINT = BCM_FIRST + 0x0005; -STRUCT!{struct NMBCHOTITEM { - hdr: ::NMHDR, - dwFlags: ::DWORD, -}} -pub type LPNMBCHOTITEM = *mut NMBCHOTITEM; -pub const BCN_HOTITEMCHANGE: ::UINT = BCN_FIRST + 0x0001; -pub const BS_SPLITBUTTON: ::UINT = 0x0000000C; -pub const BS_DEFSPLITBUTTON: ::UINT = 0x0000000D; -pub const BS_COMMANDLINK: ::UINT = 0x0000000E; -pub const BS_DEFCOMMANDLINK: ::UINT = 0x0000000F; -pub const BCSIF_GLYPH: ::UINT = 0x0001; -pub const BCSIF_IMAGE: ::UINT = 0x0002; -pub const BCSIF_STYLE: ::UINT = 0x0004; -pub const BCSIF_SIZE: ::UINT = 0x0008; -pub const BCSS_NOSPLIT: ::UINT = 0x0001; -pub const BCSS_STRETCH: ::UINT = 0x0002; -pub const BCSS_ALIGNLEFT: ::UINT = 0x0004; -pub const BCSS_IMAGE: ::UINT = 0x0008; -STRUCT!{struct BUTTON_SPLITINFO { - mask: ::UINT, - himlGlyph: HIMAGELIST, - uSplitStyle: ::UINT, - size: ::SIZE, -}} -pub type PBUTTON_SPLITINFO = *mut BUTTON_SPLITINFO; -pub const BCM_SETDROPDOWNSTATE: ::UINT = BCM_FIRST + 0x0006; -pub const BCM_SETSPLITINFO: ::UINT = BCM_FIRST + 0x0007; -pub const BCM_GETSPLITINFO: ::UINT = BCM_FIRST + 0x0008; -pub const BCM_SETNOTE: ::UINT = BCM_FIRST + 0x0009; -pub const BCM_GETNOTE: ::UINT = BCM_FIRST + 0x000A; -pub const BCM_GETNOTELENGTH: ::UINT = BCM_FIRST + 0x000B; -pub const BCM_SETSHIELD: ::UINT = BCM_FIRST + 0x000C; -pub const BCCL_NOGLYPH: HIMAGELIST = (0 - 1) as HIMAGELIST; -STRUCT!{struct NMBCDROPDOWN { - hdr: ::NMHDR, - rcButton: ::RECT, -}} -pub type LPNMBCDROPDOWN = *mut NMBCDROPDOWN; -pub const BCN_DROPDOWN: ::UINT = BCN_FIRST + 0x0002; -pub const EM_SETCUEBANNER: ::UINT = ECM_FIRST + 1; -pub const EM_GETCUEBANNER: ::UINT = ECM_FIRST + 2; -pub const EM_SHOWBALLOONTIP: ::UINT = ECM_FIRST + 3; -pub const EM_HIDEBALLOONTIP: ::UINT = ECM_FIRST + 4; -pub const EM_SETHILITE: ::UINT = ECM_FIRST + 5; -pub const EM_GETHILITE: ::UINT = ECM_FIRST + 6; -pub const EM_NOSETFOCUS: ::UINT = ECM_FIRST + 7; -pub const EM_TAKEFOCUS: ::UINT = ECM_FIRST + 8; -STRUCT!{struct EDITBALLOONTIP { - cbStruct: ::DWORD, - pszTitle: ::LPCWSTR, - pszText: ::LPCWSTR, - ttiIcon: ::INT, -}} -pub type PEDITBALLOONTIP = *mut EDITBALLOONTIP; -pub const CB_SETMINVISIBLE: ::UINT = CBM_FIRST + 1; -pub const CB_GETMINVISIBLE: ::UINT = CBM_FIRST + 2; -pub const CB_SETCUEBANNER: ::UINT = CBM_FIRST + 3; -pub const CB_GETCUEBANNER: ::UINT = CBM_FIRST + 4; -pub type PFTASKDIALOGCALLBACK = Option<unsafe extern "system" fn( - hwnd: ::HWND, msg: ::UINT, wParam: ::WPARAM, lParam: ::LPARAM, lpRefData: ::LONG_PTR, -) -> ::HRESULT>; -FLAGS!{enum TASKDIALOG_FLAGS { - TDF_ENABLE_HYPERLINKS = 0x0001, - TDF_USE_HICON_MAIN = 0x0002, - TDF_USE_HICON_FOOTER = 0x0004, - TDF_ALLOW_DIALOG_CANCELLATION = 0x0008, - TDF_USE_COMMAND_LINKS = 0x0010, - TDF_USE_COMMAND_LINKS_NO_ICON = 0x0020, - TDF_EXPAND_FOOTER_AREA = 0x0040, - TDF_EXPANDED_BY_DEFAULT = 0x0080, - TDF_VERIFICATION_FLAG_CHECKED = 0x0100, - TDF_SHOW_PROGRESS_BAR = 0x0200, - TDF_SHOW_MARQUEE_PROGRESS_BAR = 0x0400, - TDF_CALLBACK_TIMER = 0x0800, - TDF_POSITION_RELATIVE_TO_WINDOW = 0x1000, - TDF_RTL_LAYOUT = 0x2000, - TDF_NO_DEFAULT_RADIO_BUTTON = 0x4000, - TDF_CAN_BE_MINIMIZED = 0x8000, - TDF_NO_SET_FOREGROUND = 0x00010000, - TDF_SIZE_TO_CONTENT = 0x01000000, -}} -ENUM!{enum TASKDIALOG_MESSAGES { - TDM_NAVIGATE_PAGE = ::WM_USER + 101, - TDM_CLICK_BUTTON = ::WM_USER + 102, - TDM_SET_MARQUEE_PROGRESS_BAR = ::WM_USER + 103, - TDM_SET_PROGRESS_BAR_STATE = ::WM_USER + 104, - TDM_SET_PROGRESS_BAR_RANGE = ::WM_USER + 105, - TDM_SET_PROGRESS_BAR_POS = ::WM_USER + 106, - TDM_SET_PROGRESS_BAR_MARQUEE = ::WM_USER + 107, - TDM_SET_ELEMENT_TEXT = ::WM_USER + 108, - TDM_CLICK_RADIO_BUTTON = ::WM_USER + 110, - TDM_ENABLE_BUTTON = ::WM_USER + 111, - TDM_ENABLE_RADIO_BUTTON = ::WM_USER + 112, - TDM_CLICK_VERIFICATION = ::WM_USER + 113, - TDM_UPDATE_ELEMENT_TEXT = ::WM_USER + 114, - TDM_SET_BUTTON_ELEVATION_REQUIRED_STATE = ::WM_USER + 115, - TDM_UPDATE_ICON = ::WM_USER + 116, -}} -ENUM!{enum TASKDIALOG_NOTIFICATIONS { - TDN_CREATED = 0, - TDN_NAVIGATED = 1, - TDN_BUTTON_CLICKED = 2, - TDN_HYPERLINK_CLICKED = 3, - TDN_TIMER = 4, - TDN_DESTROYED = 5, - TDN_RADIO_BUTTON_CLICKED = 6, - TDN_DIALOG_CONSTRUCTED = 7, - TDN_VERIFICATION_CLICKED = 8, - TDN_HELP = 9, - TDN_EXPANDO_BUTTON_CLICKED = 10, -}} -STRUCT!{struct TASKDIALOG_BUTTON { - nButtonID: ::c_int, - pszButtonText: ::PCWSTR, -}} -ENUM!{enum TASKDIALOG_ELEMENTS { - TDE_CONTENT, - TDE_EXPANDED_INFORMATION, - TDE_FOOTER, - TDE_MAIN_INSTRUCTION, -}} -ENUM!{enum TASKDIALOG_ICON_ELEMENTS { - TDIE_ICON_MAIN, - TDIE_ICON_FOOTER, -}} -FLAGS!{enum TASKDIALOG_COMMON_BUTTON_FLAGS { - TDCBF_OK_BUTTON = 0x0001, - TDCBF_YES_BUTTON = 0x0002, - TDCBF_NO_BUTTON = 0x0004, - TDCBF_CANCEL_BUTTON = 0x0008, - TDCBF_RETRY_BUTTON = 0x0010, - TDCBF_CLOSE_BUTTON = 0x0020, -}} -#[repr(C)] #[derive(Copy)] -pub struct TASKDIALOGCONFIG { - pub cbSize: ::UINT, - pub hwndParent: ::HWND, - pub hInstance: ::HINSTANCE, - pub dwFlags: TASKDIALOG_FLAGS, - pub dwCommonButtons: TASKDIALOG_COMMON_BUTTON_FLAGS, - pub pszWindowTitle: ::PCWSTR, - pub hMainIcon: ::HICON, - pub pszMainInstruction: ::PCWSTR, - pub pszContent: ::PCWSTR, - pub cButtons: ::UINT, - pub pButtons: *const TASKDIALOG_BUTTON, - pub nDefaultButton: ::c_int, - pub cRadioButtons: ::UINT, - pub pRadioButtons: *const TASKDIALOG_BUTTON, - pub nDefaultRadioButton: ::c_int, - pub pszVerificationText: ::PCWSTR, - pub pszExpandedInformation: ::PCWSTR, - pub pszExpandedControlText: ::PCWSTR, - pub pszCollapsedControlText: ::PCWSTR, - pub hFooterIcon: ::HICON, - pub pszFooter: ::PCWSTR, - pub pfCallback: PFTASKDIALOGCALLBACK, - pub lpCallbackData: ::LONG_PTR, - pub cxWidth: ::UINT, -} -impl Clone for TASKDIALOGCONFIG { fn clone(&self) -> TASKDIALOGCONFIG { *self } } -UNION!(TASKDIALOGCONFIG, hMainIcon, pszMainIcon, pszMainIcon_mut, ::PCWSTR); -UNION!(TASKDIALOGCONFIG, hFooterIcon, pszFooterIcon, pszFooterIcon_mut, ::PCWSTR); -pub const DA_LAST: ::c_int = 0x7FFFFFFF; -pub const DA_ERR: ::c_int = -1; -pub type PFNDAENUMCALLBACK = Option<unsafe extern "system" fn( - p: *mut ::c_void, pData: *mut ::c_void, -) -> ::c_int>; -pub type PFNDAENUMCALLBACKCONST = Option<unsafe extern "system" fn( - p: *const ::c_void, pData: *mut ::c_void, -) -> ::c_int>; -pub type PFNDACOMPARE = Option<unsafe extern "system" fn( - p1: *mut ::c_void, p2: *mut ::c_void, lParam: ::LPARAM, -) -> ::c_int>; -pub type PFNDACOMPARECONST = Option<unsafe extern "system" fn( - p1: *const ::c_void, p2: *const ::c_void, lParam: ::LPARAM, -) -> ::c_int>; -#[repr(C)] #[allow(missing_copy_implementations)] -pub struct DSA { - unused: ::c_void, -} -pub type HDSA = *mut DSA; -pub const DSA_APPEND: ::c_int = DA_LAST; -pub const DSA_ERR: ::c_int = DA_ERR; -pub type PFNDSAENUMCALLBACK = PFNDAENUMCALLBACK; -pub type PFNDSAENUMCALLBACKCONST = PFNDAENUMCALLBACKCONST; -pub type PFNDSACOMPARE = PFNDACOMPARE; -pub type PFNDSACOMPARECONST = PFNDACOMPARECONST; -#[repr(C)] #[allow(missing_copy_implementations)] -pub struct DPA { - unused: ::c_void, -} -pub type HDPA = *mut DPA; -STRUCT!{struct DPASTREAMINFO { - iPos: ::c_int, - pvItem: *mut ::c_void, -}} -pub type PFNDPASTREAM = Option<unsafe extern "system" fn( - pinfo: *mut DPASTREAMINFO, pstream: *mut ::IStream, pvInstData: *mut ::c_void, -) -> ::HRESULT>; -pub const DPAM_SORTED: ::DWORD = 0x00000001; -pub const DPAM_NORMAL: ::DWORD = 0x00000002; -pub const DPAM_UNION: ::DWORD = 0x00000004; -pub const DPAM_INTERSECT: ::DWORD = 0x00000008; -pub type PFNDPAMERGE = Option<unsafe extern "system" fn( - uMsg: ::UINT, pvDest: *mut ::c_void, pvSrc: *mut ::c_void, lParam: ::LPARAM, -) -> *mut ::c_void>; -pub type PFNDPAMERGECONST = Option<unsafe extern "system" fn( - uMsg: ::UINT, pvDest: *const ::c_void, pvSrc: *const ::c_void, lParam: ::LPARAM, -) -> *const ::c_void>; -pub const DPAMM_MERGE: ::UINT = 1; -pub const DPAMM_DELETE: ::UINT = 2; -pub const DPAMM_INSERT: ::UINT = 3; -pub const DPAS_SORTED: ::UINT = 0x0001; -pub const DPAS_INSERTBEFORE: ::UINT = 0x0002; -pub const DPAS_INSERTAFTER: ::UINT = 0x0004; -pub const DPA_APPEND: ::c_int = DA_LAST; -pub const DPA_ERR: ::c_int = DA_ERR; -pub type PFNDPAENUMCALLBACK = PFNDAENUMCALLBACK; -pub type PFNDPAENUMCALLBACKCONST = PFNDAENUMCALLBACKCONST; -pub type PFNDPACOMPARE = PFNDACOMPARE; -pub type PFNDPACOMPARECONST = PFNDACOMPARECONST; -pub const WSB_PROP_CYVSCROLL: ::UINT = 0x00000001; -pub const WSB_PROP_CXHSCROLL: ::UINT = 0x00000002; -pub const WSB_PROP_CYHSCROLL: ::UINT = 0x00000004; -pub const WSB_PROP_CXVSCROLL: ::UINT = 0x00000008; -pub const WSB_PROP_CXHTHUMB: ::UINT = 0x00000010; -pub const WSB_PROP_CYVTHUMB: ::UINT = 0x00000020; -pub const WSB_PROP_VBKGCOLOR: ::UINT = 0x00000040; -pub const WSB_PROP_HBKGCOLOR: ::UINT = 0x00000080; -pub const WSB_PROP_VSTYLE: ::UINT = 0x00000100; -pub const WSB_PROP_HSTYLE: ::UINT = 0x00000200; -pub const WSB_PROP_WINSTYLE: ::UINT = 0x00000400; -pub const WSB_PROP_PALETTE: ::UINT = 0x00000800; -pub const WSB_PROP_MASK: ::UINT = 0x00000FFF; -pub const FSB_FLAT_MODE: ::INT_PTR = 2; -pub const FSB_ENCARTA_MODE: ::INT_PTR = 1; -pub const FSB_REGULAR_MODE: ::INT_PTR = 0; -pub type SUBCLASSPROC = Option<unsafe extern "system" fn( - hWnd: ::HWND, uMsg: ::UINT, wParam: ::WPARAM, lParam: ::LPARAM, uIdSubclass: ::UINT_PTR, - dwRefData: ::DWORD_PTR, -) -> ::LRESULT>; diff --git a/deps/winapi-0.2.5/src/commdlg.rs b/deps/winapi-0.2.5/src/commdlg.rs deleted file mode 100644 index b4eb2def3..000000000 --- a/deps/winapi-0.2.5/src/commdlg.rs +++ /dev/null @@ -1,611 +0,0 @@ -// Copyright © 2015, skdltmxn -// Licensed under the MIT License <LICENSE.md> -//! 32-Bit Common Dialog APIs -pub type LPOFNHOOKPROC = Option<unsafe extern "system" fn( - ::HWND, ::UINT, ::WPARAM, ::LPARAM, -) -> ::UINT_PTR>; -#[repr(C)] #[derive(Copy)] -pub struct OPENFILENAME_NT4A { - pub lStructSize: ::DWORD, - pub hwndOwner: ::HWND, - pub hInstance: ::HINSTANCE, - pub lpstrFilter: ::LPCSTR, - pub lpstrCustomFilter: ::LPSTR, - pub nMaxCustFilter: ::DWORD, - pub nFilterIndex: ::DWORD, - pub lpstrFile: ::LPSTR, - pub nMaxFile: ::DWORD, - pub lpstrFileTitle: ::LPSTR, - pub nMaxFileTitle: ::DWORD, - pub lpstrInitialDir: ::LPCSTR, - pub lpstrTitle: ::LPCSTR, - pub Flags: ::DWORD, - pub nFileOffset: ::WORD, - pub nFileExtension: ::WORD, - pub lpstrDefExt: ::LPCSTR, - pub lCustData: ::LPARAM, - pub lpfnHook: LPOFNHOOKPROC, - pub lpTemplateName: ::LPCSTR, -} -impl Clone for OPENFILENAME_NT4A { fn clone(&self) -> OPENFILENAME_NT4A { *self } } -pub type LPOPENFILENAME_NT4A = *mut OPENFILENAME_NT4A; -#[repr(C)] #[derive(Copy)] -pub struct OPENFILENAME_NT4W { - pub lStructSize: ::DWORD, - pub hwndOwner: ::HWND, - pub hInstance: ::HINSTANCE, - pub lpstrFilter: ::LPCWSTR, - pub lpstrCustomFilter: ::LPWSTR, - pub nMaxCustFilter: ::DWORD, - pub nFilterIndex: ::DWORD, - pub lpstrFile: ::LPWSTR, - pub nMaxFile: ::DWORD, - pub lpstrFileTitle: ::LPWSTR, - pub nMaxFileTitle: ::DWORD, - pub lpstrInitialDir: ::LPCWSTR, - pub lpstrTitle: ::LPCWSTR, - pub Flags: ::DWORD, - pub nFileOffset: ::WORD, - pub nFileExtension: ::WORD, - pub lpstrDefExt: ::LPCWSTR, - pub lCustData: ::LPARAM, - pub lpfnHook: LPOFNHOOKPROC, - pub lpTemplateName: ::LPCWSTR, -} -impl Clone for OPENFILENAME_NT4W { fn clone(&self) -> OPENFILENAME_NT4W { *self } } -pub type LPOPENFILENAME_NT4W = *mut OPENFILENAME_NT4W; -#[repr(C)] #[derive(Copy)] -pub struct OPENFILENAMEA { - pub lStructSize: ::DWORD, - pub hwndOwner: ::HWND, - pub hInstance: ::HINSTANCE, - pub lpstrFilter: ::LPCSTR, - pub lpstrCustomFilter: ::LPSTR, - pub nMaxCustFilter: ::DWORD, - pub nFilterIndex: ::DWORD, - pub lpstrFile: ::LPSTR, - pub nMaxFile: ::DWORD, - pub lpstrFileTitle: ::LPSTR, - pub nMaxFileTitle: ::DWORD, - pub lpstrInitialDir: ::LPCSTR, - pub lpstrTitle: ::LPCSTR, - pub Flags: ::DWORD, - pub nFileOffset: ::WORD, - pub nFileExtension: ::WORD, - pub lpstrDefExt: ::LPCSTR, - pub lCustData: ::LPARAM, - pub lpfnHook: LPOFNHOOKPROC, - pub lpTemplateName: ::LPCSTR, - pub pvReserved: *mut ::c_void, - pub dwReserved: ::DWORD, - pub FlagsEx: ::DWORD, -} -impl Clone for OPENFILENAMEA { fn clone(&self) -> OPENFILENAMEA { *self } } -pub type LPOPENFILENAMEA = *mut OPENFILENAMEA; -#[repr(C)] #[derive(Copy)] -pub struct OPENFILENAMEW { - pub lStructSize: ::DWORD, - pub hwndOwner: ::HWND, - pub hInstance: ::HINSTANCE, - pub lpstrFilter: ::LPCWSTR, - pub lpstrCustomFilter: ::LPWSTR, - pub nMaxCustFilter: ::DWORD, - pub nFilterIndex: ::DWORD, - pub lpstrFile: ::LPWSTR, - pub nMaxFile: ::DWORD, - pub lpstrFileTitle: ::LPWSTR, - pub nMaxFileTitle: ::DWORD, - pub lpstrInitialDir: ::LPCWSTR, - pub lpstrTitle: ::LPCWSTR, - pub Flags: ::DWORD, - pub nFileOffset: ::WORD, - pub nFileExtension: ::WORD, - pub lpstrDefExt: ::LPCWSTR, - pub lCustData: ::LPARAM, - pub lpfnHook: LPOFNHOOKPROC, - pub lpTemplateName: ::LPCWSTR, - pub pvReserved: *mut ::c_void, - pub dwReserved: ::DWORD, - pub FlagsEx: ::DWORD, -} -impl Clone for OPENFILENAMEW { fn clone(&self) -> OPENFILENAMEW { *self } } -pub type LPOPENFILENAMEW = *mut OPENFILENAMEW; -pub const OFN_READONLY: ::DWORD = 0x00000001; -pub const OFN_OVERWRITEPROMPT: ::DWORD = 0x00000002; -pub const OFN_HIDEREADONLY: ::DWORD = 0x00000004; -pub const OFN_NOCHANGEDIR: ::DWORD = 0x00000008; -pub const OFN_SHOWHELP: ::DWORD = 0x00000010; -pub const OFN_ENABLEHOOK: ::DWORD = 0x00000020; -pub const OFN_ENABLETEMPLATE: ::DWORD = 0x00000040; -pub const OFN_ENABLETEMPLATEHANDLE: ::DWORD = 0x00000080; -pub const OFN_NOVALIDATE: ::DWORD = 0x00000100; -pub const OFN_ALLOWMULTISELECT: ::DWORD = 0x00000200; -pub const OFN_EXTENSIONDIFFERENT: ::DWORD = 0x00000400; -pub const OFN_PATHMUSTEXIST: ::DWORD = 0x00000800; -pub const OFN_FILEMUSTEXIST: ::DWORD = 0x00001000; -pub const OFN_CREATEPROMPT: ::DWORD = 0x00002000; -pub const OFN_SHAREAWARE: ::DWORD = 0x00004000; -pub const OFN_NOREADONLYRETURN: ::DWORD = 0x00008000; -pub const OFN_NOTESTFILECREATE: ::DWORD = 0x00010000; -pub const OFN_NONETWORKBUTTON: ::DWORD = 0x00020000; -pub const OFN_NOLONGNAMES: ::DWORD = 0x00040000; -pub const OFN_EXPLORER: ::DWORD = 0x00080000; -pub const OFN_NODEREFERENCELINKS: ::DWORD = 0x00100000; -pub const OFN_LONGNAMES: ::DWORD = 0x00200000; -pub const OFN_ENABLEINCLUDENOTIFY: ::DWORD = 0x00400000; -pub const OFN_ENABLESIZING: ::DWORD = 0x00800000; -pub const OFN_DONTADDTORECENT: ::DWORD = 0x02000000; -pub const OFN_FORCESHOWHIDDEN: ::DWORD = 0x10000000; -pub const OFN_EX_NOPLACESBAR: ::DWORD = 0x00000001; -pub const OFN_SHAREFALLTHROUGH: ::UINT_PTR = 2; -pub const OFN_SHARENOWARN: ::UINT_PTR = 1; -pub const OFN_SHAREWARN: ::UINT_PTR = 0; -pub type LPCCHOOKPROC = Option<unsafe extern "system" fn( - ::HWND, ::UINT, ::WPARAM, ::LPARAM, -) -> ::UINT_PTR>; -STRUCT!{struct OFNOTIFYA { - hdr: ::NMHDR, - lpOFN: LPOPENFILENAMEA, - pszFile: ::LPSTR, -}} -pub type LPOFNOTIFYA = *mut OFNOTIFYA; -STRUCT!{struct OFNOTIFYW { - hdr: ::NMHDR, - lpOFN: LPOPENFILENAMEW, - pszFile: ::LPWSTR, -}} -pub type LPOFNOTIFYW = *mut OFNOTIFYW; -STRUCT!{struct OFNOTIFYEXA { - hdr: ::NMHDR, - lpOFN: LPOPENFILENAMEA, - psf: ::LPVOID, - pidl: ::LPVOID, -}} -pub type LPOFNOTIFYEXA = *mut OFNOTIFYEXA; -STRUCT!{struct OFNOTIFYEXW { - hdr: ::NMHDR, - lpOFN: LPOPENFILENAMEW, - psf: ::LPVOID, - pidl: ::LPVOID, -}} -pub type LPOFNOTIFYEXW = *mut OFNOTIFYEXW; -pub const CDN_FIRST: ::UINT = 0 - 601; -pub const CDN_LAST: ::UINT = 0 - 699; -pub const CDN_INITDONE: ::UINT = CDN_FIRST - 0x0000; -pub const CDN_SELCHANGE: ::UINT = CDN_FIRST - 0x0001; -pub const CDN_FOLDERCHANGE: ::UINT = CDN_FIRST - 0x0002; -pub const CDN_SHAREVIOLATION: ::UINT = CDN_FIRST - 0x0003; -pub const CDN_HELP: ::UINT = CDN_FIRST - 0x0004; -pub const CDN_FILEOK: ::UINT = CDN_FIRST - 0x0005; -pub const CDN_TYPECHANGE: ::UINT = CDN_FIRST - 0x0006; -pub const CDN_INCLUDEITEM: ::UINT = CDN_FIRST - 0x0007; -pub const CDM_FIRST: ::UINT = ::WM_USER + 100; -pub const CDM_LAST: ::UINT = ::WM_USER + 200; -pub const CDM_GETSPEC: ::UINT = CDM_FIRST + 0x0000; -pub const CDM_GETFILEPATH: ::UINT = CDM_FIRST + 0x0001; -pub const CDM_GETFOLDERPATH: ::UINT = CDM_FIRST + 0x0002; -pub const CDM_GETFOLDERIDLIST: ::UINT = CDM_FIRST + 0x0003; -pub const CDM_SETCONTROLTEXT: ::UINT = CDM_FIRST + 0x0004; -pub const CDM_HIDECONTROL: ::UINT = CDM_FIRST + 0x0005; -pub const CDM_SETDEFEXT: ::UINT = CDM_FIRST + 0x0006; -#[repr(C)] #[derive(Copy)] -pub struct CHOOSECOLORA { - pub lStructSize: ::DWORD, - pub hwndOwner: ::HWND, - pub hInstance: ::HWND, - pub rgbResult: ::COLORREF, - pub lpCustColors: *mut ::COLORREF, - pub Flags: ::DWORD, - pub lCustData: ::LPARAM, - pub lpfnHook: LPCCHOOKPROC, - pub lpTemplateName: ::LPCSTR, -} -impl Clone for CHOOSECOLORA { fn clone(&self) -> CHOOSECOLORA { *self } } -pub type LPCHOOSECOLORA = *mut CHOOSECOLORA; -#[repr(C)] #[derive(Copy)] -pub struct CHOOSECOLORW { - pub lStructSize: ::DWORD, - pub hwndOwner: ::HWND, - pub hInstance: ::HWND, - pub rgbResult: ::COLORREF, - pub lpCustColors: *mut ::COLORREF, - pub Flags: ::DWORD, - pub lCustData: ::LPARAM, - pub lpfnHook: LPCCHOOKPROC, - pub lpTemplateName: ::LPCWSTR, -} -impl Clone for CHOOSECOLORW { fn clone(&self) -> CHOOSECOLORW { *self } } -pub type LPCHOOSECOLORW = *mut CHOOSECOLORW; -pub const CC_RGBINIT: ::DWORD = 0x00000001; -pub const CC_FULLOPEN: ::DWORD = 0x00000002; -pub const CC_PREVENTFULLOPEN: ::DWORD = 0x00000004; -pub const CC_SHOWHELP: ::DWORD = 0x00000008; -pub const CC_ENABLEHOOK: ::DWORD = 0x00000010; -pub const CC_ENABLETEMPLATE: ::DWORD = 0x00000020; -pub const CC_ENABLETEMPLATEHANDLE: ::DWORD = 0x00000040; -pub const CC_SOLIDCOLOR: ::DWORD = 0x00000080; -pub const CC_ANYCOLOR: ::DWORD = 0x00000100; -pub type LPFRHOOKPROC = Option<unsafe extern "system" fn( - ::HWND, ::UINT, ::WPARAM, ::LPARAM, -) -> ::UINT_PTR>; -#[repr(C)] #[derive(Copy)] -pub struct FINDREPLACEA { - pub lStructSize: ::DWORD, - pub hwndOwner: ::HWND, - pub hInstance: ::HINSTANCE, - pub Flags: ::DWORD, - pub lpstrFindWhat: ::LPSTR, - pub lpstrReplaceWith: ::LPSTR, - pub wFindWhatLen: ::WORD, - pub wReplaceWithLen: ::WORD, - pub lCustData: ::LPARAM, - pub lpfnHook: LPFRHOOKPROC, - pub lpTemplateName: ::LPCSTR, -} -impl Clone for FINDREPLACEA { fn clone(&self) -> FINDREPLACEA { *self } } -pub type LPFINDREPLACEA = *mut FINDREPLACEA; -#[repr(C)] #[derive(Copy)] -pub struct FINDREPLACEW { - pub lStructSize: ::DWORD, - pub hwndOwner: ::HWND, - pub hInstance: ::HINSTANCE, - pub Flags: ::DWORD, - pub lpstrFindWhat: ::LPWSTR, - pub lpstrReplaceWith: ::LPWSTR, - pub wFindWhatLen: ::WORD, - pub wReplaceWithLen: ::WORD, - pub lCustData: ::LPARAM, - pub lpfnHook: LPFRHOOKPROC, - pub lpTemplateName: ::LPCWSTR, -} -impl Clone for FINDREPLACEW { fn clone(&self) -> FINDREPLACEW { *self } } -pub type LPFINDREPLACEW = *mut FINDREPLACEW; -pub const FR_DOWN: ::DWORD = 0x00000001; -pub const FR_WHOLEWORD: ::DWORD = 0x00000002; -pub const FR_MATCHCASE: ::DWORD = 0x00000004; -pub const FR_FINDNEXT: ::DWORD = 0x00000008; -pub const FR_REPLACE: ::DWORD = 0x00000010; -pub const FR_REPLACEALL: ::DWORD = 0x00000020; -pub const FR_DIALOGTERM: ::DWORD = 0x00000040; -pub const FR_SHOWHELP: ::DWORD = 0x00000080; -pub const FR_ENABLEHOOK: ::DWORD = 0x00000100; -pub const FR_ENABLETEMPLATE: ::DWORD = 0x00000200; -pub const FR_NOUPDOWN: ::DWORD = 0x00000400; -pub const FR_NOMATCHCASE: ::DWORD = 0x00000800; -pub const FR_NOWHOLEWORD: ::DWORD = 0x00001000; -pub const FR_ENABLETEMPLATEHANDLE: ::DWORD = 0x00002000; -pub const FR_HIDEUPDOWN: ::DWORD = 0x00004000; -pub const FR_HIDEMATCHCASE: ::DWORD = 0x00008000; -pub const FR_HIDEWHOLEWORD: ::DWORD = 0x00010000; -pub const FR_RAW: ::DWORD = 0x00020000; -pub const FR_MATCHDIAC: ::DWORD = 0x20000000; -pub const FR_MATCHKASHIDA: ::DWORD = 0x40000000; -pub const FR_MATCHALEFHAMZA: ::DWORD = 0x80000000; -pub type LPCFHOOKPROC = Option<unsafe extern "system" fn( - ::HWND, ::UINT, ::WPARAM, ::LPARAM, -) -> ::UINT_PTR>; -#[repr(C)] #[derive(Copy)] -pub struct CHOOSEFONTA { - pub lStructSize: ::DWORD, - pub hwndOwner: ::HWND, - pub hDC: ::HDC, - pub lpLogFont: ::LPLOGFONTA, - pub iPointSize: ::INT, - pub Flags: ::DWORD, - pub rgbColors: ::COLORREF, - pub lCustData: ::LPARAM, - pub lpfnHook: LPCFHOOKPROC, - pub lpTemplateName: ::LPCSTR, - pub hInstance: ::HINSTANCE, - pub lpszStyle: ::LPSTR, - pub nFontType: ::WORD, - pub ___MISSING_ALIGNMENT__: ::WORD, - pub nSizeMin: ::INT, - pub nSizeMax: ::INT, -} -impl Clone for CHOOSEFONTA { fn clone(&self) -> CHOOSEFONTA { *self } } -pub type LPCHOOSEFONTA = *mut CHOOSEFONTA; -#[repr(C)] #[derive(Copy)] -pub struct CHOOSEFONTW { - pub lStructSize: ::DWORD, - pub hwndOwner: ::HWND, - pub hDC: ::HDC, - pub lpLogFont: ::LPLOGFONTW, - pub iPointSize: ::INT, - pub Flags: ::DWORD, - pub rgbColors: ::COLORREF, - pub lCustData: ::LPARAM, - pub lpfnHook: LPCFHOOKPROC, - pub lpTemplateName: ::LPCWSTR, - pub hInstance: ::HINSTANCE, - pub lpszStyle: ::LPWSTR, - pub nFontType: ::WORD, - pub ___MISSING_ALIGNMENT__: ::WORD, - pub nSizeMin: ::INT, - pub nSizeMax: ::INT, -} -impl Clone for CHOOSEFONTW { fn clone(&self) -> CHOOSEFONTW { *self } } -pub type LPCHOOSEFONTW = *mut CHOOSEFONTW; -pub const CF_SCREENFONTS: ::DWORD = 0x00000001; -pub const CF_PRINTERFONTS: ::DWORD = 0x00000002; -pub const CF_BOTH: ::DWORD = CF_SCREENFONTS | CF_PRINTERFONTS; -pub const CF_SHOWHELP: ::DWORD = 0x00000004; -pub const CF_ENABLEHOOK: ::DWORD = 0x00000008; -pub const CF_ENABLETEMPLATE: ::DWORD = 0x00000010; -pub const CF_ENABLETEMPLATEHANDLE: ::DWORD = 0x00000020; -pub const CF_INITTOLOGFONTSTRUCT: ::DWORD = 0x00000040; -pub const CF_USESTYLE: ::DWORD = 0x00000080; -pub const CF_EFFECTS: ::DWORD = 0x00000100; -pub const CF_APPLY: ::DWORD = 0x00000200; -pub const CF_ANSIONLY: ::DWORD = 0x00000400; -pub const CF_SCRIPTSONLY: ::DWORD = CF_ANSIONLY; -pub const CF_NOVECTORFONTS: ::DWORD = 0x00000800; -pub const CF_NOOEMFONTS: ::DWORD = CF_NOVECTORFONTS; -pub const CF_NOSIMULATIONS: ::DWORD = 0x00001000; -pub const CF_LIMITSIZE: ::DWORD = 0x00002000; -pub const CF_FIXEDPITCHONLY: ::DWORD = 0x00004000; -pub const CF_WYSIWYG: ::DWORD = 0x00008000; -pub const CF_FORCEFONTEXIST: ::DWORD = 0x00010000; -pub const CF_SCALABLEONLY: ::DWORD = 0x00020000; -pub const CF_TTONLY: ::DWORD = 0x00040000; -pub const CF_NOFACESEL: ::DWORD = 0x00080000; -pub const CF_NOSTYLESEL: ::DWORD = 0x00100000; -pub const CF_NOSIZESEL: ::DWORD = 0x00200000; -pub const CF_SELECTSCRIPT: ::DWORD = 0x00400000; -pub const CF_NOSCRIPTSEL: ::DWORD = 0x00800000; -pub const CF_NOVERTFONTS: ::DWORD = 0x01000000; -pub const CF_INACTIVEFONTS: ::DWORD = 0x02000000; -pub const SIMULATED_FONTTYPE: ::WORD = 0x8000; -pub const PRINTER_FONTTYPE: ::WORD = 0x4000; -pub const SCREEN_FONTTYPE: ::WORD = 0x2000; -pub const BOLD_FONTTYPE: ::WORD = 0x0100; -pub const ITALIC_FONTTYPE: ::WORD = 0x0200; -pub const REGULAR_FONTTYPE: ::WORD = 0x0400; -pub const PS_OPENTYPE_FONTTYPE: ::DWORD = 0x10000; -pub const TT_OPENTYPE_FONTTYPE: ::DWORD = 0x20000; -pub const TYPE1_FONTTYPE: ::DWORD = 0x40000; -pub const SYMBOL_FONTTYPE: ::DWORD = 0x80000; -pub const WM_CHOOSEFONT_GETLOGFONT: ::UINT = ::WM_USER + 1; -pub const WM_CHOOSEFONT_SETLOGFONT: ::UINT = ::WM_USER + 101; -pub const WM_CHOOSEFONT_SETFLAGS: ::UINT = ::WM_USER + 102; -pub const CD_LBSELNOITEMS: ::WORD = 0 - 1; -pub const CD_LBSELCHANGE: ::WORD = 0; -pub const CD_LBSELSUB: ::WORD = 1; -pub const CD_LBSELADD: ::WORD = 2; -pub type LPPRINTHOOKPROC = Option<unsafe extern "system" fn( - ::HWND, ::UINT, ::WPARAM, ::LPARAM, -) -> ::UINT_PTR>; -pub type LPSETUPHOOKPROC = Option<unsafe extern "system" fn( - ::HWND, ::UINT, ::WPARAM, ::LPARAM, -) -> ::UINT_PTR>; -#[repr(C)] #[derive(Copy)] -pub struct PRINTDLGA { - pub lStructSize: ::DWORD, - pub hwndOwner: ::HWND, - pub hDevMode: ::HGLOBAL, - pub hDevNames: ::HGLOBAL, - pub hDC: ::HDC, - pub Flags: ::DWORD, - pub nFromPage: ::WORD, - pub nToPage: ::WORD, - pub nMinPage: ::WORD, - pub nMaxPage: ::WORD, - pub nCopies: ::WORD, - pub hInstance: ::HINSTANCE, - pub lCustData: ::LPARAM, - pub lpfnPrintHook: LPPRINTHOOKPROC, - pub lpfnSetupHook: LPSETUPHOOKPROC, - pub lpPrintTemplateName: ::LPCSTR, - pub lpSetupTemplateName: ::LPCSTR, - pub hPrintTemplate: ::HGLOBAL, - pub hSetupTemplate: ::HGLOBAL, -} -impl Clone for PRINTDLGA { fn clone(&self) -> PRINTDLGA { *self } } -pub type LPPRINTDLGA = *mut PRINTDLGA; -#[repr(C)] #[derive(Copy)] -pub struct PRINTDLGW { - pub lStructSize: ::DWORD, - pub hwndOwner: ::HWND, - pub hDevMode: ::HGLOBAL, - pub hDevNames: ::HGLOBAL, - pub hDC: ::HDC, - pub Flags: ::DWORD, - pub nFromPage: ::WORD, - pub nToPage: ::WORD, - pub nMinPage: ::WORD, - pub nMaxPage: ::WORD, - pub nCopies: ::WORD, - pub hInstance: ::HINSTANCE, - pub lCustData: ::LPARAM, - pub lpfnPrintHook: LPPRINTHOOKPROC, - pub lpfnSetupHook: LPSETUPHOOKPROC, - pub lpPrintTemplateName: ::LPCWSTR, - pub lpSetupTemplateName: ::LPCWSTR, - pub hPrintTemplate: ::HGLOBAL, - pub hSetupTemplate: ::HGLOBAL, -} -impl Clone for PRINTDLGW { fn clone(&self) -> PRINTDLGW { *self } } -pub type LPPRINTDLGW = *mut PRINTDLGW; -RIDL!( -interface IPrintDialogCallback(IPrintDialogCallbackVtbl) : IUnknown(IUnknownVtbl) { - fn InitDone(&mut self) -> ::HRESULT, - fn SelectionChange(&mut self) -> ::HRESULT, - fn HandleMessage( - &mut self, hDlg: ::HWND, uMsg: ::UINT, wParam: ::WPARAM, lParam: ::LPARAM, - pResult: *mut ::LRESULT - ) -> ::HRESULT -} -); -RIDL!( -interface IPrintDialogServices(IPrintDialogServicesVtbl) : IUnknown(IUnknownVtbl) { - fn GetCurrentDevMode(&mut self, pDevMode: ::LPDEVMODEW, pcbSize: *mut ::UINT) -> ::HRESULT, - fn GetCurrentPrinterName(&mut self, pPrinterName: ::LPWSTR, pcchSize: *mut ::UINT) -> ::HRESULT, - fn GetCurrentPortName(&mut self, pPortName: ::LPWSTR, pcchSize: *mut ::UINT) -> ::HRESULT -} -); -STRUCT!{struct PRINTPAGERANGE { - nFromPage: ::DWORD, - nToPage: ::DWORD, -}} -pub type LPPRINTPAGERANGE = *mut PRINTPAGERANGE; -pub type PCPRINTPAGERANGE = *const PRINTPAGERANGE; -STRUCT!{struct PRINTDLGEXA { - lStructSize: ::DWORD, - hwndOwner: ::HWND, - hDevMode: ::HGLOBAL, - hDevNames: ::HGLOBAL, - hDC: ::HDC, - Flags: ::DWORD, - Flags2: ::DWORD, - ExclusionFlags: ::DWORD, - nPageRanges: ::DWORD, - nMaxPageRanges: ::DWORD, - lpPageRanges: LPPRINTPAGERANGE, - nMinPage: ::DWORD, - nMaxPage: ::DWORD, - nCopies: ::DWORD, - hInstance: ::HINSTANCE, - lpPrintTemplateName: ::LPCSTR, - lpCallback: ::LPUNKNOWN, - nPropertyPages: ::DWORD, - lphPropertyPages: *mut ::HPROPSHEETPAGE, - nStartPage: ::DWORD, - dwResultAction: ::DWORD, -}} -pub type LPPRINTDLGEXA = *mut PRINTDLGEXA; -STRUCT!{struct PRINTDLGEXW { - lStructSize: ::DWORD, - hwndOwner: ::HWND, - hDevMode: ::HGLOBAL, - hDevNames: ::HGLOBAL, - hDC: ::HDC, - Flags: ::DWORD, - Flags2: ::DWORD, - ExclusionFlags: ::DWORD, - nPageRanges: ::DWORD, - nMaxPageRanges: ::DWORD, - lpPageRanges: LPPRINTPAGERANGE, - nMinPage: ::DWORD, - nMaxPage: ::DWORD, - nCopies: ::DWORD, - hInstance: ::HINSTANCE, - lpPrintTemplateName: ::LPCWSTR, - lpCallback: ::LPUNKNOWN, - nPropertyPages: ::DWORD, - lphPropertyPages: *mut ::HPROPSHEETPAGE, - nStartPage: ::DWORD, - dwResultAction: ::DWORD, -}} -pub type LPPRINTDLGEXW = *mut PRINTDLGEXW; -pub const PD_ALLPAGES: ::DWORD = 0x00000000; -pub const PD_SELECTION: ::DWORD = 0x00000001; -pub const PD_PAGENUMS: ::DWORD = 0x00000002; -pub const PD_NOSELECTION: ::DWORD = 0x00000004; -pub const PD_NOPAGENUMS: ::DWORD = 0x00000008; -pub const PD_COLLATE: ::DWORD = 0x00000010; -pub const PD_PRINTTOFILE: ::DWORD = 0x00000020; -pub const PD_PRINTSETUP: ::DWORD = 0x00000040; -pub const PD_NOWARNING: ::DWORD = 0x00000080; -pub const PD_RETURNDC: ::DWORD = 0x00000100; -pub const PD_RETURNIC: ::DWORD = 0x00000200; -pub const PD_RETURNDEFAULT: ::DWORD = 0x00000400; -pub const PD_SHOWHELP: ::DWORD = 0x00000800; -pub const PD_ENABLEPRINTHOOK: ::DWORD = 0x00001000; -pub const PD_ENABLESETUPHOOK: ::DWORD = 0x00002000; -pub const PD_ENABLEPRINTTEMPLATE: ::DWORD = 0x00004000; -pub const PD_ENABLESETUPTEMPLATE: ::DWORD = 0x00008000; -pub const PD_ENABLEPRINTTEMPLATEHANDLE: ::DWORD = 0x00010000; -pub const PD_ENABLESETUPTEMPLATEHANDLE: ::DWORD = 0x00020000; -pub const PD_USEDEVMODECOPIES: ::DWORD = 0x00040000; -pub const PD_USEDEVMODECOPIESANDCOLLATE: ::DWORD = 0x00040000; -pub const PD_DISABLEPRINTTOFILE: ::DWORD = 0x00080000; -pub const PD_HIDEPRINTTOFILE: ::DWORD = 0x00100000; -pub const PD_NONETWORKBUTTON: ::DWORD = 0x00200000; -pub const PD_CURRENTPAGE: ::DWORD = 0x00400000; -pub const PD_NOCURRENTPAGE: ::DWORD = 0x00800000; -pub const PD_EXCLUSIONFLAGS: ::DWORD = 0x01000000; -pub const PD_USELARGETEMPLATE: ::DWORD = 0x10000000; -pub const PD_EXCL_COPIESANDCOLLATE: ::DWORD = ::DM_COPIES | ::DM_COLLATE; -pub const START_PAGE_GENERAL: ::DWORD = 0xffffffff; -pub const PD_RESULT_CANCEL: ::DWORD = 0; -pub const PD_RESULT_PRINT: ::DWORD = 1; -pub const PD_RESULT_APPLY: ::DWORD = 2; -STRUCT!{struct DEVNAMES { - wDriverOffset: ::WORD, - wDeviceOffset: ::WORD, - wOutputOffset: ::WORD, - wDefault: ::WORD, -}} -pub type LPDEVNAMES = *mut DEVNAMES; -pub type PCDEVNAMES = *const DEVNAMES; -pub const DN_DEFAULTPRN: ::WORD = 0x0001; -pub const WM_PSD_PAGESETUPDLG: ::UINT = ::WM_USER; -pub const WM_PSD_FULLPAGERECT: ::UINT = ::WM_USER + 1; -pub const WM_PSD_MINMARGINRECT: ::UINT = ::WM_USER + 2; -pub const WM_PSD_MARGINRECT: ::UINT = ::WM_USER + 3; -pub const WM_PSD_GREEKTEXTRECT: ::UINT = ::WM_USER + 4; -pub const WM_PSD_ENVSTAMPRECT: ::UINT = ::WM_USER + 5; -pub const WM_PSD_YAFULLPAGERECT: ::UINT = ::WM_USER + 6; -pub type LPPAGEPAINTHOOK = Option<unsafe extern "system" fn( - ::HWND, ::UINT, ::WPARAM, ::LPARAM, -) -> ::UINT_PTR>; -pub type LPPAGESETUPHOOK = Option<unsafe extern "system" fn( - ::HWND, ::UINT, ::WPARAM, ::LPARAM, -) -> ::UINT_PTR>; -#[repr(C)] #[derive(Copy)] -pub struct PAGESETUPDLGA { - pub lStructSize: ::DWORD, - pub hwndOwner: ::HWND, - pub hDevMode: ::HGLOBAL, - pub hDevNames: ::HGLOBAL, - pub Flags: ::DWORD, - pub ptPaperSize: ::POINT, - pub rtMinMargin: ::RECT, - pub rtMargin: ::RECT, - pub hInstance: ::HINSTANCE, - pub lCustData: ::LPARAM, - pub lpfnPageSetupHook: LPPAGESETUPHOOK, - pub lpfnPagePaintHook: LPPAGEPAINTHOOK, - pub lpPageSetupTemplateName: ::LPCSTR, - pub hPageSetupTemplate: ::HGLOBAL, -} -impl Clone for PAGESETUPDLGA { fn clone(&self) -> PAGESETUPDLGA { *self } } -pub type LPPAGESETUPDLGA = *mut PAGESETUPDLGA; -#[repr(C)] #[derive(Copy)] -pub struct PAGESETUPDLGW { - pub lStructSize: ::DWORD, - pub hwndOwner: ::HWND, - pub hDevMode: ::HGLOBAL, - pub hDevNames: ::HGLOBAL, - pub Flags: ::DWORD, - pub ptPaperSize: ::POINT, - pub rtMinMargin: ::RECT, - pub rtMargin: ::RECT, - pub hInstance: ::HINSTANCE, - pub lCustData: ::LPARAM, - pub lpfnPageSetupHook: LPPAGESETUPHOOK, - pub lpfnPagePaintHook: LPPAGEPAINTHOOK, - pub lpPageSetupTemplateName: ::LPCWSTR, - pub hPageSetupTemplate: ::HGLOBAL, -} -impl Clone for PAGESETUPDLGW { fn clone(&self) -> PAGESETUPDLGW { *self } } -pub type LPPAGESETUPDLGW = *mut PAGESETUPDLGW; -pub const PSD_DEFAULTMINMARGINS: ::DWORD = 0x00000000; -pub const PSD_INWININIINTLMEASURE: ::DWORD = 0x00000000; -pub const PSD_MINMARGINS: ::DWORD = 0x00000001; -pub const PSD_MARGINS: ::DWORD = 0x00000002; -pub const PSD_INTHOUSANDTHSOFINCHES: ::DWORD = 0x00000004; -pub const PSD_INHUNDREDTHSOFMILLIMETERS: ::DWORD = 0x00000008; -pub const PSD_DISABLEMARGINS: ::DWORD = 0x00000010; -pub const PSD_DISABLEPRINTER: ::DWORD = 0x00000020; -pub const PSD_NOWARNING: ::DWORD = 0x00000080; -pub const PSD_DISABLEORIENTATION: ::DWORD = 0x00000100; -pub const PSD_RETURNDEFAULT: ::DWORD = 0x00000400; -pub const PSD_DISABLEPAPER: ::DWORD = 0x00000200; -pub const PSD_SHOWHELP: ::DWORD = 0x00000800; -pub const PSD_ENABLEPAGESETUPHOOK: ::DWORD = 0x00002000; -pub const PSD_ENABLEPAGESETUPTEMPLATE: ::DWORD = 0x00008000; -pub const PSD_ENABLEPAGESETUPTEMPLATEHANDLE: ::DWORD = 0x00020000; -pub const PSD_ENABLEPAGEPAINTHOOK: ::DWORD = 0x00040000; -pub const PSD_DISABLEPAGEPAINTING: ::DWORD = 0x00080000; -pub const PSD_NONETWORKBUTTON: ::DWORD = 0x00200000; diff --git a/deps/winapi-0.2.5/src/d2d1.rs b/deps/winapi-0.2.5/src/d2d1.rs deleted file mode 100644 index 6eb8f3316..000000000 --- a/deps/winapi-0.2.5/src/d2d1.rs +++ /dev/null @@ -1,734 +0,0 @@ -// Copyright © 2015, Connor Hilarides -// Licensed under the MIT License <LICENSE.md> -//! Mappings for the contents of d2d1.h -// Types confirmed affected by the ABI issue: -// D2D1_SIZE_F, D2D1_SIZE_U, D2D1_COLOR_F, D2D1_PIXEL_FORMAT, -// D2D1_POINT_2F -pub const D2D1_DEFAULT_FLATTENING_TOLERANCE: ::FLOAT = 0.25; -pub const D2D1_INTERPOLATION_MODE_DEFINITION_NEAREST_NEIGHBOR: ::DWORD = 0; -pub const D2D1_INTERPOLATION_MODE_DEFINITION_LINEAR: ::DWORD = 1; -pub const D2D1_INTERPOLATION_MODE_DEFINITION_CUBIC: ::DWORD = 2; -pub const D2D1_INTERPOLATION_MODE_DEFINITION_MULTI_SAMPLE_LINEAR: ::DWORD = 3; -pub const D2D1_INTERPOLATION_MODE_DEFINITION_ANISOTROPIC: ::DWORD = 4; -pub const D2D1_INTERPOLATION_MODE_DEFINITION_HIGH_QUALITY_CUBIC: ::DWORD = 5; -pub const D2D1_INTERPOLATION_MODE_DEFINITION_FANT: ::DWORD = 6; -pub const D2D1_INTERPOLATION_MODE_DEFINITION_MIPMAP_LINEAR: ::DWORD = 7; -ENUM!{enum D2D1_GAMMA { - D2D1_GAMMA_2_2 = 0, - D2D1_GAMMA_1_0 = 1, -}} -ENUM!{enum D2D1_OPACITY_MASK_CONTENT { - D2D1_OPACITY_MASK_CONTENT_GRAPHICS = 0, - D2D1_OPACITY_MASK_CONTENT_TEXT_NATURAL = 1, - D2D1_OPACITY_MASK_CONTENT_TEXT_GDI_COMPATIBLE = 2, -}} -ENUM!{enum D2D1_EXTEND_MODE { - D2D1_EXTEND_MODE_CLAMP = 0, - D2D1_EXTEND_MODE_WRAP = 1, - D2D1_EXTEND_MODE_MIRROR = 2, -}} -ENUM!{enum D2D1_ANTIALIAS_MODE { - D2D1_ANTIALIAS_MODE_PER_PRIMITIVE = 0, - D2D1_ANTIALIAS_MODE_ALIASED = 1, -}} -ENUM!{enum D2D1_TEXT_ANTIALIAS_MODE { - D2D1_TEXT_ANTIALIAS_MODE_DEFAULT = 0, - D2D1_TEXT_ANTIALIAS_MODE_CLEARTYPE = 1, - D2D1_TEXT_ANTIALIAS_MODE_GRAYSCALE = 2, - D2D1_TEXT_ANTIALIAS_MODE_ALIASED = 3, -}} -ENUM!{enum D2D1_BITMAP_INTERPOLATION_MODE { - D2D1_BITMAP_INTERPOLATION_MODE_NEAREST_NEIGHBOR = - D2D1_INTERPOLATION_MODE_DEFINITION_NEAREST_NEIGHBOR, - D2D1_BITMAP_INTERPOLATION_MODE_LINEAR = - D2D1_INTERPOLATION_MODE_DEFINITION_LINEAR, -}} -FLAGS!{enum D2D1_DRAW_TEXT_OPTIONS { - D2D1_DRAW_TEXT_OPTIONS_NO_SNAP = 0x00000001, - D2D1_DRAW_TEXT_OPTIONS_CLIP = 0x00000002, - D2D1_DRAW_TEXT_OPTIONS_ENABLE_COLOR_FONT = 0x00000004, - D2D1_DRAW_TEXT_OPTIONS_NONE = 0x00000000, -}} -pub type D2D1_POINT_2U = ::D2D_POINT_2U; -pub type D2D1_POINT_2F = ::D2D_POINT_2F; -pub type D2D1_RECT_F = ::D2D_RECT_F; -pub type D2D1_RECT_U = ::D2D_RECT_U; -pub type D2D1_SIZE_F = ::D2D_SIZE_F; -pub type D2D1_SIZE_U = ::D2D_SIZE_U; -pub type D2D1_COLOR_F = ::D2D_COLOR_F; -pub type D2D1_MATRIX_3X2_F = ::D2D_MATRIX_3X2_F; -pub type D2D1_TAG = ::UINT64; -STRUCT!{struct D2D1_BITMAP_PROPERTIES { - pixelFormat: ::D2D1_PIXEL_FORMAT, - dpiX: ::FLOAT, - dpiY: ::FLOAT, -}} -STRUCT!{struct D2D1_GRADIENT_STOP { - position: ::FLOAT, - color: D2D1_COLOR_F, -}} -STRUCT!{struct D2D1_BRUSH_PROPERTIES { - opacity: ::FLOAT, - transform: D2D1_MATRIX_3X2_F, -}} -STRUCT!{struct D2D1_BITMAP_BRUSH_PROPERTIES { - extendModeX: D2D1_EXTEND_MODE, - extendModeY: D2D1_EXTEND_MODE, - interpolationMode: D2D1_BITMAP_INTERPOLATION_MODE, -}} -STRUCT!{struct D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES { - startPoint: ::D2D1_POINT_2F, - endPoint: ::D2D1_POINT_2F, -}} -STRUCT!{struct D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES { - center: ::D2D1_POINT_2F, - gradientOriginOffset: ::D2D1_POINT_2F, - radiusX: ::FLOAT, - radiusY: ::FLOAT, -}} -ENUM!{enum D2D1_ARC_SIZE { - D2D1_ARC_SIZE_SMALL = 0, - D2D1_ARC_SIZE_LARGE = 1, -}} -ENUM!{enum D2D1_CAP_STYLE { - D2D1_CAP_STYLE_FLAT = 0, - D2D1_CAP_STYLE_SQUARE = 1, - D2D1_CAP_STYLE_ROUND = 2, - D2D1_CAP_STYLE_TRIANGLE = 3, -}} -ENUM!{enum D2D1_DASH_STYLE { - D2D1_DASH_STYLE_SOLID = 0, - D2D1_DASH_STYLE_DASH = 1, - D2D1_DASH_STYLE_DOT = 2, - D2D1_DASH_STYLE_DASH_DOT = 3, - D2D1_DASH_STYLE_DASH_DOT_DOT = 4, - D2D1_DASH_STYLE_CUSTOM = 5, -}} -ENUM!{enum D2D1_LINE_JOIN { - D2D1_LINE_JOIN_MITER = 0, - D2D1_LINE_JOIN_BEVEL = 1, - D2D1_LINE_JOIN_ROUND = 2, - D2D1_LINE_JOIN_MITER_OR_BEVEL = 3, -}} -ENUM!{enum D2D1_COMBINE_MODE { - D2D1_COMBINE_MODE_UNION = 0, - D2D1_COMBINE_MODE_INTERSECT = 1, - D2D1_COMBINE_MODE_XOR = 2, - D2D1_COMBINE_MODE_EXCLUDE = 3, -}} -ENUM!{enum D2D1_GEOMETRY_RELATION { - D2D1_GEOMETRY_RELATION_UNKNOWN = 0, - D2D1_GEOMETRY_RELATION_DISJOINT = 1, - D2D1_GEOMETRY_RELATION_IS_CONTAINED = 2, - D2D1_GEOMETRY_RELATION_CONTAINS = 3, - D2D1_GEOMETRY_RELATION_OVERLAP = 4, -}} -ENUM!{enum D2D1_GEOMETRY_SIMPLIFICATION_OPTION { - D2D1_GEOMETRY_SIMPLIFICATION_OPTION_CUBICS_AND_LINES = 0, - D2D1_GEOMETRY_SIMPLIFICATION_OPTION_LINES = 1, -}} -ENUM!{enum D2D1_FIGURE_BEGIN { - D2D1_FIGURE_BEGIN_FILLED = 0, - D2D1_FIGURE_BEGIN_HOLLOW = 1, -}} -ENUM!{enum D2D1_FIGURE_END { - D2D1_FIGURE_END_OPEN = 0, - D2D1_FIGURE_END_CLOSED = 1, -}} -STRUCT!{struct D2D1_BEZIER_SEGMENT { - point1: ::D2D1_POINT_2F, - point2: ::D2D1_POINT_2F, - point3: ::D2D1_POINT_2F, -}} -STRUCT!{struct D2D1_TRIANGLE { - point1: ::D2D1_POINT_2F, - point2: ::D2D1_POINT_2F, - point3: ::D2D1_POINT_2F, -}} -FLAGS!{enum D2D1_PATH_SEGMENT { - D2D1_PATH_SEGMENT_NONE = 0x00000000, - D2D1_PATH_SEGMENT_FORCE_UNSTROKED = 0x00000001, - D2D1_PATH_SEGMENT_FORCE_ROUND_LINE_JOIN = 0x00000002, -}} -ENUM!{enum D2D1_SWEEP_DIRECTION { - D2D1_SWEEP_DIRECTION_COUNTER_CLOCKWISE = 0, - D2D1_SWEEP_DIRECTION_CLOCKWISE = 1, -}} -ENUM!{enum D2D1_FILL_MODE { - D2D1_FILL_MODE_ALTERNATE = 0, - D2D1_FILL_MODE_WINDING = 1, -}} -STRUCT!{struct D2D1_ARC_SEGMENT { - point: ::D2D1_POINT_2F, - size: D2D1_SIZE_F, - rotationAngle: ::FLOAT, - sweepDirection: D2D1_SWEEP_DIRECTION, - arcSize: D2D1_ARC_SIZE, -}} -STRUCT!{struct D2D1_QUADRATIC_BEZIER_SEGMENT { - point1: ::D2D1_POINT_2F, - point2: ::D2D1_POINT_2F, -}} -STRUCT!{struct D2D1_ELLIPSE { - point: ::D2D1_POINT_2F, - radiusX: ::FLOAT, - radiusY: ::FLOAT, -}} -STRUCT!{struct D2D1_ROUNDED_RECT { - rect: ::D2D1_RECT_F, - radiusX: ::FLOAT, - radiusY: ::FLOAT, -}} -STRUCT!{struct D2D1_STROKE_STYLE_PROPERTIES { - startCap: D2D1_CAP_STYLE, - endCap: D2D1_CAP_STYLE, - dashCap: D2D1_CAP_STYLE, - lineJoin: D2D1_LINE_JOIN, - miterLimit: ::FLOAT, - dashStyle: D2D1_DASH_STYLE, - dashOffset: ::FLOAT, -}} -FLAGS!{enum D2D1_LAYER_OPTIONS { - D2D1_LAYER_OPTIONS_NONE = 0x00000000, - D2D1_LAYER_OPTIONS_INITIALIZE_FOR_CLEARTYPE = 0x00000001, -}} -STRUCT!{struct D2D1_LAYER_PARAMETERS { - contentBounds: ::D2D1_RECT_F, - geometricMask: *mut ID2D1Geometry, - maskAntialiasMode: D2D1_ANTIALIAS_MODE, - maskTransform: D2D1_MATRIX_3X2_F, - opacity: ::FLOAT, - opacityBrush: *mut ID2D1Brush, - layerOptions: D2D1_LAYER_OPTIONS, -}} -ENUM!{enum D2D1_WINDOW_STATE { - D2D1_WINDOW_STATE_NONE = 0x0000000, - D2D1_WINDOW_STATE_OCCLUDED = 0x0000001, -}} -ENUM!{enum D2D1_RENDER_TARGET_TYPE { - D2D1_RENDER_TARGET_TYPE_DEFAULT = 0, - D2D1_RENDER_TARGET_TYPE_SOFTWARE = 1, - D2D1_RENDER_TARGET_TYPE_HARDWARE = 2, -}} -ENUM!{enum D2D1_FEATURE_LEVEL { - D2D1_FEATURE_LEVEL_DEFAULT = 0, - D2D1_FEATURE_LEVEL_9 = ::D3D_FEATURE_LEVEL_9_1.0, - D2D1_FEATURE_LEVEL_10 = ::D3D_FEATURE_LEVEL_10_0.0, -}} -FLAGS!{enum D2D1_RENDER_TARGET_USAGE { - D2D1_RENDER_TARGET_USAGE_NONE = 0x00000000, - D2D1_RENDER_TARGET_USAGE_FORCE_BITMAP_REMOTING = 0x00000001, - D2D1_RENDER_TARGET_USAGE_GDI_COMPATIBLE = 0x00000002, -}} -FLAGS!{enum D2D1_PRESENT_OPTIONS { - D2D1_PRESENT_OPTIONS_NONE = 0x00000000, - D2D1_PRESENT_OPTIONS_RETAIN_CONTENTS = 0x00000001, - D2D1_PRESENT_OPTIONS_IMMEDIATELY = 0x00000002, -}} -STRUCT!{struct D2D1_RENDER_TARGET_PROPERTIES { - _type: D2D1_RENDER_TARGET_TYPE, - pixelFormat: ::D2D1_PIXEL_FORMAT, - dpiX: ::FLOAT, - dpiY: ::FLOAT, - usage: D2D1_RENDER_TARGET_USAGE, - minLevel: D2D1_FEATURE_LEVEL, -}} -STRUCT!{struct D2D1_HWND_RENDER_TARGET_PROPERTIES { - hwnd: ::HWND, - pixelSize: D2D1_SIZE_U, - presentOptions: D2D1_PRESENT_OPTIONS, -}} -FLAGS!{enum D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS { - D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE = 0x00000000, - D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_GDI_COMPATIBLE = 0x00000001, -}} -STRUCT!{struct D2D1_DRAWING_STATE_DESCRIPTION { - antialiasMode: D2D1_ANTIALIAS_MODE, - textAntialiasMode: D2D1_TEXT_ANTIALIAS_MODE, - tag1: D2D1_TAG, - tag2: D2D1_TAG, - transform: D2D1_MATRIX_3X2_F, -}} -ENUM!{enum D2D1_DC_INITIALIZE_MODE { - D2D1_DC_INITIALIZE_MODE_COPY = 0, - D2D1_DC_INITIALIZE_MODE_CLEAR = 1, -}} -ENUM!{enum D2D1_DEBUG_LEVEL { - D2D1_DEBUG_LEVEL_NONE = 0, - D2D1_DEBUG_LEVEL_ERROR = 1, - D2D1_DEBUG_LEVEL_WARNING = 2, - D2D1_DEBUG_LEVEL_INFORMATION = 3, -}} -ENUM!{enum D2D1_FACTORY_TYPE { - D2D1_FACTORY_TYPE_SINGLE_THREADED = 0, - D2D1_FACTORY_TYPE_MULTI_THREADED = 1, -}} -STRUCT!{struct D2D1_FACTORY_OPTIONS { - debugLevel: D2D1_DEBUG_LEVEL, -}} -RIDL!( -interface ID2D1Resource(ID2D1ResourceVtbl): IUnknown(IUnknownVtbl) { - fn GetFactory(&mut self, factory: *mut *mut ID2D1Factory) -> ::HRESULT -}); -RIDL!( -interface ID2D1Image(ID2D1ImageVtbl): ID2D1Resource(ID2D1ResourceVtbl) { -}); -RIDL!( -interface ID2D1Bitmap(ID2D1BitmapVtbl): ID2D1Image(ID2D1ImageVtbl) { - fn GetSize(&mut self, ret: *mut D2D1_SIZE_F) -> *mut D2D1_SIZE_F, // FIXME: ABI issue - fn GetPixelSize(&mut self, ret: *mut D2D1_SIZE_U) -> *mut D2D1_SIZE_U, // FIXME: ABI issue - fn GetPixelFormat( - &mut self, ret: *mut ::D2D1_PIXEL_FORMAT - ) -> *mut ::D2D1_PIXEL_FORMAT, // FIXME: ABI issue - fn GetDpi(&mut self, dpiX: *mut ::FLOAT, dpiY: *mut ::FLOAT) -> (), - fn CopyFromBitmap( - &mut self, destPoint: *const ::D2D1_POINT_2U, bitmap: *mut ID2D1Bitmap, - srcRect: *const ::D2D1_RECT_U - ) -> ::HRESULT, - fn CopyFromRenderTarget( - &mut self, destPoint: *const ::D2D1_POINT_2U, renderTarget: *mut ID2D1RenderTarget, - srcRect: *const ::D2D1_RECT_U - ) -> ::HRESULT, - fn CopyFromMemory( - &mut self, dstRect: *const ::D2D1_RECT_U, srcData: *const ::c_void, pitch: ::UINT32 - ) -> ::HRESULT -}); -RIDL!( -interface ID2D1GradientStopCollection(ID2D1GradientStopCollectionVtbl) - : ID2D1Resource(ID2D1ResourceVtbl) { - fn GetGradientStopCount(&mut self) -> ::UINT32, - fn GetGradientStops( - &mut self, gradientStops: *mut D2D1_GRADIENT_STOP, gradientStopsCount: ::UINT32 - ) -> (), - fn GetColorInterpolationGamma(&mut self) -> D2D1_GAMMA, - fn GetExtendMode(&mut self) -> D2D1_EXTEND_MODE -}); -RIDL!( -interface ID2D1Brush(ID2D1BrushVtbl): ID2D1Resource(ID2D1ResourceVtbl) { - fn SetOpacity(&mut self, opacity: ::FLOAT) -> (), - fn SetTransform(&mut self, transform: *const D2D1_MATRIX_3X2_F) -> (), - fn GetOpacity(&mut self) -> ::FLOAT, - fn GetTransform(&mut self, transform: *mut D2D1_MATRIX_3X2_F) -> () -}); -RIDL!( -interface ID2D1BitmapBrush(ID2D1BitmapBrushVtbl): ID2D1Brush(ID2D1BrushVtbl) { - fn SetExtendModeX(&mut self, extendModeX: D2D1_EXTEND_MODE) -> (), - fn SetExtendModeY(&mut self, extendModeY: D2D1_EXTEND_MODE) -> (), - fn SetInterpolationMode(&mut self, interpolationMode: D2D1_BITMAP_INTERPOLATION_MODE) -> (), - fn SetBitmap(&mut self, bitmap: *mut ID2D1Bitmap) -> (), - fn GetExtendModeX(&mut self) -> D2D1_EXTEND_MODE, - fn GetExtendModeY(&mut self) -> D2D1_EXTEND_MODE, - fn GetInterpolationMode(&mut self) -> D2D1_BITMAP_INTERPOLATION_MODE, - fn GetBitmap(&mut self, bitmap: *mut *mut ID2D1Bitmap) -> () -}); -RIDL!( -interface ID2D1SolidColorBrush(ID2D1SolidColorBrushVtbl): ID2D1Brush(ID2D1BrushVtbl) { - fn SetColor(&mut self, color: *const D2D1_COLOR_F) -> (), - fn GetColor(&mut self, color: *mut D2D1_COLOR_F) -> *mut D2D1_COLOR_F -}); -RIDL!( -interface ID2D1LinearGradientBrush(ID2D1LinearGradientBrushVtbl): ID2D1Brush(ID2D1BrushVtbl) { - fn SetStartPoint(&mut self, startPoint: ::D2D1_POINT_2F) -> (), - fn SetEndPoint(&mut self, endPoint: ::D2D1_POINT_2F) -> (), - fn GetStartPoint(&mut self, ret: *mut D2D1_POINT_2F) -> *mut D2D1_POINT_2F, // FIXME ABI issue - fn GetEndPoint(&mut self, ret: *mut D2D1_POINT_2F) -> *mut D2D1_POINT_2F, // FIXME ABI issue - fn GetGradientStopCollection( - &mut self, gradientStopCollection: *mut *mut ID2D1GradientStopCollection - ) -> () -}); -RIDL!( -interface ID2D1RadialGradientBrush(ID2D1RadialGradientBrushVtbl): ID2D1Brush(ID2D1BrushVtbl) { - fn SetCenter(&mut self, center: ::D2D1_POINT_2F) -> (), - fn SetGradientOriginOffset(&mut self, gradientOriginOffset: ::D2D1_POINT_2F) -> (), - fn SetRadiusX(&mut self, radiusX: ::FLOAT) -> (), - fn SetRadiusY(&mut self, radiusY: ::FLOAT) -> (), - fn GetCenter(&mut self, ret: *mut D2D1_POINT_2F) -> *mut D2D1_POINT_2F, // FIXME ABI issue - fn GetGradientOriginOffset( - &mut self, ret: *mut D2D1_POINT_2F - ) -> *mut D2D1_POINT_2F, // FIXME ABI issue - fn GetRadiusX(&mut self) -> ::FLOAT, - fn GetRadiusY(&mut self) -> ::FLOAT, - fn GetGradientStopCollection( - &mut self, gradientStopCollection: *mut *mut ID2D1GradientStopCollection - ) -> () -}); -RIDL!( -interface ID2D1StrokeStyle(ID2D1StrokeStyleVtbl): ID2D1Resource(ID2D1ResourceVtbl) { - fn GetStartCap(&mut self) -> D2D1_CAP_STYLE, - fn GetEndCap(&mut self) -> D2D1_CAP_STYLE, - fn GetDashCap(&mut self) -> D2D1_CAP_STYLE, - fn GetMiterLimit(&mut self) -> ::FLOAT, - fn GetLineJoin(&mut self) -> D2D1_LINE_JOIN, - fn GetDashOffset(&mut self) -> ::FLOAT, - fn GetDashStyle(&mut self) -> D2D1_DASH_STYLE, - fn GetDashesCount(&mut self) -> ::UINT32, - fn GetDashes(&mut self, dashes: *mut ::FLOAT, dashesCount: ::UINT32) -> () -}); -RIDL!( -interface ID2D1Geometry(ID2D1GeometryVtbl): ID2D1Resource(ID2D1ResourceVtbl) { - fn GetBounds( - &mut self, worldTransform: *const D2D1_MATRIX_3X2_F, bounds: *mut ::D2D1_RECT_F - ) -> ::HRESULT, - fn GetWidenedBounds( - &mut self, strokeWidth: ::FLOAT, strokeStyle: *mut ID2D1StrokeStyle, - worldTransform: *const D2D1_MATRIX_3X2_F, flatteningTolerance: ::FLOAT, - bounds: *mut ::D2D1_RECT_F - ) -> ::HRESULT, - fn StrokeContainsPoint( - &mut self, point: ::D2D1_POINT_2F, strokeWidth: ::FLOAT, strokeStyle: *mut ID2D1StrokeStyle, - worldTransform: *const D2D1_MATRIX_3X2_F, flatteningTolerance: ::FLOAT, - contains: *mut ::BOOL - ) -> ::HRESULT, - fn FillContainsPoint( - &mut self, point: ::D2D1_POINT_2F, worldTransform: *const D2D1_MATRIX_3X2_F, - flatteningTolerance: ::FLOAT, contains: *mut ::BOOL - ) -> ::HRESULT, - fn CompareWithGeometry( - &mut self, inputGeometry: *mut ID2D1Geometry, - inputGeometryTransform: *const D2D1_MATRIX_3X2_F, flatteningTolerance: ::FLOAT, - relation: *mut D2D1_GEOMETRY_RELATION - ) -> ::HRESULT, - fn Simplify( - &mut self, simplificationOption: D2D1_GEOMETRY_SIMPLIFICATION_OPTION, - worldTransform: *const D2D1_MATRIX_3X2_F, flatteningTolerance: ::FLOAT, - geometrySink: *mut ID2D1SimplifiedGeometrySink - ) -> ::HRESULT, - fn Tessellate( - &mut self, worldTransform: *const D2D1_MATRIX_3X2_F, flatteningTolerance: ::FLOAT, - tessellationSink: *mut ID2D1TessellationSink - ) -> ::HRESULT, - fn CombineWithGeometry( - &mut self, inputGeometry: *mut ID2D1Geometry, combineMode: D2D1_COMBINE_MODE, - inputGeometryTransform: *const D2D1_MATRIX_3X2_F, flatteningTolerance: ::FLOAT, - geometrySink: *mut ID2D1SimplifiedGeometrySink - ) -> ::HRESULT, - fn Outline( - &mut self, worldTransform: *const D2D1_MATRIX_3X2_F, flatteningTolerance: ::FLOAT, - geometrySink: *mut ID2D1SimplifiedGeometrySink - ) -> ::HRESULT, - fn ComputeArea( - &mut self, worldTransform: *const D2D1_MATRIX_3X2_F, flatteningTolerance: ::FLOAT, - area: *mut ::FLOAT - ) -> ::HRESULT, - fn ComputeLength( - &mut self, worldTransform: *const D2D1_MATRIX_3X2_F, flatteningTolerance: ::FLOAT, - length: *mut ::FLOAT - ) -> ::HRESULT, - fn ComputePointAtLength( - &mut self, length: ::FLOAT, worldTransform: *const D2D1_MATRIX_3X2_F, - flatteningTolerance: ::FLOAT, point: *mut ::D2D1_POINT_2F, - unitTangentVector: *mut ::D2D1_POINT_2F - ) -> ::HRESULT, - fn Widen( - &mut self, strokeWidth: ::FLOAT, strokeStyle: *mut ID2D1StrokeStyle, - worldTransform: *const D2D1_MATRIX_3X2_F, flatteningTolerance: ::FLOAT, - geometrySink: *mut ID2D1SimplifiedGeometrySink - ) -> ::HRESULT -}); -RIDL!( -interface ID2D1RectangleGeometry(ID2D1RectangleGeometryVtbl): ID2D1Geometry(ID2D1GeometryVtbl) { - fn GetRect(&mut self, rect: *mut ::D2D1_RECT_F) -> () -}); -RIDL!( -interface ID2D1RoundedRectangleGeometry(ID2D1RoundedRectangleGeometryVtbl) - : ID2D1Geometry(ID2D1GeometryVtbl) { - fn GetRoundedRect(&mut self, roundedRect: *mut D2D1_ROUNDED_RECT) -> () -}); -RIDL!( -interface ID2D1EllipseGeometry(ID2D1EllipseGeometryVtbl): ID2D1Geometry(ID2D1GeometryVtbl) { - fn GetEllipse(&mut self, ellipse: *mut D2D1_ELLIPSE) -> () -}); -RIDL!( -interface ID2D1GeometryGroup(ID2D1GeometryGroupVtbl): ID2D1Geometry(ID2D1GeometryVtbl) { - fn GetFillMode(&mut self) -> D2D1_FILL_MODE, - fn GetSourceGeometryCount(&mut self) -> ::UINT32, - fn GetSourceGeometries( - &mut self, geometries: *mut *mut ID2D1Geometry, geometriesCount: ::UINT32 - ) -> () -}); -RIDL!( -interface ID2D1TransformedGeometry(ID2D1TransformedGeometryVtbl) - : ID2D1Geometry(ID2D1GeometryVtbl) { - fn GetSourceGeometry(&mut self, sourceGeometry: *mut *mut ID2D1Geometry) -> (), - fn GetTransform(&mut self, transform: *mut D2D1_MATRIX_3X2_F) -> () -}); -RIDL!( -interface ID2D1SimplifiedGeometrySink(ID2D1SimplifiedGeometrySinkVtbl): IUnknown(IUnknownVtbl) { - fn SetFillMode(&mut self, fillMode: D2D1_FILL_MODE) -> (), - fn SetSegmentFlags(&mut self, vertexFlags: D2D1_PATH_SEGMENT) -> (), - fn BeginFigure(&mut self, startPoint: ::D2D1_POINT_2F, figureBegin: D2D1_FIGURE_BEGIN) -> (), - fn AddLines(&mut self, points: *const ::D2D1_POINT_2F, pointsCount: ::UINT32) -> (), - fn AddBeziers(&mut self, beziers: *const D2D1_BEZIER_SEGMENT, beziersCount: ::UINT32) -> (), - fn EndFigure(&mut self, figureEnd: D2D1_FIGURE_END) -> (), - fn Close(&mut self) -> ::HRESULT -}); -RIDL!( -interface ID2D1GeometrySink(ID2D1GeometrySinkVtbl) - : ID2D1SimplifiedGeometrySink(ID2D1SimplifiedGeometrySinkVtbl) { - fn AddLine(&mut self, point: ::D2D1_POINT_2F) -> (), - fn AddBezier(&mut self, bezier: *const D2D1_BEZIER_SEGMENT) -> (), - fn AddQuadraticBezier(&mut self, bezier: *const D2D1_QUADRATIC_BEZIER_SEGMENT) -> (), - fn AddQuadraticBeziers( - &mut self, beziers: *const D2D1_QUADRATIC_BEZIER_SEGMENT, beziersCount: ::UINT32 - ) -> (), - fn AddArc(&mut self, arc: *const D2D1_ARC_SEGMENT) -> () -}); -RIDL!( -interface ID2D1TessellationSink(ID2D1TessellationSinkVtbl): IUnknown(IUnknownVtbl) { - fn AddTriangles(&mut self, triangles: *const D2D1_TRIANGLE, triangleCount: ::UINT32) -> (), - fn Close(&mut self) -> ::HRESULT -}); -RIDL!( -interface ID2D1PathGeometry(ID2D1PathGeometryVtbl): ID2D1Geometry(ID2D1GeometryVtbl) { - fn Open(&mut self, geometrySink: *mut *mut ID2D1GeometrySink) -> ::HRESULT, - fn Stream(&mut self, geometrySink: *mut ID2D1GeometrySink) -> ::HRESULT, - fn GetSegmentCount(&mut self, count: *mut ::UINT32) -> ::HRESULT, - fn GetFigureCount(&mut self, count: *mut ::UINT32) -> ::HRESULT -}); -RIDL!( -interface ID2D1Mesh(ID2D1MeshVtbl): ID2D1Resource(ID2D1ResourceVtbl) { - fn Open(&mut self, tessellationSink: *mut *mut ID2D1TessellationSink) -> ::HRESULT -}); -RIDL!( -interface ID2D1Layer(ID2D1LayerVtbl): ID2D1Resource(ID2D1ResourceVtbl) { - fn GetSize(&mut self, ret: *mut D2D1_SIZE_F) -> *mut D2D1_SIZE_F // FIXME: ABI issue -}); -RIDL!( -interface ID2D1DrawingStateBlock(ID2D1DrawingStateBlockVtbl): ID2D1Resource(ID2D1ResourceVtbl) { - fn GetDescription(&mut self, stateDescription: *mut D2D1_DRAWING_STATE_DESCRIPTION) -> (), - fn SetDescription(&mut self, stateDescription: *const D2D1_DRAWING_STATE_DESCRIPTION) -> (), - fn SetTextRenderingParams( - &mut self, textRenderingParams: *mut ::IDWriteRenderingParams - ) -> (), - fn GetTextRenderingParams( - &mut self, textRenderingParams: *mut *mut ::IDWriteRenderingParams - ) -> () -}); -RIDL!( -interface ID2D1RenderTarget(ID2D1RenderTargetVtbl): ID2D1Resource(ID2D1ResourceVtbl) { - fn CreateBitmap( - &mut self, size: D2D1_SIZE_U, srcData: *const ::c_void, pitch: ::UINT32, - bitmapProperties: *const D2D1_BITMAP_PROPERTIES, bitmap: *mut *mut ID2D1Bitmap - ) -> ::HRESULT, - fn CreateBitmapFromWicBitmap( - &mut self, wicBitmapSource: *mut ::IWICBitmapSource, - bitmapProperties: *const D2D1_BITMAP_PROPERTIES, bitmap: *mut *mut ID2D1Bitmap - ) -> ::HRESULT, - fn CreateSharedBitmap( - &mut self, riid: ::REFIID, data: *const ::c_void, - bitmapProperties: *const D2D1_BITMAP_PROPERTIES, bitmap: *mut *mut ID2D1Bitmap - ) -> ::HRESULT, - fn CreateBitmapBrush( - &mut self, bitmap: *mut ID2D1Bitmap, - bitmapBrushProperties: *const D2D1_BITMAP_BRUSH_PROPERTIES, - brushProperties: *const D2D1_BRUSH_PROPERTIES, bitmapBrush: *mut *mut ID2D1BitmapBrush - ) -> ::HRESULT, - fn CreateSolidColorBrush( - &mut self, color: *const D2D1_COLOR_F, brushProperties: *const D2D1_BRUSH_PROPERTIES, - solidColorBrush: *mut *mut ID2D1SolidColorBrush - ) -> ::HRESULT, - fn CreateGradientStopCollection( - &mut self, gradientStops: *const D2D1_GRADIENT_STOP, gradientStopsCount: ::UINT32, - colorInterpolationGamma: D2D1_GAMMA, extendMode: D2D1_EXTEND_MODE, - gradientStopCollection: *mut *mut ID2D1GradientStopCollection - ) -> ::HRESULT, - fn CreateLinearGradientBrush( - &mut self, linearGradientBrushProperties: *const D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES, - brushProperties: *const D2D1_BRUSH_PROPERTIES, - gradientStopCollection: *mut ID2D1GradientStopCollection, - linearGradientBrush: *mut *mut ID2D1LinearGradientBrush - ) -> ::HRESULT, - fn CreateRadialGradientBrush( - &mut self, radialGradientBrushProperties: *const D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES, - brushProperties: *const D2D1_BRUSH_PROPERTIES, - gradientStopCollection: *mut ID2D1GradientStopCollection, - radialGradientBrush: *mut *mut ID2D1RadialGradientBrush - ) -> ::HRESULT, - fn CreateCompatibleRenderTarget( - &mut self, desiredSize: *const D2D1_SIZE_F, desiredPixelSize: *const D2D1_SIZE_U, - desiredFormat: *const ::D2D1_PIXEL_FORMAT, options: D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS, - bitmapRenderTarget: *mut *mut ID2D1BitmapRenderTarget - ) -> ::HRESULT, - fn CreateLayer(&mut self, size: *const D2D1_SIZE_F, layer: *mut *mut ID2D1Layer) -> ::HRESULT, - fn CreateMesh(&mut self, mesh: *mut *mut ID2D1Mesh) -> ::HRESULT, - fn DrawLine( - &mut self, point0: ::D2D1_POINT_2F, point1: ::D2D1_POINT_2F, brush: *mut ID2D1Brush, - strokeWidth: ::FLOAT, strokeStype: *mut ID2D1StrokeStyle - ) -> (), - fn DrawRectangle( - &mut self, rect: *const ::D2D1_RECT_F, brush: *mut ID2D1Brush, - strokeWidth: ::FLOAT, strokeStyle: *mut ID2D1StrokeStyle - ) -> (), - fn FillRectangle( - &mut self, rect: *const ::D2D1_RECT_F, brush: *mut ID2D1Brush - ) -> (), - fn DrawRoundedRectangle( - &mut self, roundedRect: *const D2D1_ROUNDED_RECT, brush: *mut ID2D1Brush, - strokeWidth: ::FLOAT, strokeStyle: *mut ID2D1StrokeStyle - ) -> (), - fn FillRoundedRectangle( - &mut self, roundedRect: *const D2D1_ROUNDED_RECT, brush: *mut ID2D1Brush - ) -> (), - fn DrawEllipse( - &mut self, ellipse: *const D2D1_ELLIPSE, brush: *mut ID2D1Brush, - strokeWidth: ::FLOAT, strokeStyle: *mut ID2D1StrokeStyle - ) -> (), - fn FillEllipse( - &mut self, ellipse: *const D2D1_ELLIPSE, brush: *mut ID2D1Brush - ) -> (), - fn DrawGeometry( - &mut self, geometry: *mut ID2D1Geometry, brush: *mut ID2D1Brush, - strokeWidth: ::FLOAT, strokeStyle: *mut ID2D1StrokeStyle - ) -> (), - fn FillGeometry( - &mut self, geometry: *mut ID2D1Geometry, brush: *mut ID2D1Brush, - opacityBrush: *mut ID2D1Brush - ) -> (), - fn FillMesh( - &mut self, mesh: *mut ID2D1Mesh, brush: *const ID2D1Brush - ) -> (), - fn FillOpacityMask( - &mut self, opacityMask: *mut ID2D1Bitmap, brush: *mut ID2D1Brush, - content: D2D1_OPACITY_MASK_CONTENT, destinationRectangle: *const ::D2D1_RECT_F, - sourceRectangle: *const ::D2D1_RECT_F - ) -> (), - fn DrawBitmap( - &mut self, bitmap: *mut ID2D1Bitmap, destinationRectangle: *const ::D2D1_RECT_F, - opacity: ::FLOAT, interpolationMode: D2D1_BITMAP_INTERPOLATION_MODE, - sourceRectangle: *const ::D2D1_RECT_F - ) -> (), - fn DrawText( - &mut self, string: *const ::WCHAR, stringLength: ::UINT32, - textFormat: *mut ::IDWriteTextFormat, layoutRect: *const ::D2D1_RECT_F, - defaultForegroundBrush: *mut ID2D1Brush, options: D2D1_DRAW_TEXT_OPTIONS, - measuringMode: ::DWRITE_MEASURING_MODE - ) -> (), - fn DrawTextLayout( - &mut self, origin: ::D2D1_POINT_2F, textLayout: *mut ::IDWriteTextLayout, - defaultForegroundBrush: *mut ID2D1Brush - ) -> (), - fn DrawGlyphRun( - &mut self, baselineOrigin: ::D2D1_POINT_2F, glyphRun: *const ::DWRITE_GLYPH_RUN, - foregroundBrush: *mut ID2D1Brush, measuringMode: ::DWRITE_MEASURING_MODE - ) -> (), - fn SetTransform(&mut self, transform: *const D2D1_MATRIX_3X2_F) -> (), - fn GetTransform(&mut self, transform: *mut D2D1_MATRIX_3X2_F) -> (), - fn SetAntialiasMode(&mut self, antialiasMode: D2D1_ANTIALIAS_MODE) -> (), - fn GetAntialiasMode(&mut self) -> D2D1_ANTIALIAS_MODE, - fn SetTextAntialiasMode(&mut self, textAntialiasMode: D2D1_TEXT_ANTIALIAS_MODE) -> (), - fn GetTextAntialiasMode(&mut self) -> D2D1_TEXT_ANTIALIAS_MODE, - fn SetTextRenderingParams( - &mut self, textRenderingParams: *mut ::IDWriteRenderingParams - ) -> (), - fn GetTextRenderingParams( - &mut self, textRenderingParams: *mut *mut ::IDWriteRenderingParams - ) -> (), - fn SetTags(&mut self, tag1: D2D1_TAG, tag2: D2D1_TAG) -> (), - fn GetTags(&mut self, tag1: *mut D2D1_TAG, tag2: *mut D2D1_TAG) -> (), - fn PushLayer( - &mut self, layerParameters: *const D2D1_LAYER_PARAMETERS, layer: *mut ID2D1Layer - ) -> (), - fn PopLayer(&mut self) -> (), - fn Flush(&mut self, tag1: *mut D2D1_TAG, tag2: *mut D2D1_TAG) -> (), - fn SaveDrawingState(&mut self, drawingStateBlock: *mut ID2D1DrawingStateBlock) -> (), - fn RestoreDrawingState(&mut self, drawingStateBlock: *mut ID2D1DrawingStateBlock) -> (), - fn PushAxisAlignedClip( - &mut self, clipRect: *const ::D2D1_RECT_F, antialiasMode: D2D1_ANTIALIAS_MODE - ) -> (), - fn PopAxisAlignedClip(&mut self) -> (), - fn Clear(&mut self, clearColor: *const D2D1_COLOR_F) -> (), - fn BeginDraw(&mut self) -> (), - fn EndDraw(&mut self, tag1: *mut D2D1_TAG, tag2: *mut D2D1_TAG) -> ::HRESULT, - fn GetPixelFormat( - &mut self, ret: *mut ::D2D1_PIXEL_FORMAT - ) -> *mut ::D2D1_PIXEL_FORMAT, // FIXME: ABI issue - fn SetDpi(&mut self, dpiX: ::FLOAT, dpiY: ::FLOAT) -> (), - fn GetDpi(&mut self, dpiX: *mut ::FLOAT, dpiY: *mut ::FLOAT) -> (), - fn GetSize(&mut self, ret: *mut D2D1_SIZE_F) -> *mut D2D1_SIZE_F, // FIXME: ABI issue - fn GetPixelSize(&mut self, ret: *mut D2D1_SIZE_U) -> *mut D2D1_SIZE_U, // FIXME: ABI issue - fn GetMaximumBitmapSize(&mut self) -> ::UINT32, - fn IsSupported( - &mut self, renderTargetProperties: *const D2D1_RENDER_TARGET_PROPERTIES - ) -> ::BOOL -}); -RIDL!( -interface ID2D1BitmapRenderTarget(ID2D1BitmapRenderTargetVtbl) - : ID2D1RenderTarget(ID2D1RenderTargetVtbl) { - fn GetBitmap(&mut self, bitmap: *mut *mut ID2D1Bitmap) -> ::HRESULT -}); -RIDL!( -interface ID2D1HwndRenderTarget(ID2D1HwndRenderTargetVtbl) - : ID2D1RenderTarget(ID2D1RenderTargetVtbl) { - fn CheckWindowState(&mut self) -> D2D1_WINDOW_STATE, - fn Resize(&mut self, pixelSize: *const D2D1_SIZE_U) -> ::HRESULT, - fn GetHwnd(&mut self) -> ::HWND -}); -RIDL!( -interface ID2D1GdiInteropRenderTarget(ID2D1GdiInteropRenderTargetVtbl): IUnknown(IUnknownVtbl) { - fn GetDC(&mut self, mode: D2D1_DC_INITIALIZE_MODE, hdc: *mut ::HDC) -> ::HRESULT, - fn ReleaseDC(&mut self, update: *const ::RECT) -> ::HRESULT -}); -RIDL!( -interface ID2D1DCRenderTarget(ID2D1DCRenderTargetVtbl): ID2D1RenderTarget(ID2D1RenderTargetVtbl) { - fn BindDC(&mut self, hDC: ::HDC, pSubRect: *const ::RECT) -> ::HRESULT -}); -RIDL!( -interface ID2D1Factory(ID2D1FactoryVtbl): IUnknown(IUnknownVtbl) { - fn ReloadSystemMetrics(&mut self) -> ::HRESULT, - fn GetDesktopDpi(&mut self, dpiX: *mut ::FLOAT, dpiY: *mut ::FLOAT) -> (), - fn CreateRectangleGeometry( - &mut self, rectangle: *const ::D2D1_RECT_F, - rectangleGeometry: *mut *mut ID2D1RectangleGeometry - ) -> ::HRESULT, - fn CreateRoundedRectangleGeometry( - &mut self, roundedRectangle: *const D2D1_ROUNDED_RECT, - roundedRectangleGeometry: *mut *mut ID2D1RoundedRectangleGeometry - ) -> ::HRESULT, - fn CreateEllipseGeometry( - &mut self, ellipse: *const D2D1_ELLIPSE, - ellipseGeometry: *mut *mut ID2D1EllipseGeometry - ) -> ::HRESULT, - fn CreateGeometryGroup( - &mut self, fillMode: D2D1_FILL_MODE, geometries: *mut *mut ID2D1Geometry, - geometriesCount: ::UINT32, geometryGroup: *mut *mut ID2D1GeometryGroup - ) -> ::HRESULT, - fn CreateTransformedGeometry( - &mut self, sourceGeometry: *mut ID2D1Geometry, transform: *const D2D1_MATRIX_3X2_F, - transformedGeometry: *mut *mut ID2D1TransformedGeometry - ) -> ::HRESULT, - fn CreatePathGeometry( - &mut self, pathGeometry: *mut *mut ID2D1PathGeometry - ) -> ::HRESULT, - fn CreateStrokeStyle( - &mut self, strokeStyleProperties: *const D2D1_STROKE_STYLE_PROPERTIES, - dashes: *const ::FLOAT, dashesCount: ::UINT32, strokeStyle: *mut *mut ID2D1StrokeStyle - ) -> ::HRESULT, - fn CreateDrawingStateBlock( - &mut self, drawingStateDescription: *const D2D1_DRAWING_STATE_DESCRIPTION, - textRenderingParams: *mut ::IDWriteRenderingParams, - drawingStateBlock: *mut *mut ID2D1DrawingStateBlock - ) -> ::HRESULT, - fn CreateWicBitmapRenderTarget( - &mut self, target: *mut ::IWICBitmap, - renderTargetProperties: *const D2D1_RENDER_TARGET_PROPERTIES, - renderTarget: *mut *mut ID2D1RenderTarget - ) -> ::HRESULT, - fn CreateHwndRenderTarget( - &mut self, renderTargetProperties: *const D2D1_RENDER_TARGET_PROPERTIES, - hwndRenderTargetProperties: *const D2D1_HWND_RENDER_TARGET_PROPERTIES, - hwndRenderTarget: *mut *mut ID2D1HwndRenderTarget - ) -> ::HRESULT, - fn CreateDxgiSurfaceRenderTarget( - &mut self, dxgiSurface: *mut ::IDXGISurface, - renderTargetProperties: *const D2D1_RENDER_TARGET_PROPERTIES, - renderTarget: *mut *mut ID2D1RenderTarget - ) -> ::HRESULT, - fn CreateDCRenderTarget( - &mut self, renderTargetProperties: *const D2D1_RENDER_TARGET_PROPERTIES, - dcRenderTarget: *mut *mut ID2D1DCRenderTarget - ) -> ::HRESULT -}); -DEFINE_GUID!( - UuidOfID2D1Factory, - 0x06152247, 0x6f50, 0x465a, 0x92, 0x45, 0x11, 0x8b, 0xfd, 0x3b, 0x60, 0x07 -); diff --git a/deps/winapi-0.2.5/src/d2dbasetypes.rs b/deps/winapi-0.2.5/src/d2dbasetypes.rs deleted file mode 100644 index c6c774c94..000000000 --- a/deps/winapi-0.2.5/src/d2dbasetypes.rs +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright © 2015, Connor Hilarides -// Licensed under the MIT License <LICENSE.md> -//! Mappings for the contents of d2dbasetypes.h -STRUCT!{struct D2D_POINT_2U { - x: ::UINT32, - y: ::UINT32, -}} -STRUCT!{struct D2D_POINT_2F { - x: ::FLOAT, - y: ::FLOAT, -}} -pub type D2D_POINT_2L = ::POINT; -STRUCT!{struct D2D_VECTOR_2F { - x: ::FLOAT, - y: ::FLOAT, -}} -STRUCT!{struct D2D_VECTOR_3F { - x: ::FLOAT, - y: ::FLOAT, - z: ::FLOAT, -}} -STRUCT!{struct D2D_VECTOR_4F { - x: ::FLOAT, - y: ::FLOAT, - z: ::FLOAT, - w: ::FLOAT, -}} -STRUCT!{struct D2D_RECT_F { - left: ::FLOAT, - top: ::FLOAT, - right: ::FLOAT, - bottom: ::FLOAT, -}} -STRUCT!{struct D2D_RECT_U { - left: ::UINT32, - top: ::UINT32, - right: ::UINT32, - bottom: ::UINT32, -}} -pub type D2D_RECT_L = ::RECT; -STRUCT!{struct D2D_SIZE_F { - width: ::FLOAT, - height: ::FLOAT, -}} -STRUCT!{struct D2D_SIZE_U { - width: ::UINT32, - height: ::UINT32, -}} -pub type D2D_COLOR_F = ::D3DCOLORVALUE; -STRUCT!{struct D2D_MATRIX_3X2_F { - matrix: [[::FLOAT; 3]; 2], -}} -STRUCT!{struct D2D_MATRIX_4X3_F { - matrix: [[::FLOAT; 4]; 3], -}} -STRUCT!{struct D2D_MATRIX_4X4_F { - matrix: [[::FLOAT; 4]; 4], -}} -STRUCT!{struct D2D_MATRIX_5X4_F { - matrix: [[::FLOAT; 5]; 4], -}} diff --git a/deps/winapi-0.2.5/src/d3d11.rs b/deps/winapi-0.2.5/src/d3d11.rs deleted file mode 100644 index 4908c9e9e..000000000 --- a/deps/winapi-0.2.5/src/d3d11.rs +++ /dev/null @@ -1,3031 +0,0 @@ -// Copyright © 2015, Peter Atashian -// Licensed under the MIT License <LICENSE.md> -pub const D3D11_16BIT_INDEX_STRIP_CUT_VALUE: ::DWORD = 0xffff; -pub const D3D11_32BIT_INDEX_STRIP_CUT_VALUE: ::DWORD = 0xffffffff; -pub const D3D11_8BIT_INDEX_STRIP_CUT_VALUE: ::DWORD = 0xff; -pub const D3D11_ARRAY_AXIS_ADDRESS_RANGE_BIT_COUNT: ::DWORD = 9; -pub const D3D11_CLIP_OR_CULL_DISTANCE_COUNT: ::DWORD = 8; -pub const D3D11_CLIP_OR_CULL_DISTANCE_ELEMENT_COUNT: ::DWORD = 2; -pub const D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT: ::DWORD = 14; -pub const D3D11_COMMONSHADER_CONSTANT_BUFFER_COMPONENTS: ::DWORD = 4; -pub const D3D11_COMMONSHADER_CONSTANT_BUFFER_COMPONENT_BIT_COUNT: ::DWORD = 32; -pub const D3D11_COMMONSHADER_CONSTANT_BUFFER_HW_SLOT_COUNT: ::DWORD = 15; -pub const D3D11_COMMONSHADER_CONSTANT_BUFFER_PARTIAL_UPDATE_EXTENTS_BYTE_ALIGNMENT: ::DWORD = 16; -pub const D3D11_COMMONSHADER_CONSTANT_BUFFER_REGISTER_COMPONENTS: ::DWORD = 4; -pub const D3D11_COMMONSHADER_CONSTANT_BUFFER_REGISTER_COUNT: ::DWORD = 15; -pub const D3D11_COMMONSHADER_CONSTANT_BUFFER_REGISTER_READS_PER_INST: ::DWORD = 1; -pub const D3D11_COMMONSHADER_CONSTANT_BUFFER_REGISTER_READ_PORTS: ::DWORD = 1; -pub const D3D11_COMMONSHADER_FLOWCONTROL_NESTING_LIMIT: ::DWORD = 64; -pub const D3D11_COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_COMPONENTS: ::DWORD = 4; -pub const D3D11_COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_COUNT: ::DWORD = 1; -pub const D3D11_COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_READS_PER_INST: ::DWORD = 1; -pub const D3D11_COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_READ_PORTS: ::DWORD = 1; -pub const D3D11_COMMONSHADER_IMMEDIATE_VALUE_COMPONENT_BIT_COUNT: ::DWORD = 32; -pub const D3D11_COMMONSHADER_INPUT_RESOURCE_REGISTER_COMPONENTS: ::DWORD = 1; -pub const D3D11_COMMONSHADER_INPUT_RESOURCE_REGISTER_COUNT: ::DWORD = 128; -pub const D3D11_COMMONSHADER_INPUT_RESOURCE_REGISTER_READS_PER_INST: ::DWORD = 1; -pub const D3D11_COMMONSHADER_INPUT_RESOURCE_REGISTER_READ_PORTS: ::DWORD = 1; -pub const D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT: ::DWORD = 128; -pub const D3D11_COMMONSHADER_SAMPLER_REGISTER_COMPONENTS: ::DWORD = 1; -pub const D3D11_COMMONSHADER_SAMPLER_REGISTER_COUNT: ::DWORD = 16; -pub const D3D11_COMMONSHADER_SAMPLER_REGISTER_READS_PER_INST: ::DWORD = 1; -pub const D3D11_COMMONSHADER_SAMPLER_REGISTER_READ_PORTS: ::DWORD = 1; -pub const D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT: ::DWORD = 16; -pub const D3D11_COMMONSHADER_SUBROUTINE_NESTING_LIMIT: ::DWORD = 32; -pub const D3D11_COMMONSHADER_TEMP_REGISTER_COMPONENTS: ::DWORD = 4; -pub const D3D11_COMMONSHADER_TEMP_REGISTER_COMPONENT_BIT_COUNT: ::DWORD = 32; -pub const D3D11_COMMONSHADER_TEMP_REGISTER_COUNT: ::DWORD = 4096; -pub const D3D11_COMMONSHADER_TEMP_REGISTER_READS_PER_INST: ::DWORD = 3; -pub const D3D11_COMMONSHADER_TEMP_REGISTER_READ_PORTS: ::DWORD = 3; -pub const D3D11_COMMONSHADER_TEXCOORD_RANGE_REDUCTION_MAX: ::DWORD = 10; -pub const D3D11_COMMONSHADER_TEXCOORD_RANGE_REDUCTION_MIN: ::c_long = -10; -pub const D3D11_COMMONSHADER_TEXEL_OFFSET_MAX_NEGATIVE: ::c_long = -8; -pub const D3D11_COMMONSHADER_TEXEL_OFFSET_MAX_POSITIVE: ::DWORD = 7; -pub const D3D11_CS_4_X_BUCKET00_MAX_BYTES_TGSM_WRITABLE_PER_THREAD: ::DWORD = 256; -pub const D3D11_CS_4_X_BUCKET00_MAX_NUM_THREADS_PER_GROUP: ::DWORD = 64; -pub const D3D11_CS_4_X_BUCKET01_MAX_BYTES_TGSM_WRITABLE_PER_THREAD: ::DWORD = 240; -pub const D3D11_CS_4_X_BUCKET01_MAX_NUM_THREADS_PER_GROUP: ::DWORD = 68; -pub const D3D11_CS_4_X_BUCKET02_MAX_BYTES_TGSM_WRITABLE_PER_THREAD: ::DWORD = 224; -pub const D3D11_CS_4_X_BUCKET02_MAX_NUM_THREADS_PER_GROUP: ::DWORD = 72; -pub const D3D11_CS_4_X_BUCKET03_MAX_BYTES_TGSM_WRITABLE_PER_THREAD: ::DWORD = 208; -pub const D3D11_CS_4_X_BUCKET03_MAX_NUM_THREADS_PER_GROUP: ::DWORD = 76; -pub const D3D11_CS_4_X_BUCKET04_MAX_BYTES_TGSM_WRITABLE_PER_THREAD: ::DWORD = 192; -pub const D3D11_CS_4_X_BUCKET04_MAX_NUM_THREADS_PER_GROUP: ::DWORD = 84; -pub const D3D11_CS_4_X_BUCKET05_MAX_BYTES_TGSM_WRITABLE_PER_THREAD: ::DWORD = 176; -pub const D3D11_CS_4_X_BUCKET05_MAX_NUM_THREADS_PER_GROUP: ::DWORD = 92; -pub const D3D11_CS_4_X_BUCKET06_MAX_BYTES_TGSM_WRITABLE_PER_THREAD: ::DWORD = 160; -pub const D3D11_CS_4_X_BUCKET06_MAX_NUM_THREADS_PER_GROUP: ::DWORD = 100; -pub const D3D11_CS_4_X_BUCKET07_MAX_BYTES_TGSM_WRITABLE_PER_THREAD: ::DWORD = 144; -pub const D3D11_CS_4_X_BUCKET07_MAX_NUM_THREADS_PER_GROUP: ::DWORD = 112; -pub const D3D11_CS_4_X_BUCKET08_MAX_BYTES_TGSM_WRITABLE_PER_THREAD: ::DWORD = 128; -pub const D3D11_CS_4_X_BUCKET08_MAX_NUM_THREADS_PER_GROUP: ::DWORD = 128; -pub const D3D11_CS_4_X_BUCKET09_MAX_BYTES_TGSM_WRITABLE_PER_THREAD: ::DWORD = 112; -pub const D3D11_CS_4_X_BUCKET09_MAX_NUM_THREADS_PER_GROUP: ::DWORD = 144; -pub const D3D11_CS_4_X_BUCKET10_MAX_BYTES_TGSM_WRITABLE_PER_THREAD: ::DWORD = 96; -pub const D3D11_CS_4_X_BUCKET10_MAX_NUM_THREADS_PER_GROUP: ::DWORD = 168; -pub const D3D11_CS_4_X_BUCKET11_MAX_BYTES_TGSM_WRITABLE_PER_THREAD: ::DWORD = 80; -pub const D3D11_CS_4_X_BUCKET11_MAX_NUM_THREADS_PER_GROUP: ::DWORD = 204; -pub const D3D11_CS_4_X_BUCKET12_MAX_BYTES_TGSM_WRITABLE_PER_THREAD: ::DWORD = 64; -pub const D3D11_CS_4_X_BUCKET12_MAX_NUM_THREADS_PER_GROUP: ::DWORD = 256; -pub const D3D11_CS_4_X_BUCKET13_MAX_BYTES_TGSM_WRITABLE_PER_THREAD: ::DWORD = 48; -pub const D3D11_CS_4_X_BUCKET13_MAX_NUM_THREADS_PER_GROUP: ::DWORD = 340; -pub const D3D11_CS_4_X_BUCKET14_MAX_BYTES_TGSM_WRITABLE_PER_THREAD: ::DWORD = 32; -pub const D3D11_CS_4_X_BUCKET14_MAX_NUM_THREADS_PER_GROUP: ::DWORD = 512; -pub const D3D11_CS_4_X_BUCKET15_MAX_BYTES_TGSM_WRITABLE_PER_THREAD: ::DWORD = 16; -pub const D3D11_CS_4_X_BUCKET15_MAX_NUM_THREADS_PER_GROUP: ::DWORD = 768; -pub const D3D11_CS_4_X_DISPATCH_MAX_THREAD_GROUPS_IN_Z_DIMENSION: ::DWORD = 1; -pub const D3D11_CS_4_X_RAW_UAV_BYTE_ALIGNMENT: ::DWORD = 256; -pub const D3D11_CS_4_X_THREAD_GROUP_MAX_THREADS_PER_GROUP: ::DWORD = 768; -pub const D3D11_CS_4_X_THREAD_GROUP_MAX_X: ::DWORD = 768; -pub const D3D11_CS_4_X_THREAD_GROUP_MAX_Y: ::DWORD = 768; -pub const D3D11_CS_4_X_UAV_REGISTER_COUNT: ::DWORD = 1; -pub const D3D11_CS_DISPATCH_MAX_THREAD_GROUPS_PER_DIMENSION: ::DWORD = 65535; -pub const D3D11_CS_TGSM_REGISTER_COUNT: ::DWORD = 8192; -pub const D3D11_CS_TGSM_REGISTER_READS_PER_INST: ::DWORD = 1; -pub const D3D11_CS_TGSM_RESOURCE_REGISTER_COMPONENTS: ::DWORD = 1; -pub const D3D11_CS_TGSM_RESOURCE_REGISTER_READ_PORTS: ::DWORD = 1; -pub const D3D11_CS_THREADGROUPID_REGISTER_COMPONENTS: ::DWORD = 3; -pub const D3D11_CS_THREADGROUPID_REGISTER_COUNT: ::DWORD = 1; -pub const D3D11_CS_THREADIDINGROUPFLATTENED_REGISTER_COMPONENTS: ::DWORD = 1; -pub const D3D11_CS_THREADIDINGROUPFLATTENED_REGISTER_COUNT: ::DWORD = 1; -pub const D3D11_CS_THREADIDINGROUP_REGISTER_COMPONENTS: ::DWORD = 3; -pub const D3D11_CS_THREADIDINGROUP_REGISTER_COUNT: ::DWORD = 1; -pub const D3D11_CS_THREADID_REGISTER_COMPONENTS: ::DWORD = 3; -pub const D3D11_CS_THREADID_REGISTER_COUNT: ::DWORD = 1; -pub const D3D11_CS_THREAD_GROUP_MAX_THREADS_PER_GROUP: ::DWORD = 1024; -pub const D3D11_CS_THREAD_GROUP_MAX_X: ::DWORD = 1024; -pub const D3D11_CS_THREAD_GROUP_MAX_Y: ::DWORD = 1024; -pub const D3D11_CS_THREAD_GROUP_MAX_Z: ::DWORD = 64; -pub const D3D11_CS_THREAD_GROUP_MIN_X: ::DWORD = 1; -pub const D3D11_CS_THREAD_GROUP_MIN_Y: ::DWORD = 1; -pub const D3D11_CS_THREAD_GROUP_MIN_Z: ::DWORD = 1; -pub const D3D11_CS_THREAD_LOCAL_TEMP_REGISTER_POOL: ::DWORD = 16384; -pub const D3D11_DEFAULT_BLEND_FACTOR_ALPHA: ::FLOAT = 1.0; -pub const D3D11_DEFAULT_BLEND_FACTOR_BLUE: ::FLOAT = 1.0; -pub const D3D11_DEFAULT_BLEND_FACTOR_GREEN: ::FLOAT = 1.0; -pub const D3D11_DEFAULT_BLEND_FACTOR_RED: ::FLOAT = 1.0; -pub const D3D11_DEFAULT_BORDER_COLOR_COMPONENT: ::FLOAT = 0.0; -pub const D3D11_DEFAULT_DEPTH_BIAS: ::DWORD = 0; -pub const D3D11_DEFAULT_DEPTH_BIAS_CLAMP: ::FLOAT = 0.0; -pub const D3D11_DEFAULT_MAX_ANISOTROPY: ::DWORD = 16; -pub const D3D11_DEFAULT_MIP_LOD_BIAS: ::FLOAT = 0.0; -pub const D3D11_DEFAULT_RENDER_TARGET_ARRAY_INDEX: ::DWORD = 0; -pub const D3D11_DEFAULT_SAMPLE_MASK: ::DWORD = 0xffffffff; -pub const D3D11_DEFAULT_SCISSOR_ENDX: ::DWORD = 0; -pub const D3D11_DEFAULT_SCISSOR_ENDY: ::DWORD = 0; -pub const D3D11_DEFAULT_SCISSOR_STARTX: ::DWORD = 0; -pub const D3D11_DEFAULT_SCISSOR_STARTY: ::DWORD = 0; -pub const D3D11_DEFAULT_SLOPE_SCALED_DEPTH_BIAS: ::FLOAT = 0.0; -pub const D3D11_DEFAULT_STENCIL_READ_MASK: ::DWORD = 0xff; -pub const D3D11_DEFAULT_STENCIL_REFERENCE: ::DWORD = 0; -pub const D3D11_DEFAULT_STENCIL_WRITE_MASK: ::DWORD = 0xff; -pub const D3D11_DEFAULT_VIEWPORT_AND_SCISSORRECT_INDEX: ::DWORD = 0; -pub const D3D11_DEFAULT_VIEWPORT_HEIGHT: ::DWORD = 0; -pub const D3D11_DEFAULT_VIEWPORT_MAX_DEPTH: ::FLOAT = 0.0; -pub const D3D11_DEFAULT_VIEWPORT_MIN_DEPTH: ::FLOAT = 0.0; -pub const D3D11_DEFAULT_VIEWPORT_TOPLEFTX: ::DWORD = 0; -pub const D3D11_DEFAULT_VIEWPORT_TOPLEFTY: ::DWORD = 0; -pub const D3D11_DEFAULT_VIEWPORT_WIDTH: ::DWORD = 0; -pub const D3D11_DS_INPUT_CONTROL_POINTS_MAX_TOTAL_SCALARS: ::DWORD = 3968; -pub const D3D11_DS_INPUT_CONTROL_POINT_REGISTER_COMPONENTS: ::DWORD = 4; -pub const D3D11_DS_INPUT_CONTROL_POINT_REGISTER_COMPONENT_BIT_COUNT: ::DWORD = 32; -pub const D3D11_DS_INPUT_CONTROL_POINT_REGISTER_COUNT: ::DWORD = 32; -pub const D3D11_DS_INPUT_CONTROL_POINT_REGISTER_READS_PER_INST: ::DWORD = 2; -pub const D3D11_DS_INPUT_CONTROL_POINT_REGISTER_READ_PORTS: ::DWORD = 1; -pub const D3D11_DS_INPUT_DOMAIN_POINT_REGISTER_COMPONENTS: ::DWORD = 3; -pub const D3D11_DS_INPUT_DOMAIN_POINT_REGISTER_COMPONENT_BIT_COUNT: ::DWORD = 32; -pub const D3D11_DS_INPUT_DOMAIN_POINT_REGISTER_COUNT: ::DWORD = 1; -pub const D3D11_DS_INPUT_DOMAIN_POINT_REGISTER_READS_PER_INST: ::DWORD = 2; -pub const D3D11_DS_INPUT_DOMAIN_POINT_REGISTER_READ_PORTS: ::DWORD = 1; -pub const D3D11_DS_INPUT_PATCH_CONSTANT_REGISTER_COMPONENTS: ::DWORD = 4; -pub const D3D11_DS_INPUT_PATCH_CONSTANT_REGISTER_COMPONENT_BIT_COUNT: ::DWORD = 32; -pub const D3D11_DS_INPUT_PATCH_CONSTANT_REGISTER_COUNT: ::DWORD = 32; -pub const D3D11_DS_INPUT_PATCH_CONSTANT_REGISTER_READS_PER_INST: ::DWORD = 2; -pub const D3D11_DS_INPUT_PATCH_CONSTANT_REGISTER_READ_PORTS: ::DWORD = 1; -pub const D3D11_DS_INPUT_PRIMITIVE_ID_REGISTER_COMPONENTS: ::DWORD = 1; -pub const D3D11_DS_INPUT_PRIMITIVE_ID_REGISTER_COMPONENT_BIT_COUNT: ::DWORD = 32; -pub const D3D11_DS_INPUT_PRIMITIVE_ID_REGISTER_COUNT: ::DWORD = 1; -pub const D3D11_DS_INPUT_PRIMITIVE_ID_REGISTER_READS_PER_INST: ::DWORD = 2; -pub const D3D11_DS_INPUT_PRIMITIVE_ID_REGISTER_READ_PORTS: ::DWORD = 1; -pub const D3D11_DS_OUTPUT_REGISTER_COMPONENTS: ::DWORD = 4; -pub const D3D11_DS_OUTPUT_REGISTER_COMPONENT_BIT_COUNT: ::DWORD = 32; -pub const D3D11_DS_OUTPUT_REGISTER_COUNT: ::DWORD = 32; -pub const D3D11_FLOAT16_FUSED_TOLERANCE_IN_ULP: ::FLOAT = 0.6; -pub const D3D11_FLOAT32_MAX: ::FLOAT = 3.402823466E+38; -pub const D3D11_FLOAT32_TO_INTEGER_TOLERANCE_IN_ULP: ::FLOAT = 0.6; -pub const D3D11_FLOAT_TO_SRGB_EXPONENT_DENOMINATOR: ::FLOAT = 2.4; -pub const D3D11_FLOAT_TO_SRGB_EXPONENT_NUMERATOR: ::FLOAT = 1.0; -pub const D3D11_FLOAT_TO_SRGB_OFFSET: ::FLOAT = 0.055; -pub const D3D11_FLOAT_TO_SRGB_SCALE_1: ::FLOAT = 12.92; -pub const D3D11_FLOAT_TO_SRGB_SCALE_2: ::FLOAT = 1.055; -pub const D3D11_FLOAT_TO_SRGB_THRESHOLD: ::FLOAT = 0.0031308; -pub const D3D11_FTOI_INSTRUCTION_MAX_INPUT: ::FLOAT = 2147483647.999; -pub const D3D11_FTOI_INSTRUCTION_MIN_INPUT: ::FLOAT = -2147483648.999; -pub const D3D11_FTOU_INSTRUCTION_MAX_INPUT: ::FLOAT = 4294967295.999; -pub const D3D11_FTOU_INSTRUCTION_MIN_INPUT: ::FLOAT = 0.0; -pub const D3D11_GS_INPUT_INSTANCE_ID_READS_PER_INST: ::DWORD = 2; -pub const D3D11_GS_INPUT_INSTANCE_ID_READ_PORTS: ::DWORD = 1; -pub const D3D11_GS_INPUT_INSTANCE_ID_REGISTER_COMPONENTS: ::DWORD = 1; -pub const D3D11_GS_INPUT_INSTANCE_ID_REGISTER_COMPONENT_BIT_COUNT: ::DWORD = 32; -pub const D3D11_GS_INPUT_INSTANCE_ID_REGISTER_COUNT: ::DWORD = 1; -pub const D3D11_GS_INPUT_PRIM_CONST_REGISTER_COMPONENTS: ::DWORD = 1; -pub const D3D11_GS_INPUT_PRIM_CONST_REGISTER_COMPONENT_BIT_COUNT: ::DWORD = 32; -pub const D3D11_GS_INPUT_PRIM_CONST_REGISTER_COUNT: ::DWORD = 1; -pub const D3D11_GS_INPUT_PRIM_CONST_REGISTER_READS_PER_INST: ::DWORD = 2; -pub const D3D11_GS_INPUT_PRIM_CONST_REGISTER_READ_PORTS: ::DWORD = 1; -pub const D3D11_GS_INPUT_REGISTER_COMPONENTS: ::DWORD = 4; -pub const D3D11_GS_INPUT_REGISTER_COMPONENT_BIT_COUNT: ::DWORD = 32; -pub const D3D11_GS_INPUT_REGISTER_COUNT: ::DWORD = 32; -pub const D3D11_GS_INPUT_REGISTER_READS_PER_INST: ::DWORD = 2; -pub const D3D11_GS_INPUT_REGISTER_READ_PORTS: ::DWORD = 1; -pub const D3D11_GS_INPUT_REGISTER_VERTICES: ::DWORD = 32; -pub const D3D11_GS_MAX_INSTANCE_COUNT: ::DWORD = 32; -pub const D3D11_GS_MAX_OUTPUT_VERTEX_COUNT_ACROSS_INSTANCES: ::DWORD = 1024; -pub const D3D11_GS_OUTPUT_ELEMENTS: ::DWORD = 32; -pub const D3D11_GS_OUTPUT_REGISTER_COMPONENTS: ::DWORD = 4; -pub const D3D11_GS_OUTPUT_REGISTER_COMPONENT_BIT_COUNT: ::DWORD = 32; -pub const D3D11_GS_OUTPUT_REGISTER_COUNT: ::DWORD = 32; -pub const D3D11_HS_CONTROL_POINT_PHASE_INPUT_REGISTER_COUNT: ::DWORD = 32; -pub const D3D11_HS_CONTROL_POINT_PHASE_OUTPUT_REGISTER_COUNT: ::DWORD = 32; -pub const D3D11_HS_CONTROL_POINT_REGISTER_COMPONENTS: ::DWORD = 4; -pub const D3D11_HS_CONTROL_POINT_REGISTER_COMPONENT_BIT_COUNT: ::DWORD = 32; -pub const D3D11_HS_CONTROL_POINT_REGISTER_READS_PER_INST: ::DWORD = 2; -pub const D3D11_HS_CONTROL_POINT_REGISTER_READ_PORTS: ::DWORD = 1; -pub const D3D11_HS_FORK_PHASE_INSTANCE_COUNT_UPPER_BOUND: ::DWORD = 0xffffffff; -pub const D3D11_HS_INPUT_FORK_INSTANCE_ID_REGISTER_COMPONENTS: ::DWORD = 1; -pub const D3D11_HS_INPUT_FORK_INSTANCE_ID_REGISTER_COMPONENT_BIT_COUNT: ::DWORD = 32; -pub const D3D11_HS_INPUT_FORK_INSTANCE_ID_REGISTER_COUNT: ::DWORD = 1; -pub const D3D11_HS_INPUT_FORK_INSTANCE_ID_REGISTER_READS_PER_INST: ::DWORD = 2; -pub const D3D11_HS_INPUT_FORK_INSTANCE_ID_REGISTER_READ_PORTS: ::DWORD = 1; -pub const D3D11_HS_INPUT_JOIN_INSTANCE_ID_REGISTER_COMPONENTS: ::DWORD = 1; -pub const D3D11_HS_INPUT_JOIN_INSTANCE_ID_REGISTER_COMPONENT_BIT_COUNT: ::DWORD = 32; -pub const D3D11_HS_INPUT_JOIN_INSTANCE_ID_REGISTER_COUNT: ::DWORD = 1; -pub const D3D11_HS_INPUT_JOIN_INSTANCE_ID_REGISTER_READS_PER_INST: ::DWORD = 2; -pub const D3D11_HS_INPUT_JOIN_INSTANCE_ID_REGISTER_READ_PORTS: ::DWORD = 1; -pub const D3D11_HS_INPUT_PRIMITIVE_ID_REGISTER_COMPONENTS: ::DWORD = 1; -pub const D3D11_HS_INPUT_PRIMITIVE_ID_REGISTER_COMPONENT_BIT_COUNT: ::DWORD = 32; -pub const D3D11_HS_INPUT_PRIMITIVE_ID_REGISTER_COUNT: ::DWORD = 1; -pub const D3D11_HS_INPUT_PRIMITIVE_ID_REGISTER_READS_PER_INST: ::DWORD = 2; -pub const D3D11_HS_INPUT_PRIMITIVE_ID_REGISTER_READ_PORTS: ::DWORD = 1; -pub const D3D11_HS_JOIN_PHASE_INSTANCE_COUNT_UPPER_BOUND: ::DWORD = 0xffffffff; -pub const D3D11_HS_MAXTESSFACTOR_LOWER_BOUND: ::FLOAT = 1.0; -pub const D3D11_HS_MAXTESSFACTOR_UPPER_BOUND: ::FLOAT = 64.0; -pub const D3D11_HS_OUTPUT_CONTROL_POINTS_MAX_TOTAL_SCALARS: ::DWORD = 3968; -pub const D3D11_HS_OUTPUT_CONTROL_POINT_ID_REGISTER_COMPONENTS: ::DWORD = 1; -pub const D3D11_HS_OUTPUT_CONTROL_POINT_ID_REGISTER_COMPONENT_BIT_COUNT: ::DWORD = 32; -pub const D3D11_HS_OUTPUT_CONTROL_POINT_ID_REGISTER_COUNT: ::DWORD = 1; -pub const D3D11_HS_OUTPUT_CONTROL_POINT_ID_REGISTER_READS_PER_INST: ::DWORD = 2; -pub const D3D11_HS_OUTPUT_CONTROL_POINT_ID_REGISTER_READ_PORTS: ::DWORD = 1; -pub const D3D11_HS_OUTPUT_PATCH_CONSTANT_REGISTER_COMPONENTS: ::DWORD = 4; -pub const D3D11_HS_OUTPUT_PATCH_CONSTANT_REGISTER_COMPONENT_BIT_COUNT: ::DWORD = 32; -pub const D3D11_HS_OUTPUT_PATCH_CONSTANT_REGISTER_COUNT: ::DWORD = 32; -pub const D3D11_HS_OUTPUT_PATCH_CONSTANT_REGISTER_READS_PER_INST: ::DWORD = 2; -pub const D3D11_HS_OUTPUT_PATCH_CONSTANT_REGISTER_READ_PORTS: ::DWORD = 1; -pub const D3D11_HS_OUTPUT_PATCH_CONSTANT_REGISTER_SCALAR_COMPONENTS: ::DWORD = 128; -pub const D3D11_IA_DEFAULT_INDEX_BUFFER_OFFSET_IN_BYTES: ::DWORD = 0; -pub const D3D11_IA_DEFAULT_PRIMITIVE_TOPOLOGY: ::DWORD = 0; -pub const D3D11_IA_DEFAULT_VERTEX_BUFFER_OFFSET_IN_BYTES: ::DWORD = 0; -pub const D3D11_IA_INDEX_INPUT_RESOURCE_SLOT_COUNT: ::DWORD = 1; -pub const D3D11_IA_INSTANCE_ID_BIT_COUNT: ::DWORD = 32; -pub const D3D11_IA_INTEGER_ARITHMETIC_BIT_COUNT: ::DWORD = 32; -pub const D3D11_IA_PATCH_MAX_CONTROL_POINT_COUNT: ::DWORD = 32; -pub const D3D11_IA_PRIMITIVE_ID_BIT_COUNT: ::DWORD = 32; -pub const D3D11_IA_VERTEX_ID_BIT_COUNT: ::DWORD = 32; -pub const D3D11_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT: ::DWORD = 32; -pub const D3D11_IA_VERTEX_INPUT_STRUCTURE_ELEMENTS_COMPONENTS: ::DWORD = 128; -pub const D3D11_IA_VERTEX_INPUT_STRUCTURE_ELEMENT_COUNT: ::DWORD = 32; -pub const D3D11_INTEGER_DIVIDE_BY_ZERO_QUOTIENT: ::DWORD = 0xffffffff; -pub const D3D11_INTEGER_DIVIDE_BY_ZERO_REMAINDER: ::DWORD = 0xffffffff; -pub const D3D11_KEEP_RENDER_TARGETS_AND_DEPTH_STENCIL: ::DWORD = 0xffffffff; -pub const D3D11_KEEP_UNORDERED_ACCESS_VIEWS: ::DWORD = 0xffffffff; -pub const D3D11_LINEAR_GAMMA: ::FLOAT = 1.0; -pub const D3D11_MAJOR_VERSION: ::DWORD = 11; -pub const D3D11_MAX_BORDER_COLOR_COMPONENT: ::FLOAT = 1.0; -pub const D3D11_MAX_DEPTH: ::FLOAT = 1.0; -pub const D3D11_MAX_MAXANISOTROPY: ::DWORD = 16; -pub const D3D11_MAX_MULTISAMPLE_SAMPLE_COUNT: ::DWORD = 32; -pub const D3D11_MAX_POSITION_VALUE: ::FLOAT = 3.402823466E+34; -pub const D3D11_MAX_TEXTURE_DIMENSION_2_TO_EXP: ::DWORD = 17; -pub const D3D11_MINOR_VERSION: ::DWORD = 0; -pub const D3D11_MIN_BORDER_COLOR_COMPONENT: ::FLOAT = 0.0; -pub const D3D11_MIN_DEPTH: ::FLOAT = 0.0; -pub const D3D11_MIN_MAXANISOTROPY: ::DWORD = 0; -pub const D3D11_MIP_LOD_BIAS_MAX: ::FLOAT = 15.99; -pub const D3D11_MIP_LOD_BIAS_MIN: ::FLOAT = -16.0; -pub const D3D11_MIP_LOD_FRACTIONAL_BIT_COUNT: ::DWORD = 8; -pub const D3D11_MIP_LOD_RANGE_BIT_COUNT: ::DWORD = 8; -pub const D3D11_MULTISAMPLE_ANTIALIAS_LINE_WIDTH: ::FLOAT = 1.4; -pub const D3D11_NONSAMPLE_FETCH_OUT_OF_RANGE_ACCESS_RESULT: ::DWORD = 0; -pub const D3D11_PIXEL_ADDRESS_RANGE_BIT_COUNT: ::DWORD = 15; -pub const D3D11_PRE_SCISSOR_PIXEL_ADDRESS_RANGE_BIT_COUNT: ::DWORD = 16; -pub const D3D11_PS_CS_UAV_REGISTER_COMPONENTS: ::DWORD = 1; -pub const D3D11_PS_CS_UAV_REGISTER_COUNT: ::DWORD = 8; -pub const D3D11_PS_CS_UAV_REGISTER_READS_PER_INST: ::DWORD = 1; -pub const D3D11_PS_CS_UAV_REGISTER_READ_PORTS: ::DWORD = 1; -pub const D3D11_PS_FRONTFACING_DEFAULT_VALUE: ::DWORD = 0xffffffff; -pub const D3D11_PS_FRONTFACING_FALSE_VALUE: ::DWORD = 0; -pub const D3D11_PS_FRONTFACING_TRUE_VALUE: ::DWORD = 0xffffffff; -pub const D3D11_PS_INPUT_REGISTER_COMPONENTS: ::DWORD = 4; -pub const D3D11_PS_INPUT_REGISTER_COMPONENT_BIT_COUNT: ::DWORD = 32; -pub const D3D11_PS_INPUT_REGISTER_COUNT: ::DWORD = 32; -pub const D3D11_PS_INPUT_REGISTER_READS_PER_INST: ::DWORD = 2; -pub const D3D11_PS_INPUT_REGISTER_READ_PORTS: ::DWORD = 1; -pub const D3D11_PS_LEGACY_PIXEL_CENTER_FRACTIONAL_COMPONENT: ::FLOAT = 0.0; -pub const D3D11_PS_OUTPUT_DEPTH_REGISTER_COMPONENTS: ::DWORD = 1; -pub const D3D11_PS_OUTPUT_DEPTH_REGISTER_COMPONENT_BIT_COUNT: ::DWORD = 32; -pub const D3D11_PS_OUTPUT_DEPTH_REGISTER_COUNT: ::DWORD = 1; -pub const D3D11_PS_OUTPUT_MASK_REGISTER_COMPONENTS: ::DWORD = 1; -pub const D3D11_PS_OUTPUT_MASK_REGISTER_COMPONENT_BIT_COUNT: ::DWORD = 32; -pub const D3D11_PS_OUTPUT_MASK_REGISTER_COUNT: ::DWORD = 1; -pub const D3D11_PS_OUTPUT_REGISTER_COMPONENTS: ::DWORD = 4; -pub const D3D11_PS_OUTPUT_REGISTER_COMPONENT_BIT_COUNT: ::DWORD = 32; -pub const D3D11_PS_OUTPUT_REGISTER_COUNT: ::DWORD = 8; -pub const D3D11_PS_PIXEL_CENTER_FRACTIONAL_COMPONENT: ::FLOAT = 0.5; -pub const D3D11_RAW_UAV_SRV_BYTE_ALIGNMENT: ::DWORD = 16; -pub const D3D11_REQ_BLEND_OBJECT_COUNT_PER_DEVICE: ::DWORD = 4096; -pub const D3D11_REQ_BUFFER_RESOURCE_TEXEL_COUNT_2_TO_EXP: ::DWORD = 27; -pub const D3D11_REQ_CONSTANT_BUFFER_ELEMENT_COUNT: ::DWORD = 4096; -pub const D3D11_REQ_DEPTH_STENCIL_OBJECT_COUNT_PER_DEVICE: ::DWORD = 4096; -pub const D3D11_REQ_DRAWINDEXED_INDEX_COUNT_2_TO_EXP: ::DWORD = 32; -pub const D3D11_REQ_DRAW_VERTEX_COUNT_2_TO_EXP: ::DWORD = 32; -pub const D3D11_REQ_FILTERING_HW_ADDRESSABLE_RESOURCE_DIMENSION: ::DWORD = 16384; -pub const D3D11_REQ_GS_INVOCATION_32BIT_OUTPUT_COMPONENT_LIMIT: ::DWORD = 1024; -pub const D3D11_REQ_IMMEDIATE_CONSTANT_BUFFER_ELEMENT_COUNT: ::DWORD = 4096; -pub const D3D11_REQ_MAXANISOTROPY: ::DWORD = 16; -pub const D3D11_REQ_MIP_LEVELS: ::DWORD = 15; -pub const D3D11_REQ_MULTI_ELEMENT_STRUCTURE_SIZE_IN_BYTES: ::DWORD = 2048; -pub const D3D11_REQ_RASTERIZER_OBJECT_COUNT_PER_DEVICE: ::DWORD = 4096; -pub const D3D11_REQ_RENDER_TO_BUFFER_WINDOW_WIDTH: ::DWORD = 16384; -pub const D3D11_REQ_RESOURCE_SIZE_IN_MEGABYTES_EXPRESSION_A_TERM: ::DWORD = 128; -pub const D3D11_REQ_RESOURCE_SIZE_IN_MEGABYTES_EXPRESSION_B_TERM: ::FLOAT = 0.25; -pub const D3D11_REQ_RESOURCE_SIZE_IN_MEGABYTES_EXPRESSION_C_TERM: ::DWORD = 2048; -pub const D3D11_REQ_RESOURCE_VIEW_COUNT_PER_DEVICE_2_TO_EXP: ::DWORD = 20; -pub const D3D11_REQ_SAMPLER_OBJECT_COUNT_PER_DEVICE: ::DWORD = 4096; -pub const D3D11_REQ_TEXTURE1D_ARRAY_AXIS_DIMENSION: ::DWORD = 2048; -pub const D3D11_REQ_TEXTURE1D_U_DIMENSION: ::DWORD = 16384; -pub const D3D11_REQ_TEXTURE2D_ARRAY_AXIS_DIMENSION: ::DWORD = 2048; -pub const D3D11_REQ_TEXTURE2D_U_OR_V_DIMENSION: ::DWORD = 16384; -pub const D3D11_REQ_TEXTURE3D_U_V_OR_W_DIMENSION: ::DWORD = 2048; -pub const D3D11_REQ_TEXTURECUBE_DIMENSION: ::DWORD = 16384; -pub const D3D11_RESINFO_INSTRUCTION_MISSING_COMPONENT_RETVAL: ::DWORD = 0; -pub const D3D11_SHADER_MAJOR_VERSION: ::DWORD = 5; -pub const D3D11_SHADER_MAX_INSTANCES: ::DWORD = 65535; -pub const D3D11_SHADER_MAX_INTERFACES: ::DWORD = 253; -pub const D3D11_SHADER_MAX_INTERFACE_CALL_SITES: ::DWORD = 4096; -pub const D3D11_SHADER_MAX_TYPES: ::DWORD = 65535; -pub const D3D11_SHADER_MINOR_VERSION: ::DWORD = 0; -pub const D3D11_SHIFT_INSTRUCTION_PAD_VALUE: ::DWORD = 0; -pub const D3D11_SHIFT_INSTRUCTION_SHIFT_VALUE_BIT_COUNT: ::DWORD = 5; -pub const D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT: ::DWORD = 8; -pub const D3D11_SO_BUFFER_MAX_STRIDE_IN_BYTES: ::DWORD = 2048; -pub const D3D11_SO_BUFFER_MAX_WRITE_WINDOW_IN_BYTES: ::DWORD = 512; -pub const D3D11_SO_BUFFER_SLOT_COUNT: ::DWORD = 4; -pub const D3D11_SO_DDI_REGISTER_INDEX_DENOTING_GAP: ::DWORD = 0xffffffff; -pub const D3D11_SO_NO_RASTERIZED_STREAM: ::DWORD = 0xffffffff; -pub const D3D11_SO_OUTPUT_COMPONENT_COUNT: ::DWORD = 128; -pub const D3D11_SO_STREAM_COUNT: ::DWORD = 4; -pub const D3D11_SPEC_DATE_DAY: ::DWORD = 16; -pub const D3D11_SPEC_DATE_MONTH: ::DWORD = 05; -pub const D3D11_SPEC_DATE_YEAR: ::DWORD = 2011; -pub const D3D11_SPEC_VERSION: ::FLOAT = 1.07; -pub const D3D11_SRGB_GAMMA: ::FLOAT = 2.2; -pub const D3D11_SRGB_TO_FLOAT_DENOMINATOR_1: ::FLOAT = 12.92; -pub const D3D11_SRGB_TO_FLOAT_DENOMINATOR_2: ::FLOAT = 1.055; -pub const D3D11_SRGB_TO_FLOAT_EXPONENT: ::FLOAT = 2.4; -pub const D3D11_SRGB_TO_FLOAT_OFFSET: ::FLOAT = 0.055; -pub const D3D11_SRGB_TO_FLOAT_THRESHOLD: ::FLOAT = 0.04045; -pub const D3D11_SRGB_TO_FLOAT_TOLERANCE_IN_ULP: ::FLOAT = 0.5; -pub const D3D11_STANDARD_COMPONENT_BIT_COUNT: ::DWORD = 32; -pub const D3D11_STANDARD_COMPONENT_BIT_COUNT_DOUBLED: ::DWORD = 64; -pub const D3D11_STANDARD_MAXIMUM_ELEMENT_ALIGNMENT_BYTE_MULTIPLE: ::DWORD = 4; -pub const D3D11_STANDARD_PIXEL_COMPONENT_COUNT: ::DWORD = 128; -pub const D3D11_STANDARD_PIXEL_ELEMENT_COUNT: ::DWORD = 32; -pub const D3D11_STANDARD_VECTOR_SIZE: ::DWORD = 4; -pub const D3D11_STANDARD_VERTEX_ELEMENT_COUNT: ::DWORD = 32; -pub const D3D11_STANDARD_VERTEX_TOTAL_COMPONENT_COUNT: ::DWORD = 64; -pub const D3D11_SUBPIXEL_FRACTIONAL_BIT_COUNT: ::DWORD = 8; -pub const D3D11_SUBTEXEL_FRACTIONAL_BIT_COUNT: ::DWORD = 8; -pub const D3D11_TESSELLATOR_MAX_EVEN_TESSELLATION_FACTOR: ::DWORD = 64; -pub const D3D11_TESSELLATOR_MAX_ISOLINE_DENSITY_TESSELLATION_FACTOR: ::DWORD = 64; -pub const D3D11_TESSELLATOR_MAX_ODD_TESSELLATION_FACTOR: ::DWORD = 63; -pub const D3D11_TESSELLATOR_MAX_TESSELLATION_FACTOR: ::DWORD = 64; -pub const D3D11_TESSELLATOR_MIN_EVEN_TESSELLATION_FACTOR: ::DWORD = 2; -pub const D3D11_TESSELLATOR_MIN_ISOLINE_DENSITY_TESSELLATION_FACTOR: ::DWORD = 1; -pub const D3D11_TESSELLATOR_MIN_ODD_TESSELLATION_FACTOR: ::DWORD = 1; -pub const D3D11_TEXEL_ADDRESS_RANGE_BIT_COUNT: ::DWORD = 16; -pub const D3D11_UNBOUND_MEMORY_ACCESS_RESULT: ::DWORD = 0; -pub const D3D11_VIEWPORT_AND_SCISSORRECT_MAX_INDEX: ::DWORD = 15; -pub const D3D11_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE: ::DWORD = 16; -pub const D3D11_VIEWPORT_BOUNDS_MAX: ::DWORD = 32767; -pub const D3D11_VIEWPORT_BOUNDS_MIN: ::c_long = -32768; -pub const D3D11_VS_INPUT_REGISTER_COMPONENTS: ::DWORD = 4; -pub const D3D11_VS_INPUT_REGISTER_COMPONENT_BIT_COUNT: ::DWORD = 32; -pub const D3D11_VS_INPUT_REGISTER_COUNT: ::DWORD = 32; -pub const D3D11_VS_INPUT_REGISTER_READS_PER_INST: ::DWORD = 2; -pub const D3D11_VS_INPUT_REGISTER_READ_PORTS: ::DWORD = 1; -pub const D3D11_VS_OUTPUT_REGISTER_COMPONENTS: ::DWORD = 4; -pub const D3D11_VS_OUTPUT_REGISTER_COMPONENT_BIT_COUNT: ::DWORD = 32; -pub const D3D11_VS_OUTPUT_REGISTER_COUNT: ::DWORD = 32; -pub const D3D11_WHQL_CONTEXT_COUNT_FOR_RESOURCE_LIMIT: ::DWORD = 10; -pub const D3D11_WHQL_DRAWINDEXED_INDEX_COUNT_2_TO_EXP: ::DWORD = 25; -pub const D3D11_WHQL_DRAW_VERTEX_COUNT_2_TO_EXP: ::DWORD = 25; -ENUM!{enum D3D11_INPUT_CLASSIFICATION { - D3D11_INPUT_PER_VERTEX_DATA = 0, - D3D11_INPUT_PER_INSTANCE_DATA = 1, -}} -pub const D3D11_APPEND_ALIGNED_ELEMENT: ::DWORD = 0xffffffff; -STRUCT!{struct D3D11_INPUT_ELEMENT_DESC { - SemanticName: ::LPCSTR, - SemanticIndex: ::UINT, - Format: ::DXGI_FORMAT, - InputSlot: ::UINT, - AlignedByteOffset: ::UINT, - InputSlotClass: ::D3D11_INPUT_CLASSIFICATION, - InstanceDataStepRate: ::UINT, -}} -ENUM!{enum D3D11_FILL_MODE { - D3D11_FILL_WIREFRAME = 2, - D3D11_FILL_SOLID = 3, -}} -pub type D3D11_PRIMITIVE_TOPOLOGY = ::D3D_PRIMITIVE_TOPOLOGY; -pub type D3D11_PRIMITIVE = ::D3D_PRIMITIVE; -ENUM!{enum D3D11_CULL_MODE { - D3D11_CULL_NONE = 1, - D3D11_CULL_FRONT = 2, - D3D11_CULL_BACK = 3, -}} -STRUCT!{struct D3D11_SO_DECLARATION_ENTRY { - Stream: ::UINT, - SemanticName: ::LPCSTR, - SemanticIndex: ::UINT, - StartComponent: ::BYTE, - ComponentCount: ::BYTE, - OutputSlot: ::BYTE, -}} -STRUCT!{struct D3D11_VIEWPORT { - TopLeftX: ::FLOAT, - TopLeftY: ::FLOAT, - Width: ::FLOAT, - Height: ::FLOAT, - MinDepth: ::FLOAT, - MaxDepth: ::FLOAT, -}} -STRUCT!{struct D3D11_DRAW_INSTANCED_INDIRECT_ARGS { - VertexCountPerInstance: ::UINT, - InstanceCount: ::UINT, - StartVertexLocation: ::UINT, - StartInstanceLocation: ::UINT, -}} -STRUCT!{struct D3D11_DRAW_INDEXED_INSTANCED_INDIRECT_ARGS { - IndexCountPerInstance: ::UINT, - InstanceCount: ::UINT, - StartIndexLocation: ::UINT, - BaseVertexLocation: ::INT, - StartInstanceLocation: ::UINT, -}} -ENUM!{enum D3D11_RESOURCE_DIMENSION { - D3D11_RESOURCE_DIMENSION_UNKNOWN = 0, - D3D11_RESOURCE_DIMENSION_BUFFER = 1, - D3D11_RESOURCE_DIMENSION_TEXTURE1D = 2, - D3D11_RESOURCE_DIMENSION_TEXTURE2D = 3, - D3D11_RESOURCE_DIMENSION_TEXTURE3D = 4, -}} -pub type D3D11_SRV_DIMENSION = ::D3D_SRV_DIMENSION; -ENUM!{enum D3D11_DSV_DIMENSION { - D3D11_DSV_DIMENSION_UNKNOWN = 0, - D3D11_DSV_DIMENSION_TEXTURE1D = 1, - D3D11_DSV_DIMENSION_TEXTURE1DARRAY = 2, - D3D11_DSV_DIMENSION_TEXTURE2D = 3, - D3D11_DSV_DIMENSION_TEXTURE2DARRAY = 4, - D3D11_DSV_DIMENSION_TEXTURE2DMS = 5, - D3D11_DSV_DIMENSION_TEXTURE2DMSARRAY = 6, -}} -ENUM!{enum D3D11_RTV_DIMENSION { - D3D11_RTV_DIMENSION_UNKNOWN = 0, - D3D11_RTV_DIMENSION_BUFFER = 1, - D3D11_RTV_DIMENSION_TEXTURE1D = 2, - D3D11_RTV_DIMENSION_TEXTURE1DARRAY = 3, - D3D11_RTV_DIMENSION_TEXTURE2D = 4, - D3D11_RTV_DIMENSION_TEXTURE2DARRAY = 5, - D3D11_RTV_DIMENSION_TEXTURE2DMS = 6, - D3D11_RTV_DIMENSION_TEXTURE2DMSARRAY = 7, - D3D11_RTV_DIMENSION_TEXTURE3D = 8, -}} -ENUM!{enum D3D11_UAV_DIMENSION { - D3D11_UAV_DIMENSION_UNKNOWN = 0, - D3D11_UAV_DIMENSION_BUFFER = 1, - D3D11_UAV_DIMENSION_TEXTURE1D = 2, - D3D11_UAV_DIMENSION_TEXTURE1DARRAY = 3, - D3D11_UAV_DIMENSION_TEXTURE2D = 4, - D3D11_UAV_DIMENSION_TEXTURE2DARRAY = 5, - D3D11_UAV_DIMENSION_TEXTURE3D = 8, -}} -ENUM!{enum D3D11_USAGE { - D3D11_USAGE_DEFAULT = 0, - D3D11_USAGE_IMMUTABLE = 1, - D3D11_USAGE_DYNAMIC = 2, - D3D11_USAGE_STAGING = 3, -}} -FLAGS!{enum D3D11_BIND_FLAG { - D3D11_BIND_VERTEX_BUFFER = 0x1, - D3D11_BIND_INDEX_BUFFER = 0x2, - D3D11_BIND_CONSTANT_BUFFER = 0x4, - D3D11_BIND_SHADER_RESOURCE = 0x8, - D3D11_BIND_STREAM_OUTPUT = 0x10, - D3D11_BIND_RENDER_TARGET = 0x20, - D3D11_BIND_DEPTH_STENCIL = 0x40, - D3D11_BIND_UNORDERED_ACCESS = 0x80, - D3D11_BIND_DECODER = 0x200, - D3D11_BIND_VIDEO_ENCODER = 0x400, -}} -FLAGS!{enum D3D11_CPU_ACCESS_FLAG { - D3D11_CPU_ACCESS_WRITE = 0x10000, - D3D11_CPU_ACCESS_READ = 0x20000, -}} -FLAGS!{enum D3D11_RESOURCE_MISC_FLAG { - D3D11_RESOURCE_MISC_GENERATE_MIPS = 0x1, - D3D11_RESOURCE_MISC_SHARED = 0x2, - D3D11_RESOURCE_MISC_TEXTURECUBE = 0x4, - D3D11_RESOURCE_MISC_DRAWINDIRECT_ARGS = 0x10, - D3D11_RESOURCE_MISC_BUFFER_ALLOW_RAW_VIEWS = 0x20, - D3D11_RESOURCE_MISC_BUFFER_STRUCTURED = 0x40, - D3D11_RESOURCE_MISC_RESOURCE_CLAMP = 0x80, - D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX = 0x100, - D3D11_RESOURCE_MISC_GDI_COMPATIBLE = 0x200, - D3D11_RESOURCE_MISC_SHARED_NTHANDLE = 0x800, - D3D11_RESOURCE_MISC_RESTRICTED_CONTENT = 0x1000, - D3D11_RESOURCE_MISC_RESTRICT_SHARED_RESOURCE = 0x2000, - D3D11_RESOURCE_MISC_RESTRICT_SHARED_RESOURCE_DRIVER = 0x4000, - D3D11_RESOURCE_MISC_GUARDED = 0x8000, - D3D11_RESOURCE_MISC_TILE_POOL = 0x20000, - D3D11_RESOURCE_MISC_TILED = 0x40000, - D3D11_RESOURCE_MISC_HW_PROTECTED = 0x80000, -}} -ENUM!{enum D3D11_MAP { - D3D11_MAP_READ = 1, - D3D11_MAP_WRITE = 2, - D3D11_MAP_READ_WRITE = 3, - D3D11_MAP_WRITE_DISCARD = 4, - D3D11_MAP_WRITE_NO_OVERWRITE = 5, -}} -pub const D3D11_MAP_FLAG_DO_NOT_WAIT: ::DWORD = 0x100000; -pub const D3D11_RAISE_FLAG_DRIVER_INTERNAL_ERROR: ::DWORD = 0x1; -FLAGS!{enum D3D11_CLEAR_FLAG { - DEPTH = 0x1, - STENCIL = 0x2, -}} -pub type D3D11_RECT = ::RECT; -STRUCT!{struct D3D11_BOX { - left: ::UINT, - top: ::UINT, - front: ::UINT, - right: ::UINT, - bottom: ::UINT, - back: ::UINT, -}} -RIDL!( -interface ID3D11DeviceChild(ID3D11DeviceChildVtbl): IUnknown(IUnknownVtbl) { - fn GetDevice(&mut self, ppDevice: *mut *mut ID3D11Device) -> (), - fn GetPrivateData( - &mut self, guid: ::REFGUID, pDataSize: *mut ::UINT, - pData: *mut ::c_void - ) -> ::HRESULT, - fn SetPrivateData( - &mut self, guid: ::REFGUID, DataSize: ::UINT, - pData: *const ::c_void - ) -> ::HRESULT, - fn SetPrivateDataInterface(&mut self, guid: ::REFGUID, pData: *const ::IUnknown) -> ::HRESULT -} -); -ENUM!{enum D3D11_COMPARISON_FUNC { - D3D11_COMPARISON_NEVER = 1, - D3D11_COMPARISON_LESS = 2, - D3D11_COMPARISON_EQUAL = 3, - D3D11_COMPARISON_LESS_EQUAL = 4, - D3D11_COMPARISON_GREATER = 5, - D3D11_COMPARISON_NOT_EQUAL = 6, - D3D11_COMPARISON_GREATER_EQUAL = 7, - D3D11_COMPARISON_ALWAYS = 8, -}} -ENUM!{enum D3D11_DEPTH_WRITE_MASK { - D11_DEPTH_WRITE_MASK_ZERO = 0, - D11_DEPTH_WRITE_MASK_ALL = 1, -}} -ENUM!{enum D3D11_STENCIL_OP { - D3D11_STENCIL_OP_KEEP = 1, - D3D11_STENCIL_OP_ZERO = 2, - D3D11_STENCIL_OP_REPLACE = 3, - D3D11_STENCIL_OP_INCR_SAT = 4, - D3D11_STENCIL_OP_DECR_SAT = 5, - D3D11_STENCIL_OP_INVERT = 6, - D3D11_STENCIL_OP_INCR = 7, - D3D11_STENCIL_OP_DECR = 8, -}} -STRUCT!{struct D3D11_DEPTH_STENCILOP_DESC { - StencilFailOp: D3D11_STENCIL_OP, - StencilDepthFailOp: D3D11_STENCIL_OP, - StencilPassOp: D3D11_STENCIL_OP, - StencilFunc: D3D11_COMPARISON_FUNC, -}} -STRUCT!{struct D3D11_DEPTH_STENCIL_DESC { - DepthEnable: ::BOOL, - DepthWriteMask: D3D11_DEPTH_WRITE_MASK, - DepthFunc: D3D11_COMPARISON_FUNC, - StencilEnable: ::BOOL, - StencilReadMask: ::UINT8, - StencilWriteMask: ::UINT8, - FrontFace: D3D11_DEPTH_STENCILOP_DESC, - BackFace: D3D11_DEPTH_STENCILOP_DESC, -}} -RIDL!( -interface ID3D11DepthStencilState(ID3D11DepthStencilStateVtbl) - : ID3D11DeviceChild(ID3D11DeviceChildVtbl) { - fn GetDesc(&mut self, pDesc: *mut D3D11_DEPTH_STENCIL_DESC) -> () -} -); -ENUM!{enum D3D11_BLEND { - D3D11_BLEND_ZERO = 1, - D3D11_BLEND_ONE = 2, - D3D11_BLEND_SRC_COLOR = 3, - D3D11_BLEND_INV_SRC_COLOR = 4, - D3D11_BLEND_SRC_ALPHA = 5, - D3D11_BLEND_INV_SRC_ALPHA = 6, - D3D11_BLEND_DEST_ALPHA = 7, - D3D11_BLEND_INV_DEST_ALPHA = 8, - D3D11_BLEND_DEST_COLOR = 9, - D3D11_BLEND_INV_DEST_COLOR = 10, - D3D11_BLEND_SRC_ALPHA_SAT = 11, - D3D11_BLEND_BLEND_FACTOR = 14, - D3D11_BLEND_INV_BLEND_FACTOR = 15, - D3D11_BLEND_SRC1_COLOR = 16, - D3D11_BLEND_INV_SRC1_COLOR = 17, - D3D11_BLEND_SRC1_ALPHA = 18, - D3D11_BLEND_INV_SRC1_ALPHA = 19, -}} -ENUM!{enum D3D11_BLEND_OP { - D3D11_BLEND_OP_ADD = 1, - D3D11_BLEND_OP_SUBTRACT = 2, - D3D11_BLEND_OP_REV_SUBTRACT = 3, - D3D11_BLEND_OP_MIN = 4, - D3D11_BLEND_OP_MAX = 5, -}} -FLAGS!{enum D3D11_COLOR_WRITE_ENABLE { - D3D11_COLOR_WRITE_ENABLE_RED = 1, - D3D11_COLOR_WRITE_ENABLE_GREEN = 2, - D3D11_COLOR_WRITE_ENABLE_BLUE = 4, - D3D11_COLOR_WRITE_ENABLE_ALPHA = 8, - D3D11_COLOR_WRITE_ENABLE_ALL = D3D11_COLOR_WRITE_ENABLE_RED.0 | D3D11_COLOR_WRITE_ENABLE_GREEN.0 | - D3D11_COLOR_WRITE_ENABLE_BLUE.0 | D3D11_COLOR_WRITE_ENABLE_ALPHA.0, -}} -STRUCT!{struct D3D11_RENDER_TARGET_BLEND_DESC { - BlendEnable: ::BOOL, - SrcBlend: D3D11_BLEND, - DestBlend: D3D11_BLEND, - BlendOp: D3D11_BLEND_OP, - SrcBlendAlpha: D3D11_BLEND, - DestBlendAlpha: D3D11_BLEND, - BlendOpAlpha: D3D11_BLEND_OP, - RenderTargetWriteMask: ::UINT8, -}} -STRUCT!{struct D3D11_BLEND_DESC { - AlphaToCoverageEnable: ::BOOL, - IndependentBlendEnable: ::BOOL, - RenderTarget: [D3D11_RENDER_TARGET_BLEND_DESC; 8], -}} -RIDL!( -interface ID3D11BlendState(ID3D11BlendStateVtbl): ID3D11DeviceChild(ID3D11DeviceChildVtbl) { - fn GetDesc(&mut self, pDesc: *mut D3D11_BLEND_DESC) -> () -} -); -STRUCT!{struct D3D11_RASTERIZER_DESC { - FillMode: D3D11_FILL_MODE, - CullMode: D3D11_CULL_MODE, - FrontCounterClockwise: ::BOOL, - DepthBias: ::INT, - DepthBiasClamp: ::FLOAT, - SlopeScaledDepthBias: ::FLOAT, - DepthClipEnable: ::BOOL, - ScissorEnable: ::BOOL, - MultisampleEnable: ::BOOL, - AntialiasedLineEnable: ::BOOL, -}} -RIDL!( -interface ID3D11RasterizerState(ID3D11RasterizerStateVtbl) - : ID3D11DeviceChild(ID3D11DeviceChildVtbl) { - fn GetDesc(&mut self, pDesc: *mut D3D11_RASTERIZER_DESC) -> () -} -); -STRUCT!{struct D3D11_SUBRESOURCE_DATA { - pSysMem: *const ::c_void, - SysMemPitch: ::UINT, - SysMemSlicePitch: ::UINT, -}} -STRUCT!{struct D3D11_MAPPED_SUBRESOURCE { - pData: *mut ::c_void, - RowPitch: ::UINT, - DepthPitch: ::UINT, -}} -RIDL!( -interface ID3D11Resource(ID3D11ResourceVtbl): ID3D11DeviceChild(ID3D11DeviceChildVtbl) { - fn GetType(&mut self, pResourceDimension: *mut D3D11_RESOURCE_DIMENSION) -> (), - fn SetEvictionPriority(&mut self, EvictionPriority: ::UINT) -> (), - fn GetEvictionPriority(&mut self) -> ::UINT -} -); -STRUCT!{struct D3D11_BUFFER_DESC { - ByteWidth: ::UINT, - Usage: D3D11_USAGE, - BindFlags: ::UINT, - CPUAccessFlags: ::UINT, - MiscFlags: ::UINT, - StructureByteStride: ::UINT, -}} -RIDL!( -interface ID3D11Buffer(ID3D11BufferVtbl): ID3D11Resource(ID3D11ResourceVtbl) { - fn GetDesc(&mut self, pDesc: *mut D3D11_BUFFER_DESC) -> () -} -); -STRUCT!{struct D3D11_TEXTURE1D_DESC { - Width: ::UINT, - MipLevels: ::UINT, - ArraySize: ::UINT, - Format: ::DXGI_FORMAT, - Usage: D3D11_USAGE, - BindFlags: ::UINT, - CPUAccessFlags: ::UINT, - MiscFlags: ::UINT, -}} -RIDL!( -interface ID3D11Texture1D(ID3D11Texture1DVtbl): ID3D11Resource(ID3D11ResourceVtbl) { - fn GetDesc(&mut self, pDesc: *mut D3D11_TEXTURE1D_DESC) -> () -} -); -STRUCT!{struct D3D11_TEXTURE2D_DESC { - Width: ::UINT, - Height: ::UINT, - MipLevels: ::UINT, - ArraySize: ::UINT, - Format: ::DXGI_FORMAT, - SampleDesc: ::DXGI_SAMPLE_DESC, - Usage: D3D11_USAGE, - BindFlags: ::UINT, - CPUAccessFlags: ::UINT, - MiscFlags: ::UINT, -}} -RIDL!( -interface ID3D11Texture2D(ID3D11Texture2DVtbl): ID3D11Resource(ID3D11ResourceVtbl) { - fn GetDesc(&mut self, pDesc: *mut D3D11_TEXTURE2D_DESC) -> () -} -); -STRUCT!{struct D3D11_TEXTURE3D_DESC { - Width: ::UINT, - Height: ::UINT, - Depth: ::UINT, - MipLevels: ::UINT, - Format: ::DXGI_FORMAT, - Usage: D3D11_USAGE, - BindFlags: ::UINT, - CPUAccessFlags: ::UINT, - MiscFlags: ::UINT, -}} -RIDL!( -interface ID3D11Texture3D(ID3D11Texture3DVtbl): ID3D11Resource(ID3D11ResourceVtbl) { - fn GetDesc(&mut self, pDesc: *mut D3D11_TEXTURE3D_DESC) -> () -} -); -ENUM!{enum D3D11_TEXTURECUBE_FACE { - D3D11_TEXTURECUBE_FACE_POSITIVE_X = 0, - D3D11_TEXTURECUBE_FACE_NEGATIVE_X = 1, - D3D11_TEXTURECUBE_FACE_POSITIVE_Y = 2, - D3D11_TEXTURECUBE_FACE_NEGATIVE_Y = 3, - D3D11_TEXTURECUBE_FACE_POSITIVE_Z = 4, - D3D11_TEXTURECUBE_FACE_NEGATIVE_Z = 5, -}} -RIDL!( -interface ID3D11View(ID3D11ViewVtbl): ID3D11DeviceChild(ID3D11DeviceChildVtbl) { - fn GetResource(&mut self, ppResource: *mut *mut ID3D11Resource) -> () -} -); -STRUCT!{struct D3D11_BUFFER_SRV { - u1: ::UINT, - u2: ::UINT, -}} -UNION!(D3D11_BUFFER_SRV, u1, FirstElement, FirstElement_mut, ::UINT); -UNION!(D3D11_BUFFER_SRV, u1, ElementOffset, ElementOffset_mut, ::UINT); -UNION!(D3D11_BUFFER_SRV, u2, ElementWidth, ElementWidth_mut, ::UINT); -UNION!(D3D11_BUFFER_SRV, u2, NumElements, NumElements_mut, ::UINT); -FLAGS!{enum D3D11_BUFFEREX_SRV_FLAG { - D3D11_BUFFEREX_SRV_FLAG_RAW = 0x1, -}} -STRUCT!{struct D3D11_BUFFEREX_SRV { - FirstElement: ::UINT, - NumElements: ::UINT, - Flags: ::UINT, -}} -STRUCT!{struct D3D11_TEX1D_SRV { - MostDetailedMip: ::UINT, - MipLevels: ::UINT, -}} -STRUCT!{struct D3D11_TEX1D_ARRAY_SRV { - MostDetailedMip: ::UINT, - MipLevels: ::UINT, - FirstArraySlice: ::UINT, - ArraySize: ::UINT, -}} -STRUCT!{struct D3D11_TEX2D_SRV { - MostDetailedMip: ::UINT, - MipLevels: ::UINT, -}} -STRUCT!{struct D3D11_TEX2D_ARRAY_SRV { - MostDetailedMip: ::UINT, - MipLevels: ::UINT, - FirstArraySlice: ::UINT, - ArraySize: ::UINT, -}} -STRUCT!{struct D3D11_TEX3D_SRV { - MostDetailedMip: ::UINT, - MipLevels: ::UINT, -}} -STRUCT!{struct D3D11_TEXCUBE_SRV { - MostDetailedMip: ::UINT, - MipLevels: ::UINT, -}} -STRUCT!{struct D3D11_TEXCUBE_ARRAY_SRV { - MostDetailedMip: ::UINT, - MipLevels: ::UINT, - First2DArrayFace: ::UINT, - NumCubes: ::UINT, -}} -STRUCT!{struct D3D11_TEX2DMS_SRV { - UnusedField_NothingToDefine: ::UINT, -}} -STRUCT!{struct D3D11_TEX2DMS_ARRAY_SRV { - FirstArraySlice: ::UINT, - ArraySize: ::UINT, -}} -STRUCT!{struct D3D11_SHADER_RESOURCE_VIEW_DESC { - Format: ::DXGI_FORMAT, - ViewDimension: D3D11_SRV_DIMENSION, - u: [::UINT; 4], -}} -UNION!(D3D11_SHADER_RESOURCE_VIEW_DESC, u, Buffer, Buffer_mut, D3D11_BUFFER_SRV); -UNION!(D3D11_SHADER_RESOURCE_VIEW_DESC, u, Texture1D, Texture1D_mut, D3D11_TEX1D_SRV); -UNION!(D3D11_SHADER_RESOURCE_VIEW_DESC, u, Texture1DArray, Texture1DArray_mut, - D3D11_TEX1D_ARRAY_SRV); -UNION!(D3D11_SHADER_RESOURCE_VIEW_DESC, u, Texture2D, Texture2D_mut, D3D11_TEX2D_SRV); -UNION!(D3D11_SHADER_RESOURCE_VIEW_DESC, u, Texture2DArray, Texture2DArray_mut, - D3D11_TEX2D_ARRAY_SRV); -UNION!(D3D11_SHADER_RESOURCE_VIEW_DESC, u, Texture2DMS, Texture2DMS_mut, D3D11_TEX2DMS_SRV); -UNION!(D3D11_SHADER_RESOURCE_VIEW_DESC, u, Texture2DMSArray, Texture2DMSArray_mut, - D3D11_TEX2DMS_ARRAY_SRV); -UNION!(D3D11_SHADER_RESOURCE_VIEW_DESC, u, Texture3D, Texture3D_mut, D3D11_TEX3D_SRV); -UNION!(D3D11_SHADER_RESOURCE_VIEW_DESC, u, TextureCube, TextureCube_mut, D3D11_TEXCUBE_SRV); -UNION!(D3D11_SHADER_RESOURCE_VIEW_DESC, u, TextureCubeArray, TextureCubeArray_mut, - D3D11_TEXCUBE_ARRAY_SRV); -UNION!(D3D11_SHADER_RESOURCE_VIEW_DESC, u, BufferEx, BufferEx_mut, D3D11_BUFFEREX_SRV); -RIDL!( -interface ID3D11ShaderResourceView(ID3D11ShaderResourceViewVtbl): ID3D11View(ID3D11ViewVtbl) { - fn GetDesc(&mut self, pDesc: *mut D3D11_SHADER_RESOURCE_VIEW_DESC) -> () -} -); -STRUCT!{struct D3D11_BUFFER_RTV { - u1: ::UINT, - u2: ::UINT, -}} -UNION!(D3D11_BUFFER_RTV, u1, FirstElement, FirstElement_mut, ::UINT); -UNION!(D3D11_BUFFER_RTV, u1, ElementOffset, ElementOffset_mut, ::UINT); -UNION!(D3D11_BUFFER_RTV, u2, NumElements, NumElements_mut, ::UINT); -UNION!(D3D11_BUFFER_RTV, u2, ElementWidth, ElementWidth_mut, ::UINT); -STRUCT!{struct D3D11_TEX1D_RTV { - MipSlice: ::UINT, -}} -STRUCT!{struct D3D11_TEX1D_ARRAY_RTV { - MipSlice: ::UINT, - FirstArraySlice: ::UINT, - ArraySize: ::UINT, -}} -STRUCT!{struct D3D11_TEX2D_RTV { - MipSlice: ::UINT, -}} -STRUCT!{struct D3D11_TEX2DMS_RTV { - UnusedField_NothingToDefine: ::UINT, -}} -STRUCT!{struct D3D11_TEX2D_ARRAY_RTV { - MipSlice: ::UINT, - FirstArraySlice: ::UINT, - ArraySize: ::UINT, -}} -STRUCT!{struct D3D11_TEX2DMS_ARRAY_RTV { - FirstArraySlice: ::UINT, - ArraySize: ::UINT, -}} -STRUCT!{struct D3D11_TEX3D_RTV { - MipSlice: ::UINT, - FirstWSlice: ::UINT, - WSize: ::UINT, -}} -STRUCT!{struct D3D11_RENDER_TARGET_VIEW_DESC { - Format: ::DXGI_FORMAT, - ViewDimension: D3D11_RTV_DIMENSION, - u: [::UINT; 3], -}} -UNION!(D3D11_RENDER_TARGET_VIEW_DESC, u, Buffer, Buffer_mut, D3D11_BUFFER_RTV); -UNION!(D3D11_RENDER_TARGET_VIEW_DESC, u, Texture1D, Texture1D_mut, D3D11_TEX1D_RTV); -UNION!(D3D11_RENDER_TARGET_VIEW_DESC, u, Texture1DArray, Texture1DArray_mut, - D3D11_TEX1D_ARRAY_RTV); -UNION!(D3D11_RENDER_TARGET_VIEW_DESC, u, Texture2D, Texture2D_mut, D3D11_TEX2D_RTV); -UNION!(D3D11_RENDER_TARGET_VIEW_DESC, u, Texture2DArray, Texture2DArray_mut, - D3D11_TEX2D_ARRAY_RTV); -UNION!(D3D11_RENDER_TARGET_VIEW_DESC, u, Texture2DMS, Texture2DMS_mut, D3D11_TEX2DMS_RTV); -UNION!(D3D11_RENDER_TARGET_VIEW_DESC, u, Texture2DMSArray,Texture2DMSArray_mut, - D3D11_TEX2DMS_ARRAY_RTV); -UNION!(D3D11_RENDER_TARGET_VIEW_DESC, u, Texture3D, Texture3D_mut, D3D11_TEX3D_RTV); -RIDL!( -interface ID3D11RenderTargetView(ID3D11RenderTargetViewVtbl): ID3D11View(ID3D11ViewVtbl) { - fn GetDesc(&mut self, pDesc: *mut D3D11_RENDER_TARGET_VIEW_DESC) -> () -} -); -STRUCT!{struct D3D11_TEX1D_DSV { - MipSlice: ::UINT, -}} -STRUCT!{struct D3D11_TEX1D_ARRAY_DSV { - MipSlice: ::UINT, - FirstArraySlice: ::UINT, - ArraySize: ::UINT, -}} -STRUCT!{struct D3D11_TEX2D_DSV { - MipSlice: ::UINT, -}} -STRUCT!{struct D3D11_TEX2D_ARRAY_DSV { - MipSlice: ::UINT, - FirstArraySlice: ::UINT, - ArraySize: ::UINT, -}} -STRUCT!{struct D3D11_TEX2DMS_DSV { - UnusedField_NothingToDefine: ::UINT, -}} -STRUCT!{struct D3D11_TEX2DMS_ARRAY_DSV { - FirstArraySlice: ::UINT, - ArraySize: ::UINT, -}} -FLAGS!{enum D3D11_DSV_FLAG{ - D3D11_DSV_READ_ONLY_DEPTH = 0x1, - D3D11_DSV_READ_ONLY_STENCIL = 0x2, -}} -STRUCT!{struct D3D11_DEPTH_STENCIL_VIEW_DESC { - Format: ::DXGI_FORMAT, - ViewDimension: D3D11_DSV_DIMENSION, - u: [::UINT; 3], -}} -UNION!(D3D11_DEPTH_STENCIL_VIEW_DESC, u, Texture1D, Texture1D_mut, D3D11_TEX1D_DSV); -UNION!(D3D11_DEPTH_STENCIL_VIEW_DESC, u, Texture1DArray, Texture1DArray_mut, - D3D11_TEX1D_ARRAY_DSV); -UNION!(D3D11_DEPTH_STENCIL_VIEW_DESC, u, Texture2D, Texture2D_mut, D3D11_TEX2D_DSV); -UNION!(D3D11_DEPTH_STENCIL_VIEW_DESC, u, Texture2DArray, Texture2DArray_mut, - D3D11_TEX2D_ARRAY_DSV); -UNION!(D3D11_DEPTH_STENCIL_VIEW_DESC, u, Texture2DMS, Texture2DMS_mut, D3D11_TEX2DMS_DSV); -UNION!(D3D11_DEPTH_STENCIL_VIEW_DESC, u, Texture2DMSArray, Texture2DMSArray_mut, - D3D11_TEX2DMS_ARRAY_DSV); -RIDL!( -interface ID3D11DepthStencilView(ID3D11DepthStencilViewVtbl): ID3D11View(ID3D11ViewVtbl) { - fn GetDesc(&mut self, pDesc: *mut D3D11_DEPTH_STENCIL_VIEW_DESC) -> () -} -); -FLAGS!{enum D3D11_BUFFER_UAV_FLAG { - D3D11_BUFFER_UAV_FLAG_RAW = 0x1, - D3D11_BUFFER_UAV_FLAG_APPEND = 0x2, - D3D11_BUFFER_UAV_FLAG_COUNTER = 0x4, -}} -STRUCT!{struct D3D11_BUFFER_UAV { - FirstElement: ::UINT, - NumElements: ::UINT, - Flags: ::UINT, -}} -STRUCT!{struct D3D11_TEX1D_UAV { - MipSlice: ::UINT, -}} -STRUCT!{struct D3D11_TEX1D_ARRAY_UAV { - MipSlice: ::UINT, - FirstArraySlice: ::UINT, - ArraySize: ::UINT, -}} -STRUCT!{struct D3D11_TEX2D_UAV { - MipSlice: ::UINT, -}} -STRUCT!{struct D3D11_TEX2D_ARRAY_UAV { - MipSlice: ::UINT, - FirstArraySlice: ::UINT, - ArraySize: ::UINT, -}} -STRUCT!{struct D3D11_TEX3D_UAV { - MipSlice: ::UINT, - FirstWSlice: ::UINT, - WSize: ::UINT, -}} -STRUCT!{struct D3D11_UNORDERED_ACCESS_VIEW_DESC { - Format: ::DXGI_FORMAT, - ViewDimension: D3D11_UAV_DIMENSION, - u: [::UINT; 3], -}} -UNION!(D3D11_UNORDERED_ACCESS_VIEW_DESC, u, Buffer, Buffer_mut, D3D11_BUFFER_UAV); -UNION!(D3D11_UNORDERED_ACCESS_VIEW_DESC, u, Texture1D, Texture1D_mut, D3D11_TEX1D_UAV); -UNION!(D3D11_UNORDERED_ACCESS_VIEW_DESC, u, Texture1DArray, Texture1DArray_mut, - D3D11_TEX1D_ARRAY_UAV); -UNION!(D3D11_UNORDERED_ACCESS_VIEW_DESC, u, Texture2D, Texture2D_mut, D3D11_TEX2D_UAV); -UNION!(D3D11_UNORDERED_ACCESS_VIEW_DESC, u, Texture2DArray, Texture2DArray_mut, - D3D11_TEX2D_ARRAY_UAV); -UNION!(D3D11_UNORDERED_ACCESS_VIEW_DESC, u, Texture3D, Texture3D_mut, D3D11_TEX3D_UAV); -RIDL!( -interface ID3D11UnorderedAccessView(ID3D11UnorderedAccessViewVtbl): ID3D11View(ID3D11ViewVtbl) { - fn GetDesc(&mut self, pDesc: *mut D3D11_UNORDERED_ACCESS_VIEW_DESC) -> () -} -); -RIDL!( -interface ID3D11VertexShader(ID3D11VertexShaderVtbl): ID3D11DeviceChild(ID3D11DeviceChildVtbl) { -} -); -RIDL!( -interface ID3D11HullShader(ID3D11HullShaderVtbl): ID3D11DeviceChild(ID3D11DeviceChildVtbl) { -} -); -RIDL!( -interface ID3D11DomainShader(ID3D11DomainShaderVtbl): ID3D11DeviceChild(ID3D11DeviceChildVtbl) { -} -); -RIDL!( -interface ID3D11GeometryShader(ID3D11GeometryShaderVtbl) - : ID3D11DeviceChild(ID3D11DeviceChildVtbl) { -} -); -RIDL!( -interface ID3D11PixelShader(ID3D11PixelShaderVtbl): ID3D11DeviceChild(ID3D11DeviceChildVtbl) { -} -); -RIDL!( -interface ID3D11ComputeShader(ID3D11ComputeShaderVtbl): ID3D11DeviceChild(ID3D11DeviceChildVtbl) { -} -); -RIDL!( -interface ID3D11InputLayout(ID3D11InputLayoutVtbl): ID3D11DeviceChild(ID3D11DeviceChildVtbl) { -} -); -ENUM!{enum D3D11_FILTER { - D3D11_FILTER_MIN_MAG_MIP_POINT = 0, - D3D11_FILTER_MIN_MAG_POINT_MIP_LINEAR = 0x1, - D3D11_FILTER_MIN_POINT_MAG_LINEAR_MIP_POINT = 0x4, - D3D11_FILTER_MIN_POINT_MAG_MIP_LINEAR = 0x5, - D3D11_FILTER_MIN_LINEAR_MAG_MIP_POINT = 0x10, - D3D11_FILTER_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 0x11, - D3D11_FILTER_MIN_MAG_LINEAR_MIP_POINT = 0x14, - D3D11_FILTER_MIN_MAG_MIP_LINEAR = 0x15, - D3D11_FILTER_ANISOTROPIC = 0x55, - D3D11_FILTER_COMPARISON_MIN_MAG_MIP_POINT = 0x80, - D3D11_FILTER_COMPARISON_MIN_MAG_POINT_MIP_LINEAR = 0x81, - D3D11_FILTER_COMPARISON_MIN_POINT_MAG_LINEAR_MIP_POINT = 0x84, - D3D11_FILTER_COMPARISON_MIN_POINT_MAG_MIP_LINEAR = 0x85, - D3D11_FILTER_COMPARISON_MIN_LINEAR_MAG_MIP_POINT = 0x90, - D3D11_FILTER_COMPARISON_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 0x91, - D3D11_FILTER_COMPARISON_MIN_MAG_LINEAR_MIP_POINT = 0x94, - D3D11_FILTER_COMPARISON_MIN_MAG_MIP_LINEAR = 0x95, - D3D11_FILTER_COMPARISON_ANISOTROPIC = 0xd5, - D3D11_FILTER_MINIMUM_MIN_MAG_MIP_POINT = 0x100, - D3D11_FILTER_MINIMUM_MIN_MAG_POINT_MIP_LINEAR = 0x101, - D3D11_FILTER_MINIMUM_MIN_POINT_MAG_LINEAR_MIP_POINT = 0x104, - D3D11_FILTER_MINIMUM_MIN_POINT_MAG_MIP_LINEAR = 0x105, - D3D11_FILTER_MINIMUM_MIN_LINEAR_MAG_MIP_POINT = 0x110, - D3D11_FILTER_MINIMUM_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 0x111, - D3D11_FILTER_MINIMUM_MIN_MAG_LINEAR_MIP_POINT = 0x114, - D3D11_FILTER_MINIMUM_MIN_MAG_MIP_LINEAR = 0x115, - D3D11_FILTER_MINIMUM_ANISOTROPIC = 0x155, - D3D11_FILTER_MAXIMUM_MIN_MAG_MIP_POINT = 0x180, - D3D11_FILTER_MAXIMUM_MIN_MAG_POINT_MIP_LINEAR = 0x181, - D3D11_FILTER_MAXIMUM_MIN_POINT_MAG_LINEAR_MIP_POINT = 0x184, - D3D11_FILTER_MAXIMUM_MIN_POINT_MAG_MIP_LINEAR = 0x185, - D3D11_FILTER_MAXIMUM_MIN_LINEAR_MAG_MIP_POINT = 0x190, - D3D11_FILTER_MAXIMUM_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 0x191, - D3D11_FILTER_MAXIMUM_MIN_MAG_LINEAR_MIP_POINT = 0x194, - D3D11_FILTER_MAXIMUM_MIN_MAG_MIP_LINEAR = 0x195, - D3D11_FILTER_MAXIMUM_ANISOTROPIC = 0x1d5, -}} -ENUM!{enum D3D11_FILTER_TYPE { - D3D11_FILTER_TYPE_POINT = 0, - D3D11_FILTER_TYPE_LINEAR = 1, -}} -ENUM!{enum D3D11_FILTER_REDUCTION_TYPE { - D3D11_FILTER_REDUCTION_TYPE_STANDARD = 0, - D3D11_FILTER_REDUCTION_TYPE_COMPARISON = 1, - D3D11_FILTER_REDUCTION_TYPE_MINIMUM = 2, - D3D11_FILTER_REDUCTION_TYPE_MAXIMUM = 3, -}} -pub const D3D11_FILTER_REDUCTION_TYPE_MASK: ::DWORD = 0x3; -pub const D3D11_FILTER_REDUCTION_TYPE_SHIFT: ::DWORD = 7; -pub const D3D11_FILTER_TYPE_MASK: ::DWORD = 0x3; -pub const D3D11_MIN_FILTER_SHIFT: ::DWORD = 4; -pub const D3D11_MAG_FILTER_SHIFT: ::DWORD = 2; -pub const D3D11_MIP_FILTER_SHIFT: ::DWORD = 0; -pub const D3D11_COMPARISON_FILTERING_BIT: ::DWORD = 0x80; -pub const D3D11_ANISOTROPIC_FILTERING_BIT: ::DWORD = 0x40; -ENUM!{enum D3D11_TEXTURE_ADDRESS_MODE { - D3D11_TEXTURE_ADDRESS_WRAP = 1, - D3D11_TEXTURE_ADDRESS_MIRROR = 2, - D3D11_TEXTURE_ADDRESS_CLAMP = 3, - D3D11_TEXTURE_ADDRESS_BORDER = 4, - D3D11_TEXTURE_ADDRESS_MIRROR_ONCE = 5, -}} -STRUCT!{struct D3D11_SAMPLER_DESC { - Filter: D3D11_FILTER, - AddressU: D3D11_FILTER, - AddressV: D3D11_FILTER, - AddressW: D3D11_FILTER, - MipLODBias: ::FLOAT, - MaxAnisotropy: ::UINT, - ComparisonFunc: D3D11_COMPARISON_FUNC, - BorderColor: [::FLOAT; 4], - MinLOD: ::FLOAT, - MaxLOD: ::FLOAT, -}} -RIDL!( -interface ID3D11SamplerState(ID3D11SamplerStateVtbl): ID3D11DeviceChild(ID3D11DeviceChildVtbl) { - fn GetDesc(&mut self, pDesc: *mut D3D11_SAMPLER_DESC) -> () -} -); -FLAGS!{enum D3D11_FORMAT_SUPPORT { - D3D11_FORMAT_SUPPORT_BUFFER = 0x1, - D3D11_FORMAT_SUPPORT_IA_VERTEX_BUFFER = 0x2, - D3D11_FORMAT_SUPPORT_IA_INDEX_BUFFER = 0x4, - D3D11_FORMAT_SUPPORT_SO_BUFFER = 0x8, - D3D11_FORMAT_SUPPORT_TEXTURE1D = 0x10, - D3D11_FORMAT_SUPPORT_TEXTURE2D = 0x20, - D3D11_FORMAT_SUPPORT_TEXTURE3D = 0x40, - D3D11_FORMAT_SUPPORT_TEXTURECUBE = 0x80, - D3D11_FORMAT_SUPPORT_SHADER_LOAD = 0x100, - D3D11_FORMAT_SUPPORT_SHADER_SAMPLE = 0x200, - D3D11_FORMAT_SUPPORT_SHADER_SAMPLE_COMPARISON = 0x400, - D3D11_FORMAT_SUPPORT_SHADER_SAMPLE_MONO_TEXT = 0x800, - D3D11_FORMAT_SUPPORT_MIP = 0x1000, - D3D11_FORMAT_SUPPORT_MIP_AUTOGEN = 0x2000, - D3D11_FORMAT_SUPPORT_RENDER_TARGET = 0x4000, - D3D11_FORMAT_SUPPORT_BLENDABLE = 0x8000, - D3D11_FORMAT_SUPPORT_DEPTH_STENCIL = 0x10000, - D3D11_FORMAT_SUPPORT_CPU_LOCKABLE = 0x20000, - D3D11_FORMAT_SUPPORT_MULTISAMPLE_RESOLVE = 0x40000, - D3D11_FORMAT_SUPPORT_DISPLAY = 0x80000, - D3D11_FORMAT_SUPPORT_CAST_WITHIN_BIT_LAYOUT = 0x100000, - D3D11_FORMAT_SUPPORT_MULTISAMPLE_RENDERTARGET = 0x200000, - D3D11_FORMAT_SUPPORT_MULTISAMPLE_LOAD = 0x400000, - D3D11_FORMAT_SUPPORT_SHADER_GATHER = 0x800000, - D3D11_FORMAT_SUPPORT_BACK_BUFFER_CAST = 0x1000000, - D3D11_FORMAT_SUPPORT_TYPED_UNORDERED_ACCESS_VIEW = 0x2000000, - D3D11_FORMAT_SUPPORT_SHADER_GATHER_COMPARISON = 0x4000000, - D3D11_FORMAT_SUPPORT_DECODER_OUTPUT = 0x8000000, - D3D11_FORMAT_SUPPORT_VIDEO_PROCESSOR_OUTPUT = 0x10000000, - D3D11_FORMAT_SUPPORT_VIDEO_PROCESSOR_INPUT = 0x20000000, - D3D11_FORMAT_SUPPORT_VIDEO_ENCODER = 0x40000000, -}} -FLAGS!{enum D3D11_FORMAT_SUPPORT2 { - D3D11_FORMAT_SUPPORT2_UAV_ATOMIC_ADD = 0x1, - D3D11_FORMAT_SUPPORT2_UAV_ATOMIC_BITWISE_OPS = 0x2, - D3D11_FORMAT_SUPPORT2_UAV_ATOMIC_COMPARE_STORE_OR_COMPARE_EXCHANGE = 0x4, - D3D11_FORMAT_SUPPORT2_UAV_ATOMIC_EXCHANGE = 0x8, - D3D11_FORMAT_SUPPORT2_UAV_ATOMIC_SIGNED_MIN_OR_MAX = 0x10, - D3D11_FORMAT_SUPPORT2_UAV_ATOMIC_UNSIGNED_MIN_OR_MAX = 0x20, - D3D11_FORMAT_SUPPORT2_UAV_TYPED_LOAD = 0x40, - D3D11_FORMAT_SUPPORT2_UAV_TYPED_STORE = 0x80, - D3D11_FORMAT_SUPPORT2_OUTPUT_MERGER_LOGIC_OP = 0x100, - D3D11_FORMAT_SUPPORT2_TILED = 0x200, - D3D11_FORMAT_SUPPORT2_SHAREABLE = 0x400, - D3D11_FORMAT_SUPPORT2_MULTIPLANE_OVERLAY = 0x4000, -}} -RIDL!( -interface ID3D11Asynchronous(ID3D11AsynchronousVtbl): ID3D11DeviceChild(ID3D11DeviceChildVtbl) { - fn GetDataSize(&mut self) -> ::UINT -} -); -FLAGS!{enum D3D11_ASYNC_GETDATA_FLAG { - D3D11_ASYNC_GETDATA_DONOTFLUSH = 0x1, -}} -ENUM!{enum D3D11_QUERY { - D3D11_QUERY_EVENT = 0, - D3D11_QUERY_OCCLUSION = D3D11_QUERY_EVENT.0 + 1, - D3D11_QUERY_TIMESTAMP = D3D11_QUERY_OCCLUSION.0 + 1, - D3D11_QUERY_TIMESTAMP_DISJOINT = D3D11_QUERY_TIMESTAMP.0 + 1, - D3D11_QUERY_PIPELINE_STATISTICS = D3D11_QUERY_TIMESTAMP_DISJOINT.0 + 1, - D3D11_QUERY_OCCLUSION_PREDICATE = D3D11_QUERY_PIPELINE_STATISTICS.0 + 1, - D3D11_QUERY_SO_STATISTICS = D3D11_QUERY_OCCLUSION_PREDICATE.0 + 1, - D3D11_QUERY_SO_OVERFLOW_PREDICATE = D3D11_QUERY_SO_STATISTICS.0 + 1, - D3D11_QUERY_SO_STATISTICS_STREAM0 = D3D11_QUERY_SO_OVERFLOW_PREDICATE.0 + 1, - D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM0 = D3D11_QUERY_SO_STATISTICS_STREAM0.0 + 1, - D3D11_QUERY_SO_STATISTICS_STREAM1 = D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM0.0 + 1, - D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM1 = D3D11_QUERY_SO_STATISTICS_STREAM1.0 + 1, - D3D11_QUERY_SO_STATISTICS_STREAM2 = D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM1.0 + 1, - D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM2 = D3D11_QUERY_SO_STATISTICS_STREAM2.0 + 1, - D3D11_QUERY_SO_STATISTICS_STREAM3 = D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM2.0 + 1, - D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM3 = D3D11_QUERY_SO_STATISTICS_STREAM3.0 + 1, -}} -FLAGS!{enum D3D11_QUERY_MISC_FLAG { - D3D11_QUERY_MISC_PREDICATEHINT = 0x1, -}} -STRUCT!{struct D3D11_QUERY_DESC { - Query: D3D11_QUERY, - MiscFlags: ::UINT, -}} -RIDL!( -interface ID3D11Query(ID3D11QueryVtbl): ID3D11Asynchronous(ID3D11AsynchronousVtbl) { - fn GetDesc(&mut self, pDesc: *mut D3D11_QUERY_DESC) -> () -} -); -RIDL!( -interface ID3D11Predicate(ID3D11PredicateVtbl): ID3D11Query(ID3D11QueryVtbl) { -} -); -STRUCT!{struct D3D11_QUERY_DATA_TIMESTAMP_DISJOINT { - Frequency: ::UINT64, - Disjoint: ::BOOL, -}} -STRUCT!{struct D3D11_QUERY_DATA_PIPELINE_STATISTICS { - IAVertices: ::UINT64, - IAPrimitives: ::UINT64, - VSInvocations: ::UINT64, - GSInvocations: ::UINT64, - GSPrimitives: ::UINT64, - CInvocations: ::UINT64, - CPrimitives: ::UINT64, - PSInvocations: ::UINT64, - HSInvocations: ::UINT64, - DSInvocations: ::UINT64, - CSInvocations: ::UINT64, -}} -STRUCT!{struct D3D11_QUERY_DATA_SO_STATISTICS { - NumPrimitivesWritten: ::UINT64, - PrimitivesStorageNeeded: ::UINT64, -}} -FLAGS!{enum D3D11_COUNTER { - D3D11_COUNTER_DEVICE_DEPENDENT_0 = 0x40000000, -}} -ENUM!{enum D3D11_COUNTER_TYPE { - D3D11_COUNTER_TYPE_FLOAT32 = 0, - D3D11_COUNTER_TYPE_UINT16 = D3D11_COUNTER_TYPE_FLOAT32.0 + 1, - D3D11_COUNTER_TYPE_UINT32 = D3D11_COUNTER_TYPE_UINT16.0 + 1, - D3D11_COUNTER_TYPE_UINT64 = D3D11_COUNTER_TYPE_UINT32.0 + 1, -}} -STRUCT!{struct D3D11_COUNTER_DESC { - Counter: D3D11_COUNTER, - MiscFlags: ::UINT, -}} -STRUCT!{struct D3D11_COUNTER_INFO { - LastDeviceDependentCounter: D3D11_COUNTER, - NumSimultaneousCounters: ::UINT, - NumDetectableParallelUnits: ::UINT8, -}} -RIDL!( -interface ID3D11Counter(ID3D11CounterVtbl): ID3D11Asynchronous(ID3D11AsynchronousVtbl) { - fn GetDesc(&mut self, pDesc: *mut D3D11_COUNTER_DESC) -> () -} -); -ENUM!{enum D3D11_STANDARD_MULTISAMPLE_QUALITY_LEVELS { - D3D11_STANDARD_MULTISAMPLE_PATTERN = 0xffffffff, - D3D11_CENTER_MULTISAMPLE_PATTERN = 0xfffffffe, -}} -ENUM!{enum D3D11_DEVICE_CONTEXT_TYPE { - D3D11_DEVICE_CONTEXT_IMMEDIATE = 0, - D3D11_DEVICE_CONTEXT_DEFERRED = D3D11_DEVICE_CONTEXT_IMMEDIATE.0 + 1, -}} -STRUCT!{struct D3D11_CLASS_INSTANCE_DESC { - InstanceId: ::UINT, - InstanceIndex: ::UINT, - TypeId: ::UINT, - ConstantBuffer: ::UINT, - BaseConstantBufferOffset: ::UINT, - BaseTexture: ::UINT, - BaseSampler: ::UINT, - Created: ::BOOL, -}} -RIDL!( -interface ID3D11ClassInstance(ID3D11ClassInstanceVtbl): ID3D11DeviceChild(ID3D11DeviceChildVtbl) { - fn GetClassLinkage(&mut self, ppLinkage: *mut *mut ID3D11ClassLinkage) -> (), - fn GetDesc(&mut self, pDesc: *mut D3D11_CLASS_INSTANCE_DESC) -> (), - fn GetInstanceName(&mut self, pInstanceName: ::LPSTR, pBufferLength: *mut ::SIZE_T) -> (), - fn GetTypeName(&mut self, pTypeName: ::LPSTR, pBufferLength: *mut ::SIZE_T) -> () -} -); -RIDL!( -interface ID3D11ClassLinkage(ID3D11ClassLinkageVtbl): ID3D11DeviceChild(ID3D11DeviceChildVtbl) { - fn GetClassInstance( - &mut self, GetClassInstance: ::LPCSTR, InstanceIndex: ::UINT, - ppInstance: *mut *mut ID3D11ClassInstance - ) -> ::HRESULT, - fn CreateClassInstance( - &mut self, pClassTypeName: ::LPCSTR, ConstantBufferOffset: ::UINT, - ConstantVectorOffset: ::UINT, TextureOffset: ::UINT, SamplerOffset: ::UINT, - ppInstance: *mut *mut ID3D11ClassInstance - ) -> ::HRESULT -} -); -RIDL!( -interface ID3D11CommandList(ID3D11CommandListVtbl): ID3D11DeviceChild(ID3D11DeviceChildVtbl) { - fn GetContextFlags(&mut self) -> ::UINT -} -); -ENUM!{enum D3D11_FEATURE { - D3D11_FEATURE_THREADING = 0, - D3D11_FEATURE_DOUBLES = D3D11_FEATURE_THREADING.0 + 1, - D3D11_FEATURE_FORMAT_SUPPORT = D3D11_FEATURE_DOUBLES.0 + 1, - D3D11_FEATURE_FORMAT_SUPPORT2 = D3D11_FEATURE_FORMAT_SUPPORT.0 + 1, - D3D11_FEATURE_D3D10_X_HARDWARE_OPTIONS = D3D11_FEATURE_FORMAT_SUPPORT2.0 + 1, - D3D11_FEATURE_D3D11_OPTIONS = D3D11_FEATURE_D3D10_X_HARDWARE_OPTIONS.0 + 1, - D3D11_FEATURE_ARCHITECTURE_INFO = D3D11_FEATURE_D3D11_OPTIONS.0 + 1, - D3D11_FEATURE_D3D9_OPTIONS = D3D11_FEATURE_ARCHITECTURE_INFO.0 + 1, - D3D11_FEATURE_SHADER_MIN_PRECISION_SUPPORT = D3D11_FEATURE_D3D9_OPTIONS.0 + 1, - D3D11_FEATURE_D3D9_SHADOW_SUPPORT = D3D11_FEATURE_SHADER_MIN_PRECISION_SUPPORT.0 + 1, - D3D11_FEATURE_D3D11_OPTIONS1 = D3D11_FEATURE_D3D9_SHADOW_SUPPORT.0 + 1, - D3D11_FEATURE_D3D9_SIMPLE_INSTANCING_SUPPORT = D3D11_FEATURE_D3D11_OPTIONS1.0 + 1, - D3D11_FEATURE_MARKER_SUPPORT = D3D11_FEATURE_D3D9_SIMPLE_INSTANCING_SUPPORT.0 + 1, - D3D11_FEATURE_D3D9_OPTIONS1 = D3D11_FEATURE_MARKER_SUPPORT.0 + 1, - D3D11_FEATURE_D3D11_OPTIONS2 = D3D11_FEATURE_D3D9_OPTIONS1.0 + 1, - D3D11_FEATURE_D3D11_OPTIONS3 = D3D11_FEATURE_D3D11_OPTIONS2.0 + 1, - D3D11_FEATURE_GPU_VIRTUAL_ADDRESS_SUPPORT = D3D11_FEATURE_D3D11_OPTIONS3.0 + 1, -}} -STRUCT!{struct D3D11_FEATURE_DATA_THREADING { - DriverConcurrentCreates: ::BOOL, - DriverCommandLists: ::BOOL, -}} -STRUCT!{struct D3D11_FEATURE_DATA_DOUBLES { - DoublePrecisionFloatShaderOps: ::BOOL, -}} -STRUCT!{struct D3D11_FEATURE_DATA_FORMAT_SUPPORT { - InFormat: ::DXGI_FORMAT, - OutFormatSupport: ::UINT, -}} -STRUCT!{struct D3D11_FEATURE_DATA_FORMAT_SUPPORT2 { - InFormat: ::DXGI_FORMAT, - OutFormatSupport2: ::UINT, -}} -STRUCT!{struct D3D11_FEATURE_DATA_D3D10_X_HARDWARE_OPTIONS { - ComputeShaders_Plus_RawAndStructuredBuffers_Via_Shader_4_x: ::BOOL, -}} -STRUCT!{struct D3D11_FEATURE_DATA_D3D11_OPTIONS { - OutputMergerLogicOp: ::BOOL, - UAVOnlyRenderingForcedSampleCount: ::BOOL, - DiscardAPIsSeenByDriver: ::BOOL, - FlagsForUpdateAndCopySeenByDriver: ::BOOL, - ClearView: ::BOOL, - CopyWithOverlap: ::BOOL, - ConstantBufferPartialUpdate: ::BOOL, - ConstantBufferOffsetting: ::BOOL, - MapNoOverwriteOnDynamicConstantBuffer: ::BOOL, - MapNoOverwriteOnDynamicBufferSRV: ::BOOL, - MultisampleRTVWithForcedSampleCountOne: ::BOOL, - SAD4ShaderInstructions: ::BOOL, - ExtendedDoublesShaderInstructions: ::BOOL, - ExtendedResourceSharing: ::BOOL, -}} -STRUCT!{struct D3D11_FEATURE_DATA_ARCHITECTURE_INFO { - TileBasedDeferredRenderer: ::BOOL, -}} -STRUCT!{struct D3D11_FEATURE_DATA_D3D9_OPTIONS { - FullNonPow2TextureSupport: ::BOOL, -}} -STRUCT!{struct D3D11_FEATURE_DATA_D3D9_SHADOW_SUPPORT { - SupportsDepthAsTextureWithLessEqualComparisonFilter: ::BOOL, -}} -FLAGS!{enum D3D11_SHADER_MIN_PRECISION_SUPPORT { - D3D11_SHADER_MIN_PRECISION_10_BIT = 0x1, - D3D11_SHADER_MIN_PRECISION_16_BIT = 0x2, -}} -STRUCT!{struct D3D11_FEATURE_DATA_SHADER_MIN_PRECISION_SUPPORT { - PixelShaderMinPrecision: ::UINT, - AllOtherShaderStagesMinPrecision: ::UINT, -}} -ENUM!{enum D3D11_TILED_RESOURCES_TIER { - D3D11_TILED_RESOURCES_NOT_SUPPORTED = 0, - D3D11_TILED_RESOURCES_TIER_1 = 1, - D3D11_TILED_RESOURCES_TIER_2 = 2, - D3D11_TILED_RESOURCES_TIER_3 = 3, -}} -STRUCT!{struct D3D11_FEATURE_DATA_D3D11_OPTIONS1 { - TiledResourcesTier: D3D11_TILED_RESOURCES_TIER, - MinMaxFiltering: ::BOOL, - ClearViewAlsoSupportsDepthOnlyFormats: ::BOOL, - MapOnDefaultBuffers: ::BOOL, -}} -STRUCT!{struct D3D11_FEATURE_DATA_D3D9_SIMPLE_INSTANCING_SUPPORT { - SimpleInstancingSupported: ::BOOL, -}} -STRUCT!{struct D3D11_FEATURE_DATA_MARKER_SUPPORT { - Profile: ::BOOL, -}} -STRUCT!{struct D3D11_FEATURE_DATA_D3D9_OPTIONS1 { - FullNonPow2TextureSupported: ::BOOL, - DepthAsTextureWithLessEqualComparisonFilterSupported: ::BOOL, - SimpleInstancingSupported: ::BOOL, - TextureCubeFaceRenderTargetWithNonCubeDepthStencilSupported: ::BOOL, -}} -ENUM!{enum D3D11_CONSERVATIVE_RASTERIZATION_TIER { - D3D11_CONSERVATIVE_RASTERIZATION_NOT_SUPPORTED = 0, - D3D11_CONSERVATIVE_RASTERIZATION_TIER_1 = 1, - D3D11_CONSERVATIVE_RASTERIZATION_TIER_2 = 2, - D3D11_CONSERVATIVE_RASTERIZATION_TIER_3 = 3, -}} -STRUCT!{struct D3D11_FEATURE_DATA_D3D11_OPTIONS2 { - PSSpecifiedStencilRefSupported: ::BOOL, - TypedUAVLoadAdditionalFormats: ::BOOL, - ROVsSupported: ::BOOL, - ConservativeRasterizationTier: D3D11_CONSERVATIVE_RASTERIZATION_TIER, - TiledResourcesTier: D3D11_TILED_RESOURCES_TIER, - MapOnDefaultTextures: ::BOOL, - StandardSwizzle: ::BOOL, - UnifiedMemoryArchitecture: ::BOOL, -}} -STRUCT!{struct D3D11_FEATURE_DATA_D3D11_OPTIONS3 { - VPAndRTArrayIndexFromAnyShaderFeedingRasterizer: ::BOOL, -}} -STRUCT!{struct D3D11_FEATURE_DATA_GPU_VIRTUAL_ADDRESS_SUPPORT { - MaxGPUVirtualAddressBitsPerResource: ::UINT, - MaxGPUVirtualAddressBitsPerProcess: ::UINT, -}} -RIDL!( -interface ID3D11DeviceContext(ID3D11DeviceContextVtbl): ID3D11DeviceChild(ID3D11DeviceChildVtbl) { - fn VSSetConstantBuffers( - &mut self, StartSlot: ::UINT, NumBuffers: ::UINT, - ppConstantBuffers: *const *mut ID3D11Buffer - ) -> (), - fn PSSetShaderResources( - &mut self, StartSlot: ::UINT, NumViews: ::UINT, - ppShaderResourceViews: *const *mut ID3D11ShaderResourceView - ) -> (), - fn PSSetShader( - &mut self, pPixelShader: *mut ID3D11PixelShader, - ppClassInstances: *const *mut ID3D11ClassInstance, NumClassInstances: ::UINT - ) -> (), - fn PSSetSamplers( - &mut self, StartSlot: ::UINT, NumSamplers: ::UINT, - ppSamplers: *const *mut ID3D11SamplerState - ) -> (), - fn VSSetShader( - &mut self, pVertexShader: *mut ID3D11VertexShader, - ppClassInstances: *const *mut ID3D11ClassInstance, NumClassInstances: ::UINT - ) -> (), - fn DrawIndexed( - &mut self, IndexCount: ::UINT, StartIndexLocation: ::UINT, - BaseVertexLocation: ::INT - ) -> (), - fn Draw(&mut self, VertexCount: ::UINT, StartVertexLocation: ::UINT) -> (), - fn Map( - &mut self, pResource: *mut ID3D11Resource, Subresource: ::UINT, MapType: D3D11_MAP, - MapFlags: ::UINT, pMappedResource: *mut D3D11_MAPPED_SUBRESOURCE - ) -> ::HRESULT, - fn Unmap(&mut self, pResource: *mut ID3D11Resource, Subresource: ::UINT) -> (), - fn PSSetConstantBuffers( - &mut self, StartSlot: ::UINT, NumBuffers: ::UINT, - ppConstantBuffers: *const *mut ID3D11Buffer - ) -> (), - fn IASetInputLayout(&mut self, pInputLayout: *mut ID3D11InputLayout) -> (), - fn IASetVertexBuffers( - &mut self, StartSlot: ::UINT, NumBuffers: ::UINT, - ppVertexBuffers: *const *mut ID3D11Buffer, pStrides: *const ::UINT, - pOffsets: *const ::UINT - ) -> (), - fn IASetIndexBuffer( - &mut self, pIndexBuffer: *mut ID3D11Buffer, Format: ::DXGI_FORMAT, - Offset: ::UINT - ) -> (), - fn DrawIndexedInstanced( - &mut self, IndexCountPerInstance: ::UINT, InstanceCount: ::UINT, - StartIndexLocation: ::UINT, BaseVertexLocation: ::INT, StartInstanceLocation: ::UINT - ) -> (), - fn DrawInstanced( - &mut self, VertexCountPerInstance: ::UINT, InstanceCount: ::UINT, - StartVertexLocation: ::UINT, StartInstanceLocation: ::UINT - ) -> (), - fn GSSetConstantBuffers( - &mut self, StartSlot: ::UINT, NumBuffers: ::UINT, - ppConstantBuffers: *const *mut ID3D11Buffer - ) -> (), - fn GSSetShader( - &mut self, pShader: *mut ID3D11GeometryShader, - ppClassInstances: *const *mut ID3D11ClassInstance, NumClassInstances: ::UINT - ) -> (), - fn IASetPrimitiveTopology(&mut self, Topology: D3D11_PRIMITIVE_TOPOLOGY) -> (), - fn VSSetShaderResources( - &mut self, StartSlot: ::UINT, NumViews: ::UINT, - ppShaderResourceViews: *const *mut ID3D11ShaderResourceView - ) -> (), - fn VSSetSamplers( - &mut self, StartSlot: ::UINT, NumSamplers: ::UINT, - ppSamplers: *const *mut ID3D11SamplerState - ) -> (), - fn Begin(&mut self, pAsync: *mut ID3D11Asynchronous) -> (), - fn End(&mut self, pAsync: *mut ID3D11Asynchronous) -> (), - fn GetData( - &mut self, pAsync: *mut ID3D11Asynchronous, pData: *mut ::c_void, - DataSize: ::UINT, GetDataFlags: ::UINT - ) -> ::HRESULT, - fn SetPredication( - &mut self, pPredicate: *mut ID3D11Predicate, - PredicateValue: ::BOOL - ) -> (), - fn GSSetShaderResources( - &mut self, StartSlot: ::UINT, NumViews: ::UINT, - ppShaderResourceViews: *const *mut ID3D11ShaderResourceView - ) -> (), - fn GSSetSamplers( - &mut self, StartSlot: ::UINT, NumSamplers: ::UINT, - ppSamplers: *const *mut ID3D11SamplerState - ) -> (), - fn OMSetRenderTargets( - &mut self, NumViews: ::UINT, - ppRenderTargetViews: *const *mut ID3D11RenderTargetView, - pDepthStencilView: *mut ID3D11DepthStencilView - ) -> (), - fn OMSetRenderTargetsAndUnorderedAccessViews( - &mut self, NumRTVs: ::UINT, - ppRenderTargetViews: *const *mut ID3D11RenderTargetView, - pDepthStencilView: *mut ID3D11DepthStencilView, UAVStartSlot: ::UINT, NumUAVs: ::UINT, - ppUnorderedAccessViews: *const *mut ID3D11UnorderedAccessView, - pUAVInitialCounts: *const ::UINT - ) -> (), - fn OMSetBlendState( - &mut self, pBlendState: *mut ID3D11BlendState, BlendFactor: &[::FLOAT; 4], - SampleMask: ::UINT - ) -> (), - fn OMSetDepthStencilState( - &mut self, pDepthStencilState: *mut ID3D11DepthStencilState, - StencilRef: ::UINT - ) -> (), - fn SOSetTargets( - &mut self, NumBuffers: ::UINT, ppSOTargets: *const *mut ID3D11Buffer, - pOffsets: *const ::UINT - ) -> (), - fn DrawAuto(&mut self) -> (), - fn DrawIndexedInstancedIndirect( - &mut self, pBufferForArgs: *mut ID3D11Buffer, - AlignedByteOffsetForArgs: ::UINT - ) -> (), - fn DrawInstancedIndirect( - &mut self, pBufferForArgs: *mut ID3D11Buffer, - AlignedByteOffsetForArgs: ::UINT - ) -> (), - fn Dispatch( - &mut self, ThreadGroupCountX: ::UINT, ThreadGroupCountY: ::UINT, - ThreadGroupCountZ: ::UINT - ) -> (), - fn DispatchIndirect( - &mut self, pBufferForArgs: *mut ID3D11Buffer, - AlignedByteOffsetForArgs: ::UINT - ) -> (), - fn RSSetState(&mut self, pRasterizerState: *mut ID3D11RasterizerState) -> (), - fn RSSetViewports(&mut self, NumViewports: ::UINT, pViewports: *const D3D11_VIEWPORT) -> (), - fn RSSetScissorRects(&mut self, NumRects: ::UINT, pRects: *const D3D11_RECT) -> (), - fn CopySubresourceRegion( - &mut self, pDstResource: *mut ID3D11Resource, DstSubresource: ::UINT, - DstX: ::UINT, DstY: ::UINT, DstZ: ::UINT, pSrcResource: *mut ID3D11Resource, - SrcSubresource: ::UINT, pSrcBox: *const D3D11_BOX - ) -> (), - fn CopyResource( - &mut self, pDstResource: *mut ID3D11Resource, - pSrcResource: *mut ID3D11Resource - ) -> (), - fn UpdateSubresource( - &mut self, pDstResource: *mut ID3D11Resource, DstSubresource: ::UINT, - pDstBox: *const D3D11_BOX, pSrcData: *const ::c_void, SrcRowPitch: ::UINT, - SrcDepthPitch: ::UINT - ) -> (), - fn CopyStructureCount( - &mut self, pDstBuffer: *mut ID3D11Buffer, DstAlignedByteOffset: ::UINT, - pSrcView: *mut ID3D11UnorderedAccessView - ) -> (), - fn ClearRenderTargetView( - &mut self, pRenderTargetView: *mut ID3D11RenderTargetView, - ColorRGBA: &[::FLOAT; 4] - ) -> (), - fn ClearUnorderedAccessViewUint( - &mut self, - pUnorderedAccessView: *mut ID3D11UnorderedAccessView, Values: &[::UINT; 4] - ) -> (), - fn ClearUnorderedAccessViewFloat( - &mut self, - pUnorderedAccessView: *mut ID3D11UnorderedAccessView, Values: &[::FLOAT; 4] - ) -> (), - fn ClearDepthStencilView( - &mut self, pDepthStencilView: *mut ID3D11DepthStencilView, - ClearFlags: ::UINT, Depth: ::FLOAT, Stencil: ::UINT8 - ) -> (), - fn GenerateMips(&mut self, pShaderResourceView: *mut ID3D11ShaderResourceView) -> (), - fn SetResourceMinLOD(&mut self, pResource: *mut ID3D11Resource, MinLOD: ::FLOAT) -> (), - fn GetResourceMinLOD(&mut self, pResource: *mut ID3D11Resource) -> ::FLOAT, - fn ResolveSubresource( - &mut self, pDstResource: *mut ID3D11Resource, DstSubresource: ::UINT, - pSrcResource: *mut ID3D11Resource, SrcSubresource: ::UINT, Format: ::DXGI_FORMAT - ) -> (), - fn ExecuteCommandList(&mut self, pCommandList: *mut ID3D11CommandList) -> (), - fn HSSetShaderResources( - &mut self, StartSlot: ::UINT, NumViews: ::UINT, - ppShaderResourceViews: *const *mut ID3D11ShaderResourceView - ) -> (), - fn HSSetShader( - &mut self, pHullShader: *mut ID3D11HullShader, - ppClassInstances: *const *mut ID3D11ClassInstance, NumClassInstances: ::UINT - ) -> (), - fn HSSetSamplers( - &mut self, StartSlot: ::UINT, NumSamplers: ::UINT, - ppSamplers: *const *mut ID3D11SamplerState - ) -> (), - fn HSSetConstantBuffers( - &mut self, StartSlot: ::UINT, NumBuffers: ::UINT, - ppConstantBuffers: *const *mut ID3D11Buffer - ) -> (), - fn DSSetShaderResources( - &mut self, StartSlot: ::UINT, NumViews: ::UINT, - ppShaderResourceViews: *const *mut ID3D11ShaderResourceView - ) -> (), - fn DSSetShader( - &mut self, pDomainShader: *mut ID3D11DomainShader, - ppClassInstances: *const *mut ID3D11ClassInstance, NumClassInstances: ::UINT - ) -> (), - fn DSSetSamplers( - &mut self, StartSlot: ::UINT, NumSamplers: ::UINT, - ppSamplers: *const *mut ID3D11SamplerState - ) -> (), - fn DSSetConstantBuffers( - &mut self, StartSlot: ::UINT, NumBuffers: ::UINT, - ppConstantBuffers: *const *mut ID3D11Buffer - ) -> (), - fn CSSetShaderResources( - &mut self, StartSlot: ::UINT, NumViews: ::UINT, - ppShaderResourceViews: *const *mut ID3D11ShaderResourceView - ) -> (), - fn CSSetUnorderedAccessViews( - &mut self, StartSlot: ::UINT, NumUAVs: ::UINT, - ppUnorderedAccessViews: *const *mut ID3D11UnorderedAccessView - ) -> (), - fn CSSetShader( - &mut self, pComputeShader: *mut ID3D11ComputeShader, - ppClassInstances: *const *mut ID3D11ClassInstance, NumClassInstances: ::UINT - ) -> (), - fn CSSetSamplers( - &mut self, StartSlot: ::UINT, NumSamplers: ::UINT, - ppSamplers: *const *mut ID3D11SamplerState - ) -> (), - fn CSSetConstantBuffers( - &mut self, StartSlot: ::UINT, NumBuffers: ::UINT, - ppConstantBuffers: *const *mut ID3D11Buffer - ) -> (), - fn VSGetConstantBuffers( - &mut self, StartSlot: ::UINT, NumBuffers: ::UINT, - ppConstantBuffers: *mut *mut ID3D11Buffer - ) -> (), - fn PSGetShaderResources( - &mut self, StartSlot: ::UINT, NumViews: ::UINT, - ppShaderResourceViews: *mut *mut ID3D11ShaderResourceView - ) -> (), - fn PSGetShader( - &mut self, ppPixelShader: *mut *mut ID3D11PixelShader, - ppClassInstances: *mut *mut ID3D11ClassInstance, pNumClassInstances: *mut ::UINT - ) -> (), - fn PSGetSamplers( - &mut self, StartSlot: ::UINT, NumSamplers: ::UINT, - ppSamplers: *mut *mut ID3D11SamplerState - ) -> (), - fn VSGetShader( - &mut self, ppVertexShader: *mut *mut ID3D11VertexShader, - ppClassInstances: *mut *mut ID3D11ClassInstance, pNumClassInstances: *mut ::UINT - ) -> (), - fn PSGetConstantBuffers( - &mut self, StartSlot: ::UINT, NumBuffers: ::UINT, - ppConstantBuffers: *mut *mut ID3D11Buffer - ) -> (), - fn IAGetInputLayout(&mut self, ppInputLayout: *mut *mut ID3D11InputLayout) -> (), - fn IAGetVertexBuffers( - &mut self, StartSlot: ::UINT, NumBuffers: ::UINT, - ppVertexBuffers: *mut *mut ID3D11Buffer, pStrides: *mut ::UINT, pOffsets: *mut ::UINT - ) -> (), - fn IAGetIndexBuffer( - &mut self, pIndexBuffer: *mut *mut ID3D11Buffer, - Format: *mut ::DXGI_FORMAT, Offset: *mut ::UINT - ) -> (), - fn GSGetConstantBuffers( - &mut self, StartSlot: ::UINT, NumBuffers: ::UINT, - ppConstantBuffers: *mut *mut ID3D11Buffer - ) -> (), - fn GSGetShader( - &mut self, ppGeometryShader: *mut *mut ID3D11GeometryShader, - ppClassInstances: *mut *mut ID3D11ClassInstance, pNumClassInstances: *mut ::UINT - ) -> (), - fn IAGetPrimitiveTopology(&mut self, pTopology: *mut D3D11_PRIMITIVE_TOPOLOGY) -> (), - fn VSGetShaderResources( - &mut self, StartSlot: ::UINT, NumViews: ::UINT, - ppShaderResourceViews: *mut *mut ID3D11ShaderResourceView - ) -> (), - fn VSGetSamplers( - &mut self, StartSlot: ::UINT, NumSamplers: ::UINT, - ppSamplers: *mut *mut ID3D11SamplerState - ) -> (), - fn GetPredication( - &mut self, ppPredicate: *mut *mut ID3D11Predicate, - pPredicateValue: *mut ::BOOL - ) -> (), - fn GSGetShaderResources( - &mut self, StartSlot: ::UINT, NumViews: ::UINT, - ppShaderResourceViews: *mut *mut ID3D11ShaderResourceView - ) -> (), - fn GSGetSamplers( - &mut self, StartSlot: ::UINT, NumSamplers: ::UINT, - ppSamplers: *mut *mut ID3D11SamplerState - ) -> (), - fn OMGetRenderTargets( - &mut self, NumViews: ::UINT, - ppRenderTargetViews: *mut *mut ID3D11RenderTargetView, - ppDepthStencilView: *mut *mut ID3D11DepthStencilView - ) -> (), - fn OMGetRenderTargetsAndUnorderedAccessViews( - &mut self, NumRTVs: ::UINT, - ppRenderTargetViews: *mut *mut ID3D11RenderTargetView, - ppDepthStencilView: *mut *mut ID3D11DepthStencilView, UAVStartSlot: ::UINT, - ppUnorderedAccessViews: *mut *mut ID3D11UnorderedAccessView - ) -> (), - fn OMGetBlendState( - &mut self, ppBlendState: *mut *mut ID3D11BlendState, - BlendFactor: &mut [::FLOAT; 4], pSampleMask: *mut ::UINT - ) -> (), - fn OMGetDepthStencilState( - &mut self, ppDepthStencilState: *mut *mut ID3D11DepthStencilState, - pStencilRef: *mut ::UINT - ) -> (), - fn SOGetTargets(&mut self, NumBuffers: ::UINT, ppSOTargets: *mut *mut ID3D11Buffer) -> (), - fn RSGetState(&mut self, ppRasterizerState: *mut *mut ID3D11RasterizerState) -> (), - fn RSGetViewports(&mut self, pNumViewports: *mut ::UINT, pViewports: *mut D3D11_VIEWPORT - ) -> (), - fn RSGetScissorRects(&mut self, pNumRects: *mut ::UINT, pRects: *mut D3D11_RECT) -> (), - fn HSGetShaderResources( - &mut self, StartSlot: ::UINT, NumViews: ::UINT, - ppShaderResourceViews: *mut *mut ID3D11ShaderResourceView - ) -> (), - fn HSGetShader( - &mut self, ppHullShader: *mut *mut ID3D11HullShader, - ppClassInstances: *mut *mut ID3D11ClassInstance, pNumClassInstances: *mut ::UINT - ) -> (), - fn HSGetSamplers( - &mut self, StartSlot: ::UINT, NumSamplers: ::UINT, - ppSamplers: *mut *mut ID3D11SamplerState - ) -> (), - fn HSGetConstantBuffers( - &mut self, StartSlot: ::UINT, NumBuffers: ::UINT, - ppConstantBuffers: *mut *mut ID3D11Buffer - ) -> (), - fn DSGetShaderResources( - &mut self, StartSlot: ::UINT, NumViews: ::UINT, - ppShaderResourceViews: *mut *mut ID3D11ShaderResourceView - ) -> (), - fn DSGetShader( - &mut self, ppDomainShader: *mut *mut ID3D11DomainShader, - ppClassInstances: *mut *mut ID3D11ClassInstance, pNumClassInstances: *mut ::UINT - ) -> (), - fn DSGetSamplers( - &mut self, StartSlot: ::UINT, NumSamplers: ::UINT, - ppSamplers: *mut *mut ID3D11SamplerState - ) -> (), - fn DSGetConstantBuffers( - &mut self, StartSlot: ::UINT, NumBuffers: ::UINT, - ppConstantBuffers: *mut *mut ID3D11Buffer - ) -> (), - fn CSGetShaderResources( - &mut self, StartSlot: ::UINT, NumViews: ::UINT, - ppShaderResourceViews: *mut *mut ID3D11ShaderResourceView - ) -> (), - fn CSGetUnorderedAccessViews( - &mut self, StartSlot: ::UINT, NumUAVs: ::UINT, - ppUnorderedAccessViews: *mut *mut ID3D11UnorderedAccessView - ) -> (), - fn CSGetShader( - &mut self, ppComputeShader: *mut *mut ID3D11ComputeShader, - ppClassInstances: *mut *mut ID3D11ClassInstance, pNumClassInstances: *mut ::UINT - ) -> (), - fn CSGetSamplers( - &mut self, StartSlot: ::UINT, NumSamplers: ::UINT, - ppSamplers: *mut *mut ID3D11SamplerState - ) -> (), - fn CSGetConstantBuffers( - &mut self, StartSlot: ::UINT, NumBuffers: ::UINT, - ppConstantBuffers: *mut *mut ID3D11Buffer - ) -> (), - fn ClearState(&mut self) -> (), - fn Flush(&mut self) -> (), - fn GetType(&mut self) -> D3D11_DEVICE_CONTEXT_TYPE, - fn GetContextFlags(&mut self) -> ::UINT, - fn FinishCommandList( - &mut self, RestoreDeferredContextState: ::BOOL, - ppCommandList: *mut *mut ID3D11CommandList - ) -> ::HRESULT -} -); -DEFINE_GUID!(D3D11_DECODER_PROFILE_MPEG2_MOCOMP, 0xe6a9f44b, 0x61b0, 0x4563, 0x9e, 0xa4, 0x63, - 0xd2, 0xa3, 0xc6, 0xfe, 0x66); -DEFINE_GUID!(D3D11_DECODER_PROFILE_MPEG2_IDCT, 0xbf22ad00, 0x03ea, 0x4690, 0x80, 0x77, 0x47,0x33, - 0x46, 0x20, 0x9b, 0x7e); -DEFINE_GUID!(D3D11_DECODER_PROFILE_MPEG2_VLD, 0xee27417f, 0x5e28, 0x4e65, 0xbe, 0xea, 0x1d, 0x26, - 0xb5, 0x08, 0xad, 0xc9); -DEFINE_GUID!(D3D11_DECODER_PROFILE_MPEG1_VLD, 0x6f3ec719, 0x3735, 0x42cc, 0x80, 0x63, 0x65, 0xcc, - 0x3c, 0xb3, 0x66, 0x16); -DEFINE_GUID!(D3D11_DECODER_PROFILE_MPEG2and1_VLD, 0x86695f12, 0x340e, 0x4f04, 0x9f, 0xd3, 0x92, - 0x53, 0xdd, 0x32, 0x74, 0x60); -DEFINE_GUID!(D3D11_DECODER_PROFILE_H264_MOCOMP_NOFGT, 0x1b81be64, 0xa0c7, 0x11d3, 0xb9, 0x84, - 0x00, 0xc0, 0x4f, 0x2e, 0x73, 0xc5); -DEFINE_GUID!(D3D11_DECODER_PROFILE_H264_MOCOMP_FGT, 0x1b81be65, 0xa0c7, 0x11d3, 0xb9, 0x84, 0x00, - 0xc0, 0x4f, 0x2e, 0x73, 0xc5); -DEFINE_GUID!(D3D11_DECODER_PROFILE_H264_IDCT_NOFGT, 0x1b81be66, 0xa0c7, 0x11d3, 0xb9, 0x84, 0x00, - 0xc0, 0x4f, 0x2e, 0x73, 0xc5); -DEFINE_GUID!(D3D11_DECODER_PROFILE_H264_IDCT_FGT, 0x1b81be67, 0xa0c7, 0x11d3, 0xb9, 0x84, 0x00, - 0xc0, 0x4f, 0x2e, 0x73, 0xc5); -DEFINE_GUID!(D3D11_DECODER_PROFILE_H264_VLD_NOFGT, 0x1b81be68, 0xa0c7, 0x11d3, 0xb9, 0x84, 0x00, - 0xc0, 0x4f, 0x2e, 0x73, 0xc5); -DEFINE_GUID!(D3D11_DECODER_PROFILE_H264_VLD_FGT, 0x1b81be69, 0xa0c7, 0x11d3, 0xb9, 0x84, 0x00, - 0xc0, 0x4f, 0x2e, 0x73, 0xc5); -DEFINE_GUID!(D3D11_DECODER_PROFILE_H264_VLD_WITHFMOASO_NOFGT, 0xd5f04ff9, 0x3418, 0x45d8, 0x95, - 0x61, 0x32, 0xa7, 0x6a, 0xae, 0x2d, 0xdd); -DEFINE_GUID!(D3D11_DECODER_PROFILE_H264_VLD_STEREO_PROGRESSIVE_NOFGT, 0xd79be8da, 0x0cf1, 0x4c81, - 0xb8, 0x2a, 0x69, 0xa4, 0xe2, 0x36, 0xf4, 0x3d); -DEFINE_GUID!(D3D11_DECODER_PROFILE_H264_VLD_STEREO_NOFGT, 0xf9aaccbb, 0xc2b6, 0x4cfc, 0x87, 0x79, - 0x57, 0x07, 0xb1, 0x76, 0x05, 0x52); -DEFINE_GUID!(D3D11_DECODER_PROFILE_H264_VLD_MULTIVIEW_NOFGT, 0x705b9d82, 0x76cf, 0x49d6, 0xb7, - 0xe6, 0xac, 0x88, 0x72, 0xdb, 0x01, 0x3c); -DEFINE_GUID!(D3D11_DECODER_PROFILE_WMV8_POSTPROC, 0x1b81be80, 0xa0c7, 0x11d3, 0xb9, 0x84, 0x00, - 0xc0, 0x4f, 0x2e, 0x73, 0xc5); -DEFINE_GUID!(D3D11_DECODER_PROFILE_WMV8_MOCOMP, 0x1b81be81, 0xa0c7, 0x11d3, 0xb9, 0x84, 0x00, - 0xc0, 0x4f, 0x2e, 0x73, 0xc5); -DEFINE_GUID!(D3D11_DECODER_PROFILE_WMV9_POSTPROC, 0x1b81be90, 0xa0c7, 0x11d3, 0xb9, 0x84, 0x00, - 0xc0, 0x4f, 0x2e, 0x73, 0xc5); -DEFINE_GUID!(D3D11_DECODER_PROFILE_WMV9_MOCOMP, 0x1b81be91, 0xa0c7, 0x11d3, 0xb9, 0x84, 0x00, - 0xc0, 0x4f, 0x2e, 0x73, 0xc5); -DEFINE_GUID!(D3D11_DECODER_PROFILE_WMV9_IDCT, 0x1b81be94, 0xa0c7, 0x11d3, 0xb9, 0x84, 0x00, 0xc0, - 0x4f, 0x2e, 0x73, 0xc5); -DEFINE_GUID!(D3D11_DECODER_PROFILE_VC1_POSTPROC, 0x1b81beA0, 0xa0c7, 0x11d3, 0xb9, 0x84, 0x00, - 0xc0, 0x4f, 0x2e, 0x73, 0xc5); -DEFINE_GUID!(D3D11_DECODER_PROFILE_VC1_MOCOMP, 0x1b81beA1, 0xa0c7, 0x11d3, 0xb9, 0x84, 0x00, 0xc0, - 0x4f, 0x2e, 0x73, 0xc5); -DEFINE_GUID!(D3D11_DECODER_PROFILE_VC1_IDCT, 0x1b81beA2, 0xa0c7, 0x11d3, 0xb9, 0x84, 0x00, 0xc0, - 0x4f, 0x2e, 0x73, 0xc5); -DEFINE_GUID!(D3D11_DECODER_PROFILE_VC1_VLD, 0x1b81beA3, 0xa0c7, 0x11d3, 0xb9, 0x84, 0x00, 0xc0, - 0x4f, 0x2e, 0x73, 0xc5); -DEFINE_GUID!(D3D11_DECODER_PROFILE_VC1_D2010, 0x1b81beA4, 0xa0c7, 0x11d3, 0xb9, 0x84, 0x00, 0xc0, - 0x4f, 0x2e, 0x73, 0xc5); -DEFINE_GUID!(D3D11_DECODER_PROFILE_MPEG4PT2_VLD_SIMPLE, 0xefd64d74, 0xc9e8, 0x41d7, 0xa5, 0xe9, - 0xe9, 0xb0, 0xe3, 0x9f, 0xa3, 0x19); -DEFINE_GUID!(D3D11_DECODER_PROFILE_MPEG4PT2_VLD_ADVSIMPLE_NOGMC, 0xed418a9f, 0x010d, 0x4eda, 0x9a, - 0xe3, 0x9a, 0x65, 0x35, 0x8d, 0x8d, 0x2e); -DEFINE_GUID!(D3D11_DECODER_PROFILE_MPEG4PT2_VLD_ADVSIMPLE_GMC, 0xab998b5b, 0x4258, 0x44a9, 0x9f, - 0xeb, 0x94, 0xe5, 0x97, 0xa6, 0xba, 0xae); -DEFINE_GUID!(D3D11_DECODER_PROFILE_HEVC_VLD_MAIN, 0x5b11d51b, 0x2f4c, 0x4452, 0xbc, 0xc3, 0x09, - 0xf2, 0xa1, 0x16, 0x0c, 0xc0); -DEFINE_GUID!(D3D11_DECODER_PROFILE_HEVC_VLD_MAIN10, 0x107af0e0, 0xef1a, 0x4d19, 0xab, 0xa8, 0x67, - 0xa1, 0x63, 0x07, 0x3d, 0x13); -STRUCT!{struct D3D11_VIDEO_DECODER_DESC { - Guid: ::GUID, - SampleWidth: ::UINT, - SampleHeight: ::UINT, - OutputFormat: ::DXGI_FORMAT, -}} -STRUCT!{struct D3D11_VIDEO_DECODER_CONFIG { - guidConfigBitstreamEncryption: ::GUID, - guidConfigMBcontrolEncryption: ::GUID, - guidConfigResidDiffEncryption: ::GUID, - ConfigBitstreamRaw: ::UINT, - ConfigMBcontrolRasterOrder: ::UINT, - ConfigResidDiffHost: ::UINT, - ConfigSpatialResid8: ::UINT, - ConfigResid8Subtraction: ::UINT, - ConfigSpatialHost8or9Clipping: ::UINT, - ConfigSpatialResidInterleaved: ::UINT, - ConfigIntraResidUnsigned: ::UINT, - ConfigResidDiffAccelerator: ::UINT, - ConfigHostInverseScan: ::UINT, - ConfigSpecificIDCT: ::UINT, - Config4GroupedCoefs: ::UINT, - ConfigMinRenderTargetBuffCount: ::USHORT, - ConfigDecoderSpecific: ::USHORT, -}} -ENUM!{enum D3D11_VIDEO_DECODER_BUFFER_TYPE { - D3D11_VIDEO_DECODER_BUFFER_PICTURE_PARAMETERS = 0, - D3D11_VIDEO_DECODER_BUFFER_MACROBLOCK_CONTROL = 1, - D3D11_VIDEO_DECODER_BUFFER_RESIDUAL_DIFFERENCE = 2, - D3D11_VIDEO_DECODER_BUFFER_DEBLOCKING_CONTROL = 3, - D3D11_VIDEO_DECODER_BUFFER_INVERSE_QUANTIZATION_MATRIX = 4, - D3D11_VIDEO_DECODER_BUFFER_SLICE_CONTROL = 5, - D3D11_VIDEO_DECODER_BUFFER_BITSTREAM = 6, - D3D11_VIDEO_DECODER_BUFFER_MOTION_VECTOR = 7, - D3D11_VIDEO_DECODER_BUFFER_FILM_GRAIN = 8, -}} -STRUCT!{struct D3D11_AES_CTR_IV { - IV: ::UINT64, - Count: ::UINT64, -}} -STRUCT!{struct D3D11_ENCRYPTED_BLOCK_INFO { - NumEncryptedBytesAtBeginning: ::UINT, - NumBytesInSkipPattern: ::UINT, - NumBytesInEncryptPattern: ::UINT, -}} -STRUCT!{struct D3D11_VIDEO_DECODER_BUFFER_DESC { - BufferType: D3D11_VIDEO_DECODER_BUFFER_TYPE, - BufferIndex: ::UINT, - DataOffset: ::UINT, - DataSize: ::UINT, - FirstMBaddress: ::UINT, - NumMBsInBuffer: ::UINT, - Width: ::UINT, - Height: ::UINT, - Stride: ::UINT, - ReservedBits: ::UINT, - pIV: *mut ::c_void, - IVSize: ::UINT, - PartialEncryption: ::BOOL, - EncryptedBlockInfo: D3D11_ENCRYPTED_BLOCK_INFO, -}} -STRUCT!{struct D3D11_VIDEO_DECODER_EXTENSION { - Function: ::UINT, - pPrivateInputData: *mut ::c_void, - PrivateInputDataSize: ::UINT, - pPrivateOutputData: *mut ::c_void, - PrivateOutputDataSize: ::UINT, - ResourceCount: ::UINT, - ppResourceList: *mut *mut ID3D11Resource, -}} -RIDL!( -interface ID3D11VideoDecoder(ID3D11VideoDecoderVtbl): ID3D11DeviceChild(ID3D11DeviceChildVtbl) { - fn GetCreationParameters( - &mut self, pVideoDesc: *mut D3D11_VIDEO_DECODER_DESC, - pConfig: *mut D3D11_VIDEO_DECODER_CONFIG - ) -> ::HRESULT, - fn GetDriverHandle(&mut self, pDriverHandle: *mut ::HANDLE) -> ::HRESULT -} -); -FLAGS!{enum D3D11_VIDEO_PROCESSOR_FORMAT_SUPPORT { - D3D11_VIDEO_PROCESSOR_FORMAT_SUPPORT_INPUT = 0x1, - D3D11_VIDEO_PROCESSOR_FORMAT_SUPPORT_OUTPUT = 0x2, -}} -FLAGS!{enum D3D11_VIDEO_PROCESSOR_DEVICE_CAPS { - D3D11_VIDEO_PROCESSOR_DEVICE_CAPS_LINEAR_SPACE = 0x1, - D3D11_VIDEO_PROCESSOR_DEVICE_CAPS_xvYCC = 0x2, - D3D11_VIDEO_PROCESSOR_DEVICE_CAPS_RGB_RANGE_CONVERSION = 0x4, - D3D11_VIDEO_PROCESSOR_DEVICE_CAPS_YCbCr_MATRIX_CONVERSION = 0x8, - D3D11_VIDEO_PROCESSOR_DEVICE_CAPS_NOMINAL_RANGE = 0x10, -}} -FLAGS!{enum D3D11_VIDEO_PROCESSOR_FEATURE_CAPS { - D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_ALPHA_FILL = 0x1, - D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_CONSTRICTION = 0x2, - D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_LUMA_KEY = 0x4, - D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_ALPHA_PALETTE = 0x8, - D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_LEGACY = 0x10, - D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_STEREO = 0x20, - D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_ROTATION = 0x40, - D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_ALPHA_STREAM = 0x80, - D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_PIXEL_ASPECT_RATIO = 0x100, - D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_MIRROR = 0x200, - D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_SHADER_USAGE = 0x400, -}} -FLAGS!{enum D3D11_VIDEO_PROCESSOR_FILTER_CAPS { - D3D11_VIDEO_PROCESSOR_FILTER_CAPS_BRIGHTNESS = 0x1, - D3D11_VIDEO_PROCESSOR_FILTER_CAPS_CONTRAST = 0x2, - D3D11_VIDEO_PROCESSOR_FILTER_CAPS_HUE = 0x4, - D3D11_VIDEO_PROCESSOR_FILTER_CAPS_SATURATION = 0x8, - D3D11_VIDEO_PROCESSOR_FILTER_CAPS_NOISE_REDUCTION = 0x10, - D3D11_VIDEO_PROCESSOR_FILTER_CAPS_EDGE_ENHANCEMENT = 0x20, - D3D11_VIDEO_PROCESSOR_FILTER_CAPS_ANAMORPHIC_SCALING = 0x40, - D3D11_VIDEO_PROCESSOR_FILTER_CAPS_STEREO_ADJUSTMENT = 0x80, -}} -FLAGS!{enum D3D11_VIDEO_PROCESSOR_FORMAT_CAPS { - D3D11_VIDEO_PROCESSOR_FORMAT_CAPS_RGB_INTERLACED = 0x1, - D3D11_VIDEO_PROCESSOR_FORMAT_CAPS_RGB_PROCAMP = 0x2, - D3D11_VIDEO_PROCESSOR_FORMAT_CAPS_RGB_LUMA_KEY = 0x4, - D3D11_VIDEO_PROCESSOR_FORMAT_CAPS_PALETTE_INTERLACED = 0x8, -}} -FLAGS!{enum D3D11_VIDEO_PROCESSOR_AUTO_STREAM_CAPS { - D3D11_VIDEO_PROCESSOR_AUTO_STREAM_CAPS_DENOISE = 0x1, - D3D11_VIDEO_PROCESSOR_AUTO_STREAM_CAPS_DERINGING = 0x2, - D3D11_VIDEO_PROCESSOR_AUTO_STREAM_CAPS_EDGE_ENHANCEMENT = 0x4, - D3D11_VIDEO_PROCESSOR_AUTO_STREAM_CAPS_COLOR_CORRECTION = 0x8, - D3D11_VIDEO_PROCESSOR_AUTO_STREAM_CAPS_FLESH_TONE_MAPPING = 0x10, - D3D11_VIDEO_PROCESSOR_AUTO_STREAM_CAPS_IMAGE_STABILIZATION = 0x20, - D3D11_VIDEO_PROCESSOR_AUTO_STREAM_CAPS_SUPER_RESOLUTION = 0x40, - D3D11_VIDEO_PROCESSOR_AUTO_STREAM_CAPS_ANAMORPHIC_SCALING = 0x80, -}} -FLAGS!{enum D3D11_VIDEO_PROCESSOR_STEREO_CAPS { - D3D11_VIDEO_PROCESSOR_STEREO_CAPS_MONO_OFFSET = 0x1, - D3D11_VIDEO_PROCESSOR_STEREO_CAPS_ROW_INTERLEAVED = 0x2, - D3D11_VIDEO_PROCESSOR_STEREO_CAPS_COLUMN_INTERLEAVED = 0x4, - D3D11_VIDEO_PROCESSOR_STEREO_CAPS_CHECKERBOARD = 0x8, - D3D11_VIDEO_PROCESSOR_STEREO_CAPS_FLIP_MODE = 0x10, -}} -STRUCT!{struct D3D11_VIDEO_PROCESSOR_CAPS { - DeviceCaps: ::UINT, - FeatureCaps: ::UINT, - FilterCaps: ::UINT, - InputFormatCaps: ::UINT, - AutoStreamCaps: ::UINT, - StereoCaps: ::UINT, - RateConversionCapsCount: ::UINT, - MaxInputStreams: ::UINT, - MaxStreamStates: ::UINT, -}} -FLAGS!{enum D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS { - D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS_DEINTERLACE_BLEND = 0x1, - D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS_DEINTERLACE_BOB = 0x2, - D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS_DEINTERLACE_ADAPTIVE = 0x4, - D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS_DEINTERLACE_MOTION_COMPENSATION = 0x8, - D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS_INVERSE_TELECINE = 0x10, - D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS_FRAME_RATE_CONVERSION = 0x20, -}} -FLAGS!{enum D3D11_VIDEO_PROCESSOR_ITELECINE_CAPS { - D3D11_VIDEO_PROCESSOR_ITELECINE_CAPS_32 = 0x1, - D3D11_VIDEO_PROCESSOR_ITELECINE_CAPS_22 = 0x2, - D3D11_VIDEO_PROCESSOR_ITELECINE_CAPS_2224 = 0x4, - D3D11_VIDEO_PROCESSOR_ITELECINE_CAPS_2332 = 0x8, - D3D11_VIDEO_PROCESSOR_ITELECINE_CAPS_32322 = 0x10, - D3D11_VIDEO_PROCESSOR_ITELECINE_CAPS_55 = 0x20, - D3D11_VIDEO_PROCESSOR_ITELECINE_CAPS_64 = 0x40, - D3D11_VIDEO_PROCESSOR_ITELECINE_CAPS_87 = 0x80, - D3D11_VIDEO_PROCESSOR_ITELECINE_CAPS_222222222223 = 0x100, - D3D11_VIDEO_PROCESSOR_ITELECINE_CAPS_OTHER = 0x80000000, -}} -STRUCT!{struct D3D11_VIDEO_PROCESSOR_RATE_CONVERSION_CAPS { - PastFrames: ::UINT, - FutureFrames: ::UINT, - ProcessorCaps: ::UINT, - ITelecineCaps: ::UINT, - CustomRateCount: ::UINT, -}} -FLAGS!{enum D3D11_CONTENT_PROTECTION_CAPS { - D3D11_CONTENT_PROTECTION_CAPS_SOFTWARE = 0x1, - D3D11_CONTENT_PROTECTION_CAPS_HARDWARE = 0x2, - D3D11_CONTENT_PROTECTION_CAPS_PROTECTION_ALWAYS_ON = 0x4, - D3D11_CONTENT_PROTECTION_CAPS_PARTIAL_DECRYPTION = 0x8, - D3D11_CONTENT_PROTECTION_CAPS_CONTENT_KEY = 0x10, - D3D11_CONTENT_PROTECTION_CAPS_FRESHEN_SESSION_KEY = 0x20, - D3D11_CONTENT_PROTECTION_CAPS_ENCRYPTED_READ_BACK = 0x40, - D3D11_CONTENT_PROTECTION_CAPS_ENCRYPTED_READ_BACK_KEY = 0x80, - D3D11_CONTENT_PROTECTION_CAPS_SEQUENTIAL_CTR_IV = 0x100, - D3D11_CONTENT_PROTECTION_CAPS_ENCRYPT_SLICEDATA_ONLY = 0x200, - D3D11_CONTENT_PROTECTION_CAPS_DECRYPTION_BLT = 0x400, - D3D11_CONTENT_PROTECTION_CAPS_HARDWARE_PROTECT_UNCOMPRESSED = 0x800, - D3D11_CONTENT_PROTECTION_CAPS_HARDWARE_PROTECTED_MEMORY_PAGEABLE = 0x1000, - D3D11_CONTENT_PROTECTION_CAPS_HARDWARE_TEARDOWN = 0x2000, - D3D11_CONTENT_PROTECTION_CAPS_HARDWARE_DRM_COMMUNICATION = 0x4000, -}} -DEFINE_GUID!(D3D11_CRYPTO_TYPE_AES128_CTR, 0x9b6bd711, 0x4f74, 0x41c9, 0x9e, 0x7b, 0xb, 0xe2, - 0xd7, 0xd9, 0x3b, 0x4f); -DEFINE_GUID!(D3D11_DECODER_ENCRYPTION_HW_CENC, 0x89d6ac4f, 0x9f2, 0x4229, 0xb2, 0xcd, 0x37, 0x74, - 0xa, 0x6d, 0xfd, 0x81); -DEFINE_GUID!(D3D11_KEY_EXCHANGE_HW_PROTECTION, 0xb1170d8a, 0x628d, 0x4da3, 0xad, 0x3b, 0x82, 0xdd, - 0xb0, 0x8b, 0x49, 0x70); -STRUCT!{struct D3D11_VIDEO_CONTENT_PROTECTION_CAPS { - Caps: ::UINT, - KeyExchangeTypeCount: ::UINT, - BlockAlignmentSize: ::UINT, - ProtectedMemorySize: ::ULONGLONG, -}} -STRUCT!{struct D3D11_VIDEO_PROCESSOR_CUSTOM_RATE { - CustomRate: ::DXGI_RATIONAL, - OutputFrames: ::UINT, - InputInterlaced: ::BOOL, - InputFramesOrFields: ::UINT, -}} -ENUM!{enum D3D11_VIDEO_PROCESSOR_FILTER { - D3D11_VIDEO_PROCESSOR_FILTER_BRIGHTNESS = 0, - D3D11_VIDEO_PROCESSOR_FILTER_CONTRAST = 1, - D3D11_VIDEO_PROCESSOR_FILTER_HUE = 2, - D3D11_VIDEO_PROCESSOR_FILTER_SATURATION = 3, - D3D11_VIDEO_PROCESSOR_FILTER_NOISE_REDUCTION = 4, - D3D11_VIDEO_PROCESSOR_FILTER_EDGE_ENHANCEMENT = 5, - D3D11_VIDEO_PROCESSOR_FILTER_ANAMORPHIC_SCALING = 6, - D3D11_VIDEO_PROCESSOR_FILTER_STEREO_ADJUSTMENT = 7, -}} -STRUCT!{struct D3D11_VIDEO_PROCESSOR_FILTER_RANGE { - Minimum: ::c_int, - Maximum: ::c_int, - Default: ::c_int, - Multiplier: ::c_float, -}} -ENUM!{enum D3D11_VIDEO_FRAME_FORMAT { - D3D11_VIDEO_FRAME_FORMAT_PROGRESSIVE = 0, - D3D11_VIDEO_FRAME_FORMAT_INTERLACED_TOP_FIELD_FIRST = 1, - D3D11_VIDEO_FRAME_FORMAT_INTERLACED_BOTTOM_FIELD_FIRST = 2, -}} -ENUM!{enum D3D11_VIDEO_USAGE { - PLAYBACK_NORMAL = 0, - OPTIMAL_SPEED = 1, - OPTIMAL_QUALITY = 2, -}} -STRUCT!{struct D3D11_VIDEO_PROCESSOR_CONTENT_DESC { - InputFrameFormat: D3D11_VIDEO_FRAME_FORMAT, - InputFrameRate: ::DXGI_RATIONAL, - InputWidth: ::UINT, - InputHeight: ::UINT, - OutputFrameRate: ::DXGI_RATIONAL, - OutputWidth: ::UINT, - OutputHeight: ::UINT, - Usage: D3D11_VIDEO_USAGE, -}} -RIDL!( -interface ID3D11VideoProcessorEnumerator(ID3D11VideoProcessorEnumeratorVtbl) - : ID3D11DeviceChild(ID3D11DeviceChildVtbl) { - fn GetVideoProcessorContentDesc( - &mut self, - pContentDesc: *mut D3D11_VIDEO_PROCESSOR_CONTENT_DESC - ) -> ::HRESULT, - fn CheckVideoProcessorFormat( - &mut self, Format: ::DXGI_FORMAT, - pFlags: *mut ::UINT - ) -> ::HRESULT, - fn GetVideoProcessorCaps( - &mut self, - pCaps: *mut D3D11_VIDEO_PROCESSOR_CAPS - ) -> ::HRESULT, - fn GetVideoProcessorRateConversionCaps( - &mut self, TypeIndex: ::UINT, - pCaps: *mut D3D11_VIDEO_PROCESSOR_RATE_CONVERSION_CAPS - ) -> ::HRESULT, - fn GetVideoProcessorCustomRate( - &mut self, TypeIndex: ::UINT, CustomRateIndex: ::UINT, - pRate: *mut D3D11_VIDEO_PROCESSOR_CUSTOM_RATE - ) -> ::HRESULT, - fn GetVideoProcessorFilterRange( - &mut self, Filter: D3D11_VIDEO_PROCESSOR_FILTER, - pRange: *mut D3D11_VIDEO_PROCESSOR_FILTER_RANGE - ) -> ::HRESULT -} -); -STRUCT!{struct D3D11_VIDEO_COLOR_RGBA { - R: ::c_float, - G: ::c_float, - B: ::c_float, - A: ::c_float, -}} -STRUCT!{struct D3D11_VIDEO_COLOR_YCbCrA { - Y: ::c_float, - Cb: ::c_float, - Cr: ::c_float, - A: ::c_float, -}} -STRUCT!{struct D3D11_VIDEO_COLOR { - u: [::c_float; 4], -}} -UNION!(D3D11_VIDEO_COLOR, u, YCbCr, YCbCr_mut, D3D11_VIDEO_COLOR_YCbCrA); -UNION!(D3D11_VIDEO_COLOR, u, RGBA, RGBA_mut, D3D11_VIDEO_COLOR_RGBA); -ENUM!{enum D3D11_VIDEO_PROCESSOR_NOMINAL_RANGE { - D3D11_VIDEO_PROCESSOR_NOMINAL_RANGE_UNDEFINED = 0, - D3D11_VIDEO_PROCESSOR_NOMINAL_RANGE_16_235 = 1, - D3D11_VIDEO_PROCESSOR_NOMINAL_RANGE_0_255 = 2, -}} -STRUCT!{struct D3D11_VIDEO_PROCESSOR_COLOR_SPACE { - bit_fields: ::UINT, -}} -BITFIELD!(D3D11_VIDEO_PROCESSOR_COLOR_SPACE bit_fields: ::UINT [ - Usage set_Usage[0..1], - RGB_Range set_RGB_Range[1..2], - YCbCr_Matrix set_YCbCr_Matrix[2..3], - YCbCr_xvYCC set_YCbCr_xvYCC[3..4], - Nominal_Range set_Nominal_Range[4..6], - Reserved set_Reserved[27..32], -]); -ENUM!{enum D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE { - D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE_OPAQUE = 0, - D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE_BACKGROUND = 1, - D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE_DESTINATION = 2, - D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE_SOURCE_STREAM = 3, -}} -ENUM!{enum D3D11_VIDEO_PROCESSOR_OUTPUT_RATE { - D3D11_VIDEO_PROCESSOR_OUTPUT_RATE_NORMAL = 0, - D3D11_VIDEO_PROCESSOR_OUTPUT_RATE_HALF = 1, - D3D11_VIDEO_PROCESSOR_OUTPUT_RATE_CUSTOM = 2, -}} -ENUM!{enum D3D11_VIDEO_PROCESSOR_STEREO_FORMAT { - D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_MONO = 0, - D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_HORIZONTAL = 1, - D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_VERTICAL = 2, - D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_SEPARATE = 3, - D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_MONO_OFFSET = 4, - D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_ROW_INTERLEAVED = 5, - D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_COLUMN_INTERLEAVED = 6, - D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_CHECKERBOARD = 7, -}} -ENUM!{enum D3D11_VIDEO_PROCESSOR_STEREO_FLIP_MODE { - D3D11_VIDEO_PROCESSOR_STEREO_FLIP_NONE = 0, - D3D11_VIDEO_PROCESSOR_STEREO_FLIP_FRAME0 = 1, - D3D11_VIDEO_PROCESSOR_STEREO_FLIP_FRAME1 = 2, -}} -ENUM!{enum D3D11_VIDEO_PROCESSOR_ROTATION { - D3D11_VIDEO_PROCESSOR_ROTATION_IDENTITY = 0, - D3D11_VIDEO_PROCESSOR_ROTATION_90 = 1, - D3D11_VIDEO_PROCESSOR_ROTATION_180 = 2, - D3D11_VIDEO_PROCESSOR_ROTATION_270 = 3, -}} -STRUCT!{struct D3D11_VIDEO_PROCESSOR_STREAM { - Enable: ::BOOL, - OutputIndex: ::UINT, - InputFrameOrField: ::UINT, - PastFrames: ::UINT, - FutureFrames: ::UINT, - ppPastSurfaces: *mut *mut ID3D11VideoProcessorInputView, - pInputSurface: *mut ID3D11VideoProcessorInputView, - ppFutureSurfaces: *mut *mut ID3D11VideoProcessorInputView, - ppPastSurfacesRight: *mut *mut ID3D11VideoProcessorInputView, - pInputSurfaceRight: *mut ID3D11VideoProcessorInputView, - ppFutureSurfacesRight: *mut *mut ID3D11VideoProcessorInputView, -}} -RIDL!( -interface ID3D11VideoProcessor(ID3D11VideoProcessorVtbl) - : ID3D11DeviceChild(ID3D11DeviceChildVtbl) { - fn GetContentDesc(&mut self, pDesc: *mut D3D11_VIDEO_PROCESSOR_CONTENT_DESC) -> (), - fn GetRateConversionCaps(&mut self, pCaps: *mut D3D11_VIDEO_PROCESSOR_RATE_CONVERSION_CAPS - ) -> () -} -); -STRUCT!{struct D3D11_OMAC { - Omac: [::BYTE; 16], -}} -ENUM!{enum D3D11_AUTHENTICATED_CHANNEL_TYPE { - D3D11_AUTHENTICATED_CHANNEL_D3D11 = 1, - D3D11_AUTHENTICATED_CHANNEL_DRIVER_SOFTWARE = 2, - D3D11_AUTHENTICATED_CHANNEL_DRIVER_HARDWARE = 3, -}} -RIDL!( -interface ID3D11AuthenticatedChannel(ID3D11AuthenticatedChannelVtbl) - : ID3D11DeviceChild(ID3D11DeviceChildVtbl) { - fn GetCertificateSize(&mut self, pCertificateSize: *mut ::UINT) -> ::HRESULT, - fn GetCertificate(&mut self, CertificateSize: ::UINT, pCertificate: *mut ::BYTE) -> ::HRESULT, - fn GetChannelHandle(&mut self, pChannelHandle: *mut ::HANDLE) -> () -} -); -DEFINE_GUID!(D3D11_AUTHENTICATED_QUERY_PROTECTION, 0xa84eb584, 0xc495, 0x48aa, 0xb9, 0x4d, - 0x8b, 0xd2, 0xd6, 0xfb, 0xce, 0x5); -DEFINE_GUID!(D3D11_AUTHENTICATED_QUERY_CHANNEL_TYPE, 0xbc1b18a5, 0xb1fb, 0x42ab, 0xbd, - 0x94, 0xb5, 0x82, 0x8b, 0x4b, 0xf7, 0xbe); -DEFINE_GUID!(D3D11_AUTHENTICATED_QUERY_DEVICE_HANDLE, 0xec1c539d, 0x8cff, 0x4e2a, 0xbc, 0xc4, - 0xf5, 0x69, 0x2f, 0x99, 0xf4, 0x80); -DEFINE_GUID!(D3D11_AUTHENTICATED_QUERY_CRYPTO_SESSION, 0x2634499e, 0xd018, 0x4d74, 0xac, 0x17, - 0x7f, 0x72, 0x40, 0x59, 0x52, 0x8d); -DEFINE_GUID!(D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_COUNT, 0xdb207b3, - 0x9450, 0x46a6, 0x82, 0xde, 0x1b, 0x96, 0xd4, 0x4f, 0x9c, 0xf2); -DEFINE_GUID!(D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS, 0x649bbadb, 0xf0f4, - 0x4639, 0xa1, 0x5b, 0x24, 0x39, 0x3f, 0xc3, 0xab, 0xac); -DEFINE_GUID!(D3D11_AUTHENTICATED_QUERY_UNRESTRICTED_PROTECTED_SHARED_RESOURCE_COUNT, 0x12f0bd6, - 0xe662, 0x4474, 0xbe, 0xfd, 0xaa, 0x53, 0xe5, 0x14, 0x3c, 0x6d); -DEFINE_GUID!(D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_COUNT, 0x2c042b5e, 0x8c07, 0x46d5, 0xaa, 0xbe, - 0x8f, 0x75, 0xcb, 0xad, 0x4c, 0x31); -DEFINE_GUID!(D3D11_AUTHENTICATED_QUERY_OUTPUT_ID, 0x839ddca3, 0x9b4e, 0x41e4, 0xb0, 0x53, 0x89, - 0x2b, 0xd2, 0xa1, 0x1e, 0xe7); -DEFINE_GUID!(D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ATTRIBUTES, 0x6214d9d2, 0x432c, 0x4abb, 0x9f, - 0xce, 0x21, 0x6e, 0xea, 0x26, 0x9e, 0x3b); -DEFINE_GUID!(D3D11_AUTHENTICATED_QUERY_ENCRYPTION_WHEN_ACCESSIBLE_GUID_COUNT, 0xb30f7066, 0x203c, - 0x4b07, 0x93, 0xfc, 0xce, 0xaa, 0xfd, 0x61, 0x24, 0x1e); -DEFINE_GUID!(D3D11_AUTHENTICATED_QUERY_ENCRYPTION_WHEN_ACCESSIBLE_GUID, 0xf83a5958, 0xe986, - 0x4bda, 0xbe, 0xb0, 0x41, 0x1f, 0x6a, 0x7a, 0x1, 0xb7); -DEFINE_GUID!(D3D11_AUTHENTICATED_QUERY_CURRENT_ENCRYPTION_WHEN_ACCESSIBLE, 0xec1791c7, 0xdad3, - 0x4f15, 0x9e, 0xc3, 0xfa, 0xa9, 0x3d, 0x60, 0xd4, 0xf0); -DEFINE_GUID!(D3D11_AUTHENTICATED_CONFIGURE_INITIALIZE, 0x6114bdb, 0x3523, 0x470a, 0x8d, 0xca, - 0xfb, 0xc2, 0x84, 0x51, 0x54, 0xf0); -DEFINE_GUID!(D3D11_AUTHENTICATED_CONFIGURE_PROTECTION, 0x50455658, 0x3f47, 0x4362, 0xbf, 0x99, - 0xbf, 0xdf, 0xcd, 0xe9, 0xed, 0x29); -DEFINE_GUID!(D3D11_AUTHENTICATED_CONFIGURE_CRYPTO_SESSION, 0x6346cc54, 0x2cfc, 0x4ad4, 0x82, - 0x24, 0xd1, 0x58, 0x37, 0xde, 0x77, 0x0); -DEFINE_GUID!(D3D11_AUTHENTICATED_CONFIGURE_SHARED_RESOURCE, 0x772d047, 0x1b40, 0x48e8, 0x9c, - 0xa6, 0xb5, 0xf5, 0x10, 0xde, 0x9f, 0x1); -DEFINE_GUID!(D3D11_AUTHENTICATED_CONFIGURE_ENCRYPTION_WHEN_ACCESSIBLE, 0x41fff286, 0x6ae0, - 0x4d43, 0x9d, 0x55, 0xa4, 0x6e, 0x9e, 0xfd, 0x15, 0x8a); -STRUCT!{struct D3D11_AUTHENTICATED_QUERY_INPUT { - QueryType: ::GUID, - hChannel: ::HANDLE, - SequenceNumber: ::UINT, -}} -STRUCT!{struct D3D11_AUTHENTICATED_QUERY_OUTPUT { - omac: D3D11_OMAC, - QueryType: ::GUID, - hChannel: ::HANDLE, - SequenceNumber: ::UINT, - ReturnCode: ::HRESULT, -}} -STRUCT!{struct D3D11_AUTHENTICATED_PROTECTION_FLAGS { - u: ::UINT, -}} -STRUCT!{struct D3D11_AUTHENTICATED_QUERY_PROTECTION_OUTPUT { - Output: D3D11_AUTHENTICATED_QUERY_OUTPUT, - ProtectionFlags: D3D11_AUTHENTICATED_PROTECTION_FLAGS, -}} -STRUCT!{struct D3D11_AUTHENTICATED_QUERY_CHANNEL_TYPE_OUTPUT { - Output: D3D11_AUTHENTICATED_QUERY_OUTPUT, - ChannelType: D3D11_AUTHENTICATED_CHANNEL_TYPE, -}} -STRUCT!{struct D3D11_AUTHENTICATED_QUERY_DEVICE_HANDLE_OUTPUT { - Output: D3D11_AUTHENTICATED_QUERY_OUTPUT, - DeviceHandle: ::HANDLE, -}} -STRUCT!{struct D3D11_AUTHENTICATED_QUERY_CRYPTO_SESSION_INPUT { - Input: D3D11_AUTHENTICATED_QUERY_INPUT, - DecoderHandle: ::HANDLE, -}} -STRUCT!{struct D3D11_AUTHENTICATED_QUERY_CRYPTO_SESSION_OUTPUT { - Output: D3D11_AUTHENTICATED_QUERY_OUTPUT, - DecoderHandle: ::HANDLE, - CryptoSessionHandle: ::HANDLE, - DeviceHandle: ::HANDLE, -}} -STRUCT!{struct D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_COUNT_OUTPUT { - Output: D3D11_AUTHENTICATED_QUERY_OUTPUT, - RestrictedSharedResourceProcessCount: ::UINT, -}} -STRUCT!{struct D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_INPUT { - Input: D3D11_AUTHENTICATED_QUERY_INPUT, - ProcessIndex: ::UINT, -}} -ENUM!{enum D3D11_AUTHENTICATED_PROCESS_IDENTIFIER_TYPE { - DD3D11_PROCESSIDTYPE_UNKNOWN = 0, - DD3D11_PROCESSIDTYPE_DWM = 1, - DD3D11_PROCESSIDTYPE_HANDLE = 2, -}} -STRUCT!{struct D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_OUTPUT { - Output: D3D11_AUTHENTICATED_QUERY_OUTPUT, - ProcessIndex: ::UINT, - ProcessIdentifier: D3D11_AUTHENTICATED_PROCESS_IDENTIFIER_TYPE, - ProcessHandle: ::HANDLE, -}} -STRUCT!{struct D3D11_AUTHENTICATED_QUERY_UNRESTRICTED_PROTECTED_SHARED_RESOURCE_COUNT_OUTPUT { - Output: D3D11_AUTHENTICATED_QUERY_OUTPUT, - UnrestrictedProtectedSharedResourceCount: ::UINT, -}} -STRUCT!{struct D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_COUNT_INPUT { - Input: D3D11_AUTHENTICATED_QUERY_INPUT, - DeviceHandle: ::HANDLE, - CryptoSessionHandle: ::HANDLE, -}} -STRUCT!{struct D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_COUNT_OUTPUT { - Output: D3D11_AUTHENTICATED_QUERY_OUTPUT, - DeviceHandle: ::HANDLE, - CryptoSessionHandle: ::HANDLE, - OutputIDCount: ::UINT, -}} -STRUCT!{struct D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_INPUT { - Input: D3D11_AUTHENTICATED_QUERY_INPUT, - DeviceHandle: ::HANDLE, - CryptoSessionHandle: ::HANDLE, - OutputIDIndex: ::UINT, -}} -STRUCT!{struct D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_OUTPUT { - Output: D3D11_AUTHENTICATED_QUERY_OUTPUT, - DeviceHandle: ::HANDLE, - CryptoSessionHandle: ::HANDLE, - OutputIDIndex: ::UINT, - OutputID: ::UINT64, -}} -ENUM!{enum D3D11_BUS_TYPE { - D3D11_BUS_TYPE_OTHER = 0, - D3D11_BUS_TYPE_PCI = 0x1, - D3D11_BUS_TYPE_PCIX = 0x2, - D3D11_BUS_TYPE_PCIEXPRESS = 0x3, - D3D11_BUS_TYPE_AGP = 0x4, - D3D11_BUS_IMPL_MODIFIER_INSIDE_OF_CHIPSET = 0x10000, - D3D11_BUS_IMPL_MODIFIER_TRACKS_ON_MOTHER_BOARD_TO_CHIP = 0x20000, - D3D11_BUS_IMPL_MODIFIER_TRACKS_ON_MOTHER_BOARD_TO_SOCKET = 0x30000, - D3D11_BUS_IMPL_MODIFIER_DAUGHTER_BOARD_CONNECTOR = 0x40000, - D3D11_BUS_IMPL_MODIFIER_DAUGHTER_BOARD_CONNECTOR_INSIDE_OF_NUAE = 0x50000, - D3D11_BUS_IMPL_MODIFIER_NON_STANDARD = 0x80000000, -}} -STRUCT!{struct D3D11_AUTHENTICATED_QUERY_ACESSIBILITY_OUTPUT { - Output: D3D11_AUTHENTICATED_QUERY_OUTPUT, - BusType: D3D11_BUS_TYPE, - AccessibleInContiguousBlocks: ::BOOL, - AccessibleInNonContiguousBlocks: ::BOOL, -}} -STRUCT!{struct D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ENCRYPTION_GUID_COUNT_OUTPUT { - Output: D3D11_AUTHENTICATED_QUERY_OUTPUT, - EncryptionGuidCount: ::UINT, -}} -STRUCT!{struct D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ENCRYPTION_GUID_INPUT { - Input: D3D11_AUTHENTICATED_QUERY_INPUT, - EncryptionGuidIndex: ::UINT, -}} -STRUCT!{struct D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ENCRYPTION_GUID_OUTPUT { - Output: D3D11_AUTHENTICATED_QUERY_OUTPUT, - EncryptionGuidIndex: ::UINT, - EncryptionGuid: ::GUID, -}} -STRUCT!{struct D3D11_AUTHENTICATED_QUERY_CURRENT_ACCESSIBILITY_ENCRYPTION_OUTPUT { - Output: D3D11_AUTHENTICATED_QUERY_OUTPUT, - EncryptionGuid: ::GUID, -}} -STRUCT!{struct D3D11_AUTHENTICATED_CONFIGURE_INPUT { - omac: D3D11_OMAC, - ConfigureType: ::GUID, - hChannel: ::HANDLE, - SequenceNumber: ::UINT, -}} -STRUCT!{struct D3D11_AUTHENTICATED_CONFIGURE_OUTPUT { - omac: D3D11_OMAC, - ConfigureType: ::GUID, - hChannel: ::HANDLE, - SequenceNumber: ::UINT, - ReturnCode: ::HRESULT, -}} -STRUCT!{struct D3D11_AUTHENTICATED_CONFIGURE_INITIALIZE_INPUT { - Parameters: D3D11_AUTHENTICATED_CONFIGURE_INPUT, - StartSequenceQuery: ::UINT, - StartSequenceConfigure: ::UINT, -}} -STRUCT!{struct D3D11_AUTHENTICATED_CONFIGURE_PROTECTION_INPUT { - Parameters: D3D11_AUTHENTICATED_CONFIGURE_INPUT, - Protections: D3D11_AUTHENTICATED_PROTECTION_FLAGS, -}} -STRUCT!{struct D3D11_AUTHENTICATED_CONFIGURE_CRYPTO_SESSION_INPUT { - Parameters: D3D11_AUTHENTICATED_CONFIGURE_INPUT, - DecoderHandle: ::HANDLE, - CryptoSessionHandle: ::HANDLE, - DeviceHandle: ::HANDLE, -}} -STRUCT!{struct D3D11_AUTHENTICATED_CONFIGURE_SHARED_RESOURCE_INPUT { - Parameters: D3D11_AUTHENTICATED_CONFIGURE_INPUT, - ProcessType: D3D11_AUTHENTICATED_PROCESS_IDENTIFIER_TYPE, - ProcessHandle: ::HANDLE, - AllowAccess: ::BOOL, -}} -STRUCT!{struct D3D11_AUTHENTICATED_CONFIGURE_ACCESSIBLE_ENCRYPTION_INPUT { - Parameters: D3D11_AUTHENTICATED_CONFIGURE_INPUT, - EncryptionGuid: ::GUID, -}} -DEFINE_GUID!(D3D11_KEY_EXCHANGE_RSAES_OAEP, 0xc1949895, 0xd72a, 0x4a1d, 0x8e, 0x5d, 0xed, 0x85, - 0x7d, 0x17, 0x15, 0x20); -RIDL!( -interface ID3D11CryptoSession(ID3D11CryptoSessionVtbl): ID3D11DeviceChild(ID3D11DeviceChildVtbl) { - fn GetCryptoType(&mut self, pCryptoType: *mut ::GUID) -> (), - fn GetDecoderProfile(&mut self, pDecoderProfile: *mut ::GUID) -> (), - fn GetCertificateSize(&mut self, pCertificateSize: *mut ::UINT) -> ::HRESULT, - fn GetCertificate(&mut self, CertificateSize: ::UINT, pCertificate: *mut ::BYTE) -> ::HRESULT, - fn GetCryptoSessionHandle(&mut self, pCertificate: *mut ::HANDLE) -> () -} -); -ENUM!{enum D3D11_VDOV_DIMENSION { - D3D11_VDOV_DIMENSION_UNKNOWN = 0, - D3D11_VDOV_DIMENSION_TEXTURE2D = 1, -}} -STRUCT!{struct D3D11_TEX2D_VDOV { - ArraySlice: ::UINT, -}} -STRUCT!{struct D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC { - DecodeProfile: ::GUID, - ViewDimension: D3D11_VDOV_DIMENSION, - Texture2D: D3D11_TEX2D_VDOV, -}} -RIDL!( -interface ID3D11VideoDecoderOutputView(ID3D11VideoDecoderOutputViewVtbl) - : ID3D11View(ID3D11ViewVtbl) { - fn GetDesc(&mut self, pDesc: *mut D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC) -> () -} -); -ENUM!{enum D3D11_VPIV_DIMENSION { - D3D11_VPIV_DIMENSION_UNKNOWN = 0, - D3D11_VPIV_DIMENSION_TEXTURE2D = 1, -}} -STRUCT!{struct D3D11_TEX2D_VPIV { - MipSlice: ::UINT, - ArraySlice: ::UINT, -}} -STRUCT!{struct D3D11_VIDEO_PROCESSOR_INPUT_VIEW_DESC { - FourCC: ::UINT, - ViewDimension: D3D11_VPIV_DIMENSION, - Texture2D: D3D11_TEX2D_VPIV, -}} -RIDL!( -interface ID3D11VideoProcessorInputView(ID3D11VideoProcessorInputViewVtbl) - : ID3D11View(ID3D11ViewVtbl) { - fn GetDesc(&mut self, pDesc: *mut D3D11_VIDEO_PROCESSOR_INPUT_VIEW_DESC) -> () -} -); -ENUM!{enum D3D11_VPOV_DIMENSION { - D3D11_VPOV_DIMENSION_UNKNOWN = 0, - D3D11_VPOV_DIMENSION_TEXTURE2D = 1, - D3D11_VPOV_DIMENSION_TEXTURE2DARRAY = 2, -}} -STRUCT!{struct D3D11_TEX2D_VPOV { - MipSlice: ::UINT, -}} -STRUCT!{struct D3D11_TEX2D_ARRAY_VPOV { - MipSlice: ::UINT, - FirstArraySlice: ::UINT, - ArraySize: ::UINT, -}} -STRUCT!{struct D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC { - ViewDimension: D3D11_VPOV_DIMENSION, - u: [::UINT; 3], -}} -UNION!(D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC, u, Texture2D, Texture2D_mut, D3D11_TEX2D_VPOV); -UNION!(D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC, u, Texture2DArray, Texture2DArray_mut, - D3D11_TEX2D_ARRAY_VPOV); -RIDL!( -interface ID3D11VideoProcessorOutputView(ID3D11VideoProcessorOutputViewVtbl) - : ID3D11View(ID3D11ViewVtbl) { - fn GetDesc(&mut self, pDesc: *mut D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC) -> () -} -); -RIDL!( -interface ID3D11VideoContext(ID3D11VideoContextVtbl): ID3D11DeviceChild(ID3D11DeviceChildVtbl) { - fn GetDecoderBuffer( - &mut self, pDecoder: *mut ID3D11VideoDecoder, - Type: D3D11_VIDEO_DECODER_BUFFER_TYPE, pBufferSize: *mut ::UINT, - ppBuffer: *mut *mut ::c_void - ) -> ::HRESULT, - fn ReleaseDecoderBuffer( - &mut self, pDecoder: *mut ID3D11VideoDecoder, - Type: D3D11_VIDEO_DECODER_BUFFER_TYPE - ) -> ::HRESULT, - fn DecoderBeginFrame( - &mut self, pDecoder: *mut ID3D11VideoDecoder, - pView: *mut ID3D11VideoDecoderOutputView, ContentKeySize: ::UINT, - pContentKey: *const ::c_void - ) -> ::HRESULT, - fn DecoderEndFrame(&mut self, pDecoder: *mut ID3D11VideoDecoder) -> ::HRESULT, - fn SubmitDecoderBuffers( - &mut self, pDecoder: *mut ID3D11VideoDecoder, NumBuffers: ::UINT, - pBufferDesc: *const D3D11_VIDEO_DECODER_BUFFER_DESC - ) -> ::HRESULT, - fn DecoderExtension( - &mut self, pDecoder: *mut ID3D11VideoDecoder, - pExtensionData: *const D3D11_VIDEO_DECODER_EXTENSION - ) -> ::HRESULT, - fn VideoProcessorSetOutputTargetRect( - &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, - Enable: ::BOOL, pRect: *const ::RECT - ) -> (), - fn VideoProcessorSetOutputBackgroundColor( - &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, YCbCr: ::BOOL, - pRect: *const ::RECT - ) -> (), - fn VideoProcessorSetOutputColorSpace( - &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, - pColorSpace: *const D3D11_VIDEO_PROCESSOR_COLOR_SPACE - ) -> ::HRESULT, - fn VideoProcessorSetOutputAlphaFillMode( - &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, - AlphaFillMode: D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE, StreamIndex: ::UINT - ) -> (), - fn VideoProcessorSetOutputConstriction( - &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, - Enable: ::BOOL, Size: ::SIZE - ) -> (), - fn VideoProcessorSetOutputStereoMode( - &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, - Enable: ::BOOL - ) -> (), - fn VideoProcessorSetOutputExtension( - &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, - pExtensionGuid: *const ::GUID, DataSize: ::UINT, pData: *mut ::c_void - ) -> ::HRESULT, - fn VideoProcessorGetOutputTargetRect( - &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, - Enabled: *mut ::BOOL, pRect: *mut ::RECT - ) -> (), - fn VideoProcessorGetOutputBackgroundColor( - &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, pYCbCr: *mut ::BOOL, - pColor: *mut D3D11_VIDEO_COLOR - ) -> (), - fn VideoProcessorGetOutputColorSpace( - &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, - pColorSpace: *mut D3D11_VIDEO_PROCESSOR_COLOR_SPACE - ) -> (), - fn VideoProcessorGetOutputAlphaFillMode( - &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, - pAlphaFillMode: *mut D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE, - pStreamIndex: *mut ::UINT - ) -> (), - fn VideoProcessorGetOutputConstriction( - &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, - pEnabled: *mut ::BOOL, pSize: *mut ::SIZE - ) -> (), - fn VideoProcessorGetOutputStereoMode( - &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, - pEnabled: *mut ::BOOL - ) -> (), - fn VideoProcessorGetOutputExtension( - &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, - pExtensionGuid: *const ::GUID, DataSize: ::UINT, pData: *mut ::c_void - ) -> ::HRESULT, - fn VideoProcessorSetStreamFrameFormat( - &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, - StreamIndex: ::UINT, FrameFormat: D3D11_VIDEO_FRAME_FORMAT - ) -> (), - fn VideoProcessorSetStreamColorSpace( - &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, - StreamIndex: ::UINT, pColorSpace: *const D3D11_VIDEO_PROCESSOR_COLOR_SPACE - ) -> (), - fn VideoProcessorSetStreamOutputRate( - &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, - StreamIndex: ::UINT, OutputRate: D3D11_VIDEO_PROCESSOR_OUTPUT_RATE, RepeatFrame: ::BOOL, - pCustomRate: *const ::DXGI_RATIONAL - ) -> (), - fn VideoProcessorSetStreamSourceRect( - &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, - StreamIndex: ::UINT, Enable: ::BOOL, pRect: *const ::RECT - ) -> (), - fn VideoProcessorSetStreamDestRect( - &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, - StreamIndex: ::UINT, Enable: ::BOOL, pRect: *const ::RECT - ) -> (), - fn VideoProcessorSetStreamAlpha( - &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, - StreamIndex: ::UINT, Enable: ::BOOL, Alpha: ::FLOAT - ) -> (), - fn VideoProcessorSetStreamPalette( - &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, - StreamIndex: ::UINT, Count: ::UINT, pEntries: *const ::UINT - ) -> (), - fn VideoProcessorSetStreamPixelAspectRatio( - &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, StreamIndex: ::UINT, - Enable: ::BOOL, pSourceAspectRatio: *const ::DXGI_RATIONAL, - pDestinationAspectRatio: *const ::DXGI_RATIONAL - ) -> (), - fn VideoProcessorSetStreamLumaKey( - &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, - StreamIndex: ::UINT, Enable: ::BOOL, Lower: ::FLOAT, Upper: ::FLOAT - ) -> (), - fn VideoProcessorSetStreamStereoFormat( - &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, - StreamIndex: ::UINT, Enable: ::BOOL, Format: D3D11_VIDEO_PROCESSOR_STEREO_FORMAT, - LeftViewFrame0: ::BOOL, BaseViewFrame0: ::BOOL, - FlipMode: D3D11_VIDEO_PROCESSOR_STEREO_FLIP_MODE - ) -> (), - fn VideoProcessorSetStreamAutoProcessingMode( - &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, StreamIndex: ::UINT, - Enable: ::BOOL - ) -> (), - fn VideoProcessorSetStreamFilter( - &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, - StreamIndex: ::UINT, Filter: D3D11_VIDEO_PROCESSOR_FILTER, Enable: ::BOOL, - Level: ::c_int - ) -> (), - fn VideoProcessorSetStreamExtension( - &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, - StreamIndex: ::UINT, pExtensionGuid: *const ::GUID, DataSize: ::UINT, - pData: *mut ::c_void - ) -> ::HRESULT, - fn VideoProcessorGetStreamFrameFormat( - &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, - StreamIndex: ::UINT, pFrameFormat: *mut D3D11_VIDEO_FRAME_FORMAT - ) -> (), - fn VideoProcessorGetStreamColorSpace( - &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, - StreamIndex: ::UINT, pColorSpace: *mut D3D11_VIDEO_PROCESSOR_COLOR_SPACE - ) -> (), - fn VideoProcessorGetStreamOutputRate( - &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, - StreamIndex: ::UINT, pOutputRate: *mut D3D11_VIDEO_PROCESSOR_OUTPUT_RATE, - pRepeatFrame: *mut ::BOOL, pCustomRate: *mut ::DXGI_RATIONAL - ) -> (), - fn VideoProcessorGetStreamSourceRect( - &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, - StreamIndex: ::UINT, pEnabled: *mut ::BOOL, pRect: *mut ::RECT - ) -> (), - fn VideoProcessorGetStreamDestRect( - &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, - StreamIndex: ::UINT, pEnabled: *mut ::BOOL, pRect: *mut ::RECT - ) -> (), - fn VideoProcessorGetStreamAlpha( - &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, - StreamIndex: ::UINT, pEnabled: *mut ::BOOL, pAlpha: *mut ::FLOAT - ) -> (), - fn VideoProcessorGetStreamPalette( - &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, - StreamIndex: ::UINT, Count: ::UINT, pEntries: *mut ::UINT - ) -> (), - fn VideoProcessorGetStreamPixelAspectRatio( - &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, StreamIndex: ::UINT, - pEnabled: *mut ::BOOL, pSourceAspectRatio: *mut ::DXGI_RATIONAL, - pDestinationAspectRatio: *mut ::DXGI_RATIONAL - ) -> (), - fn VideoProcessorGetStreamLumaKey( - &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, - StreamIndex: ::UINT, pEnabled: *mut ::BOOL, pLower: *mut ::FLOAT, pUpper: *mut ::FLOAT - ) -> (), - fn VideoProcessorGetStreamStereoFormat( - &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, - StreamIndex: ::UINT, pEnabled: *mut ::BOOL, - pFormat: *mut D3D11_VIDEO_PROCESSOR_STEREO_FORMAT, pLeftViewFrame0: *mut ::BOOL, - pBaseViewFrame0: *mut ::BOOL, pFlipMode: *mut D3D11_VIDEO_PROCESSOR_STEREO_FLIP_MODE, - MonoOffset: *mut ::c_int - ) -> (), - fn VideoProcessorGetStreamAutoProcessingMode( - &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, StreamIndex: ::UINT, - pEnabled: *mut ::BOOL - ) -> (), - fn VideoProcessorGetStreamFilter( - &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, - StreamIndex: ::UINT, Filter: D3D11_VIDEO_PROCESSOR_FILTER, pEnabled: *mut ::BOOL, - pLevel: *mut ::c_int - ) -> (), - fn VideoProcessorGetStreamExtension( - &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, - StreamIndex: ::UINT, pExtensionGuid: *const ::GUID, DataSize: ::UINT, - pData: *mut ::c_void - ) -> ::HRESULT, - fn VideoProcessorBlt( - &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, - pView: *mut ID3D11VideoProcessorOutputView, OutputFrame: ::UINT, StreamCount: ::UINT, - pStreams: *const D3D11_VIDEO_PROCESSOR_STREAM - ) -> ::HRESULT, - fn NegotiateCryptoSessionKeyExchange( - &mut self, pCryptoSession: *mut ID3D11CryptoSession, - DataSize: ::UINT, pData: *mut ::c_void - ) -> ::HRESULT, - fn EncryptionBlt( - &mut self, pCryptoSession: *mut ID3D11CryptoSession, - pSrcSurface: *mut ID3D11Texture2D, pDstSurface: *mut ID3D11Texture2D, - IVSize: ::UINT, pIV: *mut ::c_void - ) -> ::HRESULT, - fn DecryptionBlt( - &mut self, pCryptoSession: *mut ID3D11CryptoSession, - pSrcSurface: *mut ID3D11Texture2D, pDstSurface: *mut ID3D11Texture2D, - pEncryptedBlockInfo: *mut D3D11_ENCRYPTED_BLOCK_INFO, ContentKeySize: ::UINT, - pContentKey: *const ::c_void, IVSize: ::UINT, pIV: *mut ::c_void - ) -> ::HRESULT, - fn StartSessionKeyRefresh( - &mut self, pCryptoSession: *mut ID3D11CryptoSession, - RandomNumberSize: ::UINT, pRandomNumber: *mut ::c_void - ) -> ::HRESULT, - fn FinishSessionKeyRefresh(&mut self, pCryptoSession: *mut ID3D11CryptoSession) -> ::HRESULT, - fn GetEncryptionBltKey( - &mut self, pCryptoSession: *mut ID3D11CryptoSession, - KeySize: ::UINT, pReadbackKey: *mut ::c_void - ) -> ::HRESULT, - fn NegotiateAuthenticatedChannelKeyExchange( - &mut self, - pChannel: *mut ID3D11AuthenticatedChannel, DataSize: ::UINT, pData: *mut ::c_void - ) -> ::HRESULT, - fn QueryAuthenticatedChannel( - &mut self, pChannel: *mut ID3D11AuthenticatedChannel, - InputSize: ::UINT, pInput: *const ::c_void, OutputSize: ::UINT, - pOutput: *mut ::c_void - ) -> ::HRESULT, - fn ConfigureAuthenticatedChannel( - &mut self, pChannel: *mut ID3D11AuthenticatedChannel, - InputSize: ::UINT, pInput: *const ::c_void, - pOutput: *mut D3D11_AUTHENTICATED_CONFIGURE_OUTPUT - ) -> ::HRESULT, - fn VideoProcessorSetStreamRotation( - &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, - StreamIndex: ::UINT, Enable: ::BOOL, Rotation: D3D11_VIDEO_PROCESSOR_ROTATION - ) -> ::HRESULT, - fn VideoProcessorGetStreamRotation( - &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, - StreamIndex: ::UINT, pEnable: *mut ::BOOL, pRotation: *mut D3D11_VIDEO_PROCESSOR_ROTATION - ) -> ::HRESULT -} -); -RIDL!( -interface ID3D11VideoDevice(ID3D11VideoDeviceVtbl): IUnknown(IUnknownVtbl) { - fn CreateVideoDecoder( - &mut self, pVideoDesc: *const D3D11_VIDEO_DECODER_DESC, - pConfig: *const D3D11_VIDEO_DECODER_CONFIG, ppDecoder: *mut *mut ID3D11VideoDecoder - ) -> ::HRESULT, - fn CreateVideoProcessor( - &mut self, pEnum: *mut ID3D11VideoProcessorEnumerator, - RateConversionIndex: ::UINT, ppVideoProcessor: *mut *mut ID3D11VideoProcessor - ) -> ::HRESULT, - fn CreateAuthenticatedChannel( - &mut self, ChannelType: D3D11_AUTHENTICATED_CHANNEL_TYPE, - ppAuthenticatedChannel: *mut *mut ID3D11AuthenticatedChannel - ) -> ::HRESULT, - fn CreateCryptoSession( - &mut self, pCryptoType: *const ::GUID, pDecoderProfile: *const ::GUID, - pKeyExchangeType: *const ::GUID, ppCryptoSession: *mut *mut ID3D11CryptoSession - ) -> ::HRESULT, - fn CreateVideoDecoderOutputView( - &mut self, pResource: *mut ID3D11Resource, - pDesc: *const D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC, - ppVDOVView: *mut *mut ID3D11VideoDecoderOutputView - ) -> ::HRESULT, - fn CreateVideoProcessorInputView( - &mut self, pResource: *mut ID3D11Resource, - pEnum: *mut ID3D11VideoProcessorEnumerator, - pDesc: *const D3D11_VIDEO_PROCESSOR_INPUT_VIEW_DESC, - ppVPIView: *mut *mut ID3D11VideoProcessorInputView - ) -> ::HRESULT, - fn CreateVideoProcessorOutputView( - &mut self, pResource: *mut ID3D11Resource, - pEnum: *mut ID3D11VideoProcessorEnumerator, - pDesc: *const D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC, - ppVPOView: *mut *mut ID3D11VideoProcessorOutputView - ) -> ::HRESULT, - fn CreateVideoProcessorEnumerator( - &mut self, pDesc: *const D3D11_VIDEO_PROCESSOR_CONTENT_DESC, - ppEnum: *mut *mut ID3D11VideoProcessorEnumerator - ) -> ::HRESULT, - fn GetVideoDecoderProfileCount(&mut self) -> ::UINT, - fn GetVideoDecoderProfile( - &mut self, Index: ::UINT, pDecoderProfile: *mut ::GUID - ) -> ::HRESULT, - fn CheckVideoDecoderFormat( - &mut self, pDecoderProfile: *const ::GUID, - Format: ::DXGI_FORMAT, pSupported: *mut ::BOOL - ) -> ::HRESULT, - fn GetVideoDecoderConfigCount( - &mut self, pDesc: *const D3D11_VIDEO_DECODER_DESC, - pCount: *mut ::UINT - ) -> ::HRESULT, - fn GetVideoDecoderConfig( - &mut self, pDesc: *const D3D11_VIDEO_DECODER_DESC, - Index: ::UINT, pConfig: *mut D3D11_VIDEO_DECODER_CONFIG - ) -> ::HRESULT, - fn GetContentProtectionCaps( - &mut self, pCryptoType: *const ::GUID, - pDecoderProfile: *const ::GUID, pCaps: *mut D3D11_VIDEO_CONTENT_PROTECTION_CAPS - ) -> ::HRESULT, - fn CheckCryptoKeyExchange( - &mut self, pCryptoType: *const ::GUID, - pDecoderProfile: *const ::GUID, Index: ::UINT, pKeyExchangeType: *mut ::GUID - ) -> ::HRESULT, - fn SetPrivateData( - &mut self, guid: ::REFGUID, DataSize: ::UINT, pData: *const ::c_void - ) -> ::HRESULT, - fn SetPrivateDataInterface( - &mut self, guid: ::REFGUID, pData: *const ::IUnknown - ) -> ::HRESULT -} -); -RIDL!( -interface ID3D11Device(ID3D11DeviceVtbl): IUnknown(IUnknownVtbl) { - fn CreateBuffer( - &mut self, pDesc: *const D3D11_BUFFER_DESC, - pInitialData: *const D3D11_SUBRESOURCE_DATA, ppBuffer: *mut *mut ID3D11Buffer - ) -> ::HRESULT, - fn CreateTexture1D( - &mut self, pDesc: *const D3D11_TEXTURE1D_DESC, - pInitialData: *const D3D11_SUBRESOURCE_DATA, ppTexture1D: *mut *mut ID3D11Texture1D - ) -> ::HRESULT, - fn CreateTexture2D( - &mut self, pDesc: *const D3D11_TEXTURE2D_DESC, - pInitialData: *const D3D11_SUBRESOURCE_DATA, ppTexture2D: *mut *mut ID3D11Texture2D - ) -> ::HRESULT, - fn CreateTexture3D( - &mut self, pDesc: *const D3D11_TEXTURE3D_DESC, - pInitialData: *const D3D11_SUBRESOURCE_DATA, ppTexture3D: *mut *mut ID3D11Texture3D - ) -> ::HRESULT, - fn CreateShaderResourceView( - &mut self, pResource: *mut ID3D11Resource, - pDesc: *const D3D11_SHADER_RESOURCE_VIEW_DESC, - ppSRView: *mut *mut ID3D11ShaderResourceView - ) -> ::HRESULT, - fn CreateUnorderedAccessView( - &mut self, pResource: *mut ID3D11Resource, - pDesc: *const D3D11_UNORDERED_ACCESS_VIEW_DESC, - ppUAView: *mut *mut ID3D11UnorderedAccessView - ) -> ::HRESULT, - fn CreateRenderTargetView( - &mut self, pResource: *mut ID3D11Resource, - pDesc: *const D3D11_RENDER_TARGET_VIEW_DESC, - ppRTView: *mut *mut ID3D11RenderTargetView - ) -> ::HRESULT, - fn CreateDepthStencilView( - &mut self, pResource: *mut ID3D11Resource, - pDesc: *const D3D11_DEPTH_STENCIL_VIEW_DESC, - ppDepthStencilView: *mut *mut ID3D11DepthStencilView - ) -> ::HRESULT, - fn CreateInputLayout( - &mut self, pInputElementDescs: *const D3D11_INPUT_ELEMENT_DESC, - NumElements: ::UINT, pShaderBytecodeWithInputSignature: *const ::c_void, - BytecodeLength: ::SIZE_T, ppInputLayout: *mut *mut ID3D11InputLayout - ) -> ::HRESULT, - fn CreateVertexShader( - &mut self, pShaderBytecode: *const ::c_void, - BytecodeLength: ::SIZE_T, pClassLinkage: *mut ID3D11ClassLinkage, - ppVertexShader: *mut *mut ID3D11VertexShader - ) -> ::HRESULT, - fn CreateGeometryShader( - &mut self, pShaderBytecode: *const ::c_void, - BytecodeLength: ::SIZE_T, pClassLinkage: *mut ID3D11ClassLinkage, - ppGeometryShader: *mut *mut ID3D11GeometryShader - ) -> ::HRESULT, - fn CreateGeometryShaderWithStreamOutput( - &mut self, pShaderBytecode: *const ::c_void, - BytecodeLength: ::SIZE_T, pSODeclaration: *const D3D11_SO_DECLARATION_ENTRY, - NumEntries: ::UINT, pBufferStrides: *const ::UINT, NumStrides: ::UINT, - RasterizedStream: ::UINT, pClassLinkage: *mut ID3D11ClassLinkage, - ppGeometryShader: *mut *mut ID3D11GeometryShader - ) -> ::HRESULT, - fn CreatePixelShader( - &mut self, pShaderBytecode: *const ::c_void, - BytecodeLength: ::SIZE_T, pClassLinkage: *mut ID3D11ClassLinkage, - ppPixelShader: *mut *mut ID3D11PixelShader - ) -> ::HRESULT, - fn CreateHullShader( - &mut self, pShaderBytecode: *const ::c_void, - BytecodeLength: ::SIZE_T, pClassLinkage: *mut ID3D11ClassLinkage, - ppHullShader: *mut *mut ID3D11HullShader - ) -> ::HRESULT, - fn CreateDomainShader( - &mut self, pShaderBytecode: *const ::c_void, - BytecodeLength: ::SIZE_T, pClassLinkage: *mut ID3D11ClassLinkage, - ppDomainShader: *mut *mut ID3D11DomainShader - ) -> ::HRESULT, - fn CreateComputeShader( - &mut self, pShaderBytecode: *const ::c_void, - BytecodeLength: ::SIZE_T, pClassLinkage: *mut ID3D11ClassLinkage, - ppComputeShader: *mut *mut ID3D11ComputeShader - ) -> ::HRESULT, - fn CreateClassLinkage(&mut self, ppLinkage: *mut *mut ID3D11ClassLinkage) -> ::HRESULT, - fn CreateBlendState( - &mut self, pBlendStateDesc: *const D3D11_BLEND_DESC, - ppBlendState: *mut *mut ID3D11BlendState - ) -> ::HRESULT, - fn CreateDepthStencilState( - &mut self, pDepthStencilDesc: *const D3D11_DEPTH_STENCIL_DESC, - ppDepthStencilState: *mut *mut ID3D11DepthStencilState - ) -> ::HRESULT, - fn CreateRasterizerState( - &mut self, pRasterizerDesc: *const D3D11_RASTERIZER_DESC, - ppRasterizerState: *mut *mut ID3D11RasterizerState - ) -> ::HRESULT, - fn CreateSamplerState( - &mut self, pSamplerDesc: *const D3D11_SAMPLER_DESC, - ppSamplerState: *mut *mut ID3D11SamplerState - ) -> ::HRESULT, - fn CreateQuery( - &mut self, pQueryDesc: *const D3D11_QUERY_DESC, - ppQuery: *mut *mut ID3D11Query - ) -> ::HRESULT, - fn CreatePredicate( - &mut self, pPredicateDesc: *const D3D11_QUERY_DESC, - ppPredicate: *mut *mut ID3D11Predicate - ) -> ::HRESULT, - fn CreateCounter( - &mut self, pCounterDesc: *const D3D11_COUNTER_DESC, - ppCounter: *mut *mut ID3D11Counter - ) -> ::HRESULT, - fn CreateDeferredContext( - &mut self, ContextFlags: ::UINT, - ppDeferredContext: *mut *mut ID3D11DeviceContext - ) -> ::HRESULT, - fn OpenSharedResource( - &mut self, hResource: ::HANDLE, ReturnedInterface: ::REFIID, - ppResource: *mut *mut ::c_void - ) -> ::HRESULT, - fn CheckFormatSupport( - &mut self, Format: ::DXGI_FORMAT, - pFormatSupport: *mut ::UINT - ) -> ::HRESULT, - fn CheckMultisampleQualityLevels( - &mut self, Format: ::DXGI_FORMAT, SampleCount: ::UINT, - pNumQualityLevels: *mut ::UINT - ) -> ::HRESULT, - fn CheckCounterInfo(&mut self, pCounterInfo: *mut D3D11_COUNTER_INFO) -> (), - fn CheckCounter( - &mut self, pDesc: *const D3D11_COUNTER_DESC, pType: *mut D3D11_COUNTER_TYPE, - pActiveCounters: *mut ::UINT, szName: ::LPSTR, pNameLength: *mut ::UINT, szUnits: ::LPSTR, - pUnitsLength: *mut ::UINT, szDescription: ::LPSTR, pDescriptionLength: *mut ::UINT - ) -> ::HRESULT, - fn CheckFeatureSupport( - &mut self, Feature: D3D11_FEATURE, pFeatureSupportData: *mut ::c_void, - FeatureSupportDataSize: ::UINT - ) -> ::HRESULT, - fn GetPrivateData( - &mut self, guid: ::REFGUID, pDataSize: *mut ::UINT, pData: *mut ::c_void - ) -> ::HRESULT, - fn SetPrivateData( - &mut self, guid: ::REFGUID, DataSize: ::UINT, pData: *const ::c_void - ) -> ::HRESULT, - fn SetPrivateDataInterface(&mut self, guid: ::REFGUID, pData: *const ::IUnknown) -> ::HRESULT, - fn GetFeatureLevel(&mut self) -> ::D3D_FEATURE_LEVEL, - fn GetCreationFlags(&mut self) -> ::UINT, - fn GetDeviceRemovedReason(&mut self) -> ::HRESULT, - fn GetImmediateContext(&mut self, ppImmediateContext: *mut *mut ID3D11DeviceContext) -> (), - fn SetExceptionMode(&mut self, RaiseFlags: ::UINT) -> ::HRESULT, - fn GetExceptionMode(&mut self) -> ::UINT -} -); -FLAGS!{enum D3D11_CREATE_DEVICE_FLAG { - D3D11_CREATE_DEVICE_SINGLETHREADED = 0x1, - D3D11_CREATE_DEVICE_DEBUG = 0x2, - D3D11_CREATE_DEVICE_SWITCH_TO_REF = 0x4, - D3D11_CREATE_DEVICE_PREVENT_INTERNAL_THREADING_OPTIMIZATIONS = 0x8, - D3D11_CREATE_DEVICE_BGRA_SUPPORT = 0x20, - D3D11_CREATE_DEVICE_DEBUGGABLE = 0x40, - D3D11_CREATE_DEVICE_PREVENT_ALTERING_LAYER_SETTINGS_FROM_REGISTRY = 0x80, - D3D11_CREATE_DEVICE_DISABLE_GPU_TIMEOUT = 0x100, - D3D11_CREATE_DEVICE_VIDEO_SUPPORT = 0x800, -}} -pub const D3D11_SDK_VERSION: ::DWORD = 7; -DEFINE_GUID!(IID_ID3D11DeviceChild, 0x1841e5c8, 0x16b0, 0x489b, 0xbc, 0xc8, 0x44, 0xcf, 0xb0, - 0xd5, 0xde, 0xae); -DEFINE_GUID!(IID_ID3D11DepthStencilState, 0x03823efb, 0x8d8f, 0x4e1c, 0x9a, 0xa2, 0xf6, 0x4b, - 0xb2, 0xcb, 0xfd, 0xf1); -DEFINE_GUID!(IID_ID3D11BlendState, 0x75b68faa, 0x347d, 0x4159, 0x8f, 0x45, 0xa0, 0x64, 0x0f, 0x01, - 0xcd, 0x9a); -DEFINE_GUID!(IID_ID3D11RasterizerState, 0x9bb4ab81, 0xab1a, 0x4d8f, 0xb5, 0x06, 0xfc, 0x04, 0x20, - 0x0b, 0x6e, 0xe7); -DEFINE_GUID!(IID_ID3D11Resource, 0xdc8e63f3, 0xd12b, 0x4952, 0xb4, 0x7b, 0x5e, 0x45, 0x02, 0x6a, - 0x86, 0x2d); -DEFINE_GUID!(IID_ID3D11Buffer, 0x48570b85, 0xd1ee, 0x4fcd, 0xa2, 0x50, 0xeb, 0x35, 0x07, 0x22, - 0xb0, 0x37); -DEFINE_GUID!(IID_ID3D11Texture1D, 0xf8fb5c27, 0xc6b3, 0x4f75, 0xa4, 0xc8, 0x43, 0x9a, 0xf2, 0xef, - 0x56, 0x4c); -DEFINE_GUID!(IID_ID3D11Texture2D, 0x6f15aaf2, 0xd208, 0x4e89, 0x9a, 0xb4, 0x48, 0x95, 0x35, 0xd3, - 0x4f, 0x9c); -DEFINE_GUID!(IID_ID3D11Texture3D, 0x037e866e, 0xf56d, 0x4357, 0xa8, 0xaf, 0x9d, 0xab, 0xbe, 0x6e, - 0x25, 0x0e); -DEFINE_GUID!(IID_ID3D11View, 0x839d1216, 0xbb2e, 0x412b, 0xb7, 0xf4, 0xa9, 0xdb, 0xeb, 0xe0, 0x8e, - 0xd1); -DEFINE_GUID!(IID_ID3D11ShaderResourceView, 0xb0e06fe0, 0x8192, 0x4e1a, 0xb1, 0xca, 0x36, 0xd7, - 0x41, 0x47, 0x10, 0xb2); -DEFINE_GUID!(IID_ID3D11RenderTargetView, 0xdfdba067, 0x0b8d, 0x4865, 0x87, 0x5b, 0xd7, 0xb4, 0x51, - 0x6c, 0xc1, 0x64); -DEFINE_GUID!(IID_ID3D11DepthStencilView, 0x9fdac92a, 0x1876, 0x48c3, 0xaf, 0xad, 0x25, 0xb9, 0x4f, - 0x84, 0xa9, 0xb6); -DEFINE_GUID!(IID_ID3D11UnorderedAccessView, 0x28acf509, 0x7f5c, 0x48f6, 0x86, 0x11, 0xf3, 0x16, - 0x01, 0x0a, 0x63, 0x80); -DEFINE_GUID!(IID_ID3D11VertexShader, 0x3b301d64, 0xd678, 0x4289, 0x88, 0x97, 0x22, 0xf8, 0x92, - 0x8b, 0x72, 0xf3); -DEFINE_GUID!(IID_ID3D11HullShader, 0x8e5c6061, 0x628a, 0x4c8e, 0x82, 0x64, 0xbb, 0xe4, 0x5c, 0xb3, - 0xd5, 0xdd); -DEFINE_GUID!(IID_ID3D11DomainShader, 0xf582c508, 0x0f36, 0x490c, 0x99, 0x77, 0x31, 0xee, 0xce, - 0x26, 0x8c, 0xfa); -DEFINE_GUID!(IID_ID3D11GeometryShader, 0x38325b96, 0xeffb, 0x4022, 0xba, 0x02, 0x2e, 0x79, 0x5b, - 0x70, 0x27, 0x5c); -DEFINE_GUID!(IID_ID3D11PixelShader, 0xea82e40d, 0x51dc, 0x4f33, 0x93, 0xd4, 0xdb, 0x7c, 0x91, - 0x25, 0xae, 0x8c); -DEFINE_GUID!(IID_ID3D11ComputeShader, 0x4f5b196e, 0xc2bd, 0x495e, 0xbd, 0x01, 0x1f, 0xde, 0xd3, - 0x8e, 0x49, 0x69); -DEFINE_GUID!(IID_ID3D11InputLayout, 0xe4819ddc, 0x4cf0, 0x4025, 0xbd, 0x26, 0x5d, 0xe8, 0x2a, - 0x3e, 0x07, 0xb7); -DEFINE_GUID!(IID_ID3D11SamplerState, 0xda6fea51, 0x564c, 0x4487, 0x98, 0x10, 0xf0, 0xd0, 0xf9, - 0xb4, 0xe3, 0xa5); -DEFINE_GUID!(IID_ID3D11Asynchronous, 0x4b35d0cd, 0x1e15, 0x4258, 0x9c, 0x98, 0x1b, 0x13, 0x33, - 0xf6, 0xdd, 0x3b); -DEFINE_GUID!(IID_ID3D11Query, 0xd6c00747, 0x87b7, 0x425e, 0xb8, 0x4d, 0x44, 0xd1, 0x08, 0x56, - 0x0a, 0xfd); -DEFINE_GUID!(IID_ID3D11Predicate, 0x9eb576dd, 0x9f77, 0x4d86, 0x81, 0xaa, 0x8b, 0xab, 0x5f, 0xe4, - 0x90, 0xe2); -DEFINE_GUID!(IID_ID3D11Counter, 0x6e8c49fb, 0xa371, 0x4770, 0xb4, 0x40, 0x29, 0x08, 0x60, 0x22, - 0xb7, 0x41); -DEFINE_GUID!(IID_ID3D11ClassInstance, 0xa6cd7faa, 0xb0b7, 0x4a2f, 0x94, 0x36, 0x86, 0x62, 0xa6, - 0x57, 0x97, 0xcb); -DEFINE_GUID!(IID_ID3D11ClassLinkage, 0xddf57cba, 0x9543, 0x46e4, 0xa1, 0x2b, 0xf2, 0x07, 0xa0, - 0xfe, 0x7f, 0xed); -DEFINE_GUID!(IID_ID3D11CommandList, 0xa24bc4d1, 0x769e, 0x43f7, 0x80, 0x13, 0x98, 0xff, 0x56, - 0x6c, 0x18, 0xe2); -DEFINE_GUID!(IID_ID3D11DeviceContext, 0xc0bfa96c, 0xe089, 0x44fb, 0x8e, 0xaf, 0x26, 0xf8, 0x79, - 0x61, 0x90, 0xda); -DEFINE_GUID!(IID_ID3D11VideoDecoder, 0x3C9C5B51, 0x995D, 0x48d1, 0x9B, 0x8D, 0xFA, 0x5C, 0xAE, - 0xDE, 0xD6, 0x5C); -DEFINE_GUID!(IID_ID3D11VideoProcessorEnumerator, 0x31627037, 0x53AB, 0x4200, 0x90, 0x61, 0x05, - 0xFA, 0xA9, 0xAB, 0x45, 0xF9); -DEFINE_GUID!(IID_ID3D11VideoProcessor, 0x1D7B0652, 0x185F, 0x41c6, 0x85, 0xCE, 0x0C, 0x5B, 0xE3, - 0xD4, 0xAE, 0x6C); -DEFINE_GUID!(IID_ID3D11AuthenticatedChannel, 0x3015A308, 0xDCBD, 0x47aa, 0xA7, 0x47, 0x19, 0x24, - 0x86, 0xD1, 0x4D, 0x4A); -DEFINE_GUID!(IID_ID3D11CryptoSession, 0x9B32F9AD, 0xBDCC, 0x40a6, 0xA3, 0x9D, 0xD5, 0xC8, 0x65, - 0x84, 0x57, 0x20); -DEFINE_GUID!(IID_ID3D11VideoDecoderOutputView, 0xC2931AEA, 0x2A85, 0x4f20, 0x86, 0x0F, 0xFB, 0xA1, - 0xFD, 0x25, 0x6E, 0x18); -DEFINE_GUID!(IID_ID3D11VideoProcessorInputView, 0x11EC5A5F, 0x51DC, 0x4945, 0xAB, 0x34, 0x6E, - 0x8C, 0x21, 0x30, 0x0E, 0xA5); -DEFINE_GUID!(IID_ID3D11VideoProcessorOutputView, 0xA048285E, 0x25A9, 0x4527, 0xBD, 0x93, 0xD6, - 0x8B, 0x68, 0xC4, 0x42, 0x54); -DEFINE_GUID!(IID_ID3D11VideoContext, 0x61F21C45, 0x3C0E, 0x4a74, 0x9C, 0xEA, 0x67, 0x10, 0x0D, - 0x9A, 0xD5, 0xE4); -DEFINE_GUID!(IID_ID3D11VideoDevice, 0x10EC4D5B, 0x975A, 0x4689, 0xB9, 0xE4, 0xD0, 0xAA, 0xC3, - 0x0F, 0xE3, 0x33); -DEFINE_GUID!(IID_ID3D11Device, 0xdb6f6ddb, 0xac77, 0x4e88, 0x82, 0x53, 0x81, 0x9d, 0xf9, 0xbb, - 0xf1, 0x40); diff --git a/deps/winapi-0.2.5/src/d3d12.rs b/deps/winapi-0.2.5/src/d3d12.rs deleted file mode 100644 index 326aad07f..000000000 --- a/deps/winapi-0.2.5/src/d3d12.rs +++ /dev/null @@ -1,2451 +0,0 @@ -// Copyright © 2015, Dmitry Roschin -// Licensed under the MIT License <LICENSE.md> -pub const D3D12_16BIT_INDEX_STRIP_CUT_VALUE: ::UINT = 0xffff; -pub const D3D12_32BIT_INDEX_STRIP_CUT_VALUE: ::UINT = 0xffffffff; -pub const D3D12_8BIT_INDEX_STRIP_CUT_VALUE: ::UINT = 0xff; -pub const D3D12_ANISOTROPIC_FILTERING_BIT: ::UINT = 0x40; -pub const D3D12_APPEND_ALIGNED_ELEMENT: ::UINT = 0xffffffff; -pub const D3D12_ARRAY_AXIS_ADDRESS_RANGE_BIT_COUNT: ::UINT = 9; -pub const D3D12_CLIP_OR_CULL_DISTANCE_COUNT: ::UINT = 8; -pub const D3D12_CLIP_OR_CULL_DISTANCE_ELEMENT_COUNT: ::UINT = 2; -pub const D3D12_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT: ::UINT = 14; -pub const D3D12_COMMONSHADER_CONSTANT_BUFFER_COMPONENTS: ::UINT = 4; -pub const D3D12_COMMONSHADER_CONSTANT_BUFFER_COMPONENT_BIT_COUNT: ::UINT = 32; -pub const D3D12_COMMONSHADER_CONSTANT_BUFFER_HW_SLOT_COUNT: ::UINT = 15; -pub const D3D12_COMMONSHADER_CONSTANT_BUFFER_PARTIAL_UPDATE_EXTENTS_BYTE_ALIGNMENT: ::UINT = 16; -pub const D3D12_COMMONSHADER_CONSTANT_BUFFER_REGISTER_COMPONENTS: ::UINT = 4; -pub const D3D12_COMMONSHADER_CONSTANT_BUFFER_REGISTER_COUNT: ::UINT = 15; -pub const D3D12_COMMONSHADER_CONSTANT_BUFFER_REGISTER_READS_PER_INST: ::UINT = 1; -pub const D3D12_COMMONSHADER_CONSTANT_BUFFER_REGISTER_READ_PORTS: ::UINT = 1; -pub const D3D12_COMMONSHADER_FLOWCONTROL_NESTING_LIMIT: ::UINT = 64; -pub const D3D12_COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_COMPONENTS: ::UINT = 4; -pub const D3D12_COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_COUNT: ::UINT = 1; -pub const D3D12_COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_READS_PER_INST: ::UINT = 1; -pub const D3D12_COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_READ_PORTS: ::UINT = 1; -pub const D3D12_COMMONSHADER_IMMEDIATE_VALUE_COMPONENT_BIT_COUNT: ::UINT = 32; -pub const D3D12_COMMONSHADER_INPUT_RESOURCE_REGISTER_COMPONENTS: ::UINT = 1; -pub const D3D12_COMMONSHADER_INPUT_RESOURCE_REGISTER_COUNT: ::UINT = 128; -pub const D3D12_COMMONSHADER_INPUT_RESOURCE_REGISTER_READS_PER_INST: ::UINT = 1; -pub const D3D12_COMMONSHADER_INPUT_RESOURCE_REGISTER_READ_PORTS: ::UINT = 1; -pub const D3D12_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT: ::UINT = 128; -pub const D3D12_COMMONSHADER_SAMPLER_REGISTER_COMPONENTS: ::UINT = 1; -pub const D3D12_COMMONSHADER_SAMPLER_REGISTER_COUNT: ::UINT = 16; -pub const D3D12_COMMONSHADER_SAMPLER_REGISTER_READS_PER_INST: ::UINT = 1; -pub const D3D12_COMMONSHADER_SAMPLER_REGISTER_READ_PORTS: ::UINT = 1; -pub const D3D12_COMMONSHADER_SAMPLER_SLOT_COUNT: ::UINT = 16; -pub const D3D12_COMMONSHADER_SUBROUTINE_NESTING_LIMIT: ::UINT = 32; -pub const D3D12_COMMONSHADER_TEMP_REGISTER_COMPONENTS: ::UINT = 4; -pub const D3D12_COMMONSHADER_TEMP_REGISTER_COMPONENT_BIT_COUNT: ::UINT = 32; -pub const D3D12_COMMONSHADER_TEMP_REGISTER_COUNT: ::UINT = 4096; -pub const D3D12_COMMONSHADER_TEMP_REGISTER_READS_PER_INST: ::UINT = 3; -pub const D3D12_COMMONSHADER_TEMP_REGISTER_READ_PORTS: ::UINT = 3; -pub const D3D12_COMMONSHADER_TEXCOORD_RANGE_REDUCTION_MAX: ::UINT = 10; -pub const D3D12_COMMONSHADER_TEXCOORD_RANGE_REDUCTION_MIN: ::INT = -10; -pub const D3D12_COMMONSHADER_TEXEL_OFFSET_MAX_NEGATIVE: ::INT = -8; -pub const D3D12_COMMONSHADER_TEXEL_OFFSET_MAX_POSITIVE: ::UINT = 7; -pub const D3D12_CONSTANT_BUFFER_DATA_PLACEMENT_ALIGNMENT: ::UINT = 256; -pub const D3D12_CS_4_X_BUCKET00_MAX_BYTES_TGSM_WRITABLE_PER_THREAD: ::UINT = 256; -pub const D3D12_CS_4_X_BUCKET00_MAX_NUM_THREADS_PER_GROUP: ::UINT = 64; -pub const D3D12_CS_4_X_BUCKET01_MAX_BYTES_TGSM_WRITABLE_PER_THREAD: ::UINT = 240; -pub const D3D12_CS_4_X_BUCKET01_MAX_NUM_THREADS_PER_GROUP: ::UINT = 68; -pub const D3D12_CS_4_X_BUCKET02_MAX_BYTES_TGSM_WRITABLE_PER_THREAD: ::UINT = 224; -pub const D3D12_CS_4_X_BUCKET02_MAX_NUM_THREADS_PER_GROUP: ::UINT = 72; -pub const D3D12_CS_4_X_BUCKET03_MAX_BYTES_TGSM_WRITABLE_PER_THREAD: ::UINT = 208; -pub const D3D12_CS_4_X_BUCKET03_MAX_NUM_THREADS_PER_GROUP: ::UINT = 76; -pub const D3D12_CS_4_X_BUCKET04_MAX_BYTES_TGSM_WRITABLE_PER_THREAD: ::UINT = 192; -pub const D3D12_CS_4_X_BUCKET04_MAX_NUM_THREADS_PER_GROUP: ::UINT = 84; -pub const D3D12_CS_4_X_BUCKET05_MAX_BYTES_TGSM_WRITABLE_PER_THREAD: ::UINT = 176; -pub const D3D12_CS_4_X_BUCKET05_MAX_NUM_THREADS_PER_GROUP: ::UINT = 92; -pub const D3D12_CS_4_X_BUCKET06_MAX_BYTES_TGSM_WRITABLE_PER_THREAD: ::UINT = 160; -pub const D3D12_CS_4_X_BUCKET06_MAX_NUM_THREADS_PER_GROUP: ::UINT = 100; -pub const D3D12_CS_4_X_BUCKET07_MAX_BYTES_TGSM_WRITABLE_PER_THREAD: ::UINT = 144; -pub const D3D12_CS_4_X_BUCKET07_MAX_NUM_THREADS_PER_GROUP: ::UINT = 112; -pub const D3D12_CS_4_X_BUCKET08_MAX_BYTES_TGSM_WRITABLE_PER_THREAD: ::UINT = 128; -pub const D3D12_CS_4_X_BUCKET08_MAX_NUM_THREADS_PER_GROUP: ::UINT = 128; -pub const D3D12_CS_4_X_BUCKET09_MAX_BYTES_TGSM_WRITABLE_PER_THREAD: ::UINT = 112; -pub const D3D12_CS_4_X_BUCKET09_MAX_NUM_THREADS_PER_GROUP: ::UINT = 144; -pub const D3D12_CS_4_X_BUCKET10_MAX_BYTES_TGSM_WRITABLE_PER_THREAD: ::UINT = 96; -pub const D3D12_CS_4_X_BUCKET10_MAX_NUM_THREADS_PER_GROUP: ::UINT = 168; -pub const D3D12_CS_4_X_BUCKET11_MAX_BYTES_TGSM_WRITABLE_PER_THREAD: ::UINT = 80; -pub const D3D12_CS_4_X_BUCKET11_MAX_NUM_THREADS_PER_GROUP: ::UINT = 204; -pub const D3D12_CS_4_X_BUCKET12_MAX_BYTES_TGSM_WRITABLE_PER_THREAD: ::UINT = 64; -pub const D3D12_CS_4_X_BUCKET12_MAX_NUM_THREADS_PER_GROUP: ::UINT = 256; -pub const D3D12_CS_4_X_BUCKET13_MAX_BYTES_TGSM_WRITABLE_PER_THREAD: ::UINT = 48; -pub const D3D12_CS_4_X_BUCKET13_MAX_NUM_THREADS_PER_GROUP: ::UINT = 340; -pub const D3D12_CS_4_X_BUCKET14_MAX_BYTES_TGSM_WRITABLE_PER_THREAD: ::UINT = 32; -pub const D3D12_CS_4_X_BUCKET14_MAX_NUM_THREADS_PER_GROUP: ::UINT = 512; -pub const D3D12_CS_4_X_BUCKET15_MAX_BYTES_TGSM_WRITABLE_PER_THREAD: ::UINT = 16; -pub const D3D12_CS_4_X_BUCKET15_MAX_NUM_THREADS_PER_GROUP: ::UINT = 768; -pub const D3D12_CS_4_X_DISPATCH_MAX_THREAD_GROUPS_IN_Z_DIMENSION: ::UINT = 1; -pub const D3D12_CS_4_X_RAW_UAV_BYTE_ALIGNMENT: ::UINT = 256; -pub const D3D12_CS_4_X_THREAD_GROUP_MAX_THREADS_PER_GROUP: ::UINT = 768; -pub const D3D12_CS_4_X_THREAD_GROUP_MAX_X: ::UINT = 768; -pub const D3D12_CS_4_X_THREAD_GROUP_MAX_Y: ::UINT = 768; -pub const D3D12_CS_4_X_UAV_REGISTER_COUNT: ::UINT = 1; -pub const D3D12_CS_DISPATCH_MAX_THREAD_GROUPS_PER_DIMENSION: ::UINT = 65535; -pub const D3D12_CS_TGSM_REGISTER_COUNT: ::UINT = 8192; -pub const D3D12_CS_TGSM_REGISTER_READS_PER_INST: ::UINT = 1; -pub const D3D12_CS_TGSM_RESOURCE_REGISTER_COMPONENTS: ::UINT = 1; -pub const D3D12_CS_TGSM_RESOURCE_REGISTER_READ_PORTS: ::UINT = 1; -pub const D3D12_CS_THREADGROUPID_REGISTER_COMPONENTS: ::UINT = 3; -pub const D3D12_CS_THREADGROUPID_REGISTER_COUNT: ::UINT = 1; -pub const D3D12_CS_THREADIDINGROUPFLATTENED_REGISTER_COMPONENTS: ::UINT = 1; -pub const D3D12_CS_THREADIDINGROUPFLATTENED_REGISTER_COUNT: ::UINT = 1; -pub const D3D12_CS_THREADIDINGROUP_REGISTER_COMPONENTS: ::UINT = 3; -pub const D3D12_CS_THREADIDINGROUP_REGISTER_COUNT: ::UINT = 1; -pub const D3D12_CS_THREADID_REGISTER_COMPONENTS: ::UINT = 3; -pub const D3D12_CS_THREADID_REGISTER_COUNT: ::UINT = 1; -pub const D3D12_CS_THREAD_GROUP_MAX_THREADS_PER_GROUP: ::UINT = 1024; -pub const D3D12_CS_THREAD_GROUP_MAX_X: ::UINT = 1024; -pub const D3D12_CS_THREAD_GROUP_MAX_Y: ::UINT = 1024; -pub const D3D12_CS_THREAD_GROUP_MAX_Z: ::UINT = 64; -pub const D3D12_CS_THREAD_GROUP_MIN_X: ::UINT = 1; -pub const D3D12_CS_THREAD_GROUP_MIN_Y: ::UINT = 1; -pub const D3D12_CS_THREAD_GROUP_MIN_Z: ::UINT = 1; -pub const D3D12_CS_THREAD_LOCAL_TEMP_REGISTER_POOL: ::UINT = 16384; -pub const D3D12_DEFAULT_BLEND_FACTOR_ALPHA: ::FLOAT = 1.0; -pub const D3D12_DEFAULT_BLEND_FACTOR_BLUE: ::FLOAT = 1.0; -pub const D3D12_DEFAULT_BLEND_FACTOR_GREEN: ::FLOAT = 1.0; -pub const D3D12_DEFAULT_BLEND_FACTOR_RED: ::FLOAT = 1.0; -pub const D3D12_DEFAULT_BORDER_COLOR_COMPONENT: ::FLOAT = 0.0; -pub const D3D12_DEFAULT_DEPTH_BIAS: ::UINT = 0; -pub const D3D12_DEFAULT_DEPTH_BIAS_CLAMP: ::FLOAT = 0.0; -pub const D3D12_DEFAULT_MAX_ANISOTROPY: ::UINT = 16; -pub const D3D12_DEFAULT_MIP_LOD_BIAS: ::FLOAT = 0.0; -pub const D3D12_DEFAULT_MSAA_RESOURCE_PLACEMENT_ALIGNMENT: ::UINT = 4194304; -pub const D3D12_DEFAULT_RENDER_TARGET_ARRAY_INDEX: ::UINT = 0; -pub const D3D12_DEFAULT_RESOURCE_PLACEMENT_ALIGNMENT: ::UINT = 65536; -pub const D3D12_DEFAULT_SAMPLE_MASK: ::UINT = 0xffffffff; -pub const D3D12_DEFAULT_SCISSOR_ENDX: ::UINT = 0; -pub const D3D12_DEFAULT_SCISSOR_ENDY: ::UINT = 0; -pub const D3D12_DEFAULT_SCISSOR_STARTX: ::UINT = 0; -pub const D3D12_DEFAULT_SCISSOR_STARTY: ::UINT = 0; -pub const D3D12_DEFAULT_SLOPE_SCALED_DEPTH_BIAS: ::FLOAT = 0.0; -pub const D3D12_DEFAULT_STENCIL_READ_MASK: ::UINT = 0xff; -pub const D3D12_DEFAULT_STENCIL_REFERENCE: ::UINT = 0; -pub const D3D12_DEFAULT_STENCIL_WRITE_MASK: ::UINT = 0xff; -pub const D3D12_DEFAULT_VIEWPORT_AND_SCISSORRECT_INDEX: ::UINT = 0; -pub const D3D12_DEFAULT_VIEWPORT_HEIGHT: ::UINT = 0; -pub const D3D12_DEFAULT_VIEWPORT_MAX_DEPTH: ::FLOAT = 0.0; -pub const D3D12_DEFAULT_VIEWPORT_MIN_DEPTH: ::FLOAT = 0.0; -pub const D3D12_DEFAULT_VIEWPORT_TOPLEFTX: ::UINT = 0; -pub const D3D12_DEFAULT_VIEWPORT_TOPLEFTY: ::UINT = 0; -pub const D3D12_DEFAULT_VIEWPORT_WIDTH: ::UINT = 0; -pub const D3D12_DESCRIPTOR_RANGE_OFFSET_APPEND: ::UINT = 0xffffffff; -pub const D3D12_DRIVER_RESERVED_REGISTER_SPACE_VALUES_END: ::UINT = 0xfffffff7; -pub const D3D12_DRIVER_RESERVED_REGISTER_SPACE_VALUES_START: ::UINT = 0xfffffff0; -pub const D3D12_DS_INPUT_CONTROL_POINTS_MAX_TOTAL_SCALARS: ::UINT = 3968; -pub const D3D12_DS_INPUT_CONTROL_POINT_REGISTER_COMPONENTS: ::UINT = 4; -pub const D3D12_DS_INPUT_CONTROL_POINT_REGISTER_COMPONENT_BIT_COUNT: ::UINT = 32; -pub const D3D12_DS_INPUT_CONTROL_POINT_REGISTER_COUNT: ::UINT = 32; -pub const D3D12_DS_INPUT_CONTROL_POINT_REGISTER_READS_PER_INST: ::UINT = 2; -pub const D3D12_DS_INPUT_CONTROL_POINT_REGISTER_READ_PORTS: ::UINT = 1; -pub const D3D12_DS_INPUT_DOMAIN_POINT_REGISTER_COMPONENTS: ::UINT = 3; -pub const D3D12_DS_INPUT_DOMAIN_POINT_REGISTER_COMPONENT_BIT_COUNT: ::UINT = 32; -pub const D3D12_DS_INPUT_DOMAIN_POINT_REGISTER_COUNT: ::UINT = 1; -pub const D3D12_DS_INPUT_DOMAIN_POINT_REGISTER_READS_PER_INST: ::UINT = 2; -pub const D3D12_DS_INPUT_DOMAIN_POINT_REGISTER_READ_PORTS: ::UINT = 1; -pub const D3D12_DS_INPUT_PATCH_CONSTANT_REGISTER_COMPONENTS: ::UINT = 4; -pub const D3D12_DS_INPUT_PATCH_CONSTANT_REGISTER_COMPONENT_BIT_COUNT: ::UINT = 32; -pub const D3D12_DS_INPUT_PATCH_CONSTANT_REGISTER_COUNT: ::UINT = 32; -pub const D3D12_DS_INPUT_PATCH_CONSTANT_REGISTER_READS_PER_INST: ::UINT = 2; -pub const D3D12_DS_INPUT_PATCH_CONSTANT_REGISTER_READ_PORTS: ::UINT = 1; -pub const D3D12_DS_INPUT_PRIMITIVE_ID_REGISTER_COMPONENTS: ::UINT = 1; -pub const D3D12_DS_INPUT_PRIMITIVE_ID_REGISTER_COMPONENT_BIT_COUNT: ::UINT = 32; -pub const D3D12_DS_INPUT_PRIMITIVE_ID_REGISTER_COUNT: ::UINT = 1; -pub const D3D12_DS_INPUT_PRIMITIVE_ID_REGISTER_READS_PER_INST: ::UINT = 2; -pub const D3D12_DS_INPUT_PRIMITIVE_ID_REGISTER_READ_PORTS: ::UINT = 1; -pub const D3D12_DS_OUTPUT_REGISTER_COMPONENTS: ::UINT = 4; -pub const D3D12_DS_OUTPUT_REGISTER_COMPONENT_BIT_COUNT: ::UINT = 32; -pub const D3D12_DS_OUTPUT_REGISTER_COUNT: ::UINT = 32; -pub const D3D12_FILTER_REDUCTION_TYPE_MASK: ::UINT = 0x3; -pub const D3D12_FILTER_REDUCTION_TYPE_SHIFT: ::UINT = 7; -pub const D3D12_FILTER_TYPE_MASK: ::UINT = 0x3; -pub const D3D12_FLOAT16_FUSED_TOLERANCE_IN_ULP: ::DOUBLE = 0.6; -pub const D3D12_FLOAT32_MAX: ::FLOAT = 3.402823466e+38; -pub const D3D12_FLOAT32_TO_INTEGER_TOLERANCE_IN_ULP: ::FLOAT = 0.6; -pub const D3D12_FLOAT_TO_SRGB_EXPONENT_DENOMINATOR: ::FLOAT = 2.4; -pub const D3D12_FLOAT_TO_SRGB_EXPONENT_NUMERATOR: ::FLOAT = 1.0; -pub const D3D12_FLOAT_TO_SRGB_OFFSET: ::FLOAT = 0.055; -pub const D3D12_FLOAT_TO_SRGB_SCALE_1: ::FLOAT = 12.92; -pub const D3D12_FLOAT_TO_SRGB_SCALE_2: ::FLOAT = 1.055; -pub const D3D12_FLOAT_TO_SRGB_THRESHOLD: ::FLOAT = 0.0031308; -pub const D3D12_FTOI_INSTRUCTION_MAX_INPUT: ::FLOAT = 2147483647.999; -pub const D3D12_FTOI_INSTRUCTION_MIN_INPUT: ::FLOAT = -2147483648.999; -pub const D3D12_FTOU_INSTRUCTION_MAX_INPUT: ::FLOAT = 4294967295.999; -pub const D3D12_FTOU_INSTRUCTION_MIN_INPUT: ::FLOAT = 0.0; -pub const D3D12_GS_INPUT_INSTANCE_ID_READS_PER_INST: ::UINT = 2; -pub const D3D12_GS_INPUT_INSTANCE_ID_READ_PORTS: ::UINT = 1; -pub const D3D12_GS_INPUT_INSTANCE_ID_REGISTER_COMPONENTS: ::UINT = 1; -pub const D3D12_GS_INPUT_INSTANCE_ID_REGISTER_COMPONENT_BIT_COUNT: ::UINT = 32; -pub const D3D12_GS_INPUT_INSTANCE_ID_REGISTER_COUNT: ::UINT = 1; -pub const D3D12_GS_INPUT_PRIM_CONST_REGISTER_COMPONENTS: ::UINT = 1; -pub const D3D12_GS_INPUT_PRIM_CONST_REGISTER_COMPONENT_BIT_COUNT: ::UINT = 32; -pub const D3D12_GS_INPUT_PRIM_CONST_REGISTER_COUNT: ::UINT = 1; -pub const D3D12_GS_INPUT_PRIM_CONST_REGISTER_READS_PER_INST: ::UINT = 2; -pub const D3D12_GS_INPUT_PRIM_CONST_REGISTER_READ_PORTS: ::UINT = 1; -pub const D3D12_GS_INPUT_REGISTER_COMPONENTS: ::UINT = 4; -pub const D3D12_GS_INPUT_REGISTER_COMPONENT_BIT_COUNT: ::UINT = 32; -pub const D3D12_GS_INPUT_REGISTER_COUNT: ::UINT = 32; -pub const D3D12_GS_INPUT_REGISTER_READS_PER_INST: ::UINT = 2; -pub const D3D12_GS_INPUT_REGISTER_READ_PORTS: ::UINT = 1; -pub const D3D12_GS_INPUT_REGISTER_VERTICES: ::UINT = 32; -pub const D3D12_GS_MAX_INSTANCE_COUNT: ::UINT = 32; -pub const D3D12_GS_MAX_OUTPUT_VERTEX_COUNT_ACROSS_INSTANCES: ::UINT = 1024; -pub const D3D12_GS_OUTPUT_ELEMENTS: ::UINT = 32; -pub const D3D12_GS_OUTPUT_REGISTER_COMPONENTS: ::UINT = 4; -pub const D3D12_GS_OUTPUT_REGISTER_COMPONENT_BIT_COUNT: ::UINT = 32; -pub const D3D12_GS_OUTPUT_REGISTER_COUNT: ::UINT = 32; -pub const D3D12_HS_CONTROL_POINT_PHASE_INPUT_REGISTER_COUNT: ::UINT = 32; -pub const D3D12_HS_CONTROL_POINT_PHASE_OUTPUT_REGISTER_COUNT: ::UINT = 32; -pub const D3D12_HS_CONTROL_POINT_REGISTER_COMPONENTS: ::UINT = 4; -pub const D3D12_HS_CONTROL_POINT_REGISTER_COMPONENT_BIT_COUNT: ::UINT = 32; -pub const D3D12_HS_CONTROL_POINT_REGISTER_READS_PER_INST: ::UINT = 2; -pub const D3D12_HS_CONTROL_POINT_REGISTER_READ_PORTS: ::UINT = 1; -pub const D3D12_HS_FORK_PHASE_INSTANCE_COUNT_UPPER_BOUND: ::UINT = 0xffffffff; -pub const D3D12_HS_INPUT_FORK_INSTANCE_ID_REGISTER_COMPONENTS: ::UINT = 1; -pub const D3D12_HS_INPUT_FORK_INSTANCE_ID_REGISTER_COMPONENT_BIT_COUNT: ::UINT = 32; -pub const D3D12_HS_INPUT_FORK_INSTANCE_ID_REGISTER_COUNT: ::UINT = 1; -pub const D3D12_HS_INPUT_FORK_INSTANCE_ID_REGISTER_READS_PER_INST: ::UINT = 2; -pub const D3D12_HS_INPUT_FORK_INSTANCE_ID_REGISTER_READ_PORTS: ::UINT = 1; -pub const D3D12_HS_INPUT_JOIN_INSTANCE_ID_REGISTER_COMPONENTS: ::UINT = 1; -pub const D3D12_HS_INPUT_JOIN_INSTANCE_ID_REGISTER_COMPONENT_BIT_COUNT: ::UINT = 32; -pub const D3D12_HS_INPUT_JOIN_INSTANCE_ID_REGISTER_COUNT: ::UINT = 1; -pub const D3D12_HS_INPUT_JOIN_INSTANCE_ID_REGISTER_READS_PER_INST: ::UINT = 2; -pub const D3D12_HS_INPUT_JOIN_INSTANCE_ID_REGISTER_READ_PORTS: ::UINT = 1; -pub const D3D12_HS_INPUT_PRIMITIVE_ID_REGISTER_COMPONENTS: ::UINT = 1; -pub const D3D12_HS_INPUT_PRIMITIVE_ID_REGISTER_COMPONENT_BIT_COUNT: ::UINT = 32; -pub const D3D12_HS_INPUT_PRIMITIVE_ID_REGISTER_COUNT: ::UINT = 1; -pub const D3D12_HS_INPUT_PRIMITIVE_ID_REGISTER_READS_PER_INST: ::UINT = 2; -pub const D3D12_HS_INPUT_PRIMITIVE_ID_REGISTER_READ_PORTS: ::UINT = 1; -pub const D3D12_HS_JOIN_PHASE_INSTANCE_COUNT_UPPER_BOUND: ::UINT = 0xffffffff; -pub const D3D12_HS_MAXTESSFACTOR_LOWER_BOUND: ::FLOAT = 1.0; -pub const D3D12_HS_MAXTESSFACTOR_UPPER_BOUND: ::FLOAT = 64.0; -pub const D3D12_HS_OUTPUT_CONTROL_POINTS_MAX_TOTAL_SCALARS: ::UINT = 3968; -pub const D3D12_HS_OUTPUT_CONTROL_POINT_ID_REGISTER_COMPONENTS: ::UINT = 1; -pub const D3D12_HS_OUTPUT_CONTROL_POINT_ID_REGISTER_COMPONENT_BIT_COUNT: ::UINT = 32; -pub const D3D12_HS_OUTPUT_CONTROL_POINT_ID_REGISTER_COUNT: ::UINT = 1; -pub const D3D12_HS_OUTPUT_CONTROL_POINT_ID_REGISTER_READS_PER_INST: ::UINT = 2; -pub const D3D12_HS_OUTPUT_CONTROL_POINT_ID_REGISTER_READ_PORTS: ::UINT = 1; -pub const D3D12_HS_OUTPUT_PATCH_CONSTANT_REGISTER_COMPONENTS: ::UINT = 4; -pub const D3D12_HS_OUTPUT_PATCH_CONSTANT_REGISTER_COMPONENT_BIT_COUNT: ::UINT = 32; -pub const D3D12_HS_OUTPUT_PATCH_CONSTANT_REGISTER_COUNT: ::UINT = 32; -pub const D3D12_HS_OUTPUT_PATCH_CONSTANT_REGISTER_READS_PER_INST: ::UINT = 2; -pub const D3D12_HS_OUTPUT_PATCH_CONSTANT_REGISTER_READ_PORTS: ::UINT = 1; -pub const D3D12_HS_OUTPUT_PATCH_CONSTANT_REGISTER_SCALAR_COMPONENTS: ::UINT = 128; -pub const D3D12_IA_DEFAULT_INDEX_BUFFER_OFFSET_IN_BYTES: ::UINT = 0; -pub const D3D12_IA_DEFAULT_PRIMITIVE_TOPOLOGY: ::UINT = 0; -pub const D3D12_IA_DEFAULT_VERTEX_BUFFER_OFFSET_IN_BYTES: ::UINT = 0; -pub const D3D12_IA_INDEX_INPUT_RESOURCE_SLOT_COUNT: ::UINT = 1; -pub const D3D12_IA_INSTANCE_ID_BIT_COUNT: ::UINT = 32; -pub const D3D12_IA_INTEGER_ARITHMETIC_BIT_COUNT: ::UINT = 32; -pub const D3D12_IA_PATCH_MAX_CONTROL_POINT_COUNT: ::UINT = 32; -pub const D3D12_IA_PRIMITIVE_ID_BIT_COUNT: ::UINT = 32; -pub const D3D12_IA_VERTEX_ID_BIT_COUNT: ::UINT = 32; -pub const D3D12_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT: ::UINT = 32; -pub const D3D12_IA_VERTEX_INPUT_STRUCTURE_ELEMENTS_COMPONENTS: ::UINT = 128; -pub const D3D12_IA_VERTEX_INPUT_STRUCTURE_ELEMENT_COUNT: ::UINT = 32; -pub const D3D12_INTEGER_DIVIDE_BY_ZERO_QUOTIENT: ::UINT = 0xffffffff; -pub const D3D12_INTEGER_DIVIDE_BY_ZERO_REMAINDER: ::UINT = 0xffffffff; -pub const D3D12_KEEP_RENDER_TARGETS_AND_DEPTH_STENCIL: ::UINT = 0xffffffff; -pub const D3D12_KEEP_UNORDERED_ACCESS_VIEWS: ::UINT = 0xffffffff; -pub const D3D12_LINEAR_GAMMA: ::FLOAT = 1.0; -pub const D3D12_MAG_FILTER_SHIFT: ::UINT = 2; -pub const D3D12_MAJOR_VERSION: ::UINT = 12; -pub const D3D12_MAX_BORDER_COLOR_COMPONENT: ::FLOAT = 1.0; -pub const D3D12_MAX_DEPTH: ::FLOAT = 1.0; -pub const D3D12_MAX_LIVE_STATIC_SAMPLERS: ::UINT = 2032; -pub const D3D12_MAX_MAXANISOTROPY: ::UINT = 16; -pub const D3D12_MAX_MULTISAMPLE_SAMPLE_COUNT: ::UINT = 32; -pub const D3D12_MAX_POSITION_VALUE: ::FLOAT = 3.402823466e+34; -pub const D3D12_MAX_ROOT_COST: ::UINT = 64; -pub const D3D12_MAX_SHADER_VISIBLE_DESCRIPTOR_HEAP_SIZE_TIER_1: ::UINT = 1000000; -pub const D3D12_MAX_SHADER_VISIBLE_DESCRIPTOR_HEAP_SIZE_TIER_2: ::UINT = 1000000; -pub const D3D12_MAX_SHADER_VISIBLE_SAMPLER_HEAP_SIZE: ::UINT = 2048; -pub const D3D12_MAX_TEXTURE_DIMENSION_2_TO_EXP: ::UINT = 17; -pub const D3D12_MINOR_VERSION: ::UINT = 0; -pub const D3D12_MIN_BORDER_COLOR_COMPONENT: ::FLOAT = 0.0; -pub const D3D12_MIN_DEPTH: ::FLOAT = 0.0; -pub const D3D12_MIN_FILTER_SHIFT: ::UINT = 4; -pub const D3D12_MIN_MAXANISOTROPY: ::UINT = 0; -pub const D3D12_MIP_FILTER_SHIFT: ::UINT = 0; -pub const D3D12_MIP_LOD_BIAS_MAX: ::FLOAT = 15.99; -pub const D3D12_MIP_LOD_BIAS_MIN: ::FLOAT = -16.0; -pub const D3D12_MIP_LOD_FRACTIONAL_BIT_COUNT: ::UINT = 8; -pub const D3D12_MIP_LOD_RANGE_BIT_COUNT: ::UINT = 8; -pub const D3D12_MULTISAMPLE_ANTIALIAS_LINE_WIDTH: ::FLOAT = 1.4; -pub const D3D12_NONSAMPLE_FETCH_OUT_OF_RANGE_ACCESS_RESULT: ::UINT = 0; -pub const D3D12_OS_RESERVED_REGISTER_SPACE_VALUES_END: ::UINT = 0xffffffff; -pub const D3D12_OS_RESERVED_REGISTER_SPACE_VALUES_START: ::UINT = 0xfffffff8; -pub const D3D12_PACKED_TILE: ::UINT = 0xffffffff; -pub const D3D12_PIXEL_ADDRESS_RANGE_BIT_COUNT: ::UINT = 15; -pub const D3D12_PRE_SCISSOR_PIXEL_ADDRESS_RANGE_BIT_COUNT: ::UINT = 16; -pub const D3D12_PS_CS_UAV_REGISTER_COMPONENTS: ::UINT = 1; -pub const D3D12_PS_CS_UAV_REGISTER_COUNT: ::UINT = 8; -pub const D3D12_PS_CS_UAV_REGISTER_READS_PER_INST: ::UINT = 1; -pub const D3D12_PS_CS_UAV_REGISTER_READ_PORTS: ::UINT = 1; -pub const D3D12_PS_FRONTFACING_DEFAULT_VALUE: ::UINT = 0xffffffff; -pub const D3D12_PS_FRONTFACING_FALSE_VALUE: ::UINT = 0; -pub const D3D12_PS_FRONTFACING_TRUE_VALUE: ::UINT = 0xffffffff; -pub const D3D12_PS_INPUT_REGISTER_COMPONENTS: ::UINT = 4; -pub const D3D12_PS_INPUT_REGISTER_COMPONENT_BIT_COUNT: ::UINT = 32; -pub const D3D12_PS_INPUT_REGISTER_COUNT: ::UINT = 32; -pub const D3D12_PS_INPUT_REGISTER_READS_PER_INST: ::UINT = 2; -pub const D3D12_PS_INPUT_REGISTER_READ_PORTS: ::UINT = 1; -pub const D3D12_PS_LEGACY_PIXEL_CENTER_FRACTIONAL_COMPONENT: ::FLOAT = 0.0; -pub const D3D12_PS_OUTPUT_DEPTH_REGISTER_COMPONENTS: ::UINT = 1; -pub const D3D12_PS_OUTPUT_DEPTH_REGISTER_COMPONENT_BIT_COUNT: ::UINT = 32; -pub const D3D12_PS_OUTPUT_DEPTH_REGISTER_COUNT: ::UINT = 1; -pub const D3D12_PS_OUTPUT_MASK_REGISTER_COMPONENTS: ::UINT = 1; -pub const D3D12_PS_OUTPUT_MASK_REGISTER_COMPONENT_BIT_COUNT: ::UINT = 32; -pub const D3D12_PS_OUTPUT_MASK_REGISTER_COUNT: ::UINT = 1; -pub const D3D12_PS_OUTPUT_REGISTER_COMPONENTS: ::UINT = 4; -pub const D3D12_PS_OUTPUT_REGISTER_COMPONENT_BIT_COUNT: ::UINT = 32; -pub const D3D12_PS_OUTPUT_REGISTER_COUNT: ::UINT = 8; -pub const D3D12_PS_PIXEL_CENTER_FRACTIONAL_COMPONENT: ::FLOAT = 0.5; -pub const D3D12_RAW_UAV_SRV_BYTE_ALIGNMENT: ::UINT = 16; -pub const D3D12_REQ_BLEND_OBJECT_COUNT_PER_DEVICE: ::UINT = 4096; -pub const D3D12_REQ_BUFFER_RESOURCE_TEXEL_COUNT_2_TO_EXP: ::UINT = 27; -pub const D3D12_REQ_CONSTANT_BUFFER_ELEMENT_COUNT: ::UINT = 4096; -pub const D3D12_REQ_DEPTH_STENCIL_OBJECT_COUNT_PER_DEVICE: ::UINT = 4096; -pub const D3D12_REQ_DRAWINDEXED_INDEX_COUNT_2_TO_EXP: ::UINT = 32; -pub const D3D12_REQ_DRAW_VERTEX_COUNT_2_TO_EXP: ::UINT = 32; -pub const D3D12_REQ_FILTERING_HW_ADDRESSABLE_RESOURCE_DIMENSION: ::UINT = 16384; -pub const D3D12_REQ_GS_INVOCATION_32BIT_OUTPUT_COMPONENT_LIMIT: ::UINT = 1024; -pub const D3D12_REQ_IMMEDIATE_CONSTANT_BUFFER_ELEMENT_COUNT: ::UINT = 4096; -pub const D3D12_REQ_MAXANISOTROPY: ::UINT = 16; -pub const D3D12_REQ_MIP_LEVELS: ::UINT = 15; -pub const D3D12_REQ_MULTI_ELEMENT_STRUCTURE_SIZE_IN_BYTES: ::UINT = 2048; -pub const D3D12_REQ_RASTERIZER_OBJECT_COUNT_PER_DEVICE: ::UINT = 4096; -pub const D3D12_REQ_RENDER_TO_BUFFER_WINDOW_WIDTH: ::UINT = 16384; -pub const D3D12_REQ_RESOURCE_SIZE_IN_MEGABYTES_EXPRESSION_A_TERM: ::UINT = 128; -pub const D3D12_REQ_RESOURCE_SIZE_IN_MEGABYTES_EXPRESSION_B_TERM: ::FLOAT = 0.25; -pub const D3D12_REQ_RESOURCE_SIZE_IN_MEGABYTES_EXPRESSION_C_TERM: ::UINT = 2048; -pub const D3D12_REQ_RESOURCE_VIEW_COUNT_PER_DEVICE_2_TO_EXP: ::UINT = 20; -pub const D3D12_REQ_SAMPLER_OBJECT_COUNT_PER_DEVICE: ::UINT = 4096; -pub const D3D12_REQ_SUBRESOURCES: ::UINT = 30720; -pub const D3D12_REQ_TEXTURE1D_ARRAY_AXIS_DIMENSION: ::UINT = 2048; -pub const D3D12_REQ_TEXTURE1D_U_DIMENSION: ::UINT = 16384; -pub const D3D12_REQ_TEXTURE2D_ARRAY_AXIS_DIMENSION: ::UINT = 2048; -pub const D3D12_REQ_TEXTURE2D_U_OR_V_DIMENSION: ::UINT = 16384; -pub const D3D12_REQ_TEXTURE3D_U_V_OR_W_DIMENSION: ::UINT = 2048; -pub const D3D12_REQ_TEXTURECUBE_DIMENSION: ::UINT = 16384; -pub const D3D12_RESINFO_INSTRUCTION_MISSING_COMPONENT_RETVAL: ::UINT = 0; -pub const D3D12_RESOURCE_BARRIER_ALL_SUBRESOURCES: ::UINT = 0xffffffff; -pub const D3D12_SHADER_COMPONENT_MAPPING_MASK: ::UINT = 0x7; -pub const D3D12_SHADER_COMPONENT_MAPPING_SHIFT: ::UINT = 3; -pub const D3D12_SHADER_MAJOR_VERSION: ::UINT = 5; -pub const D3D12_SHADER_MAX_INSTANCES: ::UINT = 65535; -pub const D3D12_SHADER_MAX_INTERFACES: ::UINT = 253; -pub const D3D12_SHADER_MAX_INTERFACE_CALL_SITES: ::UINT = 4096; -pub const D3D12_SHADER_MAX_TYPES: ::UINT = 65535; -pub const D3D12_SHADER_MINOR_VERSION: ::UINT = 1; -pub const D3D12_SHIFT_INSTRUCTION_PAD_VALUE: ::UINT = 0; -pub const D3D12_SHIFT_INSTRUCTION_SHIFT_VALUE_BIT_COUNT: ::UINT = 5; -pub const D3D12_SIMULTANEOUS_RENDER_TARGET_COUNT: ::UINT = 8; -pub const D3D12_SMALL_MSAA_RESOURCE_PLACEMENT_ALIGNMENT: ::UINT = 65536; -pub const D3D12_SMALL_RESOURCE_PLACEMENT_ALIGNMENT: ::UINT = 4096; -pub const D3D12_SO_BUFFER_MAX_STRIDE_IN_BYTES: ::UINT = 2048; -pub const D3D12_SO_BUFFER_MAX_WRITE_WINDOW_IN_BYTES: ::UINT = 512; -pub const D3D12_SO_BUFFER_SLOT_COUNT: ::UINT = 4; -pub const D3D12_SO_DDI_REGISTER_INDEX_DENOTING_GAP: ::UINT = 0xffffffff; -pub const D3D12_SO_NO_RASTERIZED_STREAM: ::UINT = 0xffffffff; -pub const D3D12_SO_OUTPUT_COMPONENT_COUNT: ::UINT = 128; -pub const D3D12_SO_STREAM_COUNT: ::UINT = 4; -pub const D3D12_SPEC_DATE_DAY: ::UINT = 14; -pub const D3D12_SPEC_DATE_MONTH: ::UINT = 11; -pub const D3D12_SPEC_DATE_YEAR: ::UINT = 2014; -pub const D3D12_SPEC_VERSION: ::DOUBLE = 1.16; -pub const D3D12_SRGB_GAMMA: ::FLOAT = 2.2; -pub const D3D12_SRGB_TO_FLOAT_DENOMINATOR_1: ::FLOAT = 12.92; -pub const D3D12_SRGB_TO_FLOAT_DENOMINATOR_2: ::FLOAT = 1.055; -pub const D3D12_SRGB_TO_FLOAT_EXPONENT: ::FLOAT = 2.4; -pub const D3D12_SRGB_TO_FLOAT_OFFSET: ::FLOAT = 0.055; -pub const D3D12_SRGB_TO_FLOAT_THRESHOLD: ::FLOAT = 0.04045; -pub const D3D12_SRGB_TO_FLOAT_TOLERANCE_IN_ULP: ::FLOAT = 0.5; -pub const D3D12_STANDARD_COMPONENT_BIT_COUNT: ::UINT = 32; -pub const D3D12_STANDARD_COMPONENT_BIT_COUNT_DOUBLED: ::UINT = 64; -pub const D3D12_STANDARD_MAXIMUM_ELEMENT_ALIGNMENT_BYTE_MULTIPLE: ::UINT = 4; -pub const D3D12_STANDARD_PIXEL_COMPONENT_COUNT: ::UINT = 128; -pub const D3D12_STANDARD_PIXEL_ELEMENT_COUNT: ::UINT = 32; -pub const D3D12_STANDARD_VECTOR_SIZE: ::UINT = 4; -pub const D3D12_STANDARD_VERTEX_ELEMENT_COUNT: ::UINT = 32; -pub const D3D12_STANDARD_VERTEX_TOTAL_COMPONENT_COUNT: ::UINT = 64; -pub const D3D12_SUBPIXEL_FRACTIONAL_BIT_COUNT: ::UINT = 8; -pub const D3D12_SUBTEXEL_FRACTIONAL_BIT_COUNT: ::UINT = 8; -pub const D3D12_SYSTEM_RESERVED_REGISTER_SPACE_VALUES_END: ::UINT = 0xffffffff; -pub const D3D12_SYSTEM_RESERVED_REGISTER_SPACE_VALUES_START: ::UINT = 0xfffffff0; -pub const D3D12_TESSELLATOR_MAX_EVEN_TESSELLATION_FACTOR: ::UINT = 64; -pub const D3D12_TESSELLATOR_MAX_ISOLINE_DENSITY_TESSELLATION_FACTOR: ::UINT = 64; -pub const D3D12_TESSELLATOR_MAX_ODD_TESSELLATION_FACTOR: ::UINT = 63; -pub const D3D12_TESSELLATOR_MAX_TESSELLATION_FACTOR: ::UINT = 64; -pub const D3D12_TESSELLATOR_MIN_EVEN_TESSELLATION_FACTOR: ::UINT = 2; -pub const D3D12_TESSELLATOR_MIN_ISOLINE_DENSITY_TESSELLATION_FACTOR: ::UINT = 1; -pub const D3D12_TESSELLATOR_MIN_ODD_TESSELLATION_FACTOR: ::UINT = 1; -pub const D3D12_TEXEL_ADDRESS_RANGE_BIT_COUNT: ::UINT = 16; -pub const D3D12_TEXTURE_DATA_PITCH_ALIGNMENT: ::UINT = 256; -pub const D3D12_TEXTURE_DATA_PLACEMENT_ALIGNMENT: ::UINT = 512; -pub const D3D12_TILED_RESOURCE_TILE_SIZE_IN_BYTES: ::UINT = 65536; -pub const D3D12_UAV_COUNTER_PLACEMENT_ALIGNMENT: ::UINT = 4096; -pub const D3D12_UAV_SLOT_COUNT: ::UINT = 64; -pub const D3D12_UNBOUND_MEMORY_ACCESS_RESULT: ::UINT = 0; -pub const D3D12_VIEWPORT_AND_SCISSORRECT_MAX_INDEX: ::UINT = 15; -pub const D3D12_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE: ::UINT = 16; -pub const D3D12_VIEWPORT_BOUNDS_MAX: ::UINT = 32767; -pub const D3D12_VIEWPORT_BOUNDS_MIN: ::INT = -32768; -pub const D3D12_VS_INPUT_REGISTER_COMPONENTS: ::UINT = 4; -pub const D3D12_VS_INPUT_REGISTER_COMPONENT_BIT_COUNT: ::UINT = 32; -pub const D3D12_VS_INPUT_REGISTER_COUNT: ::UINT = 32; -pub const D3D12_VS_INPUT_REGISTER_READS_PER_INST: ::UINT = 2; -pub const D3D12_VS_INPUT_REGISTER_READ_PORTS: ::UINT = 1; -pub const D3D12_VS_OUTPUT_REGISTER_COMPONENTS: ::UINT = 4; -pub const D3D12_VS_OUTPUT_REGISTER_COMPONENT_BIT_COUNT: ::UINT = 32; -pub const D3D12_VS_OUTPUT_REGISTER_COUNT: ::UINT = 32; -pub const D3D12_WHQL_CONTEXT_COUNT_FOR_RESOURCE_LIMIT: ::UINT = 10; -pub const D3D12_WHQL_DRAWINDEXED_INDEX_COUNT_2_TO_EXP: ::UINT = 25; -pub const D3D12_WHQL_DRAW_VERTEX_COUNT_2_TO_EXP: ::UINT = 25; -pub type D3D12_GPU_VIRTUAL_ADDRESS = ::UINT64; -ENUM!{enum D3D12_COMMAND_LIST_TYPE { - D3D12_COMMAND_LIST_TYPE_DIRECT = 0, - D3D12_COMMAND_LIST_TYPE_BUNDLE = 1, - D3D12_COMMAND_LIST_TYPE_COMPUTE = 2, - D3D12_COMMAND_LIST_TYPE_COPY = 3, -}} -FLAGS!{enum D3D12_COMMAND_QUEUE_FLAGS { - D3D12_COMMAND_QUEUE_FLAG_NONE = 0x0, - D3D12_COMMAND_QUEUE_FLAG_DISABLE_GPU_TIMEOUT = 0x1, -}} -ENUM!{enum D3D12_COMMAND_QUEUE_PRIORITY { - D3D12_COMMAND_QUEUE_PRIORITY_NORMAL = 0, - D3D12_COMMAND_QUEUE_PRIORITY_HIGH = 100, -}} -STRUCT!{struct D3D12_COMMAND_QUEUE_DESC { - Type: D3D12_COMMAND_LIST_TYPE, - Priority: ::INT, - Flags: D3D12_COMMAND_QUEUE_FLAGS, - NodeMask: ::UINT, -}} -ENUM!{enum D3D12_PRIMITIVE_TOPOLOGY_TYPE { - D3D12_PRIMITIVE_TOPOLOGY_TYPE_UNDEFINED = 0, - D3D12_PRIMITIVE_TOPOLOGY_TYPE_POINT = 1, - D3D12_PRIMITIVE_TOPOLOGY_TYPE_LINE = 2, - D3D12_PRIMITIVE_TOPOLOGY_TYPE_TRIANGLE = 3, - D3D12_PRIMITIVE_TOPOLOGY_TYPE_PATCH = 4, -}} -ENUM!{enum D3D12_INPUT_CLASSIFICATION { - D3D12_INPUT_CLASSIFICATION_PER_VERTEX_DATA = 0, - D3D12_INPUT_CLASSIFICATION_PER_INSTANCE_DATA = 1, -}} -STRUCT!{struct D3D12_INPUT_ELEMENT_DESC { - SemanticName: ::LPCSTR, - SemanticIndex: ::UINT, - Format: ::DXGI_FORMAT, - InputSlot: ::UINT, - AlignedByteOffset: ::UINT, - InputSlotClass: D3D12_INPUT_CLASSIFICATION, - InstanceDataStepRate: ::UINT, -}} -ENUM!{enum D3D12_FILL_MODE { - D3D12_FILL_MODE_WIREFRAME = 2, - D3D12_FILL_MODE_SOLID = 3, -}} -pub type D3D12_PRIMITIVE_TOPOLOGY = ::D3D_PRIMITIVE_TOPOLOGY; -pub type D3D12_PRIMITIVE = ::D3D_PRIMITIVE; -ENUM!{enum D3D12_CULL_MODE { - D3D12_CULL_MODE_NONE = 1, - D3D12_CULL_MODE_FRONT = 2, - D3D12_CULL_MODE_BACK = 3, -}} -STRUCT!{struct D3D12_SO_DECLARATION_ENTRY { - Stream: ::UINT, - SemanticName: ::LPCSTR, - SemanticIndex: ::UINT, - StartComponent: ::BYTE, - ComponentCount: ::BYTE, - OutputSlot: ::BYTE, -}} -STRUCT!{struct D3D12_VIEWPORT { - TopLeftX: ::FLOAT, - TopLeftY: ::FLOAT, - Width: ::FLOAT, - Height: ::FLOAT, - MinDepth: ::FLOAT, - MaxDepth: ::FLOAT, -}} -pub type D3D12_RECT = ::RECT; -STRUCT!{struct D3D12_BOX { - left: ::UINT, - top: ::UINT, - front: ::UINT, - right: ::UINT, - bottom: ::UINT, - back: ::UINT, -}} -ENUM!{enum D3D12_COMPARISON_FUNC { - D3D12_COMPARISON_FUNC_NEVER = 1, - D3D12_COMPARISON_FUNC_LESS = 2, - D3D12_COMPARISON_FUNC_EQUAL = 3, - D3D12_COMPARISON_FUNC_LESS_EQUAL = 4, - D3D12_COMPARISON_FUNC_GREATER = 5, - D3D12_COMPARISON_FUNC_NOT_EQUAL = 6, - D3D12_COMPARISON_FUNC_GREATER_EQUAL = 7, - D3D12_COMPARISON_FUNC_ALWAYS = 8, -}} -ENUM!{enum D3D12_DEPTH_WRITE_MASK { - D3D12_DEPTH_WRITE_MASK_ZERO = 0, - D3D12_DEPTH_WRITE_MASK_ALL = 1, -}} -ENUM!{enum D3D12_STENCIL_OP { - D3D12_STENCIL_OP_KEEP = 1, - D3D12_STENCIL_OP_ZERO = 2, - D3D12_STENCIL_OP_REPLACE = 3, - D3D12_STENCIL_OP_INCR_SAT = 4, - D3D12_STENCIL_OP_DECR_SAT = 5, - D3D12_STENCIL_OP_INVERT = 6, - D3D12_STENCIL_OP_INCR = 7, - D3D12_STENCIL_OP_DECR = 8, -}} -STRUCT!{struct D3D12_DEPTH_STENCILOP_DESC { - StencilFailOp: D3D12_STENCIL_OP, - StencilDepthFailOp: D3D12_STENCIL_OP, - StencilPassOp: D3D12_STENCIL_OP, - StencilFunc: D3D12_COMPARISON_FUNC, -}} -STRUCT!{struct D3D12_DEPTH_STENCIL_DESC { - DepthEnable: ::BOOL, - DepthWriteMask: D3D12_DEPTH_WRITE_MASK, - DepthFunc: D3D12_COMPARISON_FUNC, - StencilEnable: ::BOOL, - StencilReadMask: ::UINT8, - StencilWriteMask: ::UINT8, - FrontFace: D3D12_DEPTH_STENCILOP_DESC, - BackFace: D3D12_DEPTH_STENCILOP_DESC, -}} -ENUM!{enum D3D12_BLEND { - D3D12_BLEND_ZERO = 1, - D3D12_BLEND_ONE = 2, - D3D12_BLEND_SRC_COLOR = 3, - D3D12_BLEND_INV_SRC_COLOR = 4, - D3D12_BLEND_SRC_ALPHA = 5, - D3D12_BLEND_INV_SRC_ALPHA = 6, - D3D12_BLEND_DEST_ALPHA = 7, - D3D12_BLEND_INV_DEST_ALPHA = 8, - D3D12_BLEND_DEST_COLOR = 9, - D3D12_BLEND_INV_DEST_COLOR = 10, - D3D12_BLEND_SRC_ALPHA_SAT = 11, - D3D12_BLEND_BLEND_FACTOR = 14, - D3D12_BLEND_INV_BLEND_FACTOR = 15, - D3D12_BLEND_SRC1_COLOR = 16, - D3D12_BLEND_INV_SRC1_COLOR = 17, - D3D12_BLEND_SRC1_ALPHA = 18, - D3D12_BLEND_INV_SRC1_ALPHA = 19, -}} -ENUM!{enum D3D12_BLEND_OP { - D3D12_BLEND_OP_ADD = 1, - D3D12_BLEND_OP_SUBTRACT = 2, - D3D12_BLEND_OP_REV_SUBTRACT = 3, - D3D12_BLEND_OP_MIN = 4, - D3D12_BLEND_OP_MAX = 5, -}} -FLAGS!{enum D3D12_COLOR_WRITE_ENABLE { - D3D12_COLOR_WRITE_ENABLE_RED = 0x1, - D3D12_COLOR_WRITE_ENABLE_GREEN = 0x2, - D3D12_COLOR_WRITE_ENABLE_BLUE = 0x4, - D3D12_COLOR_WRITE_ENABLE_ALPHA = 0x8, - D3D12_COLOR_WRITE_ENABLE_ALL = 0xF, -}} -ENUM!{enum D3D12_LOGIC_OP { - D3D12_LOGIC_OP_CLEAR = 0, - D3D12_LOGIC_OP_SET = 1, - D3D12_LOGIC_OP_COPY = 2, - D3D12_LOGIC_OP_COPY_INVERTED = 3, - D3D12_LOGIC_OP_NOOP = 4, - D3D12_LOGIC_OP_INVERT = 5, - D3D12_LOGIC_OP_AND = 6, - D3D12_LOGIC_OP_NAND = 7, - D3D12_LOGIC_OP_OR = 8, - D3D12_LOGIC_OP_NOR = 9, - D3D12_LOGIC_OP_XOR = 10, - D3D12_LOGIC_OP_EQUIV = 11, - D3D12_LOGIC_OP_AND_REVERSE = 12, - D3D12_LOGIC_OP_AND_INVERTED = 13, - D3D12_LOGIC_OP_OR_REVERSE = 14, - D3D12_LOGIC_OP_OR_INVERTED = 15, -}} -STRUCT!{struct D3D12_RENDER_TARGET_BLEND_DESC { - BlendEnable: ::BOOL, - LogicOpEnable: ::BOOL, - SrcBlend: D3D12_BLEND, - DestBlend: D3D12_BLEND, - BlendOp: D3D12_BLEND_OP, - SrcBlendAlpha: D3D12_BLEND, - DestBlendAlpha: D3D12_BLEND, - BlendOpAlpha: D3D12_BLEND_OP, - LogicOp: D3D12_LOGIC_OP, - RenderTargetWriteMask: ::UINT8, -}} -STRUCT!{struct D3D12_BLEND_DESC { - AlphaToCoverageEnable: ::BOOL, - IndependentBlendEnable: ::BOOL, - RenderTarget: [D3D12_RENDER_TARGET_BLEND_DESC; 8], -}} -ENUM!{enum D3D12_CONSERVATIVE_RASTERIZATION_MODE { - D3D12_CONSERVATIVE_RASTERIZATION_MODE_OFF = 0, - D3D12_CONSERVATIVE_RASTERIZATION_MODE_ON = 1, -}} -STRUCT!{struct D3D12_RASTERIZER_DESC { - FillMode: D3D12_FILL_MODE, - CullMode: D3D12_CULL_MODE, - FrontCounterClockwise: ::BOOL, - DepthBias: ::INT, - DepthBiasClamp: ::FLOAT, - SlopeScaledDepthBias: ::FLOAT, - DepthClipEnable: ::BOOL, - MultisampleEnable: ::BOOL, - AntialiasedLineEnable: ::BOOL, - ForcedSampleCount: ::UINT, - ConservativeRaster: D3D12_CONSERVATIVE_RASTERIZATION_MODE, -}} -RIDL!{interface ID3D12Object(ID3D12ObjectVtbl): IUnknown(IUnknownVtbl) { - fn GetPrivateData( - &mut self, guid: ::REFGUID, pDataSize: *mut ::UINT, pData: *mut ::c_void - ) -> ::HRESULT, - fn SetPrivateData( - &mut self, guid: ::REFGUID, DataSize: ::UINT, pData: *const ::c_void - ) -> ::HRESULT, - fn SetPrivateDataInterface( - &mut self, guid: ::REFGUID, pData: *const ::IUnknown - ) -> ::HRESULT, - fn SetName(&mut self, Name: ::LPCWSTR) -> ::HRESULT -}} -RIDL!{interface ID3D12DeviceChild(ID3D12DeviceChildVtbl): ID3D12Object(ID3D12ObjectVtbl) { - fn GetDevice( - &mut self, riid: ::REFGUID, ppvDevice: *mut *mut ::c_void - ) -> ::HRESULT -}} -RIDL!{interface ID3D12RootSignature(ID3D12RootSignatureVtbl): - ID3D12DeviceChild(ID3D12DeviceChildVtbl) { -}} -STRUCT!{struct D3D12_SHADER_BYTECODE { - pShaderBytecode: *const ::c_void, - BytecodeLength: ::SIZE_T, -}} -STRUCT!{struct D3D12_STREAM_OUTPUT_DESC { - pSODeclaration: *const D3D12_SO_DECLARATION_ENTRY, - NumEntries: ::UINT, - pBufferStrides: *const ::UINT, - NumStrides: ::UINT, - RasterizedStream: ::UINT, -}} -STRUCT!{struct D3D12_INPUT_LAYOUT_DESC { - pInputElementDescs: *const D3D12_INPUT_ELEMENT_DESC, - NumElements: ::UINT, -}} -ENUM!{enum D3D12_INDEX_BUFFER_STRIP_CUT_VALUE { - D3D12_INDEX_BUFFER_STRIP_CUT_VALUE_DISABLED = 0, - D3D12_INDEX_BUFFER_STRIP_CUT_VALUE_0xFFFF = 1, - D3D12_INDEX_BUFFER_STRIP_CUT_VALUE_0xFFFFFFFF = 2, -}} -STRUCT!{struct D3D12_CACHED_PIPELINE_STATE { - pCachedBlob: *const ::c_void, - CachedBlobSizeInBytes: ::SIZE_T, -}} -FLAGS!{enum D3D12_PIPELINE_STATE_FLAGS { - D3D12_PIPELINE_STATE_FLAG_NONE = 0x0, - D3D12_PIPELINE_STATE_FLAG_TOOL_DEBUG = 0x1, -}} -STRUCT!{struct D3D12_GRAPHICS_PIPELINE_STATE_DESC { - pRootSignature: *mut ID3D12RootSignature, - VS: D3D12_SHADER_BYTECODE, - PS: D3D12_SHADER_BYTECODE, - DS: D3D12_SHADER_BYTECODE, - HS: D3D12_SHADER_BYTECODE, - GS: D3D12_SHADER_BYTECODE, - StreamOutput: D3D12_STREAM_OUTPUT_DESC, - BlendState: D3D12_BLEND_DESC, - SampleMask: ::UINT, - RasterizerState: D3D12_RASTERIZER_DESC, - DepthStencilState: D3D12_DEPTH_STENCIL_DESC, - InputLayout: D3D12_INPUT_LAYOUT_DESC, - IBStripCutValue: D3D12_INDEX_BUFFER_STRIP_CUT_VALUE, - PrimitiveTopologyType: D3D12_PRIMITIVE_TOPOLOGY_TYPE, - NumRenderTargets: ::UINT, - RTVFormats: [::DXGI_FORMAT; 8], - DSVFormat: ::DXGI_FORMAT, - SampleDesc: ::DXGI_SAMPLE_DESC, - NodeMask: ::UINT, - CachedPSO: D3D12_CACHED_PIPELINE_STATE, - Flags: D3D12_PIPELINE_STATE_FLAGS, -}} -STRUCT!{struct D3D12_COMPUTE_PIPELINE_STATE_DESC { - pRootSignature: *mut ID3D12RootSignature, - CS: D3D12_SHADER_BYTECODE, - NodeMask: ::UINT, - CachedPSO: D3D12_CACHED_PIPELINE_STATE, - Flags: D3D12_PIPELINE_STATE_FLAGS, -}} -ENUM!{enum D3D12_FEATURE { - D3D12_FEATURE_D3D12_OPTIONS = 0, - D3D12_FEATURE_ARCHITECTURE = 1, - D3D12_FEATURE_FEATURE_LEVELS = 2, - D3D12_FEATURE_FORMAT_SUPPORT = 3, - D3D12_FEATURE_MULTISAMPLE_QUALITY_LEVELS = 4, - D3D12_FEATURE_FORMAT_INFO = 5, - D3D12_FEATURE_GPU_VIRTUAL_ADDRESS_SUPPORT = 6, -}} -FLAGS!{enum D3D12_SHADER_MIN_PRECISION_SUPPORT { - D3D12_SHADER_MIN_PRECISION_SUPPORT_NONE = 0, - D3D12_SHADER_MIN_PRECISION_SUPPORT_10_BIT = 0x1, - D3D12_SHADER_MIN_PRECISION_SUPPORT_16_BIT = 0x2, -}} -ENUM!{enum D3D12_TILED_RESOURCES_TIER { - D3D12_TILED_RESOURCES_TIER_NOT_SUPPORTED = 0, - D3D12_TILED_RESOURCES_TIER_1 = 1, - D3D12_TILED_RESOURCES_TIER_2 = 2, - D3D12_TILED_RESOURCES_TIER_3 = 3, -}} -ENUM!{enum D3D12_RESOURCE_BINDING_TIER { - D3D12_RESOURCE_BINDING_TIER_1 = 1, - D3D12_RESOURCE_BINDING_TIER_2 = 2, - D3D12_RESOURCE_BINDING_TIER_3 = 3, -}} -ENUM!{enum D3D12_CONSERVATIVE_RASTERIZATION_TIER { - D3D12_CONSERVATIVE_RASTERIZATION_TIER_NOT_SUPPORTED = 0, - D3D12_CONSERVATIVE_RASTERIZATION_TIER_1 = 1, - D3D12_CONSERVATIVE_RASTERIZATION_TIER_2 = 2, - D3D12_CONSERVATIVE_RASTERIZATION_TIER_3 = 3, -}} -FLAGS!{enum D3D12_FORMAT_SUPPORT1 { - D3D12_FORMAT_SUPPORT1_NONE = 0x0, - D3D12_FORMAT_SUPPORT1_BUFFER = 0x1, - D3D12_FORMAT_SUPPORT1_IA_VERTEX_BUFFER = 0x2, - D3D12_FORMAT_SUPPORT1_IA_INDEX_BUFFER = 0x4, - D3D12_FORMAT_SUPPORT1_SO_BUFFER = 0x8, - D3D12_FORMAT_SUPPORT1_TEXTURE1D = 0x10, - D3D12_FORMAT_SUPPORT1_TEXTURE2D = 0x20, - D3D12_FORMAT_SUPPORT1_TEXTURE3D = 0x40, - D3D12_FORMAT_SUPPORT1_TEXTURECUBE = 0x80, - D3D12_FORMAT_SUPPORT1_SHADER_LOAD = 0x100, - D3D12_FORMAT_SUPPORT1_SHADER_SAMPLE = 0x200, - D3D12_FORMAT_SUPPORT1_SHADER_SAMPLE_COMPARISON = 0x400, - D3D12_FORMAT_SUPPORT1_SHADER_SAMPLE_MONO_TEXT = 0x800, - D3D12_FORMAT_SUPPORT1_MIP = 0x1000, - D3D12_FORMAT_SUPPORT1_RENDER_TARGET = 0x4000, - D3D12_FORMAT_SUPPORT1_BLENDABLE = 0x8000, - D3D12_FORMAT_SUPPORT1_DEPTH_STENCIL = 0x10000, - D3D12_FORMAT_SUPPORT1_MULTISAMPLE_RESOLVE = 0x40000, - D3D12_FORMAT_SUPPORT1_DISPLAY = 0x80000, - D3D12_FORMAT_SUPPORT1_CAST_WITHIN_BIT_LAYOUT = 0x100000, - D3D12_FORMAT_SUPPORT1_MULTISAMPLE_RENDERTARGET = 0x200000, - D3D12_FORMAT_SUPPORT1_MULTISAMPLE_LOAD = 0x400000, - D3D12_FORMAT_SUPPORT1_SHADER_GATHER = 0x800000, - D3D12_FORMAT_SUPPORT1_BACK_BUFFER_CAST = 0x1000000, - D3D12_FORMAT_SUPPORT1_TYPED_UNORDERED_ACCESS_VIEW = 0x2000000, - D3D12_FORMAT_SUPPORT1_SHADER_GATHER_COMPARISON = 0x4000000, - D3D12_FORMAT_SUPPORT1_DECODER_OUTPUT = 0x8000000, - D3D12_FORMAT_SUPPORT1_VIDEO_PROCESSOR_OUTPUT = 0x10000000, - D3D12_FORMAT_SUPPORT1_VIDEO_PROCESSOR_INPUT = 0x20000000, - D3D12_FORMAT_SUPPORT1_VIDEO_ENCODER = 0x40000000, -}} -FLAGS!{enum D3D12_FORMAT_SUPPORT2 { - D3D12_FORMAT_SUPPORT2_NONE = 0x0, - D3D12_FORMAT_SUPPORT2_UAV_ATOMIC_ADD = 0x1, - D3D12_FORMAT_SUPPORT2_UAV_ATOMIC_BITWISE_OPS = 0x2, - D3D12_FORMAT_SUPPORT2_UAV_ATOMIC_COMPARE_STORE_OR_COMPARE_EXCHANGE = 0x4, - D3D12_FORMAT_SUPPORT2_UAV_ATOMIC_EXCHANGE = 0x8, - D3D12_FORMAT_SUPPORT2_UAV_ATOMIC_SIGNED_MIN_OR_MAX = 0x10, - D3D12_FORMAT_SUPPORT2_UAV_ATOMIC_UNSIGNED_MIN_OR_MAX = 0x20, - D3D12_FORMAT_SUPPORT2_UAV_TYPED_LOAD = 0x40, - D3D12_FORMAT_SUPPORT2_UAV_TYPED_STORE = 0x80, - D3D12_FORMAT_SUPPORT2_OUTPUT_MERGER_LOGIC_OP = 0x100, - D3D12_FORMAT_SUPPORT2_TILED = 0x200, - D3D12_FORMAT_SUPPORT2_MULTIPLANE_OVERLAY = 0x4000, -}} -FLAGS!{enum D3D12_MULTISAMPLE_QUALITY_LEVEL_FLAGS { - D3D12_MULTISAMPLE_QUALITY_LEVELS_FLAG_NONE = 0x0, - D3D12_MULTISAMPLE_QUALITY_LEVELS_FLAG_TILED_RESOURCE = 0x1, -}} -ENUM!{enum D3D12_CROSS_NODE_SHARING_TIER { - D3D12_CROSS_NODE_SHARING_TIER_NOT_SUPPORTED = 0, - D3D12_CROSS_NODE_SHARING_TIER_1_EMULATED = 1, - D3D12_CROSS_NODE_SHARING_TIER_1 = 2, - D3D12_CROSS_NODE_SHARING_TIER_2 = 3, -}} -ENUM!{enum D3D12_RESOURCE_HEAP_TIER { - D3D12_RESOURCE_HEAP_TIER_1 = 1, - D3D12_RESOURCE_HEAP_TIER_2 = 2, -}} -STRUCT!{struct D3D12_FEATURE_DATA_D3D12_OPTIONS { - DoublePrecisionFloatShaderOps: ::BOOL, - OutputMergerLogicOp: ::BOOL, - MinPrecisionSupport: D3D12_SHADER_MIN_PRECISION_SUPPORT, - TiledResourcesTier: D3D12_TILED_RESOURCES_TIER, - ResourceBindingTier: D3D12_RESOURCE_BINDING_TIER, - PSSpecifiedStencilRefSupported: ::BOOL, - TypedUAVLoadAdditionalFormats: ::BOOL, - ROVsSupported: ::BOOL, - ConservativeRasterizationTier: D3D12_CONSERVATIVE_RASTERIZATION_TIER, - MaxGPUVirtualAddressBitsPerResource: ::UINT, - StandardSwizzle64KBSupported: ::BOOL, - CrossNodeSharingTier: D3D12_CROSS_NODE_SHARING_TIER, - CrossAdapterRowMajorTextureSupported: ::BOOL, - VPAndRTArrayIndexFromAnyShaderFeedingRasterizerSupportedWithoutGSEmulation: ::BOOL, - ResourceHeapTier: D3D12_RESOURCE_HEAP_TIER, -}} - - - - - - - - - -FLAGS!{ enum D3D12_BUFFER_SRV_FLAGS { - D3D12_BUFFER_SRV_FLAG_NONE = 0x0, - D3D12_BUFFER_SRV_FLAG_RAW = 0x1, -}} - -FLAGS!{ enum D3D12_BUFFER_UAV_FLAGS { - D3D12_BUFFER_UAV_FLAG_NONE = 0x0, - D3D12_BUFFER_UAV_FLAG_RAW = 0x1, -}} - -FLAGS!{ enum D3D12_CLEAR_FLAGS { - D3D12_CLEAR_FLAG_DEPTH = 0x1, - D3D12_CLEAR_FLAG_STENCIL = 0x2, -}} - - -ENUM!{ enum D3D12_CPU_PAGE_PROPERTY { - D3D12_CPU_PAGE_PROPERTY_UNKNOWN = 0, - D3D12_CPU_PAGE_PROPERTY_NOT_AVAILABLE = 1, - D3D12_CPU_PAGE_PROPERTY_WRITE_COMBINE = 2, - D3D12_CPU_PAGE_PROPERTY_WRITE_BACK = 3, -}} - - -FLAGS!{ enum D3D12_DESCRIPTOR_HEAP_FLAGS { - D3D12_DESCRIPTOR_HEAP_FLAG_NONE = 0x0, - D3D12_DESCRIPTOR_HEAP_FLAG_SHADER_VISIBLE = 0x1, -}} - -ENUM!{ enum D3D12_DESCRIPTOR_HEAP_TYPE { - D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV = 0, - D3D12_DESCRIPTOR_HEAP_TYPE_SAMPLER = 1, - D3D12_DESCRIPTOR_HEAP_TYPE_RTV = 2, - D3D12_DESCRIPTOR_HEAP_TYPE_DSV = 3, - D3D12_DESCRIPTOR_HEAP_TYPE_NUM_TYPES = 4, -}} - -ENUM!{ enum D3D12_DESCRIPTOR_RANGE_TYPE { - D3D12_DESCRIPTOR_RANGE_TYPE_SRV = 0, - D3D12_DESCRIPTOR_RANGE_TYPE_UAV = 1, - D3D12_DESCRIPTOR_RANGE_TYPE_CBV = 2, - D3D12_DESCRIPTOR_RANGE_TYPE_SAMPLER = 3, -}} - -ENUM!{ enum D3D12_DSV_DIMENSION { - D3D12_DSV_DIMENSION_UNKNOWN = 0, - D3D12_DSV_DIMENSION_TEXTURE1D = 1, - D3D12_DSV_DIMENSION_TEXTURE1DARRAY = 2, - D3D12_DSV_DIMENSION_TEXTURE2D = 3, - D3D12_DSV_DIMENSION_TEXTURE2DARRAY = 4, - D3D12_DSV_DIMENSION_TEXTURE2DMS = 5, - D3D12_DSV_DIMENSION_TEXTURE2DMSARRAY = 6, -}} - -FLAGS!{ enum D3D12_DSV_FLAGS { - D3D12_DSV_FLAG_NONE = 0x0, - D3D12_DSV_FLAG_READ_ONLY_DEPTH = 0x1, - D3D12_DSV_FLAG_READ_ONLY_STENCIL = 0x2, -}} - - - -FLAGS!{ enum D3D12_FENCE_FLAGS { - D3D12_FENCE_FLAG_NONE = 0x0, - D3D12_FENCE_FLAG_SHARED = 0x1, - D3D12_FENCE_FLAG_SHARED_CROSS_ADAPTER = 0x2, -}} - - - -ENUM!{ enum D3D12_FILTER { - D3D12_FILTER_MIN_MAG_MIP_POINT = 0, - D3D12_FILTER_MIN_MAG_POINT_MIP_LINEAR = 1, - D3D12_FILTER_MIN_POINT_MAG_LINEAR_MIP_POINT = 4, - D3D12_FILTER_MIN_POINT_MAG_MIP_LINEAR = 5, - D3D12_FILTER_MIN_LINEAR_MAG_MIP_POINT = 16, - D3D12_FILTER_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 17, - D3D12_FILTER_MIN_MAG_LINEAR_MIP_POINT = 20, - D3D12_FILTER_MIN_MAG_MIP_LINEAR = 21, - D3D12_FILTER_ANISOTROPIC = 85, - D3D12_FILTER_COMPARISON_MIN_MAG_MIP_POINT = 128, - D3D12_FILTER_COMPARISON_MIN_MAG_POINT_MIP_LINEAR = 129, - D3D12_FILTER_COMPARISON_MIN_POINT_MAG_LINEAR_MIP_POINT = 132, - D3D12_FILTER_COMPARISON_MIN_POINT_MAG_MIP_LINEAR = 133, - D3D12_FILTER_COMPARISON_MIN_LINEAR_MAG_MIP_POINT = 144, - D3D12_FILTER_COMPARISON_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 145, - D3D12_FILTER_COMPARISON_MIN_MAG_LINEAR_MIP_POINT = 148, - D3D12_FILTER_COMPARISON_MIN_MAG_MIP_LINEAR = 149, - D3D12_FILTER_COMPARISON_ANISOTROPIC = 213, - D3D12_FILTER_MINIMUM_MIN_MAG_MIP_POINT = 256, - D3D12_FILTER_MINIMUM_MIN_MAG_POINT_MIP_LINEAR = 257, - D3D12_FILTER_MINIMUM_MIN_POINT_MAG_LINEAR_MIP_POINT = 260, - D3D12_FILTER_MINIMUM_MIN_POINT_MAG_MIP_LINEAR = 261, - D3D12_FILTER_MINIMUM_MIN_LINEAR_MAG_MIP_POINT = 272, - D3D12_FILTER_MINIMUM_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 273, - D3D12_FILTER_MINIMUM_MIN_MAG_LINEAR_MIP_POINT = 276, - D3D12_FILTER_MINIMUM_MIN_MAG_MIP_LINEAR = 277, - D3D12_FILTER_MINIMUM_ANISOTROPIC = 341, - D3D12_FILTER_MAXIMUM_MIN_MAG_MIP_POINT = 384, - D3D12_FILTER_MAXIMUM_MIN_MAG_POINT_MIP_LINEAR = 385, - D3D12_FILTER_MAXIMUM_MIN_POINT_MAG_LINEAR_MIP_POINT = 388, - D3D12_FILTER_MAXIMUM_MIN_POINT_MAG_MIP_LINEAR = 389, - D3D12_FILTER_MAXIMUM_MIN_LINEAR_MAG_MIP_POINT = 400, - D3D12_FILTER_MAXIMUM_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 401, - D3D12_FILTER_MAXIMUM_MIN_MAG_LINEAR_MIP_POINT = 404, - D3D12_FILTER_MAXIMUM_MIN_MAG_MIP_LINEAR = 405, - D3D12_FILTER_MAXIMUM_ANISOTROPIC = 469, -}} - -ENUM!{ enum D3D12_FILTER_REDUCTION_TYPE { - D3D12_FILTER_REDUCTION_TYPE_STANDARD = 0, - D3D12_FILTER_REDUCTION_TYPE_COMPARISON = 1, - D3D12_FILTER_REDUCTION_TYPE_MINIMUM = 2, - D3D12_FILTER_REDUCTION_TYPE_MAXIMUM = 3, -}} - -ENUM!{ enum D3D12_FILTER_TYPE { - D3D12_FILTER_TYPE_POINT = 0, - D3D12_FILTER_TYPE_LINEAR = 1, -}} - - - -FLAGS!{ enum D3D12_HEAP_FLAGS { - D3D12_HEAP_FLAG_NONE = 0x0, - D3D12_HEAP_FLAG_SHARED = 0x1, - D3D12_HEAP_FLAG_DENY_BUFFERS = 0x4, - D3D12_HEAP_FLAG_ALLOW_DISPLAY = 0x8, - D3D12_HEAP_FLAG_SHARED_CROSS_ADAPTER = 0x20, - D3D12_HEAP_FLAG_DENY_RT_DS_TEXTURES = 0x40, - D3D12_HEAP_FLAG_DENY_NON_RT_DS_TEXTURES = 0x80, - D3D12_HEAP_FLAG_ALLOW_ALL_BUFFERS_AND_TEXTURES = 0x0, - D3D12_HEAP_FLAG_ALLOW_ONLY_BUFFERS = 0xC0, - D3D12_HEAP_FLAG_ALLOW_ONLY_NON_RT_DS_TEXTURES = 0x44, - D3D12_HEAP_FLAG_ALLOW_ONLY_RT_DS_TEXTURES = 0x84, -}} - -ENUM!{ enum D3D12_HEAP_TYPE { - D3D12_HEAP_TYPE_DEFAULT = 1, - D3D12_HEAP_TYPE_UPLOAD = 2, - D3D12_HEAP_TYPE_READBACK = 3, - D3D12_HEAP_TYPE_CUSTOM = 4, -}} - - - -ENUM!{ enum D3D12_INDIRECT_ARGUMENT_TYPE { - D3D12_INDIRECT_ARGUMENT_TYPE_DRAW = 0, - D3D12_INDIRECT_ARGUMENT_TYPE_DRAW_INDEXED = 1, - D3D12_INDIRECT_ARGUMENT_TYPE_DISPATCH = 2, - D3D12_INDIRECT_ARGUMENT_TYPE_VERTEX_BUFFER_VIEW = 3, - D3D12_INDIRECT_ARGUMENT_TYPE_INDEX_BUFFER_VIEW = 4, - D3D12_INDIRECT_ARGUMENT_TYPE_CONSTANT = 5, - D3D12_INDIRECT_ARGUMENT_TYPE_CONSTANT_BUFFER_VIEW = 6, - D3D12_INDIRECT_ARGUMENT_TYPE_SHADER_RESOURCE_VIEW = 7, - D3D12_INDIRECT_ARGUMENT_TYPE_UNORDERED_ACCESS_VIEW = 8, -}} - - - - - -ENUM!{ enum D3D12_MEMORY_POOL { - D3D12_MEMORY_POOL_UNKNOWN = 0, - D3D12_MEMORY_POOL_L0 = 1, - D3D12_MEMORY_POOL_L1 = 2, -}} - - - - -ENUM!{ enum D3D12_PREDICATION_OP { - D3D12_PREDICATION_OP_EQUAL_ZERO = 0, - D3D12_PREDICATION_OP_NOT_EQUAL_ZERO = 1, -}} - - - -ENUM!{ enum D3D12_QUERY_HEAP_TYPE { - D3D12_QUERY_HEAP_TYPE_OCCLUSION = 0, - D3D12_QUERY_HEAP_TYPE_TIMESTAMP = 1, - D3D12_QUERY_HEAP_TYPE_PIPELINE_STATISTICS = 2, - D3D12_QUERY_HEAP_TYPE_SO_STATISTICS = 3, -}} - -ENUM!{ enum D3D12_QUERY_TYPE { - D3D12_QUERY_TYPE_OCCLUSION = 0, - D3D12_QUERY_TYPE_BINARY_OCCLUSION = 1, - D3D12_QUERY_TYPE_TIMESTAMP = 2, - D3D12_QUERY_TYPE_PIPELINE_STATISTICS = 3, - D3D12_QUERY_TYPE_SO_STATISTICS_STREAM0 = 4, - D3D12_QUERY_TYPE_SO_STATISTICS_STREAM1 = 5, - D3D12_QUERY_TYPE_SO_STATISTICS_STREAM2 = 6, - D3D12_QUERY_TYPE_SO_STATISTICS_STREAM3 = 7, -}} - -FLAGS!{ enum D3D12_RESOURCE_BARRIER_FLAGS { - D3D12_RESOURCE_BARRIER_FLAG_NONE = 0x0, - D3D12_RESOURCE_BARRIER_FLAG_BEGIN_ONLY = 0x1, - D3D12_RESOURCE_BARRIER_FLAG_END_ONLY = 0x2, -}} - -ENUM!{ enum D3D12_RESOURCE_BARRIER_TYPE { - D3D12_RESOURCE_BARRIER_TYPE_TRANSITION = 0, - D3D12_RESOURCE_BARRIER_TYPE_ALIASING = 1, - D3D12_RESOURCE_BARRIER_TYPE_UAV = 2, -}} - - -ENUM!{ enum D3D12_RESOURCE_DIMENSION { - D3D12_RESOURCE_DIMENSION_UNKNOWN = 0, - D3D12_RESOURCE_DIMENSION_BUFFER = 1, - D3D12_RESOURCE_DIMENSION_TEXTURE1D = 2, - D3D12_RESOURCE_DIMENSION_TEXTURE2D = 3, - D3D12_RESOURCE_DIMENSION_TEXTURE3D = 4, -}} - -FLAGS!{ enum D3D12_RESOURCE_FLAGS { - D3D12_RESOURCE_FLAG_NONE = 0x0, - D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET = 0x1, - D3D12_RESOURCE_FLAG_ALLOW_DEPTH_STENCIL = 0x2, - D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS = 0x4, - D3D12_RESOURCE_FLAG_DENY_SHADER_RESOURCE = 0x8, - D3D12_RESOURCE_FLAG_ALLOW_CROSS_ADAPTER = 0x10, - D3D12_RESOURCE_FLAG_ALLOW_SIMULTANEOUS_ACCESS = 0x20, -}} - - -FLAGS!{ enum D3D12_RESOURCE_STATES { - D3D12_RESOURCE_STATE_COMMON = 0x0, - D3D12_RESOURCE_STATE_VERTEX_AND_CONSTANT_BUFFER = 0x1, - D3D12_RESOURCE_STATE_INDEX_BUFFER = 0x2, - D3D12_RESOURCE_STATE_RENDER_TARGET = 0x4, - D3D12_RESOURCE_STATE_UNORDERED_ACCESS = 0x8, - D3D12_RESOURCE_STATE_DEPTH_WRITE = 0x10, - D3D12_RESOURCE_STATE_DEPTH_READ = 0x20, - D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE = 0x40, - D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE = 0x80, - D3D12_RESOURCE_STATE_STREAM_OUT = 0x100, - D3D12_RESOURCE_STATE_INDIRECT_ARGUMENT = 0x200, - D3D12_RESOURCE_STATE_COPY_DEST = 0x400, - D3D12_RESOURCE_STATE_COPY_SOURCE = 0x800, - D3D12_RESOURCE_STATE_RESOLVE_DEST = 0x1000, - D3D12_RESOURCE_STATE_RESOLVE_SOURCE = 0x2000, - D3D12_RESOURCE_STATE_GENERIC_READ = 0xAC3, - D3D12_RESOURCE_STATE_PRESENT = 0x0, - D3D12_RESOURCE_STATE_PREDICATION = 0x200, -}} - -ENUM!{ enum D3D12_ROOT_PARAMETER_TYPE { - D3D12_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE = 0, - D3D12_ROOT_PARAMETER_TYPE_32BIT_CONSTANTS = 1, - D3D12_ROOT_PARAMETER_TYPE_CBV = 2, - D3D12_ROOT_PARAMETER_TYPE_SRV = 3, - D3D12_ROOT_PARAMETER_TYPE_UAV = 4, -}} - -FLAGS!{ enum D3D12_ROOT_SIGNATURE_FLAGS { - D3D12_ROOT_SIGNATURE_FLAG_NONE = 0x0, - D3D12_ROOT_SIGNATURE_FLAG_ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT = 0x1, - D3D12_ROOT_SIGNATURE_FLAG_DENY_VERTEX_SHADER_ROOT_ACCESS = 0x2, - D3D12_ROOT_SIGNATURE_FLAG_DENY_HULL_SHADER_ROOT_ACCESS = 0x4, - D3D12_ROOT_SIGNATURE_FLAG_DENY_DOMAIN_SHADER_ROOT_ACCESS = 0x8, - D3D12_ROOT_SIGNATURE_FLAG_DENY_GEOMETRY_SHADER_ROOT_ACCESS = 0x10, - D3D12_ROOT_SIGNATURE_FLAG_DENY_PIXEL_SHADER_ROOT_ACCESS = 0x20, - D3D12_ROOT_SIGNATURE_FLAG_ALLOW_STREAM_OUTPUT = 0x40, -}} - -ENUM!{ enum D3D12_RTV_DIMENSION { - D3D12_RTV_DIMENSION_UNKNOWN = 0, - D3D12_RTV_DIMENSION_BUFFER = 1, - D3D12_RTV_DIMENSION_TEXTURE1D = 2, - D3D12_RTV_DIMENSION_TEXTURE1DARRAY = 3, - D3D12_RTV_DIMENSION_TEXTURE2D = 4, - D3D12_RTV_DIMENSION_TEXTURE2DARRAY = 5, - D3D12_RTV_DIMENSION_TEXTURE2DMS = 6, - D3D12_RTV_DIMENSION_TEXTURE2DMSARRAY = 7, - D3D12_RTV_DIMENSION_TEXTURE3D = 8, -}} - -ENUM!{ enum D3D12_SHADER_COMPONENT_MAPPING { - D3D12_SHADER_COMPONENT_MAPPING_FROM_MEMORY_COMPONENT_0 = 0, - D3D12_SHADER_COMPONENT_MAPPING_FROM_MEMORY_COMPONENT_1 = 1, - D3D12_SHADER_COMPONENT_MAPPING_FROM_MEMORY_COMPONENT_2 = 2, - D3D12_SHADER_COMPONENT_MAPPING_FROM_MEMORY_COMPONENT_3 = 3, - D3D12_SHADER_COMPONENT_MAPPING_FORCE_VALUE_0 = 4, - D3D12_SHADER_COMPONENT_MAPPING_FORCE_VALUE_1 = 5, -}} - - -ENUM!{ enum D3D12_SHADER_VISIBILITY { - D3D12_SHADER_VISIBILITY_ALL = 0, - D3D12_SHADER_VISIBILITY_VERTEX = 1, - D3D12_SHADER_VISIBILITY_HULL = 2, - D3D12_SHADER_VISIBILITY_DOMAIN = 3, - D3D12_SHADER_VISIBILITY_GEOMETRY = 4, - D3D12_SHADER_VISIBILITY_PIXEL = 5, -}} - -ENUM!{ enum D3D12_SRV_DIMENSION { - D3D12_SRV_DIMENSION_UNKNOWN = 0, - D3D12_SRV_DIMENSION_BUFFER = 1, - D3D12_SRV_DIMENSION_TEXTURE1D = 2, - D3D12_SRV_DIMENSION_TEXTURE1DARRAY = 3, - D3D12_SRV_DIMENSION_TEXTURE2D = 4, - D3D12_SRV_DIMENSION_TEXTURE2DARRAY = 5, - D3D12_SRV_DIMENSION_TEXTURE2DMS = 6, - D3D12_SRV_DIMENSION_TEXTURE2DMSARRAY = 7, - D3D12_SRV_DIMENSION_TEXTURE3D = 8, - D3D12_SRV_DIMENSION_TEXTURECUBE = 9, - D3D12_SRV_DIMENSION_TEXTURECUBEARRAY = 10, -}} - -ENUM!{ enum D3D12_STATIC_BORDER_COLOR { - D3D12_STATIC_BORDER_COLOR_TRANSPARENT_BLACK = 0, - D3D12_STATIC_BORDER_COLOR_OPAQUE_BLACK = 1, - D3D12_STATIC_BORDER_COLOR_OPAQUE_WHITE = 2, -}} - - - -ENUM!{ enum D3D12_TEXTURE_ADDRESS_MODE { - D3D12_TEXTURE_ADDRESS_MODE_WRAP = 1, - D3D12_TEXTURE_ADDRESS_MODE_MIRROR = 2, - D3D12_TEXTURE_ADDRESS_MODE_CLAMP = 3, - D3D12_TEXTURE_ADDRESS_MODE_BORDER = 4, - D3D12_TEXTURE_ADDRESS_MODE_MIRROR_ONCE = 5, -}} - -ENUM!{ enum D3D12_TEXTURE_COPY_TYPE { - D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX = 0, - D3D12_TEXTURE_COPY_TYPE_PLACED_FOOTPRINT = 1, -}} - -ENUM!{ enum D3D12_TEXTURE_LAYOUT { - D3D12_TEXTURE_LAYOUT_UNKNOWN = 0, - D3D12_TEXTURE_LAYOUT_ROW_MAJOR = 1, - D3D12_TEXTURE_LAYOUT_64KB_UNDEFINED_SWIZZLE = 2, - D3D12_TEXTURE_LAYOUT_64KB_STANDARD_SWIZZLE = 3, -}} - - -FLAGS!{ enum D3D12_TILE_COPY_FLAGS { - D3D12_TILE_COPY_FLAG_NONE = 0x0, - D3D12_TILE_COPY_FLAG_NO_HAZARD = 0x1, - D3D12_TILE_COPY_FLAG_LINEAR_BUFFER_TO_SWIZZLED_TILED_RESOURCE = 0x2, - D3D12_TILE_COPY_FLAG_SWIZZLED_TILED_RESOURCE_TO_LINEAR_BUFFER = 0x4, -}} - -FLAGS!{ enum D3D12_TILE_MAPPING_FLAGS { - D3D12_TILE_MAPPING_FLAG_NONE = 0x0, - D3D12_TILE_MAPPING_FLAG_NO_HAZARD = 0x1, -}} - -FLAGS!{ enum D3D12_TILE_RANGE_FLAGS { - D3D12_TILE_RANGE_FLAG_NONE = 0x0, - D3D12_TILE_RANGE_FLAG_NULL = 0x1, - D3D12_TILE_RANGE_FLAG_SKIP = 0x2, - D3D12_TILE_RANGE_FLAG_REUSE_SINGLE_TILE = 0x4, -}} - -ENUM!{ enum D3D12_UAV_DIMENSION { - D3D12_UAV_DIMENSION_UNKNOWN = 0, - D3D12_UAV_DIMENSION_BUFFER = 1, - D3D12_UAV_DIMENSION_TEXTURE1D = 2, - D3D12_UAV_DIMENSION_TEXTURE1DARRAY = 3, - D3D12_UAV_DIMENSION_TEXTURE2D = 4, - D3D12_UAV_DIMENSION_TEXTURE2DARRAY = 5, - D3D12_UAV_DIMENSION_TEXTURE3D = 8, -}} - -ENUM!{ enum D3D_ROOT_SIGNATURE_VERSION { - D3D_ROOT_SIGNATURE_VERSION_1 = 1, -}} - - - - - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_BUFFER_RTV { - pub FirstElement: ::UINT64, - pub NumElements: ::UINT, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_BUFFER_SRV { - pub FirstElement: ::UINT64, - pub NumElements: ::UINT, - pub StructureByteStride: ::UINT, - pub Flags: ::D3D12_BUFFER_SRV_FLAGS, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_BUFFER_UAV { - pub FirstElement: ::UINT64, - pub NumElements: ::UINT, - pub StructureByteStride: ::UINT, - pub CounterOffsetInBytes: ::UINT64, - pub Flags: ::D3D12_BUFFER_UAV_FLAGS, -} - - - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_CLEAR_VALUE { - pub Format: ::DXGI_FORMAT, - pub u: [::FLOAT; 4], -} - -UNION!(D3D12_CLEAR_VALUE, u, DepthStencil, DepthStencil_mut, ::D3D12_DEPTH_STENCIL_VALUE); -UNION!(D3D12_CLEAR_VALUE, u, Color, Color_mut, [::FLOAT; 4]); - - - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_COMMAND_SIGNATURE_DESC { - pub ByteStride: ::UINT, - pub NumArgumentDescs: ::UINT, - pub pArgumentDescs: *const ::D3D12_INDIRECT_ARGUMENT_DESC, - pub NodeMask: ::UINT, -} - - - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_CONSTANT_BUFFER_VIEW_DESC { - pub BufferLocation: ::D3D12_GPU_VIRTUAL_ADDRESS, - pub SizeInBytes: ::UINT, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_CPU_DESCRIPTOR_HANDLE { - pub ptr: ::SIZE_T, -} - - - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_DEPTH_STENCIL_VALUE { - pub Depth: ::FLOAT, - pub Stencil: ::UINT8, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_DEPTH_STENCIL_VIEW_DESC { - pub Format: ::DXGI_FORMAT, - pub ViewDimension: ::D3D12_DSV_DIMENSION, - pub Flags: ::D3D12_DSV_FLAGS, - pub u: ::D3D12_TEX1D_ARRAY_DSV, -} - -UNION!(D3D12_DEPTH_STENCIL_VIEW_DESC, u, Texture2DMSArray, Texture2DMSArray_mut, - ::D3D12_TEX2DMS_ARRAY_DSV); -UNION!(D3D12_DEPTH_STENCIL_VIEW_DESC, u, Texture2DMS, Texture2DMS_mut, ::D3D12_TEX2DMS_DSV); -UNION!(D3D12_DEPTH_STENCIL_VIEW_DESC, u, Texture2DArray, Texture2DArray_mut, - ::D3D12_TEX2D_ARRAY_DSV); -UNION!(D3D12_DEPTH_STENCIL_VIEW_DESC, u, Texture2D, Texture2D_mut, ::D3D12_TEX2D_DSV); -UNION!(D3D12_DEPTH_STENCIL_VIEW_DESC, u, Texture1DArray, Texture1DArray_mut, - ::D3D12_TEX1D_ARRAY_DSV); -UNION!(D3D12_DEPTH_STENCIL_VIEW_DESC, u, Texture1D, Texture1D_mut, ::D3D12_TEX1D_DSV); - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_DESCRIPTOR_HEAP_DESC { - pub Type: ::D3D12_DESCRIPTOR_HEAP_TYPE, - pub NumDescriptors: ::UINT, - pub Flags: ::D3D12_DESCRIPTOR_HEAP_FLAGS, - pub NodeMask: ::UINT, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_DESCRIPTOR_RANGE { - pub RangeType: ::D3D12_DESCRIPTOR_RANGE_TYPE, - pub NumDescriptors: ::UINT, - pub BaseShaderRegister: ::UINT, - pub RegisterSpace: ::UINT, - pub OffsetInDescriptorsFromTableStart: ::UINT, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_DISCARD_REGION { - pub NumRects: ::UINT, - pub pRects: *const ::D3D12_RECT, - pub FirstSubresource: ::UINT, - pub NumSubresources: ::UINT, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_DISPATCH_ARGUMENTS { - pub ThreadGroupCountX: ::UINT, - pub ThreadGroupCountY: ::UINT, - pub ThreadGroupCountZ: ::UINT, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_DRAW_ARGUMENTS { - pub VertexCountPerInstance: ::UINT, - pub InstanceCount: ::UINT, - pub StartVertexLocation: ::UINT, - pub StartInstanceLocation: ::UINT, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_DRAW_INDEXED_ARGUMENTS { - pub IndexCountPerInstance: ::UINT, - pub InstanceCount: ::UINT, - pub StartIndexLocation: ::UINT, - pub BaseVertexLocation: ::INT, - pub StartInstanceLocation: ::UINT, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_FEATURE_DATA_ARCHITECTURE { - pub NodeIndex: ::UINT, - pub TileBasedRenderer: ::BOOL, - pub UMA: ::BOOL, - pub CacheCoherentUMA: ::BOOL, -} - - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_FEATURE_DATA_FEATURE_LEVELS { - pub NumFeatureLevels: ::UINT, - pub pFeatureLevelsRequested: *const ::D3D_FEATURE_LEVEL, - pub MaxSupportedFeatureLevel: ::D3D_FEATURE_LEVEL, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_FEATURE_DATA_FORMAT_INFO { - pub Format: ::DXGI_FORMAT, - pub PlaneCount: ::UINT8, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_FEATURE_DATA_FORMAT_SUPPORT { - pub Format: ::DXGI_FORMAT, - pub Support1: ::D3D12_FORMAT_SUPPORT1, - pub Support2: ::D3D12_FORMAT_SUPPORT2, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_FEATURE_DATA_GPU_VIRTUAL_ADDRESS_SUPPORT { - pub MaxGPUVirtualAddressBitsPerResource: ::UINT, - pub MaxGPUVirtualAddressBitsPerProcess: ::UINT, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_FEATURE_DATA_MULTISAMPLE_QUALITY_LEVELS { - pub Format: ::DXGI_FORMAT, - pub SampleCount: ::UINT, - pub Flags: ::D3D12_MULTISAMPLE_QUALITY_LEVEL_FLAGS, - pub NumQualityLevels: ::UINT, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_GPU_DESCRIPTOR_HANDLE { - pub ptr: ::UINT64, -} - - - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_HEAP_DESC { - pub SizeInBytes: ::UINT64, - pub Properties: ::D3D12_HEAP_PROPERTIES, - pub Alignment: ::UINT64, - pub Flags: ::D3D12_HEAP_FLAGS, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_HEAP_PROPERTIES { - pub Type: ::D3D12_HEAP_TYPE, - pub CPUPageProperty: ::D3D12_CPU_PAGE_PROPERTY, - pub MemoryPoolPreference: ::D3D12_MEMORY_POOL, - pub CreationNodeMask: ::UINT, - pub VisibleNodeMask: ::UINT, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_INDEX_BUFFER_VIEW { - pub BufferLocation: ::D3D12_GPU_VIRTUAL_ADDRESS, - pub SizeInBytes: ::UINT, - pub Format: ::DXGI_FORMAT, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_INDIRECT_ARGUMENT_DESC_VertexBuffer { - pub Slot: ::UINT, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_INDIRECT_ARGUMENT_DESC_Constant { - pub RootParameterIndex: ::UINT, - pub DestOffsetIn32BitValues: ::UINT, - pub Num32BitValuesToSet: ::UINT, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_INDIRECT_ARGUMENT_DESC_ConstantBufferView { - pub RootParameterIndex: ::UINT, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_INDIRECT_ARGUMENT_DESC_ShaderResourceView { - pub RootParameterIndex: ::UINT, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_INDIRECT_ARGUMENT_DESC_UnorderedAccessView { - pub RootParameterIndex: ::UINT, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_INDIRECT_ARGUMENT_DESC { - pub Type: ::D3D12_INDIRECT_ARGUMENT_TYPE, - pub u: ::D3D12_INDIRECT_ARGUMENT_DESC_Constant, -} - -UNION!(D3D12_INDIRECT_ARGUMENT_DESC, u, UnorderedAccessView, UnorderedAccessView_mut, - D3D12_INDIRECT_ARGUMENT_DESC_UnorderedAccessView); -UNION!(D3D12_INDIRECT_ARGUMENT_DESC, u, ShaderResourceView, ShaderResourceView_mut, - D3D12_INDIRECT_ARGUMENT_DESC_ShaderResourceView); -UNION!(D3D12_INDIRECT_ARGUMENT_DESC, u, ConstantBufferView, ConstantBufferView_mut, - D3D12_INDIRECT_ARGUMENT_DESC_ConstantBufferView); -UNION!(D3D12_INDIRECT_ARGUMENT_DESC, u, Constant, Constant_mut, - D3D12_INDIRECT_ARGUMENT_DESC_Constant); -UNION!(D3D12_INDIRECT_ARGUMENT_DESC, u, VertexBuffer, VertexBuffer_mut, - D3D12_INDIRECT_ARGUMENT_DESC_VertexBuffer); - - - - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_MEMCPY_DEST { - pub pData: *mut ::c_void, - pub RowPitch: ::SIZE_T, - pub SlicePitch: ::SIZE_T, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_PACKED_MIP_INFO { - pub NumStandardMips: ::UINT8, - pub NumPackedMips: ::UINT8, - pub NumTilesForPackedMips: ::UINT, - pub StartTileIndexInOverallResource: ::UINT, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_PLACED_SUBRESOURCE_FOOTPRINT { - pub Offset: ::UINT64, - pub Footprint: ::D3D12_SUBRESOURCE_FOOTPRINT, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_QUERY_DATA_PIPELINE_STATISTICS { - pub IAVertices: ::UINT64, - pub IAPrimitives: ::UINT64, - pub VSInvocations: ::UINT64, - pub GSInvocations: ::UINT64, - pub GSPrimitives: ::UINT64, - pub CInvocations: ::UINT64, - pub CPrimitives: ::UINT64, - pub PSInvocations: ::UINT64, - pub HSInvocations: ::UINT64, - pub DSInvocations: ::UINT64, - pub CSInvocations: ::UINT64, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_QUERY_DATA_SO_STATISTICS { - pub NumPrimitivesWritten: ::UINT64, - pub PrimitivesStorageNeeded: ::UINT64, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_QUERY_HEAP_DESC { - pub Type: ::D3D12_QUERY_HEAP_TYPE, - pub Count: ::UINT, - pub NodeMask: ::UINT, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_RANGE { - pub Begin: ::SIZE_T, - pub End: ::SIZE_T, -} - - - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_RENDER_TARGET_VIEW_DESC { - pub Format: ::DXGI_FORMAT, - pub ViewDimension: ::D3D12_RTV_DIMENSION, - pub u: ::D3D12_BUFFER_RTV, -} - -UNION!(D3D12_RENDER_TARGET_VIEW_DESC, u, Texture3D, Texture3D_mut, ::D3D12_TEX3D_RTV); -UNION!(D3D12_RENDER_TARGET_VIEW_DESC, u, Texture2DMSArray, Texture2DMSArray_mut, - ::D3D12_TEX2DMS_ARRAY_RTV); -UNION!(D3D12_RENDER_TARGET_VIEW_DESC, u, Texture2DMS, Texture2DMS_mut, ::D3D12_TEX2DMS_RTV); -UNION!(D3D12_RENDER_TARGET_VIEW_DESC, u, Texture2DArray, Texture2DArray_mut, - ::D3D12_TEX2D_ARRAY_RTV); -UNION!(D3D12_RENDER_TARGET_VIEW_DESC, u, Texture2D, Texture2D_mut, ::D3D12_TEX2D_RTV); -UNION!(D3D12_RENDER_TARGET_VIEW_DESC, u, Texture1DArray, Texture1DArray_mut, - ::D3D12_TEX1D_ARRAY_RTV); -UNION!(D3D12_RENDER_TARGET_VIEW_DESC, u, Texture1D, Texture1D_mut, ::D3D12_TEX1D_RTV); -UNION!(D3D12_RENDER_TARGET_VIEW_DESC, u, Buffer, Buffer_mut, ::D3D12_BUFFER_RTV); - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_RESOURCE_ALIASING_BARRIER { - pub pResourceBefore: *mut ::ID3D12Resource, - pub pResourceAfter: *mut ::ID3D12Resource, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_RESOURCE_ALLOCATION_INFO { - pub SizeInBytes: ::UINT64, - pub Alignment: ::UINT64, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_RESOURCE_BARRIER { - pub Type: ::D3D12_RESOURCE_BARRIER_TYPE, - pub Flags: ::D3D12_RESOURCE_BARRIER_FLAGS, - pub u: ::D3D12_RESOURCE_TRANSITION_BARRIER, -} - -UNION!(D3D12_RESOURCE_BARRIER, u, UAV, UAV_mut, ::D3D12_RESOURCE_UAV_BARRIER); -UNION!(D3D12_RESOURCE_BARRIER, u, Aliasing, Aliasing_mut, ::D3D12_RESOURCE_ALIASING_BARRIER); -UNION!(D3D12_RESOURCE_BARRIER, u, Transition, Transition_mut, ::D3D12_RESOURCE_TRANSITION_BARRIER); - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_RESOURCE_DESC { - pub Dimension: ::D3D12_RESOURCE_DIMENSION, - pub Alignment: ::UINT64, - pub Width: ::UINT64, - pub Height: ::UINT, - pub DepthOrArraySize: ::UINT16, - pub MipLevels: ::UINT16, - pub Format: ::DXGI_FORMAT, - pub SampleDesc: ::DXGI_SAMPLE_DESC, - pub Layout: ::D3D12_TEXTURE_LAYOUT, - pub Flags: ::D3D12_RESOURCE_FLAGS, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_RESOURCE_TRANSITION_BARRIER { - pub pResource: *mut ::ID3D12Resource, - pub Subresource: ::UINT, - pub StateBefore: ::D3D12_RESOURCE_STATES, - pub StateAfter: ::D3D12_RESOURCE_STATES, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_RESOURCE_UAV_BARRIER { - pub pResource: *mut ::ID3D12Resource, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_ROOT_CONSTANTS { - pub ShaderRegister: ::UINT, - pub RegisterSpace: ::UINT, - pub Num32BitValues: ::UINT, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_ROOT_DESCRIPTOR { - pub ShaderRegister: ::UINT, - pub RegisterSpace: ::UINT, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_ROOT_DESCRIPTOR_TABLE { - pub NumDescriptorRanges: ::UINT, - pub pDescriptorRanges: *const ::D3D12_DESCRIPTOR_RANGE, -} - -#[cfg(target_pointer_width = "64")] -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_ROOT_PARAMETER { - pub ParameterType: ::D3D12_ROOT_PARAMETER_TYPE, - pub u: ::D3D12_ROOT_DESCRIPTOR_TABLE, - pub ShaderVisibility: ::D3D12_SHADER_VISIBILITY, -} - -#[cfg(target_pointer_width = "32")] -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_ROOT_PARAMETER { - pub ParameterType: ::D3D12_ROOT_PARAMETER_TYPE, - pub u: ::D3D12_ROOT_CONSTANTS, - pub ShaderVisibility: ::D3D12_SHADER_VISIBILITY, -} - -UNION!(D3D12_ROOT_PARAMETER, u, Descriptor, Descriptor_mut, ::D3D12_ROOT_DESCRIPTOR); -UNION!(D3D12_ROOT_PARAMETER, u, Constants, Constants_mut, ::D3D12_ROOT_CONSTANTS); -UNION!(D3D12_ROOT_PARAMETER, u, DescriptorTable, DescriptorTable_mut, - ::D3D12_ROOT_DESCRIPTOR_TABLE); - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_ROOT_SIGNATURE_DESC { - pub NumParameters: ::UINT, - pub pParameters: *const ::D3D12_ROOT_PARAMETER, - pub NumStaticSamplers: ::UINT, - pub pStaticSamplers: *const ::D3D12_STATIC_SAMPLER_DESC, - pub Flags: ::D3D12_ROOT_SIGNATURE_FLAGS, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_SAMPLER_DESC { - pub Filter: ::D3D12_FILTER, - pub AddressU: ::D3D12_TEXTURE_ADDRESS_MODE, - pub AddressV: ::D3D12_TEXTURE_ADDRESS_MODE, - pub AddressW: ::D3D12_TEXTURE_ADDRESS_MODE, - pub MipLODBias: ::FLOAT, - pub MaxAnisotropy: ::UINT, - pub ComparisonFunc: ::D3D12_COMPARISON_FUNC, - pub BorderColor: [::FLOAT; 4], - pub MinLOD: ::FLOAT, - pub MaxLOD: ::FLOAT, -} - - - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_SHADER_RESOURCE_VIEW_DESC { - pub Format: ::DXGI_FORMAT, - pub ViewDimension: ::D3D12_SRV_DIMENSION, - pub Shader4ComponentMapping: ::UINT, - pub u: ::D3D12_BUFFER_SRV, -} - -UNION!(D3D12_SHADER_RESOURCE_VIEW_DESC, u, TextureCubeArray, TextureCubeArray_mut, - ::D3D12_TEXCUBE_ARRAY_SRV); -UNION!(D3D12_SHADER_RESOURCE_VIEW_DESC, u, TextureCube, TextureCube_mut, ::D3D12_TEXCUBE_SRV); -UNION!(D3D12_SHADER_RESOURCE_VIEW_DESC, u, Texture3D, Texture3D_mut, ::D3D12_TEX3D_SRV); -UNION!(D3D12_SHADER_RESOURCE_VIEW_DESC, u, Texture2DMSArray, Texture2DMSArray_mut, - ::D3D12_TEX2DMS_ARRAY_SRV); -UNION!(D3D12_SHADER_RESOURCE_VIEW_DESC, u, Texture2DMS, Texture2DMS_mut, ::D3D12_TEX2DMS_SRV); -UNION!(D3D12_SHADER_RESOURCE_VIEW_DESC, u, Texture2DArray, Texture2DArray_mut, - ::D3D12_TEX2D_ARRAY_SRV); -UNION!(D3D12_SHADER_RESOURCE_VIEW_DESC, u, Texture2D, Texture2D_mut, ::D3D12_TEX2D_SRV); -UNION!(D3D12_SHADER_RESOURCE_VIEW_DESC, u, Texture1DArray, Texture1DArray_mut, - ::D3D12_TEX1D_ARRAY_SRV); -UNION!(D3D12_SHADER_RESOURCE_VIEW_DESC, u, Texture1D, Texture1D_mut, ::D3D12_TEX1D_SRV); -UNION!(D3D12_SHADER_RESOURCE_VIEW_DESC, u, Buffer, Buffer_mut, ::D3D12_BUFFER_SRV); - - - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_STATIC_SAMPLER_DESC { - pub Filter: ::D3D12_FILTER, - pub AddressU: ::D3D12_TEXTURE_ADDRESS_MODE, - pub AddressV: ::D3D12_TEXTURE_ADDRESS_MODE, - pub AddressW: ::D3D12_TEXTURE_ADDRESS_MODE, - pub MipLODBias: ::FLOAT, - pub MaxAnisotropy: ::UINT, - pub ComparisonFunc: ::D3D12_COMPARISON_FUNC, - pub BorderColor: ::D3D12_STATIC_BORDER_COLOR, - pub MinLOD: ::FLOAT, - pub MaxLOD: ::FLOAT, - pub ShaderRegister: ::UINT, - pub RegisterSpace: ::UINT, - pub ShaderVisibility: ::D3D12_SHADER_VISIBILITY, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_STREAM_OUTPUT_BUFFER_VIEW { - pub BufferLocation: ::D3D12_GPU_VIRTUAL_ADDRESS, - pub SizeInBytes: ::UINT64, - pub BufferFilledSizeLocation: ::D3D12_GPU_VIRTUAL_ADDRESS, -} - - - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_SUBRESOURCE_DATA { - pub pData: *const ::c_void, - pub RowPitch: ::LONG_PTR, - pub SlicePitch: ::LONG_PTR, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_SUBRESOURCE_FOOTPRINT { - pub Format: ::DXGI_FORMAT, - pub Width: ::UINT, - pub Height: ::UINT, - pub Depth: ::UINT, - pub RowPitch: ::UINT, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_SUBRESOURCE_INFO { - pub Offset: ::UINT64, - pub RowPitch: ::UINT, - pub DepthPitch: ::UINT, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_SUBRESOURCE_TILING { - pub WidthInTiles: ::UINT, - pub HeightInTiles: ::UINT16, - pub DepthInTiles: ::UINT16, - pub StartTileIndexInOverallResource: ::UINT, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_TEX1D_ARRAY_DSV { - pub MipSlice: ::UINT, - pub FirstArraySlice: ::UINT, - pub ArraySize: ::UINT, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_TEX1D_ARRAY_RTV { - pub MipSlice: ::UINT, - pub FirstArraySlice: ::UINT, - pub ArraySize: ::UINT, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_TEX1D_ARRAY_SRV { - pub MostDetailedMip: ::UINT, - pub MipLevels: ::UINT, - pub FirstArraySlice: ::UINT, - pub ArraySize: ::UINT, - pub ResourceMinLODClamp: ::FLOAT, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_TEX1D_ARRAY_UAV { - pub MipSlice: ::UINT, - pub FirstArraySlice: ::UINT, - pub ArraySize: ::UINT, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_TEX1D_DSV { - pub MipSlice: ::UINT, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_TEX1D_RTV { - pub MipSlice: ::UINT, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_TEX1D_SRV { - pub MostDetailedMip: ::UINT, - pub MipLevels: ::UINT, - pub ResourceMinLODClamp: ::FLOAT, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_TEX1D_UAV { - pub MipSlice: ::UINT, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_TEX2DMS_ARRAY_DSV { - pub FirstArraySlice: ::UINT, - pub ArraySize: ::UINT, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_TEX2DMS_ARRAY_RTV { - pub FirstArraySlice: ::UINT, - pub ArraySize: ::UINT, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_TEX2DMS_ARRAY_SRV { - pub FirstArraySlice: ::UINT, - pub ArraySize: ::UINT, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_TEX2DMS_DSV { - pub UnusedField_NothingToDefine: ::UINT, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_TEX2DMS_RTV { - pub UnusedField_NothingToDefine: ::UINT, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_TEX2DMS_SRV { - pub UnusedField_NothingToDefine: ::UINT, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_TEX2D_ARRAY_DSV { - pub MipSlice: ::UINT, - pub FirstArraySlice: ::UINT, - pub ArraySize: ::UINT, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_TEX2D_ARRAY_RTV { - pub MipSlice: ::UINT, - pub FirstArraySlice: ::UINT, - pub ArraySize: ::UINT, - pub PlaneSlice: ::UINT, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_TEX2D_ARRAY_SRV { - pub MostDetailedMip: ::UINT, - pub MipLevels: ::UINT, - pub FirstArraySlice: ::UINT, - pub ArraySize: ::UINT, - pub PlaneSlice: ::UINT, - pub ResourceMinLODClamp: ::FLOAT, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_TEX2D_ARRAY_UAV { - pub MipSlice: ::UINT, - pub FirstArraySlice: ::UINT, - pub ArraySize: ::UINT, - pub PlaneSlice: ::UINT, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_TEX2D_DSV { - pub MipSlice: ::UINT, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_TEX2D_RTV { - pub MipSlice: ::UINT, - pub PlaneSlice: ::UINT, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_TEX2D_SRV { - pub MostDetailedMip: ::UINT, - pub MipLevels: ::UINT, - pub PlaneSlice: ::UINT, - pub ResourceMinLODClamp: ::FLOAT, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_TEX2D_UAV { - pub MipSlice: ::UINT, - pub PlaneSlice: ::UINT, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_TEX3D_RTV { - pub MipSlice: ::UINT, - pub FirstWSlice: ::UINT, - pub WSize: ::UINT, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_TEX3D_SRV { - pub MostDetailedMip: ::UINT, - pub MipLevels: ::UINT, - pub ResourceMinLODClamp: ::FLOAT, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_TEX3D_UAV { - pub MipSlice: ::UINT, - pub FirstWSlice: ::UINT, - pub WSize: ::UINT, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_TEXCUBE_ARRAY_SRV { - pub MostDetailedMip: ::UINT, - pub MipLevels: ::UINT, - pub First2DArrayFace: ::UINT, - pub NumCubes: ::UINT, - pub ResourceMinLODClamp: ::FLOAT, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_TEXCUBE_SRV { - pub MostDetailedMip: ::UINT, - pub MipLevels: ::UINT, - pub ResourceMinLODClamp: ::FLOAT, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_TEXTURE_COPY_LOCATION { - pub pResource: *mut ::ID3D12Resource, - pub Type: ::D3D12_TEXTURE_COPY_TYPE, - pub u: ::D3D12_PLACED_SUBRESOURCE_FOOTPRINT, -} - -UNION!(D3D12_TEXTURE_COPY_LOCATION, u, SubresourceIndex, SubresourceIndex_mut, ::UINT); -UNION!(D3D12_TEXTURE_COPY_LOCATION, u, PlacedFootprint, PlacedFootprint_mut, - ::D3D12_PLACED_SUBRESOURCE_FOOTPRINT); - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_TILED_RESOURCE_COORDINATE { - pub X: ::UINT, - pub Y: ::UINT, - pub Z: ::UINT, - pub Subresource: ::UINT, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_TILE_REGION_SIZE { - pub NumTiles: ::UINT, - pub UseBox: ::BOOL, - pub Width: ::UINT, - pub Height: ::UINT16, - pub Depth: ::UINT16, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_TILE_SHAPE { - pub WidthInTexels: ::UINT, - pub HeightInTexels: ::UINT, - pub DepthInTexels: ::UINT, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_UNORDERED_ACCESS_VIEW_DESC { - pub Format: ::DXGI_FORMAT, - pub ViewDimension: ::D3D12_UAV_DIMENSION, - pub u: ::D3D12_BUFFER_UAV, -} - -UNION!(D3D12_UNORDERED_ACCESS_VIEW_DESC, u, Texture3D, Texture3D_mut, ::D3D12_TEX3D_UAV); -UNION!(D3D12_UNORDERED_ACCESS_VIEW_DESC, u, Texture2DArray, Texture2DArray_mut, - ::D3D12_TEX2D_ARRAY_UAV); -UNION!(D3D12_UNORDERED_ACCESS_VIEW_DESC, u, Texture2D, Texture2D_mut, ::D3D12_TEX2D_UAV); -UNION!(D3D12_UNORDERED_ACCESS_VIEW_DESC, u, Texture1DArray, Texture1DArray_mut, - ::D3D12_TEX1D_ARRAY_UAV); -UNION!(D3D12_UNORDERED_ACCESS_VIEW_DESC, u, Texture1D, Texture1D_mut, ::D3D12_TEX1D_UAV); -UNION!(D3D12_UNORDERED_ACCESS_VIEW_DESC, u, Buffer, Buffer_mut, ::D3D12_BUFFER_UAV); - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct D3D12_VERTEX_BUFFER_VIEW { - pub BufferLocation: ::D3D12_GPU_VIRTUAL_ADDRESS, - pub SizeInBytes: ::UINT, - pub StrideInBytes: ::UINT, -} - - - -RIDL!( -interface ID3D12CommandAllocator(ID3D12CommandAllocatorVtbl): ID3D12Pageable(ID3D12PageableVtbl) { - fn Reset(&mut self) -> ::HRESULT -}); - -RIDL!( -interface ID3D12CommandList(ID3D12CommandListVtbl): ID3D12DeviceChild(ID3D12DeviceChildVtbl) { - fn GetType(&mut self) -> ::D3D12_COMMAND_LIST_TYPE -}); - -RIDL!( -interface ID3D12CommandQueue(ID3D12CommandQueueVtbl): ID3D12Pageable(ID3D12PageableVtbl) { - fn UpdateTileMappings( - &mut self, pResource: *mut ::ID3D12Resource, NumResourceRegions: ::UINT, - pResourceRegionStartCoordinates: *const ::D3D12_TILED_RESOURCE_COORDINATE, - pResourceRegionSizes: *const ::D3D12_TILE_REGION_SIZE, pHeap: *mut ::ID3D12Heap, - NumRanges: ::UINT, pRangeFlags: *const ::D3D12_TILE_RANGE_FLAGS, - pHeapRangeStartOffsets: *const ::UINT, pRangeTileCounts: *const ::UINT, - Flags: ::D3D12_TILE_MAPPING_FLAGS - ) -> (), - fn CopyTileMappings( - &mut self, pDstResource: *mut ::ID3D12Resource, - pDstRegionStartCoordinate: *const ::D3D12_TILED_RESOURCE_COORDINATE, - pSrcResource: *mut ::ID3D12Resource, - pSrcRegionStartCoordinate: *const ::D3D12_TILED_RESOURCE_COORDINATE, - pRegionSize: *const ::D3D12_TILE_REGION_SIZE, Flags: ::D3D12_TILE_MAPPING_FLAGS - ) -> (), - fn ExecuteCommandLists( - &mut self, NumCommandLists: ::UINT, ppCommandLists: *mut *mut ::ID3D12CommandList - ) -> (), - fn SetMarker( - &mut self, Metadata: ::UINT, pData: *const ::c_void, Size: ::UINT - ) -> (), - fn BeginEvent( - &mut self, Metadata: ::UINT, pData: *const ::c_void, Size: ::UINT - ) -> (), - fn EndEvent(&mut self) -> (), - fn Signal( - &mut self, pFence: *mut ::ID3D12Fence, Value: ::UINT64 - ) -> ::HRESULT, - fn Wait( - &mut self, pFence: *mut ::ID3D12Fence, Value: ::UINT64 - ) -> ::HRESULT, - fn GetTimestampFrequency(&mut self, pFrequency: *mut ::UINT64) -> ::HRESULT, - fn GetClockCalibration( - &mut self, pGpuTimestamp: *mut ::UINT64, pCpuTimestamp: *mut ::UINT64 - ) -> ::HRESULT, - fn GetDesc( - &mut self, __ret_val: *mut ::D3D12_COMMAND_QUEUE_DESC - ) -> *mut ::D3D12_COMMAND_QUEUE_DESC -}); - -RIDL!( -interface ID3D12CommandSignature(ID3D12CommandSignatureVtbl): ID3D12Pageable(ID3D12PageableVtbl) { -}); - -RIDL!( -interface ID3D12DescriptorHeap(ID3D12DescriptorHeapVtbl): ID3D12Pageable(ID3D12PageableVtbl) { - fn GetDesc( - &mut self, __ret_val: *mut ::D3D12_DESCRIPTOR_HEAP_DESC - ) -> *mut ::D3D12_DESCRIPTOR_HEAP_DESC, - fn GetCPUDescriptorHandleForHeapStart( - &mut self, __ret_val: *mut ::D3D12_CPU_DESCRIPTOR_HANDLE - ) -> *mut ::D3D12_CPU_DESCRIPTOR_HANDLE, - fn GetGPUDescriptorHandleForHeapStart( - &mut self, __ret_val: *mut ::D3D12_GPU_DESCRIPTOR_HANDLE - ) -> *mut ::D3D12_GPU_DESCRIPTOR_HANDLE -}); - - - -RIDL!( -interface ID3D12Device(ID3D12DeviceVtbl): ID3D12Object(ID3D12ObjectVtbl) { - fn GetNodeCount(&mut self) -> ::UINT, - fn CreateCommandQueue( - &mut self, pDesc: *const ::D3D12_COMMAND_QUEUE_DESC, riid: ::REFGUID, - ppCommandQueue: *mut *mut ::c_void - ) -> ::HRESULT, - fn CreateCommandAllocator( - &mut self, type_: ::D3D12_COMMAND_LIST_TYPE, riid: ::REFGUID, - ppCommandAllocator: *mut *mut ::c_void - ) -> ::HRESULT, - fn CreateGraphicsPipelineState( - &mut self, pDesc: *const ::D3D12_GRAPHICS_PIPELINE_STATE_DESC, riid: ::REFGUID, - ppPipelineState: *mut *mut ::c_void - ) -> ::HRESULT, - fn CreateComputePipelineState( - &mut self, pDesc: *const ::D3D12_COMPUTE_PIPELINE_STATE_DESC, riid: ::REFGUID, - ppPipelineState: *mut *mut ::c_void - ) -> ::HRESULT, - fn CreateCommandList( - &mut self, nodeMask: ::UINT, type_: ::D3D12_COMMAND_LIST_TYPE, - pCommandAllocator: *mut ::ID3D12CommandAllocator, - pInitialState: *mut ::ID3D12PipelineState, riid: ::REFGUID, - ppCommandList: *mut *mut ::c_void - ) -> ::HRESULT, - fn CheckFeatureSupport( - &mut self, Feature: ::D3D12_FEATURE, pFeatureSupportData: *mut ::c_void, - FeatureSupportDataSize: ::UINT - ) -> ::HRESULT, - fn CreateDescriptorHeap( - &mut self, pDescriptorHeapDesc: *const ::D3D12_DESCRIPTOR_HEAP_DESC, riid: ::REFGUID, - ppvHeap: *mut *mut ::c_void - ) -> ::HRESULT, - fn GetDescriptorHandleIncrementSize( - &mut self, DescriptorHeapType: ::D3D12_DESCRIPTOR_HEAP_TYPE - ) -> ::UINT, - fn CreateRootSignature( - &mut self, nodeMask: ::UINT, pBlobWithRootSignature: *const ::c_void, - blobLengthInBytes: ::SIZE_T, riid: ::REFGUID, ppvRootSignature: *mut *mut ::c_void - ) -> ::HRESULT, - fn CreateConstantBufferView( - &mut self, pDesc: *const ::D3D12_CONSTANT_BUFFER_VIEW_DESC, - DestDescriptor: ::D3D12_CPU_DESCRIPTOR_HANDLE - ) -> (), - fn CreateShaderResourceView( - &mut self, pResource: *mut ::ID3D12Resource, - pDesc: *const ::D3D12_SHADER_RESOURCE_VIEW_DESC, - DestDescriptor: ::D3D12_CPU_DESCRIPTOR_HANDLE - ) -> (), - fn CreateUnorderedAccessView( - &mut self, pResource: *mut ::ID3D12Resource, pCounterResource: *mut ::ID3D12Resource, - pDesc: *const ::D3D12_UNORDERED_ACCESS_VIEW_DESC, - DestDescriptor: ::D3D12_CPU_DESCRIPTOR_HANDLE - ) -> (), - fn CreateRenderTargetView( - &mut self, pResource: *mut ::ID3D12Resource, pDesc: *const ::D3D12_RENDER_TARGET_VIEW_DESC, - DestDescriptor: ::D3D12_CPU_DESCRIPTOR_HANDLE - ) -> (), - fn CreateDepthStencilView( - &mut self, pResource: *mut ::ID3D12Resource, pDesc: *const ::D3D12_DEPTH_STENCIL_VIEW_DESC, - DestDescriptor: ::D3D12_CPU_DESCRIPTOR_HANDLE - ) -> (), - fn CreateSampler( - &mut self, pDesc: *const ::D3D12_SAMPLER_DESC, - DestDescriptor: ::D3D12_CPU_DESCRIPTOR_HANDLE - ) -> (), - fn CopyDescriptors( - &mut self, NumDestDescriptorRanges: ::UINT, - pDestDescriptorRangeStarts: *const ::D3D12_CPU_DESCRIPTOR_HANDLE, - pDestDescriptorRangeSizes: *const ::UINT, NumSrcDescriptorRanges: ::UINT, - pSrcDescriptorRangeStarts: *const ::D3D12_CPU_DESCRIPTOR_HANDLE, - pSrcDescriptorRangeSizes: *const ::UINT, DescriptorHeapsType: ::D3D12_DESCRIPTOR_HEAP_TYPE - ) -> (), - fn CopyDescriptorsSimple( - &mut self, NumDescriptors: ::UINT, DestDescriptorRangeStart: ::D3D12_CPU_DESCRIPTOR_HANDLE, - SrcDescriptorRangeStart: ::D3D12_CPU_DESCRIPTOR_HANDLE, - DescriptorHeapsType: ::D3D12_DESCRIPTOR_HEAP_TYPE - ) -> (), - fn GetResourceAllocationInfo( - &mut self, visibleMask: ::UINT, numResourceDescs: ::UINT, - pResourceDescs: *const ::D3D12_RESOURCE_DESC, - __ret_val: *mut ::D3D12_RESOURCE_ALLOCATION_INFO - ) -> *mut ::D3D12_RESOURCE_ALLOCATION_INFO, - fn GetCustomHeapProperties( - &mut self, nodeMask: ::UINT, heapType: ::D3D12_HEAP_TYPE, - __ret_val: *mut ::D3D12_HEAP_PROPERTIES - ) -> *mut ::D3D12_HEAP_PROPERTIES, - fn CreateCommittedResource( - &mut self, pHeapProperties: *const ::D3D12_HEAP_PROPERTIES, HeapFlags: ::D3D12_HEAP_FLAGS, - pResourceDesc: *const ::D3D12_RESOURCE_DESC, InitialResourceState: ::D3D12_RESOURCE_STATES, - pOptimizedClearValue: *const ::D3D12_CLEAR_VALUE, riidResource: ::REFGUID, - ppvResource: *mut *mut ::c_void - ) -> ::HRESULT, - fn CreateHeap( - &mut self, pDesc: *const ::D3D12_HEAP_DESC, riid: ::REFGUID, ppvHeap: *mut *mut ::c_void - ) -> ::HRESULT, - fn CreatePlacedResource( - &mut self, pHeap: *mut ::ID3D12Heap, HeapOffset: ::UINT64, - pDesc: *const ::D3D12_RESOURCE_DESC, InitialState: ::D3D12_RESOURCE_STATES, - pOptimizedClearValue: *const ::D3D12_CLEAR_VALUE, riid: ::REFGUID, - ppvResource: *mut *mut ::c_void - ) -> ::HRESULT, - fn CreateReservedResource( - &mut self, pDesc: *const ::D3D12_RESOURCE_DESC, InitialState: ::D3D12_RESOURCE_STATES, - pOptimizedClearValue: *const ::D3D12_CLEAR_VALUE, riid: ::REFGUID, - ppvResource: *mut *mut ::c_void - ) -> ::HRESULT, - fn CreateSharedHandle( - &mut self, pObject: *mut ::ID3D12DeviceChild, pAttributes: *const ::SECURITY_ATTRIBUTES, - Access: ::DWORD, Name: ::LPCWSTR, pHandle: *mut ::HANDLE - ) -> ::HRESULT, - fn OpenSharedHandle( - &mut self, NTHandle: ::HANDLE, riid: ::REFGUID, ppvObj: *mut *mut ::c_void - ) -> ::HRESULT, - fn OpenSharedHandleByName( - &mut self, Name: ::LPCWSTR, Access: ::DWORD, pNTHandle: *mut ::HANDLE - ) -> ::HRESULT, - fn MakeResident( - &mut self, NumObjects: ::UINT, ppObjects: *mut *mut ::ID3D12Pageable - ) -> ::HRESULT, - fn Evict( - &mut self, NumObjects: ::UINT, ppObjects: *mut *mut ::ID3D12Pageable - ) -> ::HRESULT, - fn CreateFence( - &mut self, InitialValue: ::UINT64, Flags: ::D3D12_FENCE_FLAGS, riid: ::REFGUID, - ppFence: *mut *mut ::c_void - ) -> ::HRESULT, - fn GetDeviceRemovedReason(&mut self) -> ::HRESULT, - fn GetCopyableFootprints( - &mut self, pResourceDesc: *const ::D3D12_RESOURCE_DESC, FirstSubresource: ::UINT, - NumSubresources: ::UINT, BaseOffset: ::UINT64, - pLayouts: *mut ::D3D12_PLACED_SUBRESOURCE_FOOTPRINT, pNumRows: *mut ::UINT, - pRowSizeInBytes: *mut ::UINT64, pTotalBytes: *mut ::UINT64 - ) -> (), - fn CreateQueryHeap( - &mut self, pDesc: *const ::D3D12_QUERY_HEAP_DESC, riid: ::REFGUID, - ppvHeap: *mut *mut ::c_void - ) -> ::HRESULT, - fn SetStablePowerState(&mut self, Enable: ::BOOL) -> ::HRESULT, - fn CreateCommandSignature( - &mut self, pDesc: *const ::D3D12_COMMAND_SIGNATURE_DESC, - pRootSignature: *mut ::ID3D12RootSignature, riid: ::REFGUID, - ppvCommandSignature: *mut *mut ::c_void - ) -> ::HRESULT, - fn GetResourceTiling( - &mut self, pTiledResource: *mut ::ID3D12Resource, pNumTilesForEntireResource: *mut ::UINT, - pPackedMipDesc: *mut ::D3D12_PACKED_MIP_INFO, - pStandardTileShapeForNonPackedMips: *mut ::D3D12_TILE_SHAPE, - pNumSubresourceTilings: *mut ::UINT, FirstSubresourceTilingToGet: ::UINT, - pSubresourceTilingsForNonPackedMips: *mut ::D3D12_SUBRESOURCE_TILING - ) -> (), - fn GetAdapterLuid(&mut self, __ret_val: *mut ::LUID) -> *mut ::LUID -}); - -RIDL!( -interface ID3D12Fence(ID3D12FenceVtbl): ID3D12Pageable(ID3D12PageableVtbl) { - fn GetCompletedValue(&mut self) -> ::UINT64, - fn SetEventOnCompletion( - &mut self, Value: ::UINT64, hEvent: ::HANDLE - ) -> ::HRESULT, - fn Signal(&mut self, Value: ::UINT64) -> ::HRESULT -}); - -RIDL!( -interface ID3D12GraphicsCommandList(ID3D12GraphicsCommandListVtbl): ID3D12CommandList(ID3D12CommandListVtbl) { - fn Close(&mut self) -> ::HRESULT, - fn Reset( - &mut self, pAllocator: *mut ::ID3D12CommandAllocator, - pInitialState: *mut ::ID3D12PipelineState - ) -> ::HRESULT, - fn ClearState(&mut self, pPipelineState: *mut ::ID3D12PipelineState) -> (), - fn DrawInstanced( - &mut self, VertexCountPerInstance: ::UINT, InstanceCount: ::UINT, - StartVertexLocation: ::UINT, StartInstanceLocation: ::UINT - ) -> (), - fn DrawIndexedInstanced( - &mut self, IndexCountPerInstance: ::UINT, InstanceCount: ::UINT, - StartIndexLocation: ::UINT, BaseVertexLocation: ::INT, StartInstanceLocation: ::UINT - ) -> (), - fn Dispatch( - &mut self, ThreadGroupCountX: ::UINT, ThreadGroupCountY: ::UINT, ThreadGroupCountZ: ::UINT - ) -> (), - fn CopyBufferRegion( - &mut self, pDstBuffer: *mut ::ID3D12Resource, DstOffset: ::UINT64, - pSrcBuffer: *mut ::ID3D12Resource, SrcOffset: ::UINT64, NumBytes: ::UINT64 - ) -> (), - fn CopyTextureRegion( - &mut self, pDst: *const ::D3D12_TEXTURE_COPY_LOCATION, DstX: ::UINT, DstY: ::UINT, - DstZ: ::UINT, pSrc: *const ::D3D12_TEXTURE_COPY_LOCATION, pSrcBox: *const ::D3D12_BOX - ) -> (), - fn CopyResource( - &mut self, pDstResource: *mut ::ID3D12Resource, pSrcResource: *mut ::ID3D12Resource - ) -> (), - fn CopyTiles( - &mut self, pTiledResource: *mut ::ID3D12Resource, - pTileRegionStartCoordinate: *const ::D3D12_TILED_RESOURCE_COORDINATE, - pTileRegionSize: *const ::D3D12_TILE_REGION_SIZE, pBuffer: *mut ::ID3D12Resource, - BufferStartOffsetInBytes: ::UINT64, Flags: ::D3D12_TILE_COPY_FLAGS - ) -> (), - fn ResolveSubresource( - &mut self, pDstResource: *mut ::ID3D12Resource, DstSubresource: ::UINT, - pSrcResource: *mut ::ID3D12Resource, SrcSubresource: ::UINT, Format: ::DXGI_FORMAT - ) -> (), - fn IASetPrimitiveTopology( - &mut self, PrimitiveTopology: ::D3D12_PRIMITIVE_TOPOLOGY - ) -> (), - fn RSSetViewports( - &mut self, NumViewports: ::UINT, pViewports: *const ::D3D12_VIEWPORT - ) -> (), - fn RSSetScissorRects( - &mut self, NumRects: ::UINT, pRects: *const ::D3D12_RECT - ) -> (), - fn OMSetBlendFactor(&mut self, BlendFactor: *const [::FLOAT; 4]) -> (), - fn OMSetStencilRef(&mut self, StencilRef: ::UINT) -> (), - fn SetPipelineState( - &mut self, pPipelineState: *mut ::ID3D12PipelineState - ) -> (), - fn ResourceBarrier( - &mut self, NumBarriers: ::UINT, pBarriers: *const ::D3D12_RESOURCE_BARRIER - ) -> (), - fn ExecuteBundle( - &mut self, pCommandList: *mut ::ID3D12GraphicsCommandList - ) -> (), - fn SetDescriptorHeaps( - &mut self, NumDescriptorHeaps: ::UINT, ppDescriptorHeaps: *mut *mut ::ID3D12DescriptorHeap - ) -> (), - fn SetComputeRootSignature( - &mut self, pRootSignature: *mut ::ID3D12RootSignature - ) -> (), - fn SetGraphicsRootSignature( - &mut self, pRootSignature: *mut ::ID3D12RootSignature - ) -> (), - fn SetComputeRootDescriptorTable( - &mut self, RootParameterIndex: ::UINT, BaseDescriptor: ::D3D12_GPU_DESCRIPTOR_HANDLE - ) -> (), - fn SetGraphicsRootDescriptorTable( - &mut self, RootParameterIndex: ::UINT, BaseDescriptor: ::D3D12_GPU_DESCRIPTOR_HANDLE - ) -> (), - fn SetComputeRoot32BitConstant( - &mut self, RootParameterIndex: ::UINT, SrcData: ::UINT, DestOffsetIn32BitValues: ::UINT - ) -> (), - fn SetGraphicsRoot32BitConstant( - &mut self, RootParameterIndex: ::UINT, SrcData: ::UINT, DestOffsetIn32BitValues: ::UINT - ) -> (), - fn SetComputeRoot32BitConstants( - &mut self, RootParameterIndex: ::UINT, Num32BitValuesToSet: ::UINT, - pSrcData: *const ::c_void, DestOffsetIn32BitValues: ::UINT - ) -> (), - fn SetGraphicsRoot32BitConstants( - &mut self, RootParameterIndex: ::UINT, Num32BitValuesToSet: ::UINT, - pSrcData: *const ::c_void, DestOffsetIn32BitValues: ::UINT - ) -> (), - fn SetComputeRootConstantBufferView( - &mut self, RootParameterIndex: ::UINT, BufferLocation: ::D3D12_GPU_VIRTUAL_ADDRESS - ) -> (), - fn SetGraphicsRootConstantBufferView( - &mut self, RootParameterIndex: ::UINT, BufferLocation: ::D3D12_GPU_VIRTUAL_ADDRESS - ) -> (), - fn SetComputeRootShaderResourceView( - &mut self, RootParameterIndex: ::UINT, BufferLocation: ::D3D12_GPU_VIRTUAL_ADDRESS - ) -> (), - fn SetGraphicsRootShaderResourceView( - &mut self, RootParameterIndex: ::UINT, BufferLocation: ::D3D12_GPU_VIRTUAL_ADDRESS - ) -> (), - fn SetComputeRootUnorderedAccessView( - &mut self, RootParameterIndex: ::UINT, BufferLocation: ::D3D12_GPU_VIRTUAL_ADDRESS - ) -> (), - fn SetGraphicsRootUnorderedAccessView( - &mut self, RootParameterIndex: ::UINT, BufferLocation: ::D3D12_GPU_VIRTUAL_ADDRESS - ) -> (), - fn IASetIndexBuffer( - &mut self, pView: *const ::D3D12_INDEX_BUFFER_VIEW - ) -> (), - fn IASetVertexBuffers( - &mut self, StartSlot: ::UINT, NumViews: ::UINT, pViews: *const ::D3D12_VERTEX_BUFFER_VIEW - ) -> (), - fn SOSetTargets( - &mut self, StartSlot: ::UINT, NumViews: ::UINT, - pViews: *const ::D3D12_STREAM_OUTPUT_BUFFER_VIEW - ) -> (), - fn OMSetRenderTargets( - &mut self, NumRenderTargetDescriptors: ::UINT, - pRenderTargetDescriptors: *const ::D3D12_CPU_DESCRIPTOR_HANDLE, - RTsSingleHandleToDescriptorRange: ::BOOL, - pDepthStencilDescriptor: *const ::D3D12_CPU_DESCRIPTOR_HANDLE - ) -> (), - fn ClearDepthStencilView( - &mut self, DepthStencilView: ::D3D12_CPU_DESCRIPTOR_HANDLE, - ClearFlags: ::D3D12_CLEAR_FLAGS, Depth: ::FLOAT, Stencil: ::UINT8, NumRects: ::UINT, - pRects: *const ::D3D12_RECT - ) -> (), - fn ClearRenderTargetView( - &mut self, RenderTargetView: ::D3D12_CPU_DESCRIPTOR_HANDLE, ColorRGBA: *const [::FLOAT; 4], - NumRects: ::UINT, pRects: *const ::D3D12_RECT - ) -> (), - fn ClearUnorderedAccessViewUint( - &mut self, ViewGPUHandleInCurrentHeap: ::D3D12_GPU_DESCRIPTOR_HANDLE, - ViewCPUHandle: ::D3D12_CPU_DESCRIPTOR_HANDLE, pResource: *mut ::ID3D12Resource, - Values: *const [::UINT; 4], NumRects: ::UINT, pRects: *const ::D3D12_RECT - ) -> (), - fn ClearUnorderedAccessViewFloat( - &mut self, ViewGPUHandleInCurrentHeap: ::D3D12_GPU_DESCRIPTOR_HANDLE, - ViewCPUHandle: ::D3D12_CPU_DESCRIPTOR_HANDLE, pResource: *mut ::ID3D12Resource, - Values: *const [::FLOAT; 4], NumRects: ::UINT, pRects: *const ::D3D12_RECT - ) -> (), - fn DiscardResource( - &mut self, pResource: *mut ::ID3D12Resource, pRegion: *const ::D3D12_DISCARD_REGION - ) -> (), - fn BeginQuery( - &mut self, pQueryHeap: *mut ::ID3D12QueryHeap, Type: ::D3D12_QUERY_TYPE, Index: ::UINT - ) -> (), - fn EndQuery( - &mut self, pQueryHeap: *mut ::ID3D12QueryHeap, Type: ::D3D12_QUERY_TYPE, Index: ::UINT - ) -> (), - fn ResolveQueryData( - &mut self, pQueryHeap: *mut ::ID3D12QueryHeap, Type: ::D3D12_QUERY_TYPE, - StartIndex: ::UINT, NumQueries: ::UINT, pDestinationBuffer: *mut ::ID3D12Resource, - AlignedDestinationBufferOffset: ::UINT64 - ) -> (), - fn SetPredication( - &mut self, pBuffer: *mut ::ID3D12Resource, AlignedBufferOffset: ::UINT64, - Operation: ::D3D12_PREDICATION_OP - ) -> (), - fn SetMarker( - &mut self, Metadata: ::UINT, pData: *const ::c_void, Size: ::UINT - ) -> (), - fn BeginEvent( - &mut self, Metadata: ::UINT, pData: *const ::c_void, Size: ::UINT - ) -> (), - fn EndEvent(&mut self) -> (), - fn ExecuteIndirect( - &mut self, pCommandSignature: *mut ::ID3D12CommandSignature, MaxCommandCount: ::UINT, - pArgumentBuffer: *mut ::ID3D12Resource, ArgumentBufferOffset: ::UINT64, - pCountBuffer: *mut ::ID3D12Resource, CountBufferOffset: ::UINT64 - ) -> () -}); - -RIDL!( -interface ID3D12Heap(ID3D12HeapVtbl): ID3D12Pageable(ID3D12PageableVtbl) { - fn GetDesc( - &mut self, __ret_val: *mut ::D3D12_HEAP_DESC - ) -> *mut ::D3D12_HEAP_DESC -}); - - - -RIDL!( -interface ID3D12Pageable(ID3D12PageableVtbl): ID3D12DeviceChild(ID3D12DeviceChildVtbl) { -}); - -RIDL!( -interface ID3D12PipelineState(ID3D12PipelineStateVtbl): ID3D12Pageable(ID3D12PageableVtbl) { - fn GetCachedBlob(&mut self, ppBlob: *mut *mut ::ID3DBlob) -> ::HRESULT -}); - -RIDL!( -interface ID3D12QueryHeap(ID3D12QueryHeapVtbl): ID3D12Pageable(ID3D12PageableVtbl) { -}); - -RIDL!( -interface ID3D12Resource(ID3D12ResourceVtbl): ID3D12Pageable(ID3D12PageableVtbl) { - fn Map( - &mut self, Subresource: ::UINT, pReadRange: *const ::D3D12_RANGE, - ppData: *mut *mut ::c_void - ) -> ::HRESULT, - fn Unmap( - &mut self, Subresource: ::UINT, pWrittenRange: *const ::D3D12_RANGE - ) -> (), - fn GetDesc( - &mut self, __ret_val: *mut ::D3D12_RESOURCE_DESC - ) -> *mut ::D3D12_RESOURCE_DESC, - fn GetGPUVirtualAddress(&mut self) -> ::D3D12_GPU_VIRTUAL_ADDRESS, - fn WriteToSubresource( - &mut self, DstSubresource: ::UINT, pDstBox: *const ::D3D12_BOX, pSrcData: *const ::c_void, - SrcRowPitch: ::UINT, SrcDepthPitch: ::UINT - ) -> ::HRESULT, - fn ReadFromSubresource( - &mut self, pDstData: *mut ::c_void, DstRowPitch: ::UINT, DstDepthPitch: ::UINT, - SrcSubresource: ::UINT, pSrcBox: *const ::D3D12_BOX - ) -> ::HRESULT, - fn GetHeapProperties( - &mut self, pHeapProperties: *mut ::D3D12_HEAP_PROPERTIES, - pHeapFlags: *mut ::D3D12_HEAP_FLAGS - ) -> ::HRESULT -}); - -RIDL!( -interface ID3D12RootSignatureDeserializer(ID3D12RootSignatureDeserializerVtbl): IUnknown(IUnknownVtbl) { - fn GetRootSignatureDesc(&mut self) -> *const ::D3D12_ROOT_SIGNATURE_DESC -}); - - - -pub type PFN_D3D12_CREATE_DEVICE = extern "system" fn (_ : *mut ::IUnknown, _ : ::D3D_FEATURE_LEVEL, _ : ::REFGUID, _ : *mut *mut ::c_void) -> ::HRESULT; -pub type PFN_D3D12_CREATE_ROOT_SIGNATURE_DESERIALIZER = extern "system" fn (pSrcData: ::LPCVOID, SrcDataSizeInBytes: ::SIZE_T, pRootSignatureDeserializerInterface: ::REFGUID, ppRootSignatureDeserializer: *mut *mut ::c_void) -> ::HRESULT; -pub type PFN_D3D12_GET_DEBUG_INTERFACE = extern "system" fn (_ : ::REFGUID, _ : *mut *mut ::c_void) -> ::HRESULT; -pub type PFN_D3D12_SERIALIZE_ROOT_SIGNATURE = extern "system" fn (pRootSignature: *const ::D3D12_ROOT_SIGNATURE_DESC, Version: ::D3D_ROOT_SIGNATURE_VERSION, ppBlob: *mut *mut ::ID3DBlob, ppErrorBlob: *mut *mut ::ID3DBlob) -> ::HRESULT; - -DEFINE_GUID!(IID_ID3D12Object,0xc4fec28f,0x7966,0x4e95,0x9f,0x94,0xf4,0x31,0xcb, - 0x56,0xc3,0xb8); -DEFINE_GUID!(IID_ID3D12DeviceChild,0x905db94b,0xa00c,0x4140,0x9d,0xf5,0x2b,0x64, - 0xca,0x9e,0xa3,0x57); -DEFINE_GUID!(IID_ID3D12RootSignature,0xc54a6b66,0x72df,0x4ee8,0x8b,0xe5,0xa9, - 0x46,0xa1,0x42,0x92,0x14); -DEFINE_GUID!(IID_ID3D12RootSignatureDeserializer,0x34AB647B,0x3CC8,0x46AC,0x84, - 0x1B,0xC0,0x96,0x56,0x45,0xC0,0x46); -DEFINE_GUID!(IID_ID3D12Pageable,0x63ee58fb,0x1268,0x4835,0x86,0xda,0xf0,0x08, - 0xce,0x62,0xf0,0xd6); -DEFINE_GUID!(IID_ID3D12Heap,0x6b3b2502,0x6e51,0x45b3,0x90,0xee,0x98,0x84,0x26, - 0x5e,0x8d,0xf3); -DEFINE_GUID!(IID_ID3D12Resource,0x696442be,0xa72e,0x4059,0xbc,0x79,0x5b,0x5c, - 0x98,0x04,0x0f,0xad); -DEFINE_GUID!(IID_ID3D12CommandAllocator,0x6102dee4,0xaf59,0x4b09,0xb9,0x99,0xb4, - 0x4d,0x73,0xf0,0x9b,0x24); -DEFINE_GUID!(IID_ID3D12Fence,0x0a753dcf,0xc4d8,0x4b91,0xad,0xf6,0xbe,0x5a,0x60, - 0xd9,0x5a,0x76); -DEFINE_GUID!(IID_ID3D12PipelineState,0x765a30f3,0xf624,0x4c6f,0xa8,0x28,0xac, - 0xe9,0x48,0x62,0x24,0x45); -DEFINE_GUID!(IID_ID3D12DescriptorHeap,0x8efb471d,0x616c,0x4f49,0x90,0xf7,0x12, - 0x7b,0xb7,0x63,0xfa,0x51); -DEFINE_GUID!(IID_ID3D12QueryHeap,0x0d9658ae,0xed45,0x469e,0xa6,0x1d,0x97,0x0e, - 0xc5,0x83,0xca,0xb4); -DEFINE_GUID!(IID_ID3D12CommandSignature,0xc36a797c,0xec80,0x4f0a,0x89,0x85,0xa7, - 0xb2,0x47,0x50,0x82,0xd1); -DEFINE_GUID!(IID_ID3D12CommandList,0x7116d91c,0xe7e4,0x47ce,0xb8,0xc6,0xec,0x81, - 0x68,0xf4,0x37,0xe5); -DEFINE_GUID!(IID_ID3D12GraphicsCommandList,0x5b160d0f,0xac1b,0x4185,0x8b,0xa8, - 0xb3,0xae,0x42,0xa5,0xa4,0x55); -DEFINE_GUID!(IID_ID3D12CommandQueue,0x0ec870a6,0x5d7e,0x4c22,0x8c,0xfc,0x5b, - 0xaa,0xe0,0x76,0x16,0xed); -DEFINE_GUID!(IID_ID3D12Device,0x189819f1,0x1db6,0x4b57,0xbe,0x54,0x18,0x21,0x33, - 0x9b,0x85,0xf7); diff --git a/deps/winapi-0.2.5/src/d3d12sdklayers.rs b/deps/winapi-0.2.5/src/d3d12sdklayers.rs deleted file mode 100644 index baa9d7882..000000000 --- a/deps/winapi-0.2.5/src/d3d12sdklayers.rs +++ /dev/null @@ -1,1075 +0,0 @@ -// Copyright © 2015, Dmitry Roschin -// Licensed under the MIT License <LICENSE.md> -RIDL!{interface ID3D12Debug(ID3D12DebugVtbl): IUnknown(IUnknownVtbl) { - fn EnableDebugLayer(&mut self) -> () -}} -FLAGS!{enum D3D12_DEBUG_FEATURE { - D3D12_DEBUG_FEATURE_NONE = 0, - D3D12_DEBUG_FEATURE_TREAT_BUNDLE_AS_DRAW = 0x1, - D3D12_DEBUG_FEATURE_TREAT_BUNDLE_AS_DISPATCH = 0x2, -}} -FLAGS!{enum D3D12_RLDO_FLAGS { - D3D12_RLDO_NONE = 0x0, - D3D12_RLDO_SUMMARY = 0x1, - D3D12_RLDO_DETAIL = 0x2, - D3D12_RLDO_IGNORE_INTERNAL = 0x4, -}} -RIDL!{interface ID3D12DebugDevice(ID3D12DebugDeviceVtbl): IUnknown(IUnknownVtbl) { - fn SetFeatureMask(&mut self, Mask: ::D3D12_DEBUG_FEATURE) -> ::HRESULT, - fn GetFeatureMask(&mut self) -> ::D3D12_DEBUG_FEATURE, - fn ReportLiveDeviceObjects(&mut self, Flags: ::D3D12_RLDO_FLAGS) -> ::HRESULT -}} -DEFINE_GUID!{DXGI_DEBUG_D3D12, 0xcf59a98c, 0xa950, 0x4326, - 0x91, 0xef, 0x9b, 0xba, 0xa1, 0x7b, 0xfd, 0x95} -RIDL!{interface ID3D12DebugCommandQueue(ID3D12DebugCommandQueueVtbl): IUnknown(IUnknownVtbl) { - fn AssertResourceState( - &mut self, pResource: *mut ::ID3D12Resource, Subresource: ::UINT, State: ::UINT - ) -> ::BOOL -}} -RIDL!{interface ID3D12DebugCommandList(ID3D12DebugCommandListVtbl): IUnknown(IUnknownVtbl) { - fn AssertResourceState( - &mut self, pResource: *mut ::ID3D12Resource, Subresource: ::UINT, State: ::UINT - ) -> ::BOOL, - fn SetFeatureMask(&mut self, Mask: ::D3D12_DEBUG_FEATURE) -> ::HRESULT, - fn GetFeatureMask(&mut self) -> ::D3D12_DEBUG_FEATURE -}} -ENUM!{enum D3D12_MESSAGE_CATEGORY { - D3D12_MESSAGE_CATEGORY_APPLICATION_DEFINED = 0, - D3D12_MESSAGE_CATEGORY_MISCELLANEOUS = 1, - D3D12_MESSAGE_CATEGORY_INITIALIZATION = 2, - D3D12_MESSAGE_CATEGORY_CLEANUP = 3, - D3D12_MESSAGE_CATEGORY_COMPILATION = 4, - D3D12_MESSAGE_CATEGORY_STATE_CREATION = 5, - D3D12_MESSAGE_CATEGORY_STATE_SETTING = 6, - D3D12_MESSAGE_CATEGORY_STATE_GETTING = 7, - D3D12_MESSAGE_CATEGORY_RESOURCE_MANIPULATION = 8, - D3D12_MESSAGE_CATEGORY_EXECUTION = 9, - D3D12_MESSAGE_CATEGORY_SHADER = 10, -}} -ENUM!{enum D3D12_MESSAGE_SEVERITY { - D3D12_MESSAGE_SEVERITY_CORRUPTION = 0, - D3D12_MESSAGE_SEVERITY_ERROR = 1, - D3D12_MESSAGE_SEVERITY_WARNING = 2, - D3D12_MESSAGE_SEVERITY_INFO = 3, - D3D12_MESSAGE_SEVERITY_MESSAGE = 4, -}} -ENUM!{enum D3D12_MESSAGE_ID { - D3D12_MESSAGE_ID_UNKNOWN = 0, - D3D12_MESSAGE_ID_STRING_FROM_APPLICATION = 1, - D3D12_MESSAGE_ID_CORRUPTED_THIS = 2, - D3D12_MESSAGE_ID_CORRUPTED_PARAMETER1 = 3, - D3D12_MESSAGE_ID_CORRUPTED_PARAMETER2 = 4, - D3D12_MESSAGE_ID_CORRUPTED_PARAMETER3 = 5, - D3D12_MESSAGE_ID_CORRUPTED_PARAMETER4 = 6, - D3D12_MESSAGE_ID_CORRUPTED_PARAMETER5 = 7, - D3D12_MESSAGE_ID_CORRUPTED_PARAMETER6 = 8, - D3D12_MESSAGE_ID_CORRUPTED_PARAMETER7 = 9, - D3D12_MESSAGE_ID_CORRUPTED_PARAMETER8 = 10, - D3D12_MESSAGE_ID_CORRUPTED_PARAMETER9 = 11, - D3D12_MESSAGE_ID_CORRUPTED_PARAMETER10 = 12, - D3D12_MESSAGE_ID_CORRUPTED_PARAMETER11 = 13, - D3D12_MESSAGE_ID_CORRUPTED_PARAMETER12 = 14, - D3D12_MESSAGE_ID_CORRUPTED_PARAMETER13 = 15, - D3D12_MESSAGE_ID_CORRUPTED_PARAMETER14 = 16, - D3D12_MESSAGE_ID_CORRUPTED_PARAMETER15 = 17, - D3D12_MESSAGE_ID_CORRUPTED_MULTITHREADING = 18, - D3D12_MESSAGE_ID_MESSAGE_REPORTING_OUTOFMEMORY = 19, - D3D12_MESSAGE_ID_GETPRIVATEDATA_MOREDATA = 20, - D3D12_MESSAGE_ID_SETPRIVATEDATA_INVALIDFREEDATA = 21, - D3D12_MESSAGE_ID_SETPRIVATEDATA_INVALIDIUNKNOWN = 22, - D3D12_MESSAGE_ID_SETPRIVATEDATA_INVALIDFLAGS = 23, - D3D12_MESSAGE_ID_SETPRIVATEDATA_CHANGINGPARAMS = 24, - D3D12_MESSAGE_ID_SETPRIVATEDATA_OUTOFMEMORY = 25, - D3D12_MESSAGE_ID_CREATESHADERRESOURCEVIEW_UNRECOGNIZEDFORMAT = 26, - D3D12_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDDESC = 27, - D3D12_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDFORMAT = 28, - D3D12_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDVIDEOPLANESLICE = 29, - D3D12_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDPLANESLICE = 30, - D3D12_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDDIMENSIONS = 31, - D3D12_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDRESOURCE = 32, - D3D12_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDARG_RETURN = 33, - D3D12_MESSAGE_ID_CREATESHADERRESOURCEVIEW_OUTOFMEMORY_RETURN = 34, - D3D12_MESSAGE_ID_CREATERENDERTARGETVIEW_UNRECOGNIZEDFORMAT = 35, - D3D12_MESSAGE_ID_CREATERENDERTARGETVIEW_UNSUPPORTEDFORMAT = 36, - D3D12_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDDESC = 37, - D3D12_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDFORMAT = 38, - D3D12_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDVIDEOPLANESLICE = 39, - D3D12_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDPLANESLICE = 40, - D3D12_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDDIMENSIONS = 41, - D3D12_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDRESOURCE = 42, - D3D12_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDARG_RETURN = 43, - D3D12_MESSAGE_ID_CREATERENDERTARGETVIEW_OUTOFMEMORY_RETURN = 44, - D3D12_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_UNRECOGNIZEDFORMAT = 45, - D3D12_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_INVALIDDESC = 46, - D3D12_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_INVALIDFORMAT = 47, - D3D12_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_INVALIDDIMENSIONS = 48, - D3D12_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_INVALIDRESOURCE = 49, - D3D12_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_INVALIDARG_RETURN = 50, - D3D12_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_OUTOFMEMORY_RETURN = 51, - D3D12_MESSAGE_ID_CREATEINPUTLAYOUT_OUTOFMEMORY = 52, - D3D12_MESSAGE_ID_CREATEINPUTLAYOUT_TOOMANYELEMENTS = 53, - D3D12_MESSAGE_ID_CREATEINPUTLAYOUT_INVALIDFORMAT = 54, - D3D12_MESSAGE_ID_CREATEINPUTLAYOUT_INCOMPATIBLEFORMAT = 55, - D3D12_MESSAGE_ID_CREATEINPUTLAYOUT_INVALIDSLOT = 56, - D3D12_MESSAGE_ID_CREATEINPUTLAYOUT_INVALIDINPUTSLOTCLASS = 57, - D3D12_MESSAGE_ID_CREATEINPUTLAYOUT_STEPRATESLOTCLASSMISMATCH = 58, - D3D12_MESSAGE_ID_CREATEINPUTLAYOUT_INVALIDSLOTCLASSCHANGE = 59, - D3D12_MESSAGE_ID_CREATEINPUTLAYOUT_INVALIDSTEPRATECHANGE = 60, - D3D12_MESSAGE_ID_CREATEINPUTLAYOUT_INVALIDALIGNMENT = 61, - D3D12_MESSAGE_ID_CREATEINPUTLAYOUT_DUPLICATESEMANTIC = 62, - D3D12_MESSAGE_ID_CREATEINPUTLAYOUT_UNPARSEABLEINPUTSIGNATURE = 63, - D3D12_MESSAGE_ID_CREATEINPUTLAYOUT_NULLSEMANTIC = 64, - D3D12_MESSAGE_ID_CREATEINPUTLAYOUT_MISSINGELEMENT = 65, - D3D12_MESSAGE_ID_CREATEVERTEXSHADER_OUTOFMEMORY = 66, - D3D12_MESSAGE_ID_CREATEVERTEXSHADER_INVALIDSHADERBYTECODE = 67, - D3D12_MESSAGE_ID_CREATEVERTEXSHADER_INVALIDSHADERTYPE = 68, - D3D12_MESSAGE_ID_CREATEGEOMETRYSHADER_OUTOFMEMORY = 69, - D3D12_MESSAGE_ID_CREATEGEOMETRYSHADER_INVALIDSHADERBYTECODE = 70, - D3D12_MESSAGE_ID_CREATEGEOMETRYSHADER_INVALIDSHADERTYPE = 71, - D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_OUTOFMEMORY = 72, - D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDSHADERBYTECODE = 73, - D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDSHADERTYPE = 74, - D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDNUMENTRIES = 75, - D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_OUTPUTSTREAMSTRIDEUNUSED = 76, - D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_UNEXPECTEDDECL = 77, - D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_EXPECTEDDECL = 78, - D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_OUTPUTSLOT0EXPECTED = 79, - D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDOUTPUTSLOT = 80, - D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_ONLYONEELEMENTPERSLOT = 81, - D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDCOMPONENTCOUNT = 82, - D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDSTARTCOMPONENTANDCOMPONENTCOUNT = 83, - D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDGAPDEFINITION = 84, - D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_REPEATEDOUTPUT = 85, - D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDOUTPUTSTREAMSTRIDE = 86, - D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_MISSINGSEMANTIC = 87, - D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_MASKMISMATCH = 88, - D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_CANTHAVEONLYGAPS = 89, - D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_DECLTOOCOMPLEX = 90, - D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_MISSINGOUTPUTSIGNATURE = 91, - D3D12_MESSAGE_ID_CREATEPIXELSHADER_OUTOFMEMORY = 92, - D3D12_MESSAGE_ID_CREATEPIXELSHADER_INVALIDSHADERBYTECODE = 93, - D3D12_MESSAGE_ID_CREATEPIXELSHADER_INVALIDSHADERTYPE = 94, - D3D12_MESSAGE_ID_CREATERASTERIZERSTATE_INVALIDFILLMODE = 95, - D3D12_MESSAGE_ID_CREATERASTERIZERSTATE_INVALIDCULLMODE = 96, - D3D12_MESSAGE_ID_CREATERASTERIZERSTATE_INVALIDDEPTHBIASCLAMP = 97, - D3D12_MESSAGE_ID_CREATERASTERIZERSTATE_INVALIDSLOPESCALEDDEPTHBIAS = 98, - D3D12_MESSAGE_ID_CREATERASTERIZERSTATE_NULLDESC = 99, - D3D12_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDDEPTHWRITEMASK = 100, - D3D12_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDDEPTHFUNC = 101, - D3D12_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDFRONTFACESTENCILFAILOP = 102, - D3D12_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDFRONTFACESTENCILZFAILOP = 103, - D3D12_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDFRONTFACESTENCILPASSOP = 104, - D3D12_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDFRONTFACESTENCILFUNC = 105, - D3D12_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDBACKFACESTENCILFAILOP = 106, - D3D12_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDBACKFACESTENCILZFAILOP = 107, - D3D12_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDBACKFACESTENCILPASSOP = 108, - D3D12_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDBACKFACESTENCILFUNC = 109, - D3D12_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_NULLDESC = 110, - D3D12_MESSAGE_ID_CREATEBLENDSTATE_INVALIDSRCBLEND = 111, - D3D12_MESSAGE_ID_CREATEBLENDSTATE_INVALIDDESTBLEND = 112, - D3D12_MESSAGE_ID_CREATEBLENDSTATE_INVALIDBLENDOP = 113, - D3D12_MESSAGE_ID_CREATEBLENDSTATE_INVALIDSRCBLENDALPHA = 114, - D3D12_MESSAGE_ID_CREATEBLENDSTATE_INVALIDDESTBLENDALPHA = 115, - D3D12_MESSAGE_ID_CREATEBLENDSTATE_INVALIDBLENDOPALPHA = 116, - D3D12_MESSAGE_ID_CREATEBLENDSTATE_INVALIDRENDERTARGETWRITEMASK = 117, - D3D12_MESSAGE_ID_CREATEBLENDSTATE_NULLDESC = 118, - D3D12_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDFILTER = 119, - D3D12_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDADDRESSU = 120, - D3D12_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDADDRESSV = 121, - D3D12_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDADDRESSW = 122, - D3D12_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDMIPLODBIAS = 123, - D3D12_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDMAXANISOTROPY = 124, - D3D12_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDCOMPARISONFUNC = 125, - D3D12_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDMINLOD = 126, - D3D12_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDMAXLOD = 127, - D3D12_MESSAGE_ID_CREATESAMPLERSTATE_NULLDESC = 128, - D3D12_MESSAGE_ID_DEVICE_IASETPRIMITIVETOPOLOGY_TOPOLOGY_UNRECOGNIZED = 129, - D3D12_MESSAGE_ID_DEVICE_IASETPRIMITIVETOPOLOGY_TOPOLOGY_UNDEFINED = 130, - D3D12_MESSAGE_ID_DEVICE_RSSETVIEWPORTS_INVALIDVIEWPORT = 131, - D3D12_MESSAGE_ID_DEVICE_RSSETSCISSORRECTS_INVALIDSCISSOR = 132, - D3D12_MESSAGE_ID_CLEARRENDERTARGETVIEW_DENORMFLUSH = 133, - D3D12_MESSAGE_ID_CLEARDEPTHSTENCILVIEW_DENORMFLUSH = 134, - D3D12_MESSAGE_ID_CLEARDEPTHSTENCILVIEW_INVALID = 135, - D3D12_MESSAGE_ID_COPYRESOURCE_INVALIDSOURCE = 136, - D3D12_MESSAGE_ID_COPYRESOURCE_INVALIDDESTINATIONSTATE = 137, - D3D12_MESSAGE_ID_COPYRESOURCE_INVALIDSOURCESTATE = 138, - D3D12_MESSAGE_ID_UPDATESUBRESOURCE_INVALIDDESTINATIONSUBRESOURCE = 139, - D3D12_MESSAGE_ID_UPDATESUBRESOURCE_INVALIDDESTINATIONBOX = 140, - D3D12_MESSAGE_ID_UPDATESUBRESOURCE_INVALIDDESTINATIONSTATE = 141, - D3D12_MESSAGE_ID_DEVICE_RESOLVESUBRESOURCE_DESTINATION_INVALID = 142, - D3D12_MESSAGE_ID_DEVICE_RESOLVESUBRESOURCE_DESTINATION_SUBRESOURCE_INVALID = 143, - D3D12_MESSAGE_ID_DEVICE_RESOLVESUBRESOURCE_SOURCE_INVALID = 144, - D3D12_MESSAGE_ID_DEVICE_RESOLVESUBRESOURCE_SOURCE_SUBRESOURCE_INVALID = 145, - D3D12_MESSAGE_ID_DEVICE_RESOLVESUBRESOURCE_FORMAT_INVALID = 146, - D3D12_MESSAGE_ID_BUFFER_MAP_INVALIDMAPTYPE = 147, - D3D12_MESSAGE_ID_BUFFER_MAP_INVALIDFLAGS = 148, - D3D12_MESSAGE_ID_BUFFER_MAP_ALREADYMAPPED = 149, - D3D12_MESSAGE_ID_BUFFER_MAP_DEVICEREMOVED_RETURN = 150, - D3D12_MESSAGE_ID_BUFFER_UNMAP_NOTMAPPED = 151, - D3D12_MESSAGE_ID_TEXTURE1D_MAP_INVALIDMAPTYPE = 152, - D3D12_MESSAGE_ID_TEXTURE1D_MAP_INVALIDSUBRESOURCE = 153, - D3D12_MESSAGE_ID_TEXTURE1D_MAP_INVALIDFLAGS = 154, - D3D12_MESSAGE_ID_TEXTURE1D_MAP_ALREADYMAPPED = 155, - D3D12_MESSAGE_ID_TEXTURE1D_MAP_DEVICEREMOVED_RETURN = 156, - D3D12_MESSAGE_ID_TEXTURE1D_UNMAP_INVALIDSUBRESOURCE = 157, - D3D12_MESSAGE_ID_TEXTURE1D_UNMAP_NOTMAPPED = 158, - D3D12_MESSAGE_ID_TEXTURE2D_MAP_INVALIDMAPTYPE = 159, - D3D12_MESSAGE_ID_TEXTURE2D_MAP_INVALIDSUBRESOURCE = 160, - D3D12_MESSAGE_ID_TEXTURE2D_MAP_INVALIDFLAGS = 161, - D3D12_MESSAGE_ID_TEXTURE2D_MAP_ALREADYMAPPED = 162, - D3D12_MESSAGE_ID_TEXTURE2D_MAP_DEVICEREMOVED_RETURN = 163, - D3D12_MESSAGE_ID_TEXTURE2D_UNMAP_INVALIDSUBRESOURCE = 164, - D3D12_MESSAGE_ID_TEXTURE2D_UNMAP_NOTMAPPED = 165, - D3D12_MESSAGE_ID_TEXTURE3D_MAP_INVALIDMAPTYPE = 166, - D3D12_MESSAGE_ID_TEXTURE3D_MAP_INVALIDSUBRESOURCE = 167, - D3D12_MESSAGE_ID_TEXTURE3D_MAP_INVALIDFLAGS = 168, - D3D12_MESSAGE_ID_TEXTURE3D_MAP_ALREADYMAPPED = 169, - D3D12_MESSAGE_ID_TEXTURE3D_MAP_DEVICEREMOVED_RETURN = 170, - D3D12_MESSAGE_ID_TEXTURE3D_UNMAP_INVALIDSUBRESOURCE = 171, - D3D12_MESSAGE_ID_TEXTURE3D_UNMAP_NOTMAPPED = 172, - D3D12_MESSAGE_ID_CHECKFORMATSUPPORT_FORMAT_DEPRECATED = 173, - D3D12_MESSAGE_ID_CHECKMULTISAMPLEQUALITYLEVELS_FORMAT_DEPRECATED = 174, - D3D12_MESSAGE_ID_SETEXCEPTIONMODE_UNRECOGNIZEDFLAGS = 175, - D3D12_MESSAGE_ID_SETEXCEPTIONMODE_INVALIDARG_RETURN = 176, - D3D12_MESSAGE_ID_SETEXCEPTIONMODE_DEVICEREMOVED_RETURN = 177, - D3D12_MESSAGE_ID_REF_SIMULATING_INFINITELY_FAST_HARDWARE = 178, - D3D12_MESSAGE_ID_REF_THREADING_MODE = 179, - D3D12_MESSAGE_ID_REF_UMDRIVER_EXCEPTION = 180, - D3D12_MESSAGE_ID_REF_KMDRIVER_EXCEPTION = 181, - D3D12_MESSAGE_ID_REF_HARDWARE_EXCEPTION = 182, - D3D12_MESSAGE_ID_REF_ACCESSING_INDEXABLE_TEMP_OUT_OF_RANGE = 183, - D3D12_MESSAGE_ID_REF_PROBLEM_PARSING_SHADER = 184, - D3D12_MESSAGE_ID_REF_OUT_OF_MEMORY = 185, - D3D12_MESSAGE_ID_REF_INFO = 186, - D3D12_MESSAGE_ID_DEVICE_DRAW_VERTEXPOS_OVERFLOW = 187, - D3D12_MESSAGE_ID_DEVICE_DRAWINDEXED_INDEXPOS_OVERFLOW = 188, - D3D12_MESSAGE_ID_DEVICE_DRAWINSTANCED_VERTEXPOS_OVERFLOW = 189, - D3D12_MESSAGE_ID_DEVICE_DRAWINSTANCED_INSTANCEPOS_OVERFLOW = 190, - D3D12_MESSAGE_ID_DEVICE_DRAWINDEXEDINSTANCED_INSTANCEPOS_OVERFLOW = 191, - D3D12_MESSAGE_ID_DEVICE_DRAWINDEXEDINSTANCED_INDEXPOS_OVERFLOW = 192, - D3D12_MESSAGE_ID_DEVICE_DRAW_VERTEX_SHADER_NOT_SET = 193, - D3D12_MESSAGE_ID_DEVICE_SHADER_LINKAGE_SEMANTICNAME_NOT_FOUND = 194, - D3D12_MESSAGE_ID_DEVICE_SHADER_LINKAGE_REGISTERINDEX = 195, - D3D12_MESSAGE_ID_DEVICE_SHADER_LINKAGE_COMPONENTTYPE = 196, - D3D12_MESSAGE_ID_DEVICE_SHADER_LINKAGE_REGISTERMASK = 197, - D3D12_MESSAGE_ID_DEVICE_SHADER_LINKAGE_SYSTEMVALUE = 198, - D3D12_MESSAGE_ID_DEVICE_SHADER_LINKAGE_NEVERWRITTEN_ALWAYSREADS = 199, - D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_ROOT_SIGNATURE_NOT_SET = 200, - D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_ROOT_SIGNATURE_MISMATCH = 201, - D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_VERTEX_BUFFER_NOT_SET = 202, - D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_INPUTLAYOUT_NOT_SET = 203, - D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_CONSTANT_BUFFER_NOT_SET = 204, - D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_CONSTANT_BUFFER_TOO_SMALL = 205, - D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_SAMPLER_NOT_SET = 206, - D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_SHADERRESOURCEVIEW_NOT_SET = 207, - D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_VIEW_DIMENSION_MISMATCH = 208, - D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_VERTEX_BUFFER_STRIDE_TOO_SMALL = 209, - D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_VERTEX_BUFFER_TOO_SMALL = 210, - D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_INDEX_BUFFER_NOT_SET = 211, - D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_INDEX_BUFFER_FORMAT_INVALID = 212, - D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_INDEX_BUFFER_TOO_SMALL = 213, - D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_GS_INPUT_PRIMITIVE_MISMATCH = 214, - D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_RESOURCE_RETURN_TYPE_MISMATCH = 215, - D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_POSITION_NOT_PRESENT = 216, - D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_OUTPUT_STREAM_NOT_SET = 217, - D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_BOUND_RESOURCE_MAPPED = 218, - D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_INVALID_PRIMITIVETOPOLOGY = 219, - D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_VERTEX_OFFSET_UNALIGNED = 220, - D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_VERTEX_STRIDE_UNALIGNED = 221, - D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_INDEX_OFFSET_UNALIGNED = 222, - D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_OUTPUT_STREAM_OFFSET_UNALIGNED = 223, - D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_RESOURCE_FORMAT_LD_UNSUPPORTED = 224, - D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_RESOURCE_FORMAT_SAMPLE_UNSUPPORTED = 225, - D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_RESOURCE_FORMAT_SAMPLE_C_UNSUPPORTED = 226, - D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_RESOURCE_MULTISAMPLE_UNSUPPORTED = 227, - D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_SO_TARGETS_BOUND_WITHOUT_SOURCE = 228, - D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_SO_STRIDE_LARGER_THAN_BUFFER = 229, - D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_OM_RENDER_TARGET_DOES_NOT_SUPPORT_BLENDING = 230, - D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_OM_DUAL_SOURCE_BLENDING_CAN_ONLY_HAVE_RENDER_TARGET_0 = 231, - D3D12_MESSAGE_ID_DEVICE_REMOVAL_PROCESS_AT_FAULT = 232, - D3D12_MESSAGE_ID_DEVICE_REMOVAL_PROCESS_POSSIBLY_AT_FAULT = 233, - D3D12_MESSAGE_ID_DEVICE_REMOVAL_PROCESS_NOT_AT_FAULT = 234, - D3D12_MESSAGE_ID_DEVICE_OPEN_SHARED_RESOURCE_INVALIDARG_RETURN = 235, - D3D12_MESSAGE_ID_DEVICE_OPEN_SHARED_RESOURCE_OUTOFMEMORY_RETURN = 236, - D3D12_MESSAGE_ID_DEVICE_OPEN_SHARED_RESOURCE_BADINTERFACE_RETURN = 237, - D3D12_MESSAGE_ID_DEVICE_DRAW_VIEWPORT_NOT_SET = 238, - D3D12_MESSAGE_ID_CREATEINPUTLAYOUT_TRAILING_DIGIT_IN_SEMANTIC = 239, - D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_TRAILING_DIGIT_IN_SEMANTIC = 240, - D3D12_MESSAGE_ID_DEVICE_RSSETVIEWPORTS_DENORMFLUSH = 241, - D3D12_MESSAGE_ID_OMSETRENDERTARGETS_INVALIDVIEW = 242, - D3D12_MESSAGE_ID_DEVICE_SETTEXTFILTERSIZE_INVALIDDIMENSIONS = 243, - D3D12_MESSAGE_ID_DEVICE_DRAW_SAMPLER_MISMATCH = 244, - D3D12_MESSAGE_ID_CREATEINPUTLAYOUT_TYPE_MISMATCH = 245, - D3D12_MESSAGE_ID_BLENDSTATE_GETDESC_LEGACY = 246, - D3D12_MESSAGE_ID_SHADERRESOURCEVIEW_GETDESC_LEGACY = 247, - D3D12_MESSAGE_ID_DEVICE_DRAW_PS_OUTPUT_TYPE_MISMATCH = 248, - D3D12_MESSAGE_ID_DEVICE_DRAW_RESOURCE_FORMAT_GATHER_UNSUPPORTED = 249, - D3D12_MESSAGE_ID_DEVICE_DRAW_INVALID_USE_OF_CENTER_MULTISAMPLE_PATTERN = 250, - D3D12_MESSAGE_ID_DEVICE_IASETVERTEXBUFFERS_STRIDE_TOO_LARGE = 251, - D3D12_MESSAGE_ID_DEVICE_IASETVERTEXBUFFERS_INVALIDRANGE = 252, - D3D12_MESSAGE_ID_CREATEINPUTLAYOUT_EMPTY_LAYOUT = 253, - D3D12_MESSAGE_ID_DEVICE_DRAW_RESOURCE_SAMPLE_COUNT_MISMATCH = 254, - D3D12_MESSAGE_ID_LIVE_OBJECT_SUMMARY = 255, - D3D12_MESSAGE_ID_LIVE_BUFFER = 256, - D3D12_MESSAGE_ID_LIVE_TEXTURE1D = 257, - D3D12_MESSAGE_ID_LIVE_TEXTURE2D = 258, - D3D12_MESSAGE_ID_LIVE_TEXTURE3D = 259, - D3D12_MESSAGE_ID_LIVE_SHADERRESOURCEVIEW = 260, - D3D12_MESSAGE_ID_LIVE_RENDERTARGETVIEW = 261, - D3D12_MESSAGE_ID_LIVE_DEPTHSTENCILVIEW = 262, - D3D12_MESSAGE_ID_LIVE_VERTEXSHADER = 263, - D3D12_MESSAGE_ID_LIVE_GEOMETRYSHADER = 264, - D3D12_MESSAGE_ID_LIVE_PIXELSHADER = 265, - D3D12_MESSAGE_ID_LIVE_INPUTLAYOUT = 266, - D3D12_MESSAGE_ID_LIVE_SAMPLER = 267, - D3D12_MESSAGE_ID_LIVE_BLENDSTATE = 268, - D3D12_MESSAGE_ID_LIVE_DEPTHSTENCILSTATE = 269, - D3D12_MESSAGE_ID_LIVE_RASTERIZERSTATE = 270, - D3D12_MESSAGE_ID_LIVE_QUERY = 271, - D3D12_MESSAGE_ID_LIVE_PREDICATE = 272, - D3D12_MESSAGE_ID_LIVE_COUNTER = 273, - D3D12_MESSAGE_ID_LIVE_DEVICE = 274, - D3D12_MESSAGE_ID_LIVE_SWAPCHAIN = 275, - D3D12_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_INVALIDFLAGS = 276, - D3D12_MESSAGE_ID_CREATEVERTEXSHADER_INVALIDCLASSLINKAGE = 277, - D3D12_MESSAGE_ID_CREATEGEOMETRYSHADER_INVALIDCLASSLINKAGE = 278, - D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDNUMSTREAMS = 279, - D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDSTREAMTORASTERIZER = 280, - D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_UNEXPECTEDSTREAMS = 281, - D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDCLASSLINKAGE = 282, - D3D12_MESSAGE_ID_CREATEPIXELSHADER_INVALIDCLASSLINKAGE = 283, - D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDSTREAM = 284, - D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_UNEXPECTEDENTRIES = 285, - D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_UNEXPECTEDSTRIDES = 286, - D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDNUMSTRIDES = 287, - D3D12_MESSAGE_ID_CREATEHULLSHADER_INVALIDCALL = 288, - D3D12_MESSAGE_ID_CREATEHULLSHADER_OUTOFMEMORY = 289, - D3D12_MESSAGE_ID_CREATEHULLSHADER_INVALIDSHADERBYTECODE = 290, - D3D12_MESSAGE_ID_CREATEHULLSHADER_INVALIDSHADERTYPE = 291, - D3D12_MESSAGE_ID_CREATEHULLSHADER_INVALIDCLASSLINKAGE = 292, - D3D12_MESSAGE_ID_CREATEDOMAINSHADER_INVALIDCALL = 293, - D3D12_MESSAGE_ID_CREATEDOMAINSHADER_OUTOFMEMORY = 294, - D3D12_MESSAGE_ID_CREATEDOMAINSHADER_INVALIDSHADERBYTECODE = 295, - D3D12_MESSAGE_ID_CREATEDOMAINSHADER_INVALIDSHADERTYPE = 296, - D3D12_MESSAGE_ID_CREATEDOMAINSHADER_INVALIDCLASSLINKAGE = 297, - D3D12_MESSAGE_ID_DEVICE_DRAW_HS_XOR_DS_MISMATCH = 298, - D3D12_MESSAGE_ID_DEVICE_DRAWINDIRECT_INVALID_ARG_BUFFER = 299, - D3D12_MESSAGE_ID_DEVICE_DRAWINDIRECT_OFFSET_UNALIGNED = 300, - D3D12_MESSAGE_ID_DEVICE_DRAWINDIRECT_OFFSET_OVERFLOW = 301, - D3D12_MESSAGE_ID_RESOURCE_MAP_INVALIDMAPTYPE = 302, - D3D12_MESSAGE_ID_RESOURCE_MAP_INVALIDSUBRESOURCE = 303, - D3D12_MESSAGE_ID_RESOURCE_MAP_INVALIDFLAGS = 304, - D3D12_MESSAGE_ID_RESOURCE_MAP_ALREADYMAPPED = 305, - D3D12_MESSAGE_ID_RESOURCE_MAP_DEVICEREMOVED_RETURN = 306, - D3D12_MESSAGE_ID_RESOURCE_MAP_OUTOFMEMORY_RETURN = 307, - D3D12_MESSAGE_ID_RESOURCE_MAP_WITHOUT_INITIAL_DISCARD = 308, - D3D12_MESSAGE_ID_RESOURCE_UNMAP_INVALIDSUBRESOURCE = 309, - D3D12_MESSAGE_ID_RESOURCE_UNMAP_NOTMAPPED = 310, - D3D12_MESSAGE_ID_DEVICE_DRAW_RASTERIZING_CONTROL_POINTS = 311, - D3D12_MESSAGE_ID_DEVICE_IASETPRIMITIVETOPOLOGY_TOPOLOGY_UNSUPPORTED = 312, - D3D12_MESSAGE_ID_DEVICE_DRAW_HS_DS_SIGNATURE_MISMATCH = 313, - D3D12_MESSAGE_ID_DEVICE_DRAW_HULL_SHADER_INPUT_TOPOLOGY_MISMATCH = 314, - D3D12_MESSAGE_ID_DEVICE_DRAW_HS_DS_CONTROL_POINT_COUNT_MISMATCH = 315, - D3D12_MESSAGE_ID_DEVICE_DRAW_HS_DS_TESSELLATOR_DOMAIN_MISMATCH = 316, - D3D12_MESSAGE_ID_DEVICE_CHECKFEATURESUPPORT_UNRECOGNIZED_FEATURE = 317, - D3D12_MESSAGE_ID_DEVICE_CHECKFEATURESUPPORT_MISMATCHED_DATA_SIZE = 318, - D3D12_MESSAGE_ID_DEVICE_CHECKFEATURESUPPORT_INVALIDARG_RETURN = 319, - D3D12_MESSAGE_ID_CREATECOMPUTESHADER_INVALIDCALL = 320, - D3D12_MESSAGE_ID_CREATECOMPUTESHADER_OUTOFMEMORY = 321, - D3D12_MESSAGE_ID_CREATECOMPUTESHADER_INVALIDSHADERBYTECODE = 322, - D3D12_MESSAGE_ID_CREATECOMPUTESHADER_INVALIDCLASSLINKAGE = 323, - D3D12_MESSAGE_ID_DEVICE_CSSETSHADERRESOURCES_VIEWS_EMPTY = 324, - D3D12_MESSAGE_ID_CSSETCONSTANTBUFFERS_INVALIDBUFFER = 325, - D3D12_MESSAGE_ID_DEVICE_CSSETCONSTANTBUFFERS_BUFFERS_EMPTY = 326, - D3D12_MESSAGE_ID_DEVICE_CSSETSAMPLERS_SAMPLERS_EMPTY = 327, - D3D12_MESSAGE_ID_DEVICE_CSGETSHADERRESOURCES_VIEWS_EMPTY = 328, - D3D12_MESSAGE_ID_DEVICE_CSGETCONSTANTBUFFERS_BUFFERS_EMPTY = 329, - D3D12_MESSAGE_ID_DEVICE_CSGETSAMPLERS_SAMPLERS_EMPTY = 330, - D3D12_MESSAGE_ID_DEVICE_CREATEVERTEXSHADER_DOUBLEFLOATOPSNOTSUPPORTED = 331, - D3D12_MESSAGE_ID_DEVICE_CREATEHULLSHADER_DOUBLEFLOATOPSNOTSUPPORTED = 332, - D3D12_MESSAGE_ID_DEVICE_CREATEDOMAINSHADER_DOUBLEFLOATOPSNOTSUPPORTED = 333, - D3D12_MESSAGE_ID_DEVICE_CREATEGEOMETRYSHADER_DOUBLEFLOATOPSNOTSUPPORTED = 334, - D3D12_MESSAGE_ID_DEVICE_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_DOUBLEFLOATOPSNOTSUPPORTED = 335, - D3D12_MESSAGE_ID_DEVICE_CREATEPIXELSHADER_DOUBLEFLOATOPSNOTSUPPORTED = 336, - D3D12_MESSAGE_ID_DEVICE_CREATECOMPUTESHADER_DOUBLEFLOATOPSNOTSUPPORTED = 337, - D3D12_MESSAGE_ID_CREATEBUFFER_INVALIDSTRUCTURESTRIDE = 338, - D3D12_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDFLAGS = 339, - D3D12_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_INVALIDRESOURCE = 340, - D3D12_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_INVALIDDESC = 341, - D3D12_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_INVALIDFORMAT = 342, - D3D12_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_INVALIDVIDEOPLANESLICE = 343, - D3D12_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_INVALIDPLANESLICE = 344, - D3D12_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_INVALIDDIMENSIONS = 345, - D3D12_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_UNRECOGNIZEDFORMAT = 346, - D3D12_MESSAGE_ID_DEVICE_OMSETRENDERTARGETSANDUNORDEREDACCESSVIEWS_OVERLAPPING_OLD_SLOTS = 347, - D3D12_MESSAGE_ID_DEVICE_OMSETRENDERTARGETSANDUNORDEREDACCESSVIEWS_NO_OP = 348, - D3D12_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_INVALIDARG_RETURN = 349, - D3D12_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_OUTOFMEMORY_RETURN = 350, - D3D12_MESSAGE_ID_CLEARUNORDEREDACCESSVIEW_DENORMFLUSH = 351, - D3D12_MESSAGE_ID_DEVICE_CSSETUNORDEREDACCESSS_VIEWS_EMPTY = 352, - D3D12_MESSAGE_ID_DEVICE_CSGETUNORDEREDACCESSS_VIEWS_EMPTY = 353, - D3D12_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_INVALIDFLAGS = 354, - D3D12_MESSAGE_ID_DEVICE_DISPATCHINDIRECT_INVALID_ARG_BUFFER = 355, - D3D12_MESSAGE_ID_DEVICE_DISPATCHINDIRECT_OFFSET_UNALIGNED = 356, - D3D12_MESSAGE_ID_DEVICE_DISPATCHINDIRECT_OFFSET_OVERFLOW = 357, - D3D12_MESSAGE_ID_CLEARDEPTHSTENCILVIEW_DEPTH_READONLY = 358, - D3D12_MESSAGE_ID_CLEARDEPTHSTENCILVIEW_STENCIL_READONLY = 359, - D3D12_MESSAGE_ID_CHECKFEATURESUPPORT_FORMAT_DEPRECATED = 360, - D3D12_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_RETURN_TYPE_MISMATCH = 361, - D3D12_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_NOT_SET = 362, - D3D12_MESSAGE_ID_DEVICE_DRAW_UNORDEREDACCESSVIEW_RENDERTARGETVIEW_OVERLAP = 363, - D3D12_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_DIMENSION_MISMATCH = 364, - D3D12_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_APPEND_UNSUPPORTED = 365, - D3D12_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_ATOMICS_UNSUPPORTED = 366, - D3D12_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_STRUCTURE_STRIDE_MISMATCH = 367, - D3D12_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_BUFFER_TYPE_MISMATCH = 368, - D3D12_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_RAW_UNSUPPORTED = 369, - D3D12_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_FORMAT_LD_UNSUPPORTED = 370, - D3D12_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_FORMAT_STORE_UNSUPPORTED = 371, - D3D12_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_ATOMIC_ADD_UNSUPPORTED = 372, - D3D12_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_ATOMIC_BITWISE_OPS_UNSUPPORTED = 373, - D3D12_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_ATOMIC_CMPSTORE_CMPEXCHANGE_UNSUPPORTED = 374, - D3D12_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_ATOMIC_EXCHANGE_UNSUPPORTED = 375, - D3D12_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_ATOMIC_SIGNED_MINMAX_UNSUPPORTED = 376, - D3D12_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_ATOMIC_UNSIGNED_MINMAX_UNSUPPORTED = 377, - D3D12_MESSAGE_ID_DEVICE_DISPATCH_BOUND_RESOURCE_MAPPED = 378, - D3D12_MESSAGE_ID_DEVICE_DISPATCH_THREADGROUPCOUNT_OVERFLOW = 379, - D3D12_MESSAGE_ID_DEVICE_DISPATCH_THREADGROUPCOUNT_ZERO = 380, - D3D12_MESSAGE_ID_DEVICE_SHADERRESOURCEVIEW_STRUCTURE_STRIDE_MISMATCH = 381, - D3D12_MESSAGE_ID_DEVICE_SHADERRESOURCEVIEW_BUFFER_TYPE_MISMATCH = 382, - D3D12_MESSAGE_ID_DEVICE_SHADERRESOURCEVIEW_RAW_UNSUPPORTED = 383, - D3D12_MESSAGE_ID_DEVICE_DISPATCH_UNSUPPORTED = 384, - D3D12_MESSAGE_ID_DEVICE_DISPATCHINDIRECT_UNSUPPORTED = 385, - D3D12_MESSAGE_ID_COPYSTRUCTURECOUNT_INVALIDOFFSET = 386, - D3D12_MESSAGE_ID_COPYSTRUCTURECOUNT_LARGEOFFSET = 387, - D3D12_MESSAGE_ID_COPYSTRUCTURECOUNT_INVALIDDESTINATIONSTATE = 388, - D3D12_MESSAGE_ID_COPYSTRUCTURECOUNT_INVALIDSOURCESTATE = 389, - D3D12_MESSAGE_ID_CHECKFORMATSUPPORT_FORMAT_NOT_SUPPORTED = 390, - D3D12_MESSAGE_ID_CLEARUNORDEREDACCESSVIEWFLOAT_INVALIDFORMAT = 391, - D3D12_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_COUNTER_UNSUPPORTED = 392, - D3D12_MESSAGE_ID_DEVICE_DRAW_PIXEL_SHADER_WITHOUT_RTV_OR_DSV = 393, - D3D12_MESSAGE_ID_SHADER_ABORT = 394, - D3D12_MESSAGE_ID_SHADER_MESSAGE = 395, - D3D12_MESSAGE_ID_SHADER_ERROR = 396, - D3D12_MESSAGE_ID_OFFERRESOURCES_INVALIDRESOURCE = 397, - D3D12_MESSAGE_ID_ENQUEUESETEVENT_INVALIDARG_RETURN = 398, - D3D12_MESSAGE_ID_ENQUEUESETEVENT_OUTOFMEMORY_RETURN = 399, - D3D12_MESSAGE_ID_ENQUEUESETEVENT_ACCESSDENIED_RETURN = 400, - D3D12_MESSAGE_ID_CREATERASTERIZERSTATE_INVALIDFORCEDSAMPLECOUNT = 401, - D3D12_MESSAGE_ID_DEVICE_DRAW_INVALID_USE_OF_FORCED_SAMPLE_COUNT = 402, - D3D12_MESSAGE_ID_CREATEBLENDSTATE_INVALIDLOGICOPS = 403, - D3D12_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDDARRAYWITHDECODER = 404, - D3D12_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_INVALIDDARRAYWITHDECODER = 405, - D3D12_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDDARRAYWITHDECODER = 406, - D3D12_MESSAGE_ID_DEVICE_LOCKEDOUT_INTERFACE = 407, - D3D12_MESSAGE_ID_OFFERRESOURCES_INVALIDPRIORITY = 408, - D3D12_MESSAGE_ID_DEVICE_CLEARVIEW_INVALIDVIEW = 409, - D3D12_MESSAGE_ID_DEVICE_CREATEVERTEXSHADER_DOUBLEEXTENSIONSNOTSUPPORTED = 410, - D3D12_MESSAGE_ID_DEVICE_CREATEVERTEXSHADER_SHADEREXTENSIONSNOTSUPPORTED = 411, - D3D12_MESSAGE_ID_DEVICE_CREATEHULLSHADER_DOUBLEEXTENSIONSNOTSUPPORTED = 412, - D3D12_MESSAGE_ID_DEVICE_CREATEHULLSHADER_SHADEREXTENSIONSNOTSUPPORTED = 413, - D3D12_MESSAGE_ID_DEVICE_CREATEDOMAINSHADER_DOUBLEEXTENSIONSNOTSUPPORTED = 414, - D3D12_MESSAGE_ID_DEVICE_CREATEDOMAINSHADER_SHADEREXTENSIONSNOTSUPPORTED = 415, - D3D12_MESSAGE_ID_DEVICE_CREATEGEOMETRYSHADER_DOUBLEEXTENSIONSNOTSUPPORTED = 416, - D3D12_MESSAGE_ID_DEVICE_CREATEGEOMETRYSHADER_SHADEREXTENSIONSNOTSUPPORTED = 417, - D3D12_MESSAGE_ID_DEVICE_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_DOUBLEEXTENSIONSNOTSUPPORTED = 418, - D3D12_MESSAGE_ID_DEVICE_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_SHADEREXTENSIONSNOTSUPPORTED = 419, - D3D12_MESSAGE_ID_DEVICE_CREATEPIXELSHADER_DOUBLEEXTENSIONSNOTSUPPORTED = 420, - D3D12_MESSAGE_ID_DEVICE_CREATEPIXELSHADER_SHADEREXTENSIONSNOTSUPPORTED = 421, - D3D12_MESSAGE_ID_DEVICE_CREATECOMPUTESHADER_DOUBLEEXTENSIONSNOTSUPPORTED = 422, - D3D12_MESSAGE_ID_DEVICE_CREATECOMPUTESHADER_SHADEREXTENSIONSNOTSUPPORTED = 423, - D3D12_MESSAGE_ID_DEVICE_SHADER_LINKAGE_MINPRECISION = 424, - D3D12_MESSAGE_ID_DEVICE_CREATEVERTEXSHADER_UAVSNOTSUPPORTED = 425, - D3D12_MESSAGE_ID_DEVICE_CREATEHULLSHADER_UAVSNOTSUPPORTED = 426, - D3D12_MESSAGE_ID_DEVICE_CREATEDOMAINSHADER_UAVSNOTSUPPORTED = 427, - D3D12_MESSAGE_ID_DEVICE_CREATEGEOMETRYSHADER_UAVSNOTSUPPORTED = 428, - D3D12_MESSAGE_ID_DEVICE_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_UAVSNOTSUPPORTED = 429, - D3D12_MESSAGE_ID_DEVICE_CREATEPIXELSHADER_UAVSNOTSUPPORTED = 430, - D3D12_MESSAGE_ID_DEVICE_CREATECOMPUTESHADER_UAVSNOTSUPPORTED = 431, - D3D12_MESSAGE_ID_DEVICE_OMSETRENDERTARGETSANDUNORDEREDACCESSVIEWS_INVALIDOFFSET = 432, - D3D12_MESSAGE_ID_DEVICE_OMSETRENDERTARGETSANDUNORDEREDACCESSVIEWS_TOOMANYVIEWS = 433, - D3D12_MESSAGE_ID_DEVICE_CLEARVIEW_NOTSUPPORTED = 434, - D3D12_MESSAGE_ID_SWAPDEVICECONTEXTSTATE_NOTSUPPORTED = 435, - D3D12_MESSAGE_ID_UPDATESUBRESOURCE_PREFERUPDATESUBRESOURCE1 = 436, - D3D12_MESSAGE_ID_GETDC_INACCESSIBLE = 437, - D3D12_MESSAGE_ID_DEVICE_CLEARVIEW_INVALIDRECT = 438, - D3D12_MESSAGE_ID_DEVICE_DRAW_SAMPLE_MASK_IGNORED_ON_FL9 = 439, - D3D12_MESSAGE_ID_DEVICE_OPEN_SHARED_RESOURCE1_NOT_SUPPORTED = 440, - D3D12_MESSAGE_ID_DEVICE_OPEN_SHARED_RESOURCE_BY_NAME_NOT_SUPPORTED = 441, - D3D12_MESSAGE_ID_ENQUEUESETEVENT_NOT_SUPPORTED = 442, - D3D12_MESSAGE_ID_OFFERRELEASE_NOT_SUPPORTED = 443, - D3D12_MESSAGE_ID_OFFERRESOURCES_INACCESSIBLE = 444, - D3D12_MESSAGE_ID_CREATEVIDEOPROCESSORINPUTVIEW_INVALIDMSAA = 445, - D3D12_MESSAGE_ID_CREATEVIDEOPROCESSOROUTPUTVIEW_INVALIDMSAA = 446, - D3D12_MESSAGE_ID_DEVICE_CLEARVIEW_INVALIDSOURCERECT = 447, - D3D12_MESSAGE_ID_DEVICE_CLEARVIEW_EMPTYRECT = 448, - D3D12_MESSAGE_ID_UPDATESUBRESOURCE_EMPTYDESTBOX = 449, - D3D12_MESSAGE_ID_COPYSUBRESOURCEREGION_EMPTYSOURCEBOX = 450, - D3D12_MESSAGE_ID_DEVICE_DRAW_OM_RENDER_TARGET_DOES_NOT_SUPPORT_LOGIC_OPS = 451, - D3D12_MESSAGE_ID_DEVICE_DRAW_DEPTHSTENCILVIEW_NOT_SET = 452, - D3D12_MESSAGE_ID_DEVICE_DRAW_RENDERTARGETVIEW_NOT_SET = 453, - D3D12_MESSAGE_ID_DEVICE_DRAW_RENDERTARGETVIEW_NOT_SET_DUE_TO_FLIP_PRESENT = 454, - D3D12_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_NOT_SET_DUE_TO_FLIP_PRESENT = 455, - D3D12_MESSAGE_ID_GETDATAFORNEWHARDWAREKEY_NULLPARAM = 456, - D3D12_MESSAGE_ID_CHECKCRYPTOSESSIONSTATUS_NULLPARAM = 457, - D3D12_MESSAGE_ID_SETEVENTONHARDWARECONTENTPROTECTIONTILT_NULLPARAM = 458, - D3D12_MESSAGE_ID_GETVIDEODECODERCAPS_NULLPARAM = 459, - D3D12_MESSAGE_ID_GETVIDEODECODERCAPS_ZEROWIDTHHEIGHT = 460, - D3D12_MESSAGE_ID_CHECKVIDEODECODERDOWNSAMPLING_NULLPARAM = 461, - D3D12_MESSAGE_ID_CHECKVIDEODECODERDOWNSAMPLING_INVALIDCOLORSPACE = 462, - D3D12_MESSAGE_ID_CHECKVIDEODECODERDOWNSAMPLING_ZEROWIDTHHEIGHT = 463, - D3D12_MESSAGE_ID_VIDEODECODERENABLEDOWNSAMPLING_NULLPARAM = 464, - D3D12_MESSAGE_ID_VIDEODECODERENABLEDOWNSAMPLING_UNSUPPORTED = 465, - D3D12_MESSAGE_ID_VIDEODECODERUPDATEDOWNSAMPLING_NULLPARAM = 466, - D3D12_MESSAGE_ID_VIDEODECODERUPDATEDOWNSAMPLING_UNSUPPORTED = 467, - D3D12_MESSAGE_ID_CHECKVIDEOPROCESSORFORMATCONVERSION_NULLPARAM = 468, - D3D12_MESSAGE_ID_VIDEOPROCESSORSETOUTPUTCOLORSPACE1_NULLPARAM = 469, - D3D12_MESSAGE_ID_VIDEOPROCESSORGETOUTPUTCOLORSPACE1_NULLPARAM = 470, - D3D12_MESSAGE_ID_VIDEOPROCESSORSETSTREAMCOLORSPACE1_NULLPARAM = 471, - D3D12_MESSAGE_ID_VIDEOPROCESSORSETSTREAMCOLORSPACE1_INVALIDSTREAM = 472, - D3D12_MESSAGE_ID_VIDEOPROCESSORSETSTREAMMIRROR_NULLPARAM = 473, - D3D12_MESSAGE_ID_VIDEOPROCESSORSETSTREAMMIRROR_INVALIDSTREAM = 474, - D3D12_MESSAGE_ID_VIDEOPROCESSORSETSTREAMMIRROR_UNSUPPORTED = 475, - D3D12_MESSAGE_ID_VIDEOPROCESSORGETSTREAMCOLORSPACE1_NULLPARAM = 476, - D3D12_MESSAGE_ID_VIDEOPROCESSORGETSTREAMMIRROR_NULLPARAM = 477, - D3D12_MESSAGE_ID_RECOMMENDVIDEODECODERDOWNSAMPLING_NULLPARAM = 478, - D3D12_MESSAGE_ID_RECOMMENDVIDEODECODERDOWNSAMPLING_INVALIDCOLORSPACE = 479, - D3D12_MESSAGE_ID_RECOMMENDVIDEODECODERDOWNSAMPLING_ZEROWIDTHHEIGHT = 480, - D3D12_MESSAGE_ID_VIDEOPROCESSORSETOUTPUTSHADERUSAGE_NULLPARAM = 481, - D3D12_MESSAGE_ID_VIDEOPROCESSORGETOUTPUTSHADERUSAGE_NULLPARAM = 482, - D3D12_MESSAGE_ID_VIDEOPROCESSORGETBEHAVIORHINTS_NULLPARAM = 483, - D3D12_MESSAGE_ID_VIDEOPROCESSORGETBEHAVIORHINTS_INVALIDSTREAMCOUNT = 484, - D3D12_MESSAGE_ID_VIDEOPROCESSORGETBEHAVIORHINTS_TARGETRECT = 485, - D3D12_MESSAGE_ID_VIDEOPROCESSORGETBEHAVIORHINTS_INVALIDSOURCERECT = 486, - D3D12_MESSAGE_ID_VIDEOPROCESSORGETBEHAVIORHINTS_INVALIDDESTRECT = 487, - D3D12_MESSAGE_ID_CREATEBUFFER_INVALIDUSAGE = 488, - D3D12_MESSAGE_ID_CREATETEXTURE1D_INVALIDUSAGE = 489, - D3D12_MESSAGE_ID_CREATETEXTURE2D_INVALIDUSAGE = 490, - D3D12_MESSAGE_ID_CREATEINPUTLAYOUT_LEVEL9_STEPRATE_NOT_1 = 491, - D3D12_MESSAGE_ID_CREATEINPUTLAYOUT_LEVEL9_INSTANCING_NOT_SUPPORTED = 492, - D3D12_MESSAGE_ID_UPDATETILEMAPPINGS_INVALID_PARAMETER = 493, - D3D12_MESSAGE_ID_COPYTILEMAPPINGS_INVALID_PARAMETER = 494, - D3D12_MESSAGE_ID_COPYTILES_INVALID_PARAMETER = 495, - D3D12_MESSAGE_ID_NULL_TILE_MAPPING_ACCESS_WARNING = 496, - D3D12_MESSAGE_ID_NULL_TILE_MAPPING_ACCESS_ERROR = 497, - D3D12_MESSAGE_ID_DIRTY_TILE_MAPPING_ACCESS = 498, - D3D12_MESSAGE_ID_DUPLICATE_TILE_MAPPINGS_IN_COVERED_AREA = 499, - D3D12_MESSAGE_ID_TILE_MAPPINGS_IN_COVERED_AREA_DUPLICATED_OUTSIDE = 500, - D3D12_MESSAGE_ID_TILE_MAPPINGS_SHARED_BETWEEN_INCOMPATIBLE_RESOURCES = 501, - D3D12_MESSAGE_ID_TILE_MAPPINGS_SHARED_BETWEEN_INPUT_AND_OUTPUT = 502, - D3D12_MESSAGE_ID_CHECKMULTISAMPLEQUALITYLEVELS_INVALIDFLAGS = 503, - D3D12_MESSAGE_ID_GETRESOURCETILING_NONTILED_RESOURCE = 504, - D3D12_MESSAGE_ID_NEED_TO_CALL_TILEDRESOURCEBARRIER = 505, - D3D12_MESSAGE_ID_CREATEDEVICE_INVALIDARGS = 506, - D3D12_MESSAGE_ID_CREATEDEVICE_WARNING = 507, - D3D12_MESSAGE_ID_TILED_RESOURCE_TIER_1_BUFFER_TEXTURE_MISMATCH = 508, - D3D12_MESSAGE_ID_CREATE_CRYPTOSESSION = 509, - D3D12_MESSAGE_ID_CREATE_AUTHENTICATEDCHANNEL = 510, - D3D12_MESSAGE_ID_LIVE_CRYPTOSESSION = 511, - D3D12_MESSAGE_ID_LIVE_AUTHENTICATEDCHANNEL = 512, - D3D12_MESSAGE_ID_DESTROY_CRYPTOSESSION = 513, - D3D12_MESSAGE_ID_DESTROY_AUTHENTICATEDCHANNEL = 514, - D3D12_MESSAGE_ID_MAP_INVALID_SUBRESOURCE = 515, - D3D12_MESSAGE_ID_MAP_INVALID_TYPE = 516, - D3D12_MESSAGE_ID_MAP_UNSUPPORTED_TYPE = 517, - D3D12_MESSAGE_ID_UNMAP_INVALID_SUBRESOURCE = 518, - D3D12_MESSAGE_ID_RESOURCE_BARRIER_INVALID_TYPE = 519, - D3D12_MESSAGE_ID_RESOURCE_BARRIER_NULL_POINTER = 520, - D3D12_MESSAGE_ID_RESOURCE_BARRIER_INVALID_SUBRESOURCE = 521, - D3D12_MESSAGE_ID_RESOURCE_BARRIER_RESERVED_BITS = 522, - D3D12_MESSAGE_ID_RESOURCE_BARRIER_MISSING_BIND_FLAGS = 523, - D3D12_MESSAGE_ID_RESOURCE_BARRIER_MISMATCHING_MISC_FLAGS = 524, - D3D12_MESSAGE_ID_RESOURCE_BARRIER_MATCHING_STATES = 525, - D3D12_MESSAGE_ID_RESOURCE_BARRIER_INVALID_COMBINATION = 526, - D3D12_MESSAGE_ID_RESOURCE_BARRIER_BEFORE_AFTER_MISMATCH = 527, - D3D12_MESSAGE_ID_RESOURCE_BARRIER_INVALID_RESOURCE = 528, - D3D12_MESSAGE_ID_RESOURCE_BARRIER_SAMPLE_COUNT = 529, - D3D12_MESSAGE_ID_RESOURCE_BARRIER_INVALID_FLAGS = 530, - D3D12_MESSAGE_ID_RESOURCE_BARRIER_INVALID_COMBINED_FLAGS = 531, - D3D12_MESSAGE_ID_RESOURCE_BARRIER_INVALID_FLAGS_FOR_FORMAT = 532, - D3D12_MESSAGE_ID_RESOURCE_BARRIER_INVALID_SPLIT_BARRIER = 533, - D3D12_MESSAGE_ID_RESOURCE_BARRIER_UNMATCHED_END = 534, - D3D12_MESSAGE_ID_RESOURCE_BARRIER_UNMATCHED_BEGIN = 535, - D3D12_MESSAGE_ID_RESOURCE_BARRIER_INVALID_FLAG = 536, - D3D12_MESSAGE_ID_RESOURCE_BARRIER_INVALID_COMMAND_LIST_TYPE = 537, - D3D12_MESSAGE_ID_INVALID_SUBRESOURCE_STATE = 538, - D3D12_MESSAGE_ID_INEFFICIENT_PRESENT = 539, - D3D12_MESSAGE_ID_COMMAND_ALLOCATOR_CONTENTION = 540, - D3D12_MESSAGE_ID_COMMAND_ALLOCATOR_RESET = 541, - D3D12_MESSAGE_ID_COMMAND_ALLOCATOR_RESET_BUNDLE = 542, - D3D12_MESSAGE_ID_COMMAND_ALLOCATOR_CANNOT_RESET = 543, - D3D12_MESSAGE_ID_COMMAND_LIST_OPEN = 544, - D3D12_MESSAGE_ID_QUERY_STATE_MISMATCH = 545, - D3D12_MESSAGE_ID_INVALID_BUNDLE_API = 546, - D3D12_MESSAGE_ID_COMMAND_LIST_CLOSED = 547, - D3D12_MESSAGE_ID_COMMAND_LIST_CLOSED_WITH_INVALID_RESOURCE = 548, - D3D12_MESSAGE_ID_WRONG_COMMAND_ALLOCATOR_TYPE = 549, - D3D12_MESSAGE_ID_INVALID_INDIRECT_ARGUMENT_BUFFER = 550, - D3D12_MESSAGE_ID_COMPUTE_AND_GRAPHICS_PIPELINE = 551, - D3D12_MESSAGE_ID_COMMAND_ALLOCATOR_SYNC = 552, - D3D12_MESSAGE_ID_COMMAND_LIST_SYNC = 553, - D3D12_MESSAGE_ID_SET_DESCRIPTOR_HEAP_INVALID = 554, - D3D12_MESSAGE_ID_CREATE_QUEUE_IMAGE_NOT_SUPPORTED = 555, - D3D12_MESSAGE_ID_CREATE_COMMAND_ALLOCATOR_IMAGE_NOT_SUPPORTED = 556, - D3D12_MESSAGE_ID_CREATE_COMMANDQUEUE = 557, - D3D12_MESSAGE_ID_CREATE_COMMANDALLOCATOR = 558, - D3D12_MESSAGE_ID_CREATE_PIPELINESTATE = 559, - D3D12_MESSAGE_ID_CREATE_COMMANDLIST12 = 560, - D3D12_MESSAGE_ID_CREATE_IMAGECOMMANDLIST = 561, - D3D12_MESSAGE_ID_CREATE_RESOURCE = 562, - D3D12_MESSAGE_ID_CREATE_DESCRIPTORHEAP = 563, - D3D12_MESSAGE_ID_CREATE_ROOTSIGNATURE = 564, - D3D12_MESSAGE_ID_CREATE_LIBRARY = 565, - D3D12_MESSAGE_ID_CREATE_HEAP = 566, - D3D12_MESSAGE_ID_CREATE_MONITOREDFENCE = 567, - D3D12_MESSAGE_ID_CREATE_QUERYHEAP = 568, - D3D12_MESSAGE_ID_CREATE_COMMANDSIGNATURE = 569, - D3D12_MESSAGE_ID_LIVE_COMMANDQUEUE = 570, - D3D12_MESSAGE_ID_LIVE_COMMANDALLOCATOR = 571, - D3D12_MESSAGE_ID_LIVE_PIPELINESTATE = 572, - D3D12_MESSAGE_ID_LIVE_COMMANDLIST12 = 573, - D3D12_MESSAGE_ID_LIVE_IMAGECOMMANDLIST = 574, - D3D12_MESSAGE_ID_LIVE_RESOURCE = 575, - D3D12_MESSAGE_ID_LIVE_DESCRIPTORHEAP = 576, - D3D12_MESSAGE_ID_LIVE_ROOTSIGNATURE = 577, - D3D12_MESSAGE_ID_LIVE_LIBRARY = 578, - D3D12_MESSAGE_ID_LIVE_HEAP = 579, - D3D12_MESSAGE_ID_LIVE_MONITOREDFENCE = 580, - D3D12_MESSAGE_ID_LIVE_QUERYHEAP = 581, - D3D12_MESSAGE_ID_LIVE_COMMANDSIGNATURE = 582, - D3D12_MESSAGE_ID_DESTROY_COMMANDQUEUE = 583, - D3D12_MESSAGE_ID_DESTROY_COMMANDALLOCATOR = 584, - D3D12_MESSAGE_ID_DESTROY_PIPELINESTATE = 585, - D3D12_MESSAGE_ID_DESTROY_COMMANDLIST12 = 586, - D3D12_MESSAGE_ID_DESTROY_IMAGECOMMANDLIST = 587, - D3D12_MESSAGE_ID_DESTROY_RESOURCE = 588, - D3D12_MESSAGE_ID_DESTROY_DESCRIPTORHEAP = 589, - D3D12_MESSAGE_ID_DESTROY_ROOTSIGNATURE = 590, - D3D12_MESSAGE_ID_DESTROY_LIBRARY = 591, - D3D12_MESSAGE_ID_DESTROY_HEAP = 592, - D3D12_MESSAGE_ID_DESTROY_MONITOREDFENCE = 593, - D3D12_MESSAGE_ID_DESTROY_QUERYHEAP = 594, - D3D12_MESSAGE_ID_DESTROY_COMMANDSIGNATURE = 595, - D3D12_MESSAGE_ID_CREATERESOURCE_UNRECOGNIZEDHEAPTYPE = 596, - D3D12_MESSAGE_ID_CREATERESOURCE_INVALIDDIMENSIONS = 597, - D3D12_MESSAGE_ID_CREATERESOURCE_UNRECOGNIZEDMISCFLAGS = 598, - D3D12_MESSAGE_ID_CREATERESOURCE_INVALIDMISCFLAGS = 599, - D3D12_MESSAGE_ID_CREATERESOURCE_LARGEALLOCATION = 600, - D3D12_MESSAGE_ID_CREATERESOURCE_SMALLALLOCATION = 601, - D3D12_MESSAGE_ID_CREATERESOURCE_INVALIDARG_RETURN = 602, - D3D12_MESSAGE_ID_CREATERESOURCE_OUTOFMEMORY_RETURN = 603, - D3D12_MESSAGE_ID_CREATERESOURCE_INVALIDDESC = 604, - D3D12_MESSAGE_ID_CREATERESOURCE_INVALIDINITIALSTATE = 605, - D3D12_MESSAGE_ID_RESOURCE_HAS_PENDING_INITIAL_DATA = 606, - D3D12_MESSAGE_ID_POSSIBLY_INVALID_SUBRESOURCE_STATE = 607, - D3D12_MESSAGE_ID_INVALID_USE_OF_NON_RESIDENT_RESOURCE = 608, - D3D12_MESSAGE_ID_POSSIBLE_INVALID_USE_OF_NON_RESIDENT_RESOURCE = 609, - D3D12_MESSAGE_ID_BUNDLE_PIPELINE_STATE_MISMATCH = 610, - D3D12_MESSAGE_ID_PRIMITIVE_TOPOLOGY_MISMATCH_PIPELINE_STATE = 611, - D3D12_MESSAGE_ID_RENDER_TARGET_NUMBER_MISMATCH_PIPELINE_STATE = 612, - D3D12_MESSAGE_ID_RENDER_TARGET_FORMAT_MISMATCH_PIPELINE_STATE = 613, - D3D12_MESSAGE_ID_RENDER_TARGET_SAMPLE_DESC_MISMATCH_PIPELINE_STATE = 614, - D3D12_MESSAGE_ID_DEPTH_STENCIL_FORMAT_MISMATCH_PIPELINE_STATE = 615, - D3D12_MESSAGE_ID_DEPTH_STENCIL_SAMPLE_DESC_MISMATCH_PIPELINE_STATE = 616, - D3D12_MESSAGE_ID_RENDER_TARGET_NUMBER_MISMATCH_BUNDLE_PIPELINE_STATE = 617, - D3D12_MESSAGE_ID_RENDER_TARGET_FORMAT_MISMATCH_BUNDLE_PIPELINE_STATE = 618, - D3D12_MESSAGE_ID_RENDER_TARGET_SAMPLE_DESC_MISMATCH_BUNDLE_PIPELINE_STATE = 619, - D3D12_MESSAGE_ID_DEPTH_STENCIL_FORMAT_MISMATCH_BUNDLE_PIPELINE_STATE = 620, - D3D12_MESSAGE_ID_DEPTH_STENCIL_SAMPLE_DESC_MISMATCH_BUNDLE_PIPELINE_STATE = 621, - D3D12_MESSAGE_ID_CREATESHADER_INVALIDBYTECODE = 622, - D3D12_MESSAGE_ID_CREATEHEAP_NULLDESC = 623, - D3D12_MESSAGE_ID_CREATEHEAP_INVALIDSIZE = 624, - D3D12_MESSAGE_ID_CREATEHEAP_UNRECOGNIZEDHEAPTYPE = 625, - D3D12_MESSAGE_ID_CREATEHEAP_UNRECOGNIZEDCPUPAGEPROPERTIES = 626, - D3D12_MESSAGE_ID_CREATEHEAP_UNRECOGNIZEDMEMORYPOOL = 627, - D3D12_MESSAGE_ID_CREATEHEAP_INVALIDPROPERTIES = 628, - D3D12_MESSAGE_ID_CREATEHEAP_INVALIDALIGNMENT = 629, - D3D12_MESSAGE_ID_CREATEHEAP_UNRECOGNIZEDMISCFLAGS = 630, - D3D12_MESSAGE_ID_CREATEHEAP_INVALIDMISCFLAGS = 631, - D3D12_MESSAGE_ID_CREATEHEAP_INVALIDARG_RETURN = 632, - D3D12_MESSAGE_ID_CREATEHEAP_OUTOFMEMORY_RETURN = 633, - D3D12_MESSAGE_ID_CREATERESOURCEANDHEAP_NULLHEAPPROPERTIES = 634, - D3D12_MESSAGE_ID_CREATERESOURCEANDHEAP_UNRECOGNIZEDHEAPTYPE = 635, - D3D12_MESSAGE_ID_CREATERESOURCEANDHEAP_UNRECOGNIZEDCPUPAGEPROPERTIES = 636, - D3D12_MESSAGE_ID_CREATERESOURCEANDHEAP_UNRECOGNIZEDMEMORYPOOL = 637, - D3D12_MESSAGE_ID_CREATERESOURCEANDHEAP_INVALIDHEAPPROPERTIES = 638, - D3D12_MESSAGE_ID_CREATERESOURCEANDHEAP_UNRECOGNIZEDHEAPMISCFLAGS = 639, - D3D12_MESSAGE_ID_CREATERESOURCEANDHEAP_INVALIDHEAPMISCFLAGS = 640, - D3D12_MESSAGE_ID_CREATERESOURCEANDHEAP_INVALIDARG_RETURN = 641, - D3D12_MESSAGE_ID_CREATERESOURCEANDHEAP_OUTOFMEMORY_RETURN = 642, - D3D12_MESSAGE_ID_GETCUSTOMHEAPPROPERTIES_UNRECOGNIZEDHEAPTYPE = 643, - D3D12_MESSAGE_ID_GETCUSTOMHEAPPROPERTIES_INVALIDHEAPTYPE = 644, - D3D12_MESSAGE_ID_CREATE_DESCRIPTOR_HEAP_INVALID_DESC = 645, - D3D12_MESSAGE_ID_INVALID_DESCRIPTOR_HANDLE = 646, - D3D12_MESSAGE_ID_CREATERASTERIZERSTATE_INVALID_CONSERVATIVERASTERMODE = 647, - D3D12_MESSAGE_ID_DEVICE_DRAW_INVALID_SYSTEMVALUE = 648, - D3D12_MESSAGE_ID_CREATE_CONSTANT_BUFFER_VIEW_INVALID_RESOURCE = 649, - D3D12_MESSAGE_ID_CREATE_CONSTANT_BUFFER_VIEW_INVALID_DESC = 650, - D3D12_MESSAGE_ID_CREATE_CONSTANT_BUFFER_VIEW_LARGE_OFFSET = 651, - D3D12_MESSAGE_ID_CREATE_UNORDEREDACCESS_VIEW_INVALID_COUNTER_USAGE = 652, - D3D12_MESSAGE_ID_COPY_DESCRIPTORS_INVALID_RANGES = 653, - D3D12_MESSAGE_ID_COPY_DESCRIPTORS_WRITE_ONLY_DESCRIPTOR = 654, - D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_RTV_FORMAT_NOT_UNKNOWN = 655, - D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_INVALID_RENDER_TARGET_COUNT = 656, - D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_VERTEX_SHADER_NOT_SET = 657, - D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_INPUTLAYOUT_NOT_SET = 658, - D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_SHADER_LINKAGE_HS_DS_SIGNATURE_MISMATCH = 659, - D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_SHADER_LINKAGE_REGISTERINDEX = 660, - D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_SHADER_LINKAGE_COMPONENTTYPE = 661, - D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_SHADER_LINKAGE_REGISTERMASK = 662, - D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_SHADER_LINKAGE_SYSTEMVALUE = 663, - D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_SHADER_LINKAGE_NEVERWRITTEN_ALWAYSREADS = 664, - D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_SHADER_LINKAGE_MINPRECISION = 665, - D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_SHADER_LINKAGE_SEMANTICNAME_NOT_FOUND = 666, - D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_HS_XOR_DS_MISMATCH = 667, - D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_HULL_SHADER_INPUT_TOPOLOGY_MISMATCH = 668, - D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_HS_DS_CONTROL_POINT_COUNT_MISMATCH = 669, - D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_HS_DS_TESSELLATOR_DOMAIN_MISMATCH = 670, - D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_INVALID_USE_OF_CENTER_MULTISAMPLE_PATTERN = 671, - D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_INVALID_USE_OF_FORCED_SAMPLE_COUNT = 672, - D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_INVALID_PRIMITIVETOPOLOGY = 673, - D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_INVALID_SYSTEMVALUE = 674, - D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_OM_DUAL_SOURCE_BLENDING_CAN_ONLY_HAVE_RENDER_TARGET_0 = 675, - D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_OM_RENDER_TARGET_DOES_NOT_SUPPORT_BLENDING = 676, - D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_PS_OUTPUT_TYPE_MISMATCH = 677, - D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_OM_RENDER_TARGET_DOES_NOT_SUPPORT_LOGIC_OPS = 678, - D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_RENDERTARGETVIEW_NOT_SET = 679, - D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_DEPTHSTENCILVIEW_NOT_SET = 680, - D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_GS_INPUT_PRIMITIVE_MISMATCH = 681, - D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_POSITION_NOT_PRESENT = 682, - D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_MISSING_ROOT_SIGNATURE_FLAGS = 683, - D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_INVALID_INDEX_BUFFER_PROPERTIES = 684, - D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_INVALID_SAMPLE_DESC = 685, - D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_HS_ROOT_SIGNATURE_MISMATCH = 686, - D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_DS_ROOT_SIGNATURE_MISMATCH = 687, - D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_VS_ROOT_SIGNATURE_MISMATCH = 688, - D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_GS_ROOT_SIGNATURE_MISMATCH = 689, - D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_PS_ROOT_SIGNATURE_MISMATCH = 690, - D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_MISSING_ROOT_SIGNATURE = 691, - D3D12_MESSAGE_ID_EXECUTE_BUNDLE_OPEN_BUNDLE = 692, - D3D12_MESSAGE_ID_EXECUTE_BUNDLE_DESCRIPTOR_HEAP_MISMATCH = 693, - D3D12_MESSAGE_ID_EXECUTE_BUNDLE_TYPE = 694, - D3D12_MESSAGE_ID_DRAW_EMPTY_SCISSOR_RECTANGLE = 695, - D3D12_MESSAGE_ID_CREATE_ROOT_SIGNATURE_BLOB_NOT_FOUND = 696, - D3D12_MESSAGE_ID_CREATE_ROOT_SIGNATURE_DESERIALIZE_FAILED = 697, - D3D12_MESSAGE_ID_CREATE_ROOT_SIGNATURE_INVALID_CONFIGURATION = 698, - D3D12_MESSAGE_ID_CREATE_ROOT_SIGNATURE_NOT_SUPPORTED_ON_DEVICE = 699, - D3D12_MESSAGE_ID_CREATERESOURCEANDHEAP_NULLRESOURCEPROPERTIES = 700, - D3D12_MESSAGE_ID_CREATERESOURCEANDHEAP_NULLHEAP = 701, - D3D12_MESSAGE_ID_GETRESOURCEALLOCATIONINFO_INVALIDRDESCS = 702, - D3D12_MESSAGE_ID_MAKERESIDENT_NULLOBJECTARRAY = 703, - D3D12_MESSAGE_ID_MAKERESIDENT_INVALIDOBJECT = 704, - D3D12_MESSAGE_ID_EVICT_NULLOBJECTARRAY = 705, - D3D12_MESSAGE_ID_EVICT_INVALIDOBJECT = 706, - D3D12_MESSAGE_ID_HEAPS_UNSUPPORTED = 707, - D3D12_MESSAGE_ID_SET_DESCRIPTOR_TABLE_INVALID = 708, - D3D12_MESSAGE_ID_SET_ROOT_CONSTANT_INVALID = 709, - D3D12_MESSAGE_ID_SET_ROOT_CONSTANT_BUFFER_VIEW_INVALID = 710, - D3D12_MESSAGE_ID_SET_ROOT_SHADER_RESOURCE_VIEW_INVALID = 711, - D3D12_MESSAGE_ID_SET_ROOT_UNORDERED_ACCESS_VIEW_INVALID = 712, - D3D12_MESSAGE_ID_SET_VERTEX_BUFFERS_INVALID_DESC = 713, - D3D12_MESSAGE_ID_SET_VERTEX_BUFFERS_LARGE_OFFSET = 714, - D3D12_MESSAGE_ID_SET_INDEX_BUFFER_INVALID_DESC = 715, - D3D12_MESSAGE_ID_SET_INDEX_BUFFER_LARGE_OFFSET = 716, - D3D12_MESSAGE_ID_SET_STREAM_OUTPUT_BUFFERS_INVALID_DESC = 717, - D3D12_MESSAGE_ID_CREATERESOURCE_UNRECOGNIZEDDIMENSIONALITY = 718, - D3D12_MESSAGE_ID_CREATERESOURCE_UNRECOGNIZEDLAYOUT = 719, - D3D12_MESSAGE_ID_CREATERESOURCE_INVALIDDIMENSIONALITY = 720, - D3D12_MESSAGE_ID_CREATERESOURCE_INVALIDALIGNMENT = 721, - D3D12_MESSAGE_ID_CREATERESOURCE_INVALIDMIPLEVELS = 722, - D3D12_MESSAGE_ID_CREATERESOURCE_INVALIDSAMPLEDESC = 723, - D3D12_MESSAGE_ID_CREATERESOURCE_INVALIDLAYOUT = 724, - D3D12_MESSAGE_ID_SET_INDEX_BUFFER_INVALID = 725, - D3D12_MESSAGE_ID_SET_VERTEX_BUFFERS_INVALID = 726, - D3D12_MESSAGE_ID_SET_STREAM_OUTPUT_BUFFERS_INVALID = 727, - D3D12_MESSAGE_ID_SET_RENDER_TARGETS_INVALID = 728, - D3D12_MESSAGE_ID_CREATEQUERY_HEAP_INVALID_PARAMETERS = 729, - D3D12_MESSAGE_ID_CREATEQUERY_HEAP_JPEG_NOT_SUPPORTED = 730, - D3D12_MESSAGE_ID_BEGIN_END_QUERY_INVALID_PARAMETERS = 731, - D3D12_MESSAGE_ID_CLOSE_COMMAND_LIST_OPEN_QUERY = 732, - D3D12_MESSAGE_ID_RESOLVE_QUERY_DATA_INVALID_PARAMETERS = 733, - D3D12_MESSAGE_ID_SET_PREDICATION_INVALID_PARAMETERS = 734, - D3D12_MESSAGE_ID_TIMESTAMPS_NOT_SUPPORTED = 735, - D3D12_MESSAGE_ID_UNSTABLE_POWER_STATE = 736, - D3D12_MESSAGE_ID_CREATERESOURCE_UNRECOGNIZEDFORMAT = 737, - D3D12_MESSAGE_ID_CREATERESOURCE_INVALIDFORMAT = 738, - D3D12_MESSAGE_ID_GETCOPYABLELAYOUT_INVALIDSUBRESOURCERANGE = 739, - D3D12_MESSAGE_ID_GETCOPYABLELAYOUT_INVALIDBASEOFFSET = 740, - D3D12_MESSAGE_ID_RESOURCE_BARRIER_INVALID_HEAP = 741, - D3D12_MESSAGE_ID_CREATE_SAMPLER_INVALID = 742, - D3D12_MESSAGE_ID_CREATECOMMANDSIGNATURE_INVALID = 743, - D3D12_MESSAGE_ID_EXECUTE_INDIRECT_INVALID_PARAMETERS = 744, - D3D12_MESSAGE_ID_GETGPUVIRTUALADDRESS_INVALID_RESOURCE_DIMENSION = 745, - D3D12_MESSAGE_ID_CREATEQUERYORPREDICATE_INVALIDCONTEXTTYPE = 746, - D3D12_MESSAGE_ID_CREATEQUERYORPREDICATE_DECODENOTSUPPORTED = 747, - D3D12_MESSAGE_ID_CREATEQUERYORPREDICATE_ENCODENOTSUPPORTED = 748, - D3D12_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDPLANEINDEX = 749, - D3D12_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDVIDEOPLANEINDEX = 750, - D3D12_MESSAGE_ID_CREATESHADERRESOURCEVIEW_AMBIGUOUSVIDEOPLANEINDEX = 751, - D3D12_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDPLANEINDEX = 752, - D3D12_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDVIDEOPLANEINDEX = 753, - D3D12_MESSAGE_ID_CREATERENDERTARGETVIEW_AMBIGUOUSVIDEOPLANEINDEX = 754, - D3D12_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_INVALIDPLANEINDEX = 755, - D3D12_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_INVALIDVIDEOPLANEINDEX = 756, - D3D12_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_AMBIGUOUSVIDEOPLANEINDEX = 757, - D3D12_MESSAGE_ID_JPEGDECODE_INVALIDSCANDATAOFFSET = 758, - D3D12_MESSAGE_ID_JPEGDECODE_NOTSUPPORTED = 759, - D3D12_MESSAGE_ID_JPEGDECODE_DIMENSIONSTOOLARGE = 760, - D3D12_MESSAGE_ID_JPEGDECODE_INVALIDCOMPONENTS = 761, - D3D12_MESSAGE_ID_JPEGDECODE_UNSUPPORTEDCOMPONENTS = 762, - D3D12_MESSAGE_ID_JPEGDECODE_DESTINATIONNOT2D = 763, - D3D12_MESSAGE_ID_JPEGDECODE_TILEDRESOURCESUNSUPPORTED = 764, - D3D12_MESSAGE_ID_JPEGDECODE_GUARDRECTSUNSUPPORTED = 765, - D3D12_MESSAGE_ID_JPEGDECODE_FORMATUNSUPPORTED = 766, - D3D12_MESSAGE_ID_JPEGDECODE_INVALIDSUBRESOURCE = 767, - D3D12_MESSAGE_ID_JPEGDECODE_INVALIDMIPLEVEL = 768, - D3D12_MESSAGE_ID_JPEGDECODE_EMPTYDESTBOX = 769, - D3D12_MESSAGE_ID_JPEGDECODE_DESTBOXNOT2D = 770, - D3D12_MESSAGE_ID_JPEGDECODE_DESTBOXNOTSUB = 771, - D3D12_MESSAGE_ID_JPEGDECODE_DESTBOXESINTERSECT = 772, - D3D12_MESSAGE_ID_JPEGDECODE_XSUBSAMPLEMISMATCH = 773, - D3D12_MESSAGE_ID_JPEGDECODE_YSUBSAMPLEMISMATCH = 774, - D3D12_MESSAGE_ID_JPEGDECODE_XSUBSAMPLEODD = 775, - D3D12_MESSAGE_ID_JPEGDECODE_YSUBSAMPLEODD = 776, - D3D12_MESSAGE_ID_JPEGDECODE_UPSCALEUNSUPPORTED = 777, - D3D12_MESSAGE_ID_JPEGDECODE_TIER4DOWNSCALETOLARGE = 778, - D3D12_MESSAGE_ID_JPEGDECODE_TIER3DOWNSCALEUNSUPPORTED = 779, - D3D12_MESSAGE_ID_JPEGDECODE_CHROMASIZEMISMATCH = 780, - D3D12_MESSAGE_ID_JPEGDECODE_LUMACHROMASIZEMISMATCH = 781, - D3D12_MESSAGE_ID_JPEGDECODE_INVALIDNUMDESTINATIONS = 782, - D3D12_MESSAGE_ID_JPEGDECODE_SUBBOXUNSUPPORTED = 783, - D3D12_MESSAGE_ID_JPEGDECODE_1DESTUNSUPPORTEDFORMAT = 784, - D3D12_MESSAGE_ID_JPEGDECODE_3DESTUNSUPPORTEDFORMAT = 785, - D3D12_MESSAGE_ID_JPEGDECODE_SCALEUNSUPPORTED = 786, - D3D12_MESSAGE_ID_JPEGDECODE_INVALIDSOURCESIZE = 787, - D3D12_MESSAGE_ID_JPEGDECODE_INVALIDCOPYFLAGS = 788, - D3D12_MESSAGE_ID_JPEGDECODE_HAZARD = 789, - D3D12_MESSAGE_ID_JPEGDECODE_UNSUPPORTEDSRCBUFFERUSAGE = 790, - D3D12_MESSAGE_ID_JPEGDECODE_UNSUPPORTEDSRCBUFFERMISCFLAGS = 791, - D3D12_MESSAGE_ID_JPEGDECODE_UNSUPPORTEDDSTTEXTUREUSAGE = 792, - D3D12_MESSAGE_ID_JPEGDECODE_BACKBUFFERNOTSUPPORTED = 793, - D3D12_MESSAGE_ID_JPEGDECODE_UNSUPPRTEDCOPYFLAGS = 794, - D3D12_MESSAGE_ID_JPEGENCODE_NOTSUPPORTED = 795, - D3D12_MESSAGE_ID_JPEGENCODE_INVALIDSCANDATAOFFSET = 796, - D3D12_MESSAGE_ID_JPEGENCODE_INVALIDCOMPONENTS = 797, - D3D12_MESSAGE_ID_JPEGENCODE_SOURCENOT2D = 798, - D3D12_MESSAGE_ID_JPEGENCODE_TILEDRESOURCESUNSUPPORTED = 799, - D3D12_MESSAGE_ID_JPEGENCODE_GUARDRECTSUNSUPPORTED = 800, - D3D12_MESSAGE_ID_JPEGENCODE_XSUBSAMPLEMISMATCH = 801, - D3D12_MESSAGE_ID_JPEGENCODE_YSUBSAMPLEMISMATCH = 802, - D3D12_MESSAGE_ID_JPEGENCODE_UNSUPPORTEDCOMPONENTS = 803, - D3D12_MESSAGE_ID_JPEGENCODE_FORMATUNSUPPORTED = 804, - D3D12_MESSAGE_ID_JPEGENCODE_INVALIDSUBRESOURCE = 805, - D3D12_MESSAGE_ID_JPEGENCODE_INVALIDMIPLEVEL = 806, - D3D12_MESSAGE_ID_JPEGENCODE_DIMENSIONSTOOLARGE = 807, - D3D12_MESSAGE_ID_JPEGENCODE_HAZARD = 808, - D3D12_MESSAGE_ID_JPEGENCODE_UNSUPPORTEDDSTBUFFERUSAGE = 809, - D3D12_MESSAGE_ID_JPEGENCODE_UNSUPPORTEDDSTBUFFERMISCFLAGS = 810, - D3D12_MESSAGE_ID_JPEGENCODE_UNSUPPORTEDSRCTEXTUREUSAGE = 811, - D3D12_MESSAGE_ID_JPEGENCODE_BACKBUFFERNOTSUPPORTED = 812, - D3D12_MESSAGE_ID_CREATEQUERYORPREDICATE_UNSUPPORTEDCONTEXTTTYPEFORQUERY = 813, - D3D12_MESSAGE_ID_FLUSH1_INVALIDCONTEXTTYPE = 814, - D3D12_MESSAGE_ID_CREATERESOURCE_INVALIDCLEARVALUE = 815, - D3D12_MESSAGE_ID_CREATERESOURCE_UNRECOGNIZEDCLEARVALUEFORMAT = 816, - D3D12_MESSAGE_ID_CREATERESOURCE_INVALIDCLEARVALUEFORMAT = 817, - D3D12_MESSAGE_ID_CREATERESOURCE_CLEARVALUEDENORMFLUSH = 818, - D3D12_MESSAGE_ID_CLEARDEPTHSTENCILVIEW_INVALIDDEPTH = 819, - D3D12_MESSAGE_ID_CLEARRENDERTARGETVIEW_MISMATCHINGCLEARVALUE = 820, - D3D12_MESSAGE_ID_CLEARDEPTHSTENCILVIEW_MISMATCHINGCLEARVALUE = 821, - D3D12_MESSAGE_ID_MAP_INVALIDHEAP = 822, - D3D12_MESSAGE_ID_UNMAP_INVALIDHEAP = 823, - D3D12_MESSAGE_ID_MAP_INVALIDRESOURCE = 824, - D3D12_MESSAGE_ID_UNMAP_INVALIDRESOURCE = 825, - D3D12_MESSAGE_ID_MAP_INVALIDSUBRESOURCE = 826, - D3D12_MESSAGE_ID_UNMAP_INVALIDSUBRESOURCE = 827, - D3D12_MESSAGE_ID_MAP_INVALIDRANGE = 828, - D3D12_MESSAGE_ID_UNMAP_INVALIDRANGE = 829, - D3D12_MESSAGE_ID_MAP_NULLRANGE = 830, - D3D12_MESSAGE_ID_UNMAP_NULLRANGE = 831, - D3D12_MESSAGE_ID_MAP_INVALIDDATAPOINTER = 832, - D3D12_MESSAGE_ID_MAP_INVALIDARG_RETURN = 833, - D3D12_MESSAGE_ID_MAP_OUTOFMEMORY_RETURN = 834, - D3D12_MESSAGE_ID_EXECUTECOMMANDLISTS_BUNDLENOTSUPPORTED = 835, - D3D12_MESSAGE_ID_EXECUTECOMMANDLISTS_COMMANDLISTMISMATCH = 836, - D3D12_MESSAGE_ID_EXECUTECOMMANDLISTS_OPENCOMMANDLIST = 837, - D3D12_MESSAGE_ID_EXECUTECOMMANDLISTS_FAILEDCOMMANDLIST = 838, - D3D12_MESSAGE_ID_COPYBUFFERREGION_NULLDST = 839, - D3D12_MESSAGE_ID_COPYBUFFERREGION_INVALIDDSTRESOURCEDIMENSION = 840, - D3D12_MESSAGE_ID_COPYBUFFERREGION_DSTRANGEOUTOFBOUNDS = 841, - D3D12_MESSAGE_ID_COPYBUFFERREGION_NULLSRC = 842, - D3D12_MESSAGE_ID_COPYBUFFERREGION_INVALIDSRCRESOURCEDIMENSION = 843, - D3D12_MESSAGE_ID_COPYBUFFERREGION_SRCRANGEOUTOFBOUNDS = 844, - D3D12_MESSAGE_ID_COPYBUFFERREGION_INVALIDCOPYFLAGS = 845, - D3D12_MESSAGE_ID_COPYTEXTUREREGION_NULLDST = 846, - D3D12_MESSAGE_ID_COPYTEXTUREREGION_UNRECOGNIZEDDSTTYPE = 847, - D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDDSTRESOURCEDIMENSION = 848, - D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDDSTRESOURCE = 849, - D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDDSTSUBRESOURCE = 850, - D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDDSTOFFSET = 851, - D3D12_MESSAGE_ID_COPYTEXTUREREGION_UNRECOGNIZEDDSTFORMAT = 852, - D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDDSTFORMAT = 853, - D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDDSTDIMENSIONS = 854, - D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDDSTROWPITCH = 855, - D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDDSTPLACEMENT = 856, - D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDDSTDSPLACEDFOOTPRINTFORMAT = 857, - D3D12_MESSAGE_ID_COPYTEXTUREREGION_DSTREGIONOUTOFBOUNDS = 858, - D3D12_MESSAGE_ID_COPYTEXTUREREGION_NULLSRC = 859, - D3D12_MESSAGE_ID_COPYTEXTUREREGION_UNRECOGNIZEDSRCTYPE = 860, - D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDSRCRESOURCEDIMENSION = 861, - D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDSRCRESOURCE = 862, - D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDSRCSUBRESOURCE = 863, - D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDSRCOFFSET = 864, - D3D12_MESSAGE_ID_COPYTEXTUREREGION_UNRECOGNIZEDSRCFORMAT = 865, - D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDSRCFORMAT = 866, - D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDSRCDIMENSIONS = 867, - D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDSRCROWPITCH = 868, - D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDSRCPLACEMENT = 869, - D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDSRCDSPLACEDFOOTPRINTFORMAT = 870, - D3D12_MESSAGE_ID_COPYTEXTUREREGION_SRCREGIONOUTOFBOUNDS = 871, - D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDDSTCOORDINATES = 872, - D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDSRCBOX = 873, - D3D12_MESSAGE_ID_COPYTEXTUREREGION_FORMATMISMATCH = 874, - D3D12_MESSAGE_ID_COPYTEXTUREREGION_EMPTYBOX = 875, - D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDCOPYFLAGS = 876, - D3D12_MESSAGE_ID_RESOLVESUBRESOURCE_INVALID_SUBRESOURCE_INDEX = 877, - D3D12_MESSAGE_ID_RESOLVESUBRESOURCE_INVALID_FORMAT = 878, - D3D12_MESSAGE_ID_RESOLVESUBRESOURCE_RESOURCE_MISMATCH = 879, - D3D12_MESSAGE_ID_RESOLVESUBRESOURCE_INVALID_SAMPLE_COUNT = 880, - D3D12_MESSAGE_ID_CREATECOMPUTEPIPELINESTATE_INVALID_SHADER = 881, - D3D12_MESSAGE_ID_CREATECOMPUTEPIPELINESTATE_CS_ROOT_SIGNATURE_MISMATCH = 882, - D3D12_MESSAGE_ID_CREATECOMPUTEPIPELINESTATE_MISSING_ROOT_SIGNATURE = 883, - D3D12_MESSAGE_ID_CREATEPIPELINESTATE_INVALIDCACHEDBLOB = 884, - D3D12_MESSAGE_ID_CREATEPIPELINESTATE_CACHEDBLOBADAPTERMISMATCH = 885, - D3D12_MESSAGE_ID_CREATEPIPELINESTATE_CACHEDBLOBDRIVERVERSIONMISMATCH = 886, - D3D12_MESSAGE_ID_CREATEPIPELINESTATE_CACHEDBLOBDESCMISMATCH = 887, - D3D12_MESSAGE_ID_CREATEPIPELINESTATE_CACHEDBLOBIGNORED = 888, - D3D12_MESSAGE_ID_WRITETOSUBRESOURCE_INVALIDHEAP = 889, - D3D12_MESSAGE_ID_WRITETOSUBRESOURCE_INVALIDRESOURCE = 890, - D3D12_MESSAGE_ID_WRITETOSUBRESOURCE_INVALIDBOX = 891, - D3D12_MESSAGE_ID_WRITETOSUBRESOURCE_INVALIDSUBRESOURCE = 892, - D3D12_MESSAGE_ID_WRITETOSUBRESOURCE_EMPTYBOX = 893, - D3D12_MESSAGE_ID_READFROMSUBRESOURCE_INVALIDHEAP = 894, - D3D12_MESSAGE_ID_READFROMSUBRESOURCE_INVALIDRESOURCE = 895, - D3D12_MESSAGE_ID_READFROMSUBRESOURCE_INVALIDBOX = 896, - D3D12_MESSAGE_ID_READFROMSUBRESOURCE_INVALIDSUBRESOURCE = 897, - D3D12_MESSAGE_ID_READFROMSUBRESOURCE_EMPTYBOX = 898, - D3D12_MESSAGE_ID_TOO_MANY_NODES_SPECIFIED = 899, - D3D12_MESSAGE_ID_INVALID_NODE_INDEX = 900, - D3D12_MESSAGE_ID_GETHEAPPROPERTIES_INVALIDRESOURCE = 901, - D3D12_MESSAGE_ID_NODE_MASK_MISMATCH = 902, - D3D12_MESSAGE_ID_COMMAND_LIST_OUTOFMEMORY = 903, - D3D12_MESSAGE_ID_COMMAND_LIST_MULTIPLE_SWAPCHAIN_BUFFER_REFERENCES = 904, - D3D12_MESSAGE_ID_COMMAND_LIST_TOO_MANY_SWAPCHAIN_REFERENCES = 905, - D3D12_MESSAGE_ID_COMMAND_QUEUE_TOO_MANY_SWAPCHAIN_REFERENCES = 906, - D3D12_MESSAGE_ID_EXECUTECOMMANDLISTS_WRONGSWAPCHAINBUFFERREFERENCE = 907, - D3D12_MESSAGE_ID_COMMAND_LIST_SETRENDERTARGETS_INVALIDNUMRENDERTARGETS = 908, - D3D12_MESSAGE_ID_CREATE_QUEUE_INVALID_TYPE = 909, - D3D12_MESSAGE_ID_CREATE_QUEUE_INVALID_FLAGS = 910, - D3D12_MESSAGE_ID_CREATESHAREDRESOURCE_INVALIDFLAGS = 911, - D3D12_MESSAGE_ID_CREATESHAREDRESOURCE_INVALIDFORMAT = 912, - D3D12_MESSAGE_ID_CREATESHAREDHEAP_INVALIDFLAGS = 913, - D3D12_MESSAGE_ID_REFLECTSHAREDPROPERTIES_UNRECOGNIZEDPROPERTIES = 914, - D3D12_MESSAGE_ID_REFLECTSHAREDPROPERTIES_INVALIDSIZE = 915, - D3D12_MESSAGE_ID_REFLECTSHAREDPROPERTIES_INVALIDOBJECT = 916, - D3D12_MESSAGE_ID_KEYEDMUTEX_INVALIDOBJECT = 917, - D3D12_MESSAGE_ID_KEYEDMUTEX_INVALIDKEY = 918, - D3D12_MESSAGE_ID_KEYEDMUTEX_WRONGSTATE = 919, - D3D12_MESSAGE_ID_CREATE_QUEUE_INVALID_PRIORITY = 920, - D3D12_MESSAGE_ID_OBJECT_DELETED_WHILE_STILL_IN_USE = 921, - D3D12_MESSAGE_ID_CREATEPIPELINESTATE_INVALID_FLAGS = 922, - D3D12_MESSAGE_ID_HEAP_ADDRESS_RANGE_HAS_NO_RESOURCE = 923, - D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_RENDER_TARGET_DELETED = 924, - D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_ALL_RENDER_TARGETS_HAVE_UNKNOWN_FORMAT = 925, - D3D12_MESSAGE_ID_HEAP_ADDRESS_RANGE_INTERSECTS_MULTIPLE_BUFFERS = 926, - D3D12_MESSAGE_ID_EXECUTECOMMANDLISTS_GPU_WRITTEN_READBACK_RESOURCE_MAPPED = 927, - D3D12_MESSAGE_ID_UNMAP_RANGE_NOT_NEEDED = 928, - D3D12_MESSAGE_ID_UNMAP_RANGE_NOT_EMPTY = 929, - D3D12_MESSAGE_ID_MAP_INVALID_NULLRANGE = 930, - D3D12_MESSAGE_ID_UNMAP_INVALID_NULLRANGE = 931, - D3D12_MESSAGE_ID_NO_GRAPHICS_API_SUPPORT = 932, - D3D12_MESSAGE_ID_NO_COMPUTE_API_SUPPORT = 933, - D3D12_MESSAGE_ID_D3D12_MESSAGES_END = 934, -}} -STRUCT!{struct D3D12_MESSAGE { - Category: D3D12_MESSAGE_CATEGORY, - Severity: D3D12_MESSAGE_SEVERITY, - ID: D3D12_MESSAGE_ID, - pDescription: *const ::c_char, - DescriptionByteLength: ::SIZE_T, -}} -STRUCT!{struct D3D12_INFO_QUEUE_FILTER_DESC { - NumCategories: ::UINT, - pCategoryList: *mut D3D12_MESSAGE_CATEGORY, - NumSeverities: ::UINT, - pSeverityList: *mut D3D12_MESSAGE_SEVERITY, - NumIDs: ::UINT, - pIDList: *mut D3D12_MESSAGE_ID, -}} -STRUCT!{struct D3D12_INFO_QUEUE_FILTER { - AllowList: D3D12_INFO_QUEUE_FILTER_DESC, - DenyList: D3D12_INFO_QUEUE_FILTER_DESC, -}} -pub const D3D12_INFO_QUEUE_DEFAULT_MESSAGE_COUNT_LIMIT: ::UINT = 1024; -RIDL!{interface ID3D12InfoQueue(ID3D12InfoQueueVtbl): IUnknown(IUnknownVtbl) { - fn SetMessageCountLimit(&mut self, MessageCountLimit: ::UINT64) -> ::HRESULT, - fn ClearStoredMessages(&mut self) -> (), - fn GetMessage( - &mut self, MessageIndex: ::UINT64, pMessage: *mut ::D3D12_MESSAGE, - pMessageByteLength: *mut ::SIZE_T - ) -> ::HRESULT, - fn GetNumMessagesAllowedByStorageFilter(&mut self) -> ::UINT64, - fn GetNumMessagesDeniedByStorageFilter(&mut self) -> ::UINT64, - fn GetNumStoredMessages(&mut self) -> ::UINT64, - fn GetNumStoredMessagesAllowedByRetrievalFilter(&mut self) -> ::UINT64, - fn GetNumMessagesDiscardedByMessageCountLimit(&mut self) -> ::UINT64, - fn GetMessageCountLimit(&mut self) -> ::UINT64, - fn AddStorageFilterEntries(&mut self, pFilter: *mut ::D3D12_INFO_QUEUE_FILTER) -> ::HRESULT, - fn GetStorageFilter( - &mut self, pFilter: *mut ::D3D12_INFO_QUEUE_FILTER, pFilterByteLength: *mut ::SIZE_T - ) -> ::HRESULT, - fn ClearStorageFilter(&mut self) -> (), - fn PushEmptyStorageFilter(&mut self) -> ::HRESULT, - fn PushCopyOfStorageFilter(&mut self) -> ::HRESULT, - fn PushStorageFilter(&mut self, pFilter: *mut ::D3D12_INFO_QUEUE_FILTER) -> ::HRESULT, - fn PopStorageFilter(&mut self) -> (), - fn GetStorageFilterStackSize(&mut self) -> ::UINT, - fn AddRetrievalFilterEntries(&mut self, pFilter: *mut ::D3D12_INFO_QUEUE_FILTER) -> ::HRESULT, - fn GetRetrievalFilter( - &mut self, pFilter: *mut ::D3D12_INFO_QUEUE_FILTER, pFilterByteLength: *mut ::SIZE_T - ) -> ::HRESULT, - fn ClearRetrievalFilter(&mut self) -> (), - fn PushEmptyRetrievalFilter(&mut self) -> ::HRESULT, - fn PushCopyOfRetrievalFilter(&mut self) -> ::HRESULT, - fn PushRetrievalFilter(&mut self, pFilter: *mut ::D3D12_INFO_QUEUE_FILTER) -> ::HRESULT, - fn PopRetrievalFilter(&mut self) -> (), - fn GetRetrievalFilterStackSize(&mut self) -> ::UINT, - fn AddMessage( - &mut self, Category: ::D3D12_MESSAGE_CATEGORY, Severity: ::D3D12_MESSAGE_SEVERITY, - ID: ::D3D12_MESSAGE_ID, pDescription: ::LPCSTR - ) -> ::HRESULT, - fn AddApplicationMessage( - &mut self, Severity: ::D3D12_MESSAGE_SEVERITY, pDescription: ::LPCSTR - ) -> ::HRESULT, - fn SetBreakOnCategory( - &mut self, Category: ::D3D12_MESSAGE_CATEGORY, bEnable: ::BOOL - ) -> ::HRESULT, - fn SetBreakOnSeverity( - &mut self, Severity: ::D3D12_MESSAGE_SEVERITY, bEnable: ::BOOL - ) -> ::HRESULT, - fn SetBreakOnID(&mut self, ID: ::D3D12_MESSAGE_ID, bEnable: ::BOOL) -> ::HRESULT, - fn GetBreakOnCategory(&mut self, Category: ::D3D12_MESSAGE_CATEGORY) -> ::BOOL, - fn GetBreakOnSeverity(&mut self, Severity: ::D3D12_MESSAGE_SEVERITY) -> ::BOOL, - fn GetBreakOnID(&mut self, ID: ::D3D12_MESSAGE_ID) -> ::BOOL, - fn SetMuteDebugOutput(&mut self, bMute: ::BOOL) -> (), - fn GetMuteDebugOutput(&mut self) -> ::BOOL -}} -DEFINE_GUID!{IID_ID3D12Debug, 0x344488b7, 0x6846, 0x474b, - 0xb9, 0x89, 0xf0, 0x27, 0x44, 0x82, 0x45, 0xe0} -DEFINE_GUID!{IID_ID3D12DebugDevice, 0x3febd6dd, 0x4973, 0x4787, - 0x81, 0x94, 0xe4, 0x5f, 0x9e, 0x28, 0x92, 0x3e} -DEFINE_GUID!{IID_ID3D12DebugCommandQueue, 0x09e0bf36, 0x54ac, 0x484f, - 0x88, 0x47, 0x4b, 0xae, 0xea, 0xb6, 0x05, 0x3a} -DEFINE_GUID!{IID_ID3D12DebugCommandList, 0x09e0bf36, 0x54ac, 0x484f, - 0x88, 0x47, 0x4b, 0xae, 0xea, 0xb6, 0x05, 0x3f} -DEFINE_GUID!{IID_ID3D12InfoQueue, 0x0742a90b, 0xc387, 0x483f, - 0xb9, 0x46, 0x30, 0xa7, 0xe4, 0xe6, 0x14, 0x58} diff --git a/deps/winapi-0.2.5/src/d3d9caps.rs b/deps/winapi-0.2.5/src/d3d9caps.rs deleted file mode 100644 index c30a1721c..000000000 --- a/deps/winapi-0.2.5/src/d3d9caps.rs +++ /dev/null @@ -1,357 +0,0 @@ -// Copyright © 2015, Corey Richardson -// Licensed under the MIT License <LICENSE.md> -//! Direct3D capabilities include file -STRUCT!{struct D3DVSHADERCAPS2_0 { - Caps: ::DWORD, - DynamicFlowControlDepth: ::INT, - NumTemps: ::INT, - StaticFlowControlDepth: ::INT, -}} -pub const D3DVS20CAPS_PREDICATION: ::DWORD = 1 << 0; -pub const D3DVS20_MAX_DYNAMICFLOWCONTROLDEPTH: ::DWORD = 24; -pub const D3DVS20_MIN_DYNAMICFLOWCONTROLDEPTH: ::DWORD = 0; -pub const D3DVS20_MAX_NUMTEMPS: ::DWORD = 32; -pub const D3DVS20_MIN_NUMTEMPS: ::DWORD = 12; -pub const D3DVS20_MAX_STATICFLOWCONTROLDEPTH: ::DWORD = 4; -pub const D3DVS20_MIN_STATICFLOWCONTROLDEPTH: ::DWORD = 1; -STRUCT!{struct D3DPSHADERCAPS2_0 { - Caps: ::DWORD, - DynamicFlowControlDepth: ::INT, - NumTemps: ::INT, - StaticFlowControlDepth: ::INT, - NumInstructionSlots: ::INT, -}} -pub const D3DPS20CAPS_ARBITRARYSWIZZLE: ::DWORD = 1 << 0; -pub const D3DPS20CAPS_GRADIENTINSTRUCTIONS: ::DWORD = 1 << 1; -pub const D3DPS20CAPS_PREDICATION: ::DWORD = 1 << 2; -pub const D3DPS20CAPS_NODEPENDENTREADLIMIT: ::DWORD = 1 << 3; -pub const D3DPS20CAPS_NOTEXINSTRUCTIONLIMIT: ::DWORD = 1 << 4; -pub const D3DPS20_MAX_DYNAMICFLOWCONTROLDEPTH: ::DWORD = 24; -pub const D3DPS20_MIN_DYNAMICFLOWCONTROLDEPTH: ::DWORD = 0; -pub const D3DPS20_MAX_NUMTEMPS: ::DWORD = 32; -pub const D3DPS20_MIN_NUMTEMPS: ::DWORD = 12; -pub const D3DPS20_MAX_STATICFLOWCONTROLDEPTH: ::DWORD = 4; -pub const D3DPS20_MIN_STATICFLOWCONTROLDEPTH: ::DWORD = 0; -pub const D3DPS20_MAX_NUMINSTRUCTIONSLOTS: ::DWORD = 512; -pub const D3DPS20_MIN_NUMINSTRUCTIONSLOTS: ::DWORD = 96; -pub const D3DMIN30SHADERINSTRUCTIONS: ::DWORD = 512; -pub const D3DMAX30SHADERINSTRUCTIONS: ::DWORD = 32768; -STRUCT!{struct D3DOVERLAYCAPS { - Caps: ::UINT, - MaxOverlayDisplayWidth: ::UINT, - MaxOverlayDisplayHeight: ::UINT, -}} -pub const D3DOVERLAYCAPS_FULLRANGERGB: ::DWORD = 0x00000001; -pub const D3DOVERLAYCAPS_LIMITEDRANGERGB: ::DWORD = 0x00000002; -pub const D3DOVERLAYCAPS_YCbCr_BT601: ::DWORD = 0x00000004; -pub const D3DOVERLAYCAPS_YCbCr_BT709: ::DWORD = 0x00000008; -pub const D3DOVERLAYCAPS_YCbCr_BT601_xvYCC: ::DWORD = 0x00000010; -pub const D3DOVERLAYCAPS_YCbCr_BT709_xvYCC: ::DWORD = 0x00000020; -pub const D3DOVERLAYCAPS_STRETCHX: ::DWORD = 0x00000040; -pub const D3DOVERLAYCAPS_STRETCHY: ::DWORD = 0x00000080; -STRUCT!{struct D3DCONTENTPROTECTIONCAPS { - Caps: ::DWORD, - KeyExchangeType: ::GUID, - BufferAlignmentStart: ::UINT, - BlockAlignmentSize: ::UINT, - ProtectedMemorySize: ::ULONGLONG, -}} -pub const D3DCPCAPS_SOFTWARE: ::DWORD = 0x00000001; -pub const D3DCPCAPS_HARDWARE: ::DWORD = 0x00000002; -pub const D3DCPCAPS_PROTECTIONALWAYSON: ::DWORD = 0x00000004; -pub const D3DCPCAPS_PARTIALDECRYPTION: ::DWORD = 0x00000008; -pub const D3DCPCAPS_CONTENTKEY: ::DWORD = 0x00000010; -pub const D3DCPCAPS_FRESHENSESSIONKEY: ::DWORD = 0x00000020; -pub const D3DCPCAPS_ENCRYPTEDREADBACK: ::DWORD = 0x00000040; -pub const D3DCPCAPS_ENCRYPTEDREADBACKKEY: ::DWORD = 0x00000080; -pub const D3DCPCAPS_SEQUENTIAL_CTR_IV: ::DWORD = 0x00000100; -pub const D3DCPCAPS_ENCRYPTSLICEDATAONLY: ::DWORD = 0x00000200; -DEFINE_GUID!(D3DCRYPTOTYPE_AES128_CTR, 0x9b6bd711, 0x4f74, 0x41c9, - 0x9e, 0x7b, 0xb, 0xe2, 0xd7, 0xd9, 0x3b, 0x4f); -DEFINE_GUID!(D3DCRYPTOTYPE_PROPRIETARY, 0xab4e9afd, 0x1d1c, 0x46e6, - 0xa7, 0x2f, 0x8, 0x69, 0x91, 0x7b, 0xd, 0xe8); -DEFINE_GUID!(D3DKEYEXCHANGE_RSAES_OAEP, 0xc1949895, 0xd72a, 0x4a1d, - 0x8e, 0x5d, 0xed, 0x85, 0x7d, 0x17, 0x15, 0x20); -DEFINE_GUID!(D3DKEYEXCHANGE_DXVA, 0x43d3775c, 0x38e5, 0x4924, 0x8d, - 0x86, 0xd3, 0xfc, 0xcf, 0x15, 0x3e, 0x9b); -STRUCT!{struct D3DCAPS9 { - DeviceType: ::D3DDEVTYPE, - AdapterOrdinal: ::UINT, - Caps: ::DWORD, - Caps2: ::DWORD, - Caps3: ::DWORD, - PresentationIntervals: ::DWORD, - CursorCaps: ::DWORD, - DevCaps: ::DWORD, - PrimitiveMiscCaps: ::DWORD, - RasterCaps: ::DWORD, - ZCmpCaps: ::DWORD, - SrcBlendCaps: ::DWORD, - DestBlendCaps: ::DWORD, - AlphaCmpCaps: ::DWORD, - ShadeCaps: ::DWORD, - TextureCaps: ::DWORD, - TextureFilterCaps: ::DWORD, - CubeTextureFilterCaps: ::DWORD, - VolumeTextureFilterCaps: ::DWORD, - TextureAddressCaps: ::DWORD, - VolumeTextureAddressCaps: ::DWORD, - LineCaps: ::DWORD, - MaxTextureWidth: ::DWORD, - MaxTextureHeight: ::DWORD, - MaxVolumeExtent: ::DWORD, - MaxTextureRepeat: ::DWORD, - MaxTextureAspectRatio: ::DWORD, - MaxAnisotropy: ::DWORD, - MaxVertexW: ::c_float, - GuardBandLeft: ::c_float, - GuardBandTop: ::c_float, - GuardBandRight: ::c_float, - GuardBandBottom: ::c_float, - ExtentsAdjust: ::c_float, - StencilCaps: ::DWORD, - FVFCaps: ::DWORD, - TextureOpCaps: ::DWORD, - MaxTextureBlendStages: ::DWORD, - MaxSimultaneousTextures: ::DWORD, - VertexProcessingCaps: ::DWORD, - MaxActiveLights: ::DWORD, - MaxUserClipPlanes: ::DWORD, - MaxVertexBlendMatrices: ::DWORD, - MaxVertexBlendMatrixIndex: ::DWORD, - MaxPointSize: ::c_float, - MaxPrimitiveCount: ::DWORD, - MaxVertexIndex: ::DWORD, - MaxStreams: ::DWORD, - MaxStreamStride: ::DWORD, - VertexShaderVersion: ::DWORD, - MaxVertexShaderConst: ::DWORD, - PixelShaderVersion: ::DWORD, - PixelShader1xMaxValue: ::c_float, - DevCaps2: ::DWORD, - MaxNpatchTessellationLevel: ::c_float, - Reserved5: ::DWORD, - MasterAdapterOrdinal: ::UINT, - AdapterOrdinalInGroup: ::UINT, - NumberOfAdaptersInGroup: ::UINT, - DeclTypes: ::DWORD, - NumSimultaneousRTs: ::DWORD, - StretchRectFilterCaps: ::DWORD, - VS20Caps: ::D3DVSHADERCAPS2_0, - PS20Caps: ::D3DPSHADERCAPS2_0, - VertexTextureFilterCaps: ::DWORD, - MaxVShaderInstructionsExecuted: ::DWORD, - MaxPShaderInstructionsExecuted: ::DWORD, - MaxVertexShader30InstructionSlots: ::DWORD, - MaxPixelShader30InstructionSlots: ::DWORD, -}} -pub const D3DCAPS_OVERLAY: ::DWORD = 0x00000800; -pub const D3DCAPS_READ_SCANLINE: ::DWORD = 0x00020000; -pub const D3DCAPS2_FULLSCREENGAMMA: ::DWORD = 0x00020000; -pub const D3DCAPS2_CANCALIBRATEGAMMA: ::DWORD = 0x00100000; -pub const D3DCAPS2_RESERVED: ::DWORD = 0x02000000; -pub const D3DCAPS2_CANMANAGERESOURCE: ::DWORD = 0x10000000; -pub const D3DCAPS2_DYNAMICTEXTURES: ::DWORD = 0x20000000; -pub const D3DCAPS2_CANAUTOGENMIPMAP: ::DWORD = 0x40000000; -pub const D3DCAPS2_CANSHARERESOURCE: ::DWORD = 0x80000000; -pub const D3DCAPS3_RESERVED: ::DWORD = 0x8000001f; -pub const D3DCAPS3_ALPHA_FULLSCREEN_FLIP_OR_DISCARD: ::DWORD = 0x00000020; -pub const D3DCAPS3_LINEAR_TO_SRGB_PRESENTATION: ::DWORD = 0x00000080; -pub const D3DCAPS3_COPY_TO_VIDMEM: ::DWORD = 0x00000100; -pub const D3DCAPS3_COPY_TO_SYSTEMMEM: ::DWORD = 0x00000200; -pub const D3DCAPS3_DXVAHD: ::DWORD = 0x00000400; -pub const D3DCAPS3_DXVAHD_LIMITED: ::DWORD = 0x00000800; -pub const D3DPRESENT_INTERVAL_DEFAULT: ::DWORD = 0x00000000; -pub const D3DPRESENT_INTERVAL_ONE: ::DWORD = 0x00000001; -pub const D3DPRESENT_INTERVAL_TWO: ::DWORD = 0x00000002; -pub const D3DPRESENT_INTERVAL_THREE: ::DWORD = 0x00000004; -pub const D3DPRESENT_INTERVAL_FOUR: ::DWORD = 0x00000008; -pub const D3DPRESENT_INTERVAL_IMMEDIATE: ::DWORD = 0x80000000; -pub const D3DCURSORCAPS_COLOR: ::DWORD = 0x00000001; -pub const D3DCURSORCAPS_LOWRES: ::DWORD = 0x00000002; -pub const D3DDEVCAPS_EXECUTESYSTEMMEMORY: ::DWORD = 0x00000010; -pub const D3DDEVCAPS_EXECUTEVIDEOMEMORY: ::DWORD = 0x00000020; -pub const D3DDEVCAPS_TLVERTEXSYSTEMMEMORY: ::DWORD = 0x00000040; -pub const D3DDEVCAPS_TLVERTEXVIDEOMEMORY: ::DWORD = 0x00000080; -pub const D3DDEVCAPS_TEXTURESYSTEMMEMORY: ::DWORD = 0x00000100; -pub const D3DDEVCAPS_TEXTUREVIDEOMEMORY: ::DWORD = 0x00000200; -pub const D3DDEVCAPS_DRAWPRIMTLVERTEX: ::DWORD = 0x00000400; -pub const D3DDEVCAPS_CANRENDERAFTERFLIP: ::DWORD = 0x00000800; -pub const D3DDEVCAPS_TEXTURENONLOCALVIDMEM: ::DWORD = 0x00001000; -pub const D3DDEVCAPS_DRAWPRIMITIVES2: ::DWORD = 0x00002000; -pub const D3DDEVCAPS_SEPARATETEXTUREMEMORIES: ::DWORD = 0x00004000; -pub const D3DDEVCAPS_DRAWPRIMITIVES2EX: ::DWORD = 0x00008000; -pub const D3DDEVCAPS_HWTRANSFORMANDLIGHT: ::DWORD = 0x00010000; -pub const D3DDEVCAPS_CANBLTSYSTONONLOCAL: ::DWORD = 0x00020000; -pub const D3DDEVCAPS_HWRASTERIZATION: ::DWORD = 0x00080000; -pub const D3DDEVCAPS_PUREDEVICE: ::DWORD = 0x00100000; -pub const D3DDEVCAPS_QUINTICRTPATCHES: ::DWORD = 0x00200000; -pub const D3DDEVCAPS_RTPATCHES: ::DWORD = 0x00400000; -pub const D3DDEVCAPS_RTPATCHHANDLEZERO: ::DWORD = 0x00800000; -pub const D3DDEVCAPS_NPATCHES: ::DWORD = 0x01000000; -pub const D3DPMISCCAPS_MASKZ: ::DWORD = 0x00000002; -pub const D3DPMISCCAPS_CULLNONE: ::DWORD = 0x00000010; -pub const D3DPMISCCAPS_CULLCW: ::DWORD = 0x00000020; -pub const D3DPMISCCAPS_CULLCCW: ::DWORD = 0x00000040; -pub const D3DPMISCCAPS_COLORWRITEENABLE: ::DWORD = 0x00000080; -pub const D3DPMISCCAPS_CLIPPLANESCALEDPOINTS: ::DWORD = 0x00000100; -pub const D3DPMISCCAPS_CLIPTLVERTS: ::DWORD = 0x00000200; -pub const D3DPMISCCAPS_TSSARGTEMP: ::DWORD = 0x00000400; -pub const D3DPMISCCAPS_BLENDOP: ::DWORD = 0x00000800; -pub const D3DPMISCCAPS_NULLREFERENCE: ::DWORD = 0x00001000; -pub const D3DPMISCCAPS_INDEPENDENTWRITEMASKS: ::DWORD = 0x00004000; -pub const D3DPMISCCAPS_PERSTAGECONSTANT: ::DWORD = 0x00008000; -pub const D3DPMISCCAPS_FOGANDSPECULARALPHA: ::DWORD = 0x00010000; -pub const D3DPMISCCAPS_SEPARATEALPHABLEND: ::DWORD = 0x00020000; -pub const D3DPMISCCAPS_MRTINDEPENDENTBITDEPTHS: ::DWORD = 0x00040000; -pub const D3DPMISCCAPS_MRTPOSTPIXELSHADERBLENDING: ::DWORD = 0x00080000; -pub const D3DPMISCCAPS_FOGVERTEXCLAMPED: ::DWORD = 0x00100000; -pub const D3DPMISCCAPS_POSTBLENDSRGBCONVERT: ::DWORD = 0x00200000; -pub const D3DLINECAPS_TEXTURE: ::DWORD = 0x00000001; -pub const D3DLINECAPS_ZTEST: ::DWORD = 0x00000002; -pub const D3DLINECAPS_BLEND: ::DWORD = 0x00000004; -pub const D3DLINECAPS_ALPHACMP: ::DWORD = 0x00000008; -pub const D3DLINECAPS_FOG: ::DWORD = 0x00000010; -pub const D3DLINECAPS_ANTIALIAS: ::DWORD = 0x00000020; -pub const D3DPRASTERCAPS_DITHER: ::DWORD = 0x00000001; -pub const D3DPRASTERCAPS_ZTEST: ::DWORD = 0x00000010; -pub const D3DPRASTERCAPS_FOGVERTEX: ::DWORD = 0x00000080; -pub const D3DPRASTERCAPS_FOGTABLE: ::DWORD = 0x00000100; -pub const D3DPRASTERCAPS_MIPMAPLODBIAS: ::DWORD = 0x00002000; -pub const D3DPRASTERCAPS_ZBUFFERLESSHSR: ::DWORD = 0x00008000; -pub const D3DPRASTERCAPS_FOGRANGE: ::DWORD = 0x00010000; -pub const D3DPRASTERCAPS_ANISOTROPY: ::DWORD = 0x00020000; -pub const D3DPRASTERCAPS_WBUFFER: ::DWORD = 0x00040000; -pub const D3DPRASTERCAPS_WFOG: ::DWORD = 0x00100000; -pub const D3DPRASTERCAPS_ZFOG: ::DWORD = 0x00200000; -pub const D3DPRASTERCAPS_COLORPERSPECTIVE: ::DWORD = 0x00400000; -pub const D3DPRASTERCAPS_SCISSORTEST: ::DWORD = 0x01000000; -pub const D3DPRASTERCAPS_SLOPESCALEDEPTHBIAS: ::DWORD = 0x02000000; -pub const D3DPRASTERCAPS_DEPTHBIAS: ::DWORD = 0x04000000; -pub const D3DPRASTERCAPS_MULTISAMPLE_TOGGLE: ::DWORD = 0x08000000; -pub const D3DPCMPCAPS_NEVER: ::DWORD = 0x00000001; -pub const D3DPCMPCAPS_LESS: ::DWORD = 0x00000002; -pub const D3DPCMPCAPS_EQUAL: ::DWORD = 0x00000004; -pub const D3DPCMPCAPS_LESSEQUAL: ::DWORD = 0x00000008; -pub const D3DPCMPCAPS_GREATER: ::DWORD = 0x00000010; -pub const D3DPCMPCAPS_NOTEQUAL: ::DWORD = 0x00000020; -pub const D3DPCMPCAPS_GREATEREQUAL: ::DWORD = 0x00000040; -pub const D3DPCMPCAPS_ALWAYS: ::DWORD = 0x00000080; -pub const D3DPBLENDCAPS_ZERO: ::DWORD = 0x00000001; -pub const D3DPBLENDCAPS_ONE: ::DWORD = 0x00000002; -pub const D3DPBLENDCAPS_SRCCOLOR: ::DWORD = 0x00000004; -pub const D3DPBLENDCAPS_INVSRCCOLOR: ::DWORD = 0x00000008; -pub const D3DPBLENDCAPS_SRCALPHA: ::DWORD = 0x00000010; -pub const D3DPBLENDCAPS_INVSRCALPHA: ::DWORD = 0x00000020; -pub const D3DPBLENDCAPS_DESTALPHA: ::DWORD = 0x00000040; -pub const D3DPBLENDCAPS_INVDESTALPHA: ::DWORD = 0x00000080; -pub const D3DPBLENDCAPS_DESTCOLOR: ::DWORD = 0x00000100; -pub const D3DPBLENDCAPS_INVDESTCOLOR: ::DWORD = 0x00000200; -pub const D3DPBLENDCAPS_SRCALPHASAT: ::DWORD = 0x00000400; -pub const D3DPBLENDCAPS_BOTHSRCALPHA: ::DWORD = 0x00000800; -pub const D3DPBLENDCAPS_BOTHINVSRCALPHA: ::DWORD = 0x00001000; -pub const D3DPBLENDCAPS_BLENDFACTOR: ::DWORD = 0x00002000; -pub const D3DPBLENDCAPS_SRCCOLOR2: ::DWORD = 0x00004000; -pub const D3DPBLENDCAPS_INVSRCCOLOR2: ::DWORD = 0x00008000; -pub const D3DPSHADECAPS_COLORGOURAUDRGB: ::DWORD = 0x00000008; -pub const D3DPSHADECAPS_SPECULARGOURAUDRGB: ::DWORD = 0x00000200; -pub const D3DPSHADECAPS_ALPHAGOURAUDBLEND: ::DWORD = 0x00004000; -pub const D3DPSHADECAPS_FOGGOURAUD: ::DWORD = 0x00080000; -pub const D3DPTEXTURECAPS_PERSPECTIVE: ::DWORD = 0x00000001; -pub const D3DPTEXTURECAPS_POW2: ::DWORD = 0x00000002; -pub const D3DPTEXTURECAPS_ALPHA: ::DWORD = 0x00000004; -pub const D3DPTEXTURECAPS_SQUAREONLY: ::DWORD = 0x00000020; -pub const D3DPTEXTURECAPS_TEXREPEATNOTSCALEDBYSIZE: ::DWORD = 0x00000040; -pub const D3DPTEXTURECAPS_ALPHAPALETTE: ::DWORD = 0x00000080; -pub const D3DPTEXTURECAPS_NONPOW2CONDITIONAL: ::DWORD = 0x00000100; -pub const D3DPTEXTURECAPS_PROJECTED: ::DWORD = 0x00000400; -pub const D3DPTEXTURECAPS_CUBEMAP: ::DWORD = 0x00000800; -pub const D3DPTEXTURECAPS_VOLUMEMAP: ::DWORD = 0x00002000; -pub const D3DPTEXTURECAPS_MIPMAP: ::DWORD = 0x00004000; -pub const D3DPTEXTURECAPS_MIPVOLUMEMAP: ::DWORD = 0x00008000; -pub const D3DPTEXTURECAPS_MIPCUBEMAP: ::DWORD = 0x00010000; -pub const D3DPTEXTURECAPS_CUBEMAP_POW2: ::DWORD = 0x00020000; -pub const D3DPTEXTURECAPS_VOLUMEMAP_POW2: ::DWORD = 0x00040000; -pub const D3DPTEXTURECAPS_NOPROJECTEDBUMPENV: ::DWORD = 0x00200000; -pub const D3DPTFILTERCAPS_MINFPOINT: ::DWORD = 0x00000100; -pub const D3DPTFILTERCAPS_MINFLINEAR: ::DWORD = 0x00000200; -pub const D3DPTFILTERCAPS_MINFANISOTROPIC: ::DWORD = 0x00000400; -pub const D3DPTFILTERCAPS_MINFPYRAMIDALQUAD: ::DWORD = 0x00000800; -pub const D3DPTFILTERCAPS_MINFGAUSSIANQUAD: ::DWORD = 0x00001000; -pub const D3DPTFILTERCAPS_MIPFPOINT: ::DWORD = 0x00010000; -pub const D3DPTFILTERCAPS_MIPFLINEAR: ::DWORD = 0x00020000; -pub const D3DPTFILTERCAPS_CONVOLUTIONMONO: ::DWORD = 0x00040000; -pub const D3DPTFILTERCAPS_MAGFPOINT: ::DWORD = 0x01000000; -pub const D3DPTFILTERCAPS_MAGFLINEAR: ::DWORD = 0x02000000; -pub const D3DPTFILTERCAPS_MAGFANISOTROPIC: ::DWORD = 0x04000000; -pub const D3DPTFILTERCAPS_MAGFPYRAMIDALQUAD: ::DWORD = 0x08000000; -pub const D3DPTFILTERCAPS_MAGFGAUSSIANQUAD: ::DWORD = 0x10000000; -pub const D3DPTADDRESSCAPS_WRAP: ::DWORD = 0x00000001; -pub const D3DPTADDRESSCAPS_MIRROR: ::DWORD = 0x00000002; -pub const D3DPTADDRESSCAPS_CLAMP: ::DWORD = 0x00000004; -pub const D3DPTADDRESSCAPS_BORDER: ::DWORD = 0x00000008; -pub const D3DPTADDRESSCAPS_INDEPENDENTUV: ::DWORD = 0x00000010; -pub const D3DPTADDRESSCAPS_MIRRORONCE: ::DWORD = 0x00000020; -pub const D3DSTENCILCAPS_KEEP: ::DWORD = 0x00000001; -pub const D3DSTENCILCAPS_ZERO: ::DWORD = 0x00000002; -pub const D3DSTENCILCAPS_REPLACE: ::DWORD = 0x00000004; -pub const D3DSTENCILCAPS_INCRSAT: ::DWORD = 0x00000008; -pub const D3DSTENCILCAPS_DECRSAT: ::DWORD = 0x00000010; -pub const D3DSTENCILCAPS_INVERT: ::DWORD = 0x00000020; -pub const D3DSTENCILCAPS_INCR: ::DWORD = 0x00000040; -pub const D3DSTENCILCAPS_DECR: ::DWORD = 0x00000080; -pub const D3DSTENCILCAPS_TWOSIDED: ::DWORD = 0x00000100; -pub const D3DTEXOPCAPS_DISABLE: ::DWORD = 0x00000001; -pub const D3DTEXOPCAPS_SELECTARG1: ::DWORD = 0x00000002; -pub const D3DTEXOPCAPS_SELECTARG2: ::DWORD = 0x00000004; -pub const D3DTEXOPCAPS_MODULATE: ::DWORD = 0x00000008; -pub const D3DTEXOPCAPS_MODULATE2X: ::DWORD = 0x00000010; -pub const D3DTEXOPCAPS_MODULATE4X: ::DWORD = 0x00000020; -pub const D3DTEXOPCAPS_ADD: ::DWORD = 0x00000040; -pub const D3DTEXOPCAPS_ADDSIGNED: ::DWORD = 0x00000080; -pub const D3DTEXOPCAPS_ADDSIGNED2X: ::DWORD = 0x00000100; -pub const D3DTEXOPCAPS_SUBTRACT: ::DWORD = 0x00000200; -pub const D3DTEXOPCAPS_ADDSMOOTH: ::DWORD = 0x00000400; -pub const D3DTEXOPCAPS_BLENDDIFFUSEALPHA: ::DWORD = 0x00000800; -pub const D3DTEXOPCAPS_BLENDTEXTUREALPHA: ::DWORD = 0x00001000; -pub const D3DTEXOPCAPS_BLENDFACTORALPHA: ::DWORD = 0x00002000; -pub const D3DTEXOPCAPS_BLENDTEXTUREALPHAPM: ::DWORD = 0x00004000; -pub const D3DTEXOPCAPS_BLENDCURRENTALPHA: ::DWORD = 0x00008000; -pub const D3DTEXOPCAPS_PREMODULATE: ::DWORD = 0x00010000; -pub const D3DTEXOPCAPS_MODULATEALPHA_ADDCOLOR: ::DWORD = 0x00020000; -pub const D3DTEXOPCAPS_MODULATECOLOR_ADDALPHA: ::DWORD = 0x00040000; -pub const D3DTEXOPCAPS_MODULATEINVALPHA_ADDCOLOR: ::DWORD = 0x00080000; -pub const D3DTEXOPCAPS_MODULATEINVCOLOR_ADDALPHA: ::DWORD = 0x00100000; -pub const D3DTEXOPCAPS_BUMPENVMAP: ::DWORD = 0x00200000; -pub const D3DTEXOPCAPS_BUMPENVMAPLUMINANCE: ::DWORD = 0x00400000; -pub const D3DTEXOPCAPS_DOTPRODUCT3: ::DWORD = 0x00800000; -pub const D3DTEXOPCAPS_MULTIPLYADD: ::DWORD = 0x01000000; -pub const D3DTEXOPCAPS_LERP: ::DWORD = 0x02000000; -pub const D3DFVFCAPS_TEXCOORDCOUNTMASK: ::DWORD = 0x0000ffff; -pub const D3DFVFCAPS_DONOTSTRIPELEMENTS: ::DWORD = 0x00080000; -pub const D3DFVFCAPS_PSIZE: ::DWORD = 0x00100000; -pub const D3DVTXPCAPS_TEXGEN: ::DWORD = 0x00000001; -pub const D3DVTXPCAPS_MATERIALSOURCE7: ::DWORD = 0x00000002; -pub const D3DVTXPCAPS_DIRECTIONALLIGHTS: ::DWORD = 0x00000008; -pub const D3DVTXPCAPS_POSITIONALLIGHTS: ::DWORD = 0x00000010; -pub const D3DVTXPCAPS_LOCALVIEWER: ::DWORD = 0x00000020; -pub const D3DVTXPCAPS_TWEENING: ::DWORD = 0x00000040; -pub const D3DVTXPCAPS_TEXGEN_SPHEREMAP: ::DWORD = 0x00000100; -pub const D3DVTXPCAPS_NO_TEXGEN_NONLOCALVIEWER: ::DWORD = 0x00000200; -pub const D3DDEVCAPS2_STREAMOFFSET: ::DWORD = 0x00000001; -pub const D3DDEVCAPS2_DMAPNPATCH: ::DWORD = 0x00000002; -pub const D3DDEVCAPS2_ADAPTIVETESSRTPATCH: ::DWORD = 0x00000004; -pub const D3DDEVCAPS2_ADAPTIVETESSNPATCH: ::DWORD = 0x00000008; -pub const D3DDEVCAPS2_CAN_STRETCHRECT_FROM_TEXTURES: ::DWORD = 0x00000010; -pub const D3DDEVCAPS2_PRESAMPLEDDMAPNPATCH: ::DWORD = 0x00000020; -pub const D3DDEVCAPS2_VERTEXELEMENTSCANSHARESTREAMOFFSET: ::DWORD = 0x00000040; -pub const D3DDTCAPS_UBYTE4: ::DWORD = 0x00000001; -pub const D3DDTCAPS_UBYTE4N: ::DWORD = 0x00000002; -pub const D3DDTCAPS_SHORT2N: ::DWORD = 0x00000004; -pub const D3DDTCAPS_SHORT4N: ::DWORD = 0x00000008; -pub const D3DDTCAPS_USHORT2N: ::DWORD = 0x00000010; -pub const D3DDTCAPS_USHORT4N: ::DWORD = 0x00000020; -pub const D3DDTCAPS_UDEC3: ::DWORD = 0x00000040; -pub const D3DDTCAPS_DEC3N: ::DWORD = 0x00000080; -pub const D3DDTCAPS_FLOAT16_2: ::DWORD = 0x00000100; -pub const D3DDTCAPS_FLOAT16_4: ::DWORD = 0x00000200; diff --git a/deps/winapi-0.2.5/src/d3d9types.rs b/deps/winapi-0.2.5/src/d3d9types.rs deleted file mode 100644 index a517d235d..000000000 --- a/deps/winapi-0.2.5/src/d3d9types.rs +++ /dev/null @@ -1,1437 +0,0 @@ -// Copyright © 2015, Corey Richardson -// Licensed under the MIT License <LICENSE.md> -//! Direct3D capabilities include file -pub type D3DCOLOR = ::DWORD; -STRUCT!{struct D3DVECTOR { - x: ::c_float, - y: ::c_float, - z: ::c_float, -}} -STRUCT!{struct D3DCOLORVALUE { - r: ::c_float, - g: ::c_float, - b: ::c_float, - a: ::c_float, -}} -STRUCT!{struct D3DRECT { - x1: ::LONG, - y1: ::LONG, - x2: ::LONG, - y2: ::LONG, -}} -STRUCT!{struct D3DMATRIX { - m: [[::c_float; 4]; 4], -}} -STRUCT!{struct D3DVIEWPORT9 { - X: ::DWORD, - Y: ::DWORD, - Width: ::DWORD, - Height: ::DWORD, - MinZ: ::c_float, - MaxZ: ::c_float, -}} -pub const D3DMAXUSERCLIPPLANES: ::DWORD = 32; -pub const D3DCLIPPLANE0: ::DWORD = (1 << 0); -pub const D3DCLIPPLANE1: ::DWORD = (1 << 1); -pub const D3DCLIPPLANE2: ::DWORD = (1 << 2); -pub const D3DCLIPPLANE3: ::DWORD = (1 << 3); -pub const D3DCLIPPLANE4: ::DWORD = (1 << 4); -pub const D3DCLIPPLANE5: ::DWORD = (1 << 5); -pub const D3DCS_LEFT: ::DWORD = 0x00000001; -pub const D3DCS_RIGHT: ::DWORD = 0x00000002; -pub const D3DCS_TOP: ::DWORD = 0x00000004; -pub const D3DCS_BOTTOM: ::DWORD = 0x00000008; -pub const D3DCS_FRONT: ::DWORD = 0x00000010; -pub const D3DCS_BACK: ::DWORD = 0x00000020; -pub const D3DCS_PLANE0: ::DWORD = 0x00000040; -pub const D3DCS_PLANE1: ::DWORD = 0x00000080; -pub const D3DCS_PLANE2: ::DWORD = 0x00000100; -pub const D3DCS_PLANE3: ::DWORD = 0x00000200; -pub const D3DCS_PLANE4: ::DWORD = 0x00000400; -pub const D3DCS_PLANE5: ::DWORD = 0x00000800; -pub const D3DCS_ALL: ::DWORD = D3DCS_LEFT | D3DCS_RIGHT | D3DCS_TOP | D3DCS_BOTTOM | D3DCS_FRONT - | D3DCS_BACK | D3DCS_PLANE0 | D3DCS_PLANE1 | D3DCS_PLANE2 | D3DCS_PLANE3 | D3DCS_PLANE4 - | D3DCS_PLANE5; -STRUCT!{struct D3DCLIPSTATUS9 { - ClipUnion: ::DWORD, - ClipIntersection: ::DWORD, -}} -STRUCT!{struct D3DMATERIAL9 { - Diffuse: D3DCOLORVALUE, - Ambient: D3DCOLORVALUE, - Specular: D3DCOLORVALUE, - Emissive: D3DCOLORVALUE, - Power: ::c_float, -}} -ENUM!{enum D3DLIGHTTYPE { - D3DLIGHT_POINT = 1, - D3DLIGHT_SPOT = 2, - D3DLIGHT_DIRECTIONAL = 3, -}} -STRUCT!{struct D3DLIGHT9 { - Type: D3DLIGHTTYPE, - Diffuse: D3DCOLORVALUE, - Specular: D3DCOLORVALUE, - Ambient: D3DCOLORVALUE, - Position: D3DVECTOR, - Direction: D3DVECTOR, - Range: ::c_float, - Falloff: ::c_float, - Attenuation0: ::c_float, - Attenuation1: ::c_float, - Attenuation2: ::c_float, - Theta: ::c_float, - Phi: ::c_float, -}} -pub const D3DCLEAR_TARGET: ::DWORD = 0x1; -pub const D3DCLEAR_ZBUFFER: ::DWORD = 0x2; -pub const D3DCLEAR_STENCIL: ::DWORD = 0x4; -ENUM!{enum D3DSHADEMODE { - D3DSHADE_FLAT = 1, - D3DSHADE_GOURAUD = 2, - D3DSHADE_PHONG = 3, -}} -ENUM!{enum D3DFILLMODE { - D3DFILL_POINT = 1, - D3DFILL_WIREFRAME = 2, - D3DFILL_SOLID = 3, -}} -ENUM!{enum D3DBLEND { - D3DBLEND_ZERO = 1, - D3DBLEND_ONE = 2, - D3DBLEND_SRCCOLOR = 3, - D3DBLEND_INVSRCCOLOR = 4, - D3DBLEND_SRCALPHA = 5, - D3DBLEND_INVSRCALPHA = 6, - D3DBLEND_DESTALPHA = 7, - D3DBLEND_INVDESTALPHA = 8, - D3DBLEND_DESTCOLOR = 9, - D3DBLEND_INVDESTCOLOR = 10, - D3DBLEND_SRCALPHASAT = 11, - D3DBLEND_BOTHSRCALPHA = 12, - D3DBLEND_BOTHINVSRCALPHA = 13, - D3DBLEND_BLENDFACTOR = 14, - D3DBLEND_INVBLENDFACTOR = 15, -}} -ENUM!{enum D3DBLENDOP { - D3DBLENDOP_ADD = 1, - D3DBLENDOP_SUBTRACT = 2, - D3DBLENDOP_REVSUBTRACT = 3, - D3DBLENDOP_MIN = 4, - D3DBLENDOP_MAX = 5, -}} -ENUM!{enum D3DTEXTUREADDRESS { - D3DTADDRESS_WRAP = 1, - D3DTADDRESS_MIRROR = 2, - D3DTADDRESS_CLAMP = 3, - D3DTADDRESS_BORDER = 4, - D3DTADDRESS_MIRRORONCE = 5, -}} -ENUM!{enum D3DCULL { - D3DCULL_NONE = 1, - D3DCULL_CW = 2, - D3DCULL_CCW = 3, -}} -ENUM!{enum D3DCMPFUNC { - D3DCMP_NEVER = 1, - D3DCMP_LESS = 2, - D3DCMP_EQUAL = 3, - D3DCMP_LESSEQUAL = 4, - D3DCMP_GREATER = 5, - D3DCMP_NOTEQUAL = 6, - D3DCMP_GREATEREQUAL = 7, - D3DCMP_ALWAYS = 8, -}} -ENUM!{enum D3DSTENCILOP { - D3DSTENCILOP_KEEP = 1, - D3DSTENCILOP_ZERO = 2, - D3DSTENCILOP_REPLACE = 3, - D3DSTENCILOP_INCRSAT = 4, - D3DSTENCILOP_DECRSAT = 5, - D3DSTENCILOP_INVERT = 6, - D3DSTENCILOP_INCR = 7, - D3DSTENCILOP_DECR = 8, -}} -ENUM!{enum D3DFOGMODE { - D3DFOG_NONE = 0, - D3DFOG_EXP = 1, - D3DFOG_EXP2 = 2, - D3DFOG_LINEAR = 3, -}} -ENUM!{enum D3DZBUFFERTYPE { - D3DZB_FALSE = 0, - D3DZB_TRUE = 1, - D3DZB_USEW = 2, -}} -ENUM!{enum D3DPRIMITIVETYPE { - D3DPT_POINTLIST = 1, - D3DPT_LINELIST = 2, - D3DPT_LINESTRIP = 3, - D3DPT_TRIANGLELIST = 4, - D3DPT_TRIANGLESTRIP = 5, - D3DPT_TRIANGLEFAN = 6, -}} -ENUM!{enum D3DTRANSFORMSTATETYPE { - D3DTS_VIEW = 2, - D3DTS_PROJECTION = 3, - D3DTS_TEXTURE0 = 16, - D3DTS_TEXTURE1 = 17, - D3DTS_TEXTURE2 = 18, - D3DTS_TEXTURE3 = 19, - D3DTS_TEXTURE4 = 20, - D3DTS_TEXTURE5 = 21, - D3DTS_TEXTURE6 = 22, - D3DTS_TEXTURE7 = 23, -}} -ENUM!{enum D3DRENDERSTATETYPE { - D3DRS_ZENABLE = 7, - D3DRS_FILLMODE = 8, - D3DRS_SHADEMODE = 9, - D3DRS_ZWRITEENABLE = 14, - D3DRS_ALPHATESTENABLE = 15, - D3DRS_LASTPIXEL = 16, - D3DRS_SRCBLEND = 19, - D3DRS_DESTBLEND = 20, - D3DRS_CULLMODE = 22, - D3DRS_ZFUNC = 23, - D3DRS_ALPHAREF = 24, - D3DRS_ALPHAFUNC = 25, - D3DRS_DITHERENABLE = 26, - D3DRS_ALPHABLENDENABLE = 27, - D3DRS_FOGENABLE = 28, - D3DRS_SPECULARENABLE = 29, - D3DRS_FOGCOLOR = 34, - D3DRS_FOGTABLEMODE = 35, - D3DRS_FOGSTART = 36, - D3DRS_FOGEND = 37, - D3DRS_FOGDENSITY = 38, - D3DRS_RANGEFOGENABLE = 48, - D3DRS_STENCILENABLE = 52, - D3DRS_STENCILFAIL = 53, - D3DRS_STENCILZFAIL = 54, - D3DRS_STENCILPASS = 55, - D3DRS_STENCILFUNC = 56, - D3DRS_STENCILREF = 57, - D3DRS_STENCILMASK = 58, - D3DRS_STENCILWRITEMASK = 59, - D3DRS_TEXTUREFACTOR = 60, - D3DRS_WRAP0 = 128, - D3DRS_WRAP1 = 129, - D3DRS_WRAP2 = 130, - D3DRS_WRAP3 = 131, - D3DRS_WRAP4 = 132, - D3DRS_WRAP5 = 133, - D3DRS_WRAP6 = 134, - D3DRS_WRAP7 = 135, - D3DRS_CLIPPING = 136, - D3DRS_LIGHTING = 137, - D3DRS_AMBIENT = 139, - D3DRS_FOGVERTEXMODE = 140, - D3DRS_COLORVERTEX = 141, - D3DRS_LOCALVIEWER = 142, - D3DRS_NORMALIZENORMALS = 143, - D3DRS_DIFFUSEMATERIALSOURCE = 145, - D3DRS_SPECULARMATERIALSOURCE = 146, - D3DRS_AMBIENTMATERIALSOURCE = 147, - D3DRS_EMISSIVEMATERIALSOURCE = 148, - D3DRS_VERTEXBLEND = 151, - D3DRS_CLIPPLANEENABLE = 152, - D3DRS_POINTSIZE = 154, - D3DRS_POINTSIZE_MIN = 155, - D3DRS_POINTSPRITEENABLE = 156, - D3DRS_POINTSCALEENABLE = 157, - D3DRS_POINTSCALE_A = 158, - D3DRS_POINTSCALE_B = 159, - D3DRS_POINTSCALE_C = 160, - D3DRS_MULTISAMPLEANTIALIAS = 161, - D3DRS_MULTISAMPLEMASK = 162, - D3DRS_PATCHEDGESTYLE = 163, - D3DRS_DEBUGMONITORTOKEN = 165, - D3DRS_POINTSIZE_MAX = 166, - D3DRS_INDEXEDVERTEXBLENDENABLE = 167, - D3DRS_COLORWRITEENABLE = 168, - D3DRS_TWEENFACTOR = 170, - D3DRS_BLENDOP = 171, - D3DRS_POSITIONDEGREE = 172, - D3DRS_NORMALDEGREE = 173, - D3DRS_SCISSORTESTENABLE = 174, - D3DRS_SLOPESCALEDEPTHBIAS = 175, - D3DRS_ANTIALIASEDLINEENABLE = 176, - D3DRS_MINTESSELLATIONLEVEL = 178, - D3DRS_MAXTESSELLATIONLEVEL = 179, - D3DRS_ADAPTIVETESS_X = 180, - D3DRS_ADAPTIVETESS_Y = 181, - D3DRS_ADAPTIVETESS_Z = 182, - D3DRS_ADAPTIVETESS_W = 183, - D3DRS_ENABLEADAPTIVETESSELLATION = 184, - D3DRS_TWOSIDEDSTENCILMODE = 185, - D3DRS_CCW_STENCILFAIL = 186, - D3DRS_CCW_STENCILZFAIL = 187, - D3DRS_CCW_STENCILPASS = 188, - D3DRS_CCW_STENCILFUNC = 189, - D3DRS_COLORWRITEENABLE1 = 190, - D3DRS_COLORWRITEENABLE2 = 191, - D3DRS_COLORWRITEENABLE3 = 192, - D3DRS_BLENDFACTOR = 193, - D3DRS_SRGBWRITEENABLE = 194, - D3DRS_DEPTHBIAS = 195, - D3DRS_WRAP8 = 198, - D3DRS_WRAP9 = 199, - D3DRS_WRAP10 = 200, - D3DRS_WRAP11 = 201, - D3DRS_WRAP12 = 202, - D3DRS_WRAP13 = 203, - D3DRS_WRAP14 = 204, - D3DRS_WRAP15 = 205, - D3DRS_SEPARATEALPHABLENDENABLE = 206, - D3DRS_SRCBLENDALPHA = 207, - D3DRS_DESTBLENDALPHA = 208, - D3DRS_BLENDOPALPHA = 209, -}} -pub const D3D_MAX_SIMULTANEOUS_RENDERTARGETS: ::DWORD = 4; -ENUM!{enum D3DMATERIALCOLORSOURCE { - D3DMCS_MATERIAL = 0, - D3DMCS_COLOR1 = 1, - D3DMCS_COLOR2 = 2, -}} -pub const D3DRENDERSTATE_WRAPBIAS: ::DWORD = 128; -pub const D3DWRAP_U: ::DWORD = 0x00000001; -pub const D3DWRAP_V: ::DWORD = 0x00000002; -pub const D3DWRAP_W: ::DWORD = 0x00000004; -pub const D3DWRAPCOORD_0: ::DWORD = 0x00000001; -pub const D3DWRAPCOORD_1: ::DWORD = 0x00000002; -pub const D3DWRAPCOORD_2: ::DWORD = 0x00000004; -pub const D3DWRAPCOORD_3: ::DWORD = 0x00000008; -pub const D3DCOLORWRITEENABLE_RED: ::DWORD = 1 << 0; -pub const D3DCOLORWRITEENABLE_GREEN: ::DWORD = 1 << 1; -pub const D3DCOLORWRITEENABLE_BLUE: ::DWORD = 1 << 2; -pub const D3DCOLORWRITEENABLE_ALPHA: ::DWORD = 1 << 3; -ENUM!{enum D3DTEXTURESTAGESTATETYPE { - D3DTSS_COLOROP = 1, - D3DTSS_COLORARG1 = 2, - D3DTSS_COLORARG2 = 3, - D3DTSS_ALPHAOP = 4, - D3DTSS_ALPHAARG1 = 5, - D3DTSS_ALPHAARG2 = 6, - D3DTSS_BUMPENVMAT00 = 7, - D3DTSS_BUMPENVMAT01 = 8, - D3DTSS_BUMPENVMAT10 = 9, - D3DTSS_BUMPENVMAT11 = 10, - D3DTSS_TEXCOORDINDEX = 11, - D3DTSS_BUMPENVLSCALE = 22, - D3DTSS_BUMPENVLOFFSET = 23, - D3DTSS_TEXTURETRANSFORMFLAGS = 24, - D3DTSS_COLORARG0 = 26, - D3DTSS_ALPHAARG0 = 27, - D3DTSS_RESULTARG = 28, - D3DTSS_CONSTANT = 32, -}} -ENUM!{enum D3DSAMPLERSTATETYPE { - D3DSAMP_ADDRESSU = 1, - D3DSAMP_ADDRESSV = 2, - D3DSAMP_ADDRESSW = 3, - D3DSAMP_BORDERCOLOR = 4, - D3DSAMP_MAGFILTER = 5, - D3DSAMP_MINFILTER = 6, - D3DSAMP_MIPFILTER = 7, - D3DSAMP_MIPMAPLODBIAS = 8, - D3DSAMP_MAXMIPLEVEL = 9, - D3DSAMP_MAXANISOTROPY = 10, - D3DSAMP_SRGBTEXTURE = 11, - D3DSAMP_ELEMENTINDEX = 12, - D3DSAMP_DMAPOFFSET = 13, -}} -pub const D3DDMAPSAMPLER: ::DWORD = 256; -pub const D3DVERTEXTEXTURESAMPLER0: ::DWORD = D3DDMAPSAMPLER + 1; -pub const D3DVERTEXTEXTURESAMPLER1: ::DWORD = D3DDMAPSAMPLER + 2; -pub const D3DVERTEXTEXTURESAMPLER2: ::DWORD = D3DDMAPSAMPLER + 3; -pub const D3DVERTEXTEXTURESAMPLER3: ::DWORD = D3DDMAPSAMPLER + 4; -pub const D3DTSS_TCI_PASSTHRU: ::DWORD = 0x00000000; -pub const D3DTSS_TCI_CAMERASPACENORMAL: ::DWORD = 0x00010000; -pub const D3DTSS_TCI_CAMERASPACEPOSITION: ::DWORD = 0x00020000; -pub const D3DTSS_TCI_CAMERASPACEREFLECTIONVECTOR: ::DWORD = 0x00030000; -pub const D3DTSS_TCI_SPHEREMAP: ::DWORD = 0x00040000; -ENUM!{enum D3DTEXTUREOP { - D3DTOP_DISABLE = 1, - D3DTOP_SELECTARG1 = 2, - D3DTOP_SELECTARG2 = 3, - D3DTOP_MODULATE = 4, - D3DTOP_MODULATE2X = 5, - D3DTOP_MODULATE4X = 6, - D3DTOP_ADD = 7, - D3DTOP_ADDSIGNED = 8, - D3DTOP_ADDSIGNED2X = 9, - D3DTOP_SUBTRACT = 10, - D3DTOP_ADDSMOOTH = 11, - D3DTOP_BLENDDIFFUSEALPHA = 12, - D3DTOP_BLENDTEXTUREALPHA = 13, - D3DTOP_BLENDFACTORALPHA = 14, - D3DTOP_BLENDTEXTUREALPHAPM = 15, - D3DTOP_BLENDCURRENTALPHA = 16, - D3DTOP_PREMODULATE = 17, - D3DTOP_MODULATEALPHA_ADDCOLOR = 18, - D3DTOP_MODULATECOLOR_ADDALPHA = 19, - D3DTOP_MODULATEINVALPHA_ADDCOLOR = 20, - D3DTOP_MODULATEINVCOLOR_ADDALPHA = 21, - D3DTOP_BUMPENVMAP = 22, - D3DTOP_BUMPENVMAPLUMINANCE = 23, - D3DTOP_DOTPRODUCT3 = 24, - D3DTOP_MULTIPLYADD = 25, - D3DTOP_LERP = 26, -}} -pub const D3DTA_SELECTMASK: ::DWORD = 0x0000000f; -pub const D3DTA_DIFFUSE: ::DWORD = 0x00000000; -pub const D3DTA_CURRENT: ::DWORD = 0x00000001; -pub const D3DTA_TEXTURE: ::DWORD = 0x00000002; -pub const D3DTA_TFACTOR: ::DWORD = 0x00000003; -pub const D3DTA_SPECULAR: ::DWORD = 0x00000004; -pub const D3DTA_TEMP: ::DWORD = 0x00000005; -pub const D3DTA_CONSTANT: ::DWORD = 0x00000006; -pub const D3DTA_COMPLEMENT: ::DWORD = 0x00000010; -pub const D3DTA_ALPHAREPLICATE: ::DWORD = 0x00000020; -ENUM!{enum D3DTEXTUREFILTERTYPE { - D3DTEXF_NONE = 0, - D3DTEXF_POINT = 1, - D3DTEXF_LINEAR = 2, - D3DTEXF_ANISOTROPIC = 3, - D3DTEXF_PYRAMIDALQUAD = 6, - D3DTEXF_GAUSSIANQUAD = 7, - D3DTEXF_CONVOLUTIONMONO = 8, -}} -pub const D3DPV_DONOTCOPYDATA: ::DWORD = 1 << 0; -pub const D3DFVF_RESERVED0: ::DWORD = 0x001; -pub const D3DFVF_POSITION_MASK: ::DWORD = 0x400E; -pub const D3DFVF_XYZ: ::DWORD = 0x002; -pub const D3DFVF_XYZRHW: ::DWORD = 0x004; -pub const D3DFVF_XYZB1: ::DWORD = 0x006; -pub const D3DFVF_XYZB2: ::DWORD = 0x008; -pub const D3DFVF_XYZB3: ::DWORD = 0x00a; -pub const D3DFVF_XYZB4: ::DWORD = 0x00c; -pub const D3DFVF_XYZB5: ::DWORD = 0x00e; -pub const D3DFVF_XYZW: ::DWORD = 0x4002; -pub const D3DFVF_NORMAL: ::DWORD = 0x010; -pub const D3DFVF_PSIZE: ::DWORD = 0x020; -pub const D3DFVF_DIFFUSE: ::DWORD = 0x040; -pub const D3DFVF_SPECULAR: ::DWORD = 0x080; -pub const D3DFVF_TEXCOUNT_MASK: ::DWORD = 0xf00; -pub const D3DFVF_TEXCOUNT_SHIFT: ::DWORD = 8; -pub const D3DFVF_TEX0: ::DWORD = 0x000; -pub const D3DFVF_TEX1: ::DWORD = 0x100; -pub const D3DFVF_TEX2: ::DWORD = 0x200; -pub const D3DFVF_TEX3: ::DWORD = 0x300; -pub const D3DFVF_TEX4: ::DWORD = 0x400; -pub const D3DFVF_TEX5: ::DWORD = 0x500; -pub const D3DFVF_TEX6: ::DWORD = 0x600; -pub const D3DFVF_TEX7: ::DWORD = 0x700; -pub const D3DFVF_TEX8: ::DWORD = 0x800; -pub const D3DFVF_LASTBETA_UBYTE4: ::DWORD = 0x1000; -pub const D3DFVF_LASTBETA_D3DCOLOR: ::DWORD = 0x8000; -pub const D3DFVF_RESERVED2: ::DWORD = 0x6000; -ENUM!{enum D3DDECLUSAGE { - D3DDECLUSAGE_POSITION = 0, - D3DDECLUSAGE_BLENDWEIGHT, - D3DDECLUSAGE_BLENDINDICES, - D3DDECLUSAGE_NORMAL, - D3DDECLUSAGE_PSIZE, - D3DDECLUSAGE_TEXCOORD, - D3DDECLUSAGE_TANGENT, - D3DDECLUSAGE_BINORMAL, - D3DDECLUSAGE_TESSFACTOR, - D3DDECLUSAGE_POSITIONT, - D3DDECLUSAGE_COLOR, - D3DDECLUSAGE_FOG, - D3DDECLUSAGE_DEPTH, - D3DDECLUSAGE_SAMPLE, -}} -pub const MAXD3DDECLUSAGE: D3DDECLUSAGE = D3DDECLUSAGE_SAMPLE; -pub const MAXD3DDECLUSAGEINDEX: ::DWORD = 15; -pub const MAXD3DDECLLENGTH: ::DWORD = 64; -ENUM!{enum D3DDECLMETHOD { - D3DDECLMETHOD_DEFAULT = 0, - D3DDECLMETHOD_PARTIALU, - D3DDECLMETHOD_PARTIALV, - D3DDECLMETHOD_CROSSUV, - D3DDECLMETHOD_UV, - D3DDECLMETHOD_LOOKUP, - D3DDECLMETHOD_LOOKUPPRESAMPLED, -}} -pub const MAXD3DDECLMETHOD: D3DDECLMETHOD = D3DDECLMETHOD_LOOKUPPRESAMPLED; -ENUM!{enum D3DDECLTYPE { - D3DDECLTYPE_FLOAT1 = 0, - D3DDECLTYPE_FLOAT2 = 1, - D3DDECLTYPE_FLOAT3 = 2, - D3DDECLTYPE_FLOAT4 = 3, - D3DDECLTYPE_D3DCOLOR = 4, - D3DDECLTYPE_UBYTE4 = 5, - D3DDECLTYPE_SHORT2 = 6, - D3DDECLTYPE_SHORT4 = 7, - D3DDECLTYPE_UBYTE4N = 8, - D3DDECLTYPE_SHORT2N = 9, - D3DDECLTYPE_SHORT4N = 10, - D3DDECLTYPE_USHORT2N = 11, - D3DDECLTYPE_USHORT4N = 12, - D3DDECLTYPE_UDEC3 = 13, - D3DDECLTYPE_DEC3N = 14, - D3DDECLTYPE_FLOAT16_2 = 15, - D3DDECLTYPE_FLOAT16_4 = 16, - D3DDECLTYPE_UNUSED = 17, -}} -pub const MAXD3DDECLTYPE: D3DDECLTYPE = D3DDECLTYPE_UNUSED; -STRUCT!{struct D3DVERTEXELEMENT9 { - Stream: ::WORD, - Offset: ::WORD, - Type: ::BYTE, - Method: ::BYTE, - Usage: ::BYTE, - UsageIndex: ::BYTE, -}} -pub type LPD3DVERTEXELEMENT9 = *mut D3DVERTEXELEMENT9; -pub const D3DDECL_END: D3DVERTEXELEMENT9 = D3DVERTEXELEMENT9 { - Stream: 0xFF, - Offset: 0, - Type: D3DDECLTYPE_UNUSED.0 as ::BYTE, - Method: 0, - Usage: 0, - UsageIndex: 0, -}; -pub const D3DDP_MAXTEXCOORD: ::DWORD = 8; -pub const D3DSTREAMSOURCE_INDEXEDDATA: ::DWORD = 1 << 30; -pub const D3DSTREAMSOURCE_INSTANCEDATA: ::DWORD = 2 << 30; -pub const D3DSI_OPCODE_MASK: ::DWORD = 0x0000FFFF; -pub const D3DSI_INSTLENGTH_MASK: ::DWORD = 0x0F000000; -pub const D3DSI_INSTLENGTH_SHIFT: ::DWORD = 24; -ENUM!{enum D3DSHADER_INSTRUCTION_OPCODE_TYPE { - D3DSIO_NOP = 0, - D3DSIO_MOV = 1, - D3DSIO_ADD = 2, - D3DSIO_SUB = 3, - D3DSIO_MAD = 4, - D3DSIO_MUL = 5, - D3DSIO_RCP = 6, - D3DSIO_RSQ = 7, - D3DSIO_DP3 = 8, - D3DSIO_DP4 = 9, - D3DSIO_MIN = 10, - D3DSIO_MAX = 11, - D3DSIO_SLT = 12, - D3DSIO_SGE = 13, - D3DSIO_EXP = 14, - D3DSIO_LOG = 15, - D3DSIO_LIT = 16, - D3DSIO_DST = 17, - D3DSIO_LRP = 18, - D3DSIO_FRC = 18, - D3DSIO_M4x4 = 20, - D3DSIO_M4x3 = 21, - D3DSIO_M3x4 = 22, - D3DSIO_M3x3 = 23, - D3DSIO_M3x2 = 24, - D3DSIO_CALL = 25, - D3DSIO_CALLNZ = 26, - D3DSIO_LOOP = 27, - D3DSIO_RET = 28, - D3DSIO_ENDLOOP = 29, - D3DSIO_LABEL = 30, - D3DSIO_DCL = 31, - D3DSIO_POW = 32, - D3DSIO_CRS = 33, - D3DSIO_SGN = 34, - D3DSIO_ABS = 35, - D3DSIO_NRM = 36, - D3DSIO_SINCOS = 37, - D3DSIO_REP = 38, - D3DSIO_ENDREP = 39, - D3DSIO_IF = 40, - D3DSIO_IFC = 41, - D3DSIO_ELSE = 42, - D3DSIO_ENDIF = 43, - D3DSIO_BREAK = 44, - D3DSIO_BREAKC = 45, - D3DSIO_MOVA = 46, - D3DSIO_DEFB = 47, - D3DSIO_DEFI = 48, - D3DSIO_TEXCOORD = 64, - D3DSIO_TEXKILL = 65, - D3DSIO_TEX = 66, - D3DSIO_TEXBEM = 67, - D3DSIO_TEXBEML = 68, - D3DSIO_TEXREG2AR = 69, - D3DSIO_TEXREG2GB = 70, - D3DSIO_TEXM3x2PAD = 71, - D3DSIO_TEXM3x2TEX = 72, - D3DSIO_TEXM3x3PAD = 73, - D3DSIO_TEXM3x3TEX = 74, - D3DSIO_RESERVED0 = 75, - D3DSIO_TEXM3x3SPEC = 76, - D3DSIO_TEXM3x3VSPEC = 77, - D3DSIO_EXPP = 78, - D3DSIO_LOGP = 79, - D3DSIO_CND = 80, - D3DSIO_DEF = 81, - D3DSIO_TEXREG2RGB = 82, - D3DSIO_TEXDP3TEX = 83, - D3DSIO_TEXM3x2DEPTH = 84, - D3DSIO_TEXDP3 = 85, - D3DSIO_TEXM3x3 = 86, - D3DSIO_TEXDEPTH = 87, - D3DSIO_CMP = 88, - D3DSIO_BEM = 89, - D3DSIO_DP2ADD = 90, - D3DSIO_DSX = 91, - D3DSIO_DSY = 92, - D3DSIO_TEXLDD = 93, - D3DSIO_SETP = 94, - D3DSIO_TEXLDL = 95, - D3DSIO_BREAKP = 96, - D3DSIO_PHASE = 0xFFFD, - D3DSIO_COMMENT = 0xFFFE, - D3DSIO_END = 0xFFFF, -}} -pub const D3DSI_COISSUE: ::DWORD = 0x40000000; -pub const D3DSP_OPCODESPECIFICCONTROL_MASK: ::DWORD = 0x00ff0000; -pub const D3DSP_OPCODESPECIFICCONTROL_SHIFT: ::DWORD = 16; -pub const D3DSI_TEXLD_PROJECT: ::DWORD = 0x01 << D3DSP_OPCODESPECIFICCONTROL_SHIFT; -pub const D3DSI_TEXLD_BIAS: ::DWORD = 0x02 << D3DSP_OPCODESPECIFICCONTROL_SHIFT; -ENUM!{enum D3DSHADER_COMPARISON { - D3DSPC_RESERVED0 = 0, - D3DSPC_GT = 1, - D3DSPC_EQ = 2, - D3DSPC_GE = 3, - D3DSPC_LT = 4, - D3DSPC_NE = 5, - D3DSPC_LE = 6, - D3DSPC_RESERVED1 = 7, -}} -pub const D3DSHADER_COMPARISON_SHIFT: ::DWORD = D3DSP_OPCODESPECIFICCONTROL_SHIFT; -pub const D3DSHADER_COMPARISON_MASK: ::DWORD = 0x7 << D3DSHADER_COMPARISON_SHIFT; -pub const D3DSHADER_INSTRUCTION_PREDICATED: ::DWORD = 0x1 << 28; -pub const D3DSP_DCL_USAGE_SHIFT: ::DWORD = 0; -pub const D3DSP_DCL_USAGE_MASK: ::DWORD = 0x0000000f; -pub const D3DSP_DCL_USAGEINDEX_SHIFT: ::DWORD = 16; -pub const D3DSP_DCL_USAGEINDEX_MASK: ::DWORD = 0x000f0000; -pub const D3DSP_TEXTURETYPE_SHIFT: ::DWORD = 27; -pub const D3DSP_TEXTURETYPE_MASK: ::DWORD = 0x78000000; -ENUM!{enum D3DSAMPLER_TEXTURE_TYPE { - D3DSTT_UNKNOWN = 0 << D3DSP_TEXTURETYPE_SHIFT, - D3DSTT_2D = 2 << D3DSP_TEXTURETYPE_SHIFT, - D3DSTT_CUBE = 3 << D3DSP_TEXTURETYPE_SHIFT, - D3DSTT_VOLUME = 4 << D3DSP_TEXTURETYPE_SHIFT, -}} -pub const D3DSP_REGNUM_MASK: ::DWORD = 0x000007FF; -pub const D3DSP_WRITEMASK_0: ::DWORD = 0x00010000; -pub const D3DSP_WRITEMASK_1: ::DWORD = 0x00020000; -pub const D3DSP_WRITEMASK_2: ::DWORD = 0x00040000; -pub const D3DSP_WRITEMASK_3: ::DWORD = 0x00080000; -pub const D3DSP_WRITEMASK_ALL: ::DWORD = 0x000F0000; -pub const D3DSP_DSTMOD_SHIFT: ::DWORD = 20; -pub const D3DSP_DSTMOD_MASK: ::DWORD = 0x00F00000; -pub const D3DSPDM_NONE: ::DWORD = 0 << D3DSP_DSTMOD_SHIFT; -pub const D3DSPDM_SATURATE: ::DWORD = 1 << D3DSP_DSTMOD_SHIFT; -pub const D3DSPDM_PARTIALPRECISION: ::DWORD = 2 << D3DSP_DSTMOD_SHIFT; -pub const D3DSPDM_MSAMPCENTROID: ::DWORD = 4 << D3DSP_DSTMOD_SHIFT; -pub const D3DSP_DSTSHIFT_SHIFT: ::DWORD = 24; -pub const D3DSP_DSTSHIFT_MASK: ::DWORD = 0x0F000000; -pub const D3DSP_REGTYPE_SHIFT: ::DWORD = 28; -pub const D3DSP_REGTYPE_SHIFT2: ::DWORD = 8; -pub const D3DSP_REGTYPE_MASK: ::DWORD = 0x70000000; -pub const D3DSP_REGTYPE_MASK2: ::DWORD = 0x00001800; -ENUM!{enum D3DSHADER_PARAM_REGISTER_TYPE { - D3DSPR_TEMP = 0, - D3DSPR_INPUT = 1, - D3DSPR_CONST = 2, - D3DSPR_ADDR = 3, - D3DSPR_TEXTURE = 3, - D3DSPR_RASTOUT = 4, - D3DSPR_ATTROUT = 5, - D3DSPR_TEXCRDOUT = 6, - D3DSPR_OUTPUT = 6, - D3DSPR_CONSTINT = 7, - D3DSPR_COLOROUT = 8, - D3DSPR_DEPTHOUT = 9, - D3DSPR_SAMPLER = 10, - D3DSPR_CONST2 = 11, - D3DSPR_CONST3 = 12, - D3DSPR_CONST4 = 13, - D3DSPR_CONSTBOOL = 14, - D3DSPR_LOOP = 15, - D3DSPR_TEMPFLOAT16 = 16, - D3DSPR_MISCTYPE = 17, - D3DSPR_LABEL = 18, - D3DSPR_PREDICATE = 19, -}} -ENUM!{enum D3DSHADER_MISCTYPE_OFFSETS { - D3DSMO_POSITION = 0, - D3DSMO_FACE = 1, -}} -ENUM!{enum D3DVS_RASTOUT_OFFSETS { - D3DSRO_POSITION = 0, - D3DSRO_FOG, - D3DSRO_POINT_SIZE, -}} -pub const D3DVS_ADDRESSMODE_SHIFT: ::DWORD = 13; -pub const D3DVS_ADDRESSMODE_MASK: ::DWORD = 1 << D3DVS_ADDRESSMODE_SHIFT; -ENUM!{enum D3DVS_ADDRESSMODE_TYPE { - D3DVS_ADDRMODE_ABSOLUTE = 0 << D3DVS_ADDRESSMODE_SHIFT, - D3DVS_ADDRMODE_RELATIVE = 1 << D3DVS_ADDRESSMODE_SHIFT, -}} -pub const D3DSHADER_ADDRESSMODE_SHIFT: ::DWORD = 13; -pub const D3DSHADER_ADDRESSMODE_MASK: ::DWORD = 1 << D3DSHADER_ADDRESSMODE_SHIFT; -ENUM!{enum D3DSHADER_ADDRESSMODE_TYPE { - D3DSHADER_ADDRMODE_ABSOLUTE = 0 << D3DSHADER_ADDRESSMODE_SHIFT, - D3DSHADER_ADDRMODE_RELATIVE = 1 << D3DSHADER_ADDRESSMODE_SHIFT, -}} -pub const D3DVS_SWIZZLE_SHIFT: ::DWORD = 16; -pub const D3DVS_SWIZZLE_MASK: ::DWORD = 0x00FF0000; -pub const D3DVS_X_X: ::DWORD = 0 << D3DVS_SWIZZLE_SHIFT; -pub const D3DVS_X_Y: ::DWORD = 1 << D3DVS_SWIZZLE_SHIFT; -pub const D3DVS_X_Z: ::DWORD = 2 << D3DVS_SWIZZLE_SHIFT; -pub const D3DVS_X_W: ::DWORD = 3 << D3DVS_SWIZZLE_SHIFT; -pub const D3DVS_Y_X: ::DWORD = 0 << (D3DVS_SWIZZLE_SHIFT + 2); -pub const D3DVS_Y_Y: ::DWORD = 1 << (D3DVS_SWIZZLE_SHIFT + 2); -pub const D3DVS_Y_Z: ::DWORD = 2 << (D3DVS_SWIZZLE_SHIFT + 2); -pub const D3DVS_Y_W: ::DWORD = 3 << (D3DVS_SWIZZLE_SHIFT + 2); -pub const D3DVS_Z_X: ::DWORD = 0 << (D3DVS_SWIZZLE_SHIFT + 4); -pub const D3DVS_Z_Y: ::DWORD = 1 << (D3DVS_SWIZZLE_SHIFT + 4); -pub const D3DVS_Z_Z: ::DWORD = 2 << (D3DVS_SWIZZLE_SHIFT + 4); -pub const D3DVS_Z_W: ::DWORD = 3 << (D3DVS_SWIZZLE_SHIFT + 4); -pub const D3DVS_W_X: ::DWORD = 0 << (D3DVS_SWIZZLE_SHIFT + 6); -pub const D3DVS_W_Y: ::DWORD = 1 << (D3DVS_SWIZZLE_SHIFT + 6); -pub const D3DVS_W_Z: ::DWORD = 2 << (D3DVS_SWIZZLE_SHIFT + 6); -pub const D3DVS_W_W: ::DWORD = 3 << (D3DVS_SWIZZLE_SHIFT + 6); -pub const D3DVS_NOSWIZZLE: ::DWORD = D3DVS_X_X | D3DVS_Y_Y | D3DVS_Z_Z | D3DVS_W_W; -pub const D3DSP_SWIZZLE_SHIFT: ::DWORD = 16; -pub const D3DSP_SWIZZLE_MASK: ::DWORD = 0x00FF0000; -pub const D3DSP_NOSWIZZLE: ::DWORD = (0 << (D3DSP_SWIZZLE_SHIFT + 0)) - | (1 << (D3DSP_SWIZZLE_SHIFT + 2)) | (2 << (D3DSP_SWIZZLE_SHIFT + 4)) - | (3 << (D3DSP_SWIZZLE_SHIFT + 6)); -pub const D3DSP_REPLICATERED: ::DWORD = (0 << (D3DSP_SWIZZLE_SHIFT + 0)) - | (0 << (D3DSP_SWIZZLE_SHIFT + 2)) | (0 << (D3DSP_SWIZZLE_SHIFT + 4)) - | (0 << (D3DSP_SWIZZLE_SHIFT + 6)); -pub const D3DSP_REPLICATEGREEN: ::DWORD = (1 << (D3DSP_SWIZZLE_SHIFT + 0)) - | (1 << (D3DSP_SWIZZLE_SHIFT + 2)) | (1 << (D3DSP_SWIZZLE_SHIFT + 4)) - | (1 << (D3DSP_SWIZZLE_SHIFT + 6)); -pub const D3DSP_REPLICATEBLUE: ::DWORD = (2 << (D3DSP_SWIZZLE_SHIFT + 0)) - | (2 << (D3DSP_SWIZZLE_SHIFT + 2)) | (2 << (D3DSP_SWIZZLE_SHIFT + 4)) - | (2 << (D3DSP_SWIZZLE_SHIFT + 6)); -pub const D3DSP_REPLICATEALPHA: ::DWORD = (3 << (D3DSP_SWIZZLE_SHIFT + 0)) - | (3 << (D3DSP_SWIZZLE_SHIFT + 2)) | (3 << (D3DSP_SWIZZLE_SHIFT + 4)) - | (3 << (D3DSP_SWIZZLE_SHIFT + 6)); -pub const D3DSP_SRCMOD_SHIFT: ::DWORD = 24; -pub const D3DSP_SRCMOD_MASK: ::DWORD = 0x0F000000; -ENUM!{enum D3DSHADER_PARAM_SRCMOD_TYPE { - D3DSPSM_NONE = 0 << D3DSP_SRCMOD_SHIFT, - D3DSPSM_NEG = 1 << D3DSP_SRCMOD_SHIFT, - D3DSPSM_BIAS = 2 << D3DSP_SRCMOD_SHIFT, - D3DSPSM_BIASNEG = 3 << D3DSP_SRCMOD_SHIFT, - D3DSPSM_SIGN = 4 << D3DSP_SRCMOD_SHIFT, - D3DSPSM_SIGNNEG = 5 << D3DSP_SRCMOD_SHIFT, - D3DSPSM_COMP = 6 << D3DSP_SRCMOD_SHIFT, - D3DSPSM_X2 = 7 << D3DSP_SRCMOD_SHIFT, - D3DSPSM_X2NEG = 8 << D3DSP_SRCMOD_SHIFT, - D3DSPSM_DZ = 9 << D3DSP_SRCMOD_SHIFT, - D3DSPSM_DW = 10 << D3DSP_SRCMOD_SHIFT, - D3DSPSM_ABS = 11 << D3DSP_SRCMOD_SHIFT, - D3DSPSM_ABSNEG = 12 << D3DSP_SRCMOD_SHIFT, - D3DSPSM_NOT = 13 << D3DSP_SRCMOD_SHIFT, -}} -pub const D3DSP_MIN_PRECISION_SHIFT: ::DWORD = 14; -pub const D3DSP_MIN_PRECISION_MASK: ::DWORD = 0x0000C000; -ENUM!{enum D3DSHADER_MIN_PRECISION { - D3DMP_DEFAULT = 0, - D3DMP_16 = 1, - D3DMP_2_8 = 2, -}} -pub const D3DSI_COMMENTSIZE_SHIFT: ::DWORD = 16; -pub const D3DSI_COMMENTSIZE_MASK: ::DWORD = 0x7FFF0000; -pub const D3DPS_END: ::DWORD = 0x0000FFFF; -pub const D3DVS_END: ::DWORD = 0x0000FFFF; -ENUM!{enum D3DBASISTYPE { - D3DBASIS_BEZIER = 0, - D3DBASIS_BSPLINE = 1, - D3DBASIS_CATMULL_ROM = 2, -}} -ENUM!{enum D3DDEGREETYPE { - D3DDEGREE_LINEAR = 1, - D3DDEGREE_QUADRATIC = 2, - D3DDEGREE_CUBIC = 3, - D3DDEGREE_QUINTIC = 5, -}} -ENUM!{enum D3DPATCHEDGESTYLE { - D3DPATCHEDGE_DISCRETE = 0, - D3DPATCHEDGE_CONTINUOUS = 1, -}} -ENUM!{enum D3DSTATEBLOCKTYPE { - D3DSBT_ALL = 1, - D3DSBT_PIXELSTATE = 2, - D3DSBT_VERTEXSTATE = 3, -}} -FLAGS!{enum D3DVERTEXBLENDFLAGS { - D3DVBF_DISABLE = 0, - D3DVBF_1WEIGHTS = 1, - D3DVBF_2WEIGHTS = 2, - D3DVBF_3WEIGHTS = 3, - D3DVBF_TWEENING = 255, - D3DVBF_0WEIGHTS = 256, -}} -ENUM!{enum D3DTEXTURETRANSFORMFLAGS { - D3DTTFF_DISABLE = 0, - D3DTTFF_COUNT1 = 1, - D3DTTFF_COUNT2 = 2, - D3DTTFF_COUNT3 = 3, - D3DTTFF_COUNT4 = 4, - D3DTTFF_PROJECTED = 256, -}} -pub const D3DFVF_TEXTUREFORMAT2: ::DWORD = 0; -pub const D3DFVF_TEXTUREFORMAT1: ::DWORD = 3; -pub const D3DFVF_TEXTUREFORMAT3: ::DWORD = 1; -pub const D3DFVF_TEXTUREFORMAT4: ::DWORD = 2; -ENUM!{enum D3DDEVTYPE { - D3DDEVTYPE_HAL = 1, - D3DDEVTYPE_REF = 2, - D3DDEVTYPE_SW = 3, - D3DDEVTYPE_NULLREF = 4, -}} -ENUM!{enum D3DMULTISAMPLE_TYPE { - D3DMULTISAMPLE_NONE = 0, - D3DMULTISAMPLE_NONMASKABLE = 1, - D3DMULTISAMPLE_2_SAMPLES = 2, - D3DMULTISAMPLE_3_SAMPLES = 3, - D3DMULTISAMPLE_4_SAMPLES = 4, - D3DMULTISAMPLE_5_SAMPLES = 5, - D3DMULTISAMPLE_6_SAMPLES = 6, - D3DMULTISAMPLE_7_SAMPLES = 7, - D3DMULTISAMPLE_8_SAMPLES = 8, - D3DMULTISAMPLE_9_SAMPLES = 9, - D3DMULTISAMPLE_10_SAMPLES = 10, - D3DMULTISAMPLE_11_SAMPLES = 11, - D3DMULTISAMPLE_12_SAMPLES = 12, - D3DMULTISAMPLE_13_SAMPLES = 13, - D3DMULTISAMPLE_14_SAMPLES = 14, - D3DMULTISAMPLE_15_SAMPLES = 15, - D3DMULTISAMPLE_16_SAMPLES = 16, -}} -ENUM!{enum D3DFORMAT { - D3DFMT_UNKNOWN = 0, - D3DFMT_R8G8B8 = 20, - D3DFMT_A8R8G8B8 = 21, - D3DFMT_X8R8G8B8 = 22, - D3DFMT_R5G6B5 = 23, - D3DFMT_X1R5G5B5 = 24, - D3DFMT_A1R5G5B5 = 25, - D3DFMT_A4R4G4B4 = 26, - D3DFMT_R3G3B2 = 27, - D3DFMT_A8 = 28, - D3DFMT_A8R3G3B2 = 29, - D3DFMT_X4R4G4B4 = 30, - D3DFMT_A2B10G10R10 = 31, - D3DFMT_A8B8G8R8 = 32, - D3DFMT_X8B8G8R8 = 33, - D3DFMT_G16R16 = 34, - D3DFMT_A2R10G10B10 = 35, - D3DFMT_A16B16G16R16 = 36, - D3DFMT_A8P8 = 40, - D3DFMT_P8 = 41, - D3DFMT_L8 = 50, - D3DFMT_A8L8 = 51, - D3DFMT_A4L4 = 52, - D3DFMT_V8U8 = 60, - D3DFMT_L6V5U5 = 61, - D3DFMT_X8L8V8U8 = 62, - D3DFMT_Q8W8V8U8 = 63, - D3DFMT_V16U16 = 64, - D3DFMT_A2W10V10U10 = 67, - D3DFMT_UYVY = MAKEFOURCC!(b'U', b'Y', b'V', b'Y') as u32, - D3DFMT_R8G8_B8G8 = MAKEFOURCC!(b'R', b'G', b'B', b'G') as u32, - D3DFMT_YUY2 = MAKEFOURCC!(b'Y', b'U', b'Y', b'2') as u32, - D3DFMT_G8R8_G8B8 = MAKEFOURCC!(b'G', b'R', b'G', b'B') as u32, - D3DFMT_DXT1 = MAKEFOURCC!(b'D', b'X', b'T', b'1') as u32, - D3DFMT_DXT2 = MAKEFOURCC!(b'D', b'X', b'T', b'2') as u32, - D3DFMT_DXT3 = MAKEFOURCC!(b'D', b'X', b'T', b'3') as u32, - D3DFMT_DXT4 = MAKEFOURCC!(b'D', b'X', b'T', b'4') as u32, - D3DFMT_DXT5 = MAKEFOURCC!(b'D', b'X', b'T', b'5') as u32, - D3DFMT_D16_LOCKABLE = 70, - D3DFMT_D32 = 71, - D3DFMT_D15S1 = 73, - D3DFMT_D24S8 = 75, - D3DFMT_D24X8 = 77, - D3DFMT_D24X4S4 = 79, - D3DFMT_D16 = 80, - D3DFMT_D32F_LOCKABLE = 82, - D3DFMT_D24FS8 = 83, - D3DFMT_D32_LOCKABLE = 84, - D3DFMT_S8_LOCKABLE = 85, - D3DFMT_L16 = 81, - D3DFMT_VERTEXDATA = 100, - D3DFMT_INDEX16 = 101, - D3DFMT_INDEX32 = 102, - D3DFMT_Q16W16V16U16 = 110, - D3DFMT_MULTI2_ARGB8 = MAKEFOURCC!(b'M', b'E', b'T', b'1') as u32, - D3DFMT_R16F = 111, - D3DFMT_G16R16F = 112, - D3DFMT_A16B16G16R16F = 113, - D3DFMT_R32F = 114, - D3DFMT_G32R32F = 115, - D3DFMT_A32B32G32R32F = 116, - D3DFMT_CxV8U8 = 117, - D3DFMT_A1 = 118, - D3DFMT_A2B10G10R10_XR_BIAS = 119, - D3DFMT_BINARYBUFFER = 199, -}} -STRUCT!{struct D3DDISPLAYMODE { - Width: ::UINT, - Height: ::UINT, - RefreshRate: ::UINT, - Format: D3DFORMAT, -}} -STRUCT!{struct D3DDEVICE_CREATION_PARAMETERS { - AdapterOrdinal: ::UINT, - DeviceType: D3DDEVTYPE, - hFocusWindow: ::HWND, - BehaviorFlags: ::DWORD, -}} -ENUM!{enum D3DSWAPEFFECT { - D3DSWAPEFFECT_DISCARD = 1, - D3DSWAPEFFECT_FLIP = 2, - D3DSWAPEFFECT_COPY = 3, - D3DSWAPEFFECT_OVERLAY = 4, - D3DSWAPEFFECT_FLIPEX = 5, -}} -ENUM!{enum D3DPOOL { - D3DPOOL_DEFAULT = 0, - D3DPOOL_MANAGED = 1, - D3DPOOL_SYSTEMMEM = 2, - D3DPOOL_SCRATCH = 3, -}} -pub const D3DPRESENT_RATE_DEFAULT: ::DWORD = 0x00000000; -STRUCT!{struct D3DPRESENT_PARAMETERS { - BackBufferWidth: ::UINT, - BackBufferHeight: ::UINT, - BackBufferFormat: D3DFORMAT, - BackBufferCount: ::UINT, - MultiSampleType: D3DMULTISAMPLE_TYPE, - MultiSampleQuality: ::DWORD, - SwapEffect: D3DSWAPEFFECT, - hDeviceWindow: ::HWND, - Windowed: ::BOOL, - EnableAutoDepthStencil: ::BOOL, - AutoDepthStencilFormat: D3DFORMAT, - Flags: ::DWORD, - FullScreen_RefreshRateInHz: ::UINT, - PresentationInterval: ::UINT, -}} -pub const D3DPRESENTFLAG_LOCKABLE_BACKBUFFER: ::DWORD = 0x00000001; -pub const D3DPRESENTFLAG_DISCARD_DEPTHSTENCIL: ::DWORD = 0x00000002; -pub const D3DPRESENTFLAG_DEVICECLIP: ::DWORD = 0x00000004; -pub const D3DPRESENTFLAG_VIDEO: ::DWORD = 0x00000010; -pub const D3DPRESENTFLAG_NOAUTOROTATE: ::DWORD = 0x00000020; -pub const D3DPRESENTFLAG_UNPRUNEDMODE: ::DWORD = 0x00000040; -pub const D3DPRESENTFLAG_OVERLAY_LIMITEDRGB: ::DWORD = 0x00000080; -pub const D3DPRESENTFLAG_OVERLAY_YCbCr_BT709: ::DWORD = 0x00000100; -pub const D3DPRESENTFLAG_OVERLAY_YCbCr_xvYCC: ::DWORD = 0x00000200; -pub const D3DPRESENTFLAG_RESTRICTED_CONTENT: ::DWORD = 0x00000400; -pub const D3DPRESENTFLAG_RESTRICT_SHARED_RESOURCE_DRIVER: ::DWORD = 0x00000800; -#[repr(C)] #[derive(Copy)] -pub struct D3DGAMMARAMP { - pub red: [::WORD; 256], - pub green: [::WORD; 256], - pub blue: [::WORD; 256], -} -impl Clone for D3DGAMMARAMP { fn clone(&self) -> D3DGAMMARAMP { *self } } -ENUM!{enum D3DBACKBUFFER_TYPE { - D3DBACKBUFFER_TYPE_MONO = 0, - D3DBACKBUFFER_TYPE_LEFT = 1, - D3DBACKBUFFER_TYPE_RIGHT = 2, -}} -ENUM!{enum D3DRESOURCETYPE { - D3DRTYPE_SURFACE = 1, - D3DRTYPE_VOLUME = 2, - D3DRTYPE_TEXTURE = 3, - D3DRTYPE_VOLUMETEXTURE = 4, - D3DRTYPE_CUBETEXTURE = 5, - D3DRTYPE_VERTEXBUFFER = 6, - D3DRTYPE_INDEXBUFFER = 7, -}} -pub const D3DUSAGE_RENDERTARGET: ::DWORD = 0x00000001; -pub const D3DUSAGE_DEPTHSTENCIL: ::DWORD = 0x00000002; -pub const D3DUSAGE_DYNAMIC: ::DWORD = 0x00000200; -pub const D3DUSAGE_NONSECURE: ::DWORD = 0x00800000; -pub const D3DUSAGE_AUTOGENMIPMAP: ::DWORD = 0x00000400; -pub const D3DUSAGE_DMAP: ::DWORD = 0x00004000; -pub const D3DUSAGE_QUERY_LEGACYBUMPMAP: ::DWORD = 0x00008000; -pub const D3DUSAGE_QUERY_SRGBREAD: ::DWORD = 0x00010000; -pub const D3DUSAGE_QUERY_FILTER: ::DWORD = 0x00020000; -pub const D3DUSAGE_QUERY_SRGBWRITE: ::DWORD = 0x00040000; -pub const D3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING: ::DWORD = 0x00080000; -pub const D3DUSAGE_QUERY_VERTEXTEXTURE: ::DWORD = 0x00100000; -pub const D3DUSAGE_QUERY_WRAPANDMIP: ::DWORD = 0x00200000; -pub const D3DUSAGE_WRITEONLY: ::DWORD = 0x00000008; -pub const D3DUSAGE_SOFTWAREPROCESSING: ::DWORD = 0x00000010; -pub const D3DUSAGE_DONOTCLIP: ::DWORD = 0x00000020; -pub const D3DUSAGE_POINTS: ::DWORD = 0x00000040; -pub const D3DUSAGE_RTPATCHES: ::DWORD = 0x00000080; -pub const D3DUSAGE_NPATCHES: ::DWORD = 0x00000100; -pub const D3DUSAGE_TEXTAPI: ::DWORD = 0x10000000; -pub const D3DUSAGE_RESTRICTED_CONTENT: ::DWORD = 0x00000800; -pub const D3DUSAGE_RESTRICT_SHARED_RESOURCE: ::DWORD = 0x00002000; -pub const D3DUSAGE_RESTRICT_SHARED_RESOURCE_DRIVER: ::DWORD = 0x00001000; -ENUM!{enum D3DCUBEMAP_FACES { - D3DCUBEMAP_FACE_POSITIVE_X = 0, - D3DCUBEMAP_FACE_NEGATIVE_X = 1, - D3DCUBEMAP_FACE_POSITIVE_Y = 2, - D3DCUBEMAP_FACE_NEGATIVE_Y = 3, - D3DCUBEMAP_FACE_POSITIVE_Z = 4, - D3DCUBEMAP_FACE_NEGATIVE_Z = 5, -}} -pub const D3DLOCK_READONLY: ::DWORD = 0x00000010; -pub const D3DLOCK_DISCARD: ::DWORD = 0x00002000; -pub const D3DLOCK_NOOVERWRITE: ::DWORD = 0x00001000; -pub const D3DLOCK_NOSYSLOCK: ::DWORD = 0x00000800; -pub const D3DLOCK_DONOTWAIT: ::DWORD = 0x00004000; -pub const D3DLOCK_NO_DIRTY_UPDATE: ::DWORD = 0x00008000; -STRUCT!{struct D3DVERTEXBUFFER_DESC { - Format: D3DFORMAT, - Type: D3DRESOURCETYPE, - Usage: ::DWORD, - Pool: D3DPOOL, - Size: ::UINT, - FVF: ::DWORD, -}} -STRUCT!{struct D3DINDEXBUFFER_DESC { - Format: D3DFORMAT, - Type: D3DRESOURCETYPE, - Usage: ::DWORD, - Pool: D3DPOOL, - Size: ::UINT, -}} -STRUCT!{struct D3DSURFACE_DESC { - Format: D3DFORMAT, - Type: D3DRESOURCETYPE, - Usage: ::DWORD, - Pool: D3DPOOL, - MultiSampleType: D3DMULTISAMPLE_TYPE, - MultiSampleQuality: ::DWORD, - Width: ::UINT, - Height: ::UINT, -}} -STRUCT!{struct D3DVOLUME_DESC { - Format: D3DFORMAT, - Type: D3DRESOURCETYPE, - Usage: ::DWORD, - Pool: D3DPOOL, - Width: ::UINT, - Height: ::UINT, - Depth: ::UINT, -}} -STRUCT!{struct D3DLOCKED_RECT { - Pitch: ::INT, - pBits: *mut ::c_void, -}} -STRUCT!{struct D3DBOX { - Left: ::UINT, - Top: ::UINT, - Right: ::UINT, - Bottom: ::UINT, - Front: ::UINT, - Back: ::UINT, -}} -STRUCT!{struct D3DLOCKED_BOX { - RowPitch: ::INT, - SlicePitch: ::INT, - pBits: *mut ::c_void, -}} -STRUCT!{struct D3DRANGE { - Offset: ::UINT, - Size: ::UINT, -}} -STRUCT!{struct D3DRECTPATCH_INFO { - StartVertexOffsetWidth: ::UINT, - StartVertexOffsetHeight: ::UINT, - Width: ::UINT, - Height: ::UINT, - Stride: ::UINT, - Basis: D3DBASISTYPE, - Degree: D3DDEGREETYPE, -}} -STRUCT!{struct D3DTRIPATCH_INFO { - StartVertexOffset: ::UINT, - NumVertices: ::UINT, - Basis: D3DBASISTYPE, - Degree: D3DDEGREETYPE, -}} -pub const MAX_DEVICE_IDENTIFIER_STRING: usize = 512; -#[repr(C)] #[derive(Copy)] -pub struct D3DADAPTER_IDENTIFIER9 { - pub Driver: [::c_char; MAX_DEVICE_IDENTIFIER_STRING], - pub Description: [::c_char; MAX_DEVICE_IDENTIFIER_STRING], - pub DeviceName: [::c_char; 32], - pub DriverVersion: ::LARGE_INTEGER, - pub VendorId: ::DWORD, - pub DeviceId: ::DWORD, - pub SubSysId: ::DWORD, - pub Revision: ::DWORD, - pub DeviceIdentifier: ::GUID, - pub WHQLLevel: ::DWORD, -} -impl Clone for D3DADAPTER_IDENTIFIER9 { fn clone(&self) -> D3DADAPTER_IDENTIFIER9 { *self } } -STRUCT!{struct D3DRASTER_STATUS { - InVBlank: ::BOOL, - ScanLine: ::UINT, -}} -ENUM!{enum D3DDEBUGMONITORTOKENS { - D3DDMT_ENABLE = 0, - D3DDMT_DISABLE = 1, -}} -ENUM!{enum D3DQUERYTYPE { - D3DQUERYTYPE_VCACHE = 4, - D3DQUERYTYPE_RESOURCEMANAGER = 5, - D3DQUERYTYPE_VERTEXSTATS = 6, - D3DQUERYTYPE_EVENT = 8, - D3DQUERYTYPE_OCCLUSION = 9, - D3DQUERYTYPE_TIMESTAMP = 10, - D3DQUERYTYPE_TIMESTAMPDISJOINT = 11, - D3DQUERYTYPE_TIMESTAMPFREQ = 12, - D3DQUERYTYPE_PIPELINETIMINGS = 13, - D3DQUERYTYPE_INTERFACETIMINGS = 14, - D3DQUERYTYPE_VERTEXTIMINGS = 15, - D3DQUERYTYPE_PIXELTIMINGS = 16, - D3DQUERYTYPE_BANDWIDTHTIMINGS = 17, - D3DQUERYTYPE_CACHEUTILIZATION = 18, - D3DQUERYTYPE_MEMORYPRESSURE = 19, -}} -pub const D3DISSUE_END: ::DWORD = 1 << 0; -pub const D3DISSUE_BEGIN: ::DWORD = 1 << 1; -pub const D3DGETDATA_FLUSH: ::DWORD = 1 << 0; -STRUCT!{struct D3DRESOURCESTATS { - bThrashing: ::BOOL, - ApproxBytesDownloaded: ::DWORD, - NumEvicts: ::DWORD, - NumVidCreates: ::DWORD, - LastPri: ::DWORD, - NumUsed: ::DWORD, - NumUsedInVidMem: ::DWORD, - WorkingSet: ::DWORD, - WorkingSetBytes: ::DWORD, - TotalManaged: ::DWORD, - TotalBytes: ::DWORD, -}} -pub const D3DRTYPECOUNT: usize = 8; -STRUCT!{struct D3DDEVINFO_RESOURCEMANAGER { - stats: [D3DRESOURCESTATS; 8 /*D3DRTYPECOUNT, rust bug?*/], -}} -pub type LPD3DDEVINFO_RESOURCEMANAGER = *mut D3DDEVINFO_RESOURCEMANAGER; -STRUCT!{struct D3DDEVINFO_D3DVERTEXSTATS { - NumRenderedTriangles: ::DWORD, - NumExtraClippingTriangles: ::DWORD, -}} -pub type LPD3DDEVINFO_D3DVERTEXSTATS = *mut D3DDEVINFO_D3DVERTEXSTATS; -STRUCT!{struct D3DDEVINFO_VCACHE { - Pattern: ::DWORD, - OptMethod: ::DWORD, - CacheSize: ::DWORD, - MagicNumber: ::DWORD, -}} -pub type LPD3DDEVINFO_VCACHE = *mut D3DDEVINFO_VCACHE; -STRUCT!{struct D3DDEVINFO_D3D9PIPELINETIMINGS { - VertexProcessingTimePercent: ::FLOAT, - PixelProcessingTimePercent: ::FLOAT, - OtherGPUProcessingTimePercent: ::FLOAT, - GPUIdleTimePercent: ::FLOAT, -}} -STRUCT!{struct D3DDEVINFO_D3D9INTERFACETIMINGS { - WaitingForGPUToUseApplicationResourceTimePercent: ::FLOAT, - WaitingForGPUToAcceptMoreCommandsTimePercent: ::FLOAT, - WaitingForGPUToStayWithinLatencyTimePercent: ::FLOAT, - WaitingForGPUExclusiveResourceTimePercent: ::FLOAT, - WaitingForGPUOtherTimePercent: ::FLOAT, -}} -STRUCT!{struct D3DDEVINFO_D3D9STAGETIMINGS { - MemoryProcessingPercent: ::FLOAT, - ComputationProcessingPercent: ::FLOAT, -}} -STRUCT!{struct D3DDEVINFO_D3D9BANDWIDTHTIMINGS { - MaxBandwidthUtilized: ::FLOAT, - FrontEndUploadMemoryUtilizedPercent: ::FLOAT, - VertexRateUtilizedPercent: ::FLOAT, - TriangleSetupRateUtilizedPercent: ::FLOAT, - FillRateUtilizedPercent: ::FLOAT, -}} -STRUCT!{struct D3DDEVINFO_D3D9CACHEUTILIZATION { - TextureCacheHitRate: ::FLOAT, - PostTransformVertexCacheHitRate: ::FLOAT, -}} -STRUCT!{struct D3DMEMORYPRESSURE { - BytesEvictedFromProcess: ::UINT64, - SizeOfInefficientAllocation: ::UINT64, - LevelOfEfficiency: ::DWORD, -}} -ENUM!{enum D3DCOMPOSERECTSOP { - D3DCOMPOSERECTS_COPY = 1, - D3DCOMPOSERECTS_OR = 2, - D3DCOMPOSERECTS_AND = 3, - D3DCOMPOSERECTS_NEG = 4, -}} -STRUCT!{struct D3DCOMPOSERECTDESC { - X: ::USHORT, - Y: ::USHORT, - Width: ::USHORT, - Height: ::USHORT, -}} -STRUCT!{struct D3DCOMPOSERECTDESTINATION { - SrcRectIndex: ::USHORT, - Reserved: ::USHORT, - X: ::SHORT, - Y: ::SHORT, -}} -pub const D3DCOMPOSERECTS_MAXNUMRECTS: ::DWORD = 0xFFFF; -pub const D3DCONVOLUTIONMONO_MAXWIDTH: ::DWORD = 7; -pub const D3DCONVOLUTIONMONO_MAXHEIGHT: ::DWORD = D3DCONVOLUTIONMONO_MAXWIDTH; -pub const D3DFMT_A1_SURFACE_MAXWIDTH: ::DWORD = 8192; -pub const D3DFMT_A1_SURFACE_MAXHEIGHT: ::DWORD = 2048; -STRUCT!{struct D3DPRESENTSTATS { - PresentCount: ::UINT, - PresentRefreshCount: ::UINT, - SyncRefreshCount: ::UINT, - SyncQPCTime: ::LARGE_INTEGER, - SyncGPUTime: ::LARGE_INTEGER, -}} -ENUM!{enum D3DSCANLINEORDERING { - D3DSCANLINEORDERING_UNKNOWN = 0, - D3DSCANLINEORDERING_PROGRESSIVE = 1, - D3DSCANLINEORDERING_INTERLACED = 2, -}} -STRUCT!{struct D3DDISPLAYMODEEX { - Size: ::UINT, - Width: ::UINT, - Height: ::UINT, - RefreshRate: ::UINT, - Format: D3DFORMAT, - ScanLineOrdering: D3DSCANLINEORDERING, -}} -STRUCT!{struct D3DDISPLAYMODEFILTER { - Size: ::UINT, - Format: D3DFORMAT, - ScanLineOrdering: D3DSCANLINEORDERING, -}} -ENUM!{enum D3DDISPLAYROTATION { - D3DDISPLAYROTATION_IDENTITY = 1, - D3DDISPLAYROTATION_90 = 2, - D3DDISPLAYROTATION_180 = 3, - D3DDISPLAYROTATION_270 = 4, -}} -pub const D3D9_RESOURCE_PRIORITY_MINIMUM: ::DWORD = 0x28000000; -pub const D3D9_RESOURCE_PRIORITY_LOW: ::DWORD = 0x50000000; -pub const D3D9_RESOURCE_PRIORITY_NORMAL: ::DWORD = 0x78000000; -pub const D3D9_RESOURCE_PRIORITY_HIGH: ::DWORD = 0xa0000000; -pub const D3D9_RESOURCE_PRIORITY_MAXIMUM: ::DWORD = 0xc8000000; -pub const D3D_OMAC_SIZE: usize = 16; -STRUCT!{struct D3D_OMAC { - Omac: [::BYTE; D3D_OMAC_SIZE], -}} -ENUM!{enum D3DAUTHENTICATEDCHANNELTYPE { - D3DAUTHENTICATEDCHANNEL_D3D9 = 1, - D3DAUTHENTICATEDCHANNEL_DRIVER_SOFTWARE = 2, - D3DAUTHENTICATEDCHANNEL_DRIVER_HARDWARE = 3, -}} -STRUCT!{struct D3DAUTHENTICATEDCHANNEL_QUERY_INPUT { - QueryType: ::GUID, - hChannel: ::HANDLE, - SequenceNumber: ::UINT, -}} -STRUCT!{struct D3DAUTHENTICATEDCHANNEL_QUERY_OUTPUT { - omac: D3D_OMAC, - QueryType: ::GUID, - hChannel: ::HANDLE, - SequenceNumber: ::UINT, - ReturnCode: ::HRESULT, -}} -DEFINE_GUID!(D3DAUTHENTICATEDQUERY_PROTECTION, 0xa84eb584, 0xc495, 0x48aa, - 0xb9, 0x4d, 0x8b, 0xd2, 0xd6, 0xfb, 0xce, 0x5); -STRUCT!{struct D3DAUTHENTICATEDCHANNEL_PROTECTION_FLAGS { - Value: ::UINT, -}} -STRUCT!{struct D3DAUTHENTICATEDCHANNEL_QUERYPROTECTION_OUTPUT { - Output: D3DAUTHENTICATEDCHANNEL_QUERY_OUTPUT, - ProtectionFlags: D3DAUTHENTICATEDCHANNEL_PROTECTION_FLAGS, -}} -DEFINE_GUID!(D3DAUTHENTICATEDQUERY_CHANNELTYPE, 0xbc1b18a5, 0xb1fb, 0x42ab, - 0xbd, 0x94, 0xb5, 0x82, 0x8b, 0x4b, 0xf7, 0xbe); -STRUCT!{struct D3DAUTHENTICATEDCHANNEL_QUERYCHANNELTYPE_OUTPUT { - Output: D3DAUTHENTICATEDCHANNEL_QUERY_OUTPUT, - ChannelType: D3DAUTHENTICATEDCHANNELTYPE, -}} -DEFINE_GUID!(D3DAUTHENTICATEDQUERY_DEVICEHANDLE, 0xec1c539d, 0x8cff, 0x4e2a, - 0xbc, 0xc4, 0xf5, 0x69, 0x2f, 0x99, 0xf4, 0x80); -STRUCT!{struct D3DAUTHENTICATEDCHANNEL_QUERYDEVICEHANDLE_OUTPUT { - Output: D3DAUTHENTICATEDCHANNEL_QUERY_OUTPUT, - DeviceHandle: ::HANDLE, -}} -DEFINE_GUID!(D3DAUTHENTICATEDQUERY_CRYPTOSESSION, 0x2634499e, 0xd018, 0x4d74, - 0xac, 0x17, 0x7f, 0x72, 0x40, 0x59, 0x52, 0x8d); -STRUCT!{struct D3DAUTHENTICATEDCHANNEL_QUERYCRYPTOSESSION_INPUT { - Input: D3DAUTHENTICATEDCHANNEL_QUERY_INPUT, - DXVA2DecodeHandle: ::HANDLE, -}} -STRUCT!{struct D3DAUTHENTICATEDCHANNEL_QUERYCRYPTOSESSION_OUTPUT { - Output: D3DAUTHENTICATEDCHANNEL_QUERY_OUTPUT, - DXVA2DecodeHandle: ::HANDLE, - CryptoSessionHandle: ::HANDLE, - DeviceHandle: ::HANDLE, -}} -DEFINE_GUID!(D3DAUTHENTICATEDQUERY_RESTRICTEDSHAREDRESOURCEPROCESSCOUNT, 0xdb207b3, 0x9450, 0x46a6, - 0x82, 0xde, 0x1b, 0x96, 0xd4, 0x4f, 0x9c, 0xf2); -STRUCT!{struct D3DAUTHENTICATEDCHANNEL_QUERYRESTRICTEDSHAREDRESOURCEPROCESSCOUNT_OUTPUT { - Output: D3DAUTHENTICATEDCHANNEL_QUERY_OUTPUT, - NumRestrictedSharedResourceProcesses: ::UINT, -}} -DEFINE_GUID!(D3DAUTHENTICATEDQUERY_RESTRICTEDSHAREDRESOURCEPROCESS, 0x649bbadb, 0xf0f4, 0x4639, - 0xa1, 0x5b, 0x24, 0x39, 0x3f, 0xc3, 0xab, 0xac); -STRUCT!{struct D3DAUTHENTICATEDCHANNEL_QUERYRESTRICTEDSHAREDRESOURCEPROCESS_INPUT { - Input: D3DAUTHENTICATEDCHANNEL_QUERY_INPUT, - ProcessIndex: ::UINT, -}} -ENUM!{enum D3DAUTHENTICATEDCHANNEL_PROCESSIDENTIFIERTYPE { - PROCESSIDTYPE_UNKNOWN = 0, - PROCESSIDTYPE_DWM = 1, - PROCESSIDTYPE_HANDLE = 2, -}} -STRUCT!{struct D3DAUTHENTICATEDCHANNEL_QUERYRESTRICTEDSHAREDRESOURCEPROCESS_OUTPUT { - Output: D3DAUTHENTICATEDCHANNEL_QUERY_OUTPUT, - ProcessIndex: ::UINT, - ProcessIdentifer: D3DAUTHENTICATEDCHANNEL_PROCESSIDENTIFIERTYPE, - ProcessHandle: ::HANDLE, -}} -DEFINE_GUID!(D3DAUTHENTICATEDQUERY_UNRESTRICTEDPROTECTEDSHAREDRESOURCECOUNT, - 0x12f0bd6, 0xe662, 0x4474, 0xbe, 0xfd, 0xaa, 0x53, 0xe5, 0x14, 0x3c, 0x6d); -STRUCT!{struct D3DAUTHENTICATEDCHANNEL_QUERYUNRESTRICTEDPROTECTEDSHAREDRESOURCECOUNT_OUTPUT { - Output: D3DAUTHENTICATEDCHANNEL_QUERY_OUTPUT, - NumUnrestrictedProtectedSharedResources: ::UINT, -}} -DEFINE_GUID!(D3DAUTHENTICATEDQUERY_OUTPUTIDCOUNT, 0x2c042b5e, 0x8c07, 0x46d5, - 0xaa, 0xbe, 0x8f, 0x75, 0xcb, 0xad, 0x4c, 0x31); -STRUCT!{struct D3DAUTHENTICATEDCHANNEL_QUERYOUTPUTIDCOUNT_INPUT { - Input: D3DAUTHENTICATEDCHANNEL_QUERY_INPUT, - DeviceHandle: ::HANDLE, - CryptoSessionHandle: ::HANDLE, -}} -STRUCT!{struct D3DAUTHENTICATEDCHANNEL_QUERYOUTPUTIDCOUNT_OUTPUT { - Output: D3DAUTHENTICATEDCHANNEL_QUERY_OUTPUT, - DeviceHandle: ::HANDLE, - CryptoSessionHandle: ::HANDLE, - NumOutputIDs: ::UINT, -}} -DEFINE_GUID!(D3DAUTHENTICATEDQUERY_OUTPUTID, 0x839ddca3, 0x9b4e, 0x41e4, - 0xb0, 0x53, 0x89, 0x2b, 0xd2, 0xa1, 0x1e, 0xe7); -STRUCT!{struct D3DAUTHENTICATEDCHANNEL_QUERYOUTPUTID_INPUT { - Input: D3DAUTHENTICATEDCHANNEL_QUERY_INPUT, - DeviceHandle: ::HANDLE, - CryptoSessionHandle: ::HANDLE, - OutputIDIndex: ::UINT, -}} -STRUCT!{struct D3DAUTHENTICATEDCHANNEL_QUERYOUTPUTID_OUTPUT { - Output: D3DAUTHENTICATEDCHANNEL_QUERY_OUTPUT, - DeviceHandle: ::HANDLE, - CryptoSessionHandle: ::HANDLE, - OutputIDIndex: ::UINT, - OutputID: ::UINT64, -}} -DEFINE_GUID!(D3DAUTHENTICATEDQUERY_ACCESSIBILITYATTRIBUTES, 0x6214d9d2, 0x432c, 0x4abb, - 0x9f, 0xce, 0x21, 0x6e, 0xea, 0x26, 0x9e, 0x3b); -FLAGS!{enum D3DBUSTYPE { - D3DBUSTYPE_OTHER = 0x00000000, - D3DBUSTYPE_PCI = 0x00000001, - D3DBUSTYPE_PCIX = 0x00000002, - D3DBUSTYPE_PCIEXPRESS = 0x00000003, - D3DBUSTYPE_AGP = 0x00000004, - D3DBUSIMPL_MODIFIER_INSIDE_OF_CHIPSET = 0x00010000, - MD3DBUSIMPL_ODIFIER_TRACKS_ON_MOTHER_BOARD_TO_CHIP = 0x00020000, - D3DBUSIMPL_MODIFIER_TRACKS_ON_MOTHER_BOARD_TO_SOCKET = 0x00030000, - D3DBUSIMPL_MODIFIER_DAUGHTER_BOARD_CONNECTOR = 0x00040000, - D3DBUSIMPL_MODIFIER_DAUGHTER_BOARD_CONNECTOR_INSIDE_OF_NUAE = 0x00050000, - D3DBUSIMPL_MODIFIER_NON_STANDARD = 0x80000000, -}} -STRUCT!{struct D3DAUTHENTICATEDCHANNEL_QUERYINFOBUSTYPE_OUTPUT { - Output: D3DAUTHENTICATEDCHANNEL_QUERY_OUTPUT, - BusType: D3DBUSTYPE, - bAccessibleInContiguousBlocks: ::BOOL, - bAccessibleInNonContiguousBlocks: ::BOOL, -}} -DEFINE_GUID!(D3DAUTHENTICATEDQUERY_ENCRYPTIONWHENACCESSIBLEGUIDCOUNT, 0xb30f7066, 0x203c, 0x4b07, - 0x93, 0xfc, 0xce, 0xaa, 0xfd, 0x61, 0x24, 0x1e); -STRUCT!{struct D3DAUTHENTICATEDCHANNEL_QUERYEVICTIONENCRYPTIONGUIDCOUNT_OUTPUT { - Output: D3DAUTHENTICATEDCHANNEL_QUERY_OUTPUT, - NumEncryptionGuids: ::UINT, -}} -DEFINE_GUID!(D3DAUTHENTICATEDQUERY_ENCRYPTIONWHENACCESSIBLEGUID, 0xf83a5958, 0xe986, 0x4bda, - 0xbe, 0xb0, 0x41, 0x1f, 0x6a, 0x7a, 0x1, 0xb7); -STRUCT!{struct D3DAUTHENTICATEDCHANNEL_QUERYEVICTIONENCRYPTIONGUID_INPUT { - Input: D3DAUTHENTICATEDCHANNEL_QUERY_INPUT, - EncryptionGuidIndex: ::UINT, -}} -STRUCT!{struct D3DAUTHENTICATEDCHANNEL_QUERYEVICTIONENCRYPTIONGUID_OUTPUT { - Output: D3DAUTHENTICATEDCHANNEL_QUERY_OUTPUT, - EncryptionGuidIndex: ::UINT, - EncryptionGuid: ::GUID, -}} -DEFINE_GUID!(D3DAUTHENTICATEDQUERY_CURRENTENCRYPTIONWHENACCESSIBLE, 0xec1791c7, 0xdad3, 0x4f15, - 0x9e, 0xc3, 0xfa, 0xa9, 0x3d, 0x60, 0xd4, 0xf0); -STRUCT!{struct D3DAUTHENTICATEDCHANNEL_QUERYUNCOMPRESSEDENCRYPTIONLEVEL_OUTPUT { - Output: D3DAUTHENTICATEDCHANNEL_QUERY_OUTPUT, - EncryptionGuid: ::GUID, -}} -STRUCT!{struct D3DAUTHENTICATEDCHANNEL_CONFIGURE_INPUT { - omac: D3D_OMAC, - ConfigureType: ::GUID, - hChannel: ::HANDLE, - SequenceNumber: ::UINT, -}} -STRUCT!{struct D3DAUTHENTICATEDCHANNEL_CONFIGURE_OUTPUT { - omac: D3D_OMAC, - ConfigureType: ::GUID, - hChannel: ::HANDLE, - SequenceNumber: ::UINT, - ReturnCode: ::HRESULT, -}} -DEFINE_GUID!(D3DAUTHENTICATEDCONFIGURE_INITIALIZE, 0x6114bdb, 0x3523, 0x470a, - 0x8d, 0xca, 0xfb, 0xc2, 0x84, 0x51, 0x54, 0xf0); -STRUCT!{struct D3DAUTHENTICATEDCHANNEL_CONFIGUREINITIALIZE { - Parameters: D3DAUTHENTICATEDCHANNEL_CONFIGURE_INPUT, - StartSequenceQuery: ::UINT, - StartSequenceConfigure: ::UINT, -}} -DEFINE_GUID!(D3DAUTHENTICATEDCONFIGURE_PROTECTION, 0x50455658, 0x3f47, 0x4362, - 0xbf, 0x99, 0xbf, 0xdf, 0xcd, 0xe9, 0xed, 0x29); -STRUCT!{struct D3DAUTHENTICATEDCHANNEL_CONFIGUREPROTECTION { - Parameters: D3DAUTHENTICATEDCHANNEL_CONFIGURE_INPUT, - Protections: D3DAUTHENTICATEDCHANNEL_PROTECTION_FLAGS, -}} -DEFINE_GUID!(D3DAUTHENTICATEDCONFIGURE_CRYPTOSESSION, 0x6346cc54, 0x2cfc, 0x4ad4, - 0x82, 0x24, 0xd1, 0x58, 0x37, 0xde, 0x77, 0x0); -STRUCT!{struct D3DAUTHENTICATEDCHANNEL_CONFIGURECRYPTOSESSION { - Parameters: D3DAUTHENTICATEDCHANNEL_CONFIGURE_INPUT, - DXVA2DecodeHandle: ::HANDLE, - CryptoSessionHandle: ::HANDLE, - DeviceHandle: ::HANDLE, -}} -DEFINE_GUID!(D3DAUTHENTICATEDCONFIGURE_SHAREDRESOURCE, 0x772d047, 0x1b40, 0x48e8, - 0x9c, 0xa6, 0xb5, 0xf5, 0x10, 0xde, 0x9f, 0x1); -STRUCT!{struct D3DAUTHENTICATEDCHANNEL_CONFIGURESHAREDRESOURCE { - Parameters: D3DAUTHENTICATEDCHANNEL_CONFIGURE_INPUT, - ProcessIdentiferType: D3DAUTHENTICATEDCHANNEL_PROCESSIDENTIFIERTYPE, - ProcessHandle: ::HANDLE, - AllowAccess: ::BOOL, -}} -DEFINE_GUID!(D3DAUTHENTICATEDCONFIGURE_ENCRYPTIONWHENACCESSIBLE, 0x41fff286, 0x6ae0, 0x4d43, - 0x9d, 0x55, 0xa4, 0x6e, 0x9e, 0xfd, 0x15, 0x8a); -STRUCT!{struct D3DAUTHENTICATEDCHANNEL_CONFIGUREUNCOMPRESSEDENCRYPTION { - Parameters: D3DAUTHENTICATEDCHANNEL_CONFIGURE_INPUT, - EncryptionGuid: ::GUID, -}} -STRUCT!{struct D3DENCRYPTED_BLOCK_INFO { - NumEncryptedBytesAtBeginning: ::UINT, - NumBytesInSkipPattern: ::UINT, - NumBytesInEncryptPattern: ::UINT, -}} -STRUCT!{struct D3DAES_CTR_IV { - IV: ::UINT64, - Count: ::UINT64, -}} diff --git a/deps/winapi-0.2.5/src/d3dcommon.rs b/deps/winapi-0.2.5/src/d3dcommon.rs deleted file mode 100644 index f265899c7..000000000 --- a/deps/winapi-0.2.5/src/d3dcommon.rs +++ /dev/null @@ -1,753 +0,0 @@ -// Copyright © 2015; Connor Hilarides -// Licensed under the MIT License <LICENSE.md> -//! Mappings for the contents of d3dcommon.h -ENUM!{enum D3D_DRIVER_TYPE { - D3D_DRIVER_TYPE_UNKNOWN, - D3D_DRIVER_TYPE_HARDWARE, - D3D_DRIVER_TYPE_REFERENCE, - D3D_DRIVER_TYPE_NULL, - D3D_DRIVER_TYPE_SOFTWARE, - D3D_DRIVER_TYPE_WARP, -}} -ENUM!{enum D3D_FEATURE_LEVEL { - D3D_FEATURE_LEVEL_9_1 = 0x9100, - D3D_FEATURE_LEVEL_9_2 = 0x9200, - D3D_FEATURE_LEVEL_9_3 = 0x9300, - D3D_FEATURE_LEVEL_10_0 = 0xa000, - D3D_FEATURE_LEVEL_10_1 = 0xa100, - D3D_FEATURE_LEVEL_11_0 = 0xb000, - D3D_FEATURE_LEVEL_11_1 = 0xb100, -}} -ENUM!{enum D3D_PRIMITIVE_TOPOLOGY { - D3D_PRIMITIVE_TOPOLOGY_UNDEFINED = 0, - D3D_PRIMITIVE_TOPOLOGY_POINTLIST = 1, - D3D_PRIMITIVE_TOPOLOGY_LINELIST = 2, - D3D_PRIMITIVE_TOPOLOGY_LINESTRIP = 3, - D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST = 4, - D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP = 5, - D3D_PRIMITIVE_TOPOLOGY_LINELIST_ADJ = 10, - D3D_PRIMITIVE_TOPOLOGY_LINESTRIP_ADJ = 11, - D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST_ADJ = 12, - D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP_ADJ = 13, - D3D_PRIMITIVE_TOPOLOGY_1_CONTROL_POINT_PATCHLIST = 33, - D3D_PRIMITIVE_TOPOLOGY_2_CONTROL_POINT_PATCHLIST = 34, - D3D_PRIMITIVE_TOPOLOGY_3_CONTROL_POINT_PATCHLIST = 35, - D3D_PRIMITIVE_TOPOLOGY_4_CONTROL_POINT_PATCHLIST = 36, - D3D_PRIMITIVE_TOPOLOGY_5_CONTROL_POINT_PATCHLIST = 37, - D3D_PRIMITIVE_TOPOLOGY_6_CONTROL_POINT_PATCHLIST = 38, - D3D_PRIMITIVE_TOPOLOGY_7_CONTROL_POINT_PATCHLIST = 39, - D3D_PRIMITIVE_TOPOLOGY_8_CONTROL_POINT_PATCHLIST = 40, - D3D_PRIMITIVE_TOPOLOGY_9_CONTROL_POINT_PATCHLIST = 41, - D3D_PRIMITIVE_TOPOLOGY_10_CONTROL_POINT_PATCHLIST = 42, - D3D_PRIMITIVE_TOPOLOGY_11_CONTROL_POINT_PATCHLIST = 43, - D3D_PRIMITIVE_TOPOLOGY_12_CONTROL_POINT_PATCHLIST = 44, - D3D_PRIMITIVE_TOPOLOGY_13_CONTROL_POINT_PATCHLIST = 45, - D3D_PRIMITIVE_TOPOLOGY_14_CONTROL_POINT_PATCHLIST = 46, - D3D_PRIMITIVE_TOPOLOGY_15_CONTROL_POINT_PATCHLIST = 47, - D3D_PRIMITIVE_TOPOLOGY_16_CONTROL_POINT_PATCHLIST = 48, - D3D_PRIMITIVE_TOPOLOGY_17_CONTROL_POINT_PATCHLIST = 49, - D3D_PRIMITIVE_TOPOLOGY_18_CONTROL_POINT_PATCHLIST = 50, - D3D_PRIMITIVE_TOPOLOGY_19_CONTROL_POINT_PATCHLIST = 51, - D3D_PRIMITIVE_TOPOLOGY_20_CONTROL_POINT_PATCHLIST = 52, - D3D_PRIMITIVE_TOPOLOGY_21_CONTROL_POINT_PATCHLIST = 53, - D3D_PRIMITIVE_TOPOLOGY_22_CONTROL_POINT_PATCHLIST = 54, - D3D_PRIMITIVE_TOPOLOGY_23_CONTROL_POINT_PATCHLIST = 55, - D3D_PRIMITIVE_TOPOLOGY_24_CONTROL_POINT_PATCHLIST = 56, - D3D_PRIMITIVE_TOPOLOGY_25_CONTROL_POINT_PATCHLIST = 57, - D3D_PRIMITIVE_TOPOLOGY_26_CONTROL_POINT_PATCHLIST = 58, - D3D_PRIMITIVE_TOPOLOGY_27_CONTROL_POINT_PATCHLIST = 59, - D3D_PRIMITIVE_TOPOLOGY_28_CONTROL_POINT_PATCHLIST = 60, - D3D_PRIMITIVE_TOPOLOGY_29_CONTROL_POINT_PATCHLIST = 61, - D3D_PRIMITIVE_TOPOLOGY_30_CONTROL_POINT_PATCHLIST = 62, - D3D_PRIMITIVE_TOPOLOGY_31_CONTROL_POINT_PATCHLIST = 63, - D3D_PRIMITIVE_TOPOLOGY_32_CONTROL_POINT_PATCHLIST = 64, -}} -pub const D3D10_PRIMITIVE_TOPOLOGY_UNDEFINED: ::D3D_PRIMITIVE_TOPOLOGY = - D3D_PRIMITIVE_TOPOLOGY_UNDEFINED; -pub const D3D10_PRIMITIVE_TOPOLOGY_POINTLIST: ::D3D_PRIMITIVE_TOPOLOGY = - D3D_PRIMITIVE_TOPOLOGY_POINTLIST; -pub const D3D10_PRIMITIVE_TOPOLOGY_LINELIST: ::D3D_PRIMITIVE_TOPOLOGY = - D3D_PRIMITIVE_TOPOLOGY_LINELIST; -pub const D3D10_PRIMITIVE_TOPOLOGY_LINESTRIP: ::D3D_PRIMITIVE_TOPOLOGY = - D3D_PRIMITIVE_TOPOLOGY_LINESTRIP; -pub const D3D10_PRIMITIVE_TOPOLOGY_TRIANGLELIST: ::D3D_PRIMITIVE_TOPOLOGY = - D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST; -pub const D3D10_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP: ::D3D_PRIMITIVE_TOPOLOGY = - D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP; -pub const D3D10_PRIMITIVE_TOPOLOGY_LINELIST_ADJ: ::D3D_PRIMITIVE_TOPOLOGY = - D3D_PRIMITIVE_TOPOLOGY_LINELIST_ADJ; -pub const D3D10_PRIMITIVE_TOPOLOGY_LINESTRIP_ADJ: ::D3D_PRIMITIVE_TOPOLOGY = - D3D_PRIMITIVE_TOPOLOGY_LINESTRIP_ADJ; -pub const D3D10_PRIMITIVE_TOPOLOGY_TRIANGLELIST_ADJ: ::D3D_PRIMITIVE_TOPOLOGY = - D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST_ADJ; -pub const D3D10_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP_ADJ: ::D3D_PRIMITIVE_TOPOLOGY = - D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP_ADJ; -pub const D3D11_PRIMITIVE_TOPOLOGY_UNDEFINED: ::D3D_PRIMITIVE_TOPOLOGY = - D3D_PRIMITIVE_TOPOLOGY_UNDEFINED; -pub const D3D11_PRIMITIVE_TOPOLOGY_POINTLIST: ::D3D_PRIMITIVE_TOPOLOGY = - D3D_PRIMITIVE_TOPOLOGY_POINTLIST; -pub const D3D11_PRIMITIVE_TOPOLOGY_LINELIST: ::D3D_PRIMITIVE_TOPOLOGY = - D3D_PRIMITIVE_TOPOLOGY_LINELIST; -pub const D3D11_PRIMITIVE_TOPOLOGY_LINESTRIP: ::D3D_PRIMITIVE_TOPOLOGY = - D3D_PRIMITIVE_TOPOLOGY_LINESTRIP; -pub const D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST: ::D3D_PRIMITIVE_TOPOLOGY = - D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST; -pub const D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP: ::D3D_PRIMITIVE_TOPOLOGY = - D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP; -pub const D3D11_PRIMITIVE_TOPOLOGY_LINELIST_ADJ: ::D3D_PRIMITIVE_TOPOLOGY = - D3D_PRIMITIVE_TOPOLOGY_LINELIST_ADJ; -pub const D3D11_PRIMITIVE_TOPOLOGY_LINESTRIP_ADJ: ::D3D_PRIMITIVE_TOPOLOGY = - D3D_PRIMITIVE_TOPOLOGY_LINESTRIP_ADJ; -pub const D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST_ADJ: ::D3D_PRIMITIVE_TOPOLOGY = - D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST_ADJ; -pub const D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP_ADJ: ::D3D_PRIMITIVE_TOPOLOGY = - D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP_ADJ; -pub const D3D11_PRIMITIVE_TOPOLOGY_1_CONTROL_POINT_PATCHLIST: ::D3D_PRIMITIVE_TOPOLOGY = - D3D_PRIMITIVE_TOPOLOGY_1_CONTROL_POINT_PATCHLIST; -pub const D3D11_PRIMITIVE_TOPOLOGY_2_CONTROL_POINT_PATCHLIST: ::D3D_PRIMITIVE_TOPOLOGY = - D3D_PRIMITIVE_TOPOLOGY_2_CONTROL_POINT_PATCHLIST; -pub const D3D11_PRIMITIVE_TOPOLOGY_3_CONTROL_POINT_PATCHLIST: ::D3D_PRIMITIVE_TOPOLOGY = - D3D_PRIMITIVE_TOPOLOGY_3_CONTROL_POINT_PATCHLIST; -pub const D3D11_PRIMITIVE_TOPOLOGY_4_CONTROL_POINT_PATCHLIST: ::D3D_PRIMITIVE_TOPOLOGY = - D3D_PRIMITIVE_TOPOLOGY_4_CONTROL_POINT_PATCHLIST; -pub const D3D11_PRIMITIVE_TOPOLOGY_5_CONTROL_POINT_PATCHLIST: ::D3D_PRIMITIVE_TOPOLOGY = - D3D_PRIMITIVE_TOPOLOGY_5_CONTROL_POINT_PATCHLIST; -pub const D3D11_PRIMITIVE_TOPOLOGY_6_CONTROL_POINT_PATCHLIST: ::D3D_PRIMITIVE_TOPOLOGY = - D3D_PRIMITIVE_TOPOLOGY_6_CONTROL_POINT_PATCHLIST; -pub const D3D11_PRIMITIVE_TOPOLOGY_7_CONTROL_POINT_PATCHLIST: ::D3D_PRIMITIVE_TOPOLOGY = - D3D_PRIMITIVE_TOPOLOGY_7_CONTROL_POINT_PATCHLIST; -pub const D3D11_PRIMITIVE_TOPOLOGY_8_CONTROL_POINT_PATCHLIST: ::D3D_PRIMITIVE_TOPOLOGY = - D3D_PRIMITIVE_TOPOLOGY_8_CONTROL_POINT_PATCHLIST; -pub const D3D11_PRIMITIVE_TOPOLOGY_9_CONTROL_POINT_PATCHLIST: ::D3D_PRIMITIVE_TOPOLOGY = - D3D_PRIMITIVE_TOPOLOGY_9_CONTROL_POINT_PATCHLIST; -pub const D3D11_PRIMITIVE_TOPOLOGY_10_CONTROL_POINT_PATCHLIST: ::D3D_PRIMITIVE_TOPOLOGY = - D3D_PRIMITIVE_TOPOLOGY_10_CONTROL_POINT_PATCHLIST; -pub const D3D11_PRIMITIVE_TOPOLOGY_11_CONTROL_POINT_PATCHLIST: ::D3D_PRIMITIVE_TOPOLOGY = - D3D_PRIMITIVE_TOPOLOGY_11_CONTROL_POINT_PATCHLIST; -pub const D3D11_PRIMITIVE_TOPOLOGY_12_CONTROL_POINT_PATCHLIST: ::D3D_PRIMITIVE_TOPOLOGY = - D3D_PRIMITIVE_TOPOLOGY_12_CONTROL_POINT_PATCHLIST; -pub const D3D11_PRIMITIVE_TOPOLOGY_13_CONTROL_POINT_PATCHLIST: ::D3D_PRIMITIVE_TOPOLOGY = - D3D_PRIMITIVE_TOPOLOGY_13_CONTROL_POINT_PATCHLIST; -pub const D3D11_PRIMITIVE_TOPOLOGY_14_CONTROL_POINT_PATCHLIST: ::D3D_PRIMITIVE_TOPOLOGY = - D3D_PRIMITIVE_TOPOLOGY_14_CONTROL_POINT_PATCHLIST; -pub const D3D11_PRIMITIVE_TOPOLOGY_15_CONTROL_POINT_PATCHLIST: ::D3D_PRIMITIVE_TOPOLOGY = - D3D_PRIMITIVE_TOPOLOGY_15_CONTROL_POINT_PATCHLIST; -pub const D3D11_PRIMITIVE_TOPOLOGY_16_CONTROL_POINT_PATCHLIST: ::D3D_PRIMITIVE_TOPOLOGY = - D3D_PRIMITIVE_TOPOLOGY_16_CONTROL_POINT_PATCHLIST; -pub const D3D11_PRIMITIVE_TOPOLOGY_17_CONTROL_POINT_PATCHLIST: ::D3D_PRIMITIVE_TOPOLOGY = - D3D_PRIMITIVE_TOPOLOGY_17_CONTROL_POINT_PATCHLIST; -pub const D3D11_PRIMITIVE_TOPOLOGY_18_CONTROL_POINT_PATCHLIST: ::D3D_PRIMITIVE_TOPOLOGY = - D3D_PRIMITIVE_TOPOLOGY_18_CONTROL_POINT_PATCHLIST; -pub const D3D11_PRIMITIVE_TOPOLOGY_19_CONTROL_POINT_PATCHLIST: ::D3D_PRIMITIVE_TOPOLOGY = - D3D_PRIMITIVE_TOPOLOGY_19_CONTROL_POINT_PATCHLIST; -pub const D3D11_PRIMITIVE_TOPOLOGY_20_CONTROL_POINT_PATCHLIST: ::D3D_PRIMITIVE_TOPOLOGY = - D3D_PRIMITIVE_TOPOLOGY_20_CONTROL_POINT_PATCHLIST; -pub const D3D11_PRIMITIVE_TOPOLOGY_21_CONTROL_POINT_PATCHLIST: ::D3D_PRIMITIVE_TOPOLOGY = - D3D_PRIMITIVE_TOPOLOGY_21_CONTROL_POINT_PATCHLIST; -pub const D3D11_PRIMITIVE_TOPOLOGY_22_CONTROL_POINT_PATCHLIST: ::D3D_PRIMITIVE_TOPOLOGY = - D3D_PRIMITIVE_TOPOLOGY_22_CONTROL_POINT_PATCHLIST; -pub const D3D11_PRIMITIVE_TOPOLOGY_23_CONTROL_POINT_PATCHLIST: ::D3D_PRIMITIVE_TOPOLOGY = - D3D_PRIMITIVE_TOPOLOGY_23_CONTROL_POINT_PATCHLIST; -pub const D3D11_PRIMITIVE_TOPOLOGY_24_CONTROL_POINT_PATCHLIST: ::D3D_PRIMITIVE_TOPOLOGY = - D3D_PRIMITIVE_TOPOLOGY_24_CONTROL_POINT_PATCHLIST; -pub const D3D11_PRIMITIVE_TOPOLOGY_25_CONTROL_POINT_PATCHLIST: ::D3D_PRIMITIVE_TOPOLOGY = - D3D_PRIMITIVE_TOPOLOGY_25_CONTROL_POINT_PATCHLIST; -pub const D3D11_PRIMITIVE_TOPOLOGY_26_CONTROL_POINT_PATCHLIST: ::D3D_PRIMITIVE_TOPOLOGY = - D3D_PRIMITIVE_TOPOLOGY_26_CONTROL_POINT_PATCHLIST; -pub const D3D11_PRIMITIVE_TOPOLOGY_27_CONTROL_POINT_PATCHLIST: ::D3D_PRIMITIVE_TOPOLOGY = - D3D_PRIMITIVE_TOPOLOGY_27_CONTROL_POINT_PATCHLIST; -pub const D3D11_PRIMITIVE_TOPOLOGY_28_CONTROL_POINT_PATCHLIST: ::D3D_PRIMITIVE_TOPOLOGY = - D3D_PRIMITIVE_TOPOLOGY_28_CONTROL_POINT_PATCHLIST; -pub const D3D11_PRIMITIVE_TOPOLOGY_29_CONTROL_POINT_PATCHLIST: ::D3D_PRIMITIVE_TOPOLOGY = - D3D_PRIMITIVE_TOPOLOGY_29_CONTROL_POINT_PATCHLIST; -pub const D3D11_PRIMITIVE_TOPOLOGY_30_CONTROL_POINT_PATCHLIST: ::D3D_PRIMITIVE_TOPOLOGY = - D3D_PRIMITIVE_TOPOLOGY_30_CONTROL_POINT_PATCHLIST; -pub const D3D11_PRIMITIVE_TOPOLOGY_31_CONTROL_POINT_PATCHLIST: ::D3D_PRIMITIVE_TOPOLOGY = - D3D_PRIMITIVE_TOPOLOGY_31_CONTROL_POINT_PATCHLIST; -pub const D3D11_PRIMITIVE_TOPOLOGY_32_CONTROL_POINT_PATCHLIST: ::D3D_PRIMITIVE_TOPOLOGY = - D3D_PRIMITIVE_TOPOLOGY_32_CONTROL_POINT_PATCHLIST; -ENUM!{enum D3D_PRIMITIVE { - D3D_PRIMITIVE_UNDEFINED = 0, - D3D_PRIMITIVE_POINT = 1, - D3D_PRIMITIVE_LINE = 2, - D3D_PRIMITIVE_TRIANGLE = 3, - D3D_PRIMITIVE_LINE_ADJ = 6, - D3D_PRIMITIVE_TRIANGLE_ADJ = 7, - D3D_PRIMITIVE_1_CONTROL_POINT_PATCH = 8, - D3D_PRIMITIVE_2_CONTROL_POINT_PATCH = 9, - D3D_PRIMITIVE_3_CONTROL_POINT_PATCH = 10, - D3D_PRIMITIVE_4_CONTROL_POINT_PATCH = 11, - D3D_PRIMITIVE_5_CONTROL_POINT_PATCH = 12, - D3D_PRIMITIVE_6_CONTROL_POINT_PATCH = 13, - D3D_PRIMITIVE_7_CONTROL_POINT_PATCH = 14, - D3D_PRIMITIVE_8_CONTROL_POINT_PATCH = 15, - D3D_PRIMITIVE_9_CONTROL_POINT_PATCH = 16, - D3D_PRIMITIVE_10_CONTROL_POINT_PATCH = 17, - D3D_PRIMITIVE_11_CONTROL_POINT_PATCH = 18, - D3D_PRIMITIVE_12_CONTROL_POINT_PATCH = 19, - D3D_PRIMITIVE_13_CONTROL_POINT_PATCH = 20, - D3D_PRIMITIVE_14_CONTROL_POINT_PATCH = 21, - D3D_PRIMITIVE_15_CONTROL_POINT_PATCH = 22, - D3D_PRIMITIVE_16_CONTROL_POINT_PATCH = 23, - D3D_PRIMITIVE_17_CONTROL_POINT_PATCH = 24, - D3D_PRIMITIVE_18_CONTROL_POINT_PATCH = 25, - D3D_PRIMITIVE_19_CONTROL_POINT_PATCH = 26, - D3D_PRIMITIVE_20_CONTROL_POINT_PATCH = 28, - D3D_PRIMITIVE_21_CONTROL_POINT_PATCH = 29, - D3D_PRIMITIVE_22_CONTROL_POINT_PATCH = 30, - D3D_PRIMITIVE_23_CONTROL_POINT_PATCH = 31, - D3D_PRIMITIVE_24_CONTROL_POINT_PATCH = 32, - D3D_PRIMITIVE_25_CONTROL_POINT_PATCH = 33, - D3D_PRIMITIVE_26_CONTROL_POINT_PATCH = 34, - D3D_PRIMITIVE_27_CONTROL_POINT_PATCH = 35, - D3D_PRIMITIVE_28_CONTROL_POINT_PATCH = 36, - D3D_PRIMITIVE_29_CONTROL_POINT_PATCH = 37, - D3D_PRIMITIVE_30_CONTROL_POINT_PATCH = 38, - D3D_PRIMITIVE_31_CONTROL_POINT_PATCH = 39, - D3D_PRIMITIVE_32_CONTROL_POINT_PATCH = 40, -}} -pub const D3D10_PRIMITIVE_UNDEFINED: ::D3D_PRIMITIVE = D3D_PRIMITIVE_UNDEFINED; -pub const D3D10_PRIMITIVE_POINT: ::D3D_PRIMITIVE = D3D_PRIMITIVE_POINT; -pub const D3D10_PRIMITIVE_LINE: ::D3D_PRIMITIVE = D3D_PRIMITIVE_LINE; -pub const D3D10_PRIMITIVE_TRIANGLE: ::D3D_PRIMITIVE = D3D_PRIMITIVE_TRIANGLE; -pub const D3D10_PRIMITIVE_LINE_ADJ: ::D3D_PRIMITIVE = D3D_PRIMITIVE_LINE_ADJ; -pub const D3D10_PRIMITIVE_TRIANGLE_ADJ: ::D3D_PRIMITIVE = D3D_PRIMITIVE_TRIANGLE_ADJ; -pub const D3D11_PRIMITIVE_UNDEFINED: ::D3D_PRIMITIVE = D3D_PRIMITIVE_UNDEFINED; -pub const D3D11_PRIMITIVE_POINT: ::D3D_PRIMITIVE = D3D_PRIMITIVE_POINT; -pub const D3D11_PRIMITIVE_LINE: ::D3D_PRIMITIVE = D3D_PRIMITIVE_LINE; -pub const D3D11_PRIMITIVE_TRIANGLE: ::D3D_PRIMITIVE = D3D_PRIMITIVE_TRIANGLE; -pub const D3D11_PRIMITIVE_LINE_ADJ: ::D3D_PRIMITIVE = D3D_PRIMITIVE_LINE_ADJ; -pub const D3D11_PRIMITIVE_TRIANGLE_ADJ: ::D3D_PRIMITIVE = D3D_PRIMITIVE_TRIANGLE_ADJ; -pub const D3D11_PRIMITIVE_1_CONTROL_POINT_PATCH: ::D3D_PRIMITIVE = - D3D_PRIMITIVE_1_CONTROL_POINT_PATCH; -pub const D3D11_PRIMITIVE_2_CONTROL_POINT_PATCH: ::D3D_PRIMITIVE = - D3D_PRIMITIVE_2_CONTROL_POINT_PATCH; -pub const D3D11_PRIMITIVE_3_CONTROL_POINT_PATCH: ::D3D_PRIMITIVE = - D3D_PRIMITIVE_3_CONTROL_POINT_PATCH; -pub const D3D11_PRIMITIVE_4_CONTROL_POINT_PATCH: ::D3D_PRIMITIVE = - D3D_PRIMITIVE_4_CONTROL_POINT_PATCH; -pub const D3D11_PRIMITIVE_5_CONTROL_POINT_PATCH: ::D3D_PRIMITIVE = - D3D_PRIMITIVE_5_CONTROL_POINT_PATCH; -pub const D3D11_PRIMITIVE_6_CONTROL_POINT_PATCH: ::D3D_PRIMITIVE = - D3D_PRIMITIVE_6_CONTROL_POINT_PATCH; -pub const D3D11_PRIMITIVE_7_CONTROL_POINT_PATCH: ::D3D_PRIMITIVE = - D3D_PRIMITIVE_7_CONTROL_POINT_PATCH; -pub const D3D11_PRIMITIVE_8_CONTROL_POINT_PATCH: ::D3D_PRIMITIVE = - D3D_PRIMITIVE_8_CONTROL_POINT_PATCH; -pub const D3D11_PRIMITIVE_9_CONTROL_POINT_PATCH: ::D3D_PRIMITIVE = - D3D_PRIMITIVE_9_CONTROL_POINT_PATCH; -pub const D3D11_PRIMITIVE_10_CONTROL_POINT_PATCH: ::D3D_PRIMITIVE = - D3D_PRIMITIVE_10_CONTROL_POINT_PATCH; -pub const D3D11_PRIMITIVE_11_CONTROL_POINT_PATCH: ::D3D_PRIMITIVE = - D3D_PRIMITIVE_11_CONTROL_POINT_PATCH; -pub const D3D11_PRIMITIVE_12_CONTROL_POINT_PATCH: ::D3D_PRIMITIVE = - D3D_PRIMITIVE_12_CONTROL_POINT_PATCH; -pub const D3D11_PRIMITIVE_13_CONTROL_POINT_PATCH: ::D3D_PRIMITIVE = - D3D_PRIMITIVE_13_CONTROL_POINT_PATCH; -pub const D3D11_PRIMITIVE_14_CONTROL_POINT_PATCH: ::D3D_PRIMITIVE = - D3D_PRIMITIVE_14_CONTROL_POINT_PATCH; -pub const D3D11_PRIMITIVE_15_CONTROL_POINT_PATCH: ::D3D_PRIMITIVE = - D3D_PRIMITIVE_15_CONTROL_POINT_PATCH; -pub const D3D11_PRIMITIVE_16_CONTROL_POINT_PATCH: ::D3D_PRIMITIVE = - D3D_PRIMITIVE_16_CONTROL_POINT_PATCH; -pub const D3D11_PRIMITIVE_17_CONTROL_POINT_PATCH: ::D3D_PRIMITIVE = - D3D_PRIMITIVE_17_CONTROL_POINT_PATCH; -pub const D3D11_PRIMITIVE_18_CONTROL_POINT_PATCH: ::D3D_PRIMITIVE = - D3D_PRIMITIVE_18_CONTROL_POINT_PATCH; -pub const D3D11_PRIMITIVE_19_CONTROL_POINT_PATCH: ::D3D_PRIMITIVE = - D3D_PRIMITIVE_19_CONTROL_POINT_PATCH; -pub const D3D11_PRIMITIVE_20_CONTROL_POINT_PATCH: ::D3D_PRIMITIVE = - D3D_PRIMITIVE_20_CONTROL_POINT_PATCH; -pub const D3D11_PRIMITIVE_21_CONTROL_POINT_PATCH: ::D3D_PRIMITIVE = - D3D_PRIMITIVE_21_CONTROL_POINT_PATCH; -pub const D3D11_PRIMITIVE_22_CONTROL_POINT_PATCH: ::D3D_PRIMITIVE = - D3D_PRIMITIVE_22_CONTROL_POINT_PATCH; -pub const D3D11_PRIMITIVE_23_CONTROL_POINT_PATCH: ::D3D_PRIMITIVE = - D3D_PRIMITIVE_23_CONTROL_POINT_PATCH; -pub const D3D11_PRIMITIVE_24_CONTROL_POINT_PATCH: ::D3D_PRIMITIVE = - D3D_PRIMITIVE_24_CONTROL_POINT_PATCH; -pub const D3D11_PRIMITIVE_25_CONTROL_POINT_PATCH: ::D3D_PRIMITIVE = - D3D_PRIMITIVE_25_CONTROL_POINT_PATCH; -pub const D3D11_PRIMITIVE_26_CONTROL_POINT_PATCH: ::D3D_PRIMITIVE = - D3D_PRIMITIVE_26_CONTROL_POINT_PATCH; -pub const D3D11_PRIMITIVE_27_CONTROL_POINT_PATCH: ::D3D_PRIMITIVE = - D3D_PRIMITIVE_27_CONTROL_POINT_PATCH; -pub const D3D11_PRIMITIVE_28_CONTROL_POINT_PATCH: ::D3D_PRIMITIVE = - D3D_PRIMITIVE_28_CONTROL_POINT_PATCH; -pub const D3D11_PRIMITIVE_29_CONTROL_POINT_PATCH: ::D3D_PRIMITIVE = - D3D_PRIMITIVE_29_CONTROL_POINT_PATCH; -pub const D3D11_PRIMITIVE_30_CONTROL_POINT_PATCH: ::D3D_PRIMITIVE = - D3D_PRIMITIVE_30_CONTROL_POINT_PATCH; -pub const D3D11_PRIMITIVE_31_CONTROL_POINT_PATCH: ::D3D_PRIMITIVE = - D3D_PRIMITIVE_31_CONTROL_POINT_PATCH; -pub const D3D11_PRIMITIVE_32_CONTROL_POINT_PATCH: ::D3D_PRIMITIVE = - D3D_PRIMITIVE_32_CONTROL_POINT_PATCH; -ENUM!{enum D3D_SRV_DIMENSION { - D3D_SRV_DIMENSION_UNKNOWN = 0, - D3D_SRV_DIMENSION_BUFFER = 1, - D3D_SRV_DIMENSION_TEXTURE1D = 2, - D3D_SRV_DIMENSION_TEXTURE1DARRAY = 3, - D3D_SRV_DIMENSION_TEXTURE2D = 4, - D3D_SRV_DIMENSION_TEXTURE2DARRAY = 5, - D3D_SRV_DIMENSION_TEXTURE2DMS = 6, - D3D_SRV_DIMENSION_TEXTURE2DMSARRAY = 7, - D3D_SRV_DIMENSION_TEXTURE3D = 8, - D3D_SRV_DIMENSION_TEXTURECUBE = 9, - D3D_SRV_DIMENSION_TEXTURECUBEARRAY = 10, - D3D_SRV_DIMENSION_BUFFEREX = 11, -}} -pub const D3D10_SRV_DIMENSION_UNKNOWN: ::D3D_SRV_DIMENSION = - D3D_SRV_DIMENSION_UNKNOWN; -pub const D3D10_SRV_DIMENSION_BUFFER: ::D3D_SRV_DIMENSION = - D3D_SRV_DIMENSION_BUFFER; -pub const D3D10_SRV_DIMENSION_TEXTURE1D: ::D3D_SRV_DIMENSION = - D3D_SRV_DIMENSION_TEXTURE1D; -pub const D3D10_SRV_DIMENSION_TEXTURE1DARRAY: ::D3D_SRV_DIMENSION = - D3D_SRV_DIMENSION_TEXTURE1DARRAY; -pub const D3D10_SRV_DIMENSION_TEXTURE2D: ::D3D_SRV_DIMENSION = - D3D_SRV_DIMENSION_TEXTURE2D; -pub const D3D10_SRV_DIMENSION_TEXTURE2DARRAY: ::D3D_SRV_DIMENSION = - D3D_SRV_DIMENSION_TEXTURE2DARRAY; -pub const D3D10_SRV_DIMENSION_TEXTURE2DMS: ::D3D_SRV_DIMENSION = - D3D_SRV_DIMENSION_TEXTURE2DMS; -pub const D3D10_SRV_DIMENSION_TEXTURE2DMSARRAY: ::D3D_SRV_DIMENSION = - D3D_SRV_DIMENSION_TEXTURE2DMSARRAY; -pub const D3D10_SRV_DIMENSION_TEXTURE3D: ::D3D_SRV_DIMENSION = - D3D_SRV_DIMENSION_TEXTURE3D; -pub const D3D10_SRV_DIMENSION_TEXTURECUBE: ::D3D_SRV_DIMENSION = - D3D_SRV_DIMENSION_TEXTURECUBE; -pub const D3D10_1_SRV_DIMENSION_UNKNOWN: ::D3D_SRV_DIMENSION = - D3D_SRV_DIMENSION_UNKNOWN; -pub const D3D10_1_SRV_DIMENSION_BUFFER: ::D3D_SRV_DIMENSION = - D3D_SRV_DIMENSION_BUFFER; -pub const D3D10_1_SRV_DIMENSION_TEXTURE1D: ::D3D_SRV_DIMENSION = - D3D_SRV_DIMENSION_TEXTURE1D; -pub const D3D10_1_SRV_DIMENSION_TEXTURE1DARRAY: ::D3D_SRV_DIMENSION = - D3D_SRV_DIMENSION_TEXTURE1DARRAY; -pub const D3D10_1_SRV_DIMENSION_TEXTURE2D: ::D3D_SRV_DIMENSION = - D3D_SRV_DIMENSION_TEXTURE2D; -pub const D3D10_1_SRV_DIMENSION_TEXTURE2DARRAY: ::D3D_SRV_DIMENSION = - D3D_SRV_DIMENSION_TEXTURE2DARRAY; -pub const D3D10_1_SRV_DIMENSION_TEXTURE2DMS: ::D3D_SRV_DIMENSION = - D3D_SRV_DIMENSION_TEXTURE2DMS; -pub const D3D10_1_SRV_DIMENSION_TEXTURE2DMSARRAY: ::D3D_SRV_DIMENSION = - D3D_SRV_DIMENSION_TEXTURE2DMSARRAY; -pub const D3D10_1_SRV_DIMENSION_TEXTURE3D: ::D3D_SRV_DIMENSION = - D3D_SRV_DIMENSION_TEXTURE3D; -pub const D3D10_1_SRV_DIMENSION_TEXTURECUBE: ::D3D_SRV_DIMENSION = - D3D_SRV_DIMENSION_TEXTURECUBE; -pub const D3D10_1_SRV_DIMENSION_TEXTURECUBEARRAY: ::D3D_SRV_DIMENSION = - D3D_SRV_DIMENSION_TEXTURECUBEARRAY; -pub const D3D11_SRV_DIMENSION_UNKNOWN: ::D3D_SRV_DIMENSION = - D3D_SRV_DIMENSION_UNKNOWN; -pub const D3D11_SRV_DIMENSION_BUFFER: ::D3D_SRV_DIMENSION = - D3D_SRV_DIMENSION_BUFFER; -pub const D3D11_SRV_DIMENSION_TEXTURE1D: ::D3D_SRV_DIMENSION = - D3D_SRV_DIMENSION_TEXTURE1D; -pub const D3D11_SRV_DIMENSION_TEXTURE1DARRAY: ::D3D_SRV_DIMENSION = - D3D_SRV_DIMENSION_TEXTURE1DARRAY; -pub const D3D11_SRV_DIMENSION_TEXTURE2D: ::D3D_SRV_DIMENSION = - D3D_SRV_DIMENSION_TEXTURE2D; -pub const D3D11_SRV_DIMENSION_TEXTURE2DARRAY: ::D3D_SRV_DIMENSION = - D3D_SRV_DIMENSION_TEXTURE2DARRAY; -pub const D3D11_SRV_DIMENSION_TEXTURE2DMS: ::D3D_SRV_DIMENSION = - D3D_SRV_DIMENSION_TEXTURE2DMS; -pub const D3D11_SRV_DIMENSION_TEXTURE2DMSARRAY: ::D3D_SRV_DIMENSION = - D3D_SRV_DIMENSION_TEXTURE2DMSARRAY; -pub const D3D11_SRV_DIMENSION_TEXTURE3D: ::D3D_SRV_DIMENSION = - D3D_SRV_DIMENSION_TEXTURE3D; -pub const D3D11_SRV_DIMENSION_TEXTURECUBE: ::D3D_SRV_DIMENSION = - D3D_SRV_DIMENSION_TEXTURECUBE; -pub const D3D11_SRV_DIMENSION_TEXTURECUBEARRAY: ::D3D_SRV_DIMENSION = - D3D_SRV_DIMENSION_TEXTURECUBEARRAY; -pub const D3D11_SRV_DIMENSION_BUFFEREX: ::D3D_SRV_DIMENSION = - D3D_SRV_DIMENSION_BUFFEREX; -STRUCT!{struct D3D_SHADER_MACRO { - Name: ::LPCSTR, - Definition: ::LPCSTR, -}} -pub type LPD3D_SHADER_MACRO = *mut D3D_SHADER_MACRO; -DEFINE_GUID!( - IID_ID3D10Blob, 0x8ba5fb08, 0x5195, 0x40e2, 0xac, 0x58, 0xd, 0x98, 0x9c, 0x3a, 0x1, 0x2 -); -RIDL!( -interface ID3D10Blob(ID3D10BlobVtbl): IUnknown(IUnknownVtbl) { - fn GetBufferPointer(&mut self) -> ::LPVOID, - fn GetBufferSize(&mut self) -> ::SIZE_T -} -); -pub type LPD3D10BLOB = *mut ID3D10Blob; -pub type ID3DBlob = ID3D10Blob; -pub type LPD3DBLOB = *mut ID3DBlob; -ENUM!{enum D3D_INCLUDE_TYPE { - D3D_INCLUDE_LOCAL = 0, - D3D_INCLUDE_SYSTEM, -}} -pub const D3D10_INCLUDE_LOCAL: ::D3D_INCLUDE_TYPE = D3D_INCLUDE_LOCAL; -pub const D3D10_INCLUDE_SYSTEM: ::D3D_INCLUDE_TYPE = D3D_INCLUDE_SYSTEM; -RIDL!( -interface ID3DInclude(ID3DIncludeVtbl) { - fn Open( - &mut self, IncludeType: D3D_INCLUDE_TYPE, pFileName: ::LPCSTR, pParentData: ::LPCVOID, - ppData: *mut ::LPCVOID, pBytes: *mut ::UINT - ) -> ::HRESULT, - fn Close(&mut self, pData: ::LPCVOID) -> ::HRESULT -} -); -pub type LPD3DINCLUDE = *mut ID3DInclude; -ENUM!{enum D3D_SHADER_VARIABLE_CLASS { - D3D_SVC_SCALAR = 0, - D3D_SVC_VECTOR, - D3D_SVC_MATRIX_ROWS, - D3D_SVC_MATRIX_COLUMNS, - D3D_SVC_OBJECT, - D3D_SVC_STRUCT, - D3D_SVC_INTERFACE_CLASS, - D3D_SVC_INTERFACE_POINTER, -}} -pub const D3D10_SVC_SCALAR: ::D3D_SHADER_VARIABLE_CLASS = D3D_SVC_SCALAR; -pub const D3D10_SVC_VECTOR: ::D3D_SHADER_VARIABLE_CLASS = D3D_SVC_VECTOR; -pub const D3D10_SVC_MATRIX_ROWS: ::D3D_SHADER_VARIABLE_CLASS = D3D_SVC_MATRIX_ROWS; -pub const D3D10_SVC_MATRIX_COLUMNS: ::D3D_SHADER_VARIABLE_CLASS = D3D_SVC_MATRIX_COLUMNS; -pub const D3D10_SVC_OBJECT: ::D3D_SHADER_VARIABLE_CLASS = D3D_SVC_OBJECT; -pub const D3D10_SVC_STRUCT: ::D3D_SHADER_VARIABLE_CLASS = D3D_SVC_STRUCT; -pub const D3D11_SVC_INTERFACE_CLASS: ::D3D_SHADER_VARIABLE_CLASS = D3D_SVC_INTERFACE_CLASS; -pub const D3D11_SVC_INTERFACE_POINTER: ::D3D_SHADER_VARIABLE_CLASS = D3D_SVC_INTERFACE_POINTER; -FLAGS!{enum D3D_SHADER_VARIABLE_FLAGS { - D3D_SVF_USERPACKED = 1, - D3D_SVF_USED = 2, - D3D_SVF_INTERFACE_POINTER = 4, - D3D_SVF_INTERFACE_PARAMETER = 8, -}} -pub const D3D10_SVF_USERPACKED: ::D3D_SHADER_VARIABLE_FLAGS = D3D_SVF_USERPACKED; -pub const D3D10_SVF_USED: ::D3D_SHADER_VARIABLE_FLAGS = D3D_SVF_USED; -pub const D3D11_SVF_INTERFACE_POINTER: ::D3D_SHADER_VARIABLE_FLAGS = D3D_SVF_INTERFACE_POINTER; -pub const D3D11_SVF_INTERFACE_PARAMETER: ::D3D_SHADER_VARIABLE_FLAGS = D3D_SVF_INTERFACE_PARAMETER; -ENUM!{enum D3D_SHADER_VARIABLE_TYPE { - D3D_SVT_VOID = 0, - D3D_SVT_BOOL = 1, - D3D_SVT_INT = 2, - D3D_SVT_FLOAT = 3, - D3D_SVT_STRING = 4, - D3D_SVT_TEXTURE = 5, - D3D_SVT_TEXTURE1D = 6, - D3D_SVT_TEXTURE2D = 7, - D3D_SVT_TEXTURE3D = 8, - D3D_SVT_TEXTURECUBE = 9, - D3D_SVT_SAMPLER = 10, - D3D_SVT_SAMPLER1D = 11, - D3D_SVT_SAMPLER2D = 12, - D3D_SVT_SAMPLER3D = 13, - D3D_SVT_SAMPLERCUBE = 14, - D3D_SVT_PIXELSHADER = 15, - D3D_SVT_VERTEXSHADER = 16, - D3D_SVT_PIXELFRAGMENT = 17, - D3D_SVT_VERTEXFRAGMENT = 18, - D3D_SVT_UINT = 19, - D3D_SVT_UINT8 = 20, - D3D_SVT_GEOMETRYSHADER = 21, - D3D_SVT_RASTERIZER = 22, - D3D_SVT_DEPTHSTENCIL = 23, - D3D_SVT_BLEND = 24, - D3D_SVT_BUFFER = 25, - D3D_SVT_CBUFFER = 26, - D3D_SVT_TBUFFER = 27, - D3D_SVT_TEXTURE1DARRAY = 28, - D3D_SVT_TEXTURE2DARRAY = 29, - D3D_SVT_RENDERTARGETVIEW = 30, - D3D_SVT_DEPTHSTENCILVIEW = 31, - D3D_SVT_TEXTURE2DMS = 32, - D3D_SVT_TEXTURE2DMSARRAY = 33, - D3D_SVT_TEXTURECUBEARRAY = 34, - D3D_SVT_HULLSHADER = 35, - D3D_SVT_DOMAINSHADER = 36, - D3D_SVT_INTERFACE_POINTER = 37, - D3D_SVT_COMPUTESHADER = 38, - D3D_SVT_DOUBLE = 39, - D3D_SVT_RWTEXTURE1D = 40, - D3D_SVT_RWTEXTURE1DARRAY = 41, - D3D_SVT_RWTEXTURE2D = 42, - D3D_SVT_RWTEXTURE2DARRAY = 43, - D3D_SVT_RWTEXTURE3D = 44, - D3D_SVT_RWBUFFER = 45, - D3D_SVT_BYTEADDRESS_BUFFER = 46, - D3D_SVT_RWBYTEADDRESS_BUFFER = 47, - D3D_SVT_STRUCTURED_BUFFER = 48, - D3D_SVT_RWSTRUCTURED_BUFFER = 49, - D3D_SVT_APPEND_STRUCTURED_BUFFER = 50, - D3D_SVT_CONSUME_STRUCTURED_BUFFER = 51, - D3D_SVT_MIN8FLOAT = 52, - D3D_SVT_MIN10FLOAT = 53, - D3D_SVT_MIN16FLOAT = 54, - D3D_SVT_MIN12INT = 55, - D3D_SVT_MIN16INT = 56, - D3D_SVT_MIN16UINT = 57, -}} -pub const D3D10_SVT_VOID: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_VOID; -pub const D3D10_SVT_BOOL: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_BOOL; -pub const D3D10_SVT_INT: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_INT; -pub const D3D10_SVT_FLOAT: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_FLOAT; -pub const D3D10_SVT_STRING: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_STRING; -pub const D3D10_SVT_TEXTURE: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_TEXTURE; -pub const D3D10_SVT_TEXTURE1D: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_TEXTURE1D; -pub const D3D10_SVT_TEXTURE2D: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_TEXTURE2D; -pub const D3D10_SVT_TEXTURE3D: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_TEXTURE3D; -pub const D3D10_SVT_TEXTURECUBE: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_TEXTURECUBE; -pub const D3D10_SVT_SAMPLER: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_SAMPLER; -pub const D3D10_SVT_SAMPLER1D: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_SAMPLER1D; -pub const D3D10_SVT_SAMPLER2D: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_SAMPLER2D; -pub const D3D10_SVT_SAMPLER3D: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_SAMPLER3D; -pub const D3D10_SVT_SAMPLERCUBE: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_SAMPLERCUBE; -pub const D3D10_SVT_PIXELSHADER: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_PIXELSHADER; -pub const D3D10_SVT_VERTEXSHADER: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_VERTEXSHADER; -pub const D3D10_SVT_PIXELFRAGMENT: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_PIXELFRAGMENT; -pub const D3D10_SVT_VERTEXFRAGMENT: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_VERTEXFRAGMENT; -pub const D3D10_SVT_UINT: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_UINT; -pub const D3D10_SVT_UINT8: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_UINT8; -pub const D3D10_SVT_GEOMETRYSHADER: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_GEOMETRYSHADER; -pub const D3D10_SVT_RASTERIZER: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_RASTERIZER; -pub const D3D10_SVT_DEPTHSTENCIL: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_DEPTHSTENCIL; -pub const D3D10_SVT_BLEND: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_BLEND; -pub const D3D10_SVT_BUFFER: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_BUFFER; -pub const D3D10_SVT_CBUFFER: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_CBUFFER; -pub const D3D10_SVT_TBUFFER: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_TBUFFER; -pub const D3D10_SVT_TEXTURE1DARRAY: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_TEXTURE1DARRAY; -pub const D3D10_SVT_TEXTURE2DARRAY: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_TEXTURE2DARRAY; -pub const D3D10_SVT_RENDERTARGETVIEW: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_RENDERTARGETVIEW; -pub const D3D10_SVT_DEPTHSTENCILVIEW: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_DEPTHSTENCILVIEW; -pub const D3D10_SVT_TEXTURE2DMS: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_TEXTURE2DMS; -pub const D3D10_SVT_TEXTURE2DMSARRAY: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_TEXTURE2DMSARRAY; -pub const D3D10_SVT_TEXTURECUBEARRAY: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_TEXTURECUBEARRAY; -pub const D3D11_SVT_HULLSHADER: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_HULLSHADER; -pub const D3D11_SVT_DOMAINSHADER: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_DOMAINSHADER; -pub const D3D11_SVT_INTERFACE_POINTER: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_INTERFACE_POINTER; -pub const D3D11_SVT_COMPUTESHADER: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_COMPUTESHADER; -pub const D3D11_SVT_DOUBLE: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_DOUBLE; -pub const D3D11_SVT_RWTEXTURE1D: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_RWTEXTURE1D; -pub const D3D11_SVT_RWTEXTURE1DARRAY: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_RWTEXTURE1DARRAY; -pub const D3D11_SVT_RWTEXTURE2D: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_RWTEXTURE2D; -pub const D3D11_SVT_RWTEXTURE2DARRAY: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_RWTEXTURE2DARRAY; -pub const D3D11_SVT_RWTEXTURE3D: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_RWTEXTURE3D; -pub const D3D11_SVT_RWBUFFER: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_RWBUFFER; -pub const D3D11_SVT_BYTEADDRESS_BUFFER: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_BYTEADDRESS_BUFFER; -pub const D3D11_SVT_RWBYTEADDRESS_BUFFER: ::D3D_SHADER_VARIABLE_TYPE = - D3D_SVT_RWBYTEADDRESS_BUFFER; -pub const D3D11_SVT_STRUCTURED_BUFFER: ::D3D_SHADER_VARIABLE_TYPE = - D3D_SVT_STRUCTURED_BUFFER; -pub const D3D11_SVT_RWSTRUCTURED_BUFFER: ::D3D_SHADER_VARIABLE_TYPE = - D3D_SVT_RWSTRUCTURED_BUFFER; -pub const D3D11_SVT_APPEND_STRUCTURED_BUFFER: ::D3D_SHADER_VARIABLE_TYPE = - D3D_SVT_APPEND_STRUCTURED_BUFFER; -pub const D3D11_SVT_CONSUME_STRUCTURED_BUFFER: ::D3D_SHADER_VARIABLE_TYPE = - D3D_SVT_CONSUME_STRUCTURED_BUFFER; -FLAGS!{enum D3D_SHADER_INPUT_FLAGS { - D3D_SIF_USERPACKED = 0x1, - D3D_SIF_COMPARISON_SAMPLER = 0x2, - D3D_SIF_TEXTURE_COMPONENT_0 = 0x4, - D3D_SIF_TEXTURE_COMPONENT_1 = 0x8, - D3D_SIF_TEXTURE_COMPONENTS = 0xc, - D3D_SIF_UNUSED = 0x10, -}} -pub const D3D10_SIF_USERPACKED: ::D3D_SHADER_INPUT_FLAGS = D3D_SIF_USERPACKED; -pub const D3D10_SIF_COMPARISON_SAMPLER: ::D3D_SHADER_INPUT_FLAGS = D3D_SIF_COMPARISON_SAMPLER; -pub const D3D10_SIF_TEXTURE_COMPONENT_0: ::D3D_SHADER_INPUT_FLAGS = D3D_SIF_TEXTURE_COMPONENT_0; -pub const D3D10_SIF_TEXTURE_COMPONENT_1: ::D3D_SHADER_INPUT_FLAGS = D3D_SIF_TEXTURE_COMPONENT_1; -pub const D3D10_SIF_TEXTURE_COMPONENTS: ::D3D_SHADER_INPUT_FLAGS = D3D_SIF_TEXTURE_COMPONENTS; -ENUM!{enum D3D_SHADER_INPUT_TYPE { - D3D_SIT_CBUFFER, - D3D_SIT_TBUFFER, - D3D_SIT_TEXTURE, - D3D_SIT_SAMPLER, - D3D_SIT_UAV_RWTYPED, - D3D_SIT_STRUCTURED, - D3D_SIT_UAV_RWSTRUCTURED, - D3D_SIT_BYTEADDRESS, - D3D_SIT_UAV_RWBYTEADDRESS, - D3D_SIT_UAV_APPEND_STRUCTURED, - D3D_SIT_UAV_CONSUME_STRUCTURED, - D3D_SIT_UAV_RWSTRUCTURED_WITH_COUNTER, -}} -pub const D3D10_SIT_CBUFFER: ::D3D_SHADER_INPUT_TYPE = D3D_SIT_CBUFFER; -pub const D3D10_SIT_TBUFFER: ::D3D_SHADER_INPUT_TYPE = D3D_SIT_TBUFFER; -pub const D3D10_SIT_TEXTURE: ::D3D_SHADER_INPUT_TYPE = D3D_SIT_TEXTURE; -pub const D3D10_SIT_SAMPLER: ::D3D_SHADER_INPUT_TYPE = D3D_SIT_SAMPLER; -pub const D3D11_SIT_UAV_RWTYPED: ::D3D_SHADER_INPUT_TYPE = D3D_SIT_UAV_RWTYPED; -pub const D3D11_SIT_STRUCTURED: ::D3D_SHADER_INPUT_TYPE = D3D_SIT_STRUCTURED; -pub const D3D11_SIT_UAV_RWSTRUCTURED: ::D3D_SHADER_INPUT_TYPE = D3D_SIT_UAV_RWSTRUCTURED; -pub const D3D11_SIT_BYTEADDRESS: ::D3D_SHADER_INPUT_TYPE = D3D_SIT_BYTEADDRESS; -pub const D3D11_SIT_UAV_RWBYTEADDRESS: ::D3D_SHADER_INPUT_TYPE = D3D_SIT_UAV_RWBYTEADDRESS; -pub const D3D11_SIT_UAV_APPEND_STRUCTURED: ::D3D_SHADER_INPUT_TYPE = D3D_SIT_UAV_APPEND_STRUCTURED; -pub const D3D11_SIT_UAV_CONSUME_STRUCTURED: ::D3D_SHADER_INPUT_TYPE = - D3D_SIT_UAV_CONSUME_STRUCTURED; -pub const D3D11_SIT_UAV_RWSTRUCTURED_WITH_COUNTER: ::D3D_SHADER_INPUT_TYPE = - D3D_SIT_UAV_RWSTRUCTURED_WITH_COUNTER; -FLAGS!{enum D3D_SHADER_CBUFFER_FLAGS { - D3D_CBF_USERPACKED = 1, -}} -pub const D3D10_CBF_USERPACKED: ::D3D_SHADER_CBUFFER_FLAGS = D3D_CBF_USERPACKED; -ENUM!{enum D3D_CBUFFER_TYPE { - D3D_CT_CBUFFER, - D3D_CT_TBUFFER, - D3D_CT_INTERFACE_POINTERS, - D3D_CT_RESOURCE_BIND_INFO, -}} -pub const D3D10_CT_CBUFFER: ::D3D_CBUFFER_TYPE = D3D_CT_CBUFFER; -pub const D3D10_CT_TBUFFER: ::D3D_CBUFFER_TYPE = D3D_CT_TBUFFER; -pub const D3D11_CT_CBUFFER: ::D3D_CBUFFER_TYPE = D3D_CT_CBUFFER; -pub const D3D11_CT_TBUFFER: ::D3D_CBUFFER_TYPE = D3D_CT_TBUFFER; -pub const D3D11_CT_INTERFACE_POINTERS: ::D3D_CBUFFER_TYPE = D3D_CT_INTERFACE_POINTERS; -pub const D3D11_CT_RESOURCE_BIND_INFO: ::D3D_CBUFFER_TYPE = D3D_CT_RESOURCE_BIND_INFO; -ENUM!{enum D3D_NAME { - D3D_NAME_UNDEFINED = 0, - D3D_NAME_POSITION = 1, - D3D_NAME_CLIP_DISTANCE = 2, - D3D_NAME_CULL_DISTANCE = 3, - D3D_NAME_RENDER_TARGET_ARRAY_INDEX = 4, - D3D_NAME_VIEWPORT_ARRAY_INDEX = 5, - D3D_NAME_VERTEX_ID = 6, - D3D_NAME_PRIMITIVE_ID = 7, - D3D_NAME_INSTANCE_ID = 8, - D3D_NAME_IS_FRONT_FACE = 9, - D3D_NAME_SAMPLE_INDEX = 10, - D3D_NAME_FINAL_QUAD_EDGE_TESSFACTOR = 11, - D3D_NAME_FINAL_QUAD_INSIDE_TESSFACTOR = 12, - D3D_NAME_FINAL_TRI_EDGE_TESSFACTOR = 13, - D3D_NAME_FINAL_TRI_INSIDE_TESSFACTOR = 14, - D3D_NAME_FINAL_LINE_DETAIL_TESSFACTOR = 15, - D3D_NAME_FINAL_LINE_DENSITY_TESSFACTOR = 16, - D3D_NAME_TARGET = 64, - D3D_NAME_DEPTH = 65, - D3D_NAME_COVERAGE = 66, - D3D_NAME_DEPTH_GREATER_EQUAL = 67, - D3D_NAME_DEPTH_LESS_EQUAL = 68, -}} -pub const D3D10_NAME_UNDEFINED: D3D_NAME = D3D_NAME_UNDEFINED; -pub const D3D10_NAME_POSITION: D3D_NAME = D3D_NAME_POSITION; -pub const D3D10_NAME_CLIP_DISTANCE: D3D_NAME = D3D_NAME_CLIP_DISTANCE; -pub const D3D10_NAME_CULL_DISTANCE: D3D_NAME = D3D_NAME_CULL_DISTANCE; -pub const D3D10_NAME_RENDER_TARGET_ARRAY_INDEX: D3D_NAME = D3D_NAME_RENDER_TARGET_ARRAY_INDEX; -pub const D3D10_NAME_VIEWPORT_ARRAY_INDEX: D3D_NAME = D3D_NAME_VIEWPORT_ARRAY_INDEX; -pub const D3D10_NAME_VERTEX_ID: D3D_NAME = D3D_NAME_VERTEX_ID; -pub const D3D10_NAME_PRIMITIVE_ID: D3D_NAME = D3D_NAME_PRIMITIVE_ID; -pub const D3D10_NAME_INSTANCE_ID: D3D_NAME = D3D_NAME_INSTANCE_ID; -pub const D3D10_NAME_IS_FRONT_FACE: D3D_NAME = D3D_NAME_IS_FRONT_FACE; -pub const D3D10_NAME_SAMPLE_INDEX: D3D_NAME = D3D_NAME_SAMPLE_INDEX; -pub const D3D10_NAME_TARGET: D3D_NAME = D3D_NAME_TARGET; -pub const D3D10_NAME_DEPTH: D3D_NAME = D3D_NAME_DEPTH; -pub const D3D10_NAME_COVERAGE: D3D_NAME = D3D_NAME_COVERAGE; -pub const D3D11_NAME_FINAL_QUAD_EDGE_TESSFACTOR: D3D_NAME = D3D_NAME_FINAL_QUAD_EDGE_TESSFACTOR; -pub const D3D11_NAME_FINAL_QUAD_INSIDE_TESSFACTOR: D3D_NAME = D3D_NAME_FINAL_QUAD_INSIDE_TESSFACTOR; -pub const D3D11_NAME_FINAL_TRI_EDGE_TESSFACTOR: D3D_NAME = D3D_NAME_FINAL_TRI_EDGE_TESSFACTOR; -pub const D3D11_NAME_FINAL_TRI_INSIDE_TESSFACTOR: D3D_NAME = D3D_NAME_FINAL_TRI_INSIDE_TESSFACTOR; -pub const D3D11_NAME_FINAL_LINE_DETAIL_TESSFACTOR: D3D_NAME = D3D_NAME_FINAL_LINE_DETAIL_TESSFACTOR; -pub const D3D11_NAME_FINAL_LINE_DENSITY_TESSFACTOR: D3D_NAME = D3D_NAME_FINAL_LINE_DENSITY_TESSFACTOR; -pub const D3D11_NAME_DEPTH_GREATER_EQUAL: D3D_NAME = D3D_NAME_DEPTH_GREATER_EQUAL; -pub const D3D11_NAME_DEPTH_LESS_EQUAL: D3D_NAME = D3D_NAME_DEPTH_LESS_EQUAL; -ENUM!{enum D3D_RESOURCE_RETURN_TYPE { - D3D_RETURN_TYPE_UNORM = 1, - D3D_RETURN_TYPE_SNORM = 2, - D3D_RETURN_TYPE_SINT = 3, - D3D_RETURN_TYPE_UINT = 4, - D3D_RETURN_TYPE_FLOAT = 5, - D3D_RETURN_TYPE_MIXED = 6, - D3D_RETURN_TYPE_DOUBLE = 7, - D3D_RETURN_TYPE_CONTINUED = 8, -}} -pub const D3D10_RETURN_TYPE_UNORM: ::D3D_RESOURCE_RETURN_TYPE = D3D_RETURN_TYPE_UNORM; -pub const D3D10_RETURN_TYPE_SNORM: ::D3D_RESOURCE_RETURN_TYPE = D3D_RETURN_TYPE_SNORM; -pub const D3D10_RETURN_TYPE_SINT: ::D3D_RESOURCE_RETURN_TYPE = D3D_RETURN_TYPE_SINT; -pub const D3D10_RETURN_TYPE_UINT: ::D3D_RESOURCE_RETURN_TYPE = D3D_RETURN_TYPE_UINT; -pub const D3D10_RETURN_TYPE_FLOAT: ::D3D_RESOURCE_RETURN_TYPE = D3D_RETURN_TYPE_FLOAT; -pub const D3D10_RETURN_TYPE_MIXED: ::D3D_RESOURCE_RETURN_TYPE = D3D_RETURN_TYPE_MIXED; -pub const D3D11_RETURN_TYPE_UNORM: ::D3D_RESOURCE_RETURN_TYPE = D3D_RETURN_TYPE_UNORM; -pub const D3D11_RETURN_TYPE_SNORM: ::D3D_RESOURCE_RETURN_TYPE = D3D_RETURN_TYPE_SNORM; -pub const D3D11_RETURN_TYPE_SINT: ::D3D_RESOURCE_RETURN_TYPE = D3D_RETURN_TYPE_SINT; -pub const D3D11_RETURN_TYPE_UINT: ::D3D_RESOURCE_RETURN_TYPE = D3D_RETURN_TYPE_UINT; -pub const D3D11_RETURN_TYPE_FLOAT: ::D3D_RESOURCE_RETURN_TYPE = D3D_RETURN_TYPE_FLOAT; -pub const D3D11_RETURN_TYPE_MIXED: ::D3D_RESOURCE_RETURN_TYPE = D3D_RETURN_TYPE_MIXED; -pub const D3D11_RETURN_TYPE_DOUBLE: ::D3D_RESOURCE_RETURN_TYPE = D3D_RETURN_TYPE_DOUBLE; -pub const D3D11_RETURN_TYPE_CONTINUED: ::D3D_RESOURCE_RETURN_TYPE = D3D_RETURN_TYPE_CONTINUED; -ENUM!{enum D3D_REGISTER_COMPONENT_TYPE { - D3D_REGISTER_COMPONENT_UNKNOWN = 0, - D3D_REGISTER_COMPONENT_UINT32 = 1, - D3D_REGISTER_COMPONENT_SINT32 = 2, - D3D_REGISTER_COMPONENT_FLOAT32 = 3, -}} -pub const D3D10_REGISTER_COMPONENT_UNKNOWN: ::D3D_REGISTER_COMPONENT_TYPE = - D3D_REGISTER_COMPONENT_UNKNOWN; -pub const D3D10_REGISTER_COMPONENT_UINT32: ::D3D_REGISTER_COMPONENT_TYPE = - D3D_REGISTER_COMPONENT_UINT32; -pub const D3D10_REGISTER_COMPONENT_SINT32: ::D3D_REGISTER_COMPONENT_TYPE = - D3D_REGISTER_COMPONENT_SINT32; -pub const D3D10_REGISTER_COMPONENT_FLOAT32: ::D3D_REGISTER_COMPONENT_TYPE = - D3D_REGISTER_COMPONENT_FLOAT32; -ENUM!{enum D3D_TESSELLATOR_DOMAIN { - D3D_TESSELLATOR_DOMAIN_UNDEFINED, - D3D_TESSELLATOR_DOMAIN_ISOLINE, - D3D_TESSELLATOR_DOMAIN_TRI, - D3D_TESSELLATOR_DOMAIN_QUAD, -}} -pub const D3D11_TESSELLATOR_DOMAIN_UNDEFINED: ::D3D_TESSELLATOR_DOMAIN = - D3D_TESSELLATOR_DOMAIN_UNDEFINED; -pub const D3D11_TESSELLATOR_DOMAIN_ISOLINE: ::D3D_TESSELLATOR_DOMAIN = - D3D_TESSELLATOR_DOMAIN_ISOLINE; -pub const D3D11_TESSELLATOR_DOMAIN_TRI: ::D3D_TESSELLATOR_DOMAIN = D3D_TESSELLATOR_DOMAIN_TRI; -pub const D3D11_TESSELLATOR_DOMAIN_QUAD: ::D3D_TESSELLATOR_DOMAIN = D3D_TESSELLATOR_DOMAIN_QUAD; -ENUM!{enum D3D_TESSELLATOR_PARTITIONING { - D3D_TESSELLATOR_PARTITIONING_UNDEFINED, - D3D_TESSELLATOR_PARTITIONING_INTEGER, - D3D_TESSELLATOR_PARTITIONING_POW2, - D3D_TESSELLATOR_PARTITIONING_FRACTIONAL_ODD, - D3D_TESSELLATOR_PARTITIONING_FRACTIONAL_EVEN, -}} -pub const D3D11_TESSELLATOR_PARTITIONING_UNDEFINED: ::D3D_TESSELLATOR_PARTITIONING = - D3D_TESSELLATOR_PARTITIONING_UNDEFINED; -pub const D3D11_TESSELLATOR_PARTITIONING_INTEGER: ::D3D_TESSELLATOR_PARTITIONING = - D3D_TESSELLATOR_PARTITIONING_INTEGER; -pub const D3D11_TESSELLATOR_PARTITIONING_POW2: ::D3D_TESSELLATOR_PARTITIONING = - D3D_TESSELLATOR_PARTITIONING_POW2; -pub const D3D11_TESSELLATOR_PARTITIONING_FRACTIONAL_ODD: ::D3D_TESSELLATOR_PARTITIONING = - D3D_TESSELLATOR_PARTITIONING_FRACTIONAL_ODD; -pub const D3D11_TESSELLATOR_PARTITIONING_FRACTIONAL_EVEN: ::D3D_TESSELLATOR_PARTITIONING = - D3D_TESSELLATOR_PARTITIONING_FRACTIONAL_EVEN; -ENUM!{enum D3D_TESSELLATOR_OUTPUT_PRIMITIVE { - D3D_TESSELLATOR_OUTPUT_UNDEFINED, - D3D_TESSELLATOR_OUTPUT_POINT, - D3D_TESSELLATOR_OUTPUT_LINE, - D3D_TESSELLATOR_OUTPUT_TRIANGLE_CW, - D3D_TESSELLATOR_OUTPUT_TRIANGLE_CCW, -}} -pub const D3D11_TESSELLATOR_OUTPUT_UNDEFINED: ::D3D_TESSELLATOR_OUTPUT_PRIMITIVE = - D3D_TESSELLATOR_OUTPUT_UNDEFINED; -pub const D3D11_TESSELLATOR_OUTPUT_POINT: ::D3D_TESSELLATOR_OUTPUT_PRIMITIVE = - D3D_TESSELLATOR_OUTPUT_POINT; -pub const D3D11_TESSELLATOR_OUTPUT_LINE: ::D3D_TESSELLATOR_OUTPUT_PRIMITIVE = - D3D_TESSELLATOR_OUTPUT_LINE; -pub const D3D11_TESSELLATOR_OUTPUT_TRIANGLE_CW: ::D3D_TESSELLATOR_OUTPUT_PRIMITIVE = - D3D_TESSELLATOR_OUTPUT_TRIANGLE_CW; -pub const D3D11_TESSELLATOR_OUTPUT_TRIANGLE_CCW: ::D3D_TESSELLATOR_OUTPUT_PRIMITIVE = - D3D_TESSELLATOR_OUTPUT_TRIANGLE_CCW; -ENUM!{enum D3D_MIN_PRECISION { - D3D_MIN_PRECISION_DEFAULT, - D3D_MIN_PRECISION_FLOAT_16, - D3D_MIN_PRECISION_FLOAT_2_8, - D3D_MIN_PRECISION_RESERVED, - D3D_MIN_PRECISION_SINT_16, - D3D_MIN_PRECISION_UINT_16, - D3D_MIN_PRECISION_ANY_16 = 0xf0, - D3D_MIN_PRECISION_ANY_10 = 0xf1, -}} -ENUM!{enum D3D_INTERPOLATION_MODE { - D3D_INTERPOLATION_UNDEFINED, - D3D_INTERPOLATION_CONSTANT, - D3D_INTERPOLATION_LINEAR, - D3D_INTERPOLATION_LINEAR_CENTROID, - D3D_INTERPOLATION_LINEAR_NOPERSPECTIVE, - D3D_INTERPOLATION_LINEAR_NOPERSPECTIVE_CENTROID, - D3D_INTERPOLATION_LINEAR_SAMPLE, - D3D_INTERPOLATION_LINEAR_NOPERSPECTIVE_SAMPLE, -}} -DEFINE_GUID!( - WKPDID_D3DDebugObjectName, - 0x429b8c22, 0x9188, 0x4b0c, 0x87, 0x42, 0xac, 0xb0, 0xbf, 0x85, 0xc2, 0x00 -); diff --git a/deps/winapi-0.2.5/src/dbghelp.rs b/deps/winapi-0.2.5/src/dbghelp.rs deleted file mode 100644 index bd02a2fc3..000000000 --- a/deps/winapi-0.2.5/src/dbghelp.rs +++ /dev/null @@ -1,326 +0,0 @@ -// Copyright © 2015, Peter Atashian -// Licensed under the MIT License <LICENSE.md> -//! DbgHelp include file -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct LOADED_IMAGE { - pub ModuleName: ::PSTR, - pub hFile: ::HANDLE, - pub MappedAddress: ::PUCHAR, - #[cfg(target_arch = "x86_64")] - pub FileHeader: ::PIMAGE_NT_HEADERS64, - #[cfg(not(target_arch = "x86_64"))] - pub FileHeader: ::PIMAGE_NT_HEADERS32, - pub LastRvaSection: ::PIMAGE_SECTION_HEADER, - pub NumberOfSections: ::ULONG, - pub Sections: ::PIMAGE_SECTION_HEADER, - pub Characteristics: ::ULONG, - pub fSystemImage: ::BOOLEAN, - pub fDOSImage: ::BOOLEAN, - pub fReadOnly: ::BOOLEAN, - pub Version: ::UCHAR, - pub Links: ::LIST_ENTRY, - pub SizeOfImage: ::ULONG, -} -pub const MAX_SYM_NAME: usize = 2000; -pub const ERROR_IMAGE_NOT_STRIPPED: ::DWORD = 0x8800; -pub const ERROR_NO_DBG_POINTER: ::DWORD = 0x8801; -pub const ERROR_NO_PDB_POINTER: ::DWORD = 0x8802; -pub type PFIND_DEBUG_FILE_CALLBACK = Option<unsafe extern "system" fn( - FileHandle: ::HANDLE, FileName: ::PCSTR, CallerData: ::PVOID, -) -> ::BOOL>; -pub type PFIND_DEBUG_FILE_CALLBACKW = Option<unsafe extern "system" fn( - FileHandle: ::HANDLE, FileName: ::PCWSTR, CallerData: ::PVOID, -) -> ::BOOL>; -pub type PFINDFILEINPATHCALLBACK = Option<unsafe extern "system" fn( - filename: ::PCSTR, context: ::PVOID, -) -> ::BOOL>; -pub type PFINDFILEINPATHCALLBACKW = Option<unsafe extern "system" fn( - filename: ::PCWSTR, context: ::PVOID, -) -> ::BOOL>; -pub type PFIND_EXE_FILE_CALLBACK = Option<unsafe extern "system" fn( - FileHandle: ::HANDLE, FileName: ::PCSTR, CallerData: ::PVOID, -) -> ::BOOL>; -pub type PFIND_EXE_FILE_CALLBACKW = Option<unsafe extern "system" fn( - FileHandle: ::HANDLE, FileName: ::PCWSTR, CallerData: ::PVOID, -) -> ::BOOL>; -#[repr(C)] #[derive(Clone, Copy, Debug)] #[cfg(target_arch = "x86")] -pub struct IMAGE_DEBUG_INFORMATION { - pub List: ::LIST_ENTRY, - pub ReservedSize: ::DWORD, - pub ReservedMappedBase: ::PVOID, - pub ReservedMachine: ::USHORT, - pub ReservedCharacteristics: ::USHORT, - pub ReservedCheckSum: ::DWORD, - pub ImageBase: ::DWORD, - pub SizeOfImage: ::DWORD, - pub ReservedNumberOfSections: ::DWORD, - pub ReservedSections: ::PIMAGE_SECTION_HEADER, - pub ReservedExportedNamesSize: ::DWORD, - pub ReservedExportedNames: ::PSTR, - pub ReservedNumberOfFunctionTableEntries: ::DWORD, - pub ReservedFunctionTableEntries: ::PIMAGE_FUNCTION_ENTRY, - pub ReservedLowestFunctionStartingAddress: ::DWORD, - pub ReservedHighestFunctionEndingAddress: ::DWORD, - pub ReservedNumberOfFpoTableEntries: ::DWORD, - pub ReservedFpoTableEntries: ::PFPO_DATA, - pub SizeOfCoffSymbols: ::DWORD, - pub CoffSymbols: ::PIMAGE_COFF_SYMBOLS_HEADER, - pub ReservedSizeOfCodeViewSymbols: ::DWORD, - pub ReservedCodeViewSymbols: ::PVOID, - pub ImageFilePath: ::PSTR, - pub ImageFileName: ::PSTR, - pub ReservedDebugFilePath: ::PSTR, - pub ReservedTimeDateStamp: ::DWORD, - pub ReservedRomImage: ::BOOL, - pub ReservedDebugDirectory: ::PIMAGE_DEBUG_DIRECTORY, - pub ReservedNumberOfDebugDirectories: ::DWORD, - pub ReservedOriginalFunctionTableBaseAddress: ::DWORD, - pub Reserved: [::DWORD; 2], -} -#[cfg(target_arch = "x86")] -pub type PIMAGE_DEBUG_INFORMATION = *mut IMAGE_DEBUG_INFORMATION; -pub type PENUMDIRTREE_CALLBACK = Option<unsafe extern "system" fn( - FilePath: ::PCSTR, CallerData: ::PVOID, -) -> ::BOOL>; -pub type PENUMDIRTREE_CALLBACKW = Option<unsafe extern "system" fn( - FilePath: ::PCWSTR, CallerData: ::PVOID, -) -> ::BOOL>; -pub const UNDNAME_COMPLETE: ::DWORD = 0x0000; -pub const UNDNAME_NO_LEADING_UNDERSCORES: ::DWORD = 0x0001; -pub const UNDNAME_NO_MS_KEYWORDS: ::DWORD = 0x0002; -pub const UNDNAME_NO_FUNCTION_RETURNS: ::DWORD = 0x0004; -pub const UNDNAME_NO_ALLOCATION_MODEL: ::DWORD = 0x0008; -pub const UNDNAME_NO_ALLOCATION_LANGUAGE: ::DWORD = 0x0010; -pub const UNDNAME_NO_MS_THISTYPE: ::DWORD = 0x0020; -pub const UNDNAME_NO_CV_THISTYPE: ::DWORD = 0x0040; -pub const UNDNAME_NO_THISTYPE: ::DWORD = 0x0060; -pub const UNDNAME_NO_ACCESS_SPECIFIERS: ::DWORD = 0x0080; -pub const UNDNAME_NO_THROW_SIGNATURES: ::DWORD = 0x0100; -pub const UNDNAME_NO_MEMBER_TYPE: ::DWORD = 0x0200; -pub const UNDNAME_NO_RETURN_UDT_MODEL: ::DWORD = 0x0400; -pub const UNDNAME_32_BIT_DECODE: ::DWORD = 0x0800; -pub const UNDNAME_NAME_ONLY: ::DWORD = 0x1000; -pub const UNDNAME_NO_ARGUMENTS: ::DWORD = 0x2000; -pub const UNDNAME_NO_SPECIAL_SYMS: ::DWORD = 0x4000; -pub const DBHHEADER_DEBUGDIRS: ::DWORD = 0x1; -pub const DBHHEADER_CVMISC: ::DWORD = 0x2; -pub const DBHHEADER_PDBGUID: ::DWORD = 0x3; -STRUCT!{struct MODLOAD_DATA { - ssize: ::DWORD, - ssig: ::DWORD, - data: ::PVOID, - size: ::DWORD, - flags: ::DWORD, -}} -pub type PMODLOAD_DATA = *mut MODLOAD_DATA; -STRUCT!{struct MODLOAD_CVMISC { - oCV: ::DWORD, - cCV: ::size_t, - oMisc: ::DWORD, - cMisc: ::size_t, - dtImage: ::DWORD, - cImage: ::DWORD, -}} -pub type PMODLOAD_CVMISC = *mut MODLOAD_CVMISC; -STRUCT!{struct MODLOAD_PDBGUID_PDBAGE { - PdbGuid: ::GUID, - PdbAge: ::DWORD, -}} -pub type PMODLOAD_PDBGUID_PDBAGE = *mut MODLOAD_PDBGUID_PDBAGE; -ENUM!{enum ADDRESS_MODE { - AddrMode1616, - AddrMode1632, - AddrModeReal, - AddrModeFlat, -}} -STRUCT!{struct ADDRESS64 { - Offset: ::DWORD64, - Segment: ::WORD, - Mode: ::ADDRESS_MODE, -}} -pub type LPADDRESS64 = *mut ADDRESS64; -#[cfg(target_arch = "x86_64")] -pub type ADDRESS = ADDRESS64; -#[cfg(target_arch = "x86_64")] -pub type LPADDRESS = LPADDRESS64; -#[repr(C)] #[derive(Clone, Copy, Debug)] #[cfg(target_arch = "x86")] -pub struct ADDRESS { - pub Offset: ::DWORD, - pub Segment: ::WORD, - pub Mode: ::ADDRESS_MODE, -} -#[cfg(target_arch = "x86")] -pub type LPADDRESS = *mut ADDRESS; -STRUCT!{struct KDHELP64 { - Thread: ::DWORD64, - ThCallbackStack: ::DWORD, - ThCallbackBStore: ::DWORD, - NextCallback: ::DWORD, - FramePointer: ::DWORD, - KiCallUserMode: ::DWORD64, - KeUserCallbackDispatcher: ::DWORD64, - SystemRangeStart: ::DWORD64, - KiUserExceptionDispatcher: ::DWORD64, - StackBase: ::DWORD64, - StackLimit: ::DWORD64, - BuildVersion: ::DWORD, - Reserved0: ::DWORD, - Reserved1: [::DWORD64; 4], -}} -pub type PKDHELP64 = *mut KDHELP64; -#[cfg(target_arch = "x86_64")] -pub type KDHELP = KDHELP64; -#[cfg(target_arch = "x86_64")] -pub type PKDHELP = PKDHELP64; -#[repr(C)] #[derive(Clone, Copy, Debug)] #[cfg(target_arch = "x86")] -pub struct KDHELP { - pub Thread: ::DWORD, - pub ThCallbackStack: ::DWORD, - pub NextCallback: ::DWORD, - pub FramePointer: ::DWORD, - pub KiCallUserMode: ::DWORD, - pub KeUserCallbackDispatcher: ::DWORD, - pub SystemRangeStart: ::DWORD, - pub ThCallbackBStore: ::DWORD, - pub KiUserExceptionDispatcher: ::DWORD, - pub StackBase: ::DWORD, - pub StackLimit: ::DWORD, - pub Reserved: [::DWORD; 5], -} -#[cfg(target_arch = "x86")] -pub type PKDHELP = *mut KDHELP; -STRUCT!{struct STACKFRAME64 { - AddrPC: ::ADDRESS64, - AddrReturn: ::ADDRESS64, - AddrFrame: ::ADDRESS64, - AddrStack: ::ADDRESS64, - AddrBStore: ::ADDRESS64, - FuncTableEntry: ::PVOID, - Params: [::DWORD64; 4], - Far: ::BOOL, - Virtual: ::BOOL, - Reserved: [::DWORD64; 3], - KdHelp: ::KDHELP64, -}} -pub type LPSTACKFRAME64 = *mut STACKFRAME64; -pub const INLINE_FRAME_CONTEXT_INIT: ::DWORD = 0; -pub const INLINE_FRAME_CONTEXT_IGNORE: ::DWORD = 0xFFFFFFFF; -STRUCT!{struct STACKFRAME_EX { - AddrPC: ::ADDRESS64, - AddrReturn: ::ADDRESS64, - AddrFrame: ::ADDRESS64, - AddrStack: ::ADDRESS64, - AddrBStore: ::ADDRESS64, - FuncTableEntry: ::PVOID, - Params: [::DWORD64; 4], - Far: ::BOOL, - Virtual: ::BOOL, - Reserved: [::DWORD64; 3], - KdHelp: ::KDHELP64, - StackFrameSize: ::DWORD, - InlineFrameContext: ::DWORD, -}} -pub type LPSTACKFRAME_EX = *mut STACKFRAME_EX; -#[cfg(target_arch = "x86_64")] -pub type STACKFRAME = STACKFRAME64; -#[cfg(target_arch = "x86_64")] -pub type LPSTACKFRAME = LPSTACKFRAME64; -#[repr(C)] #[derive(Clone, Copy, Debug)] #[cfg(target_arch = "x86")] -pub struct STACKFRAME { - pub AddrPC: ::ADDRESS, - pub AddrReturn: ::ADDRESS, - pub AddrFrame: ::ADDRESS, - pub AddrStack: ::ADDRESS, - pub FuncTableEntry: ::PVOID, - pub Params: [::DWORD; 4], - pub Far: ::BOOL, - pub Virtual: ::BOOL, - pub Reserved: [::DWORD; 3], - pub KdHelp: ::KDHELP, - pub AddrBStore: ::ADDRESS, -} -#[cfg(target_arch = "x86")] -pub type LPSTACKFRAME = *mut STACKFRAME; -pub type PREAD_PROCESS_MEMORY_ROUTINE64 = Option<unsafe extern "system" fn( - hProcess: ::HANDLE, qwBaseAddress: ::DWORD64, lpBuffer: ::PVOID, nSize: ::DWORD, - lpNumberOfBytesRead: ::LPDWORD, -) -> ::BOOL>; -pub type PFUNCTION_TABLE_ACCESS_ROUTINE64 = Option<unsafe extern "system" fn( - ahProcess: ::HANDLE, AddrBase: ::DWORD64, -) -> ::PVOID>; -pub type PGET_MODULE_BASE_ROUTINE64 = Option<unsafe extern "system" fn( - hProcess: ::HANDLE, Address: ::DWORD64, -) -> ::DWORD64>; -pub type PTRANSLATE_ADDRESS_ROUTINE64 = Option<unsafe extern "system" fn( - hProcess: ::HANDLE, hThread: ::HANDLE, lpaddr: LPADDRESS64, -) -> ::DWORD64>; -pub const SYM_STKWALK_DEFAULT: ::DWORD = 0x00000000; -pub const SYM_STKWALK_FORCE_FRAMEPTR: ::DWORD = 0x00000001; -#[cfg(target_arch = "x86_64")] -pub type PREAD_PROCESS_MEMORY_ROUTINE = PREAD_PROCESS_MEMORY_ROUTINE64; -#[cfg(target_arch = "x86_64")] -pub type PFUNCTION_TABLE_ACCESS_ROUTINE = PFUNCTION_TABLE_ACCESS_ROUTINE64; -#[cfg(target_arch = "x86_64")] -pub type PGET_MODULE_BASE_ROUTINE = PGET_MODULE_BASE_ROUTINE64; -#[cfg(target_arch = "x86_64")] -pub type PTRANSLATE_ADDRESS_ROUTINE = PTRANSLATE_ADDRESS_ROUTINE64; -#[cfg(target_arch = "x86")] -pub type PREAD_PROCESS_MEMORY_ROUTINE = Option<unsafe extern "system" fn( - hProcess: ::HANDLE, qwBaseAddress: ::DWORD, lpBuffer: ::PVOID, nSize: ::DWORD, - lpNumberOfBytesRead: ::PDWORD, -) -> ::BOOL>; -#[cfg(target_arch = "x86")] -pub type PFUNCTION_TABLE_ACCESS_ROUTINE = Option<unsafe extern "system" fn( - ahProcess: ::HANDLE, AddrBase: ::DWORD, -) -> ::PVOID>; -#[cfg(target_arch = "x86")] -pub type PGET_MODULE_BASE_ROUTINE = Option<unsafe extern "system" fn( - hProcess: ::HANDLE, Address: ::DWORD, -) -> ::DWORD>; -#[cfg(target_arch = "x86")] -pub type PTRANSLATE_ADDRESS_ROUTINE = Option<unsafe extern "system" fn( - hProcess: ::HANDLE, hThread: ::HANDLE, lpaddr: LPADDRESS, -) -> ::DWORD>; -pub const API_VERSION_NUMBER: ::USHORT = 12; -STRUCT!{struct API_VERSION { - MajorVersion: ::USHORT, - MinorVersion: ::USHORT, - Revision: ::USHORT, - Reserved: ::USHORT, -}} -pub type LPAPI_VERSION = *mut API_VERSION; -STRUCT!{struct SYMBOL_INFOW { - SizeOfStruct: ::ULONG, - TypeIndex: ::ULONG, - Reserved: [::ULONG64; 2], - Index: ::ULONG, - Size: ::ULONG, - ModBase: ::ULONG64, - Flags: ::ULONG, - Value: ::ULONG64, - Address: ::ULONG64, - Register: ::ULONG, - Scope: ::ULONG, - Tag: ::ULONG, - NameLen: ::ULONG, - MaxNameLen: ::ULONG, - Name: [::WCHAR; 1], -}} -pub type PSYMBOL_INFOW = *mut SYMBOL_INFOW; -STRUCT!{struct IMAGEHLP_SYMBOL64 { - SizeOfStruct: ::DWORD, - Address: ::DWORD64, - Size: ::DWORD, - Flags: ::DWORD, - MaxNameLength: ::DWORD, - Name: [::CHAR; 1], -}} -pub type PIMAGEHLP_SYMBOL64 = *mut IMAGEHLP_SYMBOL64; -STRUCT!{struct IMAGEHLP_LINEW64 { - SizeOfStruct: ::DWORD, - Key: ::PVOID, - LineNumber: ::DWORD, - FileName: ::PWSTR, - Address: ::DWORD64, -}} -pub type PIMAGEHLP_LINEW64 = *mut IMAGEHLP_LINEW64; diff --git a/deps/winapi-0.2.5/src/dcommon.rs b/deps/winapi-0.2.5/src/dcommon.rs deleted file mode 100644 index 9a8115e77..000000000 --- a/deps/winapi-0.2.5/src/dcommon.rs +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright © 2015; Connor Hilarides -// Licensed under the MIT License <LICENSE.md> -//! Mappings for the contents of dcommon.h -ENUM!{enum DWRITE_MEASURING_MODE { - DWRITE_MEASURING_MODE_NATURAL = 0, - DWRITE_MEASURING_MODE_GDI_CLASSIC = 1, - DWRITE_MEASURING_MODE_GDI_NATURAL = 2, -}} -ENUM!{enum D2D1_ALPHA_MODE { - D2D1_ALPHA_MODE_UNKNOWN = 0, - D2D1_ALPHA_MODE_PREMULTIPLIED = 1, - D2D1_ALPHA_MODE_STRAIGHT = 2, - D2D1_ALPHA_MODE_IGNORE = 3, -}} -STRUCT!{struct D2D1_PIXEL_FORMAT { - format: ::DWORD, - alphaMode: D2D1_ALPHA_MODE, -}} diff --git a/deps/winapi-0.2.5/src/dwrite.rs b/deps/winapi-0.2.5/src/dwrite.rs deleted file mode 100644 index 9b1e6986b..000000000 --- a/deps/winapi-0.2.5/src/dwrite.rs +++ /dev/null @@ -1,1038 +0,0 @@ -// Copyright © 2015, Connor Hilarides -// Licensed under the MIT License <LICENSE.md> -//! DirectX Typography Services public API definitions. -ENUM!{enum DWRITE_FONT_FILE_TYPE { - DWRITE_FONT_FILE_TYPE_UNKNOWN, - DWRITE_FONT_FILE_TYPE_CFF, - DWRITE_FONT_FILE_TYPE_TRUETYPE, - DWRITE_FONT_FILE_TYPE_TRUETYPE_COLLECTION, - DWRITE_FONT_FILE_TYPE_TYPE1_PFM, - DWRITE_FONT_FILE_TYPE_TYPE1_PFB, - DWRITE_FONT_FILE_TYPE_VECTOR, - DWRITE_FONT_FILE_TYPE_BITMAP, -}} -ENUM!{enum DWRITE_FONT_FACE_TYPE { - DWRITE_FONT_FACE_TYPE_CFF, - DWRITE_FONT_FACE_TYPE_TRUETYPE, - DWRITE_FONT_FACE_TYPE_TRUETYPE_COLLECTION, - DWRITE_FONT_FACE_TYPE_TYPE1, - DWRITE_FONT_FACE_TYPE_VECTOR, - DWRITE_FONT_FACE_TYPE_BITMAP, - DWRITE_FONT_FACE_TYPE_UNKNOWN, - DWRITE_FONT_FACE_TYPE_RAW_CFF, -}} -FLAGS!{enum DWRITE_FONT_SIMULATIONS { - DWRITE_FONT_SIMULATIONS_NONE = 0x0000, - DWRITE_FONT_SIMULATIONS_BOLD = 0x0001, - DWRITE_FONT_SIMULATIONS_OBLIQUE = 0x0002, -}} -ENUM!{enum DWRITE_FONT_WEIGHT { - DWRITE_FONT_WEIGHT_THIN = 100, - DWRITE_FONT_WEIGHT_EXTRA_LIGHT = 200, - DWRITE_FONT_WEIGHT_ULTRA_LIGHT = 200, - DWRITE_FONT_WEIGHT_LIGHT = 300, - DWRITE_FONT_WEIGHT_SEMI_LIGHT = 350, - DWRITE_FONT_WEIGHT_NORMAL = 400, - DWRITE_FONT_WEIGHT_REGULAR = 400, - DWRITE_FONT_WEIGHT_MEDIUM = 500, - DWRITE_FONT_WEIGHT_DEMI_BOLD = 600, - DWRITE_FONT_WEIGHT_SEMI_BOLD = 600, - DWRITE_FONT_WEIGHT_BOLD = 700, - DWRITE_FONT_WEIGHT_EXTRA_BOLD = 800, - DWRITE_FONT_WEIGHT_ULTRA_BOLD = 800, - DWRITE_FONT_WEIGHT_BLACK = 900, - DWRITE_FONT_WEIGHT_HEAVY = 900, - DWRITE_FONT_WEIGHT_EXTRA_BLACK = 950, - DWRITE_FONT_WEIGHT_ULTRA_BLACK = 950, -}} -ENUM!{enum DWRITE_FONT_STRETCH { - DWRITE_FONT_STRETCH_UNDEFINED = 0, - DWRITE_FONT_STRETCH_ULTRA_CONDENSED = 1, - DWRITE_FONT_STRETCH_EXTRA_CONDENSED = 2, - DWRITE_FONT_STRETCH_CONDENSED = 3, - DWRITE_FONT_STRETCH_SEMI_CONDENSED = 4, - DWRITE_FONT_STRETCH_NORMAL = 5, - DWRITE_FONT_STRETCH_MEDIUM = 5, - DWRITE_FONT_STRETCH_SEMI_EXPANDED = 6, - DWRITE_FONT_STRETCH_EXPANDED = 7, - DWRITE_FONT_STRETCH_EXTRA_EXPANDED = 8, - DWRITE_FONT_STRETCH_ULTRA_EXPANDED = 9, -}} -ENUM!{enum DWRITE_FONT_STYLE { - DWRITE_FONT_STYLE_NORMAL, - DWRITE_FONT_STYLE_OBLIQUE, - DWRITE_FONT_STYLE_ITALIC, -}} -ENUM!{enum DWRITE_INFORMATIONAL_STRING_ID { - DWRITE_INFORMATIONAL_STRING_NONE, - DWRITE_INFORMATIONAL_STRING_COPYRIGHT_NOTICE, - DWRITE_INFORMATIONAL_STRING_VERSION_STRINGS, - DWRITE_INFORMATIONAL_STRING_TRADEMARK, - DWRITE_INFORMATIONAL_STRING_MANUFACTURER, - DWRITE_INFORMATIONAL_STRING_DESIGNER, - DWRITE_INFORMATIONAL_STRING_DESIGNER_URL, - DWRITE_INFORMATIONAL_STRING_DESCRIPTION, - DWRITE_INFORMATIONAL_STRING_FONT_VENDOR_URL, - DWRITE_INFORMATIONAL_STRING_LICENSE_DESCRIPTION, - DWRITE_INFORMATIONAL_STRING_LICENSE_INFO_URL, - DWRITE_INFORMATIONAL_STRING_WIN32_FAMILY_NAMES, - DWRITE_INFORMATIONAL_STRING_WIN32_SUBFAMILY_NAMES, - DWRITE_INFORMATIONAL_STRING_PREFERRED_FAMILY_NAMES, - DWRITE_INFORMATIONAL_STRING_PREFERRED_SUBFAMILY_NAMES, - DWRITE_INFORMATIONAL_STRING_SAMPLE_TEXT, - DWRITE_INFORMATIONAL_STRING_FULL_NAME, - DWRITE_INFORMATIONAL_STRING_POSTSCRIPT_NAME, - DWRITE_INFORMATIONAL_STRING_POSTSCRIPT_CID_NAME, - DWRITE_INFORMATIONAL_STRING_WWS_FAMILY_NAME, - DWRITE_INFORMATIONAL_STRING_DESIGN_SCRIPT_LANGUAGE_TAG, - DWRITE_INFORMATIONAL_STRING_SUPPORTED_SCRIPT_LANGUAGE_TAG, -}} -STRUCT!{struct DWRITE_FONT_METRICS { - designUnitsPerEm: ::UINT16, - ascent: ::UINT16, - descent: ::UINT16, - lineGap: ::INT16, - capHeight: ::UINT16, - xHeight: ::UINT16, - underlinePosition: ::INT16, - underlineThickness: ::UINT16, - strikethroughPosition: ::INT16, - strikethroughThickness: ::UINT16, -}} -STRUCT!{struct DWRITE_GLYPH_METRICS { - leftSideBearing: ::INT32, - advanceWidth: ::UINT32, - rightSideBearing: ::INT32, - topSideBearing: ::INT32, - advanceHeight: ::UINT32, - bottomSideBearing: ::INT32, - verticalOriginY: ::INT32, -}} -STRUCT!{struct DWRITE_GLYPH_OFFSET { - advanceOffset: ::FLOAT, - ascenderOffset: ::FLOAT, -}} -ENUM!{enum DWRITE_FACTORY_TYPE { - DWRITE_FACTORY_TYPE_SHARED, - DWRITE_FACTORY_TYPE_ISOLATED, -}} -#[inline] -pub fn DWRITE_MAKE_OPENTYPE_TAG(a: u8, b: u8, c: u8, d: u8) -> u32 { - ((d as u32) << 24) | ((c as u32) << 16) | ((b as u32) << 8) | (a as u32) -} -RIDL!{interface IDWriteFontFileLoader(IDWriteFontFileLoaderVtbl): IUnknown(IUnknownVtbl) { - fn CreateStreamFromKey( - &mut self, fontFileReferenceKey: *const ::c_void, fontFileReferenceKeySize: ::UINT32, - fontFileStream: *mut *mut IDWriteFontFileStream - ) -> ::HRESULT -}} -RIDL!{interface IDWriteLocalFontFileLoader(IDWriteLocalFontFileLoaderVtbl): - IDWriteFontFileLoader(IDWriteFontFileLoaderVtbl) { - fn GetFilePathLengthFromKey( - &mut self, fontFileReferenceKey: *const ::c_void, fontFileReferenceKeySize: ::UINT32, - filePathLength: *mut ::UINT32 - ) -> ::HRESULT, - fn GetFilePathFromKey( - &mut self, fontFileReferenceKey: *const ::c_void, fontFileReferenceKeySize: ::UINT32, - filePath: *mut ::WCHAR, - filePathSize: ::UINT32 - ) -> ::HRESULT, - fn GetLastWriteTimeFromKey( - &mut self, fontFileReferenceKey: *const ::c_void, fontFileReferenceKeySize: ::UINT32, - lastWriteTime: *mut ::FILETIME - ) -> ::HRESULT -}} -RIDL!{interface IDWriteFontFileStream(IDWriteFontFileStreamVtbl): IUnknown(IUnknownVtbl) { - fn ReadFileFragment( - &mut self, fragmentStart: *mut *const ::c_void, fileOffset: ::UINT64, - fragmentSize: ::UINT64, fragmentContext: *mut *mut ::c_void - ) -> ::HRESULT, - fn ReleaseFileFragment(&mut self, fragmentContext: *mut ::c_void) -> (), - fn GetFileSize(&mut self, fileSize: *mut ::UINT64) -> ::HRESULT, - fn GetLastWriteTime(&mut self, lastWriteTime: *mut ::UINT64) -> ::HRESULT -}} -RIDL!{interface IDWriteFontFile(IDWriteFontFileVtbl): IUnknown(IUnknownVtbl) { - fn GetReferenceKey( - &mut self, fontFileReferenceKey: *mut *const ::c_void, - fontFileReferenceKeySize: *mut ::UINT32 - ) -> ::HRESULT, - fn GetLoader(&mut self, fontFileLoader: *mut *mut IDWriteFontFileLoader) -> ::HRESULT, - fn Analyze( - &mut self, isSupportedFontType: *mut ::BOOL, fontFileType: *mut DWRITE_FONT_FILE_TYPE, - fontFaceType: *mut DWRITE_FONT_FACE_TYPE, numberOfFaces: *mut ::UINT32 - ) -> ::HRESULT -}} -ENUM!{enum DWRITE_PIXEL_GEOMETRY { - DWRITE_PIXEL_GEOMETRY_FLAT, - DWRITE_PIXEL_GEOMETRY_RGB, - DWRITE_PIXEL_GEOMETRY_BGR, -}} -ENUM!{enum DWRITE_RENDERING_MODE { - DWRITE_RENDERING_MODE_DEFAULT, - DWRITE_RENDERING_MODE_ALIASED, - DWRITE_RENDERING_MODE_GDI_CLASSIC, - DWRITE_RENDERING_MODE_GDI_NATURAL, - DWRITE_RENDERING_MODE_NATURAL, - DWRITE_RENDERING_MODE_NATURAL_SYMMETRIC, - DWRITE_RENDERING_MODE_OUTLINE, - DWRITE_RENDERING_MODE_CLEARTYPE_GDI_CLASSIC = DWRITE_RENDERING_MODE_GDI_CLASSIC.0, - DWRITE_RENDERING_MODE_CLEARTYPE_GDI_NATURAL = DWRITE_RENDERING_MODE_GDI_NATURAL.0, - DWRITE_RENDERING_MODE_CLEARTYPE_NATURAL = DWRITE_RENDERING_MODE_NATURAL.0, - DWRITE_RENDERING_MODE_CLEARTYPE_NATURAL_SYMMETRIC = DWRITE_RENDERING_MODE_NATURAL_SYMMETRIC.0, -}} -STRUCT!{struct DWRITE_MATRIX { - m11: ::FLOAT, - m12: ::FLOAT, - m21: ::FLOAT, - m22: ::FLOAT, - dx: ::FLOAT, - dy: ::FLOAT, -}} -RIDL!{interface IDWriteRenderingParams(IDWriteRenderingParamsVtbl): IUnknown(IUnknownVtbl) { - fn GetGamma(&mut self) -> ::FLOAT, - fn GetEnhancedContrast(&mut self) -> ::FLOAT, - fn GetClearTypeLevel(&mut self) -> ::FLOAT, - fn GetPixelGeometry(&mut self) -> DWRITE_PIXEL_GEOMETRY, - fn GetRenderingMode(&mut self) -> DWRITE_RENDERING_MODE -}} -pub type IDWriteGeometrySink = ::ID2D1SimplifiedGeometrySink; -RIDL!{interface IDWriteFontFace(IDWriteFontFaceVtbl): IUnknown(IUnknownVtbl) { - fn GetType(&mut self) -> DWRITE_FONT_FACE_TYPE, - fn GetFiles( - &mut self, numberOfFiles: *mut ::UINT32, fontFiles: *mut *mut IDWriteFontFile - ) -> ::HRESULT, - fn GetIndex(&mut self) -> ::UINT32, - fn GetSimulations(&mut self) -> DWRITE_FONT_SIMULATIONS, - fn IsSymbolFont(&mut self) -> ::BOOL, - fn GetMetrics(&mut self, fontFaceMetrics: *mut DWRITE_FONT_METRICS) -> (), - fn GetGlyphCount(&mut self) -> ::UINT16, - fn GetDesignGlyphMetrics( - &mut self, glyphIndices: *const ::UINT16, glyphCount: ::UINT32, - glyphMetrics: *mut DWRITE_GLYPH_METRICS, isSideways: ::BOOL - ) -> ::HRESULT, - fn GetGlyphIndices( - &mut self, codePoints: *const ::UINT32, codePointCount: ::UINT32, - glyphIndices: *mut ::UINT16 - ) -> ::HRESULT, - fn TryGetFontTable( - &mut self, openTypeTableTag: ::UINT32, tableData: *mut *const ::c_void, - tableSize: *mut ::UINT32, tableContext: *mut *mut ::c_void, exists: *mut ::BOOL - ) -> ::HRESULT, - fn ReleaseFontTable( - &mut self, tableContext: *mut ::c_void - ) -> ::HRESULT, - fn GetGlyphRunOutline( - &mut self, emSize: ::FLOAT, glyphIndices: *const ::UINT16, glyphAdvances: *const ::FLOAT, - glyphOffsets: *const DWRITE_GLYPH_OFFSET, glyphCount: ::UINT32, isSideways: ::BOOL, - isRightToLeft: ::BOOL, geometrySink: *mut IDWriteGeometrySink - ) -> ::HRESULT, - fn GetRecommendedRenderingMode( - &mut self, emSize: ::FLOAT, pixelsPerDip: ::FLOAT, measuringMode: ::DWRITE_MEASURING_MODE, - renderingParams: *mut IDWriteRenderingParams, renderingMode: *mut DWRITE_RENDERING_MODE - ) -> ::HRESULT, - fn GetGdiCompatibleMetrics( - &mut self, emSize: ::FLOAT, pixelsPerDip: ::FLOAT, transform: *const DWRITE_MATRIX, - fontFaceMetrics: *mut DWRITE_FONT_METRICS - ) -> ::HRESULT, - fn GetGdiCompatibleGlyphMetrics( - &mut self, enSize: ::FLOAT, pixelsPerDip: ::FLOAT, transform: *const DWRITE_MATRIX, - useGdiNatrual: ::BOOL, glyphIndices: *const ::UINT16, glyphCount: ::UINT32, - glyphMetrics: *mut DWRITE_GLYPH_METRICS, isSideways: ::BOOL - ) -> ::HRESULT -}} -RIDL!{interface IDWriteFontCollectionLoader(IDWriteFontCollectionLoaderVtbl): - IUnknown(IUnknownVtbl) { - fn CreateEnumeratorFromKey( - &mut self, factory: *mut IDWriteFactory, collectionKey: *const ::c_void, - collectionKeySize: ::UINT32, fontFileEnumerator: *mut *mut IDWriteFontFileEnumerator - ) -> ::HRESULT -}} -RIDL!{interface IDWriteFontFileEnumerator(IDWriteFontFileEnumeratorVtbl): IUnknown(IUnknownVtbl) { - fn MoveNext(&mut self, hasCurrentFile: *mut ::BOOL) -> ::HRESULT, - fn GetCurrentFontFile(&mut self, fontFile: *mut *mut IDWriteFontFile) -> ::HRESULT -}} -RIDL!{interface IDWriteLocalizedStrings(IDWriteLocalizedStringsVtbl): IUnknown(IUnknownVtbl) { - fn GetCount(&mut self) -> ::UINT32, - fn FindLocaleName( - &mut self, localeName: *const ::WCHAR, index: *mut ::UINT32, exists: *mut ::BOOL - ) -> ::HRESULT, - fn GetLocaleNameLength(&mut self, index: ::UINT32, length: *mut ::UINT32) -> ::HRESULT, - fn GetLocaleName( - &mut self, index: ::UINT32, localeName: *mut ::WCHAR, size: ::UINT32 - ) -> ::HRESULT, - fn GetStringLength(&mut self, index: ::UINT32, length: *mut ::UINT32) -> ::HRESULT, - fn GetString( - &mut self, index: ::UINT32, stringBuffer: *mut ::WCHAR, size: ::UINT32 - ) -> ::HRESULT -}} -RIDL!{interface IDWriteFontCollection(IDWriteFontCollectionVtbl): IUnknown(IUnknownVtbl) { - fn GetFontFamilyCount(&mut self) -> ::UINT32, - fn GetFontFamily( - &mut self, index: ::UINT32, fontFamily: *mut *mut IDWriteFontFamily - ) -> ::HRESULT, - fn FindFamilyName( - &mut self, familyName: *const ::WCHAR, index: *mut ::UINT32, exists: *mut ::BOOL - ) -> ::HRESULT, - fn GetFontFromFontFace( - &mut self, fontFace: *mut IDWriteFontFace, font: *mut *mut IDWriteFont - ) -> ::HRESULT -}} -RIDL!{interface IDWriteFontList(IDWriteFontListVtbl): IUnknown(IUnknownVtbl) { - fn GetFontCollection(&mut self, fontCollection: *mut *mut IDWriteFontCollection) -> ::HRESULT, - fn GetFontCount(&mut self) -> ::UINT32, - fn GetFont(&mut self, index: ::UINT32, font: *mut *mut IDWriteFont) -> ::HRESULT -}} -RIDL!{interface IDWriteFontFamily(IDWriteFontFamilyVtbl): IDWriteFontList(IDWriteFontListVtbl) { - fn GetFamilyNames(&mut self, names: *mut *mut IDWriteLocalizedStrings) -> ::HRESULT, - fn GetFirstMatchingFont( - &mut self, weight: DWRITE_FONT_WEIGHT, stretch: DWRITE_FONT_STRETCH, - style: DWRITE_FONT_STYLE, matchingFont: *mut *mut IDWriteFont - ) -> ::HRESULT, - fn GetMatchingFonts( - &mut self, weight: DWRITE_FONT_WEIGHT, stretch: DWRITE_FONT_STRETCH, - style: DWRITE_FONT_STYLE, matchingFonts: *mut *mut IDWriteFontList - ) -> ::HRESULT -}} -RIDL!{interface IDWriteFont(IDWriteFontVtbl): IUnknown(IUnknownVtbl) { - fn GetFontFamily(&mut self, fontFamily: *mut *mut IDWriteFontFamily) -> ::HRESULT, - fn GetWeight(&mut self) -> DWRITE_FONT_WEIGHT, - fn GetStretch(&mut self) -> DWRITE_FONT_STRETCH, - fn GetStyle(&mut self) -> DWRITE_FONT_STYLE, - fn IsSymbolFont(&mut self) -> ::BOOL, - fn GetFaceNames(&mut self, names: *mut *mut IDWriteLocalizedStrings) -> ::HRESULT, - fn GetInformationalStrings( - &mut self, informationalStringId: DWRITE_INFORMATIONAL_STRING_ID, - informationalStrings: *mut *mut IDWriteLocalizedStrings, exists: *mut ::BOOL - ) -> ::HRESULT, - fn GetSimulations(&mut self) -> DWRITE_FONT_SIMULATIONS, - fn GetMetrics(&mut self, fontMetrics: *mut DWRITE_FONT_METRICS) -> (), - fn HasCharacter(&mut self, unicodeValue: ::UINT32, exists: *mut ::BOOL) -> ::HRESULT, - fn CreateFontFace(&mut self, fontFace: *mut *mut IDWriteFontFace) -> ::HRESULT -}} -ENUM!{enum DWRITE_READING_DIRECTION { - DWRITE_READING_DIRECTION_LEFT_TO_RIGHT = 0, - DWRITE_READING_DIRECTION_RIGHT_TO_LEFT = 1, - DWRITE_READING_DIRECTION_TOP_TO_BOTTOM = 2, - DWRITE_READING_DIRECTION_BOTTOM_TO_TOP = 3, -}} -ENUM!{enum DWRITE_FLOW_DIRECTION { - DWRITE_FLOW_DIRECTION_TOP_TO_BOTTOM = 0, - DWRITE_FLOW_DIRECTION_BOTTOM_TO_TOP = 1, - DWRITE_FLOW_DIRECTION_LEFT_TO_RIGHT = 2, - DWRITE_FLOW_DIRECTION_RIGHT_TO_LEFT = 3, -}} -ENUM!{enum DWRITE_TEXT_ALIGNMENT { - DWRITE_TEXT_ALIGNMENT_LEADING, - DWRITE_TEXT_ALIGNMENT_TRAILING, - DWRITE_TEXT_ALIGNMENT_CENTER, - DWRITE_TEXT_ALIGNMENT_JUSTIFIED, -}} -ENUM!{enum DWRITE_PARAGRAPH_ALIGNMENT { - DWRITE_PARAGRAPH_ALIGNMENT_NEAR, - DWRITE_PARAGRAPH_ALIGNMENT_FAR, - DWRITE_PARAGRAPH_ALIGNMENT_CENTER, -}} -ENUM!{enum DWRITE_WORD_WRAPPING { - DWRITE_WORD_WRAPPING_WRAP = 0, - DWRITE_WORD_WRAPPING_NO_WRAP = 1, - DWRITE_WORD_WRAPPING_EMERGENCY_BREAK = 2, - DWRITE_WORD_WRAPPING_WHOLE_WORD = 3, - DWRITE_WORD_WRAPPING_CHARACTER = 4, -}} -ENUM!{enum DWRITE_LINE_SPACING_METHOD { - DWRITE_LINE_SPACING_METHOD_DEFAULT, - DWRITE_LINE_SPACING_METHOD_UNIFORM, - DWRITE_LINE_SPACING_METHOD_PROPORTIONAL, -}} -ENUM!{enum DWRITE_TRIMMING_GRANULARITY { - DWRITE_TRIMMING_GRANULARITY_NONE, - DWRITE_TRIMMING_GRANULARITY_CHARACTER, - DWRITE_TRIMMING_GRANULARITY_WORD, -}} -ENUM!{enum DWRITE_FONT_FEATURE_TAG { - DWRITE_FONT_FEATURE_TAG_ALTERNATIVE_FRACTIONS = 0x63726661, // 'afrc' - DWRITE_FONT_FEATURE_TAG_PETITE_CAPITALS_FROM_CAPITALS = 0x63703263, // 'c2pc' - DWRITE_FONT_FEATURE_TAG_SMALL_CAPITALS_FROM_CAPITALS = 0x63733263, // 'c2sc' - DWRITE_FONT_FEATURE_TAG_CONTEXTUAL_ALTERNATES = 0x746c6163, // 'calt' - DWRITE_FONT_FEATURE_TAG_CASE_SENSITIVE_FORMS = 0x65736163, // 'case' - DWRITE_FONT_FEATURE_TAG_GLYPH_COMPOSITION_DECOMPOSITION = 0x706d6363, // 'ccmp' - DWRITE_FONT_FEATURE_TAG_CONTEXTUAL_LIGATURES = 0x67696c63, // 'clig' - DWRITE_FONT_FEATURE_TAG_CAPITAL_SPACING = 0x70737063, // 'cpsp' - DWRITE_FONT_FEATURE_TAG_CONTEXTUAL_SWASH = 0x68777363, // 'cswh' - DWRITE_FONT_FEATURE_TAG_CURSIVE_POSITIONING = 0x73727563, // 'curs' - DWRITE_FONT_FEATURE_TAG_DEFAULT = 0x746c6664, // 'dflt' - DWRITE_FONT_FEATURE_TAG_DISCRETIONARY_LIGATURES = 0x67696c64, // 'dlig' - DWRITE_FONT_FEATURE_TAG_EXPERT_FORMS = 0x74707865, // 'expt' - DWRITE_FONT_FEATURE_TAG_FRACTIONS = 0x63617266, // 'frac' - DWRITE_FONT_FEATURE_TAG_FULL_WIDTH = 0x64697766, // 'fwid' - DWRITE_FONT_FEATURE_TAG_HALF_FORMS = 0x666c6168, // 'half' - DWRITE_FONT_FEATURE_TAG_HALANT_FORMS = 0x6e6c6168, // 'haln' - DWRITE_FONT_FEATURE_TAG_ALTERNATE_HALF_WIDTH = 0x746c6168, // 'halt' - DWRITE_FONT_FEATURE_TAG_HISTORICAL_FORMS = 0x74736968, // 'hist' - DWRITE_FONT_FEATURE_TAG_HORIZONTAL_KANA_ALTERNATES = 0x616e6b68, // 'hkna' - DWRITE_FONT_FEATURE_TAG_HISTORICAL_LIGATURES = 0x67696c68, // 'hlig' - DWRITE_FONT_FEATURE_TAG_HALF_WIDTH = 0x64697768, // 'hwid' - DWRITE_FONT_FEATURE_TAG_HOJO_KANJI_FORMS = 0x6f6a6f68, // 'hojo' - DWRITE_FONT_FEATURE_TAG_JIS04_FORMS = 0x3430706a, // 'jp04' - DWRITE_FONT_FEATURE_TAG_JIS78_FORMS = 0x3837706a, // 'jp78' - DWRITE_FONT_FEATURE_TAG_JIS83_FORMS = 0x3338706a, // 'jp83' - DWRITE_FONT_FEATURE_TAG_JIS90_FORMS = 0x3039706a, // 'jp90' - DWRITE_FONT_FEATURE_TAG_KERNING = 0x6e72656b, // 'kern' - DWRITE_FONT_FEATURE_TAG_STANDARD_LIGATURES = 0x6167696c, // 'liga' - DWRITE_FONT_FEATURE_TAG_LINING_FIGURES = 0x6d756e6c, // 'lnum' - DWRITE_FONT_FEATURE_TAG_LOCALIZED_FORMS = 0x6c636f6c, // 'locl' - DWRITE_FONT_FEATURE_TAG_MARK_POSITIONING = 0x6b72616d, // 'mark' - DWRITE_FONT_FEATURE_TAG_MATHEMATICAL_GREEK = 0x6b72676d, // 'mgrk' - DWRITE_FONT_FEATURE_TAG_MARK_TO_MARK_POSITIONING = 0x6b6d6b6d, // 'mkmk' - DWRITE_FONT_FEATURE_TAG_ALTERNATE_ANNOTATION_FORMS = 0x746c616e, // 'nalt' - DWRITE_FONT_FEATURE_TAG_NLC_KANJI_FORMS = 0x6b636c6e, // 'nlck' - DWRITE_FONT_FEATURE_TAG_OLD_STYLE_FIGURES = 0x6d756e6f, // 'onum' - DWRITE_FONT_FEATURE_TAG_ORDINALS = 0x6e64726f, // 'ordn' - DWRITE_FONT_FEATURE_TAG_PROPORTIONAL_ALTERNATE_WIDTH = 0x746c6170, // 'palt' - DWRITE_FONT_FEATURE_TAG_PETITE_CAPITALS = 0x70616370, // 'pcap' - DWRITE_FONT_FEATURE_TAG_PROPORTIONAL_FIGURES = 0x6d756e70, // 'pnum' - DWRITE_FONT_FEATURE_TAG_PROPORTIONAL_WIDTHS = 0x64697770, // 'pwid' - DWRITE_FONT_FEATURE_TAG_QUARTER_WIDTHS = 0x64697771, // 'qwid' - DWRITE_FONT_FEATURE_TAG_REQUIRED_LIGATURES = 0x67696c72, // 'rlig' - DWRITE_FONT_FEATURE_TAG_RUBY_NOTATION_FORMS = 0x79627572, // 'ruby' - DWRITE_FONT_FEATURE_TAG_STYLISTIC_ALTERNATES = 0x746c6173, // 'salt' - DWRITE_FONT_FEATURE_TAG_SCIENTIFIC_INFERIORS = 0x666e6973, // 'sinf' - DWRITE_FONT_FEATURE_TAG_SMALL_CAPITALS = 0x70636d73, // 'smcp' - DWRITE_FONT_FEATURE_TAG_SIMPLIFIED_FORMS = 0x6c706d73, // 'smpl' - DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_1 = 0x31307373, // 'ss01' - DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_2 = 0x32307373, // 'ss02' - DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_3 = 0x33307373, // 'ss03' - DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_4 = 0x34307373, // 'ss04' - DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_5 = 0x35307373, // 'ss05' - DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_6 = 0x36307373, // 'ss06' - DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_7 = 0x37307373, // 'ss07' - DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_8 = 0x38307373, // 'ss08' - DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_9 = 0x39307373, // 'ss09' - DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_10 = 0x30317373, // 'ss10' - DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_11 = 0x31317373, // 'ss11' - DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_12 = 0x32317373, // 'ss12' - DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_13 = 0x33317373, // 'ss13' - DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_14 = 0x34317373, // 'ss14' - DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_15 = 0x35317373, // 'ss15' - DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_16 = 0x36317373, // 'ss16' - DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_17 = 0x37317373, // 'ss17' - DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_18 = 0x38317373, // 'ss18' - DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_19 = 0x39317373, // 'ss19' - DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_20 = 0x30327373, // 'ss20' - DWRITE_FONT_FEATURE_TAG_SUBSCRIPT = 0x73627573, // 'subs' - DWRITE_FONT_FEATURE_TAG_SUPERSCRIPT = 0x73707573, // 'sups' - DWRITE_FONT_FEATURE_TAG_SWASH = 0x68737773, // 'swsh' - DWRITE_FONT_FEATURE_TAG_TITLING = 0x6c746974, // 'titl' - DWRITE_FONT_FEATURE_TAG_TRADITIONAL_NAME_FORMS = 0x6d616e74, // 'tnam' - DWRITE_FONT_FEATURE_TAG_TABULAR_FIGURES = 0x6d756e74, // 'tnum' - DWRITE_FONT_FEATURE_TAG_TRADITIONAL_FORMS = 0x64617274, // 'trad' - DWRITE_FONT_FEATURE_TAG_THIRD_WIDTHS = 0x64697774, // 'twid' - DWRITE_FONT_FEATURE_TAG_UNICASE = 0x63696e75, // 'unic' - DWRITE_FONT_FEATURE_TAG_VERTICAL_WRITING = 0x74726576, // 'vert' - DWRITE_FONT_FEATURE_TAG_VERTICAL_ALTERNATES_AND_ROTATION = 0x32747276, // 'vrt2' - DWRITE_FONT_FEATURE_TAG_SLASHED_ZERO = 0x6f72657a, // 'zero' -}} -STRUCT!{struct DWRITE_TEXT_RANGE { - startPosition: ::UINT32, - length: ::UINT32, -}} -STRUCT!{struct DWRITE_FONT_FEATURE { - nameTag: DWRITE_FONT_FEATURE_TAG, - parameter: ::UINT32, -}} -STRUCT!{struct DWRITE_TYPOGRAPHIC_FEATURES { - features: *mut DWRITE_FONT_FEATURE, - featureCount: ::UINT32, -}} -STRUCT!{struct DWRITE_TRIMMING { - granularity: DWRITE_TRIMMING_GRANULARITY, - delimiter: ::UINT32, - delimiterCount: ::UINT32, -}} -RIDL!{interface IDWriteTextFormat(IDWriteTextFormatVtbl): IUnknown(IUnknownVtbl) { - fn SetTextAlignment(&mut self, textAlignment: DWRITE_TEXT_ALIGNMENT) -> ::HRESULT, - fn SetParagraphAlignment( - &mut self, paragraphAlignment: DWRITE_PARAGRAPH_ALIGNMENT - ) -> ::HRESULT, - fn SetWordWrapping(&mut self, wordWrapping: DWRITE_WORD_WRAPPING) -> ::HRESULT, - fn SetReadingDirection(&mut self, readingDirection: DWRITE_READING_DIRECTION) -> ::HRESULT, - fn SetFlowDirection(&mut self, flowDirection: DWRITE_FLOW_DIRECTION) -> ::HRESULT, - fn SetIncrementalTabStop(&mut self, incrementalTabStop: ::FLOAT) -> ::HRESULT, - fn SetTrimming( - &mut self, trimmingOptions: *const DWRITE_TRIMMING, trimmingSign: *mut IDWriteInlineObject - ) -> ::HRESULT, - fn SetLineSpacing( - &mut self, lineSpacingMethod: DWRITE_LINE_SPACING_METHOD, lineSpacing: ::FLOAT, - baseLine: ::FLOAT - ) -> ::HRESULT, - fn GetTextAlignment(&mut self) -> DWRITE_TEXT_ALIGNMENT, - fn GetParagraphAlignment(&mut self) -> DWRITE_PARAGRAPH_ALIGNMENT, - fn GetWordWrapping(&mut self) -> DWRITE_WORD_WRAPPING, - fn GetReadingDirection(&mut self) -> DWRITE_READING_DIRECTION, - fn GetFlowDirection(&mut self) -> DWRITE_FLOW_DIRECTION, - fn GetIncrementalTabStop(&mut self) -> ::FLOAT, - fn GetTrimming( - &mut self, trimmingOptions: *mut DWRITE_TRIMMING, - trimmingSign: *mut *mut IDWriteInlineObject - ) -> ::HRESULT, - fn GetLineSpacing( - &mut self, lineSpacingMethod: *mut DWRITE_LINE_SPACING_METHOD, lineSpacing: *mut ::FLOAT, - baseline: *mut ::FLOAT - ) -> ::HRESULT, - fn GetFontCollection(&mut self, fontCollection: *mut *mut IDWriteFontCollection) -> ::HRESULT, - fn GetFontFamilyNameLength(&mut self) -> ::UINT32, - fn GetFontFamilyName(&mut self, fontFamilyName: *mut ::WCHAR, nameSize: ::UINT32) -> ::HRESULT, - fn GetFontWeight(&mut self) -> DWRITE_FONT_WEIGHT, - fn GetFontStyle(&mut self) -> DWRITE_FONT_STYLE, - fn GetFontStretch(&mut self) -> DWRITE_FONT_STRETCH, - fn GetFontSize(&mut self) -> ::FLOAT, - fn GetLocaleNameLength(&mut self) -> ::UINT32, - fn GetLocaleName(&mut self, localeName: *mut ::WCHAR, nameSize: ::UINT32) -> ::HRESULT -}} -RIDL!{interface IDWriteTypography(IDWriteTypographyVtbl): IUnknown(IUnknownVtbl) { - fn AddFontFeature(&mut self, fontFeature: DWRITE_FONT_FEATURE) -> ::HRESULT, - fn GetFontFeatureCount(&mut self) -> ::UINT32, - fn GetFontFeature( - &mut self, fontFeatureIndex: ::UINT32, fontFeature: *mut DWRITE_FONT_FEATURE - ) -> ::HRESULT -}} -FLAGS!{enum DWRITE_SCRIPT_SHAPES { - DWRITE_SCRIPT_SHAPES_DEFAULT = 0, - DWRITE_SCRIPT_SHAPES_NO_VISUAL = 1, -}} -STRUCT!{struct DWRITE_SCRIPT_ANALYSIS { - script: ::UINT16, - shapes: DWRITE_SCRIPT_SHAPES, -}} -ENUM!{enum DWRITE_BREAK_CONDITION { - DWRITE_BREAK_CONDITION_NEUTRAL, - DWRITE_BREAK_CONDITION_CAN_BREAK, - DWRITE_BREAK_CONDITION_MAY_NOT_BREAK, - DWRITE_BREAK_CONDITION_MUST_BREAK, -}} -STRUCT!{struct DWRITE_LINE_BREAKPOINT { - bit_fields: ::UINT8, -}} -BITFIELD!{DWRITE_LINE_BREAKPOINT bit_fields: ::UINT8 [ - breakConditionBefore set_breakConditionBefore[0..2], - breakConditionAfter set_breakConditionAfter[2..4], - isWhitespace set_isWhitespace[4..5], - isSoftHyphen set_isSoftHyphen[5..6], - padding set_padding[6..8], -]} -ENUM!{enum DWRITE_NUMBER_SUBSTITUTION_METHOD { - DWRITE_NUMBER_SUBSTITUTION_METHOD_FROM_CULTURE, - DWRITE_NUMBER_SUBSTITUTION_METHOD_CONTEXTUAL, - DWRITE_NUMBER_SUBSTITUTION_METHOD_NONE, - DWRITE_NUMBER_SUBSTITUTION_METHOD_NATIONAL, - DWRITE_NUMBER_SUBSTITUTION_METHOD_TRADITIONAL, -}} -RIDL!{interface IDWriteNumberSubstitution(IDWriteNumberSubstitutionVtbl): IUnknown(IUnknownVtbl) { -}} -STRUCT!{struct DWRITE_SHAPING_TEXT_PROPERTIES { - bit_fields: ::UINT16, -}} -BITFIELD!{DWRITE_SHAPING_TEXT_PROPERTIES bit_fields: ::UINT16 [ - isShapedAlone set_isShapedAlone[0..1], - reserved set_reserved[1..16], -]} -STRUCT!{struct DWRITE_SHAPING_GLYPH_PROPERTIES { - bit_fields: ::UINT16, -}} -BITFIELD!{DWRITE_SHAPING_GLYPH_PROPERTIES bit_fields: ::UINT16 [ - justification set_justification[0..4], - isClusterStart set_isClusterStart[4..5], - isDiacritic set_isDiacritic[5..6], - isZeroWidthSpace set_isZeroWidthSpace[6..7], - reserved set_reserved[7..16], -]} -RIDL!{interface IDWriteTextAnalysisSource(IDWriteTextAnalysisSourceVtbl): IUnknown(IUnknownVtbl) { - fn GetTextAtPosition( - &mut self, textPosition: ::UINT32, textString: *mut *const ::WCHAR, - textLength: *mut ::UINT32 - ) -> ::HRESULT, - fn GetTextBeforePosition( - &mut self, textPosition: ::UINT32, textString: *mut *const ::WCHAR, - textLength: *mut ::UINT32 - ) -> ::HRESULT, - fn GetParagraphReadingDirection(&mut self) -> DWRITE_READING_DIRECTION, - fn GetLocaleName( - &mut self, textPosition: ::UINT32, textLength: *mut ::UINT32, - localeName: *mut *const ::WCHAR - ) -> ::HRESULT, - fn GetNumberSubstitution( - &mut self, textPosition: ::UINT32, textLength: *mut ::UINT32, - numberSubstitution: *mut *mut IDWriteNumberSubstitution - ) -> ::HRESULT -}} -RIDL!{interface IDWriteTextAnalysisSink(IDWriteTextAnalysisSinkVtbl): IUnknown(IUnknownVtbl) { - fn SetScriptAnalysis( - &mut self, textPosition: ::UINT32, textLength: ::UINT32, - scriptAnalysis: *const DWRITE_SCRIPT_ANALYSIS - ) -> ::HRESULT, - fn SetLineBreakpoints( - &mut self, textPosition: ::UINT32, textLength: ::UINT32, - lineBreakpoints: *const DWRITE_LINE_BREAKPOINT - ) -> ::HRESULT, - fn SetBidiLevel( - &mut self, textPosition: ::UINT32, textLength: ::UINT32, explicitLevel: ::UINT8, - resolvedLevel: ::UINT8 - ) -> ::HRESULT, - fn SetNumberSubstitution( - &mut self, textPosition: ::UINT32, textLength: ::UINT32, - numberSubstitution: *mut IDWriteNumberSubstitution - ) -> ::HRESULT -}} -RIDL!{interface IDWriteTextAnalyzer(IDWriteTextAnalyzerVtbl): IUnknown(IUnknownVtbl) { - fn AnalyzeScript( - &mut self, analysisSource: *mut IDWriteTextAnalysisSource, textPosition: ::UINT32, - textLength: ::UINT32, analysisSink: *mut IDWriteTextAnalysisSink - ) -> ::HRESULT, - fn AnalyzeBidi( - &mut self, analysisSource: *mut IDWriteTextAnalysisSource, textPosition: ::UINT32, - textLength: ::UINT32, analysisSink: *mut IDWriteTextAnalysisSink - ) -> ::HRESULT, - fn AnalyzeNumberSubstitution( - &mut self, analysisSource: *mut IDWriteTextAnalysisSource, textPosition: ::UINT32, - textLength: ::UINT32, analysisSink: *mut IDWriteTextAnalysisSink - ) -> ::HRESULT, - fn AnalyzeLineBreakpoints( - &mut self, analysisSource: *mut IDWriteTextAnalysisSource, textPosition: ::UINT32, - textLength: ::UINT32, analysisSink: *mut IDWriteTextAnalysisSink - ) -> ::HRESULT, - fn GetGlyphs( - &mut self, textString: *const ::WCHAR, textLength: ::UINT32, - fontFace: *mut IDWriteFontFace, isSideways: ::BOOL, isRightToLeft: ::BOOL, - scriptAnalysis: *const DWRITE_SCRIPT_ANALYSIS, localeName: *const ::WCHAR, - numberSubstitution: *mut IDWriteNumberSubstitution, - features: *mut *const DWRITE_TYPOGRAPHIC_FEATURES, featureRangeLengths: *const ::UINT32, - featureRanges: ::UINT32, maxGlyphCount: ::UINT32, clusterMap: *mut ::UINT16, - textProps: *mut DWRITE_SHAPING_TEXT_PROPERTIES, glyphIndices: *mut ::UINT16, - glyphProps: *mut DWRITE_SHAPING_GLYPH_PROPERTIES, actualGlyphCount: *mut ::UINT32 - ) -> ::HRESULT, - fn GetGlyphPlacements( - &mut self, textString: *const ::WCHAR, clusterMap: *const ::UINT16, - textProps: *mut DWRITE_SHAPING_TEXT_PROPERTIES, textLength: ::UINT32, - glyphIndices: *const ::UINT16, glyphProps: *const DWRITE_SHAPING_GLYPH_PROPERTIES, - glyphCount: ::UINT32, fontFace: *mut IDWriteFontFace, fontEmSize: ::FLOAT, - isSideways: ::BOOL, isRightToLeft: ::BOOL, scriptAnalysis: *const DWRITE_SCRIPT_ANALYSIS, - localeName: *const ::WCHAR, features: *mut *const DWRITE_TYPOGRAPHIC_FEATURES, - featureRangeLengths: *const ::UINT32, featureRanges: ::UINT32, glyphAdvances: *mut ::FLOAT, - glyphOffsets: *mut DWRITE_GLYPH_OFFSET - ) -> ::HRESULT, - fn GetGdiCompatibleGlyphPlacements( - &mut self, textString: *const ::WCHAR, clusterMap: *const ::UINT16, - textProps: *mut DWRITE_SHAPING_TEXT_PROPERTIES, textLength: ::UINT32, - glyphIndices: *const ::UINT16, glyphProps: *const DWRITE_SHAPING_GLYPH_PROPERTIES, - glyphCount: ::UINT32, fontFace: *mut IDWriteFontFace, fontEmSize: ::FLOAT, - pixelsPerDip: ::FLOAT, transform: *const DWRITE_MATRIX, useGdiNatrual: ::BOOL, - isSideways: ::BOOL, isRightToLeft: ::BOOL, scriptAnalysis: *const DWRITE_SCRIPT_ANALYSIS, - localeName: *const ::WCHAR, features: *mut *const DWRITE_TYPOGRAPHIC_FEATURES, - featureRangeLengths: *const ::UINT32, featureRanges: ::UINT32, glyphAdvances: *mut ::FLOAT, - glyphOffsets: *mut DWRITE_GLYPH_OFFSET - ) -> ::HRESULT -}} -STRUCT!{struct DWRITE_GLYPH_RUN { - fontFace: *mut IDWriteFontFace, - fontEmSize: ::FLOAT, - glyphCount: ::UINT32, - glyphIndices: *const ::UINT16, - glyphAdvances: *const ::FLOAT, - glyphOffsets: *const DWRITE_GLYPH_OFFSET, - isSideways: ::BOOL, - bidiLevel: ::UINT32, -}} -STRUCT!{struct DWRITE_GLYPH_RUN_DESCRIPTION { - localeName: *const ::WCHAR, - string: *const ::WCHAR, - stringLength: ::UINT32, - clusterMap: *const ::UINT16, - textPosition: ::UINT32, -}} -STRUCT!{struct DWRITE_UNDERLINE { - width: ::FLOAT, - thickness: ::FLOAT, - offset: ::FLOAT, - runHeight: ::FLOAT, - readingDirection: DWRITE_READING_DIRECTION, - flowDirection: DWRITE_FLOW_DIRECTION, - localeName: *const ::WCHAR, - measuringMode: ::DWRITE_MEASURING_MODE, -}} -STRUCT!{struct DWRITE_STRIKETHROUGH { - width: ::FLOAT, - thickness: ::FLOAT, - offset: ::FLOAT, - readingDirection: DWRITE_READING_DIRECTION, - flowDirection: DWRITE_FLOW_DIRECTION, - localeName: *const ::WCHAR, - measuringMode: ::DWRITE_MEASURING_MODE, -}} -STRUCT!{struct DWRITE_LINE_METRICS { - length: ::UINT32, - trailingWhitespaceLength: ::UINT32, - newlineLength: ::UINT32, - height: ::FLOAT, - baseline: ::FLOAT, - isTrimmed: ::BOOL, -}} -STRUCT!{struct DWRITE_CLUSTER_METRICS { - width: ::FLOAT, - length: ::UINT16, - bit_fields: ::UINT16, -}} -BITFIELD!{DWRITE_CLUSTER_METRICS bit_fields: ::UINT16 [ - canWrapLineAfter set_canWrapLineAfter[0..1], - isWhitespace set_isWhitespace[1..2], - isNewline set_isNewline[2..3], - isSoftHyphen set_isSoftHyphen[3..4], - isRightToLeft set_isRightToLeft[4..5], - padding set_padding[5..16], -]} -STRUCT!{struct DWRITE_TEXT_METRICS { - left: ::FLOAT, - top: ::FLOAT, - width: ::FLOAT, - widthIncludingTrailingWhitespace: ::FLOAT, - height: ::FLOAT, - layoutWidth: ::FLOAT, - layoutHeight: ::FLOAT, - maxBidiReorderingDepth: ::UINT32, - lineCount: ::UINT32, -}} -STRUCT!{struct DWRITE_INLINE_OBJECT_METRICS { - width: ::FLOAT, - height: ::FLOAT, - baseline: ::FLOAT, - supportsSideways: ::BOOL, -}} -STRUCT!{struct DWRITE_OVERHANG_METRICS { - left: ::FLOAT, - top: ::FLOAT, - right: ::FLOAT, - bottom: ::FLOAT, -}} -STRUCT!{struct DWRITE_HIT_TEST_METRICS { - textPosition: ::UINT32, - length: ::UINT32, - left: ::FLOAT, - top: ::FLOAT, - width: ::FLOAT, - height: ::FLOAT, - bidiLevel: ::UINT32, - isText: ::BOOL, - isTrimmed: ::BOOL, -}} -RIDL!{interface IDWriteInlineObject(IDWriteInlineObjectVtbl): IUnknown(IUnknownVtbl) { - fn Draw( - &mut self, clientDrawingContext: *mut ::c_void, renderer: *mut IDWriteTextRenderer, - originX: ::FLOAT, originY: ::FLOAT, isSideways: ::BOOL, isRightToLeft: ::BOOL, - clientDrawingEffect: *mut ::IUnknown - ) -> ::HRESULT, - fn GetMetrics(&mut self, metrics: *mut DWRITE_INLINE_OBJECT_METRICS) -> ::HRESULT, - fn GetOverhangMetrics(&mut self, overhangs: *mut DWRITE_OVERHANG_METRICS) -> ::HRESULT, - fn GetBreakConditions( - &mut self, breakConditionBefore: *mut DWRITE_BREAK_CONDITION, - breakConditionAfter: *mut DWRITE_BREAK_CONDITION - ) -> ::HRESULT -}} -RIDL!{interface IDWritePixelSnapping(IDWritePixelSnappingVtbl): IUnknown(IUnknownVtbl) { - fn IsPixelSnappingDisabled( - &mut self, clientDrawingContext: *mut ::c_void, isDisabled: *mut ::BOOL - ) -> ::HRESULT, - fn GetCurrentTransform( - &mut self, clientDrawingContext: *mut ::c_void, transform: *mut DWRITE_MATRIX - ) -> ::HRESULT, - fn GetPixelsPerDip( - &mut self, clientDrawingContext: *mut ::c_void, pixelsPerDip: *mut ::FLOAT - ) -> ::HRESULT -}} -RIDL!{interface IDWriteTextRenderer(IDWriteTextRendererVtbl): - IDWritePixelSnapping(IDWritePixelSnappingVtbl) { - fn DrawGlyphRun( - &mut self, clientDrawingContext: *mut ::c_void, baselineOriginX: ::FLOAT, - baselineOriginY: ::FLOAT, measuringMode: ::DWRITE_MEASURING_MODE, - glyphRun: *const DWRITE_GLYPH_RUN, - glyphRunDescription: *const DWRITE_GLYPH_RUN_DESCRIPTION, - clientDrawingEffect: *mut ::IUnknown - ) -> ::HRESULT, - fn DrawUnderline( - &mut self, clientDrawingContext: *mut ::c_void, baselineOriginX: ::FLOAT, - baselineOriginY: ::FLOAT, underline: *const DWRITE_UNDERLINE, - clientDrawingEffect: *mut ::IUnknown - ) -> ::HRESULT, - fn DrawStrikethrough( - &mut self, clientDrawingContext: *mut ::c_void, baselineOriginX: ::FLOAT, - baselineOriginY: ::FLOAT, strikethrough: *const DWRITE_STRIKETHROUGH, - clientDrawingEffect: *mut ::IUnknown - ) -> ::HRESULT, - fn DrawInlineObject( - &mut self, clientDrawingContext: *mut ::c_void, baselineOriginX: ::FLOAT, - baselineOriginY: ::FLOAT, inlineObject: *mut IDWriteInlineObject, - isSideways: ::BOOL, isRightToLeft: ::BOOL, clientDrawingEffect: *mut ::IUnknown - ) -> ::HRESULT -}} -RIDL!{interface IDWriteTextLayout(IDWriteTextLayoutVtbl): - IDWriteTextFormat(IDWriteTextFormatVtbl) { - fn SetMaxWidth(&mut self, maxWidth: ::FLOAT) -> ::HRESULT, - fn SetMaxHeight(&mut self, maxHeight: ::FLOAT) -> ::HRESULT, - fn SetFontCollection( - &mut self, fontCollection: *mut IDWriteFontCollection, textRange: DWRITE_TEXT_RANGE - ) -> ::HRESULT, - fn SetFontFamilyName( - &mut self, fontFamilyName: *const ::WCHAR, textRange: DWRITE_TEXT_RANGE - ) -> ::HRESULT, - fn SetFontWeight( - &mut self, fontWeight: DWRITE_FONT_WEIGHT, textRange: DWRITE_TEXT_RANGE - ) -> ::HRESULT, - fn SetFontStyle( - &mut self, fontStyle: DWRITE_FONT_STYLE, textRange: DWRITE_TEXT_RANGE - ) -> ::HRESULT, - fn SetFontStretch( - &mut self, fontStretch: DWRITE_FONT_STRETCH, textRange: DWRITE_TEXT_RANGE - ) -> ::HRESULT, - fn SetFontSize(&mut self, fontSize: ::FLOAT, textRange: DWRITE_TEXT_RANGE) -> ::HRESULT, - fn SetUnderline(&mut self, hasUnderline: ::BOOL, textRange: DWRITE_TEXT_RANGE) -> ::HRESULT, - fn SetStrikethrough( - &mut self, hasStrikethrough: ::BOOL, textRange: DWRITE_TEXT_RANGE - ) -> ::HRESULT, - fn SetDrawingEffect( - &mut self, drawingEffect: *mut ::IUnknown, textRange: DWRITE_TEXT_RANGE - ) -> ::HRESULT, - fn SetInlineObject( - &mut self, inlineObject: *mut IDWriteInlineObject, textRange: DWRITE_TEXT_RANGE - ) -> ::HRESULT, - fn SetTypography( - &mut self, typography: *mut IDWriteTypography, textRange: DWRITE_TEXT_RANGE - ) -> ::HRESULT, - fn SetLocaleName( - &mut self, localeName: *const ::WCHAR, textRange: DWRITE_TEXT_RANGE - ) -> ::HRESULT, - fn GetMaxWidth(&mut self) -> ::FLOAT, - fn GetMaxHeight(&mut self) -> ::FLOAT, - fn GetFontCollection( - &mut self, currentPosition: ::UINT32, fontCollection: *mut *mut IDWriteFontCollection, - textRange: *mut DWRITE_TEXT_RANGE - ) -> ::HRESULT, - fn GetFontFamilyNameLength( - &mut self, currentPosition: *mut ::UINT32, nameLength: *mut ::UINT32, - textRange: *mut DWRITE_TEXT_RANGE - ) -> ::HRESULT, - fn GetFontFamilyName( - &mut self, currentPosition: ::UINT32, fontFamilyName: *mut ::WCHAR, - nameSize: ::UINT32, textRange: *mut DWRITE_TEXT_RANGE - ) -> ::HRESULT, - fn GetFontWeight( - &mut self, currentPosition: ::UINT32, fontWeight: *mut DWRITE_FONT_WEIGHT, - textRange: *mut DWRITE_TEXT_RANGE - ) -> ::HRESULT, - fn GetFontStyle( - &mut self, currentPosition: ::UINT32, fontStyle: *mut DWRITE_FONT_STYLE, - textRange: *mut DWRITE_TEXT_RANGE - ) -> ::HRESULT, - fn GetFontStretch( - &mut self, currentPosition: ::UINT32, fontStretch: *mut DWRITE_FONT_STRETCH, - textRange: *mut DWRITE_TEXT_RANGE - ) -> ::HRESULT, - fn GetFontSize( - &mut self, currentPosition: ::UINT32, fontSize: *mut ::FLOAT, - textRange: *mut DWRITE_TEXT_RANGE - ) -> ::HRESULT, - fn GetUnderline( - &mut self, currentPosition: ::UINT32, hasUnderline: *mut ::BOOL, - textRange: *mut DWRITE_TEXT_RANGE - ) -> ::HRESULT, - fn GetStrikethrough( - &mut self, currentPosition: ::UINT32, hasStrikethrough: *mut ::BOOL, - textRange: *mut DWRITE_TEXT_RANGE - ) -> ::HRESULT, - fn GetDrawingEffect( - &mut self, currentPosition: ::UINT32, drawingEffect: *mut *mut ::IUnknown, - textRange: *mut DWRITE_TEXT_RANGE - ) -> ::HRESULT, - fn GetInlineObject( - &mut self, currentPosition: ::UINT32, inlineObject: *mut *mut IDWriteInlineObject, - textRange: *mut DWRITE_TEXT_RANGE - ) -> ::HRESULT, - fn GetTypography( - &mut self, currentPosition: ::UINT32, typography: *mut *mut IDWriteTypography, - textRange: *mut DWRITE_TEXT_RANGE - ) -> ::HRESULT, - fn GetLocaleNameLength( - &mut self, currentPosition: ::UINT32, nameLength: *mut ::UINT32, - textRange: *mut DWRITE_TEXT_RANGE - ) -> ::HRESULT, - fn GetLocaleName( - &mut self, currentPosition: ::UINT32, localeName: *mut ::WCHAR, nameSize: ::UINT32, - textRange: *mut DWRITE_TEXT_RANGE - ) -> ::HRESULT, - fn Draw( - &mut self, clientDrawingContext: *mut ::c_void, renderer: *mut IDWriteTextRenderer, - originX: ::FLOAT, originY: ::FLOAT - ) -> ::HRESULT, - fn GetLineMetrics( - &mut self, lineMetrics: *mut DWRITE_LINE_METRICS, maxLineCount: ::UINT32, - actualLineCount: *mut ::UINT32 - ) -> ::HRESULT, - fn GetMetrics(&mut self, textMetrics: *mut DWRITE_TEXT_METRICS) -> ::HRESULT, - fn GetOverhangMetrics(&mut self, overhangs: *mut DWRITE_OVERHANG_METRICS) -> ::HRESULT, - fn GetClusterMetrics( - &mut self, clusterMetrics: *mut DWRITE_CLUSTER_METRICS, maxClusterCount: ::UINT32, - actualClusterCount: *mut ::UINT32 - ) -> ::HRESULT, - fn DetermineMinWidth(&mut self, minWidth: *mut ::FLOAT) -> ::HRESULT, - fn HitTestPoint( - &mut self, pointX: ::FLOAT, pointY: ::FLOAT, isTrailingHit: *mut ::BOOL, - isInside: *mut ::BOOL, hitTestMetrics: *mut DWRITE_HIT_TEST_METRICS - ) -> ::HRESULT, - fn HitTestTextPosition( - &mut self, textPosition: ::UINT32, isTrailingHit: ::BOOL, pointX: *mut ::FLOAT, - pointY: *mut ::FLOAT, hitTestMetrics: *mut DWRITE_HIT_TEST_METRICS - ) -> ::HRESULT, - fn HitTestTextRange( - &mut self, textPosition: ::UINT32, textLength: ::UINT32, originX: ::FLOAT, - originY: ::FLOAT, hitTestMetrics: *mut DWRITE_HIT_TEST_METRICS, - maxHitTestMetricsCount: ::UINT32, actualHitTestMetricsCount: *mut ::UINT32 - ) -> ::HRESULT -}} -RIDL!{interface IDWriteBitmapRenderTarget(IDWriteBitmapRenderTargetVtbl): IUnknown(IUnknownVtbl) { - fn DrawGlyphRun( - &mut self, baselineOriginX: ::FLOAT, baselineOriginY: ::FLOAT, - measuringMode: ::DWRITE_MEASURING_MODE, glyphRun: *const ::c_void, - renderingParams: *mut IDWriteRenderingParams, textColor: ::COLORREF, - blackBoxRect: *mut ::RECT - ) -> ::HRESULT, - fn GetMemoryDC(&mut self) -> ::HDC, - fn GetPixelsPerDip(&mut self) -> ::FLOAT, - fn SetPixelsPerDip(&mut self, pixelsPerDip: ::FLOAT) -> ::HRESULT, - fn GetCurrentTransform(&mut self, transform: *mut DWRITE_MATRIX) -> ::HRESULT, - fn SetCurrentTransform(&mut self, transform: *const DWRITE_MATRIX) -> ::HRESULT, - fn GetSize(&mut self, size: *mut ::SIZE) -> ::HRESULT, - fn Resize(&mut self, width: ::UINT32, height: ::UINT32) -> ::HRESULT -}} -RIDL!{interface IDWriteGdiInterop(IDWriteGdiInteropVtbl): IUnknown(IUnknownVtbl) { - fn CreateFontFromLOGFONT( - &mut self, logFont: *const ::LOGFONTW, font: *mut *mut IDWriteFont - ) -> ::HRESULT, - fn ConvertFontToLOGFONT( - &mut self, font: *mut IDWriteFont, logFont: *mut ::LOGFONTW, isSystemFont: *mut ::BOOL - ) -> ::HRESULT, - fn ConvertFontFaceToLOGFONT( - &mut self, font: *mut IDWriteFontFace, logFont: *mut ::LOGFONTW - ) -> ::HRESULT, - fn CreateFontFaceFromHdc( - &mut self, hdc: ::HDC, fontFace: *mut *mut IDWriteFontFace - ) -> ::HRESULT, - fn CreateBitmapRenderTarget( - &mut self, hdc: ::HDC, width: ::UINT32, height: ::UINT32, - renderTarget: *mut *mut IDWriteBitmapRenderTarget - ) -> ::HRESULT -}} -ENUM!{enum DWRITE_TEXTURE_TYPE { - DWRITE_TEXTURE_ALIASED_1x1 = 0, - DWRITE_TEXTURE_CLEARTYPE_3x1 = 1, -}} -pub const DWRITE_ALPHA_MAX: ::BYTE = 255; -RIDL!{interface IDWriteGlyphRunAnalysis(IDWriteGlyphRunAnalysisVtbl): IUnknown(IUnknownVtbl) { - fn GetAlphaTextureBounds( - &mut self, textureType: DWRITE_TEXTURE_TYPE, textureBounds: *mut ::RECT - ) -> ::HRESULT, - fn CreateAlphaTexture( - &mut self, textureType: DWRITE_TEXTURE_TYPE, textureBounds: *const ::RECT, - alphaValues: *mut ::BYTE, bufferSize: ::UINT32 - ) -> ::HRESULT, - fn GetAlphaBlendParams( - &mut self, renderingParams: *mut IDWriteRenderingParams, blendGamma: *mut ::FLOAT, - blendEnhancedContrast: *mut ::FLOAT, blendClearTypeLevel: *mut ::FLOAT - ) -> ::HRESULT -}} -RIDL!{interface IDWriteFactory(IDWriteFactoryVtbl): IUnknown(IUnknownVtbl) { - fn GetSystemFontCollection( - &mut self, fontCollection: *mut *mut IDWriteFontCollection, checkForUpdates: ::BOOL - ) -> ::HRESULT, - fn CreateCustomFontCollection( - &mut self, collectionLoader: *mut IDWriteFontCollectionLoader, - collectionKey: *const ::c_void, collectionKeySize: ::UINT32, - fontCollection: *mut *mut IDWriteFontCollection - ) -> ::HRESULT, - fn RegisterFontCollectionLoader( - &mut self, fontCollectionLoader: *mut IDWriteFontCollectionLoader - ) -> ::HRESULT, - fn UnregisterFontCollectionLoader( - &mut self, fontCollectionLoader: *mut IDWriteFontCollectionLoader - ) -> ::HRESULT, - fn CreateFontFileReference( - &mut self, filePath: *const ::WCHAR, lastWriteTime: *const ::FILETIME, - fontFile: *mut *mut IDWriteFontFile - ) -> ::HRESULT, - fn CreateCustomFontFileReference( - &mut self, fontFileReferenceKey: *const ::c_void, fontFileReferenceKeySize: ::UINT32, - fontFileLoader: *mut IDWriteFontFileLoader, fontFile: *mut *mut IDWriteFontFile - ) -> ::HRESULT, - fn CreateFontFace( - &mut self, fontFaceType: DWRITE_FONT_FACE_TYPE, numberOfFiles: ::UINT32, - fontFiles: *const *mut IDWriteFontFile, faceIndex: ::UINT32, - fontFaceSimulationFlags: DWRITE_FONT_SIMULATIONS, fontFace: *mut *mut IDWriteFontFace - ) -> ::HRESULT, - fn CreateRenderingParams( - &mut self, renderingParams: *mut *mut IDWriteRenderingParams - ) -> ::HRESULT, - fn CreateMonitorRenderingParams( - &mut self, monitor: ::HMONITOR, renderingParams: *mut *mut IDWriteRenderingParams - ) -> ::HRESULT, - fn CreateCustomRenderingParams( - &mut self, gamma: ::FLOAT, enhancedContrast: ::FLOAT, clearTypeLevel: ::FLOAT, - pixelGeometry: DWRITE_PIXEL_GEOMETRY, renderingMode: DWRITE_RENDERING_MODE, - renderingParams: *mut *mut IDWriteRenderingParams - ) -> ::HRESULT, - fn RegisterFontFileLoader( - &mut self, fontFileLoader: *mut IDWriteFontFileLoader - ) -> ::HRESULT, - fn UnregisterFontFileLoader( - &mut self, fontFileLoader: *mut IDWriteFontFileLoader - ) -> ::HRESULT, - fn CreateTextFormat( - &mut self, fontFamilyName: *const ::WCHAR, fontCollection: *mut IDWriteFontCollection, - fontWeight: DWRITE_FONT_WEIGHT, fontStyle: DWRITE_FONT_STYLE, - fontStretch: DWRITE_FONT_STRETCH, fontSize: ::FLOAT, localeName: *const ::WCHAR, - textFormat: *mut *mut IDWriteTextFormat - ) -> ::HRESULT, - fn CreateTypography(&mut self, typography: *mut *mut IDWriteTypography) -> ::HRESULT, - fn GetGdiInterop(&mut self, gdiInterop: *mut *mut IDWriteGdiInterop) -> ::HRESULT, - fn CreateTextLayout( - &mut self, string: *const ::WCHAR, stringLength: ::UINT32, - textFormat: *mut IDWriteTextFormat, maxWidth: ::FLOAT, maxHeight: ::FLOAT, - textLayout: *mut *mut IDWriteTextLayout - ) -> ::HRESULT, - fn CreateGdiCompatibleTextLayout( - &mut self, string: *const ::WCHAR, stringLength: ::UINT32, - textFormat: *mut IDWriteTextFormat, layoutWidth: ::FLOAT, layoutHeight: ::FLOAT, - pixelsPerDip: ::FLOAT, transform: *const DWRITE_MATRIX, useGdiNatrual: ::BOOL, - textLayout: *mut *mut IDWriteTextLayout - ) -> ::HRESULT, - fn CreateEllipsisTrimmingSign( - &mut self, textFormat: *mut IDWriteTextFormat, trimmingSign: *mut *mut IDWriteInlineObject - ) -> ::HRESULT, - fn CreateTextAnalyzer(&mut self, textAnalyzer: *mut *mut IDWriteTextAnalyzer) -> ::HRESULT, - fn CreateNumberSubstitution( - &mut self, substitutionMethod: DWRITE_NUMBER_SUBSTITUTION_METHOD, - localeName: *const ::WCHAR, ignoreUserOverride: ::BOOL, - numberSubstitution: *mut *mut IDWriteNumberSubstitution - ) -> ::HRESULT, - fn CreateGlyphRunAnalysis( - &mut self, glyphRun: *const DWRITE_GLYPH_RUN, pixelsPerDip: ::FLOAT, - transform: *const DWRITE_MATRIX, renderingMode: DWRITE_RENDERING_MODE, - measuringMode: ::DWRITE_MEASURING_MODE, baselineOriginX: ::FLOAT, - baselineOriginY: ::FLOAT, glyphRunAnalysis: *mut *mut IDWriteGlyphRunAnalysis - ) -> ::HRESULT -}} -pub const FACILITY_DWRITE: ::HRESULT = 0x898; -pub const DWRITE_ERR_BASE: ::HRESULT = 0x5000; -#[inline] -pub fn MAKE_DWRITE_HR(severity: ::HRESULT, code: ::HRESULT) -> ::HRESULT { - ::MAKE_HRESULT(severity, FACILITY_DWRITE, DWRITE_ERR_BASE + code) -} -#[inline] -pub fn MAKE_DWRITE_HR_ERR(code: ::HRESULT) -> ::HRESULT { - MAKE_DWRITE_HR(::SEVERITY_ERROR, code) -} diff --git a/deps/winapi-0.2.5/src/dxgi.rs b/deps/winapi-0.2.5/src/dxgi.rs deleted file mode 100644 index 9a9b152fe..000000000 --- a/deps/winapi-0.2.5/src/dxgi.rs +++ /dev/null @@ -1,258 +0,0 @@ -// Copyright © 2015; Connor Hilarides -// Licensed under the MIT License <LICENSE.md> -//! Mappings for the contents of dxgi.h -STRUCT!{struct DXGI_FRAME_STATISTICS { - PresentCount: ::UINT, - PresentRefreshCount: ::UINT, - SyncRefreshCount: ::UINT, - SyncQPCTime: ::LARGE_INTEGER, - SyncGPUTime: ::LARGE_INTEGER, -}} -STRUCT!{struct DXGI_MAPPED_RECT { - Pitch: ::INT, - pBits: *mut ::BYTE, -}} -#[repr(C)] #[derive(Copy)] -pub struct DXGI_ADAPTER_DESC { - pub Description: [::WCHAR; 128], - pub VectorId: ::UINT, - pub DeviceId: ::UINT, - pub SubSysId: ::UINT, - pub Revision: ::UINT, - pub DedicatedVideoMemory: ::SIZE_T, - pub DedicatedSystemMemory: ::SIZE_T, - pub SharedSystemMemory: ::SIZE_T, - pub AdapterLuid: ::LUID, -} -impl Clone for DXGI_ADAPTER_DESC { - fn clone(&self) -> DXGI_ADAPTER_DESC { - *self - } -} -#[repr(C)] #[derive(Copy)] -pub struct DXGI_OUTPUT_DESC { - pub DeviceName: [::WCHAR; 32], - pub DesktopCoordinates: ::RECT, - pub AttachedToDesktop: ::BOOL, - pub Rotation: ::DXGI_MODE_ROTATION, - pub Monitor: ::HMONITOR, -} -impl Clone for DXGI_OUTPUT_DESC { - fn clone(&self) -> DXGI_OUTPUT_DESC { - *self - } -} -STRUCT!{struct DXGI_SHARED_RESOURCE { - Handle: ::HANDLE, -}} -pub const DXGI_RESOURCE_PRIORITY_MINIMUM: ::DWORD = 0x28000000; -pub const DXGI_RESOURCE_PRIORITY_LOW: ::DWORD = 0x50000000; -pub const DXGI_RESOURCE_PRIORITY_NORMAL: ::DWORD = 0x78000000; -pub const DXGI_RESOURCE_PRIORITY_HIGH: ::DWORD = 0xa0000000; -pub const DXGI_RESOURCE_PRIORITY_MAXIMUM: ::DWORD = 0xc8000000; -ENUM!{enum DXGI_RESIDENCY { - DXGI_RESIDENCY_FULLY_RESIDENT = 1, - DXGI_RESIDENCY_RESIDENT_IN_SHARED_MEMORY = 2, - DXGI_RESIDENCY_EVICTED_TO_DISK = 3, -}} -STRUCT!{struct DXGI_SURFACE_DESC { - Width: ::UINT, - Height: ::UINT, - Format: ::DXGI_FORMAT, - SampleDesc: ::DXGI_SAMPLE_DESC, -}} -ENUM!{enum DXGI_SWAP_EFFECT { - DXGI_SWAP_EFFECT_DISCARD = 0, - DXGI_SWAP_EFFECT_SEQUENTIAL = 1, - DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL = 3, -}} -FLAGS!{enum DXGI_SWAP_CHAIN_FLAG { - DXGI_SWAP_CHAIN_FLAG_NONPREROTATED = 1, - DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH = 2, - DXGI_SWAP_CHAIN_FLAG_GDI_COMPATIBLE = 4, - DXGI_SWAP_CHAIN_FLAG_RESTRICTED_CONTENT = 8, - DXGI_SWAP_CHAIN_FLAG_RESTRICT_SHARED_RESOURCE_DRIVER = 16, - DXGI_SWAP_CHAIN_FLAG_DISPLAY_ONLY = 32, - DXGI_SWAP_CHAIN_FLAG_FRAME_LATENCY_WAITABLE_OBJECT = 64, - DXGI_SWAP_CHAIN_FLAG_FOREGROUND_LAYER = 128, - DXGI_SWAP_CHAIN_FLAG_FULLSCREEN_VIDEO = 256, - DXGI_SWAP_CHAIN_FLAG_YUV_VIDEO = 512, -}} -STRUCT!{struct DXGI_SWAP_CHAIN_DESC { - BufferDesc: ::DXGI_MODE_DESC, - SampleDesc: ::DXGI_SAMPLE_DESC, - BufferUsage: ::DXGI_USAGE, - BufferCount: ::UINT, - OutputWindow: ::HWND, - Windowed: ::BOOL, - SwapEffect: DXGI_SWAP_EFFECT, - Flags: ::UINT, -}} -RIDL!( -interface IDXGIObject(IDXGIObjectVtbl): IUnknown(IUnknownVtbl) { - fn SetPrivateData( - &mut self, Name: ::REFGUID, DataSize: ::UINT, pData: *const ::c_void - ) -> ::HRESULT, - fn SetPrivateDataInterface(&mut self, Name: ::REFGUID, pUnknown: *const ::IUnknown) -> ::HRESULT, - fn GetPrivateData( - &mut self, Name: ::REFGUID, pDataSize: *mut ::UINT, pData: *mut ::c_void - ) -> ::HRESULT, - fn GetParent( - &mut self, riid: ::REFIID, ppParent: *mut *mut ::c_void - ) -> ::HRESULT -}); -RIDL!( -interface IDXGIDeviceSubObject(IDXGIDeviceSubObjectVtbl): IDXGIObject(IDXGIObjectVtbl) { - fn GetDevice(&mut self, riid: ::REFIID, ppDevice: *mut *mut ::c_void) -> ::HRESULT -}); -RIDL!( -interface IDXGIResource(IDXGIResourceVtbl): IDXGIDeviceSubObject(IDXGIDeviceSubObjectVtbl) { - fn GetSharedHandle(&mut self, pSharedHandle: *mut ::HANDLE) -> ::HRESULT, - fn GetUsage(&mut self, pUsage: *mut ::DXGI_USAGE) -> ::HRESULT, - fn SetEvictionPriority(&mut self, EvictionPriority: ::UINT) -> ::HRESULT, - fn GetEvictionPriority(&mut self, pEvictionPriority: *mut ::UINT) -> ::HRESULT -}); -RIDL!( -interface IDXGIKeyedMutex(IDXGIKeyedMutexVtbl): IDXGIDeviceSubObject(IDXGIDeviceSubObjectVtbl) { - fn AcquireSync(&mut self, Key: ::UINT64, dwMilliseconds: ::DWORD) -> ::HRESULT, - fn ReleaseSync(&mut self, Key: ::UINT64) -> ::HRESULT -}); -RIDL!( -interface IDXGISurface(IDXGISurfaceVtbl): IDXGIDeviceSubObject(IDXGIDeviceSubObjectVtbl) { - fn GetDesc(&mut self, pDesc: *mut DXGI_SURFACE_DESC) -> ::HRESULT, - fn Map(&mut self, pLockedRect: *mut DXGI_MAPPED_RECT, MapFlags: ::UINT) -> ::HRESULT, - fn Unmap(&mut self) -> ::HRESULT -}); -RIDL!( -interface IDXGISurface1(IDXGISurface1Vtbl): IDXGISurface(IDXGISurfaceVtbl) { - fn GetDC(&mut self, Discard: ::BOOL, phdc: *mut ::HDC) -> ::HRESULT, - fn ReleaseDC(&mut self, pDirtyRect: *mut ::RECT) -> ::HRESULT -}); -RIDL!( -interface IDXGIAdapter(IDXGIAdapterVtbl): IDXGIObject(IDXGIObjectVtbl) { - fn EnumOutputs(&mut self, Output: ::UINT, ppOutput: *mut *mut IDXGIOutput) -> ::HRESULT, - fn GetDesc(&mut self, pDesc: *mut DXGI_ADAPTER_DESC) -> ::HRESULT, - fn CheckInterfaceSupport( - &mut self, InterfaceName: ::REFGUID, pUMDVersion: *mut ::LARGE_INTEGER - ) -> ::HRESULT -}); -RIDL!( -interface IDXGIOutput(IDXGIOutputVtbl): IDXGIObject(IDXGIObjectVtbl) { - fn GetDesc(&mut self, pDesc: *mut DXGI_OUTPUT_DESC) -> ::HRESULT, - fn GetDisplayModeList( - &mut self, EnumFormat: ::DXGI_FORMAT, Flags: ::UINT, pNumModes: *mut ::UINT, - pDesc: *mut ::DXGI_MODE_DESC - ) -> ::HRESULT, - fn FindClosestMatchingMode( - &mut self, pModeToMatch: *const ::DXGI_MODE_DESC, pClosestMatch: *mut ::DXGI_MODE_DESC, - pConcernedDevice: *mut ::IUnknown - ) -> ::HRESULT, - fn WaitForVBlank(&mut self) -> ::HRESULT, - fn TakeOwnership(&mut self, pDevice: *mut ::IUnknown, Exclusive: ::BOOL) -> ::HRESULT, - fn ReleaseOwnership(&mut self) -> (), - fn GetGammaControlCapabilities( - &mut self, pGammaCaps: *mut ::DXGI_GAMMA_CONTROL_CAPABILITIES - ) -> ::HRESULT, - fn SetGammaControl(&mut self, pArray: *const ::DXGI_GAMMA_CONTROL) -> ::HRESULT, - fn GetGammaControl(&mut self, pArray: *mut ::DXGI_GAMMA_CONTROL) -> ::HRESULT, - fn SetDisplaySurface(&mut self, pScanoutSurface: *mut IDXGISurface) -> ::HRESULT, - fn GetDisplaySurfaceData(&mut self, pDestination: *mut IDXGISurface) -> ::HRESULT, - fn GetFrameStatistics(&mut self, pStats: *mut DXGI_FRAME_STATISTICS) -> ::HRESULT -}); -pub const DXGI_MAX_SWAP_CHAIN_BUFFERS: ::DWORD = 16; -pub const DXGI_PRESENT_TEST: ::DWORD = 0x00000001; -pub const DXGI_PRESENT_DO_NOT_SEQUENCE: ::DWORD = 0x00000002; -pub const DXGI_PRESENT_RESTART: ::DWORD = 0x00000004; -pub const DXGI_PRESENT_DO_NOT_WAIT: ::DWORD = 0x00000008; -pub const DXGI_PRESENT_STEREO_PREFER_RIGHT: ::DWORD = 0x00000010; -pub const DXGI_PRESENT_STEREO_TEMPORARY_MONO: ::DWORD = 0x00000020; -pub const DXGI_PRESENT_RESTRICT_TO_OUTPUT: ::DWORD = 0x00000040; -pub const DXGI_PRESENT_USE_DURATION: ::DWORD = 0x00000100; -RIDL!( -interface IDXGISwapChain(IDXGISwapChainVtbl): IDXGIDeviceSubObject(IDXGIDeviceSubObjectVtbl) { - fn Present(&mut self, SyncInterval: ::UINT, Flags: ::UINT) -> ::HRESULT, - fn GetBuffer( - &mut self, Buffer: ::UINT, riid: ::REFIID, ppSurface: *mut *mut ::c_void - ) -> ::HRESULT, - fn SetFullscreenState(&mut self, Fullscreen: ::BOOL, pTarget: *mut IDXGIOutput) -> ::HRESULT, - fn GetFullscreenState( - &mut self, pFullscreen: *mut ::BOOL, ppTarget: *mut *mut IDXGIOutput - ) -> ::HRESULT, - fn GetDesc(&mut self, pDesc: *mut DXGI_SWAP_CHAIN_DESC) -> ::HRESULT, - fn ResizeBuffers( - &mut self, BufferCount: ::UINT, Width: ::UINT, Height: ::UINT, NewFormat: ::DXGI_FORMAT, - SwapChainFlags: ::UINT - ) -> ::HRESULT, - fn ResizeTarget(&mut self, pNewTargetParameters: *const ::DXGI_MODE_DESC) -> ::HRESULT, - fn GetContainingOutput(&mut self, ppOutput: *mut *mut IDXGIOutput) -> ::HRESULT, - fn GetFrameStatistics(&mut self, pStats: *mut DXGI_FRAME_STATISTICS) -> ::HRESULT, - fn GetLastPresentCount(&mut self, pLastPresentCount: *mut ::UINT) -> ::HRESULT -}); -RIDL!( -interface IDXGIFactory(IDXGIFactoryVtbl): IDXGIObject(IDXGIObjectVtbl) { - fn EnumAdapters(&mut self, Adapter: ::UINT, ppAdapter: *mut *mut IDXGIAdapter) -> ::HRESULT, - fn MakeWindowAssociation(&mut self, WindowHandle: ::HWND, Flags: ::UINT) -> ::HRESULT, - fn GetWindowAssociation(&mut self, pWindowHandle: *mut ::HWND) -> ::HRESULT, - fn CreateSwapChan( - &mut self, pDevice: *mut ::IUnknown, pDesc: *mut DXGI_SWAP_CHAIN_DESC, - ppSwapChain: *mut *mut IDXGISwapChain - ) -> ::HRESULT, - fn CreateSoftwareAdapter( - &mut self, Module: ::HMODULE, ppAdapter: *mut *mut IDXGIAdapter - ) -> ::HRESULT -}); -RIDL!( -interface IDXGIDevice(IDXGIDeviceVtbl): IDXGIObject(IDXGIObjectVtbl) { - fn GetAdapter(&mut self, pAdapter: *mut *mut IDXGIAdapter) -> ::HRESULT, - fn CreateSurface( - &mut self, pDesc: *const DXGI_SURFACE_DESC, NumSurfaces: ::UINT, Usage: ::DXGI_USAGE, - pSharedResource: *const DXGI_SHARED_RESOURCE, ppSurface: *mut *mut IDXGISurface - ) -> ::HRESULT, - fn QueryResourceResidency( - &mut self, ppResources: *const *mut ::IUnknown, pResidencyStatus: *mut DXGI_RESIDENCY, - NumResources: ::UINT - ) -> ::HRESULT, - fn SetGPUThreadPriority(&mut self, Priority: ::INT) -> ::HRESULT, - fn GetGPUThreadPriority(&mut self, pPriority: *mut ::INT) -> ::HRESULT -}); -ENUM!{enum DXGI_ADAPTER_FLAG { - DXGI_ADAPTER_FLAG_NONE, - DXGI_ADAPTER_FLAG_REMOTE, - DXGI_ADAPTER_FLAG_SOFTWARE, -}} -#[repr(C)] #[derive(Copy)] -pub struct DXGI_ADAPTER_DESC1 { - pub Description: [::WCHAR; 128], - pub VendorId: ::UINT, - pub DeviceId: ::UINT, - pub SubSysId: ::UINT, - pub Revision: ::UINT, - pub DedicatedVideoMemory: ::SIZE_T, - pub DedicatedSystemMemory: ::SIZE_T, - pub SharedSystemMemory: ::SIZE_T, - pub AdapterLuid: ::LUID, - pub Flags: ::UINT, -} -impl Clone for DXGI_ADAPTER_DESC1 { - fn clone(&self) -> DXGI_ADAPTER_DESC1 { - *self - } -} -STRUCT!{struct DXGI_DISPLAY_COLOR_SPACE { - PrimaryCoordinates: [[::FLOAT; 2]; 8], - WhitePoints: [[::FLOAT; 2]; 16], -}} -RIDL!( -interface IDXGIFactory1(IDXGIFactory1Vtbl): IDXGIFactory(IDXGIFactoryVtbl) { - fn EnumAdapters1(&mut self, Adapter: ::UINT, ppAdapter: *mut *mut IDXGIAdapter1) -> ::HRESULT, - fn IsCurrent(&mut self) -> ::BOOL -}); -RIDL!( -interface IDXGIAdapter1(IDXGIAdapter1Vtbl): IDXGIAdapter(IDXGIAdapterVtbl) { - fn GetDesc1(&mut self, pDesc: *mut DXGI_ADAPTER_DESC1) -> ::HRESULT -}); -RIDL!( -interface IDXGIDevice1(IDXGIDevice1Vtbl): IDXGIDevice(IDXGIDeviceVtbl) { - fn SetMaximumFrameLatency(&mut self, MaxLatency: ::UINT) -> ::HRESULT, - fn GetMaximumFrameLatency(&mut self, pMaxLatency: *mut ::UINT) -> ::HRESULT -}); diff --git a/deps/winapi-0.2.5/src/dxgi1_2.rs b/deps/winapi-0.2.5/src/dxgi1_2.rs deleted file mode 100644 index f8f1c82ee..000000000 --- a/deps/winapi-0.2.5/src/dxgi1_2.rs +++ /dev/null @@ -1,321 +0,0 @@ -// Copyright © 2015; Dmitry Roschin -// Licensed under the MIT License <LICENSE.md> -//! Mappings for the contents of dxgi1_2.h - -ENUM!{ enum DXGI_ALPHA_MODE { - DXGI_ALPHA_MODE_UNSPECIFIED = 0, - DXGI_ALPHA_MODE_PREMULTIPLIED = 1, - DXGI_ALPHA_MODE_STRAIGHT = 2, - DXGI_ALPHA_MODE_IGNORE = 3, - DXGI_ALPHA_MODE_FORCE_DWORD = 0xFFFFFFFF, -}} - -ENUM!{ enum DXGI_COMPUTE_PREEMPTION_GRANULARITY { - DXGI_COMPUTE_PREEMPTION_DMA_BUFFER_BOUNDARY = 0, - DXGI_COMPUTE_PREEMPTION_DISPATCH_BOUNDARY = 1, - DXGI_COMPUTE_PREEMPTION_THREAD_GROUP_BOUNDARY = 2, - DXGI_COMPUTE_PREEMPTION_THREAD_BOUNDARY = 3, - DXGI_COMPUTE_PREEMPTION_INSTRUCTION_BOUNDARY = 4, -}} - -ENUM!{ enum DXGI_GRAPHICS_PREEMPTION_GRANULARITY { - DXGI_GRAPHICS_PREEMPTION_DMA_BUFFER_BOUNDARY = 0, - DXGI_GRAPHICS_PREEMPTION_PRIMITIVE_BOUNDARY = 1, - DXGI_GRAPHICS_PREEMPTION_TRIANGLE_BOUNDARY = 2, - DXGI_GRAPHICS_PREEMPTION_PIXEL_BOUNDARY = 3, - DXGI_GRAPHICS_PREEMPTION_INSTRUCTION_BOUNDARY = 4, -}} - -ENUM!{ enum DXGI_OUTDUPL_POINTER_SHAPE_TYPE { - DXGI_OUTDUPL_POINTER_SHAPE_TYPE_MONOCHROME = 1, - DXGI_OUTDUPL_POINTER_SHAPE_TYPE_COLOR = 2, - DXGI_OUTDUPL_POINTER_SHAPE_TYPE_MASKED_COLOR = 4, -}} - -ENUM!{ enum DXGI_SCALING { - DXGI_SCALING_STRETCH = 0, - DXGI_SCALING_NONE = 1, - DXGI_SCALING_ASPECT_RATIO_STRETCH = 2, -}} - -ENUM!{ enum _DXGI_OFFER_RESOURCE_PRIORITY { - DXGI_OFFER_RESOURCE_PRIORITY_LOW = 1, - DXGI_OFFER_RESOURCE_PRIORITY_NORMAL = 2, - DXGI_OFFER_RESOURCE_PRIORITY_HIGH = 3, -}} - -#[repr(C)] #[derive(Copy)] -pub struct DXGI_ADAPTER_DESC2 { - pub Description: [::WCHAR; 128], - pub VendorId: ::UINT, - pub DeviceId: ::UINT, - pub SubSysId: ::UINT, - pub Revision: ::UINT, - pub DedicatedVideoMemory: ::SIZE_T, - pub DedicatedSystemMemory: ::SIZE_T, - pub SharedSystemMemory: ::SIZE_T, - pub AdapterLuid: ::LUID, - pub Flags: ::UINT, - pub GraphicsPreemptionGranularity: ::DXGI_GRAPHICS_PREEMPTION_GRANULARITY, - pub ComputePreemptionGranularity: ::DXGI_COMPUTE_PREEMPTION_GRANULARITY, -} - -impl Clone for DXGI_ADAPTER_DESC2 { - fn clone(&self) -> Self { *self } -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct DXGI_MODE_DESC1 { - pub Width: ::UINT, - pub Height: ::UINT, - pub RefreshRate: ::DXGI_RATIONAL, - pub Format: ::DXGI_FORMAT, - pub ScanlineOrdering: ::DXGI_MODE_SCANLINE_ORDER, - pub Scaling: ::DXGI_MODE_SCALING, - pub Stereo: ::BOOL, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct DXGI_OUTDUPL_DESC { - pub ModeDesc: ::DXGI_MODE_DESC, - pub Rotation: ::DXGI_MODE_ROTATION, - pub DesktopImageInSystemMemory: ::BOOL, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct DXGI_OUTDUPL_FRAME_INFO { - pub LastPresentTime: ::LARGE_INTEGER, - pub LastMouseUpdateTime: ::LARGE_INTEGER, - pub AccumulatedFrames: ::UINT, - pub RectsCoalesced: ::BOOL, - pub ProtectedContentMaskedOut: ::BOOL, - pub PointerPosition: ::DXGI_OUTDUPL_POINTER_POSITION, - pub TotalMetadataBufferSize: ::UINT, - pub PointerShapeBufferSize: ::UINT, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct DXGI_OUTDUPL_MOVE_RECT { - pub SourcePoint: ::POINT, - pub DestinationRect: ::RECT, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct DXGI_OUTDUPL_POINTER_POSITION { - pub Position: ::POINT, - pub Visible: ::BOOL, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct DXGI_OUTDUPL_POINTER_SHAPE_INFO { - pub Type: ::UINT, - pub Width: ::UINT, - pub Height: ::UINT, - pub Pitch: ::UINT, - pub HotSpot: ::POINT, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct DXGI_PRESENT_PARAMETERS { - pub DirtyRectsCount: ::UINT, - pub pDirtyRects: *mut ::RECT, - pub pScrollRect: *mut ::RECT, - pub pScrollOffset: *mut ::POINT, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct DXGI_SWAP_CHAIN_DESC1 { - pub Width: ::UINT, - pub Height: ::UINT, - pub Format: ::DXGI_FORMAT, - pub Stereo: ::BOOL, - pub SampleDesc: ::DXGI_SAMPLE_DESC, - pub BufferUsage: ::DXGI_USAGE, - pub BufferCount: ::UINT, - pub Scaling: ::DXGI_SCALING, - pub SwapEffect: ::DXGI_SWAP_EFFECT, - pub AlphaMode: ::DXGI_ALPHA_MODE, - pub Flags: ::UINT, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct DXGI_SWAP_CHAIN_FULLSCREEN_DESC { - pub RefreshRate: ::DXGI_RATIONAL, - pub ScanlineOrdering: ::DXGI_MODE_SCANLINE_ORDER, - pub Scaling: ::DXGI_MODE_SCALING, - pub Windowed: ::BOOL, -} - -RIDL!( -interface IDXGIAdapter2(IDXGIAdapter2Vtbl): IDXGIAdapter1(IDXGIAdapter1Vtbl) { - fn GetDesc2(&mut self, pDesc: *mut ::DXGI_ADAPTER_DESC2) -> ::HRESULT -}); - -RIDL!( -interface IDXGIDevice2(IDXGIDevice2Vtbl): IDXGIDevice1(IDXGIDevice1Vtbl) { - fn OfferResources( - &mut self, NumResources: ::UINT, ppResources: *mut *mut ::IDXGIResource, - Priority: ::DXGI_OFFER_RESOURCE_PRIORITY - ) -> ::HRESULT, - fn ReclaimResources( - &mut self, NumResources: ::UINT, ppResources: *mut *mut ::IDXGIResource, - pDiscarded: *mut ::BOOL - ) -> ::HRESULT, - fn EnqueueSetEvent(&mut self, hEvent: ::HANDLE) -> ::HRESULT -}); - -RIDL!( -interface IDXGIDisplayControl(IDXGIDisplayControlVtbl): IUnknown(IUnknownVtbl) { - fn IsStereoEnabled(&mut self) -> ::BOOL, - fn SetStereoEnabled(&mut self, enabled: ::BOOL) -> () -}); - -RIDL!( -interface IDXGIFactory2(IDXGIFactory2Vtbl): IDXGIFactory1(IDXGIFactory1Vtbl) { - fn IsWindowedStereoEnabled(&mut self) -> ::BOOL, - fn CreateSwapChainForHwnd( - &mut self, pDevice: *mut ::IUnknown, hWnd: ::HWND, pDesc: *const ::DXGI_SWAP_CHAIN_DESC1, - pFullscreenDesc: *const ::DXGI_SWAP_CHAIN_FULLSCREEN_DESC, - pRestrictToOutput: *mut ::IDXGIOutput, ppSwapChain: *mut *mut ::IDXGISwapChain1 - ) -> ::HRESULT, - fn CreateSwapChainForCoreWindow( - &mut self, pDevice: *mut ::IUnknown, pWindow: *mut ::IUnknown, - pDesc: *const ::DXGI_SWAP_CHAIN_DESC1, pRestrictToOutput: *mut ::IDXGIOutput, - ppSwapChain: *mut *mut ::IDXGISwapChain1 - ) -> ::HRESULT, - fn GetSharedResourceAdapterLuid( - &mut self, hResource: ::HANDLE, pLuid: *mut ::LUID - ) -> ::HRESULT, - fn RegisterStereoStatusWindow( - &mut self, WindowHandle: ::HWND, wMsg: ::UINT, pdwCookie: *mut ::DWORD - ) -> ::HRESULT, - fn RegisterStereoStatusEvent( - &mut self, hEvent: ::HANDLE, pdwCookie: *mut ::DWORD - ) -> ::HRESULT, - fn UnregisterStereoStatus(&mut self, dwCookie: ::DWORD) -> (), - fn RegisterOcclusionStatusWindow( - &mut self, WindowHandle: ::HWND, wMsg: ::UINT, pdwCookie: *mut ::DWORD - ) -> ::HRESULT, - fn RegisterOcclusionStatusEvent( - &mut self, hEvent: ::HANDLE, pdwCookie: *mut ::DWORD - ) -> ::HRESULT, - fn UnregisterOcclusionStatus(&mut self, dwCookie: ::DWORD) -> (), - fn CreateSwapChainForComposition( - &mut self, pDevice: *mut ::IUnknown, pDesc: *const ::DXGI_SWAP_CHAIN_DESC1, - pRestrictToOutput: *mut ::IDXGIOutput, ppSwapChain: *mut *mut ::IDXGISwapChain1 - ) -> ::HRESULT -}); - -RIDL!( -interface IDXGIOutput1(IDXGIOutput1Vtbl): IDXGIOutput(IDXGIOutputVtbl) { - fn GetDisplayModeList1( - &mut self, EnumFormat: ::DXGI_FORMAT, Flags: ::UINT, pNumModes: *mut ::UINT, - pDesc: *mut ::DXGI_MODE_DESC1 - ) -> ::HRESULT, - fn FindClosestMatchingMode1( - &mut self, pModeToMatch: *const ::DXGI_MODE_DESC1, pClosestMatch: *mut ::DXGI_MODE_DESC1, - pConcernedDevice: *mut ::IUnknown - ) -> ::HRESULT, - fn GetDisplaySurfaceData1( - &mut self, pDestination: *mut ::IDXGIResource - ) -> ::HRESULT, - fn DuplicateOutput( - &mut self, pDevice: *mut ::IUnknown, - ppOutputDuplication: *mut *mut ::IDXGIOutputDuplication - ) -> ::HRESULT -}); - -RIDL!( -interface IDXGIOutputDuplication(IDXGIOutputDuplicationVtbl): IDXGIObject(IDXGIObjectVtbl) { - fn GetDesc(&mut self, pDesc: *mut ::DXGI_OUTDUPL_DESC) -> (), - fn AcquireNextFrame( - &mut self, TimeoutInMilliseconds: ::UINT, pFrameInfo: *mut ::DXGI_OUTDUPL_FRAME_INFO, - ppDesktopResource: *mut *mut ::IDXGIResource - ) -> ::HRESULT, - fn GetFrameDirtyRects( - &mut self, DirtyRectsBufferSize: ::UINT, pDirtyRectsBuffer: *mut ::RECT, - pDirtyRectsBufferSizeRequired: *mut ::UINT - ) -> ::HRESULT, - fn GetFrameMoveRects( - &mut self, MoveRectsBufferSize: ::UINT, pMoveRectBuffer: *mut ::DXGI_OUTDUPL_MOVE_RECT, - pMoveRectsBufferSizeRequired: *mut ::UINT - ) -> ::HRESULT, - fn GetFramePointerShape( - &mut self, PointerShapeBufferSize: ::UINT, pPointerShapeBuffer: *mut ::c_void, - pPointerShapeBufferSizeRequired: *mut ::UINT, - pPointerShapeInfo: *mut ::DXGI_OUTDUPL_POINTER_SHAPE_INFO - ) -> ::HRESULT, - fn MapDesktopSurface( - &mut self, pLockedRect: *mut ::DXGI_MAPPED_RECT - ) -> ::HRESULT, - fn UnMapDesktopSurface(&mut self) -> ::HRESULT, - fn ReleaseFrame(&mut self) -> ::HRESULT -}); - -RIDL!( -interface IDXGIResource1(IDXGIResource1Vtbl): IDXGIResource(IDXGIResourceVtbl) { - fn CreateSubresourceSurface( - &mut self, index: ::UINT, ppSurface: *mut *mut ::IDXGISurface2 - ) -> ::HRESULT, - fn CreateSharedHandle( - &mut self, pAttributes: *const ::SECURITY_ATTRIBUTES, dwAccess: ::DWORD, lpName: ::LPCWSTR, - pHandle: *mut ::HANDLE - ) -> ::HRESULT -}); - -RIDL!( -interface IDXGISurface2(IDXGISurface2Vtbl): IDXGISurface1(IDXGISurface1Vtbl) { - fn GetResource( - &mut self, riid: ::REFGUID, ppParentResource: *mut *mut ::c_void, - pSubresourceIndex: *mut ::UINT - ) -> ::HRESULT -}); - -RIDL!( -interface IDXGISwapChain1(IDXGISwapChain1Vtbl): IDXGISwapChain(IDXGISwapChainVtbl) { - fn GetDesc1(&mut self, pDesc: *mut ::DXGI_SWAP_CHAIN_DESC1) -> ::HRESULT, - fn GetFullscreenDesc( - &mut self, pDesc: *mut ::DXGI_SWAP_CHAIN_FULLSCREEN_DESC - ) -> ::HRESULT, - fn GetHwnd(&mut self, pHwnd: *mut ::HWND) -> ::HRESULT, - fn GetCoreWindow( - &mut self, refiid: ::REFGUID, ppUnk: *mut *mut ::c_void - ) -> ::HRESULT, - fn Present1( - &mut self, SyncInterval: ::UINT, PresentFlags: ::UINT, - pPresentParameters: *const ::DXGI_PRESENT_PARAMETERS - ) -> ::HRESULT, - fn IsTemporaryMonoSupported(&mut self) -> ::BOOL, - fn GetRestrictToOutput( - &mut self, ppRestrictToOutput: *mut *mut ::IDXGIOutput - ) -> ::HRESULT, - fn SetBackgroundColor(&mut self, pColor: *const ::DXGI_RGBA) -> ::HRESULT, - fn GetBackgroundColor(&mut self, pColor: *mut ::DXGI_RGBA) -> ::HRESULT, - fn SetRotation(&mut self, Rotation: ::DXGI_MODE_ROTATION) -> ::HRESULT, - fn GetRotation(&mut self, pRotation: *mut ::DXGI_MODE_ROTATION) -> ::HRESULT -}); - -pub type DXGI_OFFER_RESOURCE_PRIORITY = ::_DXGI_OFFER_RESOURCE_PRIORITY; -pub const DXGI_ENUM_MODES_DISABLED_STEREO: ::UINT = 8; -pub const DXGI_ENUM_MODES_STEREO: ::UINT = 4; -pub const DXGI_SHARED_RESOURCE_READ: ::UINT = 0x80000000; -pub const DXGI_SHARED_RESOURCE_WRITE: ::UINT = 1; - -DEFINE_GUID!(IID_IDXGIDisplayControl,0xea9dbf1a,0xc88e,0x4486,0x85,0x4a,0x98, - 0xaa,0x01,0x38,0xf3,0x0c); -DEFINE_GUID!(IID_IDXGIOutputDuplication,0x191cfac3,0xa341,0x470d,0xb2,0x6e, - 0xa8,0x64,0xf4,0x28,0x31,0x9c); -DEFINE_GUID!(IID_IDXGISurface2,0xaba496dd,0xb617,0x4cb8,0xa8,0x66,0xbc,0x44, - 0xd7,0xeb,0x1f,0xa2); -DEFINE_GUID!(IID_IDXGIResource1,0x30961379,0x4609,0x4a41,0x99,0x8e,0x54,0xfe, - 0x56,0x7e,0xe0,0xc1); -DEFINE_GUID!(IID_IDXGIDevice2,0x05008617,0xfbfd,0x4051,0xa7,0x90,0x14,0x48, - 0x84,0xb4,0xf6,0xa9); -DEFINE_GUID!(IID_IDXGISwapChain1,0x790a45f7,0x0d42,0x4876,0x98,0x3a,0x0a,0x55, - 0xcf,0xe6,0xf4,0xaa); -DEFINE_GUID!(IID_IDXGIFactory2,0x50c83a1c,0xe072,0x4c48,0x87,0xb0,0x36,0x30, - 0xfa,0x36,0xa6,0xd0); -DEFINE_GUID!(IID_IDXGIAdapter2,0x0AA1AE0A,0xFA0E,0x4B84,0x86,0x44,0xE0,0x5F, - 0xF8,0xE5,0xAC,0xB5); -DEFINE_GUID!(IID_IDXGIOutput1,0x00cddea8,0x939b,0x4b83,0xa3,0x40,0xa6,0x85, - 0x22,0x66,0x66,0xcc); diff --git a/deps/winapi-0.2.5/src/dxgi1_3.rs b/deps/winapi-0.2.5/src/dxgi1_3.rs deleted file mode 100644 index 7f53095e5..000000000 --- a/deps/winapi-0.2.5/src/dxgi1_3.rs +++ /dev/null @@ -1,151 +0,0 @@ -// Copyright © 2015; Dmitry Roschin -// Licensed under the MIT License <LICENSE.md> -//! Mappings for the contents of dxgi1_3.h - -ENUM!{ enum DXGI_FRAME_PRESENTATION_MODE { - DXGI_FRAME_PRESENTATION_MODE_COMPOSED = 0, - DXGI_FRAME_PRESENTATION_MODE_OVERLAY = 1, - DXGI_FRAME_PRESENTATION_MODE_NONE = 2, - DXGI_FRAME_PRESENTATION_MODE_COMPOSITION_FAILURE = 3, -}} - -FLAGS!{ enum DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAGS { - DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAG_NOMINAL_RANGE = 0x1, - DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAG_BT709 = 0x2, - DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAG_xvYCC = 0x4, -}} - -FLAGS!{ enum DXGI_OVERLAY_SUPPORT_FLAG { - DXGI_OVERLAY_SUPPORT_FLAG_DIRECT = 0x1, - DXGI_OVERLAY_SUPPORT_FLAG_SCALING = 0x2, -}} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct DXGI_DECODE_SWAP_CHAIN_DESC { - pub Flags: ::UINT, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct DXGI_FRAME_STATISTICS_MEDIA { - pub PresentCount: ::UINT, - pub PresentRefreshCount: ::UINT, - pub SyncRefreshCount: ::UINT, - pub SyncQPCTime: ::LARGE_INTEGER, - pub SyncGPUTime: ::LARGE_INTEGER, - pub CompositionMode: ::DXGI_FRAME_PRESENTATION_MODE, - pub ApprovedPresentDuration: ::UINT, -} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct DXGI_MATRIX_3X2_F { - pub _11: ::FLOAT, - pub _12: ::FLOAT, - pub _21: ::FLOAT, - pub _22: ::FLOAT, - pub _31: ::FLOAT, - pub _32: ::FLOAT, -} - -RIDL!( -interface IDXGIDecodeSwapChain(IDXGIDecodeSwapChainVtbl): IUnknown(IUnknownVtbl) { - fn PresentBuffer( - &mut self, BufferToPresent: ::UINT, SyncInterval: ::UINT, Flags: ::UINT - ) -> ::HRESULT, - fn SetSourceRect(&mut self, pRect: *const ::RECT) -> ::HRESULT, - fn SetTargetRect(&mut self, pRect: *const ::RECT) -> ::HRESULT, - fn SetDestSize(&mut self, Width: ::UINT, Height: ::UINT) -> ::HRESULT, - fn GetSourceRect(&mut self, pRect: *mut ::RECT) -> ::HRESULT, - fn GetTargetRect(&mut self, pRect: *mut ::RECT) -> ::HRESULT, - fn GetDestSize( - &mut self, pWidth: *mut ::UINT, pHeight: *mut ::UINT - ) -> ::HRESULT, - fn SetColorSpace( - &mut self, ColorSpace: ::DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAGS - ) -> ::HRESULT, - fn GetColorSpace(&mut self) -> ::DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAGS -}); - -RIDL!( -interface IDXGIDevice3(IDXGIDevice3Vtbl): IDXGIDevice2(IDXGIDevice2Vtbl) { - fn Trim(&mut self) -> () -}); - -RIDL!( -interface IDXGIFactory3(IDXGIFactory3Vtbl): IDXGIFactory2(IDXGIFactory2Vtbl) { - fn GetCreationFlags(&mut self) -> ::UINT -}); - -RIDL!( -interface IDXGIFactoryMedia(IDXGIFactoryMediaVtbl): IUnknown(IUnknownVtbl) { - fn CreateSwapChainForCompositionSurfaceHandle( - &mut self, pDevice: *mut ::IUnknown, hSurface: ::HANDLE, - pDesc: *const ::DXGI_SWAP_CHAIN_DESC1, pRestrictToOutput: *mut ::IDXGIOutput, - ppSwapChain: *mut *mut ::IDXGISwapChain1 - ) -> ::HRESULT, - fn CreateDecodeSwapChainForCompositionSurfaceHandle( - &mut self, pDevice: *mut ::IUnknown, hSurface: ::HANDLE, - pDesc: *mut ::DXGI_DECODE_SWAP_CHAIN_DESC, pYuvDecodeBuffers: *mut ::IDXGIResource, - pRestrictToOutput: *mut ::IDXGIOutput, ppSwapChain: *mut *mut ::IDXGIDecodeSwapChain - ) -> ::HRESULT -}); - -RIDL!( -interface IDXGIOutput2(IDXGIOutput2Vtbl): IDXGIOutput1(IDXGIOutput1Vtbl) { - fn SupportsOverlays(&mut self) -> ::BOOL -}); - -RIDL!( -interface IDXGIOutput3(IDXGIOutput3Vtbl): IDXGIOutput2(IDXGIOutput2Vtbl) { - fn CheckOverlaySupport( - &mut self, EnumFormat: ::DXGI_FORMAT, pConcernedDevice: *mut ::IUnknown, - pFlags: *mut ::UINT - ) -> ::HRESULT -}); - -RIDL!( -interface IDXGISwapChain2(IDXGISwapChain2Vtbl): IDXGISwapChain1(IDXGISwapChain1Vtbl) { - fn SetSourceSize(&mut self, Width: ::UINT, Height: ::UINT) -> ::HRESULT, - fn GetSourceSize( - &mut self, pWidth: *mut ::UINT, pHeight: *mut ::UINT - ) -> ::HRESULT, - fn SetMaximumFrameLatency(&mut self, MaxLatency: ::UINT) -> ::HRESULT, - fn GetMaximumFrameLatency(&mut self, pMaxLatency: *mut ::UINT) -> ::HRESULT, - fn GetFrameLatencyWaitableObject(&mut self) -> ::HANDLE, - fn SetMatrixTransform( - &mut self, pMatrix: *const ::DXGI_MATRIX_3X2_F - ) -> ::HRESULT, - fn GetMatrixTransform( - &mut self, pMatrix: *mut ::DXGI_MATRIX_3X2_F - ) -> ::HRESULT -}); - -RIDL!( -interface IDXGISwapChainMedia(IDXGISwapChainMediaVtbl): IUnknown(IUnknownVtbl) { - fn GetFrameStatisticsMedia( - &mut self, pStats: *mut ::DXGI_FRAME_STATISTICS_MEDIA - ) -> ::HRESULT, - fn SetPresentDuration(&mut self, Duration: ::UINT) -> ::HRESULT, - fn CheckPresentDurationSupport( - &mut self, DesiredPresentDuration: ::UINT, pClosestSmallerPresentDuration: *mut ::UINT, - pClosestLargerPresentDuration: *mut ::UINT - ) -> ::HRESULT -}); - -pub const DXGI_CREATE_FACTORY_DEBUG: ::UINT = 0x1; - -DEFINE_GUID!(IID_IDXGIDevice3,0x6007896c,0x3244,0x4afd,0xbf,0x18,0xa6,0xd3,0xbe, - 0xda,0x50,0x23); -DEFINE_GUID!(IID_IDXGISwapChain2,0xa8be2ac4,0x199f,0x4946,0xb3,0x31,0x79,0x59, - 0x9f,0xb9,0x8d,0xe7); -DEFINE_GUID!(IID_IDXGIOutput2,0x595e39d1,0x2724,0x4663,0x99,0xb1,0xda,0x96,0x9d, - 0xe2,0x83,0x64); -DEFINE_GUID!(IID_IDXGIFactory3,0x25483823,0xcd46,0x4c7d,0x86,0xca,0x47,0xaa,0x95, - 0xb8,0x37,0xbd); -DEFINE_GUID!(IID_IDXGIDecodeSwapChain,0x2633066b,0x4514,0x4c7a,0x8f,0xd8,0x12, - 0xea,0x98,0x05,0x9d,0x18); -DEFINE_GUID!(IID_IDXGIFactoryMedia,0x41e7d1f2,0xa591,0x4f7b,0xa2,0xe5,0xfa,0x9c, - 0x84,0x3e,0x1c,0x12); -DEFINE_GUID!(IID_IDXGISwapChainMedia,0xdd95b90b,0xf05f,0x4f6a,0xbd,0x65,0x25, - 0xbf,0xb2,0x64,0xbd,0x84); -DEFINE_GUID!(IID_IDXGIOutput3,0x8a6bb301,0x7e7e,0x41F4,0xa8,0xe0,0x5b,0x32,0xf7, - 0xf9,0x9b,0x18); diff --git a/deps/winapi-0.2.5/src/dxgi1_4.rs b/deps/winapi-0.2.5/src/dxgi1_4.rs deleted file mode 100644 index 7954e05fd..000000000 --- a/deps/winapi-0.2.5/src/dxgi1_4.rs +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright © 2015; Dmitry Roschin -// Licensed under the MIT License <LICENSE.md> -//! Mappings for the contents of dxgi1_4.h - -ENUM!{ enum DXGI_MEMORY_SEGMENT_GROUP { - DXGI_MEMORY_SEGMENT_GROUP_LOCAL = 0, - DXGI_MEMORY_SEGMENT_GROUP_NON_LOCAL = 1, -}} - -FLAGS!{ enum DXGI_OVERLAY_COLOR_SPACE_SUPPORT_FLAG { - DXGI_OVERLAY_COLOR_SPACE_SUPPORT_FLAG_PRESENT = 0x1, -}} - -FLAGS!{ enum DXGI_SWAP_CHAIN_COLOR_SPACE_SUPPORT_FLAG { - DXGI_SWAP_CHAIN_COLOR_SPACE_SUPPORT_FLAG_PRESENT = 0x1, - DXGI_SWAP_CHAIN_COLOR_SPACE_SUPPORT_FLAG_OVERLAY_PRESENT = 0x2, -}} - -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct DXGI_QUERY_VIDEO_MEMORY_INFO { - pub Budget: ::UINT64, - pub CurrentUsage: ::UINT64, - pub AvailableForReservation: ::UINT64, - pub CurrentReservation: ::UINT64, -} - -RIDL!( -interface IDXGIAdapter3(IDXGIAdapter3Vtbl): IDXGIAdapter2(IDXGIAdapter2Vtbl) { - fn RegisterHardwareContentProtectionTeardownStatusEvent( - &mut self, hEvent: ::HANDLE, pdwCookie: *mut ::DWORD - ) -> ::HRESULT, - fn UnregisterHardwareContentProtectionTeardownStatus( - &mut self, dwCookie: ::DWORD - ) -> (), - fn QueryVideoMemoryInfo( - &mut self, NodeIndex: ::UINT, MemorySegmentGroup: ::DXGI_MEMORY_SEGMENT_GROUP, - pVideoMemoryInfo: *mut ::DXGI_QUERY_VIDEO_MEMORY_INFO - ) -> ::HRESULT, - fn SetVideoMemoryReservation( - &mut self, NodeIndex: ::UINT, MemorySegmentGroup: ::DXGI_MEMORY_SEGMENT_GROUP, - Reservation: ::UINT64 - ) -> ::HRESULT, - fn RegisterVideoMemoryBudgetChangeNotificationEvent( - &mut self, hEvent: ::HANDLE, pdwCookie: *mut ::DWORD - ) -> ::HRESULT, - fn UnregisterVideoMemoryBudgetChangeNotification( - &mut self, dwCookie: ::DWORD - ) -> () -}); - -RIDL!( -interface IDXGIFactory4(IDXGIFactory4Vtbl): IDXGIFactory3(IDXGIFactory3Vtbl) { - fn EnumAdapterByLuid( - &mut self, AdapterLuid: ::LUID, riid: ::REFGUID, ppvAdapter: *mut *mut ::c_void - ) -> ::HRESULT, - fn EnumWarpAdapter( - &mut self, riid: ::REFGUID, ppvAdapter: *mut *mut ::c_void - ) -> ::HRESULT -}); - -RIDL!( -interface IDXGIOutput4(IDXGIOutput4Vtbl): IDXGIOutput3(IDXGIOutput3Vtbl) { - fn CheckOverlayColorSpaceSupport( - &mut self, Format: ::DXGI_FORMAT, ColorSpace: ::DXGI_COLOR_SPACE_TYPE, - pConcernedDevice: *mut ::IUnknown, pFlags: *mut ::UINT - ) -> ::HRESULT -}); - -RIDL!( -interface IDXGISwapChain3(IDXGISwapChain3Vtbl): IDXGISwapChain2(IDXGISwapChain2Vtbl) { - fn GetCurrentBackBufferIndex(&mut self) -> ::UINT, - fn CheckColorSpaceSupport( - &mut self, ColorSpace: ::DXGI_COLOR_SPACE_TYPE, pColorSpaceSupport: *mut ::UINT - ) -> ::HRESULT, - fn SetColorSpace1( - &mut self, ColorSpace: ::DXGI_COLOR_SPACE_TYPE - ) -> ::HRESULT, - fn ResizeBuffers1( - &mut self, BufferCount: ::UINT, Width: ::UINT, Height: ::UINT, Format: ::DXGI_FORMAT, - SwapChainFlags: ::UINT, pCreationNodeMask: *const ::UINT, - ppPresentQueue: *mut *mut ::IUnknown - ) -> ::HRESULT -}); - -DEFINE_GUID!(IID_IDXGISwapChain3,0x94d99bdb,0xf1f8,0x4ab0,0xb2,0x36,0x7d,0xa0, - 0x17,0x0e,0xda,0xb1); -DEFINE_GUID!(IID_IDXGIOutput4,0xdc7dca35,0x2196,0x414d,0x9F,0x53,0x61,0x78, - 0x84,0x03,0x2a,0x60); -DEFINE_GUID!(IID_IDXGIFactory4,0x1bc6ea02,0xef36,0x464f,0xbf,0x0c,0x21,0xca, - 0x39,0xe5,0x16,0x8a); -DEFINE_GUID!(IID_IDXGIAdapter3,0x645967A4,0x1392,0x4310,0xA7,0x98,0x80,0x53, - 0xCE,0x3E,0x93,0xFD); diff --git a/deps/winapi-0.2.5/src/dxgitype.rs b/deps/winapi-0.2.5/src/dxgitype.rs deleted file mode 100644 index 27b67cbc1..000000000 --- a/deps/winapi-0.2.5/src/dxgitype.rs +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright © 2015; Connor Hilarides -// Licensed under the MIT License <LICENSE.md> -//! Mappings for the contents of dxgitype.h -pub const DXGI_CPU_ACCESS_NONE: ::DWORD = 0; -pub const DXGI_CPU_ACCESS_DYNAMIC: ::DWORD = 1; -pub const DXGI_CPU_ACCESS_READ_WRITE: ::DWORD = 2; -pub const DXGI_CPU_ACCESS_SCRATCH: ::DWORD = 3; -pub const DXGI_CPU_ACCESS_FIELD: ::DWORD = 15; -FLAGS!{enum DXGI_USAGE { - DXGI_USAGE_SHADER_INPUT = 1 << (0 + 4), - DXGI_USAGE_RENDER_TARGET_OUTPUT = 1 << (1 + 4), - DXGI_USAGE_BACK_BUFFER = 1 << (2 + 4), - DXGI_USAGE_SHARED = 1 << (3 + 4), - DXGI_USAGE_READ_ONLY = 1 << (4 + 4), - DXGI_USAGE_DISCARD_ON_PRESENT = 1 << (5 + 4), - DXGI_USAGE_UNORDERED_ACCESS = 1 << (6 + 4), -}} -STRUCT!{struct DXGI_RGB { - Red: f32, - Green: f32, - Blue: f32, -}} -pub type DXGI_RGBA = ::D3DCOLORVALUE; -#[repr(C)] #[derive(Copy)] -pub struct DXGI_GAMMA_CONTROL { - pub Scale: DXGI_RGB, - pub Offset: DXGI_RGB, - pub GammaCurve: [DXGI_RGB; 1025], -} -impl Clone for DXGI_GAMMA_CONTROL { - fn clone(&self) -> DXGI_GAMMA_CONTROL { - *self - } -} -#[repr(C)] #[derive(Copy)] -pub struct DXGI_GAMMA_CONTROL_CAPABILITIES { - pub ScaleAndOffsetSupported: ::BOOL, - pub MaxConvertedValue: f32, - pub MinConvertedValue: f32, - pub NumGammaControlPoints: ::UINT, - pub ControlPointPositions: [f32; 1025], -} -impl Clone for DXGI_GAMMA_CONTROL_CAPABILITIES { - fn clone(&self) -> DXGI_GAMMA_CONTROL_CAPABILITIES { - *self - } -} -STRUCT!{struct DXGI_RATIONAL { - Numerator: ::UINT, - Denominator: ::UINT, -}} -ENUM!{enum DXGI_MODE_SCANLINE_ORDER { - DXGI_MODE_SCANLINE_ORDER_UNSPECIFIED, - DXGI_MODE_SCANLINE_ORDER_PROGRESSIVE, - DXGI_MODE_SCANLINE_ORDER_UPPER_FIELD_FIRST, - DXGI_MODE_SCANLINE_ORDER_LOWER_FIELD_FIRST, -}} -ENUM!{enum DXGI_MODE_SCALING { - DXGI_MODE_SCALING_UNSPECIFIED, - DXGI_MODE_SCALING_CENTERED, - DXGI_MODE_SCALING_STRETCHED, -}} -ENUM!{enum DXGI_MODE_ROTATION { - DXGI_MODE_ROTATION_UNSPECIFIED, - DXGI_MODE_ROTATION_IDENTITY, - DXGI_MODE_ROTATION_ROTATE90, - DXGI_MODE_ROTATION_ROTATE180, - DXGI_MODE_ROTATION_ROTATE270, -}} -STRUCT!{struct DXGI_MODE_DESC { - Width: ::UINT, - Height: ::UINT, - RefreshRate: DXGI_RATIONAL, - Format: ::DXGI_FORMAT, - ScanlineOrdering: DXGI_MODE_SCANLINE_ORDER, - Scaling: DXGI_MODE_SCALING, -}} -STRUCT!{struct DXGI_SAMPLE_DESC { - Count: ::UINT, - Quality: ::UINT, -}} -ENUM!{enum DXGI_COLOR_SPACE_TYPE { - DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709 = 0x0, - DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709 = 0x1, - DXGI_COLOR_SPACE_RGB_STUDIO_G22_NONE_P709 = 0x2, - DXGI_COLOR_SPACE_RGB_STUDIO_G22_NONE_P2020 = 0x3, - DXGI_COLOR_SPACE_RESERVED = 0x4, - DXGI_COLOR_SPACE_YCBCR_FULL_G22_NONE_P709_X601 = 0x5, - DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601 = 0x6, - DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P601 = 0x7, - DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709 = 0x8, - DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P709 = 0x9, - DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020 = 0xA, - DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020 = 0xB, - DXGI_COLOR_SPACE_CUSTOM = 0xFFFFFFFF, -}} -pub const DXGI_CENTER_MULTISAMPLE_QUALITY_PATTERN: ::UINT = 0xfffffffe; -pub const DXGI_STANDARD_MULTISAMPLE_QUALITY_PATTERN: ::UINT = 0xffffffff; diff --git a/deps/winapi-0.2.5/src/hidclass.rs b/deps/winapi-0.2.5/src/hidclass.rs deleted file mode 100644 index beecdf28d..000000000 --- a/deps/winapi-0.2.5/src/hidclass.rs +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright © 2015, Alex Daniel Jones -// Licensed under the MIT License <LICENSE.md> -// Taken from hidclass.h -pub type PHIDP_PREPARSED_DATA = ::PVOID; -STRUCT!{struct HID_COLLECTION_INFORMATION { - DescriptorSize: ::ULONG, - Polled: ::BOOLEAN, - Reserved1: [::UCHAR; 1], - VendorID: ::USHORT, - ProductID: ::USHORT, - VersionNumber: ::USHORT, -}} -pub type PHID_COLLECTION_INFORMATION = *mut HID_COLLECTION_INFORMATION; diff --git a/deps/winapi-0.2.5/src/hidpi.rs b/deps/winapi-0.2.5/src/hidpi.rs deleted file mode 100644 index b11578831..000000000 --- a/deps/winapi-0.2.5/src/hidpi.rs +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright © 2015, Alex Daniel Jones -// Licensed under the MIT License <LICENSE.md> -// Taken from hidpi.h -ENUM!{enum HIDP_REPORT_TYPE { - HidP_Input, - HidP_Output, - HidP_Feature, -}} -STRUCT!{struct USAGE_AND_PAGE { - Usage: ::USAGE, - UsagePage: ::USAGE, -}} -pub type PUSAGE_AND_PAGE = *mut USAGE_AND_PAGE; -STRUCT!{struct HIDP_BUTTON_CAPS { - UsagePage: ::USAGE, - ReportID: ::UCHAR, - IsAlias: ::BOOLEAN, - BitField: ::USHORT, - LinkCollection: ::USHORT, - LinkUsage: ::USAGE, - LinkUsagePage: ::USAGE, - IsRange: ::BOOLEAN, - IsStringRange: ::BOOLEAN, - IsDesignatorRange: ::BOOLEAN, - IsAbsolute: ::BOOLEAN, - Reserved: [::ULONG; 10], - S_un: [u8; 16], -}} -UNION!(HIDP_BUTTON_CAPS, S_un, Range, Range_mut, HIDP_RANGE_STRUCT); -UNION!(HIDP_BUTTON_CAPS, S_un, NotRange, NotRange_mut, HIDP_NOTRANGE_STRUCT); -pub type PHIDP_BUTTON_CAPS = *mut HIDP_BUTTON_CAPS; -STRUCT!{struct HIDP_RANGE_STRUCT { - UsageMin: ::USAGE, - UsageMax: ::USAGE, - StringMin: ::USHORT, - StringMax: ::USHORT, - DesignatorMin: ::USHORT, - DesignatorMax: ::USHORT, - DataIndexMin: ::USHORT, - DataIndexMax: ::USHORT, -}} -STRUCT!{struct HIDP_NOTRANGE_STRUCT { - Usage: ::USAGE, - Reserved1: ::USAGE, - StringIndex: ::USHORT, - Reserved2: ::USHORT, - DesignatorIndex: ::USHORT, - Reserved3: ::USHORT, - DataIndex: ::USHORT, - Reserved4: ::USHORT, -}} -STRUCT!{struct HIDP_VALUE_CAPS { - UsagePage: ::USAGE, - ReportID: ::UCHAR, - IsAlias: ::BOOLEAN, - BitField: ::USHORT, - LinkCollection: ::USHORT, - LinkUsage: ::USAGE, - LinkUsagePage: ::USAGE, - IsRange: ::BOOLEAN, - IsStringRange: ::BOOLEAN, - IsDesignatorRange: ::BOOLEAN, - IsAbsolute: ::BOOLEAN, - HasNull: ::BOOLEAN, - Reserved: ::UCHAR, - BitSize: ::USHORT, - ReportCount: ::USHORT, - Reserved2: [::USHORT; 5], - UnitsExp: ::ULONG, - Units: ::ULONG, - LogicalMin: ::LONG, - LogicalMax: ::LONG, - PhysicalMin: ::LONG, - PhysicalMax: ::LONG, - S_un: [u8; 16], -}} -UNION!(HIDP_VALUE_CAPS, S_un, Range, Range_mut, HIDP_RANGE_STRUCT); -UNION!(HIDP_VALUE_CAPS, S_un, NotRange, NotRange_mut, HIDP_NOTRANGE_STRUCT); -pub type PHIDP_VALUE_CAPS = *mut HIDP_VALUE_CAPS; -STRUCT!{struct HIDP_LINK_COLLECTION_NODE { - LinkUsage: ::USAGE, - LinkUsagePage: ::USAGE, - Parent: ::USHORT, - NumberOfChildren: ::USHORT, - NextSibling: ::USHORT, - FirstChild: ::USHORT, - bit_fields: ::ULONG, - UserContext: ::PVOID, -}} -BITFIELD!(HIDP_LINK_COLLECTION_NODE bit_fields: ::ULONG [ - CollectionType set_CollectionType[0..8], - IsAlias set_IsAlias[8..9], - Reserved set_Reserved[9..32], -]); -pub type PHIDP_LINK_COLLECTION_NODE = *mut HIDP_LINK_COLLECTION_NODE; -STRUCT!{struct HIDP_CAPS { - Usage: ::USAGE, - UsagePage: ::USAGE, - InputReportByteLength: ::USHORT, - OutputReportByteLength: ::USHORT, - FeatureReportByteLength: ::USHORT, - Reserved: [::USHORT; 17], - NumberLinkCollectionNodes: ::USHORT, - NumberInputButtonCaps: ::USHORT, - NumberInputValueCaps: ::USHORT, - NumberInputDataIndices: ::USHORT, - NumberOutputButtonCaps: ::USHORT, - NumberOutputValueCaps: ::USHORT, - NumberOutputDataIndices: ::USHORT, - NumberFeatureButtonCaps: ::USHORT, - NumberFeatureValueCaps: ::USHORT, - NumberFeatureDataIndices: ::USHORT, -}} -pub type PHIDP_CAPS = *mut HIDP_CAPS; -STRUCT!{struct HIDP_DATA { - DataIndex: ::USHORT, - Reserved: ::USHORT, - S_un: [u8; 4], -}} -UNION!(HIDP_DATA, S_un, RawValue, RawValue_mut, ::ULONG); -UNION!(HIDP_DATA, S_un, On, On_mut, ::BOOLEAN); -pub type PHIDP_DATA = *mut HIDP_DATA; -STRUCT!{struct HIDP_UNKNOWN_TOKEN { - Token: ::UCHAR, - Reserved: [::UCHAR; 3], - BitField: ::ULONG, -}} -pub type PHIDP_UNKNOWN_TOKEN = *mut HIDP_UNKNOWN_TOKEN; -STRUCT!{struct HIDP_EXTENDED_ATTRIBUTES { - NumGlobalUnknowns: ::UCHAR, - Reserved: [::UCHAR; 3], - GlobalUnknowns: ::PHIDP_UNKNOWN_TOKEN, - Data: [::ULONG; 1], -}} -pub type PHIDP_EXTENDED_ATTRIBUTES = *mut HIDP_EXTENDED_ATTRIBUTES; -pub const HIDP_STATUS_SUCCESS: ::NTSTATUS = 0x00110000; -pub const HIDP_STATUS_NULL: ::NTSTATUS = 0x08110001; -pub const HIDP_STATUS_INVALID_PREPARSED_DATA: ::NTSTATUS = 0x0C110001; -pub const HIDP_STATUS_INVALID_REPORT_TYPE: ::NTSTATUS = 0x0C110002; -pub const HIDP_STATUS_INVALID_REPORT_LENGTH: ::NTSTATUS = 0x0C110003; -pub const HIDP_STATUS_USAGE_NOT_FOUND: ::NTSTATUS = 0x0C110004; -pub const HIDP_STATUS_VALUE_OUT_OF_RANGE: ::NTSTATUS = 0x0C110005; -pub const HIDP_STATUS_BAD_LOG_PHY_VALUES: ::NTSTATUS = 0x0C110006; -pub const HIDP_STATUS_BUFFER_TOO_SMALL: ::NTSTATUS = 0x0C110007; -pub const HIDP_STATUS_INTERNAL_ERROR: ::NTSTATUS = 0x0C110008; -pub const HIDP_STATUS_I8042_TRANS_UNKNOWN: ::NTSTATUS = 0x0C110009; -pub const HIDP_STATUS_INCOMPATIBLE_REPORT_ID: ::NTSTATUS = 0x0C11000A; -pub const HIDP_STATUS_NOT_VALUE_ARRAY: ::NTSTATUS = 0x0C11000B; -pub const HIDP_STATUS_IS_VALUE_ARRAY: ::NTSTATUS = 0x0C11000C; -pub const HIDP_STATUS_DATA_INDEX_NOT_FOUND: ::NTSTATUS = 0x0C11000D; -pub const HIDP_STATUS_DATA_INDEX_OUT_OF_RANGE: ::NTSTATUS = 0x0C11000E; -pub const HIDP_STATUS_BUTTON_NOT_PRESSED: ::NTSTATUS = 0x0C11000F; -pub const HIDP_STATUS_REPORT_DOES_NOT_EXIST: ::NTSTATUS = 0x0C110010; -pub const HIDP_STATUS_NOT_IMPLEMENTED: ::NTSTATUS = 0x0C110020; diff --git a/deps/winapi-0.2.5/src/hidsdi.rs b/deps/winapi-0.2.5/src/hidsdi.rs deleted file mode 100644 index 2030078b4..000000000 --- a/deps/winapi-0.2.5/src/hidsdi.rs +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright © 2015, Alex Daniel Jones -// Licensed under the MIT License <LICENSE.md> -// Taken from hidsdi.h -STRUCT!{struct HIDD_ATTRIBUTES { - Size: ::ULONG, - VendorID: ::USHORT, - ProductID: ::USHORT, - VersionNumber: ::USHORT, -}} -pub type PHIDD_ATTRIBUTES = *mut HIDD_ATTRIBUTES; diff --git a/deps/winapi-0.2.5/src/hidusage.rs b/deps/winapi-0.2.5/src/hidusage.rs deleted file mode 100644 index 68c47299c..000000000 --- a/deps/winapi-0.2.5/src/hidusage.rs +++ /dev/null @@ -1,5 +0,0 @@ -// Copyright © 2015, Alex Daniel Jones -// Licensed under the MIT License <LICENSE.md> -// Taken from hidusage.h -pub type USAGE = ::USHORT; -pub type PUSAGE = *mut USAGE; diff --git a/deps/winapi-0.2.5/src/hstring.rs b/deps/winapi-0.2.5/src/hstring.rs deleted file mode 100644 index 86356669c..000000000 --- a/deps/winapi-0.2.5/src/hstring.rs +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright © 2015, Peter Atashian -// Licensed under the MIT License <LICENSE.md> -//! This interface definition contains typedefs for Windows Runtime data types. -DECLARE_HANDLE!(HSTRING, HSTRING__); -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct HSTRING_HEADER { - pub Reserved: [::PVOID; 0], // For alignment - #[cfg(target_arch = "x86_64")] - pub Reserved2: [::c_char; 24], - #[cfg(target_arch = "x86")] - pub Reserved2: [::c_char; 20], -} -UNION!(HSTRING_HEADER, Reserved2, Reserved1, Reserved1_mut, ::PVOID); -DECLARE_HANDLE!(HSTRING_BUFFER, HSTRING_BUFFER__); diff --git a/deps/winapi-0.2.5/src/http.rs b/deps/winapi-0.2.5/src/http.rs deleted file mode 100644 index 6ab21141c..000000000 --- a/deps/winapi-0.2.5/src/http.rs +++ /dev/null @@ -1,843 +0,0 @@ -// Copyright © 2015, skdltmxn -// Licensed under the MIT License <LICENSE.md> -//! HTTP API specification -pub const HTTP_INITIALIZE_SERVER: ::ULONG = 0x00000001; -pub const HTTP_INITIALIZE_CONFIG: ::ULONG = 0x00000002; -pub const HTTP_DEMAND_CBT: ::ULONG = 0x00000004; -ENUM!{enum HTTP_SERVER_PROPERTY { - HttpServerAuthenticationProperty, - HttpServerLoggingProperty, - HttpServerQosProperty, - HttpServerTimeoutsProperty, - HttpServerQueueLengthProperty, - HttpServerStateProperty, - HttpServer503VerbosityProperty, - HttpServerBindingProperty, - HttpServerExtendedAuthenticationProperty, - HttpServerListenEndpointProperty, - HttpServerChannelBindProperty, - HttpServerProtectionLevelProperty, -}} -pub type PHTTP_SERVER_PROPERTY = *mut HTTP_SERVER_PROPERTY; -STRUCT!{struct HTTP_PROPERTY_FLAGS { - BitFields: ::ULONG, -}} -BITFIELD!(HTTP_PROPERTY_FLAGS BitFields: ::ULONG [ - Present set_Present[0..1], -]); -pub type PHTTP_PROPERTY_FLAGS = *mut HTTP_PROPERTY_FLAGS; -ENUM!{enum HTTP_ENABLED_STATE { - HttpEnabledStateActive, - HttpEnabledStateInactive, -}} -pub type PHTTP_ENABLED_STATE = *mut HTTP_ENABLED_STATE; -STRUCT!{struct HTTP_STATE_INFO { - Flags: HTTP_PROPERTY_FLAGS, - State: HTTP_ENABLED_STATE, -}} -pub type PHTTP_STATE_INFO = *mut HTTP_STATE_INFO; -ENUM!{enum HTTP_503_RESPONSE_VERBOSITY { - Http503ResponseVerbosityBasic, - Http503ResponseVerbosityLimited, - Http503ResponseVerbosityFull, -}} -pub type PHTTP_503_RESPONSE_VERBOSITY = *mut HTTP_503_RESPONSE_VERBOSITY; -ENUM!{enum HTTP_QOS_SETTING_TYPE { - HttpQosSettingTypeBandwidth, - HttpQosSettingTypeConnectionLimit, - HttpQosSettingTypeFlowRate, -}} -pub type PHTTP_QOS_SETTING_TYPE = *mut HTTP_QOS_SETTING_TYPE; -STRUCT!{struct HTTP_QOS_SETTING_INFO { - QosType: HTTP_QOS_SETTING_TYPE, - QosSetting: ::PVOID, -}} -pub type PHTTP_QOS_SETTING_INFO = *mut HTTP_QOS_SETTING_INFO; -STRUCT!{struct HTTP_CONNECTION_LIMIT_INFO { - Flags: HTTP_PROPERTY_FLAGS, - MaxConnections: ::ULONG, -}} -pub type PHTTP_CONNECTION_LIMIT_INFO = *mut HTTP_CONNECTION_LIMIT_INFO; -STRUCT!{struct HTTP_BANDWIDTH_LIMIT_INFO { - Flags: HTTP_PROPERTY_FLAGS, - MaxBandwidth: ::ULONG, -}} -pub type PHTTP_BANDWIDTH_LIMIT_INFO = *mut HTTP_BANDWIDTH_LIMIT_INFO; -STRUCT!{struct HTTP_FLOWRATE_INFO { - Flags: HTTP_PROPERTY_FLAGS, - MaxBandwidth: ::ULONG, - MaxPeakBandwidth: ::ULONG, - BurstSize: ::ULONG, -}} -pub type PHTTP_FLOWRATE_INFO = *mut HTTP_FLOWRATE_INFO; -pub const HTTP_MIN_ALLOWED_BANDWIDTH_THROTTLING_RATE: ::ULONG = 1024; -pub const HTTP_LIMIT_INFINITE: ::ULONG = !0; -ENUM!{enum HTTP_SERVICE_CONFIG_TIMEOUT_KEY { - IdleConnectionTimeout = 0, - HeaderWaitTimeout, -}} -pub type PHTTP_SERVICE_CONFIG_TIMEOUT_KEY = *mut HTTP_SERVICE_CONFIG_TIMEOUT_KEY; -pub type HTTP_SERVICE_CONFIG_TIMEOUT_PARAM = ::USHORT; -pub type PHTTP_SERVICE_CONFIG_TIMEOUT_PARAM = *mut ::USHORT; -STRUCT!{struct HTTP_SERVICE_CONFIG_TIMEOUT_SET { - KeyDesc: HTTP_SERVICE_CONFIG_TIMEOUT_KEY, - ParamDesc: HTTP_SERVICE_CONFIG_TIMEOUT_PARAM, -}} -pub type PHTTP_SERVICE_CONFIG_TIMEOUT_SET = *mut HTTP_SERVICE_CONFIG_TIMEOUT_SET; -STRUCT!{struct HTTP_TIMEOUT_LIMIT_INFO { - Flags: HTTP_PROPERTY_FLAGS, - EntityBody: ::USHORT, - DrainEntityBody: ::USHORT, - RequestQueue: ::USHORT, - IdleConnection: ::USHORT, - HeaderWait: ::USHORT, - MinSendRate: ::ULONG, -}} -pub type PHTTP_TIMEOUT_LIMIT_INFO = *mut HTTP_TIMEOUT_LIMIT_INFO; -STRUCT!{struct HTTP_LISTEN_ENDPOINT_INFO { - Flags: HTTP_PROPERTY_FLAGS, - EnableSharing: ::BOOLEAN, -}} -pub type PHTTP_LISTEN_ENDPOINT_INFO = *mut HTTP_LISTEN_ENDPOINT_INFO; -STRUCT!{struct HTTP_SERVER_AUTHENTICATION_DIGEST_PARAMS { - DomainNameLength: ::USHORT, - DomainName: ::PWSTR, - RealmLength: ::USHORT, - Realm: ::PWSTR, -}} -pub type PHTTP_SERVER_AUTHENTICATION_DIGEST_PARAMS = *mut HTTP_SERVER_AUTHENTICATION_DIGEST_PARAMS; -STRUCT!{struct HTTP_SERVER_AUTHENTICATION_BASIC_PARAMS { - RealmLength: ::USHORT, - Realm: ::PWSTR, -}} -pub type PHTTP_SERVER_AUTHENTICATION_BASIC_PARAMS = *mut HTTP_SERVER_AUTHENTICATION_BASIC_PARAMS; -pub const HTTP_AUTH_ENABLE_BASIC: ::ULONG = 0x00000001; -pub const HTTP_AUTH_ENABLE_DIGEST: ::ULONG = 0x00000002; -pub const HTTP_AUTH_ENABLE_NTLM: ::ULONG = 0x00000004; -pub const HTTP_AUTH_ENABLE_NEGOTIATE: ::ULONG = 0x00000008; -pub const HTTP_AUTH_ENABLE_KERBEROS: ::ULONG = 0x00000010; -pub const HTTP_AUTH_ENABLE_ALL: ::ULONG = HTTP_AUTH_ENABLE_BASIC | HTTP_AUTH_ENABLE_DIGEST | - HTTP_AUTH_ENABLE_NTLM | HTTP_AUTH_ENABLE_NEGOTIATE | HTTP_AUTH_ENABLE_KERBEROS; -pub const HTTP_AUTH_EX_FLAG_ENABLE_KERBEROS_CREDENTIAL_CACHING: ::UCHAR = 0x01; -pub const HTTP_AUTH_EX_FLAG_CAPTURE_CREDENTIAL: ::UCHAR = 0x02; -STRUCT!{struct HTTP_SERVER_AUTHENTICATION_INFO { - Flags: HTTP_PROPERTY_FLAGS, - AuthSchemes: ::ULONG, - ReceiveMutualAuth: ::BOOLEAN, - ReceiveContextHandle: ::BOOLEAN, - DisableNTLMCredentialCaching: ::BOOLEAN, - ExFlags: ::UCHAR, - DigestParams: HTTP_SERVER_AUTHENTICATION_DIGEST_PARAMS, - BasicParams: HTTP_SERVER_AUTHENTICATION_BASIC_PARAMS, -}} -pub type PHTTP_SERVER_AUTHENTICATION_INFO = *mut HTTP_SERVER_AUTHENTICATION_INFO; -ENUM!{enum HTTP_SERVICE_BINDING_TYPE { - HttpServiceBindingTypeNone = 0, - HttpServiceBindingTypeW, - HttpServiceBindingTypeA, -}} -STRUCT!{struct HTTP_SERVICE_BINDING_BASE { - Type: HTTP_SERVICE_BINDING_TYPE, -}} -pub type PHTTP_SERVICE_BINDING_BASE = *mut HTTP_SERVICE_BINDING_BASE; -STRUCT!{struct HTTP_SERVICE_BINDING_A { - Base: HTTP_SERVICE_BINDING_BASE, - Buffer: ::PCHAR, - BufferSize: ::ULONG, -}} -pub type PHTTP_SERVICE_BINDING_A = *mut HTTP_SERVICE_BINDING_A; -STRUCT!{struct HTTP_SERVICE_BINDING_W { - Base: HTTP_SERVICE_BINDING_BASE, - Buffer: ::PWCHAR, - BufferSize: ::ULONG, -}} -pub type PHTTP_SERVICE_BINDING_W = *mut HTTP_SERVICE_BINDING_W; -ENUM!{enum HTTP_AUTHENTICATION_HARDENING_LEVELS { - HttpAuthenticationHardeningLegacy = 0, - HttpAuthenticationHardeningMedium, - HttpAuthenticationHardeningStrict, -}} -pub const HTTP_CHANNEL_BIND_PROXY: ::ULONG = 0x1; -pub const HTTP_CHANNEL_BIND_PROXY_COHOSTING: ::ULONG = 0x20; -pub const HTTP_CHANNEL_BIND_NO_SERVICE_NAME_CHECK: ::ULONG = 0x2; -pub const HTTP_CHANNEL_BIND_DOTLESS_SERVICE: ::ULONG = 0x4; -pub const HTTP_CHANNEL_BIND_SECURE_CHANNEL_TOKEN: ::ULONG = 0x8; -pub const HTTP_CHANNEL_BIND_CLIENT_SERVICE: ::ULONG = 0x10; -STRUCT!{struct HTTP_CHANNEL_BIND_INFO { - Hardening: HTTP_AUTHENTICATION_HARDENING_LEVELS, - Flags: ::ULONG, - ServiceNames: *mut PHTTP_SERVICE_BINDING_BASE, - NumberOfServiceNames: ::ULONG, -}} -pub type PHTTP_CHANNEL_BIND_INFO = *mut HTTP_CHANNEL_BIND_INFO; -STRUCT!{struct HTTP_REQUEST_CHANNEL_BIND_STATUS { - ServiceName: PHTTP_SERVICE_BINDING_BASE, - ChannelToken: ::PUCHAR, - ChannelTokenSize: ::ULONG, - Flags: ::ULONG, -}} -pub type PHTTP_REQUEST_CHANNEL_BIND_STATUS = *mut HTTP_REQUEST_CHANNEL_BIND_STATUS; -pub const HTTP_LOG_FIELD_DATE: ::ULONG = 0x00000001; -pub const HTTP_LOG_FIELD_TIME: ::ULONG = 0x00000002; -pub const HTTP_LOG_FIELD_CLIENT_IP: ::ULONG = 0x00000004; -pub const HTTP_LOG_FIELD_USER_NAME: ::ULONG = 0x00000008; -pub const HTTP_LOG_FIELD_SITE_NAME: ::ULONG = 0x00000010; -pub const HTTP_LOG_FIELD_COMPUTER_NAME: ::ULONG = 0x00000020; -pub const HTTP_LOG_FIELD_SERVER_IP: ::ULONG = 0x00000040; -pub const HTTP_LOG_FIELD_METHOD: ::ULONG = 0x00000080; -pub const HTTP_LOG_FIELD_URI_STEM: ::ULONG = 0x00000100; -pub const HTTP_LOG_FIELD_URI_QUERY: ::ULONG = 0x00000200; -pub const HTTP_LOG_FIELD_STATUS: ::ULONG = 0x00000400; -pub const HTTP_LOG_FIELD_WIN32_STATUS: ::ULONG = 0x00000800; -pub const HTTP_LOG_FIELD_BYTES_SENT: ::ULONG = 0x00001000; -pub const HTTP_LOG_FIELD_BYTES_RECV: ::ULONG = 0x00002000; -pub const HTTP_LOG_FIELD_TIME_TAKEN: ::ULONG = 0x00004000; -pub const HTTP_LOG_FIELD_SERVER_PORT: ::ULONG = 0x00008000; -pub const HTTP_LOG_FIELD_USER_AGENT: ::ULONG = 0x00010000; -pub const HTTP_LOG_FIELD_COOKIE: ::ULONG = 0x00020000; -pub const HTTP_LOG_FIELD_REFERER: ::ULONG = 0x00040000; -pub const HTTP_LOG_FIELD_VERSION: ::ULONG = 0x00080000; -pub const HTTP_LOG_FIELD_HOST: ::ULONG = 0x00100000; -pub const HTTP_LOG_FIELD_SUB_STATUS: ::ULONG = 0x00200000; -pub const HTTP_LOG_FIELD_CLIENT_PORT: ::ULONG = 0x00400000; -pub const HTTP_LOG_FIELD_URI: ::ULONG = 0x00800000; -pub const HTTP_LOG_FIELD_SITE_ID: ::ULONG = 0x01000000; -pub const HTTP_LOG_FIELD_REASON: ::ULONG = 0x02000000; -pub const HTTP_LOG_FIELD_QUEUE_NAME: ::ULONG = 0x04000000; -ENUM!{enum HTTP_LOGGING_TYPE { - HttpLoggingTypeW3C, - HttpLoggingTypeIIS, - HttpLoggingTypeNCSA, - HttpLoggingTypeRaw, -}} -ENUM!{enum HTTP_LOGGING_ROLLOVER_TYPE { - HttpLoggingRolloverSize, - HttpLoggingRolloverDaily, - HttpLoggingRolloverWeekly, - HttpLoggingRolloverMonthly, - HttpLoggingRolloverHourly, -}} -pub const HTTP_MIN_ALLOWED_LOG_FILE_ROLLOVER_SIZE: ::ULONG = (1 * 1024 * 1024) as ::ULONG; -pub const HTTP_LOGGING_FLAG_LOCAL_TIME_ROLLOVER: ::ULONG = 0x00000001; -pub const HTTP_LOGGING_FLAG_USE_UTF8_CONVERSION: ::ULONG = 0x00000002; -pub const HTTP_LOGGING_FLAG_LOG_ERRORS_ONLY: ::ULONG = 0x00000004; -pub const HTTP_LOGGING_FLAG_LOG_SUCCESS_ONLY: ::ULONG = 0x00000008; -STRUCT!{struct HTTP_LOGGING_INFO { - Flags: HTTP_PROPERTY_FLAGS, - LoggingFlags: ::ULONG, - SoftwareName: ::PCWSTR, - SoftwareNameLength: ::USHORT, - DirectoryNameLength: ::USHORT, - DirectoryName: ::PCWSTR, - Format: HTTP_LOGGING_TYPE, - Fields: ::ULONG, - pExtFields: ::PVOID, - NumOfExtFields: ::USHORT, - MaxRecordSize: ::USHORT, - RolloverType: HTTP_LOGGING_ROLLOVER_TYPE, - RolloverSize: ::ULONG, - pSecurityDescriptor: ::PSECURITY_DESCRIPTOR, -}} -pub type PHTTP_LOGGING_INFO = *mut HTTP_LOGGING_INFO; -STRUCT!{struct HTTP_BINDING_INFO { - Flags: HTTP_PROPERTY_FLAGS, - RequestQueueHandle: ::HANDLE, -}} -pub type PHTTP_BINDING_INFO = *mut HTTP_BINDING_INFO; -ENUM!{enum HTTP_PROTECTION_LEVEL_TYPE { - HttpProtectionLevelUnrestricted, - HttpProtectionLevelEdgeRestricted, - HttpProtectionLevelRestricted, -}} -pub type PHTTP_PROTECTION_LEVEL_TYPE = *mut HTTP_PROTECTION_LEVEL_TYPE; -STRUCT!{struct HTTP_PROTECTION_LEVEL_INFO { - Flags: HTTP_PROPERTY_FLAGS, - Level: HTTP_PROTECTION_LEVEL_TYPE, -}} -pub type PHTTP_PROTECTION_LEVEL_INFO = *mut HTTP_PROTECTION_LEVEL_INFO; -pub const HTTP_CREATE_REQUEST_QUEUE_FLAG_OPEN_EXISTING: ::ULONG = 0x00000001; -pub const HTTP_CREATE_REQUEST_QUEUE_FLAG_CONTROLLER: ::ULONG = 0x00000002; -pub const HTTP_RECEIVE_REQUEST_FLAG_COPY_BODY: ::ULONG = 0x00000001; -pub const HTTP_RECEIVE_REQUEST_FLAG_FLUSH_BODY: ::ULONG = 0x00000002; -pub const HTTP_RECEIVE_REQUEST_ENTITY_BODY_FLAG_FILL_BUFFER: ::ULONG = 0x00000001; -pub const HTTP_SEND_RESPONSE_FLAG_DISCONNECT: ::ULONG = 0x00000001; -pub const HTTP_SEND_RESPONSE_FLAG_MORE_DATA: ::ULONG = 0x00000002; -pub const HTTP_SEND_RESPONSE_FLAG_BUFFER_DATA: ::ULONG = 0x00000004; -pub const HTTP_SEND_RESPONSE_FLAG_ENABLE_NAGLING: ::ULONG = 0x00000008; -pub const HTTP_SEND_RESPONSE_FLAG_PROCESS_RANGES: ::ULONG = 0x00000020; -pub const HTTP_SEND_RESPONSE_FLAG_OPAQUE: ::ULONG = 0x00000040; -pub const HTTP_FLUSH_RESPONSE_FLAG_RECURSIVE: ::ULONG = 0x00000001; -pub type HTTP_OPAQUE_ID = ::ULONGLONG; -pub type PHTTP_OPAQUE_ID = *mut ::ULONGLONG; -pub type HTTP_REQUEST_ID = HTTP_OPAQUE_ID; -pub type PHTTP_REQUEST_ID = *mut HTTP_OPAQUE_ID; -pub type HTTP_CONNECTION_ID = HTTP_OPAQUE_ID; -pub type PHTTP_CONNECTION_ID = *mut HTTP_OPAQUE_ID; -pub type HTTP_RAW_CONNECTION_ID = HTTP_OPAQUE_ID; -pub type PHTTP_RAW_CONNECTION_ID = *mut HTTP_OPAQUE_ID; -pub type HTTP_URL_GROUP_ID = HTTP_OPAQUE_ID; -pub type PHTTP_URL_GROUP_ID = *mut HTTP_OPAQUE_ID; -pub type HTTP_SERVER_SESSION_ID = HTTP_OPAQUE_ID; -pub type PHTTP_SERVER_SESSION_ID = *mut HTTP_OPAQUE_ID; -pub const HTTP_BYTE_RANGE_TO_EOF: ::ULONGLONG = !0; -STRUCT!{struct HTTP_BYTE_RANGE { - StartingOffset: ::ULARGE_INTEGER, - Length: ::ULARGE_INTEGER, -}} -pub type PHTTP_BYTE_RANGE = *mut HTTP_BYTE_RANGE; -STRUCT!{struct HTTP_VERSION { - MajorVersion: ::USHORT, - MinorVersion: ::USHORT, -}} -pub type PHTTP_VERSION = *mut HTTP_VERSION; -pub const HTTP_VERSION_UNKNOWN: HTTP_VERSION = HTTP_VERSION { MajorVersion: 0, MinorVersion: 0 }; -pub const HTTP_VERSION_0_9: HTTP_VERSION = HTTP_VERSION { MajorVersion: 0, MinorVersion: 9 }; -pub const HTTP_VERSION_1_0: HTTP_VERSION = HTTP_VERSION { MajorVersion: 1, MinorVersion: 0 }; -pub const HTTP_VERSION_1_1: HTTP_VERSION = HTTP_VERSION { MajorVersion: 1, MinorVersion: 1 }; -#[inline] #[allow(dead_code)] -pub fn HTTP_SET_VERSION(mut version: HTTP_VERSION, major: ::USHORT, minor: ::USHORT) { - version.MajorVersion = major; - version.MinorVersion = minor; -} -#[inline] #[allow(dead_code)] -pub fn HTTP_EQUAL_VERSION(version: HTTP_VERSION, major: ::USHORT, minor: ::USHORT) -> bool { - version.MajorVersion == major && version.MinorVersion == minor -} -#[inline] #[allow(dead_code)] -pub fn HTTP_GREATER_VERSION(version: HTTP_VERSION, major: ::USHORT, minor: ::USHORT) -> bool { - version.MajorVersion > major || (version.MajorVersion == major && version.MinorVersion > minor) -} -#[inline] #[allow(dead_code)] -pub fn HTTP_LESS_VERSION(version: HTTP_VERSION, major: ::USHORT, minor: ::USHORT) -> bool { - version.MajorVersion < major || (version.MajorVersion == major && version.MinorVersion < minor) -} -#[inline] #[allow(dead_code)] -pub fn HTTP_NOT_EQUAL_VERSION(version: HTTP_VERSION, major: ::USHORT, minor: ::USHORT) -> bool { - !HTTP_EQUAL_VERSION(version, major, minor) -} -#[inline] #[allow(dead_code)] -pub fn HTTP_GREATER_EQUAL_VERSION(version: HTTP_VERSION, major: ::USHORT, minor: ::USHORT) -> bool { - !HTTP_LESS_VERSION(version, major, minor) -} -#[inline] #[allow(dead_code)] -pub fn HTTP_LESS_EQUAL_VERSION(version: HTTP_VERSION, major: ::USHORT, minor: ::USHORT) -> bool { - !HTTP_GREATER_VERSION(version, major, minor) -} -ENUM!{enum HTTP_VERB { - HttpVerbUnparsed, - HttpVerbUnknown, - HttpVerbInvalid, - HttpVerbOPTIONS, - HttpVerbGET, - HttpVerbHEAD, - HttpVerbPOST, - HttpVerbPUT, - HttpVerbDELETE, - HttpVerbTRACE, - HttpVerbCONNECT, - HttpVerbTRACK, - HttpVerbMOVE, - HttpVerbCOPY, - HttpVerbPROPFIND, - HttpVerbPROPPATCH, - HttpVerbMKCOL, - HttpVerbLOCK, - HttpVerbUNLOCK, - HttpVerbSEARCH, - HttpVerbMaximum, -}} -pub type PHTTP_VERB = *mut HTTP_VERB; -ENUM!{enum HTTP_HEADER_ID { - HttpHeaderCacheControl = 0, - HttpHeaderConnection = 1, - HttpHeaderDate = 2, - HttpHeaderKeepAlive = 3, - HttpHeaderPragma = 4, - HttpHeaderTrailer = 5, - HttpHeaderTransferEncoding = 6, - HttpHeaderUpgrade = 7, - HttpHeaderVia = 8, - HttpHeaderWarning = 9, - HttpHeaderAllow = 10, - HttpHeaderContentLength = 11, - HttpHeaderContentType = 12, - HttpHeaderContentEncoding = 13, - HttpHeaderContentLanguage = 14, - HttpHeaderContentLocation = 15, - HttpHeaderContentMd5 = 16, - HttpHeaderContentRange = 17, - HttpHeaderExpires = 18, - HttpHeaderLastModified = 19, - HttpHeaderAccept = 20, - HttpHeaderAcceptCharset = 21, - HttpHeaderAcceptEncoding = 22, - HttpHeaderAcceptLanguage = 23, - HttpHeaderAuthorization = 24, - HttpHeaderCookie = 25, - HttpHeaderExpect = 26, - HttpHeaderFrom = 27, - HttpHeaderHost = 28, - HttpHeaderIfMatch = 29, - HttpHeaderIfModifiedSince = 30, - HttpHeaderIfNoneMatch = 31, - HttpHeaderIfRange = 32, - HttpHeaderIfUnmodifiedSince = 33, - HttpHeaderMaxForwards = 34, - HttpHeaderProxyAuthorization = 35, - HttpHeaderReferer = 36, - HttpHeaderRange = 37, - HttpHeaderTe = 38, - HttpHeaderTranslate = 39, - HttpHeaderUserAgent = 40, - HttpHeaderRequestMaximum = 41, - HttpHeaderAcceptRanges = 20, - HttpHeaderAge = 21, - HttpHeaderEtag = 22, - HttpHeaderLocation = 23, - HttpHeaderProxyAuthenticate = 24, - HttpHeaderRetryAfter = 25, - HttpHeaderServer = 26, - HttpHeaderSetCookie = 27, - HttpHeaderVary = 28, - HttpHeaderWwwAuthenticate = 29, - HttpHeaderResponseMaximum = 30, - HttpHeaderMaximum = 41, -}} -pub type PHTTP_HEADER_ID = *mut HTTP_HEADER_ID; -STRUCT!{struct HTTP_KNOWN_HEADER { - RawValueLength: ::USHORT, - pRawValue: ::PCSTR, -}} -pub type PHTTP_KNOWN_HEADER = *mut HTTP_KNOWN_HEADER; -STRUCT!{struct HTTP_UNKNOWN_HEADER { - NameLength: ::USHORT, - RawValueLength: ::USHORT, - pName: ::PCSTR, - pRawValue: ::PCSTR, -}} -pub type PHTTP_UNKNOWN_HEADER = *mut HTTP_UNKNOWN_HEADER; -ENUM!{enum HTTP_LOG_DATA_TYPE { - HttpLogDataTypeFields = 0, -}} -pub type PHTTP_LOG_DATA_TYPE = *mut HTTP_LOG_DATA_TYPE; -STRUCT!{struct HTTP_LOG_DATA { - Type: HTTP_LOG_DATA_TYPE, -}} -pub type PHTTP_LOG_DATA = *mut HTTP_LOG_DATA; -STRUCT!{struct HTTP_LOG_FIELDS_DATA { - Base: HTTP_LOG_DATA, - UserNameLength: ::USHORT, - UriStemLength: ::USHORT, - ClientIpLength: ::USHORT, - ServerNameLength: ::USHORT, - ServiceNameLength: ::USHORT, - ServerIpLength: ::USHORT, - MethodLength: ::USHORT, - UriQueryLength: ::USHORT, - HostLength: ::USHORT, - UserAgentLength: ::USHORT, - CookieLength: ::USHORT, - ReferrerLength: ::USHORT, - UserName: ::PWCHAR, - UriStem: ::PWCHAR, - ClientIp: ::PCHAR, - ServerName: ::PCHAR, - ServiceName: ::PCHAR, - ServerIp: ::PCHAR, - Method: ::PCHAR, - UriQuery: ::PCHAR, - Host: ::PCHAR, - UserAgent: ::PCHAR, - Cookie: ::PCHAR, - Referrer: ::PCHAR, - ServerPort: ::USHORT, - ProtocolStatus: ::USHORT, - Win32Status: ::ULONG, - MethodNum: HTTP_VERB, - SubStatus: ::USHORT, -}} -pub type PHTTP_LOG_FIELDS_DATA = *mut HTTP_LOG_FIELDS_DATA; -ENUM!{enum HTTP_DATA_CHUNK_TYPE { - HttpDataChunkFromMemory, - HttpDataChunkFromFileHandle, - HttpDataChunkFromFragmentCache, - HttpDataChunkFromFragmentCacheEx, - HttpDataChunkMaximum, -}} -pub type PHTTP_DATA_CHUNK_TYPE = *mut HTTP_DATA_CHUNK_TYPE; -STRUCT!{struct HTTP_DATA_CHUNK_FromMemory { - pBuffer: ::PVOID, - BufferLength: ::ULONG, -}} -STRUCT!{struct HTTP_DATA_CHUNK_FromFileHandle { - ByteRange: HTTP_BYTE_RANGE, - FileHandle: ::HANDLE, -}} -STRUCT!{struct HTTP_DATA_CHUNK_FromFragmentCache { - FragmentNameLength: ::USHORT, - pFragmentName: ::PCWSTR, -}} -STRUCT!{struct HTTP_DATA_CHUNK_FromFragmentCacheEx { - ByteRange: HTTP_BYTE_RANGE, - pFragmentName: ::PCWSTR, -}} -STRUCT!{struct HTTP_DATA_CHUNK { - DataChunkType: HTTP_DATA_CHUNK_TYPE, - FromFileHandle: HTTP_DATA_CHUNK_FromFileHandle, -}} -UNION!(HTTP_DATA_CHUNK, FromFileHandle, FromMemory, FromMemory_mut, HTTP_DATA_CHUNK_FromMemory); -UNION!( - HTTP_DATA_CHUNK, FromFileHandle, FromFragmentCache, FromFragmentCache_mut, - HTTP_DATA_CHUNK_FromFragmentCache -); -UNION!( - HTTP_DATA_CHUNK, FromFileHandle, FromFragmentCacheEx, FromFragmentCacheEx_mut, - HTTP_DATA_CHUNK_FromFragmentCacheEx -); -pub type PHTTP_DATA_CHUNK = *mut HTTP_DATA_CHUNK; -#[repr(C)] #[derive(Copy)] -pub struct HTTP_REQUEST_HEADERS { - pub UnknownHeaderCount: ::USHORT, - pub pUnknownHeaders: PHTTP_UNKNOWN_HEADER, - pub TrailerCount: ::USHORT, - pub pTrailers: PHTTP_UNKNOWN_HEADER, - pub KnownHeaders: [HTTP_KNOWN_HEADER; 41], // FIXME HttpHeaderRequestMaximum -} -impl Clone for HTTP_REQUEST_HEADERS { fn clone(&self) -> HTTP_REQUEST_HEADERS { *self } } -pub type PHTTP_REQUEST_HEADERS = *mut HTTP_REQUEST_HEADERS; -#[repr(C)] #[derive(Copy)] -pub struct HTTP_RESPONSE_HEADERS { - pub UnknownHeaderCount: ::USHORT, - pub pUnknownHeaders: PHTTP_UNKNOWN_HEADER, - pub TrailerCount: ::USHORT, - pub pTrailers: PHTTP_UNKNOWN_HEADER, - pub KnownHeaders: [HTTP_KNOWN_HEADER; 30], // FIXME HttpHeaderResponseMaximum -} -impl Clone for HTTP_RESPONSE_HEADERS { fn clone(&self) -> HTTP_RESPONSE_HEADERS { *self } } -pub type PHTTP_RESPONSE_HEADERS = *mut HTTP_RESPONSE_HEADERS; -STRUCT!{struct HTTP_TRANSPORT_ADDRESS { - pRemoteAddress: ::PSOCKADDR, - pLocalAddress: ::PSOCKADDR, -}} -pub type PHTTP_TRANSPORT_ADDRESS = *mut HTTP_TRANSPORT_ADDRESS; -STRUCT!{struct HTTP_COOKED_URL { - FullUrlLength: ::USHORT, - HostLength: ::USHORT, - AbsPathLength: ::USHORT, - QueryStringLength: ::USHORT, - pFullUrl: ::PCWSTR, - pHost: ::PCWSTR, - pAbsPath: ::PCWSTR, - pQueryString: ::PCWSTR, -}} -pub type PHTTP_COOKED_URL = *mut HTTP_COOKED_URL; -pub type HTTP_URL_CONTEXT = ::ULONGLONG; -pub const HTTP_URL_FLAG_REMOVE_ALL: ::ULONG = 0x00000001; -ENUM!{enum HTTP_AUTH_STATUS { - HttpAuthStatusSuccess, - HttpAuthStatusNotAuthenticated, - HttpAuthStatusFailure, -}} -pub type PHTTP_AUTH_STATUS = *mut HTTP_AUTH_STATUS; -ENUM!{enum HTTP_REQUEST_AUTH_TYPE { - HttpRequestAuthTypeNone = 0, - HttpRequestAuthTypeBasic, - HttpRequestAuthTypeDigest, - HttpRequestAuthTypeNTLM, - HttpRequestAuthTypeNegotiate, - HttpRequestAuthTypeKerberos, -}} -pub type PHTTP_REQUEST_AUTH_TYPE = *mut HTTP_REQUEST_AUTH_TYPE; -STRUCT!{struct HTTP_SSL_CLIENT_CERT_INFO { - CertFlags: ::ULONG, - CertEncodedSize: ::ULONG, - pCertEncoded: ::PUCHAR, - Token: ::HANDLE, - CertDeniedByMapper: ::BOOLEAN, -}} -pub type PHTTP_SSL_CLIENT_CERT_INFO = *mut HTTP_SSL_CLIENT_CERT_INFO; -pub const HTTP_RECEIVE_SECURE_CHANNEL_TOKEN: ::ULONG = 0x1; -STRUCT!{struct HTTP_SSL_INFO { - ServerCertKeySize: ::USHORT, - ConnectionKeySize: ::USHORT, - ServerCertIssuerSize: ::ULONG, - ServerCertSubjectSize: ::ULONG, - pServerCertIssuer: ::PCSTR, - pServerCertSubject: ::PCSTR, - pClientCertInfo: PHTTP_SSL_CLIENT_CERT_INFO, - SslClientCertNegotiated: ::ULONG, -}} -pub type PHTTP_SSL_INFO = *mut HTTP_SSL_INFO; -ENUM!{enum HTTP_REQUEST_INFO_TYPE { - HttpRequestInfoTypeAuth, - HttpRequestInfoTypeChannelBind, -}} -STRUCT!{struct HTTP_REQUEST_INFO { - InfoType: HTTP_REQUEST_INFO_TYPE, - InfoLength: ::ULONG, - pInfo: ::PVOID, -}} -pub type PHTTP_REQUEST_INFO = *mut HTTP_REQUEST_INFO; -pub const HTTP_REQUEST_AUTH_FLAG_TOKEN_FOR_CACHED_CRED: ::ULONG = 0x00000001; -STRUCT!{struct HTTP_REQUEST_AUTH_INFO { - AuthStatus: HTTP_AUTH_STATUS, - SecStatus: ::SECURITY_STATUS, - Flags: ::ULONG, - AuthType: HTTP_REQUEST_AUTH_TYPE, - AccessToken: ::HANDLE, - ContextAttributes: ::ULONG, - PackedContextLength: ::ULONG, - PackedContextType: ::ULONG, - PackedContext: ::PVOID, - MutualAuthDataLength: ::ULONG, - pMutualAuthData: ::PCHAR, - PackageNameLength: ::USHORT, - pPackageName: ::PWSTR, -}} -pub type PHTTP_REQUEST_AUTH_INFO = *mut HTTP_REQUEST_AUTH_INFO; -#[repr(C)] #[derive(Clone, Copy)] -pub struct HTTP_REQUEST_V1 { - pub Flags: ::ULONG, - pub ConnectionId: HTTP_CONNECTION_ID, - pub RequestId: HTTP_REQUEST_ID, - pub UrlContext: HTTP_URL_CONTEXT, - pub Version: HTTP_VERSION, - pub Verb: HTTP_VERB, - pub UnknownVerbLength: ::USHORT, - pub RawUrlLength: ::USHORT, - pub pUnknownVerb: ::PCSTR, - pub pRawUrl: ::PCSTR, - pub CookedUrl: HTTP_COOKED_URL, - pub Address: HTTP_TRANSPORT_ADDRESS, - pub Headers: HTTP_REQUEST_HEADERS, - pub BytesReceived: ::ULONGLONG, - pub EntityChunkCount: ::USHORT, - pub pEntityChunks: PHTTP_DATA_CHUNK, - pub RawConnectionId: HTTP_RAW_CONNECTION_ID, - pub pSslInfo: PHTTP_SSL_INFO, -} -pub type PHTTP_REQUEST_V1 = *mut HTTP_REQUEST_V1; -#[repr(C)] #[derive(Clone, Copy)] -pub struct HTTP_REQUEST_V2 { - pub Base: HTTP_REQUEST_V1, - pub RequestInfoCount: ::USHORT, - pub pRequestInfo: PHTTP_REQUEST_INFO, -} -pub type PHTTP_REQUEST_V2 = *mut HTTP_REQUEST_V2; -pub type HTTP_REQUEST = HTTP_REQUEST_V2; -pub type PHTTP_REQUEST = *mut HTTP_REQUEST; -pub const HTTP_REQUEST_FLAG_MORE_ENTITY_BODY_EXISTS: ::ULONG = 0x00000001; -pub const HTTP_REQUEST_FLAG_IP_ROUTED: ::ULONG = 0x00000002; -#[repr(C)] #[derive(Clone, Copy)] -pub struct HTTP_RESPONSE_V1 { - pub Flags: ::ULONG, - pub Version: HTTP_VERSION, - pub StatusCode: ::USHORT, - pub ReasonLength: ::USHORT, - pub pReason: ::PCSTR, - pub Headers: HTTP_RESPONSE_HEADERS, - pub EntityChunkCount: ::USHORT, - pub pEntityChunks: PHTTP_DATA_CHUNK, -} -pub type PHTTP_RESPONSE_V1 = *mut HTTP_RESPONSE_V1; -pub const HTTP_RESPONSE_FLAG_MULTIPLE_ENCODINGS_AVAILABLE: ::ULONG = 0x00000001; -ENUM!{enum HTTP_RESPONSE_INFO_TYPE { - HttpResponseInfoTypeMultipleKnownHeaders, - HttpResponseInfoTypeAuthenticationProperty, - HttpResponseInfoTypeQoSProperty, - HttpResponseInfoTypeChannelBind, -}} -pub type PHTTP_RESPONSE_INFO_TYPE = *mut HTTP_RESPONSE_INFO_TYPE; -STRUCT!{struct HTTP_RESPONSE_INFO { - Type: HTTP_RESPONSE_INFO_TYPE, - Length: ::ULONG, - pInfo: ::PVOID, -}} -pub type PHTTP_RESPONSE_INFO = *mut HTTP_RESPONSE_INFO; -pub const HTTP_RESPONSE_INFO_FLAGS_PRESERVE_ORDER: ::ULONG = 0x00000001; -STRUCT!{struct HTTP_MULTIPLE_KNOWN_HEADERS { - HeaderId: HTTP_HEADER_ID, - Flags: ::ULONG, - KnownHeaderCount: ::USHORT, - KnownHeaders: PHTTP_KNOWN_HEADER, -}} -pub type PHTTP_MULTIPLE_KNOWN_HEADERS = *mut HTTP_MULTIPLE_KNOWN_HEADERS; -#[repr(C)] #[derive(Clone, Copy)] -pub struct HTTP_RESPONSE_V2 { - pub Base: HTTP_RESPONSE_V1, - pub ResponseInfoCount: ::USHORT, - pub pResponseInfo: PHTTP_RESPONSE_INFO, -} -pub type PHTTP_RESPONSE_V2 = *mut HTTP_RESPONSE_V2; -pub type HTTP_RESPONSE = HTTP_RESPONSE_V2; -pub type PHTTP_RESPONSE = *mut HTTP_RESPONSE; -STRUCT!{struct HTTPAPI_VERSION { - HttpApiMajorVersion: ::USHORT, - HttpApiMinorVersion: ::USHORT, -}} -pub type PHTTPAPI_VERSION = *mut HTTPAPI_VERSION; -pub const HTTPAPI_VERSION_2: HTTPAPI_VERSION = HTTPAPI_VERSION { - HttpApiMajorVersion: 2, HttpApiMinorVersion: 0, -}; -pub const HTTPAPI_VERSION_1: HTTPAPI_VERSION = HTTPAPI_VERSION { - HttpApiMajorVersion: 1, HttpApiMinorVersion: 0, -}; -#[inline] #[allow(dead_code)] -pub fn HTTPAPI_EQUAL_VERSION(version: HTTPAPI_VERSION, major: ::USHORT, minor: ::USHORT) -> bool { - version.HttpApiMajorVersion == major && version.HttpApiMinorVersion == minor -} -#[inline] #[allow(dead_code)] -pub fn HTTPAPI_GREATER_VERSION(version: HTTPAPI_VERSION, major: ::USHORT, minor: ::USHORT) -> bool { - version.HttpApiMajorVersion > major || - (version.HttpApiMajorVersion == major && version.HttpApiMinorVersion > minor) -} -#[inline] #[allow(dead_code)] -pub fn HTTPAPI_LESS_VERSION(version: HTTPAPI_VERSION, major: ::USHORT, minor: ::USHORT) -> bool { - version.HttpApiMajorVersion < major || - (version.HttpApiMajorVersion == major && version.HttpApiMinorVersion < minor) -} -#[inline] #[allow(dead_code)] -pub fn HTTPAPI_VERSION_GREATER_OR_EQUAL( - version: HTTPAPI_VERSION, major: ::USHORT, minor: ::USHORT -) -> bool { - !HTTPAPI_LESS_VERSION(version, major, minor) -} -ENUM!{enum HTTP_CACHE_POLICY_TYPE { - HttpCachePolicyNocache, - HttpCachePolicyUserInvalidates, - HttpCachePolicyTimeToLive, - HttpCachePolicyMaximum, -}} -pub type PHTTP_CACHE_POLICY_TYPE = *mut HTTP_CACHE_POLICY_TYPE; -STRUCT!{struct HTTP_CACHE_POLICY { - Policy: HTTP_CACHE_POLICY_TYPE, - SecondsToLive: ::ULONG, -}} -pub type PHTTP_CACHE_POLICY = *mut HTTP_CACHE_POLICY; -ENUM!{enum HTTP_SERVICE_CONFIG_ID { - HttpServiceConfigIPListenList, - HttpServiceConfigSSLCertInfo, - HttpServiceConfigUrlAclInfo, - HttpServiceConfigTimeout, - HttpServiceConfigCache, - HttpServiceConfigSslSniCertInfo, - HttpServiceConfigSslCcsCertInfo, - HttpServiceConfigMax, -}} -pub type PHTTP_SERVICE_CONFIG_ID = *mut HTTP_SERVICE_CONFIG_ID; -ENUM!{enum HTTP_SERVICE_CONFIG_QUERY_TYPE { - HttpServiceConfigQueryExact, - HttpServiceConfigQueryNext, - HttpServiceConfigQueryMax, -}} -pub type PHTTP_SERVICE_CONFIG_QUERY_TYPE = *mut HTTP_SERVICE_CONFIG_QUERY_TYPE; -STRUCT!{struct HTTP_SERVICE_CONFIG_SSL_KEY { - pIpPort: ::PSOCKADDR, -}} -pub type PHTTP_SERVICE_CONFIG_SSL_KEY = *mut HTTP_SERVICE_CONFIG_SSL_KEY; -#[repr(C)] #[derive(Clone, Copy)] -pub struct HTTP_SERVICE_CONFIG_SSL_SNI_KEY { - pub IpPort: ::SOCKADDR_STORAGE, - pub Host: ::PWSTR, -} -pub type PHTTP_SERVICE_CONFIG_SSL_SNI_KEY = *mut HTTP_SERVICE_CONFIG_SSL_SNI_KEY; -#[repr(C)] #[derive(Clone, Copy)] -pub struct HTTP_SERVICE_CONFIG_SSL_CCS_KEY { - pub LocalAddress: ::SOCKADDR_STORAGE, -} -pub type PHTTP_SERVICE_CONFIG_SSL_CCS_KEY = *mut HTTP_SERVICE_CONFIG_SSL_CCS_KEY; -STRUCT!{struct HTTP_SERVICE_CONFIG_SSL_PARAM { - SslHashLength: ::ULONG, - pSslHash: ::PVOID, - AppId: ::GUID, - pSslCertStoreName: ::PWSTR, - DefaultCertCheckMode: ::DWORD, - DefaultRevocationFreshnessTime: ::DWORD, - DefaultRevocationUrlRetrievalTimeout: ::DWORD, - pDefaultSslCtlIdentifier: ::PWSTR, - pDefaultSslCtlStoreName: ::PWSTR, - DefaultFlags: ::DWORD, -}} -pub type PHTTP_SERVICE_CONFIG_SSL_PARAM = *mut HTTP_SERVICE_CONFIG_SSL_PARAM; -pub const HTTP_SERVICE_CONFIG_SSL_FLAG_USE_DS_MAPPER: ::DWORD = 0x00000001; -pub const HTTP_SERVICE_CONFIG_SSL_FLAG_NEGOTIATE_CLIENT_CERT: ::DWORD = 0x00000002; -pub const HTTP_SERVICE_CONFIG_SSL_FLAG_NO_RAW_FILTER: ::DWORD = 0x00000004; -STRUCT!{struct HTTP_SERVICE_CONFIG_SSL_SET { - KeyDesc: HTTP_SERVICE_CONFIG_SSL_KEY, - ParamDesc: HTTP_SERVICE_CONFIG_SSL_PARAM, -}} -pub type PHTTP_SERVICE_CONFIG_SSL_SET = *mut HTTP_SERVICE_CONFIG_SSL_SET; -#[repr(C)] #[derive(Clone, Copy)] -pub struct HTTP_SERVICE_CONFIG_SSL_SNI_SET { - pub KeyDesc: HTTP_SERVICE_CONFIG_SSL_SNI_KEY, - pub ParamDesc: HTTP_SERVICE_CONFIG_SSL_PARAM, -} -pub type PHTTP_SERVICE_CONFIG_SSL_SNI_SET = *mut HTTP_SERVICE_CONFIG_SSL_SNI_SET; -#[repr(C)] #[derive(Clone, Copy)] -pub struct HTTP_SERVICE_CONFIG_SSL_CCS_SET { - pub KeyDesc: HTTP_SERVICE_CONFIG_SSL_CCS_KEY, - pub ParamDesc: HTTP_SERVICE_CONFIG_SSL_PARAM, -} -pub type PHTTP_SERVICE_CONFIG_SSL_CCS_SET = *mut HTTP_SERVICE_CONFIG_SSL_CCS_SET; -STRUCT!{struct HTTP_SERVICE_CONFIG_SSL_QUERY { - QueryDesc: HTTP_SERVICE_CONFIG_QUERY_TYPE, - KeyDesc: HTTP_SERVICE_CONFIG_SSL_KEY, - dwToken: ::DWORD, -}} -pub type PHTTP_SERVICE_CONFIG_SSL_QUERY = *mut HTTP_SERVICE_CONFIG_SSL_QUERY; -#[repr(C)] #[derive(Clone, Copy)] -pub struct HTTP_SERVICE_CONFIG_SSL_SNI_QUERY { - pub QueryDesc: HTTP_SERVICE_CONFIG_QUERY_TYPE, - pub KeyDesc: HTTP_SERVICE_CONFIG_SSL_SNI_KEY, - pub dwToken: ::DWORD, -} -pub type PHTTP_SERVICE_CONFIG_SSL_SNI_QUERY = *mut HTTP_SERVICE_CONFIG_SSL_SNI_QUERY; -#[repr(C)] #[derive(Clone, Copy)] -pub struct HTTP_SERVICE_CONFIG_SSL_CCS_QUERY { - pub QueryDesc: HTTP_SERVICE_CONFIG_QUERY_TYPE, - pub KeyDesc: HTTP_SERVICE_CONFIG_SSL_CCS_KEY, - pub dwToken: ::DWORD, -} -pub type PHTTP_SERVICE_CONFIG_SSL_CCS_QUERY = *mut HTTP_SERVICE_CONFIG_SSL_CCS_QUERY; -STRUCT!{struct HTTP_SERVICE_CONFIG_IP_LISTEN_PARAM { - AddrLength: ::USHORT, - pAddress: ::PSOCKADDR, -}} -pub type PHTTP_SERVICE_CONFIG_IP_LISTEN_PARAM = *mut HTTP_SERVICE_CONFIG_IP_LISTEN_PARAM; -#[repr(C)] #[derive(Clone, Copy)] -pub struct HTTP_SERVICE_CONFIG_IP_LISTEN_QUERY { - pub AddrCount: ::ULONG, - pub AddrList: [::SOCKADDR_STORAGE; ::ANYSIZE_ARRAY], -} -pub type PHTTP_SERVICE_CONFIG_IP_LISTEN_QUERY = *mut HTTP_SERVICE_CONFIG_IP_LISTEN_QUERY; -STRUCT!{struct HTTP_SERVICE_CONFIG_URLACL_KEY { - pUrlPrefix: ::PWSTR, -}} -pub type PHTTP_SERVICE_CONFIG_URLACL_KEY = *mut HTTP_SERVICE_CONFIG_URLACL_KEY; -STRUCT!{struct HTTP_SERVICE_CONFIG_URLACL_PARAM { - pStringSecurityDescriptor: ::PWSTR, -}} -pub type PHTTP_SERVICE_CONFIG_URLACL_PARAM = *mut HTTP_SERVICE_CONFIG_URLACL_PARAM; -STRUCT!{struct HTTP_SERVICE_CONFIG_URLACL_SET { - KeyDesc: HTTP_SERVICE_CONFIG_URLACL_KEY, - ParamDesc: HTTP_SERVICE_CONFIG_URLACL_PARAM, -}} -pub type PHTTP_SERVICE_CONFIG_URLACL_SET = *mut HTTP_SERVICE_CONFIG_URLACL_SET; -STRUCT!{struct HTTP_SERVICE_CONFIG_URLACL_QUERY { - QueryDesc: HTTP_SERVICE_CONFIG_QUERY_TYPE, - KeyDesc: HTTP_SERVICE_CONFIG_URLACL_KEY, - dwToken: ::DWORD, -}} -pub type PHTTP_SERVICE_CONFIG_URLACL_QUERY = *mut HTTP_SERVICE_CONFIG_URLACL_QUERY; -ENUM!{enum HTTP_SERVICE_CONFIG_CACHE_KEY { - MaxCacheResponseSize = 0, - CacheRangeChunkSize, -}} -pub type PHTTP_SERVICE_CONFIG_CACHE_KEY = *mut HTTP_SERVICE_CONFIG_CACHE_KEY; -pub type HTTP_SERVICE_CONFIG_CACHE_PARAM = ::ULONG; -pub type PHTTP_SERVICE_CONFIG_CACHE_PARAM = *mut ::ULONG; -STRUCT!{struct HTTP_SERVICE_CONFIG_CACHE_SET { - KeyDesc: HTTP_SERVICE_CONFIG_CACHE_KEY, - ParamDesc: HTTP_SERVICE_CONFIG_CACHE_PARAM, -}} -pub type PHTTP_SERVICE_CONFIG_CACHE_SET = *mut HTTP_SERVICE_CONFIG_CACHE_SET; diff --git a/deps/winapi-0.2.5/src/lib.rs b/deps/winapi-0.2.5/src/lib.rs deleted file mode 100644 index 9ea1fbf77..000000000 --- a/deps/winapi-0.2.5/src/lib.rs +++ /dev/null @@ -1,420 +0,0 @@ -// Copyright © 2015, Peter Atashian -// Licensed under the MIT License <LICENSE.md> -//! Types and constants for WinAPI bindings. -#![allow(bad_style, raw_pointer_derive)] -#![warn(missing_copy_implementations, trivial_casts, trivial_numeric_casts)] -#![warn(unused_qualifications, unused)] -#![cfg(windows)] -//------------------------------------------------------------------------------------------------- -// Imports -//------------------------------------------------------------------------------------------------- -pub use std::os::raw::{ - c_void, - c_char, - c_schar, - c_uchar, - c_short, - c_ushort, - c_int, - c_uint, - c_long, - c_ulong, - c_longlong, - c_ulonglong, - c_float, - c_double, -}; -pub use audioclient::*; -pub use audiosessiontypes::*; -pub use basetsd::*; -pub use bcrypt::*; -pub use cfg::*; -pub use cfgmgr32::*; -pub use commctrl::*; -pub use commdlg::*; -pub use corsym::*; -pub use d2d1::*; -pub use d2dbasetypes::*; -pub use d3d9::*; -pub use d3d9caps::*; -pub use d3d9types::*; -pub use d3d11::*; -pub use d3d12::*; -pub use d3d12sdklayers::*; -pub use d3dcommon::*; -pub use dbghelp::*; -pub use dcommon::*; -pub use devpropdef::*; -pub use docobj::*; -pub use dpapi::*; -pub use dsgetdc::*; -pub use dsound::*; -pub use dsrole::*; -pub use dwmapi::*; -pub use dwrite::*; -pub use dxgi::*; -pub use dxgi1_2::*; -pub use dxgi1_3::*; -pub use dxgi1_4::*; -pub use dxgiformat::*; -pub use dxgitype::*; -pub use errhandlingapi::*; -pub use excpt::*; -pub use fileapi::*; -pub use gl::*; -pub use guiddef::*; -pub use heapapi::*; -pub use hidclass::*; -pub use hidpi::*; -pub use hidsdi::*; -pub use hidusage::*; -pub use hstring::*; -pub use http::*; -pub use imm::*; -pub use inaddr::*; -pub use inspectable::*; -pub use ksmedia::*; -pub use libloaderapi::*; -pub use lmaccess::*; -pub use lmcons::*; -pub use lmdfs::*; -pub use lmerrlog::*; -pub use lmjoin::*; -pub use lsalookup::*; -pub use memoryapi::*; -pub use minwinbase::*; -pub use minwindef::*; -pub use mmdeviceapi::*; -pub use mmreg::*; -pub use mmsystem::*; -pub use mscat::*; -pub use mssip::*; -pub use nb30::*; -pub use ncrypt::*; -pub use ntdef::*; -pub use ntsecapi::*; -pub use ntstatus::*; -pub use oaidl::*; -pub use objbase::*; -pub use objidl::*; -pub use objidlbase::*; -pub use olectl::*; -pub use processsnapshot::*; -pub use processthreadsapi::*; -pub use propsys::*; -pub use prsht::*; -pub use psapi::*; -pub use qos::*; -pub use reason::*; -pub use rpc::*; -pub use rpcdce::*; -pub use sapi::*; -pub use schannel::*; -pub use servprov::*; -pub use setupapi::*; -pub use shellapi::*; -pub use shellscalingapi::*; -pub use shlguid::*; -pub use shlobj::*; -pub use shobjidl::*; -pub use shtypes::*; -pub use spapidef::*; -pub use sspi::*; -pub use subauth::*; -pub use synchapi::*; -pub use sysinfoapi::*; -pub use threadpoolapi::*; -pub use timezoneapi::*; -pub use tlhelp32::*; -pub use unknwnbase::*; -pub use urlhist::*; -pub use urlmon::*; -pub use usp10::*; -pub use vadefs::*; -pub use vsbackup::*; -pub use vss::*; -pub use vsserror::*; -pub use vswriter::*; -pub use werapi::*; -pub use winbase::*; -pub use wincon::*; -pub use wincred::*; -pub use wincrypt::*; -pub use windowsx::*; -pub use windef::*; -pub use windowscodecs::*; -pub use winerror::*; -pub use winevt::*; -pub use wingdi::*; -pub use winhttp::*; -pub use winioctl::*; -pub use winnetwk::*; -pub use winnls::*; -pub use winnt::*; -pub use winscard::*; -pub use winsmcrd::*; -pub use winsock2::*; -pub use winspool::*; -pub use winsvc::*; -pub use winuser::*; -pub use ws2def::*; -pub use ws2ipdef::*; -pub use ws2spi::*; -pub use ws2tcpip::*; -pub use wtypes::*; -pub use wtypesbase::*; -pub use xinput::*; -//------------------------------------------------------------------------------------------------- -// Modules -//------------------------------------------------------------------------------------------------- -#[macro_use] mod macros; -pub mod audioclient; -pub mod audiosessiontypes; -pub mod basetsd; -pub mod bcrypt; -pub mod cfg; -pub mod cfgmgr32; -pub mod commctrl; -pub mod commdlg; -pub mod corsym; -pub mod d2d1; -pub mod d2dbasetypes; -pub mod d3d9; -pub mod d3d9caps; -pub mod d3d9types; -pub mod d3d11; -pub mod d3d12; -pub mod d3d12sdklayers; -pub mod d3dcommon; -pub mod dbghelp; -pub mod dcommon; -pub mod devpropdef; -pub mod docobj; -pub mod dpapi; -pub mod dsgetdc; -pub mod dsound; -pub mod dsrole; -pub mod dwmapi; -pub mod dwrite; -pub mod dxgi; -pub mod dxgi1_2; -pub mod dxgi1_3; -pub mod dxgi1_4; -pub mod dxgiformat; -pub mod dxgitype; -pub mod errhandlingapi; -pub mod excpt; -pub mod fileapi; -pub mod gl; -pub mod guiddef; -pub mod heapapi; -pub mod hidclass; -pub mod hidpi; -pub mod hidsdi; -pub mod hidusage; -pub mod hstring; -pub mod http; -pub mod imm; -pub mod inaddr; -pub mod inspectable; -pub mod ksmedia; -pub mod libloaderapi; -pub mod lmaccess; -pub mod lmcons; -pub mod lmdfs; -pub mod lmerrlog; -pub mod lmjoin; -pub mod lsalookup; -pub mod memoryapi; -pub mod minwinbase; -pub mod minwindef; -pub mod mmdeviceapi; -pub mod mmreg; -pub mod mmsystem; -pub mod mscat; -pub mod mssip; -pub mod nb30; -pub mod ncrypt; -pub mod ntdef; -pub mod ntsecapi; -pub mod ntstatus; -pub mod oaidl; -pub mod objbase; -pub mod objidl; -pub mod objidlbase; -pub mod olectl; -pub mod processsnapshot; -pub mod processthreadsapi; -pub mod propsys; -pub mod prsht; -pub mod psapi; -pub mod qos; -pub mod reason; -pub mod rpc; -pub mod rpcdce; -pub mod sapi; -pub mod schannel; -pub mod servprov; -pub mod setupapi; -pub mod shellapi; -pub mod shellscalingapi; -pub mod shlguid; -pub mod shlobj; -pub mod shobjidl; -pub mod shtypes; -pub mod spapidef; -pub mod sspi; -pub mod subauth; -pub mod synchapi; -pub mod sysinfoapi; -pub mod threadpoolapi; -pub mod timezoneapi; -pub mod tlhelp32; -pub mod unknwnbase; -pub mod urlhist; -pub mod urlmon; -pub mod usp10; -pub mod vadefs; -pub mod vsbackup; -pub mod vss; -pub mod vsserror; -pub mod vswriter; -pub mod werapi; -pub mod winbase; -pub mod wincon; -pub mod wincred; -pub mod wincrypt; -pub mod windef; -pub mod windowscodecs; -pub mod windowsx; -pub mod winerror; -pub mod winevt; -pub mod wingdi; -pub mod winhttp; -pub mod winioctl; -pub mod winnetwk; -pub mod winnls; -pub mod winnt; -pub mod winscard; -pub mod winsmcrd; -pub mod winsock2; -pub mod winspool; -pub mod winsvc; -pub mod winuser; -pub mod ws2def; -pub mod ws2ipdef; -pub mod ws2spi; -pub mod ws2tcpip; -pub mod wtypes; -pub mod wtypesbase; -pub mod xinput; -//------------------------------------------------------------------------------------------------- -// Primitive types not provided by std -//------------------------------------------------------------------------------------------------- -pub type __int8 = i8; -pub type __uint8 = u8; -pub type __int16 = i16; -pub type __uint16 = u16; -pub type __int32 = i32; -pub type __uint32 = u32; -pub type __int64 = i64; -pub type __uint64 = u64; -pub type wchar_t = c_ushort; -#[cfg(target_arch = "x86")] -pub type size_t = c_uint; -#[cfg(target_arch = "x86_64")] -pub type size_t = __uint64; -//------------------------------------------------------------------------------------------------- -// strmif.h -//------------------------------------------------------------------------------------------------- -pub type REFERENCE_TIME = LONGLONG; -//------------------------------------------------------------------------------------------------- -// propidl.h -//------------------------------------------------------------------------------------------------- -STRUCT!{struct PROPVARIANT { - vt: VARTYPE, - wReserved1: WORD, - wReserved2: WORD, - wReserved3: WORD, - data: [u8; 16], -}} -//------------------------------------------------------------------------------------------------- -// combaseapi.h -// Base Component Object Model defintions. -//------------------------------------------------------------------------------------------------- -pub const CLSCTX_INPROC_SERVER: DWORD = 0x1; -pub const CLSCTX_INPROC_HANDLER: DWORD = 0x2; -pub const CLSCTX_LOCAL_SERVER: DWORD = 0x4; -pub const CLSCTX_REMOTE_SERVER: DWORD = 0x10; -pub const CLSCTX_SERVER: DWORD = CLSCTX_INPROC_SERVER | CLSCTX_LOCAL_SERVER | - CLSCTX_REMOTE_SERVER; -pub const CLSCTX_ALL: DWORD = CLSCTX_INPROC_HANDLER | CLSCTX_SERVER; -STRUCT!{struct ServerInformation { - dwServerPid: DWORD, - dwServerTid: DWORD, - ui64ServerAddress: UINT64, -}} -pub type PServerInformation = *mut ServerInformation; -DECLARE_HANDLE!(CO_MTA_USAGE_COOKIE, CO_MTA_USAGE_COOKIE__); -//------------------------------------------------------------------------------------------------- -// playsoundapi.h -// ApiSet Contract for api-ms-win-mm-playsound-l1-1-0 -//------------------------------------------------------------------------------------------------- -pub const SND_SYNC: DWORD = 0x0000; -pub const SND_ASYNC: DWORD = 0x0001; -pub const SND_NODEFAULT: DWORD = 0x0002; -pub const SND_MEMORY: DWORD = 0x0004; -pub const SND_LOOP: DWORD = 0x0008; -pub const SND_NOSTOP: DWORD = 0x0010; -pub const SND_NOWAIT: DWORD = 0x00002000; -pub const SND_ALIAS: DWORD = 0x00010000; -pub const SND_ALIAS_ID: DWORD = 0x00110000; -pub const SND_FILENAME: DWORD = 0x00020000; -pub const SND_RESOURCE: DWORD = 0x00040004; -pub const SND_PURGE: DWORD = 0x0040; -pub const SND_APPLICATION: DWORD = 0x0080; -pub const SND_SENTRY: DWORD = 0x00080000; -pub const SND_RING: DWORD = 0x00100000; -pub const SND_SYSTEM: DWORD = 0x00200000; -//------------------------------------------------------------------------------------------------- -// winreg.h -// Registry API procedure declarations, constant definitions and macros -//------------------------------------------------------------------------------------------------- -pub type REGSAM = ACCESS_MASK; -STRUCT!{struct VALENTA { - ve_valuename: LPSTR, - ve_valuelen: DWORD, - ve_valueptr: DWORD_PTR, - ve_type: DWORD, -}} -pub type PVALENTA = *mut VALENTA; -STRUCT!{struct VALENTW { - ve_valuename: LPWSTR, - ve_valuelen: DWORD, - ve_valueptr: DWORD_PTR, - ve_type: DWORD, -}} -pub type PVALENTW = *mut VALENTW; -pub const HKEY_CLASSES_ROOT: HKEY = 0x80000000 as HKEY; -pub const HKEY_CURRENT_USER: HKEY = 0x80000001 as HKEY; -pub const HKEY_LOCAL_MACHINE: HKEY = 0x80000002 as HKEY; -pub const HKEY_USERS: HKEY = 0x80000003 as HKEY; -pub const HKEY_PERFORMANCE_DATA: HKEY = 0x80000004 as HKEY; -pub const HKEY_PERFORMANCE_TEXT: HKEY = 0x80000050 as HKEY; -pub const HKEY_PERFORMANCE_NLSTEXT: HKEY = 0x80000060 as HKEY; -pub const HKEY_CURRENT_CONFIG: HKEY = 0x80000005 as HKEY; -pub const HKEY_DYN_DATA: HKEY = 0x80000006 as HKEY; -pub const HKEY_CURRENT_USER_LOCAL_SETTINGS: HKEY = 0x80000007 as HKEY; -pub const REG_MUI_STRING_TRUNCATE: DWORD = 0x00000001; -pub const RRF_RT_REG_NONE: DWORD = 0x00000001; -pub const RRF_RT_REG_SZ: DWORD = 0x00000002; -pub const RRF_RT_REG_EXPAND_SZ: DWORD = 0x00000004; -pub const RRF_RT_REG_BINARY: DWORD = 0x00000008; -pub const RRF_RT_REG_DWORD: DWORD = 0x00000010; -pub const RRF_RT_REG_MULTI_SZ: DWORD = 0x00000020; -pub const RRF_RT_REG_QWORD: DWORD = 0x00000040; -pub const RRF_RT_DWORD: DWORD = RRF_RT_REG_BINARY|RRF_RT_REG_DWORD; -pub const RRF_RT_QWORD: DWORD = RRF_RT_REG_BINARY|RRF_RT_REG_QWORD; -pub const RRF_RT_ANY: DWORD = 0x0000ffff; -pub const RRF_NOEXPAND: DWORD = 0x10000000; -pub const RRF_ZEROONFAILURE: DWORD = 0x20000000; diff --git a/deps/winapi-0.2.5/src/macros.rs b/deps/winapi-0.2.5/src/macros.rs deleted file mode 100644 index d7a55ac90..000000000 --- a/deps/winapi-0.2.5/src/macros.rs +++ /dev/null @@ -1,242 +0,0 @@ -// Copyright © 2015, Peter Atashian -// Licensed under the MIT License <LICENSE.md> -//! Macros to make things easier to define -macro_rules! DECLARE_HANDLE { - ($name:ident, $inner:ident) => { - #[repr(C)] #[allow(missing_copy_implementations)] struct $inner { unused: ::c_void } - pub type $name = *mut $inner; - }; -} -macro_rules! MAKE_HRESULT { - ($sev:expr, $fac:expr, $code:expr) => { - ($sev << 31) | ($fac << 16) | $code - } -} -macro_rules! MAKE_SCODE { - ($sev:expr, $fac:expr, $code:expr) => { - ($sev << 31) | ($fac << 16) | $code - } -} -macro_rules! MAKEFOURCC { - ($a:expr, $b:expr, $c:expr, $d:expr) => { - ($a as i32) | (($b as i32) << 8) | (($c as i32) << 16) | (($d as i32) << 24) - } -} -macro_rules! DEFINE_GUID { - ( - $name:ident, $l:expr, $w1:expr, $w2:expr, $b1:expr, $b2:expr, $b3:expr, $b4:expr, $b5:expr, - $b6:expr, $b7:expr, $b8:expr - ) => { - pub const $name: ::GUID = ::GUID { - Data1: $l, - Data2: $w1, - Data3: $w2, - Data4: [$b1, $b2, $b3, $b4, $b5, $b6, $b7, $b8], - }; - } -} -macro_rules! CTL_CODE { - ($DeviceType:expr, $Function:expr, $Method:expr, $Access:expr) => { - ($DeviceType << 16) | ($Access << 14) | ($Function << 2) | $Method - } -} -macro_rules! AUDCLNT_ERR { - ($n:expr) => { - MAKE_HRESULT!(::SEVERITY_ERROR, ::FACILITY_AUDCLNT, $n) - }; -} -macro_rules! AUDCLNT_SUCCESS { - ($n:expr) => { - MAKE_SCODE!(::SEVERITY_SUCCESS, ::FACILITY_AUDCLNT, $n) - }; -} -macro_rules! BCRYPT_MAKE_INTERFACE_VERSION { - ($major:expr, $minor:expr) => { - ::BCRYPT_INTERFACE_VERSION { MajorVersion: $major, MinorVersion: $minor } - } -} -macro_rules! RIDL { - (interface $interface:ident ($vtbl:ident) - {$( - fn $method:ident(&mut self $(,$p:ident : $t:ty)*) -> $rtr:ty - ),+} - ) => { - #[repr(C)] #[allow(missing_copy_implementations)] - pub struct $vtbl { - $(pub $method: unsafe extern "system" fn( - This: *mut $interface - $(,$p: $t)* - ) -> $rtr),+ - } - #[repr(C)] #[derive(Debug)] #[allow(missing_copy_implementations)] - pub struct $interface { - pub lpVtbl: *const $vtbl - } - impl $interface { - #[inline] - $(pub unsafe fn $method(&mut self $(,$p: $t)*) -> $rtr { - ((*self.lpVtbl).$method)(self $(,$p)*) - })+ - } - }; - (interface $interface:ident ($vtbl:ident) : $pinterface:ident ($pvtbl:ident) { - }) => { - #[repr(C)] #[allow(missing_copy_implementations)] - pub struct $vtbl { - pub parent: ::$pvtbl - } - #[repr(C)] #[derive(Debug)] #[allow(missing_copy_implementations)] - pub struct $interface { - pub lpVtbl: *const $vtbl - } - impl ::std::ops::Deref for $interface { - type Target = ::$pinterface; - #[inline] - fn deref(&self) -> &::$pinterface { - unsafe { ::std::mem::transmute(self) } - } - } - impl ::std::ops::DerefMut for $interface { - #[inline] - fn deref_mut(&mut self) -> &mut ::$pinterface { - unsafe { ::std::mem::transmute(self) } - } - } - }; - (interface $interface:ident ($vtbl:ident) : $pinterface:ident ($pvtbl:ident) - {$( - fn $method:ident(&mut self $(,$p:ident : $t:ty)*) -> $rtr:ty - ),+} - ) => { - #[repr(C)] #[allow(missing_copy_implementations)] - pub struct $vtbl { - pub parent: ::$pvtbl - $(,pub $method: unsafe extern "system" fn( - This: *mut $interface - $(,$p: $t)* - ) -> $rtr)+ - } - #[repr(C)] #[derive(Debug)] #[allow(missing_copy_implementations)] - pub struct $interface { - pub lpVtbl: *const $vtbl - } - impl $interface { - #[inline] - $(pub unsafe fn $method(&mut self $(,$p: $t)*) -> $rtr { - ((*self.lpVtbl).$method)(self $(,$p)*) - })+ - } - impl ::std::ops::Deref for $interface { - type Target = ::$pinterface; - #[inline] - fn deref(&self) -> &::$pinterface { - unsafe { ::std::mem::transmute(self) } - } - } - impl ::std::ops::DerefMut for $interface { - #[inline] - fn deref_mut(&mut self) -> &mut ::$pinterface { - unsafe { ::std::mem::transmute(self) } - } - } - }; -} -macro_rules! UNION { - ($base:ident, $field:ident, $variant:ident, $variantmut: ident, $fieldtype:ty) => { - impl $base { - #[inline] - pub unsafe fn $variant(&self) -> &$fieldtype { - ::std::mem::transmute(&self.$field) - } - #[inline] - pub unsafe fn $variantmut(&mut self) -> &mut $fieldtype { - ::std::mem::transmute(&mut self.$field) - } - } - } -} -macro_rules! BITFIELD { - ($base:ident $field:ident: $fieldtype:ty [ - $($thing:ident $set_thing:ident[$r:expr],)+ - ]) => { - impl $base {$( - #[inline] - pub fn $thing(&self) -> $fieldtype { - let size = ::std::mem::size_of::<$fieldtype>() * 8; - self.$field << (size - $r.end) >> (size - $r.end + $r.start) - } - #[inline] - pub fn $set_thing(&mut self, val: $fieldtype) { - let mask = ((1 << ($r.end - $r.start)) - 1) << $r.start; - self.$field &= !mask; - self.$field |= (val << $r.start) & mask; - } - )+} - } -} -macro_rules! ENUM { - {enum $name:ident { $($variant:ident = $value:expr,)+ }} => { - #[repr(C)] #[derive(Clone, Copy, Debug, Eq, PartialEq)] - pub struct $name(pub u32); - $(pub const $variant: $name = $name($value);)+ - }; - {enum $name:ident { $variant:ident = $value:expr, $($rest:tt)* }} => { - #[repr(C)] #[derive(Clone, Copy, Debug, Eq, PartialEq)] - pub struct $name(pub u32); - pub const $variant: $name = $name($value); - ENUM!{@gen $name, $variant, $($rest)*} - }; - {enum $name:ident { $variant:ident, $($rest:tt)* }} => { - ENUM!{enum $name { $variant = 0, $($rest)* }} - }; - {@gen $name:ident, $base:ident,} => {}; - {@gen $name:ident, $base:ident, $variant:ident = $value:expr, $($rest:tt)*} => { - pub const $variant: $name = $name($value); - ENUM!{@gen $name, $variant, $($rest)*} - }; - {@gen $name:ident, $base:ident, $variant:ident, $($rest:tt)*} => { - pub const $variant: $name = $name($base.0 + 1u32); - ENUM!{@gen $name, $variant, $($rest)*} - }; -} -macro_rules! FLAGS { - {enum $name:ident { $($variant:ident = $value:expr,)+ }} => { - #[repr(C)] #[derive(Clone, Copy, Debug, Eq, PartialEq)] - pub struct $name(pub u32); - $(pub const $variant: $name = $name($value);)+ - impl ::std::ops::BitAnd<$name> for $name { - type Output = $name; - fn bitand(self, o: $name) -> $name { $name(self.0 & o.0) } - } - impl ::std::ops::BitOr<$name> for $name { - type Output = $name; - fn bitor(self, o: $name) -> $name { $name(self.0 | o.0) } - } - impl ::std::ops::BitXor<$name> for $name { - type Output = $name; - fn bitxor(self, o: $name) -> $name { $name(self.0 ^ o.0) } - } - impl ::std::ops::Not for $name { - type Output = $name; - fn not(self) -> $name { $name(!self.0) } - } - } -} -macro_rules! STRUCT { - {nodebug struct $name:ident { $($field:ident: $ftype:ty,)+ }} => { - #[repr(C)] - pub struct $name { - $(pub $field: $ftype,)+ - } - impl Copy for $name {} - impl Clone for $name { fn clone(&self) -> $name { *self } } - }; - {struct $name:ident { $($field:ident: $ftype:ty,)+ }} => { - #[repr(C)] #[derive(Debug)] - pub struct $name { - $(pub $field: $ftype,)+ - } - impl Copy for $name {} - impl Clone for $name { fn clone(&self) -> $name { *self } } - }; -} diff --git a/deps/winapi-0.2.5/src/minwinbase.rs b/deps/winapi-0.2.5/src/minwinbase.rs deleted file mode 100644 index 2d2fbfd76..000000000 --- a/deps/winapi-0.2.5/src/minwinbase.rs +++ /dev/null @@ -1,258 +0,0 @@ -// Copyright © 2015, Peter Atashian -// Licensed under the MIT License <LICENSE.md> -//! This module defines the 32-Bit Windows Base APIs -STRUCT!{struct SECURITY_ATTRIBUTES { - nLength: ::DWORD, - lpSecurityDescriptor: ::LPVOID, - bInheritHandle: ::BOOL, -}} -pub type PSECURITY_ATTRIBUTES = *mut SECURITY_ATTRIBUTES; -pub type LPSECURITY_ATTRIBUTES = *mut SECURITY_ATTRIBUTES; -STRUCT!{struct OVERLAPPED { - Internal: ::ULONG_PTR, - InternalHigh: ::ULONG_PTR, - Offset: ::DWORD, - OffsetHigh: ::DWORD, - hEvent: ::HANDLE, -}} -UNION!(OVERLAPPED, Offset, Pointer, Pointer_mut, ::PVOID); -pub type LPOVERLAPPED = *mut OVERLAPPED; -STRUCT!{struct OVERLAPPED_ENTRY { - lpCompletionKey: ::ULONG_PTR, - lpOverlapped: LPOVERLAPPED, - Internal: ::ULONG_PTR, - dwNumberOfBytesTransferred: ::DWORD, -}} -pub type LPOVERLAPPED_ENTRY = *mut OVERLAPPED_ENTRY; -STRUCT!{struct SYSTEMTIME { - wYear: ::WORD, - wMonth: ::WORD, - wDayOfWeek: ::WORD, - wDay: ::WORD, - wHour: ::WORD, - wMinute: ::WORD, - wSecond: ::WORD, - wMilliseconds: ::WORD, -}} -pub type PSYSTEMTIME = *mut SYSTEMTIME; -pub type LPSYSTEMTIME = *mut SYSTEMTIME; -#[repr(C)] #[derive(Copy)] -pub struct WIN32_FIND_DATAA { - pub dwFileAttributes: ::DWORD, - pub ftCreationTime: ::FILETIME, - pub ftLastAccessTime: ::FILETIME, - pub ftLastWriteTime: ::FILETIME, - pub nFileSizeHigh: ::DWORD, - pub nFileSizeLow: ::DWORD, - pub dwReserved0: ::DWORD, - pub dwReserved1: ::DWORD, - pub cFileName: [::CHAR; ::MAX_PATH], - pub cAlternateFileName: [::CHAR; 14], -} -impl Clone for WIN32_FIND_DATAA { fn clone(&self) -> WIN32_FIND_DATAA { *self } } -pub type PWIN32_FIND_DATAA = *mut WIN32_FIND_DATAA; -pub type LPWIN32_FIND_DATAA = *mut WIN32_FIND_DATAA; -#[repr(C)] #[derive(Copy)] -pub struct WIN32_FIND_DATAW { - pub dwFileAttributes: ::DWORD, - pub ftCreationTime: ::FILETIME, - pub ftLastAccessTime: ::FILETIME, - pub ftLastWriteTime: ::FILETIME, - pub nFileSizeHigh: ::DWORD, - pub nFileSizeLow: ::DWORD, - pub dwReserved0: ::DWORD, - pub dwReserved1: ::DWORD, - pub cFileName: [::WCHAR; ::MAX_PATH], - pub cAlternateFileName: [::WCHAR; 14], -} -impl Clone for WIN32_FIND_DATAW { fn clone(&self) -> WIN32_FIND_DATAW { *self } } -pub type PWIN32_FIND_DATAW = *mut WIN32_FIND_DATAW; -pub type LPWIN32_FIND_DATAW = *mut WIN32_FIND_DATAW; -ENUM!{enum FINDEX_INFO_LEVELS { - FindExInfoStandard, - FindExInfoBasic, - FindExInfoMaxInfoLevel, -}} -pub const FIND_FIRST_EX_CASE_SENSITIVE: ::DWORD = 0x00000001; -pub const FIND_FIRST_EX_LARGE_FETCH: ::DWORD = 0x00000002; -ENUM!{enum FINDEX_SEARCH_OPS { - FindExSearchNameMatch, - FindExSearchLimitToDirectories, - FindExSearchLimitToDevices, - FindExSearchMaxSearchOp, -}} -ENUM!{enum GET_FILEEX_INFO_LEVELS { - GetFileExInfoStandard, - GetFileExMaxInfoLevel, -}} -ENUM!{enum FILE_INFO_BY_HANDLE_CLASS { - FileBasicInfo, - FileStandardInfo, - FileNameInfo, - FileRenameInfo, - FileDispositionInfo, - FileAllocationInfo, - FileEndOfFileInfo, - FileStreamInfo, - FileCompressionInfo, - FileAttributeTagInfo, - FileIdBothDirectoryInfo, - FileIdBothDirectoryRestartInfo, - FileIoPriorityHintInfo, - FileRemoteProtocolInfo, - FileFullDirectoryInfo, - FileFullDirectoryRestartInfo, - FileStorageInfo, - FileAlignmentInfo, - FileIdInfo, - FileIdExtdDirectoryInfo, - FileIdExtdDirectoryRestartInfo, - MaximumFileInfoByHandleClass, -}} -pub type PFILE_INFO_BY_HANDLE_CLASS = *mut FILE_INFO_BY_HANDLE_CLASS; -pub type CRITICAL_SECTION = ::RTL_CRITICAL_SECTION; -pub type PCRITICAL_SECTION = ::PRTL_CRITICAL_SECTION; -pub type LPCRITICAL_SECTION = ::PRTL_CRITICAL_SECTION; -pub type CRITICAL_SECTION_DEBUG = ::RTL_CRITICAL_SECTION_DEBUG; -pub type PCRITICAL_SECTION_DEBUG = ::PRTL_CRITICAL_SECTION_DEBUG; -pub type LPCRITICAL_SECTION_DEBUG = ::PRTL_CRITICAL_SECTION_DEBUG; -pub type LPOVERLAPPED_COMPLETION_ROUTINE = Option<unsafe extern "system" fn( - dwErrorCode: ::DWORD, dwNumberOfBytesTransfered: ::DWORD, lpOverlapped: LPOVERLAPPED, -)>; -pub const LOCKFILE_FAIL_IMMEDIATELY: ::DWORD = 0x00000001; -pub const LOCKFILE_EXCLUSIVE_LOCK: ::DWORD = 0x00000002; -STRUCT!{struct PROCESS_HEAP_ENTRY_Block { - hMem: ::HANDLE, - dwReserved: [::DWORD; 3], -}} -STRUCT!{struct PROCESS_HEAP_ENTRY_Region { - dwCommittedSize: ::DWORD, - dwUnCommittedSize: ::DWORD, - lpFirstBlock: ::LPVOID, - lpLastBlock: ::LPVOID, -}} -STRUCT!{struct PROCESS_HEAP_ENTRY { - lpData: ::PVOID, - cbData: ::DWORD, - cbOverhead: ::BYTE, - iRegionIndex: ::BYTE, - wFlags: ::WORD, - Region: PROCESS_HEAP_ENTRY_Region, -}} -UNION!(PROCESS_HEAP_ENTRY, Region, Block, Block_mut, PROCESS_HEAP_ENTRY_Block); -pub type LPPROCESS_HEAP_ENTRY = *mut PROCESS_HEAP_ENTRY; -pub type PPROCESS_HEAP_ENTRY = *mut PROCESS_HEAP_ENTRY; -pub const PROCESS_HEAP_REGION: ::WORD = 0x0001; -pub const PROCESS_HEAP_UNCOMMITTED_RANGE: ::WORD = 0x0002; -pub const PROCESS_HEAP_ENTRY_BUSY: ::WORD = 0x0004; -pub const PROCESS_HEAP_SEG_ALLOC: ::WORD = 0x0008; -pub const PROCESS_HEAP_ENTRY_MOVEABLE: ::WORD = 0x0010; -pub const PROCESS_HEAP_ENTRY_DDESHARE: ::WORD = 0x0020; -pub type PTHREAD_START_ROUTINE = Option<unsafe extern "system" fn( - lpThreadParameter: ::LPVOID, -) -> ::DWORD>; -pub type LPTHREAD_START_ROUTINE = PTHREAD_START_ROUTINE; -pub type LPCONTEXT = ::PCONTEXT; -STRUCT!{struct REASON_CONTEXT_Detailed { - LocalizedReasonModule: ::HMODULE, - LocalizedReasonId: ::ULONG, - ReasonStringCount: ::ULONG, - ReasonStrings: *mut ::LPWSTR, -}} -STRUCT!{struct REASON_CONTEXT { - Version: ::ULONG, - Flags: ::DWORD, - Reason: REASON_CONTEXT_Detailed, -}} -UNION!(REASON_CONTEXT, Reason, SimpleReasonString, SimpleReasonString_mut, ::LPWSTR); -pub type PREASON_CONTEXT = *mut REASON_CONTEXT; -pub const EXCEPTION_DEBUG_EVENT: ::DWORD = 1; -pub const CREATE_THREAD_DEBUG_EVENT: ::DWORD = 2; -pub const CREATE_PROCESS_DEBUG_EVENT: ::DWORD = 3; -pub const EXIT_THREAD_DEBUG_EVENT: ::DWORD = 4; -pub const EXIT_PROCESS_DEBUG_EVENT: ::DWORD = 5; -pub const LOAD_DLL_DEBUG_EVENT: ::DWORD = 6; -pub const UNLOAD_DLL_DEBUG_EVENT: ::DWORD = 7; -pub const OUTPUT_DEBUG_STRING_EVENT: ::DWORD = 8; -pub const RIP_EVENT: ::DWORD = 9; -STRUCT!{struct EXCEPTION_DEBUG_INFO { - ExceptionRecord: ::EXCEPTION_RECORD, - dwFirstChance: ::DWORD, -}} -pub type LPEXCEPTION_DEBUG_INFO = *mut EXCEPTION_DEBUG_INFO; -#[repr(C)] #[derive(Copy)] -pub struct CREATE_THREAD_DEBUG_INFO { - pub hThread: ::HANDLE, - pub lpThreadLocalBase: ::LPVOID, - pub lpStartAddress: LPTHREAD_START_ROUTINE, -} -impl Clone for CREATE_THREAD_DEBUG_INFO { fn clone(&self) -> CREATE_THREAD_DEBUG_INFO { *self } } -pub type LPCREATE_THREAD_DEBUG_INFO = *mut CREATE_THREAD_DEBUG_INFO; -#[repr(C)] #[derive(Copy)] -pub struct CREATE_PROCESS_DEBUG_INFO { - pub hFile: ::HANDLE, - pub hProcess: ::HANDLE, - pub hThread: ::HANDLE, - pub lpBaseOfImage: ::LPVOID, - pub dwDebugInfoFileOffset: ::DWORD, - pub nDebugInfoSize: ::DWORD, - pub lpThreadLocalBase: ::LPVOID, - pub lpStartAddress: LPTHREAD_START_ROUTINE, - pub lpImageName: ::LPVOID, - pub fUnicode: ::WORD, -} -impl Clone for CREATE_PROCESS_DEBUG_INFO { fn clone(&self) -> CREATE_PROCESS_DEBUG_INFO { *self } } -pub type LPCREATE_PROCESS_DEBUG_INFO = *mut CREATE_PROCESS_DEBUG_INFO; -STRUCT!{struct EXIT_THREAD_DEBUG_INFO { - dwExitCode: ::DWORD, -}} -pub type LPEXIT_THREAD_DEBUG_INFO = *mut EXIT_THREAD_DEBUG_INFO; -STRUCT!{struct EXIT_PROCESS_DEBUG_INFO { - dwExitCode: ::DWORD, -}} -pub type LPEXIT_PROCESS_DEBUG_INFO = *mut EXIT_PROCESS_DEBUG_INFO; -STRUCT!{struct LOAD_DLL_DEBUG_INFO { - hFile: ::HANDLE, - lpBaseOfDll: ::LPVOID, - dwDebugInfoFileOffset: ::DWORD, - nDebugInfoSize: ::DWORD, - lpImageName: ::LPVOID, - fUnicode: ::WORD, -}} -pub type LPLOAD_DLL_DEBUG_INFO = *mut LOAD_DLL_DEBUG_INFO; -STRUCT!{struct UNLOAD_DLL_DEBUG_INFO { - lpBaseOfDll: ::LPVOID, -}} -pub type LPUNLOAD_DLL_DEBUG_INFO = *mut UNLOAD_DLL_DEBUG_INFO; -STRUCT!{struct OUTPUT_DEBUG_STRING_INFO { - lpDebugStringData: ::LPSTR, - fUnicode: ::WORD, - nDebugStringLength: ::WORD, -}} -pub type LPOUTPUT_DEBUG_STRING_INFO = *mut OUTPUT_DEBUG_STRING_INFO; -STRUCT!{struct RIP_INFO { - dwError: ::DWORD, - dwType: ::DWORD, -}} -pub type LPRIP_INFO = *mut RIP_INFO; -#[repr(C)] #[derive(Copy)] -pub struct DEBUG_EVENT { - pub dwDebugEventCode: ::DWORD, - pub dwProcessId: ::DWORD, - pub dwThreadId: ::DWORD, - #[cfg(target_arch="x86")] - pub u: [u8; 84], - #[cfg(target_arch="x86_64")] - pub u: [u8; 160], -} -impl Clone for DEBUG_EVENT { fn clone(&self) -> DEBUG_EVENT { *self } } -UNION!(DEBUG_EVENT, u, Exception, Exception_mut, EXCEPTION_DEBUG_INFO); -UNION!(DEBUG_EVENT, u, CreateThread, CreateThread_mut, CREATE_THREAD_DEBUG_INFO); -UNION!(DEBUG_EVENT, u, CreateProcessInfo, CreateProcessInfo_mut, CREATE_PROCESS_DEBUG_INFO); -UNION!(DEBUG_EVENT, u, ExitThread, ExitThread_mut, EXIT_THREAD_DEBUG_INFO); -UNION!(DEBUG_EVENT, u, ExitProcess, ExitProcess_mut, EXIT_PROCESS_DEBUG_INFO); -UNION!(DEBUG_EVENT, u, LoadDll, LoadDll_mut, LOAD_DLL_DEBUG_INFO); -UNION!(DEBUG_EVENT, u, UnloadDll, UnloadDll_mut, UNLOAD_DLL_DEBUG_INFO); -UNION!(DEBUG_EVENT, u, DebugString, DebugString_mut, OUTPUT_DEBUG_STRING_INFO); -UNION!(DEBUG_EVENT, u, RipInfo, RipInfo_mut, RIP_INFO); -pub type LPDEBUG_EVENT = *mut DEBUG_EVENT; diff --git a/deps/winapi-0.2.5/src/mmreg.rs b/deps/winapi-0.2.5/src/mmreg.rs deleted file mode 100644 index 38a43842f..000000000 --- a/deps/winapi-0.2.5/src/mmreg.rs +++ /dev/null @@ -1,306 +0,0 @@ -// Copyright © 2015, Peter Atashian -// Licensed under the MIT License <LICENSE.md> -pub const WAVE_FORMAT_UNKNOWN: ::WORD = 0x0000; -pub const WAVE_FORMAT_PCM: ::WORD = 0x0001; -pub const WAVE_FORMAT_ADPCM: ::WORD = 0x0002; -pub const WAVE_FORMAT_IEEE_FLOAT: ::WORD = 0x0003; -pub const WAVE_FORMAT_VSELP: ::WORD = 0x0004; -pub const WAVE_FORMAT_IBM_CVSD: ::WORD = 0x0005; -pub const WAVE_FORMAT_ALAW: ::WORD = 0x0006; -pub const WAVE_FORMAT_MULAW: ::WORD = 0x0007; -pub const WAVE_FORMAT_DTS: ::WORD = 0x0008; -pub const WAVE_FORMAT_DRM: ::WORD = 0x0009; -pub const WAVE_FORMAT_WMAVOICE9: ::WORD = 0x000A; -pub const WAVE_FORMAT_WMAVOICE10: ::WORD = 0x000B; -pub const WAVE_FORMAT_OKI_ADPCM: ::WORD = 0x0010; -pub const WAVE_FORMAT_DVI_ADPCM: ::WORD = 0x0011; -pub const WAVE_FORMAT_IMA_ADPCM: ::WORD = WAVE_FORMAT_DVI_ADPCM; -pub const WAVE_FORMAT_MEDIASPACE_ADPCM: ::WORD = 0x0012; -pub const WAVE_FORMAT_SIERRA_ADPCM: ::WORD = 0x0013; -pub const WAVE_FORMAT_G723_ADPCM: ::WORD = 0x0014; -pub const WAVE_FORMAT_DIGISTD: ::WORD = 0x0015; -pub const WAVE_FORMAT_DIGIFIX: ::WORD = 0x0016; -pub const WAVE_FORMAT_DIALOGIC_OKI_ADPCM: ::WORD = 0x0017; -pub const WAVE_FORMAT_MEDIAVISION_ADPCM: ::WORD = 0x0018; -pub const WAVE_FORMAT_CU_CODEC: ::WORD = 0x0019; -pub const WAVE_FORMAT_HP_DYN_VOICE: ::WORD = 0x001A; -pub const WAVE_FORMAT_YAMAHA_ADPCM: ::WORD = 0x0020; -pub const WAVE_FORMAT_SONARC: ::WORD = 0x0021; -pub const WAVE_FORMAT_DSPGROUP_TRUESPEECH: ::WORD = 0x0022; -pub const WAVE_FORMAT_ECHOSC1: ::WORD = 0x0023; -pub const WAVE_FORMAT_AUDIOFILE_AF36: ::WORD = 0x0024; -pub const WAVE_FORMAT_APTX: ::WORD = 0x0025; -pub const WAVE_FORMAT_AUDIOFILE_AF10: ::WORD = 0x0026; -pub const WAVE_FORMAT_PROSODY_1612: ::WORD = 0x0027; -pub const WAVE_FORMAT_LRC: ::WORD = 0x0028; -pub const WAVE_FORMAT_DOLBY_AC2: ::WORD = 0x0030; -pub const WAVE_FORMAT_GSM610: ::WORD = 0x0031; -pub const WAVE_FORMAT_MSNAUDIO: ::WORD = 0x0032; -pub const WAVE_FORMAT_ANTEX_ADPCME: ::WORD = 0x0033; -pub const WAVE_FORMAT_CONTROL_RES_VQLPC: ::WORD = 0x0034; -pub const WAVE_FORMAT_DIGIREAL: ::WORD = 0x0035; -pub const WAVE_FORMAT_DIGIADPCM: ::WORD = 0x0036; -pub const WAVE_FORMAT_CONTROL_RES_CR10: ::WORD = 0x0037; -pub const WAVE_FORMAT_NMS_VBXADPCM: ::WORD = 0x0038; -pub const WAVE_FORMAT_CS_IMAADPCM: ::WORD = 0x0039; -pub const WAVE_FORMAT_ECHOSC3: ::WORD = 0x003A; -pub const WAVE_FORMAT_ROCKWELL_ADPCM: ::WORD = 0x003B; -pub const WAVE_FORMAT_ROCKWELL_DIGITALK: ::WORD = 0x003C; -pub const WAVE_FORMAT_XEBEC: ::WORD = 0x003D; -pub const WAVE_FORMAT_G721_ADPCM: ::WORD = 0x0040; -pub const WAVE_FORMAT_G728_CELP: ::WORD = 0x0041; -pub const WAVE_FORMAT_MSG723: ::WORD = 0x0042; -pub const WAVE_FORMAT_INTEL_G723_1: ::WORD = 0x0043; -pub const WAVE_FORMAT_INTEL_G729: ::WORD = 0x0044; -pub const WAVE_FORMAT_SHARP_G726: ::WORD = 0x0045; -pub const WAVE_FORMAT_MPEG: ::WORD = 0x0050; -pub const WAVE_FORMAT_RT24: ::WORD = 0x0052; -pub const WAVE_FORMAT_PAC: ::WORD = 0x0053; -pub const WAVE_FORMAT_MPEGLAYER3: ::WORD = 0x0055; -pub const WAVE_FORMAT_LUCENT_G723: ::WORD = 0x0059; -pub const WAVE_FORMAT_CIRRUS: ::WORD = 0x0060; -pub const WAVE_FORMAT_ESPCM: ::WORD = 0x0061; -pub const WAVE_FORMAT_VOXWARE: ::WORD = 0x0062; -pub const WAVE_FORMAT_CANOPUS_ATRAC: ::WORD = 0x0063; -pub const WAVE_FORMAT_G726_ADPCM: ::WORD = 0x0064; -pub const WAVE_FORMAT_G722_ADPCM: ::WORD = 0x0065; -pub const WAVE_FORMAT_DSAT: ::WORD = 0x0066; -pub const WAVE_FORMAT_DSAT_DISPLAY: ::WORD = 0x0067; -pub const WAVE_FORMAT_VOXWARE_BYTE_ALIGNED: ::WORD = 0x0069; -pub const WAVE_FORMAT_VOXWARE_AC8: ::WORD = 0x0070; -pub const WAVE_FORMAT_VOXWARE_AC10: ::WORD = 0x0071; -pub const WAVE_FORMAT_VOXWARE_AC16: ::WORD = 0x0072; -pub const WAVE_FORMAT_VOXWARE_AC20: ::WORD = 0x0073; -pub const WAVE_FORMAT_VOXWARE_RT24: ::WORD = 0x0074; -pub const WAVE_FORMAT_VOXWARE_RT29: ::WORD = 0x0075; -pub const WAVE_FORMAT_VOXWARE_RT29HW: ::WORD = 0x0076; -pub const WAVE_FORMAT_VOXWARE_VR12: ::WORD = 0x0077; -pub const WAVE_FORMAT_VOXWARE_VR18: ::WORD = 0x0078; -pub const WAVE_FORMAT_VOXWARE_TQ40: ::WORD = 0x0079; -pub const WAVE_FORMAT_VOXWARE_SC3: ::WORD = 0x007A; -pub const WAVE_FORMAT_VOXWARE_SC3_1: ::WORD = 0x007B; -pub const WAVE_FORMAT_SOFTSOUND: ::WORD = 0x0080; -pub const WAVE_FORMAT_VOXWARE_TQ60: ::WORD = 0x0081; -pub const WAVE_FORMAT_MSRT24: ::WORD = 0x0082; -pub const WAVE_FORMAT_G729A: ::WORD = 0x0083; -pub const WAVE_FORMAT_MVI_MVI2: ::WORD = 0x0084; -pub const WAVE_FORMAT_DF_G726: ::WORD = 0x0085; -pub const WAVE_FORMAT_DF_GSM610: ::WORD = 0x0086; -pub const WAVE_FORMAT_ISIAUDIO: ::WORD = 0x0088; -pub const WAVE_FORMAT_ONLIVE: ::WORD = 0x0089; -pub const WAVE_FORMAT_MULTITUDE_FT_SX20: ::WORD = 0x008A; -pub const WAVE_FORMAT_INFOCOM_ITS_G721_ADPCM: ::WORD = 0x008B; -pub const WAVE_FORMAT_CONVEDIA_G729: ::WORD = 0x008C; -pub const WAVE_FORMAT_CONGRUENCY: ::WORD = 0x008D; -pub const WAVE_FORMAT_SBC24: ::WORD = 0x0091; -pub const WAVE_FORMAT_DOLBY_AC3_SPDIF: ::WORD = 0x0092; -pub const WAVE_FORMAT_MEDIASONIC_G723: ::WORD = 0x0093; -pub const WAVE_FORMAT_PROSODY_8KBPS: ::WORD = 0x0094; -pub const WAVE_FORMAT_ZYXEL_ADPCM: ::WORD = 0x0097; -pub const WAVE_FORMAT_PHILIPS_LPCBB: ::WORD = 0x0098; -pub const WAVE_FORMAT_PACKED: ::WORD = 0x0099; -pub const WAVE_FORMAT_MALDEN_PHONYTALK: ::WORD = 0x00A0; -pub const WAVE_FORMAT_RACAL_RECORDER_GSM: ::WORD = 0x00A1; -pub const WAVE_FORMAT_RACAL_RECORDER_G720_A: ::WORD = 0x00A2; -pub const WAVE_FORMAT_RACAL_RECORDER_G723_1: ::WORD = 0x00A3; -pub const WAVE_FORMAT_RACAL_RECORDER_TETRA_ACELP: ::WORD = 0x00A4; -pub const WAVE_FORMAT_NEC_AAC: ::WORD = 0x00B0; -pub const WAVE_FORMAT_RAW_AAC1: ::WORD = 0x00FF; -pub const WAVE_FORMAT_RHETOREX_ADPCM: ::WORD = 0x0100; -pub const WAVE_FORMAT_IRAT: ::WORD = 0x0101; -pub const WAVE_FORMAT_VIVO_G723: ::WORD = 0x0111; -pub const WAVE_FORMAT_VIVO_SIREN: ::WORD = 0x0112; -pub const WAVE_FORMAT_PHILIPS_CELP: ::WORD = 0x0120; -pub const WAVE_FORMAT_PHILIPS_GRUNDIG: ::WORD = 0x0121; -pub const WAVE_FORMAT_DIGITAL_G723: ::WORD = 0x0123; -pub const WAVE_FORMAT_SANYO_LD_ADPCM: ::WORD = 0x0125; -pub const WAVE_FORMAT_SIPROLAB_ACEPLNET: ::WORD = 0x0130; -pub const WAVE_FORMAT_SIPROLAB_ACELP4800: ::WORD = 0x0131; -pub const WAVE_FORMAT_SIPROLAB_ACELP8V3: ::WORD = 0x0132; -pub const WAVE_FORMAT_SIPROLAB_G729: ::WORD = 0x0133; -pub const WAVE_FORMAT_SIPROLAB_G729A: ::WORD = 0x0134; -pub const WAVE_FORMAT_SIPROLAB_KELVIN: ::WORD = 0x0135; -pub const WAVE_FORMAT_VOICEAGE_AMR: ::WORD = 0x0136; -pub const WAVE_FORMAT_G726ADPCM: ::WORD = 0x0140; -pub const WAVE_FORMAT_DICTAPHONE_CELP68: ::WORD = 0x0141; -pub const WAVE_FORMAT_DICTAPHONE_CELP54: ::WORD = 0x0142; -pub const WAVE_FORMAT_QUALCOMM_PUREVOICE: ::WORD = 0x0150; -pub const WAVE_FORMAT_QUALCOMM_HALFRATE: ::WORD = 0x0151; -pub const WAVE_FORMAT_TUBGSM: ::WORD = 0x0155; -pub const WAVE_FORMAT_MSAUDIO1: ::WORD = 0x0160; -pub const WAVE_FORMAT_WMAUDIO2: ::WORD = 0x0161; -pub const WAVE_FORMAT_WMAUDIO3: ::WORD = 0x0162; -pub const WAVE_FORMAT_WMAUDIO_LOSSLESS: ::WORD = 0x0163; -pub const WAVE_FORMAT_WMASPDIF: ::WORD = 0x0164; -pub const WAVE_FORMAT_UNISYS_NAP_ADPCM: ::WORD = 0x0170; -pub const WAVE_FORMAT_UNISYS_NAP_ULAW: ::WORD = 0x0171; -pub const WAVE_FORMAT_UNISYS_NAP_ALAW: ::WORD = 0x0172; -pub const WAVE_FORMAT_UNISYS_NAP_16K: ::WORD = 0x0173; -pub const WAVE_FORMAT_SYCOM_ACM_SYC008: ::WORD = 0x0174; -pub const WAVE_FORMAT_SYCOM_ACM_SYC701_G726L: ::WORD = 0x0175; -pub const WAVE_FORMAT_SYCOM_ACM_SYC701_CELP54: ::WORD = 0x0176; -pub const WAVE_FORMAT_SYCOM_ACM_SYC701_CELP68: ::WORD = 0x0177; -pub const WAVE_FORMAT_KNOWLEDGE_ADVENTURE_ADPCM: ::WORD = 0x0178; -pub const WAVE_FORMAT_FRAUNHOFER_IIS_MPEG2_AAC: ::WORD = 0x0180; -pub const WAVE_FORMAT_DTS_DS: ::WORD = 0x0190; -pub const WAVE_FORMAT_CREATIVE_ADPCM: ::WORD = 0x0200; -pub const WAVE_FORMAT_CREATIVE_FASTSPEECH8: ::WORD = 0x0202; -pub const WAVE_FORMAT_CREATIVE_FASTSPEECH10: ::WORD = 0x0203; -pub const WAVE_FORMAT_UHER_ADPCM: ::WORD = 0x0210; -pub const WAVE_FORMAT_ULEAD_DV_AUDIO: ::WORD = 0x0215; -pub const WAVE_FORMAT_ULEAD_DV_AUDIO_1: ::WORD = 0x0216; -pub const WAVE_FORMAT_QUARTERDECK: ::WORD = 0x0220; -pub const WAVE_FORMAT_ILINK_VC: ::WORD = 0x0230; -pub const WAVE_FORMAT_RAW_SPORT: ::WORD = 0x0240; -pub const WAVE_FORMAT_ESST_AC3: ::WORD = 0x0241; -pub const WAVE_FORMAT_GENERIC_PASSTHRU: ::WORD = 0x0249; -pub const WAVE_FORMAT_IPI_HSX: ::WORD = 0x0250; -pub const WAVE_FORMAT_IPI_RPELP: ::WORD = 0x0251; -pub const WAVE_FORMAT_CS2: ::WORD = 0x0260; -pub const WAVE_FORMAT_SONY_SCX: ::WORD = 0x0270; -pub const WAVE_FORMAT_SONY_SCY: ::WORD = 0x0271; -pub const WAVE_FORMAT_SONY_ATRAC3: ::WORD = 0x0272; -pub const WAVE_FORMAT_SONY_SPC: ::WORD = 0x0273; -pub const WAVE_FORMAT_TELUM_AUDIO: ::WORD = 0x0280; -pub const WAVE_FORMAT_TELUM_IA_AUDIO: ::WORD = 0x0281; -pub const WAVE_FORMAT_NORCOM_VOICE_SYSTEMS_ADPCM: ::WORD = 0x0285; -pub const WAVE_FORMAT_FM_TOWNS_SND: ::WORD = 0x0300; -pub const WAVE_FORMAT_MICRONAS: ::WORD = 0x0350; -pub const WAVE_FORMAT_MICRONAS_CELP833: ::WORD = 0x0351; -pub const WAVE_FORMAT_BTV_DIGITAL: ::WORD = 0x0400; -pub const WAVE_FORMAT_INTEL_MUSIC_CODER: ::WORD = 0x0401; -pub const WAVE_FORMAT_INDEO_AUDIO: ::WORD = 0x0402; -pub const WAVE_FORMAT_QDESIGN_MUSIC: ::WORD = 0x0450; -pub const WAVE_FORMAT_ON2_VP7_AUDIO: ::WORD = 0x0500; -pub const WAVE_FORMAT_ON2_VP6_AUDIO: ::WORD = 0x0501; -pub const WAVE_FORMAT_VME_VMPCM: ::WORD = 0x0680; -pub const WAVE_FORMAT_TPC: ::WORD = 0x0681; -pub const WAVE_FORMAT_LIGHTWAVE_LOSSLESS: ::WORD = 0x08AE; -pub const WAVE_FORMAT_OLIGSM: ::WORD = 0x1000; -pub const WAVE_FORMAT_OLIADPCM: ::WORD = 0x1001; -pub const WAVE_FORMAT_OLICELP: ::WORD = 0x1002; -pub const WAVE_FORMAT_OLISBC: ::WORD = 0x1003; -pub const WAVE_FORMAT_OLIOPR: ::WORD = 0x1004; -pub const WAVE_FORMAT_LH_CODEC: ::WORD = 0x1100; -pub const WAVE_FORMAT_LH_CODEC_CELP: ::WORD = 0x1101; -pub const WAVE_FORMAT_LH_CODEC_SBC8: ::WORD = 0x1102; -pub const WAVE_FORMAT_LH_CODEC_SBC12: ::WORD = 0x1103; -pub const WAVE_FORMAT_LH_CODEC_SBC16: ::WORD = 0x1104; -pub const WAVE_FORMAT_NORRIS: ::WORD = 0x1400; -pub const WAVE_FORMAT_ISIAUDIO_2: ::WORD = 0x1401; -pub const WAVE_FORMAT_SOUNDSPACE_MUSICOMPRESS: ::WORD = 0x1500; -pub const WAVE_FORMAT_MPEG_ADTS_AAC: ::WORD = 0x1600; -pub const WAVE_FORMAT_MPEG_RAW_AAC: ::WORD = 0x1601; -pub const WAVE_FORMAT_MPEG_LOAS: ::WORD = 0x1602; -pub const WAVE_FORMAT_NOKIA_MPEG_ADTS_AAC: ::WORD = 0x1608; -pub const WAVE_FORMAT_NOKIA_MPEG_RAW_AAC: ::WORD = 0x1609; -pub const WAVE_FORMAT_VODAFONE_MPEG_ADTS_AAC: ::WORD = 0x160A; -pub const WAVE_FORMAT_VODAFONE_MPEG_RAW_AAC: ::WORD = 0x160B; -pub const WAVE_FORMAT_MPEG_HEAAC: ::WORD = 0x1610; -pub const WAVE_FORMAT_VOXWARE_RT24_SPEECH: ::WORD = 0x181C; -pub const WAVE_FORMAT_SONICFOUNDRY_LOSSLESS: ::WORD = 0x1971; -pub const WAVE_FORMAT_INNINGS_TELECOM_ADPCM: ::WORD = 0x1979; -pub const WAVE_FORMAT_LUCENT_SX8300P: ::WORD = 0x1C07; -pub const WAVE_FORMAT_LUCENT_SX5363S: ::WORD = 0x1C0C; -pub const WAVE_FORMAT_CUSEEME: ::WORD = 0x1F03; -pub const WAVE_FORMAT_NTCSOFT_ALF2CM_ACM: ::WORD = 0x1FC4; -pub const WAVE_FORMAT_DVM: ::WORD = 0x2000; -pub const WAVE_FORMAT_DTS2: ::WORD = 0x2001; -pub const WAVE_FORMAT_MAKEAVIS: ::WORD = 0x3313; -pub const WAVE_FORMAT_DIVIO_MPEG4_AAC: ::WORD = 0x4143; -pub const WAVE_FORMAT_NOKIA_ADAPTIVE_MULTIRATE: ::WORD = 0x4201; -pub const WAVE_FORMAT_DIVIO_G726: ::WORD = 0x4243; -pub const WAVE_FORMAT_LEAD_SPEECH: ::WORD = 0x434C; -pub const WAVE_FORMAT_LEAD_VORBIS: ::WORD = 0x564C; -pub const WAVE_FORMAT_WAVPACK_AUDIO: ::WORD = 0x5756; -pub const WAVE_FORMAT_OGG_VORBIS_MODE_1: ::WORD = 0x674F; -pub const WAVE_FORMAT_OGG_VORBIS_MODE_2: ::WORD = 0x6750; -pub const WAVE_FORMAT_OGG_VORBIS_MODE_3: ::WORD = 0x6751; -pub const WAVE_FORMAT_OGG_VORBIS_MODE_1_PLUS: ::WORD = 0x676F; -pub const WAVE_FORMAT_OGG_VORBIS_MODE_2_PLUS: ::WORD = 0x6770; -pub const WAVE_FORMAT_OGG_VORBIS_MODE_3_PLUS: ::WORD = 0x6771; -pub const WAVE_FORMAT_3COM_NBX: ::WORD = 0x7000; -pub const WAVE_FORMAT_FAAD_AAC: ::WORD = 0x706D; -pub const WAVE_FORMAT_AMR_NB: ::WORD = 0x7361; -pub const WAVE_FORMAT_AMR_WB: ::WORD = 0x7362; -pub const WAVE_FORMAT_AMR_WP: ::WORD = 0x7363; -pub const WAVE_FORMAT_GSM_AMR_CBR: ::WORD = 0x7A21; -pub const WAVE_FORMAT_GSM_AMR_VBR_SID: ::WORD = 0x7A22; -pub const WAVE_FORMAT_COMVERSE_INFOSYS_G723_1: ::WORD = 0xA100; -pub const WAVE_FORMAT_COMVERSE_INFOSYS_AVQSBC: ::WORD = 0xA101; -pub const WAVE_FORMAT_COMVERSE_INFOSYS_SBC: ::WORD = 0xA102; -pub const WAVE_FORMAT_SYMBOL_G729_A: ::WORD = 0xA103; -pub const WAVE_FORMAT_VOICEAGE_AMR_WB: ::WORD = 0xA104; -pub const WAVE_FORMAT_INGENIENT_G726: ::WORD = 0xA105; -pub const WAVE_FORMAT_MPEG4_AAC: ::WORD = 0xA106; -pub const WAVE_FORMAT_ENCORE_G726: ::WORD = 0xA107; -pub const WAVE_FORMAT_ZOLL_ASAO: ::WORD = 0xA108; -pub const WAVE_FORMAT_SPEEX_VOICE: ::WORD = 0xA109; -pub const WAVE_FORMAT_VIANIX_MASC: ::WORD = 0xA10A; -pub const WAVE_FORMAT_WM9_SPECTRUM_ANALYZER: ::WORD = 0xA10B; -pub const WAVE_FORMAT_WMF_SPECTRUM_ANAYZER: ::WORD = 0xA10C; -pub const WAVE_FORMAT_GSM_610: ::WORD = 0xA10D; -pub const WAVE_FORMAT_GSM_620: ::WORD = 0xA10E; -pub const WAVE_FORMAT_GSM_660: ::WORD = 0xA10F; -pub const WAVE_FORMAT_GSM_690: ::WORD = 0xA110; -pub const WAVE_FORMAT_GSM_ADAPTIVE_MULTIRATE_WB: ::WORD = 0xA111; -pub const WAVE_FORMAT_POLYCOM_G722: ::WORD = 0xA112; -pub const WAVE_FORMAT_POLYCOM_G728: ::WORD = 0xA113; -pub const WAVE_FORMAT_POLYCOM_G729_A: ::WORD = 0xA114; -pub const WAVE_FORMAT_POLYCOM_SIREN: ::WORD = 0xA115; -pub const WAVE_FORMAT_GLOBAL_IP_ILBC: ::WORD = 0xA116; -pub const WAVE_FORMAT_RADIOTIME_TIME_SHIFT_RADIO: ::WORD = 0xA117; -pub const WAVE_FORMAT_NICE_ACA: ::WORD = 0xA118; -pub const WAVE_FORMAT_NICE_ADPCM: ::WORD = 0xA119; -pub const WAVE_FORMAT_VOCORD_G721: ::WORD = 0xA11A; -pub const WAVE_FORMAT_VOCORD_G726: ::WORD = 0xA11B; -pub const WAVE_FORMAT_VOCORD_G722_1: ::WORD = 0xA11C; -pub const WAVE_FORMAT_VOCORD_G728: ::WORD = 0xA11D; -pub const WAVE_FORMAT_VOCORD_G729: ::WORD = 0xA11E; -pub const WAVE_FORMAT_VOCORD_G729_A: ::WORD = 0xA11F; -pub const WAVE_FORMAT_VOCORD_G723_1: ::WORD = 0xA120; -pub const WAVE_FORMAT_VOCORD_LBC: ::WORD = 0xA121; -pub const WAVE_FORMAT_NICE_G728: ::WORD = 0xA122; -pub const WAVE_FORMAT_FRACE_TELECOM_G729: ::WORD = 0xA123; -pub const WAVE_FORMAT_CODIAN: ::WORD = 0xA124; -pub const WAVE_FORMAT_FLAC: ::WORD = 0xF1AC; -pub const WAVE_FORMAT_EXTENSIBLE: ::WORD = 0xFFFE; -pub const WAVE_FORMAT_DEVELOPMENT: ::WORD = 0xFFFF; -//2557 -pub const SPEAKER_FRONT_LEFT: ::DWORD = 0x1; -pub const SPEAKER_FRONT_RIGHT: ::DWORD = 0x2; -pub const SPEAKER_FRONT_CENTER: ::DWORD = 0x4; -pub const SPEAKER_LOW_FREQUENCY: ::DWORD = 0x8; -pub const SPEAKER_BACK_LEFT: ::DWORD = 0x10; -pub const SPEAKER_BACK_RIGHT: ::DWORD = 0x20; -pub const SPEAKER_FRONT_LEFT_OF_CENTER: ::DWORD = 0x40; -pub const SPEAKER_FRONT_RIGHT_OF_CENTER: ::DWORD = 0x80; -pub const SPEAKER_BACK_CENTER: ::DWORD = 0x100; -pub const SPEAKER_SIDE_LEFT: ::DWORD = 0x200; -pub const SPEAKER_SIDE_RIGHT: ::DWORD = 0x400; -pub const SPEAKER_TOP_CENTER: ::DWORD = 0x800; -pub const SPEAKER_TOP_FRONT_LEFT: ::DWORD = 0x1000; -pub const SPEAKER_TOP_FRONT_CENTER: ::DWORD = 0x2000; -pub const SPEAKER_TOP_FRONT_RIGHT: ::DWORD = 0x4000; -pub const SPEAKER_TOP_BACK_LEFT: ::DWORD = 0x8000; -pub const SPEAKER_TOP_BACK_CENTER: ::DWORD = 0x10000; -pub const SPEAKER_TOP_BACK_RIGHT: ::DWORD = 0x20000; -pub const SPEAKER_RESERVED: ::DWORD = 0x7FFC0000; -pub const SPEAKER_ALL: ::DWORD = 0x80000000; -#[repr(C, packed)] #[derive(Clone, Copy, Debug)] -pub struct WAVEFORMATEX { - pub wFormatTag: ::WORD, - pub nChannels: ::WORD, - pub nSamplesPerSec: ::DWORD, - pub nAvgBytesPerSec: ::DWORD, - pub nBlockAlign: ::WORD, - pub wBitsPerSample: ::WORD, - pub cbSize: ::WORD, -} -#[repr(C, packed)] #[derive(Clone, Copy, Debug)] -pub struct WAVEFORMATEXTENSIBLE { - pub Format: ::WAVEFORMATEX, - pub Samples: ::WORD, - pub dwChannelMask: ::DWORD, - pub SubFormat: ::GUID, -} diff --git a/deps/winapi-0.2.5/src/mssip.rs b/deps/winapi-0.2.5/src/mssip.rs deleted file mode 100644 index ad5e5b749..000000000 --- a/deps/winapi-0.2.5/src/mssip.rs +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright © 2015, skdltmxn -// Licensed under the MIT License <LICENSE.md> -//! Microsoft SIP Provider Prototypes and Definitions -STRUCT!{struct SIP_SUBJECTINFO { - cbSize: ::DWORD, - pgSubjectType: *mut ::GUID, - hFile: ::HANDLE, - pwsFileName: ::LPCWSTR, - pwsDisplayName: ::LPCWSTR, - dwReserved1: ::DWORD, - dwIntVersion: ::DWORD, - hProv: ::HCRYPTPROV, - DigestAlgorithm: ::CRYPT_ALGORITHM_IDENTIFIER, - dwFlags: ::DWORD, - dwEncodingType: ::DWORD, - dwReserved2: ::DWORD, - fdwCAPISettings: ::DWORD, - fdwSecuritySettings: ::DWORD, - dwIndex: ::DWORD, - dwUnionChoice: ::DWORD, - psFlat: *mut MS_ADDINFO_FLAT, - pClientData: ::LPVOID, -}} -UNION!(SIP_SUBJECTINFO, psFlat, psCatMember, psCatMember_mut, *mut MS_ADDINFO_CATALOGMEMBER); -UNION!(SIP_SUBJECTINFO, psFlat, psBlob, psBlob_mut, *mut MS_ADDINFO_BLOB); -pub type LPSIP_SUBJECTINFO = *mut SIP_SUBJECTINFO; -STRUCT!{struct MS_ADDINFO_FLAT { - cbStruct: ::DWORD, - pIndirectData: *mut SIP_INDIRECT_DATA, -}} -pub type PMS_ADDINFO_FLAT = *mut MS_ADDINFO_FLAT; -STRUCT!{struct MS_ADDINFO_CATALOGMEMBER { - cbStruct: ::DWORD, - pStore: *mut ::CRYPTCATSTORE, - pMember: *mut ::CRYPTCATMEMBER, -}} -pub type PMS_ADDINFO_CATALOGMEMBER = *mut MS_ADDINFO_CATALOGMEMBER; -STRUCT!{struct MS_ADDINFO_BLOB { - cbStruct: ::DWORD, - cbMemObject: ::DWORD, - pbMemObject: *mut ::BYTE, - cbMemSignedMsg: ::DWORD, - pbMemSignedMsg: *mut ::BYTE, -}} -pub type PMS_ADDINFO_BLOB = *mut MS_ADDINFO_BLOB; -STRUCT!{struct SIP_INDIRECT_DATA { - Data: ::CRYPT_ATTRIBUTE_TYPE_VALUE, - DigestAlgorithm: ::CRYPT_ALGORITHM_IDENTIFIER, - Digest: ::CRYPT_HASH_BLOB, -}} -pub type PSIP_INDIRECT_DATA = *mut SIP_INDIRECT_DATA; -STRUCT!{struct SIP_ADD_NEWPROVIDER { - cbStruct: ::DWORD, - pgSubject: *mut ::GUID, - pwszDLLFileName: *mut ::WCHAR, - pwszMagicNumber: *mut ::WCHAR, - pwszIsFunctionName: *mut ::WCHAR, - pwszGetFuncName: *mut ::WCHAR, - pwszPutFuncName: *mut ::WCHAR, - pwszCreateFuncName: *mut ::WCHAR, - pwszVerifyFuncName: *mut ::WCHAR, - pwszRemoveFuncName: *mut ::WCHAR, - pwszIsFunctionNameFmt2: *mut ::WCHAR, - pwszGetCapFuncName: ::PWSTR, -}} -pub type PSIP_ADD_NEWPROVIDER = *mut SIP_ADD_NEWPROVIDER; -STRUCT!{struct SIP_CAP_SET_V3 { - cbSize: ::DWORD, - dwVersion: ::DWORD, - isMultiSign: ::BOOL, - dwFlags: ::DWORD, -}} -UNION!(SIP_CAP_SET_V3, dwFlags, dwReserved, dwReserved_mut, ::DWORD); -pub type PSIP_CAP_SET_V3 = *mut SIP_CAP_SET_V3; -pub type SIP_CAP_SET = PSIP_CAP_SET_V3; -pub type pCryptSIPGetSignedDataMsg = Option<unsafe extern "system" fn( - pSubjectInfo: *mut SIP_SUBJECTINFO, pdwEncodingType: *mut ::DWORD, dwIndex: ::DWORD, - pcbSignedDataMsg: *mut ::DWORD, pbSignedDataMsg: *mut ::BYTE, -) -> ::BOOL>; -pub type pCryptSIPPutSignedDataMsg = Option<unsafe extern "system" fn( - pSubjectInfo: *mut SIP_SUBJECTINFO, dwEncodingType: ::DWORD, pdwIndex: *mut ::DWORD, - cbSignedDataMsg: ::DWORD, pbSignedDataMsg: *mut ::BYTE, -) -> ::BOOL>; -pub type pCryptSIPCreateIndirectData = Option<unsafe extern "system" fn( - pSubjectInfo: *mut SIP_SUBJECTINFO, pcbIndirectData: *mut ::DWORD, - pIndirectData: *mut SIP_INDIRECT_DATA, -) -> ::BOOL>; -pub type pCryptSIPVerifyIndirectData = Option<unsafe extern "system" fn( - pSubjectInfo: *mut SIP_SUBJECTINFO, pIndirectData: *mut SIP_INDIRECT_DATA, -) -> ::BOOL>; -pub type pCryptSIPRemoveSignedDataMsg = Option<unsafe extern "system" fn( - pSubjectInfo: *mut SIP_SUBJECTINFO, dwIndex: ::DWORD, -) -> ::BOOL>; -#[repr(C)] #[derive(Copy)] -pub struct SIP_DISPATCH_INFO { - pub cbSize: ::DWORD, - pub hSIP: ::HANDLE, - pub pfGet: pCryptSIPGetSignedDataMsg, - pub pfPut: pCryptSIPPutSignedDataMsg, - pub pfCreate: pCryptSIPCreateIndirectData, - pub pfVerify: pCryptSIPVerifyIndirectData, - pub pfRemove: pCryptSIPRemoveSignedDataMsg, -} -impl Clone for SIP_DISPATCH_INFO { fn clone(&self) -> SIP_DISPATCH_INFO { *self } } -pub type LPSIP_DISPATCH_INFO = *mut SIP_DISPATCH_INFO; diff --git a/deps/winapi-0.2.5/src/nb30.rs b/deps/winapi-0.2.5/src/nb30.rs deleted file mode 100644 index 5a9d36c69..000000000 --- a/deps/winapi-0.2.5/src/nb30.rs +++ /dev/null @@ -1,188 +0,0 @@ -// Copyright © 2015, skdltmxn -// Licensed under the MIT License <LICENSE.md> -// This module contains the definitions for portable NetBIOS 3.0 support. -pub const NCBNAMSZ: usize = 16; -pub const MAX_LANA: usize = 254; -pub type PFPOST = Option<unsafe extern "system" fn(*mut NCB)>; -#[repr(C)] #[derive(Copy)] -pub struct NCB { - pub ncb_command: ::UCHAR, - pub ncb_retcode: ::UCHAR, - pub ncb_lsn: ::UCHAR, - pub ncb_num: ::UCHAR, - pub ncb_buffer: ::PUCHAR, - pub ncb_length: ::WORD, - pub ncb_callname: [::UCHAR; NCBNAMSZ], - pub ncb_name: [::UCHAR; NCBNAMSZ], - pub ncb_rto: ::UCHAR, - pub ncb_sto: ::UCHAR, - pub ncb_post: PFPOST, - pub ncb_lana_num: ::UCHAR, - pub ncb_cmd_cplt: ::UCHAR, - #[cfg(target_arch="x86")] - pub ncb_reserve: [::UCHAR; 10], - #[cfg(target_arch="x86_64")] - pub ncb_reserve: [::UCHAR; 18], - pub ncb_event: ::HANDLE, -} -impl Clone for NCB { fn clone(&self) -> NCB { *self } } -pub type PNCB = *mut NCB; -STRUCT!{struct ADAPTER_STATUS { - adapter_address: [::UCHAR; 6], - rev_major: ::UCHAR, - reserved0: ::UCHAR, - adapter_type: ::UCHAR, - rev_minor: ::UCHAR, - duration: ::WORD, - frmr_recv: ::WORD, - frmr_xmit: ::WORD, - iframe_recv_err: ::WORD, - xmit_aborts: ::WORD, - xmit_success: ::DWORD, - recv_success: ::DWORD, - iframe_xmit_err: ::WORD, - recv_buff_unavail: ::WORD, - t1_timeouts: ::WORD, - ti_timeouts: ::WORD, - reserved1: ::DWORD, - free_ncbs: ::WORD, - max_cfg_ncbs: ::WORD, - max_ncbs: ::WORD, - xmit_buf_unavail: ::WORD, - max_dgram_size: ::WORD, - pending_sess: ::WORD, - max_cfg_sess: ::WORD, - max_sess: ::WORD, - max_sess_pkt_size: ::WORD, - name_count: ::WORD, -}} -pub type PADAPTER_STATUS = *mut ADAPTER_STATUS; -STRUCT!{struct NAME_BUFFER { - name: [::UCHAR; NCBNAMSZ], - name_num: ::UCHAR, - name_flags: ::UCHAR, -}} -pub type PNAME_BUFFER = *mut NAME_BUFFER; -pub const NAME_FLAGS_MASK: ::UCHAR = 0x87; -pub const GROUP_NAME: ::UCHAR = 0x80; -pub const UNIQUE_NAME: ::UCHAR = 0x00; -pub const REGISTERING: ::UCHAR = 0x00; -pub const REGISTERED: ::UCHAR = 0x04; -pub const DEREGISTERED: ::UCHAR = 0x05; -pub const DUPLICATE: ::UCHAR = 0x06; -pub const DUPLICATE_DEREG: ::UCHAR = 0x07; -STRUCT!{struct SESSION_HEADER { - sess_name: ::UCHAR, - num_sess: ::UCHAR, - rcv_dg_outstanding: ::UCHAR, - rcv_any_outstanding: ::UCHAR, -}} -pub type PSESSION_HEADER = *mut SESSION_HEADER; -STRUCT!{struct SESSION_BUFFER { - lsn: ::UCHAR, - state: ::UCHAR, - local_name: [::UCHAR; NCBNAMSZ], - remote_name: [::UCHAR; NCBNAMSZ], - rcvs_outstanding: ::UCHAR, - sends_outstanding: ::UCHAR, -}} -pub type PSESSION_BUFFER = *mut SESSION_BUFFER; -pub const LISTEN_OUTSTANDING: ::UCHAR = 0x01; -pub const CALL_PENDING: ::UCHAR = 0x02; -pub const SESSION_ESTABLISHED: ::UCHAR = 0x03; -pub const HANGUP_PENDING: ::UCHAR = 0x04; -pub const HANGUP_COMPLETE: ::UCHAR = 0x05; -pub const SESSION_ABORTED: ::UCHAR = 0x06; -#[repr(C)] #[derive(Copy)] -pub struct LANA_ENUM { - pub length: ::UCHAR, - pub lana: [::UCHAR; MAX_LANA + 1], -} -impl Clone for LANA_ENUM { fn clone(&self) -> LANA_ENUM { *self } } -pub type PLANA_ENUM = *mut LANA_ENUM; -STRUCT!{struct FIND_NAME_HEADER { - node_count: ::WORD, - reserved: ::UCHAR, - unique_group: ::UCHAR, -}} -pub type PFIND_NAME_HEADER = *mut FIND_NAME_HEADER; -STRUCT!{struct FIND_NAME_BUFFER { - length: ::UCHAR, - access_control: ::UCHAR, - frame_control: ::UCHAR, - destination_addr: [::UCHAR; 6], - source_addr: [::UCHAR; 6], - routing_info: [::UCHAR; 18], -}} -pub type PFIND_NAME_BUFFER = *mut FIND_NAME_BUFFER; -STRUCT!{struct ACTION_HEADER { - transport_id: ::ULONG, - action_code: ::USHORT, - reserved: ::USHORT, -}} -pub type PACTION_HEADER = *mut ACTION_HEADER; -pub const NCBCALL: ::UCHAR = 0x10; -pub const NCBLISTEN: ::UCHAR = 0x11; -pub const NCBHANGUP: ::UCHAR = 0x12; -pub const NCBSEND: ::UCHAR = 0x14; -pub const NCBRECV: ::UCHAR = 0x15; -pub const NCBRECVANY: ::UCHAR = 0x16; -pub const NCBCHAINSEND: ::UCHAR = 0x17; -pub const NCBDGSEND: ::UCHAR = 0x20; -pub const NCBDGRECV: ::UCHAR = 0x21; -pub const NCBDGSENDBC: ::UCHAR = 0x22; -pub const NCBADDNAME: ::UCHAR = 0x30; -pub const NCBDELNAME: ::UCHAR = 0x31; -pub const NCBRESET: ::UCHAR = 0x32; -pub const NCBASTAT: ::UCHAR = 0x33; -pub const NCBSSTAT: ::UCHAR = 0x34; -pub const NCBCANCEL: ::UCHAR = 0x35; -pub const NCBADDGRNAME: ::UCHAR = 0x36; -pub const NCBENUM: ::UCHAR = 0x37; -pub const NCBUNLINK: ::UCHAR = 0x70; -pub const NCBSENDNA: ::UCHAR = 0x71; -pub const NCBCHAINSENDNA: ::UCHAR = 0x72; -pub const NCBLANSTALERT: ::UCHAR = 0x73; -pub const NCBACTION: ::UCHAR = 0x77; -pub const NCBFINDNAME: ::UCHAR = 0x78; -pub const NCBTRACE: ::UCHAR = 0x79; -pub const ASYNCH: ::UCHAR = 0x80; -pub const NRC_GOODRET: ::UCHAR = 0x00; -pub const NRC_BUFLEN: ::UCHAR = 0x01; -pub const NRC_ILLCMD: ::UCHAR = 0x03; -pub const NRC_CMDTMO: ::UCHAR = 0x05; -pub const NRC_INCOMP: ::UCHAR = 0x06; -pub const NRC_BADDR: ::UCHAR = 0x07; -pub const NRC_SNUMOUT: ::UCHAR = 0x08; -pub const NRC_NORES: ::UCHAR = 0x09; -pub const NRC_SCLOSED: ::UCHAR = 0x0a; -pub const NRC_CMDCAN: ::UCHAR = 0x0b; -pub const NRC_DUPNAME: ::UCHAR = 0x0d; -pub const NRC_NAMTFUL: ::UCHAR = 0x0e; -pub const NRC_ACTSES: ::UCHAR = 0x0f; -pub const NRC_LOCTFUL: ::UCHAR = 0x11; -pub const NRC_REMTFUL: ::UCHAR = 0x12; -pub const NRC_ILLNN: ::UCHAR = 0x13; -pub const NRC_NOCALL: ::UCHAR = 0x14; -pub const NRC_NOWILD: ::UCHAR = 0x15; -pub const NRC_INUSE: ::UCHAR = 0x16; -pub const NRC_NAMERR: ::UCHAR = 0x17; -pub const NRC_SABORT: ::UCHAR = 0x18; -pub const NRC_NAMCONF: ::UCHAR = 0x19; -pub const NRC_IFBUSY: ::UCHAR = 0x21; -pub const NRC_TOOMANY: ::UCHAR = 0x22; -pub const NRC_BRIDGE: ::UCHAR = 0x23; -pub const NRC_CANOCCR: ::UCHAR = 0x24; -pub const NRC_CANCEL: ::UCHAR = 0x26; -pub const NRC_DUPENV: ::UCHAR = 0x30; -pub const NRC_ENVNOTDEF: ::UCHAR = 0x34; -pub const NRC_OSRESNOTAV: ::UCHAR = 0x35; -pub const NRC_MAXAPPS: ::UCHAR = 0x36; -pub const NRC_NOSAPS: ::UCHAR = 0x37; -pub const NRC_NORESOURCES: ::UCHAR = 0x38; -pub const NRC_INVADDRESS: ::UCHAR = 0x39; -pub const NRC_INVDDID: ::UCHAR = 0x3B; -pub const NRC_LOCKFAIL: ::UCHAR = 0x3C; -pub const NRC_OPENERR: ::UCHAR = 0x3f; -pub const NRC_SYSTEM: ::UCHAR = 0x40; -pub const NRC_PENDING: ::UCHAR = 0xff; diff --git a/deps/winapi-0.2.5/src/oaidl.rs b/deps/winapi-0.2.5/src/oaidl.rs deleted file mode 100644 index 7235fbe84..000000000 --- a/deps/winapi-0.2.5/src/oaidl.rs +++ /dev/null @@ -1,596 +0,0 @@ -// Copyright © 2015, Connor Hilarides -// Licensed under the MIT License <LICENSE.md> -//! Mappings for the contents of OAIdl.h -pub type wireBRECORD = *mut _wireBRECORD; -pub type wireVARIANT = *mut _wireVARIANT; -STRUCT!{struct SAFEARRAYBOUND { - cElements: ::ULONG, - lLbound: ::LONG, -}} -STRUCT!{struct SAFEARR_BSTR { - Size: ::ULONG, - aBstr: *mut ::wireBSTR, -}} -STRUCT!{struct SAFEARR_UNKNOWN { - Size: ::ULONG, - apUnknown: *mut *mut ::IUnknown, -}} -STRUCT!{struct SAFEARR_DISPATCH { - Size: ::ULONG, - apDispatch: *mut *mut IDispatch, -}} -STRUCT!{struct SAFEARR_VARIANT { - Size: ::ULONG, - aVariant: *mut wireVARIANT, -}} -STRUCT!{struct SAFEARR_BRECORD { - Size: ::ULONG, - aRecord: *mut wireBRECORD, -}} -STRUCT!{struct SAFEARR_HAVEIID { - Size: ::ULONG, - apUnknown: *mut *mut ::IUnknown, - iid: ::IID, -}} -ENUM!{enum SF_TYPE { - SF_ERROR = ::VT_ERROR.0, - SF_I1 = ::VT_I1.0, - SF_I2 = ::VT_I2.0, - SF_I4 = ::VT_I4.0, - SF_I8 = ::VT_I8.0, - SF_BSTR = ::VT_BSTR.0, - SF_UNKNOWN = ::VT_UNKNOWN.0, - SF_DISPATCH = ::VT_DISPATCH.0, - SF_VARIANT = ::VT_VARIANT.0, - SF_RECORD = ::VT_RECORD.0, - SF_HAVEIID = ::VT_UNKNOWN.0 | ::VT_RESERVED.0, -}} -STRUCT!{struct SAFEARRAYUNION { - sfType: ::ULONG, - u: __MIDL_IOleAutomationTypes_0001, -}} -#[cfg(target_arch = "x86_64")] -STRUCT!{struct __MIDL_IOleAutomationTypes_0001 { - data0: u32, - data1: [u32; 6], -}} -#[cfg(target_arch = "x86")] -STRUCT!{struct __MIDL_IOleAutomationTypes_0001 { - data0: u32, - data1: [u32; 5], -}} -UNION!(__MIDL_IOleAutomationTypes_0001, data0, BstrStr, BstrStr_mut, SAFEARR_BSTR); -UNION!(__MIDL_IOleAutomationTypes_0001, data0, UnknownStr, UnknownStr_mut, SAFEARR_UNKNOWN); -UNION!(__MIDL_IOleAutomationTypes_0001, data0, DispatchStr, DispatchStr_mut, SAFEARR_DISPATCH); -UNION!(__MIDL_IOleAutomationTypes_0001, data0, VariantStr, VariantStr_mut, SAFEARR_VARIANT); -UNION!(__MIDL_IOleAutomationTypes_0001, data0, RecordStr, RecordStr_mut, SAFEARR_BRECORD); -UNION!(__MIDL_IOleAutomationTypes_0001, data0, HaveIidStr, HaveIidStr_mut, SAFEARR_HAVEIID); -UNION!(__MIDL_IOleAutomationTypes_0001, data0, ByteStr, ByteStr_mut, ::BYTE_SIZEDARR); -UNION!(__MIDL_IOleAutomationTypes_0001, data0, WordStr, WordStr_mut, ::WORD_SIZEDARR); -UNION!(__MIDL_IOleAutomationTypes_0001, data0, LongStr, LongStr_mut, ::DWORD_SIZEDARR); -UNION!(__MIDL_IOleAutomationTypes_0001, data0, HyperStr, HyperStr_mut, ::HYPER_SIZEDARR); -STRUCT!{struct _wireSAFEARRAY { - cDims: ::USHORT, - fFeatures: ::USHORT, - cbElements: ::ULONG, - cLocks: ::ULONG, - uArrayStructs: SAFEARRAYUNION, - rgsaBound: [SAFEARRAYBOUND; 1], -}} -pub type wireSAFEARRAY = *mut _wireSAFEARRAY; -pub type wirePSAFEARRAY = *mut wireSAFEARRAY; -STRUCT!{struct SAFEARRAY { - cDims: ::USHORT, - fFeatures: ::USHORT, - cbElements: ::ULONG, - cLocks: ::ULONG, - pvData: ::PVOID, - rgsabound: [SAFEARRAYBOUND; 1], -}} -pub type LPSAFEARRAY = *mut SAFEARRAY; -pub const FADF_AUTO: ::DWORD = 0x1; -pub const FADF_STATIC: ::DWORD = 0x2; -pub const FADF_EMBEDDED: ::DWORD = 0x4; -pub const FADF_FIXEDSIZE: ::DWORD = 0x10; -pub const FADF_RECORD: ::DWORD = 0x20; -pub const FADF_HAVEIID: ::DWORD = 0x40; -pub const FADF_HAVEVARTYPE: ::DWORD = 0x80; -pub const FADF_BSTR: ::DWORD = 0x100; -pub const FADF_UNKNOWN: ::DWORD = 0x200; -pub const FADF_DISPATCH: ::DWORD = 0x400; -pub const FADF_VARIANT: ::DWORD = 0x800; -pub const FADF_RESERVED: ::DWORD = 0xf008; -#[cfg(target_arch = "x86_64")] -STRUCT!{struct VARIANT { - data0: u64, - data1: u64, - data2: u64, -}} -#[cfg(target_arch = "x86")] -STRUCT!{struct VARIANT { - data0: u64, - data1: u32, - data2: u32, -}} -UNION!(VARIANT, data0, vt, vt_mut, ::VARTYPE); -UNION!(VARIANT, data1, llVal, llVal_mut, ::LONGLONG); -UNION!(VARIANT, data1, lVal, lVal_mut, ::LONG); -UNION!(VARIANT, data1, bVal, bVal_mut, ::BYTE); -UNION!(VARIANT, data1, iVal, iVal_mut, ::SHORT); -UNION!(VARIANT, data1, fltVal, fltVal_mut, ::FLOAT); -UNION!(VARIANT, data1, dblVal, dblVal_mut, ::DOUBLE); -UNION!(VARIANT, data1, boolVal, boolVal_mut, ::VARIANT_BOOL); -UNION!(VARIANT, data1, scode, scode_mut, ::SCODE); -UNION!(VARIANT, data1, cyVal, cyVal_mut, ::CY); -UNION!(VARIANT, data1, date, date_mut, ::DATE); -UNION!(VARIANT, data1, bstrVal, bstrVal_mut, ::BSTR); -UNION!(VARIANT, data1, punkVal, punkVal_mut, *mut ::IUnknown); -UNION!(VARIANT, data1, pdispVal, pdispVal_mut, *mut IDispatch); -UNION!(VARIANT, data1, parray, parray_mut, *mut SAFEARRAY); -UNION!(VARIANT, data1, pllVal, pllVal_mut, *mut ::LONGLONG); -UNION!(VARIANT, data1, plVal, plVal_mut, *mut ::LONG); -UNION!(VARIANT, data1, pbVal, pbVal_mut, *mut ::BYTE); -UNION!(VARIANT, data1, piVal, piVal_mut, *mut ::SHORT); -UNION!(VARIANT, data1, pfltVal, pfltVal_mut, *mut ::FLOAT); -UNION!(VARIANT, data1, pdblVal, pdblVal_mut, *mut ::DOUBLE); -UNION!(VARIANT, data1, pboolVal, pboolVal_mut, *mut ::VARIANT_BOOL); -UNION!(VARIANT, data1, pscode, pscode_mut, *mut ::SCODE); -UNION!(VARIANT, data1, pcyVal, pcyVal_mut, *mut ::CY); -UNION!(VARIANT, data1, pdate, pdate_mut, *mut ::DATE); -UNION!(VARIANT, data1, pbstrVal, pbstrVal_mut, *mut ::BSTR); -UNION!(VARIANT, data1, ppunkVal, ppunkVal_mut, *mut *mut ::IUnknown); -UNION!(VARIANT, data1, ppdispVal, ppdispVal_mut, *mut *mut IDispatch); -UNION!(VARIANT, data1, pparray, pparray_mut, *mut *mut SAFEARRAY); -UNION!(VARIANT, data1, pvarVal, pvarVal_mut, *mut VARIANT); -UNION!(VARIANT, data1, byref, byref_mut, ::PVOID); -UNION!(VARIANT, data1, cVal, cVal_mut, ::CHAR); -UNION!(VARIANT, data1, uiVal, uiVal_mut, ::USHORT); -UNION!(VARIANT, data1, ulVal, ulVal_mut, ::ULONG); -UNION!(VARIANT, data1, ullVal, ullVal_mut, ::ULONGLONG); -UNION!(VARIANT, data1, intVal, intVal_mut, ::INT); -UNION!(VARIANT, data1, uintVal, uintVal_mut, ::UINT); -UNION!(VARIANT, data1, pdecVal, pdecVal_mut, *mut ::DECIMAL); -UNION!(VARIANT, data1, pcVal, pcVal_mut, *mut ::CHAR); -UNION!(VARIANT, data1, puiVal, puiVal_mut, *mut ::USHORT); -UNION!(VARIANT, data1, pulVal, pulVal_mut, *mut ::ULONG); -UNION!(VARIANT, data1, pullVal, pullVal_mut, *mut ::ULONGLONG); -UNION!(VARIANT, data1, pintVal, pintVal_mut, *mut ::INT); -UNION!(VARIANT, data1, puintVal, puintVal_mut, *mut ::UINT); -UNION!(VARIANT, data1, pvRecord, pvRecord_mut, ::PVOID); -UNION!(VARIANT, data2, pRecInfo, pRecInfo_mut, *mut IRecordInfo); -UNION!(VARIANT, data0, decVal, decVal_mut, ::DECIMAL); -pub type LPVARIANT = *mut VARIANT; -pub type VARIANTARG = VARIANT; -pub type LPVARIANTARG = *mut VARIANT; -pub type REFVARIANT = *const VARIANT; -STRUCT!{struct _wireBRECORD { - fFlags: ::ULONG, - clSize: ::ULONG, - pRecInfo: *mut IRecordInfo, - pRecord: *mut ::BYTE, -}} -STRUCT!{struct _wireVARIANT { - clSize: ::DWORD, - rpcReserved: ::DWORD, - vt: ::USHORT, - wReserved1: ::USHORT, - wReserved2: ::USHORT, - wReserved3: ::USHORT, - data0: u64, - data1: u64, -}} -UNION!(_wireVARIANT, data0, llVal, llVal_mut, ::LONGLONG); -UNION!(_wireVARIANT, data0, lVal, lVal_mut, ::LONG); -UNION!(_wireVARIANT, data0, bVal, bVal_mut, ::BYTE); -UNION!(_wireVARIANT, data0, iVal, iVal_mut, ::SHORT); -UNION!(_wireVARIANT, data0, fltVal, fltVal_mut, ::FLOAT); -UNION!(_wireVARIANT, data0, dblVal, dblVal_mut, ::DOUBLE); -UNION!(_wireVARIANT, data0, boolVal, boolVal_mut, ::VARIANT_BOOL); -UNION!(_wireVARIANT, data0, scode, scode_mut, ::SCODE); -UNION!(_wireVARIANT, data0, cyVal, cyVal_mut, ::CY); -UNION!(_wireVARIANT, data0, date, date_mut, ::DATE); -UNION!(_wireVARIANT, data0, bstrVal, bstrVal_mut, ::wireBSTR); -UNION!(_wireVARIANT, data0, punkVal, punkVal_mut, *mut ::IUnknown); -UNION!(_wireVARIANT, data0, pdispVal, pdispVal_mut, *mut IDispatch); -UNION!(_wireVARIANT, data0, parray, parray_mut, wirePSAFEARRAY); -UNION!(_wireVARIANT, data0, brecVal, brecVal_mut, wireBRECORD); -UNION!(_wireVARIANT, data0, pllVal, pllVal_mut, *mut ::LONGLONG); -UNION!(_wireVARIANT, data0, plVal, plVal_mut, *mut ::LONG); -UNION!(_wireVARIANT, data0, pbVal, pbVal_mut, *mut ::BYTE); -UNION!(_wireVARIANT, data0, piVal, piVal_mut, *mut ::SHORT); -UNION!(_wireVARIANT, data0, pfltVal, pfltVal_mut, *mut ::FLOAT); -UNION!(_wireVARIANT, data0, pdblVal, pdblVal_mut, *mut ::DOUBLE); -UNION!(_wireVARIANT, data0, pboolVal, pboolVal_mut, *mut ::VARIANT_BOOL); -UNION!(_wireVARIANT, data0, pscode, pscode_mut, *mut ::SCODE); -UNION!(_wireVARIANT, data0, pcyVal, pcyVal_mut, *mut ::CY); -UNION!(_wireVARIANT, data0, pdate, pdate_mut, *mut ::DATE); -UNION!(_wireVARIANT, data0, pbstrVal, pbstrVal_mut, *mut ::wireBSTR); -UNION!(_wireVARIANT, data0, ppunkVal, ppunkVal_mut, *mut *mut ::IUnknown); -UNION!(_wireVARIANT, data0, ppdispVal, ppdispVal_mut, *mut *mut IDispatch); -UNION!(_wireVARIANT, data0, pparray, pparray_mut, *mut wirePSAFEARRAY); -UNION!(_wireVARIANT, data0, pvarVal, pvarVal_mut, *mut wireVARIANT); -UNION!(_wireVARIANT, data0, cVal, cVal_mut, ::CHAR); -UNION!(_wireVARIANT, data0, uiVal, uiVal_mut, ::USHORT); -UNION!(_wireVARIANT, data0, ulVal, ulVal_mut, ::ULONG); -UNION!(_wireVARIANT, data0, ullVal, ullVal_mut, ::ULONGLONG); -UNION!(_wireVARIANT, data0, intVal, intVal_mut, ::INT); -UNION!(_wireVARIANT, data0, uintVal, uintVal_mut, ::UINT); -UNION!(_wireVARIANT, data0, decVal, decVal_mut, ::DECIMAL); -UNION!(_wireVARIANT, data0, pcVal, pcVal_mut, *mut ::CHAR); -UNION!(_wireVARIANT, data0, puiVal, puiVal_mut, *mut ::USHORT); -UNION!(_wireVARIANT, data0, pulVal, pulVal_mut, *mut ::ULONG); -UNION!(_wireVARIANT, data0, pullVal, pullVal_mut, *mut ::ULONGLONG); -UNION!(_wireVARIANT, data0, pintVal, pintVal_mut, *mut ::INT); -UNION!(_wireVARIANT, data0, puintVal, puintVal_mut, *mut ::UINT); -UNION!(_wireVARIANT, data0, pdecVal, pdecVal_mut, *mut ::DECIMAL); -pub type DISPID = ::LONG; -pub type MEMBERID = DISPID; -pub type HREFTYPE = ::DWORD; -ENUM!{enum TYPEKIND { - TKIND_ENUM = 0, - TKIND_RECORD, - TKIND_MODULE, - TKIND_INTERFACE, - TKIND_DISPATCH, - TKIND_COCLASS, - TKIND_ALIAS, - TKIND_UNION, - TKIND_MAX, -}} -#[cfg(target_arch = "x86_64")] -STRUCT!{struct TYPEDESC { - data: u64, - vt: ::VARTYPE, -}} -#[cfg(target_arch = "x86")] -STRUCT!{struct TYPEDESC { - data: u32, - vt: ::VARTYPE, -}} -UNION!(TYPEDESC, data, lptdesc, lptdesc_mut, *mut TYPEDESC); -UNION!(TYPEDESC, data, lpadesc, lpadesc_mut, *mut ARRAYDESC); -UNION!(TYPEDESC, data, hreftype, hreftype_mut, HREFTYPE); -STRUCT!{struct ARRAYDESC { - tdescElem: TYPEDESC, - cDims: ::USHORT, - rgbounds: [SAFEARRAYBOUND; 1], -}} -STRUCT!{struct PARAMDESCEX { - cBytes: ::ULONG, - varDefaultValue: VARIANTARG, -}} -pub type LPPARAMDESCEX = *mut PARAMDESCEX; -STRUCT!{struct PARAMDESC { - pparamdescex: LPPARAMDESCEX, - wParamFlags: ::USHORT, -}} -pub type LPPARAMDESC = *mut PARAMDESC; -pub const PARAMFLAG_NONE: ::DWORD = 0; -pub const PARAMFLAG_FIN: ::DWORD = 0x1; -pub const PARAMFLAG_FOUT: ::DWORD = 0x2; -pub const PARAMFLAG_FLCID: ::DWORD = 0x4; -pub const PARAMFLAG_FRETVAL: ::DWORD = 0x8; -pub const PARAMFLAG_FOPT: ::DWORD = 0x10; -pub const PARAMFLAG_FHASDEFAULT: ::DWORD = 0x20; -pub const PARAMFLAG_FHASCUSTDATA: ::DWORD = 0x40; -STRUCT!{struct IDLDESC { - dwReserved: ::ULONG_PTR, - wIDLFlags: ::USHORT, -}} -pub type LPIDLDESC = *mut IDLDESC; -pub const IDLFLAG_NONE: ::DWORD = PARAMFLAG_NONE; -pub const IDLFLAG_FIN: ::DWORD = PARAMFLAG_FIN; -pub const IDLFLAG_FOUT: ::DWORD = PARAMFLAG_FOUT; -pub const IDLFLAG_FLCID: ::DWORD = PARAMFLAG_FLCID; -pub const IDLFLAG_FRETVAL: ::DWORD = PARAMFLAG_FRETVAL; -STRUCT!{struct ELEMDESC { - tdesc: TYPEDESC, - idldesc: IDLDESC, -}} -UNION!(ELEMDESC, idldesc, paramdesc, paramdesc_mut, PARAMDESC); -pub type LPELEMDESC = *mut ELEMDESC; -STRUCT!{struct TYPEATTR { - guid: ::GUID, - lcid: ::LCID, - dwReserved: ::DWORD, - memidConstructor: ::MEMBERID, - memidDestructor: ::MEMBERID, - lpstrSchema: ::LPOLESTR, - cbSizeInstance: ::ULONG, - typekind: ::TYPEKIND, - cFuncs: ::WORD, - cVars: ::WORD, - cImplTypes: ::WORD, - cbSizeVft: ::WORD, - cbAlignment: ::WORD, - wTypeFlags: ::WORD, - wMajorVerNum: ::WORD, - wMinorVerNum: ::WORD, - tdescAlias: ::TYPEDESC, - idldescType: ::IDLDESC, -}} -pub type LPTYPEATTR = *mut TYPEATTR; -STRUCT!{struct DISPPARAMS { - rgvarg: *mut VARIANTARG, - rgdispidNamedArgs: *mut DISPID, - cArgs: ::UINT, - cNamedArgs: ::UINT, -}} -#[repr(C)] #[derive(Copy)] -pub struct EXCEPINFO { - pub wCode: ::WORD, - pub wReserved: ::WORD, - pub bstrSource: ::BSTR, - pub bstrDescription: ::BSTR, - pub bstrHelpFile: ::BSTR, - pub dwHelpContext: ::DWORD, - pub pvReserved: ::PVOID, - pub pfnDeferredFillIn: Option<unsafe extern "system" fn(einfo: *mut EXCEPINFO) -> ::HRESULT>, - pub scode: ::SCODE, -} -impl Clone for EXCEPINFO { - fn clone(&self) -> Self { - *self - } -} -ENUM!{enum CALLCONV { - CC_FASTCALL = 0, - CC_CDECL = 1, - CC_MSCPASCAL, - CC_PASCAL, - CC_MACPASCAL, - CC_STDCALL, - CC_FPFASTCALL, - CC_SYSCALL, - CC_MPWCDECL, - CC_MPWPASCAL, - CC_MAX, -}} -ENUM!{enum FUNCKIND { - FUNC_VIRTUAL = 0, - FUNC_PUREVIRTUAL, - FUNC_NONVIRTUAL, - FUNC_STATIC, - FUNC_DISPATCH, -}} -FLAGS!{enum INVOKEKIND { - INVOKE_FUNC = 1, - INVOKE_PROPERTYGET = 2, - INVOKE_PROPERTYPUT = 4, - INVOKE_PROPERTYPUTREF = 8, -}} -STRUCT!{struct FUNCDESC { - memid: ::MEMBERID, - lprgscode: *mut ::SCODE, - lprgelemdescParam: *mut ::ELEMDESC, - funckind: ::FUNCKIND, - invkind: ::INVOKEKIND, - callconv: ::CALLCONV, - cParams: ::SHORT, - cParamsOpt: ::SHORT, - oVft: ::SHORT, - cScodes: ::SHORT, - elemdescFunc: ::ELEMDESC, - wFuncFlags: ::WORD, -}} -pub type LPFUNCDESC = *mut FUNCDESC; -ENUM!{enum VARKIND { - VAR_PERINSTANCE = 0, - VAR_STATIC, - VAR_CONST, - VAR_DISPATCH, -}} -pub const IMPLTYPEFLAG_FDEFAULT: ::DWORD = 0x1; -pub const IMPLTYPEFLAG_FSOURCE: ::DWORD = 0x2; -pub const IMPLTYPEFLAG_FRESTRICTED: ::DWORD = 0x4; -pub const IMPLTYPEFLAG_FDEFAULTVTABLE: ::DWORD = 0x8; -STRUCT!{struct VARDESC { - memid: MEMBERID, - lpstrSchema: ::LPOLESTR, - lpvarValue: *mut VARIANT, - elemdescVar: ::ELEMDESC, - wVarFlags: ::WORD, - varkind: VARKIND, -}} -UNION!(VARDESC, lpvarValue, oInst, oInst_mut, ::ULONG); -pub type LPVARDESC = *mut VARDESC; -FLAGS!{enum TYPEFLAGS { - TYPEFLAG_FAPPOBJECT = 0x1, - TYPEFLAG_FCANCREATE = 0x2, - TYPEFLAG_FLICENSED = 0x4, - TYPEFLAG_FPREDECLID = 0x8, - TYPEFLAG_FHIDDEN = 0x10, - TYPEFLAG_FCONTROL = 0x20, - TYPEFLAG_FDUAL = 0x40, - TYPEFLAG_FNONEXTENSIBLE = 0x80, - TYPEFLAG_FOLEAUTOMATION = 0x100, - TYPEFLAG_FRESTRICTED = 0x200, - TYPEFLAG_FAGGREGATABLE = 0x400, - TYPEFLAG_FREPLACEABLE = 0x800, - TYPEFLAG_FDISPATCHABLE = 0x1000, - TYPEFLAG_FREVERSEBIND = 0x2000, - TYPEFLAG_FPROXY = 0x4000, -}} -FLAGS!{enum FUNCFLAGS { - FUNCFLAG_FRESTRICTED = 0x1, - FUNCFLAG_FSOURCE = 0x2, - FUNCFLAG_FBINDABLE = 0x4, - FUNCFLAG_FREQUESTEDIT = 0x8, - FUNCFLAG_FDISPLAYBIND = 0x10, - FUNCFLAG_FDEFAULTBIND = 0x20, - FUNCFLAG_FHIDDEN = 0x40, - FUNCFLAG_FUSESGETLASTERROR = 0x80, - FUNCFLAG_FDEFAULTCOLLELEM = 0x100, - FUNCFLAG_FUIDEFAULT = 0x200, - FUNCFLAG_FNONBROWSABLE = 0x400, - FUNCFLAG_FREPLACEABLE = 0x800, - FUNCFLAG_FIMMEDIATEBIND = 0x1000, -}} -FLAGS!{enum VARFLAGS { - VARFLAG_FREADONLY = 0x1, - VARFLAG_FSOURCE = 0x2, - VARFLAG_FBINDABLE = 0x4, - VARFLAG_FREQUESTEDIT = 0x8, - VARFLAG_FDISPLAYBIND = 0x10, - VARFLAG_FDEFAULTBIND = 0x20, - VARFLAG_FHIDDEN = 0x40, - VARFLAG_FRESTRICTED = 0x80, - VARFLAG_FDEFAULTCOLLELEM = 0x100, - VARFLAG_FUIDEFAULT = 0x200, - VARFLAG_FNONBROWSABLE = 0x400, - VARFLAG_FREPLACEABLE = 0x800, - VARFLAG_FIMMEDIATEBIND = 0x1000, -}} -STRUCT!{struct CLEANLOCALSTORAGE { - pInterface: *mut ::IUnknown, - pStorage: ::PVOID, - flags: ::DWORD, -}} -STRUCT!{struct CUSTDATAITEM { - guid: ::GUID, - varValue: VARIANTARG, -}} -pub type LPCUSTDATAITEM = *mut CUSTDATAITEM; -STRUCT!{struct CUSTDATA { - cCustData: ::DWORD, - prgCustData: LPCUSTDATAITEM, -}} -pub type LPCUSTDATA = *mut CUSTDATA; -pub type LPCREATETYPEINFO = *mut ICreateTypeInfo; -RIDL!( -interface ICreateTypeInfo(ICreateTypeInfoVtbl): IUnknown(IUnknownVtbl) { - fn SetGuid(&mut self, guid: ::REFGUID) -> ::HRESULT, - fn SetTypeFlags(&mut self, uTypeFlags: ::UINT) -> ::HRESULT, - fn SetDocString(&mut self, pStrDoc: ::LPOLESTR) -> ::HRESULT, - fn SetHelpContext(&mut self, dwHelpContext: ::DWORD) -> ::HRESULT, - fn SetVersion(&mut self, wMajorVerNum: ::WORD, wMinorVerNum: ::WORD) -> ::HRESULT, - fn AddRefTypeInfo(&mut self, pTInfo: *mut ITypeInfo) -> ::HRESULT, - fn AddFuncDesc(&mut self, index: ::UINT, pFuncDesc: *mut FUNCDESC) -> ::HRESULT, - fn SetImplTypeFlags(&mut self, index: ::UINT, implTypeFlags: ::INT) -> ::HRESULT, - fn SetAlignment(&mut self, cbAlignment: ::WORD) -> ::HRESULT, - fn SetSchema(&mut self, pStrSchema: ::LPOLESTR) -> ::HRESULT, - fn AddVarDesc(&mut self, index: ::UINT, pVarDesc: *mut VARDESC) -> ::HRESULT, - fn SetFuncAndParamNames( - &mut self, index: ::UINT, rgszNames: *mut ::LPOLESTR, cNames: ::UINT - ) -> ::HRESULT, - fn SetVarName(&mut self, index: ::UINT, szName: ::LPOLESTR) -> ::HRESULT, - fn SetTypeDescAlias(&mut self, pTDescAlias: *mut TYPEDESC) -> ::HRESULT, - fn DefineFuncAsDllEntry( - &mut self, index: ::UINT, szDllName: ::LPOLESTR, szProcName: ::LPOLESTR - ) -> ::HRESULT, - fn SetFuncDocString(&mut self, index: ::UINT, szDocString: ::LPOLESTR) -> ::HRESULT, - fn SetVarDocString(&mut self, index: ::UINT, szDocString: ::LPOLESTR) -> ::HRESULT, - fn SetFuncHelpContext(&mut self, index: ::UINT, dwHelpContext: ::DWORD) -> ::HRESULT, - fn SetVarHelpContext(&mut self, index: ::UINT, dwHelpContext: ::DWORD) -> ::HRESULT, - fn SetMops(&mut self, index: ::UINT, bstrMops: ::BSTR) -> ::HRESULT, - fn SetTypeIdldesc(&mut self, pIdlDesc: *mut IDLDESC) -> ::HRESULT, - fn LayOut(&mut self) -> ::HRESULT -} -); -// FIXME: Implement these interfaces -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct ICreateTypeInfo2; -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct ICreateTypeLib; -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct ICreateTypeLib2; -pub type LPDISPATCH = *mut IDispatch; -pub const DISPID_UNKNOWN: ::INT = -1; -pub const DISPID_VALUE: ::INT = 0; -pub const DISPID_PROPERTYPUT: ::INT = -3; -pub const DISPID_NEWENUM: ::INT = -4; -pub const DISPID_EVALUATE: ::INT = -5; -pub const DISPID_CONSTRUCTOR: ::INT = -6; -pub const DISPID_DESTRUCTOR: ::INT = -7; -pub const DISPID_COLLECT: ::INT = -8; -RIDL!( -interface IDispatch(IDispatchVtbl): IUnknown(IUnknownVtbl) { - fn GetTypeInfoCount(&mut self, pctinfo: *mut ::UINT) -> ::HRESULT, - fn GetTypeInfo( - &mut self, iTInfo: ::UINT, lcid: ::LCID, ppTInfo: *mut *mut ITypeInfo - ) -> ::HRESULT, - fn GetIDsOfNames( - &mut self, riid: ::REFIID, rgszNames: *mut ::LPOLESTR, cNames: ::UINT, lcid: ::LCID, - rgDispId: *mut ::DISPID - ) -> ::HRESULT, - fn Invoke( - &mut self, dispIdMember: ::DISPID, riid: ::REFIID, lcid: ::LCID, wFlags: ::WORD, - pDispParams: *mut ::DISPPARAMS, pVarResult: *mut VARIANT, pExcepInfo: *mut ::EXCEPINFO, - puArgErr: *mut ::UINT - ) -> ::HRESULT -} -); -// FIXME: Implement these interfaces -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct IEnumVARIANT; -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct ITypeComp; -RIDL!( -interface ITypeInfo(ITypeInfoVtbl): IUnknown(IUnknownVtbl) { - fn GetTypeAttr(&mut self, ppTypeAttr: *mut *mut TYPEATTR) -> ::HRESULT, - fn GetTypeComp(&mut self, ppTComp: *mut *mut ITypeComp) -> ::HRESULT, - fn GetFuncDesc(&mut self, index: ::UINT, ppFunDesc: *mut *mut FUNCDESC) -> ::HRESULT, - fn GetVarDesc(&mut self, index: ::UINT, pPVarDesc: *mut *mut VARDESC) -> ::HRESULT, - fn GetNames( - &mut self, memid: MEMBERID, rgBstrNames: *mut ::BSTR, cMaxNames: ::UINT, - pcNames: *mut ::UINT - ) -> ::HRESULT, - fn GetRefTypeOfImplType(&mut self, index: ::UINT, pRefType: *mut HREFTYPE) -> ::HRESULT, - fn GetImplTypeFlags(&mut self, index: ::UINT, pImplTypeFlags: *mut ::INT) -> ::HRESULT, - fn GetIDsOfNames( - &mut self, rgszNames: *mut ::LPOLESTR, cNames: ::UINT, pMemId: *mut MEMBERID - ) -> ::HRESULT, - fn Invoke( - &mut self, pvInstance: ::PVOID, memid: MEMBERID, wFlags: ::WORD, - pDispParams: *mut DISPPARAMS, pVarResult: *mut VARIANT, pExcepInfo: *mut EXCEPINFO, - puArgErr: *mut ::UINT - ) -> ::HRESULT, - fn GetDocumentation( - &mut self, memid: MEMBERID, pBstrName: *mut ::BSTR, pBstrDocString: *mut ::BSTR, - pdwHelpContext: *mut ::DWORD, pBstrHelpFile: *mut ::BSTR - ) -> ::HRESULT, - fn GetDllEntry( - &mut self, memid: MEMBERID, invKind: ::INVOKEKIND, pBstrDllName: *mut ::BSTR, - pBstrName: *mut ::BSTR, pwOrdinal: *mut ::WORD - ) -> ::HRESULT, - fn GetRefTypeInfo(&mut self, hRefType: HREFTYPE, ppTInfo: *mut *mut ITypeInfo) -> ::HRESULT, - fn AddressOfMember( - &mut self, memid: MEMBERID, invKind: ::INVOKEKIND, ppv: *mut ::PVOID - ) -> ::HRESULT, - fn CreateInstance( - &mut self, pUnkOuter: *mut ::IUnknown, riid: ::REFIID, ppvObj: *mut ::PVOID - ) -> ::HRESULT, - fn GetMops(&mut self, memid: MEMBERID, pBstrMops: *mut ::BSTR) -> ::HRESULT, - fn GetContainingTypeLib( - &mut self, ppTLib: *mut *mut ITypeLib, pIndex: *mut ::UINT - ) -> ::HRESULT, - fn ReleaseTypeAttr(&mut self, pTypeAttr: *mut TYPEATTR) -> (), - fn ReleaseFuncDesc(&mut self, pFuncDesc: *mut FUNCDESC) -> (), - fn ReleaseVarDesc(&mut self, pVarDesc: *mut VARDESC) -> () -} -); -// FIXME: Implement these interfaces -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct ITypeInfo2; -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct ITypeLib; -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct ITypeLib2; -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct ITypeChangeEvents; -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct IErrorInfo; -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct ICreateErrorInfo; -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct ISupportErrorInfo; -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct ITypeFactory; -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct ITypeMarshal; -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct IRecordInfo; -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct IErrorLog; -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct IPropertyBag; diff --git a/deps/winapi-0.2.5/src/processsnapshot.rs b/deps/winapi-0.2.5/src/processsnapshot.rs deleted file mode 100644 index 3e6cd6180..000000000 --- a/deps/winapi-0.2.5/src/processsnapshot.rs +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright © 2015, skdltmxn -// Licensed under the MIT License <LICENSE.md> -//! Defines the process snapshot API -FLAGS!{enum PSS_CAPTURE_FLAGS { - PSS_CAPTURE_NONE = 0x00000000, - PSS_CAPTURE_VA_CLONE = 0x00000001, - PSS_CAPTURE_RESERVED_00000002 = 0x00000002, - PSS_CAPTURE_HANDLES = 0x00000004, - PSS_CAPTURE_HANDLE_NAME_INFORMATION = 0x00000008, - PSS_CAPTURE_HANDLE_BASIC_INFORMATION = 0x00000010, - PSS_CAPTURE_HANDLE_TYPE_SPECIFIC_INFORMATION = 0x00000020, - PSS_CAPTURE_HANDLE_TRACE = 0x00000040, - PSS_CAPTURE_THREADS = 0x00000080, - PSS_CAPTURE_THREAD_CONTEXT = 0x00000100, - PSS_CAPTURE_THREAD_CONTEXT_EXTENDED = 0x00000200, - PSS_CAPTURE_RESERVED_00000400 = 0x00000400, - PSS_CAPTURE_VA_SPACE = 0x00000800, - PSS_CAPTURE_VA_SPACE_SECTION_INFORMATION = 0x00001000, - PSS_CREATE_BREAKAWAY_OPTIONAL = 0x04000000, - PSS_CREATE_BREAKAWAY = 0x08000000, - PSS_CREATE_FORCE_BREAKAWAY = 0x10000000, - PSS_CREATE_USE_VM_ALLOCATIONS = 0x20000000, - PSS_CREATE_MEASURE_PERFORMANCE = 0x40000000, - PSS_CREATE_RELEASE_SECTION = -2147483648i32 as u32, -}} -ENUM!{enum PSS_QUERY_INFORMATION_CLASS { - PSS_QUERY_PROCESS_INFORMATION = 0, - PSS_QUERY_VA_CLONE_INFORMATION = 1, - PSS_QUERY_AUXILIARY_PAGES_INFORMATION = 2, - PSS_QUERY_VA_SPACE_INFORMATION = 3, - PSS_QUERY_HANDLE_INFORMATION = 4, - PSS_QUERY_THREAD_INFORMATION = 5, - PSS_QUERY_HANDLE_TRACE_INFORMATION = 6, - PSS_QUERY_PERFORMANCE_COUNTERS = 7, -}} -ENUM!{enum PSS_WALK_INFORMATION_CLASS { - PSS_WALK_AUXILIARY_PAGES = 0, - PSS_WALK_VA_SPACE = 1, - PSS_WALK_HANDLES = 2, - PSS_WALK_THREADS = 3, -}} -FLAGS!{enum PSS_DUPLICATE_FLAGS { - PSS_DUPLICATE_NONE = 0x00, - PSS_DUPLICATE_CLOSE_SOURCE = 0x01, -}} -DECLARE_HANDLE!(HPSS, HPSS__); -DECLARE_HANDLE!(HPSSWALK, HPSSWALK__); -pub type pAllocRoutine = Option<unsafe extern "system" fn( - Context: *mut ::c_void, Size: ::DWORD, -) -> *mut ::c_void>; -pub type pFreeRoutine = Option<unsafe extern "system" fn( - Context: *mut ::c_void, Address: *mut ::c_void, -)>; -#[repr(C)] #[derive(Copy)] -pub struct PSS_ALLOCATOR { - pub Context: *mut ::c_void, - pub AllocRoutine: pAllocRoutine, - pub FreeRoutine: pFreeRoutine, -} -impl Clone for PSS_ALLOCATOR { fn clone(&self) -> PSS_ALLOCATOR { *self } } diff --git a/deps/winapi-0.2.5/src/prsht.rs b/deps/winapi-0.2.5/src/prsht.rs deleted file mode 100644 index 0acf5dba0..000000000 --- a/deps/winapi-0.2.5/src/prsht.rs +++ /dev/null @@ -1,273 +0,0 @@ -// Copyright © 2015, skdltmxn -// Licensed under the MIT License <LICENSE.md> -//! Interface for the Windows Property Sheet Pages -#[repr(C)] #[allow(missing_copy_implementations)] -pub struct PSP { - unused: ::c_void, -} -pub type HPROPSHEETPAGE = *mut PSP; -pub type LPFNPSPCALLBACKA = Option<unsafe extern "system" fn( - hwnd: ::HWND, uMsg: ::UINT, ppsp: *mut PROPSHEETPAGEA, -) -> ::UINT>; -pub type LPFNPSPCALLBACKW = Option<unsafe extern "system" fn( - hwnd: ::HWND, uMsg: ::UINT, ppsp: *mut PROPSHEETPAGEW, -) -> ::UINT>; -pub const PSP_DEFAULT: ::DWORD = 0x00000000; -pub const PSP_DLGINDIRECT: ::DWORD = 0x00000001; -pub const PSP_USEHICON: ::DWORD = 0x00000002; -pub const PSP_USEICONID: ::DWORD = 0x00000004; -pub const PSP_USETITLE: ::DWORD = 0x00000008; -pub const PSP_RTLREADING: ::DWORD = 0x00000010; -pub const PSP_HASHELP: ::DWORD = 0x00000020; -pub const PSP_USEREFPARENT: ::DWORD = 0x00000040; -pub const PSP_USECALLBACK: ::DWORD = 0x00000080; -pub const PSP_PREMATURE: ::DWORD = 0x00000400; -pub const PSP_HIDEHEADER: ::DWORD = 0x00000800; -pub const PSP_USEHEADERTITLE: ::DWORD = 0x00001000; -pub const PSP_USEHEADERSUBTITLE: ::DWORD = 0x00002000; -pub const PSP_USEFUSIONCONTEXT: ::DWORD = 0x00004000; -pub const PSPCB_ADDREF: ::UINT = 0; -pub const PSPCB_RELEASE: ::UINT = 1; -pub const PSPCB_CREATE: ::UINT = 2; -pub type PROPSHEETPAGE_RESOURCE = ::LPCDLGTEMPLATEA; -#[repr(C)] #[derive(Copy)] -pub struct PROPSHEETPAGEA_V4 { - pub dwSize: ::DWORD, - pub dwFlags: ::DWORD, - pub hInstance: ::HINSTANCE, - pub pszTemplate: ::LPCSTR, - pub hIcon: ::HICON, - pub pszTitle: ::LPCSTR, - pub pfnDlgProc: ::DLGPROC, - pub lParam: ::LPARAM, - pub pfnCallback: LPFNPSPCALLBACKA, - pub pcRefParent: *mut ::UINT, - pub pszHeaderTitle: ::LPCSTR, - pub pszHeaderSubTitle: ::LPCSTR, - pub hActCtx: ::HANDLE, - pub hbmHeader: ::HBITMAP -} -impl Clone for PROPSHEETPAGEA_V4 { fn clone(&self) -> PROPSHEETPAGEA_V4 { *self } } -UNION!(PROPSHEETPAGEA_V4, pszTemplate, pResource, pResource_mut, PROPSHEETPAGE_RESOURCE); -UNION!(PROPSHEETPAGEA_V4, hIcon, pszIcon, pszIcon_mut, ::LPCSTR); -UNION!(PROPSHEETPAGEA_V4, hbmHeader, pszbmHeader, pszbmHeader_mut, ::LPCSTR); -pub type LPPROPSHEETPAGEA_V4 = *mut PROPSHEETPAGEA_V4; -pub type LPCPROPSHEETPAGEA_V4 = *const PROPSHEETPAGEA_V4; -#[repr(C)] #[derive(Copy)] -pub struct PROPSHEETPAGEW_V4 { - pub dwSize: ::DWORD, - pub dwFlags: ::DWORD, - pub hInstance: ::HINSTANCE, - pub pszTemplate: ::LPCWSTR, - pub hIcon: ::HICON, - pub pszTitle: ::LPCWSTR, - pub pfnDlgProc: ::DLGPROC, - pub lParam: ::LPARAM, - pub pfnCallback: LPFNPSPCALLBACKW, - pub pcRefParent: *mut ::UINT, - pub pszHeaderTitle: ::LPCWSTR, - pub pszHeaderSubTitle: ::LPCWSTR, - pub hActCtx: ::HANDLE, - pub hbmHeader: ::HBITMAP -} -impl Clone for PROPSHEETPAGEW_V4 { fn clone(&self) -> PROPSHEETPAGEW_V4 { *self } } -UNION!(PROPSHEETPAGEW_V4, pszTemplate, pResource, pResource_mut, PROPSHEETPAGE_RESOURCE); -UNION!(PROPSHEETPAGEW_V4, hIcon, pszIcon, pszIcon_mut, ::LPCWSTR); -UNION!(PROPSHEETPAGEW_V4, hbmHeader, pszbmHeader, pszbmHeader_mut, ::LPCWSTR); -pub type LPPROPSHEETPAGEW_V4 = *mut PROPSHEETPAGEW_V4; -pub type LPCPROPSHEETPAGEW_V4 = *const PROPSHEETPAGEW_V4; -pub type PROPSHEETPAGEA_LATEST = PROPSHEETPAGEA_V4; -pub type PROPSHEETPAGEW_LATEST = PROPSHEETPAGEW_V4; -pub type LPPROPSHEETPAGEA_LATEST = LPPROPSHEETPAGEA_V4; -pub type LPPROPSHEETPAGEW_LATEST = LPPROPSHEETPAGEW_V4; -pub type LPCPROPSHEETPAGEA_LATEST = LPCPROPSHEETPAGEA_V4; -pub type LPCPROPSHEETPAGEW_LATEST = LPCPROPSHEETPAGEW_V4; -pub type PROPSHEETPAGEA = PROPSHEETPAGEA_V4; -pub type PROPSHEETPAGEW = PROPSHEETPAGEW_V4; -pub type LPPROPSHEETPAGEA = LPPROPSHEETPAGEA_V4; -pub type LPPROPSHEETPAGEW = LPPROPSHEETPAGEW_V4; -pub type LPCPROPSHEETPAGEA = LPCPROPSHEETPAGEA_V4; -pub type LPCPROPSHEETPAGEW = LPCPROPSHEETPAGEW_V4; -pub const PSH_DEFAULT: ::DWORD = 0x00000000; -pub const PSH_PROPTITLE: ::DWORD = 0x00000001; -pub const PSH_USEHICON: ::DWORD = 0x00000002; -pub const PSH_USEICONID: ::DWORD = 0x00000004; -pub const PSH_PROPSHEETPAGE: ::DWORD = 0x00000008; -pub const PSH_WIZARDHASFINISH: ::DWORD = 0x00000010; -pub const PSH_WIZARD: ::DWORD = 0x00000020; -pub const PSH_USEPSTARTPAGE: ::DWORD = 0x00000040; -pub const PSH_NOAPPLYNOW: ::DWORD = 0x00000080; -pub const PSH_USECALLBACK: ::DWORD = 0x00000100; -pub const PSH_HASHELP: ::DWORD = 0x00000200; -pub const PSH_MODELESS: ::DWORD = 0x00000400; -pub const PSH_RTLREADING: ::DWORD = 0x00000800; -pub const PSH_WIZARDCONTEXTHELP: ::DWORD = 0x00001000; -pub const PSH_WIZARD97: ::DWORD = 0x01000000; -pub const PSH_WATERMARK: ::DWORD = 0x00008000; -pub const PSH_USEHBMWATERMARK: ::DWORD = 0x00010000; -pub const PSH_USEHPLWATERMARK: ::DWORD = 0x00020000; -pub const PSH_STRETCHWATERMARK: ::DWORD = 0x00040000; -pub const PSH_HEADER: ::DWORD = 0x00080000; -pub const PSH_USEHBMHEADER: ::DWORD = 0x00100000; -pub const PSH_USEPAGELANG: ::DWORD = 0x00200000; -pub const PSH_WIZARD_LITE: ::DWORD = 0x00400000; -pub const PSH_NOCONTEXTHELP: ::DWORD = 0x02000000; -pub const PSH_AEROWIZARD: ::DWORD = 0x00004000; -pub const PSH_RESIZABLE: ::DWORD = 0x04000000; -pub const PSH_HEADERBITMAP: ::DWORD = 0x08000000; -pub const PSH_NOMARGIN: ::DWORD = 0x10000000; -pub type PFNPROPSHEETCALLBACK = Option<unsafe extern "system" fn( - ::HWND, ::UINT, ::LPARAM, -) -> ::c_int>; -#[repr(C)] #[derive(Copy)] -pub struct PROPSHEETHEADERA_V2 { - pub dwSize: ::DWORD, - pub dwFlags: ::DWORD, - pub hwndParent: ::HWND, - pub hInstance: ::HINSTANCE, - pub hIcon: ::HICON, - pub pszCaption: ::LPCSTR, - pub nPages: ::UINT, - pub pStartPage: ::LPCSTR, - pub ppsp: LPCPROPSHEETPAGEA, - pub pfnCallback: PFNPROPSHEETCALLBACK, - pub hbmWatermark: ::HBITMAP, - pub hplWatermark: ::HPALETTE, - pub hbmHeader: ::HBITMAP, -} -impl Clone for PROPSHEETHEADERA_V2 { fn clone(&self) -> PROPSHEETHEADERA_V2 { *self } } -UNION!(PROPSHEETHEADERA_V2, hIcon, pszIcon, pszIcon_mut, ::LPCSTR); -UNION!(PROPSHEETHEADERA_V2, pStartPage, nStartPage, nStartPage_mut, ::UINT); -UNION!(PROPSHEETHEADERA_V2, ppsp, phpage, phpage_mut, *mut HPROPSHEETPAGE); -UNION!(PROPSHEETHEADERA_V2, hbmWatermark, pszbmWatermark, pszbmWatermark_mut, ::LPCSTR); -UNION!(PROPSHEETHEADERA_V2, hbmHeader, pszbmHeader, pszbmHeader_mut, ::LPCSTR); -pub type LPPROPSHEETHEADERA_V2 = *mut PROPSHEETHEADERA_V2; -pub type LPCPROPSHEETHEADERA_V2 = *const PROPSHEETHEADERA_V2; -#[repr(C)] #[derive(Copy)] -pub struct PROPSHEETHEADERW_V2 { - pub dwSize: ::DWORD, - pub dwFlags: ::DWORD, - pub hwndParent: ::HWND, - pub hInstance: ::HINSTANCE, - pub hIcon: ::HICON, - pub pszCaption: ::LPCWSTR, - pub nPages: ::UINT, - pub pStartPage: ::LPCWSTR, - pub ppsp: LPCPROPSHEETPAGEW, - pub pfnCallback: PFNPROPSHEETCALLBACK, - pub hbmWatermark: ::HBITMAP, - pub hplWatermark: ::HPALETTE, - pub hbmHeader: ::HBITMAP, -} -impl Clone for PROPSHEETHEADERW_V2 { fn clone(&self) -> PROPSHEETHEADERW_V2 { *self } } -UNION!(PROPSHEETHEADERW_V2, hIcon, pszIcon, pszIcon_mut, ::LPCWSTR); -UNION!(PROPSHEETHEADERW_V2, pStartPage, nStartPage, nStartPage_mut, ::UINT); -UNION!(PROPSHEETHEADERW_V2, ppsp, phpage, phpage_mut, *mut HPROPSHEETPAGE); -UNION!(PROPSHEETHEADERW_V2, hbmWatermark, pszbmWatermark, pszbmWatermark_mut, ::LPCWSTR); -UNION!(PROPSHEETHEADERW_V2, hbmHeader, pszbmHeader, pszbmHeader_mut, ::LPCWSTR); -pub type LPPROPSHEETHEADERW_V2 = *mut PROPSHEETHEADERW_V2; -pub type LPCPROPSHEETHEADERW_V2 = *const PROPSHEETHEADERW_V2; -pub type PROPSHEETHEADERA = PROPSHEETHEADERA_V2; -pub type PROPSHEETHEADERW = PROPSHEETHEADERW_V2; -pub type LPPROPSHEETHEADERA = LPPROPSHEETHEADERA_V2; -pub type LPPROPSHEETHEADERW = LPPROPSHEETHEADERW_V2; -pub type LPCPROPSHEETHEADERA = LPCPROPSHEETHEADERA_V2; -pub type LPCPROPSHEETHEADERW = LPCPROPSHEETHEADERW_V2; -pub const PSCB_INITIALIZED: ::UINT = 1; -pub const PSCB_PRECREATE: ::UINT = 2; -pub const PSCB_BUTTONPRESSED: ::UINT = 3; -pub type LPFNADDPROPSHEETPAGE = Option<unsafe extern "system" fn( - HPROPSHEETPAGE, ::LPARAM, -) -> ::BOOL>; -pub type LPFNADDPROPSHEETPAGES = Option<unsafe extern "system" fn( - ::LPVOID, LPFNADDPROPSHEETPAGE, ::LPARAM, -) -> ::BOOL>; -STRUCT!{struct PSHNOTIFY { - hdr: ::NMHDR, - lParam: ::LPARAM, -}} -pub type LPPSHNOTIFY = *mut PSHNOTIFY; -pub const PSN_FIRST: ::UINT = (0 - 200); -pub const PSN_LAST: ::UINT = (0 - 299); -pub const PSN_SETACTIVE: ::UINT = PSN_FIRST - 0; -pub const PSN_KILLACTIVE: ::UINT = PSN_FIRST - 1; -pub const PSN_APPLY: ::UINT = PSN_FIRST - 2; -pub const PSN_RESET: ::UINT = PSN_FIRST - 3; -pub const PSN_HELP: ::UINT = PSN_FIRST - 5; -pub const PSN_WIZBACK: ::UINT = PSN_FIRST - 6; -pub const PSN_WIZNEXT: ::UINT = PSN_FIRST - 7; -pub const PSN_WIZFINISH: ::UINT = PSN_FIRST - 8; -pub const PSN_QUERYCANCEL: ::UINT = PSN_FIRST - 9; -pub const PSN_GETOBJECT: ::UINT = PSN_FIRST - 10; -pub const PSN_TRANSLATEACCELERATOR: ::UINT = PSN_FIRST - 12; -pub const PSN_QUERYINITIALFOCUS: ::UINT = PSN_FIRST - 13; -pub const PSNRET_NOERROR: ::LRESULT = 0; -pub const PSNRET_INVALID: ::LRESULT = 1; -pub const PSNRET_INVALID_NOCHANGEPAGE: ::LRESULT = 2; -pub const PSNRET_MESSAGEHANDLED: ::LRESULT = 3; -pub const PSM_SETCURSEL: ::UINT = ::WM_USER + 101; -pub const PSM_REMOVEPAGE: ::UINT = ::WM_USER + 102; -pub const PSM_ADDPAGE: ::UINT = ::WM_USER + 103; -pub const PSM_CHANGED: ::UINT = ::WM_USER + 104; -pub const PSM_RESTARTWINDOWS: ::UINT = ::WM_USER + 105; -pub const PSM_REBOOTSYSTEM: ::UINT = ::WM_USER + 106; -pub const PSM_CANCELTOCLOSE: ::UINT = ::WM_USER + 107; -pub const PSM_QUERYSIBLINGS: ::UINT = ::WM_USER + 108; -pub const PSM_UNCHANGED: ::UINT = ::WM_USER + 109; -pub const PSM_APPLY: ::UINT = ::WM_USER + 110; -pub const PSM_SETTITLEA: ::UINT = ::WM_USER + 111; -pub const PSM_SETTITLEW: ::UINT = ::WM_USER + 120; -pub const PSM_SETWIZBUTTONS: ::UINT = ::WM_USER + 112; -pub const PSWIZB_BACK: ::DWORD = 0x00000001; -pub const PSWIZB_NEXT: ::DWORD = 0x00000002; -pub const PSWIZB_FINISH: ::DWORD = 0x00000004; -pub const PSWIZB_DISABLEDFINISH: ::DWORD = 0x00000008; -pub const PSWIZB_CANCEL: ::DWORD = 0x00000008; -pub const PSWIZBF_ELEVATIONREQUIRED: ::WPARAM = 0x00000001; -pub const PSBTN_BACK: ::c_int = 0; -pub const PSBTN_NEXT: ::c_int = 1; -pub const PSBTN_FINISH: ::c_int = 2; -pub const PSBTN_OK: ::c_int = 3; -pub const PSBTN_APPLYNOW: ::c_int = 4; -pub const PSBTN_CANCEL: ::c_int = 5; -pub const PSBTN_HELP: ::c_int = 6; -pub const PSBTN_MAX: ::c_int = 6; -pub const PSM_PRESSBUTTON: ::UINT = ::WM_USER + 113; -pub const PSM_SETCURSELID: ::UINT = ::WM_USER + 114; -pub const PSM_SETFINISHTEXTA: ::UINT = ::WM_USER + 115; -pub const PSM_SETFINISHTEXTW: ::UINT = ::WM_USER + 121; -pub const PSM_GETTABCONTROL: ::UINT = ::WM_USER + 116; -pub const PSM_ISDIALOGMESSAGE: ::UINT = ::WM_USER + 117; -pub const PSM_GETCURRENTPAGEHWND: ::UINT = ::WM_USER + 118; -pub const PSM_INSERTPAGE: ::UINT = ::WM_USER + 119; -pub const PSM_SETHEADERTITLEA: ::UINT = ::WM_USER + 125; -pub const PSM_SETHEADERTITLEW: ::UINT = ::WM_USER + 126; -pub const PSWIZF_SETCOLOR: ::UINT = (0 - 1) as ::UINT; -pub const PSM_SETHEADERSUBTITLEA: ::UINT = ::WM_USER + 127; -pub const PSM_SETHEADERSUBTITLEW: ::UINT = ::WM_USER + 128; -pub const PSM_HWNDTOINDEX: ::UINT = ::WM_USER + 129; -pub const PSM_INDEXTOHWND: ::UINT = ::WM_USER + 130; -pub const PSM_PAGETOINDEX: ::UINT = ::WM_USER + 131; -pub const PSM_INDEXTOPAGE: ::UINT = ::WM_USER + 132; -pub const PSM_IDTOINDEX: ::UINT = ::WM_USER + 133; -pub const PSM_INDEXTOID: ::UINT = ::WM_USER + 134; -pub const PSM_GETRESULT: ::UINT = ::WM_USER + 135; -pub const PSM_RECALCPAGESIZES: ::UINT = ::WM_USER + 136; -pub const PSM_SETNEXTTEXTW: ::UINT = ::WM_USER + 137; -pub const PSM_SHOWWIZBUTTONS: ::UINT = ::WM_USER + 138; -pub const PSM_ENABLEWIZBUTTONS: ::UINT = ::WM_USER + 139; -pub const PSM_SETBUTTONTEXTW: ::UINT = ::WM_USER + 140; -pub const PSM_SETBUTTONTEXT: ::UINT = PSM_SETBUTTONTEXTW; -pub const ID_PSRESTARTWINDOWS: ::INT_PTR = 0x2; -pub const ID_PSREBOOTSYSTEM: ::INT_PTR = ID_PSRESTARTWINDOWS | 0x1; -pub const WIZ_CXDLG: ::DWORD = 276; -pub const WIZ_CYDLG: ::DWORD = 140; -pub const WIZ_CXBMP: ::DWORD = 80; -pub const WIZ_BODYX: ::DWORD = 92; -pub const WIZ_BODYCX: ::DWORD = 184; -pub const PROP_SM_CXDLG: ::c_short = 212; -pub const PROP_SM_CYDLG: ::c_short = 188; -pub const PROP_MED_CXDLG: ::c_short = 227; -pub const PROP_MED_CYDLG: ::c_short = 215; -pub const PROP_LG_CXDLG: ::c_short = 252; -pub const PROP_LG_CYDLG: ::c_short = 218; diff --git a/deps/winapi-0.2.5/src/sapi.rs b/deps/winapi-0.2.5/src/sapi.rs deleted file mode 100644 index 016418fcc..000000000 --- a/deps/winapi-0.2.5/src/sapi.rs +++ /dev/null @@ -1,2437 +0,0 @@ -// Copyright © 2015, Connor Hilarides -// Licensed under the MIT License <LICENSE.md> -//! Mappings for the contents of sapi.h -ENUM!{enum SPDATAKEYLOCATION { - SPDKL_DefaultLocation = 0, - SPDKL_CurrentUser = 1, - SPDKL_LocalMachine = 2, - SPDKL_CurrentConfig = 5, -}} -pub const SPDUI_EngineProperties: &'static str = "EngineProperties"; -pub const SPDUI_AddRemoveWord: &'static str = "AddRemoveWord"; -pub const SPDUI_UserTraining: &'static str = "UserTraining"; -pub const SPDUI_MicTraining: &'static str = "MicTraining"; -pub const SPDUI_RecoProfileProperties: &'static str = "RecoProfileProperties"; -pub const SPDUI_AudioProperties: &'static str = "AudioProperties"; -pub const SPDUI_AudioVolume: &'static str = "AudioVolume"; -pub const SPDUI_UserEnrollment: &'static str = "UserEnrollment"; -pub const SPDUI_ShareData: &'static str = "ShareData"; -pub const SPDUI_Tutorial: &'static str = "Tutorial"; -ENUM!{enum SPSTREAMFORMAT { - SPSF_Default = -1i32 as u32, - SPSF_NoAssignedFormat = 0, - SPSF_Text = 1, - SPSF_NonStandardFormat = 2, - SPSF_ExtendedAudioFormat = 3, - SPSF_8kHz8BitMono = 4, - SPSF_8kHz8BitStereo = 5, - SPSF_8kHz16BitMono = 6, - SPSF_8kHz16BitStereo = 7, - SPSF_11kHz8BitMono = 8, - SPSF_11kHz8BitStereo = 9, - SPSF_11kHz16BitMono = 10, - SPSF_11kHz16BitStereo = 11, - SPSF_12kHz8BitMono = 12, - SPSF_12kHz8BitStereo = 13, - SPSF_12kHz16BitMono = 14, - SPSF_12kHz16BitStereo = 15, - SPSF_16kHz8BitMono = 16, - SPSF_16kHz8BitStereo = 17, - SPSF_16kHz16BitMono = 18, - SPSF_16kHz16BitStereo = 19, - SPSF_22kHz8BitMono = 20, - SPSF_22kHz8BitStereo = 21, - SPSF_22kHz16BitMono = 22, - SPSF_22kHz16BitStereo = 23, - SPSF_24kHz8BitMono = 24, - SPSF_24kHz8BitStereo = 25, - SPSF_24kHz16BitMono = 26, - SPSF_24kHz16BitStereo = 27, - SPSF_32kHz8BitMono = 28, - SPSF_32kHz8BitStereo = 29, - SPSF_32kHz16BitMono = 30, - SPSF_32kHz16BitStereo = 31, - SPSF_44kHz8BitMono = 32, - SPSF_44kHz8BitStereo = 33, - SPSF_44kHz16BitMono = 34, - SPSF_44kHz16BitStereo = 35, - SPSF_48kHz8BitMono = 36, - SPSF_48kHz8BitStereo = 37, - SPSF_48kHz16BitMono = 38, - SPSF_48kHz16BitStereo = 39, - SPSF_TrueSpeech_8kHz1BitMono = 40, - SPSF_CCITT_ALaw_8kHzMono = 41, - SPSF_CCITT_ALaw_8kHzStereo = 42, - SPSF_CCITT_ALaw_11kHzMono = 43, - SPSF_CCITT_ALaw_11kHzStereo = 44, - SPSF_CCITT_ALaw_22kHzMono = 45, - SPSF_CCITT_ALaw_22kHzStereo = 46, - SPSF_CCITT_ALaw_44kHzMono = 47, - SPSF_CCITT_ALaw_44kHzStereo = 48, - SPSF_CCITT_uLaw_8kHzMono = 49, - SPSF_CCITT_uLaw_8kHzStereo = 50, - SPSF_CCITT_uLaw_11kHzMono = 51, - SPSF_CCITT_uLaw_11kHzStereo = 52, - SPSF_CCITT_uLaw_22kHzMono = 53, - SPSF_CCITT_uLaw_22kHzStereo = 54, - SPSF_CCITT_uLaw_44kHzMono = 55, - SPSF_CCITT_uLaw_44kHzStereo = 56, - SPSF_ADPCM_8kHzMono = 57, - SPSF_ADPCM_8kHzStereo = 58, - SPSF_ADPCM_11kHzMono = 59, - SPSF_ADPCM_11kHzStereo = 60, - SPSF_ADPCM_22kHzMono = 61, - SPSF_ADPCM_22kHzStereo = 62, - SPSF_ADPCM_44kHzMono = 63, - SPSF_ADPCM_44kHzStereo = 64, - SPSF_GSM610_8kHzMono = 65, - SPSF_GSM610_11kHzMono = 66, - SPSF_GSM610_22kHzMono = 67, - SPSF_GSM610_44kHzMono = 68, - SPSF_NUM_FORMATS = 69, -}} -pub const SPREG_USER_ROOT: &'static str = "HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Speech"; -pub const SPREG_LOCAL_MACHINE_ROOT: &'static str = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Speech"; -pub const SPCAT_AUDIOOUT: &'static str = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Speech\\AudioOutput"; -pub const SPCAT_AUDIOIN: &'static str = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Speech\\AudioInput"; -pub const SPCAT_VOICES: &'static str = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Speech\\Voices"; -pub const SPCAT_RECOGNIZERS: &'static str = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Speech\\Recognizers"; -pub const SPCAT_APPLEXICONS: &'static str = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Speech\\AppLexicons"; -pub const SPCAT_PHONECONVERTERS: &'static str = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Speech\\PhoneConverters"; -pub const SPCAT_TEXTNORMALIZERS: &'static str = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Speech\\TextNormalizers"; -pub const SPCAT_RECOPROFILES: &'static str = "HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Speech\\RecoProfiles"; -pub const SPMMSYS_AUDIO_IN_TOKEN_ID: &'static str = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Speech\\AudioInput\\TokenEnums\\MMAudioIn\\"; -pub const SPMMSYS_AUDIO_OUT_TOKEN_ID: &'static str = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Speech\\AudioOutput\\TokenEnums\\MMAudioOut\\"; -pub const SPCURRENT_USER_LEXICON_TOKEN_ID: &'static str = "HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Speech\\CurrentUserLexicon"; -pub const SPCURRENT_USER_SHORTCUT_TOKEN_ID: &'static str = "HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Speech\\CurrentUserShortcut"; -pub const SPTOKENVALUE_CLSID: &'static str = "CLSID"; -pub const SPTOKENKEY_FILES: &'static str = "Files"; -pub const SPTOKENKEY_UI: &'static str = "UI"; -pub const SPTOKENKEY_ATTRIBUTES: &'static str = "Attributes"; -pub const SPTOKENKEY_RETAINEDAUDIO: &'static str = "SecondsPerRetainedAudioEvent"; -pub const SPTOKENKEY_AUDIO_LATENCY_WARNING: &'static str = "LatencyWarningThreshold"; -pub const SPTOKENKEY_AUDIO_LATENCY_TRUNCATE: &'static str = "LatencyTruncateThreshold"; -pub const SPTOKENKEY_AUDIO_LATENCY_UPDATE_INTERVAL: &'static str = "LatencyUpdateInterval"; -pub const SPVOICECATEGORY_TTSRATE: &'static str = "DefaultTTSRate"; -pub const SPPROP_RESOURCE_USAGE: &'static str = "ResourceUsage"; -pub const SPPROP_HIGH_CONFIDENCE_THRESHOLD: &'static str = "HighConfidenceThreshold"; -pub const SPPROP_NORMAL_CONFIDENCE_THRESHOLD: &'static str = "NormalConfidenceThreshold"; -pub const SPPROP_LOW_CONFIDENCE_THRESHOLD: &'static str = "LowConfidenceThreshold"; -pub const SPPROP_RESPONSE_SPEED: &'static str = "ResponseSpeed"; -pub const SPPROP_COMPLEX_RESPONSE_SPEED: &'static str = "ComplexResponseSpeed"; -pub const SPPROP_ADAPTATION_ON: &'static str = "AdaptationOn"; -pub const SPPROP_PERSISTED_BACKGROUND_ADAPTATION: &'static str = "PersistedBackgroundAdaptation"; -pub const SPPROP_PERSISTED_LANGUAGE_MODEL_ADAPTATION: &'static str = "PersistedLanguageModelAdaptation"; -pub const SPPROP_UX_IS_LISTENING: &'static str = "UXIsListening"; -pub const SPTOPIC_SPELLING: &'static str = "Spelling"; -pub const SPWILDCARD: &'static str = "..."; -pub const SPDICTATION: &'static str = "*"; -pub const SPINFDICTATION: &'static str = "*+"; -pub const SPREG_SAFE_USER_TOKENS: &'static str = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Speech\\UserTokens"; -pub const SP_LOW_CONFIDENCE: i32 = -1; -pub const SP_NORMAL_CONFIDENCE: i32 = 0; -pub const SP_HIGH_CONFIDENCE: i32 = 1; -pub const DEFAULT_WEIGHT: i32 = 1; -pub const SP_MAX_WORD_LENGTH: i32 = 128; -pub const SP_MAX_PRON_LENGTH: i32 = 384; -pub const SP_EMULATE_RESULT: i32 = 0x40000000; -RIDL!( -interface ISpNotifyCallback(ISpNotifyCallbackVtbl) { - fn NotifyCallback(&mut self, wParam: ::WPARAM, lParam: ::LPARAM) -> ::HRESULT -} -); -pub type SPNOTIFYCALLBACK = unsafe extern "system" fn(wParam: ::WPARAM, lParam: ::LPARAM); -RIDL!( -interface ISpNotifySource(ISpNotifySourceVtbl): IUnknown(IUnknownVtbl) { - fn SetNotifySink(&mut self, pNotifySink: *mut ISpNotifySink) -> ::HRESULT, - fn SetNotifyWindowMessage( - &mut self, hWnd: ::HWND, Msg: ::UINT, wParam: ::WPARAM, lParam: ::LPARAM - ) -> ::HRESULT, - fn SetNotifyCallbackFunction( - &mut self, pfnCallback: SPNOTIFYCALLBACK, wParam: ::WPARAM, lParam: ::LPARAM - ) -> ::HRESULT, - fn SetNotifyCallbackInterface( - &mut self, pSpCallback: *mut ISpNotifyCallback, wParam: ::WPARAM, lParam: ::LPARAM - ) -> ::HRESULT, - fn SetNotifyWin32Event(&mut self) -> ::HRESULT, - fn WaitForNotifyEvent(&mut self, dwMilliseconds: ::DWORD) -> ::HRESULT, - fn GetNotifyEventHandle(&mut self) -> ::HANDLE -} -); -RIDL!( -interface ISpNotifySink(ISpNotifySinkVtbl): IUnknown(IUnknownVtbl) { - fn Notify(&mut self) -> ::HRESULT -} -); -RIDL!( -interface ISpNotifyTranslator(ISpNotifyTranslatorVtbl): ISpNotifySink(ISpNotifySinkVtbl) { - fn InitWindowMessage( - &mut self, hWnd: ::HWND, Msg: ::UINT, wParam: ::WPARAM, lParam: ::LPARAM - ) -> ::HRESULT, - fn InitCallback( - &mut self, pfnCallback: SPNOTIFYCALLBACK, wParam: ::WPARAM, lParam: ::LPARAM - ) -> ::HRESULT, - fn InitSpNotifyCallback( - &mut self, pSpCallback: *mut ISpNotifyCallback, wParam: ::WPARAM, lParam: ::LPARAM - ) -> ::HRESULT, - fn InitWin32Event(&mut self, hEvent: ::HANDLE, fCloseHandleOnRelease: ::BOOL) -> ::HRESULT, - fn Wait(&mut self, dwMilliseconds: ::DWORD) -> ::HRESULT, - fn GetEventHandle(&mut self) -> ::HANDLE -} -); -RIDL!( -interface ISpDataKey(ISpDataKeyVtbl): IUnknown(IUnknownVtbl) { - fn SetData( - &mut self, pszValueName: ::LPCWSTR, cbData: ::ULONG, pData: *const ::BYTE - ) -> ::HRESULT, - fn GetData( - &mut self, pszValueName: ::LPCWSTR, pcbData: *mut ::ULONG, pData: *mut ::BYTE - ) -> ::HRESULT, - fn SetStringValue(&mut self, pszValueName: ::LPCWSTR, pszValue: ::LPCWSTR) -> ::HRESULT, - fn GetStringValue(&mut self, pszValueName: ::LPCWSTR, ppszValue: *mut ::LPWSTR) -> ::HRESULT, - fn SetDWORD(&mut self, pszValueName: ::LPCWSTR, dwValue: ::DWORD) -> ::HRESULT, - fn GetDWORD(&mut self, pszValueName: ::LPCWSTR, pdwValue: *mut ::DWORD) -> ::HRESULT, - fn OpenKey(&mut self, pszSubKeyName: ::LPCWSTR, ppSubKey: *mut *mut ISpDataKey) -> ::HRESULT, - fn CreateKey(&mut self, pszSubKey: ::LPCWSTR, ppSubKey: *mut *mut ISpDataKey) -> ::HRESULT, - fn DeleteKey(&mut self, pszSubKey: ::LPCWSTR) -> ::HRESULT, - fn DeleteValue(&mut self, pszValueName: ::LPCWSTR) -> ::HRESULT, - fn EnumKeys(&mut self, Index: ::ULONG, ppszSubKeyName: *mut ::LPWSTR) -> ::HRESULT, - fn EnumValues(&mut self, Index: ::ULONG, ppszValueName: *mut ::LPWSTR) -> ::HRESULT -} -); -RIDL!( -interface ISpRegDataKey(ISpRegDataKeyVtbl): ISpDataKey(ISpDataKeyVtbl) { - fn SetKey(&mut self, hkey: ::HKEY, fReadOnly: ::BOOL) -> ::HRESULT -} -); -RIDL!( -interface ISpObjectTokenCategory(ISpObjectTokenCategoryVtbl): ISpDataKey(ISpDataKeyVtbl) { - fn SetId(&mut self, pszCategoryId: ::LPCWSTR, fCreateIfNotExist: ::BOOL) -> ::HRESULT, - fn GetId(&mut self, ppszCoMemCategoryId: *mut ::LPWSTR) -> ::HRESULT, - fn GetDataKey( - &mut self, spdkl: SPDATAKEYLOCATION, pppDataKey: *mut *mut ISpDataKey - ) -> ::HRESULT, - fn EnumTokens( - &mut self, pzsReqAttribs: ::LPCWSTR, pszOptAttribs: ::LPCWSTR, - ppEnum: *mut *mut IEnumSpObjectTokens - ) -> ::HRESULT, - fn SetDefaultTokenId(&mut self, pszTokenId: ::LPCWSTR) -> ::HRESULT, - fn GetDefaultTokenId(&mut self, ppszCoMemTokenId: *mut ::LPWSTR) -> ::HRESULT -} -); -RIDL!( -interface ISpObjectToken(ISpObjectTokenVtbl): ISpDataKey(ISpDataKeyVtbl) { - fn SetId( - &mut self, pszCategoryId: ::LPCWSTR, pszTokenId: ::LPCWSTR, fCreateIfNotExist: ::BOOL - ) -> ::HRESULT, - fn GetId(&mut self, ppszCoMemTokenId: *mut ::LPWSTR) -> ::HRESULT, - fn GetCategory(&mut self, ppTokenCategory: *mut *mut ISpObjectTokenCategory) -> ::HRESULT, - fn CreateInstance( - &mut self, pUnkOuter: *mut ::IUnknown, dwClsContext: ::DWORD, riid: ::REFIID, - ppvObject: *mut *mut ::c_void - ) -> ::HRESULT, - fn GetStorageFileName( - &mut self, clsidCaller: ::REFCLSID, pszValueName: ::LPCWSTR, - pszFileNameSpecifier: ::LPCWSTR, nFolder: ::ULONG, ppszFilePath: *mut ::LPWSTR - ) -> ::HRESULT, - fn RemoveStorageFileName(&mut self, pszKeyName: ::LPCWSTR, fDeleteFile: ::BOOL) -> ::HRESULT, - fn Remove(&mut self, pclsidCaller: *const ::CLSID) -> ::HRESULT, - fn IsUISupported( - &mut self, pszTypeOfUI: ::LPCWSTR, pvExtraData: *mut ::c_void, cbExtraData: ::ULONG, - punkObject: *mut ::IUnknown, pfSupported: *mut ::BOOL - ) -> ::HRESULT, - fn DisplayUI( - &mut self, hwndParent: ::HWND, pszTitle: ::LPCWSTR, pszTypeOfUI: ::LPCWSTR, - pvExtraData: *mut ::c_void, cbExtraData: ::ULONG, punkObject: *mut ::IUnknown - ) -> ::HRESULT, - fn MatchesAttributes(&mut self, pszAttributes: ::LPCWSTR, pfMatches: *mut ::BOOL) -> ::HRESULT -} -); -RIDL!( -interface ISpObjectTokenInit(ISpObjectTokenInitVtbl): ISpObjectToken(ISpObjectTokenVtbl) { - fn InitFromDataKey( - &mut self, pszCategoryId: ::LPCWSTR, pszTokenId: ::LPCWSTR, pDataKey: *mut ISpDataKey - ) -> ::HRESULT -} -); -RIDL!( -interface IEnumSpObjectTokens(IEnumSpObjectTokensVtbl): IUnknown(IUnknownVtbl) { - fn Next( - &mut self, celt: ::ULONG, pelt: *mut *mut ISpObjectToken, pceltFetched: *mut ::ULONG - ) -> ::HRESULT, - fn Skip(&mut self, celt: ::ULONG) -> ::HRESULT, - fn Reset(&mut self) -> ::HRESULT, - fn Clone(&mut self, ppEnum: *mut *mut IEnumSpObjectTokens) -> ::HRESULT, - fn Item(&mut self, Index: ::ULONG, ppToken: *mut *mut ISpObjectToken) -> ::HRESULT, - fn GetCount(&mut self, pCount: *mut ::ULONG) -> ::HRESULT -} -); -RIDL!( -interface ISpObjectWithToken(ISpObjectWithTokenVtbl): IUnknown(IUnknownVtbl) { - fn SetObjectToken(&mut self, pToken: *mut ISpObjectToken) -> ::HRESULT, - fn GetObjectToken(&mut self, ppToken: *mut *mut ISpObjectToken) -> ::HRESULT -} -); -RIDL!( -interface ISpResourceManager(ISpResourceManagerVtbl): IServiceProvider(IServiceProviderVtbl) { - fn SetObject(&mut self, guidServiceId: ::REFGUID, pUnkObject: *mut ::IUnknown) -> ::HRESULT, - fn GetObject( - &mut self, guidServiceId: ::REFGUID, ObjectCLSID: ::REFCLSID, ObjectIID: ::REFIID, - fReleaseWhenLastExternalRefReleased: ::BOOL, ppObject: *mut *mut ::c_void - ) -> ::HRESULT -} -); -ENUM!{enum SPEVENTLPARAMTYPE { - SPET_LPARAM_IS_UNDEFINED = 0, - SPET_LPARAM_IS_TOKEN, - SPET_LPARAM_IS_OBJECT, - SPET_LPARAM_IS_POINTER, - SPET_LPARAM_IS_STRING, -}} -ENUM!{enum SPEVENTENUM { - SPEI_UNDEFINED = 0, - SPEI_START_INPUT_STREAM = 1, - SPEI_END_INPUT_STREAM = 2, - SPEI_VOICE_CHANGE = 3, - SPEI_TTS_BOOKMARK = 4, - SPEI_WORD_BOUNDARY = 5, - SPEI_PHONEME = 6, - SPEI_SENTENCE_BOUNDARY = 7, - SPEI_VISEME = 8, - SPEI_TTS_AUDIO_LEVEL = 9, - SPEI_TTS_PRIVATE = 15, - SPEI_END_SR_STREAM = 34, - SPEI_SOUND_START = 35, - SPEI_SOUND_END = 36, - SPEI_PHRASE_START = 37, - SPEI_RECOGNITION = 38, - SPEI_HYPOTHESIS = 39, - SPEI_SR_BOOKMARK = 40, - SPEI_PROPERTY_NUM_CHANGE = 41, - SPEI_PROPERTY_STRING_CHANGE = 42, - SPEI_FALSE_RECOGNITION = 43, - SPEI_INTERFERENCE = 44, - SPEI_REQUEST_UI = 45, - SPEI_RECO_STATE_CHANGE = 46, - SPEI_ADAPTATION = 47, - SPEI_START_SR_STREAM = 48, - SPEI_RECO_OTHER_CONTEXT = 49, - SPEI_SR_AUDIO_LEVEL = 50, - SPEI_SR_RETAINEDAUDIO = 51, - SPEI_SR_PRIVATE = 52, - SPEI_ACTIVE_CATEGORY_CHANGED = 53, - SPEI_RESERVED5 = 54, - SPEI_RESERVED6 = 55, - SPEI_RESERVED1 = 30, - SPEI_RESERVED2 = 33, - SPEI_RESERVED3 = 63, -}} -pub const SPEI_MIN_TTS: SPEVENTENUM = SPEI_START_INPUT_STREAM; -pub const SPEI_MAX_TTS: SPEVENTENUM = SPEI_TTS_PRIVATE; -pub const SPEI_MIN_SR: SPEVENTENUM = SPEI_END_SR_STREAM; -pub const SPEI_MAX_SR: SPEVENTENUM = SPEI_RESERVED6; -pub const SPFEI_FLAGCHECK: u64 = (1 << SPEI_RESERVED1.0 as u64) | (1 << SPEI_RESERVED2.0 as u64); -pub const SPFEI_ALL_TTS_EVENTS: u64 = 0x000000000000FFFE | SPFEI_FLAGCHECK; -pub const SPFEI_ALL_SR_EVENTS: u64 = 0x003FFFFC00000000 | SPFEI_FLAGCHECK; -pub const SPFEI_ALL_EVENTS: u64 = 0xEFFFFFFFFFFFFFFF; -#[inline] -pub fn SPFEI(SPEI_ord: u64) -> u64 { - (1 << SPEI_ord) | SPFEI_FLAGCHECK -} -STRUCT!{struct SPEVENT { - eEventId: ::WORD, - elParamType: ::WORD, - ulStreamNum: ::ULONG, - ullAudioStreamOffset: ::ULONGLONG, - wParam: ::WPARAM, - lParam: ::LPARAM, -}} -STRUCT!{struct SPSERIALIZEDEVENT { - eEventId: ::WORD, - elParamType: ::WORD, - ulStreamNum: ::ULONG, - ullAudioStreamOffset: ::ULONGLONG, - SerializedwParam: ::ULONG, - SerializedlParam: ::LONG, -}} -STRUCT!{struct SPSERIALIZEDEVENT64 { - eEventId: ::WORD, - elParamType: ::WORD, - ulStreamNum: ::ULONG, - ullAudioStreamOffset: ::ULONGLONG, - SerializedwParam: ::ULONGLONG, - SerializedlParam: ::LONGLONG, -}} -STRUCT!{struct SPEVENTEX { - eEventId: ::WORD, - elParamType: ::WORD, - ulStreamNum: ::ULONG, - ullAudioStreamOffset: ::ULONGLONG, - wParam: ::WPARAM, - lParam: ::LPARAM, - ullAudioTimeOffset: ::ULONGLONG, -}} -ENUM!{enum SPINTERFERENCE { - SPINTERFERENCE_NONE = 0, - SPINTERFERENCE_NOISE = 1, - SPINTERFERENCE_NOSIGNAL = 2, - SPINTERFERENCE_TOOLOUD = 3, - SPINTERFERENCE_TOOQUIET = 4, - SPINTERFERENCE_TOOFAST = 5, - SPINTERFERENCE_TOOSLOW = 6, - SPINTERFERENCE_LATENCY_WARNING = 7, - SPINTERFERENCE_LATENCY_TRUNCATE_BEGIN = 8, - SPINTERFERENCE_LATENCY_TRUNCATE_END = 9, -}} -FLAGS!{enum SPENDSRSTREAMFLAGS { - SPESF_NONE = 0, - SPESF_STREAM_RELEASED = 1 << 0, - SPESF_EMULATED = 1 << 1, -}} -FLAGS!{enum SPVFEATURE { - SPVFEATURE_STRESSED = 1 << 0, - SPVFEATURE_EMPHASIS = 1 << 1, -}} -ENUM!{enum SPVISEMES { - SP_VISEME_0 = 0, - SP_VISEME_1, - SP_VISEME_2, - SP_VISEME_3, - SP_VISEME_4, - SP_VISEME_5, - SP_VISEME_6, - SP_VISEME_7, - SP_VISEME_8, - SP_VISEME_9, - SP_VISEME_10, - SP_VISEME_11, - SP_VISEME_12, - SP_VISEME_13, - SP_VISEME_14, - SP_VISEME_15, - SP_VISEME_16, - SP_VISEME_17, - SP_VISEME_18, - SP_VISEME_19, - SP_VISEME_20, - SP_VISEME_21, -}} -STRUCT!{struct SPEVENTSOURCEINFO { - ullEventInterest: ::ULONGLONG, - ullQueuedInterest: ::ULONGLONG, - ulCount: ::ULONG, -}} -RIDL!( -interface ISpEventSource(ISpEventSourceVtbl): ISpNotifySource(ISpNotifySourceVtbl) { - fn SetInterest( - &mut self, ullEventInterest: ::ULONGLONG, ullQueuedInterest: ::ULONGLONG - ) -> ::HRESULT, - fn GetEvents( - &mut self, ulCount: ::ULONG, pEventArray: *mut SPEVENT, pulFetched: *mut ::ULONG - ) -> ::HRESULT, - fn GetInfo(&mut self, pInfo: *mut SPEVENTSOURCEINFO) -> ::HRESULT -} -); -RIDL!( -interface ISpEventSource2(ISpEventSource2Vtbl): ISpEventSource(ISpEventSourceVtbl) { - fn GetEventsEx( - &mut self, ulCount: ::ULONG, pEventArray: *mut SPEVENTEX, pulFetched: *mut ::ULONG - ) -> ::HRESULT -} -); -RIDL!( -interface ISpEventSink(ISpEventSinkVtbl): IUnknown(IUnknownVtbl) { - fn AddEvents(&mut self, pEventArray: *const SPEVENT, ulCount: ::ULONG) -> ::HRESULT, - fn GetEventInterest(&mut self, pullEventInterest: *mut ::ULONGLONG) -> ::HRESULT -} -); -RIDL!( -interface ISpStreamFormat(ISpStreamFormatVtbl): IStream(IStreamVtbl) { - fn GetFormat( - &mut self, pguidFormatId: *mut ::GUID, ppCoMemWaveFormatEx: *mut *mut ::WAVEFORMATEX - ) -> ::HRESULT -} -); -ENUM!{enum SPFILEMODE { - SPFM_OPEN_READONLY = 0, - SPFM_OPEN_READWRITE = 1, - SPFM_CREATE = 2, - SPFM_CREATE_ALWAYS = 3, - SPFM_NUM_MODES = 4, -}} -RIDL!( -interface ISpStream(ISpStreamVtbl): ISpStreamFormat(ISpStreamFormatVtbl) { - fn SetBaseStream( - &mut self, pStream: *mut ::IStream, rguidFormat: ::REFGUID, - pWaveFormatEx: *const ::WAVEFORMATEX - ) -> ::HRESULT, - fn GetBaseStream(&mut self, ppStream: *mut *mut ::IStream) -> ::HRESULT, - fn BindToFile( - &mut self, pszFileName: ::LPCWSTR, eMode: SPFILEMODE, pFormatId: *const ::GUID, - pWaveFormatEx: *const ::WAVEFORMATEX, ullEventInterest: ::ULONGLONG - ) -> ::HRESULT, - fn Close(&mut self) -> ::HRESULT -} -); -RIDL!( -interface ISpStreamFormatConverter(ISpStreamFormatConverterVtbl) - : ISpStreamFormat(ISpStreamFormatVtbl) { - fn SetBaseStream( - &mut self, pStream: *mut ISpStreamFormat, fSetFormatToBaseStreamFormat: ::BOOL, - fWriteToBaseStream: ::BOOL - ) -> ::HRESULT, - fn GetBaseStream(&mut self, ppStream: *mut *mut ISpStreamFormat) -> ::HRESULT, - fn SetFormat( - &mut self, rguidFormatIdOfConvertedStream: ::REFGUID, - pWaveFormatExOfConvertedStream: *const ::WAVEFORMATEX - ) -> ::HRESULT, - fn ResetSeekPosition(&mut self) -> ::HRESULT, - fn ScaleConvertedToBaseOffset( - &mut self, ullOffsetConvertedStream: ::ULONGLONG, pullOffsetBaseStream: *mut ::ULONGLONG - ) -> ::HRESULT, - fn ScaleBaseToConvertedOffset( - &mut self, ullOffsetBaseStream: ::ULONGLONG, pullOffsetConvertedStream: *mut ::ULONGLONG - ) -> ::HRESULT -} -); -ENUM!{enum SPAUDIOSTATE { - SPAS_CLOSED = 0, - SPAS_STOP = 1, - SPAS_PAUSE = 2, - SPAS_RUN = 3, -}} -STRUCT!{struct SPAUDIOSTATUS { - cbFreeBuffSpace: ::LONG, - cbNonBlockingIO: ::ULONG, - State: SPAUDIOSTATE, - CurSeekPos: ::ULONGLONG, - CurDevicePos: ::ULONGLONG, - dwAudioLevel: ::DWORD, - dwReserved2: ::DWORD, -}} -STRUCT!{struct SPAUDIOBUFFERINFO { - ulMsMinNotification: ::ULONG, - ulMsBufferSize: ::ULONG, - ulMsEventBias: ::ULONG, -}} -RIDL!( -interface ISpAudio(ISpAudioVtbl): ISpStreamFormat(ISpStreamFormatVtbl) { - fn SetState(&mut self, NewState: SPAUDIOSTATE, ullReserved: ::ULONGLONG) -> ::HRESULT, - fn SetFormat( - &mut self, rguidFmtId: ::REFGUID, pWaveFormatEx: *const ::WAVEFORMATEX - ) -> ::HRESULT, - fn GetStatus(&mut self, pStatus: *mut SPAUDIOSTATUS) -> ::HRESULT, - fn SetBufferInfo(&mut self, pBuffInfo: *const SPAUDIOBUFFERINFO) -> ::HRESULT, - fn GetBufferInfo(&mut self, pBuffInfo: *mut SPAUDIOBUFFERINFO) -> ::HRESULT, - fn GetDefaultFormat( - &mut self, pFormatId: *mut ::GUID, ppCoMemWaveFormatEx: *mut *mut ::WAVEFORMATEX - ) -> ::HRESULT, - fn EventHandle(&mut self) -> ::HANDLE, - fn GetVolumeLevel(&mut self, pLevel: *mut ::ULONG) -> ::HRESULT, - fn SetVolumeLevel(&mut self, Level: ::ULONG) -> ::HRESULT, - fn GetBufferNotifySize(&mut self, pcbSize: *mut ::ULONG) -> ::HRESULT, - fn SetBufferNotifySize(&mut self, cbSize: ::ULONG) -> ::HRESULT -} -); -RIDL!( -interface ISpMMSysAudio(ISpMMSysAudioVtbl): ISpAudio(ISpAudioVtbl) { - fn GetDeviceId(&mut self, puDeviceId: *mut ::UINT) -> ::HRESULT, - fn SetDeviceId(&mut self, uDeviceId: ::UINT) -> ::HRESULT, - fn GetMMHandle(&mut self, pHandle: *mut *mut ::c_void) -> ::HRESULT, - fn GetLineId(&mut self, puLineId: *mut ::UINT) -> ::HRESULT, - fn SetLineId(&mut self, uLineId: ::UINT) -> ::HRESULT -} -); -RIDL!( -interface ISpTranscript(ISpTranscriptVtbl): IUnknown(IUnknownVtbl) { - fn GetTranscript(&mut self, ppszTranscript: *mut ::LPWSTR) -> ::HRESULT, - fn AppendTranscript(&mut self, pszTranscript: ::LPCWSTR) -> ::HRESULT -} -); -FLAGS!{enum SPDISPLYATTRIBUTES { - SPAF_ONE_TRAILING_SPACE = 0x2, - SPAF_TWO_TRAILING_SPACES = 0x4, - SPAF_CONSUME_LEADING_SPACES = 0x8, - SPAF_BUFFER_POSITION = 0x10, - SPAF_ALL = 0x1f, - SPAF_USER_SPECIFIED = 0x80, -}} -pub type SPPHONEID = ::WCHAR; -pub type PSPPHONEID = ::LPWSTR; -pub type PCSPPHONEID = ::LPCWSTR; -STRUCT!{struct SPPHRASEELEMENT { - ulAudioTimeOffset: ::ULONG, - ulAudioSizeTime: ::ULONG, - ulAudioStreamOffset: ::ULONG, - ulAudioSizeBytes: ::ULONG, - ulRetainedStreamOffset: ::ULONG, - ulRetainedSizeBytes: ::ULONG, - pszDisplayText: ::LPCWSTR, - pszLexicalForm: ::LPCWSTR, - pszPronunciation: *const SPPHONEID, - bDisplayAttributes: ::BYTE, - RequiredConfidence: ::c_char, - ActualConfidence: ::c_char, - Reserved: ::BYTE, - SREngineConfidence: ::c_float, -}} -STRUCT!{struct SPPHRASERULE { - pszName: ::LPCWSTR, - ulId: ::ULONG, - ulFirstElement: ::ULONG, - ulCountOfElements: ::ULONG, - pNextSibling: *const SPPHRASERULE, - pFirstChild: *const SPPHRASERULE, - SREngineConfidence: ::c_float, - Confidence: ::c_char, -}} -ENUM!{enum SPPHRASEPROPERTYUNIONTYPE { - SPPPUT_UNUSED = 0, - SPPPUT_ARRAY_INDEX, -}} -STRUCT!{struct SPPHRASEPROPERTY { - pszName: ::LPCWSTR, - bType: ::BYTE, - bReserved: ::BYTE, - usArrayIndex: u16, - pszValue: ::LPCWSTR, - vValue: ::VARIANT, - ulFirstElement: ::ULONG, - ulCountOfElements: ::ULONG, - pNextSibling: *const SPPHRASEPROPERTY, - pFirstChild: *const SPPHRASEPROPERTY, - SREngineConfidence: ::c_float, - Confidence: ::c_char, -}} -UNION!(SPPHRASEPROPERTY, bType, ulId, ulId_mut, ::ULONG); -STRUCT!{struct SPPHRASEREPLACEMENT { - bDisplayAttributes: ::BYTE, - pszReplacementText: ::LPCWSTR, - ulFirstElement: ::ULONG, - ulCountOfElements: ::ULONG, -}} -STRUCT!{struct SPSEMANTICERRORINFO { - ulLineNumber: ::ULONG, - pszScriptLine: ::LPWSTR, - pszSource: ::LPWSTR, - pszDescription: ::LPWSTR, - hrResultCode: ::HRESULT, -}} -ENUM!{enum SPSEMANTICFORMAT { - SPSMF_SAPI_PROPERTIES = 0, - SPSMF_SRGS_SEMANTICINTERPRETATION_MS = 1, - SPSMF_SRGS_SAPIPROPERTIES = 2, - SPSMF_UPS = 4, - SPSMF_SRGS_SEMANTICINTERPRETATION_W3C = 8, -}} -STRUCT!{struct SPPHRASE_50 { - cbSize: ::ULONG, - LangID: ::WORD, - wHomophoneGroupId: ::WORD, - ullGrammarID: ::ULONGLONG, - ftStartTime: ::ULONGLONG, - ullAudioStreamPosition: ::ULONGLONG, - ulAudioSizeBytes: ::ULONG, - ulRetainedSizeBytes: ::ULONG, - ulAudioSizeTime: ::ULONG, - Rule: ::SPPHRASERULE, - pProperties: *const ::SPPHRASEPROPERTY, - pElements: *const ::SPPHRASEELEMENT, - cReplacements: ::ULONG, - pReplacements: *const ::SPPHRASEREPLACEMENT, - SREngineID: ::GUID, - ulSREnginePrivateDataSize: ::ULONG, - pSREnginePrivateData: *const ::BYTE, -}} -STRUCT!{struct SPPHRASE_53 { - cbSize: ::ULONG, - LangID: ::WORD, - wHomophoneGroupId: ::WORD, - ullGrammarID: ::ULONGLONG, - ftStartTime: ::ULONGLONG, - ullAudioStreamPosition: ::ULONGLONG, - ulAudioSizeBytes: ::ULONG, - ulRetainedSizeBytes: ::ULONG, - ulAudioSizeTime: ::ULONG, - Rule: ::SPPHRASERULE, - pProperties: *const ::SPPHRASEPROPERTY, - pElements: *const ::SPPHRASEELEMENT, - cReplacements: ::ULONG, - pReplacements: *const ::SPPHRASEREPLACEMENT, - SREngineID: ::GUID, - ulSREnginePrivateDataSize: ::ULONG, - pSREnginePrivateData: *const ::BYTE, - pSML: ::LPWSTR, - pSemanticErrorInfo: *mut SPSEMANTICERRORINFO, -}} -STRUCT!{struct SPPHRASE { - cbSize: ::ULONG, - LangID: ::WORD, - wHomophoneGroupId: ::WORD, - ullGrammarID: ::ULONGLONG, - ftStartTime: ::ULONGLONG, - ullAudioStreamPosition: ::ULONGLONG, - ulAudioSizeBytes: ::ULONG, - ulRetainedSizeBytes: ::ULONG, - ulAudioSizeTime: ::ULONG, - Rule: ::SPPHRASERULE, - pProperties: *const ::SPPHRASEPROPERTY, - pElements: *const ::SPPHRASEELEMENT, - cReplacements: ::ULONG, - pReplacements: *const ::SPPHRASEREPLACEMENT, - SREngineID: ::GUID, - ulSREnginePrivateDataSize: ::ULONG, - pSREnginePrivateData: *const ::BYTE, - pSML: ::LPWSTR, - pSemanticErrorInfo: *mut SPSEMANTICERRORINFO, - SemanticTagFormat: SPSEMANTICFORMAT, -}} -STRUCT!{struct SPSERIALIZEDPHRASE { - ulSerializedSize: ::ULONG, -}} -STRUCT!{struct SPRULE { - pszRuleName: ::LPCWSTR, - ulRuleId: ::ULONG, - dwAttributes: ::DWORD, -}} -FLAGS!{enum SPVALUETYPE { - SPDF_PROPERTY = 0x1, - SPDF_REPLACEMENT = 0x2, - SPDF_RULE = 0x4, - SPDF_DISPLAYTEXT = 0x8, - SPDF_LEXICALFORM = 0x10, - SPDF_PRONUNCIATION = 0x20, - SPDF_AUDIO = 0x40, - SPDF_ALTERNATES = 0x80, - SPDF_ALL = 0xff, -}} -STRUCT!{struct SPBINARYGRAMMAR { - ulTotalSerializedSize: ::ULONG, -}} -ENUM!{enum SPPHRASERNG { - SPPR_ALL_ELEMENTS = -1i32 as u32, -}} -pub const SP_GETWHOLEPHRASE: SPPHRASERNG = SPPR_ALL_ELEMENTS; -pub const SPRR_ALL_ELEMENTS: SPPHRASERNG = SPPR_ALL_ELEMENTS; -DECLARE_HANDLE!(SPSTATEHANDLE, SPSTATEHANDLE__); -FLAGS!{enum SPRECOEVENTFLAGS { - SPREF_AutoPause = 1 << 0, - SPREF_Emulated = 1 << 1, - SPREF_SMLTimeout = 1 << 2, - SPREF_ExtendableParse = 1 << 3, - SPREF_ReSent = 1 << 4, - SPREF_Hypothesis = 1 << 5, - SPREF_FalseRecognition = 1 << 6, -}} -ENUM!{enum SPPARTOFSPEECH { - SPPS_NotOverriden = -1i32 as u32, - SPPS_Unknown = 0, - SPPS_Noun = 0x1000, - SPPS_Verb = 0x2000, - SPPS_Modifier = 0x3000, - SPPS_Function = 0x4000, - SPPS_Interjection = 0x5000, - SPPS_Noncontent = 0x6000, - SPPS_LMA = 0x7000, - SPPS_SuppressWord = 0xf000, -}} -FLAGS!{enum SPLEXICONTYPE { - eLEXTYPE_USER = 1 << 0, - eLEXTYPE_APP = 1 << 1, - eLEXTYPE_VENDORLEXICON = 1 << 2, - eLEXTYPE_LETTERTOSOUND = 1 << 3, - eLEXTYPE_MORPHOLOGY = 1 << 4, - eLEXTYPE_RESERVED4 = 1 << 5, - eLEXTYPE_USER_SHORTCUT = 1 << 6, - eLEXTYPE_RESERVED6 = 1 << 7, - eLEXTYPE_RESERVED7 = 1 << 8, - eLEXTYPE_RESERVED8 = 1 << 9, - eLEXTYPE_RESERVED9 = 1 << 10, - eLEXTYPE_RESERVED10 = 1 << 11, - eLEXTYPE_PRIVATE1 = 1 << 12, - eLEXTYPE_PRIVATE2 = 1 << 13, - eLEXTYPE_PRIVATE3 = 1 << 14, - eLEXTYPE_PRIVATE4 = 1 << 15, - eLEXTYPE_PRIVATE5 = 1 << 16, - eLEXTYPE_PRIVATE6 = 1 << 17, - eLEXTYPE_PRIVATE7 = 1 << 18, - eLEXTYPE_PRIVATE8 = 1 << 19, - eLEXTYPE_PRIVATE9 = 1 << 20, - eLEXTYPE_PRIVATE10 = 1 << 21, - eLEXTYPE_PRIVATE11 = 1 << 22, - eLEXTYPE_PRIVATE12 = 1 << 23, - eLEXTYPE_PRIVATE13 = 1 << 24, - eLEXTYPE_PRIVATE14 = 1 << 25, - eLEXTYPE_PRIVATE15 = 1 << 26, - eLEXTYPE_PRIVATE16 = 1 << 27, - eLEXTYPE_PRIVATE17 = 1 << 28, - eLEXTYPE_PRIVATE18 = 1 << 29, - eLEXTYPE_PRIVATE19 = 1 << 30, - eLEXTYPE_PRIVATE20 = 1 << 31, -}} -FLAGS!{enum SPWORDTYPE { - eWORDTYPE_ADDED = 1 << 0, - eWORDTYPE_DELETED = 1 << 1, -}} -FLAGS!{enum SPPRONUNCIATIONFLAGS { - ePRONFLAG_USED = 1 << 0, -}} -STRUCT!{struct SPWORDPRONUNCIATION { - pNextWordPronunciation: *mut SPWORDPRONUNCIATION, - eLexiconType: SPLEXICONTYPE, - LangID: ::WORD, - wPronunciationFlags: ::WORD, - ePartOfSpeech: SPPARTOFSPEECH, - szPronunciation: [SPPHONEID; 1], -}} -STRUCT!{struct SPWORDPRONUNCIATIONLIST { - ulSize: ::ULONG, - pvBuffer: *mut ::BYTE, - pFirstWordPronunciation: *mut SPWORDPRONUNCIATION, -}} -STRUCT!{struct SPWORD { - pNextWord: *mut SPWORD, - LangID: ::WORD, - wReserved: ::WORD, - eWordType: SPWORDTYPE, - pszWord: ::LPWSTR, - pFirstWordPronunciation: *mut SPWORDPRONUNCIATION, -}} -STRUCT!{struct SPWORDLIST { - ulSize: ::ULONG, - pvBuffer: *mut ::BYTE, - pFirstWord: *mut SPWORD, -}} -RIDL!( -interface ISpLexicon(ISpLexiconVtbl): IUnknown(IUnknownVtbl) { - fn GetPronunciations( - &mut self, pszWord: ::LPCWSTR, LangID: ::WORD, dwFlags: ::DWORD, - pWordPronunciationList: *mut SPWORDPRONUNCIATIONLIST - ) -> ::HRESULT, - fn AddPronunciation( - &mut self, pszWord: ::LPCWSTR, LangID: ::WORD, ePartOfSpeech: SPPARTOFSPEECH, - pszPronunciation: PCSPPHONEID - ) -> ::HRESULT, - fn RemovePronunciation( - &mut self, pszWord: ::LPCWSTR, LangID: ::WORD, ePartOfSpeech: SPPARTOFSPEECH, - pszPronunciation: PCSPPHONEID - ) -> ::HRESULT, - fn GetGeneration(&mut self, pdwGeneration: *mut ::DWORD) -> ::HRESULT, - fn GetGenerationChange( - &mut self, dwFlags: ::DWORD, pdwGeneration: *mut ::DWORD, pWordList: *mut SPWORDLIST - ) -> ::HRESULT, - fn GetWords( - &mut self, dwFlags: ::DWORD, pdwGeneration: *mut ::DWORD, pdwCookie: *mut ::DWORD, - pWordList: *mut SPWORDLIST - ) -> ::HRESULT -} -); -RIDL!( -interface ISpContainerLexicon(ISpContainerLexiconVtbl): ISpLexicon(ISpLexiconVtbl) { - fn AddLexicon(&mut self, pAddLexicon: *mut ISpLexicon, dwFlags: ::DWORD) -> ::HRESULT -} -); -ENUM!{enum SPSHORTCUTTYPE { - SPSHT_NotOverriden = -1i32 as u32, - SPSHT_Unknown = 0, - SPSHT_EMAIL = 0x1000, - SPSHT_OTHER = 0x2000, - SPPS_RESERVED1 = 0x3000, - SPPS_RESERVED2 = 0x4000, - SPPS_RESERVED3 = 0x5000, - SPPS_RESERVED4 = 0xf000, -}} -STRUCT!{struct SPSHORTCUTPAIR { - pNextSHORTCUTPAIR: *mut SPSHORTCUTPAIR, - LangID: ::WORD, - shType: SPSHORTCUTTYPE, - pszDisplay: ::LPWSTR, - pszSpoken: ::LPWSTR, -}} -STRUCT!{struct SPSHORTCUTPAIRLIST { - ulSize: ::ULONG, - pvBuffer: *mut ::BYTE, - pFirstShortcutPair: *mut SPSHORTCUTPAIR, -}} -RIDL!( -interface ISpShortcut(ISpShortcutVtbl): IUnknown(IUnknownVtbl) { - fn AddShortcut( - &mut self, pszDisplay: ::LPCWSTR, LangID: ::WORD, pszSpoken: ::LPCWSTR, - shType: SPSHORTCUTTYPE - ) -> ::HRESULT, - fn RemoveShortcut( - &mut self, pszDisplay: ::LPCWSTR, LangID: ::WORD, pszSpoken: ::LPCWSTR, - shType: SPSHORTCUTTYPE - ) -> ::HRESULT, - fn GetShortcuts( - &mut self, LangId: ::WORD, pShortcutpairList: *mut SPSHORTCUTPAIRLIST - ) -> ::HRESULT, - fn GetGeneration(&mut self, pdwGeneration: *mut ::DWORD) -> ::HRESULT, - fn GetWordsFromGenerationChange( - &mut self, pdwGeneration: *mut ::DWORD, pWordList: *mut SPWORDLIST - ) -> ::HRESULT, - fn GetWords( - &mut self, pdwGeneration: *mut ::DWORD, pdwCookie: *mut ::DWORD, pWordList: *mut SPWORDLIST - ) -> ::HRESULT, - fn GetShortcutsForGeneration( - &mut self, pdwGeneration: *mut ::DWORD, pdwCookie: *mut ::DWORD, - pShortcutpairList: *mut SPSHORTCUTPAIRLIST - ) -> ::HRESULT, - fn GetGenerationChange( - &mut self, pdwGeneration: *mut ::DWORD, pShortcutpairList: *mut SPSHORTCUTPAIRLIST - ) -> ::HRESULT -} -); -RIDL!( -interface ISpPhoneConverter(ISpPhoneConverterVtbl): ISpObjectWithToken(ISpObjectWithTokenVtbl) { - fn PhoneToId(&mut self, pszPhone: ::LPCWSTR, pId: *mut SPPHONEID) -> ::HRESULT, - fn IdToPhone(&mut self, pId: PCSPPHONEID, pszPhone: *mut ::WCHAR) -> ::HRESULT -} -); -RIDL!( -interface ISpPhoneticAlphabetConverter(ISpPhoneticAlphabetConverterVtbl): IUnknown(IUnknownVtbl) { - fn GetLangId(&mut self, pLangID: *mut ::WORD) -> ::HRESULT, - fn SetLangId(&mut self, LangID: *mut ::WORD) -> ::HRESULT, - fn SAPI2UPS( - &mut self, pszSAPIId: *const SPPHONEID, pszUPSId: *mut SPPHONEID, cMaxLength: ::DWORD - ) -> ::HRESULT, - fn UPS2SAPI( - &mut self, pszUPSId: *const SPPHONEID, pszSAPIId: *mut SPPHONEID, cMaxLength: ::DWORD - ) -> ::HRESULT, - fn GetMaxConvertLength( - &mut self, cSrcLength: ::DWORD, bSAPI2UPS: ::BOOL, pcMaxDestLength: *mut ::DWORD - ) -> ::HRESULT -} -); -RIDL!( -interface ISpPhoneticAlphabetSelection(ISpPhoneticAlphabetSelectionVtbl): IUnknown(IUnknownVtbl) { - fn IsAlphabetUPS(&mut self, pfIsUPS: *mut ::BOOL) -> ::HRESULT, - fn SetAlphabetToUPS(&mut self, fForceUPS: ::BOOL) -> ::HRESULT -} -); -STRUCT!{struct SPVPITCH { - MiddleAdj: ::c_long, - RangeAdj: ::c_long, -}} -ENUM!{enum SPVACTIONS { - SPVA_Speak = 0, - SPVA_Silence, - SPVA_Pronounce, - SPVA_Bookmark, - SPVA_SpellOut, - SPVA_Section, - SPVA_ParseUnknownTag, -}} -STRUCT!{struct SPVCONTEXT { - pCategory: ::LPCWSTR, - pBefore: ::LPCWSTR, - pAfter: ::LPCWSTR, -}} -STRUCT!{struct SPVSTATE { - eAction: SPVACTIONS, - LangID: ::WORD, - wReserved: ::WORD, - EmphAdj: ::c_long, - RateAdj: ::c_long, - Volume: ::ULONG, - PitchAdj: SPVPITCH, - SilenceMSecs: ::ULONG, - pPhoneIds: *mut SPPHONEID, - ePartOfSpeech: SPPARTOFSPEECH, - Context: SPVCONTEXT, -}} -ENUM!{enum SPRUNSTATE { - SPRS_DONE = 1 << 0, - SPRS_IS_SPEAKING = 1 << 1, -}} -ENUM!{enum SPVLIMITS { - SPMIN_VOLUME = 0, - SPMAX_VOLUME = 100, - SPMIN_RATE = -10i32 as u32, - SPMAX_RATE = 10, -}} -ENUM!{enum SPVPRIORITY { - SPVPRI_NORMAL = 0, - SPVPRI_ALERT = 1 << 0, - SPVPRI_OVER = 1 << 1, -}} -STRUCT!{struct SPVOICESTATUS { - ulCurrentStream: ::ULONG, - ulLastStreamQueued: ::ULONG, - hrLastResult: ::HRESULT, - dwRunningState: ::DWORD, - ulInputWordPos: ::ULONG, - ulInputWordLen: ::ULONG, - ulInputSentPos: ::ULONG, - ulInputSentLen: ::ULONG, - lBookmarkId: ::LONG, - PhonemeId: SPPHONEID, - VisemeId: SPVISEMES, - dwReserved1: ::DWORD, - dwReserved2: ::DWORD, -}} -FLAGS!{enum SPEAKFLAGS { - SPF_DEFAULT = 0, - SPF_ASYNC = 1 << 0, - SPF_PURGEBEFORESPEAK = 1 << 1, - SPF_IS_FILENAME = 1 << 2, - SPF_IS_XML = 1 << 3, - SPF_IS_NOT_XML = 1 << 4, - SPF_PERSIST_XML = 1 << 5, - SPF_NLP_SPEAK_PUNC = 1 << 6, - SPF_PARSE_SAPI = 1 << 7, - SPF_PARSE_SSML = 1 << 8, -}} -pub const SPF_PARSE_AUTODETECT: SPEAKFLAGS = SPF_DEFAULT; -pub const SPF_NLP_MASK: SPEAKFLAGS = SPF_NLP_SPEAK_PUNC; -pub const SPF_PARSE_MASK: i32 = SPF_PARSE_SAPI.0 as i32 | SPF_PARSE_SSML.0 as i32; -pub const SPF_VOICE_MASK: i32 = - SPF_ASYNC.0 as i32 | SPF_PURGEBEFORESPEAK.0 as i32 | SPF_IS_FILENAME.0 as i32 | SPF_IS_XML.0 as i32 | - SPF_IS_NOT_XML.0 as i32 | SPF_NLP_MASK.0 as i32 | SPF_PERSIST_XML.0 as i32 | SPF_PARSE_MASK; -pub const SPF_UNUSED_FLAGS: i32 = !SPF_VOICE_MASK; -RIDL!( -interface ISpVoice(ISpVoiceVtbl): ISpEventSource(ISpEventSourceVtbl) { - fn SetOutput(&mut self, pUnkOutput: *mut ::IUnknown, fAllowFormatChanges: ::BOOL) -> ::HRESULT, - fn GetOutputObjectToken(&mut self, ppObjectToken: *mut *mut ISpObjectToken) -> ::HRESULT, - fn GetOutputStream(&mut self, ppStream: *mut *mut ISpStreamFormat) -> ::HRESULT, - fn Pause(&mut self) -> ::HRESULT, - fn Resume(&mut self) -> ::HRESULT, - fn SetVoice(&mut self, pToken: *mut ISpObjectToken) -> ::HRESULT, - fn GetVoice(&mut self, ppToken: *mut *mut ISpObjectToken) -> ::HRESULT, - fn Speak( - &mut self, pwcs: ::LPCWSTR, dwFlags: ::DWORD, pulStreamNumber: *mut ::ULONG - ) -> ::HRESULT, - fn SpeakStream( - &mut self, pStream: *mut ::IStream, dwFlags: ::DWORD, pulStreamNumber: *mut ::ULONG - ) -> ::HRESULT, - fn GetStatus( - &mut self, pStatus: *mut SPVOICESTATUS, ppszLastBookmark: *mut ::LPWSTR - ) -> ::HRESULT, - fn Skip( - &mut self, pItemType: ::LPCWSTR, lNumItems: ::c_long, pulNumSkipped: *mut ::ULONG - ) -> ::HRESULT, - fn SetPriority(&mut self, ePriority: SPVPRIORITY) -> ::HRESULT, - fn GetPriority(&mut self, pePriority: *mut SPVPRIORITY) -> ::HRESULT, - fn SetAlertBoundary(&mut self, eBoundary: SPEVENTENUM) -> ::HRESULT, - fn GetAlertBoundary(&mut self, peBoundary: *mut SPEVENTENUM) -> ::HRESULT, - fn SetRate(&mut self, RateAdjust: ::c_long) -> ::HRESULT, - fn GetRate(&mut self, pRateAdjust: *mut ::c_long) -> ::HRESULT, - fn SetVolume(&mut self, usVolume: ::USHORT) -> ::HRESULT, - fn GetVolume(&mut self, pusVolume: *mut ::USHORT) -> ::HRESULT, - fn WaitUntilDone(&mut self, msTimeout: ::ULONG) -> ::HRESULT, - fn SetSyncSpeakTimeout(&mut self, msTimeout: ::ULONG) -> ::HRESULT, - fn GetSyncSpeakTimeout(&mut self, pmsTimeout: *mut ::ULONG) -> ::HRESULT, - fn SpeakCompleteEvent(&mut self) -> ::HANDLE, - fn IsUISupported( - &mut self, pszTypeOfUI: ::LPCWSTR, pvExtraData: *mut ::c_void, cbExtraData: ::ULONG, - pfSupported: *mut ::BOOL - ) -> ::HRESULT, - fn DisplayUI( - &mut self, hwndParent: ::HWND, pszTitle: ::LPCWSTR, pszTypeOfUI: ::LPCWSTR, - pvExtraData: *mut ::c_void, cbExtraData: ::ULONG - ) -> ::HRESULT -} -); -DEFINE_GUID!( - UuidOfISpVoice, - 0x6C44DF74, 0x72B9, 0x4992, 0xA1, 0xEC, 0xEF, 0x99, 0x6E, 0x04, 0x22, 0xD4 -); -RIDL!( -interface ISpPhrase(ISpPhraseVtbl): IUnknown(IUnknownVtbl) { - fn GetPhrase(&mut self, ppCoMemPhrase: *mut *mut SPPHRASE) -> ::HRESULT, - fn GetSerializedPhrase(&mut self, ppCoMemPhrase: *mut *mut SPSERIALIZEDPHRASE) -> ::HRESULT, - fn GetText( - &mut self, ulStart: ::ULONG, ulCount: ::ULONG, fUseTextReplacements: ::BOOL, - ppszCoMemText: *mut ::LPWSTR, pbDisplayAttributes: *mut ::BYTE - ) -> ::HRESULT, - fn Discard(&mut self, dwValueTypes: ::DWORD) -> ::HRESULT -} -); -RIDL!( -interface ISpPhraseAlt(ISpPhraseAltVtbl): ISpPhrase(ISpPhraseVtbl) { - fn GetAltInfo( - &mut self, pParent: *mut *mut ISpPhrase, pulStartElementInParent: *mut ::ULONG, - pcElementsInParent: *mut ::ULONG, pcElementsInAlt: *mut ::ULONG - ) -> ::HRESULT, - fn Commit(&mut self) -> ::HRESULT -} -); -ENUM!{enum SPXMLRESULTOPTIONS { - SPXRO_SML = 0, - SPXRO_Alternates_SML = 1, -}} -RIDL!( -interface ISpPhrase2(ISpPhrase2Vtbl): ISpPhrase(ISpPhraseVtbl) { - fn GetXMLResult( - &mut self, ppszCoMemXMLResult: *mut ::LPWSTR, Options: SPXMLRESULTOPTIONS - ) -> ::HRESULT, - fn GetXMLErrorInfo(&mut self, pSemanticErrorInfo: *mut SPSEMANTICERRORINFO) -> ::HRESULT, - fn GetAudio( - &mut self, ulStartElement: ::ULONG, cElements: ::ULONG, ppStream: *mut *mut ISpStreamFormat - ) -> ::HRESULT -} -); -STRUCT!{struct SPRECORESULTTIMES { - ftStreamTime: ::FILETIME, - ullLength: ::ULONGLONG, - dwTickCount: ::DWORD, - ullStart: ::ULONGLONG, -}} -STRUCT!{struct SPSERIALIZEDRESULT { - ulSerializedSize: ::ULONG, -}} -RIDL!( -interface ISpRecoResult(ISpRecoResultVtbl): ISpPhrase(ISpPhraseVtbl) { - fn GetResultTimes(&mut self, pTimes: *mut SPRECORESULTTIMES) -> ::HRESULT, - fn GetAlternates( - &mut self, ulStartElement: ::ULONG, cElements: ::ULONG, ulRequestCount: ::ULONG, - ppPhrases: *mut *mut ISpPhraseAlt, pcPhrasesReturned: *mut ::ULONG - ) -> ::HRESULT, - fn GetAudio( - &mut self, ulStartElement: ::ULONG, cElements: ::ULONG, ppStream: *mut *mut ISpStreamFormat - ) -> ::HRESULT, - fn SpeakAudio( - &mut self, ulStartElement: ::ULONG, cElements: ::ULONG, dwFlags: ::DWORD, - pulStreamNumber: *mut ::ULONG - ) -> ::HRESULT, - fn Serialize(&mut self, ppCoMemSerializedResult: *mut *mut SPSERIALIZEDRESULT) -> ::HRESULT, - fn ScaleAudio( - &mut self, pAudioFormatId: *const ::GUID, pWaveFormatEx: *const ::WAVEFORMATEX - ) -> ::HRESULT, - fn GetRecoContext(&mut self, ppRecoContext: *mut *mut ISpRecoContext) -> ::HRESULT -} -); -FLAGS!{enum SPCOMMITFLAGS { - SPCF_NONE = 0, - SPCF_ADD_TO_USER_LEXICON = 1 << 0, - SPCF_DEFINITE_CORRECTION = 1 << 1, -}} -RIDL!( -interface ISpRecoResult2(ISpRecoResult2Vtbl): ISpRecoResult(ISpRecoResultVtbl) { - fn CommitAlternate( - &mut self, pPhraseAlt: *mut ISpPhraseAlt, ppNewResult: *mut *mut ISpRecoResult - ) -> ::HRESULT, - fn CommitText( - &mut self, ulStartElement: ::ULONG, cElements: ::ULONG, pszCorrectedData: ::LPCWSTR, - eCommitFlags: ::DWORD - ) -> ::HRESULT, - fn SetTextFeedback(&mut self, pszFeedback: ::LPCWSTR, fSuccessful: ::BOOL) -> ::HRESULT -} -); -RIDL!( -interface ISpXMLRecoResult(ISpXMLRecoResultVtbl): ISpRecoResult(ISpRecoResultVtbl) { - fn GetXMLResult( - &mut self, ppszCoMemXMLResult: *mut ::LPWSTR, Options: SPXMLRESULTOPTIONS - ) -> ::HRESULT, - fn GetXMLErrorInfo(&mut self, pSemanticErrorInfo: *mut SPSEMANTICERRORINFO) -> ::HRESULT -} -); -STRUCT!{struct SPTEXTSELECTIONINFO { - ulStartActiveOffset: ::ULONG, - cchActiveChars: ::ULONG, - ulStartSelection: ::ULONG, - cchSelection: ::ULONG, -}} -ENUM!{enum SPWORDPRONOUNCEABLE { - SPWP_UNKNOWN_WORD_UNPRONOUNCEABLE = 0, - SPWP_UNKNOWN_WORD_PRONOUNCEABLE = 1, - SPWP_KNOWN_WORD_PRONOUNCEABLE = 2, -}} -ENUM!{enum SPGRAMMARSTATE { - SPGS_DISABLED = 0, - SPGS_ENABLED = 1, - SPGS_EXCLUSIVE = 3, -}} -ENUM!{enum SPCONTEXTSTATE { - SPCS_DISABLED = 0, - SPCS_ENABLED = 1, -}} -ENUM!{enum SPRULESTATE { - SPRS_INACTIVE = 0, - SPRS_ACTIVE = 1, - SPRS_ACTIVE_WITH_AUTO_PAUSE = 3, - SPRS_ACTIVE_USER_DELIMITED = 4, -}} -pub const SP_STREAMPOS_ASAP: ::INT = 0; -pub const SP_STREAMPOS_REALTIME: ::INT = -1; -pub const SPRULETRANS_TEXTBUFFER: SPSTATEHANDLE = -1isize as SPSTATEHANDLE; -pub const SPRULETRANS_WILDCARD: SPSTATEHANDLE = -2isize as SPSTATEHANDLE; -pub const SPRULETRANS_DICTATION: SPSTATEHANDLE = -3isize as SPSTATEHANDLE; -ENUM!{enum SPGRAMMARWORDTYPE { - SPWT_DISPLAY = 0, - SPWT_LEXICAL = 1, - SPWT_PRONUNCIATION = 2, - SPWT_LEXICAL_NO_SPECIAL_CHARS = 3, -}} -STRUCT!{struct SPPROPERTYINFO { - pszName: ::LPCWSTR, - ulId: ::ULONG, - pszValue: ::LPCWSTR, - vValue: ::VARIANT, -}} -FLAGS!{enum SPCFGRULEATTRIBUTES { - SPRAF_TopLevel = 1 << 0, - SPRAF_Active = 1 << 1, - SPRAF_Export = 1 << 2, - SPRAF_Import = 1 << 3, - SPRAF_Interpreter = 1 << 4, - SPRAF_Dynamic = 1 << 5, - SPRAF_Root = 1 << 6, - SPRAF_AutoPause = 1 << 16, - SPRAF_UserDelimited = 1 << 17, -}} -RIDL!( -interface ISpGrammarBuilder(ISpGrammarBuilderVtbl): IUnknown(IUnknownVtbl) { - fn ResetGrammar(&mut self, NewLanguage: ::WORD) -> ::HRESULT, - fn GetRule( - &mut self, pszRuleName: ::LPCWSTR, dwRuleId: ::DWORD, dwAttributes: ::DWORD, - fCreateIfNotExist: ::BOOL, phInitialState: *mut SPSTATEHANDLE - ) -> ::HRESULT, - fn ClearRule(&mut self, hState: SPSTATEHANDLE) -> ::HRESULT, - fn CreateNewState(&mut self, hState: SPSTATEHANDLE, phState: *mut SPSTATEHANDLE) -> ::HRESULT, - fn AddWordTransition( - &mut self, hFromState: SPSTATEHANDLE, hToState: SPSTATEHANDLE, psz: ::LPCWSTR, - pszSeparators: ::LPCWSTR, eWordType: SPGRAMMARWORDTYPE, Weight: ::c_float, - pPropInfo: *const SPPROPERTYINFO - ) -> ::HRESULT, - fn AddRuleTransition( - &mut self, hFromState: SPSTATEHANDLE, hToState: SPSTATEHANDLE, hRule: SPSTATEHANDLE, - Weight: ::c_float, pPropInfo: *const SPPROPERTYINFO - ) -> ::HRESULT, - fn AddResource( - &mut self, hRuleState: SPSTATEHANDLE, pszResourceName: ::LPCWSTR, - pszResourceValue: ::LPCWSTR - ) -> ::HRESULT, - fn Commit(&mut self, dwReserved: ::DWORD) -> ::HRESULT -} -); -ENUM!{enum SPLOADOPTIONS { - SPLO_STATIC = 0, - SPLO_DYNAMIC = 1, -}} -RIDL!( -interface ISpRecoGrammar(ISpRecoGrammarVtbl): ISpGrammarBuilder(ISpGrammarBuilderVtbl) { - fn GetGrammarId(&mut self, pullGrammarId: *mut ::ULONGLONG) -> ::HRESULT, - fn GetRecoContext(&mut self, ppRecoCtxt: *mut *mut ISpRecoContext) -> ::HRESULT, - fn LoadCmdFromFile(&mut self, pszFileName: ::LPCWSTR, Options: SPLOADOPTIONS) -> ::HRESULT, - fn LoadCmdFromObject( - &mut self, rcid: ::REFCLSID, pszGrammarName: ::LPCWSTR, Options: SPLOADOPTIONS - ) -> ::HRESULT, - fn LoadCmdFromResource( - &mut self, hModule: ::HMODULE, pszResourceName: ::LPCWSTR, pszResourceType: ::LPCWSTR, - wLanguage: ::WORD, Options: SPLOADOPTIONS - ) -> ::HRESULT, - fn LoadCmdFromMemory( - &mut self, pGrammar: *const SPBINARYGRAMMAR, Options: SPLOADOPTIONS - ) -> ::HRESULT, - fn LoadCmdFromProprietaryGrammar( - &mut self, rguidParam: ::REFGUID, pszStringParam: ::LPCWSTR, pvDataPrarm: *const ::c_void, - cbDataSize: ::ULONG, Options: SPLOADOPTIONS - ) -> ::HRESULT, - fn SetRuleState( - &mut self, pszName: ::LPCWSTR, pReserved: *mut ::c_void, NewState: SPRULESTATE - ) -> ::HRESULT, - fn SetRuleIdState(&mut self, ulRuleId: ::ULONG, NewState: SPRULESTATE) -> ::HRESULT, - fn LoadDictation(&mut self, pszTopicName: ::LPCWSTR, Options: SPLOADOPTIONS) -> ::HRESULT, - fn UnloadDictation(&mut self) -> ::HRESULT, - fn SetDictationState(&mut self, NewState: SPRULESTATE) -> ::HRESULT, - fn SetWordSequenceData( - &mut self, pText: *const ::WCHAR, cchText: ::ULONG, pInfo: *const SPTEXTSELECTIONINFO - ) -> ::HRESULT, - fn SetTextSelection(&mut self, pInfo: *const SPTEXTSELECTIONINFO) -> ::HRESULT, - fn IsPronounceable( - &mut self, pszWord: ::LPCWSTR, pWordPronounceable: *mut SPWORDPRONOUNCEABLE - ) -> ::HRESULT, - fn SetGrammarState(&mut self, eGrammarState: SPGRAMMARSTATE) -> ::HRESULT, - fn SaveCmd(&mut self, pStream: *mut ::IStream, ppszCoMemErrorText: *mut ::LPWSTR) -> ::HRESULT, - fn GetGrammarState(&mut self, peGrammarState: *mut SPGRAMMARSTATE) -> ::HRESULT -} -); -ENUM!{enum SPMATCHINGMODE { - AllWords = 0, - Subsequence = 1, - OrderedSubset = 3, - SubsequenceContentRequired = 5, - OrderedSubsetContentRequired = 7, -}} -ENUM!{enum PHONETICALPHABET { - PA_Ipa = 0, - PA_Ups = 1, - PA_Sapi = 2, -}} -RIDL!( -interface ISpGrammarBuilder2(ISpGrammarBuilder2Vtbl): IUnknown(IUnknownVtbl) { - fn AddTextSubset( - &mut self, hFromState: SPSTATEHANDLE, hToState: SPSTATEHANDLE, psz: ::LPCWSTR, - eMatchMode: SPMATCHINGMODE - ) -> ::HRESULT, - fn SetPhoneticAlphabet(&mut self, phoneticALphabet: PHONETICALPHABET) -> ::HRESULT -} -); -RIDL!( -interface ISpRecoGrammar2(ISpRecoGrammar2Vtbl): IUnknown(IUnknownVtbl) { - fn GetRules(&mut self, ppCoMemRules: *mut *mut SPRULE, puNumRules: *mut ::UINT) -> ::HRESULT, - fn LoadCmdFromFile2( - &mut self, pszFileName: ::LPCWSTR, Options: SPLOADOPTIONS, pszSharingUri: ::LPCWSTR, - pszBaseUri: ::LPCWSTR - ) -> ::HRESULT, - fn LoadCmdFromMemory2( - &mut self, pGrammar: *const SPBINARYGRAMMAR, Options: SPLOADOPTIONS, - pszSharingUri: ::LPCWSTR, pszBaseUri: ::LPCWSTR - ) -> ::HRESULT, - fn SetRulePriority( - &mut self, pszRuleName: ::LPCWSTR, ulRuleId: ::ULONG, nRulePriority: ::c_int - ) -> ::HRESULT, - fn SetRuleWeight( - &mut self, pszRuleName: ::LPCWSTR, ulRuleId: ::ULONG, flWeight: ::c_float - ) -> ::HRESULT, - fn SetDictationWeight(&mut self, flWeight: ::c_float) -> ::HRESULT, - fn SetGrammarLoader(&mut self, pLoader: *mut ISpeechResourceLoader) -> ::HRESULT, - fn SetSMLSecurityManager( - &mut self, pSMLSecurityManager: *mut ::IInternetSecurityManager - ) -> ::HRESULT -} -); -RIDL!( -interface ISpeechResourceLoader(ISpeechResourceLoaderVtbl): IDispatch(IDispatchVtbl) { - fn LoadResource( - &mut self, bstrResourceUri: ::BSTR, fAlwaysReload: ::VARIANT_BOOL, - pStream: *mut *mut ::IUnknown, pbstrMIMEType: *mut ::BSTR, pfModified: *mut ::VARIANT_BOOL, - pbstrRedirectUrl: *mut ::BSTR - ) -> ::HRESULT, - fn GetLocalCopy( - &mut self, bstrResourceUri: ::BSTR, pbstrLocalPath: *mut ::BSTR, - pbstrMIMEType: *mut ::BSTR, pbstrRedirectUrl: *mut ::BSTR - ) -> ::HRESULT, - fn ReleaseLocalCopy(&mut self, pbstrLocalPath: ::BSTR) -> ::HRESULT -} -); -#[repr(C)] #[derive(Copy)] -pub struct SPRECOCONTEXTSTATUS { - pub eInterference: SPINTERFERENCE, - pub szRequestTypeOfUI: [::WCHAR; 255], - pub dwReserved1: ::DWORD, - pub dwReserved2: ::DWORD, -} -impl Clone for SPRECOCONTEXTSTATUS { - fn clone(&self) -> Self { - *self - } -} -FLAGS!{enum SPBOOKMARKOPTIONS { - SPBO_NONE = 0, - SPBO_PAUSE = 1 << 0, - SPBO_AHEAD = 1 << 1, - SPBO_TIME_UNITS = 1 << 2, -}} -FLAGS!{enum SPAUDIOOPTIONS { - SPAO_NONE = 0, - SPAO_RETAIN_AUDIO = 1 << 0, -}} -RIDL!( -interface ISpRecoContext(ISpRecoContextVtbl): ISpEventSource(ISpEventSourceVtbl) { - fn GetRecognizer(&mut self, ppRecognizer: *mut *mut ISpRecognizer) -> ::HRESULT, - fn CreateGrammer( - &mut self, ullGrammarId: ::ULONGLONG, ppGrammar: *mut *mut ISpRecoGrammar - ) -> ::HRESULT, - fn GetStatus(&mut self, pState: *mut SPRECOCONTEXTSTATUS) -> ::HRESULT, - fn GetMaxAlternates(&mut self, pcAlternates: *mut ::ULONG) -> ::HRESULT, - fn SetMaxAlternates(&mut self, cAlternates: ::ULONG) -> ::HRESULT, - fn SetAudioOptions( - &mut self, Options: SPAUDIOOPTIONS, pAudioFormatId: *const ::GUID, - pWaveFormatEx: *const ::WAVEFORMATEX - ) -> ::HRESULT, - fn GetAudioOptions( - &mut self, pOptions: *mut SPAUDIOOPTIONS, pAudioFormatId: *mut ::GUID, - ppCoMemWFEX: *mut *mut ::WAVEFORMATEX - ) -> ::HRESULT, - fn DeserializeResult( - &mut self, pSerializedResult: *const SPSERIALIZEDRESULT, ppResult: *mut *mut ISpRecoResult - ) -> ::HRESULT, - fn Bookmark( - &mut self, Options: SPBOOKMARKOPTIONS, ullStreamPosition: ::ULONGLONG, - lparamEvent: ::LPARAM - ) -> ::HRESULT, - fn SetAdaptionData(&mut self, pAdaptionData: ::LPCWSTR, cch: ::ULONG) -> ::HRESULT, - fn Pause(&mut self, dwReserved: ::DWORD) -> ::HRESULT, - fn Resume(&mut self, dwReserved: ::DWORD) -> ::HRESULT, - fn SetVoice(&mut self, pVoice: *mut ISpVoice, fAllowFormatChanges: ::BOOL) -> ::HRESULT, - fn GetVoice(&mut self, ppVoice: *mut *mut ISpVoice) -> ::HRESULT, - fn SetVoicePurgeEvent(&mut self, ullEventIntereset: ::ULONGLONG) -> ::HRESULT, - fn GetVoicePurgeEvent(&mut self, pullEventIntereset: *mut ::ULONGLONG) -> ::HRESULT, - fn SetContextState(&mut self, eContextState: SPCONTEXTSTATE) -> ::HRESULT, - fn GetContextState(&mut self, peContextState: *mut SPCONTEXTSTATE) -> ::HRESULT -} -); -FLAGS!{enum SPGRAMMAROPTIONS { - SPGO_SAPI = 0x1, - SPGO_SRGS = 0x2, - SPGO_UPS = 0x4, - SPGO_SRGS_MS_SCRIPT = 0x8, - SPGO_SRGS_W3C_SCRIPT = 0x100, - SPGO_SRGS_STG_SCRIPT = 0x200, - SPGO_SRGS_SCRIPT = - SPGO_SRGS.0 | SPGO_SRGS_MS_SCRIPT.0 | SPGO_SRGS_W3C_SCRIPT.0 | - SPGO_SRGS_STG_SCRIPT.0, - SPGO_FILE = 0x10, - SPGO_HTTP = 0x20, - SPGO_RES = 0x40, - SPGO_OBJECT = 0x80, - SPGO_DEFAULT = 0x3fb, - SPGO_ALL = 0x3ff, -}} -FLAGS!{enum SPADAPTATIONSETTINGS { - SPADS_Default = 0, - SPADS_CurrentRecognizer = 0x1, - SPADS_RecoProfile = 0x2, - SPADS_Immediate = 0x4, - SPADS_Reset = 0x8, - SPADS_HighVolumeDataSource = 0x10, -}} -ENUM!{enum SPADAPTATIONRELEVANCE { - SPAR_Unknown = 0, - SPAR_Low = 1, - SPAR_Medium = 2, - SPAR_High = 3, -}} -RIDL!( -interface ISpRecoContext2(ISpRecoContext2Vtbl): IUnknown(IUnknownVtbl) { - fn SetGrammarOptions(&mut self, eGrammarOptions: ::DWORD) -> ::HRESULT, - fn GetGrammarOptions(&mut self, peGrammarOptions: *mut ::DWORD) -> ::HRESULT, - fn SetAdaptationData2( - &mut self, pAdaptationData: ::LPCWSTR, cch: ::ULONG, pTopicName: ::LPCWSTR, - eAdaptationSettings: ::DWORD, eRelevance: SPADAPTATIONRELEVANCE - ) -> ::HRESULT -} -); -RIDL!( -interface ISpProperties(ISpPropertiesVtbl): IUnknown(IUnknownVtbl) { - fn SetPropertyNum(&mut self, pName: ::LPCWSTR, lValue: ::LONG) -> ::HRESULT, - fn GetPropertyNum(&mut self, pName: ::LPCWSTR, plValue: *mut ::LONG) -> ::HRESULT, - fn SetPropertyString(&mut self, pName: ::LPCWSTR, pValue: ::LPCWSTR) -> ::HRESULT, - fn GetPropertyString(&mut self, pName: ::LPCWSTR, ppCoMemValue: *mut ::LPWSTR) -> ::HRESULT -} -); -STRUCT!{struct SPRECOGNIZERSTATUS { - AudioStatus: SPAUDIOSTATUS, - ullRecognitionStreamPos: ::ULONGLONG, - ulStreamNumber: ::ULONG, - ulNumActive: ::ULONG, - clsidEngine: ::CLSID, - cLangIDs: ::ULONG, - aLangID: [::WORD; 20], - ullRecognitionStreamTime: ::ULONGLONG, -}} -ENUM!{enum SPWAVEFORMATTYPE { - SPWF_INPUT = 0, - SPWF_SRENGINE = 1, -}} -pub type SPSTREAMFORMATTYPE = SPWAVEFORMATTYPE; -ENUM!{enum SPRECOSTATE { - SPRST_INACTIVE = 0, - SPRST_ACTIVE = 1, - SPRST_ACTIVE_ALWAYS = 2, - SPRST_INACTIVE_WITH_PURGE = 3, - SPRST_NUM_STATES = 4, -}} -RIDL!( -interface ISpRecognizer(ISpRecognizerVtbl): ISpProperties(ISpPropertiesVtbl) { - fn SetRecognizer(&mut self, pRecognizer: *mut ISpObjectToken) -> ::HRESULT, - fn GetRecognizer(&mut self, ppRecognizer: *mut *mut ISpObjectToken) -> ::HRESULT, - fn SetInput(&mut self, pUnkInput: *mut ::IUnknown, fAllowFormatChanges: ::BOOL) -> ::HRESULT, - fn GetInputObjectToken(&mut self, ppToken: *mut *mut ISpObjectToken) -> ::HRESULT, - fn GetInputStream(&mut self, ppStream: *mut *mut ISpStreamFormat) -> ::HRESULT, - fn CreateRecoContext(&mut self, ppNewCtxt: *mut *mut ISpRecoContext) -> ::HRESULT, - fn GetRecoProfile(&mut self, ppToken: *mut *mut ISpObjectToken) -> ::HRESULT, - fn SetRecoProfile(&mut self, pToken: *mut ISpObjectToken) -> ::HRESULT, - fn IsSharedInstance(&mut self) -> ::HRESULT, - fn GetRecoState(&mut self, pState: *mut SPRECOSTATE) -> ::HRESULT, - fn SetRecoState(&mut self, NewState: SPRECOSTATE) -> ::HRESULT, - fn GetStatus(&mut self, pStatus: *mut SPRECOGNIZERSTATUS) -> ::HRESULT, - fn GetFormat( - &mut self, WaveFormatType: SPSTREAMFORMATTYPE, pFormatId: *mut ::GUID, - ppCoMemWFEX: *mut ::WAVEFORMATEX - ) -> ::HRESULT, - fn IsUISupported( - &mut self, pszTypeOfUI: ::LPCWSTR, pvExtraData: *mut ::c_void, cbExtraData: ::ULONG, - pfSupported: *mut ::BOOL - ) -> ::HRESULT, - fn DisplayUI( - &mut self, hwndParent: ::HWND, pszTitle: ::LPCWSTR, pszTypeOfUI: ::LPCWSTR, - pvExtraData: *mut ::c_void, cbExtraData: ::ULONG - ) -> ::HRESULT, - fn EmulateRecognition(&mut self, pPhrase: *mut ISpPhrase) -> ::HRESULT -} -); -RIDL!( -interface ISpSerializeState(ISpSerializeStateVtbl): IUnknown(IUnknownVtbl) { - fn GetSerializedState( - &mut self, ppbData: *mut *mut ::BYTE, pulSize: *mut ::ULONG, dwReserved: ::DWORD - ) -> ::HRESULT, - fn SetSerializedState( - &mut self, pbData: *mut ::BYTE, ulSize: ::ULONG, dwReserved: ::DWORD - ) -> ::HRESULT -} -); -RIDL!( -interface ISpRecognizer2(ISpRecognizer2Vtbl): IUnknown(IUnknownVtbl) { - fn EmulateRecognitionEx( - &mut self, pPhrase: *mut ISpPhrase, dwCompareFlags: ::DWORD - ) -> ::HRESULT, - fn SetTrainingState( - &mut self, fDoingTraining: ::BOOL, fAdaptFromTrainingData: ::BOOL - ) -> ::HRESULT, - fn ResetAcousticModelAdaptation(&mut self) -> ::HRESULT -} -); -ENUM!{enum SPCATEGORYTYPE { - SPCT_COMMAND = 0, - SPCT_DICTATION, - SPCT_SLEEP, - SPCT_SUB_COMMAND, - SPCT_SUB_DICTATION, -}} -RIDL!( -interface ISpRecoCategory(ISpRecoCategoryVtbl): IUnknown(IUnknownVtbl) { - fn GetType(&mut self, peCategoryType: *mut SPCATEGORYTYPE) -> ::HRESULT -} -); -RIDL!( -interface ISpRecognizer3(ISpRecognizer3Vtbl): IUnknown(IUnknownVtbl) { - fn GetCategory( - &mut self, categoryType: SPCATEGORYTYPE, ppCategory: *mut *mut ISpRecoCategory - ) -> ::HRESULT, - fn SetActiveCategory(&mut self, pCategory: *mut ISpRecoCategory) -> ::HRESULT, - fn GetActiveCategory(&mut self, ppCategory: *mut *mut ISpRecoCategory) -> ::HRESULT -} -); -STRUCT!{struct SPNORMALIZATIONLIST { - ulSize: ::ULONG, - ppszzNormalizedList: *mut *mut ::WCHAR, -}} -RIDL!( -interface ISpEnginePronunciation(ISpEnginePronunciationVtbl): IUnknown(IUnknownVtbl) { - fn Normalize( - &mut self, pszWord: ::LPCWSTR, pszLeftContext: ::LPCWSTR, pszRightContext: ::LPCWSTR, - LangID: ::WORD, pNormalizationList: *mut SPNORMALIZATIONLIST - ) -> ::HRESULT, - fn GetPronunciations( - &mut self, pszWord: ::LPCWSTR, pszLeftContext: ::LPCWSTR, pszRightContext: ::LPCWSTR, - LangID: ::WORD, pEnginePronunciationList: *mut SPWORDPRONUNCIATIONLIST - ) -> ::HRESULT -} -); -STRUCT!{struct SPDISPLAYTOKEN { - pszLexical: *const ::WCHAR, - pszDisplay: *const ::WCHAR, - bDisplayAttributes: ::BYTE, -}} -STRUCT!{struct SPDISPLAYPHRASE { - ulNumTokens: ::ULONG, - pTokens: *mut SPDISPLAYTOKEN, -}} -RIDL!( -interface ISpDisplayAlternates(ISpDisplayAlternatesVtbl): IUnknown(IUnknownVtbl) { - fn GetDisplayAlternates( - &mut self, pPhrase: *const SPDISPLAYPHRASE, cRequestCount: ::ULONG, - ppCoMemPhrases: *mut *mut SPDISPLAYPHRASE, pcPhrasesReturned: *mut ::ULONG - ) -> ::HRESULT, - fn SetFullStopTrailSpace(&mut self, ulTrailSpace: ::ULONG) -> ::HRESULT -} -); -pub type SpeechLanguageId = ::c_long; -ENUM!{enum DISPID_SpeechDataKey { - DISPID_SDKSetBinaryValue = 1, - DISPID_SDKGetBinaryValue, - DISPID_SDKSetStringValue, - DISPID_SDKGetStringValue, - DISPID_SDKSetLongValue, - DISPID_SDKGetlongValue, - DISPID_SDKOpenKey, - DISPID_SDKCreateKey, - DISPID_SDKDeleteKey, - DISPID_SDKDeleteValue, - DISPID_SDKEnumKeys, - DISPID_SDKEnumValues, -}} -ENUM!{enum DISPID_SpeechObjectToken { - DISPID_SOTId = 1, - DISPID_SOTDataKey, - DISPID_SOTCategory, - DISPID_SOTGetDescription, - DISPID_SOTSetId, - DISPID_SOTGetAttribute, - DISPID_SOTCreateInstance, - DISPID_SOTRemove, - DISPID_SOTGetStorageFileName, - DISPID_SOTRemoveStorageFileName, - DISPID_SOTIsUISupported, - DISPID_SOTDisplayUI, - DISPID_SOTMatchesAttributes, -}} -ENUM!{enum SpeechDataKeyLocation { - SDKLDefaultLocation = SPDKL_DefaultLocation.0, - SDKLCurrentUser = SPDKL_CurrentUser.0, - SDKLLocalMachine = SPDKL_LocalMachine.0, - SDKLCurrentConfig = SPDKL_CurrentConfig.0, -}} -ENUM!{enum SpeechTokenContext { - STCInprocServer = ::CLSCTX_INPROC_SERVER, - STCInprocHandler = ::CLSCTX_INPROC_HANDLER, - STCLocalServer = ::CLSCTX_LOCAL_SERVER, - STCRemoteServer = ::CLSCTX_REMOTE_SERVER, - STCAll = ::CLSCTX_INPROC_SERVER | ::CLSCTX_INPROC_HANDLER | - ::CLSCTX_LOCAL_SERVER | ::CLSCTX_REMOTE_SERVER, -}} -ENUM!{enum SpeechTokenShellFolder { - STSF_AppData = 0x1a, - STSF_LocalAppData = 0x1c, - STSF_CommonAppData = 0x23, - STSF_FlagCreate = 0x8000, -}} -ENUM!{enum DISPID_SpeechObjectTokens { - DISPID_SOTsCount = 1, - DISPID_SOTsItem = ::DISPID_VALUE as u32, - DISPID_SOTs_NewEnum = ::DISPID_NEWENUM as u32, -}} -ENUM!{enum DISPID_SpeechObjectTokenCategory { - DISPID_SOTCId = 1, - DISPID_SOTCDefault, - DISPID_SOTCSetId, - DISPID_SOTCGetDataKey, - DISPID_SOTCEnumerateTokens, -}} -ENUM!{enum SpeechAudioFormatType { - SAFTDefault = -1i32 as u32, - SAFTNoAssignedFormat = 0, - SAFTText = 1, - SAFTNonStandardFormat = 2, - SAFTExtendedAudioFormat = 3, - SAFT8kHz8BitMono = 4, - SAFT8kHz8BitStereo = 5, - SAFT8kHz16BitMono = 6, - SAFT8kHz16BitStereo = 7, - SAFT11kHz8BitMono = 8, - SAFT11kHz8BitStereo = 9, - SAFT11kHz16BitMono = 10, - SAFT11kHz16BitStereo = 11, - SAFT12kHz8BitMono = 12, - SAFT12kHz8BitStereo = 13, - SAFT12kHz16BitMono = 14, - SAFT12kHz16BitStereo = 15, - SAFT16kHz8BitMono = 16, - SAFT16kHz8BitStereo = 17, - SAFT16kHz16BitMono = 18, - SAFT16kHz16BitStereo = 19, - SAFT22kHz8BitMono = 20, - SAFT22kHz8BitStereo = 21, - SAFT22kHz16BitMono = 22, - SAFT22kHz16BitStereo = 23, - SAFT24kHz8BitMono = 24, - SAFT24kHz8BitStereo = 25, - SAFT24kHz16BitMono = 26, - SAFT24kHz16BitStereo = 27, - SAFT32kHz8BitMono = 28, - SAFT32kHz8BitStereo = 29, - SAFT32kHz16BitMono = 30, - SAFT32kHz16BitStereo = 31, - SAFT44kHz8BitMono = 32, - SAFT44kHz8BitStereo = 33, - SAFT44kHz16BitMono = 34, - SAFT44kHz16BitStereo = 35, - SAFT48kHz8BitMono = 36, - SAFT48kHz8BitStereo = 37, - SAFT48kHz16BitMono = 38, - SAFT48kHz16BitStereo = 39, - SAFTTrueSpeech_8kHz1BitMono = 40, - SAFTCCITT_ALaw_8kHzMono = 41, - SAFTCCITT_ALaw_8kHzStereo = 42, - SAFTCCITT_ALaw_11kHzMono = 43, - SAFTCCITT_ALaw_11kHzStereo = 44, - SAFTCCITT_ALaw_22kHzMono = 45, - SAFTCCITT_ALaw_22kHzStereo = 46, - SAFTCCITT_ALaw_44kHzMono = 47, - SAFTCCITT_ALaw_44kHzStereo = 48, - SAFTCCITT_uLaw_8kHzMono = 49, - SAFTCCITT_uLaw_8kHzStereo = 50, - SAFTCCITT_uLaw_11kHzMono = 51, - SAFTCCITT_uLaw_11kHzStereo = 52, - SAFTCCITT_uLaw_22kHzMono = 53, - SAFTCCITT_uLaw_22kHzStereo = 54, - SAFTCCITT_uLaw_44kHzMono = 55, - SAFTCCITT_uLaw_44kHzStereo = 56, - SAFTADPCM_8kHzMono = 57, - SAFTADPCM_8kHzStereo = 58, - SAFTADPCM_11kHzMono = 59, - SAFTADPCM_11kHzStereo = 60, - SAFTADPCM_22kHzMono = 61, - SAFTADPCM_22kHzStereo = 62, - SAFTADPCM_44kHzMono = 63, - SAFTADPCM_44kHzStereo = 64, - SAFTGSM610_8kHzMono = 65, - SAFTGSM610_11kHzMono = 66, - SAFTGSM610_22kHzMono = 67, - SAFTGSM610_44kHzMono = 68, -}} -ENUM!{enum DISPID_SpeechAudioFormat { - DISPID_SAFType = 1, - DISPID_SAFGuid, - DISPID_SAFGetWaveFormatEx, - DISPID_SAFSetWaveFormatEx, -}} -ENUM!{enum DISPID_SpeechBaseStream { - DISPID_SBSFormat = 1, - DISPID_SBSRead, - DISPID_SBSWrite, - DISPID_SBSSeek, -}} -ENUM!{enum SpeechStreamSeekPositionType { - SSSPTRelativeToStart = ::STREAM_SEEK_SET.0, - SSSPTRelativeToCurrentPosition = ::STREAM_SEEK_CUR.0, - SSSPTRelativeToEnd = ::STREAM_SEEK_END.0, -}} -ENUM!{enum DISPID_SpeechAudio { - DISPID_SAStatus = 200, - DISPID_SABufferInfo, - DISPID_SADefaultFormat, - DISPID_SAVolume, - DISPID_SABufferNotifySize, - DISPID_SAEventHandle, - DISPID_SASetState, -}} -ENUM!{enum SpeechAudioState { - SASClosed = SPAS_CLOSED.0, - SASStop = SPAS_STOP.0, - SASPause = SPAS_PAUSE.0, - SASRun = SPAS_RUN.0, -}} -ENUM!{enum DISPID_SpeechMMSysAudio { - DISPID_SMSADeviceId = 300, - DISPID_SMSALineId, - DISPID_SMSAMMHandle, -}} -ENUM!{enum DISPID_SpeechFileStream { - DISPID_SFSOpen = 100, - DISPID_SFSClose, -}} -ENUM!{enum SpeechStreamFileMode { - SSFMOpenForRead = SPFM_OPEN_READONLY.0, - SSFMOpenReadWrite = SPFM_OPEN_READWRITE.0, - SSFMCreate = SPFM_CREATE.0, - SSFMCreateForWrite = SPFM_CREATE_ALWAYS.0, -}} -ENUM!{enum DISPID_SpeechCustomStream { - DISPID_SCSBaseStream = 100, -}} -ENUM!{enum DISPID_SpeechMemoryStream { - DISPID_SMSSetData = 100, - DISPID_SMSGetData, -}} -ENUM!{enum DISPID_SpeechAudioStatus { - DISPID_SASFreeBufferSpace = 1, - DISPID_SASNonBlockingIO, - DISPID_SASState, - DISPID_SASCurrentSeekPosition, - DISPID_SASCurrentDevicePosition, -}} -ENUM!{enum DISPID_SpeechAudioBufferInfo { - DISPID_SABIMinNotification = 1, - DISPID_SABIBufferSize, - DISPID_SABIEventBias, -}} -ENUM!{enum DISPID_SpeechWaveFormatEx { - DISPID_SWFEFormatTag = 1, - DISPID_SWFEChannels, - DISPID_SWFESamplesPerSec, - DISPID_SWFEAvgBytesPerSec, - DISPID_SWFEBlockAlign, - DISPID_SWFEBitsPerSample, - DISPID_SWFEExtraData, -}} -ENUM!{enum DISPID_SpeechVoice { - DISPID_SVStatus = 1, - DISPID_SVVoice, - DISPID_SVAudioOutput, - DISPID_SVAudioOutputStream, - DISPID_SVRate, - DISPID_SVVolume, - DISPID_SVAllowAudioOuputFormatChangesOnNextSet, - DISPID_SVEventInterests, - DISPID_SVPriority, - DISPID_SVAlertBoundary, - DISPID_SVSyncronousSpeakTimeout, - DISPID_SVSpeak, - DISPID_SVSpeakStream, - DISPID_SVPause, - DISPID_SVResume, - DISPID_SVSkip, - DISPID_SVGetVoices, - DISPID_SVGetAudioOutputs, - DISPID_SVWaitUntilDone, - DISPID_SVSpeakCompleteEvent, - DISPID_SVIsUISupported, - DISPID_SVDisplayUI, -}} -ENUM!{enum SpeechVoicePriority { - SVPNormal = SPVPRI_NORMAL.0, - SVPAlert = SPVPRI_ALERT.0, - SVPOver = SPVPRI_OVER.0, -}} -FLAGS!{enum SpeechVoiceSpeakFlags { - SVSFDefault = SPF_DEFAULT.0, - SVSFlagsAsync = SPF_ASYNC.0, - SVSFPurgeBeforeSpeak = SPF_PURGEBEFORESPEAK.0, - SVSFIsFilename = SPF_IS_FILENAME.0, - SVSFIsXML = SPF_IS_XML.0, - SVSFIsNotXML = SPF_IS_NOT_XML.0, - SVSFPersistXML = SPF_PERSIST_XML.0, - SVSFNLPSpeakPunc = SPF_NLP_SPEAK_PUNC.0, - SVSFParseSapi = SPF_PARSE_SAPI.0, - SVSFParseSsml = SPF_PARSE_SSML.0, - SVSFParseMask = SPF_PARSE_MASK as u32, - SVSFVoiceMask = SPF_VOICE_MASK as u32, - SVSFUnusedFlags = SPF_UNUSED_FLAGS as u32, -}} -pub const SVSFParseAutodetect: SpeechVoiceSpeakFlags = SVSFDefault; -pub const SVSFNLPMask: SpeechVoiceSpeakFlags = SVSFNLPSpeakPunc; -FLAGS!{enum SpeechVoiceEvents { - SVEStartInputStream = 1 << 1, - SVEEndInputStream = 1 << 2, - SVEVoiceChange = 1 << 3, - SVEBookmark = 1 << 4, - SVEWordBoundary = 1 << 5, - SVEPhoneme = 1 << 6, - SVESentenceBoundary = 1 << 7, - SVEViseme = 1 << 8, - SVEAudioLevel = 1 << 9, - SVEPrivate = 1 << 15, - SVEAllEvents = 0x83fe, -}} -ENUM!{enum DISPID_SpeechVoiceStatus { - DISPID_SVSCurrentStreamNumber = 1, - DISPID_SVSLastStreamNumberQueued, - DISPID_SVSLastResult, - DISPID_SVSRunningState, - DISPID_SVSInputWordPosition, - DISPID_SVSInputWordLength, - DISPID_SVSInputSentencePosition, - DISPID_SVSInputSentenceLength, - DISPID_SVSLastBookmark, - DISPID_SVSLastBookmarkId, - DISPID_SVSPhonemeId, - DISPID_SVSVisemeId, -}} -ENUM!{enum SpeechRunState { - SRSEDone = SPRS_DONE.0, - SRSEIsSpeaking = SPRS_IS_SPEAKING.0, -}} -ENUM!{enum SpeechVisemeType { - SVP_0 = 0, - SVP_1, - SVP_2, - SVP_3, - SVP_4, - SVP_5, - SVP_6, - SVP_7, - SVP_8, - SVP_9, - SVP_10, - SVP_11, - SVP_12, - SVP_13, - SVP_14, - SVP_15, - SVP_16, - SVP_17, - SVP_18, - SVP_19, - SVP_20, - SVP_21, -}} -ENUM!{enum SpeechVisemeFeature { - SVF_None = 0, - SVF_Stressed = SPVFEATURE_STRESSED.0, - SVF_Emphasis = SPVFEATURE_EMPHASIS.0, -}} -ENUM!{enum DISPID_SpeechVoiceEvent { - DISPID_SVEStreamStart = 1, - DISPID_SVEStreamEnd, - DISPID_SVEVoiceChange, - DISPID_SVEBookmark, - DISPID_SVEWord, - DISPID_SVEPhoneme, - DISPID_SVESentenceBoundary, - DISPID_SVEViseme, - DISPID_SVEAudioLevel, - DISPID_SVEEnginePrivate, -}} -ENUM!{enum DISPID_SpeechRecognizer { - DISPID_SRRecognizer = 1, - DISPID_SRAllowAudioInputFormatChangesOnNextSet, - DISPID_SRAudioInput, - DISPID_SRAudioInputStream, - DISPID_SRIsShared, - DISPID_SRState, - DISPID_SRStatus, - DISPID_SRProfile, - DISPID_SREmulateRecognition, - DISPID_SRCreateRecoContext, - DISPID_SRGetFormat, - DISPID_SRSetPropertyNumber, - DISPID_SRGetPropertyNumber, - DISPID_SRSetPropertyString, - DISPID_SRGetPropertyString, - DISPID_SRIsUISupported, - DISPID_SRDisplayUI, - DISPID_SRGetRecognizers, - DISPID_SVGetAudioInputs, - DISPID_SVGetProfiles, -}} -ENUM!{enum SpeechRecognizerState { - SRSInactive = SPRST_INACTIVE.0, - SRSActive = SPRST_ACTIVE.0, - SRSActiveAlways = SPRST_ACTIVE_ALWAYS.0, - SRSInactiveWithPurge = SPRST_INACTIVE_WITH_PURGE.0, -}} -ENUM!{enum SpeechDisplayAttributes { - SDA_No_Trailing_Space = 0, - SDA_One_Trailing_Space = SPAF_ONE_TRAILING_SPACE.0, - SDA_Two_Trailing_Spaces = SPAF_TWO_TRAILING_SPACES.0, - SDA_Consume_Leading_Spaces = SPAF_CONSUME_LEADING_SPACES.0, -}} -ENUM!{enum SpeechFormatType { - SFTInput = SPWF_INPUT.0, - SFTSREngine = SPWF_SRENGINE.0, -}} -FLAGS!{enum SpeechEmulationCompareFlags { - SECFIgnoreCase = 0x1, - SECFIgnoreKanaType = 0x10000, - SECFIgnoreWidth = 0x20000, - SECFNoSpecialChars = 0x20000000, - SECFEmulateResult = 0x40000000, - SECFDefault = SECFIgnoreCase.0 | SECFIgnoreKanaType.0 | SECFIgnoreWidth.0, -}} -ENUM!{enum DISPID_SpeechRecognizerStatus { - DISPID_SRSAudioStatus = 1, - DISPID_SRSCurrentStreamPosition, - DISPID_SRSCurrentStreamNumber, - DISPID_SRSNumberOfActiveRules, - DISPID_SRSClsidEngine, - DISPID_SRSSupportedLanguages, -}} -ENUM!{enum DISPID_SpeechRecoContext { - DISPID_SRCRecognizer = 1, - DISPID_SRCAudioInInterferenceStatus, - DISPID_SRCRequestedUIType, - DISPID_SRCVoice, - DISPID_SRAllowVoiceFormatMatchingOnNextSet, - DISPID_SRCVoicePurgeEvent, - DISPID_SRCEventInterests, - DISPID_SRCCmdMaxAlternates, - DISPID_SRCState, - DISPID_SRCRetainedAudio, - DISPID_SRCRetainedAudioFormat, - DISPID_SRCPause, - DISPID_SRCResume, - DISPID_SRCCreateGrammar, - DISPID_SRCCreateResultFromMemory, - DISPID_SRCBookmark, - DISPID_SRCSetAdaptationData, -}} -ENUM!{enum SpeechRetainedAudioOptions { - SRAONone = SPAO_NONE.0, - SRAORetainAudio = SPAO_RETAIN_AUDIO.0, -}} -ENUM!{enum SpeechBookmarkOptions { - SBONone = SPBO_NONE.0, - SBOPause = SPBO_PAUSE.0, -}} -ENUM!{enum SpeechInterference { - SINone = SPINTERFERENCE_NONE.0, - SINoise = SPINTERFERENCE_NOISE.0, - SINoSignal = SPINTERFERENCE_NOSIGNAL.0, - SITooLoud = SPINTERFERENCE_TOOLOUD.0, - SITooQuiet = SPINTERFERENCE_TOOQUIET.0, - SITooFast = SPINTERFERENCE_TOOFAST.0, - SITooSlow = SPINTERFERENCE_TOOSLOW.0, -}} -FLAGS!{enum SpeechRecoEvents { - SREStreamEnd = 1 << 0, - SRESoundStart = 1 << 1, - SRESoundEnd = 1 << 2, - SREPhraseStart = 1 << 3, - SRERecognition = 1 << 4, - SREHypothesis = 1 << 5, - SREBookmark = 1 << 6, - SREPropertyNumChange = 1 << 7, - SREPropertyStringChange = 1 << 8, - SREFalseRecognition = 1 << 9, - SREInterference = 1 << 10, - SRERequestUI = 1 << 11, - SREStateChange = 1 << 12, - SREAdaptation = 1 << 13, - SREStreamStart = 1 << 14, - SRERecoOtherContext = 1 << 15, - SREAudioLevel = 1 << 16, - SREPrivate = 1 << 18, - SREAllEvents = 0x5ffff, -}} -ENUM!{enum SpeechRecoContextState { - SRCS_Disabled = SPCS_DISABLED.0, - SRCS_Enabled = SPCS_ENABLED.0, -}} -ENUM!{enum DISPIDSPRG { - DISPID_SRGId = 1, - DISPID_SRGRecoContext, - DISPID_SRGState, - DISPID_SRGRules, - DISPID_SRGReset, - DISPID_SRGCommit, - DISPID_SRGCmdLoadFromFile, - DISPID_SRGCmdLoadFromObject, - DISPID_SRGCmdLoadFromResource, - DISPID_SRGCmdLoadFromMemory, - DISPID_SRGCmdLoadFromProprietaryGrammar, - DISPID_SRGCmdSetRuleState, - DISPID_SRGCmdSetRuleIdState, - DISPID_SRGDictationLoad, - DISPID_SRGDictationUnload, - DISPID_SRGDictationSetState, - DISPID_SRGSetWordSequenceData, - DISPID_SRGSetTextSelection, - DISPID_SRGIsPronounceable, -}} -ENUM!{enum SpeechLoadOption { - SLOStatic = SPLO_STATIC.0, - SLODynamic = SPLO_DYNAMIC.0, -}} -ENUM!{enum SpeechWordPronounceable { - SWPUnknownWordUnpronounceable = SPWP_UNKNOWN_WORD_UNPRONOUNCEABLE.0, - SWPUnknownWordPronounceable = SPWP_UNKNOWN_WORD_PRONOUNCEABLE.0, - SWPKnownWordPronounceable = SPWP_KNOWN_WORD_PRONOUNCEABLE.0, -}} -ENUM!{enum SpeechGrammarState { - SGSEnabled = SPGS_ENABLED.0, - SGSDisabled = SPGS_DISABLED.0, - SGSExclusive = SPGS_EXCLUSIVE.0, -}} -ENUM!{enum SpeechRuleState { - SGDSInactive = SPRS_INACTIVE.0, - SGDSActive = SPRS_ACTIVE.0, - SGDSActiveWithAutoPause = SPRS_ACTIVE_WITH_AUTO_PAUSE.0, - SGDSActiveUserDelimited = SPRS_ACTIVE_USER_DELIMITED.0, -}} -ENUM!{enum SpeechRuleAttributes { - SRATopLevel = SPRAF_TopLevel.0, - SRADefaultToActive = SPRAF_Active.0, - SRAExport = SPRAF_Export.0, - SRAImport = SPRAF_Import.0, - SRAInterpreter = SPRAF_Interpreter.0, - SRADynamic = SPRAF_Dynamic.0, - SRARoot = SPRAF_Root.0, -}} -ENUM!{enum SpeechGrammarWordType { - SGDisplay = SPWT_DISPLAY.0, - SGLexical = SPWT_LEXICAL.0, - SGPronounciation = SPWT_PRONUNCIATION.0, - SGLexicalNoSpecialChars = SPWT_LEXICAL_NO_SPECIAL_CHARS.0, -}} -ENUM!{enum DISPID_SpeechRecoContextEvents { - DISPID_SRCEStartStream = 1, - DISPID_SRCEEndStream, - DISPID_SRCEBookmark, - DISPID_SRCESoundStart, - DISPID_SRCESoundEnd, - DISPID_SRCEPhraseStart, - DISPID_SRCERecognition, - DISPID_SRCEHypothesis, - DISPID_SRCEPropertyNumberChange, - DISPID_SRCEPropertyStringChange, - DISPID_SRCEFalseRecognition, - DISPID_SRCEInterference, - DISPID_SRCERequestUI, - DISPID_SRCERecognizerStateChange, - DISPID_SRCEAdaptation, - DISPID_SRCERecognitionForOtherContext, - DISPID_SRCEAudioLevel, - DISPID_SRCEEnginePrivate, -}} -ENUM!{enum SpeechRecognitionType { - SRTStandard = 0, - SRTAutopause = SPREF_AutoPause.0, - SRTEmulated = SPREF_Emulated.0, - SRTSMLTimeout = SPREF_SMLTimeout.0, - SRTExtendableParse = SPREF_ExtendableParse.0, - SRTReSent = SPREF_ReSent.0, -}} -ENUM!{enum DISPID_SpeechGrammarRule { - DISPID_SGRAttributes = 1, - DISPID_SGRInitialState, - DISPID_SGRName, - DISPID_SGRId, - DISPID_SGRClear, - DISPID_SGRAddResource, - DISPID_SGRAddState, -}} -ENUM!{enum DISPID_SpeechGrammarRules { - DISPID_SGRsCount = 1, - DISPID_SGRsDynamic, - DISPID_SGRsAdd, - DISPID_SGRsCommit, - DISPID_SGRsCommitAndSave, - DISPID_SGRsFindRule, - DISPID_SGRsItem = ::DISPID_VALUE as u32, - DISPID_SGRs_NewEnum = ::DISPID_NEWENUM as u32, -}} -ENUM!{enum DISPID_SpeechGrammarRuleState { - DISPID_SGRSRule = 1, - DISPID_SGRSTransitions, - DISPID_SGRSAddWordTransition, - DISPID_SGRSAddRuleTransition, - DISPID_SGRSAddSpecialTransition, -}} -ENUM!{enum SpeechSpecialTransitionType { - SSTTWildcard = 1, - SSTTDictation, - SSTTTextBuffer, -}} -ENUM!{enum DISPID_SpeechGrammarRuleStateTransitions { - DISPID_SGRSTsCount = 1, - DISPID_SGRSTsItem = ::DISPID_VALUE as u32, - DISPID_SGRSTs_NewEnum = ::DISPID_NEWENUM as u32, -}} -ENUM!{enum DISPID_SpeechGrammarRuleStateTransition { - DISPID_SGRSTType = 1, - DISPID_SGRSTText, - DISPID_SGRSTRule, - DISPID_SGRSTWeight, - DISPID_SGRSTPropertyName, - DISPID_SGRSTPropertyId, - DISPID_SGRSTPropertyValue, - DISPID_SGRSTNextState, -}} -ENUM!{enum SpeechGrammarRuleStateTransitionType { - SGRSTTEpsilon = 0, - SGRSTTWord, - SGRSTTRule, - SGRSTTDictation, - SGRSTTWildcard, - SGRSTTTextBuffer, -}} -ENUM!{enum DISPIDSPTSI { - DISPIDSPTSI_ActiveOffset = 1, - DISPIDSPTSI_ActiveLength, - DISPIDSPTSI_SelectionOffset, - DISPIDSPTSI_SelectionLength, -}} -ENUM!{enum DISPID_SpeechRecoResult { - DISPID_SRRRecoContext = 1, - DISPID_SRRTimes, - DISPID_SRRAudioFormat, - DISPID_SRRPhraseInfo, - DISPID_SRRAlternates, - DISPID_SRRAudio, - DISPID_SRRSpeakAudio, - DISPID_SRRSaveToMemory, - DISPID_SRRDiscardResultInfo, -}} -ENUM!{enum SpeechDiscardType { - SDTProperty = SPDF_PROPERTY.0, - SDTReplacement = SPDF_REPLACEMENT.0, - SDTRule = SPDF_RULE.0, - SDTDisplayText = SPDF_DISPLAYTEXT.0, - SDTLexicalForm = SPDF_LEXICALFORM.0, - SDTPronunciation = SPDF_PRONUNCIATION.0, - SDTAudio = SPDF_AUDIO.0, - SDTAlternates = SPDF_ALTERNATES.0, - SDTAll = SPDF_ALL.0, -}} -ENUM!{enum DISPID_SpeechXMLRecoResult { - DISPID_SRRGetXMLResult, - DISPID_SRRGetXMLErrorInfo, -}} -ENUM!{enum DISPID_SpeechRecoResult2 { - DISPID_SRRSetTextFeedback, -}} -ENUM!{enum DISPID_SpeechPhraseBuilder { - DISPID_SPPBRestorePhraseFromMemory = 1, -}} -ENUM!{enum DISPID_SpeechRecoResultTimes { - DISPID_SRRTStreamTime = 1, - DISPID_SRRTLength, - DISPID_SRRTTickCount, - DISPID_SRRTOffsetFromStart, -}} -ENUM!{enum DISPID_SpeechPhraseAlternate { - DISPID_SPARecoResult = 1, - DISPID_SPAStartElementInResult, - DISPID_SPANumberOfElementsInResult, - DISPID_SPAPhraseInfo, - DISPID_SPACommit, -}} -ENUM!{enum DISPID_SpeechPhraseAlternates { - DISPID_SPAsCount = 1, - DISPID_SPAsItem = ::DISPID_VALUE as u32, - DISPID_SPAs_NewEnum = ::DISPID_NEWENUM as u32, -}} -ENUM!{enum DISPID_SpeechPhraseInfo { - DISPID_SPILanguageId = 1, - DISPID_SPIGrammarId, - DISPID_SPIStartTime, - DISPID_SPIAudioStreamPosition, - DISPID_SPIAudioSizeBytes, - DISPID_SPIRetainedSizeBytes, - DISPID_SPIAudioSizeTime, - DISPID_SPIRule, - DISPID_SPIProperties, - DISPID_SPIElements, - DISPID_SPIReplacements, - DISPID_SPIEngineId, - DISPID_SPIEnginePrivateData, - DISPID_SPISaveToMemory, - DISPID_SPIGetText, - DISPID_SPIGetDisplayAttributes, -}} -ENUM!{enum DISPID_SpeechPhraseElement { - DISPID_SPEAudioTimeOffset = 1, - DISPID_SPEAudioSizeTime, - DISPID_SPEAudioStreamOffset, - DISPID_SPEAudioSizeBytes, - DISPID_SPERetainedStreamOffset, - DISPID_SPERetainedSizeBytes, - DISPID_SPEDisplayText, - DISPID_SPELexicalForm, - DISPID_SPEPronunciation, - DISPID_SPEDisplayAttributes, - DISPID_SPERequiredConfidence, - DISPID_SPEActualConfidence, - DISPID_SPEEngineConfidence, -}} -ENUM!{enum SpeechEngineConfidence { - SECLowConfidence = -1i32 as u32, - SECNormalConfidence = 0, - SECHighConfidence = 1, -}} -ENUM!{enum DISPID_SpeechPhraseElements { - DISPID_SPEsCount = 1, - DISPID_SPEsItem = ::DISPID_VALUE as u32, - DISPID_SPEs_NewEnum = ::DISPID_NEWENUM as u32, -}} -ENUM!{enum DISPID_SpeechPhraseReplacement { - DISPID_SPRDisplayAttributes = 1, - DISPID_SPRText, - DISPID_SPRFirstElement, - DISPID_SPRNumberOfElements, -}} -ENUM!{enum DISPID_SpeechPhraseReplacements { - DISPID_SPRsCount = 1, - DISPID_SPRsItem = ::DISPID_VALUE as u32, - DISPID_SPRs_NewEnum = ::DISPID_NEWENUM as u32, -}} -ENUM!{enum DISPID_SpeechPhraseProperty { - DISPID_SPPName = 1, - DISPID_SPPId, - DISPID_SPPValue, - DISPID_SPPFirstElement, - DISPID_SPPNumberOfElements, - DISPID_SPPEngineConfidence, - DISPID_SPPConfidence, - DISPID_SPPParent, - DISPID_SPPChildren, -}} -ENUM!{enum DISPID_SpeechPhraseProperties { - DISPID_SPPsCount = 1, - DISPID_SPPsItem = ::DISPID_VALUE as u32, - DISPID_SPPs_NewEnum = ::DISPID_NEWENUM as u32, -}} -ENUM!{enum DISPID_SpeechPhraseRule { - DISPID_SPRuleName = 1, - DISPID_SPRuleId, - DISPID_SPRuleFirstElement, - DISPID_SPRuleNumberOfElements, - DISPID_SPRuleParent, - DISPID_SPRuleChildren, - DISPID_SPRuleConfidence, - DISPID_SPRuleEngineConfidence, -}} -ENUM!{enum DISPID_SpeechPhraseRules { - DISPID_SPRulesCount = 1, - DISPID_SPRulesItem = ::DISPID_VALUE as u32, - DISPID_SPRules_NewEnum = ::DISPID_NEWENUM as u32, -}} -ENUM!{enum DISPID_SpeechLexicon { - DISPID_SLGenerationId = 1, - DISPID_SLGetWords, - DISPID_SLAddPronunciation, - DISPID_SLAddPronunciationByPhoneIds, - DISPID_SLRemovePronunciation, - DISPID_SLRemovePronunciationByPhoneIds, - DISPID_SLGetPronunciations, - DISPID_SLGetGenerationChange, -}} -ENUM!{enum SpeechLexiconType { - SLTUser = eLEXTYPE_USER.0, - SLTApp = eLEXTYPE_APP.0, -}} -ENUM!{enum SpeechPartOfSpeech { - SPSNotOverriden = SPPS_NotOverriden.0, - SPSUnknown = SPPS_Unknown.0, - SPSNoun = SPPS_Noun.0, - SPSVerb = SPPS_Verb.0, - SPSModifier = SPPS_Modifier.0, - SPSFunction = SPPS_Function.0, - SPSInterjection = SPPS_Interjection.0, - SPSLMA = SPPS_LMA.0, - SPSSuppressWord = SPPS_SuppressWord.0, -}} -ENUM!{enum DISPID_SpeechLexiconWords { - DISPID_SLWsCount = 1, - DISPID_SLWsItem = ::DISPID_VALUE as u32, - DISPID_SLWs_NewEnum = ::DISPID_NEWENUM as u32, -}} -ENUM!{enum SpeechWordType { - SWTAdded = eWORDTYPE_ADDED.0, - SWTDeleted = eWORDTYPE_DELETED.0, -}} -ENUM!{enum DISPID_SpeechLexiconWord { - DISPID_SLWLangId = 1, - DISPID_SLWType, - DISPID_SLWWord, - DISPID_SLWPronunciations, -}} -ENUM!{enum DISPID_SpeechLexiconProns { - DISPID_SLPsCount = 1, - DISPID_SLPsItem = ::DISPID_VALUE as u32, - DISPID_SLPs_NewEnum = ::DISPID_NEWENUM as u32, -}} -ENUM!{enum DISPID_SpeechLexiconPronunciation { - DISPID_SLPType = 1, - DISPID_SLPLangId, - DISPID_SLPPartOfSpeech, - DISPID_SLPPhoneIds, - DISPID_SLPSymbolic, -}} -ENUM!{enum DISPID_SpeechPhoneConverter { - DISPID_SPCLangId = 1, - DISPID_SPCPhoneToId, - DISPID_SPCIdToPhone, -}} -RIDL!( -interface ISpeechDataKey(ISpeechDataKeyVtbl): IDispatch(IDispatchVtbl) { - fn SetBinaryValue(&mut self, ValueName: ::BSTR, Value: ::VARIANT) -> ::HRESULT, - fn GetBinaryValue(&mut self, ValueName: ::BSTR, Value: *mut ::VARIANT) -> ::HRESULT, - fn SetStringValue(&mut self, ValueName: ::BSTR, Value: ::BSTR) -> ::HRESULT, - fn GetStringValue(&mut self, ValueName: ::BSTR, Value: *mut ::BSTR) -> ::HRESULT, - fn SetLongValue(&mut self, ValueName: ::BSTR, Value: ::c_long) -> ::HRESULT, - fn GetLongValue(&mut self, ValueName: ::BSTR, Value: *mut ::c_long) -> ::HRESULT, - fn OpenKey(&mut self, SubKeyName: ::BSTR, SubKey: *mut *mut ISpeechDataKey) -> ::HRESULT, - fn CreateKey(&mut self, SubKeyName: ::BSTR, SubKey: *mut *mut ISpeechDataKey) -> ::HRESULT, - fn DeleteKey(&mut self, SubKeyName: ::BSTR) -> ::HRESULT, - fn DeleteValue(&mut self, ValueName: ::BSTR) -> ::HRESULT, - fn EnumKeys(&mut self, Index: ::c_long, SubKeyName: *mut ::BSTR) -> ::HRESULT, - fn EnumValues(&mut self, Index: ::c_long, ValueName: *mut ::BSTR) -> ::HRESULT -} -); -RIDL!( -interface ISpeechObjectToken(ISpeechObjectTokenVtbl): IDispatch(IDispatchVtbl) { - fn get_Id(&mut self, ObjectId: *mut ::BSTR) -> ::HRESULT, - fn get_DataKey(&mut self, DataKey: *mut *mut ISpeechDataKey) -> ::HRESULT, - fn get_Category(&mut self, Category: *mut *mut ISpeechObjectTokenCategory) -> ::HRESULT, - fn GetDescription(&mut self, Locale: ::c_long, Description: *mut ::BSTR) -> ::HRESULT, - fn SetId( - &mut self, Id: ::BSTR, CategoryId: ::BSTR, CreateIfNotExist: ::VARIANT_BOOL - ) -> ::HRESULT, - fn GetAttribute(&mut self, AttributeName: ::BSTR, AttributeValue: *mut ::BSTR) -> ::HRESULT, - fn CreateInstance( - &mut self, pUnkOuter: *mut ::IUnknown, ClsContext: SpeechTokenContext, - Object: *mut *mut ::IUnknown - ) -> ::HRESULT, - fn Remove(&mut self, ObjectStorageCLSID: ::BSTR) -> ::HRESULT, - fn GetStorageFileName( - &mut self, ObjectStorageCLSID: ::BSTR, KeyName: ::BSTR, FileName: ::BSTR, Folder: ::BSTR, - FilePath: *mut ::BSTR - ) -> ::HRESULT, - fn RemoveStorageFileName( - &mut self, ObjectStorageCLSID: ::BSTR, KeyName: ::BSTR, DeleteFile: ::VARIANT_BOOL - ) -> ::HRESULT, - fn IsUISupported( - &mut self, TypeOfUI: ::BSTR, ExtraData: *const ::VARIANT, Object: *mut ::IUnknown, - Supported: *mut ::VARIANT_BOOL - ) -> ::HRESULT, - fn DisplayUI( - &mut self, hWnd: ::c_long, Title: ::BSTR, TypeOfUI: ::BSTR, ExtraData: *const ::VARIANT, - Object: *mut ::IUnknown - ) -> ::HRESULT, - fn MatchesAttributes(&mut self, Attributes: ::BSTR, Matches: *mut ::VARIANT_BOOL) -> ::HRESULT -} -); -RIDL!( -interface ISpeechObjectTokens(ISpeechObjectTokensVtbl): IDispatch(IDispatchVtbl) { - fn get_Count(&mut self, Count: *mut ::c_long) -> ::HRESULT, - fn Item(&mut self, Index: ::c_long, Token: *mut *mut ISpeechObjectToken) -> ::HRESULT, - fn get__NewEnum(&mut self, ppEnumVARIANT: *mut *mut ::IUnknown) -> ::HRESULT -} -); -RIDL!( -interface ISpeechObjectTokenCategory(ISpeechObjectTokenCategoryVtbl): IDispatch(IDispatchVtbl) { - fn get_Id(&mut self, Id: *mut ::BSTR) -> ::HRESULT, - fn put_Default(&mut self, TokenId: ::BSTR) -> ::HRESULT, - fn get_Default(&mut self, TokenId: *mut ::BSTR) -> ::HRESULT, - fn SetId(&mut self, Id: ::BSTR, CreateIfNotExist: ::VARIANT_BOOL) -> ::HRESULT, - fn GetDataKey( - &mut self, Location: SpeechDataKeyLocation, DataKey: *mut *mut ISpeechDataKey - ) -> ::HRESULT, - fn EnumerateTokens( - &mut self, RequiredAttributes: ::BSTR, OptionalAttributes: ::BSTR, - Tokens: *mut *mut ISpeechObjectTokens - ) -> ::HRESULT -} -); -RIDL!( -interface ISpeechAudioBufferInfo(ISpeechAudioBufferInfoVtbl): IDispatch(IDispatchVtbl) { - fn get_MinNotification(&mut self, MinNotification: *mut ::c_long) -> ::HRESULT, - fn put_MinNotification(&mut self, MinNotification: ::c_long) -> ::HRESULT, - fn get_BufferSize(&mut self, BufferSize: *mut ::c_long) -> ::HRESULT, - fn put_BufferSize(&mut self, BufferSize: ::c_long) -> ::HRESULT, - fn get_EventBias(&mut self, EventBias: *mut ::c_long) -> ::HRESULT, - fn put_EventBias(&mut self, EventBias: ::c_long) -> ::HRESULT -} -); -RIDL!( -interface ISpeechAudioStatus(ISpeechAudioStatusVtbl): IDispatch(IDispatchVtbl) { - fn get_FreeBufferSpace(&mut self, FreeBufferSpace: *mut ::c_long) -> ::HRESULT, - fn get_NonBlockingIO(&mut self, NonBlockingIO: *mut ::c_long) -> ::HRESULT, - fn get_State(&mut self, State: *mut SpeechAudioState) -> ::HRESULT, - fn get_CurrentSeekPosition(&mut self, CurrentSeekPosition: *mut ::VARIANT) -> ::HRESULT, - fn get_CurrentDevicePosition(&mut self, CurrentDevicePosition: *mut ::VARIANT) -> ::HRESULT -} -); -RIDL!( -interface ISpeechAudioFormat(ISpeechAudioFormatVtbl): IDispatch(IDispatchVtbl) { - fn get_Type(&mut self, AudioFormat: *mut SpeechAudioFormatType) -> ::HRESULT, - fn put_Type(&mut self, AudioFormat: SpeechAudioFormatType) -> ::HRESULT, - fn get_Guid(&mut self, Guid: *mut ::BSTR) -> ::HRESULT, - fn put_Guid(&mut self, Guid: ::BSTR) -> ::HRESULT, - fn GetWaveFormatEx(&mut self, SpeechWaveFormatEx: *mut *mut ISpeechWaveFormatEx) -> ::HRESULT, - fn SetWaveFormatEx(&mut self, SpeechWaveFormatEx: *mut ISpeechWaveFormatEx) -> ::HRESULT -} -); -RIDL!( -interface ISpeechWaveFormatEx(ISpeechWaveFormatExVtbl): IDispatch(IDispatchVtbl) { - fn get_FormatTag(&mut self, FormatTag: *mut ::c_short) -> ::HRESULT, - fn put_FormatTag(&mut self, FormatTag: ::c_short) -> ::HRESULT, - fn get_Channels(&mut self, Channels: *mut ::c_short) -> ::HRESULT, - fn put_Channels(&mut self, Channels: ::c_short) -> ::HRESULT, - fn get_SamplesPerSec(&mut self, SamplesPerSec: *mut ::c_long) -> ::HRESULT, - fn put_SamplesPerSec(&mut self, SamplesPerSec: ::c_long) -> ::HRESULT, - fn get_AvgBytesPerSec(&mut self, AvgBytesPerSec: *mut ::c_long) -> ::HRESULT, - fn put_AvgBytesPerSec(&mut self, AvgBytesPerSec: ::c_long) -> ::HRESULT, - fn get_BlockAlign(&mut self, BlockAlign: *mut ::c_short) -> ::HRESULT, - fn put_BlockAlign(&mut self, BlockAlign: ::c_short) -> ::HRESULT, - fn get_BitsPerSample(&mut self, BitsPerSample: *mut ::c_short) -> ::HRESULT, - fn put_BitsPerSample(&mut self, BitsPerSample: ::c_short) -> ::HRESULT, - fn get_ExtraData(&mut self, ExtraData: *mut ::VARIANT) -> ::HRESULT, - fn put_ExtraData(&mut self, ExtraData: ::VARIANT) -> ::HRESULT -} -); diff --git a/deps/winapi-0.2.5/src/schannel.rs b/deps/winapi-0.2.5/src/schannel.rs deleted file mode 100644 index 576844378..000000000 --- a/deps/winapi-0.2.5/src/schannel.rs +++ /dev/null @@ -1,342 +0,0 @@ -// Copyright © 2015, Peter Atashian -// Licensed under the MIT License <LICENSE.md> -//! Public Definitions for SCHANNEL Security Provider -pub const UNISP_NAME: &'static str = "Microsoft Unified Security Protocol Provider"; -pub const SSL2SP_NAME: &'static str = "Microsoft SSL 2.0"; -pub const SSL3SP_NAME: &'static str = "Microsoft SSL 3.0"; -pub const TLS1SP_NAME: &'static str = "Microsoft TLS 1.0"; -pub const PCT1SP_NAME: &'static str = "Microsoft PCT 1.0"; -pub const SCHANNEL_NAME: &'static str = "Schannel"; -ENUM!{enum eTlsSignatureAlgorithm { - TlsSignatureAlgorithm_Anonymous = 0, - TlsSignatureAlgorithm_Rsa = 1, - TlsSignatureAlgorithm_Dsa = 2, - TlsSignatureAlgorithm_Ecdsa = 3, -}} -ENUM!{enum eTlsHashAlgorithm { - TlsHashAlgorithm_None = 0, - TlsHashAlgorithm_Md5 = 1, - TlsHashAlgorithm_Sha1 = 2, - TlsHashAlgorithm_Sha224 = 3, - TlsHashAlgorithm_Sha256 = 4, - TlsHashAlgorithm_Sha384 = 5, - TlsHashAlgorithm_Sha512 = 6, -}} -pub const UNISP_RPC_ID: ::DWORD = 14; -STRUCT!{struct SecPkgContext_RemoteCredentialInfo { - cbCertificateChain: ::DWORD, - pbCertificateChain: ::PBYTE, - cCertificates: ::DWORD, - fFlags: ::DWORD, - dwBits: ::DWORD, -}} -pub type PSecPkgContext_RemoteCredentialInfo = *mut SecPkgContext_RemoteCredentialInfo; -pub type SecPkgContext_RemoteCredenitalInfo = SecPkgContext_RemoteCredentialInfo; -pub type PSecPkgContext_RemoteCredenitalInfo = *mut SecPkgContext_RemoteCredentialInfo; -pub const RCRED_STATUS_NOCRED: ::DWORD = 0x00000000; -pub const RCRED_CRED_EXISTS: ::DWORD = 0x00000001; -pub const RCRED_STATUS_UNKNOWN_ISSUER: ::DWORD = 0x00000002; -STRUCT!{struct SecPkgContext_LocalCredentialInfo { - cbCertificateChain: ::DWORD, - pbCertificateChain: ::PBYTE, - cCertificates: ::DWORD, - fFlags: ::DWORD, - dwBits: ::DWORD, -}} -pub type PSecPkgContext_LocalCredentialInfo = *mut SecPkgContext_LocalCredentialInfo; -pub type SecPkgContext_LocalCredenitalInfo = SecPkgContext_LocalCredentialInfo; -pub type PSecPkgContext_LocalCredenitalInfo = *mut SecPkgContext_LocalCredentialInfo; -pub const LCRED_STATUS_NOCRED: ::DWORD = 0x00000000; -pub const LCRED_CRED_EXISTS: ::DWORD = 0x00000001; -pub const LCRED_STATUS_UNKNOWN_ISSUER: ::DWORD = 0x00000002; -STRUCT!{struct SecPkgContext_ClientCertPolicyResult { - dwPolicyResult: ::HRESULT, - guidPolicyId: ::GUID, -}} -pub type PSecPkgContext_ClientCertPolicyResult = *mut SecPkgContext_ClientCertPolicyResult; -STRUCT!{struct SecPkgContext_IssuerListInfoEx { - aIssuers: ::PCERT_NAME_BLOB, - cIssuers: ::DWORD, -}} -pub type PSecPkgContext_IssuerListInfoEx = *mut SecPkgContext_IssuerListInfoEx; -STRUCT!{struct SecPkgContext_ConnectionInfo { - dwProtocol: ::DWORD, - aiCipher: ::ALG_ID, - dwCipherStrength: ::DWORD, - aiHash: ::ALG_ID, - dwHashStrength: ::DWORD, - aiExch: ::ALG_ID, - dwExchStrength: ::DWORD, -}} -pub type PSecPkgContext_ConnectionInfo = *mut SecPkgContext_ConnectionInfo; -pub const SZ_ALG_MAX_SIZE: usize = 64; -pub const SECPKGCONTEXT_CIPHERINFO_V1: ::DWORD = 1; -#[repr(C)] #[derive(Copy)] -pub struct SecPkgContext_CipherInfo { - pub dwVersion: ::DWORD, - pub dwProtocol: ::DWORD, - pub dwCipherSuite: ::DWORD, - pub dwBaseCipherSuite: ::DWORD, - pub szCipherSuite: [::WCHAR; SZ_ALG_MAX_SIZE], - pub szCipher: [::WCHAR; SZ_ALG_MAX_SIZE], - pub dwCipherLen: ::DWORD, - pub dwCipherBlockLen: ::DWORD, - pub szHash: [::WCHAR; SZ_ALG_MAX_SIZE], - pub dwHashLen: ::DWORD, - pub szExchange: [::WCHAR; SZ_ALG_MAX_SIZE], - pub dwMinExchangeLen: ::DWORD, - pub dwMaxExchangeLen: ::DWORD, - pub szCertificate: [::WCHAR; SZ_ALG_MAX_SIZE], - pub dwKeyType: ::DWORD, -} -impl Clone for SecPkgContext_CipherInfo { fn clone(&self) -> SecPkgContext_CipherInfo { *self } } -pub type PSecPkgContext_CipherInfo = *mut SecPkgContext_CipherInfo; -#[repr(C)] #[derive(Copy)] -pub struct SecPkgContext_EapKeyBlock { - pub rgbKeys: [::BYTE; 128], - pub rgbIVs: [::BYTE; 64], -} -impl Clone for SecPkgContext_EapKeyBlock { fn clone(&self) -> SecPkgContext_EapKeyBlock { *self } } -pub type PSecPkgContext_EapKeyBlock = *mut SecPkgContext_EapKeyBlock; -STRUCT!{struct SecPkgContext_MappedCredAttr { - dwAttribute: ::DWORD, - pvBuffer: ::PVOID, -}} -pub type PSecPkgContext_MappedCredAttr = *mut SecPkgContext_MappedCredAttr; -pub const SSL_SESSION_RECONNECT: ::DWORD = 1; -STRUCT!{struct SecPkgContext_SessionInfo { - dwFlags: ::DWORD, - cbSessionId: ::DWORD, - rgbSessionId: [::BYTE; 32], -}} -pub type PSecPkgContext_SessionInfo = *mut SecPkgContext_SessionInfo; -STRUCT!{struct SecPkgContext_SessionAppData { - dwFlags: ::DWORD, - cbAppData: ::DWORD, - pbAppData: ::PBYTE, -}} -pub type PSecPkgContext_SessionAppData = *mut SecPkgContext_SessionAppData; -STRUCT!{struct SecPkgContext_EapPrfInfo { - dwVersion: ::DWORD, - cbPrfData: ::DWORD, - pbPrfData: ::PBYTE, -}} -pub type PSecPkgContext_EapPrfInfo = *mut SecPkgContext_EapPrfInfo; -STRUCT!{struct SecPkgContext_SupportedSignatures { - cSignatureAndHashAlgorithms: ::WORD, - pSignatureAndHashAlgorithms: *mut ::WORD, -}} -pub type PSecPkgContext_SupportedSignatures = *mut SecPkgContext_SupportedSignatures; -STRUCT!{struct SecPkgContext_Certificates { - cCertificates: ::DWORD, - cbCertificateChain: ::DWORD, - pbCertificateChain: ::PBYTE, -}} -pub type PSecPkgContext_Certificates = *mut SecPkgContext_Certificates; -STRUCT!{struct SecPkgContext_CertInfo { - dwVersion: ::DWORD, - cbSubjectName: ::DWORD, - pwszSubjectName: ::LPWSTR, - cbIssuerName: ::DWORD, - pwszIssuerName: ::LPWSTR, - dwKeySize: ::DWORD, -}} -pub type PSecPkgContext_CertInfo = *mut SecPkgContext_CertInfo; -pub const KERN_CONTEXT_CERT_INFO_V1: ::DWORD = 0x00000000; -STRUCT!{struct SecPkgContext_UiInfo { - hParentWindow: ::HWND, -}} -pub type PSecPkgContext_UiInfo = *mut SecPkgContext_UiInfo; -STRUCT!{struct SecPkgContext_EarlyStart { - dwEarlyStartFlags: ::DWORD, -}} -pub type PSecPkgContext_EarlyStart = *mut SecPkgContext_EarlyStart; -pub const ENABLE_TLS_CLIENT_EARLY_START: ::DWORD = 0x00000001; -pub const SCH_CRED_V1: ::DWORD = 0x00000001; -pub const SCH_CRED_V2: ::DWORD = 0x00000002; -pub const SCH_CRED_VERSION: ::DWORD = 0x00000002; -pub const SCH_CRED_V3: ::DWORD = 0x00000003; -pub const SCHANNEL_CRED_VERSION: ::DWORD = 0x00000004; -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct _HMAPPER; -STRUCT!{struct SCHANNEL_CRED { - dwVersion: ::DWORD, - cCreds: ::DWORD, - paCred: *mut ::PCCERT_CONTEXT, - hRootStore: ::HCERTSTORE, - cMappers: ::DWORD, - aphMappers: *mut *mut _HMAPPER, - cSupportedAlgs: ::DWORD, - palgSupportedAlgs: *mut ::ALG_ID, - grbitEnabledProtocols: ::DWORD, - dwMinimumCipherStrength: ::DWORD, - dwMaximumCipherStrength: ::DWORD, - dwSessionLifespan: ::DWORD, - dwFlags: ::DWORD, - dwCredFormat: ::DWORD, -}} -pub type PSCHANNEL_CRED = *mut SCHANNEL_CRED; -pub const SCH_CRED_FORMAT_CERT_CONTEXT: ::DWORD = 0x00000000; -pub const SCH_CRED_FORMAT_CERT_HASH: ::DWORD = 0x00000001; -pub const SCH_CRED_FORMAT_CERT_HASH_STORE: ::DWORD = 0x00000002; -pub const SCH_CRED_MAX_STORE_NAME_SIZE: usize = 128; -pub const SCH_CRED_MAX_SUPPORTED_ALGS: ::DWORD = 256; -pub const SCH_CRED_MAX_SUPPORTED_CERTS: ::DWORD = 100; -STRUCT!{struct SCHANNEL_CERT_HASH { - dwLength: ::DWORD, - dwFlags: ::DWORD, - hProv: ::HCRYPTPROV, - ShaHash: [::BYTE; 20], -}} -pub type PSCHANNEL_CERT_HASH = *mut SCHANNEL_CERT_HASH; -#[repr(C)] #[derive(Copy)] -pub struct SCHANNEL_CERT_HASH_STORE { - pub dwLength: ::DWORD, - pub dwFlags: ::DWORD, - pub hProv: ::HCRYPTPROV, - pub ShaHash: [::BYTE; 20], - pub pwszStoreName: [::WCHAR; SCH_CRED_MAX_STORE_NAME_SIZE], -} -impl Clone for SCHANNEL_CERT_HASH_STORE { fn clone(&self) -> SCHANNEL_CERT_HASH_STORE { *self } } -pub type PSCHANNEL_CERT_HASH_STORE = *mut SCHANNEL_CERT_HASH_STORE; -pub const SCH_MACHINE_CERT_HASH: ::DWORD = 0x00000001; -pub const SCH_CRED_NO_SYSTEM_MAPPER: ::DWORD = 0x00000002; -pub const SCH_CRED_NO_SERVERNAME_CHECK: ::DWORD = 0x00000004; -pub const SCH_CRED_MANUAL_CRED_VALIDATION: ::DWORD = 0x00000008; -pub const SCH_CRED_NO_DEFAULT_CREDS: ::DWORD = 0x00000010; -pub const SCH_CRED_AUTO_CRED_VALIDATION: ::DWORD = 0x00000020; -pub const SCH_CRED_USE_DEFAULT_CREDS: ::DWORD = 0x00000040; -pub const SCH_CRED_DISABLE_RECONNECTS: ::DWORD = 0x00000080; -pub const SCH_CRED_REVOCATION_CHECK_END_CERT: ::DWORD = 0x00000100; -pub const SCH_CRED_REVOCATION_CHECK_CHAIN: ::DWORD = 0x00000200; -pub const SCH_CRED_REVOCATION_CHECK_CHAIN_EXCLUDE_ROOT: ::DWORD = 0x00000400; -pub const SCH_CRED_IGNORE_NO_REVOCATION_CHECK: ::DWORD = 0x00000800; -pub const SCH_CRED_IGNORE_REVOCATION_OFFLINE: ::DWORD = 0x00001000; -pub const SCH_CRED_RESTRICTED_ROOTS: ::DWORD = 0x00002000; -pub const SCH_CRED_REVOCATION_CHECK_CACHE_ONLY: ::DWORD = 0x00004000; -pub const SCH_CRED_CACHE_ONLY_URL_RETRIEVAL: ::DWORD = 0x00008000; -pub const SCH_CRED_MEMORY_STORE_CERT: ::DWORD = 0x00010000; -pub const SCH_CRED_CACHE_ONLY_URL_RETRIEVAL_ON_CREATE: ::DWORD = 0x00020000; -pub const SCH_SEND_ROOT_CERT: ::DWORD = 0x00040000; -pub const SCH_CRED_SNI_CREDENTIAL: ::DWORD = 0x00080000; -pub const SCH_CRED_SNI_ENABLE_OCSP: ::DWORD = 0x00100000; -pub const SCH_SEND_AUX_RECORD: ::DWORD = 0x00200000; -pub const SCH_USE_STRONG_CRYPTO: ::DWORD = 0x00400000; -pub const SCHANNEL_RENEGOTIATE: ::DWORD = 0; -pub const SCHANNEL_SHUTDOWN: ::DWORD = 1; -pub const SCHANNEL_ALERT: ::DWORD = 2; -pub const SCHANNEL_SESSION: ::DWORD = 3; -STRUCT!{struct SCHANNEL_ALERT_TOKEN { - dwTokenType: ::DWORD, - dwAlertType: ::DWORD, - dwAlertNumber: ::DWORD, -}} -pub const TLS1_ALERT_WARNING: ::DWORD = 1; -pub const TLS1_ALERT_FATAL: ::DWORD = 2; -pub const TLS1_ALERT_CLOSE_NOTIFY: ::DWORD = 0; -pub const TLS1_ALERT_UNEXPECTED_MESSAGE: ::DWORD = 10; -pub const TLS1_ALERT_BAD_RECORD_MAC: ::DWORD = 20; -pub const TLS1_ALERT_DECRYPTION_FAILED: ::DWORD = 21; -pub const TLS1_ALERT_RECORD_OVERFLOW: ::DWORD = 22; -pub const TLS1_ALERT_DECOMPRESSION_FAIL: ::DWORD = 30; -pub const TLS1_ALERT_HANDSHAKE_FAILURE: ::DWORD = 40; -pub const TLS1_ALERT_BAD_CERTIFICATE: ::DWORD = 42; -pub const TLS1_ALERT_UNSUPPORTED_CERT: ::DWORD = 43; -pub const TLS1_ALERT_CERTIFICATE_REVOKED: ::DWORD = 44; -pub const TLS1_ALERT_CERTIFICATE_EXPIRED: ::DWORD = 45; -pub const TLS1_ALERT_CERTIFICATE_UNKNOWN: ::DWORD = 46; -pub const TLS1_ALERT_ILLEGAL_PARAMETER: ::DWORD = 47; -pub const TLS1_ALERT_UNKNOWN_CA: ::DWORD = 48; -pub const TLS1_ALERT_ACCESS_DENIED: ::DWORD = 49; -pub const TLS1_ALERT_DECODE_ERROR: ::DWORD = 50; -pub const TLS1_ALERT_DECRYPT_ERROR: ::DWORD = 51; -pub const TLS1_ALERT_EXPORT_RESTRICTION: ::DWORD = 60; -pub const TLS1_ALERT_PROTOCOL_VERSION: ::DWORD = 70; -pub const TLS1_ALERT_INSUFFIENT_SECURITY: ::DWORD = 71; -pub const TLS1_ALERT_INTERNAL_ERROR: ::DWORD = 80; -pub const TLS1_ALERT_USER_CANCELED: ::DWORD = 90; -pub const TLS1_ALERT_NO_RENEGOTIATION: ::DWORD = 100; -pub const TLS1_ALERT_UNSUPPORTED_EXT: ::DWORD = 110; -pub const TLS1_ALERT_NO_APP_PROTOCOL: ::DWORD = 120; -pub const SSL_SESSION_ENABLE_RECONNECTS: ::DWORD = 1; -pub const SSL_SESSION_DISABLE_RECONNECTS: ::DWORD = 2; -STRUCT!{struct SCHANNEL_SESSION_TOKEN { - dwTokenType: ::DWORD, - dwFlags: ::DWORD, -}} -#[repr(C)] #[derive(Copy)] -pub struct SCHANNEL_CLIENT_SIGNATURE { - pub cbLength: ::DWORD, - pub aiHash: ::ALG_ID, - pub cbHash: ::DWORD, - pub HashValue: [::BYTE; 36], - pub CertThumbprint: [::BYTE; 20], -} -impl Clone for SCHANNEL_CLIENT_SIGNATURE { fn clone(&self) -> SCHANNEL_CLIENT_SIGNATURE { *self } } -pub type PSCHANNEL_CLIENT_SIGNATURE = *mut SCHANNEL_CLIENT_SIGNATURE; -pub const SP_PROT_PCT1_SERVER: ::DWORD = 0x00000001; -pub const SP_PROT_PCT1_CLIENT: ::DWORD = 0x00000002; -pub const SP_PROT_PCT1: ::DWORD = SP_PROT_PCT1_SERVER | SP_PROT_PCT1_CLIENT; -pub const SP_PROT_SSL2_SERVER: ::DWORD = 0x00000004; -pub const SP_PROT_SSL2_CLIENT: ::DWORD = 0x00000008; -pub const SP_PROT_SSL2: ::DWORD = SP_PROT_SSL2_SERVER | SP_PROT_SSL2_CLIENT; -pub const SP_PROT_SSL3_SERVER: ::DWORD = 0x00000010; -pub const SP_PROT_SSL3_CLIENT: ::DWORD = 0x00000020; -pub const SP_PROT_SSL3: ::DWORD = SP_PROT_SSL3_SERVER | SP_PROT_SSL3_CLIENT; -pub const SP_PROT_TLS1_SERVER: ::DWORD = 0x00000040; -pub const SP_PROT_TLS1_CLIENT: ::DWORD = 0x00000080; -pub const SP_PROT_TLS1: ::DWORD = SP_PROT_TLS1_SERVER | SP_PROT_TLS1_CLIENT; -pub const SP_PROT_SSL3TLS1_CLIENTS: ::DWORD = SP_PROT_TLS1_CLIENT | SP_PROT_SSL3_CLIENT; -pub const SP_PROT_SSL3TLS1_SERVERS: ::DWORD = SP_PROT_TLS1_SERVER | SP_PROT_SSL3_SERVER; -pub const SP_PROT_SSL3TLS1: ::DWORD = SP_PROT_SSL3 | SP_PROT_TLS1; -pub const SP_PROT_UNI_SERVER: ::DWORD = 0x40000000; -pub const SP_PROT_UNI_CLIENT: ::DWORD = 0x80000000; -pub const SP_PROT_UNI: ::DWORD = SP_PROT_UNI_SERVER | SP_PROT_UNI_CLIENT; -pub const SP_PROT_ALL: ::DWORD = 0xffffffff; -pub const SP_PROT_NONE: ::DWORD = 0; -pub const SP_PROT_CLIENTS: ::DWORD = SP_PROT_PCT1_CLIENT | SP_PROT_SSL2_CLIENT - | SP_PROT_SSL3_CLIENT | SP_PROT_UNI_CLIENT | SP_PROT_TLS1_CLIENT; -pub const SP_PROT_SERVERS: ::DWORD = SP_PROT_PCT1_SERVER | SP_PROT_SSL2_SERVER - | SP_PROT_SSL3_SERVER | SP_PROT_UNI_SERVER | SP_PROT_TLS1_SERVER; -pub const SP_PROT_TLS1_0_SERVER: ::DWORD = SP_PROT_TLS1_SERVER; -pub const SP_PROT_TLS1_0_CLIENT: ::DWORD = SP_PROT_TLS1_CLIENT; -pub const SP_PROT_TLS1_0: ::DWORD = SP_PROT_TLS1_0_SERVER | SP_PROT_TLS1_0_CLIENT; -pub const SP_PROT_TLS1_1_SERVER: ::DWORD = 0x00000100; -pub const SP_PROT_TLS1_1_CLIENT: ::DWORD = 0x00000200; -pub const SP_PROT_TLS1_1: ::DWORD = SP_PROT_TLS1_1_SERVER | SP_PROT_TLS1_1_CLIENT; -pub const SP_PROT_TLS1_2_SERVER: ::DWORD = 0x00000400; -pub const SP_PROT_TLS1_2_CLIENT: ::DWORD = 0x00000800; -pub const SP_PROT_TLS1_2: ::DWORD = SP_PROT_TLS1_2_SERVER | SP_PROT_TLS1_2_CLIENT; -pub const SP_PROT_DTLS_SERVER: ::DWORD = 0x00010000; -pub const SP_PROT_DTLS_CLIENT: ::DWORD = 0x00020000; -pub const SP_PROT_DTLS: ::DWORD = SP_PROT_DTLS_SERVER | SP_PROT_DTLS_CLIENT; -pub const SP_PROT_DTLS1_0_SERVER: ::DWORD = SP_PROT_DTLS_SERVER; -pub const SP_PROT_DTLS1_0_CLIENT: ::DWORD = SP_PROT_DTLS_CLIENT; -pub const SP_PROT_DTLS1_0: ::DWORD = SP_PROT_DTLS1_0_SERVER | SP_PROT_DTLS1_0_CLIENT; -pub const SP_PROT_DTLS1_X_SERVER: ::DWORD = SP_PROT_DTLS1_0_SERVER; -pub const SP_PROT_DTLS1_X_CLIENT: ::DWORD = SP_PROT_DTLS1_0_CLIENT; -pub const SP_PROT_DTLS1_X: ::DWORD = SP_PROT_DTLS1_X_SERVER | SP_PROT_DTLS1_X_CLIENT; -pub const SP_PROT_TLS1_1PLUS_SERVER: ::DWORD = SP_PROT_TLS1_1_SERVER | SP_PROT_TLS1_2_SERVER; -pub const SP_PROT_TLS1_1PLUS_CLIENT: ::DWORD = SP_PROT_TLS1_1_CLIENT | SP_PROT_TLS1_2_CLIENT; -pub const SP_PROT_TLS1_1PLUS: ::DWORD = SP_PROT_TLS1_1PLUS_SERVER | SP_PROT_TLS1_1PLUS_CLIENT; -pub const SP_PROT_TLS1_X_SERVER: ::DWORD = SP_PROT_TLS1_0_SERVER | SP_PROT_TLS1_1_SERVER - | SP_PROT_TLS1_2_SERVER; -pub const SP_PROT_TLS1_X_CLIENT: ::DWORD = SP_PROT_TLS1_0_CLIENT | SP_PROT_TLS1_1_CLIENT - | SP_PROT_TLS1_2_CLIENT; -pub const SP_PROT_TLS1_X: ::DWORD = SP_PROT_TLS1_X_SERVER | SP_PROT_TLS1_X_CLIENT; -pub const SP_PROT_SSL3TLS1_X_CLIENTS: ::DWORD = SP_PROT_TLS1_X_CLIENT | SP_PROT_SSL3_CLIENT; -pub const SP_PROT_SSL3TLS1_X_SERVERS: ::DWORD = SP_PROT_TLS1_X_SERVER | SP_PROT_SSL3_SERVER; -pub const SP_PROT_SSL3TLS1_X: ::DWORD = SP_PROT_SSL3 | SP_PROT_TLS1_X; -pub const SP_PROT_X_CLIENTS: ::DWORD = SP_PROT_CLIENTS | SP_PROT_TLS1_X_CLIENT - | SP_PROT_DTLS1_X_CLIENT; -pub const SP_PROT_X_SERVERS: ::DWORD = SP_PROT_SERVERS | SP_PROT_TLS1_X_SERVER - | SP_PROT_DTLS1_X_SERVER; -//716 -pub const SCHANNEL_SECRET_TYPE_CAPI: ::DWORD = 0x00000001; -pub const SCHANNEL_SECRET_PRIVKEY: ::DWORD = 0x00000002; -pub const SCH_CRED_X509_CERTCHAIN: ::DWORD = 0x00000001; -pub const SCH_CRED_X509_CAPI: ::DWORD = 0x00000002; -pub const SCH_CRED_CERT_CONTEXT: ::DWORD = 0x00000003; -//838 -pub const SSL_CRACK_CERTIFICATE_NAME: &'static str = "SslCrackCertificate"; -pub const SSL_FREE_CERTIFICATE_NAME: &'static str = "SslFreeCertificate"; diff --git a/deps/winapi-0.2.5/src/setupapi.rs b/deps/winapi-0.2.5/src/setupapi.rs deleted file mode 100644 index 6237625e5..000000000 --- a/deps/winapi-0.2.5/src/setupapi.rs +++ /dev/null @@ -1,1379 +0,0 @@ -// Copyright © 2015, skdltmxn -// Licensed under the MIT License <LICENSE.md> -//! Windows NT Setup and Device Installer services -pub const LINE_LEN: usize = 256; -pub const MAX_INF_STRING_LENGTH: usize = 4096; -pub const MAX_INF_SECTION_NAME_LENGTH: usize = 255; -pub const MAX_TITLE_LEN: usize = 60; -pub const MAX_INSTRUCTION_LEN: usize = 256; -pub const MAX_LABEL_LEN: usize = 30; -pub const MAX_SERVICE_NAME_LEN: usize = 256; -pub const MAX_SUBTITLE_LEN: usize = 256; -pub const SP_MAX_MACHINENAME_LENGTH: usize = ::MAX_PATH + 3; -pub type HINF = ::PVOID; -STRUCT!{struct INFCONTEXT { - Inf: ::PVOID, - CurrentInf: ::PVOID, - Section: ::UINT, - Line: ::UINT, -}} -pub type PINFCONTEXT = *mut INFCONTEXT; -STRUCT!{struct SP_INF_INFORMATION { - InfStyle: ::DWORD, - InfCount: ::DWORD, - VersionData: [::BYTE; ::ANYSIZE_ARRAY], -}} -pub type PSP_INF_INFORMATION = *mut SP_INF_INFORMATION; -STRUCT!{struct SP_ALTPLATFORM_INFO_V2 { - cbSize: ::DWORD, - Platform: ::DWORD, - MajorVersion: ::DWORD, - MinorVersion: ::DWORD, - ProcessorArchitecture: ::WORD, - Reserved: ::WORD, - FirstValidatedMajorVersion: ::DWORD, - FirstValidatedMinorVersion: ::DWORD, -}} -UNION!(SP_ALTPLATFORM_INFO_V2, Reserved, Flags, Flags_mut, ::WORD); -pub type PSP_ALTPLATFORM_INFO_V2 = *mut SP_ALTPLATFORM_INFO_V2; -STRUCT!{struct SP_ALTPLATFORM_INFO_V1 { - cbSize: ::DWORD, - Platform: ::DWORD, - MajorVersion: ::DWORD, - MinorVersion: ::DWORD, - ProcessorArchitecture: ::WORD, - Reserved: ::WORD, -}} -pub type PSP_ALTPLATFORM_INFO_V1 = *mut SP_ALTPLATFORM_INFO_V1; -pub type SP_ALTPLATFORM_INFO = SP_ALTPLATFORM_INFO_V2; -pub type PSP_ALTPLATFORM_INFO = PSP_ALTPLATFORM_INFO_V2; -pub const SP_ALTPLATFORM_FLAGS_VERSION_RANGE: ::WORD = 0x0001; -#[repr(C)] #[derive(Copy)] -pub struct SP_ORIGINAL_FILE_INFO_A { - pub cbSize: ::DWORD, - pub OriginalInfName: [::CHAR; ::MAX_PATH], - pub OriginalCatalogName: [::CHAR; ::MAX_PATH], -} -impl Clone for SP_ORIGINAL_FILE_INFO_A { fn clone(&self) -> SP_ORIGINAL_FILE_INFO_A { *self } } -pub type PSP_ORIGINAL_FILE_INFO_A = *mut SP_ORIGINAL_FILE_INFO_A; -#[repr(C)] #[derive(Copy)] -pub struct SP_ORIGINAL_FILE_INFO_W { - pub cbSize: ::DWORD, - pub OriginalInfName: [::WCHAR; ::MAX_PATH], - pub OriginalCatalogName: [::WCHAR; ::MAX_PATH], -} -impl Clone for SP_ORIGINAL_FILE_INFO_W { fn clone(&self) -> SP_ORIGINAL_FILE_INFO_W { *self } } -pub type PSP_ORIGINAL_FILE_INFO_W = *mut SP_ORIGINAL_FILE_INFO_W; -pub const INF_STYLE_NONE: ::DWORD = 0x00000000; -pub const INF_STYLE_OLDNT: ::DWORD = 0x00000001; -pub const INF_STYLE_WIN4: ::DWORD = 0x00000002; -pub const INF_STYLE_CACHE_ENABLE: ::DWORD = 0x00000010; -pub const INF_STYLE_CACHE_DISABLE: ::DWORD = 0x00000020; -pub const INF_STYLE_CACHE_IGNORE: ::DWORD = 0x00000040; -pub const DIRID_ABSOLUTE: ::DWORD = 0 - 1; -pub const DIRID_ABSOLUTE_16BIT: ::DWORD = 0xffff; -pub const DIRID_NULL: ::DWORD = 0; -pub const DIRID_SRCPATH: ::DWORD = 1; -pub const DIRID_WINDOWS: ::DWORD = 10; -pub const DIRID_SYSTEM: ::DWORD = 11; -pub const DIRID_DRIVERS: ::DWORD = 12; -pub const DIRID_IOSUBSYS: ::DWORD = DIRID_DRIVERS; -pub const DIRID_DRIVER_STORE: ::DWORD = 13; -pub const DIRID_INF: ::DWORD = 17; -pub const DIRID_HELP: ::DWORD = 18; -pub const DIRID_FONTS: ::DWORD = 20; -pub const DIRID_VIEWERS: ::DWORD = 21; -pub const DIRID_COLOR: ::DWORD = 23; -pub const DIRID_APPS: ::DWORD = 24; -pub const DIRID_SHARED: ::DWORD = 25; -pub const DIRID_BOOT: ::DWORD = 30; -pub const DIRID_SYSTEM16: ::DWORD = 50; -pub const DIRID_SPOOL: ::DWORD = 51; -pub const DIRID_SPOOLDRIVERS: ::DWORD = 52; -pub const DIRID_USERPROFILE: ::DWORD = 53; -pub const DIRID_LOADER: ::DWORD = 54; -pub const DIRID_PRINTPROCESSOR: ::DWORD = 55; -pub const DIRID_DEFAULT: ::DWORD = DIRID_SYSTEM; -pub const DIRID_COMMON_STARTMENU: ::DWORD = 16406; -pub const DIRID_COMMON_PROGRAMS: ::DWORD = 16407; -pub const DIRID_COMMON_STARTUP: ::DWORD = 16408; -pub const DIRID_COMMON_DESKTOPDIRECTORY: ::DWORD = 16409; -pub const DIRID_COMMON_FAVORITES: ::DWORD = 16415; -pub const DIRID_COMMON_APPDATA: ::DWORD = 16419; -pub const DIRID_PROGRAM_FILES: ::DWORD = 16422; -pub const DIRID_SYSTEM_X86: ::DWORD = 16425; -pub const DIRID_PROGRAM_FILES_X86: ::DWORD = 16426; -pub const DIRID_PROGRAM_FILES_COMMON: ::DWORD = 16427; -pub const DIRID_PROGRAM_FILES_COMMONX86: ::DWORD = 16428; -pub const DIRID_COMMON_TEMPLATES: ::DWORD = 16429; -pub const DIRID_COMMON_DOCUMENTS: ::DWORD = 16430; -pub const DIRID_USER: ::DWORD = 0x8000; -pub type PSP_FILE_CALLBACK_A = Option<unsafe extern "system" fn( - Context: ::PVOID, Notification: ::UINT, Param1: ::UINT_PTR, Param2: ::UINT_PTR, -) -> ::UINT>; -pub type PSP_FILE_CALLBACK_W = Option<unsafe extern "system" fn( - Context: ::PVOID, Notification: ::UINT, Param1: ::UINT_PTR, Param2: ::UINT_PTR, -) -> ::UINT>; -pub const SPFILENOTIFY_STARTQUEUE: ::UINT = 0x00000001; -pub const SPFILENOTIFY_ENDQUEUE: ::UINT = 0x00000002; -pub const SPFILENOTIFY_STARTSUBQUEUE: ::UINT = 0x00000003; -pub const SPFILENOTIFY_ENDSUBQUEUE: ::UINT = 0x00000004; -pub const SPFILENOTIFY_STARTDELETE: ::UINT = 0x00000005; -pub const SPFILENOTIFY_ENDDELETE: ::UINT = 0x00000006; -pub const SPFILENOTIFY_DELETEERROR: ::UINT = 0x00000007; -pub const SPFILENOTIFY_STARTRENAME: ::UINT = 0x00000008; -pub const SPFILENOTIFY_ENDRENAME: ::UINT = 0x00000009; -pub const SPFILENOTIFY_RENAMEERROR: ::UINT = 0x0000000a; -pub const SPFILENOTIFY_STARTCOPY: ::UINT = 0x0000000b; -pub const SPFILENOTIFY_ENDCOPY: ::UINT = 0x0000000c; -pub const SPFILENOTIFY_COPYERROR: ::UINT = 0x0000000d; -pub const SPFILENOTIFY_NEEDMEDIA: ::UINT = 0x0000000e; -pub const SPFILENOTIFY_QUEUESCAN: ::UINT = 0x0000000f; -pub const SPFILENOTIFY_CABINETINFO: ::UINT = 0x00000010; -pub const SPFILENOTIFY_FILEINCABINET: ::UINT = 0x00000011; -pub const SPFILENOTIFY_NEEDNEWCABINET: ::UINT = 0x00000012; -pub const SPFILENOTIFY_FILEEXTRACTED: ::UINT = 0x00000013; -pub const SPFILENOTIFY_FILEOPDELAYED: ::UINT = 0x00000014; -pub const SPFILENOTIFY_STARTBACKUP: ::UINT = 0x00000015; -pub const SPFILENOTIFY_BACKUPERROR: ::UINT = 0x00000016; -pub const SPFILENOTIFY_ENDBACKUP: ::UINT = 0x00000017; -pub const SPFILENOTIFY_QUEUESCAN_EX: ::UINT = 0x00000018; -pub const SPFILENOTIFY_STARTREGISTRATION: ::UINT = 0x00000019; -pub const SPFILENOTIFY_ENDREGISTRATION: ::UINT = 0x00000020; -pub const SPFILENOTIFY_QUEUESCAN_SIGNERINFO: ::UINT = 0x00000040; -pub const SPFILENOTIFY_LANGMISMATCH: ::UINT = 0x00010000; -pub const SPFILENOTIFY_TARGETEXISTS: ::UINT = 0x00020000; -pub const SPFILENOTIFY_TARGETNEWER: ::UINT = 0x00040000; -pub const FILEOP_COPY: ::UINT = 0; -pub const FILEOP_RENAME: ::UINT = 1; -pub const FILEOP_DELETE: ::UINT = 2; -pub const FILEOP_BACKUP: ::UINT = 3; -pub const FILEOP_ABORT: ::UINT = 0; -pub const FILEOP_DOIT: ::UINT = 1; -pub const FILEOP_SKIP: ::UINT = 2; -pub const FILEOP_RETRY: ::UINT = FILEOP_DOIT; -pub const FILEOP_NEWPATH: ::UINT = 4; -pub const COPYFLG_WARN_IF_SKIP: ::UINT = 0x00000001; -pub const COPYFLG_NOSKIP: ::UINT = 0x00000002; -pub const COPYFLG_NOVERSIONCHECK: ::UINT = 0x00000004; -pub const COPYFLG_FORCE_FILE_IN_USE: ::UINT = 0x00000008; -pub const COPYFLG_NO_OVERWRITE: ::UINT = 0x00000010; -pub const COPYFLG_NO_VERSION_DIALOG: ::UINT = 0x00000020; -pub const COPYFLG_OVERWRITE_OLDER_ONLY: ::UINT = 0x00000040; -pub const COPYFLG_PROTECTED_WINDOWS_DRIVER_FILE: ::UINT = 0x00000100; -pub const COPYFLG_REPLACEONLY: ::UINT = 0x00000400; -pub const COPYFLG_NODECOMP: ::UINT = 0x00000800; -pub const COPYFLG_REPLACE_BOOT_FILE: ::UINT = 0x00001000; -pub const COPYFLG_NOPRUNE: ::UINT = 0x00002000; -pub const COPYFLG_IN_USE_TRY_RENAME: ::UINT = 0x00004000; -pub const DELFLG_IN_USE: ::UINT = 0x00000001; -pub const DELFLG_IN_USE1: ::UINT = 0x00010000; -STRUCT!{struct FILEPATHS_A { - Target: ::PCSTR, - Source: ::PCSTR, - Win32Error: ::UINT, - Flags: ::DWORD, -}} -pub type PFILEPATHS_A = *mut FILEPATHS_A; -STRUCT!{struct FILEPATHS_W { - Target: ::PCWSTR, - Source: ::PCWSTR, - Win32Error: ::UINT, - Flags: ::DWORD, -}} -pub type PFILEPATHS_W = *mut FILEPATHS_W; -STRUCT!{struct FILEPATHS_SIGNERINFO_A { - Target: ::PCSTR, - Source: ::PCSTR, - Win32Error: ::UINT, - Flags: ::DWORD, - DigitalSigner: ::PCSTR, - Version: ::PCSTR, - CatalogFile: ::PCSTR, -}} -pub type PFILEPATHS_SIGNERINFO_A = *mut FILEPATHS_SIGNERINFO_A; -STRUCT!{struct FILEPATHS_SIGNERINFO_W { - Target: ::PCWSTR, - Source: ::PCWSTR, - Win32Error: ::UINT, - Flags: ::DWORD, - DigitalSigner: ::PCWSTR, - Version: ::PCWSTR, - CatalogFile: ::PCWSTR, -}} -pub type PFILEPATHS_SIGNERINFO_W = *mut FILEPATHS_SIGNERINFO_W; -STRUCT!{struct SOURCE_MEDIA_A { - Reserved: ::PCSTR, - Tagfile: ::PCSTR, - Description: ::PCSTR, - SourcePath: ::PCSTR, - SourceFile: ::PCSTR, - Flags: ::DWORD, -}} -pub type PSOURCE_MEDIA_A = *mut SOURCE_MEDIA_A; -STRUCT!{struct SOURCE_MEDIA_W { - Reserved: ::PCWSTR, - Tagfile: ::PCWSTR, - Description: ::PCWSTR, - SourcePath: ::PCWSTR, - SourceFile: ::PCWSTR, - Flags: ::DWORD, -}} -pub type PSOURCE_MEDIA_W = *mut SOURCE_MEDIA_W; -STRUCT!{struct CABINET_INFO_A { - CabinetPath: ::PCSTR, - CabinetFile: ::PCSTR, - DiskName: ::PCSTR, - SetId: ::USHORT, - CabinetNumber: ::USHORT, -}} -pub type PCABINET_INFO_A = *mut CABINET_INFO_A; -STRUCT!{struct CABINET_INFO_W { - CabinetPath: ::PCWSTR, - CabinetFile: ::PCWSTR, - DiskName: ::PCWSTR, - SetId: ::USHORT, - CabinetNumber: ::USHORT, -}} -pub type PCABINET_INFO_W = *mut CABINET_INFO_W; -#[repr(C)] #[derive(Copy)] -pub struct FILE_IN_CABINET_INFO_A { - pub NameInCabinet: ::PCSTR, - pub FileSize: ::DWORD, - pub Win32Error: ::DWORD, - pub DosDate: ::WORD, - pub DosTime: ::WORD, - pub DosAttribs: ::WORD, - pub FullTargetName: [::CHAR; ::MAX_PATH], -} -impl Clone for FILE_IN_CABINET_INFO_A { fn clone(&self) -> FILE_IN_CABINET_INFO_A { *self } } -pub type PFILE_IN_CABINET_INFO_A = *mut FILE_IN_CABINET_INFO_A; -#[repr(C)] #[derive(Copy)] -pub struct FILE_IN_CABINET_INFO_W { - pub NameInCabinet: ::PCWSTR, - pub FileSize: ::DWORD, - pub Win32Error: ::DWORD, - pub DosDate: ::WORD, - pub DosTime: ::WORD, - pub DosAttribs: ::WORD, - pub FullTargetName: [::WCHAR; ::MAX_PATH], -} -impl Clone for FILE_IN_CABINET_INFO_W { fn clone(&self) -> FILE_IN_CABINET_INFO_W { *self } } -pub type PFILE_IN_CABINET_INFO_W = *mut FILE_IN_CABINET_INFO_W; -STRUCT!{struct SP_REGISTER_CONTROL_STATUSA { - cbSize: ::DWORD, - FileName: ::PCSTR, - Win32Error: ::DWORD, - FailureCode: ::DWORD, -}} -pub type PSP_REGISTER_CONTROL_STATUSA = *mut SP_REGISTER_CONTROL_STATUSA; -STRUCT!{struct SP_REGISTER_CONTROL_STATUSW { - cbSize: ::DWORD, - FileName: ::PCWSTR, - Win32Error: ::DWORD, - FailureCode: ::DWORD, -}} -pub type PSP_REGISTER_CONTROL_STATUSW = *mut SP_REGISTER_CONTROL_STATUSW; -pub const SPREG_SUCCESS: ::DWORD = 0x00000000; -pub const SPREG_LOADLIBRARY: ::DWORD = 0x00000001; -pub const SPREG_GETPROCADDR: ::DWORD = 0x00000002; -pub const SPREG_REGSVR: ::DWORD = 0x00000003; -pub const SPREG_DLLINSTALL: ::DWORD = 0x00000004; -pub const SPREG_TIMEOUT: ::DWORD = 0x00000005; -pub const SPREG_UNKNOWN: ::DWORD = 0xFFFFFFFF; -pub type HSPFILEQ = ::PVOID; -STRUCT!{struct SP_FILE_COPY_PARAMS_A { - cbSize: ::DWORD, - QueueHandle: HSPFILEQ, - SourceRootPath: ::PCSTR, - SourcePath: ::PCSTR, - SourceFilename: ::PCSTR, - SourceDescription: ::PCSTR, - SourceTagfile: ::PCSTR, - TargetDirectory: ::PCSTR, - TargetFilename: ::PCSTR, - CopyStyle: ::DWORD, - LayoutInf: HINF, - SecurityDescriptor: ::PCSTR, -}} -pub type PSP_FILE_COPY_PARAMS_A = *mut SP_FILE_COPY_PARAMS_A; -STRUCT!{struct SP_FILE_COPY_PARAMS_W { - cbSize: ::DWORD, - QueueHandle: HSPFILEQ, - SourceRootPath: ::PCWSTR, - SourcePath: ::PCWSTR, - SourceFilename: ::PCWSTR, - SourceDescription: ::PCWSTR, - SourceTagfile: ::PCWSTR, - TargetDirectory: ::PCWSTR, - TargetFilename: ::PCWSTR, - CopyStyle: ::DWORD, - LayoutInf: HINF, - SecurityDescriptor: ::PCWSTR, -}} -pub type PSP_FILE_COPY_PARAMS_W = *mut SP_FILE_COPY_PARAMS_W; -pub type HDSKSPC = ::PVOID; -pub type HDEVINFO = ::PVOID; -STRUCT!{struct SP_DEVINFO_DATA { - cbSize: ::DWORD, - ClassGuid: ::GUID, - DevInst: ::DWORD, - Reserved: ::ULONG_PTR, -}} -pub type PSP_DEVINFO_DATA = *mut SP_DEVINFO_DATA; -STRUCT!{struct SP_DEVICE_INTERFACE_DATA { - cbSize: ::DWORD, - InterfaceClassGuid: ::GUID, - Flags: ::DWORD, - Reserved: ::ULONG_PTR, -}} -pub type PSP_DEVICE_INTERFACE_DATA = *mut SP_DEVICE_INTERFACE_DATA; -pub const SPINT_ACTIVE: ::DWORD = 0x00000001; -pub const SPINT_DEFAULT: ::DWORD = 0x00000002; -pub const SPINT_REMOVED: ::DWORD = 0x00000004; -pub type SP_INTERFACE_DEVICE_DATA = SP_DEVICE_INTERFACE_DATA; -pub type PSP_INTERFACE_DEVICE_DATA = PSP_DEVICE_INTERFACE_DATA; -pub const SPID_ACTIVE: ::DWORD = SPINT_ACTIVE; -pub const SPID_DEFAULT: ::DWORD = SPINT_DEFAULT; -pub const SPID_REMOVED: ::DWORD = SPINT_REMOVED; -STRUCT!{struct SP_DEVICE_INTERFACE_DETAIL_DATA_A { - cbSize: ::DWORD, - DevicePath: [::CHAR; ::ANYSIZE_ARRAY], -}} -pub type PSP_DEVICE_INTERFACE_DETAIL_DATA_A = *mut SP_DEVICE_INTERFACE_DETAIL_DATA_A; -STRUCT!{struct SP_DEVICE_INTERFACE_DETAIL_DATA_W { - cbSize: ::DWORD, - DevicePath: [::WCHAR; ::ANYSIZE_ARRAY], -}} -pub type PSP_DEVICE_INTERFACE_DETAIL_DATA_W = *mut SP_DEVICE_INTERFACE_DETAIL_DATA_W; -#[repr(C)] #[derive(Copy)] -pub struct SP_DEVINFO_LIST_DETAIL_DATA_A { - pub cbSize: ::DWORD, - pub ClassGuid: ::GUID, - pub RemoteMachineHandle: ::HANDLE, - pub RemoteMachineName: [::CHAR; SP_MAX_MACHINENAME_LENGTH], -} -impl Clone for SP_DEVINFO_LIST_DETAIL_DATA_A { - fn clone(&self) -> SP_DEVINFO_LIST_DETAIL_DATA_A { *self } -} -pub type PSP_DEVINFO_LIST_DETAIL_DATA_A = *mut SP_DEVINFO_LIST_DETAIL_DATA_A; -#[repr(C)] #[derive(Copy)] -pub struct SP_DEVINFO_LIST_DETAIL_DATA_W { - pub cbSize: ::DWORD, - pub ClassGuid: ::GUID, - pub RemoteMachineHandle: ::HANDLE, - pub RemoteMachineName: [::WCHAR; SP_MAX_MACHINENAME_LENGTH], -} -impl Clone for SP_DEVINFO_LIST_DETAIL_DATA_W { - fn clone(&self) -> SP_DEVINFO_LIST_DETAIL_DATA_W { *self } -} -pub type PSP_DEVINFO_LIST_DETAIL_DATA_W = *mut SP_DEVINFO_LIST_DETAIL_DATA_W; -pub const DIF_SELECTDEVICE: DI_FUNCTION = 0x00000001; -pub const DIF_INSTALLDEVICE: DI_FUNCTION = 0x00000002; -pub const DIF_ASSIGNRESOURCES: DI_FUNCTION = 0x00000003; -pub const DIF_PROPERTIES: DI_FUNCTION = 0x00000004; -pub const DIF_REMOVE: DI_FUNCTION = 0x00000005; -pub const DIF_FIRSTTIMESETUP: DI_FUNCTION = 0x00000006; -pub const DIF_FOUNDDEVICE: DI_FUNCTION = 0x00000007; -pub const DIF_SELECTCLASSDRIVERS: DI_FUNCTION = 0x00000008; -pub const DIF_VALIDATECLASSDRIVERS: DI_FUNCTION = 0x00000009; -pub const DIF_INSTALLCLASSDRIVERS: DI_FUNCTION = 0x0000000A; -pub const DIF_CALCDISKSPACE: DI_FUNCTION = 0x0000000B; -pub const DIF_DESTROYPRIVATEDATA: DI_FUNCTION = 0x0000000C; -pub const DIF_VALIDATEDRIVER: DI_FUNCTION = 0x0000000D; -pub const DIF_DETECT: DI_FUNCTION = 0x0000000F; -pub const DIF_INSTALLWIZARD: DI_FUNCTION = 0x00000010; -pub const DIF_DESTROYWIZARDDATA: DI_FUNCTION = 0x00000011; -pub const DIF_PROPERTYCHANGE: DI_FUNCTION = 0x00000012; -pub const DIF_ENABLECLASS: DI_FUNCTION = 0x00000013; -pub const DIF_DETECTVERIFY: DI_FUNCTION = 0x00000014; -pub const DIF_INSTALLDEVICEFILES: DI_FUNCTION = 0x00000015; -pub const DIF_UNREMOVE: DI_FUNCTION = 0x00000016; -pub const DIF_SELECTBESTCOMPATDRV: DI_FUNCTION = 0x00000017; -pub const DIF_ALLOW_INSTALL: DI_FUNCTION = 0x00000018; -pub const DIF_REGISTERDEVICE: DI_FUNCTION = 0x00000019; -pub const DIF_NEWDEVICEWIZARD_PRESELECT: DI_FUNCTION = 0x0000001A; -pub const DIF_NEWDEVICEWIZARD_SELECT: DI_FUNCTION = 0x0000001B; -pub const DIF_NEWDEVICEWIZARD_PREANALYZE: DI_FUNCTION = 0x0000001C; -pub const DIF_NEWDEVICEWIZARD_POSTANALYZE: DI_FUNCTION = 0x0000001D; -pub const DIF_NEWDEVICEWIZARD_FINISHINSTALL: DI_FUNCTION = 0x0000001E; -pub const DIF_UNUSED1: DI_FUNCTION = 0x0000001F; -pub const DIF_INSTALLINTERFACES: DI_FUNCTION = 0x00000020; -pub const DIF_DETECTCANCEL: DI_FUNCTION = 0x00000021; -pub const DIF_REGISTER_COINSTALLERS: DI_FUNCTION = 0x00000022; -pub const DIF_ADDPROPERTYPAGE_ADVANCED: DI_FUNCTION = 0x00000023; -pub const DIF_ADDPROPERTYPAGE_BASIC: DI_FUNCTION = 0x00000024; -pub const DIF_RESERVED1: DI_FUNCTION = 0x00000025; -pub const DIF_TROUBLESHOOTER: DI_FUNCTION = 0x00000026; -pub const DIF_POWERMESSAGEWAKE: DI_FUNCTION = 0x00000027; -pub const DIF_ADDREMOTEPROPERTYPAGE_ADVANCED: DI_FUNCTION = 0x00000028; -pub const DIF_UPDATEDRIVER_UI: DI_FUNCTION = 0x00000029; -pub const DIF_FINISHINSTALL_ACTION: DI_FUNCTION = 0x0000002A; -pub const DIF_RESERVED2: DI_FUNCTION = 0x00000030; -pub const DIF_MOVEDEVICE: DI_FUNCTION = 0x0000000E; -pub type DI_FUNCTION = ::UINT; -#[repr(C)] #[derive(Copy)] -pub struct SP_DEVINSTALL_PARAMS_A { - pub cbSize: ::DWORD, - pub Flags: ::DWORD, - pub FlagsEx: ::DWORD, - pub hwndParent: ::HWND, - pub InstallMsgHandler: PSP_FILE_CALLBACK_A, - pub InstallMsgHandlerContext: ::PVOID, - pub FileQueue: HSPFILEQ, - pub ClassInstallReserved: ::ULONG_PTR, - pub Reserved: ::DWORD, - pub DriverPath: [::CHAR; ::MAX_PATH], -} -impl Clone for SP_DEVINSTALL_PARAMS_A { fn clone(&self) -> SP_DEVINSTALL_PARAMS_A { *self } } -pub type PSP_DEVINSTALL_PARAMS_A = *mut SP_DEVINSTALL_PARAMS_A; -#[repr(C)] #[derive(Copy)] -pub struct SP_DEVINSTALL_PARAMS_W { - pub cbSize: ::DWORD, - pub Flags: ::DWORD, - pub FlagsEx: ::DWORD, - pub hwndParent: ::HWND, - pub InstallMsgHandler: PSP_FILE_CALLBACK_W, - pub InstallMsgHandlerContext: ::PVOID, - pub FileQueue: HSPFILEQ, - pub ClassInstallReserved: ::ULONG_PTR, - pub Reserved: ::DWORD, - pub DriverPath: [::WCHAR; ::MAX_PATH], -} -impl Clone for SP_DEVINSTALL_PARAMS_W { fn clone(&self) -> SP_DEVINSTALL_PARAMS_W { *self } } -pub type PSP_DEVINSTALL_PARAMS_W = *mut SP_DEVINSTALL_PARAMS_W; -pub const DI_SHOWOEM: ::DWORD = 0x00000001; -pub const DI_SHOWCOMPAT: ::DWORD = 0x00000002; -pub const DI_SHOWCLASS: ::DWORD = 0x00000004; -pub const DI_SHOWALL: ::DWORD = 0x00000007; -pub const DI_NOVCP: ::DWORD = 0x00000008; -pub const DI_DIDCOMPAT: ::DWORD = 0x00000010; -pub const DI_DIDCLASS: ::DWORD = 0x00000020; -pub const DI_AUTOASSIGNRES: ::DWORD = 0x00000040; -pub const DI_NEEDRESTART: ::DWORD = 0x00000080; -pub const DI_NEEDREBOOT: ::DWORD = 0x00000100; -pub const DI_NOBROWSE: ::DWORD = 0x00000200; -pub const DI_MULTMFGS: ::DWORD = 0x00000400; -pub const DI_DISABLED: ::DWORD = 0x00000800; -pub const DI_GENERALPAGE_ADDED: ::DWORD = 0x00001000; -pub const DI_RESOURCEPAGE_ADDED: ::DWORD = 0x00002000; -pub const DI_PROPERTIES_CHANGE: ::DWORD = 0x00004000; -pub const DI_INF_IS_SORTED: ::DWORD = 0x00008000; -pub const DI_ENUMSINGLEINF: ::DWORD = 0x00010000; -pub const DI_DONOTCALLCONFIGMG: ::DWORD = 0x00020000; -pub const DI_INSTALLDISABLED: ::DWORD = 0x00040000; -pub const DI_COMPAT_FROM_CLASS: ::DWORD = 0x00080000; -pub const DI_CLASSINSTALLPARAMS: ::DWORD = 0x00100000; -pub const DI_NODI_DEFAULTACTION: ::DWORD = 0x00200000; -pub const DI_QUIETINSTALL: ::DWORD = 0x00800000; -pub const DI_NOFILECOPY: ::DWORD = 0x01000000; -pub const DI_FORCECOPY: ::DWORD = 0x02000000; -pub const DI_DRIVERPAGE_ADDED: ::DWORD = 0x04000000; -pub const DI_USECI_SELECTSTRINGS: ::DWORD = 0x08000000; -pub const DI_OVERRIDE_INFFLAGS: ::DWORD = 0x10000000; -pub const DI_PROPS_NOCHANGEUSAGE: ::DWORD = 0x20000000; -pub const DI_NOSELECTICONS: ::DWORD = 0x40000000; -pub const DI_NOWRITE_IDS: ::DWORD = 0x80000000; -pub const DI_FLAGSEX_RESERVED2: ::DWORD = 0x00000001; -pub const DI_FLAGSEX_RESERVED3: ::DWORD = 0x00000002; -pub const DI_FLAGSEX_CI_FAILED: ::DWORD = 0x00000004; -pub const DI_FLAGSEX_FINISHINSTALL_ACTION: ::DWORD = 0x00000008; -pub const DI_FLAGSEX_DIDINFOLIST: ::DWORD = 0x00000010; -pub const DI_FLAGSEX_DIDCOMPATINFO: ::DWORD = 0x00000020; -pub const DI_FLAGSEX_FILTERCLASSES: ::DWORD = 0x00000040; -pub const DI_FLAGSEX_SETFAILEDINSTALL: ::DWORD = 0x00000080; -pub const DI_FLAGSEX_DEVICECHANGE: ::DWORD = 0x00000100; -pub const DI_FLAGSEX_ALWAYSWRITEIDS: ::DWORD = 0x00000200; -pub const DI_FLAGSEX_PROPCHANGE_PENDING: ::DWORD = 0x00000400; -pub const DI_FLAGSEX_ALLOWEXCLUDEDDRVS: ::DWORD = 0x00000800; -pub const DI_FLAGSEX_NOUIONQUERYREMOVE: ::DWORD = 0x00001000; -pub const DI_FLAGSEX_USECLASSFORCOMPAT: ::DWORD = 0x00002000; -pub const DI_FLAGSEX_RESERVED4: ::DWORD = 0x00004000; -pub const DI_FLAGSEX_NO_DRVREG_MODIFY: ::DWORD = 0x00008000; -pub const DI_FLAGSEX_IN_SYSTEM_SETUP: ::DWORD = 0x00010000; -pub const DI_FLAGSEX_INET_DRIVER: ::DWORD = 0x00020000; -pub const DI_FLAGSEX_APPENDDRIVERLIST: ::DWORD = 0x00040000; -pub const DI_FLAGSEX_PREINSTALLBACKUP: ::DWORD = 0x00080000; -pub const DI_FLAGSEX_BACKUPONREPLACE: ::DWORD = 0x00100000; -pub const DI_FLAGSEX_DRIVERLIST_FROM_URL: ::DWORD = 0x00200000; -pub const DI_FLAGSEX_RESERVED1: ::DWORD = 0x00400000; -pub const DI_FLAGSEX_EXCLUDE_OLD_INET_DRIVERS: ::DWORD = 0x00800000; -pub const DI_FLAGSEX_POWERPAGE_ADDED: ::DWORD = 0x01000000; -pub const DI_FLAGSEX_FILTERSIMILARDRIVERS: ::DWORD = 0x02000000; -pub const DI_FLAGSEX_INSTALLEDDRIVER: ::DWORD = 0x04000000; -pub const DI_FLAGSEX_NO_CLASSLIST_NODE_MERGE: ::DWORD = 0x08000000; -pub const DI_FLAGSEX_ALTPLATFORM_DRVSEARCH: ::DWORD = 0x10000000; -pub const DI_FLAGSEX_RESTART_DEVICE_ONLY: ::DWORD = 0x20000000; -pub const DI_FLAGSEX_RECURSIVESEARCH: ::DWORD = 0x40000000; -pub const DI_FLAGSEX_SEARCH_PUBLISHED_INFS: ::DWORD = 0x80000000; -STRUCT!{struct SP_CLASSINSTALL_HEADER { - cbSize: ::DWORD, - InstallFunction: DI_FUNCTION, -}} -pub type PSP_CLASSINSTALL_HEADER = *mut SP_CLASSINSTALL_HEADER; -STRUCT!{struct SP_ENABLECLASS_PARAMS { - ClassInstallHeader: SP_CLASSINSTALL_HEADER, - ClassGuid: ::GUID, - EnableMessage: ::DWORD, -}} -pub type PSP_ENABLECLASS_PARAMS = *mut SP_ENABLECLASS_PARAMS; -pub const ENABLECLASS_QUERY: ::DWORD = 0; -pub const ENABLECLASS_SUCCESS: ::DWORD = 1; -pub const ENABLECLASS_FAILURE: ::DWORD = 2; -pub const DICS_ENABLE: ::DWORD = 0x00000001; -pub const DICS_DISABLE: ::DWORD = 0x00000002; -pub const DICS_PROPCHANGE: ::DWORD = 0x00000003; -pub const DICS_START: ::DWORD = 0x00000004; -pub const DICS_STOP: ::DWORD = 0x00000005; -pub const DICS_FLAG_GLOBAL: ::DWORD = 0x00000001; -pub const DICS_FLAG_CONFIGSPECIFIC: ::DWORD = 0x00000002; -pub const DICS_FLAG_CONFIGGENERAL: ::DWORD = 0x00000004; -STRUCT!{struct SP_PROPCHANGE_PARAMS { - ClassInstallHeader: SP_CLASSINSTALL_HEADER, - StateChange: ::DWORD, - Scope: ::DWORD, - HwProfile: ::DWORD, -}} -pub type PSP_PROPCHANGE_PARAMS = *mut SP_PROPCHANGE_PARAMS; -STRUCT!{struct SP_REMOVEDEVICE_PARAMS { - ClassInstallHeader: SP_CLASSINSTALL_HEADER, - Scope: ::DWORD, - HwProfile: ::DWORD, -}} -pub type PSP_REMOVEDEVICE_PARAMS = *mut SP_REMOVEDEVICE_PARAMS; -pub const DI_REMOVEDEVICE_GLOBAL: ::DWORD = 0x00000001; -pub const DI_REMOVEDEVICE_CONFIGSPECIFIC: ::DWORD = 0x00000002; -STRUCT!{struct SP_UNREMOVEDEVICE_PARAMS { - ClassInstallHeader: SP_CLASSINSTALL_HEADER, - Scope: ::DWORD, - HwProfile: ::DWORD, -}} -pub type PSP_UNREMOVEDEVICE_PARAMS = *mut SP_UNREMOVEDEVICE_PARAMS; -pub const DI_UNREMOVEDEVICE_CONFIGSPECIFIC: ::DWORD = 0x00000002; -#[repr(C)] #[derive(Copy)] -pub struct SP_SELECTDEVICE_PARAMS_A { - pub ClassInstallHeader: SP_CLASSINSTALL_HEADER, - pub Title: [::CHAR; MAX_TITLE_LEN], - pub Instructions: [::CHAR; MAX_INSTRUCTION_LEN], - pub ListLabel: [::CHAR; MAX_LABEL_LEN], - pub SubTitle: [::CHAR; MAX_SUBTITLE_LEN], - pub Reserved: [::BYTE; 2], -} -impl Clone for SP_SELECTDEVICE_PARAMS_A { fn clone(&self) -> SP_SELECTDEVICE_PARAMS_A { *self } } -pub type PSP_SELECTDEVICE_PARAMS_A = *mut SP_SELECTDEVICE_PARAMS_A; -#[repr(C)] #[derive(Copy)] -pub struct SP_SELECTDEVICE_PARAMS_W { - pub ClassInstallHeader: SP_CLASSINSTALL_HEADER, - pub Title: [::WCHAR; MAX_TITLE_LEN], - pub Instructions: [::WCHAR; MAX_INSTRUCTION_LEN], - pub ListLabel: [::WCHAR; MAX_LABEL_LEN], - pub SubTitle: [::WCHAR; MAX_SUBTITLE_LEN], -} -impl Clone for SP_SELECTDEVICE_PARAMS_W { fn clone(&self) -> SP_SELECTDEVICE_PARAMS_W { *self } } -pub type PSP_SELECTDEVICE_PARAMS_W = *mut SP_SELECTDEVICE_PARAMS_W; -pub type PDETECT_PROGRESS_NOTIFY = Option<unsafe extern "system" fn( - ProgressNotifyParam: ::PVOID, DetectComplete: ::DWORD, -) -> ::BOOL>; -#[repr(C)] #[derive(Copy)] -pub struct SP_DETECTDEVICE_PARAMS { - pub ClassInstallHeader: SP_CLASSINSTALL_HEADER, - pub DetectProgressNotify: PDETECT_PROGRESS_NOTIFY, - pub ProgressNotifyParam: ::PVOID, -} -impl Clone for SP_DETECTDEVICE_PARAMS { fn clone(&self) -> SP_DETECTDEVICE_PARAMS { *self } } -pub type PSP_DETECTDEVICE_PARAMS = *mut SP_DETECTDEVICE_PARAMS; -pub const MAX_INSTALLWIZARD_DYNAPAGES: usize = 20; -STRUCT!{struct SP_INSTALLWIZARD_DATA { - ClassInstallHeader: SP_CLASSINSTALL_HEADER, - Flags: ::DWORD, - DynamicPages: [::HPROPSHEETPAGE; MAX_INSTALLWIZARD_DYNAPAGES], - NumDynamicPages: ::DWORD, - DynamicPageFlags: ::DWORD, - PrivateFlags: ::DWORD, - PrivateData: ::LPARAM, - hwndWizardDlg: ::HWND, -}} -pub type PSP_INSTALLWIZARD_DATA = *mut SP_INSTALLWIZARD_DATA; -pub const NDW_INSTALLFLAG_DIDFACTDEFS: ::DWORD = 0x00000001; -pub const NDW_INSTALLFLAG_HARDWAREALLREADYIN: ::DWORD = 0x00000002; -pub const NDW_INSTALLFLAG_NEEDRESTART: ::DWORD = DI_NEEDRESTART; -pub const NDW_INSTALLFLAG_NEEDREBOOT: ::DWORD = DI_NEEDREBOOT; -pub const NDW_INSTALLFLAG_NEEDSHUTDOWN: ::DWORD = 0x00000200; -pub const NDW_INSTALLFLAG_EXPRESSINTRO: ::DWORD = 0x00000400; -pub const NDW_INSTALLFLAG_SKIPISDEVINSTALLED: ::DWORD = 0x00000800; -pub const NDW_INSTALLFLAG_NODETECTEDDEVS: ::DWORD = 0x00001000; -pub const NDW_INSTALLFLAG_INSTALLSPECIFIC: ::DWORD = 0x00002000; -pub const NDW_INSTALLFLAG_SKIPCLASSLIST: ::DWORD = 0x00004000; -pub const NDW_INSTALLFLAG_CI_PICKED_OEM: ::DWORD = 0x00008000; -pub const NDW_INSTALLFLAG_PCMCIAMODE: ::DWORD = 0x00010000; -pub const NDW_INSTALLFLAG_PCMCIADEVICE: ::DWORD = 0x00020000; -pub const NDW_INSTALLFLAG_USERCANCEL: ::DWORD = 0x00040000; -pub const NDW_INSTALLFLAG_KNOWNCLASS: ::DWORD = 0x00080000; -pub const DYNAWIZ_FLAG_PAGESADDED: ::DWORD = 0x00000001; -pub const DYNAWIZ_FLAG_ANALYZE_HANDLECONFLICT: ::DWORD = 0x00000008; -pub const DYNAWIZ_FLAG_INSTALLDET_NEXT: ::DWORD = 0x00000002; -pub const DYNAWIZ_FLAG_INSTALLDET_PREV: ::DWORD = 0x00000004; -pub const MIN_IDD_DYNAWIZ_RESOURCE_ID: ::c_int = 10000; -pub const MAX_IDD_DYNAWIZ_RESOURCE_ID: ::c_int = 11000; -pub const IDD_DYNAWIZ_FIRSTPAGE: ::c_int = 10000; -pub const IDD_DYNAWIZ_SELECT_PREVPAGE: ::c_int = 10001; -pub const IDD_DYNAWIZ_SELECT_NEXTPAGE: ::c_int = 10002; -pub const IDD_DYNAWIZ_ANALYZE_PREVPAGE: ::c_int = 10003; -pub const IDD_DYNAWIZ_ANALYZE_NEXTPAGE: ::c_int = 10004; -pub const IDD_DYNAWIZ_SELECTDEV_PAGE: ::c_int = 10009; -pub const IDD_DYNAWIZ_ANALYZEDEV_PAGE: ::c_int = 10010; -pub const IDD_DYNAWIZ_INSTALLDETECTEDDEVS_PAGE: ::c_int = 10011; -pub const IDD_DYNAWIZ_SELECTCLASS_PAGE: ::c_int = 10012; -pub const IDD_DYNAWIZ_INSTALLDETECTED_PREVPAGE: ::c_int = 10006; -pub const IDD_DYNAWIZ_INSTALLDETECTED_NEXTPAGE: ::c_int = 10007; -pub const IDD_DYNAWIZ_INSTALLDETECTED_NODEVS: ::c_int = 10008; -STRUCT!{struct SP_NEWDEVICEWIZARD_DATA { - ClassInstallHeader: SP_CLASSINSTALL_HEADER, - Flags: ::DWORD, - DynamicPages: [::HPROPSHEETPAGE; MAX_INSTALLWIZARD_DYNAPAGES], - NumDynamicPages: ::DWORD, - hwndWizardDlg: ::HWND, -}} -pub type PSP_NEWDEVICEWIZARD_DATA = *mut SP_NEWDEVICEWIZARD_DATA; -pub type SP_ADDPROPERTYPAGE_DATA = SP_NEWDEVICEWIZARD_DATA; -pub type PSP_ADDPROPERTYPAGE_DATA = PSP_NEWDEVICEWIZARD_DATA; -#[repr(C)] #[derive(Copy)] -pub struct SP_TROUBLESHOOTER_PARAMS_A { - pub ClassInstallHeader: SP_CLASSINSTALL_HEADER, - pub ChmFile: [::CHAR; ::MAX_PATH], - pub HtmlTroubleShooter: [::CHAR; ::MAX_PATH], -} -impl Clone for SP_TROUBLESHOOTER_PARAMS_A { - fn clone(&self) -> SP_TROUBLESHOOTER_PARAMS_A { *self } -} -pub type PSP_TROUBLESHOOTER_PARAMS_A = *mut SP_TROUBLESHOOTER_PARAMS_A; -#[repr(C)] #[derive(Copy)] -pub struct SP_TROUBLESHOOTER_PARAMS_W { - pub ClassInstallHeader: SP_CLASSINSTALL_HEADER, - pub ChmFile: [::WCHAR; ::MAX_PATH], - pub HtmlTroubleShooter: [::WCHAR; ::MAX_PATH], -} -impl Clone for SP_TROUBLESHOOTER_PARAMS_W { - fn clone(&self) -> SP_TROUBLESHOOTER_PARAMS_W { *self } -} -pub type PSP_TROUBLESHOOTER_PARAMS_W = *mut SP_TROUBLESHOOTER_PARAMS_W; -#[repr(C)] #[derive(Copy)] -pub struct SP_POWERMESSAGEWAKE_PARAMS_A { - pub ClassInstallHeader: SP_CLASSINSTALL_HEADER, - pub PowerMessageWake: [::CHAR; LINE_LEN * 2], -} -impl Clone for SP_POWERMESSAGEWAKE_PARAMS_A { - fn clone(&self) -> SP_POWERMESSAGEWAKE_PARAMS_A { *self } -} -pub type PSP_POWERMESSAGEWAKE_PARAMS_A = *mut SP_POWERMESSAGEWAKE_PARAMS_A; -#[repr(C)] #[derive(Copy)] -pub struct SP_POWERMESSAGEWAKE_PARAMS_W { - pub ClassInstallHeader: SP_CLASSINSTALL_HEADER, - pub PowerMessageWake: [::WCHAR; LINE_LEN * 2], -} -impl Clone for SP_POWERMESSAGEWAKE_PARAMS_W { - fn clone(&self) -> SP_POWERMESSAGEWAKE_PARAMS_W { *self } -} -pub type PSP_POWERMESSAGEWAKE_PARAMS_W = *mut SP_POWERMESSAGEWAKE_PARAMS_W; -#[repr(C)] #[derive(Copy)] -pub struct SP_DRVINFO_DATA_V2_A { - pub cbSize: ::DWORD, - pub DriverType: ::DWORD, - pub Reserved: ::ULONG_PTR, - pub Description: [::CHAR; LINE_LEN], - pub MfgName: [::CHAR; LINE_LEN], - pub ProviderName: [::CHAR; LINE_LEN], - pub DriverDate: ::FILETIME, - pub DriverVersion: ::DWORDLONG, -} -impl Clone for SP_DRVINFO_DATA_V2_A { fn clone(&self) -> SP_DRVINFO_DATA_V2_A { *self } } -pub type PSP_DRVINFO_DATA_V2_A = *mut SP_DRVINFO_DATA_V2_A; -#[repr(C)] #[derive(Copy)] -pub struct SP_DRVINFO_DATA_V2_W { - pub cbSize: ::DWORD, - pub DriverType: ::DWORD, - pub Reserved: ::ULONG_PTR, - pub Description: [::WCHAR; LINE_LEN], - pub MfgName: [::WCHAR; LINE_LEN], - pub ProviderName: [::WCHAR; LINE_LEN], - pub DriverDate: ::FILETIME, - pub DriverVersion: ::DWORDLONG, -} -impl Clone for SP_DRVINFO_DATA_V2_W { fn clone(&self) -> SP_DRVINFO_DATA_V2_W { *self } } -pub type PSP_DRVINFO_DATA_V2_W = *mut SP_DRVINFO_DATA_V2_W; -#[repr(C)] #[derive(Copy)] -pub struct SP_DRVINFO_DATA_V1_A { - pub cbSize: ::DWORD, - pub DriverType: ::DWORD, - pub Reserved: ::ULONG_PTR, - pub Description: [::CHAR; LINE_LEN], - pub MfgName: [::CHAR; LINE_LEN], - pub ProviderName: [::CHAR; LINE_LEN], -} -impl Clone for SP_DRVINFO_DATA_V1_A { fn clone(&self) -> SP_DRVINFO_DATA_V1_A { *self } } -pub type PSP_DRVINFO_DATA_V1_A = *mut SP_DRVINFO_DATA_V1_A; -#[repr(C)] #[derive(Copy)] -pub struct SP_DRVINFO_DATA_V1_W { - pub cbSize: ::DWORD, - pub DriverType: ::DWORD, - pub Reserved: ::ULONG_PTR, - pub Description: [::WCHAR; LINE_LEN], - pub MfgName: [::WCHAR; LINE_LEN], - pub ProviderName: [::WCHAR; LINE_LEN], -} -impl Clone for SP_DRVINFO_DATA_V1_W { fn clone(&self) -> SP_DRVINFO_DATA_V1_W { *self } } -pub type PSP_DRVINFO_DATA_V1_W = *mut SP_DRVINFO_DATA_V1_W; -pub type SP_DRVINFO_DATA_A = SP_DRVINFO_DATA_V2_A; -pub type PSP_DRVINFO_DATA_A = PSP_DRVINFO_DATA_V2_A; -pub type SP_DRVINFO_DATA_W = SP_DRVINFO_DATA_V2_W; -pub type PSP_DRVINFO_DATA_W = PSP_DRVINFO_DATA_V2_W; -#[repr(C)] #[derive(Copy)] -pub struct SP_DRVINFO_DETAIL_DATA_A { - pub cbSize: ::DWORD, - pub InfDate: ::FILETIME, - pub CompatIDsOffset: ::DWORD, - pub CompatIDsLength: ::DWORD, - pub Reserved: ::ULONG_PTR, - pub SectionName: [::CHAR; LINE_LEN], - pub InfFileName: [::CHAR; ::MAX_PATH], - pub DrvDescription: [::CHAR; LINE_LEN], - pub HardwareID: [::CHAR; ::ANYSIZE_ARRAY], -} -impl Clone for SP_DRVINFO_DETAIL_DATA_A { fn clone(&self) -> SP_DRVINFO_DETAIL_DATA_A { *self } } -pub type PSP_DRVINFO_DETAIL_DATA_A = *mut SP_DRVINFO_DETAIL_DATA_A; -#[repr(C)] #[derive(Copy)] -pub struct SP_DRVINFO_DETAIL_DATA_W { - pub cbSize: ::DWORD, - pub InfDate: ::FILETIME, - pub CompatIDsOffset: ::DWORD, - pub CompatIDsLength: ::DWORD, - pub Reserved: ::ULONG_PTR, - pub SectionName: [::WCHAR; LINE_LEN], - pub InfFileName: [::WCHAR; ::MAX_PATH], - pub DrvDescription: [::WCHAR; LINE_LEN], - pub HardwareID: [::WCHAR; ::ANYSIZE_ARRAY], -} -impl Clone for SP_DRVINFO_DETAIL_DATA_W { fn clone(&self) -> SP_DRVINFO_DETAIL_DATA_W { *self } } -pub type PSP_DRVINFO_DETAIL_DATA_W = *mut SP_DRVINFO_DETAIL_DATA_W; -STRUCT!{struct SP_DRVINSTALL_PARAMS { - cbSize: ::DWORD, - Rank: ::DWORD, - Flags: ::DWORD, - PrivateData: ::DWORD_PTR, - Reserved: ::DWORD, -}} -pub type PSP_DRVINSTALL_PARAMS = *mut SP_DRVINSTALL_PARAMS; -pub const DNF_DUPDESC: ::DWORD = 0x00000001; -pub const DNF_OLDDRIVER: ::DWORD = 0x00000002; -pub const DNF_EXCLUDEFROMLIST: ::DWORD = 0x00000004; -pub const DNF_NODRIVER: ::DWORD = 0x00000008; -pub const DNF_LEGACYINF: ::DWORD = 0x00000010; -pub const DNF_CLASS_DRIVER: ::DWORD = 0x00000020; -pub const DNF_COMPATIBLE_DRIVER: ::DWORD = 0x00000040; -pub const DNF_INET_DRIVER: ::DWORD = 0x00000080; -pub const DNF_UNUSED1: ::DWORD = 0x00000100; -pub const DNF_UNUSED2: ::DWORD = 0x00000200; -pub const DNF_OLD_INET_DRIVER: ::DWORD = 0x00000400; -pub const DNF_BAD_DRIVER: ::DWORD = 0x00000800; -pub const DNF_DUPPROVIDER: ::DWORD = 0x00001000; -pub const DNF_INF_IS_SIGNED: ::DWORD = 0x00002000; -pub const DNF_OEM_F6_INF: ::DWORD = 0x00004000; -pub const DNF_DUPDRIVERVER: ::DWORD = 0x00008000; -pub const DNF_BASIC_DRIVER: ::DWORD = 0x00010000; -pub const DNF_AUTHENTICODE_SIGNED: ::DWORD = 0x00020000; -pub const DNF_INSTALLEDDRIVER: ::DWORD = 0x00040000; -pub const DNF_ALWAYSEXCLUDEFROMLIST: ::DWORD = 0x00080000; -pub const DNF_INBOX_DRIVER: ::DWORD = 0x00100000; -pub const DNF_REQUESTADDITIONALSOFTWARE: ::DWORD = 0x00200000; -pub const DNF_UNUSED_22: ::DWORD = 0x00400000; -pub const DNF_UNUSED_23: ::DWORD = 0x00800000; -pub const DNF_UNUSED_24: ::DWORD = 0x01000000; -pub const DNF_UNUSED_25: ::DWORD = 0x02000000; -pub const DNF_UNUSED_26: ::DWORD = 0x04000000; -pub const DNF_UNUSED_27: ::DWORD = 0x08000000; -pub const DNF_UNUSED_28: ::DWORD = 0x10000000; -pub const DNF_UNUSED_29: ::DWORD = 0x20000000; -pub const DNF_UNUSED_30: ::DWORD = 0x40000000; -pub const DNF_UNUSED_31: ::DWORD = 0x80000000; -pub type PSP_DETSIG_CMPPROC = Option<unsafe extern "system" fn( - DeviceInfoSet: HDEVINFO, NewDeviceData: PSP_DEVINFO_DATA, ExistingDeviceData: PSP_DEVINFO_DATA, - CompareContext: ::PVOID, -) -> ::DWORD>; -STRUCT!{struct COINSTALLER_CONTEXT_DATA { - PostProcessing: ::BOOL, - InstallResult: ::DWORD, - PrivateData: ::PVOID, -}} -pub type PCOINSTALLER_CONTEXT_DATA = *mut COINSTALLER_CONTEXT_DATA; -STRUCT!{struct SP_CLASSIMAGELIST_DATA { - cbSize: ::DWORD, - ImageList: ::HIMAGELIST, - Reserved: ::ULONG_PTR, -}} -pub type PSP_CLASSIMAGELIST_DATA = *mut SP_CLASSIMAGELIST_DATA; -STRUCT!{struct SP_PROPSHEETPAGE_REQUEST { - cbSize: ::DWORD, - PageRequested: ::DWORD, - DeviceInfoSet: HDEVINFO, - DeviceInfoData: PSP_DEVINFO_DATA, -}} -pub type PSP_PROPSHEETPAGE_REQUEST = *mut SP_PROPSHEETPAGE_REQUEST; -pub const SPPSR_SELECT_DEVICE_RESOURCES: ::DWORD = 1; -pub const SPPSR_ENUM_BASIC_DEVICE_PROPERTIES: ::DWORD = 2; -pub const SPPSR_ENUM_ADV_DEVICE_PROPERTIES: ::DWORD = 3; -#[repr(C)] #[derive(Copy)] -pub struct SP_BACKUP_QUEUE_PARAMS_V2_A { - pub cbSize: ::DWORD, - pub FullInfPath: [::CHAR; ::MAX_PATH], - pub FilenameOffset: ::INT, - pub ReinstallInstance: [::CHAR; ::MAX_PATH], -} -impl Clone for SP_BACKUP_QUEUE_PARAMS_V2_A { - fn clone(&self) -> SP_BACKUP_QUEUE_PARAMS_V2_A { *self } -} -pub type PSP_BACKUP_QUEUE_PARAMS_V2_A = *mut SP_BACKUP_QUEUE_PARAMS_V2_A; -#[repr(C)] #[derive(Copy)] -pub struct SP_BACKUP_QUEUE_PARAMS_V2_W { - pub cbSize: ::DWORD, - pub FullInfPath: [::WCHAR; ::MAX_PATH], - pub FilenameOffset: ::INT, - pub ReinstallInstance: [::WCHAR; ::MAX_PATH], -} -impl Clone for SP_BACKUP_QUEUE_PARAMS_V2_W { - fn clone(&self) -> SP_BACKUP_QUEUE_PARAMS_V2_W { *self } -} -pub type PSP_BACKUP_QUEUE_PARAMS_V2_W = *mut SP_BACKUP_QUEUE_PARAMS_V2_W; -#[repr(C)] #[derive(Copy)] -pub struct SP_BACKUP_QUEUE_PARAMS_V1_A { - pub cbSize: ::DWORD, - pub FullInfPath: [::CHAR; ::MAX_PATH], - pub FilenameOffset: ::INT, -} -impl Clone for SP_BACKUP_QUEUE_PARAMS_V1_A { - fn clone(&self) -> SP_BACKUP_QUEUE_PARAMS_V1_A { *self } -} -pub type PSP_BACKUP_QUEUE_PARAMS_V1_A = *mut SP_BACKUP_QUEUE_PARAMS_V1_A; -#[repr(C)] #[derive(Copy)] -pub struct SP_BACKUP_QUEUE_PARAMS_V1_W { - pub cbSize: ::DWORD, - pub FullInfPath: [::WCHAR; ::MAX_PATH], - pub FilenameOffset: ::INT, -} -impl Clone for SP_BACKUP_QUEUE_PARAMS_V1_W { - fn clone(&self) -> SP_BACKUP_QUEUE_PARAMS_V1_W { *self } -} -pub type PSP_BACKUP_QUEUE_PARAMS_V1_W = *mut SP_BACKUP_QUEUE_PARAMS_V1_W; -pub type SP_BACKUP_QUEUE_PARAMS_A = SP_BACKUP_QUEUE_PARAMS_V2_A; -pub type PSP_BACKUP_QUEUE_PARAMS_A = PSP_BACKUP_QUEUE_PARAMS_V2_A; -pub type SP_BACKUP_QUEUE_PARAMS_W = SP_BACKUP_QUEUE_PARAMS_V2_W; -pub type PSP_BACKUP_QUEUE_PARAMS_W = PSP_BACKUP_QUEUE_PARAMS_V2_W; -pub const ERROR_EXPECTED_SECTION_NAME: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR - | 0; -pub const ERROR_BAD_SECTION_NAME_LINE: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR - | 1; -pub const ERROR_SECTION_NAME_TOO_LONG: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR - | 2; -pub const ERROR_GENERAL_SYNTAX: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR | 3; -pub const ERROR_WRONG_INF_STYLE: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR - | 0x100; -pub const ERROR_SECTION_NOT_FOUND: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR - | 0x101; -pub const ERROR_LINE_NOT_FOUND: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR | 0x102; -pub const ERROR_NO_BACKUP: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR | 0x103; -pub const ERROR_NO_ASSOCIATED_CLASS: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR - | 0x200; -pub const ERROR_CLASS_MISMATCH: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR | 0x201; -pub const ERROR_DUPLICATE_FOUND: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR - | 0x202; -pub const ERROR_NO_DRIVER_SELECTED: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR - | 0x203; -pub const ERROR_KEY_DOES_NOT_EXIST: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR - | 0x204; -pub const ERROR_INVALID_DEVINST_NAME: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR - | 0x205; -pub const ERROR_INVALID_CLASS: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR | 0x206; -pub const ERROR_DEVINST_ALREADY_EXISTS: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR - | 0x207; -pub const ERROR_DEVINFO_NOT_REGISTERED: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR - | 0x208; -pub const ERROR_INVALID_REG_PROPERTY: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR - | 0x209; -pub const ERROR_NO_INF: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR | 0x20A; -pub const ERROR_NO_SUCH_DEVINST: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR - | 0x20B; -pub const ERROR_CANT_LOAD_CLASS_ICON: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR - | 0x20C; -pub const ERROR_INVALID_CLASS_INSTALLER: ::DWORD = ::APPLICATION_ERROR_MASK - | ::ERROR_SEVERITY_ERROR | 0x20D; -pub const ERROR_DI_DO_DEFAULT: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR | 0x20E; -pub const ERROR_DI_NOFILECOPY: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR | 0x20F; -pub const ERROR_INVALID_HWPROFILE: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR - | 0x210; -pub const ERROR_NO_DEVICE_SELECTED: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR - | 0x211; -pub const ERROR_DEVINFO_LIST_LOCKED: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR - | 0x212; -pub const ERROR_DEVINFO_DATA_LOCKED: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR - | 0x213; -pub const ERROR_DI_BAD_PATH: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR | 0x214; -pub const ERROR_NO_CLASSINSTALL_PARAMS: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR - | 0x215; -pub const ERROR_FILEQUEUE_LOCKED: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR - | 0x216; -pub const ERROR_BAD_SERVICE_INSTALLSECT: ::DWORD = ::APPLICATION_ERROR_MASK - | ::ERROR_SEVERITY_ERROR | 0x217; -pub const ERROR_NO_CLASS_DRIVER_LIST: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR - | 0x218; -pub const ERROR_NO_ASSOCIATED_SERVICE: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR - | 0x219; -pub const ERROR_NO_DEFAULT_DEVICE_INTERFACE: ::DWORD = ::APPLICATION_ERROR_MASK - | ::ERROR_SEVERITY_ERROR | 0x21A; -pub const ERROR_DEVICE_INTERFACE_ACTIVE: ::DWORD = ::APPLICATION_ERROR_MASK - | ::ERROR_SEVERITY_ERROR | 0x21B; -pub const ERROR_DEVICE_INTERFACE_REMOVED: ::DWORD = ::APPLICATION_ERROR_MASK - | ::ERROR_SEVERITY_ERROR | 0x21C; -pub const ERROR_BAD_INTERFACE_INSTALLSECT: ::DWORD = ::APPLICATION_ERROR_MASK - | ::ERROR_SEVERITY_ERROR | 0x21D; -pub const ERROR_NO_SUCH_INTERFACE_CLASS: ::DWORD = ::APPLICATION_ERROR_MASK - | ::ERROR_SEVERITY_ERROR | 0x21E; -pub const ERROR_INVALID_REFERENCE_STRING: ::DWORD = ::APPLICATION_ERROR_MASK - | ::ERROR_SEVERITY_ERROR | 0x21F; -pub const ERROR_INVALID_MACHINENAME: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR - | 0x220; -pub const ERROR_REMOTE_COMM_FAILURE: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR - | 0x221; -pub const ERROR_MACHINE_UNAVAILABLE: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR - | 0x222; -pub const ERROR_NO_CONFIGMGR_SERVICES: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR - | 0x223; -pub const ERROR_INVALID_PROPPAGE_PROVIDER: ::DWORD = ::APPLICATION_ERROR_MASK - | ::ERROR_SEVERITY_ERROR | 0x224; -pub const ERROR_NO_SUCH_DEVICE_INTERFACE: ::DWORD = ::APPLICATION_ERROR_MASK - | ::ERROR_SEVERITY_ERROR | 0x225; -pub const ERROR_DI_POSTPROCESSING_REQUIRED: ::DWORD = ::APPLICATION_ERROR_MASK - | ::ERROR_SEVERITY_ERROR | 0x226; -pub const ERROR_INVALID_COINSTALLER: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR - | 0x227; -pub const ERROR_NO_COMPAT_DRIVERS: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR - | 0x228; -pub const ERROR_NO_DEVICE_ICON: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR - | 0x229; -pub const ERROR_INVALID_INF_LOGCONFIG: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR - | 0x22A; -pub const ERROR_DI_DONT_INSTALL: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR - | 0x22B; -pub const ERROR_INVALID_FILTER_DRIVER: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR - | 0x22C; -pub const ERROR_NON_WINDOWS_NT_DRIVER: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR - | 0x22D; -pub const ERROR_NON_WINDOWS_DRIVER: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR - | 0x22E; -pub const ERROR_NO_CATALOG_FOR_OEM_INF: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR - | 0x22F; -pub const ERROR_DEVINSTALL_QUEUE_NONNATIVE: ::DWORD = ::APPLICATION_ERROR_MASK - | ::ERROR_SEVERITY_ERROR | 0x230; -pub const ERROR_NOT_DISABLEABLE: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR - | 0x231; -pub const ERROR_CANT_REMOVE_DEVINST: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR - | 0x232; -pub const ERROR_INVALID_TARGET: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR - | 0x233; -pub const ERROR_DRIVER_NONNATIVE: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR - | 0x234; -pub const ERROR_IN_WOW64: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR | 0x235; -pub const ERROR_SET_SYSTEM_RESTORE_POINT: ::DWORD = ::APPLICATION_ERROR_MASK - | ::ERROR_SEVERITY_ERROR | 0x236; -pub const ERROR_SCE_DISABLED: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR | 0x238; -pub const ERROR_UNKNOWN_EXCEPTION: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR - | 0x239; -pub const ERROR_PNP_REGISTRY_ERROR: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR - | 0x23A; -pub const ERROR_REMOTE_REQUEST_UNSUPPORTED: ::DWORD = ::APPLICATION_ERROR_MASK - | ::ERROR_SEVERITY_ERROR | 0x23B; -pub const ERROR_NOT_AN_INSTALLED_OEM_INF: ::DWORD = ::APPLICATION_ERROR_MASK - | ::ERROR_SEVERITY_ERROR | 0x23C; -pub const ERROR_INF_IN_USE_BY_DEVICES: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR - | 0x23D; -pub const ERROR_DI_FUNCTION_OBSOLETE: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR - | 0x23E; -pub const ERROR_NO_AUTHENTICODE_CATALOG: ::DWORD = ::APPLICATION_ERROR_MASK - | ::ERROR_SEVERITY_ERROR | 0x23F; -pub const ERROR_AUTHENTICODE_DISALLOWED: ::DWORD = ::APPLICATION_ERROR_MASK - | ::ERROR_SEVERITY_ERROR | 0x240; -pub const ERROR_AUTHENTICODE_TRUSTED_PUBLISHER: ::DWORD = ::APPLICATION_ERROR_MASK - | ::ERROR_SEVERITY_ERROR | 0x241; -pub const ERROR_AUTHENTICODE_TRUST_NOT_ESTABLISHED: ::DWORD = ::APPLICATION_ERROR_MASK - | ::ERROR_SEVERITY_ERROR | 0x242; -pub const ERROR_AUTHENTICODE_PUBLISHER_NOT_TRUSTED: ::DWORD = ::APPLICATION_ERROR_MASK - | ::ERROR_SEVERITY_ERROR | 0x243; -pub const ERROR_SIGNATURE_OSATTRIBUTE_MISMATCH: ::DWORD = ::APPLICATION_ERROR_MASK - | ::ERROR_SEVERITY_ERROR | 0x244; -pub const ERROR_ONLY_VALIDATE_VIA_AUTHENTICODE: ::DWORD = ::APPLICATION_ERROR_MASK - | ::ERROR_SEVERITY_ERROR | 0x245; -pub const ERROR_DEVICE_INSTALLER_NOT_READY: ::DWORD = ::APPLICATION_ERROR_MASK - | ::ERROR_SEVERITY_ERROR | 0x246; -pub const ERROR_DRIVER_STORE_ADD_FAILED: ::DWORD = ::APPLICATION_ERROR_MASK - | ::ERROR_SEVERITY_ERROR | 0x247; -pub const ERROR_DEVICE_INSTALL_BLOCKED: ::DWORD = ::APPLICATION_ERROR_MASK - | ::ERROR_SEVERITY_ERROR | 0x248; -pub const ERROR_DRIVER_INSTALL_BLOCKED: ::DWORD = ::APPLICATION_ERROR_MASK - | ::ERROR_SEVERITY_ERROR | 0x249; -pub const ERROR_WRONG_INF_TYPE: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR - | 0x24A; -pub const ERROR_FILE_HASH_NOT_IN_CATALOG: ::DWORD = ::APPLICATION_ERROR_MASK - | ::ERROR_SEVERITY_ERROR | 0x24B; -pub const ERROR_DRIVER_STORE_DELETE_FAILED: ::DWORD = ::APPLICATION_ERROR_MASK - | ::ERROR_SEVERITY_ERROR | 0x24C; -pub const ERROR_UNRECOVERABLE_STACK_OVERFLOW: ::DWORD = ::APPLICATION_ERROR_MASK - | ::ERROR_SEVERITY_ERROR | 0x300; -pub const EXCEPTION_SPAPI_UNRECOVERABLE_STACK_OVERFLOW: ::DWORD = - ERROR_UNRECOVERABLE_STACK_OVERFLOW; -pub const ERROR_NO_DEFAULT_INTERFACE_DEVICE: ::DWORD = ERROR_NO_DEFAULT_DEVICE_INTERFACE; -pub const ERROR_INTERFACE_DEVICE_ACTIVE: ::DWORD = ERROR_DEVICE_INTERFACE_ACTIVE; -pub const ERROR_INTERFACE_DEVICE_REMOVED: ::DWORD = ERROR_DEVICE_INTERFACE_REMOVED; -pub const ERROR_NO_SUCH_INTERFACE_DEVICE: ::DWORD = ERROR_NO_SUCH_DEVICE_INTERFACE; -pub const ERROR_NOT_INSTALLED: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR - | 0x1000; -pub const INFINFO_INF_SPEC_IS_HINF: ::DWORD = 1; -pub const INFINFO_INF_NAME_IS_ABSOLUTE: ::DWORD = 2; -pub const INFINFO_DEFAULT_SEARCH: ::DWORD = 3; -pub const INFINFO_REVERSE_DEFAULT_SEARCH: ::DWORD = 4; -pub const INFINFO_INF_PATH_LIST_SEARCH: ::DWORD = 5; -pub const FILE_COMPRESSION_NONE: ::UINT = 0; -pub const FILE_COMPRESSION_WINLZA: ::UINT = 1; -pub const FILE_COMPRESSION_MSZIP: ::UINT = 2; -pub const FILE_COMPRESSION_NTCAB: ::UINT = 3; -pub const SRCLIST_TEMPORARY: ::DWORD = 0x00000001; -pub const SRCLIST_NOBROWSE: ::DWORD = 0x00000002; -pub const SRCLIST_SYSTEM: ::DWORD = 0x00000010; -pub const SRCLIST_USER: ::DWORD = 0x00000020; -pub const SRCLIST_SYSIFADMIN: ::DWORD = 0x00000040; -pub const SRCLIST_SUBDIRS: ::DWORD = 0x00000100; -pub const SRCLIST_APPEND: ::DWORD = 0x00000200; -pub const SRCLIST_NOSTRIPPLATFORM: ::DWORD = 0x00000400; -pub const IDF_NOBROWSE: ::DWORD = 0x00000001; -pub const IDF_NOSKIP: ::DWORD = 0x00000002; -pub const IDF_NODETAILS: ::DWORD = 0x00000004; -pub const IDF_NOCOMPRESSED: ::DWORD = 0x00000008; -pub const IDF_CHECKFIRST: ::DWORD = 0x00000100; -pub const IDF_NOBEEP: ::DWORD = 0x00000200; -pub const IDF_NOFOREGROUND: ::DWORD = 0x00000400; -pub const IDF_WARNIFSKIP: ::DWORD = 0x00000800; -pub const IDF_NOREMOVABLEMEDIAPROMPT: ::DWORD = 0x00001000; -pub const IDF_USEDISKNAMEASPROMPT: ::DWORD = 0x00002000; -pub const IDF_OEMDISK: ::DWORD = 0x80000000; -pub const DPROMPT_SUCCESS: ::UINT = 0; -pub const DPROMPT_CANCEL: ::UINT = 1; -pub const DPROMPT_SKIPFILE: ::UINT = 2; -pub const DPROMPT_BUFFERTOOSMALL: ::UINT = 3; -pub const DPROMPT_OUTOFMEMORY: ::UINT = 4; -pub const SETDIRID_NOT_FULL_PATH: ::DWORD = 0x00000001; -pub const SRCINFO_PATH: ::UINT = 1; -pub const SRCINFO_TAGFILE: ::UINT = 2; -pub const SRCINFO_DESCRIPTION: ::UINT = 3; -pub const SRCINFO_FLAGS: ::UINT = 4; -pub const SRCINFO_TAGFILE2: ::UINT = 4; -pub const SRC_FLAGS_CABFILE: ::UINT = 0x0010; -pub const SP_COPY_DELETESOURCE: ::DWORD = 0x0000001; -pub const SP_COPY_REPLACEONLY: ::DWORD = 0x0000002; -pub const SP_COPY_NEWER: ::DWORD = 0x0000004; -pub const SP_COPY_NEWER_OR_SAME: ::DWORD = SP_COPY_NEWER; -pub const SP_COPY_NOOVERWRITE: ::DWORD = 0x0000008; -pub const SP_COPY_NODECOMP: ::DWORD = 0x0000010; -pub const SP_COPY_LANGUAGEAWARE: ::DWORD = 0x0000020; -pub const SP_COPY_SOURCE_ABSOLUTE: ::DWORD = 0x0000040; -pub const SP_COPY_SOURCEPATH_ABSOLUTE: ::DWORD = 0x0000080; -pub const SP_COPY_IN_USE_NEEDS_REBOOT: ::DWORD = 0x0000100; -pub const SP_COPY_FORCE_IN_USE: ::DWORD = 0x0000200; -pub const SP_COPY_NOSKIP: ::DWORD = 0x0000400; -pub const SP_FLAG_CABINETCONTINUATION: ::DWORD = 0x0000800; -pub const SP_COPY_FORCE_NOOVERWRITE: ::DWORD = 0x0001000; -pub const SP_COPY_FORCE_NEWER: ::DWORD = 0x0002000; -pub const SP_COPY_WARNIFSKIP: ::DWORD = 0x0004000; -pub const SP_COPY_NOBROWSE: ::DWORD = 0x0008000; -pub const SP_COPY_NEWER_ONLY: ::DWORD = 0x0010000; -pub const SP_COPY_RESERVED: ::DWORD = 0x0020000; -pub const SP_COPY_OEMINF_CATALOG_ONLY: ::DWORD = 0x0040000; -pub const SP_COPY_REPLACE_BOOT_FILE: ::DWORD = 0x0080000; -pub const SP_COPY_NOPRUNE: ::DWORD = 0x0100000; -pub const SP_COPY_OEM_F6_INF: ::DWORD = 0x0200000; -pub const SP_COPY_ALREADYDECOMP: ::DWORD = 0x0400000; -pub const SP_COPY_WINDOWS_SIGNED: ::DWORD = 0x1000000; -pub const SP_COPY_PNPLOCKED: ::DWORD = 0x2000000; -pub const SP_COPY_IN_USE_TRY_RENAME: ::DWORD = 0x4000000; -pub const SP_COPY_INBOX_INF: ::DWORD = 0x8000000; -pub const SP_COPY_HARDLINK: ::DWORD = 0x10000000; -pub const SP_BACKUP_BACKUPPASS: ::DWORD = 0x00000001; -pub const SP_BACKUP_DEMANDPASS: ::DWORD = 0x00000002; -pub const SP_BACKUP_SPECIAL: ::DWORD = 0x00000004; -pub const SP_BACKUP_BOOTFILE: ::DWORD = 0x00000008; -pub const SPQ_SCAN_FILE_PRESENCE: ::DWORD = 0x00000001; -pub const SPQ_SCAN_FILE_VALIDITY: ::DWORD = 0x00000002; -pub const SPQ_SCAN_USE_CALLBACK: ::DWORD = 0x00000004; -pub const SPQ_SCAN_USE_CALLBACKEX: ::DWORD = 0x00000008; -pub const SPQ_SCAN_INFORM_USER: ::DWORD = 0x00000010; -pub const SPQ_SCAN_PRUNE_COPY_QUEUE: ::DWORD = 0x00000020; -pub const SPQ_SCAN_USE_CALLBACK_SIGNERINFO: ::DWORD = 0x00000040; -pub const SPQ_SCAN_PRUNE_DELREN: ::DWORD = 0x00000080; -pub const SPQ_SCAN_FILE_PRESENCE_WITHOUT_SOURCE: ::DWORD = 0x00000100; -pub const SPQ_SCAN_FILE_COMPARISON: ::DWORD = 0x00000200; -pub const SPQ_SCAN_ACTIVATE_DRP: ::DWORD = 0x00000400; -pub const SPQ_DELAYED_COPY: ::DWORD = 0x00000001; -pub const SPQ_FLAG_BACKUP_AWARE: ::DWORD = 0x00000001; -pub const SPQ_FLAG_ABORT_IF_UNSIGNED: ::DWORD = 0x00000002; -pub const SPQ_FLAG_FILES_MODIFIED: ::DWORD = 0x00000004; -pub const SPQ_FLAG_DO_SHUFFLEMOVE: ::DWORD = 0x00000008; -pub const SPQ_FLAG_VALID: ::DWORD = 0x0000000F; -pub const SPOST_NONE: ::DWORD = 0; -pub const SPOST_PATH: ::DWORD = 1; -pub const SPOST_URL: ::DWORD = 2; -pub const SPOST_MAX: ::DWORD = 3; -pub const SUOI_FORCEDELETE: ::DWORD = 0x00000001; -pub const SUOI_INTERNAL1: ::DWORD = 0x00000002; -pub const SPDSL_IGNORE_DISK: ::UINT = 0x00000001; -pub const SPDSL_DISALLOW_NEGATIVE_ADJUST: ::UINT = 0x00000002; -pub const SPFILEQ_FILE_IN_USE: ::INT = 0x00000001; -pub const SPFILEQ_REBOOT_RECOMMENDED: ::INT = 0x00000002; -pub const SPFILEQ_REBOOT_IN_PROGRESS: ::INT = 0x00000004; -pub const FLG_ADDREG_DELREG_BIT: ::DWORD = 0x00008000; -pub const FLG_ADDREG_BINVALUETYPE: ::DWORD = 0x00000001; -pub const FLG_ADDREG_NOCLOBBER: ::DWORD = 0x00000002; -pub const FLG_ADDREG_DELVAL: ::DWORD = 0x00000004; -pub const FLG_ADDREG_APPEND: ::DWORD = 0x00000008; -pub const FLG_ADDREG_KEYONLY: ::DWORD = 0x00000010; -pub const FLG_ADDREG_OVERWRITEONLY: ::DWORD = 0x00000020; -pub const FLG_ADDREG_64BITKEY: ::DWORD = 0x00001000; -pub const FLG_ADDREG_KEYONLY_COMMON: ::DWORD = 0x00002000; -pub const FLG_ADDREG_32BITKEY: ::DWORD = 0x00004000; -pub const FLG_ADDREG_TYPE_MASK: ::DWORD = 0xFFFF0000 | FLG_ADDREG_BINVALUETYPE; -pub const FLG_ADDREG_TYPE_SZ: ::DWORD = 0x00000000; -pub const FLG_ADDREG_TYPE_MULTI_SZ: ::DWORD = 0x00010000; -pub const FLG_ADDREG_TYPE_EXPAND_SZ: ::DWORD = 0x00020000; -pub const FLG_ADDREG_TYPE_BINARY: ::DWORD = 0x00000000 | FLG_ADDREG_BINVALUETYPE; -pub const FLG_ADDREG_TYPE_DWORD: ::DWORD = 0x00010000 | FLG_ADDREG_BINVALUETYPE; -pub const FLG_ADDREG_TYPE_NONE: ::DWORD = 0x00020000 | FLG_ADDREG_BINVALUETYPE; -pub const FLG_DELREG_VALUE: ::DWORD = 0x00000000; -pub const FLG_DELREG_TYPE_MASK: ::DWORD = FLG_ADDREG_TYPE_MASK; -pub const FLG_DELREG_TYPE_SZ: ::DWORD = FLG_ADDREG_TYPE_SZ; -pub const FLG_DELREG_TYPE_MULTI_SZ: ::DWORD = FLG_ADDREG_TYPE_MULTI_SZ; -pub const FLG_DELREG_TYPE_EXPAND_SZ: ::DWORD = FLG_ADDREG_TYPE_EXPAND_SZ; -pub const FLG_DELREG_TYPE_BINARY: ::DWORD = FLG_ADDREG_TYPE_BINARY; -pub const FLG_DELREG_TYPE_DWORD: ::DWORD = FLG_ADDREG_TYPE_DWORD; -pub const FLG_DELREG_TYPE_NONE: ::DWORD = FLG_ADDREG_TYPE_NONE; -pub const FLG_DELREG_64BITKEY: ::DWORD = FLG_ADDREG_64BITKEY; -pub const FLG_DELREG_KEYONLY_COMMON: ::DWORD = FLG_ADDREG_KEYONLY_COMMON; -pub const FLG_DELREG_32BITKEY: ::DWORD = FLG_ADDREG_32BITKEY; -pub const FLG_DELREG_OPERATION_MASK: ::DWORD = 0x000000FE; -pub const FLG_DELREG_MULTI_SZ_DELSTRING: ::DWORD = FLG_DELREG_TYPE_MULTI_SZ | FLG_ADDREG_DELREG_BIT - | 0x00000002; -pub const FLG_BITREG_CLEARBITS: ::DWORD = 0x00000000; -pub const FLG_BITREG_SETBITS: ::DWORD = 0x00000001; -pub const FLG_BITREG_64BITKEY: ::DWORD = 0x00001000; -pub const FLG_BITREG_32BITKEY: ::DWORD = 0x00004000; -pub const FLG_INI2REG_64BITKEY: ::DWORD = 0x00001000; -pub const FLG_INI2REG_32BITKEY: ::DWORD = 0x00004000; -pub const FLG_REGSVR_DLLREGISTER: ::DWORD = 0x00000001; -pub const FLG_REGSVR_DLLINSTALL: ::DWORD = 0x00000002; -pub const FLG_PROFITEM_CURRENTUSER: ::DWORD = 0x00000001; -pub const FLG_PROFITEM_DELETE: ::DWORD = 0x00000002; -pub const FLG_PROFITEM_GROUP: ::DWORD = 0x00000004; -pub const FLG_PROFITEM_CSIDL: ::DWORD = 0x00000008; -pub const FLG_ADDPROPERTY_NOCLOBBER: ::DWORD = 0x00000001; -pub const FLG_ADDPROPERTY_OVERWRITEONLY: ::DWORD = 0x00000002; -pub const FLG_ADDPROPERTY_APPEND: ::DWORD = 0x00000004; -pub const FLG_ADDPROPERTY_OR: ::DWORD = 0x00000008; -pub const FLG_ADDPROPERTY_AND: ::DWORD = 0x00000010; -pub const FLG_DELPROPERTY_MULTI_SZ_DELSTRING: ::DWORD = 0x00000001; -pub const SPINST_LOGCONFIG: ::UINT = 0x00000001; -pub const SPINST_INIFILES: ::UINT = 0x00000002; -pub const SPINST_REGISTRY: ::UINT = 0x00000004; -pub const SPINST_INI2REG: ::UINT = 0x00000008; -pub const SPINST_FILES: ::UINT = 0x00000010; -pub const SPINST_BITREG: ::UINT = 0x00000020; -pub const SPINST_REGSVR: ::UINT = 0x00000040; -pub const SPINST_UNREGSVR: ::UINT = 0x00000080; -pub const SPINST_PROFILEITEMS: ::UINT = 0x00000100; -pub const SPINST_COPYINF: ::UINT = 0x00000200; -pub const SPINST_PROPERTIES: ::UINT = 0x00000400; -pub const SPINST_ALL: ::UINT = 0x000007ff; -pub const SPINST_SINGLESECTION: ::UINT = 0x00010000; -pub const SPINST_LOGCONFIG_IS_FORCED: ::UINT = 0x00020000; -pub const SPINST_LOGCONFIGS_ARE_OVERRIDES: ::UINT = 0x00040000; -pub const SPINST_REGISTERCALLBACKAWARE: ::UINT = 0x00080000; -pub const SPINST_DEVICEINSTALL: ::UINT = 0x00100000; -pub const SPSVCINST_TAGTOFRONT: ::DWORD = 0x00000001; -pub const SPSVCINST_ASSOCSERVICE: ::DWORD = 0x00000002; -pub const SPSVCINST_DELETEEVENTLOGENTRY: ::DWORD = 0x00000004; -pub const SPSVCINST_NOCLOBBER_DISPLAYNAME: ::DWORD = 0x00000008; -pub const SPSVCINST_NOCLOBBER_STARTTYPE: ::DWORD = 0x00000010; -pub const SPSVCINST_NOCLOBBER_ERRORCONTROL: ::DWORD = 0x00000020; -pub const SPSVCINST_NOCLOBBER_LOADORDERGROUP: ::DWORD = 0x00000040; -pub const SPSVCINST_NOCLOBBER_DEPENDENCIES: ::DWORD = 0x00000080; -pub const SPSVCINST_NOCLOBBER_DESCRIPTION: ::DWORD = 0x00000100; -pub const SPSVCINST_STOPSERVICE: ::DWORD = 0x00000200; -pub const SPSVCINST_CLOBBER_SECURITY: ::DWORD = 0x00000400; -pub const SPSVCINST_STARTSERVICE: ::DWORD = 0x00000800; -pub const SPSVCINST_NOCLOBBER_REQUIREDPRIVILEGES: ::DWORD = 0x00001000; -pub type HSPFILELOG = ::PVOID; -pub const SPFILELOG_SYSTEMLOG: ::DWORD = 0x00000001; -pub const SPFILELOG_FORCENEW: ::DWORD = 0x00000002; -pub const SPFILELOG_QUERYONLY: ::DWORD = 0x00000004; -pub const SPFILELOG_OEMFILE: ::DWORD = 0x00000001; -ENUM!{enum SetupFileLogInfo { - SetupFileLogSourceFilename, - SetupFileLogChecksum, - SetupFileLogDiskTagfile, - SetupFileLogDiskDescription, - SetupFileLogOtherInfo, - SetupFileLogMax, -}} -pub type LogSeverity = ::DWORD; -pub const LogSevInformation: LogSeverity = 0x00000000; -pub const LogSevWarning: LogSeverity = 0x00000001; -pub const LogSevError: LogSeverity = 0x00000002; -pub const LogSevFatalError: LogSeverity = 0x00000003; -pub const LogSevMaximum: LogSeverity = 0x00000004; -pub const DICD_GENERATE_ID: ::DWORD = 0x00000001; -pub const DICD_INHERIT_CLASSDRVS: ::DWORD = 0x00000002; -pub const DIOD_INHERIT_CLASSDRVS: ::DWORD = 0x00000002; -pub const DIOD_CANCEL_REMOVE: ::DWORD = 0x00000004; -pub const DIODI_NO_ADD: ::DWORD = 0x00000001; -pub const SPRDI_FIND_DUPS: ::DWORD = 0x00000001; -pub const SPDIT_NODRIVER: ::DWORD = 0x00000000; -pub const SPDIT_CLASSDRIVER: ::DWORD = 0x00000001; -pub const SPDIT_COMPATDRIVER: ::DWORD = 0x00000002; -pub const DIGCF_DEFAULT: ::DWORD = 0x00000001; -pub const DIGCF_PRESENT: ::DWORD = 0x00000002; -pub const DIGCF_ALLCLASSES: ::DWORD = 0x00000004; -pub const DIGCF_PROFILE: ::DWORD = 0x00000008; -pub const DIGCF_DEVICEINTERFACE: ::DWORD = 0x00000010; -pub const DIBCI_NOINSTALLCLASS: ::DWORD = 0x00000001; -pub const DIBCI_NODISPLAYCLASS: ::DWORD = 0x00000002; -pub const DIOCR_INSTALLER: ::DWORD = 0x00000001; -pub const DIOCR_INTERFACE: ::DWORD = 0x00000002; -pub const DIREG_DEV: ::DWORD = 0x00000001; -pub const DIREG_DRV: ::DWORD = 0x00000002; -pub const DIREG_BOTH: ::DWORD = 0x00000004; -pub const DICLASSPROP_INSTALLER: ::DWORD = 0x00000001; -pub const DICLASSPROP_INTERFACE: ::DWORD = 0x00000002; -pub const SPDRP_DEVICEDESC: ::DWORD = 0x00000000; -pub const SPDRP_HARDWAREID: ::DWORD = 0x00000001; -pub const SPDRP_COMPATIBLEIDS: ::DWORD = 0x00000002; -pub const SPDRP_UNUSED0: ::DWORD = 0x00000003; -pub const SPDRP_SERVICE: ::DWORD = 0x00000004; -pub const SPDRP_UNUSED1: ::DWORD = 0x00000005; -pub const SPDRP_UNUSED2: ::DWORD = 0x00000006; -pub const SPDRP_CLASS: ::DWORD = 0x00000007; -pub const SPDRP_CLASSGUID: ::DWORD = 0x00000008; -pub const SPDRP_DRIVER: ::DWORD = 0x00000009; -pub const SPDRP_CONFIGFLAGS: ::DWORD = 0x0000000A; -pub const SPDRP_MFG: ::DWORD = 0x0000000B; -pub const SPDRP_FRIENDLYNAME: ::DWORD = 0x0000000C; -pub const SPDRP_LOCATION_INFORMATION: ::DWORD = 0x0000000D; -pub const SPDRP_PHYSICAL_DEVICE_OBJECT_NAME: ::DWORD = 0x0000000E; -pub const SPDRP_CAPABILITIES: ::DWORD = 0x0000000F; -pub const SPDRP_UI_NUMBER: ::DWORD = 0x00000010; -pub const SPDRP_UPPERFILTERS: ::DWORD = 0x00000011; -pub const SPDRP_LOWERFILTERS: ::DWORD = 0x00000012; -pub const SPDRP_BUSTYPEGUID: ::DWORD = 0x00000013; -pub const SPDRP_LEGACYBUSTYPE: ::DWORD = 0x00000014; -pub const SPDRP_BUSNUMBER: ::DWORD = 0x00000015; -pub const SPDRP_ENUMERATOR_NAME: ::DWORD = 0x00000016; -pub const SPDRP_SECURITY: ::DWORD = 0x00000017; -pub const SPDRP_SECURITY_SDS: ::DWORD = 0x00000018; -pub const SPDRP_DEVTYPE: ::DWORD = 0x00000019; -pub const SPDRP_EXCLUSIVE: ::DWORD = 0x0000001A; -pub const SPDRP_CHARACTERISTICS: ::DWORD = 0x0000001B; -pub const SPDRP_ADDRESS: ::DWORD = 0x0000001C; -pub const SPDRP_UI_NUMBER_DESC_FORMAT: ::DWORD = 0x0000001D; -pub const SPDRP_DEVICE_POWER_DATA: ::DWORD = 0x0000001E; -pub const SPDRP_REMOVAL_POLICY: ::DWORD = 0x0000001F; -pub const SPDRP_REMOVAL_POLICY_HW_DEFAULT: ::DWORD = 0x00000020; -pub const SPDRP_REMOVAL_POLICY_OVERRIDE: ::DWORD = 0x00000021; -pub const SPDRP_INSTALL_STATE: ::DWORD = 0x00000022; -pub const SPDRP_LOCATION_PATHS: ::DWORD = 0x00000023; -pub const SPDRP_BASE_CONTAINERID: ::DWORD = 0x00000024; -pub const SPDRP_MAXIMUM_PROPERTY: ::DWORD = 0x00000025; -pub const SPCRP_UPPERFILTERS: ::DWORD = 0x00000011; -pub const SPCRP_LOWERFILTERS: ::DWORD = 0x00000012; -pub const SPCRP_SECURITY: ::DWORD = 0x00000017; -pub const SPCRP_SECURITY_SDS: ::DWORD = 0x00000018; -pub const SPCRP_DEVTYPE: ::DWORD = 0x00000019; -pub const SPCRP_EXCLUSIVE: ::DWORD = 0x0000001A; -pub const SPCRP_CHARACTERISTICS: ::DWORD = 0x0000001B; -pub const SPCRP_MAXIMUM_PROPERTY: ::DWORD = 0x0000001C; -pub const DMI_MASK: ::DWORD = 0x00000001; -pub const DMI_BKCOLOR: ::DWORD = 0x00000002; -pub const DMI_USERECT: ::DWORD = 0x00000004; -pub const DIGCDP_FLAG_BASIC: ::DWORD = 0x00000001; -pub const DIGCDP_FLAG_ADVANCED: ::DWORD = 0x00000002; -pub const DIGCDP_FLAG_REMOTE_BASIC: ::DWORD = 0x00000003; -pub const DIGCDP_FLAG_REMOTE_ADVANCED: ::DWORD = 0x00000004; -pub const IDI_RESOURCEFIRST: ::c_int = 159; -pub const IDI_RESOURCE: ::c_int = 159; -pub const IDI_RESOURCELAST: ::c_int = 161; -pub const IDI_RESOURCEOVERLAYFIRST: ::c_int = 161; -pub const IDI_RESOURCEOVERLAYLAST: ::c_int = 161; -pub const IDI_CONFLICT: ::c_int = 161; -pub const IDI_CLASSICON_OVERLAYFIRST: ::c_int = 500; -pub const IDI_CLASSICON_OVERLAYLAST: ::c_int = 502; -pub const IDI_PROBLEM_OVL: ::c_int = 500; -pub const IDI_DISABLED_OVL: ::c_int = 501; -pub const IDI_FORCED_OVL: ::c_int = 502; -pub const SPWPT_SELECTDEVICE: ::DWORD = 0x00000001; -pub const SPWP_USE_DEVINFO_DATA: ::DWORD = 0x00000001; -#[repr(C)] #[derive(Copy)] -pub struct SP_INF_SIGNER_INFO_V1_A { - pub cbSize: ::DWORD, - pub CatalogFile: [::CHAR; ::MAX_PATH], - pub DigitalSigner: [::CHAR; ::MAX_PATH], - pub DigitalSignerVersion: [::CHAR; ::MAX_PATH], -} -impl Clone for SP_INF_SIGNER_INFO_V1_A { fn clone(&self) -> SP_INF_SIGNER_INFO_V1_A { *self } } -pub type PSP_INF_SIGNER_INFO_V1_A = *mut SP_INF_SIGNER_INFO_V1_A; -#[repr(C)] #[derive(Copy)] -pub struct SP_INF_SIGNER_INFO_V1_W { - pub cbSize: ::DWORD, - pub CatalogFile: [::WCHAR; ::MAX_PATH], - pub DigitalSigner: [::WCHAR; ::MAX_PATH], - pub DigitalSignerVersion: [::WCHAR; ::MAX_PATH], -} -impl Clone for SP_INF_SIGNER_INFO_V1_W { fn clone(&self) -> SP_INF_SIGNER_INFO_V1_W { *self } } -pub type PSP_INF_SIGNER_INFO_V1_W = *mut SP_INF_SIGNER_INFO_V1_W; -#[repr(C)] #[derive(Copy)] -pub struct SP_INF_SIGNER_INFO_V2_A { - pub cbSize: ::DWORD, - pub CatalogFile: [::CHAR; ::MAX_PATH], - pub DigitalSigner: [::CHAR; ::MAX_PATH], - pub DigitalSignerVersion: [::CHAR; ::MAX_PATH], - pub SignerScore: ::DWORD, -} -impl Clone for SP_INF_SIGNER_INFO_V2_A { fn clone(&self) -> SP_INF_SIGNER_INFO_V2_A { *self } } -pub type PSP_INF_SIGNER_INFO_V2_A = *mut SP_INF_SIGNER_INFO_V2_A; -#[repr(C)] #[derive(Copy)] -pub struct SP_INF_SIGNER_INFO_V2_W { - pub cbSize: ::DWORD, - pub CatalogFile: [::WCHAR; ::MAX_PATH], - pub DigitalSigner: [::WCHAR; ::MAX_PATH], - pub DigitalSignerVersion: [::WCHAR; ::MAX_PATH], - pub SignerScore: ::DWORD, -} -impl Clone for SP_INF_SIGNER_INFO_V2_W { fn clone(&self) -> SP_INF_SIGNER_INFO_V2_W { *self } } -pub type PSP_INF_SIGNER_INFO_V2_W = *mut SP_INF_SIGNER_INFO_V2_W; -pub type SP_INF_SIGNER_INFO_A = SP_INF_SIGNER_INFO_V2_A; -pub type PSP_INF_SIGNER_INFO_A = PSP_INF_SIGNER_INFO_V2_A; -pub type SP_INF_SIGNER_INFO_W = SP_INF_SIGNER_INFO_V2_W; -pub type PSP_INF_SIGNER_INFO_W = PSP_INF_SIGNER_INFO_V2_W; -pub const SIGNERSCORE_UNKNOWN: ::DWORD = 0xFF000000; -pub const SIGNERSCORE_W9X_SUSPECT: ::DWORD = 0xC0000000; -pub const SIGNERSCORE_UNSIGNED: ::DWORD = 0x80000000; -pub const SIGNERSCORE_AUTHENTICODE: ::DWORD = 0x0F000000; -pub const SIGNERSCORE_WHQL: ::DWORD = 0x0D000005; -pub const SIGNERSCORE_UNCLASSIFIED: ::DWORD = 0x0D000004; -pub const SIGNERSCORE_INBOX: ::DWORD = 0x0D000003; -pub const SIGNERSCORE_LOGO_STANDARD: ::DWORD = 0x0D000002; -pub const SIGNERSCORE_LOGO_PREMIUM: ::DWORD = 0x0D000001; -pub const SIGNERSCORE_MASK: ::DWORD = 0xFF000000; -pub const SIGNERSCORE_SIGNED_MASK: ::DWORD = 0xF0000000; -pub const DICUSTOMDEVPROP_MERGE_MULTISZ: ::DWORD = 0x00000001; -pub const SCWMI_CLOBBER_SECURITY: ::DWORD = 0x00000001; diff --git a/deps/winapi-0.2.5/src/shtypes.rs b/deps/winapi-0.2.5/src/shtypes.rs deleted file mode 100644 index 54c035847..000000000 --- a/deps/winapi-0.2.5/src/shtypes.rs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright © 2015, Peter Atashian -// Licensed under the MIT License <LICENSE.md> -//! this ALWAYS GENERATED file contains the definitions for the interfaces -#[repr(C)] #[derive(Debug)] #[allow(missing_copy_implementations)] -pub struct SHITEMID { - pub cb: ::USHORT, - pub abID: [::BYTE; 0], -} -pub type LPSHITEMID = *mut SHITEMID; -pub type LPCSHITEMID = *const SHITEMID; -#[repr(C)] #[derive(Debug)] -pub struct ITEMIDLIST { - pub mkid: SHITEMID, -} -pub type ITEMIDLIST_RELATIVE = ITEMIDLIST; -pub type ITEMID_CHILD = ITEMIDLIST; -pub type ITEMIDLIST_ABSOLUTE = ITEMIDLIST; -pub type LPITEMIDLIST = *mut ITEMIDLIST; -pub type LPCITEMIDLIST = *const ITEMIDLIST; -pub type PIDLIST_ABSOLUTE = *mut ITEMIDLIST_ABSOLUTE; -pub type PCIDLIST_ABSOLUTE = *const ITEMIDLIST_ABSOLUTE; -pub type PCUIDLIST_ABSOLUTE = *const ITEMIDLIST_ABSOLUTE; -pub type PIDLIST_RELATIVE = *mut ITEMIDLIST_RELATIVE; -pub type PCIDLIST_RELATIVE = *const ITEMIDLIST_RELATIVE; -pub type PUIDLIST_RELATIVE = *mut ITEMIDLIST_RELATIVE; -pub type PCUIDLIST_RELATIVE = *const ITEMIDLIST_RELATIVE; -pub type PITEMID_CHILD = *mut ITEMID_CHILD; -pub type PCITEMID_CHILD = *const ITEMID_CHILD; -pub type PUITEMID_CHILD = *mut ITEMID_CHILD; -pub type PCUITEMID_CHILD = *const ITEMID_CHILD; -pub type PCUITEMID_CHILD_ARRAY = *const PCUITEMID_CHILD; -pub type PCUIDLIST_RELATIVE_ARRAY = *const PCUIDLIST_RELATIVE; -pub type PCIDLIST_ABSOLUTE_ARRAY = *const PCIDLIST_ABSOLUTE; -pub type PCUIDLIST_ABSOLUTE_ARRAY = *const PCUIDLIST_ABSOLUTE; -STRUCT!{struct COMDLG_FILTERSPEC { - pszName: ::LPCWSTR, - pszSpec: ::LPCWSTR, -}} -pub type KNOWNFOLDERID = ::GUID; -pub type REFKNOWNFOLDERID = *const KNOWNFOLDERID; diff --git a/deps/winapi-0.2.5/src/sspi.rs b/deps/winapi-0.2.5/src/sspi.rs deleted file mode 100644 index 5ce9311ef..000000000 --- a/deps/winapi-0.2.5/src/sspi.rs +++ /dev/null @@ -1,661 +0,0 @@ -// Copyright © 2015, Peter Atashian -// Licensed under the MIT License <LICENSE.md> -//! Security Support Provider Interface Prototypes and structure definitions -pub type SEC_WCHAR = ::WCHAR; -pub type SEC_CHAR = ::CHAR; -pub type SECURITY_STATUS = ::LONG; -STRUCT!{struct SecHandle { - dwLower: ::ULONG_PTR, - dwUpper: ::ULONG_PTR, -}} -pub type PSecHandle = *mut SecHandle; -pub const SEC_DELETED_HANDLE: ::ULONG_PTR = 2; -pub type CredHandle = SecHandle; -pub type PCredHandle = PSecHandle; -pub type CtxtHandle = SecHandle; -pub type PCtxtHandle = PSecHandle; -pub type SECURITY_INTEGER = ::LARGE_INTEGER; -pub type PSECURITY_INTEGER = *mut ::LARGE_INTEGER; -pub type TimeStamp = SECURITY_INTEGER; -pub type PTimeStamp = *mut SECURITY_INTEGER; -STRUCT!{struct SECURITY_STRING { - Length: ::c_ushort, - MaximumLength: ::c_ushort, - Buffer: *mut ::c_ushort, -}} -pub type PSECURITY_STRING = *mut SECURITY_STRING; -STRUCT!{struct SecPkgInfoW { - fCapabilities: ::c_ulong, - wVersion: ::c_ushort, - wRPCID: ::c_ushort, - cbMaxToken: ::c_ulong, - Name: *mut SEC_WCHAR, - Comment: *mut SEC_WCHAR, -}} -pub type PSecPkgInfoW = *mut SecPkgInfoW; -STRUCT!{struct SecPkgInfoA { - fCapabilities: ::c_ulong, - wVersion: ::c_ushort, - wRPCID: ::c_ushort, - cbMaxToken: ::c_ulong, - Name: *mut SEC_CHAR, - Comment: *mut SEC_CHAR, -}} -pub type PSecPkgInfoA = *mut SecPkgInfoA; -pub const SECPKG_FLAG_INTEGRITY: ::c_ulong = 0x00000001; -pub const SECPKG_FLAG_PRIVACY: ::c_ulong = 0x00000002; -pub const SECPKG_FLAG_TOKEN_ONLY: ::c_ulong = 0x00000004; -pub const SECPKG_FLAG_DATAGRAM: ::c_ulong = 0x00000008; -pub const SECPKG_FLAG_CONNECTION: ::c_ulong = 0x00000010; -pub const SECPKG_FLAG_MULTI_REQUIRED: ::c_ulong = 0x00000020; -pub const SECPKG_FLAG_CLIENT_ONLY: ::c_ulong = 0x00000040; -pub const SECPKG_FLAG_EXTENDED_ERROR: ::c_ulong = 0x00000080; -pub const SECPKG_FLAG_IMPERSONATION: ::c_ulong = 0x00000100; -pub const SECPKG_FLAG_ACCEPT_WIN32_NAME: ::c_ulong = 0x00000200; -pub const SECPKG_FLAG_STREAM: ::c_ulong = 0x00000400; -pub const SECPKG_FLAG_NEGOTIABLE: ::c_ulong = 0x00000800; -pub const SECPKG_FLAG_GSS_COMPATIBLE: ::c_ulong = 0x00001000; -pub const SECPKG_FLAG_LOGON: ::c_ulong = 0x00002000; -pub const SECPKG_FLAG_ASCII_BUFFERS: ::c_ulong = 0x00004000; -pub const SECPKG_FLAG_FRAGMENT: ::c_ulong = 0x00008000; -pub const SECPKG_FLAG_MUTUAL_AUTH: ::c_ulong = 0x00010000; -pub const SECPKG_FLAG_DELEGATION: ::c_ulong = 0x00020000; -pub const SECPKG_FLAG_READONLY_WITH_CHECKSUM: ::c_ulong = 0x00040000; -pub const SECPKG_FLAG_RESTRICTED_TOKENS: ::c_ulong = 0x00080000; -pub const SECPKG_FLAG_NEGO_EXTENDER: ::c_ulong = 0x00100000; -pub const SECPKG_FLAG_NEGOTIABLE2: ::c_ulong = 0x00200000; -pub const SECPKG_FLAG_APPCONTAINER_PASSTHROUGH: ::c_ulong = 0x00400000; -pub const SECPKG_FLAG_APPCONTAINER_CHECKS: ::c_ulong = 0x00800000; -pub const SECPKG_ID_NONE: ::c_ulong = 0xFFFF; -pub const SECPKG_CALLFLAGS_APPCONTAINER: ::c_ulong = 0x00000001; -pub const SECPKG_CALLFLAGS_APPCONTAINER_AUTHCAPABLE: ::c_ulong = 0x00000002; -pub const SECPKG_CALLFLAGS_FORCE_SUPPLIED: ::c_ulong = 0x00000004; -STRUCT!{struct SecBuffer { - cbBuffer: ::c_ulong, - BufferType: ::c_ulong, - pvBuffer: *mut ::c_void, -}} -pub type PSecBuffer = *mut SecBuffer; -STRUCT!{struct SecBufferDesc { - ulVersion: ::c_ulong, - cBuffers: ::c_ulong, - pBuffers: PSecBuffer, -}} -pub type PSecBufferDesc = *mut SecBufferDesc; -pub const SECBUFFER_VERSION: ::c_ulong = 0; -pub const SECBUFFER_EMPTY: ::c_ulong = 0; -pub const SECBUFFER_DATA: ::c_ulong = 1; -pub const SECBUFFER_TOKEN: ::c_ulong = 2; -pub const SECBUFFER_PKG_PARAMS: ::c_ulong = 3; -pub const SECBUFFER_MISSING: ::c_ulong = 4; -pub const SECBUFFER_EXTRA: ::c_ulong = 5; -pub const SECBUFFER_STREAM_TRAILER: ::c_ulong = 6; -pub const SECBUFFER_STREAM_HEADER: ::c_ulong = 7; -pub const SECBUFFER_NEGOTIATION_INFO: ::c_ulong = 8; -pub const SECBUFFER_PADDING: ::c_ulong = 9; -pub const SECBUFFER_STREAM: ::c_ulong = 10; -pub const SECBUFFER_MECHLIST: ::c_ulong = 11; -pub const SECBUFFER_MECHLIST_SIGNATURE: ::c_ulong = 12; -pub const SECBUFFER_TARGET: ::c_ulong = 13; -pub const SECBUFFER_CHANNEL_BINDINGS: ::c_ulong = 14; -pub const SECBUFFER_CHANGE_PASS_RESPONSE: ::c_ulong = 15; -pub const SECBUFFER_TARGET_HOST: ::c_ulong = 16; -pub const SECBUFFER_ALERT: ::c_ulong = 17; -pub const SECBUFFER_APPLICATION_PROTOCOLS: ::c_ulong = 18; -pub const SECBUFFER_ATTRMASK: ::c_ulong = 0xF0000000; -pub const SECBUFFER_READONLY: ::c_ulong = 0x80000000; -pub const SECBUFFER_READONLY_WITH_CHECKSUM: ::c_ulong = 0x10000000; -pub const SECBUFFER_RESERVED: ::c_ulong = 0x60000000; -STRUCT!{struct SEC_NEGOTIATION_INFO { - Size: ::c_ulong, - NameLength: ::c_ulong, - Name: *mut SEC_WCHAR, - Reserved: *mut ::c_void, -}} -pub type PSEC_NEGOTIATION_INFO = *mut SEC_NEGOTIATION_INFO; -STRUCT!{struct SEC_CHANNEL_BINDINGS { - dwInitiatorAddrType: ::c_ulong, - cbInitiatorLength: ::c_ulong, - dwInitiatorOffset: ::c_ulong, - dwAcceptorAddrType: ::c_ulong, - cbAcceptorLength: ::c_ulong, - dwAcceptorOffset: ::c_ulong, - cbApplicationDataLength: ::c_ulong, - dwApplicationDataOffset: ::c_ulong, -}} -pub type PSEC_CHANNEL_BINDINGS = *mut SEC_CHANNEL_BINDINGS; -ENUM!{enum SEC_APPLICATION_PROTOCOL_NEGOTIATION_EXT { - SecApplicationProtocolNegotiationExt_None, - SecApplicationProtocolNegotiationExt_NPN, - SecApplicationProtocolNegotiationExt_ALPN, -}} -pub type PSEC_APPLICATION_PROTOCOL_NEGOTIATION_EXT = *mut SEC_APPLICATION_PROTOCOL_NEGOTIATION_EXT; -STRUCT!{struct SEC_APPLICATION_PROTOCOL_LIST { - ProtoNegoExt: ::SEC_APPLICATION_PROTOCOL_NEGOTIATION_EXT, - ProtocolListSize: ::c_ushort, - ProtocolList: [::c_uchar; 0], -}} -STRUCT!{struct SEC_APPLICATION_PROTOCOLS { - ProtocolListsSize: ::c_ulong, - ProtocolLists: [SEC_APPLICATION_PROTOCOL_LIST; 0], -}} -pub type PSEC_APPLICATION_PROTOCOLS = *mut SEC_APPLICATION_PROTOCOLS; -pub const SECURITY_NATIVE_DREP: ::c_ulong = 0x00000010; -pub const SECURITY_NETWORK_DREP: ::c_ulong = 0x00000000; -pub const SECPKG_CRED_INBOUND: ::c_ulong = 0x00000001; -pub const SECPKG_CRED_OUTBOUND: ::c_ulong = 0x00000002; -pub const SECPKG_CRED_BOTH: ::c_ulong = 0x00000003; -pub const SECPKG_CRED_DEFAULT: ::c_ulong = 0x00000004; -pub const SECPKG_CRED_RESERVED: ::c_ulong = 0xF0000000; -pub const SECPKG_CRED_AUTOLOGON_RESTRICTED: ::c_ulong = 0x00000010; -pub const SECPKG_CRED_PROCESS_POLICY_ONLY: ::c_ulong = 0x00000020; -pub const ISC_REQ_DELEGATE: ::c_ulong = 0x00000001; -pub const ISC_REQ_MUTUAL_AUTH: ::c_ulong = 0x00000002; -pub const ISC_REQ_REPLAY_DETECT: ::c_ulong = 0x00000004; -pub const ISC_REQ_SEQUENCE_DETECT: ::c_ulong = 0x00000008; -pub const ISC_REQ_CONFIDENTIALITY: ::c_ulong = 0x00000010; -pub const ISC_REQ_USE_SESSION_KEY: ::c_ulong = 0x00000020; -pub const ISC_REQ_PROMPT_FOR_CREDS: ::c_ulong = 0x00000040; -pub const ISC_REQ_USE_SUPPLIED_CREDS: ::c_ulong = 0x00000080; -pub const ISC_REQ_ALLOCATE_MEMORY: ::c_ulong = 0x00000100; -pub const ISC_REQ_USE_DCE_STYLE: ::c_ulong = 0x00000200; -pub const ISC_REQ_DATAGRAM: ::c_ulong = 0x00000400; -pub const ISC_REQ_CONNECTION: ::c_ulong = 0x00000800; -pub const ISC_REQ_CALL_LEVEL: ::c_ulong = 0x00001000; -pub const ISC_REQ_FRAGMENT_SUPPLIED: ::c_ulong = 0x00002000; -pub const ISC_REQ_EXTENDED_ERROR: ::c_ulong = 0x00004000; -pub const ISC_REQ_STREAM: ::c_ulong = 0x00008000; -pub const ISC_REQ_INTEGRITY: ::c_ulong = 0x00010000; -pub const ISC_REQ_IDENTIFY: ::c_ulong = 0x00020000; -pub const ISC_REQ_NULL_SESSION: ::c_ulong = 0x00040000; -pub const ISC_REQ_MANUAL_CRED_VALIDATION: ::c_ulong = 0x00080000; -pub const ISC_REQ_RESERVED1: ::c_ulong = 0x00100000; -pub const ISC_REQ_FRAGMENT_TO_FIT: ::c_ulong = 0x00200000; -pub const ISC_REQ_FORWARD_CREDENTIALS: ::c_ulong = 0x00400000; -pub const ISC_REQ_NO_INTEGRITY: ::c_ulong = 0x00800000; -pub const ISC_REQ_USE_HTTP_STYLE: ::c_ulong = 0x01000000; -pub const ISC_REQ_UNVERIFIED_TARGET_NAME: ::c_ulong = 0x20000000; -pub const ISC_REQ_CONFIDENTIALITY_ONLY: ::c_ulong = 0x40000000; -pub const ISC_RET_DELEGATE: ::c_ulong = 0x00000001; -pub const ISC_RET_MUTUAL_AUTH: ::c_ulong = 0x00000002; -pub const ISC_RET_REPLAY_DETECT: ::c_ulong = 0x00000004; -pub const ISC_RET_SEQUENCE_DETECT: ::c_ulong = 0x00000008; -pub const ISC_RET_CONFIDENTIALITY: ::c_ulong = 0x00000010; -pub const ISC_RET_USE_SESSION_KEY: ::c_ulong = 0x00000020; -pub const ISC_RET_USED_COLLECTED_CREDS: ::c_ulong = 0x00000040; -pub const ISC_RET_USED_SUPPLIED_CREDS: ::c_ulong = 0x00000080; -pub const ISC_RET_ALLOCATED_MEMORY: ::c_ulong = 0x00000100; -pub const ISC_RET_USED_DCE_STYLE: ::c_ulong = 0x00000200; -pub const ISC_RET_DATAGRAM: ::c_ulong = 0x00000400; -pub const ISC_RET_CONNECTION: ::c_ulong = 0x00000800; -pub const ISC_RET_INTERMEDIATE_RETURN: ::c_ulong = 0x00001000; -pub const ISC_RET_CALL_LEVEL: ::c_ulong = 0x00002000; -pub const ISC_RET_EXTENDED_ERROR: ::c_ulong = 0x00004000; -pub const ISC_RET_STREAM: ::c_ulong = 0x00008000; -pub const ISC_RET_INTEGRITY: ::c_ulong = 0x00010000; -pub const ISC_RET_IDENTIFY: ::c_ulong = 0x00020000; -pub const ISC_RET_NULL_SESSION: ::c_ulong = 0x00040000; -pub const ISC_RET_MANUAL_CRED_VALIDATION: ::c_ulong = 0x00080000; -pub const ISC_RET_RESERVED1: ::c_ulong = 0x00100000; -pub const ISC_RET_FRAGMENT_ONLY: ::c_ulong = 0x00200000; -pub const ISC_RET_FORWARD_CREDENTIALS: ::c_ulong = 0x00400000; -pub const ISC_RET_USED_HTTP_STYLE: ::c_ulong = 0x01000000; -pub const ISC_RET_NO_ADDITIONAL_TOKEN: ::c_ulong = 0x02000000; -pub const ISC_RET_REAUTHENTICATION: ::c_ulong = 0x08000000; -pub const ISC_RET_CONFIDENTIALITY_ONLY: ::c_ulong = 0x40000000; -pub const ASC_REQ_DELEGATE: ::c_ulong = 0x00000001; -pub const ASC_REQ_MUTUAL_AUTH: ::c_ulong = 0x00000002; -pub const ASC_REQ_REPLAY_DETECT: ::c_ulong = 0x00000004; -pub const ASC_REQ_SEQUENCE_DETECT: ::c_ulong = 0x00000008; -pub const ASC_REQ_CONFIDENTIALITY: ::c_ulong = 0x00000010; -pub const ASC_REQ_USE_SESSION_KEY: ::c_ulong = 0x00000020; -pub const ASC_REQ_SESSION_TICKET: ::c_ulong = 0x00000040; -pub const ASC_REQ_ALLOCATE_MEMORY: ::c_ulong = 0x00000100; -pub const ASC_REQ_USE_DCE_STYLE: ::c_ulong = 0x00000200; -pub const ASC_REQ_DATAGRAM: ::c_ulong = 0x00000400; -pub const ASC_REQ_CONNECTION: ::c_ulong = 0x00000800; -pub const ASC_REQ_CALL_LEVEL: ::c_ulong = 0x00001000; -pub const ASC_REQ_EXTENDED_ERROR: ::c_ulong = 0x00008000; -pub const ASC_REQ_STREAM: ::c_ulong = 0x00010000; -pub const ASC_REQ_INTEGRITY: ::c_ulong = 0x00020000; -pub const ASC_REQ_LICENSING: ::c_ulong = 0x00040000; -pub const ASC_REQ_IDENTIFY: ::c_ulong = 0x00080000; -pub const ASC_REQ_ALLOW_NULL_SESSION: ::c_ulong = 0x00100000; -pub const ASC_REQ_ALLOW_NON_USER_LOGONS: ::c_ulong = 0x00200000; -pub const ASC_REQ_ALLOW_CONTEXT_REPLAY: ::c_ulong = 0x00400000; -pub const ASC_REQ_FRAGMENT_TO_FIT: ::c_ulong = 0x00800000; -pub const ASC_REQ_FRAGMENT_SUPPLIED: ::c_ulong = 0x00002000; -pub const ASC_REQ_NO_TOKEN: ::c_ulong = 0x01000000; -pub const ASC_REQ_PROXY_BINDINGS: ::c_ulong = 0x04000000; -pub const ASC_REQ_ALLOW_MISSING_BINDINGS: ::c_ulong = 0x10000000; -pub const ASC_RET_DELEGATE: ::c_ulong = 0x00000001; -pub const ASC_RET_MUTUAL_AUTH: ::c_ulong = 0x00000002; -pub const ASC_RET_REPLAY_DETECT: ::c_ulong = 0x00000004; -pub const ASC_RET_SEQUENCE_DETECT: ::c_ulong = 0x00000008; -pub const ASC_RET_CONFIDENTIALITY: ::c_ulong = 0x00000010; -pub const ASC_RET_USE_SESSION_KEY: ::c_ulong = 0x00000020; -pub const ASC_RET_SESSION_TICKET: ::c_ulong = 0x00000040; -pub const ASC_RET_ALLOCATED_MEMORY: ::c_ulong = 0x00000100; -pub const ASC_RET_USED_DCE_STYLE: ::c_ulong = 0x00000200; -pub const ASC_RET_DATAGRAM: ::c_ulong = 0x00000400; -pub const ASC_RET_CONNECTION: ::c_ulong = 0x00000800; -pub const ASC_RET_CALL_LEVEL: ::c_ulong = 0x00002000; -pub const ASC_RET_THIRD_LEG_FAILED: ::c_ulong = 0x00004000; -pub const ASC_RET_EXTENDED_ERROR: ::c_ulong = 0x00008000; -pub const ASC_RET_STREAM: ::c_ulong = 0x00010000; -pub const ASC_RET_INTEGRITY: ::c_ulong = 0x00020000; -pub const ASC_RET_LICENSING: ::c_ulong = 0x00040000; -pub const ASC_RET_IDENTIFY: ::c_ulong = 0x00080000; -pub const ASC_RET_NULL_SESSION: ::c_ulong = 0x00100000; -pub const ASC_RET_ALLOW_NON_USER_LOGONS: ::c_ulong = 0x00200000; -pub const ASC_RET_ALLOW_CONTEXT_REPLAY: ::c_ulong = 0x00400000; -pub const ASC_RET_FRAGMENT_ONLY: ::c_ulong = 0x00800000; -pub const ASC_RET_NO_TOKEN: ::c_ulong = 0x01000000; -pub const ASC_RET_NO_ADDITIONAL_TOKEN: ::c_ulong = 0x02000000; -pub const SECPKG_CRED_ATTR_NAMES: ::c_ulong = 1; -pub const SECPKG_CRED_ATTR_SSI_PROVIDER: ::c_ulong = 2; -pub const SECPKG_CRED_ATTR_KDC_PROXY_SETTINGS: ::c_ulong = 3; -pub const SECPKG_CRED_ATTR_CERT: ::c_ulong = 4; -STRUCT!{struct SecPkgCredentials_NamesW { - sUserName: *mut SEC_WCHAR, -}} -pub type PSecPkgCredentials_NamesW = *mut SecPkgCredentials_NamesW; -STRUCT!{struct SecPkgCredentials_NamesA { - sUserName: *mut SEC_CHAR, -}} -pub type PSecPkgCredentials_NamesA = *mut SecPkgCredentials_NamesA; -STRUCT!{struct SecPkgCredentials_SSIProviderW { - sProviderName: *mut SEC_WCHAR, - ProviderInfoLength: ::c_ulong, - ProviderInfo: *mut ::c_char, -}} -pub type PSecPkgCredentials_SSIProviderW = *mut SecPkgCredentials_SSIProviderW; -STRUCT!{struct SecPkgCredentials_SSIProviderA { - sProviderName: *mut SEC_CHAR, - ProviderInfoLength: ::c_ulong, - ProviderInfo: *mut ::c_char, -}} -pub type PSecPkgCredentials_SSIProviderA = *mut SecPkgCredentials_SSIProviderA; -pub const KDC_PROXY_SETTINGS_V1: ::ULONG = 1; -pub const KDC_PROXY_SETTINGS_FLAGS_FORCEPROXY: ::ULONG = 0x1; -STRUCT!{struct SecPkgCredentials_KdcProxySettingsW { - Version: ::ULONG, - Flags: ::ULONG, - ProxyServerOffset: ::USHORT, - ProxyServerLength: ::USHORT, - ClientTlsCredOffset: ::USHORT, - ClientTlsCredLength: ::USHORT, -}} -pub type PSecPkgCredentials_KdcProxySettingsW = *mut SecPkgCredentials_KdcProxySettingsW; -STRUCT!{struct SecPkgCredentials_Cert { - EncodedCertSize: ::c_ulong, - EncodedCert: *mut ::c_uchar, -}} -pub type PSecPkgCredentials_Cert = *mut SecPkgCredentials_Cert; -pub const SECPKG_ATTR_SIZES: ::c_ulong = 0; -pub const SECPKG_ATTR_NAMES: ::c_ulong = 1; -pub const SECPKG_ATTR_LIFESPAN: ::c_ulong = 2; -pub const SECPKG_ATTR_DCE_INFO: ::c_ulong = 3; -pub const SECPKG_ATTR_STREAM_SIZES: ::c_ulong = 4; -pub const SECPKG_ATTR_KEY_INFO: ::c_ulong = 5; -pub const SECPKG_ATTR_AUTHORITY: ::c_ulong = 6; -pub const SECPKG_ATTR_PROTO_INFO: ::c_ulong = 7; -pub const SECPKG_ATTR_PASSWORD_EXPIRY: ::c_ulong = 8; -pub const SECPKG_ATTR_SESSION_KEY: ::c_ulong = 9; -pub const SECPKG_ATTR_PACKAGE_INFO: ::c_ulong = 10; -pub const SECPKG_ATTR_USER_FLAGS: ::c_ulong = 11; -pub const SECPKG_ATTR_NEGOTIATION_INFO: ::c_ulong = 12; -pub const SECPKG_ATTR_NATIVE_NAMES: ::c_ulong = 13; -pub const SECPKG_ATTR_FLAGS: ::c_ulong = 14; -pub const SECPKG_ATTR_USE_VALIDATED: ::c_ulong = 15; -pub const SECPKG_ATTR_CREDENTIAL_NAME: ::c_ulong = 16; -pub const SECPKG_ATTR_TARGET_INFORMATION: ::c_ulong = 17; -pub const SECPKG_ATTR_ACCESS_TOKEN: ::c_ulong = 18; -pub const SECPKG_ATTR_TARGET: ::c_ulong = 19; -pub const SECPKG_ATTR_AUTHENTICATION_ID: ::c_ulong = 20; -pub const SECPKG_ATTR_LOGOFF_TIME: ::c_ulong = 21; -pub const SECPKG_ATTR_NEGO_KEYS: ::c_ulong = 22; -pub const SECPKG_ATTR_PROMPTING_NEEDED: ::c_ulong = 24; -pub const SECPKG_ATTR_UNIQUE_BINDINGS: ::c_ulong = 25; -pub const SECPKG_ATTR_ENDPOINT_BINDINGS: ::c_ulong = 26; -pub const SECPKG_ATTR_CLIENT_SPECIFIED_TARGET: ::c_ulong = 27; -pub const SECPKG_ATTR_LAST_CLIENT_TOKEN_STATUS: ::c_ulong = 30; -pub const SECPKG_ATTR_NEGO_PKG_INFO: ::c_ulong = 31; -pub const SECPKG_ATTR_NEGO_STATUS: ::c_ulong = 32; -pub const SECPKG_ATTR_CONTEXT_DELETED: ::c_ulong = 33; -pub const SECPKG_ATTR_DTLS_MTU: ::c_ulong = 34; -pub const SECPKG_ATTR_DATAGRAM_SIZES: ::c_ulong = SECPKG_ATTR_STREAM_SIZES; -pub const SECPKG_ATTR_SUBJECT_SECURITY_ATTRIBUTES: ::c_ulong = 128; -pub const SECPKG_ATTR_APPLICATION_PROTOCOL: ::c_ulong = 35; -STRUCT!{struct SecPkgContext_SubjectAttributes { - AttributeInfo: *mut ::c_void, -}} -pub type PSecPkgContext_SubjectAttributes = *mut SecPkgContext_SubjectAttributes; -pub const SECPKG_ATTR_NEGO_INFO_FLAG_NO_KERBEROS: ::c_ulong = 0x1; -pub const SECPKG_ATTR_NEGO_INFO_FLAG_NO_NTLM: ::c_ulong = 0x2; -ENUM!{enum SECPKG_CRED_CLASS { - SecPkgCredClass_None = 0, - SecPkgCredClass_Ephemeral = 10, - SecPkgCredClass_PersistedGeneric = 20, - SecPkgCredClass_PersistedSpecific = 30, - SecPkgCredClass_Explicit = 40, -}} -pub type PSECPKG_CRED_CLASS = *mut SECPKG_CRED_CLASS; -STRUCT!{struct SecPkgContext_CredInfo { - CredClass: SECPKG_CRED_CLASS, - IsPromptingNeeded: ::c_ulong, -}} -pub type PSecPkgContext_CredInfo = *mut SecPkgContext_CredInfo; -STRUCT!{struct SecPkgContext_NegoPackageInfo { - PackageMask: ::c_ulong, -}} -pub type PSecPkgContext_NegoPackageInfo = *mut SecPkgContext_NegoPackageInfo; -STRUCT!{struct SecPkgContext_NegoStatus { - LastStatus: ::c_ulong, -}} -pub type PSecPkgContext_NegoStatus = *mut SecPkgContext_NegoStatus; -STRUCT!{struct SecPkgContext_Sizes { - cbMaxToken: ::c_ulong, - cbMaxSignature: ::c_ulong, - cbBlockSize: ::c_ulong, - cbSecurityTrailer: ::c_ulong, -}} -pub type PSecPkgContext_Sizes = *mut SecPkgContext_Sizes; -STRUCT!{struct SecPkgContext_StreamSizes { - cbHeader: ::c_ulong, - cbTrailer: ::c_ulong, - cbMaximumMessage: ::c_ulong, - cBuffers: ::c_ulong, - cbBlockSize: ::c_ulong, -}} -pub type PSecPkgContext_StreamSizes = *mut SecPkgContext_StreamSizes; -pub type SecPkgContext_DatagramSizes = SecPkgContext_StreamSizes; -pub type PSecPkgContext_DatagramSizes = PSecPkgContext_StreamSizes; -STRUCT!{struct SecPkgContext_NamesW { - sUserName: *mut SEC_WCHAR, -}} -pub type PSecPkgContext_NamesW = *mut SecPkgContext_NamesW; -ENUM!{enum SECPKG_ATTR_LCT_STATUS { - SecPkgAttrLastClientTokenYes, - SecPkgAttrLastClientTokenNo, - SecPkgAttrLastClientTokenMaybe, -}} -pub type PSECPKG_ATTR_LCT_STATUS = *mut SECPKG_ATTR_LCT_STATUS; -STRUCT!{struct SecPkgContext_LastClientTokenStatus { - LastClientTokenStatus: SECPKG_ATTR_LCT_STATUS, -}} -pub type PSecPkgContext_LastClientTokenStatus = *mut SecPkgContext_LastClientTokenStatus; -STRUCT!{struct SecPkgContext_NamesA { - sUserName: *mut SEC_CHAR, -}} -pub type PSecPkgContext_NamesA = *mut SecPkgContext_NamesA; -STRUCT!{struct SecPkgContext_Lifespan { - tsStart: TimeStamp, - tsExpiry: TimeStamp, -}} -pub type PSecPkgContext_Lifespan = *mut SecPkgContext_Lifespan; -STRUCT!{struct SecPkgContext_DceInfo { - AuthzSvc: ::c_ulong, - pPac: *mut ::c_void, -}} -pub type PSecPkgContext_DceInfo = *mut SecPkgContext_DceInfo; -STRUCT!{struct SecPkgContext_KeyInfoA { - sSignatureAlgorithmName: *mut ::SEC_CHAR, - sEncryptAlgorithmName: *mut ::SEC_CHAR, - KeySize: ::c_ulong, - SignatureAlgorithm: ::c_ulong, - EncryptAlgorithm: ::c_ulong, -}} -pub type PSecPkgContext_KeyInfoA = *mut SecPkgContext_KeyInfoA; -STRUCT!{struct SecPkgContext_KeyInfoW { - sSignatureAlgorithmName: *mut ::SEC_WCHAR, - sEncryptAlgorithmName: *mut ::SEC_WCHAR, - KeySize: ::c_ulong, - SignatureAlgorithm: ::c_ulong, - EncryptAlgorithm: ::c_ulong, -}} -pub type PSecPkgContext_KeyInfoW = *mut SecPkgContext_KeyInfoW; -STRUCT!{struct SecPkgContext_AuthorityA { - sAuthorityName: *mut SEC_CHAR, -}} -pub type PSecPkgContext_AuthorityA = *mut SecPkgContext_AuthorityA; -STRUCT!{struct SecPkgContext_AuthorityW { - sAuthorityName: *mut SEC_WCHAR, -}} -pub type PSecPkgContext_AuthorityW = *mut SecPkgContext_AuthorityW; -STRUCT!{struct SecPkgContext_ProtoInfoA { - sProtocolName: *mut SEC_CHAR, - majorVersion: ::c_ulong, - minorVersion: ::c_ulong, -}} -pub type PSecPkgContext_ProtoInfoA = *mut SecPkgContext_ProtoInfoA; -STRUCT!{struct SecPkgContext_ProtoInfoW { - sProtocolName: *mut SEC_WCHAR, - majorVersion: ::c_ulong, - minorVersion: ::c_ulong, -}} -pub type PSecPkgContext_ProtoInfoW = *mut SecPkgContext_ProtoInfoW; -STRUCT!{struct SecPkgContext_PasswordExpiry { - tsPasswordExpires: TimeStamp, -}} -pub type PSecPkgContext_PasswordExpiry = *mut SecPkgContext_PasswordExpiry; -STRUCT!{struct SecPkgContext_LogoffTime { - tsLogoffTime: TimeStamp, -}} -pub type PSecPkgContext_LogoffTime = *mut SecPkgContext_LogoffTime; -STRUCT!{struct SecPkgContext_SessionKey { - SessionKeyLength: ::c_ulong, - SessionKey: *mut ::c_uchar, -}} -pub type PSecPkgContext_SessionKey = *mut SecPkgContext_SessionKey; -STRUCT!{struct SecPkgContext_NegoKeys { - KeyType: ::c_ulong, - KeyLength: ::c_ushort, - KeyValue: *mut ::c_uchar, - VerifyKeyType: ::c_ulong, - VerifyKeyLength: ::c_ushort, - VerifyKeyValue: *mut ::c_uchar, -}} -pub type PSecPkgContext_NegoKeys = *mut SecPkgContext_NegoKeys; -STRUCT!{struct SecPkgContext_PackageInfoW { - PackageInfo: PSecPkgInfoW, -}} -pub type PSecPkgContext_PackageInfoW = *mut SecPkgContext_PackageInfoW; -STRUCT!{struct SecPkgContext_PackageInfoA { - PackageInfo: PSecPkgInfoA, -}} -pub type PSecPkgContext_PackageInfoA = *mut SecPkgContext_PackageInfoA; -STRUCT!{struct SecPkgContext_UserFlags { - UserFlags: ::c_ulong, -}} -pub type PSecPkgContext_UserFlags = *mut SecPkgContext_UserFlags; -STRUCT!{struct SecPkgContext_Flags { - Flags: ::c_ulong, -}} -pub type PSecPkgContext_Flags = *mut SecPkgContext_Flags; -STRUCT!{struct SecPkgContext_NegotiationInfoA { - PackageInfo: PSecPkgInfoA, - NegotiationState: ::c_ulong, -}} -pub type PSecPkgContext_NegotiationInfoA = *mut SecPkgContext_NegotiationInfoA; -STRUCT!{struct SecPkgContext_NegotiationInfoW { - PackageInfo: PSecPkgInfoW, - NegotiationState: ::c_ulong, -}} -pub type PSecPkgContext_NegotiationInfoW = *mut SecPkgContext_NegotiationInfoW; -pub const SECPKG_NEGOTIATION_COMPLETE: ::c_ulong = 0; -pub const SECPKG_NEGOTIATION_OPTIMISTIC: ::c_ulong = 1; -pub const SECPKG_NEGOTIATION_IN_PROGRESS: ::c_ulong = 2; -pub const SECPKG_NEGOTIATION_DIRECT: ::c_ulong = 3; -pub const SECPKG_NEGOTIATION_TRY_MULTICRED: ::c_ulong = 4; -STRUCT!{struct SecPkgContext_NativeNamesW { - sClientName: SEC_WCHAR, - sServerName: SEC_WCHAR, -}} -pub type PSecPkgContext_NativeNamesW = *mut SecPkgContext_NativeNamesW; -STRUCT!{struct SecPkgContext_NativeNamesA { - sClientName: SEC_CHAR, - sServerName: SEC_CHAR, -}} -pub type PSecPkgContext_NativeNamesA = *mut SecPkgContext_NativeNamesA; -STRUCT!{struct SecPkgContext_CredentialNameW { - CredentialType: ::c_ulong, - sCredentialName: *mut SEC_WCHAR, -}} -pub type PSecPkgContext_CredentialNameW = *mut SecPkgContext_CredentialNameW; -STRUCT!{struct SecPkgContext_CredentialNameA { - CredentialType: ::c_ulong, - sCredentialName: *mut SEC_CHAR, -}} -pub type PSecPkgContext_CredentialNameA = *mut SecPkgContext_CredentialNameA; -STRUCT!{struct SecPkgContext_AccessToken { - AccessToken: *mut ::c_void, -}} -pub type PSecPkgContext_AccessToken = *mut SecPkgContext_AccessToken; -STRUCT!{struct SecPkgContext_TargetInformation { - MarshalledTargetInfoLength: ::c_ulong, - MarshalledTargetInfo: *mut ::c_uchar, -}} -pub type PSecPkgContext_TargetInformation = *mut SecPkgContext_TargetInformation; -STRUCT!{struct SecPkgContext_AuthzID { - AuthzIDLength: ::c_ulong, - AuthzID: *mut ::c_char, -}} -pub type PSecPkgContext_AuthzID = *mut SecPkgContext_AuthzID; -STRUCT!{struct SecPkgContext_Target { - TargetLength: ::c_ulong, - Target: *mut ::c_char, -}} -pub type PSecPkgContext_Target = *mut SecPkgContext_Target; -STRUCT!{struct SecPkgContext_ClientSpecifiedTarget { - sTargetName: *mut SEC_WCHAR, -}} -pub type PSecPkgContext_ClientSpecifiedTarget = *mut SecPkgContext_ClientSpecifiedTarget; -STRUCT!{struct SecPkgContext_Bindings { - BindingsLength: ::c_ulong, - Bindings: *mut SEC_CHANNEL_BINDINGS, -}} -pub type PSecPkgContext_Bindings = *mut SecPkgContext_Bindings; -ENUM!{enum SEC_APPLICATION_PROTOCOL_NEGOTIATION_STATUS { - SecApplicationProtocolNegotiationStatus_None, - SecApplicationProtocolNegotiationStatus_Success, - SecApplicationProtocolNegotiationStatus_SelectedClientOnly, -}} -pub type PSEC_APPLICATION_PROTOCOL_NEGOTIATION_STATUS = - *mut SEC_APPLICATION_PROTOCOL_NEGOTIATION_STATUS; -pub const MAX_PROTOCOL_ID_SIZE: usize = 0xff; -#[repr(C)] #[derive(Copy)] -pub struct SecPkgContext_ApplicationProtocol { - pub ProtoNegoStatus: SEC_APPLICATION_PROTOCOL_NEGOTIATION_STATUS, - pub ProtoNegoExt: SEC_APPLICATION_PROTOCOL_NEGOTIATION_EXT, - pub ProtocolIdSize: ::c_uchar, - pub ProtocolId: [::c_uchar; MAX_PROTOCOL_ID_SIZE], -} -impl Clone for SecPkgContext_ApplicationProtocol { - fn clone(&self) -> SecPkgContext_ApplicationProtocol { *self } -} -pub type PSecPkgContext_ApplicationProtocol = *mut SecPkgContext_ApplicationProtocol; -pub type SEC_GET_KEY_FN = Option<unsafe extern "system" fn( - Arg: *mut ::c_void, Principal: *mut ::c_void, KeyVer: ::c_ulong, Key: *mut *mut ::c_void, - Status: *mut SECURITY_STATUS, -)>; -pub const SECPKG_CONTEXT_EXPORT_RESET_NEW: ::c_ulong = 0x00000001; -pub const SECPKG_CONTEXT_EXPORT_DELETE_OLD: ::c_ulong = 0x00000002; -pub const SECPKG_CONTEXT_EXPORT_TO_KERNEL: ::c_ulong = 0x00000004; -pub type ACQUIRE_CREDENTIALS_HANDLE_FN_W = Option<unsafe extern "system" fn( - *mut SEC_WCHAR, *mut SEC_WCHAR, ::c_ulong, *mut ::c_void, *mut ::c_void, SEC_GET_KEY_FN, - *mut ::c_void, PCredHandle, PTimeStamp, -) -> SECURITY_STATUS>; -pub type ACQUIRE_CREDENTIALS_HANDLE_FN_A = Option<unsafe extern "system" fn( - *mut SEC_CHAR, *mut SEC_CHAR, ::c_ulong, *mut ::c_void, *mut ::c_void, SEC_GET_KEY_FN, - *mut ::c_void, PCredHandle, PTimeStamp, -) -> SECURITY_STATUS>; -pub type FREE_CREDENTIALS_HANDLE_FN = Option<unsafe extern "system" fn( - PCredHandle, -) -> SECURITY_STATUS>; -pub type ADD_CREDENTIALS_FN_W = Option<unsafe extern "system" fn( - PCredHandle, *mut SEC_WCHAR, *mut SEC_WCHAR, ::c_ulong, *mut ::c_void, SEC_GET_KEY_FN, - *mut ::c_void, PTimeStamp, -) -> SECURITY_STATUS>; -pub type ADD_CREDENTIALS_FN_A = Option<unsafe extern "system" fn( - PCredHandle, *mut SEC_CHAR, *mut SEC_CHAR, ::c_ulong, *mut ::c_void, SEC_GET_KEY_FN, - *mut ::c_void, PTimeStamp, -) -> SECURITY_STATUS>; -pub type CHANGE_PASSWORD_FN_W = Option<unsafe extern "system" fn( - *mut SEC_WCHAR, *mut SEC_WCHAR, *mut SEC_WCHAR, *mut SEC_WCHAR, *mut SEC_WCHAR, ::BOOLEAN, - ::c_ulong, PSecBufferDesc, -) -> SECURITY_STATUS>; -pub type CHANGE_PASSWORD_FN_A = Option<unsafe extern "system" fn( - *mut SEC_CHAR, *mut SEC_CHAR, *mut SEC_CHAR, *mut SEC_CHAR, *mut SEC_CHAR, ::BOOLEAN, - ::c_ulong, PSecBufferDesc, -) -> SECURITY_STATUS>; -//1844 -ENUM!{enum SecDelegationType { - SecFull, - SecService, - SecTree, - SecDirectory, - SecObject, -}} -pub type PSecDelegationType = *mut SecDelegationType; -STRUCT!{struct SEC_WINNT_AUTH_BYTE_VECTOR { - ByteArrayOffset: ::c_ulong, - ByteArrayLength: ::c_ushort, -}} -pub type PSEC_WINNT_AUTH_BYTE_VECTOR = *mut SEC_WINNT_AUTH_BYTE_VECTOR; -STRUCT!{struct SEC_WINNT_AUTH_DATA { - CredType: ::GUID, - CredData: SEC_WINNT_AUTH_BYTE_VECTOR, -}} -pub type PSEC_WINNT_AUTH_DATA = *mut SEC_WINNT_AUTH_DATA; -STRUCT!{struct SEC_WINNT_AUTH_PACKED_CREDENTIALS { - cbHeaderLength: ::c_ushort, - cbStructureLength: ::c_ushort, - AuthData: SEC_WINNT_AUTH_DATA, -}} -pub type PSEC_WINNT_AUTH_PACKED_CREDENTIALS = *mut SEC_WINNT_AUTH_PACKED_CREDENTIALS; -DEFINE_GUID!(SEC_WINNT_AUTH_DATA_TYPE_PASSWORD, 0x28bfc32f, 0x10f6, 0x4738, - 0x98, 0xd1, 0x1a, 0xc0, 0x61, 0xdf, 0x71, 0x6a); -DEFINE_GUID!(SEC_WINNT_AUTH_DATA_TYPE_CERT, 0x235f69ad, 0x73fb, 0x4dbc, - 0x82, 0x3, 0x6, 0x29, 0xe7, 0x39, 0x33, 0x9b); -STRUCT!{struct SEC_WINNT_AUTH_DATA_PASSWORD { - UnicodePassword: SEC_WINNT_AUTH_BYTE_VECTOR, -}} -pub type PSEC_WINNT_AUTH_DATA_PASSWORD = *mut SEC_WINNT_AUTH_DATA_PASSWORD; -DEFINE_GUID!(SEC_WINNT_AUTH_DATA_TYPE_CSP_DATA, 0x68fd9879, 0x79c, 0x4dfe, - 0x82, 0x81, 0x57, 0x8a, 0xad, 0xc1, 0xc1, 0x0); -STRUCT!{struct SEC_WINNT_AUTH_CERTIFICATE_DATA { - cbHeaderLength: ::c_ushort, - cbStructureLength: ::c_ushort, - Certificate: SEC_WINNT_AUTH_BYTE_VECTOR, -}} -pub type PSEC_WINNT_AUTH_CERTIFICATE_DATA = *mut SEC_WINNT_AUTH_CERTIFICATE_DATA; -STRUCT!{struct SEC_WINNT_CREDUI_CONTEXT_VECTOR { - CredUIContextArrayOffset: ::ULONG, - CredUIContextCount: ::USHORT, -}} -pub type PSEC_WINNT_CREDUI_CONTEXT_VECTOR = *mut SEC_WINNT_CREDUI_CONTEXT_VECTOR; -STRUCT!{struct SEC_WINNT_AUTH_SHORT_VECTOR { - ShortArrayOffset: ::ULONG, - ShortArrayCount: ::USHORT, -}} -pub type PSEC_WINNT_AUTH_SHORT_VECTOR = *mut SEC_WINNT_AUTH_SHORT_VECTOR; -STRUCT!{struct CREDUIWIN_MARSHALED_CONTEXT { - StructureType: ::GUID, - cbHeaderLength: ::USHORT, - LogonId: ::LUID, - MarshaledDataType: ::GUID, - MarshaledDataOffset: ::ULONG, - MarshaledDataLength: ::USHORT, -}} -pub type PCREDUIWIN_MARSHALED_CONTEXT = *mut CREDUIWIN_MARSHALED_CONTEXT; -STRUCT!{struct SEC_WINNT_CREDUI_CONTEXT { - cbHeaderLength: ::USHORT, - CredUIContextHandle: ::HANDLE, - UIInfo: ::PCREDUI_INFOW, - dwAuthError: ::ULONG, - pInputAuthIdentity: PSEC_WINNT_AUTH_IDENTITY_OPAQUE, - TargetName: ::PUNICODE_STRING, -}} -pub type PSEC_WINNT_CREDUI_CONTEXT = *mut SEC_WINNT_CREDUI_CONTEXT; -pub type PSEC_WINNT_AUTH_IDENTITY_OPAQUE = ::PVOID; diff --git a/deps/winapi-0.2.5/src/timezoneapi.rs b/deps/winapi-0.2.5/src/timezoneapi.rs deleted file mode 100644 index a6c4873ee..000000000 --- a/deps/winapi-0.2.5/src/timezoneapi.rs +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright © 2015, Peter Atashian -// Licensed under the MIT License <LICENSE.md> -//! ApiSet Contract for api-ms-win-core-timezone-l1 -pub const TIME_ZONE_ID_INVALID: ::DWORD = 0xFFFFFFFF; -STRUCT!{struct TIME_ZONE_INFORMATION { - Bias: ::LONG, - StandardName: [::WCHAR; 32], - StandardDate: ::SYSTEMTIME, - StandardBias: ::LONG, - DaylightName: [::WCHAR; 32], - DaylightDate: ::SYSTEMTIME, - DaylightBias: ::LONG, -}} -pub type PTIME_ZONE_INFORMATION = *mut TIME_ZONE_INFORMATION; -pub type LPTIME_ZONE_INFORMATION = *mut TIME_ZONE_INFORMATION; -#[repr(C)] #[derive(Copy)] -pub struct DYNAMIC_TIME_ZONE_INFORMATION { - pub Bias: ::LONG, - pub StandardName: [::WCHAR; 32], - pub StandardDate: ::SYSTEMTIME, - pub StandardBias: ::LONG, - pub DaylightName: [::WCHAR; 32], - pub DaylightDate: ::SYSTEMTIME, - pub DaylightBias: ::LONG, - pub TimeZoneKeyName: [::WCHAR; 128], - pub DynamicDaylightTimeDisabled: ::BOOLEAN, -} -impl Clone for DYNAMIC_TIME_ZONE_INFORMATION { - fn clone(&self) -> DYNAMIC_TIME_ZONE_INFORMATION { *self } -} -pub type PDYNAMIC_TIME_ZONE_INFORMATION = *mut DYNAMIC_TIME_ZONE_INFORMATION; diff --git a/deps/winapi-0.2.5/src/tlhelp32.rs b/deps/winapi-0.2.5/src/tlhelp32.rs deleted file mode 100644 index f7c37b5ce..000000000 --- a/deps/winapi-0.2.5/src/tlhelp32.rs +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright © 2015, Gigih Aji Ibrahim -// Licensed under the MIT License <LICENSE.md> -pub const MAX_MODULE_NAME32: usize = 255; -pub const TH32CS_SNAPHEAPLIST: ::DWORD = 0x00000001; -pub const TH32CS_SNAPPROCESS: ::DWORD = 0x00000002; -pub const TH32CS_SNAPTHREAD: ::DWORD = 0x00000004; -pub const TH32CS_SNAPMODULE: ::DWORD = 0x00000008; -pub const TH32CS_SNAPMODULE32: ::DWORD = 0x00000010; -pub const TH32CS_SNAPALL: ::DWORD = - (TH32CS_SNAPHEAPLIST | TH32CS_SNAPPROCESS | TH32CS_SNAPTHREAD | TH32CS_SNAPMODULE); -pub const TH32CS_INHERIT: ::DWORD = 0x80000000; -STRUCT!{struct HEAPLIST32 { - dwSize: ::SIZE_T, - th32ProcessID: ::DWORD, - th32HeapID: :: ULONG_PTR, - dwFlags: ::DWORD, -}} -pub type PHEAPLIST32 = *mut HEAPLIST32; -pub type LPHEAPLIST32 = *mut HEAPLIST32; -pub const HF32_DEFAULT: ::DWORD = 1; -pub const HF32_SHARED: ::DWORD = 2; -STRUCT!{struct HEAPENTRY32 { - dwSize: ::SIZE_T, - hHandle: ::HANDLE, - dwAddress: ::ULONG_PTR, - dwBlockSize: ::SIZE_T, - dwFlags: ::DWORD, - dwLockCount: ::DWORD, - dwResvd: ::DWORD, - th32ProcessID: ::DWORD, - th32HeapID: ::ULONG_PTR, -}} -pub type PHEAPENTRY32 = *mut HEAPENTRY32; -pub type LPHEAPENTRY32 = *mut HEAPENTRY32; -pub const LF32_FIXED: ::DWORD = 0x00000001; -pub const LF32_FREE: ::DWORD = 0x00000002; -pub const LF32_MOVEABLE: ::DWORD = 0x00000004; -#[repr(C)] #[derive(Copy)] -pub struct PROCESSENTRY32W { - pub dwSize: ::DWORD, - pub cntUsage: ::DWORD, - pub th32ProcessID: ::DWORD, - pub th32DefaultHeapID: ::ULONG_PTR, - pub th32ModuleID: ::DWORD, - pub cntThreads: ::DWORD, - pub th32ParentProcessID: ::DWORD, - pub pcPriClassBase: ::LONG, - pub dwFlags: ::DWORD, - pub szExeFile: [::WCHAR; ::MAX_PATH], -} -impl Clone for PROCESSENTRY32W{ fn clone(&self) -> PROCESSENTRY32W { *self } } -pub type PPROCESSENTRY32W = *mut PROCESSENTRY32W; -pub type LPPROCESSENTRY32W = *mut PROCESSENTRY32W; -#[repr(C)] #[derive(Copy)] -pub struct PROCESSENTRY32 { - pub dwSize: ::DWORD, - pub cntUsage: ::DWORD, - pub th32ProcessID: ::DWORD, - pub th32DefaultHeapID: ::ULONG_PTR, - pub th32ModuleID: ::DWORD, - pub cntThreads: ::DWORD, - pub th32ParentProcessID: ::DWORD, - pub pcPriClassBase: ::LONG, - pub dwFlags: ::DWORD, - pub szExeFile: [::CHAR; ::MAX_PATH], -} -impl Clone for PROCESSENTRY32{ fn clone(&self) -> PROCESSENTRY32 { *self } } -pub type PPROCESSENTRY32 = *mut PROCESSENTRY32; -pub type LPPROCESSENTRY32 = *mut PROCESSENTRY32; -STRUCT!{struct THREADENTRY32 { - dwSize: ::DWORD, - cntUsage: ::DWORD, - th32ThreadID: ::DWORD, - th32OwnerProcessID: ::DWORD, - tpBasePri: ::LONG, - tpDeltaPri: ::LONG, - dwFlags: ::DWORD, -}} -pub type PTHREADENTRY32 = *mut THREADENTRY32; -pub type LPTHREADENTRY32 = *mut THREADENTRY32; -#[repr(C)] #[derive(Copy)] -pub struct MODULEENTRY32W { - pub dwSize: ::DWORD, - pub th32ModuleID: ::DWORD, - pub th32ProcessID: ::DWORD, - pub GlblcntUsage: ::DWORD, - pub ProccntUsage: ::DWORD, - pub modBaseAddr: *mut ::BYTE, - pub modBaseSize: ::DWORD, - pub hModule: ::HMODULE, - pub szModule: [::WCHAR; ::MAX_MODULE_NAME32 + 1], - pub szExePath: [::WCHAR; ::MAX_PATH], -} -impl Clone for MODULEENTRY32W{ fn clone(&self) -> MODULEENTRY32W { *self } } -pub type PMODULEENTRY32W = *mut MODULEENTRY32W; -pub type LPMODULEENTRY32W = *mut MODULEENTRY32W; -#[repr(C)] #[derive(Copy)] -pub struct MODULEENTRY32 { - pub dwSize: ::DWORD, - pub th32ModuleID: ::DWORD, - pub th32ProcessID: ::DWORD, - pub GlblcntUsage: ::DWORD, - pub ProccntUsage: ::DWORD, - pub modBaseAddr: *mut ::BYTE, - pub modBaseSize: ::DWORD, - pub hModule: ::HMODULE, - pub szModule: [::CHAR; ::MAX_MODULE_NAME32 + 1], - pub szExePath: [::CHAR; ::MAX_PATH], -} -impl Clone for MODULEENTRY32{ fn clone(&self) -> MODULEENTRY32 { *self } } -pub type PMODULEENTRY32 = *mut MODULEENTRY32; -pub type LPMODULEENTRY32 = *mut MODULEENTRY32; diff --git a/deps/winapi-0.2.5/src/vsbackup.rs b/deps/winapi-0.2.5/src/vsbackup.rs deleted file mode 100644 index c4a353d52..000000000 --- a/deps/winapi-0.2.5/src/vsbackup.rs +++ /dev/null @@ -1,303 +0,0 @@ -// Copyright © 2015, Brian Vincent -// Licensed under the MIT License <LICENSE.md> -//! VSS backup interfaces -DEFINE_GUID!(IID_IVssExamineWriterMetadata, 0x902fcf7f, 0xb7fd, 0x42f8, - 0x81, 0xf1, 0xb2, 0xe4, 0x00, 0xb1, 0xe5, 0xbd); -DEFINE_GUID!(IID_IVssExamineWriterMetadataEx, 0x0c0e5ec0, 0xca44, 0x472b, - 0xb7, 0x02, 0xe6, 0x52, 0xdb, 0x1c, 0x04, 0x51); -DEFINE_GUID!(IID_IVssBackupComponents, 0x665c1d5f, 0xc218, 0x414d, - 0xa0, 0x5d, 0x7f, 0xef, 0x5f, 0x9d, 0x5c, 0x86); -DEFINE_GUID!(IID_IVssBackupComponentsEx, 0x963f03ad, 0x9e4c, 0x4a34, - 0xac, 0x15, 0xe4, 0xb6, 0x17, 0x4e, 0x50, 0x36); -STRUCT!{struct VSS_COMPONENTINFO { - type_: ::VSS_COMPONENT_TYPE, // type is a keyword in rust - bstrLogicalPath: ::BSTR, - bstrComponentName: ::BSTR, - bstrCaption: ::BSTR, - pbIcon: *mut ::BYTE, - cbIcon: ::UINT, - bRestoreMetadata: bool, - bNotifyOnBackupComplete: bool, - bSelectable: bool, - bSelectableForRestore: bool, - dwComponentFlags: ::DWORD, - cFileCount: ::UINT, - cDatabases: ::UINT, - cLogFiles: ::UINT, - cDependencies: ::UINT, -}} -pub type PVSSCOMPONENTINFO = *const ::VSS_COMPONENTINFO; -RIDL!( -interface IVssWMComponent(IVssWMComponentVtbl): IUnknown(IUnknownVtbl) { - fn GetComponentInfo(&mut self, ppInfo: *mut ::PVSSCOMPONENTINFO) -> ::HRESULT, - fn FreeComponentInfo(&mut self, pInfo: ::PVSSCOMPONENTINFO) -> ::HRESULT, - fn GetFile(&mut self, iFile: ::UINT, ppFiledesc: *mut *mut ::IVssWMFiledesc) -> ::HRESULT, - fn GetDatabaseFile( - &mut self, iDBFile: ::UINT, ppFiledesc: *mut *mut ::IVssWMFiledesc - ) -> ::HRESULT, - fn GetDatabaseLogFile( - &mut self, iDbLogFile: ::UINT, ppFiledesc: *mut *mut ::IVssWMFiledesc - ) -> ::HRESULT, - fn GetDependency( - &mut self, iDependency: ::UINT, ppDependency: *mut *mut ::IVssWMDependency - ) -> ::HRESULT -} -); -RIDL!( -interface IVssExamineWriterMetadata(IVssExamineWriterMetadataVtbl): IUnknown(IUnknownVtbl) { - fn GetIdentity( - &mut self, pidInstance: *mut ::VSS_ID, pidWriter: *mut ::VSS_ID, - pbstrWriterName: *mut ::BSTR, pUsage: *mut ::VSS_USAGE_TYPE, - pSource: *mut ::VSS_SOURCE_TYPE - ) -> ::HRESULT, - fn GetFileCounts(&mut self, pcIncludeFiles: *mut ::UINT, pcExcludeFiles: *mut ::UINT, - pcComponents: *mut ::UINT - ) -> ::HRESULT, - fn GetIncludeFile( - &mut self, iFile: ::UINT, ppFiledesc: *mut *mut ::IVssWMFiledesc - ) -> ::HRESULT, - fn GetExcludeFile( - &mut self, iFile: ::UINT, ppFiledesc: *mut *mut ::IVssWMFiledesc - ) -> ::HRESULT, - fn GetComponent( - &mut self, iComponent: ::UINT, ppComponent: *mut *mut ::IVssWMComponent - ) -> ::HRESULT, - fn GetRestoreMethod( - &mut self, pMethod: *mut ::VSS_RESTOREMETHOD_ENUM, pbstrService: *mut ::BSTR, - pbstrUserProcedure: *mut ::BSTR, pwriterRestore: *mut ::VSS_WRITERRESTORE_ENUM, - pbRebootRequired: *mut bool, pcMappings: *mut ::UINT - ) -> ::HRESULT, - fn GetAlternateLocationMapping( - &mut self, iMapping: ::UINT, ppFiledesc: *mut *mut ::IVssWMFiledesc - ) -> ::HRESULT, - fn GetBackupSchema(&mut self, pdwSchemaMask: *mut ::DWORD) -> ::HRESULT, - fn GetDocument(&mut self, pDoc: *mut ::c_void) -> ::HRESULT, //TODO IXMLDOMDocument - fn SaveAsXML(&mut self, pbstrXML: *mut ::BSTR) -> ::HRESULT, - fn LoadFromXML(&mut self, pbstrXML: *mut ::BSTR) -> ::HRESULT -} -); -RIDL!( -interface IVssExamineWriterMetadataEx(IVssExamineWriterMetadataExVtbl): - IVssExamineWriterMetadata(IVssExamineWriterMetadataVtbl) { - fn GetIdentityEx( - &mut self, pidInstance: *mut ::VSS_ID, pidWriter: *mut ::VSS_ID, - pbstrWriterName: *mut ::BSTR, pbstrInstanceName: *mut ::BSTR, - pUsage: *mut ::VSS_USAGE_TYPE, pSource: *mut ::VSS_SOURCE_TYPE - ) -> ::HRESULT -} -); -RIDL!( -interface IVssExamineWriterMetadataEx2(IVssExamineWriterMetadataEx2Vtbl): - IVssExamineWriterMetadataEx(IVssExamineWriterMetadataExVtbl) { - fn GetVersion( - &mut self, pdwMajorVersion: *mut ::DWORD, pdwMinorVersion: *mut ::DWORD - ) -> ::HRESULT, - fn GetExcludeFromSnapshotCount(&mut self, pcExcludedFromSnapshot: *mut ::UINT) -> ::HRESULT, - fn GetExcludeFromSnapshotFile( - &mut self, iFile: ::UINT, ppFiledesc: *mut *mut ::IVssWMFiledesc - ) -> ::HRESULT -} -); -#[repr(C)] #[derive(Debug)] #[allow(missing_copy_implementations)] -pub struct IVssWriterComponentsExt { - pub lpVtbl: *const IVssWriterComponentsExtVtbl, -} -#[repr(C)] #[allow(missing_copy_implementations)] -pub struct IVssWriterComponentsExtVtbl { - pub parent1: ::IVssWriterComponentsVtbl, - pub parent2: ::IUnknownVtbl, -} -RIDL!( -interface IVssBackupComponents(IVssBackupComponentsVtbl): IUnknown(IUnknownVtbl) { - fn GetWriterComponentsCount(&mut self, pcComponents: *mut ::UINT) -> ::HRESULT, - fn GetWriterComponents( - &mut self, iWriter: ::UINT, ppWriter: *mut *mut IVssWriterComponentsExt - ) -> ::HRESULT, - fn InitializeForBackup(&mut self, bstrXML: ::BSTR) -> ::HRESULT, - fn SetBackupState( - &mut self, bSelectComponents: bool, bBackupBootableSystemState: bool, - backupType: ::VSS_BACKUP_TYPE, bPartialFileSupport: bool - ) -> ::HRESULT, - fn InitializeForRestore(&mut self, bstrXML: ::BSTR) -> ::HRESULT, - fn SetRestoreState(&mut self, restoreType: ::VSS_RESTORE_TYPE) -> ::HRESULT, - fn GatherWriterMetadata(&mut self, pAsync: *mut *mut ::IVssAsync) -> ::HRESULT, - fn GetWriterMetadataCount(&mut self, pcWriters: *mut ::UINT) -> ::HRESULT, - fn GetWriterMetadata( - &mut self, iWriter: ::UINT, pidInstance: *mut ::VSS_ID, - ppMetadata: *mut *mut IVssExamineWriterMetadata - ) -> ::HRESULT, - fn FreeWriterMetadata(&mut self) -> ::HRESULT, - fn AddComponent( - &mut self, instanceId: ::VSS_ID, writerId: ::VSS_ID, ct: ::VSS_COMPONENT_TYPE, - wszLogicalPath: ::LPCWSTR, wszComponentName: ::LPCWSTR - ) -> ::HRESULT, - fn PrepareForBackup(&mut self, ppAsync: *mut *mut ::IVssAsync) -> ::HRESULT, - fn AbortBackup(&mut self) -> ::HRESULT, - fn GatherWriterStatus(&mut self, ppAsync: *mut *mut ::IVssAsync) -> ::HRESULT, - fn GetWriterStatusCount(&mut self, pcWriters: *mut ::UINT) -> ::HRESULT, - fn FreeWriterStatus(&mut self) -> ::HRESULT, - fn GetWriterStatus( - &mut self, iWriter: ::UINT, pidInstance: *mut ::VSS_ID, pidWriter: *mut ::VSS_ID, - pbstrWriter: *mut ::BSTR, pnStatus: *mut ::VSS_WRITER_STATE, - phResultFailure: *mut ::HRESULT - ) -> ::HRESULT, - fn SetBackupSucceeded( - &mut self, instanceId: ::VSS_ID, writerId: ::VSS_ID, ct: ::VSS_COMPONENT_TYPE, - wszLogicalPath: ::LPCWSTR, wszComponentName: ::LPCWSTR, bSucceded: bool - ) -> ::HRESULT, - fn SetBackupOptions( - &mut self, writerId: ::VSS_ID, ct: ::VSS_COMPONENT_TYPE, wszLogicalPath: ::LPCWSTR, - wszComponentName: ::LPCWSTR, wszBackupOptions: ::LPCWSTR - ) -> ::HRESULT, - fn SetSelectedForRestore( - &mut self, writerId: ::VSS_ID, ct: ::VSS_COMPONENT_TYPE, wszLogicalPath: ::LPCWSTR, - wszComponentName: ::LPCWSTR, bSelectedForRestore: bool - ) -> ::HRESULT, - fn SetRestoreOptions( - &mut self, writerId: ::VSS_ID, ct: ::VSS_COMPONENT_TYPE, wszLogicalPath: ::LPCWSTR, - wszComponentName: ::LPCWSTR, wszRestoreOptions: ::LPCWSTR - ) -> ::HRESULT, - fn SetAdditionalRestores( - &mut self, writerId: ::VSS_ID, ct: ::VSS_COMPONENT_TYPE, wszLogicalPath: ::LPCWSTR, - wszComponentName: ::LPCWSTR, bAdditionalRestores: bool - ) -> ::HRESULT, - fn SetPreviousBackupStamp( - &mut self, writerId: ::VSS_ID, ct: ::VSS_COMPONENT_TYPE, wszLogicalPath: ::LPCWSTR, - wszComponentName: ::LPCWSTR, wszPreviousBackupStamp: ::LPCWSTR - ) -> ::HRESULT, - fn SaveAsXML(&mut self, pbstrXML: *mut ::BSTR) -> ::HRESULT, - fn BackupComplete(&mut self, ppAsync: *mut *mut ::IVssAsync) -> ::HRESULT, - fn AddAlternativeLocationMapping( - &mut self, writerId: ::VSS_ID, ct: ::VSS_COMPONENT_TYPE, wszLogicalPath: ::LPCWSTR, - wszComponentName: ::LPCWSTR, wszPath: ::LPCWSTR, wszFilespec: ::LPCWSTR, bRecursive: bool, - wszDestination: ::LPCWSTR - ) -> ::HRESULT, - fn AddRestoreSubcomponent( - &mut self, writerId: ::VSS_ID, ct: ::VSS_COMPONENT_TYPE, wszLogicalPath: ::LPCWSTR, - wszComponentName: ::LPCWSTR, wszSubComponentLogicalPath: ::LPCWSTR, - wszSubComponentName: ::LPCWSTR, bRepair: bool - ) -> ::HRESULT, - fn SetFileRestoreStatus( - &mut self, writerId: ::VSS_ID, ct: ::VSS_COMPONENT_TYPE, wszLogicalPath: ::LPCWSTR, - wszComponentName: ::LPCWSTR, status: ::VSS_FILE_RESTORE_STATUS - ) -> ::HRESULT, - fn AddNewTarget( - &mut self, writerId: ::VSS_ID, ct: ::VSS_COMPONENT_TYPE, wszLogicalPath: ::LPCWSTR, - wszComponentName: ::LPCWSTR, wszPath: ::LPCWSTR, wszFileName: ::LPCWSTR, bRecursive: bool, - wszAlternatePath: ::LPCWSTR - ) -> ::HRESULT, - fn SetRangesFilePath( - &mut self, writerId: ::VSS_ID, ct: ::VSS_COMPONENT_TYPE, wszLogicalPath: ::LPCWSTR, - wszComponentName: ::LPCWSTR, iPartialFile: ::UINT, wszRangesFile: ::LPCWSTR - ) -> ::HRESULT, - fn PreRestore(&mut self, ppAsync: *mut *mut ::IVssAsync) -> ::HRESULT, - fn PostRestore(&mut self, ppAsync: *mut *mut ::IVssAsync) -> ::HRESULT, - fn SetContext(&mut self, lContext: ::LONG) -> ::HRESULT, - fn StartSnapshotSet(&mut self, pSnapshotSetId: *mut ::VSS_ID) -> ::HRESULT, - fn AddToSnapshotSet( - &mut self, pwszVolumeName: ::VSS_PWSZ, ProviderId: ::VSS_ID, pidSnapshot: *mut ::VSS_ID - ) -> ::HRESULT, - fn DoSnapshotSet(&mut self, ppAsync: *mut *mut ::IVssAsync) -> ::HRESULT, - fn DeleteSnapshots( - &mut self, SourceObjectId: ::VSS_ID, eSourceObjectType: ::VSS_OBJECT_TYPE, - bForceDelete: ::BOOL, plDeletedSnapshots: *mut ::LONG, pNondeletedSnapshotID: *mut ::VSS_ID - ) -> ::HRESULT, - fn ImportSnapshots(&mut self, ppAsync: *mut *mut ::IVssAsync) -> ::HRESULT, - fn BreakSnapshotSet(&mut self, SnapshotSetId: ::VSS_ID) -> ::HRESULT, - fn GetSnapshotProperties( - &mut self, SnapshotId: ::VSS_ID, - pProp: *mut ::VSS_SNAPSHOT_PROP - ) -> ::HRESULT, - fn Query(&mut self, QueriedObjectId: ::VSS_ID, eQueriedObjectType: ::VSS_OBJECT_TYPE, - eReturnedObjectsType: ::VSS_OBJECT_TYPE, ppEnum: *mut *mut ::IVssEnumObject) -> ::HRESULT, - fn IsVolumeSupported( - &mut self, ProviderId: ::VSS_ID, pwszVolumeName: ::VSS_PWSZ, - pbSupportedByThisProvider: *mut ::BOOL - ) -> ::HRESULT, - fn DisableWriterClasses( - &mut self, rgWriterClassId: *const ::VSS_ID, cClassId: ::UINT - ) -> ::HRESULT, - fn EnableWriterClasses( - &mut self, rgWriterClassId: *const ::VSS_ID, cClassId: ::UINT - ) -> ::HRESULT, - fn DisableWriterInstances( - &mut self, rgWriterInstanceId: *const ::VSS_ID, cInstanceId: ::UINT - ) -> ::HRESULT, - fn ExposeSnapshot(&mut self, SnapshotId: ::VSS_ID, wszPathFromRoot: ::VSS_PWSZ, - lAttributes: ::LONG, wszExpose: ::VSS_PWSZ, pwszExposed: ::VSS_PWSZ - ) -> ::HRESULT, - fn RevertToSnapshot(&mut self, SnapshotId: ::VSS_ID, bForceDismount: ::BOOL) -> ::HRESULT, - fn QueryRevertStatus( - &mut self, pwszVolume: ::VSS_PWSZ, ppAsync: *mut *mut ::IVssAsync - ) -> ::HRESULT -} -); -RIDL!( -interface IVssBackupComponentsEx(IVssBackupComponentsExVtbl): - IVssBackupComponents(IVssBackupComponentsVtbl) { - fn GetWriterMetadataEx( - &mut self, iWriter: ::UINT, pidInstance: *mut ::VSS_ID, - ppMetadata: *mut *mut ::IVssExamineWriterMetadataEx - ) -> ::HRESULT, - fn SetSelectedForRestoreEx( - &mut self, writerId: ::VSS_ID, ct: ::VSS_COMPONENT_TYPE, wszLogicalPath: ::LPCWSTR, - wszComponentName: ::LPCWSTR, bSelectedForRestore: bool, instanceId: ::VSS_ID - ) -> ::HRESULT -} -); -RIDL!( -interface IVssBackupComponentsEx2(IVssBackupComponentsEx2Vtbl): - IVssBackupComponentsEx(IVssBackupComponentsExVtbl) { - fn UnexposeSnapshot(&mut self, snapshotId: ::VSS_ID) -> ::HRESULT, - fn SetAuthoritativeRestore( - &mut self, writerId: ::VSS_ID, ct: ::VSS_COMPONENT_TYPE, wszLogicalPath: ::LPCWSTR, - wszComponentName: ::LPCWSTR, bAuth: bool - ) -> ::HRESULT, - fn SetRollForward( - &mut self, writerId: ::VSS_ID, ct: ::VSS_COMPONENT_TYPE, wszLogicalPath: ::LPCWSTR, - wszComponentName: ::LPCWSTR, rollType: ::VSS_ROLLFORWARD_TYPE, - wszRollForwardPoint: ::LPCWSTR - ) -> ::HRESULT, - fn SetRestoreName( - &mut self, writerId: ::VSS_ID, ct: ::VSS_COMPONENT_TYPE, wszLogicalPath: ::LPCWSTR, - wszComponentName: ::LPCWSTR, wszRestoreName: ::LPCWSTR - ) -> ::HRESULT, - fn BreakSnapshotSetEx( - &mut self, SnapshotSetID: ::VSS_ID, dwBreakFlags: ::DWORD, ppAsync: *mut *mut ::IVssAsync - ) -> ::HRESULT, - fn PreFastRecovery( - &mut self, SnapshotSetID: ::VSS_ID, dwPreFastRecoveryFlags: ::DWORD, - ppAsync: *mut *mut ::IVssAsync - ) -> ::HRESULT, - fn FastRecovery( - &mut self, SnapshotSetID: ::VSS_ID, dwFastRecoveryFlags: ::DWORD, - ppAsync: *mut *mut ::IVssAsync - ) -> ::HRESULT -} -); -RIDL!( -interface IVssBackupComponentsEx3(IVssBackupComponentsEx3Vtbl): - IVssBackupComponentsEx2(IVssBackupComponentsEx2Vtbl) { - fn GetWriterStatusEx( - &mut self, iWriter: ::UINT, pidInstance: *mut ::VSS_ID, pidWriter: *mut ::VSS_ID, - pbstrWriter: *mut ::BSTR, pnStatus: *mut ::VSS_WRITER_STATE, - phrFailureWriter: *mut ::HRESULT, phrApplication: *mut ::HRESULT, - pbstrApplicationMessage: *mut ::BSTR - ) -> ::HRESULT, - fn AddSnapshotToRecoverySet( - &mut self, snapshotId: ::VSS_ID, dwFlags: ::DWORD, pwszDestinationVolume: ::VSS_PWSZ - ) -> ::HRESULT, - fn RecoverSet(&mut self, dwFlags: ::DWORD, ppAsync: *mut *mut ::IVssAsync) -> ::HRESULT, - fn GetSessionId(&mut self, idSession: *mut ::VSS_ID) -> ::HRESULT -} -); -RIDL!( -interface IVssBackupComponentsEx4(IVssBackupComponentsEx4Vtbl): - IVssBackupComponentsEx3(IVssBackupComponentsEx3Vtbl) { - fn GetRootAndLogicalPrefixPaths( - &mut self, pwszFilePath: ::VSS_PWSZ, ppwszRootPath: *mut ::VSS_PWSZ, - ppwszLogicalPrefix: *mut ::VSS_PWSZ, bNormalizeFQDNforRootPath: ::BOOL - ) -> ::HRESULT -} -); -pub const VSS_SW_BOOTABLE_STATE: ::DWORD = 1; diff --git a/deps/winapi-0.2.5/src/wincrypt.rs b/deps/winapi-0.2.5/src/wincrypt.rs deleted file mode 100644 index 6ef95f802..000000000 --- a/deps/winapi-0.2.5/src/wincrypt.rs +++ /dev/null @@ -1,2202 +0,0 @@ -// Copyright © 2015, Peter Atashian -// Licensed under the MIT License <LICENSE.md> -//! Cryptographic API Prototypes and Definitions -//108 -pub const ALG_CLASS_ANY: ALG_ID = 0; -pub const ALG_CLASS_SIGNATURE: ALG_ID = 1 << 13; -pub const ALG_CLASS_MSG_ENCRYPT: ALG_ID = 2 << 13; -pub const ALG_CLASS_DATA_ENCRYPT: ALG_ID = 3 << 13; -pub const ALG_CLASS_HASH: ALG_ID = 4 << 13; -pub const ALG_CLASS_KEY_EXCHANGE: ALG_ID = 5 << 13; -pub const ALG_CLASS_ALL: ALG_ID = 7 << 13; -pub const ALG_TYPE_ANY: ALG_ID = 0; -pub const ALG_TYPE_DSS: ALG_ID = 1 << 9; -pub const ALG_TYPE_RSA: ALG_ID = 2 << 9; -pub const ALG_TYPE_BLOCK: ALG_ID = 3 << 9; -pub const ALG_TYPE_STREAM: ALG_ID = 4 << 9; -pub const ALG_TYPE_DH: ALG_ID = 5 << 9; -pub const ALG_TYPE_SECURECHANNEL: ALG_ID = 6 << 9; -pub const ALG_SID_ANY: ALG_ID = 0; -pub const ALG_SID_RSA_ANY: ALG_ID = 0; -pub const ALG_SID_RSA_PKCS: ALG_ID = 1; -pub const ALG_SID_RSA_MSATWORK: ALG_ID = 2; -pub const ALG_SID_RSA_ENTRUST: ALG_ID = 3; -pub const ALG_SID_RSA_PGP: ALG_ID = 4; -pub const ALG_SID_DSS_ANY: ALG_ID = 0; -pub const ALG_SID_DSS_PKCS: ALG_ID = 1; -pub const ALG_SID_DSS_DMS: ALG_ID = 2; -pub const ALG_SID_ECDSA: ALG_ID = 3; -pub const ALG_SID_DES: ALG_ID = 1; -pub const ALG_SID_3DES: ALG_ID = 3; -pub const ALG_SID_DESX: ALG_ID = 4; -pub const ALG_SID_IDEA: ALG_ID = 5; -pub const ALG_SID_CAST: ALG_ID = 6; -pub const ALG_SID_SAFERSK64: ALG_ID = 7; -pub const ALG_SID_SAFERSK128: ALG_ID = 8; -pub const ALG_SID_3DES_112: ALG_ID = 9; -pub const ALG_SID_CYLINK_MEK: ALG_ID = 12; -pub const ALG_SID_RC5: ALG_ID = 13; -pub const ALG_SID_AES_128: ALG_ID = 14; -pub const ALG_SID_AES_192: ALG_ID = 15; -pub const ALG_SID_AES_256: ALG_ID = 16; -pub const ALG_SID_AES: ALG_ID = 17; -pub const ALG_SID_SKIPJACK: ALG_ID = 10; -pub const ALG_SID_TEK: ALG_ID = 11; -pub const CRYPT_MODE_CBCI: ALG_ID = 6; -pub const CRYPT_MODE_CFBP: ALG_ID = 7; -pub const CRYPT_MODE_OFBP: ALG_ID = 8; -pub const CRYPT_MODE_CBCOFM: ALG_ID = 9; -pub const CRYPT_MODE_CBCOFMI: ALG_ID = 10; -pub const ALG_SID_RC2: ALG_ID = 2; -pub const ALG_SID_RC4: ALG_ID = 1; -pub const ALG_SID_SEAL: ALG_ID = 2; -pub const ALG_SID_DH_SANDF: ALG_ID = 1; -pub const ALG_SID_DH_EPHEM: ALG_ID = 2; -pub const ALG_SID_AGREED_KEY_ANY: ALG_ID = 3; -pub const ALG_SID_KEA: ALG_ID = 4; -pub const ALG_SID_ECDH: ALG_ID = 5; -pub const ALG_SID_MD2: ALG_ID = 1; -pub const ALG_SID_MD4: ALG_ID = 2; -pub const ALG_SID_MD5: ALG_ID = 3; -pub const ALG_SID_SHA: ALG_ID = 4; -pub const ALG_SID_SHA1: ALG_ID = 4; -pub const ALG_SID_MAC: ALG_ID = 5; -pub const ALG_SID_RIPEMD: ALG_ID = 6; -pub const ALG_SID_RIPEMD160: ALG_ID = 7; -pub const ALG_SID_SSL3SHAMD5: ALG_ID = 8; -pub const ALG_SID_HMAC: ALG_ID = 9; -pub const ALG_SID_TLS1PRF: ALG_ID = 10; -pub const ALG_SID_HASH_REPLACE_OWF: ALG_ID = 11; -pub const ALG_SID_SHA_256: ALG_ID = 12; -pub const ALG_SID_SHA_384: ALG_ID = 13; -pub const ALG_SID_SHA_512: ALG_ID = 14; -pub const ALG_SID_SSL3_MASTER: ALG_ID = 1; -pub const ALG_SID_SCHANNEL_MASTER_HASH: ALG_ID = 2; -pub const ALG_SID_SCHANNEL_MAC_KEY: ALG_ID = 3; -pub const ALG_SID_PCT1_MASTER: ALG_ID = 4; -pub const ALG_SID_SSL2_MASTER: ALG_ID = 5; -pub const ALG_SID_TLS1_MASTER: ALG_ID = 6; -pub const ALG_SID_SCHANNEL_ENC_KEY: ALG_ID = 7; -pub const ALG_SID_ECMQV: ALG_ID = 1; -pub const ALG_SID_EXAMPLE: ALG_ID = 80; -pub type ALG_ID = ::c_uint; -pub const CALG_MD2: ALG_ID = ALG_CLASS_HASH | ALG_TYPE_ANY | ALG_SID_MD2; -pub const CALG_MD4: ALG_ID = ALG_CLASS_HASH | ALG_TYPE_ANY | ALG_SID_MD4; -pub const CALG_MD5: ALG_ID = ALG_CLASS_HASH | ALG_TYPE_ANY | ALG_SID_MD5; -pub const CALG_SHA: ALG_ID = ALG_CLASS_HASH | ALG_TYPE_ANY | ALG_SID_SHA; -pub const CALG_SHA1: ALG_ID = ALG_CLASS_HASH | ALG_TYPE_ANY | ALG_SID_SHA1; -pub const CALG_MAC: ALG_ID = ALG_CLASS_HASH | ALG_TYPE_ANY | ALG_SID_MAC; -pub const CALG_RSA_SIGN: ALG_ID = ALG_CLASS_SIGNATURE | ALG_TYPE_RSA | ALG_SID_RSA_ANY; -pub const CALG_DSS_SIGN: ALG_ID = ALG_CLASS_SIGNATURE | ALG_TYPE_DSS | ALG_SID_DSS_ANY; -pub const CALG_NO_SIGN: ALG_ID = ALG_CLASS_SIGNATURE | ALG_TYPE_ANY | ALG_SID_ANY; -pub const CALG_RSA_KEYX: ALG_ID = ALG_CLASS_KEY_EXCHANGE | ALG_TYPE_RSA | ALG_SID_RSA_ANY; -pub const CALG_DES: ALG_ID = ALG_CLASS_DATA_ENCRYPT | ALG_TYPE_BLOCK | ALG_SID_DES; -pub const CALG_3DES_112: ALG_ID = ALG_CLASS_DATA_ENCRYPT | ALG_TYPE_BLOCK | ALG_SID_3DES_112; -pub const CALG_3DES: ALG_ID = ALG_CLASS_DATA_ENCRYPT | ALG_TYPE_BLOCK | ALG_SID_3DES; -pub const CALG_DESX: ALG_ID = ALG_CLASS_DATA_ENCRYPT | ALG_TYPE_BLOCK | ALG_SID_DESX; -pub const CALG_RC2: ALG_ID = ALG_CLASS_DATA_ENCRYPT | ALG_TYPE_BLOCK | ALG_SID_RC2; -pub const CALG_RC4: ALG_ID = ALG_CLASS_DATA_ENCRYPT | ALG_TYPE_STREAM | ALG_SID_RC4; -pub const CALG_SEAL: ALG_ID = ALG_CLASS_DATA_ENCRYPT | ALG_TYPE_STREAM | ALG_SID_SEAL; -pub const CALG_DH_SF: ALG_ID = ALG_CLASS_KEY_EXCHANGE | ALG_TYPE_DH | ALG_SID_DH_SANDF; -pub const CALG_DH_EPHEM: ALG_ID = ALG_CLASS_KEY_EXCHANGE | ALG_TYPE_DH | ALG_SID_DH_EPHEM; -pub const CALG_AGREEDKEY_ANY: ALG_ID = ALG_CLASS_KEY_EXCHANGE | ALG_TYPE_DH - | ALG_SID_AGREED_KEY_ANY; -pub const CALG_KEA_KEYX: ALG_ID = ALG_CLASS_KEY_EXCHANGE | ALG_TYPE_DH | ALG_SID_KEA; -pub const CALG_HUGHES_MD5: ALG_ID = ALG_CLASS_KEY_EXCHANGE | ALG_TYPE_ANY | ALG_SID_MD5; -pub const CALG_SKIPJACK: ALG_ID = ALG_CLASS_DATA_ENCRYPT | ALG_TYPE_BLOCK | ALG_SID_SKIPJACK; -pub const CALG_TEK: ALG_ID = ALG_CLASS_DATA_ENCRYPT | ALG_TYPE_BLOCK | ALG_SID_TEK; -pub const CALG_CYLINK_MEK: ALG_ID = ALG_CLASS_DATA_ENCRYPT | ALG_TYPE_BLOCK | ALG_SID_CYLINK_MEK; -pub const CALG_SSL3_SHAMD5: ALG_ID = ALG_CLASS_HASH | ALG_TYPE_ANY | ALG_SID_SSL3SHAMD5; -pub const CALG_SSL3_MASTER: ALG_ID = ALG_CLASS_MSG_ENCRYPT | ALG_TYPE_SECURECHANNEL - | ALG_SID_SSL3_MASTER; -pub const CALG_SCHANNEL_MASTER_HASH: ALG_ID = ALG_CLASS_MSG_ENCRYPT | ALG_TYPE_SECURECHANNEL - | ALG_SID_SCHANNEL_MASTER_HASH; -pub const CALG_SCHANNEL_MAC_KEY: ALG_ID = ALG_CLASS_MSG_ENCRYPT | ALG_TYPE_SECURECHANNEL - | ALG_SID_SCHANNEL_MAC_KEY; -pub const CALG_SCHANNEL_ENC_KEY: ALG_ID = ALG_CLASS_MSG_ENCRYPT | ALG_TYPE_SECURECHANNEL - | ALG_SID_SCHANNEL_ENC_KEY; -pub const CALG_PCT1_MASTER: ALG_ID = ALG_CLASS_MSG_ENCRYPT | ALG_TYPE_SECURECHANNEL - | ALG_SID_PCT1_MASTER; -pub const CALG_SSL2_MASTER: ALG_ID = ALG_CLASS_MSG_ENCRYPT | ALG_TYPE_SECURECHANNEL - | ALG_SID_SSL2_MASTER; -pub const CALG_TLS1_MASTER: ALG_ID = ALG_CLASS_MSG_ENCRYPT | ALG_TYPE_SECURECHANNEL - | ALG_SID_TLS1_MASTER; -pub const CALG_RC5: ALG_ID = ALG_CLASS_DATA_ENCRYPT | ALG_TYPE_BLOCK | ALG_SID_RC5; -pub const CALG_HMAC: ALG_ID = ALG_CLASS_HASH | ALG_TYPE_ANY | ALG_SID_HMAC; -pub const CALG_TLS1PRF: ALG_ID = ALG_CLASS_HASH | ALG_TYPE_ANY | ALG_SID_TLS1PRF; -pub const CALG_HASH_REPLACE_OWF: ALG_ID = ALG_CLASS_HASH | ALG_TYPE_ANY | ALG_SID_HASH_REPLACE_OWF; -pub const CALG_AES_128: ALG_ID = ALG_CLASS_DATA_ENCRYPT | ALG_TYPE_BLOCK | ALG_SID_AES_128; -pub const CALG_AES_192: ALG_ID = ALG_CLASS_DATA_ENCRYPT | ALG_TYPE_BLOCK | ALG_SID_AES_192; -pub const CALG_AES_256: ALG_ID = ALG_CLASS_DATA_ENCRYPT | ALG_TYPE_BLOCK | ALG_SID_AES_256; -pub const CALG_AES: ALG_ID = ALG_CLASS_DATA_ENCRYPT | ALG_TYPE_BLOCK | ALG_SID_AES; -pub const CALG_SHA_256: ALG_ID = ALG_CLASS_HASH | ALG_TYPE_ANY | ALG_SID_SHA_256; -pub const CALG_SHA_384: ALG_ID = ALG_CLASS_HASH | ALG_TYPE_ANY | ALG_SID_SHA_384; -pub const CALG_SHA_512: ALG_ID = ALG_CLASS_HASH | ALG_TYPE_ANY | ALG_SID_SHA_512; -pub const CALG_ECDH: ALG_ID = ALG_CLASS_KEY_EXCHANGE | ALG_TYPE_DH | ALG_SID_ECDH; -pub const CALG_ECMQV: ALG_ID = ALG_CLASS_KEY_EXCHANGE | ALG_TYPE_ANY | ALG_SID_ECMQV; -pub const CALG_ECDSA: ALG_ID = ALG_CLASS_SIGNATURE | ALG_TYPE_DSS | ALG_SID_ECDSA; -pub type HCRYPTPROV = ::ULONG_PTR; -pub type HCRYPTKEY = ::ULONG_PTR; -pub type HCRYPTHASH = ::ULONG_PTR; -pub const CRYPT_VERIFYCONTEXT: ::DWORD = 0xF0000000; -pub const CRYPT_NEWKEYSET: ::DWORD = 0x00000008; -pub const CRYPT_DELETEKEYSET: ::DWORD = 0x00000010; -pub const CRYPT_MACHINE_KEYSET: ::DWORD = 0x00000020; -pub const CRYPT_SILENT: ::DWORD = 0x00000040; -pub const CRYPT_DEFAULT_CONTAINER_OPTIONAL: ::DWORD = 0x00000080; -pub const CRYPT_EXPORTABLE: ::DWORD = 0x00000001; -pub const CRYPT_USER_PROTECTED: ::DWORD = 0x00000002; -pub const CRYPT_CREATE_SALT: ::DWORD = 0x00000004; -pub const CRYPT_UPDATE_KEY: ::DWORD = 0x00000008; -pub const CRYPT_NO_SALT: ::DWORD = 0x00000010; -pub const CRYPT_PREGEN: ::DWORD = 0x00000040; -pub const CRYPT_RECIPIENT: ::DWORD = 0x00000010; -pub const CRYPT_INITIATOR: ::DWORD = 0x00000040; -pub const CRYPT_ONLINE: ::DWORD = 0x00000080; -pub const CRYPT_SF: ::DWORD = 0x00000100; -pub const CRYPT_CREATE_IV: ::DWORD = 0x00000200; -pub const CRYPT_KEK: ::DWORD = 0x00000400; -pub const CRYPT_DATA_KEY: ::DWORD = 0x00000800; -pub const CRYPT_VOLATILE: ::DWORD = 0x00001000; -pub const CRYPT_SGCKEY: ::DWORD = 0x00002000; -pub const CRYPT_USER_PROTECTED_STRONG: ::DWORD = 0x00100000; -pub const CRYPT_ARCHIVABLE: ::DWORD = 0x00004000; -pub const CRYPT_FORCE_KEY_PROTECTION_HIGH: ::DWORD = 0x00008000; -pub const RSA1024BIT_KEY: ::DWORD = 0x04000000; -pub const CRYPT_SERVER: ::DWORD = 0x00000400; -pub const KEY_LENGTH_MASK: ::DWORD = 0xFFFF0000; -pub const CRYPT_Y_ONLY: ::DWORD = 0x00000001; -pub const CRYPT_SSL2_FALLBACK: ::DWORD = 0x00000002; -pub const CRYPT_DESTROYKEY: ::DWORD = 0x00000004; -pub const CRYPT_OAEP: ::DWORD = 0x00000040; -pub const CRYPT_BLOB_VER3: ::DWORD = 0x00000080; -pub const CRYPT_IPSEC_HMAC_KEY: ::DWORD = 0x00000100; -pub const CRYPT_DECRYPT_RSA_NO_PADDING_CHECK: ::DWORD = 0x00000020; -pub const CRYPT_SECRETDIGEST: ::DWORD = 0x00000001; -pub const CRYPT_OWF_REPL_LM_HASH: ::DWORD = 0x00000001; -pub const CRYPT_LITTLE_ENDIAN: ::DWORD = 0x00000001; -pub const CRYPT_NOHASHOID: ::DWORD = 0x00000001; -pub const CRYPT_TYPE2_FORMAT: ::DWORD = 0x00000002; -pub const CRYPT_X931_FORMAT: ::DWORD = 0x00000004; -pub const CRYPT_MACHINE_DEFAULT: ::DWORD = 0x00000001; -pub const CRYPT_USER_DEFAULT: ::DWORD = 0x00000002; -pub const CRYPT_DELETE_DEFAULT: ::DWORD = 0x00000004; -pub const SIMPLEBLOB: ::DWORD = 0x1; -pub const PUBLICKEYBLOB: ::DWORD = 0x6; -pub const PRIVATEKEYBLOB: ::DWORD = 0x7; -pub const PLAINTEXTKEYBLOB: ::DWORD = 0x8; -pub const OPAQUEKEYBLOB: ::DWORD = 0x9; -pub const PUBLICKEYBLOBEX: ::DWORD = 0xA; -pub const SYMMETRICWRAPKEYBLOB: ::DWORD = 0xB; -pub const KEYSTATEBLOB: ::DWORD = 0xC; -pub const AT_KEYEXCHANGE: ::DWORD = 1; -pub const AT_SIGNATURE: ::DWORD = 2; -pub const CRYPT_USERDATA: ::DWORD = 1; -pub const KP_IV: ::DWORD = 1; -pub const KP_SALT: ::DWORD = 2; -pub const KP_PADDING: ::DWORD = 3; -pub const KP_MODE: ::DWORD = 4; -pub const KP_MODE_BITS: ::DWORD = 5; -pub const KP_PERMISSIONS: ::DWORD = 6; -pub const KP_ALGID: ::DWORD = 7; -pub const KP_BLOCKLEN: ::DWORD = 8; -pub const KP_KEYLEN: ::DWORD = 9; -pub const KP_SALT_EX: ::DWORD = 10; -pub const KP_P: ::DWORD = 11; -pub const KP_G: ::DWORD = 12; -pub const KP_Q: ::DWORD = 13; -pub const KP_X: ::DWORD = 14; -pub const KP_Y: ::DWORD = 15; -pub const KP_RA: ::DWORD = 16; -pub const KP_RB: ::DWORD = 17; -pub const KP_INFO: ::DWORD = 18; -pub const KP_EFFECTIVE_KEYLEN: ::DWORD = 19; -pub const KP_SCHANNEL_ALG: ::DWORD = 20; -pub const KP_CLIENT_RANDOM: ::DWORD = 21; -pub const KP_SERVER_RANDOM: ::DWORD = 22; -pub const KP_RP: ::DWORD = 23; -pub const KP_PRECOMP_MD5: ::DWORD = 24; -pub const KP_PRECOMP_SHA: ::DWORD = 25; -pub const KP_CERTIFICATE: ::DWORD = 26; -pub const KP_CLEAR_KEY: ::DWORD = 27; -pub const KP_PUB_EX_LEN: ::DWORD = 28; -pub const KP_PUB_EX_VAL: ::DWORD = 29; -pub const KP_KEYVAL: ::DWORD = 30; -pub const KP_ADMIN_PIN: ::DWORD = 31; -pub const KP_KEYEXCHANGE_PIN: ::DWORD = 32; -pub const KP_SIGNATURE_PIN: ::DWORD = 33; -pub const KP_PREHASH: ::DWORD = 34; -pub const KP_ROUNDS: ::DWORD = 35; -pub const KP_OAEP_PARAMS: ::DWORD = 36; -pub const KP_CMS_KEY_INFO: ::DWORD = 37; -pub const KP_CMS_DH_KEY_INFO: ::DWORD = 38; -pub const KP_PUB_PARAMS: ::DWORD = 39; -pub const KP_VERIFY_PARAMS: ::DWORD = 40; -pub const KP_HIGHEST_VERSION: ::DWORD = 41; -pub const KP_GET_USE_COUNT: ::DWORD = 42; -pub const KP_PIN_ID: ::DWORD = 43; -pub const KP_PIN_INFO: ::DWORD = 44; -pub const PKCS5_PADDING: ::DWORD = 1; -pub const RANDOM_PADDING: ::DWORD = 2; -pub const ZERO_PADDING: ::DWORD = 3; -pub const CRYPT_MODE_CBC: ::DWORD = 1; -pub const CRYPT_MODE_ECB: ::DWORD = 2; -pub const CRYPT_MODE_OFB: ::DWORD = 3; -pub const CRYPT_MODE_CFB: ::DWORD = 4; -pub const CRYPT_MODE_CTS: ::DWORD = 5; -pub const CRYPT_ENCRYPT: ::DWORD = 0x0001; -pub const CRYPT_DECRYPT: ::DWORD = 0x0002; -pub const CRYPT_EXPORT: ::DWORD = 0x0004; -pub const CRYPT_READ: ::DWORD = 0x0008; -pub const CRYPT_WRITE: ::DWORD = 0x0010; -pub const CRYPT_MAC: ::DWORD = 0x0020; -pub const CRYPT_EXPORT_KEY: ::DWORD = 0x0040; -pub const CRYPT_IMPORT_KEY: ::DWORD = 0x0080; -pub const CRYPT_ARCHIVE: ::DWORD = 0x0100; -pub const HP_ALGID: ::DWORD = 0x0001; -pub const HP_HASHVAL: ::DWORD = 0x0002; -pub const HP_HASHSIZE: ::DWORD = 0x0004; -pub const HP_HMAC_INFO: ::DWORD = 0x0005; -pub const HP_TLS1PRF_LABEL: ::DWORD = 0x0006; -pub const HP_TLS1PRF_SEED: ::DWORD = 0x0007; -pub const CRYPT_FAILED: ::BOOL = ::FALSE; -pub const CRYPT_SUCCEED: ::BOOL = ::TRUE; -pub const PP_ENUMALGS: ::DWORD = 1; -pub const PP_ENUMCONTAINERS: ::DWORD = 2; -pub const PP_IMPTYPE: ::DWORD = 3; -pub const PP_NAME: ::DWORD = 4; -pub const PP_VERSION: ::DWORD = 5; -pub const PP_CONTAINER: ::DWORD = 6; -pub const PP_CHANGE_PASSWORD: ::DWORD = 7; -pub const PP_KEYSET_SEC_DESCR: ::DWORD = 8; -pub const PP_CERTCHAIN: ::DWORD = 9; -pub const PP_KEY_TYPE_SUBTYPE: ::DWORD = 10; -pub const PP_PROVTYPE: ::DWORD = 16; -pub const PP_KEYSTORAGE: ::DWORD = 17; -pub const PP_APPLI_CERT: ::DWORD = 18; -pub const PP_SYM_KEYSIZE: ::DWORD = 19; -pub const PP_SESSION_KEYSIZE: ::DWORD = 20; -pub const PP_UI_PROMPT: ::DWORD = 21; -pub const PP_ENUMALGS_EX: ::DWORD = 22; -pub const PP_ENUMMANDROOTS: ::DWORD = 25; -pub const PP_ENUMELECTROOTS: ::DWORD = 26; -pub const PP_KEYSET_TYPE: ::DWORD = 27; -pub const PP_ADMIN_PIN: ::DWORD = 31; -pub const PP_KEYEXCHANGE_PIN: ::DWORD = 32; -pub const PP_SIGNATURE_PIN: ::DWORD = 33; -pub const PP_SIG_KEYSIZE_INC: ::DWORD = 34; -pub const PP_KEYX_KEYSIZE_INC: ::DWORD = 35; -pub const PP_UNIQUE_CONTAINER: ::DWORD = 36; -pub const PP_SGC_INFO: ::DWORD = 37; -pub const PP_USE_HARDWARE_RNG: ::DWORD = 38; -pub const PP_KEYSPEC: ::DWORD = 39; -pub const PP_ENUMEX_SIGNING_PROT: ::DWORD = 40; -pub const PP_CRYPT_COUNT_KEY_USE: ::DWORD = 41; -pub const PP_USER_CERTSTORE: ::DWORD = 42; -pub const PP_SMARTCARD_READER: ::DWORD = 43; -pub const PP_SMARTCARD_GUID: ::DWORD = 45; -pub const PP_ROOT_CERTSTORE: ::DWORD = 46; -pub const PP_SMARTCARD_READER_ICON: ::DWORD = 47; -pub const CRYPT_FIRST: ::DWORD = 1; -pub const CRYPT_NEXT: ::DWORD = 2; -pub const CRYPT_SGC_ENUM: ::DWORD = 4; -pub const CRYPT_IMPL_HARDWARE: ::DWORD = 1; -pub const CRYPT_IMPL_SOFTWARE: ::DWORD = 2; -pub const CRYPT_IMPL_MIXED: ::DWORD = 3; -pub const CRYPT_IMPL_UNKNOWN: ::DWORD = 4; -pub const CRYPT_IMPL_REMOVABLE: ::DWORD = 8; -pub const CRYPT_SEC_DESCR: ::DWORD = 0x00000001; -pub const CRYPT_PSTORE: ::DWORD = 0x00000002; -pub const CRYPT_UI_PROMPT: ::DWORD = 0x00000004; -pub const CRYPT_FLAG_PCT1: ::DWORD = 0x0001; -pub const CRYPT_FLAG_SSL2: ::DWORD = 0x0002; -pub const CRYPT_FLAG_SSL3: ::DWORD = 0x0004; -pub const CRYPT_FLAG_TLS1: ::DWORD = 0x0008; -pub const CRYPT_FLAG_IPSEC: ::DWORD = 0x0010; -pub const CRYPT_FLAG_SIGNING: ::DWORD = 0x0020; -pub const CRYPT_SGC: ::DWORD = 0x0001; -pub const CRYPT_FASTSGC: ::DWORD = 0x0002; -pub const PP_CLIENT_HWND: ::DWORD = 1; -pub const PP_CONTEXT_INFO: ::DWORD = 11; -pub const PP_KEYEXCHANGE_KEYSIZE: ::DWORD = 12; -pub const PP_SIGNATURE_KEYSIZE: ::DWORD = 13; -pub const PP_KEYEXCHANGE_ALG: ::DWORD = 14; -pub const PP_SIGNATURE_ALG: ::DWORD = 15; -pub const PP_DELETEKEY: ::DWORD = 24; -pub const PP_PIN_PROMPT_STRING: ::DWORD = 44; -pub const PP_SECURE_KEYEXCHANGE_PIN: ::DWORD = 47; -pub const PP_SECURE_SIGNATURE_PIN: ::DWORD = 48; -pub const PROV_RSA_FULL: ::DWORD = 1; -pub const PROV_RSA_SIG: ::DWORD = 2; -pub const PROV_DSS: ::DWORD = 3; -pub const PROV_FORTEZZA: ::DWORD = 4; -pub const PROV_MS_EXCHANGE: ::DWORD = 5; -pub const PROV_SSL: ::DWORD = 6; -pub const PROV_RSA_SCHANNEL: ::DWORD = 12; -pub const PROV_DSS_DH: ::DWORD = 13; -pub const PROV_EC_ECDSA_SIG: ::DWORD = 14; -pub const PROV_EC_ECNRA_SIG: ::DWORD = 15; -pub const PROV_EC_ECDSA_FULL: ::DWORD = 16; -pub const PROV_EC_ECNRA_FULL: ::DWORD = 17; -pub const PROV_DH_SCHANNEL: ::DWORD = 18; -pub const PROV_SPYRUS_LYNKS: ::DWORD = 20; -pub const PROV_RNG: ::DWORD = 21; -pub const PROV_INTEL_SEC: ::DWORD = 22; -pub const PROV_REPLACE_OWF: ::DWORD = 23; -pub const PROV_RSA_AES: ::DWORD = 24; -pub const MS_DEF_PROV: &'static str = "Microsoft Base Cryptographic Provider v1.0"; -pub const MS_ENHANCED_PROV: &'static str = "Microsoft Enhanced Cryptographic Provider v1.0"; -pub const MS_STRONG_PROV: &'static str = "Microsoft Strong Cryptographic Provider"; -pub const MS_DEF_RSA_SIG_PROV: &'static str = "Microsoft RSA Signature Cryptographic Provider"; -pub const MS_DEF_RSA_SCHANNEL_PROV: &'static str = "Microsoft RSA SChannel Cryptographic Provider"; -pub const MS_DEF_DSS_PROV: &'static str = "Microsoft Base DSS Cryptographic Provider"; -pub const MS_DEF_DSS_DH_PROV: &'static str = - "Microsoft Base DSS and Diffie-Hellman Cryptographic Provider"; -pub const MS_ENH_DSS_DH_PROV: &'static str = - "Microsoft Enhanced DSS and Diffie-Hellman Cryptographic Provider"; -pub const MS_DEF_DH_SCHANNEL_PROV: &'static str = "Microsoft DH SChannel Cryptographic Provider"; -pub const MS_SCARD_PROV: &'static str = "Microsoft Base Smart Card Crypto Provider"; -pub const MS_ENH_RSA_AES_PROV: &'static str = - "Microsoft Enhanced RSA and AES Cryptographic Provider"; -pub const MS_ENH_RSA_AES_PROV_XP: &'static str = - "Microsoft Enhanced RSA and AES Cryptographic Provider (Prototype)"; -pub const MAXUIDLEN: usize = 64; -pub const EXPO_OFFLOAD_REG_VALUE: &'static str = "ExpoOffload"; -pub const EXPO_OFFLOAD_FUNC_NAME: &'static str = "OffloadModExpo"; -pub const szKEY_CRYPTOAPI_PRIVATE_KEY_OPTIONS: &'static str = - "Software\\Policies\\Microsoft\\Cryptography"; -pub const szKEY_CACHE_ENABLED: &'static str = "CachePrivateKeys"; -pub const szKEY_CACHE_SECONDS: &'static str = "PrivateKeyLifetimeSeconds"; -pub const szPRIV_KEY_CACHE_MAX_ITEMS: &'static str = "PrivKeyCacheMaxItems"; -pub const cPRIV_KEY_CACHE_MAX_ITEMS_DEFAULT: ::DWORD = 20; -pub const szPRIV_KEY_CACHE_PURGE_INTERVAL_SECONDS: &'static str = - "PrivKeyCachePurgeIntervalSeconds"; -pub const cPRIV_KEY_CACHE_PURGE_INTERVAL_SECONDS_DEFAULT: ::DWORD = 86400; -pub const CUR_BLOB_VERSION: ::DWORD = 2; -STRUCT!{struct CMS_KEY_INFO { - dwVersion: ::DWORD, - Algid: ALG_ID, - pbOID: *mut ::BYTE, - cbOID: ::DWORD, -}} -pub type PCMS_KEY_INFO = *mut CMS_KEY_INFO; -STRUCT!{struct HMAC_INFO { - HashAlgid: ALG_ID, - pbInnerString: *mut ::BYTE, - cbInnerString: ::DWORD, - pbOuterString: *mut ::BYTE, - cbOuterString: ::DWORD, -}} -pub type PHMAC_INFO = *mut HMAC_INFO; -STRUCT!{struct SCHANNEL_ALG { - dwUse: ::DWORD, - Algid: ALG_ID, - cBits: ::DWORD, - dwFlags: ::DWORD, - dwReserved: ::DWORD, -}} -pub type PSCHANNEL_ALG = *mut SCHANNEL_ALG; -pub const SCHANNEL_MAC_KEY: ::DWORD = 0x00000000; -pub const SCHANNEL_ENC_KEY: ::DWORD = 0x00000001; -pub const INTERNATIONAL_USAGE: ::DWORD = 0x00000001; -STRUCT!{struct PROV_ENUMALGS { - aiAlgid: ALG_ID, - dwBitLen: ::DWORD, - dwNameLen: ::DWORD, - szName: [::CHAR; 20], -}} -#[repr(C)] #[derive(Copy)] -pub struct PROV_ENUMALGS_EX { - pub aiAlgid: ALG_ID, - pub dwDefaultLen: ::DWORD, - pub dwMinLen: ::DWORD, - pub dwMaxLen: ::DWORD, - pub dwProtocols: ::DWORD, - pub dwNameLen: ::DWORD, - pub szName: [::CHAR; 20], - pub dwLongNameLen: ::DWORD, - pub szLongName: [::CHAR; 40], -} -impl Clone for PROV_ENUMALGS_EX { fn clone(&self) -> PROV_ENUMALGS_EX { *self } } -STRUCT!{struct BLOBHEADER { - bType: ::BYTE, - bVersion: ::BYTE, - reserved: ::WORD, - aiKeyAlg: ::ALG_ID, -}} -pub type PUBLICKEYSTRUC = BLOBHEADER; -STRUCT!{struct RSAPUBKEY { - magic: ::DWORD, - bitlen: ::DWORD, - pubexp: ::DWORD, -}} -STRUCT!{struct DHPUBKEY { - magic: ::DWORD, - bitlen: ::DWORD, -}} -pub type DSSPUBKEY = DHPUBKEY; -pub type KEAPUBKEY = DHPUBKEY; -pub type TEKPUBKEY = DHPUBKEY; -STRUCT!{struct DSSSEED { - counter: ::DWORD, - seed: [::BYTE; 20], -}} -STRUCT!{struct DHPUBKEY_VER3 { - magic: ::DWORD, - bitlenP: ::DWORD, - bitlenQ: ::DWORD, - bitlenJ: ::DWORD, - DSSSeed: DSSSEED, -}} -pub type DSSPUBKEY_VER3 = DHPUBKEY_VER3; -STRUCT!{struct DHPRIVKEY_VER3 { - magic: ::DWORD, - bitlenP: ::DWORD, - bitlenQ: ::DWORD, - bitlenJ: ::DWORD, - bitlenX: ::DWORD, - DSSSeed: DSSSEED, -}} -pub type DSSPRIVKEY_VER3 = DHPRIVKEY_VER3; -STRUCT!{struct KEY_TYPE_SUBTYPE { - dwKeySpec: ::DWORD, - Type: ::GUID, - Subtype: ::GUID, -}} -pub type PKEY_TYPE_SUBTYPE = *mut KEY_TYPE_SUBTYPE; -#[repr(C)] #[derive(Copy)] -pub struct CERT_FORTEZZA_DATA_PROP { - pub SerialNumber: [::c_uchar; 8], - pub CertIndex: ::c_int, - pub CertLabel: [::c_uchar; 36], -} -impl Clone for CERT_FORTEZZA_DATA_PROP { fn clone(&self) -> CERT_FORTEZZA_DATA_PROP { *self } } -#[repr(C)] #[derive(Copy)] -pub struct CRYPT_RC4_KEY_STATE { - pub Key: [::c_uchar; 16], - pub SBox: [::c_uchar; 256], - pub i: ::c_uchar, - pub j: ::c_uchar, -} -impl Clone for CRYPT_RC4_KEY_STATE { fn clone(&self) -> CRYPT_RC4_KEY_STATE { *self } } -pub type PCRYPT_RC4_KEY_STATE = *mut CRYPT_RC4_KEY_STATE; -STRUCT!{struct CRYPT_DES_KEY_STATE { - Key: [::c_uchar; 8], - IV: [::c_uchar; 8], - Feedback: [::c_uchar; 8], -}} -pub type PCRYPT_DES_KEY_STATE = *mut CRYPT_DES_KEY_STATE; -STRUCT!{struct CRYPT_3DES_KEY_STATE { - Key: [::c_uchar; 24], - IV: [::c_uchar; 8], - Feedback: [::c_uchar; 8], -}} -pub type PCRYPT_3DES_KEY_STATE = *mut CRYPT_3DES_KEY_STATE; -STRUCT!{struct CRYPT_AES_128_KEY_STATE { - Key: [::c_uchar; 16], - IV: [::c_uchar; 16], - EncryptionState: [[::c_uchar; 16]; 11], - DecryptionState: [[::c_uchar; 16]; 11], - Feedback: [::c_uchar; 16], -}} -pub type PCRYPT_AES_128_KEY_STATE = *mut CRYPT_AES_128_KEY_STATE; -STRUCT!{struct CRYPT_AES_256_KEY_STATE { - Key: [::c_uchar; 32], - IV: [::c_uchar; 16], - EncryptionState: [[::c_uchar; 16]; 15], - DecryptionState: [[::c_uchar; 16]; 15], - Feedback: [::c_uchar; 16], -}} -pub type PCRYPT_AES_256_KEY_STATE = *mut CRYPT_AES_256_KEY_STATE; -STRUCT!{struct CRYPTOAPI_BLOB { - cbData: ::DWORD, - pbData: *mut ::BYTE, -}} -pub type CRYPT_INTEGER_BLOB = CRYPTOAPI_BLOB; -pub type PCRYPT_INTEGER_BLOB = *mut CRYPTOAPI_BLOB; -pub type CRYPT_UINT_BLOB = CRYPTOAPI_BLOB; -pub type PCRYPT_UINT_BLOB = *mut CRYPTOAPI_BLOB; -pub type CRYPT_OBJID_BLOB = CRYPTOAPI_BLOB; -pub type PCRYPT_OBJID_BLOB = *mut CRYPTOAPI_BLOB; -pub type CERT_NAME_BLOB = CRYPTOAPI_BLOB; -pub type PCERT_NAME_BLOB = *mut CRYPTOAPI_BLOB; -pub type CERT_RDN_VALUE_BLOB = CRYPTOAPI_BLOB; -pub type PCERT_RDN_VALUE_BLOB = *mut CRYPTOAPI_BLOB; -pub type CERT_BLOB = CRYPTOAPI_BLOB; -pub type PCERT_BLOB = *mut CRYPTOAPI_BLOB; -pub type CRL_BLOB = CRYPTOAPI_BLOB; -pub type PCRL_BLOB = *mut CRYPTOAPI_BLOB; -pub type DATA_BLOB = CRYPTOAPI_BLOB; -pub type PDATA_BLOB = *mut CRYPTOAPI_BLOB; -pub type CRYPT_DATA_BLOB = CRYPTOAPI_BLOB; -pub type PCRYPT_DATA_BLOB = *mut CRYPTOAPI_BLOB; -pub type CRYPT_HASH_BLOB = CRYPTOAPI_BLOB; -pub type PCRYPT_HASH_BLOB = *mut CRYPTOAPI_BLOB; -pub type CRYPT_DIGEST_BLOB = CRYPTOAPI_BLOB; -pub type PCRYPT_DIGEST_BLOB = *mut CRYPTOAPI_BLOB; -pub type CRYPT_DER_BLOB = CRYPTOAPI_BLOB; -pub type PCRYPT_DER_BLOB = *mut CRYPTOAPI_BLOB; -pub type CRYPT_ATTR_BLOB = CRYPTOAPI_BLOB; -pub type PCRYPT_ATTR_BLOB = *mut CRYPTOAPI_BLOB; -STRUCT!{struct CMS_DH_KEY_INFO { - dwVersion: ::DWORD, - Algid: ALG_ID, - pszContentEncObjId: ::LPSTR, - PubInfo: CRYPT_DATA_BLOB, - pReserved: *mut ::c_void, -}} -pub type PCMS_DH_KEY_INFO = *mut CMS_DH_KEY_INFO; -pub type HCRYPTPROV_OR_NCRYPT_KEY_HANDLE = ::ULONG_PTR; -pub type HCRYPTPROV_LEGACY = ::ULONG_PTR; -STRUCT!{struct CRYPT_BIT_BLOB { - cbData: ::DWORD, - pbData: *mut ::BYTE, - cUnusedBits: ::DWORD, -}} -pub type PCRYPT_BIT_BLOB = *mut CRYPT_BIT_BLOB; -STRUCT!{struct CRYPT_ALGORITHM_IDENTIFIER { - pszObjId: ::LPSTR, - Parameters: CRYPT_OBJID_BLOB, -}} -pub type PCRYPT_ALGORITHM_IDENTIFIER = *mut CRYPT_ALGORITHM_IDENTIFIER; -pub const szOID_RSA: &'static str = "1.2.840.113549"; -pub const szOID_PKCS: &'static str = "1.2.840.113549.1"; -pub const szOID_RSA_HASH: &'static str = "1.2.840.113549.2"; -pub const szOID_RSA_ENCRYPT: &'static str = "1.2.840.113549.3"; -pub const szOID_PKCS_1: &'static str = "1.2.840.113549.1.1"; -pub const szOID_PKCS_2: &'static str = "1.2.840.113549.1.2"; -pub const szOID_PKCS_3: &'static str = "1.2.840.113549.1.3"; -pub const szOID_PKCS_4: &'static str = "1.2.840.113549.1.4"; -pub const szOID_PKCS_5: &'static str = "1.2.840.113549.1.5"; -pub const szOID_PKCS_6: &'static str = "1.2.840.113549.1.6"; -pub const szOID_PKCS_7: &'static str = "1.2.840.113549.1.7"; -pub const szOID_PKCS_8: &'static str = "1.2.840.113549.1.8"; -pub const szOID_PKCS_9: &'static str = "1.2.840.113549.1.9"; -pub const szOID_PKCS_10: &'static str = "1.2.840.113549.1.10"; -pub const szOID_PKCS_12: &'static str = "1.2.840.113549.1.12"; -pub const szOID_RSA_RSA: &'static str = "1.2.840.113549.1.1.1"; -pub const szOID_RSA_MD2RSA: &'static str = "1.2.840.113549.1.1.2"; -pub const szOID_RSA_MD4RSA: &'static str = "1.2.840.113549.1.1.3"; -pub const szOID_RSA_MD5RSA: &'static str = "1.2.840.113549.1.1.4"; -pub const szOID_RSA_SHA1RSA: &'static str = "1.2.840.113549.1.1.5"; -pub const szOID_RSA_SETOAEP_RSA: &'static str = "1.2.840.113549.1.1.6"; -pub const szOID_RSAES_OAEP: &'static str = "1.2.840.113549.1.1.7"; -pub const szOID_RSA_MGF1: &'static str = "1.2.840.113549.1.1.8"; -pub const szOID_RSA_PSPECIFIED: &'static str = "1.2.840.113549.1.1.9"; -pub const szOID_RSA_SSA_PSS: &'static str = "1.2.840.113549.1.1.10"; -pub const szOID_RSA_SHA256RSA: &'static str = "1.2.840.113549.1.1.11"; -pub const szOID_RSA_SHA384RSA: &'static str = "1.2.840.113549.1.1.12"; -pub const szOID_RSA_SHA512RSA: &'static str = "1.2.840.113549.1.1.13"; -pub const szOID_RSA_DH: &'static str = "1.2.840.113549.1.3.1"; -pub const szOID_RSA_data: &'static str = "1.2.840.113549.1.7.1"; -pub const szOID_RSA_signedData: &'static str = "1.2.840.113549.1.7.2"; -pub const szOID_RSA_envelopedData: &'static str = "1.2.840.113549.1.7.3"; -pub const szOID_RSA_signEnvData: &'static str = "1.2.840.113549.1.7.4"; -pub const szOID_RSA_digestedData: &'static str = "1.2.840.113549.1.7.5"; -pub const szOID_RSA_hashedData: &'static str = "1.2.840.113549.1.7.5"; -pub const szOID_RSA_encryptedData: &'static str = "1.2.840.113549.1.7.6"; -pub const szOID_RSA_emailAddr: &'static str = "1.2.840.113549.1.9.1"; -pub const szOID_RSA_unstructName: &'static str = "1.2.840.113549.1.9.2"; -pub const szOID_RSA_contentType: &'static str = "1.2.840.113549.1.9.3"; -pub const szOID_RSA_messageDigest: &'static str = "1.2.840.113549.1.9.4"; -pub const szOID_RSA_signingTime: &'static str = "1.2.840.113549.1.9.5"; -pub const szOID_RSA_counterSign: &'static str = "1.2.840.113549.1.9.6"; -pub const szOID_RSA_challengePwd: &'static str = "1.2.840.113549.1.9.7"; -pub const szOID_RSA_unstructAddr: &'static str = "1.2.840.113549.1.9.8"; -pub const szOID_RSA_extCertAttrs: &'static str = "1.2.840.113549.1.9.9"; -pub const szOID_RSA_certExtensions: &'static str = "1.2.840.113549.1.9.14"; -pub const szOID_RSA_SMIMECapabilities: &'static str = "1.2.840.113549.1.9.15"; -pub const szOID_RSA_preferSignedData: &'static str = "1.2.840.113549.1.9.15.1"; -pub const szOID_TIMESTAMP_TOKEN: &'static str = "1.2.840.113549.1.9.16.1.4"; -pub const szOID_RFC3161_counterSign: &'static str = "1.3.6.1.4.1.311.3.3.1"; -pub const szOID_RSA_SMIMEalg: &'static str = "1.2.840.113549.1.9.16.3"; -pub const szOID_RSA_SMIMEalgESDH: &'static str = "1.2.840.113549.1.9.16.3.5"; -pub const szOID_RSA_SMIMEalgCMS3DESwrap: &'static str = "1.2.840.113549.1.9.16.3.6"; -pub const szOID_RSA_SMIMEalgCMSRC2wrap: &'static str = "1.2.840.113549.1.9.16.3.7"; -pub const szOID_RSA_MD2: &'static str = "1.2.840.113549.2.2"; -pub const szOID_RSA_MD4: &'static str = "1.2.840.113549.2.4"; -pub const szOID_RSA_MD5: &'static str = "1.2.840.113549.2.5"; -pub const szOID_RSA_RC2CBC: &'static str = "1.2.840.113549.3.2"; -pub const szOID_RSA_RC4: &'static str = "1.2.840.113549.3.4"; -pub const szOID_RSA_DES_EDE3_CBC: &'static str = "1.2.840.113549.3.7"; -pub const szOID_RSA_RC5_CBCPad: &'static str = "1.2.840.113549.3.9"; -pub const szOID_ANSI_X942: &'static str = "1.2.840.10046"; -pub const szOID_ANSI_X942_DH: &'static str = "1.2.840.10046.2.1"; -pub const szOID_X957: &'static str = "1.2.840.10040"; -pub const szOID_X957_DSA: &'static str = "1.2.840.10040.4.1"; -pub const szOID_X957_SHA1DSA: &'static str = "1.2.840.10040.4.3"; -pub const szOID_ECC_PUBLIC_KEY: &'static str = "1.2.840.10045.2.1"; -pub const szOID_ECC_CURVE_P256: &'static str = "1.2.840.10045.3.1.7"; -pub const szOID_ECC_CURVE_P384: &'static str = "1.3.132.0.34"; -pub const szOID_ECC_CURVE_P521: &'static str = "1.3.132.0.35"; -pub const szOID_ECDSA_SHA1: &'static str = "1.2.840.10045.4.1"; -pub const szOID_ECDSA_SPECIFIED: &'static str = "1.2.840.10045.4.3"; -pub const szOID_ECDSA_SHA256: &'static str = "1.2.840.10045.4.3.2"; -pub const szOID_ECDSA_SHA384: &'static str = "1.2.840.10045.4.3.3"; -pub const szOID_ECDSA_SHA512: &'static str = "1.2.840.10045.4.3.4"; -pub const szOID_NIST_AES128_CBC: &'static str = "2.16.840.1.101.3.4.1.2"; -pub const szOID_NIST_AES192_CBC: &'static str = "2.16.840.1.101.3.4.1.22"; -pub const szOID_NIST_AES256_CBC: &'static str = "2.16.840.1.101.3.4.1.42"; -pub const szOID_NIST_AES128_WRAP: &'static str = "2.16.840.1.101.3.4.1.5"; -pub const szOID_NIST_AES192_WRAP: &'static str = "2.16.840.1.101.3.4.1.25"; -pub const szOID_NIST_AES256_WRAP: &'static str = "2.16.840.1.101.3.4.1.45"; -pub const szOID_DH_SINGLE_PASS_STDDH_SHA1_KDF: &'static str = "1.3.133.16.840.63.0.2"; -pub const szOID_DH_SINGLE_PASS_STDDH_SHA256_KDF: &'static str = "1.3.132.1.11.1"; -pub const szOID_DH_SINGLE_PASS_STDDH_SHA384_KDF: &'static str = "1.3.132.1.11.2"; -pub const szOID_DS: &'static str = "2.5"; -pub const szOID_DSALG: &'static str = "2.5.8"; -pub const szOID_DSALG_CRPT: &'static str = "2.5.8.1"; -pub const szOID_DSALG_HASH: &'static str = "2.5.8.2"; -pub const szOID_DSALG_SIGN: &'static str = "2.5.8.3"; -pub const szOID_DSALG_RSA: &'static str = "2.5.8.1.1"; -pub const szOID_OIW: &'static str = "1.3.14"; -pub const szOID_OIWSEC: &'static str = "1.3.14.3.2"; -pub const szOID_OIWSEC_md4RSA: &'static str = "1.3.14.3.2.2"; -pub const szOID_OIWSEC_md5RSA: &'static str = "1.3.14.3.2.3"; -pub const szOID_OIWSEC_md4RSA2: &'static str = "1.3.14.3.2.4"; -pub const szOID_OIWSEC_desECB: &'static str = "1.3.14.3.2.6"; -pub const szOID_OIWSEC_desCBC: &'static str = "1.3.14.3.2.7"; -pub const szOID_OIWSEC_desOFB: &'static str = "1.3.14.3.2.8"; -pub const szOID_OIWSEC_desCFB: &'static str = "1.3.14.3.2.9"; -pub const szOID_OIWSEC_desMAC: &'static str = "1.3.14.3.2.10"; -pub const szOID_OIWSEC_rsaSign: &'static str = "1.3.14.3.2.11"; -pub const szOID_OIWSEC_dsa: &'static str = "1.3.14.3.2.12"; -pub const szOID_OIWSEC_shaDSA: &'static str = "1.3.14.3.2.13"; -pub const szOID_OIWSEC_mdc2RSA: &'static str = "1.3.14.3.2.14"; -pub const szOID_OIWSEC_shaRSA: &'static str = "1.3.14.3.2.15"; -pub const szOID_OIWSEC_dhCommMod: &'static str = "1.3.14.3.2.16"; -pub const szOID_OIWSEC_desEDE: &'static str = "1.3.14.3.2.17"; -pub const szOID_OIWSEC_sha: &'static str = "1.3.14.3.2.18"; -pub const szOID_OIWSEC_mdc2: &'static str = "1.3.14.3.2.19"; -pub const szOID_OIWSEC_dsaComm: &'static str = "1.3.14.3.2.20"; -pub const szOID_OIWSEC_dsaCommSHA: &'static str = "1.3.14.3.2.21"; -pub const szOID_OIWSEC_rsaXchg: &'static str = "1.3.14.3.2.22"; -pub const szOID_OIWSEC_keyHashSeal: &'static str = "1.3.14.3.2.23"; -pub const szOID_OIWSEC_md2RSASign: &'static str = "1.3.14.3.2.24"; -pub const szOID_OIWSEC_md5RSASign: &'static str = "1.3.14.3.2.25"; -pub const szOID_OIWSEC_sha1: &'static str = "1.3.14.3.2.26"; -pub const szOID_OIWSEC_dsaSHA1: &'static str = "1.3.14.3.2.27"; -pub const szOID_OIWSEC_dsaCommSHA1: &'static str = "1.3.14.3.2.28"; -pub const szOID_OIWSEC_sha1RSASign: &'static str = "1.3.14.3.2.29"; -pub const szOID_OIWDIR: &'static str = "1.3.14.7.2"; -pub const szOID_OIWDIR_CRPT: &'static str = "1.3.14.7.2.1"; -pub const szOID_OIWDIR_HASH: &'static str = "1.3.14.7.2.2"; -pub const szOID_OIWDIR_SIGN: &'static str = "1.3.14.7.2.3"; -pub const szOID_OIWDIR_md2: &'static str = "1.3.14.7.2.2.1"; -pub const szOID_OIWDIR_md2RSA: &'static str = "1.3.14.7.2.3.1"; -pub const szOID_INFOSEC: &'static str = "2.16.840.1.101.2.1"; -pub const szOID_INFOSEC_sdnsSignature: &'static str = "2.16.840.1.101.2.1.1.1"; -pub const szOID_INFOSEC_mosaicSignature: &'static str = "2.16.840.1.101.2.1.1.2"; -pub const szOID_INFOSEC_sdnsConfidentiality: &'static str = "2.16.840.1.101.2.1.1.3"; -pub const szOID_INFOSEC_mosaicConfidentiality: &'static str = "2.16.840.1.101.2.1.1.4"; -pub const szOID_INFOSEC_sdnsIntegrity: &'static str = "2.16.840.1.101.2.1.1.5"; -pub const szOID_INFOSEC_mosaicIntegrity: &'static str = "2.16.840.1.101.2.1.1.6"; -pub const szOID_INFOSEC_sdnsTokenProtection: &'static str = "2.16.840.1.101.2.1.1.7"; -pub const szOID_INFOSEC_mosaicTokenProtection: &'static str = "2.16.840.1.101.2.1.1.8"; -pub const szOID_INFOSEC_sdnsKeyManagement: &'static str = "2.16.840.1.101.2.1.1.9"; -pub const szOID_INFOSEC_mosaicKeyManagement: &'static str = "2.16.840.1.101.2.1.1.10"; -pub const szOID_INFOSEC_sdnsKMandSig: &'static str = "2.16.840.1.101.2.1.1.11"; -pub const szOID_INFOSEC_mosaicKMandSig: &'static str = "2.16.840.1.101.2.1.1.12"; -pub const szOID_INFOSEC_SuiteASignature: &'static str = "2.16.840.1.101.2.1.1.13"; -pub const szOID_INFOSEC_SuiteAConfidentiality: &'static str = "2.16.840.1.101.2.1.1.14"; -pub const szOID_INFOSEC_SuiteAIntegrity: &'static str = "2.16.840.1.101.2.1.1.15"; -pub const szOID_INFOSEC_SuiteATokenProtection: &'static str = "2.16.840.1.101.2.1.1.16"; -pub const szOID_INFOSEC_SuiteAKeyManagement: &'static str = "2.16.840.1.101.2.1.1.17"; -pub const szOID_INFOSEC_SuiteAKMandSig: &'static str = "2.16.840.1.101.2.1.1.18"; -pub const szOID_INFOSEC_mosaicUpdatedSig: &'static str = "2.16.840.1.101.2.1.1.19"; -pub const szOID_INFOSEC_mosaicKMandUpdSig: &'static str = "2.16.840.1.101.2.1.1.20"; -pub const szOID_INFOSEC_mosaicUpdatedInteg: &'static str = "2.16.840.1.101.2.1.1.21"; -pub const szOID_NIST_sha256: &'static str = "2.16.840.1.101.3.4.2.1"; -pub const szOID_NIST_sha384: &'static str = "2.16.840.1.101.3.4.2.2"; -pub const szOID_NIST_sha512: &'static str = "2.16.840.1.101.3.4.2.3"; -STRUCT!{struct CRYPT_OBJID_TABLE { - dwAlgId: ::DWORD, - pszObjId: ::LPCSTR, -}} -pub type PCRYPT_OBJID_TABLE = *mut CRYPT_OBJID_TABLE; -STRUCT!{struct CRYPT_HASH_INFO { - HashAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, - Hash: CRYPT_HASH_BLOB, -}} -pub type PCRYPT_HASH_INFO = *mut CRYPT_HASH_INFO; -STRUCT!{struct CERT_EXTENSION { - pszObjId: ::LPSTR, - fCritical: ::BOOL, - Value: CRYPT_OBJID_BLOB, -}} -pub type PCERT_EXTENSION = *mut CERT_EXTENSION; -pub type PCCERT_EXTENSION = *const CERT_EXTENSION; -STRUCT!{struct CRYPT_ATTRIBUTE_TYPE_VALUE { - pszObjId: ::LPSTR, - Value: CRYPT_OBJID_BLOB, -}} -pub type PCRYPT_ATTRIBUTE_TYPE_VALUE = *mut CRYPT_ATTRIBUTE_TYPE_VALUE; -STRUCT!{struct CRYPT_ATTRIBUTE { - pszObjId: ::LPSTR, - cValue: ::DWORD, - rgValue: PCRYPT_ATTR_BLOB, -}} -pub type PCRYPT_ATTRIBUTE = *mut CRYPT_ATTRIBUTE; -STRUCT!{struct CRYPT_ATTRIBUTES { - cAttr: ::DWORD, - rgAttr: PCRYPT_ATTRIBUTE, -}} -pub type PCRYPT_ATTRIBUTES = *mut CRYPT_ATTRIBUTES; -STRUCT!{struct CERT_RDN_ATTR { - pszObjId: ::LPSTR, - dwValueType: ::DWORD, - Value: CERT_RDN_VALUE_BLOB, -}} -pub type PCERT_RDN_ATTR = *mut CERT_RDN_ATTR; -pub const szOID_COMMON_NAME: &'static str = "2.5.4.3"; -pub const szOID_SUR_NAME: &'static str = "2.5.4.4"; -pub const szOID_DEVICE_SERIAL_NUMBER: &'static str = "2.5.4.5"; -pub const szOID_COUNTRY_NAME: &'static str = "2.5.4.6"; -pub const szOID_LOCALITY_NAME: &'static str = "2.5.4.7"; -pub const szOID_STATE_OR_PROVINCE_NAME: &'static str = "2.5.4.8"; -pub const szOID_STREET_ADDRESS: &'static str = "2.5.4.9"; -pub const szOID_ORGANIZATION_NAME: &'static str = "2.5.4.10"; -pub const szOID_ORGANIZATIONAL_UNIT_NAME: &'static str = "2.5.4.11"; -pub const szOID_TITLE: &'static str = "2.5.4.12"; -pub const szOID_DESCRIPTION: &'static str = "2.5.4.13"; -pub const szOID_SEARCH_GUIDE: &'static str = "2.5.4.14"; -pub const szOID_BUSINESS_CATEGORY: &'static str = "2.5.4.15"; -pub const szOID_POSTAL_ADDRESS: &'static str = "2.5.4.16"; -pub const szOID_POSTAL_CODE: &'static str = "2.5.4.17"; -pub const szOID_POST_OFFICE_BOX: &'static str = "2.5.4.18"; -pub const szOID_PHYSICAL_DELIVERY_OFFICE_NAME: &'static str = "2.5.4.19"; -pub const szOID_TELEPHONE_NUMBER: &'static str = "2.5.4.20"; -pub const szOID_TELEX_NUMBER: &'static str = "2.5.4.21"; -pub const szOID_TELETEXT_TERMINAL_IDENTIFIER: &'static str = "2.5.4.22"; -pub const szOID_FACSIMILE_TELEPHONE_NUMBER: &'static str = "2.5.4.23"; -pub const szOID_X21_ADDRESS: &'static str = "2.5.4.24"; -pub const szOID_INTERNATIONAL_ISDN_NUMBER: &'static str = "2.5.4.25"; -pub const szOID_REGISTERED_ADDRESS: &'static str = "2.5.4.26"; -pub const szOID_DESTINATION_INDICATOR: &'static str = "2.5.4.27"; -pub const szOID_PREFERRED_DELIVERY_METHOD: &'static str = "2.5.4.28"; -pub const szOID_PRESENTATION_ADDRESS: &'static str = "2.5.4.29"; -pub const szOID_SUPPORTED_APPLICATION_CONTEXT: &'static str = "2.5.4.30"; -pub const szOID_MEMBER: &'static str = "2.5.4.31"; -pub const szOID_OWNER: &'static str = "2.5.4.32"; -pub const szOID_ROLE_OCCUPANT: &'static str = "2.5.4.33"; -pub const szOID_SEE_ALSO: &'static str = "2.5.4.34"; -pub const szOID_USER_PASSWORD: &'static str = "2.5.4.35"; -pub const szOID_USER_CERTIFICATE: &'static str = "2.5.4.36"; -pub const szOID_CA_CERTIFICATE: &'static str = "2.5.4.37"; -pub const szOID_AUTHORITY_REVOCATION_LIST: &'static str = "2.5.4.38"; -pub const szOID_CERTIFICATE_REVOCATION_LIST: &'static str = "2.5.4.39"; -pub const szOID_CROSS_CERTIFICATE_PAIR: &'static str = "2.5.4.40"; -pub const szOID_GIVEN_NAME: &'static str = "2.5.4.42"; -pub const szOID_INITIALS: &'static str = "2.5.4.43"; -pub const szOID_DN_QUALIFIER: &'static str = "2.5.4.46"; -pub const szOID_DOMAIN_COMPONENT: &'static str = "0.9.2342.19200300.100.1.25"; -pub const szOID_PKCS_12_FRIENDLY_NAME_ATTR: &'static str = "1.2.840.113549.1.9.20"; -pub const szOID_PKCS_12_LOCAL_KEY_ID: &'static str = "1.2.840.113549.1.9.21"; -pub const szOID_PKCS_12_KEY_PROVIDER_NAME_ATTR: &'static str = "1.3.6.1.4.1.311.17.1"; -pub const szOID_LOCAL_MACHINE_KEYSET: &'static str = "1.3.6.1.4.1.311.17.2"; -pub const szOID_PKCS_12_EXTENDED_ATTRIBUTES: &'static str = "1.3.6.1.4.1.311.17.3"; -pub const szOID_PKCS_12_PROTECTED_PASSWORD_SECRET_BAG_TYPE_ID: &'static str = - "1.3.6.1.4.1.311.17.4"; -pub const szOID_KEYID_RDN: &'static str = "1.3.6.1.4.1.311.10.7.1"; -pub const szOID_EV_RDN_LOCALE: &'static str = "1.3.6.1.4.1.311.60.2.1.1"; -pub const szOID_EV_RDN_STATE_OR_PROVINCE: &'static str = "1.3.6.1.4.1.311.60.2.1.2"; -pub const szOID_EV_RDN_COUNTRY: &'static str = "1.3.6.1.4.1.311.60.2.1.3"; -pub const CERT_RDN_ANY_TYPE: ::DWORD = 0; -pub const CERT_RDN_ENCODED_BLOB: ::DWORD = 1; -pub const CERT_RDN_OCTET_STRING: ::DWORD = 2; -pub const CERT_RDN_NUMERIC_STRING: ::DWORD = 3; -pub const CERT_RDN_PRINTABLE_STRING: ::DWORD = 4; -pub const CERT_RDN_TELETEX_STRING: ::DWORD = 5; -pub const CERT_RDN_T61_STRING: ::DWORD = 5; -pub const CERT_RDN_VIDEOTEX_STRING: ::DWORD = 6; -pub const CERT_RDN_IA5_STRING: ::DWORD = 7; -pub const CERT_RDN_GRAPHIC_STRING: ::DWORD = 8; -pub const CERT_RDN_VISIBLE_STRING: ::DWORD = 9; -pub const CERT_RDN_ISO646_STRING: ::DWORD = 9; -pub const CERT_RDN_GENERAL_STRING: ::DWORD = 10; -pub const CERT_RDN_UNIVERSAL_STRING: ::DWORD = 11; -pub const CERT_RDN_INT4_STRING: ::DWORD = 11; -pub const CERT_RDN_BMP_STRING: ::DWORD = 12; -pub const CERT_RDN_UNICODE_STRING: ::DWORD = 12; -pub const CERT_RDN_UTF8_STRING: ::DWORD = 13; -pub const CERT_RDN_TYPE_MASK: ::DWORD = 0x000000FF; -pub const CERT_RDN_FLAGS_MASK: ::DWORD = 0xFF000000; -pub const CERT_RDN_ENABLE_T61_UNICODE_FLAG: ::DWORD = 0x80000000; -pub const CERT_RDN_ENABLE_UTF8_UNICODE_FLAG: ::DWORD = 0x20000000; -pub const CERT_RDN_FORCE_UTF8_UNICODE_FLAG: ::DWORD = 0x10000000; -pub const CERT_RDN_DISABLE_CHECK_TYPE_FLAG: ::DWORD = 0x40000000; -pub const CERT_RDN_DISABLE_IE4_UTF8_FLAG: ::DWORD = 0x01000000; -pub const CERT_RDN_ENABLE_PUNYCODE_FLAG: ::DWORD = 0x02000000; -STRUCT!{struct CERT_RDN { - cRDNAttr: ::DWORD, - rgRDNAttr: PCERT_RDN_ATTR, -}} -pub type PCERT_RDN = *mut CERT_RDN; -STRUCT!{struct CERT_NAME_INFO { - cRDN: ::DWORD, - rgRDN: PCERT_RDN, -}} -pub type PCERT_NAME_INFO = *mut CERT_NAME_INFO; -STRUCT!{struct CERT_NAME_VALUE { - dwValueType: ::DWORD, - Value: CERT_RDN_VALUE_BLOB, -}} -pub type PCERT_NAME_VALUE = *mut CERT_NAME_VALUE; -STRUCT!{struct CERT_PUBLIC_KEY_INFO { - Algorithm: CRYPT_ALGORITHM_IDENTIFIER, - PublicKey: CRYPT_BIT_BLOB, -}} -pub type PCERT_PUBLIC_KEY_INFO = *mut CERT_PUBLIC_KEY_INFO; -pub const CERT_RSA_PUBLIC_KEY_OBJID: &'static str = szOID_RSA_RSA; -pub const CERT_DEFAULT_OID_PUBLIC_KEY_SIGN: &'static str = szOID_RSA_RSA; -pub const CERT_DEFAULT_OID_PUBLIC_KEY_XCHG: &'static str = szOID_RSA_RSA; -STRUCT!{struct CRYPT_ECC_PRIVATE_KEY_INFO { - dwVersion: ::DWORD, - PrivateKey: CRYPT_DER_BLOB, - szCurveOid: ::LPSTR, - PublicKey: CRYPT_BIT_BLOB, -}} -pub type PCRYPT_ECC_PRIVATE_KEY_INFO = *mut CRYPT_ECC_PRIVATE_KEY_INFO; -pub const CRYPT_ECC_PRIVATE_KEY_INFO_v1: ::DWORD = 1; -STRUCT!{struct CRYPT_PRIVATE_KEY_INFO { - Version: ::DWORD, - Algorithm: CRYPT_ALGORITHM_IDENTIFIER, - PrivateKey: CRYPT_DER_BLOB, - pAttributes: PCRYPT_ATTRIBUTES, -}} -pub type PCRYPT_PRIVATE_KEY_INFO = *mut CRYPT_PRIVATE_KEY_INFO; -STRUCT!{struct CRYPT_ENCRYPTED_PRIVATE_KEY_INFO { - EncryptionAlgorithm: ::CRYPT_ALGORITHM_IDENTIFIER, - EncryptedPrivateKey: ::CRYPT_DATA_BLOB, -}} -pub type PCRYPT_ENCRYPTED_PRIVATE_KEY_INFO = *mut CRYPT_ENCRYPTED_PRIVATE_KEY_INFO; -pub type PCRYPT_DECRYPT_PRIVATE_KEY_FUNC = Option<unsafe extern "system" fn( - Algorithm: CRYPT_ALGORITHM_IDENTIFIER, EncryptedPrivateKey: CRYPT_DATA_BLOB, - pbClearTextKey: *mut ::BYTE, pcbClearTextKey: *mut ::DWORD, pVoidDecryptFunc: ::LPVOID, -) -> ::BOOL>; -pub type PCRYPT_ENCRYPT_PRIVATE_KEY_FUNC = Option<unsafe extern "system" fn( - Algorithm: *mut CRYPT_ALGORITHM_IDENTIFIER, pClearTextPrivateKey: *mut CRYPT_DATA_BLOB, - pbEncryptedKey: *mut ::BYTE, pcbEncryptedKey: *mut ::DWORD, pVoidEncryptFunc: ::LPVOID, -) -> ::BOOL>; -pub type PCRYPT_RESOLVE_HCRYPTPROV_FUNC = Option<unsafe extern "system" fn( - pPrivateKeyInfo: *mut CRYPT_PRIVATE_KEY_INFO, phCryptProv: *mut HCRYPTPROV, - pVoidResolveFunc: ::LPVOID, -) -> ::BOOL>; -#[repr(C)] #[derive(Copy)] -pub struct CRYPT_PKCS8_IMPORT_PARAMS { - pub PrivateKey: CRYPT_DIGEST_BLOB, - pub pResolvehCryptProvFunc: PCRYPT_RESOLVE_HCRYPTPROV_FUNC, - pub pVoidResolveFunc: ::LPVOID, - pub pDecryptPrivateKeyFunc: PCRYPT_DECRYPT_PRIVATE_KEY_FUNC, - pub pVoidDecryptFunc: ::LPVOID, -} -impl Clone for CRYPT_PKCS8_IMPORT_PARAMS { fn clone(&self) -> CRYPT_PKCS8_IMPORT_PARAMS { *self } } -pub type PCRYPT_PKCS8_IMPORT_PARAMS = *mut CRYPT_PKCS8_IMPORT_PARAMS; -pub type CRYPT_PRIVATE_KEY_BLOB_AND_PARAMS = CRYPT_PKCS8_IMPORT_PARAMS; -pub type PPCRYPT_PRIVATE_KEY_BLOB_AND_PARAMS = *mut CRYPT_PKCS8_IMPORT_PARAMS; -#[repr(C)] #[derive(Copy)] -pub struct CRYPT_PKCS8_EXPORT_PARAMS { - pub hCryptProv: HCRYPTPROV, - pub dwKeySpec: ::DWORD, - pub pszPrivateKeyObjId: ::LPSTR, - pub pEncryptPrivateKeyFunc: PCRYPT_ENCRYPT_PRIVATE_KEY_FUNC, - pub pVoidEncryptFunc: ::LPVOID, -} -impl Clone for CRYPT_PKCS8_EXPORT_PARAMS { fn clone(&self) -> CRYPT_PKCS8_EXPORT_PARAMS { *self } } -pub type PCRYPT_PKCS8_EXPORT_PARAMS = *mut CRYPT_PKCS8_EXPORT_PARAMS; -STRUCT!{struct CERT_INFO { - dwVersion: ::DWORD, - SerialNumber: CRYPT_INTEGER_BLOB, - SignatureAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, - Issuer: CERT_NAME_BLOB, - NotBefore: ::FILETIME, - NotAfter: ::FILETIME, - Subject: CERT_NAME_BLOB, - SubjectPublicKeyInfo: CERT_PUBLIC_KEY_INFO, - IssuerUniqueId: CRYPT_BIT_BLOB, - SubjectUniqueId: CRYPT_BIT_BLOB, - cExtension: ::DWORD, - rgExtension: PCERT_EXTENSION, -}} -pub type PCERT_INFO = *mut CERT_INFO; -pub const CERT_V1: ::DWORD = 0; -pub const CERT_V2: ::DWORD = 1; -pub const CERT_V3: ::DWORD = 2; -pub const CERT_INFO_VERSION_FLAG: ::DWORD = 1; -pub const CERT_INFO_SERIAL_NUMBER_FLAG: ::DWORD = 2; -pub const CERT_INFO_SIGNATURE_ALGORITHM_FLAG: ::DWORD = 3; -pub const CERT_INFO_ISSUER_FLAG: ::DWORD = 4; -pub const CERT_INFO_NOT_BEFORE_FLAG: ::DWORD = 5; -pub const CERT_INFO_NOT_AFTER_FLAG: ::DWORD = 6; -pub const CERT_INFO_SUBJECT_FLAG: ::DWORD = 7; -pub const CERT_INFO_SUBJECT_PUBLIC_KEY_INFO_FLAG: ::DWORD = 8; -pub const CERT_INFO_ISSUER_UNIQUE_ID_FLAG: ::DWORD = 9; -pub const CERT_INFO_SUBJECT_UNIQUE_ID_FLAG: ::DWORD = 10; -pub const CERT_INFO_EXTENSION_FLAG: ::DWORD = 11; -STRUCT!{struct CRL_ENTRY { - SerialNumber: CRYPT_INTEGER_BLOB, - RevocationDate: ::FILETIME, - cExtension: ::DWORD, - rgExtension: PCERT_EXTENSION, -}} -pub type PCRL_ENTRY = *mut CRL_ENTRY; -STRUCT!{struct CRL_INFO { - dwVersion: ::DWORD, - SignatureAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, - Issuer: CERT_NAME_BLOB, - ThisUpdate: ::FILETIME, - NextUpdate: ::FILETIME, - cCRLEntry: ::DWORD, - rgCRLEntry: PCRL_ENTRY, - cExtension: ::DWORD, - rgExtension: PCERT_EXTENSION, -}} -pub type PCRL_INFO = *mut CRL_INFO; -pub const CRL_V1: ::DWORD = 0; -pub const CRL_V2: ::DWORD = 1; -pub const CERT_BUNDLE_CERTIFICATE: ::DWORD = 0; -pub const CERT_BUNDLE_CRL: ::DWORD = 1; -STRUCT!{struct CERT_OR_CRL_BLOB { - dwChoice: ::DWORD, - cbEncoded: ::DWORD, - pbEncoded: *mut ::BYTE, -}} -pub type PCERT_OR_CRL_BLOB = *mut CERT_OR_CRL_BLOB; -STRUCT!{struct CERT_OR_CRL_BUNDLE { - cItem: ::DWORD, - rgItem: PCERT_OR_CRL_BLOB, -}} -pub type PCERT_OR_CRL_BUNDLE = *mut CERT_OR_CRL_BUNDLE; -STRUCT!{struct CERT_REQUEST_INFO { - dwVersion: ::DWORD, - Subject: CERT_NAME_BLOB, - SubjectPublicKeyInfo: CERT_PUBLIC_KEY_INFO, - cAttribute: ::DWORD, - rgAttribute: PCRYPT_ATTRIBUTE, -}} -pub type PCERT_REQUEST_INFO = *mut CERT_REQUEST_INFO; -pub const CERT_REQUEST_V1: ::DWORD = 0; -STRUCT!{struct CERT_KEYGEN_REQUEST_INFO { - dwVersion: ::DWORD, - SubjectPublicKeyInfo: CERT_PUBLIC_KEY_INFO, - pwszChallengeString: ::LPWSTR, -}} -pub type PCERT_KEYGEN_REQUEST_INFO = *mut CERT_KEYGEN_REQUEST_INFO; -pub const CERT_KEYGEN_REQUEST_V1: ::DWORD = 0; -STRUCT!{struct CERT_SIGNED_CONTENT_INFO { - ToBeSigned: CRYPT_DER_BLOB, - SignatureAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, - Signature: CRYPT_BIT_BLOB, -}} -pub type PCERT_SIGNED_CONTENT_INFO = *mut CERT_SIGNED_CONTENT_INFO; -STRUCT!{struct CTL_USAGE { - cUsageIdentifier: ::DWORD, - rgpszUsageIdentifier: *mut ::LPSTR, -}} -pub type PCTL_USAGE = *mut CTL_USAGE; -pub type CERT_ENHKEY_USAGE = CTL_USAGE; -pub type PCERT_ENHKEY_USAGE = *mut CERT_ENHKEY_USAGE; -pub type PCCTL_USAGE = *const CTL_USAGE; -pub type PCCERT_ENHKEY_USAGE = *const CERT_ENHKEY_USAGE; -STRUCT!{struct CTL_ENTRY { - SubjectIdentifier: CRYPT_DATA_BLOB, - cAttribute: ::DWORD, - rgAttribute: PCRYPT_ATTRIBUTE, -}} -pub type PCTL_ENTRY = *mut CTL_ENTRY; -STRUCT!{struct CTL_INFO { - dwVersion: ::DWORD, - SubjectUsage: CTL_USAGE, - ListIdentifier: CRYPT_DATA_BLOB, - SequenceNumber: CRYPT_INTEGER_BLOB, - ThisUpdate: ::FILETIME, - NextUpdate: ::FILETIME, - SubjectAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, - cCTLEntry: ::DWORD, - rgCTLEntry: PCTL_ENTRY, - cExtension: ::DWORD, - rgExtension: PCERT_EXTENSION, -}} -pub type PCTL_INFO = *mut CTL_INFO; -pub const CTL_V1: ::DWORD = 0; -STRUCT!{struct CRYPT_TIME_STAMP_REQUEST_INFO { - pszTimeStampAlgorithm: ::LPSTR, - pszContentType: ::LPSTR, - Content: CRYPT_OBJID_BLOB, - cAttribute: ::DWORD, - rgAttribute: PCRYPT_ATTRIBUTE, -}} -pub type PCRYPT_TIME_STAMP_REQUEST_INFO = *mut CRYPT_TIME_STAMP_REQUEST_INFO; -STRUCT!{struct CRYPT_ENROLLMENT_NAME_VALUE_PAIR { - pwszName: ::LPWSTR, - pwszValue: ::LPWSTR, -}} -pub type PCRYPT_ENROLLMENT_NAME_VALUE_PAIR = *mut CRYPT_ENROLLMENT_NAME_VALUE_PAIR; -STRUCT!{struct CRYPT_CSP_PROVIDER { - dwKeySpec: ::DWORD, - pwszProviderName: ::LPWSTR, - Signature: CRYPT_BIT_BLOB, -}} -pub type PCRYPT_CSP_PROVIDER = *mut CRYPT_CSP_PROVIDER; -pub const CERT_ENCODING_TYPE_MASK: ::DWORD = 0x0000FFFF; -pub const CMSG_ENCODING_TYPE_MASK: ::DWORD = 0xFFFF0000; -pub const CRYPT_ASN_ENCODING: ::DWORD = 0x00000001; -pub const CRYPT_NDR_ENCODING: ::DWORD = 0x00000002; -pub const X509_ASN_ENCODING: ::DWORD = 0x00000001; -pub const X509_NDR_ENCODING: ::DWORD = 0x00000002; -pub const PKCS_7_ASN_ENCODING: ::DWORD = 0x00010000; -pub const PKCS_7_NDR_ENCODING: ::DWORD = 0x00020000; -pub const CRYPT_FORMAT_STR_MULTI_LINE: ::DWORD = 0x0001; -pub const CRYPT_FORMAT_STR_NO_HEX: ::DWORD = 0x0010; -pub const CRYPT_FORMAT_SIMPLE: ::DWORD = 0x0001; -pub const CRYPT_FORMAT_X509: ::DWORD = 0x0002; -pub const CRYPT_FORMAT_OID: ::DWORD = 0x0004; -pub const CRYPT_FORMAT_RDN_SEMICOLON: ::DWORD = 0x0100; -pub const CRYPT_FORMAT_RDN_CRLF: ::DWORD = 0x0200; -pub const CRYPT_FORMAT_RDN_UNQUOTE: ::DWORD = 0x0400; -pub const CRYPT_FORMAT_RDN_REVERSE: ::DWORD = 0x0800; -pub const CRYPT_FORMAT_COMMA: ::DWORD = 0x1000; -pub const CRYPT_FORMAT_SEMICOLON: ::DWORD = CRYPT_FORMAT_RDN_SEMICOLON; -pub const CRYPT_FORMAT_CRLF: ::DWORD = CRYPT_FORMAT_RDN_CRLF; -pub type PFN_CRYPT_ALLOC = Option<unsafe extern "system" fn(cbSize: ::size_t)>; -pub type PFN_CRYPT_FREE = Option<unsafe extern "system" fn(pv: ::LPVOID)>; -#[repr(C)] #[derive(Copy)] -pub struct CRYPT_ENCODE_PARA { - pub cbSize: ::DWORD, - pub pfnAlloc: PFN_CRYPT_ALLOC, - pub pfnFree: PFN_CRYPT_FREE, -} -impl Clone for CRYPT_ENCODE_PARA { fn clone(&self) -> CRYPT_ENCODE_PARA { *self } } -pub type PCRYPT_ENCODE_PARA = *mut CRYPT_ENCODE_PARA; -pub const CRYPT_ENCODE_NO_SIGNATURE_BYTE_REVERSAL_FLAG: ::DWORD = 0x8; -pub const CRYPT_ENCODE_ALLOC_FLAG: ::DWORD = 0x8000; -pub const CRYPT_UNICODE_NAME_ENCODE_ENABLE_T61_UNICODE_FLAG: ::DWORD = - CERT_RDN_ENABLE_T61_UNICODE_FLAG; -pub const CRYPT_UNICODE_NAME_ENCODE_ENABLE_UTF8_UNICODE_FLAG: ::DWORD = - CERT_RDN_ENABLE_UTF8_UNICODE_FLAG; -pub const CRYPT_UNICODE_NAME_ENCODE_FORCE_UTF8_UNICODE_FLAG: ::DWORD = - CERT_RDN_FORCE_UTF8_UNICODE_FLAG; -pub const CRYPT_UNICODE_NAME_ENCODE_DISABLE_CHECK_TYPE_FLAG: ::DWORD = - CERT_RDN_DISABLE_CHECK_TYPE_FLAG; -pub const CRYPT_SORTED_CTL_ENCODE_HASHED_SUBJECT_IDENTIFIER_FLAG: ::DWORD = 0x10000; -pub const CRYPT_ENCODE_ENABLE_PUNYCODE_FLAG: ::DWORD = 0x20000; -pub const CRYPT_ENCODE_ENABLE_UTF8PERCENT_FLAG: ::DWORD = 0x40000; -pub const CRYPT_ENCODE_ENABLE_IA5CONVERSION_FLAG: ::DWORD = CRYPT_ENCODE_ENABLE_PUNYCODE_FLAG - | CRYPT_ENCODE_ENABLE_UTF8PERCENT_FLAG; -#[repr(C)] #[derive(Copy)] -pub struct CRYPT_DECODE_PARA { - pub cbSize: ::DWORD, - pub pfnAlloc: PFN_CRYPT_ALLOC, - pub pfnFree: PFN_CRYPT_FREE, -} -impl Clone for CRYPT_DECODE_PARA { fn clone(&self) -> CRYPT_DECODE_PARA { *self } } -pub type PCRYPT_DECODE_PARA = *mut CRYPT_DECODE_PARA; -pub const CRYPT_DECODE_NOCOPY_FLAG: ::DWORD = 0x1; -pub const CRYPT_DECODE_TO_BE_SIGNED_FLAG: ::DWORD = 0x2; -pub const CRYPT_DECODE_SHARE_OID_STRING_FLAG: ::DWORD = 0x4; -pub const CRYPT_DECODE_NO_SIGNATURE_BYTE_REVERSAL_FLAG: ::DWORD = 0x8; -pub const CRYPT_DECODE_ALLOC_FLAG: ::DWORD = 0x8000; -pub const CRYPT_UNICODE_NAME_DECODE_DISABLE_IE4_UTF8_FLAG: ::DWORD = - CERT_RDN_DISABLE_IE4_UTF8_FLAG; -pub const CRYPT_DECODE_ENABLE_PUNYCODE_FLAG: ::DWORD = 0x02000000; -pub const CRYPT_DECODE_ENABLE_UTF8PERCENT_FLAG: ::DWORD = 0x04000000; -pub const CRYPT_DECODE_ENABLE_IA5CONVERSION_FLAG: ::DWORD = CRYPT_DECODE_ENABLE_PUNYCODE_FLAG - | CRYPT_DECODE_ENABLE_UTF8PERCENT_FLAG; -pub const CRYPT_ENCODE_DECODE_NONE: ::LPCSTR = 0 as ::LPCSTR; -pub const X509_CERT: ::LPCSTR = 1 as ::LPCSTR; -pub const X509_CERT_TO_BE_SIGNED: ::LPCSTR = 2 as ::LPCSTR; -pub const X509_CERT_CRL_TO_BE_SIGNED: ::LPCSTR = 3 as ::LPCSTR; -pub const X509_CERT_REQUEST_TO_BE_SIGNED: ::LPCSTR = 4 as ::LPCSTR; -pub const X509_EXTENSIONS: ::LPCSTR = 5 as ::LPCSTR; -pub const X509_NAME_VALUE: ::LPCSTR = 6 as ::LPCSTR; -pub const X509_NAME: ::LPCSTR = 7 as ::LPCSTR; -pub const X509_PUBLIC_KEY_INFO: ::LPCSTR = 8 as ::LPCSTR; -pub const X509_AUTHORITY_KEY_ID: ::LPCSTR = 9 as ::LPCSTR; -pub const X509_KEY_ATTRIBUTES: ::LPCSTR = 10 as ::LPCSTR; -pub const X509_KEY_USAGE_RESTRICTION: ::LPCSTR = 11 as ::LPCSTR; -pub const X509_ALTERNATE_NAME: ::LPCSTR = 12 as ::LPCSTR; -pub const X509_BASIC_CONSTRAINTS: ::LPCSTR = 13 as ::LPCSTR; -pub const X509_KEY_USAGE: ::LPCSTR = 14 as ::LPCSTR; -pub const X509_BASIC_CONSTRAINTS2: ::LPCSTR = 15 as ::LPCSTR; -pub const X509_CERT_POLICIES: ::LPCSTR = 16 as ::LPCSTR; -pub const PKCS_UTC_TIME: ::LPCSTR = 17 as ::LPCSTR; -pub const PKCS_TIME_REQUEST: ::LPCSTR = 18 as ::LPCSTR; -pub const RSA_CSP_PUBLICKEYBLOB: ::LPCSTR = 19 as ::LPCSTR; -pub const X509_UNICODE_NAME: ::LPCSTR = 20 as ::LPCSTR; -pub const X509_KEYGEN_REQUEST_TO_BE_SIGNED: ::LPCSTR = 21 as ::LPCSTR; -pub const PKCS_ATTRIBUTE: ::LPCSTR = 22 as ::LPCSTR; -pub const PKCS_CONTENT_INFO_SEQUENCE_OF_ANY: ::LPCSTR = 23 as ::LPCSTR; -pub const X509_UNICODE_NAME_VALUE: ::LPCSTR = 24 as ::LPCSTR; -pub const X509_ANY_STRING: ::LPCSTR = X509_NAME_VALUE; -pub const X509_UNICODE_ANY_STRING: ::LPCSTR = X509_UNICODE_NAME_VALUE; -pub const X509_OCTET_STRING: ::LPCSTR = 25 as ::LPCSTR; -pub const X509_BITS: ::LPCSTR = 26 as ::LPCSTR; -pub const X509_INTEGER: ::LPCSTR = 27 as ::LPCSTR; -pub const X509_MULTI_BYTE_INTEGER: ::LPCSTR = 28 as ::LPCSTR; -pub const X509_ENUMERATED: ::LPCSTR = 29 as ::LPCSTR; -pub const X509_CHOICE_OF_TIME: ::LPCSTR = 30 as ::LPCSTR; -pub const X509_AUTHORITY_KEY_ID2: ::LPCSTR = 31 as ::LPCSTR; -pub const X509_AUTHORITY_INFO_ACCESS: ::LPCSTR = 32 as ::LPCSTR; -pub const X509_SUBJECT_INFO_ACCESS: ::LPCSTR = X509_AUTHORITY_INFO_ACCESS; -pub const X509_CRL_REASON_CODE: ::LPCSTR = X509_ENUMERATED; -pub const PKCS_CONTENT_INFO: ::LPCSTR = 33 as ::LPCSTR; -pub const X509_SEQUENCE_OF_ANY: ::LPCSTR = 34 as ::LPCSTR; -pub const X509_CRL_DIST_POINTS: ::LPCSTR = 35 as ::LPCSTR; -pub const X509_ENHANCED_KEY_USAGE: ::LPCSTR = 36 as ::LPCSTR; -pub const PKCS_CTL: ::LPCSTR = 37 as ::LPCSTR; -pub const X509_MULTI_BYTE_UINT: ::LPCSTR = 38 as ::LPCSTR; -pub const X509_DSS_PUBLICKEY: ::LPCSTR = X509_MULTI_BYTE_UINT; -pub const X509_DSS_PARAMETERS: ::LPCSTR = 39 as ::LPCSTR; -pub const X509_DSS_SIGNATURE: ::LPCSTR = 40 as ::LPCSTR; -pub const PKCS_RC2_CBC_PARAMETERS: ::LPCSTR = 41 as ::LPCSTR; -pub const PKCS_SMIME_CAPABILITIES: ::LPCSTR = 42 as ::LPCSTR; -pub const X509_QC_STATEMENTS_EXT: ::LPCSTR = 42 as ::LPCSTR; -pub const PKCS_RSA_PRIVATE_KEY: ::LPCSTR = 43 as ::LPCSTR; -pub const PKCS_PRIVATE_KEY_INFO: ::LPCSTR = 44 as ::LPCSTR; -pub const PKCS_ENCRYPTED_PRIVATE_KEY_INFO: ::LPCSTR = 45 as ::LPCSTR; -pub const X509_PKIX_POLICY_QUALIFIER_USERNOTICE: ::LPCSTR = 46 as ::LPCSTR; -pub const X509_DH_PUBLICKEY: ::LPCSTR = X509_MULTI_BYTE_UINT; -pub const X509_DH_PARAMETERS: ::LPCSTR = 47 as ::LPCSTR; -pub const PKCS_ATTRIBUTES: ::LPCSTR = 48 as ::LPCSTR; -pub const PKCS_SORTED_CTL: ::LPCSTR = 49 as ::LPCSTR; -pub const X509_ECC_SIGNATURE: ::LPCSTR = 47 as ::LPCSTR; -pub const X942_DH_PARAMETERS: ::LPCSTR = 50 as ::LPCSTR; -pub const X509_BITS_WITHOUT_TRAILING_ZEROES: ::LPCSTR = 51 as ::LPCSTR; -pub const X942_OTHER_INFO: ::LPCSTR = 52 as ::LPCSTR; -pub const X509_CERT_PAIR: ::LPCSTR = 53 as ::LPCSTR; -pub const X509_ISSUING_DIST_POINT: ::LPCSTR = 54 as ::LPCSTR; -pub const X509_NAME_CONSTRAINTS: ::LPCSTR = 55 as ::LPCSTR; -pub const X509_POLICY_MAPPINGS: ::LPCSTR = 56 as ::LPCSTR; -pub const X509_POLICY_CONSTRAINTS: ::LPCSTR = 57 as ::LPCSTR; -pub const X509_CROSS_CERT_DIST_POINTS: ::LPCSTR = 58 as ::LPCSTR; -pub const CMC_DATA: ::LPCSTR = 59 as ::LPCSTR; -pub const CMC_RESPONSE: ::LPCSTR = 60 as ::LPCSTR; -pub const CMC_STATUS: ::LPCSTR = 61 as ::LPCSTR; -pub const CMC_ADD_EXTENSIONS: ::LPCSTR = 62 as ::LPCSTR; -pub const CMC_ADD_ATTRIBUTES: ::LPCSTR = 63 as ::LPCSTR; -pub const X509_CERTIFICATE_TEMPLATE: ::LPCSTR = 64 as ::LPCSTR; -pub const OCSP_SIGNED_REQUEST: ::LPCSTR = 65 as ::LPCSTR; -pub const OCSP_REQUEST: ::LPCSTR = 66 as ::LPCSTR; -pub const OCSP_RESPONSE: ::LPCSTR = 67 as ::LPCSTR; -pub const OCSP_BASIC_SIGNED_RESPONSE: ::LPCSTR = 68 as ::LPCSTR; -pub const OCSP_BASIC_RESPONSE: ::LPCSTR = 69 as ::LPCSTR; -pub const X509_LOGOTYPE_EXT: ::LPCSTR = 70 as ::LPCSTR; -pub const X509_BIOMETRIC_EXT: ::LPCSTR = 71 as ::LPCSTR; -pub const CNG_RSA_PUBLIC_KEY_BLOB: ::LPCSTR = 72 as ::LPCSTR; -pub const X509_OBJECT_IDENTIFIER: ::LPCSTR = 73 as ::LPCSTR; -pub const X509_ALGORITHM_IDENTIFIER: ::LPCSTR = 74 as ::LPCSTR; -pub const PKCS_RSA_SSA_PSS_PARAMETERS: ::LPCSTR = 75 as ::LPCSTR; -pub const PKCS_RSAES_OAEP_PARAMETERS: ::LPCSTR = 76 as ::LPCSTR; -pub const ECC_CMS_SHARED_INFO: ::LPCSTR = 77 as ::LPCSTR; -pub const TIMESTAMP_REQUEST: ::LPCSTR = 78 as ::LPCSTR; -pub const TIMESTAMP_RESPONSE: ::LPCSTR = 79 as ::LPCSTR; -pub const TIMESTAMP_INFO: ::LPCSTR = 80 as ::LPCSTR; -pub const X509_CERT_BUNDLE: ::LPCSTR = 81 as ::LPCSTR; -pub const X509_ECC_PRIVATE_KEY: ::LPCSTR = 82 as ::LPCSTR; -pub const CNG_RSA_PRIVATE_KEY_BLOB: ::LPCSTR = 83 as ::LPCSTR; -pub const X509_SUBJECT_DIR_ATTRS: ::LPCSTR = 84 as ::LPCSTR; -pub const PKCS7_SIGNER_INFO: ::LPCSTR = 500 as ::LPCSTR; -pub const CMS_SIGNER_INFO: ::LPCSTR = 501 as ::LPCSTR; -pub const szOID_AUTHORITY_KEY_IDENTIFIER: &'static str = "2.5.29.1"; -pub const szOID_KEY_ATTRIBUTES: &'static str = "2.5.29.2"; -pub const szOID_CERT_POLICIES_95: &'static str = "2.5.29.3"; -pub const szOID_KEY_USAGE_RESTRICTION: &'static str = "2.5.29.4"; -pub const szOID_SUBJECT_ALT_NAME: &'static str = "2.5.29.7"; -pub const szOID_ISSUER_ALT_NAME: &'static str = "2.5.29.8"; -pub const szOID_BASIC_CONSTRAINTS: &'static str = "2.5.29.10"; -pub const szOID_KEY_USAGE: &'static str = "2.5.29.15"; -pub const szOID_PRIVATEKEY_USAGE_PERIOD: &'static str = "2.5.29.16"; -pub const szOID_BASIC_CONSTRAINTS2: &'static str = "2.5.29.19"; -pub const szOID_CERT_POLICIES: &'static str = "2.5.29.32"; -pub const szOID_ANY_CERT_POLICY: &'static str = "2.5.29.32.0"; -pub const szOID_INHIBIT_ANY_POLICY: &'static str = "2.5.29.54"; -pub const szOID_AUTHORITY_KEY_IDENTIFIER2: &'static str = "2.5.29.35"; -pub const szOID_SUBJECT_KEY_IDENTIFIER: &'static str = "2.5.29.14"; -pub const szOID_SUBJECT_ALT_NAME2: &'static str = "2.5.29.17"; -pub const szOID_ISSUER_ALT_NAME2: &'static str = "2.5.29.18"; -pub const szOID_CRL_REASON_CODE: &'static str = "2.5.29.21"; -pub const szOID_REASON_CODE_HOLD: &'static str = "2.5.29.23"; -pub const szOID_CRL_DIST_POINTS: &'static str = "2.5.29.31"; -pub const szOID_ENHANCED_KEY_USAGE: &'static str = "2.5.29.37"; -pub const szOID_ANY_ENHANCED_KEY_USAGE: &'static str = "2.5.29.37.0"; -pub const szOID_CRL_NUMBER: &'static str = "2.5.29.20"; -pub const szOID_DELTA_CRL_INDICATOR: &'static str = "2.5.29.27"; -pub const szOID_ISSUING_DIST_POINT: &'static str = "2.5.29.28"; -pub const szOID_FRESHEST_CRL: &'static str = "2.5.29.46"; -pub const szOID_NAME_CONSTRAINTS: &'static str = "2.5.29.30"; -pub const szOID_POLICY_MAPPINGS: &'static str = "2.5.29.33"; -pub const szOID_LEGACY_POLICY_MAPPINGS: &'static str = "2.5.29.5"; -pub const szOID_POLICY_CONSTRAINTS: &'static str = "2.5.29.36"; -pub const szOID_RENEWAL_CERTIFICATE: &'static str = "1.3.6.1.4.1.311.13.1"; -pub const szOID_ENROLLMENT_NAME_VALUE_PAIR: &'static str = "1.3.6.1.4.1.311.13.2.1"; -pub const szOID_ENROLLMENT_CSP_PROVIDER: &'static str = "1.3.6.1.4.1.311.13.2.2"; -pub const szOID_OS_VERSION: &'static str = "1.3.6.1.4.1.311.13.2.3"; -pub const szOID_ENROLLMENT_AGENT: &'static str = "1.3.6.1.4.1.311.20.2.1"; -pub const szOID_PKIX: &'static str = "1.3.6.1.5.5.7"; -pub const szOID_PKIX_PE: &'static str = "1.3.6.1.5.5.7.1"; -pub const szOID_AUTHORITY_INFO_ACCESS: &'static str = "1.3.6.1.5.5.7.1.1"; -pub const szOID_SUBJECT_INFO_ACCESS: &'static str = "1.3.6.1.5.5.7.1.11"; -pub const szOID_BIOMETRIC_EXT: &'static str = "1.3.6.1.5.5.7.1.2"; -pub const szOID_QC_STATEMENTS_EXT: &'static str = "1.3.6.1.5.5.7.1.3"; -pub const szOID_LOGOTYPE_EXT: &'static str = "1.3.6.1.5.5.7.1.12"; -pub const szOID_CERT_EXTENSIONS: &'static str = "1.3.6.1.4.1.311.2.1.14"; -pub const szOID_NEXT_UPDATE_LOCATION: &'static str = "1.3.6.1.4.1.311.10.2"; -pub const szOID_REMOVE_CERTIFICATE: &'static str = "1.3.6.1.4.1.311.10.8.1"; -pub const szOID_CROSS_CERT_DIST_POINTS: &'static str = "1.3.6.1.4.1.311.10.9.1"; -pub const szOID_CTL: &'static str = "1.3.6.1.4.1.311.10.1"; -pub const szOID_SORTED_CTL: &'static str = "1.3.6.1.4.1.311.10.1.1"; -pub const szOID_SERIALIZED: &'static str = "1.3.6.1.4.1.311.10.3.3.1"; -pub const szOID_NT_PRINCIPAL_NAME: &'static str = "1.3.6.1.4.1.311.20.2.3"; -pub const szOID_INTERNATIONALIZED_EMAIL_ADDRESS: &'static str = "1.3.6.1.4.1.311.20.2.4"; -pub const szOID_PRODUCT_UPDATE: &'static str = "1.3.6.1.4.1.311.31.1"; -pub const szOID_ANY_APPLICATION_POLICY: &'static str = "1.3.6.1.4.1.311.10.12.1"; -pub const szOID_AUTO_ENROLL_CTL_USAGE: &'static str = "1.3.6.1.4.1.311.20.1"; -pub const szOID_ENROLL_CERTTYPE_EXTENSION: &'static str = "1.3.6.1.4.1.311.20.2"; -pub const szOID_CERT_MANIFOLD: &'static str = "1.3.6.1.4.1.311.20.3"; -pub const szOID_CERTSRV_CA_VERSION: &'static str = "1.3.6.1.4.1.311.21.1"; -pub const szOID_CERTSRV_PREVIOUS_CERT_HASH: &'static str = "1.3.6.1.4.1.311.21.2"; -pub const szOID_CRL_VIRTUAL_BASE: &'static str = "1.3.6.1.4.1.311.21.3"; -pub const szOID_CRL_NEXT_PUBLISH: &'static str = "1.3.6.1.4.1.311.21.4"; -pub const szOID_KP_CA_EXCHANGE: &'static str = "1.3.6.1.4.1.311.21.5"; -pub const szOID_KP_KEY_RECOVERY_AGENT: &'static str = "1.3.6.1.4.1.311.21.6"; -pub const szOID_CERTIFICATE_TEMPLATE: &'static str = "1.3.6.1.4.1.311.21.7"; -pub const szOID_ENTERPRISE_OID_ROOT: &'static str = "1.3.6.1.4.1.311.21.8"; -pub const szOID_RDN_DUMMY_SIGNER: &'static str = "1.3.6.1.4.1.311.21.9"; -pub const szOID_APPLICATION_CERT_POLICIES: &'static str = "1.3.6.1.4.1.311.21.10"; -pub const szOID_APPLICATION_POLICY_MAPPINGS: &'static str = "1.3.6.1.4.1.311.21.11"; -pub const szOID_APPLICATION_POLICY_CONSTRAINTS: &'static str = "1.3.6.1.4.1.311.21.12"; -pub const szOID_ARCHIVED_KEY_ATTR: &'static str = "1.3.6.1.4.1.311.21.13"; -pub const szOID_CRL_SELF_CDP: &'static str = "1.3.6.1.4.1.311.21.14"; -pub const szOID_REQUIRE_CERT_CHAIN_POLICY: &'static str = "1.3.6.1.4.1.311.21.15"; -pub const szOID_ARCHIVED_KEY_CERT_HASH: &'static str = "1.3.6.1.4.1.311.21.16"; -pub const szOID_ISSUED_CERT_HASH: &'static str = "1.3.6.1.4.1.311.21.17"; -pub const szOID_DS_EMAIL_REPLICATION: &'static str = "1.3.6.1.4.1.311.21.19"; -pub const szOID_REQUEST_CLIENT_INFO: &'static str = "1.3.6.1.4.1.311.21.20"; -pub const szOID_ENCRYPTED_KEY_HASH: &'static str = "1.3.6.1.4.1.311.21.21"; -pub const szOID_CERTSRV_CROSSCA_VERSION: &'static str = "1.3.6.1.4.1.311.21.22"; -pub const szOID_NTDS_REPLICATION: &'static str = "1.3.6.1.4.1.311.25.1"; -pub const szOID_SUBJECT_DIR_ATTRS: &'static str = "2.5.29.9"; -pub const szOID_PKIX_KP: &'static str = "1.3.6.1.5.5.7.3"; -pub const szOID_PKIX_KP_SERVER_AUTH: &'static str = "1.3.6.1.5.5.7.3.1"; -pub const szOID_PKIX_KP_CLIENT_AUTH: &'static str = "1.3.6.1.5.5.7.3.2"; -pub const szOID_PKIX_KP_CODE_SIGNING: &'static str = "1.3.6.1.5.5.7.3.3"; -pub const szOID_PKIX_KP_EMAIL_PROTECTION: &'static str = "1.3.6.1.5.5.7.3.4"; -pub const szOID_PKIX_KP_IPSEC_END_SYSTEM: &'static str = "1.3.6.1.5.5.7.3.5"; -pub const szOID_PKIX_KP_IPSEC_TUNNEL: &'static str = "1.3.6.1.5.5.7.3.6"; -pub const szOID_PKIX_KP_IPSEC_USER: &'static str = "1.3.6.1.5.5.7.3.7"; -pub const szOID_PKIX_KP_TIMESTAMP_SIGNING: &'static str = "1.3.6.1.5.5.7.3.8"; -pub const szOID_PKIX_KP_OCSP_SIGNING: &'static str = "1.3.6.1.5.5.7.3.9"; -pub const szOID_PKIX_OCSP_NOCHECK: &'static str = "1.3.6.1.5.5.7.48.1.5"; -pub const szOID_PKIX_OCSP_NONCE: &'static str = "1.3.6.1.5.5.7.48.1.2"; -pub const szOID_IPSEC_KP_IKE_INTERMEDIATE: &'static str = "1.3.6.1.5.5.8.2.2"; -pub const szOID_PKINIT_KP_KDC: &'static str = "1.3.6.1.5.2.3.5"; -pub const szOID_KP_CTL_USAGE_SIGNING: &'static str = "1.3.6.1.4.1.311.10.3.1"; -pub const szOID_KP_TIME_STAMP_SIGNING: &'static str = "1.3.6.1.4.1.311.10.3.2"; -pub const szOID_SERVER_GATED_CRYPTO: &'static str = "1.3.6.1.4.1.311.10.3.3"; -pub const szOID_SGC_NETSCAPE: &'static str = "2.16.840.1.113730.4.1"; -pub const szOID_KP_EFS: &'static str = "1.3.6.1.4.1.311.10.3.4"; -pub const szOID_EFS_RECOVERY: &'static str = "1.3.6.1.4.1.311.10.3.4.1"; -pub const szOID_WHQL_CRYPTO: &'static str = "1.3.6.1.4.1.311.10.3.5"; -pub const szOID_NT5_CRYPTO: &'static str = "1.3.6.1.4.1.311.10.3.6"; -pub const szOID_OEM_WHQL_CRYPTO: &'static str = "1.3.6.1.4.1.311.10.3.7"; -pub const szOID_EMBEDDED_NT_CRYPTO: &'static str = "1.3.6.1.4.1.311.10.3.8"; -pub const szOID_ROOT_LIST_SIGNER: &'static str = "1.3.6.1.4.1.311.10.3.9"; -pub const szOID_KP_QUALIFIED_SUBORDINATION: &'static str = "1.3.6.1.4.1.311.10.3.10"; -pub const szOID_KP_KEY_RECOVERY: &'static str = "1.3.6.1.4.1.311.10.3.11"; -pub const szOID_KP_DOCUMENT_SIGNING: &'static str = "1.3.6.1.4.1.311.10.3.12"; -pub const szOID_KP_LIFETIME_SIGNING: &'static str = "1.3.6.1.4.1.311.10.3.13"; -pub const szOID_KP_MOBILE_DEVICE_SOFTWARE: &'static str = "1.3.6.1.4.1.311.10.3.14"; -pub const szOID_KP_SMART_DISPLAY: &'static str = "1.3.6.1.4.1.311.10.3.15"; -pub const szOID_KP_CSP_SIGNATURE: &'static str = "1.3.6.1.4.1.311.10.3.16"; -pub const szOID_DRM: &'static str = "1.3.6.1.4.1.311.10.5.1"; -pub const szOID_DRM_INDIVIDUALIZATION: &'static str = "1.3.6.1.4.1.311.10.5.2"; -pub const szOID_LICENSES: &'static str = "1.3.6.1.4.1.311.10.6.1"; -pub const szOID_LICENSE_SERVER: &'static str = "1.3.6.1.4.1.311.10.6.2"; -pub const szOID_KP_SMARTCARD_LOGON: &'static str = "1.3.6.1.4.1.311.20.2.2"; -pub const szOID_KP_KERNEL_MODE_CODE_SIGNING: &'static str = "1.3.6.1.4.1.311.61.1.1"; -pub const szOID_KP_KERNEL_MODE_TRUSTED_BOOT_SIGNING: &'static str = "1.3.6.1.4.1.311.61.4.1"; -pub const szOID_REVOKED_LIST_SIGNER: &'static str = "1.3.6.1.4.1.311.10.3.19"; -pub const szOID_WINDOWS_KITS_SIGNER: &'static str = "1.3.6.1.4.1.311.10.3.20"; -pub const szOID_WINDOWS_RT_SIGNER: &'static str = "1.3.6.1.4.1.311.10.3.21"; -pub const szOID_PROTECTED_PROCESS_LIGHT_SIGNER: &'static str = "1.3.6.1.4.1.311.10.3.22"; -pub const szOID_WINDOWS_TCB_SIGNER: &'static str = "1.3.6.1.4.1.311.10.3.23"; -pub const szOID_PROTECTED_PROCESS_SIGNER: &'static str = "1.3.6.1.4.1.311.10.3.24"; -pub const szOID_WINDOWS_THIRD_PARTY_COMPONENT_SIGNER: &'static str = "1.3.6.1.4.1.311.10.3.25"; -pub const szOID_WINDOWS_SOFTWARE_EXTENSION_SIGNER: &'static str = "1.3.6.1.4.1.311.10.3.26"; -pub const szOID_DISALLOWED_LIST: &'static str = "1.3.6.1.4.1.311.10.3.30"; -pub const szOID_SYNC_ROOT_CTL_EXT: &'static str = "1.3.6.1.4.1.311.10.3.50"; -pub const szOID_KP_KERNEL_MODE_HAL_EXTENSION_SIGNING: &'static str = "1.3.6.1.4.1.311.61.5.1"; -pub const szOID_WINDOWS_STORE_SIGNER: &'static str = "1.3.6.1.4.1.311.76.3.1"; -pub const szOID_DYNAMIC_CODE_GEN_SIGNER: &'static str = "1.3.6.1.4.1.311.76.5.1"; -pub const szOID_MICROSOFT_PUBLISHER_SIGNER: &'static str = "1.3.6.1.4.1.311.76.8.1"; -pub const szOID_YESNO_TRUST_ATTR: &'static str = "1.3.6.1.4.1.311.10.4.1"; -pub const szOID_PKIX_POLICY_QUALIFIER_CPS: &'static str = "1.3.6.1.5.5.7.2.1"; -pub const szOID_PKIX_POLICY_QUALIFIER_USERNOTICE: &'static str = "1.3.6.1.5.5.7.2.2"; -pub const szOID_ROOT_PROGRAM_FLAGS: &'static str = "1.3.6.1.4.1.311.60.1.1"; -//6992 -pub type HCRYPTMSG = *mut ::c_void; -//9353 -pub type HCERTSTORE = *mut ::c_void; -STRUCT!{struct CERT_CONTEXT { - dwCertEncodingType: ::DWORD, - pbCertEncoded: *mut ::BYTE, - cbCertEncoded: ::DWORD, - pCertInfo: ::PCERT_INFO, - hCertStore: HCERTSTORE, -}} -pub type PCERT_CONTEXT = *mut CERT_CONTEXT; -pub type PCCERT_CONTEXT = *const CERT_CONTEXT; -STRUCT!{struct CRL_CONTEXT { - dwCertEncodingType: ::DWORD, - pbCrlEncoded: *mut ::BYTE, - cbCrlEncoded: ::DWORD, - pCrlInfo: ::PCRL_INFO, - hCertStore: HCERTSTORE, -}} -pub type PCRL_CONTEXT = *mut CRL_CONTEXT; -pub type PCCRL_CONTEXT = *const CRL_CONTEXT; -STRUCT!{struct CTL_CONTEXT { - dwMsgAndCertEncodingType: ::DWORD, - pbCtlEncoded: *mut ::BYTE, - cbCtlEncoded: ::DWORD, - pCtlInfo: ::PCTL_INFO, - hCertStore: HCERTSTORE, - hCryptMsg: HCRYPTMSG, - pbCtlContent: *mut ::BYTE, - cbCtlContent: ::DWORD, -}} -pub type PCTL_CONTEXT = *mut CTL_CONTEXT; -pub type PCCTL_CONTEXT = *const CTL_CONTEXT; -pub const CERT_STORE_PROV_MSG: ::DWORD = 1; -pub const CERT_STORE_PROV_MEMORY: ::DWORD = 2; -pub const CERT_STORE_PROV_FILE: ::DWORD = 3; -pub const CERT_STORE_PROV_REG: ::DWORD = 4; -pub const CERT_STORE_PROV_PKCS7: ::DWORD = 5; -pub const CERT_STORE_PROV_SERIALIZED: ::DWORD = 6; -pub const CERT_STORE_PROV_FILENAME_A: ::DWORD = 7; -pub const CERT_STORE_PROV_FILENAME_W: ::DWORD = 8; -pub const CERT_STORE_PROV_FILENAME: ::DWORD = CERT_STORE_PROV_FILENAME_W; -pub const CERT_STORE_PROV_SYSTEM_A: ::DWORD = 9; -pub const CERT_STORE_PROV_SYSTEM_W: ::DWORD = 10; -pub const CERT_STORE_PROV_SYSTEM: ::DWORD = CERT_STORE_PROV_SYSTEM_W; -pub const CERT_STORE_PROV_COLLECTION: ::DWORD = 11; -pub const CERT_STORE_PROV_SYSTEM_REGISTRY_A: ::DWORD = 12; -pub const CERT_STORE_PROV_SYSTEM_REGISTRY_W: ::DWORD = 13; -pub const CERT_STORE_PROV_SYSTEM_REGISTRY: ::DWORD = CERT_STORE_PROV_SYSTEM_REGISTRY_W; -pub const CERT_STORE_PROV_PHYSICAL_W: ::DWORD = 14; -pub const CERT_STORE_PROV_PHYSICAL: ::DWORD = CERT_STORE_PROV_PHYSICAL_W; -pub const CERT_STORE_PROV_SMART_CARD_W: ::DWORD = 15; -pub const CERT_STORE_PROV_SMART_CARD: ::DWORD = CERT_STORE_PROV_SMART_CARD_W; -pub const CERT_STORE_PROV_LDAP_W: ::DWORD = 16; -pub const CERT_STORE_PROV_LDAP: ::DWORD = CERT_STORE_PROV_LDAP_W; -pub const CERT_STORE_NO_CRYPT_RELEASE_FLAG: ::DWORD = 0x00000001; -pub const CERT_STORE_SET_LOCALIZED_NAME_FLAG: ::DWORD = 0x00000002; -pub const CERT_STORE_DEFER_CLOSE_UNTIL_LAST_FREE_FLAG: ::DWORD = 0x00000004; -pub const CERT_STORE_DELETE_FLAG: ::DWORD = 0x00000010; -pub const CERT_STORE_SHARE_STORE_FLAG: ::DWORD = 0x00000040; -pub const CERT_STORE_SHARE_CONTEXT_FLAG: ::DWORD = 0x00000080; -pub const CERT_STORE_MANIFOLD_FLAG: ::DWORD = 0x00000100; -pub const CERT_STORE_ENUM_ARCHIVED_FLAG: ::DWORD = 0x00000200; -pub const CERT_STORE_UPDATE_KEYID_FLAG: ::DWORD = 0x00000400; -pub const CERT_STORE_BACKUP_RESTORE_FLAG: ::DWORD = 0x00000800; -pub const CERT_STORE_READONLY_FLAG: ::DWORD = 0x00008000; -pub const CERT_STORE_OPEN_EXISTING_FLAG: ::DWORD = 0x00004000; -pub const CERT_STORE_CREATE_NEW_FLAG: ::DWORD = 0x00002000; -pub const CERT_STORE_MAXIMUM_ALLOWED_FLAG: ::DWORD = 0x00001000; -pub const CERT_SYSTEM_STORE_UNPROTECTED_FLAG: ::DWORD = 0x40000000; -pub const CERT_SYSTEM_STORE_LOCATION_MASK: ::DWORD = 0x00FF0000; -pub const CERT_SYSTEM_STORE_LOCATION_SHIFT: ::DWORD = 16; -pub const CERT_SYSTEM_STORE_CURRENT_USER_ID: ::DWORD = 1; -pub const CERT_SYSTEM_STORE_LOCAL_MACHINE_ID: ::DWORD = 2; -pub const CERT_SYSTEM_STORE_CURRENT_SERVICE_ID: ::DWORD = 4; -pub const CERT_SYSTEM_STORE_SERVICES_ID: ::DWORD = 5; -pub const CERT_SYSTEM_STORE_USERS_ID: ::DWORD = 6; -pub const CERT_SYSTEM_STORE_CURRENT_USER_GROUP_POLICY_ID: ::DWORD = 7; -pub const CERT_SYSTEM_STORE_LOCAL_MACHINE_GROUP_POLICY_ID: ::DWORD = 8; -pub const CERT_SYSTEM_STORE_LOCAL_MACHINE_ENTERPRISE_ID: ::DWORD = 9; -pub const CERT_SYSTEM_STORE_CURRENT_USER: ::DWORD = CERT_SYSTEM_STORE_CURRENT_USER_ID - << CERT_SYSTEM_STORE_LOCATION_SHIFT; -pub const CERT_SYSTEM_STORE_LOCAL_MACHINE: ::DWORD = CERT_SYSTEM_STORE_LOCAL_MACHINE_ID - << CERT_SYSTEM_STORE_LOCATION_SHIFT; -pub const CERT_SYSTEM_STORE_CURRENT_SERVICE: ::DWORD = CERT_SYSTEM_STORE_CURRENT_SERVICE_ID - << CERT_SYSTEM_STORE_LOCATION_SHIFT; -pub const CERT_SYSTEM_STORE_SERVICES: ::DWORD = CERT_SYSTEM_STORE_SERVICES_ID - << CERT_SYSTEM_STORE_LOCATION_SHIFT; -pub const CERT_SYSTEM_STORE_USERS: ::DWORD = CERT_SYSTEM_STORE_USERS_ID - << CERT_SYSTEM_STORE_LOCATION_SHIFT; -pub const CERT_SYSTEM_STORE_CURRENT_USER_GROUP_POLICY: ::DWORD = - CERT_SYSTEM_STORE_CURRENT_USER_GROUP_POLICY_ID << CERT_SYSTEM_STORE_LOCATION_SHIFT; -pub const CERT_SYSTEM_STORE_LOCAL_MACHINE_GROUP_POLICY: ::DWORD = - CERT_SYSTEM_STORE_LOCAL_MACHINE_GROUP_POLICY_ID << CERT_SYSTEM_STORE_LOCATION_SHIFT; -pub const CERT_SYSTEM_STORE_LOCAL_MACHINE_ENTERPRISE: ::DWORD = - CERT_SYSTEM_STORE_LOCAL_MACHINE_ENTERPRISE_ID << CERT_SYSTEM_STORE_LOCATION_SHIFT; -pub const CERT_NAME_EMAIL_TYPE: ::DWORD = 1; -pub const CERT_NAME_RDN_TYPE: ::DWORD = 2; -pub const CERT_NAME_ATTR_TYPE: ::DWORD = 3; -pub const CERT_NAME_SIMPLE_DISPLAY_TYPE: ::DWORD = 4; -pub const CERT_NAME_FRIENDLY_DISPLAY_TYPE: ::DWORD = 5; -pub const CERT_NAME_DNS_TYPE: ::DWORD = 6; -pub const CERT_NAME_URL_TYPE: ::DWORD = 7; -pub const CERT_NAME_UPN_TYPE: ::DWORD = 8; -pub const CERT_SIMPLE_NAME_STR: ::DWORD = 1; -pub const CERT_OID_NAME_STR: ::DWORD = 2; -pub const CERT_X500_NAME_STR: ::DWORD = 3; - -pub const CERT_NAME_STR_SEMICOLON_FLAG: ::DWORD = 0x40000000; -pub const CERT_NAME_STR_NO_PLUS_FLAG: ::DWORD = 0x20000000; -pub const CERT_NAME_STR_NO_QUOTING_FLAG: ::DWORD = 0x10000000; -pub const CERT_NAME_STR_CRLF_FLAG: ::DWORD = 0x08000000; -pub const CERT_NAME_STR_COMMA_FLAG: ::DWORD = 0x04000000; -pub const CERT_NAME_STR_REVERSE_FLAG: ::DWORD = 0x02000000; - -pub const CERT_NAME_ISSUER_FLAG: ::DWORD = 0x1; -pub const CERT_NAME_STR_DISABLE_IE4_UTF8_FLAG: ::DWORD = 0x00010000; -pub const CERT_NAME_STR_ENABLE_T61_UNICODE_FLAG: ::DWORD = 0x00020000; -pub const CERT_NAME_STR_ENABLE_UTF8_UNICODE_FLAG: ::DWORD = 0x00040000; -pub const CERT_NAME_STR_FORCE_UTF8_DIR_STR_FLAG: ::DWORD = 0x00080000; -pub const CERT_DELETE_KEYSET_PROP_ID: ::DWORD = 101; -pub const CERT_COMPARE_MASK: ::DWORD = 0xFFFF; -pub const CERT_COMPARE_SHIFT: ::DWORD = 16; -pub const CERT_COMPARE_ANY: ::DWORD = 0; -pub const CERT_COMPARE_SHA1_HASH: ::DWORD = 1; -pub const CERT_COMPARE_NAME: ::DWORD = 2; -pub const CERT_COMPARE_ATTR: ::DWORD = 3; -pub const CERT_COMPARE_MD5_HASH: ::DWORD = 4; -pub const CERT_COMPARE_PROPERTY: ::DWORD = 5; -pub const CERT_COMPARE_PUBLIC_KEY: ::DWORD = 6; -pub const CERT_COMPARE_HASH: ::DWORD = CERT_COMPARE_SHA1_HASH; -pub const CERT_COMPARE_NAME_STR_A: ::DWORD = 7; -pub const CERT_COMPARE_NAME_STR_W: ::DWORD = 8; -pub const CERT_COMPARE_KEY_SPEC: ::DWORD = 9; -pub const CERT_COMPARE_ENHKEY_USAGE: ::DWORD = 10; -pub const CERT_COMPARE_CTL_USAGE: ::DWORD = CERT_COMPARE_ENHKEY_USAGE; -pub const CERT_COMPARE_SUBJECT_CERT: ::DWORD = 11; -pub const CERT_COMPARE_ISSUER_OF: ::DWORD = 12; -pub const CERT_COMPARE_EXISTING: ::DWORD = 13; -pub const CERT_COMPARE_SIGNATURE_HASH: ::DWORD = 14; -pub const CERT_COMPARE_KEY_IDENTIFIER: ::DWORD = 15; -pub const CERT_COMPARE_CERT_ID: ::DWORD = 16; -pub const CERT_COMPARE_CROSS_CERT_DIST_POINTS: ::DWORD = 17; -pub const CERT_COMPARE_PUBKEY_MD5_HASH: ::DWORD = 18; -pub const CERT_FIND_ANY: ::DWORD = CERT_COMPARE_ANY << CERT_COMPARE_SHIFT; -pub const CERT_FIND_SHA1_HASH: ::DWORD = CERT_COMPARE_SHA1_HASH << CERT_COMPARE_SHIFT; -pub const CERT_FIND_MD5_HASH: ::DWORD = CERT_COMPARE_MD5_HASH << CERT_COMPARE_SHIFT; -pub const CERT_FIND_SIGNATURE_HASH: ::DWORD = CERT_COMPARE_SIGNATURE_HASH << CERT_COMPARE_SHIFT; -pub const CERT_FIND_KEY_IDENTIFIER: ::DWORD = CERT_COMPARE_KEY_IDENTIFIER << CERT_COMPARE_SHIFT; -pub const CERT_FIND_HASH: ::DWORD = CERT_FIND_SHA1_HASH; -pub const CERT_FIND_PROPERTY: ::DWORD = CERT_COMPARE_PROPERTY << CERT_COMPARE_SHIFT; -pub const CERT_FIND_PUBLIC_KEY: ::DWORD = CERT_COMPARE_PUBLIC_KEY << CERT_COMPARE_SHIFT; -pub const CERT_FIND_SUBJECT_NAME: ::DWORD = (CERT_COMPARE_NAME << CERT_COMPARE_SHIFT) - | CERT_INFO_SUBJECT_FLAG; -pub const CERT_FIND_SUBJECT_ATTR: ::DWORD = (CERT_COMPARE_ATTR << CERT_COMPARE_SHIFT) - | CERT_INFO_SUBJECT_FLAG; -pub const CERT_FIND_ISSUER_NAME: ::DWORD = (CERT_COMPARE_NAME << CERT_COMPARE_SHIFT) - | CERT_INFO_ISSUER_FLAG; -pub const CERT_FIND_ISSUER_ATTR: ::DWORD = (CERT_COMPARE_ATTR << CERT_COMPARE_SHIFT) - | CERT_INFO_ISSUER_FLAG; -pub const CERT_FIND_SUBJECT_STR_A: ::DWORD = (CERT_COMPARE_NAME_STR_A << CERT_COMPARE_SHIFT) - | CERT_INFO_SUBJECT_FLAG; -pub const CERT_FIND_SUBJECT_STR_W: ::DWORD = (CERT_COMPARE_NAME_STR_W << CERT_COMPARE_SHIFT) - | CERT_INFO_SUBJECT_FLAG; -pub const CERT_FIND_SUBJECT_STR: ::DWORD = CERT_FIND_SUBJECT_STR_W; -pub const CERT_FIND_ISSUER_STR_A: ::DWORD = (CERT_COMPARE_NAME_STR_A << CERT_COMPARE_SHIFT) - | CERT_INFO_ISSUER_FLAG; -pub const CERT_FIND_ISSUER_STR_W: ::DWORD = (CERT_COMPARE_NAME_STR_W << CERT_COMPARE_SHIFT) - | CERT_INFO_ISSUER_FLAG; -pub const CERT_FIND_ISSUER_STR: ::DWORD = CERT_FIND_ISSUER_STR_W; -pub const CERT_FIND_KEY_SPEC: ::DWORD = CERT_COMPARE_KEY_SPEC << CERT_COMPARE_SHIFT; -pub const CERT_FIND_ENHKEY_USAGE: ::DWORD = CERT_COMPARE_ENHKEY_USAGE << CERT_COMPARE_SHIFT; -pub const CERT_FIND_CTL_USAGE: ::DWORD = CERT_FIND_ENHKEY_USAGE; -pub const CERT_FIND_SUBJECT_CERT: ::DWORD = CERT_COMPARE_SUBJECT_CERT << CERT_COMPARE_SHIFT; -pub const CERT_FIND_ISSUER_OF: ::DWORD = CERT_COMPARE_ISSUER_OF << CERT_COMPARE_SHIFT; -pub const CERT_FIND_EXISTING: ::DWORD = CERT_COMPARE_EXISTING << CERT_COMPARE_SHIFT; -pub const CERT_FIND_CERT_ID: ::DWORD = CERT_COMPARE_CERT_ID << CERT_COMPARE_SHIFT; -pub const CERT_FIND_CROSS_CERT_DIST_POINTS: ::DWORD = CERT_COMPARE_CROSS_CERT_DIST_POINTS - << CERT_COMPARE_SHIFT; -pub const CERT_FIND_PUBKEY_MD5_HASH: ::DWORD = CERT_COMPARE_PUBKEY_MD5_HASH << CERT_COMPARE_SHIFT; -pub const CERT_ENCIPHER_ONLY_KEY_USAGE: ::DWORD = 0x0001; -pub const CERT_CRL_SIGN_KEY_USAGE: ::DWORD = 0x0002; -pub const CERT_KEY_CERT_SIGN_KEY_USAGE: ::DWORD = 0x0004; -pub const CERT_KEY_AGREEMENT_KEY_USAGE: ::DWORD = 0x0008; -pub const CERT_DATA_ENCIPHERMENT_KEY_USAGE: ::DWORD = 0x0010; -pub const CERT_KEY_ENCIPHERMENT_KEY_USAGE: ::DWORD = 0x0020; -pub const CERT_NON_REPUDIATION_KEY_USAGE: ::DWORD = 0x0040; -pub const CERT_DIGITAL_SIGNATURE_KEY_USAGE: ::DWORD = 0x0080; -pub const CERT_DECIPHER_ONLY_KEY_USAGE: ::DWORD = 0x8000; -pub const CERT_STORE_ADD_NEW: ::DWORD = 1; -pub const CERT_STORE_ADD_USE_EXISTING: ::DWORD = 2; -pub const CERT_STORE_ADD_REPLACE_EXISTING: ::DWORD = 3; -pub const CERT_STORE_ADD_ALWAYS: ::DWORD = 4; -pub const CERT_STORE_ADD_REPLACE_EXISTING_INHERIT_PROPERTIES: ::DWORD = 5; -pub const CERT_STORE_ADD_NEWER: ::DWORD = 6; -pub const CERT_STORE_ADD_NEWER_INHERIT_PROPERTIES: ::DWORD = 7; -pub const CERT_STORE_SAVE_AS_STORE: ::DWORD = 1; -pub const CERT_STORE_SAVE_AS_PKCS7: ::DWORD = 2; -pub const CERT_STORE_SAVE_TO_FILE: ::DWORD = 1; -pub const CERT_STORE_SAVE_TO_MEMORY: ::DWORD = 2; -pub const CERT_STORE_SAVE_TO_FILENAME_A: ::DWORD = 3; -pub const CERT_STORE_SAVE_TO_FILENAME_W: ::DWORD = 4; -pub const CERT_STORE_SAVE_TO_FILENAME: ::DWORD = CERT_STORE_SAVE_TO_FILENAME_W; -pub const CERT_CA_SUBJECT_FLAG: ::DWORD = 0x80; -pub const CERT_END_ENTITY_SUBJECT_FLAG: ::DWORD = 0x40; -pub const CERT_CHAIN_POLICY_BASE: ::DWORD = 1; -pub const CERT_CHAIN_POLICY_AUTHENTICODE: ::DWORD = 2; -pub const CERT_CHAIN_POLICY_AUTHENTICODE_TS: ::DWORD = 3; -pub const CERT_CHAIN_POLICY_SSL: ::DWORD = 4; -pub const CERT_CHAIN_POLICY_BASIC_CONSTRAINTS: ::DWORD = 5; -pub const CERT_CHAIN_POLICY_NT_AUTH: ::DWORD = 6; -pub const CERT_CHAIN_POLICY_MICROSOFT_ROOT: ::DWORD = 7; -pub const CERT_CHAIN_REVOCATION_CHECK_END_CERT: ::DWORD = 0x10000000; -pub const CERT_CHAIN_REVOCATION_CHECK_CHAIN: ::DWORD = 0x20000000; -pub const CERT_CHAIN_REVOCATION_CHECK_CHAIN_EXCLUDE_ROOT: ::DWORD = 0x40000000; -pub const CERT_CHAIN_REVOCATION_CHECK_CACHE_ONLY: ::DWORD = 0x80000000; -pub const CERT_CHAIN_REVOCATION_ACCUMULATIVE_TIMEOUT: ::DWORD = 0x08000000; -pub const CERT_TRUST_NO_ERROR: ::DWORD = 0x00000000; -pub const CERT_TRUST_IS_NOT_TIME_VALID: ::DWORD = 0x00000001; -pub const CERT_TRUST_IS_NOT_TIME_NESTED: ::DWORD = 0x00000002; -pub const CERT_TRUST_IS_REVOKED: ::DWORD = 0x00000004; -pub const CERT_TRUST_IS_NOT_SIGNATURE_VALID: ::DWORD = 0x00000008; -pub const CERT_TRUST_IS_NOT_VALID_FOR_USAGE: ::DWORD = 0x00000010; -pub const CERT_TRUST_IS_UNTRUSTED_ROOT: ::DWORD = 0x00000020; -pub const CERT_TRUST_REVOCATION_STATUS_UNKNOWN: ::DWORD = 0x00000040; -pub const CERT_TRUST_IS_CYCLIC: ::DWORD = 0x00000080; - -pub const CERT_TRUST_INVALID_EXTENSION: ::DWORD = 0x00000100; -pub const CERT_TRUST_INVALID_POLICY_CONSTRAINTS: ::DWORD = 0x00000200; -pub const CERT_TRUST_INVALID_BASIC_CONSTRAINTS: ::DWORD = 0x00000400; -pub const CERT_TRUST_INVALID_NAME_CONSTRAINTS: ::DWORD = 0x00000800; -pub const CERT_TRUST_HAS_NOT_SUPPORTED_NAME_CONSTRAINT: ::DWORD = 0x00001000; -pub const CERT_TRUST_HAS_NOT_DEFINED_NAME_CONSTRAINT: ::DWORD = 0x00002000; -pub const CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT: ::DWORD = 0x00004000; -pub const CERT_TRUST_HAS_EXCLUDED_NAME_CONSTRAINT: ::DWORD = 0x00008000; - -pub const CERT_TRUST_IS_OFFLINE_REVOCATION: ::DWORD = 0x01000000; -pub const CERT_TRUST_NO_ISSUANCE_CHAIN_POLICY: ::DWORD = 0x02000000; -pub const CERT_TRUST_IS_PARTIAL_CHAIN: ::DWORD = 0x00010000; -pub const CERT_TRUST_CTL_IS_NOT_TIME_VALID: ::DWORD = 0x00020000; -pub const CERT_TRUST_CTL_IS_NOT_SIGNATURE_VALID: ::DWORD = 0x00040000; -pub const CERT_TRUST_CTL_IS_NOT_VALID_FOR_USAGE: ::DWORD = 0x00080000; -pub const CERT_CHAIN_POLICY_IGNORE_NOT_TIME_VALID_FLAG: ::DWORD = 0x00000001; -pub const CERT_CHAIN_POLICY_IGNORE_CTL_NOT_TIME_VALID_FLAG: ::DWORD = 0x00000002; -pub const CERT_CHAIN_POLICY_IGNORE_NOT_TIME_NESTED_FLAG: ::DWORD = 0x00000004; -pub const CERT_CHAIN_POLICY_IGNORE_INVALID_BASIC_CONSTRAINTS_FLAG: ::DWORD = 0x00000008; - -pub const CERT_CHAIN_POLICY_ALLOW_UNKNOWN_CA_FLAG: ::DWORD = 0x00000010; -pub const CERT_CHAIN_POLICY_IGNORE_WRONG_USAGE_FLAG: ::DWORD = 0x00000020; -pub const CERT_CHAIN_POLICY_IGNORE_INVALID_NAME_FLAG: ::DWORD = 0x00000040; -pub const CERT_CHAIN_POLICY_IGNORE_INVALID_POLICY_FLAG: ::DWORD = 0x00000080; - -pub const CERT_CHAIN_POLICY_IGNORE_END_REV_UNKNOWN_FLAG: ::DWORD = 0x00000100; -pub const CERT_CHAIN_POLICY_IGNORE_CTL_SIGNER_REV_UNKNOWN_FLAG: ::DWORD = 0x00000200; -pub const CERT_CHAIN_POLICY_IGNORE_CA_REV_UNKNOWN_FLAG: ::DWORD = 0x00000400; -pub const CERT_CHAIN_POLICY_IGNORE_ROOT_REV_UNKNOWN_FLAG: ::DWORD = 0x00000800; - -pub const CERT_CHAIN_POLICY_IGNORE_ALL_REV_UNKNOWN_FLAGS: ::DWORD = - CERT_CHAIN_POLICY_IGNORE_END_REV_UNKNOWN_FLAG | - CERT_CHAIN_POLICY_IGNORE_CTL_SIGNER_REV_UNKNOWN_FLAG | - CERT_CHAIN_POLICY_IGNORE_CA_REV_UNKNOWN_FLAG | - CERT_CHAIN_POLICY_IGNORE_ROOT_REV_UNKNOWN_FLAG; -pub const CERT_TRUST_HAS_EXACT_MATCH_ISSUER: ::DWORD = 0x00000001; -pub const CERT_TRUST_HAS_KEY_MATCH_ISSUER: ::DWORD = 0x00000002; -pub const CERT_TRUST_HAS_NAME_MATCH_ISSUER: ::DWORD = 0x00000004; -pub const CERT_TRUST_IS_SELF_SIGNED: ::DWORD = 0x00000008; -pub const CERT_TRUST_HAS_PREFERRED_ISSUER: ::DWORD = 0x00000100; -pub const CERT_TRUST_HAS_ISSUANCE_CHAIN_POLICY: ::DWORD = 0x00000200; -pub const CERT_TRUST_HAS_VALID_NAME_CONSTRAINTS: ::DWORD = 0x00000400; -pub const CERT_TRUST_IS_COMPLEX_CHAIN: ::DWORD = 0x00010000; -pub const CERT_ALT_NAME_OTHER_NAME: ::DWORD = 1; -pub const CERT_ALT_NAME_RFC822_NAME: ::DWORD = 2; -pub const CERT_ALT_NAME_DNS_NAME: ::DWORD = 3; -pub const CERT_ALT_NAME_X400_ADDRESS: ::DWORD = 4; -pub const CERT_ALT_NAME_DIRECTORY_NAME: ::DWORD = 5; -pub const CERT_ALT_NAME_EDI_PARTY_NAME: ::DWORD = 6; -pub const CERT_ALT_NAME_URL: ::DWORD = 7; -pub const CERT_ALT_NAME_IP_ADDRESS: ::DWORD = 8; -pub const CERT_ALT_NAME_REGISTERED_ID: ::DWORD = 9; -pub const CERT_STORE_CTRL_RESYNC: ::DWORD = 1; -pub const CERT_STORE_CTRL_NOTIFY_CHANGE: ::DWORD = 2; -pub const CERT_STORE_CTRL_COMMIT: ::DWORD = 3; -pub const CERT_STORE_CTRL_AUTO_RESYNC: ::DWORD = 4; -pub const CERT_STORE_CTRL_CANCEL_NOTIFY: ::DWORD = 5; -pub const CERT_ID_ISSUER_SERIAL_NUMBER: ::DWORD = 1; -pub const CERT_ID_KEY_IDENTIFIER: ::DWORD = 2; -pub const CERT_ID_SHA1_HASH: ::DWORD = 3; -pub const CERT_KEY_PROV_HANDLE_PROP_ID: ::DWORD = 1; -pub const CERT_KEY_PROV_INFO_PROP_ID: ::DWORD = 2; -pub const CERT_SHA1_HASH_PROP_ID: ::DWORD = 3; -pub const CERT_MD5_HASH_PROP_ID: ::DWORD = 4; -pub const CERT_HASH_PROP_ID: ::DWORD = CERT_SHA1_HASH_PROP_ID; -pub const CERT_KEY_CONTEXT_PROP_ID: ::DWORD = 5; -pub const CERT_KEY_SPEC_PROP_ID: ::DWORD = 6; -pub const CERT_IE30_RESERVED_PROP_ID: ::DWORD = 7; -pub const CERT_PUBKEY_HASH_RESERVED_PROP_ID: ::DWORD = 8; -pub const CERT_ENHKEY_USAGE_PROP_ID: ::DWORD = 9; -pub const CERT_CTL_USAGE_PROP_ID: ::DWORD = CERT_ENHKEY_USAGE_PROP_ID; -pub const CERT_NEXT_UPDATE_LOCATION_PROP_ID: ::DWORD = 10; -pub const CERT_FRIENDLY_NAME_PROP_ID: ::DWORD = 11; -pub const CERT_PVK_FILE_PROP_ID: ::DWORD = 12; -pub const CERT_DESCRIPTION_PROP_ID: ::DWORD = 13; -pub const CERT_ACCESS_STATE_PROP_ID: ::DWORD = 14; -pub const CERT_SIGNATURE_HASH_PROP_ID: ::DWORD = 15; -pub const CERT_SMART_CARD_DATA_PROP_ID: ::DWORD = 16; -pub const CERT_EFS_PROP_ID: ::DWORD = 17; -pub const CERT_FORTEZZA_DATA_PROP_ID: ::DWORD = 18; -pub const CERT_ARCHIVED_PROP_ID: ::DWORD = 19; -pub const CERT_KEY_IDENTIFIER_PROP_ID: ::DWORD = 20; -pub const CERT_AUTO_ENROLL_PROP_ID: ::DWORD = 21; -pub const CERT_PUBKEY_ALG_PARA_PROP_ID: ::DWORD = 22; -pub const CERT_CROSS_CERT_DIST_POINTS_PROP_ID: ::DWORD = 23; -pub const CERT_ISSUER_PUBLIC_KEY_MD5_HASH_PROP_ID: ::DWORD = 24; -pub const CERT_SUBJECT_PUBLIC_KEY_MD5_HASH_PROP_ID: ::DWORD = 25; -pub const CERT_ENROLLMENT_PROP_ID: ::DWORD = 26; -pub const CERT_DATE_STAMP_PROP_ID: ::DWORD = 27; -pub const CERT_ISSUER_SERIAL_NUMBER_MD5_HASH_PROP_ID: ::DWORD = 28; -pub const CERT_SUBJECT_NAME_MD5_HASH_PROP_ID: ::DWORD = 29; -pub const CERT_EXTENDED_ERROR_INFO_PROP_ID: ::DWORD = 30; -pub const CERT_RENEWAL_PROP_ID: ::DWORD = 64; -pub const CERT_ARCHIVED_KEY_HASH_PROP_ID: ::DWORD = 65; -pub const CERT_AUTO_ENROLL_RETRY_PROP_ID: ::DWORD = 66; -pub const CERT_AIA_URL_RETRIEVED_PROP_ID: ::DWORD = 67; -pub const CERT_AUTHORITY_INFO_ACCESS_PROP_ID: ::DWORD = 68; -pub const CERT_BACKED_UP_PROP_ID: ::DWORD = 69; -pub const CERT_OCSP_RESPONSE_PROP_ID: ::DWORD = 70; -pub const CERT_REQUEST_ORIGINATOR_PROP_ID: ::DWORD = 71; -pub const CERT_SOURCE_LOCATION_PROP_ID: ::DWORD = 72; -pub const CERT_SOURCE_URL_PROP_ID: ::DWORD = 73; -pub const CERT_NEW_KEY_PROP_ID: ::DWORD = 74; -pub const CERT_OCSP_CACHE_PREFIX_PROP_ID: ::DWORD = 75; -pub const CERT_SMART_CARD_ROOT_INFO_PROP_ID: ::DWORD = 76; -pub const CERT_NO_AUTO_EXPIRE_CHECK_PROP_ID: ::DWORD = 77; -pub const CERT_NCRYPT_KEY_HANDLE_PROP_ID: ::DWORD = 78; -pub const CERT_HCRYPTPROV_OR_NCRYPT_KEY_HANDLE_PROP_ID: ::DWORD = 79; -pub const CERT_SUBJECT_INFO_ACCESS_PROP_ID: ::DWORD = 80; -pub const CERT_CA_OCSP_AUTHORITY_INFO_ACCESS_PROP_ID: ::DWORD = 81; -pub const CERT_CA_DISABLE_CRL_PROP_ID: ::DWORD = 82; -pub const CERT_ROOT_PROGRAM_CERT_POLICIES_PROP_ID: ::DWORD = 83; -pub const CERT_ROOT_PROGRAM_NAME_CONSTRAINTS_PROP_ID: ::DWORD = 84; -pub const CERT_SUBJECT_OCSP_AUTHORITY_INFO_ACCESS_PROP_ID: ::DWORD = 85; -pub const CERT_SUBJECT_DISABLE_CRL_PROP_ID: ::DWORD = 86; -pub const CERT_CEP_PROP_ID: ::DWORD = 87; -pub const CERT_SIGN_HASH_CNG_ALG_PROP_ID: ::DWORD = 89; -pub const CERT_SCARD_PIN_ID_PROP_ID: ::DWORD = 90; -pub const CERT_SCARD_PIN_INFO_PROP_ID: ::DWORD = 91; -pub const CERT_SUBJECT_PUB_KEY_BIT_LENGTH_PROP_ID: ::DWORD = 92; -pub const CERT_PUB_KEY_CNG_ALG_BIT_LENGTH_PROP_ID: ::DWORD = 93; -pub const CERT_ISSUER_PUB_KEY_BIT_LENGTH_PROP_ID: ::DWORD = 94; -pub const CERT_ISSUER_CHAIN_SIGN_HASH_CNG_ALG_PROP_ID: ::DWORD = 95; -pub const CERT_ISSUER_CHAIN_PUB_KEY_CNG_ALG_BIT_LENGTH_PROP_ID: ::DWORD = 96; -pub const CERT_NO_EXPIRE_NOTIFICATION_PROP_ID: ::DWORD = 97; -pub const CERT_AUTH_ROOT_SHA256_HASH_PROP_ID: ::DWORD = 98; -pub const CERT_NCRYPT_KEY_HANDLE_TRANSFER_PROP_ID: ::DWORD = 99; -pub const CERT_HCRYPTPROV_TRANSFER_PROP_ID: ::DWORD = 100; -pub const CERT_SMART_CARD_READER_PROP_ID: ::DWORD = 101; -pub const CERT_SEND_AS_TRUSTED_ISSUER_PROP_ID: ::DWORD = 102; -pub const CERT_KEY_REPAIR_ATTEMPTED_PROP_ID: ::DWORD = 103; -pub const CERT_DISALLOWED_FILETIME_PROP_ID: ::DWORD = 104; -pub const CERT_ROOT_PROGRAM_CHAIN_POLICIES_PROP_ID: ::DWORD = 105; -pub const CERT_SMART_CARD_READER_NON_REMOVABLE_PROP_ID: ::DWORD = 106; -pub const CERT_SHA256_HASH_PROP_ID: ::DWORD = 107; -pub const CERT_SCEP_SERVER_CERTS_PROP_ID: ::DWORD = 108; -pub const CERT_SCEP_RA_SIGNATURE_CERT_PROP_ID: ::DWORD = 109; -pub const CERT_SCEP_RA_ENCRYPTION_CERT_PROP_ID: ::DWORD = 110; -pub const CERT_SCEP_CA_CERT_PROP_ID: ::DWORD = 111; -pub const CERT_SCEP_SIGNER_CERT_PROP_ID: ::DWORD = 112; -pub const CERT_SCEP_NONCE_PROP_ID: ::DWORD = 113; -pub const CERT_SCEP_ENCRYPT_HASH_CNG_ALG_PROP_ID: ::DWORD = 114; -pub const CERT_SCEP_FLAGS_PROP_ID: ::DWORD = 115; -pub const CERT_SCEP_GUID_PROP_ID: ::DWORD = 116; -pub const CERT_SERIALIZABLE_KEY_CONTEXT_PROP_ID: ::DWORD = 117; -pub const CERT_ISOLATED_KEY_PROP_ID: ::DWORD = 118; -pub const CERT_FIRST_RESERVED_PROP_ID: ::DWORD = 119; -pub const CERT_LAST_RESERVED_PROP_ID: ::DWORD = 0x00007FFF; -pub const CERT_FIRST_USER_PROP_ID: ::DWORD = 0x00008000; -pub const CERT_LAST_USER_PROP_ID: ::DWORD = 0x0000FFFF; -pub const szOID_CERT_PROP_ID_PREFIX: &'static str = "1.3.6.1.4.1.311.10.11."; -pub const szOID_CERT_KEY_IDENTIFIER_PROP_ID: &'static str = "1.3.6.1.4.1.311.10.11.20"; -pub const szOID_CERT_ISSUER_SERIAL_NUMBER_MD5_HASH_PROP_ID: &'static str - = "1.3.6.1.4.1.311.10.11.28"; -pub const szOID_CERT_SUBJECT_NAME_MD5_HASH_PROP_ID: &'static str = "1.3.6.1.4.1.311.10.11.29"; -pub const szOID_CERT_MD5_HASH_PROP_ID: &'static str = "1.3.6.1.4.1.311.10.11.4"; -pub const szOID_CERT_SIGNATURE_HASH_PROP_ID: &'static str = "1.3.6.1.4.1.311.10.11.15"; -pub const szOID_DISALLOWED_HASH: &'static str = szOID_CERT_SIGNATURE_HASH_PROP_ID; -pub const szOID_CERT_DISALLOWED_FILETIME_PROP_ID: &'static str = "1.3.6.1.4.1.311.10.11.104"; -pub const CERT_ACCESS_STATE_WRITE_PERSIST_FLAG: ::DWORD = 0x1; -pub const CERT_ACCESS_STATE_SYSTEM_STORE_FLAG: ::DWORD = 0x2; -pub const CERT_ACCESS_STATE_LM_SYSTEM_STORE_FLAG: ::DWORD = 0x4; -pub const CERT_ACCESS_STATE_GP_SYSTEM_STORE_FLAG: ::DWORD = 0x8; -pub const CERT_ACCESS_STATE_SHARED_USER_FLAG: ::DWORD = 0x10; -pub const szOID_ROOT_PROGRAM_AUTO_UPDATE_CA_REVOCATION: &'static str = "1.3.6.1.4.1.311.60.3.1"; -pub const szOID_ROOT_PROGRAM_AUTO_UPDATE_END_REVOCATION: &'static str = "1.3.6.1.4.1.311.60.3.2"; -pub const szOID_ROOT_PROGRAM_NO_OCSP_FAILOVER_TO_CRL: &'static str = "1.3.6.1.4.1.311.60.3.3"; -STRUCT!{struct CRYPT_KEY_PROV_PARAM { - dwParam: ::DWORD, - pbData: *mut ::BYTE, - cbData: ::DWORD, - dwFlags: ::DWORD, -}} -pub type PCRYPT_KEY_PROV_PARAM = *mut CRYPT_KEY_PROV_PARAM; -STRUCT!{struct CRYPT_KEY_PROV_INFO { - pwszContainerName: ::LPWSTR, - pwszProvName: ::LPWSTR, - dwProvType: ::DWORD, - dwFlags: ::DWORD, - cProvParam: ::DWORD, - rgProvParam: PCRYPT_KEY_PROV_PARAM, - dwKeySpec: ::DWORD, -}} -pub type PCRYPT_KEY_PROV_INFO = *mut CRYPT_KEY_PROV_INFO; -pub const CERT_SET_KEY_PROV_HANDLE_PROP_ID: ::DWORD = 0x00000001; -pub const CERT_SET_KEY_CONTEXT_PROP_ID: ::DWORD = 0x00000001; -pub const CERT_NCRYPT_KEY_SPEC: ::DWORD = 0xFFFFFFFF; -//20213 -pub type HCERT_SERVER_OCSP_RESPONSE = *mut ::c_void; -STRUCT!{struct CERT_SERVER_OCSP_RESPONSE_CONTEXT { - cbSize: ::DWORD, - pbEncodedOcspResponse: *mut ::BYTE, - cbEncodedOcspResponse: ::DWORD, -}} -pub type PCERT_SERVER_OCSP_RESPONSE_CONTEXT = *mut CERT_SERVER_OCSP_RESPONSE_CONTEXT; -pub type PCCERT_SERVER_OCSP_RESPONSE_CONTEXT = *const CERT_SERVER_OCSP_RESPONSE_CONTEXT; -STRUCT!{struct CERT_CHAIN_ENGINE_CONFIG { - cbSize: ::DWORD, - hRestrictedRoot: HCERTSTORE, - hRestrictedTrust: HCERTSTORE, - hRestrictedOther: HCERTSTORE, - cAdditionalStore: ::DWORD, - rghAdditionalStore: *mut HCERTSTORE, - dwFlags: ::DWORD, - dwUrlRetrievalTimeout: ::DWORD, - MaximumCachedCertificates: ::DWORD, - CycleDetectionModulus: ::DWORD, - // #if (NTDDI_VERSION >= NTDDI_WIN7) - hExclusiveRoot: HCERTSTORE, - hExclusiveTrustedPeople: HCERTSTORE, - // #if (NTDDI_VERSION >= NTDDI_WIN8) - dwExclusiveFlags: ::DWORD, -}} -pub type PCERT_CHAIN_ENGINE_CONFIG = *mut CERT_CHAIN_ENGINE_CONFIG; -// 18748 -pub type HCERTCHAINENGINE = ::HANDLE; -pub type PFN_CERT_CREATE_CONTEXT_SORT_FUNC = Option<unsafe extern "system" fn( - cbTotalEncoded: ::DWORD, cbRemainEncoded: ::DWORD, cEntry: ::DWORD, pvSort: *mut ::c_void -) -> ::BOOL>; -#[repr(C)] #[derive(Copy)] -pub struct CERT_CREATE_CONTEXT_PARA { - pub cbSize: ::DWORD, - pub pfnFree: PFN_CRYPT_FREE, - pub pvFree: *mut ::c_void, - pub pfnSort: PFN_CERT_CREATE_CONTEXT_SORT_FUNC, - pub pvSort: *mut ::c_void, -} -impl Clone for CERT_CREATE_CONTEXT_PARA { fn clone(&self) -> CERT_CREATE_CONTEXT_PARA { *self } } -pub type PCERT_CREATE_CONTEXT_PARA = *mut CERT_CREATE_CONTEXT_PARA; -STRUCT!{struct CERT_EXTENSIONS { - cExtension: ::DWORD, - rgExtension: PCERT_EXTENSION, -}} -pub type PCERT_EXTENSIONS = *mut CERT_EXTENSIONS; -STRUCT!{struct CERT_REVOCATION_CRL_INFO { - cbSize: ::DWORD, - pBaseCrlContext: PCCRL_CONTEXT, - pDeltaCrlContext: PCCRL_CONTEXT, - pCrlEntry: PCRL_ENTRY, - fDeltaCrlEntry: ::BOOL, -}} -pub type PCERT_REVOCATION_CRL_INFO = *mut CERT_REVOCATION_CRL_INFO; -STRUCT!{struct CERT_TRUST_STATUS { - dwErrorStatus: ::DWORD, - dwInfoStatus: ::DWORD, -}} -pub type PCERT_TRUST_STATUS = *mut CERT_TRUST_STATUS; -STRUCT!{struct CERT_REVOCATION_INFO { - cbSize: ::DWORD, - dwRevocationResult: ::DWORD, - pszRevocationOid: ::LPCSTR, - pvOidSpecificInfo: ::LPVOID, - fHasFreshnessTime: ::BOOL, - dwFreshnessTime: ::DWORD, - pCrlInfo: PCERT_REVOCATION_CRL_INFO, -}} -pub type PCERT_REVOCATION_INFO = *mut CERT_REVOCATION_INFO; -STRUCT!{struct CERT_TRUST_LIST_INFO { - cbSize: ::DWORD, - pCtlEntry: PCTL_ENTRY, - pCtlContext: PCCTL_CONTEXT, -}} -pub type PCERT_TRUST_LIST_INFO = *mut CERT_TRUST_LIST_INFO; -STRUCT!{struct CERT_CHAIN_ELEMENT { - cbSize: ::DWORD, - pCertContext: PCCERT_CONTEXT, - TrustStatus: CERT_TRUST_STATUS, - pRevocationInfo: PCERT_REVOCATION_INFO, - pIssuanceUsage: PCERT_ENHKEY_USAGE, - pApplicationUsage: PCERT_ENHKEY_USAGE, - pwszExtendedErrorInfo: ::LPWSTR, -}} -pub type PCERT_CHAIN_ELEMENT = *mut CERT_CHAIN_ELEMENT; -pub type PCCERT_CHAIN_ELEMENT = *const CERT_CHAIN_ELEMENT; -STRUCT!{struct CERT_SIMPLE_CHAIN { - cbSize: ::DWORD, - TrustStatus: CERT_TRUST_STATUS, - cElement: ::DWORD, - rgpElement: *mut PCERT_CHAIN_ELEMENT, - pTrustListInfo: PCERT_TRUST_LIST_INFO, - fHasRevocationFreshnessTime: ::BOOL, - dwRevocationFreshnessTime: ::DWORD, -}} -pub type PCERT_SIMPLE_CHAIN = *mut CERT_SIMPLE_CHAIN; -pub type PCCERT_SIMPLE_CHAIN = *const CERT_SIMPLE_CHAIN; -STRUCT!{struct CERT_CHAIN_CONTEXT { - cbSize: ::DWORD, - TrustStatus: CERT_TRUST_STATUS, - cChain: ::DWORD, - rgpChain: *mut PCERT_SIMPLE_CHAIN, - cLowerQualityChainContext: ::DWORD, - rgpLowerQualityChainContext: *mut PCCERT_CHAIN_CONTEXT, - fHasRevocationFreshnessTime: ::BOOL, - dwRevocationFreshnessTime: ::DWORD, - dwCreateFlags: ::DWORD, - ChainId: ::GUID, -}} -pub type PCERT_CHAIN_CONTEXT = *mut CERT_CHAIN_CONTEXT; -pub type PCCERT_CHAIN_CONTEXT = *const CERT_CHAIN_CONTEXT; -STRUCT!{struct CERT_PHYSICAL_STORE_INFO { - cbSize: ::DWORD, - pszOpenStoreProvider: ::LPSTR, - dwOpenEncodingType: ::DWORD, - dwOpenFlags: ::DWORD, - OpenParameters: CRYPT_DATA_BLOB, - dwFlags: ::DWORD, - dwPriority: ::DWORD, -}} -pub type PCERT_PHYSICAL_STORE_INFO = *mut CERT_PHYSICAL_STORE_INFO; -STRUCT!{struct CERT_SYSTEM_STORE_INFO { - cbSize: ::DWORD, -}} -pub type PCERT_SYSTEM_STORE_INFO = *mut CERT_SYSTEM_STORE_INFO; -//13401 -pub type PFN_CERT_ENUM_SYSTEM_STORE_LOCATION = Option<unsafe extern "system" fn( - pwszStoreLocation: ::LPCWSTR, dwFlags: ::DWORD, pvReserved: *mut ::c_void, pvArg: *mut ::c_void, -) -> ::BOOL>; -//13408 -pub type PFN_CERT_ENUM_SYSTEM_STORE = Option<unsafe extern "system" fn( - pvSystemStore: *const ::c_void, dwFlags: ::DWORD, pStoreInfo: PCERT_SYSTEM_STORE_INFO, - pvReserved: *mut ::c_void, pvArg: *mut ::c_void, -) -> ::BOOL>; -//13416 -pub type PFN_CERT_ENUM_PHYSICAL_STORE = Option<unsafe extern "system" fn( - pvSystemStore: *const ::c_void, dwFlags: ::DWORD, pwszStoreName: ::LPCWSTR, - pStoreInfo: PCERT_PHYSICAL_STORE_INFO, pvReserved: *mut ::c_void, pvArg: *mut ::c_void, -) -> ::BOOL>; -STRUCT!{struct CERT_STRONG_SIGN_SERIALIZED_INFO { - dwFlags: ::DWORD, - pwszCNGSignHashAlgids: ::LPWSTR, - pwszCNGPubKeyMinBitLengths: ::LPWSTR, -}} -pub type PCERT_STRONG_SIGN_SERIALIZED_INFO = *mut CERT_STRONG_SIGN_SERIALIZED_INFO; -STRUCT!{struct CERT_STRONG_SIGN_PARA { - cbSize: ::DWORD, - dwInfoChoice: ::DWORD, - pvInfo: *mut ::c_void, -}} -UNION!( - CERT_STRONG_SIGN_PARA, pvInfo, pSerializedInfo, pSerializedInfo_mut, - PCERT_STRONG_SIGN_SERIALIZED_INFO -); -UNION!(CERT_STRONG_SIGN_PARA, pvInfo, pszOID, pszOID_mut, ::LPSTR); -pub type PCERT_STRONG_SIGN_PARA = *mut CERT_STRONG_SIGN_PARA; -pub type PCCERT_STRONG_SIGN_PARA = *const CERT_STRONG_SIGN_PARA; -STRUCT!{struct CERT_USAGE_MATCH { - dwType: ::DWORD, - Usage: CERT_ENHKEY_USAGE, -}} -pub type PCERT_USAGE_MATCH = *mut CERT_USAGE_MATCH; -STRUCT!{struct CERT_CHAIN_PARA { - cbSize: ::DWORD, - RequestedUsage: CERT_USAGE_MATCH, - RequestedIssuancePolicy: CERT_USAGE_MATCH, - dwUrlRetrievalTimeout: ::DWORD, - fCheckRevocationFreshnessTime: ::BOOL, - dwRevocationFreshnessTime: ::DWORD, - pftCacheResync: ::LPFILETIME, - pStrongSignPara: PCCERT_STRONG_SIGN_PARA, - dwStrongSignFlags: ::DWORD, -}} -pub type PCERT_CHAIN_PARA = *mut CERT_CHAIN_PARA; -STRUCT!{struct CERT_SELECT_CHAIN_PARA { - hChainEngine: HCERTCHAINENGINE, - pTime: ::PFILETIME, - hAdditionalStore: HCERTSTORE, - pChainPara: PCERT_CHAIN_PARA, - dwFlags: ::DWORD, -}} -pub type PCERT_SELECT_CHAIN_PARA = *mut CERT_SELECT_CHAIN_PARA; -pub type PCCERT_SELECT_CHAIN_PARA = *const CERT_SELECT_CHAIN_PARA; -STRUCT!{struct CERT_SELECT_CRITERIA { - dwType: ::DWORD, - cPara: ::DWORD, - ppPara: *mut *mut ::c_void, -}} -pub type PCERT_SELECT_CRITERIA = *mut CERT_SELECT_CRITERIA; -pub type PCCERT_SELECT_CRITERIA = *const CERT_SELECT_CRITERIA; -STRUCT!{struct CTL_VERIFY_USAGE_PARA { - cbSize: ::DWORD, - ListIdentifier: CRYPT_DATA_BLOB, - cCtlStore: ::DWORD, - rghCtlStore: *mut HCERTSTORE, - cSignerStore: ::DWORD, - rghSignerStore: *mut HCERTSTORE, -}} -pub type PCTL_VERIFY_USAGE_PARA = *mut CTL_VERIFY_USAGE_PARA; -STRUCT!{struct CTL_VERIFY_USAGE_STATUS { - cbSize: ::DWORD, - dwError: ::DWORD, - dwFlags: ::DWORD, - ppCtl: *mut PCCTL_CONTEXT, - dwCtlEntryIndex: ::DWORD, - ppSigner: *mut PCCERT_CONTEXT, - dwSignerIndex: ::DWORD, -}} -pub type PCTL_VERIFY_USAGE_STATUS = *mut CTL_VERIFY_USAGE_STATUS; -STRUCT!{struct CERT_CHAIN_POLICY_PARA { - cbSize: ::DWORD, - dwFlags: ::DWORD, - pvExtraPolicyPara: *mut ::c_void, -}} -pub type PCERT_CHAIN_POLICY_PARA = *mut CERT_CHAIN_POLICY_PARA; -STRUCT!{struct CERT_CHAIN_POLICY_STATUS { - cbSize: ::DWORD, - dwError: ::DWORD, - lChainIndex: ::LONG, - lElementIndex: ::LONG, - pvExtraPolicyStatus: *mut ::c_void, -}} -pub type PCERT_CHAIN_POLICY_STATUS = *mut CERT_CHAIN_POLICY_STATUS; -STRUCT!{struct CERT_REVOCATION_CHAIN_PARA { - cbSize: ::DWORD, - hChainEngine: HCERTCHAINENGINE, - hAdditionalStore: HCERTSTORE, - dwChainFlags: ::DWORD, - dwUrlRetrievalTimeout: ::DWORD, - pftCurrentTime: ::LPFILETIME, - pftCacheResync: ::LPFILETIME, -}} -pub type PCERT_REVOCATION_CHAIN_PARA = *mut CERT_REVOCATION_CHAIN_PARA; -STRUCT!{struct CERT_REVOCATION_PARA { - cbSize: ::DWORD, - pIssuerCert: PCCERT_CONTEXT, - cCertStore: ::DWORD, - rgCertStore: *mut HCERTSTORE, - hCrlStore: HCERTSTORE, - pftTimeToUse: ::LPFILETIME, - dwUrlRetrievalTimeout: ::DWORD, - fCheckFreshnessTime: ::BOOL, - dwFreshnessTime: ::DWORD, - pftCurrentTime: ::LPFILETIME, - pCrlInfo: PCERT_REVOCATION_CRL_INFO, - pftCacheResync: ::LPFILETIME, - pChainPara: PCERT_REVOCATION_CHAIN_PARA, -}} -pub type PCERT_REVOCATION_PARA = *mut CERT_REVOCATION_PARA; -STRUCT!{struct CERT_REVOCATION_STATUS { - cbSize: ::DWORD, - dwIndex: ::DWORD, - dwError: ::DWORD, - dwReason: ::DWORD, - fHasFreshnessTime: ::BOOL, - dwFreshnessTime: ::DWORD, -}} -pub type PCERT_REVOCATION_STATUS = *mut CERT_REVOCATION_STATUS; -//16990 -pub type HCRYPTASYNC = ::HANDLE; -pub type PHCRYPTASYNC = *mut ::HANDLE; -STRUCT!{struct CRYPT_ENCRYPT_MESSAGE_PARA { - cbSize: ::DWORD, - dwMsgEncodingType: ::DWORD, - hCryptProv: HCRYPTPROV_LEGACY, - ContentEncryptionAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, - pvEncryptionAuxInfo: *mut ::c_void, - dwFlags: ::DWORD, - dwInnerContentType: ::DWORD, -}} -pub type PCRYPT_ENCRYPT_MESSAGE_PARA = *mut CRYPT_DECRYPT_MESSAGE_PARA; -STRUCT!{struct CRYPT_DECRYPT_MESSAGE_PARA { - cbSize: ::DWORD, - dwMsgAndCertEncodingType: ::DWORD, - cCertStore: ::DWORD, - rghCertStore: *mut HCERTSTORE, - dwFlags: ::DWORD, -}} -pub type PCRYPT_DECRYPT_MESSAGE_PARA = *mut CRYPT_DECRYPT_MESSAGE_PARA; -pub type PFN_CRYPT_GET_SIGNER_CERTIFICATE = Option<unsafe extern "system" fn( - pvGetArg: *mut ::c_void, dwCertEncodingType: ::DWORD, pSignerId: PCERT_INFO, - hMsgCertStore: HCERTSTORE, -) -> PCCERT_CONTEXT>; -#[repr(C)] #[derive(Copy)] -pub struct CRYPT_VERIFY_MESSAGE_PARA { - pub cbSize: ::DWORD, - pub dwMsgAndCertEncodingType: ::DWORD, - pub hCryptProv: HCRYPTPROV_LEGACY, - pub pfnGetSignerCertificate: PFN_CRYPT_GET_SIGNER_CERTIFICATE, - pub pvGetArg: *mut ::c_void, - pub pStrongSignPara: PCCERT_STRONG_SIGN_PARA, -} -impl Clone for CRYPT_VERIFY_MESSAGE_PARA { fn clone(&self) -> CRYPT_VERIFY_MESSAGE_PARA { *self } } -pub type PCRYPT_VERIFY_MESSAGE_PARA = *mut CRYPT_VERIFY_MESSAGE_PARA; -STRUCT!{struct CRYPT_OID_INFO { - cbSize: ::DWORD, - oszOID: ::LPCSTR, - pwszName: ::LPCWSTR, - dwGroupId: ::DWORD, - dwValue: ::DWORD, - ExtraInfo: CRYPT_DATA_BLOB, - pwszCNGAlgid: ::LPCWSTR, - pwszCNGExtraAlgid: ::LPCWSTR, -}} -UNION!(CRYPT_OID_INFO, dwValue, Algid, Algid_mut, ALG_ID); -UNION!(CRYPT_OID_INFO, dwValue, dwLength, dwLength_mut, ::DWORD); -pub type PCRYPT_OID_INFO = *mut CRYPT_OID_INFO; -pub type PCCRYPT_OID_INFO = *const CRYPT_OID_INFO; -//18004 -pub type PFN_CRYPT_ENUM_KEYID_PROP = Option<unsafe extern "system" fn( - pKeyIdentifier: *const CRYPT_HASH_BLOB, dwFlags: ::DWORD, pvReserved: *mut ::c_void, - pvArg: *mut ::c_void, cProp: ::DWORD, rgdwPropId: *mut ::DWORD, rgpvData: *mut *mut ::c_void, - rgcbData: *mut ::DWORD, -) -> ::BOOL>; -//6379 -pub type PFN_CRYPT_ENUM_OID_FUNC = Option<unsafe extern "system" fn( - dwEncodingType: ::DWORD, pszFuncName: ::LPCSTR, pszOID: ::LPCSTR, cValue: ::DWORD, - rgdwValueType: *const ::DWORD, rgpwszValueName: *const ::LPCWSTR, - rgpbValueData: *const *const ::BYTE, rgcbValueData: *const ::DWORD, pvArg: *mut ::c_void, -) -> ::BOOL>; -//6675 -pub type PFN_CRYPT_ENUM_OID_INFO = Option<unsafe extern "system" fn( - pInfo: PCCRYPT_OID_INFO, pvArg: *mut ::c_void, -) -> ::BOOL>; -//6022 -pub type HCRYPTOIDFUNCSET = *mut ::c_void; -pub type HCRYPTOIDFUNCADDR = *mut ::c_void; -pub type PFN_CRYPT_ASYNC_PARAM_FREE_FUNC = Option<unsafe extern "system" fn( - pszParamOid: ::LPSTR, pvParam: ::LPVOID, -)>; -STRUCT!{struct CRYPT_HASH_MESSAGE_PARA { - cbSize: ::DWORD, - dwMsgEncodingType: ::DWORD, - hCryptProv: HCRYPTPROV_LEGACY, - HashAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, - pvHashAuxInfo: *mut ::c_void, -}} -pub type PCRYPT_HASH_MESSAGE_PARA = *mut CRYPT_HASH_MESSAGE_PARA; -//14750 -pub type HCRYPTDEFAULTCONTEXT = *mut ::c_void; -STRUCT!{struct CRYPT_OID_FUNC_ENTRY { - pszOID: ::LPCSTR, - pvFuncAddr: *mut ::c_void, -}} -pub type PCRYPT_OID_FUNC_ENTRY = *mut CRYPT_OID_FUNC_ENTRY; -STRUCT!{struct CMSG_SIGNER_ENCODE_INFO { - cbSize: ::DWORD, - pCertInfo: PCERT_INFO, - hCryptProv: HCRYPTPROV, - dwKeySpec: ::DWORD, - HashAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, - pvHashAuxInfo: *mut ::c_void, - cAuthAttr: ::DWORD, - rgAuthAttr: PCRYPT_ATTRIBUTE, - cUnauthAttr: ::DWORD, - rgUnauthAttr: PCRYPT_ATTRIBUTE, -}} -UNION!(CMSG_SIGNER_ENCODE_INFO, hCryptProv, hNCryptKey, hNCryptKey_mut, ::NCRYPT_KEY_HANDLE); -pub type PCMSG_SIGNER_ENCODE_INFO = *mut CMSG_SIGNER_ENCODE_INFO; -STRUCT!{struct CMSG_SIGNED_ENCODE_INFO { - cbSize: ::DWORD, - cSigners: ::DWORD, - rgSigners: PCMSG_SIGNER_ENCODE_INFO, - cCertEncoded: ::DWORD, - rgCertEncoded: PCERT_BLOB, - cCrlEncoded: ::DWORD, - rgCrlEncoded: PCRL_BLOB, -}} -pub type PCMSG_SIGNED_ENCODE_INFO = *mut CMSG_SIGNED_ENCODE_INFO; -//7393 -pub type PFN_CMSG_STREAM_OUTPUT = Option<unsafe extern "system" fn( - pvArg: *const ::c_void, pbData: *mut ::BYTE, cbData: ::DWORD, fFinal: ::BOOL, -) -> ::BOOL>; -#[repr(C)] #[derive(Copy)] -pub struct CMSG_STREAM_INFO { - pub cbContent: ::DWORD, - pub pfnStreamOutput: PFN_CMSG_STREAM_OUTPUT, - pub pvArg: *mut ::c_void, -} -impl Clone for CMSG_STREAM_INFO { fn clone(&self) -> CMSG_STREAM_INFO { *self } } -pub type PCMSG_STREAM_INFO = *mut CMSG_STREAM_INFO; -STRUCT!{struct CRYPT_TIMESTAMP_ACCURACY { - dwSeconds: ::DWORD, - dwMillis: ::DWORD, - dwMicros: ::DWORD, -}} -pub type PCRYPT_TIMESTAMP_ACCURACY = *mut CRYPT_TIMESTAMP_ACCURACY; -STRUCT!{struct CRYPT_TIMESTAMP_INFO { - dwVersion: ::DWORD, - pszTSAPolicyId: ::LPSTR, - HashAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, - HashedMessage: CRYPT_DER_BLOB, - SerialNumber: CRYPT_INTEGER_BLOB, - ftTime: ::FILETIME, - pvAccuracy: PCRYPT_TIMESTAMP_ACCURACY, - fOrdering: ::BOOL, - Nonce: CRYPT_DER_BLOB, - Tsa: CRYPT_DER_BLOB, - cExtension: ::DWORD, - rgExtension: PCERT_EXTENSION, -}} -pub type PCRYPT_TIMESTAMP_INFO = *mut CRYPT_TIMESTAMP_INFO; -STRUCT!{struct CRYPT_TIMESTAMP_CONTEXT { - cbEncoded: ::DWORD, - pbEncoded: *mut ::BYTE, - pTimeStamp: PCRYPT_TIMESTAMP_INFO, -}} -pub type PCRYPT_TIMESTAMP_CONTEXT = *mut CRYPT_TIMESTAMP_CONTEXT; -STRUCT!{struct CRYPT_TIMESTAMP_PARA { - pszTSAPolicyId: ::LPCSTR, - fRequestCerts: ::BOOL, - Nonce: CRYPT_INTEGER_BLOB, - cExtension: ::DWORD, - rgExtension: PCERT_EXTENSION, -}} -pub type PCRYPT_TIMESTAMP_PARA = *mut CRYPT_TIMESTAMP_PARA; -STRUCT!{struct CRYPT_SIGN_MESSAGE_PARA { - cbSize: ::DWORD, - dwMsgEncodingType: ::DWORD, - pSigningCert: PCCERT_CONTEXT, - HashAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, - pvHashAuxInfo: *mut ::c_void, - cMsgCert: ::DWORD, - rgpMsgCert: *mut PCCERT_CONTEXT, - cMsgCrl: ::DWORD, - rgpMsgCrl: *mut PCCRL_CONTEXT, - cAuthAttr: ::DWORD, - rgAuthAttr: PCRYPT_ATTRIBUTE, - cUnauthAttr: ::DWORD, - rgUnauthAttr: PCRYPT_ATTRIBUTE, - dwFlags: ::DWORD, - dwInnerContentType: ::DWORD, -}} -pub type PCRYPT_SIGN_MESSAGE_PARA = *mut CRYPT_SIGN_MESSAGE_PARA; -STRUCT!{struct CRYPT_KEY_SIGN_MESSAGE_PARA { - cbSize: ::DWORD, - dwMsgAndCertEncodingType: ::DWORD, - hCryptProv: HCRYPTPROV, - dwKeySpec: ::DWORD, - HashAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, - pvHashAuxInfo: *mut ::c_void, - PubKeyAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, -}} -UNION!(CRYPT_KEY_SIGN_MESSAGE_PARA, hCryptProv, hNCryptKey, hNCryptKey_mut, ::NCRYPT_KEY_HANDLE); -pub type PCRYPT_KEY_SIGN_MESSAGE_PARA = *mut CRYPT_KEY_SIGN_MESSAGE_PARA; -STRUCT!{struct CRYPT_KEY_VERIFY_MESSAGE_PARA { - cbSize: ::DWORD, - dwMsgEncodingType: ::DWORD, - hCryptProv: HCRYPTPROV_LEGACY, -}} -pub type PCRYPT_KEY_VERIFY_MESSAGE_PARA = *mut CRYPT_KEY_VERIFY_MESSAGE_PARA; diff --git a/deps/winapi-0.2.5/src/wingdi.rs b/deps/winapi-0.2.5/src/wingdi.rs deleted file mode 100644 index b251985a9..000000000 --- a/deps/winapi-0.2.5/src/wingdi.rs +++ /dev/null @@ -1,1250 +0,0 @@ -// Copyright © 2015, Peter Atashian -// Licensed under the MIT License <LICENSE.md> -//! GDI procedure declarations, constant definitions and macros -pub const DISPLAY_DEVICE_ATTACHED_TO_DESKTOP: ::DWORD = 0x00000001; -pub const DISPLAY_DEVICE_MULTI_DRIVER: ::DWORD = 0x00000002; -pub const DISPLAY_DEVICE_PRIMARY_DEVICE: ::DWORD = 0x00000004; -pub const DISPLAY_DEVICE_MIRRORING_DRIVER: ::DWORD = 0x00000008; -pub const DISPLAY_DEVICE_VGA_COMPATIBLE: ::DWORD = 0x00000010; -pub const DISPLAY_DEVICE_REMOVABLE: ::DWORD = 0x00000020; -pub const DISPLAY_DEVICE_ACC_DRIVER: ::DWORD = 0x00000040; -pub const DISPLAY_DEVICE_MODESPRUNED: ::DWORD = 0x08000000; -pub const DISPLAY_DEVICE_REMOTE: ::DWORD = 0x04000000; -pub const DISPLAY_DEVICE_DISCONNECT: ::DWORD = 0x02000000; -pub const DISPLAY_DEVICE_TS_COMPATIBLE: ::DWORD = 0x00200000; -pub const DISPLAY_DEVICE_UNSAFE_MODES_ON: ::DWORD = 0x00080000; -pub const DISPLAY_DEVICE_ACTIVE: ::DWORD = 0x00000001; -pub const DISPLAY_DEVICE_ATTACHED: ::DWORD = 0x00000002; -pub const DM_ORIENTATION: ::DWORD = 0x00000001; -pub const DM_PAPERSIZE: ::DWORD = 0x00000002; -pub const DM_PAPERLENGTH: ::DWORD = 0x00000004; -pub const DM_PAPERWIDTH: ::DWORD = 0x00000008; -pub const DM_SCALE: ::DWORD = 0x00000010; -pub const DM_POSITION: ::DWORD = 0x00000020; -pub const DM_NUP: ::DWORD = 0x00000040; -pub const DM_DISPLAYORIENTATION: ::DWORD = 0x00000080; -pub const DM_COPIES: ::DWORD = 0x00000100; -pub const DM_DEFAULTSOURCE: ::DWORD = 0x00000200; -pub const DM_PRINTQUALITY: ::DWORD = 0x00000400; -pub const DM_COLOR: ::DWORD = 0x00000800; -pub const DM_DUPLEX: ::DWORD = 0x00001000; -pub const DM_YRESOLUTION: ::DWORD = 0x00002000; -pub const DM_TTOPTION: ::DWORD = 0x00004000; -pub const DM_COLLATE: ::DWORD = 0x00008000; -pub const DM_FORMNAME: ::DWORD = 0x00010000; -pub const DM_LOGPIXELS: ::DWORD = 0x00020000; -pub const DM_BITSPERPEL: ::DWORD = 0x00040000; -pub const DM_PELSWIDTH: ::DWORD = 0x00080000; -pub const DM_PELSHEIGHT: ::DWORD = 0x00100000; -pub const DM_DISPLAYFLAGS: ::DWORD = 0x00200000; -pub const DM_DISPLAYFREQUENCY: ::DWORD = 0x00400000; -pub const DM_ICMMETHOD: ::DWORD = 0x00800000; -pub const DM_ICMINTENT: ::DWORD = 0x01000000; -pub const DM_MEDIATYPE: ::DWORD = 0x02000000; -pub const DM_DITHERTYPE: ::DWORD = 0x04000000; -pub const DM_PANNINGWIDTH: ::DWORD = 0x08000000; -pub const DM_PANNINGHEIGHT: ::DWORD = 0x10000000; -pub const DM_DISPLAYFIXEDOUTPUT: ::DWORD = 0x20000000; -pub const PFD_TYPE_RGBA: ::BYTE = 0; -pub const PFD_TYPE_COLORINDEX: ::BYTE = 1; -pub const PFD_MAIN_PLANE: ::BYTE = 0; -pub const PFD_OVERLAY_PLANE: ::BYTE = 1; -pub const PFD_UNDERLAY_PLANE: ::BYTE = 0xFF; -pub const PFD_DOUBLEBUFFER: ::DWORD = 0x00000001; -pub const PFD_STEREO: ::DWORD = 0x00000002; -pub const PFD_DRAW_TO_WINDOW: ::DWORD = 0x00000004; -pub const PFD_DRAW_TO_BITMAP: ::DWORD = 0x00000008; -pub const PFD_SUPPORT_GDI: ::DWORD = 0x00000010; -pub const PFD_SUPPORT_OPENGL: ::DWORD = 0x00000020; -pub const PFD_GENERIC_FORMAT: ::DWORD = 0x00000040; -pub const PFD_NEED_PALETTE: ::DWORD = 0x00000080; -pub const PFD_NEED_SYSTEM_PALETTE: ::DWORD = 0x00000100; -pub const PFD_SWAP_EXCHANGE: ::DWORD = 0x00000200; -pub const PFD_SWAP_COPY: ::DWORD = 0x00000400; -pub const PFD_SWAP_LAYER_BUFFERS: ::DWORD = 0x00000800; -pub const PFD_GENERIC_ACCELERATED: ::DWORD = 0x00001000; -pub const PFD_SUPPORT_DIRECTDRAW: ::DWORD = 0x00002000; -pub const PFD_DIRECT3D_ACCELERATED: ::DWORD = 0x00004000; -pub const PFD_SUPPORT_COMPOSITION: ::DWORD = 0x00008000; -pub const PFD_DEPTH_DONTCARE: ::DWORD = 0x20000000; -pub const PFD_DOUBLEBUFFER_DONTCARE: ::DWORD = 0x40000000; -pub const PFD_STEREO_DONTCARE: ::DWORD = 0x80000000; -pub const CCHFORMNAME: usize = 32; -STRUCT!{struct DEVMODEA { - dmDeviceName: [::CHAR; ::CCHDEVICENAME], - dmSpecVersion: ::WORD, - dmDriverVersion: ::WORD, - dmSize: ::WORD, - dmDriverExtra: ::WORD, - dmFields: ::DWORD, - union1: [u8; 16], - dmColor: ::c_short, - dmDuplex: ::c_short, - dmYResolution: ::c_short, - dmTTOption: ::c_short, - dmCollate: ::c_short, - dmFormName: [::CHAR; CCHFORMNAME], - dmLogPixels: ::WORD, - dmBitsPerPel: ::DWORD, - dmPelsWidth: ::DWORD, - dmPelsHeight: ::DWORD, - dmDisplayFlags: ::DWORD, - dmDisplayFrequency: ::DWORD, - dmICMMethod: ::DWORD, - dmICMIntent: ::DWORD, - dmMediaType: ::DWORD, - dmDitherType: ::DWORD, - dmReserved1: ::DWORD, - dmReserved2: ::DWORD, - dmPanningWidth: ::DWORD, - dmPanningHeight: ::DWORD, -}} -pub type PDEVMODEA = *mut DEVMODEA; -pub type NPDEVMODEA = *mut DEVMODEA; -pub type LPDEVMODEA = *mut DEVMODEA; -STRUCT!{struct DEVMODEW { - dmDeviceName: [::WCHAR; ::CCHDEVICENAME], - dmSpecVersion: ::WORD, - dmDriverVersion: ::WORD, - dmSize: ::WORD, - dmDriverExtra: ::WORD, - dmFields: ::DWORD, - union1: [u8; 16], - dmColor: ::c_short, - dmDuplex: ::c_short, - dmYResolution: ::c_short, - dmTTOption: ::c_short, - dmCollate: ::c_short, - dmFormName: [::WCHAR; CCHFORMNAME], - dmLogPixels: ::WORD, - dmBitsPerPel: ::DWORD, - dmPelsWidth: ::DWORD, - dmPelsHeight: ::DWORD, - dmDisplayFlags: ::DWORD, - dmDisplayFrequency: ::DWORD, - dmICMMethod: ::DWORD, - dmICMIntent: ::DWORD, - dmMediaType: ::DWORD, - dmDitherType: ::DWORD, - dmReserved1: ::DWORD, - dmReserved2: ::DWORD, - dmPanningWidth: ::DWORD, - dmPanningHeight: ::DWORD, -}} -pub type PDEVMODEW = *mut DEVMODEW; -pub type NPDEVMODEW = *mut DEVMODEW; -pub type LPDEVMODEW = *mut DEVMODEW; -#[repr(C)] #[derive(Copy)] -pub struct DISPLAY_DEVICEW { - pub cb: ::DWORD, - pub DeviceName: [::WCHAR; 32], - pub DeviceString: [::WCHAR; 128], - pub StateFlags: ::DWORD, - pub DeviceID: [::WCHAR; 128], - pub DeviceKey: [::WCHAR; 128], -} -impl Clone for DISPLAY_DEVICEW { fn clone(&self) -> DISPLAY_DEVICEW { *self } } -pub type PDISPLAY_DEVICEW = *mut DISPLAY_DEVICEW; -pub type LPDISPLAY_DEVICEW = *mut DISPLAY_DEVICEW; -#[repr(C)] #[derive(Copy)] -pub struct DISPLAY_DEVICEA { - pub cb: ::DWORD, - pub DeviceName: [::CHAR; 32], - pub DeviceString: [::CHAR; 128], - pub StateFlags: ::DWORD, - pub DeviceID: [::CHAR; 128], - pub DeviceKey: [::CHAR; 128], -} -impl Clone for DISPLAY_DEVICEA { fn clone(&self) -> DISPLAY_DEVICEA { *self } } -pub type PDISPLAY_DEVICEA = *mut DISPLAY_DEVICEA; -pub type LPDISPLAY_DEVICEA = *mut DISPLAY_DEVICEA; -STRUCT!{struct PIXELFORMATDESCRIPTOR { - nSize: ::WORD, - nVersion: ::WORD, - dwFlags: ::DWORD, - iPixelType: ::BYTE, - cColorBits: ::BYTE, - cRedBits: ::BYTE, - cRedShift: ::BYTE, - cGreenBits: ::BYTE, - cGreenShift: ::BYTE, - cBlueBits: ::BYTE, - cBlueShift: ::BYTE, - cAlphaBits: ::BYTE, - cAlphaShift: ::BYTE, - cAccumBits: ::BYTE, - cAccumRedBits: ::BYTE, - cAccumGreenBits: ::BYTE, - cAccumBlueBits: ::BYTE, - cAccumAlphaBits: ::BYTE, - cDepthBits: ::BYTE, - cStencilBits: ::BYTE, - cAuxBuffers: ::BYTE, - iLayerType: ::BYTE, - bReserved: ::BYTE, - dwLayerMask: ::DWORD, - dwVisibleMask: ::DWORD, - dwDamageMask: ::DWORD, -}} -pub type PPIXELFORMATDESCRIPTOR = *mut PIXELFORMATDESCRIPTOR; -pub type LPPIXELFORMATDESCRIPTOR = *mut PIXELFORMATDESCRIPTOR; -pub const R2_BLACK: ::c_int = 1; -pub const R2_NOTMERGEPEN: ::c_int = 2; -pub const R2_MASKNOTPEN: ::c_int = 3; -pub const R2_NOTCOPYPEN: ::c_int = 4; -pub const R2_MASKPENNOT: ::c_int = 5; -pub const R2_NOT: ::c_int = 6; -pub const R2_XORPEN: ::c_int = 7; -pub const R2_NOTMASKPEN: ::c_int = 8; -pub const R2_MASKPEN: ::c_int = 9; -pub const R2_NOTXORPEN: ::c_int = 10; -pub const R2_NOP: ::c_int = 11; -pub const R2_MERGENOTPEN: ::c_int = 12; -pub const R2_COPYPEN: ::c_int = 13; -pub const R2_MERGEPENNOT: ::c_int = 14; -pub const R2_MERGEPEN: ::c_int = 15; -pub const R2_WHITE: ::c_int = 16; -pub const R2_LAST: ::c_int = 16; -//83 -pub const SRCCOPY: ::DWORD = 0x00CC0020; -pub const SRCPAINT: ::DWORD = 0x00EE0086; -pub const SRCAND: ::DWORD = 0x008800C6; -pub const SRCINVERT: ::DWORD = 0x00660046; -pub const SRCERASE: ::DWORD = 0x00440328; -pub const NOTSRCCOPY: ::DWORD = 0x00330008; -pub const NOTSRCERASE: ::DWORD = 0x001100A6; -pub const MERGECOPY: ::DWORD = 0x00C000CA; -pub const MERGEPAINT: ::DWORD = 0x00BB0226; -pub const PATCOPY: ::DWORD = 0x00F00021; -pub const PATPAINT: ::DWORD = 0x00FB0A09; -pub const PATINVERT: ::DWORD = 0x005A0049; -pub const DSTINVERT: ::DWORD = 0x00550009; -pub const BLACKNESS: ::DWORD = 0x00000042; -pub const WHITENESS: ::DWORD = 0x00FF0062; -//121 -// fnCombineMode values for CombineRgn -pub const RGN_AND: ::c_int = 1; -pub const RGN_OR: ::c_int = 2; -pub const RGN_XOR: ::c_int = 3; -pub const RGN_DIFF: ::c_int = 4; -pub const RGN_COPY: ::c_int = 5; -pub const RGN_MIN: ::c_int = RGN_AND; -pub const RGN_MAX: ::c_int = RGN_COPY; -//572 (Win 7 SDK) -STRUCT!{struct BITMAP { - bmType: ::LONG, - bmWidth: ::LONG, - bmHeight: ::LONG, - bmWidthBytes: ::LONG, - bmPlanes: ::WORD, - bmBitsPixel: ::WORD, - bmBits: ::LPVOID, -}} -pub type PBITMAP = *mut BITMAP; -pub type NPBITMAP = *mut BITMAP; -pub type LPBITMAP = *mut BITMAP; -STRUCT!{struct RGBQUAD { - rgbBlue: ::BYTE, - rgbGreen: ::BYTE, - rgbRed: ::BYTE, - rgbReserved: ::BYTE, -}} -pub type LPRGBQUAD = *mut RGBQUAD; -pub const CS_ENABLE: ::DWORD = 0x00000001; -pub const CS_DISABLE: ::DWORD = 0x00000002; -pub const CS_DELETE_TRANSFORM: ::DWORD = 0x00000003; -pub const LCS_SIGNATURE: ::DWORD = 0x5053_4F43; // 'PSOC' -pub const LCS_sRGB: LCSCSTYPE = 0x7352_4742; // 'sRGB' -pub const LCS_WINDOWS_COLOR_SPACE: LCSCSTYPE = 0x5769_6E20; // 'Win ' -pub type LCSCSTYPE = ::LONG; -pub const LCS_CALIBRATED_RGB: LCSCSTYPE = 0x00000000; -pub type LCSGAMUTMATCH = ::LONG; -pub const LCS_GM_BUSINESS: LCSGAMUTMATCH = 0x00000001; -pub const LCS_GM_GRAPHICS: LCSGAMUTMATCH = 0x00000002; -pub const LCS_GM_IMAGES: LCSGAMUTMATCH = 0x00000004; -pub const LCS_GM_ABS_COLORIMETRIC: LCSGAMUTMATCH = 0x00000008; -pub const CM_OUT_OF_GAMUT: ::BYTE = 255; -pub const CM_IN_GAMUT: ::BYTE = 0; -pub const ICM_ADDPROFILE: ::UINT = 1; -pub const ICM_DELETEPROFILE: ::UINT = 2; -pub const ICM_QUERYPROFILE: ::UINT = 3; -pub const ICM_SETDEFAULTPROFILE: ::UINT = 4; -pub const ICM_REGISTERICMATCHER: ::UINT = 5; -pub const ICM_UNREGISTERICMATCHER: ::UINT = 6; -pub const ICM_QUERYMATCH: ::UINT = 7; -pub type FXPT16DOT16 = ::c_long; -pub type LPFXPT16DOT16 = *mut ::c_long; -pub type FXPT2DOT30 = ::c_long; -pub type LPFXPT2DOT30 = *mut ::c_long; -STRUCT!{struct CIEXYZ { - ciexyzX: FXPT2DOT30, - ciexyzY: FXPT2DOT30, - ciexyzZ: FXPT2DOT30, -}} -pub type LPCIEXYZ = *mut CIEXYZ; -STRUCT!{struct CIEXYZTRIPLE { - ciexyzRed: CIEXYZ, - ciexyzGreen: CIEXYZ, - ciexyzBlue: CIEXYZ, -}} -pub type LPCIEXYZTRIPLE = *mut CIEXYZTRIPLE; -//716 (Win 7 SDK) -STRUCT!{struct BITMAPINFOHEADER { - biSize: ::DWORD, - biWidth: ::LONG, - biHeight: ::LONG, - biPlanes: ::WORD, - biBitCount: ::WORD, - biCompression: ::DWORD, - biSizeImage: ::DWORD, - biXPelsPerMeter: ::LONG, - biYPelsPerMeter: ::LONG, - biClrUsed: ::DWORD, - biClrImportant: ::DWORD, -}} -pub type LPBITMAPINFOHEADER = *mut BITMAPINFOHEADER; -pub type PBITMAPINFOHEADER = *mut BITMAPINFOHEADER; -STRUCT!{struct BITMAPV5HEADER { - bV5Size: ::DWORD, - bV5Width: ::LONG, - bV5Height: ::LONG, - bV5Planes: ::WORD, - bV5BitCount: ::WORD, - bV5Compression: ::DWORD, - bV5SizeImage: ::DWORD, - bV5XPelsPerMeter: ::LONG, - bV5YPelsPerMeter: ::LONG, - bV5ClrUsed: ::DWORD, - bV5ClrImportant: ::DWORD, - bV5RedMask: ::DWORD, - bV5GreenMask: ::DWORD, - bV5BlueMask: ::DWORD, - bV5AlphaMask: ::DWORD, - bV5CSType: ::LONG, // LONG to match LOGCOLORSPACE - bV5Endpoints: CIEXYZTRIPLE, - bV5GammaRed: ::DWORD, - bV5GammaGreen: ::DWORD, - bV5GammaBlue: ::DWORD, - bV5Intent: ::LONG, // LONG to match LOGCOLORSPACE - bV5ProfileData: ::DWORD, - bV5ProfileSize: ::DWORD, - bV5Reserved: ::DWORD, -}} -pub type LPBITMAPV5HEADER = *mut BITMAPV5HEADER; -pub type PBITMAPV5HEADER = *mut BITMAPV5HEADER; -pub const PROFILE_LINKED: ::LONG = 0x4C49_4E4B; // 'LINK' -pub const PROFILE_EMBEDDED: ::LONG = 0x4D42_4544; // 'MBED' -pub const BI_RGB: ::DWORD = 0; -pub const BI_RLE8: ::DWORD = 1; -pub const BI_RLE4: ::DWORD = 2; -pub const BI_BITFIELDS: ::DWORD = 3; -pub const BI_JPEG: ::DWORD = 4; -pub const BI_PNG: ::DWORD = 5; -#[repr(C)] #[derive(Debug)] #[allow(missing_copy_implementations)] -pub struct BITMAPINFO { - pub bmiHeader: BITMAPINFOHEADER, - pub bmiColors: [RGBQUAD; 0], -} -pub type LPBITMAPINFO = *mut BITMAPINFO; -pub type PBITMAPINFO = *mut BITMAPINFO; -//1438 -pub const LF_FACESIZE: usize = 32; -#[repr(C)] #[derive(Copy, Clone)] -pub struct LOGFONTA { - pub lfHeight: ::LONG, - pub lfWidth: ::LONG, - pub lfEscapement: ::LONG, - pub lfOrientation: ::LONG, - pub lfWeight: ::LONG, - pub lfItalic: ::BYTE, - pub lfUnderline: ::BYTE, - pub lfStrikeOut: ::BYTE, - pub lfCharSet: ::BYTE, - pub lfOutPrecision: ::BYTE, - pub lfClipPrecision: ::BYTE, - pub lfQuality: ::BYTE, - pub lfPitchAndFamily: ::BYTE, - pub lfFaceName: [::CHAR; LF_FACESIZE], -} -pub type LPLOGFONTA = *mut LOGFONTA; -#[repr(C)] #[derive(Copy, Clone)] -pub struct LOGFONTW { - pub lfHeight: ::LONG, - pub lfWidth: ::LONG, - pub lfEscapement: ::LONG, - pub lfOrientation: ::LONG, - pub lfWeight: ::LONG, - pub lfItalic: ::BYTE, - pub lfUnderline: ::BYTE, - pub lfStrikeOut: ::BYTE, - pub lfCharSet: ::BYTE, - pub lfOutPrecision: ::BYTE, - pub lfClipPrecision: ::BYTE, - pub lfQuality: ::BYTE, - pub lfPitchAndFamily: ::BYTE, - pub lfFaceName: [::WCHAR; LF_FACESIZE], -} -pub type LPLOGFONTW = *mut LOGFONTW; -//1595 -#[inline] -pub fn RGB (r: ::BYTE, g: ::BYTE, b: ::BYTE) -> ::COLORREF { - r as ::COLORREF | ((g as ::COLORREF) << 8) | ((b as ::COLORREF) << 16) -} -// -pub const DRIVERVERSION: ::c_int = 0; -pub const TECHNOLOGY: ::c_int = 2; -pub const HORZSIZE: ::c_int = 4; -pub const VERTSIZE: ::c_int = 6; -pub const HORZRES: ::c_int = 8; -pub const VERTRES: ::c_int = 10; -pub const BITSPIXEL: ::c_int = 12; -pub const PLANES: ::c_int = 14; -pub const NUMBRUSHES: ::c_int = 16; -pub const NUMPENS: ::c_int = 18; -pub const NUMMARKERS: ::c_int = 20; -pub const NUMFONTS: ::c_int = 22; -pub const NUMCOLORS: ::c_int = 24; -pub const PDEVICESIZE: ::c_int = 26; -pub const CURVECAPS: ::c_int = 28; -pub const LINECAPS: ::c_int = 30; -pub const POLYGONALCAPS: ::c_int = 32; -pub const TEXTCAPS: ::c_int = 34; -pub const CLIPCAPS: ::c_int = 36; -pub const RASTERCAPS: ::c_int = 38; -pub const ASPECTX: ::c_int = 40; -pub const ASPECTY: ::c_int = 42; -pub const ASPECTXY: ::c_int = 44; -pub const LOGPIXELSX: ::c_int = 88; -pub const LOGPIXELSY: ::c_int = 90; -pub const SIZEPALETTE: ::c_int = 104; -pub const NUMRESERVED: ::c_int = 106; -pub const COLORRES: ::c_int = 108; -pub const PHYSICALWIDTH: ::c_int = 110; -pub const PHYSICALHEIGHT: ::c_int = 111; -pub const PHYSICALOFFSETX: ::c_int = 112; -pub const PHYSICALOFFSETY: ::c_int = 113; -pub const SCALINGFACTORX: ::c_int = 114; -pub const SCALINGFACTORY: ::c_int = 115; -pub const VREFRESH: ::c_int = 116; -pub const DESKTOPVERTRES: ::c_int = 117; -pub const DESKTOPHORZRES: ::c_int = 118; -pub const BLTALIGNMENT: ::c_int = 119; -pub const SHADEBLENDCAPS: ::c_int = 120; -pub const COLORMGMTCAPS: ::c_int = 121; -//1906 -pub const DIB_RGB_COLORS: ::UINT = 0; -pub const DIB_PAL_COLORS: ::UINT = 1; -pub const CBM_INIT: ::DWORD = 4; -STRUCT!{struct RGNDATAHEADER { - dwSize: ::DWORD, - iType: ::DWORD, - nCount: ::DWORD, - nRgnSize: ::DWORD, - rcBound: ::RECT, -}} -pub type PRGNDATAHEADER = *mut RGNDATAHEADER; -#[repr(C)] #[derive(Debug)] #[allow(missing_copy_implementations)] -pub struct RGNDATA { - pub rdh: RGNDATAHEADER, - pub Buffer: [::c_char; 0], -} -pub type PRGNDATA = *mut RGNDATA; -pub type NPRGNDATA = *mut RGNDATA; -pub type LPRGNDATA = *mut RGNDATA; -STRUCT!{struct PALETTEENTRY { - peRed: ::BYTE, - peGreen: ::BYTE, - peBlue: ::BYTE, - peFlags: ::BYTE, -}} -pub type PPALETTEENTRY = *mut PALETTEENTRY; -pub type LPPALETTEENTRY = *mut PALETTEENTRY; -//2824 (Win 7 SDK) -STRUCT!{struct ABC { - abcA: ::c_int, - abcB: ::UINT, - abcC: ::c_int, -}} -pub type PABC = *mut ABC; -pub type NPABC = *mut ABC; -pub type LPABC = *mut ABC; -STRUCT!{struct ABCFLOAT { - abcfA: ::FLOAT, - abcfB: ::FLOAT, - abcfC: ::FLOAT, -}} -pub type PABCFLOAT = *mut ABCFLOAT; -pub type NPABCFLOAT = *mut ABCFLOAT; -pub type LPABCFLOAT = *mut ABCFLOAT; -//3581 -pub type LINEDDAPROC = Option<unsafe extern "system" fn(::c_int, ::c_int, ::LPARAM)>; -STRUCT!{struct XFORM { - eM11: ::FLOAT, - eM12: ::FLOAT, - eM21: ::FLOAT, - eM22: ::FLOAT, - eDx: ::FLOAT, - eDy: ::FLOAT, -}} -pub type PXFORM = *mut XFORM; -pub type LPXFORM = *mut XFORM; -STRUCT!{struct LOGBRUSH { - lbStyle: ::UINT, - lbColor: ::COLORREF, - lbHatch: ::ULONG_PTR, -}} -pub type PLOGBRUSH = *mut LOGBRUSH; -#[repr(C)] #[derive(Copy)] -pub struct LOGCOLORSPACEA { - pub lcsSignature: ::DWORD, - pub lcsVersion: ::DWORD, - pub lcsSize: ::DWORD, - pub lcsCSType: LCSCSTYPE, - pub lcsIntent: LCSGAMUTMATCH, - pub lcsEndpoints: CIEXYZTRIPLE, - pub lcsGammaRed: ::DWORD, - pub lcsGammaGreen: ::DWORD, - pub lcsGammaBlue: ::DWORD, - pub lcsFilename: [::CHAR; ::MAX_PATH], -} -impl Clone for LOGCOLORSPACEA { fn clone(&self) -> LOGCOLORSPACEA { *self } } -pub type LPLOGCOLORSPACEA = *mut LOGCOLORSPACEA; -#[repr(C)] #[derive(Copy)] -pub struct LOGCOLORSPACEW { - pub lcsSignature: ::DWORD, - pub lcsVersion: ::DWORD, - pub lcsSize: ::DWORD, - pub lcsCSType: LCSCSTYPE, - pub lcsIntent: LCSGAMUTMATCH, - pub lcsEndpoints: CIEXYZTRIPLE, - pub lcsGammaRed: ::DWORD, - pub lcsGammaGreen: ::DWORD, - pub lcsGammaBlue: ::DWORD, - pub lcsFilename: [::WCHAR; ::MAX_PATH], -} -impl Clone for LOGCOLORSPACEW { fn clone(&self) -> LOGCOLORSPACEW { *self } } -pub type LPLOGCOLORSPACEW = *mut LOGCOLORSPACEW; -pub const LF_FULLFACESIZE: usize = 64; -#[repr(C)] #[derive(Copy)] -pub struct ENUMLOGFONTEXA { - pub elfLogFont: LOGFONTA, - pub elfFullName: [::BYTE; LF_FULLFACESIZE], - pub elfStyle: [::BYTE; LF_FACESIZE], - pub elfScript: [::BYTE; LF_FACESIZE], -} -impl Clone for ENUMLOGFONTEXA { fn clone(&self) -> ENUMLOGFONTEXA { *self } } -pub type LPENUMLOGFONTEXA = *mut ENUMLOGFONTEXA; -#[repr(C)] #[derive(Copy)] -pub struct ENUMLOGFONTEXW { - pub elfLogFont: LOGFONTW, - pub elfFullName: [::WCHAR; LF_FULLFACESIZE], - pub elfStyle: [::WCHAR; LF_FACESIZE], - pub elfScript: [::WCHAR; LF_FACESIZE], -} -impl Clone for ENUMLOGFONTEXW { fn clone(&self) -> ENUMLOGFONTEXW { *self } } -pub type LPENUMLOGFONTEXW = *mut ENUMLOGFONTEXW; -pub const MM_MAX_NUMAXES: usize = 16; -STRUCT!{struct DESIGNVECTOR { - dvReserved: ::DWORD, - dvNumAxes: ::DWORD, - dvValues: [::LONG; MM_MAX_NUMAXES], -}} -pub type PDESIGNVECTOR = *mut DESIGNVECTOR; -pub type LPDESIGNVECTOR = *mut DESIGNVECTOR; -#[repr(C)] #[derive(Clone, Copy)] -pub struct ENUMLOGFONTEXDVA { - pub elfEnumLogfontEx: ENUMLOGFONTEXA, - pub elfDesignVector: DESIGNVECTOR, -} -pub type PENUMLOGFONTEXDVA = *mut ENUMLOGFONTEXDVA; -pub type LPENUMLOGFONTEXDVA = *mut ENUMLOGFONTEXDVA; -#[repr(C)] #[derive(Clone, Copy)] -pub struct ENUMLOGFONTEXDVW { - pub elfEnumLogfontEx: ENUMLOGFONTEXW, - pub elfDesignVector: DESIGNVECTOR, -} -pub type PENUMLOGFONTEXDVW = *mut ENUMLOGFONTEXDVW; -pub type LPENUMLOGFONTEXDVW = *mut ENUMLOGFONTEXDVW; -STRUCT!{struct LOGPALETTE { - palVersion: ::WORD, - palNumEntries: ::WORD, - palPalEntry: [PALETTEENTRY; 1], -}} -pub type PLOGPALETTE = *mut LOGPALETTE; -pub type NPLOGPALETTE = *mut LOGPALETTE; -pub type LPLOGPALETTE = *mut LOGPALETTE; -STRUCT!{struct LOGPEN { - lopnStyle: ::UINT, - lopnWidth: ::POINT, - lopnColor: ::COLORREF, -}} -pub type PLOGPEN = *mut LOGPEN; -pub type NPLOGPEN = *mut LOGPEN; -pub type LPLOGPEN = *mut LOGPEN; -STRUCT!{struct BLENDFUNCTION { - BlendOp: ::BYTE, - BlendFlags: ::BYTE, - SourceConstantAlpha: ::BYTE, - AlphaFormat: ::BYTE, -}} -pub type PBLENDFUNCTION = *mut BLENDFUNCTION; -pub const TMPF_FIXED_PITCH: ::BYTE = 0x01; -pub const TMPF_VECTOR: ::BYTE = 0x02; -pub const TMPF_DEVICE: ::BYTE = 0x08; -pub const TMPF_TRUETYPE: ::BYTE = 0x04; -STRUCT!{struct TEXTMETRICA { - tmHeight: ::LONG, - tmAscent: ::LONG, - tmDescent: ::LONG, - tmInternalLeading: ::LONG, - tmExternalLeading: ::LONG, - tmAveCharWidth: ::LONG, - tmMaxCharWidth: ::LONG, - tmWeight: ::LONG, - tmOverhang: ::LONG, - tmDigitizedAspectX: ::LONG, - tmDigitizedAspectY: ::LONG, - tmFirstChar: ::BYTE, - tmLastChar: ::BYTE, - tmDefaultChar: ::BYTE, - tmBreakChar: ::BYTE, - tmItalic: ::BYTE, - tmUnderlined: ::BYTE, - tmStruckOut: ::BYTE, - tmPitchAndFamily: ::BYTE, - tmCharSet: ::BYTE, -}} -pub type PTEXTMETRICA = *mut TEXTMETRICA; -pub type NPTEXTMETRICA = *mut TEXTMETRICA; -pub type LPTEXTMETRICA = *mut TEXTMETRICA; -STRUCT!{struct TEXTMETRICW { - tmHeight: ::LONG, - tmAscent: ::LONG, - tmDescent: ::LONG, - tmInternalLeading: ::LONG, - tmExternalLeading: ::LONG, - tmAveCharWidth: ::LONG, - tmMaxCharWidth: ::LONG, - tmWeight: ::LONG, - tmOverhang: ::LONG, - tmDigitizedAspectX: ::LONG, - tmDigitizedAspectY: ::LONG, - tmFirstChar: ::WCHAR, - tmLastChar: ::WCHAR, - tmDefaultChar: ::WCHAR, - tmBreakChar: ::WCHAR, - tmItalic: ::BYTE, - tmUnderlined: ::BYTE, - tmStruckOut: ::BYTE, - tmPitchAndFamily: ::BYTE, - tmCharSet: ::BYTE, -}} -pub type PTEXTMETRICW = *mut TEXTMETRICW; -pub type NPTEXTMETRICW = *mut TEXTMETRICW; -pub type LPTEXTMETRICW = *mut TEXTMETRICW; -pub const TA_NOUPDATECP: ::UINT = 0; -pub const TA_UPDATECP: ::UINT = 1; -pub const TA_LEFT: ::UINT = 0; -pub const TA_RIGHT: ::UINT = 2; -pub const TA_CENTER: ::UINT = 6; -pub const TA_TOP: ::UINT = 0; -pub const TA_BOTTOM: ::UINT = 8; -pub const TA_BASELINE: ::UINT = 24; -pub const TA_RTLREADING: ::UINT = 256; -pub const TA_MASK: ::UINT = TA_BASELINE + TA_CENTER + TA_UPDATECP + TA_RTLREADING; -pub const WHITE_BRUSH: ::c_int = 0; -pub const LTGRAY_BRUSH: ::c_int = 1; -pub const GRAY_BRUSH: ::c_int = 2; -pub const DKGRAY_BRUSH: ::c_int = 3; -pub const BLACK_BRUSH: ::c_int = 4; -pub const NULL_BRUSH: ::c_int = 5; -pub const HOLLOW_BRUSH: ::c_int = 5; -pub const WHITE_PEN: ::c_int = 6; -pub const BLACK_PEN: ::c_int = 7; -pub const NULL_PEN: ::c_int = 8; -pub const OEM_FIXED_FONT: ::c_int = 10; -pub const ANSI_FIXED_FONT: ::c_int = 11; -pub const ANSI_VAR_FONT: ::c_int = 12; -pub const SYSTEM_FONT: ::c_int = 13; -pub const DEVICE_DEFAULT_FONT: ::c_int = 14; -pub const DEFAULT_PALETTE: ::c_int = 15; -pub const SYSTEM_FIXED_FONT: ::c_int = 16; -pub const DEFAULT_GUI_FONT: ::c_int = 17; -pub const DC_BRUSH: ::c_int = 18; -pub const DC_PEN: ::c_int = 19; -pub const STOCK_LAST: ::c_int = 19;pub const PS_SOLID: ::c_int = 0; -pub const PS_DASH: ::c_int = 1; -pub const PS_DOT: ::c_int = 2; -pub const PS_DASHDOT: ::c_int = 3; -pub const PS_DASHDOTDOT: ::c_int = 4; -pub const PS_NULL: ::c_int = 5; -pub const PS_INSIDEFRAME: ::c_int = 6; -pub const PS_USERSTYLE: ::c_int = 7; -pub const PS_ALTERNATE: ::c_int = 8; -pub const TRANSPARENT: ::c_int = 1; -pub const OPAQUE: ::c_int = 2; -pub const BKMODE_LAST: ::c_int = 2; -pub const MM_TEXT: ::c_int = 1; -pub const MM_LOMETRIC: ::c_int = 2; -pub const MM_HIMETRIC: ::c_int = 3; -pub const MM_LOENGLISH: ::c_int = 4; -pub const MM_HIENGLISH: ::c_int = 5; -pub const MM_TWIPS: ::c_int = 6; -pub const MM_ISOTROPIC: ::c_int = 7; -pub const MM_ANISOTROPIC: ::c_int = 8; -pub const ALTERNATE: ::c_int = 1; -pub const WINDING: ::c_int = 2; -pub const POLYFILL_LAST: ::c_int = 2; -pub const OUT_DEFAULT_PRECIS: ::DWORD = 0; -pub const OUT_STRING_PRECIS: ::DWORD = 1; -pub const OUT_CHARACTER_PRECIS: ::DWORD = 2; -pub const OUT_STROKE_PRECIS: ::DWORD = 3; -pub const OUT_TT_PRECIS: ::DWORD = 4; -pub const OUT_DEVICE_PRECIS: ::DWORD = 5; -pub const OUT_RASTER_PRECIS: ::DWORD = 6; -pub const OUT_TT_ONLY_PRECIS: ::DWORD = 7; -pub const OUT_OUTLINE_PRECIS: ::DWORD = 8; -pub const OUT_SCREEN_OUTLINE_PRECIS: ::DWORD = 9; -pub const OUT_PS_ONLY_PRECIS: ::DWORD = 10; -pub const CLIP_DEFAULT_PRECIS: ::DWORD = 0; -pub const CLIP_CHARACTER_PRECIS: ::DWORD = 1; -pub const CLIP_STROKE_PRECIS: ::DWORD = 2; -pub const CLIP_MASK: ::DWORD = 0xf; -pub const CLIP_LH_ANGLES: ::DWORD = 1 << 4; -pub const CLIP_TT_ALWAYS: ::DWORD = 2 << 4; -pub const CLIP_DFA_DISABLE: ::DWORD = 4 << 4; -pub const CLIP_EMBEDDED: ::DWORD = 8 << 4; -pub const DEFAULT_QUALITY: ::DWORD = 0; -pub const DRAFT_QUALITY: ::DWORD = 1; -pub const PROOF_QUALITY: ::DWORD = 2; -pub const NONANTIALIASED_QUALITY: ::DWORD = 3; -pub const ANTIALIASED_QUALITY: ::DWORD = 4; -pub const CLEARTYPE_QUALITY: ::DWORD = 5; -pub const CLEARTYPE_NATURAL_QUALITY: ::DWORD = 6; -pub const DEFAULT_PITCH: ::DWORD = 0; -pub const FIXED_PITCH: ::DWORD = 1; -pub const VARIABLE_PITCH: ::DWORD = 2; -pub const MONO_FONT: ::DWORD = 8; -pub const ANSI_CHARSET: ::DWORD = 0; -pub const DEFAULT_CHARSET: ::DWORD = 1; -pub const SYMBOL_CHARSET: ::DWORD = 2; -pub const SHIFTJIS_CHARSET: ::DWORD = 128; -pub const HANGEUL_CHARSET: ::DWORD = 129; -pub const HANGUL_CHARSET: ::DWORD = 129; -pub const GB2312_CHARSET: ::DWORD = 134; -pub const CHINESEBIG5_CHARSET: ::DWORD = 136; -pub const OEM_CHARSET: ::DWORD = 255; -pub const JOHAB_CHARSET: ::DWORD = 130; -pub const HEBREW_CHARSET: ::DWORD = 177; -pub const ARABIC_CHARSET: ::DWORD = 178; -pub const GREEK_CHARSET: ::DWORD = 161; -pub const TURKISH_CHARSET: ::DWORD = 162; -pub const VIETNAMESE_CHARSET: ::DWORD = 163; -pub const THAI_CHARSET: ::DWORD = 222; -pub const EASTEUROPE_CHARSET: ::DWORD = 238; -pub const RUSSIAN_CHARSET: ::DWORD = 204; -pub const MAC_CHARSET: ::DWORD = 77; -pub const BALTIC_CHARSET: ::DWORD = 186; -pub const FS_LATIN1: ::DWORD = 0x00000001; -pub const FS_LATIN2: ::DWORD = 0x00000002; -pub const FS_CYRILLIC: ::DWORD = 0x00000004; -pub const FS_GREEK: ::DWORD = 0x00000008; -pub const FS_TURKISH: ::DWORD = 0x00000010; -pub const FS_HEBREW: ::DWORD = 0x00000020; -pub const FS_ARABIC: ::DWORD = 0x00000040; -pub const FS_BALTIC: ::DWORD = 0x00000080; -pub const FS_VIETNAMESE: ::DWORD = 0x00000100; -pub const FS_THAI: ::DWORD = 0x00010000; -pub const FS_JISJAPAN: ::DWORD = 0x00020000; -pub const FS_CHINESESIMP: ::DWORD = 0x00040000; -pub const FS_WANSUNG: ::DWORD = 0x00080000; -pub const FS_CHINESETRAD: ::DWORD = 0x00100000; -pub const FS_JOHAB: ::DWORD = 0x00200000; -pub const FS_SYMBOL: ::DWORD = 0x80000000; -pub const FW_DONTCARE: ::c_int = 0; -pub const FW_THIN: ::c_int = 100; -pub const FW_EXTRALIGHT: ::c_int = 200; -pub const FW_LIGHT: ::c_int = 300; -pub const FW_NORMAL: ::c_int = 400; -pub const FW_MEDIUM: ::c_int = 500; -pub const FW_SEMIBOLD: ::c_int = 600; -pub const FW_BOLD: ::c_int = 700; -pub const FW_EXTRABOLD: ::c_int = 800; -pub const FW_HEAVY: ::c_int = 900; -pub const FW_ULTRALIGHT: ::c_int = FW_EXTRALIGHT; -pub const FW_REGULAR: ::c_int = FW_NORMAL; -pub const FW_DEMIBOLD: ::c_int = FW_SEMIBOLD; -pub const FW_ULTRABOLD: ::c_int = FW_EXTRABOLD; -pub const FW_BLACK: ::c_int = FW_HEAVY; -pub type COLOR16 = ::c_ushort; -STRUCT!{struct TRIVERTEX { - x: ::LONG, - y: ::LONG, - Red: COLOR16, - Green: COLOR16, - Blue: COLOR16, - Alpha: COLOR16, -}} -pub type PTRIVERTEX = *mut TRIVERTEX; -pub type LPTRIVERTEX = *mut TRIVERTEX; -STRUCT!{struct GRADIENT_RECT { - UpperLeft: ::ULONG, - LowerRight: ::ULONG, -}} -pub type PGRADIENT_RECT = *mut GRADIENT_RECT; -pub type LPGRADIENT_RECT = *mut GRADIENT_RECT; -/* Object Definitions for EnumObjects() */ -pub const OBJ_PEN: ::UINT = 1; -pub const OBJ_BRUSH: ::UINT = 2; -pub const OBJ_DC: ::UINT = 3; -pub const OBJ_METADC: ::UINT = 4; -pub const OBJ_PAL: ::UINT = 5; -pub const OBJ_FONT: ::UINT = 6; -pub const OBJ_BITMAP: ::UINT = 7; -pub const OBJ_REGION: ::UINT = 8; -pub const OBJ_METAFILE: ::UINT = 9; -pub const OBJ_MEMDC: ::UINT = 10; -pub const OBJ_EXTPEN: ::UINT = 11; -pub const OBJ_ENHMETADC: ::UINT = 12; -pub const OBJ_ENHMETAFILE: ::UINT = 13; -pub const OBJ_COLORSPACE: ::UINT = 14; -pub const GDI_OBJ_LAST: ::UINT = OBJ_COLORSPACE; -STRUCT!{struct COLORADJUSTMENT { - caSize: ::WORD, - caFlags: ::WORD, - caIlluminantIndex: ::WORD, - caRedGamma: ::WORD, - caGreenGamma: ::WORD, - caBlueGamma: ::WORD, - caReferenceBlack: ::WORD, - caReferenceWhite: ::WORD, - caContrast: ::SHORT, - caBrightness: ::SHORT, - caColorfulness: ::SHORT, - caRedGreenTint: ::SHORT, -}} -pub type PCOLORADJUSTMENT = *mut COLORADJUSTMENT; -pub type LPCOLORADJUSTMENT = *mut COLORADJUSTMENT; -pub type OLDFONTENUMPROCA = Option<unsafe extern "system" fn( - *const LOGFONTA, *const ::VOID, ::DWORD, ::LPARAM -) -> ::c_int>; -pub type OLDFONTENUMPROCW = Option<unsafe extern "system" fn( - *const LOGFONTW, *const ::VOID, ::DWORD, ::LPARAM -) -> ::c_int>; -pub type FONTENUMPROCA = OLDFONTENUMPROCA; -pub type FONTENUMPROCW = OLDFONTENUMPROCW; -STRUCT!{struct WCRANGE { - wcLow: ::WCHAR, - cGlyphs: ::USHORT, -}} -pub type PWCRANGE = *mut WCRANGE; -pub type LPWCRANGE = *mut WCRANGE; -STRUCT!{struct GLYPHSET { - cbThis: ::DWORD, - flAccel: ::DWORD, - cGlyphsSupported: ::DWORD, - cRanges: ::DWORD, - ranges: [WCRANGE;1], -}} -pub type PGLYPHSET = *mut GLYPHSET; -pub type LPGLYPHSET = *mut GLYPHSET; -pub type ABORTPROC = Option<unsafe extern "system" fn(::HDC, ::c_int) -> ::BOOL>; -STRUCT!{struct DOCINFOA { - cbSize: ::c_int, - lpszDocName: ::LPCSTR, - lpszOutput: ::LPCSTR, - lpszDatatype: ::LPCSTR, - fwType: ::DWORD, -}} -pub type LPDOCINFOA = *mut DOCINFOA; -STRUCT!{struct DOCINFOW { - cbSize: ::c_int, - lpszDocName: ::LPCWSTR, - lpszOutput: ::LPCWSTR, - lpszDatatype: ::LPCWSTR, - fwType: ::DWORD, -}} -pub type LPDOCINFOW = *mut DOCINFOW; -pub type ICMENUMPROCA = Option<unsafe extern "system" fn(::LPSTR, ::LPARAM) -> ::c_int>; -pub type ICMENUMPROCW = Option<unsafe extern "system" fn(::LPWSTR, ::LPARAM) -> ::c_int>; -STRUCT!{struct HANDLETABLE { - objectHandle: [::HGDIOBJ; 1], -}} -pub type LPHANDLETABLE = *mut HANDLETABLE; -pub type PHANDLETABLE = *mut HANDLETABLE; -STRUCT!{struct METARECORD { - rdSize: ::DWORD, - rdFunction: ::WORD, - rdParm: [::WORD; 1], -}} -pub type PMETARECORD = *mut METARECORD; -pub type LPMETARECORD = *mut METARECORD; -pub type MFENUMPROC = Option<unsafe extern "system" fn( - hdc: ::HDC, lpht: *mut ::HANDLETABLE, lpMR: *mut ::METARECORD, nObj: ::c_int, param: ::LPARAM -) -> ::c_int>; -pub type GOBJENUMPROC = Option<unsafe extern "system" fn(::LPVOID, ::LPARAM) -> ::c_int>; -STRUCT!{struct GCP_RESULTSA { - lStructSize: ::DWORD, - lpOutString: ::LPSTR, - lpOrder: *const ::UINT, - lpDx: *const ::c_int, - lpCaretPos: *const ::c_int, - lpClass: ::LPSTR, - lpGlyphs: ::LPWSTR, - nGlyphs: ::UINT, - nMaxFit: ::c_int, -}} -pub type LPGCP_RESULTSA = *mut GCP_RESULTSA; -STRUCT!{struct GCP_RESULTSW { - lStructSize: ::DWORD, - lpOutString: ::LPWSTR, - lpOrder: *const ::UINT, - lpDx: *const ::c_int, - lpCaretPos: *const ::c_int, - lpClass: ::LPSTR, - lpGlyphs: ::LPWSTR, - nGlyphs: ::UINT, - nMaxFit: ::c_int, -}} -pub type LPGCP_RESULTSW = *mut GCP_RESULTSW; -STRUCT!{struct FONTSIGNATURE { - fsUsb: [::DWORD; 4], - fsCsb: [::DWORD; 2], -}} -pub type LPFONTSIGNATURE = *mut FONTSIGNATURE; -pub type PFONTSIGNATURE = *mut FONTSIGNATURE; -STRUCT!{struct POLYTEXTA { - x: ::c_int, - y: ::c_int, - n: ::UINT, - lpstr: ::LPCSTR, - uiFlags: ::UINT, - rcl: ::RECT, - pdx: *const ::c_int, -}} -pub type PPOLYTEXTA = *mut POLYTEXTA; -pub type NPPOLYTEXTA = *mut POLYTEXTA; -pub type LPPOLYTEXTA = *mut POLYTEXTA; -STRUCT!{struct POLYTEXTW { - x: ::c_int, - y: ::c_int, - n: ::UINT, - lpstr: ::LPCWSTR, - uiFlags: ::UINT, - rcl: ::RECT, - pdx: *const ::c_int, -}} -pub type PPOLYTEXTW = *mut POLYTEXTW; -pub type NPPOLYTEXTW = *mut POLYTEXTW; -pub type LPPOLYTEXTW = *mut POLYTEXTW; -STRUCT!{struct CHARSETINFO { - ciCharset: ::UINT, - ciACP: ::UINT, - fs: ::FONTSIGNATURE, -}} -pub type PCHARSETINFO = *mut CHARSETINFO; -pub type NPCHARSETINFO = *mut CHARSETINFO; -pub type LPCHARSETINFO = *mut CHARSETINFO; -pub const GRADIENT_FILL_RECT_H: ::ULONG = 0x00000000; -pub const GRADIENT_FILL_RECT_V: ::ULONG = 0x00000001; -pub const GRADIENT_FILL_TRIANGLE: ::ULONG = 0x00000002; -pub const GRADIENT_FILL_OP_FLAG: ::ULONG = 0x000000ff; -STRUCT!{struct LAYERPLANEDESCRIPTOR { - nSize: ::WORD, - nVersion: ::WORD, - dwFlags: ::DWORD, - iPixelType: ::BYTE, - cColorBits: ::BYTE, - cRedBits: ::BYTE, - cRedShift: ::BYTE, - cGreenBits: ::BYTE, - cGreenShift: ::BYTE, - cBlueBits: ::BYTE, - cBlueShift: ::BYTE, - cAlphaBits: ::BYTE, - cAlphaShift: ::BYTE, - cAccumBits: ::BYTE, - cAccumRedBits: ::BYTE, - cAccumGreenBits: ::BYTE, - cAccumBlueBits: ::BYTE, - cAccumAlphaBits: ::BYTE, - cDepthBits: ::BYTE, - cStencilBits: ::BYTE, - cAuxBuffers: ::BYTE, - iLayerPlane: ::BYTE, - bReserved: ::BYTE, - crTransparent: ::COLORREF, -}} -pub type PLAYERPLANEDESCRIPTOR = *mut LAYERPLANEDESCRIPTOR; -pub type LPLAYERPLANEDESCRIPTOR = *mut LAYERPLANEDESCRIPTOR; -STRUCT!{struct ENHMETAHEADER { - iType: ::DWORD, - nSize: ::DWORD, - rclBounds: ::RECTL, - rclFrame: ::RECTL, - dSignature: ::DWORD, - nVersion: ::DWORD, - nBytes: ::DWORD, - nRecords: ::DWORD, - nHandles: ::WORD, - sReserved: ::WORD, - nDescription: ::DWORD, - offDescription: ::DWORD, - nPalEntries: ::DWORD, - szlDevice: ::SIZEL, - szlMillimeters: ::SIZEL, - cbPixelFormat: ::DWORD, - offPixelFormat: ::DWORD, - bOpenGL: ::DWORD, - szlMicrometers: ::SIZEL, -}} -pub type PENHMETAHEADER = *mut ENHMETAHEADER; -pub type LPENHMETAHEADER = *mut ENHMETAHEADER; -STRUCT!{struct FIXED { - fract: ::WORD, - value: ::c_short, -}} -STRUCT!{struct MAT2 { - eM11: FIXED, - eM12: FIXED, - eM21: FIXED, - eM22: FIXED, -}} -pub type LPMAT2 = *mut MAT2; -STRUCT!{struct GLYPHMETRICS { - gmBlackBoxX: ::UINT, - gmBlackBoxY: ::UINT, - gmptGlyphOrigin: ::POINT, - gmCellIncX: ::c_short, - gmCellIncY: ::c_short, -}} -pub type LPGLYPHMETRICS = *mut GLYPHMETRICS; -STRUCT!{struct KERNINGPAIR { - wFirst: ::WORD, - wSecond: ::WORD, - iKernAmount: ::c_int, -}} -pub type LPKERNINGPAIR = *mut KERNINGPAIR; -STRUCT!{struct PANOSE { - bFamilyType: ::BYTE, - bSerifStyle: ::BYTE, - bWeight: ::BYTE, - bProportion: ::BYTE, - bContrast: ::BYTE, - bStrokeVariation: ::BYTE, - bArmStyle: ::BYTE, - bLetterform: ::BYTE, - bMidline: ::BYTE, - bXHeight: ::BYTE, -}} -pub type LPPANOSE = *mut PANOSE; -STRUCT!{struct OUTLINETEXTMETRICA { - otmSize: ::UINT, - otmTextMetrics: TEXTMETRICA, - otmFiller: ::BYTE, - otmPanoseNumber: ::PANOSE, - otmfsSelection: ::UINT, - otmfsType: ::UINT, - otmsCharSlopeRise: ::c_int, - otmsCharSlopeRun: ::c_int, - otmItalicAngle: ::c_int, - otmEMSquare: ::UINT, - otmAscent: ::c_int, - otmDescent: ::c_int, - otmLineGap: ::UINT, - otmsCapEmHeight: ::UINT, - otmsXHeight: ::UINT, - otmrcFontBox: ::RECT, - otmMacAscent: ::c_int, - otmMacDescent: ::c_int, - otmMacLineGap: ::UINT, - otmusMinimumPPEM: ::UINT, - otmptSubscriptSize: ::POINT, - otmptSubscriptOffset: ::POINT, - otmptSuperscriptSize: ::POINT, - otmptSuperscriptOffset: ::POINT, - otmsStrikeoutSize: ::UINT, - otmsStrikeoutPosition: ::c_int, - otmsUnderscoreSize: ::c_int, - otmsUnderscorePosition: ::c_int, - otmpFamilyName: ::PSTR, - otmpFaceName: ::PSTR, - otmpStyleName: ::PSTR, - otmpFullName: ::PSTR, -}} -pub type POUTLINETEXTMETRICA = *mut OUTLINETEXTMETRICA; -pub type NPOUTLINETEXTMETRICA = *mut OUTLINETEXTMETRICA; -pub type LPOUTLINETEXTMETRICA = *mut OUTLINETEXTMETRICA; -STRUCT!{struct OUTLINETEXTMETRICW { - otmSize: ::UINT, - otmTextMetrics: TEXTMETRICW, - otmFiller: ::BYTE, - otmPanoseNumber: ::PANOSE, - otmfsSelection: ::UINT, - otmfsType: ::UINT, - otmsCharSlopeRise: ::c_int, - otmsCharSlopeRun: ::c_int, - otmItalicAngle: ::c_int, - otmEMSquare: ::UINT, - otmAscent: ::c_int, - otmDescent: ::c_int, - otmLineGap: ::UINT, - otmsCapEmHeight: ::UINT, - otmsXHeight: ::UINT, - otmrcFontBox: ::RECT, - otmMacAscent: ::c_int, - otmMacDescent: ::c_int, - otmMacLineGap: ::UINT, - otmusMinimumPPEM: ::UINT, - otmptSubscriptSize: ::POINT, - otmptSubscriptOffset: ::POINT, - otmptSuperscriptSize: ::POINT, - otmptSuperscriptOffset: ::POINT, - otmsStrikeoutSize: ::UINT, - otmsStrikeoutPosition: ::c_int, - otmsUnderscoreSize: ::c_int, - otmsUnderscorePosition: ::c_int, - otmpFamilyName: ::PSTR, - otmpFaceName: ::PSTR, - otmpStyleName: ::PSTR, - otmpFullName: ::PSTR, -}} -pub type POUTLINETEXTMETRICW = *mut OUTLINETEXTMETRICW; -pub type NPOUTLINETEXTMETRICW = *mut OUTLINETEXTMETRICW; -pub type LPOUTLINETEXTMETRICW = *mut OUTLINETEXTMETRICW; -STRUCT!{struct RASTERIZER_STATUS { - nSize: ::c_short, - wFlags: ::c_short, - nLanguageID: ::c_short, -}} -pub type LPRASTERIZER_STATUS = *mut RASTERIZER_STATUS; -STRUCT!{struct ENHMETARECORD { - iType: ::DWORD, - nSize: ::DWORD, - dParm: [::DWORD; 1], -}} -pub type PENHMETARECORD = *mut ENHMETARECORD; -pub type LPENHMETARECORD = *mut ENHMETARECORD; -STRUCT!{struct METAFILEPICT { - mm: ::LONG, - xExt: ::LONG, - yExt: ::LONG, - hMF: ::HMETAFILE, -}} -pub type LPMETAFILEPICT = *mut METAFILEPICT; -STRUCT!{struct POINTFLOAT { - x: ::FLOAT, - y: ::FLOAT, -}} -pub type PPOINTFLOAT = *mut POINTFLOAT; -STRUCT!{struct GLYPHMETRICSFLOAT { - gmfBlackBoxX: ::FLOAT, - gmfBlackBoxY: ::FLOAT, - gmfptGlyphOrigin: POINTFLOAT, - gmfCellIncX: ::FLOAT, - gmfCellIncY: ::FLOAT, -}} -pub type PGLYPHMETRICSFLOAT = *mut GLYPHMETRICSFLOAT; -pub type LPGLYPHMETRICSFLOAT = *mut GLYPHMETRICSFLOAT; -pub const DT_PLOTTER: ::c_int = 0; -pub const DT_RASDISPLAY: ::c_int = 1; -pub const DT_RASPRINTER: ::c_int = 2; -pub const DT_RASCAMERA: ::c_int = 3; -pub const DT_CHARSTREAM: ::c_int = 4; -pub const DT_METAFILE: ::c_int = 5; -pub const DT_DISPFILE: ::c_int = 6; -pub const CLR_INVALID: ::COLORREF = 0xFFFFFFFF; -pub const ETO_OPAQUE: ::UINT = 0x0002; -pub const ETO_CLIPPED: ::UINT = 0x0004; -pub const ETO_GLYPH_INDEX: ::UINT = 0x0010; -pub const ETO_RTLREADING: ::UINT = 0x0080; -pub const ETO_NUMERICSLOCAL: ::UINT = 0x0400; -pub const ETO_NUMERICSLATIN: ::UINT = 0x0800; -pub const ETO_IGNORELANGUAGE: ::UINT = 0x1000; -pub const ETO_PDY: ::UINT = 0x2000; -pub const ETO_REVERSE_INDEX_MAP: ::UINT = 0x10000; -STRUCT!{struct EXTLOGPEN { - elpPenStyle: ::DWORD, - elpWidth: ::DWORD, - elpBrushStyle: ::UINT, - elpColor: ::COLORREF, - elpHatch: ::ULONG_PTR, - elpNumEntries: ::DWORD, - elpStyleEntry: [::DWORD; 1], -}} -pub type PEXTLOGPEN = *mut EXTLOGPEN; -pub type NPEXTLOGPEN = *mut EXTLOGPEN; -pub type LPEXTLOGPEN = *mut EXTLOGPEN; -pub type ENHMFENUMPROC = Option<unsafe extern "system" fn( - hdc: ::HDC, lpht: HANDLETABLE, lpmr: *const ENHMETARECORD, nHandles: ::c_int, data: ::LPARAM -) -> ::c_int>; -/* Metafile Functions */ -pub const META_SETBKCOLOR: ::WORD = 0x0201; -pub const META_SETBKMODE: ::WORD = 0x0102; -pub const META_SETMAPMODE: ::WORD = 0x0103; -pub const META_SETROP2: ::WORD = 0x0104; -pub const META_SETRELABS: ::WORD = 0x0105; -pub const META_SETPOLYFILLMODE: ::WORD = 0x0106; -pub const META_SETSTRETCHBLTMODE: ::WORD = 0x0107; -pub const META_SETTEXTCHAREXTRA: ::WORD = 0x0108; -pub const META_SETTEXTCOLOR: ::WORD = 0x0209; -pub const META_SETTEXTJUSTIFICATION: ::WORD = 0x020A; -pub const META_SETWINDOWORG: ::WORD = 0x020B; -pub const META_SETWINDOWEXT: ::WORD = 0x020C; -pub const META_SETVIEWPORTORG: ::WORD = 0x020D; -pub const META_SETVIEWPORTEXT: ::WORD = 0x020E; -pub const META_OFFSETWINDOWORG: ::WORD = 0x020F; -pub const META_SCALEWINDOWEXT: ::WORD = 0x0410; -pub const META_OFFSETVIEWPORTORG: ::WORD = 0x0211; -pub const META_SCALEVIEWPORTEXT: ::WORD = 0x0412; -pub const META_LINETO: ::WORD = 0x0213; -pub const META_MOVETO: ::WORD = 0x0214; -pub const META_EXCLUDECLIPRECT: ::WORD = 0x0415; -pub const META_INTERSECTCLIPRECT: ::WORD = 0x0416; -pub const META_ARC: ::WORD = 0x0817; -pub const META_ELLIPSE: ::WORD = 0x0418; -pub const META_FLOODFILL: ::WORD = 0x0419; -pub const META_PIE: ::WORD = 0x081A; -pub const META_RECTANGLE: ::WORD = 0x041B; -pub const META_ROUNDRECT: ::WORD = 0x061C; -pub const META_PATBLT: ::WORD = 0x061D; -pub const META_SAVEDC: ::WORD = 0x001E; -pub const META_SETPIXEL: ::WORD = 0x041F; -pub const META_OFFSETCLIPRGN: ::WORD = 0x0220; -pub const META_TEXTOUT: ::WORD = 0x0521; -pub const META_BITBLT: ::WORD = 0x0922; -pub const META_STRETCHBLT: ::WORD = 0x0B23; -pub const META_POLYGON: ::WORD = 0x0324; -pub const META_POLYLINE: ::WORD = 0x0325; -pub const META_ESCAPE: ::WORD = 0x0626; -pub const META_RESTOREDC: ::WORD = 0x0127; -pub const META_FILLREGION: ::WORD = 0x0228; -pub const META_FRAMEREGION: ::WORD = 0x0429; -pub const META_INVERTREGION: ::WORD = 0x012A; -pub const META_PAINTREGION: ::WORD = 0x012B; -pub const META_SELECTCLIPREGION: ::WORD = 0x012C; -pub const META_SELECTOBJECT: ::WORD = 0x012D; -pub const META_SETTEXTALIGN: ::WORD = 0x012E; -pub const META_CHORD: ::WORD = 0x0830; -pub const META_SETMAPPERFLAGS: ::WORD = 0x0231; -pub const META_EXTTEXTOUT: ::WORD = 0x0a32; -pub const META_SETDIBTODEV: ::WORD = 0x0d33; -pub const META_SELECTPALETTE: ::WORD = 0x0234; -pub const META_REALIZEPALETTE: ::WORD = 0x0035; -pub const META_ANIMATEPALETTE: ::WORD = 0x0436; -pub const META_SETPALENTRIES: ::WORD = 0x0037; -pub const META_POLYPOLYGON: ::WORD = 0x0538; -pub const META_RESIZEPALETTE: ::WORD = 0x0139; -pub const META_DIBBITBLT: ::WORD = 0x0940; -pub const META_DIBSTRETCHBLT: ::WORD = 0x0b41; -pub const META_DIBCREATEPATTERNBRUSH: ::WORD = 0x0142; -pub const META_STRETCHDIB: ::WORD = 0x0f43; -pub const META_EXTFLOODFILL: ::WORD = 0x0548; -pub const META_SETLAYOUT: ::WORD = 0x0149; -pub const META_DELETEOBJECT: ::WORD = 0x01f0; -pub const META_CREATEPALETTE: ::WORD = 0x00f7; -pub const META_CREATEPATTERNBRUSH: ::WORD = 0x01F9; -pub const META_CREATEPENINDIRECT: ::WORD = 0x02FA; -pub const META_CREATEFONTINDIRECT: ::WORD = 0x02FB; -pub const META_CREATEBRUSHINDIRECT: ::WORD = 0x02FC; -pub const META_CREATEREGION: ::WORD = 0x06FF; diff --git a/deps/winapi-0.2.5/src/winioctl.rs b/deps/winapi-0.2.5/src/winioctl.rs deleted file mode 100644 index c0171076b..000000000 --- a/deps/winapi-0.2.5/src/winioctl.rs +++ /dev/null @@ -1,756 +0,0 @@ -// Copyright © 2015, Peter Atashian -// Licensed under the MIT License <LICENSE.md> -//! This module defines the 32-Bit Windows Device I/O control codes. -//123 -pub const FILE_DEVICE_BEEP: ::DWORD = 0x00000001; -pub const FILE_DEVICE_CD_ROM: ::DWORD = 0x00000002; -pub const FILE_DEVICE_CD_ROM_FILE_SYSTEM: ::DWORD = 0x00000003; -pub const FILE_DEVICE_CONTROLLER: ::DWORD = 0x00000004; -pub const FILE_DEVICE_DATALINK: ::DWORD = 0x00000005; -pub const FILE_DEVICE_DFS: ::DWORD = 0x00000006; -pub const FILE_DEVICE_DISK: ::DWORD = 0x00000007; -pub const FILE_DEVICE_DISK_FILE_SYSTEM: ::DWORD = 0x00000008; -pub const FILE_DEVICE_FILE_SYSTEM: ::DWORD = 0x00000009; -pub const FILE_DEVICE_INPORT_PORT: ::DWORD = 0x0000000a; -pub const FILE_DEVICE_KEYBOARD: ::DWORD = 0x0000000b; -pub const FILE_DEVICE_MAILSLOT: ::DWORD = 0x0000000c; -pub const FILE_DEVICE_MIDI_IN: ::DWORD = 0x0000000d; -pub const FILE_DEVICE_MIDI_OUT: ::DWORD = 0x0000000e; -pub const FILE_DEVICE_MOUSE: ::DWORD = 0x0000000f; -pub const FILE_DEVICE_MULTI_UNC_PROVIDER: ::DWORD = 0x00000010; -pub const FILE_DEVICE_NAMED_PIPE: ::DWORD = 0x00000011; -pub const FILE_DEVICE_NETWORK: ::DWORD = 0x00000012; -pub const FILE_DEVICE_NETWORK_BROWSER: ::DWORD = 0x00000013; -pub const FILE_DEVICE_NETWORK_FILE_SYSTEM: ::DWORD = 0x00000014; -pub const FILE_DEVICE_NULL: ::DWORD = 0x00000015; -pub const FILE_DEVICE_PARALLEL_PORT: ::DWORD = 0x00000016; -pub const FILE_DEVICE_PHYSICAL_NETCARD: ::DWORD = 0x00000017; -pub const FILE_DEVICE_PRINTER: ::DWORD = 0x00000018; -pub const FILE_DEVICE_SCANNER: ::DWORD = 0x00000019; -pub const FILE_DEVICE_SERIAL_MOUSE_PORT: ::DWORD = 0x0000001a; -pub const FILE_DEVICE_SERIAL_PORT: ::DWORD = 0x0000001b; -pub const FILE_DEVICE_SCREEN: ::DWORD = 0x0000001c; -pub const FILE_DEVICE_SOUND: ::DWORD = 0x0000001d; -pub const FILE_DEVICE_STREAMS: ::DWORD = 0x0000001e; -pub const FILE_DEVICE_TAPE: ::DWORD = 0x0000001f; -pub const FILE_DEVICE_TAPE_FILE_SYSTEM: ::DWORD = 0x00000020; -pub const FILE_DEVICE_TRANSPORT: ::DWORD = 0x00000021; -pub const FILE_DEVICE_UNKNOWN: ::DWORD = 0x00000022; -pub const FILE_DEVICE_VIDEO: ::DWORD = 0x00000023; -pub const FILE_DEVICE_VIRTUAL_DISK: ::DWORD = 0x00000024; -pub const FILE_DEVICE_WAVE_IN: ::DWORD = 0x00000025; -pub const FILE_DEVICE_WAVE_OUT: ::DWORD = 0x00000026; -pub const FILE_DEVICE_8042_PORT: ::DWORD = 0x00000027; -pub const FILE_DEVICE_NETWORK_REDIRECTOR: ::DWORD = 0x00000028; -pub const FILE_DEVICE_BATTERY: ::DWORD = 0x00000029; -pub const FILE_DEVICE_BUS_EXTENDER: ::DWORD = 0x0000002a; -pub const FILE_DEVICE_MODEM: ::DWORD = 0x0000002b; -pub const FILE_DEVICE_VDM: ::DWORD = 0x0000002c; -pub const FILE_DEVICE_MASS_STORAGE: ::DWORD = 0x0000002d; -pub const FILE_DEVICE_SMB: ::DWORD = 0x0000002e; -pub const FILE_DEVICE_KS: ::DWORD = 0x0000002f; -pub const FILE_DEVICE_CHANGER: ::DWORD = 0x00000030; -pub const FILE_DEVICE_SMARTCARD: ::DWORD = 0x00000031; -pub const FILE_DEVICE_ACPI: ::DWORD = 0x00000032; -pub const FILE_DEVICE_DVD: ::DWORD = 0x00000033; -pub const FILE_DEVICE_FULLSCREEN_VIDEO: ::DWORD = 0x00000034; -pub const FILE_DEVICE_DFS_FILE_SYSTEM: ::DWORD = 0x00000035; -pub const FILE_DEVICE_DFS_VOLUME: ::DWORD = 0x00000036; -pub const FILE_DEVICE_SERENUM: ::DWORD = 0x00000037; -pub const FILE_DEVICE_TERMSRV: ::DWORD = 0x00000038; -pub const FILE_DEVICE_KSEC: ::DWORD = 0x00000039; -pub const FILE_DEVICE_FIPS: ::DWORD = 0x0000003A; -pub const FILE_DEVICE_INFINIBAND: ::DWORD = 0x0000003B; -pub const FILE_DEVICE_VMBUS: ::DWORD = 0x0000003E; -pub const FILE_DEVICE_CRYPT_PROVIDER: ::DWORD = 0x0000003F; -pub const FILE_DEVICE_WPD: ::DWORD = 0x00000040; -pub const FILE_DEVICE_BLUETOOTH: ::DWORD = 0x00000041; -pub const FILE_DEVICE_MT_COMPOSITE: ::DWORD = 0x00000042; -pub const FILE_DEVICE_MT_TRANSPORT: ::DWORD = 0x00000043; -pub const FILE_DEVICE_BIOMETRIC: ::DWORD = 0x00000044; -pub const FILE_DEVICE_PMI: ::DWORD = 0x00000045; -pub const FILE_DEVICE_EHSTOR: ::DWORD = 0x00000046; -pub const FILE_DEVICE_DEVAPI: ::DWORD = 0x00000047; -pub const FILE_DEVICE_GPIO: ::DWORD = 0x00000048; -pub const FILE_DEVICE_USBEX: ::DWORD = 0x00000049; -pub const FILE_DEVICE_CONSOLE: ::DWORD = 0x00000050; -pub const FILE_DEVICE_NFP: ::DWORD = 0x00000051; -pub const FILE_DEVICE_SYSENV: ::DWORD = 0x00000052; -pub const FILE_DEVICE_VIRTUAL_BLOCK: ::DWORD = 0x00000053; -pub const FILE_DEVICE_POINT_OF_SERVICE: ::DWORD = 0x00000054; -//224 -pub const METHOD_BUFFERED: ::DWORD = 0; -pub const METHOD_IN_DIRECT: ::DWORD = 1; -pub const METHOD_OUT_DIRECT: ::DWORD = 2; -pub const METHOD_NEITHER: ::DWORD = 3; -//253 -pub const FILE_ANY_ACCESS: ::DWORD = 0; -pub const FILE_SPECIAL_ACCESS: ::DWORD = FILE_ANY_ACCESS; -pub const FILE_READ_ACCESS: ::DWORD = 0x0001; -pub const FILE_WRITE_ACCESS: ::DWORD = 0x0002; -//281 -pub const IOCTL_STORAGE_BASE: ::DWORD = FILE_DEVICE_MASS_STORAGE; -pub const IOCTL_STORAGE_CHECK_VERIFY: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0200, - METHOD_BUFFERED, FILE_READ_ACCESS); -pub const IOCTL_STORAGE_CHECK_VERIFY2: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0200, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const IOCTL_STORAGE_MEDIA_REMOVAL: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0201, - METHOD_BUFFERED, FILE_READ_ACCESS); -pub const IOCTL_STORAGE_EJECT_MEDIA: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0202, - METHOD_BUFFERED, FILE_READ_ACCESS); -pub const IOCTL_STORAGE_LOAD_MEDIA: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0203, - METHOD_BUFFERED, FILE_READ_ACCESS); -pub const IOCTL_STORAGE_LOAD_MEDIA2: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0203, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const IOCTL_STORAGE_RESERVE: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0204, METHOD_BUFFERED, - FILE_READ_ACCESS); -pub const IOCTL_STORAGE_RELEASE: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0205, METHOD_BUFFERED, - FILE_READ_ACCESS); -pub const IOCTL_STORAGE_FIND_NEW_DEVICES: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0206, - METHOD_BUFFERED, FILE_READ_ACCESS); -pub const IOCTL_STORAGE_EJECTION_CONTROL: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0250, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const IOCTL_STORAGE_MCN_CONTROL: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0251, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const IOCTL_STORAGE_GET_MEDIA_TYPES: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0300, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const IOCTL_STORAGE_GET_MEDIA_TYPES_EX: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0301, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const IOCTL_STORAGE_GET_MEDIA_SERIAL_NUMBER: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0304, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const IOCTL_STORAGE_GET_HOTPLUG_INFO: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0305, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const IOCTL_STORAGE_SET_HOTPLUG_INFO: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0306, - METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS); -pub const IOCTL_STORAGE_RESET_BUS: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0400, METHOD_BUFFERED, - FILE_READ_ACCESS); -pub const IOCTL_STORAGE_RESET_DEVICE: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0401, - METHOD_BUFFERED, FILE_READ_ACCESS); -pub const IOCTL_STORAGE_BREAK_RESERVATION: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0405, - METHOD_BUFFERED, FILE_READ_ACCESS); -pub const IOCTL_STORAGE_PERSISTENT_RESERVE_IN: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0406, - METHOD_BUFFERED, FILE_READ_ACCESS); -pub const IOCTL_STORAGE_PERSISTENT_RESERVE_OUT: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0407, - METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS); -pub const IOCTL_STORAGE_GET_DEVICE_NUMBER: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0420, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const IOCTL_STORAGE_PREDICT_FAILURE: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0440, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const IOCTL_STORAGE_FAILURE_PREDICTION_CONFIG: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0441, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const IOCTL_STORAGE_READ_CAPACITY: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0450, - METHOD_BUFFERED, FILE_READ_ACCESS); -pub const IOCTL_STORAGE_GET_DEVICE_TELEMETRY: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0470, - METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS); -pub const IOCTL_STORAGE_DEVICE_TELEMETRY_NOTIFY: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0471, - METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS); -pub const IOCTL_STORAGE_DEVICE_TELEMETRY_QUERY_CAPS: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, - 0x0472, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS); -pub const IOCTL_STORAGE_GET_DEVICE_TELEMETRY_RAW: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0473, - METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS); -pub const IOCTL_STORAGE_QUERY_PROPERTY: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0500, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const IOCTL_STORAGE_MANAGE_DATA_SET_ATTRIBUTES: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0501, - METHOD_BUFFERED, FILE_WRITE_ACCESS); -pub const IOCTL_STORAGE_GET_LB_PROVISIONING_MAP_RESOURCES: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, - 0x0502, METHOD_BUFFERED, FILE_READ_ACCESS); -pub const IOCTL_STORAGE_GET_BC_PROPERTIES: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0600, - METHOD_BUFFERED, FILE_READ_ACCESS); -pub const IOCTL_STORAGE_ALLOCATE_BC_STREAM: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0601, - METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS); -pub const IOCTL_STORAGE_FREE_BC_STREAM: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0602, - METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS); -pub const IOCTL_STORAGE_CHECK_PRIORITY_HINT_SUPPORT: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, - 0x0620, METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const IOCTL_STORAGE_START_DATA_INTEGRITY_CHECK: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0621, - METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS); -pub const IOCTL_STORAGE_STOP_DATA_INTEGRITY_CHECK: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0622, - METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS); -pub const OBSOLETE_IOCTL_STORAGE_RESET_BUS: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0400, - METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS); -pub const OBSOLETE_IOCTL_STORAGE_RESET_DEVICE: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0401, - METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS); -pub const IOCTL_STORAGE_ENABLE_IDLE_POWER: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0720, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const IOCTL_STORAGE_GET_IDLE_POWERUP_REASON: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0721, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const IOCTL_STORAGE_POWER_ACTIVE: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0722, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const IOCTL_STORAGE_POWER_IDLE: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0723, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const IOCTL_STORAGE_EVENT_NOTIFICATION: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0724, - METHOD_BUFFERED, FILE_ANY_ACCESS); -//2627 -pub const IOCTL_DISK_BASE: ::DWORD = FILE_DEVICE_DISK; -pub const IOCTL_DISK_GET_DRIVE_GEOMETRY: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0000, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const IOCTL_DISK_GET_PARTITION_INFO: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0001, - METHOD_BUFFERED, FILE_READ_ACCESS); -pub const IOCTL_DISK_SET_PARTITION_INFO: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0002, - METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS); -pub const IOCTL_DISK_GET_DRIVE_LAYOUT: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0003, - METHOD_BUFFERED, FILE_READ_ACCESS); -pub const IOCTL_DISK_SET_DRIVE_LAYOUT: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0004, - METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS); -pub const IOCTL_DISK_VERIFY: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0005, METHOD_BUFFERED, - FILE_ANY_ACCESS); -pub const IOCTL_DISK_FORMAT_TRACKS: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0006, METHOD_BUFFERED, - FILE_READ_ACCESS | FILE_WRITE_ACCESS); -pub const IOCTL_DISK_REASSIGN_BLOCKS: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0007, METHOD_BUFFERED, - FILE_READ_ACCESS | FILE_WRITE_ACCESS); -pub const IOCTL_DISK_PERFORMANCE: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0008, METHOD_BUFFERED, - FILE_ANY_ACCESS); -pub const IOCTL_DISK_IS_WRITABLE: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0009, METHOD_BUFFERED, - FILE_ANY_ACCESS); -pub const IOCTL_DISK_LOGGING: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x000a, METHOD_BUFFERED, - FILE_ANY_ACCESS); -pub const IOCTL_DISK_FORMAT_TRACKS_EX: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x000b, - METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS); -pub const IOCTL_DISK_HISTOGRAM_STRUCTURE: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x000c, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const IOCTL_DISK_HISTOGRAM_DATA: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x000d, METHOD_BUFFERED, - FILE_ANY_ACCESS); -pub const IOCTL_DISK_HISTOGRAM_RESET: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x000e, METHOD_BUFFERED, - FILE_ANY_ACCESS); -pub const IOCTL_DISK_REQUEST_STRUCTURE: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x000f, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const IOCTL_DISK_REQUEST_DATA: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0010, METHOD_BUFFERED, - FILE_ANY_ACCESS); -pub const IOCTL_DISK_PERFORMANCE_OFF: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0018, METHOD_BUFFERED, - FILE_ANY_ACCESS); -pub const IOCTL_DISK_CONTROLLER_NUMBER: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0011, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const SMART_GET_VERSION: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0020, METHOD_BUFFERED, - FILE_READ_ACCESS); -pub const SMART_SEND_DRIVE_COMMAND: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0021, METHOD_BUFFERED, - FILE_READ_ACCESS | FILE_WRITE_ACCESS); -pub const SMART_RCV_DRIVE_DATA: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0022, METHOD_BUFFERED, - FILE_READ_ACCESS | FILE_WRITE_ACCESS); -pub const IOCTL_DISK_GET_PARTITION_INFO_EX: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0012, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const IOCTL_DISK_SET_PARTITION_INFO_EX: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0013, - METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS); -pub const IOCTL_DISK_GET_DRIVE_LAYOUT_EX: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0014, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const IOCTL_DISK_SET_DRIVE_LAYOUT_EX: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0015, - METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS); -pub const IOCTL_DISK_CREATE_DISK: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0016, METHOD_BUFFERED, - FILE_READ_ACCESS | FILE_WRITE_ACCESS); -pub const IOCTL_DISK_GET_LENGTH_INFO: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0017, METHOD_BUFFERED, - FILE_READ_ACCESS); -pub const IOCTL_DISK_GET_DRIVE_GEOMETRY_EX: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0028, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const IOCTL_DISK_REASSIGN_BLOCKS_EX: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0029, - METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS); -pub const IOCTL_DISK_UPDATE_DRIVE_SIZE: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0032, - METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS); -pub const IOCTL_DISK_GROW_PARTITION: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0034, METHOD_BUFFERED, - FILE_READ_ACCESS | FILE_WRITE_ACCESS); -pub const IOCTL_DISK_GET_CACHE_INFORMATION: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0035, - METHOD_BUFFERED, FILE_READ_ACCESS); -pub const IOCTL_DISK_SET_CACHE_INFORMATION: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0036, - METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS); -pub const IOCTL_DISK_GET_WRITE_CACHE_STATE: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0037, - METHOD_BUFFERED, FILE_READ_ACCESS); -pub const OBSOLETE_DISK_GET_WRITE_CACHE_STATE: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0037, - METHOD_BUFFERED, FILE_READ_ACCESS); -pub const IOCTL_DISK_DELETE_DRIVE_LAYOUT: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0040, - METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS); -pub const IOCTL_DISK_UPDATE_PROPERTIES: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0050, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const IOCTL_DISK_FORMAT_DRIVE: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x00f3, METHOD_BUFFERED, - FILE_READ_ACCESS | FILE_WRITE_ACCESS); -pub const IOCTL_DISK_SENSE_DEVICE: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x00f8, METHOD_BUFFERED, - FILE_ANY_ACCESS); -pub const IOCTL_DISK_CHECK_VERIFY: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0200, METHOD_BUFFERED, - FILE_READ_ACCESS); -pub const IOCTL_DISK_MEDIA_REMOVAL: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0201, METHOD_BUFFERED, - FILE_READ_ACCESS); -pub const IOCTL_DISK_EJECT_MEDIA: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0202, METHOD_BUFFERED, - FILE_READ_ACCESS); -pub const IOCTL_DISK_LOAD_MEDIA: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0203, METHOD_BUFFERED, - FILE_READ_ACCESS); -pub const IOCTL_DISK_RESERVE: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0204, METHOD_BUFFERED, - FILE_READ_ACCESS); -pub const IOCTL_DISK_RELEASE: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0205, METHOD_BUFFERED, - FILE_READ_ACCESS); -pub const IOCTL_DISK_FIND_NEW_DEVICES: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0206, - METHOD_BUFFERED, FILE_READ_ACCESS); -pub const IOCTL_DISK_GET_MEDIA_TYPES: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0300, METHOD_BUFFERED, - FILE_ANY_ACCESS); -pub const IOCTL_DISK_GET_DISK_ATTRIBUTES: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x003c, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const IOCTL_DISK_SET_DISK_ATTRIBUTES: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x003d, - METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS); -pub const IOCTL_DISK_RESET_SNAPSHOT_INFO: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0084, - METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS); -//3907 -pub const IOCTL_CHANGER_BASE: ::DWORD = FILE_DEVICE_CHANGER; -pub const IOCTL_CHANGER_GET_PARAMETERS: ::DWORD = CTL_CODE!(IOCTL_CHANGER_BASE, 0x0000, - METHOD_BUFFERED, FILE_READ_ACCESS); -pub const IOCTL_CHANGER_GET_STATUS: ::DWORD = CTL_CODE!(IOCTL_CHANGER_BASE, 0x0001, - METHOD_BUFFERED, FILE_READ_ACCESS); -pub const IOCTL_CHANGER_GET_PRODUCT_DATA: ::DWORD = CTL_CODE!(IOCTL_CHANGER_BASE, 0x0002, - METHOD_BUFFERED, FILE_READ_ACCESS); -pub const IOCTL_CHANGER_SET_ACCESS: ::DWORD = CTL_CODE!(IOCTL_CHANGER_BASE, 0x0004, - METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS); -pub const IOCTL_CHANGER_GET_ELEMENT_STATUS: ::DWORD = CTL_CODE!(IOCTL_CHANGER_BASE, 0x0005, - METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS); -pub const IOCTL_CHANGER_INITIALIZE_ELEMENT_STATUS: ::DWORD = CTL_CODE!(IOCTL_CHANGER_BASE, 0x0006, - METHOD_BUFFERED, FILE_READ_ACCESS); -pub const IOCTL_CHANGER_SET_POSITION: ::DWORD = CTL_CODE!(IOCTL_CHANGER_BASE, 0x0007, - METHOD_BUFFERED, FILE_READ_ACCESS); -pub const IOCTL_CHANGER_EXCHANGE_MEDIUM: ::DWORD = CTL_CODE!(IOCTL_CHANGER_BASE, 0x0008, - METHOD_BUFFERED, FILE_READ_ACCESS); -pub const IOCTL_CHANGER_MOVE_MEDIUM: ::DWORD = CTL_CODE!(IOCTL_CHANGER_BASE, 0x0009, - METHOD_BUFFERED, FILE_READ_ACCESS); -pub const IOCTL_CHANGER_REINITIALIZE_TRANSPORT: ::DWORD = CTL_CODE!(IOCTL_CHANGER_BASE, 0x000A, - METHOD_BUFFERED, FILE_READ_ACCESS); -pub const IOCTL_CHANGER_QUERY_VOLUME_TAGS: ::DWORD = CTL_CODE!(IOCTL_CHANGER_BASE, 0x000B, - METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS); -pub const IOCTL_SERIAL_LSRMST_INSERT: ::DWORD = CTL_CODE!(FILE_DEVICE_SERIAL_PORT, 31, - METHOD_BUFFERED,FILE_ANY_ACCESS); -pub const IOCTL_SERENUM_EXPOSE_HARDWARE: ::DWORD = CTL_CODE!(FILE_DEVICE_SERENUM, 128, - METHOD_BUFFERED,FILE_ANY_ACCESS); -pub const IOCTL_SERENUM_REMOVE_HARDWARE: ::DWORD = CTL_CODE!(FILE_DEVICE_SERENUM, 129, - METHOD_BUFFERED,FILE_ANY_ACCESS); -pub const IOCTL_SERENUM_PORT_DESC: ::DWORD = CTL_CODE!(FILE_DEVICE_SERENUM, 130, - METHOD_BUFFERED,FILE_ANY_ACCESS); -pub const IOCTL_SERENUM_GET_PORT_NAME: ::DWORD = CTL_CODE!(FILE_DEVICE_SERENUM, 131, - METHOD_BUFFERED,FILE_ANY_ACCESS); -//4690 -pub const FSCTL_REQUEST_OPLOCK_LEVEL_1: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 0, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const FSCTL_REQUEST_OPLOCK_LEVEL_2: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 1, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const FSCTL_REQUEST_BATCH_OPLOCK: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 2, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const FSCTL_OPLOCK_BREAK_ACKNOWLEDGE: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 3, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const FSCTL_OPBATCH_ACK_CLOSE_PENDING: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 4, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const FSCTL_OPLOCK_BREAK_NOTIFY: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 5, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const FSCTL_LOCK_VOLUME: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 6, METHOD_BUFFERED, - FILE_ANY_ACCESS); -pub const FSCTL_UNLOCK_VOLUME: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 7, METHOD_BUFFERED, - FILE_ANY_ACCESS); -pub const FSCTL_DISMOUNT_VOLUME: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 8, METHOD_BUFFERED, - FILE_ANY_ACCESS); -pub const FSCTL_IS_VOLUME_MOUNTED: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 10, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const FSCTL_IS_PATHNAME_VALID: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 11, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const FSCTL_MARK_VOLUME_DIRTY: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 12, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const FSCTL_QUERY_RETRIEVAL_POINTERS: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 14, - METHOD_NEITHER, FILE_ANY_ACCESS); -pub const FSCTL_GET_COMPRESSION: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 15, METHOD_BUFFERED, - FILE_ANY_ACCESS); -pub const FSCTL_SET_COMPRESSION: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 16, METHOD_BUFFERED, - ::FILE_READ_DATA | ::FILE_WRITE_DATA); -pub const FSCTL_SET_BOOTLOADER_ACCESSED: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 19, - METHOD_NEITHER, FILE_ANY_ACCESS); -pub const FSCTL_MARK_AS_SYSTEM_HIVE: ::DWORD = FSCTL_SET_BOOTLOADER_ACCESSED; -pub const FSCTL_OPLOCK_BREAK_ACK_NO_2: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 20, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const FSCTL_INVALIDATE_VOLUMES: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 21, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const FSCTL_QUERY_FAT_BPB: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 22, METHOD_BUFFERED, - FILE_ANY_ACCESS); -pub const FSCTL_REQUEST_FILTER_OPLOCK: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 23, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const FSCTL_FILESYSTEM_GET_STATISTICS: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 24, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const FSCTL_GET_NTFS_VOLUME_DATA: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 25, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const FSCTL_GET_NTFS_FILE_RECORD: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 26, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const FSCTL_GET_VOLUME_BITMAP: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 27, METHOD_NEITHER, - FILE_ANY_ACCESS); -pub const FSCTL_GET_RETRIEVAL_POINTERS: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 28, - METHOD_NEITHER, FILE_ANY_ACCESS); -pub const FSCTL_MOVE_FILE: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 29, METHOD_BUFFERED, - FILE_SPECIAL_ACCESS); -pub const FSCTL_IS_VOLUME_DIRTY: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 30, METHOD_BUFFERED, - FILE_ANY_ACCESS); -pub const FSCTL_ALLOW_EXTENDED_DASD_IO: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 32, - METHOD_NEITHER, FILE_ANY_ACCESS); -pub const FSCTL_FIND_FILES_BY_SID: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 35, METHOD_NEITHER, - FILE_ANY_ACCESS); -pub const FSCTL_SET_OBJECT_ID: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 38, METHOD_BUFFERED, - FILE_SPECIAL_ACCESS); -pub const FSCTL_GET_OBJECT_ID: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 39, METHOD_BUFFERED, - FILE_ANY_ACCESS); -pub const FSCTL_DELETE_OBJECT_ID: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 40, METHOD_BUFFERED, - FILE_SPECIAL_ACCESS); -pub const FSCTL_SET_REPARSE_POINT: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 41, - METHOD_BUFFERED, FILE_SPECIAL_ACCESS); -pub const FSCTL_GET_REPARSE_POINT: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 42, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const FSCTL_DELETE_REPARSE_POINT: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 43, - METHOD_BUFFERED, FILE_SPECIAL_ACCESS); -pub const FSCTL_ENUM_USN_DATA: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 44, - METHOD_NEITHER, FILE_ANY_ACCESS); -pub const FSCTL_SECURITY_ID_CHECK: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 45, METHOD_NEITHER, - ::FILE_READ_DATA); -pub const FSCTL_READ_USN_JOURNAL: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 46, METHOD_NEITHER, - FILE_ANY_ACCESS); -pub const FSCTL_SET_OBJECT_ID_EXTENDED: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 47, - METHOD_BUFFERED, FILE_SPECIAL_ACCESS); -pub const FSCTL_CREATE_OR_GET_OBJECT_ID: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 48, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const FSCTL_SET_SPARSE: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 49, METHOD_BUFFERED, - FILE_SPECIAL_ACCESS); -pub const FSCTL_SET_ZERO_DATA: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 50, METHOD_BUFFERED, - ::FILE_WRITE_DATA); -pub const FSCTL_QUERY_ALLOCATED_RANGES: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 51, - METHOD_NEITHER, ::FILE_READ_DATA); -pub const FSCTL_ENABLE_UPGRADE: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 52, METHOD_BUFFERED, - ::FILE_WRITE_DATA); -pub const FSCTL_SET_ENCRYPTION: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 53, METHOD_NEITHER, - FILE_ANY_ACCESS); -pub const FSCTL_ENCRYPTION_FSCTL_IO: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 54, - METHOD_NEITHER, FILE_ANY_ACCESS); -pub const FSCTL_WRITE_RAW_ENCRYPTED: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 55, - METHOD_NEITHER, FILE_SPECIAL_ACCESS); -pub const FSCTL_READ_RAW_ENCRYPTED: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 56, - METHOD_NEITHER, FILE_SPECIAL_ACCESS); -pub const FSCTL_CREATE_USN_JOURNAL: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 57, - METHOD_NEITHER, FILE_ANY_ACCESS); -pub const FSCTL_READ_FILE_USN_DATA: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 58, - METHOD_NEITHER, FILE_ANY_ACCESS); -pub const FSCTL_WRITE_USN_CLOSE_RECORD: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 59, - METHOD_NEITHER, FILE_ANY_ACCESS); -pub const FSCTL_EXTEND_VOLUME: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 60, METHOD_BUFFERED, - FILE_ANY_ACCESS); -pub const FSCTL_QUERY_USN_JOURNAL: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 61, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const FSCTL_DELETE_USN_JOURNAL: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 62, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const FSCTL_MARK_HANDLE: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 63, METHOD_BUFFERED, - FILE_ANY_ACCESS); -pub const FSCTL_SIS_COPYFILE: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 64, METHOD_BUFFERED, - FILE_ANY_ACCESS); -pub const FSCTL_SIS_LINK_FILES: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 65, METHOD_BUFFERED, - ::FILE_READ_DATA | ::FILE_WRITE_DATA); -pub const FSCTL_RECALL_FILE: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 69, METHOD_NEITHER, - FILE_ANY_ACCESS); -pub const FSCTL_READ_FROM_PLEX: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 71, METHOD_OUT_DIRECT, - ::FILE_READ_DATA); -pub const FSCTL_FILE_PREFETCH: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 72, METHOD_BUFFERED, - FILE_SPECIAL_ACCESS); -pub const FSCTL_MAKE_MEDIA_COMPATIBLE: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 76, - METHOD_BUFFERED, ::FILE_WRITE_DATA); -pub const FSCTL_SET_DEFECT_MANAGEMENT: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 77, - METHOD_BUFFERED, ::FILE_WRITE_DATA); -pub const FSCTL_QUERY_SPARING_INFO: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 78, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const FSCTL_QUERY_ON_DISK_VOLUME_INFO: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 79, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const FSCTL_SET_VOLUME_COMPRESSION_STATE: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 80, - METHOD_BUFFERED, FILE_SPECIAL_ACCESS); -pub const FSCTL_TXFS_MODIFY_RM: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 81, METHOD_BUFFERED, - ::FILE_WRITE_DATA); -pub const FSCTL_TXFS_QUERY_RM_INFORMATION: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 82, - METHOD_BUFFERED, ::FILE_READ_DATA); -pub const FSCTL_TXFS_ROLLFORWARD_REDO: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 84, - METHOD_BUFFERED, ::FILE_WRITE_DATA); -pub const FSCTL_TXFS_ROLLFORWARD_UNDO: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 85, - METHOD_BUFFERED, ::FILE_WRITE_DATA); -pub const FSCTL_TXFS_START_RM: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 86, METHOD_BUFFERED, - ::FILE_WRITE_DATA); -pub const FSCTL_TXFS_SHUTDOWN_RM: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 87, METHOD_BUFFERED, - ::FILE_WRITE_DATA); -pub const FSCTL_TXFS_READ_BACKUP_INFORMATION: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 88, - METHOD_BUFFERED, ::FILE_READ_DATA); -pub const FSCTL_TXFS_WRITE_BACKUP_INFORMATION: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 89, - METHOD_BUFFERED, ::FILE_WRITE_DATA); -pub const FSCTL_TXFS_CREATE_SECONDARY_RM: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 90, - METHOD_BUFFERED, ::FILE_WRITE_DATA); -pub const FSCTL_TXFS_GET_METADATA_INFO: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 91, - METHOD_BUFFERED, ::FILE_READ_DATA); -pub const FSCTL_TXFS_GET_TRANSACTED_VERSION: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 92, - METHOD_BUFFERED, ::FILE_READ_DATA); -pub const FSCTL_TXFS_SAVEPOINT_INFORMATION: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 94, - METHOD_BUFFERED, ::FILE_WRITE_DATA); -pub const FSCTL_TXFS_CREATE_MINIVERSION: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 95, - METHOD_BUFFERED, ::FILE_WRITE_DATA); -pub const FSCTL_TXFS_TRANSACTION_ACTIVE: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 99, - METHOD_BUFFERED, ::FILE_READ_DATA); -pub const FSCTL_SET_ZERO_ON_DEALLOCATION: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 101, - METHOD_BUFFERED, FILE_SPECIAL_ACCESS); -pub const FSCTL_SET_REPAIR: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 102, METHOD_BUFFERED, - FILE_ANY_ACCESS); -pub const FSCTL_GET_REPAIR: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 103, METHOD_BUFFERED, - FILE_ANY_ACCESS); -pub const FSCTL_WAIT_FOR_REPAIR: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 104, METHOD_BUFFERED, - FILE_ANY_ACCESS); -pub const FSCTL_INITIATE_REPAIR: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 106, METHOD_BUFFERED, - FILE_ANY_ACCESS); -pub const FSCTL_CSC_INTERNAL: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 107, METHOD_NEITHER, - FILE_ANY_ACCESS); -pub const FSCTL_SHRINK_VOLUME: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 108, METHOD_BUFFERED, - FILE_SPECIAL_ACCESS); -pub const FSCTL_SET_SHORT_NAME_BEHAVIOR: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 109, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const FSCTL_DFSR_SET_GHOST_HANDLE_STATE: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 110, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const FSCTL_TXFS_LIST_TRANSACTION_LOCKED_FILES: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, - 120, METHOD_BUFFERED, ::FILE_READ_DATA); -pub const FSCTL_TXFS_LIST_TRANSACTIONS: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 121, - METHOD_BUFFERED, ::FILE_READ_DATA); -pub const FSCTL_QUERY_PAGEFILE_ENCRYPTION: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 122, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const FSCTL_RESET_VOLUME_ALLOCATION_HINTS: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 123, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const FSCTL_QUERY_DEPENDENT_VOLUME: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 124, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const FSCTL_SD_GLOBAL_CHANGE: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 125, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const FSCTL_TXFS_READ_BACKUP_INFORMATION2: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 126, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const FSCTL_LOOKUP_STREAM_FROM_CLUSTER: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 127, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const FSCTL_TXFS_WRITE_BACKUP_INFORMATION2: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 128, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const FSCTL_FILE_TYPE_NOTIFICATION: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 129, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const FSCTL_FILE_LEVEL_TRIM: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 130, METHOD_BUFFERED, - ::FILE_WRITE_DATA); -pub const FSCTL_GET_BOOT_AREA_INFO: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 140, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const FSCTL_GET_RETRIEVAL_POINTER_BASE: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 141, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const FSCTL_SET_PERSISTENT_VOLUME_STATE: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 142, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const FSCTL_QUERY_PERSISTENT_VOLUME_STATE: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 143, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const FSCTL_REQUEST_OPLOCK: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 144, METHOD_BUFFERED, - FILE_ANY_ACCESS); -pub const FSCTL_CSV_TUNNEL_REQUEST: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 145, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const FSCTL_IS_CSV_FILE: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 146, METHOD_BUFFERED, - FILE_ANY_ACCESS); -pub const FSCTL_QUERY_FILE_SYSTEM_RECOGNITION: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 147, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const FSCTL_CSV_GET_VOLUME_PATH_NAME: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 148, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const FSCTL_CSV_GET_VOLUME_NAME_FOR_VOLUME_MOUNT_POINT: ::DWORD = CTL_CODE!( - FILE_DEVICE_FILE_SYSTEM, 149, METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const FSCTL_CSV_GET_VOLUME_PATH_NAMES_FOR_VOLUME_NAME: ::DWORD = CTL_CODE!( - FILE_DEVICE_FILE_SYSTEM, 150, METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const FSCTL_IS_FILE_ON_CSV_VOLUME: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 151, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const FSCTL_CORRUPTION_HANDLING: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 152, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const FSCTL_OFFLOAD_READ: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 153, METHOD_BUFFERED, - FILE_READ_ACCESS); -pub const FSCTL_OFFLOAD_WRITE: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 154, METHOD_BUFFERED, - FILE_WRITE_ACCESS); -pub const FSCTL_CSV_INTERNAL: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 155, METHOD_BUFFERED, - FILE_ANY_ACCESS); -pub const FSCTL_SET_PURGE_FAILURE_MODE: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 156, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const FSCTL_QUERY_FILE_LAYOUT: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 157, - METHOD_NEITHER, FILE_ANY_ACCESS); -pub const FSCTL_IS_VOLUME_OWNED_BYCSVFS: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 158, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const FSCTL_GET_INTEGRITY_INFORMATION: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 159, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const FSCTL_SET_INTEGRITY_INFORMATION: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 160, - METHOD_BUFFERED, ::FILE_READ_DATA | ::FILE_WRITE_DATA); -pub const FSCTL_QUERY_FILE_REGIONS: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 161, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const FSCTL_DEDUP_FILE: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 165, METHOD_BUFFERED, - FILE_ANY_ACCESS); -pub const FSCTL_DEDUP_QUERY_FILE_HASHES: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 166, - METHOD_NEITHER, ::FILE_READ_DATA); -pub const FSCTL_DEDUP_QUERY_RANGE_STATE: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 167, - METHOD_NEITHER, ::FILE_READ_DATA); -pub const FSCTL_DEDUP_QUERY_REPARSE_INFO: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 168, - METHOD_NEITHER, FILE_ANY_ACCESS); -pub const FSCTL_RKF_INTERNAL: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 171, METHOD_NEITHER, - FILE_ANY_ACCESS); -pub const FSCTL_SCRUB_DATA: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 172, METHOD_BUFFERED, - FILE_ANY_ACCESS); -pub const FSCTL_REPAIR_COPIES: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 173, METHOD_BUFFERED, - ::FILE_READ_DATA | ::FILE_WRITE_DATA); -pub const FSCTL_DISABLE_LOCAL_BUFFERING: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 174, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const FSCTL_CSV_MGMT_LOCK: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 175, METHOD_BUFFERED, - FILE_ANY_ACCESS); -pub const FSCTL_CSV_QUERY_DOWN_LEVEL_FILE_SYSTEM_CHARACTERISTICS: ::DWORD = CTL_CODE!( - FILE_DEVICE_FILE_SYSTEM, 176, METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const FSCTL_ADVANCE_FILE_ID: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 177, METHOD_BUFFERED, - FILE_ANY_ACCESS); -pub const FSCTL_CSV_SYNC_TUNNEL_REQUEST: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 178, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const FSCTL_CSV_QUERY_VETO_FILE_DIRECT_IO: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 179, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const FSCTL_WRITE_USN_REASON: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 180, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const FSCTL_CSV_CONTROL: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 181, METHOD_BUFFERED, - FILE_ANY_ACCESS); -pub const FSCTL_GET_REFS_VOLUME_DATA: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 182, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const FSCTL_CSV_H_BREAKING_SYNC_TUNNEL_REQUEST: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, - 185, METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const FSCTL_QUERY_STORAGE_CLASSES: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 187, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const FSCTL_QUERY_REGION_INFO: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 188, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const FSCTL_USN_TRACK_MODIFIED_RANGES: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 189, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const FSCTL_QUERY_SHARED_VIRTUAL_DISK_SUPPORT: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, - 192, METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const FSCTL_SVHDX_SYNC_TUNNEL_REQUEST: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 193, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const FSCTL_SVHDX_SET_INITIATOR_INFORMATION: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 194, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const FSCTL_SET_EXTERNAL_BACKING: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 195, - METHOD_BUFFERED, FILE_SPECIAL_ACCESS); -pub const FSCTL_GET_EXTERNAL_BACKING: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 196, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const FSCTL_DELETE_EXTERNAL_BACKING: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 197, - METHOD_BUFFERED, FILE_SPECIAL_ACCESS); -pub const FSCTL_ENUM_EXTERNAL_BACKING: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 198, - METHOD_BUFFERED, FILE_ANY_ACCESS); -pub const FSCTL_ENUM_OVERLAY: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 199, METHOD_NEITHER, - FILE_ANY_ACCESS); -pub const FSCTL_ADD_OVERLAY: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 204, METHOD_BUFFERED, - ::FILE_WRITE_DATA); -pub const FSCTL_REMOVE_OVERLAY: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 205, METHOD_BUFFERED, - ::FILE_WRITE_DATA); -pub const FSCTL_UPDATE_OVERLAY: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 206, METHOD_BUFFERED, - ::FILE_WRITE_DATA); -// FILE_DEVICE_AVIO is defined nowhere -//pub const IOCTL_AVIO_ALLOCATE_STREAM: ::DWORD = CTL_CODE!(FILE_DEVICE_AVIO, 1, METHOD_BUFFERED, -// FILE_SPECIAL_ACCESS); -//pub const IOCTL_AVIO_FREE_STREAM: ::DWORD = CTL_CODE!(FILE_DEVICE_AVIO, 2, METHOD_BUFFERED, -// FILE_SPECIAL_ACCESS); -//pub const IOCTL_AVIO_MODIFY_STREAM: ::DWORD = CTL_CODE!(FILE_DEVICE_AVIO, 3, METHOD_BUFFERED, -// FILE_SPECIAL_ACCESS); -STRUCT!{struct PATHNAME_BUFFER { - PathNameLength: ::DWORD, - Name: [::WCHAR; 1], -}} -pub type PPATHNAME_BUFFER = *mut PATHNAME_BUFFER; -#[repr(C)] #[derive(Copy)] -pub struct FSCTL_QUERY_FAT_BPB_BUFFER { - pub First0x24BytesOfBootSector: [::BYTE; 0x24], -} -impl Clone for FSCTL_QUERY_FAT_BPB_BUFFER {fn clone(&self) -> FSCTL_QUERY_FAT_BPB_BUFFER { *self }} -pub type PFSCTL_QUERY_FAT_BPB_BUFFER = *mut FSCTL_QUERY_FAT_BPB_BUFFER; -STRUCT!{struct NTFS_VOLUME_DATA_BUFFER { - VolumeSerialNumber: ::LARGE_INTEGER, - NumberSectors: ::LARGE_INTEGER, - TotalClusters: ::LARGE_INTEGER, - FreeClusters: ::LARGE_INTEGER, - TotalReserved: ::LARGE_INTEGER, - BytesPerSector: ::DWORD, - BytesPerCluster: ::DWORD, - BytesPerFileRecordSegment: ::DWORD, - ClustersPerFileRecordSegment: ::DWORD, - MftValidDataLength: ::LARGE_INTEGER, - MftStartLcn: ::LARGE_INTEGER, - Mft2StartLcn: ::LARGE_INTEGER, - MftZoneStart: ::LARGE_INTEGER, - MftZoneEnd: ::LARGE_INTEGER, -}} -pub type PNTFS_VOLUME_DATA_BUFFER = *mut NTFS_VOLUME_DATA_BUFFER; -STRUCT!{struct NTFS_EXTENDED_VOLUME_DATA { - ByteCount: ::DWORD, - MajorVersion: ::WORD, - MinorVersion: ::WORD, - BytesPerPhysicalSector: ::DWORD, - LfsMajorVersion: ::WORD, - LfsMinorVersion: ::WORD, -}} -pub type PNTFS_EXTENDED_VOLUME_DATA = *mut NTFS_EXTENDED_VOLUME_DATA; -STRUCT!{struct REFS_VOLUME_DATA_BUFFER { - ByteCount: ::DWORD, - MajorVersion: ::DWORD, - MinorVersion: ::DWORD, - BytesPerPhysicalSector: ::DWORD, - VolumeSerialNumber: ::LARGE_INTEGER, - NumberSectors: ::LARGE_INTEGER, - TotalClusters: ::LARGE_INTEGER, - FreeClusters: ::LARGE_INTEGER, - TotalReserved: ::LARGE_INTEGER, - BytesPerSector: ::DWORD, - BytesPerCluster: ::DWORD, - MaximumSizeOfResidentFile: ::LARGE_INTEGER, - Reserved: [::LARGE_INTEGER; 10], -}} -pub type PREFS_VOLUME_DATA_BUFFER = *mut REFS_VOLUME_DATA_BUFFER; -STRUCT!{struct STARTING_LCN_INPUT_BUFFER { - StartingLcn: ::LARGE_INTEGER, -}} -pub type PSTARTING_LCN_INPUT_BUFFER = *mut STARTING_LCN_INPUT_BUFFER; -STRUCT!{struct VOLUME_BITMAP_BUFFER { - StartingLcn: ::LARGE_INTEGER, - BitmapSize: ::LARGE_INTEGER, - Buffer: [::BYTE; 1], -}} -pub type PVOLUME_BITMAP_BUFFER = *mut VOLUME_BITMAP_BUFFER; -STRUCT!{struct STARTING_VCN_INPUT_BUFFER { - StartingVcn: ::LARGE_INTEGER, -}} -pub type PSTARTING_VCN_INPUT_BUFFER = *mut STARTING_VCN_INPUT_BUFFER; -STRUCT!{struct RETRIEVAL_POINTERS_BUFFER_INTERNAL { - NextVcn: ::LARGE_INTEGER, - Lcn: ::LARGE_INTEGER, -}} -STRUCT!{struct RETRIEVAL_POINTERS_BUFFER { - ExtentCount: ::DWORD, - StartingVcn: ::LARGE_INTEGER, - Extents: [RETRIEVAL_POINTERS_BUFFER_INTERNAL; 1], -}} -pub type PRETRIEVAL_POINTERS_BUFFER = *mut RETRIEVAL_POINTERS_BUFFER; -STRUCT!{struct NTFS_FILE_RECORD_INPUT_BUFFER { - FileReferenceNumber: ::LARGE_INTEGER, -}} -pub type PNTFS_FILE_RECORD_INPUT_BUFFER = *mut NTFS_FILE_RECORD_INPUT_BUFFER; -STRUCT!{struct NTFS_FILE_RECORD_OUTPUT_BUFFER { - FileReferenceNumber: ::LARGE_INTEGER, - FileRecordLength: ::DWORD, - FileRecordBuffer: [::BYTE; 1], -}} -pub type PNTFS_FILE_RECORD_OUTPUT_BUFFER = *mut NTFS_FILE_RECORD_OUTPUT_BUFFER; -STRUCT!{struct MOVE_FILE_DATA { - FileHandle: ::HANDLE, - StartingVcn: ::LARGE_INTEGER, - StartingLcn: ::LARGE_INTEGER, - ClusterCount: ::DWORD, -}} -pub type PMOVE_FILE_DATA = *mut MOVE_FILE_DATA; -STRUCT!{struct MOVE_FILE_RECORD_DATA { - FileHandle: ::HANDLE, - SourceFileRecord: ::LARGE_INTEGER, - TargetFileRecord: ::LARGE_INTEGER, -}} -pub type PMOVE_FILE_RECORD_DATA = *mut MOVE_FILE_RECORD_DATA; -//9207 -pub const IOCTL_VOLUME_BASE: ::DWORD = 0x00000056; -pub const IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS: ::DWORD = CTL_CODE!(IOCTL_VOLUME_BASE, 0, - METHOD_BUFFERED, FILE_ANY_ACCESS); -STRUCT!{struct DISK_EXTENT { - DiskNumber: ::DWORD, - StartingOffset: ::LARGE_INTEGER, - ExtentLength: ::LARGE_INTEGER, -}} -pub type PDISK_EXTENT = *mut DISK_EXTENT; -STRUCT!{struct VOLUME_DISK_EXTENTS { - NumberOfDiskExtents: ::DWORD, - Extents: [DISK_EXTENT; ::ANYSIZE_ARRAY], -}} -pub type PVOLUME_DISK_EXTENTS = *mut VOLUME_DISK_EXTENTS; -pub const IOCTL_VOLUME_ONLINE: ::DWORD = CTL_CODE!(IOCTL_VOLUME_BASE, 2, METHOD_BUFFERED, - FILE_READ_ACCESS | FILE_WRITE_ACCESS); -pub const IOCTL_VOLUME_OFFLINE: ::DWORD = CTL_CODE!(IOCTL_VOLUME_BASE, 3, METHOD_BUFFERED, - FILE_READ_ACCESS | FILE_WRITE_ACCESS); -pub const IOCTL_VOLUME_IS_CLUSTERED: ::DWORD = CTL_CODE!(IOCTL_VOLUME_BASE, 12, METHOD_BUFFERED, - FILE_ANY_ACCESS); -pub const IOCTL_VOLUME_GET_GPT_ATTRIBUTES: ::DWORD = CTL_CODE!(IOCTL_VOLUME_BASE, 14, - METHOD_BUFFERED, FILE_ANY_ACCESS); diff --git a/deps/winapi-0.2.5/src/winnls.rs b/deps/winapi-0.2.5/src/winnls.rs deleted file mode 100644 index 6317dfb4e..000000000 --- a/deps/winapi-0.2.5/src/winnls.rs +++ /dev/null @@ -1,168 +0,0 @@ -// Copyright © 2015, Peter Atashian -// Licensed under the MIT License <LICENSE.md> -//! Procedure declarations, constant definitions, and macros for the NLS component. -pub const CP_ACP: ::DWORD = 0; -pub const CP_OEMCP: ::DWORD = 1; -pub const CP_MACCP: ::DWORD = 2; -pub const CP_THREAD_ACP: ::DWORD = 3; -pub const CP_SYMBOL: ::DWORD = 42; -pub const CP_UTF7: ::DWORD = 65000; -pub const CP_UTF8: ::DWORD = 65001; -pub const MAX_LEADBYTES: usize = 12; -pub const MAX_DEFAULTCHAR: usize = 2; -pub type LGRPID = ::DWORD; -pub type LCTYPE = ::DWORD; -pub type CALTYPE = ::DWORD; -pub type CALID = ::DWORD; -pub type GEOID = ::LONG; -pub type GEOTYPE = ::DWORD; -pub type GEOCLASS = ::DWORD; -STRUCT!{struct NLSVERSIONINFO { - dwNLSVersionInfoSize: ::DWORD, - dwNLSVersion: ::DWORD, - dwDefinedVersion: ::DWORD, - dwEffectiveId: ::DWORD, - guidCustomVersion: ::GUID, -}} -pub type LPNLSVERSIONINFO = *mut NLSVERSIONINFO; -STRUCT!{struct NLSVERSIONINFOEX { - dwNLSVersionInfoSize: ::DWORD, - dwNLSVersion: ::DWORD, - dwDefinedVersion: ::DWORD, - dwEffectiveId: ::DWORD, - guidCustomVersion: ::GUID, -}} -pub type LPNLSVERSIONINFOEX = *mut NLSVERSIONINFOEX; -ENUM!{enum NORM_FORM { - NormalizationOther = 0, - NormalizationC = 0x1, - NormalizationD = 0x2, - NormalizationKC = 0x5, - NormalizationKD = 0x6, -}} -pub type LANGUAGEGROUP_ENUMPROCA = Option<unsafe extern "system" fn( - ::LGRPID, ::LPSTR, ::LPSTR, ::DWORD, ::LONG_PTR, -) -> ::BOOL>; -pub type LANGGROUPLOCALE_ENUMPROCA = Option<unsafe extern "system" fn( - ::LGRPID, ::LCID, ::LPSTR, ::LONG_PTR, -) -> ::BOOL>; -pub type UILANGUAGE_ENUMPROCA = Option<unsafe extern "system" fn(::LPSTR, ::LONG_PTR) -> ::BOOL>; -pub type CODEPAGE_ENUMPROCA = Option<unsafe extern "system" fn(::LPSTR) -> ::BOOL>; -pub type DATEFMT_ENUMPROCA = Option<unsafe extern "system" fn(::LPSTR) -> ::BOOL>; -pub type DATEFMT_ENUMPROCEXA = Option<unsafe extern "system" fn(::LPSTR, ::CALID) -> ::BOOL>; -pub type TIMEFMT_ENUMPROCA = Option<unsafe extern "system" fn(::LPSTR) -> ::BOOL>; -pub type CALINFO_ENUMPROCA = Option<unsafe extern "system" fn(::LPSTR) -> ::BOOL>; -pub type CALINFO_ENUMPROCEXA = Option<unsafe extern "system" fn(::LPSTR, ::CALID) -> ::BOOL>; -pub type LOCALE_ENUMPROCA = Option<unsafe extern "system" fn(::LPSTR) -> ::BOOL>; -pub type LOCALE_ENUMPROCW = Option<unsafe extern "system" fn(::LPWSTR) -> ::BOOL>; -pub type LANGUAGEGROUP_ENUMPROCW = Option<unsafe extern "system" fn( - ::LGRPID, ::LPWSTR, ::LPWSTR, ::DWORD, ::LONG_PTR, -) -> ::BOOL>; -pub type LANGGROUPLOCALE_ENUMPROCW = Option<unsafe extern "system" fn( - ::LGRPID, ::LCID, ::LPWSTR, ::LONG_PTR, -) -> ::BOOL>; -pub type UILANGUAGE_ENUMPROCW = Option<unsafe extern "system" fn(::LPWSTR, ::LONG_PTR) -> ::BOOL>; -pub type CODEPAGE_ENUMPROCW = Option<unsafe extern "system" fn(::LPWSTR) -> ::BOOL>; -pub type DATEFMT_ENUMPROCW = Option<unsafe extern "system" fn(::LPWSTR) -> ::BOOL>; -pub type DATEFMT_ENUMPROCEXW = Option<unsafe extern "system" fn(::LPWSTR, ::CALID) -> ::BOOL>; -pub type TIMEFMT_ENUMPROCW = Option<unsafe extern "system" fn(::LPWSTR) -> ::BOOL>; -pub type CALINFO_ENUMPROCW = Option<unsafe extern "system" fn(::LPWSTR) -> ::BOOL>; -pub type CALINFO_ENUMPROCEXW = Option<unsafe extern "system" fn(::LPWSTR, ::CALID) -> ::BOOL>; -pub type GEO_ENUMPROC = Option<unsafe extern "system" fn(GEOID) -> ::BOOL>; -STRUCT!{struct CPINFO { - MaxCharSize: ::UINT, - DefaultChar: [::BYTE; MAX_DEFAULTCHAR], - LeadByte: [::BYTE; MAX_LEADBYTES], -}} -pub type LPCPINFO = *mut CPINFO; -#[repr(C)] #[derive(Copy)] -pub struct CPINFOEXA { - pub MaxCharSize: ::UINT, - pub DefaultChar: [::BYTE; MAX_DEFAULTCHAR], - pub LeadByte: [::BYTE; MAX_LEADBYTES], - pub UnicodeDefaultChar: ::WCHAR, - pub CodePage: ::UINT, - pub CodePageName: [::CHAR; ::MAX_PATH], -} -impl Clone for CPINFOEXA { fn clone(&self) -> CPINFOEXA{ *self } } -pub type LPCPINFOEXA = *mut CPINFOEXA; -#[repr(C)] #[derive(Copy)] -pub struct CPINFOEXW { - pub MaxCharSize: ::UINT, - pub DefaultChar: [::BYTE; MAX_DEFAULTCHAR], - pub LeadByte: [::BYTE; MAX_LEADBYTES], - pub UnicodeDefaultChar: ::WCHAR, - pub CodePage: ::UINT, - pub CodePageName: [::WCHAR; ::MAX_PATH], -} -impl Clone for CPINFOEXW { fn clone(&self) -> CPINFOEXW{ *self } } -pub type LPCPINFOEXW = *mut CPINFOEXW; -STRUCT!{struct NUMBERFMTA { - NumDigits: ::UINT, - LeadingZero: ::UINT, - Grouping: ::UINT, - lpDecimalSep: ::LPSTR, - lpThousandSep: ::LPSTR, - NegativeOrder: ::UINT, -}} -pub type LPNUMBERFMTA = *mut NUMBERFMTA; -STRUCT!{struct NUMBERFMTW { - NumDigits: ::UINT, - LeadingZero: ::UINT, - Grouping: ::UINT, - lpDecimalSep: ::LPWSTR, - lpThousandSep: ::LPWSTR, - NegativeOrder: ::UINT, -}} -pub type LPNUMBERFMTW = *mut NUMBERFMTW; -STRUCT!{struct CURRENCYFMTA { - NumDigits: ::UINT, - LeadingZero: ::UINT, - Grouping: ::UINT, - lpDecimalSep: ::LPSTR, - lpThousandSep: ::LPSTR, - NegativeOrder: ::UINT, - PositiveOrder: ::UINT, - lpCurrencySymbol: ::LPSTR, -}} -pub type LPCURRENCYFMTA = *mut CURRENCYFMTA; -STRUCT!{struct CURRENCYFMTW { - NumDigits: ::UINT, - LeadingZero: ::UINT, - Grouping: ::UINT, - lpDecimalSep: ::LPWSTR, - lpThousandSep: ::LPWSTR, - NegativeOrder: ::UINT, - PositiveOrder: ::UINT, - lpCurrencySymbol: ::LPWSTR, -}} -pub type LPCURRENCYFMTW = *mut CURRENCYFMTW; -pub type NLS_FUNCTION = ::DWORD; -STRUCT!{struct FILEMUIINFO { - dwSize: ::DWORD, - dwVersion: ::DWORD, - dwFileType: ::DWORD, - pChecksum: [::BYTE; 16], - pServiceChecksum: [::BYTE; 16], - dwLanguageNameOffset: ::DWORD, - dwTypeIDMainSize: ::DWORD, - dwTypeIDMainOffset: ::DWORD, - dwTypeNameMainOffset: ::DWORD, - dwTypeIDMUISize: ::DWORD, - dwTypeIDMUIOffset: ::DWORD, - dwTypeNameMUIOffset: ::DWORD, - abBuffer: [::BYTE; 8], -}} -pub type PFILEMUIINFO = *mut FILEMUIINFO; -pub type CALINFO_ENUMPROCEXEX = Option<unsafe extern "system" fn( - ::LPWSTR, ::CALID, ::LPWSTR, ::LPARAM, -) -> ::BOOL>; -pub type DATEFMT_ENUMPROCEXEX = Option<unsafe extern "system" fn( - ::LPWSTR, ::CALID, ::LPARAM, -) -> ::BOOL>; -pub type TIMEFMT_ENUMPROCEX = Option<unsafe extern "system" fn( - ::LPWSTR, ::LPARAM, -) -> ::BOOL>; -pub type LOCALE_ENUMPROCEX = Option<unsafe extern "system" fn( - ::LPWSTR, ::DWORD, ::LPARAM, -) -> ::BOOL>; diff --git a/deps/winapi-0.2.5/src/winnt.rs b/deps/winapi-0.2.5/src/winnt.rs deleted file mode 100644 index 8acf579ed..000000000 --- a/deps/winapi-0.2.5/src/winnt.rs +++ /dev/null @@ -1,2391 +0,0 @@ -// Copyright © 2015, Peter Atashian -// Licensed under the MIT License <LICENSE.md> -//! This module defines the 32-Bit Windows types and constants that are defined by NT, but exposed -//! through the Win32 API. -pub const ANYSIZE_ARRAY: usize = 1; -//341 -pub type PVOID = *mut ::c_void; -pub type PVOID64 = u64; // This is a 64-bit pointer, even when in 32-bit -//382 -pub type VOID = ::c_void; -pub type CHAR = ::c_char; -pub type SHORT = ::c_short; -pub type LONG = ::c_long; -// pub type INT = ::c_int; // Already defined by minwindef.h -pub type WCHAR = ::wchar_t; -pub type PWCHAR = *mut WCHAR; -pub type LPWCH = *mut WCHAR; -pub type PWCH = *mut WCHAR; -pub type LPCWCH = *const WCHAR; -pub type PCWCH = *const WCHAR; -pub type NWPSTR = *mut WCHAR; -pub type LPWSTR = *mut WCHAR; -pub type PWSTR = *mut WCHAR; -pub type PZPWSTR = *mut PWSTR; -pub type PCZPWSTR = *const PWSTR; -pub type LPUWSTR = *mut WCHAR; -pub type PUWSTR = *mut WCHAR; -pub type LPCWSTR = *const WCHAR; -pub type PCWSTR = *const WCHAR; -pub type PZPCWSTR= *mut PCWSTR; -pub type PCZPCWSTR = *const PCWSTR; -pub type LPCUWSTR = *const WCHAR; -pub type PCUWSTR = *const WCHAR; -pub type PZZWSTR= *mut WCHAR; -pub type PCZZWSTR = *const WCHAR; -pub type PUZZWSTR = *mut WCHAR; -pub type PCUZZWSTR = *const WCHAR; -pub type PNZWCH = *mut WCHAR; -pub type PCNZWCH = *const WCHAR; -pub type PUNZWCH = *mut WCHAR; -pub type PCUNZWCH = *const WCHAR; -pub type LPCWCHAR = *const WCHAR; -pub type PCWCHAR = *const WCHAR; -pub type LPCUWCHAR = *const WCHAR; -pub type PCUWCHAR = *const WCHAR; -pub type UCSCHAR = ::c_ulong; -pub type PUCSCHAR = *mut UCSCHAR; -pub type PCUCSCHAR = *const UCSCHAR; -pub type PUCSSTR = *mut UCSCHAR; -pub type PUUCSSTR = *mut UCSCHAR; -pub type PCUCSSTR = *const UCSCHAR; -pub type PCUUCSSTR = *const UCSCHAR; -pub type PUUCSCHAR = *mut UCSCHAR; -pub type PCUUCSCHAR = *const UCSCHAR; -pub type PCHAR = *mut CHAR; -pub type LPCH = *mut CHAR; -pub type PCH = *mut CHAR; -pub type LPCCH = *const CHAR; -pub type PCCH = *const CHAR; -pub type NPSTR = *mut CHAR; -pub type LPSTR = *mut CHAR; -pub type PSTR = *mut CHAR; -pub type PZPSTR = *mut PSTR; -pub type PCZPSTR = *const PSTR; -pub type LPCSTR = *const CHAR; -pub type PCSTR = *const CHAR; -pub type PZPCSTR = *mut PCSTR; -pub type PCZPCSTR = *const PCSTR; -pub type PZZSTR = *mut CHAR; -pub type PCZZSTR = *const CHAR; -pub type PNZCH = *mut CHAR; -pub type PCNZCH = *const CHAR; -// Skipping TCHAR things -pub type PSHORT = *mut SHORT; -pub type PLONG = *mut LONG; -STRUCT!{struct PROCESSOR_NUMBER { - Group: ::WORD, - Number: ::BYTE, - Reserved: ::BYTE, -}} -pub type PPROCESSOR_NUMBER = *mut PROCESSOR_NUMBER; -STRUCT!{struct GROUP_AFFINITY { - Mask: ::KAFFINITY, - Group: ::WORD, - Reserved: [::WORD; 3], -}} -pub type PGROUP_AFFINITY = *mut GROUP_AFFINITY; -pub type HANDLE = *mut ::c_void; -pub type PHANDLE = *mut HANDLE; -pub type FCHAR = ::BYTE; -pub type FSHORT = ::WORD; -pub type FLONG = ::DWORD; -//667 -pub type CCHAR = ::c_char; -pub type LCID = ::DWORD; -pub type PLCID = ::PDWORD; -pub type LANGID = ::WORD; -ENUM!{enum COMPARTMENT_ID { - UNSPECIFIED_COMPARTMENT_ID = 0, - DEFAULT_COMPARTMENT_ID = 1, -}} -pub type PCOMPARTMENT_ID = *mut COMPARTMENT_ID; -pub const APPLICATION_ERROR_MASK: ::DWORD = 0x20000000; -pub const ERROR_SEVERITY_SUCCESS: ::DWORD = 0x00000000; -pub const ERROR_SEVERITY_INFORMATIONAL: ::DWORD = 0x40000000; -pub const ERROR_SEVERITY_WARNING: ::DWORD = 0x80000000; -pub const ERROR_SEVERITY_ERROR: ::DWORD = 0xC0000000; -//710 -STRUCT!{struct FLOAT128 { - LowPart: ::__int64, - HighPart: ::__int64, -}} -pub type PFLOAT128 = *mut FLOAT128; -pub type LONGLONG = ::__int64; -pub type ULONGLONG = ::__uint64; -pub type PLONGLONG = *mut LONGLONG; -pub type PULONGLONG = *mut ULONGLONG; -pub type USN = LONGLONG; -pub type LARGE_INTEGER = LONGLONG; -pub type PLARGE_INTEGER = *mut LARGE_INTEGER; -pub type ULARGE_INTEGER = ULONGLONG; -pub type PULARGE_INTEGER= *mut ULARGE_INTEGER; -pub type RTL_REFERENCE_COUNT = ::LONG_PTR; -pub type PRTL_REFERENCE_COUNT = *mut ::LONG_PTR; -STRUCT!{struct LUID { - LowPart: ::DWORD, - HighPart: LONG, -}} -pub type PLUID = *mut LUID; -pub type DWORDLONG = ULONGLONG; -pub type PDWORDLONG = *mut DWORDLONG; -//1042 -pub type BOOLEAN = ::BYTE; -pub type PBOOLEAN = *mut BOOLEAN; -STRUCT!{struct LIST_ENTRY { - Flink: *mut LIST_ENTRY, - Blink: *mut LIST_ENTRY, -}} -pub type PLIST_ENTRY = *mut LIST_ENTRY; -STRUCT!{struct SINGLE_LIST_ENTRY { - Next: *mut SINGLE_LIST_ENTRY, -}} -pub type PSINGLE_LIST_ENTRY = *mut SINGLE_LIST_ENTRY; -STRUCT!{struct LIST_ENTRY32 { - Flink: ::DWORD, - Blink: ::DWORD, -}} -pub type PLIST_ENTRY32 = *mut LIST_ENTRY32; -STRUCT!{struct LIST_ENTRY64 { - Flink: ULONGLONG, - Blink: ULONGLONG, -}} -pub type PLIST_ENTRY64 = *mut LIST_ENTRY64; -STRUCT!{struct OBJECTID { - Lineage: ::GUID, - Uniquifier: ::DWORD, -}} -pub const MINCHAR: ::CHAR = 0x80u8 as ::CHAR; -pub const MAXCHAR: ::CHAR = 0x7f; -pub const MINSHORT: ::SHORT = 0x8000u16 as ::SHORT; -pub const MAXSHORT: ::SHORT = 0x7fff; -pub const MINLONG: ::LONG = 0x80000000u32 as ::LONG; -pub const MAXLONG: ::LONG = 0x7fffffff; -pub const MAXBYTE: ::BYTE = 0xff; -pub const MAXWORD: ::WORD = 0xffff; -pub const MAXDWORD: ::DWORD = 0xffffffff; -//1300 -pub type PEXCEPTION_ROUTINE = Option<unsafe extern "system" fn( - ExceptionRecord: *mut EXCEPTION_RECORD, EstablisherFrame: PVOID, ContextRecord: *mut CONTEXT, - DispatcherContext: PVOID, -) -> ::EXCEPTION_DISPOSITION>; -//1498 -pub const LANG_NEUTRAL: ::WORD = 0x00; -pub const LANG_INVARIANT: ::WORD = 0x7f; -pub const LANG_AFRIKAANS: ::WORD = 0x36; -pub const LANG_ALBANIAN: ::WORD = 0x1c; -pub const LANG_ALSATIAN: ::WORD = 0x84; -pub const LANG_AMHARIC: ::WORD = 0x5e; -pub const LANG_ARABIC: ::WORD = 0x01; -pub const LANG_ARMENIAN: ::WORD = 0x2b; -pub const LANG_ASSAMESE: ::WORD = 0x4d; -pub const LANG_AZERI: ::WORD = 0x2c; -pub const LANG_AZERBAIJANI: ::WORD = 0x2c; -pub const LANG_BANGLA: ::WORD = 0x45; -pub const LANG_BASHKIR: ::WORD = 0x6d; -pub const LANG_BASQUE: ::WORD = 0x2d; -pub const LANG_BELARUSIAN: ::WORD = 0x23; -pub const LANG_BENGALI: ::WORD = 0x45; -pub const LANG_BRETON: ::WORD = 0x7e; -pub const LANG_BOSNIAN: ::WORD = 0x1a; -pub const LANG_BOSNIAN_NEUTRAL: ::WORD = 0x781a; -pub const LANG_BULGARIAN: ::WORD = 0x02; -pub const LANG_CATALAN: ::WORD = 0x03; -pub const LANG_CENTRAL_KURDISH: ::WORD = 0x92; -pub const LANG_CHEROKEE: ::WORD = 0x5c; -pub const LANG_CHINESE: ::WORD = 0x04; -pub const LANG_CHINESE_SIMPLIFIED: ::WORD = 0x04; -pub const LANG_CHINESE_TRADITIONAL: ::WORD = 0x7c04; -pub const LANG_CORSICAN: ::WORD = 0x83; -pub const LANG_CROATIAN: ::WORD = 0x1a; -pub const LANG_CZECH: ::WORD = 0x05; -pub const LANG_DANISH: ::WORD = 0x06; -pub const LANG_DARI: ::WORD = 0x8c; -pub const LANG_DIVEHI: ::WORD = 0x65; -pub const LANG_DUTCH: ::WORD = 0x13; -pub const LANG_ENGLISH: ::WORD = 0x09; -pub const LANG_ESTONIAN: ::WORD = 0x25; -pub const LANG_FAEROESE: ::WORD = 0x38; -pub const LANG_FARSI: ::WORD = 0x29; -pub const LANG_FILIPINO: ::WORD = 0x64; -pub const LANG_FINNISH: ::WORD = 0x0b; -pub const LANG_FRENCH: ::WORD = 0x0c; -pub const LANG_FRISIAN: ::WORD = 0x62; -pub const LANG_FULAH: ::WORD = 0x67; -pub const LANG_GALICIAN: ::WORD = 0x56; -pub const LANG_GEORGIAN: ::WORD = 0x37; -pub const LANG_GERMAN: ::WORD = 0x07; -pub const LANG_GREEK: ::WORD = 0x08; -pub const LANG_GREENLANDIC: ::WORD = 0x6f; -pub const LANG_GUJARATI: ::WORD = 0x47; -pub const LANG_HAUSA: ::WORD = 0x68; -pub const LANG_HAWAIIAN: ::WORD = 0x75; -pub const LANG_HEBREW: ::WORD = 0x0d; -pub const LANG_HINDI: ::WORD = 0x39; -pub const LANG_HUNGARIAN: ::WORD = 0x0e; -pub const LANG_ICELANDIC: ::WORD = 0x0f; -pub const LANG_IGBO: ::WORD = 0x70; -pub const LANG_INDONESIAN: ::WORD = 0x21; -pub const LANG_INUKTITUT: ::WORD = 0x5d; -pub const LANG_IRISH: ::WORD = 0x3c; -pub const LANG_ITALIAN: ::WORD = 0x10; -pub const LANG_JAPANESE: ::WORD = 0x11; -pub const LANG_KANNADA: ::WORD = 0x4b; -pub const LANG_KASHMIRI: ::WORD = 0x60; -pub const LANG_KAZAK: ::WORD = 0x3f; -pub const LANG_KHMER: ::WORD = 0x53; -pub const LANG_KICHE: ::WORD = 0x86; -pub const LANG_KINYARWANDA: ::WORD = 0x87; -pub const LANG_KONKANI: ::WORD = 0x57; -pub const LANG_KOREAN: ::WORD = 0x12; -pub const LANG_KYRGYZ: ::WORD = 0x40; -pub const LANG_LAO: ::WORD = 0x54; -pub const LANG_LATVIAN: ::WORD = 0x26; -pub const LANG_LITHUANIAN: ::WORD = 0x27; -pub const LANG_LOWER_SORBIAN: ::WORD = 0x2e; -pub const LANG_LUXEMBOURGISH: ::WORD = 0x6e; -pub const LANG_MACEDONIAN: ::WORD = 0x2f; -pub const LANG_MALAY: ::WORD = 0x3e; -pub const LANG_MALAYALAM: ::WORD = 0x4c; -pub const LANG_MALTESE: ::WORD = 0x3a; -pub const LANG_MANIPURI: ::WORD = 0x58; -pub const LANG_MAORI: ::WORD = 0x81; -pub const LANG_MAPUDUNGUN: ::WORD = 0x7a; -pub const LANG_MARATHI: ::WORD = 0x4e; -pub const LANG_MOHAWK: ::WORD = 0x7c; -pub const LANG_MONGOLIAN: ::WORD = 0x50; -pub const LANG_NEPALI: ::WORD = 0x61; -pub const LANG_NORWEGIAN: ::WORD = 0x14; -pub const LANG_OCCITAN: ::WORD = 0x82; -pub const LANG_ODIA: ::WORD = 0x48; -pub const LANG_ORIYA: ::WORD = 0x48; -pub const LANG_PASHTO: ::WORD = 0x63; -pub const LANG_PERSIAN: ::WORD = 0x29; -pub const LANG_POLISH: ::WORD = 0x15; -pub const LANG_PORTUGUESE: ::WORD = 0x16; -pub const LANG_PULAR: ::WORD = 0x67; -pub const LANG_PUNJABI: ::WORD = 0x46; -pub const LANG_QUECHUA: ::WORD = 0x6b; -pub const LANG_ROMANIAN: ::WORD = 0x18; -pub const LANG_ROMANSH: ::WORD = 0x17; -pub const LANG_RUSSIAN: ::WORD = 0x19; -pub const LANG_SAKHA: ::WORD = 0x85; -pub const LANG_SAMI: ::WORD = 0x3b; -pub const LANG_SANSKRIT: ::WORD = 0x4f; -pub const LANG_SCOTTISH_GAELIC: ::WORD = 0x91; -pub const LANG_SERBIAN: ::WORD = 0x1a; -pub const LANG_SERBIAN_NEUTRAL: ::WORD = 0x7c1a; -pub const LANG_SINDHI: ::WORD = 0x59; -pub const LANG_SINHALESE: ::WORD = 0x5b; -pub const LANG_SLOVAK: ::WORD = 0x1b; -pub const LANG_SLOVENIAN: ::WORD = 0x24; -pub const LANG_SOTHO: ::WORD = 0x6c; -pub const LANG_SPANISH: ::WORD = 0x0a; -pub const LANG_SWAHILI: ::WORD = 0x41; -pub const LANG_SWEDISH: ::WORD = 0x1d; -pub const LANG_SYRIAC: ::WORD = 0x5a; -pub const LANG_TAJIK: ::WORD = 0x28; -pub const LANG_TAMAZIGHT: ::WORD = 0x5f; -pub const LANG_TAMIL: ::WORD = 0x49; -pub const LANG_TATAR: ::WORD = 0x44; -pub const LANG_TELUGU: ::WORD = 0x4a; -pub const LANG_THAI: ::WORD = 0x1e; -pub const LANG_TIBETAN: ::WORD = 0x51; -pub const LANG_TIGRIGNA: ::WORD = 0x73; -pub const LANG_TIGRINYA: ::WORD = 0x73; -pub const LANG_TSWANA: ::WORD = 0x32; -pub const LANG_TURKISH: ::WORD = 0x1f; -pub const LANG_TURKMEN: ::WORD = 0x42; -pub const LANG_UIGHUR: ::WORD = 0x80; -pub const LANG_UKRAINIAN: ::WORD = 0x22; -pub const LANG_UPPER_SORBIAN: ::WORD = 0x2e; -pub const LANG_URDU: ::WORD = 0x20; -pub const LANG_UZBEK: ::WORD = 0x43; -pub const LANG_VALENCIAN: ::WORD = 0x03; -pub const LANG_VIETNAMESE: ::WORD = 0x2a; -pub const LANG_WELSH: ::WORD = 0x52; -pub const LANG_WOLOF: ::WORD = 0x88; -pub const LANG_XHOSA: ::WORD = 0x34; -pub const LANG_YAKUT: ::WORD = 0x85; -pub const LANG_YI: ::WORD = 0x78; -pub const LANG_YORUBA: ::WORD = 0x6a; -pub const LANG_ZULU: ::WORD = 0x35; -//1651 -pub const SUBLANG_NEUTRAL: ::WORD = 0x00; -pub const SUBLANG_DEFAULT: ::WORD = 0x01; -pub const SUBLANG_SYS_DEFAULT: ::WORD = 0x02; -pub const SUBLANG_CUSTOM_DEFAULT: ::WORD = 0x03; -pub const SUBLANG_CUSTOM_UNSPECIFIED: ::WORD = 0x04; -pub const SUBLANG_UI_CUSTOM_DEFAULT: ::WORD = 0x05; -pub const SUBLANG_AFRIKAANS_SOUTH_AFRICA: ::WORD = 0x01; -pub const SUBLANG_ALBANIAN_ALBANIA: ::WORD = 0x01; -pub const SUBLANG_ALSATIAN_FRANCE: ::WORD = 0x01; -pub const SUBLANG_AMHARIC_ETHIOPIA: ::WORD = 0x01; -pub const SUBLANG_ARABIC_SAUDI_ARABIA: ::WORD = 0x01; -pub const SUBLANG_ARABIC_IRAQ: ::WORD = 0x02; -pub const SUBLANG_ARABIC_EGYPT: ::WORD = 0x03; -pub const SUBLANG_ARABIC_LIBYA: ::WORD = 0x04; -pub const SUBLANG_ARABIC_ALGERIA: ::WORD = 0x05; -pub const SUBLANG_ARABIC_MOROCCO: ::WORD = 0x06; -pub const SUBLANG_ARABIC_TUNISIA: ::WORD = 0x07; -pub const SUBLANG_ARABIC_OMAN: ::WORD = 0x08; -pub const SUBLANG_ARABIC_YEMEN: ::WORD = 0x09; -pub const SUBLANG_ARABIC_SYRIA: ::WORD = 0x0a; -pub const SUBLANG_ARABIC_JORDAN: ::WORD = 0x0b; -pub const SUBLANG_ARABIC_LEBANON: ::WORD = 0x0c; -pub const SUBLANG_ARABIC_KUWAIT: ::WORD = 0x0d; -pub const SUBLANG_ARABIC_UAE: ::WORD = 0x0e; -pub const SUBLANG_ARABIC_BAHRAIN: ::WORD = 0x0f; -pub const SUBLANG_ARABIC_QATAR: ::WORD = 0x10; -pub const SUBLANG_ARMENIAN_ARMENIA: ::WORD = 0x01; -pub const SUBLANG_ASSAMESE_INDIA: ::WORD = 0x01; -pub const SUBLANG_AZERI_LATIN: ::WORD = 0x01; -pub const SUBLANG_AZERI_CYRILLIC: ::WORD = 0x02; -pub const SUBLANG_AZERBAIJANI_AZERBAIJAN_LATIN: ::WORD = 0x01; -pub const SUBLANG_AZERBAIJANI_AZERBAIJAN_CYRILLIC: ::WORD = 0x02; -pub const SUBLANG_BANGLA_INDIA: ::WORD = 0x01; -pub const SUBLANG_BANGLA_BANGLADESH: ::WORD = 0x02; -pub const SUBLANG_BASHKIR_RUSSIA: ::WORD = 0x01; -pub const SUBLANG_BASQUE_BASQUE: ::WORD = 0x01; -pub const SUBLANG_BELARUSIAN_BELARUS: ::WORD = 0x01; -pub const SUBLANG_BENGALI_INDIA: ::WORD = 0x01; -pub const SUBLANG_BENGALI_BANGLADESH: ::WORD = 0x02; -pub const SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_LATIN: ::WORD = 0x05; -pub const SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_CYRILLIC: ::WORD = 0x08; -pub const SUBLANG_BRETON_FRANCE: ::WORD = 0x01; -pub const SUBLANG_BULGARIAN_BULGARIA: ::WORD = 0x01; -pub const SUBLANG_CATALAN_CATALAN: ::WORD = 0x01; -pub const SUBLANG_CENTRAL_KURDISH_IRAQ: ::WORD = 0x01; -pub const SUBLANG_CHEROKEE_CHEROKEE: ::WORD = 0x01; -pub const SUBLANG_CHINESE_TRADITIONAL: ::WORD = 0x01; -pub const SUBLANG_CHINESE_SIMPLIFIED: ::WORD = 0x02; -pub const SUBLANG_CHINESE_HONGKONG: ::WORD = 0x03; -pub const SUBLANG_CHINESE_SINGAPORE: ::WORD = 0x04; -pub const SUBLANG_CHINESE_MACAU: ::WORD = 0x05; -pub const SUBLANG_CORSICAN_FRANCE: ::WORD = 0x01; -pub const SUBLANG_CZECH_CZECH_REPUBLIC: ::WORD = 0x01; -pub const SUBLANG_CROATIAN_CROATIA: ::WORD = 0x01; -pub const SUBLANG_CROATIAN_BOSNIA_HERZEGOVINA_LATIN: ::WORD = 0x04; -pub const SUBLANG_DANISH_DENMARK: ::WORD = 0x01; -pub const SUBLANG_DARI_AFGHANISTAN: ::WORD = 0x01; -pub const SUBLANG_DIVEHI_MALDIVES: ::WORD = 0x01; -pub const SUBLANG_DUTCH: ::WORD = 0x01; -pub const SUBLANG_DUTCH_BELGIAN: ::WORD = 0x02; -pub const SUBLANG_ENGLISH_US: ::WORD = 0x01; -pub const SUBLANG_ENGLISH_UK: ::WORD = 0x02; -pub const SUBLANG_ENGLISH_AUS: ::WORD = 0x03; -pub const SUBLANG_ENGLISH_CAN: ::WORD = 0x04; -pub const SUBLANG_ENGLISH_NZ: ::WORD = 0x05; -pub const SUBLANG_ENGLISH_EIRE: ::WORD = 0x06; -pub const SUBLANG_ENGLISH_SOUTH_AFRICA: ::WORD = 0x07; -pub const SUBLANG_ENGLISH_JAMAICA: ::WORD = 0x08; -pub const SUBLANG_ENGLISH_CARIBBEAN: ::WORD = 0x09; -pub const SUBLANG_ENGLISH_BELIZE: ::WORD = 0x0a; -pub const SUBLANG_ENGLISH_TRINIDAD: ::WORD = 0x0b; -pub const SUBLANG_ENGLISH_ZIMBABWE: ::WORD = 0x0c; -pub const SUBLANG_ENGLISH_PHILIPPINES: ::WORD = 0x0d; -pub const SUBLANG_ENGLISH_INDIA: ::WORD = 0x10; -pub const SUBLANG_ENGLISH_MALAYSIA: ::WORD = 0x11; -pub const SUBLANG_ENGLISH_SINGAPORE: ::WORD = 0x12; -pub const SUBLANG_ESTONIAN_ESTONIA: ::WORD = 0x01; -pub const SUBLANG_FAEROESE_FAROE_ISLANDS: ::WORD = 0x01; -pub const SUBLANG_FILIPINO_PHILIPPINES: ::WORD = 0x01; -pub const SUBLANG_FINNISH_FINLAND: ::WORD = 0x01; -pub const SUBLANG_FRENCH: ::WORD = 0x01; -pub const SUBLANG_FRENCH_BELGIAN: ::WORD = 0x02; -pub const SUBLANG_FRENCH_CANADIAN: ::WORD = 0x03; -pub const SUBLANG_FRENCH_SWISS: ::WORD = 0x04; -pub const SUBLANG_FRENCH_LUXEMBOURG: ::WORD = 0x05; -pub const SUBLANG_FRENCH_MONACO: ::WORD = 0x06; -pub const SUBLANG_FRISIAN_NETHERLANDS: ::WORD = 0x01; -pub const SUBLANG_FULAH_SENEGAL: ::WORD = 0x02; -pub const SUBLANG_GALICIAN_GALICIAN: ::WORD = 0x01; -pub const SUBLANG_GEORGIAN_GEORGIA: ::WORD = 0x01; -pub const SUBLANG_GERMAN: ::WORD = 0x01; -pub const SUBLANG_GERMAN_SWISS: ::WORD = 0x02; -pub const SUBLANG_GERMAN_AUSTRIAN: ::WORD = 0x03; -pub const SUBLANG_GERMAN_LUXEMBOURG: ::WORD = 0x04; -pub const SUBLANG_GERMAN_LIECHTENSTEIN: ::WORD = 0x05; -pub const SUBLANG_GREEK_GREECE: ::WORD = 0x01; -pub const SUBLANG_GREENLANDIC_GREENLAND: ::WORD = 0x01; -pub const SUBLANG_GUJARATI_INDIA: ::WORD = 0x01; -pub const SUBLANG_HAUSA_NIGERIA_LATIN: ::WORD = 0x01; -pub const SUBLANG_HAWAIIAN_US: ::WORD = 0x01; -pub const SUBLANG_HEBREW_ISRAEL: ::WORD = 0x01; -pub const SUBLANG_HINDI_INDIA: ::WORD = 0x01; -pub const SUBLANG_HUNGARIAN_HUNGARY: ::WORD = 0x01; -pub const SUBLANG_ICELANDIC_ICELAND: ::WORD = 0x01; -pub const SUBLANG_IGBO_NIGERIA: ::WORD = 0x01; -pub const SUBLANG_INDONESIAN_INDONESIA: ::WORD = 0x01; -pub const SUBLANG_INUKTITUT_CANADA: ::WORD = 0x01; -pub const SUBLANG_INUKTITUT_CANADA_LATIN: ::WORD = 0x02; -pub const SUBLANG_IRISH_IRELAND: ::WORD = 0x02; -pub const SUBLANG_ITALIAN: ::WORD = 0x01; -pub const SUBLANG_ITALIAN_SWISS: ::WORD = 0x02; -pub const SUBLANG_JAPANESE_JAPAN: ::WORD = 0x01; -pub const SUBLANG_KANNADA_INDIA: ::WORD = 0x01; -pub const SUBLANG_KASHMIRI_SASIA: ::WORD = 0x02; -pub const SUBLANG_KASHMIRI_INDIA: ::WORD = 0x02; -pub const SUBLANG_KAZAK_KAZAKHSTAN: ::WORD = 0x01; -pub const SUBLANG_KHMER_CAMBODIA: ::WORD = 0x01; -pub const SUBLANG_KICHE_GUATEMALA: ::WORD = 0x01; -pub const SUBLANG_KINYARWANDA_RWANDA: ::WORD = 0x01; -pub const SUBLANG_KONKANI_INDIA: ::WORD = 0x01; -pub const SUBLANG_KOREAN: ::WORD = 0x01; -pub const SUBLANG_KYRGYZ_KYRGYZSTAN: ::WORD = 0x01; -pub const SUBLANG_LAO_LAO: ::WORD = 0x01; -pub const SUBLANG_LATVIAN_LATVIA: ::WORD = 0x01; -pub const SUBLANG_LITHUANIAN: ::WORD = 0x01; -pub const SUBLANG_LOWER_SORBIAN_GERMANY: ::WORD = 0x02; -pub const SUBLANG_LUXEMBOURGISH_LUXEMBOURG: ::WORD = 0x01; -pub const SUBLANG_MACEDONIAN_MACEDONIA: ::WORD = 0x01; -pub const SUBLANG_MALAY_MALAYSIA: ::WORD = 0x01; -pub const SUBLANG_MALAY_BRUNEI_DARUSSALAM: ::WORD = 0x02; -pub const SUBLANG_MALAYALAM_INDIA: ::WORD = 0x01; -pub const SUBLANG_MALTESE_MALTA: ::WORD = 0x01; -pub const SUBLANG_MAORI_NEW_ZEALAND: ::WORD = 0x01; -pub const SUBLANG_MAPUDUNGUN_CHILE: ::WORD = 0x01; -pub const SUBLANG_MARATHI_INDIA: ::WORD = 0x01; -pub const SUBLANG_MOHAWK_MOHAWK: ::WORD = 0x01; -pub const SUBLANG_MONGOLIAN_CYRILLIC_MONGOLIA: ::WORD = 0x01; -pub const SUBLANG_MONGOLIAN_PRC: ::WORD = 0x02; -pub const SUBLANG_NEPALI_INDIA: ::WORD = 0x02; -pub const SUBLANG_NEPALI_NEPAL: ::WORD = 0x01; -pub const SUBLANG_NORWEGIAN_BOKMAL: ::WORD = 0x01; -pub const SUBLANG_NORWEGIAN_NYNORSK: ::WORD = 0x02; -pub const SUBLANG_OCCITAN_FRANCE: ::WORD = 0x01; -pub const SUBLANG_ODIA_INDIA: ::WORD = 0x01; -pub const SUBLANG_ORIYA_INDIA: ::WORD = 0x01; -pub const SUBLANG_PASHTO_AFGHANISTAN: ::WORD = 0x01; -pub const SUBLANG_PERSIAN_IRAN: ::WORD = 0x01; -pub const SUBLANG_POLISH_POLAND: ::WORD = 0x01; -pub const SUBLANG_PORTUGUESE: ::WORD = 0x02; -pub const SUBLANG_PORTUGUESE_BRAZILIAN: ::WORD = 0x01; -pub const SUBLANG_PULAR_SENEGAL: ::WORD = 0x02; -pub const SUBLANG_PUNJABI_INDIA: ::WORD = 0x01; -pub const SUBLANG_PUNJABI_PAKISTAN: ::WORD = 0x02; -pub const SUBLANG_QUECHUA_BOLIVIA: ::WORD = 0x01; -pub const SUBLANG_QUECHUA_ECUADOR: ::WORD = 0x02; -pub const SUBLANG_QUECHUA_PERU: ::WORD = 0x03; -pub const SUBLANG_ROMANIAN_ROMANIA: ::WORD = 0x01; -pub const SUBLANG_ROMANSH_SWITZERLAND: ::WORD = 0x01; -pub const SUBLANG_RUSSIAN_RUSSIA: ::WORD = 0x01; -pub const SUBLANG_SAKHA_RUSSIA: ::WORD = 0x01; -pub const SUBLANG_SAMI_NORTHERN_NORWAY: ::WORD = 0x01; -pub const SUBLANG_SAMI_NORTHERN_SWEDEN: ::WORD = 0x02; -pub const SUBLANG_SAMI_NORTHERN_FINLAND: ::WORD = 0x03; -pub const SUBLANG_SAMI_LULE_NORWAY: ::WORD = 0x04; -pub const SUBLANG_SAMI_LULE_SWEDEN: ::WORD = 0x05; -pub const SUBLANG_SAMI_SOUTHERN_NORWAY: ::WORD = 0x06; -pub const SUBLANG_SAMI_SOUTHERN_SWEDEN: ::WORD = 0x07; -pub const SUBLANG_SAMI_SKOLT_FINLAND: ::WORD = 0x08; -pub const SUBLANG_SAMI_INARI_FINLAND: ::WORD = 0x09; -pub const SUBLANG_SANSKRIT_INDIA: ::WORD = 0x01; -pub const SUBLANG_SCOTTISH_GAELIC: ::WORD = 0x01; -pub const SUBLANG_SERBIAN_BOSNIA_HERZEGOVINA_LATIN: ::WORD = 0x06; -pub const SUBLANG_SERBIAN_BOSNIA_HERZEGOVINA_CYRILLIC: ::WORD = 0x07; -pub const SUBLANG_SERBIAN_MONTENEGRO_LATIN: ::WORD = 0x0b; -pub const SUBLANG_SERBIAN_MONTENEGRO_CYRILLIC: ::WORD = 0x0c; -pub const SUBLANG_SERBIAN_SERBIA_LATIN: ::WORD = 0x09; -pub const SUBLANG_SERBIAN_SERBIA_CYRILLIC: ::WORD = 0x0a; -pub const SUBLANG_SERBIAN_CROATIA: ::WORD = 0x01; -pub const SUBLANG_SERBIAN_LATIN: ::WORD = 0x02; -pub const SUBLANG_SERBIAN_CYRILLIC: ::WORD = 0x03; -pub const SUBLANG_SINDHI_INDIA: ::WORD = 0x01; -pub const SUBLANG_SINDHI_PAKISTAN: ::WORD = 0x02; -pub const SUBLANG_SINDHI_AFGHANISTAN: ::WORD = 0x02; -pub const SUBLANG_SINHALESE_SRI_LANKA: ::WORD = 0x01; -pub const SUBLANG_SOTHO_NORTHERN_SOUTH_AFRICA: ::WORD = 0x01; -pub const SUBLANG_SLOVAK_SLOVAKIA: ::WORD = 0x01; -pub const SUBLANG_SLOVENIAN_SLOVENIA: ::WORD = 0x01; -pub const SUBLANG_SPANISH: ::WORD = 0x01; -pub const SUBLANG_SPANISH_MEXICAN: ::WORD = 0x02; -pub const SUBLANG_SPANISH_MODERN: ::WORD = 0x03; -pub const SUBLANG_SPANISH_GUATEMALA: ::WORD = 0x04; -pub const SUBLANG_SPANISH_COSTA_RICA: ::WORD = 0x05; -pub const SUBLANG_SPANISH_PANAMA: ::WORD = 0x06; -pub const SUBLANG_SPANISH_DOMINICAN_REPUBLIC: ::WORD = 0x07; -pub const SUBLANG_SPANISH_VENEZUELA: ::WORD = 0x08; -pub const SUBLANG_SPANISH_COLOMBIA: ::WORD = 0x09; -pub const SUBLANG_SPANISH_PERU: ::WORD = 0x0a; -pub const SUBLANG_SPANISH_ARGENTINA: ::WORD = 0x0b; -pub const SUBLANG_SPANISH_ECUADOR: ::WORD = 0x0c; -pub const SUBLANG_SPANISH_CHILE: ::WORD = 0x0d; -pub const SUBLANG_SPANISH_URUGUAY: ::WORD = 0x0e; -pub const SUBLANG_SPANISH_PARAGUAY: ::WORD = 0x0f; -pub const SUBLANG_SPANISH_BOLIVIA: ::WORD = 0x10; -pub const SUBLANG_SPANISH_EL_SALVADOR: ::WORD = 0x11; -pub const SUBLANG_SPANISH_HONDURAS: ::WORD = 0x12; -pub const SUBLANG_SPANISH_NICARAGUA: ::WORD = 0x13; -pub const SUBLANG_SPANISH_PUERTO_RICO: ::WORD = 0x14; -pub const SUBLANG_SPANISH_US: ::WORD = 0x15; -pub const SUBLANG_SWAHILI_KENYA: ::WORD = 0x01; -pub const SUBLANG_SWEDISH: ::WORD = 0x01; -pub const SUBLANG_SWEDISH_FINLAND: ::WORD = 0x02; -pub const SUBLANG_SYRIAC_SYRIA: ::WORD = 0x01; -pub const SUBLANG_TAJIK_TAJIKISTAN: ::WORD = 0x01; -pub const SUBLANG_TAMAZIGHT_ALGERIA_LATIN: ::WORD = 0x02; -pub const SUBLANG_TAMAZIGHT_MOROCCO_TIFINAGH: ::WORD = 0x04; -pub const SUBLANG_TAMIL_INDIA: ::WORD = 0x01; -pub const SUBLANG_TAMIL_SRI_LANKA: ::WORD = 0x02; -pub const SUBLANG_TATAR_RUSSIA: ::WORD = 0x01; -pub const SUBLANG_TELUGU_INDIA: ::WORD = 0x01; -pub const SUBLANG_THAI_THAILAND: ::WORD = 0x01; -pub const SUBLANG_TIBETAN_PRC: ::WORD = 0x01; -pub const SUBLANG_TIGRIGNA_ERITREA: ::WORD = 0x02; -pub const SUBLANG_TIGRINYA_ERITREA: ::WORD = 0x02; -pub const SUBLANG_TIGRINYA_ETHIOPIA: ::WORD = 0x01; -pub const SUBLANG_TSWANA_BOTSWANA: ::WORD = 0x02; -pub const SUBLANG_TSWANA_SOUTH_AFRICA: ::WORD = 0x01; -pub const SUBLANG_TURKISH_TURKEY: ::WORD = 0x01; -pub const SUBLANG_TURKMEN_TURKMENISTAN: ::WORD = 0x01; -pub const SUBLANG_UIGHUR_PRC: ::WORD = 0x01; -pub const SUBLANG_UKRAINIAN_UKRAINE: ::WORD = 0x01; -pub const SUBLANG_UPPER_SORBIAN_GERMANY: ::WORD = 0x01; -pub const SUBLANG_URDU_PAKISTAN: ::WORD = 0x01; -pub const SUBLANG_URDU_INDIA: ::WORD = 0x02; -pub const SUBLANG_UZBEK_LATIN: ::WORD = 0x01; -pub const SUBLANG_UZBEK_CYRILLIC: ::WORD = 0x02; -pub const SUBLANG_VALENCIAN_VALENCIA: ::WORD = 0x02; -pub const SUBLANG_VIETNAMESE_VIETNAM: ::WORD = 0x01; -pub const SUBLANG_WELSH_UNITED_KINGDOM: ::WORD = 0x01; -pub const SUBLANG_WOLOF_SENEGAL: ::WORD = 0x01; -pub const SUBLANG_XHOSA_SOUTH_AFRICA: ::WORD = 0x01; -pub const SUBLANG_YAKUT_RUSSIA: ::WORD = 0x01; -pub const SUBLANG_YI_PRC: ::WORD = 0x01; -pub const SUBLANG_YORUBA_NIGERIA: ::WORD = 0x01; -pub const SUBLANG_ZULU_SOUTH_AFRICA: ::WORD = 0x01; -//1962 -// FIXME: Once feature(const_fn) or some CTFE alternative becomes stable, MAKELANGID! can go -// unless we want to #[macro_export] it ... -macro_rules! MAKELANGID { ($p:expr, $s:expr) => ($s << 10 | $p) } -pub fn MAKELANGID(p: ::WORD, s: ::WORD) -> ::LANGID { MAKELANGID!(p, s) } -pub fn PRIMARYLANGID(lgid: ::LANGID) -> ::WORD { lgid & 0x3ff } -pub fn SUBLANGID(lgid: ::LANGID) -> ::WORD { lgid >> 10 } -//2019 -pub const LANG_SYSTEM_DEFAULT: LANGID = MAKELANGID!(LANG_NEUTRAL, SUBLANG_SYS_DEFAULT); -pub const LANG_USER_DEFAULT: LANGID = MAKELANGID!(LANG_NEUTRAL, SUBLANG_DEFAULT); -//2214 -pub const MAXIMUM_WAIT_OBJECTS: ::DWORD = 64; -pub const MAXIMUM_SUSPEND_COUNT: ::CHAR = MAXCHAR; -//2277 -pub type KSPIN_LOCK = ::ULONG_PTR; -pub type PKSPIN_LOCK = *mut KSPIN_LOCK; -STRUCT!{struct M128A { // FIXME align 16 - Low: ULONGLONG, - High: LONGLONG, -}} -pub type PM128A = *mut M128A; -#[cfg(target_arch = "x86")] #[repr(C)] #[derive(Copy)] -pub struct XSAVE_FORMAT { // FIXME align 16 - pub ControlWord: ::WORD, - pub StatusWord: ::WORD, - pub TagWord: ::BYTE, - pub Reserved1: ::BYTE, - pub ErrorOpcode: ::WORD, - pub ErrorOffset: ::DWORD, - pub ErrorSelector: ::WORD, - pub Reserved2: ::WORD, - pub DataOffset: ::DWORD, - pub DataSelector: ::WORD, - pub Reserved3: ::WORD, - pub MxCsr: ::DWORD, - pub MxCsr_Mask: ::DWORD, - pub FloatRegisters: [M128A; 8], - pub XmmRegisters: [M128A; 8], - pub Reserved4: [::BYTE; 224], -} -#[cfg(target_arch = "x86_64")] #[repr(C)] #[derive(Copy)] -pub struct XSAVE_FORMAT { // FIXME align 16 - pub ControlWord: ::WORD, - pub StatusWord: ::WORD, - pub TagWord: ::BYTE, - pub Reserved1: ::BYTE, - pub ErrorOpcode: ::WORD, - pub ErrorOffset: ::DWORD, - pub ErrorSelector: ::WORD, - pub Reserved2: ::WORD, - pub DataOffset: ::DWORD, - pub DataSelector: ::WORD, - pub Reserved3: ::WORD, - pub MxCsr: ::DWORD, - pub MxCsr_Mask: ::DWORD, - pub FloatRegisters: [M128A; 8], - pub XmmRegisters: [M128A; 16], - pub Reserved4: [::BYTE; 96], -} -impl Clone for XSAVE_FORMAT { fn clone(&self) -> XSAVE_FORMAT { *self } } -//3563 -#[cfg(target_arch = "x86")] -pub const SIZE_OF_80387_REGISTERS: usize = 80; -#[cfg(target_arch = "x86")] #[repr(C)] #[derive(Copy)] -pub struct FLOATING_SAVE_AREA { - pub ControlWord: ::DWORD, - pub StatusWord: ::DWORD, - pub TagWord: ::DWORD, - pub ErrorOffset: ::DWORD, - pub ErrorSelector: ::DWORD, - pub DataOffset: ::DWORD, - pub DataSelector: ::DWORD, - pub RegisterArea: [::BYTE; SIZE_OF_80387_REGISTERS], - pub Spare0: ::DWORD, -} -#[cfg(target_arch = "x86")] -impl Clone for FLOATING_SAVE_AREA { fn clone(&self) -> FLOATING_SAVE_AREA { *self } } -#[cfg(target_arch = "x86")] -pub type PFLOATING_SAVE_AREA = *mut FLOATING_SAVE_AREA; -#[cfg(target_arch = "x86")] -pub const MAXIMUM_SUPPORTED_EXTENSION: usize = 512; -#[cfg(target_arch = "x86")] #[repr(C)] #[derive(Copy)] -pub struct CONTEXT { - pub ContextFlags: ::DWORD, - pub Dr0: ::DWORD, - pub Dr1: ::DWORD, - pub Dr2: ::DWORD, - pub Dr3: ::DWORD, - pub Dr6: ::DWORD, - pub Dr7: ::DWORD, - pub FloatSave: FLOATING_SAVE_AREA, - pub SegGs: ::DWORD, - pub SegFs: ::DWORD, - pub SegEs: ::DWORD, - pub SegDs: ::DWORD, - pub Edi: ::DWORD, - pub Esi: ::DWORD, - pub Ebx: ::DWORD, - pub Edx: ::DWORD, - pub Ecx: ::DWORD, - pub Eax: ::DWORD, - pub Ebp: ::DWORD, - pub Eip: ::DWORD, - pub SegCs: ::DWORD, - pub EFlags: ::DWORD, - pub Esp: ::DWORD, - pub SegSs: ::DWORD, - pub ExtendedRegisters: [::BYTE; MAXIMUM_SUPPORTED_EXTENSION], -} -#[cfg(target_arch = "x86")] -impl Clone for CONTEXT { fn clone(&self) -> CONTEXT { *self } } -#[cfg(target_arch = "x86_64")] -pub type XMM_SAVE_AREA32 = XSAVE_FORMAT; -pub type PXMM_SAVE_AREA32 = *mut XSAVE_FORMAT; -// FIXME - Align 16 -#[cfg(target_arch = "x86_64")] #[repr(C)] #[derive(Clone, Copy)] -pub struct CONTEXT { - pub P1Home: ::DWORD64, - pub P2Home: ::DWORD64, - pub P3Home: ::DWORD64, - pub P4Home: ::DWORD64, - pub P5Home: ::DWORD64, - pub P6Home: ::DWORD64, - pub ContextFlags: ::DWORD, - pub MxCsr: ::DWORD, - pub SegCs: ::WORD, - pub SegDs: ::WORD, - pub SegEs: ::WORD, - pub SegFs: ::WORD, - pub SegGs: ::WORD, - pub SegSs: ::WORD, - pub EFlags: ::DWORD, - pub Dr0: ::DWORD64, - pub Dr1: ::DWORD64, - pub Dr2: ::DWORD64, - pub Dr3: ::DWORD64, - pub Dr6: ::DWORD64, - pub Dr7: ::DWORD64, - pub Rax: ::DWORD64, - pub Rcx: ::DWORD64, - pub Rdx: ::DWORD64, - pub Rbx: ::DWORD64, - pub Rsp: ::DWORD64, - pub Rbp: ::DWORD64, - pub Rsi: ::DWORD64, - pub Rdi: ::DWORD64, - pub R8: ::DWORD64, - pub R9: ::DWORD64, - pub R10: ::DWORD64, - pub R11: ::DWORD64, - pub R12: ::DWORD64, - pub R13: ::DWORD64, - pub R14: ::DWORD64, - pub R15: ::DWORD64, - pub Rip: ::DWORD64, - pub FltSave: XMM_SAVE_AREA32, - pub VectorRegister: [::M128A; 26], - pub VectorControl: ::DWORD64, - pub DebugControl: ::DWORD64, - pub LastBranchToRip: ::DWORD64, - pub LastBranchFromRip: ::DWORD64, - pub LastExceptionToRip: ::DWORD64, - pub LastExceptionFromRip: ::DWORD64, -} -pub type PCONTEXT = *mut CONTEXT; -#[test] -fn test_CONTEXT_size() { - use std::mem::size_of; - if cfg!(target_arch = "x86_64") { - assert_eq!(size_of::<CONTEXT>(), 1232) - } else if cfg!(target_arch = "x86") { - assert_eq!(size_of::<CONTEXT>(), 716) - } -} -pub type RUNTIME_FUNCTION = IMAGE_RUNTIME_FUNCTION_ENTRY; -pub type PRUNTIME_FUNCTION = *mut RUNTIME_FUNCTION; -pub const UNWIND_HISTORY_TABLE_SIZE: usize = 12; -STRUCT!{struct UNWIND_HISTORY_TABLE_ENTRY { - ImageBase: ::DWORD64, - FunctionEntry: PRUNTIME_FUNCTION, -}} -pub type PUNWIND_HISTORY_TABLE_ENTRY = *mut UNWIND_HISTORY_TABLE_ENTRY; -STRUCT!{struct UNWIND_HISTORY_TABLE { - Count: ::DWORD, - LocalHint: ::BYTE, - GlobalHint: ::BYTE, - Search: ::BYTE, - Once: ::BYTE, - LowAddress: ::DWORD64, - HighAddress: ::DWORD64, - Entry: [UNWIND_HISTORY_TABLE_ENTRY; UNWIND_HISTORY_TABLE_SIZE], -}} -pub type PUNWIND_HISTORY_TABLE = *mut UNWIND_HISTORY_TABLE; -pub type PGET_RUNTIME_FUNCTION_CALLBACK = Option<unsafe extern "system" fn( - ControlPc: ::DWORD64, Context: ::PVOID, -) -> PRUNTIME_FUNCTION>; -STRUCT!{struct KNONVOLATILE_CONTEXT_POINTERS_u1 { - Xmm0: PM128A, - Xmm1: PM128A, - Xmm2: PM128A, - Xmm3: PM128A, - Xmm4: PM128A, - Xmm5: PM128A, - Xmm6: PM128A, - Xmm7: PM128A, - Xmm8: PM128A, - Xmm9: PM128A, - Xmm10: PM128A, - Xmm11: PM128A, - Xmm12: PM128A, - Xmm14: PM128A, - Xmm15: PM128A, -}} -STRUCT!{struct KNONVOLATILE_CONTEXT_POINTERS_u2 { - Rax: ::DWORD64, - Rcx: ::DWORD64, - Rdx: ::DWORD64, - Rbx: ::DWORD64, - Rsp: ::DWORD64, - Rbp: ::DWORD64, - Rsi: ::DWORD64, - Rdi: ::DWORD64, - R8: ::DWORD64, - R9: ::DWORD64, - R10: ::DWORD64, - R11: ::DWORD64, - R12: ::DWORD64, - R13: ::DWORD64, - R14: ::DWORD64, - R15: ::DWORD64, -}} -STRUCT!{struct KNONVOLATILE_CONTEXT_POINTERS { - FloatingContext: [PM128A; 16], - IntegerContext: [::PDWORD64; 16], -}} -// FIXME: all unions are untagged -UNION!( - KNONVOLATILE_CONTEXT_POINTERS, FloatingContext, Xmms, Xmms_mut, - KNONVOLATILE_CONTEXT_POINTERS_u1 -); -UNION!( - KNONVOLATILE_CONTEXT_POINTERS, IntegerContext, Regs, Regs_mut, - KNONVOLATILE_CONTEXT_POINTERS_u2 -); -pub type PKNONVOLATILE_CONTEXT_POINTERS = *mut KNONVOLATILE_CONTEXT_POINTERS; -//8983 -pub const EXCEPTION_MAXIMUM_PARAMETERS: usize = 15; -STRUCT!{struct EXCEPTION_RECORD { - ExceptionCode: ::DWORD, - ExceptionFlags: ::DWORD, - ExceptionRecord: *mut EXCEPTION_RECORD, - ExceptionAddress: ::PVOID, - NumberParameters: ::DWORD, - ExceptionInformation: [::ULONG_PTR; EXCEPTION_MAXIMUM_PARAMETERS], -}} -pub type PEXCEPTION_RECORD = *mut EXCEPTION_RECORD; -//9023 -STRUCT!{struct EXCEPTION_POINTERS { - ExceptionRecord: PEXCEPTION_RECORD, - ContextRecord: PCONTEXT, -}} -pub type PEXCEPTION_POINTERS = *mut EXCEPTION_POINTERS; -pub type PACCESS_TOKEN = ::PVOID; -pub type PSECURITY_DESCRIPTOR = ::PVOID; -pub type PSID = ::PVOID; -pub type PCLAIMS_BLOB = ::PVOID; -//9091 -pub type ACCESS_MASK = ::DWORD; -pub type PACCESS_MASK = *mut ACCESS_MASK; -pub const DELETE: ::DWORD = 0x00010000; -pub const READ_CONTROL: ::DWORD = 0x00020000; -pub const WRITE_DAC: ::DWORD = 0x00040000; -pub const WRITE_OWNER: ::DWORD = 0x00080000; -pub const SYNCHRONIZE: ::DWORD = 0x00100000; -pub const STANDARD_RIGHTS_REQUIRED: ::DWORD = 0x000F0000; -pub const STANDARD_RIGHTS_READ: ::DWORD = READ_CONTROL; -pub const STANDARD_RIGHTS_WRITE: ::DWORD = READ_CONTROL; -pub const STANDARD_RIGHTS_EXECUTE: ::DWORD = READ_CONTROL; -pub const STANDARD_RIGHTS_ALL: ::DWORD = 0x001F0000; -pub const SPECIFIC_RIGHTS_ALL: ::DWORD = 0x0000FFFF; -pub const ACCESS_SYSTEM_SECURITY: ::DWORD = 0x01000000; -pub const MAXIMUM_ALLOWED: ::DWORD = 0x02000000; -pub const GENERIC_READ: ::DWORD = 0x80000000; -pub const GENERIC_WRITE: ::DWORD = 0x40000000; -pub const GENERIC_EXECUTE: ::DWORD = 0x20000000; -pub const GENERIC_ALL: ::DWORD = 0x10000000; -//9170 -STRUCT!{struct LUID_AND_ATTRIBUTES { - Luid: LUID, - Attributes: ::DWORD, -}} -pub type PLUID_AND_ATTRIBUTES = *mut LUID_AND_ATTRIBUTES; -//9243 -ENUM!{enum SID_NAME_USE { - SidTypeUser = 1, - SidTypeGroup, - SidTypeDomain, - SidTypeAlias, - SidTypeWellKnownGroup, - SidTypeDeletedAccount, - SidTypeInvalid, - SidTypeUnknown, - SidTypeComputer, - SidTypeLabel, -}} -pub type PSID_NAME_USE = *mut SID_NAME_USE; -STRUCT!{struct SID_AND_ATTRIBUTES { - Sid: PSID, - Attributes: ::DWORD, -}} -pub type PSID_AND_ATTRIBUTES = *mut SID_AND_ATTRIBUTES; -//9802 -pub const ACL_REVISION: ::BYTE = 2; -pub const ACL_REVISION_DS: ::BYTE = 4; -pub const ACL_REVISION1: ::BYTE = 1; -pub const MIN_ACL_REVISION: ::BYTE = ACL_REVISION2; -pub const ACL_REVISION2: ::BYTE = 2; -pub const ACL_REVISION3: ::BYTE = 3; -pub const ACL_REVISION4: ::BYTE = 4; -pub const MAX_ACL_REVISION: ::BYTE = ACL_REVISION4; -STRUCT!{struct ACL { - AclRevision: ::BYTE, - Sbz1: ::BYTE, - AclSize: ::WORD, - AceCount: ::WORD, - Sbz2: ::WORD, -}} -pub type PACL = *mut ACL; -//9888 -pub const SE_PRIVILEGE_ENABLED_BY_DEFAULT: ::DWORD = 0x00000001; -pub const SE_PRIVILEGE_ENABLED: ::DWORD = 0x00000002; -pub const SE_PRIVILEGE_REMOVED: ::DWORD = 0x00000004; -pub const SE_PRIVILEGE_USED_FOR_ACCESS: ::DWORD = 0x80000000; -pub const SE_PRIVILEGE_VALID_ATTRIBUTES: ::DWORD = SE_PRIVILEGE_ENABLED_BY_DEFAULT | SE_PRIVILEGE_ENABLED | SE_PRIVILEGE_REMOVED | SE_PRIVILEGE_USED_FOR_ACCESS; -pub const PRIVILEGE_SET_ALL_NECESSARY: ::DWORD = 1; -//10689 -pub const TOKEN_ASSIGN_PRIMARY: ::DWORD = 0x0001; -pub const TOKEN_DUPLICATE: ::DWORD = 0x0002; -pub const TOKEN_IMPERSONATE: ::DWORD = 0x0004; -pub const TOKEN_QUERY: ::DWORD = 0x0008; -pub const TOKEN_QUERY_SOURCE: ::DWORD = 0x0010; -pub const TOKEN_ADJUST_PRIVILEGES: ::DWORD = 0x0020; -pub const TOKEN_ADJUST_GROUPS: ::DWORD = 0x0040; -pub const TOKEN_ADJUST_DEFAULT: ::DWORD = 0x0080; -pub const TOKEN_ADJUST_SESSIONID: ::DWORD = 0x0100; -pub const TOKEN_ALL_ACCESS_P: ::DWORD = STANDARD_RIGHTS_REQUIRED | TOKEN_ASSIGN_PRIMARY - | TOKEN_DUPLICATE | TOKEN_IMPERSONATE | TOKEN_QUERY | TOKEN_QUERY_SOURCE - | TOKEN_ADJUST_PRIVILEGES | TOKEN_ADJUST_GROUPS | TOKEN_ADJUST_DEFAULT; -pub const TOKEN_ALL_ACCESS: ::DWORD = TOKEN_ALL_ACCESS_P | TOKEN_ADJUST_SESSIONID; -pub const TOKEN_READ: ::DWORD = STANDARD_RIGHTS_READ | TOKEN_QUERY; -pub const TOKEN_WRITE: ::DWORD = STANDARD_RIGHTS_WRITE | TOKEN_ADJUST_PRIVILEGES - | TOKEN_ADJUST_GROUPS | TOKEN_ADJUST_DEFAULT; -pub const TOKEN_EXECUTE: ::DWORD = STANDARD_RIGHTS_EXECUTE; -//10823 -#[repr(C)] #[derive(Debug)] #[allow(missing_copy_implementations)] -pub struct TOKEN_PRIVILEGES { - pub PrivilegeCount: ::DWORD, - pub Privileges: [LUID_AND_ATTRIBUTES; 0], -} -pub type PTOKEN_PRIVILEGES = *mut TOKEN_PRIVILEGES; -//10965 -pub const CLAIM_SECURITY_ATTRIBUTE_TYPE_INVALID: ::WORD = 0x00; -pub const CLAIM_SECURITY_ATTRIBUTE_TYPE_INT64: ::WORD = 0x01; -pub const CLAIM_SECURITY_ATTRIBUTE_TYPE_UINT64: ::WORD = 0x02; -pub const CLAIM_SECURITY_ATTRIBUTE_TYPE_STRING: ::WORD = 0x03; -STRUCT!{struct CLAIM_SECURITY_ATTRIBUTE_FQBN_VALUE { - Version: ::DWORD64, - Name: ::PWSTR, -}} -pub type PCLAIM_SECURITY_ATTRIBUTE_FQBN_VALUE = *mut CLAIM_SECURITY_ATTRIBUTE_FQBN_VALUE; -pub const CLAIM_SECURITY_ATTRIBUTE_TYPE_FQBN: ::WORD = 0x04; -pub const CLAIM_SECURITY_ATTRIBUTE_TYPE_SID: ::WORD = 0x05; -pub const CLAIM_SECURITY_ATTRIBUTE_TYPE_BOOLEAN: ::WORD = 0x06; -STRUCT!{struct CLAIM_SECURITY_ATTRIBUTE_OCTET_STRING_VALUE { - pValue: ::PVOID, - ValueLength: ::DWORD, -}} -pub type PCLAIM_SECURITY_ATTRIBUTE_OCTET_STRING_VALUE = - *mut CLAIM_SECURITY_ATTRIBUTE_OCTET_STRING_VALUE; -pub const CLAIM_SECURITY_ATTRIBUTE_TYPE_OCTET_STRING: ::WORD = 0x10; -pub const CLAIM_SECURITY_ATTRIBUTE_NON_INHERITABLE: ::DWORD = 0x0001; -pub const CLAIM_SECURITY_ATTRIBUTE_VALUE_CASE_SENSITIVE: ::DWORD = 0x0002; -pub const CLAIM_SECURITY_ATTRIBUTE_USE_FOR_DENY_ONLY: ::DWORD = 0x0004; -pub const CLAIM_SECURITY_ATTRIBUTE_DISABLED_BY_DEFAULT: ::DWORD = 0x0008; -pub const CLAIM_SECURITY_ATTRIBUTE_DISABLED: ::DWORD = 0x0010; -pub const CLAIM_SECURITY_ATTRIBUTE_MANDATORY: ::DWORD = 0x0020; -pub const CLAIM_SECURITY_ATTRIBUTE_VALID_FLAGS: ::DWORD = CLAIM_SECURITY_ATTRIBUTE_NON_INHERITABLE - | CLAIM_SECURITY_ATTRIBUTE_VALUE_CASE_SENSITIVE | CLAIM_SECURITY_ATTRIBUTE_USE_FOR_DENY_ONLY - | CLAIM_SECURITY_ATTRIBUTE_DISABLED_BY_DEFAULT | CLAIM_SECURITY_ATTRIBUTE_DISABLED - | CLAIM_SECURITY_ATTRIBUTE_MANDATORY; -pub const CLAIM_SECURITY_ATTRIBUTE_CUSTOM_FLAGS: ::DWORD = 0xFFFF0000; -STRUCT!{struct CLAIM_SECURITY_ATTRIBUTE_V1 { - Name: ::PWSTR, - ValueType: ::WORD, - Reserved: ::WORD, - Flags: ::DWORD, - ValueCount: ::DWORD, - // Put data here -}} -pub type PCLAIM_SECURITY_ATTRIBUTE_V1 = *mut CLAIM_SECURITY_ATTRIBUTE_V1; -STRUCT!{struct CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1 { - Name: ::DWORD, - ValueType: ::WORD, - Reserved: ::WORD, - Flags: ::DWORD, - ValueCount: ::DWORD, - // Put array here -}} -pub type PCLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1 = *mut CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1; -pub const CLAIM_SECURITY_ATTRIBUTES_INFORMATION_VERSION_V1: ::WORD = 1; -pub const CLAIM_SECURITY_ATTRIBUTES_INFORMATION_VERSION: ::WORD = - CLAIM_SECURITY_ATTRIBUTES_INFORMATION_VERSION_V1; -STRUCT!{struct CLAIM_SECURITY_ATTRIBUTES_INFORMATION { - Version: ::WORD, - Reserved: ::WORD, - AttributeCount: ::DWORD, - pAttributeV1: PCLAIM_SECURITY_ATTRIBUTE_V1, -}} -pub type PCLAIM_SECURITY_ATTRIBUTES_INFORMATION = *mut CLAIM_SECURITY_ATTRIBUTES_INFORMATION; -//11257 -pub type SECURITY_INFORMATION = ::DWORD; -pub type PSECURITY_INFORMATION = *mut ::DWORD; -pub const OWNER_SECURITY_INFORMATION: SECURITY_INFORMATION = 0x00000001; -pub const GROUP_SECURITY_INFORMATION: SECURITY_INFORMATION = 0x00000002; -pub const DACL_SECURITY_INFORMATION: SECURITY_INFORMATION = 0x00000004; -pub const SACL_SECURITY_INFORMATION: SECURITY_INFORMATION = 0x00000008; -pub const LABEL_SECURITY_INFORMATION: SECURITY_INFORMATION = 0x00000010; -pub const ATTRIBUTE_SECURITY_INFORMATION: SECURITY_INFORMATION = 0x00000020; -pub const SCOPE_SECURITY_INFORMATION: SECURITY_INFORMATION = 0x00000040; -pub const PROCESS_TRUST_LABEL_SECURITY_INFORMATION: SECURITY_INFORMATION = 0x00000080; -pub const BACKUP_SECURITY_INFORMATION: SECURITY_INFORMATION = 0x00010000; -pub const PROTECTED_DACL_SECURITY_INFORMATION: SECURITY_INFORMATION = 0x80000000; -pub const PROTECTED_SACL_SECURITY_INFORMATION: SECURITY_INFORMATION = 0x40000000; -pub const UNPROTECTED_DACL_SECURITY_INFORMATION: SECURITY_INFORMATION = 0x20000000; -pub const UNPROTECTED_SACL_SECURITY_INFORMATION: SECURITY_INFORMATION = 0x10000000; -ENUM!{enum SE_LEARNING_MODE_DATA_TYPE { - SeLearningModeInvalidType = 0, - SeLearningModeSettings, - SeLearningModeMax, -}} -STRUCT!{struct SECURITY_CAPABILITIES { - AppContainerSid: PSID, - Capabilities: PSID_AND_ATTRIBUTES, - CapabilityCount: ::DWORD, - Reserved: ::DWORD, -}} -pub type PSECURITY_CAPABILITIES = *mut SECURITY_CAPABILITIES; -pub type LPSECURITY_CAPABILITIES = *mut SECURITY_CAPABILITIES; -pub const PROCESS_TERMINATE: ::DWORD = 0x0001; -pub const PROCESS_CREATE_THREAD: ::DWORD = 0x0002; -pub const PROCESS_SET_SESSIONID: ::DWORD = 0x0004; -pub const PROCESS_VM_OPERATION: ::DWORD = 0x0008; -pub const PROCESS_VM_READ: ::DWORD = 0x0010; -pub const PROCESS_VM_WRITE: ::DWORD = 0x0020; -pub const PROCESS_DUP_HANDLE: ::DWORD = 0x0040; -pub const PROCESS_CREATE_PROCESS: ::DWORD = 0x0080; -pub const PROCESS_SET_QUOTA: ::DWORD = 0x0100; -pub const PROCESS_SET_INFORMATION: ::DWORD = 0x0200; -pub const PROCESS_QUERY_INFORMATION: ::DWORD = 0x0400; -pub const PROCESS_SUSPEND_RESUME: ::DWORD = 0x0800; -pub const PROCESS_QUERY_LIMITED_INFORMATION: ::DWORD = 0x1000; -pub const PROCESS_SET_LIMITED_INFORMATION: ::DWORD = 0x2000; -pub const PROCESS_ALL_ACCESS: ::DWORD = STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0xFFFF; -//11007 -pub const THREAD_BASE_PRIORITY_LOWRT: ::DWORD = 15; -pub const THREAD_BASE_PRIORITY_MAX: ::DWORD = 2; -pub const THREAD_BASE_PRIORITY_MIN: ::DWORD = -2i32 as ::DWORD; -pub const THREAD_BASE_PRIORITY_IDLE: ::DWORD = -15i32 as ::DWORD; -//11018 -STRUCT!{struct QUOTA_LIMITS { - PagedPoolLimit: ::SIZE_T, - NonPagedPoolLimit: ::SIZE_T, - MinimumWorkingSetSize: ::SIZE_T, - MaximumWorkingSetSize: ::SIZE_T, - PagefileLimit: ::SIZE_T, - TimeLimit: ::LARGE_INTEGER, -}} -pub type PQUOTA_LIMITS = *mut QUOTA_LIMITS; -pub const QUOTA_LIMITS_HARDWS_MIN_ENABLE: ::DWORD = 0x00000001; -pub const QUOTA_LIMITS_HARDWS_MIN_DISABLE: ::DWORD = 0x00000002; -pub const QUOTA_LIMITS_HARDWS_MAX_ENABLE: ::DWORD = 0x00000004; -pub const QUOTA_LIMITS_HARDWS_MAX_DISABLE: ::DWORD = 0x00000008; -pub const QUOTA_LIMITS_USE_DEFAULT_LIMITS: ::DWORD = 0x00000010; -STRUCT!{struct RATE_QUOTA_LIMIT { - RateData: ::DWORD, - BitFields: ::DWORD, -}} -BITFIELD!(RATE_QUOTA_LIMIT BitFields: ::DWORD [ - RatePercent set_RatePercent[0..7], - Reserved0 set_Reserved0[7..32], -]); -pub type PRATE_QUOTA_LIMIT = *mut RATE_QUOTA_LIMIT; -STRUCT!{struct QUOTA_LIMITS_EX { - PagedPoolLimit: ::SIZE_T, - NonPagedPoolLimit: ::SIZE_T, - MinimumWorkingSetSize: ::SIZE_T, - MaximumWorkingSetSize: ::SIZE_T, - PagefileLimit: ::SIZE_T, - TimeLimit: ::LARGE_INTEGER, - WorkingSetLimit: ::SIZE_T, - Reserved2: ::SIZE_T, - Reserved3: ::SIZE_T, - Reserved4: ::SIZE_T, - Flags: ::DWORD, - CpuRateLimit: RATE_QUOTA_LIMIT, -}} -pub type PQUOTA_LIMITS_EX = *mut QUOTA_LIMITS_EX; -STRUCT!{struct IO_COUNTERS { - ReadOperationCount: ::ULONGLONG, - WriteOperationCount: ::ULONGLONG, - OtherOperationCount: ::ULONGLONG, - ReadTransferCount: ::ULONGLONG, - WriteTransferCount: ::ULONGLONG, - OtherTransferCount: ::ULONGLONG, -}} -pub type PIO_COUNTERS = *mut IO_COUNTERS; -//11192 -STRUCT!{struct JOBOBJECT_BASIC_LIMIT_INFORMATION { - PerProcessUserTimeLimit: ::LARGE_INTEGER, - PerJobUserTimeLimit: ::LARGE_INTEGER, - LimitFlags: ::DWORD, - MinimumWorkingSetSize: ::SIZE_T, - MaximumWorkingSetSize: ::SIZE_T, - ActiveProcessLimit: ::DWORD, - Affinity: ::ULONG_PTR, - PriorityClass: ::DWORD, - SchedulingClass: ::DWORD, -}} -pub type PJOBOBJECT_BASIC_LIMIT_INFORMATION = *mut JOBOBJECT_BASIC_LIMIT_INFORMATION; -STRUCT!{struct JOBOBJECT_EXTENDED_LIMIT_INFORMATION { - BasicLimitInformation: JOBOBJECT_BASIC_LIMIT_INFORMATION, - IoInfo: IO_COUNTERS, - ProcessMemoryLimit: ::SIZE_T, - JobMemoryLimit: ::SIZE_T, - PeakProcessMemoryUsed: ::SIZE_T, - PeakJobMemoryUsed: ::SIZE_T, -}} -pub type PJOBOBJECT_EXTENDED_LIMIT_INFORMATION = *mut JOBOBJECT_EXTENDED_LIMIT_INFORMATION; -#[repr(C)] #[derive(Debug)] #[allow(missing_copy_implementations)] -pub struct JOBOBJECT_BASIC_PROCESS_ID_LIST { - pub NumberOfAssignedProcesses: ::DWORD, - pub NumberOfProcessIdsInList: ::DWORD, - pub ProcessIdList: [::ULONG_PTR; 0], -} -pub type PJOBOBJECT_BASIC_PROCESS_ID_LIST = *mut JOBOBJECT_BASIC_PROCESS_ID_LIST; -//11712 -pub const JOB_OBJECT_TERMINATE_AT_END_OF_JOB: ::DWORD = 0; -pub const JOB_OBJECT_POST_AT_END_OF_JOB: ::DWORD = 1; -pub const JOB_OBJECT_MSG_END_OF_JOB_TIME: ::DWORD = 1; -pub const JOB_OBJECT_MSG_END_OF_PROCESS_TIME: ::DWORD = 2; -pub const JOB_OBJECT_MSG_ACTIVE_PROCESS_LIMIT: ::DWORD = 3; -pub const JOB_OBJECT_MSG_ACTIVE_PROCESS_ZERO: ::DWORD = 4; -pub const JOB_OBJECT_MSG_NEW_PROCESS: ::DWORD = 6; -pub const JOB_OBJECT_MSG_EXIT_PROCESS: ::DWORD = 7; -pub const JOB_OBJECT_MSG_ABNORMAL_EXIT_PROCESS: ::DWORD = 8; -pub const JOB_OBJECT_MSG_PROCESS_MEMORY_LIMIT: ::DWORD = 9; -pub const JOB_OBJECT_MSG_JOB_MEMORY_LIMIT: ::DWORD = 10; -pub const JOB_OBJECT_MSG_NOTIFICATION_LIMIT: ::DWORD = 11; -pub const JOB_OBJECT_MSG_JOB_CYCLE_TIME_LIMIT: ::DWORD = 12; -pub const JOB_OBJECT_MSG_MINIMUM: ::DWORD = 1; -pub const JOB_OBJECT_MSG_MAXIMUM: ::DWORD = 12; -pub const JOB_OBJECT_VALID_COMPLETION_FILTER: ::DWORD = ((1 << (JOB_OBJECT_MSG_MAXIMUM + 1)) - 1) - - ((1 << JOB_OBJECT_MSG_MINIMUM) - 1); -pub const JOB_OBJECT_LIMIT_WORKINGSET: ::DWORD = 0x00000001; -pub const JOB_OBJECT_LIMIT_PROCESS_TIME: ::DWORD = 0x00000002; -pub const JOB_OBJECT_LIMIT_JOB_TIME: ::DWORD = 0x00000004; -pub const JOB_OBJECT_LIMIT_ACTIVE_PROCESS: ::DWORD = 0x00000008; -pub const JOB_OBJECT_LIMIT_AFFINITY: ::DWORD = 0x00000010; -pub const JOB_OBJECT_LIMIT_PRIORITY_CLASS: ::DWORD = 0x00000020; -pub const JOB_OBJECT_LIMIT_PRESERVE_JOB_TIME: ::DWORD = 0x00000040; -pub const JOB_OBJECT_LIMIT_SCHEDULING_CLASS: ::DWORD = 0x00000080; -pub const JOB_OBJECT_LIMIT_PROCESS_MEMORY: ::DWORD = 0x00000100; -pub const JOB_OBJECT_LIMIT_JOB_MEMORY: ::DWORD = 0x00000200; -pub const JOB_OBJECT_LIMIT_DIE_ON_UNHANDLED_EXCEPTION: ::DWORD = 0x00000400; -pub const JOB_OBJECT_LIMIT_BREAKAWAY_OK: ::DWORD = 0x00000800; -pub const JOB_OBJECT_LIMIT_SILENT_BREAKAWAY_OK: ::DWORD = 0x00001000; -pub const JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE: ::DWORD = 0x00002000; -pub const JOB_OBJECT_LIMIT_SUBSET_AFFINITY: ::DWORD = 0x00004000; -pub const JOB_OBJECT_LIMIT_JOB_READ_BYTES: ::DWORD = 0x00010000; -pub const JOB_OBJECT_LIMIT_JOB_WRITE_BYTES: ::DWORD = 0x00020000; -pub const JOB_OBJECT_LIMIT_RATE_CONTROL: ::DWORD = 0x00040000; -pub const JOB_OBJECT_LIMIT_RESERVED3: ::DWORD = 0x00008000; -pub const JOB_OBJECT_LIMIT_VALID_FLAGS: ::DWORD = 0x0007ffff; -pub const JOB_OBJECT_BASIC_LIMIT_VALID_FLAGS: ::DWORD = 0x000000ff; -pub const JOB_OBJECT_EXTENDED_LIMIT_VALID_FLAGS: ::DWORD = 0x00007fff; -pub const JOB_OBJECT_NOTIFICATION_LIMIT_VALID_FLAGS: ::DWORD = 0x00070204; -pub const JOB_OBJECT_RESERVED_LIMIT_VALID_FLAGS: ::DWORD = 0x0007ffff; -pub const JOB_OBJECT_UILIMIT_NONE: ::DWORD = 0x00000000; -pub const JOB_OBJECT_UILIMIT_HANDLES: ::DWORD = 0x00000001; -pub const JOB_OBJECT_UILIMIT_READCLIPBOARD: ::DWORD = 0x00000002; -pub const JOB_OBJECT_UILIMIT_WRITECLIPBOARD: ::DWORD = 0x00000004; -pub const JOB_OBJECT_UILIMIT_SYSTEMPARAMETERS: ::DWORD = 0x00000008; -pub const JOB_OBJECT_UILIMIT_DISPLAYSETTINGS: ::DWORD = 0x00000010; -pub const JOB_OBJECT_UILIMIT_GLOBALATOMS: ::DWORD = 0x00000020; -pub const JOB_OBJECT_UILIMIT_DESKTOP: ::DWORD = 0x00000040; -pub const JOB_OBJECT_UILIMIT_EXITWINDOWS: ::DWORD = 0x00000080; -pub const JOB_OBJECT_UILIMIT_ALL: ::DWORD = 0x000000FF; -pub const JOB_OBJECT_UI_VALID_FLAGS: ::DWORD = 0x000000FF; -pub const JOB_OBJECT_SECURITY_NO_ADMIN: ::DWORD = 0x00000001; -pub const JOB_OBJECT_SECURITY_RESTRICTED_TOKEN: ::DWORD = 0x00000002; -pub const JOB_OBJECT_SECURITY_ONLY_TOKEN: ::DWORD = 0x00000004; -pub const JOB_OBJECT_SECURITY_FILTER_TOKENS: ::DWORD = 0x00000008; -pub const JOB_OBJECT_SECURITY_VALID_FLAGS: ::DWORD = 0x0000000f; -pub const JOB_OBJECT_CPU_RATE_CONTROL_ENABLE: ::DWORD = 0x1; -pub const JOB_OBJECT_CPU_RATE_CONTROL_WEIGHT_BASED: ::DWORD = 0x2; -pub const JOB_OBJECT_CPU_RATE_CONTROL_HARD_CAP: ::DWORD = 0x4; -pub const JOB_OBJECT_CPU_RATE_CONTROL_NOTIFY: ::DWORD = 0x8; -pub const JOB_OBJECT_CPU_RATE_CONTROL_VALID_FLAGS: ::DWORD = 0xf; -ENUM!{enum JOBOBJECTINFOCLASS { - JobObjectBasicAccountingInformation = 1, - JobObjectBasicLimitInformation, - JobObjectBasicProcessIdList, - JobObjectBasicUIRestrictions, - JobObjectSecurityLimitInformation, - JobObjectEndOfJobTimeInformation, - JobObjectAssociateCompletionPortInformation, - JobObjectBasicAndIoAccountingInformation, - JobObjectExtendedLimitInformation, - JobObjectJobSetInformation, - JobObjectGroupInformation, - JobObjectNotificationLimitInformation, - JobObjectLimitViolationInformation, - JobObjectGroupInformationEx, - JobObjectCpuRateControlInformation, - JobObjectCompletionFilter, - JobObjectCompletionCounter, - JobObjectReserved1Information = 18, - JobObjectReserved2Information, - JobObjectReserved3Information, - JobObjectReserved4Information, - JobObjectReserved5Information, - JobObjectReserved6Information, - JobObjectReserved7Information, - JobObjectReserved8Information, - JobObjectReserved9Information, - MaxJobObjectInfoClass, -}} -//12063 -pub const SECTION_QUERY: ::DWORD = 0x0001; -pub const SECTION_MAP_WRITE: ::DWORD = 0x0002; -pub const SECTION_MAP_READ: ::DWORD = 0x0004; -pub const SECTION_MAP_EXECUTE: ::DWORD = 0x0008; -pub const SECTION_EXTEND_SIZE: ::DWORD = 0x0010; -pub const SECTION_MAP_EXECUTE_EXPLICIT: ::DWORD = 0x0020; -pub const SECTION_ALL_ACCESS: ::DWORD = STANDARD_RIGHTS_REQUIRED | SECTION_QUERY - | SECTION_MAP_WRITE | SECTION_MAP_READ | SECTION_MAP_EXECUTE | SECTION_EXTEND_SIZE; -//12100 -pub const PAGE_NOACCESS: ::DWORD = 0x01; -pub const PAGE_READONLY: ::DWORD = 0x02; -pub const PAGE_READWRITE: ::DWORD = 0x04; -pub const PAGE_WRITECOPY: ::DWORD = 0x08; -pub const PAGE_EXECUTE: ::DWORD = 0x10; -pub const PAGE_EXECUTE_READ: ::DWORD = 0x20; -pub const PAGE_EXECUTE_READWRITE: ::DWORD = 0x40; -pub const PAGE_EXECUTE_WRITECOPY: ::DWORD = 0x80; -pub const PAGE_GUARD: ::DWORD = 0x100; -pub const PAGE_NOCACHE: ::DWORD = 0x200; -pub const PAGE_WRITECOMBINE: ::DWORD = 0x400; -pub const PAGE_REVERT_TO_FILE_MAP: ::DWORD = 0x80000000; -pub const PAGE_TARGETS_NO_UPDATE: ::DWORD = 0x40000000; -pub const PAGE_TARGETS_INVALID: ::DWORD = 0x40000000; -pub const MEM_COMMIT: ::DWORD = 0x1000; -pub const MEM_RESERVE: ::DWORD = 0x2000; -pub const MEM_DECOMMIT: ::DWORD = 0x4000; -pub const MEM_RELEASE: ::DWORD = 0x8000; -pub const MEM_FREE: ::DWORD = 0x10000; -pub const MEM_PRIVATE: ::DWORD = 0x20000; -pub const MEM_MAPPED: ::DWORD = 0x40000; -pub const MEM_RESET: ::DWORD = 0x80000; -pub const MEM_TOP_DOWN: ::DWORD = 0x100000; -pub const MEM_WRITE_WATCH: ::DWORD = 0x200000; -pub const MEM_PHYSICAL: ::DWORD = 0x400000; -pub const MEM_ROTATE: ::DWORD = 0x800000; -pub const MEM_DIFFERENT_IMAGE_BASE_OK: ::DWORD = 0x800000; -pub const MEM_RESET_UNDO: ::DWORD = 0x1000000; -pub const MEM_LARGE_PAGES: ::DWORD = 0x20000000; -pub const MEM_4MB_PAGES: ::DWORD = 0x80000000; -pub const SEC_FILE: ::DWORD = 0x800000; -pub const SEC_IMAGE: ::DWORD = 0x1000000; -pub const SEC_PROTECTED_IMAGE: ::DWORD = 0x2000000; -pub const SEC_RESERVE: ::DWORD = 0x4000000; -pub const SEC_COMMIT: ::DWORD = 0x8000000; -pub const SEC_NOCACHE: ::DWORD = 0x10000000; -pub const SEC_WRITECOMBINE: ::DWORD = 0x40000000; -pub const SEC_LARGE_PAGES: ::DWORD = 0x80000000; -pub const SEC_IMAGE_NO_EXECUTE: ::DWORD = (SEC_IMAGE | SEC_NOCACHE); -pub const MEM_IMAGE: ::DWORD = SEC_IMAGE; -pub const WRITE_WATCH_FLAG_RESET: ::DWORD = 0x01; -pub const MEM_UNMAP_WITH_TRANSIENT_BOOST: ::DWORD = 0x01; -//12217 -pub const FILE_READ_DATA: ::DWORD = 0x0001; -pub const FILE_LIST_DIRECTORY: ::DWORD = 0x0001; -pub const FILE_WRITE_DATA: ::DWORD = 0x0002; -pub const FILE_ADD_FILE: ::DWORD = 0x0002; -pub const FILE_APPEND_DATA: ::DWORD = 0x0004; -pub const FILE_ADD_SUBDIRECTORY: ::DWORD = 0x0004; -pub const FILE_CREATE_PIPE_INSTANCE: ::DWORD = 0x0004; -pub const FILE_READ_EA: ::DWORD = 0x0008; -pub const FILE_WRITE_EA: ::DWORD = 0x0010; -pub const FILE_EXECUTE: ::DWORD = 0x0020; -pub const FILE_TRAVERSE: ::DWORD = 0x0020; -pub const FILE_DELETE_CHILD: ::DWORD = 0x0040; -pub const FILE_READ_ATTRIBUTES: ::DWORD = 0x0080; -pub const FILE_WRITE_ATTRIBUTES: ::DWORD = 0x0100; -pub const FILE_ALL_ACCESS: ::DWORD = STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0x1FF; -pub const FILE_GENERIC_READ: ::DWORD = STANDARD_RIGHTS_READ | FILE_READ_DATA - | FILE_READ_ATTRIBUTES | FILE_READ_EA | SYNCHRONIZE; -pub const FILE_GENERIC_WRITE: ::DWORD = STANDARD_RIGHTS_WRITE | FILE_WRITE_DATA - | FILE_WRITE_ATTRIBUTES | FILE_WRITE_EA | FILE_APPEND_DATA | SYNCHRONIZE; -pub const FILE_GENERIC_EXECUTE: ::DWORD = STANDARD_RIGHTS_EXECUTE | FILE_READ_ATTRIBUTES - | FILE_EXECUTE | SYNCHRONIZE; -pub const FILE_SHARE_READ: ::DWORD = 0x00000001; -pub const FILE_SHARE_WRITE: ::DWORD = 0x00000002; -pub const FILE_SHARE_DELETE: ::DWORD = 0x00000004; -pub const FILE_ATTRIBUTE_READONLY: ::DWORD = 0x00000001; -pub const FILE_ATTRIBUTE_HIDDEN: ::DWORD = 0x00000002; -pub const FILE_ATTRIBUTE_SYSTEM: ::DWORD = 0x00000004; -pub const FILE_ATTRIBUTE_DIRECTORY: ::DWORD = 0x00000010; -pub const FILE_ATTRIBUTE_ARCHIVE: ::DWORD = 0x00000020; -pub const FILE_ATTRIBUTE_DEVICE: ::DWORD = 0x00000040; -pub const FILE_ATTRIBUTE_NORMAL: ::DWORD = 0x00000080; -pub const FILE_ATTRIBUTE_TEMPORARY: ::DWORD = 0x00000100; -pub const FILE_ATTRIBUTE_SPARSE_FILE: ::DWORD = 0x00000200; -pub const FILE_ATTRIBUTE_REPARSE_POINT: ::DWORD = 0x00000400; -pub const FILE_ATTRIBUTE_COMPRESSED: ::DWORD = 0x00000800; -pub const FILE_ATTRIBUTE_OFFLINE: ::DWORD = 0x00001000; -pub const FILE_ATTRIBUTE_NOT_CONTENT_INDEXED: ::DWORD = 0x00002000; -pub const FILE_ATTRIBUTE_ENCRYPTED: ::DWORD = 0x00004000; -pub const FILE_ATTRIBUTE_INTEGRITY_STREAM: ::DWORD = 0x00008000; -pub const FILE_ATTRIBUTE_VIRTUAL: ::DWORD = 0x00010000; -pub const FILE_ATTRIBUTE_NO_SCRUB_DATA: ::DWORD = 0x00020000; -pub const FILE_ATTRIBUTE_EA: ::DWORD = 0x00040000; -pub const FILE_NOTIFY_CHANGE_FILE_NAME: ::DWORD = 0x00000001; -pub const FILE_NOTIFY_CHANGE_DIR_NAME: ::DWORD = 0x00000002; -pub const FILE_NOTIFY_CHANGE_ATTRIBUTES: ::DWORD = 0x00000004; -pub const FILE_NOTIFY_CHANGE_SIZE: ::DWORD = 0x00000008; -pub const FILE_NOTIFY_CHANGE_LAST_WRITE: ::DWORD = 0x00000010; -pub const FILE_NOTIFY_CHANGE_LAST_ACCESS: ::DWORD = 0x00000020; -pub const FILE_NOTIFY_CHANGE_CREATION: ::DWORD = 0x00000040; -pub const FILE_NOTIFY_CHANGE_SECURITY: ::DWORD = 0x00000100; -pub const FILE_ACTION_ADDED: ::DWORD = 0x00000001; -pub const FILE_ACTION_REMOVED: ::DWORD = 0x00000002; -pub const FILE_ACTION_MODIFIED: ::DWORD = 0x00000003; -pub const FILE_ACTION_RENAMED_OLD_NAME: ::DWORD = 0x00000004; -pub const FILE_ACTION_RENAMED_NEW_NAME: ::DWORD = 0x00000005; -pub const MAILSLOT_NO_MESSAGE: ::DWORD = 0xFFFFFFFF; -pub const MAILSLOT_WAIT_FOREVER: ::DWORD = 0xFFFFFFFF; -pub const FILE_CASE_SENSITIVE_SEARCH: ::DWORD = 0x00000001; -pub const FILE_CASE_PRESERVED_NAMES: ::DWORD = 0x00000002; -pub const FILE_UNICODE_ON_DISK: ::DWORD = 0x00000004; -pub const FILE_PERSISTENT_ACLS: ::DWORD = 0x00000008; -pub const FILE_FILE_COMPRESSION: ::DWORD = 0x00000010; -pub const FILE_VOLUME_QUOTAS: ::DWORD = 0x00000020; -pub const FILE_SUPPORTS_SPARSE_FILES: ::DWORD = 0x00000040; -pub const FILE_SUPPORTS_REPARSE_POINTS: ::DWORD = 0x00000080; -pub const FILE_SUPPORTS_REMOTE_STORAGE: ::DWORD = 0x00000100; -pub const FILE_VOLUME_IS_COMPRESSED: ::DWORD = 0x00008000; -pub const FILE_SUPPORTS_OBJECT_IDS: ::DWORD = 0x00010000; -pub const FILE_SUPPORTS_ENCRYPTION: ::DWORD = 0x00020000; -pub const FILE_NAMED_STREAMS: ::DWORD = 0x00040000; -pub const FILE_READ_ONLY_VOLUME: ::DWORD = 0x00080000; -pub const FILE_SEQUENTIAL_WRITE_ONCE: ::DWORD = 0x00100000; -pub const FILE_SUPPORTS_TRANSACTIONS: ::DWORD = 0x00200000; -pub const FILE_SUPPORTS_HARD_LINKS: ::DWORD = 0x00400000; -pub const FILE_SUPPORTS_EXTENDED_ATTRIBUTES: ::DWORD = 0x00800000; -pub const FILE_SUPPORTS_OPEN_BY_FILE_ID: ::DWORD = 0x01000000; -pub const FILE_SUPPORTS_USN_JOURNAL: ::DWORD = 0x02000000; -pub const FILE_SUPPORTS_INTEGRITY_STREAMS: ::DWORD = 0x04000000; -pub const FILE_INVALID_FILE_ID: ::LONGLONG = -1; -STRUCT!{struct FILE_ID_128 { - Identifier: [::BYTE; 16], -}} -pub type PFILE_ID_128 = *mut FILE_ID_128; -#[repr(C)] #[derive(Debug)] #[allow(missing_copy_implementations)] -pub struct FILE_NOTIFY_INFORMATION { - pub NextEntryOffset: ::DWORD, - pub Action: ::DWORD, - pub FileNameLength: ::DWORD, - pub FileName: [::WCHAR; 0], -} -STRUCT!{struct FILE_SEGMENT_ELEMENT { - Buffer: ::PVOID64, - Alignment: ::ULONGLONG, -}} -pub type PFILE_SEGMENT_ELEMENT = *mut FILE_SEGMENT_ELEMENT; -//12475 -pub const IO_REPARSE_TAG_MOUNT_POINT: ::DWORD = 0xA0000003; -pub const IO_REPARSE_TAG_HSM: ::DWORD = 0xC0000004; -pub const IO_REPARSE_TAG_HSM2: ::DWORD = 0x80000006; -pub const IO_REPARSE_TAG_SIS: ::DWORD = 0x80000007; -pub const IO_REPARSE_TAG_WIM: ::DWORD = 0x80000008; -pub const IO_REPARSE_TAG_CSV: ::DWORD = 0x80000009; -pub const IO_REPARSE_TAG_DFS: ::DWORD = 0x8000000A; -pub const IO_REPARSE_TAG_SYMLINK: ::DWORD = 0xA000000C; -pub const IO_REPARSE_TAG_DFSR: ::DWORD = 0x80000012; -pub const IO_REPARSE_TAG_DEDUP: ::DWORD = 0x80000013; -pub const IO_REPARSE_TAG_NFS: ::DWORD = 0x80000014; -pub const IO_REPARSE_TAG_FILE_PLACEHOLDER: ::DWORD = 0x80000015; -pub const IO_REPARSE_TAG_WOF: ::DWORD = 0x80000017; -//12788 -pub const DUPLICATE_CLOSE_SOURCE: ::DWORD = 0x00000001; -pub const DUPLICATE_SAME_ACCESS: ::DWORD = 0x00000002; -//14708 -STRUCT!{struct PROCESSOR_POWER_POLICY_INFO { - TimeCheck: ::DWORD, - DemoteLimit: ::DWORD, - PromoteLimit: ::DWORD, - DemotePercent: ::BYTE, - PromotePercent: ::BYTE, - Spare: [::BYTE; 2], - Reserved: ::DWORD, -}} -BITFIELD!(PROCESSOR_POWER_POLICY_INFO Reserved: ::DWORD [ - AllowDemotion set_AllowDemotion[0..1], - AllowPromotion set_AllowPromotion[1..2], -]); -pub type PPROCESSOR_POWER_POLICY_INFO = *mut PROCESSOR_POWER_POLICY_INFO; -//15000 -STRUCT!{struct IMAGE_FILE_HEADER { - Machine: ::WORD, - NumberOfSections: ::WORD, - TimeDateStamp: ::DWORD, - PointerToSymbolTable: ::DWORD, - NumberOfSymbols: ::DWORD, - SizeOfOptionalHeader: ::WORD, - Characteristics: ::WORD, -}} -pub type PIMAGE_FILE_HEADER = *mut IMAGE_FILE_HEADER; -pub const IMAGE_SIZEOF_FILE_HEADER: usize = 20; -pub const IMAGE_FILE_RELOCS_STRIPPED: ::WORD = 0x0001; -pub const IMAGE_FILE_EXECUTABLE_IMAGE: ::WORD = 0x0002; -pub const IMAGE_FILE_LINE_NUMS_STRIPPED: ::WORD = 0x0004; -pub const IMAGE_FILE_LOCAL_SYMS_STRIPPED: ::WORD = 0x0008; -pub const IMAGE_FILE_AGGRESIVE_WS_TRIM: ::WORD = 0x0010; -pub const IMAGE_FILE_LARGE_ADDRESS_AWARE: ::WORD = 0x0020; -pub const IMAGE_FILE_BYTES_REVERSED_LO: ::WORD = 0x0080; -pub const IMAGE_FILE_32BIT_MACHINE: ::WORD = 0x0100; -pub const IMAGE_FILE_DEBUG_STRIPPED: ::WORD = 0x0200; -pub const IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP: ::WORD = 0x0400; -pub const IMAGE_FILE_NET_RUN_FROM_SWAP: ::WORD = 0x0800; -pub const IMAGE_FILE_SYSTEM: ::WORD = 0x1000; -pub const IMAGE_FILE_DLL: ::WORD = 0x2000; -pub const IMAGE_FILE_UP_SYSTEM_ONLY: ::WORD = 0x4000; -pub const IMAGE_FILE_BYTES_REVERSED_HI: ::WORD = 0x8000; -pub const IMAGE_FILE_MACHINE_UNKNOWN: ::WORD = 0; -pub const IMAGE_FILE_MACHINE_I386: ::WORD = 0x014c; -pub const IMAGE_FILE_MACHINE_R3000: ::WORD = 0x0162; -pub const IMAGE_FILE_MACHINE_R4000: ::WORD = 0x0166; -pub const IMAGE_FILE_MACHINE_R10000: ::WORD = 0x0168; -pub const IMAGE_FILE_MACHINE_WCEMIPSV2: ::WORD = 0x0169; -pub const IMAGE_FILE_MACHINE_ALPHA: ::WORD = 0x0184; -pub const IMAGE_FILE_MACHINE_SH3: ::WORD = 0x01a2; -pub const IMAGE_FILE_MACHINE_SH3DSP: ::WORD = 0x01a3; -pub const IMAGE_FILE_MACHINE_SH3E: ::WORD = 0x01a4; -pub const IMAGE_FILE_MACHINE_SH4: ::WORD = 0x01a6; -pub const IMAGE_FILE_MACHINE_SH5: ::WORD = 0x01a8; -pub const IMAGE_FILE_MACHINE_ARM: ::WORD = 0x01c0; -pub const IMAGE_FILE_MACHINE_THUMB: ::WORD = 0x01c2; -pub const IMAGE_FILE_MACHINE_ARMNT: ::WORD = 0x01c4; -pub const IMAGE_FILE_MACHINE_AM33: ::WORD = 0x01d3; -pub const IMAGE_FILE_MACHINE_POWERPC: ::WORD = 0x01F0; -pub const IMAGE_FILE_MACHINE_POWERPCFP: ::WORD = 0x01f1; -pub const IMAGE_FILE_MACHINE_IA64: ::WORD = 0x0200; -pub const IMAGE_FILE_MACHINE_MIPS16: ::WORD = 0x0266; -pub const IMAGE_FILE_MACHINE_ALPHA64: ::WORD = 0x0284; -pub const IMAGE_FILE_MACHINE_MIPSFPU: ::WORD = 0x0366; -pub const IMAGE_FILE_MACHINE_MIPSFPU16: ::WORD = 0x0466; -pub const IMAGE_FILE_MACHINE_AXP64: ::WORD = IMAGE_FILE_MACHINE_ALPHA64; -pub const IMAGE_FILE_MACHINE_TRICORE: ::WORD = 0x0520; -pub const IMAGE_FILE_MACHINE_CEF: ::WORD = 0x0CEF; -pub const IMAGE_FILE_MACHINE_EBC: ::WORD = 0x0EBC; -pub const IMAGE_FILE_MACHINE_AMD64: ::WORD = 0x8664; -pub const IMAGE_FILE_MACHINE_M32R: ::WORD = 0x9041; -pub const IMAGE_FILE_MACHINE_CEE: ::WORD = 0xC0EE; -STRUCT!{struct IMAGE_DATA_DIRECTORY { - VirtualAddress: ::DWORD, - Size: ::DWORD, -}} -pub type PIMAGE_DATA_DIRECTORY = *mut IMAGE_DATA_DIRECTORY; -pub const IMAGE_NUMBEROF_DIRECTORY_ENTRIES: usize = 16; -STRUCT!{struct IMAGE_OPTIONAL_HEADER32 { - Magic: ::WORD, - MajorLinkerVersion: ::BYTE, - MinorLinkerVersion: ::BYTE, - SizeOfCode: ::DWORD, - SizeOfInitializedData: ::DWORD, - SizeOfUninitializedData: ::DWORD, - AddressOfEntryPoint: ::DWORD, - BaseOfCode: ::DWORD, - BaseOfData: ::DWORD, - ImageBase: ::DWORD, - SectionAlignment: ::DWORD, - FileAlignment: ::DWORD, - MajorOperatingSystemVersion: ::WORD, - MinorOperatingSystemVersion: ::WORD, - MajorImageVersion: ::WORD, - MinorImageVersion: ::WORD, - MajorSubsystemVersion: ::WORD, - MinorSubsystemVersion: ::WORD, - Win32VersionValue: ::DWORD, - SizeOfImage: ::DWORD, - SizeOfHeaders: ::DWORD, - CheckSum: ::DWORD, - Subsystem: ::WORD, - DllCharacteristics: ::WORD, - SizeOfStackReserve: ::DWORD, - SizeOfStackCommit: ::DWORD, - SizeOfHeapReserve: ::DWORD, - SizeOfHeapCommit: ::DWORD, - LoaderFlags: ::DWORD, - NumberOfRvaAndSizes: ::DWORD, - DataDirectory: [IMAGE_DATA_DIRECTORY; IMAGE_NUMBEROF_DIRECTORY_ENTRIES], -}} -pub type PIMAGE_OPTIONAL_HEADER32 = *mut IMAGE_OPTIONAL_HEADER32; -STRUCT!{struct IMAGE_ROM_OPTIONAL_HEADER { - Magic: ::WORD, - MajorLinkerVersion: ::BYTE, - MinorLinkerVersion: ::BYTE, - SizeOfCode: ::DWORD, - SizeOfInitializedData: ::DWORD, - SizeOfUninitializedData: ::DWORD, - AddressOfEntryPoint: ::DWORD, - BaseOfCode: ::DWORD, - BaseOfData: ::DWORD, - BaseOfBss: ::DWORD, - GprMask: ::DWORD, - CprMask: [::DWORD; 4], - GpValue: ::DWORD, -}} -pub type PIMAGE_ROM_OPTIONAL_HEADER = *mut IMAGE_ROM_OPTIONAL_HEADER; -STRUCT!{struct IMAGE_OPTIONAL_HEADER64 { - Magic: ::WORD, - MajorLinkerVersion: ::BYTE, - MinorLinkerVersion: ::BYTE, - SizeOfCode: ::DWORD, - SizeOfInitializedData: ::DWORD, - SizeOfUninitializedData: ::DWORD, - AddressOfEntryPoint: ::DWORD, - BaseOfCode: ::DWORD, - ImageBase: ::ULONGLONG, - SectionAlignment: ::DWORD, - FileAlignment: ::DWORD, - MajorOperatingSystemVersion: ::WORD, - MinorOperatingSystemVersion: ::WORD, - MajorImageVersion: ::WORD, - MinorImageVersion: ::WORD, - MajorSubsystemVersion: ::WORD, - MinorSubsystemVersion: ::WORD, - Win32VersionValue: ::DWORD, - SizeOfImage: ::DWORD, - SizeOfHeaders: ::DWORD, - CheckSum: ::DWORD, - Subsystem: ::WORD, - DllCharacteristics: ::WORD, - SizeOfStackReserve: ULONGLONG, - SizeOfStackCommit: ULONGLONG, - SizeOfHeapReserve: ULONGLONG, - SizeOfHeapCommit: ULONGLONG, - LoaderFlags: ::DWORD, - NumberOfRvaAndSizes: ::DWORD, - DataDirectory: [IMAGE_DATA_DIRECTORY; IMAGE_NUMBEROF_DIRECTORY_ENTRIES], -}} -pub type PIMAGE_OPTIONAL_HEADER64 = *mut IMAGE_OPTIONAL_HEADER64; -pub const IMAGE_NT_OPTIONAL_HDR32_MAGIC: ::WORD = 0x10b; -pub const IMAGE_NT_OPTIONAL_HDR64_MAGIC: ::WORD = 0x20b; -pub const IMAGE_ROM_OPTIONAL_HDR_MAGIC: ::WORD = 0x107; -#[cfg(target_arch = "x86_64")] -pub type IMAGE_OPTIONAL_HEADER = IMAGE_OPTIONAL_HEADER64; -#[cfg(target_arch = "x86_64")] -pub type PIMAGE_OPTIONAL_HEADER = PIMAGE_OPTIONAL_HEADER64; -#[cfg(target_arch = "x86")] -pub type IMAGE_OPTIONAL_HEADER = IMAGE_OPTIONAL_HEADER32; -#[cfg(target_arch = "x86")] -pub type PIMAGE_OPTIONAL_HEADER = PIMAGE_OPTIONAL_HEADER32; -STRUCT!{struct IMAGE_NT_HEADERS64 { - Signature: ::DWORD, - FileHeader: IMAGE_FILE_HEADER, - OptionalHeader: IMAGE_OPTIONAL_HEADER64, -}} -pub type PIMAGE_NT_HEADERS64 = *mut IMAGE_NT_HEADERS64; -STRUCT!{struct IMAGE_NT_HEADERS32 { - Signature: ::DWORD, - FileHeader: IMAGE_FILE_HEADER, - OptionalHeader: IMAGE_OPTIONAL_HEADER32, -}} -pub type PIMAGE_NT_HEADERS32 = *mut IMAGE_NT_HEADERS32; -STRUCT!{struct IMAGE_ROM_HEADERS { - FileHeader: IMAGE_FILE_HEADER, - OptionalHeader: IMAGE_ROM_OPTIONAL_HEADER, -}} -pub type PIMAGE_ROM_HEADERS = *mut IMAGE_ROM_HEADERS; -#[cfg(target_arch = "x86_64")] -pub type IMAGE_NT_HEADERS = IMAGE_NT_HEADERS64; -#[cfg(target_arch = "x86_64")] -pub type PIMAGE_NT_HEADERS = PIMAGE_NT_HEADERS64; -#[cfg(target_arch = "x86")] -pub type IMAGE_NT_HEADERS = IMAGE_NT_HEADERS32; -#[cfg(target_arch = "x86")] -pub type PIMAGE_NT_HEADERS = PIMAGE_NT_HEADERS32; -pub const IMAGE_SUBSYSTEM_UNKNOWN: ::WORD = 0; -pub const IMAGE_SUBSYSTEM_NATIVE: ::WORD = 1; -pub const IMAGE_SUBSYSTEM_WINDOWS_GUI: ::WORD = 2; -pub const IMAGE_SUBSYSTEM_WINDOWS_CUI: ::WORD = 3; -pub const IMAGE_SUBSYSTEM_OS2_CUI: ::WORD = 5; -pub const IMAGE_SUBSYSTEM_POSIX_CUI: ::WORD = 7; -pub const IMAGE_SUBSYSTEM_NATIVE_WINDOWS: ::WORD = 8; -pub const IMAGE_SUBSYSTEM_WINDOWS_CE_GUI: ::WORD = 9; -pub const IMAGE_SUBSYSTEM_EFI_APPLICATION: ::WORD = 10; -pub const IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER: ::WORD = 11; -pub const IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER: ::WORD = 12; -pub const IMAGE_SUBSYSTEM_EFI_ROM: ::WORD = 13; -pub const IMAGE_SUBSYSTEM_XBOX: ::WORD = 14; -pub const IMAGE_SUBSYSTEM_WINDOWS_BOOT_APPLICATION: ::WORD = 16; -pub const IMAGE_DLLCHARACTERISTICS_HIGH_ENTROPY_VA: ::WORD = 0x0020; -pub const IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE: ::WORD = 0x0040; -pub const IMAGE_DLLCHARACTERISTICS_FORCE_INTEGRITY: ::WORD = 0x0080; -pub const IMAGE_DLLCHARACTERISTICS_NX_COMPAT: ::WORD = 0x0100; -pub const IMAGE_DLLCHARACTERISTICS_NO_ISOLATION: ::WORD = 0x0200; -pub const IMAGE_DLLCHARACTERISTICS_NO_SEH: ::WORD = 0x0400; -pub const IMAGE_DLLCHARACTERISTICS_NO_BIND: ::WORD = 0x0800; -pub const IMAGE_DLLCHARACTERISTICS_APPCONTAINER: ::WORD = 0x1000; -pub const IMAGE_DLLCHARACTERISTICS_WDM_DRIVER: ::WORD = 0x2000; -pub const IMAGE_DLLCHARACTERISTICS_GUARD_CF: ::WORD = 0x4000; -pub const IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE: ::WORD = 0x8000; -pub const IMAGE_DIRECTORY_ENTRY_EXPORT: ::WORD = 0; -pub const IMAGE_DIRECTORY_ENTRY_IMPORT: ::WORD = 1; -pub const IMAGE_DIRECTORY_ENTRY_RESOURCE: ::WORD = 2; -pub const IMAGE_DIRECTORY_ENTRY_EXCEPTION: ::WORD = 3; -pub const IMAGE_DIRECTORY_ENTRY_SECURITY: ::WORD = 4; -pub const IMAGE_DIRECTORY_ENTRY_BASERELOC: ::WORD = 5; -pub const IMAGE_DIRECTORY_ENTRY_DEBUG: ::WORD = 6; -pub const IMAGE_DIRECTORY_ENTRY_ARCHITECTURE: ::WORD = 7; -pub const IMAGE_DIRECTORY_ENTRY_GLOBALPTR: ::WORD = 8; -pub const IMAGE_DIRECTORY_ENTRY_TLS: ::WORD = 9; -pub const IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG: ::WORD = 10; -pub const IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT: ::WORD = 11; -pub const IMAGE_DIRECTORY_ENTRY_IAT: ::WORD = 12; -pub const IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT: ::WORD = 13; -pub const IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR: ::WORD = 14; -STRUCT!{struct ANON_OBJECT_HEADER { - Sig1: ::WORD, - Sig2: ::WORD, - Version: ::WORD, - Machine: ::WORD, - TimeDateStamp: ::DWORD, - ClassID: ::CLSID, - SizeOfData: ::DWORD, -}} -STRUCT!{struct ANON_OBJECT_HEADER_V2 { - Sig1: ::WORD, - Sig2: ::WORD, - Version: ::WORD, - Machine: ::WORD, - TimeDateStamp: ::DWORD, - ClassID: ::CLSID, - SizeOfData: ::DWORD, - Flags: ::DWORD, - MetaDataSize: ::DWORD, - MetaDataOffset: ::DWORD, -}} -STRUCT!{struct ANON_OBJECT_HEADER_BIGOBJ { - Sig1: ::WORD, - Sig2: ::WORD, - Version: ::WORD, - Machine: ::WORD, - TimeDateStamp: ::DWORD, - ClassID: ::CLSID, - SizeOfData: ::DWORD, - Flags: ::DWORD, - MetaDataSize: ::DWORD, - MetaDataOffset: ::DWORD, - NumberOfSections: ::DWORD, - PointerToSymbolTable: ::DWORD, - NumberOfSymbols: ::DWORD, -}} -pub const IMAGE_SIZEOF_SHORT_NAME: usize = 8; -STRUCT!{struct IMAGE_SECTION_HEADER { - Name: [::BYTE; IMAGE_SIZEOF_SHORT_NAME], - PhysicalAddressOrVirtualSize: ::DWORD, - VirtualAddress: ::DWORD, - SizeOfRawData: ::DWORD, - PointerToRawData: ::DWORD, - PointerToRelocations: ::DWORD, - PointerToLinenumbers: ::DWORD, - NumberOfRelocations: ::WORD, - NumberOfLinenumbers: ::WORD, - Characteristics: ::DWORD, -}} -pub type PIMAGE_SECTION_HEADER = *mut IMAGE_SECTION_HEADER; -pub const IMAGE_SIZEOF_SECTION_HEADER: usize = 40; -pub const IMAGE_SCN_TYPE_NO_PAD: ::DWORD = 0x00000008; -pub const IMAGE_SCN_CNT_CODE: ::DWORD = 0x00000020; -pub const IMAGE_SCN_CNT_INITIALIZED_DATA: ::DWORD = 0x00000040; -pub const IMAGE_SCN_CNT_UNINITIALIZED_DATA: ::DWORD = 0x00000080; -pub const IMAGE_SCN_LNK_OTHER: ::DWORD = 0x00000100; -pub const IMAGE_SCN_LNK_INFO: ::DWORD = 0x00000200; -pub const IMAGE_SCN_LNK_REMOVE: ::DWORD = 0x00000800; -pub const IMAGE_SCN_LNK_COMDAT: ::DWORD = 0x00001000; -pub const IMAGE_SCN_NO_DEFER_SPEC_EXC: ::DWORD = 0x00004000; -pub const IMAGE_SCN_GPREL: ::DWORD = 0x00008000; -pub const IMAGE_SCN_MEM_FARDATA: ::DWORD = 0x00008000; -pub const IMAGE_SCN_MEM_PURGEABLE: ::DWORD = 0x00020000; -pub const IMAGE_SCN_MEM_16BIT: ::DWORD = 0x00020000; -pub const IMAGE_SCN_MEM_LOCKED: ::DWORD = 0x00040000; -pub const IMAGE_SCN_MEM_PRELOAD: ::DWORD = 0x00080000; -pub const IMAGE_SCN_ALIGN_1BYTES: ::DWORD = 0x00100000; -pub const IMAGE_SCN_ALIGN_2BYTES: ::DWORD = 0x00200000; -pub const IMAGE_SCN_ALIGN_4BYTES: ::DWORD = 0x00300000; -pub const IMAGE_SCN_ALIGN_8BYTES: ::DWORD = 0x00400000; -pub const IMAGE_SCN_ALIGN_16BYTES: ::DWORD = 0x00500000; -pub const IMAGE_SCN_ALIGN_32BYTES: ::DWORD = 0x00600000; -pub const IMAGE_SCN_ALIGN_64BYTES: ::DWORD = 0x00700000; -pub const IMAGE_SCN_ALIGN_128BYTES: ::DWORD = 0x00800000; -pub const IMAGE_SCN_ALIGN_256BYTES: ::DWORD = 0x00900000; -pub const IMAGE_SCN_ALIGN_512BYTES: ::DWORD = 0x00A00000; -pub const IMAGE_SCN_ALIGN_1024BYTES: ::DWORD = 0x00B00000; -pub const IMAGE_SCN_ALIGN_2048BYTES: ::DWORD = 0x00C00000; -pub const IMAGE_SCN_ALIGN_4096BYTES: ::DWORD = 0x00D00000; -pub const IMAGE_SCN_ALIGN_8192BYTES: ::DWORD = 0x00E00000; -pub const IMAGE_SCN_ALIGN_MASK: ::DWORD = 0x00F00000; -pub const IMAGE_SCN_LNK_NRELOC_OVFL: ::DWORD = 0x01000000; -pub const IMAGE_SCN_MEM_DISCARDABLE: ::DWORD = 0x02000000; -pub const IMAGE_SCN_MEM_NOT_CACHED: ::DWORD = 0x04000000; -pub const IMAGE_SCN_MEM_NOT_PAGED: ::DWORD = 0x08000000; -pub const IMAGE_SCN_MEM_SHARED: ::DWORD = 0x10000000; -pub const IMAGE_SCN_MEM_EXECUTE: ::DWORD = 0x20000000; -pub const IMAGE_SCN_MEM_READ: ::DWORD = 0x40000000; -pub const IMAGE_SCN_MEM_WRITE: ::DWORD = 0x80000000; -pub const IMAGE_SCN_SCALE_INDEX: ::DWORD = 0x00000001; -//16590 -STRUCT!{struct IMAGE_DEBUG_DIRECTORY { - Characteristics: ::DWORD, - TimeDateStamp: ::DWORD, - MajorVersion: ::WORD, - MinorVersion: ::WORD, - Type: ::DWORD, - SizeOfData: ::DWORD, - AddressOfRawData: ::DWORD, - PointerToRawData: ::DWORD, -}} -pub type PIMAGE_DEBUG_DIRECTORY = *mut IMAGE_DEBUG_DIRECTORY; -pub const IMAGE_DEBUG_TYPE_UNKNOWN: ::DWORD = 0; -pub const IMAGE_DEBUG_TYPE_COFF: ::DWORD = 1; -pub const IMAGE_DEBUG_TYPE_CODEVIEW: ::DWORD = 2; -pub const IMAGE_DEBUG_TYPE_FPO: ::DWORD = 3; -pub const IMAGE_DEBUG_TYPE_MISC: ::DWORD = 4; -pub const IMAGE_DEBUG_TYPE_EXCEPTION: ::DWORD = 5; -pub const IMAGE_DEBUG_TYPE_FIXUP: ::DWORD = 6; -pub const IMAGE_DEBUG_TYPE_OMAP_TO_SRC: ::DWORD = 7; -pub const IMAGE_DEBUG_TYPE_OMAP_FROM_SRC: ::DWORD = 8; -pub const IMAGE_DEBUG_TYPE_BORLAND: ::DWORD = 9; -pub const IMAGE_DEBUG_TYPE_RESERVED10: ::DWORD = 10; -pub const IMAGE_DEBUG_TYPE_CLSID: ::DWORD = 11; -STRUCT!{struct IMAGE_COFF_SYMBOLS_HEADER { - NumberOfSymbols: ::DWORD, - LvaToFirstSymbol: ::DWORD, - NumberOfLinenumbers: ::DWORD, - LvaToFirstLinenumber: ::DWORD, - RvaToFirstByteOfCode: ::DWORD, - RvaToLastByteOfCode: ::DWORD, - RvaToFirstByteOfData: ::DWORD, - RvaToLastByteOfData: ::DWORD, -}} -pub type PIMAGE_COFF_SYMBOLS_HEADER = *mut IMAGE_COFF_SYMBOLS_HEADER; -STRUCT!{struct IMAGE_RUNTIME_FUNCTION_ENTRY { - BeginAddress: ::DWORD, - EndAddress: ::DWORD, - UnwindInfoAddress: ::DWORD, -}} -UNION!(IMAGE_RUNTIME_FUNCTION_ENTRY, UnwindInfoAddress, UnwindData, UnwindData_mut, ::DWORD); -pub type PIMAGE_RUNTIME_FUNCTION_ENTRY = *mut IMAGE_RUNTIME_FUNCTION_ENTRY; -pub const FRAME_FPO: ::WORD = 0; -pub const FRAME_TRAP: ::WORD = 1; -pub const FRAME_TSS: ::WORD = 2; -pub const FRAME_NONFPO: ::WORD = 3; -STRUCT!{struct FPO_DATA { - ulOffStart: ::DWORD, - cbProcSize: ::DWORD, - cdwLocals: ::DWORD, - cdwParams: ::WORD, - bitfield: ::WORD, -}} -pub type PFPO_DATA = *mut FPO_DATA; -pub const SIZEOF_RFPO_DATA: usize = 16; -pub const IMAGE_DEBUG_MISC_EXENAME: ::DWORD = 1; -STRUCT!{struct IMAGE_DEBUG_MISC { - DataType: ::DWORD, - Length: ::DWORD, - Unicode: ::BOOLEAN, - Reserved: [::BYTE; 3], - Data: [::BYTE; 0], -}} -pub type PIMAGE_DEBUG_MISC = *mut IMAGE_DEBUG_MISC; -STRUCT!{struct IMAGE_FUNCTION_ENTRY { - StartingAddress: ::DWORD, - EndingAddress: ::DWORD, - EndOfPrologue: ::DWORD, -}} -pub type PIMAGE_FUNCTION_ENTRY = *mut IMAGE_FUNCTION_ENTRY; -STRUCT!{struct IMAGE_FUNCTION_ENTRY64 { - StartingAddress: ::ULONGLONG, - EndingAddress: ::ULONGLONG, - EndOfPrologueOrUnwindInfoAddress: ::ULONGLONG, -}} -pub type PIMAGE_FUNCTION_ENTRY64 = *mut IMAGE_FUNCTION_ENTRY64; -//18245 -pub const HEAP_NO_SERIALIZE: ::DWORD = 0x00000001; -pub const HEAP_GROWABLE: ::DWORD = 0x00000002; -pub const HEAP_GENERATE_EXCEPTIONS: ::DWORD = 0x00000004; -pub const HEAP_ZERO_MEMORY: ::DWORD = 0x00000008; -pub const HEAP_REALLOC_IN_PLACE_ONLY: ::DWORD = 0x00000010; -pub const HEAP_TAIL_CHECKING_ENABLED: ::DWORD = 0x00000020; -pub const HEAP_FREE_CHECKING_ENABLED: ::DWORD = 0x00000040; -pub const HEAP_DISABLE_COALESCE_ON_FREE: ::DWORD = 0x00000080; -pub const HEAP_CREATE_ALIGN_16: ::DWORD = 0x00010000; -pub const HEAP_CREATE_ENABLE_TRACING: ::DWORD = 0x00020000; -pub const HEAP_CREATE_ENABLE_EXECUTE: ::DWORD = 0x00040000; -pub const HEAP_MAXIMUM_TAG: ::DWORD = 0x0FFF; -pub const HEAP_PSEUDO_TAG_FLAG: ::DWORD = 0x8000; -pub const HEAP_TAG_SHIFT: ::DWORD = 18; -//18145 -STRUCT!{struct RTL_CRITICAL_SECTION_DEBUG { - Type: ::WORD, - CreatorBackTraceIndex: ::WORD, - CriticalSection: *mut ::RTL_CRITICAL_SECTION, - ProcessLocksList: ::LIST_ENTRY, - EntryCount: ::DWORD, - ContentionCount: ::DWORD, - Flags: ::DWORD, - CreatorBackTraceIndexHigh: ::WORD, - SpareWORD: ::WORD, -}} -pub type PRTL_CRITICAL_SECTION_DEBUG = *mut RTL_CRITICAL_SECTION_DEBUG; -pub type RTL_RESOURCE_DEBUG = RTL_CRITICAL_SECTION_DEBUG; -pub type PRTL_RESOURCE_DEBUG = *mut RTL_CRITICAL_SECTION_DEBUG; -pub const RTL_CRITSECT_TYPE: ::WORD = 0; -pub const RTL_RESOURCE_TYPE: ::WORD = 1; -pub const RTL_CRITICAL_SECTION_FLAG_NO_DEBUG_INFO: ::ULONG_PTR = 0x01000000; -pub const RTL_CRITICAL_SECTION_FLAG_DYNAMIC_SPIN: ::ULONG_PTR = 0x02000000; -pub const RTL_CRITICAL_SECTION_FLAG_STATIC_INIT: ::ULONG_PTR = 0x04000000; -pub const RTL_CRITICAL_SECTION_FLAG_RESOURCE_TYPE: ::ULONG_PTR = 0x08000000; -pub const RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO: ::ULONG_PTR = 0x10000000; -pub const RTL_CRITICAL_SECTION_ALL_FLAG_BITS: ::ULONG_PTR = 0xFF000000; -pub const RTL_CRITICAL_SECTION_FLAG_RESERVED: ::ULONG_PTR = RTL_CRITICAL_SECTION_ALL_FLAG_BITS & !(RTL_CRITICAL_SECTION_FLAG_NO_DEBUG_INFO | RTL_CRITICAL_SECTION_FLAG_DYNAMIC_SPIN | RTL_CRITICAL_SECTION_FLAG_STATIC_INIT | RTL_CRITICAL_SECTION_FLAG_RESOURCE_TYPE | RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO); -pub const RTL_CRITICAL_SECTION_DEBUG_FLAG_STATIC_INIT: ::DWORD = 0x00000001; -STRUCT!{struct RTL_CRITICAL_SECTION { - DebugInfo: ::PRTL_CRITICAL_SECTION_DEBUG, - LockCount: ::LONG, - RecursionCount: ::LONG, - OwningThread: ::HANDLE, - LockSemaphore: ::HANDLE, - SpinCount: ::ULONG_PTR, -}} -pub type PRTL_CRITICAL_SECTION = *mut RTL_CRITICAL_SECTION; -STRUCT!{struct RTL_SRWLOCK { - Ptr: ::PVOID, -}} -pub type PRTL_SRWLOCK = *mut RTL_SRWLOCK; -pub const RTL_SRWLOCK_INIT: RTL_SRWLOCK = RTL_SRWLOCK { Ptr: 0 as PVOID }; -STRUCT!{struct RTL_CONDITION_VARIABLE { - Ptr: ::PVOID, -}} -pub type PRTL_CONDITION_VARIABLE = *mut RTL_CONDITION_VARIABLE; -pub const RTL_CONDITION_VARIABLE_INIT: RTL_CONDITION_VARIABLE = RTL_CONDITION_VARIABLE { - Ptr: 0 as PVOID -}; -//18204 -pub type PAPCFUNC = Option<unsafe extern "system" fn(Parameter: ::ULONG_PTR)>; -pub type PVECTORED_EXCEPTION_HANDLER = Option<unsafe extern "system" fn( - ExceptionInfo: *mut EXCEPTION_POINTERS, -) -> ::LONG>; -ENUM!{enum HEAP_INFORMATION_CLASS { - HeapCompatibilityInformation = 0, - HeapEnableTerminationOnCorruption = 1, - HeapOptimizeResources = 3, -}} -//pub use self::HEAP_INFORMATION_CLASS::*; -pub const HEAP_OPTIMIZE_RESOURCES_CURRENT_VERSION: ::DWORD = 1; -STRUCT!{struct HEAP_OPTIMIZE_RESOURCES_INFORMATION { - Version: ::DWORD, - Flags: ::DWORD, -}} -pub type PHEAP_OPTIMIZE_RESOURCES_INFORMATION = *mut HEAP_OPTIMIZE_RESOURCES_INFORMATION; -pub const WT_EXECUTEDEFAULT: ::ULONG = 0x00000000; -pub const WT_EXECUTEINIOTHREAD: ::ULONG = 0x00000001; -pub const WT_EXECUTEINUITHREAD: ::ULONG = 0x00000002; -pub const WT_EXECUTEINWAITTHREAD: ::ULONG = 0x00000004; -pub const WT_EXECUTEONLYONCE: ::ULONG = 0x00000008; -pub const WT_EXECUTEINTIMERTHREAD: ::ULONG = 0x00000020; -pub const WT_EXECUTELONGFUNCTION: ::ULONG = 0x00000010; -pub const WT_EXECUTEINPERSISTENTIOTHREAD: ::ULONG = 0x00000040; -pub const WT_EXECUTEINPERSISTENTTHREAD: ::ULONG = 0x00000080; -pub const WT_TRANSFER_IMPERSONATION: ::ULONG = 0x00000100; -pub type WAITORTIMERCALLBACKFUNC = Option<unsafe extern "system" fn(::PVOID, ::BOOLEAN)>; -pub type WORKERCALLBACKFUNC = Option<unsafe extern "system" fn(::PVOID)>; -pub type APC_CALLBACK_FUNCTION = Option<unsafe extern "system" fn(::DWORD, ::PVOID, ::PVOID)>; -pub type WAITORTIMERCALLBACK = WAITORTIMERCALLBACKFUNC; -pub type PFLS_CALLBACK_FUNCTION = Option<unsafe extern "system" fn(lpFlsData: ::PVOID)>; -pub type PSECURE_MEMORY_CACHE_CALLBACK = Option<unsafe extern "system" fn( - Addr: ::PVOID, Range: ::SIZE_T, -) -> ::BOOLEAN>; -pub const WT_EXECUTEINLONGTHREAD: ::ULONG = 0x00000010; -pub const WT_EXECUTEDELETEWAIT: ::ULONG = 0x00000008; -//18570 -pub const KEY_QUERY_VALUE: ::REGSAM = 0x0001; -pub const KEY_SET_VALUE: ::REGSAM = 0x0002; -pub const KEY_CREATE_SUB_KEY: ::REGSAM = 0x0004; -pub const KEY_ENUMERATE_SUB_KEYS: ::REGSAM = 0x0008; -pub const KEY_NOTIFY: ::REGSAM = 0x0010; -pub const KEY_CREATE_LINK: ::REGSAM = 0x0020; -pub const KEY_WOW64_32KEY: ::REGSAM = 0x0200; -pub const KEY_WOW64_64KEY: ::REGSAM = 0x0100; -pub const KEY_WOW64_RES: ::REGSAM = 0x0300; -pub const KEY_READ: ::REGSAM = ( - STANDARD_RIGHTS_READ | - KEY_QUERY_VALUE | - KEY_ENUMERATE_SUB_KEYS | - KEY_NOTIFY - ) & (!SYNCHRONIZE); -pub const KEY_WRITE: ::REGSAM = (STANDARD_RIGHTS_WRITE | KEY_SET_VALUE | KEY_CREATE_SUB_KEY) & (!SYNCHRONIZE); -pub const KEY_EXECUTE: ::REGSAM = KEY_READ & (!SYNCHRONIZE); -pub const KEY_ALL_ACCESS: ::REGSAM = ( - STANDARD_RIGHTS_ALL | - KEY_QUERY_VALUE | - KEY_SET_VALUE | - KEY_CREATE_SUB_KEY | - KEY_ENUMERATE_SUB_KEYS | - KEY_NOTIFY | - KEY_CREATE_LINK - ) & (!SYNCHRONIZE); -pub const REG_CREATED_NEW_KEY: ::DWORD = 0x00000001; -pub const REG_OPENED_EXISTING_KEY: ::DWORD = 0x00000002; -pub const REG_NOTIFY_CHANGE_NAME: ::DWORD = 0x00000001; -pub const REG_NOTIFY_CHANGE_ATTRIBUTES: ::DWORD = 0x00000002; -pub const REG_NOTIFY_CHANGE_LAST_SET: ::DWORD = 0x00000004; -pub const REG_NOTIFY_CHANGE_SECURITY: ::DWORD = 0x00000008; -pub const REG_LEGAL_CHANGE_FILTER: ::DWORD = REG_NOTIFY_CHANGE_NAME | - REG_NOTIFY_CHANGE_ATTRIBUTES | - REG_NOTIFY_CHANGE_LAST_SET | - REG_NOTIFY_CHANGE_SECURITY; -pub const REG_NOTIFY_THREAD_AGNOSTIC: ::DWORD = 0x10000000; //supported only on Windows 8 and later -pub const REG_OPTION_RESERVED: ::DWORD = 0x00000000; -pub const REG_OPTION_NON_VOLATILE: ::DWORD = 0x00000000; -pub const REG_OPTION_VOLATILE: ::DWORD = 0x00000001; -pub const REG_OPTION_CREATE_LINK: ::DWORD = 0x00000002; -pub const REG_OPTION_BACKUP_RESTORE: ::DWORD = 0x00000004; -pub const REG_OPTION_OPEN_LINK: ::DWORD = 0x00000008; -pub const REG_NONE: ::DWORD = 0; -pub const REG_SZ: ::DWORD = 1; -pub const REG_EXPAND_SZ: ::DWORD = 2; -pub const REG_BINARY: ::DWORD = 3; -pub const REG_DWORD: ::DWORD = 4; -pub const REG_DWORD_LITTLE_ENDIAN: ::DWORD = 4; -pub const REG_DWORD_BIG_ENDIAN: ::DWORD = 5; -pub const REG_LINK: ::DWORD = 6; -pub const REG_MULTI_SZ: ::DWORD = 7; -pub const REG_RESOURCE_LIST: ::DWORD = 8; -pub const REG_FULL_RESOURCE_DESCRIPTOR: ::DWORD = 9; -pub const REG_RESOURCE_REQUIREMENTS_LIST: ::DWORD = 10; -pub const REG_QWORD: ::DWORD = 11; -pub const REG_QWORD_LITTLE_ENDIAN: ::DWORD = 11; -//18720 -pub const SERVICE_KERNEL_DRIVER: ::DWORD = 0x00000001; -pub const SERVICE_FILE_SYSTEM_DRIVER: ::DWORD = 0x00000002; -pub const SERVICE_ADAPTER: ::DWORD = 0x00000004; -pub const SERVICE_RECOGNIZER_DRIVER: ::DWORD = 0x00000008; -pub const SERVICE_DRIVER: ::DWORD = SERVICE_KERNEL_DRIVER | SERVICE_FILE_SYSTEM_DRIVER - | SERVICE_RECOGNIZER_DRIVER; -pub const SERVICE_WIN32_OWN_PROCESS: ::DWORD = 0x00000010; -pub const SERVICE_WIN32_SHARE_PROCESS: ::DWORD = 0x00000020; -pub const SERVICE_WIN32: ::DWORD = SERVICE_WIN32_OWN_PROCESS | SERVICE_WIN32_SHARE_PROCESS; -pub const SERVICE_INTERACTIVE_PROCESS: ::DWORD = 0x00000100; -pub const SERVICE_TYPE_ALL: ::DWORD = SERVICE_WIN32 | SERVICE_ADAPTER | SERVICE_DRIVER - | SERVICE_INTERACTIVE_PROCESS; -STRUCT!{struct TP_CALLBACK_INSTANCE { - dummy: *mut ::c_void, -}} -pub type PTP_CALLBACK_INSTANCE = *mut TP_CALLBACK_INSTANCE; -STRUCT!{struct TP_IO { - dummy: *mut ::c_void, -}} -pub type PTP_IO = *mut TP_IO; -STRUCT!{struct TP_POOL { - dummy: *mut ::c_void, -}} -pub type PTP_POOL = *mut TP_POOL; -STRUCT!{struct TP_CLEANUP_GROUP { - dummy: *mut ::c_void, -}} -pub type PTP_CLEANUP_GROUP = *mut TP_CLEANUP_GROUP; -STRUCT!{struct TP_TIMER { - dummy: *mut ::c_void, -}} -pub type PTP_TIMER = *mut TP_TIMER; -STRUCT!{struct TP_WAIT { - dummy: *mut ::c_void, -}} -pub type PTP_WAIT = *mut TP_WAIT; -STRUCT!{struct TP_WORK { - dummy: *mut ::c_void, -}} -pub type PTP_WORK = *mut TP_WORK; -STRUCT!{struct ACTIVATION_CONTEXT { - dummy: *mut ::c_void, -}} -ENUM!{enum TP_CALLBACK_PRIORITY { - TP_CALLBACK_PRIORITY_HIGH, - TP_CALLBACK_PRIORITY_NORMAL, - TP_CALLBACK_PRIORITY_LOW, - TP_CALLBACK_PRIORITY_INVALID, - TP_CALLBACK_PRIORITY_COUNT = 4, -}} -pub type PTP_CLEANUP_GROUP_CANCEL_CALLBACK = Option<unsafe extern "system" fn( - ObjectContext: ::PVOID, CleanupContext: ::PVOID, -)>; -pub type PTP_SIMPLE_CALLBACK = Option<unsafe extern "system" fn( - Instance: PTP_CALLBACK_INSTANCE, Context: ::PVOID, -)>; -pub type PTP_WORK_CALLBACK = Option<unsafe extern "system" fn( - Instance: PTP_CALLBACK_INSTANCE, Context: ::PVOID, Work: PTP_WORK, -)>; -pub type PTP_TIMER_CALLBACK = Option<unsafe extern "system" fn( - Instance: PTP_CALLBACK_INSTANCE, Context: ::PVOID, Timer: PTP_TIMER, -)>; -pub type TP_WAIT_RESULT = ::DWORD; -pub type PTP_WAIT_CALLBACK = Option<unsafe extern "system" fn( - Instance: PTP_CALLBACK_INSTANCE, Context: ::PVOID, Wait: PTP_WAIT, WaitResult: TP_WAIT_RESULT, -)>; -pub type TP_VERSION = ::DWORD; -pub type PTP_VERSION = *mut ::DWORD; -STRUCT!{struct TP_POOL_STACK_INFORMATION { - StackReserve: ::SIZE_T, - StackCommit: ::SIZE_T, -}} -pub type PTP_POOL_STACK_INFORMATION = *mut TP_POOL_STACK_INFORMATION; -STRUCT!{struct TP_CALLBACK_ENVIRON_V3_s { - BitFields: ::DWORD, -}} -BITFIELD!(TP_CALLBACK_ENVIRON_V3_s BitFields: ::DWORD [ - LongFunction set_LongFunction[0..1], - Persistent set_Persistent[1..2], - Private set_Private[2..32], -]); -#[repr(C)] #[derive(Copy)] -pub struct TP_CALLBACK_ENVIRON_V3 { - pub Version: TP_VERSION, - pub Pool: PTP_POOL, - pub CleanupGroup: PTP_CLEANUP_GROUP, - pub CleanupGroupCancelCallback: PTP_CLEANUP_GROUP_CANCEL_CALLBACK, - pub RaceDll: ::PVOID, - pub ActivationContext: *mut ACTIVATION_CONTEXT, - pub FinalizationCallback: PTP_SIMPLE_CALLBACK, - pub u: ::DWORD, - pub CallbackPriority: TP_CALLBACK_PRIORITY, - pub Size: ::DWORD, -} -impl Clone for TP_CALLBACK_ENVIRON_V3 { fn clone(&self) -> TP_CALLBACK_ENVIRON_V3 { *self } } -UNION!(TP_CALLBACK_ENVIRON_V3, u, Flags, Flags_mut, ::DWORD); -UNION!(TP_CALLBACK_ENVIRON_V3, u, s, s_mut, TP_CALLBACK_ENVIRON_V3_s); -pub type TP_CALLBACK_ENVIRON = TP_CALLBACK_ENVIRON_V3; -pub type PTP_CALLBACK_ENVIRON = *mut TP_CALLBACK_ENVIRON_V3; -STRUCT!{struct JOB_SET_ARRAY { - JobHandle: ::HANDLE, - MemberLevel: ::DWORD, - Flags: ::DWORD, -}} -pub type PJOB_SET_ARRAY = *mut JOB_SET_ARRAY; -STRUCT!{struct RTL_BARRIER { - Reserved1: ::DWORD, - Reserved2: ::DWORD, - Reserved3: [::ULONG_PTR; 2], - Reserved4: ::DWORD, - Reserved5: ::DWORD, -}} -pub type PRTL_BARRIER = *mut RTL_BARRIER; -STRUCT!{struct RTL_RUN_ONCE { - Ptr: ::PVOID, -}} -pub type PRTL_RUN_ONCE = *mut RTL_RUN_ONCE; -ENUM!{enum RTL_UMS_THREAD_INFO_CLASS { - UmsThreadInvalidInfoClass = 0, - UmsThreadUserContext, - UmsThreadPriority, // Reserved - UmsThreadAffinity, // Reserved - UmsThreadTeb, - UmsThreadIsSuspended, - UmsThreadIsTerminated, - UmsThreadMaxInfoClass, -}} -ENUM!{enum RTL_UMS_SCHEDULER_REASON { - UmsSchedulerStartup = 0, - UmsSchedulerThreadBlocked, - UmsSchedulerThreadYield, -}} -pub type PRTL_UMS_SCHEDULER_ENTRY_POINT = Option<unsafe extern "system" fn( - Reason: RTL_UMS_SCHEDULER_REASON, ActivationPayload: ::ULONG_PTR, SchedulerParam: ::PVOID, -)>; -ENUM!{enum FIRMWARE_TYPE { - FirmwareTypeUnknown, - FirmwareTypeBios, - FirmwareTypeUefi, - FirmwareTypeMax, -}} -pub type PFIRMWARE_TYPE = *mut FIRMWARE_TYPE; -ENUM!{enum LOGICAL_PROCESSOR_RELATIONSHIP { - RelationProcessorCore, - RelationNumaNode, - RelationCache, - RelationProcessorPackage, - RelationGroup, - RelationAll = 0xffff, -}} -ENUM!{enum PROCESSOR_CACHE_TYPE { - CacheUnified, - CacheInstruction, - CacheData, - CacheTrace, -}} -STRUCT!{struct CACHE_DESCRIPTOR { - Level: ::BYTE, - Associativity: ::BYTE, - LineSize: ::WORD, - Size: ::DWORD, - Type: PROCESSOR_CACHE_TYPE, -}} -pub type PCACHE_DESCRIPTOR = *mut CACHE_DESCRIPTOR; -STRUCT!{struct SYSTEM_LOGICAL_PROCESSOR_INFORMATION_ProcessorCore { - Flags: ::BYTE, -}} -STRUCT!{struct SYSTEM_LOGICAL_PROCESSOR_INFORMATION_NumaNode { - NodeNumber: ::DWORD, -}} -STRUCT!{struct SYSTEM_LOGICAL_PROCESSOR_INFORMATION { - ProcessorMask: ::ULONG_PTR, - Relationship: LOGICAL_PROCESSOR_RELATIONSHIP, - Reserved: [::ULONGLONG; 2], -}} -UNION!( - SYSTEM_LOGICAL_PROCESSOR_INFORMATION, Reserved, ProcessorCore, ProcessorCore_mut, - SYSTEM_LOGICAL_PROCESSOR_INFORMATION_ProcessorCore -); -UNION!( - SYSTEM_LOGICAL_PROCESSOR_INFORMATION, Reserved, NumaNode, NumaNode_mut, - SYSTEM_LOGICAL_PROCESSOR_INFORMATION_NumaNode -); -UNION!(SYSTEM_LOGICAL_PROCESSOR_INFORMATION, Reserved, Cache, Cache_mut, CACHE_DESCRIPTOR); -pub type PSYSTEM_LOGICAL_PROCESSOR_INFORMATION = *mut SYSTEM_LOGICAL_PROCESSOR_INFORMATION; -STRUCT!{struct SYSTEM_PROCESSOR_CYCLE_TIME_INFORMATION { - CycleTime: ::DWORD64, -}} -pub type PSYSTEM_PROCESSOR_CYCLE_TIME_INFORMATION = *mut SYSTEM_PROCESSOR_CYCLE_TIME_INFORMATION; -ENUM!{enum HARDWARE_COUNTER_TYPE { - PMCCounter, - MaxHardwareCounterType, -}} -pub type PHARDWARE_COUNTER_TYPE = *mut HARDWARE_COUNTER_TYPE; -ENUM!{enum PROCESS_MITIGATION_POLICY { - ProcessDEPPolicy, - ProcessASLRPolicy, - ProcessDynamicCodePolicy, - ProcessStrictHandleCheckPolicy, - ProcessSystemCallDisablePolicy, - ProcessMitigationOptionsMask, - ProcessExtensionPointDisablePolicy, - ProcessReserved1Policy, - ProcessSignaturePolicy, - MaxProcessMitigationPolicy, -}} -#[repr(C)] #[derive(Copy)] -pub struct OSVERSIONINFOA { - pub dwOSVersionInfoSize: ::DWORD, - pub dwMajorVersion: ::DWORD, - pub dwMinorVersion: ::DWORD, - pub dwBuildNumber: ::DWORD, - pub dwPlatformId: ::DWORD, - pub szCSDVersion: [::CHAR; 128], -} -impl Clone for OSVERSIONINFOA { fn clone(&self) -> OSVERSIONINFOA { *self } } -pub type POSVERSIONINFOA = *mut OSVERSIONINFOA; -pub type LPOSVERSIONINFOA = *mut OSVERSIONINFOA; -#[repr(C)] #[derive(Copy)] -pub struct OSVERSIONINFOW { - pub dwOSVersionInfoSize: ::DWORD, - pub dwMajorVersion: ::DWORD, - pub dwMinorVersion: ::DWORD, - pub dwBuildNumber: ::DWORD, - pub dwPlatformId: ::DWORD, - pub szCSDVersion: [::WCHAR; 128], -} -impl Clone for OSVERSIONINFOW { fn clone(&self) -> OSVERSIONINFOW { *self } } -pub type POSVERSIONINFOW = *mut OSVERSIONINFOW; -pub type LPOSVERSIONINFOW = *mut OSVERSIONINFOW; -#[repr(C)] #[derive(Copy)] -pub struct OSVERSIONINFOEXA { - pub dwOSVersionInfoSize: ::DWORD, - pub dwMajorVersion: ::DWORD, - pub dwMinorVersion: ::DWORD, - pub dwBuildNumber: ::DWORD, - pub dwPlatformId: ::DWORD, - pub szCSDVersion: [::CHAR; 128], - pub wServicePackMajor: ::WORD, - pub wServicePackMinor: ::WORD, - pub wSuiteMask: ::WORD, - pub wProductType: ::BYTE, - pub wReserved: ::BYTE, -} -impl Clone for OSVERSIONINFOEXA { fn clone(&self) -> OSVERSIONINFOEXA { *self } } -pub type POSVERSIONINFOEXA = *mut OSVERSIONINFOEXA; -pub type LPOSVERSIONINFOEXA = *mut OSVERSIONINFOEXA; -#[repr(C)] #[derive(Copy)] -pub struct OSVERSIONINFOEXW { - pub dwOSVersionInfoSize: ::DWORD, - pub dwMajorVersion: ::DWORD, - pub dwMinorVersion: ::DWORD, - pub dwBuildNumber: ::DWORD, - pub dwPlatformId: ::DWORD, - pub szCSDVersion: [::WCHAR; 128], - pub wServicePackMajor: ::WORD, - pub wServicePackMinor: ::WORD, - pub wSuiteMask: ::WORD, - pub wProductType: ::BYTE, - pub wReserved: ::BYTE, -} -impl Clone for OSVERSIONINFOEXW { fn clone(&self) -> OSVERSIONINFOEXW { *self } } -pub type POSVERSIONINFOEXW = *mut OSVERSIONINFOEXW; -pub type LPOSVERSIONINFOEXW = *mut OSVERSIONINFOEXW; -STRUCT!{struct SLIST_ENTRY { - Next: *mut SLIST_ENTRY, -}} -pub type PSLIST_ENTRY = *mut SLIST_ENTRY; -STRUCT!{struct SLIST_HEADER_HeaderX64 { - BitFields1: ::ULONGLONG, - BitFields2: ::ULONGLONG, -}} -BITFIELD!(SLIST_HEADER_HeaderX64 BitFields1: ::ULONGLONG [ - Depth set_Depth[0..16], - Sequence set_Sequence[16..64], -]); -BITFIELD!(SLIST_HEADER_HeaderX64 BitFields2: ::ULONGLONG [ - Reserved set_Reserved[0..4], - NextEntry set_NextEntry[4..64], -]); -STRUCT!{struct SLIST_HEADER { - Alignment: ::ULONGLONG, - Region: ::ULONGLONG, -}} -UNION!(SLIST_HEADER, Alignment, HeaderX64, HeaderX64_mut, SLIST_HEADER_HeaderX64); -pub type PSLIST_HEADER = *mut SLIST_HEADER; -ENUM!{enum SYSTEM_POWER_STATE { - PowerSystemUnspecified = 0, - PowerSystemWorking = 1, - PowerSystemSleeping1 = 2, - PowerSystemSleeping2 = 3, - PowerSystemSleeping3 = 4, - PowerSystemHibernate = 5, - PowerSystemShutdown = 6, - PowerSystemMaximum = 7, -}} -pub type PSYSTEM_POWER_STATE = *mut SYSTEM_POWER_STATE; -ENUM!{enum POWER_ACTION { - PowerActionNone = 0, - PowerActionReserved, - PowerActionSleep, - PowerActionHibernate, - PowerActionShutdown, - PowerActionShutdownReset, - PowerActionShutdownOff, - PowerActionWarmEject, -}} -pub type PPOWER_ACTION = *mut POWER_ACTION; -ENUM!{enum DEVICE_POWER_STATE { - PowerDeviceUnspecified = 0, - PowerDeviceD0, - PowerDeviceD1, - PowerDeviceD2, - PowerDeviceD3, - PowerDeviceMaximum, -}} -pub type PDEVICE_POWER_STATE = *mut DEVICE_POWER_STATE; -ENUM!{enum MONITOR_DISPLAY_STATE { - PowerMonitorOff = 0, - PowerMonitorOn, - PowerMonitorDim, -}} -pub type PMONITOR_DISPLAY_STATE = *mut MONITOR_DISPLAY_STATE; -ENUM!{enum USER_ACTIVITY_PRESENCE { - PowerUserPresent = 0, - PowerUserNotPresent, - PowerUserInactive, - PowerUserMaximum, - //PowerUserInvalid = 3, -}} -pub type PUSER_ACTIVITY_PRESENCE = *mut USER_ACTIVITY_PRESENCE; -pub type EXECUTION_STATE = ::DWORD; -pub type PEXECUTION_STATE = *mut ::DWORD; -ENUM!{enum LATENCY_TIME { - LT_DONT_CARE, - LT_LOWEST_LATENCY, -}} -ENUM!{enum POWER_REQUEST_TYPE { - PowerRequestDisplayRequired, - PowerRequestSystemRequired, - PowerRequestAwayModeRequired, - PowerRequestExecutionRequired, -}} -pub type PPOWER_REQUEST_TYPE = *mut POWER_REQUEST_TYPE; -pub const MAX_HW_COUNTERS: usize = 16; -STRUCT!{struct HARDWARE_COUNTER_DATA { - Type: HARDWARE_COUNTER_TYPE, - Reserved: ::DWORD, - Value: ::DWORD64, -}} -pub type PHARDWARE_COUNTER_DATA = *mut HARDWARE_COUNTER_DATA; -STRUCT!{struct PERFORMANCE_DATA { - Size: ::WORD, - Version: ::BYTE, - HwCountersCount: ::BYTE, - ContextSwitchCount: ::DWORD, - WaitReasonBitMap: ::DWORD64, - CycleTime: ::DWORD64, - RetryCount: ::DWORD, - Reserved: ::DWORD, - HwCounters: [HARDWARE_COUNTER_DATA; MAX_HW_COUNTERS], -}} -pub type PPERFORMANCE_DATA = *mut PERFORMANCE_DATA; -STRUCT!{struct MEMORY_BASIC_INFORMATION { - BaseAddress: ::PVOID, - AllocationBase: ::PVOID, - AllocationProtect: ::DWORD, - RegionSize: ::SIZE_T, - State: ::DWORD, - Protect: ::DWORD, - Type: ::DWORD, -}} -pub type PMEMORY_BASIC_INFORMATION = *mut MEMORY_BASIC_INFORMATION; -STRUCT!{struct MEMORY_BASIC_INFORMATION32 { - BaseAddress: ::DWORD, - AllocationBase: ::DWORD, - AllocationProtect: ::DWORD, - RegionSize: ::DWORD, - State: ::DWORD, - Protect: ::DWORD, - Type: ::DWORD, -}} -pub type PMEMORY_BASIC_INFORMATION32 = *mut MEMORY_BASIC_INFORMATION32; -STRUCT!{struct MEMORY_BASIC_INFORMATION64 { // FIXME: align 16 - BaseAddress: ::ULONGLONG, - AllocationBase: ::ULONGLONG, - AllocationProtect: ::DWORD, - __alignment1: ::DWORD, - RegionSize: ::ULONGLONG, - State: ::DWORD, - Protect: ::DWORD, - Type: ::DWORD, - __alignment2: ::DWORD, -}} -pub type PMEMORY_BASIC_INFORMATION64 = *mut MEMORY_BASIC_INFORMATION64; -pub const WOW64_SIZE_OF_80387_REGISTERS: usize = 80; -pub const WOW64_MAXIMUM_SUPPORTED_EXTENSION: usize = 512; -#[repr(C)] #[derive(Copy)] -pub struct WOW64_FLOATING_SAVE_AREA { - pub ControlWord: ::DWORD, - pub StatusWord: ::DWORD, - pub TagWord: ::DWORD, - pub ErrorOffset: ::DWORD, - pub ErrorSelector: ::DWORD, - pub DataOffset: ::DWORD, - pub DataSelector: ::DWORD, - pub RegisterArea: [::BYTE; WOW64_SIZE_OF_80387_REGISTERS], - pub Cr0NpxState: ::DWORD, -} -impl Clone for WOW64_FLOATING_SAVE_AREA { fn clone(&self) -> WOW64_FLOATING_SAVE_AREA { *self } } -pub type PWOW64_FLOATING_SAVE_AREA = *mut WOW64_FLOATING_SAVE_AREA; -#[repr(C)] #[derive(Copy)] -pub struct WOW64_CONTEXT { - pub ContextFlags: ::DWORD, - pub Dr0: ::DWORD, - pub Dr1: ::DWORD, - pub Dr2: ::DWORD, - pub Dr3: ::DWORD, - pub Dr4: ::DWORD, - pub Dr5: ::DWORD, - pub Dr6: ::DWORD, - pub Dr7: ::DWORD, - pub FloatSave: WOW64_FLOATING_SAVE_AREA, - pub SegGs: ::DWORD, - pub SegFs: ::DWORD, - pub SegEs: ::DWORD, - pub SegDs: ::DWORD, - pub Edi: ::DWORD, - pub Esi: ::DWORD, - pub Ebx: ::DWORD, - pub Edx: ::DWORD, - pub Ecx: ::DWORD, - pub Eax: ::DWORD, - pub Ebp: ::DWORD, - pub Eip: ::DWORD, - pub SegCs: ::DWORD, - pub EFlags: ::DWORD, - pub Esp: ::DWORD, - pub SegSs: ::DWORD, - pub ExtendedRegisters: [::BYTE; WOW64_MAXIMUM_SUPPORTED_EXTENSION], -} -impl Clone for WOW64_CONTEXT { fn clone(&self) -> WOW64_CONTEXT { *self } } -pub type PWOW64_CONTEXT = *mut WOW64_CONTEXT; -STRUCT!{struct WOW64_LDT_ENTRY_Bytes { - BaseMid: ::BYTE, - Flags1: ::BYTE, - Flags2: ::BYTE, - BaseHi: ::BYTE, -}} -STRUCT!{struct WOW64_LDT_ENTRY_Bits { - BitFields: ::DWORD, -}} -BITFIELD!(WOW64_LDT_ENTRY_Bits BitFields: ::DWORD [ - BaseMid set_BaseMid[0..8], - Type set_Type[8..13], - Dpl set_Dpl[13..15], - Pres set_Pres[15..16], - LimitHi set_LimitHi[16..20], - Sys set_Sys[20..21], - Reserved_0 set_Reserved_0[21..22], - Default_Big set_Default_Big[22..23], - Granularity set_Granularity[23..24], - BaseHi set_BaseHi[24..32], -]); -STRUCT!{struct WOW64_LDT_ENTRY { - LimitLow: ::WORD, - BaseLow: ::WORD, - HighWord: ::DWORD, -}} -UNION!(WOW64_LDT_ENTRY, HighWord, Bytes, Bytes_mut, WOW64_LDT_ENTRY_Bytes); -UNION!(WOW64_LDT_ENTRY, HighWord, Bits, Bits_mut, WOW64_LDT_ENTRY_Bits); -pub type PWOW64_LDT_ENTRY = *mut WOW64_LDT_ENTRY; diff --git a/deps/winapi-0.2.5/src/winscard.rs b/deps/winapi-0.2.5/src/winscard.rs deleted file mode 100644 index 605ef89c5..000000000 --- a/deps/winapi-0.2.5/src/winscard.rs +++ /dev/null @@ -1,287 +0,0 @@ -// Copyright © 2015, skdltmxn -// Licensed under the MIT License <LICENSE.md> -//! Data Protection API Prototypes and Definitions -// This header file provides the definitions and symbols necessary for an -// Application or Smart Card Service Provider to access the Smartcard Subsystem. -pub type LPCBYTE = *const ::BYTE; -pub type SCARDCONTEXT = ::ULONG_PTR; -pub type PSCARDCONTEXT = *mut SCARDCONTEXT; -pub type LPSCARDCONTEXT = *mut SCARDCONTEXT; -pub type SCARDHANDLE = ::ULONG_PTR; -pub type PSCARDHANDLE = *mut SCARDHANDLE; -pub type LPSCARDHANDLE = *mut SCARDHANDLE; -pub const SCARD_AUTOALLOCATE: ::DWORD = -1i32 as ::DWORD; -pub const SCARD_SCOPE_USER: ::DWORD = 0; -pub const SCARD_SCOPE_TERMINAL: ::DWORD = 1; -pub const SCARD_SCOPE_SYSTEM: ::DWORD = 2; -pub const SCARD_PROVIDER_PRIMARY: ::DWORD = 1; -pub const SCARD_PROVIDER_CSP: ::DWORD = 2; -pub const SCARD_PROVIDER_KSP: ::DWORD = 3; -#[repr(C)] #[derive(Copy)] -pub struct SCARD_READERSTATEA { - pub szReader: ::LPCSTR, - pub pvUserData: ::LPVOID, - pub dwCurrentState: ::DWORD, - pub dwEventState: ::DWORD, - pub cbAtr: ::DWORD, - pub rgbAtr: [::BYTE; 36], -} -impl Clone for SCARD_READERSTATEA { fn clone(&self) -> SCARD_READERSTATEA { *self } } -pub type PSCARD_READERSTATEA = *mut SCARD_READERSTATEA; -pub type LPSCARD_READERSTATEA = *mut SCARD_READERSTATEA; -#[repr(C)] #[derive(Copy)] -pub struct SCARD_READERSTATEW { - pub szReader: ::LPCWSTR, - pub pvUserData: ::LPVOID, - pub dwCurrentState: ::DWORD, - pub dwEventState: ::DWORD, - pub cbAtr: ::DWORD, - pub rgbAtr: [::BYTE; 36], -} -impl Clone for SCARD_READERSTATEW { fn clone(&self) -> SCARD_READERSTATEW { *self } } -pub type PSCARD_READERSTATEW = *mut SCARD_READERSTATEW; -pub type LPSCARD_READERSTATEW = *mut SCARD_READERSTATEW; -pub type SCARD_READERSTATE_A = SCARD_READERSTATEA; -pub type SCARD_READERSTATE_W = SCARD_READERSTATEW; -pub type PSCARD_READERSTATE_A = PSCARD_READERSTATEA; -pub type PSCARD_READERSTATE_W = PSCARD_READERSTATEW; -pub type LPSCARD_READERSTATE_A = LPSCARD_READERSTATEA; -pub type LPSCARD_READERSTATE_W = LPSCARD_READERSTATEW; -pub const SCARD_STATE_UNAWARE: ::DWORD = 0x00000000; -pub const SCARD_STATE_IGNORE: ::DWORD = 0x00000001; -pub const SCARD_STATE_CHANGED: ::DWORD = 0x00000002; -pub const SCARD_STATE_UNKNOWN: ::DWORD = 0x00000004; -pub const SCARD_STATE_UNAVAILABLE: ::DWORD = 0x00000008; -pub const SCARD_STATE_EMPTY: ::DWORD = 0x00000010; -pub const SCARD_STATE_PRESENT: ::DWORD = 0x00000020; -pub const SCARD_STATE_ATRMATCH: ::DWORD = 0x00000040; -pub const SCARD_STATE_EXCLUSIVE: ::DWORD = 0x00000080; -pub const SCARD_STATE_INUSE: ::DWORD = 0x00000100; -pub const SCARD_STATE_MUTE: ::DWORD = 0x00000200; -pub const SCARD_STATE_UNPOWERED: ::DWORD = 0x00000400; -#[repr(C)] #[derive(Copy)] -pub struct SCARD_ATRMASK { - pub cbAtr: ::DWORD, - pub rgbAtr: [::BYTE; 36], - pub rgbMask: [::BYTE; 36], -} -impl Clone for SCARD_ATRMASK { fn clone(&self) -> SCARD_ATRMASK { *self } } -pub type PSCARD_ATRMASK = *mut SCARD_ATRMASK; -pub type LPSCARD_ATRMASK = *mut SCARD_ATRMASK; -pub const SCARD_SHARE_EXCLUSIVE: ::DWORD = 1; -pub const SCARD_SHARE_SHARED: ::DWORD = 2; -pub const SCARD_SHARE_DIRECT: ::DWORD = 3; -pub const SCARD_LEAVE_CARD: ::DWORD = 0; -pub const SCARD_RESET_CARD: ::DWORD = 1; -pub const SCARD_UNPOWER_CARD: ::DWORD = 2; -pub const SCARD_EJECT_CARD: ::DWORD = 3; -pub const SC_DLG_MINIMAL_UI: ::DWORD = 0x01; -pub const SC_DLG_NO_UI: ::DWORD = 0x02; -pub const SC_DLG_FORCE_UI: ::DWORD = 0x04; -pub const SCERR_NOCARDNAME: ::DWORD = 0x4000; -pub const SCERR_NOGUIDS: ::DWORD = 0x8000; -pub type LPOCNCONNPROCA = Option<unsafe extern "system" fn( - SCARDCONTEXT, ::LPSTR, ::LPSTR, ::PVOID, -) -> SCARDHANDLE>; -pub type LPOCNCONNPROCW = Option<unsafe extern "system" fn( - SCARDCONTEXT, ::LPWSTR, ::LPWSTR, ::PVOID, -) -> SCARDHANDLE>; -pub type LPOCNCHKPROC = Option<unsafe extern "system" fn( - SCARDCONTEXT, SCARDHANDLE, ::PVOID, -) -> ::BOOL>; -pub type LPOCNDSCPROC = Option<unsafe extern "system" fn(SCARDCONTEXT, SCARDHANDLE, ::PVOID)>; -#[repr(C)] #[derive(Copy)] -pub struct OPENCARD_SEARCH_CRITERIAA { - pub dwStructSize: ::DWORD, - pub lpstrGroupNames: ::LPSTR, - pub nMaxGroupNames: ::DWORD, - pub rgguidInterfaces: ::LPCGUID, - pub cguidInterfaces: ::DWORD, - pub lpstrCardNames: ::LPSTR, - pub nMaxCardNames: ::DWORD, - pub lpfnCheck: LPOCNCHKPROC, - pub lpfnConnect: LPOCNCONNPROCA, - pub lpfnDisconnect: LPOCNDSCPROC, - pub pvUserData: ::LPVOID, - pub dwShareMode: ::DWORD, - pub dwPreferredProtocols: ::DWORD, -} -impl Clone for OPENCARD_SEARCH_CRITERIAA { fn clone(&self) -> OPENCARD_SEARCH_CRITERIAA { *self } } -pub type POPENCARD_SEARCH_CRITERIAA = *mut OPENCARD_SEARCH_CRITERIAA; -pub type LPOPENCARD_SEARCH_CRITERIAA = *mut OPENCARD_SEARCH_CRITERIAA; -#[repr(C)] #[derive(Copy)] -pub struct OPENCARD_SEARCH_CRITERIAW { - pub dwStructSize: ::DWORD, - pub lpstrGroupNames: ::LPWSTR, - pub nMaxGroupNames: ::DWORD, - pub rgguidInterfaces: ::LPCGUID, - pub cguidInterfaces: ::DWORD, - pub lpstrCardNames: ::LPWSTR, - pub nMaxCardNames: ::DWORD, - pub lpfnCheck: LPOCNCHKPROC, - pub lpfnConnect: LPOCNCONNPROCW, - pub lpfnDisconnect: LPOCNDSCPROC, - pub pvUserData: ::LPVOID, - pub dwShareMode: ::DWORD, - pub dwPreferredProtocols: ::DWORD, -} -impl Clone for OPENCARD_SEARCH_CRITERIAW { fn clone(&self) -> OPENCARD_SEARCH_CRITERIAW { *self } } -pub type POPENCARD_SEARCH_CRITERIAW = *mut OPENCARD_SEARCH_CRITERIAW; -pub type LPOPENCARD_SEARCH_CRITERIAW = *mut OPENCARD_SEARCH_CRITERIAW; -#[repr(C)] #[derive(Copy)] -pub struct OPENCARDNAME_EXA { - pub dwStructSize: ::DWORD, - pub hSCardContext: SCARDCONTEXT, - pub hwndOwner: ::HWND, - pub dwFlags: ::DWORD, - pub lpstrTitle: ::LPCSTR, - pub lpstrSearchDesc: ::LPCSTR, - pub hIcon: ::HICON, - pub pOpenCardSearchCriteria: POPENCARD_SEARCH_CRITERIAA, - pub lpfnConnect: LPOCNCONNPROCA, - pub pvUserData: ::LPVOID, - pub dwShareMode: ::DWORD, - pub dwPreferredProtocols: ::DWORD, - pub lpstrRdr: ::LPSTR, - pub nMaxRdr: ::DWORD, - pub lpstrCard: ::LPSTR, - pub nMaxCard: ::DWORD, - pub dwActiveProtocol: ::DWORD, - pub hCardHandle: SCARDHANDLE, -} -impl Clone for OPENCARDNAME_EXA { fn clone(&self) -> OPENCARDNAME_EXA { *self } } -pub type POPENCARDNAME_EXA = *mut OPENCARDNAME_EXA; -pub type LPOPENCARDNAME_EXA = *mut OPENCARDNAME_EXA; -#[repr(C)] #[derive(Copy)] -pub struct OPENCARDNAME_EXW { - pub dwStructSize: ::DWORD, - pub hSCardContext: SCARDCONTEXT, - pub hwndOwner: ::HWND, - pub dwFlags: ::DWORD, - pub lpstrTitle: ::LPCWSTR, - pub lpstrSearchDesc: ::LPCWSTR, - pub hIcon: ::HICON, - pub pOpenCardSearchCriteria: POPENCARD_SEARCH_CRITERIAW, - pub lpfnConnect: LPOCNCONNPROCW, - pub pvUserData: ::LPVOID, - pub dwShareMode: ::DWORD, - pub dwPreferredProtocols: ::DWORD, - pub lpstrRdr: ::LPWSTR, - pub nMaxRdr: ::DWORD, - pub lpstrCard: ::LPWSTR, - pub nMaxCard: ::DWORD, - pub dwActiveProtocol: ::DWORD, - pub hCardHandle: SCARDHANDLE, -} -impl Clone for OPENCARDNAME_EXW { fn clone(&self) -> OPENCARDNAME_EXW { *self } } -pub type POPENCARDNAME_EXW = *mut OPENCARDNAME_EXW; -pub type LPOPENCARDNAME_EXW = *mut OPENCARDNAME_EXW; -pub type OPENCARDNAMEA_EX = OPENCARDNAME_EXA; -pub type OPENCARDNAMEW_EX = OPENCARDNAME_EXW; -pub type POPENCARDNAMEA_EX = POPENCARDNAME_EXA; -pub type POPENCARDNAMEW_EX = POPENCARDNAME_EXW; -pub type LPOPENCARDNAMEA_EX = LPOPENCARDNAME_EXA; -pub type LPOPENCARDNAMEW_EX = LPOPENCARDNAME_EXW; -pub const SCARD_READER_SEL_AUTH_PACKAGE: ::DWORD = -629i32 as ::DWORD; -ENUM!{enum READER_SEL_REQUEST_MATCH_TYPE { - RSR_MATCH_TYPE_READER_AND_CONTAINER = 1, - RSR_MATCH_TYPE_SERIAL_NUMBER, - RSR_MATCH_TYPE_ALL_CARDS, -}} -STRUCT!{struct READER_SEL_REQUEST_ReaderAndContainerParameter { - cbReaderNameOffset: ::DWORD, - cchReaderNameLength: ::DWORD, - cbContainerNameOffset: ::DWORD, - cchContainerNameLength: ::DWORD, - dwDesiredCardModuleVersion: ::DWORD, - dwCspFlags: ::DWORD, -}} -STRUCT!{struct READER_SEL_REQUEST_SerialNumberParameter { - cbSerialNumberOffset: ::DWORD, - cbSerialNumberLength: ::DWORD, - dwDesiredCardModuleVersion: ::DWORD, -}} -STRUCT!{struct READER_SEL_REQUEST { - dwShareMode: ::DWORD, - dwPreferredProtocols: ::DWORD, - MatchType: READER_SEL_REQUEST_MATCH_TYPE, - ReaderAndContainerParameter: READER_SEL_REQUEST_ReaderAndContainerParameter, -}} -UNION!( - READER_SEL_REQUEST, ReaderAndContainerParameter, SerialNumberParameter, - SerialNumberParameter_mut, READER_SEL_REQUEST_SerialNumberParameter -); -pub type PREADER_SEL_REQUEST = *mut READER_SEL_REQUEST; -STRUCT!{struct READER_SEL_RESPONSE { - cbReaderNameOffset: ::DWORD, - cchReaderNameLength: ::DWORD, - cbCardNameOffset: ::DWORD, - cchCardNameLength: ::DWORD, -}} -pub type PREADER_SEL_RESPONSE = *mut READER_SEL_RESPONSE; -#[repr(C)] #[derive(Copy)] -pub struct OPENCARDNAMEA { - pub dwStructSize: ::DWORD, - pub hwndOwner: ::HWND, - pub hSCardContext: SCARDCONTEXT, - pub lpstrGroupNames: ::LPSTR, - pub nMaxGroupNames: ::DWORD, - pub lpstrCardNames: ::LPSTR, - pub nMaxCardNames: ::DWORD, - pub rgguidInterfaces: ::LPCGUID, - pub cguidInterfaces: ::DWORD, - pub lpstrRdr: ::LPSTR, - pub nMaxRdr: ::DWORD, - pub lpstrCard: ::LPSTR, - pub nMaxCard: ::DWORD, - pub lpstrTitle: ::LPCSTR, - pub dwFlags: ::DWORD, - pub pvUserData: ::LPVOID, - pub dwShareMode: ::DWORD, - pub dwPreferredProtocols: ::DWORD, - pub dwActiveProtocol: ::DWORD, - pub lpfnConnect: LPOCNCONNPROCA, - pub lpfnCheck: LPOCNCHKPROC, - pub lpfnDisconnect: LPOCNDSCPROC, - pub hCardHandle: SCARDHANDLE, -} -impl Clone for OPENCARDNAMEA { fn clone(&self) -> OPENCARDNAMEA { *self } } -pub type POPENCARDNAMEA = *mut OPENCARDNAMEA; -pub type LPOPENCARDNAMEA = *mut OPENCARDNAMEA; -#[repr(C)] #[derive(Copy)] -pub struct OPENCARDNAMEW { - pub dwStructSize: ::DWORD, - pub hwndOwner: ::HWND, - pub hSCardContext: SCARDCONTEXT, - pub lpstrGroupNames: ::LPWSTR, - pub nMaxGroupNames: ::DWORD, - pub lpstrCardNames: ::LPWSTR, - pub nMaxCardNames: ::DWORD, - pub rgguidInterfaces: ::LPCGUID, - pub cguidInterfaces: ::DWORD, - pub lpstrRdr: ::LPWSTR, - pub nMaxRdr: ::DWORD, - pub lpstrCard: ::LPWSTR, - pub nMaxCard: ::DWORD, - pub lpstrTitle: ::LPCWSTR, - pub dwFlags: ::DWORD, - pub pvUserData: ::LPVOID, - pub dwShareMode: ::DWORD, - pub dwPreferredProtocols: ::DWORD, - pub dwActiveProtocol: ::DWORD, - pub lpfnConnect: LPOCNCONNPROCW, - pub lpfnCheck: LPOCNCHKPROC, - pub lpfnDisconnect: LPOCNDSCPROC, - pub hCardHandle: SCARDHANDLE, -} -impl Clone for OPENCARDNAMEW { fn clone(&self) -> OPENCARDNAMEW { *self } } -pub type POPENCARDNAMEW = *mut OPENCARDNAMEW; -pub type LPOPENCARDNAMEW = *mut OPENCARDNAMEW; -pub type OPENCARDNAME_A = OPENCARDNAMEA; -pub type OPENCARDNAME_W = OPENCARDNAMEW; -pub type POPENCARDNAME_A = POPENCARDNAMEA; -pub type POPENCARDNAME_W = POPENCARDNAMEW; -pub type LPOPENCARDNAME_A = LPOPENCARDNAMEA; -pub type LPOPENCARDNAME_W = LPOPENCARDNAMEW; -pub const SCARD_AUDIT_CHV_FAILURE: ::DWORD = 0x0; -pub const SCARD_AUDIT_CHV_SUCCESS: ::DWORD = 0x1; diff --git a/deps/winapi-0.2.5/src/winsock2.rs b/deps/winapi-0.2.5/src/winsock2.rs deleted file mode 100644 index 41cd1bf26..000000000 --- a/deps/winapi-0.2.5/src/winsock2.rs +++ /dev/null @@ -1,431 +0,0 @@ -// Copyright © 2015, Peter Atashian -// Licensed under the MIT License <LICENSE.md> -//! definitions to be used with the WinSock 2 DLL and WinSock 2 applications. -//! -//! This header file corresponds to version 2.2.x of the WinSock API specification. -pub const WINSOCK_VERSION: ::WORD = 2 | (2 << 8); -pub type u_char = ::c_uchar; -pub type u_short = ::c_ushort; -pub type u_int = ::c_uint; -pub type u_long = ::c_ulong; -pub type u_int64 = ::__uint64; -pub type SOCKET = ::UINT_PTR; -pub type GROUP = ::c_uint; -pub const FD_SETSIZE: usize = 64; -pub const FD_MAX_EVENTS: usize = 10; -#[repr(C)] #[derive(Copy)] -pub struct fd_set { - pub fd_count: u_int, - pub fd_array: [SOCKET; FD_SETSIZE], -} -impl Clone for fd_set { fn clone(&self) -> fd_set { *self } } -STRUCT!{struct timeval { - tv_sec: ::c_long, - tv_usec: ::c_long, -}} -STRUCT!{struct hostent { - h_name: *mut ::c_char, - h_aliases: *mut *mut ::c_char, - h_addrtype: ::c_short, - h_length: ::c_short, - h_addr_list: *mut *mut ::c_char, -}} -STRUCT!{struct netent { - n_name: *mut ::c_char, - n_aliases: *mut *mut ::c_char, - n_addrtype: ::c_short, - n_net: u_long, -}} -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct servent { - pub s_name: *mut ::c_char, - pub s_aliases: *mut *mut ::c_char, - #[cfg(target_arch="x86")] - pub s_port: ::c_short, - #[cfg(target_arch="x86")] - pub s_proto: *mut ::c_char, - #[cfg(target_arch="x86_64")] - pub s_proto: *mut ::c_char, - #[cfg(target_arch="x86_64")] - pub s_port: ::c_short, -} -STRUCT!{struct protoent { - p_name: *mut ::c_char, - p_aliases: *mut *mut ::c_char, - p_proto: ::c_short, -}} -pub const WSADESCRIPTION_LEN: usize = 256; -pub const WSASYS_STATUS_LEN: usize = 128; -#[repr(C)] #[derive(Copy)] -pub struct WSADATA { - pub wVersion: ::WORD, - pub wHighVersion: ::WORD, - #[cfg(target_arch="x86")] - pub szDescription: [::c_char; WSADESCRIPTION_LEN + 1], - #[cfg(target_arch="x86")] - pub szSystemStatus: [::c_char; WSASYS_STATUS_LEN + 1], - pub iMaxSockets: ::c_ushort, - pub iMaxUdpDg: ::c_ushort, - pub lpVendorInfo: *mut ::c_char, - #[cfg(target_arch="x86_64")] - pub szDescription: [::c_char; WSADESCRIPTION_LEN + 1], - #[cfg(target_arch="x86_64")] - pub szSystemStatus: [::c_char; WSASYS_STATUS_LEN + 1], -} -impl Clone for WSADATA { fn clone(&self) -> WSADATA { *self } } -pub type LPWSADATA = *mut WSADATA; -//391 -pub const INVALID_SOCKET: SOCKET = !0; -pub const SOCKET_ERROR: ::c_int = -1; -STRUCT!{struct sockproto { - sp_family: u_short, - sp_protocol: u_short, -}} -pub const PF_UNSPEC: ::c_int = ::AF_UNSPEC; -pub const PF_UNIX: ::c_int = ::AF_UNIX; -pub const PF_INET: ::c_int = ::AF_INET; -pub const PF_IMPLINK: ::c_int = ::AF_IMPLINK; -pub const PF_PUP: ::c_int = ::AF_PUP; -pub const PF_CHAOS: ::c_int = ::AF_CHAOS; -pub const PF_NS: ::c_int = ::AF_NS; -pub const PF_IPX: ::c_int = ::AF_IPX; -pub const PF_ISO: ::c_int = ::AF_ISO; -pub const PF_OSI: ::c_int = ::AF_OSI; -pub const PF_ECMA: ::c_int = ::AF_ECMA; -pub const PF_DATAKIT: ::c_int = ::AF_DATAKIT; -pub const PF_CCITT: ::c_int = ::AF_CCITT; -pub const PF_SNA: ::c_int = ::AF_SNA; -pub const PF_DECnet: ::c_int = ::AF_DECnet; -pub const PF_DLI: ::c_int = ::AF_DLI; -pub const PF_LAT: ::c_int = ::AF_LAT; -pub const PF_HYLINK: ::c_int = ::AF_HYLINK; -pub const PF_APPLETALK: ::c_int = ::AF_APPLETALK; -pub const PF_VOICEVIEW: ::c_int = ::AF_VOICEVIEW; -pub const PF_FIREFOX: ::c_int = ::AF_FIREFOX; -pub const PF_UNKNOWN1: ::c_int = ::AF_UNKNOWN1; -pub const PF_BAN: ::c_int = ::AF_BAN; -pub const PF_ATM: ::c_int = ::AF_ATM; -pub const PF_INET6: ::c_int = ::AF_INET6; -pub const PF_BTH: ::c_int = ::AF_BTH; -pub const PF_MAX: ::c_int = ::AF_MAX; -STRUCT!{struct linger { - l_onoff: u_short, - l_linger: u_short, -}} -pub const SOMAXCONN: ::c_int = 0x7fffffff; -pub type WSAEVENT = ::HANDLE; -pub type LPWSAEVENT = ::LPHANDLE; -pub type WSAOVERLAPPED = ::OVERLAPPED; -pub type LPWSAOVERLAPPED = *mut ::OVERLAPPED; -pub const WSA_IO_PENDING: ::DWORD = ::ERROR_IO_PENDING; -pub const WSA_IO_INCOMPLETE: ::DWORD = ::ERROR_IO_INCOMPLETE; -pub const WSA_INVALID_HANDLE: ::DWORD = ::ERROR_INVALID_HANDLE; -pub const WSA_INVALID_PARAMETER: ::DWORD = ::ERROR_INVALID_PARAMETER; -pub const WSA_NOT_ENOUGH_MEMORY: ::DWORD = ::ERROR_NOT_ENOUGH_MEMORY; -pub const WSA_OPERATION_ABORTED: ::DWORD = ::ERROR_OPERATION_ABORTED; -STRUCT!{struct QOS { - SendingFlowspec: ::FLOWSPEC, - FLOWSPEC: ::FLOWSPEC, - ProviderSpecific: ::WSABUF, -}} -pub type LPQOS = *mut QOS; -STRUCT!{struct WSANETWORKEVENTS { - lNetworkEvents: ::c_long, - iErrorCode: [::c_int; FD_MAX_EVENTS], -}} -pub type LPWSANETWORKEVENTS = *mut WSANETWORKEVENTS; -pub const MAX_PROTOCOL_CHAIN: usize = 7; -STRUCT!{struct WSAPROTOCOLCHAIN { - ChainLen: ::c_int, - ChainEntries: [::DWORD; MAX_PROTOCOL_CHAIN], -}} -pub type LPWSAPROTOCOLCHAIN = *mut WSAPROTOCOLCHAIN; -pub const WSAPROTOCOL_LEN: usize = 255; -#[repr(C)] #[derive(Copy)] -pub struct WSAPROTOCOL_INFOA { - pub dwServiceFlags1: ::DWORD, - pub dwServiceFlags2: ::DWORD, - pub dwServiceFlags3: ::DWORD, - pub dwServiceFlags4: ::DWORD, - pub dwServiceFlags5: ::DWORD, - pub ProviderId: ::GUID, - pub dwCatalogEntryId: ::DWORD, - pub ProtocolChain: WSAPROTOCOLCHAIN, - pub iVersion: ::c_int, - pub iAddressFamily: ::c_int, - pub iMaxSockAddr: ::c_int, - pub iMinSockAddr: ::c_int, - pub iSocketType: ::c_int, - pub iProtocol: ::c_int, - pub iProtocolMaxOffset: ::c_int, - pub iNetworkByteOrder: ::c_int, - pub iSecurityScheme: ::c_int, - pub dwMessageSize: ::DWORD, - pub dwProviderReserved: ::DWORD, - pub szProtocol: [::CHAR; WSAPROTOCOL_LEN + 1], -} -impl Clone for WSAPROTOCOL_INFOA { fn clone(&self) -> WSAPROTOCOL_INFOA { *self } } -pub type LPWSAPROTOCOL_INFOA = *mut WSAPROTOCOL_INFOA; -#[repr(C)] #[derive(Copy)] -pub struct WSAPROTOCOL_INFOW { - pub dwServiceFlags1: ::DWORD, - pub dwServiceFlags2: ::DWORD, - pub dwServiceFlags3: ::DWORD, - pub dwServiceFlags4: ::DWORD, - pub dwServiceFlags5: ::DWORD, - pub ProviderId: ::GUID, - pub dwCatalogEntryId: ::DWORD, - pub ProtocolChain: WSAPROTOCOLCHAIN, - pub iVersion: ::c_int, - pub iAddressFamily: ::c_int, - pub iMaxSockAddr: ::c_int, - pub iMinSockAddr: ::c_int, - pub iSocketType: ::c_int, - pub iProtocol: ::c_int, - pub iProtocolMaxOffset: ::c_int, - pub iNetworkByteOrder: ::c_int, - pub iSecurityScheme: ::c_int, - pub dwMessageSize: ::DWORD, - pub dwProviderReserved: ::DWORD, - pub szProtocol: [::WCHAR; WSAPROTOCOL_LEN + 1], -} -impl Clone for WSAPROTOCOL_INFOW { fn clone(&self) -> WSAPROTOCOL_INFOW { *self } } -pub type LPWSAPROTOCOL_INFOW = *mut WSAPROTOCOL_INFOW; -pub type LPCONDITIONPROC = Option<unsafe extern "system" fn( - lpCallerId: ::LPWSABUF, lpCallerData: ::LPWSABUF, lpSQOS: LPQOS, lpGQOS: LPQOS, - lpCalleeId: ::LPWSABUF, lpCalleeData: ::LPWSABUF, g: *mut GROUP, dwCallbackData: ::DWORD, -) -> ::c_int>; -pub type LPWSAOVERLAPPED_COMPLETION_ROUTINE = Option<unsafe extern "system" fn( - dwError: ::DWORD, cbTransferred: ::DWORD, lpOverlapped: LPWSAOVERLAPPED, dwFlags: ::DWORD, -)>; -ENUM!{enum WSACOMPLETIONTYPE { - NSP_NOTIFY_IMMEDIATELY = 0, - NSP_NOTIFY_HWND, - NSP_NOTIFY_EVENT, - NSP_NOTIFY_PORT, - NSP_NOTIFY_APC, -}} -pub type PWSACOMPLETIONTYPE = *mut WSACOMPLETIONTYPE; -pub type LPWSACOMPLETIONTYPE = *mut WSACOMPLETIONTYPE; -STRUCT!{struct WSACOMPLETION_WindowMessage { - hWnd: ::HWND, - uMsg: ::UINT, - context: ::WPARAM, -}} -STRUCT!{struct WSACOMPLETION_Event { - lpOverlapped: LPWSAOVERLAPPED, -}} -#[repr(C)] #[derive(Copy)] -pub struct WSACOMPLETION_Apc { - pub lpOverlapped: LPWSAOVERLAPPED, - pub lpfnCompletionProc: LPWSAOVERLAPPED_COMPLETION_ROUTINE -} -impl Clone for WSACOMPLETION_Apc { fn clone(&self) -> WSACOMPLETION_Apc { *self } } -STRUCT!{struct WSACOMPLETION_Port { - lpOverlapped: LPWSAOVERLAPPED, - hPort: ::HANDLE, - Key: ::ULONG_PTR, -}} -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct WSACOMPLETION { - pub Type: WSACOMPLETIONTYPE, - #[cfg(target_arch="x86")] - pub Parameters: [u8; 12], - #[cfg(target_arch="x86_64")] - pub Parameters: [u8; 24], -} -UNION!(WSACOMPLETION, Parameters, WindowMessage, WindowMessage_mut, WSACOMPLETION_WindowMessage); -UNION!(WSACOMPLETION, Parameters, Event, Event_mut, WSACOMPLETION_Event); -UNION!(WSACOMPLETION, Parameters, Apc, Apc_mut, WSACOMPLETION_Apc); -UNION!(WSACOMPLETION, Parameters, Port, Port_mut, WSACOMPLETION_Port); -pub type PWSACOMPLETION = *mut WSACOMPLETION; -pub type LPWSACOMPLETION = *mut WSACOMPLETION; -STRUCT!{struct AFPROTOCOLS { - iAddressFamily: ::INT, - iProtocol: ::INT, -}} -pub type PAFPROTOCOLS = *mut AFPROTOCOLS; -pub type LPAFPROTOCOLS = *mut AFPROTOCOLS; -ENUM!{enum WSAECOMPARATOR { - COMP_EQUAL = 0, - COMP_NOTLESS, -}} -pub type PWSAECOMPARATOR = *mut WSAECOMPARATOR; -pub type LPWSAECOMPARATOR = *mut WSAECOMPARATOR; -STRUCT!{struct WSAVERSION { - dwVersion: ::DWORD, - ecHow: WSAECOMPARATOR, -}} -pub type PWSAVERSION = *mut WSAVERSION; -pub type LPWSAVERSION = *mut WSAVERSION; -STRUCT!{struct WSAQUERYSETA { - dwSize: ::DWORD, - lpszServiceInstanceName: ::LPSTR, - lpServiceClassId: ::LPGUID, - lpVersion: LPWSAVERSION, - lpszComment: ::LPSTR, - dwNameSpace: ::DWORD, - lpNSProviderId: ::LPGUID, - lpszContext: ::LPSTR, - dwNumberOfProtocols: ::DWORD, - lpafpProtocols: LPAFPROTOCOLS, - lpszQueryString: ::LPSTR, - dwNumberOfCsAddrs: ::DWORD, - lpcsaBuffer: ::LPCSADDR_INFO, - dwOutputFlags: ::DWORD, - lpBlob: ::LPBLOB, -}} -pub type PWSAQUERYSETA = *mut WSAQUERYSETA; -pub type LPWSAQUERYSETA = *mut WSAQUERYSETA; -STRUCT!{struct WSAQUERYSETW { - dwSize: ::DWORD, - lpszServiceInstanceName: ::LPWSTR, - lpServiceClassId: ::LPGUID, - lpVersion: LPWSAVERSION, - lpszComment: ::LPWSTR, - dwNameSpace: ::DWORD, - lpNSProviderId: ::LPGUID, - lpszContext: ::LPWSTR, - dwNumberOfProtocols: ::DWORD, - lpafpProtocols: LPAFPROTOCOLS, - lpszQueryString: ::LPWSTR, - dwNumberOfCsAddrs: ::DWORD, - lpcsaBuffer: ::LPCSADDR_INFO, - dwOutputFlags: ::DWORD, - lpBlob: ::LPBLOB, -}} -pub type PWSAQUERYSETW = *mut WSAQUERYSETW; -pub type LPWSAQUERYSETW = *mut WSAQUERYSETW; -STRUCT!{struct WSAQUERYSET2A { - dwSize: ::DWORD, - lpszServiceInstanceName: ::LPSTR, - lpVersion: LPWSAVERSION, - lpszComment: ::LPSTR, - dwNameSpace: ::DWORD, - lpNSProviderId: ::LPGUID, - lpszContext: ::LPSTR, - dwNumberOfProtocols: ::DWORD, - lpafpProtocols: LPAFPROTOCOLS, - lpszQueryString: ::LPSTR, - dwNumberOfCsAddrs: ::DWORD, - lpcsaBuffer: ::LPCSADDR_INFO, - dwOutputFlags: ::DWORD, - lpBlob: ::LPBLOB, -}} -pub type PWSAQUERYSET2A = *mut WSAQUERYSET2A; -pub type LPWSAQUERYSET2A = *mut WSAQUERYSET2A; -STRUCT!{struct WSAQUERYSET2W { - dwSize: ::DWORD, - lpszServiceInstanceName: ::LPWSTR, - lpVersion: LPWSAVERSION, - lpszComment: ::LPWSTR, - dwNameSpace: ::DWORD, - lpNSProviderId: ::LPGUID, - lpszContext: ::LPWSTR, - dwNumberOfProtocols: ::DWORD, - lpafpProtocols: LPAFPROTOCOLS, - lpszQueryString: ::LPWSTR, - dwNumberOfCsAddrs: ::DWORD, - lpcsaBuffer: ::LPCSADDR_INFO, - dwOutputFlags: ::DWORD, - lpBlob: ::LPBLOB, -}} -pub type PWSAQUERYSET2W = *mut WSAQUERYSET2W; -pub type LPWSAQUERYSET2W = *mut WSAQUERYSET2W; -ENUM!{enum WSAESETSERVICEOP { - RNRSERVICE_REGISTER = 0, - RNRSERVICE_DEREGISTER, - RNRSERVICE_DELETE, -}} -pub type PWSAESETSERVICEOP = *mut WSAESETSERVICEOP; -pub type LPWSAESETSERVICEOP = *mut WSAESETSERVICEOP; -STRUCT!{struct WSANSCLASSINFOA { - lpszName: ::LPSTR, - dwNameSpace: ::DWORD, - dwValueType: ::DWORD, - dwValueSize: ::DWORD, - lpValue: ::LPVOID, -}} -pub type PWSANSCLASSINFOA = *mut WSANSCLASSINFOA; -pub type LPWSANSCLASSINFOA = *mut WSANSCLASSINFOA; -STRUCT!{struct WSANSCLASSINFOW { - lpszName: ::LPWSTR, - dwNameSpace: ::DWORD, - dwValueType: ::DWORD, - dwValueSize: ::DWORD, - lpValue: ::LPVOID, -}} -pub type PWSANSCLASSINFOW = *mut WSANSCLASSINFOW; -pub type LPWSANSCLASSINFOW = *mut WSANSCLASSINFOW; -STRUCT!{struct WSASERVICECLASSINFOA { - lpServiceClassId: ::LPGUID, - lpszServiceClassName: ::LPSTR, - dwCount: ::DWORD, - lpClassInfos: LPWSANSCLASSINFOA, -}} -pub type PWSASERVICECLASSINFOA = *mut WSASERVICECLASSINFOA; -pub type LPWSASERVICECLASSINFOA = *mut WSASERVICECLASSINFOA; -STRUCT!{struct WSASERVICECLASSINFOW { - lpServiceClassId: ::LPGUID, - lpszServiceClassName: ::LPWSTR, - dwCount: ::DWORD, - lpClassInfos: LPWSANSCLASSINFOW, -}} -pub type PWSASERVICECLASSINFOW = *mut WSASERVICECLASSINFOW; -pub type LPWSASERVICECLASSINFOW = *mut WSASERVICECLASSINFOW; -STRUCT!{struct WSANAMESPACE_INFOA { - NSProviderId: ::GUID, - dwNameSpace: ::DWORD, - fActive: ::BOOL, - dwVersion: ::DWORD, - lpszIdentifier: ::LPSTR, -}} -pub type PWSANAMESPACE_INFOA = *mut WSANAMESPACE_INFOA; -pub type LPWSANAMESPACE_INFOA = *mut WSANAMESPACE_INFOA; -STRUCT!{struct WSANAMESPACE_INFOW { - NSProviderId: ::GUID, - dwNameSpace: ::DWORD, - fActive: ::BOOL, - dwVersion: ::DWORD, - lpszIdentifier: ::LPWSTR, -}} -pub type PWSANAMESPACE_INFOW = *mut WSANAMESPACE_INFOW; -pub type LPWSANAMESPACE_INFOW = *mut WSANAMESPACE_INFOW; -STRUCT!{struct WSANAMESPACE_INFOEXA { - NSProviderId: ::GUID, - dwNameSpace: ::DWORD, - fActive: ::BOOL, - dwVersion: ::DWORD, - lpszIdentifier: ::LPSTR, - ProviderSpecific: ::BLOB, -}} -pub type PWSANAMESPACE_INFOEXA = *mut WSANAMESPACE_INFOEXA; -pub type LPWSANAMESPACE_INFOEXA = *mut WSANAMESPACE_INFOEXA; -STRUCT!{struct WSANAMESPACE_INFOEXW { - NSProviderId: ::GUID, - dwNameSpace: ::DWORD, - fActive: ::BOOL, - dwVersion: ::DWORD, - lpszIdentifier: ::LPWSTR, - ProviderSpecific: ::BLOB, -}} -pub type PWSANAMESPACE_INFOEXW = *mut WSANAMESPACE_INFOEXW; -pub type LPWSANAMESPACE_INFOEXW = *mut WSANAMESPACE_INFOEXW; -pub const POLLRDNORM: ::SHORT = 0x0100; -pub const POLLRDBAND: ::SHORT = 0x0200; -pub const POLLIN: ::SHORT = POLLRDNORM | POLLRDBAND; -pub const POLLPRI: ::SHORT = 0x0400; -pub const POLLWRNORM: ::SHORT = 0x0010; -pub const POLLOUT: ::SHORT = POLLWRNORM; -pub const POLLWRBAND: ::SHORT = 0x0020; -pub const POLLERR: ::SHORT = 0x0001; -pub const POLLHUP: ::SHORT = 0x0002; -pub const POLLNVAL: ::SHORT = 0x0004; -STRUCT!{struct WSAPOLLFD { - fd: ::SOCKET, - events: ::SHORT, - revents: ::SHORT, -}} -pub type PWSAPOLLFD = *mut WSAPOLLFD; -pub type LPWSAPOLLFD = *mut WSAPOLLFD; -pub const FIONBIO: ::c_ulong = 0x8004667e; diff --git a/deps/winapi-0.2.5/src/winsvc.rs b/deps/winapi-0.2.5/src/winsvc.rs deleted file mode 100644 index 0d1205da9..000000000 --- a/deps/winapi-0.2.5/src/winsvc.rs +++ /dev/null @@ -1,204 +0,0 @@ -// Copyright © 2015, Peter Atashian -// Licensed under the MIT License <LICENSE.md> -//! Header file for the Service Control Manager -//80 -pub const SERVICE_NO_CHANGE: ::DWORD = 0xffffffff; -pub const SERVICE_ACTIVE: ::DWORD = 0x00000001; -pub const SERVICE_INACTIVE: ::DWORD = 0x00000002; -pub const SERVICE_STATE_ALL: ::DWORD = SERVICE_ACTIVE | SERVICE_INACTIVE; -pub const SERVICE_CONTROL_STOP: ::DWORD = 0x00000001; -pub const SERVICE_CONTROL_PAUSE: ::DWORD = 0x00000002; -pub const SERVICE_CONTROL_CONTINUE: ::DWORD = 0x00000003; -pub const SERVICE_CONTROL_INTERROGATE: ::DWORD = 0x00000004; -pub const SERVICE_CONTROL_SHUTDOWN: ::DWORD = 0x00000005; -pub const SERVICE_CONTROL_PARAMCHANGE: ::DWORD = 0x00000006; -pub const SERVICE_CONTROL_NETBINDADD: ::DWORD = 0x00000007; -pub const SERVICE_CONTROL_NETBINDREMOVE: ::DWORD = 0x00000008; -pub const SERVICE_CONTROL_NETBINDENABLE: ::DWORD = 0x00000009; -pub const SERVICE_CONTROL_NETBINDDISABLE: ::DWORD = 0x0000000A; -pub const SERVICE_CONTROL_DEVICEEVENT: ::DWORD = 0x0000000B; -pub const SERVICE_CONTROL_HARDWAREPROFILECHANGE: ::DWORD = 0x0000000C; -pub const SERVICE_CONTROL_POWEREVENT: ::DWORD = 0x0000000D; -pub const SERVICE_CONTROL_SESSIONCHANGE: ::DWORD = 0x0000000E; -pub const SERVICE_CONTROL_PRESHUTDOWN: ::DWORD = 0x0000000F; -pub const SERVICE_CONTROL_TIMECHANGE: ::DWORD = 0x00000010; -pub const SERVICE_CONTROL_TRIGGEREVENT: ::DWORD = 0x00000020; -pub const SERVICE_STOPPED: ::DWORD = 0x00000001; -pub const SERVICE_START_PENDING: ::DWORD = 0x00000002; -pub const SERVICE_STOP_PENDING: ::DWORD = 0x00000003; -pub const SERVICE_RUNNING: ::DWORD = 0x00000004; -pub const SERVICE_CONTINUE_PENDING: ::DWORD = 0x00000005; -pub const SERVICE_PAUSE_PENDING: ::DWORD = 0x00000006; -pub const SERVICE_PAUSED: ::DWORD = 0x00000007; -pub const SERVICE_ACCEPT_STOP: ::DWORD = 0x00000001; -pub const SERVICE_ACCEPT_PAUSE_CONTINUE: ::DWORD = 0x00000002; -pub const SERVICE_ACCEPT_SHUTDOWN: ::DWORD = 0x00000004; -pub const SERVICE_ACCEPT_PARAMCHANGE: ::DWORD = 0x00000008; -pub const SERVICE_ACCEPT_NETBINDCHANGE: ::DWORD = 0x00000010; -pub const SERVICE_ACCEPT_HARDWAREPROFILECHANGE: ::DWORD = 0x00000020; -pub const SERVICE_ACCEPT_POWEREVENT: ::DWORD = 0x00000040; -pub const SERVICE_ACCEPT_SESSIONCHANGE: ::DWORD = 0x00000080; -pub const SERVICE_ACCEPT_PRESHUTDOWN: ::DWORD = 0x00000100; -pub const SERVICE_ACCEPT_TIMECHANGE: ::DWORD = 0x00000200; -pub const SERVICE_ACCEPT_TRIGGEREVENT: ::DWORD = 0x00000400; -pub const SC_MANAGER_CONNECT: ::DWORD = 0x0001; -pub const SC_MANAGER_CREATE_SERVICE: ::DWORD = 0x0002; -pub const SC_MANAGER_ENUMERATE_SERVICE: ::DWORD = 0x0004; -pub const SC_MANAGER_LOCK: ::DWORD = 0x0008; -pub const SC_MANAGER_QUERY_LOCK_STATUS: ::DWORD = 0x0010; -pub const SC_MANAGER_MODIFY_BOOT_CONFIG: ::DWORD = 0x0020; -pub const SC_MANAGER_ALL_ACCESS: ::DWORD = ::STANDARD_RIGHTS_REQUIRED | SC_MANAGER_CONNECT - | SC_MANAGER_CREATE_SERVICE | SC_MANAGER_ENUMERATE_SERVICE | SC_MANAGER_LOCK - | SC_MANAGER_QUERY_LOCK_STATUS | SC_MANAGER_MODIFY_BOOT_CONFIG; -pub const SERVICE_QUERY_CONFIG: ::DWORD = 0x0001; -pub const SERVICE_CHANGE_CONFIG: ::DWORD = 0x0002; -pub const SERVICE_QUERY_STATUS: ::DWORD = 0x0004; -pub const SERVICE_ENUMERATE_DEPENDENTS: ::DWORD = 0x0008; -pub const SERVICE_START: ::DWORD = 0x0010; -pub const SERVICE_STOP: ::DWORD = 0x0020; -pub const SERVICE_PAUSE_CONTINUE: ::DWORD = 0x0040; -pub const SERVICE_INTERROGATE: ::DWORD = 0x0080; -pub const SERVICE_USER_DEFINED_CONTROL: ::DWORD = 0x0100; -pub const SERVICE_ALL_ACCESS: ::DWORD = ::STANDARD_RIGHTS_REQUIRED | SERVICE_QUERY_CONFIG - | SERVICE_CHANGE_CONFIG | SERVICE_QUERY_STATUS | SERVICE_ENUMERATE_DEPENDENTS | SERVICE_START - | SERVICE_STOP | SERVICE_PAUSE_CONTINUE | SERVICE_INTERROGATE | SERVICE_USER_DEFINED_CONTROL; -pub const SERVICE_RUNS_IN_SYSTEM_PROCESS: ::DWORD = 0x00000001; -pub const SERVICE_CONFIG_DESCRIPTION: ::DWORD = 1; -pub const SERVICE_CONFIG_FAILURE_ACTIONS: ::DWORD = 2; -pub const SERVICE_CONFIG_DELAYED_AUTO_START_INFO: ::DWORD = 3; -pub const SERVICE_CONFIG_FAILURE_ACTIONS_FLAG: ::DWORD = 4; -pub const SERVICE_CONFIG_SERVICE_SID_INFO: ::DWORD = 5; -pub const SERVICE_CONFIG_REQUIRED_PRIVILEGES_INFO: ::DWORD = 6; -pub const SERVICE_CONFIG_PRESHUTDOWN_INFO: ::DWORD = 7; -pub const SERVICE_CONFIG_TRIGGER_INFO: ::DWORD = 8; -pub const SERVICE_CONFIG_PREFERRED_NODE: ::DWORD = 9; -pub const SERVICE_CONFIG_LAUNCH_PROTECTED: ::DWORD = 12; -pub const SERVICE_NOTIFY_STATUS_CHANGE_1: ::DWORD = 1; -pub const SERVICE_NOTIFY_STATUS_CHANGE_2: ::DWORD = 2; -pub const SERVICE_NOTIFY_STATUS_CHANGE: ::DWORD = SERVICE_NOTIFY_STATUS_CHANGE_2; -pub const SERVICE_NOTIFY_STOPPED: ::DWORD = 0x00000001; -pub const SERVICE_NOTIFY_START_PENDING: ::DWORD = 0x00000002; -pub const SERVICE_NOTIFY_STOP_PENDING: ::DWORD = 0x00000004; -pub const SERVICE_NOTIFY_RUNNING: ::DWORD = 0x00000008; -pub const SERVICE_NOTIFY_CONTINUE_PENDING: ::DWORD = 0x00000010; -pub const SERVICE_NOTIFY_PAUSE_PENDING: ::DWORD = 0x00000020; -pub const SERVICE_NOTIFY_PAUSED: ::DWORD = 0x00000040; -pub const SERVICE_NOTIFY_CREATED: ::DWORD = 0x00000080; -pub const SERVICE_NOTIFY_DELETED: ::DWORD = 0x00000100; -pub const SERVICE_NOTIFY_DELETE_PENDING: ::DWORD = 0x00000200; -pub const SERVICE_STOP_REASON_FLAG_MIN: ::DWORD = 0x00000000; -pub const SERVICE_STOP_REASON_FLAG_UNPLANNED: ::DWORD = 0x10000000; -pub const SERVICE_STOP_REASON_FLAG_CUSTOM: ::DWORD = 0x20000000; -pub const SERVICE_STOP_REASON_FLAG_PLANNED: ::DWORD = 0x40000000; -pub const SERVICE_STOP_REASON_FLAG_MAX: ::DWORD = 0x80000000; -pub const SERVICE_STOP_REASON_MAJOR_MIN: ::DWORD = 0x00000000; -pub const SERVICE_STOP_REASON_MAJOR_OTHER: ::DWORD = 0x00010000; -pub const SERVICE_STOP_REASON_MAJOR_HARDWARE: ::DWORD = 0x00020000; -pub const SERVICE_STOP_REASON_MAJOR_OPERATINGSYSTEM: ::DWORD = 0x00030000; -pub const SERVICE_STOP_REASON_MAJOR_SOFTWARE: ::DWORD = 0x00040000; -pub const SERVICE_STOP_REASON_MAJOR_APPLICATION: ::DWORD = 0x00050000; -pub const SERVICE_STOP_REASON_MAJOR_NONE: ::DWORD = 0x00060000; -pub const SERVICE_STOP_REASON_MAJOR_MAX: ::DWORD = 0x00070000; -pub const SERVICE_STOP_REASON_MAJOR_MIN_CUSTOM: ::DWORD = 0x00400000; -pub const SERVICE_STOP_REASON_MAJOR_MAX_CUSTOM: ::DWORD = 0x00ff0000; -pub const SERVICE_STOP_REASON_MINOR_MIN: ::DWORD = 0x00000000; -pub const SERVICE_STOP_REASON_MINOR_OTHER: ::DWORD = 0x00000001; -pub const SERVICE_STOP_REASON_MINOR_MAINTENANCE: ::DWORD = 0x00000002; -pub const SERVICE_STOP_REASON_MINOR_INSTALLATION: ::DWORD = 0x00000003; -pub const SERVICE_STOP_REASON_MINOR_UPGRADE: ::DWORD = 0x00000004; -pub const SERVICE_STOP_REASON_MINOR_RECONFIG: ::DWORD = 0x00000005; -pub const SERVICE_STOP_REASON_MINOR_HUNG: ::DWORD = 0x00000006; -pub const SERVICE_STOP_REASON_MINOR_UNSTABLE: ::DWORD = 0x00000007; -pub const SERVICE_STOP_REASON_MINOR_DISK: ::DWORD = 0x00000008; -pub const SERVICE_STOP_REASON_MINOR_NETWORKCARD: ::DWORD = 0x00000009; -pub const SERVICE_STOP_REASON_MINOR_ENVIRONMENT: ::DWORD = 0x0000000a; -pub const SERVICE_STOP_REASON_MINOR_HARDWARE_DRIVER: ::DWORD = 0x0000000b; -pub const SERVICE_STOP_REASON_MINOR_OTHERDRIVER: ::DWORD = 0x0000000c; -pub const SERVICE_STOP_REASON_MINOR_SERVICEPACK: ::DWORD = 0x0000000d; -pub const SERVICE_STOP_REASON_MINOR_SOFTWARE_UPDATE: ::DWORD = 0x0000000e; -pub const SERVICE_STOP_REASON_MINOR_SECURITYFIX: ::DWORD = 0x0000000f; -pub const SERVICE_STOP_REASON_MINOR_SECURITY: ::DWORD = 0x00000010; -pub const SERVICE_STOP_REASON_MINOR_NETWORK_CONNECTIVITY: ::DWORD = 0x00000011; -pub const SERVICE_STOP_REASON_MINOR_WMI: ::DWORD = 0x00000012; -pub const SERVICE_STOP_REASON_MINOR_SERVICEPACK_UNINSTALL: ::DWORD = 0x00000013; -pub const SERVICE_STOP_REASON_MINOR_SOFTWARE_UPDATE_UNINSTALL: ::DWORD = 0x00000014; -pub const SERVICE_STOP_REASON_MINOR_SECURITYFIX_UNINSTALL: ::DWORD = 0x00000015; -pub const SERVICE_STOP_REASON_MINOR_MMC: ::DWORD = 0x00000016; -pub const SERVICE_STOP_REASON_MINOR_NONE: ::DWORD = 0x00000017; -pub const SERVICE_STOP_REASON_MINOR_MAX: ::DWORD = 0x00000018; -pub const SERVICE_STOP_REASON_MINOR_MIN_CUSTOM: ::DWORD = 0x00000100; -pub const SERVICE_STOP_REASON_MINOR_MAX_CUSTOM: ::DWORD = 0x0000FFFF; -pub const SERVICE_CONTROL_STATUS_REASON_INFO: ::DWORD = 1; -pub const SERVICE_SID_TYPE_NONE: ::DWORD = 0x00000000; -pub const SERVICE_SID_TYPE_UNRESTRICTED: ::DWORD = 0x00000001; -pub const SERVICE_SID_TYPE_RESTRICTED: ::DWORD = 0x00000002 | SERVICE_SID_TYPE_UNRESTRICTED; -pub const SERVICE_TRIGGER_TYPE_DEVICE_INTERFACE_ARRIVAL: ::DWORD = 1; -pub const SERVICE_TRIGGER_TYPE_IP_ADDRESS_AVAILABILITY: ::DWORD = 2; -pub const SERVICE_TRIGGER_TYPE_DOMAIN_JOIN: ::DWORD = 3; -pub const SERVICE_TRIGGER_TYPE_FIREWALL_PORT_EVENT: ::DWORD = 4; -pub const SERVICE_TRIGGER_TYPE_GROUP_POLICY: ::DWORD = 5; -pub const SERVICE_TRIGGER_TYPE_NETWORK_ENDPOINT: ::DWORD = 6; -pub const SERVICE_TRIGGER_TYPE_CUSTOM_SYSTEM_STATE_CHANGE: ::DWORD = 7; -pub const SERVICE_TRIGGER_TYPE_CUSTOM: ::DWORD = 20; -pub const SERVICE_TRIGGER_DATA_TYPE_BINARY: ::DWORD = 1; -pub const SERVICE_TRIGGER_DATA_TYPE_STRING: ::DWORD = 2; -pub const SERVICE_TRIGGER_DATA_TYPE_LEVEL: ::DWORD = 3; -pub const SERVICE_TRIGGER_DATA_TYPE_KEYWORD_ANY: ::DWORD = 4; -pub const SERVICE_TRIGGER_DATA_TYPE_KEYWORD_ALL: ::DWORD = 5; -pub const SERVICE_START_REASON_DEMAND: ::DWORD = 0x00000001; -pub const SERVICE_START_REASON_AUTO: ::DWORD = 0x00000002; -pub const SERVICE_START_REASON_TRIGGER: ::DWORD = 0x00000004; -pub const SERVICE_START_REASON_RESTART_ON_FAILURE: ::DWORD = 0x00000008; -pub const SERVICE_START_REASON_DELAYEDAUTO: ::DWORD = 0x00000010; -pub const SERVICE_DYNAMIC_INFORMATION_LEVEL_START_REASON: ::DWORD = 1; -pub const SERVICE_LAUNCH_PROTECTED_NONE: ::DWORD = 0; -pub const SERVICE_LAUNCH_PROTECTED_WINDOWS: ::DWORD = 1; -pub const SERVICE_LAUNCH_PROTECTED_WINDOWS_LIGHT: ::DWORD = 2; -pub const SERVICE_LAUNCH_PROTECTED_ANTIMALWARE_LIGHT: ::DWORD = 3; -//678 -DECLARE_HANDLE!(SC_HANDLE, SC_HANDLE__); -pub type LPSC_HANDLE = *mut SC_HANDLE; -DECLARE_HANDLE!(SERVICE_STATUS_HANDLE, SERVICE_STATUS_HANDLE__); -ENUM!{enum SC_STATUS_TYPE { - SC_STATUS_PROCESS_INFO = 0, -}} -ENUM!{enum _SC_ENUM_TYPE { - SC_ENUM_PROCESS_INFO = 0, -}} -//700 -STRUCT!{struct SERVICE_STATUS { - dwServiceType: ::DWORD, - dwCurrentState: ::DWORD, - dwControlsAccepted: ::DWORD, - dwWin32ExitCode: ::DWORD, - dwServiceSpecificExitCode: ::DWORD, - dwCheckPoint: ::DWORD, - dwWaitHint: ::DWORD, -}} -pub type LPSERVICE_STATUS = *mut SERVICE_STATUS; -//848 -pub type LPSERVICE_MAIN_FUNCTIONW = Option<unsafe extern "system" fn( - dwNumServicesArgs: ::DWORD, lpServiceArgVectors: *mut ::LPWSTR, -)>; -pub type LPSERVICE_MAIN_FUNCTIONA = Option<unsafe extern "system" fn( - dwNumServicesArgs: ::DWORD, lpServiceArgVectors: *mut ::LPSTR, -)>; -#[repr(C)] #[derive(Copy)] -pub struct SERVICE_TABLE_ENTRYA { - pub lpServiceName: ::LPCSTR, - pub lpServiceProc: LPSERVICE_MAIN_FUNCTIONA, -} -impl Clone for SERVICE_TABLE_ENTRYA { fn clone(&self) -> SERVICE_TABLE_ENTRYA { *self } } -pub type LPSERVICE_TABLE_ENTRYA = *mut SERVICE_TABLE_ENTRYA; -#[repr(C)] #[derive(Copy)] -pub struct SERVICE_TABLE_ENTRYW { - pub lpServiceName: ::LPCWSTR, - pub lpServiceProc: LPSERVICE_MAIN_FUNCTIONW, -} -impl Clone for SERVICE_TABLE_ENTRYW { fn clone(&self) -> SERVICE_TABLE_ENTRYW { *self } } -pub type LPSERVICE_TABLE_ENTRYW = *mut SERVICE_TABLE_ENTRYW; -//900 -pub type LPHANDLER_FUNCTION = Option<unsafe extern "system" fn(dwControl: ::DWORD)>; -pub type LPHANDLER_FUNCTION_EX = Option<unsafe extern "system" fn( - dwControl: ::DWORD, dwEventType: ::DWORD, lpEventData: ::LPVOID, lpContext: ::LPVOID, -) -> ::DWORD>; diff --git a/deps/winapi-0.2.5/src/winuser.rs b/deps/winapi-0.2.5/src/winuser.rs deleted file mode 100644 index bf718eb90..000000000 --- a/deps/winapi-0.2.5/src/winuser.rs +++ /dev/null @@ -1,2035 +0,0 @@ -// Copyright © 2015, Peter Atashian -// Licensed under the MIT License <LICENSE.md> -//! USER procedure declarations, constant definitions and macros -pub const BN_CLICKED: ::WORD = 0; -pub const BN_PAINT: ::WORD = 1; -pub const BN_HILITE: ::WORD = 2; -pub const BN_UNHILITE: ::WORD = 3; -pub const BN_DISABLE: ::WORD = 4; -pub const BN_DOUBLECLICKED: ::WORD = 5; -pub const BN_PUSHED: ::WORD = BN_HILITE; -pub const BN_UNPUSHED: ::WORD = BN_UNHILITE; -pub const BN_DBLCLK: ::WORD = BN_DOUBLECLICKED; -pub const BN_SETFOCUS: ::WORD = 6; -pub const BN_KILLFOCUS: ::WORD = 7; -pub const BS_PUSHBUTTON: ::DWORD = 0x00000000; -pub const BS_DEFPUSHBUTTON: ::DWORD = 0x00000001; -pub const BS_CHECKBOX: ::DWORD = 0x00000002; -pub const BS_AUTOCHECKBOX: ::DWORD = 0x00000003; -pub const BS_RADIOBUTTON: ::DWORD = 0x00000004; -pub const BS_3STATE: ::DWORD = 0x00000005; -pub const BS_AUTO3STATE: ::DWORD = 0x00000006; -pub const BS_GROUPBOX: ::DWORD = 0x00000007; -pub const BS_USERBUTTON: ::DWORD = 0x00000008; -pub const BS_AUTORADIOBUTTON: ::DWORD = 0x00000009; -pub const BS_PUSHBOX: ::DWORD = 0x0000000A; -pub const BS_OWNERDRAW: ::DWORD = 0x0000000B; -pub const BS_TYPEMASK: ::DWORD = 0x0000000F; -pub const BS_LEFTTEXT: ::DWORD = 0x00000020; -pub const BS_TEXT: ::DWORD = 0x00000000; -pub const BS_ICON: ::DWORD = 0x00000040; -pub const BS_BITMAP: ::DWORD = 0x00000080; -pub const BS_LEFT: ::DWORD = 0x00000100; -pub const BS_RIGHT: ::DWORD = 0x00000200; -pub const BS_CENTER: ::DWORD = 0x00000300; -pub const BS_TOP: ::DWORD = 0x00000400; -pub const BS_BOTTOM: ::DWORD = 0x00000800; -pub const BS_VCENTER: ::DWORD = 0x00000C00; -pub const BS_PUSHLIKE: ::DWORD = 0x00001000; -pub const BS_MULTILINE: ::DWORD = 0x00002000; -pub const BS_NOTIFY: ::DWORD = 0x00004000; -pub const BS_FLAT: ::DWORD = 0x00008000; -pub const BS_RIGHTBUTTON: ::DWORD = BS_LEFTTEXT; -pub const CCHILDREN_SCROLLBAR: usize = 5; -pub const CDS_UPDATEREGISTRY: ::DWORD = 0x00000001; -pub const CDS_TEST: ::DWORD = 0x00000002; -pub const CDS_FULLSCREEN: ::DWORD = 0x00000004; -pub const CDS_GLOBAL: ::DWORD = 0x00000008; -pub const CDS_SET_PRIMARY: ::DWORD = 0x00000010; -pub const CDS_VIDEOPARAMETERS: ::DWORD = 0x00000020; -pub const CDS_ENABLE_UNSAFE_MODES: ::DWORD = 0x00000100; -pub const CDS_DISABLE_UNSAFE_MODES: ::DWORD = 0x00000200; -pub const CDS_RESET: ::DWORD = 0x40000000; -pub const CDS_RESET_EX: ::DWORD = 0x20000000; -pub const CDS_NORESET: ::DWORD = 0x10000000; -pub const CS_VREDRAW: ::DWORD = 0x0001; -pub const CS_HREDRAW: ::DWORD = 0x0002; -pub const CS_DBLCLKS: ::DWORD = 0x0008; -pub const CS_OWNDC: ::DWORD = 0x0020; -pub const CS_CLASSDC: ::DWORD = 0x0040; -pub const CS_PARENTDC: ::DWORD = 0x0080; -pub const CS_NOCLOSE: ::DWORD = 0x0200; -pub const CS_SAVEBITS: ::DWORD = 0x0800; -pub const CS_BYTEALIGNCLIENT: ::DWORD = 0x1000; -pub const CS_BYTEALIGNWINDOW: ::DWORD = 0x2000; -pub const CS_GLOBALCLASS: ::DWORD = 0x4000; -pub const CS_IME: ::DWORD = 0x00010000; -pub const CS_DROPSHADOW: ::DWORD = 0x00020000; -pub const CW_USEDEFAULT: ::c_int = 0x80000000u32 as ::c_int; -pub const DISP_CHANGE_SUCCESSFUL: ::LONG = 0; -pub const DISP_CHANGE_RESTART: ::LONG = 1; -pub const DISP_CHANGE_FAILED: ::LONG = -1; -pub const DISP_CHANGE_BADMODE: ::LONG = -2; -pub const DISP_CHANGE_NOTUPDATED: ::LONG = -3; -pub const DISP_CHANGE_BADFLAGS: ::LONG = -4; -pub const DISP_CHANGE_BADPARAM: ::LONG = -5; -pub const DISP_CHANGE_BADDUALVIEW: ::LONG = -6; -pub const EDD_GET_DEVICE_INTERFACE_NAME: ::DWORD = 0x00000001; -pub const ENUM_CURRENT_SETTINGS: ::DWORD = 0xFFFFFFFF; -pub const ENUM_REGISTRY_SETTINGS: ::DWORD = 0xFFFFFFFE; -pub const GW_HWNDFIRST: ::UINT = 0; -pub const GW_HWNDLAST: ::UINT = 1; -pub const GW_HWNDNEXT: ::UINT = 2; -pub const GW_HWNDPREV: ::UINT = 3; -pub const GW_OWNER: ::UINT = 4; -pub const GW_CHILD: ::UINT = 5; -pub const GW_ENABLEDPOPUP: ::UINT = 6; -pub const GW_MAX: ::UINT = 6; -pub const HTERROR: ::c_int = -2; -pub const HTTRANSPARENT: ::c_int = -1; -pub const HTNOWHERE: ::c_int = 0; -pub const HTCLIENT: ::c_int = 1; -pub const HTCAPTION: ::c_int = 2; -pub const HTSYSMENU: ::c_int = 3; -pub const HTGROWBOX: ::c_int = 4; -pub const HTSIZE: ::c_int = HTGROWBOX; -pub const HTMENU: ::c_int = 5; -pub const HTHSCROLL: ::c_int = 6; -pub const HTVSCROLL: ::c_int = 7; -pub const HTMINBUTTON: ::c_int = 8; -pub const HTMAXBUTTON: ::c_int = 9; -pub const HTLEFT: ::c_int = 10; -pub const HTRIGHT: ::c_int = 11; -pub const HTTOP: ::c_int = 12; -pub const HTTOPLEFT: ::c_int = 13; -pub const HTTOPRIGHT: ::c_int = 14; -pub const HTBOTTOM: ::c_int = 15; -pub const HTBOTTOMLEFT: ::c_int = 16; -pub const HTBOTTOMRIGHT: ::c_int = 17; -pub const HTBORDER: ::c_int = 18; -pub const HTREDUCE: ::c_int = HTMINBUTTON; -pub const HTZOOM: ::c_int = HTMAXBUTTON; -pub const HTSIZEFIRST: ::c_int = HTLEFT; -pub const HTSIZELAST: ::c_int = HTBOTTOMRIGHT; -pub const HTOBJECT: ::c_int = 19; -pub const HTCLOSE: ::c_int = 20; -pub const HTHELP: ::c_int = 21; -pub const LSFW_LOCK: ::UINT = 1; -pub const LSFW_UNLOCK: ::UINT = 2; -pub const MDITILE_VERTICAL: ::UINT = 0x0000; -pub const MDITILE_HORIZONTAL: ::UINT = 0x0001; -pub const MDITILE_SKIPDISABLED: ::UINT = 0x0002; -pub const MDITILE_ZORDER: ::UINT = 0x0004; -pub const MB_OK: ::DWORD = 0x00000000; -pub const MB_OKCANCEL: ::DWORD = 0x00000001; -pub const MB_ABORTRETRYIGNORE: ::DWORD = 0x00000002; -pub const MB_YESNOCANCEL: ::DWORD = 0x00000003; -pub const MB_YESNO: ::DWORD = 0x00000004; -pub const MB_RETRYCANCEL: ::DWORD = 0x00000005; -pub const MB_CANCELTRYCONTINUE: ::DWORD = 0x00000006; -pub const MB_ICONHAND: ::DWORD = 0x00000010; -pub const MB_ICONQUESTION: ::DWORD = 0x00000020; -pub const MB_ICONEXCLAMATION: ::DWORD = 0x00000030; -pub const MB_ICONASTERISK: ::DWORD = 0x00000040; -pub const MB_USERICON: ::DWORD = 0x00000080; -pub const MB_ICONWARNING: ::DWORD = MB_ICONEXCLAMATION; -pub const MB_ICONERROR: ::DWORD = MB_ICONHAND; -pub const MB_ICONINFORMATION: ::DWORD = MB_ICONASTERISK; -pub const MB_ICONSTOP: ::DWORD = MB_ICONHAND; -pub const MB_DEFBUTTON1: ::DWORD = 0x00000000; -pub const MB_DEFBUTTON2: ::DWORD = 0x00000100; -pub const MB_DEFBUTTON3: ::DWORD = 0x00000200; -pub const MB_DEFBUTTON4: ::DWORD = 0x00000300; -pub const MB_APPLMODAL: ::DWORD = 0x00000000; -pub const MB_SYSTEMMODAL: ::DWORD = 0x00001000; -pub const MB_TASKMODAL: ::DWORD = 0x00002000; -pub const MB_HELP: ::DWORD = 0x00004000; -pub const MB_NOFOCUS: ::DWORD = 0x00008000; -pub const MB_SETFOREGROUND: ::DWORD = 0x00010000; -pub const MB_DEFAULT_DESKTOP_ONLY: ::DWORD = 0x00020000; -pub const MB_TOPMOST: ::DWORD = 0x00040000; -pub const MB_RIGHT: ::DWORD = 0x00080000; -pub const MB_RTLREADING: ::DWORD = 0x00100000; -pub const MB_SERVICE_NOTIFICATION: ::DWORD = 0x00200000; -pub const MB_SERVICE_NOTIFICATION_NT3X: ::DWORD = 0x00040000; -pub const MB_TYPEMASK: ::DWORD = 0x0000000F; -pub const MB_ICONMASK: ::DWORD = 0x000000F0; -pub const MB_DEFMASK: ::DWORD = 0x00000F00; -pub const MB_MODEMASK: ::DWORD = 0x00003000; -pub const MB_MISCMASK: ::DWORD = 0x0000C000; -pub const SB_HORZ: ::c_int = 0; -pub const SB_VERT: ::c_int = 1; -pub const SB_CTL: ::c_int = 2; -pub const SB_BOTH: ::c_int = 3; -pub const SW_HIDE: ::c_int = 0; -pub const SW_SHOWNORMAL: ::c_int = 1; -pub const SW_NORMAL: ::c_int = 1; -pub const SW_SHOWMINIMIZED: ::c_int = 2; -pub const SW_SHOWMAXIMIZED: ::c_int = 3; -pub const SW_MAXIMIZE: ::c_int = 3; -pub const SW_SHOWNOACTIVATE: ::c_int = 4; -pub const SW_SHOW: ::c_int = 5; -pub const SW_MINIMIZE: ::c_int = 6; -pub const SW_SHOWMINNOACTIVE: ::c_int = 7; -pub const SW_SHOWNA: ::c_int = 8; -pub const SW_RESTORE: ::c_int = 9; -pub const SW_SHOWDEFAULT: ::c_int = 10; -pub const SW_FORCEMINIMIZE: ::c_int = 11; -pub const SW_MAX: ::c_int = 11; -pub const SWP_NOSIZE: ::UINT = 0x0001; -pub const SWP_NOMOVE: ::UINT = 0x0002; -pub const SWP_NOZORDER: ::UINT = 0x0004; -pub const SWP_NOREDRAW: ::UINT = 0x0008; -pub const SWP_NOACTIVATE: ::UINT = 0x0010; -pub const SWP_FRAMECHANGED: ::UINT = 0x0020; -pub const SWP_SHOWWINDOW: ::UINT = 0x0040; -pub const SWP_HIDEWINDOW: ::UINT = 0x0080; -pub const SWP_NOCOPYBITS: ::UINT = 0x0100; -pub const SWP_NOOWNERZORDER: ::UINT = 0x0200; -pub const SWP_NOSENDCHANGING: ::UINT = 0x0400; -pub const SWP_DRAWFRAME: ::UINT = SWP_FRAMECHANGED; -pub const SWP_NOREPOSITION: ::UINT = SWP_NOOWNERZORDER; -pub const SWP_DEFERERASE: ::UINT = 0x2000; -pub const SWP_ASYNCWINDOWPOS: ::UINT = 0x4000; -pub const VK_LBUTTON: ::c_int = 0x01; -pub const VK_RBUTTON: ::c_int = 0x02; -pub const VK_CANCEL: ::c_int = 0x03; -pub const VK_MBUTTON: ::c_int = 0x04; -pub const VK_XBUTTON1: ::c_int = 0x05; -pub const VK_XBUTTON2: ::c_int = 0x06; -pub const VK_BACK: ::c_int = 0x08; -pub const VK_TAB: ::c_int = 0x09; -pub const VK_CLEAR: ::c_int = 0x0C; -pub const VK_RETURN: ::c_int = 0x0D; -pub const VK_SHIFT: ::c_int = 0x10; -pub const VK_CONTROL: ::c_int = 0x11; -pub const VK_MENU: ::c_int = 0x12; -pub const VK_PAUSE: ::c_int = 0x13; -pub const VK_CAPITAL: ::c_int = 0x14; -pub const VK_KANA: ::c_int = 0x15; -pub const VK_HANGUEL: ::c_int = 0x15; -pub const VK_HANGUL: ::c_int = 0x15; -pub const VK_JUNJA: ::c_int = 0x17; -pub const VK_FINAL: ::c_int = 0x18; -pub const VK_HANJA: ::c_int = 0x19; -pub const VK_KANJI: ::c_int = 0x19; -pub const VK_ESCAPE: ::c_int = 0x1B; -pub const VK_CONVERT: ::c_int = 0x1C; -pub const VK_NONCONVERT: ::c_int = 0x1D; -pub const VK_ACCEPT: ::c_int = 0x1E; -pub const VK_MODECHANGE: ::c_int = 0x1F; -pub const VK_SPACE: ::c_int = 0x20; -pub const VK_PRIOR: ::c_int = 0x21; -pub const VK_NEXT: ::c_int = 0x22; -pub const VK_END: ::c_int = 0x23; -pub const VK_HOME: ::c_int = 0x24; -pub const VK_LEFT: ::c_int = 0x25; -pub const VK_UP: ::c_int = 0x26; -pub const VK_RIGHT: ::c_int = 0x27; -pub const VK_DOWN: ::c_int = 0x28; -pub const VK_SELECT: ::c_int = 0x29; -pub const VK_PRINT: ::c_int = 0x2A; -pub const VK_EXECUTE: ::c_int = 0x2B; -pub const VK_SNAPSHOT: ::c_int = 0x2C; -pub const VK_INSERT: ::c_int = 0x2D; -pub const VK_DELETE: ::c_int = 0x2E; -pub const VK_HELP: ::c_int = 0x2F; -pub const VK_LWIN: ::c_int = 0x5B; -pub const VK_RWIN: ::c_int = 0x5C; -pub const VK_APPS: ::c_int = 0x5D; -pub const VK_SLEEP: ::c_int = 0x5F; -pub const VK_NUMPAD0: ::c_int = 0x60; -pub const VK_NUMPAD1: ::c_int = 0x61; -pub const VK_NUMPAD2: ::c_int = 0x62; -pub const VK_NUMPAD3: ::c_int = 0x63; -pub const VK_NUMPAD4: ::c_int = 0x64; -pub const VK_NUMPAD5: ::c_int = 0x65; -pub const VK_NUMPAD6: ::c_int = 0x66; -pub const VK_NUMPAD7: ::c_int = 0x67; -pub const VK_NUMPAD8: ::c_int = 0x68; -pub const VK_NUMPAD9: ::c_int = 0x69; -pub const VK_MULTIPLY: ::c_int = 0x6A; -pub const VK_ADD: ::c_int = 0x6B; -pub const VK_SEPARATOR: ::c_int = 0x6C; -pub const VK_SUBTRACT: ::c_int = 0x6D; -pub const VK_DECIMAL: ::c_int = 0x6E; -pub const VK_DIVIDE: ::c_int = 0x6F; -pub const VK_F1: ::c_int = 0x70; -pub const VK_F2: ::c_int = 0x71; -pub const VK_F3: ::c_int = 0x72; -pub const VK_F4: ::c_int = 0x73; -pub const VK_F5: ::c_int = 0x74; -pub const VK_F6: ::c_int = 0x75; -pub const VK_F7: ::c_int = 0x76; -pub const VK_F8: ::c_int = 0x77; -pub const VK_F9: ::c_int = 0x78; -pub const VK_F10: ::c_int = 0x79; -pub const VK_F11: ::c_int = 0x7A; -pub const VK_F12: ::c_int = 0x7B; -pub const VK_F13: ::c_int = 0x7C; -pub const VK_F14: ::c_int = 0x7D; -pub const VK_F15: ::c_int = 0x7E; -pub const VK_F16: ::c_int = 0x7F; -pub const VK_F17: ::c_int = 0x80; -pub const VK_F18: ::c_int = 0x81; -pub const VK_F19: ::c_int = 0x82; -pub const VK_F20: ::c_int = 0x83; -pub const VK_F21: ::c_int = 0x84; -pub const VK_F22: ::c_int = 0x85; -pub const VK_F23: ::c_int = 0x86; -pub const VK_F24: ::c_int = 0x87; -pub const VK_NUMLOCK: ::c_int = 0x90; -pub const VK_SCROLL: ::c_int = 0x91; -pub const VK_OEM_NEC_EQUAL: ::c_int = 0x92; -pub const VK_OEM_FJ_JISHO: ::c_int = 0x92; -pub const VK_OEM_FJ_MASSHOU: ::c_int = 0x93; -pub const VK_OEM_FJ_TOUROKU: ::c_int = 0x94; -pub const VK_OEM_FJ_LOYA: ::c_int = 0x95; -pub const VK_OEM_FJ_ROYA: ::c_int = 0x96; -pub const VK_LSHIFT: ::c_int = 0xA0; -pub const VK_RSHIFT: ::c_int = 0xA1; -pub const VK_LCONTROL: ::c_int = 0xA2; -pub const VK_RCONTROL: ::c_int = 0xA3; -pub const VK_LMENU: ::c_int = 0xA4; -pub const VK_RMENU: ::c_int = 0xA5; -pub const VK_BROWSER_BACK: ::c_int = 0xA6; -pub const VK_BROWSER_FORWARD: ::c_int = 0xA7; -pub const VK_BROWSER_REFRESH: ::c_int = 0xA8; -pub const VK_BROWSER_STOP: ::c_int = 0xA9; -pub const VK_BROWSER_SEARCH: ::c_int = 0xAA; -pub const VK_BROWSER_FAVORITES: ::c_int = 0xAB; -pub const VK_BROWSER_HOME: ::c_int = 0xAC; -pub const VK_VOLUME_MUTE: ::c_int = 0xAD; -pub const VK_VOLUME_DOWN: ::c_int = 0xAE; -pub const VK_VOLUME_UP: ::c_int = 0xAF; -pub const VK_MEDIA_NEXT_TRACK: ::c_int = 0xB0; -pub const VK_MEDIA_PREV_TRACK: ::c_int = 0xB1; -pub const VK_MEDIA_STOP: ::c_int = 0xB2; -pub const VK_MEDIA_PLAY_PAUSE: ::c_int = 0xB3; -pub const VK_LAUNCH_MAIL: ::c_int = 0xB4; -pub const VK_LAUNCH_MEDIA_SELECT: ::c_int = 0xB5; -pub const VK_LAUNCH_APP1: ::c_int = 0xB6; -pub const VK_LAUNCH_APP2: ::c_int = 0xB7; -pub const VK_OEM_1: ::c_int = 0xBA; -pub const VK_OEM_PLUS: ::c_int = 0xBB; -pub const VK_OEM_COMMA: ::c_int = 0xBC; -pub const VK_OEM_MINUS: ::c_int = 0xBD; -pub const VK_OEM_PERIOD: ::c_int = 0xBE; -pub const VK_OEM_2: ::c_int = 0xBF; -pub const VK_OEM_3: ::c_int = 0xC0; -pub const VK_OEM_4: ::c_int = 0xDB; -pub const VK_OEM_5: ::c_int = 0xDC; -pub const VK_OEM_6: ::c_int = 0xDD; -pub const VK_OEM_7: ::c_int = 0xDE; -pub const VK_OEM_8: ::c_int = 0xDF; -pub const VK_OEM_AX: ::c_int = 0xE1; -pub const VK_OEM_102: ::c_int = 0xE2; -pub const VK_ICO_HELP: ::c_int = 0xE3; -pub const VK_ICO_00: ::c_int = 0xE4; -pub const VK_PROCESSKEY: ::c_int = 0xE5; -pub const VK_ICO_CLEAR: ::c_int = 0xE6; -pub const VK_PACKET: ::c_int = 0xE7; -pub const VK_OEM_RESET: ::c_int = 0xE9; -pub const VK_OEM_JUMP: ::c_int = 0xEA; -pub const VK_OEM_PA1: ::c_int = 0xEB; -pub const VK_OEM_PA2: ::c_int = 0xEC; -pub const VK_OEM_PA3: ::c_int = 0xED; -pub const VK_OEM_WSCTRL: ::c_int = 0xEE; -pub const VK_OEM_CUSEL: ::c_int = 0xEF; -pub const VK_OEM_ATTN: ::c_int = 0xF0; -pub const VK_OEM_FINISH: ::c_int = 0xF1; -pub const VK_OEM_COPY: ::c_int = 0xF2; -pub const VK_OEM_AUTO: ::c_int = 0xF3; -pub const VK_OEM_ENLW: ::c_int = 0xF4; -pub const VK_OEM_BACKTAB: ::c_int = 0xF5; -pub const VK_ATTN: ::c_int = 0xF6; -pub const VK_CRSEL: ::c_int = 0xF7; -pub const VK_EXSEL: ::c_int = 0xF8; -pub const VK_EREOF: ::c_int = 0xF9; -pub const VK_PLAY: ::c_int = 0xFA; -pub const VK_ZOOM: ::c_int = 0xFB; -pub const VK_NONAME: ::c_int = 0xFC; -pub const VK_PA1: ::c_int = 0xFD; -pub const VK_OEM_CLEAR: ::c_int = 0xFE; -pub const WM_NULL: ::UINT = 0x0000; -pub const WM_CREATE: ::UINT = 0x0001; -pub const WM_DESTROY: ::UINT = 0x0002; -pub const WM_MOVE: ::UINT = 0x0003; -pub const WM_SIZE: ::UINT = 0x0005; -pub const WM_ACTIVATE: ::UINT = 0x0006; -pub const WM_SETFOCUS: ::UINT = 0x0007; -pub const WM_KILLFOCUS: ::UINT = 0x0008; -pub const WM_ENABLE: ::UINT = 0x000A; -pub const WM_SETREDRAW: ::UINT = 0x000B; -pub const WM_SETTEXT: ::UINT = 0x000C; -pub const WM_GETTEXT: ::UINT = 0x000D; -pub const WM_GETTEXTLENGTH: ::UINT = 0x000E; -pub const WM_PAINT: ::UINT = 0x000F; -pub const WM_CLOSE: ::UINT = 0x0010; -pub const WM_QUERYENDSESSION: ::UINT = 0x0011; -pub const WM_QUERYOPEN: ::UINT = 0x0013; -pub const WM_ENDSESSION: ::UINT = 0x0016; -pub const WM_QUIT: ::UINT = 0x0012; -pub const WM_ERASEBKGND: ::UINT = 0x0014; -pub const WM_SYSCOLORCHANGE: ::UINT = 0x0015; -pub const WM_SHOWWINDOW: ::UINT = 0x0018; -pub const WM_WININICHANGE: ::UINT = 0x001A; -pub const WM_SETTINGCHANGE: ::UINT = WM_WININICHANGE; -pub const WM_DEVMODECHANGE: ::UINT = 0x001B; -pub const WM_ACTIVATEAPP: ::UINT = 0x001C; -pub const WM_FONTCHANGE: ::UINT = 0x001D; -pub const WM_TIMECHANGE: ::UINT = 0x001E; -pub const WM_CANCELMODE: ::UINT = 0x001F; -pub const WM_SETCURSOR: ::UINT = 0x0020; -pub const WM_MOUSEACTIVATE: ::UINT = 0x0021; -pub const WM_CHILDACTIVATE: ::UINT = 0x0022; -pub const WM_QUEUESYNC: ::UINT = 0x0023; -pub const WM_GETMINMAXINFO: ::UINT = 0x0024; -pub const WM_PAINTICON: ::UINT = 0x0026; -pub const WM_ICONERASEBKGND: ::UINT = 0x0027; -pub const WM_NEXTDLGCTL: ::UINT = 0x0028; -pub const WM_SPOOLERSTATUS: ::UINT = 0x002A; -pub const WM_DRAWITEM: ::UINT = 0x002B; -pub const WM_MEASUREITEM: ::UINT = 0x002C; -pub const WM_DELETEITEM: ::UINT = 0x002D; -pub const WM_VKEYTOITEM: ::UINT = 0x002E; -pub const WM_CHARTOITEM: ::UINT = 0x002F; -pub const WM_SETFONT: ::UINT = 0x0030; -pub const WM_GETFONT: ::UINT = 0x0031; -pub const WM_SETHOTKEY: ::UINT = 0x0032; -pub const WM_GETHOTKEY: ::UINT = 0x0033; -pub const WM_QUERYDRAGICON: ::UINT = 0x0037; -pub const WM_COMPAREITEM: ::UINT = 0x0039; -pub const WM_GETOBJECT: ::UINT = 0x003D; -pub const WM_COMPACTING: ::UINT = 0x0041; -pub const WM_COMMNOTIFY: ::UINT = 0x0044; -pub const WM_WINDOWPOSCHANGING: ::UINT = 0x0046; -pub const WM_WINDOWPOSCHANGED: ::UINT = 0x0047; -pub const WM_POWER: ::UINT = 0x0048; -pub const WM_COPYDATA: ::UINT = 0x004A; -pub const WM_CANCELJOURNAL: ::UINT = 0x004B; -pub const WM_NOTIFY: ::UINT = 0x004E; -pub const WM_INPUTLANGCHANGEREQUEST: ::UINT = 0x0050; -pub const WM_INPUTLANGCHANGE: ::UINT = 0x0051; -pub const WM_TCARD: ::UINT = 0x0052; -pub const WM_HELP: ::UINT = 0x0053; -pub const WM_USERCHANGED: ::UINT = 0x0054; -pub const WM_NOTIFYFORMAT: ::UINT = 0x0055; -pub const WM_CONTEXTMENU: ::UINT = 0x007B; -pub const WM_STYLECHANGING: ::UINT = 0x007C; -pub const WM_STYLECHANGED: ::UINT = 0x007D; -pub const WM_DISPLAYCHANGE: ::UINT = 0x007E; -pub const WM_GETICON: ::UINT = 0x007F; -pub const WM_SETICON: ::UINT = 0x0080; -pub const WM_NCCREATE: ::UINT = 0x0081; -pub const WM_NCDESTROY: ::UINT = 0x0082; -pub const WM_NCCALCSIZE: ::UINT = 0x0083; -pub const WM_NCHITTEST: ::UINT = 0x0084; -pub const WM_NCPAINT: ::UINT = 0x0085; -pub const WM_NCACTIVATE: ::UINT = 0x0086; -pub const WM_GETDLGCODE: ::UINT = 0x0087; -pub const WM_SYNCPAINT: ::UINT = 0x0088; -pub const WM_NCMOUSEMOVE: ::UINT = 0x00A0; -pub const WM_NCLBUTTONDOWN: ::UINT = 0x00A1; -pub const WM_NCLBUTTONUP: ::UINT = 0x00A2; -pub const WM_NCLBUTTONDBLCLK: ::UINT = 0x00A3; -pub const WM_NCRBUTTONDOWN: ::UINT = 0x00A4; -pub const WM_NCRBUTTONUP: ::UINT = 0x00A5; -pub const WM_NCRBUTTONDBLCLK: ::UINT = 0x00A6; -pub const WM_NCMBUTTONDOWN: ::UINT = 0x00A7; -pub const WM_NCMBUTTONUP: ::UINT = 0x00A8; -pub const WM_NCMBUTTONDBLCLK: ::UINT = 0x00A9; -pub const WM_NCXBUTTONDOWN: ::UINT = 0x00AB; -pub const WM_NCXBUTTONUP: ::UINT = 0x00AC; -pub const WM_NCXBUTTONDBLCLK: ::UINT = 0x00AD; -pub const WM_INPUT_DEVICE_CHANGE: ::UINT = 0x00FE; -pub const WM_INPUT: ::UINT = 0x00FF; -pub const WM_KEYFIRST: ::UINT = 0x0100; -pub const WM_KEYDOWN: ::UINT = 0x0100; -pub const WM_KEYUP: ::UINT = 0x0101; -pub const WM_CHAR: ::UINT = 0x0102; -pub const WM_DEADCHAR: ::UINT = 0x0103; -pub const WM_SYSKEYDOWN: ::UINT = 0x0104; -pub const WM_SYSKEYUP: ::UINT = 0x0105; -pub const WM_SYSCHAR: ::UINT = 0x0106; -pub const WM_SYSDEADCHAR: ::UINT = 0x0107; -pub const WM_UNICHAR: ::UINT = 0x0109; -pub const WM_KEYLAST: ::UINT = 0x0109; -pub const WM_IME_STARTCOMPOSITION: ::UINT = 0x010D; -pub const WM_IME_ENDCOMPOSITION: ::UINT = 0x010E; -pub const WM_IME_COMPOSITION: ::UINT = 0x010F; -pub const WM_IME_KEYLAST: ::UINT = 0x010F; -pub const WM_INITDIALOG: ::UINT = 0x0110; -pub const WM_COMMAND: ::UINT = 0x0111; -pub const WM_SYSCOMMAND: ::UINT = 0x0112; -pub const WM_TIMER: ::UINT = 0x0113; -pub const WM_HSCROLL: ::UINT = 0x0114; -pub const WM_VSCROLL: ::UINT = 0x0115; -pub const WM_INITMENU: ::UINT = 0x0116; -pub const WM_INITMENUPOPUP: ::UINT = 0x0117; -pub const WM_GESTURE: ::UINT = 0x0119; -pub const WM_GESTURENOTIFY: ::UINT = 0x011A; -pub const WM_MENUSELECT: ::UINT = 0x011F; -pub const WM_MENUCHAR: ::UINT = 0x0120; -pub const WM_ENTERIDLE: ::UINT = 0x0121; -pub const WM_MENURBUTTONUP: ::UINT = 0x0122; -pub const WM_MENUDRAG: ::UINT = 0x0123; -pub const WM_MENUGETOBJECT: ::UINT = 0x0124; -pub const WM_UNINITMENUPOPUP: ::UINT = 0x0125; -pub const WM_MENUCOMMAND: ::UINT = 0x0126; -pub const WM_CHANGEUISTATE: ::UINT = 0x0127; -pub const WM_UPDATEUISTATE: ::UINT = 0x0128; -pub const WM_QUERYUISTATE: ::UINT = 0x0129; -pub const WM_CTLCOLORMSGBOX: ::UINT = 0x0132; -pub const WM_CTLCOLOREDIT: ::UINT = 0x0133; -pub const WM_CTLCOLORLISTBOX: ::UINT = 0x0134; -pub const WM_CTLCOLORBTN: ::UINT = 0x0135; -pub const WM_CTLCOLORDLG: ::UINT = 0x0136; -pub const WM_CTLCOLORSCROLLBAR: ::UINT = 0x0137; -pub const WM_CTLCOLORSTATIC: ::UINT = 0x0138; -pub const WM_MOUSEFIRST: ::UINT = 0x0200; -pub const WM_MOUSEMOVE: ::UINT = 0x0200; -pub const WM_LBUTTONDOWN: ::UINT = 0x0201; -pub const WM_LBUTTONUP: ::UINT = 0x0202; -pub const WM_LBUTTONDBLCLK: ::UINT = 0x0203; -pub const WM_RBUTTONDOWN: ::UINT = 0x0204; -pub const WM_RBUTTONUP: ::UINT = 0x0205; -pub const WM_RBUTTONDBLCLK: ::UINT = 0x0206; -pub const WM_MBUTTONDOWN: ::UINT = 0x0207; -pub const WM_MBUTTONUP: ::UINT = 0x0208; -pub const WM_MBUTTONDBLCLK: ::UINT = 0x0209; -pub const WM_MOUSEWHEEL: ::UINT = 0x020A; -pub const WM_XBUTTONDOWN: ::UINT = 0x020B; -pub const WM_XBUTTONUP: ::UINT = 0x020C; -pub const WM_XBUTTONDBLCLK: ::UINT = 0x020D; -pub const WM_MOUSEHWHEEL: ::UINT = 0x020E; -pub const WM_MOUSELAST: ::UINT = 0x020E; -pub const WM_PARENTNOTIFY: ::UINT = 0x0210; -pub const WM_ENTERMENULOOP: ::UINT = 0x0211; -pub const WM_EXITMENULOOP: ::UINT = 0x0212; -pub const WM_NEXTMENU: ::UINT = 0x0213; -pub const WM_SIZING: ::UINT = 0x0214; -pub const WM_CAPTURECHANGED: ::UINT = 0x0215; -pub const WM_MOVING: ::UINT = 0x0216; -pub const WM_POWERBROADCAST: ::UINT = 0x0218; -pub const WM_DEVICECHANGE: ::UINT = 0x0219; -pub const WM_MDICREATE: ::UINT = 0x0220; -pub const WM_MDIDESTROY: ::UINT = 0x0221; -pub const WM_MDIACTIVATE: ::UINT = 0x0222; -pub const WM_MDIRESTORE: ::UINT = 0x0223; -pub const WM_MDINEXT: ::UINT = 0x0224; -pub const WM_MDIMAXIMIZE: ::UINT = 0x0225; -pub const WM_MDITILE: ::UINT = 0x0226; -pub const WM_MDICASCADE: ::UINT = 0x0227; -pub const WM_MDIICONARRANGE: ::UINT = 0x0228; -pub const WM_MDIGETACTIVE: ::UINT = 0x0229; -pub const WM_MDISETMENU: ::UINT = 0x0230; -pub const WM_ENTERSIZEMOVE: ::UINT = 0x0231; -pub const WM_EXITSIZEMOVE: ::UINT = 0x0232; -pub const WM_DROPFILES: ::UINT = 0x0233; -pub const WM_MDIREFRESHMENU: ::UINT = 0x0234; -pub const WM_POINTERDEVICECHANGE: ::UINT = 0x238; -pub const WM_POINTERDEVICEINRANGE: ::UINT = 0x239; -pub const WM_POINTERDEVICEOUTOFRANGE: ::UINT = 0x23A; -pub const WM_TOUCH: ::UINT = 0x0240; -pub const WM_NCPOINTERUPDATE: ::UINT = 0x0241; -pub const WM_NCPOINTERDOWN: ::UINT = 0x0242; -pub const WM_NCPOINTERUP: ::UINT = 0x0243; -pub const WM_POINTERUPDATE: ::UINT = 0x0245; -pub const WM_POINTERDOWN: ::UINT = 0x0246; -pub const WM_POINTERUP: ::UINT = 0x0247; -pub const WM_POINTERENTER: ::UINT = 0x0249; -pub const WM_POINTERLEAVE: ::UINT = 0x024A; -pub const WM_POINTERACTIVATE: ::UINT = 0x024B; -pub const WM_POINTERCAPTURECHANGED: ::UINT = 0x024C; -pub const WM_TOUCHHITTESTING: ::UINT = 0x024D; -pub const WM_POINTERWHEEL: ::UINT = 0x024E; -pub const WM_POINTERHWHEEL: ::UINT = 0x024F; -pub const WM_IME_SETCONTEXT: ::UINT = 0x0281; -pub const WM_IME_NOTIFY: ::UINT = 0x0282; -pub const WM_IME_CONTROL: ::UINT = 0x0283; -pub const WM_IME_COMPOSITIONFULL: ::UINT = 0x0284; -pub const WM_IME_SELECT: ::UINT = 0x0285; -pub const WM_IME_CHAR: ::UINT = 0x0286; -pub const WM_IME_REQUEST: ::UINT = 0x0288; -pub const WM_IME_KEYDOWN: ::UINT = 0x0290; -pub const WM_IME_KEYUP: ::UINT = 0x0291; -pub const WM_MOUSEHOVER: ::UINT = 0x02A1; -pub const WM_MOUSELEAVE: ::UINT = 0x02A3; -pub const WM_NCMOUSEHOVER: ::UINT = 0x02A0; -pub const WM_NCMOUSELEAVE: ::UINT = 0x02A2; -pub const WM_WTSSESSION_CHANGE: ::UINT = 0x02B1; -pub const WM_TABLET_FIRST: ::UINT = 0x02c0; -pub const WM_TABLET_LAST: ::UINT = 0x02df; -pub const WM_DPICHANGED: ::UINT = 0x02E0; -pub const WM_CUT: ::UINT = 0x0300; -pub const WM_COPY: ::UINT = 0x0301; -pub const WM_PASTE: ::UINT = 0x0302; -pub const WM_CLEAR: ::UINT = 0x0303; -pub const WM_UNDO: ::UINT = 0x0304; -pub const WM_RENDERFORMAT: ::UINT = 0x0305; -pub const WM_RENDERALLFORMATS: ::UINT = 0x0306; -pub const WM_DESTROYCLIPBOARD: ::UINT = 0x0307; -pub const WM_DRAWCLIPBOARD: ::UINT = 0x0308; -pub const WM_PAINTCLIPBOARD: ::UINT = 0x0309; -pub const WM_VSCROLLCLIPBOARD: ::UINT = 0x030A; -pub const WM_SIZECLIPBOARD: ::UINT = 0x030B; -pub const WM_ASKCBFORMATNAME: ::UINT = 0x030C; -pub const WM_CHANGECBCHAIN: ::UINT = 0x030D; -pub const WM_HSCROLLCLIPBOARD: ::UINT = 0x030E; -pub const WM_QUERYNEWPALETTE: ::UINT = 0x030F; -pub const WM_PALETTEISCHANGING: ::UINT = 0x0310; -pub const WM_PALETTECHANGED: ::UINT = 0x0311; -pub const WM_HOTKEY: ::UINT = 0x0312; -pub const WM_PRINT: ::UINT = 0x0317; -pub const WM_PRINTCLIENT: ::UINT = 0x0318; -pub const WM_APPCOMMAND: ::UINT = 0x0319; -pub const WM_THEMECHANGED: ::UINT = 0x031A; -pub const WM_CLIPBOARDUPDATE: ::UINT = 0x031D; -pub const WM_DWMCOMPOSITIONCHANGED: ::UINT = 0x031E; -pub const WM_DWMNCRENDERINGCHANGED: ::UINT = 0x031F; -pub const WM_DWMCOLORIZATIONCOLORCHANGED: ::UINT = 0x0320; -pub const WM_DWMWINDOWMAXIMIZEDCHANGE: ::UINT = 0x0321; -pub const WM_DWMSENDICONICTHUMBNAIL: ::UINT = 0x0323; -pub const WM_DWMSENDICONICLIVEPREVIEWBITMAP: ::UINT = 0x0326; -pub const WM_GETTITLEBARINFOEX: ::UINT = 0x033F; -pub const WM_HANDHELDFIRST: ::UINT = 0x0358; -pub const WM_HANDHELDLAST: ::UINT = 0x035F; -pub const WM_AFXFIRST: ::UINT = 0x0360; -pub const WM_AFXLAST: ::UINT = 0x037F; -pub const WM_PENWINFIRST: ::UINT = 0x0380; -pub const WM_PENWINLAST: ::UINT = 0x038F; -pub const WM_APP: ::UINT = 0x8000; -pub const WM_USER: ::UINT = 0x0400; -pub const WMSZ_LEFT: ::UINT = 1; -pub const WMSZ_RIGHT: ::UINT = 2; -pub const WMSZ_TOP: ::UINT = 3; -pub const WMSZ_TOPLEFT: ::UINT = 4; -pub const WMSZ_TOPRIGHT: ::UINT = 5; -pub const WMSZ_BOTTOM: ::UINT = 6; -pub const WMSZ_BOTTOMLEFT: ::UINT = 7; -pub const WMSZ_BOTTOMRIGHT: ::UINT = 8; -pub const SMTO_NORMAL: ::UINT = 0x0000; -pub const SMTO_BLOCK: ::UINT = 0x0001; -pub const SMTO_ABORTIFHUNG: ::UINT = 0x0002; -pub const SMTO_NOTIMEOUTIFNOTHUNG: ::UINT = 0x0008; -pub const SMTO_ERRORONEXIT: ::UINT = 0x0020; -pub const MA_ACTIVATE: ::UINT = 1; -pub const MA_ACTIVATEANDEAT: ::UINT = 2; -pub const MA_NOACTIVATE: ::UINT = 3; -pub const MA_NOACTIVATEANDEAT: ::UINT = 4; -pub const ICON_SMALL: ::UINT = 0; -pub const ICON_BIG: ::UINT = 1; -pub const ICON_SMALL2: ::UINT = 2; -pub const SIZE_RESTORED: ::UINT = 0; -pub const SIZE_MINIMIZED: ::UINT = 1; -pub const SIZE_MAXIMIZED: ::UINT = 2; -pub const SIZE_MAXSHOW: ::UINT = 3; -pub const SIZE_MAXHIDE: ::UINT = 4; -pub const SIZENORMAL: ::UINT = SIZE_RESTORED; -pub const SIZEICONIC: ::UINT = SIZE_MINIMIZED; -pub const SIZEFULLSCREEN: ::UINT = SIZE_MAXIMIZED; -pub const SIZEZOOMSHOW: ::UINT = SIZE_MAXSHOW; -pub const SIZEZOOMHIDE: ::UINT = SIZE_MAXHIDE; -#[repr(C)] #[derive(Clone, Copy, Debug)] -struct NCCALCSIZE_PARAMS { - rgrc: [::RECT; 3], - lppos: PWINDOWPOS, -} -pub type PNCCALCSIZE_PARAMS = *mut NCCALCSIZE_PARAMS; -pub type NPNCCALCSIZE_PARAMS = *mut NCCALCSIZE_PARAMS; -pub type LPNCCALCSIZE_PARAMS = *mut NCCALCSIZE_PARAMS; -pub const WVR_ALIGNTOP: ::UINT = 0x0010; -pub const WVR_ALIGNLEFT: ::UINT = 0x0020; -pub const WVR_ALIGNBOTTOM: ::UINT = 0x0040; -pub const WVR_ALIGNRIGHT: ::UINT = 0x0080; -pub const WVR_HREDRAW: ::UINT = 0x0100; -pub const WVR_VREDRAW: ::UINT = 0x0200; -pub const WVR_REDRAW: ::UINT = WVR_HREDRAW | WVR_VREDRAW; -pub const WVR_VALIDRECTS: ::UINT = 0x0400; -pub const HOVER_DEFAULT: ::UINT = 0xFFFFFFFF; -pub const WS_OVERLAPPED: ::DWORD = 0x00000000; -pub const WS_POPUP: ::DWORD = 0x80000000; -pub const WS_CHILD: ::DWORD = 0x40000000; -pub const WS_MINIMIZE: ::DWORD = 0x20000000; -pub const WS_VISIBLE: ::DWORD = 0x10000000; -pub const WS_DISABLED: ::DWORD = 0x08000000; -pub const WS_CLIPSIBLINGS: ::DWORD = 0x04000000; -pub const WS_CLIPCHILDREN: ::DWORD = 0x02000000; -pub const WS_MAXIMIZE: ::DWORD = 0x01000000; -pub const WS_CAPTION: ::DWORD = 0x00C00000; -pub const WS_BORDER: ::DWORD = 0x00800000; -pub const WS_DLGFRAME: ::DWORD = 0x00400000; -pub const WS_VSCROLL: ::DWORD = 0x00200000; -pub const WS_HSCROLL: ::DWORD = 0x00100000; -pub const WS_SYSMENU: ::DWORD = 0x00080000; -pub const WS_THICKFRAME: ::DWORD = 0x00040000; -pub const WS_GROUP: ::DWORD = 0x00020000; -pub const WS_TABSTOP: ::DWORD = 0x00010000; -pub const WS_MINIMIZEBOX: ::DWORD = 0x00020000; -pub const WS_MAXIMIZEBOX: ::DWORD = 0x00010000; -pub const WS_TILED: ::DWORD = WS_OVERLAPPED; -pub const WS_ICONIC: ::DWORD = WS_MINIMIZE; -pub const WS_SIZEBOX: ::DWORD = WS_THICKFRAME; -pub const WS_TILEDWINDOW: ::DWORD = WS_OVERLAPPEDWINDOW; -pub const WS_OVERLAPPEDWINDOW: ::DWORD = WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX; -pub const WS_POPUPWINDOW: ::DWORD = WS_POPUP | WS_BORDER | WS_SYSMENU; -pub const WS_CHILDWINDOW: ::DWORD = WS_CHILD; -pub const WS_EX_DLGMODALFRAME: ::DWORD = 0x00000001; -pub const WS_EX_NOPARENTNOTIFY: ::DWORD = 0x00000004; -pub const WS_EX_TOPMOST: ::DWORD = 0x00000008; -pub const WS_EX_ACCEPTFILES: ::DWORD = 0x00000010; -pub const WS_EX_TRANSPARENT: ::DWORD = 0x00000020; -pub const WS_EX_MDICHILD: ::DWORD = 0x00000040; -pub const WS_EX_TOOLWINDOW: ::DWORD = 0x00000080; -pub const WS_EX_WINDOWEDGE: ::DWORD = 0x00000100; -pub const WS_EX_CLIENTEDGE: ::DWORD = 0x00000200; -pub const WS_EX_CONTEXTHELP: ::DWORD = 0x00000400; -pub const WS_EX_RIGHT: ::DWORD = 0x00001000; -pub const WS_EX_LEFT: ::DWORD = 0x00000000; -pub const WS_EX_RTLREADING: ::DWORD = 0x00002000; -pub const WS_EX_LTRREADING: ::DWORD = 0x00000000; -pub const WS_EX_LEFTSCROLLBAR: ::DWORD = 0x00004000; -pub const WS_EX_RIGHTSCROLLBAR: ::DWORD = 0x00000000; -pub const WS_EX_CONTROLPARENT: ::DWORD = 0x00010000; -pub const WS_EX_STATICEDGE: ::DWORD = 0x00020000; -pub const WS_EX_APPWINDOW: ::DWORD = 0x00040000; -pub const WS_EX_OVERLAPPEDWINDOW: ::DWORD = WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE; -pub const WS_EX_PALETTEWINDOW: ::DWORD = WS_EX_WINDOWEDGE | WS_EX_TOOLWINDOW | WS_EX_TOPMOST; -pub const WS_EX_LAYERED: ::DWORD = 0x00080000; -pub const WS_EX_NOINHERITLAYOUT: ::DWORD = 0x00100000; -pub const WS_EX_NOREDIRECTIONBITMAP: ::DWORD = 0x00200000; -pub const WS_EX_LAYOUTRTL: ::DWORD = 0x00400000; -pub const WS_EX_COMPOSITED: ::DWORD = 0x02000000; -pub const WS_EX_NOACTIVATE: ::DWORD = 0x08000000; -pub type NAMEENUMPROCA = Option<unsafe extern "system" fn(::LPSTR, ::LPARAM) -> ::BOOL>; -pub type NAMEENUMPROCW = Option<unsafe extern "system" fn(::LPWSTR, ::LPARAM) -> ::BOOL>; -pub type DESKTOPENUMPROCA = NAMEENUMPROCA; -pub type DESKTOPENUMPROCW = NAMEENUMPROCW; -pub type WINSTAENUMPROCA = NAMEENUMPROCA; -pub type WINSTAENUMPROCW = NAMEENUMPROCW; -pub type WNDENUMPROC = Option<unsafe extern "system" fn(::HWND, ::LPARAM) -> ::BOOL>; -pub type WNDPROC = Option<unsafe extern "system" fn( - ::HWND, ::UINT, ::WPARAM, ::LPARAM, -) -> ::LRESULT>; -pub type DLGPROC = Option<unsafe extern "system" fn( - ::HWND, ::UINT, ::WPARAM, ::LPARAM, -) -> ::INT_PTR>; -pub type HOOKPROC = Option<unsafe extern "system" fn( - code: ::c_int, wParam: ::WPARAM, lParam: ::LPARAM, -) -> ::LRESULT>; -pub type TimerProc = Option<unsafe extern "system" fn( - hwnd: ::HWND, uMsg: ::UINT, idEvent: ::UINT_PTR, dwTime: ::DWORD, -)>; -pub type DRAWSTATEPROC = Option<unsafe extern "system" fn( - ::HDC, ::LPARAM, ::WPARAM, ::c_int, ::c_int, -) -> ::BOOL>; -pub type PROPENUMPROCA = Option<unsafe extern "system" fn(::HWND, ::LPCSTR, ::HANDLE) -> ::BOOL>; -pub type PROPENUMPROCW = Option<unsafe extern "system" fn(::HWND, ::LPCWSTR, ::HANDLE) -> ::BOOL>; -pub type GRAYSTRINGPROC = Option<unsafe extern "system" fn(::HDC, ::LPARAM, ::c_int) -> ::BOOL>; -pub type MSGBOXCALLBACK = Option<unsafe extern "system" fn(LPHELPINFO)>; -pub type WINEVENTPROC = Option<unsafe extern "system" fn( - ::HWINEVENTHOOK, ::DWORD, ::HWND, ::LONG, ::LONG, ::DWORD, ::DWORD, -)>; -pub type HDEVNOTIFY = ::PVOID; -pub type MENUTEMPLATEA = ::VOID; -pub type MENUTEMPLATEW = ::VOID; -STRUCT!{struct MSG { - hwnd: ::HWND, - message: ::UINT, - wParam: ::WPARAM, - lParam: ::LPARAM, - time: ::DWORD, - pt: ::POINT, -}} -pub type PMSG = *mut MSG; -pub type NPMSG = *mut MSG; -pub type LPMSG = *mut MSG; -STRUCT!{struct PAINTSTRUCT { - hdc: ::HDC, - fErase: ::BOOL, - rcPaint: ::RECT, - fRestore: ::BOOL, - fIncUpdate: ::BOOL, - rgbReserved: [::BYTE; 32], -}} -pub type PPAINTSTRUCT = *mut PAINTSTRUCT; -pub type NPPAINTSTRUCT = *mut PAINTSTRUCT; -pub type LPPAINTSTRUCT = *mut PAINTSTRUCT; -STRUCT!{struct WINDOWPLACEMENT { - length: ::UINT, - flags: ::UINT, - showCmd: ::UINT, - ptMinPosition: ::POINT, - ptMaxPosition: ::POINT, - rcNormalPosition: ::RECT, -}} -pub type PWINDOWPLACEMENT = *mut WINDOWPLACEMENT; -pub type LPWINDOWPLACEMENT = *mut WINDOWPLACEMENT; -#[repr(C)] #[derive(Copy)] -pub struct WNDCLASSEXW { - pub cbSize: ::UINT, - pub style: ::UINT, - pub lpfnWndProc: WNDPROC, - pub cbClsExtra: ::c_int, - pub cbWndExtra: ::c_int, - pub hInstance: ::HINSTANCE, - pub hIcon: ::HICON, - pub hCursor: ::HCURSOR, - pub hbrBackground: ::HBRUSH, - pub lpszMenuName: ::LPCWSTR, - pub lpszClassName: ::LPCWSTR, - pub hIconSm: ::HICON, -} -impl Clone for WNDCLASSEXW { fn clone(&self) -> WNDCLASSEXW { *self } } -pub type PWNDCLASSEXW = *mut WNDCLASSEXW; -pub type NPWNDCLASSEXW = *mut WNDCLASSEXW; -pub type LPWNDCLASSEXW = *mut WNDCLASSEXW; -#[repr(C)] #[derive(Copy)] -pub struct WNDCLASSW { - pub style: ::UINT, - pub lpfnWndProc: WNDPROC, - pub cbClsExtra: ::c_int, - pub cbWndExtra: ::c_int, - pub hInstance: ::HINSTANCE, - pub hIcon: ::HICON, - pub hCursor: ::HCURSOR, - pub hbrBackground: ::HBRUSH, - pub lpszMenuName: ::LPCWSTR, - pub lpszClassName: ::LPCWSTR -} -impl Clone for WNDCLASSW { fn clone(&self) -> WNDCLASSW { *self } } -pub type PWNDCLASSW = *mut WNDCLASSW; -pub type NPWNDCLASSW = *mut WNDCLASSW; -pub type LPWNDCLASSW = *mut WNDCLASSW; -STRUCT!{struct SCROLLBARINFO { - cbSize: ::DWORD, - rcScrollBar: ::RECT, - dxyLineButton: ::c_int, - xyThumbTop: ::c_int, - xyThumbBottom: ::c_int, - reserved: ::c_int, - rgstate: [::DWORD; CCHILDREN_SCROLLBAR + 1], -}} -pub type PSCROLLBARINFO = *mut SCROLLBARINFO; -pub type LPSCROLLBARINFO = *mut SCROLLBARINFO; -STRUCT!{struct SCROLLINFO { - cbSize: ::UINT, - fMask: ::UINT, - nMin: ::c_int, - nMax: ::c_int, - nPage: ::UINT, - nPos: ::c_int, - nTrackPos: ::c_int, -}} -pub type LPSCROLLINFO = *mut SCROLLINFO; -pub type LPCSCROLLINFO = *const SCROLLINFO; -STRUCT!{struct SIZE { - cx: ::LONG, - cy: ::LONG, -}} -pub type PSIZE = *mut SIZE; -pub type LPSIZE = *mut SIZE; -pub type SIZEL = SIZE; -pub type PSIZEL = *mut SIZEL; -pub type LPSIZEL = *mut SIZEL; -//1913 -pub const UNICODE_NOCHAR: ::WPARAM = 0xffff; -pub type HDWP = *mut ::HANDLE; -//2193 -pub const WHEEL_DELTA: ::DWORD = 120; -//2206 -pub const XBUTTON1: ::DWORD = 0x0001; -pub const XBUTTON2: ::DWORD = 0x0002; -//2392 -pub const MK_LBUTTON: ::WPARAM = 0x0001; -pub const MK_RBUTTON: ::WPARAM = 0x0002; -pub const MK_SHIFT: ::WPARAM = 0x0004; -pub const MK_CONTROL: ::WPARAM = 0x0008; -pub const MK_MBUTTON: ::WPARAM = 0x0010; -pub const MK_XBUTTON1: ::WPARAM = 0x0020; -pub const MK_XBUTTON2: ::WPARAM = 0x0040; -//2408 -pub const TME_HOVER: ::DWORD = 0x0000_0001; -pub const TME_LEAVE: ::DWORD = 0x0000_0002; -pub const TME_NONCLIENT: ::DWORD = 0x0000_0010; -pub const TME_QUERY: ::DWORD = 0x4000_0000; -pub const TME_CANCEL: ::DWORD = 0x8000_0000; -pub const HWND_BROADCAST: ::HWND = 0xFFFF as ::HWND; -pub const HWND_MESSAGE: ::HWND = -3isize as ::HWND; -STRUCT!{struct TRACKMOUSEEVENT { - cbSize: ::DWORD, - dwFlags: ::DWORD, - hwndTrack: ::HWND, - dwHoverTime: ::DWORD, -}} -pub type LPTRACKMOUSEEVENT = *mut TRACKMOUSEEVENT; -//2575 -/// lParam of WM_WINDOWPOSCHANGING, WM_WINDOWPOSCHANGED -#[repr(C)] #[derive(Clone, Copy, Debug)] -pub struct WINDOWPOS { - pub hwnd: ::HWND, - /// hwnd or HWND_BOTTOM, HWND_NOTOPMOST, HWND_TOP, HWND_TOPMOST - pub hwndInsertAfter: ::HWND, - pub x: ::c_int, - pub y: ::c_int, - pub cx: ::c_int, - pub cy: ::c_int, - /// SWP_\* - pub flags: ::UINT, -} -pub type LPWINDOWPOS = *mut WINDOWPOS; -pub type PWINDOWPOS = *mut WINDOWPOS; -//3082 -STRUCT!{struct CREATESTRUCTA { - lpCreateParams: ::LPVOID, - hInstance: ::HINSTANCE, - hMenu: ::HMENU, - hwndParent: ::HWND, - cy: ::c_int, - cx: ::c_int, - y: ::c_int, - x: ::c_int, - style: ::LONG, - lpszName: ::LPCSTR, - lpszClass: ::LPCSTR, - dwExStyle: ::DWORD, -}} -pub type LPCREATESTRUCTA = *mut CREATESTRUCTA; -STRUCT!{struct CREATESTRUCTW { - lpCreateParams: ::LPVOID, - hInstance: ::HINSTANCE, - hMenu: ::HMENU, - hwndParent: ::HWND, - cy: ::c_int, - cx: ::c_int, - y: ::c_int, - x: ::c_int, - style: ::LONG, - lpszName: ::LPCWSTR, - lpszClass: ::LPCWSTR, - dwExStyle: ::DWORD, -}} -pub type LPCREATESTRUCTW = *mut CREATESTRUCTW; -//3145 -#[repr(C)] #[derive(Clone, Copy, Debug)] -/// The lParam of the WM_NOTIFY message is a pointer to this structure -pub struct NMHDR { - pub hwndFrom: ::HWND, - pub idFrom: ::UINT_PTR, - pub code: ::UINT, // NM_ code -} -pub type LPNMHDR = *mut NMHDR; -//3400 -pub const PM_NOREMOVE: ::UINT = 0x0000; -pub const PM_REMOVE: ::UINT = 0x0001; -pub const PM_NOYIELD: ::UINT = 0x0002; -pub const PM_QS_INPUT: ::UINT = QS_INPUT << 16; -pub const PM_QS_POSTMESSAGE: ::UINT = (QS_POSTMESSAGE | QS_HOTKEY | QS_TIMER) << 16; -pub const PM_QS_PAINT: ::UINT = QS_PAINT << 16; -pub const PM_QS_SENDMESSAGE: ::UINT = QS_SENDMESSAGE << 16; -// -pub const LWA_COLORKEY: ::DWORD = 0x00000001; -pub const LWA_ALPHA: ::DWORD = 0x00000002; -//3469 -pub const EWX_LOGOFF: ::UINT = 0x00000000; -pub const EWX_SHUTDOWN: ::UINT = 0x00000001; -pub const EWX_REBOOT: ::UINT = 0x00000002; -pub const EWX_FORCE: ::UINT = 0x00000004; -pub const EWX_POWEROFF: ::UINT = 0x00000008; -pub const EWX_FORCEIFHUNG: ::UINT = 0x00000010; -pub const EWX_QUICKRESOLVE: ::UINT = 0x00000020; -pub const EWX_RESTARTAPPS: ::UINT = 0x00000040; -pub const EWX_HYBRID_SHUTDOWN: ::UINT = 0x00400000; -pub const EWX_BOOTOPTIONS: ::UINT = 0x01000000; -//4054 (Win 7 SDK) -STRUCT!{struct FLASHWINFO { - cbSize: ::UINT, - hwnd: ::HWND, - dwFlags: ::DWORD, - uCount: ::UINT, - dwTimeout: ::DWORD, -}} -pub type PFLASHWINFO = *mut FLASHWINFO; -pub const FLASHW_STOP: ::DWORD = 0; -pub const FLASHW_CAPTION: ::DWORD = 0x00000001; -pub const FLASHW_TRAY: ::DWORD = 0x00000002; -pub const FLASHW_ALL: ::DWORD = FLASHW_CAPTION | FLASHW_TRAY; -pub const FLASHW_TIMER: ::DWORD = 0x00000004; -pub const FLASHW_TIMERNOFG: ::DWORD = 0x0000000C; -//5499 -pub const MAPVK_VK_TO_VSC: ::UINT = 0; -pub const MAPVK_VSC_TO_VK: ::UINT = 1; -pub const MAPVK_VK_TO_CHAR: ::UINT = 2; -pub const MAPVK_VSC_TO_VK_EX: ::UINT = 3; -pub const MAPVK_VK_TO_VSC_EX: ::UINT = 4; -//5741 -pub const KEYEVENTF_EXTENDEDKEY: ::DWORD = 0x0001; -pub const KEYEVENTF_KEYUP: ::DWORD = 0x0002; -pub const KEYEVENTF_UNICODE: ::DWORD = 0x0004; -pub const KEYEVENTF_SCANCODE: ::DWORD = 0x0008; -pub const MOUSEEVENTF_MOVE: ::DWORD = 0x0001; -pub const MOUSEEVENTF_LEFTDOWN: ::DWORD = 0x0002; -pub const MOUSEEVENTF_LEFTUP: ::DWORD = 0x0004; -pub const MOUSEEVENTF_RIGHTDOWN: ::DWORD = 0x0008; -pub const MOUSEEVENTF_RIGHTUP: ::DWORD = 0x0010; -pub const MOUSEEVENTF_MIDDLEDOWN: ::DWORD = 0x0020; -pub const MOUSEEVENTF_MIDDLEUP: ::DWORD = 0x0040; -pub const MOUSEEVENTF_XDOWN: ::DWORD = 0x0080; -pub const MOUSEEVENTF_XUP: ::DWORD = 0x0100; -pub const MOUSEEVENTF_WHEEL: ::DWORD = 0x0800; -pub const MOUSEEVENTF_HWHEEL: ::DWORD = 0x01000; -pub const MOUSEEVENTF_MOVE_NOCOALESCE: ::DWORD = 0x2000; -pub const MOUSEEVENTF_VIRTUALDESK: ::DWORD = 0x4000; -pub const MOUSEEVENTF_ABSOLUTE: ::DWORD = 0x8000; -STRUCT!{struct MOUSEINPUT { - dx: ::LONG, - dy: ::LONG, - mouseData: ::DWORD, - dwFlags: ::DWORD, - time: ::DWORD, - dwExtraInfo: ::ULONG_PTR, -}} -pub type PMOUSEINPUT = *mut MOUSEINPUT; -pub type LPMOUSEINPUT = *mut MOUSEINPUT; -STRUCT!{struct KEYBDINPUT { - wVk: ::WORD, - wScan: ::WORD, - dwFlags: ::DWORD, - time: ::DWORD, - dwExtraInfo: ::ULONG_PTR, -}} -pub type PKEYBDINPUT = *mut KEYBDINPUT; -pub type LPKEYBDINPUT = *mut KEYBDINPUT; -STRUCT!{struct HARDWAREINPUT { - uMsg: ::DWORD, - wParamL: ::WORD, - wParamH: ::WORD, -}} -pub type PHARDWAREINPUT = *mut HARDWAREINPUT; -pub type LPHARDWAREINPUT= *mut HARDWAREINPUT; -pub const INPUT_MOUSE: ::DWORD = 0; -pub const INPUT_KEYBOARD: ::DWORD = 1; -pub const INPUT_HARDWARE: ::DWORD = 2; -#[cfg(target_arch = "x86")] -STRUCT!{struct INPUT { - type_: ::DWORD, - u: [u32; 6], -}} -#[cfg(target_arch = "x86_64")] -STRUCT!{struct INPUT { - type_: ::DWORD, - u: [u64; 4], -}} -UNION!{INPUT, u, mi, mi_mut, MOUSEINPUT} -UNION!{INPUT, u, ki, ki_mut, KEYBDINPUT} -UNION!{INPUT, u, hi, hi_mut, HARDWAREINPUT} -pub type PINPUT = *mut INPUT; -pub type LPINPUT = *mut INPUT; -//Indices for GetWindowLong etc. -pub const GWL_EXSTYLE: ::c_int = -20; -pub const GWL_STYLE: ::c_int = -16; -pub const GWL_WNDPROC: ::c_int = -4; -pub const GWLP_WNDPROC: ::c_int = -4; -pub const GWL_HINSTANCE: ::c_int = -6; -pub const GWLP_HINSTANCE: ::c_int = -6; -pub const GWL_HWNDPARENT: ::c_int = -8; -pub const GWLP_HWNDPARENT: ::c_int = -8; -pub const GWL_ID: ::c_int = -12; -pub const GWLP_ID: ::c_int = -12; -pub const GWL_USERDATA: ::c_int = -21; -pub const GWLP_USERDATA: ::c_int = -21; -//5976 -ENUM!{enum POINTER_INPUT_TYPE { - PT_POINTER = 0x00000001, - PT_TOUCH = 0x00000002, - PT_PEN = 0x00000003, - PT_MOUSE = 0x00000004, - PT_TOUCHPAD = 0x00000005, -}} -//6566 -// flags for MsgWaitForMultipleObjectsEx -pub const MWMO_WAITALL: ::DWORD = 0x0001; -pub const MWMO_ALERTABLE: ::DWORD = 0x0002; -pub const MWMO_INPUTAVAILABLE: ::DWORD = 0x0004; -//6573 -pub const QS_KEY: ::UINT = 0x0001; -pub const QS_MOUSEMOVE: ::UINT = 0x0002; -pub const QS_MOUSEBUTTON: ::UINT = 0x0004; -pub const QS_POSTMESSAGE: ::UINT = 0x0008; -pub const QS_TIMER: ::UINT = 0x0010; -pub const QS_PAINT: ::UINT = 0x0020; -pub const QS_SENDMESSAGE: ::UINT = 0x0040; -pub const QS_HOTKEY: ::UINT = 0x0080; -pub const QS_ALLPOSTMESSAGE: ::UINT = 0x0100; -pub const QS_RAWINPUT: ::UINT = 0x0400; -pub const QS_TOUCH: ::UINT = 0x0800; -pub const QS_POINTER: ::UINT = 0x1000; -pub const QS_MOUSE: ::UINT = QS_MOUSEMOVE | QS_MOUSEBUTTON; -pub const QS_INPUT: ::UINT = QS_MOUSE | QS_KEY | QS_RAWINPUT | QS_TOUCH | QS_POINTER; -pub const QS_ALLEVENTS: ::UINT = QS_INPUT | QS_POSTMESSAGE | QS_TIMER | QS_PAINT | QS_HOTKEY; -pub const QS_ALLINPUT: ::UINT = QS_INPUT | QS_POSTMESSAGE | QS_TIMER - | QS_PAINT | QS_HOTKEY | QS_SENDMESSAGE; -//6789 -pub const SM_CXSCREEN: ::c_int = 0; -pub const SM_CYSCREEN: ::c_int = 1; -pub const SM_CXVSCROLL: ::c_int = 2; -pub const SM_CYHSCROLL: ::c_int = 3; -pub const SM_CYCAPTION: ::c_int = 4; -pub const SM_CXBORDER: ::c_int = 5; -pub const SM_CYBORDER: ::c_int = 6; -pub const SM_CXDLGFRAME: ::c_int = 7; -pub const SM_CYDLGFRAME: ::c_int = 8; -pub const SM_CYVTHUMB: ::c_int = 9; -pub const SM_CXHTHUMB: ::c_int = 10; -pub const SM_CXICON: ::c_int = 11; -pub const SM_CYICON: ::c_int = 12; -pub const SM_CXCURSOR: ::c_int = 13; -pub const SM_CYCURSOR: ::c_int = 14; -pub const SM_CYMENU: ::c_int = 15; -pub const SM_CXFULLSCREEN: ::c_int = 16; -pub const SM_CYFULLSCREEN: ::c_int = 17; -pub const SM_CYKANJIWINDOW: ::c_int = 18; -pub const SM_MOUSEPRESENT: ::c_int = 19; -pub const SM_CYVSCROLL: ::c_int = 20; -pub const SM_CXHSCROLL: ::c_int = 21; -pub const SM_DEBUG: ::c_int = 22; -pub const SM_SWAPBUTTON: ::c_int = 23; -pub const SM_RESERVED1: ::c_int = 24; -pub const SM_RESERVED2: ::c_int = 25; -pub const SM_RESERVED3: ::c_int = 26; -pub const SM_RESERVED4: ::c_int = 27; -pub const SM_CXMIN: ::c_int = 28; -pub const SM_CYMIN: ::c_int = 29; -pub const SM_CXSIZE: ::c_int = 30; -pub const SM_CYSIZE: ::c_int = 31; -pub const SM_CXFRAME: ::c_int = 32; -pub const SM_CYFRAME: ::c_int = 33; -pub const SM_CXMINTRACK: ::c_int = 34; -pub const SM_CYMINTRACK: ::c_int = 35; -pub const SM_CXDOUBLECLK: ::c_int = 36; -pub const SM_CYDOUBLECLK: ::c_int = 37; -pub const SM_CXICONSPACING: ::c_int = 38; -pub const SM_CYICONSPACING: ::c_int = 39; -pub const SM_MENUDROPALIGNMENT: ::c_int = 40; -pub const SM_PENWINDOWS: ::c_int = 41; -pub const SM_DBCSENABLED: ::c_int = 42; -pub const SM_CMOUSEBUTTONS: ::c_int = 43; -pub const SM_CXFIXEDFRAME: ::c_int = SM_CXDLGFRAME; -pub const SM_CYFIXEDFRAME: ::c_int = SM_CYDLGFRAME; -pub const SM_CXSIZEFRAME: ::c_int = SM_CXFRAME; -pub const SM_CYSIZEFRAME: ::c_int = SM_CYFRAME; -pub const SM_SECURE: ::c_int = 44; -pub const SM_CXEDGE: ::c_int = 45; -pub const SM_CYEDGE: ::c_int = 46; -pub const SM_CXMINSPACING: ::c_int = 47; -pub const SM_CYMINSPACING: ::c_int = 48; -pub const SM_CXSMICON: ::c_int = 49; -pub const SM_CYSMICON: ::c_int = 50; -pub const SM_CYSMCAPTION: ::c_int = 51; -pub const SM_CXSMSIZE: ::c_int = 52; -pub const SM_CYSMSIZE: ::c_int = 53; -pub const SM_CXMENUSIZE: ::c_int = 54; -pub const SM_CYMENUSIZE: ::c_int = 55; -pub const SM_ARRANGE: ::c_int = 56; -pub const SM_CXMINIMIZED: ::c_int = 57; -pub const SM_CYMINIMIZED: ::c_int = 58; -pub const SM_CXMAXTRACK: ::c_int = 59; -pub const SM_CYMAXTRACK: ::c_int = 60; -pub const SM_CXMAXIMIZED: ::c_int = 61; -pub const SM_CYMAXIMIZED: ::c_int = 62; -pub const SM_NETWORK: ::c_int = 63; -pub const SM_CLEANBOOT: ::c_int = 67; -pub const SM_CXDRAG: ::c_int = 68; -pub const SM_CYDRAG: ::c_int = 69; -pub const SM_SHOWSOUNDS: ::c_int = 70; -pub const SM_CXMENUCHECK: ::c_int = 71; -pub const SM_CYMENUCHECK: ::c_int = 72; -pub const SM_SLOWMACHINE: ::c_int = 73; -pub const SM_MIDEASTENABLED: ::c_int = 74; -pub const SM_MOUSEWHEELPRESENT: ::c_int = 75; -pub const SM_XVIRTUALSCREEN: ::c_int = 76; -pub const SM_YVIRTUALSCREEN: ::c_int = 77; -pub const SM_CXVIRTUALSCREEN: ::c_int = 78; -pub const SM_CYVIRTUALSCREEN: ::c_int = 79; -pub const SM_CMONITORS: ::c_int = 80; -pub const SM_SAMEDISPLAYFORMAT: ::c_int = 81; -pub const SM_IMMENABLED: ::c_int = 82; -pub const SM_CXFOCUSBORDER: ::c_int = 83; -pub const SM_CYFOCUSBORDER: ::c_int = 84; -pub const SM_TABLETPC: ::c_int = 86; -pub const SM_MEDIACENTER: ::c_int = 87; -pub const SM_STARTER: ::c_int = 88; -pub const SM_SERVERR2: ::c_int = 89; -pub const SM_MOUSEHORIZONTALWHEELPRESENT: ::c_int = 91; -pub const SM_CXPADDEDBORDER: ::c_int = 92; -pub const SM_DIGITIZER: ::c_int = 94; -pub const SM_MAXIMUMTOUCHES: ::c_int = 95; -pub const SM_CMETRICS: ::c_int = 97; -pub const SM_REMOTESESSION: ::c_int = 0x1000; -pub const SM_SHUTTINGDOWN: ::c_int = 0x2000; -pub const SM_REMOTECONTROL: ::c_int = 0x2001; -pub const SM_CARETBLINKINGENABLED: ::c_int = 0x2002; -pub const SM_CONVERTIBLESLATEMODE: ::c_int = 0x2003; -pub const SM_SYSTEMDOCKED: ::c_int = 0x2004; -//8855 (Win 7 SDK) -STRUCT!{struct ICONINFO { - fIcon: ::BOOL, - xHotspot: ::DWORD, - yHotspot: ::DWORD, - hbmMask: ::HBITMAP, - hbmColor: ::HBITMAP, -}} -pub type PICONINFO = *mut ICONINFO; -//9066 -// Color indexes for use in GetSysColor and SetSysColor -// 0-18 (after incrementing) are also valid in RegisterClass's WNDCLASS -pub const COLOR_SCROLLBAR: ::c_int = 0; -pub const COLOR_BACKGROUND: ::c_int = 1; -pub const COLOR_ACTIVECAPTION: ::c_int = 2; -pub const COLOR_INACTIVECAPTION: ::c_int = 3; -pub const COLOR_MENU: ::c_int = 4; -pub const COLOR_WINDOW: ::c_int = 5; -pub const COLOR_WINDOWFRAME: ::c_int = 6; -pub const COLOR_MENUTEXT: ::c_int = 7; -pub const COLOR_WINDOWTEXT: ::c_int = 8; -pub const COLOR_CAPTIONTEXT: ::c_int = 9; -pub const COLOR_ACTIVEBORDER: ::c_int = 10; -pub const COLOR_INACTIVEBORDER: ::c_int = 11; -pub const COLOR_APPWORKSPACE: ::c_int = 12; -pub const COLOR_HIGHLIGHT: ::c_int = 13; -pub const COLOR_HIGHLIGHTTEXT: ::c_int = 14; -pub const COLOR_BTNFACE: ::c_int = 15; -pub const COLOR_BTNSHADOW: ::c_int = 16; -pub const COLOR_GRAYTEXT: ::c_int = 17; -pub const COLOR_BTNTEXT: ::c_int = 18; -pub const COLOR_INACTIVECAPTIONTEXT: ::c_int = 19; -pub const COLOR_BTNHIGHLIGHT: ::c_int = 20; -// Introduced in Windows 95 (winver 0x0400): -pub const COLOR_3DDKSHADOW: ::c_int = 21; -pub const COLOR_3DLIGHT: ::c_int = 22; -pub const COLOR_INFOTEXT: ::c_int = 23; -pub const COLOR_INFOBK: ::c_int = 24; -pub const COLOR_DESKTOP: ::c_int = COLOR_BACKGROUND; -pub const COLOR_3DFACE: ::c_int = COLOR_BTNFACE; -pub const COLOR_3DSHADOW: ::c_int = COLOR_BTNSHADOW; -pub const COLOR_3DHIGHLIGHT: ::c_int = COLOR_BTNHIGHLIGHT; -pub const COLOR_3DHILIGHT: ::c_int = COLOR_BTNHIGHLIGHT; -pub const COLOR_BTNHILIGHT: ::c_int = COLOR_BTNHIGHLIGHT; -// Introduced in Windows 2000 (winver 0x0500) -pub const COLOR_HOTLIGHT: ::c_int = 26; -pub const COLOR_GRADIENTACTIVECAPTION: ::c_int = 27; -pub const COLOR_GRADIENTINACTIVECAPTION: ::c_int = 28; -// Introduced in Windows XP (winver 0x0501) -pub const COLOR_MENUHILIGHT: ::c_int = 29; -pub const COLOR_MENUBAR: ::c_int = 30; -//10069 -pub const IDC_ARROW: ::LPCWSTR = 32512 as ::LPCWSTR; -pub const IDC_IBEAM: ::LPCWSTR = 32513 as ::LPCWSTR; -pub const IDC_WAIT: ::LPCWSTR = 32514 as ::LPCWSTR; -pub const IDC_CROSS: ::LPCWSTR = 32515 as ::LPCWSTR; -pub const IDC_UPARROW: ::LPCWSTR = 32516 as ::LPCWSTR; -pub const IDC_SIZE: ::LPCWSTR = 32640 as ::LPCWSTR; -pub const IDC_ICON: ::LPCWSTR = 32641 as ::LPCWSTR; -pub const IDC_SIZENWSE: ::LPCWSTR = 32642 as ::LPCWSTR; -pub const IDC_SIZENESW: ::LPCWSTR = 32643 as ::LPCWSTR; -pub const IDC_SIZEWE: ::LPCWSTR = 32644 as ::LPCWSTR; -pub const IDC_SIZENS: ::LPCWSTR = 32645 as ::LPCWSTR; -pub const IDC_SIZEALL: ::LPCWSTR = 32646 as ::LPCWSTR; -pub const IDC_NO: ::LPCWSTR = 32648 as ::LPCWSTR; -pub const IDC_HAND: ::LPCWSTR = 32649 as ::LPCWSTR; -pub const IDC_APPSTARTING: ::LPCWSTR = 32650 as ::LPCWSTR; -pub const IDC_HELP: ::LPCWSTR = 32651 as ::LPCWSTR; -//10492 -pub const IDI_APPLICATION: ::LPCWSTR = 32512 as ::LPCWSTR; -pub const IDI_HAND: ::LPCWSTR = 32513 as ::LPCWSTR; -pub const IDI_QUESTION: ::LPCWSTR = 32514 as ::LPCWSTR; -pub const IDI_EXCLAMATION: ::LPCWSTR = 32515 as ::LPCWSTR; -pub const IDI_ASTERISK: ::LPCWSTR = 32516 as ::LPCWSTR; -pub const IDI_WINLOGO: ::LPCWSTR = 32517 as ::LPCWSTR; -pub const IDI_SHIELD: ::LPCWSTR = 32518 as ::LPCWSTR; -pub const IDI_WARNING: ::LPCWSTR = IDI_EXCLAMATION; -pub const IDI_ERROR: ::LPCWSTR = IDI_HAND; -pub const IDI_INFORMATION: ::LPCWSTR = IDI_ASTERISK; -pub const SPI_GETBEEP: ::UINT = 0x0001; -pub const SPI_SETBEEP: ::UINT = 0x0002; -pub const SPI_GETMOUSE: ::UINT = 0x0003; -pub const SPI_SETMOUSE: ::UINT = 0x0004; -pub const SPI_GETBORDER: ::UINT = 0x0005; -pub const SPI_SETBORDER: ::UINT = 0x0006; -pub const SPI_GETKEYBOARDSPEED: ::UINT = 0x000A; -pub const SPI_SETKEYBOARDSPEED: ::UINT = 0x000B; -pub const SPI_LANGDRIVER: ::UINT = 0x000C; -pub const SPI_ICONHORIZONTALSPACING: ::UINT = 0x000D; -pub const SPI_GETSCREENSAVETIMEOUT: ::UINT = 0x000E; -pub const SPI_SETSCREENSAVETIMEOUT: ::UINT = 0x000F; -pub const SPI_GETSCREENSAVEACTIVE: ::UINT = 0x0010; -pub const SPI_SETSCREENSAVEACTIVE: ::UINT = 0x0011; -pub const SPI_GETGRIDGRANULARITY: ::UINT = 0x0012; -pub const SPI_SETGRIDGRANULARITY: ::UINT = 0x0013; -pub const SPI_SETDESKWALLPAPER: ::UINT = 0x0014; -pub const SPI_SETDESKPATTERN: ::UINT = 0x0015; -pub const SPI_GETKEYBOARDDELAY: ::UINT = 0x0016; -pub const SPI_SETKEYBOARDDELAY: ::UINT = 0x0017; -pub const SPI_ICONVERTICALSPACING: ::UINT = 0x0018; -pub const SPI_GETICONTITLEWRAP: ::UINT = 0x0019; -pub const SPI_SETICONTITLEWRAP: ::UINT = 0x001A; -pub const SPI_GETMENUDROPALIGNMENT: ::UINT = 0x001B; -pub const SPI_SETMENUDROPALIGNMENT: ::UINT = 0x001C; -pub const SPI_SETDOUBLECLKWIDTH: ::UINT = 0x001D; -pub const SPI_SETDOUBLECLKHEIGHT: ::UINT = 0x001E; -pub const SPI_GETICONTITLELOGFONT: ::UINT = 0x001F; -pub const SPI_SETDOUBLECLICKTIME: ::UINT = 0x0020; -pub const SPI_SETMOUSEBUTTONSWAP: ::UINT = 0x0021; -pub const SPI_SETICONTITLELOGFONT: ::UINT = 0x0022; -pub const SPI_GETFASTTASKSWITCH: ::UINT = 0x0023; -pub const SPI_SETFASTTASKSWITCH: ::UINT = 0x0024; -pub const SPI_SETDRAGFULLWINDOWS: ::UINT = 0x0025; -pub const SPI_GETDRAGFULLWINDOWS: ::UINT = 0x0026; -pub const SPI_GETNONCLIENTMETRICS: ::UINT = 0x0029; -pub const SPI_SETNONCLIENTMETRICS: ::UINT = 0x002A; -pub const SPI_GETMINIMIZEDMETRICS: ::UINT = 0x002B; -pub const SPI_SETMINIMIZEDMETRICS: ::UINT = 0x002C; -pub const SPI_GETICONMETRICS: ::UINT = 0x002D; -pub const SPI_SETICONMETRICS: ::UINT = 0x002E; -pub const SPI_SETWORKAREA: ::UINT = 0x002F; -pub const SPI_GETWORKAREA: ::UINT = 0x0030; -pub const SPI_SETPENWINDOWS: ::UINT = 0x0031; -pub const SPI_GETHIGHCONTRAST: ::UINT = 0x0042; -pub const SPI_SETHIGHCONTRAST: ::UINT = 0x0043; -pub const SPI_GETKEYBOARDPREF: ::UINT = 0x0044; -pub const SPI_SETKEYBOARDPREF: ::UINT = 0x0045; -pub const SPI_GETSCREENREADER: ::UINT = 0x0046; -pub const SPI_SETSCREENREADER: ::UINT = 0x0047; -pub const SPI_GETANIMATION: ::UINT = 0x0048; -pub const SPI_SETANIMATION: ::UINT = 0x0049; -pub const SPI_GETFONTSMOOTHING: ::UINT = 0x004A; -pub const SPI_SETFONTSMOOTHING: ::UINT = 0x004B; -pub const SPI_SETDRAGWIDTH: ::UINT = 0x004C; -pub const SPI_SETDRAGHEIGHT: ::UINT = 0x004D; -pub const SPI_SETHANDHELD: ::UINT = 0x004E; -pub const SPI_GETLOWPOWERTIMEOUT: ::UINT = 0x004F; -pub const SPI_GETPOWEROFFTIMEOUT: ::UINT = 0x0050; -pub const SPI_SETLOWPOWERTIMEOUT: ::UINT = 0x0051; -pub const SPI_SETPOWEROFFTIMEOUT: ::UINT = 0x0052; -pub const SPI_GETLOWPOWERACTIVE: ::UINT = 0x0053; -pub const SPI_GETPOWEROFFACTIVE: ::UINT = 0x0054; -pub const SPI_SETLOWPOWERACTIVE: ::UINT = 0x0055; -pub const SPI_SETPOWEROFFACTIVE: ::UINT = 0x0056; -pub const SPI_SETCURSORS: ::UINT = 0x0057; -pub const SPI_SETICONS: ::UINT = 0x0058; -pub const SPI_GETDEFAULTINPUTLANG: ::UINT = 0x0059; -pub const SPI_SETDEFAULTINPUTLANG: ::UINT = 0x005A; -pub const SPI_SETLANGTOGGLE: ::UINT = 0x005B; -pub const SPI_GETWINDOWSEXTENSION: ::UINT = 0x005C; -pub const SPI_SETMOUSETRAILS: ::UINT = 0x005D; -pub const SPI_GETMOUSETRAILS: ::UINT = 0x005E; -pub const SPI_SETSCREENSAVERRUNNING: ::UINT = 0x0061; -pub const SPI_SCREENSAVERRUNNING: ::UINT = SPI_SETSCREENSAVERRUNNING; -pub const SPI_GETFILTERKEYS: ::UINT = 0x0032; -pub const SPI_SETFILTERKEYS: ::UINT = 0x0033; -pub const SPI_GETTOGGLEKEYS: ::UINT = 0x0034; -pub const SPI_SETTOGGLEKEYS: ::UINT = 0x0035; -pub const SPI_GETMOUSEKEYS: ::UINT = 0x0036; -pub const SPI_SETMOUSEKEYS: ::UINT = 0x0037; -pub const SPI_GETSHOWSOUNDS: ::UINT = 0x0038; -pub const SPI_SETSHOWSOUNDS: ::UINT = 0x0039; -pub const SPI_GETSTICKYKEYS: ::UINT = 0x003A; -pub const SPI_SETSTICKYKEYS: ::UINT = 0x003B; -pub const SPI_GETACCESSTIMEOUT: ::UINT = 0x003C; -pub const SPI_SETACCESSTIMEOUT: ::UINT = 0x003D; -pub const SPI_GETSERIALKEYS: ::UINT = 0x003E; -pub const SPI_SETSERIALKEYS: ::UINT = 0x003F; -pub const SPI_GETSOUNDSENTRY: ::UINT = 0x0040; -pub const SPI_SETSOUNDSENTRY: ::UINT = 0x0041; -pub const SPI_GETSNAPTODEFBUTTON: ::UINT = 0x005F; -pub const SPI_SETSNAPTODEFBUTTON: ::UINT = 0x0060; -pub const SPI_GETMOUSEHOVERWIDTH: ::UINT = 0x0062; -pub const SPI_SETMOUSEHOVERWIDTH: ::UINT = 0x0063; -pub const SPI_GETMOUSEHOVERHEIGHT: ::UINT = 0x0064; -pub const SPI_SETMOUSEHOVERHEIGHT: ::UINT = 0x0065; -pub const SPI_GETMOUSEHOVERTIME: ::UINT = 0x0066; -pub const SPI_SETMOUSEHOVERTIME: ::UINT = 0x0067; -pub const SPI_GETWHEELSCROLLLINES: ::UINT = 0x0068; -pub const SPI_SETWHEELSCROLLLINES: ::UINT = 0x0069; -pub const SPI_GETMENUSHOWDELAY: ::UINT = 0x006A; -pub const SPI_SETMENUSHOWDELAY: ::UINT = 0x006B; -pub const SPI_GETWHEELSCROLLCHARS: ::UINT = 0x006C; -pub const SPI_SETWHEELSCROLLCHARS: ::UINT = 0x006D; -pub const SPI_GETSHOWIMEUI: ::UINT = 0x006E; -pub const SPI_SETSHOWIMEUI: ::UINT = 0x006F; -pub const SPI_GETMOUSESPEED: ::UINT = 0x0070; -pub const SPI_SETMOUSESPEED: ::UINT = 0x0071; -pub const SPI_GETSCREENSAVERRUNNING: ::UINT = 0x0072; -pub const SPI_GETDESKWALLPAPER: ::UINT = 0x0073; -pub const SPI_GETAUDIODESCRIPTION: ::UINT = 0x0074; -pub const SPI_SETAUDIODESCRIPTION: ::UINT = 0x0075; -pub const SPI_GETSCREENSAVESECURE: ::UINT = 0x0076; -pub const SPI_SETSCREENSAVESECURE: ::UINT = 0x0077; -pub const SPI_GETHUNGAPPTIMEOUT: ::UINT = 0x0078; -pub const SPI_SETHUNGAPPTIMEOUT: ::UINT = 0x0079; -pub const SPI_GETWAITTOKILLTIMEOUT: ::UINT = 0x007A; -pub const SPI_SETWAITTOKILLTIMEOUT: ::UINT = 0x007B; -pub const SPI_GETWAITTOKILLSERVICETIMEOUT: ::UINT = 0x007C; -pub const SPI_SETWAITTOKILLSERVICETIMEOUT: ::UINT = 0x007D; -pub const SPI_GETMOUSEDOCKTHRESHOLD: ::UINT = 0x007E; -pub const SPI_SETMOUSEDOCKTHRESHOLD: ::UINT = 0x007F; -pub const SPI_GETPENDOCKTHRESHOLD: ::UINT = 0x0080; -pub const SPI_SETPENDOCKTHRESHOLD: ::UINT = 0x0081; -pub const SPI_GETWINARRANGING: ::UINT = 0x0082; -pub const SPI_SETWINARRANGING: ::UINT = 0x0083; -pub const SPI_GETMOUSEDRAGOUTTHRESHOLD: ::UINT = 0x0084; -pub const SPI_SETMOUSEDRAGOUTTHRESHOLD: ::UINT = 0x0085; -pub const SPI_GETPENDRAGOUTTHRESHOLD: ::UINT = 0x0086; -pub const SPI_SETPENDRAGOUTTHRESHOLD: ::UINT = 0x0087; -pub const SPI_GETMOUSESIDEMOVETHRESHOLD: ::UINT = 0x0088; -pub const SPI_SETMOUSESIDEMOVETHRESHOLD: ::UINT = 0x0089; -pub const SPI_GETPENSIDEMOVETHRESHOLD: ::UINT = 0x008A; -pub const SPI_SETPENSIDEMOVETHRESHOLD: ::UINT = 0x008B; -pub const SPI_GETDRAGFROMMAXIMIZE: ::UINT = 0x008C; -pub const SPI_SETDRAGFROMMAXIMIZE: ::UINT = 0x008D; -pub const SPI_GETSNAPSIZING: ::UINT = 0x008E; -pub const SPI_SETSNAPSIZING: ::UINT = 0x008F; -pub const SPI_GETDOCKMOVING: ::UINT = 0x0090; -pub const SPI_SETDOCKMOVING: ::UINT = 0x0091; -pub const SPI_GETACTIVEWINDOWTRACKING: ::UINT = 0x1000; -pub const SPI_SETACTIVEWINDOWTRACKING: ::UINT = 0x1001; -pub const SPI_GETMENUANIMATION: ::UINT = 0x1002; -pub const SPI_SETMENUANIMATION: ::UINT = 0x1003; -pub const SPI_GETCOMBOBOXANIMATION: ::UINT = 0x1004; -pub const SPI_SETCOMBOBOXANIMATION: ::UINT = 0x1005; -pub const SPI_GETLISTBOXSMOOTHSCROLLING: ::UINT = 0x1006; -pub const SPI_SETLISTBOXSMOOTHSCROLLING: ::UINT = 0x1007; -pub const SPI_GETGRADIENTCAPTIONS: ::UINT = 0x1008; -pub const SPI_SETGRADIENTCAPTIONS: ::UINT = 0x1009; -pub const SPI_GETKEYBOARDCUES: ::UINT = 0x100A; -pub const SPI_SETKEYBOARDCUES: ::UINT = 0x100B; -pub const SPI_GETMENUUNDERLINES: ::UINT = SPI_GETKEYBOARDCUES; -pub const SPI_SETMENUUNDERLINES: ::UINT = SPI_SETKEYBOARDCUES; -pub const SPI_GETACTIVEWNDTRKZORDER: ::UINT = 0x100C; -pub const SPI_SETACTIVEWNDTRKZORDER: ::UINT = 0x100D; -pub const SPI_GETHOTTRACKING: ::UINT = 0x100E; -pub const SPI_SETHOTTRACKING: ::UINT = 0x100F; -pub const SPI_GETMENUFADE: ::UINT = 0x1012; -pub const SPI_SETMENUFADE: ::UINT = 0x1013; -pub const SPI_GETSELECTIONFADE: ::UINT = 0x1014; -pub const SPI_SETSELECTIONFADE: ::UINT = 0x1015; -pub const SPI_GETTOOLTIPANIMATION: ::UINT = 0x1016; -pub const SPI_SETTOOLTIPANIMATION: ::UINT = 0x1017; -pub const SPI_GETTOOLTIPFADE: ::UINT = 0x1018; -pub const SPI_SETTOOLTIPFADE: ::UINT = 0x1019; -pub const SPI_GETCURSORSHADOW: ::UINT = 0x101A; -pub const SPI_SETCURSORSHADOW: ::UINT = 0x101B; -pub const SPI_GETMOUSESONAR: ::UINT = 0x101C; -pub const SPI_SETMOUSESONAR: ::UINT = 0x101D; -pub const SPI_GETMOUSECLICKLOCK: ::UINT = 0x101E; -pub const SPI_SETMOUSECLICKLOCK: ::UINT = 0x101F; -pub const SPI_GETMOUSEVANISH: ::UINT = 0x1020; -pub const SPI_SETMOUSEVANISH: ::UINT = 0x1021; -pub const SPI_GETFLATMENU: ::UINT = 0x1022; -pub const SPI_SETFLATMENU: ::UINT = 0x1023; -pub const SPI_GETDROPSHADOW: ::UINT = 0x1024; -pub const SPI_SETDROPSHADOW: ::UINT = 0x1025; -pub const SPI_GETBLOCKSENDINPUTRESETS: ::UINT = 0x1026; -pub const SPI_SETBLOCKSENDINPUTRESETS: ::UINT = 0x1027; -pub const SPI_GETUIEFFECTS: ::UINT = 0x103E; -pub const SPI_SETUIEFFECTS: ::UINT = 0x103F; -pub const SPI_GETDISABLEOVERLAPPEDCONTENT: ::UINT = 0x1040; -pub const SPI_SETDISABLEOVERLAPPEDCONTENT: ::UINT = 0x1041; -pub const SPI_GETCLIENTAREAANIMATION: ::UINT = 0x1042; -pub const SPI_SETCLIENTAREAANIMATION: ::UINT = 0x1043; -pub const SPI_GETCLEARTYPE: ::UINT = 0x1048; -pub const SPI_SETCLEARTYPE: ::UINT = 0x1049; -pub const SPI_GETSPEECHRECOGNITION: ::UINT = 0x104A; -pub const SPI_SETSPEECHRECOGNITION: ::UINT = 0x104B; -pub const SPI_GETFOREGROUNDLOCKTIMEOUT: ::UINT = 0x2000; -pub const SPI_SETFOREGROUNDLOCKTIMEOUT: ::UINT = 0x2001; -pub const SPI_GETACTIVEWNDTRKTIMEOUT: ::UINT = 0x2002; -pub const SPI_SETACTIVEWNDTRKTIMEOUT: ::UINT = 0x2003; -pub const SPI_GETFOREGROUNDFLASHCOUNT: ::UINT = 0x2004; -pub const SPI_SETFOREGROUNDFLASHCOUNT: ::UINT = 0x2005; -pub const SPI_GETCARETWIDTH: ::UINT = 0x2006; -pub const SPI_SETCARETWIDTH: ::UINT = 0x2007; -pub const SPI_GETMOUSECLICKLOCKTIME: ::UINT = 0x2008; -pub const SPI_SETMOUSECLICKLOCKTIME: ::UINT = 0x2009; -pub const SPI_GETFONTSMOOTHINGTYPE: ::UINT = 0x200A; -pub const SPI_SETFONTSMOOTHINGTYPE: ::UINT = 0x200B; -pub const FE_FONTSMOOTHINGSTANDARD: ::UINT = 0x0001; -pub const FE_FONTSMOOTHINGCLEARTYPE: ::UINT = 0x0002; -pub const SPI_GETFONTSMOOTHINGCONTRAST: ::UINT = 0x200C; -pub const SPI_SETFONTSMOOTHINGCONTRAST: ::UINT = 0x200D; -pub const SPI_GETFOCUSBORDERWIDTH: ::UINT = 0x200E; -pub const SPI_SETFOCUSBORDERWIDTH: ::UINT = 0x200F; -pub const SPI_GETFOCUSBORDERHEIGHT: ::UINT = 0x2010; -pub const SPI_SETFOCUSBORDERHEIGHT: ::UINT = 0x2011; -pub const SPI_GETFONTSMOOTHINGORIENTATION: ::UINT = 0x2012; -pub const SPI_SETFONTSMOOTHINGORIENTATION: ::UINT = 0x2013; -pub const FE_FONTSMOOTHINGORIENTATIONBGR: ::UINT = 0x0000; -pub const FE_FONTSMOOTHINGORIENTATIONRGB: ::UINT = 0x0001; -pub const SPI_GETMINIMUMHITRADIUS: ::UINT = 0x2014; -pub const SPI_SETMINIMUMHITRADIUS: ::UINT = 0x2015; -pub const SPI_GETMESSAGEDURATION: ::UINT = 0x2016; -pub const SPI_SETMESSAGEDURATION: ::UINT = 0x2017; -//11264 -pub const CB_GETEDITSEL: ::UINT = 0x0140; -pub const CB_LIMITTEXT: ::UINT = 0x0141; -pub const CB_SETEDITSEL: ::UINT = 0x0142; -pub const CB_ADDSTRING: ::UINT = 0x0143; -pub const CB_DELETESTRING: ::UINT = 0x0144; -pub const CB_DIR: ::UINT = 0x0145; -pub const CB_GETCOUNT: ::UINT = 0x0146; -pub const CB_GETCURSEL: ::UINT = 0x0147; -pub const CB_GETLBTEXT: ::UINT = 0x0148; -pub const CB_GETLBTEXTLEN: ::UINT = 0x0149; -pub const CB_INSERTSTRING: ::UINT = 0x014A; -pub const CB_RESETCONTENT: ::UINT = 0x014B; -pub const CB_FINDSTRING: ::UINT = 0x014C; -pub const CB_SELECTSTRING: ::UINT = 0x014D; -pub const CB_SETCURSEL: ::UINT = 0x014E; -pub const CB_SHOWDROPDOWN: ::UINT = 0x014F; -pub const CB_GETITEMDATA: ::UINT = 0x0150; -pub const CB_SETITEMDATA: ::UINT = 0x0151; -pub const CB_GETDROPPEDCONTROLRECT: ::UINT = 0x0152; -pub const CB_SETITEMHEIGHT: ::UINT = 0x0153; -pub const CB_GETITEMHEIGHT: ::UINT = 0x0154; -pub const CB_SETEXTENDEDUI: ::UINT = 0x0155; -pub const CB_GETEXTENDEDUI: ::UINT = 0x0156; -pub const CB_GETDROPPEDSTATE: ::UINT = 0x0157; -pub const CB_FINDSTRINGEXACT: ::UINT = 0x0158; -pub const CB_SETLOCALE: ::UINT = 0x0159; -pub const CB_GETLOCALE: ::UINT = 0x015A; -pub const CB_GETTOPINDEX: ::UINT = 0x015b; -pub const CB_SETTOPINDEX: ::UINT = 0x015c; -pub const CB_GETHORIZONTALEXTENT: ::UINT = 0x015d; -pub const CB_SETHORIZONTALEXTENT: ::UINT = 0x015e; -pub const CB_GETDROPPEDWIDTH: ::UINT = 0x015f; -pub const CB_SETDROPPEDWIDTH: ::UINT = 0x0160; -pub const CB_INITSTORAGE: ::UINT = 0x0161; -//12141 -#[repr(C)] #[derive(Clone, Copy)] -pub struct NONCLIENTMETRICSA { - pub cbSize: ::UINT, - pub iBorderWidth: ::c_int, - pub iScrollWidth: ::c_int, - pub iScrollHeight: ::c_int, - pub iCaptionWidth: ::c_int, - pub iCaptionHeight: ::c_int, - pub lfCaptionFont: ::LOGFONTA, - pub iSmCaptionWidth: ::c_int, - pub iSmCaptionHeight: ::c_int, - pub lfSmCaptionFont: ::LOGFONTA, - pub iMenuWidth: ::c_int, - pub iMenuHeight: ::c_int, - pub lfMenuFont: ::LOGFONTA, - pub lfStatusFont: ::LOGFONTA, - pub lfMessageFont: ::LOGFONTA, - pub iPaddedBorderWidth: ::c_int, -} -pub type LPNONCLIENTMETRICSA = *mut NONCLIENTMETRICSA; -#[repr(C)] #[derive(Clone, Copy)] -pub struct NONCLIENTMETRICSW { - pub cbSize: ::UINT, - pub iBorderWidth: ::c_int, - pub iScrollWidth: ::c_int, - pub iScrollHeight: ::c_int, - pub iCaptionWidth: ::c_int, - pub iCaptionHeight: ::c_int, - pub lfCaptionFont: ::LOGFONTW, - pub iSmCaptionWidth: ::c_int, - pub iSmCaptionHeight: ::c_int, - pub lfSmCaptionFont: ::LOGFONTW, - pub iMenuWidth: ::c_int, - pub iMenuHeight: ::c_int, - pub lfMenuFont: ::LOGFONTW, - pub lfStatusFont: ::LOGFONTW, - pub lfMessageFont: ::LOGFONTW, - pub iPaddedBorderWidth: ::c_int, -} -pub type LPNONCLIENTMETRICSW = *mut NONCLIENTMETRICSW; -//12900 -pub const MONITORINFOF_PRIMARY: ::DWORD = 1; -pub const CCHDEVICENAME: usize = 32; -STRUCT!{struct MONITORINFO { - cbSize: ::DWORD, - rcMonitor: ::RECT, - rcWork: ::RECT, - dwFlags: ::DWORD, -}} -pub type LPMONITORINFO = *mut MONITORINFO; -STRUCT!{struct MONITORINFOEXA { - cbSize: ::DWORD, - rcMonitor: ::RECT, - rcWork: ::RECT, - dwFlags: ::DWORD, - szDevice: [::CHAR; ::CCHDEVICENAME], -}} -pub type LPMONITORINFOEXA = *mut MONITORINFOEXA; -STRUCT!{struct MONITORINFOEXW { - cbSize: ::DWORD, - rcMonitor: ::RECT, - rcWork: ::RECT, - dwFlags: ::DWORD, - szDevice: [::WCHAR; ::CCHDEVICENAME], -}} -pub type LPMONITORINFOEXW = *mut MONITORINFOEXW; -//12971 -pub type MONITORENUMPROC = Option<unsafe extern "system" fn( - ::HMONITOR, ::HDC, ::LPRECT, ::LPARAM, -) -> ::BOOL>; -//14098 -DECLARE_HANDLE!(HRAWINPUT, HRAWINPUT__); -pub fn GET_RAWINPUT_CODE_WPARAM(wParam: ::WPARAM) -> ::WPARAM { wParam & 0xff } -pub const RIM_INPUT: ::WPARAM = 0; -pub const RIM_INPUTSINK: ::WPARAM = 1; -STRUCT!{struct RAWINPUTHEADER { - dwType: ::DWORD, - dwSize: ::DWORD, - hDevice: ::HANDLE, - wParam: ::WPARAM, -}} -pub type PRAWINPUTHEADER = *mut RAWINPUTHEADER; -pub type LPRAWINPUTHEADER = *mut RAWINPUTHEADER; -pub const RIM_TYPEMOUSE: ::DWORD = 0; -pub const RIM_TYPEKEYBOARD: ::DWORD = 1; -pub const RIM_TYPEHID: ::DWORD = 2; -STRUCT!{struct RAWMOUSE { - usFlags: ::USHORT, - memory_padding: ::USHORT, // 16bit Padding for 32bit align in following union - usButtonFlags: ::USHORT, - usButtonData: ::USHORT, - ulRawButtons: ::ULONG, - lLastX: ::LONG, - lLastY: ::LONG, - ulExtraInformation: ::ULONG, -}} -pub type PRAWMOUSE = *mut RAWMOUSE; -pub type LPRAWMOUSE = *mut RAWMOUSE; -pub const RI_MOUSE_LEFT_BUTTON_DOWN: ::USHORT = 0x0001; -pub const RI_MOUSE_LEFT_BUTTON_UP: ::USHORT = 0x0002; -pub const RI_MOUSE_RIGHT_BUTTON_DOWN: ::USHORT = 0x0004; -pub const RI_MOUSE_RIGHT_BUTTON_UP: ::USHORT = 0x0008; -pub const RI_MOUSE_MIDDLE_BUTTON_DOWN: ::USHORT = 0x0010; -pub const RI_MOUSE_MIDDLE_BUTTON_UP: ::USHORT = 0x0020; -pub const RI_MOUSE_BUTTON_1_DOWN: ::USHORT = RI_MOUSE_LEFT_BUTTON_DOWN; -pub const RI_MOUSE_BUTTON_1_UP: ::USHORT = RI_MOUSE_LEFT_BUTTON_UP; -pub const RI_MOUSE_BUTTON_2_DOWN: ::USHORT = RI_MOUSE_RIGHT_BUTTON_DOWN; -pub const RI_MOUSE_BUTTON_2_UP: ::USHORT = RI_MOUSE_RIGHT_BUTTON_UP; -pub const RI_MOUSE_BUTTON_3_DOWN: ::USHORT = RI_MOUSE_MIDDLE_BUTTON_DOWN; -pub const RI_MOUSE_BUTTON_3_UP: ::USHORT = RI_MOUSE_MIDDLE_BUTTON_UP; -pub const RI_MOUSE_BUTTON_4_DOWN: ::USHORT = 0x0040; -pub const RI_MOUSE_BUTTON_4_UP: ::USHORT = 0x0080; -pub const RI_MOUSE_BUTTON_5_DOWN: ::USHORT = 0x0100; -pub const RI_MOUSE_BUTTON_5_UP: ::USHORT = 0x0200; -pub const RI_MOUSE_WHEEL: ::USHORT = 0x0400; -pub const MOUSE_MOVE_RELATIVE: ::USHORT = 0; -pub const MOUSE_MOVE_ABSOLUTE: ::USHORT = 1; -pub const MOUSE_VIRTUAL_DESKTOP: ::USHORT = 0x02; -pub const MOUSE_ATTRIBUTES_CHANGED: ::USHORT = 0x04; -pub const MOUSE_MOVE_NOCOALESCE: ::USHORT = 0x08; -STRUCT!{struct RAWKEYBOARD { - MakeCode: ::USHORT, - Flags: ::USHORT, - Reserved: ::USHORT, - VKey: ::USHORT, - Message: ::UINT, - ExtraInformation: ::ULONG, -}} -pub type PRAWKEYBOARD = *mut RAWKEYBOARD; -pub type LPRAWKEYBOARD = *mut RAWKEYBOARD; -pub const KEYBOARD_OVERRUN_MAKE_CODE: ::DWORD = 0xFF; -pub const RI_KEY_MAKE: ::DWORD = 0; -pub const RI_KEY_BREAK: ::DWORD = 1; -pub const RI_KEY_E0: ::DWORD = 2; -pub const RI_KEY_E1: ::DWORD = 4; -pub const RI_KEY_TERMSRV_SET_LED: ::DWORD = 8; -pub const RI_KEY_TERMSRV_SHADOW: ::DWORD = 0x10; -#[repr(C)] #[derive(Debug)] #[allow(missing_copy_implementations)] -pub struct RAWHID { - pub dwSizeHid: ::DWORD, - pub dwCount: ::DWORD, - pub bRawData: [::BYTE; 0], -} -pub type PRAWHID = *mut RAWHID; -pub type LPRAWHID = *mut RAWHID; -STRUCT!{struct RAWINPUT { - header: RAWINPUTHEADER, - mouse: RAWMOUSE, -}} -UNION!(RAWINPUT, mouse, mouse, mouse_mut, RAWMOUSE); -UNION!(RAWINPUT, mouse, keyboard, keyboard_mut, RAWKEYBOARD); -UNION!(RAWINPUT, mouse, hid, hid_mut, RAWHID); -#[test] -fn test_RAWINPUT() { - use std::mem::{size_of, align_of}; - assert!(size_of::<RAWMOUSE>() >= size_of::<RAWMOUSE>()); - assert!(size_of::<RAWMOUSE>() >= size_of::<RAWKEYBOARD>()); - assert!(size_of::<RAWMOUSE>() >= size_of::<RAWHID>()); - assert!(align_of::<RAWMOUSE>() >= align_of::<RAWMOUSE>()); - assert!(align_of::<RAWMOUSE>() >= align_of::<RAWKEYBOARD>()); - assert!(align_of::<RAWMOUSE>() >= align_of::<RAWHID>()); -} -pub type PRAWINPUT = *mut RAWINPUT; -pub type LPRAWINPUT = *mut RAWINPUT; -pub const RID_INPUT: ::DWORD = 0x10000003; -pub const RID_HEADER: ::DWORD = 0x10000005; -pub const RIDI_PREPARSEDDATA: ::DWORD = 0x20000005; -pub const RIDI_DEVICENAME: ::DWORD = 0x20000007; -pub const RIDI_DEVICEINFO: ::DWORD = 0x2000000b; -STRUCT!{struct RID_DEVICE_INFO_MOUSE { - dwId: ::DWORD, - dwNumberOfButtons: ::DWORD, - dwSampleRate: ::DWORD, - fHasHorizontalWheel: ::BOOL, -}} -pub type PRID_DEVICE_INFO_MOUSE = *mut RID_DEVICE_INFO_MOUSE; -STRUCT!{struct RID_DEVICE_INFO_KEYBOARD { - dwType: ::DWORD, - dwSubType: ::DWORD, - dwKeyboardMode: ::DWORD, - dwNumberOfFunctionKeys: ::DWORD, - dwNumberOfIndicators: ::DWORD, - dwNumberOfKeysTotal: ::DWORD, -}} -pub type PRID_DEVICE_INFO_KEYBOARD = *mut RID_DEVICE_INFO_KEYBOARD; -STRUCT!{struct RID_DEVICE_INFO_HID { - dwVendorId: ::DWORD, - dwProductId: ::DWORD, - dwVersionNumber: ::DWORD, - usUsagePage: ::USHORT, - usUsage: ::USHORT, -}} -pub type PRID_DEVICE_INFO_HID = *mut RID_DEVICE_INFO_HID; -STRUCT!{struct RID_DEVICE_INFO { - cbSize: ::DWORD, - dwType: ::DWORD, - keyboard: RID_DEVICE_INFO_KEYBOARD, -}} -UNION!(RID_DEVICE_INFO, keyboard, mouse, mouse_mut, RID_DEVICE_INFO_MOUSE); -UNION!(RID_DEVICE_INFO, keyboard, keyboard, keyboard_mut, RID_DEVICE_INFO_KEYBOARD); -UNION!(RID_DEVICE_INFO, keyboard, hid, hid_mut, RID_DEVICE_INFO_HID); -#[test] -fn test_RID_DEVICE_INFO() { - use std::mem::{size_of, align_of}; - assert!(size_of::<RID_DEVICE_INFO_KEYBOARD>() >= size_of::<RID_DEVICE_INFO_MOUSE>()); - assert!(size_of::<RID_DEVICE_INFO_KEYBOARD>() >= size_of::<RID_DEVICE_INFO_KEYBOARD>()); - assert!(size_of::<RID_DEVICE_INFO_KEYBOARD>() >= size_of::<RID_DEVICE_INFO_HID>()); - assert!(align_of::<RID_DEVICE_INFO_KEYBOARD>() >= align_of::<RID_DEVICE_INFO_MOUSE>()); - assert!(align_of::<RID_DEVICE_INFO_KEYBOARD>() - >= align_of::<RID_DEVICE_INFO_KEYBOARD>()); - assert!(align_of::<RID_DEVICE_INFO_KEYBOARD>() >= align_of::<RID_DEVICE_INFO_HID>()); -} -pub type PRID_DEVICE_INFO = *mut RID_DEVICE_INFO; -pub type LPRID_DEVICE_INFO = *mut RID_DEVICE_INFO; -STRUCT!{struct RAWINPUTDEVICE { - usUsagePage: ::USHORT, - usUsage: ::USHORT, - dwFlags: ::DWORD, - hwndTarget: ::HWND, -}} -pub type PRAWINPUTDEVICE = *mut RAWINPUTDEVICE; -pub type LPRAWINPUTDEVICE = *mut RAWINPUTDEVICE; -pub type PCRAWINPUTDEVICE = *const RAWINPUTDEVICE; -pub const RIDEV_REMOVE: ::DWORD = 0x00000001; -pub const RIDEV_EXCLUDE: ::DWORD = 0x00000010; -pub const RIDEV_PAGEONLY: ::DWORD = 0x00000020; -pub const RIDEV_NOLEGACY: ::DWORD = 0x00000030; -pub const RIDEV_INPUTSINK: ::DWORD = 0x00000100; -pub const RIDEV_CAPTUREMOUSE: ::DWORD = 0x00000200; -pub const RIDEV_NOHOTKEYS: ::DWORD = 0x00000200; -pub const RIDEV_APPKEYS: ::DWORD = 0x00000400; -pub const RIDEV_EXINPUTSINK: ::DWORD = 0x00001000; -pub const RIDEV_DEVNOTIFY: ::DWORD = 0x00002000; -pub const RIDEV_EXMODEMASK: ::DWORD = 0x000000F0; -pub const GIDC_ARRIVAL: ::DWORD = 1; -pub const GIDC_REMOVAL: ::DWORD = 2; -STRUCT!{struct RAWINPUTDEVICELIST { - hDevice: ::HANDLE, - dwType: ::DWORD, -}} -pub type PRAWINPUTDEVICELIST = *mut RAWINPUTDEVICELIST; -STRUCT!{struct CHANGEFILTERSTRUCT { - cbSize: ::DWORD, - ExtStatus: ::DWORD, -}} -pub type PCHANGEFILTERSTRUCT = *mut CHANGEFILTERSTRUCT; -STRUCT!{struct DLGTEMPLATE { - style: ::DWORD, - dwExtendedStyle: ::DWORD, - cdit: ::WORD, - x: ::c_short, - y: ::c_short, - cx: ::c_short, - cy: ::c_short, -}} -pub type LPDLGTEMPLATEA = *mut DLGTEMPLATE; -pub type LPDLGTEMPLATEW = *mut DLGTEMPLATE; -pub type LPCDLGTEMPLATEA = *const DLGTEMPLATE; -pub type LPCDLGTEMPLATEW = *const DLGTEMPLATE; -STRUCT!{struct DRAWTEXTPARAMS { - cbSize: ::UINT, - iTabLength: ::c_int, - iLeftMargin: ::c_int, - iRightMargin: ::c_int, - uiLengthDrawn: ::UINT, -}} -pub type LPDRAWTEXTPARAMS = *mut DRAWTEXTPARAMS; -STRUCT!{struct ACCEL { - fVirt: ::BYTE, - key: ::WORD, - cmd: ::WORD, -}} -pub type LPACCEL = *mut ACCEL; -STRUCT!{struct MENUITEMINFOA { - cbSize: ::UINT, - fMask: ::UINT, - fType: ::UINT, - fState: ::UINT, - wID: ::UINT, - hSubMenu: ::HMENU, - hbmpChecked: ::HBITMAP, - hbmpUnchecked: ::HBITMAP, - dwItemData: ::ULONG_PTR, - dwTypeData: ::LPSTR, - cch: ::UINT, - hbmpItem: ::HBITMAP, -}} -pub type LPMENUITEMINFOA = *mut MENUITEMINFOA; -pub type LPCMENUITEMINFOA = *const MENUITEMINFOA; -STRUCT!{struct MENUITEMINFOW { - cbSize: ::UINT, - fMask: ::UINT, - fType: ::UINT, - fState: ::UINT, - wID: ::UINT, - hSubMenu: ::HMENU, - hbmpChecked: ::HBITMAP, - hbmpUnchecked: ::HBITMAP, - dwItemData: ::ULONG_PTR, - dwTypeData: ::LPWSTR, - cch: ::UINT, - hbmpItem: ::HBITMAP, -}} -pub type LPMENUITEMINFOW = *mut MENUITEMINFOW; -pub type LPCMENUITEMINFOW = *const MENUITEMINFOW; -#[repr(C)] #[derive(Copy)] -pub struct MSGBOXPARAMSA { - pub cbSize: ::UINT, - pub hwndOwner: ::HWND, - pub hInstance: ::HINSTANCE, - pub lpszText: ::LPCSTR, - pub lpszCaption: ::LPCSTR, - pub dwStyle: ::DWORD, - pub lpszIcon: ::LPCSTR, - pub dwContextHelpId: ::DWORD_PTR, - pub lpfnMsgBoxCallback: ::MSGBOXCALLBACK, - pub dwLanguageId: ::DWORD, -} -impl Clone for MSGBOXPARAMSA { fn clone(&self) -> MSGBOXPARAMSA { *self } } -pub type PMSGBOXPARAMSA = *mut MSGBOXPARAMSA; -pub type LPMSGBOXPARAMSA = *mut MSGBOXPARAMSA; -#[repr(C)] #[derive(Copy)] -pub struct MSGBOXPARAMSW { - pub cbSize: ::UINT, - pub hwndOwner: ::HWND, - pub hInstance: ::HINSTANCE, - pub lpszText: ::LPCWSTR, - pub lpszCaption: ::LPCWSTR, - pub dwStyle: ::DWORD, - pub lpszIcon: ::LPCWSTR, - pub dwContextHelpId: ::DWORD_PTR, - pub lpfnMsgBoxCallback: ::MSGBOXCALLBACK, - pub dwLanguageId: ::DWORD, -} -impl Clone for MSGBOXPARAMSW { fn clone(&self) -> MSGBOXPARAMSW { *self } } -pub type PMSGBOXPARAMSW = *mut MSGBOXPARAMSW; -pub type LPMSGBOXPARAMSW = *mut MSGBOXPARAMSW; -STRUCT!{struct HELPINFO { - cbSize: ::UINT, - iContextType: ::c_int, - iCtrlId: ::c_int, - hItemHandle: ::HANDLE, - dwContextId: ::DWORD, - MousePos: ::POINT, -}} -pub type LPHELPINFO = *mut HELPINFO; -pub fn GET_WHEEL_DELTA_WPARAM(wParam: ::WPARAM) -> ::c_short { - ::HIWORD(wParam as ::DWORD) as ::c_short -} -pub fn GET_KEYSTATE_WPARAM(wparam: ::WPARAM) -> ::c_int { - ::LOWORD(wparam as ::DWORD) as ::c_short as ::c_int -} -pub const SIF_RANGE: ::UINT = 0x0001; -pub const SIF_PAGE: ::UINT = 0x0002; -pub const SIF_POS: ::UINT = 0x0004; -pub const SIF_DISABLENOSCROLL: ::UINT = 0x0008; -pub const SIF_TRACKPOS: ::UINT = 0x0010; -pub const SIF_ALL: ::UINT = SIF_RANGE | SIF_PAGE | SIF_POS | SIF_TRACKPOS; -pub const SW_SCROLLCHILDREN: ::UINT = 0x0001; -pub const SW_INVALIDATE: ::UINT = 0x0002; -pub const SW_ERASE: ::UINT = 0x0004; -pub const SW_SMOOTHSCROLL: ::UINT = 0x0010; -pub const SB_LINEUP: ::c_int = 0; -pub const SB_LINELEFT: ::c_int = 0; -pub const SB_LINEDOWN: ::c_int = 1; -pub const SB_LINERIGHT: ::c_int = 1; -pub const SB_PAGEUP: ::c_int = 2; -pub const SB_PAGELEFT: ::c_int = 2; -pub const SB_PAGEDOWN: ::c_int = 3; -pub const SB_PAGERIGHT: ::c_int = 3; -pub const SB_THUMBPOSITION: ::c_int = 4; -pub const SB_THUMBTRACK: ::c_int = 5; -pub const SB_TOP: ::c_int = 6; -pub const SB_LEFT: ::c_int = 6; -pub const SB_BOTTOM: ::c_int = 7; -pub const SB_RIGHT: ::c_int = 7; -pub const SB_ENDSCROLL: ::c_int = 8; -pub const LR_DEFAULTCOLOR: ::UINT = 0x00000000; -pub const LR_MONOCHROME: ::UINT = 0x00000001; -pub const LR_COLOR: ::UINT = 0x00000002; -pub const LR_COPYRETURNORG: ::UINT = 0x00000004; -pub const LR_COPYDELETEORG: ::UINT = 0x00000008; -pub const LR_LOADFROMFILE: ::UINT = 0x00000010; -pub const LR_LOADTRANSPARENT: ::UINT = 0x00000020; -pub const LR_DEFAULTSIZE: ::UINT = 0x00000040; -pub const LR_VGACOLOR: ::UINT = 0x00000080; -pub const LR_LOADMAP3DCOLORS: ::UINT = 0x00001000; -pub const LR_CREATEDIBSECTION: ::UINT = 0x00002000; -pub const LR_COPYFROMRESOURCE: ::UINT = 0x00004000; -pub const LR_SHARED: ::UINT = 0x00008000; -pub const IMAGE_BITMAP: ::UINT = 0; -pub const IMAGE_ICON: ::UINT = 1; -pub const IMAGE_CURSOR: ::UINT = 2; -pub const IMAGE_ENHMETAFILE: ::UINT = 3; -pub const DT_TOP: ::UINT = 0x00000000; -pub const DT_LEFT: ::UINT = 0x00000000; -pub const DT_CENTER: ::UINT = 0x00000001; -pub const DT_RIGHT: ::UINT = 0x00000002; -pub const DT_VCENTER: ::UINT = 0x00000004; -pub const DT_BOTTOM: ::UINT = 0x00000008; -pub const DT_WORDBREAK: ::UINT = 0x00000010; -pub const DT_SINGLELINE: ::UINT = 0x00000020; -pub const DT_EXPANDTABS: ::UINT = 0x00000040; -pub const DT_TABSTOP: ::UINT = 0x00000080; -pub const DT_NOCLIP: ::UINT = 0x00000100; -pub const DT_EXTERNALLEADING: ::UINT = 0x00000200; -pub const DT_CALCRECT: ::UINT = 0x00000400; -pub const DT_NOPREFIX: ::UINT = 0x00000800; -pub const DT_INTERNAL: ::UINT = 0x00001000; -pub const DT_EDITCONTROL: ::UINT = 0x00002000; -pub const DT_PATH_ELLIPSIS: ::UINT = 0x00004000; -pub const DT_END_ELLIPSIS: ::UINT = 0x00008000; -pub const DT_MODIFYSTRING: ::UINT = 0x00010000; -pub const DT_RTLREADING: ::UINT = 0x00020000; -pub const DT_WORD_ELLIPSIS: ::UINT = 0x00040000; -pub const DT_NOFULLWIDTHCHARBREAK: ::UINT = 0x00080000; -pub const DT_HIDEPREFIX: ::UINT = 0x00100000; -pub const DT_PREFIXONLY: ::UINT = 0x00200000; -STRUCT!{struct KBDLLHOOKSTRUCT { - vkCode: ::DWORD, - scanCode: ::DWORD, - flags: ::DWORD, - time: ::DWORD, - dwExtraInfo: ::ULONG_PTR, -}} -pub type PKBDLLHOOKSTRUCT = *mut KBDLLHOOKSTRUCT; -pub type LPKBDLLHOOKSTRUCT = *mut KBDLLHOOKSTRUCT; -STRUCT!{struct MSLLHOOKSTRUCT { - pt: ::POINT, - mouseData: ::DWORD, - flags: ::DWORD, - time: ::DWORD, - dwExtraInfo: ::ULONG_PTR, -}} -pub type PMSLLHOOKSTRUCT = *mut MSLLHOOKSTRUCT; -pub type LPMSLLHOOKSTRUCT = *mut MSLLHOOKSTRUCT; -pub const WH_MIN: ::c_int = -1; -pub const WH_MSGFILTER: ::c_int = -1; -pub const WH_JOURNALRECORD: ::c_int = 0; -pub const WH_JOURNALPLAYBACK: ::c_int = 1; -pub const WH_KEYBOARD: ::c_int = 2; -pub const WH_GETMESSAGE: ::c_int = 3; -pub const WH_CALLWNDPROC: ::c_int = 4; -pub const WH_CBT: ::c_int = 5; -pub const WH_SYSMSGFILTER: ::c_int = 6; -pub const WH_MOUSE: ::c_int = 7; -pub const WH_HARDWARE: ::c_int = 8; -pub const WH_DEBUG: ::c_int = 9; -pub const WH_SHELL: ::c_int = 10; -pub const WH_FOREGROUNDIDLE: ::c_int = 11; -pub const WH_CALLWNDPROCRET: ::c_int = 12; -pub const WH_KEYBOARD_LL: ::c_int = 13; -pub const WH_MOUSE_LL: ::c_int = 14; -pub const WH_MAX: ::c_int = 14; -pub const WH_MINHOOK: ::c_int = WH_MIN; -pub const WH_MAXHOOK: ::c_int = WH_MAX; -pub const KLF_ACTIVATE: ::UINT = 1; -pub const KLF_SUBSTITUTE_OK: ::UINT = 2; -pub const KLF_UNLOADPREVIOUS: ::UINT = 4; -pub const KLF_REORDER: ::UINT = 8; -pub const KLF_REPLACELANG: ::UINT = 16; -pub const KLF_NOTELLSHELL: ::UINT = 128; -pub const KLF_SETFORPROCESS: ::UINT = 256; -//RedrawWindow() flags -pub const RDW_INVALIDATE: ::UINT = 0x0001; -pub const RDW_INTERNALPAINT: ::UINT = 0x0002; -pub const RDW_ERASE: ::UINT = 0x0004; -pub const RDW_VALIDATE: ::UINT = 0x0008; -pub const RDW_NOINTERNALPAINT: ::UINT = 0x0010; -pub const RDW_NOERASE: ::UINT = 0x0020; -pub const RDW_NOCHILDREN: ::UINT = 0x0040; -pub const RDW_ALLCHILDREN: ::UINT = 0x0080; -pub const RDW_UPDATENOW: ::UINT = 0x0100; -pub const RDW_ERASENOW: ::UINT = 0x0200; -pub const RDW_FRAME: ::UINT = 0x0400; -pub const RDW_NOFRAME: ::UINT = 0x0800; -STRUCT!{struct MEASUREITEMSTRUCT { - CtlType: ::UINT, - CtlID: ::UINT, - itemID: ::UINT, - itemWidth: ::UINT, - itemHeight: ::UINT, - itemData: ::ULONG_PTR, -}} -pub type LPMEASUREITEMSTRUCT = *mut MEASUREITEMSTRUCT; -STRUCT!{struct DRAWITEMSTRUCT { - CtlType: ::UINT, - CtlID: ::UINT, - itemID: ::UINT, - itemAction: ::UINT, - itemState: ::UINT, - hwndItem: ::HWND, - hDC: ::HDC, - rcItem: ::RECT, - itemData: ::ULONG_PTR, -}} -pub type LPDRAWITEMSTRUCT = *mut DRAWITEMSTRUCT; -STRUCT!{struct DELETEITEMSTRUCT { - CtlType: ::UINT, - CtlID: ::UINT, - itemID: ::UINT, - hwndItem: ::HWND, - itemData: ::ULONG_PTR, -}} -pub type LPDELETEITEMSTRUCT = *mut DELETEITEMSTRUCT; -STRUCT!{struct COMPAREITEMSTRUCT { - CtlType: ::UINT, - CtlID: ::UINT, - hwndItem: ::HWND, - itemID1: ::UINT, - itemData1: ::ULONG_PTR, - itemID2: ::UINT, - itemData2: ::ULONG_PTR, - dwLocaleId: ::DWORD, -}} -pub type LPCOMPAREITEMSTRUCT = *mut COMPAREITEMSTRUCT; -/* Image type */ -pub const DST_COMPLEX: ::UINT = 0x0000; -pub const DST_TEXT: ::UINT = 0x0001; -pub const DST_PREFIXTEXT: ::UINT = 0x0002; -pub const DST_ICON: ::UINT = 0x0003; -pub const DST_BITMAP: ::UINT = 0x0004; -pub const DI_MASK: ::UINT = 0x0001; -pub const DI_IMAGE: ::UINT = 0x0002; -pub const DI_NORMAL: ::UINT = 0x0003; -pub const DI_COMPAT: ::UINT = 0x0004; -pub const DI_DEFAULTSIZE: ::UINT = 0x0008; diff --git a/deps/winapi-0.2.5/src/ws2def.rs b/deps/winapi-0.2.5/src/ws2def.rs deleted file mode 100644 index 6a79916f3..000000000 --- a/deps/winapi-0.2.5/src/ws2def.rs +++ /dev/null @@ -1,284 +0,0 @@ -// Copyright © 2015, Peter Atashian -// Licensed under the MIT License <LICENSE.md> -//! This file contains the core definitions for the Winsock2 specification that can be used by -//! both user-mode and kernel mode modules. -pub type ADDRESS_FAMILY = ::USHORT; -pub const AF_UNSPEC: ::c_int = 0; -pub const AF_UNIX: ::c_int = 1; -pub const AF_INET: ::c_int = 2; -pub const AF_IMPLINK: ::c_int = 3; -pub const AF_PUP: ::c_int = 4; -pub const AF_CHAOS: ::c_int = 5; -pub const AF_NS: ::c_int = 6; -pub const AF_IPX: ::c_int = AF_NS; -pub const AF_ISO: ::c_int = 7; -pub const AF_OSI: ::c_int = AF_ISO; -pub const AF_ECMA: ::c_int = 8; -pub const AF_DATAKIT: ::c_int = 9; -pub const AF_CCITT: ::c_int = 10; -pub const AF_SNA: ::c_int = 11; -pub const AF_DECnet: ::c_int = 12; -pub const AF_DLI: ::c_int = 13; -pub const AF_LAT: ::c_int = 14; -pub const AF_HYLINK: ::c_int = 15; -pub const AF_APPLETALK: ::c_int = 16; -pub const AF_NETBIOS: ::c_int = 17; -pub const AF_VOICEVIEW: ::c_int = 18; -pub const AF_FIREFOX: ::c_int = 19; -pub const AF_UNKNOWN1: ::c_int = 20; -pub const AF_BAN: ::c_int = 21; -pub const AF_ATM: ::c_int = 22; -pub const AF_INET6: ::c_int = 23; -pub const AF_CLUSTER: ::c_int = 24; -pub const AF_12844: ::c_int = 25; -pub const AF_IRDA: ::c_int = 26; -pub const AF_NETDES: ::c_int = 28; -pub const AF_TCNPROCESS: ::c_int = 29; -pub const AF_TCNMESSAGE: ::c_int = 30; -pub const AF_ICLFXBM: ::c_int = 31; -pub const AF_BTH: ::c_int = 32; -pub const AF_LINK: ::c_int = 33; -pub const AF_MAX: ::c_int = 34; -pub const SOCK_STREAM: ::c_int = 1; -pub const SOCK_DGRAM: ::c_int = 2; -pub const SOCK_RAW: ::c_int = 3; -pub const SOCK_RDM: ::c_int = 4; -pub const SOCK_SEQPACKET: ::c_int = 5; -pub const SOL_SOCKET: ::c_int = 0xffff; -pub const SO_DEBUG: ::c_int = 0x0001; -pub const SO_ACCEPTCONN: ::c_int = 0x0002; -pub const SO_REUSEADDR: ::c_int = 0x0004; -pub const SO_KEEPALIVE: ::c_int = 0x0008; -pub const SO_DONTROUTE: ::c_int = 0x0010; -pub const SO_BROADCAST: ::c_int = 0x0020; -pub const SO_USELOOPBACK: ::c_int = 0x0040; -pub const SO_LINGER: ::c_int = 0x0080; -pub const SO_OOBINLINE: ::c_int = 0x0100; -pub const SO_DONTLINGER: ::c_int = !SO_LINGER; -pub const SO_EXCLUSIVEADDRUSE: ::c_int = !SO_REUSEADDR; -pub const SO_SNDBUF: ::c_int = 0x1001; -pub const SO_RCVBUF: ::c_int = 0x1002; -pub const SO_SNDLOWAT: ::c_int = 0x1003; -pub const SO_RCVLOWAT: ::c_int = 0x1004; -pub const SO_SNDTIMEO: ::c_int = 0x1005; -pub const SO_RCVTIMEO: ::c_int = 0x1006; -pub const SO_ERROR: ::c_int = 0x1007; -pub const SO_TYPE: ::c_int = 0x1008; -pub const SO_BSP_STATE: ::c_int = 0x1009; -pub const SO_GROUP_ID: ::c_int = 0x2001; -pub const SO_GROUP_PRIORITY: ::c_int = 0x2002; -pub const SO_MAX_MSG_SIZE: ::c_int = 0x2003; -pub const SO_CONDITIONAL_ACCEPT: ::c_int = 0x3002; -pub const SO_PAUSE_ACCEPT: ::c_int = 0x3003; -pub const SO_COMPARTMENT_ID: ::c_int = 0x3004; -pub const SO_RANDOMIZE_PORT: ::c_int = 0x3005; -pub const SO_PORT_SCALABILITY: ::c_int = 0x3006; -pub const WSK_SO_BASE: ::c_int = 0x4000; -pub const TCP_NODELAY: ::c_int = 0x0001; -STRUCT!{struct SOCKADDR { - sa_family: ADDRESS_FAMILY, - sa_data: [::CHAR; 14], -}} -pub type PSOCKADDR = *mut SOCKADDR; -pub type LPSOCKADDR = *mut SOCKADDR; -STRUCT!{struct SOCKET_ADDRESS { - lpSockaddr: LPSOCKADDR, - iSockaddrLength: ::INT, -}} -pub type PSOCKET_ADDRESS = *mut SOCKET_ADDRESS; -pub type LPSOCKET_ADDRESS = *mut SOCKET_ADDRESS; -#[repr(C)] #[derive(Debug)] #[allow(missing_copy_implementations)] -pub struct SOCKET_ADDRESS_LIST { - pub iAddressCount: ::INT, - pub Address: [SOCKET_ADDRESS; 0], -} -pub type PSOCKET_ADDRESS_LIST = *mut SOCKET_ADDRESS_LIST; -pub type LPSOCKET_ADDRESS_LIST = *mut SOCKET_ADDRESS_LIST; -STRUCT!{struct CSADDR_INFO { - LocalAddr: SOCKET_ADDRESS, - RemoteAddr: SOCKET_ADDRESS, - iSocketType: ::INT, - iProtocol: ::INT, -}} -pub type PCSADDR_INFO = *mut CSADDR_INFO; -pub type LPCSADDR_INFO = *mut CSADDR_INFO; -#[repr(C)] #[derive(Copy)] -pub struct SOCKADDR_STORAGE_LH { - pub ss_family: ADDRESS_FAMILY, - pub __ss_pad1: [::CHAR; 6], - pub __ss_align: ::__int64, - pub __ss_pad2: [::CHAR; 112], -} -impl Clone for SOCKADDR_STORAGE_LH { fn clone(&self) -> SOCKADDR_STORAGE_LH { *self } } -pub type PSOCKADDR_STORAGE_LH = *mut SOCKADDR_STORAGE_LH; -pub type LPSOCKADDR_STORAGE_LH = *mut SOCKADDR_STORAGE_LH; -#[repr(C)] #[derive(Copy)] -pub struct SOCKADDR_STORAGE_XP { - pub ss_family: ::c_short, - pub __ss_pad1: [::CHAR; 6], - pub __ss_align: ::__int64, - pub __ss_pad2: [::CHAR; 112], -} -impl Clone for SOCKADDR_STORAGE_XP { fn clone(&self) -> SOCKADDR_STORAGE_XP { *self } } -pub type PSOCKADDR_STORAGE_XP = *mut SOCKADDR_STORAGE_XP; -pub type LPSOCKADDR_STORAGE_XP = *mut SOCKADDR_STORAGE_XP; -pub type SOCKADDR_STORAGE = SOCKADDR_STORAGE_LH; -pub type PSOCKADDR_STORAGE = *mut SOCKADDR_STORAGE; -pub type LPSOCKADDR_STORAGE = *mut SOCKADDR_STORAGE; -STRUCT!{struct SOCKET_PROCESSOR_AFFINITY { - Processor: ::PROCESSOR_NUMBER, - NumaNodeId: ::USHORT, - Reserved: ::USHORT, -}} -pub type PSOCKET_PROCESSOR_AFFINITY = *mut SOCKET_PROCESSOR_AFFINITY; -pub const IOC_UNIX: ::DWORD = 0x00000000; -pub const IOC_WS2: ::DWORD = 0x08000000; -pub const IOC_PROTOCOL: ::DWORD = 0x10000000; -pub const IOC_VENDOR: ::DWORD = 0x18000000; -pub const IOC_WSK: ::DWORD = IOC_WS2 | 0x07000000; -macro_rules! _WSAIO { ($x:expr, $y:expr) => { IOC_VOID | $x | $y } } -macro_rules! _WSAIOR { ($x:expr, $y:expr) => { IOC_OUT | $x | $y } } -macro_rules! _WSAIOW { ($x:expr, $y:expr) => { IOC_IN | $x | $y } } -macro_rules! _WSAIORW { ($x:expr, $y:expr) => { IOC_INOUT | $x | $y } } -pub const SIO_ASSOCIATE_HANDLE: ::DWORD = _WSAIOW!(IOC_WS2, 1); -pub const SIO_ENABLE_CIRCULAR_QUEUEING: ::DWORD = _WSAIO!(IOC_WS2, 2); -pub const SIO_FIND_ROUTE: ::DWORD = _WSAIOR!(IOC_WS2, 3); -pub const SIO_FLUSH: ::DWORD = _WSAIO!(IOC_WS2, 4); -pub const SIO_GET_BROADCAST_ADDRESS: ::DWORD = _WSAIOR!(IOC_WS2, 5); -pub const SIO_GET_EXTENSION_FUNCTION_POINTER: ::DWORD = _WSAIORW!(IOC_WS2, 6); -pub const SIO_GET_QOS: ::DWORD = _WSAIORW!(IOC_WS2, 7); -pub const SIO_GET_GROUP_QOS: ::DWORD = _WSAIORW!(IOC_WS2, 8); -pub const SIO_MULTIPOINT_LOOPBACK: ::DWORD = _WSAIOW!(IOC_WS2, 9); -pub const SIO_MULTICAST_SCOPE: ::DWORD = _WSAIOW!(IOC_WS2, 10); -pub const SIO_SET_QOS: ::DWORD = _WSAIOW!(IOC_WS2, 11); -pub const SIO_SET_GROUP_QOS: ::DWORD = _WSAIOW!(IOC_WS2, 12); -pub const SIO_TRANSLATE_HANDLE: ::DWORD = _WSAIORW!(IOC_WS2, 13); -pub const SIO_ROUTING_INTERFACE_QUERY: ::DWORD = _WSAIORW!(IOC_WS2, 20); -pub const SIO_ROUTING_INTERFACE_CHANGE: ::DWORD = _WSAIOW!(IOC_WS2, 21); -pub const SIO_ADDRESS_LIST_QUERY: ::DWORD = _WSAIOR!(IOC_WS2, 22); -pub const SIO_ADDRESS_LIST_CHANGE: ::DWORD = _WSAIO!(IOC_WS2, 23); -pub const SIO_QUERY_TARGET_PNP_HANDLE: ::DWORD = _WSAIOR!(IOC_WS2, 24); -pub const SIO_QUERY_RSS_PROCESSOR_INFO: ::DWORD = _WSAIOR!(IOC_WS2, 37); -pub const SIO_ADDRESS_LIST_SORT: ::DWORD = _WSAIORW!(IOC_WS2, 25); -pub const SIO_RESERVED_1: ::DWORD = _WSAIOW!(IOC_WS2, 26); -pub const SIO_RESERVED_2: ::DWORD = _WSAIOW!(IOC_WS2, 33); -pub const SIO_GET_MULTIPLE_EXTENSION_FUNCTION_POINTER: ::DWORD = _WSAIORW!(IOC_WS2, 36); -pub const IPPROTO_IP: ::c_int = 0; -ENUM!{enum IPPROTO { - IPPROTO_HOPOPTS = 0, // IPv6 Hop-by-Hop options - IPPROTO_ICMP = 1, - IPPROTO_IGMP = 2, - IPPROTO_GGP = 3, - IPPROTO_IPV4 = 4, - IPPROTO_ST = 5, - IPPROTO_TCP = 6, - IPPROTO_CBT = 7, - IPPROTO_EGP = 8, - IPPROTO_IGP = 9, - IPPROTO_PUP = 12, - IPPROTO_UDP = 17, - IPPROTO_IDP = 22, - IPPROTO_RDP = 27, - IPPROTO_IPV6 = 41, // IPv6 header - IPPROTO_ROUTING = 43, // IPv6 Routing header - IPPROTO_FRAGMENT = 44, // IPv6 fragmentation header - IPPROTO_ESP = 50, // encapsulating security payload - IPPROTO_AH = 51, // authentication header - IPPROTO_ICMPV6 = 58, // ICMPv6 - IPPROTO_NONE = 59, // IPv6 no next header - IPPROTO_DSTOPTS = 60, // IPv6 Destination options - IPPROTO_ND = 77, - IPPROTO_ICLFXBM = 78, - IPPROTO_PIM = 103, - IPPROTO_PGM = 113, - IPPROTO_L2TP = 115, - IPPROTO_SCTP = 132, - IPPROTO_RAW = 255, - IPPROTO_MAX = 256, - IPPROTO_RESERVED_RAW = 257, - IPPROTO_RESERVED_IPSEC = 258, - IPPROTO_RESERVED_IPSECOFFLOAD = 259, - IPPROTO_RESERVED_WNV = 260, - IPPROTO_RESERVED_MAX = 261, -}} -pub type PIPPROTO = *mut IPPROTO; -STRUCT!{struct SOCKADDR_IN { - sin_family: ADDRESS_FAMILY, - sin_port: ::USHORT, - sin_addr: ::IN_ADDR, - sin_zero: [::CHAR; 8], -}} -pub type PSOCKADDR_IN = *mut SOCKADDR_IN; -//645 -pub const IOCPARM_MASK: ::DWORD = 0x7f; -pub const IOC_VOID: ::DWORD = 0x20000000; -pub const IOC_OUT: ::DWORD = 0x40000000; -pub const IOC_IN: ::DWORD = 0x80000000; -pub const IOC_INOUT: ::DWORD = IOC_IN | IOC_OUT; -STRUCT!{struct WSABUF { - len: ::ULONG, - buf: *mut ::CHAR, -}} -pub type LPWSABUF = *mut WSABUF; -STRUCT!{struct WSAMSG { - name: LPSOCKADDR, - namelen: ::INT, - lpBuffers: LPWSABUF, - dwBufferCount: ::ULONG, - Control: WSABUF, - dwFlags: ::ULONG, -}} -pub type PWSAMSG = *mut WSAMSG; -pub type LPWSAMSG = *mut WSAMSG; -STRUCT!{struct ADDRINFOA { - ai_flags: ::c_int, - ai_family: ::c_int, - ai_socktype: ::c_int, - ai_protocol: ::c_int, - ai_addrlen: ::size_t, - ai_canonname: *mut ::c_char, - ai_addr: *mut SOCKADDR, - ai_next: *mut ADDRINFOA, -}} -pub type PADDRINFOA = *mut ADDRINFOA; -STRUCT!{struct ADDRINFOW { - ai_flags: ::c_int, - ai_family: ::c_int, - ai_socktype: ::c_int, - ai_protocol: ::c_int, - ai_addrlen: ::size_t, - ai_canonname: ::PWSTR, - ai_addr: *mut SOCKADDR, - ai_next: *mut ADDRINFOW, -}} -pub type PADDRINFOW = *mut ADDRINFOW; -STRUCT!{struct ADDRINFOEXA { - ai_flags: ::c_int, - ai_family: ::c_int, - ai_socktype: ::c_int, - ai_protocol: ::c_int, - ai_addrlen: ::size_t, - ai_canonname: *mut ::c_char, - ai_addr: *mut SOCKADDR, - ai_blob: *mut ::c_void, - ai_bloblen: ::size_t, - ai_provider: ::LPGUID, - ai_next: *mut ADDRINFOEXW, -}} -pub type PADDRINFOEXA = *mut ADDRINFOEXA; -pub type LPADDRINFOEXA = *mut ADDRINFOEXA; -STRUCT!{struct ADDRINFOEXW { - ai_flags: ::c_int, - ai_family: ::c_int, - ai_socktype: ::c_int, - ai_protocol: ::c_int, - ai_addrlen: ::size_t, - ai_canonname: ::PWSTR, - ai_addr: *mut SOCKADDR, - ai_blob: *mut ::c_void, - ai_bloblen: ::size_t, - ai_provider: ::LPGUID, - ai_next: *mut ADDRINFOEXW, -}} -pub type PADDRINFOEXW = *mut ADDRINFOEXW; -pub type LPADDRINFOEXW = *mut ADDRINFOEXW; diff --git a/deps/winapi-0.2.5/src/ws2spi.rs b/deps/winapi-0.2.5/src/ws2spi.rs deleted file mode 100644 index b78e8c6ea..000000000 --- a/deps/winapi-0.2.5/src/ws2spi.rs +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright © 2015, skdltmxn -// Licensed under the MIT License <LICENSE.md> -//! Definitions to be used with the WinSock service provider -pub const WSPDESCRIPTION_LEN: usize = 255; -#[repr(C)] #[derive(Copy)] -pub struct WSPDATA { - pub wVersion: ::WORD, - pub wHighVersion: ::WORD, - pub szDescription: [::WCHAR; WSPDESCRIPTION_LEN + 1], -} -impl Clone for WSPDATA { fn clone(&self) -> WSPDATA { *self } } -pub type LPWSPDATA = *mut WSPDATA; -STRUCT!{struct WSATHREADID { - ThreadHandle: ::HANDLE, - Reserved: ::DWORD_PTR, -}} -pub type LPWSATHREADID = *mut WSATHREADID; -pub type LPNSPV2STARTUP = Option<unsafe extern "system" fn( - lpProviderId: ::LPGUID, ppvClientSessionArg: *mut ::LPVOID, -) -> ::INT>; -pub type LPNSPV2CLEANUP = Option<unsafe extern "system" fn( - lpProviderId: ::LPGUID, pvClientSessionArg: ::LPVOID, -) -> ::INT>; -pub type LPNSPV2LOOKUPSERVICEBEGIN = Option<unsafe extern "system" fn( - lpProviderId: ::LPGUID, lpqsRestrictions: ::LPWSAQUERYSET2W, dwControlFlags: ::DWORD, - lpvClientSessionArg: ::LPVOID, lphLookup: ::LPHANDLE, -) -> ::INT>; -pub type LPNSPV2LOOKUPSERVICENEXTEX = Option<unsafe extern "system" fn( - hAsyncCall: ::HANDLE, hLookup: ::HANDLE, dwControlFlags: ::DWORD, lpdwBufferLength: ::LPDWORD, - lpqsResults: ::LPWSAQUERYSET2W -)>; -pub type LPNSPV2LOOKUPSERVICEEND = Option<unsafe extern "system" fn(hLookup: ::HANDLE) -> ::INT>; -pub type LPNSPV2SETSERVICEEX = Option<unsafe extern "system" fn( - hAsyncCall: ::HANDLE, lpProviderId: ::LPGUID, lpqsRegInfo: ::LPWSAQUERYSET2W, - essOperation: ::WSAESETSERVICEOP, dwControlFlags: ::DWORD, lpvClientSessionArg: ::LPVOID, -)>; -pub type LPNSPV2CLIENTSESSIONRUNDOWN = Option<unsafe extern "system" fn( - lpProviderId: ::LPGUID, pvClientSessionArg: ::LPVOID, -)>; -#[repr(C)] #[derive(Copy)] -pub struct NSPV2_ROUTINE { - pub cbSize: ::DWORD, - pub dwMajorVersion: ::DWORD, - pub dwMinorVersion: ::DWORD, - pub NSPv2Startup: LPNSPV2STARTUP, - pub NSPv2Cleanup: LPNSPV2CLEANUP, - pub NSPv2LookupServiceBegin: LPNSPV2LOOKUPSERVICEBEGIN, - pub NSPv2LookupServiceNextEx: LPNSPV2LOOKUPSERVICENEXTEX, - pub NSPv2LookupServiceEnd: LPNSPV2LOOKUPSERVICEEND, - pub NSPv2SetServiceEx: LPNSPV2SETSERVICEEX, - pub NSPv2ClientSessionRundown: LPNSPV2CLIENTSESSIONRUNDOWN, -} -impl Clone for NSPV2_ROUTINE { fn clone(&self) -> NSPV2_ROUTINE { *self } } -pub type PNSPV2_ROUTINE = *mut NSPV2_ROUTINE; -pub type LPNSPV2_ROUTINE = *mut NSPV2_ROUTINE; -pub type PCNSPV2_ROUTINE = *const NSPV2_ROUTINE; -pub type LPCNSPV2_ROUTINE = *const NSPV2_ROUTINE; -ENUM!{enum WSC_PROVIDER_INFO_TYPE { - ProviderInfoLspCategories, - ProviderInfoAudit, -}} diff --git a/deps/winapi-0.2.5/tests/kernel32.rs b/deps/winapi-0.2.5/tests/kernel32.rs deleted file mode 100644 index a4d0c7ee0..000000000 --- a/deps/winapi-0.2.5/tests/kernel32.rs +++ /dev/null @@ -1,1261 +0,0 @@ -// Copyright © 2015, Peter Atashian -// Licensed under the MIT License <LICENSE.md> -#![cfg(windows)] -extern crate kernel32; -use kernel32::*; -#[inline(never)] fn bb<T>(_: T) {} -#[test] #[cfg(target_arch="x86")] -fn functions_x86() { - bb(InterlockedCompareExchange); - bb(InterlockedCompareExchange64); - bb(InterlockedDecrement); - bb(InterlockedExchange); - bb(InterlockedExchangeAdd); - bb(InterlockedIncrement); -} -#[test] #[cfg(target_arch="x86_64")] -fn functions_x64() { - bb(CreateUmsCompletionList); - bb(CreateUmsThreadContext); - bb(DeleteUmsCompletionList); - bb(DeleteUmsThreadContext); - bb(DequeueUmsCompletionListItems); - bb(EnterUmsSchedulingMode); - bb(ExecuteUmsThread); - bb(GetCurrentUmsThread); - bb(GetNextUmsListItem); - bb(GetUmsCompletionListEvent); - bb(QueryUmsThreadInformation); - bb(RtlAddFunctionTable); - bb(RtlDeleteFunctionTable); - bb(RtlInstallFunctionTableCallback); - bb(RtlLookupFunctionEntry); - bb(RtlRestoreContext); - bb(RtlUnwindEx); - bb(RtlVirtualUnwind); - bb(SetUmsThreadInformation); - bb(UmsThreadYield); - bb(uaw_lstrcmpW); - bb(uaw_lstrcmpiW); - bb(uaw_lstrlenW); - bb(uaw_wcschr); - bb(uaw_wcscpy); - bb(uaw_wcsicmp); - bb(uaw_wcslen); - bb(uaw_wcsrchr); -} -#[test] #[cfg(target_arch="x86_64")] #[cfg(target_env = "msvc")] -fn functions_x64_msvc() { - bb(GetEnabledXStateFeatures); - bb(GetUmsSystemThreadInformation); - bb(GetXStateFeaturesMask); - bb(LocateXStateFeature); - bb(SetXStateFeaturesMask); -} -#[test] #[cfg(any(target_arch="x86_64", target_arch="arm"))] #[cfg(target_env = "msvc")] -fn functions_x64_arm_msvc() { - bb(RtlCompareMemory); - bb(RtlCopyMemory); -} -#[test] #[cfg(target_arch="arm")] -fn functions_arm() { - bb(RtlAddFunctionTable); - bb(RtlDeleteFunctionTable); - bb(RtlInstallFunctionTableCallback); - bb(RtlLookupFunctionEntry); - bb(RtlRestoreContext); - bb(RtlUnwindEx); - bb(RtlVirtualUnwind); - bb(uaw_lstrcmpW); - bb(uaw_lstrcmpiW); - bb(uaw_lstrlenW); - bb(uaw_wcschr); - bb(uaw_wcscpy); - bb(uaw_wcsicmp); - bb(uaw_wcslen); - bb(uaw_wcsrchr); -} -#[test] #[cfg(target_env = "msvc")] -fn functions_msvc() { - bb(AddDllDirectory); - bb(AddResourceAttributeAce); - bb(AddScopedPolicyIDAce); - bb(CalloutOnFiberStack); - bb(CeipIsOptedIn); - bb(CheckTokenCapability); - bb(CheckTokenMembershipEx); - bb(CopyContext); - bb(CopyFile2); - bb(CreateFile2); - bb(CreateFileMappingFromApp); - bb(CreateRemoteThreadEx); - bb(DeleteSynchronizationBarrier); - bb(DisableThreadProfiling); - bb(DnsHostnameToComputerNameExW); - bb(EnableThreadProfiling); - bb(EnterSynchronizationBarrier); - bb(ExitThread); - bb(GetAppContainerAce); - bb(GetAppContainerNamedObjectPath); - bb(GetCachedSigningLevel); - bb(GetCurrentThreadStackLimits); - bb(GetEnabledXStateFeatures); - bb(GetFileMUIPath); - bb(GetFirmwareEnvironmentVariableExA); - bb(GetFirmwareEnvironmentVariableExW); - bb(GetFirmwareType); - bb(GetLogicalProcessorInformationEx); - bb(GetMemoryErrorHandlingCapabilities); - bb(GetOverlappedResultEx); - bb(GetProcessInformation); - bb(GetProcessMitigationPolicy); - bb(GetSystemTimePreciseAsFileTime); - bb(GetThreadInformation); - bb(GetXStateFeaturesMask); - bb(GlobalAddAtomExA); - bb(GlobalAddAtomExW); - bb(InitializeContext); - bb(InitializeSynchronizationBarrier); - bb(InstallELAMCertificateInfo); - bb(InterlockedPushListSListEx); - bb(IsNativeVhdBoot); - bb(IsProcessCritical); - bb(IsValidNLSVersion); - bb(K32EmptyWorkingSet); - bb(K32EnumDeviceDrivers); - bb(K32EnumPageFilesA); - bb(K32EnumPageFilesW); - bb(K32EnumProcessModules); - bb(K32EnumProcessModulesEx); - bb(K32EnumProcesses); - bb(K32GetDeviceDriverBaseNameA); - bb(K32GetDeviceDriverBaseNameW); - bb(K32GetDeviceDriverFileNameA); - bb(K32GetDeviceDriverFileNameW); - bb(K32GetMappedFileNameA); - bb(K32GetMappedFileNameW); - bb(K32GetModuleBaseNameA); - bb(K32GetModuleBaseNameW); - bb(K32GetModuleFileNameExA); - bb(K32GetModuleFileNameExW); - bb(K32GetModuleInformation); - bb(K32GetPerformanceInfo); - bb(K32GetProcessImageFileNameA); - bb(K32GetProcessImageFileNameW); - bb(K32GetProcessMemoryInfo); - bb(K32GetWsChanges); - bb(K32GetWsChangesEx); - bb(K32InitializeProcessForWsWatch); - bb(K32QueryWorkingSet); - bb(K32QueryWorkingSetEx); - bb(LoadPackagedLibrary); - bb(LocateXStateFeature); - bb(MapViewOfFileFromApp); - bb(PowerSetRequest); - bb(PrefetchVirtualMemory); - bb(PssCaptureSnapshot); - bb(PssDuplicateSnapshot); - bb(PssFreeSnapshot); - bb(PssQuerySnapshot); - bb(PssWalkMarkerCreate); - bb(PssWalkMarkerFree); - bb(PssWalkMarkerGetPosition); - bb(PssWalkMarkerSeekToBeginning); - bb(PssWalkMarkerSetPosition); - bb(PssWalkSnapshot); - bb(QueryProtectedPolicy); - bb(RegisterBadMemoryNotification); - bb(RemoveDllDirectory); - bb(SetCachedSigningLevel); - bb(SetComputerNameEx2W); - bb(SetDefaultDllDirectories); - bb(SetFirmwareEnvironmentVariableExA); - bb(SetFirmwareEnvironmentVariableExW); - bb(SetProcessInformation); - bb(SetProcessMitigationPolicy); - bb(SetProtectedPolicy); - bb(SetThreadInformation); - bb(SetThreadpoolStackInformation); - bb(SetThreadpoolTimerEx); - bb(SetThreadpoolWaitEx); - bb(SetWaitableTimerEx); - bb(SetXStateFeaturesMask); - bb(SystemTimeToTzSpecificLocalTimeEx); - bb(TzSpecificLocalTimeToSystemTimeEx); - bb(UnregisterBadMemoryNotification); -} -#[test] -fn functions() { - bb(AcquireSRWLockExclusive); - bb(AcquireSRWLockShared); - bb(ActivateActCtx); - bb(AddAtomA); - bb(AddAtomW); - bb(AddConsoleAliasA); - bb(AddConsoleAliasW); - bb(AddIntegrityLabelToBoundaryDescriptor); - bb(AddRefActCtx); - bb(AddSIDToBoundaryDescriptor); - bb(AddSecureMemoryCacheCallback); - bb(AddVectoredContinueHandler); - bb(AddVectoredExceptionHandler); - bb(AllocConsole); - bb(AllocateUserPhysicalPages); - bb(AllocateUserPhysicalPagesNuma); - bb(ApplicationRecoveryFinished); - bb(ApplicationRecoveryInProgress); - bb(BackupRead); - bb(BackupSeek); - bb(BackupWrite); - bb(BeginUpdateResourceA); - bb(BeginUpdateResourceW); - bb(BindIoCompletionCallback); - bb(BuildCommDCBA); - bb(BuildCommDCBAndTimeoutsA); - bb(BuildCommDCBAndTimeoutsW); - bb(BuildCommDCBW); - bb(CallNamedPipeA); - bb(CallNamedPipeW); - bb(CallbackMayRunLong); - bb(CancelDeviceWakeupRequest); - bb(CancelIo); - bb(CancelIoEx); - bb(CancelSynchronousIo); - bb(CancelThreadpoolIo); - bb(CancelTimerQueueTimer); - bb(CancelWaitableTimer); - bb(ChangeTimerQueueTimer); - bb(CheckNameLegalDOS8Dot3A); - bb(CheckNameLegalDOS8Dot3W); - bb(CheckRemoteDebuggerPresent); - bb(ClearCommBreak); - bb(ClearCommError); - bb(CloseHandle); - bb(ClosePrivateNamespace); - bb(CloseThreadpool); - bb(CloseThreadpoolCleanupGroup); - bb(CloseThreadpoolCleanupGroupMembers); - bb(CloseThreadpoolIo); - bb(CloseThreadpoolTimer); - bb(CloseThreadpoolWait); - bb(CloseThreadpoolWork); - bb(CommConfigDialogA); - bb(CommConfigDialogW); - bb(CompareFileTime); - bb(CompareStringA); - bb(CompareStringEx); - bb(CompareStringOrdinal); - bb(CompareStringW); - bb(ConnectNamedPipe); - bb(ContinueDebugEvent); - bb(ConvertDefaultLocale); - bb(ConvertFiberToThread); - bb(ConvertThreadToFiber); - bb(ConvertThreadToFiberEx); - bb(CopyFileA); - bb(CopyFileExA); - bb(CopyFileExW); - bb(CopyFileTransactedA); - bb(CopyFileTransactedW); - bb(CopyFileW); - bb(CreateActCtxA); - bb(CreateActCtxW); - bb(CreateBoundaryDescriptorA); - bb(CreateBoundaryDescriptorW); - bb(CreateConsoleScreenBuffer); - bb(CreateDirectoryA); - bb(CreateDirectoryExA); - bb(CreateDirectoryExW); - bb(CreateDirectoryTransactedA); - bb(CreateDirectoryTransactedW); - bb(CreateDirectoryW); - bb(CreateEventA); - bb(CreateEventW); - bb(CreateEventExA); - bb(CreateEventExW); - bb(CreateFiber); - bb(CreateFiberEx); - bb(CreateFileA); - bb(CreateFileMappingA); - bb(CreateFileMappingNumaA); - bb(CreateFileMappingNumaW); - bb(CreateFileMappingW); - bb(CreateFileTransactedA); - bb(CreateFileTransactedW); - bb(CreateFileW); - bb(CreateHardLinkA); - bb(CreateHardLinkTransactedA); - bb(CreateHardLinkTransactedW); - bb(CreateHardLinkW); - bb(CreateIoCompletionPort); - bb(CreateJobObjectA); - bb(CreateJobObjectW); - bb(CreateJobSet); - bb(CreateMailslotA); - bb(CreateMailslotW); - bb(CreateMemoryResourceNotification); - bb(CreateMutexA); - bb(CreateMutexExA); - bb(CreateMutexExW); - bb(CreateMutexW); - bb(CreateNamedPipeA); - bb(CreateNamedPipeW); - bb(CreatePipe); - bb(CreatePrivateNamespaceA); - bb(CreatePrivateNamespaceW); - bb(CreateProcessA); - bb(CreateProcessW); - bb(CreateRemoteThread); - bb(CreateSemaphoreA); - bb(CreateSemaphoreExA); - bb(CreateSemaphoreExW); - bb(CreateSemaphoreW); - bb(CreateSymbolicLinkA); - bb(CreateSymbolicLinkTransactedA); - bb(CreateSymbolicLinkTransactedW); - bb(CreateSymbolicLinkW); - bb(CreateTapePartition); - bb(CreateThread); - bb(CreateThreadpool); - bb(CreateThreadpoolCleanupGroup); - bb(CreateThreadpoolIo); - bb(CreateThreadpoolTimer); - bb(CreateThreadpoolWait); - bb(CreateThreadpoolWork); - bb(CreateTimerQueue); - bb(CreateTimerQueueTimer); - bb(CreateToolhelp32Snapshot); - bb(CreateWaitableTimerA); - bb(CreateWaitableTimerExA); - bb(CreateWaitableTimerExW); - bb(CreateWaitableTimerW); - bb(DeactivateActCtx); - bb(DebugActiveProcess); - bb(DebugActiveProcessStop); - bb(DebugBreak); - bb(DebugBreakProcess); - bb(DebugSetProcessKillOnExit); - bb(DecodePointer); - bb(DecodeSystemPointer); - bb(DefineDosDeviceA); - bb(DefineDosDeviceW); - bb(DelayLoadFailureHook); - bb(DeleteAtom); - bb(DeleteBoundaryDescriptor); - bb(DeleteCriticalSection); - bb(DeleteFiber); - bb(DeleteFileA); - bb(DeleteFileTransactedA); - bb(DeleteFileTransactedW); - bb(DeleteFileW); - bb(DeleteProcThreadAttributeList); - bb(DeleteTimerQueue); - bb(DeleteTimerQueueEx); - bb(DeleteTimerQueueTimer); - bb(DeleteVolumeMountPointA); - bb(DeleteVolumeMountPointW); - bb(DeviceIoControl); - bb(DisableThreadLibraryCalls); - bb(DisassociateCurrentThreadFromCallback); - bb(DisconnectNamedPipe); - bb(DnsHostnameToComputerNameA); - bb(DnsHostnameToComputerNameW); - bb(DosDateTimeToFileTime); - bb(DuplicateHandle); - bb(EncodePointer); - bb(EncodeSystemPointer); - bb(EndUpdateResourceA); - bb(EndUpdateResourceW); - bb(EnumCalendarInfoA); - bb(EnumCalendarInfoExA); - bb(EnumCalendarInfoExEx); - bb(EnumCalendarInfoExW); - bb(EnumCalendarInfoW); - bb(EnumDateFormatsA); - bb(EnumDateFormatsExA); - bb(EnumDateFormatsExEx); - bb(EnumDateFormatsExW); - bb(EnumDateFormatsW); - bb(EnumLanguageGroupLocalesA); - bb(EnumLanguageGroupLocalesW); - bb(EnumResourceLanguagesA); - bb(EnumResourceLanguagesExA); - bb(EnumResourceLanguagesExW); - bb(EnumResourceLanguagesW); - bb(EnumResourceNamesA); - bb(EnumResourceNamesExA); - bb(EnumResourceNamesExW); - bb(EnumResourceNamesW); - bb(EnumResourceTypesA); - bb(EnumResourceTypesExA); - bb(EnumResourceTypesExW); - bb(EnumResourceTypesW); - bb(EnumSystemCodePagesA); - bb(EnumSystemCodePagesW); - bb(EnumSystemFirmwareTables); - bb(EnumSystemGeoID); - bb(EnumSystemLanguageGroupsA); - bb(EnumSystemLanguageGroupsW); - bb(EnumSystemLocalesA); - bb(EnumSystemLocalesEx); - bb(EnumSystemLocalesW); - bb(EnumTimeFormatsA); - bb(EnumTimeFormatsEx); - bb(EnumTimeFormatsW); - bb(EnumUILanguagesA); - bb(EnumUILanguagesW); - bb(EraseTape); - bb(EscapeCommFunction); - bb(ExitProcess); - bb(ExpandEnvironmentStringsA); - bb(ExpandEnvironmentStringsW); - bb(FatalAppExitA); - bb(FatalAppExitW); - bb(FatalExit); - bb(FileTimeToDosDateTime); - bb(FileTimeToLocalFileTime); - bb(FileTimeToSystemTime); - bb(FillConsoleOutputAttribute); - bb(FillConsoleOutputCharacterA); - bb(FillConsoleOutputCharacterW); - bb(FindActCtxSectionGuid); - bb(FindActCtxSectionStringA); - bb(FindActCtxSectionStringW); - bb(FindAtomA); - bb(FindAtomW); - bb(FindClose); - bb(FindCloseChangeNotification); - bb(FindFirstChangeNotificationA); - bb(FindFirstChangeNotificationW); - bb(FindFirstFileA); - bb(FindFirstFileExA); - bb(FindFirstFileExW); - bb(FindFirstFileNameTransactedW); - bb(FindFirstFileNameW); - bb(FindFirstFileTransactedA); - bb(FindFirstFileTransactedW); - bb(FindFirstFileW); - bb(FindFirstStreamTransactedW); - bb(FindFirstStreamW); - bb(FindFirstVolumeA); - bb(FindFirstVolumeMountPointA); - bb(FindFirstVolumeMountPointW); - bb(FindFirstVolumeW); - bb(FindNLSString); - bb(FindNLSStringEx); - bb(FindNextChangeNotification); - bb(FindNextFileA); - bb(FindNextFileNameW); - bb(FindNextFileW); - bb(FindNextStreamW); - bb(FindNextVolumeA); - bb(FindNextVolumeMountPointA); - bb(FindNextVolumeMountPointW); - bb(FindNextVolumeW); - bb(FindResourceA); - bb(FindResourceExA); - bb(FindResourceExW); - bb(FindResourceW); - bb(FindStringOrdinal); - bb(FindVolumeClose); - bb(FindVolumeMountPointClose); - bb(FlsAlloc); - bb(FlsFree); - bb(FlsGetValue); - bb(FlsSetValue); - bb(FlushConsoleInputBuffer); - bb(FlushFileBuffers); - bb(FlushInstructionCache); - bb(FlushProcessWriteBuffers); - bb(FlushViewOfFile); - bb(FoldStringA); - bb(FoldStringW); - bb(FormatMessageA); - bb(FormatMessageW); - bb(FreeConsole); - bb(FreeEnvironmentStringsA); - bb(FreeEnvironmentStringsW); - bb(FreeLibrary); - bb(FreeLibraryAndExitThread); - bb(FreeLibraryWhenCallbackReturns); - bb(FreeResource); - bb(FreeUserPhysicalPages); - bb(GenerateConsoleCtrlEvent); - bb(GetACP); - bb(GetActiveProcessorCount); - bb(GetActiveProcessorGroupCount); - bb(GetApplicationRecoveryCallback); - bb(GetApplicationRestartSettings); - bb(GetAtomNameA); - bb(GetAtomNameW); - bb(GetBinaryTypeA); - bb(GetBinaryTypeW); - bb(GetCPInfo); - bb(GetCPInfoExA); - bb(GetCPInfoExW); - bb(GetCalendarInfoA); - bb(GetCalendarInfoEx); - bb(GetCalendarInfoW); - bb(GetCommConfig); - bb(GetCommMask); - bb(GetCommModemStatus); - bb(GetCommProperties); - bb(GetCommState); - bb(GetCommTimeouts); - bb(GetCommandLineA); - bb(GetCommandLineW); - bb(GetCompressedFileSizeA); - bb(GetCompressedFileSizeTransactedA); - bb(GetCompressedFileSizeTransactedW); - bb(GetCompressedFileSizeW); - bb(GetComputerNameA); - bb(GetComputerNameExA); - bb(GetComputerNameExW); - bb(GetComputerNameW); - bb(GetConsoleAliasA); - bb(GetConsoleAliasExesA); - bb(GetConsoleAliasExesLengthA); - bb(GetConsoleAliasExesLengthW); - bb(GetConsoleAliasExesW); - bb(GetConsoleAliasW); - bb(GetConsoleAliasesA); - bb(GetConsoleAliasesLengthA); - bb(GetConsoleAliasesLengthW); - bb(GetConsoleAliasesW); - bb(GetConsoleCP); - bb(GetConsoleCursorInfo); - bb(GetConsoleDisplayMode); - bb(GetConsoleFontSize); - bb(GetConsoleHistoryInfo); - bb(GetConsoleMode); - bb(GetConsoleOriginalTitleA); - bb(GetConsoleOriginalTitleW); - bb(GetConsoleOutputCP); - bb(GetConsoleProcessList); - bb(GetConsoleScreenBufferInfo); - bb(GetConsoleScreenBufferInfoEx); - bb(GetConsoleSelectionInfo); - bb(GetConsoleTitleA); - bb(GetConsoleTitleW); - bb(GetConsoleWindow); - bb(GetCurrencyFormatA); - bb(GetCurrencyFormatEx); - bb(GetCurrencyFormatW); - bb(GetCurrentActCtx); - bb(GetCurrentConsoleFont); - bb(GetCurrentConsoleFontEx); - bb(GetCurrentDirectoryA); - bb(GetCurrentDirectoryW); - bb(GetCurrentProcess); - bb(GetCurrentProcessId); - bb(GetCurrentProcessorNumber); - bb(GetCurrentProcessorNumberEx); - bb(GetCurrentThread); - bb(GetCurrentThreadId); - bb(GetDateFormatA); - bb(GetDateFormatEx); - bb(GetDateFormatW); - bb(GetDefaultCommConfigA); - bb(GetDefaultCommConfigW); - bb(GetDevicePowerState); - bb(GetDiskFreeSpaceA); - bb(GetDiskFreeSpaceExA); - bb(GetDiskFreeSpaceExW); - bb(GetDiskFreeSpaceW); - bb(GetDllDirectoryA); - bb(GetDllDirectoryW); - bb(GetDurationFormat); - bb(GetDurationFormatEx); - bb(GetDynamicTimeZoneInformation); - bb(GetEnvironmentStrings); - bb(GetEnvironmentStringsW); - bb(GetEnvironmentVariableA); - bb(GetEnvironmentVariableW); - bb(GetErrorMode); - bb(GetExitCodeProcess); - bb(GetExitCodeThread); - bb(GetFileAttributesA); - bb(GetFileAttributesExA); - bb(GetFileAttributesExW); - bb(GetFileAttributesTransactedA); - bb(GetFileAttributesTransactedW); - bb(GetFileAttributesW); - bb(GetFileBandwidthReservation); - bb(GetFileInformationByHandle); - bb(GetFileInformationByHandleEx); - bb(GetFileMUIInfo); - bb(GetFileSize); - bb(GetFileSizeEx); - bb(GetFileTime); - bb(GetFileType); - bb(GetFinalPathNameByHandleA); - bb(GetFinalPathNameByHandleW); - bb(GetFirmwareEnvironmentVariableA); - bb(GetFirmwareEnvironmentVariableW); - bb(GetFullPathNameA); - bb(GetFullPathNameTransactedA); - bb(GetFullPathNameTransactedW); - bb(GetFullPathNameW); - bb(GetGeoInfoA); - bb(GetGeoInfoW); - bb(GetHandleInformation); - bb(GetLargePageMinimum); - bb(GetLargestConsoleWindowSize); - bb(GetLastError); - bb(GetLocalTime); - bb(GetLocaleInfoA); - bb(GetLocaleInfoEx); - bb(GetLocaleInfoW); - bb(GetLogicalDriveStringsA); - bb(GetLogicalDriveStringsW); - bb(GetLogicalDrives); - bb(GetLogicalProcessorInformation); - bb(GetLongPathNameA); - bb(GetLongPathNameTransactedA); - bb(GetLongPathNameTransactedW); - bb(GetLongPathNameW); - bb(GetMailslotInfo); - bb(GetMaximumProcessorCount); - bb(GetMaximumProcessorGroupCount); - bb(GetModuleFileNameA); - bb(GetModuleFileNameW); - bb(GetModuleHandleA); - bb(GetModuleHandleExA); - bb(GetModuleHandleExW); - bb(GetModuleHandleW); - bb(GetNLSVersion); - bb(GetNLSVersionEx); - bb(GetNamedPipeClientComputerNameA); - bb(GetNamedPipeClientComputerNameW); - bb(GetNamedPipeClientProcessId); - bb(GetNamedPipeClientSessionId); - bb(GetNamedPipeHandleStateA); - bb(GetNamedPipeHandleStateW); - bb(GetNamedPipeInfo); - bb(GetNamedPipeServerProcessId); - bb(GetNamedPipeServerSessionId); - bb(GetNativeSystemInfo); - bb(GetNumaAvailableMemoryNode); - bb(GetNumaAvailableMemoryNodeEx); - bb(GetNumaHighestNodeNumber); - bb(GetNumaNodeNumberFromHandle); - bb(GetNumaNodeProcessorMask); - bb(GetNumaNodeProcessorMaskEx); - bb(GetNumaProcessorNode); - bb(GetNumaProcessorNodeEx); - bb(GetNumaProximityNode); - bb(GetNumaProximityNodeEx); - bb(GetNumberFormatA); - bb(GetNumberFormatEx); - bb(GetNumberFormatW); - bb(GetNumberOfConsoleInputEvents); - bb(GetNumberOfConsoleMouseButtons); - bb(GetOEMCP); - bb(GetOverlappedResult); - bb(GetPhysicallyInstalledSystemMemory); - bb(GetPriorityClass); - bb(GetPrivateProfileIntA); - bb(GetPrivateProfileIntW); - bb(GetPrivateProfileSectionA); - bb(GetPrivateProfileSectionNamesA); - bb(GetPrivateProfileSectionNamesW); - bb(GetPrivateProfileSectionW); - bb(GetPrivateProfileStringA); - bb(GetPrivateProfileStringW); - bb(GetPrivateProfileStructA); - bb(GetPrivateProfileStructW); - bb(GetProcAddress); - bb(GetProcessAffinityMask); - bb(GetProcessDEPPolicy); - bb(GetProcessGroupAffinity); - bb(GetProcessHandleCount); - bb(GetProcessHeap); - bb(GetProcessHeaps); - bb(GetProcessId); - bb(GetProcessIdOfThread); - bb(GetProcessIoCounters); - bb(GetProcessPreferredUILanguages); - bb(GetProcessPriorityBoost); - bb(GetProcessShutdownParameters); - bb(GetProcessTimes); - bb(GetProcessVersion); - bb(GetProcessWorkingSetSize); - bb(GetProcessWorkingSetSizeEx); - bb(GetProcessorSystemCycleTime); - bb(GetProductInfo); - bb(GetProfileIntA); - bb(GetProfileIntW); - bb(GetProfileSectionA); - bb(GetProfileSectionW); - bb(GetProfileStringA); - bb(GetProfileStringW); - bb(GetQueuedCompletionStatus); - bb(GetQueuedCompletionStatusEx); - bb(GetShortPathNameA); - bb(GetShortPathNameW); - bb(GetStartupInfoA); - bb(GetStartupInfoW); - bb(GetStdHandle); - bb(GetStringScripts); - bb(GetStringTypeA); - bb(GetStringTypeExA); - bb(GetStringTypeExW); - bb(GetStringTypeW); - bb(GetSystemDEPPolicy); - bb(GetSystemDefaultLCID); - bb(GetSystemDefaultLangID); - bb(GetSystemDefaultLocaleName); - bb(GetSystemDefaultUILanguage); - bb(GetSystemDirectoryA); - bb(GetSystemDirectoryW); - bb(GetSystemFileCacheSize); - bb(GetSystemFirmwareTable); - bb(GetSystemInfo); - bb(GetSystemPowerStatus); - bb(GetSystemPreferredUILanguages); - bb(GetSystemRegistryQuota); - bb(GetSystemTime); - bb(GetSystemTimeAdjustment); - bb(GetSystemTimeAsFileTime); - bb(GetSystemTimes); - bb(GetSystemWindowsDirectoryA); - bb(GetSystemWindowsDirectoryW); - bb(GetSystemWow64DirectoryA); - bb(GetSystemWow64DirectoryW); - bb(GetTapeParameters); - bb(GetTapePosition); - bb(GetTapeStatus); - bb(GetTempFileNameA); - bb(GetTempFileNameW); - bb(GetTempPathA); - bb(GetTempPathW); - bb(GetThreadContext); - bb(GetThreadErrorMode); - bb(GetThreadGroupAffinity); - bb(GetThreadIOPendingFlag); - bb(GetThreadId); - bb(GetThreadIdealProcessorEx); - bb(GetThreadLocale); - bb(GetThreadPreferredUILanguages); - bb(GetThreadPriority); - bb(GetThreadPriorityBoost); - bb(GetThreadSelectorEntry); - bb(GetThreadTimes); - bb(GetThreadUILanguage); - bb(GetTickCount); - bb(GetTickCount64); - bb(GetTimeFormatA); - bb(GetTimeFormatEx); - bb(GetTimeFormatW); - bb(GetTimeZoneInformation); - bb(GetTimeZoneInformationForYear); - bb(GetUILanguageInfo); - bb(GetUserDefaultLCID); - bb(GetUserDefaultLangID); - bb(GetUserDefaultLocaleName); - bb(GetUserDefaultUILanguage); - bb(GetUserGeoID); - bb(GetUserPreferredUILanguages); - bb(GetVersion); - bb(GetVersionExA); - bb(GetVersionExW); - bb(GetVolumeInformationA); - bb(GetVolumeInformationByHandleW); - bb(GetVolumeInformationW); - bb(GetVolumeNameForVolumeMountPointA); - bb(GetVolumeNameForVolumeMountPointW); - bb(GetVolumePathNameA); - bb(GetVolumePathNameW); - bb(GetVolumePathNamesForVolumeNameA); - bb(GetVolumePathNamesForVolumeNameW); - bb(GetWindowsDirectoryA); - bb(GetWindowsDirectoryW); - bb(GetWriteWatch); - bb(GlobalAddAtomA); - bb(GlobalAddAtomW); - bb(GlobalAlloc); - bb(GlobalCompact); - bb(GlobalDeleteAtom); - bb(GlobalFindAtomA); - bb(GlobalFindAtomW); - bb(GlobalFix); - bb(GlobalFlags); - bb(GlobalGetAtomNameA); - bb(GlobalGetAtomNameW); - bb(GlobalHandle); - bb(GlobalLock); - bb(GlobalMemoryStatus); - bb(GlobalMemoryStatusEx); - bb(GlobalReAlloc); - bb(GlobalSize); - bb(GlobalUnWire); - bb(GlobalUnfix); - bb(GlobalUnlock); - bb(GlobalWire); - bb(Heap32First); - bb(Heap32ListFirst); - bb(Heap32ListNext); - bb(Heap32Next); - bb(HeapAlloc); - bb(HeapCompact); - bb(HeapCreate); - bb(HeapDestroy); - bb(HeapFree); - bb(HeapLock); - bb(HeapQueryInformation); - bb(HeapReAlloc); - bb(HeapSetInformation); - bb(HeapSize); - bb(HeapSummary); - bb(HeapUnlock); - bb(HeapValidate); - bb(HeapWalk); - bb(InitAtomTable); - bb(InitOnceBeginInitialize); - bb(InitOnceComplete); - bb(InitOnceExecuteOnce); - bb(InitOnceInitialize); - bb(InitializeConditionVariable); - bb(InitializeCriticalSection); - bb(InitializeCriticalSectionAndSpinCount); - bb(InitializeCriticalSectionEx); - bb(InitializeProcThreadAttributeList); - bb(InitializeSListHead); - bb(InitializeSRWLock); - bb(InterlockedFlushSList); - bb(InterlockedPopEntrySList); - bb(IsBadCodePtr); - bb(IsBadHugeReadPtr); - bb(IsBadHugeWritePtr); - bb(IsBadReadPtr); - bb(IsBadStringPtrA); - bb(IsBadStringPtrW); - bb(IsBadWritePtr); - bb(IsDBCSLeadByte); - bb(IsDBCSLeadByteEx); - bb(IsDebuggerPresent); - bb(IsNLSDefinedString); - bb(IsNormalizedString); - bb(IsProcessInJob); - bb(IsProcessorFeaturePresent); - bb(IsSystemResumeAutomatic); - bb(IsThreadAFiber); - bb(IsThreadpoolTimerSet); - bb(IsValidCodePage); - bb(IsValidLanguageGroup); - bb(IsValidLocale); - bb(IsValidLocaleName); - bb(IsWow64Process); - bb(LCIDToLocaleName); - bb(LCMapStringA); - bb(LCMapStringEx); - bb(LCMapStringW); - bb(LeaveCriticalSection); - bb(LeaveCriticalSectionWhenCallbackReturns); - bb(LoadLibraryA); - bb(LoadLibraryExA); - bb(LoadLibraryExW); - bb(LoadLibraryW); - bb(LoadModule); - bb(LoadResource); - bb(LocalAlloc); - bb(LocalCompact); - bb(LocalFileTimeToFileTime); - bb(LocalFlags); - bb(LocalFree); - bb(LocalHandle); - bb(LocalLock); - bb(LocalReAlloc); - bb(LocalShrink); - bb(LocalSize); - bb(LocalUnlock); - bb(LocaleNameToLCID); - bb(LockFile); - bb(LockFileEx); - bb(LockResource); - bb(MapUserPhysicalPages); - bb(MapUserPhysicalPagesScatter); - bb(MapViewOfFile); - bb(MapViewOfFileEx); - bb(MapViewOfFileExNuma); - bb(Module32First); - bb(Module32FirstW); - bb(Module32Next); - bb(Module32NextW); - bb(MoveFileA); - bb(MoveFileExA); - bb(MoveFileExW); - bb(MoveFileTransactedA); - bb(MoveFileTransactedW); - bb(MoveFileW); - bb(MoveFileWithProgressA); - bb(MoveFileWithProgressW); - bb(MulDiv); - bb(MultiByteToWideChar); - bb(NeedCurrentDirectoryForExePathA); - bb(NeedCurrentDirectoryForExePathW); - bb(NormalizeString); - bb(NotifyUILanguageChange); - bb(OpenEventA); - bb(OpenEventW); - bb(OpenFile); - bb(OpenFileById); - bb(OpenFileMappingA); - bb(OpenFileMappingW); - bb(OpenJobObjectA); - bb(OpenJobObjectW); - bb(OpenMutexA); - bb(OpenMutexW); - bb(OpenPrivateNamespaceA); - bb(OpenPrivateNamespaceW); - bb(OpenProcess); - bb(OpenSemaphoreA); - bb(OpenSemaphoreW); - bb(OpenThread); - bb(OpenWaitableTimerA); - bb(OpenWaitableTimerW); - bb(OutputDebugStringA); - bb(OutputDebugStringW); - bb(PeekConsoleInputA); - bb(PeekConsoleInputW); - bb(PeekNamedPipe); - bb(PostQueuedCompletionStatus); - bb(PowerClearRequest); - bb(PowerCreateRequest); - bb(PrepareTape); - bb(Process32First); - bb(Process32FirstW); - bb(Process32Next); - bb(Process32NextW); - bb(ProcessIdToSessionId); - bb(PulseEvent); - bb(PurgeComm); - bb(QueryActCtxSettingsW); - bb(QueryActCtxW); - bb(QueryDepthSList); - bb(QueryDosDeviceA); - bb(QueryDosDeviceW); - bb(QueryFullProcessImageNameA); - bb(QueryFullProcessImageNameW); - bb(QueryIdleProcessorCycleTime); - bb(QueryIdleProcessorCycleTimeEx); - bb(QueryInformationJobObject); - bb(QueryPerformanceCounter); - bb(QueryPerformanceFrequency); - bb(QueryProcessAffinityUpdateMode); - bb(QueryProcessCycleTime); - bb(QueryThreadCycleTime); - bb(QueryThreadProfiling); - bb(QueryThreadpoolStackInformation); - bb(QueryUnbiasedInterruptTime); - bb(QueueUserAPC); - bb(QueueUserWorkItem); - bb(RaiseException); - bb(RaiseFailFastException); - bb(ReOpenFile); - bb(ReadConsoleA); - bb(ReadConsoleInputA); - bb(ReadConsoleInputW); - bb(ReadConsoleOutputA); - bb(ReadConsoleOutputAttribute); - bb(ReadConsoleOutputCharacterA); - bb(ReadConsoleOutputCharacterW); - bb(ReadConsoleOutputW); - bb(ReadConsoleW); - bb(ReadDirectoryChangesW); - bb(ReadFile); - bb(ReadFileEx); - bb(ReadFileScatter); - bb(ReadProcessMemory); - bb(ReadThreadProfilingData); - bb(RegisterApplicationRecoveryCallback); - bb(RegisterApplicationRestart); - bb(RegisterWaitForSingleObject); - bb(RegisterWaitForSingleObjectEx); - bb(ReleaseActCtx); - bb(ReleaseMutex); - bb(ReleaseMutexWhenCallbackReturns); - bb(ReleaseSRWLockExclusive); - bb(ReleaseSRWLockShared); - bb(ReleaseSemaphore); - bb(ReleaseSemaphoreWhenCallbackReturns); - bb(RemoveDirectoryA); - bb(RemoveDirectoryTransactedA); - bb(RemoveDirectoryTransactedW); - bb(RemoveDirectoryW); - bb(RemoveSecureMemoryCacheCallback); - bb(RemoveVectoredContinueHandler); - bb(RemoveVectoredExceptionHandler); - bb(ReplaceFileA); - bb(ReplaceFileW); - bb(ReplacePartitionUnit); - bb(RequestDeviceWakeup); - bb(RequestWakeupLatency); - bb(ResetEvent); - bb(ResetWriteWatch); - bb(RestoreLastError); - bb(ResumeThread); - bb(RtlCaptureContext); - bb(RtlCaptureStackBackTrace); - bb(RtlUnwind); - bb(ScrollConsoleScreenBufferA); - bb(ScrollConsoleScreenBufferW); - bb(SearchPathA); - bb(SearchPathW); - bb(SetCalendarInfoA); - bb(SetCalendarInfoW); - bb(SetCommBreak); - bb(SetCommConfig); - bb(SetCommMask); - bb(SetCommState); - bb(SetCommTimeouts); - bb(SetComputerNameA); - bb(SetComputerNameExA); - bb(SetComputerNameExW); - bb(SetComputerNameW); - bb(SetConsoleActiveScreenBuffer); - bb(SetConsoleCP); - bb(SetConsoleCtrlHandler); - bb(SetConsoleCursorInfo); - bb(SetConsoleCursorPosition); - bb(SetConsoleDisplayMode); - bb(SetConsoleHistoryInfo); - bb(SetConsoleMode); - bb(SetConsoleOutputCP); - bb(SetConsoleScreenBufferInfoEx); - bb(SetConsoleScreenBufferSize); - bb(SetConsoleTextAttribute); - bb(SetConsoleTitleA); - bb(SetConsoleTitleW); - bb(SetConsoleWindowInfo); - bb(SetCriticalSectionSpinCount); - bb(SetCurrentConsoleFontEx); - bb(SetCurrentDirectoryA); - bb(SetCurrentDirectoryW); - bb(SetDefaultCommConfigA); - bb(SetDefaultCommConfigW); - bb(SetDllDirectoryA); - bb(SetDllDirectoryW); - bb(SetDynamicTimeZoneInformation); - bb(SetEndOfFile); - bb(SetEnvironmentStringsA); - bb(SetEnvironmentStringsW); - bb(SetEnvironmentVariableA); - bb(SetEnvironmentVariableW); - bb(SetErrorMode); - bb(SetEvent); - bb(SetEventWhenCallbackReturns); - bb(SetFileApisToANSI); - bb(SetFileApisToOEM); - bb(SetFileAttributesA); - bb(SetFileAttributesTransactedA); - bb(SetFileAttributesTransactedW); - bb(SetFileAttributesW); - bb(SetFileBandwidthReservation); - bb(SetFileCompletionNotificationModes); - bb(SetFileInformationByHandle); - bb(SetFileIoOverlappedRange); - bb(SetFilePointer); - bb(SetFilePointerEx); - bb(SetFileShortNameA); - bb(SetFileShortNameW); - bb(SetFileTime); - bb(SetFileValidData); - bb(SetFirmwareEnvironmentVariableA); - bb(SetFirmwareEnvironmentVariableW); - bb(SetHandleCount); - bb(SetHandleInformation); - bb(SetInformationJobObject); - bb(SetLastError); - bb(SetLocalTime); - bb(SetLocaleInfoA); - bb(SetLocaleInfoW); - bb(SetMailslotInfo); - bb(SetMessageWaitingIndicator); - bb(SetNamedPipeAttribute); - bb(SetNamedPipeHandleState); - bb(SetPriorityClass); - bb(SetProcessAffinityMask); - bb(SetProcessAffinityUpdateMode); - bb(SetProcessDEPPolicy); - bb(SetProcessPreferredUILanguages); - bb(SetProcessPriorityBoost); - bb(SetProcessShutdownParameters); - bb(SetProcessWorkingSetSize); - bb(SetProcessWorkingSetSizeEx); - bb(SetSearchPathMode); - bb(SetStdHandle); - bb(SetStdHandleEx); - bb(SetSystemFileCacheSize); - bb(SetSystemPowerState); - bb(SetSystemTime); - bb(SetSystemTimeAdjustment); - bb(SetTapeParameters); - bb(SetTapePosition); - bb(SetThreadAffinityMask); - bb(SetThreadContext); - bb(SetThreadErrorMode); - bb(SetThreadExecutionState); - bb(SetThreadGroupAffinity); - bb(SetThreadIdealProcessor); - bb(SetThreadIdealProcessorEx); - bb(SetThreadLocale); - bb(SetThreadPreferredUILanguages); - bb(SetThreadPriority); - bb(SetThreadPriorityBoost); - bb(SetThreadUILanguage); - bb(SetThreadpoolThreadMaximum); - bb(SetThreadpoolThreadMinimum); - bb(SetThreadpoolTimer); - bb(SetThreadpoolWait); - bb(SetTimeZoneInformation); - bb(SetTimerQueueTimer); - bb(SetUnhandledExceptionFilter); - bb(SetUserGeoID); - bb(SetVolumeLabelA); - bb(SetVolumeLabelW); - bb(SetVolumeMountPointA); - bb(SetVolumeMountPointW); - bb(SetWaitableTimer); - bb(SetupComm); - bb(SignalObjectAndWait); - bb(SizeofResource); - bb(Sleep); - bb(SleepConditionVariableCS); - bb(SleepConditionVariableSRW); - bb(SleepEx); - bb(StartThreadpoolIo); - bb(SubmitThreadpoolWork); - bb(SuspendThread); - bb(SwitchToFiber); - bb(SwitchToThread); - bb(SystemTimeToFileTime); - bb(SystemTimeToTzSpecificLocalTime); - bb(TerminateJobObject); - bb(TerminateProcess); - bb(TerminateThread); - bb(Thread32First); - bb(Thread32Next); - bb(TlsAlloc); - bb(TlsFree); - bb(TlsGetValue); - bb(TlsSetValue); - bb(Toolhelp32ReadProcessMemory); - bb(TransactNamedPipe); - bb(TransmitCommChar); - bb(TryAcquireSRWLockExclusive); - bb(TryAcquireSRWLockShared); - bb(TryEnterCriticalSection); - bb(TrySubmitThreadpoolCallback); - bb(TzSpecificLocalTimeToSystemTime); - bb(UnhandledExceptionFilter); - bb(UnlockFile); - bb(UnlockFileEx); - bb(UnmapViewOfFile); - bb(UnregisterApplicationRecoveryCallback); - bb(UnregisterApplicationRestart); - bb(UnregisterWait); - bb(UnregisterWaitEx); - bb(UpdateProcThreadAttribute); - bb(UpdateResourceA); - bb(UpdateResourceW); - bb(VerLanguageNameA); - bb(VerLanguageNameW); - bb(VerSetConditionMask); - bb(VerifyScripts); - bb(VerifyVersionInfoA); - bb(VerifyVersionInfoW); - bb(VirtualAlloc); - bb(VirtualAllocEx); - bb(VirtualAllocExNuma); - bb(VirtualFree); - bb(VirtualFreeEx); - bb(VirtualLock); - bb(VirtualProtect); - bb(VirtualProtectEx); - bb(VirtualQuery); - bb(VirtualQueryEx); - bb(VirtualUnlock); - bb(WTSGetActiveConsoleSessionId); - bb(WaitCommEvent); - bb(WaitForDebugEvent); - bb(WaitForMultipleObjects); - bb(WaitForMultipleObjectsEx); - bb(WaitForSingleObject); - bb(WaitForSingleObjectEx); - bb(WaitForThreadpoolIoCallbacks); - bb(WaitForThreadpoolTimerCallbacks); - bb(WaitForThreadpoolWaitCallbacks); - bb(WaitNamedPipeA); - bb(WaitNamedPipeW); - bb(WakeAllConditionVariable); - bb(WakeConditionVariable); - bb(WerGetFlags); - bb(WerRegisterFile); - bb(WerRegisterMemoryBlock); - bb(WerRegisterRuntimeExceptionModule); - bb(WerSetFlags); - bb(WerUnregisterFile); - bb(WerUnregisterMemoryBlock); - bb(WerUnregisterRuntimeExceptionModule); - bb(WideCharToMultiByte); - bb(WinExec); - bb(Wow64DisableWow64FsRedirection); - bb(Wow64EnableWow64FsRedirection); - bb(Wow64GetThreadContext); - bb(Wow64GetThreadSelectorEntry); - bb(Wow64RevertWow64FsRedirection); - bb(Wow64SetThreadContext); - bb(Wow64SuspendThread); - bb(WriteConsoleA); - bb(WriteConsoleInputA); - bb(WriteConsoleInputW); - bb(WriteConsoleOutputA); - bb(WriteConsoleOutputAttribute); - bb(WriteConsoleOutputCharacterA); - bb(WriteConsoleOutputCharacterW); - bb(WriteConsoleOutputW); - bb(WriteConsoleW); - bb(WriteFile); - bb(WriteFileEx); - bb(WriteFileGather); - bb(WritePrivateProfileSectionA); - bb(WritePrivateProfileSectionW); - bb(WritePrivateProfileStringA); - bb(WritePrivateProfileStringW); - bb(WritePrivateProfileStructA); - bb(WritePrivateProfileStructW); - bb(WriteProcessMemory); - bb(WriteProfileSectionA); - bb(WriteProfileSectionW); - bb(WriteProfileStringA); - bb(WriteProfileStringW); - bb(WriteTapemark); - bb(ZombifyActCtx); - bb(_hread); - bb(_hwrite); - bb(_lclose); - bb(_lcreat); - bb(_llseek); - bb(_lopen); - bb(_lread); - bb(_lwrite); - bb(lstrcat); - bb(lstrcatA); - bb(lstrcatW); - bb(lstrcmp); - bb(lstrcmpA); - bb(lstrcmpW); - bb(lstrcmpi); - bb(lstrcmpiA); - bb(lstrcmpiW); - bb(lstrcpy); - bb(lstrcpyA); - bb(lstrcpyW); - bb(lstrcpyn); - bb(lstrcpynA); - bb(lstrcpynW); - bb(lstrlen); - bb(lstrlenA); - bb(lstrlenW); -} diff --git a/deps/winapi-0.2.5/.gitignore b/deps/winapi-0.2.6/.gitignore similarity index 100% rename from deps/winapi-0.2.5/.gitignore rename to deps/winapi-0.2.6/.gitignore diff --git a/deps/winapi-0.2.6/.travis.yml b/deps/winapi-0.2.6/.travis.yml new file mode 100644 index 000000000..fe73fb39b --- /dev/null +++ b/deps/winapi-0.2.6/.travis.yml @@ -0,0 +1,21 @@ +language: rust +sudo: false +rust: + - 1.0.0 + - beta + - nightly +script: + - cargo build + - cargo package + - cargo test + - cargo doc +notifications: + email: false + webhooks: + - https://webhooks.gitter.im/e/295a1e640ebd30d63457 + irc: + channels: + - "irc.mozilla.org#winapi" + template: + - "%{repository_slug}/%{branch} (%{commit} - %{author}): %{message}" + skip_join: true diff --git a/deps/winapi-0.2.5/CONTRIBUTING.md b/deps/winapi-0.2.6/CONTRIBUTING.md similarity index 100% rename from deps/winapi-0.2.5/CONTRIBUTING.md rename to deps/winapi-0.2.6/CONTRIBUTING.md diff --git a/deps/winapi-0.2.6/Cargo.toml b/deps/winapi-0.2.6/Cargo.toml new file mode 100644 index 000000000..1d72b76da --- /dev/null +++ b/deps/winapi-0.2.6/Cargo.toml @@ -0,0 +1,57 @@ +[package] +name = "winapi" +version = "0.2.6" +authors = ["Peter Atashian <retep998@gmail.com>"] +description = "Types and constants for WinAPI bindings. See README for list of crates providing function bindings." +documentation = "https://retep998.github.io/doc/winapi/" +repository = "https://github.com/retep998/winapi-rs" +readme = "README.md" +keywords = ["windows", "ffi", "win32", "com", "directx"] +license = "MIT" + +[dev-dependencies] +advapi32-sys = { version = "*", path = "lib/advapi32" } +bcrypt-sys = { version = "*", path = "lib/bcrypt" } +comctl32-sys = { version = "*", path = "lib/comctl32" } +comdlg32-sys = { version = "*", path = "lib/comdlg32" } +credui-sys = { version = "*", path = "lib/credui" } +crypt32-sys = { version = "*", path = "lib/crypt32" } +d2d1-sys = { version = "*", path = "lib/d2d1" } +d3d11-sys = { version = "*", path = "lib/d3d11" } +d3d12-sys = { version = "*", path = "lib/d3d12" } +d3d9-sys = { version = "*", path = "lib/d3d9" } +d3dcompiler-sys = { version = "*", path = "lib/d3dcompiler" } +dbghelp-sys = { version = "*", path = "lib/dbghelp" } +dsound-sys = { version = "*", path = "lib/dsound" } +dwmapi-sys = { version = "*", path = "lib/dwmapi" } +dwrite-sys = { version = "*", path = "lib/dwrite" } +dxgi-sys = { version = "*", path = "lib/dxgi" } +dxguid-sys = { version = "*", path = "lib/dxguid" } +gdi32-sys = { version = "*", path = "lib/gdi32" } +hid-sys = { version = "*", path = "lib/hid" } +httpapi-sys = { version = "*", path = "lib/httpapi" } +kernel32-sys = { version = "*", path = "lib/kernel32" } +ktmw32-sys = { version = "*", path = "lib/ktmw32" } +mpr-sys = { version = "*", path = "lib/mpr" } +netapi32-sys = { version = "*", path = "lib/netapi32" } +odbc32-sys = { version = "*", path = "lib/odbc32" } +ole32-sys = { version = "*", path = "lib/ole32" } +oleaut32-sys = { version = "*", path = "lib/oleaut32" } +opengl32-sys = { version = "*", path = "lib/opengl32" } +psapi-sys = { version = "*", path = "lib/psapi" } +runtimeobject-sys = { version = "*", path = "lib/runtimeobject" } +secur32-sys = { version = "*", path = "lib/secur32" } +setupapi-sys = { version = "*", path = "lib/setupapi" } +shell32-sys = { version = "*", path = "lib/shell32" } +shlwapi-sys = { version = "*", path = "lib/shlwapi" } +user32-sys = { version = "*", path = "lib/user32" } +usp10-sys = { version = "*", path = "lib/usp10" } +uuid-sys = { version = "*", path = "lib/uuid" } +vssapi-sys = { version = "*", path = "lib/vssapi" } +wevtapi-sys = { version = "*", path = "lib/wevtapi" } +winhttp-sys = { version = "*", path = "lib/winhttp" } +winmm-sys = { version = "*", path = "lib/winmm" } +winscard-sys = { version = "*", path = "lib/winscard" } +winspool-sys = { version = "*", path = "lib/winspool" } +ws2_32-sys = { version = "*", path = "lib/ws2_32" } +xinput-sys = { version = "*", path = "lib/xinput" } diff --git a/deps/winapi-0.2.5/LICENSE.md b/deps/winapi-0.2.6/LICENSE.md similarity index 100% rename from deps/winapi-0.2.5/LICENSE.md rename to deps/winapi-0.2.6/LICENSE.md diff --git a/deps/winapi-0.2.6/README.md b/deps/winapi-0.2.6/README.md new file mode 100644 index 000000000..c87535ec6 --- /dev/null +++ b/deps/winapi-0.2.6/README.md @@ -0,0 +1,458 @@ +# winapi-rs [![Build status](https://ci.appveyor.com/api/projects/status/i47oonf5e7qm5utq/branch/master?svg=true)](https://ci.appveyor.com/project/retep998/winapi-rs/branch/master) [![Build Status](https://travis-ci.org/retep998/winapi-rs.svg?branch=master)](https://travis-ci.org/retep998/winapi-rs) [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/retep998/winapi-rs) [![Crates.io](https://img.shields.io/crates/v/winapi.svg)](https://crates.io/crates/winapi) # + +[Documentation](https://retep998.github.io/doc/winapi/) + +Official IRC channel: #winapi on [Mozilla IRC](https://wiki.mozilla.org/IRC) + +This crate provides types and constants for WinAPI FFI bindings. They are gathered by hand using the Windows 10 SDK from Microsoft. I aim to replace all existing Windows FFI in other crates with this set of crates through the "[Embrace, extend, and extinguish](http://en.wikipedia.org/wiki/Embrace,_extend_and_extinguish)" technique. + +If this crate is missing something you need, feel free to create an issue, open a pull request, or contact me via [other means](http://www.rustaceans.org/retep998). + +This crate depends on Rust 1.4 on Windows. On other platforms this crate is a no-op and should compile with Rust 1.0. + +## Example ## + +Cargo.toml: +```toml +[dependencies] +winapi = "0.2" +winmm-sys = "0.1" +``` +example.rs: +```Rust +extern crate winapi; +extern crate winmm; +fn func() { + winmm::PlaySoundA(...); +} +``` + +## Functions ## + +Bindings to library functions are in separate crates. The source to each crate is in the relevant subdirectory under the `lib` directory. + +### Usable crates ### +These are the ones that actually have functions in them: +* [advapi32-sys ![Crates.io](https://img.shields.io/crates/v/advapi32-sys.svg)](https://crates.io/crates/advapi32-sys) +* [crypt32-sys ![Crates.io](https://img.shields.io/crates/v/crypt32-sys.svg)](https://crates.io/crates/crypt32-sys) +* [d2d1-sys ![Crates.io](https://img.shields.io/crates/v/d2d1-sys.svg)](https://crates.io/crates/d2d1-sys) +* [d3d9-sys ![Crates.io](https://img.shields.io/crates/v/d3d9-sys.svg)](https://crates.io/crates/d3d9-sys) +* [d3d11-sys ![Crates.io](https://img.shields.io/crates/v/d3d11-sys.svg)](https://crates.io/crates/d3d11-sys) +* [d3dcompiler-sys ![Crates.io](https://img.shields.io/crates/v/d3dcompiler-sys.svg)](https://crates.io/crates/d3dcompiler-sys) +* [dbghelp-sys ![Crates.io](https://img.shields.io/crates/v/dbghelp-sys.svg)](https://crates.io/crates/dbghelp-sys) +* [dsound-sys ![Crates.io](https://img.shields.io/crates/v/dsound-sys.svg)](https://crates.io/crates/dsound-sys) +* [dwmapi-sys ![Crates.io](https://img.shields.io/crates/v/dwmapi-sys.svg)](https://crates.io/crates/dwmapi-sys) +* [dwrite-sys ![Crates.io](https://img.shields.io/crates/v/dwrite-sys.svg)](https://crates.io/crates/dwrite-sys) +* [gdi32-sys ![Crates.io](https://img.shields.io/crates/v/gdi32-sys.svg)](https://crates.io/crates/gdi32-sys) +* [hid-sys ![Crates.io](https://img.shields.io/crates/v/hid-sys.svg)](https://crates.io/crates/hid-sys) +* [kernel32-sys ![Crates.io](https://img.shields.io/crates/v/kernel32-sys.svg)](https://crates.io/crates/kernel32-sys) +* [ktmw32-sys ![Crates.io](https://img.shields.io/crates/v/ktmw32-sys.svg)](https://crates.io/crates/ktmw32-sys) +* [mpr-sys ![Crates.io](https://img.shields.io/crates/v/mpr-sys.svg)](https://crates.io/crates/mpr-sys) +* [odbc32-sys ![Crates.io](https://img.shields.io/crates/v/odbc32-sys.svg)](https://crates.io/crates/odbc32-sys) +* [ole32-sys ![Crates.io](https://img.shields.io/crates/v/ole32-sys.svg)](https://crates.io/crates/ole32-sys) +* [oleaut32-sys ![Crates.io](https://img.shields.io/crates/v/oleaut32-sys.svg)](https://crates.io/crates/oleaut32-sys) +* [opengl32-sys ![Crates.io](https://img.shields.io/crates/v/opengl32-sys.svg)](https://crates.io/crates/opengl32-sys) +* [psapi-sys ![Crates.io](https://img.shields.io/crates/v/psapi-sys.svg)](https://crates.io/crates/psapi-sys) +* [secur32-sys ![Crates.io](https://img.shields.io/crates/v/secur32-sys.svg)](https://crates.io/crates/secur32-sys) +* [shell32-sys ![Crates.io](https://img.shields.io/crates/v/shell32-sys.svg)](https://crates.io/crates/shell32-sys) +* [user32-sys ![Crates.io](https://img.shields.io/crates/v/user32-sys.svg)](https://crates.io/crates/user32-sys) +* [uuid-sys ![Crates.io](https://img.shields.io/crates/v/uuid-sys.svg)](https://crates.io/crates/uuid-sys) +* [vssapi-sys ![Crates.io](https://img.shields.io/crates/v/vssapi-sys.svg)](https://crates.io/crates/vssapi-sys) +* [winmm-sys ![Crates.io](https://img.shields.io/crates/v/winmm-sys.svg)](https://crates.io/crates/winmm-sys) +* [ws2_32-sys ![Crates.io](https://img.shields.io/crates/v/ws2_32-sys.svg)](https://crates.io/crates/ws2_32-sys) +* [xinput-sys ![Crates.io](https://img.shields.io/crates/v/xinput-sys.svg)](https://crates.io/crates/xinput-sys) + +### Reserved crates ### +These are the ones that are reserved for future use: +* [aclui-sys ![Crates.io](https://img.shields.io/crates/v/aclui-sys.svg)](https://crates.io/crates/aclui-sys) +* [activeds-sys ![Crates.io](https://img.shields.io/crates/v/activeds-sys.svg)](https://crates.io/crates/activeds-sys) +* [adsiid-sys ![Crates.io](https://img.shields.io/crates/v/adsiid-sys.svg)](https://crates.io/crates/adsiid-sys) +* [advpack-sys ![Crates.io](https://img.shields.io/crates/v/advpack-sys.svg)](https://crates.io/crates/advpack-sys) +* [ahadmin-sys ![Crates.io](https://img.shields.io/crates/v/ahadmin-sys.svg)](https://crates.io/crates/ahadmin-sys) +* [alink-sys ![Crates.io](https://img.shields.io/crates/v/alink-sys.svg)](https://crates.io/crates/alink-sys) +* [amstrmid-sys ![Crates.io](https://img.shields.io/crates/v/amstrmid-sys.svg)](https://crates.io/crates/amstrmid-sys) +* [api-ms-win-net-isolation-l1-1-0-sys ![Crates.io](https://img.shields.io/crates/v/api-ms-win-net-isolation-l1-1-0-sys.svg)](https://crates.io/crates/api-ms-win-net-isolation-l1-1-0-sys) +* [apidll-sys ![Crates.io](https://img.shields.io/crates/v/apidll-sys.svg)](https://crates.io/crates/apidll-sys) +* [appmgmts-sys ![Crates.io](https://img.shields.io/crates/v/appmgmts-sys.svg)](https://crates.io/crates/appmgmts-sys) +* [appmgr-sys ![Crates.io](https://img.shields.io/crates/v/appmgr-sys.svg)](https://crates.io/crates/appmgr-sys) +* [appnotify-sys ![Crates.io](https://img.shields.io/crates/v/appnotify-sys.svg)](https://crates.io/crates/appnotify-sys) +* [asycfilt-sys ![Crates.io](https://img.shields.io/crates/v/asycfilt-sys.svg)](https://crates.io/crates/asycfilt-sys) +* [audiobaseprocessingobject-sys ![Crates.io](https://img.shields.io/crates/v/audiobaseprocessingobject-sys.svg)](https://crates.io/crates/audiobaseprocessingobject-sys) +* [audioeng-sys ![Crates.io](https://img.shields.io/crates/v/audioeng-sys.svg)](https://crates.io/crates/audioeng-sys) +* [audiomediatypecrt-sys ![Crates.io](https://img.shields.io/crates/v/audiomediatypecrt-sys.svg)](https://crates.io/crates/audiomediatypecrt-sys) +* [authz-sys ![Crates.io](https://img.shields.io/crates/v/authz-sys.svg)](https://crates.io/crates/authz-sys) +* [aux_ulib-sys ![Crates.io](https://img.shields.io/crates/v/aux_ulib-sys.svg)](https://crates.io/crates/aux_ulib-sys) +* [avifil32-sys ![Crates.io](https://img.shields.io/crates/v/avifil32-sys.svg)](https://crates.io/crates/avifil32-sys) +* [avrt-sys ![Crates.io](https://img.shields.io/crates/v/avrt-sys.svg)](https://crates.io/crates/avrt-sys) +* [basesrv-sys ![Crates.io](https://img.shields.io/crates/v/basesrv-sys.svg)](https://crates.io/crates/basesrv-sys) +* [bcrypt-sys ![Crates.io](https://img.shields.io/crates/v/bcrypt-sys.svg)](https://crates.io/crates/bcrypt-sys) +* [bits-sys ![Crates.io](https://img.shields.io/crates/v/bits-sys.svg)](https://crates.io/crates/bits-sys) +* [bluetoothapis-sys ![Crates.io](https://img.shields.io/crates/v/bluetoothapis-sys.svg)](https://crates.io/crates/bluetoothapis-sys) +* [bthprops-sys ![Crates.io](https://img.shields.io/crates/v/bthprops-sys.svg)](https://crates.io/crates/bthprops-sys) +* [bufferoverflow-sys ![Crates.io](https://img.shields.io/crates/v/bufferoverflow-sys.svg)](https://crates.io/crates/bufferoverflow-sys) +* [bufferoverflowu-sys ![Crates.io](https://img.shields.io/crates/v/bufferoverflowu-sys.svg)](https://crates.io/crates/bufferoverflowu-sys) +* [cabinet-sys ![Crates.io](https://img.shields.io/crates/v/cabinet-sys.svg)](https://crates.io/crates/cabinet-sys) +* [certadm-sys ![Crates.io](https://img.shields.io/crates/v/certadm-sys.svg)](https://crates.io/crates/certadm-sys) +* [certca-sys ![Crates.io](https://img.shields.io/crates/v/certca-sys.svg)](https://crates.io/crates/certca-sys) +* [certcli-sys ![Crates.io](https://img.shields.io/crates/v/certcli-sys.svg)](https://crates.io/crates/certcli-sys) +* [certidl-sys ![Crates.io](https://img.shields.io/crates/v/certidl-sys.svg)](https://crates.io/crates/certidl-sys) +* [certpoleng-sys ![Crates.io](https://img.shields.io/crates/v/certpoleng-sys.svg)](https://crates.io/crates/certpoleng-sys) +* [cfgmgr32-sys ![Crates.io](https://img.shields.io/crates/v/cfgmgr32-sys.svg)](https://crates.io/crates/cfgmgr32-sys) +* [clfsmgmt-sys ![Crates.io](https://img.shields.io/crates/v/clfsmgmt-sys.svg)](https://crates.io/crates/clfsmgmt-sys) +* [clfsw32-sys ![Crates.io](https://img.shields.io/crates/v/clfsw32-sys.svg)](https://crates.io/crates/clfsw32-sys) +* [clusapi-sys ![Crates.io](https://img.shields.io/crates/v/clusapi-sys.svg)](https://crates.io/crates/clusapi-sys) +* [comctl32-sys ![Crates.io](https://img.shields.io/crates/v/comctl32-sys.svg)](https://crates.io/crates/comctl32-sys) +* [comdlg32-sys ![Crates.io](https://img.shields.io/crates/v/comdlg32-sys.svg)](https://crates.io/crates/comdlg32-sys) +* [comppkgsup-sys ![Crates.io](https://img.shields.io/crates/v/comppkgsup-sys.svg)](https://crates.io/crates/comppkgsup-sys) +* [compstui-sys ![Crates.io](https://img.shields.io/crates/v/compstui-sys.svg)](https://crates.io/crates/compstui-sys) +* [comsvcs-sys ![Crates.io](https://img.shields.io/crates/v/comsvcs-sys.svg)](https://crates.io/crates/comsvcs-sys) +* [corguids-sys ![Crates.io](https://img.shields.io/crates/v/corguids-sys.svg)](https://crates.io/crates/corguids-sys) +* [correngine-sys ![Crates.io](https://img.shields.io/crates/v/correngine-sys.svg)](https://crates.io/crates/correngine-sys) +* [credui-sys ![Crates.io](https://img.shields.io/crates/v/credui-sys.svg)](https://crates.io/crates/credui-sys) +* [cryptdll-sys ![Crates.io](https://img.shields.io/crates/v/cryptdll-sys.svg)](https://crates.io/crates/cryptdll-sys) +* [cryptnet-sys ![Crates.io](https://img.shields.io/crates/v/cryptnet-sys.svg)](https://crates.io/crates/cryptnet-sys) +* [cryptui-sys ![Crates.io](https://img.shields.io/crates/v/cryptui-sys.svg)](https://crates.io/crates/cryptui-sys) +* [cryptxml-sys ![Crates.io](https://img.shields.io/crates/v/cryptxml-sys.svg)](https://crates.io/crates/cryptxml-sys) +* [cscapi-sys ![Crates.io](https://img.shields.io/crates/v/cscapi-sys.svg)](https://crates.io/crates/cscapi-sys) +* [cscdll-sys ![Crates.io](https://img.shields.io/crates/v/cscdll-sys.svg)](https://crates.io/crates/cscdll-sys) +* [d3d10-sys ![Crates.io](https://img.shields.io/crates/v/d3d10-sys.svg)](https://crates.io/crates/d3d10-sys) +* [d3d10_1-sys ![Crates.io](https://img.shields.io/crates/v/d3d10_1-sys.svg)](https://crates.io/crates/d3d10_1-sys) +* [d3dcsx-sys ![Crates.io](https://img.shields.io/crates/v/d3dcsx-sys.svg)](https://crates.io/crates/d3dcsx-sys) +* [d3dcsxd-sys ![Crates.io](https://img.shields.io/crates/v/d3dcsxd-sys.svg)](https://crates.io/crates/d3dcsxd-sys) +* [davclnt-sys ![Crates.io](https://img.shields.io/crates/v/davclnt-sys.svg)](https://crates.io/crates/davclnt-sys) +* [dbgeng-sys ![Crates.io](https://img.shields.io/crates/v/dbgeng-sys.svg)](https://crates.io/crates/dbgeng-sys) +* [dciman32-sys ![Crates.io](https://img.shields.io/crates/v/dciman32-sys.svg)](https://crates.io/crates/dciman32-sys) +* [dcomp-sys ![Crates.io](https://img.shields.io/crates/v/dcomp-sys.svg)](https://crates.io/crates/dcomp-sys) +* [ddraw-sys ![Crates.io](https://img.shields.io/crates/v/ddraw-sys.svg)](https://crates.io/crates/ddraw-sys) +* [devenum-sys ![Crates.io](https://img.shields.io/crates/v/devenum-sys.svg)](https://crates.io/crates/devenum-sys) +* [deviceaccess-sys ![Crates.io](https://img.shields.io/crates/v/deviceaccess-sys.svg)](https://crates.io/crates/deviceaccess-sys) +* [devmgr-sys ![Crates.io](https://img.shields.io/crates/v/devmgr-sys.svg)](https://crates.io/crates/devmgr-sys) +* [dflayout-sys ![Crates.io](https://img.shields.io/crates/v/dflayout-sys.svg)](https://crates.io/crates/dflayout-sys) +* [dhcpcsvc-sys ![Crates.io](https://img.shields.io/crates/v/dhcpcsvc-sys.svg)](https://crates.io/crates/dhcpcsvc-sys) +* [dhcpcsvc6-sys ![Crates.io](https://img.shields.io/crates/v/dhcpcsvc6-sys.svg)](https://crates.io/crates/dhcpcsvc6-sys) +* [dhcpsapi-sys ![Crates.io](https://img.shields.io/crates/v/dhcpsapi-sys.svg)](https://crates.io/crates/dhcpsapi-sys) +* [difxapi-sys ![Crates.io](https://img.shields.io/crates/v/difxapi-sys.svg)](https://crates.io/crates/difxapi-sys) +* [dinput8-sys ![Crates.io](https://img.shields.io/crates/v/dinput8-sys.svg)](https://crates.io/crates/dinput8-sys) +* [dloadhelper-sys ![Crates.io](https://img.shields.io/crates/v/dloadhelper-sys.svg)](https://crates.io/crates/dloadhelper-sys) +* [dmoguids-sys ![Crates.io](https://img.shields.io/crates/v/dmoguids-sys.svg)](https://crates.io/crates/dmoguids-sys) +* [dnsapi-sys ![Crates.io](https://img.shields.io/crates/v/dnsapi-sys.svg)](https://crates.io/crates/dnsapi-sys) +* [dnscrcli-sys ![Crates.io](https://img.shields.io/crates/v/dnscrcli-sys.svg)](https://crates.io/crates/dnscrcli-sys) +* [dnslib-sys ![Crates.io](https://img.shields.io/crates/v/dnslib-sys.svg)](https://crates.io/crates/dnslib-sys) +* [dnsperf-sys ![Crates.io](https://img.shields.io/crates/v/dnsperf-sys.svg)](https://crates.io/crates/dnsperf-sys) +* [dnsrpc-sys ![Crates.io](https://img.shields.io/crates/v/dnsrpc-sys.svg)](https://crates.io/crates/dnsrpc-sys) +* [dnsrslvr-sys ![Crates.io](https://img.shields.io/crates/v/dnsrslvr-sys.svg)](https://crates.io/crates/dnsrslvr-sys) +* [dpx-sys ![Crates.io](https://img.shields.io/crates/v/dpx-sys.svg)](https://crates.io/crates/dpx-sys) +* [drt-sys ![Crates.io](https://img.shields.io/crates/v/drt-sys.svg)](https://crates.io/crates/drt-sys) +* [drtprov-sys ![Crates.io](https://img.shields.io/crates/v/drtprov-sys.svg)](https://crates.io/crates/drtprov-sys) +* [drttransport-sys ![Crates.io](https://img.shields.io/crates/v/drttransport-sys.svg)](https://crates.io/crates/drttransport-sys) +* [dsprop-sys ![Crates.io](https://img.shields.io/crates/v/dsprop-sys.svg)](https://crates.io/crates/dsprop-sys) +* [dssec-sys ![Crates.io](https://img.shields.io/crates/v/dssec-sys.svg)](https://crates.io/crates/dssec-sys) +* [dststlog-sys ![Crates.io](https://img.shields.io/crates/v/dststlog-sys.svg)](https://crates.io/crates/dststlog-sys) +* [dsuiext-sys ![Crates.io](https://img.shields.io/crates/v/dsuiext-sys.svg)](https://crates.io/crates/dsuiext-sys) +* [dtchelp-sys ![Crates.io](https://img.shields.io/crates/v/dtchelp-sys.svg)](https://crates.io/crates/dtchelp-sys) +* [dxgi-sys ![Crates.io](https://img.shields.io/crates/v/dxgi-sys.svg)](https://crates.io/crates/dxgi-sys) +* [dxguid-sys ![Crates.io](https://img.shields.io/crates/v/dxguid-sys.svg)](https://crates.io/crates/dxguid-sys) +* [dxtmsft-sys ![Crates.io](https://img.shields.io/crates/v/dxtmsft-sys.svg)](https://crates.io/crates/dxtmsft-sys) +* [dxtrans-sys ![Crates.io](https://img.shields.io/crates/v/dxtrans-sys.svg)](https://crates.io/crates/dxtrans-sys) +* [dxva2-sys ![Crates.io](https://img.shields.io/crates/v/dxva2-sys.svg)](https://crates.io/crates/dxva2-sys) +* [eappcfg-sys ![Crates.io](https://img.shields.io/crates/v/eappcfg-sys.svg)](https://crates.io/crates/eappcfg-sys) +* [eappprxy-sys ![Crates.io](https://img.shields.io/crates/v/eappprxy-sys.svg)](https://crates.io/crates/eappprxy-sys) +* [easregprov-sys ![Crates.io](https://img.shields.io/crates/v/easregprov-sys.svg)](https://crates.io/crates/easregprov-sys) +* [efswrt-sys ![Crates.io](https://img.shields.io/crates/v/efswrt-sys.svg)](https://crates.io/crates/efswrt-sys) +* [ehstorguids-sys ![Crates.io](https://img.shields.io/crates/v/ehstorguids-sys.svg)](https://crates.io/crates/ehstorguids-sys) +* [elfapi-sys ![Crates.io](https://img.shields.io/crates/v/elfapi-sys.svg)](https://crates.io/crates/elfapi-sys) +* [els-sys ![Crates.io](https://img.shields.io/crates/v/els-sys.svg)](https://crates.io/crates/els-sys) +* [elscore-sys ![Crates.io](https://img.shields.io/crates/v/elscore-sys.svg)](https://crates.io/crates/elscore-sys) +* [esent-sys ![Crates.io](https://img.shields.io/crates/v/esent-sys.svg)](https://crates.io/crates/esent-sys) +* [evr-sys ![Crates.io](https://img.shields.io/crates/v/evr-sys.svg)](https://crates.io/crates/evr-sys) +* [evr_vista-sys ![Crates.io](https://img.shields.io/crates/v/evr_vista-sys.svg)](https://crates.io/crates/evr_vista-sys) +* [faultrep-sys ![Crates.io](https://img.shields.io/crates/v/faultrep-sys.svg)](https://crates.io/crates/faultrep-sys) +* [feclient-sys ![Crates.io](https://img.shields.io/crates/v/feclient-sys.svg)](https://crates.io/crates/feclient-sys) +* [fhsvcctl-sys ![Crates.io](https://img.shields.io/crates/v/fhsvcctl-sys.svg)](https://crates.io/crates/fhsvcctl-sys) +* [fileextd-sys ![Crates.io](https://img.shields.io/crates/v/fileextd-sys.svg)](https://crates.io/crates/fileextd-sys) +* [fltlib-sys ![Crates.io](https://img.shields.io/crates/v/fltlib-sys.svg)](https://crates.io/crates/fltlib-sys) +* [fontsub-sys ![Crates.io](https://img.shields.io/crates/v/fontsub-sys.svg)](https://crates.io/crates/fontsub-sys) +* [format-sys ![Crates.io](https://img.shields.io/crates/v/format-sys.svg)](https://crates.io/crates/format-sys) +* [framedyd-sys ![Crates.io](https://img.shields.io/crates/v/framedyd-sys.svg)](https://crates.io/crates/framedyd-sys) +* [framedyn-sys ![Crates.io](https://img.shields.io/crates/v/framedyn-sys.svg)](https://crates.io/crates/framedyn-sys) +* [fwpuclnt-sys ![Crates.io](https://img.shields.io/crates/v/fwpuclnt-sys.svg)](https://crates.io/crates/fwpuclnt-sys) +* [fxsutility-sys ![Crates.io](https://img.shields.io/crates/v/fxsutility-sys.svg)](https://crates.io/crates/fxsutility-sys) +* [gdiplus-sys ![Crates.io](https://img.shields.io/crates/v/gdiplus-sys.svg)](https://crates.io/crates/gdiplus-sys) +* [glmf32-sys ![Crates.io](https://img.shields.io/crates/v/glmf32-sys.svg)](https://crates.io/crates/glmf32-sys) +* [glu32-sys ![Crates.io](https://img.shields.io/crates/v/glu32-sys.svg)](https://crates.io/crates/glu32-sys) +* [gpedit-sys ![Crates.io](https://img.shields.io/crates/v/gpedit-sys.svg)](https://crates.io/crates/gpedit-sys) +* [gpmuuid-sys ![Crates.io](https://img.shields.io/crates/v/gpmuuid-sys.svg)](https://crates.io/crates/gpmuuid-sys) +* [hbaapi-sys ![Crates.io](https://img.shields.io/crates/v/hbaapi-sys.svg)](https://crates.io/crates/hbaapi-sys) +* [hhsetup-sys ![Crates.io](https://img.shields.io/crates/v/hhsetup-sys.svg)](https://crates.io/crates/hhsetup-sys) +* [hlink-sys ![Crates.io](https://img.shields.io/crates/v/hlink-sys.svg)](https://crates.io/crates/hlink-sys) +* [htmlhelp-sys ![Crates.io](https://img.shields.io/crates/v/htmlhelp-sys.svg)](https://crates.io/crates/htmlhelp-sys) +* [httpapi-sys ![Crates.io](https://img.shields.io/crates/v/httpapi-sys.svg)](https://crates.io/crates/httpapi-sys) +* [iashlpr-sys ![Crates.io](https://img.shields.io/crates/v/iashlpr-sys.svg)](https://crates.io/crates/iashlpr-sys) +* [icm32-sys ![Crates.io](https://img.shields.io/crates/v/icm32-sys.svg)](https://crates.io/crates/icm32-sys) +* [icmui-sys ![Crates.io](https://img.shields.io/crates/v/icmui-sys.svg)](https://crates.io/crates/icmui-sys) +* [iepmapi-sys ![Crates.io](https://img.shields.io/crates/v/iepmapi-sys.svg)](https://crates.io/crates/iepmapi-sys) +* [iesetup-sys ![Crates.io](https://img.shields.io/crates/v/iesetup-sys.svg)](https://crates.io/crates/iesetup-sys) +* [imagehlp-sys ![Crates.io](https://img.shields.io/crates/v/imagehlp-sys.svg)](https://crates.io/crates/imagehlp-sys) +* [imgutil-sys ![Crates.io](https://img.shields.io/crates/v/imgutil-sys.svg)](https://crates.io/crates/imgutil-sys) +* [imm32-sys ![Crates.io](https://img.shields.io/crates/v/imm32-sys.svg)](https://crates.io/crates/imm32-sys) +* [infocardapi-sys ![Crates.io](https://img.shields.io/crates/v/infocardapi-sys.svg)](https://crates.io/crates/infocardapi-sys) +* [inseng-sys ![Crates.io](https://img.shields.io/crates/v/inseng-sys.svg)](https://crates.io/crates/inseng-sys) +* [int64-sys ![Crates.io](https://img.shields.io/crates/v/int64-sys.svg)](https://crates.io/crates/int64-sys) +* [iphlpapi-sys ![Crates.io](https://img.shields.io/crates/v/iphlpapi-sys.svg)](https://crates.io/crates/iphlpapi-sys) +* [iprop-sys ![Crates.io](https://img.shields.io/crates/v/iprop-sys.svg)](https://crates.io/crates/iprop-sys) +* [irprops-sys ![Crates.io](https://img.shields.io/crates/v/irprops-sys.svg)](https://crates.io/crates/irprops-sys) +* [iscsidsc-sys ![Crates.io](https://img.shields.io/crates/v/iscsidsc-sys.svg)](https://crates.io/crates/iscsidsc-sys) +* [jetoledb-sys ![Crates.io](https://img.shields.io/crates/v/jetoledb-sys.svg)](https://crates.io/crates/jetoledb-sys) +* [jsrt-sys ![Crates.io](https://img.shields.io/crates/v/jsrt-sys.svg)](https://crates.io/crates/jsrt-sys) +* [kerbcli-sys ![Crates.io](https://img.shields.io/crates/v/kerbcli-sys.svg)](https://crates.io/crates/kerbcli-sys) +* [ksproxy-sys ![Crates.io](https://img.shields.io/crates/v/ksproxy-sys.svg)](https://crates.io/crates/ksproxy-sys) +* [ksuser-sys ![Crates.io](https://img.shields.io/crates/v/ksuser-sys.svg)](https://crates.io/crates/ksuser-sys) +* [loadperf-sys ![Crates.io](https://img.shields.io/crates/v/loadperf-sys.svg)](https://crates.io/crates/loadperf-sys) +* [locationapi-sys ![Crates.io](https://img.shields.io/crates/v/locationapi-sys.svg)](https://crates.io/crates/locationapi-sys) +* [lz32-sys ![Crates.io](https://img.shields.io/crates/v/lz32-sys.svg)](https://crates.io/crates/lz32-sys) +* [magnification-sys ![Crates.io](https://img.shields.io/crates/v/magnification-sys.svg)](https://crates.io/crates/magnification-sys) +* [mapi32-sys ![Crates.io](https://img.shields.io/crates/v/mapi32-sys.svg)](https://crates.io/crates/mapi32-sys) +* [mbnapi_uuid-sys ![Crates.io](https://img.shields.io/crates/v/mbnapi_uuid-sys.svg)](https://crates.io/crates/mbnapi_uuid-sys) +* [mciole32-sys ![Crates.io](https://img.shields.io/crates/v/mciole32-sys.svg)](https://crates.io/crates/mciole32-sys) +* [mdmregistration-sys ![Crates.io](https://img.shields.io/crates/v/mdmregistration-sys.svg)](https://crates.io/crates/mdmregistration-sys) +* [mf-sys ![Crates.io](https://img.shields.io/crates/v/mf-sys.svg)](https://crates.io/crates/mf-sys) +* [mf_vista-sys ![Crates.io](https://img.shields.io/crates/v/mf_vista-sys.svg)](https://crates.io/crates/mf_vista-sys) +* [mfcore-sys ![Crates.io](https://img.shields.io/crates/v/mfcore-sys.svg)](https://crates.io/crates/mfcore-sys) +* [mfplat-sys ![Crates.io](https://img.shields.io/crates/v/mfplat-sys.svg)](https://crates.io/crates/mfplat-sys) +* [mfplat_vista-sys ![Crates.io](https://img.shields.io/crates/v/mfplat_vista-sys.svg)](https://crates.io/crates/mfplat_vista-sys) +* [mfplay-sys ![Crates.io](https://img.shields.io/crates/v/mfplay-sys.svg)](https://crates.io/crates/mfplay-sys) +* [mfreadwrite-sys ![Crates.io](https://img.shields.io/crates/v/mfreadwrite-sys.svg)](https://crates.io/crates/mfreadwrite-sys) +* [mfsrcsnk-sys ![Crates.io](https://img.shields.io/crates/v/mfsrcsnk-sys.svg)](https://crates.io/crates/mfsrcsnk-sys) +* [mfuuid-sys ![Crates.io](https://img.shields.io/crates/v/mfuuid-sys.svg)](https://crates.io/crates/mfuuid-sys) +* [mgmtapi-sys ![Crates.io](https://img.shields.io/crates/v/mgmtapi-sys.svg)](https://crates.io/crates/mgmtapi-sys) +* [mi-sys ![Crates.io](https://img.shields.io/crates/v/mi-sys.svg)](https://crates.io/crates/mi-sys) +* [mincore-sys ![Crates.io](https://img.shields.io/crates/v/mincore-sys.svg)](https://crates.io/crates/mincore-sys) +* [mincore_downlevel-sys ![Crates.io](https://img.shields.io/crates/v/mincore_downlevel-sys.svg)](https://crates.io/crates/mincore_downlevel-sys) +* [mmc-sys ![Crates.io](https://img.shields.io/crates/v/mmc-sys.svg)](https://crates.io/crates/mmc-sys) +* [mmdevapi-sys ![Crates.io](https://img.shields.io/crates/v/mmdevapi-sys.svg)](https://crates.io/crates/mmdevapi-sys) +* [mprapi-sys ![Crates.io](https://img.shields.io/crates/v/mprapi-sys.svg)](https://crates.io/crates/mprapi-sys) +* [mprsnap-sys ![Crates.io](https://img.shields.io/crates/v/mprsnap-sys.svg)](https://crates.io/crates/mprsnap-sys) +* [mqoa-sys ![Crates.io](https://img.shields.io/crates/v/mqoa-sys.svg)](https://crates.io/crates/mqoa-sys) +* [mqrt-sys ![Crates.io](https://img.shields.io/crates/v/mqrt-sys.svg)](https://crates.io/crates/mqrt-sys) +* [msaatext-sys ![Crates.io](https://img.shields.io/crates/v/msaatext-sys.svg)](https://crates.io/crates/msaatext-sys) +* [msacm32-sys ![Crates.io](https://img.shields.io/crates/v/msacm32-sys.svg)](https://crates.io/crates/msacm32-sys) +* [mscms-sys ![Crates.io](https://img.shields.io/crates/v/mscms-sys.svg)](https://crates.io/crates/mscms-sys) +* [mscoree-sys ![Crates.io](https://img.shields.io/crates/v/mscoree-sys.svg)](https://crates.io/crates/mscoree-sys) +* [mscorsn-sys ![Crates.io](https://img.shields.io/crates/v/mscorsn-sys.svg)](https://crates.io/crates/mscorsn-sys) +* [msctfmonitor-sys ![Crates.io](https://img.shields.io/crates/v/msctfmonitor-sys.svg)](https://crates.io/crates/msctfmonitor-sys) +* [msdasc-sys ![Crates.io](https://img.shields.io/crates/v/msdasc-sys.svg)](https://crates.io/crates/msdasc-sys) +* [msdelta-sys ![Crates.io](https://img.shields.io/crates/v/msdelta-sys.svg)](https://crates.io/crates/msdelta-sys) +* [msdmo-sys ![Crates.io](https://img.shields.io/crates/v/msdmo-sys.svg)](https://crates.io/crates/msdmo-sys) +* [msdrm-sys ![Crates.io](https://img.shields.io/crates/v/msdrm-sys.svg)](https://crates.io/crates/msdrm-sys) +* [msi-sys ![Crates.io](https://img.shields.io/crates/v/msi-sys.svg)](https://crates.io/crates/msi-sys) +* [msimg32-sys ![Crates.io](https://img.shields.io/crates/v/msimg32-sys.svg)](https://crates.io/crates/msimg32-sys) +* [mspatcha-sys ![Crates.io](https://img.shields.io/crates/v/mspatcha-sys.svg)](https://crates.io/crates/mspatcha-sys) +* [mspatchc-sys ![Crates.io](https://img.shields.io/crates/v/mspatchc-sys.svg)](https://crates.io/crates/mspatchc-sys) +* [mspbase-sys ![Crates.io](https://img.shields.io/crates/v/mspbase-sys.svg)](https://crates.io/crates/mspbase-sys) +* [msports-sys ![Crates.io](https://img.shields.io/crates/v/msports-sys.svg)](https://crates.io/crates/msports-sys) +* [msrating-sys ![Crates.io](https://img.shields.io/crates/v/msrating-sys.svg)](https://crates.io/crates/msrating-sys) +* [mstask-sys ![Crates.io](https://img.shields.io/crates/v/mstask-sys.svg)](https://crates.io/crates/mstask-sys) +* [msv1_0-sys ![Crates.io](https://img.shields.io/crates/v/msv1_0-sys.svg)](https://crates.io/crates/msv1_0-sys) +* [msvfw32-sys ![Crates.io](https://img.shields.io/crates/v/msvfw32-sys.svg)](https://crates.io/crates/msvfw32-sys) +* [mswsock-sys ![Crates.io](https://img.shields.io/crates/v/mswsock-sys.svg)](https://crates.io/crates/mswsock-sys) +* [msxml2-sys ![Crates.io](https://img.shields.io/crates/v/msxml2-sys.svg)](https://crates.io/crates/msxml2-sys) +* [msxml6-sys ![Crates.io](https://img.shields.io/crates/v/msxml6-sys.svg)](https://crates.io/crates/msxml6-sys) +* [mtx-sys ![Crates.io](https://img.shields.io/crates/v/mtx-sys.svg)](https://crates.io/crates/mtx-sys) +* [mtxdm-sys ![Crates.io](https://img.shields.io/crates/v/mtxdm-sys.svg)](https://crates.io/crates/mtxdm-sys) +* [muiload-sys ![Crates.io](https://img.shields.io/crates/v/muiload-sys.svg)](https://crates.io/crates/muiload-sys) +* [ncrypt-sys ![Crates.io](https://img.shields.io/crates/v/ncrypt-sys.svg)](https://crates.io/crates/ncrypt-sys) +* [nddeapi-sys ![Crates.io](https://img.shields.io/crates/v/nddeapi-sys.svg)](https://crates.io/crates/nddeapi-sys) +* [ndfapi-sys ![Crates.io](https://img.shields.io/crates/v/ndfapi-sys.svg)](https://crates.io/crates/ndfapi-sys) +* [ndproxystub-sys ![Crates.io](https://img.shields.io/crates/v/ndproxystub-sys.svg)](https://crates.io/crates/ndproxystub-sys) +* [netapi32-sys ![Crates.io](https://img.shields.io/crates/v/netapi32-sys.svg)](https://crates.io/crates/netapi32-sys) +* [netlib-sys ![Crates.io](https://img.shields.io/crates/v/netlib-sys.svg)](https://crates.io/crates/netlib-sys) +* [netsh-sys ![Crates.io](https://img.shields.io/crates/v/netsh-sys.svg)](https://crates.io/crates/netsh-sys) +* [newdev-sys ![Crates.io](https://img.shields.io/crates/v/newdev-sys.svg)](https://crates.io/crates/newdev-sys) +* [ninput-sys ![Crates.io](https://img.shields.io/crates/v/ninput-sys.svg)](https://crates.io/crates/ninput-sys) +* [normaliz-sys ![Crates.io](https://img.shields.io/crates/v/normaliz-sys.svg)](https://crates.io/crates/normaliz-sys) +* [nt-sys ![Crates.io](https://img.shields.io/crates/v/nt-sys.svg)](https://crates.io/crates/nt-sys) +* [ntdll-sys ![Crates.io](https://img.shields.io/crates/v/ntdll-sys.svg)](https://crates.io/crates/ntdll-sys) +* [ntdsa-sys ![Crates.io](https://img.shields.io/crates/v/ntdsa-sys.svg)](https://crates.io/crates/ntdsa-sys) +* [ntdsapi-sys ![Crates.io](https://img.shields.io/crates/v/ntdsapi-sys.svg)](https://crates.io/crates/ntdsapi-sys) +* [ntdsatq-sys ![Crates.io](https://img.shields.io/crates/v/ntdsatq-sys.svg)](https://crates.io/crates/ntdsatq-sys) +* [ntdsetup-sys ![Crates.io](https://img.shields.io/crates/v/ntdsetup-sys.svg)](https://crates.io/crates/ntdsetup-sys) +* [ntfrsapi-sys ![Crates.io](https://img.shields.io/crates/v/ntfrsapi-sys.svg)](https://crates.io/crates/ntfrsapi-sys) +* [ntlanman-sys ![Crates.io](https://img.shields.io/crates/v/ntlanman-sys.svg)](https://crates.io/crates/ntlanman-sys) +* [ntmarta-sys ![Crates.io](https://img.shields.io/crates/v/ntmarta-sys.svg)](https://crates.io/crates/ntmarta-sys) +* [ntquery-sys ![Crates.io](https://img.shields.io/crates/v/ntquery-sys.svg)](https://crates.io/crates/ntquery-sys) +* [ntstc_libcmt-sys ![Crates.io](https://img.shields.io/crates/v/ntstc_libcmt-sys.svg)](https://crates.io/crates/ntstc_libcmt-sys) +* [ntstc_msvcrt-sys ![Crates.io](https://img.shields.io/crates/v/ntstc_msvcrt-sys.svg)](https://crates.io/crates/ntstc_msvcrt-sys) +* [ntvdm-sys ![Crates.io](https://img.shields.io/crates/v/ntvdm-sys.svg)](https://crates.io/crates/ntvdm-sys) +* [objsel-sys ![Crates.io](https://img.shields.io/crates/v/objsel-sys.svg)](https://crates.io/crates/objsel-sys) +* [odbcbcp-sys ![Crates.io](https://img.shields.io/crates/v/odbcbcp-sys.svg)](https://crates.io/crates/odbcbcp-sys) +* [odbccp32-sys ![Crates.io](https://img.shields.io/crates/v/odbccp32-sys.svg)](https://crates.io/crates/odbccp32-sys) +* [oemlicense-sys ![Crates.io](https://img.shields.io/crates/v/oemlicense-sys.svg)](https://crates.io/crates/oemlicense-sys) +* [oleacc-sys ![Crates.io](https://img.shields.io/crates/v/oleacc-sys.svg)](https://crates.io/crates/oleacc-sys) +* [olecli32-sys ![Crates.io](https://img.shields.io/crates/v/olecli32-sys.svg)](https://crates.io/crates/olecli32-sys) +* [oledb-sys ![Crates.io](https://img.shields.io/crates/v/oledb-sys.svg)](https://crates.io/crates/oledb-sys) +* [oledlg-sys ![Crates.io](https://img.shields.io/crates/v/oledlg-sys.svg)](https://crates.io/crates/oledlg-sys) +* [olepro32-sys ![Crates.io](https://img.shields.io/crates/v/olepro32-sys.svg)](https://crates.io/crates/olepro32-sys) +* [olesvr32-sys ![Crates.io](https://img.shields.io/crates/v/olesvr32-sys.svg)](https://crates.io/crates/olesvr32-sys) +* [ondemandconnroutehelper-sys ![Crates.io](https://img.shields.io/crates/v/ondemandconnroutehelper-sys.svg)](https://crates.io/crates/ondemandconnroutehelper-sys) +* [osptk-sys ![Crates.io](https://img.shields.io/crates/v/osptk-sys.svg)](https://crates.io/crates/osptk-sys) +* [p2p-sys ![Crates.io](https://img.shields.io/crates/v/p2p-sys.svg)](https://crates.io/crates/p2p-sys) +* [p2pgraph-sys ![Crates.io](https://img.shields.io/crates/v/p2pgraph-sys.svg)](https://crates.io/crates/p2pgraph-sys) +* [patchwiz-sys ![Crates.io](https://img.shields.io/crates/v/patchwiz-sys.svg)](https://crates.io/crates/patchwiz-sys) +* [pathcch-sys ![Crates.io](https://img.shields.io/crates/v/pathcch-sys.svg)](https://crates.io/crates/pathcch-sys) +* [pdh-sys ![Crates.io](https://img.shields.io/crates/v/pdh-sys.svg)](https://crates.io/crates/pdh-sys) +* [peerdist-sys ![Crates.io](https://img.shields.io/crates/v/peerdist-sys.svg)](https://crates.io/crates/peerdist-sys) +* [photoacquireuid-sys ![Crates.io](https://img.shields.io/crates/v/photoacquireuid-sys.svg)](https://crates.io/crates/photoacquireuid-sys) +* [portabledeviceguids-sys ![Crates.io](https://img.shields.io/crates/v/portabledeviceguids-sys.svg)](https://crates.io/crates/portabledeviceguids-sys) +* [powrprof-sys ![Crates.io](https://img.shields.io/crates/v/powrprof-sys.svg)](https://crates.io/crates/powrprof-sys) +* [prntvpt-sys ![Crates.io](https://img.shields.io/crates/v/prntvpt-sys.svg)](https://crates.io/crates/prntvpt-sys) +* [propsys-sys ![Crates.io](https://img.shields.io/crates/v/propsys-sys.svg)](https://crates.io/crates/propsys-sys) +* [quartz-sys ![Crates.io](https://img.shields.io/crates/v/quartz-sys.svg)](https://crates.io/crates/quartz-sys) +* [query-sys ![Crates.io](https://img.shields.io/crates/v/query-sys.svg)](https://crates.io/crates/query-sys) +* [qutil-sys ![Crates.io](https://img.shields.io/crates/v/qutil-sys.svg)](https://crates.io/crates/qutil-sys) +* [qwave-sys ![Crates.io](https://img.shields.io/crates/v/qwave-sys.svg)](https://crates.io/crates/qwave-sys) +* [rasapi32-sys ![Crates.io](https://img.shields.io/crates/v/rasapi32-sys.svg)](https://crates.io/crates/rasapi32-sys) +* [rasdlg-sys ![Crates.io](https://img.shields.io/crates/v/rasdlg-sys.svg)](https://crates.io/crates/rasdlg-sys) +* [rasuser-sys ![Crates.io](https://img.shields.io/crates/v/rasuser-sys.svg)](https://crates.io/crates/rasuser-sys) +* [resutils-sys ![Crates.io](https://img.shields.io/crates/v/resutils-sys.svg)](https://crates.io/crates/resutils-sys) +* [rometadata-sys ![Crates.io](https://img.shields.io/crates/v/rometadata-sys.svg)](https://crates.io/crates/rometadata-sys) +* [rpcexts-sys ![Crates.io](https://img.shields.io/crates/v/rpcexts-sys.svg)](https://crates.io/crates/rpcexts-sys) +* [rpcns4-sys ![Crates.io](https://img.shields.io/crates/v/rpcns4-sys.svg)](https://crates.io/crates/rpcns4-sys) +* [rpcproxy-sys ![Crates.io](https://img.shields.io/crates/v/rpcproxy-sys.svg)](https://crates.io/crates/rpcproxy-sys) +* [rpcrt4-sys ![Crates.io](https://img.shields.io/crates/v/rpcrt4-sys.svg)](https://crates.io/crates/rpcrt4-sys) +* [rpcutil-sys ![Crates.io](https://img.shields.io/crates/v/rpcutil-sys.svg)](https://crates.io/crates/rpcutil-sys) +* [rstrtmgr-sys ![Crates.io](https://img.shields.io/crates/v/rstrtmgr-sys.svg)](https://crates.io/crates/rstrtmgr-sys) +* [rtm-sys ![Crates.io](https://img.shields.io/crates/v/rtm-sys.svg)](https://crates.io/crates/rtm-sys) +* [rtutils-sys ![Crates.io](https://img.shields.io/crates/v/rtutils-sys.svg)](https://crates.io/crates/rtutils-sys) +* [rtworkq-sys ![Crates.io](https://img.shields.io/crates/v/rtworkq-sys.svg)](https://crates.io/crates/rtworkq-sys) +* [runtimeobject-sys ![Crates.io](https://img.shields.io/crates/v/runtimeobject-sys.svg)](https://crates.io/crates/runtimeobject-sys) +* [samlib-sys ![Crates.io](https://img.shields.io/crates/v/samlib-sys.svg)](https://crates.io/crates/samlib-sys) +* [samsrv-sys ![Crates.io](https://img.shields.io/crates/v/samsrv-sys.svg)](https://crates.io/crates/samsrv-sys) +* [sapi-sys ![Crates.io](https://img.shields.io/crates/v/sapi-sys.svg)](https://crates.io/crates/sapi-sys) +* [sas-sys ![Crates.io](https://img.shields.io/crates/v/sas-sys.svg)](https://crates.io/crates/sas-sys) +* [sbtsv-sys ![Crates.io](https://img.shields.io/crates/v/sbtsv-sys.svg)](https://crates.io/crates/sbtsv-sys) +* [scarddlg-sys ![Crates.io](https://img.shields.io/crates/v/scarddlg-sys.svg)](https://crates.io/crates/scarddlg-sys) +* [scecli-sys ![Crates.io](https://img.shields.io/crates/v/scecli-sys.svg)](https://crates.io/crates/scecli-sys) +* [scesrv-sys ![Crates.io](https://img.shields.io/crates/v/scesrv-sys.svg)](https://crates.io/crates/scesrv-sys) +* [schannel-sys ![Crates.io](https://img.shields.io/crates/v/schannel-sys.svg)](https://crates.io/crates/schannel-sys) +* [scrnsave-sys ![Crates.io](https://img.shields.io/crates/v/scrnsave-sys.svg)](https://crates.io/crates/scrnsave-sys) +* [scrnsavw-sys ![Crates.io](https://img.shields.io/crates/v/scrnsavw-sys.svg)](https://crates.io/crates/scrnsavw-sys) +* [searchsdk-sys ![Crates.io](https://img.shields.io/crates/v/searchsdk-sys.svg)](https://crates.io/crates/searchsdk-sys) +* [security-sys ![Crates.io](https://img.shields.io/crates/v/security-sys.svg)](https://crates.io/crates/security-sys) +* [sens-sys ![Crates.io](https://img.shields.io/crates/v/sens-sys.svg)](https://crates.io/crates/sens-sys) +* [sensapi-sys ![Crates.io](https://img.shields.io/crates/v/sensapi-sys.svg)](https://crates.io/crates/sensapi-sys) +* [sensorsapi-sys ![Crates.io](https://img.shields.io/crates/v/sensorsapi-sys.svg)](https://crates.io/crates/sensorsapi-sys) +* [setupapi-sys ![Crates.io](https://img.shields.io/crates/v/setupapi-sys.svg)](https://crates.io/crates/setupapi-sys) +* [sfc-sys ![Crates.io](https://img.shields.io/crates/v/sfc-sys.svg)](https://crates.io/crates/sfc-sys) +* [shcore-sys ![Crates.io](https://img.shields.io/crates/v/shcore-sys.svg)](https://crates.io/crates/shcore-sys) +* [shdocvw-sys ![Crates.io](https://img.shields.io/crates/v/shdocvw-sys.svg)](https://crates.io/crates/shdocvw-sys) +* [shfolder-sys ![Crates.io](https://img.shields.io/crates/v/shfolder-sys.svg)](https://crates.io/crates/shfolder-sys) +* [shlwapi-sys ![Crates.io](https://img.shields.io/crates/v/shlwapi-sys.svg)](https://crates.io/crates/shlwapi-sys) +* [sisbkup-sys ![Crates.io](https://img.shields.io/crates/v/sisbkup-sys.svg)](https://crates.io/crates/sisbkup-sys) +* [slc-sys ![Crates.io](https://img.shields.io/crates/v/slc-sys.svg)](https://crates.io/crates/slc-sys) +* [slcext-sys ![Crates.io](https://img.shields.io/crates/v/slcext-sys.svg)](https://crates.io/crates/slcext-sys) +* [slwga-sys ![Crates.io](https://img.shields.io/crates/v/slwga-sys.svg)](https://crates.io/crates/slwga-sys) +* [snmpapi-sys ![Crates.io](https://img.shields.io/crates/v/snmpapi-sys.svg)](https://crates.io/crates/snmpapi-sys) +* [spoolss-sys ![Crates.io](https://img.shields.io/crates/v/spoolss-sys.svg)](https://crates.io/crates/spoolss-sys) +* [sporder-sys ![Crates.io](https://img.shields.io/crates/v/sporder-sys.svg)](https://crates.io/crates/sporder-sys) +* [srclient-sys ![Crates.io](https://img.shields.io/crates/v/srclient-sys.svg)](https://crates.io/crates/srclient-sys) +* [ssdpapi-sys ![Crates.io](https://img.shields.io/crates/v/ssdpapi-sys.svg)](https://crates.io/crates/ssdpapi-sys) +* [sti-sys ![Crates.io](https://img.shields.io/crates/v/sti-sys.svg)](https://crates.io/crates/sti-sys) +* [strmbase-sys ![Crates.io](https://img.shields.io/crates/v/strmbase-sys.svg)](https://crates.io/crates/strmbase-sys) +* [strmiids-sys ![Crates.io](https://img.shields.io/crates/v/strmiids-sys.svg)](https://crates.io/crates/strmiids-sys) +* [strsafe-sys ![Crates.io](https://img.shields.io/crates/v/strsafe-sys.svg)](https://crates.io/crates/strsafe-sys) +* [structuredquery-sys ![Crates.io](https://img.shields.io/crates/v/structuredquery-sys.svg)](https://crates.io/crates/structuredquery-sys) +* [svcguid-sys ![Crates.io](https://img.shields.io/crates/v/svcguid-sys.svg)](https://crates.io/crates/svcguid-sys) +* [swdevice-sys ![Crates.io](https://img.shields.io/crates/v/swdevice-sys.svg)](https://crates.io/crates/swdevice-sys) +* [synchronization-sys ![Crates.io](https://img.shields.io/crates/v/synchronization-sys.svg)](https://crates.io/crates/synchronization-sys) +* [t2embed-sys ![Crates.io](https://img.shields.io/crates/v/t2embed-sys.svg)](https://crates.io/crates/t2embed-sys) +* [tapi32-sys ![Crates.io](https://img.shields.io/crates/v/tapi32-sys.svg)](https://crates.io/crates/tapi32-sys) +* [tapi32l-sys ![Crates.io](https://img.shields.io/crates/v/tapi32l-sys.svg)](https://crates.io/crates/tapi32l-sys) +* [taskschd-sys ![Crates.io](https://img.shields.io/crates/v/taskschd-sys.svg)](https://crates.io/crates/taskschd-sys) +* [tbs-sys ![Crates.io](https://img.shields.io/crates/v/tbs-sys.svg)](https://crates.io/crates/tbs-sys) +* [tdh-sys ![Crates.io](https://img.shields.io/crates/v/tdh-sys.svg)](https://crates.io/crates/tdh-sys) +* [thunk32-sys ![Crates.io](https://img.shields.io/crates/v/thunk32-sys.svg)](https://crates.io/crates/thunk32-sys) +* [tlbref-sys ![Crates.io](https://img.shields.io/crates/v/tlbref-sys.svg)](https://crates.io/crates/tlbref-sys) +* [traffic-sys ![Crates.io](https://img.shields.io/crates/v/traffic-sys.svg)](https://crates.io/crates/traffic-sys) +* [transcodeimageuid-sys ![Crates.io](https://img.shields.io/crates/v/transcodeimageuid-sys.svg)](https://crates.io/crates/transcodeimageuid-sys) +* [tsec-sys ![Crates.io](https://img.shields.io/crates/v/tsec-sys.svg)](https://crates.io/crates/tsec-sys) +* [tspubplugincom-sys ![Crates.io](https://img.shields.io/crates/v/tspubplugincom-sys.svg)](https://crates.io/crates/tspubplugincom-sys) +* [twain_32-sys ![Crates.io](https://img.shields.io/crates/v/twain_32-sys.svg)](https://crates.io/crates/twain_32-sys) +* [twinapi-sys ![Crates.io](https://img.shields.io/crates/v/twinapi-sys.svg)](https://crates.io/crates/twinapi-sys) +* [txfw32-sys ![Crates.io](https://img.shields.io/crates/v/txfw32-sys.svg)](https://crates.io/crates/txfw32-sys) +* [ualapi-sys ![Crates.io](https://img.shields.io/crates/v/ualapi-sys.svg)](https://crates.io/crates/ualapi-sys) +* [uiautomationcore-sys ![Crates.io](https://img.shields.io/crates/v/uiautomationcore-sys.svg)](https://crates.io/crates/uiautomationcore-sys) +* [umpdddi-sys ![Crates.io](https://img.shields.io/crates/v/umpdddi-sys.svg)](https://crates.io/crates/umpdddi-sys) +* [unicows-sys ![Crates.io](https://img.shields.io/crates/v/unicows-sys.svg)](https://crates.io/crates/unicows-sys) +* [urlmon-sys ![Crates.io](https://img.shields.io/crates/v/urlmon-sys.svg)](https://crates.io/crates/urlmon-sys) +* [userenv-sys ![Crates.io](https://img.shields.io/crates/v/userenv-sys.svg)](https://crates.io/crates/userenv-sys) +* [usp10-sys ![Crates.io](https://img.shields.io/crates/v/usp10-sys.svg)](https://crates.io/crates/usp10-sys) +* [uxtheme-sys ![Crates.io](https://img.shields.io/crates/v/uxtheme-sys.svg)](https://crates.io/crates/uxtheme-sys) +* [vccomsup-sys ![Crates.io](https://img.shields.io/crates/v/vccomsup-sys.svg)](https://crates.io/crates/vccomsup-sys) +* [vdmdbg-sys ![Crates.io](https://img.shields.io/crates/v/vdmdbg-sys.svg)](https://crates.io/crates/vdmdbg-sys) +* [vds_uuid-sys ![Crates.io](https://img.shields.io/crates/v/vds_uuid-sys.svg)](https://crates.io/crates/vds_uuid-sys) +* [version-sys ![Crates.io](https://img.shields.io/crates/v/version-sys.svg)](https://crates.io/crates/version-sys) +* [vfw32-sys ![Crates.io](https://img.shields.io/crates/v/vfw32-sys.svg)](https://crates.io/crates/vfw32-sys) +* [virtdisk-sys ![Crates.io](https://img.shields.io/crates/v/virtdisk-sys.svg)](https://crates.io/crates/virtdisk-sys) +* [vscmgr-sys ![Crates.io](https://img.shields.io/crates/v/vscmgr-sys.svg)](https://crates.io/crates/vscmgr-sys) +* [vss_uuid-sys ![Crates.io](https://img.shields.io/crates/v/vss_uuid-sys.svg)](https://crates.io/crates/vss_uuid-sys) +* [vstorinterface-sys ![Crates.io](https://img.shields.io/crates/v/vstorinterface-sys.svg)](https://crates.io/crates/vstorinterface-sys) +* [wbemuuid-sys ![Crates.io](https://img.shields.io/crates/v/wbemuuid-sys.svg)](https://crates.io/crates/wbemuuid-sys) +* [wcmapi-sys ![Crates.io](https://img.shields.io/crates/v/wcmapi-sys.svg)](https://crates.io/crates/wcmapi-sys) +* [wcmguid-sys ![Crates.io](https://img.shields.io/crates/v/wcmguid-sys.svg)](https://crates.io/crates/wcmguid-sys) +* [wdsbp-sys ![Crates.io](https://img.shields.io/crates/v/wdsbp-sys.svg)](https://crates.io/crates/wdsbp-sys) +* [wdsclientapi-sys ![Crates.io](https://img.shields.io/crates/v/wdsclientapi-sys.svg)](https://crates.io/crates/wdsclientapi-sys) +* [wdsmc-sys ![Crates.io](https://img.shields.io/crates/v/wdsmc-sys.svg)](https://crates.io/crates/wdsmc-sys) +* [wdspxe-sys ![Crates.io](https://img.shields.io/crates/v/wdspxe-sys.svg)](https://crates.io/crates/wdspxe-sys) +* [wdstptc-sys ![Crates.io](https://img.shields.io/crates/v/wdstptc-sys.svg)](https://crates.io/crates/wdstptc-sys) +* [webservices-sys ![Crates.io](https://img.shields.io/crates/v/webservices-sys.svg)](https://crates.io/crates/webservices-sys) +* [websocket-sys ![Crates.io](https://img.shields.io/crates/v/websocket-sys.svg)](https://crates.io/crates/websocket-sys) +* [wecapi-sys ![Crates.io](https://img.shields.io/crates/v/wecapi-sys.svg)](https://crates.io/crates/wecapi-sys) +* [wer-sys ![Crates.io](https://img.shields.io/crates/v/wer-sys.svg)](https://crates.io/crates/wer-sys) +* [wevtapi-sys ![Crates.io](https://img.shields.io/crates/v/wevtapi-sys.svg)](https://crates.io/crates/wevtapi-sys) +* [wiaguid-sys ![Crates.io](https://img.shields.io/crates/v/wiaguid-sys.svg)](https://crates.io/crates/wiaguid-sys) +* [wiaservc-sys ![Crates.io](https://img.shields.io/crates/v/wiaservc-sys.svg)](https://crates.io/crates/wiaservc-sys) +* [wiautil-sys ![Crates.io](https://img.shields.io/crates/v/wiautil-sys.svg)](https://crates.io/crates/wiautil-sys) +* [winbio-sys ![Crates.io](https://img.shields.io/crates/v/winbio-sys.svg)](https://crates.io/crates/winbio-sys) +* [windows-data-pdf-sys ![Crates.io](https://img.shields.io/crates/v/windows-data-pdf-sys.svg)](https://crates.io/crates/windows-data-pdf-sys) +* [windows-networking-sys ![Crates.io](https://img.shields.io/crates/v/windows-networking-sys.svg)](https://crates.io/crates/windows-networking-sys) +* [windows-ui-sys ![Crates.io](https://img.shields.io/crates/v/windows-ui-sys.svg)](https://crates.io/crates/windows-ui-sys) +* [windowscodecs-sys ![Crates.io](https://img.shields.io/crates/v/windowscodecs-sys.svg)](https://crates.io/crates/windowscodecs-sys) +* [windowssideshowguids-sys ![Crates.io](https://img.shields.io/crates/v/windowssideshowguids-sys.svg)](https://crates.io/crates/windowssideshowguids-sys) +* [winfax-sys ![Crates.io](https://img.shields.io/crates/v/winfax-sys.svg)](https://crates.io/crates/winfax-sys) +* [winhttp-sys ![Crates.io](https://img.shields.io/crates/v/winhttp-sys.svg)](https://crates.io/crates/winhttp-sys) +* [wininet-sys ![Crates.io](https://img.shields.io/crates/v/wininet-sys.svg)](https://crates.io/crates/wininet-sys) +* [winsatapi-sys ![Crates.io](https://img.shields.io/crates/v/winsatapi-sys.svg)](https://crates.io/crates/winsatapi-sys) +* [winscard-sys ![Crates.io](https://img.shields.io/crates/v/winscard-sys.svg)](https://crates.io/crates/winscard-sys) +* [winspool-sys ![Crates.io](https://img.shields.io/crates/v/winspool-sys.svg)](https://crates.io/crates/winspool-sys) +* [winsta-sys ![Crates.io](https://img.shields.io/crates/v/winsta-sys.svg)](https://crates.io/crates/winsta-sys) +* [winstrm-sys ![Crates.io](https://img.shields.io/crates/v/winstrm-sys.svg)](https://crates.io/crates/winstrm-sys) +* [wintrust-sys ![Crates.io](https://img.shields.io/crates/v/wintrust-sys.svg)](https://crates.io/crates/wintrust-sys) +* [winusb-sys ![Crates.io](https://img.shields.io/crates/v/winusb-sys.svg)](https://crates.io/crates/winusb-sys) +* [wlanapi-sys ![Crates.io](https://img.shields.io/crates/v/wlanapi-sys.svg)](https://crates.io/crates/wlanapi-sys) +* [wlanui-sys ![Crates.io](https://img.shields.io/crates/v/wlanui-sys.svg)](https://crates.io/crates/wlanui-sys) +* [wldap32-sys ![Crates.io](https://img.shields.io/crates/v/wldap32-sys.svg)](https://crates.io/crates/wldap32-sys) +* [wmcodecdspuuid-sys ![Crates.io](https://img.shields.io/crates/v/wmcodecdspuuid-sys.svg)](https://crates.io/crates/wmcodecdspuuid-sys) +* [wmdrmsdk-sys ![Crates.io](https://img.shields.io/crates/v/wmdrmsdk-sys.svg)](https://crates.io/crates/wmdrmsdk-sys) +* [wmip-sys ![Crates.io](https://img.shields.io/crates/v/wmip-sys.svg)](https://crates.io/crates/wmip-sys) +* [wmiutils-sys ![Crates.io](https://img.shields.io/crates/v/wmiutils-sys.svg)](https://crates.io/crates/wmiutils-sys) +* [wmvcore-sys ![Crates.io](https://img.shields.io/crates/v/wmvcore-sys.svg)](https://crates.io/crates/wmvcore-sys) +* [wnvapi-sys ![Crates.io](https://img.shields.io/crates/v/wnvapi-sys.svg)](https://crates.io/crates/wnvapi-sys) +* [workspaceax-sys ![Crates.io](https://img.shields.io/crates/v/workspaceax-sys.svg)](https://crates.io/crates/workspaceax-sys) +* [wow32-sys ![Crates.io](https://img.shields.io/crates/v/wow32-sys.svg)](https://crates.io/crates/wow32-sys) +* [wsbapp_uuid-sys ![Crates.io](https://img.shields.io/crates/v/wsbapp_uuid-sys.svg)](https://crates.io/crates/wsbapp_uuid-sys) +* [wsbonline-sys ![Crates.io](https://img.shields.io/crates/v/wsbonline-sys.svg)](https://crates.io/crates/wsbonline-sys) +* [wscapi-sys ![Crates.io](https://img.shields.io/crates/v/wscapi-sys.svg)](https://crates.io/crates/wscapi-sys) +* [wsclient-sys ![Crates.io](https://img.shields.io/crates/v/wsclient-sys.svg)](https://crates.io/crates/wsclient-sys) +* [wsdapi-sys ![Crates.io](https://img.shields.io/crates/v/wsdapi-sys.svg)](https://crates.io/crates/wsdapi-sys) +* [wsmsvc-sys ![Crates.io](https://img.shields.io/crates/v/wsmsvc-sys.svg)](https://crates.io/crates/wsmsvc-sys) +* [wsnmp32-sys ![Crates.io](https://img.shields.io/crates/v/wsnmp32-sys.svg)](https://crates.io/crates/wsnmp32-sys) +* [wsock32-sys ![Crates.io](https://img.shields.io/crates/v/wsock32-sys.svg)](https://crates.io/crates/wsock32-sys) +* [wtsapi32-sys ![Crates.io](https://img.shields.io/crates/v/wtsapi32-sys.svg)](https://crates.io/crates/wtsapi32-sys) +* [wuguid-sys ![Crates.io](https://img.shields.io/crates/v/wuguid-sys.svg)](https://crates.io/crates/wuguid-sys) +* [xapobase-sys ![Crates.io](https://img.shields.io/crates/v/xapobase-sys.svg)](https://crates.io/crates/xapobase-sys) +* [xaswitch-sys ![Crates.io](https://img.shields.io/crates/v/xaswitch-sys.svg)](https://crates.io/crates/xaswitch-sys) +* [xaudio2-sys ![Crates.io](https://img.shields.io/crates/v/xaudio2-sys.svg)](https://crates.io/crates/xaudio2-sys) +* [xinput9_1_0-sys ![Crates.io](https://img.shields.io/crates/v/xinput9_1_0-sys.svg)](https://crates.io/crates/xinput9_1_0-sys) +* [xmllite-sys ![Crates.io](https://img.shields.io/crates/v/xmllite-sys.svg)](https://crates.io/crates/xmllite-sys) +* [xolehlp-sys ![Crates.io](https://img.shields.io/crates/v/xolehlp-sys.svg)](https://crates.io/crates/xolehlp-sys) +* [xpsprint-sys ![Crates.io](https://img.shields.io/crates/v/xpsprint-sys.svg)](https://crates.io/crates/xpsprint-sys) diff --git a/deps/winapi-0.2.6/RabbitCode.md b/deps/winapi-0.2.6/RabbitCode.md new file mode 100644 index 000000000..130d689cd --- /dev/null +++ b/deps/winapi-0.2.6/RabbitCode.md @@ -0,0 +1,27 @@ +# Rabbit Code + +Participants in this project (hereafter "the Project") are known as Contributors. + +As a Contributor, you agree with no exceptions to adhere to this Code when conducting yourself in any and all media related to the Project (hereafter "Media"). + +Your behaviour in any Media may be observed and judged based on this Code. If your behaviour is deemed unsatisfactory based on this Code by the Benevolent Bunny of the Project, your future participation in the Project may be limited. + +## Conduct + +1. Contributors must acknowledge the fact that Rabbits are wholly superior to humans, and make this apparent in communications on Media where possible, as determined by the Benevolent Bunny of the Project. +2. Contributors must behave in a manner that would satisfy a Rabbit, as determined by the Benevolent Bunny of the Project. +3. Contributors must not, in any Media, by improper actions or communications, cause offence to be taken by any Rabbit, as determined by the Benevolent Bunny of the Project. + +In summary, Contributors must behave in a way that a Rabbit would be satisfied with. + +## Penalties for Misconduct + +If a Contributor is deemed by the Benevolent Bunny of the Project to have conducted themselves in a manner that would not be or is not satisfactory to any or all Rabbits, they are subject to any penalty deemed appropriate by the Benevolent Bunny of the Project. + +## Responsibilities of the Benevolent Bunny of the Project + +The Benevolent Bunny of the Project is an entity responsible for upholding and enforcing the Rabbit Code. + +The Benevolent Bunny of the Project is not required to be a Rabbit. In the case that the Benevolent Bunny of the Project is not a Rabbit, the Benevolent Bunny of the Project is to consult a Rabbit, where possible, about suspected unsatisfactory conduct. If this is not possible, the Benevolent Bunny of the Project must judge to his, her, its, or their best ability, whether a Rabbit would consider the conduct satisfactory. + +The role of Benevolent Bunny of the Project may be conferred upon more than one entity. However, the Code will always refer to the Benevolent Bunny of the Project as a single entity. diff --git a/deps/winapi-0.2.6/appveyor.yml b/deps/winapi-0.2.6/appveyor.yml new file mode 100644 index 000000000..de6757035 --- /dev/null +++ b/deps/winapi-0.2.6/appveyor.yml @@ -0,0 +1,18 @@ +environment: + matrix: + - TARGET: nightly-x86_64-pc-windows-msvc + - TARGET: nightly-i686-pc-windows-msvc + - TARGET: nightly-x86_64-pc-windows-gnu + - TARGET: nightly-i686-pc-windows-gnu + - TARGET: 1.4.0-x86_64-pc-windows-gnu +install: + - ps: Start-FileDownload "https://static.rust-lang.org/dist/rust-${env:TARGET}.exe" -FileName "rust-install.exe" + - ps: .\rust-install.exe /VERYSILENT /NORESTART /DIR="C:\rust" | Out-Null + - ps: $env:PATH="$env:PATH;C:\rust\bin" + - rustc -vV + - cargo -vV +build_script: + - cargo build + - cargo package +test_script: + - cargo test diff --git a/deps/winapi-0.2.6/examples/massimport.rs b/deps/winapi-0.2.6/examples/massimport.rs new file mode 100644 index 000000000..a31adaf34 --- /dev/null +++ b/deps/winapi-0.2.6/examples/massimport.rs @@ -0,0 +1,5 @@ +extern crate winapi; +extern crate dxguid; +use dxguid::*; +use winapi::*; +fn main(){} diff --git a/deps/winapi-0.2.5/src/audioclient.rs b/deps/winapi-0.2.6/src/audioclient.rs similarity index 100% rename from deps/winapi-0.2.5/src/audioclient.rs rename to deps/winapi-0.2.6/src/audioclient.rs diff --git a/deps/winapi-0.2.5/src/audiosessiontypes.rs b/deps/winapi-0.2.6/src/audiosessiontypes.rs similarity index 100% rename from deps/winapi-0.2.5/src/audiosessiontypes.rs rename to deps/winapi-0.2.6/src/audiosessiontypes.rs diff --git a/deps/winapi-0.2.5/src/basetsd.rs b/deps/winapi-0.2.6/src/basetsd.rs similarity index 100% rename from deps/winapi-0.2.5/src/basetsd.rs rename to deps/winapi-0.2.6/src/basetsd.rs diff --git a/deps/winapi-0.2.5/src/bcrypt.rs b/deps/winapi-0.2.6/src/bcrypt.rs similarity index 100% rename from deps/winapi-0.2.5/src/bcrypt.rs rename to deps/winapi-0.2.6/src/bcrypt.rs diff --git a/deps/winapi-0.2.5/src/cfg.rs b/deps/winapi-0.2.6/src/cfg.rs similarity index 100% rename from deps/winapi-0.2.5/src/cfg.rs rename to deps/winapi-0.2.6/src/cfg.rs diff --git a/deps/winapi-0.2.6/src/cfgmgr32.rs b/deps/winapi-0.2.6/src/cfgmgr32.rs new file mode 100644 index 000000000..0305f1bd7 --- /dev/null +++ b/deps/winapi-0.2.6/src/cfgmgr32.rs @@ -0,0 +1,758 @@ +// Copyright © 2015, skdltmxn +// Licensed under the MIT License <LICENSE.md> +//! user APIs for the Configuration Manager +pub type PCVOID = *const ::VOID; +pub const MAX_DEVICE_ID_LEN: usize = 200; +pub const MAX_DEVNODE_ID_LEN: usize = MAX_DEVICE_ID_LEN; +pub const MAX_GUID_STRING_LEN: usize = 39; +pub const MAX_CLASS_NAME_LEN: usize = 32; +pub const MAX_PROFILE_LEN: usize = 80; +pub const MAX_CONFIG_VALUE: ::DWORD = 9999; +pub const MAX_INSTANCE_VALUE: ::DWORD = 9999; +pub const MAX_MEM_REGISTERS: ::DWORD = 9; +pub const MAX_IO_PORTS: ::DWORD = 20; +pub const MAX_IRQS: ::DWORD = 7; +pub const MAX_DMA_CHANNELS: ::DWORD = 7; +pub const DWORD_MAX: ::DWORD = 0xffffffff; +pub const DWORDLONG_MAX: ::DWORDLONG = 0xffffffffffffffff; +pub const CONFIGMG_VERSION: ::DWORD = 0x0400; +pub type RETURN_TYPE = ::DWORD; +pub type CONFIGRET = RETURN_TYPE; +pub type DEVNODE = ::DWORD; +pub type DEVINST = ::DWORD; +pub type PDEVNODE = *mut DEVNODE; +pub type PDEVINST = *mut DEVNODE; +pub type DEVNODEID_A = *mut ::CHAR; +pub type DEVINSTID_A = *mut ::CHAR; +pub type DEVNODEID_W = *mut ::WCHAR; +pub type DEVINSTID_W = *mut ::WCHAR; +pub type LOG_CONF = ::DWORD_PTR; +pub type PLOG_CONF = *mut LOG_CONF; +pub type RES_DES = ::DWORD_PTR; +pub type PRES_DES = *mut RES_DES; +pub type RESOURCEID = ::ULONG; +pub type PRESOURCEID = *mut RESOURCEID; +pub type PRIORITY = ::ULONG; +pub type PPRIORITY = *mut PRIORITY; +pub type RANGE_LIST = ::DWORD_PTR; +pub type PRANGE_LIST = *mut RANGE_LIST; +pub type RANGE_ELEMENT = ::DWORD_PTR; +pub type PRANGE_ELEMENT = *mut RANGE_ELEMENT; +pub type HMACHINE = ::HANDLE; +pub type PHMACHINE = *mut HMACHINE; +pub type CONFLICT_LIST = ::ULONG_PTR; +pub type PCONFLICT_LIST = *mut CONFLICT_LIST; +STRUCT!{nodebug struct CONFLICT_DETAILS_A { + CD_ulSize: ::ULONG, + CD_ulMask: ::ULONG, + CD_dnDevInst: DEVINST, + CD_rdResDes: RES_DES, + CD_ulFlags: ::ULONG, + CD_szDescription: [::CHAR; ::MAX_PATH], +}} +pub type PCONFLICT_DETAILS_A = *mut CONFLICT_DETAILS_A; +STRUCT!{nodebug struct CONFLICT_DETAILS_W { + CD_ulSize: ::ULONG, + CD_ulMask: ::ULONG, + CD_dnDevInst: DEVINST, + CD_rdResDes: RES_DES, + CD_ulFlags: ::ULONG, + CD_szDescription: [::WCHAR; ::MAX_PATH], +}} +pub type PCONFLICT_DETAILS_W = *mut CONFLICT_DETAILS_W; +pub const CM_CDMASK_DEVINST: ::ULONG = 0x00000001; +pub const CM_CDMASK_RESDES: ::ULONG = 0x00000002; +pub const CM_CDMASK_FLAGS: ::ULONG = 0x00000004; +pub const CM_CDMASK_DESCRIPTION: ::ULONG = 0x00000008; +pub const CM_CDMASK_VALID: ::ULONG = 0x0000000F; +pub const CM_CDFLAGS_DRIVER: ::ULONG = 0x00000001; +pub const CM_CDFLAGS_ROOT_OWNED: ::ULONG = 0x00000002; +pub const CM_CDFLAGS_RESERVED: ::ULONG = 0x00000004; +pub type REGDISPOSITION = ::ULONG; +pub const mMD_MemoryType: ::DWORD = 0x1; +pub const fMD_MemoryType: ::DWORD = mMD_MemoryType; +pub const fMD_ROM: ::DWORD = 0x0; +pub const fMD_RAM: ::DWORD = 0x1; +pub const mMD_32_24: ::DWORD = 0x2; +pub const fMD_32_24: ::DWORD = mMD_32_24; +pub const fMD_24: ::DWORD = 0x0; +pub const fMD_32: ::DWORD = 0x2; +pub const mMD_Prefetchable: ::DWORD = 0x4; +pub const fMD_Prefetchable: ::DWORD = mMD_Prefetchable; +pub const fMD_Pref: ::DWORD = mMD_Prefetchable; +pub const fMD_PrefetchDisallowed: ::DWORD = 0x0; +pub const fMD_PrefetchAllowed: ::DWORD = 0x4; +pub const mMD_Readable: ::DWORD = 0x8; +pub const fMD_Readable: ::DWORD = mMD_Readable; +pub const fMD_ReadAllowed: ::DWORD = 0x0; +pub const fMD_ReadDisallowed: ::DWORD = 0x8; +pub const mMD_CombinedWrite: ::DWORD = 0x10; +pub const fMD_CombinedWrite: ::DWORD = mMD_CombinedWrite; +pub const fMD_CombinedWriteDisallowed: ::DWORD = 0x0; +pub const fMD_CombinedWriteAllowed: ::DWORD = 0x10; +pub const mMD_Cacheable: ::DWORD = 0x20; +pub const fMD_NonCacheable: ::DWORD = 0x0; +pub const fMD_Cacheable: ::DWORD = 0x20; +pub const fMD_WINDOW_DECODE: ::DWORD = 0x40; +pub const fMD_MEMORY_BAR: ::DWORD = 0x80; +STRUCT!{struct MEM_RANGE { + MR_Align: ::DWORDLONG, + MR_nBytes: ::ULONG, + MR_Min: ::DWORDLONG, + MR_Max: ::DWORDLONG, + MR_Flags: ::DWORD, + MR_Reserved: ::DWORD, +}} +pub type PMEM_RANGE = *mut MEM_RANGE; +STRUCT!{struct MEM_DES { + MD_Count: ::DWORD, + MD_Type: ::DWORD, + MD_Alloc_Base: ::DWORDLONG, + MD_Alloc_End: ::DWORDLONG, + MD_Flags: ::DWORD, + MD_Reserved: ::DWORD, +}} +pub type PMEM_DES = *mut MEM_DES; +STRUCT!{struct MEM_RESOURCE { + MEM_Header: MEM_DES, + MEM_Data: [MEM_RANGE; ::ANYSIZE_ARRAY], +}} +pub type PMEM_RESOURCE = *mut MEM_RESOURCE; +STRUCT!{struct MEM_LARGE_RANGE { + MLR_Align: ::DWORDLONG, + MLR_nBytes: ::ULONGLONG, + MLR_Min: ::DWORDLONG, + MLR_Max: ::DWORDLONG, + MLR_Flags: ::DWORD, + MLR_Reserved: ::DWORD, +}} +pub type PMEM_LARGE_RANGE = *mut MEM_LARGE_RANGE; +STRUCT!{struct MEM_LARGE_DES { + MLD_Count: ::DWORD, + MLD_Type: ::DWORD, + MLD_Alloc_Base: ::DWORDLONG, + MLD_Alloc_End: ::DWORDLONG, + MLD_Flags: ::DWORD, + MLD_Reserved: ::DWORD, +}} +pub type PMEM_LARGE_DES = *mut MEM_LARGE_DES; +STRUCT!{struct MEM_LARGE_RESOURCE { + MEM_LARGE_Header: MEM_LARGE_DES, + MEM_LARGE_Data: [MEM_LARGE_RANGE; ::ANYSIZE_ARRAY], +}} +pub type PMEM_LARGE_RESOURCE = *mut MEM_LARGE_RESOURCE; +pub const fIOD_PortType: ::DWORD = 0x1; +pub const fIOD_Memory: ::DWORD = 0x0; +pub const fIOD_IO: ::DWORD = 0x1; +pub const fIOD_DECODE: ::DWORD = 0x00fc; +pub const fIOD_10_BIT_DECODE: ::DWORD = 0x0004; +pub const fIOD_12_BIT_DECODE: ::DWORD = 0x0008; +pub const fIOD_16_BIT_DECODE: ::DWORD = 0x0010; +pub const fIOD_POSITIVE_DECODE: ::DWORD = 0x0020; +pub const fIOD_PASSIVE_DECODE: ::DWORD = 0x0040; +pub const fIOD_WINDOW_DECODE: ::DWORD = 0x0080; +pub const fIOD_PORT_BAR: ::DWORD = 0x0100; +pub const IO_ALIAS_10_BIT_DECODE: ::DWORDLONG = 0x00000004; +pub const IO_ALIAS_12_BIT_DECODE: ::DWORDLONG = 0x00000010; +pub const IO_ALIAS_16_BIT_DECODE: ::DWORDLONG = 0x00000000; +pub const IO_ALIAS_POSITIVE_DECODE: ::DWORDLONG = 0x000000FF; +STRUCT!{struct IO_RANGE { + IOR_Align: ::DWORDLONG, + IOR_nPorts: ::DWORD, + IOR_Min: ::DWORDLONG, + IOR_Max: ::DWORDLONG, + IOR_RangeFlags: ::DWORD, + IOR_Alias: ::DWORDLONG, +}} +pub type PIO_RANGE = *mut IO_RANGE; +STRUCT!{struct IO_DES { + IOD_Count: ::DWORD, + IOD_Type: ::DWORD, + IOD_Alloc_Base: ::DWORDLONG, + IOD_Alloc_End: ::DWORDLONG, + IOD_DesFlags: ::DWORD, +}} +pub type PIO_DES = *mut IO_DES; +STRUCT!{struct IO_RESOURCE { + IO_Header: IO_DES, + IO_Data: [IO_RANGE; ::ANYSIZE_ARRAY], +}} +pub type PIO_RESOURCE = *mut IO_RESOURCE; +pub const mDD_Width: ::ULONG = 0x3; +pub const fDD_BYTE: ::ULONG = 0x0; +pub const fDD_WORD: ::ULONG = 0x1; +pub const fDD_DWORD: ::ULONG = 0x2; +pub const fDD_BYTE_AND_WORD: ::ULONG = 0x3; +pub const mDD_BusMaster: ::ULONG = 0x4; +pub const fDD_NoBusMaster: ::ULONG = 0x0; +pub const fDD_BusMaster: ::ULONG = 0x4; +pub const mDD_Type: ::ULONG = 0x18; +pub const fDD_TypeStandard: ::ULONG = 0x00; +pub const fDD_TypeA: ::ULONG = 0x08; +pub const fDD_TypeB: ::ULONG = 0x10; +pub const fDD_TypeF: ::ULONG = 0x18; +STRUCT!{struct DMA_RANGE { + DR_Min: ::ULONG, + DR_Max: ::ULONG, + DR_Flags: ::ULONG, +}} +pub type PDMA_RANGE = *mut DMA_RANGE; +STRUCT!{struct DMA_DES { + DD_Count: ::DWORD, + DD_Type: ::DWORD, + DD_Flags: ::DWORD, + DD_Alloc_Chan: ::ULONG, +}} +pub type PDMA_DES = *mut DMA_DES; +STRUCT!{struct DMA_RESOURCE { + DMA_Header: DMA_DES, + DMA_Data: [DMA_RANGE; ::ANYSIZE_ARRAY], +}} +pub type PDMA_RESOURCE = *mut DMA_RESOURCE; +pub const mIRQD_Share: ::ULONG = 0x1; +pub const fIRQD_Exclusive: ::ULONG = 0x0; +pub const fIRQD_Share: ::ULONG = 0x1; +pub const fIRQD_Share_Bit: ::ULONG = 0; +pub const fIRQD_Level_Bit: ::ULONG = 1; +pub const mIRQD_Edge_Level: ::ULONG = 0x2; +pub const fIRQD_Level: ::ULONG = 0x0; +pub const fIRQD_Edge: ::ULONG = 0x2; +STRUCT!{struct IRQ_RANGE { + IRQR_Min: ::ULONG, + IRQR_Max: ::ULONG, + IRQR_Flags: ::ULONG, +}} +pub type PIRQ_RANGE = *mut IRQ_RANGE; +STRUCT!{struct IRQ_DES_32 { + IRQD_Count: ::DWORD, + IRQD_Type: ::DWORD, + IRQD_Flags: ::DWORD, + IRQD_Alloc_Num: ::ULONG, + IRQD_Affinity: ::ULONG32, +}} +pub type PIRQ_DES_32 = *mut IRQ_DES_32; +STRUCT!{struct IRQ_DES_64 { + IRQD_Count: ::DWORD, + IRQD_Type: ::DWORD, + IRQD_Flags: ::DWORD, + IRQD_Alloc_Num: ::ULONG, + IRQD_Affinity: ::ULONG64, +}} +pub type PIRQ_DES_64 = *mut IRQ_DES_64; +STRUCT!{struct IRQ_RESOURCE_32 { + IRQ_Header: IRQ_DES_32, + IRQ_Data: [IRQ_RANGE; ::ANYSIZE_ARRAY], +}} +pub type PIRQ_RESOURCE_32 = *mut IRQ_RESOURCE_32; +STRUCT!{struct IRQ_RESOURCE_64 { + IRQ_Header: IRQ_DES_64, + IRQ_Data: [IRQ_RANGE; ::ANYSIZE_ARRAY], +}} +pub type PIRQ_RESOURCE_64 = *mut IRQ_RESOURCE_64; +STRUCT!{struct DEVPRIVATE_RANGE { + PR_Data1: ::DWORD, + PR_Data2: ::DWORD, + PR_Data3: ::DWORD, +}} +pub type PDEVPRIVATE_RANGE = *mut DEVPRIVATE_RANGE; +STRUCT!{struct DEVPRIVATE_DES { + PD_Count: ::DWORD, + PD_Type: ::DWORD, + PD_Data1: ::DWORD, + PD_Data2: ::DWORD, + PD_Data3: ::DWORD, + PD_Flags: ::DWORD, +}} +pub type PDEVPRIVATE_DES = *mut DEVPRIVATE_DES; +STRUCT!{struct DEVPRIVATE_RESOURCE { + PRV_Header: DEVPRIVATE_DES, + PRV_Data: [DEVPRIVATE_RANGE; ::ANYSIZE_ARRAY], +}} +pub type PDEVPRIVATE_RESOURCE = *mut DEVPRIVATE_RESOURCE; +STRUCT!{struct CS_DES { + CSD_SignatureLength: ::DWORD, + CSD_LegacyDataOffset: ::DWORD, + CSD_LegacyDataSize: ::DWORD, + CSD_Flags: ::DWORD, + CSD_ClassGuid: ::GUID, + CSD_Signature: [::BYTE; ::ANYSIZE_ARRAY], +}} +pub type PCS_DES = *mut CS_DES; +STRUCT!{struct CS_RESOURCE { + CS_Header: CS_DES, +}} +pub type PCS_RESOURCE = *mut CS_RESOURCE; +pub const mPCD_IO_8_16: ::DWORD = 0x1; +pub const fPCD_IO_8: ::DWORD = 0x0; +pub const fPCD_IO_16: ::DWORD = 0x1; +pub const mPCD_MEM_8_16: ::DWORD = 0x2; +pub const fPCD_MEM_8: ::DWORD = 0x0; +pub const fPCD_MEM_16: ::DWORD = 0x2; +pub const mPCD_MEM_A_C: ::DWORD = 0xC; +pub const fPCD_MEM1_A: ::DWORD = 0x4; +pub const fPCD_MEM2_A: ::DWORD = 0x8; +pub const fPCD_IO_ZW_8: ::DWORD = 0x10; +pub const fPCD_IO_SRC_16: ::DWORD = 0x20; +pub const fPCD_IO_WS_16: ::DWORD = 0x40; +pub const mPCD_MEM_WS: ::DWORD = 0x300; +pub const fPCD_MEM_WS_ONE: ::DWORD = 0x100; +pub const fPCD_MEM_WS_TWO: ::DWORD = 0x200; +pub const fPCD_MEM_WS_THREE: ::DWORD = 0x300; +pub const fPCD_MEM_A: ::DWORD = 0x4; +pub const fPCD_ATTRIBUTES_PER_WINDOW: ::DWORD = 0x8000; +pub const fPCD_IO1_16: ::DWORD = 0x00010000; +pub const fPCD_IO1_ZW_8: ::DWORD = 0x00020000; +pub const fPCD_IO1_SRC_16: ::DWORD = 0x00040000; +pub const fPCD_IO1_WS_16: ::DWORD = 0x00080000; +pub const fPCD_IO2_16: ::DWORD = 0x00100000; +pub const fPCD_IO2_ZW_8: ::DWORD = 0x00200000; +pub const fPCD_IO2_SRC_16: ::DWORD = 0x00400000; +pub const fPCD_IO2_WS_16: ::DWORD = 0x00800000; +pub const mPCD_MEM1_WS: ::DWORD = 0x03000000; +pub const fPCD_MEM1_WS_TWO: ::DWORD = 0x02000000; +pub const fPCD_MEM1_WS_THREE: ::DWORD = 0x03000000; +pub const fPCD_MEM1_16: ::DWORD = 0x04000000; +pub const mPCD_MEM2_WS: ::DWORD = 0x30000000; +pub const fPCD_MEM2_WS_ONE: ::DWORD = 0x10000000; +pub const fPCD_MEM2_WS_TWO: ::DWORD = 0x20000000; +pub const fPCD_MEM2_WS_THREE: ::DWORD = 0x30000000; +pub const fPCD_MEM2_16: ::DWORD = 0x40000000; +pub const PCD_MAX_MEMORY: usize = 2; +pub const PCD_MAX_IO: usize = 2; +STRUCT!{struct PCCARD_DES { + PCD_Count: ::DWORD, + PCD_Type: ::DWORD, + PCD_Flags: ::DWORD, + PCD_ConfigIndex: ::BYTE, + PCD_Reserved: [::BYTE; 3], + PCD_MemoryCardBase1: ::DWORD, + PCD_MemoryCardBase2: ::DWORD, + PCD_MemoryCardBase: [::DWORD; PCD_MAX_MEMORY], + PCD_MemoryFlags: [::WORD; PCD_MAX_MEMORY], + PCD_IoFlags: [::BYTE; PCD_MAX_IO], +}} +pub type PPCCARD_DES = *mut PCCARD_DES; +STRUCT!{struct PCCARD_RESOURCE { + PcCard_Header: PCCARD_DES, +}} +pub type PPCCARD_RESOURCE = *mut PCCARD_RESOURCE; +pub const mPMF_AUDIO_ENABLE: ::DWORD = 0x8; +pub const fPMF_AUDIO_ENABLE: ::DWORD = 0x8; +STRUCT!{struct MFCARD_DES { + PMF_Count: ::DWORD, + PMF_Type: ::DWORD, + PMF_Flags: ::DWORD, + PMF_ConfigOptions: ::BYTE, + PMF_IoResourceIndex: ::BYTE, + PMF_Reserved: [::BYTE; 2], + PMF_ConfigRegisterBase: ::DWORD, +}} +pub type PMFCARD_DES = *mut MFCARD_DES; +STRUCT!{struct MFCARD_RESOURCE { + MfCard_Header: MFCARD_DES, +}} +pub type PMFCARD_RESOURCE = *mut MFCARD_RESOURCE; +STRUCT!{struct BUSNUMBER_RANGE { + BUSR_Min: ::ULONG, + BUSR_Max: ::ULONG, + BUSR_nBusNumbers: ::ULONG, + BUSR_Flags: ::ULONG, +}} +pub type PBUSNUMBER_RANGE = *mut BUSNUMBER_RANGE; +STRUCT!{struct BUSNUMBER_DES { + BUSD_Count: ::DWORD, + BUSD_Type: ::DWORD, + BUSD_Flags: ::DWORD, + BUSD_Alloc_Base: ::ULONG, + BUSD_Alloc_End: ::ULONG, +}} +pub type PBUSNUMBER_DES = *mut BUSNUMBER_DES; +STRUCT!{struct BUSNUMBER_RESOURCE { + BusNumber_Header: BUSNUMBER_DES, + BusNumber_Data: [BUSNUMBER_RANGE; ::ANYSIZE_ARRAY], +}} +pub type PBUSNUMBER_RESOURCE = *mut BUSNUMBER_RESOURCE; +STRUCT!{struct CONNECTION_DES { + COND_Type: ::DWORD, + COND_Flags: ::DWORD, + COND_Class: ::BYTE, + COND_ClassType: ::BYTE, + COND_Reserved1: ::BYTE, + COND_Reserved2: ::BYTE, + COND_Id: ::LARGE_INTEGER, +}} +pub type PCONNECTION_DES = *mut CONNECTION_DES; +STRUCT!{struct CONNECTION_RESOURCE { + Connection_Header: CONNECTION_DES, +}} +pub type PCONNECTION_RESOURCE = *mut CONNECTION_RESOURCE; +pub const CM_HWPI_NOT_DOCKABLE: ::DWORD = 0x00000000; +pub const CM_HWPI_UNDOCKED: ::DWORD = 0x00000001; +pub const CM_HWPI_DOCKED: ::DWORD = 0x00000002; +STRUCT!{nodebug struct HWPROFILEINFO_A { + HWPI_ulHWProfile: ::ULONG, + HWPI_szFriendlyName: [::CHAR; MAX_PROFILE_LEN], + HWPI_dwFlags: ::DWORD, +}} +pub type PHWPROFILEINFO_A = *mut HWPROFILEINFO_A; +STRUCT!{nodebug struct HWPROFILEINFO_W { + HWPI_ulHWProfile: ::ULONG, + HWPI_szFriendlyName: [::WCHAR; MAX_PROFILE_LEN], + HWPI_dwFlags: ::DWORD, +}} +pub type PHWPROFILEINFO_W = *mut HWPROFILEINFO_W; +pub const ResType_All: RESOURCEID = 0x00000000; +pub const ResType_None: RESOURCEID = 0x00000000; +pub const ResType_Mem: RESOURCEID = 0x00000001; +pub const ResType_IO: RESOURCEID = 0x00000002; +pub const ResType_DMA: RESOURCEID = 0x00000003; +pub const ResType_IRQ: RESOURCEID = 0x00000004; +pub const ResType_DoNotUse: RESOURCEID = 0x00000005; +pub const ResType_BusNumber: RESOURCEID = 0x00000006; +pub const ResType_MemLarge: RESOURCEID = 0x00000007; +pub const ResType_MAX: RESOURCEID = 0x00000007; +pub const ResType_Ignored_Bit: RESOURCEID = 0x00008000; +pub const ResType_ClassSpecific: RESOURCEID = 0x0000FFFF; +pub const ResType_Reserved: RESOURCEID = 0x00008000; +pub const ResType_DevicePrivate: RESOURCEID = 0x00008001; +pub const ResType_PcCardConfig: RESOURCEID = 0x00008002; +pub const ResType_MfCardConfig: RESOURCEID = 0x00008003; +pub const ResType_Connection: RESOURCEID = 0x00008004; +pub const CM_ADD_RANGE_ADDIFCONFLICT: ::ULONG = 0x00000000; +pub const CM_ADD_RANGE_DONOTADDIFCONFLICT: ::ULONG = 0x00000001; +pub const CM_ADD_RANGE_BITS: ::ULONG = 0x00000001; +pub const BASIC_LOG_CONF: ::ULONG = 0x00000000; +pub const FILTERED_LOG_CONF: ::ULONG = 0x00000001; +pub const ALLOC_LOG_CONF: ::ULONG = 0x00000002; +pub const BOOT_LOG_CONF: ::ULONG = 0x00000003; +pub const FORCED_LOG_CONF: ::ULONG = 0x00000004; +pub const OVERRIDE_LOG_CONF: ::ULONG = 0x00000005; +pub const NUM_LOG_CONF: ::ULONG = 0x00000006; +pub const LOG_CONF_BITS: ::ULONG = 0x00000007; +pub const PRIORITY_EQUAL_FIRST: ::ULONG = 0x00000008; +pub const PRIORITY_EQUAL_LAST: ::ULONG = 0x00000000; +pub const PRIORITY_BIT: ::ULONG = 0x00000008; +pub const RegDisposition_OpenAlways: REGDISPOSITION = 0x00000000; +pub const RegDisposition_OpenExisting: REGDISPOSITION = 0x00000001; +pub const RegDisposition_Bits: REGDISPOSITION = 0x00000001; +pub const CM_ADD_ID_HARDWARE: ::ULONG = 0x00000000; +pub const CM_ADD_ID_COMPATIBLE: ::ULONG = 0x00000001; +pub const CM_ADD_ID_BITS: ::ULONG = 0x00000001; +pub const CM_CREATE_DEVNODE_NORMAL: ::ULONG = 0x00000000; +pub const CM_CREATE_DEVNODE_NO_WAIT_INSTALL: ::ULONG = 0x00000001; +pub const CM_CREATE_DEVNODE_PHANTOM: ::ULONG = 0x00000002; +pub const CM_CREATE_DEVNODE_GENERATE_ID: ::ULONG = 0x00000004; +pub const CM_CREATE_DEVNODE_DO_NOT_INSTALL: ::ULONG = 0x00000008; +pub const CM_CREATE_DEVNODE_BITS: ::ULONG = 0x0000000F; +pub const CM_CREATE_DEVINST_NORMAL: ::ULONG = CM_CREATE_DEVNODE_NORMAL; +pub const CM_CREATE_DEVINST_NO_WAIT_INSTALL: ::ULONG = CM_CREATE_DEVNODE_NO_WAIT_INSTALL; +pub const CM_CREATE_DEVINST_PHANTOM: ::ULONG = CM_CREATE_DEVNODE_PHANTOM; +pub const CM_CREATE_DEVINST_GENERATE_ID: ::ULONG = CM_CREATE_DEVNODE_GENERATE_ID; +pub const CM_CREATE_DEVINST_DO_NOT_INSTALL: ::ULONG = CM_CREATE_DEVNODE_DO_NOT_INSTALL; +pub const CM_CREATE_DEVINST_BITS: ::ULONG = CM_CREATE_DEVNODE_BITS; +pub const CM_DELETE_CLASS_ONLY: ::ULONG = 0x00000000; +pub const CM_DELETE_CLASS_SUBKEYS: ::ULONG = 0x00000001; +pub const CM_DELETE_CLASS_INTERFACE: ::ULONG = 0x00000002; +pub const CM_DELETE_CLASS_BITS: ::ULONG = 0x00000003; +pub const CM_ENUMERATE_CLASSES_INSTALLER: ::ULONG = 0x00000000; +pub const CM_ENUMERATE_CLASSES_INTERFACE: ::ULONG = 0x00000001; +pub const CM_ENUMERATE_CLASSES_BITS: ::ULONG = 0x00000001; +pub const CM_DETECT_NEW_PROFILE: ::ULONG = 0x00000001; +pub const CM_DETECT_CRASHED: ::ULONG = 0x00000002; +pub const CM_DETECT_HWPROF_FIRST_BOOT: ::ULONG = 0x00000004; +pub const CM_DETECT_RUN: ::ULONG = 0x80000000; +pub const CM_DETECT_BITS: ::ULONG = 0x80000007; +pub const CM_DISABLE_POLITE: ::ULONG = 0x00000000; +pub const CM_DISABLE_ABSOLUTE: ::ULONG = 0x00000001; +pub const CM_DISABLE_HARDWARE: ::ULONG = 0x00000002; +pub const CM_DISABLE_UI_NOT_OK: ::ULONG = 0x00000004; +pub const CM_DISABLE_BITS: ::ULONG = 0x00000007; +pub const CM_GETIDLIST_FILTER_NONE: ::ULONG = 0x00000000; +pub const CM_GETIDLIST_FILTER_ENUMERATOR: ::ULONG = 0x00000001; +pub const CM_GETIDLIST_FILTER_SERVICE: ::ULONG = 0x00000002; +pub const CM_GETIDLIST_FILTER_EJECTRELATIONS: ::ULONG = 0x00000004; +pub const CM_GETIDLIST_FILTER_REMOVALRELATIONS: ::ULONG = 0x00000008; +pub const CM_GETIDLIST_FILTER_POWERRELATIONS: ::ULONG = 0x00000010; +pub const CM_GETIDLIST_FILTER_BUSRELATIONS: ::ULONG = 0x00000020; +pub const CM_GETIDLIST_DONOTGENERATE: ::ULONG = 0x10000040; +pub const CM_GETIDLIST_FILTER_TRANSPORTRELATIONS: ::ULONG = 0x00000080; +pub const CM_GETIDLIST_FILTER_PRESENT: ::ULONG = 0x00000100; +pub const CM_GETIDLIST_FILTER_CLASS: ::ULONG = 0x00000200; +pub const CM_GETIDLIST_FILTER_BITS: ::ULONG = 0x100003FF; +pub const CM_GET_DEVICE_INTERFACE_LIST_PRESENT: ::ULONG = 0x00000000; +pub const CM_GET_DEVICE_INTERFACE_LIST_ALL_DEVICES: ::ULONG = 0x00000001; +pub const CM_GET_DEVICE_INTERFACE_LIST_BITS: ::ULONG = 0x00000001; +pub const CM_DRP_DEVICEDESC: ::ULONG = 0x00000001; +pub const CM_DRP_HARDWAREID: ::ULONG = 0x00000002; +pub const CM_DRP_COMPATIBLEIDS: ::ULONG = 0x00000003; +pub const CM_DRP_UNUSED0: ::ULONG = 0x00000004; +pub const CM_DRP_SERVICE: ::ULONG = 0x00000005; +pub const CM_DRP_UNUSED1: ::ULONG = 0x00000006; +pub const CM_DRP_UNUSED2: ::ULONG = 0x00000007; +pub const CM_DRP_CLASS: ::ULONG = 0x00000008; +pub const CM_DRP_CLASSGUID: ::ULONG = 0x00000009; +pub const CM_DRP_DRIVER: ::ULONG = 0x0000000A; +pub const CM_DRP_CONFIGFLAGS: ::ULONG = 0x0000000B; +pub const CM_DRP_MFG: ::ULONG = 0x0000000C; +pub const CM_DRP_FRIENDLYNAME: ::ULONG = 0x0000000D; +pub const CM_DRP_LOCATION_INFORMATION: ::ULONG = 0x0000000E; +pub const CM_DRP_PHYSICAL_DEVICE_OBJECT_NAME: ::ULONG = 0x0000000F; +pub const CM_DRP_CAPABILITIES: ::ULONG = 0x00000010; +pub const CM_DRP_UI_NUMBER: ::ULONG = 0x00000011; +pub const CM_DRP_UPPERFILTERS: ::ULONG = 0x00000012; +pub const CM_CRP_UPPERFILTERS: ::ULONG = CM_DRP_UPPERFILTERS; +pub const CM_DRP_LOWERFILTERS: ::ULONG = 0x00000013; +pub const CM_CRP_LOWERFILTERS: ::ULONG = CM_DRP_LOWERFILTERS; +pub const CM_DRP_BUSTYPEGUID: ::ULONG = 0x00000014; +pub const CM_DRP_LEGACYBUSTYPE: ::ULONG = 0x00000015; +pub const CM_DRP_BUSNUMBER: ::ULONG = 0x00000016; +pub const CM_DRP_ENUMERATOR_NAME: ::ULONG = 0x00000017; +pub const CM_DRP_SECURITY: ::ULONG = 0x00000018; +pub const CM_CRP_SECURITY: ::ULONG = CM_DRP_SECURITY; +pub const CM_DRP_SECURITY_SDS: ::ULONG = 0x00000019; +pub const CM_CRP_SECURITY_SDS: ::ULONG = CM_DRP_SECURITY_SDS; +pub const CM_DRP_DEVTYPE: ::ULONG = 0x0000001A; +pub const CM_CRP_DEVTYPE: ::ULONG = CM_DRP_DEVTYPE; +pub const CM_DRP_EXCLUSIVE: ::ULONG = 0x0000001B; +pub const CM_CRP_EXCLUSIVE: ::ULONG = CM_DRP_EXCLUSIVE; +pub const CM_DRP_CHARACTERISTICS: ::ULONG = 0x0000001C; +pub const CM_CRP_CHARACTERISTICS: ::ULONG = CM_DRP_CHARACTERISTICS; +pub const CM_DRP_ADDRESS: ::ULONG = 0x0000001D; +pub const CM_DRP_UI_NUMBER_DESC_FORMAT: ::ULONG = 0x0000001E; +pub const CM_DRP_DEVICE_POWER_DATA: ::ULONG = 0x0000001F; +pub const CM_DRP_REMOVAL_POLICY: ::ULONG = 0x00000020; +pub const CM_DRP_REMOVAL_POLICY_HW_DEFAULT: ::ULONG = 0x00000021; +pub const CM_DRP_REMOVAL_POLICY_OVERRIDE: ::ULONG = 0x00000022; +pub const CM_DRP_INSTALL_STATE: ::ULONG = 0x00000023; +pub const CM_DRP_LOCATION_PATHS: ::ULONG = 0x00000024; +pub const CM_DRP_BASE_CONTAINERID: ::ULONG = 0x00000025; +pub const CM_DRP_MIN: ::ULONG = 0x00000001; +pub const CM_CRP_MIN: ::ULONG = CM_DRP_MIN; +pub const CM_DRP_MAX: ::ULONG = 0x00000025; +pub const CM_CRP_MAX: ::ULONG = CM_DRP_MAX; +pub const CM_DEVCAP_LOCKSUPPORTED: ::ULONG = 0x00000001; +pub const CM_DEVCAP_EJECTSUPPORTED: ::ULONG = 0x00000002; +pub const CM_DEVCAP_REMOVABLE: ::ULONG = 0x00000004; +pub const CM_DEVCAP_DOCKDEVICE: ::ULONG = 0x00000008; +pub const CM_DEVCAP_UNIQUEID: ::ULONG = 0x00000010; +pub const CM_DEVCAP_SILENTINSTALL: ::ULONG = 0x00000020; +pub const CM_DEVCAP_RAWDEVICEOK: ::ULONG = 0x00000040; +pub const CM_DEVCAP_SURPRISEREMOVALOK: ::ULONG = 0x00000080; +pub const CM_DEVCAP_HARDWAREDISABLED: ::ULONG = 0x00000100; +pub const CM_DEVCAP_NONDYNAMIC: ::ULONG = 0x00000200; +pub const CM_REMOVAL_POLICY_EXPECT_NO_REMOVAL: ::ULONG = 1; +pub const CM_REMOVAL_POLICY_EXPECT_ORDERLY_REMOVAL: ::ULONG = 2; +pub const CM_REMOVAL_POLICY_EXPECT_SURPRISE_REMOVAL: ::ULONG = 3; +pub const CM_INSTALL_STATE_INSTALLED: ::ULONG = 0; +pub const CM_INSTALL_STATE_NEEDS_REINSTALL: ::ULONG = 1; +pub const CM_INSTALL_STATE_FAILED_INSTALL: ::ULONG = 2; +pub const CM_INSTALL_STATE_FINISH_INSTALL: ::ULONG = 3; +pub const CM_LOCATE_DEVNODE_NORMAL: ::ULONG = 0x00000000; +pub const CM_LOCATE_DEVNODE_PHANTOM: ::ULONG = 0x00000001; +pub const CM_LOCATE_DEVNODE_CANCELREMOVE: ::ULONG = 0x00000002; +pub const CM_LOCATE_DEVNODE_NOVALIDATION: ::ULONG = 0x00000004; +pub const CM_LOCATE_DEVNODE_BITS: ::ULONG = 0x00000007; +pub const CM_LOCATE_DEVINST_NORMAL: ::ULONG = CM_LOCATE_DEVNODE_NORMAL; +pub const CM_LOCATE_DEVINST_PHANTOM: ::ULONG = CM_LOCATE_DEVNODE_PHANTOM; +pub const CM_LOCATE_DEVINST_CANCELREMOVE: ::ULONG = CM_LOCATE_DEVNODE_CANCELREMOVE; +pub const CM_LOCATE_DEVINST_NOVALIDATION: ::ULONG = CM_LOCATE_DEVNODE_NOVALIDATION; +pub const CM_LOCATE_DEVINST_BITS: ::ULONG = CM_LOCATE_DEVNODE_BITS; +pub const CM_OPEN_CLASS_KEY_INSTALLER: ::ULONG = 0x00000000; +pub const CM_OPEN_CLASS_KEY_INTERFACE: ::ULONG = 0x00000001; +pub const CM_OPEN_CLASS_KEY_BITS: ::ULONG = 0x00000001; +pub const CM_REMOVE_UI_OK: ::ULONG = 0x00000000; +pub const CM_REMOVE_UI_NOT_OK: ::ULONG = 0x00000001; +pub const CM_REMOVE_NO_RESTART: ::ULONG = 0x00000002; +pub const CM_REMOVE_BITS: ::ULONG = 0x00000003; +pub const CM_QUERY_REMOVE_UI_OK: ::ULONG = CM_REMOVE_UI_OK; +pub const CM_QUERY_REMOVE_UI_NOT_OK: ::ULONG = CM_REMOVE_UI_NOT_OK; +pub const CM_QUERY_REMOVE_BITS: ::ULONG = CM_QUERY_REMOVE_UI_OK | CM_QUERY_REMOVE_UI_NOT_OK; +pub const CM_REENUMERATE_NORMAL: ::ULONG = 0x00000000; +pub const CM_REENUMERATE_SYNCHRONOUS: ::ULONG = 0x00000001; +pub const CM_REENUMERATE_RETRY_INSTALLATION: ::ULONG = 0x00000002; +pub const CM_REENUMERATE_ASYNCHRONOUS: ::ULONG = 0x00000004; +pub const CM_REENUMERATE_BITS: ::ULONG = 0x00000007; +pub const CM_REGISTER_DEVICE_DRIVER_STATIC: ::ULONG = 0x00000000; +pub const CM_REGISTER_DEVICE_DRIVER_DISABLEABLE: ::ULONG = 0x00000001; +pub const CM_REGISTER_DEVICE_DRIVER_REMOVABLE: ::ULONG = 0x00000002; +pub const CM_REGISTER_DEVICE_DRIVER_BITS: ::ULONG = 0x00000003; +pub const CM_REGISTRY_HARDWARE: ::ULONG = 0x00000000; +pub const CM_REGISTRY_SOFTWARE: ::ULONG = 0x00000001; +pub const CM_REGISTRY_USER: ::ULONG = 0x00000100; +pub const CM_REGISTRY_CONFIG: ::ULONG = 0x00000200; +pub const CM_REGISTRY_BITS: ::ULONG = 0x00000301; +pub const CM_SET_DEVNODE_PROBLEM_NORMAL: ::ULONG = 0x00000000; +pub const CM_SET_DEVNODE_PROBLEM_OVERRIDE: ::ULONG = 0x00000001; +pub const CM_SET_DEVNODE_PROBLEM_BITS: ::ULONG = 0x00000001; +pub const CM_SET_DEVINST_PROBLEM_NORMAL: ::ULONG = CM_SET_DEVNODE_PROBLEM_NORMAL; +pub const CM_SET_DEVINST_PROBLEM_OVERRIDE: ::ULONG = CM_SET_DEVNODE_PROBLEM_OVERRIDE; +pub const CM_SET_DEVINST_PROBLEM_BITS: ::ULONG = CM_SET_DEVNODE_PROBLEM_BITS; +pub const CM_SET_HW_PROF_FLAGS_UI_NOT_OK: ::ULONG = 0x00000001; +pub const CM_SET_HW_PROF_FLAGS_BITS: ::ULONG = 0x00000001; +pub const CM_SETUP_DEVNODE_READY: ::ULONG = 0x00000000; +pub const CM_SETUP_DEVINST_READY: ::ULONG = CM_SETUP_DEVNODE_READY; +pub const CM_SETUP_DOWNLOAD: ::ULONG = 0x00000001; +pub const CM_SETUP_WRITE_LOG_CONFS: ::ULONG = 0x00000002; +pub const CM_SETUP_PROP_CHANGE: ::ULONG = 0x00000003; +pub const CM_SETUP_DEVNODE_RESET: ::ULONG = 0x00000004; +pub const CM_SETUP_DEVINST_RESET: ::ULONG = CM_SETUP_DEVNODE_RESET; +pub const CM_SETUP_DEVNODE_CONFIG: ::ULONG = 0x00000005; +pub const CM_SETUP_DEVINST_CONFIG: ::ULONG = CM_SETUP_DEVNODE_CONFIG; +pub const CM_SETUP_DEVNODE_CONFIG_CLASS: ::ULONG = 0x00000006; +pub const CM_SETUP_DEVINST_CONFIG_CLASS: ::ULONG = CM_SETUP_DEVNODE_CONFIG_CLASS; +pub const CM_SETUP_DEVNODE_CONFIG_EXTENSIONS: ::ULONG = 0x00000007; +pub const CM_SETUP_DEVINST_CONFIG_EXTENSIONS: ::ULONG = CM_SETUP_DEVNODE_CONFIG_EXTENSIONS; +pub const CM_SETUP_BITS: ::ULONG = 0x00000007; +pub const CM_QUERY_ARBITRATOR_RAW: ::ULONG = 0x00000000; +pub const CM_QUERY_ARBITRATOR_TRANSLATED: ::ULONG = 0x00000001; +pub const CM_QUERY_ARBITRATOR_BITS: ::ULONG = 0x00000001; +pub const CM_CUSTOMDEVPROP_MERGE_MULTISZ: ::ULONG = 0x00000001; +pub const CM_CUSTOMDEVPROP_BITS: ::ULONG = 0x00000001; +pub const CM_NAME_ATTRIBUTE_NAME_RETRIEVED_FROM_DEVICE: ::ULONG = 0x1; +pub const CM_NAME_ATTRIBUTE_USER_ASSIGNED_NAME: ::ULONG = 0x2; +pub const CM_CLASS_PROPERTY_INSTALLER: ::ULONG = 0x00000000; +pub const CM_CLASS_PROPERTY_INTERFACE: ::ULONG = 0x00000001; +pub const CM_CLASS_PROPERTY_BITS: ::ULONG = 0x00000001; +DECLARE_HANDLE!(HCMNOTIFICATION, HCMNOTIFICATION__); +pub type PHCMNOTIFICATION = *mut HCMNOTIFICATION; +pub const CM_NOTIFY_FILTER_FLAG_ALL_INTERFACE_CLASSES: ::ULONG = 0x00000001; +pub const CM_NOTIFY_FILTER_FLAG_ALL_DEVICE_INSTANCES: ::ULONG = 0x00000002; +pub const CM_NOTIFY_FILTER_VALID_FLAGS: ::ULONG = CM_NOTIFY_FILTER_FLAG_ALL_INTERFACE_CLASSES + | CM_NOTIFY_FILTER_FLAG_ALL_DEVICE_INSTANCES; +ENUM!{enum CM_NOTIFY_FILTER_TYPE { + CM_NOTIFY_FILTER_TYPE_DEVICEINTERFACE = 0, + CM_NOTIFY_FILTER_TYPE_DEVICEHANDLE, + CM_NOTIFY_FILTER_TYPE_DEVICEINSTANCE, + CM_NOTIFY_FILTER_TYPE_MAX, +}} +pub type PCM_NOTIFY_FILTER_TYPE = *mut CM_NOTIFY_FILTER_TYPE; +STRUCT!{struct CM_NOTIFY_FILTER_DeviceInterface { + ClassGuid: ::GUID, +}} +STRUCT!{struct CM_NOTIFY_FILTER_DeviceHandle { + hTarget: ::HANDLE, +}} +STRUCT!{nodebug struct CM_NOTIFY_FILTER_DeviceInstance { + InstanceId: [::WCHAR; MAX_DEVICE_ID_LEN], +}} +STRUCT!{nodebug struct CM_NOTIFY_FILTER { + cbSize: ::DWORD, + Flags: ::DWORD, + FilterType: CM_NOTIFY_FILTER_TYPE, + Reserved: ::DWORD, + u: [::BYTE; 400], +}} +UNION!(CM_NOTIFY_FILTER, u, DeviceInterface, DeviceInterface_mut, CM_NOTIFY_FILTER_DeviceInterface); +UNION!(CM_NOTIFY_FILTER, u, DeviceHandle, DeviceHandle_mut, CM_NOTIFY_FILTER_DeviceHandle); +UNION!(CM_NOTIFY_FILTER, u, DeviceInstance, DeviceInstance_mut, CM_NOTIFY_FILTER_DeviceInstance); +pub type PCM_NOTIFY_FILTER = *mut CM_NOTIFY_FILTER; +ENUM!{enum CM_NOTIFY_ACTION { + CM_NOTIFY_ACTION_DEVICEINTERFACEARRIVAL = 0, + CM_NOTIFY_ACTION_DEVICEINTERFACEREMOVAL, + CM_NOTIFY_ACTION_DEVICEQUERYREMOVE, + CM_NOTIFY_ACTION_DEVICEQUERYREMOVEFAILED, + CM_NOTIFY_ACTION_DEVICEREMOVEPENDING, + CM_NOTIFY_ACTION_DEVICEREMOVECOMPLETE, + CM_NOTIFY_ACTION_DEVICECUSTOMEVENT, + CM_NOTIFY_ACTION_DEVICEINSTANCEENUMERATED, + CM_NOTIFY_ACTION_DEVICEINSTANCESTARTED, + CM_NOTIFY_ACTION_DEVICEINSTANCEREMOVED, + CM_NOTIFY_ACTION_MAX, +}} +pub type PCM_NOTIFY_ACTION = *mut CM_NOTIFY_ACTION; +STRUCT!{struct CM_NOTIFY_EVENT_DATA_DeviceInterface { + ClassGuid: ::GUID, + SymbolicLink: [::WCHAR; ::ANYSIZE_ARRAY], +}} +STRUCT!{struct CM_NOTIFY_EVENT_DATA_DeviceHandle { + EventGuid: ::GUID, + NameOffset: ::LONG, + DataSize: ::DWORD, + Data: [::BYTE; ::ANYSIZE_ARRAY], +}} +STRUCT!{struct CM_NOTIFY_EVENT_DATA_DeviceInstance { + InstanceId: [::WCHAR; ::ANYSIZE_ARRAY], +}} +STRUCT!{struct CM_NOTIFY_EVENT_DATA { + FilterType: CM_NOTIFY_FILTER_TYPE, + Reserved: ::DWORD, + u: [::BYTE; 25], +}} +UNION!( + CM_NOTIFY_EVENT_DATA, u, DeviceInterface, DeviceInterface_mut, + CM_NOTIFY_EVENT_DATA_DeviceInterface +); +UNION!(CM_NOTIFY_EVENT_DATA, u, DeviceHandle, DeviceHandle_mut, CM_NOTIFY_EVENT_DATA_DeviceHandle); +UNION!( + CM_NOTIFY_EVENT_DATA, u, DeviceInstance, DeviceInstance_mut, CM_NOTIFY_EVENT_DATA_DeviceInstance +); +pub type PCM_NOTIFY_EVENT_DATA = *mut CM_NOTIFY_EVENT_DATA; +pub type PCM_NOTIFY_CALLBACK = Option<unsafe extern "system" fn( + hNotify: HCMNOTIFICATION, Context: ::PVOID, Action: CM_NOTIFY_ACTION, + EventData: PCM_NOTIFY_EVENT_DATA, EventDataSize: ::DWORD, +) -> ::DWORD>; +pub const CR_SUCCESS: CONFIGRET = 0x00000000; +pub const CR_DEFAULT: CONFIGRET = 0x00000001; +pub const CR_OUT_OF_MEMORY: CONFIGRET = 0x00000002; +pub const CR_INVALID_POINTER: CONFIGRET = 0x00000003; +pub const CR_INVALID_FLAG: CONFIGRET = 0x00000004; +pub const CR_INVALID_DEVNODE: CONFIGRET = 0x00000005; +pub const CR_INVALID_DEVINST: CONFIGRET = CR_INVALID_DEVNODE; +pub const CR_INVALID_RES_DES: CONFIGRET = 0x00000006; +pub const CR_INVALID_LOG_CONF: CONFIGRET = 0x00000007; +pub const CR_INVALID_ARBITRATOR: CONFIGRET = 0x00000008; +pub const CR_INVALID_NODELIST: CONFIGRET = 0x00000009; +pub const CR_DEVNODE_HAS_REQS: CONFIGRET = 0x0000000A; +pub const CR_DEVINST_HAS_REQS: CONFIGRET = CR_DEVNODE_HAS_REQS; +pub const CR_INVALID_RESOURCEID: CONFIGRET = 0x0000000B; +pub const CR_DLVXD_NOT_FOUND: CONFIGRET = 0x0000000C; +pub const CR_NO_SUCH_DEVNODE: CONFIGRET = 0x0000000D; +pub const CR_NO_SUCH_DEVINST: CONFIGRET = CR_NO_SUCH_DEVNODE; +pub const CR_NO_MORE_LOG_CONF: CONFIGRET = 0x0000000E; +pub const CR_NO_MORE_RES_DES: CONFIGRET = 0x0000000F; +pub const CR_ALREADY_SUCH_DEVNODE: CONFIGRET = 0x00000010; +pub const CR_ALREADY_SUCH_DEVINST: CONFIGRET = CR_ALREADY_SUCH_DEVNODE; +pub const CR_INVALID_RANGE_LIST: CONFIGRET = 0x00000011; +pub const CR_INVALID_RANGE: CONFIGRET = 0x00000012; +pub const CR_FAILURE: CONFIGRET = 0x00000013; +pub const CR_NO_SUCH_LOGICAL_DEV: CONFIGRET = 0x00000014; +pub const CR_CREATE_BLOCKED: CONFIGRET = 0x00000015; +pub const CR_NOT_SYSTEM_VM: CONFIGRET = 0x00000016; +pub const CR_REMOVE_VETOED: CONFIGRET = 0x00000017; +pub const CR_APM_VETOED: CONFIGRET = 0x00000018; +pub const CR_INVALID_LOAD_TYPE: CONFIGRET = 0x00000019; +pub const CR_BUFFER_SMALL: CONFIGRET = 0x0000001A; +pub const CR_NO_ARBITRATOR: CONFIGRET = 0x0000001B; +pub const CR_NO_REGISTRY_HANDLE: CONFIGRET = 0x0000001C; +pub const CR_REGISTRY_ERROR: CONFIGRET = 0x0000001D; +pub const CR_INVALID_DEVICE_ID: CONFIGRET = 0x0000001E; +pub const CR_INVALID_DATA: CONFIGRET = 0x0000001F; +pub const CR_INVALID_API: CONFIGRET = 0x00000020; +pub const CR_DEVLOADER_NOT_READY: CONFIGRET = 0x00000021; +pub const CR_NEED_RESTART: CONFIGRET = 0x00000022; +pub const CR_NO_MORE_HW_PROFILES: CONFIGRET = 0x00000023; +pub const CR_DEVICE_NOT_THERE: CONFIGRET = 0x00000024; +pub const CR_NO_SUCH_VALUE: CONFIGRET = 0x00000025; +pub const CR_WRONG_TYPE: CONFIGRET = 0x00000026; +pub const CR_INVALID_PRIORITY: CONFIGRET = 0x00000027; +pub const CR_NOT_DISABLEABLE: CONFIGRET = 0x00000028; +pub const CR_FREE_RESOURCES: CONFIGRET = 0x00000029; +pub const CR_QUERY_VETOED: CONFIGRET = 0x0000002A; +pub const CR_CANT_SHARE_IRQ: CONFIGRET = 0x0000002B; +pub const CR_NO_DEPENDENT: CONFIGRET = 0x0000002C; +pub const CR_SAME_RESOURCES: CONFIGRET = 0x0000002D; +pub const CR_NO_SUCH_REGISTRY_KEY: CONFIGRET = 0x0000002E; +pub const CR_INVALID_MACHINENAME: CONFIGRET = 0x0000002F; +pub const CR_REMOTE_COMM_FAILURE: CONFIGRET = 0x00000030; +pub const CR_MACHINE_UNAVAILABLE: CONFIGRET = 0x00000031; +pub const CR_NO_CM_SERVICES: CONFIGRET = 0x00000032; +pub const CR_ACCESS_DENIED: CONFIGRET = 0x00000033; +pub const CR_CALL_NOT_IMPLEMENTED: CONFIGRET = 0x00000034; +pub const CR_INVALID_PROPERTY: CONFIGRET = 0x00000035; +pub const CR_DEVICE_INTERFACE_ACTIVE: CONFIGRET = 0x00000036; +pub const CR_NO_SUCH_DEVICE_INTERFACE: CONFIGRET = 0x00000037; +pub const CR_INVALID_REFERENCE_STRING: CONFIGRET = 0x00000038; +pub const CR_INVALID_CONFLICT_LIST: CONFIGRET = 0x00000039; +pub const CR_INVALID_INDEX: CONFIGRET = 0x0000003A; +pub const CR_INVALID_STRUCTURE_SIZE: CONFIGRET = 0x0000003B; +pub const NUM_CR_RESULTS: CONFIGRET = 0x0000003C; diff --git a/deps/winapi-0.2.6/src/commctrl.rs b/deps/winapi-0.2.6/src/commctrl.rs new file mode 100644 index 000000000..8b500f75c --- /dev/null +++ b/deps/winapi-0.2.6/src/commctrl.rs @@ -0,0 +1,3578 @@ +// Copyright © 2015, Peter Atashian +// Licensed under the MIT License <LICENSE.md> +//138 +STRUCT!{struct INITCOMMONCONTROLSEX { + dwSize: ::DWORD, + dwICC: ::DWORD, +}} +pub type LPINITCOMMONCONTROLSEX = *mut INITCOMMONCONTROLSEX; +pub const ICC_LISTVIEW_CLASSES: ::DWORD = 0x1; +pub const ICC_TREEVIEW_CLASSES: ::DWORD = 0x2; +pub const ICC_BAR_CLASSES: ::DWORD = 0x4; +pub const ICC_TAB_CLASSES: ::DWORD = 0x8; +pub const ICC_UPDOWN_CLASS: ::DWORD = 0x10; +pub const ICC_PROGRESS_CLASS: ::DWORD = 0x20; +pub const ICC_HOTKEY_CLASS: ::DWORD = 0x40; +pub const ICC_ANIMATE_CLASS: ::DWORD = 0x80; +pub const ICC_WIN95_CLASSES: ::DWORD = 0xFF; +pub const ICC_DATE_CLASSES: ::DWORD = 0x100; +pub const ICC_USEREX_CLASSES: ::DWORD = 0x200; +pub const ICC_COOL_CLASSES: ::DWORD = 0x400; +pub const ICC_INTERNET_CLASSES: ::DWORD = 0x800; +pub const ICC_PAGESCROLLER_CLASS: ::DWORD = 0x1000; +pub const ICC_NATIVEFNTCTL_CLASS: ::DWORD = 0x2000; +pub const ICC_STANDARD_CLASSES: ::DWORD = 0x4000; +pub const ICC_LINK_CLASS: ::DWORD = 0x8000; +pub const ODT_HEADER: ::UINT = 100; +pub const ODT_TAB: ::UINT = 101; +pub const ODT_LISTVIEW: ::UINT = 102; +pub const LVM_FIRST: ::UINT = 0x1000; +pub const TV_FIRST: ::UINT = 0x1100; +pub const HDM_FIRST: ::UINT = 0x1200; +pub const TCM_FIRST: ::UINT = 0x1300; +pub const PGM_FIRST: ::UINT = 0x1400; +pub const ECM_FIRST: ::UINT = 0x1500; +pub const BCM_FIRST: ::UINT = 0x1600; +pub const CBM_FIRST: ::UINT = 0x1700; +pub const CCM_FIRST: ::UINT = 0x2000; +pub const CCM_LAST: ::UINT = CCM_FIRST + 0x200; +pub const CCM_SETBKCOLOR: ::UINT = CCM_FIRST + 1; +STRUCT!{struct COLORSCHEME { + dwSize: ::DWORD, + clrBtnHighlight: ::COLORREF, + clrBtnShadow: ::COLORREF, +}} +pub type LPCOLORSCHEME = *mut COLORSCHEME; +pub const CCM_SETCOLORSCHEME: ::UINT = CCM_FIRST + 2; +pub const CCM_GETCOLORSCHEME: ::UINT = CCM_FIRST + 3; +pub const CCM_GETDROPTARGET: ::UINT = CCM_FIRST + 4; +pub const CCM_SETUNICODEFORMAT: ::UINT = CCM_FIRST + 5; +pub const CCM_GETUNICODEFORMAT: ::UINT = CCM_FIRST + 6; +pub const CCM_SETVERSION: ::UINT = CCM_FIRST + 7; +pub const CCM_GETVERSION: ::UINT = CCM_FIRST + 8; +pub const CCM_SETNOTIFYWINDOW: ::UINT = CCM_FIRST + 9; +pub const CCM_SETWINDOWTHEME: ::UINT = CCM_FIRST + 0xb; +pub const CCM_DPISCALE: ::UINT = CCM_FIRST + 0xc; +pub const INFOTIPSIZE: ::c_int = 1024; +pub const NM_OUTOFMEMORY: ::UINT = NM_FIRST-1; +pub const NM_CLICK: ::UINT = NM_FIRST-2; +pub const NM_DBLCLK: ::UINT = NM_FIRST-3; +pub const NM_RETURN: ::UINT = NM_FIRST-4; +pub const NM_RCLICK: ::UINT = NM_FIRST-5; +pub const NM_RDBLCLK: ::UINT = NM_FIRST-6; +pub const NM_SETFOCUS: ::UINT = NM_FIRST-7; +pub const NM_KILLFOCUS: ::UINT = NM_FIRST-8; +pub const NM_CUSTOMDRAW: ::UINT = NM_FIRST-12; +pub const NM_HOVER: ::UINT = NM_FIRST-13; +pub const NM_NCHITTEST: ::UINT = NM_FIRST-14; +pub const NM_KEYDOWN: ::UINT = NM_FIRST-15; +pub const NM_RELEASEDCAPTURE: ::UINT = NM_FIRST-16; +pub const NM_SETCURSOR: ::UINT = NM_FIRST-17; +pub const NM_CHAR: ::UINT = NM_FIRST-18; +pub const NM_TOOLTIPSCREATED: ::UINT = NM_FIRST-19; +pub const NM_LDOWN: ::UINT = NM_FIRST-20; +pub const NM_RDOWN: ::UINT = NM_FIRST-21; +pub const NM_THEMECHANGED: ::UINT = NM_FIRST-22; +pub const NM_FONTCHANGED: ::UINT = NM_FIRST-23; +pub const NM_CUSTOMTEXT: ::UINT = NM_FIRST-24; +pub const NM_TVSTATEIMAGECHANGING: ::UINT = NM_FIRST-24; +STRUCT!{struct NMTOOLTIPSCREATED { + hdr: ::NMHDR, + hwndToolTips: ::HWND, +}} +pub type LPNMTOOLTIPSCREATED = *mut NMTOOLTIPSCREATED; +STRUCT!{struct NMMOUSE { + hdr : ::NMHDR, + dwItemSpec: ::DWORD_PTR, + dwItemData: ::DWORD_PTR, + pt: ::POINT, + dwHitInfo: ::LPARAM, +}} +pub type LPNMMOUSE = *mut NMMOUSE; +pub type NMCLICK = NMMOUSE; +pub type LPNMCLICK = LPNMMOUSE; +STRUCT!{struct NMOBJECTNOTIFY { + hdr: ::NMHDR, + iItem: ::c_int, + piid: *const ::IID, + pObject: *mut ::c_void, + hResult: ::HRESULT, + dwFlags: ::DWORD, +}} +pub type LPNMOBJECTNOTIFY = *mut NMOBJECTNOTIFY; +STRUCT!{struct NMKEY { + hdr: ::NMHDR, + nVKey: ::UINT, + uFlags: ::UINT, +}} +pub type LPNMKEY = *mut NMKEY; +STRUCT!{struct NMCHAR { + hdr: ::NMHDR, + ch: ::UINT, + dwItemPrev: ::DWORD, + dwItemNext: ::DWORD, +}} +pub type LPNMCHAR = *mut NMCHAR; +STRUCT!{struct NMCUSTOMTEXT { + hdr: ::NMHDR, + hDC: ::HDC, + lpString: ::LPCWSTR, + nCount: ::c_int, + lpRect: ::LPRECT, + uFormat: ::UINT, + fLink: ::BOOL, +}} +pub type LPNMCUSTOMTEXT = *mut NMCUSTOMTEXT; +pub const NM_FIRST: ::UINT = 0; +pub const NM_LAST: ::UINT = 0 - 99; +pub const LVN_FIRST: ::UINT = 0 - 100; +pub const LVN_LAST: ::UINT = 0 - 199; +pub const HDN_FIRST: ::UINT = 0 - 300; +pub const HDN_LAST: ::UINT = 0 - 399; +pub const TVN_FIRST: ::UINT = 0 - 400; +pub const TVN_LAST: ::UINT = 0 - 499; +pub const TTN_FIRST: ::UINT = 0 - 520; +pub const TTN_LAST: ::UINT = 0 - 549; +pub const TCN_FIRST: ::UINT = 0 - 550; +pub const TCN_LAST: ::UINT = 0 - 580; +// pub const CDN_FIRST: ::UINT = 0 - 601; +// pub const CDN_LAST: ::UINT = 0 - 699; +pub const TBN_FIRST: ::UINT = 0 - 700; +pub const TBN_LAST: ::UINT = 0 - 720; +pub const UDN_FIRST: ::UINT = 0 - 721; +pub const UDN_LAST: ::UINT = 0 - 729; +pub const DTN_FIRST: ::UINT = 0 - 740; +pub const DTN_LAST: ::UINT = 0 - 745; +pub const MCN_FIRST: ::UINT = 0 - 746; +pub const MCN_LAST: ::UINT = 0 - 752; +pub const DTN_FIRST2: ::UINT = 0 - 753; +pub const DTN_LAST2: ::UINT = 0 - 799; +pub const CBEN_FIRST: ::UINT = 0 - 800; +pub const CBEN_LAST: ::UINT = 0 - 830; +pub const RBN_FIRST: ::UINT = 0 - 831; +pub const RBN_LAST: ::UINT = 0 - 859; +pub const IPN_FIRST: ::UINT = 0 - 860; +pub const IPN_LAST: ::UINT = 0 - 879; +pub const SBN_FIRST: ::UINT = 0 - 880; +pub const SBN_LAST: ::UINT = 0 - 899; +pub const PGN_FIRST: ::UINT = 0 - 900; +pub const PGN_LAST: ::UINT = 0 - 950; +pub const WMN_FIRST: ::UINT = 0 - 1000; +pub const WMN_LAST: ::UINT = 0 - 1200; +pub const BCN_FIRST: ::UINT = 0 - 1250; +pub const BCN_LAST: ::UINT = 0 - 1350; +pub const TRBN_FIRST: ::UINT = 0 - 1501; +pub const TRBN_LAST: ::UINT = 0 - 1519; +pub const CDRF_DODEFAULT: ::LRESULT = 0x00000000; +pub const CDRF_NEWFONT: ::LRESULT = 0x00000002; +pub const CDRF_SKIPDEFAULT: ::LRESULT = 0x00000004; +pub const CDRF_DOERASE: ::LRESULT = 0x00000008; +pub const CDRF_SKIPPOSTPAINT: ::LRESULT = 0x00000100; +pub const CDRF_NOTIFYPOSTPAINT: ::LRESULT = 0x00000010; +pub const CDRF_NOTIFYITEMDRAW: ::LRESULT = 0x00000020; +pub const CDRF_NOTIFYSUBITEMDRAW: ::LRESULT = 0x00000020; +pub const CDRF_NOTIFYPOSTERASE: ::LRESULT = 0x00000040; +pub const CDDS_PREPAINT: ::DWORD = 0x00000001; +pub const CDDS_POSTPAINT: ::DWORD = 0x00000002; +pub const CDDS_PREERASE: ::DWORD = 0x00000003; +pub const CDDS_POSTERASE: ::DWORD = 0x00000004; +pub const CDDS_ITEM: ::DWORD = 0x00010000; +pub const CDDS_ITEMPREPAINT: ::DWORD = CDDS_ITEM | CDDS_PREPAINT; +pub const CDDS_ITEMPOSTPAINT: ::DWORD = CDDS_ITEM | CDDS_POSTPAINT; +pub const CDDS_ITEMPREERASE: ::DWORD = CDDS_ITEM | CDDS_PREERASE; +pub const CDDS_ITEMPOSTERASE: ::DWORD = CDDS_ITEM | CDDS_POSTERASE; +pub const CDDS_SUBITEM: ::DWORD = 0x00020000; +pub const CDIS_SELECTED: ::UINT = 0x0001; +pub const CDIS_GRAYED: ::UINT = 0x0002; +pub const CDIS_DISABLED: ::UINT = 0x0004; +pub const CDIS_CHECKED: ::UINT = 0x0008; +pub const CDIS_FOCUS: ::UINT = 0x0010; +pub const CDIS_DEFAULT: ::UINT = 0x0020; +pub const CDIS_HOT: ::UINT = 0x0040; +pub const CDIS_MARKED: ::UINT = 0x0080; +pub const CDIS_INDETERMINATE: ::UINT = 0x0100; +pub const CDIS_SHOWKEYBOARDCUES: ::UINT = 0x0200; +pub const CDIS_NEARHOT: ::UINT = 0x0400; +pub const CDIS_OTHERSIDEHOT: ::UINT = 0x0800; +pub const CDIS_DROPHILITED: ::UINT = 0x1000; +STRUCT!{struct NMCUSTOMDRAW { + hdr: ::NMHDR, + dwDrawStage: ::DWORD, + hdc: ::HDC, + rc: ::RECT, + dwItemSpec: ::DWORD_PTR, + uItemState: ::UINT, + lItemlParam: ::LPARAM, +}} +pub type LPNMCUSTOMDRAW = *mut NMCUSTOMDRAW; +STRUCT!{struct NMTTCUSTOMDRAW { + nmcd: NMCUSTOMDRAW, + uDrawFlags: ::UINT, +}} +pub type LPNMTTCUSTOMDRAW = *mut NMTTCUSTOMDRAW; +STRUCT!{struct NMCUSTOMSPLITRECTINFO { + hdr: ::NMHDR, + rcClient: ::RECT, + rcButton: ::RECT, + rcSplit: ::RECT, +}} +pub type LPNMCUSTOMSPLITRECTINFO = *mut NMCUSTOMSPLITRECTINFO; +pub const NM_GETCUSTOMSPLITRECT: ::UINT = BCN_FIRST + 0x0003; +pub const CLR_NONE: ::DWORD = 0xFFFFFFFF; +pub const CLR_DEFAULT: ::DWORD = 0xFF000000; +pub enum IMAGELIST {} +pub type HIMAGELIST = *mut IMAGELIST; +STRUCT!{struct IMAGELISTDRAWPARAMS { + cbSize: ::DWORD, + himl: HIMAGELIST, + i: ::c_int, + hdcDst: ::HDC, + x: ::c_int, + y: ::c_int, + cx: ::c_int, + cy: ::c_int, + xBitmap: ::c_int, + yBitmap: ::c_int, + rgbBk: ::COLORREF, + rgbFg: ::COLORREF, + fStyle: ::UINT, + dwRop: ::DWORD, + fState: ::DWORD, + Frame: ::DWORD, + crEffect: ::COLORREF, +}} +pub type LPIMAGELISTDRAWPARAMS = *mut IMAGELISTDRAWPARAMS; +pub const ILC_MASK: ::UINT = 0x00000001; +pub const ILC_COLOR: ::UINT = 0x00000000; +pub const ILC_COLORDDB: ::UINT = 0x000000FE; +pub const ILC_COLOR4: ::UINT = 0x00000004; +pub const ILC_COLOR8: ::UINT = 0x00000008; +pub const ILC_COLOR16: ::UINT = 0x00000010; +pub const ILC_COLOR24: ::UINT = 0x00000018; +pub const ILC_COLOR32: ::UINT = 0x00000020; +pub const ILC_PALETTE: ::UINT = 0x00000800; +pub const ILC_MIRROR: ::UINT = 0x00002000; +pub const ILC_PERITEMMIRROR: ::UINT = 0x00008000; +pub const ILC_ORIGINALSIZE: ::UINT = 0x00010000; +pub const ILC_HIGHQUALITYSCALE: ::UINT = 0x00020000; +pub const ILD_NORMAL: ::UINT = 0x00000000; +pub const ILD_TRANSPARENT: ::UINT = 0x00000001; +pub const ILD_MASK: ::UINT = 0x00000010; +pub const ILD_IMAGE: ::UINT = 0x00000020; +pub const ILD_ROP: ::UINT = 0x00000040; +pub const ILD_BLEND25: ::UINT = 0x00000002; +pub const ILD_BLEND50: ::UINT = 0x00000004; +pub const ILD_OVERLAYMASK: ::UINT = 0x00000F00; +#[inline] #[allow(dead_code)] +pub fn INDEXTOOVERLAYMASK(i: ::UINT) -> ::UINT { i << 8 } +pub const ILD_PRESERVEALPHA: ::UINT = 0x00001000; +pub const ILD_SCALE: ::UINT = 0x00002000; +pub const ILD_DPISCALE: ::UINT = 0x00004000; +pub const ILD_ASYNC: ::UINT = 0x00008000; +pub const ILD_SELECTED: ::UINT = ILD_BLEND50; +pub const ILD_FOCUS: ::UINT = ILD_BLEND25; +pub const ILD_BLEND: ::UINT = ILD_BLEND50; +pub const CLR_HILIGHT: ::DWORD = CLR_DEFAULT; +pub const ILS_NORMAL: ::DWORD = 0x00000000; +pub const ILS_GLOW: ::DWORD = 0x00000001; +pub const ILS_SHADOW: ::DWORD = 0x00000002; +pub const ILS_SATURATE: ::DWORD = 0x00000004; +pub const ILS_ALPHA: ::DWORD = 0x00000008; +pub const HBITMAP_CALLBACK: ::HBITMAP = (0-1) as ::HBITMAP; +pub const ILCF_MOVE: ::UINT = 0x00000000; +pub const ILCF_SWAP: ::UINT = 0x00000001; +STRUCT!{struct IMAGEINFO { + hbmImage: ::HBITMAP, + hbmMask: ::HBITMAP, + Unused1: ::c_int, + Unused2: ::c_int, + rcImage: ::RECT, +}} +pub type LPIMAGEINFO = *mut IMAGEINFO; +pub const HDS_HORZ: ::DWORD = 0x0000; +pub const HDS_BUTTONS: ::DWORD = 0x0002; +pub const HDS_HOTTRACK: ::DWORD = 0x0004; +pub const HDS_HIDDEN: ::DWORD = 0x0008; +pub const HDS_DRAGDROP: ::DWORD = 0x0040; +pub const HDS_FULLDRAG: ::DWORD = 0x0080; +pub const HDS_FILTERBAR: ::DWORD = 0x0100; +pub const HDS_FLAT: ::DWORD = 0x0200; +pub const HDS_CHECKBOXES: ::DWORD = 0x0400; +pub const HDS_NOSIZING: ::DWORD = 0x0800; +pub const HDS_OVERFLOW: ::DWORD = 0x1000; +pub const HDFT_ISSTRING: ::UINT = 0x0000; +pub const HDFT_ISNUMBER: ::UINT = 0x0001; +pub const HDFT_ISDATE: ::UINT = 0x0002; +pub const HDFT_HASNOVALUE: ::UINT = 0x8000; +STRUCT!{struct HD_TEXTFILTERA { + pszText: ::LPSTR, + cchTextMax: ::INT, +}} +pub type LPHD_TEXTFILTERA = *mut HD_TEXTFILTERA; +STRUCT!{struct HD_TEXTFILTERW { + pszText: ::LPWSTR, + cchTextMax: ::INT, +}} +pub type LPHD_TEXTFILTERW = *mut HD_TEXTFILTERW; +STRUCT!{struct HDITEMA { + mask: ::UINT, + cxy: ::c_int, + pszText: ::LPSTR, + hbm: ::HBITMAP, + cchTextMax: ::c_int, + fmt: ::c_int, + lParam: ::LPARAM, + iImage: ::c_int, + iOrder: ::c_int, + _type: ::UINT, + pvFilter: *mut ::c_void, + state: ::UINT, +}} +pub type LPHDITEMA = *mut HDITEMA; +STRUCT!{struct HDITEMW { + mask: ::UINT, + cxy: ::c_int, + pszText: ::LPWSTR, + hbm: ::HBITMAP, + cchTextMax: ::c_int, + fmt: ::c_int, + lParam: ::LPARAM, + iImage: ::c_int, + iOrder: ::c_int, + _type: ::UINT, + pvFilter: *mut ::c_void, + state: ::UINT, +}} +pub type LPHDITEMW = *mut HDITEMW; +pub const HDI_WIDTH: ::UINT = 0x0001; +pub const HDI_HEIGHT: ::UINT = HDI_WIDTH; +pub const HDI_TEXT: ::UINT = 0x0002; +pub const HDI_FORMAT: ::UINT = 0x0004; +pub const HDI_LPARAM: ::UINT = 0x0008; +pub const HDI_BITMAP: ::UINT = 0x0010; +pub const HDI_IMAGE: ::UINT = 0x0020; +pub const HDI_DI_SETITEM: ::UINT = 0x0040; +pub const HDI_ORDER: ::UINT = 0x0080; +pub const HDI_FILTER: ::UINT = 0x0100; +pub const HDI_STATE: ::UINT = 0x0200; +pub const HDF_LEFT: ::c_int = 0x0000; +pub const HDF_RIGHT: ::c_int = 0x0001; +pub const HDF_CENTER: ::c_int = 0x0002; +pub const HDF_JUSTIFYMASK: ::c_int = 0x0003; +pub const HDF_RTLREADING: ::c_int = 0x0004; +pub const HDF_BITMAP: ::c_int = 0x2000; +pub const HDF_STRING: ::c_int = 0x4000; +pub const HDF_OWNERDRAW: ::c_int = 0x8000; +pub const HDF_IMAGE: ::c_int = 0x0800; +pub const HDF_BITMAP_ON_RIGHT: ::c_int = 0x1000; +pub const HDF_SORTUP: ::c_int = 0x0400; +pub const HDF_SORTDOWN: ::c_int = 0x0200; +pub const HDF_CHECKBOX: ::c_int = 0x0040; +pub const HDF_CHECKED: ::c_int = 0x0080; +pub const HDF_FIXEDWIDTH: ::c_int = 0x0100; +pub const HDF_SPLITBUTTON: ::c_int = 0x1000000; +pub const HDIS_FOCUSED: ::UINT = 0x00000001; +pub const HDM_GETITEMCOUNT: ::UINT = HDM_FIRST + 0; +pub const HDM_INSERTITEMA: ::UINT = HDM_FIRST + 1; +pub const HDM_INSERTITEMW: ::UINT = HDM_FIRST + 10; +pub const HDM_DELETEITEM: ::UINT = HDM_FIRST + 2; +pub const HDM_GETITEMA: ::UINT = HDM_FIRST + 3; +pub const HDM_GETITEMW: ::UINT = HDM_FIRST + 11; +pub const HDM_SETITEMA: ::UINT = HDM_FIRST + 4; +pub const HDM_SETITEMW: ::UINT = HDM_FIRST + 12; +STRUCT!{struct HDLAYOUT { + prc: *mut ::RECT, + pwpos: *mut ::WINDOWPOS, +}} +pub type LPHDLAYOUT = *mut HDLAYOUT; +pub const HDM_LAYOUT: ::UINT = HDM_FIRST + 5; +pub const HHT_NOWHERE: ::UINT = 0x0001; +pub const HHT_ONHEADER: ::UINT = 0x0002; +pub const HHT_ONDIVIDER: ::UINT = 0x0004; +pub const HHT_ONDIVOPEN: ::UINT = 0x0008; +pub const HHT_ONFILTER: ::UINT = 0x0010; +pub const HHT_ONFILTERBUTTON: ::UINT = 0x0020; +pub const HHT_ABOVE: ::UINT = 0x0100; +pub const HHT_BELOW: ::UINT = 0x0200; +pub const HHT_TORIGHT: ::UINT = 0x0400; +pub const HHT_TOLEFT: ::UINT = 0x0800; +pub const HHT_ONITEMSTATEICON: ::UINT = 0x1000; +pub const HHT_ONDROPDOWN: ::UINT = 0x2000; +pub const HHT_ONOVERFLOW: ::UINT = 0x4000; +STRUCT!{struct HDHITTESTINFO { + pt: ::POINT, + flags: ::UINT, + iItem: ::c_int, +}} +pub type LPHDHITTESTINFO = *mut HDHITTESTINFO; +pub const HDSIL_NORMAL: ::WPARAM = 0; +pub const HDSIL_STATE: ::WPARAM = 1; +pub const HDM_HITTEST: ::UINT = HDM_FIRST + 6; +pub const HDM_GETITEMRECT: ::UINT = HDM_FIRST + 7; +pub const HDM_SETIMAGELIST: ::UINT = HDM_FIRST + 8; +pub const HDM_GETIMAGELIST: ::UINT = HDM_FIRST + 9; +pub const HDM_ORDERTOINDEX: ::UINT = HDM_FIRST + 15; +pub const HDM_CREATEDRAGIMAGE: ::UINT = HDM_FIRST + 16; +pub const HDM_GETORDERARRAY: ::UINT = HDM_FIRST + 17; +pub const HDM_SETORDERARRAY: ::UINT = HDM_FIRST + 18; +pub const HDM_SETHOTDIVIDER: ::UINT = HDM_FIRST + 19; +pub const HDM_SETBITMAPMARGIN: ::UINT = HDM_FIRST + 20; +pub const HDM_GETBITMAPMARGIN: ::UINT = HDM_FIRST + 21; +pub const HDM_SETFILTERCHANGETIMEOUT: ::UINT = HDM_FIRST + 22; +pub const HDM_EDITFILTER: ::UINT = HDM_FIRST + 23; +pub const HDM_CLEARFILTER: ::UINT = HDM_FIRST + 24; +pub const HDM_GETITEMDROPDOWNRECT: ::UINT = HDM_FIRST + 25; +pub const HDM_GETOVERFLOWRECT: ::UINT = HDM_FIRST + 26; +pub const HDM_GETFOCUSEDITEM: ::UINT = HDM_FIRST + 27; +pub const HDM_SETFOCUSEDITEM: ::UINT = HDM_FIRST + 28; +pub const HDN_ITEMCHANGINGA: ::UINT = HDN_FIRST-0; +pub const HDN_ITEMCHANGINGW: ::UINT = HDN_FIRST-20; +pub const HDN_ITEMCHANGEDA: ::UINT = HDN_FIRST-1; +pub const HDN_ITEMCHANGEDW: ::UINT = HDN_FIRST-21; +pub const HDN_ITEMCLICKA: ::UINT = HDN_FIRST-2; +pub const HDN_ITEMCLICKW: ::UINT = HDN_FIRST-22; +pub const HDN_ITEMDBLCLICKA: ::UINT = HDN_FIRST-3; +pub const HDN_ITEMDBLCLICKW: ::UINT = HDN_FIRST-23; +pub const HDN_DIVIDERDBLCLICKA: ::UINT = HDN_FIRST-5; +pub const HDN_DIVIDERDBLCLICKW: ::UINT = HDN_FIRST-25; +pub const HDN_BEGINTRACKA: ::UINT = HDN_FIRST-6; +pub const HDN_BEGINTRACKW: ::UINT = HDN_FIRST-26; +pub const HDN_ENDTRACKA: ::UINT = HDN_FIRST-7; +pub const HDN_ENDTRACKW: ::UINT = HDN_FIRST-27; +pub const HDN_TRACKA: ::UINT = HDN_FIRST-8; +pub const HDN_TRACKW: ::UINT = HDN_FIRST-28; +pub const HDN_GETDISPINFOA: ::UINT = HDN_FIRST-9; +pub const HDN_GETDISPINFOW: ::UINT = HDN_FIRST-29; +pub const HDN_BEGINDRAG: ::UINT = HDN_FIRST-10; +pub const HDN_ENDDRAG: ::UINT = HDN_FIRST-11; +pub const HDN_FILTERCHANGE: ::UINT = HDN_FIRST-12; +pub const HDN_FILTERBTNCLICK: ::UINT = HDN_FIRST-13; +pub const HDN_BEGINFILTEREDIT: ::UINT = HDN_FIRST-14; +pub const HDN_ENDFILTEREDIT: ::UINT = HDN_FIRST-15; +pub const HDN_ITEMSTATEICONCLICK: ::UINT = HDN_FIRST-16; +pub const HDN_ITEMKEYDOWN: ::UINT = HDN_FIRST-17; +pub const HDN_DROPDOWN: ::UINT = HDN_FIRST-18; +pub const HDN_OVERFLOWCLICK: ::UINT = HDN_FIRST-19; +STRUCT!{struct NMHEADERA { + hdr: ::NMHDR, + iItem: ::c_int, + iButton: ::c_int, + pitem: *mut HDITEMA, +}} +pub type LPNMHEADERA = *mut NMHEADERA; +STRUCT!{struct NMHEADERW { + hdr: ::NMHDR, + iItem: ::c_int, + iButton: ::c_int, + pitem: *mut HDITEMW, +}} +pub type LPNMHEADERW = *mut NMHEADERW; +STRUCT!{struct NMHDDISPINFOW { + hdr: ::NMHDR, + iItem: ::c_int, + mask: ::UINT, + pszText: ::LPWSTR, + cchTextMax: ::c_int, + iImage: ::c_int, + lParam: ::LPARAM, +}} +pub type LPNMHDDISPINFOW = *mut NMHDDISPINFOW; +STRUCT!{struct NMHDDISPINFOA { + hdr: ::NMHDR, + iItem: ::c_int, + mask: ::UINT, + pszText: ::LPSTR, + cchTextMax: ::c_int, + iImage: ::c_int, + lParam: ::LPARAM, +}} +pub type LPNMHDDISPINFOA = *mut NMHDDISPINFOA; +STRUCT!{struct NMHDFILTERBTNCLICK { + hdr: ::NMHDR, + iItem: ::INT, + rc: ::RECT, +}} +pub type LPNMHDFILTERBTNCLICK = *mut NMHDFILTERBTNCLICK; +#[cfg(target_arch="x86")] +STRUCT!{struct TBBUTTON { + iBitmap: ::c_int, + idCommand: ::c_int, + fsState: ::BYTE, + fsStyle: ::BYTE, + bReserved: [::BYTE; 2], + dwData: ::DWORD_PTR, + iString: ::INT_PTR, +}} +#[cfg(target_arch="x86_64")] +STRUCT!{struct TBBUTTON { + iBitmap: ::c_int, + idCommand: ::c_int, + fsState: ::BYTE, + fsStyle: ::BYTE, + bReserved: [::BYTE; 6], + dwData: ::DWORD_PTR, + iString: ::INT_PTR, +}} +pub type PTBBUTTON = *mut TBBUTTON; +pub type LPTBBUTTON = *mut TBBUTTON; +pub type LPCTBBUTTON = *const TBBUTTON; +STRUCT!{struct COLORMAP { + from: ::COLORREF, + to: ::COLORREF, +}} +pub type LPCOLORMAP = *mut COLORMAP; +pub const CMB_MASKED: ::UINT = 0x02; +pub const TBSTATE_CHECKED: ::BYTE = 0x01; +pub const TBSTATE_PRESSED: ::BYTE = 0x02; +pub const TBSTATE_ENABLED: ::BYTE = 0x04; +pub const TBSTATE_HIDDEN: ::BYTE = 0x08; +pub const TBSTATE_INDETERMINATE: ::BYTE = 0x10; +pub const TBSTATE_WRAP: ::BYTE = 0x20; +pub const TBSTATE_ELLIPSES: ::BYTE = 0x40; +pub const TBSTATE_MARKED: ::BYTE = 0x80; +pub const TBSTYLE_BUTTON: ::DWORD = 0x0000; +pub const TBSTYLE_SEP: ::DWORD = 0x0001; +pub const TBSTYLE_CHECK: ::DWORD = 0x0002; +pub const TBSTYLE_GROUP: ::DWORD = 0x0004; +pub const TBSTYLE_CHECKGROUP: ::DWORD = TBSTYLE_GROUP | TBSTYLE_CHECK; +pub const TBSTYLE_DROPDOWN: ::DWORD = 0x0008; +pub const TBSTYLE_AUTOSIZE: ::DWORD = 0x0010; +pub const TBSTYLE_NOPREFIX: ::DWORD = 0x0020; +pub const TBSTYLE_TOOLTIPS: ::DWORD = 0x0100; +pub const TBSTYLE_WRAPABLE: ::DWORD = 0x0200; +pub const TBSTYLE_ALTDRAG: ::DWORD = 0x0400; +pub const TBSTYLE_FLAT: ::DWORD = 0x0800; +pub const TBSTYLE_LIST: ::DWORD = 0x1000; +pub const TBSTYLE_CUSTOMERASE: ::DWORD = 0x2000; +pub const TBSTYLE_REGISTERDROP: ::DWORD = 0x4000; +pub const TBSTYLE_TRANSPARENT: ::DWORD = 0x8000; +pub const TBSTYLE_EX_DRAWDDARROWS: ::DWORD = 0x00000001; +pub const BTNS_BUTTON: ::DWORD = TBSTYLE_BUTTON; +pub const BTNS_SEP: ::DWORD = TBSTYLE_SEP; +pub const BTNS_CHECK: ::DWORD = TBSTYLE_CHECK; +pub const BTNS_GROUP: ::DWORD = TBSTYLE_GROUP; +pub const BTNS_CHECKGROUP: ::DWORD = TBSTYLE_CHECKGROUP; +pub const BTNS_DROPDOWN: ::DWORD = TBSTYLE_DROPDOWN; +pub const BTNS_AUTOSIZE: ::DWORD = TBSTYLE_AUTOSIZE; +pub const BTNS_NOPREFIX: ::DWORD = TBSTYLE_NOPREFIX; +pub const BTNS_SHOWTEXT: ::DWORD = 0x0040; +pub const BTNS_WHOLEDROPDOWN: ::DWORD = 0x0080; +pub const TBSTYLE_EX_MIXEDBUTTONS: ::DWORD = 0x00000008; +pub const TBSTYLE_EX_HIDECLIPPEDBUTTONS: ::DWORD = 0x00000010; +pub const TBSTYLE_EX_MULTICOLUMN: ::DWORD = 0x00000002; +pub const TBSTYLE_EX_VERTICAL: ::DWORD = 0x00000004; +pub const TBSTYLE_EX_DOUBLEBUFFER: ::DWORD = 0x00000080; +STRUCT!{struct NMTBCUSTOMDRAW { + nmcd: NMCUSTOMDRAW, + hbrMonoDither: ::HBRUSH, + hbrLines: ::HBRUSH, + hpenLines: ::HPEN, + clrText: ::COLORREF, + clrMark: ::COLORREF, + clrTextHighlight: ::COLORREF, + clrBtnFace: ::COLORREF, + clrBtnHighlight: ::COLORREF, + clrHighlightHotTrack: ::COLORREF, + rcText: ::RECT, + nStringBkMode: ::c_int, + nHLStringBkMode: ::c_int, + iListGap: ::c_int, +}} +pub type LPNMTBCUSTOMDRAW = *mut NMTBCUSTOMDRAW; +pub const TBCDRF_NOEDGES: ::LRESULT = 0x00010000; +pub const TBCDRF_HILITEHOTTRACK: ::LRESULT = 0x00020000; +pub const TBCDRF_NOOFFSET: ::LRESULT = 0x00040000; +pub const TBCDRF_NOMARK: ::LRESULT = 0x00080000; +pub const TBCDRF_NOETCHEDEFFECT: ::LRESULT = 0x00100000; +pub const TBCDRF_BLENDICON: ::LRESULT = 0x00200000; +pub const TBCDRF_NOBACKGROUND: ::LRESULT = 0x00400000; +pub const TBCDRF_USECDCOLORS: ::LRESULT = 0x00800000; +pub const TB_ENABLEBUTTON: ::UINT = ::WM_USER + 1; +pub const TB_CHECKBUTTON: ::UINT = ::WM_USER + 2; +pub const TB_PRESSBUTTON: ::UINT = ::WM_USER + 3; +pub const TB_HIDEBUTTON: ::UINT = ::WM_USER + 4; +pub const TB_INDETERMINATE: ::UINT = ::WM_USER + 5; +pub const TB_MARKBUTTON: ::UINT = ::WM_USER + 6; +pub const TB_ISBUTTONENABLED: ::UINT = ::WM_USER + 9; +pub const TB_ISBUTTONCHECKED: ::UINT = ::WM_USER + 10; +pub const TB_ISBUTTONPRESSED: ::UINT = ::WM_USER + 11; +pub const TB_ISBUTTONHIDDEN: ::UINT = ::WM_USER + 12; +pub const TB_ISBUTTONINDETERMINATE : ::UINT = ::WM_USER + 13; +pub const TB_ISBUTTONHIGHLIGHTED: ::UINT = ::WM_USER + 14; +pub const TB_SETSTATE: ::UINT = ::WM_USER + 17; +pub const TB_GETSTATE: ::UINT = ::WM_USER + 18; +pub const TB_ADDBITMAP: ::UINT = ::WM_USER + 19; +STRUCT!{struct TBADDBITMAP { + hInst: ::HINSTANCE, + nID: ::UINT_PTR, +}} +pub type LPTBADDBITMAP = *mut TBADDBITMAP; +pub const HINST_COMMCTRL: ::HINSTANCE = (0 - 1) as ::HINSTANCE; +pub const IDB_STD_SMALL_COLOR: ::WPARAM = 0; +pub const IDB_STD_LARGE_COLOR: ::WPARAM = 1; +pub const IDB_VIEW_SMALL_COLOR: ::WPARAM = 4; +pub const IDB_VIEW_LARGE_COLOR: ::WPARAM = 5; +pub const IDB_HIST_SMALL_COLOR: ::WPARAM = 8; +pub const IDB_HIST_LARGE_COLOR: ::WPARAM = 9; +pub const IDB_HIST_NORMAL: ::WPARAM = 12; +pub const IDB_HIST_HOT: ::WPARAM = 13; +pub const IDB_HIST_DISABLED: ::WPARAM = 14; +pub const IDB_HIST_PRESSED: ::WPARAM = 15; +pub const STD_CUT: ::c_int = 0; +pub const STD_COPY: ::c_int = 1; +pub const STD_PASTE: ::c_int = 2; +pub const STD_UNDO: ::c_int = 3; +pub const STD_REDOW: ::c_int = 4; +pub const STD_DELETE: ::c_int = 5; +pub const STD_FILENEW: ::c_int = 6; +pub const STD_FILEOPEN: ::c_int = 7; +pub const STD_FILESAVE: ::c_int = 8; +pub const STD_PRINTPRE: ::c_int = 9; +pub const STD_PROPERTIES: ::c_int = 10; +pub const STD_HELP: ::c_int = 11; +pub const STD_FIND: ::c_int = 12; +pub const STD_REPLACE: ::c_int = 13; +pub const STD_PRINT: ::c_int = 14; +pub const VIEW_LARGEICONS: ::c_int = 0; +pub const VIEW_SMALLICONS: ::c_int = 1; +pub const VIEW_LIST: ::c_int = 2; +pub const VIEW_DETAILS: ::c_int = 3; +pub const VIEW_SORTNAME: ::c_int = 4; +pub const VIEW_SORTSIZE: ::c_int = 5; +pub const VIEW_SORTDATE: ::c_int = 6; +pub const VIEW_SORTTYPE: ::c_int = 7; +pub const VIEW_PARENTFOLDER: ::c_int = 8; +pub const VIEW_NETCONNECT: ::c_int = 9; +pub const VIEW_NETDISCONNECT: ::c_int = 10; +pub const VIEW_NEWFOLDER: ::c_int = 11; +pub const VIEW_VIEWMENU: ::c_int = 12; +pub const HIST_BACK: ::c_int = 0; +pub const HIST_FORWARD: ::c_int = 1; +pub const HIST_FAVORITES: ::c_int = 2; +pub const HIST_ADDTOFAVORITES: ::c_int = 3; +pub const HIST_VIEWTREE: ::c_int = 4; +pub const TB_ADDBUTTONSA: ::UINT = ::WM_USER + 20; +pub const TB_INSERTBUTTONA: ::UINT = ::WM_USER + 21; +pub const TB_DELETEBUTTON: ::UINT = ::WM_USER + 22; +pub const TB_GETBUTTON: ::UINT = ::WM_USER + 23; +pub const TB_BUTTONCOUNT: ::UINT = ::WM_USER + 24; +pub const TB_COMMANDTOINDEX: ::UINT = ::WM_USER + 25; +STRUCT!{struct TBSAVEPARAMSA { + hkr: ::HKEY, + pszSubKey: ::LPCSTR, + pszValueName: ::LPCSTR, +}} +pub type LPTBSAVEPARAMSA = *mut TBSAVEPARAMSA; +STRUCT!{struct TBSAVEPARAMSW { + hkr: ::HKEY, + pszSubKey: ::LPCWSTR, + pszValueName: ::LPCWSTR, +}} +pub type LPTBSAVEPARAMSW = *mut TBSAVEPARAMSW; +pub const TB_SAVERESTOREA: ::UINT = ::WM_USER + 26; +pub const TB_SAVERESTOREW: ::UINT = ::WM_USER + 76; +pub const TB_CUSTOMIZE: ::UINT = ::WM_USER + 27; +pub const TB_ADDSTRINGA: ::UINT = ::WM_USER + 28; +pub const TB_ADDSTRINGW: ::UINT = ::WM_USER + 77; +pub const TB_GETITEMRECT: ::UINT = ::WM_USER + 29; +pub const TB_BUTTONSTRUCTSIZE: ::UINT = ::WM_USER + 30; +pub const TB_SETBUTTONSIZE: ::UINT = ::WM_USER + 31; +pub const TB_SETBITMAPSIZE: ::UINT = ::WM_USER + 32; +pub const TB_AUTOSIZE: ::UINT = ::WM_USER + 33; +pub const TB_GETTOOLTIPS: ::UINT = ::WM_USER + 35; +pub const TB_SETTOOLTIPS: ::UINT = ::WM_USER + 36; +pub const TB_SETPARENT: ::UINT = ::WM_USER + 37; +pub const TB_SETROWS: ::UINT = ::WM_USER + 39; +pub const TB_GETROWS: ::UINT = ::WM_USER + 40; +pub const TB_SETCMDID: ::UINT = ::WM_USER + 42; +pub const TB_CHANGEBITMAP: ::UINT = ::WM_USER + 43; +pub const TB_GETBITMAP: ::UINT = ::WM_USER + 44; +pub const TB_GETBUTTONTEXTA: ::UINT = ::WM_USER + 45; +pub const TB_GETBUTTONTEXTW: ::UINT = ::WM_USER + 75; +pub const TB_REPLACEBITMAP: ::UINT = ::WM_USER + 46; +pub const TB_SETINDENT: ::UINT = ::WM_USER + 47; +pub const TB_SETIMAGELIST: ::UINT = ::WM_USER + 48; +pub const TB_GETIMAGELIST: ::UINT = ::WM_USER + 49; +pub const TB_LOADIMAGES: ::UINT = ::WM_USER + 50; +pub const TB_GETRECT: ::UINT = ::WM_USER + 51; +pub const TB_SETHOTIMAGELIST: ::UINT = ::WM_USER + 52; +pub const TB_GETHOTIMAGELIST: ::UINT = ::WM_USER + 53; +pub const TB_SETDISABLEDIMAGELIST: ::UINT = ::WM_USER + 54; +pub const TB_GETDISABLEDIMAGELIST: ::UINT = ::WM_USER + 55; +pub const TB_SETSTYLE: ::UINT = ::WM_USER + 56; +pub const TB_GETSTYLE: ::UINT = ::WM_USER + 57; +pub const TB_GETBUTTONSIZE: ::UINT = ::WM_USER + 58; +pub const TB_SETBUTTONWIDTH: ::UINT = ::WM_USER + 59; +pub const TB_SETMAXTEXTROWS: ::UINT = ::WM_USER + 60; +pub const TB_GETTEXTROWS: ::UINT = ::WM_USER + 61; +pub const TB_GETOBJECT: ::UINT = ::WM_USER + 62; +pub const TB_GETHOTITEM: ::UINT = ::WM_USER + 71; +pub const TB_SETHOTITEM: ::UINT = ::WM_USER + 72; +pub const TB_SETANCHORHIGHLIGHT: ::UINT = ::WM_USER + 73; +pub const TB_GETANCHORHIGHLIGHT: ::UINT = ::WM_USER + 74; +pub const TB_MAPACCELERATORA: ::UINT = ::WM_USER + 78; +STRUCT!{struct TBINSERTMARK { + iButton: ::c_int, + dwFlags: ::DWORD, +}} +pub type LPTBINSERTMARK = *mut TBINSERTMARK; +pub const TBIMHT_AFTER: ::DWORD = 0x00000001; +pub const TBIMHT_BACKGROUND: ::DWORD = 0x00000002; +pub const TB_GETINSERTMARK: ::UINT = ::WM_USER + 79; +pub const TB_SETINSERTMARK: ::UINT = ::WM_USER + 80; +pub const TB_INSERTMARKHITTEST: ::UINT = ::WM_USER + 81; +pub const TB_MOVEBUTTON: ::UINT = ::WM_USER + 82; +pub const TB_GETMAXSIZE: ::UINT = ::WM_USER + 83; +pub const TB_SETEXTENDEDSTYLE: ::UINT = ::WM_USER + 84; +pub const TB_GETEXTENDEDSTYLE: ::UINT = ::WM_USER + 85; +pub const TB_GETPADDING: ::UINT = ::WM_USER + 86; +pub const TB_SETPADDING: ::UINT = ::WM_USER + 87; +pub const TB_SETINSERTMARKCOLOR: ::UINT = ::WM_USER + 88; +pub const TB_GETINSERTMARKCOLOR: ::UINT = ::WM_USER + 89; +pub const TB_SETCOLORSCHEME: ::UINT = CCM_SETCOLORSCHEME; +pub const TB_GETCOLORSCHEME: ::UINT = CCM_GETCOLORSCHEME; +pub const TB_SETUNICODEFORMAT: ::UINT = CCM_SETUNICODEFORMAT; +pub const TB_GETUNICODEFORMAT: ::UINT = CCM_GETUNICODEFORMAT; +pub const TB_MAPACCELERATORW: ::UINT = ::WM_USER + 90; +STRUCT!{struct TBREPLACEBITMAP { + hInstOld: ::HINSTANCE, + nIDOld: ::UINT_PTR, + hInstNew: ::HINSTANCE, + nIDNew: ::UINT_PTR, + nButtons: ::c_int, +}} +pub type LPTBREPLACEBITMAP = *mut TBREPLACEBITMAP; +pub const TBBF_LARGE: ::DWORD = 0x0001; +pub const TB_GETBITMAPFLAGS: ::UINT = ::WM_USER + 41; +pub const TBIF_IMAGE: ::DWORD = 0x00000001; +pub const TBIF_TEXT: ::DWORD = 0x00000002; +pub const TBIF_STATE: ::DWORD = 0x00000004; +pub const TBIF_STYLE: ::DWORD = 0x00000008; +pub const TBIF_LPARAM: ::DWORD = 0x00000010; +pub const TBIF_COMMAND: ::DWORD = 0x00000020; +pub const TBIF_SIZE: ::DWORD = 0x00000040; +pub const TBIF_BYINDEX: ::DWORD = 0x80000000; +STRUCT!{struct TBBUTTONINFOA { + cbSize: ::UINT, + dwMask: ::DWORD, + idCommand: ::c_int, + iImage: ::c_int, + fsState: ::BYTE, + fsStyle: ::BYTE, + cx: ::WORD, + lParam: ::DWORD_PTR, + pszText: ::LPSTR, + cchText: ::c_int, +}} +pub type LPTBBUTTONINFOA = *mut TBBUTTONINFOA; +STRUCT!{struct TBBUTTONINFOW { + cbSize: ::UINT, + dwMask: ::DWORD, + idCommand: ::c_int, + iImage: ::c_int, + fsState: ::BYTE, + fsStyle: ::BYTE, + cx: ::WORD, + lParam: ::DWORD_PTR, + pszText: ::LPWSTR, + cchText: ::c_int, +}} +pub type LPTBBUTTONINFOW = *mut TBBUTTONINFOW; +pub const TB_GETBUTTONINFOW: ::UINT = ::WM_USER + 63; +pub const TB_SETBUTTONINFOW: ::UINT = ::WM_USER + 64; +pub const TB_GETBUTTONINFOA: ::UINT = ::WM_USER + 65; +pub const TB_SETBUTTONINFOA: ::UINT = ::WM_USER + 66; +pub const TB_INSERTBUTTONW: ::UINT = ::WM_USER + 67; +pub const TB_ADDBUTTONSW: ::UINT = ::WM_USER + 68; +pub const TB_HITTEST: ::UINT = ::WM_USER + 69; +pub const TB_SETDRAWTEXTFLAGS: ::UINT = ::WM_USER + 70; +pub const TB_GETSTRINGW: ::UINT = ::WM_USER + 91; +pub const TB_GETSTRINGA: ::UINT = ::WM_USER + 92; +pub const TB_SETBOUNDINGSIZE: ::UINT = ::WM_USER + 93; +pub const TB_SETHOTITEM2: ::UINT = ::WM_USER + 94; +pub const TB_HASACCELERATOR: ::UINT = ::WM_USER + 95; +pub const TB_SETLISTGAP: ::UINT = ::WM_USER + 96; +pub const TB_GETIMAGELISTCOUNT: ::UINT = ::WM_USER + 98; +pub const TB_GETIDEALSIZE: ::UINT = ::WM_USER + 99; +pub const TBMF_PAD: ::DWORD = 0x00000001; +pub const TBMF_BARPAD: ::DWORD = 0x00000002; +pub const TBMF_BUTTONSPACING: ::DWORD = 0x00000004; +STRUCT!{struct TBMETRICS { + cbSize: ::UINT, + dwMask: ::DWORD, + cxPad: ::c_int, + cyPad: ::c_int, + cxBarPad: ::c_int, + cyBarPad: ::c_int, + cxButtonSpacing: ::c_int, + cyButtonSpacing: ::c_int, +}} +pub type LPTBMETRICS = *mut TBMETRICS; +pub const TB_GETMETRICS: ::UINT = ::WM_USER + 101; +pub const TB_SETMETRICS: ::UINT = ::WM_USER + 102; +pub const TB_GETITEMDROPDOWNRECT: ::UINT = ::WM_USER + 103; +pub const TB_SETPRESSEDIMAGELIST: ::UINT = ::WM_USER + 104; +pub const TB_GETPRESSEDIMAGELIST: ::UINT = ::WM_USER + 105; +pub const TB_SETWINDOWTHEME: ::UINT = CCM_SETWINDOWTHEME; +pub const TBN_GETBUTTONINFOA: ::UINT = TBN_FIRST - 0; +pub const TBN_BEGINDRAG: ::UINT = TBN_FIRST - 1; +pub const TBN_ENDDRAG: ::UINT = TBN_FIRST - 2; +pub const TBN_BEGINADJUST: ::UINT = TBN_FIRST - 3; +pub const TBN_ENDADJUST: ::UINT = TBN_FIRST - 4; +pub const TBN_RESET: ::UINT = TBN_FIRST - 5; +pub const TBN_QUERYINSERT: ::UINT = TBN_FIRST - 6; +pub const TBN_QUERYDELETE: ::UINT = TBN_FIRST - 7; +pub const TBN_TOOLBARCHANGE: ::UINT = TBN_FIRST - 8; +pub const TBN_CUSTHELP: ::UINT = TBN_FIRST - 9; +pub const TBN_DROPDOWN: ::UINT = TBN_FIRST - 10; +pub const TBN_GETOBJECT: ::UINT = TBN_FIRST - 12; +STRUCT!{struct NMTBHOTITEM { + hdr: ::NMHDR, + idOld: ::c_int, + idNew: ::c_int, + dwFlags: ::DWORD, +}} +pub type LPNMTBHOTITEM = *mut NMTBHOTITEM; +pub const HICF_OTHER: ::DWORD = 0x00000000; +pub const HICF_MOUSE: ::DWORD = 0x00000001; +pub const HICF_ARROWKEYS: ::DWORD = 0x00000002; +pub const HICF_ACCELERATOR: ::DWORD = 0x00000004; +pub const HICF_DUPACCEL: ::DWORD = 0x00000008; +pub const HICF_ENTERING: ::DWORD = 0x00000010; +pub const HICF_LEAVING: ::DWORD = 0x00000020; +pub const HICF_RESELECT: ::DWORD = 0x00000040; +pub const HICF_LMOUSE: ::DWORD = 0x00000080; +pub const HICF_TOGGLEDROPDOWN: ::DWORD = 0x00000100; +pub const TBN_HOTITEMCHANGE: ::UINT = TBN_FIRST - 13; +pub const TBN_DRAGOUT: ::UINT = TBN_FIRST - 14; +pub const TBN_DELETINGBUTTON: ::UINT = TBN_FIRST - 15; +pub const TBN_GETDISPINFOA: ::UINT = TBN_FIRST - 16; +pub const TBN_GETDISPINFOW: ::UINT = TBN_FIRST - 17; +pub const TBN_GETINFOTIPA: ::UINT = TBN_FIRST - 18; +pub const TBN_GETINFOTIPW: ::UINT = TBN_FIRST - 19; +pub const TBN_GETBUTTONINFOW: ::UINT = TBN_FIRST - 20; +pub const TBN_RESTORE: ::UINT = TBN_FIRST - 21; +pub const TBN_SAVE: ::UINT = TBN_FIRST - 22; +pub const TBN_INITCUSTOMIZE: ::UINT = TBN_FIRST - 23; +pub const TBN_WRAPHOTITEM: ::UINT = TBN_FIRST - 24; +pub const TBN_DUPACCELERATOR: ::UINT = TBN_FIRST - 25; +pub const TBN_WRAPACCELERATOR: ::UINT = TBN_FIRST - 26; +pub const TBN_DRAGOVER: ::UINT = TBN_FIRST - 27; +pub const TBN_MAPACCELERATOR: ::UINT = TBN_FIRST - 28; +pub const TBNRF_HIDEHELP: ::LRESULT = 0x00000001; +pub const TBNRF_ENDCUSTOMIZE: ::LRESULT = 0x00000002; +STRUCT!{struct NMTBSAVE { + hdr: ::NMHDR, + pData: *mut ::DWORD, + pCurrent: *mut ::DWORD, + cbData: ::UINT, + iItem: ::c_int, + cButtons: ::c_int, + tbButton: TBBUTTON, +}} +pub type LPNMTBSAVE = *mut NMTBSAVE; +STRUCT!{struct NMTBRESTORE { + hdr: ::NMHDR, + pData: *mut ::DWORD, + pCurrent: *mut ::DWORD, + cbData: ::UINT, + iItem: ::c_int, + cButtons: ::c_int, + cbBytesPerRecord: ::c_int, + tbButton: TBBUTTON, +}} +pub type LPNMTBRESTORE = *mut NMTBRESTORE; +STRUCT!{struct NMTBGETINFOTIPA { + hdr: ::NMHDR, + pszText: ::LPSTR, + cchTextMax: ::c_int, + iItem: ::c_int, + lParal: ::LPARAM, +}} +pub type LPNMTBGETINFOTIPA = *mut NMTBGETINFOTIPA; +STRUCT!{struct NMTBGETINFOTIPW { + hdr: ::NMHDR, + pszText: ::LPWSTR, + cchTextMax: ::c_int, + iItem: ::c_int, + lParal: ::LPARAM, +}} +pub type LPNMTBGETINFOTIPW = *mut NMTBGETINFOTIPW; +pub const TBNF_IMAGE: ::DWORD = 0x00000001; +pub const TBNF_TEXT: ::DWORD = 0x00000002; +pub const TBNF_DI_SETITEM: ::DWORD = 0x10000000; +STRUCT!{struct NMTBDISPINFOA { + hdr: ::NMHDR, + dwMask: ::DWORD, + idCommand: ::c_int, + lParam: ::DWORD_PTR, + iImage: ::c_int, + pszText: ::LPSTR, + cchText: ::c_int, +}} +pub type LPNMTBDISPINFOA = *mut NMTBDISPINFOA; +STRUCT!{struct NMTBDISPINFOW { + hdr: ::NMHDR, + dwMask: ::DWORD, + idCommand: ::c_int, + lParam: ::DWORD_PTR, + iImage: ::c_int, + pszText: ::LPWSTR, + cchText: ::c_int, +}} +pub type LPNMTBDISPINFOW = *mut NMTBDISPINFOW; +pub const TBDDRET_DEFAULT: ::LRESULT = 0; +pub const TBDDRET_NODEFAULT: ::LRESULT = 1; +pub const TBDDRET_TREATPRESSED: ::LRESULT = 2; +pub type TBNOTIFYA = NMTOOLBARA; +pub type TBNOTIFYW = NMTOOLBARW; +pub type LPTBNOTIFYA = LPNMTOOLBARA; +pub type LPTBNOTIFYW = LPNMTOOLBARW; +STRUCT!{struct NMTOOLBARA { + hdr: ::NMHDR, + iItem: ::c_int, + tbButton: TBBUTTON, + cchText: ::c_int, + pszText: ::LPSTR, + rcButton: ::RECT, +}} +pub type LPNMTOOLBARA = *mut NMTOOLBARA; +STRUCT!{struct NMTOOLBARW { + hdr: ::NMHDR, + iItem: ::c_int, + tbButton: TBBUTTON, + cchText: ::c_int, + pszText: ::LPWSTR, + rcButton: ::RECT, +}} +pub type LPNMTOOLBARW = *mut NMTOOLBARW; +pub const RBIM_IMAGELIST: ::UINT = 0x00000001; +pub const RBS_TOOLTIPS: ::DWORD = 0x00000100; +pub const RBS_VARHEIGHT: ::DWORD = 0x00000200; +pub const RBS_BANDBORDERS: ::DWORD = 0x00000400; +pub const RBS_FIXEDORDER: ::DWORD = 0x00000800; +pub const RBS_REGISTERDROP: ::DWORD = 0x00001000; +pub const RBS_AUTOSIZE: ::DWORD = 0x00002000; +pub const RBS_VERTICALGRIPPER: ::DWORD = 0x00004000; +pub const RBS_DBLCLKTOGGLE: ::DWORD = 0x00008000; +STRUCT!{struct REBARINFO { + cbSize: ::UINT, + fMask: ::UINT, + himl: HIMAGELIST, +}} +pub type LPREBARINFO = *mut REBARINFO; +pub const RBBS_BREAK: ::UINT = 0x00000001; +pub const RBBS_FIXEDSIZE: ::UINT = 0x00000002; +pub const RBBS_CHILDEDGE: ::UINT = 0x00000004; +pub const RBBS_HIDDEN: ::UINT = 0x00000008; +pub const RBBS_NOVERT: ::UINT = 0x00000010; +pub const RBBS_FIXEDBMP: ::UINT = 0x00000020; +pub const RBBS_VARIABLEHEIGHT: ::UINT = 0x00000040; +pub const RBBS_GRIPPERALWAYS: ::UINT = 0x00000080; +pub const RBBS_NOGRIPPER: ::UINT = 0x00000100; +pub const RBBS_USECHEVRON: ::UINT = 0x00000200; +pub const RBBS_HIDETITLE: ::UINT = 0x00000400; +pub const RBBS_TOPALIGN: ::UINT = 0x00000800; +pub const RBBIM_STYLE: ::UINT = 0x00000001; +pub const RBBIM_COLORS: ::UINT = 0x00000002; +pub const RBBIM_TEXT: ::UINT = 0x00000004; +pub const RBBIM_IMAGE: ::UINT = 0x00000008; +pub const RBBIM_CHILD: ::UINT = 0x00000010; +pub const RBBIM_CHILDSIZE: ::UINT = 0x00000020; +pub const RBBIM_SIZE: ::UINT = 0x00000040; +pub const RBBIM_BACKGROUND: ::UINT = 0x00000080; +pub const RBBIM_ID: ::UINT = 0x00000100; +pub const RBBIM_IDEALSIZE: ::UINT = 0x00000200; +pub const RBBIM_LPARAM: ::UINT = 0x00000400; +pub const RBBIM_HEADERSIZE: ::UINT = 0x00000800; +pub const RBBIM_CHEVRONLOCATION: ::UINT = 0x00001000; +pub const RBBIM_CHEVRONSTATE: ::UINT = 0x00002000; +STRUCT!{struct REBARBANDINFOA { + cbSize: ::UINT, + fMask: ::UINT, + fStyle: ::UINT, + clrFore: ::COLORREF, + clrBack: ::COLORREF, + lpText: ::LPSTR, + cch: ::UINT, + iImage: ::c_int, + hwndChild: ::HWND, + cxMinChild: ::UINT, + cyMinChild: ::UINT, + cx: ::UINT, + hbmBack: ::HBITMAP, + wID: ::UINT, + cyChild: ::UINT, + cyMaxChild: ::UINT, + cyIntegral: ::UINT, + cxIdeal: ::UINT, + lParam: ::LPARAM, + cxHeader: ::UINT, + rcChevronLocation: ::RECT, + uChevronState: ::UINT, +}} +pub type LPREBARBANDINFOA = *mut REBARBANDINFOA; +pub type LPCREBARBANDINFOA = *const REBARBANDINFOA; +STRUCT!{struct REBARBANDINFOW { + cbSize: ::UINT, + fMask: ::UINT, + fStyle: ::UINT, + clrFore: ::COLORREF, + clrBack: ::COLORREF, + lpText: ::LPWSTR, + cch: ::UINT, + iImage: ::c_int, + hwndChild: ::HWND, + cxMinChild: ::UINT, + cyMinChild: ::UINT, + cx: ::UINT, + hbmBack: ::HBITMAP, + wID: ::UINT, + cyChild: ::UINT, + cyMaxChild: ::UINT, + cyIntegral: ::UINT, + cxIdeal: ::UINT, + lParam: ::LPARAM, + cxHeader: ::UINT, + rcChevronLocation: ::RECT, + uChevronState: ::UINT, +}} +pub type LPREBARBANDINFOW = *mut REBARBANDINFOW; +pub type LPCREBARBANDINFOW = *const REBARBANDINFOW; +pub const RB_INSERTBANDA: ::UINT = ::WM_USER + 1; +pub const RB_DELETEBAND: ::UINT = ::WM_USER + 2; +pub const RB_GETBARINFO: ::UINT = ::WM_USER + 3; +pub const RB_SETBARINFO: ::UINT = ::WM_USER + 4; +pub const RB_SETBANDINFOA: ::UINT = ::WM_USER + 6; +pub const RB_SETPARENT: ::UINT = ::WM_USER + 7; +pub const RB_HITTEST: ::UINT = ::WM_USER + 8; +pub const RB_GETRECT: ::UINT = ::WM_USER + 9; +pub const RB_INSERTBANDW: ::UINT = ::WM_USER + 10; +pub const RB_SETBANDINFOW: ::UINT = ::WM_USER + 11; +pub const RB_GETBANDCOUNT: ::UINT = ::WM_USER + 12; +pub const RB_GETROWCOUNT: ::UINT = ::WM_USER + 13; +pub const RB_GETROWHEIGHT: ::UINT = ::WM_USER + 14; +pub const RB_IDTOINDEX: ::UINT = ::WM_USER + 16; +pub const RB_GETTOOLTIPS: ::UINT = ::WM_USER + 17; +pub const RB_SETTOOLTIPS: ::UINT = ::WM_USER + 18; +pub const RB_SETBKCOLOR: ::UINT = ::WM_USER + 19; +pub const RB_GETBKCOLOR: ::UINT = ::WM_USER + 20; +pub const RB_SETTEXTCOLOR: ::UINT = ::WM_USER + 21; +pub const RB_GETTEXTCOLOR: ::UINT = ::WM_USER + 22; +pub const RBSTR_CHANGERECT: ::WPARAM = 0x0001; +pub const RB_SIZETORECT: ::UINT = ::WM_USER + 23; +pub const RB_SETCOLORSCHEME: ::UINT = CCM_SETCOLORSCHEME; +pub const RB_GETCOLORSCHEME: ::UINT = CCM_GETCOLORSCHEME; +pub const RB_BEGINDRAG: ::UINT = ::WM_USER + 24; +pub const RB_ENDDRAG: ::UINT = ::WM_USER + 25; +pub const RB_DRAGMOVE: ::UINT = ::WM_USER + 26; +pub const RB_GETBARHEIGHT: ::UINT = ::WM_USER + 27; +pub const RB_GETBANDINFOW: ::UINT = ::WM_USER + 28; +pub const RB_GETBANDINFOA: ::UINT = ::WM_USER + 29; +pub const RB_MINIMIZEBAND: ::UINT = ::WM_USER + 30; +pub const RB_MAXIMIZEBAND: ::UINT = ::WM_USER + 31; +pub const RB_GETDROPTARGET: ::UINT = CCM_GETDROPTARGET; +pub const RB_GETBANDBORDERS: ::UINT = ::WM_USER + 34; +pub const RB_SHOWBAND: ::UINT = ::WM_USER + 35; +pub const RB_SETPALETTE: ::UINT = ::WM_USER + 37; +pub const RB_GETPALETTE: ::UINT = ::WM_USER + 38; +pub const RB_MOVEBAND: ::UINT = ::WM_USER + 39; +pub const RB_SETUNICODEFORMAT: ::UINT = CCM_SETUNICODEFORMAT; +pub const RB_GETUNICODEFORMAT: ::UINT = CCM_GETUNICODEFORMAT; +pub const RB_GETBANDMARGINS: ::UINT = ::WM_USER + 40; +pub const RB_SETWINDOWTHEME: ::UINT = CCM_SETWINDOWTHEME; +pub const RB_SETEXTENDEDSTYLE: ::UINT = ::WM_USER + 41; +pub const RB_GETEXTENDEDSTYLE: ::UINT = ::WM_USER + 42; +pub const RB_PUSHCHEVRON: ::UINT = ::WM_USER + 43; +pub const RB_SETBANDWIDTH: ::UINT = ::WM_USER + 44; +pub const RBN_HEIGHTCHANGE: ::UINT = RBN_FIRST - 0; +pub const RBN_GETOBJECT: ::UINT = RBN_FIRST - 1; +pub const RBN_LAYOUTCHANGED: ::UINT = RBN_FIRST - 2; +pub const RBN_AUTOSIZE: ::UINT = RBN_FIRST - 3; +pub const RBN_BEGINDRAG: ::UINT = RBN_FIRST - 4; +pub const RBN_ENDDRAG: ::UINT = RBN_FIRST - 5; +pub const RBN_DELETINGBAND: ::UINT = RBN_FIRST - 6; +pub const RBN_DELETEDBAND: ::UINT = RBN_FIRST - 7; +pub const RBN_CHILDSIZE: ::UINT = RBN_FIRST - 8; +pub const RBN_CHEVRONPUSHED: ::UINT = RBN_FIRST - 10; +pub const RBN_SPLITTERDRAG: ::UINT = RBN_FIRST - 11; +pub const RBN_MINMAX: ::UINT = RBN_FIRST - 21; +pub const RBN_AUTOBREAK: ::UINT = RBN_FIRST - 22; +STRUCT!{struct NMREBARCHILDSIZE { + hdr: ::NMHDR, + uBand: ::UINT, + wID: ::UINT, + rcChild: ::RECT, + rcBand: ::RECT, +}} +pub type LPNMREBARCHILDSIZE = *mut NMREBARCHILDSIZE; +STRUCT!{struct NMREBAR { + hdr: ::NMHDR, + dwMask: ::DWORD, + uBand: ::UINT, + fStyle: ::UINT, + wID: ::UINT, + lParam: ::LPARAM, +}} +pub type LPNMREBAR = *mut NMREBAR; +pub const RBNM_ID: ::DWORD = 0x00000001; +pub const RBNM_STYLE: ::DWORD = 0x00000002; +pub const RBNM_LPARAM: ::DWORD = 0x00000004; +STRUCT!{struct NMRBAUTOSIZE { + hdr: ::NMHDR, + fChanged: ::BOOL, + rcTarget: ::RECT, + rcActual: ::RECT, +}} +pub type LPNMRBAUTOSIZE = *mut NMRBAUTOSIZE; +STRUCT!{struct NMREBARCHEVRON { + hdr: ::NMHDR, + uBand: ::UINT, + wID: ::UINT, + lParam: ::LPARAM, + rc: ::RECT, + lParamNM: ::LPARAM, +}} +pub type LPNMREBARCHEVRON = *mut NMREBARCHEVRON; +STRUCT!{struct NMREBARSPLITTER { + hdr: ::NMHDR, + rcSizing: ::RECT, +}} +pub type LPNMREBARSPLITTER = *mut NMREBARSPLITTER; +pub const RBAB_AUTOSIZE: ::UINT = 0x0001; +pub const RBAB_ADDBAND: ::UINT = 0x0002; +STRUCT!{struct NMREBARAUTOBREAK { + hdr: ::NMHDR, + uBand: ::UINT, + wID: ::UINT, + lParam: ::LPARAM, + uMsg: ::UINT, + fStyleCurrent: ::UINT, + fAutoBreak: ::UINT, +}} +pub type LPNMREBARAUTOBREAK = *mut NMREBARAUTOBREAK; +pub const RBHT_NOWHERE: ::UINT = 0x0001; +pub const RBHT_CAPTION: ::UINT = 0x0002; +pub const RBHT_CLIENT: ::UINT = 0x0003; +pub const RBHT_GRABBER: ::UINT = 0x0004; +pub const RBHT_CHEVRON: ::UINT = 0x0008; +pub const RBHT_SPLITTER: ::UINT = 0x0010; +STRUCT!{struct RBHITTESTINFO { + pt: ::POINT, + flags: ::UINT, + iBand: ::c_int, +}} +pub type LPRBHITTESTINFO = *mut RBHITTESTINFO; +pub type LPTOOLINFOA = LPTTTOOLINFOA; +pub type LPTOOLINFOW = LPTTTOOLINFOW; +pub type TOOLINFOA = TTTOOLINFOA; +pub type TOOLINFOW = TTTOOLINFOW; +STRUCT!{struct TTTOOLINFOA { + cbSize: ::UINT, + uFlags: ::UINT, + hwnd: ::HWND, + uId: ::UINT_PTR, + rect: ::RECT, + hinst: ::HINSTANCE, + lpszText: ::LPSTR, + lParam: ::LPARAM, + lpReserved: *mut ::c_void, +}} +pub type PTTTOOLINFOA = *mut TTTOOLINFOA; +pub type LPTTTOOLINFOA = *mut TTTOOLINFOA; +STRUCT!{struct TTTOOLINFOW { + cbSize: ::UINT, + uFlags: ::UINT, + hwnd: ::HWND, + uId: ::UINT_PTR, + rect: ::RECT, + hinst: ::HINSTANCE, + lpszText: ::LPSTR, + lParam: ::LPARAM, + lpReserved: *mut ::c_void, +}} +pub type PTTTOOLINFOW = *mut TTTOOLINFOW; +pub type LPTTTOOLINFOW = *mut TTTOOLINFOW; +pub const TTS_ALWAYSTIP: ::DWORD = 0x01; +pub const TTS_NOPREFIX: ::DWORD = 0x02; +pub const TTS_NOANIMATE: ::DWORD = 0x10; +pub const TTS_NOFADE: ::DWORD = 0x20; +pub const TTS_BALLOON: ::DWORD = 0x40; +pub const TTS_CLOSE: ::DWORD = 0x80; +pub const TTS_USEVISUALSTYLE: ::DWORD = 0x100; +pub const TTF_IDISHWND: ::UINT = 0x0001; +pub const TTF_CENTERTIP: ::UINT = 0x0002; +pub const TTF_RTLREADING: ::UINT = 0x0004; +pub const TTF_SUBCLASS: ::UINT = 0x0010; +pub const TTF_TRACK: ::UINT = 0x0020; +pub const TTF_ABSOLUTE: ::UINT = 0x0080; +pub const TTF_TRANSPARENT: ::UINT = 0x0100; +pub const TTF_PARSELINKS: ::UINT = 0x1000; +pub const TTF_DI_SETITEM: ::UINT = 0x8000; +pub const TTDT_AUTOMATIC: ::WPARAM = 0; +pub const TTDT_RESHOW: ::WPARAM = 1; +pub const TTDT_AUTOPOP: ::WPARAM = 2; +pub const TTDT_INITIAL: ::WPARAM = 3; +pub const TTI_NONE: ::WPARAM = 0; +pub const TTI_INFO: ::WPARAM = 1; +pub const TTI_WARNING: ::WPARAM = 2; +pub const TTI_ERROR: ::WPARAM = 3; +pub const TTI_INFO_LARGE: ::WPARAM = 4; +pub const TTI_WARNING_LARGE: ::WPARAM = 5; +pub const TTI_ERROR_LARGE: ::WPARAM = 6; +pub const TTM_ACTIVATE: ::UINT = ::WM_USER + 1; +pub const TTM_SETDELAYTIME: ::UINT = ::WM_USER + 3; +pub const TTM_ADDTOOLA: ::UINT = ::WM_USER + 4; +pub const TTM_ADDTOOLW: ::UINT = ::WM_USER + 50; +pub const TTM_DELTOOLA: ::UINT = ::WM_USER + 5; +pub const TTM_DELTOOLW: ::UINT = ::WM_USER + 51; +pub const TTM_NEWTOOLRECTA: ::UINT = ::WM_USER + 6; +pub const TTM_NEWTOOLRECTW: ::UINT = ::WM_USER + 52; +pub const TTM_RELAYEVENT: ::UINT = ::WM_USER + 7; +pub const TTM_GETTOOLINFOA: ::UINT = ::WM_USER + 8; +pub const TTM_GETTOOLINFOW: ::UINT = ::WM_USER + 53; +pub const TTM_SETTOOLINFOA: ::UINT = ::WM_USER + 9; +pub const TTM_SETTOOLINFOW: ::UINT = ::WM_USER + 54; +pub const TTM_HITTESTA: ::UINT = ::WM_USER + 10; +pub const TTM_HITTESTW: ::UINT = ::WM_USER + 55; +pub const TTM_GETTEXTA: ::UINT = ::WM_USER + 11; +pub const TTM_GETTEXTW: ::UINT = ::WM_USER + 56; +pub const TTM_UPDATETIPTEXTA: ::UINT = ::WM_USER + 12; +pub const TTM_UPDATETIPTEXTW: ::UINT = ::WM_USER + 57; +pub const TTM_GETTOOLCOUNT: ::UINT = ::WM_USER + 13; +pub const TTM_ENUMTOOLSA: ::UINT = ::WM_USER + 14; +pub const TTM_ENUMTOOLSW: ::UINT = ::WM_USER + 58; +pub const TTM_GETCURRENTTOOLA: ::UINT = ::WM_USER + 15; +pub const TTM_GETCURRENTTOOLW: ::UINT = ::WM_USER + 59; +pub const TTM_WINDOWFROMPOINT: ::UINT = ::WM_USER + 16; +pub const TTM_TRACKACTIVATE: ::UINT = ::WM_USER + 17; +pub const TTM_TRACKPOSITION: ::UINT = ::WM_USER + 18; +pub const TTM_SETTIPBKCOLOR: ::UINT = ::WM_USER + 19; +pub const TTM_SETTIPTEXTCOLOR: ::UINT = ::WM_USER + 20; +pub const TTM_GETDELAYTIME: ::UINT = ::WM_USER + 21; +pub const TTM_GETTIPBKCOLOR: ::UINT = ::WM_USER + 22; +pub const TTM_GETTIPTEXTCOLOR: ::UINT = ::WM_USER + 23; +pub const TTM_SETMAXTIPWIDTH: ::UINT = ::WM_USER + 24; +pub const TTM_GETMAXTIPWIDTH: ::UINT = ::WM_USER + 25; +pub const TTM_SETMARGIN: ::UINT = ::WM_USER + 26; +pub const TTM_GETMARGIN: ::UINT = ::WM_USER + 27; +pub const TTM_POP: ::UINT = ::WM_USER + 28; +pub const TTM_UPDATE: ::UINT = ::WM_USER + 29; +pub const TTM_GETBUBBLESIZE: ::UINT = ::WM_USER + 30; +pub const TTM_ADJUSTRECT: ::UINT = ::WM_USER + 31; +pub const TTM_SETTITLEA: ::UINT = ::WM_USER + 32; +pub const TTM_SETTITLEW: ::UINT = ::WM_USER + 33; +pub const TTM_POPUP: ::UINT = ::WM_USER + 34; +pub const TTM_GETTITLE: ::UINT = ::WM_USER + 35; +STRUCT!{struct TTGETTITLE { + dwSize: ::DWORD, + uTitleBitmap: ::UINT, + cch: ::UINT, + pszTitle: *mut ::WCHAR, +}} +pub type LPTTGETTITLE = *mut TTGETTITLE; +pub const TTM_SETWINDOWTHEME: ::UINT = CCM_SETWINDOWTHEME; +pub type LPHITTESTINFOW = LPTTHITTESTINFOW; +pub type LPHITTESTINFOA = LPTTHITTESTINFOA; +STRUCT!{struct TTHITTESTINFOA { + hwnd: ::HWND, + pt: ::POINT, + ti: TTTOOLINFOA, +}} +pub type LPTTHITTESTINFOA = *mut TTHITTESTINFOA; +STRUCT!{struct TTHITTESTINFOW { + hwnd: ::HWND, + pt: ::POINT, + ti: TTTOOLINFOW, +}} +pub type LPTTHITTESTINFOW = *mut TTHITTESTINFOW; +pub const TTN_GETDISPINFOA: ::UINT = TTN_FIRST - 0; +pub const TTN_GETDISPINFOW: ::UINT = TTN_FIRST - 10; +pub const TTN_SHOW: ::UINT = TTN_FIRST - 1; +pub const TTN_POP: ::UINT = TTN_FIRST - 2; +pub const TTN_LINKCLICK: ::UINT = TTN_FIRST - 3; +pub const TTN_NEEDTEXTA: ::UINT = TTN_GETDISPINFOA; +pub const TTN_NEEDTEXTW: ::UINT = TTN_GETDISPINFOW; +pub type TOOLTIPTEXTW = NMTTDISPINFOW; +pub type TOOLTIPTEXTA = NMTTDISPINFOA; +pub type LPTOOLTIPTEXTA = LPNMTTDISPINFOA; +pub type LPTOOLTIPTEXTW = LPNMTTDISPINFOW; +STRUCT!{nodebug struct NMTTDISPINFOA { + hdr: ::NMHDR, + lpszText: ::LPSTR, + szText: [::c_char; 80], + hinst: ::HINSTANCE, + uFlags: ::UINT, + lParam: ::LPARAM, +}} +pub type LPNMTTDISPINFOA = *mut NMTTDISPINFOA; +STRUCT!{nodebug struct NMTTDISPINFOW { + hdr: ::NMHDR, + lpszText: ::LPWSTR, + szText: [::WCHAR; 80], + hinst: ::HINSTANCE, + uFlags: ::UINT, + lParam: ::LPARAM, +}} +pub type LPNMTTDISPINFOW = *mut NMTTDISPINFOW; +pub const SBARS_SIZEGRIP: ::DWORD = 0x0100; +pub const SBARS_TOOLTIPS: ::DWORD = 0x0800; +pub const SBT_TOOLTIPS: ::DWORD = 0x0800; +pub const SB_SETTEXTA: ::UINT = ::WM_USER + 1; +pub const SB_SETTEXTW: ::UINT = ::WM_USER + 11; +pub const SB_GETTEXTA: ::UINT = ::WM_USER + 2; +pub const SB_GETTEXTW: ::UINT = ::WM_USER + 13; +pub const SB_GETTEXTLENGTHA: ::UINT = ::WM_USER + 3; +pub const SB_GETTEXTLENGTHW: ::UINT = ::WM_USER + 12; +pub const SB_SETPARTS: ::UINT = ::WM_USER + 4; +pub const SB_GETPARTS: ::UINT = ::WM_USER + 6; +pub const SB_GETBORDERS: ::UINT = ::WM_USER + 7; +pub const SB_SETMINHEIGHT: ::UINT = ::WM_USER + 8; +pub const SB_SIMPLE: ::UINT = ::WM_USER + 9; +pub const SB_GETRECT: ::UINT = ::WM_USER + 10; +pub const SB_ISSIMPLE: ::UINT = ::WM_USER + 14; +pub const SB_SETICON: ::UINT = ::WM_USER + 15; +pub const SB_SETTIPTEXTA: ::UINT = ::WM_USER + 16; +pub const SB_SETTIPTEXTW: ::UINT = ::WM_USER + 17; +pub const SB_GETTIPTEXTA: ::UINT = ::WM_USER + 18; +pub const SB_GETTIPTEXTW: ::UINT = ::WM_USER + 19; +pub const SB_GETICON: ::UINT = ::WM_USER + 20; +pub const SB_SETUNICODEFORMAT: ::UINT = CCM_SETUNICODEFORMAT; +pub const SB_GETUNICODEFORMAT: ::UINT = CCM_GETUNICODEFORMAT; +pub const SBT_OWNERDRAW: ::WPARAM = 0x1000; +pub const SBT_NOBORDERS: ::WPARAM = 0x0100; +pub const SBT_POPOUT: ::WPARAM = 0x0200; +pub const SBT_RTLREADING: ::WPARAM = 0x0400; +pub const SBT_NOTABPARSING: ::WPARAM = 0x0800; +pub const SB_SETBKCOLOR: ::UINT = CCM_SETBKCOLOR; +pub const SBN_SIMPLEMODECHANGE: ::UINT = SBN_FIRST - 0; +pub const SB_SIMPLEID: ::WPARAM = 0x00ff; +pub const TBS_AUTOTICKS: ::DWORD = 0x0001; +pub const TBS_VERT: ::DWORD = 0x0002; +pub const TBS_HORZ: ::DWORD = 0x0000; +pub const TBS_TOP: ::DWORD = 0x0004; +pub const TBS_BOTTOM: ::DWORD = 0x0000; +pub const TBS_LEFT: ::DWORD = 0x0004; +pub const TBS_RIGHT: ::DWORD = 0x0000; +pub const TBS_BOTH: ::DWORD = 0x0008; +pub const TBS_NOTICKS: ::DWORD = 0x0010; +pub const TBS_ENABLESELRANGE: ::DWORD = 0x0020; +pub const TBS_FIXEDLENGTH: ::DWORD = 0x0040; +pub const TBS_NOTHUMB: ::DWORD = 0x0080; +pub const TBS_TOOLTIPS: ::DWORD = 0x0100; +pub const TBS_REVERSED: ::DWORD = 0x0200; +pub const TBS_DOWNISLEFT: ::DWORD = 0x0400; +pub const TBS_NOTIFYBEFOREMOVE: ::DWORD = 0x0800; +pub const TBS_TRANSPARENTBKGND: ::DWORD = 0x1000; +pub const TBM_GETPOS: ::UINT = ::WM_USER; +pub const TBM_GETRANGEMIN: ::UINT = ::WM_USER + 1; +pub const TBM_GETRANGEMAX: ::UINT = ::WM_USER + 2; +pub const TBM_GETTIC: ::UINT = ::WM_USER + 3; +pub const TBM_SETTIC: ::UINT = ::WM_USER + 4; +pub const TBM_SETPOS: ::UINT = ::WM_USER + 5; +pub const TBM_SETRANGE: ::UINT = ::WM_USER + 6; +pub const TBM_SETRANGEMIN: ::UINT = ::WM_USER + 7; +pub const TBM_SETRANGEMAX: ::UINT = ::WM_USER + 8; +pub const TBM_CLEARTICS: ::UINT = ::WM_USER + 9; +pub const TBM_SETSEL: ::UINT = ::WM_USER + 10; +pub const TBM_SETSELSTART: ::UINT = ::WM_USER + 11; +pub const TBM_SETSELEND: ::UINT = ::WM_USER + 12; +pub const TBM_GETPTICS: ::UINT = ::WM_USER + 14; +pub const TBM_GETTICPOS: ::UINT = ::WM_USER + 15; +pub const TBM_GETNUMTICS: ::UINT = ::WM_USER + 16; +pub const TBM_GETSELSTART: ::UINT = ::WM_USER + 17; +pub const TBM_GETSELEND: ::UINT = ::WM_USER + 18; +pub const TBM_CLEARSEL: ::UINT = ::WM_USER + 19; +pub const TBM_SETTICFREQ: ::UINT = ::WM_USER + 20; +pub const TBM_SETPAGESIZE: ::UINT = ::WM_USER + 21; +pub const TBM_GETPAGESIZE: ::UINT = ::WM_USER + 22; +pub const TBM_SETLINESIZE: ::UINT = ::WM_USER + 23; +pub const TBM_GETLINESIZE: ::UINT = ::WM_USER + 24; +pub const TBM_GETTHUMBRECT: ::UINT = ::WM_USER + 25; +pub const TBM_GETCHANNELRECT: ::UINT = ::WM_USER + 26; +pub const TBM_SETTHUMBLENGTH: ::UINT = ::WM_USER + 27; +pub const TBM_GETTHUMBLENGTH: ::UINT = ::WM_USER + 28; +pub const TBM_SETTOOLTIPS: ::UINT = ::WM_USER + 29; +pub const TBM_GETTOOLTIPS: ::UINT = ::WM_USER + 30; +pub const TBM_SETTIPSIDE: ::UINT = ::WM_USER + 31; +pub const TBTS_TOP: ::WPARAM = 0; +pub const TBTS_LEFT: ::WPARAM = 1; +pub const TBTS_BOTTOM: ::WPARAM = 2; +pub const TBTS_RIGHT: ::WPARAM = 3; +pub const TBM_SETBUDDY: ::UINT = ::WM_USER + 32; +pub const TBM_GETBUDDY: ::UINT = ::WM_USER + 33; +pub const TBM_SETPOSNOTIFY: ::UINT = ::WM_USER + 34; +pub const TBM_SETUNICODEFORMAT: ::UINT = CCM_SETUNICODEFORMAT; +pub const TBM_GETUNICODEFORMAT: ::UINT = CCM_GETUNICODEFORMAT; +pub const TBCD_TICS: ::DWORD_PTR = 0x0001; +pub const TBCD_THUMB: ::DWORD_PTR = 0x0001; +pub const TBCD_CHANNEL: ::DWORD_PTR = 0x0001; +pub const TB_LINEUP: ::WPARAM = 0; +pub const TB_LINEDOWN: ::WPARAM = 1; +pub const TB_PAGEUP: ::WPARAM = 2; +pub const TB_PAGEDOWN: ::WPARAM = 3; +pub const TB_THUMBPOSITION: ::WPARAM = 4; +pub const TB_THUMBTRACK: ::WPARAM = 5; +pub const TB_TOP: ::WPARAM = 6; +pub const TB_BOTTOM: ::WPARAM = 7; +pub const TB_ENDTRACK: ::WPARAM = 8; +pub const TRBN_THUMBPOSCHANGING: ::UINT = TRBN_FIRST - 1; +STRUCT!{struct NMTRBTHUMBPOSCHANGING { + hdr: ::NMHDR, + dwPos: ::DWORD, + nReason: ::c_int, +}} +STRUCT!{struct DRAGLISTINFO { + uNotification: ::UINT, + hWnd: ::HWND, + ptCursor: ::POINT, +}} +pub type LPDRAGLISTINFO = *mut DRAGLISTINFO; +pub const DL_BEGINDRAG: ::UINT = ::WM_USER + 133; +pub const DL_DRAGGING: ::UINT = ::WM_USER + 134; +pub const DL_DROPPED: ::UINT = ::WM_USER + 135; +pub const DL_CANCELDRAG: ::UINT = ::WM_USER + 136; +pub const DL_CURSORSET: ::UINT = 0; +pub const DL_STOPCURSOR: ::UINT = 1; +pub const DL_COPYCURSOR: ::UINT = 2; +pub const DL_MOVECURSOR: ::UINT = 3; +STRUCT!{struct UDACCEL { + nSec: ::UINT, + nInc: ::UINT, +}} +pub type LPUDACCEL = *mut UDACCEL; +pub const UD_MAXVAL: ::c_short = 0x7fff; +pub const UD_MINVAL: ::c_short = 0 - UD_MAXVAL; +pub const UDS_WRAP: ::DWORD = 0x0001; +pub const UDS_SETBUDDYINT: ::DWORD = 0x0002; +pub const UDS_ALIGNRIGHT: ::DWORD = 0x0004; +pub const UDS_ALIGNLEFT: ::DWORD = 0x0008; +pub const UDS_AUTOBUDDY: ::DWORD = 0x0010; +pub const UDS_ARROWKEYS: ::DWORD = 0x0020; +pub const UDS_HORZ: ::DWORD = 0x0040; +pub const UDS_NOTHOUSANDS: ::DWORD = 0x0080; +pub const UDS_HOTTRACK: ::DWORD = 0x0100; +pub const UDM_SETRANGE: ::UINT = ::WM_USER + 101; +pub const UDM_GETRANGE: ::UINT = ::WM_USER + 102; +pub const UDM_SETPOS: ::UINT = ::WM_USER + 103; +pub const UDM_GETPOS: ::UINT = ::WM_USER + 104; +pub const UDM_SETBUDDY: ::UINT = ::WM_USER + 105; +pub const UDM_GETBUDDY: ::UINT = ::WM_USER + 106; +pub const UDM_SETACCEL: ::UINT = ::WM_USER + 107; +pub const UDM_GETACCEL: ::UINT = ::WM_USER + 108; +pub const UDM_SETBASE: ::UINT = ::WM_USER + 109; +pub const UDM_GETBASE: ::UINT = ::WM_USER + 110; +pub const UDM_SETRANGE32: ::UINT = ::WM_USER + 111; +pub const UDM_GETRANGE32: ::UINT = ::WM_USER + 112; +pub const UDM_SETUNICODEFORMAT: ::UINT = CCM_SETUNICODEFORMAT; +pub const UDM_GETUNICODEFORMAT: ::UINT = CCM_GETUNICODEFORMAT; +pub const UDM_SETPOS32: ::UINT = ::WM_USER + 113; +pub const UDM_GETPOS32: ::UINT = ::WM_USER + 114; +pub type NM_UPDOWN = NMUPDOWN; +pub type LPNM_UPDOWN = LPNMUPDOWN; +STRUCT!{struct NMUPDOWN { + hdr: ::NMHDR, + iPos: ::c_int, + iDelta: ::c_int, +}} +pub type LPNMUPDOWN = *mut NMUPDOWN; +pub const UDN_DELTAPOS: ::UINT = UDN_FIRST - 1; +pub const PBS_SMOOTH: ::DWORD = 0x01; +pub const PBS_VERTICAL: ::DWORD = 0x04; +pub const PBM_SETRANGE: ::UINT = ::WM_USER + 1; +pub const PBM_SETPOS: ::UINT = ::WM_USER + 2; +pub const PBM_DELTAPOS: ::UINT = ::WM_USER + 3; +pub const PBM_SETSTEP: ::UINT = ::WM_USER + 4; +pub const PBM_STEPIT: ::UINT = ::WM_USER + 5; +pub const PBM_SETRANGE32: ::UINT = ::WM_USER + 6; +STRUCT!{struct PBRANGE { + iLow: ::c_int, + iHigh: ::c_int, +}} +pub type LPPBRANGE = *mut PBRANGE; +pub const PBM_GETRANGE: ::UINT = ::WM_USER + 7; +pub const PBM_GETPOS: ::UINT = ::WM_USER + 8; +pub const PBM_SETBARCOLOR: ::UINT = ::WM_USER + 9; +pub const PBM_SETBKCOLOR: ::UINT = CCM_SETBKCOLOR; +pub const PBM_SETMARQUEE: ::UINT = ::WM_USER + 10; +pub const PBS_MARQUEE: ::DWORD = 0x08; +pub const PBS_SMOOTHREVERSE: ::DWORD = 0x10; +pub const PBM_GETSTEP: ::UINT = ::WM_USER + 13; +pub const PBM_GETBKCOLOR: ::UINT = ::WM_USER + 14; +pub const PBM_GETBARCOLOR: ::UINT = ::WM_USER + 15; +pub const PBM_SETSTATE: ::UINT = ::WM_USER + 16; +pub const PBM_GETSTATE: ::UINT = ::WM_USER + 17; +pub const PBST_NORMAL: ::c_int = 0x0001; +pub const PBST_ERROR: ::c_int = 0x0002; +pub const PBST_PAUSED: ::c_int = 0x0003; +pub const HOTKEYF_SHIFT: ::BYTE = 0x01; +pub const HOTKEYF_CONTROL: ::BYTE = 0x02; +pub const HOTKEYF_ALT: ::BYTE = 0x04; +pub const HOTKEYF_EXT: ::BYTE = 0x08; +pub const HKCOMB_NONE: ::WPARAM = 0x0001; +pub const HKCOMB_S: ::WPARAM = 0x0002; +pub const HKCOMB_C: ::WPARAM = 0x0004; +pub const HKCOMB_A: ::WPARAM = 0x0008; +pub const HKCOMB_SC: ::WPARAM = 0x0010; +pub const HKCOMB_SA: ::WPARAM = 0x0020; +pub const HKCOMB_CA: ::WPARAM = 0x0040; +pub const HKCOMB_SCA: ::WPARAM = 0x0080; +pub const HKM_SETHOTKEY: ::UINT = ::WM_USER + 1; +pub const HKM_GETHOTKEY: ::UINT = ::WM_USER + 2; +pub const HKM_SETRULES: ::UINT = ::WM_USER + 3; +pub const CCS_TOP: ::DWORD = 0x00000001; +pub const CCS_NOMOVEY: ::DWORD = 0x00000002; +pub const CCS_BOTTOM: ::DWORD = 0x00000003; +pub const CCS_NORESIZE: ::DWORD = 0x00000004; +pub const CCS_NOPARENTALIGN: ::DWORD = 0x00000008; +pub const CCS_ADJUSTABLE: ::DWORD = 0x00000020; +pub const CCS_NODIVIDER: ::DWORD = 0x00000040; +pub const CCS_VERT: ::DWORD = 0x00000080; +pub const CCS_LEFT: ::DWORD = CCS_VERT | CCS_TOP; +pub const CCS_RIGHT: ::DWORD = CCS_VERT | CCS_BOTTOM; +pub const CCS_NOMOVEX: ::DWORD = CCS_VERT | CCS_NOMOVEY; +pub const MAX_LINKID_TEXT: usize = 48; +pub const L_MAX_URL_LENGTH: usize = 2048 + 32 + 4; +pub const LWS_TRANSPARENT: ::DWORD = 0x0001; +pub const LWS_IGNORERETURN: ::DWORD = 0x0002; +pub const LWS_NOPREFIX: ::DWORD = 0x0004; +pub const LWS_USEVISUALSTYLE: ::DWORD = 0x0008; +pub const LWS_USECUSTOMTEXT: ::DWORD = 0x0010; +pub const LWS_RIGHT: ::DWORD = 0x0020; +pub const LIF_ITEMINDEX: ::UINT = 0x00000001; +pub const LIF_STATE: ::UINT = 0x00000002; +pub const LIF_ITEMID: ::UINT = 0x00000004; +pub const LIF_URL: ::UINT = 0x00000008; +pub const LIS_FOCUSED: ::UINT = 0x00000001; +pub const LIS_ENABLED: ::UINT = 0x00000002; +pub const LIS_VISITED: ::UINT = 0x00000004; +pub const LIS_HOTTRACK: ::UINT = 0x00000008; +pub const LIS_DEFAULTCOLORS: ::UINT = 0x00000010; +STRUCT!{nodebug struct LITEM { + mask: ::UINT, + iLink: ::c_int, + state: ::UINT, + stateMask: ::UINT, + szID: [::WCHAR; MAX_LINKID_TEXT], + szUrl: [::WCHAR; L_MAX_URL_LENGTH], +}} +pub type PLITEM = *mut LITEM; +STRUCT!{nodebug struct LHITTESTINFO { + pt: ::POINT, + item: LITEM, +}} +pub type PLHITTESTINFO = *mut LHITTESTINFO; +STRUCT!{nodebug struct NMLINK { + hdr: ::NMHDR, + item: LITEM, +}} +pub type PNMLINK = *mut NMLINK; +pub const LM_HITTEST: ::UINT = ::WM_USER + 0x300; +pub const LM_GETIDEALHEIGHT: ::UINT = ::WM_USER + 0x301; +pub const LM_SETITEM: ::UINT = ::WM_USER + 0x302; +pub const LM_GETITEM: ::UINT = ::WM_USER + 0x303; +pub const LM_GETIDEALSIZE: ::UINT = LM_GETIDEALHEIGHT; +pub const LVS_ICON: ::DWORD = 0x0000; +pub const LVS_REPORT: ::DWORD = 0x0001; +pub const LVS_SMALLICON: ::DWORD = 0x0002; +pub const LVS_LIST: ::DWORD = 0x0003; +pub const LVS_TYPEMASK: ::DWORD = 0x0003; +pub const LVS_SINGLESEL: ::DWORD = 0x0004; +pub const LVS_SHOWSELALWAYS: ::DWORD = 0x0008; +pub const LVS_SORTASCENDING: ::DWORD = 0x0010; +pub const LVS_SORTDESCENDING: ::DWORD = 0x0020; +pub const LVS_SHAREIMAGELISTS: ::DWORD = 0x0040; +pub const LVS_NOLABELWRAP: ::DWORD = 0x0080; +pub const LVS_AUTOARRANGE: ::DWORD = 0x0100; +pub const LVS_EDITLABELS: ::DWORD = 0x0200; +pub const LVS_OWNERDATA: ::DWORD = 0x1000; +pub const LVS_NOSCROLL: ::DWORD = 0x2000; +pub const LVS_TYPESTYLEMASK: ::DWORD = 0xfc00; +pub const LVS_ALIGNTOP: ::DWORD = 0x0000; +pub const LVS_ALIGNLEFT: ::DWORD = 0x0800; +pub const LVS_ALIGNMASK: ::DWORD = 0x0c00; +pub const LVS_OWNERDRAWFIXED: ::DWORD = 0x0400; +pub const LVS_NOCOLUMNHEADER: ::DWORD = 0x4000; +pub const LVS_NOSORTHEADER: ::DWORD = 0x8000; +pub const LVM_SETUNICODEFORMAT: ::UINT = CCM_SETUNICODEFORMAT; +pub const LVM_GETUNICODEFORMAT: ::UINT = CCM_GETUNICODEFORMAT; +pub const LVM_GETBKCOLOR: ::UINT = LVM_FIRST + 0; +pub const LVM_SETBKCOLOR: ::UINT = LVM_FIRST + 1; +pub const LVM_GETIMAGELIST: ::UINT = LVM_FIRST + 2; +pub const LVM_SETIMAGELIST: ::UINT = LVM_FIRST + 3; +pub const LVM_GETITEMCOUNT: ::UINT = LVM_FIRST + 4; +pub const LVSIL_NORMAL: ::c_int = 0; +pub const LVSIL_SMALL: ::c_int = 1; +pub const LVSIL_STATE: ::c_int = 2; +pub const LVSIL_GROUPHEADER: ::c_int = 3; +pub const LVIF_TEXT: ::UINT = 0x00000001; +pub const LVIF_IMAGE: ::UINT = 0x00000002; +pub const LVIF_PARAM: ::UINT = 0x00000004; +pub const LVIF_STATE: ::UINT = 0x00000008; +pub const LVIF_INDENT: ::UINT = 0x00000010; +pub const LVIF_NORECOMPUTE: ::UINT = 0x00000800; +pub const LVIF_GROUPID: ::UINT = 0x00000100; +pub const LVIF_COLUMNS: ::UINT = 0x00000200; +pub const LVIF_COLFMT: ::UINT = 0x00010000; +pub const LVIS_FOCUSED: ::UINT = 0x0001; +pub const LVIS_SELECTED: ::UINT = 0x0002; +pub const LVIS_CUT: ::UINT = 0x0004; +pub const LVIS_DROPHILITED: ::UINT = 0x0008; +pub const LVIS_GLOW: ::UINT = 0x0010; +pub const LVIS_ACTIVATING: ::UINT = 0x0020; +pub const LVIS_OVERLAYMASK: ::UINT = 0x0F00; +pub const LVIS_STATEIMAGEMASK: ::UINT = 0xF000; +#[inline] #[allow(dead_code)] +pub fn INDEXTOSTATEIMAGEMASK(i: ::UINT) -> ::UINT { i << 12 } +pub const I_INDENTCALLBACK: ::c_int = -1; +pub type LV_ITEMA = LVITEMA; +pub type LV_ITEMW = LVITEMW; +pub const I_GROUPIDCALLBACK: ::c_int = -1; +pub const I_GROUPIDNONE: ::c_int = -2; +STRUCT!{struct LVITEMA { + mask: ::UINT, + iItem: ::c_int, + iSubItem: ::c_int, + state: ::UINT, + stateMask: ::UINT, + pszText: ::LPSTR, + cchTextMax: ::c_int, + iImage: ::c_int, + lParam: ::LPARAM, + iIndent: ::c_int, + iGroupId: ::c_int, + cColumns: ::UINT, + puColumns: ::PUINT, + piColFmt: *mut ::c_int, + iGroup: ::c_int, +}} +pub type LPLVITEMA = *mut LVITEMA; +STRUCT!{struct LVITEMW { + mask: ::UINT, + iItem: ::c_int, + iSubItem: ::c_int, + state: ::UINT, + stateMask: ::UINT, + pszText: ::LPWSTR, + cchTextMax: ::c_int, + iImage: ::c_int, + lParam: ::LPARAM, + iIndent: ::c_int, + iGroupId: ::c_int, + cColumns: ::UINT, + puColumns: ::PUINT, + piColFmt: *mut ::c_int, + iGroup: ::c_int, +}} +pub type LPLVITEMW = *mut LVITEMW; +pub const LPSTR_TEXTCALLBACKW: ::LPWSTR = (0 - 1) as ::LPWSTR; +pub const LPSTR_TEXTCALLBACKA: ::LPSTR = (0 - 1) as ::LPSTR; +pub const I_IMAGECALLBACK: ::c_int = -1; +pub const I_IMAGENONE: ::c_int = -2; +pub const I_COLUMNSCALLBACK: ::UINT = 0 - 1; +pub const LVM_GETITEMA: ::UINT = LVM_FIRST + 5; +pub const LVM_GETITEMW: ::UINT = LVM_FIRST + 75; +pub const LVM_SETITEMA: ::UINT = LVM_FIRST + 6; +pub const LVM_SETITEMW: ::UINT = LVM_FIRST + 76; +pub const LVM_INSERTITEMA: ::UINT = LVM_FIRST + 7; +pub const LVM_INSERTITEMW: ::UINT = LVM_FIRST + 77; +pub const LVM_DELETEITEM: ::UINT = LVM_FIRST + 8; +pub const LVM_DELETEALLITEMS: ::UINT = LVM_FIRST + 9; +pub const LVM_GETCALLBACKMASK: ::UINT = LVM_FIRST + 10; +pub const LVM_SETCALLBACKMASK: ::UINT = LVM_FIRST + 11; +pub const LVM_GETNEXTITEM: ::UINT = LVM_FIRST + 12; +pub const LVNI_ALL: ::LPARAM = 0x0000; +pub const LVNI_FOCUSED: ::LPARAM = 0x0001; +pub const LVNI_SELECTED: ::LPARAM = 0x0002; +pub const LVNI_CUT: ::LPARAM = 0x0004; +pub const LVNI_DROPHILITED: ::LPARAM = 0x0008; +pub const LVNI_STATEMASK: ::LPARAM = LVNI_FOCUSED | LVNI_SELECTED | LVNI_CUT | LVNI_DROPHILITED; +pub const LVNI_VISIBLEORDER: ::LPARAM = 0x0010; +pub const LVNI_PREVIOUS: ::LPARAM = 0x0020; +pub const LVNI_VISIBLEONLY: ::LPARAM = 0x0040; +pub const LVNI_SAMEGROUPONLY: ::LPARAM = 0x0080; +pub const LVNI_ABOVE: ::LPARAM = 0x0100; +pub const LVNI_BELOW: ::LPARAM = 0x0200; +pub const LVNI_TOLEFT: ::LPARAM = 0x0400; +pub const LVNI_TORIGHT: ::LPARAM = 0x0800; +pub const LVNI_DIRECTIONMASK: ::LPARAM = LVNI_ABOVE | LVNI_BELOW | LVNI_TOLEFT | LVNI_TORIGHT; +pub const LVFI_PARAM: ::UINT = 0x0001; +pub const LVFI_STRING: ::UINT = 0x0002; +pub const LVFI_SUBSTRING: ::UINT = 0x0004; +pub const LVFI_PARTIAL: ::UINT = 0x0008; +pub const LVFI_WRAP: ::UINT = 0x0020; +pub const LVFI_NEARESTXY: ::UINT = 0x0040; +pub type LV_FINDINFOA = LVFINDINFOA; +pub type LV_FINDINFOW = LVFINDINFOW; +STRUCT!{struct LVFINDINFOA { + flags: ::UINT, + psz: ::LPCSTR, + lParam: ::LPARAM, + pt: ::POINT, + vkDirection: ::UINT, +}} +pub type LPLVFINDINFOA = *mut LVFINDINFOA; +STRUCT!{struct LVFINDINFOW { + flags: ::UINT, + psz: ::LPCWSTR, + lParam: ::LPARAM, + pt: ::POINT, + vkDirection: ::UINT, +}} +pub type LPLVFINDINFOW = *mut LVFINDINFOW; +pub const LVM_FINDITEMA: ::UINT = LVM_FIRST + 13; +pub const LVM_FINDITEMW: ::UINT = LVM_FIRST + 83; +pub const LVIR_BOUNDS: ::c_int = 0; +pub const LVIR_ICON: ::c_int = 1; +pub const LVIR_LABEL: ::c_int = 2; +pub const LVIR_SELECTBOUNDS: ::c_int = 3; +pub const LVM_GETITEMRECT: ::UINT = LVM_FIRST + 14; +pub const LVM_SETITEMPOSITION: ::UINT = LVM_FIRST + 15; +pub const LVM_GETITEMPOSITION: ::UINT = LVM_FIRST + 16; +pub const LVM_GETSTRINGWIDTHA: ::UINT = LVM_FIRST + 17; +pub const LVM_GETSTRINGWIDTHW: ::UINT = LVM_FIRST + 87; +pub const LVHT_NOWHERE: ::UINT = 0x00000001; +pub const LVHT_ONITEMICON: ::UINT = 0x00000002; +pub const LVHT_ONITEMLABEL: ::UINT = 0x00000004; +pub const LVHT_ONITEMSTATEICON: ::UINT = 0x00000008; +pub const LVHT_ONITEM: ::UINT = LVHT_ONITEMICON | LVHT_ONITEMLABEL | LVHT_ONITEMSTATEICON; +pub const LVHT_ABOVE: ::UINT = 0x00000008; +pub const LVHT_BELOW: ::UINT = 0x00000010; +pub const LVHT_TORIGHT: ::UINT = 0x00000020; +pub const LVHT_TOLEFT: ::UINT = 0x00000040; +pub const LVHT_EX_GROUP_HEADER: ::UINT = 0x10000000; +pub const LVHT_EX_GROUP_FOOTER: ::UINT = 0x20000000; +pub const LVHT_EX_GROUP_COLLAPSE: ::UINT = 0x40000000; +pub const LVHT_EX_GROUP_BACKGROUND: ::UINT = 0x80000000; +pub const LVHT_EX_GROUP_STATEICON: ::UINT = 0x01000000; +pub const LVHT_EX_GROUP_SUBSETLINK: ::UINT = 0x02000000; +pub const LVHT_EX_GROUP: ::UINT = LVHT_EX_GROUP_BACKGROUND | LVHT_EX_GROUP_COLLAPSE + | LVHT_EX_GROUP_FOOTER | LVHT_EX_GROUP_HEADER | LVHT_EX_GROUP_STATEICON + | LVHT_EX_GROUP_SUBSETLINK; +pub const LVHT_EX_ONCONTENTS: ::UINT = 0x04000000; +pub const LVHT_EX_FOOTER: ::UINT = 0x08000000; +pub type LV_HITTESTINFO = LVHITTESTINFO; +STRUCT!{struct LVHITTESTINFO { + pt: ::POINT, + flags: ::UINT, + iItem: ::c_int, + iSubItem: ::c_int, + iGroup: ::c_int, +}} +pub type LPLVHITTESTINFO = *mut LVHITTESTINFO; +pub const LVM_HITTEST: ::UINT = LVM_FIRST + 18; +pub const LVM_ENSUREVISIBLE: ::UINT = LVM_FIRST + 19; +pub const LVM_SCROLL: ::UINT = LVM_FIRST + 20; +pub const LVM_REDRAWITEMS: ::UINT = LVM_FIRST + 21; +pub const LVA_DEFAULT: ::WPARAM = 0x0000; +pub const LVA_ALIGNLEFT: ::WPARAM = 0x0001; +pub const LVA_ALIGNTOP: ::WPARAM = 0x0002; +pub const LVA_SNAPTOGRID: ::WPARAM = 0x0005; +pub const LVM_ARRANGE: ::UINT = LVM_FIRST + 22; +pub const LVM_EDITLABELA: ::UINT = LVM_FIRST + 23; +pub const LVM_EDITLABELW: ::UINT = LVM_FIRST + 118; +pub const LVM_GETEDITCONTROL: ::UINT = LVM_FIRST + 24; +pub type LV_COLUMNA = LVCOLUMNA; +pub type LV_COLUMNW = LVCOLUMNW; +STRUCT!{struct LVCOLUMNA { + mask: ::UINT, + fmt: ::c_int, + cx: ::c_int, + pszText: ::LPSTR, + cchTextMax: ::c_int, + iSubItem: ::c_int, + iImage: ::c_int, + iOrder: ::c_int, + cxMin: ::c_int, + cxDefault: ::c_int, + cxIdeal: ::c_int, +}} +pub type LPLVCOLUMNA = *mut LVCOLUMNA; +STRUCT!{struct LVCOLUMNW { + mask: ::UINT, + fmt: ::c_int, + cx: ::c_int, + pszText: ::LPWSTR, + cchTextMax: ::c_int, + iSubItem: ::c_int, + iImage: ::c_int, + iOrder: ::c_int, + cxMin: ::c_int, + cxDefault: ::c_int, + cxIdeal: ::c_int, +}} +pub type LPLVCOLUMNW = *mut LVCOLUMNW; +pub const LVCF_FMT: ::UINT = 0x0001; +pub const LVCF_WIDTH: ::UINT = 0x0002; +pub const LVCF_TEXT: ::UINT = 0x0004; +pub const LVCF_SUBITEM: ::UINT = 0x0008; +pub const LVCF_IMAGE: ::UINT = 0x0010; +pub const LVCF_ORDER: ::UINT = 0x0020; +pub const LVCF_MINWIDTH: ::UINT = 0x0040; +pub const LVCF_DEFAULTWIDTH: ::UINT = 0x0080; +pub const LVCF_IDEALWIDTH: ::UINT = 0x0100; +pub const LVCFMT_LEFT: ::c_int = 0x0000; +pub const LVCFMT_RIGHT: ::c_int = 0x0001; +pub const LVCFMT_CENTER: ::c_int = 0x0002; +pub const LVCFMT_JUSTIFYMASK: ::c_int = 0x0003; +pub const LVCFMT_IMAGE: ::c_int = 0x0800; +pub const LVCFMT_BITMAP_ON_RIGHT: ::c_int = 0x1000; +pub const LVCFMT_COL_HAS_IMAGES: ::c_int = 0x8000; +pub const LVCFMT_FIXED_WIDTH: ::c_int = 0x00100; +pub const LVCFMT_NO_DPI_SCALE: ::c_int = 0x40000; +pub const LVCFMT_FIXED_RATIO: ::c_int = 0x80000; +pub const LVCFMT_LINE_BREAK: ::c_int = 0x100000; +pub const LVCFMT_FILL: ::c_int = 0x200000; +pub const LVCFMT_WRAP: ::c_int = 0x400000; +pub const LVCFMT_NO_TITLE: ::c_int = 0x800000; +pub const LVCFMT_TILE_PLACEMENTMASK: ::c_int = LVCFMT_LINE_BREAK | LVCFMT_FILL; +pub const LVCFMT_SPLITBUTTON: ::c_int = 0x1000000; +pub const LVM_GETCOLUMNA: ::UINT = LVM_FIRST + 25; +pub const LVM_GETCOLUMNW: ::UINT = LVM_FIRST + 95; +pub const LVM_SETCOLUMNA: ::UINT = LVM_FIRST + 26; +pub const LVM_SETCOLUMNW: ::UINT = LVM_FIRST + 96; +pub const LVM_INSERTCOLUMNA: ::UINT = LVM_FIRST + 27; +pub const LVM_INSERTCOLUMNW: ::UINT = LVM_FIRST + 97; +pub const LVM_DELETECOLUMN: ::UINT = LVM_FIRST + 28; +pub const LVM_GETCOLUMNWIDTH: ::UINT = LVM_FIRST + 29; +pub const LVM_SETCOLUMNWIDTH: ::UINT = LVM_FIRST + 30; +pub const LVM_GETHEADER: ::UINT = LVM_FIRST + 31; +pub const LVM_CREATEDRAGIMAGE: ::UINT = LVM_FIRST + 33; +pub const LVM_GETVIEWRECT: ::UINT = LVM_FIRST + 34; +pub const LVM_GETTEXTCOLOR: ::UINT = LVM_FIRST + 35; +pub const LVM_SETTEXTCOLOR: ::UINT = LVM_FIRST + 36; +pub const LVM_GETTEXTBKCOLOR: ::UINT = LVM_FIRST + 37; +pub const LVM_SETTEXTBKCOLOR: ::UINT = LVM_FIRST + 38; +pub const LVM_GETTOPINDEX: ::UINT = LVM_FIRST + 39; +pub const LVM_GETCOUNTPERPAGE: ::UINT = LVM_FIRST + 40; +pub const LVM_GETORIGIN: ::UINT = LVM_FIRST + 41; +pub const LVM_UPDATE: ::UINT = LVM_FIRST + 42; +pub const LVM_SETITEMSTATE: ::UINT = LVM_FIRST + 43; +pub const LVM_GETITEMSTATE: ::UINT = LVM_FIRST + 44; +pub const LVM_GETITEMTEXTA: ::UINT = LVM_FIRST + 45; +pub const LVM_GETITEMTEXTW: ::UINT = LVM_FIRST + 115; +pub const LVM_SETITEMTEXTA: ::UINT = LVM_FIRST + 46; +pub const LVM_SETITEMTEXTW: ::UINT = LVM_FIRST + 116; +pub const LVM_SETITEMCOUNT: ::UINT = LVM_FIRST + 47; +pub const LVM_SORTITEMS: ::UINT = LVM_FIRST + 48; +pub const LVM_SETITEMPOSITION32: ::UINT = LVM_FIRST + 49; +pub const LVM_GETSELECTEDCOUNT: ::UINT = LVM_FIRST + 50; +pub const LVM_GETITEMSPACING: ::UINT = LVM_FIRST + 51; +pub const LVM_GETISEARCHSTRINGA: ::UINT = LVM_FIRST + 52; +pub const LVM_GETISEARCHSTRINGW: ::UINT = LVM_FIRST + 117; +pub const LVM_SETICONSPACING: ::UINT = LVM_FIRST + 53; +pub const LVM_SETEXTENDEDLISTVIEWSTYLE: ::UINT = LVM_FIRST + 54; +pub const LVM_GETEXTENDEDLISTVIEWSTYLE: ::UINT = LVM_FIRST + 55; +pub const LVSICF_NOINVALIDATEALL: ::LPARAM = 0x00000001; +pub const LVSICF_NOSCROLL: ::LPARAM = 0x00000002; +pub const LVS_EX_GRIDLINES: ::DWORD = 0x00000001; +pub const LVS_EX_SUBITEMIMAGES: ::DWORD = 0x00000002; +pub const LVS_EX_CHECKBOXES: ::DWORD = 0x00000004; +pub const LVS_EX_TRACKSELECT: ::DWORD = 0x00000008; +pub const LVS_EX_HEADERDRAGDROP: ::DWORD = 0x00000010; +pub const LVS_EX_FULLROWSELECT: ::DWORD = 0x00000020; +pub const LVS_EX_ONECLICKACTIVATE: ::DWORD = 0x00000040; +pub const LVS_EX_TWOCLICKACTIVATE: ::DWORD = 0x00000080; +pub const LVS_EX_FLATSB: ::DWORD = 0x00000100; +pub const LVS_EX_REGIONAL: ::DWORD = 0x00000200; +pub const LVS_EX_INFOTIP: ::DWORD = 0x00000400; +pub const LVS_EX_UNDERLINEHOT: ::DWORD = 0x00000800; +pub const LVS_EX_UNDERLINECOLD: ::DWORD = 0x00001000; +pub const LVS_EX_MULTIWORKAREAS: ::DWORD = 0x00002000; +pub const LVS_EX_LABELTIP: ::DWORD = 0x00004000; +pub const LVS_EX_BORDERSELECT: ::DWORD = 0x00008000; +pub const LVS_EX_DOUBLEBUFFER: ::DWORD = 0x00010000; +pub const LVS_EX_HIDELABELS: ::DWORD = 0x00020000; +pub const LVS_EX_SINGLEROW: ::DWORD = 0x00040000; +pub const LVS_EX_SNAPTOGRID: ::DWORD = 0x00080000; +pub const LVS_EX_SIMPLESELECT: ::DWORD = 0x00100000; +pub const LVS_EX_JUSTIFYCOLUMNS: ::DWORD = 0x00200000; +pub const LVS_EX_TRANSPARENTBKGND: ::DWORD = 0x00400000; +pub const LVS_EX_TRANSPARENTSHADOWTEXT: ::DWORD = 0x00800000; +pub const LVS_EX_AUTOAUTOARRANGE: ::DWORD = 0x01000000; +pub const LVS_EX_HEADERINALLVIEWS: ::DWORD = 0x02000000; +pub const LVS_EX_AUTOCHECKSELECT: ::DWORD = 0x08000000; +pub const LVS_EX_AUTOSIZECOLUMNS: ::DWORD = 0x10000000; +pub const LVS_EX_COLUMNSNAPPOINTS: ::DWORD = 0x40000000; +pub const LVS_EX_COLUMNOVERFLOW: ::DWORD = 0x80000000; +pub const LVM_GETSUBITEMRECT: ::UINT = LVM_FIRST + 56; +pub const LVM_SUBITEMHITTEST: ::UINT = LVM_FIRST + 57; +pub const LVM_SETCOLUMNORDERARRAY: ::UINT = LVM_FIRST + 58; +pub const LVM_GETCOLUMNORDERARRAY: ::UINT = LVM_FIRST + 59; +pub const LVM_SETHOTITEM: ::UINT = LVM_FIRST + 60; +pub const LVM_GETHOTITEM: ::UINT = LVM_FIRST + 61; +pub const LVM_SETHOTCURSOR: ::UINT = LVM_FIRST + 62; +pub const LVM_GETHOTCURSOR: ::UINT = LVM_FIRST + 63; +pub const LVM_APPROXIMATEVIEWRECT: ::UINT = LVM_FIRST + 64; +pub const LV_MAX_WORKAREAS: ::WPARAM = 16; +pub const LVM_SETWORKAREAS: ::UINT = LVM_FIRST + 65; +pub const LVM_GETWORKAREAS: ::UINT = LVM_FIRST + 70; +pub const LVM_GETNUMBEROFWORKAREAS: ::UINT = LVM_FIRST + 73; +pub const LVM_GETSELECTIONMARK: ::UINT = LVM_FIRST + 66; +pub const LVM_SETSELECTIONMARK: ::UINT = LVM_FIRST + 67; +pub const LVM_SETHOVERTIME: ::UINT = LVM_FIRST + 71; +pub const LVM_GETHOVERTIME: ::UINT = LVM_FIRST + 72; +pub const LVM_SETTOOLTIPS: ::UINT = LVM_FIRST + 74; +pub const LVM_GETTOOLTIPS: ::UINT = LVM_FIRST + 78; +pub const LVM_SORTITEMSEX: ::UINT = LVM_FIRST + 81; +STRUCT!{struct LVBKIMAGEA { + ulFlags: ::ULONG, + hbm: ::HBITMAP, + pszImage: ::LPSTR, + cchImageMax: ::UINT, + xOffsetPercent: ::c_int, + yOffsetPercent: ::c_int, +}} +pub type LPLVBKIMAGEA = *mut LVBKIMAGEA; +STRUCT!{struct LVBKIMAGEW { + ulFlags: ::ULONG, + hbm: ::HBITMAP, + pszImage: ::LPWSTR, + cchImageMax: ::UINT, + xOffsetPercent: ::c_int, + yOffsetPercent: ::c_int, +}} +pub type LPLVBKIMAGEW = *mut LVBKIMAGEW; +pub const LVBKIF_SOURCE_NONE: ::ULONG = 0x00000000; +pub const LVBKIF_SOURCE_HBITMAP: ::ULONG = 0x00000001; +pub const LVBKIF_SOURCE_URL: ::ULONG = 0x00000002; +pub const LVBKIF_SOURCE_MASK: ::ULONG = 0x00000003; +pub const LVBKIF_STYLE_NORMAL: ::ULONG = 0x00000000; +pub const LVBKIF_STYLE_TILE: ::ULONG = 0x00000010; +pub const LVBKIF_STYLE_MASK: ::ULONG = 0x00000010; +pub const LVBKIF_FLAG_TILEOFFSET: ::ULONG = 0x00000100; +pub const LVBKIF_TYPE_WATERMARK: ::ULONG = 0x10000000; +pub const LVBKIF_FLAG_ALPHABLEND: ::ULONG = 0x20000000; +pub const LVM_SETBKIMAGEA: ::UINT = LVM_FIRST + 68; +pub const LVM_SETBKIMAGEW: ::UINT = LVM_FIRST + 138; +pub const LVM_GETBKIMAGEA: ::UINT = LVM_FIRST + 69; +pub const LVM_GETBKIMAGEW: ::UINT = LVM_FIRST + 139; +pub const LVM_SETSELECTEDCOLUMN: ::UINT = LVM_FIRST + 140; +pub const LV_VIEW_ICON: ::DWORD = 0x0000; +pub const LV_VIEW_DETAILS: ::DWORD = 0x0001; +pub const LV_VIEW_SMALLICON: ::DWORD = 0x0002; +pub const LV_VIEW_LIST: ::DWORD = 0x0003; +pub const LV_VIEW_TILE: ::DWORD = 0x0004; +pub const LV_VIEW_MAX: ::DWORD = 0x0004; +pub const LVM_SETVIEW: ::UINT = LVM_FIRST + 142; +pub const LVM_GETVIEW: ::UINT = LVM_FIRST + 143; +pub const LVGF_NONE: ::UINT = 0x00000000; +pub const LVGF_HEADER: ::UINT = 0x00000001; +pub const LVGF_FOOTER: ::UINT = 0x00000002; +pub const LVGF_STATE: ::UINT = 0x00000004; +pub const LVGF_ALIGN: ::UINT = 0x00000008; +pub const LVGF_GROUPID: ::UINT = 0x00000010; +pub const LVGF_SUBTITLE: ::UINT = 0x00000100; +pub const LVGF_TASK: ::UINT = 0x00000200; +pub const LVGF_DESCRIPTIONTOP: ::UINT = 0x00000400; +pub const LVGF_DESCRIPTIONBOTTOM: ::UINT = 0x00000800; +pub const LVGF_TITLEIMAGE: ::UINT = 0x00001000; +pub const LVGF_EXTENDEDIMAGE: ::UINT = 0x00002000; +pub const LVGF_ITEMS: ::UINT = 0x00004000; +pub const LVGF_SUBSET: ::UINT = 0x00008000; +pub const LVGF_SUBSETITEMS: ::UINT = 0x00010000; +pub const LVGS_NORMAL: ::UINT = 0x00000000; +pub const LVGS_COLLAPSED: ::UINT = 0x00000001; +pub const LVGS_HIDDEN: ::UINT = 0x00000002; +pub const LVGS_NOHEADER: ::UINT = 0x00000004; +pub const LVGS_COLLAPSIBLE: ::UINT = 0x00000008; +pub const LVGS_FOCUSED: ::UINT = 0x00000010; +pub const LVGS_SELECTED: ::UINT = 0x00000020; +pub const LVGS_SUBSETED: ::UINT = 0x00000040; +pub const LVGS_SUBSETLINKFOCUSED: ::UINT = 0x00000080; +pub const LVGA_HEADER_LEFT: ::UINT = 0x00000001; +pub const LVGA_HEADER_CENTER: ::UINT = 0x00000002; +pub const LVGA_HEADER_RIGHT: ::UINT = 0x00000004; +pub const LVGA_FOOTER_LEFT: ::UINT = 0x00000008; +pub const LVGA_FOOTER_CENTER: ::UINT = 0x00000010; +pub const LVGA_FOOTER_RIGHT: ::UINT = 0x00000020; +STRUCT!{struct LVGROUP { + cbSize: ::UINT, + mask: ::UINT, + pszHeader: ::LPWSTR, + cchHeader: ::c_int, + pszFooter: ::LPWSTR, + cchFooter: ::c_int, + iGroupId: ::c_int, + stateMask: ::UINT, + state: ::UINT, + uAlign: ::UINT, + pszSubtitle: ::LPWSTR, + cchSubtitle: ::UINT, + pszTask: ::LPWSTR, + cchTask: ::UINT, + pszDescriptionTop: ::LPWSTR, + cchDescriptionTop: ::UINT, + pszDescriptionBottom: ::LPWSTR, + cchDescriptionBottom: ::UINT, + iTitleImage: ::c_int, + iExtendedImage: ::c_int, + iFirstItem: ::c_int, + cItems: ::UINT, + pszSubsetTitle: ::LPWSTR, + cchSubsetTitle: ::UINT, +}} +pub type PLVGROUP = *mut LVGROUP; +pub const LVM_INSERTGROUP: ::UINT = LVM_FIRST + 145; +pub const LVM_SETGROUPINFO: ::UINT = LVM_FIRST + 147; +pub const LVM_GETGROUPINFO: ::UINT = LVM_FIRST + 149; +pub const LVM_REMOVEGROUP: ::UINT = LVM_FIRST + 150; +pub const LVM_MOVEGROUP: ::UINT = LVM_FIRST + 151; +pub const LVM_GETGROUPCOUNT: ::UINT = LVM_FIRST + 152; +pub const LVM_GETGROUPINFOBYINDEX: ::UINT = LVM_FIRST + 153; +pub const LVM_MOVEITEMTOGROUP: ::UINT = LVM_FIRST + 154; +pub const LVM_GETGROUPRECT: ::UINT = LVM_FIRST + 98; +pub const LVGGR_GROUP: ::LPARAM = 0; +pub const LVGGR_HEADER: ::LPARAM = 1; +pub const LVGGR_LABEL: ::LPARAM = 2; +pub const LVGGR_SUBSETLINK: ::LPARAM = 3; +pub const LVGMF_NONE: ::UINT = 0x00000000; +pub const LVGMF_BORDERSIZE: ::UINT = 0x00000001; +pub const LVGMF_BORDERCOLOR: ::UINT = 0x00000002; +pub const LVGMF_TEXTCOLOR: ::UINT = 0x00000004; +STRUCT!{struct LVGROUPMETRICS { + cbSize: ::UINT, + mask: ::UINT, + Left: ::UINT, + Top: ::UINT, + Right: ::UINT, + Bottom: ::UINT, + crLeft: ::COLORREF, + crTop: ::COLORREF, + crRight: ::COLORREF, + crBottom: ::COLORREF, + crHeader: ::COLORREF, + crFooter: ::COLORREF, +}} +pub type PLVGROUPMETRICS = *mut LVGROUPMETRICS; +pub const LVM_SETGROUPMETRICS: ::UINT = LVM_FIRST + 155; +pub const LVM_GETGROUPMETRICS: ::UINT = LVM_FIRST + 156; +pub const LVM_ENABLEGROUPVIEW: ::UINT = LVM_FIRST + 157; +pub const LVM_SORTGROUPS: ::UINT = LVM_FIRST + 158; +pub type PFNLVGROUPCOMPARE = Option<unsafe extern "system" fn( + ::c_int, ::c_int, *mut ::c_void, +) -> ::c_int>; +STRUCT!{nodebug struct LVINSERTGROUPSORTED { + pfnGroupCompare: PFNLVGROUPCOMPARE, + pvData: *mut ::c_void, + lvGroup: LVGROUP, +}} +pub type PLVINSERTGROUPSORTED = *mut LVINSERTGROUPSORTED; +pub const LVM_INSERTGROUPSORTED: ::UINT = LVM_FIRST + 159; +pub const LVM_REMOVEALLGROUPS: ::UINT = LVM_FIRST + 160; +pub const LVM_HASGROUP: ::UINT = LVM_FIRST + 161; +pub const LVM_GETGROUPSTATE: ::UINT = LVM_FIRST + 92; +pub const LVM_GETFOCUSEDGROUP: ::UINT = LVM_FIRST + 93; +pub const LVTVIF_AUTOSIZE: ::DWORD = 0x00000000; +pub const LVTVIF_FIXEDWIDTH: ::DWORD = 0x00000001; +pub const LVTVIF_FIXEDHEIGHT: ::DWORD = 0x00000002; +pub const LVTVIF_FIXEDSIZE: ::DWORD = 0x00000003; +pub const LVTVIF_EXTENDED: ::DWORD = 0x00000004; +pub const LVTVIM_TILESIZE: ::DWORD = 0x00000001; +pub const LVTVIM_COLUMNS: ::DWORD = 0x00000002; +pub const LVTVIM_LABELMARGIN: ::DWORD = 0x00000004; +STRUCT!{struct LVTILEVIEWINFO { + cbSize: ::UINT, + dwMask: ::DWORD, + dwFlags: ::DWORD, + sizeTile: ::SIZE, + cLines: ::c_int, + rcLabelMargin: ::RECT, +}} +pub type PLVTILEVIEWINFO = *mut LVTILEVIEWINFO; +STRUCT!{struct LVTILEINFO { + cbSize: ::UINT, + iItem: ::c_int, + cColumns: ::UINT, + puColumns: ::PUINT, + piColFmt: *mut ::c_int, +}} +pub type PLVTILEINFO = *mut LVTILEINFO; +pub const LVM_SETTILEVIEWINFO: ::UINT = LVM_FIRST + 162; +pub const LVM_GETTILEVIEWINFO: ::UINT = LVM_FIRST + 163; +pub const LVM_SETTILEINFO: ::UINT = LVM_FIRST + 164; +pub const LVM_GETTILEINFO: ::UINT = LVM_FIRST + 165; +STRUCT!{struct LVINSERTMARK { + cbSize: ::UINT, + dwFlags: ::DWORD, + iItem: ::c_int, + dwReserved: ::DWORD, +}} +pub type LPLVINSERTMARK = *mut LVINSERTMARK; +pub const LVIM_AFTER: ::DWORD = 0x00000001; +pub const LVM_SETINSERTMARK: ::UINT = LVM_FIRST + 166; +pub const LVM_GETINSERTMARK: ::UINT = LVM_FIRST + 167; +pub const LVM_INSERTMARKHITTEST: ::UINT = LVM_FIRST + 168; +pub const LVM_GETINSERTMARKRECT: ::UINT = LVM_FIRST + 169; +pub const LVM_SETINSERTMARKCOLOR: ::UINT = LVM_FIRST + 170; +pub const LVM_GETINSERTMARKCOLOR: ::UINT = LVM_FIRST + 171; +STRUCT!{struct LVSETINFOTIP { + cbSize: ::UINT, + dwFlags: ::DWORD, + pszText: ::LPWSTR, + iItem: ::c_int, + iSubItem: ::c_int, +}} +pub type PLVSETINFOTIP = *mut LVSETINFOTIP; +pub const LVM_SETINFOTIP: ::UINT = LVM_FIRST + 173; +pub const LVM_GETSELECTEDCOLUMN: ::UINT = LVM_FIRST + 174; +pub const LVM_ISGROUPVIEWENABLED: ::UINT = LVM_FIRST + 175; +pub const LVM_GETOUTLINECOLOR: ::UINT = LVM_FIRST + 176; +pub const LVM_SETOUTLINECOLOR: ::UINT = LVM_FIRST + 177; +pub const LVM_CANCELEDITLABEL: ::UINT = LVM_FIRST + 179; +pub const LVM_MAPINDEXTOID: ::UINT = LVM_FIRST + 180; +pub const LVM_MAPIDTOINDEX: ::UINT = LVM_FIRST + 181; +pub const LVM_ISITEMVISIBLE: ::UINT = LVM_FIRST + 182; +pub const LVM_GETEMPTYTEXT: ::UINT = LVM_FIRST + 204; +pub const LVM_GETFOOTERRECT: ::UINT = LVM_FIRST + 205; +pub const LVFF_ITEMCOUNT: ::UINT = 0x00000001; +STRUCT!{struct LVFOOTERINFO { + mask: ::UINT, + pszText: ::LPWSTR, + cchTextMax: ::c_int, + cItems: ::UINT, +}} +pub type LPLVFOOTERINFO = *mut LVFOOTERINFO; +pub const LVM_GETFOOTERINFO: ::UINT = LVM_FIRST + 206; +pub const LVM_GETFOOTERITEMRECT: ::UINT = LVM_FIRST + 207; +pub const LVFIF_TEXT: ::UINT = 0x00000001; +pub const LVFIF_STATE: ::UINT = 0x00000002; +pub const LVFIS_FOCUSED: ::UINT = 0x0001; +STRUCT!{struct LVFOOTERITEM { + mask: ::UINT, + iItem: ::c_int, + pszText: ::LPWSTR, + cchTextMax: ::c_int, + state: ::UINT, + stateMask: ::UINT, +}} +pub type LPLVFOOTERITEM = *mut LVFOOTERITEM; +pub const LVM_GETFOOTERITEM: ::UINT = LVM_FIRST + 208; +STRUCT!{struct LVITEMINDEX { + iItem: ::c_int, + iGroup: ::c_int, +}} +pub type PLVITEMINDEX = *mut LVITEMINDEX; +pub const LVM_GETITEMINDEXRECT: ::UINT = LVM_FIRST + 209; +pub const LVM_SETITEMINDEXSTATE: ::UINT = LVM_FIRST + 210; +pub const LVM_GETNEXTITEMINDEX: ::UINT = LVM_FIRST + 211; +pub type LPNM_LISTVIEW = LPNMLISTVIEW; +pub type NM_LISTVIEW = NMLISTVIEW; +STRUCT!{struct NMLISTVIEW { + hdr: ::NMHDR, + iItem: ::c_int, + iSubItem: ::c_int, + uNewState: ::UINT, + uOldState: ::UINT, + uChanged: ::UINT, + ptAction: ::POINT, + lParam: ::LPARAM, +}} +pub type LPNMLISTVIEW = *mut NMLISTVIEW; +STRUCT!{struct NMITEMACTIVATE { + hdr: ::NMHDR, + iItem: ::c_int, + iSubItem: ::c_int, + uNewState: ::UINT, + uOldState: ::UINT, + uChanged: ::UINT, + ptAction: ::POINT, + lParam: ::LPARAM, + uKeyFlags: ::UINT, +}} +pub type LPNMITEMACTIVATE = *mut NMITEMACTIVATE; +pub const LVKF_ALT: ::UINT = 0x0001; +pub const LVKF_CONTROL: ::UINT = 0x0002; +pub const LVKF_SHIFT: ::UINT = 0x0004; +STRUCT!{struct NMLVCUSTOMDRAW { + nmcd: NMCUSTOMDRAW, + clrText: ::COLORREF, + clrTextBk: ::COLORREF, + iSubItem: ::c_int, + dwItemType: ::DWORD, + clrFace: ::COLORREF, + iIconEffect: ::c_int, + iIconPhase: ::c_int, + iPartId: ::c_int, + iStateId: ::c_int, + rcText: ::RECT, + uAlign: ::UINT, +}} +pub type LPNMLVCUSTOMDRAW = *mut NMLVCUSTOMDRAW; +pub const LVCDI_ITEM: ::DWORD = 0x00000000; +pub const LVCDI_GROUP: ::DWORD = 0x00000001; +pub const LVCDI_ITEMSLIST: ::DWORD = 0x00000002; +pub const LVCDRF_NOSELECT: ::LRESULT = 0x00010000; +pub const LVCDRF_NOGROUPFRAME: ::LRESULT = 0x00020000; +STRUCT!{struct NMLVCACHEHINT { + hdr: ::NMHDR, + iFrom: ::c_int, + iTo: ::c_int, +}} +pub type LPNMLVCACHEHINT = *mut NMLVCACHEHINT; +pub type LPNM_CACHEHINT = LPNMLVCACHEHINT; +pub type PNM_CACHEHINT = LPNMLVCACHEHINT; +pub type NM_CACHEHINT = NMLVCACHEHINT; +STRUCT!{struct NMLVFINDITEMA { + hdr: ::NMHDR, + iStart: ::c_int, + lvfi: LVFINDINFOA, +}} +pub type LPNMLVFINDITEMA = *mut NMLVFINDITEMA; +STRUCT!{struct NMLVFINDITEMW { + hdr: ::NMHDR, + iStart: ::c_int, + lvfi: LVFINDINFOW, +}} +pub type LPNMLVFINDITEMW = *mut NMLVFINDITEMW; +pub type PNM_FINDITEMA = LPNMLVFINDITEMA; +pub type LPNM_FINDITEMA = LPNMLVFINDITEMA; +pub type NM_FINDITEMA = NMLVFINDITEMA; +pub type PNM_FINDITEMW = LPNMLVFINDITEMW; +pub type LPNM_FINDITEMW = LPNMLVFINDITEMW; +pub type NM_FINDITEMW = NMLVFINDITEMW; +STRUCT!{struct NMLVODSTATECHANGE { + hdr: ::NMHDR, + iFrom: ::c_int, + iTo: ::c_int, + uNewState: ::UINT, + uOldState: ::UINT, +}} +pub type LPNMLVODSTATECHANGE = *mut NMLVODSTATECHANGE; +pub type PNM_ODSTATECHANGE = LPNMLVODSTATECHANGE; +pub type LPNM_ODSTATECHANGE = LPNMLVODSTATECHANGE; +pub type NM_ODSTATECHANGE = NMLVODSTATECHANGE; +pub const LVN_ITEMCHANGING: ::UINT = LVN_FIRST - 0; +pub const LVN_ITEMCHANGED: ::UINT = LVN_FIRST - 1; +pub const LVN_INSERTITEM: ::UINT = LVN_FIRST - 2; +pub const LVN_DELETEITEM: ::UINT = LVN_FIRST - 3; +pub const LVN_DELETEALLITEMS: ::UINT = LVN_FIRST - 4; +pub const LVN_BEGINLABELEDITA: ::UINT = LVN_FIRST - 5; +pub const LVN_BEGINLABELEDITW: ::UINT = LVN_FIRST - 75; +pub const LVN_ENDLABELEDITA: ::UINT = LVN_FIRST - 6; +pub const LVN_ENDLABELEDITW: ::UINT = LVN_FIRST - 76; +pub const LVN_COLUMNCLICK: ::UINT = LVN_FIRST - 8; +pub const LVN_BEGINDRAG: ::UINT = LVN_FIRST - 9; +pub const LVN_BEGINRDRAG: ::UINT = LVN_FIRST - 11; +pub const LVN_ODCACHEHINT: ::UINT = LVN_FIRST - 13; +pub const LVN_ODFINDITEMA: ::UINT = LVN_FIRST - 52; +pub const LVN_ODFINDITEMW: ::UINT = LVN_FIRST - 79; +pub const LVN_ITEMACTIVATE: ::UINT = LVN_FIRST - 14; +pub const LVN_ODSTATECHANGED: ::UINT = LVN_FIRST - 15; +pub const LVN_HOTTRACK: ::UINT = LVN_FIRST - 21; +pub const LVN_GETDISPINFOA: ::UINT = LVN_FIRST - 50; +pub const LVN_GETDISPINFOW: ::UINT = LVN_FIRST - 77; +pub const LVN_SETDISPINFOA: ::UINT = LVN_FIRST - 51; +pub const LVN_SETDISPINFOW: ::UINT = LVN_FIRST - 78; +pub const LVIF_DI_SETITEM: ::UINT = 0x1000; +pub type LV_DISPINFOA = NMLVDISPINFOA; +pub type LV_DISPINFOW = NMLVDISPINFOW; +STRUCT!{struct NMLVDISPINFOA { + hdr: ::NMHDR, + item: LVITEMA, +}} +pub type LPNMLVDISPINFOA = *mut NMLVDISPINFOA; +STRUCT!{struct NMLVDISPINFOW { + hdr: ::NMHDR, + item: LVITEMW, +}} +pub type LPNMLVDISPINFOW = *mut NMLVDISPINFOW; +pub const LVN_KEYDOWN: ::UINT = LVN_FIRST - 55; +pub type LV_KEYDOWN = NMLVKEYDOWN; +STRUCT!{struct NMLVKEYDOWN { + hdr: ::NMHDR, + wVKey: ::WORD, + flags: ::UINT, +}} +pub type LPNMLVKEYDOWN = *mut NMLVKEYDOWN; +pub const LVN_MARQUEEBEGIN: ::UINT = LVN_FIRST - 56; +STRUCT!{nodebug struct NMLVLINK { + hdr: ::NMHDR, + link: LITEM, + iItem: ::c_int, + iSubItem: ::c_int, +}} +pub type PNMLVLINK = *mut NMLVLINK; +STRUCT!{struct NMLVGETINFOTIPA { + hdr: ::NMHDR, + dwFlags: ::DWORD, + pszText: ::LPSTR, + cchTextMax: ::c_int, + iItem: ::c_int, + iSubItem: ::c_int, + lParam: ::LPARAM, +}} +pub type LPNMLVGETINFOTIPA = *mut NMLVGETINFOTIPA; +STRUCT!{struct NMLVGETINFOTIPW { + hdr: ::NMHDR, + dwFlags: ::DWORD, + pszText: ::LPWSTR, + cchTextMax: ::c_int, + iItem: ::c_int, + iSubItem: ::c_int, + lParam: ::LPARAM, +}} +pub type LPNMLVGETINFOTIPW = *mut NMLVGETINFOTIPW; +pub const LVGIT_UNFOLDED: ::DWORD = 0x0001; +pub const LVN_GETINFOTIPA: ::UINT = LVN_FIRST - 57; +pub const LVN_GETINFOTIPW: ::UINT = LVN_FIRST - 58; +pub const LVNSCH_DEFAULT: ::LPARAM = -1; +pub const LVNSCH_ERROR: ::LPARAM = -2; +pub const LVNSCH_IGNORE: ::LPARAM = -3; +pub const LVN_INCREMENTALSEARCHA: ::UINT = LVN_FIRST - 62; +pub const LVN_INCREMENTALSEARCHW: ::UINT = LVN_FIRST - 63; +pub const LVN_COLUMNDROPDOWN: ::UINT = LVN_FIRST - 64; +pub const LVN_COLUMNOVERFLOWCLICK: ::UINT = LVN_FIRST - 66; +STRUCT!{struct NMLVSCROLL { + hdr: ::NMHDR, + dx: ::c_int, + dy: ::c_int, +}} +pub type LPNMLVSCROLL = *mut NMLVSCROLL; +pub const LVN_BEGINSCROLL: ::UINT = LVN_FIRST - 80; +pub const LVN_ENDSCROLL: ::UINT = LVN_FIRST - 81; +pub const LVN_LINKCLICK: ::UINT = LVN_FIRST - 84; +pub const EMF_CENTERED: ::DWORD = 0x00000001; +STRUCT!{nodebug struct NMLVEMPTYMARKUP { + hdr: ::NMHDR, + dwFlags: ::DWORD, + szMarkup: [::WCHAR; L_MAX_URL_LENGTH], +}} +pub const LVN_GETEMPTYMARKUP: ::UINT = LVN_FIRST - 87; +pub const TVS_HASBUTTONS: ::DWORD = 0x0001; +pub const TVS_HASLINES: ::DWORD = 0x0002; +pub const TVS_LINESATROOT: ::DWORD = 0x0004; +pub const TVS_EDITLABELS: ::DWORD = 0x0008; +pub const TVS_DISABLEDRAGDROP: ::DWORD = 0x0010; +pub const TVS_SHOWSELALWAYS: ::DWORD = 0x0020; +pub const TVS_RTLREADING: ::DWORD = 0x0040; +pub const TVS_NOTOOLTIPS: ::DWORD = 0x0080; +pub const TVS_CHECKBOXES: ::DWORD = 0x0100; +pub const TVS_TRACKSELECT: ::DWORD = 0x0200; +pub const TVS_SINGLEEXPAND: ::DWORD = 0x0400; +pub const TVS_INFOTIP: ::DWORD = 0x0800; +pub const TVS_FULLROWSELECT: ::DWORD = 0x1000; +pub const TVS_NOSCROLL: ::DWORD = 0x2000; +pub const TVS_NONEVENHEIGHT: ::DWORD = 0x4000; +pub const TVS_NOHSCROLL: ::DWORD = 0x8000; +pub const TVS_EX_NOSINGLECOLLAPSE: ::DWORD = 0x0001; +pub const TVS_EX_MULTISELECT: ::DWORD = 0x0002; +pub const TVS_EX_DOUBLEBUFFER: ::DWORD = 0x0004; +pub const TVS_EX_NOINDENTSTATE: ::DWORD = 0x0008; +pub const TVS_EX_RICHTOOLTIP: ::DWORD = 0x0010; +pub const TVS_EX_AUTOHSCROLL: ::DWORD = 0x0020; +pub const TVS_EX_FADEINOUTEXPANDOS: ::DWORD = 0x0040; +pub const TVS_EX_PARTIALCHECKBOXES: ::DWORD = 0x0080; +pub const TVS_EX_EXCLUSIONCHECKBOXES: ::DWORD = 0x0100; +pub const TVS_EX_DIMMEDCHECKBOXES: ::DWORD = 0x0200; +pub const TVS_EX_DRAWIMAGEASYNC: ::DWORD = 0x0400; +pub enum TREEITEM {} +pub type HTREEITEM = *mut TREEITEM; +pub const TVIF_TEXT: ::UINT = 0x0001; +pub const TVIF_IMAGE: ::UINT = 0x0002; +pub const TVIF_PARAM: ::UINT = 0x0004; +pub const TVIF_STATE: ::UINT = 0x0008; +pub const TVIF_HANDLE: ::UINT = 0x0010; +pub const TVIF_SELECTEDIMAGE: ::UINT = 0x0020; +pub const TVIF_CHILDREN: ::UINT = 0x0040; +pub const TVIF_INTEGRAL: ::UINT = 0x0080; +pub const TVIF_STATEEX: ::UINT = 0x0100; +pub const TVIF_EXPANDEDIMAGE: ::UINT = 0x0200; +pub const TVIS_SELECTED: ::UINT = 0x0002; +pub const TVIS_CUT: ::UINT = 0x0004; +pub const TVIS_DROPHILITED: ::UINT = 0x0008; +pub const TVIS_BOLD: ::UINT = 0x0010; +pub const TVIS_EXPANDED: ::UINT = 0x0020; +pub const TVIS_EXPANDEDONCE: ::UINT = 0x0040; +pub const TVIS_EXPANDPARTIAL: ::UINT = 0x0080; +pub const TVIS_OVERLAYMASK: ::UINT = 0x0F00; +pub const TVIS_STATEIMAGEMASK: ::UINT = 0xF000; +pub const TVIS_USERMASK: ::UINT = 0xF000; +pub const TVIS_EX_FLAT: ::UINT = 0x0001; +pub const TVIS_EX_DISABLED: ::UINT = 0x0002; +pub const TVIS_EX_ALL: ::UINT = 0x0002; +STRUCT!{struct NMTVSTATEIMAGECHANGING { + hdr: ::NMHDR, + hti: HTREEITEM, + iOldStateImageIndex: ::c_int, + iNewStateImageIndex: ::c_int, +}} +pub type LPNMTVSTATEIMAGECHANGING = *mut NMTVSTATEIMAGECHANGING; +pub const I_CHILDRENCALLBACK: ::c_int = -1; +pub const I_CHILDRENAUTO: ::c_int = -2; +pub type LPTV_ITEMW = LPTVITEMW; +pub type LPTV_ITEMA = LPTVITEMA; +pub type TV_ITEMW = TVITEMW; +pub type TV_ITEMA = TVITEMA; +STRUCT!{struct TVITEMA { + mask: ::UINT, + hItem: HTREEITEM, + state: ::UINT, + stateMask: ::UINT, + pszText: ::LPSTR, + cchTextMax: ::c_int, + iImage: ::c_int, + iSelectedImage: ::c_int, + cChildren: ::c_int, + lParam: ::LPARAM, +}} +pub type LPTVITEMA = *mut TVITEMA; +STRUCT!{struct TVITEMW { + mask: ::UINT, + hItem: HTREEITEM, + state: ::UINT, + stateMask: ::UINT, + pszText: ::LPWSTR, + cchTextMax: ::c_int, + iImage: ::c_int, + iSelectedImage: ::c_int, + cChildren: ::c_int, + lParam: ::LPARAM, +}} +pub type LPTVITEMW = *mut TVITEMW; +STRUCT!{struct TVITEMEXA { + mask: ::UINT, + hItem: HTREEITEM, + state: ::UINT, + stateMask: ::UINT, + pszText: ::LPSTR, + cchTextMax: ::c_int, + iImage: ::c_int, + iSelectedImage: ::c_int, + cChildren: ::c_int, + lParam: ::LPARAM, + iIntegral: ::c_int, + uStateEx: ::UINT, + hwnd: ::HWND, + iExpandedImage: ::c_int, + iReserved: ::c_int, +}} +pub type LPTVITEMEXA = *mut TVITEMEXA; +STRUCT!{struct TVITEMEXW { + mask: ::UINT, + hItem: HTREEITEM, + state: ::UINT, + stateMask: ::UINT, + pszText: ::LPWSTR, + cchTextMax: ::c_int, + iImage: ::c_int, + iSelectedImage: ::c_int, + cChildren: ::c_int, + lParam: ::LPARAM, + iIntegral: ::c_int, + uStateEx: ::UINT, + hwnd: ::HWND, + iExpandedImage: ::c_int, + iReserved: ::c_int, +}} +pub type LPTVITEMEXW = *mut TVITEMEXW; +pub const TVI_ROOT: HTREEITEM = (0 - 0x10000) as HTREEITEM; +pub const TVI_FIRST: HTREEITEM = (0 - 0x0FFFF) as HTREEITEM; +pub const TVI_LAST: HTREEITEM = (0 - 0x0FFFE) as HTREEITEM; +pub const TVI_SORT: HTREEITEM = (0 - 0x0FFFD) as HTREEITEM; +pub type LPTV_INSERTSTRUCTA = LPTVINSERTSTRUCTA; +pub type LPTV_INSERTSTRUCTW = LPTVINSERTSTRUCTW; +pub type TV_INSERTSTRUCTA = TVINSERTSTRUCTA; +pub type TV_INSERTSTRUCTW = TVINSERTSTRUCTW; +STRUCT!{struct TVINSERTSTRUCTA { + hParent: HTREEITEM, + hInsertAfter: HTREEITEM, + itemex: TVITEMEXA, +}} +UNION!(TVINSERTSTRUCTA, itemex, item, item_mut, TV_ITEMA); +pub type LPTVINSERTSTRUCTA = *mut TVINSERTSTRUCTA; +STRUCT!{struct TVINSERTSTRUCTW { + hParent: HTREEITEM, + hInsertAfter: HTREEITEM, + itemex: TVITEMEXW, +}} +UNION!(TVINSERTSTRUCTW, itemex, item, item_mut, TV_ITEMW); +pub type LPTVINSERTSTRUCTW = *mut TVINSERTSTRUCTW; +pub const TVM_INSERTITEMA: ::UINT = TV_FIRST + 0; +pub const TVM_INSERTITEMW: ::UINT = TV_FIRST + 50; +pub const TVM_DELETEITEM: ::UINT = TV_FIRST + 1; +pub const TVM_EXPAND: ::UINT = TV_FIRST + 2; +pub const TVM_GETITEMRECT: ::UINT = TV_FIRST + 4; +pub const TVE_COLLAPSE: ::WPARAM = 0x0001; +pub const TVE_EXPAND: ::WPARAM = 0x0002; +pub const TVE_TOGGLE: ::WPARAM = 0x0003; +pub const TVE_EXPANDPARTIAL: ::WPARAM = 0x4000; +pub const TVE_COLLAPSERESET: ::WPARAM = 0x8000; +pub const TVM_GETCOUNT: ::UINT = TV_FIRST + 5; +pub const TVM_GETINDENT: ::UINT = TV_FIRST + 6; +pub const TVM_SETINDENT: ::UINT = TV_FIRST + 7; +pub const TVM_GETIMAGELIST: ::UINT = TV_FIRST + 8; +pub const TVM_SETIMAGELIST: ::UINT = TV_FIRST + 9; +pub const TVM_GETNEXTITEM: ::UINT = TV_FIRST + 10; +pub const TVSIL_NORMAL: ::WPARAM = 0; +pub const TVSIL_STATE: ::WPARAM = 2; +pub const TVGN_ROOT: ::WPARAM = 0x0000; +pub const TVGN_NEXT: ::WPARAM = 0x0001; +pub const TVGN_PREVIOUS: ::WPARAM = 0x0002; +pub const TVGN_PARENT: ::WPARAM = 0x0003; +pub const TVGN_CHILD: ::WPARAM = 0x0004; +pub const TVGN_FIRSTVISIBLE: ::WPARAM = 0x0005; +pub const TVGN_NEXTVISIBLE: ::WPARAM = 0x0006; +pub const TVGN_PREVIOUSVISIBLE: ::WPARAM = 0x0007; +pub const TVGN_DROPHILITE: ::WPARAM = 0x0008; +pub const TVGN_CARET: ::WPARAM = 0x0009; +pub const TVGN_LASTVISIBLE: ::WPARAM = 0x000A; +pub const TVGN_NEXTSELECTED: ::WPARAM = 0x000B; +pub const TVSI_NOSINGLEEXPAND: ::WPARAM = 0x8000; +pub const TVM_SELECTITEM: ::UINT = TV_FIRST + 11; +pub const TVM_GETITEMA: ::UINT = TV_FIRST + 12; +pub const TVM_GETITEMW: ::UINT = TV_FIRST + 62; +pub const TVM_SETITEMA: ::UINT = TV_FIRST + 13; +pub const TVM_SETITEMW: ::UINT = TV_FIRST + 63; +pub const TVM_EDITLABELA: ::UINT = TV_FIRST + 14; +pub const TVM_EDITLABELW: ::UINT = TV_FIRST + 65; +pub const TVM_GETEDITCONTROL: ::UINT = TV_FIRST + 15; +pub const TVM_GETVISIBLECOUNT: ::UINT = TV_FIRST + 16; +pub const TVM_HITTEST: ::UINT = TV_FIRST + 17; +pub type LPTV_HITTESTINFO = LPTVHITTESTINFO; +pub type TV_HITTESTINFO = TVHITTESTINFO; +STRUCT!{struct TVHITTESTINFO { + pt: ::POINT, + flags: ::UINT, + hItem: HTREEITEM, +}} +pub type LPTVHITTESTINFO = *mut TVHITTESTINFO; +pub const TVHT_NOWHERE: ::UINT = 0x0001; +pub const TVHT_ONITEMICON: ::UINT = 0x0002; +pub const TVHT_ONITEMLABEL: ::UINT = 0x0004; +pub const TVHT_ONITEM: ::UINT = TVHT_ONITEMICON | TVHT_ONITEMLABEL | TVHT_ONITEMSTATEICON; +pub const TVHT_ONITEMINDENT: ::UINT = 0x0008; +pub const TVHT_ONITEMBUTTON: ::UINT = 0x0010; +pub const TVHT_ONITEMRIGHT: ::UINT = 0x0020; +pub const TVHT_ONITEMSTATEICON: ::UINT = 0x0040; +pub const TVHT_ABOVE: ::UINT = 0x0100; +pub const TVHT_BELOW: ::UINT = 0x0200; +pub const TVHT_TORIGHT: ::UINT = 0x0400; +pub const TVHT_TOLEFT: ::UINT = 0x0800; +pub const TVM_CREATEDRAGIMAGE: ::UINT = TV_FIRST + 18; +pub const TVM_SORTCHILDREN: ::UINT = TV_FIRST + 19; +pub const TVM_ENSUREVISIBLE: ::UINT = TV_FIRST + 20; +pub const TVM_SORTCHILDRENCB: ::UINT = TV_FIRST + 21; +pub const TVM_ENDEDITLABELNOW: ::UINT = TV_FIRST + 22; +pub const TVM_GETISEARCHSTRINGA: ::UINT = TV_FIRST + 23; +pub const TVM_GETISEARCHSTRINGW: ::UINT = TV_FIRST + 64; +pub const TVM_SETTOOLTIPS: ::UINT = TV_FIRST + 24; +pub const TVM_GETTOOLTIPS: ::UINT = TV_FIRST + 25; +pub const TVM_SETINSERTMARK: ::UINT = TV_FIRST + 26; +pub const TVM_SETUNICODEFORMAT: ::UINT = CCM_SETUNICODEFORMAT; +pub const TVM_GETUNICODEFORMAT: ::UINT = CCM_GETUNICODEFORMAT; +pub const TVM_SETITEMHEIGHT: ::UINT = TV_FIRST + 27; +pub const TVM_GETITEMHEIGHT: ::UINT = TV_FIRST + 28; +pub const TVM_SETBKCOLOR: ::UINT = TV_FIRST + 29; +pub const TVM_SETTEXTCOLOR: ::UINT = TV_FIRST + 30; +pub const TVM_GETBKCOLOR: ::UINT = TV_FIRST + 31; +pub const TVM_GETTEXTCOLOR: ::UINT = TV_FIRST + 32; +pub const TVM_SETSCROLLTIME: ::UINT = TV_FIRST + 33; +pub const TVM_GETSCROLLTIME: ::UINT = TV_FIRST + 34; +pub const TVM_SETINSERTMARKCOLOR: ::UINT = TV_FIRST + 37; +pub const TVM_GETINSERTMARKCOLOR: ::UINT = TV_FIRST + 38; +pub const TVM_SETBORDER: ::UINT = TV_FIRST + 35; +pub const TVSBF_XBORDER: ::WPARAM = 0x00000001; +pub const TVSBF_YBORDER: ::WPARAM = 0x00000002; +pub const TVM_GETITEMSTATE: ::UINT = TV_FIRST + 39; +pub const TVM_SETLINECOLOR: ::UINT = TV_FIRST + 40; +pub const TVM_GETLINECOLOR: ::UINT = TV_FIRST + 41; +pub const TVM_MAPACCIDTOHTREEITEM: ::UINT = TV_FIRST + 42; +pub const TVM_MAPHTREEITEMTOACCID: ::UINT = TV_FIRST + 43; +pub const TVM_SETEXTENDEDSTYLE: ::UINT = TV_FIRST + 44; +pub const TVM_GETEXTENDEDSTYLE: ::UINT = TV_FIRST + 45; +pub const TVM_SETAUTOSCROLLINFO: ::UINT = TV_FIRST + 59; +pub const TVM_SETHOT: ::UINT = TV_FIRST + 58; +pub const TVM_GETSELECTEDCOUNT: ::UINT = TV_FIRST + 70; +pub const TVM_SHOWINFOTIP: ::UINT = TV_FIRST + 71; +ENUM!{enum TVITEMPART { + TVGIPR_BUTTON = 0x0001, +}} +STRUCT!{struct TVGETITEMPARTRECTINFO { + hti: HTREEITEM, + prc: *mut ::RECT, + partID: TVITEMPART, +}} +pub const TVM_GETITEMPARTRECT: ::UINT = TV_FIRST + 72; +pub type PFNTVCOMPARE = Option<unsafe extern "system" fn( + lParam1: ::LPARAM, lParam2: ::LPARAM, lParamSort: ::LPARAM, +) -> ::c_int>; +pub type LPTV_SORTCB = LPTVSORTCB; +pub type TV_SORTCB = TVSORTCB; +STRUCT!{nodebug struct TVSORTCB { + hParent: HTREEITEM, + lpfnCompare: PFNTVCOMPARE, + lParam: ::LPARAM, +}} +pub type LPTVSORTCB = *mut TVSORTCB; +pub type LPNM_TREEVIEWA = LPNMTREEVIEWA; +pub type LPNM_TREEVIEWW = LPNMTREEVIEWW; +pub type NM_TREEVIEWA = NMTREEVIEWA; +pub type NM_TREEVIEWW = NMTREEVIEWW; +STRUCT!{struct NMTREEVIEWA { + hdr: ::NMHDR, + action: ::UINT, + itemOld: TVITEMA, + itemNew: TVITEMA, + ptDrag: ::POINT, +}} +pub type LPNMTREEVIEWA = *mut NMTREEVIEWA; +STRUCT!{struct NMTREEVIEWW { + hdr: ::NMHDR, + action: ::UINT, + itemOld: TVITEMW, + itemNew: TVITEMW, + ptDrag: ::POINT, +}} +pub type LPNMTREEVIEWW = *mut NMTREEVIEWW; +pub const TVN_SELCHANGINGA: ::UINT = TVN_FIRST - 1; +pub const TVN_SELCHANGINGW: ::UINT = TVN_FIRST - 50; +pub const TVN_SELCHANGEDA: ::UINT = TVN_FIRST - 2; +pub const TVN_SELCHANGEDW: ::UINT = TVN_FIRST - 51; +pub const TVN_GETDISPINFOA: ::UINT = TVN_FIRST - 3; +pub const TVN_GETDISPINFOW: ::UINT = TVN_FIRST - 52; +pub const TVN_SETDISPINFOA: ::UINT = TVN_FIRST - 4; +pub const TVN_SETDISPINFOW: ::UINT = TVN_FIRST - 53; +pub const TVC_UNKNOWN: ::LPARAM = 0x0000; +pub const TVC_BYMOUSE: ::LPARAM = 0x0001; +pub const TVC_BYKEYBOARD: ::LPARAM = 0x0002; +pub const TVIF_DI_SETITEM: ::UINT = 0x1000; +pub type TV_DISPINFOA = NMTVDISPINFOA; +pub type TV_DISPINFOW = NMTVDISPINFOW; +STRUCT!{struct NMTVDISPINFOA { + hdr: ::NMHDR, + item: TVITEMA, +}} +pub type LPNMTVDISPINFOA = *mut NMTVDISPINFOA; +STRUCT!{struct NMTVDISPINFOW { + hdr: ::NMHDR, + item: TVITEMW, +}} +pub type LPNMTVDISPINFOW = *mut NMTVDISPINFOW; +STRUCT!{struct NMTVDISPINFOEXA { + hdr: ::NMHDR, + item: TVITEMEXA, +}} +pub type LPNMTVDISPINFOEXA = *mut NMTVDISPINFOEXA; +STRUCT!{struct NMTVDISPINFOEXW { + hdr: ::NMHDR, + item: TVITEMEXW, +}} +pub type LPNMTVDISPINFOEXW = *mut NMTVDISPINFOEXW; +pub type TV_DISPINFOEXA = NMTVDISPINFOEXA; +pub type TV_DISPINFOEXW = NMTVDISPINFOEXW; +pub const TVN_ITEMEXPANDINGA: ::UINT = TVN_FIRST - 5; +pub const TVN_ITEMEXPANDINGW: ::UINT = TVN_FIRST - 54; +pub const TVN_ITEMEXPANDEDA: ::UINT = TVN_FIRST - 6; +pub const TVN_ITEMEXPANDEDW: ::UINT = TVN_FIRST - 55; +pub const TVN_BEGINDRAGA: ::UINT = TVN_FIRST - 7; +pub const TVN_BEGINDRAGW: ::UINT = TVN_FIRST - 56; +pub const TVN_BEGINRDRAGA: ::UINT = TVN_FIRST - 8; +pub const TVN_BEGINRDRAGW: ::UINT = TVN_FIRST - 57; +pub const TVN_DELETEITEMA: ::UINT = TVN_FIRST - 9; +pub const TVN_DELETEITEMW: ::UINT = TVN_FIRST - 58; +pub const TVN_BEGINLABELEDITA: ::UINT = TVN_FIRST - 10; +pub const TVN_BEGINLABELEDITW: ::UINT = TVN_FIRST - 59; +pub const TVN_ENDLABELEDITA: ::UINT = TVN_FIRST - 11; +pub const TVN_ENDLABELEDITW: ::UINT = TVN_FIRST - 60; +pub const TVN_KEYDOWN: ::UINT = TVN_FIRST - 12; +pub const TVN_GETINFOTIPA: ::UINT = TVN_FIRST - 13; +pub const TVN_GETINFOTIPW: ::UINT = TVN_FIRST - 14; +pub const TVN_SINGLEEXPAND: ::UINT = TVN_FIRST - 15; +pub const TVN_ITEMCHANGINGA: ::UINT = TVN_FIRST - 16; +pub const TVN_ITEMCHANGINGW: ::UINT = TVN_FIRST - 17; +pub const TVN_ITEMCHANGEDA: ::UINT = TVN_FIRST - 18; +pub const TVN_ITEMCHANGEDW: ::UINT = TVN_FIRST - 19; +pub const TVN_ASYNCDRAW: ::UINT = TVN_FIRST - 20; +pub const TVNRET_DEFAULT: ::LRESULT = 0; +pub const TVNRET_SKIPOLD: ::LRESULT = 1; +pub const TVNRET_SKIPNEW: ::LRESULT = 2; +pub type TV_KEYDOWN = NMTVKEYDOWN; +STRUCT!{struct NMTVKEYDOWN { + hdr: ::NMHDR, + wVKey: ::WORD, + flags: ::UINT, +}} +pub type LPNMTVKEYDOWN = *mut NMTVKEYDOWN; +STRUCT!{struct NMTVCUSTOMDRAW { + nmcd: NMCUSTOMDRAW, + clrText: ::COLORREF, + clrTextBk: ::COLORREF, + iLevel: ::c_int, +}} +pub type LPNMTVCUSTOMDRAW = *mut NMTVCUSTOMDRAW; +STRUCT!{struct NMTVGETINFOTIPA { + hdr: ::NMHDR, + pszText: ::LPSTR, + cchTextMax: ::c_int, + hItem: HTREEITEM, + lParam: ::LPARAM, +}} +pub type LPNMTVGETINFOTIPA = *mut NMTVGETINFOTIPA; +STRUCT!{struct NMTVGETINFOTIPW { + hdr: ::NMHDR, + pszText: ::LPWSTR, + cchTextMax: ::c_int, + hItem: HTREEITEM, + lParam: ::LPARAM, +}} +pub type LPNMTVGETINFOTIPW = *mut NMTVGETINFOTIPW; +pub const TVCDRF_NOIMAGES: ::LRESULT = 0x00010000; +STRUCT!{struct NMTVITEMCHANGE { + hdr: ::NMHDR, + uChanged: ::UINT, + hItem: HTREEITEM, + uStateNew: ::UINT, + uStateOld: ::UINT, + lParam: ::LPARAM, +}} +STRUCT!{struct NMTVASYNCDRAW { + hdr: ::NMHDR, + pimldp: *mut IMAGELISTDRAWPARAMS, + hr: ::HRESULT, + hItem: HTREEITEM, + lParam: ::LPARAM, + dwRetFlags: ::DWORD, + iRetImageIndex: ::c_int, +}} +pub const CBEIF_TEXT: ::UINT = 0x00000001; +pub const CBEIF_IMAGE: ::UINT = 0x00000002; +pub const CBEIF_SELECTEDIMAGE: ::UINT = 0x00000004; +pub const CBEIF_OVERLAY: ::UINT = 0x00000008; +pub const CBEIF_INDENT: ::UINT = 0x00000010; +pub const CBEIF_LPARAM: ::UINT = 0x00000020; +pub const CBEIF_DI_SETITEM: ::UINT = 0x10000000; +STRUCT!{struct COMBOBOXEXITEMA { + mask: ::UINT, + iItem: ::INT_PTR, + pszText: ::LPSTR, + cchTextMax: ::c_int, + iImage: ::c_int, + iSelectedImage: ::c_int, + iOverlay: ::c_int, + iIndent: ::c_int, + lParam: ::LPARAM, +}} +pub type PCOMBOBOXEXITEMA = *mut COMBOBOXEXITEMA; +pub type PCCOMBOBOXEXITEMA = *const COMBOBOXEXITEMA; +STRUCT!{struct COMBOBOXEXITEMW { + mask: ::UINT, + iItem: ::INT_PTR, + pszText: ::LPWSTR, + cchTextMax: ::c_int, + iImage: ::c_int, + iSelectedImage: ::c_int, + iOverlay: ::c_int, + iIndent: ::c_int, + lParam: ::LPARAM, +}} +pub type PCOMBOBOXEXITEMW = *mut COMBOBOXEXITEMW; +pub type PCCOMBOBOXEXITEMW = *const COMBOBOXEXITEMW; +pub const CBEM_INSERTITEMA: ::UINT = ::WM_USER + 1; +pub const CBEM_SETIMAGELIST: ::UINT = ::WM_USER + 2; +pub const CBEM_GETIMAGELIST: ::UINT = ::WM_USER + 3; +pub const CBEM_GETITEMA: ::UINT = ::WM_USER + 4; +pub const CBEM_SETITEMA: ::UINT = ::WM_USER + 5; +pub const CBEM_DELETEITEM: ::UINT = ::CB_DELETESTRING; +pub const CBEM_GETCOMBOCONTROL: ::UINT = ::WM_USER + 6; +pub const CBEM_GETEDITCONTROL: ::UINT = ::WM_USER + 7; +pub const CBEM_SETEXSTYLE: ::UINT = ::WM_USER + 8; +pub const CBEM_SETEXTENDEDSTYLE: ::UINT = ::WM_USER + 14; +pub const CBEM_GETEXSTYLE: ::UINT = ::WM_USER + 9; +pub const CBEM_GETEXTENDEDSTYLE: ::UINT = ::WM_USER + 9; +pub const CBEM_SETUNICODEFORMAT: ::UINT = CCM_SETUNICODEFORMAT; +pub const CBEM_GETUNICODEFORMAT: ::UINT = CCM_GETUNICODEFORMAT; +pub const CBEM_HASEDITCHANGED: ::UINT = ::WM_USER + 10; +pub const CBEM_INSERTITEMW: ::UINT = ::WM_USER + 11; +pub const CBEM_SETITEMW: ::UINT = ::WM_USER + 12; +pub const CBEM_GETITEMW: ::UINT = ::WM_USER + 13; +pub const CBEM_SETWINDOWTHEME: ::UINT = CCM_SETWINDOWTHEME; +pub const CBES_EX_NOEDITIMAGE: ::DWORD = 0x00000001; +pub const CBES_EX_NOEDITIMAGEINDENT: ::DWORD = 0x00000002; +pub const CBES_EX_PATHWORDBREAKPROC: ::DWORD = 0x00000004; +pub const CBES_EX_NOSIZELIMIT: ::DWORD = 0x00000008; +pub const CBES_EX_CASESENSITIVE: ::DWORD = 0x00000010; +pub const CBES_EX_TEXTENDELLIPSIS: ::DWORD = 0x00000020; +STRUCT!{struct NMCOMBOBOXEXA { + hdr: ::NMHDR, + ceItem: COMBOBOXEXITEMA, +}} +pub type PNMCOMBOBOXEXA = *mut NMCOMBOBOXEXA; +STRUCT!{struct NMCOMBOBOXEXW { + hdr: ::NMHDR, + ceItem: COMBOBOXEXITEMW, +}} +pub type PNMCOMBOBOXEXW = *mut NMCOMBOBOXEXW; +pub const CBEN_GETDISPINFOA: ::UINT = CBEN_FIRST - 0; +pub const CBEN_INSERTITEM: ::UINT = CBEN_FIRST - 1; +pub const CBEN_DELETEITEM: ::UINT = CBEN_FIRST - 2; +pub const CBEN_BEGINEDIT: ::UINT = CBEN_FIRST - 4; +pub const CBEN_ENDEDITA: ::UINT = CBEN_FIRST - 5; +pub const CBEN_ENDEDITW: ::UINT = CBEN_FIRST - 6; +pub const CBEN_GETDISPINFOW: ::UINT = CBEN_FIRST - 7; +pub const CBEN_DRAGBEGINA: ::UINT = CBEN_FIRST - 8; +pub const CBEN_DRAGBEGINW: ::UINT = CBEN_FIRST - 9; +pub const CBENF_KILLFOCUS: ::c_int = 1; +pub const CBENF_RETURN: ::c_int = 2; +pub const CBENF_ESCAPE: ::c_int = 3; +pub const CBENF_DROPDOWN: ::c_int = 4; +pub const CBEMAXSTRLEN: usize = 260; +STRUCT!{nodebug struct NMCBEDRAGBEGINW { + hdr: ::NMHDR, + iItemid: ::c_int, + szText: [::WCHAR; CBEMAXSTRLEN], +}} +pub type PNMCBEDRAGBEGINW = *mut NMCBEDRAGBEGINW; +pub type LPNMCBEDRAGBEGINW = *mut NMCBEDRAGBEGINW; +STRUCT!{nodebug struct NMCBEDRAGBEGINA { + hdr: ::NMHDR, + iItemid: ::c_int, + szText: [::c_char; CBEMAXSTRLEN], +}} +pub type PNMCBEDRAGBEGINA = *mut NMCBEDRAGBEGINA; +pub type LPNMCBEDRAGBEGINA = *mut NMCBEDRAGBEGINA; +STRUCT!{nodebug struct NMCBEENDEDITW { + hdr: ::NMHDR, + fChanged: ::BOOL, + iNewSelection: ::c_int, + szText: [::WCHAR; CBEMAXSTRLEN], + iWhy: ::c_int, +}} +pub type PNMCBEENDEDITW = *mut NMCBEENDEDITW; +pub type LPNMCBEENDEDITW = *mut NMCBEENDEDITW; +STRUCT!{nodebug struct NMCBEENDEDITA { + hdr: ::NMHDR, + fChanged: ::BOOL, + iNewSelection: ::c_int, + szText: [::c_char; CBEMAXSTRLEN], + iWhy: ::c_int, +}} +pub type PNMCBEENDEDITA = *mut NMCBEENDEDITA; +pub type LPNMCBEENDEDITA = *mut NMCBEENDEDITA; +pub const TCS_SCROLLOPPOSITE: ::DWORD = 0x0001; +pub const TCS_BOTTOM: ::DWORD = 0x0002; +pub const TCS_RIGHT: ::DWORD = 0x0002; +pub const TCS_MULTISELECT: ::DWORD = 0x0004; +pub const TCS_FLATBUTTONS: ::DWORD = 0x0008; +pub const TCS_FORCEICONLEFT: ::DWORD = 0x0010; +pub const TCS_FORCELABELLEFT: ::DWORD = 0x0020; +pub const TCS_HOTTRACK: ::DWORD = 0x0040; +pub const TCS_VERTICAL: ::DWORD = 0x0080; +pub const TCS_TABS: ::DWORD = 0x0000; +pub const TCS_BUTTONS: ::DWORD = 0x0100; +pub const TCS_SINGLELINE: ::DWORD = 0x0000; +pub const TCS_MULTILINE: ::DWORD = 0x0200; +pub const TCS_RIGHTJUSTIFY: ::DWORD = 0x0000; +pub const TCS_FIXEDWIDTH: ::DWORD = 0x0400; +pub const TCS_RAGGEDRIGHT: ::DWORD = 0x0800; +pub const TCS_FOCUSONBUTTONDOWN: ::DWORD = 0x1000; +pub const TCS_OWNERDRAWFIXED: ::DWORD = 0x2000; +pub const TCS_TOOLTIPS: ::DWORD = 0x4000; +pub const TCS_FOCUSNEVER: ::DWORD = 0x8000; +pub const TCS_EX_FLATSEPARATORS: ::DWORD = 0x00000001; +pub const TCS_EX_REGISTERDROP: ::DWORD = 0x00000002; +pub const TCM_GETIMAGELIST: ::UINT = TCM_FIRST + 2; +pub const TCM_SETIMAGELIST: ::UINT = TCM_FIRST + 3; +pub const TCM_GETITEMCOUNT: ::UINT = TCM_FIRST + 4; +pub const TCIF_TEXT: ::UINT = 0x0001; +pub const TCIF_IMAGE: ::UINT = 0x0002; +pub const TCIF_RTLREADING: ::UINT = 0x0004; +pub const TCIF_PARAM: ::UINT = 0x0008; +pub const TCIF_STATE: ::UINT = 0x0010; +pub const TCIS_BUTTONPRESSED: ::DWORD = 0x0001; +pub const TCIS_HIGHLIGHTED: ::DWORD = 0x0002; +pub type TC_ITEMHEADERA = TCITEMHEADERA; +pub type TC_ITEMHEADERW = TCITEMHEADERW; +STRUCT!{struct TCITEMHEADERA { + mask: ::UINT, + lpReserved1: ::UINT, + lpReserved2: ::UINT, + pszText: ::LPSTR, + cchTextMax: ::c_int, + iImage: ::c_int, +}} +pub type LPTCITEMHEADERA = *mut TCITEMHEADERA; +STRUCT!{struct TCITEMHEADERW { + mask: ::UINT, + lpReserved1: ::UINT, + lpReserved2: ::UINT, + pszText: ::LPWSTR, + cchTextMax: ::c_int, + iImage: ::c_int, +}} +pub type LPTCITEMHEADERW = *mut TCITEMHEADERW; +pub type TC_ITEMA = TCITEMA; +pub type TC_ITEMW = TCITEMW; +STRUCT!{struct TCITEMA { + mask: ::UINT, + dwState: ::DWORD, + dwStateMask: ::DWORD, + pszText: ::LPSTR, + cchTextMax: ::c_int, + iImage: ::c_int, + lParam: ::LPARAM, +}} +pub type LPTCITEMA = *mut TCITEMA; +STRUCT!{struct TCITEMW { + mask: ::UINT, + dwState: ::DWORD, + dwStateMask: ::DWORD, + pszText: ::LPWSTR, + cchTextMax: ::c_int, + iImage: ::c_int, + lParam: ::LPARAM, +}} +pub type LPTCITEMW = *mut TCITEMW; +pub const TCM_GETITEMA: ::UINT = TCM_FIRST + 5; +pub const TCM_GETITEMW: ::UINT = TCM_FIRST + 60; +pub const TCM_SETITEMA: ::UINT = TCM_FIRST + 6; +pub const TCM_SETITEMW: ::UINT = TCM_FIRST + 61; +pub const TCM_INSERTITEMA: ::UINT = TCM_FIRST + 7; +pub const TCM_INSERTITEMW: ::UINT = TCM_FIRST + 62; +pub const TCM_DELETEITEM: ::UINT = TCM_FIRST + 8; +pub const TCM_DELETEALLITEMS: ::UINT = TCM_FIRST + 9; +pub const TCM_GETITEMRECT: ::UINT = TCM_FIRST + 10; +pub const TCM_GETCURSEL: ::UINT = TCM_FIRST + 11; +pub const TCM_SETCURSEL: ::UINT = TCM_FIRST + 12; +pub const TCHT_NOWHERE: ::UINT = 0x0001; +pub const TCHT_ONITEMICON: ::UINT = 0x0002; +pub const TCHT_ONITEMLABEL: ::UINT = 0x0004; +pub const TCHT_ONITEM: ::UINT = TCHT_ONITEMICON | TCHT_ONITEMLABEL; +pub type LPTC_HITTESTINFO = LPTCHITTESTINFO; +pub type TC_HITTESTINFO = TCHITTESTINFO; +STRUCT!{struct TCHITTESTINFO { + pt: ::POINT, + flags: ::UINT, +}} +pub type LPTCHITTESTINFO = *mut TCHITTESTINFO; +pub const TCM_HITTEST: ::UINT = TCM_FIRST + 13; +pub const TCM_SETITEMEXTRA: ::UINT = TCM_FIRST + 14; +pub const TCM_ADJUSTRECT: ::UINT = TCM_FIRST + 40; +pub const TCM_SETITEMSIZE: ::UINT = TCM_FIRST + 41; +pub const TCM_REMOVEIMAGE: ::UINT = TCM_FIRST + 42; +pub const TCM_SETPADDING: ::UINT = TCM_FIRST + 43; +pub const TCM_GETROWCOUNT: ::UINT = TCM_FIRST + 44; +pub const TCM_GETTOOLTIPS: ::UINT = TCM_FIRST + 45; +pub const TCM_SETTOOLTIPS: ::UINT = TCM_FIRST + 46; +pub const TCM_GETCURFOCUS: ::UINT = TCM_FIRST + 47; +pub const TCM_SETCURFOCUS: ::UINT = TCM_FIRST + 48; +pub const TCM_SETMINTABWIDTH: ::UINT = TCM_FIRST + 49; +pub const TCM_DESELECTALL: ::UINT = TCM_FIRST + 50; +pub const TCM_HIGHLIGHTITEM: ::UINT = TCM_FIRST + 51; +pub const TCM_SETEXTENDEDSTYLE: ::UINT = TCM_FIRST + 52; +pub const TCM_GETEXTENDEDSTYLE: ::UINT = TCM_FIRST + 53; +pub const TCM_SETUNICODEFORMAT: ::UINT = CCM_SETUNICODEFORMAT; +pub const TCM_GETUNICODEFORMAT: ::UINT = CCM_GETUNICODEFORMAT; +pub const TCN_KEYDOWN: ::UINT = TCN_FIRST - 0; +pub type TC_KEYDOWN = NMTCKEYDOWN; +STRUCT!{struct NMTCKEYDOWN { + hdr: ::NMHDR, + wVKey: ::WORD, + flags: ::UINT, +}} +pub const TCN_SELCHANGE: ::UINT = TCN_FIRST - 1; +pub const TCN_SELCHANGING: ::UINT = TCN_FIRST - 2; +pub const TCN_GETOBJECT: ::UINT = TCN_FIRST - 3; +pub const TCN_FOCUSCHANGE: ::UINT = TCN_FIRST - 4; +pub const ACS_CENTER: ::DWORD = 0x0001; +pub const ACS_TRANSPARENT: ::DWORD = 0x0002; +pub const ACS_AUTOPLAY: ::DWORD = 0x0004; +pub const ACS_TIMER: ::DWORD = 0x0008; +pub const ACM_OPENA: ::UINT = ::WM_USER + 100; +pub const ACM_OPENW: ::UINT = ::WM_USER + 103; +pub const ACM_PLAY: ::UINT = ::WM_USER + 101; +pub const ACM_STOP: ::UINT = ::WM_USER + 102; +pub const ACM_ISPLAYING: ::UINT = ::WM_USER + 104; +pub const ACN_START: ::WPARAM = 1; +pub const ACN_STOP: ::WPARAM = 2; +pub type MONTHDAYSTATE = ::DWORD; +pub type LPMONTHDAYSTATE = *mut ::DWORD; +pub const MCM_FIRST: ::UINT = 0x1000; +pub const MCM_GETCURSEL: ::UINT = MCM_FIRST + 1; +pub const MCM_SETCURSEL: ::UINT = MCM_FIRST + 2; +pub const MCM_GETMAXSELCOUNT: ::UINT = MCM_FIRST + 3; +pub const MCM_SETMAXSELCOUNT: ::UINT = MCM_FIRST + 4; +pub const MCM_GETSELRANGE: ::UINT = MCM_FIRST + 5; +pub const MCM_SETSELRANGE: ::UINT = MCM_FIRST + 6; +pub const MCM_GETMONTHRANGE: ::UINT = MCM_FIRST + 7; +pub const MCM_SETDAYSTATE: ::UINT = MCM_FIRST + 8; +pub const MCM_GETMINREQRECT: ::UINT = MCM_FIRST + 9; +pub const MCM_SETCOLOR: ::UINT = MCM_FIRST + 10; +pub const MCM_GETCOLOR: ::UINT = MCM_FIRST + 11; +pub const MCM_SETTODAY: ::UINT = MCM_FIRST + 12; +pub const MCM_GETTODAY: ::UINT = MCM_FIRST + 13; +pub const MCM_HITTEST: ::UINT = MCM_FIRST + 14; +pub const MCSC_BACKGROUND: ::WPARAM = 0; +pub const MCSC_TEXT: ::WPARAM = 1; +pub const MCSC_TITLEBK: ::WPARAM = 2; +pub const MCSC_TITLETEXT: ::WPARAM = 3; +pub const MCSC_MONTHBK: ::WPARAM = 4; +pub const MCSC_TRAILINGTEXT: ::WPARAM = 5; +STRUCT!{struct MCHITTESTINFO { + cbSize: ::UINT, + pt: ::POINT, + uHit: ::UINT, + st: ::SYSTEMTIME, + rc: ::RECT, + iOffset: ::c_int, + iRow: ::c_int, + iCol: ::c_int, +}} +pub type PMCHITTESTINFO = *mut MCHITTESTINFO; +pub const MCHT_TITLE: ::UINT = 0x00010000; +pub const MCHT_CALENDAR: ::UINT = 0x00020000; +pub const MCHT_TODAYLINK: ::UINT = 0x00030000; +pub const MCHT_CALENDARCONTROL: ::UINT = 0x00100000; +pub const MCHT_NEXT: ::UINT = 0x01000000; +pub const MCHT_PREV: ::UINT = 0x02000000; +pub const MCHT_NOWHERE: ::UINT = 0x00000000; +pub const MCHT_TITLEBK: ::UINT = MCHT_TITLE; +pub const MCHT_TITLEMONTH: ::UINT = MCHT_TITLE | 0x0001; +pub const MCHT_TITLEYEAR: ::UINT = MCHT_TITLE | 0x0002; +pub const MCHT_TITLEBTNNEXT: ::UINT = MCHT_TITLE | MCHT_NEXT | 0x0003; +pub const MCHT_TITLEBTNPREV: ::UINT = MCHT_TITLE | MCHT_PREV | 0x0003; +pub const MCHT_CALENDARBK: ::UINT = MCHT_CALENDAR; +pub const MCHT_CALENDARDATE: ::UINT = MCHT_CALENDAR | 0x0001; +pub const MCHT_CALENDARDATENEXT: ::UINT = MCHT_CALENDARDATE | MCHT_NEXT; +pub const MCHT_CALENDARDATEPREV: ::UINT = MCHT_CALENDARDATE | MCHT_PREV; +pub const MCHT_CALENDARDAY: ::UINT = MCHT_CALENDAR | 0x0002; +pub const MCHT_CALENDARWEEKNUM: ::UINT = MCHT_CALENDAR | 0x0003; +pub const MCHT_CALENDARDATEMIN: ::UINT = MCHT_CALENDAR | 0x0004; +pub const MCHT_CALENDARDATEMAX: ::UINT = MCHT_CALENDAR | 0x0005; +pub const MCM_SETFIRSTDAYOFWEEK: ::UINT = MCM_FIRST + 15; +pub const MCM_GETFIRSTDAYOFWEEK: ::UINT = MCM_FIRST + 16; +pub const MCM_GETRANGE: ::UINT = MCM_FIRST + 17; +pub const MCM_SETRANGE: ::UINT = MCM_FIRST + 18; +pub const MCM_GETMONTHDELTA: ::UINT = MCM_FIRST + 19; +pub const MCM_SETMONTHDELTA: ::UINT = MCM_FIRST + 20; +pub const MCM_GETMAXTODAYWIDTH: ::UINT = MCM_FIRST + 21; +pub const MCM_SETUNICODEFORMAT: ::UINT = CCM_SETUNICODEFORMAT; +pub const MCM_GETUNICODEFORMAT: ::UINT = CCM_GETUNICODEFORMAT; +pub const MCM_GETCURRENTVIEW: ::UINT = MCM_FIRST + 22; +pub const MCM_GETCALENDARCOUNT: ::UINT = MCM_FIRST + 23; +pub const MCMV_MONTH: ::DWORD = 0; +pub const MCMV_YEAR: ::DWORD = 1; +pub const MCMV_DECADE: ::DWORD = 2; +pub const MCMV_CENTURY: ::DWORD = 3; +pub const MCMV_MAX: ::DWORD = MCMV_CENTURY; +pub const MCGIP_CALENDARCONTROL: ::DWORD = 0; +pub const MCGIP_NEXT: ::DWORD = 1; +pub const MCGIP_PREV: ::DWORD = 2; +pub const MCGIP_FOOTER: ::DWORD = 3; +pub const MCGIP_CALENDAR: ::DWORD = 4; +pub const MCGIP_CALENDARHEADER: ::DWORD = 5; +pub const MCGIP_CALENDARBODY: ::DWORD = 6; +pub const MCGIP_CALENDARROW: ::DWORD = 7; +pub const MCGIP_CALENDARCELL: ::DWORD = 8; +pub const MCGIF_DATE: ::DWORD = 0x00000001; +pub const MCGIF_RECT: ::DWORD = 0x00000002; +pub const MCGIF_NAME: ::DWORD = 0x00000004; +STRUCT!{struct MCGRIDINFO { + cbSize: ::UINT, + dwPart: ::DWORD, + dwFlags: ::DWORD, + iCalendar: ::c_int, + iRow: ::c_int, + iCol: ::c_int, + bSelected: ::BOOL, + stStart: ::SYSTEMTIME, + stEnd: ::SYSTEMTIME, + rc: ::RECT, + pszName: ::PWSTR, + cchName: ::size_t, +}} +pub type PMCGRIDINFO = *mut MCGRIDINFO; +pub const MCM_GETCALENDARGRIDINFO: ::UINT = MCM_FIRST + 24; +pub const MCM_GETCALID: ::UINT = MCM_FIRST + 27; +pub const MCM_SETCALID: ::UINT = MCM_FIRST + 28; +pub const MCM_SIZERECTTOMIN: ::UINT = MCM_FIRST + 29; +pub const MCM_SETCALENDARBORDER: ::UINT = MCM_FIRST + 30; +pub const MCM_GETCALENDARBORDER: ::UINT = MCM_FIRST + 31; +pub const MCM_SETCURRENTVIEW: ::UINT = MCM_FIRST + 32; +STRUCT!{struct NMSELCHANGE { + nmhdr: ::NMHDR, + stSelStart: ::SYSTEMTIME, + stSelEnd: ::SYSTEMTIME, +}} +pub type LPNMSELCHANGE = *mut NMSELCHANGE; +pub const MCN_SELCHANGE: ::UINT = MCN_FIRST - 3; +STRUCT!{struct NMDAYSTATE { + nmhdr: ::NMHDR, + stStart: ::SYSTEMTIME, + cDayState: ::c_int, + prgDayState: LPMONTHDAYSTATE, +}} +pub type LPNMDAYSTATE = *mut NMDAYSTATE; +pub const MCN_GETDAYSTATE: ::UINT = MCN_FIRST - 1; +pub type NMSELECT = NMSELCHANGE; +pub type LPNMSELECT = *mut NMSELCHANGE; +pub const MCN_SELECT: ::UINT = MCN_FIRST; +STRUCT!{struct NMVIEWCHANGE { + nmhdr: ::NMHDR, + dwOldView: ::DWORD, + dwNewView: ::DWORD, +}} +pub type LPNMVIEWCHANGE = *mut NMVIEWCHANGE; +pub const MCN_VIEWCHANGE: ::UINT = MCN_FIRST - 4; +pub const MCS_DAYSTATE: ::DWORD = 0x0001; +pub const MCS_MULTISELECT: ::DWORD = 0x0002; +pub const MCS_WEEKNUMBERS: ::DWORD = 0x0004; +pub const MCS_NOTODAYCIRCLE: ::DWORD = 0x0008; +pub const MCS_NOTODAY: ::DWORD = 0x0010; +pub const MCS_NOTRAILINGDATES: ::DWORD = 0x0040; +pub const MCS_SHORTDAYSOFWEEK: ::DWORD = 0x0080; +pub const MCS_NOSELCHANGEONNAV: ::DWORD = 0x0100; +pub const GMR_VISIBLE: ::DWORD = 0; +pub const GMR_DAYSTATE: ::DWORD = 1; +STRUCT!{struct DATETIMEPICKERINFO { + cbSize: ::UINT, + rcCheck: ::RECT, + stateCheck: ::DWORD, + rcButton: ::RECT, + stateButton: ::DWORD, + hwndEdit: ::HWND, + hwndUD: ::HWND, + hwndDropDown: ::HWND, +}} +pub type LPDATETIMEPICKERINFO = *mut DATETIMEPICKERINFO; +pub const DTM_FIRST: ::UINT = 0x1000; +pub const DTM_GETSYSTEMTIME: ::UINT = DTM_FIRST + 1; +pub const DTM_SETSYSTEMTIME: ::UINT = DTM_FIRST + 2; +pub const DTM_GETRANGE: ::UINT = DTM_FIRST + 3; +pub const DTM_SETRANGE: ::UINT = DTM_FIRST + 4; +pub const DTM_SETFORMATA: ::UINT = DTM_FIRST + 5; +pub const DTM_SETFORMATW: ::UINT = DTM_FIRST + 50; +pub const DTM_SETMCCOLOR: ::UINT = DTM_FIRST + 6; +pub const DTM_GETMCCOLOR: ::UINT = DTM_FIRST + 7; +pub const DTM_GETMONTHCAL: ::UINT = DTM_FIRST + 8; +pub const DTM_SETMCFONT: ::UINT = DTM_FIRST + 9; +pub const DTM_GETMCFONT: ::UINT = DTM_FIRST + 10; +pub const DTM_SETMCSTYLE: ::UINT = DTM_FIRST + 11; +pub const DTM_GETMCSTYLE: ::UINT = DTM_FIRST + 12; +pub const DTM_CLOSEMONTHCAL: ::UINT = DTM_FIRST + 13; +pub const DTM_GETDATETIMEPICKERINFO: ::UINT = DTM_FIRST + 14; +pub const DTM_GETIDEALSIZE: ::UINT = DTM_FIRST + 15; +pub const DTS_UPDOWN: ::DWORD = 0x0001; +pub const DTS_SHOWNONE: ::DWORD = 0x0002; +pub const DTS_SHORTDATEFORMAT: ::DWORD = 0x0000; +pub const DTS_LONGDATEFORMAT: ::DWORD = 0x0004; +pub const DTS_SHORTDATECENTURYFORMAT: ::DWORD = 0x000C; +pub const DTS_TIMEFORMAT: ::DWORD = 0x0009; +pub const DTS_APPCANPARSE: ::DWORD = 0x0010; +pub const DTS_RIGHTALIGN: ::DWORD = 0x0020; +pub const DTN_DATETIMECHANGE: ::UINT = DTN_FIRST2 - 6; +STRUCT!{struct NMDATETIMECHANGE { + nmhdr: ::NMHDR, + dwFlags: ::DWORD, + st: ::SYSTEMTIME, +}} +pub type LPNMDATETIMECHANGE = *mut NMDATETIMECHANGE; +pub const DTN_USERSTRINGA: ::UINT = DTN_FIRST2 - 5; +pub const DTN_USERSTRINGW: ::UINT = DTN_FIRST - 5; +STRUCT!{struct NMDATETIMESTRINGA { + nmhdr: ::NMHDR, + pszUserString: ::LPCSTR, + st: ::SYSTEMTIME, + dwFlags: ::DWORD, +}} +pub type LPNMDATETIMESTRINGA = *mut NMDATETIMESTRINGA; +STRUCT!{struct NMDATETIMESTRINGW { + nmhdr: ::NMHDR, + pszUserString: ::LPCWSTR, + st: ::SYSTEMTIME, + dwFlags: ::DWORD, +}} +pub type LPNMDATETIMESTRINGW = *mut NMDATETIMESTRINGW; +pub const DTN_WMKEYDOWNA: ::UINT = DTN_FIRST2 - 4; +pub const DTN_WMKEYDOWNW: ::UINT = DTN_FIRST - 4; +STRUCT!{struct NMDATETIMEWMKEYDOWNA { + nmhdr: ::NMHDR, + nVirtKey: ::c_int, + pszFormat: ::LPCSTR, + st: ::SYSTEMTIME, +}} +pub type LPNMDATETIMEWMKEYDOWNA = *mut NMDATETIMEWMKEYDOWNA; +STRUCT!{struct NMDATETIMEWMKEYDOWNW { + nmhdr: ::NMHDR, + nVirtKey: ::c_int, + pszFormat: ::LPCWSTR, + st: ::SYSTEMTIME, +}} +pub type LPNMDATETIMEWMKEYDOWNW = *mut NMDATETIMEWMKEYDOWNW; +pub const DTN_FORMATA: ::UINT = DTN_FIRST2 - 3; +pub const DTN_FORMATW: ::UINT = DTN_FIRST - 3; +STRUCT!{nodebug struct NMDATETIMEFORMATA { + nmhdr: ::NMHDR, + pszFormat: ::LPCSTR, + st: ::SYSTEMTIME, + pszDisplay: ::LPCSTR, + szDisplay: [::CHAR; 64], +}} +pub type LPNMDATETIMEFORMATA = *mut NMDATETIMEFORMATA; +STRUCT!{nodebug struct NMDATETIMEFORMATW { + nmhdr: ::NMHDR, + pszFormat: ::LPCWSTR, + st: ::SYSTEMTIME, + pszDisplay: ::LPCWSTR, + szDisplay: [::WCHAR; 64], +}} +pub type LPNMDATETIMEFORMATW = *mut NMDATETIMEFORMATW; +pub const DTN_FORMATQUERYA: ::UINT = DTN_FIRST2 - 2; +pub const DTN_FORMATQUERYW: ::UINT = DTN_FIRST - 2; +STRUCT!{struct NMDATETIMEFORMATQUERYA { + nmhdr: ::NMHDR, + pszFormat: ::LPCSTR, + szMax: ::SIZE, +}} +pub type LPNMDATETIMEFORMATQUERYA = *mut NMDATETIMEFORMATQUERYA; +STRUCT!{struct NMDATETIMEFORMATQUERYW { + nmhdr: ::NMHDR, + pszFormat: ::LPCWSTR, + szMax: ::SIZE, +}} +pub type LPNMDATETIMEFORMATQUERYW = *mut NMDATETIMEFORMATQUERYW; +pub const DTN_DROPDOWN: ::UINT = DTN_FIRST2 - 1; +pub const DTN_CLOSEUP: ::UINT = DTN_FIRST2; +pub const GDTR_MIN: ::WPARAM = 0x0001; +pub const GDTR_MAX: ::WPARAM = 0x0002; +pub const GDT_ERROR: ::LRESULT = -1; +pub const GDT_VALID: ::LRESULT = 0; +pub const GDT_NONE: ::LRESULT = 1; +pub const IPM_CLEARADDRESS: ::UINT = ::WM_USER + 100; +pub const IPM_SETADDRESS: ::UINT = ::WM_USER + 101; +pub const IPM_GETADDRESS: ::UINT = ::WM_USER + 102; +pub const IPM_SETRANGE: ::UINT = ::WM_USER + 103; +pub const IPM_SETFOCUS: ::UINT = ::WM_USER + 104; +pub const IPM_ISBLANK: ::UINT = ::WM_USER + 105; +pub const IPN_FIELDCHANGED: ::UINT = IPN_FIRST - 0; +STRUCT!{struct NMIPADDRESS { + hdr: ::NMHDR, + iField: ::c_int, + iValue: ::c_int, +}} +pub type LPNMIPADDRESS = *mut NMIPADDRESS; +#[inline] #[allow(dead_code)] +pub fn MAKEIPRANGE(low: ::BYTE, high: ::BYTE) -> ::LPARAM { + (high << 8 + low) as ::LPARAM +} +#[inline] #[allow(dead_code)] +pub fn MAKEIPADDRESS(b1: ::DWORD, b2: ::DWORD, b3: ::DWORD, b4: ::DWORD) -> ::LPARAM { + ((b1 << 24) + (b2 << 16) + (b3 << 8) + b4) as ::LPARAM +} +pub const PGS_VERT: ::DWORD = 0x00000000; +pub const PGS_HORZ: ::DWORD = 0x00000001; +pub const PGS_AUTOSCROLL: ::DWORD = 0x00000002; +pub const PGS_DRAGNDROP: ::DWORD = 0x00000004; +pub const PGF_INVISIBLE: ::DWORD = 0; +pub const PGF_NORMAL: ::DWORD = 1; +pub const PGF_GRAYED: ::DWORD = 2; +pub const PGF_DEPRESSED: ::DWORD = 4; +pub const PGF_HOT: ::DWORD = 8; +pub const PGB_TOPORLEFT: ::c_int = 0; +pub const PGB_BOTTOMORRIGHT: ::c_int = 1; +pub const PGM_SETCHILD: ::UINT = PGM_FIRST + 1; +pub const PGM_RECALCSIZE: ::UINT = PGM_FIRST + 2; +pub const PGM_FORWARDMOUSE: ::UINT = PGM_FIRST + 3; +pub const PGM_SETBKCOLOR: ::UINT = PGM_FIRST + 4; +pub const PGM_GETBKCOLOR: ::UINT = PGM_FIRST + 5; +pub const PGM_SETBORDER: ::UINT = PGM_FIRST + 6; +pub const PGM_GETBORDER: ::UINT = PGM_FIRST + 7; +pub const PGM_SETPOS: ::UINT = PGM_FIRST + 8; +pub const PGM_GETPOS: ::UINT = PGM_FIRST + 9; +pub const PGM_SETBUTTONSIZE: ::UINT = PGM_FIRST + 10; +pub const PGM_GETBUTTONSIZE: ::UINT = PGM_FIRST + 11; +pub const PGM_GETBUTTONSTATE: ::UINT = PGM_FIRST + 12; +pub const PGM_GETDROPTARGET: ::UINT = CCM_GETDROPTARGET; +pub const PGM_SETSCROLLINFO: ::UINT = PGM_FIRST + 13; +pub const PGN_SCROLL: ::UINT = PGN_FIRST - 1; +pub const PGF_SCROLLUP: ::c_int = 1; +pub const PGF_SCROLLDOWN: ::c_int = 2; +pub const PGF_SCROLLLEFT: ::c_int = 4; +pub const PGF_SCROLLRIGHT: ::c_int = 8; +pub const PGK_SHIFT: ::BOOL = 1; +pub const PGK_CONTROL: ::BOOL = 2; +pub const PGK_MENU: ::BOOL = 4; +STRUCT!{struct NMPGSCROLL { + hdr: ::NMHDR, + fwKeys: ::BOOL, + rcParent: ::RECT, + iDir: ::c_int, + iXpos: ::c_int, + iYpos: ::c_int, + iScroll: ::c_int, +}} +pub type LPNMPGSCROLL = *mut NMPGSCROLL; +pub const PGN_CALCSIZE: ::UINT = PGN_FIRST - 2; +pub const PGF_CALCWIDTH: ::DWORD = 1; +pub const PGF_CALCHEIGHT: ::DWORD = 2; +STRUCT!{struct NMPGCALCSIZE { + hdr: ::NMHDR, + dwFlag: ::DWORD, + iWidth: ::c_int, + iHeight: ::c_int, +}} +pub type LPNMPGCALCSIZE = *mut NMPGCALCSIZE; +pub const PGN_HOTITEMCHANGE: ::UINT = PGN_FIRST - 3; +STRUCT!{struct NMPGHOTITEM { + hdr: ::NMHDR, + idOld: ::c_int, + idNew: ::c_int, + dwFlags: ::DWORD, +}} +pub type LPNMPGHOTITEM = *mut NMPGHOTITEM; +pub const NFS_EDIT: ::DWORD = 0x0001; +pub const NFS_STATIC: ::DWORD = 0x0002; +pub const NFS_LISTCOMBO: ::DWORD = 0x0004; +pub const NFS_BUTTON: ::DWORD = 0x0008; +pub const NFS_ALL: ::DWORD = 0x0010; +pub const NFS_USEFONTASSOC: ::DWORD = 0x0020; +pub const BUTTON_IMAGELIST_ALIGN_LEFT: ::UINT = 0; +pub const BUTTON_IMAGELIST_ALIGN_RIGHT: ::UINT = 1; +pub const BUTTON_IMAGELIST_ALIGN_TOP: ::UINT = 2; +pub const BUTTON_IMAGELIST_ALIGN_BOTTOM: ::UINT = 3; +pub const BUTTON_IMAGELIST_ALIGN_CENTER: ::UINT = 4; +STRUCT!{struct BUTTON_IMAGELIST { + himl: HIMAGELIST, + margin: ::RECT, + uAlign: ::UINT, +}} +pub type PBUTTON_IMAGELIST = *mut BUTTON_IMAGELIST; +pub const BCM_GETIDEALSIZE: ::UINT = BCM_FIRST + 0x0001; +pub const BCM_SETIMAGELIST: ::UINT = BCM_FIRST + 0x0002; +pub const BCM_GETIMAGELIST: ::UINT = BCM_FIRST + 0x0003; +pub const BCM_SETTEXTMARGIN: ::UINT = BCM_FIRST + 0x0004; +pub const BCM_GETTEXTMARGIN: ::UINT = BCM_FIRST + 0x0005; +STRUCT!{struct NMBCHOTITEM { + hdr: ::NMHDR, + dwFlags: ::DWORD, +}} +pub type LPNMBCHOTITEM = *mut NMBCHOTITEM; +pub const BCN_HOTITEMCHANGE: ::UINT = BCN_FIRST + 0x0001; +pub const BS_SPLITBUTTON: ::UINT = 0x0000000C; +pub const BS_DEFSPLITBUTTON: ::UINT = 0x0000000D; +pub const BS_COMMANDLINK: ::UINT = 0x0000000E; +pub const BS_DEFCOMMANDLINK: ::UINT = 0x0000000F; +pub const BCSIF_GLYPH: ::UINT = 0x0001; +pub const BCSIF_IMAGE: ::UINT = 0x0002; +pub const BCSIF_STYLE: ::UINT = 0x0004; +pub const BCSIF_SIZE: ::UINT = 0x0008; +pub const BCSS_NOSPLIT: ::UINT = 0x0001; +pub const BCSS_STRETCH: ::UINT = 0x0002; +pub const BCSS_ALIGNLEFT: ::UINT = 0x0004; +pub const BCSS_IMAGE: ::UINT = 0x0008; +STRUCT!{struct BUTTON_SPLITINFO { + mask: ::UINT, + himlGlyph: HIMAGELIST, + uSplitStyle: ::UINT, + size: ::SIZE, +}} +pub type PBUTTON_SPLITINFO = *mut BUTTON_SPLITINFO; +pub const BCM_SETDROPDOWNSTATE: ::UINT = BCM_FIRST + 0x0006; +pub const BCM_SETSPLITINFO: ::UINT = BCM_FIRST + 0x0007; +pub const BCM_GETSPLITINFO: ::UINT = BCM_FIRST + 0x0008; +pub const BCM_SETNOTE: ::UINT = BCM_FIRST + 0x0009; +pub const BCM_GETNOTE: ::UINT = BCM_FIRST + 0x000A; +pub const BCM_GETNOTELENGTH: ::UINT = BCM_FIRST + 0x000B; +pub const BCM_SETSHIELD: ::UINT = BCM_FIRST + 0x000C; +pub const BCCL_NOGLYPH: HIMAGELIST = (0 - 1) as HIMAGELIST; +STRUCT!{struct NMBCDROPDOWN { + hdr: ::NMHDR, + rcButton: ::RECT, +}} +pub type LPNMBCDROPDOWN = *mut NMBCDROPDOWN; +pub const BCN_DROPDOWN: ::UINT = BCN_FIRST + 0x0002; +pub const EM_SETCUEBANNER: ::UINT = ECM_FIRST + 1; +pub const EM_GETCUEBANNER: ::UINT = ECM_FIRST + 2; +pub const EM_SHOWBALLOONTIP: ::UINT = ECM_FIRST + 3; +pub const EM_HIDEBALLOONTIP: ::UINT = ECM_FIRST + 4; +pub const EM_SETHILITE: ::UINT = ECM_FIRST + 5; +pub const EM_GETHILITE: ::UINT = ECM_FIRST + 6; +pub const EM_NOSETFOCUS: ::UINT = ECM_FIRST + 7; +pub const EM_TAKEFOCUS: ::UINT = ECM_FIRST + 8; +STRUCT!{struct EDITBALLOONTIP { + cbStruct: ::DWORD, + pszTitle: ::LPCWSTR, + pszText: ::LPCWSTR, + ttiIcon: ::INT, +}} +pub type PEDITBALLOONTIP = *mut EDITBALLOONTIP; +pub const CB_SETMINVISIBLE: ::UINT = CBM_FIRST + 1; +pub const CB_GETMINVISIBLE: ::UINT = CBM_FIRST + 2; +pub const CB_SETCUEBANNER: ::UINT = CBM_FIRST + 3; +pub const CB_GETCUEBANNER: ::UINT = CBM_FIRST + 4; +pub type PFTASKDIALOGCALLBACK = Option<unsafe extern "system" fn( + hwnd: ::HWND, msg: ::UINT, wParam: ::WPARAM, lParam: ::LPARAM, lpRefData: ::LONG_PTR, +) -> ::HRESULT>; +FLAGS!{enum TASKDIALOG_FLAGS { + TDF_ENABLE_HYPERLINKS = 0x0001, + TDF_USE_HICON_MAIN = 0x0002, + TDF_USE_HICON_FOOTER = 0x0004, + TDF_ALLOW_DIALOG_CANCELLATION = 0x0008, + TDF_USE_COMMAND_LINKS = 0x0010, + TDF_USE_COMMAND_LINKS_NO_ICON = 0x0020, + TDF_EXPAND_FOOTER_AREA = 0x0040, + TDF_EXPANDED_BY_DEFAULT = 0x0080, + TDF_VERIFICATION_FLAG_CHECKED = 0x0100, + TDF_SHOW_PROGRESS_BAR = 0x0200, + TDF_SHOW_MARQUEE_PROGRESS_BAR = 0x0400, + TDF_CALLBACK_TIMER = 0x0800, + TDF_POSITION_RELATIVE_TO_WINDOW = 0x1000, + TDF_RTL_LAYOUT = 0x2000, + TDF_NO_DEFAULT_RADIO_BUTTON = 0x4000, + TDF_CAN_BE_MINIMIZED = 0x8000, + TDF_NO_SET_FOREGROUND = 0x00010000, + TDF_SIZE_TO_CONTENT = 0x01000000, +}} +ENUM!{enum TASKDIALOG_MESSAGES { + TDM_NAVIGATE_PAGE = ::WM_USER + 101, + TDM_CLICK_BUTTON = ::WM_USER + 102, + TDM_SET_MARQUEE_PROGRESS_BAR = ::WM_USER + 103, + TDM_SET_PROGRESS_BAR_STATE = ::WM_USER + 104, + TDM_SET_PROGRESS_BAR_RANGE = ::WM_USER + 105, + TDM_SET_PROGRESS_BAR_POS = ::WM_USER + 106, + TDM_SET_PROGRESS_BAR_MARQUEE = ::WM_USER + 107, + TDM_SET_ELEMENT_TEXT = ::WM_USER + 108, + TDM_CLICK_RADIO_BUTTON = ::WM_USER + 110, + TDM_ENABLE_BUTTON = ::WM_USER + 111, + TDM_ENABLE_RADIO_BUTTON = ::WM_USER + 112, + TDM_CLICK_VERIFICATION = ::WM_USER + 113, + TDM_UPDATE_ELEMENT_TEXT = ::WM_USER + 114, + TDM_SET_BUTTON_ELEVATION_REQUIRED_STATE = ::WM_USER + 115, + TDM_UPDATE_ICON = ::WM_USER + 116, +}} +ENUM!{enum TASKDIALOG_NOTIFICATIONS { + TDN_CREATED = 0, + TDN_NAVIGATED = 1, + TDN_BUTTON_CLICKED = 2, + TDN_HYPERLINK_CLICKED = 3, + TDN_TIMER = 4, + TDN_DESTROYED = 5, + TDN_RADIO_BUTTON_CLICKED = 6, + TDN_DIALOG_CONSTRUCTED = 7, + TDN_VERIFICATION_CLICKED = 8, + TDN_HELP = 9, + TDN_EXPANDO_BUTTON_CLICKED = 10, +}} +STRUCT!{struct TASKDIALOG_BUTTON { + nButtonID: ::c_int, + pszButtonText: ::PCWSTR, +}} +ENUM!{enum TASKDIALOG_ELEMENTS { + TDE_CONTENT, + TDE_EXPANDED_INFORMATION, + TDE_FOOTER, + TDE_MAIN_INSTRUCTION, +}} +ENUM!{enum TASKDIALOG_ICON_ELEMENTS { + TDIE_ICON_MAIN, + TDIE_ICON_FOOTER, +}} +FLAGS!{enum TASKDIALOG_COMMON_BUTTON_FLAGS { + TDCBF_OK_BUTTON = 0x0001, + TDCBF_YES_BUTTON = 0x0002, + TDCBF_NO_BUTTON = 0x0004, + TDCBF_CANCEL_BUTTON = 0x0008, + TDCBF_RETRY_BUTTON = 0x0010, + TDCBF_CLOSE_BUTTON = 0x0020, +}} +STRUCT!{nodebug struct TASKDIALOGCONFIG { + cbSize: ::UINT, + hwndParent: ::HWND, + hInstance: ::HINSTANCE, + dwFlags: TASKDIALOG_FLAGS, + dwCommonButtons: TASKDIALOG_COMMON_BUTTON_FLAGS, + pszWindowTitle: ::PCWSTR, + hMainIcon: ::HICON, + pszMainInstruction: ::PCWSTR, + pszContent: ::PCWSTR, + cButtons: ::UINT, + pButtons: *const TASKDIALOG_BUTTON, + nDefaultButton: ::c_int, + cRadioButtons: ::UINT, + pRadioButtons: *const TASKDIALOG_BUTTON, + nDefaultRadioButton: ::c_int, + pszVerificationText: ::PCWSTR, + pszExpandedInformation: ::PCWSTR, + pszExpandedControlText: ::PCWSTR, + pszCollapsedControlText: ::PCWSTR, + hFooterIcon: ::HICON, + pszFooter: ::PCWSTR, + pfCallback: PFTASKDIALOGCALLBACK, + lpCallbackData: ::LONG_PTR, + cxWidth: ::UINT, +}} +UNION!(TASKDIALOGCONFIG, hMainIcon, pszMainIcon, pszMainIcon_mut, ::PCWSTR); +UNION!(TASKDIALOGCONFIG, hFooterIcon, pszFooterIcon, pszFooterIcon_mut, ::PCWSTR); +pub const DA_LAST: ::c_int = 0x7FFFFFFF; +pub const DA_ERR: ::c_int = -1; +pub type PFNDAENUMCALLBACK = Option<unsafe extern "system" fn( + p: *mut ::c_void, pData: *mut ::c_void, +) -> ::c_int>; +pub type PFNDAENUMCALLBACKCONST = Option<unsafe extern "system" fn( + p: *const ::c_void, pData: *mut ::c_void, +) -> ::c_int>; +pub type PFNDACOMPARE = Option<unsafe extern "system" fn( + p1: *mut ::c_void, p2: *mut ::c_void, lParam: ::LPARAM, +) -> ::c_int>; +pub type PFNDACOMPARECONST = Option<unsafe extern "system" fn( + p1: *const ::c_void, p2: *const ::c_void, lParam: ::LPARAM, +) -> ::c_int>; +pub enum DSA {} +pub type HDSA = *mut DSA; +pub const DSA_APPEND: ::c_int = DA_LAST; +pub const DSA_ERR: ::c_int = DA_ERR; +pub type PFNDSAENUMCALLBACK = PFNDAENUMCALLBACK; +pub type PFNDSAENUMCALLBACKCONST = PFNDAENUMCALLBACKCONST; +pub type PFNDSACOMPARE = PFNDACOMPARE; +pub type PFNDSACOMPARECONST = PFNDACOMPARECONST; +pub enum DPA {} +pub type HDPA = *mut DPA; +STRUCT!{struct DPASTREAMINFO { + iPos: ::c_int, + pvItem: *mut ::c_void, +}} +pub type PFNDPASTREAM = Option<unsafe extern "system" fn( + pinfo: *mut DPASTREAMINFO, pstream: *mut ::IStream, pvInstData: *mut ::c_void, +) -> ::HRESULT>; +pub const DPAM_SORTED: ::DWORD = 0x00000001; +pub const DPAM_NORMAL: ::DWORD = 0x00000002; +pub const DPAM_UNION: ::DWORD = 0x00000004; +pub const DPAM_INTERSECT: ::DWORD = 0x00000008; +pub type PFNDPAMERGE = Option<unsafe extern "system" fn( + uMsg: ::UINT, pvDest: *mut ::c_void, pvSrc: *mut ::c_void, lParam: ::LPARAM, +) -> *mut ::c_void>; +pub type PFNDPAMERGECONST = Option<unsafe extern "system" fn( + uMsg: ::UINT, pvDest: *const ::c_void, pvSrc: *const ::c_void, lParam: ::LPARAM, +) -> *const ::c_void>; +pub const DPAMM_MERGE: ::UINT = 1; +pub const DPAMM_DELETE: ::UINT = 2; +pub const DPAMM_INSERT: ::UINT = 3; +pub const DPAS_SORTED: ::UINT = 0x0001; +pub const DPAS_INSERTBEFORE: ::UINT = 0x0002; +pub const DPAS_INSERTAFTER: ::UINT = 0x0004; +pub const DPA_APPEND: ::c_int = DA_LAST; +pub const DPA_ERR: ::c_int = DA_ERR; +pub type PFNDPAENUMCALLBACK = PFNDAENUMCALLBACK; +pub type PFNDPAENUMCALLBACKCONST = PFNDAENUMCALLBACKCONST; +pub type PFNDPACOMPARE = PFNDACOMPARE; +pub type PFNDPACOMPARECONST = PFNDACOMPARECONST; +pub const WSB_PROP_CYVSCROLL: ::UINT = 0x00000001; +pub const WSB_PROP_CXHSCROLL: ::UINT = 0x00000002; +pub const WSB_PROP_CYHSCROLL: ::UINT = 0x00000004; +pub const WSB_PROP_CXVSCROLL: ::UINT = 0x00000008; +pub const WSB_PROP_CXHTHUMB: ::UINT = 0x00000010; +pub const WSB_PROP_CYVTHUMB: ::UINT = 0x00000020; +pub const WSB_PROP_VBKGCOLOR: ::UINT = 0x00000040; +pub const WSB_PROP_HBKGCOLOR: ::UINT = 0x00000080; +pub const WSB_PROP_VSTYLE: ::UINT = 0x00000100; +pub const WSB_PROP_HSTYLE: ::UINT = 0x00000200; +pub const WSB_PROP_WINSTYLE: ::UINT = 0x00000400; +pub const WSB_PROP_PALETTE: ::UINT = 0x00000800; +pub const WSB_PROP_MASK: ::UINT = 0x00000FFF; +pub const FSB_FLAT_MODE: ::INT_PTR = 2; +pub const FSB_ENCARTA_MODE: ::INT_PTR = 1; +pub const FSB_REGULAR_MODE: ::INT_PTR = 0; +pub type SUBCLASSPROC = Option<unsafe extern "system" fn( + hWnd: ::HWND, uMsg: ::UINT, wParam: ::WPARAM, lParam: ::LPARAM, uIdSubclass: ::UINT_PTR, + dwRefData: ::DWORD_PTR, +) -> ::LRESULT>; diff --git a/deps/winapi-0.2.6/src/commdlg.rs b/deps/winapi-0.2.6/src/commdlg.rs new file mode 100644 index 000000000..9c83e92e6 --- /dev/null +++ b/deps/winapi-0.2.6/src/commdlg.rs @@ -0,0 +1,583 @@ +// Copyright © 2015, skdltmxn +// Licensed under the MIT License <LICENSE.md> +//! 32-Bit Common Dialog APIs +pub type LPOFNHOOKPROC = Option<unsafe extern "system" fn( + ::HWND, ::UINT, ::WPARAM, ::LPARAM, +) -> ::UINT_PTR>; +STRUCT!{nodebug struct OPENFILENAME_NT4A { + lStructSize: ::DWORD, + hwndOwner: ::HWND, + hInstance: ::HINSTANCE, + lpstrFilter: ::LPCSTR, + lpstrCustomFilter: ::LPSTR, + nMaxCustFilter: ::DWORD, + nFilterIndex: ::DWORD, + lpstrFile: ::LPSTR, + nMaxFile: ::DWORD, + lpstrFileTitle: ::LPSTR, + nMaxFileTitle: ::DWORD, + lpstrInitialDir: ::LPCSTR, + lpstrTitle: ::LPCSTR, + Flags: ::DWORD, + nFileOffset: ::WORD, + nFileExtension: ::WORD, + lpstrDefExt: ::LPCSTR, + lCustData: ::LPARAM, + lpfnHook: LPOFNHOOKPROC, + lpTemplateName: ::LPCSTR, +}} +pub type LPOPENFILENAME_NT4A = *mut OPENFILENAME_NT4A; +STRUCT!{nodebug struct OPENFILENAME_NT4W { + lStructSize: ::DWORD, + hwndOwner: ::HWND, + hInstance: ::HINSTANCE, + lpstrFilter: ::LPCWSTR, + lpstrCustomFilter: ::LPWSTR, + nMaxCustFilter: ::DWORD, + nFilterIndex: ::DWORD, + lpstrFile: ::LPWSTR, + nMaxFile: ::DWORD, + lpstrFileTitle: ::LPWSTR, + nMaxFileTitle: ::DWORD, + lpstrInitialDir: ::LPCWSTR, + lpstrTitle: ::LPCWSTR, + Flags: ::DWORD, + nFileOffset: ::WORD, + nFileExtension: ::WORD, + lpstrDefExt: ::LPCWSTR, + lCustData: ::LPARAM, + lpfnHook: LPOFNHOOKPROC, + lpTemplateName: ::LPCWSTR, +}} +pub type LPOPENFILENAME_NT4W = *mut OPENFILENAME_NT4W; +STRUCT!{nodebug struct OPENFILENAMEA { + lStructSize: ::DWORD, + hwndOwner: ::HWND, + hInstance: ::HINSTANCE, + lpstrFilter: ::LPCSTR, + lpstrCustomFilter: ::LPSTR, + nMaxCustFilter: ::DWORD, + nFilterIndex: ::DWORD, + lpstrFile: ::LPSTR, + nMaxFile: ::DWORD, + lpstrFileTitle: ::LPSTR, + nMaxFileTitle: ::DWORD, + lpstrInitialDir: ::LPCSTR, + lpstrTitle: ::LPCSTR, + Flags: ::DWORD, + nFileOffset: ::WORD, + nFileExtension: ::WORD, + lpstrDefExt: ::LPCSTR, + lCustData: ::LPARAM, + lpfnHook: LPOFNHOOKPROC, + lpTemplateName: ::LPCSTR, + pvReserved: *mut ::c_void, + dwReserved: ::DWORD, + FlagsEx: ::DWORD, +}} +pub type LPOPENFILENAMEA = *mut OPENFILENAMEA; +STRUCT!{nodebug struct OPENFILENAMEW { + lStructSize: ::DWORD, + hwndOwner: ::HWND, + hInstance: ::HINSTANCE, + lpstrFilter: ::LPCWSTR, + lpstrCustomFilter: ::LPWSTR, + nMaxCustFilter: ::DWORD, + nFilterIndex: ::DWORD, + lpstrFile: ::LPWSTR, + nMaxFile: ::DWORD, + lpstrFileTitle: ::LPWSTR, + nMaxFileTitle: ::DWORD, + lpstrInitialDir: ::LPCWSTR, + lpstrTitle: ::LPCWSTR, + Flags: ::DWORD, + nFileOffset: ::WORD, + nFileExtension: ::WORD, + lpstrDefExt: ::LPCWSTR, + lCustData: ::LPARAM, + lpfnHook: LPOFNHOOKPROC, + lpTemplateName: ::LPCWSTR, + pvReserved: *mut ::c_void, + dwReserved: ::DWORD, + FlagsEx: ::DWORD, +}} +pub type LPOPENFILENAMEW = *mut OPENFILENAMEW; +pub const OFN_READONLY: ::DWORD = 0x00000001; +pub const OFN_OVERWRITEPROMPT: ::DWORD = 0x00000002; +pub const OFN_HIDEREADONLY: ::DWORD = 0x00000004; +pub const OFN_NOCHANGEDIR: ::DWORD = 0x00000008; +pub const OFN_SHOWHELP: ::DWORD = 0x00000010; +pub const OFN_ENABLEHOOK: ::DWORD = 0x00000020; +pub const OFN_ENABLETEMPLATE: ::DWORD = 0x00000040; +pub const OFN_ENABLETEMPLATEHANDLE: ::DWORD = 0x00000080; +pub const OFN_NOVALIDATE: ::DWORD = 0x00000100; +pub const OFN_ALLOWMULTISELECT: ::DWORD = 0x00000200; +pub const OFN_EXTENSIONDIFFERENT: ::DWORD = 0x00000400; +pub const OFN_PATHMUSTEXIST: ::DWORD = 0x00000800; +pub const OFN_FILEMUSTEXIST: ::DWORD = 0x00001000; +pub const OFN_CREATEPROMPT: ::DWORD = 0x00002000; +pub const OFN_SHAREAWARE: ::DWORD = 0x00004000; +pub const OFN_NOREADONLYRETURN: ::DWORD = 0x00008000; +pub const OFN_NOTESTFILECREATE: ::DWORD = 0x00010000; +pub const OFN_NONETWORKBUTTON: ::DWORD = 0x00020000; +pub const OFN_NOLONGNAMES: ::DWORD = 0x00040000; +pub const OFN_EXPLORER: ::DWORD = 0x00080000; +pub const OFN_NODEREFERENCELINKS: ::DWORD = 0x00100000; +pub const OFN_LONGNAMES: ::DWORD = 0x00200000; +pub const OFN_ENABLEINCLUDENOTIFY: ::DWORD = 0x00400000; +pub const OFN_ENABLESIZING: ::DWORD = 0x00800000; +pub const OFN_DONTADDTORECENT: ::DWORD = 0x02000000; +pub const OFN_FORCESHOWHIDDEN: ::DWORD = 0x10000000; +pub const OFN_EX_NOPLACESBAR: ::DWORD = 0x00000001; +pub const OFN_SHAREFALLTHROUGH: ::UINT_PTR = 2; +pub const OFN_SHARENOWARN: ::UINT_PTR = 1; +pub const OFN_SHAREWARN: ::UINT_PTR = 0; +pub type LPCCHOOKPROC = Option<unsafe extern "system" fn( + ::HWND, ::UINT, ::WPARAM, ::LPARAM, +) -> ::UINT_PTR>; +STRUCT!{struct OFNOTIFYA { + hdr: ::NMHDR, + lpOFN: LPOPENFILENAMEA, + pszFile: ::LPSTR, +}} +pub type LPOFNOTIFYA = *mut OFNOTIFYA; +STRUCT!{struct OFNOTIFYW { + hdr: ::NMHDR, + lpOFN: LPOPENFILENAMEW, + pszFile: ::LPWSTR, +}} +pub type LPOFNOTIFYW = *mut OFNOTIFYW; +STRUCT!{struct OFNOTIFYEXA { + hdr: ::NMHDR, + lpOFN: LPOPENFILENAMEA, + psf: ::LPVOID, + pidl: ::LPVOID, +}} +pub type LPOFNOTIFYEXA = *mut OFNOTIFYEXA; +STRUCT!{struct OFNOTIFYEXW { + hdr: ::NMHDR, + lpOFN: LPOPENFILENAMEW, + psf: ::LPVOID, + pidl: ::LPVOID, +}} +pub type LPOFNOTIFYEXW = *mut OFNOTIFYEXW; +pub const CDN_FIRST: ::UINT = 0 - 601; +pub const CDN_LAST: ::UINT = 0 - 699; +pub const CDN_INITDONE: ::UINT = CDN_FIRST - 0x0000; +pub const CDN_SELCHANGE: ::UINT = CDN_FIRST - 0x0001; +pub const CDN_FOLDERCHANGE: ::UINT = CDN_FIRST - 0x0002; +pub const CDN_SHAREVIOLATION: ::UINT = CDN_FIRST - 0x0003; +pub const CDN_HELP: ::UINT = CDN_FIRST - 0x0004; +pub const CDN_FILEOK: ::UINT = CDN_FIRST - 0x0005; +pub const CDN_TYPECHANGE: ::UINT = CDN_FIRST - 0x0006; +pub const CDN_INCLUDEITEM: ::UINT = CDN_FIRST - 0x0007; +pub const CDM_FIRST: ::UINT = ::WM_USER + 100; +pub const CDM_LAST: ::UINT = ::WM_USER + 200; +pub const CDM_GETSPEC: ::UINT = CDM_FIRST + 0x0000; +pub const CDM_GETFILEPATH: ::UINT = CDM_FIRST + 0x0001; +pub const CDM_GETFOLDERPATH: ::UINT = CDM_FIRST + 0x0002; +pub const CDM_GETFOLDERIDLIST: ::UINT = CDM_FIRST + 0x0003; +pub const CDM_SETCONTROLTEXT: ::UINT = CDM_FIRST + 0x0004; +pub const CDM_HIDECONTROL: ::UINT = CDM_FIRST + 0x0005; +pub const CDM_SETDEFEXT: ::UINT = CDM_FIRST + 0x0006; +STRUCT!{nodebug struct CHOOSECOLORA { + lStructSize: ::DWORD, + hwndOwner: ::HWND, + hInstance: ::HWND, + rgbResult: ::COLORREF, + lpCustColors: *mut ::COLORREF, + Flags: ::DWORD, + lCustData: ::LPARAM, + lpfnHook: LPCCHOOKPROC, + lpTemplateName: ::LPCSTR, +}} +pub type LPCHOOSECOLORA = *mut CHOOSECOLORA; +STRUCT!{nodebug struct CHOOSECOLORW { + lStructSize: ::DWORD, + hwndOwner: ::HWND, + hInstance: ::HWND, + rgbResult: ::COLORREF, + lpCustColors: *mut ::COLORREF, + Flags: ::DWORD, + lCustData: ::LPARAM, + lpfnHook: LPCCHOOKPROC, + lpTemplateName: ::LPCWSTR, +}} +pub type LPCHOOSECOLORW = *mut CHOOSECOLORW; +pub const CC_RGBINIT: ::DWORD = 0x00000001; +pub const CC_FULLOPEN: ::DWORD = 0x00000002; +pub const CC_PREVENTFULLOPEN: ::DWORD = 0x00000004; +pub const CC_SHOWHELP: ::DWORD = 0x00000008; +pub const CC_ENABLEHOOK: ::DWORD = 0x00000010; +pub const CC_ENABLETEMPLATE: ::DWORD = 0x00000020; +pub const CC_ENABLETEMPLATEHANDLE: ::DWORD = 0x00000040; +pub const CC_SOLIDCOLOR: ::DWORD = 0x00000080; +pub const CC_ANYCOLOR: ::DWORD = 0x00000100; +pub type LPFRHOOKPROC = Option<unsafe extern "system" fn( + ::HWND, ::UINT, ::WPARAM, ::LPARAM, +) -> ::UINT_PTR>; +STRUCT!{nodebug struct FINDREPLACEA { + lStructSize: ::DWORD, + hwndOwner: ::HWND, + hInstance: ::HINSTANCE, + Flags: ::DWORD, + lpstrFindWhat: ::LPSTR, + lpstrReplaceWith: ::LPSTR, + wFindWhatLen: ::WORD, + wReplaceWithLen: ::WORD, + lCustData: ::LPARAM, + lpfnHook: LPFRHOOKPROC, + lpTemplateName: ::LPCSTR, +}} +pub type LPFINDREPLACEA = *mut FINDREPLACEA; +STRUCT!{nodebug struct FINDREPLACEW { + lStructSize: ::DWORD, + hwndOwner: ::HWND, + hInstance: ::HINSTANCE, + Flags: ::DWORD, + lpstrFindWhat: ::LPWSTR, + lpstrReplaceWith: ::LPWSTR, + wFindWhatLen: ::WORD, + wReplaceWithLen: ::WORD, + lCustData: ::LPARAM, + lpfnHook: LPFRHOOKPROC, + lpTemplateName: ::LPCWSTR, +}} +pub type LPFINDREPLACEW = *mut FINDREPLACEW; +pub const FR_DOWN: ::DWORD = 0x00000001; +pub const FR_WHOLEWORD: ::DWORD = 0x00000002; +pub const FR_MATCHCASE: ::DWORD = 0x00000004; +pub const FR_FINDNEXT: ::DWORD = 0x00000008; +pub const FR_REPLACE: ::DWORD = 0x00000010; +pub const FR_REPLACEALL: ::DWORD = 0x00000020; +pub const FR_DIALOGTERM: ::DWORD = 0x00000040; +pub const FR_SHOWHELP: ::DWORD = 0x00000080; +pub const FR_ENABLEHOOK: ::DWORD = 0x00000100; +pub const FR_ENABLETEMPLATE: ::DWORD = 0x00000200; +pub const FR_NOUPDOWN: ::DWORD = 0x00000400; +pub const FR_NOMATCHCASE: ::DWORD = 0x00000800; +pub const FR_NOWHOLEWORD: ::DWORD = 0x00001000; +pub const FR_ENABLETEMPLATEHANDLE: ::DWORD = 0x00002000; +pub const FR_HIDEUPDOWN: ::DWORD = 0x00004000; +pub const FR_HIDEMATCHCASE: ::DWORD = 0x00008000; +pub const FR_HIDEWHOLEWORD: ::DWORD = 0x00010000; +pub const FR_RAW: ::DWORD = 0x00020000; +pub const FR_MATCHDIAC: ::DWORD = 0x20000000; +pub const FR_MATCHKASHIDA: ::DWORD = 0x40000000; +pub const FR_MATCHALEFHAMZA: ::DWORD = 0x80000000; +pub type LPCFHOOKPROC = Option<unsafe extern "system" fn( + ::HWND, ::UINT, ::WPARAM, ::LPARAM, +) -> ::UINT_PTR>; +STRUCT!{nodebug struct CHOOSEFONTA { + lStructSize: ::DWORD, + hwndOwner: ::HWND, + hDC: ::HDC, + lpLogFont: ::LPLOGFONTA, + iPointSize: ::INT, + Flags: ::DWORD, + rgbColors: ::COLORREF, + lCustData: ::LPARAM, + lpfnHook: LPCFHOOKPROC, + lpTemplateName: ::LPCSTR, + hInstance: ::HINSTANCE, + lpszStyle: ::LPSTR, + nFontType: ::WORD, + ___MISSING_ALIGNMENT__: ::WORD, + nSizeMin: ::INT, + nSizeMax: ::INT, +}} +pub type LPCHOOSEFONTA = *mut CHOOSEFONTA; +STRUCT!{nodebug struct CHOOSEFONTW { + lStructSize: ::DWORD, + hwndOwner: ::HWND, + hDC: ::HDC, + lpLogFont: ::LPLOGFONTW, + iPointSize: ::INT, + Flags: ::DWORD, + rgbColors: ::COLORREF, + lCustData: ::LPARAM, + lpfnHook: LPCFHOOKPROC, + lpTemplateName: ::LPCWSTR, + hInstance: ::HINSTANCE, + lpszStyle: ::LPWSTR, + nFontType: ::WORD, + ___MISSING_ALIGNMENT__: ::WORD, + nSizeMin: ::INT, + nSizeMax: ::INT, +}} +pub type LPCHOOSEFONTW = *mut CHOOSEFONTW; +pub const CF_SCREENFONTS: ::DWORD = 0x00000001; +pub const CF_PRINTERFONTS: ::DWORD = 0x00000002; +pub const CF_BOTH: ::DWORD = CF_SCREENFONTS | CF_PRINTERFONTS; +pub const CF_SHOWHELP: ::DWORD = 0x00000004; +pub const CF_ENABLEHOOK: ::DWORD = 0x00000008; +pub const CF_ENABLETEMPLATE: ::DWORD = 0x00000010; +pub const CF_ENABLETEMPLATEHANDLE: ::DWORD = 0x00000020; +pub const CF_INITTOLOGFONTSTRUCT: ::DWORD = 0x00000040; +pub const CF_USESTYLE: ::DWORD = 0x00000080; +pub const CF_EFFECTS: ::DWORD = 0x00000100; +pub const CF_APPLY: ::DWORD = 0x00000200; +pub const CF_ANSIONLY: ::DWORD = 0x00000400; +pub const CF_SCRIPTSONLY: ::DWORD = CF_ANSIONLY; +pub const CF_NOVECTORFONTS: ::DWORD = 0x00000800; +pub const CF_NOOEMFONTS: ::DWORD = CF_NOVECTORFONTS; +pub const CF_NOSIMULATIONS: ::DWORD = 0x00001000; +pub const CF_LIMITSIZE: ::DWORD = 0x00002000; +pub const CF_FIXEDPITCHONLY: ::DWORD = 0x00004000; +pub const CF_WYSIWYG: ::DWORD = 0x00008000; +pub const CF_FORCEFONTEXIST: ::DWORD = 0x00010000; +pub const CF_SCALABLEONLY: ::DWORD = 0x00020000; +pub const CF_TTONLY: ::DWORD = 0x00040000; +pub const CF_NOFACESEL: ::DWORD = 0x00080000; +pub const CF_NOSTYLESEL: ::DWORD = 0x00100000; +pub const CF_NOSIZESEL: ::DWORD = 0x00200000; +pub const CF_SELECTSCRIPT: ::DWORD = 0x00400000; +pub const CF_NOSCRIPTSEL: ::DWORD = 0x00800000; +pub const CF_NOVERTFONTS: ::DWORD = 0x01000000; +pub const CF_INACTIVEFONTS: ::DWORD = 0x02000000; +pub const SIMULATED_FONTTYPE: ::WORD = 0x8000; +pub const PRINTER_FONTTYPE: ::WORD = 0x4000; +pub const SCREEN_FONTTYPE: ::WORD = 0x2000; +pub const BOLD_FONTTYPE: ::WORD = 0x0100; +pub const ITALIC_FONTTYPE: ::WORD = 0x0200; +pub const REGULAR_FONTTYPE: ::WORD = 0x0400; +pub const PS_OPENTYPE_FONTTYPE: ::DWORD = 0x10000; +pub const TT_OPENTYPE_FONTTYPE: ::DWORD = 0x20000; +pub const TYPE1_FONTTYPE: ::DWORD = 0x40000; +pub const SYMBOL_FONTTYPE: ::DWORD = 0x80000; +pub const WM_CHOOSEFONT_GETLOGFONT: ::UINT = ::WM_USER + 1; +pub const WM_CHOOSEFONT_SETLOGFONT: ::UINT = ::WM_USER + 101; +pub const WM_CHOOSEFONT_SETFLAGS: ::UINT = ::WM_USER + 102; +pub const CD_LBSELNOITEMS: ::WORD = 0 - 1; +pub const CD_LBSELCHANGE: ::WORD = 0; +pub const CD_LBSELSUB: ::WORD = 1; +pub const CD_LBSELADD: ::WORD = 2; +pub type LPPRINTHOOKPROC = Option<unsafe extern "system" fn( + ::HWND, ::UINT, ::WPARAM, ::LPARAM, +) -> ::UINT_PTR>; +pub type LPSETUPHOOKPROC = Option<unsafe extern "system" fn( + ::HWND, ::UINT, ::WPARAM, ::LPARAM, +) -> ::UINT_PTR>; +STRUCT!{nodebug struct PRINTDLGA { + lStructSize: ::DWORD, + hwndOwner: ::HWND, + hDevMode: ::HGLOBAL, + hDevNames: ::HGLOBAL, + hDC: ::HDC, + Flags: ::DWORD, + nFromPage: ::WORD, + nToPage: ::WORD, + nMinPage: ::WORD, + nMaxPage: ::WORD, + nCopies: ::WORD, + hInstance: ::HINSTANCE, + lCustData: ::LPARAM, + lpfnPrintHook: LPPRINTHOOKPROC, + lpfnSetupHook: LPSETUPHOOKPROC, + lpPrintTemplateName: ::LPCSTR, + lpSetupTemplateName: ::LPCSTR, + hPrintTemplate: ::HGLOBAL, + hSetupTemplate: ::HGLOBAL, +}} +pub type LPPRINTDLGA = *mut PRINTDLGA; +STRUCT!{nodebug struct PRINTDLGW { + lStructSize: ::DWORD, + hwndOwner: ::HWND, + hDevMode: ::HGLOBAL, + hDevNames: ::HGLOBAL, + hDC: ::HDC, + Flags: ::DWORD, + nFromPage: ::WORD, + nToPage: ::WORD, + nMinPage: ::WORD, + nMaxPage: ::WORD, + nCopies: ::WORD, + hInstance: ::HINSTANCE, + lCustData: ::LPARAM, + lpfnPrintHook: LPPRINTHOOKPROC, + lpfnSetupHook: LPSETUPHOOKPROC, + lpPrintTemplateName: ::LPCWSTR, + lpSetupTemplateName: ::LPCWSTR, + hPrintTemplate: ::HGLOBAL, + hSetupTemplate: ::HGLOBAL, +}} +pub type LPPRINTDLGW = *mut PRINTDLGW; +RIDL!( +interface IPrintDialogCallback(IPrintDialogCallbackVtbl) : IUnknown(IUnknownVtbl) { + fn InitDone(&mut self) -> ::HRESULT, + fn SelectionChange(&mut self) -> ::HRESULT, + fn HandleMessage( + &mut self, hDlg: ::HWND, uMsg: ::UINT, wParam: ::WPARAM, lParam: ::LPARAM, + pResult: *mut ::LRESULT + ) -> ::HRESULT +} +); +RIDL!( +interface IPrintDialogServices(IPrintDialogServicesVtbl) : IUnknown(IUnknownVtbl) { + fn GetCurrentDevMode(&mut self, pDevMode: ::LPDEVMODEW, pcbSize: *mut ::UINT) -> ::HRESULT, + fn GetCurrentPrinterName(&mut self, pPrinterName: ::LPWSTR, pcchSize: *mut ::UINT) -> ::HRESULT, + fn GetCurrentPortName(&mut self, pPortName: ::LPWSTR, pcchSize: *mut ::UINT) -> ::HRESULT +} +); +STRUCT!{struct PRINTPAGERANGE { + nFromPage: ::DWORD, + nToPage: ::DWORD, +}} +pub type LPPRINTPAGERANGE = *mut PRINTPAGERANGE; +pub type PCPRINTPAGERANGE = *const PRINTPAGERANGE; +STRUCT!{struct PRINTDLGEXA { + lStructSize: ::DWORD, + hwndOwner: ::HWND, + hDevMode: ::HGLOBAL, + hDevNames: ::HGLOBAL, + hDC: ::HDC, + Flags: ::DWORD, + Flags2: ::DWORD, + ExclusionFlags: ::DWORD, + nPageRanges: ::DWORD, + nMaxPageRanges: ::DWORD, + lpPageRanges: LPPRINTPAGERANGE, + nMinPage: ::DWORD, + nMaxPage: ::DWORD, + nCopies: ::DWORD, + hInstance: ::HINSTANCE, + lpPrintTemplateName: ::LPCSTR, + lpCallback: ::LPUNKNOWN, + nPropertyPages: ::DWORD, + lphPropertyPages: *mut ::HPROPSHEETPAGE, + nStartPage: ::DWORD, + dwResultAction: ::DWORD, +}} +pub type LPPRINTDLGEXA = *mut PRINTDLGEXA; +STRUCT!{struct PRINTDLGEXW { + lStructSize: ::DWORD, + hwndOwner: ::HWND, + hDevMode: ::HGLOBAL, + hDevNames: ::HGLOBAL, + hDC: ::HDC, + Flags: ::DWORD, + Flags2: ::DWORD, + ExclusionFlags: ::DWORD, + nPageRanges: ::DWORD, + nMaxPageRanges: ::DWORD, + lpPageRanges: LPPRINTPAGERANGE, + nMinPage: ::DWORD, + nMaxPage: ::DWORD, + nCopies: ::DWORD, + hInstance: ::HINSTANCE, + lpPrintTemplateName: ::LPCWSTR, + lpCallback: ::LPUNKNOWN, + nPropertyPages: ::DWORD, + lphPropertyPages: *mut ::HPROPSHEETPAGE, + nStartPage: ::DWORD, + dwResultAction: ::DWORD, +}} +pub type LPPRINTDLGEXW = *mut PRINTDLGEXW; +pub const PD_ALLPAGES: ::DWORD = 0x00000000; +pub const PD_SELECTION: ::DWORD = 0x00000001; +pub const PD_PAGENUMS: ::DWORD = 0x00000002; +pub const PD_NOSELECTION: ::DWORD = 0x00000004; +pub const PD_NOPAGENUMS: ::DWORD = 0x00000008; +pub const PD_COLLATE: ::DWORD = 0x00000010; +pub const PD_PRINTTOFILE: ::DWORD = 0x00000020; +pub const PD_PRINTSETUP: ::DWORD = 0x00000040; +pub const PD_NOWARNING: ::DWORD = 0x00000080; +pub const PD_RETURNDC: ::DWORD = 0x00000100; +pub const PD_RETURNIC: ::DWORD = 0x00000200; +pub const PD_RETURNDEFAULT: ::DWORD = 0x00000400; +pub const PD_SHOWHELP: ::DWORD = 0x00000800; +pub const PD_ENABLEPRINTHOOK: ::DWORD = 0x00001000; +pub const PD_ENABLESETUPHOOK: ::DWORD = 0x00002000; +pub const PD_ENABLEPRINTTEMPLATE: ::DWORD = 0x00004000; +pub const PD_ENABLESETUPTEMPLATE: ::DWORD = 0x00008000; +pub const PD_ENABLEPRINTTEMPLATEHANDLE: ::DWORD = 0x00010000; +pub const PD_ENABLESETUPTEMPLATEHANDLE: ::DWORD = 0x00020000; +pub const PD_USEDEVMODECOPIES: ::DWORD = 0x00040000; +pub const PD_USEDEVMODECOPIESANDCOLLATE: ::DWORD = 0x00040000; +pub const PD_DISABLEPRINTTOFILE: ::DWORD = 0x00080000; +pub const PD_HIDEPRINTTOFILE: ::DWORD = 0x00100000; +pub const PD_NONETWORKBUTTON: ::DWORD = 0x00200000; +pub const PD_CURRENTPAGE: ::DWORD = 0x00400000; +pub const PD_NOCURRENTPAGE: ::DWORD = 0x00800000; +pub const PD_EXCLUSIONFLAGS: ::DWORD = 0x01000000; +pub const PD_USELARGETEMPLATE: ::DWORD = 0x10000000; +pub const PD_EXCL_COPIESANDCOLLATE: ::DWORD = ::DM_COPIES | ::DM_COLLATE; +pub const START_PAGE_GENERAL: ::DWORD = 0xffffffff; +pub const PD_RESULT_CANCEL: ::DWORD = 0; +pub const PD_RESULT_PRINT: ::DWORD = 1; +pub const PD_RESULT_APPLY: ::DWORD = 2; +STRUCT!{struct DEVNAMES { + wDriverOffset: ::WORD, + wDeviceOffset: ::WORD, + wOutputOffset: ::WORD, + wDefault: ::WORD, +}} +pub type LPDEVNAMES = *mut DEVNAMES; +pub type PCDEVNAMES = *const DEVNAMES; +pub const DN_DEFAULTPRN: ::WORD = 0x0001; +pub const WM_PSD_PAGESETUPDLG: ::UINT = ::WM_USER; +pub const WM_PSD_FULLPAGERECT: ::UINT = ::WM_USER + 1; +pub const WM_PSD_MINMARGINRECT: ::UINT = ::WM_USER + 2; +pub const WM_PSD_MARGINRECT: ::UINT = ::WM_USER + 3; +pub const WM_PSD_GREEKTEXTRECT: ::UINT = ::WM_USER + 4; +pub const WM_PSD_ENVSTAMPRECT: ::UINT = ::WM_USER + 5; +pub const WM_PSD_YAFULLPAGERECT: ::UINT = ::WM_USER + 6; +pub type LPPAGEPAINTHOOK = Option<unsafe extern "system" fn( + ::HWND, ::UINT, ::WPARAM, ::LPARAM, +) -> ::UINT_PTR>; +pub type LPPAGESETUPHOOK = Option<unsafe extern "system" fn( + ::HWND, ::UINT, ::WPARAM, ::LPARAM, +) -> ::UINT_PTR>; +STRUCT!{nodebug struct PAGESETUPDLGA { + lStructSize: ::DWORD, + hwndOwner: ::HWND, + hDevMode: ::HGLOBAL, + hDevNames: ::HGLOBAL, + Flags: ::DWORD, + ptPaperSize: ::POINT, + rtMinMargin: ::RECT, + rtMargin: ::RECT, + hInstance: ::HINSTANCE, + lCustData: ::LPARAM, + lpfnPageSetupHook: LPPAGESETUPHOOK, + lpfnPagePaintHook: LPPAGEPAINTHOOK, + lpPageSetupTemplateName: ::LPCSTR, + hPageSetupTemplate: ::HGLOBAL, +}} +pub type LPPAGESETUPDLGA = *mut PAGESETUPDLGA; +STRUCT!{nodebug struct PAGESETUPDLGW { + lStructSize: ::DWORD, + hwndOwner: ::HWND, + hDevMode: ::HGLOBAL, + hDevNames: ::HGLOBAL, + Flags: ::DWORD, + ptPaperSize: ::POINT, + rtMinMargin: ::RECT, + rtMargin: ::RECT, + hInstance: ::HINSTANCE, + lCustData: ::LPARAM, + lpfnPageSetupHook: LPPAGESETUPHOOK, + lpfnPagePaintHook: LPPAGEPAINTHOOK, + lpPageSetupTemplateName: ::LPCWSTR, + hPageSetupTemplate: ::HGLOBAL, +}} +pub type LPPAGESETUPDLGW = *mut PAGESETUPDLGW; +pub const PSD_DEFAULTMINMARGINS: ::DWORD = 0x00000000; +pub const PSD_INWININIINTLMEASURE: ::DWORD = 0x00000000; +pub const PSD_MINMARGINS: ::DWORD = 0x00000001; +pub const PSD_MARGINS: ::DWORD = 0x00000002; +pub const PSD_INTHOUSANDTHSOFINCHES: ::DWORD = 0x00000004; +pub const PSD_INHUNDREDTHSOFMILLIMETERS: ::DWORD = 0x00000008; +pub const PSD_DISABLEMARGINS: ::DWORD = 0x00000010; +pub const PSD_DISABLEPRINTER: ::DWORD = 0x00000020; +pub const PSD_NOWARNING: ::DWORD = 0x00000080; +pub const PSD_DISABLEORIENTATION: ::DWORD = 0x00000100; +pub const PSD_RETURNDEFAULT: ::DWORD = 0x00000400; +pub const PSD_DISABLEPAPER: ::DWORD = 0x00000200; +pub const PSD_SHOWHELP: ::DWORD = 0x00000800; +pub const PSD_ENABLEPAGESETUPHOOK: ::DWORD = 0x00002000; +pub const PSD_ENABLEPAGESETUPTEMPLATE: ::DWORD = 0x00008000; +pub const PSD_ENABLEPAGESETUPTEMPLATEHANDLE: ::DWORD = 0x00020000; +pub const PSD_ENABLEPAGEPAINTHOOK: ::DWORD = 0x00040000; +pub const PSD_DISABLEPAGEPAINTING: ::DWORD = 0x00080000; +pub const PSD_NONETWORKBUTTON: ::DWORD = 0x00200000; diff --git a/deps/winapi-0.2.5/src/corsym.rs b/deps/winapi-0.2.6/src/corsym.rs similarity index 100% rename from deps/winapi-0.2.5/src/corsym.rs rename to deps/winapi-0.2.6/src/corsym.rs diff --git a/deps/winapi-0.2.6/src/d2d1.rs b/deps/winapi-0.2.6/src/d2d1.rs new file mode 100644 index 000000000..1b1b03980 --- /dev/null +++ b/deps/winapi-0.2.6/src/d2d1.rs @@ -0,0 +1,734 @@ +// Copyright © 2015, Connor Hilarides +// Licensed under the MIT License <LICENSE.md> +//! Mappings for the contents of d2d1.h +// Types confirmed affected by the ABI issue: +// D2D1_SIZE_F, D2D1_SIZE_U, D2D1_COLOR_F, D2D1_PIXEL_FORMAT, +// D2D1_POINT_2F +pub const D2D1_DEFAULT_FLATTENING_TOLERANCE: ::FLOAT = 0.25; +pub const D2D1_INTERPOLATION_MODE_DEFINITION_NEAREST_NEIGHBOR: ::DWORD = 0; +pub const D2D1_INTERPOLATION_MODE_DEFINITION_LINEAR: ::DWORD = 1; +pub const D2D1_INTERPOLATION_MODE_DEFINITION_CUBIC: ::DWORD = 2; +pub const D2D1_INTERPOLATION_MODE_DEFINITION_MULTI_SAMPLE_LINEAR: ::DWORD = 3; +pub const D2D1_INTERPOLATION_MODE_DEFINITION_ANISOTROPIC: ::DWORD = 4; +pub const D2D1_INTERPOLATION_MODE_DEFINITION_HIGH_QUALITY_CUBIC: ::DWORD = 5; +pub const D2D1_INTERPOLATION_MODE_DEFINITION_FANT: ::DWORD = 6; +pub const D2D1_INTERPOLATION_MODE_DEFINITION_MIPMAP_LINEAR: ::DWORD = 7; +ENUM!{enum D2D1_GAMMA { + D2D1_GAMMA_2_2 = 0, + D2D1_GAMMA_1_0 = 1, +}} +ENUM!{enum D2D1_OPACITY_MASK_CONTENT { + D2D1_OPACITY_MASK_CONTENT_GRAPHICS = 0, + D2D1_OPACITY_MASK_CONTENT_TEXT_NATURAL = 1, + D2D1_OPACITY_MASK_CONTENT_TEXT_GDI_COMPATIBLE = 2, +}} +ENUM!{enum D2D1_EXTEND_MODE { + D2D1_EXTEND_MODE_CLAMP = 0, + D2D1_EXTEND_MODE_WRAP = 1, + D2D1_EXTEND_MODE_MIRROR = 2, +}} +ENUM!{enum D2D1_ANTIALIAS_MODE { + D2D1_ANTIALIAS_MODE_PER_PRIMITIVE = 0, + D2D1_ANTIALIAS_MODE_ALIASED = 1, +}} +ENUM!{enum D2D1_TEXT_ANTIALIAS_MODE { + D2D1_TEXT_ANTIALIAS_MODE_DEFAULT = 0, + D2D1_TEXT_ANTIALIAS_MODE_CLEARTYPE = 1, + D2D1_TEXT_ANTIALIAS_MODE_GRAYSCALE = 2, + D2D1_TEXT_ANTIALIAS_MODE_ALIASED = 3, +}} +ENUM!{enum D2D1_BITMAP_INTERPOLATION_MODE { + D2D1_BITMAP_INTERPOLATION_MODE_NEAREST_NEIGHBOR = + D2D1_INTERPOLATION_MODE_DEFINITION_NEAREST_NEIGHBOR, + D2D1_BITMAP_INTERPOLATION_MODE_LINEAR = + D2D1_INTERPOLATION_MODE_DEFINITION_LINEAR, +}} +FLAGS!{enum D2D1_DRAW_TEXT_OPTIONS { + D2D1_DRAW_TEXT_OPTIONS_NO_SNAP = 0x00000001, + D2D1_DRAW_TEXT_OPTIONS_CLIP = 0x00000002, + D2D1_DRAW_TEXT_OPTIONS_ENABLE_COLOR_FONT = 0x00000004, + D2D1_DRAW_TEXT_OPTIONS_NONE = 0x00000000, +}} +pub type D2D1_POINT_2U = ::D2D_POINT_2U; +pub type D2D1_POINT_2F = ::D2D_POINT_2F; +pub type D2D1_RECT_F = ::D2D_RECT_F; +pub type D2D1_RECT_U = ::D2D_RECT_U; +pub type D2D1_SIZE_F = ::D2D_SIZE_F; +pub type D2D1_SIZE_U = ::D2D_SIZE_U; +pub type D2D1_COLOR_F = ::D2D_COLOR_F; +pub type D2D1_MATRIX_3X2_F = ::D2D_MATRIX_3X2_F; +pub type D2D1_TAG = ::UINT64; +STRUCT!{struct D2D1_BITMAP_PROPERTIES { + pixelFormat: ::D2D1_PIXEL_FORMAT, + dpiX: ::FLOAT, + dpiY: ::FLOAT, +}} +STRUCT!{struct D2D1_GRADIENT_STOP { + position: ::FLOAT, + color: D2D1_COLOR_F, +}} +STRUCT!{struct D2D1_BRUSH_PROPERTIES { + opacity: ::FLOAT, + transform: D2D1_MATRIX_3X2_F, +}} +STRUCT!{struct D2D1_BITMAP_BRUSH_PROPERTIES { + extendModeX: D2D1_EXTEND_MODE, + extendModeY: D2D1_EXTEND_MODE, + interpolationMode: D2D1_BITMAP_INTERPOLATION_MODE, +}} +STRUCT!{struct D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES { + startPoint: ::D2D1_POINT_2F, + endPoint: ::D2D1_POINT_2F, +}} +STRUCT!{struct D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES { + center: ::D2D1_POINT_2F, + gradientOriginOffset: ::D2D1_POINT_2F, + radiusX: ::FLOAT, + radiusY: ::FLOAT, +}} +ENUM!{enum D2D1_ARC_SIZE { + D2D1_ARC_SIZE_SMALL = 0, + D2D1_ARC_SIZE_LARGE = 1, +}} +ENUM!{enum D2D1_CAP_STYLE { + D2D1_CAP_STYLE_FLAT = 0, + D2D1_CAP_STYLE_SQUARE = 1, + D2D1_CAP_STYLE_ROUND = 2, + D2D1_CAP_STYLE_TRIANGLE = 3, +}} +ENUM!{enum D2D1_DASH_STYLE { + D2D1_DASH_STYLE_SOLID = 0, + D2D1_DASH_STYLE_DASH = 1, + D2D1_DASH_STYLE_DOT = 2, + D2D1_DASH_STYLE_DASH_DOT = 3, + D2D1_DASH_STYLE_DASH_DOT_DOT = 4, + D2D1_DASH_STYLE_CUSTOM = 5, +}} +ENUM!{enum D2D1_LINE_JOIN { + D2D1_LINE_JOIN_MITER = 0, + D2D1_LINE_JOIN_BEVEL = 1, + D2D1_LINE_JOIN_ROUND = 2, + D2D1_LINE_JOIN_MITER_OR_BEVEL = 3, +}} +ENUM!{enum D2D1_COMBINE_MODE { + D2D1_COMBINE_MODE_UNION = 0, + D2D1_COMBINE_MODE_INTERSECT = 1, + D2D1_COMBINE_MODE_XOR = 2, + D2D1_COMBINE_MODE_EXCLUDE = 3, +}} +ENUM!{enum D2D1_GEOMETRY_RELATION { + D2D1_GEOMETRY_RELATION_UNKNOWN = 0, + D2D1_GEOMETRY_RELATION_DISJOINT = 1, + D2D1_GEOMETRY_RELATION_IS_CONTAINED = 2, + D2D1_GEOMETRY_RELATION_CONTAINS = 3, + D2D1_GEOMETRY_RELATION_OVERLAP = 4, +}} +ENUM!{enum D2D1_GEOMETRY_SIMPLIFICATION_OPTION { + D2D1_GEOMETRY_SIMPLIFICATION_OPTION_CUBICS_AND_LINES = 0, + D2D1_GEOMETRY_SIMPLIFICATION_OPTION_LINES = 1, +}} +ENUM!{enum D2D1_FIGURE_BEGIN { + D2D1_FIGURE_BEGIN_FILLED = 0, + D2D1_FIGURE_BEGIN_HOLLOW = 1, +}} +ENUM!{enum D2D1_FIGURE_END { + D2D1_FIGURE_END_OPEN = 0, + D2D1_FIGURE_END_CLOSED = 1, +}} +STRUCT!{struct D2D1_BEZIER_SEGMENT { + point1: ::D2D1_POINT_2F, + point2: ::D2D1_POINT_2F, + point3: ::D2D1_POINT_2F, +}} +STRUCT!{struct D2D1_TRIANGLE { + point1: ::D2D1_POINT_2F, + point2: ::D2D1_POINT_2F, + point3: ::D2D1_POINT_2F, +}} +FLAGS!{enum D2D1_PATH_SEGMENT { + D2D1_PATH_SEGMENT_NONE = 0x00000000, + D2D1_PATH_SEGMENT_FORCE_UNSTROKED = 0x00000001, + D2D1_PATH_SEGMENT_FORCE_ROUND_LINE_JOIN = 0x00000002, +}} +ENUM!{enum D2D1_SWEEP_DIRECTION { + D2D1_SWEEP_DIRECTION_COUNTER_CLOCKWISE = 0, + D2D1_SWEEP_DIRECTION_CLOCKWISE = 1, +}} +ENUM!{enum D2D1_FILL_MODE { + D2D1_FILL_MODE_ALTERNATE = 0, + D2D1_FILL_MODE_WINDING = 1, +}} +STRUCT!{struct D2D1_ARC_SEGMENT { + point: ::D2D1_POINT_2F, + size: D2D1_SIZE_F, + rotationAngle: ::FLOAT, + sweepDirection: D2D1_SWEEP_DIRECTION, + arcSize: D2D1_ARC_SIZE, +}} +STRUCT!{struct D2D1_QUADRATIC_BEZIER_SEGMENT { + point1: ::D2D1_POINT_2F, + point2: ::D2D1_POINT_2F, +}} +STRUCT!{struct D2D1_ELLIPSE { + point: ::D2D1_POINT_2F, + radiusX: ::FLOAT, + radiusY: ::FLOAT, +}} +STRUCT!{struct D2D1_ROUNDED_RECT { + rect: ::D2D1_RECT_F, + radiusX: ::FLOAT, + radiusY: ::FLOAT, +}} +STRUCT!{struct D2D1_STROKE_STYLE_PROPERTIES { + startCap: D2D1_CAP_STYLE, + endCap: D2D1_CAP_STYLE, + dashCap: D2D1_CAP_STYLE, + lineJoin: D2D1_LINE_JOIN, + miterLimit: ::FLOAT, + dashStyle: D2D1_DASH_STYLE, + dashOffset: ::FLOAT, +}} +FLAGS!{enum D2D1_LAYER_OPTIONS { + D2D1_LAYER_OPTIONS_NONE = 0x00000000, + D2D1_LAYER_OPTIONS_INITIALIZE_FOR_CLEARTYPE = 0x00000001, +}} +STRUCT!{struct D2D1_LAYER_PARAMETERS { + contentBounds: ::D2D1_RECT_F, + geometricMask: *mut ID2D1Geometry, + maskAntialiasMode: D2D1_ANTIALIAS_MODE, + maskTransform: D2D1_MATRIX_3X2_F, + opacity: ::FLOAT, + opacityBrush: *mut ID2D1Brush, + layerOptions: D2D1_LAYER_OPTIONS, +}} +ENUM!{enum D2D1_WINDOW_STATE { + D2D1_WINDOW_STATE_NONE = 0x0000000, + D2D1_WINDOW_STATE_OCCLUDED = 0x0000001, +}} +ENUM!{enum D2D1_RENDER_TARGET_TYPE { + D2D1_RENDER_TARGET_TYPE_DEFAULT = 0, + D2D1_RENDER_TARGET_TYPE_SOFTWARE = 1, + D2D1_RENDER_TARGET_TYPE_HARDWARE = 2, +}} +ENUM!{enum D2D1_FEATURE_LEVEL { + D2D1_FEATURE_LEVEL_DEFAULT = 0, + D2D1_FEATURE_LEVEL_9 = ::D3D_FEATURE_LEVEL_9_1.0, + D2D1_FEATURE_LEVEL_10 = ::D3D_FEATURE_LEVEL_10_0.0, +}} +FLAGS!{enum D2D1_RENDER_TARGET_USAGE { + D2D1_RENDER_TARGET_USAGE_NONE = 0x00000000, + D2D1_RENDER_TARGET_USAGE_FORCE_BITMAP_REMOTING = 0x00000001, + D2D1_RENDER_TARGET_USAGE_GDI_COMPATIBLE = 0x00000002, +}} +FLAGS!{enum D2D1_PRESENT_OPTIONS { + D2D1_PRESENT_OPTIONS_NONE = 0x00000000, + D2D1_PRESENT_OPTIONS_RETAIN_CONTENTS = 0x00000001, + D2D1_PRESENT_OPTIONS_IMMEDIATELY = 0x00000002, +}} +STRUCT!{struct D2D1_RENDER_TARGET_PROPERTIES { + _type: D2D1_RENDER_TARGET_TYPE, + pixelFormat: ::D2D1_PIXEL_FORMAT, + dpiX: ::FLOAT, + dpiY: ::FLOAT, + usage: D2D1_RENDER_TARGET_USAGE, + minLevel: D2D1_FEATURE_LEVEL, +}} +STRUCT!{struct D2D1_HWND_RENDER_TARGET_PROPERTIES { + hwnd: ::HWND, + pixelSize: D2D1_SIZE_U, + presentOptions: D2D1_PRESENT_OPTIONS, +}} +FLAGS!{enum D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS { + D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE = 0x00000000, + D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_GDI_COMPATIBLE = 0x00000001, +}} +STRUCT!{struct D2D1_DRAWING_STATE_DESCRIPTION { + antialiasMode: D2D1_ANTIALIAS_MODE, + textAntialiasMode: D2D1_TEXT_ANTIALIAS_MODE, + tag1: D2D1_TAG, + tag2: D2D1_TAG, + transform: D2D1_MATRIX_3X2_F, +}} +ENUM!{enum D2D1_DC_INITIALIZE_MODE { + D2D1_DC_INITIALIZE_MODE_COPY = 0, + D2D1_DC_INITIALIZE_MODE_CLEAR = 1, +}} +ENUM!{enum D2D1_DEBUG_LEVEL { + D2D1_DEBUG_LEVEL_NONE = 0, + D2D1_DEBUG_LEVEL_ERROR = 1, + D2D1_DEBUG_LEVEL_WARNING = 2, + D2D1_DEBUG_LEVEL_INFORMATION = 3, +}} +ENUM!{enum D2D1_FACTORY_TYPE { + D2D1_FACTORY_TYPE_SINGLE_THREADED = 0, + D2D1_FACTORY_TYPE_MULTI_THREADED = 1, +}} +STRUCT!{struct D2D1_FACTORY_OPTIONS { + debugLevel: D2D1_DEBUG_LEVEL, +}} +RIDL!( +interface ID2D1Resource(ID2D1ResourceVtbl): IUnknown(IUnknownVtbl) { + fn GetFactory(&mut self, factory: *mut *mut ID2D1Factory) -> () +}); +RIDL!( +interface ID2D1Image(ID2D1ImageVtbl): ID2D1Resource(ID2D1ResourceVtbl) { +}); +RIDL!( +interface ID2D1Bitmap(ID2D1BitmapVtbl): ID2D1Image(ID2D1ImageVtbl) { + fn GetSize(&mut self, ret: *mut D2D1_SIZE_F) -> *mut D2D1_SIZE_F, // FIXME: ABI issue + fn GetPixelSize(&mut self, ret: *mut D2D1_SIZE_U) -> *mut D2D1_SIZE_U, // FIXME: ABI issue + fn GetPixelFormat( + &mut self, ret: *mut ::D2D1_PIXEL_FORMAT + ) -> *mut ::D2D1_PIXEL_FORMAT, // FIXME: ABI issue + fn GetDpi(&mut self, dpiX: *mut ::FLOAT, dpiY: *mut ::FLOAT) -> (), + fn CopyFromBitmap( + &mut self, destPoint: *const ::D2D1_POINT_2U, bitmap: *mut ID2D1Bitmap, + srcRect: *const ::D2D1_RECT_U + ) -> ::HRESULT, + fn CopyFromRenderTarget( + &mut self, destPoint: *const ::D2D1_POINT_2U, renderTarget: *mut ID2D1RenderTarget, + srcRect: *const ::D2D1_RECT_U + ) -> ::HRESULT, + fn CopyFromMemory( + &mut self, dstRect: *const ::D2D1_RECT_U, srcData: *const ::c_void, pitch: ::UINT32 + ) -> ::HRESULT +}); +RIDL!( +interface ID2D1GradientStopCollection(ID2D1GradientStopCollectionVtbl) + : ID2D1Resource(ID2D1ResourceVtbl) { + fn GetGradientStopCount(&mut self) -> ::UINT32, + fn GetGradientStops( + &mut self, gradientStops: *mut D2D1_GRADIENT_STOP, gradientStopsCount: ::UINT32 + ) -> (), + fn GetColorInterpolationGamma(&mut self) -> D2D1_GAMMA, + fn GetExtendMode(&mut self) -> D2D1_EXTEND_MODE +}); +RIDL!( +interface ID2D1Brush(ID2D1BrushVtbl): ID2D1Resource(ID2D1ResourceVtbl) { + fn SetOpacity(&mut self, opacity: ::FLOAT) -> (), + fn SetTransform(&mut self, transform: *const D2D1_MATRIX_3X2_F) -> (), + fn GetOpacity(&mut self) -> ::FLOAT, + fn GetTransform(&mut self, transform: *mut D2D1_MATRIX_3X2_F) -> () +}); +RIDL!( +interface ID2D1BitmapBrush(ID2D1BitmapBrushVtbl): ID2D1Brush(ID2D1BrushVtbl) { + fn SetExtendModeX(&mut self, extendModeX: D2D1_EXTEND_MODE) -> (), + fn SetExtendModeY(&mut self, extendModeY: D2D1_EXTEND_MODE) -> (), + fn SetInterpolationMode(&mut self, interpolationMode: D2D1_BITMAP_INTERPOLATION_MODE) -> (), + fn SetBitmap(&mut self, bitmap: *mut ID2D1Bitmap) -> (), + fn GetExtendModeX(&mut self) -> D2D1_EXTEND_MODE, + fn GetExtendModeY(&mut self) -> D2D1_EXTEND_MODE, + fn GetInterpolationMode(&mut self) -> D2D1_BITMAP_INTERPOLATION_MODE, + fn GetBitmap(&mut self, bitmap: *mut *mut ID2D1Bitmap) -> () +}); +RIDL!( +interface ID2D1SolidColorBrush(ID2D1SolidColorBrushVtbl): ID2D1Brush(ID2D1BrushVtbl) { + fn SetColor(&mut self, color: *const D2D1_COLOR_F) -> (), + fn GetColor(&mut self, color: *mut D2D1_COLOR_F) -> *mut D2D1_COLOR_F +}); +RIDL!( +interface ID2D1LinearGradientBrush(ID2D1LinearGradientBrushVtbl): ID2D1Brush(ID2D1BrushVtbl) { + fn SetStartPoint(&mut self, startPoint: ::D2D1_POINT_2F) -> (), + fn SetEndPoint(&mut self, endPoint: ::D2D1_POINT_2F) -> (), + fn GetStartPoint(&mut self, ret: *mut D2D1_POINT_2F) -> *mut D2D1_POINT_2F, // FIXME ABI issue + fn GetEndPoint(&mut self, ret: *mut D2D1_POINT_2F) -> *mut D2D1_POINT_2F, // FIXME ABI issue + fn GetGradientStopCollection( + &mut self, gradientStopCollection: *mut *mut ID2D1GradientStopCollection + ) -> () +}); +RIDL!( +interface ID2D1RadialGradientBrush(ID2D1RadialGradientBrushVtbl): ID2D1Brush(ID2D1BrushVtbl) { + fn SetCenter(&mut self, center: ::D2D1_POINT_2F) -> (), + fn SetGradientOriginOffset(&mut self, gradientOriginOffset: ::D2D1_POINT_2F) -> (), + fn SetRadiusX(&mut self, radiusX: ::FLOAT) -> (), + fn SetRadiusY(&mut self, radiusY: ::FLOAT) -> (), + fn GetCenter(&mut self, ret: *mut D2D1_POINT_2F) -> *mut D2D1_POINT_2F, // FIXME ABI issue + fn GetGradientOriginOffset( + &mut self, ret: *mut D2D1_POINT_2F + ) -> *mut D2D1_POINT_2F, // FIXME ABI issue + fn GetRadiusX(&mut self) -> ::FLOAT, + fn GetRadiusY(&mut self) -> ::FLOAT, + fn GetGradientStopCollection( + &mut self, gradientStopCollection: *mut *mut ID2D1GradientStopCollection + ) -> () +}); +RIDL!( +interface ID2D1StrokeStyle(ID2D1StrokeStyleVtbl): ID2D1Resource(ID2D1ResourceVtbl) { + fn GetStartCap(&mut self) -> D2D1_CAP_STYLE, + fn GetEndCap(&mut self) -> D2D1_CAP_STYLE, + fn GetDashCap(&mut self) -> D2D1_CAP_STYLE, + fn GetMiterLimit(&mut self) -> ::FLOAT, + fn GetLineJoin(&mut self) -> D2D1_LINE_JOIN, + fn GetDashOffset(&mut self) -> ::FLOAT, + fn GetDashStyle(&mut self) -> D2D1_DASH_STYLE, + fn GetDashesCount(&mut self) -> ::UINT32, + fn GetDashes(&mut self, dashes: *mut ::FLOAT, dashesCount: ::UINT32) -> () +}); +RIDL!( +interface ID2D1Geometry(ID2D1GeometryVtbl): ID2D1Resource(ID2D1ResourceVtbl) { + fn GetBounds( + &mut self, worldTransform: *const D2D1_MATRIX_3X2_F, bounds: *mut ::D2D1_RECT_F + ) -> ::HRESULT, + fn GetWidenedBounds( + &mut self, strokeWidth: ::FLOAT, strokeStyle: *mut ID2D1StrokeStyle, + worldTransform: *const D2D1_MATRIX_3X2_F, flatteningTolerance: ::FLOAT, + bounds: *mut ::D2D1_RECT_F + ) -> ::HRESULT, + fn StrokeContainsPoint( + &mut self, point: ::D2D1_POINT_2F, strokeWidth: ::FLOAT, strokeStyle: *mut ID2D1StrokeStyle, + worldTransform: *const D2D1_MATRIX_3X2_F, flatteningTolerance: ::FLOAT, + contains: *mut ::BOOL + ) -> ::HRESULT, + fn FillContainsPoint( + &mut self, point: ::D2D1_POINT_2F, worldTransform: *const D2D1_MATRIX_3X2_F, + flatteningTolerance: ::FLOAT, contains: *mut ::BOOL + ) -> ::HRESULT, + fn CompareWithGeometry( + &mut self, inputGeometry: *mut ID2D1Geometry, + inputGeometryTransform: *const D2D1_MATRIX_3X2_F, flatteningTolerance: ::FLOAT, + relation: *mut D2D1_GEOMETRY_RELATION + ) -> ::HRESULT, + fn Simplify( + &mut self, simplificationOption: D2D1_GEOMETRY_SIMPLIFICATION_OPTION, + worldTransform: *const D2D1_MATRIX_3X2_F, flatteningTolerance: ::FLOAT, + geometrySink: *mut ID2D1SimplifiedGeometrySink + ) -> ::HRESULT, + fn Tessellate( + &mut self, worldTransform: *const D2D1_MATRIX_3X2_F, flatteningTolerance: ::FLOAT, + tessellationSink: *mut ID2D1TessellationSink + ) -> ::HRESULT, + fn CombineWithGeometry( + &mut self, inputGeometry: *mut ID2D1Geometry, combineMode: D2D1_COMBINE_MODE, + inputGeometryTransform: *const D2D1_MATRIX_3X2_F, flatteningTolerance: ::FLOAT, + geometrySink: *mut ID2D1SimplifiedGeometrySink + ) -> ::HRESULT, + fn Outline( + &mut self, worldTransform: *const D2D1_MATRIX_3X2_F, flatteningTolerance: ::FLOAT, + geometrySink: *mut ID2D1SimplifiedGeometrySink + ) -> ::HRESULT, + fn ComputeArea( + &mut self, worldTransform: *const D2D1_MATRIX_3X2_F, flatteningTolerance: ::FLOAT, + area: *mut ::FLOAT + ) -> ::HRESULT, + fn ComputeLength( + &mut self, worldTransform: *const D2D1_MATRIX_3X2_F, flatteningTolerance: ::FLOAT, + length: *mut ::FLOAT + ) -> ::HRESULT, + fn ComputePointAtLength( + &mut self, length: ::FLOAT, worldTransform: *const D2D1_MATRIX_3X2_F, + flatteningTolerance: ::FLOAT, point: *mut ::D2D1_POINT_2F, + unitTangentVector: *mut ::D2D1_POINT_2F + ) -> ::HRESULT, + fn Widen( + &mut self, strokeWidth: ::FLOAT, strokeStyle: *mut ID2D1StrokeStyle, + worldTransform: *const D2D1_MATRIX_3X2_F, flatteningTolerance: ::FLOAT, + geometrySink: *mut ID2D1SimplifiedGeometrySink + ) -> ::HRESULT +}); +RIDL!( +interface ID2D1RectangleGeometry(ID2D1RectangleGeometryVtbl): ID2D1Geometry(ID2D1GeometryVtbl) { + fn GetRect(&mut self, rect: *mut ::D2D1_RECT_F) -> () +}); +RIDL!( +interface ID2D1RoundedRectangleGeometry(ID2D1RoundedRectangleGeometryVtbl) + : ID2D1Geometry(ID2D1GeometryVtbl) { + fn GetRoundedRect(&mut self, roundedRect: *mut D2D1_ROUNDED_RECT) -> () +}); +RIDL!( +interface ID2D1EllipseGeometry(ID2D1EllipseGeometryVtbl): ID2D1Geometry(ID2D1GeometryVtbl) { + fn GetEllipse(&mut self, ellipse: *mut D2D1_ELLIPSE) -> () +}); +RIDL!( +interface ID2D1GeometryGroup(ID2D1GeometryGroupVtbl): ID2D1Geometry(ID2D1GeometryVtbl) { + fn GetFillMode(&mut self) -> D2D1_FILL_MODE, + fn GetSourceGeometryCount(&mut self) -> ::UINT32, + fn GetSourceGeometries( + &mut self, geometries: *mut *mut ID2D1Geometry, geometriesCount: ::UINT32 + ) -> () +}); +RIDL!( +interface ID2D1TransformedGeometry(ID2D1TransformedGeometryVtbl) + : ID2D1Geometry(ID2D1GeometryVtbl) { + fn GetSourceGeometry(&mut self, sourceGeometry: *mut *mut ID2D1Geometry) -> (), + fn GetTransform(&mut self, transform: *mut D2D1_MATRIX_3X2_F) -> () +}); +RIDL!( +interface ID2D1SimplifiedGeometrySink(ID2D1SimplifiedGeometrySinkVtbl): IUnknown(IUnknownVtbl) { + fn SetFillMode(&mut self, fillMode: D2D1_FILL_MODE) -> (), + fn SetSegmentFlags(&mut self, vertexFlags: D2D1_PATH_SEGMENT) -> (), + fn BeginFigure(&mut self, startPoint: ::D2D1_POINT_2F, figureBegin: D2D1_FIGURE_BEGIN) -> (), + fn AddLines(&mut self, points: *const ::D2D1_POINT_2F, pointsCount: ::UINT32) -> (), + fn AddBeziers(&mut self, beziers: *const D2D1_BEZIER_SEGMENT, beziersCount: ::UINT32) -> (), + fn EndFigure(&mut self, figureEnd: D2D1_FIGURE_END) -> (), + fn Close(&mut self) -> ::HRESULT +}); +RIDL!( +interface ID2D1GeometrySink(ID2D1GeometrySinkVtbl) + : ID2D1SimplifiedGeometrySink(ID2D1SimplifiedGeometrySinkVtbl) { + fn AddLine(&mut self, point: ::D2D1_POINT_2F) -> (), + fn AddBezier(&mut self, bezier: *const D2D1_BEZIER_SEGMENT) -> (), + fn AddQuadraticBezier(&mut self, bezier: *const D2D1_QUADRATIC_BEZIER_SEGMENT) -> (), + fn AddQuadraticBeziers( + &mut self, beziers: *const D2D1_QUADRATIC_BEZIER_SEGMENT, beziersCount: ::UINT32 + ) -> (), + fn AddArc(&mut self, arc: *const D2D1_ARC_SEGMENT) -> () +}); +RIDL!( +interface ID2D1TessellationSink(ID2D1TessellationSinkVtbl): IUnknown(IUnknownVtbl) { + fn AddTriangles(&mut self, triangles: *const D2D1_TRIANGLE, triangleCount: ::UINT32) -> (), + fn Close(&mut self) -> ::HRESULT +}); +RIDL!( +interface ID2D1PathGeometry(ID2D1PathGeometryVtbl): ID2D1Geometry(ID2D1GeometryVtbl) { + fn Open(&mut self, geometrySink: *mut *mut ID2D1GeometrySink) -> ::HRESULT, + fn Stream(&mut self, geometrySink: *mut ID2D1GeometrySink) -> ::HRESULT, + fn GetSegmentCount(&mut self, count: *mut ::UINT32) -> ::HRESULT, + fn GetFigureCount(&mut self, count: *mut ::UINT32) -> ::HRESULT +}); +RIDL!( +interface ID2D1Mesh(ID2D1MeshVtbl): ID2D1Resource(ID2D1ResourceVtbl) { + fn Open(&mut self, tessellationSink: *mut *mut ID2D1TessellationSink) -> ::HRESULT +}); +RIDL!( +interface ID2D1Layer(ID2D1LayerVtbl): ID2D1Resource(ID2D1ResourceVtbl) { + fn GetSize(&mut self, ret: *mut D2D1_SIZE_F) -> *mut D2D1_SIZE_F // FIXME: ABI issue +}); +RIDL!( +interface ID2D1DrawingStateBlock(ID2D1DrawingStateBlockVtbl): ID2D1Resource(ID2D1ResourceVtbl) { + fn GetDescription(&mut self, stateDescription: *mut D2D1_DRAWING_STATE_DESCRIPTION) -> (), + fn SetDescription(&mut self, stateDescription: *const D2D1_DRAWING_STATE_DESCRIPTION) -> (), + fn SetTextRenderingParams( + &mut self, textRenderingParams: *mut ::IDWriteRenderingParams + ) -> (), + fn GetTextRenderingParams( + &mut self, textRenderingParams: *mut *mut ::IDWriteRenderingParams + ) -> () +}); +RIDL!( +interface ID2D1RenderTarget(ID2D1RenderTargetVtbl): ID2D1Resource(ID2D1ResourceVtbl) { + fn CreateBitmap( + &mut self, size: D2D1_SIZE_U, srcData: *const ::c_void, pitch: ::UINT32, + bitmapProperties: *const D2D1_BITMAP_PROPERTIES, bitmap: *mut *mut ID2D1Bitmap + ) -> ::HRESULT, + fn CreateBitmapFromWicBitmap( + &mut self, wicBitmapSource: *mut ::IWICBitmapSource, + bitmapProperties: *const D2D1_BITMAP_PROPERTIES, bitmap: *mut *mut ID2D1Bitmap + ) -> ::HRESULT, + fn CreateSharedBitmap( + &mut self, riid: ::REFIID, data: *const ::c_void, + bitmapProperties: *const D2D1_BITMAP_PROPERTIES, bitmap: *mut *mut ID2D1Bitmap + ) -> ::HRESULT, + fn CreateBitmapBrush( + &mut self, bitmap: *mut ID2D1Bitmap, + bitmapBrushProperties: *const D2D1_BITMAP_BRUSH_PROPERTIES, + brushProperties: *const D2D1_BRUSH_PROPERTIES, bitmapBrush: *mut *mut ID2D1BitmapBrush + ) -> ::HRESULT, + fn CreateSolidColorBrush( + &mut self, color: *const D2D1_COLOR_F, brushProperties: *const D2D1_BRUSH_PROPERTIES, + solidColorBrush: *mut *mut ID2D1SolidColorBrush + ) -> ::HRESULT, + fn CreateGradientStopCollection( + &mut self, gradientStops: *const D2D1_GRADIENT_STOP, gradientStopsCount: ::UINT32, + colorInterpolationGamma: D2D1_GAMMA, extendMode: D2D1_EXTEND_MODE, + gradientStopCollection: *mut *mut ID2D1GradientStopCollection + ) -> ::HRESULT, + fn CreateLinearGradientBrush( + &mut self, linearGradientBrushProperties: *const D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES, + brushProperties: *const D2D1_BRUSH_PROPERTIES, + gradientStopCollection: *mut ID2D1GradientStopCollection, + linearGradientBrush: *mut *mut ID2D1LinearGradientBrush + ) -> ::HRESULT, + fn CreateRadialGradientBrush( + &mut self, radialGradientBrushProperties: *const D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES, + brushProperties: *const D2D1_BRUSH_PROPERTIES, + gradientStopCollection: *mut ID2D1GradientStopCollection, + radialGradientBrush: *mut *mut ID2D1RadialGradientBrush + ) -> ::HRESULT, + fn CreateCompatibleRenderTarget( + &mut self, desiredSize: *const D2D1_SIZE_F, desiredPixelSize: *const D2D1_SIZE_U, + desiredFormat: *const ::D2D1_PIXEL_FORMAT, options: D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS, + bitmapRenderTarget: *mut *mut ID2D1BitmapRenderTarget + ) -> ::HRESULT, + fn CreateLayer(&mut self, size: *const D2D1_SIZE_F, layer: *mut *mut ID2D1Layer) -> ::HRESULT, + fn CreateMesh(&mut self, mesh: *mut *mut ID2D1Mesh) -> ::HRESULT, + fn DrawLine( + &mut self, point0: ::D2D1_POINT_2F, point1: ::D2D1_POINT_2F, brush: *mut ID2D1Brush, + strokeWidth: ::FLOAT, strokeStype: *mut ID2D1StrokeStyle + ) -> (), + fn DrawRectangle( + &mut self, rect: *const ::D2D1_RECT_F, brush: *mut ID2D1Brush, + strokeWidth: ::FLOAT, strokeStyle: *mut ID2D1StrokeStyle + ) -> (), + fn FillRectangle( + &mut self, rect: *const ::D2D1_RECT_F, brush: *mut ID2D1Brush + ) -> (), + fn DrawRoundedRectangle( + &mut self, roundedRect: *const D2D1_ROUNDED_RECT, brush: *mut ID2D1Brush, + strokeWidth: ::FLOAT, strokeStyle: *mut ID2D1StrokeStyle + ) -> (), + fn FillRoundedRectangle( + &mut self, roundedRect: *const D2D1_ROUNDED_RECT, brush: *mut ID2D1Brush + ) -> (), + fn DrawEllipse( + &mut self, ellipse: *const D2D1_ELLIPSE, brush: *mut ID2D1Brush, + strokeWidth: ::FLOAT, strokeStyle: *mut ID2D1StrokeStyle + ) -> (), + fn FillEllipse( + &mut self, ellipse: *const D2D1_ELLIPSE, brush: *mut ID2D1Brush + ) -> (), + fn DrawGeometry( + &mut self, geometry: *mut ID2D1Geometry, brush: *mut ID2D1Brush, + strokeWidth: ::FLOAT, strokeStyle: *mut ID2D1StrokeStyle + ) -> (), + fn FillGeometry( + &mut self, geometry: *mut ID2D1Geometry, brush: *mut ID2D1Brush, + opacityBrush: *mut ID2D1Brush + ) -> (), + fn FillMesh( + &mut self, mesh: *mut ID2D1Mesh, brush: *const ID2D1Brush + ) -> (), + fn FillOpacityMask( + &mut self, opacityMask: *mut ID2D1Bitmap, brush: *mut ID2D1Brush, + content: D2D1_OPACITY_MASK_CONTENT, destinationRectangle: *const ::D2D1_RECT_F, + sourceRectangle: *const ::D2D1_RECT_F + ) -> (), + fn DrawBitmap( + &mut self, bitmap: *mut ID2D1Bitmap, destinationRectangle: *const ::D2D1_RECT_F, + opacity: ::FLOAT, interpolationMode: D2D1_BITMAP_INTERPOLATION_MODE, + sourceRectangle: *const ::D2D1_RECT_F + ) -> (), + fn DrawText( + &mut self, string: *const ::WCHAR, stringLength: ::UINT32, + textFormat: *mut ::IDWriteTextFormat, layoutRect: *const ::D2D1_RECT_F, + defaultForegroundBrush: *mut ID2D1Brush, options: D2D1_DRAW_TEXT_OPTIONS, + measuringMode: ::DWRITE_MEASURING_MODE + ) -> (), + fn DrawTextLayout( + &mut self, origin: ::D2D1_POINT_2F, textLayout: *mut ::IDWriteTextLayout, + defaultForegroundBrush: *mut ID2D1Brush, options: D2D1_DRAW_TEXT_OPTIONS + ) -> (), + fn DrawGlyphRun( + &mut self, baselineOrigin: ::D2D1_POINT_2F, glyphRun: *const ::DWRITE_GLYPH_RUN, + foregroundBrush: *mut ID2D1Brush, measuringMode: ::DWRITE_MEASURING_MODE + ) -> (), + fn SetTransform(&mut self, transform: *const D2D1_MATRIX_3X2_F) -> (), + fn GetTransform(&mut self, transform: *mut D2D1_MATRIX_3X2_F) -> (), + fn SetAntialiasMode(&mut self, antialiasMode: D2D1_ANTIALIAS_MODE) -> (), + fn GetAntialiasMode(&mut self) -> D2D1_ANTIALIAS_MODE, + fn SetTextAntialiasMode(&mut self, textAntialiasMode: D2D1_TEXT_ANTIALIAS_MODE) -> (), + fn GetTextAntialiasMode(&mut self) -> D2D1_TEXT_ANTIALIAS_MODE, + fn SetTextRenderingParams( + &mut self, textRenderingParams: *mut ::IDWriteRenderingParams + ) -> (), + fn GetTextRenderingParams( + &mut self, textRenderingParams: *mut *mut ::IDWriteRenderingParams + ) -> (), + fn SetTags(&mut self, tag1: D2D1_TAG, tag2: D2D1_TAG) -> (), + fn GetTags(&mut self, tag1: *mut D2D1_TAG, tag2: *mut D2D1_TAG) -> (), + fn PushLayer( + &mut self, layerParameters: *const D2D1_LAYER_PARAMETERS, layer: *mut ID2D1Layer + ) -> (), + fn PopLayer(&mut self) -> (), + fn Flush(&mut self, tag1: *mut D2D1_TAG, tag2: *mut D2D1_TAG) -> ::HRESULT, + fn SaveDrawingState(&mut self, drawingStateBlock: *mut ID2D1DrawingStateBlock) -> (), + fn RestoreDrawingState(&mut self, drawingStateBlock: *mut ID2D1DrawingStateBlock) -> (), + fn PushAxisAlignedClip( + &mut self, clipRect: *const ::D2D1_RECT_F, antialiasMode: D2D1_ANTIALIAS_MODE + ) -> (), + fn PopAxisAlignedClip(&mut self) -> (), + fn Clear(&mut self, clearColor: *const D2D1_COLOR_F) -> (), + fn BeginDraw(&mut self) -> (), + fn EndDraw(&mut self, tag1: *mut D2D1_TAG, tag2: *mut D2D1_TAG) -> ::HRESULT, + fn GetPixelFormat( + &mut self, ret: *mut ::D2D1_PIXEL_FORMAT + ) -> *mut ::D2D1_PIXEL_FORMAT, // FIXME: ABI issue + fn SetDpi(&mut self, dpiX: ::FLOAT, dpiY: ::FLOAT) -> (), + fn GetDpi(&mut self, dpiX: *mut ::FLOAT, dpiY: *mut ::FLOAT) -> (), + fn GetSize(&mut self, ret: *mut D2D1_SIZE_F) -> *mut D2D1_SIZE_F, // FIXME: ABI issue + fn GetPixelSize(&mut self, ret: *mut D2D1_SIZE_U) -> *mut D2D1_SIZE_U, // FIXME: ABI issue + fn GetMaximumBitmapSize(&mut self) -> ::UINT32, + fn IsSupported( + &mut self, renderTargetProperties: *const D2D1_RENDER_TARGET_PROPERTIES + ) -> ::BOOL +}); +RIDL!( +interface ID2D1BitmapRenderTarget(ID2D1BitmapRenderTargetVtbl) + : ID2D1RenderTarget(ID2D1RenderTargetVtbl) { + fn GetBitmap(&mut self, bitmap: *mut *mut ID2D1Bitmap) -> ::HRESULT +}); +RIDL!( +interface ID2D1HwndRenderTarget(ID2D1HwndRenderTargetVtbl) + : ID2D1RenderTarget(ID2D1RenderTargetVtbl) { + fn CheckWindowState(&mut self) -> D2D1_WINDOW_STATE, + fn Resize(&mut self, pixelSize: *const D2D1_SIZE_U) -> ::HRESULT, + fn GetHwnd(&mut self) -> ::HWND +}); +RIDL!( +interface ID2D1GdiInteropRenderTarget(ID2D1GdiInteropRenderTargetVtbl): IUnknown(IUnknownVtbl) { + fn GetDC(&mut self, mode: D2D1_DC_INITIALIZE_MODE, hdc: *mut ::HDC) -> ::HRESULT, + fn ReleaseDC(&mut self, update: *const ::RECT) -> ::HRESULT +}); +RIDL!( +interface ID2D1DCRenderTarget(ID2D1DCRenderTargetVtbl): ID2D1RenderTarget(ID2D1RenderTargetVtbl) { + fn BindDC(&mut self, hDC: ::HDC, pSubRect: *const ::RECT) -> ::HRESULT +}); +RIDL!( +interface ID2D1Factory(ID2D1FactoryVtbl): IUnknown(IUnknownVtbl) { + fn ReloadSystemMetrics(&mut self) -> ::HRESULT, + fn GetDesktopDpi(&mut self, dpiX: *mut ::FLOAT, dpiY: *mut ::FLOAT) -> (), + fn CreateRectangleGeometry( + &mut self, rectangle: *const ::D2D1_RECT_F, + rectangleGeometry: *mut *mut ID2D1RectangleGeometry + ) -> ::HRESULT, + fn CreateRoundedRectangleGeometry( + &mut self, roundedRectangle: *const D2D1_ROUNDED_RECT, + roundedRectangleGeometry: *mut *mut ID2D1RoundedRectangleGeometry + ) -> ::HRESULT, + fn CreateEllipseGeometry( + &mut self, ellipse: *const D2D1_ELLIPSE, + ellipseGeometry: *mut *mut ID2D1EllipseGeometry + ) -> ::HRESULT, + fn CreateGeometryGroup( + &mut self, fillMode: D2D1_FILL_MODE, geometries: *mut *mut ID2D1Geometry, + geometriesCount: ::UINT32, geometryGroup: *mut *mut ID2D1GeometryGroup + ) -> ::HRESULT, + fn CreateTransformedGeometry( + &mut self, sourceGeometry: *mut ID2D1Geometry, transform: *const D2D1_MATRIX_3X2_F, + transformedGeometry: *mut *mut ID2D1TransformedGeometry + ) -> ::HRESULT, + fn CreatePathGeometry( + &mut self, pathGeometry: *mut *mut ID2D1PathGeometry + ) -> ::HRESULT, + fn CreateStrokeStyle( + &mut self, strokeStyleProperties: *const D2D1_STROKE_STYLE_PROPERTIES, + dashes: *const ::FLOAT, dashesCount: ::UINT32, strokeStyle: *mut *mut ID2D1StrokeStyle + ) -> ::HRESULT, + fn CreateDrawingStateBlock( + &mut self, drawingStateDescription: *const D2D1_DRAWING_STATE_DESCRIPTION, + textRenderingParams: *mut ::IDWriteRenderingParams, + drawingStateBlock: *mut *mut ID2D1DrawingStateBlock + ) -> ::HRESULT, + fn CreateWicBitmapRenderTarget( + &mut self, target: *mut ::IWICBitmap, + renderTargetProperties: *const D2D1_RENDER_TARGET_PROPERTIES, + renderTarget: *mut *mut ID2D1RenderTarget + ) -> ::HRESULT, + fn CreateHwndRenderTarget( + &mut self, renderTargetProperties: *const D2D1_RENDER_TARGET_PROPERTIES, + hwndRenderTargetProperties: *const D2D1_HWND_RENDER_TARGET_PROPERTIES, + hwndRenderTarget: *mut *mut ID2D1HwndRenderTarget + ) -> ::HRESULT, + fn CreateDxgiSurfaceRenderTarget( + &mut self, dxgiSurface: *mut ::IDXGISurface, + renderTargetProperties: *const D2D1_RENDER_TARGET_PROPERTIES, + renderTarget: *mut *mut ID2D1RenderTarget + ) -> ::HRESULT, + fn CreateDCRenderTarget( + &mut self, renderTargetProperties: *const D2D1_RENDER_TARGET_PROPERTIES, + dcRenderTarget: *mut *mut ID2D1DCRenderTarget + ) -> ::HRESULT +}); +DEFINE_GUID!( + UuidOfID2D1Factory, + 0x06152247, 0x6f50, 0x465a, 0x92, 0x45, 0x11, 0x8b, 0xfd, 0x3b, 0x60, 0x07 +); diff --git a/deps/winapi-0.2.6/src/d2dbasetypes.rs b/deps/winapi-0.2.6/src/d2dbasetypes.rs new file mode 100644 index 000000000..45a5a1414 --- /dev/null +++ b/deps/winapi-0.2.6/src/d2dbasetypes.rs @@ -0,0 +1,61 @@ +// Copyright © 2015, Connor Hilarides +// Licensed under the MIT License <LICENSE.md> +//! Mappings for the contents of d2dbasetypes.h +STRUCT!{struct D2D_POINT_2U { + x: ::UINT32, + y: ::UINT32, +}} +STRUCT!{struct D2D_POINT_2F { + x: ::FLOAT, + y: ::FLOAT, +}} +pub type D2D_POINT_2L = ::POINT; +STRUCT!{struct D2D_VECTOR_2F { + x: ::FLOAT, + y: ::FLOAT, +}} +STRUCT!{struct D2D_VECTOR_3F { + x: ::FLOAT, + y: ::FLOAT, + z: ::FLOAT, +}} +STRUCT!{struct D2D_VECTOR_4F { + x: ::FLOAT, + y: ::FLOAT, + z: ::FLOAT, + w: ::FLOAT, +}} +STRUCT!{struct D2D_RECT_F { + left: ::FLOAT, + top: ::FLOAT, + right: ::FLOAT, + bottom: ::FLOAT, +}} +STRUCT!{struct D2D_RECT_U { + left: ::UINT32, + top: ::UINT32, + right: ::UINT32, + bottom: ::UINT32, +}} +pub type D2D_RECT_L = ::RECT; +STRUCT!{struct D2D_SIZE_F { + width: ::FLOAT, + height: ::FLOAT, +}} +STRUCT!{struct D2D_SIZE_U { + width: ::UINT32, + height: ::UINT32, +}} +pub type D2D_COLOR_F = ::D3DCOLORVALUE; +STRUCT!{struct D2D_MATRIX_3X2_F { + matrix: [[::FLOAT; 2]; 3], +}} +STRUCT!{struct D2D_MATRIX_4X3_F { + matrix: [[::FLOAT; 3]; 4], +}} +STRUCT!{struct D2D_MATRIX_4X4_F { + matrix: [[::FLOAT; 4]; 4], +}} +STRUCT!{struct D2D_MATRIX_5X4_F { + matrix: [[::FLOAT; 4]; 5], +}} diff --git a/deps/winapi-0.2.6/src/d3d10shader.rs b/deps/winapi-0.2.6/src/d3d10shader.rs new file mode 100644 index 000000000..4f64c5f33 --- /dev/null +++ b/deps/winapi-0.2.6/src/d3d10shader.rs @@ -0,0 +1,110 @@ +// Copyright © 2016, Peter Atashian +// Licensed under the MIT License <LICENSE.md> +use super::*; +pub type D3D10_RESOURCE_RETURN_TYPE = D3D_RESOURCE_RETURN_TYPE; +pub type D3D10_CBUFFER_TYPE = D3D_CBUFFER_TYPE; +STRUCT!{struct D3D10_SHADER_DESC { + Version: UINT, + Creator: LPCSTR, + Flags: UINT, + ConstantBuffers: UINT, + BoundResources: UINT, + InputParameters: UINT, + OutputParameters: UINT, + InstructionCount: UINT, + TempRegisterCount: UINT, + TempArrayCount: UINT, + DefCount: UINT, + DclCount: UINT, + TextureNormalInstructions: UINT, + TextureLoadInstructions: UINT, + TextureCompInstructions: UINT, + TextureBiasInstructions: UINT, + TextureGradientInstructions: UINT, + FloatInstructionCount: UINT, + IntInstructionCount: UINT, + UintInstructionCount: UINT, + StaticFlowControlCount: UINT, + DynamicFlowControlCount: UINT, + MacroInstructionCount: UINT, + ArrayInstructionCount: UINT, + CutInstructionCount: UINT, + EmitInstructionCount: UINT, + GSOutputTopology: D3D_PRIMITIVE_TOPOLOGY, + GSMaxOutputVertexCount: UINT, +}} +STRUCT!{struct D3D10_SHADER_BUFFER_DESC { + Name: LPCSTR, + Type: D3D10_CBUFFER_TYPE, + Variables: UINT, + Size: UINT, + uFlags: UINT, +}} +STRUCT!{struct D3D10_SHADER_VARIABLE_DESC { + Name: LPCSTR, + StartOffset: UINT, + Size: UINT, + uFlags: UINT, + DefaultValue: LPVOID, +}} +STRUCT!{struct D3D10_SHADER_TYPE_DESC { + Class: D3D_SHADER_VARIABLE_CLASS, + Type: D3D_SHADER_VARIABLE_TYPE, + Rows: UINT, + Columns: UINT, + Elements: UINT, + Members: UINT, + Offset: UINT, +}} +STRUCT!{struct D3D10_SHADER_INPUT_BIND_DESC { + Name: LPCSTR, + Type: D3D_SHADER_INPUT_TYPE, + BindPoint: UINT, + BindCount: UINT, + uFlags: UINT, + ReturnType: D3D_RESOURCE_RETURN_TYPE, + Dimension: D3D_SRV_DIMENSION, + NumSamples: UINT, +}} +STRUCT!{struct D3D10_SIGNATURE_PARAMETER_DESC { + SemanticName: LPCSTR, + SemanticIndex: UINT, + Register: UINT, + SystemValueType: D3D_NAME, + ComponentType: D3D_REGISTER_COMPONENT_TYPE, + Mask: BYTE, + ReadWriteMask: BYTE, +}} +RIDL!{interface ID3D10ShaderReflectionType(ID3D10ShaderReflectionTypeVtbl) { + fn GetDesc(&mut self, pDesc: *mut D3D10_SHADER_TYPE_DESC) -> HRESULT, + fn GetMemberTypeByIndex(&mut self, Index: UINT) -> *mut ID3D10ShaderReflectionType, + fn GetMemberTypeByName(&mut self, Name: LPCSTR) -> *mut ID3D10ShaderReflectionType, + fn GetMemberTypeName(&mut self, Index: UINT) -> LPCSTR +}} +RIDL!{interface ID3D10ShaderReflectionVariable(ID3D10ShaderReflectionVariableVtbl) { + fn GetDesc(&mut self, pDesc: *mut D3D10_SHADER_VARIABLE_DESC) -> HRESULT, + fn GetType(&mut self) -> *mut ID3D10ShaderReflectionType +}} +RIDL!{interface ID3D10ShaderReflectionConstantBuffer(ID3D10ShaderReflectionConstantBufferVtbl) { + fn GetDesc(&mut self, pDesc: *mut D3D10_SHADER_BUFFER_DESC) -> HRESULT, + fn GetVariableByIndex(&mut self, Index: UINT) -> *mut ID3D10ShaderReflectionVariable, + fn GetVariableByName(&mut self, Name: LPCSTR) -> *mut ID3D10ShaderReflectionVariable +}} +RIDL!{interface ID3D10ShaderReflection(ID3D10ShaderReflectionVtbl): IUnknown(IUnknownVtbl) { + fn GetDesc(&mut self, pDesc: *mut D3D10_SHADER_DESC) -> HRESULT, + fn GetConstantBufferByIndex( + &mut self, Index: UINT + ) -> *mut ID3D10ShaderReflectionConstantBuffer, + fn GetConstantBufferByName( + &mut self, Name: LPCSTR + ) -> *mut ID3D10ShaderReflectionConstantBuffer, + fn GetResourceBindingDesc( + &mut self, ResourceIndex: UINT, pDesc: *mut D3D10_SHADER_INPUT_BIND_DESC + ) -> HRESULT, + fn GetInputParameterDesc( + &mut self, ParameterIndex: UINT, pDesc: *mut D3D10_SIGNATURE_PARAMETER_DESC + ) -> HRESULT, + fn GetOutputParameterDesc( + &mut self, ParameterIndex: UINT, pDesc: *mut D3D10_SIGNATURE_PARAMETER_DESC + ) -> HRESULT +}} diff --git a/deps/winapi-0.2.6/src/d3d11.rs b/deps/winapi-0.2.6/src/d3d11.rs new file mode 100644 index 000000000..3eec1562d --- /dev/null +++ b/deps/winapi-0.2.6/src/d3d11.rs @@ -0,0 +1,2658 @@ +// Copyright © 2015, Peter Atashian +// Licensed under the MIT License <LICENSE.md> +use super::*; +pub const D3D11_16BIT_INDEX_STRIP_CUT_VALUE: DWORD = 0xffff; +pub const D3D11_32BIT_INDEX_STRIP_CUT_VALUE: DWORD = 0xffffffff; +pub const D3D11_8BIT_INDEX_STRIP_CUT_VALUE: DWORD = 0xff; +pub const D3D11_ARRAY_AXIS_ADDRESS_RANGE_BIT_COUNT: DWORD = 9; +pub const D3D11_CLIP_OR_CULL_DISTANCE_COUNT: DWORD = 8; +pub const D3D11_CLIP_OR_CULL_DISTANCE_ELEMENT_COUNT: DWORD = 2; +pub const D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT: DWORD = 14; +pub const D3D11_COMMONSHADER_CONSTANT_BUFFER_COMPONENTS: DWORD = 4; +pub const D3D11_COMMONSHADER_CONSTANT_BUFFER_COMPONENT_BIT_COUNT: DWORD = 32; +pub const D3D11_COMMONSHADER_CONSTANT_BUFFER_HW_SLOT_COUNT: DWORD = 15; +pub const D3D11_COMMONSHADER_CONSTANT_BUFFER_PARTIAL_UPDATE_EXTENTS_BYTE_ALIGNMENT: DWORD = 16; +pub const D3D11_COMMONSHADER_CONSTANT_BUFFER_REGISTER_COMPONENTS: DWORD = 4; +pub const D3D11_COMMONSHADER_CONSTANT_BUFFER_REGISTER_COUNT: DWORD = 15; +pub const D3D11_COMMONSHADER_CONSTANT_BUFFER_REGISTER_READS_PER_INST: DWORD = 1; +pub const D3D11_COMMONSHADER_CONSTANT_BUFFER_REGISTER_READ_PORTS: DWORD = 1; +pub const D3D11_COMMONSHADER_FLOWCONTROL_NESTING_LIMIT: DWORD = 64; +pub const D3D11_COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_COMPONENTS: DWORD = 4; +pub const D3D11_COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_COUNT: DWORD = 1; +pub const D3D11_COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_READS_PER_INST: DWORD = 1; +pub const D3D11_COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_READ_PORTS: DWORD = 1; +pub const D3D11_COMMONSHADER_IMMEDIATE_VALUE_COMPONENT_BIT_COUNT: DWORD = 32; +pub const D3D11_COMMONSHADER_INPUT_RESOURCE_REGISTER_COMPONENTS: DWORD = 1; +pub const D3D11_COMMONSHADER_INPUT_RESOURCE_REGISTER_COUNT: DWORD = 128; +pub const D3D11_COMMONSHADER_INPUT_RESOURCE_REGISTER_READS_PER_INST: DWORD = 1; +pub const D3D11_COMMONSHADER_INPUT_RESOURCE_REGISTER_READ_PORTS: DWORD = 1; +pub const D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT: DWORD = 128; +pub const D3D11_COMMONSHADER_SAMPLER_REGISTER_COMPONENTS: DWORD = 1; +pub const D3D11_COMMONSHADER_SAMPLER_REGISTER_COUNT: DWORD = 16; +pub const D3D11_COMMONSHADER_SAMPLER_REGISTER_READS_PER_INST: DWORD = 1; +pub const D3D11_COMMONSHADER_SAMPLER_REGISTER_READ_PORTS: DWORD = 1; +pub const D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT: DWORD = 16; +pub const D3D11_COMMONSHADER_SUBROUTINE_NESTING_LIMIT: DWORD = 32; +pub const D3D11_COMMONSHADER_TEMP_REGISTER_COMPONENTS: DWORD = 4; +pub const D3D11_COMMONSHADER_TEMP_REGISTER_COMPONENT_BIT_COUNT: DWORD = 32; +pub const D3D11_COMMONSHADER_TEMP_REGISTER_COUNT: DWORD = 4096; +pub const D3D11_COMMONSHADER_TEMP_REGISTER_READS_PER_INST: DWORD = 3; +pub const D3D11_COMMONSHADER_TEMP_REGISTER_READ_PORTS: DWORD = 3; +pub const D3D11_COMMONSHADER_TEXCOORD_RANGE_REDUCTION_MAX: DWORD = 10; +pub const D3D11_COMMONSHADER_TEXCOORD_RANGE_REDUCTION_MIN: c_long = -10; +pub const D3D11_COMMONSHADER_TEXEL_OFFSET_MAX_NEGATIVE: c_long = -8; +pub const D3D11_COMMONSHADER_TEXEL_OFFSET_MAX_POSITIVE: DWORD = 7; +pub const D3D11_CS_4_X_BUCKET00_MAX_BYTES_TGSM_WRITABLE_PER_THREAD: DWORD = 256; +pub const D3D11_CS_4_X_BUCKET00_MAX_NUM_THREADS_PER_GROUP: DWORD = 64; +pub const D3D11_CS_4_X_BUCKET01_MAX_BYTES_TGSM_WRITABLE_PER_THREAD: DWORD = 240; +pub const D3D11_CS_4_X_BUCKET01_MAX_NUM_THREADS_PER_GROUP: DWORD = 68; +pub const D3D11_CS_4_X_BUCKET02_MAX_BYTES_TGSM_WRITABLE_PER_THREAD: DWORD = 224; +pub const D3D11_CS_4_X_BUCKET02_MAX_NUM_THREADS_PER_GROUP: DWORD = 72; +pub const D3D11_CS_4_X_BUCKET03_MAX_BYTES_TGSM_WRITABLE_PER_THREAD: DWORD = 208; +pub const D3D11_CS_4_X_BUCKET03_MAX_NUM_THREADS_PER_GROUP: DWORD = 76; +pub const D3D11_CS_4_X_BUCKET04_MAX_BYTES_TGSM_WRITABLE_PER_THREAD: DWORD = 192; +pub const D3D11_CS_4_X_BUCKET04_MAX_NUM_THREADS_PER_GROUP: DWORD = 84; +pub const D3D11_CS_4_X_BUCKET05_MAX_BYTES_TGSM_WRITABLE_PER_THREAD: DWORD = 176; +pub const D3D11_CS_4_X_BUCKET05_MAX_NUM_THREADS_PER_GROUP: DWORD = 92; +pub const D3D11_CS_4_X_BUCKET06_MAX_BYTES_TGSM_WRITABLE_PER_THREAD: DWORD = 160; +pub const D3D11_CS_4_X_BUCKET06_MAX_NUM_THREADS_PER_GROUP: DWORD = 100; +pub const D3D11_CS_4_X_BUCKET07_MAX_BYTES_TGSM_WRITABLE_PER_THREAD: DWORD = 144; +pub const D3D11_CS_4_X_BUCKET07_MAX_NUM_THREADS_PER_GROUP: DWORD = 112; +pub const D3D11_CS_4_X_BUCKET08_MAX_BYTES_TGSM_WRITABLE_PER_THREAD: DWORD = 128; +pub const D3D11_CS_4_X_BUCKET08_MAX_NUM_THREADS_PER_GROUP: DWORD = 128; +pub const D3D11_CS_4_X_BUCKET09_MAX_BYTES_TGSM_WRITABLE_PER_THREAD: DWORD = 112; +pub const D3D11_CS_4_X_BUCKET09_MAX_NUM_THREADS_PER_GROUP: DWORD = 144; +pub const D3D11_CS_4_X_BUCKET10_MAX_BYTES_TGSM_WRITABLE_PER_THREAD: DWORD = 96; +pub const D3D11_CS_4_X_BUCKET10_MAX_NUM_THREADS_PER_GROUP: DWORD = 168; +pub const D3D11_CS_4_X_BUCKET11_MAX_BYTES_TGSM_WRITABLE_PER_THREAD: DWORD = 80; +pub const D3D11_CS_4_X_BUCKET11_MAX_NUM_THREADS_PER_GROUP: DWORD = 204; +pub const D3D11_CS_4_X_BUCKET12_MAX_BYTES_TGSM_WRITABLE_PER_THREAD: DWORD = 64; +pub const D3D11_CS_4_X_BUCKET12_MAX_NUM_THREADS_PER_GROUP: DWORD = 256; +pub const D3D11_CS_4_X_BUCKET13_MAX_BYTES_TGSM_WRITABLE_PER_THREAD: DWORD = 48; +pub const D3D11_CS_4_X_BUCKET13_MAX_NUM_THREADS_PER_GROUP: DWORD = 340; +pub const D3D11_CS_4_X_BUCKET14_MAX_BYTES_TGSM_WRITABLE_PER_THREAD: DWORD = 32; +pub const D3D11_CS_4_X_BUCKET14_MAX_NUM_THREADS_PER_GROUP: DWORD = 512; +pub const D3D11_CS_4_X_BUCKET15_MAX_BYTES_TGSM_WRITABLE_PER_THREAD: DWORD = 16; +pub const D3D11_CS_4_X_BUCKET15_MAX_NUM_THREADS_PER_GROUP: DWORD = 768; +pub const D3D11_CS_4_X_DISPATCH_MAX_THREAD_GROUPS_IN_Z_DIMENSION: DWORD = 1; +pub const D3D11_CS_4_X_RAW_UAV_BYTE_ALIGNMENT: DWORD = 256; +pub const D3D11_CS_4_X_THREAD_GROUP_MAX_THREADS_PER_GROUP: DWORD = 768; +pub const D3D11_CS_4_X_THREAD_GROUP_MAX_X: DWORD = 768; +pub const D3D11_CS_4_X_THREAD_GROUP_MAX_Y: DWORD = 768; +pub const D3D11_CS_4_X_UAV_REGISTER_COUNT: DWORD = 1; +pub const D3D11_CS_DISPATCH_MAX_THREAD_GROUPS_PER_DIMENSION: DWORD = 65535; +pub const D3D11_CS_TGSM_REGISTER_COUNT: DWORD = 8192; +pub const D3D11_CS_TGSM_REGISTER_READS_PER_INST: DWORD = 1; +pub const D3D11_CS_TGSM_RESOURCE_REGISTER_COMPONENTS: DWORD = 1; +pub const D3D11_CS_TGSM_RESOURCE_REGISTER_READ_PORTS: DWORD = 1; +pub const D3D11_CS_THREADGROUPID_REGISTER_COMPONENTS: DWORD = 3; +pub const D3D11_CS_THREADGROUPID_REGISTER_COUNT: DWORD = 1; +pub const D3D11_CS_THREADIDINGROUPFLATTENED_REGISTER_COMPONENTS: DWORD = 1; +pub const D3D11_CS_THREADIDINGROUPFLATTENED_REGISTER_COUNT: DWORD = 1; +pub const D3D11_CS_THREADIDINGROUP_REGISTER_COMPONENTS: DWORD = 3; +pub const D3D11_CS_THREADIDINGROUP_REGISTER_COUNT: DWORD = 1; +pub const D3D11_CS_THREADID_REGISTER_COMPONENTS: DWORD = 3; +pub const D3D11_CS_THREADID_REGISTER_COUNT: DWORD = 1; +pub const D3D11_CS_THREAD_GROUP_MAX_THREADS_PER_GROUP: DWORD = 1024; +pub const D3D11_CS_THREAD_GROUP_MAX_X: DWORD = 1024; +pub const D3D11_CS_THREAD_GROUP_MAX_Y: DWORD = 1024; +pub const D3D11_CS_THREAD_GROUP_MAX_Z: DWORD = 64; +pub const D3D11_CS_THREAD_GROUP_MIN_X: DWORD = 1; +pub const D3D11_CS_THREAD_GROUP_MIN_Y: DWORD = 1; +pub const D3D11_CS_THREAD_GROUP_MIN_Z: DWORD = 1; +pub const D3D11_CS_THREAD_LOCAL_TEMP_REGISTER_POOL: DWORD = 16384; +pub const D3D11_DEFAULT_BLEND_FACTOR_ALPHA: FLOAT = 1.0; +pub const D3D11_DEFAULT_BLEND_FACTOR_BLUE: FLOAT = 1.0; +pub const D3D11_DEFAULT_BLEND_FACTOR_GREEN: FLOAT = 1.0; +pub const D3D11_DEFAULT_BLEND_FACTOR_RED: FLOAT = 1.0; +pub const D3D11_DEFAULT_BORDER_COLOR_COMPONENT: FLOAT = 0.0; +pub const D3D11_DEFAULT_DEPTH_BIAS: DWORD = 0; +pub const D3D11_DEFAULT_DEPTH_BIAS_CLAMP: FLOAT = 0.0; +pub const D3D11_DEFAULT_MAX_ANISOTROPY: DWORD = 16; +pub const D3D11_DEFAULT_MIP_LOD_BIAS: FLOAT = 0.0; +pub const D3D11_DEFAULT_RENDER_TARGET_ARRAY_INDEX: DWORD = 0; +pub const D3D11_DEFAULT_SAMPLE_MASK: DWORD = 0xffffffff; +pub const D3D11_DEFAULT_SCISSOR_ENDX: DWORD = 0; +pub const D3D11_DEFAULT_SCISSOR_ENDY: DWORD = 0; +pub const D3D11_DEFAULT_SCISSOR_STARTX: DWORD = 0; +pub const D3D11_DEFAULT_SCISSOR_STARTY: DWORD = 0; +pub const D3D11_DEFAULT_SLOPE_SCALED_DEPTH_BIAS: FLOAT = 0.0; +pub const D3D11_DEFAULT_STENCIL_READ_MASK: DWORD = 0xff; +pub const D3D11_DEFAULT_STENCIL_REFERENCE: DWORD = 0; +pub const D3D11_DEFAULT_STENCIL_WRITE_MASK: DWORD = 0xff; +pub const D3D11_DEFAULT_VIEWPORT_AND_SCISSORRECT_INDEX: DWORD = 0; +pub const D3D11_DEFAULT_VIEWPORT_HEIGHT: DWORD = 0; +pub const D3D11_DEFAULT_VIEWPORT_MAX_DEPTH: FLOAT = 0.0; +pub const D3D11_DEFAULT_VIEWPORT_MIN_DEPTH: FLOAT = 0.0; +pub const D3D11_DEFAULT_VIEWPORT_TOPLEFTX: DWORD = 0; +pub const D3D11_DEFAULT_VIEWPORT_TOPLEFTY: DWORD = 0; +pub const D3D11_DEFAULT_VIEWPORT_WIDTH: DWORD = 0; +pub const D3D11_DS_INPUT_CONTROL_POINTS_MAX_TOTAL_SCALARS: DWORD = 3968; +pub const D3D11_DS_INPUT_CONTROL_POINT_REGISTER_COMPONENTS: DWORD = 4; +pub const D3D11_DS_INPUT_CONTROL_POINT_REGISTER_COMPONENT_BIT_COUNT: DWORD = 32; +pub const D3D11_DS_INPUT_CONTROL_POINT_REGISTER_COUNT: DWORD = 32; +pub const D3D11_DS_INPUT_CONTROL_POINT_REGISTER_READS_PER_INST: DWORD = 2; +pub const D3D11_DS_INPUT_CONTROL_POINT_REGISTER_READ_PORTS: DWORD = 1; +pub const D3D11_DS_INPUT_DOMAIN_POINT_REGISTER_COMPONENTS: DWORD = 3; +pub const D3D11_DS_INPUT_DOMAIN_POINT_REGISTER_COMPONENT_BIT_COUNT: DWORD = 32; +pub const D3D11_DS_INPUT_DOMAIN_POINT_REGISTER_COUNT: DWORD = 1; +pub const D3D11_DS_INPUT_DOMAIN_POINT_REGISTER_READS_PER_INST: DWORD = 2; +pub const D3D11_DS_INPUT_DOMAIN_POINT_REGISTER_READ_PORTS: DWORD = 1; +pub const D3D11_DS_INPUT_PATCH_CONSTANT_REGISTER_COMPONENTS: DWORD = 4; +pub const D3D11_DS_INPUT_PATCH_CONSTANT_REGISTER_COMPONENT_BIT_COUNT: DWORD = 32; +pub const D3D11_DS_INPUT_PATCH_CONSTANT_REGISTER_COUNT: DWORD = 32; +pub const D3D11_DS_INPUT_PATCH_CONSTANT_REGISTER_READS_PER_INST: DWORD = 2; +pub const D3D11_DS_INPUT_PATCH_CONSTANT_REGISTER_READ_PORTS: DWORD = 1; +pub const D3D11_DS_INPUT_PRIMITIVE_ID_REGISTER_COMPONENTS: DWORD = 1; +pub const D3D11_DS_INPUT_PRIMITIVE_ID_REGISTER_COMPONENT_BIT_COUNT: DWORD = 32; +pub const D3D11_DS_INPUT_PRIMITIVE_ID_REGISTER_COUNT: DWORD = 1; +pub const D3D11_DS_INPUT_PRIMITIVE_ID_REGISTER_READS_PER_INST: DWORD = 2; +pub const D3D11_DS_INPUT_PRIMITIVE_ID_REGISTER_READ_PORTS: DWORD = 1; +pub const D3D11_DS_OUTPUT_REGISTER_COMPONENTS: DWORD = 4; +pub const D3D11_DS_OUTPUT_REGISTER_COMPONENT_BIT_COUNT: DWORD = 32; +pub const D3D11_DS_OUTPUT_REGISTER_COUNT: DWORD = 32; +pub const D3D11_FLOAT16_FUSED_TOLERANCE_IN_ULP: FLOAT = 0.6; +pub const D3D11_FLOAT32_MAX: FLOAT = 3.402823466E+38; +pub const D3D11_FLOAT32_TO_INTEGER_TOLERANCE_IN_ULP: FLOAT = 0.6; +pub const D3D11_FLOAT_TO_SRGB_EXPONENT_DENOMINATOR: FLOAT = 2.4; +pub const D3D11_FLOAT_TO_SRGB_EXPONENT_NUMERATOR: FLOAT = 1.0; +pub const D3D11_FLOAT_TO_SRGB_OFFSET: FLOAT = 0.055; +pub const D3D11_FLOAT_TO_SRGB_SCALE_1: FLOAT = 12.92; +pub const D3D11_FLOAT_TO_SRGB_SCALE_2: FLOAT = 1.055; +pub const D3D11_FLOAT_TO_SRGB_THRESHOLD: FLOAT = 0.0031308; +pub const D3D11_FTOI_INSTRUCTION_MAX_INPUT: FLOAT = 2147483647.999; +pub const D3D11_FTOI_INSTRUCTION_MIN_INPUT: FLOAT = -2147483648.999; +pub const D3D11_FTOU_INSTRUCTION_MAX_INPUT: FLOAT = 4294967295.999; +pub const D3D11_FTOU_INSTRUCTION_MIN_INPUT: FLOAT = 0.0; +pub const D3D11_GS_INPUT_INSTANCE_ID_READS_PER_INST: DWORD = 2; +pub const D3D11_GS_INPUT_INSTANCE_ID_READ_PORTS: DWORD = 1; +pub const D3D11_GS_INPUT_INSTANCE_ID_REGISTER_COMPONENTS: DWORD = 1; +pub const D3D11_GS_INPUT_INSTANCE_ID_REGISTER_COMPONENT_BIT_COUNT: DWORD = 32; +pub const D3D11_GS_INPUT_INSTANCE_ID_REGISTER_COUNT: DWORD = 1; +pub const D3D11_GS_INPUT_PRIM_CONST_REGISTER_COMPONENTS: DWORD = 1; +pub const D3D11_GS_INPUT_PRIM_CONST_REGISTER_COMPONENT_BIT_COUNT: DWORD = 32; +pub const D3D11_GS_INPUT_PRIM_CONST_REGISTER_COUNT: DWORD = 1; +pub const D3D11_GS_INPUT_PRIM_CONST_REGISTER_READS_PER_INST: DWORD = 2; +pub const D3D11_GS_INPUT_PRIM_CONST_REGISTER_READ_PORTS: DWORD = 1; +pub const D3D11_GS_INPUT_REGISTER_COMPONENTS: DWORD = 4; +pub const D3D11_GS_INPUT_REGISTER_COMPONENT_BIT_COUNT: DWORD = 32; +pub const D3D11_GS_INPUT_REGISTER_COUNT: DWORD = 32; +pub const D3D11_GS_INPUT_REGISTER_READS_PER_INST: DWORD = 2; +pub const D3D11_GS_INPUT_REGISTER_READ_PORTS: DWORD = 1; +pub const D3D11_GS_INPUT_REGISTER_VERTICES: DWORD = 32; +pub const D3D11_GS_MAX_INSTANCE_COUNT: DWORD = 32; +pub const D3D11_GS_MAX_OUTPUT_VERTEX_COUNT_ACROSS_INSTANCES: DWORD = 1024; +pub const D3D11_GS_OUTPUT_ELEMENTS: DWORD = 32; +pub const D3D11_GS_OUTPUT_REGISTER_COMPONENTS: DWORD = 4; +pub const D3D11_GS_OUTPUT_REGISTER_COMPONENT_BIT_COUNT: DWORD = 32; +pub const D3D11_GS_OUTPUT_REGISTER_COUNT: DWORD = 32; +pub const D3D11_HS_CONTROL_POINT_PHASE_INPUT_REGISTER_COUNT: DWORD = 32; +pub const D3D11_HS_CONTROL_POINT_PHASE_OUTPUT_REGISTER_COUNT: DWORD = 32; +pub const D3D11_HS_CONTROL_POINT_REGISTER_COMPONENTS: DWORD = 4; +pub const D3D11_HS_CONTROL_POINT_REGISTER_COMPONENT_BIT_COUNT: DWORD = 32; +pub const D3D11_HS_CONTROL_POINT_REGISTER_READS_PER_INST: DWORD = 2; +pub const D3D11_HS_CONTROL_POINT_REGISTER_READ_PORTS: DWORD = 1; +pub const D3D11_HS_FORK_PHASE_INSTANCE_COUNT_UPPER_BOUND: DWORD = 0xffffffff; +pub const D3D11_HS_INPUT_FORK_INSTANCE_ID_REGISTER_COMPONENTS: DWORD = 1; +pub const D3D11_HS_INPUT_FORK_INSTANCE_ID_REGISTER_COMPONENT_BIT_COUNT: DWORD = 32; +pub const D3D11_HS_INPUT_FORK_INSTANCE_ID_REGISTER_COUNT: DWORD = 1; +pub const D3D11_HS_INPUT_FORK_INSTANCE_ID_REGISTER_READS_PER_INST: DWORD = 2; +pub const D3D11_HS_INPUT_FORK_INSTANCE_ID_REGISTER_READ_PORTS: DWORD = 1; +pub const D3D11_HS_INPUT_JOIN_INSTANCE_ID_REGISTER_COMPONENTS: DWORD = 1; +pub const D3D11_HS_INPUT_JOIN_INSTANCE_ID_REGISTER_COMPONENT_BIT_COUNT: DWORD = 32; +pub const D3D11_HS_INPUT_JOIN_INSTANCE_ID_REGISTER_COUNT: DWORD = 1; +pub const D3D11_HS_INPUT_JOIN_INSTANCE_ID_REGISTER_READS_PER_INST: DWORD = 2; +pub const D3D11_HS_INPUT_JOIN_INSTANCE_ID_REGISTER_READ_PORTS: DWORD = 1; +pub const D3D11_HS_INPUT_PRIMITIVE_ID_REGISTER_COMPONENTS: DWORD = 1; +pub const D3D11_HS_INPUT_PRIMITIVE_ID_REGISTER_COMPONENT_BIT_COUNT: DWORD = 32; +pub const D3D11_HS_INPUT_PRIMITIVE_ID_REGISTER_COUNT: DWORD = 1; +pub const D3D11_HS_INPUT_PRIMITIVE_ID_REGISTER_READS_PER_INST: DWORD = 2; +pub const D3D11_HS_INPUT_PRIMITIVE_ID_REGISTER_READ_PORTS: DWORD = 1; +pub const D3D11_HS_JOIN_PHASE_INSTANCE_COUNT_UPPER_BOUND: DWORD = 0xffffffff; +pub const D3D11_HS_MAXTESSFACTOR_LOWER_BOUND: FLOAT = 1.0; +pub const D3D11_HS_MAXTESSFACTOR_UPPER_BOUND: FLOAT = 64.0; +pub const D3D11_HS_OUTPUT_CONTROL_POINTS_MAX_TOTAL_SCALARS: DWORD = 3968; +pub const D3D11_HS_OUTPUT_CONTROL_POINT_ID_REGISTER_COMPONENTS: DWORD = 1; +pub const D3D11_HS_OUTPUT_CONTROL_POINT_ID_REGISTER_COMPONENT_BIT_COUNT: DWORD = 32; +pub const D3D11_HS_OUTPUT_CONTROL_POINT_ID_REGISTER_COUNT: DWORD = 1; +pub const D3D11_HS_OUTPUT_CONTROL_POINT_ID_REGISTER_READS_PER_INST: DWORD = 2; +pub const D3D11_HS_OUTPUT_CONTROL_POINT_ID_REGISTER_READ_PORTS: DWORD = 1; +pub const D3D11_HS_OUTPUT_PATCH_CONSTANT_REGISTER_COMPONENTS: DWORD = 4; +pub const D3D11_HS_OUTPUT_PATCH_CONSTANT_REGISTER_COMPONENT_BIT_COUNT: DWORD = 32; +pub const D3D11_HS_OUTPUT_PATCH_CONSTANT_REGISTER_COUNT: DWORD = 32; +pub const D3D11_HS_OUTPUT_PATCH_CONSTANT_REGISTER_READS_PER_INST: DWORD = 2; +pub const D3D11_HS_OUTPUT_PATCH_CONSTANT_REGISTER_READ_PORTS: DWORD = 1; +pub const D3D11_HS_OUTPUT_PATCH_CONSTANT_REGISTER_SCALAR_COMPONENTS: DWORD = 128; +pub const D3D11_IA_DEFAULT_INDEX_BUFFER_OFFSET_IN_BYTES: DWORD = 0; +pub const D3D11_IA_DEFAULT_PRIMITIVE_TOPOLOGY: DWORD = 0; +pub const D3D11_IA_DEFAULT_VERTEX_BUFFER_OFFSET_IN_BYTES: DWORD = 0; +pub const D3D11_IA_INDEX_INPUT_RESOURCE_SLOT_COUNT: DWORD = 1; +pub const D3D11_IA_INSTANCE_ID_BIT_COUNT: DWORD = 32; +pub const D3D11_IA_INTEGER_ARITHMETIC_BIT_COUNT: DWORD = 32; +pub const D3D11_IA_PATCH_MAX_CONTROL_POINT_COUNT: DWORD = 32; +pub const D3D11_IA_PRIMITIVE_ID_BIT_COUNT: DWORD = 32; +pub const D3D11_IA_VERTEX_ID_BIT_COUNT: DWORD = 32; +pub const D3D11_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT: DWORD = 32; +pub const D3D11_IA_VERTEX_INPUT_STRUCTURE_ELEMENTS_COMPONENTS: DWORD = 128; +pub const D3D11_IA_VERTEX_INPUT_STRUCTURE_ELEMENT_COUNT: DWORD = 32; +pub const D3D11_INTEGER_DIVIDE_BY_ZERO_QUOTIENT: DWORD = 0xffffffff; +pub const D3D11_INTEGER_DIVIDE_BY_ZERO_REMAINDER: DWORD = 0xffffffff; +pub const D3D11_KEEP_RENDER_TARGETS_AND_DEPTH_STENCIL: DWORD = 0xffffffff; +pub const D3D11_KEEP_UNORDERED_ACCESS_VIEWS: DWORD = 0xffffffff; +pub const D3D11_LINEAR_GAMMA: FLOAT = 1.0; +pub const D3D11_MAJOR_VERSION: DWORD = 11; +pub const D3D11_MAX_BORDER_COLOR_COMPONENT: FLOAT = 1.0; +pub const D3D11_MAX_DEPTH: FLOAT = 1.0; +pub const D3D11_MAX_MAXANISOTROPY: DWORD = 16; +pub const D3D11_MAX_MULTISAMPLE_SAMPLE_COUNT: DWORD = 32; +pub const D3D11_MAX_POSITION_VALUE: FLOAT = 3.402823466E+34; +pub const D3D11_MAX_TEXTURE_DIMENSION_2_TO_EXP: DWORD = 17; +pub const D3D11_MINOR_VERSION: DWORD = 0; +pub const D3D11_MIN_BORDER_COLOR_COMPONENT: FLOAT = 0.0; +pub const D3D11_MIN_DEPTH: FLOAT = 0.0; +pub const D3D11_MIN_MAXANISOTROPY: DWORD = 0; +pub const D3D11_MIP_LOD_BIAS_MAX: FLOAT = 15.99; +pub const D3D11_MIP_LOD_BIAS_MIN: FLOAT = -16.0; +pub const D3D11_MIP_LOD_FRACTIONAL_BIT_COUNT: DWORD = 8; +pub const D3D11_MIP_LOD_RANGE_BIT_COUNT: DWORD = 8; +pub const D3D11_MULTISAMPLE_ANTIALIAS_LINE_WIDTH: FLOAT = 1.4; +pub const D3D11_NONSAMPLE_FETCH_OUT_OF_RANGE_ACCESS_RESULT: DWORD = 0; +pub const D3D11_PIXEL_ADDRESS_RANGE_BIT_COUNT: DWORD = 15; +pub const D3D11_PRE_SCISSOR_PIXEL_ADDRESS_RANGE_BIT_COUNT: DWORD = 16; +pub const D3D11_PS_CS_UAV_REGISTER_COMPONENTS: DWORD = 1; +pub const D3D11_PS_CS_UAV_REGISTER_COUNT: DWORD = 8; +pub const D3D11_PS_CS_UAV_REGISTER_READS_PER_INST: DWORD = 1; +pub const D3D11_PS_CS_UAV_REGISTER_READ_PORTS: DWORD = 1; +pub const D3D11_PS_FRONTFACING_DEFAULT_VALUE: DWORD = 0xffffffff; +pub const D3D11_PS_FRONTFACING_FALSE_VALUE: DWORD = 0; +pub const D3D11_PS_FRONTFACING_TRUE_VALUE: DWORD = 0xffffffff; +pub const D3D11_PS_INPUT_REGISTER_COMPONENTS: DWORD = 4; +pub const D3D11_PS_INPUT_REGISTER_COMPONENT_BIT_COUNT: DWORD = 32; +pub const D3D11_PS_INPUT_REGISTER_COUNT: DWORD = 32; +pub const D3D11_PS_INPUT_REGISTER_READS_PER_INST: DWORD = 2; +pub const D3D11_PS_INPUT_REGISTER_READ_PORTS: DWORD = 1; +pub const D3D11_PS_LEGACY_PIXEL_CENTER_FRACTIONAL_COMPONENT: FLOAT = 0.0; +pub const D3D11_PS_OUTPUT_DEPTH_REGISTER_COMPONENTS: DWORD = 1; +pub const D3D11_PS_OUTPUT_DEPTH_REGISTER_COMPONENT_BIT_COUNT: DWORD = 32; +pub const D3D11_PS_OUTPUT_DEPTH_REGISTER_COUNT: DWORD = 1; +pub const D3D11_PS_OUTPUT_MASK_REGISTER_COMPONENTS: DWORD = 1; +pub const D3D11_PS_OUTPUT_MASK_REGISTER_COMPONENT_BIT_COUNT: DWORD = 32; +pub const D3D11_PS_OUTPUT_MASK_REGISTER_COUNT: DWORD = 1; +pub const D3D11_PS_OUTPUT_REGISTER_COMPONENTS: DWORD = 4; +pub const D3D11_PS_OUTPUT_REGISTER_COMPONENT_BIT_COUNT: DWORD = 32; +pub const D3D11_PS_OUTPUT_REGISTER_COUNT: DWORD = 8; +pub const D3D11_PS_PIXEL_CENTER_FRACTIONAL_COMPONENT: FLOAT = 0.5; +pub const D3D11_RAW_UAV_SRV_BYTE_ALIGNMENT: DWORD = 16; +pub const D3D11_REQ_BLEND_OBJECT_COUNT_PER_DEVICE: DWORD = 4096; +pub const D3D11_REQ_BUFFER_RESOURCE_TEXEL_COUNT_2_TO_EXP: DWORD = 27; +pub const D3D11_REQ_CONSTANT_BUFFER_ELEMENT_COUNT: DWORD = 4096; +pub const D3D11_REQ_DEPTH_STENCIL_OBJECT_COUNT_PER_DEVICE: DWORD = 4096; +pub const D3D11_REQ_DRAWINDEXED_INDEX_COUNT_2_TO_EXP: DWORD = 32; +pub const D3D11_REQ_DRAW_VERTEX_COUNT_2_TO_EXP: DWORD = 32; +pub const D3D11_REQ_FILTERING_HW_ADDRESSABLE_RESOURCE_DIMENSION: DWORD = 16384; +pub const D3D11_REQ_GS_INVOCATION_32BIT_OUTPUT_COMPONENT_LIMIT: DWORD = 1024; +pub const D3D11_REQ_IMMEDIATE_CONSTANT_BUFFER_ELEMENT_COUNT: DWORD = 4096; +pub const D3D11_REQ_MAXANISOTROPY: DWORD = 16; +pub const D3D11_REQ_MIP_LEVELS: DWORD = 15; +pub const D3D11_REQ_MULTI_ELEMENT_STRUCTURE_SIZE_IN_BYTES: DWORD = 2048; +pub const D3D11_REQ_RASTERIZER_OBJECT_COUNT_PER_DEVICE: DWORD = 4096; +pub const D3D11_REQ_RENDER_TO_BUFFER_WINDOW_WIDTH: DWORD = 16384; +pub const D3D11_REQ_RESOURCE_SIZE_IN_MEGABYTES_EXPRESSION_A_TERM: DWORD = 128; +pub const D3D11_REQ_RESOURCE_SIZE_IN_MEGABYTES_EXPRESSION_B_TERM: FLOAT = 0.25; +pub const D3D11_REQ_RESOURCE_SIZE_IN_MEGABYTES_EXPRESSION_C_TERM: DWORD = 2048; +pub const D3D11_REQ_RESOURCE_VIEW_COUNT_PER_DEVICE_2_TO_EXP: DWORD = 20; +pub const D3D11_REQ_SAMPLER_OBJECT_COUNT_PER_DEVICE: DWORD = 4096; +pub const D3D11_REQ_TEXTURE1D_ARRAY_AXIS_DIMENSION: DWORD = 2048; +pub const D3D11_REQ_TEXTURE1D_U_DIMENSION: DWORD = 16384; +pub const D3D11_REQ_TEXTURE2D_ARRAY_AXIS_DIMENSION: DWORD = 2048; +pub const D3D11_REQ_TEXTURE2D_U_OR_V_DIMENSION: DWORD = 16384; +pub const D3D11_REQ_TEXTURE3D_U_V_OR_W_DIMENSION: DWORD = 2048; +pub const D3D11_REQ_TEXTURECUBE_DIMENSION: DWORD = 16384; +pub const D3D11_RESINFO_INSTRUCTION_MISSING_COMPONENT_RETVAL: DWORD = 0; +pub const D3D11_SHADER_MAJOR_VERSION: DWORD = 5; +pub const D3D11_SHADER_MAX_INSTANCES: DWORD = 65535; +pub const D3D11_SHADER_MAX_INTERFACES: DWORD = 253; +pub const D3D11_SHADER_MAX_INTERFACE_CALL_SITES: DWORD = 4096; +pub const D3D11_SHADER_MAX_TYPES: DWORD = 65535; +pub const D3D11_SHADER_MINOR_VERSION: DWORD = 0; +pub const D3D11_SHIFT_INSTRUCTION_PAD_VALUE: DWORD = 0; +pub const D3D11_SHIFT_INSTRUCTION_SHIFT_VALUE_BIT_COUNT: DWORD = 5; +pub const D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT: DWORD = 8; +pub const D3D11_SO_BUFFER_MAX_STRIDE_IN_BYTES: DWORD = 2048; +pub const D3D11_SO_BUFFER_MAX_WRITE_WINDOW_IN_BYTES: DWORD = 512; +pub const D3D11_SO_BUFFER_SLOT_COUNT: DWORD = 4; +pub const D3D11_SO_DDI_REGISTER_INDEX_DENOTING_GAP: DWORD = 0xffffffff; +pub const D3D11_SO_NO_RASTERIZED_STREAM: DWORD = 0xffffffff; +pub const D3D11_SO_OUTPUT_COMPONENT_COUNT: DWORD = 128; +pub const D3D11_SO_STREAM_COUNT: DWORD = 4; +pub const D3D11_SPEC_DATE_DAY: DWORD = 16; +pub const D3D11_SPEC_DATE_MONTH: DWORD = 05; +pub const D3D11_SPEC_DATE_YEAR: DWORD = 2011; +pub const D3D11_SPEC_VERSION: FLOAT = 1.07; +pub const D3D11_SRGB_GAMMA: FLOAT = 2.2; +pub const D3D11_SRGB_TO_FLOAT_DENOMINATOR_1: FLOAT = 12.92; +pub const D3D11_SRGB_TO_FLOAT_DENOMINATOR_2: FLOAT = 1.055; +pub const D3D11_SRGB_TO_FLOAT_EXPONENT: FLOAT = 2.4; +pub const D3D11_SRGB_TO_FLOAT_OFFSET: FLOAT = 0.055; +pub const D3D11_SRGB_TO_FLOAT_THRESHOLD: FLOAT = 0.04045; +pub const D3D11_SRGB_TO_FLOAT_TOLERANCE_IN_ULP: FLOAT = 0.5; +pub const D3D11_STANDARD_COMPONENT_BIT_COUNT: DWORD = 32; +pub const D3D11_STANDARD_COMPONENT_BIT_COUNT_DOUBLED: DWORD = 64; +pub const D3D11_STANDARD_MAXIMUM_ELEMENT_ALIGNMENT_BYTE_MULTIPLE: DWORD = 4; +pub const D3D11_STANDARD_PIXEL_COMPONENT_COUNT: DWORD = 128; +pub const D3D11_STANDARD_PIXEL_ELEMENT_COUNT: DWORD = 32; +pub const D3D11_STANDARD_VECTOR_SIZE: DWORD = 4; +pub const D3D11_STANDARD_VERTEX_ELEMENT_COUNT: DWORD = 32; +pub const D3D11_STANDARD_VERTEX_TOTAL_COMPONENT_COUNT: DWORD = 64; +pub const D3D11_SUBPIXEL_FRACTIONAL_BIT_COUNT: DWORD = 8; +pub const D3D11_SUBTEXEL_FRACTIONAL_BIT_COUNT: DWORD = 8; +pub const D3D11_TESSELLATOR_MAX_EVEN_TESSELLATION_FACTOR: DWORD = 64; +pub const D3D11_TESSELLATOR_MAX_ISOLINE_DENSITY_TESSELLATION_FACTOR: DWORD = 64; +pub const D3D11_TESSELLATOR_MAX_ODD_TESSELLATION_FACTOR: DWORD = 63; +pub const D3D11_TESSELLATOR_MAX_TESSELLATION_FACTOR: DWORD = 64; +pub const D3D11_TESSELLATOR_MIN_EVEN_TESSELLATION_FACTOR: DWORD = 2; +pub const D3D11_TESSELLATOR_MIN_ISOLINE_DENSITY_TESSELLATION_FACTOR: DWORD = 1; +pub const D3D11_TESSELLATOR_MIN_ODD_TESSELLATION_FACTOR: DWORD = 1; +pub const D3D11_TEXEL_ADDRESS_RANGE_BIT_COUNT: DWORD = 16; +pub const D3D11_UNBOUND_MEMORY_ACCESS_RESULT: DWORD = 0; +pub const D3D11_VIEWPORT_AND_SCISSORRECT_MAX_INDEX: DWORD = 15; +pub const D3D11_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE: DWORD = 16; +pub const D3D11_VIEWPORT_BOUNDS_MAX: DWORD = 32767; +pub const D3D11_VIEWPORT_BOUNDS_MIN: c_long = -32768; +pub const D3D11_VS_INPUT_REGISTER_COMPONENTS: DWORD = 4; +pub const D3D11_VS_INPUT_REGISTER_COMPONENT_BIT_COUNT: DWORD = 32; +pub const D3D11_VS_INPUT_REGISTER_COUNT: DWORD = 32; +pub const D3D11_VS_INPUT_REGISTER_READS_PER_INST: DWORD = 2; +pub const D3D11_VS_INPUT_REGISTER_READ_PORTS: DWORD = 1; +pub const D3D11_VS_OUTPUT_REGISTER_COMPONENTS: DWORD = 4; +pub const D3D11_VS_OUTPUT_REGISTER_COMPONENT_BIT_COUNT: DWORD = 32; +pub const D3D11_VS_OUTPUT_REGISTER_COUNT: DWORD = 32; +pub const D3D11_WHQL_CONTEXT_COUNT_FOR_RESOURCE_LIMIT: DWORD = 10; +pub const D3D11_WHQL_DRAWINDEXED_INDEX_COUNT_2_TO_EXP: DWORD = 25; +pub const D3D11_WHQL_DRAW_VERTEX_COUNT_2_TO_EXP: DWORD = 25; +pub const D3D11_1_UAV_SLOT_COUNT: DWORD = 64; +pub const D3D11_2_TILED_RESOURCE_TILE_SIZE_IN_BYTES: DWORD = 65536; +ENUM!{enum D3D11_INPUT_CLASSIFICATION { + D3D11_INPUT_PER_VERTEX_DATA = 0, + D3D11_INPUT_PER_INSTANCE_DATA = 1, +}} +pub const D3D11_APPEND_ALIGNED_ELEMENT: DWORD = 0xffffffff; +STRUCT!{struct D3D11_INPUT_ELEMENT_DESC { + SemanticName: LPCSTR, + SemanticIndex: UINT, + Format: DXGI_FORMAT, + InputSlot: UINT, + AlignedByteOffset: UINT, + InputSlotClass: D3D11_INPUT_CLASSIFICATION, + InstanceDataStepRate: UINT, +}} +ENUM!{enum D3D11_FILL_MODE { + D3D11_FILL_WIREFRAME = 2, + D3D11_FILL_SOLID = 3, +}} +pub type D3D11_PRIMITIVE_TOPOLOGY = D3D_PRIMITIVE_TOPOLOGY; +pub type D3D11_PRIMITIVE = D3D_PRIMITIVE; +ENUM!{enum D3D11_CULL_MODE { + D3D11_CULL_NONE = 1, + D3D11_CULL_FRONT = 2, + D3D11_CULL_BACK = 3, +}} +STRUCT!{struct D3D11_SO_DECLARATION_ENTRY { + Stream: UINT, + SemanticName: LPCSTR, + SemanticIndex: UINT, + StartComponent: BYTE, + ComponentCount: BYTE, + OutputSlot: BYTE, +}} +STRUCT!{struct D3D11_VIEWPORT { + TopLeftX: FLOAT, + TopLeftY: FLOAT, + Width: FLOAT, + Height: FLOAT, + MinDepth: FLOAT, + MaxDepth: FLOAT, +}} +STRUCT!{struct D3D11_DRAW_INSTANCED_INDIRECT_ARGS { + VertexCountPerInstance: UINT, + InstanceCount: UINT, + StartVertexLocation: UINT, + StartInstanceLocation: UINT, +}} +STRUCT!{struct D3D11_DRAW_INDEXED_INSTANCED_INDIRECT_ARGS { + IndexCountPerInstance: UINT, + InstanceCount: UINT, + StartIndexLocation: UINT, + BaseVertexLocation: INT, + StartInstanceLocation: UINT, +}} +ENUM!{enum D3D11_RESOURCE_DIMENSION { + D3D11_RESOURCE_DIMENSION_UNKNOWN = 0, + D3D11_RESOURCE_DIMENSION_BUFFER = 1, + D3D11_RESOURCE_DIMENSION_TEXTURE1D = 2, + D3D11_RESOURCE_DIMENSION_TEXTURE2D = 3, + D3D11_RESOURCE_DIMENSION_TEXTURE3D = 4, +}} +pub type D3D11_SRV_DIMENSION = D3D_SRV_DIMENSION; +ENUM!{enum D3D11_DSV_DIMENSION { + D3D11_DSV_DIMENSION_UNKNOWN = 0, + D3D11_DSV_DIMENSION_TEXTURE1D = 1, + D3D11_DSV_DIMENSION_TEXTURE1DARRAY = 2, + D3D11_DSV_DIMENSION_TEXTURE2D = 3, + D3D11_DSV_DIMENSION_TEXTURE2DARRAY = 4, + D3D11_DSV_DIMENSION_TEXTURE2DMS = 5, + D3D11_DSV_DIMENSION_TEXTURE2DMSARRAY = 6, +}} +ENUM!{enum D3D11_RTV_DIMENSION { + D3D11_RTV_DIMENSION_UNKNOWN = 0, + D3D11_RTV_DIMENSION_BUFFER = 1, + D3D11_RTV_DIMENSION_TEXTURE1D = 2, + D3D11_RTV_DIMENSION_TEXTURE1DARRAY = 3, + D3D11_RTV_DIMENSION_TEXTURE2D = 4, + D3D11_RTV_DIMENSION_TEXTURE2DARRAY = 5, + D3D11_RTV_DIMENSION_TEXTURE2DMS = 6, + D3D11_RTV_DIMENSION_TEXTURE2DMSARRAY = 7, + D3D11_RTV_DIMENSION_TEXTURE3D = 8, +}} +ENUM!{enum D3D11_UAV_DIMENSION { + D3D11_UAV_DIMENSION_UNKNOWN = 0, + D3D11_UAV_DIMENSION_BUFFER = 1, + D3D11_UAV_DIMENSION_TEXTURE1D = 2, + D3D11_UAV_DIMENSION_TEXTURE1DARRAY = 3, + D3D11_UAV_DIMENSION_TEXTURE2D = 4, + D3D11_UAV_DIMENSION_TEXTURE2DARRAY = 5, + D3D11_UAV_DIMENSION_TEXTURE3D = 8, +}} +ENUM!{enum D3D11_USAGE { + D3D11_USAGE_DEFAULT = 0, + D3D11_USAGE_IMMUTABLE = 1, + D3D11_USAGE_DYNAMIC = 2, + D3D11_USAGE_STAGING = 3, +}} +FLAGS!{enum D3D11_BIND_FLAG { + D3D11_BIND_VERTEX_BUFFER = 0x1, + D3D11_BIND_INDEX_BUFFER = 0x2, + D3D11_BIND_CONSTANT_BUFFER = 0x4, + D3D11_BIND_SHADER_RESOURCE = 0x8, + D3D11_BIND_STREAM_OUTPUT = 0x10, + D3D11_BIND_RENDER_TARGET = 0x20, + D3D11_BIND_DEPTH_STENCIL = 0x40, + D3D11_BIND_UNORDERED_ACCESS = 0x80, + D3D11_BIND_DECODER = 0x200, + D3D11_BIND_VIDEO_ENCODER = 0x400, +}} +FLAGS!{enum D3D11_CPU_ACCESS_FLAG { + D3D11_CPU_ACCESS_WRITE = 0x10000, + D3D11_CPU_ACCESS_READ = 0x20000, +}} +FLAGS!{enum D3D11_RESOURCE_MISC_FLAG { + D3D11_RESOURCE_MISC_GENERATE_MIPS = 0x1, + D3D11_RESOURCE_MISC_SHARED = 0x2, + D3D11_RESOURCE_MISC_TEXTURECUBE = 0x4, + D3D11_RESOURCE_MISC_DRAWINDIRECT_ARGS = 0x10, + D3D11_RESOURCE_MISC_BUFFER_ALLOW_RAW_VIEWS = 0x20, + D3D11_RESOURCE_MISC_BUFFER_STRUCTURED = 0x40, + D3D11_RESOURCE_MISC_RESOURCE_CLAMP = 0x80, + D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX = 0x100, + D3D11_RESOURCE_MISC_GDI_COMPATIBLE = 0x200, + D3D11_RESOURCE_MISC_SHARED_NTHANDLE = 0x800, + D3D11_RESOURCE_MISC_RESTRICTED_CONTENT = 0x1000, + D3D11_RESOURCE_MISC_RESTRICT_SHARED_RESOURCE = 0x2000, + D3D11_RESOURCE_MISC_RESTRICT_SHARED_RESOURCE_DRIVER = 0x4000, + D3D11_RESOURCE_MISC_GUARDED = 0x8000, + D3D11_RESOURCE_MISC_TILE_POOL = 0x20000, + D3D11_RESOURCE_MISC_TILED = 0x40000, + D3D11_RESOURCE_MISC_HW_PROTECTED = 0x80000, +}} +ENUM!{enum D3D11_MAP { + D3D11_MAP_READ = 1, + D3D11_MAP_WRITE = 2, + D3D11_MAP_READ_WRITE = 3, + D3D11_MAP_WRITE_DISCARD = 4, + D3D11_MAP_WRITE_NO_OVERWRITE = 5, +}} +FLAGS!{enum D3D11_MAP_FLAG { + D3D11_MAP_FLAG_DO_NOT_WAIT = 0x100000, +}} +FLAGS!{enum D3D11_RAISE_FLAG { + D3D11_RAISE_FLAG_DRIVER_INTERNAL_ERROR = 0x1, +}} +FLAGS!{enum D3D11_CLEAR_FLAG { + D3D11_CLEAR_DEPTH = 0x1, + D3D11_CLEAR_STENCIL = 0x2, +}} +pub type D3D11_RECT = RECT; +STRUCT!{struct D3D11_BOX { + left: UINT, + top: UINT, + front: UINT, + right: UINT, + bottom: UINT, + back: UINT, +}} +RIDL!{interface ID3D11DeviceChild(ID3D11DeviceChildVtbl): IUnknown(IUnknownVtbl) { + fn GetDevice(&mut self, ppDevice: *mut *mut ID3D11Device) -> (), + fn GetPrivateData( + &mut self, guid: REFGUID, pDataSize: *mut UINT, pData: *mut c_void + ) -> HRESULT, + fn SetPrivateData( + &mut self, guid: REFGUID, DataSize: UINT, pData: *const c_void + ) -> HRESULT, + fn SetPrivateDataInterface(&mut self, guid: REFGUID, pData: *const IUnknown) -> HRESULT +}} +ENUM!{enum D3D11_COMPARISON_FUNC { + D3D11_COMPARISON_NEVER = 1, + D3D11_COMPARISON_LESS = 2, + D3D11_COMPARISON_EQUAL = 3, + D3D11_COMPARISON_LESS_EQUAL = 4, + D3D11_COMPARISON_GREATER = 5, + D3D11_COMPARISON_NOT_EQUAL = 6, + D3D11_COMPARISON_GREATER_EQUAL = 7, + D3D11_COMPARISON_ALWAYS = 8, +}} +ENUM!{enum D3D11_DEPTH_WRITE_MASK { + D3D11_DEPTH_WRITE_MASK_ZERO = 0, + D3D11_DEPTH_WRITE_MASK_ALL = 1, +}} +ENUM!{enum D3D11_STENCIL_OP { + D3D11_STENCIL_OP_KEEP = 1, + D3D11_STENCIL_OP_ZERO = 2, + D3D11_STENCIL_OP_REPLACE = 3, + D3D11_STENCIL_OP_INCR_SAT = 4, + D3D11_STENCIL_OP_DECR_SAT = 5, + D3D11_STENCIL_OP_INVERT = 6, + D3D11_STENCIL_OP_INCR = 7, + D3D11_STENCIL_OP_DECR = 8, +}} +STRUCT!{struct D3D11_DEPTH_STENCILOP_DESC { + StencilFailOp: D3D11_STENCIL_OP, + StencilDepthFailOp: D3D11_STENCIL_OP, + StencilPassOp: D3D11_STENCIL_OP, + StencilFunc: D3D11_COMPARISON_FUNC, +}} +STRUCT!{struct D3D11_DEPTH_STENCIL_DESC { + DepthEnable: BOOL, + DepthWriteMask: D3D11_DEPTH_WRITE_MASK, + DepthFunc: D3D11_COMPARISON_FUNC, + StencilEnable: BOOL, + StencilReadMask: UINT8, + StencilWriteMask: UINT8, + FrontFace: D3D11_DEPTH_STENCILOP_DESC, + BackFace: D3D11_DEPTH_STENCILOP_DESC, +}} +RIDL!{interface ID3D11DepthStencilState(ID3D11DepthStencilStateVtbl) + : ID3D11DeviceChild(ID3D11DeviceChildVtbl) { + fn GetDesc(&mut self, pDesc: *mut D3D11_DEPTH_STENCIL_DESC) -> () +}} +ENUM!{enum D3D11_BLEND { + D3D11_BLEND_ZERO = 1, + D3D11_BLEND_ONE = 2, + D3D11_BLEND_SRC_COLOR = 3, + D3D11_BLEND_INV_SRC_COLOR = 4, + D3D11_BLEND_SRC_ALPHA = 5, + D3D11_BLEND_INV_SRC_ALPHA = 6, + D3D11_BLEND_DEST_ALPHA = 7, + D3D11_BLEND_INV_DEST_ALPHA = 8, + D3D11_BLEND_DEST_COLOR = 9, + D3D11_BLEND_INV_DEST_COLOR = 10, + D3D11_BLEND_SRC_ALPHA_SAT = 11, + D3D11_BLEND_BLEND_FACTOR = 14, + D3D11_BLEND_INV_BLEND_FACTOR = 15, + D3D11_BLEND_SRC1_COLOR = 16, + D3D11_BLEND_INV_SRC1_COLOR = 17, + D3D11_BLEND_SRC1_ALPHA = 18, + D3D11_BLEND_INV_SRC1_ALPHA = 19, +}} +ENUM!{enum D3D11_BLEND_OP { + D3D11_BLEND_OP_ADD = 1, + D3D11_BLEND_OP_SUBTRACT = 2, + D3D11_BLEND_OP_REV_SUBTRACT = 3, + D3D11_BLEND_OP_MIN = 4, + D3D11_BLEND_OP_MAX = 5, +}} +FLAGS!{enum D3D11_COLOR_WRITE_ENABLE { + D3D11_COLOR_WRITE_ENABLE_RED = 1, + D3D11_COLOR_WRITE_ENABLE_GREEN = 2, + D3D11_COLOR_WRITE_ENABLE_BLUE = 4, + D3D11_COLOR_WRITE_ENABLE_ALPHA = 8, + D3D11_COLOR_WRITE_ENABLE_ALL = D3D11_COLOR_WRITE_ENABLE_RED.0 | D3D11_COLOR_WRITE_ENABLE_GREEN.0 | + D3D11_COLOR_WRITE_ENABLE_BLUE.0 | D3D11_COLOR_WRITE_ENABLE_ALPHA.0, +}} +STRUCT!{struct D3D11_RENDER_TARGET_BLEND_DESC { + BlendEnable: BOOL, + SrcBlend: D3D11_BLEND, + DestBlend: D3D11_BLEND, + BlendOp: D3D11_BLEND_OP, + SrcBlendAlpha: D3D11_BLEND, + DestBlendAlpha: D3D11_BLEND, + BlendOpAlpha: D3D11_BLEND_OP, + RenderTargetWriteMask: UINT8, +}} +STRUCT!{struct D3D11_BLEND_DESC { + AlphaToCoverageEnable: BOOL, + IndependentBlendEnable: BOOL, + RenderTarget: [D3D11_RENDER_TARGET_BLEND_DESC; 8], +}} +RIDL!{interface ID3D11BlendState(ID3D11BlendStateVtbl): ID3D11DeviceChild(ID3D11DeviceChildVtbl) { + fn GetDesc(&mut self, pDesc: *mut D3D11_BLEND_DESC) -> () +}} +STRUCT!{struct D3D11_RASTERIZER_DESC { + FillMode: D3D11_FILL_MODE, + CullMode: D3D11_CULL_MODE, + FrontCounterClockwise: BOOL, + DepthBias: INT, + DepthBiasClamp: FLOAT, + SlopeScaledDepthBias: FLOAT, + DepthClipEnable: BOOL, + ScissorEnable: BOOL, + MultisampleEnable: BOOL, + AntialiasedLineEnable: BOOL, +}} +RIDL!{interface ID3D11RasterizerState(ID3D11RasterizerStateVtbl) + : ID3D11DeviceChild(ID3D11DeviceChildVtbl) { + fn GetDesc(&mut self, pDesc: *mut D3D11_RASTERIZER_DESC) -> () +}} +STRUCT!{struct D3D11_SUBRESOURCE_DATA { + pSysMem: *const c_void, + SysMemPitch: UINT, + SysMemSlicePitch: UINT, +}} +STRUCT!{struct D3D11_MAPPED_SUBRESOURCE { + pData: *mut c_void, + RowPitch: UINT, + DepthPitch: UINT, +}} +RIDL!{interface ID3D11Resource(ID3D11ResourceVtbl): ID3D11DeviceChild(ID3D11DeviceChildVtbl) { + fn GetType(&mut self, pResourceDimension: *mut D3D11_RESOURCE_DIMENSION) -> (), + fn SetEvictionPriority(&mut self, EvictionPriority: UINT) -> (), + fn GetEvictionPriority(&mut self) -> UINT +}} +STRUCT!{struct D3D11_BUFFER_DESC { + ByteWidth: UINT, + Usage: D3D11_USAGE, + BindFlags: UINT, + CPUAccessFlags: UINT, + MiscFlags: UINT, + StructureByteStride: UINT, +}} +RIDL!{interface ID3D11Buffer(ID3D11BufferVtbl): ID3D11Resource(ID3D11ResourceVtbl) { + fn GetDesc(&mut self, pDesc: *mut D3D11_BUFFER_DESC) -> () +}} +STRUCT!{struct D3D11_TEXTURE1D_DESC { + Width: UINT, + MipLevels: UINT, + ArraySize: UINT, + Format: DXGI_FORMAT, + Usage: D3D11_USAGE, + BindFlags: UINT, + CPUAccessFlags: UINT, + MiscFlags: UINT, +}} +RIDL!{interface ID3D11Texture1D(ID3D11Texture1DVtbl): ID3D11Resource(ID3D11ResourceVtbl) { + fn GetDesc(&mut self, pDesc: *mut D3D11_TEXTURE1D_DESC) -> () +}} +STRUCT!{struct D3D11_TEXTURE2D_DESC { + Width: UINT, + Height: UINT, + MipLevels: UINT, + ArraySize: UINT, + Format: DXGI_FORMAT, + SampleDesc: DXGI_SAMPLE_DESC, + Usage: D3D11_USAGE, + BindFlags: UINT, + CPUAccessFlags: UINT, + MiscFlags: UINT, +}} +RIDL!{interface ID3D11Texture2D(ID3D11Texture2DVtbl): ID3D11Resource(ID3D11ResourceVtbl) { + fn GetDesc(&mut self, pDesc: *mut D3D11_TEXTURE2D_DESC) -> () +}} +STRUCT!{struct D3D11_TEXTURE3D_DESC { + Width: UINT, + Height: UINT, + Depth: UINT, + MipLevels: UINT, + Format: DXGI_FORMAT, + Usage: D3D11_USAGE, + BindFlags: UINT, + CPUAccessFlags: UINT, + MiscFlags: UINT, +}} +RIDL!{interface ID3D11Texture3D(ID3D11Texture3DVtbl): ID3D11Resource(ID3D11ResourceVtbl) { + fn GetDesc(&mut self, pDesc: *mut D3D11_TEXTURE3D_DESC) -> () +}} +ENUM!{enum D3D11_TEXTURECUBE_FACE { + D3D11_TEXTURECUBE_FACE_POSITIVE_X = 0, + D3D11_TEXTURECUBE_FACE_NEGATIVE_X = 1, + D3D11_TEXTURECUBE_FACE_POSITIVE_Y = 2, + D3D11_TEXTURECUBE_FACE_NEGATIVE_Y = 3, + D3D11_TEXTURECUBE_FACE_POSITIVE_Z = 4, + D3D11_TEXTURECUBE_FACE_NEGATIVE_Z = 5, +}} +RIDL!{interface ID3D11View(ID3D11ViewVtbl): ID3D11DeviceChild(ID3D11DeviceChildVtbl) { + fn GetResource(&mut self, ppResource: *mut *mut ID3D11Resource) -> () +}} +STRUCT!{struct D3D11_BUFFER_SRV { + u1: UINT, + u2: UINT, +}} +UNION!{D3D11_BUFFER_SRV, u1, FirstElement, FirstElement_mut, UINT} +UNION!{D3D11_BUFFER_SRV, u1, ElementOffset, ElementOffset_mut, UINT} +UNION!{D3D11_BUFFER_SRV, u2, NumElements, NumElements_mut, UINT} +UNION!{D3D11_BUFFER_SRV, u2, ElementWidth, ElementWidth_mut, UINT} +FLAGS!{enum D3D11_BUFFEREX_SRV_FLAG { + D3D11_BUFFEREX_SRV_FLAG_RAW = 0x1, +}} +STRUCT!{struct D3D11_BUFFEREX_SRV { + FirstElement: UINT, + NumElements: UINT, + Flags: UINT, +}} +STRUCT!{struct D3D11_TEX1D_SRV { + MostDetailedMip: UINT, + MipLevels: UINT, +}} +STRUCT!{struct D3D11_TEX1D_ARRAY_SRV { + MostDetailedMip: UINT, + MipLevels: UINT, + FirstArraySlice: UINT, + ArraySize: UINT, +}} +STRUCT!{struct D3D11_TEX2D_SRV { + MostDetailedMip: UINT, + MipLevels: UINT, +}} +STRUCT!{struct D3D11_TEX2D_ARRAY_SRV { + MostDetailedMip: UINT, + MipLevels: UINT, + FirstArraySlice: UINT, + ArraySize: UINT, +}} +STRUCT!{struct D3D11_TEX3D_SRV { + MostDetailedMip: UINT, + MipLevels: UINT, +}} +STRUCT!{struct D3D11_TEXCUBE_SRV { + MostDetailedMip: UINT, + MipLevels: UINT, +}} +STRUCT!{struct D3D11_TEXCUBE_ARRAY_SRV { + MostDetailedMip: UINT, + MipLevels: UINT, + First2DArrayFace: UINT, + NumCubes: UINT, +}} +STRUCT!{struct D3D11_TEX2DMS_SRV { + UnusedField_NothingToDefine: UINT, +}} +STRUCT!{struct D3D11_TEX2DMS_ARRAY_SRV { + FirstArraySlice: UINT, + ArraySize: UINT, +}} +STRUCT!{struct D3D11_SHADER_RESOURCE_VIEW_DESC { + Format: DXGI_FORMAT, + ViewDimension: D3D11_SRV_DIMENSION, + u: [UINT; 4], +}} +UNION!{D3D11_SHADER_RESOURCE_VIEW_DESC, u, Buffer, Buffer_mut, D3D11_BUFFER_SRV} +UNION!{D3D11_SHADER_RESOURCE_VIEW_DESC, u, Texture1D, Texture1D_mut, D3D11_TEX1D_SRV} +UNION!{D3D11_SHADER_RESOURCE_VIEW_DESC, u, Texture1DArray, Texture1DArray_mut, + D3D11_TEX1D_ARRAY_SRV} +UNION!{D3D11_SHADER_RESOURCE_VIEW_DESC, u, Texture2D, Texture2D_mut, D3D11_TEX2D_SRV} +UNION!{D3D11_SHADER_RESOURCE_VIEW_DESC, u, Texture2DArray, Texture2DArray_mut, + D3D11_TEX2D_ARRAY_SRV} +UNION!{D3D11_SHADER_RESOURCE_VIEW_DESC, u, Texture2DMS, Texture2DMS_mut, D3D11_TEX2DMS_SRV} +UNION!{D3D11_SHADER_RESOURCE_VIEW_DESC, u, Texture2DMSArray, Texture2DMSArray_mut, + D3D11_TEX2DMS_ARRAY_SRV} +UNION!{D3D11_SHADER_RESOURCE_VIEW_DESC, u, Texture3D, Texture3D_mut, D3D11_TEX3D_SRV} +UNION!{D3D11_SHADER_RESOURCE_VIEW_DESC, u, TextureCube, TextureCube_mut, D3D11_TEXCUBE_SRV} +UNION!{D3D11_SHADER_RESOURCE_VIEW_DESC, u, TextureCubeArray, TextureCubeArray_mut, + D3D11_TEXCUBE_ARRAY_SRV} +UNION!{D3D11_SHADER_RESOURCE_VIEW_DESC, u, BufferEx, BufferEx_mut, D3D11_BUFFEREX_SRV} +RIDL!{interface ID3D11ShaderResourceView(ID3D11ShaderResourceViewVtbl): ID3D11View(ID3D11ViewVtbl) { + fn GetDesc(&mut self, pDesc: *mut D3D11_SHADER_RESOURCE_VIEW_DESC) -> () +}} +STRUCT!{struct D3D11_BUFFER_RTV { + u1: UINT, + u2: UINT, +}} +UNION!{D3D11_BUFFER_RTV, u1, FirstElement, FirstElement_mut, UINT} +UNION!{D3D11_BUFFER_RTV, u1, ElementOffset, ElementOffset_mut, UINT} +UNION!{D3D11_BUFFER_RTV, u2, NumElements, NumElements_mut, UINT} +UNION!{D3D11_BUFFER_RTV, u2, ElementWidth, ElementWidth_mut, UINT} +STRUCT!{struct D3D11_TEX1D_RTV { + MipSlice: UINT, +}} +STRUCT!{struct D3D11_TEX1D_ARRAY_RTV { + MipSlice: UINT, + FirstArraySlice: UINT, + ArraySize: UINT, +}} +STRUCT!{struct D3D11_TEX2D_RTV { + MipSlice: UINT, +}} +STRUCT!{struct D3D11_TEX2DMS_RTV { + UnusedField_NothingToDefine: UINT, +}} +STRUCT!{struct D3D11_TEX2D_ARRAY_RTV { + MipSlice: UINT, + FirstArraySlice: UINT, + ArraySize: UINT, +}} +STRUCT!{struct D3D11_TEX2DMS_ARRAY_RTV { + FirstArraySlice: UINT, + ArraySize: UINT, +}} +STRUCT!{struct D3D11_TEX3D_RTV { + MipSlice: UINT, + FirstWSlice: UINT, + WSize: UINT, +}} +STRUCT!{struct D3D11_RENDER_TARGET_VIEW_DESC { + Format: DXGI_FORMAT, + ViewDimension: D3D11_RTV_DIMENSION, + u: [UINT; 3], +}} +UNION!{D3D11_RENDER_TARGET_VIEW_DESC, u, Buffer, Buffer_mut, D3D11_BUFFER_RTV} +UNION!{D3D11_RENDER_TARGET_VIEW_DESC, u, Texture1D, Texture1D_mut, D3D11_TEX1D_RTV} +UNION!{D3D11_RENDER_TARGET_VIEW_DESC, u, Texture1DArray, Texture1DArray_mut, + D3D11_TEX1D_ARRAY_RTV} +UNION!{D3D11_RENDER_TARGET_VIEW_DESC, u, Texture2D, Texture2D_mut, D3D11_TEX2D_RTV} +UNION!{D3D11_RENDER_TARGET_VIEW_DESC, u, Texture2DArray, Texture2DArray_mut, + D3D11_TEX2D_ARRAY_RTV} +UNION!{D3D11_RENDER_TARGET_VIEW_DESC, u, Texture2DMS, Texture2DMS_mut, D3D11_TEX2DMS_RTV} +UNION!{D3D11_RENDER_TARGET_VIEW_DESC, u, Texture2DMSArray,Texture2DMSArray_mut, + D3D11_TEX2DMS_ARRAY_RTV} +UNION!{D3D11_RENDER_TARGET_VIEW_DESC, u, Texture3D, Texture3D_mut, D3D11_TEX3D_RTV} +RIDL!{interface ID3D11RenderTargetView(ID3D11RenderTargetViewVtbl): ID3D11View(ID3D11ViewVtbl) { + fn GetDesc(&mut self, pDesc: *mut D3D11_RENDER_TARGET_VIEW_DESC) -> () +}} +STRUCT!{struct D3D11_TEX1D_DSV { + MipSlice: UINT, +}} +STRUCT!{struct D3D11_TEX1D_ARRAY_DSV { + MipSlice: UINT, + FirstArraySlice: UINT, + ArraySize: UINT, +}} +STRUCT!{struct D3D11_TEX2D_DSV { + MipSlice: UINT, +}} +STRUCT!{struct D3D11_TEX2D_ARRAY_DSV { + MipSlice: UINT, + FirstArraySlice: UINT, + ArraySize: UINT, +}} +STRUCT!{struct D3D11_TEX2DMS_DSV { + UnusedField_NothingToDefine: UINT, +}} +STRUCT!{struct D3D11_TEX2DMS_ARRAY_DSV { + FirstArraySlice: UINT, + ArraySize: UINT, +}} +FLAGS!{enum D3D11_DSV_FLAG{ + D3D11_DSV_READ_ONLY_DEPTH = 0x1, + D3D11_DSV_READ_ONLY_STENCIL = 0x2, +}} +STRUCT!{struct D3D11_DEPTH_STENCIL_VIEW_DESC { + Format: DXGI_FORMAT, + ViewDimension: D3D11_DSV_DIMENSION, + Flags: UINT, + u: [UINT; 3], +}} +UNION!{D3D11_DEPTH_STENCIL_VIEW_DESC, u, Texture1D, Texture1D_mut, D3D11_TEX1D_DSV} +UNION!{D3D11_DEPTH_STENCIL_VIEW_DESC, u, Texture1DArray, Texture1DArray_mut, + D3D11_TEX1D_ARRAY_DSV} +UNION!{D3D11_DEPTH_STENCIL_VIEW_DESC, u, Texture2D, Texture2D_mut, D3D11_TEX2D_DSV} +UNION!{D3D11_DEPTH_STENCIL_VIEW_DESC, u, Texture2DArray, Texture2DArray_mut, + D3D11_TEX2D_ARRAY_DSV} +UNION!{D3D11_DEPTH_STENCIL_VIEW_DESC, u, Texture2DMS, Texture2DMS_mut, D3D11_TEX2DMS_DSV} +UNION!{D3D11_DEPTH_STENCIL_VIEW_DESC, u, Texture2DMSArray, Texture2DMSArray_mut, + D3D11_TEX2DMS_ARRAY_DSV} +RIDL!{interface ID3D11DepthStencilView(ID3D11DepthStencilViewVtbl): ID3D11View(ID3D11ViewVtbl) { + fn GetDesc(&mut self, pDesc: *mut D3D11_DEPTH_STENCIL_VIEW_DESC) -> () +}} +FLAGS!{enum D3D11_BUFFER_UAV_FLAG { + D3D11_BUFFER_UAV_FLAG_RAW = 0x1, + D3D11_BUFFER_UAV_FLAG_APPEND = 0x2, + D3D11_BUFFER_UAV_FLAG_COUNTER = 0x4, +}} +STRUCT!{struct D3D11_BUFFER_UAV { + FirstElement: UINT, + NumElements: UINT, + Flags: UINT, +}} +STRUCT!{struct D3D11_TEX1D_UAV { + MipSlice: UINT, +}} +STRUCT!{struct D3D11_TEX1D_ARRAY_UAV { + MipSlice: UINT, + FirstArraySlice: UINT, + ArraySize: UINT, +}} +STRUCT!{struct D3D11_TEX2D_UAV { + MipSlice: UINT, +}} +STRUCT!{struct D3D11_TEX2D_ARRAY_UAV { + MipSlice: UINT, + FirstArraySlice: UINT, + ArraySize: UINT, +}} +STRUCT!{struct D3D11_TEX3D_UAV { + MipSlice: UINT, + FirstWSlice: UINT, + WSize: UINT, +}} +STRUCT!{struct D3D11_UNORDERED_ACCESS_VIEW_DESC { + Format: DXGI_FORMAT, + ViewDimension: D3D11_UAV_DIMENSION, + u: [UINT; 3], +}} +UNION!{D3D11_UNORDERED_ACCESS_VIEW_DESC, u, Buffer, Buffer_mut, D3D11_BUFFER_UAV} +UNION!{D3D11_UNORDERED_ACCESS_VIEW_DESC, u, Texture1D, Texture1D_mut, D3D11_TEX1D_UAV} +UNION!{D3D11_UNORDERED_ACCESS_VIEW_DESC, u, Texture1DArray, Texture1DArray_mut, + D3D11_TEX1D_ARRAY_UAV} +UNION!{D3D11_UNORDERED_ACCESS_VIEW_DESC, u, Texture2D, Texture2D_mut, D3D11_TEX2D_UAV} +UNION!{D3D11_UNORDERED_ACCESS_VIEW_DESC, u, Texture2DArray, Texture2DArray_mut, + D3D11_TEX2D_ARRAY_UAV} +UNION!{D3D11_UNORDERED_ACCESS_VIEW_DESC, u, Texture3D, Texture3D_mut, D3D11_TEX3D_UAV} +RIDL!{interface ID3D11UnorderedAccessView(ID3D11UnorderedAccessViewVtbl): ID3D11View(ID3D11ViewVtbl) { + fn GetDesc(&mut self, pDesc: *mut D3D11_UNORDERED_ACCESS_VIEW_DESC) -> () +}} +RIDL!{interface ID3D11VertexShader(ID3D11VertexShaderVtbl) + : ID3D11DeviceChild(ID3D11DeviceChildVtbl) {}} +RIDL!{interface ID3D11HullShader(ID3D11HullShaderVtbl) + : ID3D11DeviceChild(ID3D11DeviceChildVtbl) {}} +RIDL!{interface ID3D11DomainShader(ID3D11DomainShaderVtbl) + : ID3D11DeviceChild(ID3D11DeviceChildVtbl) {}} +RIDL!{interface ID3D11GeometryShader(ID3D11GeometryShaderVtbl) + : ID3D11DeviceChild(ID3D11DeviceChildVtbl) {}} +RIDL!{interface ID3D11PixelShader(ID3D11PixelShaderVtbl) + : ID3D11DeviceChild(ID3D11DeviceChildVtbl) {}} +RIDL!{interface ID3D11ComputeShader(ID3D11ComputeShaderVtbl) + : ID3D11DeviceChild(ID3D11DeviceChildVtbl) {}} +RIDL!{interface ID3D11InputLayout(ID3D11InputLayoutVtbl) + : ID3D11DeviceChild(ID3D11DeviceChildVtbl) {}} +ENUM!{enum D3D11_FILTER { + D3D11_FILTER_MIN_MAG_MIP_POINT = 0, + D3D11_FILTER_MIN_MAG_POINT_MIP_LINEAR = 0x1, + D3D11_FILTER_MIN_POINT_MAG_LINEAR_MIP_POINT = 0x4, + D3D11_FILTER_MIN_POINT_MAG_MIP_LINEAR = 0x5, + D3D11_FILTER_MIN_LINEAR_MAG_MIP_POINT = 0x10, + D3D11_FILTER_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 0x11, + D3D11_FILTER_MIN_MAG_LINEAR_MIP_POINT = 0x14, + D3D11_FILTER_MIN_MAG_MIP_LINEAR = 0x15, + D3D11_FILTER_ANISOTROPIC = 0x55, + D3D11_FILTER_COMPARISON_MIN_MAG_MIP_POINT = 0x80, + D3D11_FILTER_COMPARISON_MIN_MAG_POINT_MIP_LINEAR = 0x81, + D3D11_FILTER_COMPARISON_MIN_POINT_MAG_LINEAR_MIP_POINT = 0x84, + D3D11_FILTER_COMPARISON_MIN_POINT_MAG_MIP_LINEAR = 0x85, + D3D11_FILTER_COMPARISON_MIN_LINEAR_MAG_MIP_POINT = 0x90, + D3D11_FILTER_COMPARISON_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 0x91, + D3D11_FILTER_COMPARISON_MIN_MAG_LINEAR_MIP_POINT = 0x94, + D3D11_FILTER_COMPARISON_MIN_MAG_MIP_LINEAR = 0x95, + D3D11_FILTER_COMPARISON_ANISOTROPIC = 0xd5, + D3D11_FILTER_MINIMUM_MIN_MAG_MIP_POINT = 0x100, + D3D11_FILTER_MINIMUM_MIN_MAG_POINT_MIP_LINEAR = 0x101, + D3D11_FILTER_MINIMUM_MIN_POINT_MAG_LINEAR_MIP_POINT = 0x104, + D3D11_FILTER_MINIMUM_MIN_POINT_MAG_MIP_LINEAR = 0x105, + D3D11_FILTER_MINIMUM_MIN_LINEAR_MAG_MIP_POINT = 0x110, + D3D11_FILTER_MINIMUM_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 0x111, + D3D11_FILTER_MINIMUM_MIN_MAG_LINEAR_MIP_POINT = 0x114, + D3D11_FILTER_MINIMUM_MIN_MAG_MIP_LINEAR = 0x115, + D3D11_FILTER_MINIMUM_ANISOTROPIC = 0x155, + D3D11_FILTER_MAXIMUM_MIN_MAG_MIP_POINT = 0x180, + D3D11_FILTER_MAXIMUM_MIN_MAG_POINT_MIP_LINEAR = 0x181, + D3D11_FILTER_MAXIMUM_MIN_POINT_MAG_LINEAR_MIP_POINT = 0x184, + D3D11_FILTER_MAXIMUM_MIN_POINT_MAG_MIP_LINEAR = 0x185, + D3D11_FILTER_MAXIMUM_MIN_LINEAR_MAG_MIP_POINT = 0x190, + D3D11_FILTER_MAXIMUM_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 0x191, + D3D11_FILTER_MAXIMUM_MIN_MAG_LINEAR_MIP_POINT = 0x194, + D3D11_FILTER_MAXIMUM_MIN_MAG_MIP_LINEAR = 0x195, + D3D11_FILTER_MAXIMUM_ANISOTROPIC = 0x1d5, +}} +ENUM!{enum D3D11_FILTER_TYPE { + D3D11_FILTER_TYPE_POINT = 0, + D3D11_FILTER_TYPE_LINEAR = 1, +}} +ENUM!{enum D3D11_FILTER_REDUCTION_TYPE { + D3D11_FILTER_REDUCTION_TYPE_STANDARD = 0, + D3D11_FILTER_REDUCTION_TYPE_COMPARISON = 1, + D3D11_FILTER_REDUCTION_TYPE_MINIMUM = 2, + D3D11_FILTER_REDUCTION_TYPE_MAXIMUM = 3, +}} +pub const D3D11_FILTER_REDUCTION_TYPE_MASK: DWORD = 0x3; +pub const D3D11_FILTER_REDUCTION_TYPE_SHIFT: DWORD = 7; +pub const D3D11_FILTER_TYPE_MASK: DWORD = 0x3; +pub const D3D11_MIN_FILTER_SHIFT: DWORD = 4; +pub const D3D11_MAG_FILTER_SHIFT: DWORD = 2; +pub const D3D11_MIP_FILTER_SHIFT: DWORD = 0; +pub const D3D11_COMPARISON_FILTERING_BIT: DWORD = 0x80; +pub const D3D11_ANISOTROPIC_FILTERING_BIT: DWORD = 0x40; +ENUM!{enum D3D11_TEXTURE_ADDRESS_MODE { + D3D11_TEXTURE_ADDRESS_WRAP = 1, + D3D11_TEXTURE_ADDRESS_MIRROR = 2, + D3D11_TEXTURE_ADDRESS_CLAMP = 3, + D3D11_TEXTURE_ADDRESS_BORDER = 4, + D3D11_TEXTURE_ADDRESS_MIRROR_ONCE = 5, +}} +STRUCT!{struct D3D11_SAMPLER_DESC { + Filter: D3D11_FILTER, + AddressU: D3D11_TEXTURE_ADDRESS_MODE, + AddressV: D3D11_TEXTURE_ADDRESS_MODE, + AddressW: D3D11_TEXTURE_ADDRESS_MODE, + MipLODBias: FLOAT, + MaxAnisotropy: UINT, + ComparisonFunc: D3D11_COMPARISON_FUNC, + BorderColor: [FLOAT; 4], + MinLOD: FLOAT, + MaxLOD: FLOAT, +}} +RIDL!{interface ID3D11SamplerState(ID3D11SamplerStateVtbl): ID3D11DeviceChild(ID3D11DeviceChildVtbl) { + fn GetDesc(&mut self, pDesc: *mut D3D11_SAMPLER_DESC) -> () +}} +FLAGS!{enum D3D11_FORMAT_SUPPORT { + D3D11_FORMAT_SUPPORT_BUFFER = 0x1, + D3D11_FORMAT_SUPPORT_IA_VERTEX_BUFFER = 0x2, + D3D11_FORMAT_SUPPORT_IA_INDEX_BUFFER = 0x4, + D3D11_FORMAT_SUPPORT_SO_BUFFER = 0x8, + D3D11_FORMAT_SUPPORT_TEXTURE1D = 0x10, + D3D11_FORMAT_SUPPORT_TEXTURE2D = 0x20, + D3D11_FORMAT_SUPPORT_TEXTURE3D = 0x40, + D3D11_FORMAT_SUPPORT_TEXTURECUBE = 0x80, + D3D11_FORMAT_SUPPORT_SHADER_LOAD = 0x100, + D3D11_FORMAT_SUPPORT_SHADER_SAMPLE = 0x200, + D3D11_FORMAT_SUPPORT_SHADER_SAMPLE_COMPARISON = 0x400, + D3D11_FORMAT_SUPPORT_SHADER_SAMPLE_MONO_TEXT = 0x800, + D3D11_FORMAT_SUPPORT_MIP = 0x1000, + D3D11_FORMAT_SUPPORT_MIP_AUTOGEN = 0x2000, + D3D11_FORMAT_SUPPORT_RENDER_TARGET = 0x4000, + D3D11_FORMAT_SUPPORT_BLENDABLE = 0x8000, + D3D11_FORMAT_SUPPORT_DEPTH_STENCIL = 0x10000, + D3D11_FORMAT_SUPPORT_CPU_LOCKABLE = 0x20000, + D3D11_FORMAT_SUPPORT_MULTISAMPLE_RESOLVE = 0x40000, + D3D11_FORMAT_SUPPORT_DISPLAY = 0x80000, + D3D11_FORMAT_SUPPORT_CAST_WITHIN_BIT_LAYOUT = 0x100000, + D3D11_FORMAT_SUPPORT_MULTISAMPLE_RENDERTARGET = 0x200000, + D3D11_FORMAT_SUPPORT_MULTISAMPLE_LOAD = 0x400000, + D3D11_FORMAT_SUPPORT_SHADER_GATHER = 0x800000, + D3D11_FORMAT_SUPPORT_BACK_BUFFER_CAST = 0x1000000, + D3D11_FORMAT_SUPPORT_TYPED_UNORDERED_ACCESS_VIEW = 0x2000000, + D3D11_FORMAT_SUPPORT_SHADER_GATHER_COMPARISON = 0x4000000, + D3D11_FORMAT_SUPPORT_DECODER_OUTPUT = 0x8000000, + D3D11_FORMAT_SUPPORT_VIDEO_PROCESSOR_OUTPUT = 0x10000000, + D3D11_FORMAT_SUPPORT_VIDEO_PROCESSOR_INPUT = 0x20000000, + D3D11_FORMAT_SUPPORT_VIDEO_ENCODER = 0x40000000, +}} +FLAGS!{enum D3D11_FORMAT_SUPPORT2 { + D3D11_FORMAT_SUPPORT2_UAV_ATOMIC_ADD = 0x1, + D3D11_FORMAT_SUPPORT2_UAV_ATOMIC_BITWISE_OPS = 0x2, + D3D11_FORMAT_SUPPORT2_UAV_ATOMIC_COMPARE_STORE_OR_COMPARE_EXCHANGE = 0x4, + D3D11_FORMAT_SUPPORT2_UAV_ATOMIC_EXCHANGE = 0x8, + D3D11_FORMAT_SUPPORT2_UAV_ATOMIC_SIGNED_MIN_OR_MAX = 0x10, + D3D11_FORMAT_SUPPORT2_UAV_ATOMIC_UNSIGNED_MIN_OR_MAX = 0x20, + D3D11_FORMAT_SUPPORT2_UAV_TYPED_LOAD = 0x40, + D3D11_FORMAT_SUPPORT2_UAV_TYPED_STORE = 0x80, + D3D11_FORMAT_SUPPORT2_OUTPUT_MERGER_LOGIC_OP = 0x100, + D3D11_FORMAT_SUPPORT2_TILED = 0x200, + D3D11_FORMAT_SUPPORT2_SHAREABLE = 0x400, + D3D11_FORMAT_SUPPORT2_MULTIPLANE_OVERLAY = 0x4000, +}} +RIDL!{interface ID3D11Asynchronous(ID3D11AsynchronousVtbl): ID3D11DeviceChild(ID3D11DeviceChildVtbl) { + fn GetDataSize(&mut self) -> UINT +}} +FLAGS!{enum D3D11_ASYNC_GETDATA_FLAG { + D3D11_ASYNC_GETDATA_DONOTFLUSH = 0x1, +}} +ENUM!{enum D3D11_QUERY { + D3D11_QUERY_EVENT = 0, + D3D11_QUERY_OCCLUSION = D3D11_QUERY_EVENT.0 + 1, + D3D11_QUERY_TIMESTAMP = D3D11_QUERY_OCCLUSION.0 + 1, + D3D11_QUERY_TIMESTAMP_DISJOINT = D3D11_QUERY_TIMESTAMP.0 + 1, + D3D11_QUERY_PIPELINE_STATISTICS = D3D11_QUERY_TIMESTAMP_DISJOINT.0 + 1, + D3D11_QUERY_OCCLUSION_PREDICATE = D3D11_QUERY_PIPELINE_STATISTICS.0 + 1, + D3D11_QUERY_SO_STATISTICS = D3D11_QUERY_OCCLUSION_PREDICATE.0 + 1, + D3D11_QUERY_SO_OVERFLOW_PREDICATE = D3D11_QUERY_SO_STATISTICS.0 + 1, + D3D11_QUERY_SO_STATISTICS_STREAM0 = D3D11_QUERY_SO_OVERFLOW_PREDICATE.0 + 1, + D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM0 = D3D11_QUERY_SO_STATISTICS_STREAM0.0 + 1, + D3D11_QUERY_SO_STATISTICS_STREAM1 = D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM0.0 + 1, + D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM1 = D3D11_QUERY_SO_STATISTICS_STREAM1.0 + 1, + D3D11_QUERY_SO_STATISTICS_STREAM2 = D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM1.0 + 1, + D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM2 = D3D11_QUERY_SO_STATISTICS_STREAM2.0 + 1, + D3D11_QUERY_SO_STATISTICS_STREAM3 = D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM2.0 + 1, + D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM3 = D3D11_QUERY_SO_STATISTICS_STREAM3.0 + 1, +}} +FLAGS!{enum D3D11_QUERY_MISC_FLAG { + D3D11_QUERY_MISC_PREDICATEHINT = 0x1, +}} +STRUCT!{struct D3D11_QUERY_DESC { + Query: D3D11_QUERY, + MiscFlags: UINT, +}} +RIDL!{interface ID3D11Query(ID3D11QueryVtbl): ID3D11Asynchronous(ID3D11AsynchronousVtbl) { + fn GetDesc(&mut self, pDesc: *mut D3D11_QUERY_DESC) -> () +}} +RIDL!{interface ID3D11Predicate(ID3D11PredicateVtbl): ID3D11Query(ID3D11QueryVtbl) {}} +STRUCT!{struct D3D11_QUERY_DATA_TIMESTAMP_DISJOINT { + Frequency: UINT64, + Disjoint: BOOL, +}} +STRUCT!{struct D3D11_QUERY_DATA_PIPELINE_STATISTICS { + IAVertices: UINT64, + IAPrimitives: UINT64, + VSInvocations: UINT64, + GSInvocations: UINT64, + GSPrimitives: UINT64, + CInvocations: UINT64, + CPrimitives: UINT64, + PSInvocations: UINT64, + HSInvocations: UINT64, + DSInvocations: UINT64, + CSInvocations: UINT64, +}} +STRUCT!{struct D3D11_QUERY_DATA_SO_STATISTICS { + NumPrimitivesWritten: UINT64, + PrimitivesStorageNeeded: UINT64, +}} +FLAGS!{enum D3D11_COUNTER { + D3D11_COUNTER_DEVICE_DEPENDENT_0 = 0x40000000, +}} +ENUM!{enum D3D11_COUNTER_TYPE { + D3D11_COUNTER_TYPE_FLOAT32 = 0, + D3D11_COUNTER_TYPE_UINT16 = D3D11_COUNTER_TYPE_FLOAT32.0 + 1, + D3D11_COUNTER_TYPE_UINT32 = D3D11_COUNTER_TYPE_UINT16.0 + 1, + D3D11_COUNTER_TYPE_UINT64 = D3D11_COUNTER_TYPE_UINT32.0 + 1, +}} +STRUCT!{struct D3D11_COUNTER_DESC { + Counter: D3D11_COUNTER, + MiscFlags: UINT, +}} +STRUCT!{struct D3D11_COUNTER_INFO { + LastDeviceDependentCounter: D3D11_COUNTER, + NumSimultaneousCounters: UINT, + NumDetectableParallelUnits: UINT8, +}} +RIDL!{interface ID3D11Counter(ID3D11CounterVtbl): ID3D11Asynchronous(ID3D11AsynchronousVtbl) { + fn GetDesc(&mut self, pDesc: *mut D3D11_COUNTER_DESC) -> () +}} +ENUM!{enum D3D11_STANDARD_MULTISAMPLE_QUALITY_LEVELS { + D3D11_STANDARD_MULTISAMPLE_PATTERN = 0xffffffff, + D3D11_CENTER_MULTISAMPLE_PATTERN = 0xfffffffe, +}} +ENUM!{enum D3D11_DEVICE_CONTEXT_TYPE { + D3D11_DEVICE_CONTEXT_IMMEDIATE = 0, + D3D11_DEVICE_CONTEXT_DEFERRED = D3D11_DEVICE_CONTEXT_IMMEDIATE.0 + 1, +}} +STRUCT!{struct D3D11_CLASS_INSTANCE_DESC { + InstanceId: UINT, + InstanceIndex: UINT, + TypeId: UINT, + ConstantBuffer: UINT, + BaseConstantBufferOffset: UINT, + BaseTexture: UINT, + BaseSampler: UINT, + Created: BOOL, +}} +RIDL!{interface ID3D11ClassInstance(ID3D11ClassInstanceVtbl): ID3D11DeviceChild(ID3D11DeviceChildVtbl) { + fn GetClassLinkage(&mut self, ppLinkage: *mut *mut ID3D11ClassLinkage) -> (), + fn GetDesc(&mut self, pDesc: *mut D3D11_CLASS_INSTANCE_DESC) -> (), + fn GetInstanceName(&mut self, pInstanceName: LPSTR, pBufferLength: *mut SIZE_T) -> (), + fn GetTypeName(&mut self, pTypeName: LPSTR, pBufferLength: *mut SIZE_T) -> () +}} +RIDL!{interface ID3D11ClassLinkage(ID3D11ClassLinkageVtbl): ID3D11DeviceChild(ID3D11DeviceChildVtbl) { + fn GetClassInstance( + &mut self, GetClassInstance: LPCSTR, InstanceIndex: UINT, + ppInstance: *mut *mut ID3D11ClassInstance + ) -> HRESULT, + fn CreateClassInstance( + &mut self, pClassTypeName: LPCSTR, ConstantBufferOffset: UINT, ConstantVectorOffset: UINT, TextureOffset: UINT, SamplerOffset: UINT, ppInstance: *mut *mut ID3D11ClassInstance + ) -> HRESULT +}} +RIDL!{interface ID3D11CommandList(ID3D11CommandListVtbl): ID3D11DeviceChild(ID3D11DeviceChildVtbl) { + fn GetContextFlags(&mut self) -> UINT +}} +ENUM!{enum D3D11_FEATURE { + D3D11_FEATURE_THREADING = 0, + D3D11_FEATURE_DOUBLES = D3D11_FEATURE_THREADING.0 + 1, + D3D11_FEATURE_FORMAT_SUPPORT = D3D11_FEATURE_DOUBLES.0 + 1, + D3D11_FEATURE_FORMAT_SUPPORT2 = D3D11_FEATURE_FORMAT_SUPPORT.0 + 1, + D3D11_FEATURE_D3D10_X_HARDWARE_OPTIONS = D3D11_FEATURE_FORMAT_SUPPORT2.0 + 1, + D3D11_FEATURE_D3D11_OPTIONS = D3D11_FEATURE_D3D10_X_HARDWARE_OPTIONS.0 + 1, + D3D11_FEATURE_ARCHITECTURE_INFO = D3D11_FEATURE_D3D11_OPTIONS.0 + 1, + D3D11_FEATURE_D3D9_OPTIONS = D3D11_FEATURE_ARCHITECTURE_INFO.0 + 1, + D3D11_FEATURE_SHADER_MIN_PRECISION_SUPPORT = D3D11_FEATURE_D3D9_OPTIONS.0 + 1, + D3D11_FEATURE_D3D9_SHADOW_SUPPORT = D3D11_FEATURE_SHADER_MIN_PRECISION_SUPPORT.0 + 1, + D3D11_FEATURE_D3D11_OPTIONS1 = D3D11_FEATURE_D3D9_SHADOW_SUPPORT.0 + 1, + D3D11_FEATURE_D3D9_SIMPLE_INSTANCING_SUPPORT = D3D11_FEATURE_D3D11_OPTIONS1.0 + 1, + D3D11_FEATURE_MARKER_SUPPORT = D3D11_FEATURE_D3D9_SIMPLE_INSTANCING_SUPPORT.0 + 1, + D3D11_FEATURE_D3D9_OPTIONS1 = D3D11_FEATURE_MARKER_SUPPORT.0 + 1, + D3D11_FEATURE_D3D11_OPTIONS2 = D3D11_FEATURE_D3D9_OPTIONS1.0 + 1, + D3D11_FEATURE_D3D11_OPTIONS3 = D3D11_FEATURE_D3D11_OPTIONS2.0 + 1, + D3D11_FEATURE_GPU_VIRTUAL_ADDRESS_SUPPORT = D3D11_FEATURE_D3D11_OPTIONS3.0 + 1, +}} +STRUCT!{struct D3D11_FEATURE_DATA_THREADING { + DriverConcurrentCreates: BOOL, + DriverCommandLists: BOOL, +}} +STRUCT!{struct D3D11_FEATURE_DATA_DOUBLES { + DoublePrecisionFloatShaderOps: BOOL, +}} +STRUCT!{struct D3D11_FEATURE_DATA_FORMAT_SUPPORT { + InFormat: DXGI_FORMAT, + OutFormatSupport: UINT, +}} +STRUCT!{struct D3D11_FEATURE_DATA_FORMAT_SUPPORT2 { + InFormat: DXGI_FORMAT, + OutFormatSupport2: UINT, +}} +STRUCT!{struct D3D11_FEATURE_DATA_D3D10_X_HARDWARE_OPTIONS { + ComputeShaders_Plus_RawAndStructuredBuffers_Via_Shader_4_x: BOOL, +}} +STRUCT!{struct D3D11_FEATURE_DATA_D3D11_OPTIONS { + OutputMergerLogicOp: BOOL, + UAVOnlyRenderingForcedSampleCount: BOOL, + DiscardAPIsSeenByDriver: BOOL, + FlagsForUpdateAndCopySeenByDriver: BOOL, + ClearView: BOOL, + CopyWithOverlap: BOOL, + ConstantBufferPartialUpdate: BOOL, + ConstantBufferOffsetting: BOOL, + MapNoOverwriteOnDynamicConstantBuffer: BOOL, + MapNoOverwriteOnDynamicBufferSRV: BOOL, + MultisampleRTVWithForcedSampleCountOne: BOOL, + SAD4ShaderInstructions: BOOL, + ExtendedDoublesShaderInstructions: BOOL, + ExtendedResourceSharing: BOOL, +}} +STRUCT!{struct D3D11_FEATURE_DATA_ARCHITECTURE_INFO { + TileBasedDeferredRenderer: BOOL, +}} +STRUCT!{struct D3D11_FEATURE_DATA_D3D9_OPTIONS { + FullNonPow2TextureSupport: BOOL, +}} +STRUCT!{struct D3D11_FEATURE_DATA_D3D9_SHADOW_SUPPORT { + SupportsDepthAsTextureWithLessEqualComparisonFilter: BOOL, +}} +FLAGS!{enum D3D11_SHADER_MIN_PRECISION_SUPPORT { + D3D11_SHADER_MIN_PRECISION_10_BIT = 0x1, + D3D11_SHADER_MIN_PRECISION_16_BIT = 0x2, +}} +STRUCT!{struct D3D11_FEATURE_DATA_SHADER_MIN_PRECISION_SUPPORT { + PixelShaderMinPrecision: UINT, + AllOtherShaderStagesMinPrecision: UINT, +}} +ENUM!{enum D3D11_TILED_RESOURCES_TIER { + D3D11_TILED_RESOURCES_NOT_SUPPORTED = 0, + D3D11_TILED_RESOURCES_TIER_1 = 1, + D3D11_TILED_RESOURCES_TIER_2 = 2, + D3D11_TILED_RESOURCES_TIER_3 = 3, +}} +STRUCT!{struct D3D11_FEATURE_DATA_D3D11_OPTIONS1 { + TiledResourcesTier: D3D11_TILED_RESOURCES_TIER, + MinMaxFiltering: BOOL, + ClearViewAlsoSupportsDepthOnlyFormats: BOOL, + MapOnDefaultBuffers: BOOL, +}} +STRUCT!{struct D3D11_FEATURE_DATA_D3D9_SIMPLE_INSTANCING_SUPPORT { + SimpleInstancingSupported: BOOL, +}} +STRUCT!{struct D3D11_FEATURE_DATA_MARKER_SUPPORT { + Profile: BOOL, +}} +STRUCT!{struct D3D11_FEATURE_DATA_D3D9_OPTIONS1 { + FullNonPow2TextureSupported: BOOL, + DepthAsTextureWithLessEqualComparisonFilterSupported: BOOL, + SimpleInstancingSupported: BOOL, + TextureCubeFaceRenderTargetWithNonCubeDepthStencilSupported: BOOL, +}} +ENUM!{enum D3D11_CONSERVATIVE_RASTERIZATION_TIER { + D3D11_CONSERVATIVE_RASTERIZATION_NOT_SUPPORTED = 0, + D3D11_CONSERVATIVE_RASTERIZATION_TIER_1 = 1, + D3D11_CONSERVATIVE_RASTERIZATION_TIER_2 = 2, + D3D11_CONSERVATIVE_RASTERIZATION_TIER_3 = 3, +}} +STRUCT!{struct D3D11_FEATURE_DATA_D3D11_OPTIONS2 { + PSSpecifiedStencilRefSupported: BOOL, + TypedUAVLoadAdditionalFormats: BOOL, + ROVsSupported: BOOL, + ConservativeRasterizationTier: D3D11_CONSERVATIVE_RASTERIZATION_TIER, + TiledResourcesTier: D3D11_TILED_RESOURCES_TIER, + MapOnDefaultTextures: BOOL, + StandardSwizzle: BOOL, + UnifiedMemoryArchitecture: BOOL, +}} +STRUCT!{struct D3D11_FEATURE_DATA_D3D11_OPTIONS3 { + VPAndRTArrayIndexFromAnyShaderFeedingRasterizer: BOOL, +}} +STRUCT!{struct D3D11_FEATURE_DATA_GPU_VIRTUAL_ADDRESS_SUPPORT { + MaxGPUVirtualAddressBitsPerResource: UINT, + MaxGPUVirtualAddressBitsPerProcess: UINT, +}} +RIDL!{interface ID3D11DeviceContext(ID3D11DeviceContextVtbl): ID3D11DeviceChild(ID3D11DeviceChildVtbl) { + fn VSSetConstantBuffers( + &mut self, StartSlot: UINT, NumBuffers: UINT, ppConstantBuffers: *const *mut ID3D11Buffer + ) -> (), + fn PSSetShaderResources( + &mut self, StartSlot: UINT, NumViews: UINT, + ppShaderResourceViews: *const *mut ID3D11ShaderResourceView + ) -> (), + fn PSSetShader( + &mut self, pPixelShader: *mut ID3D11PixelShader, + ppClassInstances: *const *mut ID3D11ClassInstance, NumClassInstances: UINT + ) -> (), + fn PSSetSamplers( + &mut self, StartSlot: UINT, NumSamplers: UINT, ppSamplers: *const *mut ID3D11SamplerState + ) -> (), + fn VSSetShader( + &mut self, pVertexShader: *mut ID3D11VertexShader, + ppClassInstances: *const *mut ID3D11ClassInstance, NumClassInstances: UINT + ) -> (), + fn DrawIndexed( + &mut self, IndexCount: UINT, StartIndexLocation: UINT, BaseVertexLocation: INT + ) -> (), + fn Draw(&mut self, VertexCount: UINT, StartVertexLocation: UINT) -> (), + fn Map( + &mut self, pResource: *mut ID3D11Resource, Subresource: UINT, MapType: D3D11_MAP, + MapFlags: UINT, pMappedResource: *mut D3D11_MAPPED_SUBRESOURCE + ) -> HRESULT, + fn Unmap(&mut self, pResource: *mut ID3D11Resource, Subresource: UINT) -> (), + fn PSSetConstantBuffers( + &mut self, StartSlot: UINT, NumBuffers: UINT, ppConstantBuffers: *const *mut ID3D11Buffer + ) -> (), + fn IASetInputLayout(&mut self, pInputLayout: *mut ID3D11InputLayout) -> (), + fn IASetVertexBuffers( + &mut self, StartSlot: UINT, NumBuffers: UINT, ppVertexBuffers: *const *mut ID3D11Buffer, + pStrides: *const UINT, pOffsets: *const UINT + ) -> (), + fn IASetIndexBuffer( + &mut self, pIndexBuffer: *mut ID3D11Buffer, Format: DXGI_FORMAT, Offset: UINT + ) -> (), + fn DrawIndexedInstanced( + &mut self, IndexCountPerInstance: UINT, InstanceCount: UINT, StartIndexLocation: UINT, + BaseVertexLocation: INT, StartInstanceLocation: UINT + ) -> (), + fn DrawInstanced( + &mut self, VertexCountPerInstance: UINT, InstanceCount: UINT, StartVertexLocation: UINT, + StartInstanceLocation: UINT + ) -> (), + fn GSSetConstantBuffers( + &mut self, StartSlot: UINT, NumBuffers: UINT, ppConstantBuffers: *const *mut ID3D11Buffer + ) -> (), + fn GSSetShader( + &mut self, pShader: *mut ID3D11GeometryShader, + ppClassInstances: *const *mut ID3D11ClassInstance, NumClassInstances: UINT + ) -> (), + fn IASetPrimitiveTopology(&mut self, Topology: D3D11_PRIMITIVE_TOPOLOGY) -> (), + fn VSSetShaderResources( + &mut self, StartSlot: UINT, NumViews: UINT, + ppShaderResourceViews: *const *mut ID3D11ShaderResourceView + ) -> (), + fn VSSetSamplers( + &mut self, StartSlot: UINT, NumSamplers: UINT, ppSamplers: *const *mut ID3D11SamplerState + ) -> (), + fn Begin(&mut self, pAsync: *mut ID3D11Asynchronous) -> (), + fn End(&mut self, pAsync: *mut ID3D11Asynchronous) -> (), + fn GetData( + &mut self, pAsync: *mut ID3D11Asynchronous, pData: *mut c_void, DataSize: UINT, + GetDataFlags: UINT + ) -> HRESULT, + fn SetPredication( + &mut self, pPredicate: *mut ID3D11Predicate, PredicateValue: BOOL + ) -> (), + fn GSSetShaderResources( + &mut self, StartSlot: UINT, NumViews: UINT, + ppShaderResourceViews: *const *mut ID3D11ShaderResourceView + ) -> (), + fn GSSetSamplers( + &mut self, StartSlot: UINT, NumSamplers: UINT, ppSamplers: *const *mut ID3D11SamplerState + ) -> (), + fn OMSetRenderTargets( + &mut self, NumViews: UINT, ppRenderTargetViews: *const *mut ID3D11RenderTargetView, + pDepthStencilView: *mut ID3D11DepthStencilView + ) -> (), + fn OMSetRenderTargetsAndUnorderedAccessViews( + &mut self, NumRTVs: UINT, ppRenderTargetViews: *const *mut ID3D11RenderTargetView, + pDepthStencilView: *mut ID3D11DepthStencilView, UAVStartSlot: UINT, NumUAVs: UINT, + ppUnorderedAccessViews: *const *mut ID3D11UnorderedAccessView, + pUAVInitialCounts: *const UINT + ) -> (), + fn OMSetBlendState( + &mut self, pBlendState: *mut ID3D11BlendState, BlendFactor: &[FLOAT; 4], SampleMask: UINT + ) -> (), + fn OMSetDepthStencilState( + &mut self, pDepthStencilState: *mut ID3D11DepthStencilState, StencilRef: UINT + ) -> (), + fn SOSetTargets( + &mut self, NumBuffers: UINT, ppSOTargets: *const *mut ID3D11Buffer, pOffsets: *const UINT + ) -> (), + fn DrawAuto(&mut self) -> (), + fn DrawIndexedInstancedIndirect( + &mut self, pBufferForArgs: *mut ID3D11Buffer, AlignedByteOffsetForArgs: UINT + ) -> (), + fn DrawInstancedIndirect( + &mut self, pBufferForArgs: *mut ID3D11Buffer, AlignedByteOffsetForArgs: UINT + ) -> (), + fn Dispatch( + &mut self, ThreadGroupCountX: UINT, ThreadGroupCountY: UINT, ThreadGroupCountZ: UINT + ) -> (), + fn DispatchIndirect( + &mut self, pBufferForArgs: *mut ID3D11Buffer, AlignedByteOffsetForArgs: UINT + ) -> (), + fn RSSetState(&mut self, pRasterizerState: *mut ID3D11RasterizerState) -> (), + fn RSSetViewports(&mut self, NumViewports: UINT, pViewports: *const D3D11_VIEWPORT) -> (), + fn RSSetScissorRects(&mut self, NumRects: UINT, pRects: *const D3D11_RECT) -> (), + fn CopySubresourceRegion( + &mut self, pDstResource: *mut ID3D11Resource, DstSubresource: UINT, DstX: UINT, DstY: UINT, + DstZ: UINT, pSrcResource: *mut ID3D11Resource, SrcSubresource: UINT, + pSrcBox: *const D3D11_BOX + ) -> (), + fn CopyResource( + &mut self, pDstResource: *mut ID3D11Resource, pSrcResource: *mut ID3D11Resource + ) -> (), + fn UpdateSubresource( + &mut self, pDstResource: *mut ID3D11Resource, DstSubresource: UINT, + pDstBox: *const D3D11_BOX, pSrcData: *const c_void, SrcRowPitch: UINT, SrcDepthPitch: UINT + ) -> (), + fn CopyStructureCount( + &mut self, pDstBuffer: *mut ID3D11Buffer, DstAlignedByteOffset: UINT, + pSrcView: *mut ID3D11UnorderedAccessView + ) -> (), + fn ClearRenderTargetView( + &mut self, pRenderTargetView: *mut ID3D11RenderTargetView, ColorRGBA: &[FLOAT; 4] + ) -> (), + fn ClearUnorderedAccessViewUint( + &mut self, pUnorderedAccessView: *mut ID3D11UnorderedAccessView, Values: &[UINT; 4] + ) -> (), + fn ClearUnorderedAccessViewFloat( + &mut self, pUnorderedAccessView: *mut ID3D11UnorderedAccessView, Values: &[FLOAT; 4] + ) -> (), + fn ClearDepthStencilView( + &mut self, pDepthStencilView: *mut ID3D11DepthStencilView, ClearFlags: UINT, Depth: FLOAT, + Stencil: UINT8 + ) -> (), + fn GenerateMips(&mut self, pShaderResourceView: *mut ID3D11ShaderResourceView) -> (), + fn SetResourceMinLOD(&mut self, pResource: *mut ID3D11Resource, MinLOD: FLOAT) -> (), + fn GetResourceMinLOD(&mut self, pResource: *mut ID3D11Resource) -> FLOAT, + fn ResolveSubresource( + &mut self, pDstResource: *mut ID3D11Resource, DstSubresource: UINT, + pSrcResource: *mut ID3D11Resource, SrcSubresource: UINT, Format: DXGI_FORMAT + ) -> (), + fn ExecuteCommandList(&mut self, pCommandList: *mut ID3D11CommandList) -> (), + fn HSSetShaderResources( + &mut self, StartSlot: UINT, NumViews: UINT, + ppShaderResourceViews: *const *mut ID3D11ShaderResourceView + ) -> (), + fn HSSetShader( + &mut self, pHullShader: *mut ID3D11HullShader, + ppClassInstances: *const *mut ID3D11ClassInstance, NumClassInstances: UINT + ) -> (), + fn HSSetSamplers( + &mut self, StartSlot: UINT, NumSamplers: UINT, ppSamplers: *const *mut ID3D11SamplerState + ) -> (), + fn HSSetConstantBuffers( + &mut self, StartSlot: UINT, NumBuffers: UINT, ppConstantBuffers: *const *mut ID3D11Buffer + ) -> (), + fn DSSetShaderResources( + &mut self, StartSlot: UINT, NumViews: UINT, + ppShaderResourceViews: *const *mut ID3D11ShaderResourceView + ) -> (), + fn DSSetShader( + &mut self, pDomainShader: *mut ID3D11DomainShader, + ppClassInstances: *const *mut ID3D11ClassInstance, NumClassInstances: UINT + ) -> (), + fn DSSetSamplers( + &mut self, StartSlot: UINT, NumSamplers: UINT, ppSamplers: *const *mut ID3D11SamplerState + ) -> (), + fn DSSetConstantBuffers( + &mut self, StartSlot: UINT, NumBuffers: UINT, ppConstantBuffers: *const *mut ID3D11Buffer + ) -> (), + fn CSSetShaderResources( + &mut self, StartSlot: UINT, NumViews: UINT, + ppShaderResourceViews: *const *mut ID3D11ShaderResourceView + ) -> (), + fn CSSetUnorderedAccessViews( + &mut self, StartSlot: UINT, NumUAVs: UINT, + ppUnorderedAccessViews: *const *mut ID3D11UnorderedAccessView + ) -> (), + fn CSSetShader( + &mut self, pComputeShader: *mut ID3D11ComputeShader, + ppClassInstances: *const *mut ID3D11ClassInstance, NumClassInstances: UINT + ) -> (), + fn CSSetSamplers( + &mut self, StartSlot: UINT, NumSamplers: UINT, ppSamplers: *const *mut ID3D11SamplerState + ) -> (), + fn CSSetConstantBuffers( + &mut self, StartSlot: UINT, NumBuffers: UINT, ppConstantBuffers: *const *mut ID3D11Buffer + ) -> (), + fn VSGetConstantBuffers( + &mut self, StartSlot: UINT, NumBuffers: UINT, ppConstantBuffers: *mut *mut ID3D11Buffer + ) -> (), + fn PSGetShaderResources( + &mut self, StartSlot: UINT, NumViews: UINT, + ppShaderResourceViews: *mut *mut ID3D11ShaderResourceView + ) -> (), + fn PSGetShader( + &mut self, ppPixelShader: *mut *mut ID3D11PixelShader, + ppClassInstances: *mut *mut ID3D11ClassInstance, pNumClassInstances: *mut UINT + ) -> (), + fn PSGetSamplers( + &mut self, StartSlot: UINT, NumSamplers: UINT, ppSamplers: *mut *mut ID3D11SamplerState + ) -> (), + fn VSGetShader( + &mut self, ppVertexShader: *mut *mut ID3D11VertexShader, + ppClassInstances: *mut *mut ID3D11ClassInstance, pNumClassInstances: *mut UINT + ) -> (), + fn PSGetConstantBuffers( + &mut self, StartSlot: UINT, NumBuffers: UINT, ppConstantBuffers: *mut *mut ID3D11Buffer + ) -> (), + fn IAGetInputLayout(&mut self, ppInputLayout: *mut *mut ID3D11InputLayout) -> (), + fn IAGetVertexBuffers( + &mut self, StartSlot: UINT, NumBuffers: UINT, ppVertexBuffers: *mut *mut ID3D11Buffer, + pStrides: *mut UINT, pOffsets: *mut UINT + ) -> (), + fn IAGetIndexBuffer( + &mut self, pIndexBuffer: *mut *mut ID3D11Buffer, Format: *mut DXGI_FORMAT, + Offset: *mut UINT + ) -> (), + fn GSGetConstantBuffers( + &mut self, StartSlot: UINT, NumBuffers: UINT, ppConstantBuffers: *mut *mut ID3D11Buffer + ) -> (), + fn GSGetShader( + &mut self, ppGeometryShader: *mut *mut ID3D11GeometryShader, + ppClassInstances: *mut *mut ID3D11ClassInstance, pNumClassInstances: *mut UINT + ) -> (), + fn IAGetPrimitiveTopology(&mut self, pTopology: *mut D3D11_PRIMITIVE_TOPOLOGY) -> (), + fn VSGetShaderResources( + &mut self, StartSlot: UINT, NumViews: UINT, + ppShaderResourceViews: *mut *mut ID3D11ShaderResourceView + ) -> (), + fn VSGetSamplers( + &mut self, StartSlot: UINT, NumSamplers: UINT, ppSamplers: *mut *mut ID3D11SamplerState + ) -> (), + fn GetPredication( + &mut self, ppPredicate: *mut *mut ID3D11Predicate, pPredicateValue: *mut BOOL + ) -> (), + fn GSGetShaderResources( + &mut self, StartSlot: UINT, NumViews: UINT, + ppShaderResourceViews: *mut *mut ID3D11ShaderResourceView + ) -> (), + fn GSGetSamplers( + &mut self, StartSlot: UINT, NumSamplers: UINT, ppSamplers: *mut *mut ID3D11SamplerState + ) -> (), + fn OMGetRenderTargets( + &mut self, NumViews: UINT, ppRenderTargetViews: *mut *mut ID3D11RenderTargetView, + ppDepthStencilView: *mut *mut ID3D11DepthStencilView + ) -> (), + fn OMGetRenderTargetsAndUnorderedAccessViews( + &mut self, NumRTVs: UINT, ppRenderTargetViews: *mut *mut ID3D11RenderTargetView, + ppDepthStencilView: *mut *mut ID3D11DepthStencilView, UAVStartSlot: UINT, + ppUnorderedAccessViews: *mut *mut ID3D11UnorderedAccessView + ) -> (), + fn OMGetBlendState( + &mut self, ppBlendState: *mut *mut ID3D11BlendState, BlendFactor: &mut [FLOAT; 4], + pSampleMask: *mut UINT + ) -> (), + fn OMGetDepthStencilState( + &mut self, ppDepthStencilState: *mut *mut ID3D11DepthStencilState, pStencilRef: *mut UINT + ) -> (), + fn SOGetTargets(&mut self, NumBuffers: UINT, ppSOTargets: *mut *mut ID3D11Buffer) -> (), + fn RSGetState(&mut self, ppRasterizerState: *mut *mut ID3D11RasterizerState) -> (), + fn RSGetViewports(&mut self, pNumViewports: *mut UINT, pViewports: *mut D3D11_VIEWPORT) -> (), + fn RSGetScissorRects(&mut self, pNumRects: *mut UINT, pRects: *mut D3D11_RECT) -> (), + fn HSGetShaderResources( + &mut self, StartSlot: UINT, NumViews: UINT, + ppShaderResourceViews: *mut *mut ID3D11ShaderResourceView + ) -> (), + fn HSGetShader( + &mut self, ppHullShader: *mut *mut ID3D11HullShader, + ppClassInstances: *mut *mut ID3D11ClassInstance, pNumClassInstances: *mut UINT + ) -> (), + fn HSGetSamplers( + &mut self, StartSlot: UINT, NumSamplers: UINT, ppSamplers: *mut *mut ID3D11SamplerState + ) -> (), + fn HSGetConstantBuffers( + &mut self, StartSlot: UINT, NumBuffers: UINT, ppConstantBuffers: *mut *mut ID3D11Buffer + ) -> (), + fn DSGetShaderResources( + &mut self, StartSlot: UINT, NumViews: UINT, + ppShaderResourceViews: *mut *mut ID3D11ShaderResourceView + ) -> (), + fn DSGetShader( + &mut self, ppDomainShader: *mut *mut ID3D11DomainShader, + ppClassInstances: *mut *mut ID3D11ClassInstance, pNumClassInstances: *mut UINT + ) -> (), + fn DSGetSamplers( + &mut self, StartSlot: UINT, NumSamplers: UINT, ppSamplers: *mut *mut ID3D11SamplerState + ) -> (), + fn DSGetConstantBuffers( + &mut self, StartSlot: UINT, NumBuffers: UINT, ppConstantBuffers: *mut *mut ID3D11Buffer + ) -> (), + fn CSGetShaderResources( + &mut self, StartSlot: UINT, NumViews: UINT, + ppShaderResourceViews: *mut *mut ID3D11ShaderResourceView + ) -> (), + fn CSGetUnorderedAccessViews( + &mut self, StartSlot: UINT, NumUAVs: UINT, + ppUnorderedAccessViews: *mut *mut ID3D11UnorderedAccessView + ) -> (), + fn CSGetShader( + &mut self, ppComputeShader: *mut *mut ID3D11ComputeShader, + ppClassInstances: *mut *mut ID3D11ClassInstance, pNumClassInstances: *mut UINT + ) -> (), + fn CSGetSamplers( + &mut self, StartSlot: UINT, NumSamplers: UINT, ppSamplers: *mut *mut ID3D11SamplerState + ) -> (), + fn CSGetConstantBuffers( + &mut self, StartSlot: UINT, NumBuffers: UINT, ppConstantBuffers: *mut *mut ID3D11Buffer + ) -> (), + fn ClearState(&mut self) -> (), + fn Flush(&mut self) -> (), + fn GetType(&mut self) -> D3D11_DEVICE_CONTEXT_TYPE, + fn GetContextFlags(&mut self) -> UINT, + fn FinishCommandList( + &mut self, RestoreDeferredContextState: BOOL, ppCommandList: *mut *mut ID3D11CommandList + ) -> HRESULT +}} +STRUCT!{struct D3D11_VIDEO_DECODER_DESC { + Guid: GUID, + SampleWidth: UINT, + SampleHeight: UINT, + OutputFormat: DXGI_FORMAT, +}} +STRUCT!{struct D3D11_VIDEO_DECODER_CONFIG { + guidConfigBitstreamEncryption: GUID, + guidConfigMBcontrolEncryption: GUID, + guidConfigResidDiffEncryption: GUID, + ConfigBitstreamRaw: UINT, + ConfigMBcontrolRasterOrder: UINT, + ConfigResidDiffHost: UINT, + ConfigSpatialResid8: UINT, + ConfigResid8Subtraction: UINT, + ConfigSpatialHost8or9Clipping: UINT, + ConfigSpatialResidInterleaved: UINT, + ConfigIntraResidUnsigned: UINT, + ConfigResidDiffAccelerator: UINT, + ConfigHostInverseScan: UINT, + ConfigSpecificIDCT: UINT, + Config4GroupedCoefs: UINT, + ConfigMinRenderTargetBuffCount: USHORT, + ConfigDecoderSpecific: USHORT, +}} +ENUM!{enum D3D11_VIDEO_DECODER_BUFFER_TYPE { + D3D11_VIDEO_DECODER_BUFFER_PICTURE_PARAMETERS = 0, + D3D11_VIDEO_DECODER_BUFFER_MACROBLOCK_CONTROL = 1, + D3D11_VIDEO_DECODER_BUFFER_RESIDUAL_DIFFERENCE = 2, + D3D11_VIDEO_DECODER_BUFFER_DEBLOCKING_CONTROL = 3, + D3D11_VIDEO_DECODER_BUFFER_INVERSE_QUANTIZATION_MATRIX = 4, + D3D11_VIDEO_DECODER_BUFFER_SLICE_CONTROL = 5, + D3D11_VIDEO_DECODER_BUFFER_BITSTREAM = 6, + D3D11_VIDEO_DECODER_BUFFER_MOTION_VECTOR = 7, + D3D11_VIDEO_DECODER_BUFFER_FILM_GRAIN = 8, +}} +STRUCT!{struct D3D11_AES_CTR_IV { + IV: UINT64, + Count: UINT64, +}} +STRUCT!{struct D3D11_ENCRYPTED_BLOCK_INFO { + NumEncryptedBytesAtBeginning: UINT, + NumBytesInSkipPattern: UINT, + NumBytesInEncryptPattern: UINT, +}} +STRUCT!{struct D3D11_VIDEO_DECODER_BUFFER_DESC { + BufferType: D3D11_VIDEO_DECODER_BUFFER_TYPE, + BufferIndex: UINT, + DataOffset: UINT, + DataSize: UINT, + FirstMBaddress: UINT, + NumMBsInBuffer: UINT, + Width: UINT, + Height: UINT, + Stride: UINT, + ReservedBits: UINT, + pIV: *mut c_void, + IVSize: UINT, + PartialEncryption: BOOL, + EncryptedBlockInfo: D3D11_ENCRYPTED_BLOCK_INFO, +}} +STRUCT!{struct D3D11_VIDEO_DECODER_EXTENSION { + Function: UINT, + pPrivateInputData: *mut c_void, + PrivateInputDataSize: UINT, + pPrivateOutputData: *mut c_void, + PrivateOutputDataSize: UINT, + ResourceCount: UINT, + ppResourceList: *mut *mut ID3D11Resource, +}} +RIDL!{interface ID3D11VideoDecoder(ID3D11VideoDecoderVtbl): ID3D11DeviceChild(ID3D11DeviceChildVtbl) { + fn GetCreationParameters( + &mut self, pVideoDesc: *mut D3D11_VIDEO_DECODER_DESC, + pConfig: *mut D3D11_VIDEO_DECODER_CONFIG + ) -> HRESULT, + fn GetDriverHandle(&mut self, pDriverHandle: *mut HANDLE) -> HRESULT +}} +FLAGS!{enum D3D11_VIDEO_PROCESSOR_FORMAT_SUPPORT { + D3D11_VIDEO_PROCESSOR_FORMAT_SUPPORT_INPUT = 0x1, + D3D11_VIDEO_PROCESSOR_FORMAT_SUPPORT_OUTPUT = 0x2, +}} +FLAGS!{enum D3D11_VIDEO_PROCESSOR_DEVICE_CAPS { + D3D11_VIDEO_PROCESSOR_DEVICE_CAPS_LINEAR_SPACE = 0x1, + D3D11_VIDEO_PROCESSOR_DEVICE_CAPS_xvYCC = 0x2, + D3D11_VIDEO_PROCESSOR_DEVICE_CAPS_RGB_RANGE_CONVERSION = 0x4, + D3D11_VIDEO_PROCESSOR_DEVICE_CAPS_YCbCr_MATRIX_CONVERSION = 0x8, + D3D11_VIDEO_PROCESSOR_DEVICE_CAPS_NOMINAL_RANGE = 0x10, +}} +FLAGS!{enum D3D11_VIDEO_PROCESSOR_FEATURE_CAPS { + D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_ALPHA_FILL = 0x1, + D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_CONSTRICTION = 0x2, + D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_LUMA_KEY = 0x4, + D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_ALPHA_PALETTE = 0x8, + D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_LEGACY = 0x10, + D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_STEREO = 0x20, + D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_ROTATION = 0x40, + D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_ALPHA_STREAM = 0x80, + D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_PIXEL_ASPECT_RATIO = 0x100, + D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_MIRROR = 0x200, + D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_SHADER_USAGE = 0x400, +}} +FLAGS!{enum D3D11_VIDEO_PROCESSOR_FILTER_CAPS { + D3D11_VIDEO_PROCESSOR_FILTER_CAPS_BRIGHTNESS = 0x1, + D3D11_VIDEO_PROCESSOR_FILTER_CAPS_CONTRAST = 0x2, + D3D11_VIDEO_PROCESSOR_FILTER_CAPS_HUE = 0x4, + D3D11_VIDEO_PROCESSOR_FILTER_CAPS_SATURATION = 0x8, + D3D11_VIDEO_PROCESSOR_FILTER_CAPS_NOISE_REDUCTION = 0x10, + D3D11_VIDEO_PROCESSOR_FILTER_CAPS_EDGE_ENHANCEMENT = 0x20, + D3D11_VIDEO_PROCESSOR_FILTER_CAPS_ANAMORPHIC_SCALING = 0x40, + D3D11_VIDEO_PROCESSOR_FILTER_CAPS_STEREO_ADJUSTMENT = 0x80, +}} +FLAGS!{enum D3D11_VIDEO_PROCESSOR_FORMAT_CAPS { + D3D11_VIDEO_PROCESSOR_FORMAT_CAPS_RGB_INTERLACED = 0x1, + D3D11_VIDEO_PROCESSOR_FORMAT_CAPS_RGB_PROCAMP = 0x2, + D3D11_VIDEO_PROCESSOR_FORMAT_CAPS_RGB_LUMA_KEY = 0x4, + D3D11_VIDEO_PROCESSOR_FORMAT_CAPS_PALETTE_INTERLACED = 0x8, +}} +FLAGS!{enum D3D11_VIDEO_PROCESSOR_AUTO_STREAM_CAPS { + D3D11_VIDEO_PROCESSOR_AUTO_STREAM_CAPS_DENOISE = 0x1, + D3D11_VIDEO_PROCESSOR_AUTO_STREAM_CAPS_DERINGING = 0x2, + D3D11_VIDEO_PROCESSOR_AUTO_STREAM_CAPS_EDGE_ENHANCEMENT = 0x4, + D3D11_VIDEO_PROCESSOR_AUTO_STREAM_CAPS_COLOR_CORRECTION = 0x8, + D3D11_VIDEO_PROCESSOR_AUTO_STREAM_CAPS_FLESH_TONE_MAPPING = 0x10, + D3D11_VIDEO_PROCESSOR_AUTO_STREAM_CAPS_IMAGE_STABILIZATION = 0x20, + D3D11_VIDEO_PROCESSOR_AUTO_STREAM_CAPS_SUPER_RESOLUTION = 0x40, + D3D11_VIDEO_PROCESSOR_AUTO_STREAM_CAPS_ANAMORPHIC_SCALING = 0x80, +}} +FLAGS!{enum D3D11_VIDEO_PROCESSOR_STEREO_CAPS { + D3D11_VIDEO_PROCESSOR_STEREO_CAPS_MONO_OFFSET = 0x1, + D3D11_VIDEO_PROCESSOR_STEREO_CAPS_ROW_INTERLEAVED = 0x2, + D3D11_VIDEO_PROCESSOR_STEREO_CAPS_COLUMN_INTERLEAVED = 0x4, + D3D11_VIDEO_PROCESSOR_STEREO_CAPS_CHECKERBOARD = 0x8, + D3D11_VIDEO_PROCESSOR_STEREO_CAPS_FLIP_MODE = 0x10, +}} +STRUCT!{struct D3D11_VIDEO_PROCESSOR_CAPS { + DeviceCaps: UINT, + FeatureCaps: UINT, + FilterCaps: UINT, + InputFormatCaps: UINT, + AutoStreamCaps: UINT, + StereoCaps: UINT, + RateConversionCapsCount: UINT, + MaxInputStreams: UINT, + MaxStreamStates: UINT, +}} +FLAGS!{enum D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS { + D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS_DEINTERLACE_BLEND = 0x1, + D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS_DEINTERLACE_BOB = 0x2, + D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS_DEINTERLACE_ADAPTIVE = 0x4, + D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS_DEINTERLACE_MOTION_COMPENSATION = 0x8, + D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS_INVERSE_TELECINE = 0x10, + D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS_FRAME_RATE_CONVERSION = 0x20, +}} +FLAGS!{enum D3D11_VIDEO_PROCESSOR_ITELECINE_CAPS { + D3D11_VIDEO_PROCESSOR_ITELECINE_CAPS_32 = 0x1, + D3D11_VIDEO_PROCESSOR_ITELECINE_CAPS_22 = 0x2, + D3D11_VIDEO_PROCESSOR_ITELECINE_CAPS_2224 = 0x4, + D3D11_VIDEO_PROCESSOR_ITELECINE_CAPS_2332 = 0x8, + D3D11_VIDEO_PROCESSOR_ITELECINE_CAPS_32322 = 0x10, + D3D11_VIDEO_PROCESSOR_ITELECINE_CAPS_55 = 0x20, + D3D11_VIDEO_PROCESSOR_ITELECINE_CAPS_64 = 0x40, + D3D11_VIDEO_PROCESSOR_ITELECINE_CAPS_87 = 0x80, + D3D11_VIDEO_PROCESSOR_ITELECINE_CAPS_222222222223 = 0x100, + D3D11_VIDEO_PROCESSOR_ITELECINE_CAPS_OTHER = 0x80000000, +}} +STRUCT!{struct D3D11_VIDEO_PROCESSOR_RATE_CONVERSION_CAPS { + PastFrames: UINT, + FutureFrames: UINT, + ProcessorCaps: UINT, + ITelecineCaps: UINT, + CustomRateCount: UINT, +}} +FLAGS!{enum D3D11_CONTENT_PROTECTION_CAPS { + D3D11_CONTENT_PROTECTION_CAPS_SOFTWARE = 0x1, + D3D11_CONTENT_PROTECTION_CAPS_HARDWARE = 0x2, + D3D11_CONTENT_PROTECTION_CAPS_PROTECTION_ALWAYS_ON = 0x4, + D3D11_CONTENT_PROTECTION_CAPS_PARTIAL_DECRYPTION = 0x8, + D3D11_CONTENT_PROTECTION_CAPS_CONTENT_KEY = 0x10, + D3D11_CONTENT_PROTECTION_CAPS_FRESHEN_SESSION_KEY = 0x20, + D3D11_CONTENT_PROTECTION_CAPS_ENCRYPTED_READ_BACK = 0x40, + D3D11_CONTENT_PROTECTION_CAPS_ENCRYPTED_READ_BACK_KEY = 0x80, + D3D11_CONTENT_PROTECTION_CAPS_SEQUENTIAL_CTR_IV = 0x100, + D3D11_CONTENT_PROTECTION_CAPS_ENCRYPT_SLICEDATA_ONLY = 0x200, + D3D11_CONTENT_PROTECTION_CAPS_DECRYPTION_BLT = 0x400, + D3D11_CONTENT_PROTECTION_CAPS_HARDWARE_PROTECT_UNCOMPRESSED = 0x800, + D3D11_CONTENT_PROTECTION_CAPS_HARDWARE_PROTECTED_MEMORY_PAGEABLE = 0x1000, + D3D11_CONTENT_PROTECTION_CAPS_HARDWARE_TEARDOWN = 0x2000, + D3D11_CONTENT_PROTECTION_CAPS_HARDWARE_DRM_COMMUNICATION = 0x4000, +}} +STRUCT!{struct D3D11_VIDEO_CONTENT_PROTECTION_CAPS { + Caps: UINT, + KeyExchangeTypeCount: UINT, + BlockAlignmentSize: UINT, + ProtectedMemorySize: ULONGLONG, +}} +STRUCT!{struct D3D11_VIDEO_PROCESSOR_CUSTOM_RATE { + CustomRate: DXGI_RATIONAL, + OutputFrames: UINT, + InputInterlaced: BOOL, + InputFramesOrFields: UINT, +}} +ENUM!{enum D3D11_VIDEO_PROCESSOR_FILTER { + D3D11_VIDEO_PROCESSOR_FILTER_BRIGHTNESS = 0, + D3D11_VIDEO_PROCESSOR_FILTER_CONTRAST = 1, + D3D11_VIDEO_PROCESSOR_FILTER_HUE = 2, + D3D11_VIDEO_PROCESSOR_FILTER_SATURATION = 3, + D3D11_VIDEO_PROCESSOR_FILTER_NOISE_REDUCTION = 4, + D3D11_VIDEO_PROCESSOR_FILTER_EDGE_ENHANCEMENT = 5, + D3D11_VIDEO_PROCESSOR_FILTER_ANAMORPHIC_SCALING = 6, + D3D11_VIDEO_PROCESSOR_FILTER_STEREO_ADJUSTMENT = 7, +}} +STRUCT!{struct D3D11_VIDEO_PROCESSOR_FILTER_RANGE { + Minimum: c_int, + Maximum: c_int, + Default: c_int, + Multiplier: c_float, +}} +ENUM!{enum D3D11_VIDEO_FRAME_FORMAT { + D3D11_VIDEO_FRAME_FORMAT_PROGRESSIVE = 0, + D3D11_VIDEO_FRAME_FORMAT_INTERLACED_TOP_FIELD_FIRST = 1, + D3D11_VIDEO_FRAME_FORMAT_INTERLACED_BOTTOM_FIELD_FIRST = 2, +}} +ENUM!{enum D3D11_VIDEO_USAGE { + D3D11_VIDEO_USAGE_PLAYBACK_NORMAL = 0, + D3D11_VIDEO_USAGE_OPTIMAL_SPEED = 1, + D3D11_VIDEO_USAGE_OPTIMAL_QUALITY = 2, +}} +STRUCT!{struct D3D11_VIDEO_PROCESSOR_CONTENT_DESC { + InputFrameFormat: D3D11_VIDEO_FRAME_FORMAT, + InputFrameRate: DXGI_RATIONAL, + InputWidth: UINT, + InputHeight: UINT, + OutputFrameRate: DXGI_RATIONAL, + OutputWidth: UINT, + OutputHeight: UINT, + Usage: D3D11_VIDEO_USAGE, +}} +RIDL!{interface ID3D11VideoProcessorEnumerator(ID3D11VideoProcessorEnumeratorVtbl) + : ID3D11DeviceChild(ID3D11DeviceChildVtbl) { + fn GetVideoProcessorContentDesc( + &mut self, pContentDesc: *mut D3D11_VIDEO_PROCESSOR_CONTENT_DESC + ) -> HRESULT, + fn CheckVideoProcessorFormat(&mut self, Format: DXGI_FORMAT, pFlags: *mut UINT) -> HRESULT, + fn GetVideoProcessorCaps(&mut self, pCaps: *mut D3D11_VIDEO_PROCESSOR_CAPS) -> HRESULT, + fn GetVideoProcessorRateConversionCaps( + &mut self, TypeIndex: UINT, pCaps: *mut D3D11_VIDEO_PROCESSOR_RATE_CONVERSION_CAPS + ) -> HRESULT, + fn GetVideoProcessorCustomRate( + &mut self, TypeIndex: UINT, CustomRateIndex: UINT, + pRate: *mut D3D11_VIDEO_PROCESSOR_CUSTOM_RATE + ) -> HRESULT, + fn GetVideoProcessorFilterRange( + &mut self, Filter: D3D11_VIDEO_PROCESSOR_FILTER, + Range: *mut D3D11_VIDEO_PROCESSOR_FILTER_RANGE + ) -> HRESULT +}} +STRUCT!{struct D3D11_VIDEO_COLOR_RGBA { + R: c_float, + G: c_float, + B: c_float, + A: c_float, +}} +STRUCT!{struct D3D11_VIDEO_COLOR_YCbCrA { + Y: c_float, + Cb: c_float, + Cr: c_float, + A: c_float, +}} +STRUCT!{struct D3D11_VIDEO_COLOR { + u: [c_float; 4], +}} +UNION!{D3D11_VIDEO_COLOR, u, YCbCr, YCbCr_mut, D3D11_VIDEO_COLOR_YCbCrA} +UNION!{D3D11_VIDEO_COLOR, u, RGBA, RGBA_mut, D3D11_VIDEO_COLOR_RGBA} +ENUM!{enum D3D11_VIDEO_PROCESSOR_NOMINAL_RANGE { + D3D11_VIDEO_PROCESSOR_NOMINAL_RANGE_UNDEFINED = 0, + D3D11_VIDEO_PROCESSOR_NOMINAL_RANGE_16_235 = 1, + D3D11_VIDEO_PROCESSOR_NOMINAL_RANGE_0_255 = 2, +}} +STRUCT!{struct D3D11_VIDEO_PROCESSOR_COLOR_SPACE { + bitfield: UINT, +}} +BITFIELD!{D3D11_VIDEO_PROCESSOR_COLOR_SPACE bitfield: UINT [ + Usage set_Usage[0..1], + RGB_Range set_RGB_Range[1..2], + YCbCr_Matrix set_YCbCr_Matrix[2..3], + YCbCr_xvYCC set_YCbCr_xvYCC[3..4], + Nominal_Range set_Nominal_Range[4..6], +]} +ENUM!{enum D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE { + D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE_OPAQUE = 0, + D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE_BACKGROUND = 1, + D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE_DESTINATION = 2, + D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE_SOURCE_STREAM = 3, +}} +ENUM!{enum D3D11_VIDEO_PROCESSOR_OUTPUT_RATE { + D3D11_VIDEO_PROCESSOR_OUTPUT_RATE_NORMAL = 0, + D3D11_VIDEO_PROCESSOR_OUTPUT_RATE_HALF = 1, + D3D11_VIDEO_PROCESSOR_OUTPUT_RATE_CUSTOM = 2, +}} +ENUM!{enum D3D11_VIDEO_PROCESSOR_STEREO_FORMAT { + D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_MONO = 0, + D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_HORIZONTAL = 1, + D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_VERTICAL = 2, + D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_SEPARATE = 3, + D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_MONO_OFFSET = 4, + D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_ROW_INTERLEAVED = 5, + D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_COLUMN_INTERLEAVED = 6, + D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_CHECKERBOARD = 7, +}} +ENUM!{enum D3D11_VIDEO_PROCESSOR_STEREO_FLIP_MODE { + D3D11_VIDEO_PROCESSOR_STEREO_FLIP_NONE = 0, + D3D11_VIDEO_PROCESSOR_STEREO_FLIP_FRAME0 = 1, + D3D11_VIDEO_PROCESSOR_STEREO_FLIP_FRAME1 = 2, +}} +ENUM!{enum D3D11_VIDEO_PROCESSOR_ROTATION { + D3D11_VIDEO_PROCESSOR_ROTATION_IDENTITY = 0, + D3D11_VIDEO_PROCESSOR_ROTATION_90 = 1, + D3D11_VIDEO_PROCESSOR_ROTATION_180 = 2, + D3D11_VIDEO_PROCESSOR_ROTATION_270 = 3, +}} +STRUCT!{struct D3D11_VIDEO_PROCESSOR_STREAM { + Enable: BOOL, + OutputIndex: UINT, + InputFrameOrField: UINT, + PastFrames: UINT, + FutureFrames: UINT, + ppPastSurfaces: *mut *mut ID3D11VideoProcessorInputView, + pInputSurface: *mut ID3D11VideoProcessorInputView, + ppFutureSurfaces: *mut *mut ID3D11VideoProcessorInputView, + ppPastSurfacesRight: *mut *mut ID3D11VideoProcessorInputView, + pInputSurfaceRight: *mut ID3D11VideoProcessorInputView, + ppFutureSurfacesRight: *mut *mut ID3D11VideoProcessorInputView, +}} +RIDL!{interface ID3D11VideoProcessor(ID3D11VideoProcessorVtbl) + : ID3D11DeviceChild(ID3D11DeviceChildVtbl) { + fn GetContentDesc(&mut self, pDesc: *mut D3D11_VIDEO_PROCESSOR_CONTENT_DESC) -> (), + fn GetRateConversionCaps( + &mut self, pCaps: *mut D3D11_VIDEO_PROCESSOR_RATE_CONVERSION_CAPS + ) -> () +}} +STRUCT!{struct D3D11_OMAC { + Omac: [BYTE; 16], +}} +ENUM!{enum D3D11_AUTHENTICATED_CHANNEL_TYPE { + D3D11_AUTHENTICATED_CHANNEL_D3D11 = 1, + D3D11_AUTHENTICATED_CHANNEL_DRIVER_SOFTWARE = 2, + D3D11_AUTHENTICATED_CHANNEL_DRIVER_HARDWARE = 3, +}} +RIDL!{interface ID3D11AuthenticatedChannel(ID3D11AuthenticatedChannelVtbl) + : ID3D11DeviceChild(ID3D11DeviceChildVtbl) { + fn GetCertificateSize(&mut self, pCertificateSize: *mut UINT) -> HRESULT, + fn GetCertificate(&mut self, CertificateSize: UINT, pCertificate: *mut BYTE) -> HRESULT, + fn GetChannelHandle(&mut self, pChannelHandle: *mut HANDLE) -> () +}} +STRUCT!{struct D3D11_AUTHENTICATED_QUERY_INPUT { + QueryType: GUID, + hChannel: HANDLE, + SequenceNumber: UINT, +}} +STRUCT!{struct D3D11_AUTHENTICATED_QUERY_OUTPUT { + omac: D3D11_OMAC, + QueryType: GUID, + hChannel: HANDLE, + SequenceNumber: UINT, + ReturnCode: HRESULT, +}} +//FIXME bitfield +STRUCT!{struct D3D11_AUTHENTICATED_PROTECTION_FLAGS { + u: UINT, +}} +STRUCT!{struct D3D11_AUTHENTICATED_QUERY_PROTECTION_OUTPUT { + Output: D3D11_AUTHENTICATED_QUERY_OUTPUT, + ProtectionFlags: D3D11_AUTHENTICATED_PROTECTION_FLAGS, +}} +STRUCT!{struct D3D11_AUTHENTICATED_QUERY_CHANNEL_TYPE_OUTPUT { + Output: D3D11_AUTHENTICATED_QUERY_OUTPUT, + ChannelType: D3D11_AUTHENTICATED_CHANNEL_TYPE, +}} +STRUCT!{struct D3D11_AUTHENTICATED_QUERY_DEVICE_HANDLE_OUTPUT { + Output: D3D11_AUTHENTICATED_QUERY_OUTPUT, + DeviceHandle: HANDLE, +}} +STRUCT!{struct D3D11_AUTHENTICATED_QUERY_CRYPTO_SESSION_INPUT { + Input: D3D11_AUTHENTICATED_QUERY_INPUT, + DecoderHandle: HANDLE, +}} +STRUCT!{struct D3D11_AUTHENTICATED_QUERY_CRYPTO_SESSION_OUTPUT { + Output: D3D11_AUTHENTICATED_QUERY_OUTPUT, + DecoderHandle: HANDLE, + CryptoSessionHandle: HANDLE, + DeviceHandle: HANDLE, +}} +STRUCT!{struct D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_COUNT_OUTPUT { + Output: D3D11_AUTHENTICATED_QUERY_OUTPUT, + RestrictedSharedResourceProcessCount: UINT, +}} +STRUCT!{struct D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_INPUT { + Input: D3D11_AUTHENTICATED_QUERY_INPUT, + ProcessIndex: UINT, +}} +ENUM!{enum D3D11_AUTHENTICATED_PROCESS_IDENTIFIER_TYPE { + DD3D11_PROCESSIDTYPE_UNKNOWN = 0, + DD3D11_PROCESSIDTYPE_DWM = 1, + DD3D11_PROCESSIDTYPE_HANDLE = 2, +}} +STRUCT!{struct D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_OUTPUT { + Output: D3D11_AUTHENTICATED_QUERY_OUTPUT, + ProcessIndex: UINT, + ProcessIdentifier: D3D11_AUTHENTICATED_PROCESS_IDENTIFIER_TYPE, + ProcessHandle: HANDLE, +}} +STRUCT!{struct D3D11_AUTHENTICATED_QUERY_UNRESTRICTED_PROTECTED_SHARED_RESOURCE_COUNT_OUTPUT { + Output: D3D11_AUTHENTICATED_QUERY_OUTPUT, + UnrestrictedProtectedSharedResourceCount: UINT, +}} +STRUCT!{struct D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_COUNT_INPUT { + Input: D3D11_AUTHENTICATED_QUERY_INPUT, + DeviceHandle: HANDLE, + CryptoSessionHandle: HANDLE, +}} +STRUCT!{struct D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_COUNT_OUTPUT { + Output: D3D11_AUTHENTICATED_QUERY_OUTPUT, + DeviceHandle: HANDLE, + CryptoSessionHandle: HANDLE, + OutputIDCount: UINT, +}} +STRUCT!{struct D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_INPUT { + Input: D3D11_AUTHENTICATED_QUERY_INPUT, + DeviceHandle: HANDLE, + CryptoSessionHandle: HANDLE, + OutputIDIndex: UINT, +}} +STRUCT!{struct D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_OUTPUT { + Output: D3D11_AUTHENTICATED_QUERY_OUTPUT, + DeviceHandle: HANDLE, + CryptoSessionHandle: HANDLE, + OutputIDIndex: UINT, + OutputID: UINT64, +}} +ENUM!{enum D3D11_BUS_TYPE { + D3D11_BUS_TYPE_OTHER = 0, + D3D11_BUS_TYPE_PCI = 0x1, + D3D11_BUS_TYPE_PCIX = 0x2, + D3D11_BUS_TYPE_PCIEXPRESS = 0x3, + D3D11_BUS_TYPE_AGP = 0x4, + D3D11_BUS_IMPL_MODIFIER_INSIDE_OF_CHIPSET = 0x10000, + D3D11_BUS_IMPL_MODIFIER_TRACKS_ON_MOTHER_BOARD_TO_CHIP = 0x20000, + D3D11_BUS_IMPL_MODIFIER_TRACKS_ON_MOTHER_BOARD_TO_SOCKET = 0x30000, + D3D11_BUS_IMPL_MODIFIER_DAUGHTER_BOARD_CONNECTOR = 0x40000, + D3D11_BUS_IMPL_MODIFIER_DAUGHTER_BOARD_CONNECTOR_INSIDE_OF_NUAE = 0x50000, + D3D11_BUS_IMPL_MODIFIER_NON_STANDARD = 0x80000000, +}} +STRUCT!{struct D3D11_AUTHENTICATED_QUERY_ACESSIBILITY_OUTPUT { + Output: D3D11_AUTHENTICATED_QUERY_OUTPUT, + BusType: D3D11_BUS_TYPE, + AccessibleInContiguousBlocks: BOOL, + AccessibleInNonContiguousBlocks: BOOL, +}} +STRUCT!{struct D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ENCRYPTION_GUID_COUNT_OUTPUT { + Output: D3D11_AUTHENTICATED_QUERY_OUTPUT, + EncryptionGuidCount: UINT, +}} +STRUCT!{struct D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ENCRYPTION_GUID_INPUT { + Input: D3D11_AUTHENTICATED_QUERY_INPUT, + EncryptionGuidIndex: UINT, +}} +STRUCT!{struct D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ENCRYPTION_GUID_OUTPUT { + Output: D3D11_AUTHENTICATED_QUERY_OUTPUT, + EncryptionGuidIndex: UINT, + EncryptionGuid: GUID, +}} +STRUCT!{struct D3D11_AUTHENTICATED_QUERY_CURRENT_ACCESSIBILITY_ENCRYPTION_OUTPUT { + Output: D3D11_AUTHENTICATED_QUERY_OUTPUT, + EncryptionGuid: GUID, +}} +STRUCT!{struct D3D11_AUTHENTICATED_CONFIGURE_INPUT { + omac: D3D11_OMAC, + ConfigureType: GUID, + hChannel: HANDLE, + SequenceNumber: UINT, +}} +STRUCT!{struct D3D11_AUTHENTICATED_CONFIGURE_OUTPUT { + omac: D3D11_OMAC, + ConfigureType: GUID, + hChannel: HANDLE, + SequenceNumber: UINT, + ReturnCode: HRESULT, +}} +STRUCT!{struct D3D11_AUTHENTICATED_CONFIGURE_INITIALIZE_INPUT { + Parameters: D3D11_AUTHENTICATED_CONFIGURE_INPUT, + StartSequenceQuery: UINT, + StartSequenceConfigure: UINT, +}} +STRUCT!{struct D3D11_AUTHENTICATED_CONFIGURE_PROTECTION_INPUT { + Parameters: D3D11_AUTHENTICATED_CONFIGURE_INPUT, + Protections: D3D11_AUTHENTICATED_PROTECTION_FLAGS, +}} +STRUCT!{struct D3D11_AUTHENTICATED_CONFIGURE_CRYPTO_SESSION_INPUT { + Parameters: D3D11_AUTHENTICATED_CONFIGURE_INPUT, + DecoderHandle: HANDLE, + CryptoSessionHandle: HANDLE, + DeviceHandle: HANDLE, +}} +STRUCT!{struct D3D11_AUTHENTICATED_CONFIGURE_SHARED_RESOURCE_INPUT { + Parameters: D3D11_AUTHENTICATED_CONFIGURE_INPUT, + ProcessType: D3D11_AUTHENTICATED_PROCESS_IDENTIFIER_TYPE, + ProcessHandle: HANDLE, + AllowAccess: BOOL, +}} +STRUCT!{struct D3D11_AUTHENTICATED_CONFIGURE_ACCESSIBLE_ENCRYPTION_INPUT { + Parameters: D3D11_AUTHENTICATED_CONFIGURE_INPUT, + EncryptionGuid: GUID, +}} +RIDL!{interface ID3D11CryptoSession(ID3D11CryptoSessionVtbl): ID3D11DeviceChild(ID3D11DeviceChildVtbl) { + fn GetCryptoType(&mut self, pCryptoType: *mut GUID) -> (), + fn GetDecoderProfile(&mut self, pDecoderProfile: *mut GUID) -> (), + fn GetCertificateSize(&mut self, pCertificateSize: *mut UINT) -> HRESULT, + fn GetCertificate(&mut self, CertificateSize: UINT, pCertificate: *mut BYTE) -> HRESULT, + fn GetCryptoSessionHandle(&mut self, pCertificate: *mut HANDLE) -> () +}} +ENUM!{enum D3D11_VDOV_DIMENSION { + D3D11_VDOV_DIMENSION_UNKNOWN = 0, + D3D11_VDOV_DIMENSION_TEXTURE2D = 1, +}} +STRUCT!{struct D3D11_TEX2D_VDOV { + ArraySlice: UINT, +}} +STRUCT!{struct D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC { + DecodeProfile: GUID, + ViewDimension: D3D11_VDOV_DIMENSION, + Texture2D: D3D11_TEX2D_VDOV, +}} +RIDL!{interface ID3D11VideoDecoderOutputView(ID3D11VideoDecoderOutputViewVtbl) + : ID3D11View(ID3D11ViewVtbl) { + fn GetDesc(&mut self, pDesc: *mut D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC) -> () +}} +ENUM!{enum D3D11_VPIV_DIMENSION { + D3D11_VPIV_DIMENSION_UNKNOWN = 0, + D3D11_VPIV_DIMENSION_TEXTURE2D = 1, +}} +STRUCT!{struct D3D11_TEX2D_VPIV { + MipSlice: UINT, + ArraySlice: UINT, +}} +STRUCT!{struct D3D11_VIDEO_PROCESSOR_INPUT_VIEW_DESC { + FourCC: UINT, + ViewDimension: D3D11_VPIV_DIMENSION, + Texture2D: D3D11_TEX2D_VPIV, +}} +RIDL!{interface ID3D11VideoProcessorInputView(ID3D11VideoProcessorInputViewVtbl) + : ID3D11View(ID3D11ViewVtbl) { + fn GetDesc(&mut self, pDesc: *mut D3D11_VIDEO_PROCESSOR_INPUT_VIEW_DESC) -> () +}} +ENUM!{enum D3D11_VPOV_DIMENSION { + D3D11_VPOV_DIMENSION_UNKNOWN = 0, + D3D11_VPOV_DIMENSION_TEXTURE2D = 1, + D3D11_VPOV_DIMENSION_TEXTURE2DARRAY = 2, +}} +STRUCT!{struct D3D11_TEX2D_VPOV { + MipSlice: UINT, +}} +STRUCT!{struct D3D11_TEX2D_ARRAY_VPOV { + MipSlice: UINT, + FirstArraySlice: UINT, + ArraySize: UINT, +}} +STRUCT!{struct D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC { + ViewDimension: D3D11_VPOV_DIMENSION, + u: [UINT; 3], +}} +UNION!{D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC, u, Texture2D, Texture2D_mut, D3D11_TEX2D_VPOV} +UNION!{D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC, u, Texture2DArray, Texture2DArray_mut, + D3D11_TEX2D_ARRAY_VPOV} +RIDL!{interface ID3D11VideoProcessorOutputView(ID3D11VideoProcessorOutputViewVtbl) + : ID3D11View(ID3D11ViewVtbl) { + fn GetDesc(&mut self, pDesc: *mut D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC) -> () +}} +RIDL!{interface ID3D11VideoContext(ID3D11VideoContextVtbl): ID3D11DeviceChild(ID3D11DeviceChildVtbl) { + fn GetDecoderBuffer( + &mut self, pDecoder: *mut ID3D11VideoDecoder, Type: D3D11_VIDEO_DECODER_BUFFER_TYPE, + pBufferSize: *mut UINT, ppBuffer: *mut *mut c_void + ) -> HRESULT, + fn ReleaseDecoderBuffer( + &mut self, pDecoder: *mut ID3D11VideoDecoder, Type: D3D11_VIDEO_DECODER_BUFFER_TYPE + ) -> HRESULT, + fn DecoderBeginFrame( + &mut self, pDecoder: *mut ID3D11VideoDecoder, pView: *mut ID3D11VideoDecoderOutputView, + ContentKeySize: UINT, pContentKey: *const c_void + ) -> HRESULT, + fn DecoderEndFrame(&mut self, pDecoder: *mut ID3D11VideoDecoder) -> HRESULT, + fn SubmitDecoderBuffers( + &mut self, pDecoder: *mut ID3D11VideoDecoder, NumBuffers: UINT, + pBufferDesc: *const D3D11_VIDEO_DECODER_BUFFER_DESC + ) -> HRESULT, + fn DecoderExtension( + &mut self, pDecoder: *mut ID3D11VideoDecoder, + pExtensionData: *const D3D11_VIDEO_DECODER_EXTENSION + ) -> HRESULT, + fn VideoProcessorSetOutputTargetRect( + &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, Enable: BOOL, pRect: *const RECT + ) -> (), + fn VideoProcessorSetOutputBackgroundColor( + &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, YCbCr: BOOL, pRect: *const RECT + ) -> (), + fn VideoProcessorSetOutputColorSpace( + &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, + pColorSpace: *const D3D11_VIDEO_PROCESSOR_COLOR_SPACE + ) -> HRESULT, + fn VideoProcessorSetOutputAlphaFillMode( + &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, + AlphaFillMode: D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE, StreamIndex: UINT + ) -> (), + fn VideoProcessorSetOutputConstriction( + &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, Enable: BOOL, Size: SIZE + ) -> (), + fn VideoProcessorSetOutputStereoMode( + &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, Enable: BOOL + ) -> (), + fn VideoProcessorSetOutputExtension( + &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, pExtensionGuid: *const GUID, + DataSize: UINT, pData: *mut c_void + ) -> HRESULT, + fn VideoProcessorGetOutputTargetRect( + &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, Enabled: *mut BOOL, pRect: *mut RECT + ) -> (), + fn VideoProcessorGetOutputBackgroundColor( + &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, pYCbCr: *mut BOOL, + pColor: *mut D3D11_VIDEO_COLOR + ) -> (), + fn VideoProcessorGetOutputColorSpace( + &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, + pColorSpace: *mut D3D11_VIDEO_PROCESSOR_COLOR_SPACE + ) -> (), + fn VideoProcessorGetOutputAlphaFillMode( + &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, + pAlphaFillMode: *mut D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE, pStreamIndex: *mut UINT + ) -> (), + fn VideoProcessorGetOutputConstriction( + &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, pEnabled: *mut BOOL, + pSize: *mut SIZE + ) -> (), + fn VideoProcessorGetOutputStereoMode( + &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, pEnabled: *mut BOOL + ) -> (), + fn VideoProcessorGetOutputExtension( + &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, pExtensionGuid: *const GUID, + DataSize: UINT, pData: *mut c_void + ) -> HRESULT, + fn VideoProcessorSetStreamFrameFormat( + &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, StreamIndex: UINT, + FrameFormat: D3D11_VIDEO_FRAME_FORMAT + ) -> (), + fn VideoProcessorSetStreamColorSpace( + &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, StreamIndex: UINT, + pColorSpace: *const D3D11_VIDEO_PROCESSOR_COLOR_SPACE + ) -> (), + fn VideoProcessorSetStreamOutputRate( + &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, StreamIndex: UINT, + OutputRate: D3D11_VIDEO_PROCESSOR_OUTPUT_RATE, RepeatFrame: BOOL, + pCustomRate: *const DXGI_RATIONAL + ) -> (), + fn VideoProcessorSetStreamSourceRect( + &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, StreamIndex: UINT, Enable: BOOL, + pRect: *const RECT + ) -> (), + fn VideoProcessorSetStreamDestRect( + &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, StreamIndex: UINT, Enable: BOOL, + pRect: *const RECT + ) -> (), + fn VideoProcessorSetStreamAlpha( + &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, StreamIndex: UINT, Enable: BOOL, + Alpha: FLOAT + ) -> (), + fn VideoProcessorSetStreamPalette( + &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, StreamIndex: UINT, Count: UINT, + pEntries: *const UINT + ) -> (), + fn VideoProcessorSetStreamPixelAspectRatio( + &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, StreamIndex: UINT, Enable: BOOL, + pSourceAspectRatio: *const DXGI_RATIONAL, pDestinationAspectRatio: *const DXGI_RATIONAL + ) -> (), + fn VideoProcessorSetStreamLumaKey( + &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, StreamIndex: UINT, Enable: BOOL, + Lower: FLOAT, Upper: FLOAT + ) -> (), + fn VideoProcessorSetStreamStereoFormat( + &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, StreamIndex: UINT, Enable: BOOL, + Format: D3D11_VIDEO_PROCESSOR_STEREO_FORMAT, LeftViewFrame0: BOOL, BaseViewFrame0: BOOL, + FlipMode: D3D11_VIDEO_PROCESSOR_STEREO_FLIP_MODE + ) -> (), + fn VideoProcessorSetStreamAutoProcessingMode( + &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, StreamIndex: UINT, Enable: BOOL + ) -> (), + fn VideoProcessorSetStreamFilter( + &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, StreamIndex: UINT, + Filter: D3D11_VIDEO_PROCESSOR_FILTER, Enable: BOOL, Level: c_int + ) -> (), + fn VideoProcessorSetStreamExtension( + &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, StreamIndex: UINT, + pExtensionGuid: *const GUID, DataSize: UINT, pData: *mut c_void + ) -> HRESULT, + fn VideoProcessorGetStreamFrameFormat( + &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, StreamIndex: UINT, + pFrameFormat: *mut D3D11_VIDEO_FRAME_FORMAT + ) -> (), + fn VideoProcessorGetStreamColorSpace( + &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, StreamIndex: UINT, + pColorSpace: *mut D3D11_VIDEO_PROCESSOR_COLOR_SPACE + ) -> (), + fn VideoProcessorGetStreamOutputRate( + &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, StreamIndex: UINT, + pOutputRate: *mut D3D11_VIDEO_PROCESSOR_OUTPUT_RATE, pRepeatFrame: *mut BOOL, + pCustomRate: *mut DXGI_RATIONAL + ) -> (), + fn VideoProcessorGetStreamSourceRect( + &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, StreamIndex: UINT, + pEnabled: *mut BOOL, pRect: *mut RECT + ) -> (), + fn VideoProcessorGetStreamDestRect( + &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, StreamIndex: UINT, + pEnabled: *mut BOOL, pRect: *mut RECT + ) -> (), + fn VideoProcessorGetStreamAlpha( + &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, StreamIndex: UINT, + pEnabled: *mut BOOL, pAlpha: *mut FLOAT + ) -> (), + fn VideoProcessorGetStreamPalette( + &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, StreamIndex: UINT, Count: UINT, + pEntries: *mut UINT + ) -> (), + fn VideoProcessorGetStreamPixelAspectRatio( + &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, StreamIndex: UINT, + pEnabled: *mut BOOL, pSourceAspectRatio: *mut DXGI_RATIONAL, + pDestinationAspectRatio: *mut DXGI_RATIONAL + ) -> (), + fn VideoProcessorGetStreamLumaKey( + &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, StreamIndex: UINT, + pEnabled: *mut BOOL, pLower: *mut FLOAT, pUpper: *mut FLOAT + ) -> (), + fn VideoProcessorGetStreamStereoFormat( + &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, StreamIndex: UINT, + pEnabled: *mut BOOL, pFormat: *mut D3D11_VIDEO_PROCESSOR_STEREO_FORMAT, + pLeftViewFrame0: *mut BOOL, pBaseViewFrame0: *mut BOOL, + pFlipMode: *mut D3D11_VIDEO_PROCESSOR_STEREO_FLIP_MODE, MonoOffset: *mut c_int + ) -> (), + fn VideoProcessorGetStreamAutoProcessingMode( + &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, StreamIndex: UINT, + pEnabled: *mut BOOL + ) -> (), + fn VideoProcessorGetStreamFilter( + &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, StreamIndex: UINT, + Filter: D3D11_VIDEO_PROCESSOR_FILTER, pEnabled: *mut BOOL, pLevel: *mut c_int + ) -> (), + fn VideoProcessorGetStreamExtension( + &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, StreamIndex: UINT, + pExtensionGuid: *const GUID, DataSize: UINT, pData: *mut c_void + ) -> HRESULT, + fn VideoProcessorBlt( + &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, + pView: *mut ID3D11VideoProcessorOutputView, OutputFrame: UINT, StreamCount: UINT, + pStreams: *const D3D11_VIDEO_PROCESSOR_STREAM + ) -> HRESULT, + fn NegotiateCryptoSessionKeyExchange( + &mut self, pCryptoSession: *mut ID3D11CryptoSession, DataSize: UINT, pData: *mut c_void + ) -> HRESULT, + fn EncryptionBlt( + &mut self, pCryptoSession: *mut ID3D11CryptoSession, pSrcSurface: *mut ID3D11Texture2D, + pDstSurface: *mut ID3D11Texture2D, IVSize: UINT, pIV: *mut c_void + ) -> HRESULT, + fn DecryptionBlt( + &mut self, pCryptoSession: *mut ID3D11CryptoSession, pSrcSurface: *mut ID3D11Texture2D, + pDstSurface: *mut ID3D11Texture2D, pEncryptedBlockInfo: *mut D3D11_ENCRYPTED_BLOCK_INFO, + ContentKeySize: UINT, pContentKey: *const c_void, IVSize: UINT, pIV: *mut c_void + ) -> HRESULT, + fn StartSessionKeyRefresh( + &mut self, pCryptoSession: *mut ID3D11CryptoSession, RandomNumberSize: UINT, + pRandomNumber: *mut c_void + ) -> HRESULT, + fn FinishSessionKeyRefresh(&mut self, pCryptoSession: *mut ID3D11CryptoSession) -> HRESULT, + fn GetEncryptionBltKey( + &mut self, pCryptoSession: *mut ID3D11CryptoSession, KeySize: UINT, + pReadbackKey: *mut c_void + ) -> HRESULT, + fn NegotiateAuthenticatedChannelKeyExchange( + &mut self, pChannel: *mut ID3D11AuthenticatedChannel, DataSize: UINT, pData: *mut c_void + ) -> HRESULT, + fn QueryAuthenticatedChannel( + &mut self, pChannel: *mut ID3D11AuthenticatedChannel, InputSize: UINT, + pInput: *const c_void, OutputSize: UINT, pOutput: *mut c_void + ) -> HRESULT, + fn ConfigureAuthenticatedChannel( + &mut self, pChannel: *mut ID3D11AuthenticatedChannel, InputSize: UINT, + pInput: *const c_void, pOutput: *mut D3D11_AUTHENTICATED_CONFIGURE_OUTPUT + ) -> HRESULT, + fn VideoProcessorSetStreamRotation( + &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, StreamIndex: UINT, Enable: BOOL, + Rotation: D3D11_VIDEO_PROCESSOR_ROTATION + ) -> HRESULT, + fn VideoProcessorGetStreamRotation( + &mut self, pVideoProcessor: *mut ID3D11VideoProcessor, StreamIndex: UINT, + pEnable: *mut BOOL, pRotation: *mut D3D11_VIDEO_PROCESSOR_ROTATION + ) -> HRESULT +}} +RIDL!{interface ID3D11VideoDevice(ID3D11VideoDeviceVtbl): IUnknown(IUnknownVtbl) { + fn CreateVideoDecoder( + &mut self, pVideoDesc: *const D3D11_VIDEO_DECODER_DESC, + pConfig: *const D3D11_VIDEO_DECODER_CONFIG, ppDecoder: *mut *mut ID3D11VideoDecoder + ) -> HRESULT, + fn CreateVideoProcessor( + &mut self, pEnum: *mut ID3D11VideoProcessorEnumerator, RateConversionIndex: UINT, + ppVideoProcessor: *mut *mut ID3D11VideoProcessor + ) -> HRESULT, + fn CreateAuthenticatedChannel( + &mut self, ChannelType: D3D11_AUTHENTICATED_CHANNEL_TYPE, + ppAuthenticatedChannel: *mut *mut ID3D11AuthenticatedChannel + ) -> HRESULT, + fn CreateCryptoSession( + &mut self, pCryptoType: *const GUID, pDecoderProfile: *const GUID, + pKeyExchangeType: *const GUID, ppCryptoSession: *mut *mut ID3D11CryptoSession + ) -> HRESULT, + fn CreateVideoDecoderOutputView( + &mut self, pResource: *mut ID3D11Resource, + pDesc: *const D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC, + ppVDOVView: *mut *mut ID3D11VideoDecoderOutputView + ) -> HRESULT, + fn CreateVideoProcessorInputView( + &mut self, pResource: *mut ID3D11Resource, pEnum: *mut ID3D11VideoProcessorEnumerator, + pDesc: *const D3D11_VIDEO_PROCESSOR_INPUT_VIEW_DESC, + ppVPIView: *mut *mut ID3D11VideoProcessorInputView + ) -> HRESULT, + fn CreateVideoProcessorOutputView( + &mut self, pResource: *mut ID3D11Resource, pEnum: *mut ID3D11VideoProcessorEnumerator, + pDesc: *const D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC, + ppVPOView: *mut *mut ID3D11VideoProcessorOutputView + ) -> HRESULT, + fn CreateVideoProcessorEnumerator( + &mut self, pDesc: *const D3D11_VIDEO_PROCESSOR_CONTENT_DESC, + ppEnum: *mut *mut ID3D11VideoProcessorEnumerator + ) -> HRESULT, + fn GetVideoDecoderProfileCount(&mut self) -> UINT, + fn GetVideoDecoderProfile(&mut self, Index: UINT, pDecoderProfile: *mut GUID) -> HRESULT, + fn CheckVideoDecoderFormat( + &mut self, pDecoderProfile: *const GUID, Format: DXGI_FORMAT, pSupported: *mut BOOL + ) -> HRESULT, + fn GetVideoDecoderConfigCount( + &mut self, pDesc: *const D3D11_VIDEO_DECODER_DESC, pCount: *mut UINT + ) -> HRESULT, + fn GetVideoDecoderConfig( + &mut self, pDesc: *const D3D11_VIDEO_DECODER_DESC, Index: UINT, + pConfig: *mut D3D11_VIDEO_DECODER_CONFIG + ) -> HRESULT, + fn GetContentProtectionCaps( + &mut self, pCryptoType: *const GUID, pDecoderProfile: *const GUID, + pCaps: *mut D3D11_VIDEO_CONTENT_PROTECTION_CAPS + ) -> HRESULT, + fn CheckCryptoKeyExchange( + &mut self, pCryptoType: *const GUID, pDecoderProfile: *const GUID, Index: UINT, + pKeyExchangeType: *mut GUID + ) -> HRESULT, + fn SetPrivateData( &mut self, guid: REFGUID, DataSize: UINT, pData: *const c_void) -> HRESULT, + fn SetPrivateDataInterface(&mut self, guid: REFGUID, pData: *const IUnknown) -> HRESULT +}} +RIDL!{interface ID3D11Device(ID3D11DeviceVtbl): IUnknown(IUnknownVtbl) { + fn CreateBuffer( + &mut self, pDesc: *const D3D11_BUFFER_DESC, pInitialData: *const D3D11_SUBRESOURCE_DATA, + ppBuffer: *mut *mut ID3D11Buffer + ) -> HRESULT, + fn CreateTexture1D( + &mut self, pDesc: *const D3D11_TEXTURE1D_DESC, pInitialData: *const D3D11_SUBRESOURCE_DATA, + ppTexture1D: *mut *mut ID3D11Texture1D + ) -> HRESULT, + fn CreateTexture2D( + &mut self, pDesc: *const D3D11_TEXTURE2D_DESC, pInitialData: *const D3D11_SUBRESOURCE_DATA, + ppTexture2D: *mut *mut ID3D11Texture2D + ) -> HRESULT, + fn CreateTexture3D( + &mut self, pDesc: *const D3D11_TEXTURE3D_DESC, pInitialData: *const D3D11_SUBRESOURCE_DATA, + ppTexture3D: *mut *mut ID3D11Texture3D + ) -> HRESULT, + fn CreateShaderResourceView( + &mut self, pResource: *mut ID3D11Resource, pDesc: *const D3D11_SHADER_RESOURCE_VIEW_DESC, + ppSRView: *mut *mut ID3D11ShaderResourceView + ) -> HRESULT, + fn CreateUnorderedAccessView( + &mut self, pResource: *mut ID3D11Resource, pDesc: *const D3D11_UNORDERED_ACCESS_VIEW_DESC, + ppUAView: *mut *mut ID3D11UnorderedAccessView + ) -> HRESULT, + fn CreateRenderTargetView( + &mut self, pResource: *mut ID3D11Resource, pDesc: *const D3D11_RENDER_TARGET_VIEW_DESC, + ppRTView: *mut *mut ID3D11RenderTargetView + ) -> HRESULT, + fn CreateDepthStencilView( + &mut self, pResource: *mut ID3D11Resource, pDesc: *const D3D11_DEPTH_STENCIL_VIEW_DESC, + ppDepthStencilView: *mut *mut ID3D11DepthStencilView + ) -> HRESULT, + fn CreateInputLayout( + &mut self, pInputElementDescs: *const D3D11_INPUT_ELEMENT_DESC, NumElements: UINT, + pShaderBytecodeWithInputSignature: *const c_void, BytecodeLength: SIZE_T, + ppInputLayout: *mut *mut ID3D11InputLayout + ) -> HRESULT, + fn CreateVertexShader( + &mut self, pShaderBytecode: *const c_void, BytecodeLength: SIZE_T, + pClassLinkage: *mut ID3D11ClassLinkage, ppVertexShader: *mut *mut ID3D11VertexShader + ) -> HRESULT, + fn CreateGeometryShader( + &mut self, pShaderBytecode: *const c_void, BytecodeLength: SIZE_T, + pClassLinkage: *mut ID3D11ClassLinkage, ppGeometryShader: *mut *mut ID3D11GeometryShader + ) -> HRESULT, + fn CreateGeometryShaderWithStreamOutput( + &mut self, pShaderBytecode: *const c_void, BytecodeLength: SIZE_T, + pSODeclaration: *const D3D11_SO_DECLARATION_ENTRY, NumEntries: UINT, + pBufferStrides: *const UINT, NumStrides: UINT, RasterizedStream: UINT, + pClassLinkage: *mut ID3D11ClassLinkage, ppGeometryShader: *mut *mut ID3D11GeometryShader + ) -> HRESULT, + fn CreatePixelShader( + &mut self, pShaderBytecode: *const c_void, BytecodeLength: SIZE_T, + pClassLinkage: *mut ID3D11ClassLinkage, ppPixelShader: *mut *mut ID3D11PixelShader + ) -> HRESULT, + fn CreateHullShader( + &mut self, pShaderBytecode: *const c_void, BytecodeLength: SIZE_T, + pClassLinkage: *mut ID3D11ClassLinkage, ppHullShader: *mut *mut ID3D11HullShader + ) -> HRESULT, + fn CreateDomainShader( + &mut self, pShaderBytecode: *const c_void, BytecodeLength: SIZE_T, + pClassLinkage: *mut ID3D11ClassLinkage, ppDomainShader: *mut *mut ID3D11DomainShader + ) -> HRESULT, + fn CreateComputeShader( + &mut self, pShaderBytecode: *const c_void, BytecodeLength: SIZE_T, + pClassLinkage: *mut ID3D11ClassLinkage, ppComputeShader: *mut *mut ID3D11ComputeShader + ) -> HRESULT, + fn CreateClassLinkage(&mut self, ppLinkage: *mut *mut ID3D11ClassLinkage) -> HRESULT, + fn CreateBlendState( + &mut self, pBlendStateDesc: *const D3D11_BLEND_DESC, + ppBlendState: *mut *mut ID3D11BlendState + ) -> HRESULT, + fn CreateDepthStencilState( + &mut self, pDepthStencilDesc: *const D3D11_DEPTH_STENCIL_DESC, + ppDepthStencilState: *mut *mut ID3D11DepthStencilState + ) -> HRESULT, + fn CreateRasterizerState( + &mut self, pRasterizerDesc: *const D3D11_RASTERIZER_DESC, + ppRasterizerState: *mut *mut ID3D11RasterizerState + ) -> HRESULT, + fn CreateSamplerState( + &mut self, pSamplerDesc: *const D3D11_SAMPLER_DESC, + ppSamplerState: *mut *mut ID3D11SamplerState + ) -> HRESULT, + fn CreateQuery( + &mut self, pQueryDesc: *const D3D11_QUERY_DESC, ppQuery: *mut *mut ID3D11Query + ) -> HRESULT, + fn CreatePredicate( + &mut self, pPredicateDesc: *const D3D11_QUERY_DESC, ppPredicate: *mut *mut ID3D11Predicate + ) -> HRESULT, + fn CreateCounter( + &mut self, pCounterDesc: *const D3D11_COUNTER_DESC, ppCounter: *mut *mut ID3D11Counter + ) -> HRESULT, + fn CreateDeferredContext( + &mut self, ContextFlags: UINT, ppDeferredContext: *mut *mut ID3D11DeviceContext + ) -> HRESULT, + fn OpenSharedResource( + &mut self, hResource: HANDLE, ReturnedInterface: REFIID, ppResource: *mut *mut c_void + ) -> HRESULT, + fn CheckFormatSupport( + &mut self, Format: DXGI_FORMAT, pFormatSupport: *mut UINT + ) -> HRESULT, + fn CheckMultisampleQualityLevels( + &mut self, Format: DXGI_FORMAT, SampleCount: UINT, pNumQualityLevels: *mut UINT + ) -> HRESULT, + fn CheckCounterInfo(&mut self, pCounterInfo: *mut D3D11_COUNTER_INFO) -> (), + fn CheckCounter( + &mut self, pDesc: *const D3D11_COUNTER_DESC, pType: *mut D3D11_COUNTER_TYPE, + pActiveCounters: *mut UINT, szName: LPSTR, pNameLength: *mut UINT, szUnits: LPSTR, + pUnitsLength: *mut UINT, szDescription: LPSTR, pDescriptionLength: *mut UINT + ) -> HRESULT, + fn CheckFeatureSupport( + &mut self, Feature: D3D11_FEATURE, pFeatureSupportData: *mut c_void, + FeatureSupportDataSize: UINT + ) -> HRESULT, + fn GetPrivateData( + &mut self, guid: REFGUID, pDataSize: *mut UINT, pData: *mut c_void + ) -> HRESULT, + fn SetPrivateData( + &mut self, guid: REFGUID, DataSize: UINT, pData: *const c_void + ) -> HRESULT, + fn SetPrivateDataInterface(&mut self, guid: REFGUID, pData: *const IUnknown) -> HRESULT, + fn GetFeatureLevel(&mut self) -> D3D_FEATURE_LEVEL, + fn GetCreationFlags(&mut self) -> UINT, + fn GetDeviceRemovedReason(&mut self) -> HRESULT, + fn GetImmediateContext(&mut self, ppImmediateContext: *mut *mut ID3D11DeviceContext) -> (), + fn SetExceptionMode(&mut self, RaiseFlags: UINT) -> HRESULT, + fn GetExceptionMode(&mut self) -> UINT +}} +FLAGS!{enum D3D11_CREATE_DEVICE_FLAG { + D3D11_CREATE_DEVICE_SINGLETHREADED = 0x1, + D3D11_CREATE_DEVICE_DEBUG = 0x2, + D3D11_CREATE_DEVICE_SWITCH_TO_REF = 0x4, + D3D11_CREATE_DEVICE_PREVENT_INTERNAL_THREADING_OPTIMIZATIONS = 0x8, + D3D11_CREATE_DEVICE_BGRA_SUPPORT = 0x20, + D3D11_CREATE_DEVICE_DEBUGGABLE = 0x40, + D3D11_CREATE_DEVICE_PREVENT_ALTERING_LAYER_SETTINGS_FROM_REGISTRY = 0x80, + D3D11_CREATE_DEVICE_DISABLE_GPU_TIMEOUT = 0x100, + D3D11_CREATE_DEVICE_VIDEO_SUPPORT = 0x800, +}} +pub const D3D11_SDK_VERSION: DWORD = 7; diff --git a/deps/winapi-0.2.6/src/d3d11shader.rs b/deps/winapi-0.2.6/src/d3d11shader.rs new file mode 100644 index 000000000..11be345de --- /dev/null +++ b/deps/winapi-0.2.6/src/d3d11shader.rs @@ -0,0 +1,320 @@ +// Copyright © 2016, Peter Atashian +// Licensed under the MIT License <LICENSE.md> +use super::*; +ENUM!{enum D3D11_SHADER_VERSION_TYPE { + D3D11_SHVER_PIXEL_SHADER = 0, + D3D11_SHVER_VERTEX_SHADER = 1, + D3D11_SHVER_GEOMETRY_SHADER = 2, + D3D11_SHVER_HULL_SHADER = 3, + D3D11_SHVER_DOMAIN_SHADER = 4, + D3D11_SHVER_COMPUTE_SHADER = 5, + D3D11_SHVER_RESERVED0 = 0xFFF0, +}} +pub const D3D_RETURN_PARAMETER_INDEX: c_int = -1; +pub type D3D11_RESOURCE_RETURN_TYPE = D3D_RESOURCE_RETURN_TYPE; +pub type D3D11_CBUFFER_TYPE = D3D_CBUFFER_TYPE; +STRUCT!{struct D3D11_SIGNATURE_PARAMETER_DESC { + SemanticName: LPCSTR, + SemanticIndex: UINT, + Register: UINT, + SystemValueType: D3D_NAME, + ComponentType: D3D_REGISTER_COMPONENT_TYPE, + Mask: BYTE, + ReadWriteMask: BYTE, + Stream: UINT, + MinPrecision: D3D_MIN_PRECISION, +}} +STRUCT!{struct D3D11_SHADER_BUFFER_DESC { + Name: LPCSTR, + Type: D3D_CBUFFER_TYPE, + Variables: UINT, + Size: UINT, + uFlags: UINT, +}} +STRUCT!{struct D3D11_SHADER_VARIABLE_DESC { + Name: LPCSTR, + StartOffset: UINT, + Size: UINT, + uFlags: UINT, + DefaultValue: LPVOID, + StartTexture: UINT, + TextureSize: UINT, + StartSampler: UINT, + SamplerSize: UINT, +}} +STRUCT!{struct D3D11_SHADER_TYPE_DESC { + Class: D3D_SHADER_VARIABLE_CLASS, + Type: D3D_SHADER_VARIABLE_TYPE, + Rows: UINT, + Columns: UINT, + Elements: UINT, + Members: UINT, + Offset: UINT, + Name: LPCSTR, +}} +pub type D3D11_TESSELLATOR_DOMAIN = D3D_TESSELLATOR_DOMAIN; +pub type D3D11_TESSELLATOR_PARTITIONING = D3D_TESSELLATOR_PARTITIONING; +pub type D3D11_TESSELLATOR_OUTPUT_PRIMITIVE = D3D_TESSELLATOR_OUTPUT_PRIMITIVE; +STRUCT!{struct D3D11_SHADER_DESC { + Version: UINT, + Creator: LPCSTR, + Flags: UINT, + ConstantBuffers: UINT, + BoundResources: UINT, + InputParameters: UINT, + OutputParameters: UINT, + InstructionCount: UINT, + TempRegisterCount: UINT, + TempArrayCount: UINT, + DefCount: UINT, + DclCount: UINT, + TextureNormalInstructions: UINT, + TextureLoadInstructions: UINT, + TextureCompInstructions: UINT, + TextureBiasInstructions: UINT, + TextureGradientInstructions: UINT, + FloatInstructionCount: UINT, + IntInstructionCount: UINT, + UintInstructionCount: UINT, + StaticFlowControlCount: UINT, + DynamicFlowControlCount: UINT, + MacroInstructionCount: UINT, + ArrayInstructionCount: UINT, + CutInstructionCount: UINT, + EmitInstructionCount: UINT, + GSOutputTopology: D3D_PRIMITIVE_TOPOLOGY, + GSMaxOutputVertexCount: UINT, + InputPrimitive: D3D_PRIMITIVE, + PatchConstantParameters: UINT, + cGSInstanceCount: UINT, + cControlPoints: UINT, + HSOutputPrimitive: D3D_TESSELLATOR_OUTPUT_PRIMITIVE, + HSPartitioning: D3D_TESSELLATOR_PARTITIONING, + TessellatorDomain: D3D_TESSELLATOR_DOMAIN, + cBarrierInstructions: UINT, + cInterlockedInstructions: UINT, + cTextureStoreInstructions: UINT, +}} +STRUCT!{struct D3D11_SHADER_INPUT_BIND_DESC { + Name: LPCSTR, + Type: D3D_SHADER_INPUT_TYPE, + BindPoint: UINT, + BindCount: UINT, + uFlags: UINT, + ReturnType: D3D_RESOURCE_RETURN_TYPE, + Dimension: D3D_SRV_DIMENSION, + NumSamples: UINT, +}} +pub const D3D_SHADER_REQUIRES_DOUBLES: DWORD = 0x00000001; +pub const D3D_SHADER_REQUIRES_EARLY_DEPTH_STENCIL: DWORD = 0x00000002; +pub const D3D_SHADER_REQUIRES_UAVS_AT_EVERY_STAGE: DWORD = 0x00000004; +pub const D3D_SHADER_REQUIRES_64_UAVS: DWORD = 0x00000008; +pub const D3D_SHADER_REQUIRES_MINIMUM_PRECISION: DWORD = 0x00000010; +pub const D3D_SHADER_REQUIRES_11_1_DOUBLE_EXTENSIONS: DWORD = 0x00000020; +pub const D3D_SHADER_REQUIRES_11_1_SHADER_EXTENSIONS: DWORD = 0x00000040; +pub const D3D_SHADER_REQUIRES_LEVEL_9_COMPARISON_FILTERING: DWORD = 0x00000080; +pub const D3D_SHADER_REQUIRES_TILED_RESOURCES: DWORD = 0x00000100; +STRUCT!{struct D3D11_LIBRARY_DESC { + Creator: LPCSTR, + Flags: UINT, + FunctionCount: UINT, +}} +STRUCT!{struct D3D11_FUNCTION_DESC { + Version: UINT, + Creator: LPCSTR, + Flags: UINT, + ConstantBuffers: UINT, + BoundResources: UINT, + InstructionCount: UINT, + TempRegisterCount: UINT, + TempArrayCount: UINT, + DefCount: UINT, + DclCount: UINT, + TextureNormalInstructions: UINT, + TextureLoadInstructions: UINT, + TextureCompInstructions: UINT, + TextureBiasInstructions: UINT, + TextureGradientInstructions: UINT, + FloatInstructionCount: UINT, + IntInstructionCount: UINT, + UintInstructionCount: UINT, + StaticFlowControlCount: UINT, + DynamicFlowControlCount: UINT, + MacroInstructionCount: UINT, + ArrayInstructionCount: UINT, + MovInstructionCount: UINT, + MovcInstructionCount: UINT, + ConversionInstructionCount: UINT, + BitwiseInstructionCount: UINT, + MinFeatureLevel: D3D_FEATURE_LEVEL, + RequiredFeatureFlags: UINT64, + Name: LPCSTR, + FunctionParameterCount: INT, + HasReturn: BOOL, + Has10Level9VertexShader: BOOL, + Has10Level9PixelShader: BOOL, +}} +STRUCT!{struct D3D11_PARAMETER_DESC { + Name: LPCSTR, + SemanticName: LPCSTR, + Type: D3D_SHADER_VARIABLE_TYPE, + Class: D3D_SHADER_VARIABLE_CLASS, + Rows: UINT, + Columns: UINT, + InterpolationMode: D3D_INTERPOLATION_MODE, + Flags: D3D_PARAMETER_FLAGS, + FirstInRegister: UINT, + FirstInComponent: UINT, + FirstOutRegister: UINT, + FirstOutComponent: UINT, +}} +RIDL!{interface ID3D11ShaderReflectionType(ID3D11ShaderReflectionTypeVtbl) { + fn GetDesc(&mut self, pDesc: *mut D3D11_SHADER_TYPE_DESC) -> HRESULT, + fn GetMemberTypeByIndex(&mut self, Index: UINT) -> *mut ID3D11ShaderReflectionType, + fn GetMemberTypeByName(&mut self, Name: LPCSTR) -> *mut ID3D11ShaderReflectionType, + fn GetMemberTypeName(&mut self, Index: UINT) -> LPCSTR, + fn IsEqual(&mut self, pType: *mut ID3D11ShaderReflectionType) -> HRESULT, + fn GetSubType(&mut self) -> *mut ID3D11ShaderReflectionType, + fn GetBaseClass(&mut self) -> *mut ID3D11ShaderReflectionType, + fn GetNumInterfaces(&mut self) -> UINT, + fn GetInterfaceByIndex(&mut self, uIndex: UINT) -> *mut ID3D11ShaderReflectionType, + fn IsOfType(&mut self, pType: *mut ID3D11ShaderReflectionType) -> HRESULT, + fn ImplementsInterface(&mut self, pBase: *mut ID3D11ShaderReflectionType) -> HRESULT +}} +RIDL!{interface ID3D11ShaderReflectionVariable(ID3D11ShaderReflectionVariableVtbl) { + fn GetDesc(&mut self, pDesc: *mut D3D11_SHADER_VARIABLE_DESC) -> HRESULT, + fn GetType(&mut self) -> *mut ID3D11ShaderReflectionType, + fn GetBuffer(&mut self) -> *mut ID3D11ShaderReflectionConstantBuffer, + fn GetInterfaceSlot(&mut self, uArrayIndex: UINT) -> UINT +}} +RIDL!{interface ID3D11ShaderReflectionConstantBuffer(ID3D11ShaderReflectionConstantBufferVtbl) { + fn GetDesc(&mut self, pDesc: *mut D3D11_SHADER_BUFFER_DESC) -> HRESULT, + fn GetVariableByIndex(&mut self, Index: UINT) -> *mut ID3D11ShaderReflectionVariable, + fn GetVariableByName(&mut self, Name: LPCSTR) -> *mut ID3D11ShaderReflectionVariable +}} +RIDL!{interface ID3D11ShaderReflection(ID3D11ShaderReflectionVtbl): IUnknown(IUnknownVtbl) { + fn GetDesc(&mut self, pDesc: *mut D3D11_SHADER_DESC) -> HRESULT, + fn GetConstantBufferByIndex( + &mut self, Index: UINT + ) -> *mut ID3D11ShaderReflectionConstantBuffer, + fn GetConstantBufferByName( + &mut self, Name: LPCSTR + ) -> *mut ID3D11ShaderReflectionConstantBuffer, + fn GetResourceBindingDesc( + &mut self, ResourceIndex: UINT, pDesc: *mut D3D11_SHADER_INPUT_BIND_DESC + ) -> HRESULT, + fn GetInputParameterDesc( + &mut self, ParameterIndex: UINT, pDesc: *mut D3D11_SIGNATURE_PARAMETER_DESC + ) -> HRESULT, + fn GetOutputParameterDesc( + &mut self, ParameterIndex: UINT, pDesc: *mut D3D11_SIGNATURE_PARAMETER_DESC + ) -> HRESULT, + fn GetPatchConstantParameterDesc( + &mut self, ParameterIndex: UINT, pDesc: *mut D3D11_SIGNATURE_PARAMETER_DESC + ) -> HRESULT, + fn GetVariableByName(&mut self, Name: LPCSTR) -> *mut ID3D11ShaderReflectionVariable, + fn GetResourceBindingDescByName( + &mut self, Name: LPCSTR, pDesc: *mut D3D11_SHADER_INPUT_BIND_DESC + ) -> HRESULT, + fn GetMovInstructionCount(&mut self) -> UINT, + fn GetMovcInstructionCount(&mut self) -> UINT, + fn GetConversionInstructionCount(&mut self) -> UINT, + fn GetBitwiseInstructionCount(&mut self) -> UINT, + fn GetGSInputPrimitive(&mut self) -> D3D_PRIMITIVE, + fn IsSampleFrequencyShader(&mut self) -> BOOL, + fn GetNumInterfaceSlots(&mut self) -> UINT, + fn GetMinFeatureLevel(&mut self, pLevel: *mut D3D_FEATURE_LEVEL) -> HRESULT, + fn GetThreadGroupSize( + &mut self, pSizeX: *mut UINT, pSizeY: *mut UINT, pSizeZ: *mut UINT + ) -> UINT, + fn GetRequiresFlags(&mut self) -> UINT64 +}} +RIDL!{interface ID3D11LibraryReflection(ID3D11LibraryReflectionVtbl): IUnknown(IUnknownVtbl) { + fn GetDesc(&mut self, pDesc: *mut D3D11_LIBRARY_DESC) -> HRESULT, + fn GetFunctionByIndex(&mut self, FunctionIndex: INT) -> *mut ID3D11FunctionReflection +}} +RIDL!{interface ID3D11FunctionReflection(ID3D11FunctionReflectionVtbl) { + fn GetDesc(&mut self, pDesc: *mut D3D11_FUNCTION_DESC) -> HRESULT, + fn GetConstantBufferByIndex( + &mut self, BufferIndex: UINT + ) -> *mut ID3D11ShaderReflectionConstantBuffer, + fn GetConstantBufferByName( + &mut self, Name: LPCSTR + ) -> *mut ID3D11ShaderReflectionConstantBuffer, + fn GetResourceBindingDesc( + &mut self, ResourceIndex: UINT, pDesc: *mut D3D11_SHADER_INPUT_BIND_DESC + ) -> HRESULT, + fn GetVariableByName(&mut self, Name: LPCSTR) -> *mut ID3D11ShaderReflectionVariable, + fn GetResourceBindingDescByName( + &mut self, Name: LPCSTR, pDesc: *mut D3D11_SHADER_INPUT_BIND_DESC + ) -> HRESULT, + fn GetFunctionParameter( + &mut self, ParameterIndex: INT + ) -> *mut ID3D11FunctionParameterReflection +}} +RIDL!{interface ID3D11FunctionParameterReflection(ID3D11FunctionParameterReflectionVtbl) { + fn GetDesc(&mut self, pDesc: *mut D3D11_PARAMETER_DESC) -> HRESULT +}} +RIDL!{interface ID3D11Module(ID3D11ModuleVtbl): IUnknown(IUnknownVtbl) { + fn CreateInstance( + &mut self, pNamespace: LPCSTR, ppModuleInstance: *mut *mut ID3D11ModuleInstance + ) -> HRESULT +}} +RIDL!{interface ID3D11ModuleInstance(ID3D11ModuleInstanceVtbl): IUnknown(IUnknownVtbl) { + fn BindConstantBuffer(&mut self, uSrcSlot: UINT, uDstSlot: UINT, cbDstOffset: UINT) -> HRESULT, + fn BindConstantBufferByName( + &mut self, pName: LPCSTR, uDstSlot: UINT, cbDstOffset: UINT + ) -> HRESULT, + fn BindResource(&mut self, uSrcSlot: UINT, uDstSlot: UINT, uCount: UINT) -> HRESULT, + fn BindResourceByName(&mut self, pName: LPCSTR, uDstSlot: UINT, uCount: UINT) -> HRESULT, + fn BindSampler(&mut self, uSrcSlot: UINT, uDstSlot: UINT, uCount: UINT) -> HRESULT, + fn BindSamplerByName(&mut self, pName: LPCSTR, uDstSlot: UINT, uCount: UINT) -> HRESULT, + fn BindUnorderedAccessView(&mut self, uSrcSlot: UINT, uDstSlot: UINT, uCount: UINT) -> HRESULT, + fn BindUnorderedAccessViewByName( + &mut self, pName: LPCSTR, uDstSlot: UINT, uCount: UINT + ) -> HRESULT, + fn BindResourceAsUnorderedAccessView( + &mut self, uSrcSrvSlot: UINT, uDstUavSlot: UINT, uCount: UINT + ) -> HRESULT, + fn BindResourceAsUnorderedAccessViewByName( + &mut self, pSrvName: LPCSTR, uDstUavSlot: UINT, uCount: UINT + ) -> HRESULT +}} +RIDL!{interface ID3D11Linker(ID3D11LinkerVtbl): IUnknown(IUnknownVtbl) { + fn Link( + &mut self, pEntry: *mut ID3D11ModuleInstance, pEntryName: LPCSTR, pTargetName: LPCSTR, + uFlags: UINT, ppShaderBlob: *mut *mut ID3DBlob, ppErrorBuffer: *mut *mut ID3DBlob + ) -> HRESULT, + fn UseLibrary(&mut self, pLibraryMI: *mut ID3D11ModuleInstance) -> HRESULT, + fn AddClipPlaneFromCBuffer(&mut self, uCBufferSlot: UINT, uCBufferEntry: UINT) -> HRESULT +}} +RIDL!{interface ID3D11LinkingNode(ID3D11LinkingNodeVtbl): IUnknown(IUnknownVtbl) {}} +RIDL!{interface ID3D11FunctionLinkingGraph(ID3D11FunctionLinkingGraphVtbl): IUnknown(IUnknownVtbl) { + fn CreateModuleInstance( + &mut self, ppModuleInstance: *mut *mut ID3D11ModuleInstance, + ppErrorBuffer: *mut *mut ID3DBlob + ) -> HRESULT, + fn SetInputSignature( + &mut self, pInputParameters: *const D3D11_PARAMETER_DESC, cInputParameters: UINT, + ppInputNode: *mut *mut ID3D11LinkingNode + ) -> HRESULT, + fn SetOutputSignature( + &mut self, pOutputParameters: *const D3D11_PARAMETER_DESC, cOutputParameters: UINT, + ppOutputNode: *mut *mut ID3D11LinkingNode + ) -> HRESULT, + fn CallFunction( + &mut self, pModuleInstanceNamespace: LPCSTR, + pModuleWithFunctionPrototype: *mut ID3D11Module, pFunctionName: LPCSTR, + ppCallNode: *mut *mut ID3D11LinkingNode + ) -> HRESULT, + fn PassValue( + &mut self, pSrcNode: *mut ID3D11LinkingNode, SrcParameterIndex: INT, + pDstNode: *mut ID3D11LinkingNode, DstParameterIndex: INT + ) -> HRESULT, + fn PassValueWithSwizzle( + &mut self, pSrcNode: *mut ID3D11LinkingNode, SrcParameterIndex: INT, pSrcSwizzle: LPCSTR, + pDstNode: *mut ID3D11LinkingNode, DstParameterIndex: INT, pDstSwizzle: LPCSTR + ) -> HRESULT, + fn GetLastError(&mut self, ppErrorBuffer: *mut *mut ID3DBlob) -> HRESULT, + fn GenerateHlsl(&mut self, uFlags: UINT, ppBuffer: *mut *mut ID3DBlob) -> HRESULT +}} diff --git a/deps/winapi-0.2.6/src/d3d12.rs b/deps/winapi-0.2.6/src/d3d12.rs new file mode 100644 index 000000000..ac6ae3bdd --- /dev/null +++ b/deps/winapi-0.2.6/src/d3d12.rs @@ -0,0 +1,2324 @@ +// Copyright © 2015, Dmitry Roschin +// Licensed under the MIT License <LICENSE.md> +pub const D3D12_16BIT_INDEX_STRIP_CUT_VALUE: ::UINT = 0xffff; +pub const D3D12_32BIT_INDEX_STRIP_CUT_VALUE: ::UINT = 0xffffffff; +pub const D3D12_8BIT_INDEX_STRIP_CUT_VALUE: ::UINT = 0xff; +pub const D3D12_ANISOTROPIC_FILTERING_BIT: ::UINT = 0x40; +pub const D3D12_APPEND_ALIGNED_ELEMENT: ::UINT = 0xffffffff; +pub const D3D12_ARRAY_AXIS_ADDRESS_RANGE_BIT_COUNT: ::UINT = 9; +pub const D3D12_CLIP_OR_CULL_DISTANCE_COUNT: ::UINT = 8; +pub const D3D12_CLIP_OR_CULL_DISTANCE_ELEMENT_COUNT: ::UINT = 2; +pub const D3D12_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT: ::UINT = 14; +pub const D3D12_COMMONSHADER_CONSTANT_BUFFER_COMPONENTS: ::UINT = 4; +pub const D3D12_COMMONSHADER_CONSTANT_BUFFER_COMPONENT_BIT_COUNT: ::UINT = 32; +pub const D3D12_COMMONSHADER_CONSTANT_BUFFER_HW_SLOT_COUNT: ::UINT = 15; +pub const D3D12_COMMONSHADER_CONSTANT_BUFFER_PARTIAL_UPDATE_EXTENTS_BYTE_ALIGNMENT: ::UINT = 16; +pub const D3D12_COMMONSHADER_CONSTANT_BUFFER_REGISTER_COMPONENTS: ::UINT = 4; +pub const D3D12_COMMONSHADER_CONSTANT_BUFFER_REGISTER_COUNT: ::UINT = 15; +pub const D3D12_COMMONSHADER_CONSTANT_BUFFER_REGISTER_READS_PER_INST: ::UINT = 1; +pub const D3D12_COMMONSHADER_CONSTANT_BUFFER_REGISTER_READ_PORTS: ::UINT = 1; +pub const D3D12_COMMONSHADER_FLOWCONTROL_NESTING_LIMIT: ::UINT = 64; +pub const D3D12_COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_COMPONENTS: ::UINT = 4; +pub const D3D12_COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_COUNT: ::UINT = 1; +pub const D3D12_COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_READS_PER_INST: ::UINT = 1; +pub const D3D12_COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_READ_PORTS: ::UINT = 1; +pub const D3D12_COMMONSHADER_IMMEDIATE_VALUE_COMPONENT_BIT_COUNT: ::UINT = 32; +pub const D3D12_COMMONSHADER_INPUT_RESOURCE_REGISTER_COMPONENTS: ::UINT = 1; +pub const D3D12_COMMONSHADER_INPUT_RESOURCE_REGISTER_COUNT: ::UINT = 128; +pub const D3D12_COMMONSHADER_INPUT_RESOURCE_REGISTER_READS_PER_INST: ::UINT = 1; +pub const D3D12_COMMONSHADER_INPUT_RESOURCE_REGISTER_READ_PORTS: ::UINT = 1; +pub const D3D12_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT: ::UINT = 128; +pub const D3D12_COMMONSHADER_SAMPLER_REGISTER_COMPONENTS: ::UINT = 1; +pub const D3D12_COMMONSHADER_SAMPLER_REGISTER_COUNT: ::UINT = 16; +pub const D3D12_COMMONSHADER_SAMPLER_REGISTER_READS_PER_INST: ::UINT = 1; +pub const D3D12_COMMONSHADER_SAMPLER_REGISTER_READ_PORTS: ::UINT = 1; +pub const D3D12_COMMONSHADER_SAMPLER_SLOT_COUNT: ::UINT = 16; +pub const D3D12_COMMONSHADER_SUBROUTINE_NESTING_LIMIT: ::UINT = 32; +pub const D3D12_COMMONSHADER_TEMP_REGISTER_COMPONENTS: ::UINT = 4; +pub const D3D12_COMMONSHADER_TEMP_REGISTER_COMPONENT_BIT_COUNT: ::UINT = 32; +pub const D3D12_COMMONSHADER_TEMP_REGISTER_COUNT: ::UINT = 4096; +pub const D3D12_COMMONSHADER_TEMP_REGISTER_READS_PER_INST: ::UINT = 3; +pub const D3D12_COMMONSHADER_TEMP_REGISTER_READ_PORTS: ::UINT = 3; +pub const D3D12_COMMONSHADER_TEXCOORD_RANGE_REDUCTION_MAX: ::UINT = 10; +pub const D3D12_COMMONSHADER_TEXCOORD_RANGE_REDUCTION_MIN: ::INT = -10; +pub const D3D12_COMMONSHADER_TEXEL_OFFSET_MAX_NEGATIVE: ::INT = -8; +pub const D3D12_COMMONSHADER_TEXEL_OFFSET_MAX_POSITIVE: ::UINT = 7; +pub const D3D12_CONSTANT_BUFFER_DATA_PLACEMENT_ALIGNMENT: ::UINT = 256; +pub const D3D12_CS_4_X_BUCKET00_MAX_BYTES_TGSM_WRITABLE_PER_THREAD: ::UINT = 256; +pub const D3D12_CS_4_X_BUCKET00_MAX_NUM_THREADS_PER_GROUP: ::UINT = 64; +pub const D3D12_CS_4_X_BUCKET01_MAX_BYTES_TGSM_WRITABLE_PER_THREAD: ::UINT = 240; +pub const D3D12_CS_4_X_BUCKET01_MAX_NUM_THREADS_PER_GROUP: ::UINT = 68; +pub const D3D12_CS_4_X_BUCKET02_MAX_BYTES_TGSM_WRITABLE_PER_THREAD: ::UINT = 224; +pub const D3D12_CS_4_X_BUCKET02_MAX_NUM_THREADS_PER_GROUP: ::UINT = 72; +pub const D3D12_CS_4_X_BUCKET03_MAX_BYTES_TGSM_WRITABLE_PER_THREAD: ::UINT = 208; +pub const D3D12_CS_4_X_BUCKET03_MAX_NUM_THREADS_PER_GROUP: ::UINT = 76; +pub const D3D12_CS_4_X_BUCKET04_MAX_BYTES_TGSM_WRITABLE_PER_THREAD: ::UINT = 192; +pub const D3D12_CS_4_X_BUCKET04_MAX_NUM_THREADS_PER_GROUP: ::UINT = 84; +pub const D3D12_CS_4_X_BUCKET05_MAX_BYTES_TGSM_WRITABLE_PER_THREAD: ::UINT = 176; +pub const D3D12_CS_4_X_BUCKET05_MAX_NUM_THREADS_PER_GROUP: ::UINT = 92; +pub const D3D12_CS_4_X_BUCKET06_MAX_BYTES_TGSM_WRITABLE_PER_THREAD: ::UINT = 160; +pub const D3D12_CS_4_X_BUCKET06_MAX_NUM_THREADS_PER_GROUP: ::UINT = 100; +pub const D3D12_CS_4_X_BUCKET07_MAX_BYTES_TGSM_WRITABLE_PER_THREAD: ::UINT = 144; +pub const D3D12_CS_4_X_BUCKET07_MAX_NUM_THREADS_PER_GROUP: ::UINT = 112; +pub const D3D12_CS_4_X_BUCKET08_MAX_BYTES_TGSM_WRITABLE_PER_THREAD: ::UINT = 128; +pub const D3D12_CS_4_X_BUCKET08_MAX_NUM_THREADS_PER_GROUP: ::UINT = 128; +pub const D3D12_CS_4_X_BUCKET09_MAX_BYTES_TGSM_WRITABLE_PER_THREAD: ::UINT = 112; +pub const D3D12_CS_4_X_BUCKET09_MAX_NUM_THREADS_PER_GROUP: ::UINT = 144; +pub const D3D12_CS_4_X_BUCKET10_MAX_BYTES_TGSM_WRITABLE_PER_THREAD: ::UINT = 96; +pub const D3D12_CS_4_X_BUCKET10_MAX_NUM_THREADS_PER_GROUP: ::UINT = 168; +pub const D3D12_CS_4_X_BUCKET11_MAX_BYTES_TGSM_WRITABLE_PER_THREAD: ::UINT = 80; +pub const D3D12_CS_4_X_BUCKET11_MAX_NUM_THREADS_PER_GROUP: ::UINT = 204; +pub const D3D12_CS_4_X_BUCKET12_MAX_BYTES_TGSM_WRITABLE_PER_THREAD: ::UINT = 64; +pub const D3D12_CS_4_X_BUCKET12_MAX_NUM_THREADS_PER_GROUP: ::UINT = 256; +pub const D3D12_CS_4_X_BUCKET13_MAX_BYTES_TGSM_WRITABLE_PER_THREAD: ::UINT = 48; +pub const D3D12_CS_4_X_BUCKET13_MAX_NUM_THREADS_PER_GROUP: ::UINT = 340; +pub const D3D12_CS_4_X_BUCKET14_MAX_BYTES_TGSM_WRITABLE_PER_THREAD: ::UINT = 32; +pub const D3D12_CS_4_X_BUCKET14_MAX_NUM_THREADS_PER_GROUP: ::UINT = 512; +pub const D3D12_CS_4_X_BUCKET15_MAX_BYTES_TGSM_WRITABLE_PER_THREAD: ::UINT = 16; +pub const D3D12_CS_4_X_BUCKET15_MAX_NUM_THREADS_PER_GROUP: ::UINT = 768; +pub const D3D12_CS_4_X_DISPATCH_MAX_THREAD_GROUPS_IN_Z_DIMENSION: ::UINT = 1; +pub const D3D12_CS_4_X_RAW_UAV_BYTE_ALIGNMENT: ::UINT = 256; +pub const D3D12_CS_4_X_THREAD_GROUP_MAX_THREADS_PER_GROUP: ::UINT = 768; +pub const D3D12_CS_4_X_THREAD_GROUP_MAX_X: ::UINT = 768; +pub const D3D12_CS_4_X_THREAD_GROUP_MAX_Y: ::UINT = 768; +pub const D3D12_CS_4_X_UAV_REGISTER_COUNT: ::UINT = 1; +pub const D3D12_CS_DISPATCH_MAX_THREAD_GROUPS_PER_DIMENSION: ::UINT = 65535; +pub const D3D12_CS_TGSM_REGISTER_COUNT: ::UINT = 8192; +pub const D3D12_CS_TGSM_REGISTER_READS_PER_INST: ::UINT = 1; +pub const D3D12_CS_TGSM_RESOURCE_REGISTER_COMPONENTS: ::UINT = 1; +pub const D3D12_CS_TGSM_RESOURCE_REGISTER_READ_PORTS: ::UINT = 1; +pub const D3D12_CS_THREADGROUPID_REGISTER_COMPONENTS: ::UINT = 3; +pub const D3D12_CS_THREADGROUPID_REGISTER_COUNT: ::UINT = 1; +pub const D3D12_CS_THREADIDINGROUPFLATTENED_REGISTER_COMPONENTS: ::UINT = 1; +pub const D3D12_CS_THREADIDINGROUPFLATTENED_REGISTER_COUNT: ::UINT = 1; +pub const D3D12_CS_THREADIDINGROUP_REGISTER_COMPONENTS: ::UINT = 3; +pub const D3D12_CS_THREADIDINGROUP_REGISTER_COUNT: ::UINT = 1; +pub const D3D12_CS_THREADID_REGISTER_COMPONENTS: ::UINT = 3; +pub const D3D12_CS_THREADID_REGISTER_COUNT: ::UINT = 1; +pub const D3D12_CS_THREAD_GROUP_MAX_THREADS_PER_GROUP: ::UINT = 1024; +pub const D3D12_CS_THREAD_GROUP_MAX_X: ::UINT = 1024; +pub const D3D12_CS_THREAD_GROUP_MAX_Y: ::UINT = 1024; +pub const D3D12_CS_THREAD_GROUP_MAX_Z: ::UINT = 64; +pub const D3D12_CS_THREAD_GROUP_MIN_X: ::UINT = 1; +pub const D3D12_CS_THREAD_GROUP_MIN_Y: ::UINT = 1; +pub const D3D12_CS_THREAD_GROUP_MIN_Z: ::UINT = 1; +pub const D3D12_CS_THREAD_LOCAL_TEMP_REGISTER_POOL: ::UINT = 16384; +pub const D3D12_DEFAULT_BLEND_FACTOR_ALPHA: ::FLOAT = 1.0; +pub const D3D12_DEFAULT_BLEND_FACTOR_BLUE: ::FLOAT = 1.0; +pub const D3D12_DEFAULT_BLEND_FACTOR_GREEN: ::FLOAT = 1.0; +pub const D3D12_DEFAULT_BLEND_FACTOR_RED: ::FLOAT = 1.0; +pub const D3D12_DEFAULT_BORDER_COLOR_COMPONENT: ::FLOAT = 0.0; +pub const D3D12_DEFAULT_DEPTH_BIAS: ::UINT = 0; +pub const D3D12_DEFAULT_DEPTH_BIAS_CLAMP: ::FLOAT = 0.0; +pub const D3D12_DEFAULT_MAX_ANISOTROPY: ::UINT = 16; +pub const D3D12_DEFAULT_MIP_LOD_BIAS: ::FLOAT = 0.0; +pub const D3D12_DEFAULT_MSAA_RESOURCE_PLACEMENT_ALIGNMENT: ::UINT = 4194304; +pub const D3D12_DEFAULT_RENDER_TARGET_ARRAY_INDEX: ::UINT = 0; +pub const D3D12_DEFAULT_RESOURCE_PLACEMENT_ALIGNMENT: ::UINT = 65536; +pub const D3D12_DEFAULT_SAMPLE_MASK: ::UINT = 0xffffffff; +pub const D3D12_DEFAULT_SCISSOR_ENDX: ::UINT = 0; +pub const D3D12_DEFAULT_SCISSOR_ENDY: ::UINT = 0; +pub const D3D12_DEFAULT_SCISSOR_STARTX: ::UINT = 0; +pub const D3D12_DEFAULT_SCISSOR_STARTY: ::UINT = 0; +pub const D3D12_DEFAULT_SLOPE_SCALED_DEPTH_BIAS: ::FLOAT = 0.0; +pub const D3D12_DEFAULT_STENCIL_READ_MASK: ::UINT = 0xff; +pub const D3D12_DEFAULT_STENCIL_REFERENCE: ::UINT = 0; +pub const D3D12_DEFAULT_STENCIL_WRITE_MASK: ::UINT = 0xff; +pub const D3D12_DEFAULT_VIEWPORT_AND_SCISSORRECT_INDEX: ::UINT = 0; +pub const D3D12_DEFAULT_VIEWPORT_HEIGHT: ::UINT = 0; +pub const D3D12_DEFAULT_VIEWPORT_MAX_DEPTH: ::FLOAT = 0.0; +pub const D3D12_DEFAULT_VIEWPORT_MIN_DEPTH: ::FLOAT = 0.0; +pub const D3D12_DEFAULT_VIEWPORT_TOPLEFTX: ::UINT = 0; +pub const D3D12_DEFAULT_VIEWPORT_TOPLEFTY: ::UINT = 0; +pub const D3D12_DEFAULT_VIEWPORT_WIDTH: ::UINT = 0; +pub const D3D12_DESCRIPTOR_RANGE_OFFSET_APPEND: ::UINT = 0xffffffff; +pub const D3D12_DRIVER_RESERVED_REGISTER_SPACE_VALUES_END: ::UINT = 0xfffffff7; +pub const D3D12_DRIVER_RESERVED_REGISTER_SPACE_VALUES_START: ::UINT = 0xfffffff0; +pub const D3D12_DS_INPUT_CONTROL_POINTS_MAX_TOTAL_SCALARS: ::UINT = 3968; +pub const D3D12_DS_INPUT_CONTROL_POINT_REGISTER_COMPONENTS: ::UINT = 4; +pub const D3D12_DS_INPUT_CONTROL_POINT_REGISTER_COMPONENT_BIT_COUNT: ::UINT = 32; +pub const D3D12_DS_INPUT_CONTROL_POINT_REGISTER_COUNT: ::UINT = 32; +pub const D3D12_DS_INPUT_CONTROL_POINT_REGISTER_READS_PER_INST: ::UINT = 2; +pub const D3D12_DS_INPUT_CONTROL_POINT_REGISTER_READ_PORTS: ::UINT = 1; +pub const D3D12_DS_INPUT_DOMAIN_POINT_REGISTER_COMPONENTS: ::UINT = 3; +pub const D3D12_DS_INPUT_DOMAIN_POINT_REGISTER_COMPONENT_BIT_COUNT: ::UINT = 32; +pub const D3D12_DS_INPUT_DOMAIN_POINT_REGISTER_COUNT: ::UINT = 1; +pub const D3D12_DS_INPUT_DOMAIN_POINT_REGISTER_READS_PER_INST: ::UINT = 2; +pub const D3D12_DS_INPUT_DOMAIN_POINT_REGISTER_READ_PORTS: ::UINT = 1; +pub const D3D12_DS_INPUT_PATCH_CONSTANT_REGISTER_COMPONENTS: ::UINT = 4; +pub const D3D12_DS_INPUT_PATCH_CONSTANT_REGISTER_COMPONENT_BIT_COUNT: ::UINT = 32; +pub const D3D12_DS_INPUT_PATCH_CONSTANT_REGISTER_COUNT: ::UINT = 32; +pub const D3D12_DS_INPUT_PATCH_CONSTANT_REGISTER_READS_PER_INST: ::UINT = 2; +pub const D3D12_DS_INPUT_PATCH_CONSTANT_REGISTER_READ_PORTS: ::UINT = 1; +pub const D3D12_DS_INPUT_PRIMITIVE_ID_REGISTER_COMPONENTS: ::UINT = 1; +pub const D3D12_DS_INPUT_PRIMITIVE_ID_REGISTER_COMPONENT_BIT_COUNT: ::UINT = 32; +pub const D3D12_DS_INPUT_PRIMITIVE_ID_REGISTER_COUNT: ::UINT = 1; +pub const D3D12_DS_INPUT_PRIMITIVE_ID_REGISTER_READS_PER_INST: ::UINT = 2; +pub const D3D12_DS_INPUT_PRIMITIVE_ID_REGISTER_READ_PORTS: ::UINT = 1; +pub const D3D12_DS_OUTPUT_REGISTER_COMPONENTS: ::UINT = 4; +pub const D3D12_DS_OUTPUT_REGISTER_COMPONENT_BIT_COUNT: ::UINT = 32; +pub const D3D12_DS_OUTPUT_REGISTER_COUNT: ::UINT = 32; +pub const D3D12_FILTER_REDUCTION_TYPE_MASK: ::UINT = 0x3; +pub const D3D12_FILTER_REDUCTION_TYPE_SHIFT: ::UINT = 7; +pub const D3D12_FILTER_TYPE_MASK: ::UINT = 0x3; +pub const D3D12_FLOAT16_FUSED_TOLERANCE_IN_ULP: ::DOUBLE = 0.6; +pub const D3D12_FLOAT32_MAX: ::FLOAT = 3.402823466e+38; +pub const D3D12_FLOAT32_TO_INTEGER_TOLERANCE_IN_ULP: ::FLOAT = 0.6; +pub const D3D12_FLOAT_TO_SRGB_EXPONENT_DENOMINATOR: ::FLOAT = 2.4; +pub const D3D12_FLOAT_TO_SRGB_EXPONENT_NUMERATOR: ::FLOAT = 1.0; +pub const D3D12_FLOAT_TO_SRGB_OFFSET: ::FLOAT = 0.055; +pub const D3D12_FLOAT_TO_SRGB_SCALE_1: ::FLOAT = 12.92; +pub const D3D12_FLOAT_TO_SRGB_SCALE_2: ::FLOAT = 1.055; +pub const D3D12_FLOAT_TO_SRGB_THRESHOLD: ::FLOAT = 0.0031308; +pub const D3D12_FTOI_INSTRUCTION_MAX_INPUT: ::FLOAT = 2147483647.999; +pub const D3D12_FTOI_INSTRUCTION_MIN_INPUT: ::FLOAT = -2147483648.999; +pub const D3D12_FTOU_INSTRUCTION_MAX_INPUT: ::FLOAT = 4294967295.999; +pub const D3D12_FTOU_INSTRUCTION_MIN_INPUT: ::FLOAT = 0.0; +pub const D3D12_GS_INPUT_INSTANCE_ID_READS_PER_INST: ::UINT = 2; +pub const D3D12_GS_INPUT_INSTANCE_ID_READ_PORTS: ::UINT = 1; +pub const D3D12_GS_INPUT_INSTANCE_ID_REGISTER_COMPONENTS: ::UINT = 1; +pub const D3D12_GS_INPUT_INSTANCE_ID_REGISTER_COMPONENT_BIT_COUNT: ::UINT = 32; +pub const D3D12_GS_INPUT_INSTANCE_ID_REGISTER_COUNT: ::UINT = 1; +pub const D3D12_GS_INPUT_PRIM_CONST_REGISTER_COMPONENTS: ::UINT = 1; +pub const D3D12_GS_INPUT_PRIM_CONST_REGISTER_COMPONENT_BIT_COUNT: ::UINT = 32; +pub const D3D12_GS_INPUT_PRIM_CONST_REGISTER_COUNT: ::UINT = 1; +pub const D3D12_GS_INPUT_PRIM_CONST_REGISTER_READS_PER_INST: ::UINT = 2; +pub const D3D12_GS_INPUT_PRIM_CONST_REGISTER_READ_PORTS: ::UINT = 1; +pub const D3D12_GS_INPUT_REGISTER_COMPONENTS: ::UINT = 4; +pub const D3D12_GS_INPUT_REGISTER_COMPONENT_BIT_COUNT: ::UINT = 32; +pub const D3D12_GS_INPUT_REGISTER_COUNT: ::UINT = 32; +pub const D3D12_GS_INPUT_REGISTER_READS_PER_INST: ::UINT = 2; +pub const D3D12_GS_INPUT_REGISTER_READ_PORTS: ::UINT = 1; +pub const D3D12_GS_INPUT_REGISTER_VERTICES: ::UINT = 32; +pub const D3D12_GS_MAX_INSTANCE_COUNT: ::UINT = 32; +pub const D3D12_GS_MAX_OUTPUT_VERTEX_COUNT_ACROSS_INSTANCES: ::UINT = 1024; +pub const D3D12_GS_OUTPUT_ELEMENTS: ::UINT = 32; +pub const D3D12_GS_OUTPUT_REGISTER_COMPONENTS: ::UINT = 4; +pub const D3D12_GS_OUTPUT_REGISTER_COMPONENT_BIT_COUNT: ::UINT = 32; +pub const D3D12_GS_OUTPUT_REGISTER_COUNT: ::UINT = 32; +pub const D3D12_HS_CONTROL_POINT_PHASE_INPUT_REGISTER_COUNT: ::UINT = 32; +pub const D3D12_HS_CONTROL_POINT_PHASE_OUTPUT_REGISTER_COUNT: ::UINT = 32; +pub const D3D12_HS_CONTROL_POINT_REGISTER_COMPONENTS: ::UINT = 4; +pub const D3D12_HS_CONTROL_POINT_REGISTER_COMPONENT_BIT_COUNT: ::UINT = 32; +pub const D3D12_HS_CONTROL_POINT_REGISTER_READS_PER_INST: ::UINT = 2; +pub const D3D12_HS_CONTROL_POINT_REGISTER_READ_PORTS: ::UINT = 1; +pub const D3D12_HS_FORK_PHASE_INSTANCE_COUNT_UPPER_BOUND: ::UINT = 0xffffffff; +pub const D3D12_HS_INPUT_FORK_INSTANCE_ID_REGISTER_COMPONENTS: ::UINT = 1; +pub const D3D12_HS_INPUT_FORK_INSTANCE_ID_REGISTER_COMPONENT_BIT_COUNT: ::UINT = 32; +pub const D3D12_HS_INPUT_FORK_INSTANCE_ID_REGISTER_COUNT: ::UINT = 1; +pub const D3D12_HS_INPUT_FORK_INSTANCE_ID_REGISTER_READS_PER_INST: ::UINT = 2; +pub const D3D12_HS_INPUT_FORK_INSTANCE_ID_REGISTER_READ_PORTS: ::UINT = 1; +pub const D3D12_HS_INPUT_JOIN_INSTANCE_ID_REGISTER_COMPONENTS: ::UINT = 1; +pub const D3D12_HS_INPUT_JOIN_INSTANCE_ID_REGISTER_COMPONENT_BIT_COUNT: ::UINT = 32; +pub const D3D12_HS_INPUT_JOIN_INSTANCE_ID_REGISTER_COUNT: ::UINT = 1; +pub const D3D12_HS_INPUT_JOIN_INSTANCE_ID_REGISTER_READS_PER_INST: ::UINT = 2; +pub const D3D12_HS_INPUT_JOIN_INSTANCE_ID_REGISTER_READ_PORTS: ::UINT = 1; +pub const D3D12_HS_INPUT_PRIMITIVE_ID_REGISTER_COMPONENTS: ::UINT = 1; +pub const D3D12_HS_INPUT_PRIMITIVE_ID_REGISTER_COMPONENT_BIT_COUNT: ::UINT = 32; +pub const D3D12_HS_INPUT_PRIMITIVE_ID_REGISTER_COUNT: ::UINT = 1; +pub const D3D12_HS_INPUT_PRIMITIVE_ID_REGISTER_READS_PER_INST: ::UINT = 2; +pub const D3D12_HS_INPUT_PRIMITIVE_ID_REGISTER_READ_PORTS: ::UINT = 1; +pub const D3D12_HS_JOIN_PHASE_INSTANCE_COUNT_UPPER_BOUND: ::UINT = 0xffffffff; +pub const D3D12_HS_MAXTESSFACTOR_LOWER_BOUND: ::FLOAT = 1.0; +pub const D3D12_HS_MAXTESSFACTOR_UPPER_BOUND: ::FLOAT = 64.0; +pub const D3D12_HS_OUTPUT_CONTROL_POINTS_MAX_TOTAL_SCALARS: ::UINT = 3968; +pub const D3D12_HS_OUTPUT_CONTROL_POINT_ID_REGISTER_COMPONENTS: ::UINT = 1; +pub const D3D12_HS_OUTPUT_CONTROL_POINT_ID_REGISTER_COMPONENT_BIT_COUNT: ::UINT = 32; +pub const D3D12_HS_OUTPUT_CONTROL_POINT_ID_REGISTER_COUNT: ::UINT = 1; +pub const D3D12_HS_OUTPUT_CONTROL_POINT_ID_REGISTER_READS_PER_INST: ::UINT = 2; +pub const D3D12_HS_OUTPUT_CONTROL_POINT_ID_REGISTER_READ_PORTS: ::UINT = 1; +pub const D3D12_HS_OUTPUT_PATCH_CONSTANT_REGISTER_COMPONENTS: ::UINT = 4; +pub const D3D12_HS_OUTPUT_PATCH_CONSTANT_REGISTER_COMPONENT_BIT_COUNT: ::UINT = 32; +pub const D3D12_HS_OUTPUT_PATCH_CONSTANT_REGISTER_COUNT: ::UINT = 32; +pub const D3D12_HS_OUTPUT_PATCH_CONSTANT_REGISTER_READS_PER_INST: ::UINT = 2; +pub const D3D12_HS_OUTPUT_PATCH_CONSTANT_REGISTER_READ_PORTS: ::UINT = 1; +pub const D3D12_HS_OUTPUT_PATCH_CONSTANT_REGISTER_SCALAR_COMPONENTS: ::UINT = 128; +pub const D3D12_IA_DEFAULT_INDEX_BUFFER_OFFSET_IN_BYTES: ::UINT = 0; +pub const D3D12_IA_DEFAULT_PRIMITIVE_TOPOLOGY: ::UINT = 0; +pub const D3D12_IA_DEFAULT_VERTEX_BUFFER_OFFSET_IN_BYTES: ::UINT = 0; +pub const D3D12_IA_INDEX_INPUT_RESOURCE_SLOT_COUNT: ::UINT = 1; +pub const D3D12_IA_INSTANCE_ID_BIT_COUNT: ::UINT = 32; +pub const D3D12_IA_INTEGER_ARITHMETIC_BIT_COUNT: ::UINT = 32; +pub const D3D12_IA_PATCH_MAX_CONTROL_POINT_COUNT: ::UINT = 32; +pub const D3D12_IA_PRIMITIVE_ID_BIT_COUNT: ::UINT = 32; +pub const D3D12_IA_VERTEX_ID_BIT_COUNT: ::UINT = 32; +pub const D3D12_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT: ::UINT = 32; +pub const D3D12_IA_VERTEX_INPUT_STRUCTURE_ELEMENTS_COMPONENTS: ::UINT = 128; +pub const D3D12_IA_VERTEX_INPUT_STRUCTURE_ELEMENT_COUNT: ::UINT = 32; +pub const D3D12_INTEGER_DIVIDE_BY_ZERO_QUOTIENT: ::UINT = 0xffffffff; +pub const D3D12_INTEGER_DIVIDE_BY_ZERO_REMAINDER: ::UINT = 0xffffffff; +pub const D3D12_KEEP_RENDER_TARGETS_AND_DEPTH_STENCIL: ::UINT = 0xffffffff; +pub const D3D12_KEEP_UNORDERED_ACCESS_VIEWS: ::UINT = 0xffffffff; +pub const D3D12_LINEAR_GAMMA: ::FLOAT = 1.0; +pub const D3D12_MAG_FILTER_SHIFT: ::UINT = 2; +pub const D3D12_MAJOR_VERSION: ::UINT = 12; +pub const D3D12_MAX_BORDER_COLOR_COMPONENT: ::FLOAT = 1.0; +pub const D3D12_MAX_DEPTH: ::FLOAT = 1.0; +pub const D3D12_MAX_LIVE_STATIC_SAMPLERS: ::UINT = 2032; +pub const D3D12_MAX_MAXANISOTROPY: ::UINT = 16; +pub const D3D12_MAX_MULTISAMPLE_SAMPLE_COUNT: ::UINT = 32; +pub const D3D12_MAX_POSITION_VALUE: ::FLOAT = 3.402823466e+34; +pub const D3D12_MAX_ROOT_COST: ::UINT = 64; +pub const D3D12_MAX_SHADER_VISIBLE_DESCRIPTOR_HEAP_SIZE_TIER_1: ::UINT = 1000000; +pub const D3D12_MAX_SHADER_VISIBLE_DESCRIPTOR_HEAP_SIZE_TIER_2: ::UINT = 1000000; +pub const D3D12_MAX_SHADER_VISIBLE_SAMPLER_HEAP_SIZE: ::UINT = 2048; +pub const D3D12_MAX_TEXTURE_DIMENSION_2_TO_EXP: ::UINT = 17; +pub const D3D12_MINOR_VERSION: ::UINT = 0; +pub const D3D12_MIN_BORDER_COLOR_COMPONENT: ::FLOAT = 0.0; +pub const D3D12_MIN_DEPTH: ::FLOAT = 0.0; +pub const D3D12_MIN_FILTER_SHIFT: ::UINT = 4; +pub const D3D12_MIN_MAXANISOTROPY: ::UINT = 0; +pub const D3D12_MIP_FILTER_SHIFT: ::UINT = 0; +pub const D3D12_MIP_LOD_BIAS_MAX: ::FLOAT = 15.99; +pub const D3D12_MIP_LOD_BIAS_MIN: ::FLOAT = -16.0; +pub const D3D12_MIP_LOD_FRACTIONAL_BIT_COUNT: ::UINT = 8; +pub const D3D12_MIP_LOD_RANGE_BIT_COUNT: ::UINT = 8; +pub const D3D12_MULTISAMPLE_ANTIALIAS_LINE_WIDTH: ::FLOAT = 1.4; +pub const D3D12_NONSAMPLE_FETCH_OUT_OF_RANGE_ACCESS_RESULT: ::UINT = 0; +pub const D3D12_OS_RESERVED_REGISTER_SPACE_VALUES_END: ::UINT = 0xffffffff; +pub const D3D12_OS_RESERVED_REGISTER_SPACE_VALUES_START: ::UINT = 0xfffffff8; +pub const D3D12_PACKED_TILE: ::UINT = 0xffffffff; +pub const D3D12_PIXEL_ADDRESS_RANGE_BIT_COUNT: ::UINT = 15; +pub const D3D12_PRE_SCISSOR_PIXEL_ADDRESS_RANGE_BIT_COUNT: ::UINT = 16; +pub const D3D12_PS_CS_UAV_REGISTER_COMPONENTS: ::UINT = 1; +pub const D3D12_PS_CS_UAV_REGISTER_COUNT: ::UINT = 8; +pub const D3D12_PS_CS_UAV_REGISTER_READS_PER_INST: ::UINT = 1; +pub const D3D12_PS_CS_UAV_REGISTER_READ_PORTS: ::UINT = 1; +pub const D3D12_PS_FRONTFACING_DEFAULT_VALUE: ::UINT = 0xffffffff; +pub const D3D12_PS_FRONTFACING_FALSE_VALUE: ::UINT = 0; +pub const D3D12_PS_FRONTFACING_TRUE_VALUE: ::UINT = 0xffffffff; +pub const D3D12_PS_INPUT_REGISTER_COMPONENTS: ::UINT = 4; +pub const D3D12_PS_INPUT_REGISTER_COMPONENT_BIT_COUNT: ::UINT = 32; +pub const D3D12_PS_INPUT_REGISTER_COUNT: ::UINT = 32; +pub const D3D12_PS_INPUT_REGISTER_READS_PER_INST: ::UINT = 2; +pub const D3D12_PS_INPUT_REGISTER_READ_PORTS: ::UINT = 1; +pub const D3D12_PS_LEGACY_PIXEL_CENTER_FRACTIONAL_COMPONENT: ::FLOAT = 0.0; +pub const D3D12_PS_OUTPUT_DEPTH_REGISTER_COMPONENTS: ::UINT = 1; +pub const D3D12_PS_OUTPUT_DEPTH_REGISTER_COMPONENT_BIT_COUNT: ::UINT = 32; +pub const D3D12_PS_OUTPUT_DEPTH_REGISTER_COUNT: ::UINT = 1; +pub const D3D12_PS_OUTPUT_MASK_REGISTER_COMPONENTS: ::UINT = 1; +pub const D3D12_PS_OUTPUT_MASK_REGISTER_COMPONENT_BIT_COUNT: ::UINT = 32; +pub const D3D12_PS_OUTPUT_MASK_REGISTER_COUNT: ::UINT = 1; +pub const D3D12_PS_OUTPUT_REGISTER_COMPONENTS: ::UINT = 4; +pub const D3D12_PS_OUTPUT_REGISTER_COMPONENT_BIT_COUNT: ::UINT = 32; +pub const D3D12_PS_OUTPUT_REGISTER_COUNT: ::UINT = 8; +pub const D3D12_PS_PIXEL_CENTER_FRACTIONAL_COMPONENT: ::FLOAT = 0.5; +pub const D3D12_RAW_UAV_SRV_BYTE_ALIGNMENT: ::UINT = 16; +pub const D3D12_REQ_BLEND_OBJECT_COUNT_PER_DEVICE: ::UINT = 4096; +pub const D3D12_REQ_BUFFER_RESOURCE_TEXEL_COUNT_2_TO_EXP: ::UINT = 27; +pub const D3D12_REQ_CONSTANT_BUFFER_ELEMENT_COUNT: ::UINT = 4096; +pub const D3D12_REQ_DEPTH_STENCIL_OBJECT_COUNT_PER_DEVICE: ::UINT = 4096; +pub const D3D12_REQ_DRAWINDEXED_INDEX_COUNT_2_TO_EXP: ::UINT = 32; +pub const D3D12_REQ_DRAW_VERTEX_COUNT_2_TO_EXP: ::UINT = 32; +pub const D3D12_REQ_FILTERING_HW_ADDRESSABLE_RESOURCE_DIMENSION: ::UINT = 16384; +pub const D3D12_REQ_GS_INVOCATION_32BIT_OUTPUT_COMPONENT_LIMIT: ::UINT = 1024; +pub const D3D12_REQ_IMMEDIATE_CONSTANT_BUFFER_ELEMENT_COUNT: ::UINT = 4096; +pub const D3D12_REQ_MAXANISOTROPY: ::UINT = 16; +pub const D3D12_REQ_MIP_LEVELS: ::UINT = 15; +pub const D3D12_REQ_MULTI_ELEMENT_STRUCTURE_SIZE_IN_BYTES: ::UINT = 2048; +pub const D3D12_REQ_RASTERIZER_OBJECT_COUNT_PER_DEVICE: ::UINT = 4096; +pub const D3D12_REQ_RENDER_TO_BUFFER_WINDOW_WIDTH: ::UINT = 16384; +pub const D3D12_REQ_RESOURCE_SIZE_IN_MEGABYTES_EXPRESSION_A_TERM: ::UINT = 128; +pub const D3D12_REQ_RESOURCE_SIZE_IN_MEGABYTES_EXPRESSION_B_TERM: ::FLOAT = 0.25; +pub const D3D12_REQ_RESOURCE_SIZE_IN_MEGABYTES_EXPRESSION_C_TERM: ::UINT = 2048; +pub const D3D12_REQ_RESOURCE_VIEW_COUNT_PER_DEVICE_2_TO_EXP: ::UINT = 20; +pub const D3D12_REQ_SAMPLER_OBJECT_COUNT_PER_DEVICE: ::UINT = 4096; +pub const D3D12_REQ_SUBRESOURCES: ::UINT = 30720; +pub const D3D12_REQ_TEXTURE1D_ARRAY_AXIS_DIMENSION: ::UINT = 2048; +pub const D3D12_REQ_TEXTURE1D_U_DIMENSION: ::UINT = 16384; +pub const D3D12_REQ_TEXTURE2D_ARRAY_AXIS_DIMENSION: ::UINT = 2048; +pub const D3D12_REQ_TEXTURE2D_U_OR_V_DIMENSION: ::UINT = 16384; +pub const D3D12_REQ_TEXTURE3D_U_V_OR_W_DIMENSION: ::UINT = 2048; +pub const D3D12_REQ_TEXTURECUBE_DIMENSION: ::UINT = 16384; +pub const D3D12_RESINFO_INSTRUCTION_MISSING_COMPONENT_RETVAL: ::UINT = 0; +pub const D3D12_RESOURCE_BARRIER_ALL_SUBRESOURCES: ::UINT = 0xffffffff; +pub const D3D12_SHADER_COMPONENT_MAPPING_MASK: ::UINT = 0x7; +pub const D3D12_SHADER_COMPONENT_MAPPING_SHIFT: ::UINT = 3; +pub const D3D12_SHADER_MAJOR_VERSION: ::UINT = 5; +pub const D3D12_SHADER_MAX_INSTANCES: ::UINT = 65535; +pub const D3D12_SHADER_MAX_INTERFACES: ::UINT = 253; +pub const D3D12_SHADER_MAX_INTERFACE_CALL_SITES: ::UINT = 4096; +pub const D3D12_SHADER_MAX_TYPES: ::UINT = 65535; +pub const D3D12_SHADER_MINOR_VERSION: ::UINT = 1; +pub const D3D12_SHIFT_INSTRUCTION_PAD_VALUE: ::UINT = 0; +pub const D3D12_SHIFT_INSTRUCTION_SHIFT_VALUE_BIT_COUNT: ::UINT = 5; +pub const D3D12_SIMULTANEOUS_RENDER_TARGET_COUNT: ::UINT = 8; +pub const D3D12_SMALL_MSAA_RESOURCE_PLACEMENT_ALIGNMENT: ::UINT = 65536; +pub const D3D12_SMALL_RESOURCE_PLACEMENT_ALIGNMENT: ::UINT = 4096; +pub const D3D12_SO_BUFFER_MAX_STRIDE_IN_BYTES: ::UINT = 2048; +pub const D3D12_SO_BUFFER_MAX_WRITE_WINDOW_IN_BYTES: ::UINT = 512; +pub const D3D12_SO_BUFFER_SLOT_COUNT: ::UINT = 4; +pub const D3D12_SO_DDI_REGISTER_INDEX_DENOTING_GAP: ::UINT = 0xffffffff; +pub const D3D12_SO_NO_RASTERIZED_STREAM: ::UINT = 0xffffffff; +pub const D3D12_SO_OUTPUT_COMPONENT_COUNT: ::UINT = 128; +pub const D3D12_SO_STREAM_COUNT: ::UINT = 4; +pub const D3D12_SPEC_DATE_DAY: ::UINT = 14; +pub const D3D12_SPEC_DATE_MONTH: ::UINT = 11; +pub const D3D12_SPEC_DATE_YEAR: ::UINT = 2014; +pub const D3D12_SPEC_VERSION: ::DOUBLE = 1.16; +pub const D3D12_SRGB_GAMMA: ::FLOAT = 2.2; +pub const D3D12_SRGB_TO_FLOAT_DENOMINATOR_1: ::FLOAT = 12.92; +pub const D3D12_SRGB_TO_FLOAT_DENOMINATOR_2: ::FLOAT = 1.055; +pub const D3D12_SRGB_TO_FLOAT_EXPONENT: ::FLOAT = 2.4; +pub const D3D12_SRGB_TO_FLOAT_OFFSET: ::FLOAT = 0.055; +pub const D3D12_SRGB_TO_FLOAT_THRESHOLD: ::FLOAT = 0.04045; +pub const D3D12_SRGB_TO_FLOAT_TOLERANCE_IN_ULP: ::FLOAT = 0.5; +pub const D3D12_STANDARD_COMPONENT_BIT_COUNT: ::UINT = 32; +pub const D3D12_STANDARD_COMPONENT_BIT_COUNT_DOUBLED: ::UINT = 64; +pub const D3D12_STANDARD_MAXIMUM_ELEMENT_ALIGNMENT_BYTE_MULTIPLE: ::UINT = 4; +pub const D3D12_STANDARD_PIXEL_COMPONENT_COUNT: ::UINT = 128; +pub const D3D12_STANDARD_PIXEL_ELEMENT_COUNT: ::UINT = 32; +pub const D3D12_STANDARD_VECTOR_SIZE: ::UINT = 4; +pub const D3D12_STANDARD_VERTEX_ELEMENT_COUNT: ::UINT = 32; +pub const D3D12_STANDARD_VERTEX_TOTAL_COMPONENT_COUNT: ::UINT = 64; +pub const D3D12_SUBPIXEL_FRACTIONAL_BIT_COUNT: ::UINT = 8; +pub const D3D12_SUBTEXEL_FRACTIONAL_BIT_COUNT: ::UINT = 8; +pub const D3D12_SYSTEM_RESERVED_REGISTER_SPACE_VALUES_END: ::UINT = 0xffffffff; +pub const D3D12_SYSTEM_RESERVED_REGISTER_SPACE_VALUES_START: ::UINT = 0xfffffff0; +pub const D3D12_TESSELLATOR_MAX_EVEN_TESSELLATION_FACTOR: ::UINT = 64; +pub const D3D12_TESSELLATOR_MAX_ISOLINE_DENSITY_TESSELLATION_FACTOR: ::UINT = 64; +pub const D3D12_TESSELLATOR_MAX_ODD_TESSELLATION_FACTOR: ::UINT = 63; +pub const D3D12_TESSELLATOR_MAX_TESSELLATION_FACTOR: ::UINT = 64; +pub const D3D12_TESSELLATOR_MIN_EVEN_TESSELLATION_FACTOR: ::UINT = 2; +pub const D3D12_TESSELLATOR_MIN_ISOLINE_DENSITY_TESSELLATION_FACTOR: ::UINT = 1; +pub const D3D12_TESSELLATOR_MIN_ODD_TESSELLATION_FACTOR: ::UINT = 1; +pub const D3D12_TEXEL_ADDRESS_RANGE_BIT_COUNT: ::UINT = 16; +pub const D3D12_TEXTURE_DATA_PITCH_ALIGNMENT: ::UINT = 256; +pub const D3D12_TEXTURE_DATA_PLACEMENT_ALIGNMENT: ::UINT = 512; +pub const D3D12_TILED_RESOURCE_TILE_SIZE_IN_BYTES: ::UINT = 65536; +pub const D3D12_UAV_COUNTER_PLACEMENT_ALIGNMENT: ::UINT = 4096; +pub const D3D12_UAV_SLOT_COUNT: ::UINT = 64; +pub const D3D12_UNBOUND_MEMORY_ACCESS_RESULT: ::UINT = 0; +pub const D3D12_VIEWPORT_AND_SCISSORRECT_MAX_INDEX: ::UINT = 15; +pub const D3D12_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE: ::UINT = 16; +pub const D3D12_VIEWPORT_BOUNDS_MAX: ::UINT = 32767; +pub const D3D12_VIEWPORT_BOUNDS_MIN: ::INT = -32768; +pub const D3D12_VS_INPUT_REGISTER_COMPONENTS: ::UINT = 4; +pub const D3D12_VS_INPUT_REGISTER_COMPONENT_BIT_COUNT: ::UINT = 32; +pub const D3D12_VS_INPUT_REGISTER_COUNT: ::UINT = 32; +pub const D3D12_VS_INPUT_REGISTER_READS_PER_INST: ::UINT = 2; +pub const D3D12_VS_INPUT_REGISTER_READ_PORTS: ::UINT = 1; +pub const D3D12_VS_OUTPUT_REGISTER_COMPONENTS: ::UINT = 4; +pub const D3D12_VS_OUTPUT_REGISTER_COMPONENT_BIT_COUNT: ::UINT = 32; +pub const D3D12_VS_OUTPUT_REGISTER_COUNT: ::UINT = 32; +pub const D3D12_WHQL_CONTEXT_COUNT_FOR_RESOURCE_LIMIT: ::UINT = 10; +pub const D3D12_WHQL_DRAWINDEXED_INDEX_COUNT_2_TO_EXP: ::UINT = 25; +pub const D3D12_WHQL_DRAW_VERTEX_COUNT_2_TO_EXP: ::UINT = 25; +pub type D3D12_GPU_VIRTUAL_ADDRESS = ::UINT64; +ENUM!{enum D3D12_COMMAND_LIST_TYPE { + D3D12_COMMAND_LIST_TYPE_DIRECT = 0, + D3D12_COMMAND_LIST_TYPE_BUNDLE = 1, + D3D12_COMMAND_LIST_TYPE_COMPUTE = 2, + D3D12_COMMAND_LIST_TYPE_COPY = 3, +}} +FLAGS!{enum D3D12_COMMAND_QUEUE_FLAGS { + D3D12_COMMAND_QUEUE_FLAG_NONE = 0x0, + D3D12_COMMAND_QUEUE_FLAG_DISABLE_GPU_TIMEOUT = 0x1, +}} +ENUM!{enum D3D12_COMMAND_QUEUE_PRIORITY { + D3D12_COMMAND_QUEUE_PRIORITY_NORMAL = 0, + D3D12_COMMAND_QUEUE_PRIORITY_HIGH = 100, +}} +STRUCT!{struct D3D12_COMMAND_QUEUE_DESC { + Type: D3D12_COMMAND_LIST_TYPE, + Priority: ::INT, + Flags: D3D12_COMMAND_QUEUE_FLAGS, + NodeMask: ::UINT, +}} +ENUM!{enum D3D12_PRIMITIVE_TOPOLOGY_TYPE { + D3D12_PRIMITIVE_TOPOLOGY_TYPE_UNDEFINED = 0, + D3D12_PRIMITIVE_TOPOLOGY_TYPE_POINT = 1, + D3D12_PRIMITIVE_TOPOLOGY_TYPE_LINE = 2, + D3D12_PRIMITIVE_TOPOLOGY_TYPE_TRIANGLE = 3, + D3D12_PRIMITIVE_TOPOLOGY_TYPE_PATCH = 4, +}} +ENUM!{enum D3D12_INPUT_CLASSIFICATION { + D3D12_INPUT_CLASSIFICATION_PER_VERTEX_DATA = 0, + D3D12_INPUT_CLASSIFICATION_PER_INSTANCE_DATA = 1, +}} +STRUCT!{struct D3D12_INPUT_ELEMENT_DESC { + SemanticName: ::LPCSTR, + SemanticIndex: ::UINT, + Format: ::DXGI_FORMAT, + InputSlot: ::UINT, + AlignedByteOffset: ::UINT, + InputSlotClass: D3D12_INPUT_CLASSIFICATION, + InstanceDataStepRate: ::UINT, +}} +ENUM!{enum D3D12_FILL_MODE { + D3D12_FILL_MODE_WIREFRAME = 2, + D3D12_FILL_MODE_SOLID = 3, +}} +pub type D3D12_PRIMITIVE_TOPOLOGY = ::D3D_PRIMITIVE_TOPOLOGY; +pub type D3D12_PRIMITIVE = ::D3D_PRIMITIVE; +ENUM!{enum D3D12_CULL_MODE { + D3D12_CULL_MODE_NONE = 1, + D3D12_CULL_MODE_FRONT = 2, + D3D12_CULL_MODE_BACK = 3, +}} +STRUCT!{struct D3D12_SO_DECLARATION_ENTRY { + Stream: ::UINT, + SemanticName: ::LPCSTR, + SemanticIndex: ::UINT, + StartComponent: ::BYTE, + ComponentCount: ::BYTE, + OutputSlot: ::BYTE, +}} +STRUCT!{struct D3D12_VIEWPORT { + TopLeftX: ::FLOAT, + TopLeftY: ::FLOAT, + Width: ::FLOAT, + Height: ::FLOAT, + MinDepth: ::FLOAT, + MaxDepth: ::FLOAT, +}} +pub type D3D12_RECT = ::RECT; +STRUCT!{struct D3D12_BOX { + left: ::UINT, + top: ::UINT, + front: ::UINT, + right: ::UINT, + bottom: ::UINT, + back: ::UINT, +}} +ENUM!{enum D3D12_COMPARISON_FUNC { + D3D12_COMPARISON_FUNC_NEVER = 1, + D3D12_COMPARISON_FUNC_LESS = 2, + D3D12_COMPARISON_FUNC_EQUAL = 3, + D3D12_COMPARISON_FUNC_LESS_EQUAL = 4, + D3D12_COMPARISON_FUNC_GREATER = 5, + D3D12_COMPARISON_FUNC_NOT_EQUAL = 6, + D3D12_COMPARISON_FUNC_GREATER_EQUAL = 7, + D3D12_COMPARISON_FUNC_ALWAYS = 8, +}} +ENUM!{enum D3D12_DEPTH_WRITE_MASK { + D3D12_DEPTH_WRITE_MASK_ZERO = 0, + D3D12_DEPTH_WRITE_MASK_ALL = 1, +}} +ENUM!{enum D3D12_STENCIL_OP { + D3D12_STENCIL_OP_KEEP = 1, + D3D12_STENCIL_OP_ZERO = 2, + D3D12_STENCIL_OP_REPLACE = 3, + D3D12_STENCIL_OP_INCR_SAT = 4, + D3D12_STENCIL_OP_DECR_SAT = 5, + D3D12_STENCIL_OP_INVERT = 6, + D3D12_STENCIL_OP_INCR = 7, + D3D12_STENCIL_OP_DECR = 8, +}} +STRUCT!{struct D3D12_DEPTH_STENCILOP_DESC { + StencilFailOp: D3D12_STENCIL_OP, + StencilDepthFailOp: D3D12_STENCIL_OP, + StencilPassOp: D3D12_STENCIL_OP, + StencilFunc: D3D12_COMPARISON_FUNC, +}} +STRUCT!{struct D3D12_DEPTH_STENCIL_DESC { + DepthEnable: ::BOOL, + DepthWriteMask: D3D12_DEPTH_WRITE_MASK, + DepthFunc: D3D12_COMPARISON_FUNC, + StencilEnable: ::BOOL, + StencilReadMask: ::UINT8, + StencilWriteMask: ::UINT8, + FrontFace: D3D12_DEPTH_STENCILOP_DESC, + BackFace: D3D12_DEPTH_STENCILOP_DESC, +}} +ENUM!{enum D3D12_BLEND { + D3D12_BLEND_ZERO = 1, + D3D12_BLEND_ONE = 2, + D3D12_BLEND_SRC_COLOR = 3, + D3D12_BLEND_INV_SRC_COLOR = 4, + D3D12_BLEND_SRC_ALPHA = 5, + D3D12_BLEND_INV_SRC_ALPHA = 6, + D3D12_BLEND_DEST_ALPHA = 7, + D3D12_BLEND_INV_DEST_ALPHA = 8, + D3D12_BLEND_DEST_COLOR = 9, + D3D12_BLEND_INV_DEST_COLOR = 10, + D3D12_BLEND_SRC_ALPHA_SAT = 11, + D3D12_BLEND_BLEND_FACTOR = 14, + D3D12_BLEND_INV_BLEND_FACTOR = 15, + D3D12_BLEND_SRC1_COLOR = 16, + D3D12_BLEND_INV_SRC1_COLOR = 17, + D3D12_BLEND_SRC1_ALPHA = 18, + D3D12_BLEND_INV_SRC1_ALPHA = 19, +}} +ENUM!{enum D3D12_BLEND_OP { + D3D12_BLEND_OP_ADD = 1, + D3D12_BLEND_OP_SUBTRACT = 2, + D3D12_BLEND_OP_REV_SUBTRACT = 3, + D3D12_BLEND_OP_MIN = 4, + D3D12_BLEND_OP_MAX = 5, +}} +FLAGS!{enum D3D12_COLOR_WRITE_ENABLE { + D3D12_COLOR_WRITE_ENABLE_RED = 0x1, + D3D12_COLOR_WRITE_ENABLE_GREEN = 0x2, + D3D12_COLOR_WRITE_ENABLE_BLUE = 0x4, + D3D12_COLOR_WRITE_ENABLE_ALPHA = 0x8, + D3D12_COLOR_WRITE_ENABLE_ALL = 0xF, +}} +ENUM!{enum D3D12_LOGIC_OP { + D3D12_LOGIC_OP_CLEAR = 0, + D3D12_LOGIC_OP_SET = 1, + D3D12_LOGIC_OP_COPY = 2, + D3D12_LOGIC_OP_COPY_INVERTED = 3, + D3D12_LOGIC_OP_NOOP = 4, + D3D12_LOGIC_OP_INVERT = 5, + D3D12_LOGIC_OP_AND = 6, + D3D12_LOGIC_OP_NAND = 7, + D3D12_LOGIC_OP_OR = 8, + D3D12_LOGIC_OP_NOR = 9, + D3D12_LOGIC_OP_XOR = 10, + D3D12_LOGIC_OP_EQUIV = 11, + D3D12_LOGIC_OP_AND_REVERSE = 12, + D3D12_LOGIC_OP_AND_INVERTED = 13, + D3D12_LOGIC_OP_OR_REVERSE = 14, + D3D12_LOGIC_OP_OR_INVERTED = 15, +}} +STRUCT!{struct D3D12_RENDER_TARGET_BLEND_DESC { + BlendEnable: ::BOOL, + LogicOpEnable: ::BOOL, + SrcBlend: D3D12_BLEND, + DestBlend: D3D12_BLEND, + BlendOp: D3D12_BLEND_OP, + SrcBlendAlpha: D3D12_BLEND, + DestBlendAlpha: D3D12_BLEND, + BlendOpAlpha: D3D12_BLEND_OP, + LogicOp: D3D12_LOGIC_OP, + RenderTargetWriteMask: ::UINT8, +}} +STRUCT!{struct D3D12_BLEND_DESC { + AlphaToCoverageEnable: ::BOOL, + IndependentBlendEnable: ::BOOL, + RenderTarget: [D3D12_RENDER_TARGET_BLEND_DESC; 8], +}} +ENUM!{enum D3D12_CONSERVATIVE_RASTERIZATION_MODE { + D3D12_CONSERVATIVE_RASTERIZATION_MODE_OFF = 0, + D3D12_CONSERVATIVE_RASTERIZATION_MODE_ON = 1, +}} +STRUCT!{struct D3D12_RASTERIZER_DESC { + FillMode: D3D12_FILL_MODE, + CullMode: D3D12_CULL_MODE, + FrontCounterClockwise: ::BOOL, + DepthBias: ::INT, + DepthBiasClamp: ::FLOAT, + SlopeScaledDepthBias: ::FLOAT, + DepthClipEnable: ::BOOL, + MultisampleEnable: ::BOOL, + AntialiasedLineEnable: ::BOOL, + ForcedSampleCount: ::UINT, + ConservativeRaster: D3D12_CONSERVATIVE_RASTERIZATION_MODE, +}} +RIDL!{interface ID3D12Object(ID3D12ObjectVtbl): IUnknown(IUnknownVtbl) { + fn GetPrivateData( + &mut self, guid: ::REFGUID, pDataSize: *mut ::UINT, pData: *mut ::c_void + ) -> ::HRESULT, + fn SetPrivateData( + &mut self, guid: ::REFGUID, DataSize: ::UINT, pData: *const ::c_void + ) -> ::HRESULT, + fn SetPrivateDataInterface( + &mut self, guid: ::REFGUID, pData: *const ::IUnknown + ) -> ::HRESULT, + fn SetName(&mut self, Name: ::LPCWSTR) -> ::HRESULT +}} +RIDL!{interface ID3D12DeviceChild(ID3D12DeviceChildVtbl): ID3D12Object(ID3D12ObjectVtbl) { + fn GetDevice( + &mut self, riid: ::REFGUID, ppvDevice: *mut *mut ::c_void + ) -> ::HRESULT +}} +RIDL!{interface ID3D12RootSignature(ID3D12RootSignatureVtbl): + ID3D12DeviceChild(ID3D12DeviceChildVtbl) { +}} +STRUCT!{struct D3D12_SHADER_BYTECODE { + pShaderBytecode: *const ::c_void, + BytecodeLength: ::SIZE_T, +}} +STRUCT!{struct D3D12_STREAM_OUTPUT_DESC { + pSODeclaration: *const D3D12_SO_DECLARATION_ENTRY, + NumEntries: ::UINT, + pBufferStrides: *const ::UINT, + NumStrides: ::UINT, + RasterizedStream: ::UINT, +}} +STRUCT!{struct D3D12_INPUT_LAYOUT_DESC { + pInputElementDescs: *const D3D12_INPUT_ELEMENT_DESC, + NumElements: ::UINT, +}} +ENUM!{enum D3D12_INDEX_BUFFER_STRIP_CUT_VALUE { + D3D12_INDEX_BUFFER_STRIP_CUT_VALUE_DISABLED = 0, + D3D12_INDEX_BUFFER_STRIP_CUT_VALUE_0xFFFF = 1, + D3D12_INDEX_BUFFER_STRIP_CUT_VALUE_0xFFFFFFFF = 2, +}} +STRUCT!{struct D3D12_CACHED_PIPELINE_STATE { + pCachedBlob: *const ::c_void, + CachedBlobSizeInBytes: ::SIZE_T, +}} +FLAGS!{enum D3D12_PIPELINE_STATE_FLAGS { + D3D12_PIPELINE_STATE_FLAG_NONE = 0x0, + D3D12_PIPELINE_STATE_FLAG_TOOL_DEBUG = 0x1, +}} +STRUCT!{struct D3D12_GRAPHICS_PIPELINE_STATE_DESC { + pRootSignature: *mut ID3D12RootSignature, + VS: D3D12_SHADER_BYTECODE, + PS: D3D12_SHADER_BYTECODE, + DS: D3D12_SHADER_BYTECODE, + HS: D3D12_SHADER_BYTECODE, + GS: D3D12_SHADER_BYTECODE, + StreamOutput: D3D12_STREAM_OUTPUT_DESC, + BlendState: D3D12_BLEND_DESC, + SampleMask: ::UINT, + RasterizerState: D3D12_RASTERIZER_DESC, + DepthStencilState: D3D12_DEPTH_STENCIL_DESC, + InputLayout: D3D12_INPUT_LAYOUT_DESC, + IBStripCutValue: D3D12_INDEX_BUFFER_STRIP_CUT_VALUE, + PrimitiveTopologyType: D3D12_PRIMITIVE_TOPOLOGY_TYPE, + NumRenderTargets: ::UINT, + RTVFormats: [::DXGI_FORMAT; 8], + DSVFormat: ::DXGI_FORMAT, + SampleDesc: ::DXGI_SAMPLE_DESC, + NodeMask: ::UINT, + CachedPSO: D3D12_CACHED_PIPELINE_STATE, + Flags: D3D12_PIPELINE_STATE_FLAGS, +}} +STRUCT!{struct D3D12_COMPUTE_PIPELINE_STATE_DESC { + pRootSignature: *mut ID3D12RootSignature, + CS: D3D12_SHADER_BYTECODE, + NodeMask: ::UINT, + CachedPSO: D3D12_CACHED_PIPELINE_STATE, + Flags: D3D12_PIPELINE_STATE_FLAGS, +}} +ENUM!{enum D3D12_FEATURE { + D3D12_FEATURE_D3D12_OPTIONS = 0, + D3D12_FEATURE_ARCHITECTURE = 1, + D3D12_FEATURE_FEATURE_LEVELS = 2, + D3D12_FEATURE_FORMAT_SUPPORT = 3, + D3D12_FEATURE_MULTISAMPLE_QUALITY_LEVELS = 4, + D3D12_FEATURE_FORMAT_INFO = 5, + D3D12_FEATURE_GPU_VIRTUAL_ADDRESS_SUPPORT = 6, +}} +FLAGS!{enum D3D12_SHADER_MIN_PRECISION_SUPPORT { + D3D12_SHADER_MIN_PRECISION_SUPPORT_NONE = 0, + D3D12_SHADER_MIN_PRECISION_SUPPORT_10_BIT = 0x1, + D3D12_SHADER_MIN_PRECISION_SUPPORT_16_BIT = 0x2, +}} +ENUM!{enum D3D12_TILED_RESOURCES_TIER { + D3D12_TILED_RESOURCES_TIER_NOT_SUPPORTED = 0, + D3D12_TILED_RESOURCES_TIER_1 = 1, + D3D12_TILED_RESOURCES_TIER_2 = 2, + D3D12_TILED_RESOURCES_TIER_3 = 3, +}} +ENUM!{enum D3D12_RESOURCE_BINDING_TIER { + D3D12_RESOURCE_BINDING_TIER_1 = 1, + D3D12_RESOURCE_BINDING_TIER_2 = 2, + D3D12_RESOURCE_BINDING_TIER_3 = 3, +}} +ENUM!{enum D3D12_CONSERVATIVE_RASTERIZATION_TIER { + D3D12_CONSERVATIVE_RASTERIZATION_TIER_NOT_SUPPORTED = 0, + D3D12_CONSERVATIVE_RASTERIZATION_TIER_1 = 1, + D3D12_CONSERVATIVE_RASTERIZATION_TIER_2 = 2, + D3D12_CONSERVATIVE_RASTERIZATION_TIER_3 = 3, +}} +FLAGS!{enum D3D12_FORMAT_SUPPORT1 { + D3D12_FORMAT_SUPPORT1_NONE = 0x0, + D3D12_FORMAT_SUPPORT1_BUFFER = 0x1, + D3D12_FORMAT_SUPPORT1_IA_VERTEX_BUFFER = 0x2, + D3D12_FORMAT_SUPPORT1_IA_INDEX_BUFFER = 0x4, + D3D12_FORMAT_SUPPORT1_SO_BUFFER = 0x8, + D3D12_FORMAT_SUPPORT1_TEXTURE1D = 0x10, + D3D12_FORMAT_SUPPORT1_TEXTURE2D = 0x20, + D3D12_FORMAT_SUPPORT1_TEXTURE3D = 0x40, + D3D12_FORMAT_SUPPORT1_TEXTURECUBE = 0x80, + D3D12_FORMAT_SUPPORT1_SHADER_LOAD = 0x100, + D3D12_FORMAT_SUPPORT1_SHADER_SAMPLE = 0x200, + D3D12_FORMAT_SUPPORT1_SHADER_SAMPLE_COMPARISON = 0x400, + D3D12_FORMAT_SUPPORT1_SHADER_SAMPLE_MONO_TEXT = 0x800, + D3D12_FORMAT_SUPPORT1_MIP = 0x1000, + D3D12_FORMAT_SUPPORT1_RENDER_TARGET = 0x4000, + D3D12_FORMAT_SUPPORT1_BLENDABLE = 0x8000, + D3D12_FORMAT_SUPPORT1_DEPTH_STENCIL = 0x10000, + D3D12_FORMAT_SUPPORT1_MULTISAMPLE_RESOLVE = 0x40000, + D3D12_FORMAT_SUPPORT1_DISPLAY = 0x80000, + D3D12_FORMAT_SUPPORT1_CAST_WITHIN_BIT_LAYOUT = 0x100000, + D3D12_FORMAT_SUPPORT1_MULTISAMPLE_RENDERTARGET = 0x200000, + D3D12_FORMAT_SUPPORT1_MULTISAMPLE_LOAD = 0x400000, + D3D12_FORMAT_SUPPORT1_SHADER_GATHER = 0x800000, + D3D12_FORMAT_SUPPORT1_BACK_BUFFER_CAST = 0x1000000, + D3D12_FORMAT_SUPPORT1_TYPED_UNORDERED_ACCESS_VIEW = 0x2000000, + D3D12_FORMAT_SUPPORT1_SHADER_GATHER_COMPARISON = 0x4000000, + D3D12_FORMAT_SUPPORT1_DECODER_OUTPUT = 0x8000000, + D3D12_FORMAT_SUPPORT1_VIDEO_PROCESSOR_OUTPUT = 0x10000000, + D3D12_FORMAT_SUPPORT1_VIDEO_PROCESSOR_INPUT = 0x20000000, + D3D12_FORMAT_SUPPORT1_VIDEO_ENCODER = 0x40000000, +}} +FLAGS!{enum D3D12_FORMAT_SUPPORT2 { + D3D12_FORMAT_SUPPORT2_NONE = 0x0, + D3D12_FORMAT_SUPPORT2_UAV_ATOMIC_ADD = 0x1, + D3D12_FORMAT_SUPPORT2_UAV_ATOMIC_BITWISE_OPS = 0x2, + D3D12_FORMAT_SUPPORT2_UAV_ATOMIC_COMPARE_STORE_OR_COMPARE_EXCHANGE = 0x4, + D3D12_FORMAT_SUPPORT2_UAV_ATOMIC_EXCHANGE = 0x8, + D3D12_FORMAT_SUPPORT2_UAV_ATOMIC_SIGNED_MIN_OR_MAX = 0x10, + D3D12_FORMAT_SUPPORT2_UAV_ATOMIC_UNSIGNED_MIN_OR_MAX = 0x20, + D3D12_FORMAT_SUPPORT2_UAV_TYPED_LOAD = 0x40, + D3D12_FORMAT_SUPPORT2_UAV_TYPED_STORE = 0x80, + D3D12_FORMAT_SUPPORT2_OUTPUT_MERGER_LOGIC_OP = 0x100, + D3D12_FORMAT_SUPPORT2_TILED = 0x200, + D3D12_FORMAT_SUPPORT2_MULTIPLANE_OVERLAY = 0x4000, +}} +FLAGS!{enum D3D12_MULTISAMPLE_QUALITY_LEVEL_FLAGS { + D3D12_MULTISAMPLE_QUALITY_LEVELS_FLAG_NONE = 0x0, + D3D12_MULTISAMPLE_QUALITY_LEVELS_FLAG_TILED_RESOURCE = 0x1, +}} +ENUM!{enum D3D12_CROSS_NODE_SHARING_TIER { + D3D12_CROSS_NODE_SHARING_TIER_NOT_SUPPORTED = 0, + D3D12_CROSS_NODE_SHARING_TIER_1_EMULATED = 1, + D3D12_CROSS_NODE_SHARING_TIER_1 = 2, + D3D12_CROSS_NODE_SHARING_TIER_2 = 3, +}} +ENUM!{enum D3D12_RESOURCE_HEAP_TIER { + D3D12_RESOURCE_HEAP_TIER_1 = 1, + D3D12_RESOURCE_HEAP_TIER_2 = 2, +}} +STRUCT!{struct D3D12_FEATURE_DATA_D3D12_OPTIONS { + DoublePrecisionFloatShaderOps: ::BOOL, + OutputMergerLogicOp: ::BOOL, + MinPrecisionSupport: D3D12_SHADER_MIN_PRECISION_SUPPORT, + TiledResourcesTier: D3D12_TILED_RESOURCES_TIER, + ResourceBindingTier: D3D12_RESOURCE_BINDING_TIER, + PSSpecifiedStencilRefSupported: ::BOOL, + TypedUAVLoadAdditionalFormats: ::BOOL, + ROVsSupported: ::BOOL, + ConservativeRasterizationTier: D3D12_CONSERVATIVE_RASTERIZATION_TIER, + MaxGPUVirtualAddressBitsPerResource: ::UINT, + StandardSwizzle64KBSupported: ::BOOL, + CrossNodeSharingTier: D3D12_CROSS_NODE_SHARING_TIER, + CrossAdapterRowMajorTextureSupported: ::BOOL, + VPAndRTArrayIndexFromAnyShaderFeedingRasterizerSupportedWithoutGSEmulation: ::BOOL, + ResourceHeapTier: D3D12_RESOURCE_HEAP_TIER, +}} + + + + + + + + + +FLAGS!{ enum D3D12_BUFFER_SRV_FLAGS { + D3D12_BUFFER_SRV_FLAG_NONE = 0x0, + D3D12_BUFFER_SRV_FLAG_RAW = 0x1, +}} + +FLAGS!{ enum D3D12_BUFFER_UAV_FLAGS { + D3D12_BUFFER_UAV_FLAG_NONE = 0x0, + D3D12_BUFFER_UAV_FLAG_RAW = 0x1, +}} + +FLAGS!{ enum D3D12_CLEAR_FLAGS { + D3D12_CLEAR_FLAG_DEPTH = 0x1, + D3D12_CLEAR_FLAG_STENCIL = 0x2, +}} + + +ENUM!{ enum D3D12_CPU_PAGE_PROPERTY { + D3D12_CPU_PAGE_PROPERTY_UNKNOWN = 0, + D3D12_CPU_PAGE_PROPERTY_NOT_AVAILABLE = 1, + D3D12_CPU_PAGE_PROPERTY_WRITE_COMBINE = 2, + D3D12_CPU_PAGE_PROPERTY_WRITE_BACK = 3, +}} + + +FLAGS!{ enum D3D12_DESCRIPTOR_HEAP_FLAGS { + D3D12_DESCRIPTOR_HEAP_FLAG_NONE = 0x0, + D3D12_DESCRIPTOR_HEAP_FLAG_SHADER_VISIBLE = 0x1, +}} + +ENUM!{ enum D3D12_DESCRIPTOR_HEAP_TYPE { + D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV = 0, + D3D12_DESCRIPTOR_HEAP_TYPE_SAMPLER = 1, + D3D12_DESCRIPTOR_HEAP_TYPE_RTV = 2, + D3D12_DESCRIPTOR_HEAP_TYPE_DSV = 3, + D3D12_DESCRIPTOR_HEAP_TYPE_NUM_TYPES = 4, +}} + +ENUM!{ enum D3D12_DESCRIPTOR_RANGE_TYPE { + D3D12_DESCRIPTOR_RANGE_TYPE_SRV = 0, + D3D12_DESCRIPTOR_RANGE_TYPE_UAV = 1, + D3D12_DESCRIPTOR_RANGE_TYPE_CBV = 2, + D3D12_DESCRIPTOR_RANGE_TYPE_SAMPLER = 3, +}} + +ENUM!{ enum D3D12_DSV_DIMENSION { + D3D12_DSV_DIMENSION_UNKNOWN = 0, + D3D12_DSV_DIMENSION_TEXTURE1D = 1, + D3D12_DSV_DIMENSION_TEXTURE1DARRAY = 2, + D3D12_DSV_DIMENSION_TEXTURE2D = 3, + D3D12_DSV_DIMENSION_TEXTURE2DARRAY = 4, + D3D12_DSV_DIMENSION_TEXTURE2DMS = 5, + D3D12_DSV_DIMENSION_TEXTURE2DMSARRAY = 6, +}} + +FLAGS!{ enum D3D12_DSV_FLAGS { + D3D12_DSV_FLAG_NONE = 0x0, + D3D12_DSV_FLAG_READ_ONLY_DEPTH = 0x1, + D3D12_DSV_FLAG_READ_ONLY_STENCIL = 0x2, +}} + + + +FLAGS!{ enum D3D12_FENCE_FLAGS { + D3D12_FENCE_FLAG_NONE = 0x0, + D3D12_FENCE_FLAG_SHARED = 0x1, + D3D12_FENCE_FLAG_SHARED_CROSS_ADAPTER = 0x2, +}} + + + +ENUM!{ enum D3D12_FILTER { + D3D12_FILTER_MIN_MAG_MIP_POINT = 0, + D3D12_FILTER_MIN_MAG_POINT_MIP_LINEAR = 1, + D3D12_FILTER_MIN_POINT_MAG_LINEAR_MIP_POINT = 4, + D3D12_FILTER_MIN_POINT_MAG_MIP_LINEAR = 5, + D3D12_FILTER_MIN_LINEAR_MAG_MIP_POINT = 16, + D3D12_FILTER_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 17, + D3D12_FILTER_MIN_MAG_LINEAR_MIP_POINT = 20, + D3D12_FILTER_MIN_MAG_MIP_LINEAR = 21, + D3D12_FILTER_ANISOTROPIC = 85, + D3D12_FILTER_COMPARISON_MIN_MAG_MIP_POINT = 128, + D3D12_FILTER_COMPARISON_MIN_MAG_POINT_MIP_LINEAR = 129, + D3D12_FILTER_COMPARISON_MIN_POINT_MAG_LINEAR_MIP_POINT = 132, + D3D12_FILTER_COMPARISON_MIN_POINT_MAG_MIP_LINEAR = 133, + D3D12_FILTER_COMPARISON_MIN_LINEAR_MAG_MIP_POINT = 144, + D3D12_FILTER_COMPARISON_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 145, + D3D12_FILTER_COMPARISON_MIN_MAG_LINEAR_MIP_POINT = 148, + D3D12_FILTER_COMPARISON_MIN_MAG_MIP_LINEAR = 149, + D3D12_FILTER_COMPARISON_ANISOTROPIC = 213, + D3D12_FILTER_MINIMUM_MIN_MAG_MIP_POINT = 256, + D3D12_FILTER_MINIMUM_MIN_MAG_POINT_MIP_LINEAR = 257, + D3D12_FILTER_MINIMUM_MIN_POINT_MAG_LINEAR_MIP_POINT = 260, + D3D12_FILTER_MINIMUM_MIN_POINT_MAG_MIP_LINEAR = 261, + D3D12_FILTER_MINIMUM_MIN_LINEAR_MAG_MIP_POINT = 272, + D3D12_FILTER_MINIMUM_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 273, + D3D12_FILTER_MINIMUM_MIN_MAG_LINEAR_MIP_POINT = 276, + D3D12_FILTER_MINIMUM_MIN_MAG_MIP_LINEAR = 277, + D3D12_FILTER_MINIMUM_ANISOTROPIC = 341, + D3D12_FILTER_MAXIMUM_MIN_MAG_MIP_POINT = 384, + D3D12_FILTER_MAXIMUM_MIN_MAG_POINT_MIP_LINEAR = 385, + D3D12_FILTER_MAXIMUM_MIN_POINT_MAG_LINEAR_MIP_POINT = 388, + D3D12_FILTER_MAXIMUM_MIN_POINT_MAG_MIP_LINEAR = 389, + D3D12_FILTER_MAXIMUM_MIN_LINEAR_MAG_MIP_POINT = 400, + D3D12_FILTER_MAXIMUM_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 401, + D3D12_FILTER_MAXIMUM_MIN_MAG_LINEAR_MIP_POINT = 404, + D3D12_FILTER_MAXIMUM_MIN_MAG_MIP_LINEAR = 405, + D3D12_FILTER_MAXIMUM_ANISOTROPIC = 469, +}} + +ENUM!{ enum D3D12_FILTER_REDUCTION_TYPE { + D3D12_FILTER_REDUCTION_TYPE_STANDARD = 0, + D3D12_FILTER_REDUCTION_TYPE_COMPARISON = 1, + D3D12_FILTER_REDUCTION_TYPE_MINIMUM = 2, + D3D12_FILTER_REDUCTION_TYPE_MAXIMUM = 3, +}} + +ENUM!{ enum D3D12_FILTER_TYPE { + D3D12_FILTER_TYPE_POINT = 0, + D3D12_FILTER_TYPE_LINEAR = 1, +}} + + + +FLAGS!{ enum D3D12_HEAP_FLAGS { + D3D12_HEAP_FLAG_NONE = 0x0, + D3D12_HEAP_FLAG_SHARED = 0x1, + D3D12_HEAP_FLAG_DENY_BUFFERS = 0x4, + D3D12_HEAP_FLAG_ALLOW_DISPLAY = 0x8, + D3D12_HEAP_FLAG_SHARED_CROSS_ADAPTER = 0x20, + D3D12_HEAP_FLAG_DENY_RT_DS_TEXTURES = 0x40, + D3D12_HEAP_FLAG_DENY_NON_RT_DS_TEXTURES = 0x80, + D3D12_HEAP_FLAG_ALLOW_ALL_BUFFERS_AND_TEXTURES = 0x0, + D3D12_HEAP_FLAG_ALLOW_ONLY_BUFFERS = 0xC0, + D3D12_HEAP_FLAG_ALLOW_ONLY_NON_RT_DS_TEXTURES = 0x44, + D3D12_HEAP_FLAG_ALLOW_ONLY_RT_DS_TEXTURES = 0x84, +}} + +ENUM!{ enum D3D12_HEAP_TYPE { + D3D12_HEAP_TYPE_DEFAULT = 1, + D3D12_HEAP_TYPE_UPLOAD = 2, + D3D12_HEAP_TYPE_READBACK = 3, + D3D12_HEAP_TYPE_CUSTOM = 4, +}} + + + +ENUM!{ enum D3D12_INDIRECT_ARGUMENT_TYPE { + D3D12_INDIRECT_ARGUMENT_TYPE_DRAW = 0, + D3D12_INDIRECT_ARGUMENT_TYPE_DRAW_INDEXED = 1, + D3D12_INDIRECT_ARGUMENT_TYPE_DISPATCH = 2, + D3D12_INDIRECT_ARGUMENT_TYPE_VERTEX_BUFFER_VIEW = 3, + D3D12_INDIRECT_ARGUMENT_TYPE_INDEX_BUFFER_VIEW = 4, + D3D12_INDIRECT_ARGUMENT_TYPE_CONSTANT = 5, + D3D12_INDIRECT_ARGUMENT_TYPE_CONSTANT_BUFFER_VIEW = 6, + D3D12_INDIRECT_ARGUMENT_TYPE_SHADER_RESOURCE_VIEW = 7, + D3D12_INDIRECT_ARGUMENT_TYPE_UNORDERED_ACCESS_VIEW = 8, +}} + + + + + +ENUM!{ enum D3D12_MEMORY_POOL { + D3D12_MEMORY_POOL_UNKNOWN = 0, + D3D12_MEMORY_POOL_L0 = 1, + D3D12_MEMORY_POOL_L1 = 2, +}} + + + + +ENUM!{ enum D3D12_PREDICATION_OP { + D3D12_PREDICATION_OP_EQUAL_ZERO = 0, + D3D12_PREDICATION_OP_NOT_EQUAL_ZERO = 1, +}} + + + +ENUM!{ enum D3D12_QUERY_HEAP_TYPE { + D3D12_QUERY_HEAP_TYPE_OCCLUSION = 0, + D3D12_QUERY_HEAP_TYPE_TIMESTAMP = 1, + D3D12_QUERY_HEAP_TYPE_PIPELINE_STATISTICS = 2, + D3D12_QUERY_HEAP_TYPE_SO_STATISTICS = 3, +}} + +ENUM!{ enum D3D12_QUERY_TYPE { + D3D12_QUERY_TYPE_OCCLUSION = 0, + D3D12_QUERY_TYPE_BINARY_OCCLUSION = 1, + D3D12_QUERY_TYPE_TIMESTAMP = 2, + D3D12_QUERY_TYPE_PIPELINE_STATISTICS = 3, + D3D12_QUERY_TYPE_SO_STATISTICS_STREAM0 = 4, + D3D12_QUERY_TYPE_SO_STATISTICS_STREAM1 = 5, + D3D12_QUERY_TYPE_SO_STATISTICS_STREAM2 = 6, + D3D12_QUERY_TYPE_SO_STATISTICS_STREAM3 = 7, +}} + +FLAGS!{ enum D3D12_RESOURCE_BARRIER_FLAGS { + D3D12_RESOURCE_BARRIER_FLAG_NONE = 0x0, + D3D12_RESOURCE_BARRIER_FLAG_BEGIN_ONLY = 0x1, + D3D12_RESOURCE_BARRIER_FLAG_END_ONLY = 0x2, +}} + +ENUM!{ enum D3D12_RESOURCE_BARRIER_TYPE { + D3D12_RESOURCE_BARRIER_TYPE_TRANSITION = 0, + D3D12_RESOURCE_BARRIER_TYPE_ALIASING = 1, + D3D12_RESOURCE_BARRIER_TYPE_UAV = 2, +}} + + +ENUM!{ enum D3D12_RESOURCE_DIMENSION { + D3D12_RESOURCE_DIMENSION_UNKNOWN = 0, + D3D12_RESOURCE_DIMENSION_BUFFER = 1, + D3D12_RESOURCE_DIMENSION_TEXTURE1D = 2, + D3D12_RESOURCE_DIMENSION_TEXTURE2D = 3, + D3D12_RESOURCE_DIMENSION_TEXTURE3D = 4, +}} + +FLAGS!{ enum D3D12_RESOURCE_FLAGS { + D3D12_RESOURCE_FLAG_NONE = 0x0, + D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET = 0x1, + D3D12_RESOURCE_FLAG_ALLOW_DEPTH_STENCIL = 0x2, + D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS = 0x4, + D3D12_RESOURCE_FLAG_DENY_SHADER_RESOURCE = 0x8, + D3D12_RESOURCE_FLAG_ALLOW_CROSS_ADAPTER = 0x10, + D3D12_RESOURCE_FLAG_ALLOW_SIMULTANEOUS_ACCESS = 0x20, +}} + + +FLAGS!{ enum D3D12_RESOURCE_STATES { + D3D12_RESOURCE_STATE_COMMON = 0x0, + D3D12_RESOURCE_STATE_VERTEX_AND_CONSTANT_BUFFER = 0x1, + D3D12_RESOURCE_STATE_INDEX_BUFFER = 0x2, + D3D12_RESOURCE_STATE_RENDER_TARGET = 0x4, + D3D12_RESOURCE_STATE_UNORDERED_ACCESS = 0x8, + D3D12_RESOURCE_STATE_DEPTH_WRITE = 0x10, + D3D12_RESOURCE_STATE_DEPTH_READ = 0x20, + D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE = 0x40, + D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE = 0x80, + D3D12_RESOURCE_STATE_STREAM_OUT = 0x100, + D3D12_RESOURCE_STATE_INDIRECT_ARGUMENT = 0x200, + D3D12_RESOURCE_STATE_COPY_DEST = 0x400, + D3D12_RESOURCE_STATE_COPY_SOURCE = 0x800, + D3D12_RESOURCE_STATE_RESOLVE_DEST = 0x1000, + D3D12_RESOURCE_STATE_RESOLVE_SOURCE = 0x2000, + D3D12_RESOURCE_STATE_GENERIC_READ = 0xAC3, + D3D12_RESOURCE_STATE_PRESENT = 0x0, + D3D12_RESOURCE_STATE_PREDICATION = 0x200, +}} + +ENUM!{ enum D3D12_ROOT_PARAMETER_TYPE { + D3D12_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE = 0, + D3D12_ROOT_PARAMETER_TYPE_32BIT_CONSTANTS = 1, + D3D12_ROOT_PARAMETER_TYPE_CBV = 2, + D3D12_ROOT_PARAMETER_TYPE_SRV = 3, + D3D12_ROOT_PARAMETER_TYPE_UAV = 4, +}} + +FLAGS!{ enum D3D12_ROOT_SIGNATURE_FLAGS { + D3D12_ROOT_SIGNATURE_FLAG_NONE = 0x0, + D3D12_ROOT_SIGNATURE_FLAG_ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT = 0x1, + D3D12_ROOT_SIGNATURE_FLAG_DENY_VERTEX_SHADER_ROOT_ACCESS = 0x2, + D3D12_ROOT_SIGNATURE_FLAG_DENY_HULL_SHADER_ROOT_ACCESS = 0x4, + D3D12_ROOT_SIGNATURE_FLAG_DENY_DOMAIN_SHADER_ROOT_ACCESS = 0x8, + D3D12_ROOT_SIGNATURE_FLAG_DENY_GEOMETRY_SHADER_ROOT_ACCESS = 0x10, + D3D12_ROOT_SIGNATURE_FLAG_DENY_PIXEL_SHADER_ROOT_ACCESS = 0x20, + D3D12_ROOT_SIGNATURE_FLAG_ALLOW_STREAM_OUTPUT = 0x40, +}} + +ENUM!{ enum D3D12_RTV_DIMENSION { + D3D12_RTV_DIMENSION_UNKNOWN = 0, + D3D12_RTV_DIMENSION_BUFFER = 1, + D3D12_RTV_DIMENSION_TEXTURE1D = 2, + D3D12_RTV_DIMENSION_TEXTURE1DARRAY = 3, + D3D12_RTV_DIMENSION_TEXTURE2D = 4, + D3D12_RTV_DIMENSION_TEXTURE2DARRAY = 5, + D3D12_RTV_DIMENSION_TEXTURE2DMS = 6, + D3D12_RTV_DIMENSION_TEXTURE2DMSARRAY = 7, + D3D12_RTV_DIMENSION_TEXTURE3D = 8, +}} + +ENUM!{ enum D3D12_SHADER_COMPONENT_MAPPING { + D3D12_SHADER_COMPONENT_MAPPING_FROM_MEMORY_COMPONENT_0 = 0, + D3D12_SHADER_COMPONENT_MAPPING_FROM_MEMORY_COMPONENT_1 = 1, + D3D12_SHADER_COMPONENT_MAPPING_FROM_MEMORY_COMPONENT_2 = 2, + D3D12_SHADER_COMPONENT_MAPPING_FROM_MEMORY_COMPONENT_3 = 3, + D3D12_SHADER_COMPONENT_MAPPING_FORCE_VALUE_0 = 4, + D3D12_SHADER_COMPONENT_MAPPING_FORCE_VALUE_1 = 5, +}} + + +ENUM!{ enum D3D12_SHADER_VISIBILITY { + D3D12_SHADER_VISIBILITY_ALL = 0, + D3D12_SHADER_VISIBILITY_VERTEX = 1, + D3D12_SHADER_VISIBILITY_HULL = 2, + D3D12_SHADER_VISIBILITY_DOMAIN = 3, + D3D12_SHADER_VISIBILITY_GEOMETRY = 4, + D3D12_SHADER_VISIBILITY_PIXEL = 5, +}} + +ENUM!{ enum D3D12_SRV_DIMENSION { + D3D12_SRV_DIMENSION_UNKNOWN = 0, + D3D12_SRV_DIMENSION_BUFFER = 1, + D3D12_SRV_DIMENSION_TEXTURE1D = 2, + D3D12_SRV_DIMENSION_TEXTURE1DARRAY = 3, + D3D12_SRV_DIMENSION_TEXTURE2D = 4, + D3D12_SRV_DIMENSION_TEXTURE2DARRAY = 5, + D3D12_SRV_DIMENSION_TEXTURE2DMS = 6, + D3D12_SRV_DIMENSION_TEXTURE2DMSARRAY = 7, + D3D12_SRV_DIMENSION_TEXTURE3D = 8, + D3D12_SRV_DIMENSION_TEXTURECUBE = 9, + D3D12_SRV_DIMENSION_TEXTURECUBEARRAY = 10, +}} + +ENUM!{ enum D3D12_STATIC_BORDER_COLOR { + D3D12_STATIC_BORDER_COLOR_TRANSPARENT_BLACK = 0, + D3D12_STATIC_BORDER_COLOR_OPAQUE_BLACK = 1, + D3D12_STATIC_BORDER_COLOR_OPAQUE_WHITE = 2, +}} + + + +ENUM!{ enum D3D12_TEXTURE_ADDRESS_MODE { + D3D12_TEXTURE_ADDRESS_MODE_WRAP = 1, + D3D12_TEXTURE_ADDRESS_MODE_MIRROR = 2, + D3D12_TEXTURE_ADDRESS_MODE_CLAMP = 3, + D3D12_TEXTURE_ADDRESS_MODE_BORDER = 4, + D3D12_TEXTURE_ADDRESS_MODE_MIRROR_ONCE = 5, +}} + +ENUM!{ enum D3D12_TEXTURE_COPY_TYPE { + D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX = 0, + D3D12_TEXTURE_COPY_TYPE_PLACED_FOOTPRINT = 1, +}} + +ENUM!{ enum D3D12_TEXTURE_LAYOUT { + D3D12_TEXTURE_LAYOUT_UNKNOWN = 0, + D3D12_TEXTURE_LAYOUT_ROW_MAJOR = 1, + D3D12_TEXTURE_LAYOUT_64KB_UNDEFINED_SWIZZLE = 2, + D3D12_TEXTURE_LAYOUT_64KB_STANDARD_SWIZZLE = 3, +}} + + +FLAGS!{ enum D3D12_TILE_COPY_FLAGS { + D3D12_TILE_COPY_FLAG_NONE = 0x0, + D3D12_TILE_COPY_FLAG_NO_HAZARD = 0x1, + D3D12_TILE_COPY_FLAG_LINEAR_BUFFER_TO_SWIZZLED_TILED_RESOURCE = 0x2, + D3D12_TILE_COPY_FLAG_SWIZZLED_TILED_RESOURCE_TO_LINEAR_BUFFER = 0x4, +}} + +FLAGS!{ enum D3D12_TILE_MAPPING_FLAGS { + D3D12_TILE_MAPPING_FLAG_NONE = 0x0, + D3D12_TILE_MAPPING_FLAG_NO_HAZARD = 0x1, +}} + +FLAGS!{ enum D3D12_TILE_RANGE_FLAGS { + D3D12_TILE_RANGE_FLAG_NONE = 0x0, + D3D12_TILE_RANGE_FLAG_NULL = 0x1, + D3D12_TILE_RANGE_FLAG_SKIP = 0x2, + D3D12_TILE_RANGE_FLAG_REUSE_SINGLE_TILE = 0x4, +}} + +ENUM!{ enum D3D12_UAV_DIMENSION { + D3D12_UAV_DIMENSION_UNKNOWN = 0, + D3D12_UAV_DIMENSION_BUFFER = 1, + D3D12_UAV_DIMENSION_TEXTURE1D = 2, + D3D12_UAV_DIMENSION_TEXTURE1DARRAY = 3, + D3D12_UAV_DIMENSION_TEXTURE2D = 4, + D3D12_UAV_DIMENSION_TEXTURE2DARRAY = 5, + D3D12_UAV_DIMENSION_TEXTURE3D = 8, +}} + +ENUM!{ enum D3D_ROOT_SIGNATURE_VERSION { + D3D_ROOT_SIGNATURE_VERSION_1 = 1, +}} + + + + + +STRUCT!{struct D3D12_BUFFER_RTV { + FirstElement: ::UINT64, + NumElements: ::UINT, +}} + +STRUCT!{struct D3D12_BUFFER_SRV { + FirstElement: ::UINT64, + NumElements: ::UINT, + StructureByteStride: ::UINT, + Flags: ::D3D12_BUFFER_SRV_FLAGS, +}} + +STRUCT!{struct D3D12_BUFFER_UAV { + FirstElement: ::UINT64, + NumElements: ::UINT, + StructureByteStride: ::UINT, + CounterOffsetInBytes: ::UINT64, + Flags: ::D3D12_BUFFER_UAV_FLAGS, +}} + + + +STRUCT!{struct D3D12_CLEAR_VALUE { + Format: ::DXGI_FORMAT, + u: [::FLOAT; 4], +}} + +UNION!(D3D12_CLEAR_VALUE, u, DepthStencil, DepthStencil_mut, ::D3D12_DEPTH_STENCIL_VALUE); +UNION!(D3D12_CLEAR_VALUE, u, Color, Color_mut, [::FLOAT; 4]); + + + +STRUCT!{struct D3D12_COMMAND_SIGNATURE_DESC { + ByteStride: ::UINT, + NumArgumentDescs: ::UINT, + pArgumentDescs: *const ::D3D12_INDIRECT_ARGUMENT_DESC, + NodeMask: ::UINT, +}} + + + +STRUCT!{struct D3D12_CONSTANT_BUFFER_VIEW_DESC { + BufferLocation: ::D3D12_GPU_VIRTUAL_ADDRESS, + SizeInBytes: ::UINT, +}} + +STRUCT!{struct D3D12_CPU_DESCRIPTOR_HANDLE { + ptr: ::SIZE_T, +}} + + + +STRUCT!{struct D3D12_DEPTH_STENCIL_VALUE { + Depth: ::FLOAT, + Stencil: ::UINT8, +}} + +STRUCT!{struct D3D12_DEPTH_STENCIL_VIEW_DESC { + Format: ::DXGI_FORMAT, + ViewDimension: ::D3D12_DSV_DIMENSION, + Flags: ::D3D12_DSV_FLAGS, + u: ::D3D12_TEX1D_ARRAY_DSV, +}} + +UNION!(D3D12_DEPTH_STENCIL_VIEW_DESC, u, Texture2DMSArray, Texture2DMSArray_mut, + ::D3D12_TEX2DMS_ARRAY_DSV); +UNION!(D3D12_DEPTH_STENCIL_VIEW_DESC, u, Texture2DMS, Texture2DMS_mut, ::D3D12_TEX2DMS_DSV); +UNION!(D3D12_DEPTH_STENCIL_VIEW_DESC, u, Texture2DArray, Texture2DArray_mut, + ::D3D12_TEX2D_ARRAY_DSV); +UNION!(D3D12_DEPTH_STENCIL_VIEW_DESC, u, Texture2D, Texture2D_mut, ::D3D12_TEX2D_DSV); +UNION!(D3D12_DEPTH_STENCIL_VIEW_DESC, u, Texture1DArray, Texture1DArray_mut, + ::D3D12_TEX1D_ARRAY_DSV); +UNION!(D3D12_DEPTH_STENCIL_VIEW_DESC, u, Texture1D, Texture1D_mut, ::D3D12_TEX1D_DSV); + +STRUCT!{struct D3D12_DESCRIPTOR_HEAP_DESC { + Type: ::D3D12_DESCRIPTOR_HEAP_TYPE, + NumDescriptors: ::UINT, + Flags: ::D3D12_DESCRIPTOR_HEAP_FLAGS, + NodeMask: ::UINT, +}} + +STRUCT!{struct D3D12_DESCRIPTOR_RANGE { + RangeType: ::D3D12_DESCRIPTOR_RANGE_TYPE, + NumDescriptors: ::UINT, + BaseShaderRegister: ::UINT, + RegisterSpace: ::UINT, + OffsetInDescriptorsFromTableStart: ::UINT, +}} + +STRUCT!{struct D3D12_DISCARD_REGION { + NumRects: ::UINT, + pRects: *const ::D3D12_RECT, + FirstSubresource: ::UINT, + NumSubresources: ::UINT, +}} + +STRUCT!{struct D3D12_DISPATCH_ARGUMENTS { + ThreadGroupCountX: ::UINT, + ThreadGroupCountY: ::UINT, + ThreadGroupCountZ: ::UINT, +}} + +STRUCT!{struct D3D12_DRAW_ARGUMENTS { + VertexCountPerInstance: ::UINT, + InstanceCount: ::UINT, + StartVertexLocation: ::UINT, + StartInstanceLocation: ::UINT, +}} + +STRUCT!{struct D3D12_DRAW_INDEXED_ARGUMENTS { + IndexCountPerInstance: ::UINT, + InstanceCount: ::UINT, + StartIndexLocation: ::UINT, + BaseVertexLocation: ::INT, + StartInstanceLocation: ::UINT, +}} + +STRUCT!{struct D3D12_FEATURE_DATA_ARCHITECTURE { + NodeIndex: ::UINT, + TileBasedRenderer: ::BOOL, + UMA: ::BOOL, + CacheCoherentUMA: ::BOOL, +}} + + +STRUCT!{struct D3D12_FEATURE_DATA_FEATURE_LEVELS { + NumFeatureLevels: ::UINT, + pFeatureLevelsRequested: *const ::D3D_FEATURE_LEVEL, + MaxSupportedFeatureLevel: ::D3D_FEATURE_LEVEL, +}} + +STRUCT!{struct D3D12_FEATURE_DATA_FORMAT_INFO { + Format: ::DXGI_FORMAT, + PlaneCount: ::UINT8, +}} + +STRUCT!{struct D3D12_FEATURE_DATA_FORMAT_SUPPORT { + Format: ::DXGI_FORMAT, + Support1: ::D3D12_FORMAT_SUPPORT1, + Support2: ::D3D12_FORMAT_SUPPORT2, +}} + +STRUCT!{struct D3D12_FEATURE_DATA_GPU_VIRTUAL_ADDRESS_SUPPORT { + MaxGPUVirtualAddressBitsPerResource: ::UINT, + MaxGPUVirtualAddressBitsPerProcess: ::UINT, +}} + +STRUCT!{struct D3D12_FEATURE_DATA_MULTISAMPLE_QUALITY_LEVELS { + Format: ::DXGI_FORMAT, + SampleCount: ::UINT, + Flags: ::D3D12_MULTISAMPLE_QUALITY_LEVEL_FLAGS, + NumQualityLevels: ::UINT, +}} + +STRUCT!{struct D3D12_GPU_DESCRIPTOR_HANDLE { + ptr: ::UINT64, +}} + + + +STRUCT!{struct D3D12_HEAP_DESC { + SizeInBytes: ::UINT64, + Properties: ::D3D12_HEAP_PROPERTIES, + Alignment: ::UINT64, + Flags: ::D3D12_HEAP_FLAGS, +}} + +STRUCT!{struct D3D12_HEAP_PROPERTIES { + Type: ::D3D12_HEAP_TYPE, + CPUPageProperty: ::D3D12_CPU_PAGE_PROPERTY, + MemoryPoolPreference: ::D3D12_MEMORY_POOL, + CreationNodeMask: ::UINT, + VisibleNodeMask: ::UINT, +}} + +STRUCT!{struct D3D12_INDEX_BUFFER_VIEW { + BufferLocation: ::D3D12_GPU_VIRTUAL_ADDRESS, + SizeInBytes: ::UINT, + Format: ::DXGI_FORMAT, +}} + +STRUCT!{struct D3D12_INDIRECT_ARGUMENT_DESC_VertexBuffer { + Slot: ::UINT, +}} + +STRUCT!{struct D3D12_INDIRECT_ARGUMENT_DESC_Constant { + RootParameterIndex: ::UINT, + DestOffsetIn32BitValues: ::UINT, + Num32BitValuesToSet: ::UINT, +}} + +STRUCT!{struct D3D12_INDIRECT_ARGUMENT_DESC_ConstantBufferView { + RootParameterIndex: ::UINT, +}} + +STRUCT!{struct D3D12_INDIRECT_ARGUMENT_DESC_ShaderResourceView { + RootParameterIndex: ::UINT, +}} + +STRUCT!{struct D3D12_INDIRECT_ARGUMENT_DESC_UnorderedAccessView { + RootParameterIndex: ::UINT, +}} + +STRUCT!{struct D3D12_INDIRECT_ARGUMENT_DESC { + Type: ::D3D12_INDIRECT_ARGUMENT_TYPE, + u: ::D3D12_INDIRECT_ARGUMENT_DESC_Constant, +}} + +UNION!(D3D12_INDIRECT_ARGUMENT_DESC, u, UnorderedAccessView, UnorderedAccessView_mut, + D3D12_INDIRECT_ARGUMENT_DESC_UnorderedAccessView); +UNION!(D3D12_INDIRECT_ARGUMENT_DESC, u, ShaderResourceView, ShaderResourceView_mut, + D3D12_INDIRECT_ARGUMENT_DESC_ShaderResourceView); +UNION!(D3D12_INDIRECT_ARGUMENT_DESC, u, ConstantBufferView, ConstantBufferView_mut, + D3D12_INDIRECT_ARGUMENT_DESC_ConstantBufferView); +UNION!(D3D12_INDIRECT_ARGUMENT_DESC, u, Constant, Constant_mut, + D3D12_INDIRECT_ARGUMENT_DESC_Constant); +UNION!(D3D12_INDIRECT_ARGUMENT_DESC, u, VertexBuffer, VertexBuffer_mut, + D3D12_INDIRECT_ARGUMENT_DESC_VertexBuffer); + + + + +STRUCT!{struct D3D12_MEMCPY_DEST { + pData: *mut ::c_void, + RowPitch: ::SIZE_T, + SlicePitch: ::SIZE_T, +}} + +STRUCT!{struct D3D12_PACKED_MIP_INFO { + NumStandardMips: ::UINT8, + NumPackedMips: ::UINT8, + NumTilesForPackedMips: ::UINT, + StartTileIndexInOverallResource: ::UINT, +}} + +STRUCT!{struct D3D12_PLACED_SUBRESOURCE_FOOTPRINT { + Offset: ::UINT64, + Footprint: ::D3D12_SUBRESOURCE_FOOTPRINT, +}} + +STRUCT!{struct D3D12_QUERY_DATA_PIPELINE_STATISTICS { + IAVertices: ::UINT64, + IAPrimitives: ::UINT64, + VSInvocations: ::UINT64, + GSInvocations: ::UINT64, + GSPrimitives: ::UINT64, + CInvocations: ::UINT64, + CPrimitives: ::UINT64, + PSInvocations: ::UINT64, + HSInvocations: ::UINT64, + DSInvocations: ::UINT64, + CSInvocations: ::UINT64, +}} + +STRUCT!{struct D3D12_QUERY_DATA_SO_STATISTICS { + NumPrimitivesWritten: ::UINT64, + PrimitivesStorageNeeded: ::UINT64, +}} + +STRUCT!{struct D3D12_QUERY_HEAP_DESC { + Type: ::D3D12_QUERY_HEAP_TYPE, + Count: ::UINT, + NodeMask: ::UINT, +}} + +STRUCT!{struct D3D12_RANGE { + Begin: ::SIZE_T, + End: ::SIZE_T, +}} + + + +STRUCT!{struct D3D12_RENDER_TARGET_VIEW_DESC { + Format: ::DXGI_FORMAT, + ViewDimension: ::D3D12_RTV_DIMENSION, + u: ::D3D12_BUFFER_RTV, +}} + +UNION!(D3D12_RENDER_TARGET_VIEW_DESC, u, Texture3D, Texture3D_mut, ::D3D12_TEX3D_RTV); +UNION!(D3D12_RENDER_TARGET_VIEW_DESC, u, Texture2DMSArray, Texture2DMSArray_mut, + ::D3D12_TEX2DMS_ARRAY_RTV); +UNION!(D3D12_RENDER_TARGET_VIEW_DESC, u, Texture2DMS, Texture2DMS_mut, ::D3D12_TEX2DMS_RTV); +UNION!(D3D12_RENDER_TARGET_VIEW_DESC, u, Texture2DArray, Texture2DArray_mut, + ::D3D12_TEX2D_ARRAY_RTV); +UNION!(D3D12_RENDER_TARGET_VIEW_DESC, u, Texture2D, Texture2D_mut, ::D3D12_TEX2D_RTV); +UNION!(D3D12_RENDER_TARGET_VIEW_DESC, u, Texture1DArray, Texture1DArray_mut, + ::D3D12_TEX1D_ARRAY_RTV); +UNION!(D3D12_RENDER_TARGET_VIEW_DESC, u, Texture1D, Texture1D_mut, ::D3D12_TEX1D_RTV); +UNION!(D3D12_RENDER_TARGET_VIEW_DESC, u, Buffer, Buffer_mut, ::D3D12_BUFFER_RTV); + +STRUCT!{struct D3D12_RESOURCE_ALIASING_BARRIER { + pResourceBefore: *mut ::ID3D12Resource, + pResourceAfter: *mut ::ID3D12Resource, +}} + +STRUCT!{struct D3D12_RESOURCE_ALLOCATION_INFO { + SizeInBytes: ::UINT64, + Alignment: ::UINT64, +}} + +STRUCT!{struct D3D12_RESOURCE_BARRIER { + Type: ::D3D12_RESOURCE_BARRIER_TYPE, + Flags: ::D3D12_RESOURCE_BARRIER_FLAGS, + u: ::D3D12_RESOURCE_TRANSITION_BARRIER, +}} + +UNION!(D3D12_RESOURCE_BARRIER, u, UAV, UAV_mut, ::D3D12_RESOURCE_UAV_BARRIER); +UNION!(D3D12_RESOURCE_BARRIER, u, Aliasing, Aliasing_mut, ::D3D12_RESOURCE_ALIASING_BARRIER); +UNION!(D3D12_RESOURCE_BARRIER, u, Transition, Transition_mut, ::D3D12_RESOURCE_TRANSITION_BARRIER); + +STRUCT!{struct D3D12_RESOURCE_DESC { + Dimension: ::D3D12_RESOURCE_DIMENSION, + Alignment: ::UINT64, + Width: ::UINT64, + Height: ::UINT, + DepthOrArraySize: ::UINT16, + MipLevels: ::UINT16, + Format: ::DXGI_FORMAT, + SampleDesc: ::DXGI_SAMPLE_DESC, + Layout: ::D3D12_TEXTURE_LAYOUT, + Flags: ::D3D12_RESOURCE_FLAGS, +}} + +STRUCT!{struct D3D12_RESOURCE_TRANSITION_BARRIER { + pResource: *mut ::ID3D12Resource, + Subresource: ::UINT, + StateBefore: ::D3D12_RESOURCE_STATES, + StateAfter: ::D3D12_RESOURCE_STATES, +}} + +STRUCT!{struct D3D12_RESOURCE_UAV_BARRIER { + pResource: *mut ::ID3D12Resource, +}} + +STRUCT!{struct D3D12_ROOT_CONSTANTS { + ShaderRegister: ::UINT, + RegisterSpace: ::UINT, + Num32BitValues: ::UINT, +}} + +STRUCT!{struct D3D12_ROOT_DESCRIPTOR { + ShaderRegister: ::UINT, + RegisterSpace: ::UINT, +}} + +STRUCT!{struct D3D12_ROOT_DESCRIPTOR_TABLE { + NumDescriptorRanges: ::UINT, + pDescriptorRanges: *const ::D3D12_DESCRIPTOR_RANGE, +}} + +#[cfg(target_pointer_width = "64")] +STRUCT!{struct D3D12_ROOT_PARAMETER { + ParameterType: ::D3D12_ROOT_PARAMETER_TYPE, + u: ::D3D12_ROOT_DESCRIPTOR_TABLE, + ShaderVisibility: ::D3D12_SHADER_VISIBILITY, +}} + +#[cfg(target_pointer_width = "32")] +STRUCT!{struct D3D12_ROOT_PARAMETER { + ParameterType: ::D3D12_ROOT_PARAMETER_TYPE, + u: ::D3D12_ROOT_CONSTANTS, + ShaderVisibility: ::D3D12_SHADER_VISIBILITY, +}} + +UNION!(D3D12_ROOT_PARAMETER, u, Descriptor, Descriptor_mut, ::D3D12_ROOT_DESCRIPTOR); +UNION!(D3D12_ROOT_PARAMETER, u, Constants, Constants_mut, ::D3D12_ROOT_CONSTANTS); +UNION!(D3D12_ROOT_PARAMETER, u, DescriptorTable, DescriptorTable_mut, + ::D3D12_ROOT_DESCRIPTOR_TABLE); + +STRUCT!{struct D3D12_ROOT_SIGNATURE_DESC { + NumParameters: ::UINT, + pParameters: *const ::D3D12_ROOT_PARAMETER, + NumStaticSamplers: ::UINT, + pStaticSamplers: *const ::D3D12_STATIC_SAMPLER_DESC, + Flags: ::D3D12_ROOT_SIGNATURE_FLAGS, +}} + +STRUCT!{struct D3D12_SAMPLER_DESC { + Filter: ::D3D12_FILTER, + AddressU: ::D3D12_TEXTURE_ADDRESS_MODE, + AddressV: ::D3D12_TEXTURE_ADDRESS_MODE, + AddressW: ::D3D12_TEXTURE_ADDRESS_MODE, + MipLODBias: ::FLOAT, + MaxAnisotropy: ::UINT, + ComparisonFunc: ::D3D12_COMPARISON_FUNC, + BorderColor: [::FLOAT; 4], + MinLOD: ::FLOAT, + MaxLOD: ::FLOAT, +}} + + + +STRUCT!{struct D3D12_SHADER_RESOURCE_VIEW_DESC { + Format: ::DXGI_FORMAT, + ViewDimension: ::D3D12_SRV_DIMENSION, + Shader4ComponentMapping: ::UINT, + u: ::D3D12_BUFFER_SRV, +}} + +UNION!(D3D12_SHADER_RESOURCE_VIEW_DESC, u, TextureCubeArray, TextureCubeArray_mut, + ::D3D12_TEXCUBE_ARRAY_SRV); +UNION!(D3D12_SHADER_RESOURCE_VIEW_DESC, u, TextureCube, TextureCube_mut, ::D3D12_TEXCUBE_SRV); +UNION!(D3D12_SHADER_RESOURCE_VIEW_DESC, u, Texture3D, Texture3D_mut, ::D3D12_TEX3D_SRV); +UNION!(D3D12_SHADER_RESOURCE_VIEW_DESC, u, Texture2DMSArray, Texture2DMSArray_mut, + ::D3D12_TEX2DMS_ARRAY_SRV); +UNION!(D3D12_SHADER_RESOURCE_VIEW_DESC, u, Texture2DMS, Texture2DMS_mut, ::D3D12_TEX2DMS_SRV); +UNION!(D3D12_SHADER_RESOURCE_VIEW_DESC, u, Texture2DArray, Texture2DArray_mut, + ::D3D12_TEX2D_ARRAY_SRV); +UNION!(D3D12_SHADER_RESOURCE_VIEW_DESC, u, Texture2D, Texture2D_mut, ::D3D12_TEX2D_SRV); +UNION!(D3D12_SHADER_RESOURCE_VIEW_DESC, u, Texture1DArray, Texture1DArray_mut, + ::D3D12_TEX1D_ARRAY_SRV); +UNION!(D3D12_SHADER_RESOURCE_VIEW_DESC, u, Texture1D, Texture1D_mut, ::D3D12_TEX1D_SRV); +UNION!(D3D12_SHADER_RESOURCE_VIEW_DESC, u, Buffer, Buffer_mut, ::D3D12_BUFFER_SRV); + + + +STRUCT!{struct D3D12_STATIC_SAMPLER_DESC { + Filter: ::D3D12_FILTER, + AddressU: ::D3D12_TEXTURE_ADDRESS_MODE, + AddressV: ::D3D12_TEXTURE_ADDRESS_MODE, + AddressW: ::D3D12_TEXTURE_ADDRESS_MODE, + MipLODBias: ::FLOAT, + MaxAnisotropy: ::UINT, + ComparisonFunc: ::D3D12_COMPARISON_FUNC, + BorderColor: ::D3D12_STATIC_BORDER_COLOR, + MinLOD: ::FLOAT, + MaxLOD: ::FLOAT, + ShaderRegister: ::UINT, + RegisterSpace: ::UINT, + ShaderVisibility: ::D3D12_SHADER_VISIBILITY, +}} + +STRUCT!{struct D3D12_STREAM_OUTPUT_BUFFER_VIEW { + BufferLocation: ::D3D12_GPU_VIRTUAL_ADDRESS, + SizeInBytes: ::UINT64, + BufferFilledSizeLocation: ::D3D12_GPU_VIRTUAL_ADDRESS, +}} + + + +STRUCT!{struct D3D12_SUBRESOURCE_DATA { + pData: *const ::c_void, + RowPitch: ::LONG_PTR, + SlicePitch: ::LONG_PTR, +}} + +STRUCT!{struct D3D12_SUBRESOURCE_FOOTPRINT { + Format: ::DXGI_FORMAT, + Width: ::UINT, + Height: ::UINT, + Depth: ::UINT, + RowPitch: ::UINT, +}} + +STRUCT!{struct D3D12_SUBRESOURCE_INFO { + Offset: ::UINT64, + RowPitch: ::UINT, + DepthPitch: ::UINT, +}} + +STRUCT!{struct D3D12_SUBRESOURCE_TILING { + WidthInTiles: ::UINT, + HeightInTiles: ::UINT16, + DepthInTiles: ::UINT16, + StartTileIndexInOverallResource: ::UINT, +}} + +STRUCT!{struct D3D12_TEX1D_ARRAY_DSV { + MipSlice: ::UINT, + FirstArraySlice: ::UINT, + ArraySize: ::UINT, +}} + +STRUCT!{struct D3D12_TEX1D_ARRAY_RTV { + MipSlice: ::UINT, + FirstArraySlice: ::UINT, + ArraySize: ::UINT, +}} + +STRUCT!{struct D3D12_TEX1D_ARRAY_SRV { + MostDetailedMip: ::UINT, + MipLevels: ::UINT, + FirstArraySlice: ::UINT, + ArraySize: ::UINT, + ResourceMinLODClamp: ::FLOAT, +}} + +STRUCT!{struct D3D12_TEX1D_ARRAY_UAV { + MipSlice: ::UINT, + FirstArraySlice: ::UINT, + ArraySize: ::UINT, +}} + +STRUCT!{struct D3D12_TEX1D_DSV { + MipSlice: ::UINT, +}} + +STRUCT!{struct D3D12_TEX1D_RTV { + MipSlice: ::UINT, +}} + +STRUCT!{struct D3D12_TEX1D_SRV { + MostDetailedMip: ::UINT, + MipLevels: ::UINT, + ResourceMinLODClamp: ::FLOAT, +}} + +STRUCT!{struct D3D12_TEX1D_UAV { + MipSlice: ::UINT, +}} + +STRUCT!{struct D3D12_TEX2DMS_ARRAY_DSV { + FirstArraySlice: ::UINT, + ArraySize: ::UINT, +}} + +STRUCT!{struct D3D12_TEX2DMS_ARRAY_RTV { + FirstArraySlice: ::UINT, + ArraySize: ::UINT, +}} + +STRUCT!{struct D3D12_TEX2DMS_ARRAY_SRV { + FirstArraySlice: ::UINT, + ArraySize: ::UINT, +}} + +STRUCT!{struct D3D12_TEX2DMS_DSV { + UnusedField_NothingToDefine: ::UINT, +}} + +STRUCT!{struct D3D12_TEX2DMS_RTV { + UnusedField_NothingToDefine: ::UINT, +}} + +STRUCT!{struct D3D12_TEX2DMS_SRV { + UnusedField_NothingToDefine: ::UINT, +}} + +STRUCT!{struct D3D12_TEX2D_ARRAY_DSV { + MipSlice: ::UINT, + FirstArraySlice: ::UINT, + ArraySize: ::UINT, +}} + +STRUCT!{struct D3D12_TEX2D_ARRAY_RTV { + MipSlice: ::UINT, + FirstArraySlice: ::UINT, + ArraySize: ::UINT, + PlaneSlice: ::UINT, +}} + +STRUCT!{struct D3D12_TEX2D_ARRAY_SRV { + MostDetailedMip: ::UINT, + MipLevels: ::UINT, + FirstArraySlice: ::UINT, + ArraySize: ::UINT, + PlaneSlice: ::UINT, + ResourceMinLODClamp: ::FLOAT, +}} + +STRUCT!{struct D3D12_TEX2D_ARRAY_UAV { + MipSlice: ::UINT, + FirstArraySlice: ::UINT, + ArraySize: ::UINT, + PlaneSlice: ::UINT, +}} + +STRUCT!{struct D3D12_TEX2D_DSV { + MipSlice: ::UINT, +}} + +STRUCT!{struct D3D12_TEX2D_RTV { + MipSlice: ::UINT, + PlaneSlice: ::UINT, +}} + +STRUCT!{struct D3D12_TEX2D_SRV { + MostDetailedMip: ::UINT, + MipLevels: ::UINT, + PlaneSlice: ::UINT, + ResourceMinLODClamp: ::FLOAT, +}} + +STRUCT!{struct D3D12_TEX2D_UAV { + MipSlice: ::UINT, + PlaneSlice: ::UINT, +}} + +STRUCT!{struct D3D12_TEX3D_RTV { + MipSlice: ::UINT, + FirstWSlice: ::UINT, + WSize: ::UINT, +}} + +STRUCT!{struct D3D12_TEX3D_SRV { + MostDetailedMip: ::UINT, + MipLevels: ::UINT, + ResourceMinLODClamp: ::FLOAT, +}} + +STRUCT!{struct D3D12_TEX3D_UAV { + MipSlice: ::UINT, + FirstWSlice: ::UINT, + WSize: ::UINT, +}} + +STRUCT!{struct D3D12_TEXCUBE_ARRAY_SRV { + MostDetailedMip: ::UINT, + MipLevels: ::UINT, + First2DArrayFace: ::UINT, + NumCubes: ::UINT, + ResourceMinLODClamp: ::FLOAT, +}} + +STRUCT!{struct D3D12_TEXCUBE_SRV { + MostDetailedMip: ::UINT, + MipLevels: ::UINT, + ResourceMinLODClamp: ::FLOAT, +}} + +STRUCT!{struct D3D12_TEXTURE_COPY_LOCATION { + pResource: *mut ::ID3D12Resource, + Type: ::D3D12_TEXTURE_COPY_TYPE, + u: ::D3D12_PLACED_SUBRESOURCE_FOOTPRINT, +}} + +UNION!(D3D12_TEXTURE_COPY_LOCATION, u, SubresourceIndex, SubresourceIndex_mut, ::UINT); +UNION!(D3D12_TEXTURE_COPY_LOCATION, u, PlacedFootprint, PlacedFootprint_mut, + ::D3D12_PLACED_SUBRESOURCE_FOOTPRINT); + +STRUCT!{struct D3D12_TILED_RESOURCE_COORDINATE { + X: ::UINT, + Y: ::UINT, + Z: ::UINT, + Subresource: ::UINT, +}} + +STRUCT!{struct D3D12_TILE_REGION_SIZE { + NumTiles: ::UINT, + UseBox: ::BOOL, + Width: ::UINT, + Height: ::UINT16, + Depth: ::UINT16, +}} + +STRUCT!{struct D3D12_TILE_SHAPE { + WidthInTexels: ::UINT, + HeightInTexels: ::UINT, + DepthInTexels: ::UINT, +}} + +STRUCT!{struct D3D12_UNORDERED_ACCESS_VIEW_DESC { + Format: ::DXGI_FORMAT, + ViewDimension: ::D3D12_UAV_DIMENSION, + u: ::D3D12_BUFFER_UAV, +}} + +UNION!(D3D12_UNORDERED_ACCESS_VIEW_DESC, u, Texture3D, Texture3D_mut, ::D3D12_TEX3D_UAV); +UNION!(D3D12_UNORDERED_ACCESS_VIEW_DESC, u, Texture2DArray, Texture2DArray_mut, + ::D3D12_TEX2D_ARRAY_UAV); +UNION!(D3D12_UNORDERED_ACCESS_VIEW_DESC, u, Texture2D, Texture2D_mut, ::D3D12_TEX2D_UAV); +UNION!(D3D12_UNORDERED_ACCESS_VIEW_DESC, u, Texture1DArray, Texture1DArray_mut, + ::D3D12_TEX1D_ARRAY_UAV); +UNION!(D3D12_UNORDERED_ACCESS_VIEW_DESC, u, Texture1D, Texture1D_mut, ::D3D12_TEX1D_UAV); +UNION!(D3D12_UNORDERED_ACCESS_VIEW_DESC, u, Buffer, Buffer_mut, ::D3D12_BUFFER_UAV); + +STRUCT!{struct D3D12_VERTEX_BUFFER_VIEW { + BufferLocation: ::D3D12_GPU_VIRTUAL_ADDRESS, + SizeInBytes: ::UINT, + StrideInBytes: ::UINT, +}} + + + +RIDL!( +interface ID3D12CommandAllocator(ID3D12CommandAllocatorVtbl): ID3D12Pageable(ID3D12PageableVtbl) { + fn Reset(&mut self) -> ::HRESULT +}); + +RIDL!( +interface ID3D12CommandList(ID3D12CommandListVtbl): ID3D12DeviceChild(ID3D12DeviceChildVtbl) { + fn GetType(&mut self) -> ::D3D12_COMMAND_LIST_TYPE +}); + +RIDL!( +interface ID3D12CommandQueue(ID3D12CommandQueueVtbl): ID3D12Pageable(ID3D12PageableVtbl) { + fn UpdateTileMappings( + &mut self, pResource: *mut ::ID3D12Resource, NumResourceRegions: ::UINT, + pResourceRegionStartCoordinates: *const ::D3D12_TILED_RESOURCE_COORDINATE, + pResourceRegionSizes: *const ::D3D12_TILE_REGION_SIZE, pHeap: *mut ::ID3D12Heap, + NumRanges: ::UINT, pRangeFlags: *const ::D3D12_TILE_RANGE_FLAGS, + pHeapRangeStartOffsets: *const ::UINT, pRangeTileCounts: *const ::UINT, + Flags: ::D3D12_TILE_MAPPING_FLAGS + ) -> (), + fn CopyTileMappings( + &mut self, pDstResource: *mut ::ID3D12Resource, + pDstRegionStartCoordinate: *const ::D3D12_TILED_RESOURCE_COORDINATE, + pSrcResource: *mut ::ID3D12Resource, + pSrcRegionStartCoordinate: *const ::D3D12_TILED_RESOURCE_COORDINATE, + pRegionSize: *const ::D3D12_TILE_REGION_SIZE, Flags: ::D3D12_TILE_MAPPING_FLAGS + ) -> (), + fn ExecuteCommandLists( + &mut self, NumCommandLists: ::UINT, ppCommandLists: *mut *mut ::ID3D12CommandList + ) -> (), + fn SetMarker( + &mut self, Metadata: ::UINT, pData: *const ::c_void, Size: ::UINT + ) -> (), + fn BeginEvent( + &mut self, Metadata: ::UINT, pData: *const ::c_void, Size: ::UINT + ) -> (), + fn EndEvent(&mut self) -> (), + fn Signal( + &mut self, pFence: *mut ::ID3D12Fence, Value: ::UINT64 + ) -> ::HRESULT, + fn Wait( + &mut self, pFence: *mut ::ID3D12Fence, Value: ::UINT64 + ) -> ::HRESULT, + fn GetTimestampFrequency(&mut self, pFrequency: *mut ::UINT64) -> ::HRESULT, + fn GetClockCalibration( + &mut self, pGpuTimestamp: *mut ::UINT64, pCpuTimestamp: *mut ::UINT64 + ) -> ::HRESULT, + fn GetDesc( + &mut self, __ret_val: *mut ::D3D12_COMMAND_QUEUE_DESC + ) -> *mut ::D3D12_COMMAND_QUEUE_DESC +}); + +RIDL!( +interface ID3D12CommandSignature(ID3D12CommandSignatureVtbl): ID3D12Pageable(ID3D12PageableVtbl) { +}); + +RIDL!( +interface ID3D12DescriptorHeap(ID3D12DescriptorHeapVtbl): ID3D12Pageable(ID3D12PageableVtbl) { + fn GetDesc( + &mut self, __ret_val: *mut ::D3D12_DESCRIPTOR_HEAP_DESC + ) -> *mut ::D3D12_DESCRIPTOR_HEAP_DESC, + fn GetCPUDescriptorHandleForHeapStart( + &mut self, __ret_val: *mut ::D3D12_CPU_DESCRIPTOR_HANDLE + ) -> *mut ::D3D12_CPU_DESCRIPTOR_HANDLE, + fn GetGPUDescriptorHandleForHeapStart( + &mut self, __ret_val: *mut ::D3D12_GPU_DESCRIPTOR_HANDLE + ) -> *mut ::D3D12_GPU_DESCRIPTOR_HANDLE +}); + + + +RIDL!( +interface ID3D12Device(ID3D12DeviceVtbl): ID3D12Object(ID3D12ObjectVtbl) { + fn GetNodeCount(&mut self) -> ::UINT, + fn CreateCommandQueue( + &mut self, pDesc: *const ::D3D12_COMMAND_QUEUE_DESC, riid: ::REFGUID, + ppCommandQueue: *mut *mut ::c_void + ) -> ::HRESULT, + fn CreateCommandAllocator( + &mut self, type_: ::D3D12_COMMAND_LIST_TYPE, riid: ::REFGUID, + ppCommandAllocator: *mut *mut ::c_void + ) -> ::HRESULT, + fn CreateGraphicsPipelineState( + &mut self, pDesc: *const ::D3D12_GRAPHICS_PIPELINE_STATE_DESC, riid: ::REFGUID, + ppPipelineState: *mut *mut ::c_void + ) -> ::HRESULT, + fn CreateComputePipelineState( + &mut self, pDesc: *const ::D3D12_COMPUTE_PIPELINE_STATE_DESC, riid: ::REFGUID, + ppPipelineState: *mut *mut ::c_void + ) -> ::HRESULT, + fn CreateCommandList( + &mut self, nodeMask: ::UINT, type_: ::D3D12_COMMAND_LIST_TYPE, + pCommandAllocator: *mut ::ID3D12CommandAllocator, + pInitialState: *mut ::ID3D12PipelineState, riid: ::REFGUID, + ppCommandList: *mut *mut ::c_void + ) -> ::HRESULT, + fn CheckFeatureSupport( + &mut self, Feature: ::D3D12_FEATURE, pFeatureSupportData: *mut ::c_void, + FeatureSupportDataSize: ::UINT + ) -> ::HRESULT, + fn CreateDescriptorHeap( + &mut self, pDescriptorHeapDesc: *const ::D3D12_DESCRIPTOR_HEAP_DESC, riid: ::REFGUID, + ppvHeap: *mut *mut ::c_void + ) -> ::HRESULT, + fn GetDescriptorHandleIncrementSize( + &mut self, DescriptorHeapType: ::D3D12_DESCRIPTOR_HEAP_TYPE + ) -> ::UINT, + fn CreateRootSignature( + &mut self, nodeMask: ::UINT, pBlobWithRootSignature: *const ::c_void, + blobLengthInBytes: ::SIZE_T, riid: ::REFGUID, ppvRootSignature: *mut *mut ::c_void + ) -> ::HRESULT, + fn CreateConstantBufferView( + &mut self, pDesc: *const ::D3D12_CONSTANT_BUFFER_VIEW_DESC, + DestDescriptor: ::D3D12_CPU_DESCRIPTOR_HANDLE + ) -> (), + fn CreateShaderResourceView( + &mut self, pResource: *mut ::ID3D12Resource, + pDesc: *const ::D3D12_SHADER_RESOURCE_VIEW_DESC, + DestDescriptor: ::D3D12_CPU_DESCRIPTOR_HANDLE + ) -> (), + fn CreateUnorderedAccessView( + &mut self, pResource: *mut ::ID3D12Resource, pCounterResource: *mut ::ID3D12Resource, + pDesc: *const ::D3D12_UNORDERED_ACCESS_VIEW_DESC, + DestDescriptor: ::D3D12_CPU_DESCRIPTOR_HANDLE + ) -> (), + fn CreateRenderTargetView( + &mut self, pResource: *mut ::ID3D12Resource, pDesc: *const ::D3D12_RENDER_TARGET_VIEW_DESC, + DestDescriptor: ::D3D12_CPU_DESCRIPTOR_HANDLE + ) -> (), + fn CreateDepthStencilView( + &mut self, pResource: *mut ::ID3D12Resource, pDesc: *const ::D3D12_DEPTH_STENCIL_VIEW_DESC, + DestDescriptor: ::D3D12_CPU_DESCRIPTOR_HANDLE + ) -> (), + fn CreateSampler( + &mut self, pDesc: *const ::D3D12_SAMPLER_DESC, + DestDescriptor: ::D3D12_CPU_DESCRIPTOR_HANDLE + ) -> (), + fn CopyDescriptors( + &mut self, NumDestDescriptorRanges: ::UINT, + pDestDescriptorRangeStarts: *const ::D3D12_CPU_DESCRIPTOR_HANDLE, + pDestDescriptorRangeSizes: *const ::UINT, NumSrcDescriptorRanges: ::UINT, + pSrcDescriptorRangeStarts: *const ::D3D12_CPU_DESCRIPTOR_HANDLE, + pSrcDescriptorRangeSizes: *const ::UINT, DescriptorHeapsType: ::D3D12_DESCRIPTOR_HEAP_TYPE + ) -> (), + fn CopyDescriptorsSimple( + &mut self, NumDescriptors: ::UINT, DestDescriptorRangeStart: ::D3D12_CPU_DESCRIPTOR_HANDLE, + SrcDescriptorRangeStart: ::D3D12_CPU_DESCRIPTOR_HANDLE, + DescriptorHeapsType: ::D3D12_DESCRIPTOR_HEAP_TYPE + ) -> (), + fn GetResourceAllocationInfo( + &mut self, visibleMask: ::UINT, numResourceDescs: ::UINT, + pResourceDescs: *const ::D3D12_RESOURCE_DESC, + __ret_val: *mut ::D3D12_RESOURCE_ALLOCATION_INFO + ) -> *mut ::D3D12_RESOURCE_ALLOCATION_INFO, + fn GetCustomHeapProperties( + &mut self, nodeMask: ::UINT, heapType: ::D3D12_HEAP_TYPE, + __ret_val: *mut ::D3D12_HEAP_PROPERTIES + ) -> *mut ::D3D12_HEAP_PROPERTIES, + fn CreateCommittedResource( + &mut self, pHeapProperties: *const ::D3D12_HEAP_PROPERTIES, HeapFlags: ::D3D12_HEAP_FLAGS, + pResourceDesc: *const ::D3D12_RESOURCE_DESC, InitialResourceState: ::D3D12_RESOURCE_STATES, + pOptimizedClearValue: *const ::D3D12_CLEAR_VALUE, riidResource: ::REFGUID, + ppvResource: *mut *mut ::c_void + ) -> ::HRESULT, + fn CreateHeap( + &mut self, pDesc: *const ::D3D12_HEAP_DESC, riid: ::REFGUID, ppvHeap: *mut *mut ::c_void + ) -> ::HRESULT, + fn CreatePlacedResource( + &mut self, pHeap: *mut ::ID3D12Heap, HeapOffset: ::UINT64, + pDesc: *const ::D3D12_RESOURCE_DESC, InitialState: ::D3D12_RESOURCE_STATES, + pOptimizedClearValue: *const ::D3D12_CLEAR_VALUE, riid: ::REFGUID, + ppvResource: *mut *mut ::c_void + ) -> ::HRESULT, + fn CreateReservedResource( + &mut self, pDesc: *const ::D3D12_RESOURCE_DESC, InitialState: ::D3D12_RESOURCE_STATES, + pOptimizedClearValue: *const ::D3D12_CLEAR_VALUE, riid: ::REFGUID, + ppvResource: *mut *mut ::c_void + ) -> ::HRESULT, + fn CreateSharedHandle( + &mut self, pObject: *mut ::ID3D12DeviceChild, pAttributes: *const ::SECURITY_ATTRIBUTES, + Access: ::DWORD, Name: ::LPCWSTR, pHandle: *mut ::HANDLE + ) -> ::HRESULT, + fn OpenSharedHandle( + &mut self, NTHandle: ::HANDLE, riid: ::REFGUID, ppvObj: *mut *mut ::c_void + ) -> ::HRESULT, + fn OpenSharedHandleByName( + &mut self, Name: ::LPCWSTR, Access: ::DWORD, pNTHandle: *mut ::HANDLE + ) -> ::HRESULT, + fn MakeResident( + &mut self, NumObjects: ::UINT, ppObjects: *mut *mut ::ID3D12Pageable + ) -> ::HRESULT, + fn Evict( + &mut self, NumObjects: ::UINT, ppObjects: *mut *mut ::ID3D12Pageable + ) -> ::HRESULT, + fn CreateFence( + &mut self, InitialValue: ::UINT64, Flags: ::D3D12_FENCE_FLAGS, riid: ::REFGUID, + ppFence: *mut *mut ::c_void + ) -> ::HRESULT, + fn GetDeviceRemovedReason(&mut self) -> ::HRESULT, + fn GetCopyableFootprints( + &mut self, pResourceDesc: *const ::D3D12_RESOURCE_DESC, FirstSubresource: ::UINT, + NumSubresources: ::UINT, BaseOffset: ::UINT64, + pLayouts: *mut ::D3D12_PLACED_SUBRESOURCE_FOOTPRINT, pNumRows: *mut ::UINT, + pRowSizeInBytes: *mut ::UINT64, pTotalBytes: *mut ::UINT64 + ) -> (), + fn CreateQueryHeap( + &mut self, pDesc: *const ::D3D12_QUERY_HEAP_DESC, riid: ::REFGUID, + ppvHeap: *mut *mut ::c_void + ) -> ::HRESULT, + fn SetStablePowerState(&mut self, Enable: ::BOOL) -> ::HRESULT, + fn CreateCommandSignature( + &mut self, pDesc: *const ::D3D12_COMMAND_SIGNATURE_DESC, + pRootSignature: *mut ::ID3D12RootSignature, riid: ::REFGUID, + ppvCommandSignature: *mut *mut ::c_void + ) -> ::HRESULT, + fn GetResourceTiling( + &mut self, pTiledResource: *mut ::ID3D12Resource, pNumTilesForEntireResource: *mut ::UINT, + pPackedMipDesc: *mut ::D3D12_PACKED_MIP_INFO, + pStandardTileShapeForNonPackedMips: *mut ::D3D12_TILE_SHAPE, + pNumSubresourceTilings: *mut ::UINT, FirstSubresourceTilingToGet: ::UINT, + pSubresourceTilingsForNonPackedMips: *mut ::D3D12_SUBRESOURCE_TILING + ) -> (), + fn GetAdapterLuid(&mut self, __ret_val: *mut ::LUID) -> *mut ::LUID +}); + +RIDL!( +interface ID3D12Fence(ID3D12FenceVtbl): ID3D12Pageable(ID3D12PageableVtbl) { + fn GetCompletedValue(&mut self) -> ::UINT64, + fn SetEventOnCompletion( + &mut self, Value: ::UINT64, hEvent: ::HANDLE + ) -> ::HRESULT, + fn Signal(&mut self, Value: ::UINT64) -> ::HRESULT +}); + +RIDL!( +interface ID3D12GraphicsCommandList(ID3D12GraphicsCommandListVtbl): ID3D12CommandList(ID3D12CommandListVtbl) { + fn Close(&mut self) -> ::HRESULT, + fn Reset( + &mut self, pAllocator: *mut ::ID3D12CommandAllocator, + pInitialState: *mut ::ID3D12PipelineState + ) -> ::HRESULT, + fn ClearState(&mut self, pPipelineState: *mut ::ID3D12PipelineState) -> (), + fn DrawInstanced( + &mut self, VertexCountPerInstance: ::UINT, InstanceCount: ::UINT, + StartVertexLocation: ::UINT, StartInstanceLocation: ::UINT + ) -> (), + fn DrawIndexedInstanced( + &mut self, IndexCountPerInstance: ::UINT, InstanceCount: ::UINT, + StartIndexLocation: ::UINT, BaseVertexLocation: ::INT, StartInstanceLocation: ::UINT + ) -> (), + fn Dispatch( + &mut self, ThreadGroupCountX: ::UINT, ThreadGroupCountY: ::UINT, ThreadGroupCountZ: ::UINT + ) -> (), + fn CopyBufferRegion( + &mut self, pDstBuffer: *mut ::ID3D12Resource, DstOffset: ::UINT64, + pSrcBuffer: *mut ::ID3D12Resource, SrcOffset: ::UINT64, NumBytes: ::UINT64 + ) -> (), + fn CopyTextureRegion( + &mut self, pDst: *const ::D3D12_TEXTURE_COPY_LOCATION, DstX: ::UINT, DstY: ::UINT, + DstZ: ::UINT, pSrc: *const ::D3D12_TEXTURE_COPY_LOCATION, pSrcBox: *const ::D3D12_BOX + ) -> (), + fn CopyResource( + &mut self, pDstResource: *mut ::ID3D12Resource, pSrcResource: *mut ::ID3D12Resource + ) -> (), + fn CopyTiles( + &mut self, pTiledResource: *mut ::ID3D12Resource, + pTileRegionStartCoordinate: *const ::D3D12_TILED_RESOURCE_COORDINATE, + pTileRegionSize: *const ::D3D12_TILE_REGION_SIZE, pBuffer: *mut ::ID3D12Resource, + BufferStartOffsetInBytes: ::UINT64, Flags: ::D3D12_TILE_COPY_FLAGS + ) -> (), + fn ResolveSubresource( + &mut self, pDstResource: *mut ::ID3D12Resource, DstSubresource: ::UINT, + pSrcResource: *mut ::ID3D12Resource, SrcSubresource: ::UINT, Format: ::DXGI_FORMAT + ) -> (), + fn IASetPrimitiveTopology( + &mut self, PrimitiveTopology: ::D3D12_PRIMITIVE_TOPOLOGY + ) -> (), + fn RSSetViewports( + &mut self, NumViewports: ::UINT, pViewports: *const ::D3D12_VIEWPORT + ) -> (), + fn RSSetScissorRects( + &mut self, NumRects: ::UINT, pRects: *const ::D3D12_RECT + ) -> (), + fn OMSetBlendFactor(&mut self, BlendFactor: *const [::FLOAT; 4]) -> (), + fn OMSetStencilRef(&mut self, StencilRef: ::UINT) -> (), + fn SetPipelineState( + &mut self, pPipelineState: *mut ::ID3D12PipelineState + ) -> (), + fn ResourceBarrier( + &mut self, NumBarriers: ::UINT, pBarriers: *const ::D3D12_RESOURCE_BARRIER + ) -> (), + fn ExecuteBundle( + &mut self, pCommandList: *mut ::ID3D12GraphicsCommandList + ) -> (), + fn SetDescriptorHeaps( + &mut self, NumDescriptorHeaps: ::UINT, ppDescriptorHeaps: *mut *mut ::ID3D12DescriptorHeap + ) -> (), + fn SetComputeRootSignature( + &mut self, pRootSignature: *mut ::ID3D12RootSignature + ) -> (), + fn SetGraphicsRootSignature( + &mut self, pRootSignature: *mut ::ID3D12RootSignature + ) -> (), + fn SetComputeRootDescriptorTable( + &mut self, RootParameterIndex: ::UINT, BaseDescriptor: ::D3D12_GPU_DESCRIPTOR_HANDLE + ) -> (), + fn SetGraphicsRootDescriptorTable( + &mut self, RootParameterIndex: ::UINT, BaseDescriptor: ::D3D12_GPU_DESCRIPTOR_HANDLE + ) -> (), + fn SetComputeRoot32BitConstant( + &mut self, RootParameterIndex: ::UINT, SrcData: ::UINT, DestOffsetIn32BitValues: ::UINT + ) -> (), + fn SetGraphicsRoot32BitConstant( + &mut self, RootParameterIndex: ::UINT, SrcData: ::UINT, DestOffsetIn32BitValues: ::UINT + ) -> (), + fn SetComputeRoot32BitConstants( + &mut self, RootParameterIndex: ::UINT, Num32BitValuesToSet: ::UINT, + pSrcData: *const ::c_void, DestOffsetIn32BitValues: ::UINT + ) -> (), + fn SetGraphicsRoot32BitConstants( + &mut self, RootParameterIndex: ::UINT, Num32BitValuesToSet: ::UINT, + pSrcData: *const ::c_void, DestOffsetIn32BitValues: ::UINT + ) -> (), + fn SetComputeRootConstantBufferView( + &mut self, RootParameterIndex: ::UINT, BufferLocation: ::D3D12_GPU_VIRTUAL_ADDRESS + ) -> (), + fn SetGraphicsRootConstantBufferView( + &mut self, RootParameterIndex: ::UINT, BufferLocation: ::D3D12_GPU_VIRTUAL_ADDRESS + ) -> (), + fn SetComputeRootShaderResourceView( + &mut self, RootParameterIndex: ::UINT, BufferLocation: ::D3D12_GPU_VIRTUAL_ADDRESS + ) -> (), + fn SetGraphicsRootShaderResourceView( + &mut self, RootParameterIndex: ::UINT, BufferLocation: ::D3D12_GPU_VIRTUAL_ADDRESS + ) -> (), + fn SetComputeRootUnorderedAccessView( + &mut self, RootParameterIndex: ::UINT, BufferLocation: ::D3D12_GPU_VIRTUAL_ADDRESS + ) -> (), + fn SetGraphicsRootUnorderedAccessView( + &mut self, RootParameterIndex: ::UINT, BufferLocation: ::D3D12_GPU_VIRTUAL_ADDRESS + ) -> (), + fn IASetIndexBuffer( + &mut self, pView: *const ::D3D12_INDEX_BUFFER_VIEW + ) -> (), + fn IASetVertexBuffers( + &mut self, StartSlot: ::UINT, NumViews: ::UINT, pViews: *const ::D3D12_VERTEX_BUFFER_VIEW + ) -> (), + fn SOSetTargets( + &mut self, StartSlot: ::UINT, NumViews: ::UINT, + pViews: *const ::D3D12_STREAM_OUTPUT_BUFFER_VIEW + ) -> (), + fn OMSetRenderTargets( + &mut self, NumRenderTargetDescriptors: ::UINT, + pRenderTargetDescriptors: *const ::D3D12_CPU_DESCRIPTOR_HANDLE, + RTsSingleHandleToDescriptorRange: ::BOOL, + pDepthStencilDescriptor: *const ::D3D12_CPU_DESCRIPTOR_HANDLE + ) -> (), + fn ClearDepthStencilView( + &mut self, DepthStencilView: ::D3D12_CPU_DESCRIPTOR_HANDLE, + ClearFlags: ::D3D12_CLEAR_FLAGS, Depth: ::FLOAT, Stencil: ::UINT8, NumRects: ::UINT, + pRects: *const ::D3D12_RECT + ) -> (), + fn ClearRenderTargetView( + &mut self, RenderTargetView: ::D3D12_CPU_DESCRIPTOR_HANDLE, ColorRGBA: *const [::FLOAT; 4], + NumRects: ::UINT, pRects: *const ::D3D12_RECT + ) -> (), + fn ClearUnorderedAccessViewUint( + &mut self, ViewGPUHandleInCurrentHeap: ::D3D12_GPU_DESCRIPTOR_HANDLE, + ViewCPUHandle: ::D3D12_CPU_DESCRIPTOR_HANDLE, pResource: *mut ::ID3D12Resource, + Values: *const [::UINT; 4], NumRects: ::UINT, pRects: *const ::D3D12_RECT + ) -> (), + fn ClearUnorderedAccessViewFloat( + &mut self, ViewGPUHandleInCurrentHeap: ::D3D12_GPU_DESCRIPTOR_HANDLE, + ViewCPUHandle: ::D3D12_CPU_DESCRIPTOR_HANDLE, pResource: *mut ::ID3D12Resource, + Values: *const [::FLOAT; 4], NumRects: ::UINT, pRects: *const ::D3D12_RECT + ) -> (), + fn DiscardResource( + &mut self, pResource: *mut ::ID3D12Resource, pRegion: *const ::D3D12_DISCARD_REGION + ) -> (), + fn BeginQuery( + &mut self, pQueryHeap: *mut ::ID3D12QueryHeap, Type: ::D3D12_QUERY_TYPE, Index: ::UINT + ) -> (), + fn EndQuery( + &mut self, pQueryHeap: *mut ::ID3D12QueryHeap, Type: ::D3D12_QUERY_TYPE, Index: ::UINT + ) -> (), + fn ResolveQueryData( + &mut self, pQueryHeap: *mut ::ID3D12QueryHeap, Type: ::D3D12_QUERY_TYPE, + StartIndex: ::UINT, NumQueries: ::UINT, pDestinationBuffer: *mut ::ID3D12Resource, + AlignedDestinationBufferOffset: ::UINT64 + ) -> (), + fn SetPredication( + &mut self, pBuffer: *mut ::ID3D12Resource, AlignedBufferOffset: ::UINT64, + Operation: ::D3D12_PREDICATION_OP + ) -> (), + fn SetMarker( + &mut self, Metadata: ::UINT, pData: *const ::c_void, Size: ::UINT + ) -> (), + fn BeginEvent( + &mut self, Metadata: ::UINT, pData: *const ::c_void, Size: ::UINT + ) -> (), + fn EndEvent(&mut self) -> (), + fn ExecuteIndirect( + &mut self, pCommandSignature: *mut ::ID3D12CommandSignature, MaxCommandCount: ::UINT, + pArgumentBuffer: *mut ::ID3D12Resource, ArgumentBufferOffset: ::UINT64, + pCountBuffer: *mut ::ID3D12Resource, CountBufferOffset: ::UINT64 + ) -> () +}); + +RIDL!( +interface ID3D12Heap(ID3D12HeapVtbl): ID3D12Pageable(ID3D12PageableVtbl) { + fn GetDesc( + &mut self, __ret_val: *mut ::D3D12_HEAP_DESC + ) -> *mut ::D3D12_HEAP_DESC +}); + + + +RIDL!( +interface ID3D12Pageable(ID3D12PageableVtbl): ID3D12DeviceChild(ID3D12DeviceChildVtbl) { +}); + +RIDL!( +interface ID3D12PipelineState(ID3D12PipelineStateVtbl): ID3D12Pageable(ID3D12PageableVtbl) { + fn GetCachedBlob(&mut self, ppBlob: *mut *mut ::ID3DBlob) -> ::HRESULT +}); + +RIDL!( +interface ID3D12QueryHeap(ID3D12QueryHeapVtbl): ID3D12Pageable(ID3D12PageableVtbl) { +}); + +RIDL!( +interface ID3D12Resource(ID3D12ResourceVtbl): ID3D12Pageable(ID3D12PageableVtbl) { + fn Map( + &mut self, Subresource: ::UINT, pReadRange: *const ::D3D12_RANGE, + ppData: *mut *mut ::c_void + ) -> ::HRESULT, + fn Unmap( + &mut self, Subresource: ::UINT, pWrittenRange: *const ::D3D12_RANGE + ) -> (), + fn GetDesc( + &mut self, __ret_val: *mut ::D3D12_RESOURCE_DESC + ) -> *mut ::D3D12_RESOURCE_DESC, + fn GetGPUVirtualAddress(&mut self) -> ::D3D12_GPU_VIRTUAL_ADDRESS, + fn WriteToSubresource( + &mut self, DstSubresource: ::UINT, pDstBox: *const ::D3D12_BOX, pSrcData: *const ::c_void, + SrcRowPitch: ::UINT, SrcDepthPitch: ::UINT + ) -> ::HRESULT, + fn ReadFromSubresource( + &mut self, pDstData: *mut ::c_void, DstRowPitch: ::UINT, DstDepthPitch: ::UINT, + SrcSubresource: ::UINT, pSrcBox: *const ::D3D12_BOX + ) -> ::HRESULT, + fn GetHeapProperties( + &mut self, pHeapProperties: *mut ::D3D12_HEAP_PROPERTIES, + pHeapFlags: *mut ::D3D12_HEAP_FLAGS + ) -> ::HRESULT +}); + +RIDL!( +interface ID3D12RootSignatureDeserializer(ID3D12RootSignatureDeserializerVtbl): IUnknown(IUnknownVtbl) { + fn GetRootSignatureDesc(&mut self) -> *const ::D3D12_ROOT_SIGNATURE_DESC +}); + + + +pub type PFN_D3D12_CREATE_DEVICE = extern "system" fn (_ : *mut ::IUnknown, _ : ::D3D_FEATURE_LEVEL, _ : ::REFGUID, _ : *mut *mut ::c_void) -> ::HRESULT; +pub type PFN_D3D12_CREATE_ROOT_SIGNATURE_DESERIALIZER = extern "system" fn (pSrcData: ::LPCVOID, SrcDataSizeInBytes: ::SIZE_T, pRootSignatureDeserializerInterface: ::REFGUID, ppRootSignatureDeserializer: *mut *mut ::c_void) -> ::HRESULT; +pub type PFN_D3D12_GET_DEBUG_INTERFACE = extern "system" fn (_ : ::REFGUID, _ : *mut *mut ::c_void) -> ::HRESULT; +pub type PFN_D3D12_SERIALIZE_ROOT_SIGNATURE = extern "system" fn (pRootSignature: *const ::D3D12_ROOT_SIGNATURE_DESC, Version: ::D3D_ROOT_SIGNATURE_VERSION, ppBlob: *mut *mut ::ID3DBlob, ppErrorBlob: *mut *mut ::ID3DBlob) -> ::HRESULT; diff --git a/deps/winapi-0.2.6/src/d3d12sdklayers.rs b/deps/winapi-0.2.6/src/d3d12sdklayers.rs new file mode 100644 index 000000000..f1598867e --- /dev/null +++ b/deps/winapi-0.2.6/src/d3d12sdklayers.rs @@ -0,0 +1,1063 @@ +// Copyright © 2015, Dmitry Roschin +// Licensed under the MIT License <LICENSE.md> +RIDL!{interface ID3D12Debug(ID3D12DebugVtbl): IUnknown(IUnknownVtbl) { + fn EnableDebugLayer(&mut self) -> () +}} +FLAGS!{enum D3D12_DEBUG_FEATURE { + D3D12_DEBUG_FEATURE_NONE = 0, + D3D12_DEBUG_FEATURE_TREAT_BUNDLE_AS_DRAW = 0x1, + D3D12_DEBUG_FEATURE_TREAT_BUNDLE_AS_DISPATCH = 0x2, +}} +FLAGS!{enum D3D12_RLDO_FLAGS { + D3D12_RLDO_NONE = 0x0, + D3D12_RLDO_SUMMARY = 0x1, + D3D12_RLDO_DETAIL = 0x2, + D3D12_RLDO_IGNORE_INTERNAL = 0x4, +}} +RIDL!{interface ID3D12DebugDevice(ID3D12DebugDeviceVtbl): IUnknown(IUnknownVtbl) { + fn SetFeatureMask(&mut self, Mask: ::D3D12_DEBUG_FEATURE) -> ::HRESULT, + fn GetFeatureMask(&mut self) -> ::D3D12_DEBUG_FEATURE, + fn ReportLiveDeviceObjects(&mut self, Flags: ::D3D12_RLDO_FLAGS) -> ::HRESULT +}} +RIDL!{interface ID3D12DebugCommandQueue(ID3D12DebugCommandQueueVtbl): IUnknown(IUnknownVtbl) { + fn AssertResourceState( + &mut self, pResource: *mut ::ID3D12Resource, Subresource: ::UINT, State: ::UINT + ) -> ::BOOL +}} +RIDL!{interface ID3D12DebugCommandList(ID3D12DebugCommandListVtbl): IUnknown(IUnknownVtbl) { + fn AssertResourceState( + &mut self, pResource: *mut ::ID3D12Resource, Subresource: ::UINT, State: ::UINT + ) -> ::BOOL, + fn SetFeatureMask(&mut self, Mask: ::D3D12_DEBUG_FEATURE) -> ::HRESULT, + fn GetFeatureMask(&mut self) -> ::D3D12_DEBUG_FEATURE +}} +ENUM!{enum D3D12_MESSAGE_CATEGORY { + D3D12_MESSAGE_CATEGORY_APPLICATION_DEFINED = 0, + D3D12_MESSAGE_CATEGORY_MISCELLANEOUS = 1, + D3D12_MESSAGE_CATEGORY_INITIALIZATION = 2, + D3D12_MESSAGE_CATEGORY_CLEANUP = 3, + D3D12_MESSAGE_CATEGORY_COMPILATION = 4, + D3D12_MESSAGE_CATEGORY_STATE_CREATION = 5, + D3D12_MESSAGE_CATEGORY_STATE_SETTING = 6, + D3D12_MESSAGE_CATEGORY_STATE_GETTING = 7, + D3D12_MESSAGE_CATEGORY_RESOURCE_MANIPULATION = 8, + D3D12_MESSAGE_CATEGORY_EXECUTION = 9, + D3D12_MESSAGE_CATEGORY_SHADER = 10, +}} +ENUM!{enum D3D12_MESSAGE_SEVERITY { + D3D12_MESSAGE_SEVERITY_CORRUPTION = 0, + D3D12_MESSAGE_SEVERITY_ERROR = 1, + D3D12_MESSAGE_SEVERITY_WARNING = 2, + D3D12_MESSAGE_SEVERITY_INFO = 3, + D3D12_MESSAGE_SEVERITY_MESSAGE = 4, +}} +ENUM!{enum D3D12_MESSAGE_ID { + D3D12_MESSAGE_ID_UNKNOWN = 0, + D3D12_MESSAGE_ID_STRING_FROM_APPLICATION = 1, + D3D12_MESSAGE_ID_CORRUPTED_THIS = 2, + D3D12_MESSAGE_ID_CORRUPTED_PARAMETER1 = 3, + D3D12_MESSAGE_ID_CORRUPTED_PARAMETER2 = 4, + D3D12_MESSAGE_ID_CORRUPTED_PARAMETER3 = 5, + D3D12_MESSAGE_ID_CORRUPTED_PARAMETER4 = 6, + D3D12_MESSAGE_ID_CORRUPTED_PARAMETER5 = 7, + D3D12_MESSAGE_ID_CORRUPTED_PARAMETER6 = 8, + D3D12_MESSAGE_ID_CORRUPTED_PARAMETER7 = 9, + D3D12_MESSAGE_ID_CORRUPTED_PARAMETER8 = 10, + D3D12_MESSAGE_ID_CORRUPTED_PARAMETER9 = 11, + D3D12_MESSAGE_ID_CORRUPTED_PARAMETER10 = 12, + D3D12_MESSAGE_ID_CORRUPTED_PARAMETER11 = 13, + D3D12_MESSAGE_ID_CORRUPTED_PARAMETER12 = 14, + D3D12_MESSAGE_ID_CORRUPTED_PARAMETER13 = 15, + D3D12_MESSAGE_ID_CORRUPTED_PARAMETER14 = 16, + D3D12_MESSAGE_ID_CORRUPTED_PARAMETER15 = 17, + D3D12_MESSAGE_ID_CORRUPTED_MULTITHREADING = 18, + D3D12_MESSAGE_ID_MESSAGE_REPORTING_OUTOFMEMORY = 19, + D3D12_MESSAGE_ID_GETPRIVATEDATA_MOREDATA = 20, + D3D12_MESSAGE_ID_SETPRIVATEDATA_INVALIDFREEDATA = 21, + D3D12_MESSAGE_ID_SETPRIVATEDATA_INVALIDIUNKNOWN = 22, + D3D12_MESSAGE_ID_SETPRIVATEDATA_INVALIDFLAGS = 23, + D3D12_MESSAGE_ID_SETPRIVATEDATA_CHANGINGPARAMS = 24, + D3D12_MESSAGE_ID_SETPRIVATEDATA_OUTOFMEMORY = 25, + D3D12_MESSAGE_ID_CREATESHADERRESOURCEVIEW_UNRECOGNIZEDFORMAT = 26, + D3D12_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDDESC = 27, + D3D12_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDFORMAT = 28, + D3D12_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDVIDEOPLANESLICE = 29, + D3D12_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDPLANESLICE = 30, + D3D12_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDDIMENSIONS = 31, + D3D12_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDRESOURCE = 32, + D3D12_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDARG_RETURN = 33, + D3D12_MESSAGE_ID_CREATESHADERRESOURCEVIEW_OUTOFMEMORY_RETURN = 34, + D3D12_MESSAGE_ID_CREATERENDERTARGETVIEW_UNRECOGNIZEDFORMAT = 35, + D3D12_MESSAGE_ID_CREATERENDERTARGETVIEW_UNSUPPORTEDFORMAT = 36, + D3D12_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDDESC = 37, + D3D12_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDFORMAT = 38, + D3D12_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDVIDEOPLANESLICE = 39, + D3D12_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDPLANESLICE = 40, + D3D12_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDDIMENSIONS = 41, + D3D12_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDRESOURCE = 42, + D3D12_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDARG_RETURN = 43, + D3D12_MESSAGE_ID_CREATERENDERTARGETVIEW_OUTOFMEMORY_RETURN = 44, + D3D12_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_UNRECOGNIZEDFORMAT = 45, + D3D12_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_INVALIDDESC = 46, + D3D12_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_INVALIDFORMAT = 47, + D3D12_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_INVALIDDIMENSIONS = 48, + D3D12_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_INVALIDRESOURCE = 49, + D3D12_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_INVALIDARG_RETURN = 50, + D3D12_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_OUTOFMEMORY_RETURN = 51, + D3D12_MESSAGE_ID_CREATEINPUTLAYOUT_OUTOFMEMORY = 52, + D3D12_MESSAGE_ID_CREATEINPUTLAYOUT_TOOMANYELEMENTS = 53, + D3D12_MESSAGE_ID_CREATEINPUTLAYOUT_INVALIDFORMAT = 54, + D3D12_MESSAGE_ID_CREATEINPUTLAYOUT_INCOMPATIBLEFORMAT = 55, + D3D12_MESSAGE_ID_CREATEINPUTLAYOUT_INVALIDSLOT = 56, + D3D12_MESSAGE_ID_CREATEINPUTLAYOUT_INVALIDINPUTSLOTCLASS = 57, + D3D12_MESSAGE_ID_CREATEINPUTLAYOUT_STEPRATESLOTCLASSMISMATCH = 58, + D3D12_MESSAGE_ID_CREATEINPUTLAYOUT_INVALIDSLOTCLASSCHANGE = 59, + D3D12_MESSAGE_ID_CREATEINPUTLAYOUT_INVALIDSTEPRATECHANGE = 60, + D3D12_MESSAGE_ID_CREATEINPUTLAYOUT_INVALIDALIGNMENT = 61, + D3D12_MESSAGE_ID_CREATEINPUTLAYOUT_DUPLICATESEMANTIC = 62, + D3D12_MESSAGE_ID_CREATEINPUTLAYOUT_UNPARSEABLEINPUTSIGNATURE = 63, + D3D12_MESSAGE_ID_CREATEINPUTLAYOUT_NULLSEMANTIC = 64, + D3D12_MESSAGE_ID_CREATEINPUTLAYOUT_MISSINGELEMENT = 65, + D3D12_MESSAGE_ID_CREATEVERTEXSHADER_OUTOFMEMORY = 66, + D3D12_MESSAGE_ID_CREATEVERTEXSHADER_INVALIDSHADERBYTECODE = 67, + D3D12_MESSAGE_ID_CREATEVERTEXSHADER_INVALIDSHADERTYPE = 68, + D3D12_MESSAGE_ID_CREATEGEOMETRYSHADER_OUTOFMEMORY = 69, + D3D12_MESSAGE_ID_CREATEGEOMETRYSHADER_INVALIDSHADERBYTECODE = 70, + D3D12_MESSAGE_ID_CREATEGEOMETRYSHADER_INVALIDSHADERTYPE = 71, + D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_OUTOFMEMORY = 72, + D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDSHADERBYTECODE = 73, + D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDSHADERTYPE = 74, + D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDNUMENTRIES = 75, + D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_OUTPUTSTREAMSTRIDEUNUSED = 76, + D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_UNEXPECTEDDECL = 77, + D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_EXPECTEDDECL = 78, + D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_OUTPUTSLOT0EXPECTED = 79, + D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDOUTPUTSLOT = 80, + D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_ONLYONEELEMENTPERSLOT = 81, + D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDCOMPONENTCOUNT = 82, + D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDSTARTCOMPONENTANDCOMPONENTCOUNT = 83, + D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDGAPDEFINITION = 84, + D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_REPEATEDOUTPUT = 85, + D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDOUTPUTSTREAMSTRIDE = 86, + D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_MISSINGSEMANTIC = 87, + D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_MASKMISMATCH = 88, + D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_CANTHAVEONLYGAPS = 89, + D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_DECLTOOCOMPLEX = 90, + D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_MISSINGOUTPUTSIGNATURE = 91, + D3D12_MESSAGE_ID_CREATEPIXELSHADER_OUTOFMEMORY = 92, + D3D12_MESSAGE_ID_CREATEPIXELSHADER_INVALIDSHADERBYTECODE = 93, + D3D12_MESSAGE_ID_CREATEPIXELSHADER_INVALIDSHADERTYPE = 94, + D3D12_MESSAGE_ID_CREATERASTERIZERSTATE_INVALIDFILLMODE = 95, + D3D12_MESSAGE_ID_CREATERASTERIZERSTATE_INVALIDCULLMODE = 96, + D3D12_MESSAGE_ID_CREATERASTERIZERSTATE_INVALIDDEPTHBIASCLAMP = 97, + D3D12_MESSAGE_ID_CREATERASTERIZERSTATE_INVALIDSLOPESCALEDDEPTHBIAS = 98, + D3D12_MESSAGE_ID_CREATERASTERIZERSTATE_NULLDESC = 99, + D3D12_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDDEPTHWRITEMASK = 100, + D3D12_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDDEPTHFUNC = 101, + D3D12_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDFRONTFACESTENCILFAILOP = 102, + D3D12_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDFRONTFACESTENCILZFAILOP = 103, + D3D12_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDFRONTFACESTENCILPASSOP = 104, + D3D12_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDFRONTFACESTENCILFUNC = 105, + D3D12_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDBACKFACESTENCILFAILOP = 106, + D3D12_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDBACKFACESTENCILZFAILOP = 107, + D3D12_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDBACKFACESTENCILPASSOP = 108, + D3D12_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_INVALIDBACKFACESTENCILFUNC = 109, + D3D12_MESSAGE_ID_CREATEDEPTHSTENCILSTATE_NULLDESC = 110, + D3D12_MESSAGE_ID_CREATEBLENDSTATE_INVALIDSRCBLEND = 111, + D3D12_MESSAGE_ID_CREATEBLENDSTATE_INVALIDDESTBLEND = 112, + D3D12_MESSAGE_ID_CREATEBLENDSTATE_INVALIDBLENDOP = 113, + D3D12_MESSAGE_ID_CREATEBLENDSTATE_INVALIDSRCBLENDALPHA = 114, + D3D12_MESSAGE_ID_CREATEBLENDSTATE_INVALIDDESTBLENDALPHA = 115, + D3D12_MESSAGE_ID_CREATEBLENDSTATE_INVALIDBLENDOPALPHA = 116, + D3D12_MESSAGE_ID_CREATEBLENDSTATE_INVALIDRENDERTARGETWRITEMASK = 117, + D3D12_MESSAGE_ID_CREATEBLENDSTATE_NULLDESC = 118, + D3D12_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDFILTER = 119, + D3D12_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDADDRESSU = 120, + D3D12_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDADDRESSV = 121, + D3D12_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDADDRESSW = 122, + D3D12_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDMIPLODBIAS = 123, + D3D12_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDMAXANISOTROPY = 124, + D3D12_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDCOMPARISONFUNC = 125, + D3D12_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDMINLOD = 126, + D3D12_MESSAGE_ID_CREATESAMPLERSTATE_INVALIDMAXLOD = 127, + D3D12_MESSAGE_ID_CREATESAMPLERSTATE_NULLDESC = 128, + D3D12_MESSAGE_ID_DEVICE_IASETPRIMITIVETOPOLOGY_TOPOLOGY_UNRECOGNIZED = 129, + D3D12_MESSAGE_ID_DEVICE_IASETPRIMITIVETOPOLOGY_TOPOLOGY_UNDEFINED = 130, + D3D12_MESSAGE_ID_DEVICE_RSSETVIEWPORTS_INVALIDVIEWPORT = 131, + D3D12_MESSAGE_ID_DEVICE_RSSETSCISSORRECTS_INVALIDSCISSOR = 132, + D3D12_MESSAGE_ID_CLEARRENDERTARGETVIEW_DENORMFLUSH = 133, + D3D12_MESSAGE_ID_CLEARDEPTHSTENCILVIEW_DENORMFLUSH = 134, + D3D12_MESSAGE_ID_CLEARDEPTHSTENCILVIEW_INVALID = 135, + D3D12_MESSAGE_ID_COPYRESOURCE_INVALIDSOURCE = 136, + D3D12_MESSAGE_ID_COPYRESOURCE_INVALIDDESTINATIONSTATE = 137, + D3D12_MESSAGE_ID_COPYRESOURCE_INVALIDSOURCESTATE = 138, + D3D12_MESSAGE_ID_UPDATESUBRESOURCE_INVALIDDESTINATIONSUBRESOURCE = 139, + D3D12_MESSAGE_ID_UPDATESUBRESOURCE_INVALIDDESTINATIONBOX = 140, + D3D12_MESSAGE_ID_UPDATESUBRESOURCE_INVALIDDESTINATIONSTATE = 141, + D3D12_MESSAGE_ID_DEVICE_RESOLVESUBRESOURCE_DESTINATION_INVALID = 142, + D3D12_MESSAGE_ID_DEVICE_RESOLVESUBRESOURCE_DESTINATION_SUBRESOURCE_INVALID = 143, + D3D12_MESSAGE_ID_DEVICE_RESOLVESUBRESOURCE_SOURCE_INVALID = 144, + D3D12_MESSAGE_ID_DEVICE_RESOLVESUBRESOURCE_SOURCE_SUBRESOURCE_INVALID = 145, + D3D12_MESSAGE_ID_DEVICE_RESOLVESUBRESOURCE_FORMAT_INVALID = 146, + D3D12_MESSAGE_ID_BUFFER_MAP_INVALIDMAPTYPE = 147, + D3D12_MESSAGE_ID_BUFFER_MAP_INVALIDFLAGS = 148, + D3D12_MESSAGE_ID_BUFFER_MAP_ALREADYMAPPED = 149, + D3D12_MESSAGE_ID_BUFFER_MAP_DEVICEREMOVED_RETURN = 150, + D3D12_MESSAGE_ID_BUFFER_UNMAP_NOTMAPPED = 151, + D3D12_MESSAGE_ID_TEXTURE1D_MAP_INVALIDMAPTYPE = 152, + D3D12_MESSAGE_ID_TEXTURE1D_MAP_INVALIDSUBRESOURCE = 153, + D3D12_MESSAGE_ID_TEXTURE1D_MAP_INVALIDFLAGS = 154, + D3D12_MESSAGE_ID_TEXTURE1D_MAP_ALREADYMAPPED = 155, + D3D12_MESSAGE_ID_TEXTURE1D_MAP_DEVICEREMOVED_RETURN = 156, + D3D12_MESSAGE_ID_TEXTURE1D_UNMAP_INVALIDSUBRESOURCE = 157, + D3D12_MESSAGE_ID_TEXTURE1D_UNMAP_NOTMAPPED = 158, + D3D12_MESSAGE_ID_TEXTURE2D_MAP_INVALIDMAPTYPE = 159, + D3D12_MESSAGE_ID_TEXTURE2D_MAP_INVALIDSUBRESOURCE = 160, + D3D12_MESSAGE_ID_TEXTURE2D_MAP_INVALIDFLAGS = 161, + D3D12_MESSAGE_ID_TEXTURE2D_MAP_ALREADYMAPPED = 162, + D3D12_MESSAGE_ID_TEXTURE2D_MAP_DEVICEREMOVED_RETURN = 163, + D3D12_MESSAGE_ID_TEXTURE2D_UNMAP_INVALIDSUBRESOURCE = 164, + D3D12_MESSAGE_ID_TEXTURE2D_UNMAP_NOTMAPPED = 165, + D3D12_MESSAGE_ID_TEXTURE3D_MAP_INVALIDMAPTYPE = 166, + D3D12_MESSAGE_ID_TEXTURE3D_MAP_INVALIDSUBRESOURCE = 167, + D3D12_MESSAGE_ID_TEXTURE3D_MAP_INVALIDFLAGS = 168, + D3D12_MESSAGE_ID_TEXTURE3D_MAP_ALREADYMAPPED = 169, + D3D12_MESSAGE_ID_TEXTURE3D_MAP_DEVICEREMOVED_RETURN = 170, + D3D12_MESSAGE_ID_TEXTURE3D_UNMAP_INVALIDSUBRESOURCE = 171, + D3D12_MESSAGE_ID_TEXTURE3D_UNMAP_NOTMAPPED = 172, + D3D12_MESSAGE_ID_CHECKFORMATSUPPORT_FORMAT_DEPRECATED = 173, + D3D12_MESSAGE_ID_CHECKMULTISAMPLEQUALITYLEVELS_FORMAT_DEPRECATED = 174, + D3D12_MESSAGE_ID_SETEXCEPTIONMODE_UNRECOGNIZEDFLAGS = 175, + D3D12_MESSAGE_ID_SETEXCEPTIONMODE_INVALIDARG_RETURN = 176, + D3D12_MESSAGE_ID_SETEXCEPTIONMODE_DEVICEREMOVED_RETURN = 177, + D3D12_MESSAGE_ID_REF_SIMULATING_INFINITELY_FAST_HARDWARE = 178, + D3D12_MESSAGE_ID_REF_THREADING_MODE = 179, + D3D12_MESSAGE_ID_REF_UMDRIVER_EXCEPTION = 180, + D3D12_MESSAGE_ID_REF_KMDRIVER_EXCEPTION = 181, + D3D12_MESSAGE_ID_REF_HARDWARE_EXCEPTION = 182, + D3D12_MESSAGE_ID_REF_ACCESSING_INDEXABLE_TEMP_OUT_OF_RANGE = 183, + D3D12_MESSAGE_ID_REF_PROBLEM_PARSING_SHADER = 184, + D3D12_MESSAGE_ID_REF_OUT_OF_MEMORY = 185, + D3D12_MESSAGE_ID_REF_INFO = 186, + D3D12_MESSAGE_ID_DEVICE_DRAW_VERTEXPOS_OVERFLOW = 187, + D3D12_MESSAGE_ID_DEVICE_DRAWINDEXED_INDEXPOS_OVERFLOW = 188, + D3D12_MESSAGE_ID_DEVICE_DRAWINSTANCED_VERTEXPOS_OVERFLOW = 189, + D3D12_MESSAGE_ID_DEVICE_DRAWINSTANCED_INSTANCEPOS_OVERFLOW = 190, + D3D12_MESSAGE_ID_DEVICE_DRAWINDEXEDINSTANCED_INSTANCEPOS_OVERFLOW = 191, + D3D12_MESSAGE_ID_DEVICE_DRAWINDEXEDINSTANCED_INDEXPOS_OVERFLOW = 192, + D3D12_MESSAGE_ID_DEVICE_DRAW_VERTEX_SHADER_NOT_SET = 193, + D3D12_MESSAGE_ID_DEVICE_SHADER_LINKAGE_SEMANTICNAME_NOT_FOUND = 194, + D3D12_MESSAGE_ID_DEVICE_SHADER_LINKAGE_REGISTERINDEX = 195, + D3D12_MESSAGE_ID_DEVICE_SHADER_LINKAGE_COMPONENTTYPE = 196, + D3D12_MESSAGE_ID_DEVICE_SHADER_LINKAGE_REGISTERMASK = 197, + D3D12_MESSAGE_ID_DEVICE_SHADER_LINKAGE_SYSTEMVALUE = 198, + D3D12_MESSAGE_ID_DEVICE_SHADER_LINKAGE_NEVERWRITTEN_ALWAYSREADS = 199, + D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_ROOT_SIGNATURE_NOT_SET = 200, + D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_ROOT_SIGNATURE_MISMATCH = 201, + D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_VERTEX_BUFFER_NOT_SET = 202, + D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_INPUTLAYOUT_NOT_SET = 203, + D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_CONSTANT_BUFFER_NOT_SET = 204, + D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_CONSTANT_BUFFER_TOO_SMALL = 205, + D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_SAMPLER_NOT_SET = 206, + D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_SHADERRESOURCEVIEW_NOT_SET = 207, + D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_VIEW_DIMENSION_MISMATCH = 208, + D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_VERTEX_BUFFER_STRIDE_TOO_SMALL = 209, + D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_VERTEX_BUFFER_TOO_SMALL = 210, + D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_INDEX_BUFFER_NOT_SET = 211, + D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_INDEX_BUFFER_FORMAT_INVALID = 212, + D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_INDEX_BUFFER_TOO_SMALL = 213, + D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_GS_INPUT_PRIMITIVE_MISMATCH = 214, + D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_RESOURCE_RETURN_TYPE_MISMATCH = 215, + D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_POSITION_NOT_PRESENT = 216, + D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_OUTPUT_STREAM_NOT_SET = 217, + D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_BOUND_RESOURCE_MAPPED = 218, + D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_INVALID_PRIMITIVETOPOLOGY = 219, + D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_VERTEX_OFFSET_UNALIGNED = 220, + D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_VERTEX_STRIDE_UNALIGNED = 221, + D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_INDEX_OFFSET_UNALIGNED = 222, + D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_OUTPUT_STREAM_OFFSET_UNALIGNED = 223, + D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_RESOURCE_FORMAT_LD_UNSUPPORTED = 224, + D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_RESOURCE_FORMAT_SAMPLE_UNSUPPORTED = 225, + D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_RESOURCE_FORMAT_SAMPLE_C_UNSUPPORTED = 226, + D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_RESOURCE_MULTISAMPLE_UNSUPPORTED = 227, + D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_SO_TARGETS_BOUND_WITHOUT_SOURCE = 228, + D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_SO_STRIDE_LARGER_THAN_BUFFER = 229, + D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_OM_RENDER_TARGET_DOES_NOT_SUPPORT_BLENDING = 230, + D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_OM_DUAL_SOURCE_BLENDING_CAN_ONLY_HAVE_RENDER_TARGET_0 = 231, + D3D12_MESSAGE_ID_DEVICE_REMOVAL_PROCESS_AT_FAULT = 232, + D3D12_MESSAGE_ID_DEVICE_REMOVAL_PROCESS_POSSIBLY_AT_FAULT = 233, + D3D12_MESSAGE_ID_DEVICE_REMOVAL_PROCESS_NOT_AT_FAULT = 234, + D3D12_MESSAGE_ID_DEVICE_OPEN_SHARED_RESOURCE_INVALIDARG_RETURN = 235, + D3D12_MESSAGE_ID_DEVICE_OPEN_SHARED_RESOURCE_OUTOFMEMORY_RETURN = 236, + D3D12_MESSAGE_ID_DEVICE_OPEN_SHARED_RESOURCE_BADINTERFACE_RETURN = 237, + D3D12_MESSAGE_ID_DEVICE_DRAW_VIEWPORT_NOT_SET = 238, + D3D12_MESSAGE_ID_CREATEINPUTLAYOUT_TRAILING_DIGIT_IN_SEMANTIC = 239, + D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_TRAILING_DIGIT_IN_SEMANTIC = 240, + D3D12_MESSAGE_ID_DEVICE_RSSETVIEWPORTS_DENORMFLUSH = 241, + D3D12_MESSAGE_ID_OMSETRENDERTARGETS_INVALIDVIEW = 242, + D3D12_MESSAGE_ID_DEVICE_SETTEXTFILTERSIZE_INVALIDDIMENSIONS = 243, + D3D12_MESSAGE_ID_DEVICE_DRAW_SAMPLER_MISMATCH = 244, + D3D12_MESSAGE_ID_CREATEINPUTLAYOUT_TYPE_MISMATCH = 245, + D3D12_MESSAGE_ID_BLENDSTATE_GETDESC_LEGACY = 246, + D3D12_MESSAGE_ID_SHADERRESOURCEVIEW_GETDESC_LEGACY = 247, + D3D12_MESSAGE_ID_DEVICE_DRAW_PS_OUTPUT_TYPE_MISMATCH = 248, + D3D12_MESSAGE_ID_DEVICE_DRAW_RESOURCE_FORMAT_GATHER_UNSUPPORTED = 249, + D3D12_MESSAGE_ID_DEVICE_DRAW_INVALID_USE_OF_CENTER_MULTISAMPLE_PATTERN = 250, + D3D12_MESSAGE_ID_DEVICE_IASETVERTEXBUFFERS_STRIDE_TOO_LARGE = 251, + D3D12_MESSAGE_ID_DEVICE_IASETVERTEXBUFFERS_INVALIDRANGE = 252, + D3D12_MESSAGE_ID_CREATEINPUTLAYOUT_EMPTY_LAYOUT = 253, + D3D12_MESSAGE_ID_DEVICE_DRAW_RESOURCE_SAMPLE_COUNT_MISMATCH = 254, + D3D12_MESSAGE_ID_LIVE_OBJECT_SUMMARY = 255, + D3D12_MESSAGE_ID_LIVE_BUFFER = 256, + D3D12_MESSAGE_ID_LIVE_TEXTURE1D = 257, + D3D12_MESSAGE_ID_LIVE_TEXTURE2D = 258, + D3D12_MESSAGE_ID_LIVE_TEXTURE3D = 259, + D3D12_MESSAGE_ID_LIVE_SHADERRESOURCEVIEW = 260, + D3D12_MESSAGE_ID_LIVE_RENDERTARGETVIEW = 261, + D3D12_MESSAGE_ID_LIVE_DEPTHSTENCILVIEW = 262, + D3D12_MESSAGE_ID_LIVE_VERTEXSHADER = 263, + D3D12_MESSAGE_ID_LIVE_GEOMETRYSHADER = 264, + D3D12_MESSAGE_ID_LIVE_PIXELSHADER = 265, + D3D12_MESSAGE_ID_LIVE_INPUTLAYOUT = 266, + D3D12_MESSAGE_ID_LIVE_SAMPLER = 267, + D3D12_MESSAGE_ID_LIVE_BLENDSTATE = 268, + D3D12_MESSAGE_ID_LIVE_DEPTHSTENCILSTATE = 269, + D3D12_MESSAGE_ID_LIVE_RASTERIZERSTATE = 270, + D3D12_MESSAGE_ID_LIVE_QUERY = 271, + D3D12_MESSAGE_ID_LIVE_PREDICATE = 272, + D3D12_MESSAGE_ID_LIVE_COUNTER = 273, + D3D12_MESSAGE_ID_LIVE_DEVICE = 274, + D3D12_MESSAGE_ID_LIVE_SWAPCHAIN = 275, + D3D12_MESSAGE_ID_CREATEDEPTHSTENCILVIEW_INVALIDFLAGS = 276, + D3D12_MESSAGE_ID_CREATEVERTEXSHADER_INVALIDCLASSLINKAGE = 277, + D3D12_MESSAGE_ID_CREATEGEOMETRYSHADER_INVALIDCLASSLINKAGE = 278, + D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDNUMSTREAMS = 279, + D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDSTREAMTORASTERIZER = 280, + D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_UNEXPECTEDSTREAMS = 281, + D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDCLASSLINKAGE = 282, + D3D12_MESSAGE_ID_CREATEPIXELSHADER_INVALIDCLASSLINKAGE = 283, + D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDSTREAM = 284, + D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_UNEXPECTEDENTRIES = 285, + D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_UNEXPECTEDSTRIDES = 286, + D3D12_MESSAGE_ID_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_INVALIDNUMSTRIDES = 287, + D3D12_MESSAGE_ID_CREATEHULLSHADER_INVALIDCALL = 288, + D3D12_MESSAGE_ID_CREATEHULLSHADER_OUTOFMEMORY = 289, + D3D12_MESSAGE_ID_CREATEHULLSHADER_INVALIDSHADERBYTECODE = 290, + D3D12_MESSAGE_ID_CREATEHULLSHADER_INVALIDSHADERTYPE = 291, + D3D12_MESSAGE_ID_CREATEHULLSHADER_INVALIDCLASSLINKAGE = 292, + D3D12_MESSAGE_ID_CREATEDOMAINSHADER_INVALIDCALL = 293, + D3D12_MESSAGE_ID_CREATEDOMAINSHADER_OUTOFMEMORY = 294, + D3D12_MESSAGE_ID_CREATEDOMAINSHADER_INVALIDSHADERBYTECODE = 295, + D3D12_MESSAGE_ID_CREATEDOMAINSHADER_INVALIDSHADERTYPE = 296, + D3D12_MESSAGE_ID_CREATEDOMAINSHADER_INVALIDCLASSLINKAGE = 297, + D3D12_MESSAGE_ID_DEVICE_DRAW_HS_XOR_DS_MISMATCH = 298, + D3D12_MESSAGE_ID_DEVICE_DRAWINDIRECT_INVALID_ARG_BUFFER = 299, + D3D12_MESSAGE_ID_DEVICE_DRAWINDIRECT_OFFSET_UNALIGNED = 300, + D3D12_MESSAGE_ID_DEVICE_DRAWINDIRECT_OFFSET_OVERFLOW = 301, + D3D12_MESSAGE_ID_RESOURCE_MAP_INVALIDMAPTYPE = 302, + D3D12_MESSAGE_ID_RESOURCE_MAP_INVALIDSUBRESOURCE = 303, + D3D12_MESSAGE_ID_RESOURCE_MAP_INVALIDFLAGS = 304, + D3D12_MESSAGE_ID_RESOURCE_MAP_ALREADYMAPPED = 305, + D3D12_MESSAGE_ID_RESOURCE_MAP_DEVICEREMOVED_RETURN = 306, + D3D12_MESSAGE_ID_RESOURCE_MAP_OUTOFMEMORY_RETURN = 307, + D3D12_MESSAGE_ID_RESOURCE_MAP_WITHOUT_INITIAL_DISCARD = 308, + D3D12_MESSAGE_ID_RESOURCE_UNMAP_INVALIDSUBRESOURCE = 309, + D3D12_MESSAGE_ID_RESOURCE_UNMAP_NOTMAPPED = 310, + D3D12_MESSAGE_ID_DEVICE_DRAW_RASTERIZING_CONTROL_POINTS = 311, + D3D12_MESSAGE_ID_DEVICE_IASETPRIMITIVETOPOLOGY_TOPOLOGY_UNSUPPORTED = 312, + D3D12_MESSAGE_ID_DEVICE_DRAW_HS_DS_SIGNATURE_MISMATCH = 313, + D3D12_MESSAGE_ID_DEVICE_DRAW_HULL_SHADER_INPUT_TOPOLOGY_MISMATCH = 314, + D3D12_MESSAGE_ID_DEVICE_DRAW_HS_DS_CONTROL_POINT_COUNT_MISMATCH = 315, + D3D12_MESSAGE_ID_DEVICE_DRAW_HS_DS_TESSELLATOR_DOMAIN_MISMATCH = 316, + D3D12_MESSAGE_ID_DEVICE_CHECKFEATURESUPPORT_UNRECOGNIZED_FEATURE = 317, + D3D12_MESSAGE_ID_DEVICE_CHECKFEATURESUPPORT_MISMATCHED_DATA_SIZE = 318, + D3D12_MESSAGE_ID_DEVICE_CHECKFEATURESUPPORT_INVALIDARG_RETURN = 319, + D3D12_MESSAGE_ID_CREATECOMPUTESHADER_INVALIDCALL = 320, + D3D12_MESSAGE_ID_CREATECOMPUTESHADER_OUTOFMEMORY = 321, + D3D12_MESSAGE_ID_CREATECOMPUTESHADER_INVALIDSHADERBYTECODE = 322, + D3D12_MESSAGE_ID_CREATECOMPUTESHADER_INVALIDCLASSLINKAGE = 323, + D3D12_MESSAGE_ID_DEVICE_CSSETSHADERRESOURCES_VIEWS_EMPTY = 324, + D3D12_MESSAGE_ID_CSSETCONSTANTBUFFERS_INVALIDBUFFER = 325, + D3D12_MESSAGE_ID_DEVICE_CSSETCONSTANTBUFFERS_BUFFERS_EMPTY = 326, + D3D12_MESSAGE_ID_DEVICE_CSSETSAMPLERS_SAMPLERS_EMPTY = 327, + D3D12_MESSAGE_ID_DEVICE_CSGETSHADERRESOURCES_VIEWS_EMPTY = 328, + D3D12_MESSAGE_ID_DEVICE_CSGETCONSTANTBUFFERS_BUFFERS_EMPTY = 329, + D3D12_MESSAGE_ID_DEVICE_CSGETSAMPLERS_SAMPLERS_EMPTY = 330, + D3D12_MESSAGE_ID_DEVICE_CREATEVERTEXSHADER_DOUBLEFLOATOPSNOTSUPPORTED = 331, + D3D12_MESSAGE_ID_DEVICE_CREATEHULLSHADER_DOUBLEFLOATOPSNOTSUPPORTED = 332, + D3D12_MESSAGE_ID_DEVICE_CREATEDOMAINSHADER_DOUBLEFLOATOPSNOTSUPPORTED = 333, + D3D12_MESSAGE_ID_DEVICE_CREATEGEOMETRYSHADER_DOUBLEFLOATOPSNOTSUPPORTED = 334, + D3D12_MESSAGE_ID_DEVICE_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_DOUBLEFLOATOPSNOTSUPPORTED = 335, + D3D12_MESSAGE_ID_DEVICE_CREATEPIXELSHADER_DOUBLEFLOATOPSNOTSUPPORTED = 336, + D3D12_MESSAGE_ID_DEVICE_CREATECOMPUTESHADER_DOUBLEFLOATOPSNOTSUPPORTED = 337, + D3D12_MESSAGE_ID_CREATEBUFFER_INVALIDSTRUCTURESTRIDE = 338, + D3D12_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDFLAGS = 339, + D3D12_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_INVALIDRESOURCE = 340, + D3D12_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_INVALIDDESC = 341, + D3D12_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_INVALIDFORMAT = 342, + D3D12_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_INVALIDVIDEOPLANESLICE = 343, + D3D12_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_INVALIDPLANESLICE = 344, + D3D12_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_INVALIDDIMENSIONS = 345, + D3D12_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_UNRECOGNIZEDFORMAT = 346, + D3D12_MESSAGE_ID_DEVICE_OMSETRENDERTARGETSANDUNORDEREDACCESSVIEWS_OVERLAPPING_OLD_SLOTS = 347, + D3D12_MESSAGE_ID_DEVICE_OMSETRENDERTARGETSANDUNORDEREDACCESSVIEWS_NO_OP = 348, + D3D12_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_INVALIDARG_RETURN = 349, + D3D12_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_OUTOFMEMORY_RETURN = 350, + D3D12_MESSAGE_ID_CLEARUNORDEREDACCESSVIEW_DENORMFLUSH = 351, + D3D12_MESSAGE_ID_DEVICE_CSSETUNORDEREDACCESSS_VIEWS_EMPTY = 352, + D3D12_MESSAGE_ID_DEVICE_CSGETUNORDEREDACCESSS_VIEWS_EMPTY = 353, + D3D12_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_INVALIDFLAGS = 354, + D3D12_MESSAGE_ID_DEVICE_DISPATCHINDIRECT_INVALID_ARG_BUFFER = 355, + D3D12_MESSAGE_ID_DEVICE_DISPATCHINDIRECT_OFFSET_UNALIGNED = 356, + D3D12_MESSAGE_ID_DEVICE_DISPATCHINDIRECT_OFFSET_OVERFLOW = 357, + D3D12_MESSAGE_ID_CLEARDEPTHSTENCILVIEW_DEPTH_READONLY = 358, + D3D12_MESSAGE_ID_CLEARDEPTHSTENCILVIEW_STENCIL_READONLY = 359, + D3D12_MESSAGE_ID_CHECKFEATURESUPPORT_FORMAT_DEPRECATED = 360, + D3D12_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_RETURN_TYPE_MISMATCH = 361, + D3D12_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_NOT_SET = 362, + D3D12_MESSAGE_ID_DEVICE_DRAW_UNORDEREDACCESSVIEW_RENDERTARGETVIEW_OVERLAP = 363, + D3D12_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_DIMENSION_MISMATCH = 364, + D3D12_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_APPEND_UNSUPPORTED = 365, + D3D12_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_ATOMICS_UNSUPPORTED = 366, + D3D12_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_STRUCTURE_STRIDE_MISMATCH = 367, + D3D12_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_BUFFER_TYPE_MISMATCH = 368, + D3D12_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_RAW_UNSUPPORTED = 369, + D3D12_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_FORMAT_LD_UNSUPPORTED = 370, + D3D12_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_FORMAT_STORE_UNSUPPORTED = 371, + D3D12_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_ATOMIC_ADD_UNSUPPORTED = 372, + D3D12_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_ATOMIC_BITWISE_OPS_UNSUPPORTED = 373, + D3D12_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_ATOMIC_CMPSTORE_CMPEXCHANGE_UNSUPPORTED = 374, + D3D12_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_ATOMIC_EXCHANGE_UNSUPPORTED = 375, + D3D12_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_ATOMIC_SIGNED_MINMAX_UNSUPPORTED = 376, + D3D12_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_ATOMIC_UNSIGNED_MINMAX_UNSUPPORTED = 377, + D3D12_MESSAGE_ID_DEVICE_DISPATCH_BOUND_RESOURCE_MAPPED = 378, + D3D12_MESSAGE_ID_DEVICE_DISPATCH_THREADGROUPCOUNT_OVERFLOW = 379, + D3D12_MESSAGE_ID_DEVICE_DISPATCH_THREADGROUPCOUNT_ZERO = 380, + D3D12_MESSAGE_ID_DEVICE_SHADERRESOURCEVIEW_STRUCTURE_STRIDE_MISMATCH = 381, + D3D12_MESSAGE_ID_DEVICE_SHADERRESOURCEVIEW_BUFFER_TYPE_MISMATCH = 382, + D3D12_MESSAGE_ID_DEVICE_SHADERRESOURCEVIEW_RAW_UNSUPPORTED = 383, + D3D12_MESSAGE_ID_DEVICE_DISPATCH_UNSUPPORTED = 384, + D3D12_MESSAGE_ID_DEVICE_DISPATCHINDIRECT_UNSUPPORTED = 385, + D3D12_MESSAGE_ID_COPYSTRUCTURECOUNT_INVALIDOFFSET = 386, + D3D12_MESSAGE_ID_COPYSTRUCTURECOUNT_LARGEOFFSET = 387, + D3D12_MESSAGE_ID_COPYSTRUCTURECOUNT_INVALIDDESTINATIONSTATE = 388, + D3D12_MESSAGE_ID_COPYSTRUCTURECOUNT_INVALIDSOURCESTATE = 389, + D3D12_MESSAGE_ID_CHECKFORMATSUPPORT_FORMAT_NOT_SUPPORTED = 390, + D3D12_MESSAGE_ID_CLEARUNORDEREDACCESSVIEWFLOAT_INVALIDFORMAT = 391, + D3D12_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_COUNTER_UNSUPPORTED = 392, + D3D12_MESSAGE_ID_DEVICE_DRAW_PIXEL_SHADER_WITHOUT_RTV_OR_DSV = 393, + D3D12_MESSAGE_ID_SHADER_ABORT = 394, + D3D12_MESSAGE_ID_SHADER_MESSAGE = 395, + D3D12_MESSAGE_ID_SHADER_ERROR = 396, + D3D12_MESSAGE_ID_OFFERRESOURCES_INVALIDRESOURCE = 397, + D3D12_MESSAGE_ID_ENQUEUESETEVENT_INVALIDARG_RETURN = 398, + D3D12_MESSAGE_ID_ENQUEUESETEVENT_OUTOFMEMORY_RETURN = 399, + D3D12_MESSAGE_ID_ENQUEUESETEVENT_ACCESSDENIED_RETURN = 400, + D3D12_MESSAGE_ID_CREATERASTERIZERSTATE_INVALIDFORCEDSAMPLECOUNT = 401, + D3D12_MESSAGE_ID_DEVICE_DRAW_INVALID_USE_OF_FORCED_SAMPLE_COUNT = 402, + D3D12_MESSAGE_ID_CREATEBLENDSTATE_INVALIDLOGICOPS = 403, + D3D12_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDDARRAYWITHDECODER = 404, + D3D12_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_INVALIDDARRAYWITHDECODER = 405, + D3D12_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDDARRAYWITHDECODER = 406, + D3D12_MESSAGE_ID_DEVICE_LOCKEDOUT_INTERFACE = 407, + D3D12_MESSAGE_ID_OFFERRESOURCES_INVALIDPRIORITY = 408, + D3D12_MESSAGE_ID_DEVICE_CLEARVIEW_INVALIDVIEW = 409, + D3D12_MESSAGE_ID_DEVICE_CREATEVERTEXSHADER_DOUBLEEXTENSIONSNOTSUPPORTED = 410, + D3D12_MESSAGE_ID_DEVICE_CREATEVERTEXSHADER_SHADEREXTENSIONSNOTSUPPORTED = 411, + D3D12_MESSAGE_ID_DEVICE_CREATEHULLSHADER_DOUBLEEXTENSIONSNOTSUPPORTED = 412, + D3D12_MESSAGE_ID_DEVICE_CREATEHULLSHADER_SHADEREXTENSIONSNOTSUPPORTED = 413, + D3D12_MESSAGE_ID_DEVICE_CREATEDOMAINSHADER_DOUBLEEXTENSIONSNOTSUPPORTED = 414, + D3D12_MESSAGE_ID_DEVICE_CREATEDOMAINSHADER_SHADEREXTENSIONSNOTSUPPORTED = 415, + D3D12_MESSAGE_ID_DEVICE_CREATEGEOMETRYSHADER_DOUBLEEXTENSIONSNOTSUPPORTED = 416, + D3D12_MESSAGE_ID_DEVICE_CREATEGEOMETRYSHADER_SHADEREXTENSIONSNOTSUPPORTED = 417, + D3D12_MESSAGE_ID_DEVICE_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_DOUBLEEXTENSIONSNOTSUPPORTED = 418, + D3D12_MESSAGE_ID_DEVICE_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_SHADEREXTENSIONSNOTSUPPORTED = 419, + D3D12_MESSAGE_ID_DEVICE_CREATEPIXELSHADER_DOUBLEEXTENSIONSNOTSUPPORTED = 420, + D3D12_MESSAGE_ID_DEVICE_CREATEPIXELSHADER_SHADEREXTENSIONSNOTSUPPORTED = 421, + D3D12_MESSAGE_ID_DEVICE_CREATECOMPUTESHADER_DOUBLEEXTENSIONSNOTSUPPORTED = 422, + D3D12_MESSAGE_ID_DEVICE_CREATECOMPUTESHADER_SHADEREXTENSIONSNOTSUPPORTED = 423, + D3D12_MESSAGE_ID_DEVICE_SHADER_LINKAGE_MINPRECISION = 424, + D3D12_MESSAGE_ID_DEVICE_CREATEVERTEXSHADER_UAVSNOTSUPPORTED = 425, + D3D12_MESSAGE_ID_DEVICE_CREATEHULLSHADER_UAVSNOTSUPPORTED = 426, + D3D12_MESSAGE_ID_DEVICE_CREATEDOMAINSHADER_UAVSNOTSUPPORTED = 427, + D3D12_MESSAGE_ID_DEVICE_CREATEGEOMETRYSHADER_UAVSNOTSUPPORTED = 428, + D3D12_MESSAGE_ID_DEVICE_CREATEGEOMETRYSHADERWITHSTREAMOUTPUT_UAVSNOTSUPPORTED = 429, + D3D12_MESSAGE_ID_DEVICE_CREATEPIXELSHADER_UAVSNOTSUPPORTED = 430, + D3D12_MESSAGE_ID_DEVICE_CREATECOMPUTESHADER_UAVSNOTSUPPORTED = 431, + D3D12_MESSAGE_ID_DEVICE_OMSETRENDERTARGETSANDUNORDEREDACCESSVIEWS_INVALIDOFFSET = 432, + D3D12_MESSAGE_ID_DEVICE_OMSETRENDERTARGETSANDUNORDEREDACCESSVIEWS_TOOMANYVIEWS = 433, + D3D12_MESSAGE_ID_DEVICE_CLEARVIEW_NOTSUPPORTED = 434, + D3D12_MESSAGE_ID_SWAPDEVICECONTEXTSTATE_NOTSUPPORTED = 435, + D3D12_MESSAGE_ID_UPDATESUBRESOURCE_PREFERUPDATESUBRESOURCE1 = 436, + D3D12_MESSAGE_ID_GETDC_INACCESSIBLE = 437, + D3D12_MESSAGE_ID_DEVICE_CLEARVIEW_INVALIDRECT = 438, + D3D12_MESSAGE_ID_DEVICE_DRAW_SAMPLE_MASK_IGNORED_ON_FL9 = 439, + D3D12_MESSAGE_ID_DEVICE_OPEN_SHARED_RESOURCE1_NOT_SUPPORTED = 440, + D3D12_MESSAGE_ID_DEVICE_OPEN_SHARED_RESOURCE_BY_NAME_NOT_SUPPORTED = 441, + D3D12_MESSAGE_ID_ENQUEUESETEVENT_NOT_SUPPORTED = 442, + D3D12_MESSAGE_ID_OFFERRELEASE_NOT_SUPPORTED = 443, + D3D12_MESSAGE_ID_OFFERRESOURCES_INACCESSIBLE = 444, + D3D12_MESSAGE_ID_CREATEVIDEOPROCESSORINPUTVIEW_INVALIDMSAA = 445, + D3D12_MESSAGE_ID_CREATEVIDEOPROCESSOROUTPUTVIEW_INVALIDMSAA = 446, + D3D12_MESSAGE_ID_DEVICE_CLEARVIEW_INVALIDSOURCERECT = 447, + D3D12_MESSAGE_ID_DEVICE_CLEARVIEW_EMPTYRECT = 448, + D3D12_MESSAGE_ID_UPDATESUBRESOURCE_EMPTYDESTBOX = 449, + D3D12_MESSAGE_ID_COPYSUBRESOURCEREGION_EMPTYSOURCEBOX = 450, + D3D12_MESSAGE_ID_DEVICE_DRAW_OM_RENDER_TARGET_DOES_NOT_SUPPORT_LOGIC_OPS = 451, + D3D12_MESSAGE_ID_DEVICE_DRAW_DEPTHSTENCILVIEW_NOT_SET = 452, + D3D12_MESSAGE_ID_DEVICE_DRAW_RENDERTARGETVIEW_NOT_SET = 453, + D3D12_MESSAGE_ID_DEVICE_DRAW_RENDERTARGETVIEW_NOT_SET_DUE_TO_FLIP_PRESENT = 454, + D3D12_MESSAGE_ID_DEVICE_UNORDEREDACCESSVIEW_NOT_SET_DUE_TO_FLIP_PRESENT = 455, + D3D12_MESSAGE_ID_GETDATAFORNEWHARDWAREKEY_NULLPARAM = 456, + D3D12_MESSAGE_ID_CHECKCRYPTOSESSIONSTATUS_NULLPARAM = 457, + D3D12_MESSAGE_ID_SETEVENTONHARDWARECONTENTPROTECTIONTILT_NULLPARAM = 458, + D3D12_MESSAGE_ID_GETVIDEODECODERCAPS_NULLPARAM = 459, + D3D12_MESSAGE_ID_GETVIDEODECODERCAPS_ZEROWIDTHHEIGHT = 460, + D3D12_MESSAGE_ID_CHECKVIDEODECODERDOWNSAMPLING_NULLPARAM = 461, + D3D12_MESSAGE_ID_CHECKVIDEODECODERDOWNSAMPLING_INVALIDCOLORSPACE = 462, + D3D12_MESSAGE_ID_CHECKVIDEODECODERDOWNSAMPLING_ZEROWIDTHHEIGHT = 463, + D3D12_MESSAGE_ID_VIDEODECODERENABLEDOWNSAMPLING_NULLPARAM = 464, + D3D12_MESSAGE_ID_VIDEODECODERENABLEDOWNSAMPLING_UNSUPPORTED = 465, + D3D12_MESSAGE_ID_VIDEODECODERUPDATEDOWNSAMPLING_NULLPARAM = 466, + D3D12_MESSAGE_ID_VIDEODECODERUPDATEDOWNSAMPLING_UNSUPPORTED = 467, + D3D12_MESSAGE_ID_CHECKVIDEOPROCESSORFORMATCONVERSION_NULLPARAM = 468, + D3D12_MESSAGE_ID_VIDEOPROCESSORSETOUTPUTCOLORSPACE1_NULLPARAM = 469, + D3D12_MESSAGE_ID_VIDEOPROCESSORGETOUTPUTCOLORSPACE1_NULLPARAM = 470, + D3D12_MESSAGE_ID_VIDEOPROCESSORSETSTREAMCOLORSPACE1_NULLPARAM = 471, + D3D12_MESSAGE_ID_VIDEOPROCESSORSETSTREAMCOLORSPACE1_INVALIDSTREAM = 472, + D3D12_MESSAGE_ID_VIDEOPROCESSORSETSTREAMMIRROR_NULLPARAM = 473, + D3D12_MESSAGE_ID_VIDEOPROCESSORSETSTREAMMIRROR_INVALIDSTREAM = 474, + D3D12_MESSAGE_ID_VIDEOPROCESSORSETSTREAMMIRROR_UNSUPPORTED = 475, + D3D12_MESSAGE_ID_VIDEOPROCESSORGETSTREAMCOLORSPACE1_NULLPARAM = 476, + D3D12_MESSAGE_ID_VIDEOPROCESSORGETSTREAMMIRROR_NULLPARAM = 477, + D3D12_MESSAGE_ID_RECOMMENDVIDEODECODERDOWNSAMPLING_NULLPARAM = 478, + D3D12_MESSAGE_ID_RECOMMENDVIDEODECODERDOWNSAMPLING_INVALIDCOLORSPACE = 479, + D3D12_MESSAGE_ID_RECOMMENDVIDEODECODERDOWNSAMPLING_ZEROWIDTHHEIGHT = 480, + D3D12_MESSAGE_ID_VIDEOPROCESSORSETOUTPUTSHADERUSAGE_NULLPARAM = 481, + D3D12_MESSAGE_ID_VIDEOPROCESSORGETOUTPUTSHADERUSAGE_NULLPARAM = 482, + D3D12_MESSAGE_ID_VIDEOPROCESSORGETBEHAVIORHINTS_NULLPARAM = 483, + D3D12_MESSAGE_ID_VIDEOPROCESSORGETBEHAVIORHINTS_INVALIDSTREAMCOUNT = 484, + D3D12_MESSAGE_ID_VIDEOPROCESSORGETBEHAVIORHINTS_TARGETRECT = 485, + D3D12_MESSAGE_ID_VIDEOPROCESSORGETBEHAVIORHINTS_INVALIDSOURCERECT = 486, + D3D12_MESSAGE_ID_VIDEOPROCESSORGETBEHAVIORHINTS_INVALIDDESTRECT = 487, + D3D12_MESSAGE_ID_CREATEBUFFER_INVALIDUSAGE = 488, + D3D12_MESSAGE_ID_CREATETEXTURE1D_INVALIDUSAGE = 489, + D3D12_MESSAGE_ID_CREATETEXTURE2D_INVALIDUSAGE = 490, + D3D12_MESSAGE_ID_CREATEINPUTLAYOUT_LEVEL9_STEPRATE_NOT_1 = 491, + D3D12_MESSAGE_ID_CREATEINPUTLAYOUT_LEVEL9_INSTANCING_NOT_SUPPORTED = 492, + D3D12_MESSAGE_ID_UPDATETILEMAPPINGS_INVALID_PARAMETER = 493, + D3D12_MESSAGE_ID_COPYTILEMAPPINGS_INVALID_PARAMETER = 494, + D3D12_MESSAGE_ID_COPYTILES_INVALID_PARAMETER = 495, + D3D12_MESSAGE_ID_NULL_TILE_MAPPING_ACCESS_WARNING = 496, + D3D12_MESSAGE_ID_NULL_TILE_MAPPING_ACCESS_ERROR = 497, + D3D12_MESSAGE_ID_DIRTY_TILE_MAPPING_ACCESS = 498, + D3D12_MESSAGE_ID_DUPLICATE_TILE_MAPPINGS_IN_COVERED_AREA = 499, + D3D12_MESSAGE_ID_TILE_MAPPINGS_IN_COVERED_AREA_DUPLICATED_OUTSIDE = 500, + D3D12_MESSAGE_ID_TILE_MAPPINGS_SHARED_BETWEEN_INCOMPATIBLE_RESOURCES = 501, + D3D12_MESSAGE_ID_TILE_MAPPINGS_SHARED_BETWEEN_INPUT_AND_OUTPUT = 502, + D3D12_MESSAGE_ID_CHECKMULTISAMPLEQUALITYLEVELS_INVALIDFLAGS = 503, + D3D12_MESSAGE_ID_GETRESOURCETILING_NONTILED_RESOURCE = 504, + D3D12_MESSAGE_ID_NEED_TO_CALL_TILEDRESOURCEBARRIER = 505, + D3D12_MESSAGE_ID_CREATEDEVICE_INVALIDARGS = 506, + D3D12_MESSAGE_ID_CREATEDEVICE_WARNING = 507, + D3D12_MESSAGE_ID_TILED_RESOURCE_TIER_1_BUFFER_TEXTURE_MISMATCH = 508, + D3D12_MESSAGE_ID_CREATE_CRYPTOSESSION = 509, + D3D12_MESSAGE_ID_CREATE_AUTHENTICATEDCHANNEL = 510, + D3D12_MESSAGE_ID_LIVE_CRYPTOSESSION = 511, + D3D12_MESSAGE_ID_LIVE_AUTHENTICATEDCHANNEL = 512, + D3D12_MESSAGE_ID_DESTROY_CRYPTOSESSION = 513, + D3D12_MESSAGE_ID_DESTROY_AUTHENTICATEDCHANNEL = 514, + D3D12_MESSAGE_ID_MAP_INVALID_SUBRESOURCE = 515, + D3D12_MESSAGE_ID_MAP_INVALID_TYPE = 516, + D3D12_MESSAGE_ID_MAP_UNSUPPORTED_TYPE = 517, + D3D12_MESSAGE_ID_UNMAP_INVALID_SUBRESOURCE = 518, + D3D12_MESSAGE_ID_RESOURCE_BARRIER_INVALID_TYPE = 519, + D3D12_MESSAGE_ID_RESOURCE_BARRIER_NULL_POINTER = 520, + D3D12_MESSAGE_ID_RESOURCE_BARRIER_INVALID_SUBRESOURCE = 521, + D3D12_MESSAGE_ID_RESOURCE_BARRIER_RESERVED_BITS = 522, + D3D12_MESSAGE_ID_RESOURCE_BARRIER_MISSING_BIND_FLAGS = 523, + D3D12_MESSAGE_ID_RESOURCE_BARRIER_MISMATCHING_MISC_FLAGS = 524, + D3D12_MESSAGE_ID_RESOURCE_BARRIER_MATCHING_STATES = 525, + D3D12_MESSAGE_ID_RESOURCE_BARRIER_INVALID_COMBINATION = 526, + D3D12_MESSAGE_ID_RESOURCE_BARRIER_BEFORE_AFTER_MISMATCH = 527, + D3D12_MESSAGE_ID_RESOURCE_BARRIER_INVALID_RESOURCE = 528, + D3D12_MESSAGE_ID_RESOURCE_BARRIER_SAMPLE_COUNT = 529, + D3D12_MESSAGE_ID_RESOURCE_BARRIER_INVALID_FLAGS = 530, + D3D12_MESSAGE_ID_RESOURCE_BARRIER_INVALID_COMBINED_FLAGS = 531, + D3D12_MESSAGE_ID_RESOURCE_BARRIER_INVALID_FLAGS_FOR_FORMAT = 532, + D3D12_MESSAGE_ID_RESOURCE_BARRIER_INVALID_SPLIT_BARRIER = 533, + D3D12_MESSAGE_ID_RESOURCE_BARRIER_UNMATCHED_END = 534, + D3D12_MESSAGE_ID_RESOURCE_BARRIER_UNMATCHED_BEGIN = 535, + D3D12_MESSAGE_ID_RESOURCE_BARRIER_INVALID_FLAG = 536, + D3D12_MESSAGE_ID_RESOURCE_BARRIER_INVALID_COMMAND_LIST_TYPE = 537, + D3D12_MESSAGE_ID_INVALID_SUBRESOURCE_STATE = 538, + D3D12_MESSAGE_ID_INEFFICIENT_PRESENT = 539, + D3D12_MESSAGE_ID_COMMAND_ALLOCATOR_CONTENTION = 540, + D3D12_MESSAGE_ID_COMMAND_ALLOCATOR_RESET = 541, + D3D12_MESSAGE_ID_COMMAND_ALLOCATOR_RESET_BUNDLE = 542, + D3D12_MESSAGE_ID_COMMAND_ALLOCATOR_CANNOT_RESET = 543, + D3D12_MESSAGE_ID_COMMAND_LIST_OPEN = 544, + D3D12_MESSAGE_ID_QUERY_STATE_MISMATCH = 545, + D3D12_MESSAGE_ID_INVALID_BUNDLE_API = 546, + D3D12_MESSAGE_ID_COMMAND_LIST_CLOSED = 547, + D3D12_MESSAGE_ID_COMMAND_LIST_CLOSED_WITH_INVALID_RESOURCE = 548, + D3D12_MESSAGE_ID_WRONG_COMMAND_ALLOCATOR_TYPE = 549, + D3D12_MESSAGE_ID_INVALID_INDIRECT_ARGUMENT_BUFFER = 550, + D3D12_MESSAGE_ID_COMPUTE_AND_GRAPHICS_PIPELINE = 551, + D3D12_MESSAGE_ID_COMMAND_ALLOCATOR_SYNC = 552, + D3D12_MESSAGE_ID_COMMAND_LIST_SYNC = 553, + D3D12_MESSAGE_ID_SET_DESCRIPTOR_HEAP_INVALID = 554, + D3D12_MESSAGE_ID_CREATE_QUEUE_IMAGE_NOT_SUPPORTED = 555, + D3D12_MESSAGE_ID_CREATE_COMMAND_ALLOCATOR_IMAGE_NOT_SUPPORTED = 556, + D3D12_MESSAGE_ID_CREATE_COMMANDQUEUE = 557, + D3D12_MESSAGE_ID_CREATE_COMMANDALLOCATOR = 558, + D3D12_MESSAGE_ID_CREATE_PIPELINESTATE = 559, + D3D12_MESSAGE_ID_CREATE_COMMANDLIST12 = 560, + D3D12_MESSAGE_ID_CREATE_IMAGECOMMANDLIST = 561, + D3D12_MESSAGE_ID_CREATE_RESOURCE = 562, + D3D12_MESSAGE_ID_CREATE_DESCRIPTORHEAP = 563, + D3D12_MESSAGE_ID_CREATE_ROOTSIGNATURE = 564, + D3D12_MESSAGE_ID_CREATE_LIBRARY = 565, + D3D12_MESSAGE_ID_CREATE_HEAP = 566, + D3D12_MESSAGE_ID_CREATE_MONITOREDFENCE = 567, + D3D12_MESSAGE_ID_CREATE_QUERYHEAP = 568, + D3D12_MESSAGE_ID_CREATE_COMMANDSIGNATURE = 569, + D3D12_MESSAGE_ID_LIVE_COMMANDQUEUE = 570, + D3D12_MESSAGE_ID_LIVE_COMMANDALLOCATOR = 571, + D3D12_MESSAGE_ID_LIVE_PIPELINESTATE = 572, + D3D12_MESSAGE_ID_LIVE_COMMANDLIST12 = 573, + D3D12_MESSAGE_ID_LIVE_IMAGECOMMANDLIST = 574, + D3D12_MESSAGE_ID_LIVE_RESOURCE = 575, + D3D12_MESSAGE_ID_LIVE_DESCRIPTORHEAP = 576, + D3D12_MESSAGE_ID_LIVE_ROOTSIGNATURE = 577, + D3D12_MESSAGE_ID_LIVE_LIBRARY = 578, + D3D12_MESSAGE_ID_LIVE_HEAP = 579, + D3D12_MESSAGE_ID_LIVE_MONITOREDFENCE = 580, + D3D12_MESSAGE_ID_LIVE_QUERYHEAP = 581, + D3D12_MESSAGE_ID_LIVE_COMMANDSIGNATURE = 582, + D3D12_MESSAGE_ID_DESTROY_COMMANDQUEUE = 583, + D3D12_MESSAGE_ID_DESTROY_COMMANDALLOCATOR = 584, + D3D12_MESSAGE_ID_DESTROY_PIPELINESTATE = 585, + D3D12_MESSAGE_ID_DESTROY_COMMANDLIST12 = 586, + D3D12_MESSAGE_ID_DESTROY_IMAGECOMMANDLIST = 587, + D3D12_MESSAGE_ID_DESTROY_RESOURCE = 588, + D3D12_MESSAGE_ID_DESTROY_DESCRIPTORHEAP = 589, + D3D12_MESSAGE_ID_DESTROY_ROOTSIGNATURE = 590, + D3D12_MESSAGE_ID_DESTROY_LIBRARY = 591, + D3D12_MESSAGE_ID_DESTROY_HEAP = 592, + D3D12_MESSAGE_ID_DESTROY_MONITOREDFENCE = 593, + D3D12_MESSAGE_ID_DESTROY_QUERYHEAP = 594, + D3D12_MESSAGE_ID_DESTROY_COMMANDSIGNATURE = 595, + D3D12_MESSAGE_ID_CREATERESOURCE_UNRECOGNIZEDHEAPTYPE = 596, + D3D12_MESSAGE_ID_CREATERESOURCE_INVALIDDIMENSIONS = 597, + D3D12_MESSAGE_ID_CREATERESOURCE_UNRECOGNIZEDMISCFLAGS = 598, + D3D12_MESSAGE_ID_CREATERESOURCE_INVALIDMISCFLAGS = 599, + D3D12_MESSAGE_ID_CREATERESOURCE_LARGEALLOCATION = 600, + D3D12_MESSAGE_ID_CREATERESOURCE_SMALLALLOCATION = 601, + D3D12_MESSAGE_ID_CREATERESOURCE_INVALIDARG_RETURN = 602, + D3D12_MESSAGE_ID_CREATERESOURCE_OUTOFMEMORY_RETURN = 603, + D3D12_MESSAGE_ID_CREATERESOURCE_INVALIDDESC = 604, + D3D12_MESSAGE_ID_CREATERESOURCE_INVALIDINITIALSTATE = 605, + D3D12_MESSAGE_ID_RESOURCE_HAS_PENDING_INITIAL_DATA = 606, + D3D12_MESSAGE_ID_POSSIBLY_INVALID_SUBRESOURCE_STATE = 607, + D3D12_MESSAGE_ID_INVALID_USE_OF_NON_RESIDENT_RESOURCE = 608, + D3D12_MESSAGE_ID_POSSIBLE_INVALID_USE_OF_NON_RESIDENT_RESOURCE = 609, + D3D12_MESSAGE_ID_BUNDLE_PIPELINE_STATE_MISMATCH = 610, + D3D12_MESSAGE_ID_PRIMITIVE_TOPOLOGY_MISMATCH_PIPELINE_STATE = 611, + D3D12_MESSAGE_ID_RENDER_TARGET_NUMBER_MISMATCH_PIPELINE_STATE = 612, + D3D12_MESSAGE_ID_RENDER_TARGET_FORMAT_MISMATCH_PIPELINE_STATE = 613, + D3D12_MESSAGE_ID_RENDER_TARGET_SAMPLE_DESC_MISMATCH_PIPELINE_STATE = 614, + D3D12_MESSAGE_ID_DEPTH_STENCIL_FORMAT_MISMATCH_PIPELINE_STATE = 615, + D3D12_MESSAGE_ID_DEPTH_STENCIL_SAMPLE_DESC_MISMATCH_PIPELINE_STATE = 616, + D3D12_MESSAGE_ID_RENDER_TARGET_NUMBER_MISMATCH_BUNDLE_PIPELINE_STATE = 617, + D3D12_MESSAGE_ID_RENDER_TARGET_FORMAT_MISMATCH_BUNDLE_PIPELINE_STATE = 618, + D3D12_MESSAGE_ID_RENDER_TARGET_SAMPLE_DESC_MISMATCH_BUNDLE_PIPELINE_STATE = 619, + D3D12_MESSAGE_ID_DEPTH_STENCIL_FORMAT_MISMATCH_BUNDLE_PIPELINE_STATE = 620, + D3D12_MESSAGE_ID_DEPTH_STENCIL_SAMPLE_DESC_MISMATCH_BUNDLE_PIPELINE_STATE = 621, + D3D12_MESSAGE_ID_CREATESHADER_INVALIDBYTECODE = 622, + D3D12_MESSAGE_ID_CREATEHEAP_NULLDESC = 623, + D3D12_MESSAGE_ID_CREATEHEAP_INVALIDSIZE = 624, + D3D12_MESSAGE_ID_CREATEHEAP_UNRECOGNIZEDHEAPTYPE = 625, + D3D12_MESSAGE_ID_CREATEHEAP_UNRECOGNIZEDCPUPAGEPROPERTIES = 626, + D3D12_MESSAGE_ID_CREATEHEAP_UNRECOGNIZEDMEMORYPOOL = 627, + D3D12_MESSAGE_ID_CREATEHEAP_INVALIDPROPERTIES = 628, + D3D12_MESSAGE_ID_CREATEHEAP_INVALIDALIGNMENT = 629, + D3D12_MESSAGE_ID_CREATEHEAP_UNRECOGNIZEDMISCFLAGS = 630, + D3D12_MESSAGE_ID_CREATEHEAP_INVALIDMISCFLAGS = 631, + D3D12_MESSAGE_ID_CREATEHEAP_INVALIDARG_RETURN = 632, + D3D12_MESSAGE_ID_CREATEHEAP_OUTOFMEMORY_RETURN = 633, + D3D12_MESSAGE_ID_CREATERESOURCEANDHEAP_NULLHEAPPROPERTIES = 634, + D3D12_MESSAGE_ID_CREATERESOURCEANDHEAP_UNRECOGNIZEDHEAPTYPE = 635, + D3D12_MESSAGE_ID_CREATERESOURCEANDHEAP_UNRECOGNIZEDCPUPAGEPROPERTIES = 636, + D3D12_MESSAGE_ID_CREATERESOURCEANDHEAP_UNRECOGNIZEDMEMORYPOOL = 637, + D3D12_MESSAGE_ID_CREATERESOURCEANDHEAP_INVALIDHEAPPROPERTIES = 638, + D3D12_MESSAGE_ID_CREATERESOURCEANDHEAP_UNRECOGNIZEDHEAPMISCFLAGS = 639, + D3D12_MESSAGE_ID_CREATERESOURCEANDHEAP_INVALIDHEAPMISCFLAGS = 640, + D3D12_MESSAGE_ID_CREATERESOURCEANDHEAP_INVALIDARG_RETURN = 641, + D3D12_MESSAGE_ID_CREATERESOURCEANDHEAP_OUTOFMEMORY_RETURN = 642, + D3D12_MESSAGE_ID_GETCUSTOMHEAPPROPERTIES_UNRECOGNIZEDHEAPTYPE = 643, + D3D12_MESSAGE_ID_GETCUSTOMHEAPPROPERTIES_INVALIDHEAPTYPE = 644, + D3D12_MESSAGE_ID_CREATE_DESCRIPTOR_HEAP_INVALID_DESC = 645, + D3D12_MESSAGE_ID_INVALID_DESCRIPTOR_HANDLE = 646, + D3D12_MESSAGE_ID_CREATERASTERIZERSTATE_INVALID_CONSERVATIVERASTERMODE = 647, + D3D12_MESSAGE_ID_DEVICE_DRAW_INVALID_SYSTEMVALUE = 648, + D3D12_MESSAGE_ID_CREATE_CONSTANT_BUFFER_VIEW_INVALID_RESOURCE = 649, + D3D12_MESSAGE_ID_CREATE_CONSTANT_BUFFER_VIEW_INVALID_DESC = 650, + D3D12_MESSAGE_ID_CREATE_CONSTANT_BUFFER_VIEW_LARGE_OFFSET = 651, + D3D12_MESSAGE_ID_CREATE_UNORDEREDACCESS_VIEW_INVALID_COUNTER_USAGE = 652, + D3D12_MESSAGE_ID_COPY_DESCRIPTORS_INVALID_RANGES = 653, + D3D12_MESSAGE_ID_COPY_DESCRIPTORS_WRITE_ONLY_DESCRIPTOR = 654, + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_RTV_FORMAT_NOT_UNKNOWN = 655, + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_INVALID_RENDER_TARGET_COUNT = 656, + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_VERTEX_SHADER_NOT_SET = 657, + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_INPUTLAYOUT_NOT_SET = 658, + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_SHADER_LINKAGE_HS_DS_SIGNATURE_MISMATCH = 659, + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_SHADER_LINKAGE_REGISTERINDEX = 660, + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_SHADER_LINKAGE_COMPONENTTYPE = 661, + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_SHADER_LINKAGE_REGISTERMASK = 662, + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_SHADER_LINKAGE_SYSTEMVALUE = 663, + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_SHADER_LINKAGE_NEVERWRITTEN_ALWAYSREADS = 664, + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_SHADER_LINKAGE_MINPRECISION = 665, + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_SHADER_LINKAGE_SEMANTICNAME_NOT_FOUND = 666, + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_HS_XOR_DS_MISMATCH = 667, + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_HULL_SHADER_INPUT_TOPOLOGY_MISMATCH = 668, + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_HS_DS_CONTROL_POINT_COUNT_MISMATCH = 669, + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_HS_DS_TESSELLATOR_DOMAIN_MISMATCH = 670, + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_INVALID_USE_OF_CENTER_MULTISAMPLE_PATTERN = 671, + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_INVALID_USE_OF_FORCED_SAMPLE_COUNT = 672, + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_INVALID_PRIMITIVETOPOLOGY = 673, + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_INVALID_SYSTEMVALUE = 674, + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_OM_DUAL_SOURCE_BLENDING_CAN_ONLY_HAVE_RENDER_TARGET_0 = 675, + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_OM_RENDER_TARGET_DOES_NOT_SUPPORT_BLENDING = 676, + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_PS_OUTPUT_TYPE_MISMATCH = 677, + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_OM_RENDER_TARGET_DOES_NOT_SUPPORT_LOGIC_OPS = 678, + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_RENDERTARGETVIEW_NOT_SET = 679, + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_DEPTHSTENCILVIEW_NOT_SET = 680, + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_GS_INPUT_PRIMITIVE_MISMATCH = 681, + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_POSITION_NOT_PRESENT = 682, + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_MISSING_ROOT_SIGNATURE_FLAGS = 683, + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_INVALID_INDEX_BUFFER_PROPERTIES = 684, + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_INVALID_SAMPLE_DESC = 685, + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_HS_ROOT_SIGNATURE_MISMATCH = 686, + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_DS_ROOT_SIGNATURE_MISMATCH = 687, + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_VS_ROOT_SIGNATURE_MISMATCH = 688, + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_GS_ROOT_SIGNATURE_MISMATCH = 689, + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_PS_ROOT_SIGNATURE_MISMATCH = 690, + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_MISSING_ROOT_SIGNATURE = 691, + D3D12_MESSAGE_ID_EXECUTE_BUNDLE_OPEN_BUNDLE = 692, + D3D12_MESSAGE_ID_EXECUTE_BUNDLE_DESCRIPTOR_HEAP_MISMATCH = 693, + D3D12_MESSAGE_ID_EXECUTE_BUNDLE_TYPE = 694, + D3D12_MESSAGE_ID_DRAW_EMPTY_SCISSOR_RECTANGLE = 695, + D3D12_MESSAGE_ID_CREATE_ROOT_SIGNATURE_BLOB_NOT_FOUND = 696, + D3D12_MESSAGE_ID_CREATE_ROOT_SIGNATURE_DESERIALIZE_FAILED = 697, + D3D12_MESSAGE_ID_CREATE_ROOT_SIGNATURE_INVALID_CONFIGURATION = 698, + D3D12_MESSAGE_ID_CREATE_ROOT_SIGNATURE_NOT_SUPPORTED_ON_DEVICE = 699, + D3D12_MESSAGE_ID_CREATERESOURCEANDHEAP_NULLRESOURCEPROPERTIES = 700, + D3D12_MESSAGE_ID_CREATERESOURCEANDHEAP_NULLHEAP = 701, + D3D12_MESSAGE_ID_GETRESOURCEALLOCATIONINFO_INVALIDRDESCS = 702, + D3D12_MESSAGE_ID_MAKERESIDENT_NULLOBJECTARRAY = 703, + D3D12_MESSAGE_ID_MAKERESIDENT_INVALIDOBJECT = 704, + D3D12_MESSAGE_ID_EVICT_NULLOBJECTARRAY = 705, + D3D12_MESSAGE_ID_EVICT_INVALIDOBJECT = 706, + D3D12_MESSAGE_ID_HEAPS_UNSUPPORTED = 707, + D3D12_MESSAGE_ID_SET_DESCRIPTOR_TABLE_INVALID = 708, + D3D12_MESSAGE_ID_SET_ROOT_CONSTANT_INVALID = 709, + D3D12_MESSAGE_ID_SET_ROOT_CONSTANT_BUFFER_VIEW_INVALID = 710, + D3D12_MESSAGE_ID_SET_ROOT_SHADER_RESOURCE_VIEW_INVALID = 711, + D3D12_MESSAGE_ID_SET_ROOT_UNORDERED_ACCESS_VIEW_INVALID = 712, + D3D12_MESSAGE_ID_SET_VERTEX_BUFFERS_INVALID_DESC = 713, + D3D12_MESSAGE_ID_SET_VERTEX_BUFFERS_LARGE_OFFSET = 714, + D3D12_MESSAGE_ID_SET_INDEX_BUFFER_INVALID_DESC = 715, + D3D12_MESSAGE_ID_SET_INDEX_BUFFER_LARGE_OFFSET = 716, + D3D12_MESSAGE_ID_SET_STREAM_OUTPUT_BUFFERS_INVALID_DESC = 717, + D3D12_MESSAGE_ID_CREATERESOURCE_UNRECOGNIZEDDIMENSIONALITY = 718, + D3D12_MESSAGE_ID_CREATERESOURCE_UNRECOGNIZEDLAYOUT = 719, + D3D12_MESSAGE_ID_CREATERESOURCE_INVALIDDIMENSIONALITY = 720, + D3D12_MESSAGE_ID_CREATERESOURCE_INVALIDALIGNMENT = 721, + D3D12_MESSAGE_ID_CREATERESOURCE_INVALIDMIPLEVELS = 722, + D3D12_MESSAGE_ID_CREATERESOURCE_INVALIDSAMPLEDESC = 723, + D3D12_MESSAGE_ID_CREATERESOURCE_INVALIDLAYOUT = 724, + D3D12_MESSAGE_ID_SET_INDEX_BUFFER_INVALID = 725, + D3D12_MESSAGE_ID_SET_VERTEX_BUFFERS_INVALID = 726, + D3D12_MESSAGE_ID_SET_STREAM_OUTPUT_BUFFERS_INVALID = 727, + D3D12_MESSAGE_ID_SET_RENDER_TARGETS_INVALID = 728, + D3D12_MESSAGE_ID_CREATEQUERY_HEAP_INVALID_PARAMETERS = 729, + D3D12_MESSAGE_ID_CREATEQUERY_HEAP_JPEG_NOT_SUPPORTED = 730, + D3D12_MESSAGE_ID_BEGIN_END_QUERY_INVALID_PARAMETERS = 731, + D3D12_MESSAGE_ID_CLOSE_COMMAND_LIST_OPEN_QUERY = 732, + D3D12_MESSAGE_ID_RESOLVE_QUERY_DATA_INVALID_PARAMETERS = 733, + D3D12_MESSAGE_ID_SET_PREDICATION_INVALID_PARAMETERS = 734, + D3D12_MESSAGE_ID_TIMESTAMPS_NOT_SUPPORTED = 735, + D3D12_MESSAGE_ID_UNSTABLE_POWER_STATE = 736, + D3D12_MESSAGE_ID_CREATERESOURCE_UNRECOGNIZEDFORMAT = 737, + D3D12_MESSAGE_ID_CREATERESOURCE_INVALIDFORMAT = 738, + D3D12_MESSAGE_ID_GETCOPYABLELAYOUT_INVALIDSUBRESOURCERANGE = 739, + D3D12_MESSAGE_ID_GETCOPYABLELAYOUT_INVALIDBASEOFFSET = 740, + D3D12_MESSAGE_ID_RESOURCE_BARRIER_INVALID_HEAP = 741, + D3D12_MESSAGE_ID_CREATE_SAMPLER_INVALID = 742, + D3D12_MESSAGE_ID_CREATECOMMANDSIGNATURE_INVALID = 743, + D3D12_MESSAGE_ID_EXECUTE_INDIRECT_INVALID_PARAMETERS = 744, + D3D12_MESSAGE_ID_GETGPUVIRTUALADDRESS_INVALID_RESOURCE_DIMENSION = 745, + D3D12_MESSAGE_ID_CREATEQUERYORPREDICATE_INVALIDCONTEXTTYPE = 746, + D3D12_MESSAGE_ID_CREATEQUERYORPREDICATE_DECODENOTSUPPORTED = 747, + D3D12_MESSAGE_ID_CREATEQUERYORPREDICATE_ENCODENOTSUPPORTED = 748, + D3D12_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDPLANEINDEX = 749, + D3D12_MESSAGE_ID_CREATESHADERRESOURCEVIEW_INVALIDVIDEOPLANEINDEX = 750, + D3D12_MESSAGE_ID_CREATESHADERRESOURCEVIEW_AMBIGUOUSVIDEOPLANEINDEX = 751, + D3D12_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDPLANEINDEX = 752, + D3D12_MESSAGE_ID_CREATERENDERTARGETVIEW_INVALIDVIDEOPLANEINDEX = 753, + D3D12_MESSAGE_ID_CREATERENDERTARGETVIEW_AMBIGUOUSVIDEOPLANEINDEX = 754, + D3D12_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_INVALIDPLANEINDEX = 755, + D3D12_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_INVALIDVIDEOPLANEINDEX = 756, + D3D12_MESSAGE_ID_CREATEUNORDEREDACCESSVIEW_AMBIGUOUSVIDEOPLANEINDEX = 757, + D3D12_MESSAGE_ID_JPEGDECODE_INVALIDSCANDATAOFFSET = 758, + D3D12_MESSAGE_ID_JPEGDECODE_NOTSUPPORTED = 759, + D3D12_MESSAGE_ID_JPEGDECODE_DIMENSIONSTOOLARGE = 760, + D3D12_MESSAGE_ID_JPEGDECODE_INVALIDCOMPONENTS = 761, + D3D12_MESSAGE_ID_JPEGDECODE_UNSUPPORTEDCOMPONENTS = 762, + D3D12_MESSAGE_ID_JPEGDECODE_DESTINATIONNOT2D = 763, + D3D12_MESSAGE_ID_JPEGDECODE_TILEDRESOURCESUNSUPPORTED = 764, + D3D12_MESSAGE_ID_JPEGDECODE_GUARDRECTSUNSUPPORTED = 765, + D3D12_MESSAGE_ID_JPEGDECODE_FORMATUNSUPPORTED = 766, + D3D12_MESSAGE_ID_JPEGDECODE_INVALIDSUBRESOURCE = 767, + D3D12_MESSAGE_ID_JPEGDECODE_INVALIDMIPLEVEL = 768, + D3D12_MESSAGE_ID_JPEGDECODE_EMPTYDESTBOX = 769, + D3D12_MESSAGE_ID_JPEGDECODE_DESTBOXNOT2D = 770, + D3D12_MESSAGE_ID_JPEGDECODE_DESTBOXNOTSUB = 771, + D3D12_MESSAGE_ID_JPEGDECODE_DESTBOXESINTERSECT = 772, + D3D12_MESSAGE_ID_JPEGDECODE_XSUBSAMPLEMISMATCH = 773, + D3D12_MESSAGE_ID_JPEGDECODE_YSUBSAMPLEMISMATCH = 774, + D3D12_MESSAGE_ID_JPEGDECODE_XSUBSAMPLEODD = 775, + D3D12_MESSAGE_ID_JPEGDECODE_YSUBSAMPLEODD = 776, + D3D12_MESSAGE_ID_JPEGDECODE_UPSCALEUNSUPPORTED = 777, + D3D12_MESSAGE_ID_JPEGDECODE_TIER4DOWNSCALETOLARGE = 778, + D3D12_MESSAGE_ID_JPEGDECODE_TIER3DOWNSCALEUNSUPPORTED = 779, + D3D12_MESSAGE_ID_JPEGDECODE_CHROMASIZEMISMATCH = 780, + D3D12_MESSAGE_ID_JPEGDECODE_LUMACHROMASIZEMISMATCH = 781, + D3D12_MESSAGE_ID_JPEGDECODE_INVALIDNUMDESTINATIONS = 782, + D3D12_MESSAGE_ID_JPEGDECODE_SUBBOXUNSUPPORTED = 783, + D3D12_MESSAGE_ID_JPEGDECODE_1DESTUNSUPPORTEDFORMAT = 784, + D3D12_MESSAGE_ID_JPEGDECODE_3DESTUNSUPPORTEDFORMAT = 785, + D3D12_MESSAGE_ID_JPEGDECODE_SCALEUNSUPPORTED = 786, + D3D12_MESSAGE_ID_JPEGDECODE_INVALIDSOURCESIZE = 787, + D3D12_MESSAGE_ID_JPEGDECODE_INVALIDCOPYFLAGS = 788, + D3D12_MESSAGE_ID_JPEGDECODE_HAZARD = 789, + D3D12_MESSAGE_ID_JPEGDECODE_UNSUPPORTEDSRCBUFFERUSAGE = 790, + D3D12_MESSAGE_ID_JPEGDECODE_UNSUPPORTEDSRCBUFFERMISCFLAGS = 791, + D3D12_MESSAGE_ID_JPEGDECODE_UNSUPPORTEDDSTTEXTUREUSAGE = 792, + D3D12_MESSAGE_ID_JPEGDECODE_BACKBUFFERNOTSUPPORTED = 793, + D3D12_MESSAGE_ID_JPEGDECODE_UNSUPPRTEDCOPYFLAGS = 794, + D3D12_MESSAGE_ID_JPEGENCODE_NOTSUPPORTED = 795, + D3D12_MESSAGE_ID_JPEGENCODE_INVALIDSCANDATAOFFSET = 796, + D3D12_MESSAGE_ID_JPEGENCODE_INVALIDCOMPONENTS = 797, + D3D12_MESSAGE_ID_JPEGENCODE_SOURCENOT2D = 798, + D3D12_MESSAGE_ID_JPEGENCODE_TILEDRESOURCESUNSUPPORTED = 799, + D3D12_MESSAGE_ID_JPEGENCODE_GUARDRECTSUNSUPPORTED = 800, + D3D12_MESSAGE_ID_JPEGENCODE_XSUBSAMPLEMISMATCH = 801, + D3D12_MESSAGE_ID_JPEGENCODE_YSUBSAMPLEMISMATCH = 802, + D3D12_MESSAGE_ID_JPEGENCODE_UNSUPPORTEDCOMPONENTS = 803, + D3D12_MESSAGE_ID_JPEGENCODE_FORMATUNSUPPORTED = 804, + D3D12_MESSAGE_ID_JPEGENCODE_INVALIDSUBRESOURCE = 805, + D3D12_MESSAGE_ID_JPEGENCODE_INVALIDMIPLEVEL = 806, + D3D12_MESSAGE_ID_JPEGENCODE_DIMENSIONSTOOLARGE = 807, + D3D12_MESSAGE_ID_JPEGENCODE_HAZARD = 808, + D3D12_MESSAGE_ID_JPEGENCODE_UNSUPPORTEDDSTBUFFERUSAGE = 809, + D3D12_MESSAGE_ID_JPEGENCODE_UNSUPPORTEDDSTBUFFERMISCFLAGS = 810, + D3D12_MESSAGE_ID_JPEGENCODE_UNSUPPORTEDSRCTEXTUREUSAGE = 811, + D3D12_MESSAGE_ID_JPEGENCODE_BACKBUFFERNOTSUPPORTED = 812, + D3D12_MESSAGE_ID_CREATEQUERYORPREDICATE_UNSUPPORTEDCONTEXTTTYPEFORQUERY = 813, + D3D12_MESSAGE_ID_FLUSH1_INVALIDCONTEXTTYPE = 814, + D3D12_MESSAGE_ID_CREATERESOURCE_INVALIDCLEARVALUE = 815, + D3D12_MESSAGE_ID_CREATERESOURCE_UNRECOGNIZEDCLEARVALUEFORMAT = 816, + D3D12_MESSAGE_ID_CREATERESOURCE_INVALIDCLEARVALUEFORMAT = 817, + D3D12_MESSAGE_ID_CREATERESOURCE_CLEARVALUEDENORMFLUSH = 818, + D3D12_MESSAGE_ID_CLEARDEPTHSTENCILVIEW_INVALIDDEPTH = 819, + D3D12_MESSAGE_ID_CLEARRENDERTARGETVIEW_MISMATCHINGCLEARVALUE = 820, + D3D12_MESSAGE_ID_CLEARDEPTHSTENCILVIEW_MISMATCHINGCLEARVALUE = 821, + D3D12_MESSAGE_ID_MAP_INVALIDHEAP = 822, + D3D12_MESSAGE_ID_UNMAP_INVALIDHEAP = 823, + D3D12_MESSAGE_ID_MAP_INVALIDRESOURCE = 824, + D3D12_MESSAGE_ID_UNMAP_INVALIDRESOURCE = 825, + D3D12_MESSAGE_ID_MAP_INVALIDSUBRESOURCE = 826, + D3D12_MESSAGE_ID_UNMAP_INVALIDSUBRESOURCE = 827, + D3D12_MESSAGE_ID_MAP_INVALIDRANGE = 828, + D3D12_MESSAGE_ID_UNMAP_INVALIDRANGE = 829, + D3D12_MESSAGE_ID_MAP_NULLRANGE = 830, + D3D12_MESSAGE_ID_UNMAP_NULLRANGE = 831, + D3D12_MESSAGE_ID_MAP_INVALIDDATAPOINTER = 832, + D3D12_MESSAGE_ID_MAP_INVALIDARG_RETURN = 833, + D3D12_MESSAGE_ID_MAP_OUTOFMEMORY_RETURN = 834, + D3D12_MESSAGE_ID_EXECUTECOMMANDLISTS_BUNDLENOTSUPPORTED = 835, + D3D12_MESSAGE_ID_EXECUTECOMMANDLISTS_COMMANDLISTMISMATCH = 836, + D3D12_MESSAGE_ID_EXECUTECOMMANDLISTS_OPENCOMMANDLIST = 837, + D3D12_MESSAGE_ID_EXECUTECOMMANDLISTS_FAILEDCOMMANDLIST = 838, + D3D12_MESSAGE_ID_COPYBUFFERREGION_NULLDST = 839, + D3D12_MESSAGE_ID_COPYBUFFERREGION_INVALIDDSTRESOURCEDIMENSION = 840, + D3D12_MESSAGE_ID_COPYBUFFERREGION_DSTRANGEOUTOFBOUNDS = 841, + D3D12_MESSAGE_ID_COPYBUFFERREGION_NULLSRC = 842, + D3D12_MESSAGE_ID_COPYBUFFERREGION_INVALIDSRCRESOURCEDIMENSION = 843, + D3D12_MESSAGE_ID_COPYBUFFERREGION_SRCRANGEOUTOFBOUNDS = 844, + D3D12_MESSAGE_ID_COPYBUFFERREGION_INVALIDCOPYFLAGS = 845, + D3D12_MESSAGE_ID_COPYTEXTUREREGION_NULLDST = 846, + D3D12_MESSAGE_ID_COPYTEXTUREREGION_UNRECOGNIZEDDSTTYPE = 847, + D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDDSTRESOURCEDIMENSION = 848, + D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDDSTRESOURCE = 849, + D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDDSTSUBRESOURCE = 850, + D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDDSTOFFSET = 851, + D3D12_MESSAGE_ID_COPYTEXTUREREGION_UNRECOGNIZEDDSTFORMAT = 852, + D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDDSTFORMAT = 853, + D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDDSTDIMENSIONS = 854, + D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDDSTROWPITCH = 855, + D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDDSTPLACEMENT = 856, + D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDDSTDSPLACEDFOOTPRINTFORMAT = 857, + D3D12_MESSAGE_ID_COPYTEXTUREREGION_DSTREGIONOUTOFBOUNDS = 858, + D3D12_MESSAGE_ID_COPYTEXTUREREGION_NULLSRC = 859, + D3D12_MESSAGE_ID_COPYTEXTUREREGION_UNRECOGNIZEDSRCTYPE = 860, + D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDSRCRESOURCEDIMENSION = 861, + D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDSRCRESOURCE = 862, + D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDSRCSUBRESOURCE = 863, + D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDSRCOFFSET = 864, + D3D12_MESSAGE_ID_COPYTEXTUREREGION_UNRECOGNIZEDSRCFORMAT = 865, + D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDSRCFORMAT = 866, + D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDSRCDIMENSIONS = 867, + D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDSRCROWPITCH = 868, + D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDSRCPLACEMENT = 869, + D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDSRCDSPLACEDFOOTPRINTFORMAT = 870, + D3D12_MESSAGE_ID_COPYTEXTUREREGION_SRCREGIONOUTOFBOUNDS = 871, + D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDDSTCOORDINATES = 872, + D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDSRCBOX = 873, + D3D12_MESSAGE_ID_COPYTEXTUREREGION_FORMATMISMATCH = 874, + D3D12_MESSAGE_ID_COPYTEXTUREREGION_EMPTYBOX = 875, + D3D12_MESSAGE_ID_COPYTEXTUREREGION_INVALIDCOPYFLAGS = 876, + D3D12_MESSAGE_ID_RESOLVESUBRESOURCE_INVALID_SUBRESOURCE_INDEX = 877, + D3D12_MESSAGE_ID_RESOLVESUBRESOURCE_INVALID_FORMAT = 878, + D3D12_MESSAGE_ID_RESOLVESUBRESOURCE_RESOURCE_MISMATCH = 879, + D3D12_MESSAGE_ID_RESOLVESUBRESOURCE_INVALID_SAMPLE_COUNT = 880, + D3D12_MESSAGE_ID_CREATECOMPUTEPIPELINESTATE_INVALID_SHADER = 881, + D3D12_MESSAGE_ID_CREATECOMPUTEPIPELINESTATE_CS_ROOT_SIGNATURE_MISMATCH = 882, + D3D12_MESSAGE_ID_CREATECOMPUTEPIPELINESTATE_MISSING_ROOT_SIGNATURE = 883, + D3D12_MESSAGE_ID_CREATEPIPELINESTATE_INVALIDCACHEDBLOB = 884, + D3D12_MESSAGE_ID_CREATEPIPELINESTATE_CACHEDBLOBADAPTERMISMATCH = 885, + D3D12_MESSAGE_ID_CREATEPIPELINESTATE_CACHEDBLOBDRIVERVERSIONMISMATCH = 886, + D3D12_MESSAGE_ID_CREATEPIPELINESTATE_CACHEDBLOBDESCMISMATCH = 887, + D3D12_MESSAGE_ID_CREATEPIPELINESTATE_CACHEDBLOBIGNORED = 888, + D3D12_MESSAGE_ID_WRITETOSUBRESOURCE_INVALIDHEAP = 889, + D3D12_MESSAGE_ID_WRITETOSUBRESOURCE_INVALIDRESOURCE = 890, + D3D12_MESSAGE_ID_WRITETOSUBRESOURCE_INVALIDBOX = 891, + D3D12_MESSAGE_ID_WRITETOSUBRESOURCE_INVALIDSUBRESOURCE = 892, + D3D12_MESSAGE_ID_WRITETOSUBRESOURCE_EMPTYBOX = 893, + D3D12_MESSAGE_ID_READFROMSUBRESOURCE_INVALIDHEAP = 894, + D3D12_MESSAGE_ID_READFROMSUBRESOURCE_INVALIDRESOURCE = 895, + D3D12_MESSAGE_ID_READFROMSUBRESOURCE_INVALIDBOX = 896, + D3D12_MESSAGE_ID_READFROMSUBRESOURCE_INVALIDSUBRESOURCE = 897, + D3D12_MESSAGE_ID_READFROMSUBRESOURCE_EMPTYBOX = 898, + D3D12_MESSAGE_ID_TOO_MANY_NODES_SPECIFIED = 899, + D3D12_MESSAGE_ID_INVALID_NODE_INDEX = 900, + D3D12_MESSAGE_ID_GETHEAPPROPERTIES_INVALIDRESOURCE = 901, + D3D12_MESSAGE_ID_NODE_MASK_MISMATCH = 902, + D3D12_MESSAGE_ID_COMMAND_LIST_OUTOFMEMORY = 903, + D3D12_MESSAGE_ID_COMMAND_LIST_MULTIPLE_SWAPCHAIN_BUFFER_REFERENCES = 904, + D3D12_MESSAGE_ID_COMMAND_LIST_TOO_MANY_SWAPCHAIN_REFERENCES = 905, + D3D12_MESSAGE_ID_COMMAND_QUEUE_TOO_MANY_SWAPCHAIN_REFERENCES = 906, + D3D12_MESSAGE_ID_EXECUTECOMMANDLISTS_WRONGSWAPCHAINBUFFERREFERENCE = 907, + D3D12_MESSAGE_ID_COMMAND_LIST_SETRENDERTARGETS_INVALIDNUMRENDERTARGETS = 908, + D3D12_MESSAGE_ID_CREATE_QUEUE_INVALID_TYPE = 909, + D3D12_MESSAGE_ID_CREATE_QUEUE_INVALID_FLAGS = 910, + D3D12_MESSAGE_ID_CREATESHAREDRESOURCE_INVALIDFLAGS = 911, + D3D12_MESSAGE_ID_CREATESHAREDRESOURCE_INVALIDFORMAT = 912, + D3D12_MESSAGE_ID_CREATESHAREDHEAP_INVALIDFLAGS = 913, + D3D12_MESSAGE_ID_REFLECTSHAREDPROPERTIES_UNRECOGNIZEDPROPERTIES = 914, + D3D12_MESSAGE_ID_REFLECTSHAREDPROPERTIES_INVALIDSIZE = 915, + D3D12_MESSAGE_ID_REFLECTSHAREDPROPERTIES_INVALIDOBJECT = 916, + D3D12_MESSAGE_ID_KEYEDMUTEX_INVALIDOBJECT = 917, + D3D12_MESSAGE_ID_KEYEDMUTEX_INVALIDKEY = 918, + D3D12_MESSAGE_ID_KEYEDMUTEX_WRONGSTATE = 919, + D3D12_MESSAGE_ID_CREATE_QUEUE_INVALID_PRIORITY = 920, + D3D12_MESSAGE_ID_OBJECT_DELETED_WHILE_STILL_IN_USE = 921, + D3D12_MESSAGE_ID_CREATEPIPELINESTATE_INVALID_FLAGS = 922, + D3D12_MESSAGE_ID_HEAP_ADDRESS_RANGE_HAS_NO_RESOURCE = 923, + D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_RENDER_TARGET_DELETED = 924, + D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_ALL_RENDER_TARGETS_HAVE_UNKNOWN_FORMAT = 925, + D3D12_MESSAGE_ID_HEAP_ADDRESS_RANGE_INTERSECTS_MULTIPLE_BUFFERS = 926, + D3D12_MESSAGE_ID_EXECUTECOMMANDLISTS_GPU_WRITTEN_READBACK_RESOURCE_MAPPED = 927, + D3D12_MESSAGE_ID_UNMAP_RANGE_NOT_NEEDED = 928, + D3D12_MESSAGE_ID_UNMAP_RANGE_NOT_EMPTY = 929, + D3D12_MESSAGE_ID_MAP_INVALID_NULLRANGE = 930, + D3D12_MESSAGE_ID_UNMAP_INVALID_NULLRANGE = 931, + D3D12_MESSAGE_ID_NO_GRAPHICS_API_SUPPORT = 932, + D3D12_MESSAGE_ID_NO_COMPUTE_API_SUPPORT = 933, + D3D12_MESSAGE_ID_D3D12_MESSAGES_END = 934, +}} +STRUCT!{struct D3D12_MESSAGE { + Category: D3D12_MESSAGE_CATEGORY, + Severity: D3D12_MESSAGE_SEVERITY, + ID: D3D12_MESSAGE_ID, + pDescription: *const ::c_char, + DescriptionByteLength: ::SIZE_T, +}} +STRUCT!{struct D3D12_INFO_QUEUE_FILTER_DESC { + NumCategories: ::UINT, + pCategoryList: *mut D3D12_MESSAGE_CATEGORY, + NumSeverities: ::UINT, + pSeverityList: *mut D3D12_MESSAGE_SEVERITY, + NumIDs: ::UINT, + pIDList: *mut D3D12_MESSAGE_ID, +}} +STRUCT!{struct D3D12_INFO_QUEUE_FILTER { + AllowList: D3D12_INFO_QUEUE_FILTER_DESC, + DenyList: D3D12_INFO_QUEUE_FILTER_DESC, +}} +pub const D3D12_INFO_QUEUE_DEFAULT_MESSAGE_COUNT_LIMIT: ::UINT = 1024; +RIDL!{interface ID3D12InfoQueue(ID3D12InfoQueueVtbl): IUnknown(IUnknownVtbl) { + fn SetMessageCountLimit(&mut self, MessageCountLimit: ::UINT64) -> ::HRESULT, + fn ClearStoredMessages(&mut self) -> (), + fn GetMessage( + &mut self, MessageIndex: ::UINT64, pMessage: *mut ::D3D12_MESSAGE, + pMessageByteLength: *mut ::SIZE_T + ) -> ::HRESULT, + fn GetNumMessagesAllowedByStorageFilter(&mut self) -> ::UINT64, + fn GetNumMessagesDeniedByStorageFilter(&mut self) -> ::UINT64, + fn GetNumStoredMessages(&mut self) -> ::UINT64, + fn GetNumStoredMessagesAllowedByRetrievalFilter(&mut self) -> ::UINT64, + fn GetNumMessagesDiscardedByMessageCountLimit(&mut self) -> ::UINT64, + fn GetMessageCountLimit(&mut self) -> ::UINT64, + fn AddStorageFilterEntries(&mut self, pFilter: *mut ::D3D12_INFO_QUEUE_FILTER) -> ::HRESULT, + fn GetStorageFilter( + &mut self, pFilter: *mut ::D3D12_INFO_QUEUE_FILTER, pFilterByteLength: *mut ::SIZE_T + ) -> ::HRESULT, + fn ClearStorageFilter(&mut self) -> (), + fn PushEmptyStorageFilter(&mut self) -> ::HRESULT, + fn PushCopyOfStorageFilter(&mut self) -> ::HRESULT, + fn PushStorageFilter(&mut self, pFilter: *mut ::D3D12_INFO_QUEUE_FILTER) -> ::HRESULT, + fn PopStorageFilter(&mut self) -> (), + fn GetStorageFilterStackSize(&mut self) -> ::UINT, + fn AddRetrievalFilterEntries(&mut self, pFilter: *mut ::D3D12_INFO_QUEUE_FILTER) -> ::HRESULT, + fn GetRetrievalFilter( + &mut self, pFilter: *mut ::D3D12_INFO_QUEUE_FILTER, pFilterByteLength: *mut ::SIZE_T + ) -> ::HRESULT, + fn ClearRetrievalFilter(&mut self) -> (), + fn PushEmptyRetrievalFilter(&mut self) -> ::HRESULT, + fn PushCopyOfRetrievalFilter(&mut self) -> ::HRESULT, + fn PushRetrievalFilter(&mut self, pFilter: *mut ::D3D12_INFO_QUEUE_FILTER) -> ::HRESULT, + fn PopRetrievalFilter(&mut self) -> (), + fn GetRetrievalFilterStackSize(&mut self) -> ::UINT, + fn AddMessage( + &mut self, Category: ::D3D12_MESSAGE_CATEGORY, Severity: ::D3D12_MESSAGE_SEVERITY, + ID: ::D3D12_MESSAGE_ID, pDescription: ::LPCSTR + ) -> ::HRESULT, + fn AddApplicationMessage( + &mut self, Severity: ::D3D12_MESSAGE_SEVERITY, pDescription: ::LPCSTR + ) -> ::HRESULT, + fn SetBreakOnCategory( + &mut self, Category: ::D3D12_MESSAGE_CATEGORY, bEnable: ::BOOL + ) -> ::HRESULT, + fn SetBreakOnSeverity( + &mut self, Severity: ::D3D12_MESSAGE_SEVERITY, bEnable: ::BOOL + ) -> ::HRESULT, + fn SetBreakOnID(&mut self, ID: ::D3D12_MESSAGE_ID, bEnable: ::BOOL) -> ::HRESULT, + fn GetBreakOnCategory(&mut self, Category: ::D3D12_MESSAGE_CATEGORY) -> ::BOOL, + fn GetBreakOnSeverity(&mut self, Severity: ::D3D12_MESSAGE_SEVERITY) -> ::BOOL, + fn GetBreakOnID(&mut self, ID: ::D3D12_MESSAGE_ID) -> ::BOOL, + fn SetMuteDebugOutput(&mut self, bMute: ::BOOL) -> (), + fn GetMuteDebugOutput(&mut self) -> ::BOOL +}} diff --git a/deps/winapi-0.2.5/src/d3d9.rs b/deps/winapi-0.2.6/src/d3d9.rs similarity index 100% rename from deps/winapi-0.2.5/src/d3d9.rs rename to deps/winapi-0.2.6/src/d3d9.rs diff --git a/deps/winapi-0.2.6/src/d3d9caps.rs b/deps/winapi-0.2.6/src/d3d9caps.rs new file mode 100644 index 000000000..74c877d7b --- /dev/null +++ b/deps/winapi-0.2.6/src/d3d9caps.rs @@ -0,0 +1,349 @@ +// Copyright © 2015, Corey Richardson +// Licensed under the MIT License <LICENSE.md> +//! Direct3D capabilities include file +STRUCT!{struct D3DVSHADERCAPS2_0 { + Caps: ::DWORD, + DynamicFlowControlDepth: ::INT, + NumTemps: ::INT, + StaticFlowControlDepth: ::INT, +}} +pub const D3DVS20CAPS_PREDICATION: ::DWORD = 1 << 0; +pub const D3DVS20_MAX_DYNAMICFLOWCONTROLDEPTH: ::DWORD = 24; +pub const D3DVS20_MIN_DYNAMICFLOWCONTROLDEPTH: ::DWORD = 0; +pub const D3DVS20_MAX_NUMTEMPS: ::DWORD = 32; +pub const D3DVS20_MIN_NUMTEMPS: ::DWORD = 12; +pub const D3DVS20_MAX_STATICFLOWCONTROLDEPTH: ::DWORD = 4; +pub const D3DVS20_MIN_STATICFLOWCONTROLDEPTH: ::DWORD = 1; +STRUCT!{struct D3DPSHADERCAPS2_0 { + Caps: ::DWORD, + DynamicFlowControlDepth: ::INT, + NumTemps: ::INT, + StaticFlowControlDepth: ::INT, + NumInstructionSlots: ::INT, +}} +pub const D3DPS20CAPS_ARBITRARYSWIZZLE: ::DWORD = 1 << 0; +pub const D3DPS20CAPS_GRADIENTINSTRUCTIONS: ::DWORD = 1 << 1; +pub const D3DPS20CAPS_PREDICATION: ::DWORD = 1 << 2; +pub const D3DPS20CAPS_NODEPENDENTREADLIMIT: ::DWORD = 1 << 3; +pub const D3DPS20CAPS_NOTEXINSTRUCTIONLIMIT: ::DWORD = 1 << 4; +pub const D3DPS20_MAX_DYNAMICFLOWCONTROLDEPTH: ::DWORD = 24; +pub const D3DPS20_MIN_DYNAMICFLOWCONTROLDEPTH: ::DWORD = 0; +pub const D3DPS20_MAX_NUMTEMPS: ::DWORD = 32; +pub const D3DPS20_MIN_NUMTEMPS: ::DWORD = 12; +pub const D3DPS20_MAX_STATICFLOWCONTROLDEPTH: ::DWORD = 4; +pub const D3DPS20_MIN_STATICFLOWCONTROLDEPTH: ::DWORD = 0; +pub const D3DPS20_MAX_NUMINSTRUCTIONSLOTS: ::DWORD = 512; +pub const D3DPS20_MIN_NUMINSTRUCTIONSLOTS: ::DWORD = 96; +pub const D3DMIN30SHADERINSTRUCTIONS: ::DWORD = 512; +pub const D3DMAX30SHADERINSTRUCTIONS: ::DWORD = 32768; +STRUCT!{struct D3DOVERLAYCAPS { + Caps: ::UINT, + MaxOverlayDisplayWidth: ::UINT, + MaxOverlayDisplayHeight: ::UINT, +}} +pub const D3DOVERLAYCAPS_FULLRANGERGB: ::DWORD = 0x00000001; +pub const D3DOVERLAYCAPS_LIMITEDRANGERGB: ::DWORD = 0x00000002; +pub const D3DOVERLAYCAPS_YCbCr_BT601: ::DWORD = 0x00000004; +pub const D3DOVERLAYCAPS_YCbCr_BT709: ::DWORD = 0x00000008; +pub const D3DOVERLAYCAPS_YCbCr_BT601_xvYCC: ::DWORD = 0x00000010; +pub const D3DOVERLAYCAPS_YCbCr_BT709_xvYCC: ::DWORD = 0x00000020; +pub const D3DOVERLAYCAPS_STRETCHX: ::DWORD = 0x00000040; +pub const D3DOVERLAYCAPS_STRETCHY: ::DWORD = 0x00000080; +STRUCT!{struct D3DCONTENTPROTECTIONCAPS { + Caps: ::DWORD, + KeyExchangeType: ::GUID, + BufferAlignmentStart: ::UINT, + BlockAlignmentSize: ::UINT, + ProtectedMemorySize: ::ULONGLONG, +}} +pub const D3DCPCAPS_SOFTWARE: ::DWORD = 0x00000001; +pub const D3DCPCAPS_HARDWARE: ::DWORD = 0x00000002; +pub const D3DCPCAPS_PROTECTIONALWAYSON: ::DWORD = 0x00000004; +pub const D3DCPCAPS_PARTIALDECRYPTION: ::DWORD = 0x00000008; +pub const D3DCPCAPS_CONTENTKEY: ::DWORD = 0x00000010; +pub const D3DCPCAPS_FRESHENSESSIONKEY: ::DWORD = 0x00000020; +pub const D3DCPCAPS_ENCRYPTEDREADBACK: ::DWORD = 0x00000040; +pub const D3DCPCAPS_ENCRYPTEDREADBACKKEY: ::DWORD = 0x00000080; +pub const D3DCPCAPS_SEQUENTIAL_CTR_IV: ::DWORD = 0x00000100; +pub const D3DCPCAPS_ENCRYPTSLICEDATAONLY: ::DWORD = 0x00000200; +STRUCT!{struct D3DCAPS9 { + DeviceType: ::D3DDEVTYPE, + AdapterOrdinal: ::UINT, + Caps: ::DWORD, + Caps2: ::DWORD, + Caps3: ::DWORD, + PresentationIntervals: ::DWORD, + CursorCaps: ::DWORD, + DevCaps: ::DWORD, + PrimitiveMiscCaps: ::DWORD, + RasterCaps: ::DWORD, + ZCmpCaps: ::DWORD, + SrcBlendCaps: ::DWORD, + DestBlendCaps: ::DWORD, + AlphaCmpCaps: ::DWORD, + ShadeCaps: ::DWORD, + TextureCaps: ::DWORD, + TextureFilterCaps: ::DWORD, + CubeTextureFilterCaps: ::DWORD, + VolumeTextureFilterCaps: ::DWORD, + TextureAddressCaps: ::DWORD, + VolumeTextureAddressCaps: ::DWORD, + LineCaps: ::DWORD, + MaxTextureWidth: ::DWORD, + MaxTextureHeight: ::DWORD, + MaxVolumeExtent: ::DWORD, + MaxTextureRepeat: ::DWORD, + MaxTextureAspectRatio: ::DWORD, + MaxAnisotropy: ::DWORD, + MaxVertexW: ::c_float, + GuardBandLeft: ::c_float, + GuardBandTop: ::c_float, + GuardBandRight: ::c_float, + GuardBandBottom: ::c_float, + ExtentsAdjust: ::c_float, + StencilCaps: ::DWORD, + FVFCaps: ::DWORD, + TextureOpCaps: ::DWORD, + MaxTextureBlendStages: ::DWORD, + MaxSimultaneousTextures: ::DWORD, + VertexProcessingCaps: ::DWORD, + MaxActiveLights: ::DWORD, + MaxUserClipPlanes: ::DWORD, + MaxVertexBlendMatrices: ::DWORD, + MaxVertexBlendMatrixIndex: ::DWORD, + MaxPointSize: ::c_float, + MaxPrimitiveCount: ::DWORD, + MaxVertexIndex: ::DWORD, + MaxStreams: ::DWORD, + MaxStreamStride: ::DWORD, + VertexShaderVersion: ::DWORD, + MaxVertexShaderConst: ::DWORD, + PixelShaderVersion: ::DWORD, + PixelShader1xMaxValue: ::c_float, + DevCaps2: ::DWORD, + MaxNpatchTessellationLevel: ::c_float, + Reserved5: ::DWORD, + MasterAdapterOrdinal: ::UINT, + AdapterOrdinalInGroup: ::UINT, + NumberOfAdaptersInGroup: ::UINT, + DeclTypes: ::DWORD, + NumSimultaneousRTs: ::DWORD, + StretchRectFilterCaps: ::DWORD, + VS20Caps: ::D3DVSHADERCAPS2_0, + PS20Caps: ::D3DPSHADERCAPS2_0, + VertexTextureFilterCaps: ::DWORD, + MaxVShaderInstructionsExecuted: ::DWORD, + MaxPShaderInstructionsExecuted: ::DWORD, + MaxVertexShader30InstructionSlots: ::DWORD, + MaxPixelShader30InstructionSlots: ::DWORD, +}} +pub const D3DCAPS_OVERLAY: ::DWORD = 0x00000800; +pub const D3DCAPS_READ_SCANLINE: ::DWORD = 0x00020000; +pub const D3DCAPS2_FULLSCREENGAMMA: ::DWORD = 0x00020000; +pub const D3DCAPS2_CANCALIBRATEGAMMA: ::DWORD = 0x00100000; +pub const D3DCAPS2_RESERVED: ::DWORD = 0x02000000; +pub const D3DCAPS2_CANMANAGERESOURCE: ::DWORD = 0x10000000; +pub const D3DCAPS2_DYNAMICTEXTURES: ::DWORD = 0x20000000; +pub const D3DCAPS2_CANAUTOGENMIPMAP: ::DWORD = 0x40000000; +pub const D3DCAPS2_CANSHARERESOURCE: ::DWORD = 0x80000000; +pub const D3DCAPS3_RESERVED: ::DWORD = 0x8000001f; +pub const D3DCAPS3_ALPHA_FULLSCREEN_FLIP_OR_DISCARD: ::DWORD = 0x00000020; +pub const D3DCAPS3_LINEAR_TO_SRGB_PRESENTATION: ::DWORD = 0x00000080; +pub const D3DCAPS3_COPY_TO_VIDMEM: ::DWORD = 0x00000100; +pub const D3DCAPS3_COPY_TO_SYSTEMMEM: ::DWORD = 0x00000200; +pub const D3DCAPS3_DXVAHD: ::DWORD = 0x00000400; +pub const D3DCAPS3_DXVAHD_LIMITED: ::DWORD = 0x00000800; +pub const D3DPRESENT_INTERVAL_DEFAULT: ::DWORD = 0x00000000; +pub const D3DPRESENT_INTERVAL_ONE: ::DWORD = 0x00000001; +pub const D3DPRESENT_INTERVAL_TWO: ::DWORD = 0x00000002; +pub const D3DPRESENT_INTERVAL_THREE: ::DWORD = 0x00000004; +pub const D3DPRESENT_INTERVAL_FOUR: ::DWORD = 0x00000008; +pub const D3DPRESENT_INTERVAL_IMMEDIATE: ::DWORD = 0x80000000; +pub const D3DCURSORCAPS_COLOR: ::DWORD = 0x00000001; +pub const D3DCURSORCAPS_LOWRES: ::DWORD = 0x00000002; +pub const D3DDEVCAPS_EXECUTESYSTEMMEMORY: ::DWORD = 0x00000010; +pub const D3DDEVCAPS_EXECUTEVIDEOMEMORY: ::DWORD = 0x00000020; +pub const D3DDEVCAPS_TLVERTEXSYSTEMMEMORY: ::DWORD = 0x00000040; +pub const D3DDEVCAPS_TLVERTEXVIDEOMEMORY: ::DWORD = 0x00000080; +pub const D3DDEVCAPS_TEXTURESYSTEMMEMORY: ::DWORD = 0x00000100; +pub const D3DDEVCAPS_TEXTUREVIDEOMEMORY: ::DWORD = 0x00000200; +pub const D3DDEVCAPS_DRAWPRIMTLVERTEX: ::DWORD = 0x00000400; +pub const D3DDEVCAPS_CANRENDERAFTERFLIP: ::DWORD = 0x00000800; +pub const D3DDEVCAPS_TEXTURENONLOCALVIDMEM: ::DWORD = 0x00001000; +pub const D3DDEVCAPS_DRAWPRIMITIVES2: ::DWORD = 0x00002000; +pub const D3DDEVCAPS_SEPARATETEXTUREMEMORIES: ::DWORD = 0x00004000; +pub const D3DDEVCAPS_DRAWPRIMITIVES2EX: ::DWORD = 0x00008000; +pub const D3DDEVCAPS_HWTRANSFORMANDLIGHT: ::DWORD = 0x00010000; +pub const D3DDEVCAPS_CANBLTSYSTONONLOCAL: ::DWORD = 0x00020000; +pub const D3DDEVCAPS_HWRASTERIZATION: ::DWORD = 0x00080000; +pub const D3DDEVCAPS_PUREDEVICE: ::DWORD = 0x00100000; +pub const D3DDEVCAPS_QUINTICRTPATCHES: ::DWORD = 0x00200000; +pub const D3DDEVCAPS_RTPATCHES: ::DWORD = 0x00400000; +pub const D3DDEVCAPS_RTPATCHHANDLEZERO: ::DWORD = 0x00800000; +pub const D3DDEVCAPS_NPATCHES: ::DWORD = 0x01000000; +pub const D3DPMISCCAPS_MASKZ: ::DWORD = 0x00000002; +pub const D3DPMISCCAPS_CULLNONE: ::DWORD = 0x00000010; +pub const D3DPMISCCAPS_CULLCW: ::DWORD = 0x00000020; +pub const D3DPMISCCAPS_CULLCCW: ::DWORD = 0x00000040; +pub const D3DPMISCCAPS_COLORWRITEENABLE: ::DWORD = 0x00000080; +pub const D3DPMISCCAPS_CLIPPLANESCALEDPOINTS: ::DWORD = 0x00000100; +pub const D3DPMISCCAPS_CLIPTLVERTS: ::DWORD = 0x00000200; +pub const D3DPMISCCAPS_TSSARGTEMP: ::DWORD = 0x00000400; +pub const D3DPMISCCAPS_BLENDOP: ::DWORD = 0x00000800; +pub const D3DPMISCCAPS_NULLREFERENCE: ::DWORD = 0x00001000; +pub const D3DPMISCCAPS_INDEPENDENTWRITEMASKS: ::DWORD = 0x00004000; +pub const D3DPMISCCAPS_PERSTAGECONSTANT: ::DWORD = 0x00008000; +pub const D3DPMISCCAPS_FOGANDSPECULARALPHA: ::DWORD = 0x00010000; +pub const D3DPMISCCAPS_SEPARATEALPHABLEND: ::DWORD = 0x00020000; +pub const D3DPMISCCAPS_MRTINDEPENDENTBITDEPTHS: ::DWORD = 0x00040000; +pub const D3DPMISCCAPS_MRTPOSTPIXELSHADERBLENDING: ::DWORD = 0x00080000; +pub const D3DPMISCCAPS_FOGVERTEXCLAMPED: ::DWORD = 0x00100000; +pub const D3DPMISCCAPS_POSTBLENDSRGBCONVERT: ::DWORD = 0x00200000; +pub const D3DLINECAPS_TEXTURE: ::DWORD = 0x00000001; +pub const D3DLINECAPS_ZTEST: ::DWORD = 0x00000002; +pub const D3DLINECAPS_BLEND: ::DWORD = 0x00000004; +pub const D3DLINECAPS_ALPHACMP: ::DWORD = 0x00000008; +pub const D3DLINECAPS_FOG: ::DWORD = 0x00000010; +pub const D3DLINECAPS_ANTIALIAS: ::DWORD = 0x00000020; +pub const D3DPRASTERCAPS_DITHER: ::DWORD = 0x00000001; +pub const D3DPRASTERCAPS_ZTEST: ::DWORD = 0x00000010; +pub const D3DPRASTERCAPS_FOGVERTEX: ::DWORD = 0x00000080; +pub const D3DPRASTERCAPS_FOGTABLE: ::DWORD = 0x00000100; +pub const D3DPRASTERCAPS_MIPMAPLODBIAS: ::DWORD = 0x00002000; +pub const D3DPRASTERCAPS_ZBUFFERLESSHSR: ::DWORD = 0x00008000; +pub const D3DPRASTERCAPS_FOGRANGE: ::DWORD = 0x00010000; +pub const D3DPRASTERCAPS_ANISOTROPY: ::DWORD = 0x00020000; +pub const D3DPRASTERCAPS_WBUFFER: ::DWORD = 0x00040000; +pub const D3DPRASTERCAPS_WFOG: ::DWORD = 0x00100000; +pub const D3DPRASTERCAPS_ZFOG: ::DWORD = 0x00200000; +pub const D3DPRASTERCAPS_COLORPERSPECTIVE: ::DWORD = 0x00400000; +pub const D3DPRASTERCAPS_SCISSORTEST: ::DWORD = 0x01000000; +pub const D3DPRASTERCAPS_SLOPESCALEDEPTHBIAS: ::DWORD = 0x02000000; +pub const D3DPRASTERCAPS_DEPTHBIAS: ::DWORD = 0x04000000; +pub const D3DPRASTERCAPS_MULTISAMPLE_TOGGLE: ::DWORD = 0x08000000; +pub const D3DPCMPCAPS_NEVER: ::DWORD = 0x00000001; +pub const D3DPCMPCAPS_LESS: ::DWORD = 0x00000002; +pub const D3DPCMPCAPS_EQUAL: ::DWORD = 0x00000004; +pub const D3DPCMPCAPS_LESSEQUAL: ::DWORD = 0x00000008; +pub const D3DPCMPCAPS_GREATER: ::DWORD = 0x00000010; +pub const D3DPCMPCAPS_NOTEQUAL: ::DWORD = 0x00000020; +pub const D3DPCMPCAPS_GREATEREQUAL: ::DWORD = 0x00000040; +pub const D3DPCMPCAPS_ALWAYS: ::DWORD = 0x00000080; +pub const D3DPBLENDCAPS_ZERO: ::DWORD = 0x00000001; +pub const D3DPBLENDCAPS_ONE: ::DWORD = 0x00000002; +pub const D3DPBLENDCAPS_SRCCOLOR: ::DWORD = 0x00000004; +pub const D3DPBLENDCAPS_INVSRCCOLOR: ::DWORD = 0x00000008; +pub const D3DPBLENDCAPS_SRCALPHA: ::DWORD = 0x00000010; +pub const D3DPBLENDCAPS_INVSRCALPHA: ::DWORD = 0x00000020; +pub const D3DPBLENDCAPS_DESTALPHA: ::DWORD = 0x00000040; +pub const D3DPBLENDCAPS_INVDESTALPHA: ::DWORD = 0x00000080; +pub const D3DPBLENDCAPS_DESTCOLOR: ::DWORD = 0x00000100; +pub const D3DPBLENDCAPS_INVDESTCOLOR: ::DWORD = 0x00000200; +pub const D3DPBLENDCAPS_SRCALPHASAT: ::DWORD = 0x00000400; +pub const D3DPBLENDCAPS_BOTHSRCALPHA: ::DWORD = 0x00000800; +pub const D3DPBLENDCAPS_BOTHINVSRCALPHA: ::DWORD = 0x00001000; +pub const D3DPBLENDCAPS_BLENDFACTOR: ::DWORD = 0x00002000; +pub const D3DPBLENDCAPS_SRCCOLOR2: ::DWORD = 0x00004000; +pub const D3DPBLENDCAPS_INVSRCCOLOR2: ::DWORD = 0x00008000; +pub const D3DPSHADECAPS_COLORGOURAUDRGB: ::DWORD = 0x00000008; +pub const D3DPSHADECAPS_SPECULARGOURAUDRGB: ::DWORD = 0x00000200; +pub const D3DPSHADECAPS_ALPHAGOURAUDBLEND: ::DWORD = 0x00004000; +pub const D3DPSHADECAPS_FOGGOURAUD: ::DWORD = 0x00080000; +pub const D3DPTEXTURECAPS_PERSPECTIVE: ::DWORD = 0x00000001; +pub const D3DPTEXTURECAPS_POW2: ::DWORD = 0x00000002; +pub const D3DPTEXTURECAPS_ALPHA: ::DWORD = 0x00000004; +pub const D3DPTEXTURECAPS_SQUAREONLY: ::DWORD = 0x00000020; +pub const D3DPTEXTURECAPS_TEXREPEATNOTSCALEDBYSIZE: ::DWORD = 0x00000040; +pub const D3DPTEXTURECAPS_ALPHAPALETTE: ::DWORD = 0x00000080; +pub const D3DPTEXTURECAPS_NONPOW2CONDITIONAL: ::DWORD = 0x00000100; +pub const D3DPTEXTURECAPS_PROJECTED: ::DWORD = 0x00000400; +pub const D3DPTEXTURECAPS_CUBEMAP: ::DWORD = 0x00000800; +pub const D3DPTEXTURECAPS_VOLUMEMAP: ::DWORD = 0x00002000; +pub const D3DPTEXTURECAPS_MIPMAP: ::DWORD = 0x00004000; +pub const D3DPTEXTURECAPS_MIPVOLUMEMAP: ::DWORD = 0x00008000; +pub const D3DPTEXTURECAPS_MIPCUBEMAP: ::DWORD = 0x00010000; +pub const D3DPTEXTURECAPS_CUBEMAP_POW2: ::DWORD = 0x00020000; +pub const D3DPTEXTURECAPS_VOLUMEMAP_POW2: ::DWORD = 0x00040000; +pub const D3DPTEXTURECAPS_NOPROJECTEDBUMPENV: ::DWORD = 0x00200000; +pub const D3DPTFILTERCAPS_MINFPOINT: ::DWORD = 0x00000100; +pub const D3DPTFILTERCAPS_MINFLINEAR: ::DWORD = 0x00000200; +pub const D3DPTFILTERCAPS_MINFANISOTROPIC: ::DWORD = 0x00000400; +pub const D3DPTFILTERCAPS_MINFPYRAMIDALQUAD: ::DWORD = 0x00000800; +pub const D3DPTFILTERCAPS_MINFGAUSSIANQUAD: ::DWORD = 0x00001000; +pub const D3DPTFILTERCAPS_MIPFPOINT: ::DWORD = 0x00010000; +pub const D3DPTFILTERCAPS_MIPFLINEAR: ::DWORD = 0x00020000; +pub const D3DPTFILTERCAPS_CONVOLUTIONMONO: ::DWORD = 0x00040000; +pub const D3DPTFILTERCAPS_MAGFPOINT: ::DWORD = 0x01000000; +pub const D3DPTFILTERCAPS_MAGFLINEAR: ::DWORD = 0x02000000; +pub const D3DPTFILTERCAPS_MAGFANISOTROPIC: ::DWORD = 0x04000000; +pub const D3DPTFILTERCAPS_MAGFPYRAMIDALQUAD: ::DWORD = 0x08000000; +pub const D3DPTFILTERCAPS_MAGFGAUSSIANQUAD: ::DWORD = 0x10000000; +pub const D3DPTADDRESSCAPS_WRAP: ::DWORD = 0x00000001; +pub const D3DPTADDRESSCAPS_MIRROR: ::DWORD = 0x00000002; +pub const D3DPTADDRESSCAPS_CLAMP: ::DWORD = 0x00000004; +pub const D3DPTADDRESSCAPS_BORDER: ::DWORD = 0x00000008; +pub const D3DPTADDRESSCAPS_INDEPENDENTUV: ::DWORD = 0x00000010; +pub const D3DPTADDRESSCAPS_MIRRORONCE: ::DWORD = 0x00000020; +pub const D3DSTENCILCAPS_KEEP: ::DWORD = 0x00000001; +pub const D3DSTENCILCAPS_ZERO: ::DWORD = 0x00000002; +pub const D3DSTENCILCAPS_REPLACE: ::DWORD = 0x00000004; +pub const D3DSTENCILCAPS_INCRSAT: ::DWORD = 0x00000008; +pub const D3DSTENCILCAPS_DECRSAT: ::DWORD = 0x00000010; +pub const D3DSTENCILCAPS_INVERT: ::DWORD = 0x00000020; +pub const D3DSTENCILCAPS_INCR: ::DWORD = 0x00000040; +pub const D3DSTENCILCAPS_DECR: ::DWORD = 0x00000080; +pub const D3DSTENCILCAPS_TWOSIDED: ::DWORD = 0x00000100; +pub const D3DTEXOPCAPS_DISABLE: ::DWORD = 0x00000001; +pub const D3DTEXOPCAPS_SELECTARG1: ::DWORD = 0x00000002; +pub const D3DTEXOPCAPS_SELECTARG2: ::DWORD = 0x00000004; +pub const D3DTEXOPCAPS_MODULATE: ::DWORD = 0x00000008; +pub const D3DTEXOPCAPS_MODULATE2X: ::DWORD = 0x00000010; +pub const D3DTEXOPCAPS_MODULATE4X: ::DWORD = 0x00000020; +pub const D3DTEXOPCAPS_ADD: ::DWORD = 0x00000040; +pub const D3DTEXOPCAPS_ADDSIGNED: ::DWORD = 0x00000080; +pub const D3DTEXOPCAPS_ADDSIGNED2X: ::DWORD = 0x00000100; +pub const D3DTEXOPCAPS_SUBTRACT: ::DWORD = 0x00000200; +pub const D3DTEXOPCAPS_ADDSMOOTH: ::DWORD = 0x00000400; +pub const D3DTEXOPCAPS_BLENDDIFFUSEALPHA: ::DWORD = 0x00000800; +pub const D3DTEXOPCAPS_BLENDTEXTUREALPHA: ::DWORD = 0x00001000; +pub const D3DTEXOPCAPS_BLENDFACTORALPHA: ::DWORD = 0x00002000; +pub const D3DTEXOPCAPS_BLENDTEXTUREALPHAPM: ::DWORD = 0x00004000; +pub const D3DTEXOPCAPS_BLENDCURRENTALPHA: ::DWORD = 0x00008000; +pub const D3DTEXOPCAPS_PREMODULATE: ::DWORD = 0x00010000; +pub const D3DTEXOPCAPS_MODULATEALPHA_ADDCOLOR: ::DWORD = 0x00020000; +pub const D3DTEXOPCAPS_MODULATECOLOR_ADDALPHA: ::DWORD = 0x00040000; +pub const D3DTEXOPCAPS_MODULATEINVALPHA_ADDCOLOR: ::DWORD = 0x00080000; +pub const D3DTEXOPCAPS_MODULATEINVCOLOR_ADDALPHA: ::DWORD = 0x00100000; +pub const D3DTEXOPCAPS_BUMPENVMAP: ::DWORD = 0x00200000; +pub const D3DTEXOPCAPS_BUMPENVMAPLUMINANCE: ::DWORD = 0x00400000; +pub const D3DTEXOPCAPS_DOTPRODUCT3: ::DWORD = 0x00800000; +pub const D3DTEXOPCAPS_MULTIPLYADD: ::DWORD = 0x01000000; +pub const D3DTEXOPCAPS_LERP: ::DWORD = 0x02000000; +pub const D3DFVFCAPS_TEXCOORDCOUNTMASK: ::DWORD = 0x0000ffff; +pub const D3DFVFCAPS_DONOTSTRIPELEMENTS: ::DWORD = 0x00080000; +pub const D3DFVFCAPS_PSIZE: ::DWORD = 0x00100000; +pub const D3DVTXPCAPS_TEXGEN: ::DWORD = 0x00000001; +pub const D3DVTXPCAPS_MATERIALSOURCE7: ::DWORD = 0x00000002; +pub const D3DVTXPCAPS_DIRECTIONALLIGHTS: ::DWORD = 0x00000008; +pub const D3DVTXPCAPS_POSITIONALLIGHTS: ::DWORD = 0x00000010; +pub const D3DVTXPCAPS_LOCALVIEWER: ::DWORD = 0x00000020; +pub const D3DVTXPCAPS_TWEENING: ::DWORD = 0x00000040; +pub const D3DVTXPCAPS_TEXGEN_SPHEREMAP: ::DWORD = 0x00000100; +pub const D3DVTXPCAPS_NO_TEXGEN_NONLOCALVIEWER: ::DWORD = 0x00000200; +pub const D3DDEVCAPS2_STREAMOFFSET: ::DWORD = 0x00000001; +pub const D3DDEVCAPS2_DMAPNPATCH: ::DWORD = 0x00000002; +pub const D3DDEVCAPS2_ADAPTIVETESSRTPATCH: ::DWORD = 0x00000004; +pub const D3DDEVCAPS2_ADAPTIVETESSNPATCH: ::DWORD = 0x00000008; +pub const D3DDEVCAPS2_CAN_STRETCHRECT_FROM_TEXTURES: ::DWORD = 0x00000010; +pub const D3DDEVCAPS2_PRESAMPLEDDMAPNPATCH: ::DWORD = 0x00000020; +pub const D3DDEVCAPS2_VERTEXELEMENTSCANSHARESTREAMOFFSET: ::DWORD = 0x00000040; +pub const D3DDTCAPS_UBYTE4: ::DWORD = 0x00000001; +pub const D3DDTCAPS_UBYTE4N: ::DWORD = 0x00000002; +pub const D3DDTCAPS_SHORT2N: ::DWORD = 0x00000004; +pub const D3DDTCAPS_SHORT4N: ::DWORD = 0x00000008; +pub const D3DDTCAPS_USHORT2N: ::DWORD = 0x00000010; +pub const D3DDTCAPS_USHORT4N: ::DWORD = 0x00000020; +pub const D3DDTCAPS_UDEC3: ::DWORD = 0x00000040; +pub const D3DDTCAPS_DEC3N: ::DWORD = 0x00000080; +pub const D3DDTCAPS_FLOAT16_2: ::DWORD = 0x00000100; +pub const D3DDTCAPS_FLOAT16_4: ::DWORD = 0x00000200; diff --git a/deps/winapi-0.2.6/src/d3d9types.rs b/deps/winapi-0.2.6/src/d3d9types.rs new file mode 100644 index 000000000..28d0bedfc --- /dev/null +++ b/deps/winapi-0.2.6/src/d3d9types.rs @@ -0,0 +1,1397 @@ +// Copyright © 2015, Corey Richardson +// Licensed under the MIT License <LICENSE.md> +//! Direct3D capabilities include file +pub type D3DCOLOR = ::DWORD; +STRUCT!{struct D3DVECTOR { + x: ::c_float, + y: ::c_float, + z: ::c_float, +}} +STRUCT!{struct D3DCOLORVALUE { + r: ::c_float, + g: ::c_float, + b: ::c_float, + a: ::c_float, +}} +STRUCT!{struct D3DRECT { + x1: ::LONG, + y1: ::LONG, + x2: ::LONG, + y2: ::LONG, +}} +STRUCT!{struct D3DMATRIX { + m: [[::c_float; 4]; 4], +}} +STRUCT!{struct D3DVIEWPORT9 { + X: ::DWORD, + Y: ::DWORD, + Width: ::DWORD, + Height: ::DWORD, + MinZ: ::c_float, + MaxZ: ::c_float, +}} +pub const D3DMAXUSERCLIPPLANES: ::DWORD = 32; +pub const D3DCLIPPLANE0: ::DWORD = (1 << 0); +pub const D3DCLIPPLANE1: ::DWORD = (1 << 1); +pub const D3DCLIPPLANE2: ::DWORD = (1 << 2); +pub const D3DCLIPPLANE3: ::DWORD = (1 << 3); +pub const D3DCLIPPLANE4: ::DWORD = (1 << 4); +pub const D3DCLIPPLANE5: ::DWORD = (1 << 5); +pub const D3DCS_LEFT: ::DWORD = 0x00000001; +pub const D3DCS_RIGHT: ::DWORD = 0x00000002; +pub const D3DCS_TOP: ::DWORD = 0x00000004; +pub const D3DCS_BOTTOM: ::DWORD = 0x00000008; +pub const D3DCS_FRONT: ::DWORD = 0x00000010; +pub const D3DCS_BACK: ::DWORD = 0x00000020; +pub const D3DCS_PLANE0: ::DWORD = 0x00000040; +pub const D3DCS_PLANE1: ::DWORD = 0x00000080; +pub const D3DCS_PLANE2: ::DWORD = 0x00000100; +pub const D3DCS_PLANE3: ::DWORD = 0x00000200; +pub const D3DCS_PLANE4: ::DWORD = 0x00000400; +pub const D3DCS_PLANE5: ::DWORD = 0x00000800; +pub const D3DCS_ALL: ::DWORD = D3DCS_LEFT | D3DCS_RIGHT | D3DCS_TOP | D3DCS_BOTTOM | D3DCS_FRONT + | D3DCS_BACK | D3DCS_PLANE0 | D3DCS_PLANE1 | D3DCS_PLANE2 | D3DCS_PLANE3 | D3DCS_PLANE4 + | D3DCS_PLANE5; +STRUCT!{struct D3DCLIPSTATUS9 { + ClipUnion: ::DWORD, + ClipIntersection: ::DWORD, +}} +STRUCT!{struct D3DMATERIAL9 { + Diffuse: D3DCOLORVALUE, + Ambient: D3DCOLORVALUE, + Specular: D3DCOLORVALUE, + Emissive: D3DCOLORVALUE, + Power: ::c_float, +}} +ENUM!{enum D3DLIGHTTYPE { + D3DLIGHT_POINT = 1, + D3DLIGHT_SPOT = 2, + D3DLIGHT_DIRECTIONAL = 3, +}} +STRUCT!{struct D3DLIGHT9 { + Type: D3DLIGHTTYPE, + Diffuse: D3DCOLORVALUE, + Specular: D3DCOLORVALUE, + Ambient: D3DCOLORVALUE, + Position: D3DVECTOR, + Direction: D3DVECTOR, + Range: ::c_float, + Falloff: ::c_float, + Attenuation0: ::c_float, + Attenuation1: ::c_float, + Attenuation2: ::c_float, + Theta: ::c_float, + Phi: ::c_float, +}} +pub const D3DCLEAR_TARGET: ::DWORD = 0x1; +pub const D3DCLEAR_ZBUFFER: ::DWORD = 0x2; +pub const D3DCLEAR_STENCIL: ::DWORD = 0x4; +ENUM!{enum D3DSHADEMODE { + D3DSHADE_FLAT = 1, + D3DSHADE_GOURAUD = 2, + D3DSHADE_PHONG = 3, +}} +ENUM!{enum D3DFILLMODE { + D3DFILL_POINT = 1, + D3DFILL_WIREFRAME = 2, + D3DFILL_SOLID = 3, +}} +ENUM!{enum D3DBLEND { + D3DBLEND_ZERO = 1, + D3DBLEND_ONE = 2, + D3DBLEND_SRCCOLOR = 3, + D3DBLEND_INVSRCCOLOR = 4, + D3DBLEND_SRCALPHA = 5, + D3DBLEND_INVSRCALPHA = 6, + D3DBLEND_DESTALPHA = 7, + D3DBLEND_INVDESTALPHA = 8, + D3DBLEND_DESTCOLOR = 9, + D3DBLEND_INVDESTCOLOR = 10, + D3DBLEND_SRCALPHASAT = 11, + D3DBLEND_BOTHSRCALPHA = 12, + D3DBLEND_BOTHINVSRCALPHA = 13, + D3DBLEND_BLENDFACTOR = 14, + D3DBLEND_INVBLENDFACTOR = 15, +}} +ENUM!{enum D3DBLENDOP { + D3DBLENDOP_ADD = 1, + D3DBLENDOP_SUBTRACT = 2, + D3DBLENDOP_REVSUBTRACT = 3, + D3DBLENDOP_MIN = 4, + D3DBLENDOP_MAX = 5, +}} +ENUM!{enum D3DTEXTUREADDRESS { + D3DTADDRESS_WRAP = 1, + D3DTADDRESS_MIRROR = 2, + D3DTADDRESS_CLAMP = 3, + D3DTADDRESS_BORDER = 4, + D3DTADDRESS_MIRRORONCE = 5, +}} +ENUM!{enum D3DCULL { + D3DCULL_NONE = 1, + D3DCULL_CW = 2, + D3DCULL_CCW = 3, +}} +ENUM!{enum D3DCMPFUNC { + D3DCMP_NEVER = 1, + D3DCMP_LESS = 2, + D3DCMP_EQUAL = 3, + D3DCMP_LESSEQUAL = 4, + D3DCMP_GREATER = 5, + D3DCMP_NOTEQUAL = 6, + D3DCMP_GREATEREQUAL = 7, + D3DCMP_ALWAYS = 8, +}} +ENUM!{enum D3DSTENCILOP { + D3DSTENCILOP_KEEP = 1, + D3DSTENCILOP_ZERO = 2, + D3DSTENCILOP_REPLACE = 3, + D3DSTENCILOP_INCRSAT = 4, + D3DSTENCILOP_DECRSAT = 5, + D3DSTENCILOP_INVERT = 6, + D3DSTENCILOP_INCR = 7, + D3DSTENCILOP_DECR = 8, +}} +ENUM!{enum D3DFOGMODE { + D3DFOG_NONE = 0, + D3DFOG_EXP = 1, + D3DFOG_EXP2 = 2, + D3DFOG_LINEAR = 3, +}} +ENUM!{enum D3DZBUFFERTYPE { + D3DZB_FALSE = 0, + D3DZB_TRUE = 1, + D3DZB_USEW = 2, +}} +ENUM!{enum D3DPRIMITIVETYPE { + D3DPT_POINTLIST = 1, + D3DPT_LINELIST = 2, + D3DPT_LINESTRIP = 3, + D3DPT_TRIANGLELIST = 4, + D3DPT_TRIANGLESTRIP = 5, + D3DPT_TRIANGLEFAN = 6, +}} +ENUM!{enum D3DTRANSFORMSTATETYPE { + D3DTS_VIEW = 2, + D3DTS_PROJECTION = 3, + D3DTS_TEXTURE0 = 16, + D3DTS_TEXTURE1 = 17, + D3DTS_TEXTURE2 = 18, + D3DTS_TEXTURE3 = 19, + D3DTS_TEXTURE4 = 20, + D3DTS_TEXTURE5 = 21, + D3DTS_TEXTURE6 = 22, + D3DTS_TEXTURE7 = 23, +}} +ENUM!{enum D3DRENDERSTATETYPE { + D3DRS_ZENABLE = 7, + D3DRS_FILLMODE = 8, + D3DRS_SHADEMODE = 9, + D3DRS_ZWRITEENABLE = 14, + D3DRS_ALPHATESTENABLE = 15, + D3DRS_LASTPIXEL = 16, + D3DRS_SRCBLEND = 19, + D3DRS_DESTBLEND = 20, + D3DRS_CULLMODE = 22, + D3DRS_ZFUNC = 23, + D3DRS_ALPHAREF = 24, + D3DRS_ALPHAFUNC = 25, + D3DRS_DITHERENABLE = 26, + D3DRS_ALPHABLENDENABLE = 27, + D3DRS_FOGENABLE = 28, + D3DRS_SPECULARENABLE = 29, + D3DRS_FOGCOLOR = 34, + D3DRS_FOGTABLEMODE = 35, + D3DRS_FOGSTART = 36, + D3DRS_FOGEND = 37, + D3DRS_FOGDENSITY = 38, + D3DRS_RANGEFOGENABLE = 48, + D3DRS_STENCILENABLE = 52, + D3DRS_STENCILFAIL = 53, + D3DRS_STENCILZFAIL = 54, + D3DRS_STENCILPASS = 55, + D3DRS_STENCILFUNC = 56, + D3DRS_STENCILREF = 57, + D3DRS_STENCILMASK = 58, + D3DRS_STENCILWRITEMASK = 59, + D3DRS_TEXTUREFACTOR = 60, + D3DRS_WRAP0 = 128, + D3DRS_WRAP1 = 129, + D3DRS_WRAP2 = 130, + D3DRS_WRAP3 = 131, + D3DRS_WRAP4 = 132, + D3DRS_WRAP5 = 133, + D3DRS_WRAP6 = 134, + D3DRS_WRAP7 = 135, + D3DRS_CLIPPING = 136, + D3DRS_LIGHTING = 137, + D3DRS_AMBIENT = 139, + D3DRS_FOGVERTEXMODE = 140, + D3DRS_COLORVERTEX = 141, + D3DRS_LOCALVIEWER = 142, + D3DRS_NORMALIZENORMALS = 143, + D3DRS_DIFFUSEMATERIALSOURCE = 145, + D3DRS_SPECULARMATERIALSOURCE = 146, + D3DRS_AMBIENTMATERIALSOURCE = 147, + D3DRS_EMISSIVEMATERIALSOURCE = 148, + D3DRS_VERTEXBLEND = 151, + D3DRS_CLIPPLANEENABLE = 152, + D3DRS_POINTSIZE = 154, + D3DRS_POINTSIZE_MIN = 155, + D3DRS_POINTSPRITEENABLE = 156, + D3DRS_POINTSCALEENABLE = 157, + D3DRS_POINTSCALE_A = 158, + D3DRS_POINTSCALE_B = 159, + D3DRS_POINTSCALE_C = 160, + D3DRS_MULTISAMPLEANTIALIAS = 161, + D3DRS_MULTISAMPLEMASK = 162, + D3DRS_PATCHEDGESTYLE = 163, + D3DRS_DEBUGMONITORTOKEN = 165, + D3DRS_POINTSIZE_MAX = 166, + D3DRS_INDEXEDVERTEXBLENDENABLE = 167, + D3DRS_COLORWRITEENABLE = 168, + D3DRS_TWEENFACTOR = 170, + D3DRS_BLENDOP = 171, + D3DRS_POSITIONDEGREE = 172, + D3DRS_NORMALDEGREE = 173, + D3DRS_SCISSORTESTENABLE = 174, + D3DRS_SLOPESCALEDEPTHBIAS = 175, + D3DRS_ANTIALIASEDLINEENABLE = 176, + D3DRS_MINTESSELLATIONLEVEL = 178, + D3DRS_MAXTESSELLATIONLEVEL = 179, + D3DRS_ADAPTIVETESS_X = 180, + D3DRS_ADAPTIVETESS_Y = 181, + D3DRS_ADAPTIVETESS_Z = 182, + D3DRS_ADAPTIVETESS_W = 183, + D3DRS_ENABLEADAPTIVETESSELLATION = 184, + D3DRS_TWOSIDEDSTENCILMODE = 185, + D3DRS_CCW_STENCILFAIL = 186, + D3DRS_CCW_STENCILZFAIL = 187, + D3DRS_CCW_STENCILPASS = 188, + D3DRS_CCW_STENCILFUNC = 189, + D3DRS_COLORWRITEENABLE1 = 190, + D3DRS_COLORWRITEENABLE2 = 191, + D3DRS_COLORWRITEENABLE3 = 192, + D3DRS_BLENDFACTOR = 193, + D3DRS_SRGBWRITEENABLE = 194, + D3DRS_DEPTHBIAS = 195, + D3DRS_WRAP8 = 198, + D3DRS_WRAP9 = 199, + D3DRS_WRAP10 = 200, + D3DRS_WRAP11 = 201, + D3DRS_WRAP12 = 202, + D3DRS_WRAP13 = 203, + D3DRS_WRAP14 = 204, + D3DRS_WRAP15 = 205, + D3DRS_SEPARATEALPHABLENDENABLE = 206, + D3DRS_SRCBLENDALPHA = 207, + D3DRS_DESTBLENDALPHA = 208, + D3DRS_BLENDOPALPHA = 209, +}} +pub const D3D_MAX_SIMULTANEOUS_RENDERTARGETS: ::DWORD = 4; +ENUM!{enum D3DMATERIALCOLORSOURCE { + D3DMCS_MATERIAL = 0, + D3DMCS_COLOR1 = 1, + D3DMCS_COLOR2 = 2, +}} +pub const D3DRENDERSTATE_WRAPBIAS: ::DWORD = 128; +pub const D3DWRAP_U: ::DWORD = 0x00000001; +pub const D3DWRAP_V: ::DWORD = 0x00000002; +pub const D3DWRAP_W: ::DWORD = 0x00000004; +pub const D3DWRAPCOORD_0: ::DWORD = 0x00000001; +pub const D3DWRAPCOORD_1: ::DWORD = 0x00000002; +pub const D3DWRAPCOORD_2: ::DWORD = 0x00000004; +pub const D3DWRAPCOORD_3: ::DWORD = 0x00000008; +pub const D3DCOLORWRITEENABLE_RED: ::DWORD = 1 << 0; +pub const D3DCOLORWRITEENABLE_GREEN: ::DWORD = 1 << 1; +pub const D3DCOLORWRITEENABLE_BLUE: ::DWORD = 1 << 2; +pub const D3DCOLORWRITEENABLE_ALPHA: ::DWORD = 1 << 3; +ENUM!{enum D3DTEXTURESTAGESTATETYPE { + D3DTSS_COLOROP = 1, + D3DTSS_COLORARG1 = 2, + D3DTSS_COLORARG2 = 3, + D3DTSS_ALPHAOP = 4, + D3DTSS_ALPHAARG1 = 5, + D3DTSS_ALPHAARG2 = 6, + D3DTSS_BUMPENVMAT00 = 7, + D3DTSS_BUMPENVMAT01 = 8, + D3DTSS_BUMPENVMAT10 = 9, + D3DTSS_BUMPENVMAT11 = 10, + D3DTSS_TEXCOORDINDEX = 11, + D3DTSS_BUMPENVLSCALE = 22, + D3DTSS_BUMPENVLOFFSET = 23, + D3DTSS_TEXTURETRANSFORMFLAGS = 24, + D3DTSS_COLORARG0 = 26, + D3DTSS_ALPHAARG0 = 27, + D3DTSS_RESULTARG = 28, + D3DTSS_CONSTANT = 32, +}} +ENUM!{enum D3DSAMPLERSTATETYPE { + D3DSAMP_ADDRESSU = 1, + D3DSAMP_ADDRESSV = 2, + D3DSAMP_ADDRESSW = 3, + D3DSAMP_BORDERCOLOR = 4, + D3DSAMP_MAGFILTER = 5, + D3DSAMP_MINFILTER = 6, + D3DSAMP_MIPFILTER = 7, + D3DSAMP_MIPMAPLODBIAS = 8, + D3DSAMP_MAXMIPLEVEL = 9, + D3DSAMP_MAXANISOTROPY = 10, + D3DSAMP_SRGBTEXTURE = 11, + D3DSAMP_ELEMENTINDEX = 12, + D3DSAMP_DMAPOFFSET = 13, +}} +pub const D3DDMAPSAMPLER: ::DWORD = 256; +pub const D3DVERTEXTEXTURESAMPLER0: ::DWORD = D3DDMAPSAMPLER + 1; +pub const D3DVERTEXTEXTURESAMPLER1: ::DWORD = D3DDMAPSAMPLER + 2; +pub const D3DVERTEXTEXTURESAMPLER2: ::DWORD = D3DDMAPSAMPLER + 3; +pub const D3DVERTEXTEXTURESAMPLER3: ::DWORD = D3DDMAPSAMPLER + 4; +pub const D3DTSS_TCI_PASSTHRU: ::DWORD = 0x00000000; +pub const D3DTSS_TCI_CAMERASPACENORMAL: ::DWORD = 0x00010000; +pub const D3DTSS_TCI_CAMERASPACEPOSITION: ::DWORD = 0x00020000; +pub const D3DTSS_TCI_CAMERASPACEREFLECTIONVECTOR: ::DWORD = 0x00030000; +pub const D3DTSS_TCI_SPHEREMAP: ::DWORD = 0x00040000; +ENUM!{enum D3DTEXTUREOP { + D3DTOP_DISABLE = 1, + D3DTOP_SELECTARG1 = 2, + D3DTOP_SELECTARG2 = 3, + D3DTOP_MODULATE = 4, + D3DTOP_MODULATE2X = 5, + D3DTOP_MODULATE4X = 6, + D3DTOP_ADD = 7, + D3DTOP_ADDSIGNED = 8, + D3DTOP_ADDSIGNED2X = 9, + D3DTOP_SUBTRACT = 10, + D3DTOP_ADDSMOOTH = 11, + D3DTOP_BLENDDIFFUSEALPHA = 12, + D3DTOP_BLENDTEXTUREALPHA = 13, + D3DTOP_BLENDFACTORALPHA = 14, + D3DTOP_BLENDTEXTUREALPHAPM = 15, + D3DTOP_BLENDCURRENTALPHA = 16, + D3DTOP_PREMODULATE = 17, + D3DTOP_MODULATEALPHA_ADDCOLOR = 18, + D3DTOP_MODULATECOLOR_ADDALPHA = 19, + D3DTOP_MODULATEINVALPHA_ADDCOLOR = 20, + D3DTOP_MODULATEINVCOLOR_ADDALPHA = 21, + D3DTOP_BUMPENVMAP = 22, + D3DTOP_BUMPENVMAPLUMINANCE = 23, + D3DTOP_DOTPRODUCT3 = 24, + D3DTOP_MULTIPLYADD = 25, + D3DTOP_LERP = 26, +}} +pub const D3DTA_SELECTMASK: ::DWORD = 0x0000000f; +pub const D3DTA_DIFFUSE: ::DWORD = 0x00000000; +pub const D3DTA_CURRENT: ::DWORD = 0x00000001; +pub const D3DTA_TEXTURE: ::DWORD = 0x00000002; +pub const D3DTA_TFACTOR: ::DWORD = 0x00000003; +pub const D3DTA_SPECULAR: ::DWORD = 0x00000004; +pub const D3DTA_TEMP: ::DWORD = 0x00000005; +pub const D3DTA_CONSTANT: ::DWORD = 0x00000006; +pub const D3DTA_COMPLEMENT: ::DWORD = 0x00000010; +pub const D3DTA_ALPHAREPLICATE: ::DWORD = 0x00000020; +ENUM!{enum D3DTEXTUREFILTERTYPE { + D3DTEXF_NONE = 0, + D3DTEXF_POINT = 1, + D3DTEXF_LINEAR = 2, + D3DTEXF_ANISOTROPIC = 3, + D3DTEXF_PYRAMIDALQUAD = 6, + D3DTEXF_GAUSSIANQUAD = 7, + D3DTEXF_CONVOLUTIONMONO = 8, +}} +pub const D3DPV_DONOTCOPYDATA: ::DWORD = 1 << 0; +pub const D3DFVF_RESERVED0: ::DWORD = 0x001; +pub const D3DFVF_POSITION_MASK: ::DWORD = 0x400E; +pub const D3DFVF_XYZ: ::DWORD = 0x002; +pub const D3DFVF_XYZRHW: ::DWORD = 0x004; +pub const D3DFVF_XYZB1: ::DWORD = 0x006; +pub const D3DFVF_XYZB2: ::DWORD = 0x008; +pub const D3DFVF_XYZB3: ::DWORD = 0x00a; +pub const D3DFVF_XYZB4: ::DWORD = 0x00c; +pub const D3DFVF_XYZB5: ::DWORD = 0x00e; +pub const D3DFVF_XYZW: ::DWORD = 0x4002; +pub const D3DFVF_NORMAL: ::DWORD = 0x010; +pub const D3DFVF_PSIZE: ::DWORD = 0x020; +pub const D3DFVF_DIFFUSE: ::DWORD = 0x040; +pub const D3DFVF_SPECULAR: ::DWORD = 0x080; +pub const D3DFVF_TEXCOUNT_MASK: ::DWORD = 0xf00; +pub const D3DFVF_TEXCOUNT_SHIFT: ::DWORD = 8; +pub const D3DFVF_TEX0: ::DWORD = 0x000; +pub const D3DFVF_TEX1: ::DWORD = 0x100; +pub const D3DFVF_TEX2: ::DWORD = 0x200; +pub const D3DFVF_TEX3: ::DWORD = 0x300; +pub const D3DFVF_TEX4: ::DWORD = 0x400; +pub const D3DFVF_TEX5: ::DWORD = 0x500; +pub const D3DFVF_TEX6: ::DWORD = 0x600; +pub const D3DFVF_TEX7: ::DWORD = 0x700; +pub const D3DFVF_TEX8: ::DWORD = 0x800; +pub const D3DFVF_LASTBETA_UBYTE4: ::DWORD = 0x1000; +pub const D3DFVF_LASTBETA_D3DCOLOR: ::DWORD = 0x8000; +pub const D3DFVF_RESERVED2: ::DWORD = 0x6000; +ENUM!{enum D3DDECLUSAGE { + D3DDECLUSAGE_POSITION = 0, + D3DDECLUSAGE_BLENDWEIGHT, + D3DDECLUSAGE_BLENDINDICES, + D3DDECLUSAGE_NORMAL, + D3DDECLUSAGE_PSIZE, + D3DDECLUSAGE_TEXCOORD, + D3DDECLUSAGE_TANGENT, + D3DDECLUSAGE_BINORMAL, + D3DDECLUSAGE_TESSFACTOR, + D3DDECLUSAGE_POSITIONT, + D3DDECLUSAGE_COLOR, + D3DDECLUSAGE_FOG, + D3DDECLUSAGE_DEPTH, + D3DDECLUSAGE_SAMPLE, +}} +pub const MAXD3DDECLUSAGE: D3DDECLUSAGE = D3DDECLUSAGE_SAMPLE; +pub const MAXD3DDECLUSAGEINDEX: ::DWORD = 15; +pub const MAXD3DDECLLENGTH: ::DWORD = 64; +ENUM!{enum D3DDECLMETHOD { + D3DDECLMETHOD_DEFAULT = 0, + D3DDECLMETHOD_PARTIALU, + D3DDECLMETHOD_PARTIALV, + D3DDECLMETHOD_CROSSUV, + D3DDECLMETHOD_UV, + D3DDECLMETHOD_LOOKUP, + D3DDECLMETHOD_LOOKUPPRESAMPLED, +}} +pub const MAXD3DDECLMETHOD: D3DDECLMETHOD = D3DDECLMETHOD_LOOKUPPRESAMPLED; +ENUM!{enum D3DDECLTYPE { + D3DDECLTYPE_FLOAT1 = 0, + D3DDECLTYPE_FLOAT2 = 1, + D3DDECLTYPE_FLOAT3 = 2, + D3DDECLTYPE_FLOAT4 = 3, + D3DDECLTYPE_D3DCOLOR = 4, + D3DDECLTYPE_UBYTE4 = 5, + D3DDECLTYPE_SHORT2 = 6, + D3DDECLTYPE_SHORT4 = 7, + D3DDECLTYPE_UBYTE4N = 8, + D3DDECLTYPE_SHORT2N = 9, + D3DDECLTYPE_SHORT4N = 10, + D3DDECLTYPE_USHORT2N = 11, + D3DDECLTYPE_USHORT4N = 12, + D3DDECLTYPE_UDEC3 = 13, + D3DDECLTYPE_DEC3N = 14, + D3DDECLTYPE_FLOAT16_2 = 15, + D3DDECLTYPE_FLOAT16_4 = 16, + D3DDECLTYPE_UNUSED = 17, +}} +pub const MAXD3DDECLTYPE: D3DDECLTYPE = D3DDECLTYPE_UNUSED; +STRUCT!{struct D3DVERTEXELEMENT9 { + Stream: ::WORD, + Offset: ::WORD, + Type: ::BYTE, + Method: ::BYTE, + Usage: ::BYTE, + UsageIndex: ::BYTE, +}} +pub type LPD3DVERTEXELEMENT9 = *mut D3DVERTEXELEMENT9; +pub const D3DDECL_END: D3DVERTEXELEMENT9 = D3DVERTEXELEMENT9 { + Stream: 0xFF, + Offset: 0, + Type: D3DDECLTYPE_UNUSED.0 as ::BYTE, + Method: 0, + Usage: 0, + UsageIndex: 0, +}; +pub const D3DDP_MAXTEXCOORD: ::DWORD = 8; +pub const D3DSTREAMSOURCE_INDEXEDDATA: ::DWORD = 1 << 30; +pub const D3DSTREAMSOURCE_INSTANCEDATA: ::DWORD = 2 << 30; +pub const D3DSI_OPCODE_MASK: ::DWORD = 0x0000FFFF; +pub const D3DSI_INSTLENGTH_MASK: ::DWORD = 0x0F000000; +pub const D3DSI_INSTLENGTH_SHIFT: ::DWORD = 24; +ENUM!{enum D3DSHADER_INSTRUCTION_OPCODE_TYPE { + D3DSIO_NOP = 0, + D3DSIO_MOV = 1, + D3DSIO_ADD = 2, + D3DSIO_SUB = 3, + D3DSIO_MAD = 4, + D3DSIO_MUL = 5, + D3DSIO_RCP = 6, + D3DSIO_RSQ = 7, + D3DSIO_DP3 = 8, + D3DSIO_DP4 = 9, + D3DSIO_MIN = 10, + D3DSIO_MAX = 11, + D3DSIO_SLT = 12, + D3DSIO_SGE = 13, + D3DSIO_EXP = 14, + D3DSIO_LOG = 15, + D3DSIO_LIT = 16, + D3DSIO_DST = 17, + D3DSIO_LRP = 18, + D3DSIO_FRC = 18, + D3DSIO_M4x4 = 20, + D3DSIO_M4x3 = 21, + D3DSIO_M3x4 = 22, + D3DSIO_M3x3 = 23, + D3DSIO_M3x2 = 24, + D3DSIO_CALL = 25, + D3DSIO_CALLNZ = 26, + D3DSIO_LOOP = 27, + D3DSIO_RET = 28, + D3DSIO_ENDLOOP = 29, + D3DSIO_LABEL = 30, + D3DSIO_DCL = 31, + D3DSIO_POW = 32, + D3DSIO_CRS = 33, + D3DSIO_SGN = 34, + D3DSIO_ABS = 35, + D3DSIO_NRM = 36, + D3DSIO_SINCOS = 37, + D3DSIO_REP = 38, + D3DSIO_ENDREP = 39, + D3DSIO_IF = 40, + D3DSIO_IFC = 41, + D3DSIO_ELSE = 42, + D3DSIO_ENDIF = 43, + D3DSIO_BREAK = 44, + D3DSIO_BREAKC = 45, + D3DSIO_MOVA = 46, + D3DSIO_DEFB = 47, + D3DSIO_DEFI = 48, + D3DSIO_TEXCOORD = 64, + D3DSIO_TEXKILL = 65, + D3DSIO_TEX = 66, + D3DSIO_TEXBEM = 67, + D3DSIO_TEXBEML = 68, + D3DSIO_TEXREG2AR = 69, + D3DSIO_TEXREG2GB = 70, + D3DSIO_TEXM3x2PAD = 71, + D3DSIO_TEXM3x2TEX = 72, + D3DSIO_TEXM3x3PAD = 73, + D3DSIO_TEXM3x3TEX = 74, + D3DSIO_RESERVED0 = 75, + D3DSIO_TEXM3x3SPEC = 76, + D3DSIO_TEXM3x3VSPEC = 77, + D3DSIO_EXPP = 78, + D3DSIO_LOGP = 79, + D3DSIO_CND = 80, + D3DSIO_DEF = 81, + D3DSIO_TEXREG2RGB = 82, + D3DSIO_TEXDP3TEX = 83, + D3DSIO_TEXM3x2DEPTH = 84, + D3DSIO_TEXDP3 = 85, + D3DSIO_TEXM3x3 = 86, + D3DSIO_TEXDEPTH = 87, + D3DSIO_CMP = 88, + D3DSIO_BEM = 89, + D3DSIO_DP2ADD = 90, + D3DSIO_DSX = 91, + D3DSIO_DSY = 92, + D3DSIO_TEXLDD = 93, + D3DSIO_SETP = 94, + D3DSIO_TEXLDL = 95, + D3DSIO_BREAKP = 96, + D3DSIO_PHASE = 0xFFFD, + D3DSIO_COMMENT = 0xFFFE, + D3DSIO_END = 0xFFFF, +}} +pub const D3DSI_COISSUE: ::DWORD = 0x40000000; +pub const D3DSP_OPCODESPECIFICCONTROL_MASK: ::DWORD = 0x00ff0000; +pub const D3DSP_OPCODESPECIFICCONTROL_SHIFT: ::DWORD = 16; +pub const D3DSI_TEXLD_PROJECT: ::DWORD = 0x01 << D3DSP_OPCODESPECIFICCONTROL_SHIFT; +pub const D3DSI_TEXLD_BIAS: ::DWORD = 0x02 << D3DSP_OPCODESPECIFICCONTROL_SHIFT; +ENUM!{enum D3DSHADER_COMPARISON { + D3DSPC_RESERVED0 = 0, + D3DSPC_GT = 1, + D3DSPC_EQ = 2, + D3DSPC_GE = 3, + D3DSPC_LT = 4, + D3DSPC_NE = 5, + D3DSPC_LE = 6, + D3DSPC_RESERVED1 = 7, +}} +pub const D3DSHADER_COMPARISON_SHIFT: ::DWORD = D3DSP_OPCODESPECIFICCONTROL_SHIFT; +pub const D3DSHADER_COMPARISON_MASK: ::DWORD = 0x7 << D3DSHADER_COMPARISON_SHIFT; +pub const D3DSHADER_INSTRUCTION_PREDICATED: ::DWORD = 0x1 << 28; +pub const D3DSP_DCL_USAGE_SHIFT: ::DWORD = 0; +pub const D3DSP_DCL_USAGE_MASK: ::DWORD = 0x0000000f; +pub const D3DSP_DCL_USAGEINDEX_SHIFT: ::DWORD = 16; +pub const D3DSP_DCL_USAGEINDEX_MASK: ::DWORD = 0x000f0000; +pub const D3DSP_TEXTURETYPE_SHIFT: ::DWORD = 27; +pub const D3DSP_TEXTURETYPE_MASK: ::DWORD = 0x78000000; +ENUM!{enum D3DSAMPLER_TEXTURE_TYPE { + D3DSTT_UNKNOWN = 0 << D3DSP_TEXTURETYPE_SHIFT, + D3DSTT_2D = 2 << D3DSP_TEXTURETYPE_SHIFT, + D3DSTT_CUBE = 3 << D3DSP_TEXTURETYPE_SHIFT, + D3DSTT_VOLUME = 4 << D3DSP_TEXTURETYPE_SHIFT, +}} +pub const D3DSP_REGNUM_MASK: ::DWORD = 0x000007FF; +pub const D3DSP_WRITEMASK_0: ::DWORD = 0x00010000; +pub const D3DSP_WRITEMASK_1: ::DWORD = 0x00020000; +pub const D3DSP_WRITEMASK_2: ::DWORD = 0x00040000; +pub const D3DSP_WRITEMASK_3: ::DWORD = 0x00080000; +pub const D3DSP_WRITEMASK_ALL: ::DWORD = 0x000F0000; +pub const D3DSP_DSTMOD_SHIFT: ::DWORD = 20; +pub const D3DSP_DSTMOD_MASK: ::DWORD = 0x00F00000; +pub const D3DSPDM_NONE: ::DWORD = 0 << D3DSP_DSTMOD_SHIFT; +pub const D3DSPDM_SATURATE: ::DWORD = 1 << D3DSP_DSTMOD_SHIFT; +pub const D3DSPDM_PARTIALPRECISION: ::DWORD = 2 << D3DSP_DSTMOD_SHIFT; +pub const D3DSPDM_MSAMPCENTROID: ::DWORD = 4 << D3DSP_DSTMOD_SHIFT; +pub const D3DSP_DSTSHIFT_SHIFT: ::DWORD = 24; +pub const D3DSP_DSTSHIFT_MASK: ::DWORD = 0x0F000000; +pub const D3DSP_REGTYPE_SHIFT: ::DWORD = 28; +pub const D3DSP_REGTYPE_SHIFT2: ::DWORD = 8; +pub const D3DSP_REGTYPE_MASK: ::DWORD = 0x70000000; +pub const D3DSP_REGTYPE_MASK2: ::DWORD = 0x00001800; +ENUM!{enum D3DSHADER_PARAM_REGISTER_TYPE { + D3DSPR_TEMP = 0, + D3DSPR_INPUT = 1, + D3DSPR_CONST = 2, + D3DSPR_ADDR = 3, + D3DSPR_TEXTURE = 3, + D3DSPR_RASTOUT = 4, + D3DSPR_ATTROUT = 5, + D3DSPR_TEXCRDOUT = 6, + D3DSPR_OUTPUT = 6, + D3DSPR_CONSTINT = 7, + D3DSPR_COLOROUT = 8, + D3DSPR_DEPTHOUT = 9, + D3DSPR_SAMPLER = 10, + D3DSPR_CONST2 = 11, + D3DSPR_CONST3 = 12, + D3DSPR_CONST4 = 13, + D3DSPR_CONSTBOOL = 14, + D3DSPR_LOOP = 15, + D3DSPR_TEMPFLOAT16 = 16, + D3DSPR_MISCTYPE = 17, + D3DSPR_LABEL = 18, + D3DSPR_PREDICATE = 19, +}} +ENUM!{enum D3DSHADER_MISCTYPE_OFFSETS { + D3DSMO_POSITION = 0, + D3DSMO_FACE = 1, +}} +ENUM!{enum D3DVS_RASTOUT_OFFSETS { + D3DSRO_POSITION = 0, + D3DSRO_FOG, + D3DSRO_POINT_SIZE, +}} +pub const D3DVS_ADDRESSMODE_SHIFT: ::DWORD = 13; +pub const D3DVS_ADDRESSMODE_MASK: ::DWORD = 1 << D3DVS_ADDRESSMODE_SHIFT; +ENUM!{enum D3DVS_ADDRESSMODE_TYPE { + D3DVS_ADDRMODE_ABSOLUTE = 0 << D3DVS_ADDRESSMODE_SHIFT, + D3DVS_ADDRMODE_RELATIVE = 1 << D3DVS_ADDRESSMODE_SHIFT, +}} +pub const D3DSHADER_ADDRESSMODE_SHIFT: ::DWORD = 13; +pub const D3DSHADER_ADDRESSMODE_MASK: ::DWORD = 1 << D3DSHADER_ADDRESSMODE_SHIFT; +ENUM!{enum D3DSHADER_ADDRESSMODE_TYPE { + D3DSHADER_ADDRMODE_ABSOLUTE = 0 << D3DSHADER_ADDRESSMODE_SHIFT, + D3DSHADER_ADDRMODE_RELATIVE = 1 << D3DSHADER_ADDRESSMODE_SHIFT, +}} +pub const D3DVS_SWIZZLE_SHIFT: ::DWORD = 16; +pub const D3DVS_SWIZZLE_MASK: ::DWORD = 0x00FF0000; +pub const D3DVS_X_X: ::DWORD = 0 << D3DVS_SWIZZLE_SHIFT; +pub const D3DVS_X_Y: ::DWORD = 1 << D3DVS_SWIZZLE_SHIFT; +pub const D3DVS_X_Z: ::DWORD = 2 << D3DVS_SWIZZLE_SHIFT; +pub const D3DVS_X_W: ::DWORD = 3 << D3DVS_SWIZZLE_SHIFT; +pub const D3DVS_Y_X: ::DWORD = 0 << (D3DVS_SWIZZLE_SHIFT + 2); +pub const D3DVS_Y_Y: ::DWORD = 1 << (D3DVS_SWIZZLE_SHIFT + 2); +pub const D3DVS_Y_Z: ::DWORD = 2 << (D3DVS_SWIZZLE_SHIFT + 2); +pub const D3DVS_Y_W: ::DWORD = 3 << (D3DVS_SWIZZLE_SHIFT + 2); +pub const D3DVS_Z_X: ::DWORD = 0 << (D3DVS_SWIZZLE_SHIFT + 4); +pub const D3DVS_Z_Y: ::DWORD = 1 << (D3DVS_SWIZZLE_SHIFT + 4); +pub const D3DVS_Z_Z: ::DWORD = 2 << (D3DVS_SWIZZLE_SHIFT + 4); +pub const D3DVS_Z_W: ::DWORD = 3 << (D3DVS_SWIZZLE_SHIFT + 4); +pub const D3DVS_W_X: ::DWORD = 0 << (D3DVS_SWIZZLE_SHIFT + 6); +pub const D3DVS_W_Y: ::DWORD = 1 << (D3DVS_SWIZZLE_SHIFT + 6); +pub const D3DVS_W_Z: ::DWORD = 2 << (D3DVS_SWIZZLE_SHIFT + 6); +pub const D3DVS_W_W: ::DWORD = 3 << (D3DVS_SWIZZLE_SHIFT + 6); +pub const D3DVS_NOSWIZZLE: ::DWORD = D3DVS_X_X | D3DVS_Y_Y | D3DVS_Z_Z | D3DVS_W_W; +pub const D3DSP_SWIZZLE_SHIFT: ::DWORD = 16; +pub const D3DSP_SWIZZLE_MASK: ::DWORD = 0x00FF0000; +pub const D3DSP_NOSWIZZLE: ::DWORD = (0 << (D3DSP_SWIZZLE_SHIFT + 0)) + | (1 << (D3DSP_SWIZZLE_SHIFT + 2)) | (2 << (D3DSP_SWIZZLE_SHIFT + 4)) + | (3 << (D3DSP_SWIZZLE_SHIFT + 6)); +pub const D3DSP_REPLICATERED: ::DWORD = (0 << (D3DSP_SWIZZLE_SHIFT + 0)) + | (0 << (D3DSP_SWIZZLE_SHIFT + 2)) | (0 << (D3DSP_SWIZZLE_SHIFT + 4)) + | (0 << (D3DSP_SWIZZLE_SHIFT + 6)); +pub const D3DSP_REPLICATEGREEN: ::DWORD = (1 << (D3DSP_SWIZZLE_SHIFT + 0)) + | (1 << (D3DSP_SWIZZLE_SHIFT + 2)) | (1 << (D3DSP_SWIZZLE_SHIFT + 4)) + | (1 << (D3DSP_SWIZZLE_SHIFT + 6)); +pub const D3DSP_REPLICATEBLUE: ::DWORD = (2 << (D3DSP_SWIZZLE_SHIFT + 0)) + | (2 << (D3DSP_SWIZZLE_SHIFT + 2)) | (2 << (D3DSP_SWIZZLE_SHIFT + 4)) + | (2 << (D3DSP_SWIZZLE_SHIFT + 6)); +pub const D3DSP_REPLICATEALPHA: ::DWORD = (3 << (D3DSP_SWIZZLE_SHIFT + 0)) + | (3 << (D3DSP_SWIZZLE_SHIFT + 2)) | (3 << (D3DSP_SWIZZLE_SHIFT + 4)) + | (3 << (D3DSP_SWIZZLE_SHIFT + 6)); +pub const D3DSP_SRCMOD_SHIFT: ::DWORD = 24; +pub const D3DSP_SRCMOD_MASK: ::DWORD = 0x0F000000; +ENUM!{enum D3DSHADER_PARAM_SRCMOD_TYPE { + D3DSPSM_NONE = 0 << D3DSP_SRCMOD_SHIFT, + D3DSPSM_NEG = 1 << D3DSP_SRCMOD_SHIFT, + D3DSPSM_BIAS = 2 << D3DSP_SRCMOD_SHIFT, + D3DSPSM_BIASNEG = 3 << D3DSP_SRCMOD_SHIFT, + D3DSPSM_SIGN = 4 << D3DSP_SRCMOD_SHIFT, + D3DSPSM_SIGNNEG = 5 << D3DSP_SRCMOD_SHIFT, + D3DSPSM_COMP = 6 << D3DSP_SRCMOD_SHIFT, + D3DSPSM_X2 = 7 << D3DSP_SRCMOD_SHIFT, + D3DSPSM_X2NEG = 8 << D3DSP_SRCMOD_SHIFT, + D3DSPSM_DZ = 9 << D3DSP_SRCMOD_SHIFT, + D3DSPSM_DW = 10 << D3DSP_SRCMOD_SHIFT, + D3DSPSM_ABS = 11 << D3DSP_SRCMOD_SHIFT, + D3DSPSM_ABSNEG = 12 << D3DSP_SRCMOD_SHIFT, + D3DSPSM_NOT = 13 << D3DSP_SRCMOD_SHIFT, +}} +pub const D3DSP_MIN_PRECISION_SHIFT: ::DWORD = 14; +pub const D3DSP_MIN_PRECISION_MASK: ::DWORD = 0x0000C000; +ENUM!{enum D3DSHADER_MIN_PRECISION { + D3DMP_DEFAULT = 0, + D3DMP_16 = 1, + D3DMP_2_8 = 2, +}} +pub const D3DSI_COMMENTSIZE_SHIFT: ::DWORD = 16; +pub const D3DSI_COMMENTSIZE_MASK: ::DWORD = 0x7FFF0000; +pub const D3DPS_END: ::DWORD = 0x0000FFFF; +pub const D3DVS_END: ::DWORD = 0x0000FFFF; +ENUM!{enum D3DBASISTYPE { + D3DBASIS_BEZIER = 0, + D3DBASIS_BSPLINE = 1, + D3DBASIS_CATMULL_ROM = 2, +}} +ENUM!{enum D3DDEGREETYPE { + D3DDEGREE_LINEAR = 1, + D3DDEGREE_QUADRATIC = 2, + D3DDEGREE_CUBIC = 3, + D3DDEGREE_QUINTIC = 5, +}} +ENUM!{enum D3DPATCHEDGESTYLE { + D3DPATCHEDGE_DISCRETE = 0, + D3DPATCHEDGE_CONTINUOUS = 1, +}} +ENUM!{enum D3DSTATEBLOCKTYPE { + D3DSBT_ALL = 1, + D3DSBT_PIXELSTATE = 2, + D3DSBT_VERTEXSTATE = 3, +}} +FLAGS!{enum D3DVERTEXBLENDFLAGS { + D3DVBF_DISABLE = 0, + D3DVBF_1WEIGHTS = 1, + D3DVBF_2WEIGHTS = 2, + D3DVBF_3WEIGHTS = 3, + D3DVBF_TWEENING = 255, + D3DVBF_0WEIGHTS = 256, +}} +ENUM!{enum D3DTEXTURETRANSFORMFLAGS { + D3DTTFF_DISABLE = 0, + D3DTTFF_COUNT1 = 1, + D3DTTFF_COUNT2 = 2, + D3DTTFF_COUNT3 = 3, + D3DTTFF_COUNT4 = 4, + D3DTTFF_PROJECTED = 256, +}} +pub const D3DFVF_TEXTUREFORMAT2: ::DWORD = 0; +pub const D3DFVF_TEXTUREFORMAT1: ::DWORD = 3; +pub const D3DFVF_TEXTUREFORMAT3: ::DWORD = 1; +pub const D3DFVF_TEXTUREFORMAT4: ::DWORD = 2; +ENUM!{enum D3DDEVTYPE { + D3DDEVTYPE_HAL = 1, + D3DDEVTYPE_REF = 2, + D3DDEVTYPE_SW = 3, + D3DDEVTYPE_NULLREF = 4, +}} +ENUM!{enum D3DMULTISAMPLE_TYPE { + D3DMULTISAMPLE_NONE = 0, + D3DMULTISAMPLE_NONMASKABLE = 1, + D3DMULTISAMPLE_2_SAMPLES = 2, + D3DMULTISAMPLE_3_SAMPLES = 3, + D3DMULTISAMPLE_4_SAMPLES = 4, + D3DMULTISAMPLE_5_SAMPLES = 5, + D3DMULTISAMPLE_6_SAMPLES = 6, + D3DMULTISAMPLE_7_SAMPLES = 7, + D3DMULTISAMPLE_8_SAMPLES = 8, + D3DMULTISAMPLE_9_SAMPLES = 9, + D3DMULTISAMPLE_10_SAMPLES = 10, + D3DMULTISAMPLE_11_SAMPLES = 11, + D3DMULTISAMPLE_12_SAMPLES = 12, + D3DMULTISAMPLE_13_SAMPLES = 13, + D3DMULTISAMPLE_14_SAMPLES = 14, + D3DMULTISAMPLE_15_SAMPLES = 15, + D3DMULTISAMPLE_16_SAMPLES = 16, +}} +ENUM!{enum D3DFORMAT { + D3DFMT_UNKNOWN = 0, + D3DFMT_R8G8B8 = 20, + D3DFMT_A8R8G8B8 = 21, + D3DFMT_X8R8G8B8 = 22, + D3DFMT_R5G6B5 = 23, + D3DFMT_X1R5G5B5 = 24, + D3DFMT_A1R5G5B5 = 25, + D3DFMT_A4R4G4B4 = 26, + D3DFMT_R3G3B2 = 27, + D3DFMT_A8 = 28, + D3DFMT_A8R3G3B2 = 29, + D3DFMT_X4R4G4B4 = 30, + D3DFMT_A2B10G10R10 = 31, + D3DFMT_A8B8G8R8 = 32, + D3DFMT_X8B8G8R8 = 33, + D3DFMT_G16R16 = 34, + D3DFMT_A2R10G10B10 = 35, + D3DFMT_A16B16G16R16 = 36, + D3DFMT_A8P8 = 40, + D3DFMT_P8 = 41, + D3DFMT_L8 = 50, + D3DFMT_A8L8 = 51, + D3DFMT_A4L4 = 52, + D3DFMT_V8U8 = 60, + D3DFMT_L6V5U5 = 61, + D3DFMT_X8L8V8U8 = 62, + D3DFMT_Q8W8V8U8 = 63, + D3DFMT_V16U16 = 64, + D3DFMT_A2W10V10U10 = 67, + D3DFMT_UYVY = MAKEFOURCC!(b'U', b'Y', b'V', b'Y') as u32, + D3DFMT_R8G8_B8G8 = MAKEFOURCC!(b'R', b'G', b'B', b'G') as u32, + D3DFMT_YUY2 = MAKEFOURCC!(b'Y', b'U', b'Y', b'2') as u32, + D3DFMT_G8R8_G8B8 = MAKEFOURCC!(b'G', b'R', b'G', b'B') as u32, + D3DFMT_DXT1 = MAKEFOURCC!(b'D', b'X', b'T', b'1') as u32, + D3DFMT_DXT2 = MAKEFOURCC!(b'D', b'X', b'T', b'2') as u32, + D3DFMT_DXT3 = MAKEFOURCC!(b'D', b'X', b'T', b'3') as u32, + D3DFMT_DXT4 = MAKEFOURCC!(b'D', b'X', b'T', b'4') as u32, + D3DFMT_DXT5 = MAKEFOURCC!(b'D', b'X', b'T', b'5') as u32, + D3DFMT_D16_LOCKABLE = 70, + D3DFMT_D32 = 71, + D3DFMT_D15S1 = 73, + D3DFMT_D24S8 = 75, + D3DFMT_D24X8 = 77, + D3DFMT_D24X4S4 = 79, + D3DFMT_D16 = 80, + D3DFMT_D32F_LOCKABLE = 82, + D3DFMT_D24FS8 = 83, + D3DFMT_D32_LOCKABLE = 84, + D3DFMT_S8_LOCKABLE = 85, + D3DFMT_L16 = 81, + D3DFMT_VERTEXDATA = 100, + D3DFMT_INDEX16 = 101, + D3DFMT_INDEX32 = 102, + D3DFMT_Q16W16V16U16 = 110, + D3DFMT_MULTI2_ARGB8 = MAKEFOURCC!(b'M', b'E', b'T', b'1') as u32, + D3DFMT_R16F = 111, + D3DFMT_G16R16F = 112, + D3DFMT_A16B16G16R16F = 113, + D3DFMT_R32F = 114, + D3DFMT_G32R32F = 115, + D3DFMT_A32B32G32R32F = 116, + D3DFMT_CxV8U8 = 117, + D3DFMT_A1 = 118, + D3DFMT_A2B10G10R10_XR_BIAS = 119, + D3DFMT_BINARYBUFFER = 199, +}} +STRUCT!{struct D3DDISPLAYMODE { + Width: ::UINT, + Height: ::UINT, + RefreshRate: ::UINT, + Format: D3DFORMAT, +}} +STRUCT!{struct D3DDEVICE_CREATION_PARAMETERS { + AdapterOrdinal: ::UINT, + DeviceType: D3DDEVTYPE, + hFocusWindow: ::HWND, + BehaviorFlags: ::DWORD, +}} +ENUM!{enum D3DSWAPEFFECT { + D3DSWAPEFFECT_DISCARD = 1, + D3DSWAPEFFECT_FLIP = 2, + D3DSWAPEFFECT_COPY = 3, + D3DSWAPEFFECT_OVERLAY = 4, + D3DSWAPEFFECT_FLIPEX = 5, +}} +ENUM!{enum D3DPOOL { + D3DPOOL_DEFAULT = 0, + D3DPOOL_MANAGED = 1, + D3DPOOL_SYSTEMMEM = 2, + D3DPOOL_SCRATCH = 3, +}} +pub const D3DPRESENT_RATE_DEFAULT: ::DWORD = 0x00000000; +STRUCT!{struct D3DPRESENT_PARAMETERS { + BackBufferWidth: ::UINT, + BackBufferHeight: ::UINT, + BackBufferFormat: D3DFORMAT, + BackBufferCount: ::UINT, + MultiSampleType: D3DMULTISAMPLE_TYPE, + MultiSampleQuality: ::DWORD, + SwapEffect: D3DSWAPEFFECT, + hDeviceWindow: ::HWND, + Windowed: ::BOOL, + EnableAutoDepthStencil: ::BOOL, + AutoDepthStencilFormat: D3DFORMAT, + Flags: ::DWORD, + FullScreen_RefreshRateInHz: ::UINT, + PresentationInterval: ::UINT, +}} +pub const D3DPRESENTFLAG_LOCKABLE_BACKBUFFER: ::DWORD = 0x00000001; +pub const D3DPRESENTFLAG_DISCARD_DEPTHSTENCIL: ::DWORD = 0x00000002; +pub const D3DPRESENTFLAG_DEVICECLIP: ::DWORD = 0x00000004; +pub const D3DPRESENTFLAG_VIDEO: ::DWORD = 0x00000010; +pub const D3DPRESENTFLAG_NOAUTOROTATE: ::DWORD = 0x00000020; +pub const D3DPRESENTFLAG_UNPRUNEDMODE: ::DWORD = 0x00000040; +pub const D3DPRESENTFLAG_OVERLAY_LIMITEDRGB: ::DWORD = 0x00000080; +pub const D3DPRESENTFLAG_OVERLAY_YCbCr_BT709: ::DWORD = 0x00000100; +pub const D3DPRESENTFLAG_OVERLAY_YCbCr_xvYCC: ::DWORD = 0x00000200; +pub const D3DPRESENTFLAG_RESTRICTED_CONTENT: ::DWORD = 0x00000400; +pub const D3DPRESENTFLAG_RESTRICT_SHARED_RESOURCE_DRIVER: ::DWORD = 0x00000800; +STRUCT!{nodebug struct D3DGAMMARAMP { + red: [::WORD; 256], + green: [::WORD; 256], + blue: [::WORD; 256], +}} +ENUM!{enum D3DBACKBUFFER_TYPE { + D3DBACKBUFFER_TYPE_MONO = 0, + D3DBACKBUFFER_TYPE_LEFT = 1, + D3DBACKBUFFER_TYPE_RIGHT = 2, +}} +ENUM!{enum D3DRESOURCETYPE { + D3DRTYPE_SURFACE = 1, + D3DRTYPE_VOLUME = 2, + D3DRTYPE_TEXTURE = 3, + D3DRTYPE_VOLUMETEXTURE = 4, + D3DRTYPE_CUBETEXTURE = 5, + D3DRTYPE_VERTEXBUFFER = 6, + D3DRTYPE_INDEXBUFFER = 7, +}} +pub const D3DUSAGE_RENDERTARGET: ::DWORD = 0x00000001; +pub const D3DUSAGE_DEPTHSTENCIL: ::DWORD = 0x00000002; +pub const D3DUSAGE_DYNAMIC: ::DWORD = 0x00000200; +pub const D3DUSAGE_NONSECURE: ::DWORD = 0x00800000; +pub const D3DUSAGE_AUTOGENMIPMAP: ::DWORD = 0x00000400; +pub const D3DUSAGE_DMAP: ::DWORD = 0x00004000; +pub const D3DUSAGE_QUERY_LEGACYBUMPMAP: ::DWORD = 0x00008000; +pub const D3DUSAGE_QUERY_SRGBREAD: ::DWORD = 0x00010000; +pub const D3DUSAGE_QUERY_FILTER: ::DWORD = 0x00020000; +pub const D3DUSAGE_QUERY_SRGBWRITE: ::DWORD = 0x00040000; +pub const D3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING: ::DWORD = 0x00080000; +pub const D3DUSAGE_QUERY_VERTEXTEXTURE: ::DWORD = 0x00100000; +pub const D3DUSAGE_QUERY_WRAPANDMIP: ::DWORD = 0x00200000; +pub const D3DUSAGE_WRITEONLY: ::DWORD = 0x00000008; +pub const D3DUSAGE_SOFTWAREPROCESSING: ::DWORD = 0x00000010; +pub const D3DUSAGE_DONOTCLIP: ::DWORD = 0x00000020; +pub const D3DUSAGE_POINTS: ::DWORD = 0x00000040; +pub const D3DUSAGE_RTPATCHES: ::DWORD = 0x00000080; +pub const D3DUSAGE_NPATCHES: ::DWORD = 0x00000100; +pub const D3DUSAGE_TEXTAPI: ::DWORD = 0x10000000; +pub const D3DUSAGE_RESTRICTED_CONTENT: ::DWORD = 0x00000800; +pub const D3DUSAGE_RESTRICT_SHARED_RESOURCE: ::DWORD = 0x00002000; +pub const D3DUSAGE_RESTRICT_SHARED_RESOURCE_DRIVER: ::DWORD = 0x00001000; +ENUM!{enum D3DCUBEMAP_FACES { + D3DCUBEMAP_FACE_POSITIVE_X = 0, + D3DCUBEMAP_FACE_NEGATIVE_X = 1, + D3DCUBEMAP_FACE_POSITIVE_Y = 2, + D3DCUBEMAP_FACE_NEGATIVE_Y = 3, + D3DCUBEMAP_FACE_POSITIVE_Z = 4, + D3DCUBEMAP_FACE_NEGATIVE_Z = 5, +}} +pub const D3DLOCK_READONLY: ::DWORD = 0x00000010; +pub const D3DLOCK_DISCARD: ::DWORD = 0x00002000; +pub const D3DLOCK_NOOVERWRITE: ::DWORD = 0x00001000; +pub const D3DLOCK_NOSYSLOCK: ::DWORD = 0x00000800; +pub const D3DLOCK_DONOTWAIT: ::DWORD = 0x00004000; +pub const D3DLOCK_NO_DIRTY_UPDATE: ::DWORD = 0x00008000; +STRUCT!{struct D3DVERTEXBUFFER_DESC { + Format: D3DFORMAT, + Type: D3DRESOURCETYPE, + Usage: ::DWORD, + Pool: D3DPOOL, + Size: ::UINT, + FVF: ::DWORD, +}} +STRUCT!{struct D3DINDEXBUFFER_DESC { + Format: D3DFORMAT, + Type: D3DRESOURCETYPE, + Usage: ::DWORD, + Pool: D3DPOOL, + Size: ::UINT, +}} +STRUCT!{struct D3DSURFACE_DESC { + Format: D3DFORMAT, + Type: D3DRESOURCETYPE, + Usage: ::DWORD, + Pool: D3DPOOL, + MultiSampleType: D3DMULTISAMPLE_TYPE, + MultiSampleQuality: ::DWORD, + Width: ::UINT, + Height: ::UINT, +}} +STRUCT!{struct D3DVOLUME_DESC { + Format: D3DFORMAT, + Type: D3DRESOURCETYPE, + Usage: ::DWORD, + Pool: D3DPOOL, + Width: ::UINT, + Height: ::UINT, + Depth: ::UINT, +}} +STRUCT!{struct D3DLOCKED_RECT { + Pitch: ::INT, + pBits: *mut ::c_void, +}} +STRUCT!{struct D3DBOX { + Left: ::UINT, + Top: ::UINT, + Right: ::UINT, + Bottom: ::UINT, + Front: ::UINT, + Back: ::UINT, +}} +STRUCT!{struct D3DLOCKED_BOX { + RowPitch: ::INT, + SlicePitch: ::INT, + pBits: *mut ::c_void, +}} +STRUCT!{struct D3DRANGE { + Offset: ::UINT, + Size: ::UINT, +}} +STRUCT!{struct D3DRECTPATCH_INFO { + StartVertexOffsetWidth: ::UINT, + StartVertexOffsetHeight: ::UINT, + Width: ::UINT, + Height: ::UINT, + Stride: ::UINT, + Basis: D3DBASISTYPE, + Degree: D3DDEGREETYPE, +}} +STRUCT!{struct D3DTRIPATCH_INFO { + StartVertexOffset: ::UINT, + NumVertices: ::UINT, + Basis: D3DBASISTYPE, + Degree: D3DDEGREETYPE, +}} +pub const MAX_DEVICE_IDENTIFIER_STRING: usize = 512; +STRUCT!{nodebug struct D3DADAPTER_IDENTIFIER9 { + Driver: [::c_char; MAX_DEVICE_IDENTIFIER_STRING], + Description: [::c_char; MAX_DEVICE_IDENTIFIER_STRING], + DeviceName: [::c_char; 32], + DriverVersion: ::LARGE_INTEGER, + VendorId: ::DWORD, + DeviceId: ::DWORD, + SubSysId: ::DWORD, + Revision: ::DWORD, + DeviceIdentifier: ::GUID, + WHQLLevel: ::DWORD, +}} +STRUCT!{struct D3DRASTER_STATUS { + InVBlank: ::BOOL, + ScanLine: ::UINT, +}} +ENUM!{enum D3DDEBUGMONITORTOKENS { + D3DDMT_ENABLE = 0, + D3DDMT_DISABLE = 1, +}} +ENUM!{enum D3DQUERYTYPE { + D3DQUERYTYPE_VCACHE = 4, + D3DQUERYTYPE_RESOURCEMANAGER = 5, + D3DQUERYTYPE_VERTEXSTATS = 6, + D3DQUERYTYPE_EVENT = 8, + D3DQUERYTYPE_OCCLUSION = 9, + D3DQUERYTYPE_TIMESTAMP = 10, + D3DQUERYTYPE_TIMESTAMPDISJOINT = 11, + D3DQUERYTYPE_TIMESTAMPFREQ = 12, + D3DQUERYTYPE_PIPELINETIMINGS = 13, + D3DQUERYTYPE_INTERFACETIMINGS = 14, + D3DQUERYTYPE_VERTEXTIMINGS = 15, + D3DQUERYTYPE_PIXELTIMINGS = 16, + D3DQUERYTYPE_BANDWIDTHTIMINGS = 17, + D3DQUERYTYPE_CACHEUTILIZATION = 18, + D3DQUERYTYPE_MEMORYPRESSURE = 19, +}} +pub const D3DISSUE_END: ::DWORD = 1 << 0; +pub const D3DISSUE_BEGIN: ::DWORD = 1 << 1; +pub const D3DGETDATA_FLUSH: ::DWORD = 1 << 0; +STRUCT!{struct D3DRESOURCESTATS { + bThrashing: ::BOOL, + ApproxBytesDownloaded: ::DWORD, + NumEvicts: ::DWORD, + NumVidCreates: ::DWORD, + LastPri: ::DWORD, + NumUsed: ::DWORD, + NumUsedInVidMem: ::DWORD, + WorkingSet: ::DWORD, + WorkingSetBytes: ::DWORD, + TotalManaged: ::DWORD, + TotalBytes: ::DWORD, +}} +pub const D3DRTYPECOUNT: usize = 8; +STRUCT!{struct D3DDEVINFO_RESOURCEMANAGER { + stats: [D3DRESOURCESTATS; 8 /*D3DRTYPECOUNT, rust bug?*/], +}} +pub type LPD3DDEVINFO_RESOURCEMANAGER = *mut D3DDEVINFO_RESOURCEMANAGER; +STRUCT!{struct D3DDEVINFO_D3DVERTEXSTATS { + NumRenderedTriangles: ::DWORD, + NumExtraClippingTriangles: ::DWORD, +}} +pub type LPD3DDEVINFO_D3DVERTEXSTATS = *mut D3DDEVINFO_D3DVERTEXSTATS; +STRUCT!{struct D3DDEVINFO_VCACHE { + Pattern: ::DWORD, + OptMethod: ::DWORD, + CacheSize: ::DWORD, + MagicNumber: ::DWORD, +}} +pub type LPD3DDEVINFO_VCACHE = *mut D3DDEVINFO_VCACHE; +STRUCT!{struct D3DDEVINFO_D3D9PIPELINETIMINGS { + VertexProcessingTimePercent: ::FLOAT, + PixelProcessingTimePercent: ::FLOAT, + OtherGPUProcessingTimePercent: ::FLOAT, + GPUIdleTimePercent: ::FLOAT, +}} +STRUCT!{struct D3DDEVINFO_D3D9INTERFACETIMINGS { + WaitingForGPUToUseApplicationResourceTimePercent: ::FLOAT, + WaitingForGPUToAcceptMoreCommandsTimePercent: ::FLOAT, + WaitingForGPUToStayWithinLatencyTimePercent: ::FLOAT, + WaitingForGPUExclusiveResourceTimePercent: ::FLOAT, + WaitingForGPUOtherTimePercent: ::FLOAT, +}} +STRUCT!{struct D3DDEVINFO_D3D9STAGETIMINGS { + MemoryProcessingPercent: ::FLOAT, + ComputationProcessingPercent: ::FLOAT, +}} +STRUCT!{struct D3DDEVINFO_D3D9BANDWIDTHTIMINGS { + MaxBandwidthUtilized: ::FLOAT, + FrontEndUploadMemoryUtilizedPercent: ::FLOAT, + VertexRateUtilizedPercent: ::FLOAT, + TriangleSetupRateUtilizedPercent: ::FLOAT, + FillRateUtilizedPercent: ::FLOAT, +}} +STRUCT!{struct D3DDEVINFO_D3D9CACHEUTILIZATION { + TextureCacheHitRate: ::FLOAT, + PostTransformVertexCacheHitRate: ::FLOAT, +}} +STRUCT!{struct D3DMEMORYPRESSURE { + BytesEvictedFromProcess: ::UINT64, + SizeOfInefficientAllocation: ::UINT64, + LevelOfEfficiency: ::DWORD, +}} +ENUM!{enum D3DCOMPOSERECTSOP { + D3DCOMPOSERECTS_COPY = 1, + D3DCOMPOSERECTS_OR = 2, + D3DCOMPOSERECTS_AND = 3, + D3DCOMPOSERECTS_NEG = 4, +}} +STRUCT!{struct D3DCOMPOSERECTDESC { + X: ::USHORT, + Y: ::USHORT, + Width: ::USHORT, + Height: ::USHORT, +}} +STRUCT!{struct D3DCOMPOSERECTDESTINATION { + SrcRectIndex: ::USHORT, + Reserved: ::USHORT, + X: ::SHORT, + Y: ::SHORT, +}} +pub const D3DCOMPOSERECTS_MAXNUMRECTS: ::DWORD = 0xFFFF; +pub const D3DCONVOLUTIONMONO_MAXWIDTH: ::DWORD = 7; +pub const D3DCONVOLUTIONMONO_MAXHEIGHT: ::DWORD = D3DCONVOLUTIONMONO_MAXWIDTH; +pub const D3DFMT_A1_SURFACE_MAXWIDTH: ::DWORD = 8192; +pub const D3DFMT_A1_SURFACE_MAXHEIGHT: ::DWORD = 2048; +STRUCT!{struct D3DPRESENTSTATS { + PresentCount: ::UINT, + PresentRefreshCount: ::UINT, + SyncRefreshCount: ::UINT, + SyncQPCTime: ::LARGE_INTEGER, + SyncGPUTime: ::LARGE_INTEGER, +}} +ENUM!{enum D3DSCANLINEORDERING { + D3DSCANLINEORDERING_UNKNOWN = 0, + D3DSCANLINEORDERING_PROGRESSIVE = 1, + D3DSCANLINEORDERING_INTERLACED = 2, +}} +STRUCT!{struct D3DDISPLAYMODEEX { + Size: ::UINT, + Width: ::UINT, + Height: ::UINT, + RefreshRate: ::UINT, + Format: D3DFORMAT, + ScanLineOrdering: D3DSCANLINEORDERING, +}} +STRUCT!{struct D3DDISPLAYMODEFILTER { + Size: ::UINT, + Format: D3DFORMAT, + ScanLineOrdering: D3DSCANLINEORDERING, +}} +ENUM!{enum D3DDISPLAYROTATION { + D3DDISPLAYROTATION_IDENTITY = 1, + D3DDISPLAYROTATION_90 = 2, + D3DDISPLAYROTATION_180 = 3, + D3DDISPLAYROTATION_270 = 4, +}} +pub const D3D9_RESOURCE_PRIORITY_MINIMUM: ::DWORD = 0x28000000; +pub const D3D9_RESOURCE_PRIORITY_LOW: ::DWORD = 0x50000000; +pub const D3D9_RESOURCE_PRIORITY_NORMAL: ::DWORD = 0x78000000; +pub const D3D9_RESOURCE_PRIORITY_HIGH: ::DWORD = 0xa0000000; +pub const D3D9_RESOURCE_PRIORITY_MAXIMUM: ::DWORD = 0xc8000000; +pub const D3D_OMAC_SIZE: usize = 16; +STRUCT!{struct D3D_OMAC { + Omac: [::BYTE; D3D_OMAC_SIZE], +}} +ENUM!{enum D3DAUTHENTICATEDCHANNELTYPE { + D3DAUTHENTICATEDCHANNEL_D3D9 = 1, + D3DAUTHENTICATEDCHANNEL_DRIVER_SOFTWARE = 2, + D3DAUTHENTICATEDCHANNEL_DRIVER_HARDWARE = 3, +}} +STRUCT!{struct D3DAUTHENTICATEDCHANNEL_QUERY_INPUT { + QueryType: ::GUID, + hChannel: ::HANDLE, + SequenceNumber: ::UINT, +}} +STRUCT!{struct D3DAUTHENTICATEDCHANNEL_QUERY_OUTPUT { + omac: D3D_OMAC, + QueryType: ::GUID, + hChannel: ::HANDLE, + SequenceNumber: ::UINT, + ReturnCode: ::HRESULT, +}} +STRUCT!{struct D3DAUTHENTICATEDCHANNEL_PROTECTION_FLAGS { + Value: ::UINT, +}} +STRUCT!{struct D3DAUTHENTICATEDCHANNEL_QUERYPROTECTION_OUTPUT { + Output: D3DAUTHENTICATEDCHANNEL_QUERY_OUTPUT, + ProtectionFlags: D3DAUTHENTICATEDCHANNEL_PROTECTION_FLAGS, +}} +STRUCT!{struct D3DAUTHENTICATEDCHANNEL_QUERYCHANNELTYPE_OUTPUT { + Output: D3DAUTHENTICATEDCHANNEL_QUERY_OUTPUT, + ChannelType: D3DAUTHENTICATEDCHANNELTYPE, +}} +STRUCT!{struct D3DAUTHENTICATEDCHANNEL_QUERYDEVICEHANDLE_OUTPUT { + Output: D3DAUTHENTICATEDCHANNEL_QUERY_OUTPUT, + DeviceHandle: ::HANDLE, +}} +STRUCT!{struct D3DAUTHENTICATEDCHANNEL_QUERYCRYPTOSESSION_INPUT { + Input: D3DAUTHENTICATEDCHANNEL_QUERY_INPUT, + DXVA2DecodeHandle: ::HANDLE, +}} +STRUCT!{struct D3DAUTHENTICATEDCHANNEL_QUERYCRYPTOSESSION_OUTPUT { + Output: D3DAUTHENTICATEDCHANNEL_QUERY_OUTPUT, + DXVA2DecodeHandle: ::HANDLE, + CryptoSessionHandle: ::HANDLE, + DeviceHandle: ::HANDLE, +}} +STRUCT!{struct D3DAUTHENTICATEDCHANNEL_QUERYRESTRICTEDSHAREDRESOURCEPROCESSCOUNT_OUTPUT { + Output: D3DAUTHENTICATEDCHANNEL_QUERY_OUTPUT, + NumRestrictedSharedResourceProcesses: ::UINT, +}} +STRUCT!{struct D3DAUTHENTICATEDCHANNEL_QUERYRESTRICTEDSHAREDRESOURCEPROCESS_INPUT { + Input: D3DAUTHENTICATEDCHANNEL_QUERY_INPUT, + ProcessIndex: ::UINT, +}} +ENUM!{enum D3DAUTHENTICATEDCHANNEL_PROCESSIDENTIFIERTYPE { + PROCESSIDTYPE_UNKNOWN = 0, + PROCESSIDTYPE_DWM = 1, + PROCESSIDTYPE_HANDLE = 2, +}} +STRUCT!{struct D3DAUTHENTICATEDCHANNEL_QUERYRESTRICTEDSHAREDRESOURCEPROCESS_OUTPUT { + Output: D3DAUTHENTICATEDCHANNEL_QUERY_OUTPUT, + ProcessIndex: ::UINT, + ProcessIdentifer: D3DAUTHENTICATEDCHANNEL_PROCESSIDENTIFIERTYPE, + ProcessHandle: ::HANDLE, +}} +STRUCT!{struct D3DAUTHENTICATEDCHANNEL_QUERYUNRESTRICTEDPROTECTEDSHAREDRESOURCECOUNT_OUTPUT { + Output: D3DAUTHENTICATEDCHANNEL_QUERY_OUTPUT, + NumUnrestrictedProtectedSharedResources: ::UINT, +}} +STRUCT!{struct D3DAUTHENTICATEDCHANNEL_QUERYOUTPUTIDCOUNT_INPUT { + Input: D3DAUTHENTICATEDCHANNEL_QUERY_INPUT, + DeviceHandle: ::HANDLE, + CryptoSessionHandle: ::HANDLE, +}} +STRUCT!{struct D3DAUTHENTICATEDCHANNEL_QUERYOUTPUTIDCOUNT_OUTPUT { + Output: D3DAUTHENTICATEDCHANNEL_QUERY_OUTPUT, + DeviceHandle: ::HANDLE, + CryptoSessionHandle: ::HANDLE, + NumOutputIDs: ::UINT, +}} +STRUCT!{struct D3DAUTHENTICATEDCHANNEL_QUERYOUTPUTID_INPUT { + Input: D3DAUTHENTICATEDCHANNEL_QUERY_INPUT, + DeviceHandle: ::HANDLE, + CryptoSessionHandle: ::HANDLE, + OutputIDIndex: ::UINT, +}} +STRUCT!{struct D3DAUTHENTICATEDCHANNEL_QUERYOUTPUTID_OUTPUT { + Output: D3DAUTHENTICATEDCHANNEL_QUERY_OUTPUT, + DeviceHandle: ::HANDLE, + CryptoSessionHandle: ::HANDLE, + OutputIDIndex: ::UINT, + OutputID: ::UINT64, +}} +FLAGS!{enum D3DBUSTYPE { + D3DBUSTYPE_OTHER = 0x00000000, + D3DBUSTYPE_PCI = 0x00000001, + D3DBUSTYPE_PCIX = 0x00000002, + D3DBUSTYPE_PCIEXPRESS = 0x00000003, + D3DBUSTYPE_AGP = 0x00000004, + D3DBUSIMPL_MODIFIER_INSIDE_OF_CHIPSET = 0x00010000, + MD3DBUSIMPL_ODIFIER_TRACKS_ON_MOTHER_BOARD_TO_CHIP = 0x00020000, + D3DBUSIMPL_MODIFIER_TRACKS_ON_MOTHER_BOARD_TO_SOCKET = 0x00030000, + D3DBUSIMPL_MODIFIER_DAUGHTER_BOARD_CONNECTOR = 0x00040000, + D3DBUSIMPL_MODIFIER_DAUGHTER_BOARD_CONNECTOR_INSIDE_OF_NUAE = 0x00050000, + D3DBUSIMPL_MODIFIER_NON_STANDARD = 0x80000000, +}} +STRUCT!{struct D3DAUTHENTICATEDCHANNEL_QUERYINFOBUSTYPE_OUTPUT { + Output: D3DAUTHENTICATEDCHANNEL_QUERY_OUTPUT, + BusType: D3DBUSTYPE, + bAccessibleInContiguousBlocks: ::BOOL, + bAccessibleInNonContiguousBlocks: ::BOOL, +}} +STRUCT!{struct D3DAUTHENTICATEDCHANNEL_QUERYEVICTIONENCRYPTIONGUIDCOUNT_OUTPUT { + Output: D3DAUTHENTICATEDCHANNEL_QUERY_OUTPUT, + NumEncryptionGuids: ::UINT, +}} +STRUCT!{struct D3DAUTHENTICATEDCHANNEL_QUERYEVICTIONENCRYPTIONGUID_INPUT { + Input: D3DAUTHENTICATEDCHANNEL_QUERY_INPUT, + EncryptionGuidIndex: ::UINT, +}} +STRUCT!{struct D3DAUTHENTICATEDCHANNEL_QUERYEVICTIONENCRYPTIONGUID_OUTPUT { + Output: D3DAUTHENTICATEDCHANNEL_QUERY_OUTPUT, + EncryptionGuidIndex: ::UINT, + EncryptionGuid: ::GUID, +}} +STRUCT!{struct D3DAUTHENTICATEDCHANNEL_QUERYUNCOMPRESSEDENCRYPTIONLEVEL_OUTPUT { + Output: D3DAUTHENTICATEDCHANNEL_QUERY_OUTPUT, + EncryptionGuid: ::GUID, +}} +STRUCT!{struct D3DAUTHENTICATEDCHANNEL_CONFIGURE_INPUT { + omac: D3D_OMAC, + ConfigureType: ::GUID, + hChannel: ::HANDLE, + SequenceNumber: ::UINT, +}} +STRUCT!{struct D3DAUTHENTICATEDCHANNEL_CONFIGURE_OUTPUT { + omac: D3D_OMAC, + ConfigureType: ::GUID, + hChannel: ::HANDLE, + SequenceNumber: ::UINT, + ReturnCode: ::HRESULT, +}} +STRUCT!{struct D3DAUTHENTICATEDCHANNEL_CONFIGUREINITIALIZE { + Parameters: D3DAUTHENTICATEDCHANNEL_CONFIGURE_INPUT, + StartSequenceQuery: ::UINT, + StartSequenceConfigure: ::UINT, +}} +STRUCT!{struct D3DAUTHENTICATEDCHANNEL_CONFIGUREPROTECTION { + Parameters: D3DAUTHENTICATEDCHANNEL_CONFIGURE_INPUT, + Protections: D3DAUTHENTICATEDCHANNEL_PROTECTION_FLAGS, +}} +STRUCT!{struct D3DAUTHENTICATEDCHANNEL_CONFIGURECRYPTOSESSION { + Parameters: D3DAUTHENTICATEDCHANNEL_CONFIGURE_INPUT, + DXVA2DecodeHandle: ::HANDLE, + CryptoSessionHandle: ::HANDLE, + DeviceHandle: ::HANDLE, +}} +STRUCT!{struct D3DAUTHENTICATEDCHANNEL_CONFIGURESHAREDRESOURCE { + Parameters: D3DAUTHENTICATEDCHANNEL_CONFIGURE_INPUT, + ProcessIdentiferType: D3DAUTHENTICATEDCHANNEL_PROCESSIDENTIFIERTYPE, + ProcessHandle: ::HANDLE, + AllowAccess: ::BOOL, +}} +STRUCT!{struct D3DAUTHENTICATEDCHANNEL_CONFIGUREUNCOMPRESSEDENCRYPTION { + Parameters: D3DAUTHENTICATEDCHANNEL_CONFIGURE_INPUT, + EncryptionGuid: ::GUID, +}} +STRUCT!{struct D3DENCRYPTED_BLOCK_INFO { + NumEncryptedBytesAtBeginning: ::UINT, + NumBytesInSkipPattern: ::UINT, + NumBytesInEncryptPattern: ::UINT, +}} +STRUCT!{struct D3DAES_CTR_IV { + IV: ::UINT64, + Count: ::UINT64, +}} diff --git a/deps/winapi-0.2.6/src/d3dcommon.rs b/deps/winapi-0.2.6/src/d3dcommon.rs new file mode 100644 index 000000000..51a1b4e8e --- /dev/null +++ b/deps/winapi-0.2.6/src/d3dcommon.rs @@ -0,0 +1,753 @@ +// Copyright © 2015; Connor Hilarides +// Licensed under the MIT License <LICENSE.md> +//! Mappings for the contents of d3dcommon.h +ENUM!{enum D3D_DRIVER_TYPE { + D3D_DRIVER_TYPE_UNKNOWN, + D3D_DRIVER_TYPE_HARDWARE, + D3D_DRIVER_TYPE_REFERENCE, + D3D_DRIVER_TYPE_NULL, + D3D_DRIVER_TYPE_SOFTWARE, + D3D_DRIVER_TYPE_WARP, +}} +ENUM!{enum D3D_FEATURE_LEVEL { + D3D_FEATURE_LEVEL_9_1 = 0x9100, + D3D_FEATURE_LEVEL_9_2 = 0x9200, + D3D_FEATURE_LEVEL_9_3 = 0x9300, + D3D_FEATURE_LEVEL_10_0 = 0xa000, + D3D_FEATURE_LEVEL_10_1 = 0xa100, + D3D_FEATURE_LEVEL_11_0 = 0xb000, + D3D_FEATURE_LEVEL_11_1 = 0xb100, + D3D_FEATURE_LEVEL_12_0 = 0xc000, + D3D_FEATURE_LEVEL_12_1 = 0xc100, +}} +ENUM!{enum D3D_PRIMITIVE_TOPOLOGY { + D3D_PRIMITIVE_TOPOLOGY_UNDEFINED = 0, + D3D_PRIMITIVE_TOPOLOGY_POINTLIST = 1, + D3D_PRIMITIVE_TOPOLOGY_LINELIST = 2, + D3D_PRIMITIVE_TOPOLOGY_LINESTRIP = 3, + D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST = 4, + D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP = 5, + D3D_PRIMITIVE_TOPOLOGY_LINELIST_ADJ = 10, + D3D_PRIMITIVE_TOPOLOGY_LINESTRIP_ADJ = 11, + D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST_ADJ = 12, + D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP_ADJ = 13, + D3D_PRIMITIVE_TOPOLOGY_1_CONTROL_POINT_PATCHLIST = 33, + D3D_PRIMITIVE_TOPOLOGY_2_CONTROL_POINT_PATCHLIST = 34, + D3D_PRIMITIVE_TOPOLOGY_3_CONTROL_POINT_PATCHLIST = 35, + D3D_PRIMITIVE_TOPOLOGY_4_CONTROL_POINT_PATCHLIST = 36, + D3D_PRIMITIVE_TOPOLOGY_5_CONTROL_POINT_PATCHLIST = 37, + D3D_PRIMITIVE_TOPOLOGY_6_CONTROL_POINT_PATCHLIST = 38, + D3D_PRIMITIVE_TOPOLOGY_7_CONTROL_POINT_PATCHLIST = 39, + D3D_PRIMITIVE_TOPOLOGY_8_CONTROL_POINT_PATCHLIST = 40, + D3D_PRIMITIVE_TOPOLOGY_9_CONTROL_POINT_PATCHLIST = 41, + D3D_PRIMITIVE_TOPOLOGY_10_CONTROL_POINT_PATCHLIST = 42, + D3D_PRIMITIVE_TOPOLOGY_11_CONTROL_POINT_PATCHLIST = 43, + D3D_PRIMITIVE_TOPOLOGY_12_CONTROL_POINT_PATCHLIST = 44, + D3D_PRIMITIVE_TOPOLOGY_13_CONTROL_POINT_PATCHLIST = 45, + D3D_PRIMITIVE_TOPOLOGY_14_CONTROL_POINT_PATCHLIST = 46, + D3D_PRIMITIVE_TOPOLOGY_15_CONTROL_POINT_PATCHLIST = 47, + D3D_PRIMITIVE_TOPOLOGY_16_CONTROL_POINT_PATCHLIST = 48, + D3D_PRIMITIVE_TOPOLOGY_17_CONTROL_POINT_PATCHLIST = 49, + D3D_PRIMITIVE_TOPOLOGY_18_CONTROL_POINT_PATCHLIST = 50, + D3D_PRIMITIVE_TOPOLOGY_19_CONTROL_POINT_PATCHLIST = 51, + D3D_PRIMITIVE_TOPOLOGY_20_CONTROL_POINT_PATCHLIST = 52, + D3D_PRIMITIVE_TOPOLOGY_21_CONTROL_POINT_PATCHLIST = 53, + D3D_PRIMITIVE_TOPOLOGY_22_CONTROL_POINT_PATCHLIST = 54, + D3D_PRIMITIVE_TOPOLOGY_23_CONTROL_POINT_PATCHLIST = 55, + D3D_PRIMITIVE_TOPOLOGY_24_CONTROL_POINT_PATCHLIST = 56, + D3D_PRIMITIVE_TOPOLOGY_25_CONTROL_POINT_PATCHLIST = 57, + D3D_PRIMITIVE_TOPOLOGY_26_CONTROL_POINT_PATCHLIST = 58, + D3D_PRIMITIVE_TOPOLOGY_27_CONTROL_POINT_PATCHLIST = 59, + D3D_PRIMITIVE_TOPOLOGY_28_CONTROL_POINT_PATCHLIST = 60, + D3D_PRIMITIVE_TOPOLOGY_29_CONTROL_POINT_PATCHLIST = 61, + D3D_PRIMITIVE_TOPOLOGY_30_CONTROL_POINT_PATCHLIST = 62, + D3D_PRIMITIVE_TOPOLOGY_31_CONTROL_POINT_PATCHLIST = 63, + D3D_PRIMITIVE_TOPOLOGY_32_CONTROL_POINT_PATCHLIST = 64, +}} +pub const D3D10_PRIMITIVE_TOPOLOGY_UNDEFINED: ::D3D_PRIMITIVE_TOPOLOGY = + D3D_PRIMITIVE_TOPOLOGY_UNDEFINED; +pub const D3D10_PRIMITIVE_TOPOLOGY_POINTLIST: ::D3D_PRIMITIVE_TOPOLOGY = + D3D_PRIMITIVE_TOPOLOGY_POINTLIST; +pub const D3D10_PRIMITIVE_TOPOLOGY_LINELIST: ::D3D_PRIMITIVE_TOPOLOGY = + D3D_PRIMITIVE_TOPOLOGY_LINELIST; +pub const D3D10_PRIMITIVE_TOPOLOGY_LINESTRIP: ::D3D_PRIMITIVE_TOPOLOGY = + D3D_PRIMITIVE_TOPOLOGY_LINESTRIP; +pub const D3D10_PRIMITIVE_TOPOLOGY_TRIANGLELIST: ::D3D_PRIMITIVE_TOPOLOGY = + D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST; +pub const D3D10_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP: ::D3D_PRIMITIVE_TOPOLOGY = + D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP; +pub const D3D10_PRIMITIVE_TOPOLOGY_LINELIST_ADJ: ::D3D_PRIMITIVE_TOPOLOGY = + D3D_PRIMITIVE_TOPOLOGY_LINELIST_ADJ; +pub const D3D10_PRIMITIVE_TOPOLOGY_LINESTRIP_ADJ: ::D3D_PRIMITIVE_TOPOLOGY = + D3D_PRIMITIVE_TOPOLOGY_LINESTRIP_ADJ; +pub const D3D10_PRIMITIVE_TOPOLOGY_TRIANGLELIST_ADJ: ::D3D_PRIMITIVE_TOPOLOGY = + D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST_ADJ; +pub const D3D10_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP_ADJ: ::D3D_PRIMITIVE_TOPOLOGY = + D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP_ADJ; +pub const D3D11_PRIMITIVE_TOPOLOGY_UNDEFINED: ::D3D_PRIMITIVE_TOPOLOGY = + D3D_PRIMITIVE_TOPOLOGY_UNDEFINED; +pub const D3D11_PRIMITIVE_TOPOLOGY_POINTLIST: ::D3D_PRIMITIVE_TOPOLOGY = + D3D_PRIMITIVE_TOPOLOGY_POINTLIST; +pub const D3D11_PRIMITIVE_TOPOLOGY_LINELIST: ::D3D_PRIMITIVE_TOPOLOGY = + D3D_PRIMITIVE_TOPOLOGY_LINELIST; +pub const D3D11_PRIMITIVE_TOPOLOGY_LINESTRIP: ::D3D_PRIMITIVE_TOPOLOGY = + D3D_PRIMITIVE_TOPOLOGY_LINESTRIP; +pub const D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST: ::D3D_PRIMITIVE_TOPOLOGY = + D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST; +pub const D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP: ::D3D_PRIMITIVE_TOPOLOGY = + D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP; +pub const D3D11_PRIMITIVE_TOPOLOGY_LINELIST_ADJ: ::D3D_PRIMITIVE_TOPOLOGY = + D3D_PRIMITIVE_TOPOLOGY_LINELIST_ADJ; +pub const D3D11_PRIMITIVE_TOPOLOGY_LINESTRIP_ADJ: ::D3D_PRIMITIVE_TOPOLOGY = + D3D_PRIMITIVE_TOPOLOGY_LINESTRIP_ADJ; +pub const D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST_ADJ: ::D3D_PRIMITIVE_TOPOLOGY = + D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST_ADJ; +pub const D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP_ADJ: ::D3D_PRIMITIVE_TOPOLOGY = + D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP_ADJ; +pub const D3D11_PRIMITIVE_TOPOLOGY_1_CONTROL_POINT_PATCHLIST: ::D3D_PRIMITIVE_TOPOLOGY = + D3D_PRIMITIVE_TOPOLOGY_1_CONTROL_POINT_PATCHLIST; +pub const D3D11_PRIMITIVE_TOPOLOGY_2_CONTROL_POINT_PATCHLIST: ::D3D_PRIMITIVE_TOPOLOGY = + D3D_PRIMITIVE_TOPOLOGY_2_CONTROL_POINT_PATCHLIST; +pub const D3D11_PRIMITIVE_TOPOLOGY_3_CONTROL_POINT_PATCHLIST: ::D3D_PRIMITIVE_TOPOLOGY = + D3D_PRIMITIVE_TOPOLOGY_3_CONTROL_POINT_PATCHLIST; +pub const D3D11_PRIMITIVE_TOPOLOGY_4_CONTROL_POINT_PATCHLIST: ::D3D_PRIMITIVE_TOPOLOGY = + D3D_PRIMITIVE_TOPOLOGY_4_CONTROL_POINT_PATCHLIST; +pub const D3D11_PRIMITIVE_TOPOLOGY_5_CONTROL_POINT_PATCHLIST: ::D3D_PRIMITIVE_TOPOLOGY = + D3D_PRIMITIVE_TOPOLOGY_5_CONTROL_POINT_PATCHLIST; +pub const D3D11_PRIMITIVE_TOPOLOGY_6_CONTROL_POINT_PATCHLIST: ::D3D_PRIMITIVE_TOPOLOGY = + D3D_PRIMITIVE_TOPOLOGY_6_CONTROL_POINT_PATCHLIST; +pub const D3D11_PRIMITIVE_TOPOLOGY_7_CONTROL_POINT_PATCHLIST: ::D3D_PRIMITIVE_TOPOLOGY = + D3D_PRIMITIVE_TOPOLOGY_7_CONTROL_POINT_PATCHLIST; +pub const D3D11_PRIMITIVE_TOPOLOGY_8_CONTROL_POINT_PATCHLIST: ::D3D_PRIMITIVE_TOPOLOGY = + D3D_PRIMITIVE_TOPOLOGY_8_CONTROL_POINT_PATCHLIST; +pub const D3D11_PRIMITIVE_TOPOLOGY_9_CONTROL_POINT_PATCHLIST: ::D3D_PRIMITIVE_TOPOLOGY = + D3D_PRIMITIVE_TOPOLOGY_9_CONTROL_POINT_PATCHLIST; +pub const D3D11_PRIMITIVE_TOPOLOGY_10_CONTROL_POINT_PATCHLIST: ::D3D_PRIMITIVE_TOPOLOGY = + D3D_PRIMITIVE_TOPOLOGY_10_CONTROL_POINT_PATCHLIST; +pub const D3D11_PRIMITIVE_TOPOLOGY_11_CONTROL_POINT_PATCHLIST: ::D3D_PRIMITIVE_TOPOLOGY = + D3D_PRIMITIVE_TOPOLOGY_11_CONTROL_POINT_PATCHLIST; +pub const D3D11_PRIMITIVE_TOPOLOGY_12_CONTROL_POINT_PATCHLIST: ::D3D_PRIMITIVE_TOPOLOGY = + D3D_PRIMITIVE_TOPOLOGY_12_CONTROL_POINT_PATCHLIST; +pub const D3D11_PRIMITIVE_TOPOLOGY_13_CONTROL_POINT_PATCHLIST: ::D3D_PRIMITIVE_TOPOLOGY = + D3D_PRIMITIVE_TOPOLOGY_13_CONTROL_POINT_PATCHLIST; +pub const D3D11_PRIMITIVE_TOPOLOGY_14_CONTROL_POINT_PATCHLIST: ::D3D_PRIMITIVE_TOPOLOGY = + D3D_PRIMITIVE_TOPOLOGY_14_CONTROL_POINT_PATCHLIST; +pub const D3D11_PRIMITIVE_TOPOLOGY_15_CONTROL_POINT_PATCHLIST: ::D3D_PRIMITIVE_TOPOLOGY = + D3D_PRIMITIVE_TOPOLOGY_15_CONTROL_POINT_PATCHLIST; +pub const D3D11_PRIMITIVE_TOPOLOGY_16_CONTROL_POINT_PATCHLIST: ::D3D_PRIMITIVE_TOPOLOGY = + D3D_PRIMITIVE_TOPOLOGY_16_CONTROL_POINT_PATCHLIST; +pub const D3D11_PRIMITIVE_TOPOLOGY_17_CONTROL_POINT_PATCHLIST: ::D3D_PRIMITIVE_TOPOLOGY = + D3D_PRIMITIVE_TOPOLOGY_17_CONTROL_POINT_PATCHLIST; +pub const D3D11_PRIMITIVE_TOPOLOGY_18_CONTROL_POINT_PATCHLIST: ::D3D_PRIMITIVE_TOPOLOGY = + D3D_PRIMITIVE_TOPOLOGY_18_CONTROL_POINT_PATCHLIST; +pub const D3D11_PRIMITIVE_TOPOLOGY_19_CONTROL_POINT_PATCHLIST: ::D3D_PRIMITIVE_TOPOLOGY = + D3D_PRIMITIVE_TOPOLOGY_19_CONTROL_POINT_PATCHLIST; +pub const D3D11_PRIMITIVE_TOPOLOGY_20_CONTROL_POINT_PATCHLIST: ::D3D_PRIMITIVE_TOPOLOGY = + D3D_PRIMITIVE_TOPOLOGY_20_CONTROL_POINT_PATCHLIST; +pub const D3D11_PRIMITIVE_TOPOLOGY_21_CONTROL_POINT_PATCHLIST: ::D3D_PRIMITIVE_TOPOLOGY = + D3D_PRIMITIVE_TOPOLOGY_21_CONTROL_POINT_PATCHLIST; +pub const D3D11_PRIMITIVE_TOPOLOGY_22_CONTROL_POINT_PATCHLIST: ::D3D_PRIMITIVE_TOPOLOGY = + D3D_PRIMITIVE_TOPOLOGY_22_CONTROL_POINT_PATCHLIST; +pub const D3D11_PRIMITIVE_TOPOLOGY_23_CONTROL_POINT_PATCHLIST: ::D3D_PRIMITIVE_TOPOLOGY = + D3D_PRIMITIVE_TOPOLOGY_23_CONTROL_POINT_PATCHLIST; +pub const D3D11_PRIMITIVE_TOPOLOGY_24_CONTROL_POINT_PATCHLIST: ::D3D_PRIMITIVE_TOPOLOGY = + D3D_PRIMITIVE_TOPOLOGY_24_CONTROL_POINT_PATCHLIST; +pub const D3D11_PRIMITIVE_TOPOLOGY_25_CONTROL_POINT_PATCHLIST: ::D3D_PRIMITIVE_TOPOLOGY = + D3D_PRIMITIVE_TOPOLOGY_25_CONTROL_POINT_PATCHLIST; +pub const D3D11_PRIMITIVE_TOPOLOGY_26_CONTROL_POINT_PATCHLIST: ::D3D_PRIMITIVE_TOPOLOGY = + D3D_PRIMITIVE_TOPOLOGY_26_CONTROL_POINT_PATCHLIST; +pub const D3D11_PRIMITIVE_TOPOLOGY_27_CONTROL_POINT_PATCHLIST: ::D3D_PRIMITIVE_TOPOLOGY = + D3D_PRIMITIVE_TOPOLOGY_27_CONTROL_POINT_PATCHLIST; +pub const D3D11_PRIMITIVE_TOPOLOGY_28_CONTROL_POINT_PATCHLIST: ::D3D_PRIMITIVE_TOPOLOGY = + D3D_PRIMITIVE_TOPOLOGY_28_CONTROL_POINT_PATCHLIST; +pub const D3D11_PRIMITIVE_TOPOLOGY_29_CONTROL_POINT_PATCHLIST: ::D3D_PRIMITIVE_TOPOLOGY = + D3D_PRIMITIVE_TOPOLOGY_29_CONTROL_POINT_PATCHLIST; +pub const D3D11_PRIMITIVE_TOPOLOGY_30_CONTROL_POINT_PATCHLIST: ::D3D_PRIMITIVE_TOPOLOGY = + D3D_PRIMITIVE_TOPOLOGY_30_CONTROL_POINT_PATCHLIST; +pub const D3D11_PRIMITIVE_TOPOLOGY_31_CONTROL_POINT_PATCHLIST: ::D3D_PRIMITIVE_TOPOLOGY = + D3D_PRIMITIVE_TOPOLOGY_31_CONTROL_POINT_PATCHLIST; +pub const D3D11_PRIMITIVE_TOPOLOGY_32_CONTROL_POINT_PATCHLIST: ::D3D_PRIMITIVE_TOPOLOGY = + D3D_PRIMITIVE_TOPOLOGY_32_CONTROL_POINT_PATCHLIST; +ENUM!{enum D3D_PRIMITIVE { + D3D_PRIMITIVE_UNDEFINED = 0, + D3D_PRIMITIVE_POINT = 1, + D3D_PRIMITIVE_LINE = 2, + D3D_PRIMITIVE_TRIANGLE = 3, + D3D_PRIMITIVE_LINE_ADJ = 6, + D3D_PRIMITIVE_TRIANGLE_ADJ = 7, + D3D_PRIMITIVE_1_CONTROL_POINT_PATCH = 8, + D3D_PRIMITIVE_2_CONTROL_POINT_PATCH = 9, + D3D_PRIMITIVE_3_CONTROL_POINT_PATCH = 10, + D3D_PRIMITIVE_4_CONTROL_POINT_PATCH = 11, + D3D_PRIMITIVE_5_CONTROL_POINT_PATCH = 12, + D3D_PRIMITIVE_6_CONTROL_POINT_PATCH = 13, + D3D_PRIMITIVE_7_CONTROL_POINT_PATCH = 14, + D3D_PRIMITIVE_8_CONTROL_POINT_PATCH = 15, + D3D_PRIMITIVE_9_CONTROL_POINT_PATCH = 16, + D3D_PRIMITIVE_10_CONTROL_POINT_PATCH = 17, + D3D_PRIMITIVE_11_CONTROL_POINT_PATCH = 18, + D3D_PRIMITIVE_12_CONTROL_POINT_PATCH = 19, + D3D_PRIMITIVE_13_CONTROL_POINT_PATCH = 20, + D3D_PRIMITIVE_14_CONTROL_POINT_PATCH = 21, + D3D_PRIMITIVE_15_CONTROL_POINT_PATCH = 22, + D3D_PRIMITIVE_16_CONTROL_POINT_PATCH = 23, + D3D_PRIMITIVE_17_CONTROL_POINT_PATCH = 24, + D3D_PRIMITIVE_18_CONTROL_POINT_PATCH = 25, + D3D_PRIMITIVE_19_CONTROL_POINT_PATCH = 26, + D3D_PRIMITIVE_20_CONTROL_POINT_PATCH = 28, + D3D_PRIMITIVE_21_CONTROL_POINT_PATCH = 29, + D3D_PRIMITIVE_22_CONTROL_POINT_PATCH = 30, + D3D_PRIMITIVE_23_CONTROL_POINT_PATCH = 31, + D3D_PRIMITIVE_24_CONTROL_POINT_PATCH = 32, + D3D_PRIMITIVE_25_CONTROL_POINT_PATCH = 33, + D3D_PRIMITIVE_26_CONTROL_POINT_PATCH = 34, + D3D_PRIMITIVE_27_CONTROL_POINT_PATCH = 35, + D3D_PRIMITIVE_28_CONTROL_POINT_PATCH = 36, + D3D_PRIMITIVE_29_CONTROL_POINT_PATCH = 37, + D3D_PRIMITIVE_30_CONTROL_POINT_PATCH = 38, + D3D_PRIMITIVE_31_CONTROL_POINT_PATCH = 39, + D3D_PRIMITIVE_32_CONTROL_POINT_PATCH = 40, +}} +pub const D3D10_PRIMITIVE_UNDEFINED: ::D3D_PRIMITIVE = D3D_PRIMITIVE_UNDEFINED; +pub const D3D10_PRIMITIVE_POINT: ::D3D_PRIMITIVE = D3D_PRIMITIVE_POINT; +pub const D3D10_PRIMITIVE_LINE: ::D3D_PRIMITIVE = D3D_PRIMITIVE_LINE; +pub const D3D10_PRIMITIVE_TRIANGLE: ::D3D_PRIMITIVE = D3D_PRIMITIVE_TRIANGLE; +pub const D3D10_PRIMITIVE_LINE_ADJ: ::D3D_PRIMITIVE = D3D_PRIMITIVE_LINE_ADJ; +pub const D3D10_PRIMITIVE_TRIANGLE_ADJ: ::D3D_PRIMITIVE = D3D_PRIMITIVE_TRIANGLE_ADJ; +pub const D3D11_PRIMITIVE_UNDEFINED: ::D3D_PRIMITIVE = D3D_PRIMITIVE_UNDEFINED; +pub const D3D11_PRIMITIVE_POINT: ::D3D_PRIMITIVE = D3D_PRIMITIVE_POINT; +pub const D3D11_PRIMITIVE_LINE: ::D3D_PRIMITIVE = D3D_PRIMITIVE_LINE; +pub const D3D11_PRIMITIVE_TRIANGLE: ::D3D_PRIMITIVE = D3D_PRIMITIVE_TRIANGLE; +pub const D3D11_PRIMITIVE_LINE_ADJ: ::D3D_PRIMITIVE = D3D_PRIMITIVE_LINE_ADJ; +pub const D3D11_PRIMITIVE_TRIANGLE_ADJ: ::D3D_PRIMITIVE = D3D_PRIMITIVE_TRIANGLE_ADJ; +pub const D3D11_PRIMITIVE_1_CONTROL_POINT_PATCH: ::D3D_PRIMITIVE = + D3D_PRIMITIVE_1_CONTROL_POINT_PATCH; +pub const D3D11_PRIMITIVE_2_CONTROL_POINT_PATCH: ::D3D_PRIMITIVE = + D3D_PRIMITIVE_2_CONTROL_POINT_PATCH; +pub const D3D11_PRIMITIVE_3_CONTROL_POINT_PATCH: ::D3D_PRIMITIVE = + D3D_PRIMITIVE_3_CONTROL_POINT_PATCH; +pub const D3D11_PRIMITIVE_4_CONTROL_POINT_PATCH: ::D3D_PRIMITIVE = + D3D_PRIMITIVE_4_CONTROL_POINT_PATCH; +pub const D3D11_PRIMITIVE_5_CONTROL_POINT_PATCH: ::D3D_PRIMITIVE = + D3D_PRIMITIVE_5_CONTROL_POINT_PATCH; +pub const D3D11_PRIMITIVE_6_CONTROL_POINT_PATCH: ::D3D_PRIMITIVE = + D3D_PRIMITIVE_6_CONTROL_POINT_PATCH; +pub const D3D11_PRIMITIVE_7_CONTROL_POINT_PATCH: ::D3D_PRIMITIVE = + D3D_PRIMITIVE_7_CONTROL_POINT_PATCH; +pub const D3D11_PRIMITIVE_8_CONTROL_POINT_PATCH: ::D3D_PRIMITIVE = + D3D_PRIMITIVE_8_CONTROL_POINT_PATCH; +pub const D3D11_PRIMITIVE_9_CONTROL_POINT_PATCH: ::D3D_PRIMITIVE = + D3D_PRIMITIVE_9_CONTROL_POINT_PATCH; +pub const D3D11_PRIMITIVE_10_CONTROL_POINT_PATCH: ::D3D_PRIMITIVE = + D3D_PRIMITIVE_10_CONTROL_POINT_PATCH; +pub const D3D11_PRIMITIVE_11_CONTROL_POINT_PATCH: ::D3D_PRIMITIVE = + D3D_PRIMITIVE_11_CONTROL_POINT_PATCH; +pub const D3D11_PRIMITIVE_12_CONTROL_POINT_PATCH: ::D3D_PRIMITIVE = + D3D_PRIMITIVE_12_CONTROL_POINT_PATCH; +pub const D3D11_PRIMITIVE_13_CONTROL_POINT_PATCH: ::D3D_PRIMITIVE = + D3D_PRIMITIVE_13_CONTROL_POINT_PATCH; +pub const D3D11_PRIMITIVE_14_CONTROL_POINT_PATCH: ::D3D_PRIMITIVE = + D3D_PRIMITIVE_14_CONTROL_POINT_PATCH; +pub const D3D11_PRIMITIVE_15_CONTROL_POINT_PATCH: ::D3D_PRIMITIVE = + D3D_PRIMITIVE_15_CONTROL_POINT_PATCH; +pub const D3D11_PRIMITIVE_16_CONTROL_POINT_PATCH: ::D3D_PRIMITIVE = + D3D_PRIMITIVE_16_CONTROL_POINT_PATCH; +pub const D3D11_PRIMITIVE_17_CONTROL_POINT_PATCH: ::D3D_PRIMITIVE = + D3D_PRIMITIVE_17_CONTROL_POINT_PATCH; +pub const D3D11_PRIMITIVE_18_CONTROL_POINT_PATCH: ::D3D_PRIMITIVE = + D3D_PRIMITIVE_18_CONTROL_POINT_PATCH; +pub const D3D11_PRIMITIVE_19_CONTROL_POINT_PATCH: ::D3D_PRIMITIVE = + D3D_PRIMITIVE_19_CONTROL_POINT_PATCH; +pub const D3D11_PRIMITIVE_20_CONTROL_POINT_PATCH: ::D3D_PRIMITIVE = + D3D_PRIMITIVE_20_CONTROL_POINT_PATCH; +pub const D3D11_PRIMITIVE_21_CONTROL_POINT_PATCH: ::D3D_PRIMITIVE = + D3D_PRIMITIVE_21_CONTROL_POINT_PATCH; +pub const D3D11_PRIMITIVE_22_CONTROL_POINT_PATCH: ::D3D_PRIMITIVE = + D3D_PRIMITIVE_22_CONTROL_POINT_PATCH; +pub const D3D11_PRIMITIVE_23_CONTROL_POINT_PATCH: ::D3D_PRIMITIVE = + D3D_PRIMITIVE_23_CONTROL_POINT_PATCH; +pub const D3D11_PRIMITIVE_24_CONTROL_POINT_PATCH: ::D3D_PRIMITIVE = + D3D_PRIMITIVE_24_CONTROL_POINT_PATCH; +pub const D3D11_PRIMITIVE_25_CONTROL_POINT_PATCH: ::D3D_PRIMITIVE = + D3D_PRIMITIVE_25_CONTROL_POINT_PATCH; +pub const D3D11_PRIMITIVE_26_CONTROL_POINT_PATCH: ::D3D_PRIMITIVE = + D3D_PRIMITIVE_26_CONTROL_POINT_PATCH; +pub const D3D11_PRIMITIVE_27_CONTROL_POINT_PATCH: ::D3D_PRIMITIVE = + D3D_PRIMITIVE_27_CONTROL_POINT_PATCH; +pub const D3D11_PRIMITIVE_28_CONTROL_POINT_PATCH: ::D3D_PRIMITIVE = + D3D_PRIMITIVE_28_CONTROL_POINT_PATCH; +pub const D3D11_PRIMITIVE_29_CONTROL_POINT_PATCH: ::D3D_PRIMITIVE = + D3D_PRIMITIVE_29_CONTROL_POINT_PATCH; +pub const D3D11_PRIMITIVE_30_CONTROL_POINT_PATCH: ::D3D_PRIMITIVE = + D3D_PRIMITIVE_30_CONTROL_POINT_PATCH; +pub const D3D11_PRIMITIVE_31_CONTROL_POINT_PATCH: ::D3D_PRIMITIVE = + D3D_PRIMITIVE_31_CONTROL_POINT_PATCH; +pub const D3D11_PRIMITIVE_32_CONTROL_POINT_PATCH: ::D3D_PRIMITIVE = + D3D_PRIMITIVE_32_CONTROL_POINT_PATCH; +ENUM!{enum D3D_SRV_DIMENSION { + D3D_SRV_DIMENSION_UNKNOWN = 0, + D3D_SRV_DIMENSION_BUFFER = 1, + D3D_SRV_DIMENSION_TEXTURE1D = 2, + D3D_SRV_DIMENSION_TEXTURE1DARRAY = 3, + D3D_SRV_DIMENSION_TEXTURE2D = 4, + D3D_SRV_DIMENSION_TEXTURE2DARRAY = 5, + D3D_SRV_DIMENSION_TEXTURE2DMS = 6, + D3D_SRV_DIMENSION_TEXTURE2DMSARRAY = 7, + D3D_SRV_DIMENSION_TEXTURE3D = 8, + D3D_SRV_DIMENSION_TEXTURECUBE = 9, + D3D_SRV_DIMENSION_TEXTURECUBEARRAY = 10, + D3D_SRV_DIMENSION_BUFFEREX = 11, +}} +pub const D3D10_SRV_DIMENSION_UNKNOWN: ::D3D_SRV_DIMENSION = + D3D_SRV_DIMENSION_UNKNOWN; +pub const D3D10_SRV_DIMENSION_BUFFER: ::D3D_SRV_DIMENSION = + D3D_SRV_DIMENSION_BUFFER; +pub const D3D10_SRV_DIMENSION_TEXTURE1D: ::D3D_SRV_DIMENSION = + D3D_SRV_DIMENSION_TEXTURE1D; +pub const D3D10_SRV_DIMENSION_TEXTURE1DARRAY: ::D3D_SRV_DIMENSION = + D3D_SRV_DIMENSION_TEXTURE1DARRAY; +pub const D3D10_SRV_DIMENSION_TEXTURE2D: ::D3D_SRV_DIMENSION = + D3D_SRV_DIMENSION_TEXTURE2D; +pub const D3D10_SRV_DIMENSION_TEXTURE2DARRAY: ::D3D_SRV_DIMENSION = + D3D_SRV_DIMENSION_TEXTURE2DARRAY; +pub const D3D10_SRV_DIMENSION_TEXTURE2DMS: ::D3D_SRV_DIMENSION = + D3D_SRV_DIMENSION_TEXTURE2DMS; +pub const D3D10_SRV_DIMENSION_TEXTURE2DMSARRAY: ::D3D_SRV_DIMENSION = + D3D_SRV_DIMENSION_TEXTURE2DMSARRAY; +pub const D3D10_SRV_DIMENSION_TEXTURE3D: ::D3D_SRV_DIMENSION = + D3D_SRV_DIMENSION_TEXTURE3D; +pub const D3D10_SRV_DIMENSION_TEXTURECUBE: ::D3D_SRV_DIMENSION = + D3D_SRV_DIMENSION_TEXTURECUBE; +pub const D3D10_1_SRV_DIMENSION_UNKNOWN: ::D3D_SRV_DIMENSION = + D3D_SRV_DIMENSION_UNKNOWN; +pub const D3D10_1_SRV_DIMENSION_BUFFER: ::D3D_SRV_DIMENSION = + D3D_SRV_DIMENSION_BUFFER; +pub const D3D10_1_SRV_DIMENSION_TEXTURE1D: ::D3D_SRV_DIMENSION = + D3D_SRV_DIMENSION_TEXTURE1D; +pub const D3D10_1_SRV_DIMENSION_TEXTURE1DARRAY: ::D3D_SRV_DIMENSION = + D3D_SRV_DIMENSION_TEXTURE1DARRAY; +pub const D3D10_1_SRV_DIMENSION_TEXTURE2D: ::D3D_SRV_DIMENSION = + D3D_SRV_DIMENSION_TEXTURE2D; +pub const D3D10_1_SRV_DIMENSION_TEXTURE2DARRAY: ::D3D_SRV_DIMENSION = + D3D_SRV_DIMENSION_TEXTURE2DARRAY; +pub const D3D10_1_SRV_DIMENSION_TEXTURE2DMS: ::D3D_SRV_DIMENSION = + D3D_SRV_DIMENSION_TEXTURE2DMS; +pub const D3D10_1_SRV_DIMENSION_TEXTURE2DMSARRAY: ::D3D_SRV_DIMENSION = + D3D_SRV_DIMENSION_TEXTURE2DMSARRAY; +pub const D3D10_1_SRV_DIMENSION_TEXTURE3D: ::D3D_SRV_DIMENSION = + D3D_SRV_DIMENSION_TEXTURE3D; +pub const D3D10_1_SRV_DIMENSION_TEXTURECUBE: ::D3D_SRV_DIMENSION = + D3D_SRV_DIMENSION_TEXTURECUBE; +pub const D3D10_1_SRV_DIMENSION_TEXTURECUBEARRAY: ::D3D_SRV_DIMENSION = + D3D_SRV_DIMENSION_TEXTURECUBEARRAY; +pub const D3D11_SRV_DIMENSION_UNKNOWN: ::D3D_SRV_DIMENSION = + D3D_SRV_DIMENSION_UNKNOWN; +pub const D3D11_SRV_DIMENSION_BUFFER: ::D3D_SRV_DIMENSION = + D3D_SRV_DIMENSION_BUFFER; +pub const D3D11_SRV_DIMENSION_TEXTURE1D: ::D3D_SRV_DIMENSION = + D3D_SRV_DIMENSION_TEXTURE1D; +pub const D3D11_SRV_DIMENSION_TEXTURE1DARRAY: ::D3D_SRV_DIMENSION = + D3D_SRV_DIMENSION_TEXTURE1DARRAY; +pub const D3D11_SRV_DIMENSION_TEXTURE2D: ::D3D_SRV_DIMENSION = + D3D_SRV_DIMENSION_TEXTURE2D; +pub const D3D11_SRV_DIMENSION_TEXTURE2DARRAY: ::D3D_SRV_DIMENSION = + D3D_SRV_DIMENSION_TEXTURE2DARRAY; +pub const D3D11_SRV_DIMENSION_TEXTURE2DMS: ::D3D_SRV_DIMENSION = + D3D_SRV_DIMENSION_TEXTURE2DMS; +pub const D3D11_SRV_DIMENSION_TEXTURE2DMSARRAY: ::D3D_SRV_DIMENSION = + D3D_SRV_DIMENSION_TEXTURE2DMSARRAY; +pub const D3D11_SRV_DIMENSION_TEXTURE3D: ::D3D_SRV_DIMENSION = + D3D_SRV_DIMENSION_TEXTURE3D; +pub const D3D11_SRV_DIMENSION_TEXTURECUBE: ::D3D_SRV_DIMENSION = + D3D_SRV_DIMENSION_TEXTURECUBE; +pub const D3D11_SRV_DIMENSION_TEXTURECUBEARRAY: ::D3D_SRV_DIMENSION = + D3D_SRV_DIMENSION_TEXTURECUBEARRAY; +pub const D3D11_SRV_DIMENSION_BUFFEREX: ::D3D_SRV_DIMENSION = + D3D_SRV_DIMENSION_BUFFEREX; +STRUCT!{struct D3D_SHADER_MACRO { + Name: ::LPCSTR, + Definition: ::LPCSTR, +}} +pub type LPD3D_SHADER_MACRO = *mut D3D_SHADER_MACRO; +RIDL!( +interface ID3D10Blob(ID3D10BlobVtbl): IUnknown(IUnknownVtbl) { + fn GetBufferPointer(&mut self) -> ::LPVOID, + fn GetBufferSize(&mut self) -> ::SIZE_T +} +); +pub type LPD3D10BLOB = *mut ID3D10Blob; +pub type ID3DBlob = ID3D10Blob; +pub type LPD3DBLOB = *mut ID3DBlob; +ENUM!{enum D3D_INCLUDE_TYPE { + D3D_INCLUDE_LOCAL = 0, + D3D_INCLUDE_SYSTEM, +}} +pub const D3D10_INCLUDE_LOCAL: ::D3D_INCLUDE_TYPE = D3D_INCLUDE_LOCAL; +pub const D3D10_INCLUDE_SYSTEM: ::D3D_INCLUDE_TYPE = D3D_INCLUDE_SYSTEM; +RIDL!( +interface ID3DInclude(ID3DIncludeVtbl) { + fn Open( + &mut self, IncludeType: D3D_INCLUDE_TYPE, pFileName: ::LPCSTR, pParentData: ::LPCVOID, + ppData: *mut ::LPCVOID, pBytes: *mut ::UINT + ) -> ::HRESULT, + fn Close(&mut self, pData: ::LPCVOID) -> ::HRESULT +} +); +pub type LPD3DINCLUDE = *mut ID3DInclude; +ENUM!{enum D3D_SHADER_VARIABLE_CLASS { + D3D_SVC_SCALAR = 0, + D3D_SVC_VECTOR, + D3D_SVC_MATRIX_ROWS, + D3D_SVC_MATRIX_COLUMNS, + D3D_SVC_OBJECT, + D3D_SVC_STRUCT, + D3D_SVC_INTERFACE_CLASS, + D3D_SVC_INTERFACE_POINTER, +}} +pub const D3D10_SVC_SCALAR: ::D3D_SHADER_VARIABLE_CLASS = D3D_SVC_SCALAR; +pub const D3D10_SVC_VECTOR: ::D3D_SHADER_VARIABLE_CLASS = D3D_SVC_VECTOR; +pub const D3D10_SVC_MATRIX_ROWS: ::D3D_SHADER_VARIABLE_CLASS = D3D_SVC_MATRIX_ROWS; +pub const D3D10_SVC_MATRIX_COLUMNS: ::D3D_SHADER_VARIABLE_CLASS = D3D_SVC_MATRIX_COLUMNS; +pub const D3D10_SVC_OBJECT: ::D3D_SHADER_VARIABLE_CLASS = D3D_SVC_OBJECT; +pub const D3D10_SVC_STRUCT: ::D3D_SHADER_VARIABLE_CLASS = D3D_SVC_STRUCT; +pub const D3D11_SVC_INTERFACE_CLASS: ::D3D_SHADER_VARIABLE_CLASS = D3D_SVC_INTERFACE_CLASS; +pub const D3D11_SVC_INTERFACE_POINTER: ::D3D_SHADER_VARIABLE_CLASS = D3D_SVC_INTERFACE_POINTER; +FLAGS!{enum D3D_SHADER_VARIABLE_FLAGS { + D3D_SVF_USERPACKED = 1, + D3D_SVF_USED = 2, + D3D_SVF_INTERFACE_POINTER = 4, + D3D_SVF_INTERFACE_PARAMETER = 8, +}} +pub const D3D10_SVF_USERPACKED: ::D3D_SHADER_VARIABLE_FLAGS = D3D_SVF_USERPACKED; +pub const D3D10_SVF_USED: ::D3D_SHADER_VARIABLE_FLAGS = D3D_SVF_USED; +pub const D3D11_SVF_INTERFACE_POINTER: ::D3D_SHADER_VARIABLE_FLAGS = D3D_SVF_INTERFACE_POINTER; +pub const D3D11_SVF_INTERFACE_PARAMETER: ::D3D_SHADER_VARIABLE_FLAGS = D3D_SVF_INTERFACE_PARAMETER; +ENUM!{enum D3D_SHADER_VARIABLE_TYPE { + D3D_SVT_VOID = 0, + D3D_SVT_BOOL = 1, + D3D_SVT_INT = 2, + D3D_SVT_FLOAT = 3, + D3D_SVT_STRING = 4, + D3D_SVT_TEXTURE = 5, + D3D_SVT_TEXTURE1D = 6, + D3D_SVT_TEXTURE2D = 7, + D3D_SVT_TEXTURE3D = 8, + D3D_SVT_TEXTURECUBE = 9, + D3D_SVT_SAMPLER = 10, + D3D_SVT_SAMPLER1D = 11, + D3D_SVT_SAMPLER2D = 12, + D3D_SVT_SAMPLER3D = 13, + D3D_SVT_SAMPLERCUBE = 14, + D3D_SVT_PIXELSHADER = 15, + D3D_SVT_VERTEXSHADER = 16, + D3D_SVT_PIXELFRAGMENT = 17, + D3D_SVT_VERTEXFRAGMENT = 18, + D3D_SVT_UINT = 19, + D3D_SVT_UINT8 = 20, + D3D_SVT_GEOMETRYSHADER = 21, + D3D_SVT_RASTERIZER = 22, + D3D_SVT_DEPTHSTENCIL = 23, + D3D_SVT_BLEND = 24, + D3D_SVT_BUFFER = 25, + D3D_SVT_CBUFFER = 26, + D3D_SVT_TBUFFER = 27, + D3D_SVT_TEXTURE1DARRAY = 28, + D3D_SVT_TEXTURE2DARRAY = 29, + D3D_SVT_RENDERTARGETVIEW = 30, + D3D_SVT_DEPTHSTENCILVIEW = 31, + D3D_SVT_TEXTURE2DMS = 32, + D3D_SVT_TEXTURE2DMSARRAY = 33, + D3D_SVT_TEXTURECUBEARRAY = 34, + D3D_SVT_HULLSHADER = 35, + D3D_SVT_DOMAINSHADER = 36, + D3D_SVT_INTERFACE_POINTER = 37, + D3D_SVT_COMPUTESHADER = 38, + D3D_SVT_DOUBLE = 39, + D3D_SVT_RWTEXTURE1D = 40, + D3D_SVT_RWTEXTURE1DARRAY = 41, + D3D_SVT_RWTEXTURE2D = 42, + D3D_SVT_RWTEXTURE2DARRAY = 43, + D3D_SVT_RWTEXTURE3D = 44, + D3D_SVT_RWBUFFER = 45, + D3D_SVT_BYTEADDRESS_BUFFER = 46, + D3D_SVT_RWBYTEADDRESS_BUFFER = 47, + D3D_SVT_STRUCTURED_BUFFER = 48, + D3D_SVT_RWSTRUCTURED_BUFFER = 49, + D3D_SVT_APPEND_STRUCTURED_BUFFER = 50, + D3D_SVT_CONSUME_STRUCTURED_BUFFER = 51, + D3D_SVT_MIN8FLOAT = 52, + D3D_SVT_MIN10FLOAT = 53, + D3D_SVT_MIN16FLOAT = 54, + D3D_SVT_MIN12INT = 55, + D3D_SVT_MIN16INT = 56, + D3D_SVT_MIN16UINT = 57, +}} +pub const D3D10_SVT_VOID: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_VOID; +pub const D3D10_SVT_BOOL: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_BOOL; +pub const D3D10_SVT_INT: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_INT; +pub const D3D10_SVT_FLOAT: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_FLOAT; +pub const D3D10_SVT_STRING: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_STRING; +pub const D3D10_SVT_TEXTURE: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_TEXTURE; +pub const D3D10_SVT_TEXTURE1D: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_TEXTURE1D; +pub const D3D10_SVT_TEXTURE2D: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_TEXTURE2D; +pub const D3D10_SVT_TEXTURE3D: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_TEXTURE3D; +pub const D3D10_SVT_TEXTURECUBE: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_TEXTURECUBE; +pub const D3D10_SVT_SAMPLER: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_SAMPLER; +pub const D3D10_SVT_SAMPLER1D: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_SAMPLER1D; +pub const D3D10_SVT_SAMPLER2D: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_SAMPLER2D; +pub const D3D10_SVT_SAMPLER3D: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_SAMPLER3D; +pub const D3D10_SVT_SAMPLERCUBE: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_SAMPLERCUBE; +pub const D3D10_SVT_PIXELSHADER: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_PIXELSHADER; +pub const D3D10_SVT_VERTEXSHADER: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_VERTEXSHADER; +pub const D3D10_SVT_PIXELFRAGMENT: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_PIXELFRAGMENT; +pub const D3D10_SVT_VERTEXFRAGMENT: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_VERTEXFRAGMENT; +pub const D3D10_SVT_UINT: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_UINT; +pub const D3D10_SVT_UINT8: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_UINT8; +pub const D3D10_SVT_GEOMETRYSHADER: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_GEOMETRYSHADER; +pub const D3D10_SVT_RASTERIZER: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_RASTERIZER; +pub const D3D10_SVT_DEPTHSTENCIL: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_DEPTHSTENCIL; +pub const D3D10_SVT_BLEND: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_BLEND; +pub const D3D10_SVT_BUFFER: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_BUFFER; +pub const D3D10_SVT_CBUFFER: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_CBUFFER; +pub const D3D10_SVT_TBUFFER: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_TBUFFER; +pub const D3D10_SVT_TEXTURE1DARRAY: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_TEXTURE1DARRAY; +pub const D3D10_SVT_TEXTURE2DARRAY: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_TEXTURE2DARRAY; +pub const D3D10_SVT_RENDERTARGETVIEW: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_RENDERTARGETVIEW; +pub const D3D10_SVT_DEPTHSTENCILVIEW: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_DEPTHSTENCILVIEW; +pub const D3D10_SVT_TEXTURE2DMS: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_TEXTURE2DMS; +pub const D3D10_SVT_TEXTURE2DMSARRAY: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_TEXTURE2DMSARRAY; +pub const D3D10_SVT_TEXTURECUBEARRAY: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_TEXTURECUBEARRAY; +pub const D3D11_SVT_HULLSHADER: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_HULLSHADER; +pub const D3D11_SVT_DOMAINSHADER: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_DOMAINSHADER; +pub const D3D11_SVT_INTERFACE_POINTER: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_INTERFACE_POINTER; +pub const D3D11_SVT_COMPUTESHADER: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_COMPUTESHADER; +pub const D3D11_SVT_DOUBLE: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_DOUBLE; +pub const D3D11_SVT_RWTEXTURE1D: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_RWTEXTURE1D; +pub const D3D11_SVT_RWTEXTURE1DARRAY: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_RWTEXTURE1DARRAY; +pub const D3D11_SVT_RWTEXTURE2D: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_RWTEXTURE2D; +pub const D3D11_SVT_RWTEXTURE2DARRAY: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_RWTEXTURE2DARRAY; +pub const D3D11_SVT_RWTEXTURE3D: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_RWTEXTURE3D; +pub const D3D11_SVT_RWBUFFER: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_RWBUFFER; +pub const D3D11_SVT_BYTEADDRESS_BUFFER: ::D3D_SHADER_VARIABLE_TYPE = D3D_SVT_BYTEADDRESS_BUFFER; +pub const D3D11_SVT_RWBYTEADDRESS_BUFFER: ::D3D_SHADER_VARIABLE_TYPE = + D3D_SVT_RWBYTEADDRESS_BUFFER; +pub const D3D11_SVT_STRUCTURED_BUFFER: ::D3D_SHADER_VARIABLE_TYPE = + D3D_SVT_STRUCTURED_BUFFER; +pub const D3D11_SVT_RWSTRUCTURED_BUFFER: ::D3D_SHADER_VARIABLE_TYPE = + D3D_SVT_RWSTRUCTURED_BUFFER; +pub const D3D11_SVT_APPEND_STRUCTURED_BUFFER: ::D3D_SHADER_VARIABLE_TYPE = + D3D_SVT_APPEND_STRUCTURED_BUFFER; +pub const D3D11_SVT_CONSUME_STRUCTURED_BUFFER: ::D3D_SHADER_VARIABLE_TYPE = + D3D_SVT_CONSUME_STRUCTURED_BUFFER; +FLAGS!{enum D3D_SHADER_INPUT_FLAGS { + D3D_SIF_USERPACKED = 0x1, + D3D_SIF_COMPARISON_SAMPLER = 0x2, + D3D_SIF_TEXTURE_COMPONENT_0 = 0x4, + D3D_SIF_TEXTURE_COMPONENT_1 = 0x8, + D3D_SIF_TEXTURE_COMPONENTS = 0xc, + D3D_SIF_UNUSED = 0x10, +}} +pub const D3D10_SIF_USERPACKED: ::D3D_SHADER_INPUT_FLAGS = D3D_SIF_USERPACKED; +pub const D3D10_SIF_COMPARISON_SAMPLER: ::D3D_SHADER_INPUT_FLAGS = D3D_SIF_COMPARISON_SAMPLER; +pub const D3D10_SIF_TEXTURE_COMPONENT_0: ::D3D_SHADER_INPUT_FLAGS = D3D_SIF_TEXTURE_COMPONENT_0; +pub const D3D10_SIF_TEXTURE_COMPONENT_1: ::D3D_SHADER_INPUT_FLAGS = D3D_SIF_TEXTURE_COMPONENT_1; +pub const D3D10_SIF_TEXTURE_COMPONENTS: ::D3D_SHADER_INPUT_FLAGS = D3D_SIF_TEXTURE_COMPONENTS; +ENUM!{enum D3D_SHADER_INPUT_TYPE { + D3D_SIT_CBUFFER, + D3D_SIT_TBUFFER, + D3D_SIT_TEXTURE, + D3D_SIT_SAMPLER, + D3D_SIT_UAV_RWTYPED, + D3D_SIT_STRUCTURED, + D3D_SIT_UAV_RWSTRUCTURED, + D3D_SIT_BYTEADDRESS, + D3D_SIT_UAV_RWBYTEADDRESS, + D3D_SIT_UAV_APPEND_STRUCTURED, + D3D_SIT_UAV_CONSUME_STRUCTURED, + D3D_SIT_UAV_RWSTRUCTURED_WITH_COUNTER, +}} +pub const D3D10_SIT_CBUFFER: ::D3D_SHADER_INPUT_TYPE = D3D_SIT_CBUFFER; +pub const D3D10_SIT_TBUFFER: ::D3D_SHADER_INPUT_TYPE = D3D_SIT_TBUFFER; +pub const D3D10_SIT_TEXTURE: ::D3D_SHADER_INPUT_TYPE = D3D_SIT_TEXTURE; +pub const D3D10_SIT_SAMPLER: ::D3D_SHADER_INPUT_TYPE = D3D_SIT_SAMPLER; +pub const D3D11_SIT_UAV_RWTYPED: ::D3D_SHADER_INPUT_TYPE = D3D_SIT_UAV_RWTYPED; +pub const D3D11_SIT_STRUCTURED: ::D3D_SHADER_INPUT_TYPE = D3D_SIT_STRUCTURED; +pub const D3D11_SIT_UAV_RWSTRUCTURED: ::D3D_SHADER_INPUT_TYPE = D3D_SIT_UAV_RWSTRUCTURED; +pub const D3D11_SIT_BYTEADDRESS: ::D3D_SHADER_INPUT_TYPE = D3D_SIT_BYTEADDRESS; +pub const D3D11_SIT_UAV_RWBYTEADDRESS: ::D3D_SHADER_INPUT_TYPE = D3D_SIT_UAV_RWBYTEADDRESS; +pub const D3D11_SIT_UAV_APPEND_STRUCTURED: ::D3D_SHADER_INPUT_TYPE = D3D_SIT_UAV_APPEND_STRUCTURED; +pub const D3D11_SIT_UAV_CONSUME_STRUCTURED: ::D3D_SHADER_INPUT_TYPE = + D3D_SIT_UAV_CONSUME_STRUCTURED; +pub const D3D11_SIT_UAV_RWSTRUCTURED_WITH_COUNTER: ::D3D_SHADER_INPUT_TYPE = + D3D_SIT_UAV_RWSTRUCTURED_WITH_COUNTER; +FLAGS!{enum D3D_SHADER_CBUFFER_FLAGS { + D3D_CBF_USERPACKED = 1, +}} +pub const D3D10_CBF_USERPACKED: ::D3D_SHADER_CBUFFER_FLAGS = D3D_CBF_USERPACKED; +ENUM!{enum D3D_CBUFFER_TYPE { + D3D_CT_CBUFFER, + D3D_CT_TBUFFER, + D3D_CT_INTERFACE_POINTERS, + D3D_CT_RESOURCE_BIND_INFO, +}} +pub const D3D10_CT_CBUFFER: ::D3D_CBUFFER_TYPE = D3D_CT_CBUFFER; +pub const D3D10_CT_TBUFFER: ::D3D_CBUFFER_TYPE = D3D_CT_TBUFFER; +pub const D3D11_CT_CBUFFER: ::D3D_CBUFFER_TYPE = D3D_CT_CBUFFER; +pub const D3D11_CT_TBUFFER: ::D3D_CBUFFER_TYPE = D3D_CT_TBUFFER; +pub const D3D11_CT_INTERFACE_POINTERS: ::D3D_CBUFFER_TYPE = D3D_CT_INTERFACE_POINTERS; +pub const D3D11_CT_RESOURCE_BIND_INFO: ::D3D_CBUFFER_TYPE = D3D_CT_RESOURCE_BIND_INFO; +ENUM!{enum D3D_NAME { + D3D_NAME_UNDEFINED = 0, + D3D_NAME_POSITION = 1, + D3D_NAME_CLIP_DISTANCE = 2, + D3D_NAME_CULL_DISTANCE = 3, + D3D_NAME_RENDER_TARGET_ARRAY_INDEX = 4, + D3D_NAME_VIEWPORT_ARRAY_INDEX = 5, + D3D_NAME_VERTEX_ID = 6, + D3D_NAME_PRIMITIVE_ID = 7, + D3D_NAME_INSTANCE_ID = 8, + D3D_NAME_IS_FRONT_FACE = 9, + D3D_NAME_SAMPLE_INDEX = 10, + D3D_NAME_FINAL_QUAD_EDGE_TESSFACTOR = 11, + D3D_NAME_FINAL_QUAD_INSIDE_TESSFACTOR = 12, + D3D_NAME_FINAL_TRI_EDGE_TESSFACTOR = 13, + D3D_NAME_FINAL_TRI_INSIDE_TESSFACTOR = 14, + D3D_NAME_FINAL_LINE_DETAIL_TESSFACTOR = 15, + D3D_NAME_FINAL_LINE_DENSITY_TESSFACTOR = 16, + D3D_NAME_TARGET = 64, + D3D_NAME_DEPTH = 65, + D3D_NAME_COVERAGE = 66, + D3D_NAME_DEPTH_GREATER_EQUAL = 67, + D3D_NAME_DEPTH_LESS_EQUAL = 68, +}} +pub const D3D10_NAME_UNDEFINED: D3D_NAME = D3D_NAME_UNDEFINED; +pub const D3D10_NAME_POSITION: D3D_NAME = D3D_NAME_POSITION; +pub const D3D10_NAME_CLIP_DISTANCE: D3D_NAME = D3D_NAME_CLIP_DISTANCE; +pub const D3D10_NAME_CULL_DISTANCE: D3D_NAME = D3D_NAME_CULL_DISTANCE; +pub const D3D10_NAME_RENDER_TARGET_ARRAY_INDEX: D3D_NAME = D3D_NAME_RENDER_TARGET_ARRAY_INDEX; +pub const D3D10_NAME_VIEWPORT_ARRAY_INDEX: D3D_NAME = D3D_NAME_VIEWPORT_ARRAY_INDEX; +pub const D3D10_NAME_VERTEX_ID: D3D_NAME = D3D_NAME_VERTEX_ID; +pub const D3D10_NAME_PRIMITIVE_ID: D3D_NAME = D3D_NAME_PRIMITIVE_ID; +pub const D3D10_NAME_INSTANCE_ID: D3D_NAME = D3D_NAME_INSTANCE_ID; +pub const D3D10_NAME_IS_FRONT_FACE: D3D_NAME = D3D_NAME_IS_FRONT_FACE; +pub const D3D10_NAME_SAMPLE_INDEX: D3D_NAME = D3D_NAME_SAMPLE_INDEX; +pub const D3D10_NAME_TARGET: D3D_NAME = D3D_NAME_TARGET; +pub const D3D10_NAME_DEPTH: D3D_NAME = D3D_NAME_DEPTH; +pub const D3D10_NAME_COVERAGE: D3D_NAME = D3D_NAME_COVERAGE; +pub const D3D11_NAME_FINAL_QUAD_EDGE_TESSFACTOR: D3D_NAME = D3D_NAME_FINAL_QUAD_EDGE_TESSFACTOR; +pub const D3D11_NAME_FINAL_QUAD_INSIDE_TESSFACTOR: D3D_NAME = D3D_NAME_FINAL_QUAD_INSIDE_TESSFACTOR; +pub const D3D11_NAME_FINAL_TRI_EDGE_TESSFACTOR: D3D_NAME = D3D_NAME_FINAL_TRI_EDGE_TESSFACTOR; +pub const D3D11_NAME_FINAL_TRI_INSIDE_TESSFACTOR: D3D_NAME = D3D_NAME_FINAL_TRI_INSIDE_TESSFACTOR; +pub const D3D11_NAME_FINAL_LINE_DETAIL_TESSFACTOR: D3D_NAME = D3D_NAME_FINAL_LINE_DETAIL_TESSFACTOR; +pub const D3D11_NAME_FINAL_LINE_DENSITY_TESSFACTOR: D3D_NAME = D3D_NAME_FINAL_LINE_DENSITY_TESSFACTOR; +pub const D3D11_NAME_DEPTH_GREATER_EQUAL: D3D_NAME = D3D_NAME_DEPTH_GREATER_EQUAL; +pub const D3D11_NAME_DEPTH_LESS_EQUAL: D3D_NAME = D3D_NAME_DEPTH_LESS_EQUAL; +ENUM!{enum D3D_RESOURCE_RETURN_TYPE { + D3D_RETURN_TYPE_UNORM = 1, + D3D_RETURN_TYPE_SNORM = 2, + D3D_RETURN_TYPE_SINT = 3, + D3D_RETURN_TYPE_UINT = 4, + D3D_RETURN_TYPE_FLOAT = 5, + D3D_RETURN_TYPE_MIXED = 6, + D3D_RETURN_TYPE_DOUBLE = 7, + D3D_RETURN_TYPE_CONTINUED = 8, +}} +pub const D3D10_RETURN_TYPE_UNORM: ::D3D_RESOURCE_RETURN_TYPE = D3D_RETURN_TYPE_UNORM; +pub const D3D10_RETURN_TYPE_SNORM: ::D3D_RESOURCE_RETURN_TYPE = D3D_RETURN_TYPE_SNORM; +pub const D3D10_RETURN_TYPE_SINT: ::D3D_RESOURCE_RETURN_TYPE = D3D_RETURN_TYPE_SINT; +pub const D3D10_RETURN_TYPE_UINT: ::D3D_RESOURCE_RETURN_TYPE = D3D_RETURN_TYPE_UINT; +pub const D3D10_RETURN_TYPE_FLOAT: ::D3D_RESOURCE_RETURN_TYPE = D3D_RETURN_TYPE_FLOAT; +pub const D3D10_RETURN_TYPE_MIXED: ::D3D_RESOURCE_RETURN_TYPE = D3D_RETURN_TYPE_MIXED; +pub const D3D11_RETURN_TYPE_UNORM: ::D3D_RESOURCE_RETURN_TYPE = D3D_RETURN_TYPE_UNORM; +pub const D3D11_RETURN_TYPE_SNORM: ::D3D_RESOURCE_RETURN_TYPE = D3D_RETURN_TYPE_SNORM; +pub const D3D11_RETURN_TYPE_SINT: ::D3D_RESOURCE_RETURN_TYPE = D3D_RETURN_TYPE_SINT; +pub const D3D11_RETURN_TYPE_UINT: ::D3D_RESOURCE_RETURN_TYPE = D3D_RETURN_TYPE_UINT; +pub const D3D11_RETURN_TYPE_FLOAT: ::D3D_RESOURCE_RETURN_TYPE = D3D_RETURN_TYPE_FLOAT; +pub const D3D11_RETURN_TYPE_MIXED: ::D3D_RESOURCE_RETURN_TYPE = D3D_RETURN_TYPE_MIXED; +pub const D3D11_RETURN_TYPE_DOUBLE: ::D3D_RESOURCE_RETURN_TYPE = D3D_RETURN_TYPE_DOUBLE; +pub const D3D11_RETURN_TYPE_CONTINUED: ::D3D_RESOURCE_RETURN_TYPE = D3D_RETURN_TYPE_CONTINUED; +ENUM!{enum D3D_REGISTER_COMPONENT_TYPE { + D3D_REGISTER_COMPONENT_UNKNOWN = 0, + D3D_REGISTER_COMPONENT_UINT32 = 1, + D3D_REGISTER_COMPONENT_SINT32 = 2, + D3D_REGISTER_COMPONENT_FLOAT32 = 3, +}} +pub const D3D10_REGISTER_COMPONENT_UNKNOWN: ::D3D_REGISTER_COMPONENT_TYPE = + D3D_REGISTER_COMPONENT_UNKNOWN; +pub const D3D10_REGISTER_COMPONENT_UINT32: ::D3D_REGISTER_COMPONENT_TYPE = + D3D_REGISTER_COMPONENT_UINT32; +pub const D3D10_REGISTER_COMPONENT_SINT32: ::D3D_REGISTER_COMPONENT_TYPE = + D3D_REGISTER_COMPONENT_SINT32; +pub const D3D10_REGISTER_COMPONENT_FLOAT32: ::D3D_REGISTER_COMPONENT_TYPE = + D3D_REGISTER_COMPONENT_FLOAT32; +ENUM!{enum D3D_TESSELLATOR_DOMAIN { + D3D_TESSELLATOR_DOMAIN_UNDEFINED, + D3D_TESSELLATOR_DOMAIN_ISOLINE, + D3D_TESSELLATOR_DOMAIN_TRI, + D3D_TESSELLATOR_DOMAIN_QUAD, +}} +pub const D3D11_TESSELLATOR_DOMAIN_UNDEFINED: ::D3D_TESSELLATOR_DOMAIN = + D3D_TESSELLATOR_DOMAIN_UNDEFINED; +pub const D3D11_TESSELLATOR_DOMAIN_ISOLINE: ::D3D_TESSELLATOR_DOMAIN = + D3D_TESSELLATOR_DOMAIN_ISOLINE; +pub const D3D11_TESSELLATOR_DOMAIN_TRI: ::D3D_TESSELLATOR_DOMAIN = D3D_TESSELLATOR_DOMAIN_TRI; +pub const D3D11_TESSELLATOR_DOMAIN_QUAD: ::D3D_TESSELLATOR_DOMAIN = D3D_TESSELLATOR_DOMAIN_QUAD; +ENUM!{enum D3D_TESSELLATOR_PARTITIONING { + D3D_TESSELLATOR_PARTITIONING_UNDEFINED, + D3D_TESSELLATOR_PARTITIONING_INTEGER, + D3D_TESSELLATOR_PARTITIONING_POW2, + D3D_TESSELLATOR_PARTITIONING_FRACTIONAL_ODD, + D3D_TESSELLATOR_PARTITIONING_FRACTIONAL_EVEN, +}} +pub const D3D11_TESSELLATOR_PARTITIONING_UNDEFINED: ::D3D_TESSELLATOR_PARTITIONING = + D3D_TESSELLATOR_PARTITIONING_UNDEFINED; +pub const D3D11_TESSELLATOR_PARTITIONING_INTEGER: ::D3D_TESSELLATOR_PARTITIONING = + D3D_TESSELLATOR_PARTITIONING_INTEGER; +pub const D3D11_TESSELLATOR_PARTITIONING_POW2: ::D3D_TESSELLATOR_PARTITIONING = + D3D_TESSELLATOR_PARTITIONING_POW2; +pub const D3D11_TESSELLATOR_PARTITIONING_FRACTIONAL_ODD: ::D3D_TESSELLATOR_PARTITIONING = + D3D_TESSELLATOR_PARTITIONING_FRACTIONAL_ODD; +pub const D3D11_TESSELLATOR_PARTITIONING_FRACTIONAL_EVEN: ::D3D_TESSELLATOR_PARTITIONING = + D3D_TESSELLATOR_PARTITIONING_FRACTIONAL_EVEN; +ENUM!{enum D3D_TESSELLATOR_OUTPUT_PRIMITIVE { + D3D_TESSELLATOR_OUTPUT_UNDEFINED, + D3D_TESSELLATOR_OUTPUT_POINT, + D3D_TESSELLATOR_OUTPUT_LINE, + D3D_TESSELLATOR_OUTPUT_TRIANGLE_CW, + D3D_TESSELLATOR_OUTPUT_TRIANGLE_CCW, +}} +pub const D3D11_TESSELLATOR_OUTPUT_UNDEFINED: ::D3D_TESSELLATOR_OUTPUT_PRIMITIVE = + D3D_TESSELLATOR_OUTPUT_UNDEFINED; +pub const D3D11_TESSELLATOR_OUTPUT_POINT: ::D3D_TESSELLATOR_OUTPUT_PRIMITIVE = + D3D_TESSELLATOR_OUTPUT_POINT; +pub const D3D11_TESSELLATOR_OUTPUT_LINE: ::D3D_TESSELLATOR_OUTPUT_PRIMITIVE = + D3D_TESSELLATOR_OUTPUT_LINE; +pub const D3D11_TESSELLATOR_OUTPUT_TRIANGLE_CW: ::D3D_TESSELLATOR_OUTPUT_PRIMITIVE = + D3D_TESSELLATOR_OUTPUT_TRIANGLE_CW; +pub const D3D11_TESSELLATOR_OUTPUT_TRIANGLE_CCW: ::D3D_TESSELLATOR_OUTPUT_PRIMITIVE = + D3D_TESSELLATOR_OUTPUT_TRIANGLE_CCW; +ENUM!{enum D3D_MIN_PRECISION { + D3D_MIN_PRECISION_DEFAULT, + D3D_MIN_PRECISION_FLOAT_16, + D3D_MIN_PRECISION_FLOAT_2_8, + D3D_MIN_PRECISION_RESERVED, + D3D_MIN_PRECISION_SINT_16, + D3D_MIN_PRECISION_UINT_16, + D3D_MIN_PRECISION_ANY_16 = 0xf0, + D3D_MIN_PRECISION_ANY_10 = 0xf1, +}} +ENUM!{enum D3D_INTERPOLATION_MODE { + D3D_INTERPOLATION_UNDEFINED, + D3D_INTERPOLATION_CONSTANT, + D3D_INTERPOLATION_LINEAR, + D3D_INTERPOLATION_LINEAR_CENTROID, + D3D_INTERPOLATION_LINEAR_NOPERSPECTIVE, + D3D_INTERPOLATION_LINEAR_NOPERSPECTIVE_CENTROID, + D3D_INTERPOLATION_LINEAR_SAMPLE, + D3D_INTERPOLATION_LINEAR_NOPERSPECTIVE_SAMPLE, +}} +FLAGS!{enum D3D_PARAMETER_FLAGS { + D3D_PF_NONE = 0, + D3D_PF_IN = 0x1, + D3D_PF_OUT = 0x2, +}} diff --git a/deps/winapi-0.2.6/src/d3dcompiler.rs b/deps/winapi-0.2.6/src/d3dcompiler.rs new file mode 100644 index 000000000..6918888f6 --- /dev/null +++ b/deps/winapi-0.2.6/src/d3dcompiler.rs @@ -0,0 +1,74 @@ +// Copyright © 2016, Peter Atashian +// Licensed under the MIT License <LICENSE.md> +use super::*; +pub const D3DCOMPILER_DLL: &'static str = "d3dcompiler_47.dll"; +pub const D3D_COMPILER_VERSION: DWORD = 47; +pub const D3DCOMPILE_DEBUG: DWORD = 1 << 0; +pub const D3DCOMPILE_SKIP_VALIDATION: DWORD = 1 << 1; +pub const D3DCOMPILE_SKIP_OPTIMIZATION: DWORD = 1 << 2; +pub const D3DCOMPILE_PACK_MATRIX_ROW_MAJOR: DWORD = 1 << 3; +pub const D3DCOMPILE_PACK_MATRIX_COLUMN_MAJOR: DWORD = 1 << 4; +pub const D3DCOMPILE_PARTIAL_PRECISION: DWORD = 1 << 5; +pub const D3DCOMPILE_FORCE_VS_SOFTWARE_NO_OPT: DWORD = 1 << 6; +pub const D3DCOMPILE_FORCE_PS_SOFTWARE_NO_OPT: DWORD = 1 << 7; +pub const D3DCOMPILE_NO_PRESHADER: DWORD = 1 << 8; +pub const D3DCOMPILE_AVOID_FLOW_CONTROL: DWORD = 1 << 9; +pub const D3DCOMPILE_PREFER_FLOW_CONTROL: DWORD = 1 << 10; +pub const D3DCOMPILE_ENABLE_STRICTNESS: DWORD = 1 << 11; +pub const D3DCOMPILE_ENABLE_BACKWARDS_COMPATIBILITY: DWORD = 1 << 12; +pub const D3DCOMPILE_IEEE_STRICTNESS: DWORD = 1 << 13; +pub const D3DCOMPILE_OPTIMIZATION_LEVEL0: DWORD = 1 << 14; +pub const D3DCOMPILE_OPTIMIZATION_LEVEL1: DWORD = 0; +pub const D3DCOMPILE_OPTIMIZATION_LEVEL2: DWORD = (1 << 14) | (1 << 15); +pub const D3DCOMPILE_OPTIMIZATION_LEVEL3: DWORD = 1 << 15; +pub const D3DCOMPILE_RESERVED16: DWORD = 1 << 16; +pub const D3DCOMPILE_RESERVED17: DWORD = 1 << 17; +pub const D3DCOMPILE_WARNINGS_ARE_ERRORS: DWORD = 1 << 18; +pub const D3DCOMPILE_RESOURCES_MAY_ALIAS: DWORD = 1 << 19; +pub const D3DCOMPILE_ENABLE_UNBOUNDED_DESCRIPTOR_TABLES: DWORD = 1 << 20; +pub const D3DCOMPILE_ALL_RESOURCES_BOUND: DWORD = 1 << 21; +pub const D3DCOMPILE_EFFECT_CHILD_EFFECT: DWORD = 1 << 0; +pub const D3DCOMPILE_EFFECT_ALLOW_SLOW_OPS: DWORD = 1 << 1; +pub const D3D_COMPILE_STANDARD_FILE_INCLUDE: *mut ID3DInclude = 1 as *mut ID3DInclude; +pub const D3DCOMPILE_SECDATA_MERGE_UAV_SLOTS: DWORD = 0x00000001; +pub const D3DCOMPILE_SECDATA_PRESERVE_TEMPLATE_SLOTS: DWORD = 0x00000002; +pub const D3DCOMPILE_SECDATA_REQUIRE_TEMPLATE_MATCH: DWORD = 0x00000004; +pub const D3D_DISASM_ENABLE_COLOR_CODE: DWORD = 0x00000001; +pub const D3D_DISASM_ENABLE_DEFAULT_VALUE_PRINTS: DWORD = 0x00000002; +pub const D3D_DISASM_ENABLE_INSTRUCTION_NUMBERING: DWORD = 0x00000004; +pub const D3D_DISASM_ENABLE_INSTRUCTION_CYCLE: DWORD = 0x00000008; +pub const D3D_DISASM_DISABLE_DEBUG_INFO: DWORD = 0x00000010; +pub const D3D_DISASM_ENABLE_INSTRUCTION_OFFSET: DWORD = 0x00000020; +pub const D3D_DISASM_INSTRUCTION_ONLY: DWORD = 0x00000040; +pub const D3D_DISASM_PRINT_HEX_LITERALS: DWORD = 0x00000080; +pub const D3D_GET_INST_OFFSETS_INCLUDE_NON_EXECUTABLE: DWORD = 0x00000001; +FLAGS!{enum D3DCOMPILER_STRIP_FLAGS { + D3DCOMPILER_STRIP_REFLECTION_DATA = 0x00000001, + D3DCOMPILER_STRIP_DEBUG_INFO = 0x00000002, + D3DCOMPILER_STRIP_TEST_BLOBS = 0x00000004, + D3DCOMPILER_STRIP_PRIVATE_DATA = 0x00000008, + D3DCOMPILER_STRIP_ROOT_SIGNATURE = 0x00000010, + D3DCOMPILER_STRIP_FORCE_DWORD = 0x7fffffff, +}} +ENUM!{enum D3D_BLOB_PART { + D3D_BLOB_INPUT_SIGNATURE_BLOB, + D3D_BLOB_OUTPUT_SIGNATURE_BLOB, + D3D_BLOB_INPUT_AND_OUTPUT_SIGNATURE_BLOB, + D3D_BLOB_PATCH_CONSTANT_SIGNATURE_BLOB, + D3D_BLOB_ALL_SIGNATURE_BLOB, + D3D_BLOB_DEBUG_INFO, + D3D_BLOB_LEGACY_SHADER, + D3D_BLOB_XNA_PREPASS_SHADER, + D3D_BLOB_XNA_SHADER, + D3D_BLOB_PDB, + D3D_BLOB_PRIVATE_DATA, + D3D_BLOB_ROOT_SIGNATURE, + D3D_BLOB_TEST_ALTERNATE_SHADER = 0x8000, + D3D_BLOB_TEST_COMPILE_DETAILS, + D3D_BLOB_TEST_COMPILE_PERF, + D3D_BLOB_TEST_COMPILE_REPORT, +}} +STRUCT!{struct D3D_SHADER_DATA { + pBytecode: LPCVOID, + BytecodeLength: SIZE_T, +}} diff --git a/deps/winapi-0.2.6/src/dbghelp.rs b/deps/winapi-0.2.6/src/dbghelp.rs new file mode 100644 index 000000000..8c20d72bf --- /dev/null +++ b/deps/winapi-0.2.6/src/dbghelp.rs @@ -0,0 +1,340 @@ +// Copyright © 2015, Peter Atashian +// Licensed under the MIT License <LICENSE.md> +//! DbgHelp include file +#[cfg(target_arch = "x86_64")] +STRUCT!{struct LOADED_IMAGE { + ModuleName: ::PSTR, + hFile: ::HANDLE, + MappedAddress: ::PUCHAR, + FileHeader: ::PIMAGE_NT_HEADERS64, + LastRvaSection: ::PIMAGE_SECTION_HEADER, + NumberOfSections: ::ULONG, + Sections: ::PIMAGE_SECTION_HEADER, + Characteristics: ::ULONG, + fSystemImage: ::BOOLEAN, + fDOSImage: ::BOOLEAN, + fReadOnly: ::BOOLEAN, + Version: ::UCHAR, + Links: ::LIST_ENTRY, + SizeOfImage: ::ULONG, +}} +#[cfg(target_arch = "x86")] +STRUCT!{struct LOADED_IMAGE { + ModuleName: ::PSTR, + hFile: ::HANDLE, + MappedAddress: ::PUCHAR, + FileHeader: ::PIMAGE_NT_HEADERS32, + LastRvaSection: ::PIMAGE_SECTION_HEADER, + NumberOfSections: ::ULONG, + Sections: ::PIMAGE_SECTION_HEADER, + Characteristics: ::ULONG, + fSystemImage: ::BOOLEAN, + fDOSImage: ::BOOLEAN, + fReadOnly: ::BOOLEAN, + Version: ::UCHAR, + Links: ::LIST_ENTRY, + SizeOfImage: ::ULONG, +}} +pub const MAX_SYM_NAME: usize = 2000; +pub const ERROR_IMAGE_NOT_STRIPPED: ::DWORD = 0x8800; +pub const ERROR_NO_DBG_POINTER: ::DWORD = 0x8801; +pub const ERROR_NO_PDB_POINTER: ::DWORD = 0x8802; +pub type PFIND_DEBUG_FILE_CALLBACK = Option<unsafe extern "system" fn( + FileHandle: ::HANDLE, FileName: ::PCSTR, CallerData: ::PVOID, +) -> ::BOOL>; +pub type PFIND_DEBUG_FILE_CALLBACKW = Option<unsafe extern "system" fn( + FileHandle: ::HANDLE, FileName: ::PCWSTR, CallerData: ::PVOID, +) -> ::BOOL>; +pub type PFINDFILEINPATHCALLBACK = Option<unsafe extern "system" fn( + filename: ::PCSTR, context: ::PVOID, +) -> ::BOOL>; +pub type PFINDFILEINPATHCALLBACKW = Option<unsafe extern "system" fn( + filename: ::PCWSTR, context: ::PVOID, +) -> ::BOOL>; +pub type PFIND_EXE_FILE_CALLBACK = Option<unsafe extern "system" fn( + FileHandle: ::HANDLE, FileName: ::PCSTR, CallerData: ::PVOID, +) -> ::BOOL>; +pub type PFIND_EXE_FILE_CALLBACKW = Option<unsafe extern "system" fn( + FileHandle: ::HANDLE, FileName: ::PCWSTR, CallerData: ::PVOID, +) -> ::BOOL>; +#[cfg(target_arch = "x86")] +STRUCT!{struct IMAGE_DEBUG_INFORMATION { + List: ::LIST_ENTRY, + ReservedSize: ::DWORD, + ReservedMappedBase: ::PVOID, + ReservedMachine: ::USHORT, + ReservedCharacteristics: ::USHORT, + ReservedCheckSum: ::DWORD, + ImageBase: ::DWORD, + SizeOfImage: ::DWORD, + ReservedNumberOfSections: ::DWORD, + ReservedSections: ::PIMAGE_SECTION_HEADER, + ReservedExportedNamesSize: ::DWORD, + ReservedExportedNames: ::PSTR, + ReservedNumberOfFunctionTableEntries: ::DWORD, + ReservedFunctionTableEntries: ::PIMAGE_FUNCTION_ENTRY, + ReservedLowestFunctionStartingAddress: ::DWORD, + ReservedHighestFunctionEndingAddress: ::DWORD, + ReservedNumberOfFpoTableEntries: ::DWORD, + ReservedFpoTableEntries: ::PFPO_DATA, + SizeOfCoffSymbols: ::DWORD, + CoffSymbols: ::PIMAGE_COFF_SYMBOLS_HEADER, + ReservedSizeOfCodeViewSymbols: ::DWORD, + ReservedCodeViewSymbols: ::PVOID, + ImageFilePath: ::PSTR, + ImageFileName: ::PSTR, + ReservedDebugFilePath: ::PSTR, + ReservedTimeDateStamp: ::DWORD, + ReservedRomImage: ::BOOL, + ReservedDebugDirectory: ::PIMAGE_DEBUG_DIRECTORY, + ReservedNumberOfDebugDirectories: ::DWORD, + ReservedOriginalFunctionTableBaseAddress: ::DWORD, + Reserved: [::DWORD; 2], +}} +#[cfg(target_arch = "x86")] +pub type PIMAGE_DEBUG_INFORMATION = *mut IMAGE_DEBUG_INFORMATION; +pub type PENUMDIRTREE_CALLBACK = Option<unsafe extern "system" fn( + FilePath: ::PCSTR, CallerData: ::PVOID, +) -> ::BOOL>; +pub type PENUMDIRTREE_CALLBACKW = Option<unsafe extern "system" fn( + FilePath: ::PCWSTR, CallerData: ::PVOID, +) -> ::BOOL>; +pub const UNDNAME_COMPLETE: ::DWORD = 0x0000; +pub const UNDNAME_NO_LEADING_UNDERSCORES: ::DWORD = 0x0001; +pub const UNDNAME_NO_MS_KEYWORDS: ::DWORD = 0x0002; +pub const UNDNAME_NO_FUNCTION_RETURNS: ::DWORD = 0x0004; +pub const UNDNAME_NO_ALLOCATION_MODEL: ::DWORD = 0x0008; +pub const UNDNAME_NO_ALLOCATION_LANGUAGE: ::DWORD = 0x0010; +pub const UNDNAME_NO_MS_THISTYPE: ::DWORD = 0x0020; +pub const UNDNAME_NO_CV_THISTYPE: ::DWORD = 0x0040; +pub const UNDNAME_NO_THISTYPE: ::DWORD = 0x0060; +pub const UNDNAME_NO_ACCESS_SPECIFIERS: ::DWORD = 0x0080; +pub const UNDNAME_NO_THROW_SIGNATURES: ::DWORD = 0x0100; +pub const UNDNAME_NO_MEMBER_TYPE: ::DWORD = 0x0200; +pub const UNDNAME_NO_RETURN_UDT_MODEL: ::DWORD = 0x0400; +pub const UNDNAME_32_BIT_DECODE: ::DWORD = 0x0800; +pub const UNDNAME_NAME_ONLY: ::DWORD = 0x1000; +pub const UNDNAME_NO_ARGUMENTS: ::DWORD = 0x2000; +pub const UNDNAME_NO_SPECIAL_SYMS: ::DWORD = 0x4000; +pub const DBHHEADER_DEBUGDIRS: ::DWORD = 0x1; +pub const DBHHEADER_CVMISC: ::DWORD = 0x2; +pub const DBHHEADER_PDBGUID: ::DWORD = 0x3; +STRUCT!{struct MODLOAD_DATA { + ssize: ::DWORD, + ssig: ::DWORD, + data: ::PVOID, + size: ::DWORD, + flags: ::DWORD, +}} +pub type PMODLOAD_DATA = *mut MODLOAD_DATA; +STRUCT!{struct MODLOAD_CVMISC { + oCV: ::DWORD, + cCV: ::size_t, + oMisc: ::DWORD, + cMisc: ::size_t, + dtImage: ::DWORD, + cImage: ::DWORD, +}} +pub type PMODLOAD_CVMISC = *mut MODLOAD_CVMISC; +STRUCT!{struct MODLOAD_PDBGUID_PDBAGE { + PdbGuid: ::GUID, + PdbAge: ::DWORD, +}} +pub type PMODLOAD_PDBGUID_PDBAGE = *mut MODLOAD_PDBGUID_PDBAGE; +ENUM!{enum ADDRESS_MODE { + AddrMode1616, + AddrMode1632, + AddrModeReal, + AddrModeFlat, +}} +STRUCT!{struct ADDRESS64 { + Offset: ::DWORD64, + Segment: ::WORD, + Mode: ::ADDRESS_MODE, +}} +pub type LPADDRESS64 = *mut ADDRESS64; +#[cfg(target_arch = "x86_64")] +pub type ADDRESS = ADDRESS64; +#[cfg(target_arch = "x86_64")] +pub type LPADDRESS = LPADDRESS64; +#[cfg(target_arch = "x86")] +STRUCT!{struct ADDRESS { + Offset: ::DWORD, + Segment: ::WORD, + Mode: ::ADDRESS_MODE, +}} +#[cfg(target_arch = "x86")] +pub type LPADDRESS = *mut ADDRESS; +STRUCT!{struct KDHELP64 { + Thread: ::DWORD64, + ThCallbackStack: ::DWORD, + ThCallbackBStore: ::DWORD, + NextCallback: ::DWORD, + FramePointer: ::DWORD, + KiCallUserMode: ::DWORD64, + KeUserCallbackDispatcher: ::DWORD64, + SystemRangeStart: ::DWORD64, + KiUserExceptionDispatcher: ::DWORD64, + StackBase: ::DWORD64, + StackLimit: ::DWORD64, + BuildVersion: ::DWORD, + Reserved0: ::DWORD, + Reserved1: [::DWORD64; 4], +}} +pub type PKDHELP64 = *mut KDHELP64; +#[cfg(target_arch = "x86_64")] +pub type KDHELP = KDHELP64; +#[cfg(target_arch = "x86_64")] +pub type PKDHELP = PKDHELP64; +#[cfg(target_arch = "x86")] +STRUCT!{struct KDHELP { + Thread: ::DWORD, + ThCallbackStack: ::DWORD, + NextCallback: ::DWORD, + FramePointer: ::DWORD, + KiCallUserMode: ::DWORD, + KeUserCallbackDispatcher: ::DWORD, + SystemRangeStart: ::DWORD, + ThCallbackBStore: ::DWORD, + KiUserExceptionDispatcher: ::DWORD, + StackBase: ::DWORD, + StackLimit: ::DWORD, + Reserved: [::DWORD; 5], +}} +#[cfg(target_arch = "x86")] +pub type PKDHELP = *mut KDHELP; +STRUCT!{struct STACKFRAME64 { + AddrPC: ::ADDRESS64, + AddrReturn: ::ADDRESS64, + AddrFrame: ::ADDRESS64, + AddrStack: ::ADDRESS64, + AddrBStore: ::ADDRESS64, + FuncTableEntry: ::PVOID, + Params: [::DWORD64; 4], + Far: ::BOOL, + Virtual: ::BOOL, + Reserved: [::DWORD64; 3], + KdHelp: ::KDHELP64, +}} +pub type LPSTACKFRAME64 = *mut STACKFRAME64; +pub const INLINE_FRAME_CONTEXT_INIT: ::DWORD = 0; +pub const INLINE_FRAME_CONTEXT_IGNORE: ::DWORD = 0xFFFFFFFF; +STRUCT!{struct STACKFRAME_EX { + AddrPC: ::ADDRESS64, + AddrReturn: ::ADDRESS64, + AddrFrame: ::ADDRESS64, + AddrStack: ::ADDRESS64, + AddrBStore: ::ADDRESS64, + FuncTableEntry: ::PVOID, + Params: [::DWORD64; 4], + Far: ::BOOL, + Virtual: ::BOOL, + Reserved: [::DWORD64; 3], + KdHelp: ::KDHELP64, + StackFrameSize: ::DWORD, + InlineFrameContext: ::DWORD, +}} +pub type LPSTACKFRAME_EX = *mut STACKFRAME_EX; +#[cfg(target_arch = "x86_64")] +pub type STACKFRAME = STACKFRAME64; +#[cfg(target_arch = "x86_64")] +pub type LPSTACKFRAME = LPSTACKFRAME64; +#[cfg(target_arch = "x86")] +STRUCT!{struct STACKFRAME { + AddrPC: ::ADDRESS, + AddrReturn: ::ADDRESS, + AddrFrame: ::ADDRESS, + AddrStack: ::ADDRESS, + FuncTableEntry: ::PVOID, + Params: [::DWORD; 4], + Far: ::BOOL, + Virtual: ::BOOL, + Reserved: [::DWORD; 3], + KdHelp: ::KDHELP, + AddrBStore: ::ADDRESS, +}} +#[cfg(target_arch = "x86")] +pub type LPSTACKFRAME = *mut STACKFRAME; +pub type PREAD_PROCESS_MEMORY_ROUTINE64 = Option<unsafe extern "system" fn( + hProcess: ::HANDLE, qwBaseAddress: ::DWORD64, lpBuffer: ::PVOID, nSize: ::DWORD, + lpNumberOfBytesRead: ::LPDWORD, +) -> ::BOOL>; +pub type PFUNCTION_TABLE_ACCESS_ROUTINE64 = Option<unsafe extern "system" fn( + ahProcess: ::HANDLE, AddrBase: ::DWORD64, +) -> ::PVOID>; +pub type PGET_MODULE_BASE_ROUTINE64 = Option<unsafe extern "system" fn( + hProcess: ::HANDLE, Address: ::DWORD64, +) -> ::DWORD64>; +pub type PTRANSLATE_ADDRESS_ROUTINE64 = Option<unsafe extern "system" fn( + hProcess: ::HANDLE, hThread: ::HANDLE, lpaddr: LPADDRESS64, +) -> ::DWORD64>; +pub const SYM_STKWALK_DEFAULT: ::DWORD = 0x00000000; +pub const SYM_STKWALK_FORCE_FRAMEPTR: ::DWORD = 0x00000001; +#[cfg(target_arch = "x86_64")] +pub type PREAD_PROCESS_MEMORY_ROUTINE = PREAD_PROCESS_MEMORY_ROUTINE64; +#[cfg(target_arch = "x86_64")] +pub type PFUNCTION_TABLE_ACCESS_ROUTINE = PFUNCTION_TABLE_ACCESS_ROUTINE64; +#[cfg(target_arch = "x86_64")] +pub type PGET_MODULE_BASE_ROUTINE = PGET_MODULE_BASE_ROUTINE64; +#[cfg(target_arch = "x86_64")] +pub type PTRANSLATE_ADDRESS_ROUTINE = PTRANSLATE_ADDRESS_ROUTINE64; +#[cfg(target_arch = "x86")] +pub type PREAD_PROCESS_MEMORY_ROUTINE = Option<unsafe extern "system" fn( + hProcess: ::HANDLE, qwBaseAddress: ::DWORD, lpBuffer: ::PVOID, nSize: ::DWORD, + lpNumberOfBytesRead: ::PDWORD, +) -> ::BOOL>; +#[cfg(target_arch = "x86")] +pub type PFUNCTION_TABLE_ACCESS_ROUTINE = Option<unsafe extern "system" fn( + ahProcess: ::HANDLE, AddrBase: ::DWORD, +) -> ::PVOID>; +#[cfg(target_arch = "x86")] +pub type PGET_MODULE_BASE_ROUTINE = Option<unsafe extern "system" fn( + hProcess: ::HANDLE, Address: ::DWORD, +) -> ::DWORD>; +#[cfg(target_arch = "x86")] +pub type PTRANSLATE_ADDRESS_ROUTINE = Option<unsafe extern "system" fn( + hProcess: ::HANDLE, hThread: ::HANDLE, lpaddr: LPADDRESS, +) -> ::DWORD>; +pub const API_VERSION_NUMBER: ::USHORT = 12; +STRUCT!{struct API_VERSION { + MajorVersion: ::USHORT, + MinorVersion: ::USHORT, + Revision: ::USHORT, + Reserved: ::USHORT, +}} +pub type LPAPI_VERSION = *mut API_VERSION; +STRUCT!{struct SYMBOL_INFOW { + SizeOfStruct: ::ULONG, + TypeIndex: ::ULONG, + Reserved: [::ULONG64; 2], + Index: ::ULONG, + Size: ::ULONG, + ModBase: ::ULONG64, + Flags: ::ULONG, + Value: ::ULONG64, + Address: ::ULONG64, + Register: ::ULONG, + Scope: ::ULONG, + Tag: ::ULONG, + NameLen: ::ULONG, + MaxNameLen: ::ULONG, + Name: [::WCHAR; 1], +}} +pub type PSYMBOL_INFOW = *mut SYMBOL_INFOW; +STRUCT!{struct IMAGEHLP_SYMBOL64 { + SizeOfStruct: ::DWORD, + Address: ::DWORD64, + Size: ::DWORD, + Flags: ::DWORD, + MaxNameLength: ::DWORD, + Name: [::CHAR; 1], +}} +pub type PIMAGEHLP_SYMBOL64 = *mut IMAGEHLP_SYMBOL64; +STRUCT!{struct IMAGEHLP_LINEW64 { + SizeOfStruct: ::DWORD, + Key: ::PVOID, + LineNumber: ::DWORD, + FileName: ::PWSTR, + Address: ::DWORD64, +}} +pub type PIMAGEHLP_LINEW64 = *mut IMAGEHLP_LINEW64; diff --git a/deps/winapi-0.2.6/src/dcommon.rs b/deps/winapi-0.2.6/src/dcommon.rs new file mode 100644 index 000000000..2c220e351 --- /dev/null +++ b/deps/winapi-0.2.6/src/dcommon.rs @@ -0,0 +1,18 @@ +// Copyright © 2015; Connor Hilarides +// Licensed under the MIT License <LICENSE.md> +//! Mappings for the contents of dcommon.h +ENUM!{enum DWRITE_MEASURING_MODE { + DWRITE_MEASURING_MODE_NATURAL = 0, + DWRITE_MEASURING_MODE_GDI_CLASSIC = 1, + DWRITE_MEASURING_MODE_GDI_NATURAL = 2, +}} +ENUM!{enum D2D1_ALPHA_MODE { + D2D1_ALPHA_MODE_UNKNOWN = 0, + D2D1_ALPHA_MODE_PREMULTIPLIED = 1, + D2D1_ALPHA_MODE_STRAIGHT = 2, + D2D1_ALPHA_MODE_IGNORE = 3, +}} +STRUCT!{struct D2D1_PIXEL_FORMAT { + format: ::DXGI_FORMAT, + alphaMode: D2D1_ALPHA_MODE, +}} diff --git a/deps/winapi-0.2.5/src/devpropdef.rs b/deps/winapi-0.2.6/src/devpropdef.rs similarity index 100% rename from deps/winapi-0.2.5/src/devpropdef.rs rename to deps/winapi-0.2.6/src/devpropdef.rs diff --git a/deps/winapi-0.2.5/src/docobj.rs b/deps/winapi-0.2.6/src/docobj.rs similarity index 100% rename from deps/winapi-0.2.5/src/docobj.rs rename to deps/winapi-0.2.6/src/docobj.rs diff --git a/deps/winapi-0.2.5/src/dpapi.rs b/deps/winapi-0.2.6/src/dpapi.rs similarity index 100% rename from deps/winapi-0.2.5/src/dpapi.rs rename to deps/winapi-0.2.6/src/dpapi.rs diff --git a/deps/winapi-0.2.5/src/dsgetdc.rs b/deps/winapi-0.2.6/src/dsgetdc.rs similarity index 100% rename from deps/winapi-0.2.5/src/dsgetdc.rs rename to deps/winapi-0.2.6/src/dsgetdc.rs diff --git a/deps/winapi-0.2.5/src/dsound.rs b/deps/winapi-0.2.6/src/dsound.rs similarity index 100% rename from deps/winapi-0.2.5/src/dsound.rs rename to deps/winapi-0.2.6/src/dsound.rs diff --git a/deps/winapi-0.2.5/src/dsrole.rs b/deps/winapi-0.2.6/src/dsrole.rs similarity index 100% rename from deps/winapi-0.2.5/src/dsrole.rs rename to deps/winapi-0.2.6/src/dsrole.rs diff --git a/deps/winapi-0.2.5/src/dwmapi.rs b/deps/winapi-0.2.6/src/dwmapi.rs similarity index 100% rename from deps/winapi-0.2.5/src/dwmapi.rs rename to deps/winapi-0.2.6/src/dwmapi.rs diff --git a/deps/winapi-0.2.6/src/dwrite.rs b/deps/winapi-0.2.6/src/dwrite.rs new file mode 100644 index 000000000..09bbf0d93 --- /dev/null +++ b/deps/winapi-0.2.6/src/dwrite.rs @@ -0,0 +1,1038 @@ +// Copyright © 2015, Connor Hilarides +// Licensed under the MIT License <LICENSE.md> +//! DirectX Typography Services public API definitions. +ENUM!{enum DWRITE_FONT_FILE_TYPE { + DWRITE_FONT_FILE_TYPE_UNKNOWN, + DWRITE_FONT_FILE_TYPE_CFF, + DWRITE_FONT_FILE_TYPE_TRUETYPE, + DWRITE_FONT_FILE_TYPE_TRUETYPE_COLLECTION, + DWRITE_FONT_FILE_TYPE_TYPE1_PFM, + DWRITE_FONT_FILE_TYPE_TYPE1_PFB, + DWRITE_FONT_FILE_TYPE_VECTOR, + DWRITE_FONT_FILE_TYPE_BITMAP, +}} +ENUM!{enum DWRITE_FONT_FACE_TYPE { + DWRITE_FONT_FACE_TYPE_CFF, + DWRITE_FONT_FACE_TYPE_TRUETYPE, + DWRITE_FONT_FACE_TYPE_TRUETYPE_COLLECTION, + DWRITE_FONT_FACE_TYPE_TYPE1, + DWRITE_FONT_FACE_TYPE_VECTOR, + DWRITE_FONT_FACE_TYPE_BITMAP, + DWRITE_FONT_FACE_TYPE_UNKNOWN, + DWRITE_FONT_FACE_TYPE_RAW_CFF, +}} +FLAGS!{enum DWRITE_FONT_SIMULATIONS { + DWRITE_FONT_SIMULATIONS_NONE = 0x0000, + DWRITE_FONT_SIMULATIONS_BOLD = 0x0001, + DWRITE_FONT_SIMULATIONS_OBLIQUE = 0x0002, +}} +ENUM!{enum DWRITE_FONT_WEIGHT { + DWRITE_FONT_WEIGHT_THIN = 100, + DWRITE_FONT_WEIGHT_EXTRA_LIGHT = 200, + DWRITE_FONT_WEIGHT_ULTRA_LIGHT = 200, + DWRITE_FONT_WEIGHT_LIGHT = 300, + DWRITE_FONT_WEIGHT_SEMI_LIGHT = 350, + DWRITE_FONT_WEIGHT_NORMAL = 400, + DWRITE_FONT_WEIGHT_REGULAR = 400, + DWRITE_FONT_WEIGHT_MEDIUM = 500, + DWRITE_FONT_WEIGHT_DEMI_BOLD = 600, + DWRITE_FONT_WEIGHT_SEMI_BOLD = 600, + DWRITE_FONT_WEIGHT_BOLD = 700, + DWRITE_FONT_WEIGHT_EXTRA_BOLD = 800, + DWRITE_FONT_WEIGHT_ULTRA_BOLD = 800, + DWRITE_FONT_WEIGHT_BLACK = 900, + DWRITE_FONT_WEIGHT_HEAVY = 900, + DWRITE_FONT_WEIGHT_EXTRA_BLACK = 950, + DWRITE_FONT_WEIGHT_ULTRA_BLACK = 950, +}} +ENUM!{enum DWRITE_FONT_STRETCH { + DWRITE_FONT_STRETCH_UNDEFINED = 0, + DWRITE_FONT_STRETCH_ULTRA_CONDENSED = 1, + DWRITE_FONT_STRETCH_EXTRA_CONDENSED = 2, + DWRITE_FONT_STRETCH_CONDENSED = 3, + DWRITE_FONT_STRETCH_SEMI_CONDENSED = 4, + DWRITE_FONT_STRETCH_NORMAL = 5, + DWRITE_FONT_STRETCH_MEDIUM = 5, + DWRITE_FONT_STRETCH_SEMI_EXPANDED = 6, + DWRITE_FONT_STRETCH_EXPANDED = 7, + DWRITE_FONT_STRETCH_EXTRA_EXPANDED = 8, + DWRITE_FONT_STRETCH_ULTRA_EXPANDED = 9, +}} +ENUM!{enum DWRITE_FONT_STYLE { + DWRITE_FONT_STYLE_NORMAL, + DWRITE_FONT_STYLE_OBLIQUE, + DWRITE_FONT_STYLE_ITALIC, +}} +ENUM!{enum DWRITE_INFORMATIONAL_STRING_ID { + DWRITE_INFORMATIONAL_STRING_NONE, + DWRITE_INFORMATIONAL_STRING_COPYRIGHT_NOTICE, + DWRITE_INFORMATIONAL_STRING_VERSION_STRINGS, + DWRITE_INFORMATIONAL_STRING_TRADEMARK, + DWRITE_INFORMATIONAL_STRING_MANUFACTURER, + DWRITE_INFORMATIONAL_STRING_DESIGNER, + DWRITE_INFORMATIONAL_STRING_DESIGNER_URL, + DWRITE_INFORMATIONAL_STRING_DESCRIPTION, + DWRITE_INFORMATIONAL_STRING_FONT_VENDOR_URL, + DWRITE_INFORMATIONAL_STRING_LICENSE_DESCRIPTION, + DWRITE_INFORMATIONAL_STRING_LICENSE_INFO_URL, + DWRITE_INFORMATIONAL_STRING_WIN32_FAMILY_NAMES, + DWRITE_INFORMATIONAL_STRING_WIN32_SUBFAMILY_NAMES, + DWRITE_INFORMATIONAL_STRING_PREFERRED_FAMILY_NAMES, + DWRITE_INFORMATIONAL_STRING_PREFERRED_SUBFAMILY_NAMES, + DWRITE_INFORMATIONAL_STRING_SAMPLE_TEXT, + DWRITE_INFORMATIONAL_STRING_FULL_NAME, + DWRITE_INFORMATIONAL_STRING_POSTSCRIPT_NAME, + DWRITE_INFORMATIONAL_STRING_POSTSCRIPT_CID_NAME, + DWRITE_INFORMATIONAL_STRING_WWS_FAMILY_NAME, + DWRITE_INFORMATIONAL_STRING_DESIGN_SCRIPT_LANGUAGE_TAG, + DWRITE_INFORMATIONAL_STRING_SUPPORTED_SCRIPT_LANGUAGE_TAG, +}} +STRUCT!{struct DWRITE_FONT_METRICS { + designUnitsPerEm: ::UINT16, + ascent: ::UINT16, + descent: ::UINT16, + lineGap: ::INT16, + capHeight: ::UINT16, + xHeight: ::UINT16, + underlinePosition: ::INT16, + underlineThickness: ::UINT16, + strikethroughPosition: ::INT16, + strikethroughThickness: ::UINT16, +}} +STRUCT!{struct DWRITE_GLYPH_METRICS { + leftSideBearing: ::INT32, + advanceWidth: ::UINT32, + rightSideBearing: ::INT32, + topSideBearing: ::INT32, + advanceHeight: ::UINT32, + bottomSideBearing: ::INT32, + verticalOriginY: ::INT32, +}} +STRUCT!{struct DWRITE_GLYPH_OFFSET { + advanceOffset: ::FLOAT, + ascenderOffset: ::FLOAT, +}} +ENUM!{enum DWRITE_FACTORY_TYPE { + DWRITE_FACTORY_TYPE_SHARED, + DWRITE_FACTORY_TYPE_ISOLATED, +}} +#[inline] +pub fn DWRITE_MAKE_OPENTYPE_TAG(a: u8, b: u8, c: u8, d: u8) -> u32 { + ((d as u32) << 24) | ((c as u32) << 16) | ((b as u32) << 8) | (a as u32) +} +RIDL!{interface IDWriteFontFileLoader(IDWriteFontFileLoaderVtbl): IUnknown(IUnknownVtbl) { + fn CreateStreamFromKey( + &mut self, fontFileReferenceKey: *const ::c_void, fontFileReferenceKeySize: ::UINT32, + fontFileStream: *mut *mut IDWriteFontFileStream + ) -> ::HRESULT +}} +RIDL!{interface IDWriteLocalFontFileLoader(IDWriteLocalFontFileLoaderVtbl): + IDWriteFontFileLoader(IDWriteFontFileLoaderVtbl) { + fn GetFilePathLengthFromKey( + &mut self, fontFileReferenceKey: *const ::c_void, fontFileReferenceKeySize: ::UINT32, + filePathLength: *mut ::UINT32 + ) -> ::HRESULT, + fn GetFilePathFromKey( + &mut self, fontFileReferenceKey: *const ::c_void, fontFileReferenceKeySize: ::UINT32, + filePath: *mut ::WCHAR, + filePathSize: ::UINT32 + ) -> ::HRESULT, + fn GetLastWriteTimeFromKey( + &mut self, fontFileReferenceKey: *const ::c_void, fontFileReferenceKeySize: ::UINT32, + lastWriteTime: *mut ::FILETIME + ) -> ::HRESULT +}} +RIDL!{interface IDWriteFontFileStream(IDWriteFontFileStreamVtbl): IUnknown(IUnknownVtbl) { + fn ReadFileFragment( + &mut self, fragmentStart: *mut *const ::c_void, fileOffset: ::UINT64, + fragmentSize: ::UINT64, fragmentContext: *mut *mut ::c_void + ) -> ::HRESULT, + fn ReleaseFileFragment(&mut self, fragmentContext: *mut ::c_void) -> (), + fn GetFileSize(&mut self, fileSize: *mut ::UINT64) -> ::HRESULT, + fn GetLastWriteTime(&mut self, lastWriteTime: *mut ::UINT64) -> ::HRESULT +}} +RIDL!{interface IDWriteFontFile(IDWriteFontFileVtbl): IUnknown(IUnknownVtbl) { + fn GetReferenceKey( + &mut self, fontFileReferenceKey: *mut *const ::c_void, + fontFileReferenceKeySize: *mut ::UINT32 + ) -> ::HRESULT, + fn GetLoader(&mut self, fontFileLoader: *mut *mut IDWriteFontFileLoader) -> ::HRESULT, + fn Analyze( + &mut self, isSupportedFontType: *mut ::BOOL, fontFileType: *mut DWRITE_FONT_FILE_TYPE, + fontFaceType: *mut DWRITE_FONT_FACE_TYPE, numberOfFaces: *mut ::UINT32 + ) -> ::HRESULT +}} +ENUM!{enum DWRITE_PIXEL_GEOMETRY { + DWRITE_PIXEL_GEOMETRY_FLAT, + DWRITE_PIXEL_GEOMETRY_RGB, + DWRITE_PIXEL_GEOMETRY_BGR, +}} +ENUM!{enum DWRITE_RENDERING_MODE { + DWRITE_RENDERING_MODE_DEFAULT, + DWRITE_RENDERING_MODE_ALIASED, + DWRITE_RENDERING_MODE_GDI_CLASSIC, + DWRITE_RENDERING_MODE_GDI_NATURAL, + DWRITE_RENDERING_MODE_NATURAL, + DWRITE_RENDERING_MODE_NATURAL_SYMMETRIC, + DWRITE_RENDERING_MODE_OUTLINE, + DWRITE_RENDERING_MODE_CLEARTYPE_GDI_CLASSIC = DWRITE_RENDERING_MODE_GDI_CLASSIC.0, + DWRITE_RENDERING_MODE_CLEARTYPE_GDI_NATURAL = DWRITE_RENDERING_MODE_GDI_NATURAL.0, + DWRITE_RENDERING_MODE_CLEARTYPE_NATURAL = DWRITE_RENDERING_MODE_NATURAL.0, + DWRITE_RENDERING_MODE_CLEARTYPE_NATURAL_SYMMETRIC = DWRITE_RENDERING_MODE_NATURAL_SYMMETRIC.0, +}} +STRUCT!{struct DWRITE_MATRIX { + m11: ::FLOAT, + m12: ::FLOAT, + m21: ::FLOAT, + m22: ::FLOAT, + dx: ::FLOAT, + dy: ::FLOAT, +}} +RIDL!{interface IDWriteRenderingParams(IDWriteRenderingParamsVtbl): IUnknown(IUnknownVtbl) { + fn GetGamma(&mut self) -> ::FLOAT, + fn GetEnhancedContrast(&mut self) -> ::FLOAT, + fn GetClearTypeLevel(&mut self) -> ::FLOAT, + fn GetPixelGeometry(&mut self) -> DWRITE_PIXEL_GEOMETRY, + fn GetRenderingMode(&mut self) -> DWRITE_RENDERING_MODE +}} +pub type IDWriteGeometrySink = ::ID2D1SimplifiedGeometrySink; +RIDL!{interface IDWriteFontFace(IDWriteFontFaceVtbl): IUnknown(IUnknownVtbl) { + fn GetType(&mut self) -> DWRITE_FONT_FACE_TYPE, + fn GetFiles( + &mut self, numberOfFiles: *mut ::UINT32, fontFiles: *mut *mut IDWriteFontFile + ) -> ::HRESULT, + fn GetIndex(&mut self) -> ::UINT32, + fn GetSimulations(&mut self) -> DWRITE_FONT_SIMULATIONS, + fn IsSymbolFont(&mut self) -> ::BOOL, + fn GetMetrics(&mut self, fontFaceMetrics: *mut DWRITE_FONT_METRICS) -> (), + fn GetGlyphCount(&mut self) -> ::UINT16, + fn GetDesignGlyphMetrics( + &mut self, glyphIndices: *const ::UINT16, glyphCount: ::UINT32, + glyphMetrics: *mut DWRITE_GLYPH_METRICS, isSideways: ::BOOL + ) -> ::HRESULT, + fn GetGlyphIndices( + &mut self, codePoints: *const ::UINT32, codePointCount: ::UINT32, + glyphIndices: *mut ::UINT16 + ) -> ::HRESULT, + fn TryGetFontTable( + &mut self, openTypeTableTag: ::UINT32, tableData: *mut *const ::c_void, + tableSize: *mut ::UINT32, tableContext: *mut *mut ::c_void, exists: *mut ::BOOL + ) -> ::HRESULT, + fn ReleaseFontTable( + &mut self, tableContext: *mut ::c_void + ) -> ::HRESULT, + fn GetGlyphRunOutline( + &mut self, emSize: ::FLOAT, glyphIndices: *const ::UINT16, glyphAdvances: *const ::FLOAT, + glyphOffsets: *const DWRITE_GLYPH_OFFSET, glyphCount: ::UINT32, isSideways: ::BOOL, + isRightToLeft: ::BOOL, geometrySink: *mut IDWriteGeometrySink + ) -> ::HRESULT, + fn GetRecommendedRenderingMode( + &mut self, emSize: ::FLOAT, pixelsPerDip: ::FLOAT, measuringMode: ::DWRITE_MEASURING_MODE, + renderingParams: *mut IDWriteRenderingParams, renderingMode: *mut DWRITE_RENDERING_MODE + ) -> ::HRESULT, + fn GetGdiCompatibleMetrics( + &mut self, emSize: ::FLOAT, pixelsPerDip: ::FLOAT, transform: *const DWRITE_MATRIX, + fontFaceMetrics: *mut DWRITE_FONT_METRICS + ) -> ::HRESULT, + fn GetGdiCompatibleGlyphMetrics( + &mut self, enSize: ::FLOAT, pixelsPerDip: ::FLOAT, transform: *const DWRITE_MATRIX, + useGdiNatrual: ::BOOL, glyphIndices: *const ::UINT16, glyphCount: ::UINT32, + glyphMetrics: *mut DWRITE_GLYPH_METRICS, isSideways: ::BOOL + ) -> ::HRESULT +}} +RIDL!{interface IDWriteFontCollectionLoader(IDWriteFontCollectionLoaderVtbl): + IUnknown(IUnknownVtbl) { + fn CreateEnumeratorFromKey( + &mut self, factory: *mut IDWriteFactory, collectionKey: *const ::c_void, + collectionKeySize: ::UINT32, fontFileEnumerator: *mut *mut IDWriteFontFileEnumerator + ) -> ::HRESULT +}} +RIDL!{interface IDWriteFontFileEnumerator(IDWriteFontFileEnumeratorVtbl): IUnknown(IUnknownVtbl) { + fn MoveNext(&mut self, hasCurrentFile: *mut ::BOOL) -> ::HRESULT, + fn GetCurrentFontFile(&mut self, fontFile: *mut *mut IDWriteFontFile) -> ::HRESULT +}} +RIDL!{interface IDWriteLocalizedStrings(IDWriteLocalizedStringsVtbl): IUnknown(IUnknownVtbl) { + fn GetCount(&mut self) -> ::UINT32, + fn FindLocaleName( + &mut self, localeName: *const ::WCHAR, index: *mut ::UINT32, exists: *mut ::BOOL + ) -> ::HRESULT, + fn GetLocaleNameLength(&mut self, index: ::UINT32, length: *mut ::UINT32) -> ::HRESULT, + fn GetLocaleName( + &mut self, index: ::UINT32, localeName: *mut ::WCHAR, size: ::UINT32 + ) -> ::HRESULT, + fn GetStringLength(&mut self, index: ::UINT32, length: *mut ::UINT32) -> ::HRESULT, + fn GetString( + &mut self, index: ::UINT32, stringBuffer: *mut ::WCHAR, size: ::UINT32 + ) -> ::HRESULT +}} +RIDL!{interface IDWriteFontCollection(IDWriteFontCollectionVtbl): IUnknown(IUnknownVtbl) { + fn GetFontFamilyCount(&mut self) -> ::UINT32, + fn GetFontFamily( + &mut self, index: ::UINT32, fontFamily: *mut *mut IDWriteFontFamily + ) -> ::HRESULT, + fn FindFamilyName( + &mut self, familyName: *const ::WCHAR, index: *mut ::UINT32, exists: *mut ::BOOL + ) -> ::HRESULT, + fn GetFontFromFontFace( + &mut self, fontFace: *mut IDWriteFontFace, font: *mut *mut IDWriteFont + ) -> ::HRESULT +}} +RIDL!{interface IDWriteFontList(IDWriteFontListVtbl): IUnknown(IUnknownVtbl) { + fn GetFontCollection(&mut self, fontCollection: *mut *mut IDWriteFontCollection) -> ::HRESULT, + fn GetFontCount(&mut self) -> ::UINT32, + fn GetFont(&mut self, index: ::UINT32, font: *mut *mut IDWriteFont) -> ::HRESULT +}} +RIDL!{interface IDWriteFontFamily(IDWriteFontFamilyVtbl): IDWriteFontList(IDWriteFontListVtbl) { + fn GetFamilyNames(&mut self, names: *mut *mut IDWriteLocalizedStrings) -> ::HRESULT, + fn GetFirstMatchingFont( + &mut self, weight: DWRITE_FONT_WEIGHT, stretch: DWRITE_FONT_STRETCH, + style: DWRITE_FONT_STYLE, matchingFont: *mut *mut IDWriteFont + ) -> ::HRESULT, + fn GetMatchingFonts( + &mut self, weight: DWRITE_FONT_WEIGHT, stretch: DWRITE_FONT_STRETCH, + style: DWRITE_FONT_STYLE, matchingFonts: *mut *mut IDWriteFontList + ) -> ::HRESULT +}} +RIDL!{interface IDWriteFont(IDWriteFontVtbl): IUnknown(IUnknownVtbl) { + fn GetFontFamily(&mut self, fontFamily: *mut *mut IDWriteFontFamily) -> ::HRESULT, + fn GetWeight(&mut self) -> DWRITE_FONT_WEIGHT, + fn GetStretch(&mut self) -> DWRITE_FONT_STRETCH, + fn GetStyle(&mut self) -> DWRITE_FONT_STYLE, + fn IsSymbolFont(&mut self) -> ::BOOL, + fn GetFaceNames(&mut self, names: *mut *mut IDWriteLocalizedStrings) -> ::HRESULT, + fn GetInformationalStrings( + &mut self, informationalStringId: DWRITE_INFORMATIONAL_STRING_ID, + informationalStrings: *mut *mut IDWriteLocalizedStrings, exists: *mut ::BOOL + ) -> ::HRESULT, + fn GetSimulations(&mut self) -> DWRITE_FONT_SIMULATIONS, + fn GetMetrics(&mut self, fontMetrics: *mut DWRITE_FONT_METRICS) -> (), + fn HasCharacter(&mut self, unicodeValue: ::UINT32, exists: *mut ::BOOL) -> ::HRESULT, + fn CreateFontFace(&mut self, fontFace: *mut *mut IDWriteFontFace) -> ::HRESULT +}} +ENUM!{enum DWRITE_READING_DIRECTION { + DWRITE_READING_DIRECTION_LEFT_TO_RIGHT = 0, + DWRITE_READING_DIRECTION_RIGHT_TO_LEFT = 1, + DWRITE_READING_DIRECTION_TOP_TO_BOTTOM = 2, + DWRITE_READING_DIRECTION_BOTTOM_TO_TOP = 3, +}} +ENUM!{enum DWRITE_FLOW_DIRECTION { + DWRITE_FLOW_DIRECTION_TOP_TO_BOTTOM = 0, + DWRITE_FLOW_DIRECTION_BOTTOM_TO_TOP = 1, + DWRITE_FLOW_DIRECTION_LEFT_TO_RIGHT = 2, + DWRITE_FLOW_DIRECTION_RIGHT_TO_LEFT = 3, +}} +ENUM!{enum DWRITE_TEXT_ALIGNMENT { + DWRITE_TEXT_ALIGNMENT_LEADING, + DWRITE_TEXT_ALIGNMENT_TRAILING, + DWRITE_TEXT_ALIGNMENT_CENTER, + DWRITE_TEXT_ALIGNMENT_JUSTIFIED, +}} +ENUM!{enum DWRITE_PARAGRAPH_ALIGNMENT { + DWRITE_PARAGRAPH_ALIGNMENT_NEAR, + DWRITE_PARAGRAPH_ALIGNMENT_FAR, + DWRITE_PARAGRAPH_ALIGNMENT_CENTER, +}} +ENUM!{enum DWRITE_WORD_WRAPPING { + DWRITE_WORD_WRAPPING_WRAP = 0, + DWRITE_WORD_WRAPPING_NO_WRAP = 1, + DWRITE_WORD_WRAPPING_EMERGENCY_BREAK = 2, + DWRITE_WORD_WRAPPING_WHOLE_WORD = 3, + DWRITE_WORD_WRAPPING_CHARACTER = 4, +}} +ENUM!{enum DWRITE_LINE_SPACING_METHOD { + DWRITE_LINE_SPACING_METHOD_DEFAULT, + DWRITE_LINE_SPACING_METHOD_UNIFORM, + DWRITE_LINE_SPACING_METHOD_PROPORTIONAL, +}} +ENUM!{enum DWRITE_TRIMMING_GRANULARITY { + DWRITE_TRIMMING_GRANULARITY_NONE, + DWRITE_TRIMMING_GRANULARITY_CHARACTER, + DWRITE_TRIMMING_GRANULARITY_WORD, +}} +ENUM!{enum DWRITE_FONT_FEATURE_TAG { + DWRITE_FONT_FEATURE_TAG_ALTERNATIVE_FRACTIONS = 0x63726661, // 'afrc' + DWRITE_FONT_FEATURE_TAG_PETITE_CAPITALS_FROM_CAPITALS = 0x63703263, // 'c2pc' + DWRITE_FONT_FEATURE_TAG_SMALL_CAPITALS_FROM_CAPITALS = 0x63733263, // 'c2sc' + DWRITE_FONT_FEATURE_TAG_CONTEXTUAL_ALTERNATES = 0x746c6163, // 'calt' + DWRITE_FONT_FEATURE_TAG_CASE_SENSITIVE_FORMS = 0x65736163, // 'case' + DWRITE_FONT_FEATURE_TAG_GLYPH_COMPOSITION_DECOMPOSITION = 0x706d6363, // 'ccmp' + DWRITE_FONT_FEATURE_TAG_CONTEXTUAL_LIGATURES = 0x67696c63, // 'clig' + DWRITE_FONT_FEATURE_TAG_CAPITAL_SPACING = 0x70737063, // 'cpsp' + DWRITE_FONT_FEATURE_TAG_CONTEXTUAL_SWASH = 0x68777363, // 'cswh' + DWRITE_FONT_FEATURE_TAG_CURSIVE_POSITIONING = 0x73727563, // 'curs' + DWRITE_FONT_FEATURE_TAG_DEFAULT = 0x746c6664, // 'dflt' + DWRITE_FONT_FEATURE_TAG_DISCRETIONARY_LIGATURES = 0x67696c64, // 'dlig' + DWRITE_FONT_FEATURE_TAG_EXPERT_FORMS = 0x74707865, // 'expt' + DWRITE_FONT_FEATURE_TAG_FRACTIONS = 0x63617266, // 'frac' + DWRITE_FONT_FEATURE_TAG_FULL_WIDTH = 0x64697766, // 'fwid' + DWRITE_FONT_FEATURE_TAG_HALF_FORMS = 0x666c6168, // 'half' + DWRITE_FONT_FEATURE_TAG_HALANT_FORMS = 0x6e6c6168, // 'haln' + DWRITE_FONT_FEATURE_TAG_ALTERNATE_HALF_WIDTH = 0x746c6168, // 'halt' + DWRITE_FONT_FEATURE_TAG_HISTORICAL_FORMS = 0x74736968, // 'hist' + DWRITE_FONT_FEATURE_TAG_HORIZONTAL_KANA_ALTERNATES = 0x616e6b68, // 'hkna' + DWRITE_FONT_FEATURE_TAG_HISTORICAL_LIGATURES = 0x67696c68, // 'hlig' + DWRITE_FONT_FEATURE_TAG_HALF_WIDTH = 0x64697768, // 'hwid' + DWRITE_FONT_FEATURE_TAG_HOJO_KANJI_FORMS = 0x6f6a6f68, // 'hojo' + DWRITE_FONT_FEATURE_TAG_JIS04_FORMS = 0x3430706a, // 'jp04' + DWRITE_FONT_FEATURE_TAG_JIS78_FORMS = 0x3837706a, // 'jp78' + DWRITE_FONT_FEATURE_TAG_JIS83_FORMS = 0x3338706a, // 'jp83' + DWRITE_FONT_FEATURE_TAG_JIS90_FORMS = 0x3039706a, // 'jp90' + DWRITE_FONT_FEATURE_TAG_KERNING = 0x6e72656b, // 'kern' + DWRITE_FONT_FEATURE_TAG_STANDARD_LIGATURES = 0x6167696c, // 'liga' + DWRITE_FONT_FEATURE_TAG_LINING_FIGURES = 0x6d756e6c, // 'lnum' + DWRITE_FONT_FEATURE_TAG_LOCALIZED_FORMS = 0x6c636f6c, // 'locl' + DWRITE_FONT_FEATURE_TAG_MARK_POSITIONING = 0x6b72616d, // 'mark' + DWRITE_FONT_FEATURE_TAG_MATHEMATICAL_GREEK = 0x6b72676d, // 'mgrk' + DWRITE_FONT_FEATURE_TAG_MARK_TO_MARK_POSITIONING = 0x6b6d6b6d, // 'mkmk' + DWRITE_FONT_FEATURE_TAG_ALTERNATE_ANNOTATION_FORMS = 0x746c616e, // 'nalt' + DWRITE_FONT_FEATURE_TAG_NLC_KANJI_FORMS = 0x6b636c6e, // 'nlck' + DWRITE_FONT_FEATURE_TAG_OLD_STYLE_FIGURES = 0x6d756e6f, // 'onum' + DWRITE_FONT_FEATURE_TAG_ORDINALS = 0x6e64726f, // 'ordn' + DWRITE_FONT_FEATURE_TAG_PROPORTIONAL_ALTERNATE_WIDTH = 0x746c6170, // 'palt' + DWRITE_FONT_FEATURE_TAG_PETITE_CAPITALS = 0x70616370, // 'pcap' + DWRITE_FONT_FEATURE_TAG_PROPORTIONAL_FIGURES = 0x6d756e70, // 'pnum' + DWRITE_FONT_FEATURE_TAG_PROPORTIONAL_WIDTHS = 0x64697770, // 'pwid' + DWRITE_FONT_FEATURE_TAG_QUARTER_WIDTHS = 0x64697771, // 'qwid' + DWRITE_FONT_FEATURE_TAG_REQUIRED_LIGATURES = 0x67696c72, // 'rlig' + DWRITE_FONT_FEATURE_TAG_RUBY_NOTATION_FORMS = 0x79627572, // 'ruby' + DWRITE_FONT_FEATURE_TAG_STYLISTIC_ALTERNATES = 0x746c6173, // 'salt' + DWRITE_FONT_FEATURE_TAG_SCIENTIFIC_INFERIORS = 0x666e6973, // 'sinf' + DWRITE_FONT_FEATURE_TAG_SMALL_CAPITALS = 0x70636d73, // 'smcp' + DWRITE_FONT_FEATURE_TAG_SIMPLIFIED_FORMS = 0x6c706d73, // 'smpl' + DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_1 = 0x31307373, // 'ss01' + DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_2 = 0x32307373, // 'ss02' + DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_3 = 0x33307373, // 'ss03' + DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_4 = 0x34307373, // 'ss04' + DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_5 = 0x35307373, // 'ss05' + DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_6 = 0x36307373, // 'ss06' + DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_7 = 0x37307373, // 'ss07' + DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_8 = 0x38307373, // 'ss08' + DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_9 = 0x39307373, // 'ss09' + DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_10 = 0x30317373, // 'ss10' + DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_11 = 0x31317373, // 'ss11' + DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_12 = 0x32317373, // 'ss12' + DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_13 = 0x33317373, // 'ss13' + DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_14 = 0x34317373, // 'ss14' + DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_15 = 0x35317373, // 'ss15' + DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_16 = 0x36317373, // 'ss16' + DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_17 = 0x37317373, // 'ss17' + DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_18 = 0x38317373, // 'ss18' + DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_19 = 0x39317373, // 'ss19' + DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_20 = 0x30327373, // 'ss20' + DWRITE_FONT_FEATURE_TAG_SUBSCRIPT = 0x73627573, // 'subs' + DWRITE_FONT_FEATURE_TAG_SUPERSCRIPT = 0x73707573, // 'sups' + DWRITE_FONT_FEATURE_TAG_SWASH = 0x68737773, // 'swsh' + DWRITE_FONT_FEATURE_TAG_TITLING = 0x6c746974, // 'titl' + DWRITE_FONT_FEATURE_TAG_TRADITIONAL_NAME_FORMS = 0x6d616e74, // 'tnam' + DWRITE_FONT_FEATURE_TAG_TABULAR_FIGURES = 0x6d756e74, // 'tnum' + DWRITE_FONT_FEATURE_TAG_TRADITIONAL_FORMS = 0x64617274, // 'trad' + DWRITE_FONT_FEATURE_TAG_THIRD_WIDTHS = 0x64697774, // 'twid' + DWRITE_FONT_FEATURE_TAG_UNICASE = 0x63696e75, // 'unic' + DWRITE_FONT_FEATURE_TAG_VERTICAL_WRITING = 0x74726576, // 'vert' + DWRITE_FONT_FEATURE_TAG_VERTICAL_ALTERNATES_AND_ROTATION = 0x32747276, // 'vrt2' + DWRITE_FONT_FEATURE_TAG_SLASHED_ZERO = 0x6f72657a, // 'zero' +}} +STRUCT!{struct DWRITE_TEXT_RANGE { + startPosition: ::UINT32, + length: ::UINT32, +}} +STRUCT!{struct DWRITE_FONT_FEATURE { + nameTag: DWRITE_FONT_FEATURE_TAG, + parameter: ::UINT32, +}} +STRUCT!{struct DWRITE_TYPOGRAPHIC_FEATURES { + features: *mut DWRITE_FONT_FEATURE, + featureCount: ::UINT32, +}} +STRUCT!{struct DWRITE_TRIMMING { + granularity: DWRITE_TRIMMING_GRANULARITY, + delimiter: ::UINT32, + delimiterCount: ::UINT32, +}} +RIDL!{interface IDWriteTextFormat(IDWriteTextFormatVtbl): IUnknown(IUnknownVtbl) { + fn SetTextAlignment(&mut self, textAlignment: DWRITE_TEXT_ALIGNMENT) -> ::HRESULT, + fn SetParagraphAlignment( + &mut self, paragraphAlignment: DWRITE_PARAGRAPH_ALIGNMENT + ) -> ::HRESULT, + fn SetWordWrapping(&mut self, wordWrapping: DWRITE_WORD_WRAPPING) -> ::HRESULT, + fn SetReadingDirection(&mut self, readingDirection: DWRITE_READING_DIRECTION) -> ::HRESULT, + fn SetFlowDirection(&mut self, flowDirection: DWRITE_FLOW_DIRECTION) -> ::HRESULT, + fn SetIncrementalTabStop(&mut self, incrementalTabStop: ::FLOAT) -> ::HRESULT, + fn SetTrimming( + &mut self, trimmingOptions: *const DWRITE_TRIMMING, trimmingSign: *mut IDWriteInlineObject + ) -> ::HRESULT, + fn SetLineSpacing( + &mut self, lineSpacingMethod: DWRITE_LINE_SPACING_METHOD, lineSpacing: ::FLOAT, + baseLine: ::FLOAT + ) -> ::HRESULT, + fn GetTextAlignment(&mut self) -> DWRITE_TEXT_ALIGNMENT, + fn GetParagraphAlignment(&mut self) -> DWRITE_PARAGRAPH_ALIGNMENT, + fn GetWordWrapping(&mut self) -> DWRITE_WORD_WRAPPING, + fn GetReadingDirection(&mut self) -> DWRITE_READING_DIRECTION, + fn GetFlowDirection(&mut self) -> DWRITE_FLOW_DIRECTION, + fn GetIncrementalTabStop(&mut self) -> ::FLOAT, + fn GetTrimming( + &mut self, trimmingOptions: *mut DWRITE_TRIMMING, + trimmingSign: *mut *mut IDWriteInlineObject + ) -> ::HRESULT, + fn GetLineSpacing( + &mut self, lineSpacingMethod: *mut DWRITE_LINE_SPACING_METHOD, lineSpacing: *mut ::FLOAT, + baseline: *mut ::FLOAT + ) -> ::HRESULT, + fn GetFontCollection(&mut self, fontCollection: *mut *mut IDWriteFontCollection) -> ::HRESULT, + fn GetFontFamilyNameLength(&mut self) -> ::UINT32, + fn GetFontFamilyName(&mut self, fontFamilyName: *mut ::WCHAR, nameSize: ::UINT32) -> ::HRESULT, + fn GetFontWeight(&mut self) -> DWRITE_FONT_WEIGHT, + fn GetFontStyle(&mut self) -> DWRITE_FONT_STYLE, + fn GetFontStretch(&mut self) -> DWRITE_FONT_STRETCH, + fn GetFontSize(&mut self) -> ::FLOAT, + fn GetLocaleNameLength(&mut self) -> ::UINT32, + fn GetLocaleName(&mut self, localeName: *mut ::WCHAR, nameSize: ::UINT32) -> ::HRESULT +}} +RIDL!{interface IDWriteTypography(IDWriteTypographyVtbl): IUnknown(IUnknownVtbl) { + fn AddFontFeature(&mut self, fontFeature: DWRITE_FONT_FEATURE) -> ::HRESULT, + fn GetFontFeatureCount(&mut self) -> ::UINT32, + fn GetFontFeature( + &mut self, fontFeatureIndex: ::UINT32, fontFeature: *mut DWRITE_FONT_FEATURE + ) -> ::HRESULT +}} +FLAGS!{enum DWRITE_SCRIPT_SHAPES { + DWRITE_SCRIPT_SHAPES_DEFAULT = 0, + DWRITE_SCRIPT_SHAPES_NO_VISUAL = 1, +}} +STRUCT!{struct DWRITE_SCRIPT_ANALYSIS { + script: ::UINT16, + shapes: DWRITE_SCRIPT_SHAPES, +}} +ENUM!{enum DWRITE_BREAK_CONDITION { + DWRITE_BREAK_CONDITION_NEUTRAL, + DWRITE_BREAK_CONDITION_CAN_BREAK, + DWRITE_BREAK_CONDITION_MAY_NOT_BREAK, + DWRITE_BREAK_CONDITION_MUST_BREAK, +}} +STRUCT!{struct DWRITE_LINE_BREAKPOINT { + bit_fields: ::UINT8, +}} +BITFIELD!{DWRITE_LINE_BREAKPOINT bit_fields: ::UINT8 [ + breakConditionBefore set_breakConditionBefore[0..2], + breakConditionAfter set_breakConditionAfter[2..4], + isWhitespace set_isWhitespace[4..5], + isSoftHyphen set_isSoftHyphen[5..6], + padding set_padding[6..8], +]} +ENUM!{enum DWRITE_NUMBER_SUBSTITUTION_METHOD { + DWRITE_NUMBER_SUBSTITUTION_METHOD_FROM_CULTURE, + DWRITE_NUMBER_SUBSTITUTION_METHOD_CONTEXTUAL, + DWRITE_NUMBER_SUBSTITUTION_METHOD_NONE, + DWRITE_NUMBER_SUBSTITUTION_METHOD_NATIONAL, + DWRITE_NUMBER_SUBSTITUTION_METHOD_TRADITIONAL, +}} +RIDL!{interface IDWriteNumberSubstitution(IDWriteNumberSubstitutionVtbl): IUnknown(IUnknownVtbl) { +}} +STRUCT!{struct DWRITE_SHAPING_TEXT_PROPERTIES { + bit_fields: ::UINT16, +}} +BITFIELD!{DWRITE_SHAPING_TEXT_PROPERTIES bit_fields: ::UINT16 [ + isShapedAlone set_isShapedAlone[0..1], + reserved set_reserved[1..16], +]} +STRUCT!{struct DWRITE_SHAPING_GLYPH_PROPERTIES { + bit_fields: ::UINT16, +}} +BITFIELD!{DWRITE_SHAPING_GLYPH_PROPERTIES bit_fields: ::UINT16 [ + justification set_justification[0..4], + isClusterStart set_isClusterStart[4..5], + isDiacritic set_isDiacritic[5..6], + isZeroWidthSpace set_isZeroWidthSpace[6..7], + reserved set_reserved[7..16], +]} +RIDL!{interface IDWriteTextAnalysisSource(IDWriteTextAnalysisSourceVtbl): IUnknown(IUnknownVtbl) { + fn GetTextAtPosition( + &mut self, textPosition: ::UINT32, textString: *mut *const ::WCHAR, + textLength: *mut ::UINT32 + ) -> ::HRESULT, + fn GetTextBeforePosition( + &mut self, textPosition: ::UINT32, textString: *mut *const ::WCHAR, + textLength: *mut ::UINT32 + ) -> ::HRESULT, + fn GetParagraphReadingDirection(&mut self) -> DWRITE_READING_DIRECTION, + fn GetLocaleName( + &mut self, textPosition: ::UINT32, textLength: *mut ::UINT32, + localeName: *mut *const ::WCHAR + ) -> ::HRESULT, + fn GetNumberSubstitution( + &mut self, textPosition: ::UINT32, textLength: *mut ::UINT32, + numberSubstitution: *mut *mut IDWriteNumberSubstitution + ) -> ::HRESULT +}} +RIDL!{interface IDWriteTextAnalysisSink(IDWriteTextAnalysisSinkVtbl): IUnknown(IUnknownVtbl) { + fn SetScriptAnalysis( + &mut self, textPosition: ::UINT32, textLength: ::UINT32, + scriptAnalysis: *const DWRITE_SCRIPT_ANALYSIS + ) -> ::HRESULT, + fn SetLineBreakpoints( + &mut self, textPosition: ::UINT32, textLength: ::UINT32, + lineBreakpoints: *const DWRITE_LINE_BREAKPOINT + ) -> ::HRESULT, + fn SetBidiLevel( + &mut self, textPosition: ::UINT32, textLength: ::UINT32, explicitLevel: ::UINT8, + resolvedLevel: ::UINT8 + ) -> ::HRESULT, + fn SetNumberSubstitution( + &mut self, textPosition: ::UINT32, textLength: ::UINT32, + numberSubstitution: *mut IDWriteNumberSubstitution + ) -> ::HRESULT +}} +RIDL!{interface IDWriteTextAnalyzer(IDWriteTextAnalyzerVtbl): IUnknown(IUnknownVtbl) { + fn AnalyzeScript( + &mut self, analysisSource: *mut IDWriteTextAnalysisSource, textPosition: ::UINT32, + textLength: ::UINT32, analysisSink: *mut IDWriteTextAnalysisSink + ) -> ::HRESULT, + fn AnalyzeBidi( + &mut self, analysisSource: *mut IDWriteTextAnalysisSource, textPosition: ::UINT32, + textLength: ::UINT32, analysisSink: *mut IDWriteTextAnalysisSink + ) -> ::HRESULT, + fn AnalyzeNumberSubstitution( + &mut self, analysisSource: *mut IDWriteTextAnalysisSource, textPosition: ::UINT32, + textLength: ::UINT32, analysisSink: *mut IDWriteTextAnalysisSink + ) -> ::HRESULT, + fn AnalyzeLineBreakpoints( + &mut self, analysisSource: *mut IDWriteTextAnalysisSource, textPosition: ::UINT32, + textLength: ::UINT32, analysisSink: *mut IDWriteTextAnalysisSink + ) -> ::HRESULT, + fn GetGlyphs( + &mut self, textString: *const ::WCHAR, textLength: ::UINT32, + fontFace: *mut IDWriteFontFace, isSideways: ::BOOL, isRightToLeft: ::BOOL, + scriptAnalysis: *const DWRITE_SCRIPT_ANALYSIS, localeName: *const ::WCHAR, + numberSubstitution: *mut IDWriteNumberSubstitution, + features: *mut *const DWRITE_TYPOGRAPHIC_FEATURES, featureRangeLengths: *const ::UINT32, + featureRanges: ::UINT32, maxGlyphCount: ::UINT32, clusterMap: *mut ::UINT16, + textProps: *mut DWRITE_SHAPING_TEXT_PROPERTIES, glyphIndices: *mut ::UINT16, + glyphProps: *mut DWRITE_SHAPING_GLYPH_PROPERTIES, actualGlyphCount: *mut ::UINT32 + ) -> ::HRESULT, + fn GetGlyphPlacements( + &mut self, textString: *const ::WCHAR, clusterMap: *const ::UINT16, + textProps: *mut DWRITE_SHAPING_TEXT_PROPERTIES, textLength: ::UINT32, + glyphIndices: *const ::UINT16, glyphProps: *const DWRITE_SHAPING_GLYPH_PROPERTIES, + glyphCount: ::UINT32, fontFace: *mut IDWriteFontFace, fontEmSize: ::FLOAT, + isSideways: ::BOOL, isRightToLeft: ::BOOL, scriptAnalysis: *const DWRITE_SCRIPT_ANALYSIS, + localeName: *const ::WCHAR, features: *mut *const DWRITE_TYPOGRAPHIC_FEATURES, + featureRangeLengths: *const ::UINT32, featureRanges: ::UINT32, glyphAdvances: *mut ::FLOAT, + glyphOffsets: *mut DWRITE_GLYPH_OFFSET + ) -> ::HRESULT, + fn GetGdiCompatibleGlyphPlacements( + &mut self, textString: *const ::WCHAR, clusterMap: *const ::UINT16, + textProps: *mut DWRITE_SHAPING_TEXT_PROPERTIES, textLength: ::UINT32, + glyphIndices: *const ::UINT16, glyphProps: *const DWRITE_SHAPING_GLYPH_PROPERTIES, + glyphCount: ::UINT32, fontFace: *mut IDWriteFontFace, fontEmSize: ::FLOAT, + pixelsPerDip: ::FLOAT, transform: *const DWRITE_MATRIX, useGdiNatrual: ::BOOL, + isSideways: ::BOOL, isRightToLeft: ::BOOL, scriptAnalysis: *const DWRITE_SCRIPT_ANALYSIS, + localeName: *const ::WCHAR, features: *mut *const DWRITE_TYPOGRAPHIC_FEATURES, + featureRangeLengths: *const ::UINT32, featureRanges: ::UINT32, glyphAdvances: *mut ::FLOAT, + glyphOffsets: *mut DWRITE_GLYPH_OFFSET + ) -> ::HRESULT +}} +STRUCT!{struct DWRITE_GLYPH_RUN { + fontFace: *mut IDWriteFontFace, + fontEmSize: ::FLOAT, + glyphCount: ::UINT32, + glyphIndices: *const ::UINT16, + glyphAdvances: *const ::FLOAT, + glyphOffsets: *const DWRITE_GLYPH_OFFSET, + isSideways: ::BOOL, + bidiLevel: ::UINT32, +}} +STRUCT!{struct DWRITE_GLYPH_RUN_DESCRIPTION { + localeName: *const ::WCHAR, + string: *const ::WCHAR, + stringLength: ::UINT32, + clusterMap: *const ::UINT16, + textPosition: ::UINT32, +}} +STRUCT!{struct DWRITE_UNDERLINE { + width: ::FLOAT, + thickness: ::FLOAT, + offset: ::FLOAT, + runHeight: ::FLOAT, + readingDirection: DWRITE_READING_DIRECTION, + flowDirection: DWRITE_FLOW_DIRECTION, + localeName: *const ::WCHAR, + measuringMode: ::DWRITE_MEASURING_MODE, +}} +STRUCT!{struct DWRITE_STRIKETHROUGH { + width: ::FLOAT, + thickness: ::FLOAT, + offset: ::FLOAT, + readingDirection: DWRITE_READING_DIRECTION, + flowDirection: DWRITE_FLOW_DIRECTION, + localeName: *const ::WCHAR, + measuringMode: ::DWRITE_MEASURING_MODE, +}} +STRUCT!{struct DWRITE_LINE_METRICS { + length: ::UINT32, + trailingWhitespaceLength: ::UINT32, + newlineLength: ::UINT32, + height: ::FLOAT, + baseline: ::FLOAT, + isTrimmed: ::BOOL, +}} +STRUCT!{struct DWRITE_CLUSTER_METRICS { + width: ::FLOAT, + length: ::UINT16, + bit_fields: ::UINT16, +}} +BITFIELD!{DWRITE_CLUSTER_METRICS bit_fields: ::UINT16 [ + canWrapLineAfter set_canWrapLineAfter[0..1], + isWhitespace set_isWhitespace[1..2], + isNewline set_isNewline[2..3], + isSoftHyphen set_isSoftHyphen[3..4], + isRightToLeft set_isRightToLeft[4..5], + padding set_padding[5..16], +]} +STRUCT!{struct DWRITE_TEXT_METRICS { + left: ::FLOAT, + top: ::FLOAT, + width: ::FLOAT, + widthIncludingTrailingWhitespace: ::FLOAT, + height: ::FLOAT, + layoutWidth: ::FLOAT, + layoutHeight: ::FLOAT, + maxBidiReorderingDepth: ::UINT32, + lineCount: ::UINT32, +}} +STRUCT!{struct DWRITE_INLINE_OBJECT_METRICS { + width: ::FLOAT, + height: ::FLOAT, + baseline: ::FLOAT, + supportsSideways: ::BOOL, +}} +STRUCT!{struct DWRITE_OVERHANG_METRICS { + left: ::FLOAT, + top: ::FLOAT, + right: ::FLOAT, + bottom: ::FLOAT, +}} +STRUCT!{struct DWRITE_HIT_TEST_METRICS { + textPosition: ::UINT32, + length: ::UINT32, + left: ::FLOAT, + top: ::FLOAT, + width: ::FLOAT, + height: ::FLOAT, + bidiLevel: ::UINT32, + isText: ::BOOL, + isTrimmed: ::BOOL, +}} +RIDL!{interface IDWriteInlineObject(IDWriteInlineObjectVtbl): IUnknown(IUnknownVtbl) { + fn Draw( + &mut self, clientDrawingContext: *mut ::c_void, renderer: *mut IDWriteTextRenderer, + originX: ::FLOAT, originY: ::FLOAT, isSideways: ::BOOL, isRightToLeft: ::BOOL, + clientDrawingEffect: *mut ::IUnknown + ) -> ::HRESULT, + fn GetMetrics(&mut self, metrics: *mut DWRITE_INLINE_OBJECT_METRICS) -> ::HRESULT, + fn GetOverhangMetrics(&mut self, overhangs: *mut DWRITE_OVERHANG_METRICS) -> ::HRESULT, + fn GetBreakConditions( + &mut self, breakConditionBefore: *mut DWRITE_BREAK_CONDITION, + breakConditionAfter: *mut DWRITE_BREAK_CONDITION + ) -> ::HRESULT +}} +RIDL!{interface IDWritePixelSnapping(IDWritePixelSnappingVtbl): IUnknown(IUnknownVtbl) { + fn IsPixelSnappingDisabled( + &mut self, clientDrawingContext: *mut ::c_void, isDisabled: *mut ::BOOL + ) -> ::HRESULT, + fn GetCurrentTransform( + &mut self, clientDrawingContext: *mut ::c_void, transform: *mut DWRITE_MATRIX + ) -> ::HRESULT, + fn GetPixelsPerDip( + &mut self, clientDrawingContext: *mut ::c_void, pixelsPerDip: *mut ::FLOAT + ) -> ::HRESULT +}} +RIDL!{interface IDWriteTextRenderer(IDWriteTextRendererVtbl): + IDWritePixelSnapping(IDWritePixelSnappingVtbl) { + fn DrawGlyphRun( + &mut self, clientDrawingContext: *mut ::c_void, baselineOriginX: ::FLOAT, + baselineOriginY: ::FLOAT, measuringMode: ::DWRITE_MEASURING_MODE, + glyphRun: *const DWRITE_GLYPH_RUN, + glyphRunDescription: *const DWRITE_GLYPH_RUN_DESCRIPTION, + clientDrawingEffect: *mut ::IUnknown + ) -> ::HRESULT, + fn DrawUnderline( + &mut self, clientDrawingContext: *mut ::c_void, baselineOriginX: ::FLOAT, + baselineOriginY: ::FLOAT, underline: *const DWRITE_UNDERLINE, + clientDrawingEffect: *mut ::IUnknown + ) -> ::HRESULT, + fn DrawStrikethrough( + &mut self, clientDrawingContext: *mut ::c_void, baselineOriginX: ::FLOAT, + baselineOriginY: ::FLOAT, strikethrough: *const DWRITE_STRIKETHROUGH, + clientDrawingEffect: *mut ::IUnknown + ) -> ::HRESULT, + fn DrawInlineObject( + &mut self, clientDrawingContext: *mut ::c_void, baselineOriginX: ::FLOAT, + baselineOriginY: ::FLOAT, inlineObject: *mut IDWriteInlineObject, + isSideways: ::BOOL, isRightToLeft: ::BOOL, clientDrawingEffect: *mut ::IUnknown + ) -> ::HRESULT +}} +RIDL!{interface IDWriteTextLayout(IDWriteTextLayoutVtbl): + IDWriteTextFormat(IDWriteTextFormatVtbl) { + fn SetMaxWidth(&mut self, maxWidth: ::FLOAT) -> ::HRESULT, + fn SetMaxHeight(&mut self, maxHeight: ::FLOAT) -> ::HRESULT, + fn SetFontCollection( + &mut self, fontCollection: *mut IDWriteFontCollection, textRange: DWRITE_TEXT_RANGE + ) -> ::HRESULT, + fn SetFontFamilyName( + &mut self, fontFamilyName: *const ::WCHAR, textRange: DWRITE_TEXT_RANGE + ) -> ::HRESULT, + fn SetFontWeight( + &mut self, fontWeight: DWRITE_FONT_WEIGHT, textRange: DWRITE_TEXT_RANGE + ) -> ::HRESULT, + fn SetFontStyle( + &mut self, fontStyle: DWRITE_FONT_STYLE, textRange: DWRITE_TEXT_RANGE + ) -> ::HRESULT, + fn SetFontStretch( + &mut self, fontStretch: DWRITE_FONT_STRETCH, textRange: DWRITE_TEXT_RANGE + ) -> ::HRESULT, + fn SetFontSize(&mut self, fontSize: ::FLOAT, textRange: DWRITE_TEXT_RANGE) -> ::HRESULT, + fn SetUnderline(&mut self, hasUnderline: ::BOOL, textRange: DWRITE_TEXT_RANGE) -> ::HRESULT, + fn SetStrikethrough( + &mut self, hasStrikethrough: ::BOOL, textRange: DWRITE_TEXT_RANGE + ) -> ::HRESULT, + fn SetDrawingEffect( + &mut self, drawingEffect: *mut ::IUnknown, textRange: DWRITE_TEXT_RANGE + ) -> ::HRESULT, + fn SetInlineObject( + &mut self, inlineObject: *mut IDWriteInlineObject, textRange: DWRITE_TEXT_RANGE + ) -> ::HRESULT, + fn SetTypography( + &mut self, typography: *mut IDWriteTypography, textRange: DWRITE_TEXT_RANGE + ) -> ::HRESULT, + fn SetLocaleName( + &mut self, localeName: *const ::WCHAR, textRange: DWRITE_TEXT_RANGE + ) -> ::HRESULT, + fn GetMaxWidth(&mut self) -> ::FLOAT, + fn GetMaxHeight(&mut self) -> ::FLOAT, + fn GetFontCollection( + &mut self, currentPosition: ::UINT32, fontCollection: *mut *mut IDWriteFontCollection, + textRange: *mut DWRITE_TEXT_RANGE + ) -> ::HRESULT, + fn GetFontFamilyNameLength( + &mut self, currentPosition: ::UINT32, nameLength: *mut ::UINT32, + textRange: *mut DWRITE_TEXT_RANGE + ) -> ::HRESULT, + fn GetFontFamilyName( + &mut self, currentPosition: ::UINT32, fontFamilyName: *mut ::WCHAR, + nameSize: ::UINT32, textRange: *mut DWRITE_TEXT_RANGE + ) -> ::HRESULT, + fn GetFontWeight( + &mut self, currentPosition: ::UINT32, fontWeight: *mut DWRITE_FONT_WEIGHT, + textRange: *mut DWRITE_TEXT_RANGE + ) -> ::HRESULT, + fn GetFontStyle( + &mut self, currentPosition: ::UINT32, fontStyle: *mut DWRITE_FONT_STYLE, + textRange: *mut DWRITE_TEXT_RANGE + ) -> ::HRESULT, + fn GetFontStretch( + &mut self, currentPosition: ::UINT32, fontStretch: *mut DWRITE_FONT_STRETCH, + textRange: *mut DWRITE_TEXT_RANGE + ) -> ::HRESULT, + fn GetFontSize( + &mut self, currentPosition: ::UINT32, fontSize: *mut ::FLOAT, + textRange: *mut DWRITE_TEXT_RANGE + ) -> ::HRESULT, + fn GetUnderline( + &mut self, currentPosition: ::UINT32, hasUnderline: *mut ::BOOL, + textRange: *mut DWRITE_TEXT_RANGE + ) -> ::HRESULT, + fn GetStrikethrough( + &mut self, currentPosition: ::UINT32, hasStrikethrough: *mut ::BOOL, + textRange: *mut DWRITE_TEXT_RANGE + ) -> ::HRESULT, + fn GetDrawingEffect( + &mut self, currentPosition: ::UINT32, drawingEffect: *mut *mut ::IUnknown, + textRange: *mut DWRITE_TEXT_RANGE + ) -> ::HRESULT, + fn GetInlineObject( + &mut self, currentPosition: ::UINT32, inlineObject: *mut *mut IDWriteInlineObject, + textRange: *mut DWRITE_TEXT_RANGE + ) -> ::HRESULT, + fn GetTypography( + &mut self, currentPosition: ::UINT32, typography: *mut *mut IDWriteTypography, + textRange: *mut DWRITE_TEXT_RANGE + ) -> ::HRESULT, + fn GetLocaleNameLength( + &mut self, currentPosition: ::UINT32, nameLength: *mut ::UINT32, + textRange: *mut DWRITE_TEXT_RANGE + ) -> ::HRESULT, + fn GetLocaleName( + &mut self, currentPosition: ::UINT32, localeName: *mut ::WCHAR, nameSize: ::UINT32, + textRange: *mut DWRITE_TEXT_RANGE + ) -> ::HRESULT, + fn Draw( + &mut self, clientDrawingContext: *mut ::c_void, renderer: *mut IDWriteTextRenderer, + originX: ::FLOAT, originY: ::FLOAT + ) -> ::HRESULT, + fn GetLineMetrics( + &mut self, lineMetrics: *mut DWRITE_LINE_METRICS, maxLineCount: ::UINT32, + actualLineCount: *mut ::UINT32 + ) -> ::HRESULT, + fn GetMetrics(&mut self, textMetrics: *mut DWRITE_TEXT_METRICS) -> ::HRESULT, + fn GetOverhangMetrics(&mut self, overhangs: *mut DWRITE_OVERHANG_METRICS) -> ::HRESULT, + fn GetClusterMetrics( + &mut self, clusterMetrics: *mut DWRITE_CLUSTER_METRICS, maxClusterCount: ::UINT32, + actualClusterCount: *mut ::UINT32 + ) -> ::HRESULT, + fn DetermineMinWidth(&mut self, minWidth: *mut ::FLOAT) -> ::HRESULT, + fn HitTestPoint( + &mut self, pointX: ::FLOAT, pointY: ::FLOAT, isTrailingHit: *mut ::BOOL, + isInside: *mut ::BOOL, hitTestMetrics: *mut DWRITE_HIT_TEST_METRICS + ) -> ::HRESULT, + fn HitTestTextPosition( + &mut self, textPosition: ::UINT32, isTrailingHit: ::BOOL, pointX: *mut ::FLOAT, + pointY: *mut ::FLOAT, hitTestMetrics: *mut DWRITE_HIT_TEST_METRICS + ) -> ::HRESULT, + fn HitTestTextRange( + &mut self, textPosition: ::UINT32, textLength: ::UINT32, originX: ::FLOAT, + originY: ::FLOAT, hitTestMetrics: *mut DWRITE_HIT_TEST_METRICS, + maxHitTestMetricsCount: ::UINT32, actualHitTestMetricsCount: *mut ::UINT32 + ) -> ::HRESULT +}} +RIDL!{interface IDWriteBitmapRenderTarget(IDWriteBitmapRenderTargetVtbl): IUnknown(IUnknownVtbl) { + fn DrawGlyphRun( + &mut self, baselineOriginX: ::FLOAT, baselineOriginY: ::FLOAT, + measuringMode: ::DWRITE_MEASURING_MODE, glyphRun: *const ::DWRITE_GLYPH_RUN, + renderingParams: *mut IDWriteRenderingParams, textColor: ::COLORREF, + blackBoxRect: *mut ::RECT + ) -> ::HRESULT, + fn GetMemoryDC(&mut self) -> ::HDC, + fn GetPixelsPerDip(&mut self) -> ::FLOAT, + fn SetPixelsPerDip(&mut self, pixelsPerDip: ::FLOAT) -> ::HRESULT, + fn GetCurrentTransform(&mut self, transform: *mut DWRITE_MATRIX) -> ::HRESULT, + fn SetCurrentTransform(&mut self, transform: *const DWRITE_MATRIX) -> ::HRESULT, + fn GetSize(&mut self, size: *mut ::SIZE) -> ::HRESULT, + fn Resize(&mut self, width: ::UINT32, height: ::UINT32) -> ::HRESULT +}} +RIDL!{interface IDWriteGdiInterop(IDWriteGdiInteropVtbl): IUnknown(IUnknownVtbl) { + fn CreateFontFromLOGFONT( + &mut self, logFont: *const ::LOGFONTW, font: *mut *mut IDWriteFont + ) -> ::HRESULT, + fn ConvertFontToLOGFONT( + &mut self, font: *mut IDWriteFont, logFont: *mut ::LOGFONTW, isSystemFont: *mut ::BOOL + ) -> ::HRESULT, + fn ConvertFontFaceToLOGFONT( + &mut self, font: *mut IDWriteFontFace, logFont: *mut ::LOGFONTW + ) -> ::HRESULT, + fn CreateFontFaceFromHdc( + &mut self, hdc: ::HDC, fontFace: *mut *mut IDWriteFontFace + ) -> ::HRESULT, + fn CreateBitmapRenderTarget( + &mut self, hdc: ::HDC, width: ::UINT32, height: ::UINT32, + renderTarget: *mut *mut IDWriteBitmapRenderTarget + ) -> ::HRESULT +}} +ENUM!{enum DWRITE_TEXTURE_TYPE { + DWRITE_TEXTURE_ALIASED_1x1 = 0, + DWRITE_TEXTURE_CLEARTYPE_3x1 = 1, +}} +pub const DWRITE_ALPHA_MAX: ::BYTE = 255; +RIDL!{interface IDWriteGlyphRunAnalysis(IDWriteGlyphRunAnalysisVtbl): IUnknown(IUnknownVtbl) { + fn GetAlphaTextureBounds( + &mut self, textureType: DWRITE_TEXTURE_TYPE, textureBounds: *mut ::RECT + ) -> ::HRESULT, + fn CreateAlphaTexture( + &mut self, textureType: DWRITE_TEXTURE_TYPE, textureBounds: *const ::RECT, + alphaValues: *mut ::BYTE, bufferSize: ::UINT32 + ) -> ::HRESULT, + fn GetAlphaBlendParams( + &mut self, renderingParams: *mut IDWriteRenderingParams, blendGamma: *mut ::FLOAT, + blendEnhancedContrast: *mut ::FLOAT, blendClearTypeLevel: *mut ::FLOAT + ) -> ::HRESULT +}} +RIDL!{interface IDWriteFactory(IDWriteFactoryVtbl): IUnknown(IUnknownVtbl) { + fn GetSystemFontCollection( + &mut self, fontCollection: *mut *mut IDWriteFontCollection, checkForUpdates: ::BOOL + ) -> ::HRESULT, + fn CreateCustomFontCollection( + &mut self, collectionLoader: *mut IDWriteFontCollectionLoader, + collectionKey: *const ::c_void, collectionKeySize: ::UINT32, + fontCollection: *mut *mut IDWriteFontCollection + ) -> ::HRESULT, + fn RegisterFontCollectionLoader( + &mut self, fontCollectionLoader: *mut IDWriteFontCollectionLoader + ) -> ::HRESULT, + fn UnregisterFontCollectionLoader( + &mut self, fontCollectionLoader: *mut IDWriteFontCollectionLoader + ) -> ::HRESULT, + fn CreateFontFileReference( + &mut self, filePath: *const ::WCHAR, lastWriteTime: *const ::FILETIME, + fontFile: *mut *mut IDWriteFontFile + ) -> ::HRESULT, + fn CreateCustomFontFileReference( + &mut self, fontFileReferenceKey: *const ::c_void, fontFileReferenceKeySize: ::UINT32, + fontFileLoader: *mut IDWriteFontFileLoader, fontFile: *mut *mut IDWriteFontFile + ) -> ::HRESULT, + fn CreateFontFace( + &mut self, fontFaceType: DWRITE_FONT_FACE_TYPE, numberOfFiles: ::UINT32, + fontFiles: *const *mut IDWriteFontFile, faceIndex: ::UINT32, + fontFaceSimulationFlags: DWRITE_FONT_SIMULATIONS, fontFace: *mut *mut IDWriteFontFace + ) -> ::HRESULT, + fn CreateRenderingParams( + &mut self, renderingParams: *mut *mut IDWriteRenderingParams + ) -> ::HRESULT, + fn CreateMonitorRenderingParams( + &mut self, monitor: ::HMONITOR, renderingParams: *mut *mut IDWriteRenderingParams + ) -> ::HRESULT, + fn CreateCustomRenderingParams( + &mut self, gamma: ::FLOAT, enhancedContrast: ::FLOAT, clearTypeLevel: ::FLOAT, + pixelGeometry: DWRITE_PIXEL_GEOMETRY, renderingMode: DWRITE_RENDERING_MODE, + renderingParams: *mut *mut IDWriteRenderingParams + ) -> ::HRESULT, + fn RegisterFontFileLoader( + &mut self, fontFileLoader: *mut IDWriteFontFileLoader + ) -> ::HRESULT, + fn UnregisterFontFileLoader( + &mut self, fontFileLoader: *mut IDWriteFontFileLoader + ) -> ::HRESULT, + fn CreateTextFormat( + &mut self, fontFamilyName: *const ::WCHAR, fontCollection: *mut IDWriteFontCollection, + fontWeight: DWRITE_FONT_WEIGHT, fontStyle: DWRITE_FONT_STYLE, + fontStretch: DWRITE_FONT_STRETCH, fontSize: ::FLOAT, localeName: *const ::WCHAR, + textFormat: *mut *mut IDWriteTextFormat + ) -> ::HRESULT, + fn CreateTypography(&mut self, typography: *mut *mut IDWriteTypography) -> ::HRESULT, + fn GetGdiInterop(&mut self, gdiInterop: *mut *mut IDWriteGdiInterop) -> ::HRESULT, + fn CreateTextLayout( + &mut self, string: *const ::WCHAR, stringLength: ::UINT32, + textFormat: *mut IDWriteTextFormat, maxWidth: ::FLOAT, maxHeight: ::FLOAT, + textLayout: *mut *mut IDWriteTextLayout + ) -> ::HRESULT, + fn CreateGdiCompatibleTextLayout( + &mut self, string: *const ::WCHAR, stringLength: ::UINT32, + textFormat: *mut IDWriteTextFormat, layoutWidth: ::FLOAT, layoutHeight: ::FLOAT, + pixelsPerDip: ::FLOAT, transform: *const DWRITE_MATRIX, useGdiNatrual: ::BOOL, + textLayout: *mut *mut IDWriteTextLayout + ) -> ::HRESULT, + fn CreateEllipsisTrimmingSign( + &mut self, textFormat: *mut IDWriteTextFormat, trimmingSign: *mut *mut IDWriteInlineObject + ) -> ::HRESULT, + fn CreateTextAnalyzer(&mut self, textAnalyzer: *mut *mut IDWriteTextAnalyzer) -> ::HRESULT, + fn CreateNumberSubstitution( + &mut self, substitutionMethod: DWRITE_NUMBER_SUBSTITUTION_METHOD, + localeName: *const ::WCHAR, ignoreUserOverride: ::BOOL, + numberSubstitution: *mut *mut IDWriteNumberSubstitution + ) -> ::HRESULT, + fn CreateGlyphRunAnalysis( + &mut self, glyphRun: *const DWRITE_GLYPH_RUN, pixelsPerDip: ::FLOAT, + transform: *const DWRITE_MATRIX, renderingMode: DWRITE_RENDERING_MODE, + measuringMode: ::DWRITE_MEASURING_MODE, baselineOriginX: ::FLOAT, + baselineOriginY: ::FLOAT, glyphRunAnalysis: *mut *mut IDWriteGlyphRunAnalysis + ) -> ::HRESULT +}} +pub const FACILITY_DWRITE: ::HRESULT = 0x898; +pub const DWRITE_ERR_BASE: ::HRESULT = 0x5000; +#[inline] +pub fn MAKE_DWRITE_HR(severity: ::HRESULT, code: ::HRESULT) -> ::HRESULT { + ::MAKE_HRESULT(severity, FACILITY_DWRITE, DWRITE_ERR_BASE + code) +} +#[inline] +pub fn MAKE_DWRITE_HR_ERR(code: ::HRESULT) -> ::HRESULT { + MAKE_DWRITE_HR(::SEVERITY_ERROR, code) +} diff --git a/deps/winapi-0.2.6/src/dxgi.rs b/deps/winapi-0.2.6/src/dxgi.rs new file mode 100644 index 000000000..c81821504 --- /dev/null +++ b/deps/winapi-0.2.6/src/dxgi.rs @@ -0,0 +1,240 @@ +// Copyright © 2015; Connor Hilarides +// Licensed under the MIT License <LICENSE.md> +//! Mappings for the contents of dxgi.h +STRUCT!{struct DXGI_FRAME_STATISTICS { + PresentCount: ::UINT, + PresentRefreshCount: ::UINT, + SyncRefreshCount: ::UINT, + SyncQPCTime: ::LARGE_INTEGER, + SyncGPUTime: ::LARGE_INTEGER, +}} +STRUCT!{struct DXGI_MAPPED_RECT { + Pitch: ::INT, + pBits: *mut ::BYTE, +}} +STRUCT!{nodebug struct DXGI_ADAPTER_DESC { + Description: [::WCHAR; 128], + VectorId: ::UINT, + DeviceId: ::UINT, + SubSysId: ::UINT, + Revision: ::UINT, + DedicatedVideoMemory: ::SIZE_T, + DedicatedSystemMemory: ::SIZE_T, + SharedSystemMemory: ::SIZE_T, + AdapterLuid: ::LUID, +}} +STRUCT!{nodebug struct DXGI_OUTPUT_DESC { + DeviceName: [::WCHAR; 32], + DesktopCoordinates: ::RECT, + AttachedToDesktop: ::BOOL, + Rotation: ::DXGI_MODE_ROTATION, + Monitor: ::HMONITOR, +}} +STRUCT!{struct DXGI_SHARED_RESOURCE { + Handle: ::HANDLE, +}} +pub const DXGI_RESOURCE_PRIORITY_MINIMUM: ::DWORD = 0x28000000; +pub const DXGI_RESOURCE_PRIORITY_LOW: ::DWORD = 0x50000000; +pub const DXGI_RESOURCE_PRIORITY_NORMAL: ::DWORD = 0x78000000; +pub const DXGI_RESOURCE_PRIORITY_HIGH: ::DWORD = 0xa0000000; +pub const DXGI_RESOURCE_PRIORITY_MAXIMUM: ::DWORD = 0xc8000000; +ENUM!{enum DXGI_RESIDENCY { + DXGI_RESIDENCY_FULLY_RESIDENT = 1, + DXGI_RESIDENCY_RESIDENT_IN_SHARED_MEMORY = 2, + DXGI_RESIDENCY_EVICTED_TO_DISK = 3, +}} +STRUCT!{struct DXGI_SURFACE_DESC { + Width: ::UINT, + Height: ::UINT, + Format: ::DXGI_FORMAT, + SampleDesc: ::DXGI_SAMPLE_DESC, +}} +ENUM!{enum DXGI_SWAP_EFFECT { + DXGI_SWAP_EFFECT_DISCARD = 0, + DXGI_SWAP_EFFECT_SEQUENTIAL = 1, + DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL = 3, +}} +FLAGS!{enum DXGI_SWAP_CHAIN_FLAG { + DXGI_SWAP_CHAIN_FLAG_NONPREROTATED = 1, + DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH = 2, + DXGI_SWAP_CHAIN_FLAG_GDI_COMPATIBLE = 4, + DXGI_SWAP_CHAIN_FLAG_RESTRICTED_CONTENT = 8, + DXGI_SWAP_CHAIN_FLAG_RESTRICT_SHARED_RESOURCE_DRIVER = 16, + DXGI_SWAP_CHAIN_FLAG_DISPLAY_ONLY = 32, + DXGI_SWAP_CHAIN_FLAG_FRAME_LATENCY_WAITABLE_OBJECT = 64, + DXGI_SWAP_CHAIN_FLAG_FOREGROUND_LAYER = 128, + DXGI_SWAP_CHAIN_FLAG_FULLSCREEN_VIDEO = 256, + DXGI_SWAP_CHAIN_FLAG_YUV_VIDEO = 512, +}} +STRUCT!{struct DXGI_SWAP_CHAIN_DESC { + BufferDesc: ::DXGI_MODE_DESC, + SampleDesc: ::DXGI_SAMPLE_DESC, + BufferUsage: ::DXGI_USAGE, + BufferCount: ::UINT, + OutputWindow: ::HWND, + Windowed: ::BOOL, + SwapEffect: DXGI_SWAP_EFFECT, + Flags: ::UINT, +}} +RIDL!( +interface IDXGIObject(IDXGIObjectVtbl): IUnknown(IUnknownVtbl) { + fn SetPrivateData( + &mut self, Name: ::REFGUID, DataSize: ::UINT, pData: *const ::c_void + ) -> ::HRESULT, + fn SetPrivateDataInterface(&mut self, Name: ::REFGUID, pUnknown: *const ::IUnknown) -> ::HRESULT, + fn GetPrivateData( + &mut self, Name: ::REFGUID, pDataSize: *mut ::UINT, pData: *mut ::c_void + ) -> ::HRESULT, + fn GetParent( + &mut self, riid: ::REFIID, ppParent: *mut *mut ::c_void + ) -> ::HRESULT +}); +RIDL!( +interface IDXGIDeviceSubObject(IDXGIDeviceSubObjectVtbl): IDXGIObject(IDXGIObjectVtbl) { + fn GetDevice(&mut self, riid: ::REFIID, ppDevice: *mut *mut ::c_void) -> ::HRESULT +}); +RIDL!( +interface IDXGIResource(IDXGIResourceVtbl): IDXGIDeviceSubObject(IDXGIDeviceSubObjectVtbl) { + fn GetSharedHandle(&mut self, pSharedHandle: *mut ::HANDLE) -> ::HRESULT, + fn GetUsage(&mut self, pUsage: *mut ::DXGI_USAGE) -> ::HRESULT, + fn SetEvictionPriority(&mut self, EvictionPriority: ::UINT) -> ::HRESULT, + fn GetEvictionPriority(&mut self, pEvictionPriority: *mut ::UINT) -> ::HRESULT +}); +RIDL!( +interface IDXGIKeyedMutex(IDXGIKeyedMutexVtbl): IDXGIDeviceSubObject(IDXGIDeviceSubObjectVtbl) { + fn AcquireSync(&mut self, Key: ::UINT64, dwMilliseconds: ::DWORD) -> ::HRESULT, + fn ReleaseSync(&mut self, Key: ::UINT64) -> ::HRESULT +}); +RIDL!( +interface IDXGISurface(IDXGISurfaceVtbl): IDXGIDeviceSubObject(IDXGIDeviceSubObjectVtbl) { + fn GetDesc(&mut self, pDesc: *mut DXGI_SURFACE_DESC) -> ::HRESULT, + fn Map(&mut self, pLockedRect: *mut DXGI_MAPPED_RECT, MapFlags: ::UINT) -> ::HRESULT, + fn Unmap(&mut self) -> ::HRESULT +}); +RIDL!( +interface IDXGISurface1(IDXGISurface1Vtbl): IDXGISurface(IDXGISurfaceVtbl) { + fn GetDC(&mut self, Discard: ::BOOL, phdc: *mut ::HDC) -> ::HRESULT, + fn ReleaseDC(&mut self, pDirtyRect: *mut ::RECT) -> ::HRESULT +}); +RIDL!( +interface IDXGIAdapter(IDXGIAdapterVtbl): IDXGIObject(IDXGIObjectVtbl) { + fn EnumOutputs(&mut self, Output: ::UINT, ppOutput: *mut *mut IDXGIOutput) -> ::HRESULT, + fn GetDesc(&mut self, pDesc: *mut DXGI_ADAPTER_DESC) -> ::HRESULT, + fn CheckInterfaceSupport( + &mut self, InterfaceName: ::REFGUID, pUMDVersion: *mut ::LARGE_INTEGER + ) -> ::HRESULT +}); +RIDL!( +interface IDXGIOutput(IDXGIOutputVtbl): IDXGIObject(IDXGIObjectVtbl) { + fn GetDesc(&mut self, pDesc: *mut DXGI_OUTPUT_DESC) -> ::HRESULT, + fn GetDisplayModeList( + &mut self, EnumFormat: ::DXGI_FORMAT, Flags: ::UINT, pNumModes: *mut ::UINT, + pDesc: *mut ::DXGI_MODE_DESC + ) -> ::HRESULT, + fn FindClosestMatchingMode( + &mut self, pModeToMatch: *const ::DXGI_MODE_DESC, pClosestMatch: *mut ::DXGI_MODE_DESC, + pConcernedDevice: *mut ::IUnknown + ) -> ::HRESULT, + fn WaitForVBlank(&mut self) -> ::HRESULT, + fn TakeOwnership(&mut self, pDevice: *mut ::IUnknown, Exclusive: ::BOOL) -> ::HRESULT, + fn ReleaseOwnership(&mut self) -> (), + fn GetGammaControlCapabilities( + &mut self, pGammaCaps: *mut ::DXGI_GAMMA_CONTROL_CAPABILITIES + ) -> ::HRESULT, + fn SetGammaControl(&mut self, pArray: *const ::DXGI_GAMMA_CONTROL) -> ::HRESULT, + fn GetGammaControl(&mut self, pArray: *mut ::DXGI_GAMMA_CONTROL) -> ::HRESULT, + fn SetDisplaySurface(&mut self, pScanoutSurface: *mut IDXGISurface) -> ::HRESULT, + fn GetDisplaySurfaceData(&mut self, pDestination: *mut IDXGISurface) -> ::HRESULT, + fn GetFrameStatistics(&mut self, pStats: *mut DXGI_FRAME_STATISTICS) -> ::HRESULT +}); +pub const DXGI_MAX_SWAP_CHAIN_BUFFERS: ::DWORD = 16; +pub const DXGI_PRESENT_TEST: ::DWORD = 0x00000001; +pub const DXGI_PRESENT_DO_NOT_SEQUENCE: ::DWORD = 0x00000002; +pub const DXGI_PRESENT_RESTART: ::DWORD = 0x00000004; +pub const DXGI_PRESENT_DO_NOT_WAIT: ::DWORD = 0x00000008; +pub const DXGI_PRESENT_STEREO_PREFER_RIGHT: ::DWORD = 0x00000010; +pub const DXGI_PRESENT_STEREO_TEMPORARY_MONO: ::DWORD = 0x00000020; +pub const DXGI_PRESENT_RESTRICT_TO_OUTPUT: ::DWORD = 0x00000040; +pub const DXGI_PRESENT_USE_DURATION: ::DWORD = 0x00000100; +RIDL!( +interface IDXGISwapChain(IDXGISwapChainVtbl): IDXGIDeviceSubObject(IDXGIDeviceSubObjectVtbl) { + fn Present(&mut self, SyncInterval: ::UINT, Flags: ::UINT) -> ::HRESULT, + fn GetBuffer( + &mut self, Buffer: ::UINT, riid: ::REFIID, ppSurface: *mut *mut ::c_void + ) -> ::HRESULT, + fn SetFullscreenState(&mut self, Fullscreen: ::BOOL, pTarget: *mut IDXGIOutput) -> ::HRESULT, + fn GetFullscreenState( + &mut self, pFullscreen: *mut ::BOOL, ppTarget: *mut *mut IDXGIOutput + ) -> ::HRESULT, + fn GetDesc(&mut self, pDesc: *mut DXGI_SWAP_CHAIN_DESC) -> ::HRESULT, + fn ResizeBuffers( + &mut self, BufferCount: ::UINT, Width: ::UINT, Height: ::UINT, NewFormat: ::DXGI_FORMAT, + SwapChainFlags: ::UINT + ) -> ::HRESULT, + fn ResizeTarget(&mut self, pNewTargetParameters: *const ::DXGI_MODE_DESC) -> ::HRESULT, + fn GetContainingOutput(&mut self, ppOutput: *mut *mut IDXGIOutput) -> ::HRESULT, + fn GetFrameStatistics(&mut self, pStats: *mut DXGI_FRAME_STATISTICS) -> ::HRESULT, + fn GetLastPresentCount(&mut self, pLastPresentCount: *mut ::UINT) -> ::HRESULT +}); +RIDL!( +interface IDXGIFactory(IDXGIFactoryVtbl): IDXGIObject(IDXGIObjectVtbl) { + fn EnumAdapters(&mut self, Adapter: ::UINT, ppAdapter: *mut *mut IDXGIAdapter) -> ::HRESULT, + fn MakeWindowAssociation(&mut self, WindowHandle: ::HWND, Flags: ::UINT) -> ::HRESULT, + fn GetWindowAssociation(&mut self, pWindowHandle: *mut ::HWND) -> ::HRESULT, + fn CreateSwapChain( + &mut self, pDevice: *mut ::IUnknown, pDesc: *mut DXGI_SWAP_CHAIN_DESC, + ppSwapChain: *mut *mut IDXGISwapChain + ) -> ::HRESULT, + fn CreateSoftwareAdapter( + &mut self, Module: ::HMODULE, ppAdapter: *mut *mut IDXGIAdapter + ) -> ::HRESULT +}); +RIDL!( +interface IDXGIDevice(IDXGIDeviceVtbl): IDXGIObject(IDXGIObjectVtbl) { + fn GetAdapter(&mut self, pAdapter: *mut *mut IDXGIAdapter) -> ::HRESULT, + fn CreateSurface( + &mut self, pDesc: *const DXGI_SURFACE_DESC, NumSurfaces: ::UINT, Usage: ::DXGI_USAGE, + pSharedResource: *const DXGI_SHARED_RESOURCE, ppSurface: *mut *mut IDXGISurface + ) -> ::HRESULT, + fn QueryResourceResidency( + &mut self, ppResources: *const *mut ::IUnknown, pResidencyStatus: *mut DXGI_RESIDENCY, + NumResources: ::UINT + ) -> ::HRESULT, + fn SetGPUThreadPriority(&mut self, Priority: ::INT) -> ::HRESULT, + fn GetGPUThreadPriority(&mut self, pPriority: *mut ::INT) -> ::HRESULT +}); +ENUM!{enum DXGI_ADAPTER_FLAG { + DXGI_ADAPTER_FLAG_NONE, + DXGI_ADAPTER_FLAG_REMOTE, + DXGI_ADAPTER_FLAG_SOFTWARE, +}} +STRUCT!{nodebug struct DXGI_ADAPTER_DESC1 { + Description: [::WCHAR; 128], + VendorId: ::UINT, + DeviceId: ::UINT, + SubSysId: ::UINT, + Revision: ::UINT, + DedicatedVideoMemory: ::SIZE_T, + DedicatedSystemMemory: ::SIZE_T, + SharedSystemMemory: ::SIZE_T, + AdapterLuid: ::LUID, + Flags: ::UINT, +}} +STRUCT!{struct DXGI_DISPLAY_COLOR_SPACE { + PrimaryCoordinates: [[::FLOAT; 2]; 8], + WhitePoints: [[::FLOAT; 2]; 16], +}} +RIDL!( +interface IDXGIFactory1(IDXGIFactory1Vtbl): IDXGIFactory(IDXGIFactoryVtbl) { + fn EnumAdapters1(&mut self, Adapter: ::UINT, ppAdapter: *mut *mut IDXGIAdapter1) -> ::HRESULT, + fn IsCurrent(&mut self) -> ::BOOL +}); +RIDL!( +interface IDXGIAdapter1(IDXGIAdapter1Vtbl): IDXGIAdapter(IDXGIAdapterVtbl) { + fn GetDesc1(&mut self, pDesc: *mut DXGI_ADAPTER_DESC1) -> ::HRESULT +}); +RIDL!( +interface IDXGIDevice1(IDXGIDevice1Vtbl): IDXGIDevice(IDXGIDeviceVtbl) { + fn SetMaximumFrameLatency(&mut self, MaxLatency: ::UINT) -> ::HRESULT, + fn GetMaximumFrameLatency(&mut self, pMaxLatency: *mut ::UINT) -> ::HRESULT +}); diff --git a/deps/winapi-0.2.6/src/dxgi1_2.rs b/deps/winapi-0.2.6/src/dxgi1_2.rs new file mode 100644 index 000000000..42082747c --- /dev/null +++ b/deps/winapi-0.2.6/src/dxgi1_2.rs @@ -0,0 +1,288 @@ +// Copyright © 2015; Dmitry Roschin +// Licensed under the MIT License <LICENSE.md> +//! Mappings for the contents of dxgi1_2.h + +ENUM!{ enum DXGI_ALPHA_MODE { + DXGI_ALPHA_MODE_UNSPECIFIED = 0, + DXGI_ALPHA_MODE_PREMULTIPLIED = 1, + DXGI_ALPHA_MODE_STRAIGHT = 2, + DXGI_ALPHA_MODE_IGNORE = 3, + DXGI_ALPHA_MODE_FORCE_DWORD = 0xFFFFFFFF, +}} + +ENUM!{ enum DXGI_COMPUTE_PREEMPTION_GRANULARITY { + DXGI_COMPUTE_PREEMPTION_DMA_BUFFER_BOUNDARY = 0, + DXGI_COMPUTE_PREEMPTION_DISPATCH_BOUNDARY = 1, + DXGI_COMPUTE_PREEMPTION_THREAD_GROUP_BOUNDARY = 2, + DXGI_COMPUTE_PREEMPTION_THREAD_BOUNDARY = 3, + DXGI_COMPUTE_PREEMPTION_INSTRUCTION_BOUNDARY = 4, +}} + +ENUM!{ enum DXGI_GRAPHICS_PREEMPTION_GRANULARITY { + DXGI_GRAPHICS_PREEMPTION_DMA_BUFFER_BOUNDARY = 0, + DXGI_GRAPHICS_PREEMPTION_PRIMITIVE_BOUNDARY = 1, + DXGI_GRAPHICS_PREEMPTION_TRIANGLE_BOUNDARY = 2, + DXGI_GRAPHICS_PREEMPTION_PIXEL_BOUNDARY = 3, + DXGI_GRAPHICS_PREEMPTION_INSTRUCTION_BOUNDARY = 4, +}} + +ENUM!{ enum DXGI_OUTDUPL_POINTER_SHAPE_TYPE { + DXGI_OUTDUPL_POINTER_SHAPE_TYPE_MONOCHROME = 1, + DXGI_OUTDUPL_POINTER_SHAPE_TYPE_COLOR = 2, + DXGI_OUTDUPL_POINTER_SHAPE_TYPE_MASKED_COLOR = 4, +}} + +ENUM!{ enum DXGI_SCALING { + DXGI_SCALING_STRETCH = 0, + DXGI_SCALING_NONE = 1, + DXGI_SCALING_ASPECT_RATIO_STRETCH = 2, +}} + +ENUM!{ enum _DXGI_OFFER_RESOURCE_PRIORITY { + DXGI_OFFER_RESOURCE_PRIORITY_LOW = 1, + DXGI_OFFER_RESOURCE_PRIORITY_NORMAL = 2, + DXGI_OFFER_RESOURCE_PRIORITY_HIGH = 3, +}} + +STRUCT!{nodebug struct DXGI_ADAPTER_DESC2 { + Description: [::WCHAR; 128], + VendorId: ::UINT, + DeviceId: ::UINT, + SubSysId: ::UINT, + Revision: ::UINT, + DedicatedVideoMemory: ::SIZE_T, + DedicatedSystemMemory: ::SIZE_T, + SharedSystemMemory: ::SIZE_T, + AdapterLuid: ::LUID, + Flags: ::UINT, + GraphicsPreemptionGranularity: ::DXGI_GRAPHICS_PREEMPTION_GRANULARITY, + ComputePreemptionGranularity: ::DXGI_COMPUTE_PREEMPTION_GRANULARITY, +}} + +STRUCT!{struct DXGI_MODE_DESC1 { + Width: ::UINT, + Height: ::UINT, + RefreshRate: ::DXGI_RATIONAL, + Format: ::DXGI_FORMAT, + ScanlineOrdering: ::DXGI_MODE_SCANLINE_ORDER, + Scaling: ::DXGI_MODE_SCALING, + Stereo: ::BOOL, +}} + +STRUCT!{struct DXGI_OUTDUPL_DESC { + ModeDesc: ::DXGI_MODE_DESC, + Rotation: ::DXGI_MODE_ROTATION, + DesktopImageInSystemMemory: ::BOOL, +}} + +STRUCT!{struct DXGI_OUTDUPL_FRAME_INFO { + LastPresentTime: ::LARGE_INTEGER, + LastMouseUpdateTime: ::LARGE_INTEGER, + AccumulatedFrames: ::UINT, + RectsCoalesced: ::BOOL, + ProtectedContentMaskedOut: ::BOOL, + PointerPosition: ::DXGI_OUTDUPL_POINTER_POSITION, + TotalMetadataBufferSize: ::UINT, + PointerShapeBufferSize: ::UINT, +}} + +STRUCT!{struct DXGI_OUTDUPL_MOVE_RECT { + SourcePoint: ::POINT, + DestinationRect: ::RECT, +}} + +STRUCT!{struct DXGI_OUTDUPL_POINTER_POSITION { + Position: ::POINT, + Visible: ::BOOL, +}} + +STRUCT!{struct DXGI_OUTDUPL_POINTER_SHAPE_INFO { + Type: ::UINT, + Width: ::UINT, + Height: ::UINT, + Pitch: ::UINT, + HotSpot: ::POINT, +}} + +STRUCT!{struct DXGI_PRESENT_PARAMETERS { + DirtyRectsCount: ::UINT, + pDirtyRects: *mut ::RECT, + pScrollRect: *mut ::RECT, + pScrollOffset: *mut ::POINT, +}} + +STRUCT!{struct DXGI_SWAP_CHAIN_DESC1 { + Width: ::UINT, + Height: ::UINT, + Format: ::DXGI_FORMAT, + Stereo: ::BOOL, + SampleDesc: ::DXGI_SAMPLE_DESC, + BufferUsage: ::DXGI_USAGE, + BufferCount: ::UINT, + Scaling: ::DXGI_SCALING, + SwapEffect: ::DXGI_SWAP_EFFECT, + AlphaMode: ::DXGI_ALPHA_MODE, + Flags: ::UINT, +}} + +STRUCT!{struct DXGI_SWAP_CHAIN_FULLSCREEN_DESC { + RefreshRate: ::DXGI_RATIONAL, + ScanlineOrdering: ::DXGI_MODE_SCANLINE_ORDER, + Scaling: ::DXGI_MODE_SCALING, + Windowed: ::BOOL, +}} + +RIDL!( +interface IDXGIAdapter2(IDXGIAdapter2Vtbl): IDXGIAdapter1(IDXGIAdapter1Vtbl) { + fn GetDesc2(&mut self, pDesc: *mut ::DXGI_ADAPTER_DESC2) -> ::HRESULT +}); + +RIDL!( +interface IDXGIDevice2(IDXGIDevice2Vtbl): IDXGIDevice1(IDXGIDevice1Vtbl) { + fn OfferResources( + &mut self, NumResources: ::UINT, ppResources: *mut *mut ::IDXGIResource, + Priority: ::DXGI_OFFER_RESOURCE_PRIORITY + ) -> ::HRESULT, + fn ReclaimResources( + &mut self, NumResources: ::UINT, ppResources: *mut *mut ::IDXGIResource, + pDiscarded: *mut ::BOOL + ) -> ::HRESULT, + fn EnqueueSetEvent(&mut self, hEvent: ::HANDLE) -> ::HRESULT +}); + +RIDL!( +interface IDXGIDisplayControl(IDXGIDisplayControlVtbl): IUnknown(IUnknownVtbl) { + fn IsStereoEnabled(&mut self) -> ::BOOL, + fn SetStereoEnabled(&mut self, enabled: ::BOOL) -> () +}); + +RIDL!( +interface IDXGIFactory2(IDXGIFactory2Vtbl): IDXGIFactory1(IDXGIFactory1Vtbl) { + fn IsWindowedStereoEnabled(&mut self) -> ::BOOL, + fn CreateSwapChainForHwnd( + &mut self, pDevice: *mut ::IUnknown, hWnd: ::HWND, pDesc: *const ::DXGI_SWAP_CHAIN_DESC1, + pFullscreenDesc: *const ::DXGI_SWAP_CHAIN_FULLSCREEN_DESC, + pRestrictToOutput: *mut ::IDXGIOutput, ppSwapChain: *mut *mut ::IDXGISwapChain1 + ) -> ::HRESULT, + fn CreateSwapChainForCoreWindow( + &mut self, pDevice: *mut ::IUnknown, pWindow: *mut ::IUnknown, + pDesc: *const ::DXGI_SWAP_CHAIN_DESC1, pRestrictToOutput: *mut ::IDXGIOutput, + ppSwapChain: *mut *mut ::IDXGISwapChain1 + ) -> ::HRESULT, + fn GetSharedResourceAdapterLuid( + &mut self, hResource: ::HANDLE, pLuid: *mut ::LUID + ) -> ::HRESULT, + fn RegisterStereoStatusWindow( + &mut self, WindowHandle: ::HWND, wMsg: ::UINT, pdwCookie: *mut ::DWORD + ) -> ::HRESULT, + fn RegisterStereoStatusEvent( + &mut self, hEvent: ::HANDLE, pdwCookie: *mut ::DWORD + ) -> ::HRESULT, + fn UnregisterStereoStatus(&mut self, dwCookie: ::DWORD) -> (), + fn RegisterOcclusionStatusWindow( + &mut self, WindowHandle: ::HWND, wMsg: ::UINT, pdwCookie: *mut ::DWORD + ) -> ::HRESULT, + fn RegisterOcclusionStatusEvent( + &mut self, hEvent: ::HANDLE, pdwCookie: *mut ::DWORD + ) -> ::HRESULT, + fn UnregisterOcclusionStatus(&mut self, dwCookie: ::DWORD) -> (), + fn CreateSwapChainForComposition( + &mut self, pDevice: *mut ::IUnknown, pDesc: *const ::DXGI_SWAP_CHAIN_DESC1, + pRestrictToOutput: *mut ::IDXGIOutput, ppSwapChain: *mut *mut ::IDXGISwapChain1 + ) -> ::HRESULT +}); + +RIDL!( +interface IDXGIOutput1(IDXGIOutput1Vtbl): IDXGIOutput(IDXGIOutputVtbl) { + fn GetDisplayModeList1( + &mut self, EnumFormat: ::DXGI_FORMAT, Flags: ::UINT, pNumModes: *mut ::UINT, + pDesc: *mut ::DXGI_MODE_DESC1 + ) -> ::HRESULT, + fn FindClosestMatchingMode1( + &mut self, pModeToMatch: *const ::DXGI_MODE_DESC1, pClosestMatch: *mut ::DXGI_MODE_DESC1, + pConcernedDevice: *mut ::IUnknown + ) -> ::HRESULT, + fn GetDisplaySurfaceData1( + &mut self, pDestination: *mut ::IDXGIResource + ) -> ::HRESULT, + fn DuplicateOutput( + &mut self, pDevice: *mut ::IUnknown, + ppOutputDuplication: *mut *mut ::IDXGIOutputDuplication + ) -> ::HRESULT +}); + +RIDL!( +interface IDXGIOutputDuplication(IDXGIOutputDuplicationVtbl): IDXGIObject(IDXGIObjectVtbl) { + fn GetDesc(&mut self, pDesc: *mut ::DXGI_OUTDUPL_DESC) -> (), + fn AcquireNextFrame( + &mut self, TimeoutInMilliseconds: ::UINT, pFrameInfo: *mut ::DXGI_OUTDUPL_FRAME_INFO, + ppDesktopResource: *mut *mut ::IDXGIResource + ) -> ::HRESULT, + fn GetFrameDirtyRects( + &mut self, DirtyRectsBufferSize: ::UINT, pDirtyRectsBuffer: *mut ::RECT, + pDirtyRectsBufferSizeRequired: *mut ::UINT + ) -> ::HRESULT, + fn GetFrameMoveRects( + &mut self, MoveRectsBufferSize: ::UINT, pMoveRectBuffer: *mut ::DXGI_OUTDUPL_MOVE_RECT, + pMoveRectsBufferSizeRequired: *mut ::UINT + ) -> ::HRESULT, + fn GetFramePointerShape( + &mut self, PointerShapeBufferSize: ::UINT, pPointerShapeBuffer: *mut ::c_void, + pPointerShapeBufferSizeRequired: *mut ::UINT, + pPointerShapeInfo: *mut ::DXGI_OUTDUPL_POINTER_SHAPE_INFO + ) -> ::HRESULT, + fn MapDesktopSurface( + &mut self, pLockedRect: *mut ::DXGI_MAPPED_RECT + ) -> ::HRESULT, + fn UnMapDesktopSurface(&mut self) -> ::HRESULT, + fn ReleaseFrame(&mut self) -> ::HRESULT +}); + +RIDL!( +interface IDXGIResource1(IDXGIResource1Vtbl): IDXGIResource(IDXGIResourceVtbl) { + fn CreateSubresourceSurface( + &mut self, index: ::UINT, ppSurface: *mut *mut ::IDXGISurface2 + ) -> ::HRESULT, + fn CreateSharedHandle( + &mut self, pAttributes: *const ::SECURITY_ATTRIBUTES, dwAccess: ::DWORD, lpName: ::LPCWSTR, + pHandle: *mut ::HANDLE + ) -> ::HRESULT +}); + +RIDL!( +interface IDXGISurface2(IDXGISurface2Vtbl): IDXGISurface1(IDXGISurface1Vtbl) { + fn GetResource( + &mut self, riid: ::REFGUID, ppParentResource: *mut *mut ::c_void, + pSubresourceIndex: *mut ::UINT + ) -> ::HRESULT +}); + +RIDL!( +interface IDXGISwapChain1(IDXGISwapChain1Vtbl): IDXGISwapChain(IDXGISwapChainVtbl) { + fn GetDesc1(&mut self, pDesc: *mut ::DXGI_SWAP_CHAIN_DESC1) -> ::HRESULT, + fn GetFullscreenDesc( + &mut self, pDesc: *mut ::DXGI_SWAP_CHAIN_FULLSCREEN_DESC + ) -> ::HRESULT, + fn GetHwnd(&mut self, pHwnd: *mut ::HWND) -> ::HRESULT, + fn GetCoreWindow( + &mut self, refiid: ::REFGUID, ppUnk: *mut *mut ::c_void + ) -> ::HRESULT, + fn Present1( + &mut self, SyncInterval: ::UINT, PresentFlags: ::UINT, + pPresentParameters: *const ::DXGI_PRESENT_PARAMETERS + ) -> ::HRESULT, + fn IsTemporaryMonoSupported(&mut self) -> ::BOOL, + fn GetRestrictToOutput( + &mut self, ppRestrictToOutput: *mut *mut ::IDXGIOutput + ) -> ::HRESULT, + fn SetBackgroundColor(&mut self, pColor: *const ::DXGI_RGBA) -> ::HRESULT, + fn GetBackgroundColor(&mut self, pColor: *mut ::DXGI_RGBA) -> ::HRESULT, + fn SetRotation(&mut self, Rotation: ::DXGI_MODE_ROTATION) -> ::HRESULT, + fn GetRotation(&mut self, pRotation: *mut ::DXGI_MODE_ROTATION) -> ::HRESULT +}); + +pub type DXGI_OFFER_RESOURCE_PRIORITY = ::_DXGI_OFFER_RESOURCE_PRIORITY; +pub const DXGI_ENUM_MODES_DISABLED_STEREO: ::UINT = 8; +pub const DXGI_ENUM_MODES_STEREO: ::UINT = 4; +pub const DXGI_SHARED_RESOURCE_READ: ::UINT = 0x80000000; +pub const DXGI_SHARED_RESOURCE_WRITE: ::UINT = 1; diff --git a/deps/winapi-0.2.6/src/dxgi1_3.rs b/deps/winapi-0.2.6/src/dxgi1_3.rs new file mode 100644 index 000000000..71acf98c7 --- /dev/null +++ b/deps/winapi-0.2.6/src/dxgi1_3.rs @@ -0,0 +1,131 @@ +// Copyright © 2015; Dmitry Roschin +// Licensed under the MIT License <LICENSE.md> +//! Mappings for the contents of dxgi1_3.h + +ENUM!{ enum DXGI_FRAME_PRESENTATION_MODE { + DXGI_FRAME_PRESENTATION_MODE_COMPOSED = 0, + DXGI_FRAME_PRESENTATION_MODE_OVERLAY = 1, + DXGI_FRAME_PRESENTATION_MODE_NONE = 2, + DXGI_FRAME_PRESENTATION_MODE_COMPOSITION_FAILURE = 3, +}} + +FLAGS!{ enum DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAGS { + DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAG_NOMINAL_RANGE = 0x1, + DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAG_BT709 = 0x2, + DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAG_xvYCC = 0x4, +}} + +FLAGS!{ enum DXGI_OVERLAY_SUPPORT_FLAG { + DXGI_OVERLAY_SUPPORT_FLAG_DIRECT = 0x1, + DXGI_OVERLAY_SUPPORT_FLAG_SCALING = 0x2, +}} + +STRUCT!{struct DXGI_DECODE_SWAP_CHAIN_DESC { + Flags: ::UINT, +}} + +STRUCT!{struct DXGI_FRAME_STATISTICS_MEDIA { + PresentCount: ::UINT, + PresentRefreshCount: ::UINT, + SyncRefreshCount: ::UINT, + SyncQPCTime: ::LARGE_INTEGER, + SyncGPUTime: ::LARGE_INTEGER, + CompositionMode: ::DXGI_FRAME_PRESENTATION_MODE, + ApprovedPresentDuration: ::UINT, +}} + +STRUCT!{struct DXGI_MATRIX_3X2_F { + _11: ::FLOAT, + _12: ::FLOAT, + _21: ::FLOAT, + _22: ::FLOAT, + _31: ::FLOAT, + _32: ::FLOAT, +}} + +RIDL!( +interface IDXGIDecodeSwapChain(IDXGIDecodeSwapChainVtbl): IUnknown(IUnknownVtbl) { + fn PresentBuffer( + &mut self, BufferToPresent: ::UINT, SyncInterval: ::UINT, Flags: ::UINT + ) -> ::HRESULT, + fn SetSourceRect(&mut self, pRect: *const ::RECT) -> ::HRESULT, + fn SetTargetRect(&mut self, pRect: *const ::RECT) -> ::HRESULT, + fn SetDestSize(&mut self, Width: ::UINT, Height: ::UINT) -> ::HRESULT, + fn GetSourceRect(&mut self, pRect: *mut ::RECT) -> ::HRESULT, + fn GetTargetRect(&mut self, pRect: *mut ::RECT) -> ::HRESULT, + fn GetDestSize( + &mut self, pWidth: *mut ::UINT, pHeight: *mut ::UINT + ) -> ::HRESULT, + fn SetColorSpace( + &mut self, ColorSpace: ::DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAGS + ) -> ::HRESULT, + fn GetColorSpace(&mut self) -> ::DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAGS +}); + +RIDL!( +interface IDXGIDevice3(IDXGIDevice3Vtbl): IDXGIDevice2(IDXGIDevice2Vtbl) { + fn Trim(&mut self) -> () +}); + +RIDL!( +interface IDXGIFactory3(IDXGIFactory3Vtbl): IDXGIFactory2(IDXGIFactory2Vtbl) { + fn GetCreationFlags(&mut self) -> ::UINT +}); + +RIDL!( +interface IDXGIFactoryMedia(IDXGIFactoryMediaVtbl): IUnknown(IUnknownVtbl) { + fn CreateSwapChainForCompositionSurfaceHandle( + &mut self, pDevice: *mut ::IUnknown, hSurface: ::HANDLE, + pDesc: *const ::DXGI_SWAP_CHAIN_DESC1, pRestrictToOutput: *mut ::IDXGIOutput, + ppSwapChain: *mut *mut ::IDXGISwapChain1 + ) -> ::HRESULT, + fn CreateDecodeSwapChainForCompositionSurfaceHandle( + &mut self, pDevice: *mut ::IUnknown, hSurface: ::HANDLE, + pDesc: *mut ::DXGI_DECODE_SWAP_CHAIN_DESC, pYuvDecodeBuffers: *mut ::IDXGIResource, + pRestrictToOutput: *mut ::IDXGIOutput, ppSwapChain: *mut *mut ::IDXGIDecodeSwapChain + ) -> ::HRESULT +}); + +RIDL!( +interface IDXGIOutput2(IDXGIOutput2Vtbl): IDXGIOutput1(IDXGIOutput1Vtbl) { + fn SupportsOverlays(&mut self) -> ::BOOL +}); + +RIDL!( +interface IDXGIOutput3(IDXGIOutput3Vtbl): IDXGIOutput2(IDXGIOutput2Vtbl) { + fn CheckOverlaySupport( + &mut self, EnumFormat: ::DXGI_FORMAT, pConcernedDevice: *mut ::IUnknown, + pFlags: *mut ::UINT + ) -> ::HRESULT +}); + +RIDL!( +interface IDXGISwapChain2(IDXGISwapChain2Vtbl): IDXGISwapChain1(IDXGISwapChain1Vtbl) { + fn SetSourceSize(&mut self, Width: ::UINT, Height: ::UINT) -> ::HRESULT, + fn GetSourceSize( + &mut self, pWidth: *mut ::UINT, pHeight: *mut ::UINT + ) -> ::HRESULT, + fn SetMaximumFrameLatency(&mut self, MaxLatency: ::UINT) -> ::HRESULT, + fn GetMaximumFrameLatency(&mut self, pMaxLatency: *mut ::UINT) -> ::HRESULT, + fn GetFrameLatencyWaitableObject(&mut self) -> ::HANDLE, + fn SetMatrixTransform( + &mut self, pMatrix: *const ::DXGI_MATRIX_3X2_F + ) -> ::HRESULT, + fn GetMatrixTransform( + &mut self, pMatrix: *mut ::DXGI_MATRIX_3X2_F + ) -> ::HRESULT +}); + +RIDL!( +interface IDXGISwapChainMedia(IDXGISwapChainMediaVtbl): IUnknown(IUnknownVtbl) { + fn GetFrameStatisticsMedia( + &mut self, pStats: *mut ::DXGI_FRAME_STATISTICS_MEDIA + ) -> ::HRESULT, + fn SetPresentDuration(&mut self, Duration: ::UINT) -> ::HRESULT, + fn CheckPresentDurationSupport( + &mut self, DesiredPresentDuration: ::UINT, pClosestSmallerPresentDuration: *mut ::UINT, + pClosestLargerPresentDuration: *mut ::UINT + ) -> ::HRESULT +}); + +pub const DXGI_CREATE_FACTORY_DEBUG: ::UINT = 0x1; diff --git a/deps/winapi-0.2.6/src/dxgi1_4.rs b/deps/winapi-0.2.6/src/dxgi1_4.rs new file mode 100644 index 000000000..cbca18f18 --- /dev/null +++ b/deps/winapi-0.2.6/src/dxgi1_4.rs @@ -0,0 +1,82 @@ +// Copyright © 2015; Dmitry Roschin +// Licensed under the MIT License <LICENSE.md> +//! Mappings for the contents of dxgi1_4.h + +ENUM!{ enum DXGI_MEMORY_SEGMENT_GROUP { + DXGI_MEMORY_SEGMENT_GROUP_LOCAL = 0, + DXGI_MEMORY_SEGMENT_GROUP_NON_LOCAL = 1, +}} + +FLAGS!{ enum DXGI_OVERLAY_COLOR_SPACE_SUPPORT_FLAG { + DXGI_OVERLAY_COLOR_SPACE_SUPPORT_FLAG_PRESENT = 0x1, +}} + +FLAGS!{ enum DXGI_SWAP_CHAIN_COLOR_SPACE_SUPPORT_FLAG { + DXGI_SWAP_CHAIN_COLOR_SPACE_SUPPORT_FLAG_PRESENT = 0x1, + DXGI_SWAP_CHAIN_COLOR_SPACE_SUPPORT_FLAG_OVERLAY_PRESENT = 0x2, +}} + +STRUCT!{struct DXGI_QUERY_VIDEO_MEMORY_INFO { + Budget: ::UINT64, + CurrentUsage: ::UINT64, + AvailableForReservation: ::UINT64, + CurrentReservation: ::UINT64, +}} + +RIDL!( +interface IDXGIAdapter3(IDXGIAdapter3Vtbl): IDXGIAdapter2(IDXGIAdapter2Vtbl) { + fn RegisterHardwareContentProtectionTeardownStatusEvent( + &mut self, hEvent: ::HANDLE, pdwCookie: *mut ::DWORD + ) -> ::HRESULT, + fn UnregisterHardwareContentProtectionTeardownStatus( + &mut self, dwCookie: ::DWORD + ) -> (), + fn QueryVideoMemoryInfo( + &mut self, NodeIndex: ::UINT, MemorySegmentGroup: ::DXGI_MEMORY_SEGMENT_GROUP, + pVideoMemoryInfo: *mut ::DXGI_QUERY_VIDEO_MEMORY_INFO + ) -> ::HRESULT, + fn SetVideoMemoryReservation( + &mut self, NodeIndex: ::UINT, MemorySegmentGroup: ::DXGI_MEMORY_SEGMENT_GROUP, + Reservation: ::UINT64 + ) -> ::HRESULT, + fn RegisterVideoMemoryBudgetChangeNotificationEvent( + &mut self, hEvent: ::HANDLE, pdwCookie: *mut ::DWORD + ) -> ::HRESULT, + fn UnregisterVideoMemoryBudgetChangeNotification( + &mut self, dwCookie: ::DWORD + ) -> () +}); + +RIDL!( +interface IDXGIFactory4(IDXGIFactory4Vtbl): IDXGIFactory3(IDXGIFactory3Vtbl) { + fn EnumAdapterByLuid( + &mut self, AdapterLuid: ::LUID, riid: ::REFGUID, ppvAdapter: *mut *mut ::c_void + ) -> ::HRESULT, + fn EnumWarpAdapter( + &mut self, riid: ::REFGUID, ppvAdapter: *mut *mut ::c_void + ) -> ::HRESULT +}); + +RIDL!( +interface IDXGIOutput4(IDXGIOutput4Vtbl): IDXGIOutput3(IDXGIOutput3Vtbl) { + fn CheckOverlayColorSpaceSupport( + &mut self, Format: ::DXGI_FORMAT, ColorSpace: ::DXGI_COLOR_SPACE_TYPE, + pConcernedDevice: *mut ::IUnknown, pFlags: *mut ::UINT + ) -> ::HRESULT +}); + +RIDL!( +interface IDXGISwapChain3(IDXGISwapChain3Vtbl): IDXGISwapChain2(IDXGISwapChain2Vtbl) { + fn GetCurrentBackBufferIndex(&mut self) -> ::UINT, + fn CheckColorSpaceSupport( + &mut self, ColorSpace: ::DXGI_COLOR_SPACE_TYPE, pColorSpaceSupport: *mut ::UINT + ) -> ::HRESULT, + fn SetColorSpace1( + &mut self, ColorSpace: ::DXGI_COLOR_SPACE_TYPE + ) -> ::HRESULT, + fn ResizeBuffers1( + &mut self, BufferCount: ::UINT, Width: ::UINT, Height: ::UINT, Format: ::DXGI_FORMAT, + SwapChainFlags: ::UINT, pCreationNodeMask: *const ::UINT, + ppPresentQueue: *mut *mut ::IUnknown + ) -> ::HRESULT +}); diff --git a/deps/winapi-0.2.5/src/dxgiformat.rs b/deps/winapi-0.2.6/src/dxgiformat.rs similarity index 100% rename from deps/winapi-0.2.5/src/dxgiformat.rs rename to deps/winapi-0.2.6/src/dxgiformat.rs diff --git a/deps/winapi-0.2.6/src/dxgitype.rs b/deps/winapi-0.2.6/src/dxgitype.rs new file mode 100644 index 000000000..6c9a2f5a7 --- /dev/null +++ b/deps/winapi-0.2.6/src/dxgitype.rs @@ -0,0 +1,86 @@ +// Copyright © 2015; Connor Hilarides +// Licensed under the MIT License <LICENSE.md> +//! Mappings for the contents of dxgitype.h +pub const DXGI_CPU_ACCESS_NONE: ::DWORD = 0; +pub const DXGI_CPU_ACCESS_DYNAMIC: ::DWORD = 1; +pub const DXGI_CPU_ACCESS_READ_WRITE: ::DWORD = 2; +pub const DXGI_CPU_ACCESS_SCRATCH: ::DWORD = 3; +pub const DXGI_CPU_ACCESS_FIELD: ::DWORD = 15; +FLAGS!{enum DXGI_USAGE { + DXGI_USAGE_SHADER_INPUT = 1 << (0 + 4), + DXGI_USAGE_RENDER_TARGET_OUTPUT = 1 << (1 + 4), + DXGI_USAGE_BACK_BUFFER = 1 << (2 + 4), + DXGI_USAGE_SHARED = 1 << (3 + 4), + DXGI_USAGE_READ_ONLY = 1 << (4 + 4), + DXGI_USAGE_DISCARD_ON_PRESENT = 1 << (5 + 4), + DXGI_USAGE_UNORDERED_ACCESS = 1 << (6 + 4), +}} +STRUCT!{struct DXGI_RGB { + Red: f32, + Green: f32, + Blue: f32, +}} +pub type DXGI_RGBA = ::D3DCOLORVALUE; +STRUCT!{nodebug struct DXGI_GAMMA_CONTROL { + Scale: DXGI_RGB, + Offset: DXGI_RGB, + GammaCurve: [DXGI_RGB; 1025], +}} +STRUCT!{nodebug struct DXGI_GAMMA_CONTROL_CAPABILITIES { + ScaleAndOffsetSupported: ::BOOL, + MaxConvertedValue: f32, + MinConvertedValue: f32, + NumGammaControlPoints: ::UINT, + ControlPointPositions: [f32; 1025], +}} +STRUCT!{struct DXGI_RATIONAL { + Numerator: ::UINT, + Denominator: ::UINT, +}} +ENUM!{enum DXGI_MODE_SCANLINE_ORDER { + DXGI_MODE_SCANLINE_ORDER_UNSPECIFIED, + DXGI_MODE_SCANLINE_ORDER_PROGRESSIVE, + DXGI_MODE_SCANLINE_ORDER_UPPER_FIELD_FIRST, + DXGI_MODE_SCANLINE_ORDER_LOWER_FIELD_FIRST, +}} +ENUM!{enum DXGI_MODE_SCALING { + DXGI_MODE_SCALING_UNSPECIFIED, + DXGI_MODE_SCALING_CENTERED, + DXGI_MODE_SCALING_STRETCHED, +}} +ENUM!{enum DXGI_MODE_ROTATION { + DXGI_MODE_ROTATION_UNSPECIFIED, + DXGI_MODE_ROTATION_IDENTITY, + DXGI_MODE_ROTATION_ROTATE90, + DXGI_MODE_ROTATION_ROTATE180, + DXGI_MODE_ROTATION_ROTATE270, +}} +STRUCT!{struct DXGI_MODE_DESC { + Width: ::UINT, + Height: ::UINT, + RefreshRate: DXGI_RATIONAL, + Format: ::DXGI_FORMAT, + ScanlineOrdering: DXGI_MODE_SCANLINE_ORDER, + Scaling: DXGI_MODE_SCALING, +}} +STRUCT!{struct DXGI_SAMPLE_DESC { + Count: ::UINT, + Quality: ::UINT, +}} +ENUM!{enum DXGI_COLOR_SPACE_TYPE { + DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709 = 0x0, + DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709 = 0x1, + DXGI_COLOR_SPACE_RGB_STUDIO_G22_NONE_P709 = 0x2, + DXGI_COLOR_SPACE_RGB_STUDIO_G22_NONE_P2020 = 0x3, + DXGI_COLOR_SPACE_RESERVED = 0x4, + DXGI_COLOR_SPACE_YCBCR_FULL_G22_NONE_P709_X601 = 0x5, + DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601 = 0x6, + DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P601 = 0x7, + DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709 = 0x8, + DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P709 = 0x9, + DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020 = 0xA, + DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020 = 0xB, + DXGI_COLOR_SPACE_CUSTOM = 0xFFFFFFFF, +}} +pub const DXGI_CENTER_MULTISAMPLE_QUALITY_PATTERN: ::UINT = 0xfffffffe; +pub const DXGI_STANDARD_MULTISAMPLE_QUALITY_PATTERN: ::UINT = 0xffffffff; diff --git a/deps/winapi-0.2.5/src/errhandlingapi.rs b/deps/winapi-0.2.6/src/errhandlingapi.rs similarity index 100% rename from deps/winapi-0.2.5/src/errhandlingapi.rs rename to deps/winapi-0.2.6/src/errhandlingapi.rs diff --git a/deps/winapi-0.2.5/src/excpt.rs b/deps/winapi-0.2.6/src/excpt.rs similarity index 100% rename from deps/winapi-0.2.5/src/excpt.rs rename to deps/winapi-0.2.6/src/excpt.rs diff --git a/deps/winapi-0.2.5/src/fileapi.rs b/deps/winapi-0.2.6/src/fileapi.rs similarity index 100% rename from deps/winapi-0.2.5/src/fileapi.rs rename to deps/winapi-0.2.6/src/fileapi.rs diff --git a/deps/winapi-0.2.5/src/gl.rs b/deps/winapi-0.2.6/src/gl.rs similarity index 100% rename from deps/winapi-0.2.5/src/gl.rs rename to deps/winapi-0.2.6/src/gl.rs diff --git a/deps/winapi-0.2.5/src/guiddef.rs b/deps/winapi-0.2.6/src/guiddef.rs similarity index 100% rename from deps/winapi-0.2.5/src/guiddef.rs rename to deps/winapi-0.2.6/src/guiddef.rs diff --git a/deps/winapi-0.2.5/src/heapapi.rs b/deps/winapi-0.2.6/src/heapapi.rs similarity index 100% rename from deps/winapi-0.2.5/src/heapapi.rs rename to deps/winapi-0.2.6/src/heapapi.rs diff --git a/deps/winapi-0.2.6/src/hidclass.rs b/deps/winapi-0.2.6/src/hidclass.rs new file mode 100644 index 000000000..0851d5feb --- /dev/null +++ b/deps/winapi-0.2.6/src/hidclass.rs @@ -0,0 +1,56 @@ +// Copyright © 2015, Peter Atashian and Alex Daniel Jones +// Licensed under the MIT License <LICENSE.md> +DEFINE_GUID!{GUID_DEVINTERFACE_HID, 0x4D1E55B2, 0xF16F, 0x11CF, + 0x88, 0xCB, 0x00, 0x11, 0x11, 0x00, 0x00, 0x30} +pub const GUID_CLASS_INPUT: ::GUID = GUID_DEVINTERFACE_HID; +DEFINE_GUID!{GUID_HID_INTERFACE_NOTIFY, 0x2c4e2e88, 0x25e6, 0x4c33, 0x88, 0x2f, 0x3d, 0x82, 0xe6, 0x07, 0x36, 0x81} +DEFINE_GUID!{GUID_HID_INTERFACE_HIDPARSE, 0xf5c315a5, 0x69ac, 0x4bc2, 0x92, 0x79, 0xd0, 0xb6, 0x45, 0x76, 0xf4, 0x4b} +// FIXME devpropkey stuff +pub const HID_REVISION: ::DWORD = 0x00000001; +pub const IOCTL_HID_GET_DRIVER_CONFIG: ::DWORD = HID_BUFFER_CTL_CODE!(100); +pub const IOCTL_HID_SET_DRIVER_CONFIG: ::DWORD = HID_BUFFER_CTL_CODE!(101); +pub const IOCTL_HID_GET_POLL_FREQUENCY_MSEC: ::DWORD = HID_BUFFER_CTL_CODE!(102); +pub const IOCTL_HID_SET_POLL_FREQUENCY_MSEC: ::DWORD = HID_BUFFER_CTL_CODE!(103); +pub const IOCTL_GET_NUM_DEVICE_INPUT_BUFFERS: ::DWORD = HID_BUFFER_CTL_CODE!(104); +pub const IOCTL_SET_NUM_DEVICE_INPUT_BUFFERS: ::DWORD = HID_BUFFER_CTL_CODE!(105); +pub const IOCTL_HID_GET_COLLECTION_INFORMATION: ::DWORD = HID_BUFFER_CTL_CODE!(106); +pub const IOCTL_HID_ENABLE_WAKE_ON_SX: ::DWORD = HID_BUFFER_CTL_CODE!(107); +pub const IOCTL_HID_SET_S0_IDLE_TIMEOUT: ::DWORD = HID_BUFFER_CTL_CODE!(108); +pub const IOCTL_HID_GET_COLLECTION_DESCRIPTOR: ::DWORD = HID_CTL_CODE!(100); +pub const IOCTL_HID_FLUSH_QUEUE: ::DWORD = HID_CTL_CODE!(101); +pub const IOCTL_HID_SET_FEATURE: ::DWORD = HID_IN_CTL_CODE!(100); +pub const IOCTL_HID_SET_OUTPUT_REPORT: ::DWORD = HID_IN_CTL_CODE!(101); +pub const IOCTL_HID_GET_FEATURE: ::DWORD = HID_OUT_CTL_CODE!(100); +pub const IOCTL_GET_PHYSICAL_DESCRIPTOR: ::DWORD = HID_OUT_CTL_CODE!(102); +pub const IOCTL_HID_GET_HARDWARE_ID: ::DWORD = HID_OUT_CTL_CODE!(103); +pub const IOCTL_HID_GET_INPUT_REPORT: ::DWORD = HID_OUT_CTL_CODE!(104); +pub const IOCTL_HID_GET_OUTPUT_REPORT: ::DWORD = HID_OUT_CTL_CODE!(105); +pub const IOCTL_HID_GET_MANUFACTURER_STRING: ::DWORD = HID_OUT_CTL_CODE!(110); +pub const IOCTL_HID_GET_PRODUCT_STRING: ::DWORD = HID_OUT_CTL_CODE!(111); +pub const IOCTL_HID_GET_SERIALNUMBER_STRING: ::DWORD = HID_OUT_CTL_CODE!(112); +pub const IOCTL_HID_GET_INDEXED_STRING: ::DWORD = HID_OUT_CTL_CODE!(120); +pub const IOCTL_HID_GET_MS_GENRE_DESCRIPTOR: ::DWORD = HID_OUT_CTL_CODE!(121); +pub const IOCTL_HID_ENABLE_SECURE_READ: ::DWORD = HID_CTL_CODE!(130); +pub const IOCTL_HID_DISABLE_SECURE_READ: ::DWORD = HID_CTL_CODE!(131); +pub const IOCTL_HID_DEVICERESET_NOTIFICATION: ::DWORD = HID_CTL_CODE!(140); +STRUCT!{struct HID_XFER_PACKET { + reportBuffer: ::PUCHAR, + reportBufferLen: ::ULONG, + reportId: ::UCHAR, +}} +pub type PHID_XFER_PACKET = *mut HID_XFER_PACKET; +//FIXME Stuff for NT_INCLUDED +STRUCT!{struct HID_COLLECTION_INFORMATION { + DescriptorSize: ::ULONG, + Polled: ::BOOLEAN, + Reserved1: [::UCHAR; 1], + VendorID: ::USHORT, + ProductID: ::USHORT, + VersionNumber: ::USHORT, +}} +pub type PHID_COLLECTION_INFORMATION = *mut HID_COLLECTION_INFORMATION; +STRUCT!{struct HID_DRIVER_CONFIG { + Size: ::ULONG, + RingBufferSize: ::ULONG, +}} +pub type PHID_DRIVER_CONFIG = *mut HID_DRIVER_CONFIG; diff --git a/deps/winapi-0.2.6/src/hidpi.rs b/deps/winapi-0.2.6/src/hidpi.rs new file mode 100644 index 000000000..b2321ea9e --- /dev/null +++ b/deps/winapi-0.2.6/src/hidpi.rs @@ -0,0 +1,182 @@ +// Copyright © 2015, Peter Atashian and Alex Daniel Jones +// Licensed under the MIT License <LICENSE.md> +pub const HIDP_LINK_COLLECTION_ROOT: ::USHORT = -1i16 as u16; +pub const HIDP_LINK_COLLECTION_UNSPECIFIED: ::USHORT = 0; +ENUM!{enum HIDP_REPORT_TYPE { + HidP_Input, + HidP_Output, + HidP_Feature, +}} +STRUCT!{struct USAGE_AND_PAGE { + Usage: ::USAGE, + UsagePage: ::USAGE, +}} +pub type PUSAGE_AND_PAGE = *mut USAGE_AND_PAGE; +STRUCT!{struct HIDP_BUTTON_CAPS { + UsagePage: ::USAGE, + ReportID: ::UCHAR, + IsAlias: ::BOOLEAN, + BitField: ::USHORT, + LinkCollection: ::USHORT, + LinkUsage: ::USAGE, + LinkUsagePage: ::USAGE, + IsRange: ::BOOLEAN, + IsStringRange: ::BOOLEAN, + IsDesignatorRange: ::BOOLEAN, + IsAbsolute: ::BOOLEAN, + Reserved: [::ULONG; 10], + S_un: [u16; 8], +}} +UNION!{HIDP_BUTTON_CAPS, S_un, Range, Range_mut, HIDP_RANGE_STRUCT} +UNION!{HIDP_BUTTON_CAPS, S_un, NotRange, NotRange_mut, HIDP_NOTRANGE_STRUCT} +pub type PHIDP_BUTTON_CAPS = *mut HIDP_BUTTON_CAPS; +STRUCT!{struct HIDP_RANGE_STRUCT { + UsageMin: ::USAGE, + UsageMax: ::USAGE, + StringMin: ::USHORT, + StringMax: ::USHORT, + DesignatorMin: ::USHORT, + DesignatorMax: ::USHORT, + DataIndexMin: ::USHORT, + DataIndexMax: ::USHORT, +}} +STRUCT!{struct HIDP_NOTRANGE_STRUCT { + Usage: ::USAGE, + Reserved1: ::USAGE, + StringIndex: ::USHORT, + Reserved2: ::USHORT, + DesignatorIndex: ::USHORT, + Reserved3: ::USHORT, + DataIndex: ::USHORT, + Reserved4: ::USHORT, +}} +STRUCT!{struct HIDP_VALUE_CAPS { + UsagePage: ::USAGE, + ReportID: ::UCHAR, + IsAlias: ::BOOLEAN, + BitField: ::USHORT, + LinkCollection: ::USHORT, + LinkUsage: ::USAGE, + LinkUsagePage: ::USAGE, + IsRange: ::BOOLEAN, + IsStringRange: ::BOOLEAN, + IsDesignatorRange: ::BOOLEAN, + IsAbsolute: ::BOOLEAN, + HasNull: ::BOOLEAN, + Reserved: ::UCHAR, + BitSize: ::USHORT, + ReportCount: ::USHORT, + Reserved2: [::USHORT; 5], + UnitsExp: ::ULONG, + Units: ::ULONG, + LogicalMin: ::LONG, + LogicalMax: ::LONG, + PhysicalMin: ::LONG, + PhysicalMax: ::LONG, + S_un: [u16; 8], +}} +UNION!{HIDP_VALUE_CAPS, S_un, Range, Range_mut, HIDP_RANGE_STRUCT} +UNION!{HIDP_VALUE_CAPS, S_un, NotRange, NotRange_mut, HIDP_NOTRANGE_STRUCT} +pub type PHIDP_VALUE_CAPS = *mut HIDP_VALUE_CAPS; +STRUCT!{struct HIDP_LINK_COLLECTION_NODE { + LinkUsage: ::USAGE, + LinkUsagePage: ::USAGE, + Parent: ::USHORT, + NumberOfChildren: ::USHORT, + NextSibling: ::USHORT, + FirstChild: ::USHORT, + bit_fields: ::ULONG, + UserContext: ::PVOID, +}} +BITFIELD!{HIDP_LINK_COLLECTION_NODE bit_fields: ::ULONG [ + CollectionType set_CollectionType[0..8], + IsAlias set_IsAlias[8..9], +]} +pub type PHIDP_LINK_COLLECTION_NODE = *mut HIDP_LINK_COLLECTION_NODE; +pub type PHIDP_REPORT_DESCRIPTOR = ::PUCHAR; +pub enum HIDP_PREPARSED_DATA{} +pub type PHIDP_PREPARSED_DATA = *mut HIDP_PREPARSED_DATA; +STRUCT!{struct HIDP_CAPS { + Usage: ::USAGE, + UsagePage: ::USAGE, + InputReportByteLength: ::USHORT, + OutputReportByteLength: ::USHORT, + FeatureReportByteLength: ::USHORT, + Reserved: [::USHORT; 17], + NumberLinkCollectionNodes: ::USHORT, + NumberInputButtonCaps: ::USHORT, + NumberInputValueCaps: ::USHORT, + NumberInputDataIndices: ::USHORT, + NumberOutputButtonCaps: ::USHORT, + NumberOutputValueCaps: ::USHORT, + NumberOutputDataIndices: ::USHORT, + NumberFeatureButtonCaps: ::USHORT, + NumberFeatureValueCaps: ::USHORT, + NumberFeatureDataIndices: ::USHORT, +}} +pub type PHIDP_CAPS = *mut HIDP_CAPS; +STRUCT!{struct HIDP_DATA { + DataIndex: ::USHORT, + Reserved: ::USHORT, + S_un: [u32; 1], +}} +UNION!{HIDP_DATA, S_un, RawValue, RawValue_mut, ::ULONG} +UNION!{HIDP_DATA, S_un, On, On_mut, ::BOOLEAN} +pub type PHIDP_DATA = *mut HIDP_DATA; +STRUCT!{struct HIDP_UNKNOWN_TOKEN { + Token: ::UCHAR, + Reserved: [::UCHAR; 3], + BitField: ::ULONG, +}} +pub type PHIDP_UNKNOWN_TOKEN = *mut HIDP_UNKNOWN_TOKEN; +STRUCT!{struct HIDP_EXTENDED_ATTRIBUTES { + NumGlobalUnknowns: ::UCHAR, + Reserved: [::UCHAR; 3], + GlobalUnknowns: PHIDP_UNKNOWN_TOKEN, + Data: [::ULONG; 1], +}} +pub type PHIDP_EXTENDED_ATTRIBUTES = *mut HIDP_EXTENDED_ATTRIBUTES; +ENUM!{enum HIDP_KEYBOARD_DIRECTION { + HidP_Keyboard_Break, + HidP_Keyboard_Make, +}} +STRUCT!{struct HIDP_KEYBOARD_MODIFIER_STATE { + ul: ::ULONG, +}} +BITFIELD!{HIDP_KEYBOARD_MODIFIER_STATE ul: ::ULONG [ + LeftControl set_LeftControl[0..1], + LeftShift set_LeftShift[1..2], + LeftAlt set_LeftAlt[2..3], + LeftGUI set_LeftGUI[3..4], + RightControl set_RightControl[4..5], + RightShift set_RightShift[5..6], + RightAlt set_RightAlt[6..7], + RigthGUI set_RigthGUI[7..8], + CapsLock set_CapsLock[8..9], + ScollLock set_ScollLock[9..10], + NumLock set_NumLock[10..11], +]} +pub type PHIDP_KEYBOARD_MODIFIER_STATE = *mut HIDP_KEYBOARD_MODIFIER_STATE; +pub type PHIDP_INSERT_SCANCODES = Option<unsafe extern "C" fn( + Context: ::PVOID, NewScanCodes: ::PCHAR, Length: ::ULONG, +) -> ::BOOLEAN>; +pub const HIDP_STATUS_SUCCESS: ::NTSTATUS = HIDP_ERROR_CODES!(0x0, 0); +pub const HIDP_STATUS_NULL: ::NTSTATUS = HIDP_ERROR_CODES!(0x8, 1); +pub const HIDP_STATUS_INVALID_PREPARSED_DATA: ::NTSTATUS = HIDP_ERROR_CODES!(0xC, 1); +pub const HIDP_STATUS_INVALID_REPORT_TYPE: ::NTSTATUS = HIDP_ERROR_CODES!(0xC, 2); +pub const HIDP_STATUS_INVALID_REPORT_LENGTH: ::NTSTATUS = HIDP_ERROR_CODES!(0xC, 3); +pub const HIDP_STATUS_USAGE_NOT_FOUND: ::NTSTATUS = HIDP_ERROR_CODES!(0xC, 4); +pub const HIDP_STATUS_VALUE_OUT_OF_RANGE: ::NTSTATUS = HIDP_ERROR_CODES!(0xC, 5); +pub const HIDP_STATUS_BAD_LOG_PHY_VALUES: ::NTSTATUS = HIDP_ERROR_CODES!(0xC, 6); +pub const HIDP_STATUS_BUFFER_TOO_SMALL: ::NTSTATUS = HIDP_ERROR_CODES!(0xC, 7); +pub const HIDP_STATUS_INTERNAL_ERROR: ::NTSTATUS = HIDP_ERROR_CODES!(0xC, 8); +pub const HIDP_STATUS_I8042_TRANS_UNKNOWN: ::NTSTATUS = HIDP_ERROR_CODES!(0xC, 9); +pub const HIDP_STATUS_INCOMPATIBLE_REPORT_ID: ::NTSTATUS = HIDP_ERROR_CODES!(0xC, 0xA); +pub const HIDP_STATUS_NOT_VALUE_ARRAY: ::NTSTATUS = HIDP_ERROR_CODES!(0xC, 0xB); +pub const HIDP_STATUS_IS_VALUE_ARRAY: ::NTSTATUS = HIDP_ERROR_CODES!(0xC, 0xC); +pub const HIDP_STATUS_DATA_INDEX_NOT_FOUND: ::NTSTATUS = HIDP_ERROR_CODES!(0xC, 0xD); +pub const HIDP_STATUS_DATA_INDEX_OUT_OF_RANGE: ::NTSTATUS = HIDP_ERROR_CODES!(0xC, 0xE); +pub const HIDP_STATUS_BUTTON_NOT_PRESSED: ::NTSTATUS = HIDP_ERROR_CODES!(0xC, 0xF); +pub const HIDP_STATUS_REPORT_DOES_NOT_EXIST: ::NTSTATUS = HIDP_ERROR_CODES!(0xC, 0x10); +pub const HIDP_STATUS_NOT_IMPLEMENTED: ::NTSTATUS = HIDP_ERROR_CODES!(0xC, 0x20); +pub const HIDP_STATUS_I8242_TRANS_UNKNOWN: ::NTSTATUS = HIDP_STATUS_I8042_TRANS_UNKNOWN; diff --git a/deps/winapi-0.2.6/src/hidsdi.rs b/deps/winapi-0.2.6/src/hidsdi.rs new file mode 100644 index 000000000..1b421f038 --- /dev/null +++ b/deps/winapi-0.2.6/src/hidsdi.rs @@ -0,0 +1,15 @@ +// Copyright © 2015, Peter Atashian and Alex Daniel Jones +// Licensed under the MIT License <LICENSE.md> +STRUCT!{struct HIDD_CONFIGURATION { + cookie: ::PVOID, + size: ::ULONG, + RingBufferSize: ::ULONG, +}} +pub type PHIDD_CONFIGURATION = *mut HIDD_CONFIGURATION; +STRUCT!{struct HIDD_ATTRIBUTES { + Size: ::ULONG, + VendorID: ::USHORT, + ProductID: ::USHORT, + VersionNumber: ::USHORT, +}} +pub type PHIDD_ATTRIBUTES = *mut HIDD_ATTRIBUTES; diff --git a/deps/winapi-0.2.6/src/hidusage.rs b/deps/winapi-0.2.6/src/hidusage.rs new file mode 100644 index 000000000..4d76509ec --- /dev/null +++ b/deps/winapi-0.2.6/src/hidusage.rs @@ -0,0 +1,270 @@ +// Copyright © 2015, Peter Atashian and Alex Daniel Jones +// Licensed under the MIT License <LICENSE.md> +pub type USAGE = ::USHORT; +pub type PUSAGE = *mut USAGE; +pub const HID_USAGE_PAGE_UNDEFINED: ::USAGE = 0x00; +pub const HID_USAGE_PAGE_GENERIC: ::USAGE = 0x01; +pub const HID_USAGE_PAGE_SIMULATION: ::USAGE = 0x02; +pub const HID_USAGE_PAGE_VR: ::USAGE = 0x03; +pub const HID_USAGE_PAGE_SPORT: ::USAGE = 0x04; +pub const HID_USAGE_PAGE_GAME: ::USAGE = 0x05; +pub const HID_USAGE_PAGE_KEYBOARD: ::USAGE = 0x07; +pub const HID_USAGE_PAGE_LED: ::USAGE = 0x08; +pub const HID_USAGE_PAGE_BUTTON: ::USAGE = 0x09; +pub const HID_USAGE_PAGE_ORDINAL: ::USAGE = 0x0A; +pub const HID_USAGE_PAGE_TELEPHONY: ::USAGE = 0x0B; +pub const HID_USAGE_PAGE_CONSUMER: ::USAGE = 0x0C; +pub const HID_USAGE_PAGE_DIGITIZER: ::USAGE = 0x0D; +pub const HID_USAGE_PAGE_UNICODE: ::USAGE = 0x10; +pub const HID_USAGE_PAGE_ALPHANUMERIC: ::USAGE = 0x14; +pub const HID_USAGE_PAGE_SENSOR: ::USAGE = 0x20; +pub const HID_USAGE_PAGE_BARCODE_SCANNER: ::USAGE = 0x8C; +pub const HID_USAGE_PAGE_WEIGHING_DEVICE: ::USAGE = 0x8D; +pub const HID_USAGE_PAGE_MAGNETIC_STRIPE_READER: ::USAGE = 0x8E; +pub const HID_USAGE_PAGE_CAMERA_CONTROL: ::USAGE = 0x90; +pub const HID_USAGE_PAGE_MICROSOFT_BLUETOOTH_HANDSFREE: ::USAGE = 0xFFF3; +pub const HID_USAGE_PAGE_VENDOR_DEFINED_BEGIN: ::USAGE = 0xFF00; +pub const HID_USAGE_PAGE_VENDOR_DEFINED_END: ::USAGE = 0xFFFF; +pub const HID_USAGE_GENERIC_POINTER: ::USAGE = 0x01; +pub const HID_USAGE_GENERIC_MOUSE: ::USAGE = 0x02; +pub const HID_USAGE_GENERIC_JOYSTICK: ::USAGE = 0x04; +pub const HID_USAGE_GENERIC_GAMEPAD: ::USAGE = 0x05; +pub const HID_USAGE_GENERIC_KEYBOARD: ::USAGE = 0x06; +pub const HID_USAGE_GENERIC_KEYPAD: ::USAGE = 0x07; +pub const HID_USAGE_GENERIC_PORTABLE_DEVICE_CONTROL: ::USAGE = 0x0D; +pub const HID_USAGE_GENERIC_SYSTEM_CTL: ::USAGE = 0x80; +pub const HID_USAGE_GENERIC_X: ::USAGE = 0x30; +pub const HID_USAGE_GENERIC_Y: ::USAGE = 0x31; +pub const HID_USAGE_GENERIC_Z: ::USAGE = 0x32; +pub const HID_USAGE_GENERIC_RX: ::USAGE = 0x33; +pub const HID_USAGE_GENERIC_RY: ::USAGE = 0x34; +pub const HID_USAGE_GENERIC_RZ: ::USAGE = 0x35; +pub const HID_USAGE_GENERIC_SLIDER: ::USAGE = 0x36; +pub const HID_USAGE_GENERIC_DIAL: ::USAGE = 0x37; +pub const HID_USAGE_GENERIC_WHEEL: ::USAGE = 0x38; +pub const HID_USAGE_GENERIC_HATSWITCH: ::USAGE = 0x39; +pub const HID_USAGE_GENERIC_COUNTED_BUFFER: ::USAGE = 0x3A; +pub const HID_USAGE_GENERIC_BYTE_COUNT: ::USAGE = 0x3B; +pub const HID_USAGE_GENERIC_MOTION_WAKEUP: ::USAGE = 0x3C; +pub const HID_USAGE_GENERIC_VX: ::USAGE = 0x40; +pub const HID_USAGE_GENERIC_VY: ::USAGE = 0x41; +pub const HID_USAGE_GENERIC_VZ: ::USAGE = 0x42; +pub const HID_USAGE_GENERIC_VBRX: ::USAGE = 0x43; +pub const HID_USAGE_GENERIC_VBRY: ::USAGE = 0x44; +pub const HID_USAGE_GENERIC_VBRZ: ::USAGE = 0x45; +pub const HID_USAGE_GENERIC_VNO: ::USAGE = 0x46; +pub const HID_USAGE_GENERIC_RESOLUTION_MULTIPLIER: ::USAGE = 0x48; +pub const HID_USAGE_GENERIC_SYSCTL_POWER: ::USAGE = 0x81; +pub const HID_USAGE_GENERIC_SYSCTL_SLEEP: ::USAGE = 0x82; +pub const HID_USAGE_GENERIC_SYSCTL_WAKE: ::USAGE = 0x83; +pub const HID_USAGE_GENERIC_SYSCTL_CONTEXT_MENU: ::USAGE = 0x84; +pub const HID_USAGE_GENERIC_SYSCTL_MAIN_MENU: ::USAGE = 0x85; +pub const HID_USAGE_GENERIC_SYSCTL_APP_MENU: ::USAGE = 0x86; +pub const HID_USAGE_GENERIC_SYSCTL_HELP_MENU: ::USAGE = 0x87; +pub const HID_USAGE_GENERIC_SYSCTL_MENU_EXIT: ::USAGE = 0x88; +pub const HID_USAGE_GENERIC_SYSCTL_MENU_SELECT: ::USAGE = 0x89; +pub const HID_USAGE_GENERIC_SYSCTL_MENU_RIGHT: ::USAGE = 0x8A; +pub const HID_USAGE_GENERIC_SYSCTL_MENU_LEFT: ::USAGE = 0x8B; +pub const HID_USAGE_GENERIC_SYSCTL_MENU_UP: ::USAGE = 0x8C; +pub const HID_USAGE_GENERIC_SYSCTL_MENU_DOWN: ::USAGE = 0x8D; +pub const HID_USAGE_GENERIC_SYSTEM_DISPLAY_ROTATION_LOCK_BUTTON: ::USAGE = 0xC9; +pub const HID_USAGE_GENERIC_SYSTEM_DISPLAY_ROTATION_LOCK_SLIDER_SWITCH: ::USAGE = 0xCA; +pub const HID_USAGE_GENERIC_CONTROL_ENABLE: ::USAGE = 0xCB; +pub const HID_USAGE_SIMULATION_RUDDER: ::USAGE = 0xBA; +pub const HID_USAGE_SIMULATION_THROTTLE: ::USAGE = 0xBB; +pub const HID_USAGE_KEYBOARD_NOEVENT: ::USAGE = 0x00; +pub const HID_USAGE_KEYBOARD_ROLLOVER: ::USAGE = 0x01; +pub const HID_USAGE_KEYBOARD_POSTFAIL: ::USAGE = 0x02; +pub const HID_USAGE_KEYBOARD_UNDEFINED: ::USAGE = 0x03; +pub const HID_USAGE_KEYBOARD_aA: ::USAGE = 0x04; +pub const HID_USAGE_KEYBOARD_zZ: ::USAGE = 0x1D; +pub const HID_USAGE_KEYBOARD_ONE: ::USAGE = 0x1E; +pub const HID_USAGE_KEYBOARD_ZERO: ::USAGE = 0x27; +pub const HID_USAGE_KEYBOARD_LCTRL: ::USAGE = 0xE0; +pub const HID_USAGE_KEYBOARD_LSHFT: ::USAGE = 0xE1; +pub const HID_USAGE_KEYBOARD_LALT: ::USAGE = 0xE2; +pub const HID_USAGE_KEYBOARD_LGUI: ::USAGE = 0xE3; +pub const HID_USAGE_KEYBOARD_RCTRL: ::USAGE = 0xE4; +pub const HID_USAGE_KEYBOARD_RSHFT: ::USAGE = 0xE5; +pub const HID_USAGE_KEYBOARD_RALT: ::USAGE = 0xE6; +pub const HID_USAGE_KEYBOARD_RGUI: ::USAGE = 0xE7; +pub const HID_USAGE_KEYBOARD_SCROLL_LOCK: ::USAGE = 0x47; +pub const HID_USAGE_KEYBOARD_NUM_LOCK: ::USAGE = 0x53; +pub const HID_USAGE_KEYBOARD_CAPS_LOCK: ::USAGE = 0x39; +pub const HID_USAGE_KEYBOARD_F1: ::USAGE = 0x3A; +pub const HID_USAGE_KEYBOARD_F2: ::USAGE = 0x3B; +pub const HID_USAGE_KEYBOARD_F3: ::USAGE = 0x3C; +pub const HID_USAGE_KEYBOARD_F4: ::USAGE = 0x3D; +pub const HID_USAGE_KEYBOARD_F5: ::USAGE = 0x3E; +pub const HID_USAGE_KEYBOARD_F6: ::USAGE = 0x3F; +pub const HID_USAGE_KEYBOARD_F7: ::USAGE = 0x40; +pub const HID_USAGE_KEYBOARD_F8: ::USAGE = 0x41; +pub const HID_USAGE_KEYBOARD_F9: ::USAGE = 0x42; +pub const HID_USAGE_KEYBOARD_F10: ::USAGE = 0x43; +pub const HID_USAGE_KEYBOARD_F11: ::USAGE = 0x44; +pub const HID_USAGE_KEYBOARD_F12: ::USAGE = 0x45; +pub const HID_USAGE_KEYBOARD_F13: ::USAGE = 0x68; +pub const HID_USAGE_KEYBOARD_F14: ::USAGE = 0x69; +pub const HID_USAGE_KEYBOARD_F15: ::USAGE = 0x6A; +pub const HID_USAGE_KEYBOARD_F16: ::USAGE = 0x6B; +pub const HID_USAGE_KEYBOARD_F17: ::USAGE = 0x6C; +pub const HID_USAGE_KEYBOARD_F18: ::USAGE = 0x6D; +pub const HID_USAGE_KEYBOARD_F19: ::USAGE = 0x6E; +pub const HID_USAGE_KEYBOARD_F20: ::USAGE = 0x6F; +pub const HID_USAGE_KEYBOARD_F21: ::USAGE = 0x70; +pub const HID_USAGE_KEYBOARD_F22: ::USAGE = 0x71; +pub const HID_USAGE_KEYBOARD_F23: ::USAGE = 0x72; +pub const HID_USAGE_KEYBOARD_F24: ::USAGE = 0x73; +pub const HID_USAGE_KEYBOARD_RETURN: ::USAGE = 0x28; +pub const HID_USAGE_KEYBOARD_ESCAPE: ::USAGE = 0x29; +pub const HID_USAGE_KEYBOARD_DELETE: ::USAGE = 0x2A; +pub const HID_USAGE_KEYBOARD_PRINT_SCREEN: ::USAGE = 0x46; +pub const HID_USAGE_KEYBOARD_DELETE_FORWARD: ::USAGE = 0x4C; +pub const HID_USAGE_LED_NUM_LOCK: ::USAGE = 0x01; +pub const HID_USAGE_LED_CAPS_LOCK: ::USAGE = 0x02; +pub const HID_USAGE_LED_SCROLL_LOCK: ::USAGE = 0x03; +pub const HID_USAGE_LED_COMPOSE: ::USAGE = 0x04; +pub const HID_USAGE_LED_KANA: ::USAGE = 0x05; +pub const HID_USAGE_LED_POWER: ::USAGE = 0x06; +pub const HID_USAGE_LED_SHIFT: ::USAGE = 0x07; +pub const HID_USAGE_LED_DO_NOT_DISTURB: ::USAGE = 0x08; +pub const HID_USAGE_LED_MUTE: ::USAGE = 0x09; +pub const HID_USAGE_LED_TONE_ENABLE: ::USAGE = 0x0A; +pub const HID_USAGE_LED_HIGH_CUT_FILTER: ::USAGE = 0x0B; +pub const HID_USAGE_LED_LOW_CUT_FILTER: ::USAGE = 0x0C; +pub const HID_USAGE_LED_EQUALIZER_ENABLE: ::USAGE = 0x0D; +pub const HID_USAGE_LED_SOUND_FIELD_ON: ::USAGE = 0x0E; +pub const HID_USAGE_LED_SURROUND_FIELD_ON: ::USAGE = 0x0F; +pub const HID_USAGE_LED_REPEAT: ::USAGE = 0x10; +pub const HID_USAGE_LED_STEREO: ::USAGE = 0x11; +pub const HID_USAGE_LED_SAMPLING_RATE_DETECT: ::USAGE = 0x12; +pub const HID_USAGE_LED_SPINNING: ::USAGE = 0x13; +pub const HID_USAGE_LED_CAV: ::USAGE = 0x14; +pub const HID_USAGE_LED_CLV: ::USAGE = 0x15; +pub const HID_USAGE_LED_RECORDING_FORMAT_DET: ::USAGE = 0x16; +pub const HID_USAGE_LED_OFF_HOOK: ::USAGE = 0x17; +pub const HID_USAGE_LED_RING: ::USAGE = 0x18; +pub const HID_USAGE_LED_MESSAGE_WAITING: ::USAGE = 0x19; +pub const HID_USAGE_LED_DATA_MODE: ::USAGE = 0x1A; +pub const HID_USAGE_LED_BATTERY_OPERATION: ::USAGE = 0x1B; +pub const HID_USAGE_LED_BATTERY_OK: ::USAGE = 0x1C; +pub const HID_USAGE_LED_BATTERY_LOW: ::USAGE = 0x1D; +pub const HID_USAGE_LED_SPEAKER: ::USAGE = 0x1E; +pub const HID_USAGE_LED_HEAD_SET: ::USAGE = 0x1F; +pub const HID_USAGE_LED_HOLD: ::USAGE = 0x20; +pub const HID_USAGE_LED_MICROPHONE: ::USAGE = 0x21; +pub const HID_USAGE_LED_COVERAGE: ::USAGE = 0x22; +pub const HID_USAGE_LED_NIGHT_MODE: ::USAGE = 0x23; +pub const HID_USAGE_LED_SEND_CALLS: ::USAGE = 0x24; +pub const HID_USAGE_LED_CALL_PICKUP: ::USAGE = 0x25; +pub const HID_USAGE_LED_CONFERENCE: ::USAGE = 0x26; +pub const HID_USAGE_LED_STAND_BY: ::USAGE = 0x27; +pub const HID_USAGE_LED_CAMERA_ON: ::USAGE = 0x28; +pub const HID_USAGE_LED_CAMERA_OFF: ::USAGE = 0x29; +pub const HID_USAGE_LED_ON_LINE: ::USAGE = 0x2A; +pub const HID_USAGE_LED_OFF_LINE: ::USAGE = 0x2B; +pub const HID_USAGE_LED_BUSY: ::USAGE = 0x2C; +pub const HID_USAGE_LED_READY: ::USAGE = 0x2D; +pub const HID_USAGE_LED_PAPER_OUT: ::USAGE = 0x2E; +pub const HID_USAGE_LED_PAPER_JAM: ::USAGE = 0x2F; +pub const HID_USAGE_LED_REMOTE: ::USAGE = 0x30; +pub const HID_USAGE_LED_FORWARD: ::USAGE = 0x31; +pub const HID_USAGE_LED_REVERSE: ::USAGE = 0x32; +pub const HID_USAGE_LED_STOP: ::USAGE = 0x33; +pub const HID_USAGE_LED_REWIND: ::USAGE = 0x34; +pub const HID_USAGE_LED_FAST_FORWARD: ::USAGE = 0x35; +pub const HID_USAGE_LED_PLAY: ::USAGE = 0x36; +pub const HID_USAGE_LED_PAUSE: ::USAGE = 0x37; +pub const HID_USAGE_LED_RECORD: ::USAGE = 0x38; +pub const HID_USAGE_LED_ERROR: ::USAGE = 0x39; +pub const HID_USAGE_LED_SELECTED_INDICATOR: ::USAGE = 0x3A; +pub const HID_USAGE_LED_IN_USE_INDICATOR: ::USAGE = 0x3B; +pub const HID_USAGE_LED_MULTI_MODE_INDICATOR: ::USAGE = 0x3C; +pub const HID_USAGE_LED_INDICATOR_ON: ::USAGE = 0x3D; +pub const HID_USAGE_LED_INDICATOR_FLASH: ::USAGE = 0x3E; +pub const HID_USAGE_LED_INDICATOR_SLOW_BLINK: ::USAGE = 0x3F; +pub const HID_USAGE_LED_INDICATOR_FAST_BLINK: ::USAGE = 0x40; +pub const HID_USAGE_LED_INDICATOR_OFF: ::USAGE = 0x41; +pub const HID_USAGE_LED_FLASH_ON_TIME: ::USAGE = 0x42; +pub const HID_USAGE_LED_SLOW_BLINK_ON_TIME: ::USAGE = 0x43; +pub const HID_USAGE_LED_SLOW_BLINK_OFF_TIME: ::USAGE = 0x44; +pub const HID_USAGE_LED_FAST_BLINK_ON_TIME: ::USAGE = 0x45; +pub const HID_USAGE_LED_FAST_BLINK_OFF_TIME: ::USAGE = 0x46; +pub const HID_USAGE_LED_INDICATOR_COLOR: ::USAGE = 0x47; +pub const HID_USAGE_LED_RED: ::USAGE = 0x48; +pub const HID_USAGE_LED_GREEN: ::USAGE = 0x49; +pub const HID_USAGE_LED_AMBER: ::USAGE = 0x4A; +pub const HID_USAGE_LED_GENERIC_INDICATOR: ::USAGE = 0x4B; +pub const HID_USAGE_TELEPHONY_PHONE: ::USAGE = 0x01; +pub const HID_USAGE_TELEPHONY_ANSWERING_MACHINE: ::USAGE = 0x02; +pub const HID_USAGE_TELEPHONY_MESSAGE_CONTROLS: ::USAGE = 0x03; +pub const HID_USAGE_TELEPHONY_HANDSET: ::USAGE = 0x04; +pub const HID_USAGE_TELEPHONY_HEADSET: ::USAGE = 0x05; +pub const HID_USAGE_TELEPHONY_KEYPAD: ::USAGE = 0x06; +pub const HID_USAGE_TELEPHONY_PROGRAMMABLE_BUTTON: ::USAGE = 0x07; +pub const HID_USAGE_TELEPHONY_REDIAL: ::USAGE = 0x24; +pub const HID_USAGE_TELEPHONY_TRANSFER: ::USAGE = 0x25; +pub const HID_USAGE_TELEPHONY_DROP: ::USAGE = 0x26; +pub const HID_USAGE_TELEPHONY_LINE: ::USAGE = 0x2A; +pub const HID_USAGE_TELEPHONY_RING_ENABLE: ::USAGE = 0x2D; +pub const HID_USAGE_TELEPHONY_SEND: ::USAGE = 0x31; +pub const HID_USAGE_TELEPHONY_KEYPAD_0: ::USAGE = 0xB0; +pub const HID_USAGE_TELEPHONY_KEYPAD_D: ::USAGE = 0xBF; +pub const HID_USAGE_TELEPHONY_HOST_AVAILABLE: ::USAGE = 0xF1; +pub const HID_USAGE_CONSUMERCTRL: ::USAGE = 0x01; +pub const HID_USAGE_CONSUMER_CHANNEL_INCREMENT: ::USAGE = 0x9C; +pub const HID_USAGE_CONSUMER_CHANNEL_DECREMENT: ::USAGE = 0x9D; +pub const HID_USAGE_CONSUMER_PLAY: ::USAGE = 0xB0; +pub const HID_USAGE_CONSUMER_PAUSE: ::USAGE = 0xB1; +pub const HID_USAGE_CONSUMER_RECORD: ::USAGE = 0xB2; +pub const HID_USAGE_CONSUMER_FAST_FORWARD: ::USAGE = 0xB3; +pub const HID_USAGE_CONSUMER_REWIND: ::USAGE = 0xB4; +pub const HID_USAGE_CONSUMER_SCAN_NEXT_TRACK: ::USAGE = 0xB5; +pub const HID_USAGE_CONSUMER_SCAN_PREV_TRACK: ::USAGE = 0xB6; +pub const HID_USAGE_CONSUMER_STOP: ::USAGE = 0xB7; +pub const HID_USAGE_CONSUMER_PLAY_PAUSE: ::USAGE = 0xCD; +pub const HID_USAGE_CONSUMER_VOLUME: ::USAGE = 0xE0; +pub const HID_USAGE_CONSUMER_BALANCE: ::USAGE = 0xE1; +pub const HID_USAGE_CONSUMER_MUTE: ::USAGE = 0xE2; +pub const HID_USAGE_CONSUMER_BASS: ::USAGE = 0xE3; +pub const HID_USAGE_CONSUMER_TREBLE: ::USAGE = 0xE4; +pub const HID_USAGE_CONSUMER_BASS_BOOST: ::USAGE = 0xE5; +pub const HID_USAGE_CONSUMER_SURROUND_MODE: ::USAGE = 0xE6; +pub const HID_USAGE_CONSUMER_LOUDNESS: ::USAGE = 0xE7; +pub const HID_USAGE_CONSUMER_MPX: ::USAGE = 0xE8; +pub const HID_USAGE_CONSUMER_VOLUME_INCREMENT: ::USAGE = 0xE9; +pub const HID_USAGE_CONSUMER_VOLUME_DECREMENT: ::USAGE = 0xEA; +pub const HID_USAGE_CONSUMER_BASS_INCREMENT: ::USAGE = 0x152; +pub const HID_USAGE_CONSUMER_BASS_DECREMENT: ::USAGE = 0x153; +pub const HID_USAGE_CONSUMER_TREBLE_INCREMENT: ::USAGE = 0x154; +pub const HID_USAGE_CONSUMER_TREBLE_DECREMENT: ::USAGE = 0x155; +pub const HID_USAGE_CONSUMER_AL_CONFIGURATION: ::USAGE = 0x183; +pub const HID_USAGE_CONSUMER_AL_EMAIL: ::USAGE = 0x18A; +pub const HID_USAGE_CONSUMER_AL_CALCULATOR: ::USAGE = 0x192; +pub const HID_USAGE_CONSUMER_AL_BROWSER: ::USAGE = 0x194; +pub const HID_USAGE_CONSUMER_AC_SEARCH: ::USAGE = 0x221; +pub const HID_USAGE_CONSUMER_AC_GOTO: ::USAGE = 0x222; +pub const HID_USAGE_CONSUMER_AC_HOME: ::USAGE = 0x223; +pub const HID_USAGE_CONSUMER_AC_BACK: ::USAGE = 0x224; +pub const HID_USAGE_CONSUMER_AC_FORWARD: ::USAGE = 0x225; +pub const HID_USAGE_CONSUMER_AC_STOP: ::USAGE = 0x226; +pub const HID_USAGE_CONSUMER_AC_REFRESH: ::USAGE = 0x227; +pub const HID_USAGE_CONSUMER_AC_PREVIOUS: ::USAGE = 0x228; +pub const HID_USAGE_CONSUMER_AC_NEXT: ::USAGE = 0x229; +pub const HID_USAGE_CONSUMER_AC_BOOKMARKS: ::USAGE = 0x22A; +pub const HID_USAGE_CONSUMER_AC_PAN: ::USAGE = 0x238; +pub const HID_USAGE_CONSUMER_EXTENDED_KEYBOARD_ATTRIBUTES_COLLECTION: ::USAGE = 0x2C0; +pub const HID_USAGE_CONSUMER_KEYBOARD_FORM_FACTOR: ::USAGE = 0x2C1; +pub const HID_USAGE_CONSUMER_KEYBOARD_KEY_TYPE: ::USAGE = 0x2C2; +pub const HID_USAGE_CONSUMER_KEYBOARD_PHYSICAL_LAYOUT: ::USAGE = 0x2C3; +pub const HID_USAGE_CONSUMER_VENDOR_SPECIFIC_KEYBOARD_PHYSICAL_LAYOUT: ::USAGE = 0x2C4; +pub const HID_USAGE_CONSUMER_KEYBOARD_IETF_LANGUAGE_TAG_INDEX: ::USAGE = 0x2C5; +pub const HID_USAGE_CONSUMER_IMPLEMENTED_KEYBOARD_INPUT_ASSIST_CONTROLS: ::USAGE = 0x2C6; +pub const HID_USAGE_DIGITIZER_PEN: ::USAGE = 0x02; +pub const HID_USAGE_DIGITIZER_IN_RANGE: ::USAGE = 0x32; +pub const HID_USAGE_DIGITIZER_TIP_SWITCH: ::USAGE = 0x42; +pub const HID_USAGE_DIGITIZER_BARREL_SWITCH: ::USAGE = 0x44; +pub const HID_USAGE_CAMERA_AUTO_FOCUS: ::USAGE = 0x20; +pub const HID_USAGE_CAMERA_SHUTTER: ::USAGE = 0x21; +pub const HID_USAGE_MS_BTH_HF_DIALNUMBER: ::USAGE = 0x21; +pub const HID_USAGE_MS_BTH_HF_DIALMEMORY: ::USAGE = 0x22; diff --git a/deps/winapi-0.2.6/src/hstring.rs b/deps/winapi-0.2.6/src/hstring.rs new file mode 100644 index 000000000..01cfc6d30 --- /dev/null +++ b/deps/winapi-0.2.6/src/hstring.rs @@ -0,0 +1,16 @@ +// Copyright © 2015, Peter Atashian +// Licensed under the MIT License <LICENSE.md> +//! This interface definition contains typedefs for Windows Runtime data types. +DECLARE_HANDLE!(HSTRING, HSTRING__); +#[cfg(target_arch = "x86_64")] +STRUCT!{struct HSTRING_HEADER { + Reserved: [::PVOID; 0], // For alignment + Reserved2: [::c_char; 24], +}} +#[cfg(target_arch = "x86")] +STRUCT!{struct HSTRING_HEADER { + Reserved: [::PVOID; 0], // For alignment + Reserved2: [::c_char; 20], +}} +UNION!(HSTRING_HEADER, Reserved2, Reserved1, Reserved1_mut, ::PVOID); +DECLARE_HANDLE!(HSTRING_BUFFER, HSTRING_BUFFER__); diff --git a/deps/winapi-0.2.6/src/http.rs b/deps/winapi-0.2.6/src/http.rs new file mode 100644 index 000000000..b0020f9ca --- /dev/null +++ b/deps/winapi-0.2.6/src/http.rs @@ -0,0 +1,828 @@ +// Copyright © 2015, skdltmxn +// Licensed under the MIT License <LICENSE.md> +//! HTTP API specification +pub const HTTP_INITIALIZE_SERVER: ::ULONG = 0x00000001; +pub const HTTP_INITIALIZE_CONFIG: ::ULONG = 0x00000002; +pub const HTTP_DEMAND_CBT: ::ULONG = 0x00000004; +ENUM!{enum HTTP_SERVER_PROPERTY { + HttpServerAuthenticationProperty, + HttpServerLoggingProperty, + HttpServerQosProperty, + HttpServerTimeoutsProperty, + HttpServerQueueLengthProperty, + HttpServerStateProperty, + HttpServer503VerbosityProperty, + HttpServerBindingProperty, + HttpServerExtendedAuthenticationProperty, + HttpServerListenEndpointProperty, + HttpServerChannelBindProperty, + HttpServerProtectionLevelProperty, +}} +pub type PHTTP_SERVER_PROPERTY = *mut HTTP_SERVER_PROPERTY; +STRUCT!{struct HTTP_PROPERTY_FLAGS { + BitFields: ::ULONG, +}} +BITFIELD!(HTTP_PROPERTY_FLAGS BitFields: ::ULONG [ + Present set_Present[0..1], +]); +pub type PHTTP_PROPERTY_FLAGS = *mut HTTP_PROPERTY_FLAGS; +ENUM!{enum HTTP_ENABLED_STATE { + HttpEnabledStateActive, + HttpEnabledStateInactive, +}} +pub type PHTTP_ENABLED_STATE = *mut HTTP_ENABLED_STATE; +STRUCT!{struct HTTP_STATE_INFO { + Flags: HTTP_PROPERTY_FLAGS, + State: HTTP_ENABLED_STATE, +}} +pub type PHTTP_STATE_INFO = *mut HTTP_STATE_INFO; +ENUM!{enum HTTP_503_RESPONSE_VERBOSITY { + Http503ResponseVerbosityBasic, + Http503ResponseVerbosityLimited, + Http503ResponseVerbosityFull, +}} +pub type PHTTP_503_RESPONSE_VERBOSITY = *mut HTTP_503_RESPONSE_VERBOSITY; +ENUM!{enum HTTP_QOS_SETTING_TYPE { + HttpQosSettingTypeBandwidth, + HttpQosSettingTypeConnectionLimit, + HttpQosSettingTypeFlowRate, +}} +pub type PHTTP_QOS_SETTING_TYPE = *mut HTTP_QOS_SETTING_TYPE; +STRUCT!{struct HTTP_QOS_SETTING_INFO { + QosType: HTTP_QOS_SETTING_TYPE, + QosSetting: ::PVOID, +}} +pub type PHTTP_QOS_SETTING_INFO = *mut HTTP_QOS_SETTING_INFO; +STRUCT!{struct HTTP_CONNECTION_LIMIT_INFO { + Flags: HTTP_PROPERTY_FLAGS, + MaxConnections: ::ULONG, +}} +pub type PHTTP_CONNECTION_LIMIT_INFO = *mut HTTP_CONNECTION_LIMIT_INFO; +STRUCT!{struct HTTP_BANDWIDTH_LIMIT_INFO { + Flags: HTTP_PROPERTY_FLAGS, + MaxBandwidth: ::ULONG, +}} +pub type PHTTP_BANDWIDTH_LIMIT_INFO = *mut HTTP_BANDWIDTH_LIMIT_INFO; +STRUCT!{struct HTTP_FLOWRATE_INFO { + Flags: HTTP_PROPERTY_FLAGS, + MaxBandwidth: ::ULONG, + MaxPeakBandwidth: ::ULONG, + BurstSize: ::ULONG, +}} +pub type PHTTP_FLOWRATE_INFO = *mut HTTP_FLOWRATE_INFO; +pub const HTTP_MIN_ALLOWED_BANDWIDTH_THROTTLING_RATE: ::ULONG = 1024; +pub const HTTP_LIMIT_INFINITE: ::ULONG = !0; +ENUM!{enum HTTP_SERVICE_CONFIG_TIMEOUT_KEY { + IdleConnectionTimeout = 0, + HeaderWaitTimeout, +}} +pub type PHTTP_SERVICE_CONFIG_TIMEOUT_KEY = *mut HTTP_SERVICE_CONFIG_TIMEOUT_KEY; +pub type HTTP_SERVICE_CONFIG_TIMEOUT_PARAM = ::USHORT; +pub type PHTTP_SERVICE_CONFIG_TIMEOUT_PARAM = *mut ::USHORT; +STRUCT!{struct HTTP_SERVICE_CONFIG_TIMEOUT_SET { + KeyDesc: HTTP_SERVICE_CONFIG_TIMEOUT_KEY, + ParamDesc: HTTP_SERVICE_CONFIG_TIMEOUT_PARAM, +}} +pub type PHTTP_SERVICE_CONFIG_TIMEOUT_SET = *mut HTTP_SERVICE_CONFIG_TIMEOUT_SET; +STRUCT!{struct HTTP_TIMEOUT_LIMIT_INFO { + Flags: HTTP_PROPERTY_FLAGS, + EntityBody: ::USHORT, + DrainEntityBody: ::USHORT, + RequestQueue: ::USHORT, + IdleConnection: ::USHORT, + HeaderWait: ::USHORT, + MinSendRate: ::ULONG, +}} +pub type PHTTP_TIMEOUT_LIMIT_INFO = *mut HTTP_TIMEOUT_LIMIT_INFO; +STRUCT!{struct HTTP_LISTEN_ENDPOINT_INFO { + Flags: HTTP_PROPERTY_FLAGS, + EnableSharing: ::BOOLEAN, +}} +pub type PHTTP_LISTEN_ENDPOINT_INFO = *mut HTTP_LISTEN_ENDPOINT_INFO; +STRUCT!{struct HTTP_SERVER_AUTHENTICATION_DIGEST_PARAMS { + DomainNameLength: ::USHORT, + DomainName: ::PWSTR, + RealmLength: ::USHORT, + Realm: ::PWSTR, +}} +pub type PHTTP_SERVER_AUTHENTICATION_DIGEST_PARAMS = *mut HTTP_SERVER_AUTHENTICATION_DIGEST_PARAMS; +STRUCT!{struct HTTP_SERVER_AUTHENTICATION_BASIC_PARAMS { + RealmLength: ::USHORT, + Realm: ::PWSTR, +}} +pub type PHTTP_SERVER_AUTHENTICATION_BASIC_PARAMS = *mut HTTP_SERVER_AUTHENTICATION_BASIC_PARAMS; +pub const HTTP_AUTH_ENABLE_BASIC: ::ULONG = 0x00000001; +pub const HTTP_AUTH_ENABLE_DIGEST: ::ULONG = 0x00000002; +pub const HTTP_AUTH_ENABLE_NTLM: ::ULONG = 0x00000004; +pub const HTTP_AUTH_ENABLE_NEGOTIATE: ::ULONG = 0x00000008; +pub const HTTP_AUTH_ENABLE_KERBEROS: ::ULONG = 0x00000010; +pub const HTTP_AUTH_ENABLE_ALL: ::ULONG = HTTP_AUTH_ENABLE_BASIC | HTTP_AUTH_ENABLE_DIGEST | + HTTP_AUTH_ENABLE_NTLM | HTTP_AUTH_ENABLE_NEGOTIATE | HTTP_AUTH_ENABLE_KERBEROS; +pub const HTTP_AUTH_EX_FLAG_ENABLE_KERBEROS_CREDENTIAL_CACHING: ::UCHAR = 0x01; +pub const HTTP_AUTH_EX_FLAG_CAPTURE_CREDENTIAL: ::UCHAR = 0x02; +STRUCT!{struct HTTP_SERVER_AUTHENTICATION_INFO { + Flags: HTTP_PROPERTY_FLAGS, + AuthSchemes: ::ULONG, + ReceiveMutualAuth: ::BOOLEAN, + ReceiveContextHandle: ::BOOLEAN, + DisableNTLMCredentialCaching: ::BOOLEAN, + ExFlags: ::UCHAR, + DigestParams: HTTP_SERVER_AUTHENTICATION_DIGEST_PARAMS, + BasicParams: HTTP_SERVER_AUTHENTICATION_BASIC_PARAMS, +}} +pub type PHTTP_SERVER_AUTHENTICATION_INFO = *mut HTTP_SERVER_AUTHENTICATION_INFO; +ENUM!{enum HTTP_SERVICE_BINDING_TYPE { + HttpServiceBindingTypeNone = 0, + HttpServiceBindingTypeW, + HttpServiceBindingTypeA, +}} +STRUCT!{struct HTTP_SERVICE_BINDING_BASE { + Type: HTTP_SERVICE_BINDING_TYPE, +}} +pub type PHTTP_SERVICE_BINDING_BASE = *mut HTTP_SERVICE_BINDING_BASE; +STRUCT!{struct HTTP_SERVICE_BINDING_A { + Base: HTTP_SERVICE_BINDING_BASE, + Buffer: ::PCHAR, + BufferSize: ::ULONG, +}} +pub type PHTTP_SERVICE_BINDING_A = *mut HTTP_SERVICE_BINDING_A; +STRUCT!{struct HTTP_SERVICE_BINDING_W { + Base: HTTP_SERVICE_BINDING_BASE, + Buffer: ::PWCHAR, + BufferSize: ::ULONG, +}} +pub type PHTTP_SERVICE_BINDING_W = *mut HTTP_SERVICE_BINDING_W; +ENUM!{enum HTTP_AUTHENTICATION_HARDENING_LEVELS { + HttpAuthenticationHardeningLegacy = 0, + HttpAuthenticationHardeningMedium, + HttpAuthenticationHardeningStrict, +}} +pub const HTTP_CHANNEL_BIND_PROXY: ::ULONG = 0x1; +pub const HTTP_CHANNEL_BIND_PROXY_COHOSTING: ::ULONG = 0x20; +pub const HTTP_CHANNEL_BIND_NO_SERVICE_NAME_CHECK: ::ULONG = 0x2; +pub const HTTP_CHANNEL_BIND_DOTLESS_SERVICE: ::ULONG = 0x4; +pub const HTTP_CHANNEL_BIND_SECURE_CHANNEL_TOKEN: ::ULONG = 0x8; +pub const HTTP_CHANNEL_BIND_CLIENT_SERVICE: ::ULONG = 0x10; +STRUCT!{struct HTTP_CHANNEL_BIND_INFO { + Hardening: HTTP_AUTHENTICATION_HARDENING_LEVELS, + Flags: ::ULONG, + ServiceNames: *mut PHTTP_SERVICE_BINDING_BASE, + NumberOfServiceNames: ::ULONG, +}} +pub type PHTTP_CHANNEL_BIND_INFO = *mut HTTP_CHANNEL_BIND_INFO; +STRUCT!{struct HTTP_REQUEST_CHANNEL_BIND_STATUS { + ServiceName: PHTTP_SERVICE_BINDING_BASE, + ChannelToken: ::PUCHAR, + ChannelTokenSize: ::ULONG, + Flags: ::ULONG, +}} +pub type PHTTP_REQUEST_CHANNEL_BIND_STATUS = *mut HTTP_REQUEST_CHANNEL_BIND_STATUS; +pub const HTTP_LOG_FIELD_DATE: ::ULONG = 0x00000001; +pub const HTTP_LOG_FIELD_TIME: ::ULONG = 0x00000002; +pub const HTTP_LOG_FIELD_CLIENT_IP: ::ULONG = 0x00000004; +pub const HTTP_LOG_FIELD_USER_NAME: ::ULONG = 0x00000008; +pub const HTTP_LOG_FIELD_SITE_NAME: ::ULONG = 0x00000010; +pub const HTTP_LOG_FIELD_COMPUTER_NAME: ::ULONG = 0x00000020; +pub const HTTP_LOG_FIELD_SERVER_IP: ::ULONG = 0x00000040; +pub const HTTP_LOG_FIELD_METHOD: ::ULONG = 0x00000080; +pub const HTTP_LOG_FIELD_URI_STEM: ::ULONG = 0x00000100; +pub const HTTP_LOG_FIELD_URI_QUERY: ::ULONG = 0x00000200; +pub const HTTP_LOG_FIELD_STATUS: ::ULONG = 0x00000400; +pub const HTTP_LOG_FIELD_WIN32_STATUS: ::ULONG = 0x00000800; +pub const HTTP_LOG_FIELD_BYTES_SENT: ::ULONG = 0x00001000; +pub const HTTP_LOG_FIELD_BYTES_RECV: ::ULONG = 0x00002000; +pub const HTTP_LOG_FIELD_TIME_TAKEN: ::ULONG = 0x00004000; +pub const HTTP_LOG_FIELD_SERVER_PORT: ::ULONG = 0x00008000; +pub const HTTP_LOG_FIELD_USER_AGENT: ::ULONG = 0x00010000; +pub const HTTP_LOG_FIELD_COOKIE: ::ULONG = 0x00020000; +pub const HTTP_LOG_FIELD_REFERER: ::ULONG = 0x00040000; +pub const HTTP_LOG_FIELD_VERSION: ::ULONG = 0x00080000; +pub const HTTP_LOG_FIELD_HOST: ::ULONG = 0x00100000; +pub const HTTP_LOG_FIELD_SUB_STATUS: ::ULONG = 0x00200000; +pub const HTTP_LOG_FIELD_CLIENT_PORT: ::ULONG = 0x00400000; +pub const HTTP_LOG_FIELD_URI: ::ULONG = 0x00800000; +pub const HTTP_LOG_FIELD_SITE_ID: ::ULONG = 0x01000000; +pub const HTTP_LOG_FIELD_REASON: ::ULONG = 0x02000000; +pub const HTTP_LOG_FIELD_QUEUE_NAME: ::ULONG = 0x04000000; +ENUM!{enum HTTP_LOGGING_TYPE { + HttpLoggingTypeW3C, + HttpLoggingTypeIIS, + HttpLoggingTypeNCSA, + HttpLoggingTypeRaw, +}} +ENUM!{enum HTTP_LOGGING_ROLLOVER_TYPE { + HttpLoggingRolloverSize, + HttpLoggingRolloverDaily, + HttpLoggingRolloverWeekly, + HttpLoggingRolloverMonthly, + HttpLoggingRolloverHourly, +}} +pub const HTTP_MIN_ALLOWED_LOG_FILE_ROLLOVER_SIZE: ::ULONG = (1 * 1024 * 1024) as ::ULONG; +pub const HTTP_LOGGING_FLAG_LOCAL_TIME_ROLLOVER: ::ULONG = 0x00000001; +pub const HTTP_LOGGING_FLAG_USE_UTF8_CONVERSION: ::ULONG = 0x00000002; +pub const HTTP_LOGGING_FLAG_LOG_ERRORS_ONLY: ::ULONG = 0x00000004; +pub const HTTP_LOGGING_FLAG_LOG_SUCCESS_ONLY: ::ULONG = 0x00000008; +STRUCT!{struct HTTP_LOGGING_INFO { + Flags: HTTP_PROPERTY_FLAGS, + LoggingFlags: ::ULONG, + SoftwareName: ::PCWSTR, + SoftwareNameLength: ::USHORT, + DirectoryNameLength: ::USHORT, + DirectoryName: ::PCWSTR, + Format: HTTP_LOGGING_TYPE, + Fields: ::ULONG, + pExtFields: ::PVOID, + NumOfExtFields: ::USHORT, + MaxRecordSize: ::USHORT, + RolloverType: HTTP_LOGGING_ROLLOVER_TYPE, + RolloverSize: ::ULONG, + pSecurityDescriptor: ::PSECURITY_DESCRIPTOR, +}} +pub type PHTTP_LOGGING_INFO = *mut HTTP_LOGGING_INFO; +STRUCT!{struct HTTP_BINDING_INFO { + Flags: HTTP_PROPERTY_FLAGS, + RequestQueueHandle: ::HANDLE, +}} +pub type PHTTP_BINDING_INFO = *mut HTTP_BINDING_INFO; +ENUM!{enum HTTP_PROTECTION_LEVEL_TYPE { + HttpProtectionLevelUnrestricted, + HttpProtectionLevelEdgeRestricted, + HttpProtectionLevelRestricted, +}} +pub type PHTTP_PROTECTION_LEVEL_TYPE = *mut HTTP_PROTECTION_LEVEL_TYPE; +STRUCT!{struct HTTP_PROTECTION_LEVEL_INFO { + Flags: HTTP_PROPERTY_FLAGS, + Level: HTTP_PROTECTION_LEVEL_TYPE, +}} +pub type PHTTP_PROTECTION_LEVEL_INFO = *mut HTTP_PROTECTION_LEVEL_INFO; +pub const HTTP_CREATE_REQUEST_QUEUE_FLAG_OPEN_EXISTING: ::ULONG = 0x00000001; +pub const HTTP_CREATE_REQUEST_QUEUE_FLAG_CONTROLLER: ::ULONG = 0x00000002; +pub const HTTP_RECEIVE_REQUEST_FLAG_COPY_BODY: ::ULONG = 0x00000001; +pub const HTTP_RECEIVE_REQUEST_FLAG_FLUSH_BODY: ::ULONG = 0x00000002; +pub const HTTP_RECEIVE_REQUEST_ENTITY_BODY_FLAG_FILL_BUFFER: ::ULONG = 0x00000001; +pub const HTTP_SEND_RESPONSE_FLAG_DISCONNECT: ::ULONG = 0x00000001; +pub const HTTP_SEND_RESPONSE_FLAG_MORE_DATA: ::ULONG = 0x00000002; +pub const HTTP_SEND_RESPONSE_FLAG_BUFFER_DATA: ::ULONG = 0x00000004; +pub const HTTP_SEND_RESPONSE_FLAG_ENABLE_NAGLING: ::ULONG = 0x00000008; +pub const HTTP_SEND_RESPONSE_FLAG_PROCESS_RANGES: ::ULONG = 0x00000020; +pub const HTTP_SEND_RESPONSE_FLAG_OPAQUE: ::ULONG = 0x00000040; +pub const HTTP_FLUSH_RESPONSE_FLAG_RECURSIVE: ::ULONG = 0x00000001; +pub type HTTP_OPAQUE_ID = ::ULONGLONG; +pub type PHTTP_OPAQUE_ID = *mut ::ULONGLONG; +pub type HTTP_REQUEST_ID = HTTP_OPAQUE_ID; +pub type PHTTP_REQUEST_ID = *mut HTTP_OPAQUE_ID; +pub type HTTP_CONNECTION_ID = HTTP_OPAQUE_ID; +pub type PHTTP_CONNECTION_ID = *mut HTTP_OPAQUE_ID; +pub type HTTP_RAW_CONNECTION_ID = HTTP_OPAQUE_ID; +pub type PHTTP_RAW_CONNECTION_ID = *mut HTTP_OPAQUE_ID; +pub type HTTP_URL_GROUP_ID = HTTP_OPAQUE_ID; +pub type PHTTP_URL_GROUP_ID = *mut HTTP_OPAQUE_ID; +pub type HTTP_SERVER_SESSION_ID = HTTP_OPAQUE_ID; +pub type PHTTP_SERVER_SESSION_ID = *mut HTTP_OPAQUE_ID; +pub const HTTP_BYTE_RANGE_TO_EOF: ::ULONGLONG = !0; +STRUCT!{struct HTTP_BYTE_RANGE { + StartingOffset: ::ULARGE_INTEGER, + Length: ::ULARGE_INTEGER, +}} +pub type PHTTP_BYTE_RANGE = *mut HTTP_BYTE_RANGE; +STRUCT!{struct HTTP_VERSION { + MajorVersion: ::USHORT, + MinorVersion: ::USHORT, +}} +pub type PHTTP_VERSION = *mut HTTP_VERSION; +pub const HTTP_VERSION_UNKNOWN: HTTP_VERSION = HTTP_VERSION { MajorVersion: 0, MinorVersion: 0 }; +pub const HTTP_VERSION_0_9: HTTP_VERSION = HTTP_VERSION { MajorVersion: 0, MinorVersion: 9 }; +pub const HTTP_VERSION_1_0: HTTP_VERSION = HTTP_VERSION { MajorVersion: 1, MinorVersion: 0 }; +pub const HTTP_VERSION_1_1: HTTP_VERSION = HTTP_VERSION { MajorVersion: 1, MinorVersion: 1 }; +#[inline] #[allow(dead_code)] +pub fn HTTP_SET_VERSION(mut version: HTTP_VERSION, major: ::USHORT, minor: ::USHORT) { + version.MajorVersion = major; + version.MinorVersion = minor; +} +#[inline] #[allow(dead_code)] +pub fn HTTP_EQUAL_VERSION(version: HTTP_VERSION, major: ::USHORT, minor: ::USHORT) -> bool { + version.MajorVersion == major && version.MinorVersion == minor +} +#[inline] #[allow(dead_code)] +pub fn HTTP_GREATER_VERSION(version: HTTP_VERSION, major: ::USHORT, minor: ::USHORT) -> bool { + version.MajorVersion > major || (version.MajorVersion == major && version.MinorVersion > minor) +} +#[inline] #[allow(dead_code)] +pub fn HTTP_LESS_VERSION(version: HTTP_VERSION, major: ::USHORT, minor: ::USHORT) -> bool { + version.MajorVersion < major || (version.MajorVersion == major && version.MinorVersion < minor) +} +#[inline] #[allow(dead_code)] +pub fn HTTP_NOT_EQUAL_VERSION(version: HTTP_VERSION, major: ::USHORT, minor: ::USHORT) -> bool { + !HTTP_EQUAL_VERSION(version, major, minor) +} +#[inline] #[allow(dead_code)] +pub fn HTTP_GREATER_EQUAL_VERSION(version: HTTP_VERSION, major: ::USHORT, minor: ::USHORT) -> bool { + !HTTP_LESS_VERSION(version, major, minor) +} +#[inline] #[allow(dead_code)] +pub fn HTTP_LESS_EQUAL_VERSION(version: HTTP_VERSION, major: ::USHORT, minor: ::USHORT) -> bool { + !HTTP_GREATER_VERSION(version, major, minor) +} +ENUM!{enum HTTP_VERB { + HttpVerbUnparsed, + HttpVerbUnknown, + HttpVerbInvalid, + HttpVerbOPTIONS, + HttpVerbGET, + HttpVerbHEAD, + HttpVerbPOST, + HttpVerbPUT, + HttpVerbDELETE, + HttpVerbTRACE, + HttpVerbCONNECT, + HttpVerbTRACK, + HttpVerbMOVE, + HttpVerbCOPY, + HttpVerbPROPFIND, + HttpVerbPROPPATCH, + HttpVerbMKCOL, + HttpVerbLOCK, + HttpVerbUNLOCK, + HttpVerbSEARCH, + HttpVerbMaximum, +}} +pub type PHTTP_VERB = *mut HTTP_VERB; +ENUM!{enum HTTP_HEADER_ID { + HttpHeaderCacheControl = 0, + HttpHeaderConnection = 1, + HttpHeaderDate = 2, + HttpHeaderKeepAlive = 3, + HttpHeaderPragma = 4, + HttpHeaderTrailer = 5, + HttpHeaderTransferEncoding = 6, + HttpHeaderUpgrade = 7, + HttpHeaderVia = 8, + HttpHeaderWarning = 9, + HttpHeaderAllow = 10, + HttpHeaderContentLength = 11, + HttpHeaderContentType = 12, + HttpHeaderContentEncoding = 13, + HttpHeaderContentLanguage = 14, + HttpHeaderContentLocation = 15, + HttpHeaderContentMd5 = 16, + HttpHeaderContentRange = 17, + HttpHeaderExpires = 18, + HttpHeaderLastModified = 19, + HttpHeaderAccept = 20, + HttpHeaderAcceptCharset = 21, + HttpHeaderAcceptEncoding = 22, + HttpHeaderAcceptLanguage = 23, + HttpHeaderAuthorization = 24, + HttpHeaderCookie = 25, + HttpHeaderExpect = 26, + HttpHeaderFrom = 27, + HttpHeaderHost = 28, + HttpHeaderIfMatch = 29, + HttpHeaderIfModifiedSince = 30, + HttpHeaderIfNoneMatch = 31, + HttpHeaderIfRange = 32, + HttpHeaderIfUnmodifiedSince = 33, + HttpHeaderMaxForwards = 34, + HttpHeaderProxyAuthorization = 35, + HttpHeaderReferer = 36, + HttpHeaderRange = 37, + HttpHeaderTe = 38, + HttpHeaderTranslate = 39, + HttpHeaderUserAgent = 40, + HttpHeaderRequestMaximum = 41, + HttpHeaderAcceptRanges = 20, + HttpHeaderAge = 21, + HttpHeaderEtag = 22, + HttpHeaderLocation = 23, + HttpHeaderProxyAuthenticate = 24, + HttpHeaderRetryAfter = 25, + HttpHeaderServer = 26, + HttpHeaderSetCookie = 27, + HttpHeaderVary = 28, + HttpHeaderWwwAuthenticate = 29, + HttpHeaderResponseMaximum = 30, + HttpHeaderMaximum = 41, +}} +pub type PHTTP_HEADER_ID = *mut HTTP_HEADER_ID; +STRUCT!{struct HTTP_KNOWN_HEADER { + RawValueLength: ::USHORT, + pRawValue: ::PCSTR, +}} +pub type PHTTP_KNOWN_HEADER = *mut HTTP_KNOWN_HEADER; +STRUCT!{struct HTTP_UNKNOWN_HEADER { + NameLength: ::USHORT, + RawValueLength: ::USHORT, + pName: ::PCSTR, + pRawValue: ::PCSTR, +}} +pub type PHTTP_UNKNOWN_HEADER = *mut HTTP_UNKNOWN_HEADER; +ENUM!{enum HTTP_LOG_DATA_TYPE { + HttpLogDataTypeFields = 0, +}} +pub type PHTTP_LOG_DATA_TYPE = *mut HTTP_LOG_DATA_TYPE; +STRUCT!{struct HTTP_LOG_DATA { + Type: HTTP_LOG_DATA_TYPE, +}} +pub type PHTTP_LOG_DATA = *mut HTTP_LOG_DATA; +STRUCT!{struct HTTP_LOG_FIELDS_DATA { + Base: HTTP_LOG_DATA, + UserNameLength: ::USHORT, + UriStemLength: ::USHORT, + ClientIpLength: ::USHORT, + ServerNameLength: ::USHORT, + ServiceNameLength: ::USHORT, + ServerIpLength: ::USHORT, + MethodLength: ::USHORT, + UriQueryLength: ::USHORT, + HostLength: ::USHORT, + UserAgentLength: ::USHORT, + CookieLength: ::USHORT, + ReferrerLength: ::USHORT, + UserName: ::PWCHAR, + UriStem: ::PWCHAR, + ClientIp: ::PCHAR, + ServerName: ::PCHAR, + ServiceName: ::PCHAR, + ServerIp: ::PCHAR, + Method: ::PCHAR, + UriQuery: ::PCHAR, + Host: ::PCHAR, + UserAgent: ::PCHAR, + Cookie: ::PCHAR, + Referrer: ::PCHAR, + ServerPort: ::USHORT, + ProtocolStatus: ::USHORT, + Win32Status: ::ULONG, + MethodNum: HTTP_VERB, + SubStatus: ::USHORT, +}} +pub type PHTTP_LOG_FIELDS_DATA = *mut HTTP_LOG_FIELDS_DATA; +ENUM!{enum HTTP_DATA_CHUNK_TYPE { + HttpDataChunkFromMemory, + HttpDataChunkFromFileHandle, + HttpDataChunkFromFragmentCache, + HttpDataChunkFromFragmentCacheEx, + HttpDataChunkMaximum, +}} +pub type PHTTP_DATA_CHUNK_TYPE = *mut HTTP_DATA_CHUNK_TYPE; +STRUCT!{struct HTTP_DATA_CHUNK_FromMemory { + pBuffer: ::PVOID, + BufferLength: ::ULONG, +}} +STRUCT!{struct HTTP_DATA_CHUNK_FromFileHandle { + ByteRange: HTTP_BYTE_RANGE, + FileHandle: ::HANDLE, +}} +STRUCT!{struct HTTP_DATA_CHUNK_FromFragmentCache { + FragmentNameLength: ::USHORT, + pFragmentName: ::PCWSTR, +}} +STRUCT!{struct HTTP_DATA_CHUNK_FromFragmentCacheEx { + ByteRange: HTTP_BYTE_RANGE, + pFragmentName: ::PCWSTR, +}} +STRUCT!{struct HTTP_DATA_CHUNK { + DataChunkType: HTTP_DATA_CHUNK_TYPE, + FromFileHandle: HTTP_DATA_CHUNK_FromFileHandle, +}} +UNION!(HTTP_DATA_CHUNK, FromFileHandle, FromMemory, FromMemory_mut, HTTP_DATA_CHUNK_FromMemory); +UNION!( + HTTP_DATA_CHUNK, FromFileHandle, FromFragmentCache, FromFragmentCache_mut, + HTTP_DATA_CHUNK_FromFragmentCache +); +UNION!( + HTTP_DATA_CHUNK, FromFileHandle, FromFragmentCacheEx, FromFragmentCacheEx_mut, + HTTP_DATA_CHUNK_FromFragmentCacheEx +); +pub type PHTTP_DATA_CHUNK = *mut HTTP_DATA_CHUNK; +STRUCT!{nodebug struct HTTP_REQUEST_HEADERS { + UnknownHeaderCount: ::USHORT, + pUnknownHeaders: PHTTP_UNKNOWN_HEADER, + TrailerCount: ::USHORT, + pTrailers: PHTTP_UNKNOWN_HEADER, + KnownHeaders: [HTTP_KNOWN_HEADER; 41], // FIXME HttpHeaderRequestMaximum +}} +pub type PHTTP_REQUEST_HEADERS = *mut HTTP_REQUEST_HEADERS; +STRUCT!{nodebug struct HTTP_RESPONSE_HEADERS { + UnknownHeaderCount: ::USHORT, + pUnknownHeaders: PHTTP_UNKNOWN_HEADER, + TrailerCount: ::USHORT, + pTrailers: PHTTP_UNKNOWN_HEADER, + KnownHeaders: [HTTP_KNOWN_HEADER; 30], // FIXME HttpHeaderResponseMaximum +}} +pub type PHTTP_RESPONSE_HEADERS = *mut HTTP_RESPONSE_HEADERS; +STRUCT!{struct HTTP_TRANSPORT_ADDRESS { + pRemoteAddress: ::PSOCKADDR, + pLocalAddress: ::PSOCKADDR, +}} +pub type PHTTP_TRANSPORT_ADDRESS = *mut HTTP_TRANSPORT_ADDRESS; +STRUCT!{struct HTTP_COOKED_URL { + FullUrlLength: ::USHORT, + HostLength: ::USHORT, + AbsPathLength: ::USHORT, + QueryStringLength: ::USHORT, + pFullUrl: ::PCWSTR, + pHost: ::PCWSTR, + pAbsPath: ::PCWSTR, + pQueryString: ::PCWSTR, +}} +pub type PHTTP_COOKED_URL = *mut HTTP_COOKED_URL; +pub type HTTP_URL_CONTEXT = ::ULONGLONG; +pub const HTTP_URL_FLAG_REMOVE_ALL: ::ULONG = 0x00000001; +ENUM!{enum HTTP_AUTH_STATUS { + HttpAuthStatusSuccess, + HttpAuthStatusNotAuthenticated, + HttpAuthStatusFailure, +}} +pub type PHTTP_AUTH_STATUS = *mut HTTP_AUTH_STATUS; +ENUM!{enum HTTP_REQUEST_AUTH_TYPE { + HttpRequestAuthTypeNone = 0, + HttpRequestAuthTypeBasic, + HttpRequestAuthTypeDigest, + HttpRequestAuthTypeNTLM, + HttpRequestAuthTypeNegotiate, + HttpRequestAuthTypeKerberos, +}} +pub type PHTTP_REQUEST_AUTH_TYPE = *mut HTTP_REQUEST_AUTH_TYPE; +STRUCT!{struct HTTP_SSL_CLIENT_CERT_INFO { + CertFlags: ::ULONG, + CertEncodedSize: ::ULONG, + pCertEncoded: ::PUCHAR, + Token: ::HANDLE, + CertDeniedByMapper: ::BOOLEAN, +}} +pub type PHTTP_SSL_CLIENT_CERT_INFO = *mut HTTP_SSL_CLIENT_CERT_INFO; +pub const HTTP_RECEIVE_SECURE_CHANNEL_TOKEN: ::ULONG = 0x1; +STRUCT!{struct HTTP_SSL_INFO { + ServerCertKeySize: ::USHORT, + ConnectionKeySize: ::USHORT, + ServerCertIssuerSize: ::ULONG, + ServerCertSubjectSize: ::ULONG, + pServerCertIssuer: ::PCSTR, + pServerCertSubject: ::PCSTR, + pClientCertInfo: PHTTP_SSL_CLIENT_CERT_INFO, + SslClientCertNegotiated: ::ULONG, +}} +pub type PHTTP_SSL_INFO = *mut HTTP_SSL_INFO; +ENUM!{enum HTTP_REQUEST_INFO_TYPE { + HttpRequestInfoTypeAuth, + HttpRequestInfoTypeChannelBind, +}} +STRUCT!{struct HTTP_REQUEST_INFO { + InfoType: HTTP_REQUEST_INFO_TYPE, + InfoLength: ::ULONG, + pInfo: ::PVOID, +}} +pub type PHTTP_REQUEST_INFO = *mut HTTP_REQUEST_INFO; +pub const HTTP_REQUEST_AUTH_FLAG_TOKEN_FOR_CACHED_CRED: ::ULONG = 0x00000001; +STRUCT!{struct HTTP_REQUEST_AUTH_INFO { + AuthStatus: HTTP_AUTH_STATUS, + SecStatus: ::SECURITY_STATUS, + Flags: ::ULONG, + AuthType: HTTP_REQUEST_AUTH_TYPE, + AccessToken: ::HANDLE, + ContextAttributes: ::ULONG, + PackedContextLength: ::ULONG, + PackedContextType: ::ULONG, + PackedContext: ::PVOID, + MutualAuthDataLength: ::ULONG, + pMutualAuthData: ::PCHAR, + PackageNameLength: ::USHORT, + pPackageName: ::PWSTR, +}} +pub type PHTTP_REQUEST_AUTH_INFO = *mut HTTP_REQUEST_AUTH_INFO; +STRUCT!{nodebug struct HTTP_REQUEST_V1 { + Flags: ::ULONG, + ConnectionId: HTTP_CONNECTION_ID, + RequestId: HTTP_REQUEST_ID, + UrlContext: HTTP_URL_CONTEXT, + Version: HTTP_VERSION, + Verb: HTTP_VERB, + UnknownVerbLength: ::USHORT, + RawUrlLength: ::USHORT, + pUnknownVerb: ::PCSTR, + pRawUrl: ::PCSTR, + CookedUrl: HTTP_COOKED_URL, + Address: HTTP_TRANSPORT_ADDRESS, + Headers: HTTP_REQUEST_HEADERS, + BytesReceived: ::ULONGLONG, + EntityChunkCount: ::USHORT, + pEntityChunks: PHTTP_DATA_CHUNK, + RawConnectionId: HTTP_RAW_CONNECTION_ID, + pSslInfo: PHTTP_SSL_INFO, +}} +pub type PHTTP_REQUEST_V1 = *mut HTTP_REQUEST_V1; +STRUCT!{nodebug struct HTTP_REQUEST_V2 { + Base: HTTP_REQUEST_V1, + RequestInfoCount: ::USHORT, + pRequestInfo: PHTTP_REQUEST_INFO, +}} +pub type PHTTP_REQUEST_V2 = *mut HTTP_REQUEST_V2; +pub type HTTP_REQUEST = HTTP_REQUEST_V2; +pub type PHTTP_REQUEST = *mut HTTP_REQUEST; +pub const HTTP_REQUEST_FLAG_MORE_ENTITY_BODY_EXISTS: ::ULONG = 0x00000001; +pub const HTTP_REQUEST_FLAG_IP_ROUTED: ::ULONG = 0x00000002; +STRUCT!{nodebug struct HTTP_RESPONSE_V1 { + Flags: ::ULONG, + Version: HTTP_VERSION, + StatusCode: ::USHORT, + ReasonLength: ::USHORT, + pReason: ::PCSTR, + Headers: HTTP_RESPONSE_HEADERS, + EntityChunkCount: ::USHORT, + pEntityChunks: PHTTP_DATA_CHUNK, +}} +pub type PHTTP_RESPONSE_V1 = *mut HTTP_RESPONSE_V1; +pub const HTTP_RESPONSE_FLAG_MULTIPLE_ENCODINGS_AVAILABLE: ::ULONG = 0x00000001; +ENUM!{enum HTTP_RESPONSE_INFO_TYPE { + HttpResponseInfoTypeMultipleKnownHeaders, + HttpResponseInfoTypeAuthenticationProperty, + HttpResponseInfoTypeQoSProperty, + HttpResponseInfoTypeChannelBind, +}} +pub type PHTTP_RESPONSE_INFO_TYPE = *mut HTTP_RESPONSE_INFO_TYPE; +STRUCT!{struct HTTP_RESPONSE_INFO { + Type: HTTP_RESPONSE_INFO_TYPE, + Length: ::ULONG, + pInfo: ::PVOID, +}} +pub type PHTTP_RESPONSE_INFO = *mut HTTP_RESPONSE_INFO; +pub const HTTP_RESPONSE_INFO_FLAGS_PRESERVE_ORDER: ::ULONG = 0x00000001; +STRUCT!{struct HTTP_MULTIPLE_KNOWN_HEADERS { + HeaderId: HTTP_HEADER_ID, + Flags: ::ULONG, + KnownHeaderCount: ::USHORT, + KnownHeaders: PHTTP_KNOWN_HEADER, +}} +pub type PHTTP_MULTIPLE_KNOWN_HEADERS = *mut HTTP_MULTIPLE_KNOWN_HEADERS; +STRUCT!{nodebug struct HTTP_RESPONSE_V2 { + Base: HTTP_RESPONSE_V1, + ResponseInfoCount: ::USHORT, + pResponseInfo: PHTTP_RESPONSE_INFO, +}} +pub type PHTTP_RESPONSE_V2 = *mut HTTP_RESPONSE_V2; +pub type HTTP_RESPONSE = HTTP_RESPONSE_V2; +pub type PHTTP_RESPONSE = *mut HTTP_RESPONSE; +STRUCT!{struct HTTPAPI_VERSION { + HttpApiMajorVersion: ::USHORT, + HttpApiMinorVersion: ::USHORT, +}} +pub type PHTTPAPI_VERSION = *mut HTTPAPI_VERSION; +pub const HTTPAPI_VERSION_2: HTTPAPI_VERSION = HTTPAPI_VERSION { + HttpApiMajorVersion: 2, HttpApiMinorVersion: 0, +}; +pub const HTTPAPI_VERSION_1: HTTPAPI_VERSION = HTTPAPI_VERSION { + HttpApiMajorVersion: 1, HttpApiMinorVersion: 0, +}; +#[inline] #[allow(dead_code)] +pub fn HTTPAPI_EQUAL_VERSION(version: HTTPAPI_VERSION, major: ::USHORT, minor: ::USHORT) -> bool { + version.HttpApiMajorVersion == major && version.HttpApiMinorVersion == minor +} +#[inline] #[allow(dead_code)] +pub fn HTTPAPI_GREATER_VERSION(version: HTTPAPI_VERSION, major: ::USHORT, minor: ::USHORT) -> bool { + version.HttpApiMajorVersion > major || + (version.HttpApiMajorVersion == major && version.HttpApiMinorVersion > minor) +} +#[inline] #[allow(dead_code)] +pub fn HTTPAPI_LESS_VERSION(version: HTTPAPI_VERSION, major: ::USHORT, minor: ::USHORT) -> bool { + version.HttpApiMajorVersion < major || + (version.HttpApiMajorVersion == major && version.HttpApiMinorVersion < minor) +} +#[inline] #[allow(dead_code)] +pub fn HTTPAPI_VERSION_GREATER_OR_EQUAL( + version: HTTPAPI_VERSION, major: ::USHORT, minor: ::USHORT +) -> bool { + !HTTPAPI_LESS_VERSION(version, major, minor) +} +ENUM!{enum HTTP_CACHE_POLICY_TYPE { + HttpCachePolicyNocache, + HttpCachePolicyUserInvalidates, + HttpCachePolicyTimeToLive, + HttpCachePolicyMaximum, +}} +pub type PHTTP_CACHE_POLICY_TYPE = *mut HTTP_CACHE_POLICY_TYPE; +STRUCT!{struct HTTP_CACHE_POLICY { + Policy: HTTP_CACHE_POLICY_TYPE, + SecondsToLive: ::ULONG, +}} +pub type PHTTP_CACHE_POLICY = *mut HTTP_CACHE_POLICY; +ENUM!{enum HTTP_SERVICE_CONFIG_ID { + HttpServiceConfigIPListenList, + HttpServiceConfigSSLCertInfo, + HttpServiceConfigUrlAclInfo, + HttpServiceConfigTimeout, + HttpServiceConfigCache, + HttpServiceConfigSslSniCertInfo, + HttpServiceConfigSslCcsCertInfo, + HttpServiceConfigMax, +}} +pub type PHTTP_SERVICE_CONFIG_ID = *mut HTTP_SERVICE_CONFIG_ID; +ENUM!{enum HTTP_SERVICE_CONFIG_QUERY_TYPE { + HttpServiceConfigQueryExact, + HttpServiceConfigQueryNext, + HttpServiceConfigQueryMax, +}} +pub type PHTTP_SERVICE_CONFIG_QUERY_TYPE = *mut HTTP_SERVICE_CONFIG_QUERY_TYPE; +STRUCT!{struct HTTP_SERVICE_CONFIG_SSL_KEY { + pIpPort: ::PSOCKADDR, +}} +pub type PHTTP_SERVICE_CONFIG_SSL_KEY = *mut HTTP_SERVICE_CONFIG_SSL_KEY; +STRUCT!{nodebug struct HTTP_SERVICE_CONFIG_SSL_SNI_KEY { + IpPort: ::SOCKADDR_STORAGE, + Host: ::PWSTR, +}} +pub type PHTTP_SERVICE_CONFIG_SSL_SNI_KEY = *mut HTTP_SERVICE_CONFIG_SSL_SNI_KEY; +STRUCT!{nodebug struct HTTP_SERVICE_CONFIG_SSL_CCS_KEY { + LocalAddress: ::SOCKADDR_STORAGE, +}} +pub type PHTTP_SERVICE_CONFIG_SSL_CCS_KEY = *mut HTTP_SERVICE_CONFIG_SSL_CCS_KEY; +STRUCT!{struct HTTP_SERVICE_CONFIG_SSL_PARAM { + SslHashLength: ::ULONG, + pSslHash: ::PVOID, + AppId: ::GUID, + pSslCertStoreName: ::PWSTR, + DefaultCertCheckMode: ::DWORD, + DefaultRevocationFreshnessTime: ::DWORD, + DefaultRevocationUrlRetrievalTimeout: ::DWORD, + pDefaultSslCtlIdentifier: ::PWSTR, + pDefaultSslCtlStoreName: ::PWSTR, + DefaultFlags: ::DWORD, +}} +pub type PHTTP_SERVICE_CONFIG_SSL_PARAM = *mut HTTP_SERVICE_CONFIG_SSL_PARAM; +pub const HTTP_SERVICE_CONFIG_SSL_FLAG_USE_DS_MAPPER: ::DWORD = 0x00000001; +pub const HTTP_SERVICE_CONFIG_SSL_FLAG_NEGOTIATE_CLIENT_CERT: ::DWORD = 0x00000002; +pub const HTTP_SERVICE_CONFIG_SSL_FLAG_NO_RAW_FILTER: ::DWORD = 0x00000004; +STRUCT!{struct HTTP_SERVICE_CONFIG_SSL_SET { + KeyDesc: HTTP_SERVICE_CONFIG_SSL_KEY, + ParamDesc: HTTP_SERVICE_CONFIG_SSL_PARAM, +}} +pub type PHTTP_SERVICE_CONFIG_SSL_SET = *mut HTTP_SERVICE_CONFIG_SSL_SET; +STRUCT!{nodebug struct HTTP_SERVICE_CONFIG_SSL_SNI_SET { + KeyDesc: HTTP_SERVICE_CONFIG_SSL_SNI_KEY, + ParamDesc: HTTP_SERVICE_CONFIG_SSL_PARAM, +}} +pub type PHTTP_SERVICE_CONFIG_SSL_SNI_SET = *mut HTTP_SERVICE_CONFIG_SSL_SNI_SET; +STRUCT!{nodebug struct HTTP_SERVICE_CONFIG_SSL_CCS_SET { + KeyDesc: HTTP_SERVICE_CONFIG_SSL_CCS_KEY, + ParamDesc: HTTP_SERVICE_CONFIG_SSL_PARAM, +}} +pub type PHTTP_SERVICE_CONFIG_SSL_CCS_SET = *mut HTTP_SERVICE_CONFIG_SSL_CCS_SET; +STRUCT!{struct HTTP_SERVICE_CONFIG_SSL_QUERY { + QueryDesc: HTTP_SERVICE_CONFIG_QUERY_TYPE, + KeyDesc: HTTP_SERVICE_CONFIG_SSL_KEY, + dwToken: ::DWORD, +}} +pub type PHTTP_SERVICE_CONFIG_SSL_QUERY = *mut HTTP_SERVICE_CONFIG_SSL_QUERY; +STRUCT!{nodebug struct HTTP_SERVICE_CONFIG_SSL_SNI_QUERY { + QueryDesc: HTTP_SERVICE_CONFIG_QUERY_TYPE, + KeyDesc: HTTP_SERVICE_CONFIG_SSL_SNI_KEY, + dwToken: ::DWORD, +}} +pub type PHTTP_SERVICE_CONFIG_SSL_SNI_QUERY = *mut HTTP_SERVICE_CONFIG_SSL_SNI_QUERY; +STRUCT!{nodebug struct HTTP_SERVICE_CONFIG_SSL_CCS_QUERY { + QueryDesc: HTTP_SERVICE_CONFIG_QUERY_TYPE, + KeyDesc: HTTP_SERVICE_CONFIG_SSL_CCS_KEY, + dwToken: ::DWORD, +}} +pub type PHTTP_SERVICE_CONFIG_SSL_CCS_QUERY = *mut HTTP_SERVICE_CONFIG_SSL_CCS_QUERY; +STRUCT!{struct HTTP_SERVICE_CONFIG_IP_LISTEN_PARAM { + AddrLength: ::USHORT, + pAddress: ::PSOCKADDR, +}} +pub type PHTTP_SERVICE_CONFIG_IP_LISTEN_PARAM = *mut HTTP_SERVICE_CONFIG_IP_LISTEN_PARAM; +STRUCT!{nodebug struct HTTP_SERVICE_CONFIG_IP_LISTEN_QUERY { + AddrCount: ::ULONG, + AddrList: [::SOCKADDR_STORAGE; ::ANYSIZE_ARRAY], +}} +pub type PHTTP_SERVICE_CONFIG_IP_LISTEN_QUERY = *mut HTTP_SERVICE_CONFIG_IP_LISTEN_QUERY; +STRUCT!{struct HTTP_SERVICE_CONFIG_URLACL_KEY { + pUrlPrefix: ::PWSTR, +}} +pub type PHTTP_SERVICE_CONFIG_URLACL_KEY = *mut HTTP_SERVICE_CONFIG_URLACL_KEY; +STRUCT!{struct HTTP_SERVICE_CONFIG_URLACL_PARAM { + pStringSecurityDescriptor: ::PWSTR, +}} +pub type PHTTP_SERVICE_CONFIG_URLACL_PARAM = *mut HTTP_SERVICE_CONFIG_URLACL_PARAM; +STRUCT!{struct HTTP_SERVICE_CONFIG_URLACL_SET { + KeyDesc: HTTP_SERVICE_CONFIG_URLACL_KEY, + ParamDesc: HTTP_SERVICE_CONFIG_URLACL_PARAM, +}} +pub type PHTTP_SERVICE_CONFIG_URLACL_SET = *mut HTTP_SERVICE_CONFIG_URLACL_SET; +STRUCT!{struct HTTP_SERVICE_CONFIG_URLACL_QUERY { + QueryDesc: HTTP_SERVICE_CONFIG_QUERY_TYPE, + KeyDesc: HTTP_SERVICE_CONFIG_URLACL_KEY, + dwToken: ::DWORD, +}} +pub type PHTTP_SERVICE_CONFIG_URLACL_QUERY = *mut HTTP_SERVICE_CONFIG_URLACL_QUERY; +ENUM!{enum HTTP_SERVICE_CONFIG_CACHE_KEY { + MaxCacheResponseSize = 0, + CacheRangeChunkSize, +}} +pub type PHTTP_SERVICE_CONFIG_CACHE_KEY = *mut HTTP_SERVICE_CONFIG_CACHE_KEY; +pub type HTTP_SERVICE_CONFIG_CACHE_PARAM = ::ULONG; +pub type PHTTP_SERVICE_CONFIG_CACHE_PARAM = *mut ::ULONG; +STRUCT!{struct HTTP_SERVICE_CONFIG_CACHE_SET { + KeyDesc: HTTP_SERVICE_CONFIG_CACHE_KEY, + ParamDesc: HTTP_SERVICE_CONFIG_CACHE_PARAM, +}} +pub type PHTTP_SERVICE_CONFIG_CACHE_SET = *mut HTTP_SERVICE_CONFIG_CACHE_SET; diff --git a/deps/winapi-0.2.5/src/imm.rs b/deps/winapi-0.2.6/src/imm.rs similarity index 100% rename from deps/winapi-0.2.5/src/imm.rs rename to deps/winapi-0.2.6/src/imm.rs diff --git a/deps/winapi-0.2.5/src/inaddr.rs b/deps/winapi-0.2.6/src/inaddr.rs similarity index 100% rename from deps/winapi-0.2.5/src/inaddr.rs rename to deps/winapi-0.2.6/src/inaddr.rs diff --git a/deps/winapi-0.2.5/src/inspectable.rs b/deps/winapi-0.2.6/src/inspectable.rs similarity index 100% rename from deps/winapi-0.2.5/src/inspectable.rs rename to deps/winapi-0.2.6/src/inspectable.rs diff --git a/deps/winapi-0.2.5/src/ksmedia.rs b/deps/winapi-0.2.6/src/ksmedia.rs similarity index 100% rename from deps/winapi-0.2.5/src/ksmedia.rs rename to deps/winapi-0.2.6/src/ksmedia.rs diff --git a/deps/winapi-0.2.6/src/lib.rs b/deps/winapi-0.2.6/src/lib.rs new file mode 100644 index 000000000..d9ce7eee3 --- /dev/null +++ b/deps/winapi-0.2.6/src/lib.rs @@ -0,0 +1,428 @@ +// Copyright © 2015, Peter Atashian +// Licensed under the MIT License <LICENSE.md> +//! Types and constants for WinAPI bindings. +#![allow(bad_style)] +#![warn(trivial_casts, trivial_numeric_casts)] +#![warn(unused_qualifications, unused)] +#![cfg(windows)] +//------------------------------------------------------------------------------------------------- +// Imports +//------------------------------------------------------------------------------------------------- +pub use std::os::raw::{ + c_void, + c_char, + c_schar, + c_uchar, + c_short, + c_ushort, + c_int, + c_uint, + c_long, + c_ulong, + c_longlong, + c_ulonglong, + c_float, + c_double, +}; +pub use audioclient::*; +pub use audiosessiontypes::*; +pub use basetsd::*; +pub use bcrypt::*; +pub use cfg::*; +pub use cfgmgr32::*; +pub use commctrl::*; +pub use commdlg::*; +pub use corsym::*; +pub use d2d1::*; +pub use d2dbasetypes::*; +pub use d3d9::*; +pub use d3d9caps::*; +pub use d3d9types::*; +pub use d3d11::*; +pub use d3d10shader::*; +pub use d3d11shader::*; +pub use d3d12::*; +pub use d3d12sdklayers::*; +pub use d3dcommon::*; +pub use d3dcompiler::*; +pub use dbghelp::*; +pub use dcommon::*; +pub use devpropdef::*; +pub use docobj::*; +pub use dpapi::*; +pub use dsgetdc::*; +pub use dsound::*; +pub use dsrole::*; +pub use dwmapi::*; +pub use dwrite::*; +pub use dxgi::*; +pub use dxgi1_2::*; +pub use dxgi1_3::*; +pub use dxgi1_4::*; +pub use dxgiformat::*; +pub use dxgitype::*; +pub use errhandlingapi::*; +pub use excpt::*; +pub use fileapi::*; +pub use gl::*; +pub use guiddef::*; +pub use heapapi::*; +pub use hidclass::*; +pub use hidpi::*; +pub use hidsdi::*; +pub use hidusage::*; +pub use hstring::*; +pub use http::*; +pub use imm::*; +pub use inaddr::*; +pub use inspectable::*; +pub use ksmedia::*; +pub use libloaderapi::*; +pub use lmaccess::*; +pub use lmcons::*; +pub use lmdfs::*; +pub use lmerrlog::*; +pub use lmjoin::*; +pub use lsalookup::*; +pub use memoryapi::*; +pub use minwinbase::*; +pub use minwindef::*; +pub use mmdeviceapi::*; +pub use mmreg::*; +pub use mmsystem::*; +pub use mscat::*; +pub use mssip::*; +pub use nb30::*; +pub use ncrypt::*; +pub use ntdef::*; +pub use ntsecapi::*; +pub use ntstatus::*; +pub use oaidl::*; +pub use objbase::*; +pub use objidl::*; +pub use objidlbase::*; +pub use olectl::*; +pub use processsnapshot::*; +pub use processthreadsapi::*; +pub use propsys::*; +pub use prsht::*; +pub use psapi::*; +pub use qos::*; +pub use reason::*; +pub use rpc::*; +pub use rpcdce::*; +pub use sapi::*; +pub use schannel::*; +pub use servprov::*; +pub use setupapi::*; +pub use shellapi::*; +pub use shellscalingapi::*; +pub use shlguid::*; +pub use shlobj::*; +pub use shobjidl::*; +pub use shtypes::*; +pub use spapidef::*; +pub use sqltypes::*; +pub use sspi::*; +pub use subauth::*; +pub use synchapi::*; +pub use sysinfoapi::*; +pub use threadpoolapi::*; +pub use timezoneapi::*; +pub use tlhelp32::*; +pub use unknwnbase::*; +pub use urlhist::*; +pub use urlmon::*; +pub use usp10::*; +pub use vadefs::*; +pub use vsbackup::*; +pub use vss::*; +pub use vsserror::*; +pub use vswriter::*; +pub use werapi::*; +pub use winbase::*; +pub use wincon::*; +pub use wincred::*; +pub use wincrypt::*; +pub use windowsx::*; +pub use windef::*; +pub use windowscodecs::*; +pub use winerror::*; +pub use winevt::*; +pub use wingdi::*; +pub use winhttp::*; +pub use winioctl::*; +pub use winnetwk::*; +pub use winnls::*; +pub use winnt::*; +pub use winscard::*; +pub use winsmcrd::*; +pub use winsock2::*; +pub use winspool::*; +pub use winsvc::*; +pub use winuser::*; +pub use ws2def::*; +pub use ws2ipdef::*; +pub use ws2spi::*; +pub use ws2tcpip::*; +pub use wtypes::*; +pub use wtypesbase::*; +pub use xinput::*; +//------------------------------------------------------------------------------------------------- +// Modules +//------------------------------------------------------------------------------------------------- +#[macro_use] mod macros; +pub mod audioclient; +pub mod audiosessiontypes; +pub mod basetsd; +pub mod bcrypt; +pub mod cfg; +pub mod cfgmgr32; +pub mod commctrl; +pub mod commdlg; +pub mod corsym; +pub mod d2d1; +pub mod d2dbasetypes; +pub mod d3d9; +pub mod d3d9caps; +pub mod d3d9types; +pub mod d3d11; +pub mod d3d10shader; +pub mod d3d11shader; +pub mod d3d12; +pub mod d3d12sdklayers; +pub mod d3dcommon; +pub mod d3dcompiler; +pub mod dbghelp; +pub mod dcommon; +pub mod devpropdef; +pub mod docobj; +pub mod dpapi; +pub mod dsgetdc; +pub mod dsound; +pub mod dsrole; +pub mod dwmapi; +pub mod dwrite; +pub mod dxgi; +pub mod dxgi1_2; +pub mod dxgi1_3; +pub mod dxgi1_4; +pub mod dxgiformat; +pub mod dxgitype; +pub mod errhandlingapi; +pub mod excpt; +pub mod fileapi; +pub mod gl; +pub mod guiddef; +pub mod heapapi; +pub mod hidclass; +pub mod hidpi; +pub mod hidsdi; +pub mod hidusage; +pub mod hstring; +pub mod http; +pub mod imm; +pub mod inaddr; +pub mod inspectable; +pub mod ksmedia; +pub mod libloaderapi; +pub mod lmaccess; +pub mod lmcons; +pub mod lmdfs; +pub mod lmerrlog; +pub mod lmjoin; +pub mod lsalookup; +pub mod memoryapi; +pub mod minwinbase; +pub mod minwindef; +pub mod mmdeviceapi; +pub mod mmreg; +pub mod mmsystem; +pub mod mscat; +pub mod mssip; +pub mod nb30; +pub mod ncrypt; +pub mod ntdef; +pub mod ntsecapi; +pub mod ntstatus; +pub mod oaidl; +pub mod objbase; +pub mod objidl; +pub mod objidlbase; +pub mod olectl; +pub mod processsnapshot; +pub mod processthreadsapi; +pub mod propsys; +pub mod prsht; +pub mod psapi; +pub mod qos; +pub mod reason; +pub mod rpc; +pub mod rpcdce; +pub mod sapi; +pub mod schannel; +pub mod servprov; +pub mod setupapi; +pub mod shellapi; +pub mod shellscalingapi; +pub mod shlguid; +pub mod shlobj; +pub mod shobjidl; +pub mod shtypes; +pub mod spapidef; +pub mod sqltypes; +pub mod sspi; +pub mod subauth; +pub mod synchapi; +pub mod sysinfoapi; +pub mod threadpoolapi; +pub mod timezoneapi; +pub mod tlhelp32; +pub mod unknwnbase; +pub mod urlhist; +pub mod urlmon; +pub mod usp10; +pub mod vadefs; +pub mod vsbackup; +pub mod vss; +pub mod vsserror; +pub mod vswriter; +pub mod werapi; +pub mod winbase; +pub mod wincon; +pub mod wincred; +pub mod wincrypt; +pub mod windef; +pub mod windowscodecs; +pub mod windowsx; +pub mod winerror; +pub mod winevt; +pub mod wingdi; +pub mod winhttp; +pub mod winioctl; +pub mod winnetwk; +pub mod winnls; +pub mod winnt; +pub mod winscard; +pub mod winsmcrd; +pub mod winsock2; +pub mod winspool; +pub mod winsvc; +pub mod winuser; +pub mod ws2def; +pub mod ws2ipdef; +pub mod ws2spi; +pub mod ws2tcpip; +pub mod wtypes; +pub mod wtypesbase; +pub mod xinput; +//------------------------------------------------------------------------------------------------- +// Primitive types not provided by std +//------------------------------------------------------------------------------------------------- +pub type __int8 = i8; +pub type __uint8 = u8; +pub type __int16 = i16; +pub type __uint16 = u16; +pub type __int32 = i32; +pub type __uint32 = u32; +pub type __int64 = i64; +pub type __uint64 = u64; +pub type wchar_t = c_ushort; +#[cfg(target_arch = "x86")] +pub type size_t = c_uint; +#[cfg(target_arch = "x86_64")] +pub type size_t = __uint64; +//------------------------------------------------------------------------------------------------- +// strmif.h +//------------------------------------------------------------------------------------------------- +pub type REFERENCE_TIME = LONGLONG; +//------------------------------------------------------------------------------------------------- +// propidl.h +//------------------------------------------------------------------------------------------------- +STRUCT!{struct PROPVARIANT { + vt: VARTYPE, + wReserved1: WORD, + wReserved2: WORD, + wReserved3: WORD, + data: [u8; 16], +}} +//------------------------------------------------------------------------------------------------- +// combaseapi.h +// Base Component Object Model defintions. +//------------------------------------------------------------------------------------------------- +pub const CLSCTX_INPROC_SERVER: DWORD = 0x1; +pub const CLSCTX_INPROC_HANDLER: DWORD = 0x2; +pub const CLSCTX_LOCAL_SERVER: DWORD = 0x4; +pub const CLSCTX_REMOTE_SERVER: DWORD = 0x10; +pub const CLSCTX_SERVER: DWORD = CLSCTX_INPROC_SERVER | CLSCTX_LOCAL_SERVER | + CLSCTX_REMOTE_SERVER; +pub const CLSCTX_ALL: DWORD = CLSCTX_INPROC_HANDLER | CLSCTX_SERVER; +STRUCT!{struct ServerInformation { + dwServerPid: DWORD, + dwServerTid: DWORD, + ui64ServerAddress: UINT64, +}} +pub type PServerInformation = *mut ServerInformation; +DECLARE_HANDLE!(CO_MTA_USAGE_COOKIE, CO_MTA_USAGE_COOKIE__); +//------------------------------------------------------------------------------------------------- +// playsoundapi.h +// ApiSet Contract for api-ms-win-mm-playsound-l1-1-0 +//------------------------------------------------------------------------------------------------- +pub const SND_SYNC: DWORD = 0x0000; +pub const SND_ASYNC: DWORD = 0x0001; +pub const SND_NODEFAULT: DWORD = 0x0002; +pub const SND_MEMORY: DWORD = 0x0004; +pub const SND_LOOP: DWORD = 0x0008; +pub const SND_NOSTOP: DWORD = 0x0010; +pub const SND_NOWAIT: DWORD = 0x00002000; +pub const SND_ALIAS: DWORD = 0x00010000; +pub const SND_ALIAS_ID: DWORD = 0x00110000; +pub const SND_FILENAME: DWORD = 0x00020000; +pub const SND_RESOURCE: DWORD = 0x00040004; +pub const SND_PURGE: DWORD = 0x0040; +pub const SND_APPLICATION: DWORD = 0x0080; +pub const SND_SENTRY: DWORD = 0x00080000; +pub const SND_RING: DWORD = 0x00100000; +pub const SND_SYSTEM: DWORD = 0x00200000; +//------------------------------------------------------------------------------------------------- +// winreg.h +// Registry API procedure declarations, constant definitions and macros +//------------------------------------------------------------------------------------------------- +pub type REGSAM = ACCESS_MASK; +STRUCT!{struct VALENTA { + ve_valuename: LPSTR, + ve_valuelen: DWORD, + ve_valueptr: DWORD_PTR, + ve_type: DWORD, +}} +pub type PVALENTA = *mut VALENTA; +STRUCT!{struct VALENTW { + ve_valuename: LPWSTR, + ve_valuelen: DWORD, + ve_valueptr: DWORD_PTR, + ve_type: DWORD, +}} +pub type PVALENTW = *mut VALENTW; +pub const HKEY_CLASSES_ROOT: HKEY = 0x80000000 as HKEY; +pub const HKEY_CURRENT_USER: HKEY = 0x80000001 as HKEY; +pub const HKEY_LOCAL_MACHINE: HKEY = 0x80000002 as HKEY; +pub const HKEY_USERS: HKEY = 0x80000003 as HKEY; +pub const HKEY_PERFORMANCE_DATA: HKEY = 0x80000004 as HKEY; +pub const HKEY_PERFORMANCE_TEXT: HKEY = 0x80000050 as HKEY; +pub const HKEY_PERFORMANCE_NLSTEXT: HKEY = 0x80000060 as HKEY; +pub const HKEY_CURRENT_CONFIG: HKEY = 0x80000005 as HKEY; +pub const HKEY_DYN_DATA: HKEY = 0x80000006 as HKEY; +pub const HKEY_CURRENT_USER_LOCAL_SETTINGS: HKEY = 0x80000007 as HKEY; +pub const REG_MUI_STRING_TRUNCATE: DWORD = 0x00000001; +pub const RRF_RT_REG_NONE: DWORD = 0x00000001; +pub const RRF_RT_REG_SZ: DWORD = 0x00000002; +pub const RRF_RT_REG_EXPAND_SZ: DWORD = 0x00000004; +pub const RRF_RT_REG_BINARY: DWORD = 0x00000008; +pub const RRF_RT_REG_DWORD: DWORD = 0x00000010; +pub const RRF_RT_REG_MULTI_SZ: DWORD = 0x00000020; +pub const RRF_RT_REG_QWORD: DWORD = 0x00000040; +pub const RRF_RT_DWORD: DWORD = RRF_RT_REG_BINARY|RRF_RT_REG_DWORD; +pub const RRF_RT_QWORD: DWORD = RRF_RT_REG_BINARY|RRF_RT_REG_QWORD; +pub const RRF_RT_ANY: DWORD = 0x0000ffff; +pub const RRF_NOEXPAND: DWORD = 0x10000000; +pub const RRF_ZEROONFAILURE: DWORD = 0x20000000; diff --git a/deps/winapi-0.2.5/src/libloaderapi.rs b/deps/winapi-0.2.6/src/libloaderapi.rs similarity index 100% rename from deps/winapi-0.2.5/src/libloaderapi.rs rename to deps/winapi-0.2.6/src/libloaderapi.rs diff --git a/deps/winapi-0.2.5/src/lmaccess.rs b/deps/winapi-0.2.6/src/lmaccess.rs similarity index 100% rename from deps/winapi-0.2.5/src/lmaccess.rs rename to deps/winapi-0.2.6/src/lmaccess.rs diff --git a/deps/winapi-0.2.5/src/lmcons.rs b/deps/winapi-0.2.6/src/lmcons.rs similarity index 100% rename from deps/winapi-0.2.5/src/lmcons.rs rename to deps/winapi-0.2.6/src/lmcons.rs diff --git a/deps/winapi-0.2.5/src/lmdfs.rs b/deps/winapi-0.2.6/src/lmdfs.rs similarity index 100% rename from deps/winapi-0.2.5/src/lmdfs.rs rename to deps/winapi-0.2.6/src/lmdfs.rs diff --git a/deps/winapi-0.2.5/src/lmerrlog.rs b/deps/winapi-0.2.6/src/lmerrlog.rs similarity index 100% rename from deps/winapi-0.2.5/src/lmerrlog.rs rename to deps/winapi-0.2.6/src/lmerrlog.rs diff --git a/deps/winapi-0.2.5/src/lmjoin.rs b/deps/winapi-0.2.6/src/lmjoin.rs similarity index 100% rename from deps/winapi-0.2.5/src/lmjoin.rs rename to deps/winapi-0.2.6/src/lmjoin.rs diff --git a/deps/winapi-0.2.5/src/lsalookup.rs b/deps/winapi-0.2.6/src/lsalookup.rs similarity index 100% rename from deps/winapi-0.2.5/src/lsalookup.rs rename to deps/winapi-0.2.6/src/lsalookup.rs diff --git a/deps/winapi-0.2.6/src/macros.rs b/deps/winapi-0.2.6/src/macros.rs new file mode 100644 index 000000000..1fc6cf517 --- /dev/null +++ b/deps/winapi-0.2.6/src/macros.rs @@ -0,0 +1,268 @@ +// Copyright © 2015, Peter Atashian +// Licensed under the MIT License <LICENSE.md> +//! Macros to make things easier to define +macro_rules! DECLARE_HANDLE { + ($name:ident, $inner:ident) => { + #[allow(missing_copy_implementations)] pub enum $inner { } + pub type $name = *mut $inner; + }; +} +macro_rules! MAKE_HRESULT { + ($sev:expr, $fac:expr, $code:expr) => { + ($sev << 31) | ($fac << 16) | $code + } +} +macro_rules! MAKE_SCODE { + ($sev:expr, $fac:expr, $code:expr) => { + ($sev << 31) | ($fac << 16) | $code + } +} +macro_rules! HIDP_ERROR_CODES { + ($sev:expr, $code:expr) => { + ($sev << 28) | (::FACILITY_HID_ERROR_CODE << 16) | $code + } +} +macro_rules! MAKEFOURCC { + ($a:expr, $b:expr, $c:expr, $d:expr) => { + ($a as i32) | (($b as i32) << 8) | (($c as i32) << 16) | (($d as i32) << 24) + } +} +#[macro_export] +macro_rules! DEFINE_GUID { + ( + $name:ident, $l:expr, $w1:expr, $w2:expr, $b1:expr, $b2:expr, $b3:expr, $b4:expr, $b5:expr, + $b6:expr, $b7:expr, $b8:expr + ) => { + pub const $name: $crate::GUID = $crate::GUID { + Data1: $l, + Data2: $w1, + Data3: $w2, + Data4: [$b1, $b2, $b3, $b4, $b5, $b6, $b7, $b8], + }; + } +} +macro_rules! CTL_CODE { + ($DeviceType:expr, $Function:expr, $Method:expr, $Access:expr) => { + ($DeviceType << 16) | ($Access << 14) | ($Function << 2) | $Method + } +} +macro_rules! HID_CTL_CODE { + ($id:expr) => { + CTL_CODE!(::FILE_DEVICE_KEYBOARD, $id, ::METHOD_NEITHER, ::FILE_ANY_ACCESS) + } +} +macro_rules! HID_BUFFER_CTL_CODE { + ($id:expr) => { + CTL_CODE!(::FILE_DEVICE_KEYBOARD, $id, ::METHOD_BUFFERED, ::FILE_ANY_ACCESS) + } +} +macro_rules! HID_IN_CTL_CODE { + ($id:expr) => { + CTL_CODE!(::FILE_DEVICE_KEYBOARD, $id, ::METHOD_IN_DIRECT, ::FILE_ANY_ACCESS) + } +} +macro_rules! HID_OUT_CTL_CODE { + ($id:expr) => { + CTL_CODE!(::FILE_DEVICE_KEYBOARD, $id, ::METHOD_OUT_DIRECT, ::FILE_ANY_ACCESS) + } +} +macro_rules! AUDCLNT_ERR { + ($n:expr) => { + MAKE_HRESULT!(::SEVERITY_ERROR, ::FACILITY_AUDCLNT, $n) + }; +} +macro_rules! AUDCLNT_SUCCESS { + ($n:expr) => { + MAKE_SCODE!(::SEVERITY_SUCCESS, ::FACILITY_AUDCLNT, $n) + }; +} +macro_rules! BCRYPT_MAKE_INTERFACE_VERSION { + ($major:expr, $minor:expr) => { + ::BCRYPT_INTERFACE_VERSION { MajorVersion: $major, MinorVersion: $minor } + } +} +macro_rules! RIDL { + (interface $interface:ident ($vtbl:ident) + {$( + fn $method:ident(&mut self $(,$p:ident : $t:ty)*) -> $rtr:ty + ),+} + ) => { + #[repr(C)] #[allow(missing_copy_implementations)] + pub struct $vtbl { + $(pub $method: unsafe extern "system" fn( + This: *mut $interface + $(,$p: $t)* + ) -> $rtr),+ + } + #[repr(C)] #[derive(Debug)] #[allow(missing_copy_implementations)] + pub struct $interface { + pub lpVtbl: *const $vtbl + } + impl $interface { + #[inline] + $(pub unsafe fn $method(&mut self $(,$p: $t)*) -> $rtr { + ((*self.lpVtbl).$method)(self $(,$p)*) + })+ + } + }; + (interface $interface:ident ($vtbl:ident) : $pinterface:ident ($pvtbl:ident) { + }) => { + #[repr(C)] #[allow(missing_copy_implementations)] + pub struct $vtbl { + pub parent: ::$pvtbl + } + #[repr(C)] #[derive(Debug)] #[allow(missing_copy_implementations)] + pub struct $interface { + pub lpVtbl: *const $vtbl + } + impl ::std::ops::Deref for $interface { + type Target = ::$pinterface; + #[inline] + fn deref(&self) -> &::$pinterface { + unsafe { ::std::mem::transmute(self) } + } + } + impl ::std::ops::DerefMut for $interface { + #[inline] + fn deref_mut(&mut self) -> &mut ::$pinterface { + unsafe { ::std::mem::transmute(self) } + } + } + }; + (interface $interface:ident ($vtbl:ident) : $pinterface:ident ($pvtbl:ident) + {$( + fn $method:ident(&mut self $(,$p:ident : $t:ty)*) -> $rtr:ty + ),+} + ) => { + #[repr(C)] #[allow(missing_copy_implementations)] + pub struct $vtbl { + pub parent: ::$pvtbl + $(,pub $method: unsafe extern "system" fn( + This: *mut $interface + $(,$p: $t)* + ) -> $rtr)+ + } + #[repr(C)] #[derive(Debug)] #[allow(missing_copy_implementations)] + pub struct $interface { + pub lpVtbl: *const $vtbl + } + impl $interface { + #[inline] + $(pub unsafe fn $method(&mut self $(,$p: $t)*) -> $rtr { + ((*self.lpVtbl).$method)(self $(,$p)*) + })+ + } + impl ::std::ops::Deref for $interface { + type Target = ::$pinterface; + #[inline] + fn deref(&self) -> &::$pinterface { + unsafe { ::std::mem::transmute(self) } + } + } + impl ::std::ops::DerefMut for $interface { + #[inline] + fn deref_mut(&mut self) -> &mut ::$pinterface { + unsafe { ::std::mem::transmute(self) } + } + } + }; +} +macro_rules! UNION { + ($base:ident, $field:ident, $variant:ident, $variantmut:ident, $fieldtype:ty) => { + impl $base { + #[inline] + pub unsafe fn $variant(&self) -> &$fieldtype { + ::std::mem::transmute(&self.$field) + } + #[inline] + pub unsafe fn $variantmut(&mut self) -> &mut $fieldtype { + ::std::mem::transmute(&mut self.$field) + } + } + } +} +macro_rules! BITFIELD { + ($base:ident $field:ident: $fieldtype:ty [ + $($thing:ident $set_thing:ident[$r:expr],)+ + ]) => { + impl $base {$( + #[inline] + pub fn $thing(&self) -> $fieldtype { + let size = ::std::mem::size_of::<$fieldtype>() * 8; + self.$field << (size - $r.end) >> (size - $r.end + $r.start) + } + #[inline] + pub fn $set_thing(&mut self, val: $fieldtype) { + let mask = ((1 << ($r.end - $r.start)) - 1) << $r.start; + self.$field &= !mask; + self.$field |= (val << $r.start) & mask; + } + )+} + } +} +macro_rules! ENUM { + {enum $name:ident { $($variant:ident = $value:expr,)+ }} => { + #[repr(C)] #[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)] + pub struct $name(pub u32); + $(pub const $variant: $name = $name($value);)+ + }; + {enum $name:ident { $variant:ident = $value:expr, $($rest:tt)* }} => { + #[repr(C)] #[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)] + pub struct $name(pub u32); + pub const $variant: $name = $name($value); + ENUM!{@gen $name, $variant, $($rest)*} + }; + {enum $name:ident { $variant:ident, $($rest:tt)* }} => { + ENUM!{enum $name { $variant = 0, $($rest)* }} + }; + {@gen $name:ident, $base:ident,} => {}; + {@gen $name:ident, $base:ident, $variant:ident = $value:expr, $($rest:tt)*} => { + pub const $variant: $name = $name($value); + ENUM!{@gen $name, $variant, $($rest)*} + }; + {@gen $name:ident, $base:ident, $variant:ident, $($rest:tt)*} => { + pub const $variant: $name = $name($base.0 + 1u32); + ENUM!{@gen $name, $variant, $($rest)*} + }; +} +macro_rules! FLAGS { + {enum $name:ident { $($variant:ident = $value:expr,)+ }} => { + #[repr(C)] #[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)] + pub struct $name(pub u32); + $(pub const $variant: $name = $name($value);)+ + impl ::std::ops::BitAnd<$name> for $name { + type Output = $name; + fn bitand(self, o: $name) -> $name { $name(self.0 & o.0) } + } + impl ::std::ops::BitOr<$name> for $name { + type Output = $name; + fn bitor(self, o: $name) -> $name { $name(self.0 | o.0) } + } + impl ::std::ops::BitXor<$name> for $name { + type Output = $name; + fn bitxor(self, o: $name) -> $name { $name(self.0 ^ o.0) } + } + impl ::std::ops::Not for $name { + type Output = $name; + fn not(self) -> $name { $name(!self.0) } + } + } +} +macro_rules! STRUCT { + {nodebug struct $name:ident { $($field:ident: $ftype:ty,)+ }} => { + #[repr(C)] + pub struct $name { + $(pub $field: $ftype,)+ + } + impl Copy for $name {} + impl Clone for $name { fn clone(&self) -> $name { *self } } + }; + {struct $name:ident { $($field:ident: $ftype:ty,)+ }} => { + #[repr(C)] #[derive(Debug)] + pub struct $name { + $(pub $field: $ftype,)+ + } + impl Copy for $name {} + impl Clone for $name { fn clone(&self) -> $name { *self } } + }; +} diff --git a/deps/winapi-0.2.5/src/memoryapi.rs b/deps/winapi-0.2.6/src/memoryapi.rs similarity index 100% rename from deps/winapi-0.2.5/src/memoryapi.rs rename to deps/winapi-0.2.6/src/memoryapi.rs diff --git a/deps/winapi-0.2.6/src/minwinbase.rs b/deps/winapi-0.2.6/src/minwinbase.rs new file mode 100644 index 000000000..f6317fa25 --- /dev/null +++ b/deps/winapi-0.2.6/src/minwinbase.rs @@ -0,0 +1,253 @@ +// Copyright © 2015, Peter Atashian +// Licensed under the MIT License <LICENSE.md> +//! This module defines the 32-Bit Windows Base APIs +STRUCT!{struct SECURITY_ATTRIBUTES { + nLength: ::DWORD, + lpSecurityDescriptor: ::LPVOID, + bInheritHandle: ::BOOL, +}} +pub type PSECURITY_ATTRIBUTES = *mut SECURITY_ATTRIBUTES; +pub type LPSECURITY_ATTRIBUTES = *mut SECURITY_ATTRIBUTES; +STRUCT!{struct OVERLAPPED { + Internal: ::ULONG_PTR, + InternalHigh: ::ULONG_PTR, + Offset: ::DWORD, + OffsetHigh: ::DWORD, + hEvent: ::HANDLE, +}} +UNION!(OVERLAPPED, Offset, Pointer, Pointer_mut, ::PVOID); +pub type LPOVERLAPPED = *mut OVERLAPPED; +STRUCT!{struct OVERLAPPED_ENTRY { + lpCompletionKey: ::ULONG_PTR, + lpOverlapped: LPOVERLAPPED, + Internal: ::ULONG_PTR, + dwNumberOfBytesTransferred: ::DWORD, +}} +pub type LPOVERLAPPED_ENTRY = *mut OVERLAPPED_ENTRY; +STRUCT!{struct SYSTEMTIME { + wYear: ::WORD, + wMonth: ::WORD, + wDayOfWeek: ::WORD, + wDay: ::WORD, + wHour: ::WORD, + wMinute: ::WORD, + wSecond: ::WORD, + wMilliseconds: ::WORD, +}} +pub type PSYSTEMTIME = *mut SYSTEMTIME; +pub type LPSYSTEMTIME = *mut SYSTEMTIME; +STRUCT!{nodebug struct WIN32_FIND_DATAA { + dwFileAttributes: ::DWORD, + ftCreationTime: ::FILETIME, + ftLastAccessTime: ::FILETIME, + ftLastWriteTime: ::FILETIME, + nFileSizeHigh: ::DWORD, + nFileSizeLow: ::DWORD, + dwReserved0: ::DWORD, + dwReserved1: ::DWORD, + cFileName: [::CHAR; ::MAX_PATH], + cAlternateFileName: [::CHAR; 14], +}} +pub type PWIN32_FIND_DATAA = *mut WIN32_FIND_DATAA; +pub type LPWIN32_FIND_DATAA = *mut WIN32_FIND_DATAA; +STRUCT!{nodebug struct WIN32_FIND_DATAW { + dwFileAttributes: ::DWORD, + ftCreationTime: ::FILETIME, + ftLastAccessTime: ::FILETIME, + ftLastWriteTime: ::FILETIME, + nFileSizeHigh: ::DWORD, + nFileSizeLow: ::DWORD, + dwReserved0: ::DWORD, + dwReserved1: ::DWORD, + cFileName: [::WCHAR; ::MAX_PATH], + cAlternateFileName: [::WCHAR; 14], +}} +pub type PWIN32_FIND_DATAW = *mut WIN32_FIND_DATAW; +pub type LPWIN32_FIND_DATAW = *mut WIN32_FIND_DATAW; +ENUM!{enum FINDEX_INFO_LEVELS { + FindExInfoStandard, + FindExInfoBasic, + FindExInfoMaxInfoLevel, +}} +pub const FIND_FIRST_EX_CASE_SENSITIVE: ::DWORD = 0x00000001; +pub const FIND_FIRST_EX_LARGE_FETCH: ::DWORD = 0x00000002; +ENUM!{enum FINDEX_SEARCH_OPS { + FindExSearchNameMatch, + FindExSearchLimitToDirectories, + FindExSearchLimitToDevices, + FindExSearchMaxSearchOp, +}} +ENUM!{enum GET_FILEEX_INFO_LEVELS { + GetFileExInfoStandard, + GetFileExMaxInfoLevel, +}} +ENUM!{enum FILE_INFO_BY_HANDLE_CLASS { + FileBasicInfo, + FileStandardInfo, + FileNameInfo, + FileRenameInfo, + FileDispositionInfo, + FileAllocationInfo, + FileEndOfFileInfo, + FileStreamInfo, + FileCompressionInfo, + FileAttributeTagInfo, + FileIdBothDirectoryInfo, + FileIdBothDirectoryRestartInfo, + FileIoPriorityHintInfo, + FileRemoteProtocolInfo, + FileFullDirectoryInfo, + FileFullDirectoryRestartInfo, + FileStorageInfo, + FileAlignmentInfo, + FileIdInfo, + FileIdExtdDirectoryInfo, + FileIdExtdDirectoryRestartInfo, + MaximumFileInfoByHandleClass, +}} +pub type PFILE_INFO_BY_HANDLE_CLASS = *mut FILE_INFO_BY_HANDLE_CLASS; +pub type CRITICAL_SECTION = ::RTL_CRITICAL_SECTION; +pub type PCRITICAL_SECTION = ::PRTL_CRITICAL_SECTION; +pub type LPCRITICAL_SECTION = ::PRTL_CRITICAL_SECTION; +pub type CRITICAL_SECTION_DEBUG = ::RTL_CRITICAL_SECTION_DEBUG; +pub type PCRITICAL_SECTION_DEBUG = ::PRTL_CRITICAL_SECTION_DEBUG; +pub type LPCRITICAL_SECTION_DEBUG = ::PRTL_CRITICAL_SECTION_DEBUG; +pub type LPOVERLAPPED_COMPLETION_ROUTINE = Option<unsafe extern "system" fn( + dwErrorCode: ::DWORD, dwNumberOfBytesTransfered: ::DWORD, lpOverlapped: LPOVERLAPPED, +)>; +pub const LOCKFILE_FAIL_IMMEDIATELY: ::DWORD = 0x00000001; +pub const LOCKFILE_EXCLUSIVE_LOCK: ::DWORD = 0x00000002; +STRUCT!{struct PROCESS_HEAP_ENTRY_Block { + hMem: ::HANDLE, + dwReserved: [::DWORD; 3], +}} +STRUCT!{struct PROCESS_HEAP_ENTRY_Region { + dwCommittedSize: ::DWORD, + dwUnCommittedSize: ::DWORD, + lpFirstBlock: ::LPVOID, + lpLastBlock: ::LPVOID, +}} +STRUCT!{struct PROCESS_HEAP_ENTRY { + lpData: ::PVOID, + cbData: ::DWORD, + cbOverhead: ::BYTE, + iRegionIndex: ::BYTE, + wFlags: ::WORD, + Region: PROCESS_HEAP_ENTRY_Region, +}} +UNION!(PROCESS_HEAP_ENTRY, Region, Block, Block_mut, PROCESS_HEAP_ENTRY_Block); +pub type LPPROCESS_HEAP_ENTRY = *mut PROCESS_HEAP_ENTRY; +pub type PPROCESS_HEAP_ENTRY = *mut PROCESS_HEAP_ENTRY; +pub const PROCESS_HEAP_REGION: ::WORD = 0x0001; +pub const PROCESS_HEAP_UNCOMMITTED_RANGE: ::WORD = 0x0002; +pub const PROCESS_HEAP_ENTRY_BUSY: ::WORD = 0x0004; +pub const PROCESS_HEAP_SEG_ALLOC: ::WORD = 0x0008; +pub const PROCESS_HEAP_ENTRY_MOVEABLE: ::WORD = 0x0010; +pub const PROCESS_HEAP_ENTRY_DDESHARE: ::WORD = 0x0020; +pub type PTHREAD_START_ROUTINE = Option<unsafe extern "system" fn( + lpThreadParameter: ::LPVOID, +) -> ::DWORD>; +pub type LPTHREAD_START_ROUTINE = PTHREAD_START_ROUTINE; +pub type LPCONTEXT = ::PCONTEXT; +STRUCT!{struct REASON_CONTEXT_Detailed { + LocalizedReasonModule: ::HMODULE, + LocalizedReasonId: ::ULONG, + ReasonStringCount: ::ULONG, + ReasonStrings: *mut ::LPWSTR, +}} +STRUCT!{struct REASON_CONTEXT { + Version: ::ULONG, + Flags: ::DWORD, + Reason: REASON_CONTEXT_Detailed, +}} +UNION!(REASON_CONTEXT, Reason, SimpleReasonString, SimpleReasonString_mut, ::LPWSTR); +pub type PREASON_CONTEXT = *mut REASON_CONTEXT; +pub const EXCEPTION_DEBUG_EVENT: ::DWORD = 1; +pub const CREATE_THREAD_DEBUG_EVENT: ::DWORD = 2; +pub const CREATE_PROCESS_DEBUG_EVENT: ::DWORD = 3; +pub const EXIT_THREAD_DEBUG_EVENT: ::DWORD = 4; +pub const EXIT_PROCESS_DEBUG_EVENT: ::DWORD = 5; +pub const LOAD_DLL_DEBUG_EVENT: ::DWORD = 6; +pub const UNLOAD_DLL_DEBUG_EVENT: ::DWORD = 7; +pub const OUTPUT_DEBUG_STRING_EVENT: ::DWORD = 8; +pub const RIP_EVENT: ::DWORD = 9; +STRUCT!{struct EXCEPTION_DEBUG_INFO { + ExceptionRecord: ::EXCEPTION_RECORD, + dwFirstChance: ::DWORD, +}} +pub type LPEXCEPTION_DEBUG_INFO = *mut EXCEPTION_DEBUG_INFO; +STRUCT!{nodebug struct CREATE_THREAD_DEBUG_INFO { + hThread: ::HANDLE, + lpThreadLocalBase: ::LPVOID, + lpStartAddress: LPTHREAD_START_ROUTINE, +}} +pub type LPCREATE_THREAD_DEBUG_INFO = *mut CREATE_THREAD_DEBUG_INFO; +STRUCT!{nodebug struct CREATE_PROCESS_DEBUG_INFO { + hFile: ::HANDLE, + hProcess: ::HANDLE, + hThread: ::HANDLE, + lpBaseOfImage: ::LPVOID, + dwDebugInfoFileOffset: ::DWORD, + nDebugInfoSize: ::DWORD, + lpThreadLocalBase: ::LPVOID, + lpStartAddress: LPTHREAD_START_ROUTINE, + lpImageName: ::LPVOID, + fUnicode: ::WORD, +}} +pub type LPCREATE_PROCESS_DEBUG_INFO = *mut CREATE_PROCESS_DEBUG_INFO; +STRUCT!{struct EXIT_THREAD_DEBUG_INFO { + dwExitCode: ::DWORD, +}} +pub type LPEXIT_THREAD_DEBUG_INFO = *mut EXIT_THREAD_DEBUG_INFO; +STRUCT!{struct EXIT_PROCESS_DEBUG_INFO { + dwExitCode: ::DWORD, +}} +pub type LPEXIT_PROCESS_DEBUG_INFO = *mut EXIT_PROCESS_DEBUG_INFO; +STRUCT!{struct LOAD_DLL_DEBUG_INFO { + hFile: ::HANDLE, + lpBaseOfDll: ::LPVOID, + dwDebugInfoFileOffset: ::DWORD, + nDebugInfoSize: ::DWORD, + lpImageName: ::LPVOID, + fUnicode: ::WORD, +}} +pub type LPLOAD_DLL_DEBUG_INFO = *mut LOAD_DLL_DEBUG_INFO; +STRUCT!{struct UNLOAD_DLL_DEBUG_INFO { + lpBaseOfDll: ::LPVOID, +}} +pub type LPUNLOAD_DLL_DEBUG_INFO = *mut UNLOAD_DLL_DEBUG_INFO; +STRUCT!{struct OUTPUT_DEBUG_STRING_INFO { + lpDebugStringData: ::LPSTR, + fUnicode: ::WORD, + nDebugStringLength: ::WORD, +}} +pub type LPOUTPUT_DEBUG_STRING_INFO = *mut OUTPUT_DEBUG_STRING_INFO; +STRUCT!{struct RIP_INFO { + dwError: ::DWORD, + dwType: ::DWORD, +}} +pub type LPRIP_INFO = *mut RIP_INFO; +#[cfg(target_arch="x86_64")] +STRUCT!{nodebug struct DEBUG_EVENT { + dwDebugEventCode: ::DWORD, + dwProcessId: ::DWORD, + dwThreadId: ::DWORD, + u: [u8; 160], +}} +#[cfg(target_arch="x86")] +STRUCT!{nodebug struct DEBUG_EVENT { + dwDebugEventCode: ::DWORD, + dwProcessId: ::DWORD, + dwThreadId: ::DWORD, + u: [u8; 84], +}} +UNION!(DEBUG_EVENT, u, Exception, Exception_mut, EXCEPTION_DEBUG_INFO); +UNION!(DEBUG_EVENT, u, CreateThread, CreateThread_mut, CREATE_THREAD_DEBUG_INFO); +UNION!(DEBUG_EVENT, u, CreateProcessInfo, CreateProcessInfo_mut, CREATE_PROCESS_DEBUG_INFO); +UNION!(DEBUG_EVENT, u, ExitThread, ExitThread_mut, EXIT_THREAD_DEBUG_INFO); +UNION!(DEBUG_EVENT, u, ExitProcess, ExitProcess_mut, EXIT_PROCESS_DEBUG_INFO); +UNION!(DEBUG_EVENT, u, LoadDll, LoadDll_mut, LOAD_DLL_DEBUG_INFO); +UNION!(DEBUG_EVENT, u, UnloadDll, UnloadDll_mut, UNLOAD_DLL_DEBUG_INFO); +UNION!(DEBUG_EVENT, u, DebugString, DebugString_mut, OUTPUT_DEBUG_STRING_INFO); +UNION!(DEBUG_EVENT, u, RipInfo, RipInfo_mut, RIP_INFO); +pub type LPDEBUG_EVENT = *mut DEBUG_EVENT; diff --git a/deps/winapi-0.2.5/src/minwindef.rs b/deps/winapi-0.2.6/src/minwindef.rs similarity index 100% rename from deps/winapi-0.2.5/src/minwindef.rs rename to deps/winapi-0.2.6/src/minwindef.rs diff --git a/deps/winapi-0.2.5/src/mmdeviceapi.rs b/deps/winapi-0.2.6/src/mmdeviceapi.rs similarity index 100% rename from deps/winapi-0.2.5/src/mmdeviceapi.rs rename to deps/winapi-0.2.6/src/mmdeviceapi.rs diff --git a/deps/winapi-0.2.6/src/mmreg.rs b/deps/winapi-0.2.6/src/mmreg.rs new file mode 100644 index 000000000..7f952b291 --- /dev/null +++ b/deps/winapi-0.2.6/src/mmreg.rs @@ -0,0 +1,304 @@ +// Copyright © 2015, Peter Atashian +// Licensed under the MIT License <LICENSE.md> +pub const WAVE_FORMAT_UNKNOWN: ::WORD = 0x0000; +pub const WAVE_FORMAT_PCM: ::WORD = 0x0001; +pub const WAVE_FORMAT_ADPCM: ::WORD = 0x0002; +pub const WAVE_FORMAT_IEEE_FLOAT: ::WORD = 0x0003; +pub const WAVE_FORMAT_VSELP: ::WORD = 0x0004; +pub const WAVE_FORMAT_IBM_CVSD: ::WORD = 0x0005; +pub const WAVE_FORMAT_ALAW: ::WORD = 0x0006; +pub const WAVE_FORMAT_MULAW: ::WORD = 0x0007; +pub const WAVE_FORMAT_DTS: ::WORD = 0x0008; +pub const WAVE_FORMAT_DRM: ::WORD = 0x0009; +pub const WAVE_FORMAT_WMAVOICE9: ::WORD = 0x000A; +pub const WAVE_FORMAT_WMAVOICE10: ::WORD = 0x000B; +pub const WAVE_FORMAT_OKI_ADPCM: ::WORD = 0x0010; +pub const WAVE_FORMAT_DVI_ADPCM: ::WORD = 0x0011; +pub const WAVE_FORMAT_IMA_ADPCM: ::WORD = WAVE_FORMAT_DVI_ADPCM; +pub const WAVE_FORMAT_MEDIASPACE_ADPCM: ::WORD = 0x0012; +pub const WAVE_FORMAT_SIERRA_ADPCM: ::WORD = 0x0013; +pub const WAVE_FORMAT_G723_ADPCM: ::WORD = 0x0014; +pub const WAVE_FORMAT_DIGISTD: ::WORD = 0x0015; +pub const WAVE_FORMAT_DIGIFIX: ::WORD = 0x0016; +pub const WAVE_FORMAT_DIALOGIC_OKI_ADPCM: ::WORD = 0x0017; +pub const WAVE_FORMAT_MEDIAVISION_ADPCM: ::WORD = 0x0018; +pub const WAVE_FORMAT_CU_CODEC: ::WORD = 0x0019; +pub const WAVE_FORMAT_HP_DYN_VOICE: ::WORD = 0x001A; +pub const WAVE_FORMAT_YAMAHA_ADPCM: ::WORD = 0x0020; +pub const WAVE_FORMAT_SONARC: ::WORD = 0x0021; +pub const WAVE_FORMAT_DSPGROUP_TRUESPEECH: ::WORD = 0x0022; +pub const WAVE_FORMAT_ECHOSC1: ::WORD = 0x0023; +pub const WAVE_FORMAT_AUDIOFILE_AF36: ::WORD = 0x0024; +pub const WAVE_FORMAT_APTX: ::WORD = 0x0025; +pub const WAVE_FORMAT_AUDIOFILE_AF10: ::WORD = 0x0026; +pub const WAVE_FORMAT_PROSODY_1612: ::WORD = 0x0027; +pub const WAVE_FORMAT_LRC: ::WORD = 0x0028; +pub const WAVE_FORMAT_DOLBY_AC2: ::WORD = 0x0030; +pub const WAVE_FORMAT_GSM610: ::WORD = 0x0031; +pub const WAVE_FORMAT_MSNAUDIO: ::WORD = 0x0032; +pub const WAVE_FORMAT_ANTEX_ADPCME: ::WORD = 0x0033; +pub const WAVE_FORMAT_CONTROL_RES_VQLPC: ::WORD = 0x0034; +pub const WAVE_FORMAT_DIGIREAL: ::WORD = 0x0035; +pub const WAVE_FORMAT_DIGIADPCM: ::WORD = 0x0036; +pub const WAVE_FORMAT_CONTROL_RES_CR10: ::WORD = 0x0037; +pub const WAVE_FORMAT_NMS_VBXADPCM: ::WORD = 0x0038; +pub const WAVE_FORMAT_CS_IMAADPCM: ::WORD = 0x0039; +pub const WAVE_FORMAT_ECHOSC3: ::WORD = 0x003A; +pub const WAVE_FORMAT_ROCKWELL_ADPCM: ::WORD = 0x003B; +pub const WAVE_FORMAT_ROCKWELL_DIGITALK: ::WORD = 0x003C; +pub const WAVE_FORMAT_XEBEC: ::WORD = 0x003D; +pub const WAVE_FORMAT_G721_ADPCM: ::WORD = 0x0040; +pub const WAVE_FORMAT_G728_CELP: ::WORD = 0x0041; +pub const WAVE_FORMAT_MSG723: ::WORD = 0x0042; +pub const WAVE_FORMAT_INTEL_G723_1: ::WORD = 0x0043; +pub const WAVE_FORMAT_INTEL_G729: ::WORD = 0x0044; +pub const WAVE_FORMAT_SHARP_G726: ::WORD = 0x0045; +pub const WAVE_FORMAT_MPEG: ::WORD = 0x0050; +pub const WAVE_FORMAT_RT24: ::WORD = 0x0052; +pub const WAVE_FORMAT_PAC: ::WORD = 0x0053; +pub const WAVE_FORMAT_MPEGLAYER3: ::WORD = 0x0055; +pub const WAVE_FORMAT_LUCENT_G723: ::WORD = 0x0059; +pub const WAVE_FORMAT_CIRRUS: ::WORD = 0x0060; +pub const WAVE_FORMAT_ESPCM: ::WORD = 0x0061; +pub const WAVE_FORMAT_VOXWARE: ::WORD = 0x0062; +pub const WAVE_FORMAT_CANOPUS_ATRAC: ::WORD = 0x0063; +pub const WAVE_FORMAT_G726_ADPCM: ::WORD = 0x0064; +pub const WAVE_FORMAT_G722_ADPCM: ::WORD = 0x0065; +pub const WAVE_FORMAT_DSAT: ::WORD = 0x0066; +pub const WAVE_FORMAT_DSAT_DISPLAY: ::WORD = 0x0067; +pub const WAVE_FORMAT_VOXWARE_BYTE_ALIGNED: ::WORD = 0x0069; +pub const WAVE_FORMAT_VOXWARE_AC8: ::WORD = 0x0070; +pub const WAVE_FORMAT_VOXWARE_AC10: ::WORD = 0x0071; +pub const WAVE_FORMAT_VOXWARE_AC16: ::WORD = 0x0072; +pub const WAVE_FORMAT_VOXWARE_AC20: ::WORD = 0x0073; +pub const WAVE_FORMAT_VOXWARE_RT24: ::WORD = 0x0074; +pub const WAVE_FORMAT_VOXWARE_RT29: ::WORD = 0x0075; +pub const WAVE_FORMAT_VOXWARE_RT29HW: ::WORD = 0x0076; +pub const WAVE_FORMAT_VOXWARE_VR12: ::WORD = 0x0077; +pub const WAVE_FORMAT_VOXWARE_VR18: ::WORD = 0x0078; +pub const WAVE_FORMAT_VOXWARE_TQ40: ::WORD = 0x0079; +pub const WAVE_FORMAT_VOXWARE_SC3: ::WORD = 0x007A; +pub const WAVE_FORMAT_VOXWARE_SC3_1: ::WORD = 0x007B; +pub const WAVE_FORMAT_SOFTSOUND: ::WORD = 0x0080; +pub const WAVE_FORMAT_VOXWARE_TQ60: ::WORD = 0x0081; +pub const WAVE_FORMAT_MSRT24: ::WORD = 0x0082; +pub const WAVE_FORMAT_G729A: ::WORD = 0x0083; +pub const WAVE_FORMAT_MVI_MVI2: ::WORD = 0x0084; +pub const WAVE_FORMAT_DF_G726: ::WORD = 0x0085; +pub const WAVE_FORMAT_DF_GSM610: ::WORD = 0x0086; +pub const WAVE_FORMAT_ISIAUDIO: ::WORD = 0x0088; +pub const WAVE_FORMAT_ONLIVE: ::WORD = 0x0089; +pub const WAVE_FORMAT_MULTITUDE_FT_SX20: ::WORD = 0x008A; +pub const WAVE_FORMAT_INFOCOM_ITS_G721_ADPCM: ::WORD = 0x008B; +pub const WAVE_FORMAT_CONVEDIA_G729: ::WORD = 0x008C; +pub const WAVE_FORMAT_CONGRUENCY: ::WORD = 0x008D; +pub const WAVE_FORMAT_SBC24: ::WORD = 0x0091; +pub const WAVE_FORMAT_DOLBY_AC3_SPDIF: ::WORD = 0x0092; +pub const WAVE_FORMAT_MEDIASONIC_G723: ::WORD = 0x0093; +pub const WAVE_FORMAT_PROSODY_8KBPS: ::WORD = 0x0094; +pub const WAVE_FORMAT_ZYXEL_ADPCM: ::WORD = 0x0097; +pub const WAVE_FORMAT_PHILIPS_LPCBB: ::WORD = 0x0098; +pub const WAVE_FORMAT_PACKED: ::WORD = 0x0099; +pub const WAVE_FORMAT_MALDEN_PHONYTALK: ::WORD = 0x00A0; +pub const WAVE_FORMAT_RACAL_RECORDER_GSM: ::WORD = 0x00A1; +pub const WAVE_FORMAT_RACAL_RECORDER_G720_A: ::WORD = 0x00A2; +pub const WAVE_FORMAT_RACAL_RECORDER_G723_1: ::WORD = 0x00A3; +pub const WAVE_FORMAT_RACAL_RECORDER_TETRA_ACELP: ::WORD = 0x00A4; +pub const WAVE_FORMAT_NEC_AAC: ::WORD = 0x00B0; +pub const WAVE_FORMAT_RAW_AAC1: ::WORD = 0x00FF; +pub const WAVE_FORMAT_RHETOREX_ADPCM: ::WORD = 0x0100; +pub const WAVE_FORMAT_IRAT: ::WORD = 0x0101; +pub const WAVE_FORMAT_VIVO_G723: ::WORD = 0x0111; +pub const WAVE_FORMAT_VIVO_SIREN: ::WORD = 0x0112; +pub const WAVE_FORMAT_PHILIPS_CELP: ::WORD = 0x0120; +pub const WAVE_FORMAT_PHILIPS_GRUNDIG: ::WORD = 0x0121; +pub const WAVE_FORMAT_DIGITAL_G723: ::WORD = 0x0123; +pub const WAVE_FORMAT_SANYO_LD_ADPCM: ::WORD = 0x0125; +pub const WAVE_FORMAT_SIPROLAB_ACEPLNET: ::WORD = 0x0130; +pub const WAVE_FORMAT_SIPROLAB_ACELP4800: ::WORD = 0x0131; +pub const WAVE_FORMAT_SIPROLAB_ACELP8V3: ::WORD = 0x0132; +pub const WAVE_FORMAT_SIPROLAB_G729: ::WORD = 0x0133; +pub const WAVE_FORMAT_SIPROLAB_G729A: ::WORD = 0x0134; +pub const WAVE_FORMAT_SIPROLAB_KELVIN: ::WORD = 0x0135; +pub const WAVE_FORMAT_VOICEAGE_AMR: ::WORD = 0x0136; +pub const WAVE_FORMAT_G726ADPCM: ::WORD = 0x0140; +pub const WAVE_FORMAT_DICTAPHONE_CELP68: ::WORD = 0x0141; +pub const WAVE_FORMAT_DICTAPHONE_CELP54: ::WORD = 0x0142; +pub const WAVE_FORMAT_QUALCOMM_PUREVOICE: ::WORD = 0x0150; +pub const WAVE_FORMAT_QUALCOMM_HALFRATE: ::WORD = 0x0151; +pub const WAVE_FORMAT_TUBGSM: ::WORD = 0x0155; +pub const WAVE_FORMAT_MSAUDIO1: ::WORD = 0x0160; +pub const WAVE_FORMAT_WMAUDIO2: ::WORD = 0x0161; +pub const WAVE_FORMAT_WMAUDIO3: ::WORD = 0x0162; +pub const WAVE_FORMAT_WMAUDIO_LOSSLESS: ::WORD = 0x0163; +pub const WAVE_FORMAT_WMASPDIF: ::WORD = 0x0164; +pub const WAVE_FORMAT_UNISYS_NAP_ADPCM: ::WORD = 0x0170; +pub const WAVE_FORMAT_UNISYS_NAP_ULAW: ::WORD = 0x0171; +pub const WAVE_FORMAT_UNISYS_NAP_ALAW: ::WORD = 0x0172; +pub const WAVE_FORMAT_UNISYS_NAP_16K: ::WORD = 0x0173; +pub const WAVE_FORMAT_SYCOM_ACM_SYC008: ::WORD = 0x0174; +pub const WAVE_FORMAT_SYCOM_ACM_SYC701_G726L: ::WORD = 0x0175; +pub const WAVE_FORMAT_SYCOM_ACM_SYC701_CELP54: ::WORD = 0x0176; +pub const WAVE_FORMAT_SYCOM_ACM_SYC701_CELP68: ::WORD = 0x0177; +pub const WAVE_FORMAT_KNOWLEDGE_ADVENTURE_ADPCM: ::WORD = 0x0178; +pub const WAVE_FORMAT_FRAUNHOFER_IIS_MPEG2_AAC: ::WORD = 0x0180; +pub const WAVE_FORMAT_DTS_DS: ::WORD = 0x0190; +pub const WAVE_FORMAT_CREATIVE_ADPCM: ::WORD = 0x0200; +pub const WAVE_FORMAT_CREATIVE_FASTSPEECH8: ::WORD = 0x0202; +pub const WAVE_FORMAT_CREATIVE_FASTSPEECH10: ::WORD = 0x0203; +pub const WAVE_FORMAT_UHER_ADPCM: ::WORD = 0x0210; +pub const WAVE_FORMAT_ULEAD_DV_AUDIO: ::WORD = 0x0215; +pub const WAVE_FORMAT_ULEAD_DV_AUDIO_1: ::WORD = 0x0216; +pub const WAVE_FORMAT_QUARTERDECK: ::WORD = 0x0220; +pub const WAVE_FORMAT_ILINK_VC: ::WORD = 0x0230; +pub const WAVE_FORMAT_RAW_SPORT: ::WORD = 0x0240; +pub const WAVE_FORMAT_ESST_AC3: ::WORD = 0x0241; +pub const WAVE_FORMAT_GENERIC_PASSTHRU: ::WORD = 0x0249; +pub const WAVE_FORMAT_IPI_HSX: ::WORD = 0x0250; +pub const WAVE_FORMAT_IPI_RPELP: ::WORD = 0x0251; +pub const WAVE_FORMAT_CS2: ::WORD = 0x0260; +pub const WAVE_FORMAT_SONY_SCX: ::WORD = 0x0270; +pub const WAVE_FORMAT_SONY_SCY: ::WORD = 0x0271; +pub const WAVE_FORMAT_SONY_ATRAC3: ::WORD = 0x0272; +pub const WAVE_FORMAT_SONY_SPC: ::WORD = 0x0273; +pub const WAVE_FORMAT_TELUM_AUDIO: ::WORD = 0x0280; +pub const WAVE_FORMAT_TELUM_IA_AUDIO: ::WORD = 0x0281; +pub const WAVE_FORMAT_NORCOM_VOICE_SYSTEMS_ADPCM: ::WORD = 0x0285; +pub const WAVE_FORMAT_FM_TOWNS_SND: ::WORD = 0x0300; +pub const WAVE_FORMAT_MICRONAS: ::WORD = 0x0350; +pub const WAVE_FORMAT_MICRONAS_CELP833: ::WORD = 0x0351; +pub const WAVE_FORMAT_BTV_DIGITAL: ::WORD = 0x0400; +pub const WAVE_FORMAT_INTEL_MUSIC_CODER: ::WORD = 0x0401; +pub const WAVE_FORMAT_INDEO_AUDIO: ::WORD = 0x0402; +pub const WAVE_FORMAT_QDESIGN_MUSIC: ::WORD = 0x0450; +pub const WAVE_FORMAT_ON2_VP7_AUDIO: ::WORD = 0x0500; +pub const WAVE_FORMAT_ON2_VP6_AUDIO: ::WORD = 0x0501; +pub const WAVE_FORMAT_VME_VMPCM: ::WORD = 0x0680; +pub const WAVE_FORMAT_TPC: ::WORD = 0x0681; +pub const WAVE_FORMAT_LIGHTWAVE_LOSSLESS: ::WORD = 0x08AE; +pub const WAVE_FORMAT_OLIGSM: ::WORD = 0x1000; +pub const WAVE_FORMAT_OLIADPCM: ::WORD = 0x1001; +pub const WAVE_FORMAT_OLICELP: ::WORD = 0x1002; +pub const WAVE_FORMAT_OLISBC: ::WORD = 0x1003; +pub const WAVE_FORMAT_OLIOPR: ::WORD = 0x1004; +pub const WAVE_FORMAT_LH_CODEC: ::WORD = 0x1100; +pub const WAVE_FORMAT_LH_CODEC_CELP: ::WORD = 0x1101; +pub const WAVE_FORMAT_LH_CODEC_SBC8: ::WORD = 0x1102; +pub const WAVE_FORMAT_LH_CODEC_SBC12: ::WORD = 0x1103; +pub const WAVE_FORMAT_LH_CODEC_SBC16: ::WORD = 0x1104; +pub const WAVE_FORMAT_NORRIS: ::WORD = 0x1400; +pub const WAVE_FORMAT_ISIAUDIO_2: ::WORD = 0x1401; +pub const WAVE_FORMAT_SOUNDSPACE_MUSICOMPRESS: ::WORD = 0x1500; +pub const WAVE_FORMAT_MPEG_ADTS_AAC: ::WORD = 0x1600; +pub const WAVE_FORMAT_MPEG_RAW_AAC: ::WORD = 0x1601; +pub const WAVE_FORMAT_MPEG_LOAS: ::WORD = 0x1602; +pub const WAVE_FORMAT_NOKIA_MPEG_ADTS_AAC: ::WORD = 0x1608; +pub const WAVE_FORMAT_NOKIA_MPEG_RAW_AAC: ::WORD = 0x1609; +pub const WAVE_FORMAT_VODAFONE_MPEG_ADTS_AAC: ::WORD = 0x160A; +pub const WAVE_FORMAT_VODAFONE_MPEG_RAW_AAC: ::WORD = 0x160B; +pub const WAVE_FORMAT_MPEG_HEAAC: ::WORD = 0x1610; +pub const WAVE_FORMAT_VOXWARE_RT24_SPEECH: ::WORD = 0x181C; +pub const WAVE_FORMAT_SONICFOUNDRY_LOSSLESS: ::WORD = 0x1971; +pub const WAVE_FORMAT_INNINGS_TELECOM_ADPCM: ::WORD = 0x1979; +pub const WAVE_FORMAT_LUCENT_SX8300P: ::WORD = 0x1C07; +pub const WAVE_FORMAT_LUCENT_SX5363S: ::WORD = 0x1C0C; +pub const WAVE_FORMAT_CUSEEME: ::WORD = 0x1F03; +pub const WAVE_FORMAT_NTCSOFT_ALF2CM_ACM: ::WORD = 0x1FC4; +pub const WAVE_FORMAT_DVM: ::WORD = 0x2000; +pub const WAVE_FORMAT_DTS2: ::WORD = 0x2001; +pub const WAVE_FORMAT_MAKEAVIS: ::WORD = 0x3313; +pub const WAVE_FORMAT_DIVIO_MPEG4_AAC: ::WORD = 0x4143; +pub const WAVE_FORMAT_NOKIA_ADAPTIVE_MULTIRATE: ::WORD = 0x4201; +pub const WAVE_FORMAT_DIVIO_G726: ::WORD = 0x4243; +pub const WAVE_FORMAT_LEAD_SPEECH: ::WORD = 0x434C; +pub const WAVE_FORMAT_LEAD_VORBIS: ::WORD = 0x564C; +pub const WAVE_FORMAT_WAVPACK_AUDIO: ::WORD = 0x5756; +pub const WAVE_FORMAT_OGG_VORBIS_MODE_1: ::WORD = 0x674F; +pub const WAVE_FORMAT_OGG_VORBIS_MODE_2: ::WORD = 0x6750; +pub const WAVE_FORMAT_OGG_VORBIS_MODE_3: ::WORD = 0x6751; +pub const WAVE_FORMAT_OGG_VORBIS_MODE_1_PLUS: ::WORD = 0x676F; +pub const WAVE_FORMAT_OGG_VORBIS_MODE_2_PLUS: ::WORD = 0x6770; +pub const WAVE_FORMAT_OGG_VORBIS_MODE_3_PLUS: ::WORD = 0x6771; +pub const WAVE_FORMAT_3COM_NBX: ::WORD = 0x7000; +pub const WAVE_FORMAT_FAAD_AAC: ::WORD = 0x706D; +pub const WAVE_FORMAT_AMR_NB: ::WORD = 0x7361; +pub const WAVE_FORMAT_AMR_WB: ::WORD = 0x7362; +pub const WAVE_FORMAT_AMR_WP: ::WORD = 0x7363; +pub const WAVE_FORMAT_GSM_AMR_CBR: ::WORD = 0x7A21; +pub const WAVE_FORMAT_GSM_AMR_VBR_SID: ::WORD = 0x7A22; +pub const WAVE_FORMAT_COMVERSE_INFOSYS_G723_1: ::WORD = 0xA100; +pub const WAVE_FORMAT_COMVERSE_INFOSYS_AVQSBC: ::WORD = 0xA101; +pub const WAVE_FORMAT_COMVERSE_INFOSYS_SBC: ::WORD = 0xA102; +pub const WAVE_FORMAT_SYMBOL_G729_A: ::WORD = 0xA103; +pub const WAVE_FORMAT_VOICEAGE_AMR_WB: ::WORD = 0xA104; +pub const WAVE_FORMAT_INGENIENT_G726: ::WORD = 0xA105; +pub const WAVE_FORMAT_MPEG4_AAC: ::WORD = 0xA106; +pub const WAVE_FORMAT_ENCORE_G726: ::WORD = 0xA107; +pub const WAVE_FORMAT_ZOLL_ASAO: ::WORD = 0xA108; +pub const WAVE_FORMAT_SPEEX_VOICE: ::WORD = 0xA109; +pub const WAVE_FORMAT_VIANIX_MASC: ::WORD = 0xA10A; +pub const WAVE_FORMAT_WM9_SPECTRUM_ANALYZER: ::WORD = 0xA10B; +pub const WAVE_FORMAT_WMF_SPECTRUM_ANAYZER: ::WORD = 0xA10C; +pub const WAVE_FORMAT_GSM_610: ::WORD = 0xA10D; +pub const WAVE_FORMAT_GSM_620: ::WORD = 0xA10E; +pub const WAVE_FORMAT_GSM_660: ::WORD = 0xA10F; +pub const WAVE_FORMAT_GSM_690: ::WORD = 0xA110; +pub const WAVE_FORMAT_GSM_ADAPTIVE_MULTIRATE_WB: ::WORD = 0xA111; +pub const WAVE_FORMAT_POLYCOM_G722: ::WORD = 0xA112; +pub const WAVE_FORMAT_POLYCOM_G728: ::WORD = 0xA113; +pub const WAVE_FORMAT_POLYCOM_G729_A: ::WORD = 0xA114; +pub const WAVE_FORMAT_POLYCOM_SIREN: ::WORD = 0xA115; +pub const WAVE_FORMAT_GLOBAL_IP_ILBC: ::WORD = 0xA116; +pub const WAVE_FORMAT_RADIOTIME_TIME_SHIFT_RADIO: ::WORD = 0xA117; +pub const WAVE_FORMAT_NICE_ACA: ::WORD = 0xA118; +pub const WAVE_FORMAT_NICE_ADPCM: ::WORD = 0xA119; +pub const WAVE_FORMAT_VOCORD_G721: ::WORD = 0xA11A; +pub const WAVE_FORMAT_VOCORD_G726: ::WORD = 0xA11B; +pub const WAVE_FORMAT_VOCORD_G722_1: ::WORD = 0xA11C; +pub const WAVE_FORMAT_VOCORD_G728: ::WORD = 0xA11D; +pub const WAVE_FORMAT_VOCORD_G729: ::WORD = 0xA11E; +pub const WAVE_FORMAT_VOCORD_G729_A: ::WORD = 0xA11F; +pub const WAVE_FORMAT_VOCORD_G723_1: ::WORD = 0xA120; +pub const WAVE_FORMAT_VOCORD_LBC: ::WORD = 0xA121; +pub const WAVE_FORMAT_NICE_G728: ::WORD = 0xA122; +pub const WAVE_FORMAT_FRACE_TELECOM_G729: ::WORD = 0xA123; +pub const WAVE_FORMAT_CODIAN: ::WORD = 0xA124; +pub const WAVE_FORMAT_FLAC: ::WORD = 0xF1AC; +pub const WAVE_FORMAT_EXTENSIBLE: ::WORD = 0xFFFE; +pub const WAVE_FORMAT_DEVELOPMENT: ::WORD = 0xFFFF; +//2557 +pub const SPEAKER_FRONT_LEFT: ::DWORD = 0x1; +pub const SPEAKER_FRONT_RIGHT: ::DWORD = 0x2; +pub const SPEAKER_FRONT_CENTER: ::DWORD = 0x4; +pub const SPEAKER_LOW_FREQUENCY: ::DWORD = 0x8; +pub const SPEAKER_BACK_LEFT: ::DWORD = 0x10; +pub const SPEAKER_BACK_RIGHT: ::DWORD = 0x20; +pub const SPEAKER_FRONT_LEFT_OF_CENTER: ::DWORD = 0x40; +pub const SPEAKER_FRONT_RIGHT_OF_CENTER: ::DWORD = 0x80; +pub const SPEAKER_BACK_CENTER: ::DWORD = 0x100; +pub const SPEAKER_SIDE_LEFT: ::DWORD = 0x200; +pub const SPEAKER_SIDE_RIGHT: ::DWORD = 0x400; +pub const SPEAKER_TOP_CENTER: ::DWORD = 0x800; +pub const SPEAKER_TOP_FRONT_LEFT: ::DWORD = 0x1000; +pub const SPEAKER_TOP_FRONT_CENTER: ::DWORD = 0x2000; +pub const SPEAKER_TOP_FRONT_RIGHT: ::DWORD = 0x4000; +pub const SPEAKER_TOP_BACK_LEFT: ::DWORD = 0x8000; +pub const SPEAKER_TOP_BACK_CENTER: ::DWORD = 0x10000; +pub const SPEAKER_TOP_BACK_RIGHT: ::DWORD = 0x20000; +pub const SPEAKER_RESERVED: ::DWORD = 0x7FFC0000; +pub const SPEAKER_ALL: ::DWORD = 0x80000000; +STRUCT!{struct WAVEFORMATEX { + wFormatTag: ::WORD, + nChannels: ::WORD, + nSamplesPerSec: ::DWORD, + nAvgBytesPerSec: ::DWORD, + nBlockAlign: ::WORD, + wBitsPerSample: ::WORD, + cbSize: ::WORD, +}} +STRUCT!{struct WAVEFORMATEXTENSIBLE { + Format: ::WAVEFORMATEX, + Samples: ::WORD, + dwChannelMask: ::DWORD, + SubFormat: ::GUID, +}} diff --git a/deps/winapi-0.2.5/src/mmsystem.rs b/deps/winapi-0.2.6/src/mmsystem.rs similarity index 100% rename from deps/winapi-0.2.5/src/mmsystem.rs rename to deps/winapi-0.2.6/src/mmsystem.rs diff --git a/deps/winapi-0.2.5/src/mscat.rs b/deps/winapi-0.2.6/src/mscat.rs similarity index 100% rename from deps/winapi-0.2.5/src/mscat.rs rename to deps/winapi-0.2.6/src/mscat.rs diff --git a/deps/winapi-0.2.6/src/mssip.rs b/deps/winapi-0.2.6/src/mssip.rs new file mode 100644 index 000000000..5eeaa7e74 --- /dev/null +++ b/deps/winapi-0.2.6/src/mssip.rs @@ -0,0 +1,103 @@ +// Copyright © 2015, skdltmxn +// Licensed under the MIT License <LICENSE.md> +//! Microsoft SIP Provider Prototypes and Definitions +STRUCT!{struct SIP_SUBJECTINFO { + cbSize: ::DWORD, + pgSubjectType: *mut ::GUID, + hFile: ::HANDLE, + pwsFileName: ::LPCWSTR, + pwsDisplayName: ::LPCWSTR, + dwReserved1: ::DWORD, + dwIntVersion: ::DWORD, + hProv: ::HCRYPTPROV, + DigestAlgorithm: ::CRYPT_ALGORITHM_IDENTIFIER, + dwFlags: ::DWORD, + dwEncodingType: ::DWORD, + dwReserved2: ::DWORD, + fdwCAPISettings: ::DWORD, + fdwSecuritySettings: ::DWORD, + dwIndex: ::DWORD, + dwUnionChoice: ::DWORD, + psFlat: *mut MS_ADDINFO_FLAT, + pClientData: ::LPVOID, +}} +UNION!(SIP_SUBJECTINFO, psFlat, psCatMember, psCatMember_mut, *mut MS_ADDINFO_CATALOGMEMBER); +UNION!(SIP_SUBJECTINFO, psFlat, psBlob, psBlob_mut, *mut MS_ADDINFO_BLOB); +pub type LPSIP_SUBJECTINFO = *mut SIP_SUBJECTINFO; +STRUCT!{struct MS_ADDINFO_FLAT { + cbStruct: ::DWORD, + pIndirectData: *mut SIP_INDIRECT_DATA, +}} +pub type PMS_ADDINFO_FLAT = *mut MS_ADDINFO_FLAT; +STRUCT!{struct MS_ADDINFO_CATALOGMEMBER { + cbStruct: ::DWORD, + pStore: *mut ::CRYPTCATSTORE, + pMember: *mut ::CRYPTCATMEMBER, +}} +pub type PMS_ADDINFO_CATALOGMEMBER = *mut MS_ADDINFO_CATALOGMEMBER; +STRUCT!{struct MS_ADDINFO_BLOB { + cbStruct: ::DWORD, + cbMemObject: ::DWORD, + pbMemObject: *mut ::BYTE, + cbMemSignedMsg: ::DWORD, + pbMemSignedMsg: *mut ::BYTE, +}} +pub type PMS_ADDINFO_BLOB = *mut MS_ADDINFO_BLOB; +STRUCT!{struct SIP_INDIRECT_DATA { + Data: ::CRYPT_ATTRIBUTE_TYPE_VALUE, + DigestAlgorithm: ::CRYPT_ALGORITHM_IDENTIFIER, + Digest: ::CRYPT_HASH_BLOB, +}} +pub type PSIP_INDIRECT_DATA = *mut SIP_INDIRECT_DATA; +STRUCT!{struct SIP_ADD_NEWPROVIDER { + cbStruct: ::DWORD, + pgSubject: *mut ::GUID, + pwszDLLFileName: *mut ::WCHAR, + pwszMagicNumber: *mut ::WCHAR, + pwszIsFunctionName: *mut ::WCHAR, + pwszGetFuncName: *mut ::WCHAR, + pwszPutFuncName: *mut ::WCHAR, + pwszCreateFuncName: *mut ::WCHAR, + pwszVerifyFuncName: *mut ::WCHAR, + pwszRemoveFuncName: *mut ::WCHAR, + pwszIsFunctionNameFmt2: *mut ::WCHAR, + pwszGetCapFuncName: ::PWSTR, +}} +pub type PSIP_ADD_NEWPROVIDER = *mut SIP_ADD_NEWPROVIDER; +STRUCT!{struct SIP_CAP_SET_V3 { + cbSize: ::DWORD, + dwVersion: ::DWORD, + isMultiSign: ::BOOL, + dwFlags: ::DWORD, +}} +UNION!(SIP_CAP_SET_V3, dwFlags, dwReserved, dwReserved_mut, ::DWORD); +pub type PSIP_CAP_SET_V3 = *mut SIP_CAP_SET_V3; +pub type SIP_CAP_SET = PSIP_CAP_SET_V3; +pub type pCryptSIPGetSignedDataMsg = Option<unsafe extern "system" fn( + pSubjectInfo: *mut SIP_SUBJECTINFO, pdwEncodingType: *mut ::DWORD, dwIndex: ::DWORD, + pcbSignedDataMsg: *mut ::DWORD, pbSignedDataMsg: *mut ::BYTE, +) -> ::BOOL>; +pub type pCryptSIPPutSignedDataMsg = Option<unsafe extern "system" fn( + pSubjectInfo: *mut SIP_SUBJECTINFO, dwEncodingType: ::DWORD, pdwIndex: *mut ::DWORD, + cbSignedDataMsg: ::DWORD, pbSignedDataMsg: *mut ::BYTE, +) -> ::BOOL>; +pub type pCryptSIPCreateIndirectData = Option<unsafe extern "system" fn( + pSubjectInfo: *mut SIP_SUBJECTINFO, pcbIndirectData: *mut ::DWORD, + pIndirectData: *mut SIP_INDIRECT_DATA, +) -> ::BOOL>; +pub type pCryptSIPVerifyIndirectData = Option<unsafe extern "system" fn( + pSubjectInfo: *mut SIP_SUBJECTINFO, pIndirectData: *mut SIP_INDIRECT_DATA, +) -> ::BOOL>; +pub type pCryptSIPRemoveSignedDataMsg = Option<unsafe extern "system" fn( + pSubjectInfo: *mut SIP_SUBJECTINFO, dwIndex: ::DWORD, +) -> ::BOOL>; +STRUCT!{nodebug struct SIP_DISPATCH_INFO { + cbSize: ::DWORD, + hSIP: ::HANDLE, + pfGet: pCryptSIPGetSignedDataMsg, + pfPut: pCryptSIPPutSignedDataMsg, + pfCreate: pCryptSIPCreateIndirectData, + pfVerify: pCryptSIPVerifyIndirectData, + pfRemove: pCryptSIPRemoveSignedDataMsg, +}} +pub type LPSIP_DISPATCH_INFO = *mut SIP_DISPATCH_INFO; diff --git a/deps/winapi-0.2.6/src/nb30.rs b/deps/winapi-0.2.6/src/nb30.rs new file mode 100644 index 000000000..26e9dea0a --- /dev/null +++ b/deps/winapi-0.2.6/src/nb30.rs @@ -0,0 +1,200 @@ +// Copyright © 2015, skdltmxn +// Licensed under the MIT License <LICENSE.md> +// This module contains the definitions for portable NetBIOS 3.0 support. +pub const NCBNAMSZ: usize = 16; +pub const MAX_LANA: usize = 254; +pub type PFPOST = Option<unsafe extern "system" fn(*mut NCB)>; +#[cfg(target_arch="x86_64")] +STRUCT!{nodebug struct NCB { + ncb_command: ::UCHAR, + ncb_retcode: ::UCHAR, + ncb_lsn: ::UCHAR, + ncb_num: ::UCHAR, + ncb_buffer: ::PUCHAR, + ncb_length: ::WORD, + ncb_callname: [::UCHAR; NCBNAMSZ], + ncb_name: [::UCHAR; NCBNAMSZ], + ncb_rto: ::UCHAR, + ncb_sto: ::UCHAR, + ncb_post: PFPOST, + ncb_lana_num: ::UCHAR, + ncb_cmd_cplt: ::UCHAR, + ncb_reserve: [::UCHAR; 18], + ncb_event: ::HANDLE, +}} +#[cfg(target_arch="x86")] +STRUCT!{nodebug struct NCB { + ncb_command: ::UCHAR, + ncb_retcode: ::UCHAR, + ncb_lsn: ::UCHAR, + ncb_num: ::UCHAR, + ncb_buffer: ::PUCHAR, + ncb_length: ::WORD, + ncb_callname: [::UCHAR; NCBNAMSZ], + ncb_name: [::UCHAR; NCBNAMSZ], + ncb_rto: ::UCHAR, + ncb_sto: ::UCHAR, + ncb_post: PFPOST, + ncb_lana_num: ::UCHAR, + ncb_cmd_cplt: ::UCHAR, + ncb_reserve: [::UCHAR; 10], + ncb_event: ::HANDLE, +}} +pub type PNCB = *mut NCB; +STRUCT!{struct ADAPTER_STATUS { + adapter_address: [::UCHAR; 6], + rev_major: ::UCHAR, + reserved0: ::UCHAR, + adapter_type: ::UCHAR, + rev_minor: ::UCHAR, + duration: ::WORD, + frmr_recv: ::WORD, + frmr_xmit: ::WORD, + iframe_recv_err: ::WORD, + xmit_aborts: ::WORD, + xmit_success: ::DWORD, + recv_success: ::DWORD, + iframe_xmit_err: ::WORD, + recv_buff_unavail: ::WORD, + t1_timeouts: ::WORD, + ti_timeouts: ::WORD, + reserved1: ::DWORD, + free_ncbs: ::WORD, + max_cfg_ncbs: ::WORD, + max_ncbs: ::WORD, + xmit_buf_unavail: ::WORD, + max_dgram_size: ::WORD, + pending_sess: ::WORD, + max_cfg_sess: ::WORD, + max_sess: ::WORD, + max_sess_pkt_size: ::WORD, + name_count: ::WORD, +}} +pub type PADAPTER_STATUS = *mut ADAPTER_STATUS; +STRUCT!{struct NAME_BUFFER { + name: [::UCHAR; NCBNAMSZ], + name_num: ::UCHAR, + name_flags: ::UCHAR, +}} +pub type PNAME_BUFFER = *mut NAME_BUFFER; +pub const NAME_FLAGS_MASK: ::UCHAR = 0x87; +pub const GROUP_NAME: ::UCHAR = 0x80; +pub const UNIQUE_NAME: ::UCHAR = 0x00; +pub const REGISTERING: ::UCHAR = 0x00; +pub const REGISTERED: ::UCHAR = 0x04; +pub const DEREGISTERED: ::UCHAR = 0x05; +pub const DUPLICATE: ::UCHAR = 0x06; +pub const DUPLICATE_DEREG: ::UCHAR = 0x07; +STRUCT!{struct SESSION_HEADER { + sess_name: ::UCHAR, + num_sess: ::UCHAR, + rcv_dg_outstanding: ::UCHAR, + rcv_any_outstanding: ::UCHAR, +}} +pub type PSESSION_HEADER = *mut SESSION_HEADER; +STRUCT!{struct SESSION_BUFFER { + lsn: ::UCHAR, + state: ::UCHAR, + local_name: [::UCHAR; NCBNAMSZ], + remote_name: [::UCHAR; NCBNAMSZ], + rcvs_outstanding: ::UCHAR, + sends_outstanding: ::UCHAR, +}} +pub type PSESSION_BUFFER = *mut SESSION_BUFFER; +pub const LISTEN_OUTSTANDING: ::UCHAR = 0x01; +pub const CALL_PENDING: ::UCHAR = 0x02; +pub const SESSION_ESTABLISHED: ::UCHAR = 0x03; +pub const HANGUP_PENDING: ::UCHAR = 0x04; +pub const HANGUP_COMPLETE: ::UCHAR = 0x05; +pub const SESSION_ABORTED: ::UCHAR = 0x06; +STRUCT!{nodebug struct LANA_ENUM { + length: ::UCHAR, + lana: [::UCHAR; MAX_LANA + 1], +}} +pub type PLANA_ENUM = *mut LANA_ENUM; +STRUCT!{struct FIND_NAME_HEADER { + node_count: ::WORD, + reserved: ::UCHAR, + unique_group: ::UCHAR, +}} +pub type PFIND_NAME_HEADER = *mut FIND_NAME_HEADER; +STRUCT!{struct FIND_NAME_BUFFER { + length: ::UCHAR, + access_control: ::UCHAR, + frame_control: ::UCHAR, + destination_addr: [::UCHAR; 6], + source_addr: [::UCHAR; 6], + routing_info: [::UCHAR; 18], +}} +pub type PFIND_NAME_BUFFER = *mut FIND_NAME_BUFFER; +STRUCT!{struct ACTION_HEADER { + transport_id: ::ULONG, + action_code: ::USHORT, + reserved: ::USHORT, +}} +pub type PACTION_HEADER = *mut ACTION_HEADER; +pub const NCBCALL: ::UCHAR = 0x10; +pub const NCBLISTEN: ::UCHAR = 0x11; +pub const NCBHANGUP: ::UCHAR = 0x12; +pub const NCBSEND: ::UCHAR = 0x14; +pub const NCBRECV: ::UCHAR = 0x15; +pub const NCBRECVANY: ::UCHAR = 0x16; +pub const NCBCHAINSEND: ::UCHAR = 0x17; +pub const NCBDGSEND: ::UCHAR = 0x20; +pub const NCBDGRECV: ::UCHAR = 0x21; +pub const NCBDGSENDBC: ::UCHAR = 0x22; +pub const NCBADDNAME: ::UCHAR = 0x30; +pub const NCBDELNAME: ::UCHAR = 0x31; +pub const NCBRESET: ::UCHAR = 0x32; +pub const NCBASTAT: ::UCHAR = 0x33; +pub const NCBSSTAT: ::UCHAR = 0x34; +pub const NCBCANCEL: ::UCHAR = 0x35; +pub const NCBADDGRNAME: ::UCHAR = 0x36; +pub const NCBENUM: ::UCHAR = 0x37; +pub const NCBUNLINK: ::UCHAR = 0x70; +pub const NCBSENDNA: ::UCHAR = 0x71; +pub const NCBCHAINSENDNA: ::UCHAR = 0x72; +pub const NCBLANSTALERT: ::UCHAR = 0x73; +pub const NCBACTION: ::UCHAR = 0x77; +pub const NCBFINDNAME: ::UCHAR = 0x78; +pub const NCBTRACE: ::UCHAR = 0x79; +pub const ASYNCH: ::UCHAR = 0x80; +pub const NRC_GOODRET: ::UCHAR = 0x00; +pub const NRC_BUFLEN: ::UCHAR = 0x01; +pub const NRC_ILLCMD: ::UCHAR = 0x03; +pub const NRC_CMDTMO: ::UCHAR = 0x05; +pub const NRC_INCOMP: ::UCHAR = 0x06; +pub const NRC_BADDR: ::UCHAR = 0x07; +pub const NRC_SNUMOUT: ::UCHAR = 0x08; +pub const NRC_NORES: ::UCHAR = 0x09; +pub const NRC_SCLOSED: ::UCHAR = 0x0a; +pub const NRC_CMDCAN: ::UCHAR = 0x0b; +pub const NRC_DUPNAME: ::UCHAR = 0x0d; +pub const NRC_NAMTFUL: ::UCHAR = 0x0e; +pub const NRC_ACTSES: ::UCHAR = 0x0f; +pub const NRC_LOCTFUL: ::UCHAR = 0x11; +pub const NRC_REMTFUL: ::UCHAR = 0x12; +pub const NRC_ILLNN: ::UCHAR = 0x13; +pub const NRC_NOCALL: ::UCHAR = 0x14; +pub const NRC_NOWILD: ::UCHAR = 0x15; +pub const NRC_INUSE: ::UCHAR = 0x16; +pub const NRC_NAMERR: ::UCHAR = 0x17; +pub const NRC_SABORT: ::UCHAR = 0x18; +pub const NRC_NAMCONF: ::UCHAR = 0x19; +pub const NRC_IFBUSY: ::UCHAR = 0x21; +pub const NRC_TOOMANY: ::UCHAR = 0x22; +pub const NRC_BRIDGE: ::UCHAR = 0x23; +pub const NRC_CANOCCR: ::UCHAR = 0x24; +pub const NRC_CANCEL: ::UCHAR = 0x26; +pub const NRC_DUPENV: ::UCHAR = 0x30; +pub const NRC_ENVNOTDEF: ::UCHAR = 0x34; +pub const NRC_OSRESNOTAV: ::UCHAR = 0x35; +pub const NRC_MAXAPPS: ::UCHAR = 0x36; +pub const NRC_NOSAPS: ::UCHAR = 0x37; +pub const NRC_NORESOURCES: ::UCHAR = 0x38; +pub const NRC_INVADDRESS: ::UCHAR = 0x39; +pub const NRC_INVDDID: ::UCHAR = 0x3B; +pub const NRC_LOCKFAIL: ::UCHAR = 0x3C; +pub const NRC_OPENERR: ::UCHAR = 0x3f; +pub const NRC_SYSTEM: ::UCHAR = 0x40; +pub const NRC_PENDING: ::UCHAR = 0xff; diff --git a/deps/winapi-0.2.5/src/ncrypt.rs b/deps/winapi-0.2.6/src/ncrypt.rs similarity index 100% rename from deps/winapi-0.2.5/src/ncrypt.rs rename to deps/winapi-0.2.6/src/ncrypt.rs diff --git a/deps/winapi-0.2.5/src/ntdef.rs b/deps/winapi-0.2.6/src/ntdef.rs similarity index 100% rename from deps/winapi-0.2.5/src/ntdef.rs rename to deps/winapi-0.2.6/src/ntdef.rs diff --git a/deps/winapi-0.2.5/src/ntsecapi.rs b/deps/winapi-0.2.6/src/ntsecapi.rs similarity index 100% rename from deps/winapi-0.2.5/src/ntsecapi.rs rename to deps/winapi-0.2.6/src/ntsecapi.rs diff --git a/deps/winapi-0.2.5/src/ntstatus.rs b/deps/winapi-0.2.6/src/ntstatus.rs similarity index 100% rename from deps/winapi-0.2.5/src/ntstatus.rs rename to deps/winapi-0.2.6/src/ntstatus.rs diff --git a/deps/winapi-0.2.6/src/oaidl.rs b/deps/winapi-0.2.6/src/oaidl.rs new file mode 100644 index 000000000..c705060bd --- /dev/null +++ b/deps/winapi-0.2.6/src/oaidl.rs @@ -0,0 +1,590 @@ +// Copyright © 2015, Connor Hilarides +// Licensed under the MIT License <LICENSE.md> +//! Mappings for the contents of OAIdl.h +pub type wireBRECORD = *mut _wireBRECORD; +pub type wireVARIANT = *mut _wireVARIANT; +STRUCT!{struct SAFEARRAYBOUND { + cElements: ::ULONG, + lLbound: ::LONG, +}} +STRUCT!{struct SAFEARR_BSTR { + Size: ::ULONG, + aBstr: *mut ::wireBSTR, +}} +STRUCT!{struct SAFEARR_UNKNOWN { + Size: ::ULONG, + apUnknown: *mut *mut ::IUnknown, +}} +STRUCT!{struct SAFEARR_DISPATCH { + Size: ::ULONG, + apDispatch: *mut *mut IDispatch, +}} +STRUCT!{struct SAFEARR_VARIANT { + Size: ::ULONG, + aVariant: *mut wireVARIANT, +}} +STRUCT!{struct SAFEARR_BRECORD { + Size: ::ULONG, + aRecord: *mut wireBRECORD, +}} +STRUCT!{struct SAFEARR_HAVEIID { + Size: ::ULONG, + apUnknown: *mut *mut ::IUnknown, + iid: ::IID, +}} +ENUM!{enum SF_TYPE { + SF_ERROR = ::VT_ERROR.0, + SF_I1 = ::VT_I1.0, + SF_I2 = ::VT_I2.0, + SF_I4 = ::VT_I4.0, + SF_I8 = ::VT_I8.0, + SF_BSTR = ::VT_BSTR.0, + SF_UNKNOWN = ::VT_UNKNOWN.0, + SF_DISPATCH = ::VT_DISPATCH.0, + SF_VARIANT = ::VT_VARIANT.0, + SF_RECORD = ::VT_RECORD.0, + SF_HAVEIID = ::VT_UNKNOWN.0 | ::VT_RESERVED.0, +}} +STRUCT!{struct SAFEARRAYUNION { + sfType: ::ULONG, + u: __MIDL_IOleAutomationTypes_0001, +}} +#[cfg(target_arch = "x86_64")] +STRUCT!{struct __MIDL_IOleAutomationTypes_0001 { + data0: u32, + data1: [u32; 6], +}} +#[cfg(target_arch = "x86")] +STRUCT!{struct __MIDL_IOleAutomationTypes_0001 { + data0: u32, + data1: [u32; 5], +}} +UNION!(__MIDL_IOleAutomationTypes_0001, data0, BstrStr, BstrStr_mut, SAFEARR_BSTR); +UNION!(__MIDL_IOleAutomationTypes_0001, data0, UnknownStr, UnknownStr_mut, SAFEARR_UNKNOWN); +UNION!(__MIDL_IOleAutomationTypes_0001, data0, DispatchStr, DispatchStr_mut, SAFEARR_DISPATCH); +UNION!(__MIDL_IOleAutomationTypes_0001, data0, VariantStr, VariantStr_mut, SAFEARR_VARIANT); +UNION!(__MIDL_IOleAutomationTypes_0001, data0, RecordStr, RecordStr_mut, SAFEARR_BRECORD); +UNION!(__MIDL_IOleAutomationTypes_0001, data0, HaveIidStr, HaveIidStr_mut, SAFEARR_HAVEIID); +UNION!(__MIDL_IOleAutomationTypes_0001, data0, ByteStr, ByteStr_mut, ::BYTE_SIZEDARR); +UNION!(__MIDL_IOleAutomationTypes_0001, data0, WordStr, WordStr_mut, ::WORD_SIZEDARR); +UNION!(__MIDL_IOleAutomationTypes_0001, data0, LongStr, LongStr_mut, ::DWORD_SIZEDARR); +UNION!(__MIDL_IOleAutomationTypes_0001, data0, HyperStr, HyperStr_mut, ::HYPER_SIZEDARR); +STRUCT!{struct _wireSAFEARRAY { + cDims: ::USHORT, + fFeatures: ::USHORT, + cbElements: ::ULONG, + cLocks: ::ULONG, + uArrayStructs: SAFEARRAYUNION, + rgsaBound: [SAFEARRAYBOUND; 1], +}} +pub type wireSAFEARRAY = *mut _wireSAFEARRAY; +pub type wirePSAFEARRAY = *mut wireSAFEARRAY; +STRUCT!{struct SAFEARRAY { + cDims: ::USHORT, + fFeatures: ::USHORT, + cbElements: ::ULONG, + cLocks: ::ULONG, + pvData: ::PVOID, + rgsabound: [SAFEARRAYBOUND; 1], +}} +pub type LPSAFEARRAY = *mut SAFEARRAY; +pub const FADF_AUTO: ::DWORD = 0x1; +pub const FADF_STATIC: ::DWORD = 0x2; +pub const FADF_EMBEDDED: ::DWORD = 0x4; +pub const FADF_FIXEDSIZE: ::DWORD = 0x10; +pub const FADF_RECORD: ::DWORD = 0x20; +pub const FADF_HAVEIID: ::DWORD = 0x40; +pub const FADF_HAVEVARTYPE: ::DWORD = 0x80; +pub const FADF_BSTR: ::DWORD = 0x100; +pub const FADF_UNKNOWN: ::DWORD = 0x200; +pub const FADF_DISPATCH: ::DWORD = 0x400; +pub const FADF_VARIANT: ::DWORD = 0x800; +pub const FADF_RESERVED: ::DWORD = 0xf008; +#[cfg(target_arch = "x86_64")] +STRUCT!{struct VARIANT { + data0: u64, + data1: u64, + data2: u64, +}} +#[cfg(target_arch = "x86")] +STRUCT!{struct VARIANT { + data0: u64, + data1: u32, + data2: u32, +}} +UNION!(VARIANT, data0, vt, vt_mut, ::VARTYPE); +UNION!(VARIANT, data1, llVal, llVal_mut, ::LONGLONG); +UNION!(VARIANT, data1, lVal, lVal_mut, ::LONG); +UNION!(VARIANT, data1, bVal, bVal_mut, ::BYTE); +UNION!(VARIANT, data1, iVal, iVal_mut, ::SHORT); +UNION!(VARIANT, data1, fltVal, fltVal_mut, ::FLOAT); +UNION!(VARIANT, data1, dblVal, dblVal_mut, ::DOUBLE); +UNION!(VARIANT, data1, boolVal, boolVal_mut, ::VARIANT_BOOL); +UNION!(VARIANT, data1, scode, scode_mut, ::SCODE); +UNION!(VARIANT, data1, cyVal, cyVal_mut, ::CY); +UNION!(VARIANT, data1, date, date_mut, ::DATE); +UNION!(VARIANT, data1, bstrVal, bstrVal_mut, ::BSTR); +UNION!(VARIANT, data1, punkVal, punkVal_mut, *mut ::IUnknown); +UNION!(VARIANT, data1, pdispVal, pdispVal_mut, *mut IDispatch); +UNION!(VARIANT, data1, parray, parray_mut, *mut SAFEARRAY); +UNION!(VARIANT, data1, pllVal, pllVal_mut, *mut ::LONGLONG); +UNION!(VARIANT, data1, plVal, plVal_mut, *mut ::LONG); +UNION!(VARIANT, data1, pbVal, pbVal_mut, *mut ::BYTE); +UNION!(VARIANT, data1, piVal, piVal_mut, *mut ::SHORT); +UNION!(VARIANT, data1, pfltVal, pfltVal_mut, *mut ::FLOAT); +UNION!(VARIANT, data1, pdblVal, pdblVal_mut, *mut ::DOUBLE); +UNION!(VARIANT, data1, pboolVal, pboolVal_mut, *mut ::VARIANT_BOOL); +UNION!(VARIANT, data1, pscode, pscode_mut, *mut ::SCODE); +UNION!(VARIANT, data1, pcyVal, pcyVal_mut, *mut ::CY); +UNION!(VARIANT, data1, pdate, pdate_mut, *mut ::DATE); +UNION!(VARIANT, data1, pbstrVal, pbstrVal_mut, *mut ::BSTR); +UNION!(VARIANT, data1, ppunkVal, ppunkVal_mut, *mut *mut ::IUnknown); +UNION!(VARIANT, data1, ppdispVal, ppdispVal_mut, *mut *mut IDispatch); +UNION!(VARIANT, data1, pparray, pparray_mut, *mut *mut SAFEARRAY); +UNION!(VARIANT, data1, pvarVal, pvarVal_mut, *mut VARIANT); +UNION!(VARIANT, data1, byref, byref_mut, ::PVOID); +UNION!(VARIANT, data1, cVal, cVal_mut, ::CHAR); +UNION!(VARIANT, data1, uiVal, uiVal_mut, ::USHORT); +UNION!(VARIANT, data1, ulVal, ulVal_mut, ::ULONG); +UNION!(VARIANT, data1, ullVal, ullVal_mut, ::ULONGLONG); +UNION!(VARIANT, data1, intVal, intVal_mut, ::INT); +UNION!(VARIANT, data1, uintVal, uintVal_mut, ::UINT); +UNION!(VARIANT, data1, pdecVal, pdecVal_mut, *mut ::DECIMAL); +UNION!(VARIANT, data1, pcVal, pcVal_mut, *mut ::CHAR); +UNION!(VARIANT, data1, puiVal, puiVal_mut, *mut ::USHORT); +UNION!(VARIANT, data1, pulVal, pulVal_mut, *mut ::ULONG); +UNION!(VARIANT, data1, pullVal, pullVal_mut, *mut ::ULONGLONG); +UNION!(VARIANT, data1, pintVal, pintVal_mut, *mut ::INT); +UNION!(VARIANT, data1, puintVal, puintVal_mut, *mut ::UINT); +UNION!(VARIANT, data1, pvRecord, pvRecord_mut, ::PVOID); +UNION!(VARIANT, data2, pRecInfo, pRecInfo_mut, *mut IRecordInfo); +UNION!(VARIANT, data0, decVal, decVal_mut, ::DECIMAL); +pub type LPVARIANT = *mut VARIANT; +pub type VARIANTARG = VARIANT; +pub type LPVARIANTARG = *mut VARIANT; +pub type REFVARIANT = *const VARIANT; +STRUCT!{struct _wireBRECORD { + fFlags: ::ULONG, + clSize: ::ULONG, + pRecInfo: *mut IRecordInfo, + pRecord: *mut ::BYTE, +}} +STRUCT!{struct _wireVARIANT { + clSize: ::DWORD, + rpcReserved: ::DWORD, + vt: ::USHORT, + wReserved1: ::USHORT, + wReserved2: ::USHORT, + wReserved3: ::USHORT, + data0: u64, + data1: u64, +}} +UNION!(_wireVARIANT, data0, llVal, llVal_mut, ::LONGLONG); +UNION!(_wireVARIANT, data0, lVal, lVal_mut, ::LONG); +UNION!(_wireVARIANT, data0, bVal, bVal_mut, ::BYTE); +UNION!(_wireVARIANT, data0, iVal, iVal_mut, ::SHORT); +UNION!(_wireVARIANT, data0, fltVal, fltVal_mut, ::FLOAT); +UNION!(_wireVARIANT, data0, dblVal, dblVal_mut, ::DOUBLE); +UNION!(_wireVARIANT, data0, boolVal, boolVal_mut, ::VARIANT_BOOL); +UNION!(_wireVARIANT, data0, scode, scode_mut, ::SCODE); +UNION!(_wireVARIANT, data0, cyVal, cyVal_mut, ::CY); +UNION!(_wireVARIANT, data0, date, date_mut, ::DATE); +UNION!(_wireVARIANT, data0, bstrVal, bstrVal_mut, ::wireBSTR); +UNION!(_wireVARIANT, data0, punkVal, punkVal_mut, *mut ::IUnknown); +UNION!(_wireVARIANT, data0, pdispVal, pdispVal_mut, *mut IDispatch); +UNION!(_wireVARIANT, data0, parray, parray_mut, wirePSAFEARRAY); +UNION!(_wireVARIANT, data0, brecVal, brecVal_mut, wireBRECORD); +UNION!(_wireVARIANT, data0, pllVal, pllVal_mut, *mut ::LONGLONG); +UNION!(_wireVARIANT, data0, plVal, plVal_mut, *mut ::LONG); +UNION!(_wireVARIANT, data0, pbVal, pbVal_mut, *mut ::BYTE); +UNION!(_wireVARIANT, data0, piVal, piVal_mut, *mut ::SHORT); +UNION!(_wireVARIANT, data0, pfltVal, pfltVal_mut, *mut ::FLOAT); +UNION!(_wireVARIANT, data0, pdblVal, pdblVal_mut, *mut ::DOUBLE); +UNION!(_wireVARIANT, data0, pboolVal, pboolVal_mut, *mut ::VARIANT_BOOL); +UNION!(_wireVARIANT, data0, pscode, pscode_mut, *mut ::SCODE); +UNION!(_wireVARIANT, data0, pcyVal, pcyVal_mut, *mut ::CY); +UNION!(_wireVARIANT, data0, pdate, pdate_mut, *mut ::DATE); +UNION!(_wireVARIANT, data0, pbstrVal, pbstrVal_mut, *mut ::wireBSTR); +UNION!(_wireVARIANT, data0, ppunkVal, ppunkVal_mut, *mut *mut ::IUnknown); +UNION!(_wireVARIANT, data0, ppdispVal, ppdispVal_mut, *mut *mut IDispatch); +UNION!(_wireVARIANT, data0, pparray, pparray_mut, *mut wirePSAFEARRAY); +UNION!(_wireVARIANT, data0, pvarVal, pvarVal_mut, *mut wireVARIANT); +UNION!(_wireVARIANT, data0, cVal, cVal_mut, ::CHAR); +UNION!(_wireVARIANT, data0, uiVal, uiVal_mut, ::USHORT); +UNION!(_wireVARIANT, data0, ulVal, ulVal_mut, ::ULONG); +UNION!(_wireVARIANT, data0, ullVal, ullVal_mut, ::ULONGLONG); +UNION!(_wireVARIANT, data0, intVal, intVal_mut, ::INT); +UNION!(_wireVARIANT, data0, uintVal, uintVal_mut, ::UINT); +UNION!(_wireVARIANT, data0, decVal, decVal_mut, ::DECIMAL); +UNION!(_wireVARIANT, data0, pcVal, pcVal_mut, *mut ::CHAR); +UNION!(_wireVARIANT, data0, puiVal, puiVal_mut, *mut ::USHORT); +UNION!(_wireVARIANT, data0, pulVal, pulVal_mut, *mut ::ULONG); +UNION!(_wireVARIANT, data0, pullVal, pullVal_mut, *mut ::ULONGLONG); +UNION!(_wireVARIANT, data0, pintVal, pintVal_mut, *mut ::INT); +UNION!(_wireVARIANT, data0, puintVal, puintVal_mut, *mut ::UINT); +UNION!(_wireVARIANT, data0, pdecVal, pdecVal_mut, *mut ::DECIMAL); +pub type DISPID = ::LONG; +pub type MEMBERID = DISPID; +pub type HREFTYPE = ::DWORD; +ENUM!{enum TYPEKIND { + TKIND_ENUM = 0, + TKIND_RECORD, + TKIND_MODULE, + TKIND_INTERFACE, + TKIND_DISPATCH, + TKIND_COCLASS, + TKIND_ALIAS, + TKIND_UNION, + TKIND_MAX, +}} +#[cfg(target_arch = "x86_64")] +STRUCT!{struct TYPEDESC { + data: u64, + vt: ::VARTYPE, +}} +#[cfg(target_arch = "x86")] +STRUCT!{struct TYPEDESC { + data: u32, + vt: ::VARTYPE, +}} +UNION!(TYPEDESC, data, lptdesc, lptdesc_mut, *mut TYPEDESC); +UNION!(TYPEDESC, data, lpadesc, lpadesc_mut, *mut ARRAYDESC); +UNION!(TYPEDESC, data, hreftype, hreftype_mut, HREFTYPE); +STRUCT!{struct ARRAYDESC { + tdescElem: TYPEDESC, + cDims: ::USHORT, + rgbounds: [SAFEARRAYBOUND; 1], +}} +STRUCT!{struct PARAMDESCEX { + cBytes: ::ULONG, + varDefaultValue: VARIANTARG, +}} +pub type LPPARAMDESCEX = *mut PARAMDESCEX; +STRUCT!{struct PARAMDESC { + pparamdescex: LPPARAMDESCEX, + wParamFlags: ::USHORT, +}} +pub type LPPARAMDESC = *mut PARAMDESC; +pub const PARAMFLAG_NONE: ::DWORD = 0; +pub const PARAMFLAG_FIN: ::DWORD = 0x1; +pub const PARAMFLAG_FOUT: ::DWORD = 0x2; +pub const PARAMFLAG_FLCID: ::DWORD = 0x4; +pub const PARAMFLAG_FRETVAL: ::DWORD = 0x8; +pub const PARAMFLAG_FOPT: ::DWORD = 0x10; +pub const PARAMFLAG_FHASDEFAULT: ::DWORD = 0x20; +pub const PARAMFLAG_FHASCUSTDATA: ::DWORD = 0x40; +STRUCT!{struct IDLDESC { + dwReserved: ::ULONG_PTR, + wIDLFlags: ::USHORT, +}} +pub type LPIDLDESC = *mut IDLDESC; +pub const IDLFLAG_NONE: ::DWORD = PARAMFLAG_NONE; +pub const IDLFLAG_FIN: ::DWORD = PARAMFLAG_FIN; +pub const IDLFLAG_FOUT: ::DWORD = PARAMFLAG_FOUT; +pub const IDLFLAG_FLCID: ::DWORD = PARAMFLAG_FLCID; +pub const IDLFLAG_FRETVAL: ::DWORD = PARAMFLAG_FRETVAL; +STRUCT!{struct ELEMDESC { + tdesc: TYPEDESC, + idldesc: IDLDESC, +}} +UNION!(ELEMDESC, idldesc, paramdesc, paramdesc_mut, PARAMDESC); +pub type LPELEMDESC = *mut ELEMDESC; +STRUCT!{struct TYPEATTR { + guid: ::GUID, + lcid: ::LCID, + dwReserved: ::DWORD, + memidConstructor: ::MEMBERID, + memidDestructor: ::MEMBERID, + lpstrSchema: ::LPOLESTR, + cbSizeInstance: ::ULONG, + typekind: ::TYPEKIND, + cFuncs: ::WORD, + cVars: ::WORD, + cImplTypes: ::WORD, + cbSizeVft: ::WORD, + cbAlignment: ::WORD, + wTypeFlags: ::WORD, + wMajorVerNum: ::WORD, + wMinorVerNum: ::WORD, + tdescAlias: ::TYPEDESC, + idldescType: ::IDLDESC, +}} +pub type LPTYPEATTR = *mut TYPEATTR; +STRUCT!{struct DISPPARAMS { + rgvarg: *mut VARIANTARG, + rgdispidNamedArgs: *mut DISPID, + cArgs: ::UINT, + cNamedArgs: ::UINT, +}} +STRUCT!{nodebug struct EXCEPINFO { + wCode: ::WORD, + wReserved: ::WORD, + bstrSource: ::BSTR, + bstrDescription: ::BSTR, + bstrHelpFile: ::BSTR, + dwHelpContext: ::DWORD, + pvReserved: ::PVOID, + pfnDeferredFillIn: Option<unsafe extern "system" fn(einfo: *mut EXCEPINFO) -> ::HRESULT>, + scode: ::SCODE, +}} +ENUM!{enum CALLCONV { + CC_FASTCALL = 0, + CC_CDECL = 1, + CC_MSCPASCAL, + CC_PASCAL, + CC_MACPASCAL, + CC_STDCALL, + CC_FPFASTCALL, + CC_SYSCALL, + CC_MPWCDECL, + CC_MPWPASCAL, + CC_MAX, +}} +ENUM!{enum FUNCKIND { + FUNC_VIRTUAL = 0, + FUNC_PUREVIRTUAL, + FUNC_NONVIRTUAL, + FUNC_STATIC, + FUNC_DISPATCH, +}} +FLAGS!{enum INVOKEKIND { + INVOKE_FUNC = 1, + INVOKE_PROPERTYGET = 2, + INVOKE_PROPERTYPUT = 4, + INVOKE_PROPERTYPUTREF = 8, +}} +STRUCT!{struct FUNCDESC { + memid: ::MEMBERID, + lprgscode: *mut ::SCODE, + lprgelemdescParam: *mut ::ELEMDESC, + funckind: ::FUNCKIND, + invkind: ::INVOKEKIND, + callconv: ::CALLCONV, + cParams: ::SHORT, + cParamsOpt: ::SHORT, + oVft: ::SHORT, + cScodes: ::SHORT, + elemdescFunc: ::ELEMDESC, + wFuncFlags: ::WORD, +}} +pub type LPFUNCDESC = *mut FUNCDESC; +ENUM!{enum VARKIND { + VAR_PERINSTANCE = 0, + VAR_STATIC, + VAR_CONST, + VAR_DISPATCH, +}} +pub const IMPLTYPEFLAG_FDEFAULT: ::DWORD = 0x1; +pub const IMPLTYPEFLAG_FSOURCE: ::DWORD = 0x2; +pub const IMPLTYPEFLAG_FRESTRICTED: ::DWORD = 0x4; +pub const IMPLTYPEFLAG_FDEFAULTVTABLE: ::DWORD = 0x8; +STRUCT!{struct VARDESC { + memid: MEMBERID, + lpstrSchema: ::LPOLESTR, + lpvarValue: *mut VARIANT, + elemdescVar: ::ELEMDESC, + wVarFlags: ::WORD, + varkind: VARKIND, +}} +UNION!(VARDESC, lpvarValue, oInst, oInst_mut, ::ULONG); +pub type LPVARDESC = *mut VARDESC; +FLAGS!{enum TYPEFLAGS { + TYPEFLAG_FAPPOBJECT = 0x1, + TYPEFLAG_FCANCREATE = 0x2, + TYPEFLAG_FLICENSED = 0x4, + TYPEFLAG_FPREDECLID = 0x8, + TYPEFLAG_FHIDDEN = 0x10, + TYPEFLAG_FCONTROL = 0x20, + TYPEFLAG_FDUAL = 0x40, + TYPEFLAG_FNONEXTENSIBLE = 0x80, + TYPEFLAG_FOLEAUTOMATION = 0x100, + TYPEFLAG_FRESTRICTED = 0x200, + TYPEFLAG_FAGGREGATABLE = 0x400, + TYPEFLAG_FREPLACEABLE = 0x800, + TYPEFLAG_FDISPATCHABLE = 0x1000, + TYPEFLAG_FREVERSEBIND = 0x2000, + TYPEFLAG_FPROXY = 0x4000, +}} +FLAGS!{enum FUNCFLAGS { + FUNCFLAG_FRESTRICTED = 0x1, + FUNCFLAG_FSOURCE = 0x2, + FUNCFLAG_FBINDABLE = 0x4, + FUNCFLAG_FREQUESTEDIT = 0x8, + FUNCFLAG_FDISPLAYBIND = 0x10, + FUNCFLAG_FDEFAULTBIND = 0x20, + FUNCFLAG_FHIDDEN = 0x40, + FUNCFLAG_FUSESGETLASTERROR = 0x80, + FUNCFLAG_FDEFAULTCOLLELEM = 0x100, + FUNCFLAG_FUIDEFAULT = 0x200, + FUNCFLAG_FNONBROWSABLE = 0x400, + FUNCFLAG_FREPLACEABLE = 0x800, + FUNCFLAG_FIMMEDIATEBIND = 0x1000, +}} +FLAGS!{enum VARFLAGS { + VARFLAG_FREADONLY = 0x1, + VARFLAG_FSOURCE = 0x2, + VARFLAG_FBINDABLE = 0x4, + VARFLAG_FREQUESTEDIT = 0x8, + VARFLAG_FDISPLAYBIND = 0x10, + VARFLAG_FDEFAULTBIND = 0x20, + VARFLAG_FHIDDEN = 0x40, + VARFLAG_FRESTRICTED = 0x80, + VARFLAG_FDEFAULTCOLLELEM = 0x100, + VARFLAG_FUIDEFAULT = 0x200, + VARFLAG_FNONBROWSABLE = 0x400, + VARFLAG_FREPLACEABLE = 0x800, + VARFLAG_FIMMEDIATEBIND = 0x1000, +}} +STRUCT!{struct CLEANLOCALSTORAGE { + pInterface: *mut ::IUnknown, + pStorage: ::PVOID, + flags: ::DWORD, +}} +STRUCT!{struct CUSTDATAITEM { + guid: ::GUID, + varValue: VARIANTARG, +}} +pub type LPCUSTDATAITEM = *mut CUSTDATAITEM; +STRUCT!{struct CUSTDATA { + cCustData: ::DWORD, + prgCustData: LPCUSTDATAITEM, +}} +pub type LPCUSTDATA = *mut CUSTDATA; +pub type LPCREATETYPEINFO = *mut ICreateTypeInfo; +RIDL!( +interface ICreateTypeInfo(ICreateTypeInfoVtbl): IUnknown(IUnknownVtbl) { + fn SetGuid(&mut self, guid: ::REFGUID) -> ::HRESULT, + fn SetTypeFlags(&mut self, uTypeFlags: ::UINT) -> ::HRESULT, + fn SetDocString(&mut self, pStrDoc: ::LPOLESTR) -> ::HRESULT, + fn SetHelpContext(&mut self, dwHelpContext: ::DWORD) -> ::HRESULT, + fn SetVersion(&mut self, wMajorVerNum: ::WORD, wMinorVerNum: ::WORD) -> ::HRESULT, + fn AddRefTypeInfo(&mut self, pTInfo: *mut ITypeInfo) -> ::HRESULT, + fn AddFuncDesc(&mut self, index: ::UINT, pFuncDesc: *mut FUNCDESC) -> ::HRESULT, + fn SetImplTypeFlags(&mut self, index: ::UINT, implTypeFlags: ::INT) -> ::HRESULT, + fn SetAlignment(&mut self, cbAlignment: ::WORD) -> ::HRESULT, + fn SetSchema(&mut self, pStrSchema: ::LPOLESTR) -> ::HRESULT, + fn AddVarDesc(&mut self, index: ::UINT, pVarDesc: *mut VARDESC) -> ::HRESULT, + fn SetFuncAndParamNames( + &mut self, index: ::UINT, rgszNames: *mut ::LPOLESTR, cNames: ::UINT + ) -> ::HRESULT, + fn SetVarName(&mut self, index: ::UINT, szName: ::LPOLESTR) -> ::HRESULT, + fn SetTypeDescAlias(&mut self, pTDescAlias: *mut TYPEDESC) -> ::HRESULT, + fn DefineFuncAsDllEntry( + &mut self, index: ::UINT, szDllName: ::LPOLESTR, szProcName: ::LPOLESTR + ) -> ::HRESULT, + fn SetFuncDocString(&mut self, index: ::UINT, szDocString: ::LPOLESTR) -> ::HRESULT, + fn SetVarDocString(&mut self, index: ::UINT, szDocString: ::LPOLESTR) -> ::HRESULT, + fn SetFuncHelpContext(&mut self, index: ::UINT, dwHelpContext: ::DWORD) -> ::HRESULT, + fn SetVarHelpContext(&mut self, index: ::UINT, dwHelpContext: ::DWORD) -> ::HRESULT, + fn SetMops(&mut self, index: ::UINT, bstrMops: ::BSTR) -> ::HRESULT, + fn SetTypeIdldesc(&mut self, pIdlDesc: *mut IDLDESC) -> ::HRESULT, + fn LayOut(&mut self) -> ::HRESULT +} +); +// FIXME: Implement these interfaces +#[repr(C)] #[derive(Clone, Copy, Debug)] +pub struct ICreateTypeInfo2; +#[repr(C)] #[derive(Clone, Copy, Debug)] +pub struct ICreateTypeLib; +#[repr(C)] #[derive(Clone, Copy, Debug)] +pub struct ICreateTypeLib2; +pub type LPDISPATCH = *mut IDispatch; +pub const DISPID_UNKNOWN: ::INT = -1; +pub const DISPID_VALUE: ::INT = 0; +pub const DISPID_PROPERTYPUT: ::INT = -3; +pub const DISPID_NEWENUM: ::INT = -4; +pub const DISPID_EVALUATE: ::INT = -5; +pub const DISPID_CONSTRUCTOR: ::INT = -6; +pub const DISPID_DESTRUCTOR: ::INT = -7; +pub const DISPID_COLLECT: ::INT = -8; +RIDL!( +interface IDispatch(IDispatchVtbl): IUnknown(IUnknownVtbl) { + fn GetTypeInfoCount(&mut self, pctinfo: *mut ::UINT) -> ::HRESULT, + fn GetTypeInfo( + &mut self, iTInfo: ::UINT, lcid: ::LCID, ppTInfo: *mut *mut ITypeInfo + ) -> ::HRESULT, + fn GetIDsOfNames( + &mut self, riid: ::REFIID, rgszNames: *mut ::LPOLESTR, cNames: ::UINT, lcid: ::LCID, + rgDispId: *mut ::DISPID + ) -> ::HRESULT, + fn Invoke( + &mut self, dispIdMember: ::DISPID, riid: ::REFIID, lcid: ::LCID, wFlags: ::WORD, + pDispParams: *mut ::DISPPARAMS, pVarResult: *mut VARIANT, pExcepInfo: *mut ::EXCEPINFO, + puArgErr: *mut ::UINT + ) -> ::HRESULT +} +); +// FIXME: Implement these interfaces +#[repr(C)] #[derive(Clone, Copy, Debug)] +pub struct IEnumVARIANT; +#[repr(C)] #[derive(Clone, Copy, Debug)] +pub struct ITypeComp; +RIDL!( +interface ITypeInfo(ITypeInfoVtbl): IUnknown(IUnknownVtbl) { + fn GetTypeAttr(&mut self, ppTypeAttr: *mut *mut TYPEATTR) -> ::HRESULT, + fn GetTypeComp(&mut self, ppTComp: *mut *mut ITypeComp) -> ::HRESULT, + fn GetFuncDesc(&mut self, index: ::UINT, ppFunDesc: *mut *mut FUNCDESC) -> ::HRESULT, + fn GetVarDesc(&mut self, index: ::UINT, pPVarDesc: *mut *mut VARDESC) -> ::HRESULT, + fn GetNames( + &mut self, memid: MEMBERID, rgBstrNames: *mut ::BSTR, cMaxNames: ::UINT, + pcNames: *mut ::UINT + ) -> ::HRESULT, + fn GetRefTypeOfImplType(&mut self, index: ::UINT, pRefType: *mut HREFTYPE) -> ::HRESULT, + fn GetImplTypeFlags(&mut self, index: ::UINT, pImplTypeFlags: *mut ::INT) -> ::HRESULT, + fn GetIDsOfNames( + &mut self, rgszNames: *mut ::LPOLESTR, cNames: ::UINT, pMemId: *mut MEMBERID + ) -> ::HRESULT, + fn Invoke( + &mut self, pvInstance: ::PVOID, memid: MEMBERID, wFlags: ::WORD, + pDispParams: *mut DISPPARAMS, pVarResult: *mut VARIANT, pExcepInfo: *mut EXCEPINFO, + puArgErr: *mut ::UINT + ) -> ::HRESULT, + fn GetDocumentation( + &mut self, memid: MEMBERID, pBstrName: *mut ::BSTR, pBstrDocString: *mut ::BSTR, + pdwHelpContext: *mut ::DWORD, pBstrHelpFile: *mut ::BSTR + ) -> ::HRESULT, + fn GetDllEntry( + &mut self, memid: MEMBERID, invKind: ::INVOKEKIND, pBstrDllName: *mut ::BSTR, + pBstrName: *mut ::BSTR, pwOrdinal: *mut ::WORD + ) -> ::HRESULT, + fn GetRefTypeInfo(&mut self, hRefType: HREFTYPE, ppTInfo: *mut *mut ITypeInfo) -> ::HRESULT, + fn AddressOfMember( + &mut self, memid: MEMBERID, invKind: ::INVOKEKIND, ppv: *mut ::PVOID + ) -> ::HRESULT, + fn CreateInstance( + &mut self, pUnkOuter: *mut ::IUnknown, riid: ::REFIID, ppvObj: *mut ::PVOID + ) -> ::HRESULT, + fn GetMops(&mut self, memid: MEMBERID, pBstrMops: *mut ::BSTR) -> ::HRESULT, + fn GetContainingTypeLib( + &mut self, ppTLib: *mut *mut ITypeLib, pIndex: *mut ::UINT + ) -> ::HRESULT, + fn ReleaseTypeAttr(&mut self, pTypeAttr: *mut TYPEATTR) -> (), + fn ReleaseFuncDesc(&mut self, pFuncDesc: *mut FUNCDESC) -> (), + fn ReleaseVarDesc(&mut self, pVarDesc: *mut VARDESC) -> () +} +); +// FIXME: Implement these interfaces +#[repr(C)] #[derive(Clone, Copy, Debug)] +pub struct ITypeInfo2; +#[repr(C)] #[derive(Clone, Copy, Debug)] +pub struct ITypeLib; +#[repr(C)] #[derive(Clone, Copy, Debug)] +pub struct ITypeLib2; +#[repr(C)] #[derive(Clone, Copy, Debug)] +pub struct ITypeChangeEvents; +#[repr(C)] #[derive(Clone, Copy, Debug)] +pub struct IErrorInfo; +#[repr(C)] #[derive(Clone, Copy, Debug)] +pub struct ICreateErrorInfo; +#[repr(C)] #[derive(Clone, Copy, Debug)] +pub struct ISupportErrorInfo; +#[repr(C)] #[derive(Clone, Copy, Debug)] +pub struct ITypeFactory; +#[repr(C)] #[derive(Clone, Copy, Debug)] +pub struct ITypeMarshal; +#[repr(C)] #[derive(Clone, Copy, Debug)] +pub struct IRecordInfo; +#[repr(C)] #[derive(Clone, Copy, Debug)] +pub struct IErrorLog; +#[repr(C)] #[derive(Clone, Copy, Debug)] +pub struct IPropertyBag; diff --git a/deps/winapi-0.2.5/src/objbase.rs b/deps/winapi-0.2.6/src/objbase.rs similarity index 100% rename from deps/winapi-0.2.5/src/objbase.rs rename to deps/winapi-0.2.6/src/objbase.rs diff --git a/deps/winapi-0.2.5/src/objidl.rs b/deps/winapi-0.2.6/src/objidl.rs similarity index 100% rename from deps/winapi-0.2.5/src/objidl.rs rename to deps/winapi-0.2.6/src/objidl.rs diff --git a/deps/winapi-0.2.5/src/objidlbase.rs b/deps/winapi-0.2.6/src/objidlbase.rs similarity index 100% rename from deps/winapi-0.2.5/src/objidlbase.rs rename to deps/winapi-0.2.6/src/objidlbase.rs diff --git a/deps/winapi-0.2.5/src/olectl.rs b/deps/winapi-0.2.6/src/olectl.rs similarity index 100% rename from deps/winapi-0.2.5/src/olectl.rs rename to deps/winapi-0.2.6/src/olectl.rs diff --git a/deps/winapi-0.2.6/src/processsnapshot.rs b/deps/winapi-0.2.6/src/processsnapshot.rs new file mode 100644 index 000000000..73ea679be --- /dev/null +++ b/deps/winapi-0.2.6/src/processsnapshot.rs @@ -0,0 +1,58 @@ +// Copyright © 2015, skdltmxn +// Licensed under the MIT License <LICENSE.md> +//! Defines the process snapshot API +FLAGS!{enum PSS_CAPTURE_FLAGS { + PSS_CAPTURE_NONE = 0x00000000, + PSS_CAPTURE_VA_CLONE = 0x00000001, + PSS_CAPTURE_RESERVED_00000002 = 0x00000002, + PSS_CAPTURE_HANDLES = 0x00000004, + PSS_CAPTURE_HANDLE_NAME_INFORMATION = 0x00000008, + PSS_CAPTURE_HANDLE_BASIC_INFORMATION = 0x00000010, + PSS_CAPTURE_HANDLE_TYPE_SPECIFIC_INFORMATION = 0x00000020, + PSS_CAPTURE_HANDLE_TRACE = 0x00000040, + PSS_CAPTURE_THREADS = 0x00000080, + PSS_CAPTURE_THREAD_CONTEXT = 0x00000100, + PSS_CAPTURE_THREAD_CONTEXT_EXTENDED = 0x00000200, + PSS_CAPTURE_RESERVED_00000400 = 0x00000400, + PSS_CAPTURE_VA_SPACE = 0x00000800, + PSS_CAPTURE_VA_SPACE_SECTION_INFORMATION = 0x00001000, + PSS_CREATE_BREAKAWAY_OPTIONAL = 0x04000000, + PSS_CREATE_BREAKAWAY = 0x08000000, + PSS_CREATE_FORCE_BREAKAWAY = 0x10000000, + PSS_CREATE_USE_VM_ALLOCATIONS = 0x20000000, + PSS_CREATE_MEASURE_PERFORMANCE = 0x40000000, + PSS_CREATE_RELEASE_SECTION = -2147483648i32 as u32, +}} +ENUM!{enum PSS_QUERY_INFORMATION_CLASS { + PSS_QUERY_PROCESS_INFORMATION = 0, + PSS_QUERY_VA_CLONE_INFORMATION = 1, + PSS_QUERY_AUXILIARY_PAGES_INFORMATION = 2, + PSS_QUERY_VA_SPACE_INFORMATION = 3, + PSS_QUERY_HANDLE_INFORMATION = 4, + PSS_QUERY_THREAD_INFORMATION = 5, + PSS_QUERY_HANDLE_TRACE_INFORMATION = 6, + PSS_QUERY_PERFORMANCE_COUNTERS = 7, +}} +ENUM!{enum PSS_WALK_INFORMATION_CLASS { + PSS_WALK_AUXILIARY_PAGES = 0, + PSS_WALK_VA_SPACE = 1, + PSS_WALK_HANDLES = 2, + PSS_WALK_THREADS = 3, +}} +FLAGS!{enum PSS_DUPLICATE_FLAGS { + PSS_DUPLICATE_NONE = 0x00, + PSS_DUPLICATE_CLOSE_SOURCE = 0x01, +}} +DECLARE_HANDLE!(HPSS, HPSS__); +DECLARE_HANDLE!(HPSSWALK, HPSSWALK__); +pub type pAllocRoutine = Option<unsafe extern "system" fn( + Context: *mut ::c_void, Size: ::DWORD, +) -> *mut ::c_void>; +pub type pFreeRoutine = Option<unsafe extern "system" fn( + Context: *mut ::c_void, Address: *mut ::c_void, +)>; +STRUCT!{nodebug struct PSS_ALLOCATOR { + Context: *mut ::c_void, + AllocRoutine: pAllocRoutine, + FreeRoutine: pFreeRoutine, +}} diff --git a/deps/winapi-0.2.5/src/processthreadsapi.rs b/deps/winapi-0.2.6/src/processthreadsapi.rs similarity index 100% rename from deps/winapi-0.2.5/src/processthreadsapi.rs rename to deps/winapi-0.2.6/src/processthreadsapi.rs diff --git a/deps/winapi-0.2.5/src/propsys.rs b/deps/winapi-0.2.6/src/propsys.rs similarity index 100% rename from deps/winapi-0.2.5/src/propsys.rs rename to deps/winapi-0.2.6/src/propsys.rs diff --git a/deps/winapi-0.2.6/src/prsht.rs b/deps/winapi-0.2.6/src/prsht.rs new file mode 100644 index 000000000..fc4e3e477 --- /dev/null +++ b/deps/winapi-0.2.6/src/prsht.rs @@ -0,0 +1,262 @@ +// Copyright © 2015, skdltmxn +// Licensed under the MIT License <LICENSE.md> +//! Interface for the Windows Property Sheet Pages +pub enum PSP {} +pub type HPROPSHEETPAGE = *mut PSP; +pub type LPFNPSPCALLBACKA = Option<unsafe extern "system" fn( + hwnd: ::HWND, uMsg: ::UINT, ppsp: *mut PROPSHEETPAGEA, +) -> ::UINT>; +pub type LPFNPSPCALLBACKW = Option<unsafe extern "system" fn( + hwnd: ::HWND, uMsg: ::UINT, ppsp: *mut PROPSHEETPAGEW, +) -> ::UINT>; +pub const PSP_DEFAULT: ::DWORD = 0x00000000; +pub const PSP_DLGINDIRECT: ::DWORD = 0x00000001; +pub const PSP_USEHICON: ::DWORD = 0x00000002; +pub const PSP_USEICONID: ::DWORD = 0x00000004; +pub const PSP_USETITLE: ::DWORD = 0x00000008; +pub const PSP_RTLREADING: ::DWORD = 0x00000010; +pub const PSP_HASHELP: ::DWORD = 0x00000020; +pub const PSP_USEREFPARENT: ::DWORD = 0x00000040; +pub const PSP_USECALLBACK: ::DWORD = 0x00000080; +pub const PSP_PREMATURE: ::DWORD = 0x00000400; +pub const PSP_HIDEHEADER: ::DWORD = 0x00000800; +pub const PSP_USEHEADERTITLE: ::DWORD = 0x00001000; +pub const PSP_USEHEADERSUBTITLE: ::DWORD = 0x00002000; +pub const PSP_USEFUSIONCONTEXT: ::DWORD = 0x00004000; +pub const PSPCB_ADDREF: ::UINT = 0; +pub const PSPCB_RELEASE: ::UINT = 1; +pub const PSPCB_CREATE: ::UINT = 2; +pub type PROPSHEETPAGE_RESOURCE = ::LPCDLGTEMPLATEA; +STRUCT!{nodebug struct PROPSHEETPAGEA_V4 { + dwSize: ::DWORD, + dwFlags: ::DWORD, + hInstance: ::HINSTANCE, + pszTemplate: ::LPCSTR, + hIcon: ::HICON, + pszTitle: ::LPCSTR, + pfnDlgProc: ::DLGPROC, + lParam: ::LPARAM, + pfnCallback: LPFNPSPCALLBACKA, + pcRefParent: *mut ::UINT, + pszHeaderTitle: ::LPCSTR, + pszHeaderSubTitle: ::LPCSTR, + hActCtx: ::HANDLE, + hbmHeader: ::HBITMAP, +}} +UNION!(PROPSHEETPAGEA_V4, pszTemplate, pResource, pResource_mut, PROPSHEETPAGE_RESOURCE); +UNION!(PROPSHEETPAGEA_V4, hIcon, pszIcon, pszIcon_mut, ::LPCSTR); +UNION!(PROPSHEETPAGEA_V4, hbmHeader, pszbmHeader, pszbmHeader_mut, ::LPCSTR); +pub type LPPROPSHEETPAGEA_V4 = *mut PROPSHEETPAGEA_V4; +pub type LPCPROPSHEETPAGEA_V4 = *const PROPSHEETPAGEA_V4; +STRUCT!{nodebug struct PROPSHEETPAGEW_V4 { + dwSize: ::DWORD, + dwFlags: ::DWORD, + hInstance: ::HINSTANCE, + pszTemplate: ::LPCWSTR, + hIcon: ::HICON, + pszTitle: ::LPCWSTR, + pfnDlgProc: ::DLGPROC, + lParam: ::LPARAM, + pfnCallback: LPFNPSPCALLBACKW, + pcRefParent: *mut ::UINT, + pszHeaderTitle: ::LPCWSTR, + pszHeaderSubTitle: ::LPCWSTR, + hActCtx: ::HANDLE, + hbmHeader: ::HBITMAP, +}} +UNION!(PROPSHEETPAGEW_V4, pszTemplate, pResource, pResource_mut, PROPSHEETPAGE_RESOURCE); +UNION!(PROPSHEETPAGEW_V4, hIcon, pszIcon, pszIcon_mut, ::LPCWSTR); +UNION!(PROPSHEETPAGEW_V4, hbmHeader, pszbmHeader, pszbmHeader_mut, ::LPCWSTR); +pub type LPPROPSHEETPAGEW_V4 = *mut PROPSHEETPAGEW_V4; +pub type LPCPROPSHEETPAGEW_V4 = *const PROPSHEETPAGEW_V4; +pub type PROPSHEETPAGEA_LATEST = PROPSHEETPAGEA_V4; +pub type PROPSHEETPAGEW_LATEST = PROPSHEETPAGEW_V4; +pub type LPPROPSHEETPAGEA_LATEST = LPPROPSHEETPAGEA_V4; +pub type LPPROPSHEETPAGEW_LATEST = LPPROPSHEETPAGEW_V4; +pub type LPCPROPSHEETPAGEA_LATEST = LPCPROPSHEETPAGEA_V4; +pub type LPCPROPSHEETPAGEW_LATEST = LPCPROPSHEETPAGEW_V4; +pub type PROPSHEETPAGEA = PROPSHEETPAGEA_V4; +pub type PROPSHEETPAGEW = PROPSHEETPAGEW_V4; +pub type LPPROPSHEETPAGEA = LPPROPSHEETPAGEA_V4; +pub type LPPROPSHEETPAGEW = LPPROPSHEETPAGEW_V4; +pub type LPCPROPSHEETPAGEA = LPCPROPSHEETPAGEA_V4; +pub type LPCPROPSHEETPAGEW = LPCPROPSHEETPAGEW_V4; +pub const PSH_DEFAULT: ::DWORD = 0x00000000; +pub const PSH_PROPTITLE: ::DWORD = 0x00000001; +pub const PSH_USEHICON: ::DWORD = 0x00000002; +pub const PSH_USEICONID: ::DWORD = 0x00000004; +pub const PSH_PROPSHEETPAGE: ::DWORD = 0x00000008; +pub const PSH_WIZARDHASFINISH: ::DWORD = 0x00000010; +pub const PSH_WIZARD: ::DWORD = 0x00000020; +pub const PSH_USEPSTARTPAGE: ::DWORD = 0x00000040; +pub const PSH_NOAPPLYNOW: ::DWORD = 0x00000080; +pub const PSH_USECALLBACK: ::DWORD = 0x00000100; +pub const PSH_HASHELP: ::DWORD = 0x00000200; +pub const PSH_MODELESS: ::DWORD = 0x00000400; +pub const PSH_RTLREADING: ::DWORD = 0x00000800; +pub const PSH_WIZARDCONTEXTHELP: ::DWORD = 0x00001000; +pub const PSH_WIZARD97: ::DWORD = 0x01000000; +pub const PSH_WATERMARK: ::DWORD = 0x00008000; +pub const PSH_USEHBMWATERMARK: ::DWORD = 0x00010000; +pub const PSH_USEHPLWATERMARK: ::DWORD = 0x00020000; +pub const PSH_STRETCHWATERMARK: ::DWORD = 0x00040000; +pub const PSH_HEADER: ::DWORD = 0x00080000; +pub const PSH_USEHBMHEADER: ::DWORD = 0x00100000; +pub const PSH_USEPAGELANG: ::DWORD = 0x00200000; +pub const PSH_WIZARD_LITE: ::DWORD = 0x00400000; +pub const PSH_NOCONTEXTHELP: ::DWORD = 0x02000000; +pub const PSH_AEROWIZARD: ::DWORD = 0x00004000; +pub const PSH_RESIZABLE: ::DWORD = 0x04000000; +pub const PSH_HEADERBITMAP: ::DWORD = 0x08000000; +pub const PSH_NOMARGIN: ::DWORD = 0x10000000; +pub type PFNPROPSHEETCALLBACK = Option<unsafe extern "system" fn( + ::HWND, ::UINT, ::LPARAM, +) -> ::c_int>; +STRUCT!{nodebug struct PROPSHEETHEADERA_V2 { + dwSize: ::DWORD, + dwFlags: ::DWORD, + hwndParent: ::HWND, + hInstance: ::HINSTANCE, + hIcon: ::HICON, + pszCaption: ::LPCSTR, + nPages: ::UINT, + pStartPage: ::LPCSTR, + ppsp: LPCPROPSHEETPAGEA, + pfnCallback: PFNPROPSHEETCALLBACK, + hbmWatermark: ::HBITMAP, + hplWatermark: ::HPALETTE, + hbmHeader: ::HBITMAP, +}} +UNION!(PROPSHEETHEADERA_V2, hIcon, pszIcon, pszIcon_mut, ::LPCSTR); +UNION!(PROPSHEETHEADERA_V2, pStartPage, nStartPage, nStartPage_mut, ::UINT); +UNION!(PROPSHEETHEADERA_V2, ppsp, phpage, phpage_mut, *mut HPROPSHEETPAGE); +UNION!(PROPSHEETHEADERA_V2, hbmWatermark, pszbmWatermark, pszbmWatermark_mut, ::LPCSTR); +UNION!(PROPSHEETHEADERA_V2, hbmHeader, pszbmHeader, pszbmHeader_mut, ::LPCSTR); +pub type LPPROPSHEETHEADERA_V2 = *mut PROPSHEETHEADERA_V2; +pub type LPCPROPSHEETHEADERA_V2 = *const PROPSHEETHEADERA_V2; +STRUCT!{nodebug struct PROPSHEETHEADERW_V2 { + dwSize: ::DWORD, + dwFlags: ::DWORD, + hwndParent: ::HWND, + hInstance: ::HINSTANCE, + hIcon: ::HICON, + pszCaption: ::LPCWSTR, + nPages: ::UINT, + pStartPage: ::LPCWSTR, + ppsp: LPCPROPSHEETPAGEW, + pfnCallback: PFNPROPSHEETCALLBACK, + hbmWatermark: ::HBITMAP, + hplWatermark: ::HPALETTE, + hbmHeader: ::HBITMAP, +}} +UNION!(PROPSHEETHEADERW_V2, hIcon, pszIcon, pszIcon_mut, ::LPCWSTR); +UNION!(PROPSHEETHEADERW_V2, pStartPage, nStartPage, nStartPage_mut, ::UINT); +UNION!(PROPSHEETHEADERW_V2, ppsp, phpage, phpage_mut, *mut HPROPSHEETPAGE); +UNION!(PROPSHEETHEADERW_V2, hbmWatermark, pszbmWatermark, pszbmWatermark_mut, ::LPCWSTR); +UNION!(PROPSHEETHEADERW_V2, hbmHeader, pszbmHeader, pszbmHeader_mut, ::LPCWSTR); +pub type LPPROPSHEETHEADERW_V2 = *mut PROPSHEETHEADERW_V2; +pub type LPCPROPSHEETHEADERW_V2 = *const PROPSHEETHEADERW_V2; +pub type PROPSHEETHEADERA = PROPSHEETHEADERA_V2; +pub type PROPSHEETHEADERW = PROPSHEETHEADERW_V2; +pub type LPPROPSHEETHEADERA = LPPROPSHEETHEADERA_V2; +pub type LPPROPSHEETHEADERW = LPPROPSHEETHEADERW_V2; +pub type LPCPROPSHEETHEADERA = LPCPROPSHEETHEADERA_V2; +pub type LPCPROPSHEETHEADERW = LPCPROPSHEETHEADERW_V2; +pub const PSCB_INITIALIZED: ::UINT = 1; +pub const PSCB_PRECREATE: ::UINT = 2; +pub const PSCB_BUTTONPRESSED: ::UINT = 3; +pub type LPFNADDPROPSHEETPAGE = Option<unsafe extern "system" fn( + HPROPSHEETPAGE, ::LPARAM, +) -> ::BOOL>; +pub type LPFNADDPROPSHEETPAGES = Option<unsafe extern "system" fn( + ::LPVOID, LPFNADDPROPSHEETPAGE, ::LPARAM, +) -> ::BOOL>; +STRUCT!{struct PSHNOTIFY { + hdr: ::NMHDR, + lParam: ::LPARAM, +}} +pub type LPPSHNOTIFY = *mut PSHNOTIFY; +pub const PSN_FIRST: ::UINT = (0 - 200); +pub const PSN_LAST: ::UINT = (0 - 299); +pub const PSN_SETACTIVE: ::UINT = PSN_FIRST - 0; +pub const PSN_KILLACTIVE: ::UINT = PSN_FIRST - 1; +pub const PSN_APPLY: ::UINT = PSN_FIRST - 2; +pub const PSN_RESET: ::UINT = PSN_FIRST - 3; +pub const PSN_HELP: ::UINT = PSN_FIRST - 5; +pub const PSN_WIZBACK: ::UINT = PSN_FIRST - 6; +pub const PSN_WIZNEXT: ::UINT = PSN_FIRST - 7; +pub const PSN_WIZFINISH: ::UINT = PSN_FIRST - 8; +pub const PSN_QUERYCANCEL: ::UINT = PSN_FIRST - 9; +pub const PSN_GETOBJECT: ::UINT = PSN_FIRST - 10; +pub const PSN_TRANSLATEACCELERATOR: ::UINT = PSN_FIRST - 12; +pub const PSN_QUERYINITIALFOCUS: ::UINT = PSN_FIRST - 13; +pub const PSNRET_NOERROR: ::LRESULT = 0; +pub const PSNRET_INVALID: ::LRESULT = 1; +pub const PSNRET_INVALID_NOCHANGEPAGE: ::LRESULT = 2; +pub const PSNRET_MESSAGEHANDLED: ::LRESULT = 3; +pub const PSM_SETCURSEL: ::UINT = ::WM_USER + 101; +pub const PSM_REMOVEPAGE: ::UINT = ::WM_USER + 102; +pub const PSM_ADDPAGE: ::UINT = ::WM_USER + 103; +pub const PSM_CHANGED: ::UINT = ::WM_USER + 104; +pub const PSM_RESTARTWINDOWS: ::UINT = ::WM_USER + 105; +pub const PSM_REBOOTSYSTEM: ::UINT = ::WM_USER + 106; +pub const PSM_CANCELTOCLOSE: ::UINT = ::WM_USER + 107; +pub const PSM_QUERYSIBLINGS: ::UINT = ::WM_USER + 108; +pub const PSM_UNCHANGED: ::UINT = ::WM_USER + 109; +pub const PSM_APPLY: ::UINT = ::WM_USER + 110; +pub const PSM_SETTITLEA: ::UINT = ::WM_USER + 111; +pub const PSM_SETTITLEW: ::UINT = ::WM_USER + 120; +pub const PSM_SETWIZBUTTONS: ::UINT = ::WM_USER + 112; +pub const PSWIZB_BACK: ::DWORD = 0x00000001; +pub const PSWIZB_NEXT: ::DWORD = 0x00000002; +pub const PSWIZB_FINISH: ::DWORD = 0x00000004; +pub const PSWIZB_DISABLEDFINISH: ::DWORD = 0x00000008; +pub const PSWIZB_CANCEL: ::DWORD = 0x00000008; +pub const PSWIZBF_ELEVATIONREQUIRED: ::WPARAM = 0x00000001; +pub const PSBTN_BACK: ::c_int = 0; +pub const PSBTN_NEXT: ::c_int = 1; +pub const PSBTN_FINISH: ::c_int = 2; +pub const PSBTN_OK: ::c_int = 3; +pub const PSBTN_APPLYNOW: ::c_int = 4; +pub const PSBTN_CANCEL: ::c_int = 5; +pub const PSBTN_HELP: ::c_int = 6; +pub const PSBTN_MAX: ::c_int = 6; +pub const PSM_PRESSBUTTON: ::UINT = ::WM_USER + 113; +pub const PSM_SETCURSELID: ::UINT = ::WM_USER + 114; +pub const PSM_SETFINISHTEXTA: ::UINT = ::WM_USER + 115; +pub const PSM_SETFINISHTEXTW: ::UINT = ::WM_USER + 121; +pub const PSM_GETTABCONTROL: ::UINT = ::WM_USER + 116; +pub const PSM_ISDIALOGMESSAGE: ::UINT = ::WM_USER + 117; +pub const PSM_GETCURRENTPAGEHWND: ::UINT = ::WM_USER + 118; +pub const PSM_INSERTPAGE: ::UINT = ::WM_USER + 119; +pub const PSM_SETHEADERTITLEA: ::UINT = ::WM_USER + 125; +pub const PSM_SETHEADERTITLEW: ::UINT = ::WM_USER + 126; +pub const PSWIZF_SETCOLOR: ::UINT = (0 - 1) as ::UINT; +pub const PSM_SETHEADERSUBTITLEA: ::UINT = ::WM_USER + 127; +pub const PSM_SETHEADERSUBTITLEW: ::UINT = ::WM_USER + 128; +pub const PSM_HWNDTOINDEX: ::UINT = ::WM_USER + 129; +pub const PSM_INDEXTOHWND: ::UINT = ::WM_USER + 130; +pub const PSM_PAGETOINDEX: ::UINT = ::WM_USER + 131; +pub const PSM_INDEXTOPAGE: ::UINT = ::WM_USER + 132; +pub const PSM_IDTOINDEX: ::UINT = ::WM_USER + 133; +pub const PSM_INDEXTOID: ::UINT = ::WM_USER + 134; +pub const PSM_GETRESULT: ::UINT = ::WM_USER + 135; +pub const PSM_RECALCPAGESIZES: ::UINT = ::WM_USER + 136; +pub const PSM_SETNEXTTEXTW: ::UINT = ::WM_USER + 137; +pub const PSM_SHOWWIZBUTTONS: ::UINT = ::WM_USER + 138; +pub const PSM_ENABLEWIZBUTTONS: ::UINT = ::WM_USER + 139; +pub const PSM_SETBUTTONTEXTW: ::UINT = ::WM_USER + 140; +pub const PSM_SETBUTTONTEXT: ::UINT = PSM_SETBUTTONTEXTW; +pub const ID_PSRESTARTWINDOWS: ::INT_PTR = 0x2; +pub const ID_PSREBOOTSYSTEM: ::INT_PTR = ID_PSRESTARTWINDOWS | 0x1; +pub const WIZ_CXDLG: ::DWORD = 276; +pub const WIZ_CYDLG: ::DWORD = 140; +pub const WIZ_CXBMP: ::DWORD = 80; +pub const WIZ_BODYX: ::DWORD = 92; +pub const WIZ_BODYCX: ::DWORD = 184; +pub const PROP_SM_CXDLG: ::c_short = 212; +pub const PROP_SM_CYDLG: ::c_short = 188; +pub const PROP_MED_CXDLG: ::c_short = 227; +pub const PROP_MED_CYDLG: ::c_short = 215; +pub const PROP_LG_CXDLG: ::c_short = 252; +pub const PROP_LG_CYDLG: ::c_short = 218; diff --git a/deps/winapi-0.2.5/src/psapi.rs b/deps/winapi-0.2.6/src/psapi.rs similarity index 100% rename from deps/winapi-0.2.5/src/psapi.rs rename to deps/winapi-0.2.6/src/psapi.rs diff --git a/deps/winapi-0.2.5/src/qos.rs b/deps/winapi-0.2.6/src/qos.rs similarity index 100% rename from deps/winapi-0.2.5/src/qos.rs rename to deps/winapi-0.2.6/src/qos.rs diff --git a/deps/winapi-0.2.5/src/reason.rs b/deps/winapi-0.2.6/src/reason.rs similarity index 100% rename from deps/winapi-0.2.5/src/reason.rs rename to deps/winapi-0.2.6/src/reason.rs diff --git a/deps/winapi-0.2.5/src/rpc.rs b/deps/winapi-0.2.6/src/rpc.rs similarity index 100% rename from deps/winapi-0.2.5/src/rpc.rs rename to deps/winapi-0.2.6/src/rpc.rs diff --git a/deps/winapi-0.2.5/src/rpcdce.rs b/deps/winapi-0.2.6/src/rpcdce.rs similarity index 100% rename from deps/winapi-0.2.5/src/rpcdce.rs rename to deps/winapi-0.2.6/src/rpcdce.rs diff --git a/deps/winapi-0.2.6/src/sapi.rs b/deps/winapi-0.2.6/src/sapi.rs new file mode 100644 index 000000000..ac6ca11e7 --- /dev/null +++ b/deps/winapi-0.2.6/src/sapi.rs @@ -0,0 +1,2431 @@ +// Copyright © 2015, Connor Hilarides +// Licensed under the MIT License <LICENSE.md> +//! Mappings for the contents of sapi.h +ENUM!{enum SPDATAKEYLOCATION { + SPDKL_DefaultLocation = 0, + SPDKL_CurrentUser = 1, + SPDKL_LocalMachine = 2, + SPDKL_CurrentConfig = 5, +}} +pub const SPDUI_EngineProperties: &'static str = "EngineProperties"; +pub const SPDUI_AddRemoveWord: &'static str = "AddRemoveWord"; +pub const SPDUI_UserTraining: &'static str = "UserTraining"; +pub const SPDUI_MicTraining: &'static str = "MicTraining"; +pub const SPDUI_RecoProfileProperties: &'static str = "RecoProfileProperties"; +pub const SPDUI_AudioProperties: &'static str = "AudioProperties"; +pub const SPDUI_AudioVolume: &'static str = "AudioVolume"; +pub const SPDUI_UserEnrollment: &'static str = "UserEnrollment"; +pub const SPDUI_ShareData: &'static str = "ShareData"; +pub const SPDUI_Tutorial: &'static str = "Tutorial"; +ENUM!{enum SPSTREAMFORMAT { + SPSF_Default = -1i32 as u32, + SPSF_NoAssignedFormat = 0, + SPSF_Text = 1, + SPSF_NonStandardFormat = 2, + SPSF_ExtendedAudioFormat = 3, + SPSF_8kHz8BitMono = 4, + SPSF_8kHz8BitStereo = 5, + SPSF_8kHz16BitMono = 6, + SPSF_8kHz16BitStereo = 7, + SPSF_11kHz8BitMono = 8, + SPSF_11kHz8BitStereo = 9, + SPSF_11kHz16BitMono = 10, + SPSF_11kHz16BitStereo = 11, + SPSF_12kHz8BitMono = 12, + SPSF_12kHz8BitStereo = 13, + SPSF_12kHz16BitMono = 14, + SPSF_12kHz16BitStereo = 15, + SPSF_16kHz8BitMono = 16, + SPSF_16kHz8BitStereo = 17, + SPSF_16kHz16BitMono = 18, + SPSF_16kHz16BitStereo = 19, + SPSF_22kHz8BitMono = 20, + SPSF_22kHz8BitStereo = 21, + SPSF_22kHz16BitMono = 22, + SPSF_22kHz16BitStereo = 23, + SPSF_24kHz8BitMono = 24, + SPSF_24kHz8BitStereo = 25, + SPSF_24kHz16BitMono = 26, + SPSF_24kHz16BitStereo = 27, + SPSF_32kHz8BitMono = 28, + SPSF_32kHz8BitStereo = 29, + SPSF_32kHz16BitMono = 30, + SPSF_32kHz16BitStereo = 31, + SPSF_44kHz8BitMono = 32, + SPSF_44kHz8BitStereo = 33, + SPSF_44kHz16BitMono = 34, + SPSF_44kHz16BitStereo = 35, + SPSF_48kHz8BitMono = 36, + SPSF_48kHz8BitStereo = 37, + SPSF_48kHz16BitMono = 38, + SPSF_48kHz16BitStereo = 39, + SPSF_TrueSpeech_8kHz1BitMono = 40, + SPSF_CCITT_ALaw_8kHzMono = 41, + SPSF_CCITT_ALaw_8kHzStereo = 42, + SPSF_CCITT_ALaw_11kHzMono = 43, + SPSF_CCITT_ALaw_11kHzStereo = 44, + SPSF_CCITT_ALaw_22kHzMono = 45, + SPSF_CCITT_ALaw_22kHzStereo = 46, + SPSF_CCITT_ALaw_44kHzMono = 47, + SPSF_CCITT_ALaw_44kHzStereo = 48, + SPSF_CCITT_uLaw_8kHzMono = 49, + SPSF_CCITT_uLaw_8kHzStereo = 50, + SPSF_CCITT_uLaw_11kHzMono = 51, + SPSF_CCITT_uLaw_11kHzStereo = 52, + SPSF_CCITT_uLaw_22kHzMono = 53, + SPSF_CCITT_uLaw_22kHzStereo = 54, + SPSF_CCITT_uLaw_44kHzMono = 55, + SPSF_CCITT_uLaw_44kHzStereo = 56, + SPSF_ADPCM_8kHzMono = 57, + SPSF_ADPCM_8kHzStereo = 58, + SPSF_ADPCM_11kHzMono = 59, + SPSF_ADPCM_11kHzStereo = 60, + SPSF_ADPCM_22kHzMono = 61, + SPSF_ADPCM_22kHzStereo = 62, + SPSF_ADPCM_44kHzMono = 63, + SPSF_ADPCM_44kHzStereo = 64, + SPSF_GSM610_8kHzMono = 65, + SPSF_GSM610_11kHzMono = 66, + SPSF_GSM610_22kHzMono = 67, + SPSF_GSM610_44kHzMono = 68, + SPSF_NUM_FORMATS = 69, +}} +pub const SPREG_USER_ROOT: &'static str = "HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Speech"; +pub const SPREG_LOCAL_MACHINE_ROOT: &'static str = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Speech"; +pub const SPCAT_AUDIOOUT: &'static str = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Speech\\AudioOutput"; +pub const SPCAT_AUDIOIN: &'static str = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Speech\\AudioInput"; +pub const SPCAT_VOICES: &'static str = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Speech\\Voices"; +pub const SPCAT_RECOGNIZERS: &'static str = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Speech\\Recognizers"; +pub const SPCAT_APPLEXICONS: &'static str = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Speech\\AppLexicons"; +pub const SPCAT_PHONECONVERTERS: &'static str = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Speech\\PhoneConverters"; +pub const SPCAT_TEXTNORMALIZERS: &'static str = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Speech\\TextNormalizers"; +pub const SPCAT_RECOPROFILES: &'static str = "HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Speech\\RecoProfiles"; +pub const SPMMSYS_AUDIO_IN_TOKEN_ID: &'static str = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Speech\\AudioInput\\TokenEnums\\MMAudioIn\\"; +pub const SPMMSYS_AUDIO_OUT_TOKEN_ID: &'static str = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Speech\\AudioOutput\\TokenEnums\\MMAudioOut\\"; +pub const SPCURRENT_USER_LEXICON_TOKEN_ID: &'static str = "HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Speech\\CurrentUserLexicon"; +pub const SPCURRENT_USER_SHORTCUT_TOKEN_ID: &'static str = "HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Speech\\CurrentUserShortcut"; +pub const SPTOKENVALUE_CLSID: &'static str = "CLSID"; +pub const SPTOKENKEY_FILES: &'static str = "Files"; +pub const SPTOKENKEY_UI: &'static str = "UI"; +pub const SPTOKENKEY_ATTRIBUTES: &'static str = "Attributes"; +pub const SPTOKENKEY_RETAINEDAUDIO: &'static str = "SecondsPerRetainedAudioEvent"; +pub const SPTOKENKEY_AUDIO_LATENCY_WARNING: &'static str = "LatencyWarningThreshold"; +pub const SPTOKENKEY_AUDIO_LATENCY_TRUNCATE: &'static str = "LatencyTruncateThreshold"; +pub const SPTOKENKEY_AUDIO_LATENCY_UPDATE_INTERVAL: &'static str = "LatencyUpdateInterval"; +pub const SPVOICECATEGORY_TTSRATE: &'static str = "DefaultTTSRate"; +pub const SPPROP_RESOURCE_USAGE: &'static str = "ResourceUsage"; +pub const SPPROP_HIGH_CONFIDENCE_THRESHOLD: &'static str = "HighConfidenceThreshold"; +pub const SPPROP_NORMAL_CONFIDENCE_THRESHOLD: &'static str = "NormalConfidenceThreshold"; +pub const SPPROP_LOW_CONFIDENCE_THRESHOLD: &'static str = "LowConfidenceThreshold"; +pub const SPPROP_RESPONSE_SPEED: &'static str = "ResponseSpeed"; +pub const SPPROP_COMPLEX_RESPONSE_SPEED: &'static str = "ComplexResponseSpeed"; +pub const SPPROP_ADAPTATION_ON: &'static str = "AdaptationOn"; +pub const SPPROP_PERSISTED_BACKGROUND_ADAPTATION: &'static str = "PersistedBackgroundAdaptation"; +pub const SPPROP_PERSISTED_LANGUAGE_MODEL_ADAPTATION: &'static str = "PersistedLanguageModelAdaptation"; +pub const SPPROP_UX_IS_LISTENING: &'static str = "UXIsListening"; +pub const SPTOPIC_SPELLING: &'static str = "Spelling"; +pub const SPWILDCARD: &'static str = "..."; +pub const SPDICTATION: &'static str = "*"; +pub const SPINFDICTATION: &'static str = "*+"; +pub const SPREG_SAFE_USER_TOKENS: &'static str = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Speech\\UserTokens"; +pub const SP_LOW_CONFIDENCE: i32 = -1; +pub const SP_NORMAL_CONFIDENCE: i32 = 0; +pub const SP_HIGH_CONFIDENCE: i32 = 1; +pub const DEFAULT_WEIGHT: i32 = 1; +pub const SP_MAX_WORD_LENGTH: i32 = 128; +pub const SP_MAX_PRON_LENGTH: i32 = 384; +pub const SP_EMULATE_RESULT: i32 = 0x40000000; +RIDL!( +interface ISpNotifyCallback(ISpNotifyCallbackVtbl) { + fn NotifyCallback(&mut self, wParam: ::WPARAM, lParam: ::LPARAM) -> ::HRESULT +} +); +pub type SPNOTIFYCALLBACK = unsafe extern "system" fn(wParam: ::WPARAM, lParam: ::LPARAM); +RIDL!( +interface ISpNotifySource(ISpNotifySourceVtbl): IUnknown(IUnknownVtbl) { + fn SetNotifySink(&mut self, pNotifySink: *mut ISpNotifySink) -> ::HRESULT, + fn SetNotifyWindowMessage( + &mut self, hWnd: ::HWND, Msg: ::UINT, wParam: ::WPARAM, lParam: ::LPARAM + ) -> ::HRESULT, + fn SetNotifyCallbackFunction( + &mut self, pfnCallback: SPNOTIFYCALLBACK, wParam: ::WPARAM, lParam: ::LPARAM + ) -> ::HRESULT, + fn SetNotifyCallbackInterface( + &mut self, pSpCallback: *mut ISpNotifyCallback, wParam: ::WPARAM, lParam: ::LPARAM + ) -> ::HRESULT, + fn SetNotifyWin32Event(&mut self) -> ::HRESULT, + fn WaitForNotifyEvent(&mut self, dwMilliseconds: ::DWORD) -> ::HRESULT, + fn GetNotifyEventHandle(&mut self) -> ::HANDLE +} +); +RIDL!( +interface ISpNotifySink(ISpNotifySinkVtbl): IUnknown(IUnknownVtbl) { + fn Notify(&mut self) -> ::HRESULT +} +); +RIDL!( +interface ISpNotifyTranslator(ISpNotifyTranslatorVtbl): ISpNotifySink(ISpNotifySinkVtbl) { + fn InitWindowMessage( + &mut self, hWnd: ::HWND, Msg: ::UINT, wParam: ::WPARAM, lParam: ::LPARAM + ) -> ::HRESULT, + fn InitCallback( + &mut self, pfnCallback: SPNOTIFYCALLBACK, wParam: ::WPARAM, lParam: ::LPARAM + ) -> ::HRESULT, + fn InitSpNotifyCallback( + &mut self, pSpCallback: *mut ISpNotifyCallback, wParam: ::WPARAM, lParam: ::LPARAM + ) -> ::HRESULT, + fn InitWin32Event(&mut self, hEvent: ::HANDLE, fCloseHandleOnRelease: ::BOOL) -> ::HRESULT, + fn Wait(&mut self, dwMilliseconds: ::DWORD) -> ::HRESULT, + fn GetEventHandle(&mut self) -> ::HANDLE +} +); +RIDL!( +interface ISpDataKey(ISpDataKeyVtbl): IUnknown(IUnknownVtbl) { + fn SetData( + &mut self, pszValueName: ::LPCWSTR, cbData: ::ULONG, pData: *const ::BYTE + ) -> ::HRESULT, + fn GetData( + &mut self, pszValueName: ::LPCWSTR, pcbData: *mut ::ULONG, pData: *mut ::BYTE + ) -> ::HRESULT, + fn SetStringValue(&mut self, pszValueName: ::LPCWSTR, pszValue: ::LPCWSTR) -> ::HRESULT, + fn GetStringValue(&mut self, pszValueName: ::LPCWSTR, ppszValue: *mut ::LPWSTR) -> ::HRESULT, + fn SetDWORD(&mut self, pszValueName: ::LPCWSTR, dwValue: ::DWORD) -> ::HRESULT, + fn GetDWORD(&mut self, pszValueName: ::LPCWSTR, pdwValue: *mut ::DWORD) -> ::HRESULT, + fn OpenKey(&mut self, pszSubKeyName: ::LPCWSTR, ppSubKey: *mut *mut ISpDataKey) -> ::HRESULT, + fn CreateKey(&mut self, pszSubKey: ::LPCWSTR, ppSubKey: *mut *mut ISpDataKey) -> ::HRESULT, + fn DeleteKey(&mut self, pszSubKey: ::LPCWSTR) -> ::HRESULT, + fn DeleteValue(&mut self, pszValueName: ::LPCWSTR) -> ::HRESULT, + fn EnumKeys(&mut self, Index: ::ULONG, ppszSubKeyName: *mut ::LPWSTR) -> ::HRESULT, + fn EnumValues(&mut self, Index: ::ULONG, ppszValueName: *mut ::LPWSTR) -> ::HRESULT +} +); +RIDL!( +interface ISpRegDataKey(ISpRegDataKeyVtbl): ISpDataKey(ISpDataKeyVtbl) { + fn SetKey(&mut self, hkey: ::HKEY, fReadOnly: ::BOOL) -> ::HRESULT +} +); +RIDL!( +interface ISpObjectTokenCategory(ISpObjectTokenCategoryVtbl): ISpDataKey(ISpDataKeyVtbl) { + fn SetId(&mut self, pszCategoryId: ::LPCWSTR, fCreateIfNotExist: ::BOOL) -> ::HRESULT, + fn GetId(&mut self, ppszCoMemCategoryId: *mut ::LPWSTR) -> ::HRESULT, + fn GetDataKey( + &mut self, spdkl: SPDATAKEYLOCATION, pppDataKey: *mut *mut ISpDataKey + ) -> ::HRESULT, + fn EnumTokens( + &mut self, pzsReqAttribs: ::LPCWSTR, pszOptAttribs: ::LPCWSTR, + ppEnum: *mut *mut IEnumSpObjectTokens + ) -> ::HRESULT, + fn SetDefaultTokenId(&mut self, pszTokenId: ::LPCWSTR) -> ::HRESULT, + fn GetDefaultTokenId(&mut self, ppszCoMemTokenId: *mut ::LPWSTR) -> ::HRESULT +} +); +RIDL!( +interface ISpObjectToken(ISpObjectTokenVtbl): ISpDataKey(ISpDataKeyVtbl) { + fn SetId( + &mut self, pszCategoryId: ::LPCWSTR, pszTokenId: ::LPCWSTR, fCreateIfNotExist: ::BOOL + ) -> ::HRESULT, + fn GetId(&mut self, ppszCoMemTokenId: *mut ::LPWSTR) -> ::HRESULT, + fn GetCategory(&mut self, ppTokenCategory: *mut *mut ISpObjectTokenCategory) -> ::HRESULT, + fn CreateInstance( + &mut self, pUnkOuter: *mut ::IUnknown, dwClsContext: ::DWORD, riid: ::REFIID, + ppvObject: *mut *mut ::c_void + ) -> ::HRESULT, + fn GetStorageFileName( + &mut self, clsidCaller: ::REFCLSID, pszValueName: ::LPCWSTR, + pszFileNameSpecifier: ::LPCWSTR, nFolder: ::ULONG, ppszFilePath: *mut ::LPWSTR + ) -> ::HRESULT, + fn RemoveStorageFileName(&mut self, pszKeyName: ::LPCWSTR, fDeleteFile: ::BOOL) -> ::HRESULT, + fn Remove(&mut self, pclsidCaller: *const ::CLSID) -> ::HRESULT, + fn IsUISupported( + &mut self, pszTypeOfUI: ::LPCWSTR, pvExtraData: *mut ::c_void, cbExtraData: ::ULONG, + punkObject: *mut ::IUnknown, pfSupported: *mut ::BOOL + ) -> ::HRESULT, + fn DisplayUI( + &mut self, hwndParent: ::HWND, pszTitle: ::LPCWSTR, pszTypeOfUI: ::LPCWSTR, + pvExtraData: *mut ::c_void, cbExtraData: ::ULONG, punkObject: *mut ::IUnknown + ) -> ::HRESULT, + fn MatchesAttributes(&mut self, pszAttributes: ::LPCWSTR, pfMatches: *mut ::BOOL) -> ::HRESULT +} +); +RIDL!( +interface ISpObjectTokenInit(ISpObjectTokenInitVtbl): ISpObjectToken(ISpObjectTokenVtbl) { + fn InitFromDataKey( + &mut self, pszCategoryId: ::LPCWSTR, pszTokenId: ::LPCWSTR, pDataKey: *mut ISpDataKey + ) -> ::HRESULT +} +); +RIDL!( +interface IEnumSpObjectTokens(IEnumSpObjectTokensVtbl): IUnknown(IUnknownVtbl) { + fn Next( + &mut self, celt: ::ULONG, pelt: *mut *mut ISpObjectToken, pceltFetched: *mut ::ULONG + ) -> ::HRESULT, + fn Skip(&mut self, celt: ::ULONG) -> ::HRESULT, + fn Reset(&mut self) -> ::HRESULT, + fn Clone(&mut self, ppEnum: *mut *mut IEnumSpObjectTokens) -> ::HRESULT, + fn Item(&mut self, Index: ::ULONG, ppToken: *mut *mut ISpObjectToken) -> ::HRESULT, + fn GetCount(&mut self, pCount: *mut ::ULONG) -> ::HRESULT +} +); +RIDL!( +interface ISpObjectWithToken(ISpObjectWithTokenVtbl): IUnknown(IUnknownVtbl) { + fn SetObjectToken(&mut self, pToken: *mut ISpObjectToken) -> ::HRESULT, + fn GetObjectToken(&mut self, ppToken: *mut *mut ISpObjectToken) -> ::HRESULT +} +); +RIDL!( +interface ISpResourceManager(ISpResourceManagerVtbl): IServiceProvider(IServiceProviderVtbl) { + fn SetObject(&mut self, guidServiceId: ::REFGUID, pUnkObject: *mut ::IUnknown) -> ::HRESULT, + fn GetObject( + &mut self, guidServiceId: ::REFGUID, ObjectCLSID: ::REFCLSID, ObjectIID: ::REFIID, + fReleaseWhenLastExternalRefReleased: ::BOOL, ppObject: *mut *mut ::c_void + ) -> ::HRESULT +} +); +ENUM!{enum SPEVENTLPARAMTYPE { + SPET_LPARAM_IS_UNDEFINED = 0, + SPET_LPARAM_IS_TOKEN, + SPET_LPARAM_IS_OBJECT, + SPET_LPARAM_IS_POINTER, + SPET_LPARAM_IS_STRING, +}} +ENUM!{enum SPEVENTENUM { + SPEI_UNDEFINED = 0, + SPEI_START_INPUT_STREAM = 1, + SPEI_END_INPUT_STREAM = 2, + SPEI_VOICE_CHANGE = 3, + SPEI_TTS_BOOKMARK = 4, + SPEI_WORD_BOUNDARY = 5, + SPEI_PHONEME = 6, + SPEI_SENTENCE_BOUNDARY = 7, + SPEI_VISEME = 8, + SPEI_TTS_AUDIO_LEVEL = 9, + SPEI_TTS_PRIVATE = 15, + SPEI_END_SR_STREAM = 34, + SPEI_SOUND_START = 35, + SPEI_SOUND_END = 36, + SPEI_PHRASE_START = 37, + SPEI_RECOGNITION = 38, + SPEI_HYPOTHESIS = 39, + SPEI_SR_BOOKMARK = 40, + SPEI_PROPERTY_NUM_CHANGE = 41, + SPEI_PROPERTY_STRING_CHANGE = 42, + SPEI_FALSE_RECOGNITION = 43, + SPEI_INTERFERENCE = 44, + SPEI_REQUEST_UI = 45, + SPEI_RECO_STATE_CHANGE = 46, + SPEI_ADAPTATION = 47, + SPEI_START_SR_STREAM = 48, + SPEI_RECO_OTHER_CONTEXT = 49, + SPEI_SR_AUDIO_LEVEL = 50, + SPEI_SR_RETAINEDAUDIO = 51, + SPEI_SR_PRIVATE = 52, + SPEI_ACTIVE_CATEGORY_CHANGED = 53, + SPEI_RESERVED5 = 54, + SPEI_RESERVED6 = 55, + SPEI_RESERVED1 = 30, + SPEI_RESERVED2 = 33, + SPEI_RESERVED3 = 63, +}} +pub const SPEI_MIN_TTS: SPEVENTENUM = SPEI_START_INPUT_STREAM; +pub const SPEI_MAX_TTS: SPEVENTENUM = SPEI_TTS_PRIVATE; +pub const SPEI_MIN_SR: SPEVENTENUM = SPEI_END_SR_STREAM; +pub const SPEI_MAX_SR: SPEVENTENUM = SPEI_RESERVED6; +pub const SPFEI_FLAGCHECK: u64 = (1 << SPEI_RESERVED1.0 as u64) | (1 << SPEI_RESERVED2.0 as u64); +pub const SPFEI_ALL_TTS_EVENTS: u64 = 0x000000000000FFFE | SPFEI_FLAGCHECK; +pub const SPFEI_ALL_SR_EVENTS: u64 = 0x003FFFFC00000000 | SPFEI_FLAGCHECK; +pub const SPFEI_ALL_EVENTS: u64 = 0xEFFFFFFFFFFFFFFF; +#[inline] +pub fn SPFEI(SPEI_ord: u64) -> u64 { + (1 << SPEI_ord) | SPFEI_FLAGCHECK +} +STRUCT!{struct SPEVENT { + eEventId: ::WORD, + elParamType: ::WORD, + ulStreamNum: ::ULONG, + ullAudioStreamOffset: ::ULONGLONG, + wParam: ::WPARAM, + lParam: ::LPARAM, +}} +STRUCT!{struct SPSERIALIZEDEVENT { + eEventId: ::WORD, + elParamType: ::WORD, + ulStreamNum: ::ULONG, + ullAudioStreamOffset: ::ULONGLONG, + SerializedwParam: ::ULONG, + SerializedlParam: ::LONG, +}} +STRUCT!{struct SPSERIALIZEDEVENT64 { + eEventId: ::WORD, + elParamType: ::WORD, + ulStreamNum: ::ULONG, + ullAudioStreamOffset: ::ULONGLONG, + SerializedwParam: ::ULONGLONG, + SerializedlParam: ::LONGLONG, +}} +STRUCT!{struct SPEVENTEX { + eEventId: ::WORD, + elParamType: ::WORD, + ulStreamNum: ::ULONG, + ullAudioStreamOffset: ::ULONGLONG, + wParam: ::WPARAM, + lParam: ::LPARAM, + ullAudioTimeOffset: ::ULONGLONG, +}} +ENUM!{enum SPINTERFERENCE { + SPINTERFERENCE_NONE = 0, + SPINTERFERENCE_NOISE = 1, + SPINTERFERENCE_NOSIGNAL = 2, + SPINTERFERENCE_TOOLOUD = 3, + SPINTERFERENCE_TOOQUIET = 4, + SPINTERFERENCE_TOOFAST = 5, + SPINTERFERENCE_TOOSLOW = 6, + SPINTERFERENCE_LATENCY_WARNING = 7, + SPINTERFERENCE_LATENCY_TRUNCATE_BEGIN = 8, + SPINTERFERENCE_LATENCY_TRUNCATE_END = 9, +}} +FLAGS!{enum SPENDSRSTREAMFLAGS { + SPESF_NONE = 0, + SPESF_STREAM_RELEASED = 1 << 0, + SPESF_EMULATED = 1 << 1, +}} +FLAGS!{enum SPVFEATURE { + SPVFEATURE_STRESSED = 1 << 0, + SPVFEATURE_EMPHASIS = 1 << 1, +}} +ENUM!{enum SPVISEMES { + SP_VISEME_0 = 0, + SP_VISEME_1, + SP_VISEME_2, + SP_VISEME_3, + SP_VISEME_4, + SP_VISEME_5, + SP_VISEME_6, + SP_VISEME_7, + SP_VISEME_8, + SP_VISEME_9, + SP_VISEME_10, + SP_VISEME_11, + SP_VISEME_12, + SP_VISEME_13, + SP_VISEME_14, + SP_VISEME_15, + SP_VISEME_16, + SP_VISEME_17, + SP_VISEME_18, + SP_VISEME_19, + SP_VISEME_20, + SP_VISEME_21, +}} +STRUCT!{struct SPEVENTSOURCEINFO { + ullEventInterest: ::ULONGLONG, + ullQueuedInterest: ::ULONGLONG, + ulCount: ::ULONG, +}} +RIDL!( +interface ISpEventSource(ISpEventSourceVtbl): ISpNotifySource(ISpNotifySourceVtbl) { + fn SetInterest( + &mut self, ullEventInterest: ::ULONGLONG, ullQueuedInterest: ::ULONGLONG + ) -> ::HRESULT, + fn GetEvents( + &mut self, ulCount: ::ULONG, pEventArray: *mut SPEVENT, pulFetched: *mut ::ULONG + ) -> ::HRESULT, + fn GetInfo(&mut self, pInfo: *mut SPEVENTSOURCEINFO) -> ::HRESULT +} +); +RIDL!( +interface ISpEventSource2(ISpEventSource2Vtbl): ISpEventSource(ISpEventSourceVtbl) { + fn GetEventsEx( + &mut self, ulCount: ::ULONG, pEventArray: *mut SPEVENTEX, pulFetched: *mut ::ULONG + ) -> ::HRESULT +} +); +RIDL!( +interface ISpEventSink(ISpEventSinkVtbl): IUnknown(IUnknownVtbl) { + fn AddEvents(&mut self, pEventArray: *const SPEVENT, ulCount: ::ULONG) -> ::HRESULT, + fn GetEventInterest(&mut self, pullEventInterest: *mut ::ULONGLONG) -> ::HRESULT +} +); +RIDL!( +interface ISpStreamFormat(ISpStreamFormatVtbl): IStream(IStreamVtbl) { + fn GetFormat( + &mut self, pguidFormatId: *mut ::GUID, ppCoMemWaveFormatEx: *mut *mut ::WAVEFORMATEX + ) -> ::HRESULT +} +); +ENUM!{enum SPFILEMODE { + SPFM_OPEN_READONLY = 0, + SPFM_OPEN_READWRITE = 1, + SPFM_CREATE = 2, + SPFM_CREATE_ALWAYS = 3, + SPFM_NUM_MODES = 4, +}} +RIDL!( +interface ISpStream(ISpStreamVtbl): ISpStreamFormat(ISpStreamFormatVtbl) { + fn SetBaseStream( + &mut self, pStream: *mut ::IStream, rguidFormat: ::REFGUID, + pWaveFormatEx: *const ::WAVEFORMATEX + ) -> ::HRESULT, + fn GetBaseStream(&mut self, ppStream: *mut *mut ::IStream) -> ::HRESULT, + fn BindToFile( + &mut self, pszFileName: ::LPCWSTR, eMode: SPFILEMODE, pFormatId: *const ::GUID, + pWaveFormatEx: *const ::WAVEFORMATEX, ullEventInterest: ::ULONGLONG + ) -> ::HRESULT, + fn Close(&mut self) -> ::HRESULT +} +); +RIDL!( +interface ISpStreamFormatConverter(ISpStreamFormatConverterVtbl) + : ISpStreamFormat(ISpStreamFormatVtbl) { + fn SetBaseStream( + &mut self, pStream: *mut ISpStreamFormat, fSetFormatToBaseStreamFormat: ::BOOL, + fWriteToBaseStream: ::BOOL + ) -> ::HRESULT, + fn GetBaseStream(&mut self, ppStream: *mut *mut ISpStreamFormat) -> ::HRESULT, + fn SetFormat( + &mut self, rguidFormatIdOfConvertedStream: ::REFGUID, + pWaveFormatExOfConvertedStream: *const ::WAVEFORMATEX + ) -> ::HRESULT, + fn ResetSeekPosition(&mut self) -> ::HRESULT, + fn ScaleConvertedToBaseOffset( + &mut self, ullOffsetConvertedStream: ::ULONGLONG, pullOffsetBaseStream: *mut ::ULONGLONG + ) -> ::HRESULT, + fn ScaleBaseToConvertedOffset( + &mut self, ullOffsetBaseStream: ::ULONGLONG, pullOffsetConvertedStream: *mut ::ULONGLONG + ) -> ::HRESULT +} +); +ENUM!{enum SPAUDIOSTATE { + SPAS_CLOSED = 0, + SPAS_STOP = 1, + SPAS_PAUSE = 2, + SPAS_RUN = 3, +}} +STRUCT!{struct SPAUDIOSTATUS { + cbFreeBuffSpace: ::LONG, + cbNonBlockingIO: ::ULONG, + State: SPAUDIOSTATE, + CurSeekPos: ::ULONGLONG, + CurDevicePos: ::ULONGLONG, + dwAudioLevel: ::DWORD, + dwReserved2: ::DWORD, +}} +STRUCT!{struct SPAUDIOBUFFERINFO { + ulMsMinNotification: ::ULONG, + ulMsBufferSize: ::ULONG, + ulMsEventBias: ::ULONG, +}} +RIDL!( +interface ISpAudio(ISpAudioVtbl): ISpStreamFormat(ISpStreamFormatVtbl) { + fn SetState(&mut self, NewState: SPAUDIOSTATE, ullReserved: ::ULONGLONG) -> ::HRESULT, + fn SetFormat( + &mut self, rguidFmtId: ::REFGUID, pWaveFormatEx: *const ::WAVEFORMATEX + ) -> ::HRESULT, + fn GetStatus(&mut self, pStatus: *mut SPAUDIOSTATUS) -> ::HRESULT, + fn SetBufferInfo(&mut self, pBuffInfo: *const SPAUDIOBUFFERINFO) -> ::HRESULT, + fn GetBufferInfo(&mut self, pBuffInfo: *mut SPAUDIOBUFFERINFO) -> ::HRESULT, + fn GetDefaultFormat( + &mut self, pFormatId: *mut ::GUID, ppCoMemWaveFormatEx: *mut *mut ::WAVEFORMATEX + ) -> ::HRESULT, + fn EventHandle(&mut self) -> ::HANDLE, + fn GetVolumeLevel(&mut self, pLevel: *mut ::ULONG) -> ::HRESULT, + fn SetVolumeLevel(&mut self, Level: ::ULONG) -> ::HRESULT, + fn GetBufferNotifySize(&mut self, pcbSize: *mut ::ULONG) -> ::HRESULT, + fn SetBufferNotifySize(&mut self, cbSize: ::ULONG) -> ::HRESULT +} +); +RIDL!( +interface ISpMMSysAudio(ISpMMSysAudioVtbl): ISpAudio(ISpAudioVtbl) { + fn GetDeviceId(&mut self, puDeviceId: *mut ::UINT) -> ::HRESULT, + fn SetDeviceId(&mut self, uDeviceId: ::UINT) -> ::HRESULT, + fn GetMMHandle(&mut self, pHandle: *mut *mut ::c_void) -> ::HRESULT, + fn GetLineId(&mut self, puLineId: *mut ::UINT) -> ::HRESULT, + fn SetLineId(&mut self, uLineId: ::UINT) -> ::HRESULT +} +); +RIDL!( +interface ISpTranscript(ISpTranscriptVtbl): IUnknown(IUnknownVtbl) { + fn GetTranscript(&mut self, ppszTranscript: *mut ::LPWSTR) -> ::HRESULT, + fn AppendTranscript(&mut self, pszTranscript: ::LPCWSTR) -> ::HRESULT +} +); +FLAGS!{enum SPDISPLYATTRIBUTES { + SPAF_ONE_TRAILING_SPACE = 0x2, + SPAF_TWO_TRAILING_SPACES = 0x4, + SPAF_CONSUME_LEADING_SPACES = 0x8, + SPAF_BUFFER_POSITION = 0x10, + SPAF_ALL = 0x1f, + SPAF_USER_SPECIFIED = 0x80, +}} +pub type SPPHONEID = ::WCHAR; +pub type PSPPHONEID = ::LPWSTR; +pub type PCSPPHONEID = ::LPCWSTR; +STRUCT!{struct SPPHRASEELEMENT { + ulAudioTimeOffset: ::ULONG, + ulAudioSizeTime: ::ULONG, + ulAudioStreamOffset: ::ULONG, + ulAudioSizeBytes: ::ULONG, + ulRetainedStreamOffset: ::ULONG, + ulRetainedSizeBytes: ::ULONG, + pszDisplayText: ::LPCWSTR, + pszLexicalForm: ::LPCWSTR, + pszPronunciation: *const SPPHONEID, + bDisplayAttributes: ::BYTE, + RequiredConfidence: ::c_char, + ActualConfidence: ::c_char, + Reserved: ::BYTE, + SREngineConfidence: ::c_float, +}} +STRUCT!{struct SPPHRASERULE { + pszName: ::LPCWSTR, + ulId: ::ULONG, + ulFirstElement: ::ULONG, + ulCountOfElements: ::ULONG, + pNextSibling: *const SPPHRASERULE, + pFirstChild: *const SPPHRASERULE, + SREngineConfidence: ::c_float, + Confidence: ::c_char, +}} +ENUM!{enum SPPHRASEPROPERTYUNIONTYPE { + SPPPUT_UNUSED = 0, + SPPPUT_ARRAY_INDEX, +}} +STRUCT!{struct SPPHRASEPROPERTY { + pszName: ::LPCWSTR, + bType: ::BYTE, + bReserved: ::BYTE, + usArrayIndex: u16, + pszValue: ::LPCWSTR, + vValue: ::VARIANT, + ulFirstElement: ::ULONG, + ulCountOfElements: ::ULONG, + pNextSibling: *const SPPHRASEPROPERTY, + pFirstChild: *const SPPHRASEPROPERTY, + SREngineConfidence: ::c_float, + Confidence: ::c_char, +}} +UNION!(SPPHRASEPROPERTY, bType, ulId, ulId_mut, ::ULONG); +STRUCT!{struct SPPHRASEREPLACEMENT { + bDisplayAttributes: ::BYTE, + pszReplacementText: ::LPCWSTR, + ulFirstElement: ::ULONG, + ulCountOfElements: ::ULONG, +}} +STRUCT!{struct SPSEMANTICERRORINFO { + ulLineNumber: ::ULONG, + pszScriptLine: ::LPWSTR, + pszSource: ::LPWSTR, + pszDescription: ::LPWSTR, + hrResultCode: ::HRESULT, +}} +ENUM!{enum SPSEMANTICFORMAT { + SPSMF_SAPI_PROPERTIES = 0, + SPSMF_SRGS_SEMANTICINTERPRETATION_MS = 1, + SPSMF_SRGS_SAPIPROPERTIES = 2, + SPSMF_UPS = 4, + SPSMF_SRGS_SEMANTICINTERPRETATION_W3C = 8, +}} +STRUCT!{struct SPPHRASE_50 { + cbSize: ::ULONG, + LangID: ::WORD, + wHomophoneGroupId: ::WORD, + ullGrammarID: ::ULONGLONG, + ftStartTime: ::ULONGLONG, + ullAudioStreamPosition: ::ULONGLONG, + ulAudioSizeBytes: ::ULONG, + ulRetainedSizeBytes: ::ULONG, + ulAudioSizeTime: ::ULONG, + Rule: ::SPPHRASERULE, + pProperties: *const ::SPPHRASEPROPERTY, + pElements: *const ::SPPHRASEELEMENT, + cReplacements: ::ULONG, + pReplacements: *const ::SPPHRASEREPLACEMENT, + SREngineID: ::GUID, + ulSREnginePrivateDataSize: ::ULONG, + pSREnginePrivateData: *const ::BYTE, +}} +STRUCT!{struct SPPHRASE_53 { + cbSize: ::ULONG, + LangID: ::WORD, + wHomophoneGroupId: ::WORD, + ullGrammarID: ::ULONGLONG, + ftStartTime: ::ULONGLONG, + ullAudioStreamPosition: ::ULONGLONG, + ulAudioSizeBytes: ::ULONG, + ulRetainedSizeBytes: ::ULONG, + ulAudioSizeTime: ::ULONG, + Rule: ::SPPHRASERULE, + pProperties: *const ::SPPHRASEPROPERTY, + pElements: *const ::SPPHRASEELEMENT, + cReplacements: ::ULONG, + pReplacements: *const ::SPPHRASEREPLACEMENT, + SREngineID: ::GUID, + ulSREnginePrivateDataSize: ::ULONG, + pSREnginePrivateData: *const ::BYTE, + pSML: ::LPWSTR, + pSemanticErrorInfo: *mut SPSEMANTICERRORINFO, +}} +STRUCT!{struct SPPHRASE { + cbSize: ::ULONG, + LangID: ::WORD, + wHomophoneGroupId: ::WORD, + ullGrammarID: ::ULONGLONG, + ftStartTime: ::ULONGLONG, + ullAudioStreamPosition: ::ULONGLONG, + ulAudioSizeBytes: ::ULONG, + ulRetainedSizeBytes: ::ULONG, + ulAudioSizeTime: ::ULONG, + Rule: ::SPPHRASERULE, + pProperties: *const ::SPPHRASEPROPERTY, + pElements: *const ::SPPHRASEELEMENT, + cReplacements: ::ULONG, + pReplacements: *const ::SPPHRASEREPLACEMENT, + SREngineID: ::GUID, + ulSREnginePrivateDataSize: ::ULONG, + pSREnginePrivateData: *const ::BYTE, + pSML: ::LPWSTR, + pSemanticErrorInfo: *mut SPSEMANTICERRORINFO, + SemanticTagFormat: SPSEMANTICFORMAT, +}} +STRUCT!{struct SPSERIALIZEDPHRASE { + ulSerializedSize: ::ULONG, +}} +STRUCT!{struct SPRULE { + pszRuleName: ::LPCWSTR, + ulRuleId: ::ULONG, + dwAttributes: ::DWORD, +}} +FLAGS!{enum SPVALUETYPE { + SPDF_PROPERTY = 0x1, + SPDF_REPLACEMENT = 0x2, + SPDF_RULE = 0x4, + SPDF_DISPLAYTEXT = 0x8, + SPDF_LEXICALFORM = 0x10, + SPDF_PRONUNCIATION = 0x20, + SPDF_AUDIO = 0x40, + SPDF_ALTERNATES = 0x80, + SPDF_ALL = 0xff, +}} +STRUCT!{struct SPBINARYGRAMMAR { + ulTotalSerializedSize: ::ULONG, +}} +ENUM!{enum SPPHRASERNG { + SPPR_ALL_ELEMENTS = -1i32 as u32, +}} +pub const SP_GETWHOLEPHRASE: SPPHRASERNG = SPPR_ALL_ELEMENTS; +pub const SPRR_ALL_ELEMENTS: SPPHRASERNG = SPPR_ALL_ELEMENTS; +DECLARE_HANDLE!(SPSTATEHANDLE, SPSTATEHANDLE__); +FLAGS!{enum SPRECOEVENTFLAGS { + SPREF_AutoPause = 1 << 0, + SPREF_Emulated = 1 << 1, + SPREF_SMLTimeout = 1 << 2, + SPREF_ExtendableParse = 1 << 3, + SPREF_ReSent = 1 << 4, + SPREF_Hypothesis = 1 << 5, + SPREF_FalseRecognition = 1 << 6, +}} +ENUM!{enum SPPARTOFSPEECH { + SPPS_NotOverriden = -1i32 as u32, + SPPS_Unknown = 0, + SPPS_Noun = 0x1000, + SPPS_Verb = 0x2000, + SPPS_Modifier = 0x3000, + SPPS_Function = 0x4000, + SPPS_Interjection = 0x5000, + SPPS_Noncontent = 0x6000, + SPPS_LMA = 0x7000, + SPPS_SuppressWord = 0xf000, +}} +FLAGS!{enum SPLEXICONTYPE { + eLEXTYPE_USER = 1 << 0, + eLEXTYPE_APP = 1 << 1, + eLEXTYPE_VENDORLEXICON = 1 << 2, + eLEXTYPE_LETTERTOSOUND = 1 << 3, + eLEXTYPE_MORPHOLOGY = 1 << 4, + eLEXTYPE_RESERVED4 = 1 << 5, + eLEXTYPE_USER_SHORTCUT = 1 << 6, + eLEXTYPE_RESERVED6 = 1 << 7, + eLEXTYPE_RESERVED7 = 1 << 8, + eLEXTYPE_RESERVED8 = 1 << 9, + eLEXTYPE_RESERVED9 = 1 << 10, + eLEXTYPE_RESERVED10 = 1 << 11, + eLEXTYPE_PRIVATE1 = 1 << 12, + eLEXTYPE_PRIVATE2 = 1 << 13, + eLEXTYPE_PRIVATE3 = 1 << 14, + eLEXTYPE_PRIVATE4 = 1 << 15, + eLEXTYPE_PRIVATE5 = 1 << 16, + eLEXTYPE_PRIVATE6 = 1 << 17, + eLEXTYPE_PRIVATE7 = 1 << 18, + eLEXTYPE_PRIVATE8 = 1 << 19, + eLEXTYPE_PRIVATE9 = 1 << 20, + eLEXTYPE_PRIVATE10 = 1 << 21, + eLEXTYPE_PRIVATE11 = 1 << 22, + eLEXTYPE_PRIVATE12 = 1 << 23, + eLEXTYPE_PRIVATE13 = 1 << 24, + eLEXTYPE_PRIVATE14 = 1 << 25, + eLEXTYPE_PRIVATE15 = 1 << 26, + eLEXTYPE_PRIVATE16 = 1 << 27, + eLEXTYPE_PRIVATE17 = 1 << 28, + eLEXTYPE_PRIVATE18 = 1 << 29, + eLEXTYPE_PRIVATE19 = 1 << 30, + eLEXTYPE_PRIVATE20 = 1 << 31, +}} +FLAGS!{enum SPWORDTYPE { + eWORDTYPE_ADDED = 1 << 0, + eWORDTYPE_DELETED = 1 << 1, +}} +FLAGS!{enum SPPRONUNCIATIONFLAGS { + ePRONFLAG_USED = 1 << 0, +}} +STRUCT!{struct SPWORDPRONUNCIATION { + pNextWordPronunciation: *mut SPWORDPRONUNCIATION, + eLexiconType: SPLEXICONTYPE, + LangID: ::WORD, + wPronunciationFlags: ::WORD, + ePartOfSpeech: SPPARTOFSPEECH, + szPronunciation: [SPPHONEID; 1], +}} +STRUCT!{struct SPWORDPRONUNCIATIONLIST { + ulSize: ::ULONG, + pvBuffer: *mut ::BYTE, + pFirstWordPronunciation: *mut SPWORDPRONUNCIATION, +}} +STRUCT!{struct SPWORD { + pNextWord: *mut SPWORD, + LangID: ::WORD, + wReserved: ::WORD, + eWordType: SPWORDTYPE, + pszWord: ::LPWSTR, + pFirstWordPronunciation: *mut SPWORDPRONUNCIATION, +}} +STRUCT!{struct SPWORDLIST { + ulSize: ::ULONG, + pvBuffer: *mut ::BYTE, + pFirstWord: *mut SPWORD, +}} +RIDL!( +interface ISpLexicon(ISpLexiconVtbl): IUnknown(IUnknownVtbl) { + fn GetPronunciations( + &mut self, pszWord: ::LPCWSTR, LangID: ::WORD, dwFlags: ::DWORD, + pWordPronunciationList: *mut SPWORDPRONUNCIATIONLIST + ) -> ::HRESULT, + fn AddPronunciation( + &mut self, pszWord: ::LPCWSTR, LangID: ::WORD, ePartOfSpeech: SPPARTOFSPEECH, + pszPronunciation: PCSPPHONEID + ) -> ::HRESULT, + fn RemovePronunciation( + &mut self, pszWord: ::LPCWSTR, LangID: ::WORD, ePartOfSpeech: SPPARTOFSPEECH, + pszPronunciation: PCSPPHONEID + ) -> ::HRESULT, + fn GetGeneration(&mut self, pdwGeneration: *mut ::DWORD) -> ::HRESULT, + fn GetGenerationChange( + &mut self, dwFlags: ::DWORD, pdwGeneration: *mut ::DWORD, pWordList: *mut SPWORDLIST + ) -> ::HRESULT, + fn GetWords( + &mut self, dwFlags: ::DWORD, pdwGeneration: *mut ::DWORD, pdwCookie: *mut ::DWORD, + pWordList: *mut SPWORDLIST + ) -> ::HRESULT +} +); +RIDL!( +interface ISpContainerLexicon(ISpContainerLexiconVtbl): ISpLexicon(ISpLexiconVtbl) { + fn AddLexicon(&mut self, pAddLexicon: *mut ISpLexicon, dwFlags: ::DWORD) -> ::HRESULT +} +); +ENUM!{enum SPSHORTCUTTYPE { + SPSHT_NotOverriden = -1i32 as u32, + SPSHT_Unknown = 0, + SPSHT_EMAIL = 0x1000, + SPSHT_OTHER = 0x2000, + SPPS_RESERVED1 = 0x3000, + SPPS_RESERVED2 = 0x4000, + SPPS_RESERVED3 = 0x5000, + SPPS_RESERVED4 = 0xf000, +}} +STRUCT!{struct SPSHORTCUTPAIR { + pNextSHORTCUTPAIR: *mut SPSHORTCUTPAIR, + LangID: ::WORD, + shType: SPSHORTCUTTYPE, + pszDisplay: ::LPWSTR, + pszSpoken: ::LPWSTR, +}} +STRUCT!{struct SPSHORTCUTPAIRLIST { + ulSize: ::ULONG, + pvBuffer: *mut ::BYTE, + pFirstShortcutPair: *mut SPSHORTCUTPAIR, +}} +RIDL!( +interface ISpShortcut(ISpShortcutVtbl): IUnknown(IUnknownVtbl) { + fn AddShortcut( + &mut self, pszDisplay: ::LPCWSTR, LangID: ::WORD, pszSpoken: ::LPCWSTR, + shType: SPSHORTCUTTYPE + ) -> ::HRESULT, + fn RemoveShortcut( + &mut self, pszDisplay: ::LPCWSTR, LangID: ::WORD, pszSpoken: ::LPCWSTR, + shType: SPSHORTCUTTYPE + ) -> ::HRESULT, + fn GetShortcuts( + &mut self, LangId: ::WORD, pShortcutpairList: *mut SPSHORTCUTPAIRLIST + ) -> ::HRESULT, + fn GetGeneration(&mut self, pdwGeneration: *mut ::DWORD) -> ::HRESULT, + fn GetWordsFromGenerationChange( + &mut self, pdwGeneration: *mut ::DWORD, pWordList: *mut SPWORDLIST + ) -> ::HRESULT, + fn GetWords( + &mut self, pdwGeneration: *mut ::DWORD, pdwCookie: *mut ::DWORD, pWordList: *mut SPWORDLIST + ) -> ::HRESULT, + fn GetShortcutsForGeneration( + &mut self, pdwGeneration: *mut ::DWORD, pdwCookie: *mut ::DWORD, + pShortcutpairList: *mut SPSHORTCUTPAIRLIST + ) -> ::HRESULT, + fn GetGenerationChange( + &mut self, pdwGeneration: *mut ::DWORD, pShortcutpairList: *mut SPSHORTCUTPAIRLIST + ) -> ::HRESULT +} +); +RIDL!( +interface ISpPhoneConverter(ISpPhoneConverterVtbl): ISpObjectWithToken(ISpObjectWithTokenVtbl) { + fn PhoneToId(&mut self, pszPhone: ::LPCWSTR, pId: *mut SPPHONEID) -> ::HRESULT, + fn IdToPhone(&mut self, pId: PCSPPHONEID, pszPhone: *mut ::WCHAR) -> ::HRESULT +} +); +RIDL!( +interface ISpPhoneticAlphabetConverter(ISpPhoneticAlphabetConverterVtbl): IUnknown(IUnknownVtbl) { + fn GetLangId(&mut self, pLangID: *mut ::WORD) -> ::HRESULT, + fn SetLangId(&mut self, LangID: *mut ::WORD) -> ::HRESULT, + fn SAPI2UPS( + &mut self, pszSAPIId: *const SPPHONEID, pszUPSId: *mut SPPHONEID, cMaxLength: ::DWORD + ) -> ::HRESULT, + fn UPS2SAPI( + &mut self, pszUPSId: *const SPPHONEID, pszSAPIId: *mut SPPHONEID, cMaxLength: ::DWORD + ) -> ::HRESULT, + fn GetMaxConvertLength( + &mut self, cSrcLength: ::DWORD, bSAPI2UPS: ::BOOL, pcMaxDestLength: *mut ::DWORD + ) -> ::HRESULT +} +); +RIDL!( +interface ISpPhoneticAlphabetSelection(ISpPhoneticAlphabetSelectionVtbl): IUnknown(IUnknownVtbl) { + fn IsAlphabetUPS(&mut self, pfIsUPS: *mut ::BOOL) -> ::HRESULT, + fn SetAlphabetToUPS(&mut self, fForceUPS: ::BOOL) -> ::HRESULT +} +); +STRUCT!{struct SPVPITCH { + MiddleAdj: ::c_long, + RangeAdj: ::c_long, +}} +ENUM!{enum SPVACTIONS { + SPVA_Speak = 0, + SPVA_Silence, + SPVA_Pronounce, + SPVA_Bookmark, + SPVA_SpellOut, + SPVA_Section, + SPVA_ParseUnknownTag, +}} +STRUCT!{struct SPVCONTEXT { + pCategory: ::LPCWSTR, + pBefore: ::LPCWSTR, + pAfter: ::LPCWSTR, +}} +STRUCT!{struct SPVSTATE { + eAction: SPVACTIONS, + LangID: ::WORD, + wReserved: ::WORD, + EmphAdj: ::c_long, + RateAdj: ::c_long, + Volume: ::ULONG, + PitchAdj: SPVPITCH, + SilenceMSecs: ::ULONG, + pPhoneIds: *mut SPPHONEID, + ePartOfSpeech: SPPARTOFSPEECH, + Context: SPVCONTEXT, +}} +ENUM!{enum SPRUNSTATE { + SPRS_DONE = 1 << 0, + SPRS_IS_SPEAKING = 1 << 1, +}} +ENUM!{enum SPVLIMITS { + SPMIN_VOLUME = 0, + SPMAX_VOLUME = 100, + SPMIN_RATE = -10i32 as u32, + SPMAX_RATE = 10, +}} +ENUM!{enum SPVPRIORITY { + SPVPRI_NORMAL = 0, + SPVPRI_ALERT = 1 << 0, + SPVPRI_OVER = 1 << 1, +}} +STRUCT!{struct SPVOICESTATUS { + ulCurrentStream: ::ULONG, + ulLastStreamQueued: ::ULONG, + hrLastResult: ::HRESULT, + dwRunningState: ::DWORD, + ulInputWordPos: ::ULONG, + ulInputWordLen: ::ULONG, + ulInputSentPos: ::ULONG, + ulInputSentLen: ::ULONG, + lBookmarkId: ::LONG, + PhonemeId: SPPHONEID, + VisemeId: SPVISEMES, + dwReserved1: ::DWORD, + dwReserved2: ::DWORD, +}} +FLAGS!{enum SPEAKFLAGS { + SPF_DEFAULT = 0, + SPF_ASYNC = 1 << 0, + SPF_PURGEBEFORESPEAK = 1 << 1, + SPF_IS_FILENAME = 1 << 2, + SPF_IS_XML = 1 << 3, + SPF_IS_NOT_XML = 1 << 4, + SPF_PERSIST_XML = 1 << 5, + SPF_NLP_SPEAK_PUNC = 1 << 6, + SPF_PARSE_SAPI = 1 << 7, + SPF_PARSE_SSML = 1 << 8, +}} +pub const SPF_PARSE_AUTODETECT: SPEAKFLAGS = SPF_DEFAULT; +pub const SPF_NLP_MASK: SPEAKFLAGS = SPF_NLP_SPEAK_PUNC; +pub const SPF_PARSE_MASK: i32 = SPF_PARSE_SAPI.0 as i32 | SPF_PARSE_SSML.0 as i32; +pub const SPF_VOICE_MASK: i32 = + SPF_ASYNC.0 as i32 | SPF_PURGEBEFORESPEAK.0 as i32 | SPF_IS_FILENAME.0 as i32 | SPF_IS_XML.0 as i32 | + SPF_IS_NOT_XML.0 as i32 | SPF_NLP_MASK.0 as i32 | SPF_PERSIST_XML.0 as i32 | SPF_PARSE_MASK; +pub const SPF_UNUSED_FLAGS: i32 = !SPF_VOICE_MASK; +RIDL!( +interface ISpVoice(ISpVoiceVtbl): ISpEventSource(ISpEventSourceVtbl) { + fn SetOutput(&mut self, pUnkOutput: *mut ::IUnknown, fAllowFormatChanges: ::BOOL) -> ::HRESULT, + fn GetOutputObjectToken(&mut self, ppObjectToken: *mut *mut ISpObjectToken) -> ::HRESULT, + fn GetOutputStream(&mut self, ppStream: *mut *mut ISpStreamFormat) -> ::HRESULT, + fn Pause(&mut self) -> ::HRESULT, + fn Resume(&mut self) -> ::HRESULT, + fn SetVoice(&mut self, pToken: *mut ISpObjectToken) -> ::HRESULT, + fn GetVoice(&mut self, ppToken: *mut *mut ISpObjectToken) -> ::HRESULT, + fn Speak( + &mut self, pwcs: ::LPCWSTR, dwFlags: ::DWORD, pulStreamNumber: *mut ::ULONG + ) -> ::HRESULT, + fn SpeakStream( + &mut self, pStream: *mut ::IStream, dwFlags: ::DWORD, pulStreamNumber: *mut ::ULONG + ) -> ::HRESULT, + fn GetStatus( + &mut self, pStatus: *mut SPVOICESTATUS, ppszLastBookmark: *mut ::LPWSTR + ) -> ::HRESULT, + fn Skip( + &mut self, pItemType: ::LPCWSTR, lNumItems: ::c_long, pulNumSkipped: *mut ::ULONG + ) -> ::HRESULT, + fn SetPriority(&mut self, ePriority: SPVPRIORITY) -> ::HRESULT, + fn GetPriority(&mut self, pePriority: *mut SPVPRIORITY) -> ::HRESULT, + fn SetAlertBoundary(&mut self, eBoundary: SPEVENTENUM) -> ::HRESULT, + fn GetAlertBoundary(&mut self, peBoundary: *mut SPEVENTENUM) -> ::HRESULT, + fn SetRate(&mut self, RateAdjust: ::c_long) -> ::HRESULT, + fn GetRate(&mut self, pRateAdjust: *mut ::c_long) -> ::HRESULT, + fn SetVolume(&mut self, usVolume: ::USHORT) -> ::HRESULT, + fn GetVolume(&mut self, pusVolume: *mut ::USHORT) -> ::HRESULT, + fn WaitUntilDone(&mut self, msTimeout: ::ULONG) -> ::HRESULT, + fn SetSyncSpeakTimeout(&mut self, msTimeout: ::ULONG) -> ::HRESULT, + fn GetSyncSpeakTimeout(&mut self, pmsTimeout: *mut ::ULONG) -> ::HRESULT, + fn SpeakCompleteEvent(&mut self) -> ::HANDLE, + fn IsUISupported( + &mut self, pszTypeOfUI: ::LPCWSTR, pvExtraData: *mut ::c_void, cbExtraData: ::ULONG, + pfSupported: *mut ::BOOL + ) -> ::HRESULT, + fn DisplayUI( + &mut self, hwndParent: ::HWND, pszTitle: ::LPCWSTR, pszTypeOfUI: ::LPCWSTR, + pvExtraData: *mut ::c_void, cbExtraData: ::ULONG + ) -> ::HRESULT +} +); +DEFINE_GUID!( + UuidOfISpVoice, + 0x6C44DF74, 0x72B9, 0x4992, 0xA1, 0xEC, 0xEF, 0x99, 0x6E, 0x04, 0x22, 0xD4 +); +RIDL!( +interface ISpPhrase(ISpPhraseVtbl): IUnknown(IUnknownVtbl) { + fn GetPhrase(&mut self, ppCoMemPhrase: *mut *mut SPPHRASE) -> ::HRESULT, + fn GetSerializedPhrase(&mut self, ppCoMemPhrase: *mut *mut SPSERIALIZEDPHRASE) -> ::HRESULT, + fn GetText( + &mut self, ulStart: ::ULONG, ulCount: ::ULONG, fUseTextReplacements: ::BOOL, + ppszCoMemText: *mut ::LPWSTR, pbDisplayAttributes: *mut ::BYTE + ) -> ::HRESULT, + fn Discard(&mut self, dwValueTypes: ::DWORD) -> ::HRESULT +} +); +RIDL!( +interface ISpPhraseAlt(ISpPhraseAltVtbl): ISpPhrase(ISpPhraseVtbl) { + fn GetAltInfo( + &mut self, pParent: *mut *mut ISpPhrase, pulStartElementInParent: *mut ::ULONG, + pcElementsInParent: *mut ::ULONG, pcElementsInAlt: *mut ::ULONG + ) -> ::HRESULT, + fn Commit(&mut self) -> ::HRESULT +} +); +ENUM!{enum SPXMLRESULTOPTIONS { + SPXRO_SML = 0, + SPXRO_Alternates_SML = 1, +}} +RIDL!( +interface ISpPhrase2(ISpPhrase2Vtbl): ISpPhrase(ISpPhraseVtbl) { + fn GetXMLResult( + &mut self, ppszCoMemXMLResult: *mut ::LPWSTR, Options: SPXMLRESULTOPTIONS + ) -> ::HRESULT, + fn GetXMLErrorInfo(&mut self, pSemanticErrorInfo: *mut SPSEMANTICERRORINFO) -> ::HRESULT, + fn GetAudio( + &mut self, ulStartElement: ::ULONG, cElements: ::ULONG, ppStream: *mut *mut ISpStreamFormat + ) -> ::HRESULT +} +); +STRUCT!{struct SPRECORESULTTIMES { + ftStreamTime: ::FILETIME, + ullLength: ::ULONGLONG, + dwTickCount: ::DWORD, + ullStart: ::ULONGLONG, +}} +STRUCT!{struct SPSERIALIZEDRESULT { + ulSerializedSize: ::ULONG, +}} +RIDL!( +interface ISpRecoResult(ISpRecoResultVtbl): ISpPhrase(ISpPhraseVtbl) { + fn GetResultTimes(&mut self, pTimes: *mut SPRECORESULTTIMES) -> ::HRESULT, + fn GetAlternates( + &mut self, ulStartElement: ::ULONG, cElements: ::ULONG, ulRequestCount: ::ULONG, + ppPhrases: *mut *mut ISpPhraseAlt, pcPhrasesReturned: *mut ::ULONG + ) -> ::HRESULT, + fn GetAudio( + &mut self, ulStartElement: ::ULONG, cElements: ::ULONG, ppStream: *mut *mut ISpStreamFormat + ) -> ::HRESULT, + fn SpeakAudio( + &mut self, ulStartElement: ::ULONG, cElements: ::ULONG, dwFlags: ::DWORD, + pulStreamNumber: *mut ::ULONG + ) -> ::HRESULT, + fn Serialize(&mut self, ppCoMemSerializedResult: *mut *mut SPSERIALIZEDRESULT) -> ::HRESULT, + fn ScaleAudio( + &mut self, pAudioFormatId: *const ::GUID, pWaveFormatEx: *const ::WAVEFORMATEX + ) -> ::HRESULT, + fn GetRecoContext(&mut self, ppRecoContext: *mut *mut ISpRecoContext) -> ::HRESULT +} +); +FLAGS!{enum SPCOMMITFLAGS { + SPCF_NONE = 0, + SPCF_ADD_TO_USER_LEXICON = 1 << 0, + SPCF_DEFINITE_CORRECTION = 1 << 1, +}} +RIDL!( +interface ISpRecoResult2(ISpRecoResult2Vtbl): ISpRecoResult(ISpRecoResultVtbl) { + fn CommitAlternate( + &mut self, pPhraseAlt: *mut ISpPhraseAlt, ppNewResult: *mut *mut ISpRecoResult + ) -> ::HRESULT, + fn CommitText( + &mut self, ulStartElement: ::ULONG, cElements: ::ULONG, pszCorrectedData: ::LPCWSTR, + eCommitFlags: ::DWORD + ) -> ::HRESULT, + fn SetTextFeedback(&mut self, pszFeedback: ::LPCWSTR, fSuccessful: ::BOOL) -> ::HRESULT +} +); +RIDL!( +interface ISpXMLRecoResult(ISpXMLRecoResultVtbl): ISpRecoResult(ISpRecoResultVtbl) { + fn GetXMLResult( + &mut self, ppszCoMemXMLResult: *mut ::LPWSTR, Options: SPXMLRESULTOPTIONS + ) -> ::HRESULT, + fn GetXMLErrorInfo(&mut self, pSemanticErrorInfo: *mut SPSEMANTICERRORINFO) -> ::HRESULT +} +); +STRUCT!{struct SPTEXTSELECTIONINFO { + ulStartActiveOffset: ::ULONG, + cchActiveChars: ::ULONG, + ulStartSelection: ::ULONG, + cchSelection: ::ULONG, +}} +ENUM!{enum SPWORDPRONOUNCEABLE { + SPWP_UNKNOWN_WORD_UNPRONOUNCEABLE = 0, + SPWP_UNKNOWN_WORD_PRONOUNCEABLE = 1, + SPWP_KNOWN_WORD_PRONOUNCEABLE = 2, +}} +ENUM!{enum SPGRAMMARSTATE { + SPGS_DISABLED = 0, + SPGS_ENABLED = 1, + SPGS_EXCLUSIVE = 3, +}} +ENUM!{enum SPCONTEXTSTATE { + SPCS_DISABLED = 0, + SPCS_ENABLED = 1, +}} +ENUM!{enum SPRULESTATE { + SPRS_INACTIVE = 0, + SPRS_ACTIVE = 1, + SPRS_ACTIVE_WITH_AUTO_PAUSE = 3, + SPRS_ACTIVE_USER_DELIMITED = 4, +}} +pub const SP_STREAMPOS_ASAP: ::INT = 0; +pub const SP_STREAMPOS_REALTIME: ::INT = -1; +pub const SPRULETRANS_TEXTBUFFER: SPSTATEHANDLE = -1isize as SPSTATEHANDLE; +pub const SPRULETRANS_WILDCARD: SPSTATEHANDLE = -2isize as SPSTATEHANDLE; +pub const SPRULETRANS_DICTATION: SPSTATEHANDLE = -3isize as SPSTATEHANDLE; +ENUM!{enum SPGRAMMARWORDTYPE { + SPWT_DISPLAY = 0, + SPWT_LEXICAL = 1, + SPWT_PRONUNCIATION = 2, + SPWT_LEXICAL_NO_SPECIAL_CHARS = 3, +}} +STRUCT!{struct SPPROPERTYINFO { + pszName: ::LPCWSTR, + ulId: ::ULONG, + pszValue: ::LPCWSTR, + vValue: ::VARIANT, +}} +FLAGS!{enum SPCFGRULEATTRIBUTES { + SPRAF_TopLevel = 1 << 0, + SPRAF_Active = 1 << 1, + SPRAF_Export = 1 << 2, + SPRAF_Import = 1 << 3, + SPRAF_Interpreter = 1 << 4, + SPRAF_Dynamic = 1 << 5, + SPRAF_Root = 1 << 6, + SPRAF_AutoPause = 1 << 16, + SPRAF_UserDelimited = 1 << 17, +}} +RIDL!( +interface ISpGrammarBuilder(ISpGrammarBuilderVtbl): IUnknown(IUnknownVtbl) { + fn ResetGrammar(&mut self, NewLanguage: ::WORD) -> ::HRESULT, + fn GetRule( + &mut self, pszRuleName: ::LPCWSTR, dwRuleId: ::DWORD, dwAttributes: ::DWORD, + fCreateIfNotExist: ::BOOL, phInitialState: *mut SPSTATEHANDLE + ) -> ::HRESULT, + fn ClearRule(&mut self, hState: SPSTATEHANDLE) -> ::HRESULT, + fn CreateNewState(&mut self, hState: SPSTATEHANDLE, phState: *mut SPSTATEHANDLE) -> ::HRESULT, + fn AddWordTransition( + &mut self, hFromState: SPSTATEHANDLE, hToState: SPSTATEHANDLE, psz: ::LPCWSTR, + pszSeparators: ::LPCWSTR, eWordType: SPGRAMMARWORDTYPE, Weight: ::c_float, + pPropInfo: *const SPPROPERTYINFO + ) -> ::HRESULT, + fn AddRuleTransition( + &mut self, hFromState: SPSTATEHANDLE, hToState: SPSTATEHANDLE, hRule: SPSTATEHANDLE, + Weight: ::c_float, pPropInfo: *const SPPROPERTYINFO + ) -> ::HRESULT, + fn AddResource( + &mut self, hRuleState: SPSTATEHANDLE, pszResourceName: ::LPCWSTR, + pszResourceValue: ::LPCWSTR + ) -> ::HRESULT, + fn Commit(&mut self, dwReserved: ::DWORD) -> ::HRESULT +} +); +ENUM!{enum SPLOADOPTIONS { + SPLO_STATIC = 0, + SPLO_DYNAMIC = 1, +}} +RIDL!( +interface ISpRecoGrammar(ISpRecoGrammarVtbl): ISpGrammarBuilder(ISpGrammarBuilderVtbl) { + fn GetGrammarId(&mut self, pullGrammarId: *mut ::ULONGLONG) -> ::HRESULT, + fn GetRecoContext(&mut self, ppRecoCtxt: *mut *mut ISpRecoContext) -> ::HRESULT, + fn LoadCmdFromFile(&mut self, pszFileName: ::LPCWSTR, Options: SPLOADOPTIONS) -> ::HRESULT, + fn LoadCmdFromObject( + &mut self, rcid: ::REFCLSID, pszGrammarName: ::LPCWSTR, Options: SPLOADOPTIONS + ) -> ::HRESULT, + fn LoadCmdFromResource( + &mut self, hModule: ::HMODULE, pszResourceName: ::LPCWSTR, pszResourceType: ::LPCWSTR, + wLanguage: ::WORD, Options: SPLOADOPTIONS + ) -> ::HRESULT, + fn LoadCmdFromMemory( + &mut self, pGrammar: *const SPBINARYGRAMMAR, Options: SPLOADOPTIONS + ) -> ::HRESULT, + fn LoadCmdFromProprietaryGrammar( + &mut self, rguidParam: ::REFGUID, pszStringParam: ::LPCWSTR, pvDataPrarm: *const ::c_void, + cbDataSize: ::ULONG, Options: SPLOADOPTIONS + ) -> ::HRESULT, + fn SetRuleState( + &mut self, pszName: ::LPCWSTR, pReserved: *mut ::c_void, NewState: SPRULESTATE + ) -> ::HRESULT, + fn SetRuleIdState(&mut self, ulRuleId: ::ULONG, NewState: SPRULESTATE) -> ::HRESULT, + fn LoadDictation(&mut self, pszTopicName: ::LPCWSTR, Options: SPLOADOPTIONS) -> ::HRESULT, + fn UnloadDictation(&mut self) -> ::HRESULT, + fn SetDictationState(&mut self, NewState: SPRULESTATE) -> ::HRESULT, + fn SetWordSequenceData( + &mut self, pText: *const ::WCHAR, cchText: ::ULONG, pInfo: *const SPTEXTSELECTIONINFO + ) -> ::HRESULT, + fn SetTextSelection(&mut self, pInfo: *const SPTEXTSELECTIONINFO) -> ::HRESULT, + fn IsPronounceable( + &mut self, pszWord: ::LPCWSTR, pWordPronounceable: *mut SPWORDPRONOUNCEABLE + ) -> ::HRESULT, + fn SetGrammarState(&mut self, eGrammarState: SPGRAMMARSTATE) -> ::HRESULT, + fn SaveCmd(&mut self, pStream: *mut ::IStream, ppszCoMemErrorText: *mut ::LPWSTR) -> ::HRESULT, + fn GetGrammarState(&mut self, peGrammarState: *mut SPGRAMMARSTATE) -> ::HRESULT +} +); +ENUM!{enum SPMATCHINGMODE { + AllWords = 0, + Subsequence = 1, + OrderedSubset = 3, + SubsequenceContentRequired = 5, + OrderedSubsetContentRequired = 7, +}} +ENUM!{enum PHONETICALPHABET { + PA_Ipa = 0, + PA_Ups = 1, + PA_Sapi = 2, +}} +RIDL!( +interface ISpGrammarBuilder2(ISpGrammarBuilder2Vtbl): IUnknown(IUnknownVtbl) { + fn AddTextSubset( + &mut self, hFromState: SPSTATEHANDLE, hToState: SPSTATEHANDLE, psz: ::LPCWSTR, + eMatchMode: SPMATCHINGMODE + ) -> ::HRESULT, + fn SetPhoneticAlphabet(&mut self, phoneticALphabet: PHONETICALPHABET) -> ::HRESULT +} +); +RIDL!( +interface ISpRecoGrammar2(ISpRecoGrammar2Vtbl): IUnknown(IUnknownVtbl) { + fn GetRules(&mut self, ppCoMemRules: *mut *mut SPRULE, puNumRules: *mut ::UINT) -> ::HRESULT, + fn LoadCmdFromFile2( + &mut self, pszFileName: ::LPCWSTR, Options: SPLOADOPTIONS, pszSharingUri: ::LPCWSTR, + pszBaseUri: ::LPCWSTR + ) -> ::HRESULT, + fn LoadCmdFromMemory2( + &mut self, pGrammar: *const SPBINARYGRAMMAR, Options: SPLOADOPTIONS, + pszSharingUri: ::LPCWSTR, pszBaseUri: ::LPCWSTR + ) -> ::HRESULT, + fn SetRulePriority( + &mut self, pszRuleName: ::LPCWSTR, ulRuleId: ::ULONG, nRulePriority: ::c_int + ) -> ::HRESULT, + fn SetRuleWeight( + &mut self, pszRuleName: ::LPCWSTR, ulRuleId: ::ULONG, flWeight: ::c_float + ) -> ::HRESULT, + fn SetDictationWeight(&mut self, flWeight: ::c_float) -> ::HRESULT, + fn SetGrammarLoader(&mut self, pLoader: *mut ISpeechResourceLoader) -> ::HRESULT, + fn SetSMLSecurityManager( + &mut self, pSMLSecurityManager: *mut ::IInternetSecurityManager + ) -> ::HRESULT +} +); +RIDL!( +interface ISpeechResourceLoader(ISpeechResourceLoaderVtbl): IDispatch(IDispatchVtbl) { + fn LoadResource( + &mut self, bstrResourceUri: ::BSTR, fAlwaysReload: ::VARIANT_BOOL, + pStream: *mut *mut ::IUnknown, pbstrMIMEType: *mut ::BSTR, pfModified: *mut ::VARIANT_BOOL, + pbstrRedirectUrl: *mut ::BSTR + ) -> ::HRESULT, + fn GetLocalCopy( + &mut self, bstrResourceUri: ::BSTR, pbstrLocalPath: *mut ::BSTR, + pbstrMIMEType: *mut ::BSTR, pbstrRedirectUrl: *mut ::BSTR + ) -> ::HRESULT, + fn ReleaseLocalCopy(&mut self, pbstrLocalPath: ::BSTR) -> ::HRESULT +} +); +STRUCT!{nodebug struct SPRECOCONTEXTSTATUS { + eInterference: SPINTERFERENCE, + szRequestTypeOfUI: [::WCHAR; 255], + dwReserved1: ::DWORD, + dwReserved2: ::DWORD, +}} +FLAGS!{enum SPBOOKMARKOPTIONS { + SPBO_NONE = 0, + SPBO_PAUSE = 1 << 0, + SPBO_AHEAD = 1 << 1, + SPBO_TIME_UNITS = 1 << 2, +}} +FLAGS!{enum SPAUDIOOPTIONS { + SPAO_NONE = 0, + SPAO_RETAIN_AUDIO = 1 << 0, +}} +RIDL!( +interface ISpRecoContext(ISpRecoContextVtbl): ISpEventSource(ISpEventSourceVtbl) { + fn GetRecognizer(&mut self, ppRecognizer: *mut *mut ISpRecognizer) -> ::HRESULT, + fn CreateGrammer( + &mut self, ullGrammarId: ::ULONGLONG, ppGrammar: *mut *mut ISpRecoGrammar + ) -> ::HRESULT, + fn GetStatus(&mut self, pState: *mut SPRECOCONTEXTSTATUS) -> ::HRESULT, + fn GetMaxAlternates(&mut self, pcAlternates: *mut ::ULONG) -> ::HRESULT, + fn SetMaxAlternates(&mut self, cAlternates: ::ULONG) -> ::HRESULT, + fn SetAudioOptions( + &mut self, Options: SPAUDIOOPTIONS, pAudioFormatId: *const ::GUID, + pWaveFormatEx: *const ::WAVEFORMATEX + ) -> ::HRESULT, + fn GetAudioOptions( + &mut self, pOptions: *mut SPAUDIOOPTIONS, pAudioFormatId: *mut ::GUID, + ppCoMemWFEX: *mut *mut ::WAVEFORMATEX + ) -> ::HRESULT, + fn DeserializeResult( + &mut self, pSerializedResult: *const SPSERIALIZEDRESULT, ppResult: *mut *mut ISpRecoResult + ) -> ::HRESULT, + fn Bookmark( + &mut self, Options: SPBOOKMARKOPTIONS, ullStreamPosition: ::ULONGLONG, + lparamEvent: ::LPARAM + ) -> ::HRESULT, + fn SetAdaptionData(&mut self, pAdaptionData: ::LPCWSTR, cch: ::ULONG) -> ::HRESULT, + fn Pause(&mut self, dwReserved: ::DWORD) -> ::HRESULT, + fn Resume(&mut self, dwReserved: ::DWORD) -> ::HRESULT, + fn SetVoice(&mut self, pVoice: *mut ISpVoice, fAllowFormatChanges: ::BOOL) -> ::HRESULT, + fn GetVoice(&mut self, ppVoice: *mut *mut ISpVoice) -> ::HRESULT, + fn SetVoicePurgeEvent(&mut self, ullEventIntereset: ::ULONGLONG) -> ::HRESULT, + fn GetVoicePurgeEvent(&mut self, pullEventIntereset: *mut ::ULONGLONG) -> ::HRESULT, + fn SetContextState(&mut self, eContextState: SPCONTEXTSTATE) -> ::HRESULT, + fn GetContextState(&mut self, peContextState: *mut SPCONTEXTSTATE) -> ::HRESULT +} +); +FLAGS!{enum SPGRAMMAROPTIONS { + SPGO_SAPI = 0x1, + SPGO_SRGS = 0x2, + SPGO_UPS = 0x4, + SPGO_SRGS_MS_SCRIPT = 0x8, + SPGO_SRGS_W3C_SCRIPT = 0x100, + SPGO_SRGS_STG_SCRIPT = 0x200, + SPGO_SRGS_SCRIPT = + SPGO_SRGS.0 | SPGO_SRGS_MS_SCRIPT.0 | SPGO_SRGS_W3C_SCRIPT.0 | + SPGO_SRGS_STG_SCRIPT.0, + SPGO_FILE = 0x10, + SPGO_HTTP = 0x20, + SPGO_RES = 0x40, + SPGO_OBJECT = 0x80, + SPGO_DEFAULT = 0x3fb, + SPGO_ALL = 0x3ff, +}} +FLAGS!{enum SPADAPTATIONSETTINGS { + SPADS_Default = 0, + SPADS_CurrentRecognizer = 0x1, + SPADS_RecoProfile = 0x2, + SPADS_Immediate = 0x4, + SPADS_Reset = 0x8, + SPADS_HighVolumeDataSource = 0x10, +}} +ENUM!{enum SPADAPTATIONRELEVANCE { + SPAR_Unknown = 0, + SPAR_Low = 1, + SPAR_Medium = 2, + SPAR_High = 3, +}} +RIDL!( +interface ISpRecoContext2(ISpRecoContext2Vtbl): IUnknown(IUnknownVtbl) { + fn SetGrammarOptions(&mut self, eGrammarOptions: ::DWORD) -> ::HRESULT, + fn GetGrammarOptions(&mut self, peGrammarOptions: *mut ::DWORD) -> ::HRESULT, + fn SetAdaptationData2( + &mut self, pAdaptationData: ::LPCWSTR, cch: ::ULONG, pTopicName: ::LPCWSTR, + eAdaptationSettings: ::DWORD, eRelevance: SPADAPTATIONRELEVANCE + ) -> ::HRESULT +} +); +RIDL!( +interface ISpProperties(ISpPropertiesVtbl): IUnknown(IUnknownVtbl) { + fn SetPropertyNum(&mut self, pName: ::LPCWSTR, lValue: ::LONG) -> ::HRESULT, + fn GetPropertyNum(&mut self, pName: ::LPCWSTR, plValue: *mut ::LONG) -> ::HRESULT, + fn SetPropertyString(&mut self, pName: ::LPCWSTR, pValue: ::LPCWSTR) -> ::HRESULT, + fn GetPropertyString(&mut self, pName: ::LPCWSTR, ppCoMemValue: *mut ::LPWSTR) -> ::HRESULT +} +); +STRUCT!{struct SPRECOGNIZERSTATUS { + AudioStatus: SPAUDIOSTATUS, + ullRecognitionStreamPos: ::ULONGLONG, + ulStreamNumber: ::ULONG, + ulNumActive: ::ULONG, + clsidEngine: ::CLSID, + cLangIDs: ::ULONG, + aLangID: [::WORD; 20], + ullRecognitionStreamTime: ::ULONGLONG, +}} +ENUM!{enum SPWAVEFORMATTYPE { + SPWF_INPUT = 0, + SPWF_SRENGINE = 1, +}} +pub type SPSTREAMFORMATTYPE = SPWAVEFORMATTYPE; +ENUM!{enum SPRECOSTATE { + SPRST_INACTIVE = 0, + SPRST_ACTIVE = 1, + SPRST_ACTIVE_ALWAYS = 2, + SPRST_INACTIVE_WITH_PURGE = 3, + SPRST_NUM_STATES = 4, +}} +RIDL!( +interface ISpRecognizer(ISpRecognizerVtbl): ISpProperties(ISpPropertiesVtbl) { + fn SetRecognizer(&mut self, pRecognizer: *mut ISpObjectToken) -> ::HRESULT, + fn GetRecognizer(&mut self, ppRecognizer: *mut *mut ISpObjectToken) -> ::HRESULT, + fn SetInput(&mut self, pUnkInput: *mut ::IUnknown, fAllowFormatChanges: ::BOOL) -> ::HRESULT, + fn GetInputObjectToken(&mut self, ppToken: *mut *mut ISpObjectToken) -> ::HRESULT, + fn GetInputStream(&mut self, ppStream: *mut *mut ISpStreamFormat) -> ::HRESULT, + fn CreateRecoContext(&mut self, ppNewCtxt: *mut *mut ISpRecoContext) -> ::HRESULT, + fn GetRecoProfile(&mut self, ppToken: *mut *mut ISpObjectToken) -> ::HRESULT, + fn SetRecoProfile(&mut self, pToken: *mut ISpObjectToken) -> ::HRESULT, + fn IsSharedInstance(&mut self) -> ::HRESULT, + fn GetRecoState(&mut self, pState: *mut SPRECOSTATE) -> ::HRESULT, + fn SetRecoState(&mut self, NewState: SPRECOSTATE) -> ::HRESULT, + fn GetStatus(&mut self, pStatus: *mut SPRECOGNIZERSTATUS) -> ::HRESULT, + fn GetFormat( + &mut self, WaveFormatType: SPSTREAMFORMATTYPE, pFormatId: *mut ::GUID, + ppCoMemWFEX: *mut ::WAVEFORMATEX + ) -> ::HRESULT, + fn IsUISupported( + &mut self, pszTypeOfUI: ::LPCWSTR, pvExtraData: *mut ::c_void, cbExtraData: ::ULONG, + pfSupported: *mut ::BOOL + ) -> ::HRESULT, + fn DisplayUI( + &mut self, hwndParent: ::HWND, pszTitle: ::LPCWSTR, pszTypeOfUI: ::LPCWSTR, + pvExtraData: *mut ::c_void, cbExtraData: ::ULONG + ) -> ::HRESULT, + fn EmulateRecognition(&mut self, pPhrase: *mut ISpPhrase) -> ::HRESULT +} +); +RIDL!( +interface ISpSerializeState(ISpSerializeStateVtbl): IUnknown(IUnknownVtbl) { + fn GetSerializedState( + &mut self, ppbData: *mut *mut ::BYTE, pulSize: *mut ::ULONG, dwReserved: ::DWORD + ) -> ::HRESULT, + fn SetSerializedState( + &mut self, pbData: *mut ::BYTE, ulSize: ::ULONG, dwReserved: ::DWORD + ) -> ::HRESULT +} +); +RIDL!( +interface ISpRecognizer2(ISpRecognizer2Vtbl): IUnknown(IUnknownVtbl) { + fn EmulateRecognitionEx( + &mut self, pPhrase: *mut ISpPhrase, dwCompareFlags: ::DWORD + ) -> ::HRESULT, + fn SetTrainingState( + &mut self, fDoingTraining: ::BOOL, fAdaptFromTrainingData: ::BOOL + ) -> ::HRESULT, + fn ResetAcousticModelAdaptation(&mut self) -> ::HRESULT +} +); +ENUM!{enum SPCATEGORYTYPE { + SPCT_COMMAND = 0, + SPCT_DICTATION, + SPCT_SLEEP, + SPCT_SUB_COMMAND, + SPCT_SUB_DICTATION, +}} +RIDL!( +interface ISpRecoCategory(ISpRecoCategoryVtbl): IUnknown(IUnknownVtbl) { + fn GetType(&mut self, peCategoryType: *mut SPCATEGORYTYPE) -> ::HRESULT +} +); +RIDL!( +interface ISpRecognizer3(ISpRecognizer3Vtbl): IUnknown(IUnknownVtbl) { + fn GetCategory( + &mut self, categoryType: SPCATEGORYTYPE, ppCategory: *mut *mut ISpRecoCategory + ) -> ::HRESULT, + fn SetActiveCategory(&mut self, pCategory: *mut ISpRecoCategory) -> ::HRESULT, + fn GetActiveCategory(&mut self, ppCategory: *mut *mut ISpRecoCategory) -> ::HRESULT +} +); +STRUCT!{struct SPNORMALIZATIONLIST { + ulSize: ::ULONG, + ppszzNormalizedList: *mut *mut ::WCHAR, +}} +RIDL!( +interface ISpEnginePronunciation(ISpEnginePronunciationVtbl): IUnknown(IUnknownVtbl) { + fn Normalize( + &mut self, pszWord: ::LPCWSTR, pszLeftContext: ::LPCWSTR, pszRightContext: ::LPCWSTR, + LangID: ::WORD, pNormalizationList: *mut SPNORMALIZATIONLIST + ) -> ::HRESULT, + fn GetPronunciations( + &mut self, pszWord: ::LPCWSTR, pszLeftContext: ::LPCWSTR, pszRightContext: ::LPCWSTR, + LangID: ::WORD, pEnginePronunciationList: *mut SPWORDPRONUNCIATIONLIST + ) -> ::HRESULT +} +); +STRUCT!{struct SPDISPLAYTOKEN { + pszLexical: *const ::WCHAR, + pszDisplay: *const ::WCHAR, + bDisplayAttributes: ::BYTE, +}} +STRUCT!{struct SPDISPLAYPHRASE { + ulNumTokens: ::ULONG, + pTokens: *mut SPDISPLAYTOKEN, +}} +RIDL!( +interface ISpDisplayAlternates(ISpDisplayAlternatesVtbl): IUnknown(IUnknownVtbl) { + fn GetDisplayAlternates( + &mut self, pPhrase: *const SPDISPLAYPHRASE, cRequestCount: ::ULONG, + ppCoMemPhrases: *mut *mut SPDISPLAYPHRASE, pcPhrasesReturned: *mut ::ULONG + ) -> ::HRESULT, + fn SetFullStopTrailSpace(&mut self, ulTrailSpace: ::ULONG) -> ::HRESULT +} +); +pub type SpeechLanguageId = ::c_long; +ENUM!{enum DISPID_SpeechDataKey { + DISPID_SDKSetBinaryValue = 1, + DISPID_SDKGetBinaryValue, + DISPID_SDKSetStringValue, + DISPID_SDKGetStringValue, + DISPID_SDKSetLongValue, + DISPID_SDKGetlongValue, + DISPID_SDKOpenKey, + DISPID_SDKCreateKey, + DISPID_SDKDeleteKey, + DISPID_SDKDeleteValue, + DISPID_SDKEnumKeys, + DISPID_SDKEnumValues, +}} +ENUM!{enum DISPID_SpeechObjectToken { + DISPID_SOTId = 1, + DISPID_SOTDataKey, + DISPID_SOTCategory, + DISPID_SOTGetDescription, + DISPID_SOTSetId, + DISPID_SOTGetAttribute, + DISPID_SOTCreateInstance, + DISPID_SOTRemove, + DISPID_SOTGetStorageFileName, + DISPID_SOTRemoveStorageFileName, + DISPID_SOTIsUISupported, + DISPID_SOTDisplayUI, + DISPID_SOTMatchesAttributes, +}} +ENUM!{enum SpeechDataKeyLocation { + SDKLDefaultLocation = SPDKL_DefaultLocation.0, + SDKLCurrentUser = SPDKL_CurrentUser.0, + SDKLLocalMachine = SPDKL_LocalMachine.0, + SDKLCurrentConfig = SPDKL_CurrentConfig.0, +}} +ENUM!{enum SpeechTokenContext { + STCInprocServer = ::CLSCTX_INPROC_SERVER, + STCInprocHandler = ::CLSCTX_INPROC_HANDLER, + STCLocalServer = ::CLSCTX_LOCAL_SERVER, + STCRemoteServer = ::CLSCTX_REMOTE_SERVER, + STCAll = ::CLSCTX_INPROC_SERVER | ::CLSCTX_INPROC_HANDLER | + ::CLSCTX_LOCAL_SERVER | ::CLSCTX_REMOTE_SERVER, +}} +ENUM!{enum SpeechTokenShellFolder { + STSF_AppData = 0x1a, + STSF_LocalAppData = 0x1c, + STSF_CommonAppData = 0x23, + STSF_FlagCreate = 0x8000, +}} +ENUM!{enum DISPID_SpeechObjectTokens { + DISPID_SOTsCount = 1, + DISPID_SOTsItem = ::DISPID_VALUE as u32, + DISPID_SOTs_NewEnum = ::DISPID_NEWENUM as u32, +}} +ENUM!{enum DISPID_SpeechObjectTokenCategory { + DISPID_SOTCId = 1, + DISPID_SOTCDefault, + DISPID_SOTCSetId, + DISPID_SOTCGetDataKey, + DISPID_SOTCEnumerateTokens, +}} +ENUM!{enum SpeechAudioFormatType { + SAFTDefault = -1i32 as u32, + SAFTNoAssignedFormat = 0, + SAFTText = 1, + SAFTNonStandardFormat = 2, + SAFTExtendedAudioFormat = 3, + SAFT8kHz8BitMono = 4, + SAFT8kHz8BitStereo = 5, + SAFT8kHz16BitMono = 6, + SAFT8kHz16BitStereo = 7, + SAFT11kHz8BitMono = 8, + SAFT11kHz8BitStereo = 9, + SAFT11kHz16BitMono = 10, + SAFT11kHz16BitStereo = 11, + SAFT12kHz8BitMono = 12, + SAFT12kHz8BitStereo = 13, + SAFT12kHz16BitMono = 14, + SAFT12kHz16BitStereo = 15, + SAFT16kHz8BitMono = 16, + SAFT16kHz8BitStereo = 17, + SAFT16kHz16BitMono = 18, + SAFT16kHz16BitStereo = 19, + SAFT22kHz8BitMono = 20, + SAFT22kHz8BitStereo = 21, + SAFT22kHz16BitMono = 22, + SAFT22kHz16BitStereo = 23, + SAFT24kHz8BitMono = 24, + SAFT24kHz8BitStereo = 25, + SAFT24kHz16BitMono = 26, + SAFT24kHz16BitStereo = 27, + SAFT32kHz8BitMono = 28, + SAFT32kHz8BitStereo = 29, + SAFT32kHz16BitMono = 30, + SAFT32kHz16BitStereo = 31, + SAFT44kHz8BitMono = 32, + SAFT44kHz8BitStereo = 33, + SAFT44kHz16BitMono = 34, + SAFT44kHz16BitStereo = 35, + SAFT48kHz8BitMono = 36, + SAFT48kHz8BitStereo = 37, + SAFT48kHz16BitMono = 38, + SAFT48kHz16BitStereo = 39, + SAFTTrueSpeech_8kHz1BitMono = 40, + SAFTCCITT_ALaw_8kHzMono = 41, + SAFTCCITT_ALaw_8kHzStereo = 42, + SAFTCCITT_ALaw_11kHzMono = 43, + SAFTCCITT_ALaw_11kHzStereo = 44, + SAFTCCITT_ALaw_22kHzMono = 45, + SAFTCCITT_ALaw_22kHzStereo = 46, + SAFTCCITT_ALaw_44kHzMono = 47, + SAFTCCITT_ALaw_44kHzStereo = 48, + SAFTCCITT_uLaw_8kHzMono = 49, + SAFTCCITT_uLaw_8kHzStereo = 50, + SAFTCCITT_uLaw_11kHzMono = 51, + SAFTCCITT_uLaw_11kHzStereo = 52, + SAFTCCITT_uLaw_22kHzMono = 53, + SAFTCCITT_uLaw_22kHzStereo = 54, + SAFTCCITT_uLaw_44kHzMono = 55, + SAFTCCITT_uLaw_44kHzStereo = 56, + SAFTADPCM_8kHzMono = 57, + SAFTADPCM_8kHzStereo = 58, + SAFTADPCM_11kHzMono = 59, + SAFTADPCM_11kHzStereo = 60, + SAFTADPCM_22kHzMono = 61, + SAFTADPCM_22kHzStereo = 62, + SAFTADPCM_44kHzMono = 63, + SAFTADPCM_44kHzStereo = 64, + SAFTGSM610_8kHzMono = 65, + SAFTGSM610_11kHzMono = 66, + SAFTGSM610_22kHzMono = 67, + SAFTGSM610_44kHzMono = 68, +}} +ENUM!{enum DISPID_SpeechAudioFormat { + DISPID_SAFType = 1, + DISPID_SAFGuid, + DISPID_SAFGetWaveFormatEx, + DISPID_SAFSetWaveFormatEx, +}} +ENUM!{enum DISPID_SpeechBaseStream { + DISPID_SBSFormat = 1, + DISPID_SBSRead, + DISPID_SBSWrite, + DISPID_SBSSeek, +}} +ENUM!{enum SpeechStreamSeekPositionType { + SSSPTRelativeToStart = ::STREAM_SEEK_SET.0, + SSSPTRelativeToCurrentPosition = ::STREAM_SEEK_CUR.0, + SSSPTRelativeToEnd = ::STREAM_SEEK_END.0, +}} +ENUM!{enum DISPID_SpeechAudio { + DISPID_SAStatus = 200, + DISPID_SABufferInfo, + DISPID_SADefaultFormat, + DISPID_SAVolume, + DISPID_SABufferNotifySize, + DISPID_SAEventHandle, + DISPID_SASetState, +}} +ENUM!{enum SpeechAudioState { + SASClosed = SPAS_CLOSED.0, + SASStop = SPAS_STOP.0, + SASPause = SPAS_PAUSE.0, + SASRun = SPAS_RUN.0, +}} +ENUM!{enum DISPID_SpeechMMSysAudio { + DISPID_SMSADeviceId = 300, + DISPID_SMSALineId, + DISPID_SMSAMMHandle, +}} +ENUM!{enum DISPID_SpeechFileStream { + DISPID_SFSOpen = 100, + DISPID_SFSClose, +}} +ENUM!{enum SpeechStreamFileMode { + SSFMOpenForRead = SPFM_OPEN_READONLY.0, + SSFMOpenReadWrite = SPFM_OPEN_READWRITE.0, + SSFMCreate = SPFM_CREATE.0, + SSFMCreateForWrite = SPFM_CREATE_ALWAYS.0, +}} +ENUM!{enum DISPID_SpeechCustomStream { + DISPID_SCSBaseStream = 100, +}} +ENUM!{enum DISPID_SpeechMemoryStream { + DISPID_SMSSetData = 100, + DISPID_SMSGetData, +}} +ENUM!{enum DISPID_SpeechAudioStatus { + DISPID_SASFreeBufferSpace = 1, + DISPID_SASNonBlockingIO, + DISPID_SASState, + DISPID_SASCurrentSeekPosition, + DISPID_SASCurrentDevicePosition, +}} +ENUM!{enum DISPID_SpeechAudioBufferInfo { + DISPID_SABIMinNotification = 1, + DISPID_SABIBufferSize, + DISPID_SABIEventBias, +}} +ENUM!{enum DISPID_SpeechWaveFormatEx { + DISPID_SWFEFormatTag = 1, + DISPID_SWFEChannels, + DISPID_SWFESamplesPerSec, + DISPID_SWFEAvgBytesPerSec, + DISPID_SWFEBlockAlign, + DISPID_SWFEBitsPerSample, + DISPID_SWFEExtraData, +}} +ENUM!{enum DISPID_SpeechVoice { + DISPID_SVStatus = 1, + DISPID_SVVoice, + DISPID_SVAudioOutput, + DISPID_SVAudioOutputStream, + DISPID_SVRate, + DISPID_SVVolume, + DISPID_SVAllowAudioOuputFormatChangesOnNextSet, + DISPID_SVEventInterests, + DISPID_SVPriority, + DISPID_SVAlertBoundary, + DISPID_SVSyncronousSpeakTimeout, + DISPID_SVSpeak, + DISPID_SVSpeakStream, + DISPID_SVPause, + DISPID_SVResume, + DISPID_SVSkip, + DISPID_SVGetVoices, + DISPID_SVGetAudioOutputs, + DISPID_SVWaitUntilDone, + DISPID_SVSpeakCompleteEvent, + DISPID_SVIsUISupported, + DISPID_SVDisplayUI, +}} +ENUM!{enum SpeechVoicePriority { + SVPNormal = SPVPRI_NORMAL.0, + SVPAlert = SPVPRI_ALERT.0, + SVPOver = SPVPRI_OVER.0, +}} +FLAGS!{enum SpeechVoiceSpeakFlags { + SVSFDefault = SPF_DEFAULT.0, + SVSFlagsAsync = SPF_ASYNC.0, + SVSFPurgeBeforeSpeak = SPF_PURGEBEFORESPEAK.0, + SVSFIsFilename = SPF_IS_FILENAME.0, + SVSFIsXML = SPF_IS_XML.0, + SVSFIsNotXML = SPF_IS_NOT_XML.0, + SVSFPersistXML = SPF_PERSIST_XML.0, + SVSFNLPSpeakPunc = SPF_NLP_SPEAK_PUNC.0, + SVSFParseSapi = SPF_PARSE_SAPI.0, + SVSFParseSsml = SPF_PARSE_SSML.0, + SVSFParseMask = SPF_PARSE_MASK as u32, + SVSFVoiceMask = SPF_VOICE_MASK as u32, + SVSFUnusedFlags = SPF_UNUSED_FLAGS as u32, +}} +pub const SVSFParseAutodetect: SpeechVoiceSpeakFlags = SVSFDefault; +pub const SVSFNLPMask: SpeechVoiceSpeakFlags = SVSFNLPSpeakPunc; +FLAGS!{enum SpeechVoiceEvents { + SVEStartInputStream = 1 << 1, + SVEEndInputStream = 1 << 2, + SVEVoiceChange = 1 << 3, + SVEBookmark = 1 << 4, + SVEWordBoundary = 1 << 5, + SVEPhoneme = 1 << 6, + SVESentenceBoundary = 1 << 7, + SVEViseme = 1 << 8, + SVEAudioLevel = 1 << 9, + SVEPrivate = 1 << 15, + SVEAllEvents = 0x83fe, +}} +ENUM!{enum DISPID_SpeechVoiceStatus { + DISPID_SVSCurrentStreamNumber = 1, + DISPID_SVSLastStreamNumberQueued, + DISPID_SVSLastResult, + DISPID_SVSRunningState, + DISPID_SVSInputWordPosition, + DISPID_SVSInputWordLength, + DISPID_SVSInputSentencePosition, + DISPID_SVSInputSentenceLength, + DISPID_SVSLastBookmark, + DISPID_SVSLastBookmarkId, + DISPID_SVSPhonemeId, + DISPID_SVSVisemeId, +}} +ENUM!{enum SpeechRunState { + SRSEDone = SPRS_DONE.0, + SRSEIsSpeaking = SPRS_IS_SPEAKING.0, +}} +ENUM!{enum SpeechVisemeType { + SVP_0 = 0, + SVP_1, + SVP_2, + SVP_3, + SVP_4, + SVP_5, + SVP_6, + SVP_7, + SVP_8, + SVP_9, + SVP_10, + SVP_11, + SVP_12, + SVP_13, + SVP_14, + SVP_15, + SVP_16, + SVP_17, + SVP_18, + SVP_19, + SVP_20, + SVP_21, +}} +ENUM!{enum SpeechVisemeFeature { + SVF_None = 0, + SVF_Stressed = SPVFEATURE_STRESSED.0, + SVF_Emphasis = SPVFEATURE_EMPHASIS.0, +}} +ENUM!{enum DISPID_SpeechVoiceEvent { + DISPID_SVEStreamStart = 1, + DISPID_SVEStreamEnd, + DISPID_SVEVoiceChange, + DISPID_SVEBookmark, + DISPID_SVEWord, + DISPID_SVEPhoneme, + DISPID_SVESentenceBoundary, + DISPID_SVEViseme, + DISPID_SVEAudioLevel, + DISPID_SVEEnginePrivate, +}} +ENUM!{enum DISPID_SpeechRecognizer { + DISPID_SRRecognizer = 1, + DISPID_SRAllowAudioInputFormatChangesOnNextSet, + DISPID_SRAudioInput, + DISPID_SRAudioInputStream, + DISPID_SRIsShared, + DISPID_SRState, + DISPID_SRStatus, + DISPID_SRProfile, + DISPID_SREmulateRecognition, + DISPID_SRCreateRecoContext, + DISPID_SRGetFormat, + DISPID_SRSetPropertyNumber, + DISPID_SRGetPropertyNumber, + DISPID_SRSetPropertyString, + DISPID_SRGetPropertyString, + DISPID_SRIsUISupported, + DISPID_SRDisplayUI, + DISPID_SRGetRecognizers, + DISPID_SVGetAudioInputs, + DISPID_SVGetProfiles, +}} +ENUM!{enum SpeechRecognizerState { + SRSInactive = SPRST_INACTIVE.0, + SRSActive = SPRST_ACTIVE.0, + SRSActiveAlways = SPRST_ACTIVE_ALWAYS.0, + SRSInactiveWithPurge = SPRST_INACTIVE_WITH_PURGE.0, +}} +ENUM!{enum SpeechDisplayAttributes { + SDA_No_Trailing_Space = 0, + SDA_One_Trailing_Space = SPAF_ONE_TRAILING_SPACE.0, + SDA_Two_Trailing_Spaces = SPAF_TWO_TRAILING_SPACES.0, + SDA_Consume_Leading_Spaces = SPAF_CONSUME_LEADING_SPACES.0, +}} +ENUM!{enum SpeechFormatType { + SFTInput = SPWF_INPUT.0, + SFTSREngine = SPWF_SRENGINE.0, +}} +FLAGS!{enum SpeechEmulationCompareFlags { + SECFIgnoreCase = 0x1, + SECFIgnoreKanaType = 0x10000, + SECFIgnoreWidth = 0x20000, + SECFNoSpecialChars = 0x20000000, + SECFEmulateResult = 0x40000000, + SECFDefault = SECFIgnoreCase.0 | SECFIgnoreKanaType.0 | SECFIgnoreWidth.0, +}} +ENUM!{enum DISPID_SpeechRecognizerStatus { + DISPID_SRSAudioStatus = 1, + DISPID_SRSCurrentStreamPosition, + DISPID_SRSCurrentStreamNumber, + DISPID_SRSNumberOfActiveRules, + DISPID_SRSClsidEngine, + DISPID_SRSSupportedLanguages, +}} +ENUM!{enum DISPID_SpeechRecoContext { + DISPID_SRCRecognizer = 1, + DISPID_SRCAudioInInterferenceStatus, + DISPID_SRCRequestedUIType, + DISPID_SRCVoice, + DISPID_SRAllowVoiceFormatMatchingOnNextSet, + DISPID_SRCVoicePurgeEvent, + DISPID_SRCEventInterests, + DISPID_SRCCmdMaxAlternates, + DISPID_SRCState, + DISPID_SRCRetainedAudio, + DISPID_SRCRetainedAudioFormat, + DISPID_SRCPause, + DISPID_SRCResume, + DISPID_SRCCreateGrammar, + DISPID_SRCCreateResultFromMemory, + DISPID_SRCBookmark, + DISPID_SRCSetAdaptationData, +}} +ENUM!{enum SpeechRetainedAudioOptions { + SRAONone = SPAO_NONE.0, + SRAORetainAudio = SPAO_RETAIN_AUDIO.0, +}} +ENUM!{enum SpeechBookmarkOptions { + SBONone = SPBO_NONE.0, + SBOPause = SPBO_PAUSE.0, +}} +ENUM!{enum SpeechInterference { + SINone = SPINTERFERENCE_NONE.0, + SINoise = SPINTERFERENCE_NOISE.0, + SINoSignal = SPINTERFERENCE_NOSIGNAL.0, + SITooLoud = SPINTERFERENCE_TOOLOUD.0, + SITooQuiet = SPINTERFERENCE_TOOQUIET.0, + SITooFast = SPINTERFERENCE_TOOFAST.0, + SITooSlow = SPINTERFERENCE_TOOSLOW.0, +}} +FLAGS!{enum SpeechRecoEvents { + SREStreamEnd = 1 << 0, + SRESoundStart = 1 << 1, + SRESoundEnd = 1 << 2, + SREPhraseStart = 1 << 3, + SRERecognition = 1 << 4, + SREHypothesis = 1 << 5, + SREBookmark = 1 << 6, + SREPropertyNumChange = 1 << 7, + SREPropertyStringChange = 1 << 8, + SREFalseRecognition = 1 << 9, + SREInterference = 1 << 10, + SRERequestUI = 1 << 11, + SREStateChange = 1 << 12, + SREAdaptation = 1 << 13, + SREStreamStart = 1 << 14, + SRERecoOtherContext = 1 << 15, + SREAudioLevel = 1 << 16, + SREPrivate = 1 << 18, + SREAllEvents = 0x5ffff, +}} +ENUM!{enum SpeechRecoContextState { + SRCS_Disabled = SPCS_DISABLED.0, + SRCS_Enabled = SPCS_ENABLED.0, +}} +ENUM!{enum DISPIDSPRG { + DISPID_SRGId = 1, + DISPID_SRGRecoContext, + DISPID_SRGState, + DISPID_SRGRules, + DISPID_SRGReset, + DISPID_SRGCommit, + DISPID_SRGCmdLoadFromFile, + DISPID_SRGCmdLoadFromObject, + DISPID_SRGCmdLoadFromResource, + DISPID_SRGCmdLoadFromMemory, + DISPID_SRGCmdLoadFromProprietaryGrammar, + DISPID_SRGCmdSetRuleState, + DISPID_SRGCmdSetRuleIdState, + DISPID_SRGDictationLoad, + DISPID_SRGDictationUnload, + DISPID_SRGDictationSetState, + DISPID_SRGSetWordSequenceData, + DISPID_SRGSetTextSelection, + DISPID_SRGIsPronounceable, +}} +ENUM!{enum SpeechLoadOption { + SLOStatic = SPLO_STATIC.0, + SLODynamic = SPLO_DYNAMIC.0, +}} +ENUM!{enum SpeechWordPronounceable { + SWPUnknownWordUnpronounceable = SPWP_UNKNOWN_WORD_UNPRONOUNCEABLE.0, + SWPUnknownWordPronounceable = SPWP_UNKNOWN_WORD_PRONOUNCEABLE.0, + SWPKnownWordPronounceable = SPWP_KNOWN_WORD_PRONOUNCEABLE.0, +}} +ENUM!{enum SpeechGrammarState { + SGSEnabled = SPGS_ENABLED.0, + SGSDisabled = SPGS_DISABLED.0, + SGSExclusive = SPGS_EXCLUSIVE.0, +}} +ENUM!{enum SpeechRuleState { + SGDSInactive = SPRS_INACTIVE.0, + SGDSActive = SPRS_ACTIVE.0, + SGDSActiveWithAutoPause = SPRS_ACTIVE_WITH_AUTO_PAUSE.0, + SGDSActiveUserDelimited = SPRS_ACTIVE_USER_DELIMITED.0, +}} +ENUM!{enum SpeechRuleAttributes { + SRATopLevel = SPRAF_TopLevel.0, + SRADefaultToActive = SPRAF_Active.0, + SRAExport = SPRAF_Export.0, + SRAImport = SPRAF_Import.0, + SRAInterpreter = SPRAF_Interpreter.0, + SRADynamic = SPRAF_Dynamic.0, + SRARoot = SPRAF_Root.0, +}} +ENUM!{enum SpeechGrammarWordType { + SGDisplay = SPWT_DISPLAY.0, + SGLexical = SPWT_LEXICAL.0, + SGPronounciation = SPWT_PRONUNCIATION.0, + SGLexicalNoSpecialChars = SPWT_LEXICAL_NO_SPECIAL_CHARS.0, +}} +ENUM!{enum DISPID_SpeechRecoContextEvents { + DISPID_SRCEStartStream = 1, + DISPID_SRCEEndStream, + DISPID_SRCEBookmark, + DISPID_SRCESoundStart, + DISPID_SRCESoundEnd, + DISPID_SRCEPhraseStart, + DISPID_SRCERecognition, + DISPID_SRCEHypothesis, + DISPID_SRCEPropertyNumberChange, + DISPID_SRCEPropertyStringChange, + DISPID_SRCEFalseRecognition, + DISPID_SRCEInterference, + DISPID_SRCERequestUI, + DISPID_SRCERecognizerStateChange, + DISPID_SRCEAdaptation, + DISPID_SRCERecognitionForOtherContext, + DISPID_SRCEAudioLevel, + DISPID_SRCEEnginePrivate, +}} +ENUM!{enum SpeechRecognitionType { + SRTStandard = 0, + SRTAutopause = SPREF_AutoPause.0, + SRTEmulated = SPREF_Emulated.0, + SRTSMLTimeout = SPREF_SMLTimeout.0, + SRTExtendableParse = SPREF_ExtendableParse.0, + SRTReSent = SPREF_ReSent.0, +}} +ENUM!{enum DISPID_SpeechGrammarRule { + DISPID_SGRAttributes = 1, + DISPID_SGRInitialState, + DISPID_SGRName, + DISPID_SGRId, + DISPID_SGRClear, + DISPID_SGRAddResource, + DISPID_SGRAddState, +}} +ENUM!{enum DISPID_SpeechGrammarRules { + DISPID_SGRsCount = 1, + DISPID_SGRsDynamic, + DISPID_SGRsAdd, + DISPID_SGRsCommit, + DISPID_SGRsCommitAndSave, + DISPID_SGRsFindRule, + DISPID_SGRsItem = ::DISPID_VALUE as u32, + DISPID_SGRs_NewEnum = ::DISPID_NEWENUM as u32, +}} +ENUM!{enum DISPID_SpeechGrammarRuleState { + DISPID_SGRSRule = 1, + DISPID_SGRSTransitions, + DISPID_SGRSAddWordTransition, + DISPID_SGRSAddRuleTransition, + DISPID_SGRSAddSpecialTransition, +}} +ENUM!{enum SpeechSpecialTransitionType { + SSTTWildcard = 1, + SSTTDictation, + SSTTTextBuffer, +}} +ENUM!{enum DISPID_SpeechGrammarRuleStateTransitions { + DISPID_SGRSTsCount = 1, + DISPID_SGRSTsItem = ::DISPID_VALUE as u32, + DISPID_SGRSTs_NewEnum = ::DISPID_NEWENUM as u32, +}} +ENUM!{enum DISPID_SpeechGrammarRuleStateTransition { + DISPID_SGRSTType = 1, + DISPID_SGRSTText, + DISPID_SGRSTRule, + DISPID_SGRSTWeight, + DISPID_SGRSTPropertyName, + DISPID_SGRSTPropertyId, + DISPID_SGRSTPropertyValue, + DISPID_SGRSTNextState, +}} +ENUM!{enum SpeechGrammarRuleStateTransitionType { + SGRSTTEpsilon = 0, + SGRSTTWord, + SGRSTTRule, + SGRSTTDictation, + SGRSTTWildcard, + SGRSTTTextBuffer, +}} +ENUM!{enum DISPIDSPTSI { + DISPIDSPTSI_ActiveOffset = 1, + DISPIDSPTSI_ActiveLength, + DISPIDSPTSI_SelectionOffset, + DISPIDSPTSI_SelectionLength, +}} +ENUM!{enum DISPID_SpeechRecoResult { + DISPID_SRRRecoContext = 1, + DISPID_SRRTimes, + DISPID_SRRAudioFormat, + DISPID_SRRPhraseInfo, + DISPID_SRRAlternates, + DISPID_SRRAudio, + DISPID_SRRSpeakAudio, + DISPID_SRRSaveToMemory, + DISPID_SRRDiscardResultInfo, +}} +ENUM!{enum SpeechDiscardType { + SDTProperty = SPDF_PROPERTY.0, + SDTReplacement = SPDF_REPLACEMENT.0, + SDTRule = SPDF_RULE.0, + SDTDisplayText = SPDF_DISPLAYTEXT.0, + SDTLexicalForm = SPDF_LEXICALFORM.0, + SDTPronunciation = SPDF_PRONUNCIATION.0, + SDTAudio = SPDF_AUDIO.0, + SDTAlternates = SPDF_ALTERNATES.0, + SDTAll = SPDF_ALL.0, +}} +ENUM!{enum DISPID_SpeechXMLRecoResult { + DISPID_SRRGetXMLResult, + DISPID_SRRGetXMLErrorInfo, +}} +ENUM!{enum DISPID_SpeechRecoResult2 { + DISPID_SRRSetTextFeedback, +}} +ENUM!{enum DISPID_SpeechPhraseBuilder { + DISPID_SPPBRestorePhraseFromMemory = 1, +}} +ENUM!{enum DISPID_SpeechRecoResultTimes { + DISPID_SRRTStreamTime = 1, + DISPID_SRRTLength, + DISPID_SRRTTickCount, + DISPID_SRRTOffsetFromStart, +}} +ENUM!{enum DISPID_SpeechPhraseAlternate { + DISPID_SPARecoResult = 1, + DISPID_SPAStartElementInResult, + DISPID_SPANumberOfElementsInResult, + DISPID_SPAPhraseInfo, + DISPID_SPACommit, +}} +ENUM!{enum DISPID_SpeechPhraseAlternates { + DISPID_SPAsCount = 1, + DISPID_SPAsItem = ::DISPID_VALUE as u32, + DISPID_SPAs_NewEnum = ::DISPID_NEWENUM as u32, +}} +ENUM!{enum DISPID_SpeechPhraseInfo { + DISPID_SPILanguageId = 1, + DISPID_SPIGrammarId, + DISPID_SPIStartTime, + DISPID_SPIAudioStreamPosition, + DISPID_SPIAudioSizeBytes, + DISPID_SPIRetainedSizeBytes, + DISPID_SPIAudioSizeTime, + DISPID_SPIRule, + DISPID_SPIProperties, + DISPID_SPIElements, + DISPID_SPIReplacements, + DISPID_SPIEngineId, + DISPID_SPIEnginePrivateData, + DISPID_SPISaveToMemory, + DISPID_SPIGetText, + DISPID_SPIGetDisplayAttributes, +}} +ENUM!{enum DISPID_SpeechPhraseElement { + DISPID_SPEAudioTimeOffset = 1, + DISPID_SPEAudioSizeTime, + DISPID_SPEAudioStreamOffset, + DISPID_SPEAudioSizeBytes, + DISPID_SPERetainedStreamOffset, + DISPID_SPERetainedSizeBytes, + DISPID_SPEDisplayText, + DISPID_SPELexicalForm, + DISPID_SPEPronunciation, + DISPID_SPEDisplayAttributes, + DISPID_SPERequiredConfidence, + DISPID_SPEActualConfidence, + DISPID_SPEEngineConfidence, +}} +ENUM!{enum SpeechEngineConfidence { + SECLowConfidence = -1i32 as u32, + SECNormalConfidence = 0, + SECHighConfidence = 1, +}} +ENUM!{enum DISPID_SpeechPhraseElements { + DISPID_SPEsCount = 1, + DISPID_SPEsItem = ::DISPID_VALUE as u32, + DISPID_SPEs_NewEnum = ::DISPID_NEWENUM as u32, +}} +ENUM!{enum DISPID_SpeechPhraseReplacement { + DISPID_SPRDisplayAttributes = 1, + DISPID_SPRText, + DISPID_SPRFirstElement, + DISPID_SPRNumberOfElements, +}} +ENUM!{enum DISPID_SpeechPhraseReplacements { + DISPID_SPRsCount = 1, + DISPID_SPRsItem = ::DISPID_VALUE as u32, + DISPID_SPRs_NewEnum = ::DISPID_NEWENUM as u32, +}} +ENUM!{enum DISPID_SpeechPhraseProperty { + DISPID_SPPName = 1, + DISPID_SPPId, + DISPID_SPPValue, + DISPID_SPPFirstElement, + DISPID_SPPNumberOfElements, + DISPID_SPPEngineConfidence, + DISPID_SPPConfidence, + DISPID_SPPParent, + DISPID_SPPChildren, +}} +ENUM!{enum DISPID_SpeechPhraseProperties { + DISPID_SPPsCount = 1, + DISPID_SPPsItem = ::DISPID_VALUE as u32, + DISPID_SPPs_NewEnum = ::DISPID_NEWENUM as u32, +}} +ENUM!{enum DISPID_SpeechPhraseRule { + DISPID_SPRuleName = 1, + DISPID_SPRuleId, + DISPID_SPRuleFirstElement, + DISPID_SPRuleNumberOfElements, + DISPID_SPRuleParent, + DISPID_SPRuleChildren, + DISPID_SPRuleConfidence, + DISPID_SPRuleEngineConfidence, +}} +ENUM!{enum DISPID_SpeechPhraseRules { + DISPID_SPRulesCount = 1, + DISPID_SPRulesItem = ::DISPID_VALUE as u32, + DISPID_SPRules_NewEnum = ::DISPID_NEWENUM as u32, +}} +ENUM!{enum DISPID_SpeechLexicon { + DISPID_SLGenerationId = 1, + DISPID_SLGetWords, + DISPID_SLAddPronunciation, + DISPID_SLAddPronunciationByPhoneIds, + DISPID_SLRemovePronunciation, + DISPID_SLRemovePronunciationByPhoneIds, + DISPID_SLGetPronunciations, + DISPID_SLGetGenerationChange, +}} +ENUM!{enum SpeechLexiconType { + SLTUser = eLEXTYPE_USER.0, + SLTApp = eLEXTYPE_APP.0, +}} +ENUM!{enum SpeechPartOfSpeech { + SPSNotOverriden = SPPS_NotOverriden.0, + SPSUnknown = SPPS_Unknown.0, + SPSNoun = SPPS_Noun.0, + SPSVerb = SPPS_Verb.0, + SPSModifier = SPPS_Modifier.0, + SPSFunction = SPPS_Function.0, + SPSInterjection = SPPS_Interjection.0, + SPSLMA = SPPS_LMA.0, + SPSSuppressWord = SPPS_SuppressWord.0, +}} +ENUM!{enum DISPID_SpeechLexiconWords { + DISPID_SLWsCount = 1, + DISPID_SLWsItem = ::DISPID_VALUE as u32, + DISPID_SLWs_NewEnum = ::DISPID_NEWENUM as u32, +}} +ENUM!{enum SpeechWordType { + SWTAdded = eWORDTYPE_ADDED.0, + SWTDeleted = eWORDTYPE_DELETED.0, +}} +ENUM!{enum DISPID_SpeechLexiconWord { + DISPID_SLWLangId = 1, + DISPID_SLWType, + DISPID_SLWWord, + DISPID_SLWPronunciations, +}} +ENUM!{enum DISPID_SpeechLexiconProns { + DISPID_SLPsCount = 1, + DISPID_SLPsItem = ::DISPID_VALUE as u32, + DISPID_SLPs_NewEnum = ::DISPID_NEWENUM as u32, +}} +ENUM!{enum DISPID_SpeechLexiconPronunciation { + DISPID_SLPType = 1, + DISPID_SLPLangId, + DISPID_SLPPartOfSpeech, + DISPID_SLPPhoneIds, + DISPID_SLPSymbolic, +}} +ENUM!{enum DISPID_SpeechPhoneConverter { + DISPID_SPCLangId = 1, + DISPID_SPCPhoneToId, + DISPID_SPCIdToPhone, +}} +RIDL!( +interface ISpeechDataKey(ISpeechDataKeyVtbl): IDispatch(IDispatchVtbl) { + fn SetBinaryValue(&mut self, ValueName: ::BSTR, Value: ::VARIANT) -> ::HRESULT, + fn GetBinaryValue(&mut self, ValueName: ::BSTR, Value: *mut ::VARIANT) -> ::HRESULT, + fn SetStringValue(&mut self, ValueName: ::BSTR, Value: ::BSTR) -> ::HRESULT, + fn GetStringValue(&mut self, ValueName: ::BSTR, Value: *mut ::BSTR) -> ::HRESULT, + fn SetLongValue(&mut self, ValueName: ::BSTR, Value: ::c_long) -> ::HRESULT, + fn GetLongValue(&mut self, ValueName: ::BSTR, Value: *mut ::c_long) -> ::HRESULT, + fn OpenKey(&mut self, SubKeyName: ::BSTR, SubKey: *mut *mut ISpeechDataKey) -> ::HRESULT, + fn CreateKey(&mut self, SubKeyName: ::BSTR, SubKey: *mut *mut ISpeechDataKey) -> ::HRESULT, + fn DeleteKey(&mut self, SubKeyName: ::BSTR) -> ::HRESULT, + fn DeleteValue(&mut self, ValueName: ::BSTR) -> ::HRESULT, + fn EnumKeys(&mut self, Index: ::c_long, SubKeyName: *mut ::BSTR) -> ::HRESULT, + fn EnumValues(&mut self, Index: ::c_long, ValueName: *mut ::BSTR) -> ::HRESULT +} +); +RIDL!( +interface ISpeechObjectToken(ISpeechObjectTokenVtbl): IDispatch(IDispatchVtbl) { + fn get_Id(&mut self, ObjectId: *mut ::BSTR) -> ::HRESULT, + fn get_DataKey(&mut self, DataKey: *mut *mut ISpeechDataKey) -> ::HRESULT, + fn get_Category(&mut self, Category: *mut *mut ISpeechObjectTokenCategory) -> ::HRESULT, + fn GetDescription(&mut self, Locale: ::c_long, Description: *mut ::BSTR) -> ::HRESULT, + fn SetId( + &mut self, Id: ::BSTR, CategoryId: ::BSTR, CreateIfNotExist: ::VARIANT_BOOL + ) -> ::HRESULT, + fn GetAttribute(&mut self, AttributeName: ::BSTR, AttributeValue: *mut ::BSTR) -> ::HRESULT, + fn CreateInstance( + &mut self, pUnkOuter: *mut ::IUnknown, ClsContext: SpeechTokenContext, + Object: *mut *mut ::IUnknown + ) -> ::HRESULT, + fn Remove(&mut self, ObjectStorageCLSID: ::BSTR) -> ::HRESULT, + fn GetStorageFileName( + &mut self, ObjectStorageCLSID: ::BSTR, KeyName: ::BSTR, FileName: ::BSTR, Folder: ::BSTR, + FilePath: *mut ::BSTR + ) -> ::HRESULT, + fn RemoveStorageFileName( + &mut self, ObjectStorageCLSID: ::BSTR, KeyName: ::BSTR, DeleteFile: ::VARIANT_BOOL + ) -> ::HRESULT, + fn IsUISupported( + &mut self, TypeOfUI: ::BSTR, ExtraData: *const ::VARIANT, Object: *mut ::IUnknown, + Supported: *mut ::VARIANT_BOOL + ) -> ::HRESULT, + fn DisplayUI( + &mut self, hWnd: ::c_long, Title: ::BSTR, TypeOfUI: ::BSTR, ExtraData: *const ::VARIANT, + Object: *mut ::IUnknown + ) -> ::HRESULT, + fn MatchesAttributes(&mut self, Attributes: ::BSTR, Matches: *mut ::VARIANT_BOOL) -> ::HRESULT +} +); +RIDL!( +interface ISpeechObjectTokens(ISpeechObjectTokensVtbl): IDispatch(IDispatchVtbl) { + fn get_Count(&mut self, Count: *mut ::c_long) -> ::HRESULT, + fn Item(&mut self, Index: ::c_long, Token: *mut *mut ISpeechObjectToken) -> ::HRESULT, + fn get__NewEnum(&mut self, ppEnumVARIANT: *mut *mut ::IUnknown) -> ::HRESULT +} +); +RIDL!( +interface ISpeechObjectTokenCategory(ISpeechObjectTokenCategoryVtbl): IDispatch(IDispatchVtbl) { + fn get_Id(&mut self, Id: *mut ::BSTR) -> ::HRESULT, + fn put_Default(&mut self, TokenId: ::BSTR) -> ::HRESULT, + fn get_Default(&mut self, TokenId: *mut ::BSTR) -> ::HRESULT, + fn SetId(&mut self, Id: ::BSTR, CreateIfNotExist: ::VARIANT_BOOL) -> ::HRESULT, + fn GetDataKey( + &mut self, Location: SpeechDataKeyLocation, DataKey: *mut *mut ISpeechDataKey + ) -> ::HRESULT, + fn EnumerateTokens( + &mut self, RequiredAttributes: ::BSTR, OptionalAttributes: ::BSTR, + Tokens: *mut *mut ISpeechObjectTokens + ) -> ::HRESULT +} +); +RIDL!( +interface ISpeechAudioBufferInfo(ISpeechAudioBufferInfoVtbl): IDispatch(IDispatchVtbl) { + fn get_MinNotification(&mut self, MinNotification: *mut ::c_long) -> ::HRESULT, + fn put_MinNotification(&mut self, MinNotification: ::c_long) -> ::HRESULT, + fn get_BufferSize(&mut self, BufferSize: *mut ::c_long) -> ::HRESULT, + fn put_BufferSize(&mut self, BufferSize: ::c_long) -> ::HRESULT, + fn get_EventBias(&mut self, EventBias: *mut ::c_long) -> ::HRESULT, + fn put_EventBias(&mut self, EventBias: ::c_long) -> ::HRESULT +} +); +RIDL!( +interface ISpeechAudioStatus(ISpeechAudioStatusVtbl): IDispatch(IDispatchVtbl) { + fn get_FreeBufferSpace(&mut self, FreeBufferSpace: *mut ::c_long) -> ::HRESULT, + fn get_NonBlockingIO(&mut self, NonBlockingIO: *mut ::c_long) -> ::HRESULT, + fn get_State(&mut self, State: *mut SpeechAudioState) -> ::HRESULT, + fn get_CurrentSeekPosition(&mut self, CurrentSeekPosition: *mut ::VARIANT) -> ::HRESULT, + fn get_CurrentDevicePosition(&mut self, CurrentDevicePosition: *mut ::VARIANT) -> ::HRESULT +} +); +RIDL!( +interface ISpeechAudioFormat(ISpeechAudioFormatVtbl): IDispatch(IDispatchVtbl) { + fn get_Type(&mut self, AudioFormat: *mut SpeechAudioFormatType) -> ::HRESULT, + fn put_Type(&mut self, AudioFormat: SpeechAudioFormatType) -> ::HRESULT, + fn get_Guid(&mut self, Guid: *mut ::BSTR) -> ::HRESULT, + fn put_Guid(&mut self, Guid: ::BSTR) -> ::HRESULT, + fn GetWaveFormatEx(&mut self, SpeechWaveFormatEx: *mut *mut ISpeechWaveFormatEx) -> ::HRESULT, + fn SetWaveFormatEx(&mut self, SpeechWaveFormatEx: *mut ISpeechWaveFormatEx) -> ::HRESULT +} +); +RIDL!( +interface ISpeechWaveFormatEx(ISpeechWaveFormatExVtbl): IDispatch(IDispatchVtbl) { + fn get_FormatTag(&mut self, FormatTag: *mut ::c_short) -> ::HRESULT, + fn put_FormatTag(&mut self, FormatTag: ::c_short) -> ::HRESULT, + fn get_Channels(&mut self, Channels: *mut ::c_short) -> ::HRESULT, + fn put_Channels(&mut self, Channels: ::c_short) -> ::HRESULT, + fn get_SamplesPerSec(&mut self, SamplesPerSec: *mut ::c_long) -> ::HRESULT, + fn put_SamplesPerSec(&mut self, SamplesPerSec: ::c_long) -> ::HRESULT, + fn get_AvgBytesPerSec(&mut self, AvgBytesPerSec: *mut ::c_long) -> ::HRESULT, + fn put_AvgBytesPerSec(&mut self, AvgBytesPerSec: ::c_long) -> ::HRESULT, + fn get_BlockAlign(&mut self, BlockAlign: *mut ::c_short) -> ::HRESULT, + fn put_BlockAlign(&mut self, BlockAlign: ::c_short) -> ::HRESULT, + fn get_BitsPerSample(&mut self, BitsPerSample: *mut ::c_short) -> ::HRESULT, + fn put_BitsPerSample(&mut self, BitsPerSample: ::c_short) -> ::HRESULT, + fn get_ExtraData(&mut self, ExtraData: *mut ::VARIANT) -> ::HRESULT, + fn put_ExtraData(&mut self, ExtraData: ::VARIANT) -> ::HRESULT +} +); diff --git a/deps/winapi-0.2.6/src/schannel.rs b/deps/winapi-0.2.6/src/schannel.rs new file mode 100644 index 000000000..d57aec82f --- /dev/null +++ b/deps/winapi-0.2.6/src/schannel.rs @@ -0,0 +1,333 @@ +// Copyright © 2015, Peter Atashian +// Licensed under the MIT License <LICENSE.md> +//! Public Definitions for SCHANNEL Security Provider +pub const UNISP_NAME: &'static str = "Microsoft Unified Security Protocol Provider"; +pub const SSL2SP_NAME: &'static str = "Microsoft SSL 2.0"; +pub const SSL3SP_NAME: &'static str = "Microsoft SSL 3.0"; +pub const TLS1SP_NAME: &'static str = "Microsoft TLS 1.0"; +pub const PCT1SP_NAME: &'static str = "Microsoft PCT 1.0"; +pub const SCHANNEL_NAME: &'static str = "Schannel"; +ENUM!{enum eTlsSignatureAlgorithm { + TlsSignatureAlgorithm_Anonymous = 0, + TlsSignatureAlgorithm_Rsa = 1, + TlsSignatureAlgorithm_Dsa = 2, + TlsSignatureAlgorithm_Ecdsa = 3, +}} +ENUM!{enum eTlsHashAlgorithm { + TlsHashAlgorithm_None = 0, + TlsHashAlgorithm_Md5 = 1, + TlsHashAlgorithm_Sha1 = 2, + TlsHashAlgorithm_Sha224 = 3, + TlsHashAlgorithm_Sha256 = 4, + TlsHashAlgorithm_Sha384 = 5, + TlsHashAlgorithm_Sha512 = 6, +}} +pub const UNISP_RPC_ID: ::DWORD = 14; +STRUCT!{struct SecPkgContext_RemoteCredentialInfo { + cbCertificateChain: ::DWORD, + pbCertificateChain: ::PBYTE, + cCertificates: ::DWORD, + fFlags: ::DWORD, + dwBits: ::DWORD, +}} +pub type PSecPkgContext_RemoteCredentialInfo = *mut SecPkgContext_RemoteCredentialInfo; +pub type SecPkgContext_RemoteCredenitalInfo = SecPkgContext_RemoteCredentialInfo; +pub type PSecPkgContext_RemoteCredenitalInfo = *mut SecPkgContext_RemoteCredentialInfo; +pub const RCRED_STATUS_NOCRED: ::DWORD = 0x00000000; +pub const RCRED_CRED_EXISTS: ::DWORD = 0x00000001; +pub const RCRED_STATUS_UNKNOWN_ISSUER: ::DWORD = 0x00000002; +STRUCT!{struct SecPkgContext_LocalCredentialInfo { + cbCertificateChain: ::DWORD, + pbCertificateChain: ::PBYTE, + cCertificates: ::DWORD, + fFlags: ::DWORD, + dwBits: ::DWORD, +}} +pub type PSecPkgContext_LocalCredentialInfo = *mut SecPkgContext_LocalCredentialInfo; +pub type SecPkgContext_LocalCredenitalInfo = SecPkgContext_LocalCredentialInfo; +pub type PSecPkgContext_LocalCredenitalInfo = *mut SecPkgContext_LocalCredentialInfo; +pub const LCRED_STATUS_NOCRED: ::DWORD = 0x00000000; +pub const LCRED_CRED_EXISTS: ::DWORD = 0x00000001; +pub const LCRED_STATUS_UNKNOWN_ISSUER: ::DWORD = 0x00000002; +STRUCT!{struct SecPkgContext_ClientCertPolicyResult { + dwPolicyResult: ::HRESULT, + guidPolicyId: ::GUID, +}} +pub type PSecPkgContext_ClientCertPolicyResult = *mut SecPkgContext_ClientCertPolicyResult; +STRUCT!{struct SecPkgContext_IssuerListInfoEx { + aIssuers: ::PCERT_NAME_BLOB, + cIssuers: ::DWORD, +}} +pub type PSecPkgContext_IssuerListInfoEx = *mut SecPkgContext_IssuerListInfoEx; +STRUCT!{struct SecPkgContext_ConnectionInfo { + dwProtocol: ::DWORD, + aiCipher: ::ALG_ID, + dwCipherStrength: ::DWORD, + aiHash: ::ALG_ID, + dwHashStrength: ::DWORD, + aiExch: ::ALG_ID, + dwExchStrength: ::DWORD, +}} +pub type PSecPkgContext_ConnectionInfo = *mut SecPkgContext_ConnectionInfo; +pub const SZ_ALG_MAX_SIZE: usize = 64; +pub const SECPKGCONTEXT_CIPHERINFO_V1: ::DWORD = 1; +STRUCT!{nodebug struct SecPkgContext_CipherInfo { + dwVersion: ::DWORD, + dwProtocol: ::DWORD, + dwCipherSuite: ::DWORD, + dwBaseCipherSuite: ::DWORD, + szCipherSuite: [::WCHAR; SZ_ALG_MAX_SIZE], + szCipher: [::WCHAR; SZ_ALG_MAX_SIZE], + dwCipherLen: ::DWORD, + dwCipherBlockLen: ::DWORD, + szHash: [::WCHAR; SZ_ALG_MAX_SIZE], + dwHashLen: ::DWORD, + szExchange: [::WCHAR; SZ_ALG_MAX_SIZE], + dwMinExchangeLen: ::DWORD, + dwMaxExchangeLen: ::DWORD, + szCertificate: [::WCHAR; SZ_ALG_MAX_SIZE], + dwKeyType: ::DWORD, +}} +pub type PSecPkgContext_CipherInfo = *mut SecPkgContext_CipherInfo; +STRUCT!{nodebug struct SecPkgContext_EapKeyBlock { + rgbKeys: [::BYTE; 128], + rgbIVs: [::BYTE; 64], +}} +pub type PSecPkgContext_EapKeyBlock = *mut SecPkgContext_EapKeyBlock; +STRUCT!{struct SecPkgContext_MappedCredAttr { + dwAttribute: ::DWORD, + pvBuffer: ::PVOID, +}} +pub type PSecPkgContext_MappedCredAttr = *mut SecPkgContext_MappedCredAttr; +pub const SSL_SESSION_RECONNECT: ::DWORD = 1; +STRUCT!{struct SecPkgContext_SessionInfo { + dwFlags: ::DWORD, + cbSessionId: ::DWORD, + rgbSessionId: [::BYTE; 32], +}} +pub type PSecPkgContext_SessionInfo = *mut SecPkgContext_SessionInfo; +STRUCT!{struct SecPkgContext_SessionAppData { + dwFlags: ::DWORD, + cbAppData: ::DWORD, + pbAppData: ::PBYTE, +}} +pub type PSecPkgContext_SessionAppData = *mut SecPkgContext_SessionAppData; +STRUCT!{struct SecPkgContext_EapPrfInfo { + dwVersion: ::DWORD, + cbPrfData: ::DWORD, + pbPrfData: ::PBYTE, +}} +pub type PSecPkgContext_EapPrfInfo = *mut SecPkgContext_EapPrfInfo; +STRUCT!{struct SecPkgContext_SupportedSignatures { + cSignatureAndHashAlgorithms: ::WORD, + pSignatureAndHashAlgorithms: *mut ::WORD, +}} +pub type PSecPkgContext_SupportedSignatures = *mut SecPkgContext_SupportedSignatures; +STRUCT!{struct SecPkgContext_Certificates { + cCertificates: ::DWORD, + cbCertificateChain: ::DWORD, + pbCertificateChain: ::PBYTE, +}} +pub type PSecPkgContext_Certificates = *mut SecPkgContext_Certificates; +STRUCT!{struct SecPkgContext_CertInfo { + dwVersion: ::DWORD, + cbSubjectName: ::DWORD, + pwszSubjectName: ::LPWSTR, + cbIssuerName: ::DWORD, + pwszIssuerName: ::LPWSTR, + dwKeySize: ::DWORD, +}} +pub type PSecPkgContext_CertInfo = *mut SecPkgContext_CertInfo; +pub const KERN_CONTEXT_CERT_INFO_V1: ::DWORD = 0x00000000; +STRUCT!{struct SecPkgContext_UiInfo { + hParentWindow: ::HWND, +}} +pub type PSecPkgContext_UiInfo = *mut SecPkgContext_UiInfo; +STRUCT!{struct SecPkgContext_EarlyStart { + dwEarlyStartFlags: ::DWORD, +}} +pub type PSecPkgContext_EarlyStart = *mut SecPkgContext_EarlyStart; +pub const ENABLE_TLS_CLIENT_EARLY_START: ::DWORD = 0x00000001; +pub const SCH_CRED_V1: ::DWORD = 0x00000001; +pub const SCH_CRED_V2: ::DWORD = 0x00000002; +pub const SCH_CRED_VERSION: ::DWORD = 0x00000002; +pub const SCH_CRED_V3: ::DWORD = 0x00000003; +pub const SCHANNEL_CRED_VERSION: ::DWORD = 0x00000004; +pub enum _HMAPPER {} +STRUCT!{struct SCHANNEL_CRED { + dwVersion: ::DWORD, + cCreds: ::DWORD, + paCred: *mut ::PCCERT_CONTEXT, + hRootStore: ::HCERTSTORE, + cMappers: ::DWORD, + aphMappers: *mut *mut _HMAPPER, + cSupportedAlgs: ::DWORD, + palgSupportedAlgs: *mut ::ALG_ID, + grbitEnabledProtocols: ::DWORD, + dwMinimumCipherStrength: ::DWORD, + dwMaximumCipherStrength: ::DWORD, + dwSessionLifespan: ::DWORD, + dwFlags: ::DWORD, + dwCredFormat: ::DWORD, +}} +pub type PSCHANNEL_CRED = *mut SCHANNEL_CRED; +pub const SCH_CRED_FORMAT_CERT_CONTEXT: ::DWORD = 0x00000000; +pub const SCH_CRED_FORMAT_CERT_HASH: ::DWORD = 0x00000001; +pub const SCH_CRED_FORMAT_CERT_HASH_STORE: ::DWORD = 0x00000002; +pub const SCH_CRED_MAX_STORE_NAME_SIZE: usize = 128; +pub const SCH_CRED_MAX_SUPPORTED_ALGS: ::DWORD = 256; +pub const SCH_CRED_MAX_SUPPORTED_CERTS: ::DWORD = 100; +STRUCT!{struct SCHANNEL_CERT_HASH { + dwLength: ::DWORD, + dwFlags: ::DWORD, + hProv: ::HCRYPTPROV, + ShaHash: [::BYTE; 20], +}} +pub type PSCHANNEL_CERT_HASH = *mut SCHANNEL_CERT_HASH; +STRUCT!{nodebug struct SCHANNEL_CERT_HASH_STORE { + dwLength: ::DWORD, + dwFlags: ::DWORD, + hProv: ::HCRYPTPROV, + ShaHash: [::BYTE; 20], + pwszStoreName: [::WCHAR; SCH_CRED_MAX_STORE_NAME_SIZE], +}} +pub type PSCHANNEL_CERT_HASH_STORE = *mut SCHANNEL_CERT_HASH_STORE; +pub const SCH_MACHINE_CERT_HASH: ::DWORD = 0x00000001; +pub const SCH_CRED_NO_SYSTEM_MAPPER: ::DWORD = 0x00000002; +pub const SCH_CRED_NO_SERVERNAME_CHECK: ::DWORD = 0x00000004; +pub const SCH_CRED_MANUAL_CRED_VALIDATION: ::DWORD = 0x00000008; +pub const SCH_CRED_NO_DEFAULT_CREDS: ::DWORD = 0x00000010; +pub const SCH_CRED_AUTO_CRED_VALIDATION: ::DWORD = 0x00000020; +pub const SCH_CRED_USE_DEFAULT_CREDS: ::DWORD = 0x00000040; +pub const SCH_CRED_DISABLE_RECONNECTS: ::DWORD = 0x00000080; +pub const SCH_CRED_REVOCATION_CHECK_END_CERT: ::DWORD = 0x00000100; +pub const SCH_CRED_REVOCATION_CHECK_CHAIN: ::DWORD = 0x00000200; +pub const SCH_CRED_REVOCATION_CHECK_CHAIN_EXCLUDE_ROOT: ::DWORD = 0x00000400; +pub const SCH_CRED_IGNORE_NO_REVOCATION_CHECK: ::DWORD = 0x00000800; +pub const SCH_CRED_IGNORE_REVOCATION_OFFLINE: ::DWORD = 0x00001000; +pub const SCH_CRED_RESTRICTED_ROOTS: ::DWORD = 0x00002000; +pub const SCH_CRED_REVOCATION_CHECK_CACHE_ONLY: ::DWORD = 0x00004000; +pub const SCH_CRED_CACHE_ONLY_URL_RETRIEVAL: ::DWORD = 0x00008000; +pub const SCH_CRED_MEMORY_STORE_CERT: ::DWORD = 0x00010000; +pub const SCH_CRED_CACHE_ONLY_URL_RETRIEVAL_ON_CREATE: ::DWORD = 0x00020000; +pub const SCH_SEND_ROOT_CERT: ::DWORD = 0x00040000; +pub const SCH_CRED_SNI_CREDENTIAL: ::DWORD = 0x00080000; +pub const SCH_CRED_SNI_ENABLE_OCSP: ::DWORD = 0x00100000; +pub const SCH_SEND_AUX_RECORD: ::DWORD = 0x00200000; +pub const SCH_USE_STRONG_CRYPTO: ::DWORD = 0x00400000; +pub const SCHANNEL_RENEGOTIATE: ::DWORD = 0; +pub const SCHANNEL_SHUTDOWN: ::DWORD = 1; +pub const SCHANNEL_ALERT: ::DWORD = 2; +pub const SCHANNEL_SESSION: ::DWORD = 3; +STRUCT!{struct SCHANNEL_ALERT_TOKEN { + dwTokenType: ::DWORD, + dwAlertType: ::DWORD, + dwAlertNumber: ::DWORD, +}} +pub const TLS1_ALERT_WARNING: ::DWORD = 1; +pub const TLS1_ALERT_FATAL: ::DWORD = 2; +pub const TLS1_ALERT_CLOSE_NOTIFY: ::DWORD = 0; +pub const TLS1_ALERT_UNEXPECTED_MESSAGE: ::DWORD = 10; +pub const TLS1_ALERT_BAD_RECORD_MAC: ::DWORD = 20; +pub const TLS1_ALERT_DECRYPTION_FAILED: ::DWORD = 21; +pub const TLS1_ALERT_RECORD_OVERFLOW: ::DWORD = 22; +pub const TLS1_ALERT_DECOMPRESSION_FAIL: ::DWORD = 30; +pub const TLS1_ALERT_HANDSHAKE_FAILURE: ::DWORD = 40; +pub const TLS1_ALERT_BAD_CERTIFICATE: ::DWORD = 42; +pub const TLS1_ALERT_UNSUPPORTED_CERT: ::DWORD = 43; +pub const TLS1_ALERT_CERTIFICATE_REVOKED: ::DWORD = 44; +pub const TLS1_ALERT_CERTIFICATE_EXPIRED: ::DWORD = 45; +pub const TLS1_ALERT_CERTIFICATE_UNKNOWN: ::DWORD = 46; +pub const TLS1_ALERT_ILLEGAL_PARAMETER: ::DWORD = 47; +pub const TLS1_ALERT_UNKNOWN_CA: ::DWORD = 48; +pub const TLS1_ALERT_ACCESS_DENIED: ::DWORD = 49; +pub const TLS1_ALERT_DECODE_ERROR: ::DWORD = 50; +pub const TLS1_ALERT_DECRYPT_ERROR: ::DWORD = 51; +pub const TLS1_ALERT_EXPORT_RESTRICTION: ::DWORD = 60; +pub const TLS1_ALERT_PROTOCOL_VERSION: ::DWORD = 70; +pub const TLS1_ALERT_INSUFFIENT_SECURITY: ::DWORD = 71; +pub const TLS1_ALERT_INTERNAL_ERROR: ::DWORD = 80; +pub const TLS1_ALERT_USER_CANCELED: ::DWORD = 90; +pub const TLS1_ALERT_NO_RENEGOTIATION: ::DWORD = 100; +pub const TLS1_ALERT_UNSUPPORTED_EXT: ::DWORD = 110; +pub const TLS1_ALERT_NO_APP_PROTOCOL: ::DWORD = 120; +pub const SSL_SESSION_ENABLE_RECONNECTS: ::DWORD = 1; +pub const SSL_SESSION_DISABLE_RECONNECTS: ::DWORD = 2; +STRUCT!{struct SCHANNEL_SESSION_TOKEN { + dwTokenType: ::DWORD, + dwFlags: ::DWORD, +}} +STRUCT!{nodebug struct SCHANNEL_CLIENT_SIGNATURE { + cbLength: ::DWORD, + aiHash: ::ALG_ID, + cbHash: ::DWORD, + HashValue: [::BYTE; 36], + CertThumbprint: [::BYTE; 20], +}} +pub type PSCHANNEL_CLIENT_SIGNATURE = *mut SCHANNEL_CLIENT_SIGNATURE; +pub const SP_PROT_PCT1_SERVER: ::DWORD = 0x00000001; +pub const SP_PROT_PCT1_CLIENT: ::DWORD = 0x00000002; +pub const SP_PROT_PCT1: ::DWORD = SP_PROT_PCT1_SERVER | SP_PROT_PCT1_CLIENT; +pub const SP_PROT_SSL2_SERVER: ::DWORD = 0x00000004; +pub const SP_PROT_SSL2_CLIENT: ::DWORD = 0x00000008; +pub const SP_PROT_SSL2: ::DWORD = SP_PROT_SSL2_SERVER | SP_PROT_SSL2_CLIENT; +pub const SP_PROT_SSL3_SERVER: ::DWORD = 0x00000010; +pub const SP_PROT_SSL3_CLIENT: ::DWORD = 0x00000020; +pub const SP_PROT_SSL3: ::DWORD = SP_PROT_SSL3_SERVER | SP_PROT_SSL3_CLIENT; +pub const SP_PROT_TLS1_SERVER: ::DWORD = 0x00000040; +pub const SP_PROT_TLS1_CLIENT: ::DWORD = 0x00000080; +pub const SP_PROT_TLS1: ::DWORD = SP_PROT_TLS1_SERVER | SP_PROT_TLS1_CLIENT; +pub const SP_PROT_SSL3TLS1_CLIENTS: ::DWORD = SP_PROT_TLS1_CLIENT | SP_PROT_SSL3_CLIENT; +pub const SP_PROT_SSL3TLS1_SERVERS: ::DWORD = SP_PROT_TLS1_SERVER | SP_PROT_SSL3_SERVER; +pub const SP_PROT_SSL3TLS1: ::DWORD = SP_PROT_SSL3 | SP_PROT_TLS1; +pub const SP_PROT_UNI_SERVER: ::DWORD = 0x40000000; +pub const SP_PROT_UNI_CLIENT: ::DWORD = 0x80000000; +pub const SP_PROT_UNI: ::DWORD = SP_PROT_UNI_SERVER | SP_PROT_UNI_CLIENT; +pub const SP_PROT_ALL: ::DWORD = 0xffffffff; +pub const SP_PROT_NONE: ::DWORD = 0; +pub const SP_PROT_CLIENTS: ::DWORD = SP_PROT_PCT1_CLIENT | SP_PROT_SSL2_CLIENT + | SP_PROT_SSL3_CLIENT | SP_PROT_UNI_CLIENT | SP_PROT_TLS1_CLIENT; +pub const SP_PROT_SERVERS: ::DWORD = SP_PROT_PCT1_SERVER | SP_PROT_SSL2_SERVER + | SP_PROT_SSL3_SERVER | SP_PROT_UNI_SERVER | SP_PROT_TLS1_SERVER; +pub const SP_PROT_TLS1_0_SERVER: ::DWORD = SP_PROT_TLS1_SERVER; +pub const SP_PROT_TLS1_0_CLIENT: ::DWORD = SP_PROT_TLS1_CLIENT; +pub const SP_PROT_TLS1_0: ::DWORD = SP_PROT_TLS1_0_SERVER | SP_PROT_TLS1_0_CLIENT; +pub const SP_PROT_TLS1_1_SERVER: ::DWORD = 0x00000100; +pub const SP_PROT_TLS1_1_CLIENT: ::DWORD = 0x00000200; +pub const SP_PROT_TLS1_1: ::DWORD = SP_PROT_TLS1_1_SERVER | SP_PROT_TLS1_1_CLIENT; +pub const SP_PROT_TLS1_2_SERVER: ::DWORD = 0x00000400; +pub const SP_PROT_TLS1_2_CLIENT: ::DWORD = 0x00000800; +pub const SP_PROT_TLS1_2: ::DWORD = SP_PROT_TLS1_2_SERVER | SP_PROT_TLS1_2_CLIENT; +pub const SP_PROT_DTLS_SERVER: ::DWORD = 0x00010000; +pub const SP_PROT_DTLS_CLIENT: ::DWORD = 0x00020000; +pub const SP_PROT_DTLS: ::DWORD = SP_PROT_DTLS_SERVER | SP_PROT_DTLS_CLIENT; +pub const SP_PROT_DTLS1_0_SERVER: ::DWORD = SP_PROT_DTLS_SERVER; +pub const SP_PROT_DTLS1_0_CLIENT: ::DWORD = SP_PROT_DTLS_CLIENT; +pub const SP_PROT_DTLS1_0: ::DWORD = SP_PROT_DTLS1_0_SERVER | SP_PROT_DTLS1_0_CLIENT; +pub const SP_PROT_DTLS1_X_SERVER: ::DWORD = SP_PROT_DTLS1_0_SERVER; +pub const SP_PROT_DTLS1_X_CLIENT: ::DWORD = SP_PROT_DTLS1_0_CLIENT; +pub const SP_PROT_DTLS1_X: ::DWORD = SP_PROT_DTLS1_X_SERVER | SP_PROT_DTLS1_X_CLIENT; +pub const SP_PROT_TLS1_1PLUS_SERVER: ::DWORD = SP_PROT_TLS1_1_SERVER | SP_PROT_TLS1_2_SERVER; +pub const SP_PROT_TLS1_1PLUS_CLIENT: ::DWORD = SP_PROT_TLS1_1_CLIENT | SP_PROT_TLS1_2_CLIENT; +pub const SP_PROT_TLS1_1PLUS: ::DWORD = SP_PROT_TLS1_1PLUS_SERVER | SP_PROT_TLS1_1PLUS_CLIENT; +pub const SP_PROT_TLS1_X_SERVER: ::DWORD = SP_PROT_TLS1_0_SERVER | SP_PROT_TLS1_1_SERVER + | SP_PROT_TLS1_2_SERVER; +pub const SP_PROT_TLS1_X_CLIENT: ::DWORD = SP_PROT_TLS1_0_CLIENT | SP_PROT_TLS1_1_CLIENT + | SP_PROT_TLS1_2_CLIENT; +pub const SP_PROT_TLS1_X: ::DWORD = SP_PROT_TLS1_X_SERVER | SP_PROT_TLS1_X_CLIENT; +pub const SP_PROT_SSL3TLS1_X_CLIENTS: ::DWORD = SP_PROT_TLS1_X_CLIENT | SP_PROT_SSL3_CLIENT; +pub const SP_PROT_SSL3TLS1_X_SERVERS: ::DWORD = SP_PROT_TLS1_X_SERVER | SP_PROT_SSL3_SERVER; +pub const SP_PROT_SSL3TLS1_X: ::DWORD = SP_PROT_SSL3 | SP_PROT_TLS1_X; +pub const SP_PROT_X_CLIENTS: ::DWORD = SP_PROT_CLIENTS | SP_PROT_TLS1_X_CLIENT + | SP_PROT_DTLS1_X_CLIENT; +pub const SP_PROT_X_SERVERS: ::DWORD = SP_PROT_SERVERS | SP_PROT_TLS1_X_SERVER + | SP_PROT_DTLS1_X_SERVER; +//716 +pub const SCHANNEL_SECRET_TYPE_CAPI: ::DWORD = 0x00000001; +pub const SCHANNEL_SECRET_PRIVKEY: ::DWORD = 0x00000002; +pub const SCH_CRED_X509_CERTCHAIN: ::DWORD = 0x00000001; +pub const SCH_CRED_X509_CAPI: ::DWORD = 0x00000002; +pub const SCH_CRED_CERT_CONTEXT: ::DWORD = 0x00000003; +//838 +pub const SSL_CRACK_CERTIFICATE_NAME: &'static str = "SslCrackCertificate"; +pub const SSL_FREE_CERTIFICATE_NAME: &'static str = "SslFreeCertificate"; diff --git a/deps/winapi-0.2.5/src/servprov.rs b/deps/winapi-0.2.6/src/servprov.rs similarity index 100% rename from deps/winapi-0.2.5/src/servprov.rs rename to deps/winapi-0.2.6/src/servprov.rs diff --git a/deps/winapi-0.2.6/src/setupapi.rs b/deps/winapi-0.2.6/src/setupapi.rs new file mode 100644 index 000000000..fc5cca592 --- /dev/null +++ b/deps/winapi-0.2.6/src/setupapi.rs @@ -0,0 +1,1301 @@ +// Copyright © 2015, skdltmxn +// Licensed under the MIT License <LICENSE.md> +//! Windows NT Setup and Device Installer services +pub const LINE_LEN: usize = 256; +pub const MAX_INF_STRING_LENGTH: usize = 4096; +pub const MAX_INF_SECTION_NAME_LENGTH: usize = 255; +pub const MAX_TITLE_LEN: usize = 60; +pub const MAX_INSTRUCTION_LEN: usize = 256; +pub const MAX_LABEL_LEN: usize = 30; +pub const MAX_SERVICE_NAME_LEN: usize = 256; +pub const MAX_SUBTITLE_LEN: usize = 256; +pub const SP_MAX_MACHINENAME_LENGTH: usize = ::MAX_PATH + 3; +pub type HINF = ::PVOID; +STRUCT!{struct INFCONTEXT { + Inf: ::PVOID, + CurrentInf: ::PVOID, + Section: ::UINT, + Line: ::UINT, +}} +pub type PINFCONTEXT = *mut INFCONTEXT; +STRUCT!{struct SP_INF_INFORMATION { + InfStyle: ::DWORD, + InfCount: ::DWORD, + VersionData: [::BYTE; ::ANYSIZE_ARRAY], +}} +pub type PSP_INF_INFORMATION = *mut SP_INF_INFORMATION; +STRUCT!{struct SP_ALTPLATFORM_INFO_V2 { + cbSize: ::DWORD, + Platform: ::DWORD, + MajorVersion: ::DWORD, + MinorVersion: ::DWORD, + ProcessorArchitecture: ::WORD, + Reserved: ::WORD, + FirstValidatedMajorVersion: ::DWORD, + FirstValidatedMinorVersion: ::DWORD, +}} +UNION!(SP_ALTPLATFORM_INFO_V2, Reserved, Flags, Flags_mut, ::WORD); +pub type PSP_ALTPLATFORM_INFO_V2 = *mut SP_ALTPLATFORM_INFO_V2; +STRUCT!{struct SP_ALTPLATFORM_INFO_V1 { + cbSize: ::DWORD, + Platform: ::DWORD, + MajorVersion: ::DWORD, + MinorVersion: ::DWORD, + ProcessorArchitecture: ::WORD, + Reserved: ::WORD, +}} +pub type PSP_ALTPLATFORM_INFO_V1 = *mut SP_ALTPLATFORM_INFO_V1; +pub type SP_ALTPLATFORM_INFO = SP_ALTPLATFORM_INFO_V2; +pub type PSP_ALTPLATFORM_INFO = PSP_ALTPLATFORM_INFO_V2; +pub const SP_ALTPLATFORM_FLAGS_VERSION_RANGE: ::WORD = 0x0001; +STRUCT!{nodebug struct SP_ORIGINAL_FILE_INFO_A { + cbSize: ::DWORD, + OriginalInfName: [::CHAR; ::MAX_PATH], + OriginalCatalogName: [::CHAR; ::MAX_PATH], +}} +pub type PSP_ORIGINAL_FILE_INFO_A = *mut SP_ORIGINAL_FILE_INFO_A; +STRUCT!{nodebug struct SP_ORIGINAL_FILE_INFO_W { + cbSize: ::DWORD, + OriginalInfName: [::WCHAR; ::MAX_PATH], + OriginalCatalogName: [::WCHAR; ::MAX_PATH], +}} +pub type PSP_ORIGINAL_FILE_INFO_W = *mut SP_ORIGINAL_FILE_INFO_W; +pub const INF_STYLE_NONE: ::DWORD = 0x00000000; +pub const INF_STYLE_OLDNT: ::DWORD = 0x00000001; +pub const INF_STYLE_WIN4: ::DWORD = 0x00000002; +pub const INF_STYLE_CACHE_ENABLE: ::DWORD = 0x00000010; +pub const INF_STYLE_CACHE_DISABLE: ::DWORD = 0x00000020; +pub const INF_STYLE_CACHE_IGNORE: ::DWORD = 0x00000040; +pub const DIRID_ABSOLUTE: ::DWORD = 0 - 1; +pub const DIRID_ABSOLUTE_16BIT: ::DWORD = 0xffff; +pub const DIRID_NULL: ::DWORD = 0; +pub const DIRID_SRCPATH: ::DWORD = 1; +pub const DIRID_WINDOWS: ::DWORD = 10; +pub const DIRID_SYSTEM: ::DWORD = 11; +pub const DIRID_DRIVERS: ::DWORD = 12; +pub const DIRID_IOSUBSYS: ::DWORD = DIRID_DRIVERS; +pub const DIRID_DRIVER_STORE: ::DWORD = 13; +pub const DIRID_INF: ::DWORD = 17; +pub const DIRID_HELP: ::DWORD = 18; +pub const DIRID_FONTS: ::DWORD = 20; +pub const DIRID_VIEWERS: ::DWORD = 21; +pub const DIRID_COLOR: ::DWORD = 23; +pub const DIRID_APPS: ::DWORD = 24; +pub const DIRID_SHARED: ::DWORD = 25; +pub const DIRID_BOOT: ::DWORD = 30; +pub const DIRID_SYSTEM16: ::DWORD = 50; +pub const DIRID_SPOOL: ::DWORD = 51; +pub const DIRID_SPOOLDRIVERS: ::DWORD = 52; +pub const DIRID_USERPROFILE: ::DWORD = 53; +pub const DIRID_LOADER: ::DWORD = 54; +pub const DIRID_PRINTPROCESSOR: ::DWORD = 55; +pub const DIRID_DEFAULT: ::DWORD = DIRID_SYSTEM; +pub const DIRID_COMMON_STARTMENU: ::DWORD = 16406; +pub const DIRID_COMMON_PROGRAMS: ::DWORD = 16407; +pub const DIRID_COMMON_STARTUP: ::DWORD = 16408; +pub const DIRID_COMMON_DESKTOPDIRECTORY: ::DWORD = 16409; +pub const DIRID_COMMON_FAVORITES: ::DWORD = 16415; +pub const DIRID_COMMON_APPDATA: ::DWORD = 16419; +pub const DIRID_PROGRAM_FILES: ::DWORD = 16422; +pub const DIRID_SYSTEM_X86: ::DWORD = 16425; +pub const DIRID_PROGRAM_FILES_X86: ::DWORD = 16426; +pub const DIRID_PROGRAM_FILES_COMMON: ::DWORD = 16427; +pub const DIRID_PROGRAM_FILES_COMMONX86: ::DWORD = 16428; +pub const DIRID_COMMON_TEMPLATES: ::DWORD = 16429; +pub const DIRID_COMMON_DOCUMENTS: ::DWORD = 16430; +pub const DIRID_USER: ::DWORD = 0x8000; +pub type PSP_FILE_CALLBACK_A = Option<unsafe extern "system" fn( + Context: ::PVOID, Notification: ::UINT, Param1: ::UINT_PTR, Param2: ::UINT_PTR, +) -> ::UINT>; +pub type PSP_FILE_CALLBACK_W = Option<unsafe extern "system" fn( + Context: ::PVOID, Notification: ::UINT, Param1: ::UINT_PTR, Param2: ::UINT_PTR, +) -> ::UINT>; +pub const SPFILENOTIFY_STARTQUEUE: ::UINT = 0x00000001; +pub const SPFILENOTIFY_ENDQUEUE: ::UINT = 0x00000002; +pub const SPFILENOTIFY_STARTSUBQUEUE: ::UINT = 0x00000003; +pub const SPFILENOTIFY_ENDSUBQUEUE: ::UINT = 0x00000004; +pub const SPFILENOTIFY_STARTDELETE: ::UINT = 0x00000005; +pub const SPFILENOTIFY_ENDDELETE: ::UINT = 0x00000006; +pub const SPFILENOTIFY_DELETEERROR: ::UINT = 0x00000007; +pub const SPFILENOTIFY_STARTRENAME: ::UINT = 0x00000008; +pub const SPFILENOTIFY_ENDRENAME: ::UINT = 0x00000009; +pub const SPFILENOTIFY_RENAMEERROR: ::UINT = 0x0000000a; +pub const SPFILENOTIFY_STARTCOPY: ::UINT = 0x0000000b; +pub const SPFILENOTIFY_ENDCOPY: ::UINT = 0x0000000c; +pub const SPFILENOTIFY_COPYERROR: ::UINT = 0x0000000d; +pub const SPFILENOTIFY_NEEDMEDIA: ::UINT = 0x0000000e; +pub const SPFILENOTIFY_QUEUESCAN: ::UINT = 0x0000000f; +pub const SPFILENOTIFY_CABINETINFO: ::UINT = 0x00000010; +pub const SPFILENOTIFY_FILEINCABINET: ::UINT = 0x00000011; +pub const SPFILENOTIFY_NEEDNEWCABINET: ::UINT = 0x00000012; +pub const SPFILENOTIFY_FILEEXTRACTED: ::UINT = 0x00000013; +pub const SPFILENOTIFY_FILEOPDELAYED: ::UINT = 0x00000014; +pub const SPFILENOTIFY_STARTBACKUP: ::UINT = 0x00000015; +pub const SPFILENOTIFY_BACKUPERROR: ::UINT = 0x00000016; +pub const SPFILENOTIFY_ENDBACKUP: ::UINT = 0x00000017; +pub const SPFILENOTIFY_QUEUESCAN_EX: ::UINT = 0x00000018; +pub const SPFILENOTIFY_STARTREGISTRATION: ::UINT = 0x00000019; +pub const SPFILENOTIFY_ENDREGISTRATION: ::UINT = 0x00000020; +pub const SPFILENOTIFY_QUEUESCAN_SIGNERINFO: ::UINT = 0x00000040; +pub const SPFILENOTIFY_LANGMISMATCH: ::UINT = 0x00010000; +pub const SPFILENOTIFY_TARGETEXISTS: ::UINT = 0x00020000; +pub const SPFILENOTIFY_TARGETNEWER: ::UINT = 0x00040000; +pub const FILEOP_COPY: ::UINT = 0; +pub const FILEOP_RENAME: ::UINT = 1; +pub const FILEOP_DELETE: ::UINT = 2; +pub const FILEOP_BACKUP: ::UINT = 3; +pub const FILEOP_ABORT: ::UINT = 0; +pub const FILEOP_DOIT: ::UINT = 1; +pub const FILEOP_SKIP: ::UINT = 2; +pub const FILEOP_RETRY: ::UINT = FILEOP_DOIT; +pub const FILEOP_NEWPATH: ::UINT = 4; +pub const COPYFLG_WARN_IF_SKIP: ::UINT = 0x00000001; +pub const COPYFLG_NOSKIP: ::UINT = 0x00000002; +pub const COPYFLG_NOVERSIONCHECK: ::UINT = 0x00000004; +pub const COPYFLG_FORCE_FILE_IN_USE: ::UINT = 0x00000008; +pub const COPYFLG_NO_OVERWRITE: ::UINT = 0x00000010; +pub const COPYFLG_NO_VERSION_DIALOG: ::UINT = 0x00000020; +pub const COPYFLG_OVERWRITE_OLDER_ONLY: ::UINT = 0x00000040; +pub const COPYFLG_PROTECTED_WINDOWS_DRIVER_FILE: ::UINT = 0x00000100; +pub const COPYFLG_REPLACEONLY: ::UINT = 0x00000400; +pub const COPYFLG_NODECOMP: ::UINT = 0x00000800; +pub const COPYFLG_REPLACE_BOOT_FILE: ::UINT = 0x00001000; +pub const COPYFLG_NOPRUNE: ::UINT = 0x00002000; +pub const COPYFLG_IN_USE_TRY_RENAME: ::UINT = 0x00004000; +pub const DELFLG_IN_USE: ::UINT = 0x00000001; +pub const DELFLG_IN_USE1: ::UINT = 0x00010000; +STRUCT!{struct FILEPATHS_A { + Target: ::PCSTR, + Source: ::PCSTR, + Win32Error: ::UINT, + Flags: ::DWORD, +}} +pub type PFILEPATHS_A = *mut FILEPATHS_A; +STRUCT!{struct FILEPATHS_W { + Target: ::PCWSTR, + Source: ::PCWSTR, + Win32Error: ::UINT, + Flags: ::DWORD, +}} +pub type PFILEPATHS_W = *mut FILEPATHS_W; +STRUCT!{struct FILEPATHS_SIGNERINFO_A { + Target: ::PCSTR, + Source: ::PCSTR, + Win32Error: ::UINT, + Flags: ::DWORD, + DigitalSigner: ::PCSTR, + Version: ::PCSTR, + CatalogFile: ::PCSTR, +}} +pub type PFILEPATHS_SIGNERINFO_A = *mut FILEPATHS_SIGNERINFO_A; +STRUCT!{struct FILEPATHS_SIGNERINFO_W { + Target: ::PCWSTR, + Source: ::PCWSTR, + Win32Error: ::UINT, + Flags: ::DWORD, + DigitalSigner: ::PCWSTR, + Version: ::PCWSTR, + CatalogFile: ::PCWSTR, +}} +pub type PFILEPATHS_SIGNERINFO_W = *mut FILEPATHS_SIGNERINFO_W; +STRUCT!{struct SOURCE_MEDIA_A { + Reserved: ::PCSTR, + Tagfile: ::PCSTR, + Description: ::PCSTR, + SourcePath: ::PCSTR, + SourceFile: ::PCSTR, + Flags: ::DWORD, +}} +pub type PSOURCE_MEDIA_A = *mut SOURCE_MEDIA_A; +STRUCT!{struct SOURCE_MEDIA_W { + Reserved: ::PCWSTR, + Tagfile: ::PCWSTR, + Description: ::PCWSTR, + SourcePath: ::PCWSTR, + SourceFile: ::PCWSTR, + Flags: ::DWORD, +}} +pub type PSOURCE_MEDIA_W = *mut SOURCE_MEDIA_W; +STRUCT!{struct CABINET_INFO_A { + CabinetPath: ::PCSTR, + CabinetFile: ::PCSTR, + DiskName: ::PCSTR, + SetId: ::USHORT, + CabinetNumber: ::USHORT, +}} +pub type PCABINET_INFO_A = *mut CABINET_INFO_A; +STRUCT!{struct CABINET_INFO_W { + CabinetPath: ::PCWSTR, + CabinetFile: ::PCWSTR, + DiskName: ::PCWSTR, + SetId: ::USHORT, + CabinetNumber: ::USHORT, +}} +pub type PCABINET_INFO_W = *mut CABINET_INFO_W; +STRUCT!{nodebug struct FILE_IN_CABINET_INFO_A { + NameInCabinet: ::PCSTR, + FileSize: ::DWORD, + Win32Error: ::DWORD, + DosDate: ::WORD, + DosTime: ::WORD, + DosAttribs: ::WORD, + FullTargetName: [::CHAR; ::MAX_PATH], +}} +pub type PFILE_IN_CABINET_INFO_A = *mut FILE_IN_CABINET_INFO_A; +STRUCT!{nodebug struct FILE_IN_CABINET_INFO_W { + NameInCabinet: ::PCWSTR, + FileSize: ::DWORD, + Win32Error: ::DWORD, + DosDate: ::WORD, + DosTime: ::WORD, + DosAttribs: ::WORD, + FullTargetName: [::WCHAR; ::MAX_PATH], +}} +pub type PFILE_IN_CABINET_INFO_W = *mut FILE_IN_CABINET_INFO_W; +STRUCT!{struct SP_REGISTER_CONTROL_STATUSA { + cbSize: ::DWORD, + FileName: ::PCSTR, + Win32Error: ::DWORD, + FailureCode: ::DWORD, +}} +pub type PSP_REGISTER_CONTROL_STATUSA = *mut SP_REGISTER_CONTROL_STATUSA; +STRUCT!{struct SP_REGISTER_CONTROL_STATUSW { + cbSize: ::DWORD, + FileName: ::PCWSTR, + Win32Error: ::DWORD, + FailureCode: ::DWORD, +}} +pub type PSP_REGISTER_CONTROL_STATUSW = *mut SP_REGISTER_CONTROL_STATUSW; +pub const SPREG_SUCCESS: ::DWORD = 0x00000000; +pub const SPREG_LOADLIBRARY: ::DWORD = 0x00000001; +pub const SPREG_GETPROCADDR: ::DWORD = 0x00000002; +pub const SPREG_REGSVR: ::DWORD = 0x00000003; +pub const SPREG_DLLINSTALL: ::DWORD = 0x00000004; +pub const SPREG_TIMEOUT: ::DWORD = 0x00000005; +pub const SPREG_UNKNOWN: ::DWORD = 0xFFFFFFFF; +pub type HSPFILEQ = ::PVOID; +STRUCT!{struct SP_FILE_COPY_PARAMS_A { + cbSize: ::DWORD, + QueueHandle: HSPFILEQ, + SourceRootPath: ::PCSTR, + SourcePath: ::PCSTR, + SourceFilename: ::PCSTR, + SourceDescription: ::PCSTR, + SourceTagfile: ::PCSTR, + TargetDirectory: ::PCSTR, + TargetFilename: ::PCSTR, + CopyStyle: ::DWORD, + LayoutInf: HINF, + SecurityDescriptor: ::PCSTR, +}} +pub type PSP_FILE_COPY_PARAMS_A = *mut SP_FILE_COPY_PARAMS_A; +STRUCT!{struct SP_FILE_COPY_PARAMS_W { + cbSize: ::DWORD, + QueueHandle: HSPFILEQ, + SourceRootPath: ::PCWSTR, + SourcePath: ::PCWSTR, + SourceFilename: ::PCWSTR, + SourceDescription: ::PCWSTR, + SourceTagfile: ::PCWSTR, + TargetDirectory: ::PCWSTR, + TargetFilename: ::PCWSTR, + CopyStyle: ::DWORD, + LayoutInf: HINF, + SecurityDescriptor: ::PCWSTR, +}} +pub type PSP_FILE_COPY_PARAMS_W = *mut SP_FILE_COPY_PARAMS_W; +pub type HDSKSPC = ::PVOID; +pub type HDEVINFO = ::PVOID; +STRUCT!{struct SP_DEVINFO_DATA { + cbSize: ::DWORD, + ClassGuid: ::GUID, + DevInst: ::DWORD, + Reserved: ::ULONG_PTR, +}} +pub type PSP_DEVINFO_DATA = *mut SP_DEVINFO_DATA; +STRUCT!{struct SP_DEVICE_INTERFACE_DATA { + cbSize: ::DWORD, + InterfaceClassGuid: ::GUID, + Flags: ::DWORD, + Reserved: ::ULONG_PTR, +}} +pub type PSP_DEVICE_INTERFACE_DATA = *mut SP_DEVICE_INTERFACE_DATA; +pub const SPINT_ACTIVE: ::DWORD = 0x00000001; +pub const SPINT_DEFAULT: ::DWORD = 0x00000002; +pub const SPINT_REMOVED: ::DWORD = 0x00000004; +pub type SP_INTERFACE_DEVICE_DATA = SP_DEVICE_INTERFACE_DATA; +pub type PSP_INTERFACE_DEVICE_DATA = PSP_DEVICE_INTERFACE_DATA; +pub const SPID_ACTIVE: ::DWORD = SPINT_ACTIVE; +pub const SPID_DEFAULT: ::DWORD = SPINT_DEFAULT; +pub const SPID_REMOVED: ::DWORD = SPINT_REMOVED; +STRUCT!{struct SP_DEVICE_INTERFACE_DETAIL_DATA_A { + cbSize: ::DWORD, + DevicePath: [::CHAR; ::ANYSIZE_ARRAY], +}} +pub type PSP_DEVICE_INTERFACE_DETAIL_DATA_A = *mut SP_DEVICE_INTERFACE_DETAIL_DATA_A; +STRUCT!{struct SP_DEVICE_INTERFACE_DETAIL_DATA_W { + cbSize: ::DWORD, + DevicePath: [::WCHAR; ::ANYSIZE_ARRAY], +}} +pub type PSP_DEVICE_INTERFACE_DETAIL_DATA_W = *mut SP_DEVICE_INTERFACE_DETAIL_DATA_W; +STRUCT!{nodebug struct SP_DEVINFO_LIST_DETAIL_DATA_A { + cbSize: ::DWORD, + ClassGuid: ::GUID, + RemoteMachineHandle: ::HANDLE, + RemoteMachineName: [::CHAR; SP_MAX_MACHINENAME_LENGTH], +}} +pub type PSP_DEVINFO_LIST_DETAIL_DATA_A = *mut SP_DEVINFO_LIST_DETAIL_DATA_A; +STRUCT!{nodebug struct SP_DEVINFO_LIST_DETAIL_DATA_W { + cbSize: ::DWORD, + ClassGuid: ::GUID, + RemoteMachineHandle: ::HANDLE, + RemoteMachineName: [::WCHAR; SP_MAX_MACHINENAME_LENGTH], +}} +pub type PSP_DEVINFO_LIST_DETAIL_DATA_W = *mut SP_DEVINFO_LIST_DETAIL_DATA_W; +pub const DIF_SELECTDEVICE: DI_FUNCTION = 0x00000001; +pub const DIF_INSTALLDEVICE: DI_FUNCTION = 0x00000002; +pub const DIF_ASSIGNRESOURCES: DI_FUNCTION = 0x00000003; +pub const DIF_PROPERTIES: DI_FUNCTION = 0x00000004; +pub const DIF_REMOVE: DI_FUNCTION = 0x00000005; +pub const DIF_FIRSTTIMESETUP: DI_FUNCTION = 0x00000006; +pub const DIF_FOUNDDEVICE: DI_FUNCTION = 0x00000007; +pub const DIF_SELECTCLASSDRIVERS: DI_FUNCTION = 0x00000008; +pub const DIF_VALIDATECLASSDRIVERS: DI_FUNCTION = 0x00000009; +pub const DIF_INSTALLCLASSDRIVERS: DI_FUNCTION = 0x0000000A; +pub const DIF_CALCDISKSPACE: DI_FUNCTION = 0x0000000B; +pub const DIF_DESTROYPRIVATEDATA: DI_FUNCTION = 0x0000000C; +pub const DIF_VALIDATEDRIVER: DI_FUNCTION = 0x0000000D; +pub const DIF_DETECT: DI_FUNCTION = 0x0000000F; +pub const DIF_INSTALLWIZARD: DI_FUNCTION = 0x00000010; +pub const DIF_DESTROYWIZARDDATA: DI_FUNCTION = 0x00000011; +pub const DIF_PROPERTYCHANGE: DI_FUNCTION = 0x00000012; +pub const DIF_ENABLECLASS: DI_FUNCTION = 0x00000013; +pub const DIF_DETECTVERIFY: DI_FUNCTION = 0x00000014; +pub const DIF_INSTALLDEVICEFILES: DI_FUNCTION = 0x00000015; +pub const DIF_UNREMOVE: DI_FUNCTION = 0x00000016; +pub const DIF_SELECTBESTCOMPATDRV: DI_FUNCTION = 0x00000017; +pub const DIF_ALLOW_INSTALL: DI_FUNCTION = 0x00000018; +pub const DIF_REGISTERDEVICE: DI_FUNCTION = 0x00000019; +pub const DIF_NEWDEVICEWIZARD_PRESELECT: DI_FUNCTION = 0x0000001A; +pub const DIF_NEWDEVICEWIZARD_SELECT: DI_FUNCTION = 0x0000001B; +pub const DIF_NEWDEVICEWIZARD_PREANALYZE: DI_FUNCTION = 0x0000001C; +pub const DIF_NEWDEVICEWIZARD_POSTANALYZE: DI_FUNCTION = 0x0000001D; +pub const DIF_NEWDEVICEWIZARD_FINISHINSTALL: DI_FUNCTION = 0x0000001E; +pub const DIF_UNUSED1: DI_FUNCTION = 0x0000001F; +pub const DIF_INSTALLINTERFACES: DI_FUNCTION = 0x00000020; +pub const DIF_DETECTCANCEL: DI_FUNCTION = 0x00000021; +pub const DIF_REGISTER_COINSTALLERS: DI_FUNCTION = 0x00000022; +pub const DIF_ADDPROPERTYPAGE_ADVANCED: DI_FUNCTION = 0x00000023; +pub const DIF_ADDPROPERTYPAGE_BASIC: DI_FUNCTION = 0x00000024; +pub const DIF_RESERVED1: DI_FUNCTION = 0x00000025; +pub const DIF_TROUBLESHOOTER: DI_FUNCTION = 0x00000026; +pub const DIF_POWERMESSAGEWAKE: DI_FUNCTION = 0x00000027; +pub const DIF_ADDREMOTEPROPERTYPAGE_ADVANCED: DI_FUNCTION = 0x00000028; +pub const DIF_UPDATEDRIVER_UI: DI_FUNCTION = 0x00000029; +pub const DIF_FINISHINSTALL_ACTION: DI_FUNCTION = 0x0000002A; +pub const DIF_RESERVED2: DI_FUNCTION = 0x00000030; +pub const DIF_MOVEDEVICE: DI_FUNCTION = 0x0000000E; +pub type DI_FUNCTION = ::UINT; +STRUCT!{nodebug struct SP_DEVINSTALL_PARAMS_A { + cbSize: ::DWORD, + Flags: ::DWORD, + FlagsEx: ::DWORD, + hwndParent: ::HWND, + InstallMsgHandler: PSP_FILE_CALLBACK_A, + InstallMsgHandlerContext: ::PVOID, + FileQueue: HSPFILEQ, + ClassInstallReserved: ::ULONG_PTR, + Reserved: ::DWORD, + DriverPath: [::CHAR; ::MAX_PATH], +}} +pub type PSP_DEVINSTALL_PARAMS_A = *mut SP_DEVINSTALL_PARAMS_A; +STRUCT!{nodebug struct SP_DEVINSTALL_PARAMS_W { + cbSize: ::DWORD, + Flags: ::DWORD, + FlagsEx: ::DWORD, + hwndParent: ::HWND, + InstallMsgHandler: PSP_FILE_CALLBACK_W, + InstallMsgHandlerContext: ::PVOID, + FileQueue: HSPFILEQ, + ClassInstallReserved: ::ULONG_PTR, + Reserved: ::DWORD, + DriverPath: [::WCHAR; ::MAX_PATH], +}} +pub type PSP_DEVINSTALL_PARAMS_W = *mut SP_DEVINSTALL_PARAMS_W; +pub const DI_SHOWOEM: ::DWORD = 0x00000001; +pub const DI_SHOWCOMPAT: ::DWORD = 0x00000002; +pub const DI_SHOWCLASS: ::DWORD = 0x00000004; +pub const DI_SHOWALL: ::DWORD = 0x00000007; +pub const DI_NOVCP: ::DWORD = 0x00000008; +pub const DI_DIDCOMPAT: ::DWORD = 0x00000010; +pub const DI_DIDCLASS: ::DWORD = 0x00000020; +pub const DI_AUTOASSIGNRES: ::DWORD = 0x00000040; +pub const DI_NEEDRESTART: ::DWORD = 0x00000080; +pub const DI_NEEDREBOOT: ::DWORD = 0x00000100; +pub const DI_NOBROWSE: ::DWORD = 0x00000200; +pub const DI_MULTMFGS: ::DWORD = 0x00000400; +pub const DI_DISABLED: ::DWORD = 0x00000800; +pub const DI_GENERALPAGE_ADDED: ::DWORD = 0x00001000; +pub const DI_RESOURCEPAGE_ADDED: ::DWORD = 0x00002000; +pub const DI_PROPERTIES_CHANGE: ::DWORD = 0x00004000; +pub const DI_INF_IS_SORTED: ::DWORD = 0x00008000; +pub const DI_ENUMSINGLEINF: ::DWORD = 0x00010000; +pub const DI_DONOTCALLCONFIGMG: ::DWORD = 0x00020000; +pub const DI_INSTALLDISABLED: ::DWORD = 0x00040000; +pub const DI_COMPAT_FROM_CLASS: ::DWORD = 0x00080000; +pub const DI_CLASSINSTALLPARAMS: ::DWORD = 0x00100000; +pub const DI_NODI_DEFAULTACTION: ::DWORD = 0x00200000; +pub const DI_QUIETINSTALL: ::DWORD = 0x00800000; +pub const DI_NOFILECOPY: ::DWORD = 0x01000000; +pub const DI_FORCECOPY: ::DWORD = 0x02000000; +pub const DI_DRIVERPAGE_ADDED: ::DWORD = 0x04000000; +pub const DI_USECI_SELECTSTRINGS: ::DWORD = 0x08000000; +pub const DI_OVERRIDE_INFFLAGS: ::DWORD = 0x10000000; +pub const DI_PROPS_NOCHANGEUSAGE: ::DWORD = 0x20000000; +pub const DI_NOSELECTICONS: ::DWORD = 0x40000000; +pub const DI_NOWRITE_IDS: ::DWORD = 0x80000000; +pub const DI_FLAGSEX_RESERVED2: ::DWORD = 0x00000001; +pub const DI_FLAGSEX_RESERVED3: ::DWORD = 0x00000002; +pub const DI_FLAGSEX_CI_FAILED: ::DWORD = 0x00000004; +pub const DI_FLAGSEX_FINISHINSTALL_ACTION: ::DWORD = 0x00000008; +pub const DI_FLAGSEX_DIDINFOLIST: ::DWORD = 0x00000010; +pub const DI_FLAGSEX_DIDCOMPATINFO: ::DWORD = 0x00000020; +pub const DI_FLAGSEX_FILTERCLASSES: ::DWORD = 0x00000040; +pub const DI_FLAGSEX_SETFAILEDINSTALL: ::DWORD = 0x00000080; +pub const DI_FLAGSEX_DEVICECHANGE: ::DWORD = 0x00000100; +pub const DI_FLAGSEX_ALWAYSWRITEIDS: ::DWORD = 0x00000200; +pub const DI_FLAGSEX_PROPCHANGE_PENDING: ::DWORD = 0x00000400; +pub const DI_FLAGSEX_ALLOWEXCLUDEDDRVS: ::DWORD = 0x00000800; +pub const DI_FLAGSEX_NOUIONQUERYREMOVE: ::DWORD = 0x00001000; +pub const DI_FLAGSEX_USECLASSFORCOMPAT: ::DWORD = 0x00002000; +pub const DI_FLAGSEX_RESERVED4: ::DWORD = 0x00004000; +pub const DI_FLAGSEX_NO_DRVREG_MODIFY: ::DWORD = 0x00008000; +pub const DI_FLAGSEX_IN_SYSTEM_SETUP: ::DWORD = 0x00010000; +pub const DI_FLAGSEX_INET_DRIVER: ::DWORD = 0x00020000; +pub const DI_FLAGSEX_APPENDDRIVERLIST: ::DWORD = 0x00040000; +pub const DI_FLAGSEX_PREINSTALLBACKUP: ::DWORD = 0x00080000; +pub const DI_FLAGSEX_BACKUPONREPLACE: ::DWORD = 0x00100000; +pub const DI_FLAGSEX_DRIVERLIST_FROM_URL: ::DWORD = 0x00200000; +pub const DI_FLAGSEX_RESERVED1: ::DWORD = 0x00400000; +pub const DI_FLAGSEX_EXCLUDE_OLD_INET_DRIVERS: ::DWORD = 0x00800000; +pub const DI_FLAGSEX_POWERPAGE_ADDED: ::DWORD = 0x01000000; +pub const DI_FLAGSEX_FILTERSIMILARDRIVERS: ::DWORD = 0x02000000; +pub const DI_FLAGSEX_INSTALLEDDRIVER: ::DWORD = 0x04000000; +pub const DI_FLAGSEX_NO_CLASSLIST_NODE_MERGE: ::DWORD = 0x08000000; +pub const DI_FLAGSEX_ALTPLATFORM_DRVSEARCH: ::DWORD = 0x10000000; +pub const DI_FLAGSEX_RESTART_DEVICE_ONLY: ::DWORD = 0x20000000; +pub const DI_FLAGSEX_RECURSIVESEARCH: ::DWORD = 0x40000000; +pub const DI_FLAGSEX_SEARCH_PUBLISHED_INFS: ::DWORD = 0x80000000; +STRUCT!{struct SP_CLASSINSTALL_HEADER { + cbSize: ::DWORD, + InstallFunction: DI_FUNCTION, +}} +pub type PSP_CLASSINSTALL_HEADER = *mut SP_CLASSINSTALL_HEADER; +STRUCT!{struct SP_ENABLECLASS_PARAMS { + ClassInstallHeader: SP_CLASSINSTALL_HEADER, + ClassGuid: ::GUID, + EnableMessage: ::DWORD, +}} +pub type PSP_ENABLECLASS_PARAMS = *mut SP_ENABLECLASS_PARAMS; +pub const ENABLECLASS_QUERY: ::DWORD = 0; +pub const ENABLECLASS_SUCCESS: ::DWORD = 1; +pub const ENABLECLASS_FAILURE: ::DWORD = 2; +pub const DICS_ENABLE: ::DWORD = 0x00000001; +pub const DICS_DISABLE: ::DWORD = 0x00000002; +pub const DICS_PROPCHANGE: ::DWORD = 0x00000003; +pub const DICS_START: ::DWORD = 0x00000004; +pub const DICS_STOP: ::DWORD = 0x00000005; +pub const DICS_FLAG_GLOBAL: ::DWORD = 0x00000001; +pub const DICS_FLAG_CONFIGSPECIFIC: ::DWORD = 0x00000002; +pub const DICS_FLAG_CONFIGGENERAL: ::DWORD = 0x00000004; +STRUCT!{struct SP_PROPCHANGE_PARAMS { + ClassInstallHeader: SP_CLASSINSTALL_HEADER, + StateChange: ::DWORD, + Scope: ::DWORD, + HwProfile: ::DWORD, +}} +pub type PSP_PROPCHANGE_PARAMS = *mut SP_PROPCHANGE_PARAMS; +STRUCT!{struct SP_REMOVEDEVICE_PARAMS { + ClassInstallHeader: SP_CLASSINSTALL_HEADER, + Scope: ::DWORD, + HwProfile: ::DWORD, +}} +pub type PSP_REMOVEDEVICE_PARAMS = *mut SP_REMOVEDEVICE_PARAMS; +pub const DI_REMOVEDEVICE_GLOBAL: ::DWORD = 0x00000001; +pub const DI_REMOVEDEVICE_CONFIGSPECIFIC: ::DWORD = 0x00000002; +STRUCT!{struct SP_UNREMOVEDEVICE_PARAMS { + ClassInstallHeader: SP_CLASSINSTALL_HEADER, + Scope: ::DWORD, + HwProfile: ::DWORD, +}} +pub type PSP_UNREMOVEDEVICE_PARAMS = *mut SP_UNREMOVEDEVICE_PARAMS; +pub const DI_UNREMOVEDEVICE_CONFIGSPECIFIC: ::DWORD = 0x00000002; +STRUCT!{nodebug struct SP_SELECTDEVICE_PARAMS_A { + ClassInstallHeader: SP_CLASSINSTALL_HEADER, + Title: [::CHAR; MAX_TITLE_LEN], + Instructions: [::CHAR; MAX_INSTRUCTION_LEN], + ListLabel: [::CHAR; MAX_LABEL_LEN], + SubTitle: [::CHAR; MAX_SUBTITLE_LEN], + Reserved: [::BYTE; 2], +}} +pub type PSP_SELECTDEVICE_PARAMS_A = *mut SP_SELECTDEVICE_PARAMS_A; +STRUCT!{nodebug struct SP_SELECTDEVICE_PARAMS_W { + ClassInstallHeader: SP_CLASSINSTALL_HEADER, + Title: [::WCHAR; MAX_TITLE_LEN], + Instructions: [::WCHAR; MAX_INSTRUCTION_LEN], + ListLabel: [::WCHAR; MAX_LABEL_LEN], + SubTitle: [::WCHAR; MAX_SUBTITLE_LEN], +}} +pub type PSP_SELECTDEVICE_PARAMS_W = *mut SP_SELECTDEVICE_PARAMS_W; +pub type PDETECT_PROGRESS_NOTIFY = Option<unsafe extern "system" fn( + ProgressNotifyParam: ::PVOID, DetectComplete: ::DWORD, +) -> ::BOOL>; +STRUCT!{nodebug struct SP_DETECTDEVICE_PARAMS { + ClassInstallHeader: SP_CLASSINSTALL_HEADER, + DetectProgressNotify: PDETECT_PROGRESS_NOTIFY, + ProgressNotifyParam: ::PVOID, +}} +pub type PSP_DETECTDEVICE_PARAMS = *mut SP_DETECTDEVICE_PARAMS; +pub const MAX_INSTALLWIZARD_DYNAPAGES: usize = 20; +STRUCT!{struct SP_INSTALLWIZARD_DATA { + ClassInstallHeader: SP_CLASSINSTALL_HEADER, + Flags: ::DWORD, + DynamicPages: [::HPROPSHEETPAGE; MAX_INSTALLWIZARD_DYNAPAGES], + NumDynamicPages: ::DWORD, + DynamicPageFlags: ::DWORD, + PrivateFlags: ::DWORD, + PrivateData: ::LPARAM, + hwndWizardDlg: ::HWND, +}} +pub type PSP_INSTALLWIZARD_DATA = *mut SP_INSTALLWIZARD_DATA; +pub const NDW_INSTALLFLAG_DIDFACTDEFS: ::DWORD = 0x00000001; +pub const NDW_INSTALLFLAG_HARDWAREALLREADYIN: ::DWORD = 0x00000002; +pub const NDW_INSTALLFLAG_NEEDRESTART: ::DWORD = DI_NEEDRESTART; +pub const NDW_INSTALLFLAG_NEEDREBOOT: ::DWORD = DI_NEEDREBOOT; +pub const NDW_INSTALLFLAG_NEEDSHUTDOWN: ::DWORD = 0x00000200; +pub const NDW_INSTALLFLAG_EXPRESSINTRO: ::DWORD = 0x00000400; +pub const NDW_INSTALLFLAG_SKIPISDEVINSTALLED: ::DWORD = 0x00000800; +pub const NDW_INSTALLFLAG_NODETECTEDDEVS: ::DWORD = 0x00001000; +pub const NDW_INSTALLFLAG_INSTALLSPECIFIC: ::DWORD = 0x00002000; +pub const NDW_INSTALLFLAG_SKIPCLASSLIST: ::DWORD = 0x00004000; +pub const NDW_INSTALLFLAG_CI_PICKED_OEM: ::DWORD = 0x00008000; +pub const NDW_INSTALLFLAG_PCMCIAMODE: ::DWORD = 0x00010000; +pub const NDW_INSTALLFLAG_PCMCIADEVICE: ::DWORD = 0x00020000; +pub const NDW_INSTALLFLAG_USERCANCEL: ::DWORD = 0x00040000; +pub const NDW_INSTALLFLAG_KNOWNCLASS: ::DWORD = 0x00080000; +pub const DYNAWIZ_FLAG_PAGESADDED: ::DWORD = 0x00000001; +pub const DYNAWIZ_FLAG_ANALYZE_HANDLECONFLICT: ::DWORD = 0x00000008; +pub const DYNAWIZ_FLAG_INSTALLDET_NEXT: ::DWORD = 0x00000002; +pub const DYNAWIZ_FLAG_INSTALLDET_PREV: ::DWORD = 0x00000004; +pub const MIN_IDD_DYNAWIZ_RESOURCE_ID: ::c_int = 10000; +pub const MAX_IDD_DYNAWIZ_RESOURCE_ID: ::c_int = 11000; +pub const IDD_DYNAWIZ_FIRSTPAGE: ::c_int = 10000; +pub const IDD_DYNAWIZ_SELECT_PREVPAGE: ::c_int = 10001; +pub const IDD_DYNAWIZ_SELECT_NEXTPAGE: ::c_int = 10002; +pub const IDD_DYNAWIZ_ANALYZE_PREVPAGE: ::c_int = 10003; +pub const IDD_DYNAWIZ_ANALYZE_NEXTPAGE: ::c_int = 10004; +pub const IDD_DYNAWIZ_SELECTDEV_PAGE: ::c_int = 10009; +pub const IDD_DYNAWIZ_ANALYZEDEV_PAGE: ::c_int = 10010; +pub const IDD_DYNAWIZ_INSTALLDETECTEDDEVS_PAGE: ::c_int = 10011; +pub const IDD_DYNAWIZ_SELECTCLASS_PAGE: ::c_int = 10012; +pub const IDD_DYNAWIZ_INSTALLDETECTED_PREVPAGE: ::c_int = 10006; +pub const IDD_DYNAWIZ_INSTALLDETECTED_NEXTPAGE: ::c_int = 10007; +pub const IDD_DYNAWIZ_INSTALLDETECTED_NODEVS: ::c_int = 10008; +STRUCT!{struct SP_NEWDEVICEWIZARD_DATA { + ClassInstallHeader: SP_CLASSINSTALL_HEADER, + Flags: ::DWORD, + DynamicPages: [::HPROPSHEETPAGE; MAX_INSTALLWIZARD_DYNAPAGES], + NumDynamicPages: ::DWORD, + hwndWizardDlg: ::HWND, +}} +pub type PSP_NEWDEVICEWIZARD_DATA = *mut SP_NEWDEVICEWIZARD_DATA; +pub type SP_ADDPROPERTYPAGE_DATA = SP_NEWDEVICEWIZARD_DATA; +pub type PSP_ADDPROPERTYPAGE_DATA = PSP_NEWDEVICEWIZARD_DATA; +STRUCT!{nodebug struct SP_TROUBLESHOOTER_PARAMS_A { + ClassInstallHeader: SP_CLASSINSTALL_HEADER, + ChmFile: [::CHAR; ::MAX_PATH], + HtmlTroubleShooter: [::CHAR; ::MAX_PATH], +}} +pub type PSP_TROUBLESHOOTER_PARAMS_A = *mut SP_TROUBLESHOOTER_PARAMS_A; +STRUCT!{nodebug struct SP_TROUBLESHOOTER_PARAMS_W { + ClassInstallHeader: SP_CLASSINSTALL_HEADER, + ChmFile: [::WCHAR; ::MAX_PATH], + HtmlTroubleShooter: [::WCHAR; ::MAX_PATH], +}} +pub type PSP_TROUBLESHOOTER_PARAMS_W = *mut SP_TROUBLESHOOTER_PARAMS_W; +STRUCT!{nodebug struct SP_POWERMESSAGEWAKE_PARAMS_A { + ClassInstallHeader: SP_CLASSINSTALL_HEADER, + PowerMessageWake: [::CHAR; LINE_LEN * 2], +}} +pub type PSP_POWERMESSAGEWAKE_PARAMS_A = *mut SP_POWERMESSAGEWAKE_PARAMS_A; +STRUCT!{nodebug struct SP_POWERMESSAGEWAKE_PARAMS_W { + ClassInstallHeader: SP_CLASSINSTALL_HEADER, + PowerMessageWake: [::WCHAR; LINE_LEN * 2], +}} +pub type PSP_POWERMESSAGEWAKE_PARAMS_W = *mut SP_POWERMESSAGEWAKE_PARAMS_W; +STRUCT!{nodebug struct SP_DRVINFO_DATA_V2_A { + cbSize: ::DWORD, + DriverType: ::DWORD, + Reserved: ::ULONG_PTR, + Description: [::CHAR; LINE_LEN], + MfgName: [::CHAR; LINE_LEN], + ProviderName: [::CHAR; LINE_LEN], + DriverDate: ::FILETIME, + DriverVersion: ::DWORDLONG, +}} +pub type PSP_DRVINFO_DATA_V2_A = *mut SP_DRVINFO_DATA_V2_A; +STRUCT!{nodebug struct SP_DRVINFO_DATA_V2_W { + cbSize: ::DWORD, + DriverType: ::DWORD, + Reserved: ::ULONG_PTR, + Description: [::WCHAR; LINE_LEN], + MfgName: [::WCHAR; LINE_LEN], + ProviderName: [::WCHAR; LINE_LEN], + DriverDate: ::FILETIME, + DriverVersion: ::DWORDLONG, +}} +pub type PSP_DRVINFO_DATA_V2_W = *mut SP_DRVINFO_DATA_V2_W; +STRUCT!{nodebug struct SP_DRVINFO_DATA_V1_A { + cbSize: ::DWORD, + DriverType: ::DWORD, + Reserved: ::ULONG_PTR, + Description: [::CHAR; LINE_LEN], + MfgName: [::CHAR; LINE_LEN], + ProviderName: [::CHAR; LINE_LEN], +}} +pub type PSP_DRVINFO_DATA_V1_A = *mut SP_DRVINFO_DATA_V1_A; +STRUCT!{nodebug struct SP_DRVINFO_DATA_V1_W { + cbSize: ::DWORD, + DriverType: ::DWORD, + Reserved: ::ULONG_PTR, + Description: [::WCHAR; LINE_LEN], + MfgName: [::WCHAR; LINE_LEN], + ProviderName: [::WCHAR; LINE_LEN], +}} +pub type PSP_DRVINFO_DATA_V1_W = *mut SP_DRVINFO_DATA_V1_W; +pub type SP_DRVINFO_DATA_A = SP_DRVINFO_DATA_V2_A; +pub type PSP_DRVINFO_DATA_A = PSP_DRVINFO_DATA_V2_A; +pub type SP_DRVINFO_DATA_W = SP_DRVINFO_DATA_V2_W; +pub type PSP_DRVINFO_DATA_W = PSP_DRVINFO_DATA_V2_W; +STRUCT!{nodebug struct SP_DRVINFO_DETAIL_DATA_A { + cbSize: ::DWORD, + InfDate: ::FILETIME, + CompatIDsOffset: ::DWORD, + CompatIDsLength: ::DWORD, + Reserved: ::ULONG_PTR, + SectionName: [::CHAR; LINE_LEN], + InfFileName: [::CHAR; ::MAX_PATH], + DrvDescription: [::CHAR; LINE_LEN], + HardwareID: [::CHAR; ::ANYSIZE_ARRAY], +}} +pub type PSP_DRVINFO_DETAIL_DATA_A = *mut SP_DRVINFO_DETAIL_DATA_A; +STRUCT!{nodebug struct SP_DRVINFO_DETAIL_DATA_W { + cbSize: ::DWORD, + InfDate: ::FILETIME, + CompatIDsOffset: ::DWORD, + CompatIDsLength: ::DWORD, + Reserved: ::ULONG_PTR, + SectionName: [::WCHAR; LINE_LEN], + InfFileName: [::WCHAR; ::MAX_PATH], + DrvDescription: [::WCHAR; LINE_LEN], + HardwareID: [::WCHAR; ::ANYSIZE_ARRAY], +}} +pub type PSP_DRVINFO_DETAIL_DATA_W = *mut SP_DRVINFO_DETAIL_DATA_W; +STRUCT!{struct SP_DRVINSTALL_PARAMS { + cbSize: ::DWORD, + Rank: ::DWORD, + Flags: ::DWORD, + PrivateData: ::DWORD_PTR, + Reserved: ::DWORD, +}} +pub type PSP_DRVINSTALL_PARAMS = *mut SP_DRVINSTALL_PARAMS; +pub const DNF_DUPDESC: ::DWORD = 0x00000001; +pub const DNF_OLDDRIVER: ::DWORD = 0x00000002; +pub const DNF_EXCLUDEFROMLIST: ::DWORD = 0x00000004; +pub const DNF_NODRIVER: ::DWORD = 0x00000008; +pub const DNF_LEGACYINF: ::DWORD = 0x00000010; +pub const DNF_CLASS_DRIVER: ::DWORD = 0x00000020; +pub const DNF_COMPATIBLE_DRIVER: ::DWORD = 0x00000040; +pub const DNF_INET_DRIVER: ::DWORD = 0x00000080; +pub const DNF_UNUSED1: ::DWORD = 0x00000100; +pub const DNF_UNUSED2: ::DWORD = 0x00000200; +pub const DNF_OLD_INET_DRIVER: ::DWORD = 0x00000400; +pub const DNF_BAD_DRIVER: ::DWORD = 0x00000800; +pub const DNF_DUPPROVIDER: ::DWORD = 0x00001000; +pub const DNF_INF_IS_SIGNED: ::DWORD = 0x00002000; +pub const DNF_OEM_F6_INF: ::DWORD = 0x00004000; +pub const DNF_DUPDRIVERVER: ::DWORD = 0x00008000; +pub const DNF_BASIC_DRIVER: ::DWORD = 0x00010000; +pub const DNF_AUTHENTICODE_SIGNED: ::DWORD = 0x00020000; +pub const DNF_INSTALLEDDRIVER: ::DWORD = 0x00040000; +pub const DNF_ALWAYSEXCLUDEFROMLIST: ::DWORD = 0x00080000; +pub const DNF_INBOX_DRIVER: ::DWORD = 0x00100000; +pub const DNF_REQUESTADDITIONALSOFTWARE: ::DWORD = 0x00200000; +pub const DNF_UNUSED_22: ::DWORD = 0x00400000; +pub const DNF_UNUSED_23: ::DWORD = 0x00800000; +pub const DNF_UNUSED_24: ::DWORD = 0x01000000; +pub const DNF_UNUSED_25: ::DWORD = 0x02000000; +pub const DNF_UNUSED_26: ::DWORD = 0x04000000; +pub const DNF_UNUSED_27: ::DWORD = 0x08000000; +pub const DNF_UNUSED_28: ::DWORD = 0x10000000; +pub const DNF_UNUSED_29: ::DWORD = 0x20000000; +pub const DNF_UNUSED_30: ::DWORD = 0x40000000; +pub const DNF_UNUSED_31: ::DWORD = 0x80000000; +pub type PSP_DETSIG_CMPPROC = Option<unsafe extern "system" fn( + DeviceInfoSet: HDEVINFO, NewDeviceData: PSP_DEVINFO_DATA, ExistingDeviceData: PSP_DEVINFO_DATA, + CompareContext: ::PVOID, +) -> ::DWORD>; +STRUCT!{struct COINSTALLER_CONTEXT_DATA { + PostProcessing: ::BOOL, + InstallResult: ::DWORD, + PrivateData: ::PVOID, +}} +pub type PCOINSTALLER_CONTEXT_DATA = *mut COINSTALLER_CONTEXT_DATA; +STRUCT!{struct SP_CLASSIMAGELIST_DATA { + cbSize: ::DWORD, + ImageList: ::HIMAGELIST, + Reserved: ::ULONG_PTR, +}} +pub type PSP_CLASSIMAGELIST_DATA = *mut SP_CLASSIMAGELIST_DATA; +STRUCT!{struct SP_PROPSHEETPAGE_REQUEST { + cbSize: ::DWORD, + PageRequested: ::DWORD, + DeviceInfoSet: HDEVINFO, + DeviceInfoData: PSP_DEVINFO_DATA, +}} +pub type PSP_PROPSHEETPAGE_REQUEST = *mut SP_PROPSHEETPAGE_REQUEST; +pub const SPPSR_SELECT_DEVICE_RESOURCES: ::DWORD = 1; +pub const SPPSR_ENUM_BASIC_DEVICE_PROPERTIES: ::DWORD = 2; +pub const SPPSR_ENUM_ADV_DEVICE_PROPERTIES: ::DWORD = 3; +STRUCT!{nodebug struct SP_BACKUP_QUEUE_PARAMS_V2_A { + cbSize: ::DWORD, + FullInfPath: [::CHAR; ::MAX_PATH], + FilenameOffset: ::INT, + ReinstallInstance: [::CHAR; ::MAX_PATH], +}} +pub type PSP_BACKUP_QUEUE_PARAMS_V2_A = *mut SP_BACKUP_QUEUE_PARAMS_V2_A; +STRUCT!{nodebug struct SP_BACKUP_QUEUE_PARAMS_V2_W { + cbSize: ::DWORD, + FullInfPath: [::WCHAR; ::MAX_PATH], + FilenameOffset: ::INT, + ReinstallInstance: [::WCHAR; ::MAX_PATH], +}} +pub type PSP_BACKUP_QUEUE_PARAMS_V2_W = *mut SP_BACKUP_QUEUE_PARAMS_V2_W; +STRUCT!{nodebug struct SP_BACKUP_QUEUE_PARAMS_V1_A { + cbSize: ::DWORD, + FullInfPath: [::CHAR; ::MAX_PATH], + FilenameOffset: ::INT, +}} +pub type PSP_BACKUP_QUEUE_PARAMS_V1_A = *mut SP_BACKUP_QUEUE_PARAMS_V1_A; +STRUCT!{nodebug struct SP_BACKUP_QUEUE_PARAMS_V1_W { + cbSize: ::DWORD, + FullInfPath: [::WCHAR; ::MAX_PATH], + FilenameOffset: ::INT, +}} +pub type PSP_BACKUP_QUEUE_PARAMS_V1_W = *mut SP_BACKUP_QUEUE_PARAMS_V1_W; +pub type SP_BACKUP_QUEUE_PARAMS_A = SP_BACKUP_QUEUE_PARAMS_V2_A; +pub type PSP_BACKUP_QUEUE_PARAMS_A = PSP_BACKUP_QUEUE_PARAMS_V2_A; +pub type SP_BACKUP_QUEUE_PARAMS_W = SP_BACKUP_QUEUE_PARAMS_V2_W; +pub type PSP_BACKUP_QUEUE_PARAMS_W = PSP_BACKUP_QUEUE_PARAMS_V2_W; +pub const ERROR_EXPECTED_SECTION_NAME: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR + | 0; +pub const ERROR_BAD_SECTION_NAME_LINE: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR + | 1; +pub const ERROR_SECTION_NAME_TOO_LONG: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR + | 2; +pub const ERROR_GENERAL_SYNTAX: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR | 3; +pub const ERROR_WRONG_INF_STYLE: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR + | 0x100; +pub const ERROR_SECTION_NOT_FOUND: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR + | 0x101; +pub const ERROR_LINE_NOT_FOUND: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR | 0x102; +pub const ERROR_NO_BACKUP: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR | 0x103; +pub const ERROR_NO_ASSOCIATED_CLASS: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR + | 0x200; +pub const ERROR_CLASS_MISMATCH: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR | 0x201; +pub const ERROR_DUPLICATE_FOUND: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR + | 0x202; +pub const ERROR_NO_DRIVER_SELECTED: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR + | 0x203; +pub const ERROR_KEY_DOES_NOT_EXIST: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR + | 0x204; +pub const ERROR_INVALID_DEVINST_NAME: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR + | 0x205; +pub const ERROR_INVALID_CLASS: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR | 0x206; +pub const ERROR_DEVINST_ALREADY_EXISTS: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR + | 0x207; +pub const ERROR_DEVINFO_NOT_REGISTERED: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR + | 0x208; +pub const ERROR_INVALID_REG_PROPERTY: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR + | 0x209; +pub const ERROR_NO_INF: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR | 0x20A; +pub const ERROR_NO_SUCH_DEVINST: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR + | 0x20B; +pub const ERROR_CANT_LOAD_CLASS_ICON: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR + | 0x20C; +pub const ERROR_INVALID_CLASS_INSTALLER: ::DWORD = ::APPLICATION_ERROR_MASK + | ::ERROR_SEVERITY_ERROR | 0x20D; +pub const ERROR_DI_DO_DEFAULT: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR | 0x20E; +pub const ERROR_DI_NOFILECOPY: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR | 0x20F; +pub const ERROR_INVALID_HWPROFILE: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR + | 0x210; +pub const ERROR_NO_DEVICE_SELECTED: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR + | 0x211; +pub const ERROR_DEVINFO_LIST_LOCKED: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR + | 0x212; +pub const ERROR_DEVINFO_DATA_LOCKED: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR + | 0x213; +pub const ERROR_DI_BAD_PATH: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR | 0x214; +pub const ERROR_NO_CLASSINSTALL_PARAMS: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR + | 0x215; +pub const ERROR_FILEQUEUE_LOCKED: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR + | 0x216; +pub const ERROR_BAD_SERVICE_INSTALLSECT: ::DWORD = ::APPLICATION_ERROR_MASK + | ::ERROR_SEVERITY_ERROR | 0x217; +pub const ERROR_NO_CLASS_DRIVER_LIST: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR + | 0x218; +pub const ERROR_NO_ASSOCIATED_SERVICE: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR + | 0x219; +pub const ERROR_NO_DEFAULT_DEVICE_INTERFACE: ::DWORD = ::APPLICATION_ERROR_MASK + | ::ERROR_SEVERITY_ERROR | 0x21A; +pub const ERROR_DEVICE_INTERFACE_ACTIVE: ::DWORD = ::APPLICATION_ERROR_MASK + | ::ERROR_SEVERITY_ERROR | 0x21B; +pub const ERROR_DEVICE_INTERFACE_REMOVED: ::DWORD = ::APPLICATION_ERROR_MASK + | ::ERROR_SEVERITY_ERROR | 0x21C; +pub const ERROR_BAD_INTERFACE_INSTALLSECT: ::DWORD = ::APPLICATION_ERROR_MASK + | ::ERROR_SEVERITY_ERROR | 0x21D; +pub const ERROR_NO_SUCH_INTERFACE_CLASS: ::DWORD = ::APPLICATION_ERROR_MASK + | ::ERROR_SEVERITY_ERROR | 0x21E; +pub const ERROR_INVALID_REFERENCE_STRING: ::DWORD = ::APPLICATION_ERROR_MASK + | ::ERROR_SEVERITY_ERROR | 0x21F; +pub const ERROR_INVALID_MACHINENAME: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR + | 0x220; +pub const ERROR_REMOTE_COMM_FAILURE: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR + | 0x221; +pub const ERROR_MACHINE_UNAVAILABLE: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR + | 0x222; +pub const ERROR_NO_CONFIGMGR_SERVICES: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR + | 0x223; +pub const ERROR_INVALID_PROPPAGE_PROVIDER: ::DWORD = ::APPLICATION_ERROR_MASK + | ::ERROR_SEVERITY_ERROR | 0x224; +pub const ERROR_NO_SUCH_DEVICE_INTERFACE: ::DWORD = ::APPLICATION_ERROR_MASK + | ::ERROR_SEVERITY_ERROR | 0x225; +pub const ERROR_DI_POSTPROCESSING_REQUIRED: ::DWORD = ::APPLICATION_ERROR_MASK + | ::ERROR_SEVERITY_ERROR | 0x226; +pub const ERROR_INVALID_COINSTALLER: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR + | 0x227; +pub const ERROR_NO_COMPAT_DRIVERS: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR + | 0x228; +pub const ERROR_NO_DEVICE_ICON: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR + | 0x229; +pub const ERROR_INVALID_INF_LOGCONFIG: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR + | 0x22A; +pub const ERROR_DI_DONT_INSTALL: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR + | 0x22B; +pub const ERROR_INVALID_FILTER_DRIVER: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR + | 0x22C; +pub const ERROR_NON_WINDOWS_NT_DRIVER: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR + | 0x22D; +pub const ERROR_NON_WINDOWS_DRIVER: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR + | 0x22E; +pub const ERROR_NO_CATALOG_FOR_OEM_INF: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR + | 0x22F; +pub const ERROR_DEVINSTALL_QUEUE_NONNATIVE: ::DWORD = ::APPLICATION_ERROR_MASK + | ::ERROR_SEVERITY_ERROR | 0x230; +pub const ERROR_NOT_DISABLEABLE: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR + | 0x231; +pub const ERROR_CANT_REMOVE_DEVINST: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR + | 0x232; +pub const ERROR_INVALID_TARGET: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR + | 0x233; +pub const ERROR_DRIVER_NONNATIVE: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR + | 0x234; +pub const ERROR_IN_WOW64: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR | 0x235; +pub const ERROR_SET_SYSTEM_RESTORE_POINT: ::DWORD = ::APPLICATION_ERROR_MASK + | ::ERROR_SEVERITY_ERROR | 0x236; +pub const ERROR_SCE_DISABLED: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR | 0x238; +pub const ERROR_UNKNOWN_EXCEPTION: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR + | 0x239; +pub const ERROR_PNP_REGISTRY_ERROR: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR + | 0x23A; +pub const ERROR_REMOTE_REQUEST_UNSUPPORTED: ::DWORD = ::APPLICATION_ERROR_MASK + | ::ERROR_SEVERITY_ERROR | 0x23B; +pub const ERROR_NOT_AN_INSTALLED_OEM_INF: ::DWORD = ::APPLICATION_ERROR_MASK + | ::ERROR_SEVERITY_ERROR | 0x23C; +pub const ERROR_INF_IN_USE_BY_DEVICES: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR + | 0x23D; +pub const ERROR_DI_FUNCTION_OBSOLETE: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR + | 0x23E; +pub const ERROR_NO_AUTHENTICODE_CATALOG: ::DWORD = ::APPLICATION_ERROR_MASK + | ::ERROR_SEVERITY_ERROR | 0x23F; +pub const ERROR_AUTHENTICODE_DISALLOWED: ::DWORD = ::APPLICATION_ERROR_MASK + | ::ERROR_SEVERITY_ERROR | 0x240; +pub const ERROR_AUTHENTICODE_TRUSTED_PUBLISHER: ::DWORD = ::APPLICATION_ERROR_MASK + | ::ERROR_SEVERITY_ERROR | 0x241; +pub const ERROR_AUTHENTICODE_TRUST_NOT_ESTABLISHED: ::DWORD = ::APPLICATION_ERROR_MASK + | ::ERROR_SEVERITY_ERROR | 0x242; +pub const ERROR_AUTHENTICODE_PUBLISHER_NOT_TRUSTED: ::DWORD = ::APPLICATION_ERROR_MASK + | ::ERROR_SEVERITY_ERROR | 0x243; +pub const ERROR_SIGNATURE_OSATTRIBUTE_MISMATCH: ::DWORD = ::APPLICATION_ERROR_MASK + | ::ERROR_SEVERITY_ERROR | 0x244; +pub const ERROR_ONLY_VALIDATE_VIA_AUTHENTICODE: ::DWORD = ::APPLICATION_ERROR_MASK + | ::ERROR_SEVERITY_ERROR | 0x245; +pub const ERROR_DEVICE_INSTALLER_NOT_READY: ::DWORD = ::APPLICATION_ERROR_MASK + | ::ERROR_SEVERITY_ERROR | 0x246; +pub const ERROR_DRIVER_STORE_ADD_FAILED: ::DWORD = ::APPLICATION_ERROR_MASK + | ::ERROR_SEVERITY_ERROR | 0x247; +pub const ERROR_DEVICE_INSTALL_BLOCKED: ::DWORD = ::APPLICATION_ERROR_MASK + | ::ERROR_SEVERITY_ERROR | 0x248; +pub const ERROR_DRIVER_INSTALL_BLOCKED: ::DWORD = ::APPLICATION_ERROR_MASK + | ::ERROR_SEVERITY_ERROR | 0x249; +pub const ERROR_WRONG_INF_TYPE: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR + | 0x24A; +pub const ERROR_FILE_HASH_NOT_IN_CATALOG: ::DWORD = ::APPLICATION_ERROR_MASK + | ::ERROR_SEVERITY_ERROR | 0x24B; +pub const ERROR_DRIVER_STORE_DELETE_FAILED: ::DWORD = ::APPLICATION_ERROR_MASK + | ::ERROR_SEVERITY_ERROR | 0x24C; +pub const ERROR_UNRECOVERABLE_STACK_OVERFLOW: ::DWORD = ::APPLICATION_ERROR_MASK + | ::ERROR_SEVERITY_ERROR | 0x300; +pub const EXCEPTION_SPAPI_UNRECOVERABLE_STACK_OVERFLOW: ::DWORD = + ERROR_UNRECOVERABLE_STACK_OVERFLOW; +pub const ERROR_NO_DEFAULT_INTERFACE_DEVICE: ::DWORD = ERROR_NO_DEFAULT_DEVICE_INTERFACE; +pub const ERROR_INTERFACE_DEVICE_ACTIVE: ::DWORD = ERROR_DEVICE_INTERFACE_ACTIVE; +pub const ERROR_INTERFACE_DEVICE_REMOVED: ::DWORD = ERROR_DEVICE_INTERFACE_REMOVED; +pub const ERROR_NO_SUCH_INTERFACE_DEVICE: ::DWORD = ERROR_NO_SUCH_DEVICE_INTERFACE; +pub const ERROR_NOT_INSTALLED: ::DWORD = ::APPLICATION_ERROR_MASK | ::ERROR_SEVERITY_ERROR + | 0x1000; +pub const INFINFO_INF_SPEC_IS_HINF: ::DWORD = 1; +pub const INFINFO_INF_NAME_IS_ABSOLUTE: ::DWORD = 2; +pub const INFINFO_DEFAULT_SEARCH: ::DWORD = 3; +pub const INFINFO_REVERSE_DEFAULT_SEARCH: ::DWORD = 4; +pub const INFINFO_INF_PATH_LIST_SEARCH: ::DWORD = 5; +pub const FILE_COMPRESSION_NONE: ::UINT = 0; +pub const FILE_COMPRESSION_WINLZA: ::UINT = 1; +pub const FILE_COMPRESSION_MSZIP: ::UINT = 2; +pub const FILE_COMPRESSION_NTCAB: ::UINT = 3; +pub const SRCLIST_TEMPORARY: ::DWORD = 0x00000001; +pub const SRCLIST_NOBROWSE: ::DWORD = 0x00000002; +pub const SRCLIST_SYSTEM: ::DWORD = 0x00000010; +pub const SRCLIST_USER: ::DWORD = 0x00000020; +pub const SRCLIST_SYSIFADMIN: ::DWORD = 0x00000040; +pub const SRCLIST_SUBDIRS: ::DWORD = 0x00000100; +pub const SRCLIST_APPEND: ::DWORD = 0x00000200; +pub const SRCLIST_NOSTRIPPLATFORM: ::DWORD = 0x00000400; +pub const IDF_NOBROWSE: ::DWORD = 0x00000001; +pub const IDF_NOSKIP: ::DWORD = 0x00000002; +pub const IDF_NODETAILS: ::DWORD = 0x00000004; +pub const IDF_NOCOMPRESSED: ::DWORD = 0x00000008; +pub const IDF_CHECKFIRST: ::DWORD = 0x00000100; +pub const IDF_NOBEEP: ::DWORD = 0x00000200; +pub const IDF_NOFOREGROUND: ::DWORD = 0x00000400; +pub const IDF_WARNIFSKIP: ::DWORD = 0x00000800; +pub const IDF_NOREMOVABLEMEDIAPROMPT: ::DWORD = 0x00001000; +pub const IDF_USEDISKNAMEASPROMPT: ::DWORD = 0x00002000; +pub const IDF_OEMDISK: ::DWORD = 0x80000000; +pub const DPROMPT_SUCCESS: ::UINT = 0; +pub const DPROMPT_CANCEL: ::UINT = 1; +pub const DPROMPT_SKIPFILE: ::UINT = 2; +pub const DPROMPT_BUFFERTOOSMALL: ::UINT = 3; +pub const DPROMPT_OUTOFMEMORY: ::UINT = 4; +pub const SETDIRID_NOT_FULL_PATH: ::DWORD = 0x00000001; +pub const SRCINFO_PATH: ::UINT = 1; +pub const SRCINFO_TAGFILE: ::UINT = 2; +pub const SRCINFO_DESCRIPTION: ::UINT = 3; +pub const SRCINFO_FLAGS: ::UINT = 4; +pub const SRCINFO_TAGFILE2: ::UINT = 4; +pub const SRC_FLAGS_CABFILE: ::UINT = 0x0010; +pub const SP_COPY_DELETESOURCE: ::DWORD = 0x0000001; +pub const SP_COPY_REPLACEONLY: ::DWORD = 0x0000002; +pub const SP_COPY_NEWER: ::DWORD = 0x0000004; +pub const SP_COPY_NEWER_OR_SAME: ::DWORD = SP_COPY_NEWER; +pub const SP_COPY_NOOVERWRITE: ::DWORD = 0x0000008; +pub const SP_COPY_NODECOMP: ::DWORD = 0x0000010; +pub const SP_COPY_LANGUAGEAWARE: ::DWORD = 0x0000020; +pub const SP_COPY_SOURCE_ABSOLUTE: ::DWORD = 0x0000040; +pub const SP_COPY_SOURCEPATH_ABSOLUTE: ::DWORD = 0x0000080; +pub const SP_COPY_IN_USE_NEEDS_REBOOT: ::DWORD = 0x0000100; +pub const SP_COPY_FORCE_IN_USE: ::DWORD = 0x0000200; +pub const SP_COPY_NOSKIP: ::DWORD = 0x0000400; +pub const SP_FLAG_CABINETCONTINUATION: ::DWORD = 0x0000800; +pub const SP_COPY_FORCE_NOOVERWRITE: ::DWORD = 0x0001000; +pub const SP_COPY_FORCE_NEWER: ::DWORD = 0x0002000; +pub const SP_COPY_WARNIFSKIP: ::DWORD = 0x0004000; +pub const SP_COPY_NOBROWSE: ::DWORD = 0x0008000; +pub const SP_COPY_NEWER_ONLY: ::DWORD = 0x0010000; +pub const SP_COPY_RESERVED: ::DWORD = 0x0020000; +pub const SP_COPY_OEMINF_CATALOG_ONLY: ::DWORD = 0x0040000; +pub const SP_COPY_REPLACE_BOOT_FILE: ::DWORD = 0x0080000; +pub const SP_COPY_NOPRUNE: ::DWORD = 0x0100000; +pub const SP_COPY_OEM_F6_INF: ::DWORD = 0x0200000; +pub const SP_COPY_ALREADYDECOMP: ::DWORD = 0x0400000; +pub const SP_COPY_WINDOWS_SIGNED: ::DWORD = 0x1000000; +pub const SP_COPY_PNPLOCKED: ::DWORD = 0x2000000; +pub const SP_COPY_IN_USE_TRY_RENAME: ::DWORD = 0x4000000; +pub const SP_COPY_INBOX_INF: ::DWORD = 0x8000000; +pub const SP_COPY_HARDLINK: ::DWORD = 0x10000000; +pub const SP_BACKUP_BACKUPPASS: ::DWORD = 0x00000001; +pub const SP_BACKUP_DEMANDPASS: ::DWORD = 0x00000002; +pub const SP_BACKUP_SPECIAL: ::DWORD = 0x00000004; +pub const SP_BACKUP_BOOTFILE: ::DWORD = 0x00000008; +pub const SPQ_SCAN_FILE_PRESENCE: ::DWORD = 0x00000001; +pub const SPQ_SCAN_FILE_VALIDITY: ::DWORD = 0x00000002; +pub const SPQ_SCAN_USE_CALLBACK: ::DWORD = 0x00000004; +pub const SPQ_SCAN_USE_CALLBACKEX: ::DWORD = 0x00000008; +pub const SPQ_SCAN_INFORM_USER: ::DWORD = 0x00000010; +pub const SPQ_SCAN_PRUNE_COPY_QUEUE: ::DWORD = 0x00000020; +pub const SPQ_SCAN_USE_CALLBACK_SIGNERINFO: ::DWORD = 0x00000040; +pub const SPQ_SCAN_PRUNE_DELREN: ::DWORD = 0x00000080; +pub const SPQ_SCAN_FILE_PRESENCE_WITHOUT_SOURCE: ::DWORD = 0x00000100; +pub const SPQ_SCAN_FILE_COMPARISON: ::DWORD = 0x00000200; +pub const SPQ_SCAN_ACTIVATE_DRP: ::DWORD = 0x00000400; +pub const SPQ_DELAYED_COPY: ::DWORD = 0x00000001; +pub const SPQ_FLAG_BACKUP_AWARE: ::DWORD = 0x00000001; +pub const SPQ_FLAG_ABORT_IF_UNSIGNED: ::DWORD = 0x00000002; +pub const SPQ_FLAG_FILES_MODIFIED: ::DWORD = 0x00000004; +pub const SPQ_FLAG_DO_SHUFFLEMOVE: ::DWORD = 0x00000008; +pub const SPQ_FLAG_VALID: ::DWORD = 0x0000000F; +pub const SPOST_NONE: ::DWORD = 0; +pub const SPOST_PATH: ::DWORD = 1; +pub const SPOST_URL: ::DWORD = 2; +pub const SPOST_MAX: ::DWORD = 3; +pub const SUOI_FORCEDELETE: ::DWORD = 0x00000001; +pub const SUOI_INTERNAL1: ::DWORD = 0x00000002; +pub const SPDSL_IGNORE_DISK: ::UINT = 0x00000001; +pub const SPDSL_DISALLOW_NEGATIVE_ADJUST: ::UINT = 0x00000002; +pub const SPFILEQ_FILE_IN_USE: ::INT = 0x00000001; +pub const SPFILEQ_REBOOT_RECOMMENDED: ::INT = 0x00000002; +pub const SPFILEQ_REBOOT_IN_PROGRESS: ::INT = 0x00000004; +pub const FLG_ADDREG_DELREG_BIT: ::DWORD = 0x00008000; +pub const FLG_ADDREG_BINVALUETYPE: ::DWORD = 0x00000001; +pub const FLG_ADDREG_NOCLOBBER: ::DWORD = 0x00000002; +pub const FLG_ADDREG_DELVAL: ::DWORD = 0x00000004; +pub const FLG_ADDREG_APPEND: ::DWORD = 0x00000008; +pub const FLG_ADDREG_KEYONLY: ::DWORD = 0x00000010; +pub const FLG_ADDREG_OVERWRITEONLY: ::DWORD = 0x00000020; +pub const FLG_ADDREG_64BITKEY: ::DWORD = 0x00001000; +pub const FLG_ADDREG_KEYONLY_COMMON: ::DWORD = 0x00002000; +pub const FLG_ADDREG_32BITKEY: ::DWORD = 0x00004000; +pub const FLG_ADDREG_TYPE_MASK: ::DWORD = 0xFFFF0000 | FLG_ADDREG_BINVALUETYPE; +pub const FLG_ADDREG_TYPE_SZ: ::DWORD = 0x00000000; +pub const FLG_ADDREG_TYPE_MULTI_SZ: ::DWORD = 0x00010000; +pub const FLG_ADDREG_TYPE_EXPAND_SZ: ::DWORD = 0x00020000; +pub const FLG_ADDREG_TYPE_BINARY: ::DWORD = 0x00000000 | FLG_ADDREG_BINVALUETYPE; +pub const FLG_ADDREG_TYPE_DWORD: ::DWORD = 0x00010000 | FLG_ADDREG_BINVALUETYPE; +pub const FLG_ADDREG_TYPE_NONE: ::DWORD = 0x00020000 | FLG_ADDREG_BINVALUETYPE; +pub const FLG_DELREG_VALUE: ::DWORD = 0x00000000; +pub const FLG_DELREG_TYPE_MASK: ::DWORD = FLG_ADDREG_TYPE_MASK; +pub const FLG_DELREG_TYPE_SZ: ::DWORD = FLG_ADDREG_TYPE_SZ; +pub const FLG_DELREG_TYPE_MULTI_SZ: ::DWORD = FLG_ADDREG_TYPE_MULTI_SZ; +pub const FLG_DELREG_TYPE_EXPAND_SZ: ::DWORD = FLG_ADDREG_TYPE_EXPAND_SZ; +pub const FLG_DELREG_TYPE_BINARY: ::DWORD = FLG_ADDREG_TYPE_BINARY; +pub const FLG_DELREG_TYPE_DWORD: ::DWORD = FLG_ADDREG_TYPE_DWORD; +pub const FLG_DELREG_TYPE_NONE: ::DWORD = FLG_ADDREG_TYPE_NONE; +pub const FLG_DELREG_64BITKEY: ::DWORD = FLG_ADDREG_64BITKEY; +pub const FLG_DELREG_KEYONLY_COMMON: ::DWORD = FLG_ADDREG_KEYONLY_COMMON; +pub const FLG_DELREG_32BITKEY: ::DWORD = FLG_ADDREG_32BITKEY; +pub const FLG_DELREG_OPERATION_MASK: ::DWORD = 0x000000FE; +pub const FLG_DELREG_MULTI_SZ_DELSTRING: ::DWORD = FLG_DELREG_TYPE_MULTI_SZ | FLG_ADDREG_DELREG_BIT + | 0x00000002; +pub const FLG_BITREG_CLEARBITS: ::DWORD = 0x00000000; +pub const FLG_BITREG_SETBITS: ::DWORD = 0x00000001; +pub const FLG_BITREG_64BITKEY: ::DWORD = 0x00001000; +pub const FLG_BITREG_32BITKEY: ::DWORD = 0x00004000; +pub const FLG_INI2REG_64BITKEY: ::DWORD = 0x00001000; +pub const FLG_INI2REG_32BITKEY: ::DWORD = 0x00004000; +pub const FLG_REGSVR_DLLREGISTER: ::DWORD = 0x00000001; +pub const FLG_REGSVR_DLLINSTALL: ::DWORD = 0x00000002; +pub const FLG_PROFITEM_CURRENTUSER: ::DWORD = 0x00000001; +pub const FLG_PROFITEM_DELETE: ::DWORD = 0x00000002; +pub const FLG_PROFITEM_GROUP: ::DWORD = 0x00000004; +pub const FLG_PROFITEM_CSIDL: ::DWORD = 0x00000008; +pub const FLG_ADDPROPERTY_NOCLOBBER: ::DWORD = 0x00000001; +pub const FLG_ADDPROPERTY_OVERWRITEONLY: ::DWORD = 0x00000002; +pub const FLG_ADDPROPERTY_APPEND: ::DWORD = 0x00000004; +pub const FLG_ADDPROPERTY_OR: ::DWORD = 0x00000008; +pub const FLG_ADDPROPERTY_AND: ::DWORD = 0x00000010; +pub const FLG_DELPROPERTY_MULTI_SZ_DELSTRING: ::DWORD = 0x00000001; +pub const SPINST_LOGCONFIG: ::UINT = 0x00000001; +pub const SPINST_INIFILES: ::UINT = 0x00000002; +pub const SPINST_REGISTRY: ::UINT = 0x00000004; +pub const SPINST_INI2REG: ::UINT = 0x00000008; +pub const SPINST_FILES: ::UINT = 0x00000010; +pub const SPINST_BITREG: ::UINT = 0x00000020; +pub const SPINST_REGSVR: ::UINT = 0x00000040; +pub const SPINST_UNREGSVR: ::UINT = 0x00000080; +pub const SPINST_PROFILEITEMS: ::UINT = 0x00000100; +pub const SPINST_COPYINF: ::UINT = 0x00000200; +pub const SPINST_PROPERTIES: ::UINT = 0x00000400; +pub const SPINST_ALL: ::UINT = 0x000007ff; +pub const SPINST_SINGLESECTION: ::UINT = 0x00010000; +pub const SPINST_LOGCONFIG_IS_FORCED: ::UINT = 0x00020000; +pub const SPINST_LOGCONFIGS_ARE_OVERRIDES: ::UINT = 0x00040000; +pub const SPINST_REGISTERCALLBACKAWARE: ::UINT = 0x00080000; +pub const SPINST_DEVICEINSTALL: ::UINT = 0x00100000; +pub const SPSVCINST_TAGTOFRONT: ::DWORD = 0x00000001; +pub const SPSVCINST_ASSOCSERVICE: ::DWORD = 0x00000002; +pub const SPSVCINST_DELETEEVENTLOGENTRY: ::DWORD = 0x00000004; +pub const SPSVCINST_NOCLOBBER_DISPLAYNAME: ::DWORD = 0x00000008; +pub const SPSVCINST_NOCLOBBER_STARTTYPE: ::DWORD = 0x00000010; +pub const SPSVCINST_NOCLOBBER_ERRORCONTROL: ::DWORD = 0x00000020; +pub const SPSVCINST_NOCLOBBER_LOADORDERGROUP: ::DWORD = 0x00000040; +pub const SPSVCINST_NOCLOBBER_DEPENDENCIES: ::DWORD = 0x00000080; +pub const SPSVCINST_NOCLOBBER_DESCRIPTION: ::DWORD = 0x00000100; +pub const SPSVCINST_STOPSERVICE: ::DWORD = 0x00000200; +pub const SPSVCINST_CLOBBER_SECURITY: ::DWORD = 0x00000400; +pub const SPSVCINST_STARTSERVICE: ::DWORD = 0x00000800; +pub const SPSVCINST_NOCLOBBER_REQUIREDPRIVILEGES: ::DWORD = 0x00001000; +pub type HSPFILELOG = ::PVOID; +pub const SPFILELOG_SYSTEMLOG: ::DWORD = 0x00000001; +pub const SPFILELOG_FORCENEW: ::DWORD = 0x00000002; +pub const SPFILELOG_QUERYONLY: ::DWORD = 0x00000004; +pub const SPFILELOG_OEMFILE: ::DWORD = 0x00000001; +ENUM!{enum SetupFileLogInfo { + SetupFileLogSourceFilename, + SetupFileLogChecksum, + SetupFileLogDiskTagfile, + SetupFileLogDiskDescription, + SetupFileLogOtherInfo, + SetupFileLogMax, +}} +pub type LogSeverity = ::DWORD; +pub const LogSevInformation: LogSeverity = 0x00000000; +pub const LogSevWarning: LogSeverity = 0x00000001; +pub const LogSevError: LogSeverity = 0x00000002; +pub const LogSevFatalError: LogSeverity = 0x00000003; +pub const LogSevMaximum: LogSeverity = 0x00000004; +pub const DICD_GENERATE_ID: ::DWORD = 0x00000001; +pub const DICD_INHERIT_CLASSDRVS: ::DWORD = 0x00000002; +pub const DIOD_INHERIT_CLASSDRVS: ::DWORD = 0x00000002; +pub const DIOD_CANCEL_REMOVE: ::DWORD = 0x00000004; +pub const DIODI_NO_ADD: ::DWORD = 0x00000001; +pub const SPRDI_FIND_DUPS: ::DWORD = 0x00000001; +pub const SPDIT_NODRIVER: ::DWORD = 0x00000000; +pub const SPDIT_CLASSDRIVER: ::DWORD = 0x00000001; +pub const SPDIT_COMPATDRIVER: ::DWORD = 0x00000002; +pub const DIGCF_DEFAULT: ::DWORD = 0x00000001; +pub const DIGCF_PRESENT: ::DWORD = 0x00000002; +pub const DIGCF_ALLCLASSES: ::DWORD = 0x00000004; +pub const DIGCF_PROFILE: ::DWORD = 0x00000008; +pub const DIGCF_DEVICEINTERFACE: ::DWORD = 0x00000010; +pub const DIBCI_NOINSTALLCLASS: ::DWORD = 0x00000001; +pub const DIBCI_NODISPLAYCLASS: ::DWORD = 0x00000002; +pub const DIOCR_INSTALLER: ::DWORD = 0x00000001; +pub const DIOCR_INTERFACE: ::DWORD = 0x00000002; +pub const DIREG_DEV: ::DWORD = 0x00000001; +pub const DIREG_DRV: ::DWORD = 0x00000002; +pub const DIREG_BOTH: ::DWORD = 0x00000004; +pub const DICLASSPROP_INSTALLER: ::DWORD = 0x00000001; +pub const DICLASSPROP_INTERFACE: ::DWORD = 0x00000002; +pub const SPDRP_DEVICEDESC: ::DWORD = 0x00000000; +pub const SPDRP_HARDWAREID: ::DWORD = 0x00000001; +pub const SPDRP_COMPATIBLEIDS: ::DWORD = 0x00000002; +pub const SPDRP_UNUSED0: ::DWORD = 0x00000003; +pub const SPDRP_SERVICE: ::DWORD = 0x00000004; +pub const SPDRP_UNUSED1: ::DWORD = 0x00000005; +pub const SPDRP_UNUSED2: ::DWORD = 0x00000006; +pub const SPDRP_CLASS: ::DWORD = 0x00000007; +pub const SPDRP_CLASSGUID: ::DWORD = 0x00000008; +pub const SPDRP_DRIVER: ::DWORD = 0x00000009; +pub const SPDRP_CONFIGFLAGS: ::DWORD = 0x0000000A; +pub const SPDRP_MFG: ::DWORD = 0x0000000B; +pub const SPDRP_FRIENDLYNAME: ::DWORD = 0x0000000C; +pub const SPDRP_LOCATION_INFORMATION: ::DWORD = 0x0000000D; +pub const SPDRP_PHYSICAL_DEVICE_OBJECT_NAME: ::DWORD = 0x0000000E; +pub const SPDRP_CAPABILITIES: ::DWORD = 0x0000000F; +pub const SPDRP_UI_NUMBER: ::DWORD = 0x00000010; +pub const SPDRP_UPPERFILTERS: ::DWORD = 0x00000011; +pub const SPDRP_LOWERFILTERS: ::DWORD = 0x00000012; +pub const SPDRP_BUSTYPEGUID: ::DWORD = 0x00000013; +pub const SPDRP_LEGACYBUSTYPE: ::DWORD = 0x00000014; +pub const SPDRP_BUSNUMBER: ::DWORD = 0x00000015; +pub const SPDRP_ENUMERATOR_NAME: ::DWORD = 0x00000016; +pub const SPDRP_SECURITY: ::DWORD = 0x00000017; +pub const SPDRP_SECURITY_SDS: ::DWORD = 0x00000018; +pub const SPDRP_DEVTYPE: ::DWORD = 0x00000019; +pub const SPDRP_EXCLUSIVE: ::DWORD = 0x0000001A; +pub const SPDRP_CHARACTERISTICS: ::DWORD = 0x0000001B; +pub const SPDRP_ADDRESS: ::DWORD = 0x0000001C; +pub const SPDRP_UI_NUMBER_DESC_FORMAT: ::DWORD = 0x0000001D; +pub const SPDRP_DEVICE_POWER_DATA: ::DWORD = 0x0000001E; +pub const SPDRP_REMOVAL_POLICY: ::DWORD = 0x0000001F; +pub const SPDRP_REMOVAL_POLICY_HW_DEFAULT: ::DWORD = 0x00000020; +pub const SPDRP_REMOVAL_POLICY_OVERRIDE: ::DWORD = 0x00000021; +pub const SPDRP_INSTALL_STATE: ::DWORD = 0x00000022; +pub const SPDRP_LOCATION_PATHS: ::DWORD = 0x00000023; +pub const SPDRP_BASE_CONTAINERID: ::DWORD = 0x00000024; +pub const SPDRP_MAXIMUM_PROPERTY: ::DWORD = 0x00000025; +pub const SPCRP_UPPERFILTERS: ::DWORD = 0x00000011; +pub const SPCRP_LOWERFILTERS: ::DWORD = 0x00000012; +pub const SPCRP_SECURITY: ::DWORD = 0x00000017; +pub const SPCRP_SECURITY_SDS: ::DWORD = 0x00000018; +pub const SPCRP_DEVTYPE: ::DWORD = 0x00000019; +pub const SPCRP_EXCLUSIVE: ::DWORD = 0x0000001A; +pub const SPCRP_CHARACTERISTICS: ::DWORD = 0x0000001B; +pub const SPCRP_MAXIMUM_PROPERTY: ::DWORD = 0x0000001C; +pub const DMI_MASK: ::DWORD = 0x00000001; +pub const DMI_BKCOLOR: ::DWORD = 0x00000002; +pub const DMI_USERECT: ::DWORD = 0x00000004; +pub const DIGCDP_FLAG_BASIC: ::DWORD = 0x00000001; +pub const DIGCDP_FLAG_ADVANCED: ::DWORD = 0x00000002; +pub const DIGCDP_FLAG_REMOTE_BASIC: ::DWORD = 0x00000003; +pub const DIGCDP_FLAG_REMOTE_ADVANCED: ::DWORD = 0x00000004; +pub const IDI_RESOURCEFIRST: ::c_int = 159; +pub const IDI_RESOURCE: ::c_int = 159; +pub const IDI_RESOURCELAST: ::c_int = 161; +pub const IDI_RESOURCEOVERLAYFIRST: ::c_int = 161; +pub const IDI_RESOURCEOVERLAYLAST: ::c_int = 161; +pub const IDI_CONFLICT: ::c_int = 161; +pub const IDI_CLASSICON_OVERLAYFIRST: ::c_int = 500; +pub const IDI_CLASSICON_OVERLAYLAST: ::c_int = 502; +pub const IDI_PROBLEM_OVL: ::c_int = 500; +pub const IDI_DISABLED_OVL: ::c_int = 501; +pub const IDI_FORCED_OVL: ::c_int = 502; +pub const SPWPT_SELECTDEVICE: ::DWORD = 0x00000001; +pub const SPWP_USE_DEVINFO_DATA: ::DWORD = 0x00000001; +STRUCT!{nodebug struct SP_INF_SIGNER_INFO_V1_A { + cbSize: ::DWORD, + CatalogFile: [::CHAR; ::MAX_PATH], + DigitalSigner: [::CHAR; ::MAX_PATH], + DigitalSignerVersion: [::CHAR; ::MAX_PATH], +}} +pub type PSP_INF_SIGNER_INFO_V1_A = *mut SP_INF_SIGNER_INFO_V1_A; +STRUCT!{nodebug struct SP_INF_SIGNER_INFO_V1_W { + cbSize: ::DWORD, + CatalogFile: [::WCHAR; ::MAX_PATH], + DigitalSigner: [::WCHAR; ::MAX_PATH], + DigitalSignerVersion: [::WCHAR; ::MAX_PATH], +}} +pub type PSP_INF_SIGNER_INFO_V1_W = *mut SP_INF_SIGNER_INFO_V1_W; +STRUCT!{nodebug struct SP_INF_SIGNER_INFO_V2_A { + cbSize: ::DWORD, + CatalogFile: [::CHAR; ::MAX_PATH], + DigitalSigner: [::CHAR; ::MAX_PATH], + DigitalSignerVersion: [::CHAR; ::MAX_PATH], + SignerScore: ::DWORD, +}} +pub type PSP_INF_SIGNER_INFO_V2_A = *mut SP_INF_SIGNER_INFO_V2_A; +STRUCT!{nodebug struct SP_INF_SIGNER_INFO_V2_W { + cbSize: ::DWORD, + CatalogFile: [::WCHAR; ::MAX_PATH], + DigitalSigner: [::WCHAR; ::MAX_PATH], + DigitalSignerVersion: [::WCHAR; ::MAX_PATH], + SignerScore: ::DWORD, +}} +pub type PSP_INF_SIGNER_INFO_V2_W = *mut SP_INF_SIGNER_INFO_V2_W; +pub type SP_INF_SIGNER_INFO_A = SP_INF_SIGNER_INFO_V2_A; +pub type PSP_INF_SIGNER_INFO_A = PSP_INF_SIGNER_INFO_V2_A; +pub type SP_INF_SIGNER_INFO_W = SP_INF_SIGNER_INFO_V2_W; +pub type PSP_INF_SIGNER_INFO_W = PSP_INF_SIGNER_INFO_V2_W; +pub const SIGNERSCORE_UNKNOWN: ::DWORD = 0xFF000000; +pub const SIGNERSCORE_W9X_SUSPECT: ::DWORD = 0xC0000000; +pub const SIGNERSCORE_UNSIGNED: ::DWORD = 0x80000000; +pub const SIGNERSCORE_AUTHENTICODE: ::DWORD = 0x0F000000; +pub const SIGNERSCORE_WHQL: ::DWORD = 0x0D000005; +pub const SIGNERSCORE_UNCLASSIFIED: ::DWORD = 0x0D000004; +pub const SIGNERSCORE_INBOX: ::DWORD = 0x0D000003; +pub const SIGNERSCORE_LOGO_STANDARD: ::DWORD = 0x0D000002; +pub const SIGNERSCORE_LOGO_PREMIUM: ::DWORD = 0x0D000001; +pub const SIGNERSCORE_MASK: ::DWORD = 0xFF000000; +pub const SIGNERSCORE_SIGNED_MASK: ::DWORD = 0xF0000000; +pub const DICUSTOMDEVPROP_MERGE_MULTISZ: ::DWORD = 0x00000001; +pub const SCWMI_CLOBBER_SECURITY: ::DWORD = 0x00000001; diff --git a/deps/winapi-0.2.5/src/shellapi.rs b/deps/winapi-0.2.6/src/shellapi.rs similarity index 100% rename from deps/winapi-0.2.5/src/shellapi.rs rename to deps/winapi-0.2.6/src/shellapi.rs diff --git a/deps/winapi-0.2.5/src/shellscalingapi.rs b/deps/winapi-0.2.6/src/shellscalingapi.rs similarity index 100% rename from deps/winapi-0.2.5/src/shellscalingapi.rs rename to deps/winapi-0.2.6/src/shellscalingapi.rs diff --git a/deps/winapi-0.2.5/src/shlguid.rs b/deps/winapi-0.2.6/src/shlguid.rs similarity index 100% rename from deps/winapi-0.2.5/src/shlguid.rs rename to deps/winapi-0.2.6/src/shlguid.rs diff --git a/deps/winapi-0.2.5/src/shlobj.rs b/deps/winapi-0.2.6/src/shlobj.rs similarity index 100% rename from deps/winapi-0.2.5/src/shlobj.rs rename to deps/winapi-0.2.6/src/shlobj.rs diff --git a/deps/winapi-0.2.5/src/shobjidl.rs b/deps/winapi-0.2.6/src/shobjidl.rs similarity index 100% rename from deps/winapi-0.2.5/src/shobjidl.rs rename to deps/winapi-0.2.6/src/shobjidl.rs diff --git a/deps/winapi-0.2.6/src/shtypes.rs b/deps/winapi-0.2.6/src/shtypes.rs new file mode 100644 index 000000000..0bea4b1f7 --- /dev/null +++ b/deps/winapi-0.2.6/src/shtypes.rs @@ -0,0 +1,40 @@ +// Copyright © 2015, Peter Atashian +// Licensed under the MIT License <LICENSE.md> +//! this ALWAYS GENERATED file contains the definitions for the interfaces +#[repr(C)] #[allow(missing_copy_implementations)] +pub struct SHITEMID { + pub cb: ::USHORT, + pub abID: [::BYTE; 0], +} +pub type LPSHITEMID = *mut SHITEMID; +pub type LPCSHITEMID = *const SHITEMID; +#[repr(C)] +pub struct ITEMIDLIST { + pub mkid: SHITEMID, +} +pub type ITEMIDLIST_RELATIVE = ITEMIDLIST; +pub type ITEMID_CHILD = ITEMIDLIST; +pub type ITEMIDLIST_ABSOLUTE = ITEMIDLIST; +pub type LPITEMIDLIST = *mut ITEMIDLIST; +pub type LPCITEMIDLIST = *const ITEMIDLIST; +pub type PIDLIST_ABSOLUTE = *mut ITEMIDLIST_ABSOLUTE; +pub type PCIDLIST_ABSOLUTE = *const ITEMIDLIST_ABSOLUTE; +pub type PCUIDLIST_ABSOLUTE = *const ITEMIDLIST_ABSOLUTE; +pub type PIDLIST_RELATIVE = *mut ITEMIDLIST_RELATIVE; +pub type PCIDLIST_RELATIVE = *const ITEMIDLIST_RELATIVE; +pub type PUIDLIST_RELATIVE = *mut ITEMIDLIST_RELATIVE; +pub type PCUIDLIST_RELATIVE = *const ITEMIDLIST_RELATIVE; +pub type PITEMID_CHILD = *mut ITEMID_CHILD; +pub type PCITEMID_CHILD = *const ITEMID_CHILD; +pub type PUITEMID_CHILD = *mut ITEMID_CHILD; +pub type PCUITEMID_CHILD = *const ITEMID_CHILD; +pub type PCUITEMID_CHILD_ARRAY = *const PCUITEMID_CHILD; +pub type PCUIDLIST_RELATIVE_ARRAY = *const PCUIDLIST_RELATIVE; +pub type PCIDLIST_ABSOLUTE_ARRAY = *const PCIDLIST_ABSOLUTE; +pub type PCUIDLIST_ABSOLUTE_ARRAY = *const PCUIDLIST_ABSOLUTE; +STRUCT!{struct COMDLG_FILTERSPEC { + pszName: ::LPCWSTR, + pszSpec: ::LPCWSTR, +}} +pub type KNOWNFOLDERID = ::GUID; +pub type REFKNOWNFOLDERID = *const KNOWNFOLDERID; diff --git a/deps/winapi-0.2.5/src/spapidef.rs b/deps/winapi-0.2.6/src/spapidef.rs similarity index 100% rename from deps/winapi-0.2.5/src/spapidef.rs rename to deps/winapi-0.2.6/src/spapidef.rs diff --git a/deps/winapi-0.2.6/src/sql.rs b/deps/winapi-0.2.6/src/sql.rs new file mode 100644 index 000000000..503fa8162 --- /dev/null +++ b/deps/winapi-0.2.6/src/sql.rs @@ -0,0 +1,179 @@ +// Copyright © 2015, Peter Atashian +// Licensed under the MIT License <LICENSE.md> +pub const SQL_NULL_DATA: SQLLEN = -1; +pub const SQL_DATA_AT_EXEC: SQLLEN = -2; +pub const SQL_SUCCESS: SQLRETURN = 0; +pub const SQL_SUCCESS_WITH_INFO: SQLRETURN = 1; +pub const SQL_NO_DATA: SQLRETURN = 100; +pub const SQL_PARAM_DATA_AVAILABLE: SQLRETURN = 101; +pub const SQL_ERROR: SQLRETURN = -1; +pub const SQL_INVALID_HANDLE: SQLRETURN = -2; +pub const SQL_STILL_EXECUTING: SQLRETURN = 2; +pub const SQL_NEED_DATA: SQLRETURN = 99; +pub const SQL_NTS: SQLSMALLINT = -3; +pub const SQL_MAX_MESSAGE_LENGTH: usize = 512; +pub const SQL_DATE_LEN: usize = 10; +pub const SQL_TIME_LEN: usize = 8; +pub const SQL_TIMESTAMP_LEN: usize = 19; +pub const SQL_HANDLE_ENV: SQLSMALLINT = 1; +pub const SQL_HANDLE_DBC: SQLSMALLINT = 2; +pub const SQL_HANDLE_STMT: SQLSMALLINT = 3; +pub const SQL_HANDLE_DESC: SQLSMALLINT = 4; +pub const SQL_ATTR_OUTPUT_NTS: SQLINTEGER = 10001; +pub const SQL_ATTR_AUTO_IPD: SQLINTEGER = 10001; +pub const SQL_ATTR_METADATA_ID: SQLINTEGER = 10014; +pub const SQL_ATTR_APP_ROW_DESC: SQLINTEGER = 10010; +pub const SQL_ATTR_APP_PARAM_DESC: SQLINTEGER = 10011; +pub const SQL_ATTR_IMP_ROW_DESC: SQLINTEGER = 10012; +pub const SQL_ATTR_IMP_PARAM_DESC: SQLINTEGER = 10013; +pub const SQL_ATTR_CURSOR_SCROLLABLE: SQLINTEGER = -1; +pub const SQL_ATTR_CURSOR_SENSITIVITY: SQLINTEGER = -2; + +//Null handle used in place of parent handle when allocating HENV +pub const SQL_NULL_HANDLE: SQLHANDLE = 0 as SQLHANDLE; + +//Special length/indicator values + +//Return values from functions + + +//Values of NULLABLE field in descriptor +pub const SQL_NO_NULLS: SQLSMALLINT = 0; +pub const SQL_NULLABLE: SQLSMALLINT = 1; +pub const SQL_NULLABLE_UNKNOWN: SQLSMALLINT = 2; + +//Env attribute +pub const SQL_ATTR_ODBC_VERSION: SQLINTEGER = 200; +pub const SQL_ATTR_CONNECTION_POOLING: SQLINTEGER = 201; +pub const SQL_ATTR_CP_MATCH: SQLINTEGER = 202; + +//Values for SQL_ATTR_ODBC_VERSION +pub const SQL_OV_ODBC2: SQLINTEGER = 2; +pub const SQL_OV_ODBC3: SQLINTEGER = 3; +pub const SQL_OV_ODBC3_80: SQLINTEGER = 380; + +//Connection attributes +pub const SQL_ACCESS_MODE: SQLINTEGER = 101; +pub const SQL_AUTOCOMMIT: SQLINTEGER = 102; +pub const SQL_LOGIN_TIMEOUT: SQLINTEGER = 103; +pub const SQL_OPT_TRACE: SQLINTEGER = 104; +pub const SQL_OPT_TRACEFILE: SQLINTEGER = 105; +pub const SQL_TRANSLATE_DLL: SQLINTEGER = 106; +pub const SQL_TRANSLATE_OPTION: SQLINTEGER = 107; +pub const SQL_TXN_ISOLATION: SQLINTEGER = 108; +pub const SQL_CURRENT_QUALIFIER: SQLINTEGER = 109; +pub const SQL_ODBC_CURSORS: SQLINTEGER = 110; +pub const SQL_QUIET_MODE: SQLINTEGER = 111; +pub const SQL_PACKET_SIZE: SQLINTEGER = 112; + +//Connection attributes with new names +pub const SQL_ATTR_ACCESS_MODE: SQLINTEGER = SQL_ACCESS_MODE; +pub const SQL_ATTR_AUTOCOMMIT: SQLINTEGER = SQL_AUTOCOMMIT; +pub const SQL_ATTR_CONNECTION_TIMEOUT: SQLINTEGER = 113; +pub const SQL_ATTR_CURRENT_CATALOG: SQLINTEGER = SQL_CURRENT_QUALIFIER; +pub const SQL_ATTR_DISCONNECT_BEHAVIOR: SQLINTEGER = 114; +pub const SQL_ATTR_ENLIST_IN_DTC: SQLINTEGER = 1207; +pub const SQL_ATTR_ENLIST_IN_XA: SQLINTEGER = 1208; +pub const SQL_ATTR_LOGIN_TIMEOUT: SQLINTEGER = SQL_LOGIN_TIMEOUT; +pub const SQL_ATTR_ODBC_CURSORS: SQLINTEGER = SQL_ODBC_CURSORS; +pub const SQL_ATTR_PACKET_SIZE: SQLINTEGER = SQL_PACKET_SIZE; +pub const SQL_ATTR_QUIET_MODE: SQLINTEGER = SQL_QUIET_MODE; +pub const SQL_ATTR_TRACE: SQLINTEGER = SQL_OPT_TRACE; +pub const SQL_ATTR_TRACEFILE: SQLINTEGER = SQL_OPT_TRACEFILE; +pub const SQL_ATTR_TRANSLATE_LIB: SQLINTEGER = SQL_TRANSLATE_DLL; +pub const SQL_ATTR_TRANSLATE_OPTION: SQLINTEGER = SQL_TRANSLATE_OPTION; +pub const SQL_ATTR_TXN_ISOLATION: SQLINTEGER = SQL_TXN_ISOLATION; +pub const SQL_ATTR_CONNECTION_DEAD: SQLINTEGER = 1209; + +//Flags for null-terminated string +pub const SQL_NTS: SQLSMALLINT = -3; + +//Options for SQLDriverConnect +pub const SQL_DRIVER_NOPROMPT: SQLUSMALLINT = 0; +pub const SQL_DRIVER_COMPLETE: SQLUSMALLINT = 1; +pub const SQL_DRIVER_PROMPT: SQLUSMALLINT = 2; +pub const SQL_DRIVER_COMPLETE_REQUIRED: SQLUSMALLINT = 3; + +//Whether an attribute is a pointer or not +pub const SQL_IS_POINTER: SQLINTEGER = -4; +pub const SQL_IS_UINTEGER: SQLINTEGER = -5; +pub const SQL_IS_INTEGER: SQLINTEGER = -6; +pub const SQL_IS_USMALLINT: SQLINTEGER = -7; +pub const SQL_IS_SMALLINT: SQLINTEGER = -8; + +//FreeStmt options +pub const SQL_CLOSE: SQLUSMALLINT = 0; +pub const SQL_DROP: SQLUSMALLINT = 1; +pub const SQL_UNBIND: SQLUSMALLINT = 2; +pub const SQL_RESET_PARAMS: SQLUSMALLINT = 3; + +//C datatype to SQL datatype mapping +pub const SQL_UNKNOWN_TYPE: SQLSMALLINT = 0; +pub const SQL_CHAR: SQLSMALLINT = 1; +pub const SQL_NUMERIC: SQLSMALLINT = 2; +pub const SQL_DECIMAL: SQLSMALLINT = 3; +pub const SQL_INTEGER: SQLSMALLINT = 4; +pub const SQL_SMALLINT: SQLSMALLINT = 5; +pub const SQL_FLOAT: SQLSMALLINT = 6; +pub const SQL_REAL: SQLSMALLINT = 7; +pub const SQL_DOUBLE: SQLSMALLINT = 8; +pub const SQL_DATETIME: SQLSMALLINT = 9; +pub const SQL_VARCHAR: SQLSMALLINT = 12; + +pub const SQL_TYPE_DATE: SQLSMALLINT = 91; +pub const SQL_TYPE_TIME: SQLSMALLINT = 92; +pub const SQL_TYPE_TIMESTAMP: SQLSMALLINT = 93; + +pub const SQL_DATE: SQLSMALLINT = 9; +pub const SQL_INTERVAL: SQLSMALLINT = 10; +pub const SQL_TIME: SQLSMALLINT = 10; +pub const SQL_TIMESTAMP: SQLSMALLINT = 11; +pub const SQL_LONGVARCHAR: SQLSMALLINT = -1; +pub const SQL_BINARY: SQLSMALLINT = -2; +pub const SQL_VARBINARY: SQLSMALLINT = -3; +pub const SQL_LONGVARBINARY: SQLSMALLINT = -4; +pub const SQL_BIGINT: SQLSMALLINT = -5; +pub const SQL_TINYINT: SQLSMALLINT = -6; +pub const SQL_BIT: SQLSMALLINT = -7; +pub const SQL_GUID: SQLSMALLINT = -11; + +pub const SQL_C_CHAR: SQLSMALLINT = SQL_CHAR; +pub const SQL_C_LONG: SQLSMALLINT = SQL_INTEGER; +pub const SQL_C_SHORT: SQLSMALLINT = SQL_SMALLINT; +pub const SQL_C_FLOAT: SQLSMALLINT = SQL_REAL; +pub const SQL_C_DOUBLE: SQLSMALLINT = SQL_DOUBLE; +pub const SQL_C_NUMERIC: SQLSMALLINT = SQL_NUMERIC; +pub const SQL_C_DEFAULT: SQLSMALLINT = 99; + +pub const SQL_SIGNED_OFFSET: SQLSMALLINT = -20; +pub const SQL_UNSIGNED_OFFSET: SQLSMALLINT = -22; + +pub const SQL_C_DATE: SQLSMALLINT = SQL_DATE; +pub const SQL_C_TIME: SQLSMALLINT = SQL_TIME; +pub const SQL_C_TIMESTAMP: SQLSMALLINT = SQL_TIMESTAMP; + +pub const SQL_C_TYPE_DATE: SQLSMALLINT = SQL_TYPE_DATE; +pub const SQL_C_TYPE_TIME: SQLSMALLINT = SQL_TYPE_TIME; +pub const SQL_C_TYPE_TIMESTAMP: SQLSMALLINT = SQL_TYPE_TIMESTAMP; + +pub const SQL_C_BINARY: SQLSMALLINT = SQL_BINARY; +pub const SQL_C_BIT: SQLSMALLINT = SQL_BIT; +pub const SQL_C_SBIGINT: SQLSMALLINT = SQL_BIGINT + SQL_SIGNED_OFFSET; +pub const SQL_C_UBIGINT: SQLSMALLINT = SQL_BIGINT + SQL_UNSIGNED_OFFSET; +pub const SQL_C_TINYINT: SQLSMALLINT = SQL_TINYINT; +pub const SQL_C_SLONG: SQLSMALLINT = SQL_C_LONG + SQL_SIGNED_OFFSET; +pub const SQL_C_SSHORT: SQLSMALLINT = SQL_C_SHORT + SQL_SIGNED_OFFSET; +pub const SQL_C_STINYINT: SQLSMALLINT = SQL_TINYINT + SQL_SIGNED_OFFSET; +pub const SQL_C_ULONG: SQLSMALLINT = SQL_C_LONG + SQL_UNSIGNED_OFFSET; +pub const SQL_C_USHORT: SQLSMALLINT = SQL_C_SHORT + SQL_UNSIGNED_OFFSET; +pub const SQL_C_UTINYINT: SQLSMALLINT = SQL_TINYINT + SQL_UNSIGNED_OFFSET; + +pub const SQL_C_GUID: SQLSMALLINT = SQL_GUID; + +pub const SQL_WCHAR: SQLSMALLINT = -8; +pub const SQL_WVARCHAR: SQLSMALLINT = -9; +pub const SQL_WLONGVARCHAR: SQLSMALLINT = -10; +pub const SQL_C_WCHAR: SQLSMALLINT = SQL_WCHAR; + +pub const SQL_TYPE_NULL: SQLSMALLINT = 0; + diff --git a/deps/winapi-0.2.6/src/sqltypes.rs b/deps/winapi-0.2.6/src/sqltypes.rs new file mode 100644 index 000000000..a5ded3afc --- /dev/null +++ b/deps/winapi-0.2.6/src/sqltypes.rs @@ -0,0 +1,130 @@ +// Copyright © 2015, Peter Atashian +// Licensed under the MIT License <LICENSE.md> +pub type SQLCHAR = ::c_uchar; +pub type SQLSCHAR = ::c_schar; +pub type SQLDATE = ::c_uchar; +pub type SQLDECIMAL = ::c_uchar; +pub type SQLDOUBLE = ::c_double; +pub type SQLFLOAT = ::c_double; +pub type SQLINTEGER = ::c_long; +pub type SQLUINTEGER = ::c_ulong; +#[cfg(target_arch = "x86_64")] +pub type SQLLEN = ::INT64; +#[cfg(target_arch = "x86_64")] +pub type SQLULEN = ::UINT64; +#[cfg(target_arch = "x86_64")] +pub type SQLSETPOSIROW = ::UINT64; +#[cfg(target_arch = "x86")] +pub type SQLLEN = SQLINTEGER; +#[cfg(target_arch = "x86")] +pub type SQLULEN = SQLUINTEGER; +#[cfg(target_arch = "x86")] +pub type SQLSETPOSIROW = SQLUSMALLINT; +pub type SQLROWCOUNT = SQLULEN; +pub type SQLROWSETSIZE = SQLULEN; +pub type SQLTRANSID = SQLULEN; +pub type SQLROWOFFSET = SQLLEN; +pub type SQLNUMERIC = ::c_uchar; +pub type SQLPOINTER = *mut ::c_void; +pub type SQLREAL = ::c_float; +pub type SQLSMALLINT = ::c_short; +pub type SQLUSMALLINT = ::c_ushort; +pub type SQLTIME = ::c_uchar; +pub type SQLTIMESTAMP = ::c_uchar; +pub type SQLVARCHAR = ::c_uchar; +pub type SQLRETURN = SQLSMALLINT; +pub type SQLHANDLE = *mut ::c_void; +pub type SQLHENV = SQLHANDLE; +pub type SQLHDBC = SQLHANDLE; +pub type SQLHSTMT = SQLHANDLE; +pub type SQLHDESC = SQLHANDLE; +//pub type UCHAR = ::c_uchar; +pub type SCHAR = ::c_schar; +//pub type SQLSCHAR = SCHAR; +pub type SDWORD = ::c_long; +pub type SWORD = ::c_short; +pub type UDWORD = ::c_ulong; +//pub type UWORD = ::c_ushort; +//#[cfg(target_arch = "x86")] +//pub type SQLUINTEGER = ::UDWORD; +pub type SLONG = ::c_long; +pub type SSHORT = ::c_short; +//pub type ULONG = ::c_ulong; +//pub type USHORT = ::c_ushort; +pub type SDOUBLE = ::c_double; +pub type LDOUBLE = ::c_double; +pub type SFLOAT = ::c_float; +pub type PTR = *mut ::c_void; +pub type HENV = *mut ::c_void; +pub type HDBC = *mut ::c_void; +pub type HSTMT = *mut ::c_void; +pub type RETCODE = ::c_short; +pub type SQLHWND = ::HWND; +STRUCT!{struct DATE_STRUCT { + year: SQLSMALLINT, + month: SQLUSMALLINT, + day: SQLUSMALLINT, +}} +pub type SQL_DATE_STRUCT = DATE_STRUCT; +STRUCT!{struct TIME_STRUCT { + hour: SQLUSMALLINT, + minute: SQLUSMALLINT, + second: SQLUSMALLINT, +}} +pub type SQL_TIME_STRUCT = TIME_STRUCT; +STRUCT!{struct TIMESTAMP_STRUCT { + year: SQLSMALLINT, + month: SQLUSMALLINT, + day: SQLUSMALLINT, + hour: SQLUSMALLINT, + minute: SQLUSMALLINT, + second: SQLUSMALLINT, + fraction: SQLUINTEGER, +}} +pub type SQL_TIMESTAMP_STRUCT = TIMESTAMP_STRUCT; +ENUM!{enum SQLINTERVAL { + SQL_IS_YEAR = 1, + SQL_IS_MONTH = 2, + SQL_IS_DAY = 3, + SQL_IS_HOUR = 4, + SQL_IS_MINUTE = 5, + SQL_IS_SECOND = 6, + SQL_IS_YEAR_TO_MONTH = 7, + SQL_IS_DAY_TO_HOUR = 8, + SQL_IS_DAY_TO_MINUTE = 9, + SQL_IS_DAY_TO_SECOND = 10, + SQL_IS_HOUR_TO_MINUTE = 11, + SQL_IS_HOUR_TO_SECOND = 12, + SQL_IS_MINUTE_TO_SECOND = 13, +}} +STRUCT!{struct SQL_YEAR_MONTH_STRUCT { + year: SQLUINTEGER, + month: SQLUINTEGER, +}} +STRUCT!{struct SQL_DAY_SECOND_STRUCT { + day: SQLUINTEGER, + hour: SQLUINTEGER, + minute: SQLUINTEGER, + second: SQLUINTEGER, + fraction: SQLUINTEGER, +}} +STRUCT!{struct SQL_INTERVAL_STRUCT { + interval_type: SQLINTERVAL, + interval_sign: SQLSMALLINT, + intval: [u32; 5], +}} +UNION!{SQL_INTERVAL_STRUCT, intval, year_month, year_month_mut, SQL_YEAR_MONTH_STRUCT} +UNION!{SQL_INTERVAL_STRUCT, intval, day_second, day_second_mut, SQL_DAY_SECOND_STRUCT} +pub type ODBCINT64 = ::__int64; +pub type SQLBIGINT = ODBCINT64; +pub type SQLUBIGINT = ::__uint64; +pub const SQL_MAX_NUMERIC_LEN: usize = 16; +STRUCT!{struct SQL_NUMERIC_STRUCT { + precision: SQLCHAR, + scale: SQLSCHAR, + sign: SQLCHAR, + val: [SQLCHAR; SQL_MAX_NUMERIC_LEN], +}} +pub type SQLGUID = ::GUID; +pub type BOOKMARK = SQLULEN; +pub type SQLWCHAR = ::wchar_t; diff --git a/deps/winapi-0.2.6/src/sspi.rs b/deps/winapi-0.2.6/src/sspi.rs new file mode 100644 index 000000000..688fe70c7 --- /dev/null +++ b/deps/winapi-0.2.6/src/sspi.rs @@ -0,0 +1,657 @@ +// Copyright © 2015, Peter Atashian +// Licensed under the MIT License <LICENSE.md> +//! Security Support Provider Interface Prototypes and structure definitions +pub type SEC_WCHAR = ::WCHAR; +pub type SEC_CHAR = ::CHAR; +pub type SECURITY_STATUS = ::LONG; +STRUCT!{struct SecHandle { + dwLower: ::ULONG_PTR, + dwUpper: ::ULONG_PTR, +}} +pub type PSecHandle = *mut SecHandle; +pub const SEC_DELETED_HANDLE: ::ULONG_PTR = 2; +pub type CredHandle = SecHandle; +pub type PCredHandle = PSecHandle; +pub type CtxtHandle = SecHandle; +pub type PCtxtHandle = PSecHandle; +pub type SECURITY_INTEGER = ::LARGE_INTEGER; +pub type PSECURITY_INTEGER = *mut ::LARGE_INTEGER; +pub type TimeStamp = SECURITY_INTEGER; +pub type PTimeStamp = *mut SECURITY_INTEGER; +STRUCT!{struct SECURITY_STRING { + Length: ::c_ushort, + MaximumLength: ::c_ushort, + Buffer: *mut ::c_ushort, +}} +pub type PSECURITY_STRING = *mut SECURITY_STRING; +STRUCT!{struct SecPkgInfoW { + fCapabilities: ::c_ulong, + wVersion: ::c_ushort, + wRPCID: ::c_ushort, + cbMaxToken: ::c_ulong, + Name: *mut SEC_WCHAR, + Comment: *mut SEC_WCHAR, +}} +pub type PSecPkgInfoW = *mut SecPkgInfoW; +STRUCT!{struct SecPkgInfoA { + fCapabilities: ::c_ulong, + wVersion: ::c_ushort, + wRPCID: ::c_ushort, + cbMaxToken: ::c_ulong, + Name: *mut SEC_CHAR, + Comment: *mut SEC_CHAR, +}} +pub type PSecPkgInfoA = *mut SecPkgInfoA; +pub const SECPKG_FLAG_INTEGRITY: ::c_ulong = 0x00000001; +pub const SECPKG_FLAG_PRIVACY: ::c_ulong = 0x00000002; +pub const SECPKG_FLAG_TOKEN_ONLY: ::c_ulong = 0x00000004; +pub const SECPKG_FLAG_DATAGRAM: ::c_ulong = 0x00000008; +pub const SECPKG_FLAG_CONNECTION: ::c_ulong = 0x00000010; +pub const SECPKG_FLAG_MULTI_REQUIRED: ::c_ulong = 0x00000020; +pub const SECPKG_FLAG_CLIENT_ONLY: ::c_ulong = 0x00000040; +pub const SECPKG_FLAG_EXTENDED_ERROR: ::c_ulong = 0x00000080; +pub const SECPKG_FLAG_IMPERSONATION: ::c_ulong = 0x00000100; +pub const SECPKG_FLAG_ACCEPT_WIN32_NAME: ::c_ulong = 0x00000200; +pub const SECPKG_FLAG_STREAM: ::c_ulong = 0x00000400; +pub const SECPKG_FLAG_NEGOTIABLE: ::c_ulong = 0x00000800; +pub const SECPKG_FLAG_GSS_COMPATIBLE: ::c_ulong = 0x00001000; +pub const SECPKG_FLAG_LOGON: ::c_ulong = 0x00002000; +pub const SECPKG_FLAG_ASCII_BUFFERS: ::c_ulong = 0x00004000; +pub const SECPKG_FLAG_FRAGMENT: ::c_ulong = 0x00008000; +pub const SECPKG_FLAG_MUTUAL_AUTH: ::c_ulong = 0x00010000; +pub const SECPKG_FLAG_DELEGATION: ::c_ulong = 0x00020000; +pub const SECPKG_FLAG_READONLY_WITH_CHECKSUM: ::c_ulong = 0x00040000; +pub const SECPKG_FLAG_RESTRICTED_TOKENS: ::c_ulong = 0x00080000; +pub const SECPKG_FLAG_NEGO_EXTENDER: ::c_ulong = 0x00100000; +pub const SECPKG_FLAG_NEGOTIABLE2: ::c_ulong = 0x00200000; +pub const SECPKG_FLAG_APPCONTAINER_PASSTHROUGH: ::c_ulong = 0x00400000; +pub const SECPKG_FLAG_APPCONTAINER_CHECKS: ::c_ulong = 0x00800000; +pub const SECPKG_ID_NONE: ::c_ulong = 0xFFFF; +pub const SECPKG_CALLFLAGS_APPCONTAINER: ::c_ulong = 0x00000001; +pub const SECPKG_CALLFLAGS_APPCONTAINER_AUTHCAPABLE: ::c_ulong = 0x00000002; +pub const SECPKG_CALLFLAGS_FORCE_SUPPLIED: ::c_ulong = 0x00000004; +STRUCT!{struct SecBuffer { + cbBuffer: ::c_ulong, + BufferType: ::c_ulong, + pvBuffer: *mut ::c_void, +}} +pub type PSecBuffer = *mut SecBuffer; +STRUCT!{struct SecBufferDesc { + ulVersion: ::c_ulong, + cBuffers: ::c_ulong, + pBuffers: PSecBuffer, +}} +pub type PSecBufferDesc = *mut SecBufferDesc; +pub const SECBUFFER_VERSION: ::c_ulong = 0; +pub const SECBUFFER_EMPTY: ::c_ulong = 0; +pub const SECBUFFER_DATA: ::c_ulong = 1; +pub const SECBUFFER_TOKEN: ::c_ulong = 2; +pub const SECBUFFER_PKG_PARAMS: ::c_ulong = 3; +pub const SECBUFFER_MISSING: ::c_ulong = 4; +pub const SECBUFFER_EXTRA: ::c_ulong = 5; +pub const SECBUFFER_STREAM_TRAILER: ::c_ulong = 6; +pub const SECBUFFER_STREAM_HEADER: ::c_ulong = 7; +pub const SECBUFFER_NEGOTIATION_INFO: ::c_ulong = 8; +pub const SECBUFFER_PADDING: ::c_ulong = 9; +pub const SECBUFFER_STREAM: ::c_ulong = 10; +pub const SECBUFFER_MECHLIST: ::c_ulong = 11; +pub const SECBUFFER_MECHLIST_SIGNATURE: ::c_ulong = 12; +pub const SECBUFFER_TARGET: ::c_ulong = 13; +pub const SECBUFFER_CHANNEL_BINDINGS: ::c_ulong = 14; +pub const SECBUFFER_CHANGE_PASS_RESPONSE: ::c_ulong = 15; +pub const SECBUFFER_TARGET_HOST: ::c_ulong = 16; +pub const SECBUFFER_ALERT: ::c_ulong = 17; +pub const SECBUFFER_APPLICATION_PROTOCOLS: ::c_ulong = 18; +pub const SECBUFFER_ATTRMASK: ::c_ulong = 0xF0000000; +pub const SECBUFFER_READONLY: ::c_ulong = 0x80000000; +pub const SECBUFFER_READONLY_WITH_CHECKSUM: ::c_ulong = 0x10000000; +pub const SECBUFFER_RESERVED: ::c_ulong = 0x60000000; +STRUCT!{struct SEC_NEGOTIATION_INFO { + Size: ::c_ulong, + NameLength: ::c_ulong, + Name: *mut SEC_WCHAR, + Reserved: *mut ::c_void, +}} +pub type PSEC_NEGOTIATION_INFO = *mut SEC_NEGOTIATION_INFO; +STRUCT!{struct SEC_CHANNEL_BINDINGS { + dwInitiatorAddrType: ::c_ulong, + cbInitiatorLength: ::c_ulong, + dwInitiatorOffset: ::c_ulong, + dwAcceptorAddrType: ::c_ulong, + cbAcceptorLength: ::c_ulong, + dwAcceptorOffset: ::c_ulong, + cbApplicationDataLength: ::c_ulong, + dwApplicationDataOffset: ::c_ulong, +}} +pub type PSEC_CHANNEL_BINDINGS = *mut SEC_CHANNEL_BINDINGS; +ENUM!{enum SEC_APPLICATION_PROTOCOL_NEGOTIATION_EXT { + SecApplicationProtocolNegotiationExt_None, + SecApplicationProtocolNegotiationExt_NPN, + SecApplicationProtocolNegotiationExt_ALPN, +}} +pub type PSEC_APPLICATION_PROTOCOL_NEGOTIATION_EXT = *mut SEC_APPLICATION_PROTOCOL_NEGOTIATION_EXT; +STRUCT!{struct SEC_APPLICATION_PROTOCOL_LIST { + ProtoNegoExt: ::SEC_APPLICATION_PROTOCOL_NEGOTIATION_EXT, + ProtocolListSize: ::c_ushort, + ProtocolList: [::c_uchar; 0], +}} +STRUCT!{struct SEC_APPLICATION_PROTOCOLS { + ProtocolListsSize: ::c_ulong, + ProtocolLists: [SEC_APPLICATION_PROTOCOL_LIST; 0], +}} +pub type PSEC_APPLICATION_PROTOCOLS = *mut SEC_APPLICATION_PROTOCOLS; +pub const SECURITY_NATIVE_DREP: ::c_ulong = 0x00000010; +pub const SECURITY_NETWORK_DREP: ::c_ulong = 0x00000000; +pub const SECPKG_CRED_INBOUND: ::c_ulong = 0x00000001; +pub const SECPKG_CRED_OUTBOUND: ::c_ulong = 0x00000002; +pub const SECPKG_CRED_BOTH: ::c_ulong = 0x00000003; +pub const SECPKG_CRED_DEFAULT: ::c_ulong = 0x00000004; +pub const SECPKG_CRED_RESERVED: ::c_ulong = 0xF0000000; +pub const SECPKG_CRED_AUTOLOGON_RESTRICTED: ::c_ulong = 0x00000010; +pub const SECPKG_CRED_PROCESS_POLICY_ONLY: ::c_ulong = 0x00000020; +pub const ISC_REQ_DELEGATE: ::c_ulong = 0x00000001; +pub const ISC_REQ_MUTUAL_AUTH: ::c_ulong = 0x00000002; +pub const ISC_REQ_REPLAY_DETECT: ::c_ulong = 0x00000004; +pub const ISC_REQ_SEQUENCE_DETECT: ::c_ulong = 0x00000008; +pub const ISC_REQ_CONFIDENTIALITY: ::c_ulong = 0x00000010; +pub const ISC_REQ_USE_SESSION_KEY: ::c_ulong = 0x00000020; +pub const ISC_REQ_PROMPT_FOR_CREDS: ::c_ulong = 0x00000040; +pub const ISC_REQ_USE_SUPPLIED_CREDS: ::c_ulong = 0x00000080; +pub const ISC_REQ_ALLOCATE_MEMORY: ::c_ulong = 0x00000100; +pub const ISC_REQ_USE_DCE_STYLE: ::c_ulong = 0x00000200; +pub const ISC_REQ_DATAGRAM: ::c_ulong = 0x00000400; +pub const ISC_REQ_CONNECTION: ::c_ulong = 0x00000800; +pub const ISC_REQ_CALL_LEVEL: ::c_ulong = 0x00001000; +pub const ISC_REQ_FRAGMENT_SUPPLIED: ::c_ulong = 0x00002000; +pub const ISC_REQ_EXTENDED_ERROR: ::c_ulong = 0x00004000; +pub const ISC_REQ_STREAM: ::c_ulong = 0x00008000; +pub const ISC_REQ_INTEGRITY: ::c_ulong = 0x00010000; +pub const ISC_REQ_IDENTIFY: ::c_ulong = 0x00020000; +pub const ISC_REQ_NULL_SESSION: ::c_ulong = 0x00040000; +pub const ISC_REQ_MANUAL_CRED_VALIDATION: ::c_ulong = 0x00080000; +pub const ISC_REQ_RESERVED1: ::c_ulong = 0x00100000; +pub const ISC_REQ_FRAGMENT_TO_FIT: ::c_ulong = 0x00200000; +pub const ISC_REQ_FORWARD_CREDENTIALS: ::c_ulong = 0x00400000; +pub const ISC_REQ_NO_INTEGRITY: ::c_ulong = 0x00800000; +pub const ISC_REQ_USE_HTTP_STYLE: ::c_ulong = 0x01000000; +pub const ISC_REQ_UNVERIFIED_TARGET_NAME: ::c_ulong = 0x20000000; +pub const ISC_REQ_CONFIDENTIALITY_ONLY: ::c_ulong = 0x40000000; +pub const ISC_RET_DELEGATE: ::c_ulong = 0x00000001; +pub const ISC_RET_MUTUAL_AUTH: ::c_ulong = 0x00000002; +pub const ISC_RET_REPLAY_DETECT: ::c_ulong = 0x00000004; +pub const ISC_RET_SEQUENCE_DETECT: ::c_ulong = 0x00000008; +pub const ISC_RET_CONFIDENTIALITY: ::c_ulong = 0x00000010; +pub const ISC_RET_USE_SESSION_KEY: ::c_ulong = 0x00000020; +pub const ISC_RET_USED_COLLECTED_CREDS: ::c_ulong = 0x00000040; +pub const ISC_RET_USED_SUPPLIED_CREDS: ::c_ulong = 0x00000080; +pub const ISC_RET_ALLOCATED_MEMORY: ::c_ulong = 0x00000100; +pub const ISC_RET_USED_DCE_STYLE: ::c_ulong = 0x00000200; +pub const ISC_RET_DATAGRAM: ::c_ulong = 0x00000400; +pub const ISC_RET_CONNECTION: ::c_ulong = 0x00000800; +pub const ISC_RET_INTERMEDIATE_RETURN: ::c_ulong = 0x00001000; +pub const ISC_RET_CALL_LEVEL: ::c_ulong = 0x00002000; +pub const ISC_RET_EXTENDED_ERROR: ::c_ulong = 0x00004000; +pub const ISC_RET_STREAM: ::c_ulong = 0x00008000; +pub const ISC_RET_INTEGRITY: ::c_ulong = 0x00010000; +pub const ISC_RET_IDENTIFY: ::c_ulong = 0x00020000; +pub const ISC_RET_NULL_SESSION: ::c_ulong = 0x00040000; +pub const ISC_RET_MANUAL_CRED_VALIDATION: ::c_ulong = 0x00080000; +pub const ISC_RET_RESERVED1: ::c_ulong = 0x00100000; +pub const ISC_RET_FRAGMENT_ONLY: ::c_ulong = 0x00200000; +pub const ISC_RET_FORWARD_CREDENTIALS: ::c_ulong = 0x00400000; +pub const ISC_RET_USED_HTTP_STYLE: ::c_ulong = 0x01000000; +pub const ISC_RET_NO_ADDITIONAL_TOKEN: ::c_ulong = 0x02000000; +pub const ISC_RET_REAUTHENTICATION: ::c_ulong = 0x08000000; +pub const ISC_RET_CONFIDENTIALITY_ONLY: ::c_ulong = 0x40000000; +pub const ASC_REQ_DELEGATE: ::c_ulong = 0x00000001; +pub const ASC_REQ_MUTUAL_AUTH: ::c_ulong = 0x00000002; +pub const ASC_REQ_REPLAY_DETECT: ::c_ulong = 0x00000004; +pub const ASC_REQ_SEQUENCE_DETECT: ::c_ulong = 0x00000008; +pub const ASC_REQ_CONFIDENTIALITY: ::c_ulong = 0x00000010; +pub const ASC_REQ_USE_SESSION_KEY: ::c_ulong = 0x00000020; +pub const ASC_REQ_SESSION_TICKET: ::c_ulong = 0x00000040; +pub const ASC_REQ_ALLOCATE_MEMORY: ::c_ulong = 0x00000100; +pub const ASC_REQ_USE_DCE_STYLE: ::c_ulong = 0x00000200; +pub const ASC_REQ_DATAGRAM: ::c_ulong = 0x00000400; +pub const ASC_REQ_CONNECTION: ::c_ulong = 0x00000800; +pub const ASC_REQ_CALL_LEVEL: ::c_ulong = 0x00001000; +pub const ASC_REQ_EXTENDED_ERROR: ::c_ulong = 0x00008000; +pub const ASC_REQ_STREAM: ::c_ulong = 0x00010000; +pub const ASC_REQ_INTEGRITY: ::c_ulong = 0x00020000; +pub const ASC_REQ_LICENSING: ::c_ulong = 0x00040000; +pub const ASC_REQ_IDENTIFY: ::c_ulong = 0x00080000; +pub const ASC_REQ_ALLOW_NULL_SESSION: ::c_ulong = 0x00100000; +pub const ASC_REQ_ALLOW_NON_USER_LOGONS: ::c_ulong = 0x00200000; +pub const ASC_REQ_ALLOW_CONTEXT_REPLAY: ::c_ulong = 0x00400000; +pub const ASC_REQ_FRAGMENT_TO_FIT: ::c_ulong = 0x00800000; +pub const ASC_REQ_FRAGMENT_SUPPLIED: ::c_ulong = 0x00002000; +pub const ASC_REQ_NO_TOKEN: ::c_ulong = 0x01000000; +pub const ASC_REQ_PROXY_BINDINGS: ::c_ulong = 0x04000000; +pub const ASC_REQ_ALLOW_MISSING_BINDINGS: ::c_ulong = 0x10000000; +pub const ASC_RET_DELEGATE: ::c_ulong = 0x00000001; +pub const ASC_RET_MUTUAL_AUTH: ::c_ulong = 0x00000002; +pub const ASC_RET_REPLAY_DETECT: ::c_ulong = 0x00000004; +pub const ASC_RET_SEQUENCE_DETECT: ::c_ulong = 0x00000008; +pub const ASC_RET_CONFIDENTIALITY: ::c_ulong = 0x00000010; +pub const ASC_RET_USE_SESSION_KEY: ::c_ulong = 0x00000020; +pub const ASC_RET_SESSION_TICKET: ::c_ulong = 0x00000040; +pub const ASC_RET_ALLOCATED_MEMORY: ::c_ulong = 0x00000100; +pub const ASC_RET_USED_DCE_STYLE: ::c_ulong = 0x00000200; +pub const ASC_RET_DATAGRAM: ::c_ulong = 0x00000400; +pub const ASC_RET_CONNECTION: ::c_ulong = 0x00000800; +pub const ASC_RET_CALL_LEVEL: ::c_ulong = 0x00002000; +pub const ASC_RET_THIRD_LEG_FAILED: ::c_ulong = 0x00004000; +pub const ASC_RET_EXTENDED_ERROR: ::c_ulong = 0x00008000; +pub const ASC_RET_STREAM: ::c_ulong = 0x00010000; +pub const ASC_RET_INTEGRITY: ::c_ulong = 0x00020000; +pub const ASC_RET_LICENSING: ::c_ulong = 0x00040000; +pub const ASC_RET_IDENTIFY: ::c_ulong = 0x00080000; +pub const ASC_RET_NULL_SESSION: ::c_ulong = 0x00100000; +pub const ASC_RET_ALLOW_NON_USER_LOGONS: ::c_ulong = 0x00200000; +pub const ASC_RET_ALLOW_CONTEXT_REPLAY: ::c_ulong = 0x00400000; +pub const ASC_RET_FRAGMENT_ONLY: ::c_ulong = 0x00800000; +pub const ASC_RET_NO_TOKEN: ::c_ulong = 0x01000000; +pub const ASC_RET_NO_ADDITIONAL_TOKEN: ::c_ulong = 0x02000000; +pub const SECPKG_CRED_ATTR_NAMES: ::c_ulong = 1; +pub const SECPKG_CRED_ATTR_SSI_PROVIDER: ::c_ulong = 2; +pub const SECPKG_CRED_ATTR_KDC_PROXY_SETTINGS: ::c_ulong = 3; +pub const SECPKG_CRED_ATTR_CERT: ::c_ulong = 4; +STRUCT!{struct SecPkgCredentials_NamesW { + sUserName: *mut SEC_WCHAR, +}} +pub type PSecPkgCredentials_NamesW = *mut SecPkgCredentials_NamesW; +STRUCT!{struct SecPkgCredentials_NamesA { + sUserName: *mut SEC_CHAR, +}} +pub type PSecPkgCredentials_NamesA = *mut SecPkgCredentials_NamesA; +STRUCT!{struct SecPkgCredentials_SSIProviderW { + sProviderName: *mut SEC_WCHAR, + ProviderInfoLength: ::c_ulong, + ProviderInfo: *mut ::c_char, +}} +pub type PSecPkgCredentials_SSIProviderW = *mut SecPkgCredentials_SSIProviderW; +STRUCT!{struct SecPkgCredentials_SSIProviderA { + sProviderName: *mut SEC_CHAR, + ProviderInfoLength: ::c_ulong, + ProviderInfo: *mut ::c_char, +}} +pub type PSecPkgCredentials_SSIProviderA = *mut SecPkgCredentials_SSIProviderA; +pub const KDC_PROXY_SETTINGS_V1: ::ULONG = 1; +pub const KDC_PROXY_SETTINGS_FLAGS_FORCEPROXY: ::ULONG = 0x1; +STRUCT!{struct SecPkgCredentials_KdcProxySettingsW { + Version: ::ULONG, + Flags: ::ULONG, + ProxyServerOffset: ::USHORT, + ProxyServerLength: ::USHORT, + ClientTlsCredOffset: ::USHORT, + ClientTlsCredLength: ::USHORT, +}} +pub type PSecPkgCredentials_KdcProxySettingsW = *mut SecPkgCredentials_KdcProxySettingsW; +STRUCT!{struct SecPkgCredentials_Cert { + EncodedCertSize: ::c_ulong, + EncodedCert: *mut ::c_uchar, +}} +pub type PSecPkgCredentials_Cert = *mut SecPkgCredentials_Cert; +pub const SECPKG_ATTR_SIZES: ::c_ulong = 0; +pub const SECPKG_ATTR_NAMES: ::c_ulong = 1; +pub const SECPKG_ATTR_LIFESPAN: ::c_ulong = 2; +pub const SECPKG_ATTR_DCE_INFO: ::c_ulong = 3; +pub const SECPKG_ATTR_STREAM_SIZES: ::c_ulong = 4; +pub const SECPKG_ATTR_KEY_INFO: ::c_ulong = 5; +pub const SECPKG_ATTR_AUTHORITY: ::c_ulong = 6; +pub const SECPKG_ATTR_PROTO_INFO: ::c_ulong = 7; +pub const SECPKG_ATTR_PASSWORD_EXPIRY: ::c_ulong = 8; +pub const SECPKG_ATTR_SESSION_KEY: ::c_ulong = 9; +pub const SECPKG_ATTR_PACKAGE_INFO: ::c_ulong = 10; +pub const SECPKG_ATTR_USER_FLAGS: ::c_ulong = 11; +pub const SECPKG_ATTR_NEGOTIATION_INFO: ::c_ulong = 12; +pub const SECPKG_ATTR_NATIVE_NAMES: ::c_ulong = 13; +pub const SECPKG_ATTR_FLAGS: ::c_ulong = 14; +pub const SECPKG_ATTR_USE_VALIDATED: ::c_ulong = 15; +pub const SECPKG_ATTR_CREDENTIAL_NAME: ::c_ulong = 16; +pub const SECPKG_ATTR_TARGET_INFORMATION: ::c_ulong = 17; +pub const SECPKG_ATTR_ACCESS_TOKEN: ::c_ulong = 18; +pub const SECPKG_ATTR_TARGET: ::c_ulong = 19; +pub const SECPKG_ATTR_AUTHENTICATION_ID: ::c_ulong = 20; +pub const SECPKG_ATTR_LOGOFF_TIME: ::c_ulong = 21; +pub const SECPKG_ATTR_NEGO_KEYS: ::c_ulong = 22; +pub const SECPKG_ATTR_PROMPTING_NEEDED: ::c_ulong = 24; +pub const SECPKG_ATTR_UNIQUE_BINDINGS: ::c_ulong = 25; +pub const SECPKG_ATTR_ENDPOINT_BINDINGS: ::c_ulong = 26; +pub const SECPKG_ATTR_CLIENT_SPECIFIED_TARGET: ::c_ulong = 27; +pub const SECPKG_ATTR_LAST_CLIENT_TOKEN_STATUS: ::c_ulong = 30; +pub const SECPKG_ATTR_NEGO_PKG_INFO: ::c_ulong = 31; +pub const SECPKG_ATTR_NEGO_STATUS: ::c_ulong = 32; +pub const SECPKG_ATTR_CONTEXT_DELETED: ::c_ulong = 33; +pub const SECPKG_ATTR_DTLS_MTU: ::c_ulong = 34; +pub const SECPKG_ATTR_DATAGRAM_SIZES: ::c_ulong = SECPKG_ATTR_STREAM_SIZES; +pub const SECPKG_ATTR_SUBJECT_SECURITY_ATTRIBUTES: ::c_ulong = 128; +pub const SECPKG_ATTR_APPLICATION_PROTOCOL: ::c_ulong = 35; +STRUCT!{struct SecPkgContext_SubjectAttributes { + AttributeInfo: *mut ::c_void, +}} +pub type PSecPkgContext_SubjectAttributes = *mut SecPkgContext_SubjectAttributes; +pub const SECPKG_ATTR_NEGO_INFO_FLAG_NO_KERBEROS: ::c_ulong = 0x1; +pub const SECPKG_ATTR_NEGO_INFO_FLAG_NO_NTLM: ::c_ulong = 0x2; +ENUM!{enum SECPKG_CRED_CLASS { + SecPkgCredClass_None = 0, + SecPkgCredClass_Ephemeral = 10, + SecPkgCredClass_PersistedGeneric = 20, + SecPkgCredClass_PersistedSpecific = 30, + SecPkgCredClass_Explicit = 40, +}} +pub type PSECPKG_CRED_CLASS = *mut SECPKG_CRED_CLASS; +STRUCT!{struct SecPkgContext_CredInfo { + CredClass: SECPKG_CRED_CLASS, + IsPromptingNeeded: ::c_ulong, +}} +pub type PSecPkgContext_CredInfo = *mut SecPkgContext_CredInfo; +STRUCT!{struct SecPkgContext_NegoPackageInfo { + PackageMask: ::c_ulong, +}} +pub type PSecPkgContext_NegoPackageInfo = *mut SecPkgContext_NegoPackageInfo; +STRUCT!{struct SecPkgContext_NegoStatus { + LastStatus: ::c_ulong, +}} +pub type PSecPkgContext_NegoStatus = *mut SecPkgContext_NegoStatus; +STRUCT!{struct SecPkgContext_Sizes { + cbMaxToken: ::c_ulong, + cbMaxSignature: ::c_ulong, + cbBlockSize: ::c_ulong, + cbSecurityTrailer: ::c_ulong, +}} +pub type PSecPkgContext_Sizes = *mut SecPkgContext_Sizes; +STRUCT!{struct SecPkgContext_StreamSizes { + cbHeader: ::c_ulong, + cbTrailer: ::c_ulong, + cbMaximumMessage: ::c_ulong, + cBuffers: ::c_ulong, + cbBlockSize: ::c_ulong, +}} +pub type PSecPkgContext_StreamSizes = *mut SecPkgContext_StreamSizes; +pub type SecPkgContext_DatagramSizes = SecPkgContext_StreamSizes; +pub type PSecPkgContext_DatagramSizes = PSecPkgContext_StreamSizes; +STRUCT!{struct SecPkgContext_NamesW { + sUserName: *mut SEC_WCHAR, +}} +pub type PSecPkgContext_NamesW = *mut SecPkgContext_NamesW; +ENUM!{enum SECPKG_ATTR_LCT_STATUS { + SecPkgAttrLastClientTokenYes, + SecPkgAttrLastClientTokenNo, + SecPkgAttrLastClientTokenMaybe, +}} +pub type PSECPKG_ATTR_LCT_STATUS = *mut SECPKG_ATTR_LCT_STATUS; +STRUCT!{struct SecPkgContext_LastClientTokenStatus { + LastClientTokenStatus: SECPKG_ATTR_LCT_STATUS, +}} +pub type PSecPkgContext_LastClientTokenStatus = *mut SecPkgContext_LastClientTokenStatus; +STRUCT!{struct SecPkgContext_NamesA { + sUserName: *mut SEC_CHAR, +}} +pub type PSecPkgContext_NamesA = *mut SecPkgContext_NamesA; +STRUCT!{struct SecPkgContext_Lifespan { + tsStart: TimeStamp, + tsExpiry: TimeStamp, +}} +pub type PSecPkgContext_Lifespan = *mut SecPkgContext_Lifespan; +STRUCT!{struct SecPkgContext_DceInfo { + AuthzSvc: ::c_ulong, + pPac: *mut ::c_void, +}} +pub type PSecPkgContext_DceInfo = *mut SecPkgContext_DceInfo; +STRUCT!{struct SecPkgContext_KeyInfoA { + sSignatureAlgorithmName: *mut ::SEC_CHAR, + sEncryptAlgorithmName: *mut ::SEC_CHAR, + KeySize: ::c_ulong, + SignatureAlgorithm: ::c_ulong, + EncryptAlgorithm: ::c_ulong, +}} +pub type PSecPkgContext_KeyInfoA = *mut SecPkgContext_KeyInfoA; +STRUCT!{struct SecPkgContext_KeyInfoW { + sSignatureAlgorithmName: *mut ::SEC_WCHAR, + sEncryptAlgorithmName: *mut ::SEC_WCHAR, + KeySize: ::c_ulong, + SignatureAlgorithm: ::c_ulong, + EncryptAlgorithm: ::c_ulong, +}} +pub type PSecPkgContext_KeyInfoW = *mut SecPkgContext_KeyInfoW; +STRUCT!{struct SecPkgContext_AuthorityA { + sAuthorityName: *mut SEC_CHAR, +}} +pub type PSecPkgContext_AuthorityA = *mut SecPkgContext_AuthorityA; +STRUCT!{struct SecPkgContext_AuthorityW { + sAuthorityName: *mut SEC_WCHAR, +}} +pub type PSecPkgContext_AuthorityW = *mut SecPkgContext_AuthorityW; +STRUCT!{struct SecPkgContext_ProtoInfoA { + sProtocolName: *mut SEC_CHAR, + majorVersion: ::c_ulong, + minorVersion: ::c_ulong, +}} +pub type PSecPkgContext_ProtoInfoA = *mut SecPkgContext_ProtoInfoA; +STRUCT!{struct SecPkgContext_ProtoInfoW { + sProtocolName: *mut SEC_WCHAR, + majorVersion: ::c_ulong, + minorVersion: ::c_ulong, +}} +pub type PSecPkgContext_ProtoInfoW = *mut SecPkgContext_ProtoInfoW; +STRUCT!{struct SecPkgContext_PasswordExpiry { + tsPasswordExpires: TimeStamp, +}} +pub type PSecPkgContext_PasswordExpiry = *mut SecPkgContext_PasswordExpiry; +STRUCT!{struct SecPkgContext_LogoffTime { + tsLogoffTime: TimeStamp, +}} +pub type PSecPkgContext_LogoffTime = *mut SecPkgContext_LogoffTime; +STRUCT!{struct SecPkgContext_SessionKey { + SessionKeyLength: ::c_ulong, + SessionKey: *mut ::c_uchar, +}} +pub type PSecPkgContext_SessionKey = *mut SecPkgContext_SessionKey; +STRUCT!{struct SecPkgContext_NegoKeys { + KeyType: ::c_ulong, + KeyLength: ::c_ushort, + KeyValue: *mut ::c_uchar, + VerifyKeyType: ::c_ulong, + VerifyKeyLength: ::c_ushort, + VerifyKeyValue: *mut ::c_uchar, +}} +pub type PSecPkgContext_NegoKeys = *mut SecPkgContext_NegoKeys; +STRUCT!{struct SecPkgContext_PackageInfoW { + PackageInfo: PSecPkgInfoW, +}} +pub type PSecPkgContext_PackageInfoW = *mut SecPkgContext_PackageInfoW; +STRUCT!{struct SecPkgContext_PackageInfoA { + PackageInfo: PSecPkgInfoA, +}} +pub type PSecPkgContext_PackageInfoA = *mut SecPkgContext_PackageInfoA; +STRUCT!{struct SecPkgContext_UserFlags { + UserFlags: ::c_ulong, +}} +pub type PSecPkgContext_UserFlags = *mut SecPkgContext_UserFlags; +STRUCT!{struct SecPkgContext_Flags { + Flags: ::c_ulong, +}} +pub type PSecPkgContext_Flags = *mut SecPkgContext_Flags; +STRUCT!{struct SecPkgContext_NegotiationInfoA { + PackageInfo: PSecPkgInfoA, + NegotiationState: ::c_ulong, +}} +pub type PSecPkgContext_NegotiationInfoA = *mut SecPkgContext_NegotiationInfoA; +STRUCT!{struct SecPkgContext_NegotiationInfoW { + PackageInfo: PSecPkgInfoW, + NegotiationState: ::c_ulong, +}} +pub type PSecPkgContext_NegotiationInfoW = *mut SecPkgContext_NegotiationInfoW; +pub const SECPKG_NEGOTIATION_COMPLETE: ::c_ulong = 0; +pub const SECPKG_NEGOTIATION_OPTIMISTIC: ::c_ulong = 1; +pub const SECPKG_NEGOTIATION_IN_PROGRESS: ::c_ulong = 2; +pub const SECPKG_NEGOTIATION_DIRECT: ::c_ulong = 3; +pub const SECPKG_NEGOTIATION_TRY_MULTICRED: ::c_ulong = 4; +STRUCT!{struct SecPkgContext_NativeNamesW { + sClientName: SEC_WCHAR, + sServerName: SEC_WCHAR, +}} +pub type PSecPkgContext_NativeNamesW = *mut SecPkgContext_NativeNamesW; +STRUCT!{struct SecPkgContext_NativeNamesA { + sClientName: SEC_CHAR, + sServerName: SEC_CHAR, +}} +pub type PSecPkgContext_NativeNamesA = *mut SecPkgContext_NativeNamesA; +STRUCT!{struct SecPkgContext_CredentialNameW { + CredentialType: ::c_ulong, + sCredentialName: *mut SEC_WCHAR, +}} +pub type PSecPkgContext_CredentialNameW = *mut SecPkgContext_CredentialNameW; +STRUCT!{struct SecPkgContext_CredentialNameA { + CredentialType: ::c_ulong, + sCredentialName: *mut SEC_CHAR, +}} +pub type PSecPkgContext_CredentialNameA = *mut SecPkgContext_CredentialNameA; +STRUCT!{struct SecPkgContext_AccessToken { + AccessToken: *mut ::c_void, +}} +pub type PSecPkgContext_AccessToken = *mut SecPkgContext_AccessToken; +STRUCT!{struct SecPkgContext_TargetInformation { + MarshalledTargetInfoLength: ::c_ulong, + MarshalledTargetInfo: *mut ::c_uchar, +}} +pub type PSecPkgContext_TargetInformation = *mut SecPkgContext_TargetInformation; +STRUCT!{struct SecPkgContext_AuthzID { + AuthzIDLength: ::c_ulong, + AuthzID: *mut ::c_char, +}} +pub type PSecPkgContext_AuthzID = *mut SecPkgContext_AuthzID; +STRUCT!{struct SecPkgContext_Target { + TargetLength: ::c_ulong, + Target: *mut ::c_char, +}} +pub type PSecPkgContext_Target = *mut SecPkgContext_Target; +STRUCT!{struct SecPkgContext_ClientSpecifiedTarget { + sTargetName: *mut SEC_WCHAR, +}} +pub type PSecPkgContext_ClientSpecifiedTarget = *mut SecPkgContext_ClientSpecifiedTarget; +STRUCT!{struct SecPkgContext_Bindings { + BindingsLength: ::c_ulong, + Bindings: *mut SEC_CHANNEL_BINDINGS, +}} +pub type PSecPkgContext_Bindings = *mut SecPkgContext_Bindings; +ENUM!{enum SEC_APPLICATION_PROTOCOL_NEGOTIATION_STATUS { + SecApplicationProtocolNegotiationStatus_None, + SecApplicationProtocolNegotiationStatus_Success, + SecApplicationProtocolNegotiationStatus_SelectedClientOnly, +}} +pub type PSEC_APPLICATION_PROTOCOL_NEGOTIATION_STATUS = + *mut SEC_APPLICATION_PROTOCOL_NEGOTIATION_STATUS; +pub const MAX_PROTOCOL_ID_SIZE: usize = 0xff; +STRUCT!{nodebug struct SecPkgContext_ApplicationProtocol { + ProtoNegoStatus: SEC_APPLICATION_PROTOCOL_NEGOTIATION_STATUS, + ProtoNegoExt: SEC_APPLICATION_PROTOCOL_NEGOTIATION_EXT, + ProtocolIdSize: ::c_uchar, + ProtocolId: [::c_uchar; MAX_PROTOCOL_ID_SIZE], +}} +pub type PSecPkgContext_ApplicationProtocol = *mut SecPkgContext_ApplicationProtocol; +pub type SEC_GET_KEY_FN = Option<unsafe extern "system" fn( + Arg: *mut ::c_void, Principal: *mut ::c_void, KeyVer: ::c_ulong, Key: *mut *mut ::c_void, + Status: *mut SECURITY_STATUS, +)>; +pub const SECPKG_CONTEXT_EXPORT_RESET_NEW: ::c_ulong = 0x00000001; +pub const SECPKG_CONTEXT_EXPORT_DELETE_OLD: ::c_ulong = 0x00000002; +pub const SECPKG_CONTEXT_EXPORT_TO_KERNEL: ::c_ulong = 0x00000004; +pub type ACQUIRE_CREDENTIALS_HANDLE_FN_W = Option<unsafe extern "system" fn( + *mut SEC_WCHAR, *mut SEC_WCHAR, ::c_ulong, *mut ::c_void, *mut ::c_void, SEC_GET_KEY_FN, + *mut ::c_void, PCredHandle, PTimeStamp, +) -> SECURITY_STATUS>; +pub type ACQUIRE_CREDENTIALS_HANDLE_FN_A = Option<unsafe extern "system" fn( + *mut SEC_CHAR, *mut SEC_CHAR, ::c_ulong, *mut ::c_void, *mut ::c_void, SEC_GET_KEY_FN, + *mut ::c_void, PCredHandle, PTimeStamp, +) -> SECURITY_STATUS>; +pub type FREE_CREDENTIALS_HANDLE_FN = Option<unsafe extern "system" fn( + PCredHandle, +) -> SECURITY_STATUS>; +pub type ADD_CREDENTIALS_FN_W = Option<unsafe extern "system" fn( + PCredHandle, *mut SEC_WCHAR, *mut SEC_WCHAR, ::c_ulong, *mut ::c_void, SEC_GET_KEY_FN, + *mut ::c_void, PTimeStamp, +) -> SECURITY_STATUS>; +pub type ADD_CREDENTIALS_FN_A = Option<unsafe extern "system" fn( + PCredHandle, *mut SEC_CHAR, *mut SEC_CHAR, ::c_ulong, *mut ::c_void, SEC_GET_KEY_FN, + *mut ::c_void, PTimeStamp, +) -> SECURITY_STATUS>; +pub type CHANGE_PASSWORD_FN_W = Option<unsafe extern "system" fn( + *mut SEC_WCHAR, *mut SEC_WCHAR, *mut SEC_WCHAR, *mut SEC_WCHAR, *mut SEC_WCHAR, ::BOOLEAN, + ::c_ulong, PSecBufferDesc, +) -> SECURITY_STATUS>; +pub type CHANGE_PASSWORD_FN_A = Option<unsafe extern "system" fn( + *mut SEC_CHAR, *mut SEC_CHAR, *mut SEC_CHAR, *mut SEC_CHAR, *mut SEC_CHAR, ::BOOLEAN, + ::c_ulong, PSecBufferDesc, +) -> SECURITY_STATUS>; +//1844 +ENUM!{enum SecDelegationType { + SecFull, + SecService, + SecTree, + SecDirectory, + SecObject, +}} +pub type PSecDelegationType = *mut SecDelegationType; +STRUCT!{struct SEC_WINNT_AUTH_BYTE_VECTOR { + ByteArrayOffset: ::c_ulong, + ByteArrayLength: ::c_ushort, +}} +pub type PSEC_WINNT_AUTH_BYTE_VECTOR = *mut SEC_WINNT_AUTH_BYTE_VECTOR; +STRUCT!{struct SEC_WINNT_AUTH_DATA { + CredType: ::GUID, + CredData: SEC_WINNT_AUTH_BYTE_VECTOR, +}} +pub type PSEC_WINNT_AUTH_DATA = *mut SEC_WINNT_AUTH_DATA; +STRUCT!{struct SEC_WINNT_AUTH_PACKED_CREDENTIALS { + cbHeaderLength: ::c_ushort, + cbStructureLength: ::c_ushort, + AuthData: SEC_WINNT_AUTH_DATA, +}} +pub type PSEC_WINNT_AUTH_PACKED_CREDENTIALS = *mut SEC_WINNT_AUTH_PACKED_CREDENTIALS; +DEFINE_GUID!(SEC_WINNT_AUTH_DATA_TYPE_PASSWORD, 0x28bfc32f, 0x10f6, 0x4738, + 0x98, 0xd1, 0x1a, 0xc0, 0x61, 0xdf, 0x71, 0x6a); +DEFINE_GUID!(SEC_WINNT_AUTH_DATA_TYPE_CERT, 0x235f69ad, 0x73fb, 0x4dbc, + 0x82, 0x3, 0x6, 0x29, 0xe7, 0x39, 0x33, 0x9b); +STRUCT!{struct SEC_WINNT_AUTH_DATA_PASSWORD { + UnicodePassword: SEC_WINNT_AUTH_BYTE_VECTOR, +}} +pub type PSEC_WINNT_AUTH_DATA_PASSWORD = *mut SEC_WINNT_AUTH_DATA_PASSWORD; +DEFINE_GUID!(SEC_WINNT_AUTH_DATA_TYPE_CSP_DATA, 0x68fd9879, 0x79c, 0x4dfe, + 0x82, 0x81, 0x57, 0x8a, 0xad, 0xc1, 0xc1, 0x0); +STRUCT!{struct SEC_WINNT_AUTH_CERTIFICATE_DATA { + cbHeaderLength: ::c_ushort, + cbStructureLength: ::c_ushort, + Certificate: SEC_WINNT_AUTH_BYTE_VECTOR, +}} +pub type PSEC_WINNT_AUTH_CERTIFICATE_DATA = *mut SEC_WINNT_AUTH_CERTIFICATE_DATA; +STRUCT!{struct SEC_WINNT_CREDUI_CONTEXT_VECTOR { + CredUIContextArrayOffset: ::ULONG, + CredUIContextCount: ::USHORT, +}} +pub type PSEC_WINNT_CREDUI_CONTEXT_VECTOR = *mut SEC_WINNT_CREDUI_CONTEXT_VECTOR; +STRUCT!{struct SEC_WINNT_AUTH_SHORT_VECTOR { + ShortArrayOffset: ::ULONG, + ShortArrayCount: ::USHORT, +}} +pub type PSEC_WINNT_AUTH_SHORT_VECTOR = *mut SEC_WINNT_AUTH_SHORT_VECTOR; +STRUCT!{struct CREDUIWIN_MARSHALED_CONTEXT { + StructureType: ::GUID, + cbHeaderLength: ::USHORT, + LogonId: ::LUID, + MarshaledDataType: ::GUID, + MarshaledDataOffset: ::ULONG, + MarshaledDataLength: ::USHORT, +}} +pub type PCREDUIWIN_MARSHALED_CONTEXT = *mut CREDUIWIN_MARSHALED_CONTEXT; +STRUCT!{struct SEC_WINNT_CREDUI_CONTEXT { + cbHeaderLength: ::USHORT, + CredUIContextHandle: ::HANDLE, + UIInfo: ::PCREDUI_INFOW, + dwAuthError: ::ULONG, + pInputAuthIdentity: PSEC_WINNT_AUTH_IDENTITY_OPAQUE, + TargetName: ::PUNICODE_STRING, +}} +pub type PSEC_WINNT_CREDUI_CONTEXT = *mut SEC_WINNT_CREDUI_CONTEXT; +pub type PSEC_WINNT_AUTH_IDENTITY_OPAQUE = ::PVOID; diff --git a/deps/winapi-0.2.5/src/subauth.rs b/deps/winapi-0.2.6/src/subauth.rs similarity index 100% rename from deps/winapi-0.2.5/src/subauth.rs rename to deps/winapi-0.2.6/src/subauth.rs diff --git a/deps/winapi-0.2.5/src/synchapi.rs b/deps/winapi-0.2.6/src/synchapi.rs similarity index 100% rename from deps/winapi-0.2.5/src/synchapi.rs rename to deps/winapi-0.2.6/src/synchapi.rs diff --git a/deps/winapi-0.2.5/src/sysinfoapi.rs b/deps/winapi-0.2.6/src/sysinfoapi.rs similarity index 100% rename from deps/winapi-0.2.5/src/sysinfoapi.rs rename to deps/winapi-0.2.6/src/sysinfoapi.rs diff --git a/deps/winapi-0.2.5/src/threadpoolapi.rs b/deps/winapi-0.2.6/src/threadpoolapi.rs similarity index 100% rename from deps/winapi-0.2.5/src/threadpoolapi.rs rename to deps/winapi-0.2.6/src/threadpoolapi.rs diff --git a/deps/winapi-0.2.6/src/timezoneapi.rs b/deps/winapi-0.2.6/src/timezoneapi.rs new file mode 100644 index 000000000..3c84b209f --- /dev/null +++ b/deps/winapi-0.2.6/src/timezoneapi.rs @@ -0,0 +1,27 @@ +// Copyright © 2015, Peter Atashian +// Licensed under the MIT License <LICENSE.md> +//! ApiSet Contract for api-ms-win-core-timezone-l1 +pub const TIME_ZONE_ID_INVALID: ::DWORD = 0xFFFFFFFF; +STRUCT!{struct TIME_ZONE_INFORMATION { + Bias: ::LONG, + StandardName: [::WCHAR; 32], + StandardDate: ::SYSTEMTIME, + StandardBias: ::LONG, + DaylightName: [::WCHAR; 32], + DaylightDate: ::SYSTEMTIME, + DaylightBias: ::LONG, +}} +pub type PTIME_ZONE_INFORMATION = *mut TIME_ZONE_INFORMATION; +pub type LPTIME_ZONE_INFORMATION = *mut TIME_ZONE_INFORMATION; +STRUCT!{nodebug struct DYNAMIC_TIME_ZONE_INFORMATION { + Bias: ::LONG, + StandardName: [::WCHAR; 32], + StandardDate: ::SYSTEMTIME, + StandardBias: ::LONG, + DaylightName: [::WCHAR; 32], + DaylightDate: ::SYSTEMTIME, + DaylightBias: ::LONG, + TimeZoneKeyName: [::WCHAR; 128], + DynamicDaylightTimeDisabled: ::BOOLEAN, +}} +pub type PDYNAMIC_TIME_ZONE_INFORMATION = *mut DYNAMIC_TIME_ZONE_INFORMATION; diff --git a/deps/winapi-0.2.6/src/tlhelp32.rs b/deps/winapi-0.2.6/src/tlhelp32.rs new file mode 100644 index 000000000..2e809b25d --- /dev/null +++ b/deps/winapi-0.2.6/src/tlhelp32.rs @@ -0,0 +1,104 @@ +// Copyright © 2015, Gigih Aji Ibrahim +// Licensed under the MIT License <LICENSE.md> +pub const MAX_MODULE_NAME32: usize = 255; +pub const TH32CS_SNAPHEAPLIST: ::DWORD = 0x00000001; +pub const TH32CS_SNAPPROCESS: ::DWORD = 0x00000002; +pub const TH32CS_SNAPTHREAD: ::DWORD = 0x00000004; +pub const TH32CS_SNAPMODULE: ::DWORD = 0x00000008; +pub const TH32CS_SNAPMODULE32: ::DWORD = 0x00000010; +pub const TH32CS_SNAPALL: ::DWORD = + (TH32CS_SNAPHEAPLIST | TH32CS_SNAPPROCESS | TH32CS_SNAPTHREAD | TH32CS_SNAPMODULE); +pub const TH32CS_INHERIT: ::DWORD = 0x80000000; +STRUCT!{struct HEAPLIST32 { + dwSize: ::SIZE_T, + th32ProcessID: ::DWORD, + th32HeapID: :: ULONG_PTR, + dwFlags: ::DWORD, +}} +pub type PHEAPLIST32 = *mut HEAPLIST32; +pub type LPHEAPLIST32 = *mut HEAPLIST32; +pub const HF32_DEFAULT: ::DWORD = 1; +pub const HF32_SHARED: ::DWORD = 2; +STRUCT!{struct HEAPENTRY32 { + dwSize: ::SIZE_T, + hHandle: ::HANDLE, + dwAddress: ::ULONG_PTR, + dwBlockSize: ::SIZE_T, + dwFlags: ::DWORD, + dwLockCount: ::DWORD, + dwResvd: ::DWORD, + th32ProcessID: ::DWORD, + th32HeapID: ::ULONG_PTR, +}} +pub type PHEAPENTRY32 = *mut HEAPENTRY32; +pub type LPHEAPENTRY32 = *mut HEAPENTRY32; +pub const LF32_FIXED: ::DWORD = 0x00000001; +pub const LF32_FREE: ::DWORD = 0x00000002; +pub const LF32_MOVEABLE: ::DWORD = 0x00000004; +STRUCT!{nodebug struct PROCESSENTRY32W { + dwSize: ::DWORD, + cntUsage: ::DWORD, + th32ProcessID: ::DWORD, + th32DefaultHeapID: ::ULONG_PTR, + th32ModuleID: ::DWORD, + cntThreads: ::DWORD, + th32ParentProcessID: ::DWORD, + pcPriClassBase: ::LONG, + dwFlags: ::DWORD, + szExeFile: [::WCHAR; ::MAX_PATH], +}} +pub type PPROCESSENTRY32W = *mut PROCESSENTRY32W; +pub type LPPROCESSENTRY32W = *mut PROCESSENTRY32W; +STRUCT!{nodebug struct PROCESSENTRY32 { + dwSize: ::DWORD, + cntUsage: ::DWORD, + th32ProcessID: ::DWORD, + th32DefaultHeapID: ::ULONG_PTR, + th32ModuleID: ::DWORD, + cntThreads: ::DWORD, + th32ParentProcessID: ::DWORD, + pcPriClassBase: ::LONG, + dwFlags: ::DWORD, + szExeFile: [::CHAR; ::MAX_PATH], +}} +pub type PPROCESSENTRY32 = *mut PROCESSENTRY32; +pub type LPPROCESSENTRY32 = *mut PROCESSENTRY32; +STRUCT!{struct THREADENTRY32 { + dwSize: ::DWORD, + cntUsage: ::DWORD, + th32ThreadID: ::DWORD, + th32OwnerProcessID: ::DWORD, + tpBasePri: ::LONG, + tpDeltaPri: ::LONG, + dwFlags: ::DWORD, +}} +pub type PTHREADENTRY32 = *mut THREADENTRY32; +pub type LPTHREADENTRY32 = *mut THREADENTRY32; +STRUCT!{nodebug struct MODULEENTRY32W { + dwSize: ::DWORD, + th32ModuleID: ::DWORD, + th32ProcessID: ::DWORD, + GlblcntUsage: ::DWORD, + ProccntUsage: ::DWORD, + modBaseAddr: *mut ::BYTE, + modBaseSize: ::DWORD, + hModule: ::HMODULE, + szModule: [::WCHAR; ::MAX_MODULE_NAME32 + 1], + szExePath: [::WCHAR; ::MAX_PATH], +}} +pub type PMODULEENTRY32W = *mut MODULEENTRY32W; +pub type LPMODULEENTRY32W = *mut MODULEENTRY32W; +STRUCT!{nodebug struct MODULEENTRY32 { + dwSize: ::DWORD, + th32ModuleID: ::DWORD, + th32ProcessID: ::DWORD, + GlblcntUsage: ::DWORD, + ProccntUsage: ::DWORD, + modBaseAddr: *mut ::BYTE, + modBaseSize: ::DWORD, + hModule: ::HMODULE, + szModule: [::CHAR; ::MAX_MODULE_NAME32 + 1], + szExePath: [::CHAR; ::MAX_PATH], +}} +pub type PMODULEENTRY32 = *mut MODULEENTRY32; +pub type LPMODULEENTRY32 = *mut MODULEENTRY32; diff --git a/deps/winapi-0.2.5/src/unknwnbase.rs b/deps/winapi-0.2.6/src/unknwnbase.rs similarity index 100% rename from deps/winapi-0.2.5/src/unknwnbase.rs rename to deps/winapi-0.2.6/src/unknwnbase.rs diff --git a/deps/winapi-0.2.5/src/urlhist.rs b/deps/winapi-0.2.6/src/urlhist.rs similarity index 100% rename from deps/winapi-0.2.5/src/urlhist.rs rename to deps/winapi-0.2.6/src/urlhist.rs diff --git a/deps/winapi-0.2.5/src/urlmon.rs b/deps/winapi-0.2.6/src/urlmon.rs similarity index 100% rename from deps/winapi-0.2.5/src/urlmon.rs rename to deps/winapi-0.2.6/src/urlmon.rs diff --git a/deps/winapi-0.2.5/src/usp10.rs b/deps/winapi-0.2.6/src/usp10.rs similarity index 100% rename from deps/winapi-0.2.5/src/usp10.rs rename to deps/winapi-0.2.6/src/usp10.rs diff --git a/deps/winapi-0.2.5/src/vadefs.rs b/deps/winapi-0.2.6/src/vadefs.rs similarity index 100% rename from deps/winapi-0.2.5/src/vadefs.rs rename to deps/winapi-0.2.6/src/vadefs.rs diff --git a/deps/winapi-0.2.6/src/vsbackup.rs b/deps/winapi-0.2.6/src/vsbackup.rs new file mode 100644 index 000000000..5f6036a40 --- /dev/null +++ b/deps/winapi-0.2.6/src/vsbackup.rs @@ -0,0 +1,303 @@ +// Copyright © 2015, Brian Vincent +// Licensed under the MIT License <LICENSE.md> +//! VSS backup interfaces +DEFINE_GUID!(IID_IVssExamineWriterMetadata, 0x902fcf7f, 0xb7fd, 0x42f8, + 0x81, 0xf1, 0xb2, 0xe4, 0x00, 0xb1, 0xe5, 0xbd); +DEFINE_GUID!(IID_IVssExamineWriterMetadataEx, 0x0c0e5ec0, 0xca44, 0x472b, + 0xb7, 0x02, 0xe6, 0x52, 0xdb, 0x1c, 0x04, 0x51); +DEFINE_GUID!(IID_IVssBackupComponents, 0x665c1d5f, 0xc218, 0x414d, + 0xa0, 0x5d, 0x7f, 0xef, 0x5f, 0x9d, 0x5c, 0x86); +DEFINE_GUID!(IID_IVssBackupComponentsEx, 0x963f03ad, 0x9e4c, 0x4a34, + 0xac, 0x15, 0xe4, 0xb6, 0x17, 0x4e, 0x50, 0x36); +STRUCT!{struct VSS_COMPONENTINFO { + type_: ::VSS_COMPONENT_TYPE, // type is a keyword in rust + bstrLogicalPath: ::BSTR, + bstrComponentName: ::BSTR, + bstrCaption: ::BSTR, + pbIcon: *mut ::BYTE, + cbIcon: ::UINT, + bRestoreMetadata: bool, + bNotifyOnBackupComplete: bool, + bSelectable: bool, + bSelectableForRestore: bool, + dwComponentFlags: ::DWORD, + cFileCount: ::UINT, + cDatabases: ::UINT, + cLogFiles: ::UINT, + cDependencies: ::UINT, +}} +pub type PVSSCOMPONENTINFO = *const ::VSS_COMPONENTINFO; +RIDL!( +interface IVssWMComponent(IVssWMComponentVtbl): IUnknown(IUnknownVtbl) { + fn GetComponentInfo(&mut self, ppInfo: *mut ::PVSSCOMPONENTINFO) -> ::HRESULT, + fn FreeComponentInfo(&mut self, pInfo: ::PVSSCOMPONENTINFO) -> ::HRESULT, + fn GetFile(&mut self, iFile: ::UINT, ppFiledesc: *mut *mut ::IVssWMFiledesc) -> ::HRESULT, + fn GetDatabaseFile( + &mut self, iDBFile: ::UINT, ppFiledesc: *mut *mut ::IVssWMFiledesc + ) -> ::HRESULT, + fn GetDatabaseLogFile( + &mut self, iDbLogFile: ::UINT, ppFiledesc: *mut *mut ::IVssWMFiledesc + ) -> ::HRESULT, + fn GetDependency( + &mut self, iDependency: ::UINT, ppDependency: *mut *mut ::IVssWMDependency + ) -> ::HRESULT +} +); +RIDL!( +interface IVssExamineWriterMetadata(IVssExamineWriterMetadataVtbl): IUnknown(IUnknownVtbl) { + fn GetIdentity( + &mut self, pidInstance: *mut ::VSS_ID, pidWriter: *mut ::VSS_ID, + pbstrWriterName: *mut ::BSTR, pUsage: *mut ::VSS_USAGE_TYPE, + pSource: *mut ::VSS_SOURCE_TYPE + ) -> ::HRESULT, + fn GetFileCounts(&mut self, pcIncludeFiles: *mut ::UINT, pcExcludeFiles: *mut ::UINT, + pcComponents: *mut ::UINT + ) -> ::HRESULT, + fn GetIncludeFile( + &mut self, iFile: ::UINT, ppFiledesc: *mut *mut ::IVssWMFiledesc + ) -> ::HRESULT, + fn GetExcludeFile( + &mut self, iFile: ::UINT, ppFiledesc: *mut *mut ::IVssWMFiledesc + ) -> ::HRESULT, + fn GetComponent( + &mut self, iComponent: ::UINT, ppComponent: *mut *mut ::IVssWMComponent + ) -> ::HRESULT, + fn GetRestoreMethod( + &mut self, pMethod: *mut ::VSS_RESTOREMETHOD_ENUM, pbstrService: *mut ::BSTR, + pbstrUserProcedure: *mut ::BSTR, pwriterRestore: *mut ::VSS_WRITERRESTORE_ENUM, + pbRebootRequired: *mut bool, pcMappings: *mut ::UINT + ) -> ::HRESULT, + fn GetAlternateLocationMapping( + &mut self, iMapping: ::UINT, ppFiledesc: *mut *mut ::IVssWMFiledesc + ) -> ::HRESULT, + fn GetBackupSchema(&mut self, pdwSchemaMask: *mut ::DWORD) -> ::HRESULT, + fn GetDocument(&mut self, pDoc: *mut ::c_void) -> ::HRESULT, //TODO IXMLDOMDocument + fn SaveAsXML(&mut self, pbstrXML: *mut ::BSTR) -> ::HRESULT, + fn LoadFromXML(&mut self, pbstrXML: *mut ::BSTR) -> ::HRESULT +} +); +RIDL!( +interface IVssExamineWriterMetadataEx(IVssExamineWriterMetadataExVtbl): + IVssExamineWriterMetadata(IVssExamineWriterMetadataVtbl) { + fn GetIdentityEx( + &mut self, pidInstance: *mut ::VSS_ID, pidWriter: *mut ::VSS_ID, + pbstrWriterName: *mut ::BSTR, pbstrInstanceName: *mut ::BSTR, + pUsage: *mut ::VSS_USAGE_TYPE, pSource: *mut ::VSS_SOURCE_TYPE + ) -> ::HRESULT +} +); +RIDL!( +interface IVssExamineWriterMetadataEx2(IVssExamineWriterMetadataEx2Vtbl): + IVssExamineWriterMetadataEx(IVssExamineWriterMetadataExVtbl) { + fn GetVersion( + &mut self, pdwMajorVersion: *mut ::DWORD, pdwMinorVersion: *mut ::DWORD + ) -> ::HRESULT, + fn GetExcludeFromSnapshotCount(&mut self, pcExcludedFromSnapshot: *mut ::UINT) -> ::HRESULT, + fn GetExcludeFromSnapshotFile( + &mut self, iFile: ::UINT, ppFiledesc: *mut *mut ::IVssWMFiledesc + ) -> ::HRESULT +} +); +#[repr(C)] +pub struct IVssWriterComponentsExt { + pub lpVtbl: *const IVssWriterComponentsExtVtbl, +} +#[repr(C)] +pub struct IVssWriterComponentsExtVtbl { + pub parent1: ::IVssWriterComponentsVtbl, + pub parent2: ::IUnknownVtbl, +} +RIDL!( +interface IVssBackupComponents(IVssBackupComponentsVtbl): IUnknown(IUnknownVtbl) { + fn GetWriterComponentsCount(&mut self, pcComponents: *mut ::UINT) -> ::HRESULT, + fn GetWriterComponents( + &mut self, iWriter: ::UINT, ppWriter: *mut *mut IVssWriterComponentsExt + ) -> ::HRESULT, + fn InitializeForBackup(&mut self, bstrXML: ::BSTR) -> ::HRESULT, + fn SetBackupState( + &mut self, bSelectComponents: bool, bBackupBootableSystemState: bool, + backupType: ::VSS_BACKUP_TYPE, bPartialFileSupport: bool + ) -> ::HRESULT, + fn InitializeForRestore(&mut self, bstrXML: ::BSTR) -> ::HRESULT, + fn SetRestoreState(&mut self, restoreType: ::VSS_RESTORE_TYPE) -> ::HRESULT, + fn GatherWriterMetadata(&mut self, pAsync: *mut *mut ::IVssAsync) -> ::HRESULT, + fn GetWriterMetadataCount(&mut self, pcWriters: *mut ::UINT) -> ::HRESULT, + fn GetWriterMetadata( + &mut self, iWriter: ::UINT, pidInstance: *mut ::VSS_ID, + ppMetadata: *mut *mut IVssExamineWriterMetadata + ) -> ::HRESULT, + fn FreeWriterMetadata(&mut self) -> ::HRESULT, + fn AddComponent( + &mut self, instanceId: ::VSS_ID, writerId: ::VSS_ID, ct: ::VSS_COMPONENT_TYPE, + wszLogicalPath: ::LPCWSTR, wszComponentName: ::LPCWSTR + ) -> ::HRESULT, + fn PrepareForBackup(&mut self, ppAsync: *mut *mut ::IVssAsync) -> ::HRESULT, + fn AbortBackup(&mut self) -> ::HRESULT, + fn GatherWriterStatus(&mut self, ppAsync: *mut *mut ::IVssAsync) -> ::HRESULT, + fn GetWriterStatusCount(&mut self, pcWriters: *mut ::UINT) -> ::HRESULT, + fn FreeWriterStatus(&mut self) -> ::HRESULT, + fn GetWriterStatus( + &mut self, iWriter: ::UINT, pidInstance: *mut ::VSS_ID, pidWriter: *mut ::VSS_ID, + pbstrWriter: *mut ::BSTR, pnStatus: *mut ::VSS_WRITER_STATE, + phResultFailure: *mut ::HRESULT + ) -> ::HRESULT, + fn SetBackupSucceeded( + &mut self, instanceId: ::VSS_ID, writerId: ::VSS_ID, ct: ::VSS_COMPONENT_TYPE, + wszLogicalPath: ::LPCWSTR, wszComponentName: ::LPCWSTR, bSucceded: bool + ) -> ::HRESULT, + fn SetBackupOptions( + &mut self, writerId: ::VSS_ID, ct: ::VSS_COMPONENT_TYPE, wszLogicalPath: ::LPCWSTR, + wszComponentName: ::LPCWSTR, wszBackupOptions: ::LPCWSTR + ) -> ::HRESULT, + fn SetSelectedForRestore( + &mut self, writerId: ::VSS_ID, ct: ::VSS_COMPONENT_TYPE, wszLogicalPath: ::LPCWSTR, + wszComponentName: ::LPCWSTR, bSelectedForRestore: bool + ) -> ::HRESULT, + fn SetRestoreOptions( + &mut self, writerId: ::VSS_ID, ct: ::VSS_COMPONENT_TYPE, wszLogicalPath: ::LPCWSTR, + wszComponentName: ::LPCWSTR, wszRestoreOptions: ::LPCWSTR + ) -> ::HRESULT, + fn SetAdditionalRestores( + &mut self, writerId: ::VSS_ID, ct: ::VSS_COMPONENT_TYPE, wszLogicalPath: ::LPCWSTR, + wszComponentName: ::LPCWSTR, bAdditionalRestores: bool + ) -> ::HRESULT, + fn SetPreviousBackupStamp( + &mut self, writerId: ::VSS_ID, ct: ::VSS_COMPONENT_TYPE, wszLogicalPath: ::LPCWSTR, + wszComponentName: ::LPCWSTR, wszPreviousBackupStamp: ::LPCWSTR + ) -> ::HRESULT, + fn SaveAsXML(&mut self, pbstrXML: *mut ::BSTR) -> ::HRESULT, + fn BackupComplete(&mut self, ppAsync: *mut *mut ::IVssAsync) -> ::HRESULT, + fn AddAlternativeLocationMapping( + &mut self, writerId: ::VSS_ID, ct: ::VSS_COMPONENT_TYPE, wszLogicalPath: ::LPCWSTR, + wszComponentName: ::LPCWSTR, wszPath: ::LPCWSTR, wszFilespec: ::LPCWSTR, bRecursive: bool, + wszDestination: ::LPCWSTR + ) -> ::HRESULT, + fn AddRestoreSubcomponent( + &mut self, writerId: ::VSS_ID, ct: ::VSS_COMPONENT_TYPE, wszLogicalPath: ::LPCWSTR, + wszComponentName: ::LPCWSTR, wszSubComponentLogicalPath: ::LPCWSTR, + wszSubComponentName: ::LPCWSTR, bRepair: bool + ) -> ::HRESULT, + fn SetFileRestoreStatus( + &mut self, writerId: ::VSS_ID, ct: ::VSS_COMPONENT_TYPE, wszLogicalPath: ::LPCWSTR, + wszComponentName: ::LPCWSTR, status: ::VSS_FILE_RESTORE_STATUS + ) -> ::HRESULT, + fn AddNewTarget( + &mut self, writerId: ::VSS_ID, ct: ::VSS_COMPONENT_TYPE, wszLogicalPath: ::LPCWSTR, + wszComponentName: ::LPCWSTR, wszPath: ::LPCWSTR, wszFileName: ::LPCWSTR, bRecursive: bool, + wszAlternatePath: ::LPCWSTR + ) -> ::HRESULT, + fn SetRangesFilePath( + &mut self, writerId: ::VSS_ID, ct: ::VSS_COMPONENT_TYPE, wszLogicalPath: ::LPCWSTR, + wszComponentName: ::LPCWSTR, iPartialFile: ::UINT, wszRangesFile: ::LPCWSTR + ) -> ::HRESULT, + fn PreRestore(&mut self, ppAsync: *mut *mut ::IVssAsync) -> ::HRESULT, + fn PostRestore(&mut self, ppAsync: *mut *mut ::IVssAsync) -> ::HRESULT, + fn SetContext(&mut self, lContext: ::LONG) -> ::HRESULT, + fn StartSnapshotSet(&mut self, pSnapshotSetId: *mut ::VSS_ID) -> ::HRESULT, + fn AddToSnapshotSet( + &mut self, pwszVolumeName: ::VSS_PWSZ, ProviderId: ::VSS_ID, pidSnapshot: *mut ::VSS_ID + ) -> ::HRESULT, + fn DoSnapshotSet(&mut self, ppAsync: *mut *mut ::IVssAsync) -> ::HRESULT, + fn DeleteSnapshots( + &mut self, SourceObjectId: ::VSS_ID, eSourceObjectType: ::VSS_OBJECT_TYPE, + bForceDelete: ::BOOL, plDeletedSnapshots: *mut ::LONG, pNondeletedSnapshotID: *mut ::VSS_ID + ) -> ::HRESULT, + fn ImportSnapshots(&mut self, ppAsync: *mut *mut ::IVssAsync) -> ::HRESULT, + fn BreakSnapshotSet(&mut self, SnapshotSetId: ::VSS_ID) -> ::HRESULT, + fn GetSnapshotProperties( + &mut self, SnapshotId: ::VSS_ID, + pProp: *mut ::VSS_SNAPSHOT_PROP + ) -> ::HRESULT, + fn Query(&mut self, QueriedObjectId: ::VSS_ID, eQueriedObjectType: ::VSS_OBJECT_TYPE, + eReturnedObjectsType: ::VSS_OBJECT_TYPE, ppEnum: *mut *mut ::IVssEnumObject) -> ::HRESULT, + fn IsVolumeSupported( + &mut self, ProviderId: ::VSS_ID, pwszVolumeName: ::VSS_PWSZ, + pbSupportedByThisProvider: *mut ::BOOL + ) -> ::HRESULT, + fn DisableWriterClasses( + &mut self, rgWriterClassId: *const ::VSS_ID, cClassId: ::UINT + ) -> ::HRESULT, + fn EnableWriterClasses( + &mut self, rgWriterClassId: *const ::VSS_ID, cClassId: ::UINT + ) -> ::HRESULT, + fn DisableWriterInstances( + &mut self, rgWriterInstanceId: *const ::VSS_ID, cInstanceId: ::UINT + ) -> ::HRESULT, + fn ExposeSnapshot(&mut self, SnapshotId: ::VSS_ID, wszPathFromRoot: ::VSS_PWSZ, + lAttributes: ::LONG, wszExpose: ::VSS_PWSZ, pwszExposed: ::VSS_PWSZ + ) -> ::HRESULT, + fn RevertToSnapshot(&mut self, SnapshotId: ::VSS_ID, bForceDismount: ::BOOL) -> ::HRESULT, + fn QueryRevertStatus( + &mut self, pwszVolume: ::VSS_PWSZ, ppAsync: *mut *mut ::IVssAsync + ) -> ::HRESULT +} +); +RIDL!( +interface IVssBackupComponentsEx(IVssBackupComponentsExVtbl): + IVssBackupComponents(IVssBackupComponentsVtbl) { + fn GetWriterMetadataEx( + &mut self, iWriter: ::UINT, pidInstance: *mut ::VSS_ID, + ppMetadata: *mut *mut ::IVssExamineWriterMetadataEx + ) -> ::HRESULT, + fn SetSelectedForRestoreEx( + &mut self, writerId: ::VSS_ID, ct: ::VSS_COMPONENT_TYPE, wszLogicalPath: ::LPCWSTR, + wszComponentName: ::LPCWSTR, bSelectedForRestore: bool, instanceId: ::VSS_ID + ) -> ::HRESULT +} +); +RIDL!( +interface IVssBackupComponentsEx2(IVssBackupComponentsEx2Vtbl): + IVssBackupComponentsEx(IVssBackupComponentsExVtbl) { + fn UnexposeSnapshot(&mut self, snapshotId: ::VSS_ID) -> ::HRESULT, + fn SetAuthoritativeRestore( + &mut self, writerId: ::VSS_ID, ct: ::VSS_COMPONENT_TYPE, wszLogicalPath: ::LPCWSTR, + wszComponentName: ::LPCWSTR, bAuth: bool + ) -> ::HRESULT, + fn SetRollForward( + &mut self, writerId: ::VSS_ID, ct: ::VSS_COMPONENT_TYPE, wszLogicalPath: ::LPCWSTR, + wszComponentName: ::LPCWSTR, rollType: ::VSS_ROLLFORWARD_TYPE, + wszRollForwardPoint: ::LPCWSTR + ) -> ::HRESULT, + fn SetRestoreName( + &mut self, writerId: ::VSS_ID, ct: ::VSS_COMPONENT_TYPE, wszLogicalPath: ::LPCWSTR, + wszComponentName: ::LPCWSTR, wszRestoreName: ::LPCWSTR + ) -> ::HRESULT, + fn BreakSnapshotSetEx( + &mut self, SnapshotSetID: ::VSS_ID, dwBreakFlags: ::DWORD, ppAsync: *mut *mut ::IVssAsync + ) -> ::HRESULT, + fn PreFastRecovery( + &mut self, SnapshotSetID: ::VSS_ID, dwPreFastRecoveryFlags: ::DWORD, + ppAsync: *mut *mut ::IVssAsync + ) -> ::HRESULT, + fn FastRecovery( + &mut self, SnapshotSetID: ::VSS_ID, dwFastRecoveryFlags: ::DWORD, + ppAsync: *mut *mut ::IVssAsync + ) -> ::HRESULT +} +); +RIDL!( +interface IVssBackupComponentsEx3(IVssBackupComponentsEx3Vtbl): + IVssBackupComponentsEx2(IVssBackupComponentsEx2Vtbl) { + fn GetWriterStatusEx( + &mut self, iWriter: ::UINT, pidInstance: *mut ::VSS_ID, pidWriter: *mut ::VSS_ID, + pbstrWriter: *mut ::BSTR, pnStatus: *mut ::VSS_WRITER_STATE, + phrFailureWriter: *mut ::HRESULT, phrApplication: *mut ::HRESULT, + pbstrApplicationMessage: *mut ::BSTR + ) -> ::HRESULT, + fn AddSnapshotToRecoverySet( + &mut self, snapshotId: ::VSS_ID, dwFlags: ::DWORD, pwszDestinationVolume: ::VSS_PWSZ + ) -> ::HRESULT, + fn RecoverSet(&mut self, dwFlags: ::DWORD, ppAsync: *mut *mut ::IVssAsync) -> ::HRESULT, + fn GetSessionId(&mut self, idSession: *mut ::VSS_ID) -> ::HRESULT +} +); +RIDL!( +interface IVssBackupComponentsEx4(IVssBackupComponentsEx4Vtbl): + IVssBackupComponentsEx3(IVssBackupComponentsEx3Vtbl) { + fn GetRootAndLogicalPrefixPaths( + &mut self, pwszFilePath: ::VSS_PWSZ, ppwszRootPath: *mut ::VSS_PWSZ, + ppwszLogicalPrefix: *mut ::VSS_PWSZ, bNormalizeFQDNforRootPath: ::BOOL + ) -> ::HRESULT +} +); +pub const VSS_SW_BOOTABLE_STATE: ::DWORD = 1; diff --git a/deps/winapi-0.2.5/src/vss.rs b/deps/winapi-0.2.6/src/vss.rs similarity index 100% rename from deps/winapi-0.2.5/src/vss.rs rename to deps/winapi-0.2.6/src/vss.rs diff --git a/deps/winapi-0.2.5/src/vsserror.rs b/deps/winapi-0.2.6/src/vsserror.rs similarity index 100% rename from deps/winapi-0.2.5/src/vsserror.rs rename to deps/winapi-0.2.6/src/vsserror.rs diff --git a/deps/winapi-0.2.5/src/vswriter.rs b/deps/winapi-0.2.6/src/vswriter.rs similarity index 100% rename from deps/winapi-0.2.5/src/vswriter.rs rename to deps/winapi-0.2.6/src/vswriter.rs diff --git a/deps/winapi-0.2.5/src/werapi.rs b/deps/winapi-0.2.6/src/werapi.rs similarity index 100% rename from deps/winapi-0.2.5/src/werapi.rs rename to deps/winapi-0.2.6/src/werapi.rs diff --git a/deps/winapi-0.2.5/src/winbase.rs b/deps/winapi-0.2.6/src/winbase.rs similarity index 100% rename from deps/winapi-0.2.5/src/winbase.rs rename to deps/winapi-0.2.6/src/winbase.rs diff --git a/deps/winapi-0.2.5/src/wincon.rs b/deps/winapi-0.2.6/src/wincon.rs similarity index 100% rename from deps/winapi-0.2.5/src/wincon.rs rename to deps/winapi-0.2.6/src/wincon.rs diff --git a/deps/winapi-0.2.5/src/wincred.rs b/deps/winapi-0.2.6/src/wincred.rs similarity index 100% rename from deps/winapi-0.2.5/src/wincred.rs rename to deps/winapi-0.2.6/src/wincred.rs diff --git a/deps/winapi-0.2.6/src/wincrypt.rs b/deps/winapi-0.2.6/src/wincrypt.rs new file mode 100644 index 000000000..70c33c4bf --- /dev/null +++ b/deps/winapi-0.2.6/src/wincrypt.rs @@ -0,0 +1,2182 @@ +// Copyright © 2015, Peter Atashian +// Licensed under the MIT License <LICENSE.md> +//! Cryptographic API Prototypes and Definitions +//108 +pub const ALG_CLASS_ANY: ALG_ID = 0; +pub const ALG_CLASS_SIGNATURE: ALG_ID = 1 << 13; +pub const ALG_CLASS_MSG_ENCRYPT: ALG_ID = 2 << 13; +pub const ALG_CLASS_DATA_ENCRYPT: ALG_ID = 3 << 13; +pub const ALG_CLASS_HASH: ALG_ID = 4 << 13; +pub const ALG_CLASS_KEY_EXCHANGE: ALG_ID = 5 << 13; +pub const ALG_CLASS_ALL: ALG_ID = 7 << 13; +pub const ALG_TYPE_ANY: ALG_ID = 0; +pub const ALG_TYPE_DSS: ALG_ID = 1 << 9; +pub const ALG_TYPE_RSA: ALG_ID = 2 << 9; +pub const ALG_TYPE_BLOCK: ALG_ID = 3 << 9; +pub const ALG_TYPE_STREAM: ALG_ID = 4 << 9; +pub const ALG_TYPE_DH: ALG_ID = 5 << 9; +pub const ALG_TYPE_SECURECHANNEL: ALG_ID = 6 << 9; +pub const ALG_SID_ANY: ALG_ID = 0; +pub const ALG_SID_RSA_ANY: ALG_ID = 0; +pub const ALG_SID_RSA_PKCS: ALG_ID = 1; +pub const ALG_SID_RSA_MSATWORK: ALG_ID = 2; +pub const ALG_SID_RSA_ENTRUST: ALG_ID = 3; +pub const ALG_SID_RSA_PGP: ALG_ID = 4; +pub const ALG_SID_DSS_ANY: ALG_ID = 0; +pub const ALG_SID_DSS_PKCS: ALG_ID = 1; +pub const ALG_SID_DSS_DMS: ALG_ID = 2; +pub const ALG_SID_ECDSA: ALG_ID = 3; +pub const ALG_SID_DES: ALG_ID = 1; +pub const ALG_SID_3DES: ALG_ID = 3; +pub const ALG_SID_DESX: ALG_ID = 4; +pub const ALG_SID_IDEA: ALG_ID = 5; +pub const ALG_SID_CAST: ALG_ID = 6; +pub const ALG_SID_SAFERSK64: ALG_ID = 7; +pub const ALG_SID_SAFERSK128: ALG_ID = 8; +pub const ALG_SID_3DES_112: ALG_ID = 9; +pub const ALG_SID_CYLINK_MEK: ALG_ID = 12; +pub const ALG_SID_RC5: ALG_ID = 13; +pub const ALG_SID_AES_128: ALG_ID = 14; +pub const ALG_SID_AES_192: ALG_ID = 15; +pub const ALG_SID_AES_256: ALG_ID = 16; +pub const ALG_SID_AES: ALG_ID = 17; +pub const ALG_SID_SKIPJACK: ALG_ID = 10; +pub const ALG_SID_TEK: ALG_ID = 11; +pub const CRYPT_MODE_CBCI: ALG_ID = 6; +pub const CRYPT_MODE_CFBP: ALG_ID = 7; +pub const CRYPT_MODE_OFBP: ALG_ID = 8; +pub const CRYPT_MODE_CBCOFM: ALG_ID = 9; +pub const CRYPT_MODE_CBCOFMI: ALG_ID = 10; +pub const ALG_SID_RC2: ALG_ID = 2; +pub const ALG_SID_RC4: ALG_ID = 1; +pub const ALG_SID_SEAL: ALG_ID = 2; +pub const ALG_SID_DH_SANDF: ALG_ID = 1; +pub const ALG_SID_DH_EPHEM: ALG_ID = 2; +pub const ALG_SID_AGREED_KEY_ANY: ALG_ID = 3; +pub const ALG_SID_KEA: ALG_ID = 4; +pub const ALG_SID_ECDH: ALG_ID = 5; +pub const ALG_SID_MD2: ALG_ID = 1; +pub const ALG_SID_MD4: ALG_ID = 2; +pub const ALG_SID_MD5: ALG_ID = 3; +pub const ALG_SID_SHA: ALG_ID = 4; +pub const ALG_SID_SHA1: ALG_ID = 4; +pub const ALG_SID_MAC: ALG_ID = 5; +pub const ALG_SID_RIPEMD: ALG_ID = 6; +pub const ALG_SID_RIPEMD160: ALG_ID = 7; +pub const ALG_SID_SSL3SHAMD5: ALG_ID = 8; +pub const ALG_SID_HMAC: ALG_ID = 9; +pub const ALG_SID_TLS1PRF: ALG_ID = 10; +pub const ALG_SID_HASH_REPLACE_OWF: ALG_ID = 11; +pub const ALG_SID_SHA_256: ALG_ID = 12; +pub const ALG_SID_SHA_384: ALG_ID = 13; +pub const ALG_SID_SHA_512: ALG_ID = 14; +pub const ALG_SID_SSL3_MASTER: ALG_ID = 1; +pub const ALG_SID_SCHANNEL_MASTER_HASH: ALG_ID = 2; +pub const ALG_SID_SCHANNEL_MAC_KEY: ALG_ID = 3; +pub const ALG_SID_PCT1_MASTER: ALG_ID = 4; +pub const ALG_SID_SSL2_MASTER: ALG_ID = 5; +pub const ALG_SID_TLS1_MASTER: ALG_ID = 6; +pub const ALG_SID_SCHANNEL_ENC_KEY: ALG_ID = 7; +pub const ALG_SID_ECMQV: ALG_ID = 1; +pub const ALG_SID_EXAMPLE: ALG_ID = 80; +pub type ALG_ID = ::c_uint; +pub const CALG_MD2: ALG_ID = ALG_CLASS_HASH | ALG_TYPE_ANY | ALG_SID_MD2; +pub const CALG_MD4: ALG_ID = ALG_CLASS_HASH | ALG_TYPE_ANY | ALG_SID_MD4; +pub const CALG_MD5: ALG_ID = ALG_CLASS_HASH | ALG_TYPE_ANY | ALG_SID_MD5; +pub const CALG_SHA: ALG_ID = ALG_CLASS_HASH | ALG_TYPE_ANY | ALG_SID_SHA; +pub const CALG_SHA1: ALG_ID = ALG_CLASS_HASH | ALG_TYPE_ANY | ALG_SID_SHA1; +pub const CALG_MAC: ALG_ID = ALG_CLASS_HASH | ALG_TYPE_ANY | ALG_SID_MAC; +pub const CALG_RSA_SIGN: ALG_ID = ALG_CLASS_SIGNATURE | ALG_TYPE_RSA | ALG_SID_RSA_ANY; +pub const CALG_DSS_SIGN: ALG_ID = ALG_CLASS_SIGNATURE | ALG_TYPE_DSS | ALG_SID_DSS_ANY; +pub const CALG_NO_SIGN: ALG_ID = ALG_CLASS_SIGNATURE | ALG_TYPE_ANY | ALG_SID_ANY; +pub const CALG_RSA_KEYX: ALG_ID = ALG_CLASS_KEY_EXCHANGE | ALG_TYPE_RSA | ALG_SID_RSA_ANY; +pub const CALG_DES: ALG_ID = ALG_CLASS_DATA_ENCRYPT | ALG_TYPE_BLOCK | ALG_SID_DES; +pub const CALG_3DES_112: ALG_ID = ALG_CLASS_DATA_ENCRYPT | ALG_TYPE_BLOCK | ALG_SID_3DES_112; +pub const CALG_3DES: ALG_ID = ALG_CLASS_DATA_ENCRYPT | ALG_TYPE_BLOCK | ALG_SID_3DES; +pub const CALG_DESX: ALG_ID = ALG_CLASS_DATA_ENCRYPT | ALG_TYPE_BLOCK | ALG_SID_DESX; +pub const CALG_RC2: ALG_ID = ALG_CLASS_DATA_ENCRYPT | ALG_TYPE_BLOCK | ALG_SID_RC2; +pub const CALG_RC4: ALG_ID = ALG_CLASS_DATA_ENCRYPT | ALG_TYPE_STREAM | ALG_SID_RC4; +pub const CALG_SEAL: ALG_ID = ALG_CLASS_DATA_ENCRYPT | ALG_TYPE_STREAM | ALG_SID_SEAL; +pub const CALG_DH_SF: ALG_ID = ALG_CLASS_KEY_EXCHANGE | ALG_TYPE_DH | ALG_SID_DH_SANDF; +pub const CALG_DH_EPHEM: ALG_ID = ALG_CLASS_KEY_EXCHANGE | ALG_TYPE_DH | ALG_SID_DH_EPHEM; +pub const CALG_AGREEDKEY_ANY: ALG_ID = ALG_CLASS_KEY_EXCHANGE | ALG_TYPE_DH + | ALG_SID_AGREED_KEY_ANY; +pub const CALG_KEA_KEYX: ALG_ID = ALG_CLASS_KEY_EXCHANGE | ALG_TYPE_DH | ALG_SID_KEA; +pub const CALG_HUGHES_MD5: ALG_ID = ALG_CLASS_KEY_EXCHANGE | ALG_TYPE_ANY | ALG_SID_MD5; +pub const CALG_SKIPJACK: ALG_ID = ALG_CLASS_DATA_ENCRYPT | ALG_TYPE_BLOCK | ALG_SID_SKIPJACK; +pub const CALG_TEK: ALG_ID = ALG_CLASS_DATA_ENCRYPT | ALG_TYPE_BLOCK | ALG_SID_TEK; +pub const CALG_CYLINK_MEK: ALG_ID = ALG_CLASS_DATA_ENCRYPT | ALG_TYPE_BLOCK | ALG_SID_CYLINK_MEK; +pub const CALG_SSL3_SHAMD5: ALG_ID = ALG_CLASS_HASH | ALG_TYPE_ANY | ALG_SID_SSL3SHAMD5; +pub const CALG_SSL3_MASTER: ALG_ID = ALG_CLASS_MSG_ENCRYPT | ALG_TYPE_SECURECHANNEL + | ALG_SID_SSL3_MASTER; +pub const CALG_SCHANNEL_MASTER_HASH: ALG_ID = ALG_CLASS_MSG_ENCRYPT | ALG_TYPE_SECURECHANNEL + | ALG_SID_SCHANNEL_MASTER_HASH; +pub const CALG_SCHANNEL_MAC_KEY: ALG_ID = ALG_CLASS_MSG_ENCRYPT | ALG_TYPE_SECURECHANNEL + | ALG_SID_SCHANNEL_MAC_KEY; +pub const CALG_SCHANNEL_ENC_KEY: ALG_ID = ALG_CLASS_MSG_ENCRYPT | ALG_TYPE_SECURECHANNEL + | ALG_SID_SCHANNEL_ENC_KEY; +pub const CALG_PCT1_MASTER: ALG_ID = ALG_CLASS_MSG_ENCRYPT | ALG_TYPE_SECURECHANNEL + | ALG_SID_PCT1_MASTER; +pub const CALG_SSL2_MASTER: ALG_ID = ALG_CLASS_MSG_ENCRYPT | ALG_TYPE_SECURECHANNEL + | ALG_SID_SSL2_MASTER; +pub const CALG_TLS1_MASTER: ALG_ID = ALG_CLASS_MSG_ENCRYPT | ALG_TYPE_SECURECHANNEL + | ALG_SID_TLS1_MASTER; +pub const CALG_RC5: ALG_ID = ALG_CLASS_DATA_ENCRYPT | ALG_TYPE_BLOCK | ALG_SID_RC5; +pub const CALG_HMAC: ALG_ID = ALG_CLASS_HASH | ALG_TYPE_ANY | ALG_SID_HMAC; +pub const CALG_TLS1PRF: ALG_ID = ALG_CLASS_HASH | ALG_TYPE_ANY | ALG_SID_TLS1PRF; +pub const CALG_HASH_REPLACE_OWF: ALG_ID = ALG_CLASS_HASH | ALG_TYPE_ANY | ALG_SID_HASH_REPLACE_OWF; +pub const CALG_AES_128: ALG_ID = ALG_CLASS_DATA_ENCRYPT | ALG_TYPE_BLOCK | ALG_SID_AES_128; +pub const CALG_AES_192: ALG_ID = ALG_CLASS_DATA_ENCRYPT | ALG_TYPE_BLOCK | ALG_SID_AES_192; +pub const CALG_AES_256: ALG_ID = ALG_CLASS_DATA_ENCRYPT | ALG_TYPE_BLOCK | ALG_SID_AES_256; +pub const CALG_AES: ALG_ID = ALG_CLASS_DATA_ENCRYPT | ALG_TYPE_BLOCK | ALG_SID_AES; +pub const CALG_SHA_256: ALG_ID = ALG_CLASS_HASH | ALG_TYPE_ANY | ALG_SID_SHA_256; +pub const CALG_SHA_384: ALG_ID = ALG_CLASS_HASH | ALG_TYPE_ANY | ALG_SID_SHA_384; +pub const CALG_SHA_512: ALG_ID = ALG_CLASS_HASH | ALG_TYPE_ANY | ALG_SID_SHA_512; +pub const CALG_ECDH: ALG_ID = ALG_CLASS_KEY_EXCHANGE | ALG_TYPE_DH | ALG_SID_ECDH; +pub const CALG_ECMQV: ALG_ID = ALG_CLASS_KEY_EXCHANGE | ALG_TYPE_ANY | ALG_SID_ECMQV; +pub const CALG_ECDSA: ALG_ID = ALG_CLASS_SIGNATURE | ALG_TYPE_DSS | ALG_SID_ECDSA; +pub type HCRYPTPROV = ::ULONG_PTR; +pub type HCRYPTKEY = ::ULONG_PTR; +pub type HCRYPTHASH = ::ULONG_PTR; +pub const CRYPT_VERIFYCONTEXT: ::DWORD = 0xF0000000; +pub const CRYPT_NEWKEYSET: ::DWORD = 0x00000008; +pub const CRYPT_DELETEKEYSET: ::DWORD = 0x00000010; +pub const CRYPT_MACHINE_KEYSET: ::DWORD = 0x00000020; +pub const CRYPT_SILENT: ::DWORD = 0x00000040; +pub const CRYPT_DEFAULT_CONTAINER_OPTIONAL: ::DWORD = 0x00000080; +pub const CRYPT_EXPORTABLE: ::DWORD = 0x00000001; +pub const CRYPT_USER_PROTECTED: ::DWORD = 0x00000002; +pub const CRYPT_CREATE_SALT: ::DWORD = 0x00000004; +pub const CRYPT_UPDATE_KEY: ::DWORD = 0x00000008; +pub const CRYPT_NO_SALT: ::DWORD = 0x00000010; +pub const CRYPT_PREGEN: ::DWORD = 0x00000040; +pub const CRYPT_RECIPIENT: ::DWORD = 0x00000010; +pub const CRYPT_INITIATOR: ::DWORD = 0x00000040; +pub const CRYPT_ONLINE: ::DWORD = 0x00000080; +pub const CRYPT_SF: ::DWORD = 0x00000100; +pub const CRYPT_CREATE_IV: ::DWORD = 0x00000200; +pub const CRYPT_KEK: ::DWORD = 0x00000400; +pub const CRYPT_DATA_KEY: ::DWORD = 0x00000800; +pub const CRYPT_VOLATILE: ::DWORD = 0x00001000; +pub const CRYPT_SGCKEY: ::DWORD = 0x00002000; +pub const CRYPT_USER_PROTECTED_STRONG: ::DWORD = 0x00100000; +pub const CRYPT_ARCHIVABLE: ::DWORD = 0x00004000; +pub const CRYPT_FORCE_KEY_PROTECTION_HIGH: ::DWORD = 0x00008000; +pub const RSA1024BIT_KEY: ::DWORD = 0x04000000; +pub const CRYPT_SERVER: ::DWORD = 0x00000400; +pub const KEY_LENGTH_MASK: ::DWORD = 0xFFFF0000; +pub const CRYPT_Y_ONLY: ::DWORD = 0x00000001; +pub const CRYPT_SSL2_FALLBACK: ::DWORD = 0x00000002; +pub const CRYPT_DESTROYKEY: ::DWORD = 0x00000004; +pub const CRYPT_OAEP: ::DWORD = 0x00000040; +pub const CRYPT_BLOB_VER3: ::DWORD = 0x00000080; +pub const CRYPT_IPSEC_HMAC_KEY: ::DWORD = 0x00000100; +pub const CRYPT_DECRYPT_RSA_NO_PADDING_CHECK: ::DWORD = 0x00000020; +pub const CRYPT_SECRETDIGEST: ::DWORD = 0x00000001; +pub const CRYPT_OWF_REPL_LM_HASH: ::DWORD = 0x00000001; +pub const CRYPT_LITTLE_ENDIAN: ::DWORD = 0x00000001; +pub const CRYPT_NOHASHOID: ::DWORD = 0x00000001; +pub const CRYPT_TYPE2_FORMAT: ::DWORD = 0x00000002; +pub const CRYPT_X931_FORMAT: ::DWORD = 0x00000004; +pub const CRYPT_MACHINE_DEFAULT: ::DWORD = 0x00000001; +pub const CRYPT_USER_DEFAULT: ::DWORD = 0x00000002; +pub const CRYPT_DELETE_DEFAULT: ::DWORD = 0x00000004; +pub const SIMPLEBLOB: ::DWORD = 0x1; +pub const PUBLICKEYBLOB: ::DWORD = 0x6; +pub const PRIVATEKEYBLOB: ::DWORD = 0x7; +pub const PLAINTEXTKEYBLOB: ::DWORD = 0x8; +pub const OPAQUEKEYBLOB: ::DWORD = 0x9; +pub const PUBLICKEYBLOBEX: ::DWORD = 0xA; +pub const SYMMETRICWRAPKEYBLOB: ::DWORD = 0xB; +pub const KEYSTATEBLOB: ::DWORD = 0xC; +pub const AT_KEYEXCHANGE: ::DWORD = 1; +pub const AT_SIGNATURE: ::DWORD = 2; +pub const CRYPT_USERDATA: ::DWORD = 1; +pub const KP_IV: ::DWORD = 1; +pub const KP_SALT: ::DWORD = 2; +pub const KP_PADDING: ::DWORD = 3; +pub const KP_MODE: ::DWORD = 4; +pub const KP_MODE_BITS: ::DWORD = 5; +pub const KP_PERMISSIONS: ::DWORD = 6; +pub const KP_ALGID: ::DWORD = 7; +pub const KP_BLOCKLEN: ::DWORD = 8; +pub const KP_KEYLEN: ::DWORD = 9; +pub const KP_SALT_EX: ::DWORD = 10; +pub const KP_P: ::DWORD = 11; +pub const KP_G: ::DWORD = 12; +pub const KP_Q: ::DWORD = 13; +pub const KP_X: ::DWORD = 14; +pub const KP_Y: ::DWORD = 15; +pub const KP_RA: ::DWORD = 16; +pub const KP_RB: ::DWORD = 17; +pub const KP_INFO: ::DWORD = 18; +pub const KP_EFFECTIVE_KEYLEN: ::DWORD = 19; +pub const KP_SCHANNEL_ALG: ::DWORD = 20; +pub const KP_CLIENT_RANDOM: ::DWORD = 21; +pub const KP_SERVER_RANDOM: ::DWORD = 22; +pub const KP_RP: ::DWORD = 23; +pub const KP_PRECOMP_MD5: ::DWORD = 24; +pub const KP_PRECOMP_SHA: ::DWORD = 25; +pub const KP_CERTIFICATE: ::DWORD = 26; +pub const KP_CLEAR_KEY: ::DWORD = 27; +pub const KP_PUB_EX_LEN: ::DWORD = 28; +pub const KP_PUB_EX_VAL: ::DWORD = 29; +pub const KP_KEYVAL: ::DWORD = 30; +pub const KP_ADMIN_PIN: ::DWORD = 31; +pub const KP_KEYEXCHANGE_PIN: ::DWORD = 32; +pub const KP_SIGNATURE_PIN: ::DWORD = 33; +pub const KP_PREHASH: ::DWORD = 34; +pub const KP_ROUNDS: ::DWORD = 35; +pub const KP_OAEP_PARAMS: ::DWORD = 36; +pub const KP_CMS_KEY_INFO: ::DWORD = 37; +pub const KP_CMS_DH_KEY_INFO: ::DWORD = 38; +pub const KP_PUB_PARAMS: ::DWORD = 39; +pub const KP_VERIFY_PARAMS: ::DWORD = 40; +pub const KP_HIGHEST_VERSION: ::DWORD = 41; +pub const KP_GET_USE_COUNT: ::DWORD = 42; +pub const KP_PIN_ID: ::DWORD = 43; +pub const KP_PIN_INFO: ::DWORD = 44; +pub const PKCS5_PADDING: ::DWORD = 1; +pub const RANDOM_PADDING: ::DWORD = 2; +pub const ZERO_PADDING: ::DWORD = 3; +pub const CRYPT_MODE_CBC: ::DWORD = 1; +pub const CRYPT_MODE_ECB: ::DWORD = 2; +pub const CRYPT_MODE_OFB: ::DWORD = 3; +pub const CRYPT_MODE_CFB: ::DWORD = 4; +pub const CRYPT_MODE_CTS: ::DWORD = 5; +pub const CRYPT_ENCRYPT: ::DWORD = 0x0001; +pub const CRYPT_DECRYPT: ::DWORD = 0x0002; +pub const CRYPT_EXPORT: ::DWORD = 0x0004; +pub const CRYPT_READ: ::DWORD = 0x0008; +pub const CRYPT_WRITE: ::DWORD = 0x0010; +pub const CRYPT_MAC: ::DWORD = 0x0020; +pub const CRYPT_EXPORT_KEY: ::DWORD = 0x0040; +pub const CRYPT_IMPORT_KEY: ::DWORD = 0x0080; +pub const CRYPT_ARCHIVE: ::DWORD = 0x0100; +pub const HP_ALGID: ::DWORD = 0x0001; +pub const HP_HASHVAL: ::DWORD = 0x0002; +pub const HP_HASHSIZE: ::DWORD = 0x0004; +pub const HP_HMAC_INFO: ::DWORD = 0x0005; +pub const HP_TLS1PRF_LABEL: ::DWORD = 0x0006; +pub const HP_TLS1PRF_SEED: ::DWORD = 0x0007; +pub const CRYPT_FAILED: ::BOOL = ::FALSE; +pub const CRYPT_SUCCEED: ::BOOL = ::TRUE; +pub const PP_ENUMALGS: ::DWORD = 1; +pub const PP_ENUMCONTAINERS: ::DWORD = 2; +pub const PP_IMPTYPE: ::DWORD = 3; +pub const PP_NAME: ::DWORD = 4; +pub const PP_VERSION: ::DWORD = 5; +pub const PP_CONTAINER: ::DWORD = 6; +pub const PP_CHANGE_PASSWORD: ::DWORD = 7; +pub const PP_KEYSET_SEC_DESCR: ::DWORD = 8; +pub const PP_CERTCHAIN: ::DWORD = 9; +pub const PP_KEY_TYPE_SUBTYPE: ::DWORD = 10; +pub const PP_PROVTYPE: ::DWORD = 16; +pub const PP_KEYSTORAGE: ::DWORD = 17; +pub const PP_APPLI_CERT: ::DWORD = 18; +pub const PP_SYM_KEYSIZE: ::DWORD = 19; +pub const PP_SESSION_KEYSIZE: ::DWORD = 20; +pub const PP_UI_PROMPT: ::DWORD = 21; +pub const PP_ENUMALGS_EX: ::DWORD = 22; +pub const PP_ENUMMANDROOTS: ::DWORD = 25; +pub const PP_ENUMELECTROOTS: ::DWORD = 26; +pub const PP_KEYSET_TYPE: ::DWORD = 27; +pub const PP_ADMIN_PIN: ::DWORD = 31; +pub const PP_KEYEXCHANGE_PIN: ::DWORD = 32; +pub const PP_SIGNATURE_PIN: ::DWORD = 33; +pub const PP_SIG_KEYSIZE_INC: ::DWORD = 34; +pub const PP_KEYX_KEYSIZE_INC: ::DWORD = 35; +pub const PP_UNIQUE_CONTAINER: ::DWORD = 36; +pub const PP_SGC_INFO: ::DWORD = 37; +pub const PP_USE_HARDWARE_RNG: ::DWORD = 38; +pub const PP_KEYSPEC: ::DWORD = 39; +pub const PP_ENUMEX_SIGNING_PROT: ::DWORD = 40; +pub const PP_CRYPT_COUNT_KEY_USE: ::DWORD = 41; +pub const PP_USER_CERTSTORE: ::DWORD = 42; +pub const PP_SMARTCARD_READER: ::DWORD = 43; +pub const PP_SMARTCARD_GUID: ::DWORD = 45; +pub const PP_ROOT_CERTSTORE: ::DWORD = 46; +pub const PP_SMARTCARD_READER_ICON: ::DWORD = 47; +pub const CRYPT_FIRST: ::DWORD = 1; +pub const CRYPT_NEXT: ::DWORD = 2; +pub const CRYPT_SGC_ENUM: ::DWORD = 4; +pub const CRYPT_IMPL_HARDWARE: ::DWORD = 1; +pub const CRYPT_IMPL_SOFTWARE: ::DWORD = 2; +pub const CRYPT_IMPL_MIXED: ::DWORD = 3; +pub const CRYPT_IMPL_UNKNOWN: ::DWORD = 4; +pub const CRYPT_IMPL_REMOVABLE: ::DWORD = 8; +pub const CRYPT_SEC_DESCR: ::DWORD = 0x00000001; +pub const CRYPT_PSTORE: ::DWORD = 0x00000002; +pub const CRYPT_UI_PROMPT: ::DWORD = 0x00000004; +pub const CRYPT_FLAG_PCT1: ::DWORD = 0x0001; +pub const CRYPT_FLAG_SSL2: ::DWORD = 0x0002; +pub const CRYPT_FLAG_SSL3: ::DWORD = 0x0004; +pub const CRYPT_FLAG_TLS1: ::DWORD = 0x0008; +pub const CRYPT_FLAG_IPSEC: ::DWORD = 0x0010; +pub const CRYPT_FLAG_SIGNING: ::DWORD = 0x0020; +pub const CRYPT_SGC: ::DWORD = 0x0001; +pub const CRYPT_FASTSGC: ::DWORD = 0x0002; +pub const PP_CLIENT_HWND: ::DWORD = 1; +pub const PP_CONTEXT_INFO: ::DWORD = 11; +pub const PP_KEYEXCHANGE_KEYSIZE: ::DWORD = 12; +pub const PP_SIGNATURE_KEYSIZE: ::DWORD = 13; +pub const PP_KEYEXCHANGE_ALG: ::DWORD = 14; +pub const PP_SIGNATURE_ALG: ::DWORD = 15; +pub const PP_DELETEKEY: ::DWORD = 24; +pub const PP_PIN_PROMPT_STRING: ::DWORD = 44; +pub const PP_SECURE_KEYEXCHANGE_PIN: ::DWORD = 47; +pub const PP_SECURE_SIGNATURE_PIN: ::DWORD = 48; +pub const PROV_RSA_FULL: ::DWORD = 1; +pub const PROV_RSA_SIG: ::DWORD = 2; +pub const PROV_DSS: ::DWORD = 3; +pub const PROV_FORTEZZA: ::DWORD = 4; +pub const PROV_MS_EXCHANGE: ::DWORD = 5; +pub const PROV_SSL: ::DWORD = 6; +pub const PROV_RSA_SCHANNEL: ::DWORD = 12; +pub const PROV_DSS_DH: ::DWORD = 13; +pub const PROV_EC_ECDSA_SIG: ::DWORD = 14; +pub const PROV_EC_ECNRA_SIG: ::DWORD = 15; +pub const PROV_EC_ECDSA_FULL: ::DWORD = 16; +pub const PROV_EC_ECNRA_FULL: ::DWORD = 17; +pub const PROV_DH_SCHANNEL: ::DWORD = 18; +pub const PROV_SPYRUS_LYNKS: ::DWORD = 20; +pub const PROV_RNG: ::DWORD = 21; +pub const PROV_INTEL_SEC: ::DWORD = 22; +pub const PROV_REPLACE_OWF: ::DWORD = 23; +pub const PROV_RSA_AES: ::DWORD = 24; +pub const MS_DEF_PROV: &'static str = "Microsoft Base Cryptographic Provider v1.0"; +pub const MS_ENHANCED_PROV: &'static str = "Microsoft Enhanced Cryptographic Provider v1.0"; +pub const MS_STRONG_PROV: &'static str = "Microsoft Strong Cryptographic Provider"; +pub const MS_DEF_RSA_SIG_PROV: &'static str = "Microsoft RSA Signature Cryptographic Provider"; +pub const MS_DEF_RSA_SCHANNEL_PROV: &'static str = "Microsoft RSA SChannel Cryptographic Provider"; +pub const MS_DEF_DSS_PROV: &'static str = "Microsoft Base DSS Cryptographic Provider"; +pub const MS_DEF_DSS_DH_PROV: &'static str = + "Microsoft Base DSS and Diffie-Hellman Cryptographic Provider"; +pub const MS_ENH_DSS_DH_PROV: &'static str = + "Microsoft Enhanced DSS and Diffie-Hellman Cryptographic Provider"; +pub const MS_DEF_DH_SCHANNEL_PROV: &'static str = "Microsoft DH SChannel Cryptographic Provider"; +pub const MS_SCARD_PROV: &'static str = "Microsoft Base Smart Card Crypto Provider"; +pub const MS_ENH_RSA_AES_PROV: &'static str = + "Microsoft Enhanced RSA and AES Cryptographic Provider"; +pub const MS_ENH_RSA_AES_PROV_XP: &'static str = + "Microsoft Enhanced RSA and AES Cryptographic Provider (Prototype)"; +pub const MAXUIDLEN: usize = 64; +pub const EXPO_OFFLOAD_REG_VALUE: &'static str = "ExpoOffload"; +pub const EXPO_OFFLOAD_FUNC_NAME: &'static str = "OffloadModExpo"; +pub const szKEY_CRYPTOAPI_PRIVATE_KEY_OPTIONS: &'static str = + "Software\\Policies\\Microsoft\\Cryptography"; +pub const szKEY_CACHE_ENABLED: &'static str = "CachePrivateKeys"; +pub const szKEY_CACHE_SECONDS: &'static str = "PrivateKeyLifetimeSeconds"; +pub const szPRIV_KEY_CACHE_MAX_ITEMS: &'static str = "PrivKeyCacheMaxItems"; +pub const cPRIV_KEY_CACHE_MAX_ITEMS_DEFAULT: ::DWORD = 20; +pub const szPRIV_KEY_CACHE_PURGE_INTERVAL_SECONDS: &'static str = + "PrivKeyCachePurgeIntervalSeconds"; +pub const cPRIV_KEY_CACHE_PURGE_INTERVAL_SECONDS_DEFAULT: ::DWORD = 86400; +pub const CUR_BLOB_VERSION: ::DWORD = 2; +STRUCT!{struct CMS_KEY_INFO { + dwVersion: ::DWORD, + Algid: ALG_ID, + pbOID: *mut ::BYTE, + cbOID: ::DWORD, +}} +pub type PCMS_KEY_INFO = *mut CMS_KEY_INFO; +STRUCT!{struct HMAC_INFO { + HashAlgid: ALG_ID, + pbInnerString: *mut ::BYTE, + cbInnerString: ::DWORD, + pbOuterString: *mut ::BYTE, + cbOuterString: ::DWORD, +}} +pub type PHMAC_INFO = *mut HMAC_INFO; +STRUCT!{struct SCHANNEL_ALG { + dwUse: ::DWORD, + Algid: ALG_ID, + cBits: ::DWORD, + dwFlags: ::DWORD, + dwReserved: ::DWORD, +}} +pub type PSCHANNEL_ALG = *mut SCHANNEL_ALG; +pub const SCHANNEL_MAC_KEY: ::DWORD = 0x00000000; +pub const SCHANNEL_ENC_KEY: ::DWORD = 0x00000001; +pub const INTERNATIONAL_USAGE: ::DWORD = 0x00000001; +STRUCT!{struct PROV_ENUMALGS { + aiAlgid: ALG_ID, + dwBitLen: ::DWORD, + dwNameLen: ::DWORD, + szName: [::CHAR; 20], +}} +STRUCT!{nodebug struct PROV_ENUMALGS_EX { + aiAlgid: ALG_ID, + dwDefaultLen: ::DWORD, + dwMinLen: ::DWORD, + dwMaxLen: ::DWORD, + dwProtocols: ::DWORD, + dwNameLen: ::DWORD, + szName: [::CHAR; 20], + dwLongNameLen: ::DWORD, + szLongName: [::CHAR; 40], +}} +STRUCT!{struct BLOBHEADER { + bType: ::BYTE, + bVersion: ::BYTE, + reserved: ::WORD, + aiKeyAlg: ::ALG_ID, +}} +pub type PUBLICKEYSTRUC = BLOBHEADER; +STRUCT!{struct RSAPUBKEY { + magic: ::DWORD, + bitlen: ::DWORD, + pubexp: ::DWORD, +}} +STRUCT!{struct DHPUBKEY { + magic: ::DWORD, + bitlen: ::DWORD, +}} +pub type DSSPUBKEY = DHPUBKEY; +pub type KEAPUBKEY = DHPUBKEY; +pub type TEKPUBKEY = DHPUBKEY; +STRUCT!{struct DSSSEED { + counter: ::DWORD, + seed: [::BYTE; 20], +}} +STRUCT!{struct DHPUBKEY_VER3 { + magic: ::DWORD, + bitlenP: ::DWORD, + bitlenQ: ::DWORD, + bitlenJ: ::DWORD, + DSSSeed: DSSSEED, +}} +pub type DSSPUBKEY_VER3 = DHPUBKEY_VER3; +STRUCT!{struct DHPRIVKEY_VER3 { + magic: ::DWORD, + bitlenP: ::DWORD, + bitlenQ: ::DWORD, + bitlenJ: ::DWORD, + bitlenX: ::DWORD, + DSSSeed: DSSSEED, +}} +pub type DSSPRIVKEY_VER3 = DHPRIVKEY_VER3; +STRUCT!{struct KEY_TYPE_SUBTYPE { + dwKeySpec: ::DWORD, + Type: ::GUID, + Subtype: ::GUID, +}} +pub type PKEY_TYPE_SUBTYPE = *mut KEY_TYPE_SUBTYPE; +STRUCT!{nodebug struct CERT_FORTEZZA_DATA_PROP { + SerialNumber: [::c_uchar; 8], + CertIndex: ::c_int, + CertLabel: [::c_uchar; 36], +}} +STRUCT!{nodebug struct CRYPT_RC4_KEY_STATE { + Key: [::c_uchar; 16], + SBox: [::c_uchar; 256], + i: ::c_uchar, + j: ::c_uchar, +}} +pub type PCRYPT_RC4_KEY_STATE = *mut CRYPT_RC4_KEY_STATE; +STRUCT!{struct CRYPT_DES_KEY_STATE { + Key: [::c_uchar; 8], + IV: [::c_uchar; 8], + Feedback: [::c_uchar; 8], +}} +pub type PCRYPT_DES_KEY_STATE = *mut CRYPT_DES_KEY_STATE; +STRUCT!{struct CRYPT_3DES_KEY_STATE { + Key: [::c_uchar; 24], + IV: [::c_uchar; 8], + Feedback: [::c_uchar; 8], +}} +pub type PCRYPT_3DES_KEY_STATE = *mut CRYPT_3DES_KEY_STATE; +STRUCT!{struct CRYPT_AES_128_KEY_STATE { + Key: [::c_uchar; 16], + IV: [::c_uchar; 16], + EncryptionState: [[::c_uchar; 16]; 11], + DecryptionState: [[::c_uchar; 16]; 11], + Feedback: [::c_uchar; 16], +}} +pub type PCRYPT_AES_128_KEY_STATE = *mut CRYPT_AES_128_KEY_STATE; +STRUCT!{struct CRYPT_AES_256_KEY_STATE { + Key: [::c_uchar; 32], + IV: [::c_uchar; 16], + EncryptionState: [[::c_uchar; 16]; 15], + DecryptionState: [[::c_uchar; 16]; 15], + Feedback: [::c_uchar; 16], +}} +pub type PCRYPT_AES_256_KEY_STATE = *mut CRYPT_AES_256_KEY_STATE; +STRUCT!{struct CRYPTOAPI_BLOB { + cbData: ::DWORD, + pbData: *mut ::BYTE, +}} +pub type CRYPT_INTEGER_BLOB = CRYPTOAPI_BLOB; +pub type PCRYPT_INTEGER_BLOB = *mut CRYPTOAPI_BLOB; +pub type CRYPT_UINT_BLOB = CRYPTOAPI_BLOB; +pub type PCRYPT_UINT_BLOB = *mut CRYPTOAPI_BLOB; +pub type CRYPT_OBJID_BLOB = CRYPTOAPI_BLOB; +pub type PCRYPT_OBJID_BLOB = *mut CRYPTOAPI_BLOB; +pub type CERT_NAME_BLOB = CRYPTOAPI_BLOB; +pub type PCERT_NAME_BLOB = *mut CRYPTOAPI_BLOB; +pub type CERT_RDN_VALUE_BLOB = CRYPTOAPI_BLOB; +pub type PCERT_RDN_VALUE_BLOB = *mut CRYPTOAPI_BLOB; +pub type CERT_BLOB = CRYPTOAPI_BLOB; +pub type PCERT_BLOB = *mut CRYPTOAPI_BLOB; +pub type CRL_BLOB = CRYPTOAPI_BLOB; +pub type PCRL_BLOB = *mut CRYPTOAPI_BLOB; +pub type DATA_BLOB = CRYPTOAPI_BLOB; +pub type PDATA_BLOB = *mut CRYPTOAPI_BLOB; +pub type CRYPT_DATA_BLOB = CRYPTOAPI_BLOB; +pub type PCRYPT_DATA_BLOB = *mut CRYPTOAPI_BLOB; +pub type CRYPT_HASH_BLOB = CRYPTOAPI_BLOB; +pub type PCRYPT_HASH_BLOB = *mut CRYPTOAPI_BLOB; +pub type CRYPT_DIGEST_BLOB = CRYPTOAPI_BLOB; +pub type PCRYPT_DIGEST_BLOB = *mut CRYPTOAPI_BLOB; +pub type CRYPT_DER_BLOB = CRYPTOAPI_BLOB; +pub type PCRYPT_DER_BLOB = *mut CRYPTOAPI_BLOB; +pub type CRYPT_ATTR_BLOB = CRYPTOAPI_BLOB; +pub type PCRYPT_ATTR_BLOB = *mut CRYPTOAPI_BLOB; +STRUCT!{struct CMS_DH_KEY_INFO { + dwVersion: ::DWORD, + Algid: ALG_ID, + pszContentEncObjId: ::LPSTR, + PubInfo: CRYPT_DATA_BLOB, + pReserved: *mut ::c_void, +}} +pub type PCMS_DH_KEY_INFO = *mut CMS_DH_KEY_INFO; +pub type HCRYPTPROV_OR_NCRYPT_KEY_HANDLE = ::ULONG_PTR; +pub type HCRYPTPROV_LEGACY = ::ULONG_PTR; +STRUCT!{struct CRYPT_BIT_BLOB { + cbData: ::DWORD, + pbData: *mut ::BYTE, + cUnusedBits: ::DWORD, +}} +pub type PCRYPT_BIT_BLOB = *mut CRYPT_BIT_BLOB; +STRUCT!{struct CRYPT_ALGORITHM_IDENTIFIER { + pszObjId: ::LPSTR, + Parameters: CRYPT_OBJID_BLOB, +}} +pub type PCRYPT_ALGORITHM_IDENTIFIER = *mut CRYPT_ALGORITHM_IDENTIFIER; +pub const szOID_RSA: &'static str = "1.2.840.113549"; +pub const szOID_PKCS: &'static str = "1.2.840.113549.1"; +pub const szOID_RSA_HASH: &'static str = "1.2.840.113549.2"; +pub const szOID_RSA_ENCRYPT: &'static str = "1.2.840.113549.3"; +pub const szOID_PKCS_1: &'static str = "1.2.840.113549.1.1"; +pub const szOID_PKCS_2: &'static str = "1.2.840.113549.1.2"; +pub const szOID_PKCS_3: &'static str = "1.2.840.113549.1.3"; +pub const szOID_PKCS_4: &'static str = "1.2.840.113549.1.4"; +pub const szOID_PKCS_5: &'static str = "1.2.840.113549.1.5"; +pub const szOID_PKCS_6: &'static str = "1.2.840.113549.1.6"; +pub const szOID_PKCS_7: &'static str = "1.2.840.113549.1.7"; +pub const szOID_PKCS_8: &'static str = "1.2.840.113549.1.8"; +pub const szOID_PKCS_9: &'static str = "1.2.840.113549.1.9"; +pub const szOID_PKCS_10: &'static str = "1.2.840.113549.1.10"; +pub const szOID_PKCS_12: &'static str = "1.2.840.113549.1.12"; +pub const szOID_RSA_RSA: &'static str = "1.2.840.113549.1.1.1"; +pub const szOID_RSA_MD2RSA: &'static str = "1.2.840.113549.1.1.2"; +pub const szOID_RSA_MD4RSA: &'static str = "1.2.840.113549.1.1.3"; +pub const szOID_RSA_MD5RSA: &'static str = "1.2.840.113549.1.1.4"; +pub const szOID_RSA_SHA1RSA: &'static str = "1.2.840.113549.1.1.5"; +pub const szOID_RSA_SETOAEP_RSA: &'static str = "1.2.840.113549.1.1.6"; +pub const szOID_RSAES_OAEP: &'static str = "1.2.840.113549.1.1.7"; +pub const szOID_RSA_MGF1: &'static str = "1.2.840.113549.1.1.8"; +pub const szOID_RSA_PSPECIFIED: &'static str = "1.2.840.113549.1.1.9"; +pub const szOID_RSA_SSA_PSS: &'static str = "1.2.840.113549.1.1.10"; +pub const szOID_RSA_SHA256RSA: &'static str = "1.2.840.113549.1.1.11"; +pub const szOID_RSA_SHA384RSA: &'static str = "1.2.840.113549.1.1.12"; +pub const szOID_RSA_SHA512RSA: &'static str = "1.2.840.113549.1.1.13"; +pub const szOID_RSA_DH: &'static str = "1.2.840.113549.1.3.1"; +pub const szOID_RSA_data: &'static str = "1.2.840.113549.1.7.1"; +pub const szOID_RSA_signedData: &'static str = "1.2.840.113549.1.7.2"; +pub const szOID_RSA_envelopedData: &'static str = "1.2.840.113549.1.7.3"; +pub const szOID_RSA_signEnvData: &'static str = "1.2.840.113549.1.7.4"; +pub const szOID_RSA_digestedData: &'static str = "1.2.840.113549.1.7.5"; +pub const szOID_RSA_hashedData: &'static str = "1.2.840.113549.1.7.5"; +pub const szOID_RSA_encryptedData: &'static str = "1.2.840.113549.1.7.6"; +pub const szOID_RSA_emailAddr: &'static str = "1.2.840.113549.1.9.1"; +pub const szOID_RSA_unstructName: &'static str = "1.2.840.113549.1.9.2"; +pub const szOID_RSA_contentType: &'static str = "1.2.840.113549.1.9.3"; +pub const szOID_RSA_messageDigest: &'static str = "1.2.840.113549.1.9.4"; +pub const szOID_RSA_signingTime: &'static str = "1.2.840.113549.1.9.5"; +pub const szOID_RSA_counterSign: &'static str = "1.2.840.113549.1.9.6"; +pub const szOID_RSA_challengePwd: &'static str = "1.2.840.113549.1.9.7"; +pub const szOID_RSA_unstructAddr: &'static str = "1.2.840.113549.1.9.8"; +pub const szOID_RSA_extCertAttrs: &'static str = "1.2.840.113549.1.9.9"; +pub const szOID_RSA_certExtensions: &'static str = "1.2.840.113549.1.9.14"; +pub const szOID_RSA_SMIMECapabilities: &'static str = "1.2.840.113549.1.9.15"; +pub const szOID_RSA_preferSignedData: &'static str = "1.2.840.113549.1.9.15.1"; +pub const szOID_TIMESTAMP_TOKEN: &'static str = "1.2.840.113549.1.9.16.1.4"; +pub const szOID_RFC3161_counterSign: &'static str = "1.3.6.1.4.1.311.3.3.1"; +pub const szOID_RSA_SMIMEalg: &'static str = "1.2.840.113549.1.9.16.3"; +pub const szOID_RSA_SMIMEalgESDH: &'static str = "1.2.840.113549.1.9.16.3.5"; +pub const szOID_RSA_SMIMEalgCMS3DESwrap: &'static str = "1.2.840.113549.1.9.16.3.6"; +pub const szOID_RSA_SMIMEalgCMSRC2wrap: &'static str = "1.2.840.113549.1.9.16.3.7"; +pub const szOID_RSA_MD2: &'static str = "1.2.840.113549.2.2"; +pub const szOID_RSA_MD4: &'static str = "1.2.840.113549.2.4"; +pub const szOID_RSA_MD5: &'static str = "1.2.840.113549.2.5"; +pub const szOID_RSA_RC2CBC: &'static str = "1.2.840.113549.3.2"; +pub const szOID_RSA_RC4: &'static str = "1.2.840.113549.3.4"; +pub const szOID_RSA_DES_EDE3_CBC: &'static str = "1.2.840.113549.3.7"; +pub const szOID_RSA_RC5_CBCPad: &'static str = "1.2.840.113549.3.9"; +pub const szOID_ANSI_X942: &'static str = "1.2.840.10046"; +pub const szOID_ANSI_X942_DH: &'static str = "1.2.840.10046.2.1"; +pub const szOID_X957: &'static str = "1.2.840.10040"; +pub const szOID_X957_DSA: &'static str = "1.2.840.10040.4.1"; +pub const szOID_X957_SHA1DSA: &'static str = "1.2.840.10040.4.3"; +pub const szOID_ECC_PUBLIC_KEY: &'static str = "1.2.840.10045.2.1"; +pub const szOID_ECC_CURVE_P256: &'static str = "1.2.840.10045.3.1.7"; +pub const szOID_ECC_CURVE_P384: &'static str = "1.3.132.0.34"; +pub const szOID_ECC_CURVE_P521: &'static str = "1.3.132.0.35"; +pub const szOID_ECDSA_SHA1: &'static str = "1.2.840.10045.4.1"; +pub const szOID_ECDSA_SPECIFIED: &'static str = "1.2.840.10045.4.3"; +pub const szOID_ECDSA_SHA256: &'static str = "1.2.840.10045.4.3.2"; +pub const szOID_ECDSA_SHA384: &'static str = "1.2.840.10045.4.3.3"; +pub const szOID_ECDSA_SHA512: &'static str = "1.2.840.10045.4.3.4"; +pub const szOID_NIST_AES128_CBC: &'static str = "2.16.840.1.101.3.4.1.2"; +pub const szOID_NIST_AES192_CBC: &'static str = "2.16.840.1.101.3.4.1.22"; +pub const szOID_NIST_AES256_CBC: &'static str = "2.16.840.1.101.3.4.1.42"; +pub const szOID_NIST_AES128_WRAP: &'static str = "2.16.840.1.101.3.4.1.5"; +pub const szOID_NIST_AES192_WRAP: &'static str = "2.16.840.1.101.3.4.1.25"; +pub const szOID_NIST_AES256_WRAP: &'static str = "2.16.840.1.101.3.4.1.45"; +pub const szOID_DH_SINGLE_PASS_STDDH_SHA1_KDF: &'static str = "1.3.133.16.840.63.0.2"; +pub const szOID_DH_SINGLE_PASS_STDDH_SHA256_KDF: &'static str = "1.3.132.1.11.1"; +pub const szOID_DH_SINGLE_PASS_STDDH_SHA384_KDF: &'static str = "1.3.132.1.11.2"; +pub const szOID_DS: &'static str = "2.5"; +pub const szOID_DSALG: &'static str = "2.5.8"; +pub const szOID_DSALG_CRPT: &'static str = "2.5.8.1"; +pub const szOID_DSALG_HASH: &'static str = "2.5.8.2"; +pub const szOID_DSALG_SIGN: &'static str = "2.5.8.3"; +pub const szOID_DSALG_RSA: &'static str = "2.5.8.1.1"; +pub const szOID_OIW: &'static str = "1.3.14"; +pub const szOID_OIWSEC: &'static str = "1.3.14.3.2"; +pub const szOID_OIWSEC_md4RSA: &'static str = "1.3.14.3.2.2"; +pub const szOID_OIWSEC_md5RSA: &'static str = "1.3.14.3.2.3"; +pub const szOID_OIWSEC_md4RSA2: &'static str = "1.3.14.3.2.4"; +pub const szOID_OIWSEC_desECB: &'static str = "1.3.14.3.2.6"; +pub const szOID_OIWSEC_desCBC: &'static str = "1.3.14.3.2.7"; +pub const szOID_OIWSEC_desOFB: &'static str = "1.3.14.3.2.8"; +pub const szOID_OIWSEC_desCFB: &'static str = "1.3.14.3.2.9"; +pub const szOID_OIWSEC_desMAC: &'static str = "1.3.14.3.2.10"; +pub const szOID_OIWSEC_rsaSign: &'static str = "1.3.14.3.2.11"; +pub const szOID_OIWSEC_dsa: &'static str = "1.3.14.3.2.12"; +pub const szOID_OIWSEC_shaDSA: &'static str = "1.3.14.3.2.13"; +pub const szOID_OIWSEC_mdc2RSA: &'static str = "1.3.14.3.2.14"; +pub const szOID_OIWSEC_shaRSA: &'static str = "1.3.14.3.2.15"; +pub const szOID_OIWSEC_dhCommMod: &'static str = "1.3.14.3.2.16"; +pub const szOID_OIWSEC_desEDE: &'static str = "1.3.14.3.2.17"; +pub const szOID_OIWSEC_sha: &'static str = "1.3.14.3.2.18"; +pub const szOID_OIWSEC_mdc2: &'static str = "1.3.14.3.2.19"; +pub const szOID_OIWSEC_dsaComm: &'static str = "1.3.14.3.2.20"; +pub const szOID_OIWSEC_dsaCommSHA: &'static str = "1.3.14.3.2.21"; +pub const szOID_OIWSEC_rsaXchg: &'static str = "1.3.14.3.2.22"; +pub const szOID_OIWSEC_keyHashSeal: &'static str = "1.3.14.3.2.23"; +pub const szOID_OIWSEC_md2RSASign: &'static str = "1.3.14.3.2.24"; +pub const szOID_OIWSEC_md5RSASign: &'static str = "1.3.14.3.2.25"; +pub const szOID_OIWSEC_sha1: &'static str = "1.3.14.3.2.26"; +pub const szOID_OIWSEC_dsaSHA1: &'static str = "1.3.14.3.2.27"; +pub const szOID_OIWSEC_dsaCommSHA1: &'static str = "1.3.14.3.2.28"; +pub const szOID_OIWSEC_sha1RSASign: &'static str = "1.3.14.3.2.29"; +pub const szOID_OIWDIR: &'static str = "1.3.14.7.2"; +pub const szOID_OIWDIR_CRPT: &'static str = "1.3.14.7.2.1"; +pub const szOID_OIWDIR_HASH: &'static str = "1.3.14.7.2.2"; +pub const szOID_OIWDIR_SIGN: &'static str = "1.3.14.7.2.3"; +pub const szOID_OIWDIR_md2: &'static str = "1.3.14.7.2.2.1"; +pub const szOID_OIWDIR_md2RSA: &'static str = "1.3.14.7.2.3.1"; +pub const szOID_INFOSEC: &'static str = "2.16.840.1.101.2.1"; +pub const szOID_INFOSEC_sdnsSignature: &'static str = "2.16.840.1.101.2.1.1.1"; +pub const szOID_INFOSEC_mosaicSignature: &'static str = "2.16.840.1.101.2.1.1.2"; +pub const szOID_INFOSEC_sdnsConfidentiality: &'static str = "2.16.840.1.101.2.1.1.3"; +pub const szOID_INFOSEC_mosaicConfidentiality: &'static str = "2.16.840.1.101.2.1.1.4"; +pub const szOID_INFOSEC_sdnsIntegrity: &'static str = "2.16.840.1.101.2.1.1.5"; +pub const szOID_INFOSEC_mosaicIntegrity: &'static str = "2.16.840.1.101.2.1.1.6"; +pub const szOID_INFOSEC_sdnsTokenProtection: &'static str = "2.16.840.1.101.2.1.1.7"; +pub const szOID_INFOSEC_mosaicTokenProtection: &'static str = "2.16.840.1.101.2.1.1.8"; +pub const szOID_INFOSEC_sdnsKeyManagement: &'static str = "2.16.840.1.101.2.1.1.9"; +pub const szOID_INFOSEC_mosaicKeyManagement: &'static str = "2.16.840.1.101.2.1.1.10"; +pub const szOID_INFOSEC_sdnsKMandSig: &'static str = "2.16.840.1.101.2.1.1.11"; +pub const szOID_INFOSEC_mosaicKMandSig: &'static str = "2.16.840.1.101.2.1.1.12"; +pub const szOID_INFOSEC_SuiteASignature: &'static str = "2.16.840.1.101.2.1.1.13"; +pub const szOID_INFOSEC_SuiteAConfidentiality: &'static str = "2.16.840.1.101.2.1.1.14"; +pub const szOID_INFOSEC_SuiteAIntegrity: &'static str = "2.16.840.1.101.2.1.1.15"; +pub const szOID_INFOSEC_SuiteATokenProtection: &'static str = "2.16.840.1.101.2.1.1.16"; +pub const szOID_INFOSEC_SuiteAKeyManagement: &'static str = "2.16.840.1.101.2.1.1.17"; +pub const szOID_INFOSEC_SuiteAKMandSig: &'static str = "2.16.840.1.101.2.1.1.18"; +pub const szOID_INFOSEC_mosaicUpdatedSig: &'static str = "2.16.840.1.101.2.1.1.19"; +pub const szOID_INFOSEC_mosaicKMandUpdSig: &'static str = "2.16.840.1.101.2.1.1.20"; +pub const szOID_INFOSEC_mosaicUpdatedInteg: &'static str = "2.16.840.1.101.2.1.1.21"; +pub const szOID_NIST_sha256: &'static str = "2.16.840.1.101.3.4.2.1"; +pub const szOID_NIST_sha384: &'static str = "2.16.840.1.101.3.4.2.2"; +pub const szOID_NIST_sha512: &'static str = "2.16.840.1.101.3.4.2.3"; +STRUCT!{struct CRYPT_OBJID_TABLE { + dwAlgId: ::DWORD, + pszObjId: ::LPCSTR, +}} +pub type PCRYPT_OBJID_TABLE = *mut CRYPT_OBJID_TABLE; +STRUCT!{struct CRYPT_HASH_INFO { + HashAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, + Hash: CRYPT_HASH_BLOB, +}} +pub type PCRYPT_HASH_INFO = *mut CRYPT_HASH_INFO; +STRUCT!{struct CERT_EXTENSION { + pszObjId: ::LPSTR, + fCritical: ::BOOL, + Value: CRYPT_OBJID_BLOB, +}} +pub type PCERT_EXTENSION = *mut CERT_EXTENSION; +pub type PCCERT_EXTENSION = *const CERT_EXTENSION; +STRUCT!{struct CRYPT_ATTRIBUTE_TYPE_VALUE { + pszObjId: ::LPSTR, + Value: CRYPT_OBJID_BLOB, +}} +pub type PCRYPT_ATTRIBUTE_TYPE_VALUE = *mut CRYPT_ATTRIBUTE_TYPE_VALUE; +STRUCT!{struct CRYPT_ATTRIBUTE { + pszObjId: ::LPSTR, + cValue: ::DWORD, + rgValue: PCRYPT_ATTR_BLOB, +}} +pub type PCRYPT_ATTRIBUTE = *mut CRYPT_ATTRIBUTE; +STRUCT!{struct CRYPT_ATTRIBUTES { + cAttr: ::DWORD, + rgAttr: PCRYPT_ATTRIBUTE, +}} +pub type PCRYPT_ATTRIBUTES = *mut CRYPT_ATTRIBUTES; +STRUCT!{struct CERT_RDN_ATTR { + pszObjId: ::LPSTR, + dwValueType: ::DWORD, + Value: CERT_RDN_VALUE_BLOB, +}} +pub type PCERT_RDN_ATTR = *mut CERT_RDN_ATTR; +pub const szOID_COMMON_NAME: &'static str = "2.5.4.3"; +pub const szOID_SUR_NAME: &'static str = "2.5.4.4"; +pub const szOID_DEVICE_SERIAL_NUMBER: &'static str = "2.5.4.5"; +pub const szOID_COUNTRY_NAME: &'static str = "2.5.4.6"; +pub const szOID_LOCALITY_NAME: &'static str = "2.5.4.7"; +pub const szOID_STATE_OR_PROVINCE_NAME: &'static str = "2.5.4.8"; +pub const szOID_STREET_ADDRESS: &'static str = "2.5.4.9"; +pub const szOID_ORGANIZATION_NAME: &'static str = "2.5.4.10"; +pub const szOID_ORGANIZATIONAL_UNIT_NAME: &'static str = "2.5.4.11"; +pub const szOID_TITLE: &'static str = "2.5.4.12"; +pub const szOID_DESCRIPTION: &'static str = "2.5.4.13"; +pub const szOID_SEARCH_GUIDE: &'static str = "2.5.4.14"; +pub const szOID_BUSINESS_CATEGORY: &'static str = "2.5.4.15"; +pub const szOID_POSTAL_ADDRESS: &'static str = "2.5.4.16"; +pub const szOID_POSTAL_CODE: &'static str = "2.5.4.17"; +pub const szOID_POST_OFFICE_BOX: &'static str = "2.5.4.18"; +pub const szOID_PHYSICAL_DELIVERY_OFFICE_NAME: &'static str = "2.5.4.19"; +pub const szOID_TELEPHONE_NUMBER: &'static str = "2.5.4.20"; +pub const szOID_TELEX_NUMBER: &'static str = "2.5.4.21"; +pub const szOID_TELETEXT_TERMINAL_IDENTIFIER: &'static str = "2.5.4.22"; +pub const szOID_FACSIMILE_TELEPHONE_NUMBER: &'static str = "2.5.4.23"; +pub const szOID_X21_ADDRESS: &'static str = "2.5.4.24"; +pub const szOID_INTERNATIONAL_ISDN_NUMBER: &'static str = "2.5.4.25"; +pub const szOID_REGISTERED_ADDRESS: &'static str = "2.5.4.26"; +pub const szOID_DESTINATION_INDICATOR: &'static str = "2.5.4.27"; +pub const szOID_PREFERRED_DELIVERY_METHOD: &'static str = "2.5.4.28"; +pub const szOID_PRESENTATION_ADDRESS: &'static str = "2.5.4.29"; +pub const szOID_SUPPORTED_APPLICATION_CONTEXT: &'static str = "2.5.4.30"; +pub const szOID_MEMBER: &'static str = "2.5.4.31"; +pub const szOID_OWNER: &'static str = "2.5.4.32"; +pub const szOID_ROLE_OCCUPANT: &'static str = "2.5.4.33"; +pub const szOID_SEE_ALSO: &'static str = "2.5.4.34"; +pub const szOID_USER_PASSWORD: &'static str = "2.5.4.35"; +pub const szOID_USER_CERTIFICATE: &'static str = "2.5.4.36"; +pub const szOID_CA_CERTIFICATE: &'static str = "2.5.4.37"; +pub const szOID_AUTHORITY_REVOCATION_LIST: &'static str = "2.5.4.38"; +pub const szOID_CERTIFICATE_REVOCATION_LIST: &'static str = "2.5.4.39"; +pub const szOID_CROSS_CERTIFICATE_PAIR: &'static str = "2.5.4.40"; +pub const szOID_GIVEN_NAME: &'static str = "2.5.4.42"; +pub const szOID_INITIALS: &'static str = "2.5.4.43"; +pub const szOID_DN_QUALIFIER: &'static str = "2.5.4.46"; +pub const szOID_DOMAIN_COMPONENT: &'static str = "0.9.2342.19200300.100.1.25"; +pub const szOID_PKCS_12_FRIENDLY_NAME_ATTR: &'static str = "1.2.840.113549.1.9.20"; +pub const szOID_PKCS_12_LOCAL_KEY_ID: &'static str = "1.2.840.113549.1.9.21"; +pub const szOID_PKCS_12_KEY_PROVIDER_NAME_ATTR: &'static str = "1.3.6.1.4.1.311.17.1"; +pub const szOID_LOCAL_MACHINE_KEYSET: &'static str = "1.3.6.1.4.1.311.17.2"; +pub const szOID_PKCS_12_EXTENDED_ATTRIBUTES: &'static str = "1.3.6.1.4.1.311.17.3"; +pub const szOID_PKCS_12_PROTECTED_PASSWORD_SECRET_BAG_TYPE_ID: &'static str = + "1.3.6.1.4.1.311.17.4"; +pub const szOID_KEYID_RDN: &'static str = "1.3.6.1.4.1.311.10.7.1"; +pub const szOID_EV_RDN_LOCALE: &'static str = "1.3.6.1.4.1.311.60.2.1.1"; +pub const szOID_EV_RDN_STATE_OR_PROVINCE: &'static str = "1.3.6.1.4.1.311.60.2.1.2"; +pub const szOID_EV_RDN_COUNTRY: &'static str = "1.3.6.1.4.1.311.60.2.1.3"; +pub const CERT_RDN_ANY_TYPE: ::DWORD = 0; +pub const CERT_RDN_ENCODED_BLOB: ::DWORD = 1; +pub const CERT_RDN_OCTET_STRING: ::DWORD = 2; +pub const CERT_RDN_NUMERIC_STRING: ::DWORD = 3; +pub const CERT_RDN_PRINTABLE_STRING: ::DWORD = 4; +pub const CERT_RDN_TELETEX_STRING: ::DWORD = 5; +pub const CERT_RDN_T61_STRING: ::DWORD = 5; +pub const CERT_RDN_VIDEOTEX_STRING: ::DWORD = 6; +pub const CERT_RDN_IA5_STRING: ::DWORD = 7; +pub const CERT_RDN_GRAPHIC_STRING: ::DWORD = 8; +pub const CERT_RDN_VISIBLE_STRING: ::DWORD = 9; +pub const CERT_RDN_ISO646_STRING: ::DWORD = 9; +pub const CERT_RDN_GENERAL_STRING: ::DWORD = 10; +pub const CERT_RDN_UNIVERSAL_STRING: ::DWORD = 11; +pub const CERT_RDN_INT4_STRING: ::DWORD = 11; +pub const CERT_RDN_BMP_STRING: ::DWORD = 12; +pub const CERT_RDN_UNICODE_STRING: ::DWORD = 12; +pub const CERT_RDN_UTF8_STRING: ::DWORD = 13; +pub const CERT_RDN_TYPE_MASK: ::DWORD = 0x000000FF; +pub const CERT_RDN_FLAGS_MASK: ::DWORD = 0xFF000000; +pub const CERT_RDN_ENABLE_T61_UNICODE_FLAG: ::DWORD = 0x80000000; +pub const CERT_RDN_ENABLE_UTF8_UNICODE_FLAG: ::DWORD = 0x20000000; +pub const CERT_RDN_FORCE_UTF8_UNICODE_FLAG: ::DWORD = 0x10000000; +pub const CERT_RDN_DISABLE_CHECK_TYPE_FLAG: ::DWORD = 0x40000000; +pub const CERT_RDN_DISABLE_IE4_UTF8_FLAG: ::DWORD = 0x01000000; +pub const CERT_RDN_ENABLE_PUNYCODE_FLAG: ::DWORD = 0x02000000; +STRUCT!{struct CERT_RDN { + cRDNAttr: ::DWORD, + rgRDNAttr: PCERT_RDN_ATTR, +}} +pub type PCERT_RDN = *mut CERT_RDN; +STRUCT!{struct CERT_NAME_INFO { + cRDN: ::DWORD, + rgRDN: PCERT_RDN, +}} +pub type PCERT_NAME_INFO = *mut CERT_NAME_INFO; +STRUCT!{struct CERT_NAME_VALUE { + dwValueType: ::DWORD, + Value: CERT_RDN_VALUE_BLOB, +}} +pub type PCERT_NAME_VALUE = *mut CERT_NAME_VALUE; +STRUCT!{struct CERT_PUBLIC_KEY_INFO { + Algorithm: CRYPT_ALGORITHM_IDENTIFIER, + PublicKey: CRYPT_BIT_BLOB, +}} +pub type PCERT_PUBLIC_KEY_INFO = *mut CERT_PUBLIC_KEY_INFO; +pub const CERT_RSA_PUBLIC_KEY_OBJID: &'static str = szOID_RSA_RSA; +pub const CERT_DEFAULT_OID_PUBLIC_KEY_SIGN: &'static str = szOID_RSA_RSA; +pub const CERT_DEFAULT_OID_PUBLIC_KEY_XCHG: &'static str = szOID_RSA_RSA; +STRUCT!{struct CRYPT_ECC_PRIVATE_KEY_INFO { + dwVersion: ::DWORD, + PrivateKey: CRYPT_DER_BLOB, + szCurveOid: ::LPSTR, + PublicKey: CRYPT_BIT_BLOB, +}} +pub type PCRYPT_ECC_PRIVATE_KEY_INFO = *mut CRYPT_ECC_PRIVATE_KEY_INFO; +pub const CRYPT_ECC_PRIVATE_KEY_INFO_v1: ::DWORD = 1; +STRUCT!{struct CRYPT_PRIVATE_KEY_INFO { + Version: ::DWORD, + Algorithm: CRYPT_ALGORITHM_IDENTIFIER, + PrivateKey: CRYPT_DER_BLOB, + pAttributes: PCRYPT_ATTRIBUTES, +}} +pub type PCRYPT_PRIVATE_KEY_INFO = *mut CRYPT_PRIVATE_KEY_INFO; +STRUCT!{struct CRYPT_ENCRYPTED_PRIVATE_KEY_INFO { + EncryptionAlgorithm: ::CRYPT_ALGORITHM_IDENTIFIER, + EncryptedPrivateKey: ::CRYPT_DATA_BLOB, +}} +pub type PCRYPT_ENCRYPTED_PRIVATE_KEY_INFO = *mut CRYPT_ENCRYPTED_PRIVATE_KEY_INFO; +pub type PCRYPT_DECRYPT_PRIVATE_KEY_FUNC = Option<unsafe extern "system" fn( + Algorithm: CRYPT_ALGORITHM_IDENTIFIER, EncryptedPrivateKey: CRYPT_DATA_BLOB, + pbClearTextKey: *mut ::BYTE, pcbClearTextKey: *mut ::DWORD, pVoidDecryptFunc: ::LPVOID, +) -> ::BOOL>; +pub type PCRYPT_ENCRYPT_PRIVATE_KEY_FUNC = Option<unsafe extern "system" fn( + Algorithm: *mut CRYPT_ALGORITHM_IDENTIFIER, pClearTextPrivateKey: *mut CRYPT_DATA_BLOB, + pbEncryptedKey: *mut ::BYTE, pcbEncryptedKey: *mut ::DWORD, pVoidEncryptFunc: ::LPVOID, +) -> ::BOOL>; +pub type PCRYPT_RESOLVE_HCRYPTPROV_FUNC = Option<unsafe extern "system" fn( + pPrivateKeyInfo: *mut CRYPT_PRIVATE_KEY_INFO, phCryptProv: *mut HCRYPTPROV, + pVoidResolveFunc: ::LPVOID, +) -> ::BOOL>; +STRUCT!{nodebug struct CRYPT_PKCS8_IMPORT_PARAMS { + PrivateKey: CRYPT_DIGEST_BLOB, + pResolvehCryptProvFunc: PCRYPT_RESOLVE_HCRYPTPROV_FUNC, + pVoidResolveFunc: ::LPVOID, + pDecryptPrivateKeyFunc: PCRYPT_DECRYPT_PRIVATE_KEY_FUNC, + pVoidDecryptFunc: ::LPVOID, +}} +pub type PCRYPT_PKCS8_IMPORT_PARAMS = *mut CRYPT_PKCS8_IMPORT_PARAMS; +pub type CRYPT_PRIVATE_KEY_BLOB_AND_PARAMS = CRYPT_PKCS8_IMPORT_PARAMS; +pub type PPCRYPT_PRIVATE_KEY_BLOB_AND_PARAMS = *mut CRYPT_PKCS8_IMPORT_PARAMS; +STRUCT!{nodebug struct CRYPT_PKCS8_EXPORT_PARAMS { + hCryptProv: HCRYPTPROV, + dwKeySpec: ::DWORD, + pszPrivateKeyObjId: ::LPSTR, + pEncryptPrivateKeyFunc: PCRYPT_ENCRYPT_PRIVATE_KEY_FUNC, + pVoidEncryptFunc: ::LPVOID, +}} +pub type PCRYPT_PKCS8_EXPORT_PARAMS = *mut CRYPT_PKCS8_EXPORT_PARAMS; +STRUCT!{struct CERT_INFO { + dwVersion: ::DWORD, + SerialNumber: CRYPT_INTEGER_BLOB, + SignatureAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, + Issuer: CERT_NAME_BLOB, + NotBefore: ::FILETIME, + NotAfter: ::FILETIME, + Subject: CERT_NAME_BLOB, + SubjectPublicKeyInfo: CERT_PUBLIC_KEY_INFO, + IssuerUniqueId: CRYPT_BIT_BLOB, + SubjectUniqueId: CRYPT_BIT_BLOB, + cExtension: ::DWORD, + rgExtension: PCERT_EXTENSION, +}} +pub type PCERT_INFO = *mut CERT_INFO; +pub const CERT_V1: ::DWORD = 0; +pub const CERT_V2: ::DWORD = 1; +pub const CERT_V3: ::DWORD = 2; +pub const CERT_INFO_VERSION_FLAG: ::DWORD = 1; +pub const CERT_INFO_SERIAL_NUMBER_FLAG: ::DWORD = 2; +pub const CERT_INFO_SIGNATURE_ALGORITHM_FLAG: ::DWORD = 3; +pub const CERT_INFO_ISSUER_FLAG: ::DWORD = 4; +pub const CERT_INFO_NOT_BEFORE_FLAG: ::DWORD = 5; +pub const CERT_INFO_NOT_AFTER_FLAG: ::DWORD = 6; +pub const CERT_INFO_SUBJECT_FLAG: ::DWORD = 7; +pub const CERT_INFO_SUBJECT_PUBLIC_KEY_INFO_FLAG: ::DWORD = 8; +pub const CERT_INFO_ISSUER_UNIQUE_ID_FLAG: ::DWORD = 9; +pub const CERT_INFO_SUBJECT_UNIQUE_ID_FLAG: ::DWORD = 10; +pub const CERT_INFO_EXTENSION_FLAG: ::DWORD = 11; +STRUCT!{struct CRL_ENTRY { + SerialNumber: CRYPT_INTEGER_BLOB, + RevocationDate: ::FILETIME, + cExtension: ::DWORD, + rgExtension: PCERT_EXTENSION, +}} +pub type PCRL_ENTRY = *mut CRL_ENTRY; +STRUCT!{struct CRL_INFO { + dwVersion: ::DWORD, + SignatureAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, + Issuer: CERT_NAME_BLOB, + ThisUpdate: ::FILETIME, + NextUpdate: ::FILETIME, + cCRLEntry: ::DWORD, + rgCRLEntry: PCRL_ENTRY, + cExtension: ::DWORD, + rgExtension: PCERT_EXTENSION, +}} +pub type PCRL_INFO = *mut CRL_INFO; +pub const CRL_V1: ::DWORD = 0; +pub const CRL_V2: ::DWORD = 1; +pub const CERT_BUNDLE_CERTIFICATE: ::DWORD = 0; +pub const CERT_BUNDLE_CRL: ::DWORD = 1; +STRUCT!{struct CERT_OR_CRL_BLOB { + dwChoice: ::DWORD, + cbEncoded: ::DWORD, + pbEncoded: *mut ::BYTE, +}} +pub type PCERT_OR_CRL_BLOB = *mut CERT_OR_CRL_BLOB; +STRUCT!{struct CERT_OR_CRL_BUNDLE { + cItem: ::DWORD, + rgItem: PCERT_OR_CRL_BLOB, +}} +pub type PCERT_OR_CRL_BUNDLE = *mut CERT_OR_CRL_BUNDLE; +STRUCT!{struct CERT_REQUEST_INFO { + dwVersion: ::DWORD, + Subject: CERT_NAME_BLOB, + SubjectPublicKeyInfo: CERT_PUBLIC_KEY_INFO, + cAttribute: ::DWORD, + rgAttribute: PCRYPT_ATTRIBUTE, +}} +pub type PCERT_REQUEST_INFO = *mut CERT_REQUEST_INFO; +pub const CERT_REQUEST_V1: ::DWORD = 0; +STRUCT!{struct CERT_KEYGEN_REQUEST_INFO { + dwVersion: ::DWORD, + SubjectPublicKeyInfo: CERT_PUBLIC_KEY_INFO, + pwszChallengeString: ::LPWSTR, +}} +pub type PCERT_KEYGEN_REQUEST_INFO = *mut CERT_KEYGEN_REQUEST_INFO; +pub const CERT_KEYGEN_REQUEST_V1: ::DWORD = 0; +STRUCT!{struct CERT_SIGNED_CONTENT_INFO { + ToBeSigned: CRYPT_DER_BLOB, + SignatureAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, + Signature: CRYPT_BIT_BLOB, +}} +pub type PCERT_SIGNED_CONTENT_INFO = *mut CERT_SIGNED_CONTENT_INFO; +STRUCT!{struct CTL_USAGE { + cUsageIdentifier: ::DWORD, + rgpszUsageIdentifier: *mut ::LPSTR, +}} +pub type PCTL_USAGE = *mut CTL_USAGE; +pub type CERT_ENHKEY_USAGE = CTL_USAGE; +pub type PCERT_ENHKEY_USAGE = *mut CERT_ENHKEY_USAGE; +pub type PCCTL_USAGE = *const CTL_USAGE; +pub type PCCERT_ENHKEY_USAGE = *const CERT_ENHKEY_USAGE; +STRUCT!{struct CTL_ENTRY { + SubjectIdentifier: CRYPT_DATA_BLOB, + cAttribute: ::DWORD, + rgAttribute: PCRYPT_ATTRIBUTE, +}} +pub type PCTL_ENTRY = *mut CTL_ENTRY; +STRUCT!{struct CTL_INFO { + dwVersion: ::DWORD, + SubjectUsage: CTL_USAGE, + ListIdentifier: CRYPT_DATA_BLOB, + SequenceNumber: CRYPT_INTEGER_BLOB, + ThisUpdate: ::FILETIME, + NextUpdate: ::FILETIME, + SubjectAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, + cCTLEntry: ::DWORD, + rgCTLEntry: PCTL_ENTRY, + cExtension: ::DWORD, + rgExtension: PCERT_EXTENSION, +}} +pub type PCTL_INFO = *mut CTL_INFO; +pub const CTL_V1: ::DWORD = 0; +STRUCT!{struct CRYPT_TIME_STAMP_REQUEST_INFO { + pszTimeStampAlgorithm: ::LPSTR, + pszContentType: ::LPSTR, + Content: CRYPT_OBJID_BLOB, + cAttribute: ::DWORD, + rgAttribute: PCRYPT_ATTRIBUTE, +}} +pub type PCRYPT_TIME_STAMP_REQUEST_INFO = *mut CRYPT_TIME_STAMP_REQUEST_INFO; +STRUCT!{struct CRYPT_ENROLLMENT_NAME_VALUE_PAIR { + pwszName: ::LPWSTR, + pwszValue: ::LPWSTR, +}} +pub type PCRYPT_ENROLLMENT_NAME_VALUE_PAIR = *mut CRYPT_ENROLLMENT_NAME_VALUE_PAIR; +STRUCT!{struct CRYPT_CSP_PROVIDER { + dwKeySpec: ::DWORD, + pwszProviderName: ::LPWSTR, + Signature: CRYPT_BIT_BLOB, +}} +pub type PCRYPT_CSP_PROVIDER = *mut CRYPT_CSP_PROVIDER; +pub const CERT_ENCODING_TYPE_MASK: ::DWORD = 0x0000FFFF; +pub const CMSG_ENCODING_TYPE_MASK: ::DWORD = 0xFFFF0000; +pub const CRYPT_ASN_ENCODING: ::DWORD = 0x00000001; +pub const CRYPT_NDR_ENCODING: ::DWORD = 0x00000002; +pub const X509_ASN_ENCODING: ::DWORD = 0x00000001; +pub const X509_NDR_ENCODING: ::DWORD = 0x00000002; +pub const PKCS_7_ASN_ENCODING: ::DWORD = 0x00010000; +pub const PKCS_7_NDR_ENCODING: ::DWORD = 0x00020000; +pub const CRYPT_FORMAT_STR_MULTI_LINE: ::DWORD = 0x0001; +pub const CRYPT_FORMAT_STR_NO_HEX: ::DWORD = 0x0010; +pub const CRYPT_FORMAT_SIMPLE: ::DWORD = 0x0001; +pub const CRYPT_FORMAT_X509: ::DWORD = 0x0002; +pub const CRYPT_FORMAT_OID: ::DWORD = 0x0004; +pub const CRYPT_FORMAT_RDN_SEMICOLON: ::DWORD = 0x0100; +pub const CRYPT_FORMAT_RDN_CRLF: ::DWORD = 0x0200; +pub const CRYPT_FORMAT_RDN_UNQUOTE: ::DWORD = 0x0400; +pub const CRYPT_FORMAT_RDN_REVERSE: ::DWORD = 0x0800; +pub const CRYPT_FORMAT_COMMA: ::DWORD = 0x1000; +pub const CRYPT_FORMAT_SEMICOLON: ::DWORD = CRYPT_FORMAT_RDN_SEMICOLON; +pub const CRYPT_FORMAT_CRLF: ::DWORD = CRYPT_FORMAT_RDN_CRLF; +pub type PFN_CRYPT_ALLOC = Option<unsafe extern "system" fn(cbSize: ::size_t)>; +pub type PFN_CRYPT_FREE = Option<unsafe extern "system" fn(pv: ::LPVOID)>; +STRUCT!{nodebug struct CRYPT_ENCODE_PARA { + cbSize: ::DWORD, + pfnAlloc: PFN_CRYPT_ALLOC, + pfnFree: PFN_CRYPT_FREE, +}} +pub type PCRYPT_ENCODE_PARA = *mut CRYPT_ENCODE_PARA; +pub const CRYPT_ENCODE_NO_SIGNATURE_BYTE_REVERSAL_FLAG: ::DWORD = 0x8; +pub const CRYPT_ENCODE_ALLOC_FLAG: ::DWORD = 0x8000; +pub const CRYPT_UNICODE_NAME_ENCODE_ENABLE_T61_UNICODE_FLAG: ::DWORD = + CERT_RDN_ENABLE_T61_UNICODE_FLAG; +pub const CRYPT_UNICODE_NAME_ENCODE_ENABLE_UTF8_UNICODE_FLAG: ::DWORD = + CERT_RDN_ENABLE_UTF8_UNICODE_FLAG; +pub const CRYPT_UNICODE_NAME_ENCODE_FORCE_UTF8_UNICODE_FLAG: ::DWORD = + CERT_RDN_FORCE_UTF8_UNICODE_FLAG; +pub const CRYPT_UNICODE_NAME_ENCODE_DISABLE_CHECK_TYPE_FLAG: ::DWORD = + CERT_RDN_DISABLE_CHECK_TYPE_FLAG; +pub const CRYPT_SORTED_CTL_ENCODE_HASHED_SUBJECT_IDENTIFIER_FLAG: ::DWORD = 0x10000; +pub const CRYPT_ENCODE_ENABLE_PUNYCODE_FLAG: ::DWORD = 0x20000; +pub const CRYPT_ENCODE_ENABLE_UTF8PERCENT_FLAG: ::DWORD = 0x40000; +pub const CRYPT_ENCODE_ENABLE_IA5CONVERSION_FLAG: ::DWORD = CRYPT_ENCODE_ENABLE_PUNYCODE_FLAG + | CRYPT_ENCODE_ENABLE_UTF8PERCENT_FLAG; +STRUCT!{nodebug struct CRYPT_DECODE_PARA { + cbSize: ::DWORD, + pfnAlloc: PFN_CRYPT_ALLOC, + pfnFree: PFN_CRYPT_FREE, +}} +pub type PCRYPT_DECODE_PARA = *mut CRYPT_DECODE_PARA; +pub const CRYPT_DECODE_NOCOPY_FLAG: ::DWORD = 0x1; +pub const CRYPT_DECODE_TO_BE_SIGNED_FLAG: ::DWORD = 0x2; +pub const CRYPT_DECODE_SHARE_OID_STRING_FLAG: ::DWORD = 0x4; +pub const CRYPT_DECODE_NO_SIGNATURE_BYTE_REVERSAL_FLAG: ::DWORD = 0x8; +pub const CRYPT_DECODE_ALLOC_FLAG: ::DWORD = 0x8000; +pub const CRYPT_UNICODE_NAME_DECODE_DISABLE_IE4_UTF8_FLAG: ::DWORD = + CERT_RDN_DISABLE_IE4_UTF8_FLAG; +pub const CRYPT_DECODE_ENABLE_PUNYCODE_FLAG: ::DWORD = 0x02000000; +pub const CRYPT_DECODE_ENABLE_UTF8PERCENT_FLAG: ::DWORD = 0x04000000; +pub const CRYPT_DECODE_ENABLE_IA5CONVERSION_FLAG: ::DWORD = CRYPT_DECODE_ENABLE_PUNYCODE_FLAG + | CRYPT_DECODE_ENABLE_UTF8PERCENT_FLAG; +pub const CRYPT_ENCODE_DECODE_NONE: ::LPCSTR = 0 as ::LPCSTR; +pub const X509_CERT: ::LPCSTR = 1 as ::LPCSTR; +pub const X509_CERT_TO_BE_SIGNED: ::LPCSTR = 2 as ::LPCSTR; +pub const X509_CERT_CRL_TO_BE_SIGNED: ::LPCSTR = 3 as ::LPCSTR; +pub const X509_CERT_REQUEST_TO_BE_SIGNED: ::LPCSTR = 4 as ::LPCSTR; +pub const X509_EXTENSIONS: ::LPCSTR = 5 as ::LPCSTR; +pub const X509_NAME_VALUE: ::LPCSTR = 6 as ::LPCSTR; +pub const X509_NAME: ::LPCSTR = 7 as ::LPCSTR; +pub const X509_PUBLIC_KEY_INFO: ::LPCSTR = 8 as ::LPCSTR; +pub const X509_AUTHORITY_KEY_ID: ::LPCSTR = 9 as ::LPCSTR; +pub const X509_KEY_ATTRIBUTES: ::LPCSTR = 10 as ::LPCSTR; +pub const X509_KEY_USAGE_RESTRICTION: ::LPCSTR = 11 as ::LPCSTR; +pub const X509_ALTERNATE_NAME: ::LPCSTR = 12 as ::LPCSTR; +pub const X509_BASIC_CONSTRAINTS: ::LPCSTR = 13 as ::LPCSTR; +pub const X509_KEY_USAGE: ::LPCSTR = 14 as ::LPCSTR; +pub const X509_BASIC_CONSTRAINTS2: ::LPCSTR = 15 as ::LPCSTR; +pub const X509_CERT_POLICIES: ::LPCSTR = 16 as ::LPCSTR; +pub const PKCS_UTC_TIME: ::LPCSTR = 17 as ::LPCSTR; +pub const PKCS_TIME_REQUEST: ::LPCSTR = 18 as ::LPCSTR; +pub const RSA_CSP_PUBLICKEYBLOB: ::LPCSTR = 19 as ::LPCSTR; +pub const X509_UNICODE_NAME: ::LPCSTR = 20 as ::LPCSTR; +pub const X509_KEYGEN_REQUEST_TO_BE_SIGNED: ::LPCSTR = 21 as ::LPCSTR; +pub const PKCS_ATTRIBUTE: ::LPCSTR = 22 as ::LPCSTR; +pub const PKCS_CONTENT_INFO_SEQUENCE_OF_ANY: ::LPCSTR = 23 as ::LPCSTR; +pub const X509_UNICODE_NAME_VALUE: ::LPCSTR = 24 as ::LPCSTR; +pub const X509_ANY_STRING: ::LPCSTR = X509_NAME_VALUE; +pub const X509_UNICODE_ANY_STRING: ::LPCSTR = X509_UNICODE_NAME_VALUE; +pub const X509_OCTET_STRING: ::LPCSTR = 25 as ::LPCSTR; +pub const X509_BITS: ::LPCSTR = 26 as ::LPCSTR; +pub const X509_INTEGER: ::LPCSTR = 27 as ::LPCSTR; +pub const X509_MULTI_BYTE_INTEGER: ::LPCSTR = 28 as ::LPCSTR; +pub const X509_ENUMERATED: ::LPCSTR = 29 as ::LPCSTR; +pub const X509_CHOICE_OF_TIME: ::LPCSTR = 30 as ::LPCSTR; +pub const X509_AUTHORITY_KEY_ID2: ::LPCSTR = 31 as ::LPCSTR; +pub const X509_AUTHORITY_INFO_ACCESS: ::LPCSTR = 32 as ::LPCSTR; +pub const X509_SUBJECT_INFO_ACCESS: ::LPCSTR = X509_AUTHORITY_INFO_ACCESS; +pub const X509_CRL_REASON_CODE: ::LPCSTR = X509_ENUMERATED; +pub const PKCS_CONTENT_INFO: ::LPCSTR = 33 as ::LPCSTR; +pub const X509_SEQUENCE_OF_ANY: ::LPCSTR = 34 as ::LPCSTR; +pub const X509_CRL_DIST_POINTS: ::LPCSTR = 35 as ::LPCSTR; +pub const X509_ENHANCED_KEY_USAGE: ::LPCSTR = 36 as ::LPCSTR; +pub const PKCS_CTL: ::LPCSTR = 37 as ::LPCSTR; +pub const X509_MULTI_BYTE_UINT: ::LPCSTR = 38 as ::LPCSTR; +pub const X509_DSS_PUBLICKEY: ::LPCSTR = X509_MULTI_BYTE_UINT; +pub const X509_DSS_PARAMETERS: ::LPCSTR = 39 as ::LPCSTR; +pub const X509_DSS_SIGNATURE: ::LPCSTR = 40 as ::LPCSTR; +pub const PKCS_RC2_CBC_PARAMETERS: ::LPCSTR = 41 as ::LPCSTR; +pub const PKCS_SMIME_CAPABILITIES: ::LPCSTR = 42 as ::LPCSTR; +pub const X509_QC_STATEMENTS_EXT: ::LPCSTR = 42 as ::LPCSTR; +pub const PKCS_RSA_PRIVATE_KEY: ::LPCSTR = 43 as ::LPCSTR; +pub const PKCS_PRIVATE_KEY_INFO: ::LPCSTR = 44 as ::LPCSTR; +pub const PKCS_ENCRYPTED_PRIVATE_KEY_INFO: ::LPCSTR = 45 as ::LPCSTR; +pub const X509_PKIX_POLICY_QUALIFIER_USERNOTICE: ::LPCSTR = 46 as ::LPCSTR; +pub const X509_DH_PUBLICKEY: ::LPCSTR = X509_MULTI_BYTE_UINT; +pub const X509_DH_PARAMETERS: ::LPCSTR = 47 as ::LPCSTR; +pub const PKCS_ATTRIBUTES: ::LPCSTR = 48 as ::LPCSTR; +pub const PKCS_SORTED_CTL: ::LPCSTR = 49 as ::LPCSTR; +pub const X509_ECC_SIGNATURE: ::LPCSTR = 47 as ::LPCSTR; +pub const X942_DH_PARAMETERS: ::LPCSTR = 50 as ::LPCSTR; +pub const X509_BITS_WITHOUT_TRAILING_ZEROES: ::LPCSTR = 51 as ::LPCSTR; +pub const X942_OTHER_INFO: ::LPCSTR = 52 as ::LPCSTR; +pub const X509_CERT_PAIR: ::LPCSTR = 53 as ::LPCSTR; +pub const X509_ISSUING_DIST_POINT: ::LPCSTR = 54 as ::LPCSTR; +pub const X509_NAME_CONSTRAINTS: ::LPCSTR = 55 as ::LPCSTR; +pub const X509_POLICY_MAPPINGS: ::LPCSTR = 56 as ::LPCSTR; +pub const X509_POLICY_CONSTRAINTS: ::LPCSTR = 57 as ::LPCSTR; +pub const X509_CROSS_CERT_DIST_POINTS: ::LPCSTR = 58 as ::LPCSTR; +pub const CMC_DATA: ::LPCSTR = 59 as ::LPCSTR; +pub const CMC_RESPONSE: ::LPCSTR = 60 as ::LPCSTR; +pub const CMC_STATUS: ::LPCSTR = 61 as ::LPCSTR; +pub const CMC_ADD_EXTENSIONS: ::LPCSTR = 62 as ::LPCSTR; +pub const CMC_ADD_ATTRIBUTES: ::LPCSTR = 63 as ::LPCSTR; +pub const X509_CERTIFICATE_TEMPLATE: ::LPCSTR = 64 as ::LPCSTR; +pub const OCSP_SIGNED_REQUEST: ::LPCSTR = 65 as ::LPCSTR; +pub const OCSP_REQUEST: ::LPCSTR = 66 as ::LPCSTR; +pub const OCSP_RESPONSE: ::LPCSTR = 67 as ::LPCSTR; +pub const OCSP_BASIC_SIGNED_RESPONSE: ::LPCSTR = 68 as ::LPCSTR; +pub const OCSP_BASIC_RESPONSE: ::LPCSTR = 69 as ::LPCSTR; +pub const X509_LOGOTYPE_EXT: ::LPCSTR = 70 as ::LPCSTR; +pub const X509_BIOMETRIC_EXT: ::LPCSTR = 71 as ::LPCSTR; +pub const CNG_RSA_PUBLIC_KEY_BLOB: ::LPCSTR = 72 as ::LPCSTR; +pub const X509_OBJECT_IDENTIFIER: ::LPCSTR = 73 as ::LPCSTR; +pub const X509_ALGORITHM_IDENTIFIER: ::LPCSTR = 74 as ::LPCSTR; +pub const PKCS_RSA_SSA_PSS_PARAMETERS: ::LPCSTR = 75 as ::LPCSTR; +pub const PKCS_RSAES_OAEP_PARAMETERS: ::LPCSTR = 76 as ::LPCSTR; +pub const ECC_CMS_SHARED_INFO: ::LPCSTR = 77 as ::LPCSTR; +pub const TIMESTAMP_REQUEST: ::LPCSTR = 78 as ::LPCSTR; +pub const TIMESTAMP_RESPONSE: ::LPCSTR = 79 as ::LPCSTR; +pub const TIMESTAMP_INFO: ::LPCSTR = 80 as ::LPCSTR; +pub const X509_CERT_BUNDLE: ::LPCSTR = 81 as ::LPCSTR; +pub const X509_ECC_PRIVATE_KEY: ::LPCSTR = 82 as ::LPCSTR; +pub const CNG_RSA_PRIVATE_KEY_BLOB: ::LPCSTR = 83 as ::LPCSTR; +pub const X509_SUBJECT_DIR_ATTRS: ::LPCSTR = 84 as ::LPCSTR; +pub const PKCS7_SIGNER_INFO: ::LPCSTR = 500 as ::LPCSTR; +pub const CMS_SIGNER_INFO: ::LPCSTR = 501 as ::LPCSTR; +pub const szOID_AUTHORITY_KEY_IDENTIFIER: &'static str = "2.5.29.1"; +pub const szOID_KEY_ATTRIBUTES: &'static str = "2.5.29.2"; +pub const szOID_CERT_POLICIES_95: &'static str = "2.5.29.3"; +pub const szOID_KEY_USAGE_RESTRICTION: &'static str = "2.5.29.4"; +pub const szOID_SUBJECT_ALT_NAME: &'static str = "2.5.29.7"; +pub const szOID_ISSUER_ALT_NAME: &'static str = "2.5.29.8"; +pub const szOID_BASIC_CONSTRAINTS: &'static str = "2.5.29.10"; +pub const szOID_KEY_USAGE: &'static str = "2.5.29.15"; +pub const szOID_PRIVATEKEY_USAGE_PERIOD: &'static str = "2.5.29.16"; +pub const szOID_BASIC_CONSTRAINTS2: &'static str = "2.5.29.19"; +pub const szOID_CERT_POLICIES: &'static str = "2.5.29.32"; +pub const szOID_ANY_CERT_POLICY: &'static str = "2.5.29.32.0"; +pub const szOID_INHIBIT_ANY_POLICY: &'static str = "2.5.29.54"; +pub const szOID_AUTHORITY_KEY_IDENTIFIER2: &'static str = "2.5.29.35"; +pub const szOID_SUBJECT_KEY_IDENTIFIER: &'static str = "2.5.29.14"; +pub const szOID_SUBJECT_ALT_NAME2: &'static str = "2.5.29.17"; +pub const szOID_ISSUER_ALT_NAME2: &'static str = "2.5.29.18"; +pub const szOID_CRL_REASON_CODE: &'static str = "2.5.29.21"; +pub const szOID_REASON_CODE_HOLD: &'static str = "2.5.29.23"; +pub const szOID_CRL_DIST_POINTS: &'static str = "2.5.29.31"; +pub const szOID_ENHANCED_KEY_USAGE: &'static str = "2.5.29.37"; +pub const szOID_ANY_ENHANCED_KEY_USAGE: &'static str = "2.5.29.37.0"; +pub const szOID_CRL_NUMBER: &'static str = "2.5.29.20"; +pub const szOID_DELTA_CRL_INDICATOR: &'static str = "2.5.29.27"; +pub const szOID_ISSUING_DIST_POINT: &'static str = "2.5.29.28"; +pub const szOID_FRESHEST_CRL: &'static str = "2.5.29.46"; +pub const szOID_NAME_CONSTRAINTS: &'static str = "2.5.29.30"; +pub const szOID_POLICY_MAPPINGS: &'static str = "2.5.29.33"; +pub const szOID_LEGACY_POLICY_MAPPINGS: &'static str = "2.5.29.5"; +pub const szOID_POLICY_CONSTRAINTS: &'static str = "2.5.29.36"; +pub const szOID_RENEWAL_CERTIFICATE: &'static str = "1.3.6.1.4.1.311.13.1"; +pub const szOID_ENROLLMENT_NAME_VALUE_PAIR: &'static str = "1.3.6.1.4.1.311.13.2.1"; +pub const szOID_ENROLLMENT_CSP_PROVIDER: &'static str = "1.3.6.1.4.1.311.13.2.2"; +pub const szOID_OS_VERSION: &'static str = "1.3.6.1.4.1.311.13.2.3"; +pub const szOID_ENROLLMENT_AGENT: &'static str = "1.3.6.1.4.1.311.20.2.1"; +pub const szOID_PKIX: &'static str = "1.3.6.1.5.5.7"; +pub const szOID_PKIX_PE: &'static str = "1.3.6.1.5.5.7.1"; +pub const szOID_AUTHORITY_INFO_ACCESS: &'static str = "1.3.6.1.5.5.7.1.1"; +pub const szOID_SUBJECT_INFO_ACCESS: &'static str = "1.3.6.1.5.5.7.1.11"; +pub const szOID_BIOMETRIC_EXT: &'static str = "1.3.6.1.5.5.7.1.2"; +pub const szOID_QC_STATEMENTS_EXT: &'static str = "1.3.6.1.5.5.7.1.3"; +pub const szOID_LOGOTYPE_EXT: &'static str = "1.3.6.1.5.5.7.1.12"; +pub const szOID_CERT_EXTENSIONS: &'static str = "1.3.6.1.4.1.311.2.1.14"; +pub const szOID_NEXT_UPDATE_LOCATION: &'static str = "1.3.6.1.4.1.311.10.2"; +pub const szOID_REMOVE_CERTIFICATE: &'static str = "1.3.6.1.4.1.311.10.8.1"; +pub const szOID_CROSS_CERT_DIST_POINTS: &'static str = "1.3.6.1.4.1.311.10.9.1"; +pub const szOID_CTL: &'static str = "1.3.6.1.4.1.311.10.1"; +pub const szOID_SORTED_CTL: &'static str = "1.3.6.1.4.1.311.10.1.1"; +pub const szOID_SERIALIZED: &'static str = "1.3.6.1.4.1.311.10.3.3.1"; +pub const szOID_NT_PRINCIPAL_NAME: &'static str = "1.3.6.1.4.1.311.20.2.3"; +pub const szOID_INTERNATIONALIZED_EMAIL_ADDRESS: &'static str = "1.3.6.1.4.1.311.20.2.4"; +pub const szOID_PRODUCT_UPDATE: &'static str = "1.3.6.1.4.1.311.31.1"; +pub const szOID_ANY_APPLICATION_POLICY: &'static str = "1.3.6.1.4.1.311.10.12.1"; +pub const szOID_AUTO_ENROLL_CTL_USAGE: &'static str = "1.3.6.1.4.1.311.20.1"; +pub const szOID_ENROLL_CERTTYPE_EXTENSION: &'static str = "1.3.6.1.4.1.311.20.2"; +pub const szOID_CERT_MANIFOLD: &'static str = "1.3.6.1.4.1.311.20.3"; +pub const szOID_CERTSRV_CA_VERSION: &'static str = "1.3.6.1.4.1.311.21.1"; +pub const szOID_CERTSRV_PREVIOUS_CERT_HASH: &'static str = "1.3.6.1.4.1.311.21.2"; +pub const szOID_CRL_VIRTUAL_BASE: &'static str = "1.3.6.1.4.1.311.21.3"; +pub const szOID_CRL_NEXT_PUBLISH: &'static str = "1.3.6.1.4.1.311.21.4"; +pub const szOID_KP_CA_EXCHANGE: &'static str = "1.3.6.1.4.1.311.21.5"; +pub const szOID_KP_KEY_RECOVERY_AGENT: &'static str = "1.3.6.1.4.1.311.21.6"; +pub const szOID_CERTIFICATE_TEMPLATE: &'static str = "1.3.6.1.4.1.311.21.7"; +pub const szOID_ENTERPRISE_OID_ROOT: &'static str = "1.3.6.1.4.1.311.21.8"; +pub const szOID_RDN_DUMMY_SIGNER: &'static str = "1.3.6.1.4.1.311.21.9"; +pub const szOID_APPLICATION_CERT_POLICIES: &'static str = "1.3.6.1.4.1.311.21.10"; +pub const szOID_APPLICATION_POLICY_MAPPINGS: &'static str = "1.3.6.1.4.1.311.21.11"; +pub const szOID_APPLICATION_POLICY_CONSTRAINTS: &'static str = "1.3.6.1.4.1.311.21.12"; +pub const szOID_ARCHIVED_KEY_ATTR: &'static str = "1.3.6.1.4.1.311.21.13"; +pub const szOID_CRL_SELF_CDP: &'static str = "1.3.6.1.4.1.311.21.14"; +pub const szOID_REQUIRE_CERT_CHAIN_POLICY: &'static str = "1.3.6.1.4.1.311.21.15"; +pub const szOID_ARCHIVED_KEY_CERT_HASH: &'static str = "1.3.6.1.4.1.311.21.16"; +pub const szOID_ISSUED_CERT_HASH: &'static str = "1.3.6.1.4.1.311.21.17"; +pub const szOID_DS_EMAIL_REPLICATION: &'static str = "1.3.6.1.4.1.311.21.19"; +pub const szOID_REQUEST_CLIENT_INFO: &'static str = "1.3.6.1.4.1.311.21.20"; +pub const szOID_ENCRYPTED_KEY_HASH: &'static str = "1.3.6.1.4.1.311.21.21"; +pub const szOID_CERTSRV_CROSSCA_VERSION: &'static str = "1.3.6.1.4.1.311.21.22"; +pub const szOID_NTDS_REPLICATION: &'static str = "1.3.6.1.4.1.311.25.1"; +pub const szOID_SUBJECT_DIR_ATTRS: &'static str = "2.5.29.9"; +pub const szOID_PKIX_KP: &'static str = "1.3.6.1.5.5.7.3"; +pub const szOID_PKIX_KP_SERVER_AUTH: &'static str = "1.3.6.1.5.5.7.3.1"; +pub const szOID_PKIX_KP_CLIENT_AUTH: &'static str = "1.3.6.1.5.5.7.3.2"; +pub const szOID_PKIX_KP_CODE_SIGNING: &'static str = "1.3.6.1.5.5.7.3.3"; +pub const szOID_PKIX_KP_EMAIL_PROTECTION: &'static str = "1.3.6.1.5.5.7.3.4"; +pub const szOID_PKIX_KP_IPSEC_END_SYSTEM: &'static str = "1.3.6.1.5.5.7.3.5"; +pub const szOID_PKIX_KP_IPSEC_TUNNEL: &'static str = "1.3.6.1.5.5.7.3.6"; +pub const szOID_PKIX_KP_IPSEC_USER: &'static str = "1.3.6.1.5.5.7.3.7"; +pub const szOID_PKIX_KP_TIMESTAMP_SIGNING: &'static str = "1.3.6.1.5.5.7.3.8"; +pub const szOID_PKIX_KP_OCSP_SIGNING: &'static str = "1.3.6.1.5.5.7.3.9"; +pub const szOID_PKIX_OCSP_NOCHECK: &'static str = "1.3.6.1.5.5.7.48.1.5"; +pub const szOID_PKIX_OCSP_NONCE: &'static str = "1.3.6.1.5.5.7.48.1.2"; +pub const szOID_IPSEC_KP_IKE_INTERMEDIATE: &'static str = "1.3.6.1.5.5.8.2.2"; +pub const szOID_PKINIT_KP_KDC: &'static str = "1.3.6.1.5.2.3.5"; +pub const szOID_KP_CTL_USAGE_SIGNING: &'static str = "1.3.6.1.4.1.311.10.3.1"; +pub const szOID_KP_TIME_STAMP_SIGNING: &'static str = "1.3.6.1.4.1.311.10.3.2"; +pub const szOID_SERVER_GATED_CRYPTO: &'static str = "1.3.6.1.4.1.311.10.3.3"; +pub const szOID_SGC_NETSCAPE: &'static str = "2.16.840.1.113730.4.1"; +pub const szOID_KP_EFS: &'static str = "1.3.6.1.4.1.311.10.3.4"; +pub const szOID_EFS_RECOVERY: &'static str = "1.3.6.1.4.1.311.10.3.4.1"; +pub const szOID_WHQL_CRYPTO: &'static str = "1.3.6.1.4.1.311.10.3.5"; +pub const szOID_NT5_CRYPTO: &'static str = "1.3.6.1.4.1.311.10.3.6"; +pub const szOID_OEM_WHQL_CRYPTO: &'static str = "1.3.6.1.4.1.311.10.3.7"; +pub const szOID_EMBEDDED_NT_CRYPTO: &'static str = "1.3.6.1.4.1.311.10.3.8"; +pub const szOID_ROOT_LIST_SIGNER: &'static str = "1.3.6.1.4.1.311.10.3.9"; +pub const szOID_KP_QUALIFIED_SUBORDINATION: &'static str = "1.3.6.1.4.1.311.10.3.10"; +pub const szOID_KP_KEY_RECOVERY: &'static str = "1.3.6.1.4.1.311.10.3.11"; +pub const szOID_KP_DOCUMENT_SIGNING: &'static str = "1.3.6.1.4.1.311.10.3.12"; +pub const szOID_KP_LIFETIME_SIGNING: &'static str = "1.3.6.1.4.1.311.10.3.13"; +pub const szOID_KP_MOBILE_DEVICE_SOFTWARE: &'static str = "1.3.6.1.4.1.311.10.3.14"; +pub const szOID_KP_SMART_DISPLAY: &'static str = "1.3.6.1.4.1.311.10.3.15"; +pub const szOID_KP_CSP_SIGNATURE: &'static str = "1.3.6.1.4.1.311.10.3.16"; +pub const szOID_DRM: &'static str = "1.3.6.1.4.1.311.10.5.1"; +pub const szOID_DRM_INDIVIDUALIZATION: &'static str = "1.3.6.1.4.1.311.10.5.2"; +pub const szOID_LICENSES: &'static str = "1.3.6.1.4.1.311.10.6.1"; +pub const szOID_LICENSE_SERVER: &'static str = "1.3.6.1.4.1.311.10.6.2"; +pub const szOID_KP_SMARTCARD_LOGON: &'static str = "1.3.6.1.4.1.311.20.2.2"; +pub const szOID_KP_KERNEL_MODE_CODE_SIGNING: &'static str = "1.3.6.1.4.1.311.61.1.1"; +pub const szOID_KP_KERNEL_MODE_TRUSTED_BOOT_SIGNING: &'static str = "1.3.6.1.4.1.311.61.4.1"; +pub const szOID_REVOKED_LIST_SIGNER: &'static str = "1.3.6.1.4.1.311.10.3.19"; +pub const szOID_WINDOWS_KITS_SIGNER: &'static str = "1.3.6.1.4.1.311.10.3.20"; +pub const szOID_WINDOWS_RT_SIGNER: &'static str = "1.3.6.1.4.1.311.10.3.21"; +pub const szOID_PROTECTED_PROCESS_LIGHT_SIGNER: &'static str = "1.3.6.1.4.1.311.10.3.22"; +pub const szOID_WINDOWS_TCB_SIGNER: &'static str = "1.3.6.1.4.1.311.10.3.23"; +pub const szOID_PROTECTED_PROCESS_SIGNER: &'static str = "1.3.6.1.4.1.311.10.3.24"; +pub const szOID_WINDOWS_THIRD_PARTY_COMPONENT_SIGNER: &'static str = "1.3.6.1.4.1.311.10.3.25"; +pub const szOID_WINDOWS_SOFTWARE_EXTENSION_SIGNER: &'static str = "1.3.6.1.4.1.311.10.3.26"; +pub const szOID_DISALLOWED_LIST: &'static str = "1.3.6.1.4.1.311.10.3.30"; +pub const szOID_SYNC_ROOT_CTL_EXT: &'static str = "1.3.6.1.4.1.311.10.3.50"; +pub const szOID_KP_KERNEL_MODE_HAL_EXTENSION_SIGNING: &'static str = "1.3.6.1.4.1.311.61.5.1"; +pub const szOID_WINDOWS_STORE_SIGNER: &'static str = "1.3.6.1.4.1.311.76.3.1"; +pub const szOID_DYNAMIC_CODE_GEN_SIGNER: &'static str = "1.3.6.1.4.1.311.76.5.1"; +pub const szOID_MICROSOFT_PUBLISHER_SIGNER: &'static str = "1.3.6.1.4.1.311.76.8.1"; +pub const szOID_YESNO_TRUST_ATTR: &'static str = "1.3.6.1.4.1.311.10.4.1"; +pub const szOID_PKIX_POLICY_QUALIFIER_CPS: &'static str = "1.3.6.1.5.5.7.2.1"; +pub const szOID_PKIX_POLICY_QUALIFIER_USERNOTICE: &'static str = "1.3.6.1.5.5.7.2.2"; +pub const szOID_ROOT_PROGRAM_FLAGS: &'static str = "1.3.6.1.4.1.311.60.1.1"; +//6992 +pub type HCRYPTMSG = *mut ::c_void; +//9353 +pub type HCERTSTORE = *mut ::c_void; +STRUCT!{struct CERT_CONTEXT { + dwCertEncodingType: ::DWORD, + pbCertEncoded: *mut ::BYTE, + cbCertEncoded: ::DWORD, + pCertInfo: ::PCERT_INFO, + hCertStore: HCERTSTORE, +}} +pub type PCERT_CONTEXT = *mut CERT_CONTEXT; +pub type PCCERT_CONTEXT = *const CERT_CONTEXT; +STRUCT!{struct CRL_CONTEXT { + dwCertEncodingType: ::DWORD, + pbCrlEncoded: *mut ::BYTE, + cbCrlEncoded: ::DWORD, + pCrlInfo: ::PCRL_INFO, + hCertStore: HCERTSTORE, +}} +pub type PCRL_CONTEXT = *mut CRL_CONTEXT; +pub type PCCRL_CONTEXT = *const CRL_CONTEXT; +STRUCT!{struct CTL_CONTEXT { + dwMsgAndCertEncodingType: ::DWORD, + pbCtlEncoded: *mut ::BYTE, + cbCtlEncoded: ::DWORD, + pCtlInfo: ::PCTL_INFO, + hCertStore: HCERTSTORE, + hCryptMsg: HCRYPTMSG, + pbCtlContent: *mut ::BYTE, + cbCtlContent: ::DWORD, +}} +pub type PCTL_CONTEXT = *mut CTL_CONTEXT; +pub type PCCTL_CONTEXT = *const CTL_CONTEXT; +pub const CERT_STORE_PROV_MSG: ::DWORD = 1; +pub const CERT_STORE_PROV_MEMORY: ::DWORD = 2; +pub const CERT_STORE_PROV_FILE: ::DWORD = 3; +pub const CERT_STORE_PROV_REG: ::DWORD = 4; +pub const CERT_STORE_PROV_PKCS7: ::DWORD = 5; +pub const CERT_STORE_PROV_SERIALIZED: ::DWORD = 6; +pub const CERT_STORE_PROV_FILENAME_A: ::DWORD = 7; +pub const CERT_STORE_PROV_FILENAME_W: ::DWORD = 8; +pub const CERT_STORE_PROV_FILENAME: ::DWORD = CERT_STORE_PROV_FILENAME_W; +pub const CERT_STORE_PROV_SYSTEM_A: ::DWORD = 9; +pub const CERT_STORE_PROV_SYSTEM_W: ::DWORD = 10; +pub const CERT_STORE_PROV_SYSTEM: ::DWORD = CERT_STORE_PROV_SYSTEM_W; +pub const CERT_STORE_PROV_COLLECTION: ::DWORD = 11; +pub const CERT_STORE_PROV_SYSTEM_REGISTRY_A: ::DWORD = 12; +pub const CERT_STORE_PROV_SYSTEM_REGISTRY_W: ::DWORD = 13; +pub const CERT_STORE_PROV_SYSTEM_REGISTRY: ::DWORD = CERT_STORE_PROV_SYSTEM_REGISTRY_W; +pub const CERT_STORE_PROV_PHYSICAL_W: ::DWORD = 14; +pub const CERT_STORE_PROV_PHYSICAL: ::DWORD = CERT_STORE_PROV_PHYSICAL_W; +pub const CERT_STORE_PROV_SMART_CARD_W: ::DWORD = 15; +pub const CERT_STORE_PROV_SMART_CARD: ::DWORD = CERT_STORE_PROV_SMART_CARD_W; +pub const CERT_STORE_PROV_LDAP_W: ::DWORD = 16; +pub const CERT_STORE_PROV_LDAP: ::DWORD = CERT_STORE_PROV_LDAP_W; +pub const CERT_STORE_NO_CRYPT_RELEASE_FLAG: ::DWORD = 0x00000001; +pub const CERT_STORE_SET_LOCALIZED_NAME_FLAG: ::DWORD = 0x00000002; +pub const CERT_STORE_DEFER_CLOSE_UNTIL_LAST_FREE_FLAG: ::DWORD = 0x00000004; +pub const CERT_STORE_DELETE_FLAG: ::DWORD = 0x00000010; +pub const CERT_STORE_SHARE_STORE_FLAG: ::DWORD = 0x00000040; +pub const CERT_STORE_SHARE_CONTEXT_FLAG: ::DWORD = 0x00000080; +pub const CERT_STORE_MANIFOLD_FLAG: ::DWORD = 0x00000100; +pub const CERT_STORE_ENUM_ARCHIVED_FLAG: ::DWORD = 0x00000200; +pub const CERT_STORE_UPDATE_KEYID_FLAG: ::DWORD = 0x00000400; +pub const CERT_STORE_BACKUP_RESTORE_FLAG: ::DWORD = 0x00000800; +pub const CERT_STORE_READONLY_FLAG: ::DWORD = 0x00008000; +pub const CERT_STORE_OPEN_EXISTING_FLAG: ::DWORD = 0x00004000; +pub const CERT_STORE_CREATE_NEW_FLAG: ::DWORD = 0x00002000; +pub const CERT_STORE_MAXIMUM_ALLOWED_FLAG: ::DWORD = 0x00001000; +pub const CERT_SYSTEM_STORE_UNPROTECTED_FLAG: ::DWORD = 0x40000000; +pub const CERT_SYSTEM_STORE_LOCATION_MASK: ::DWORD = 0x00FF0000; +pub const CERT_SYSTEM_STORE_LOCATION_SHIFT: ::DWORD = 16; +pub const CERT_SYSTEM_STORE_CURRENT_USER_ID: ::DWORD = 1; +pub const CERT_SYSTEM_STORE_LOCAL_MACHINE_ID: ::DWORD = 2; +pub const CERT_SYSTEM_STORE_CURRENT_SERVICE_ID: ::DWORD = 4; +pub const CERT_SYSTEM_STORE_SERVICES_ID: ::DWORD = 5; +pub const CERT_SYSTEM_STORE_USERS_ID: ::DWORD = 6; +pub const CERT_SYSTEM_STORE_CURRENT_USER_GROUP_POLICY_ID: ::DWORD = 7; +pub const CERT_SYSTEM_STORE_LOCAL_MACHINE_GROUP_POLICY_ID: ::DWORD = 8; +pub const CERT_SYSTEM_STORE_LOCAL_MACHINE_ENTERPRISE_ID: ::DWORD = 9; +pub const CERT_SYSTEM_STORE_CURRENT_USER: ::DWORD = CERT_SYSTEM_STORE_CURRENT_USER_ID + << CERT_SYSTEM_STORE_LOCATION_SHIFT; +pub const CERT_SYSTEM_STORE_LOCAL_MACHINE: ::DWORD = CERT_SYSTEM_STORE_LOCAL_MACHINE_ID + << CERT_SYSTEM_STORE_LOCATION_SHIFT; +pub const CERT_SYSTEM_STORE_CURRENT_SERVICE: ::DWORD = CERT_SYSTEM_STORE_CURRENT_SERVICE_ID + << CERT_SYSTEM_STORE_LOCATION_SHIFT; +pub const CERT_SYSTEM_STORE_SERVICES: ::DWORD = CERT_SYSTEM_STORE_SERVICES_ID + << CERT_SYSTEM_STORE_LOCATION_SHIFT; +pub const CERT_SYSTEM_STORE_USERS: ::DWORD = CERT_SYSTEM_STORE_USERS_ID + << CERT_SYSTEM_STORE_LOCATION_SHIFT; +pub const CERT_SYSTEM_STORE_CURRENT_USER_GROUP_POLICY: ::DWORD = + CERT_SYSTEM_STORE_CURRENT_USER_GROUP_POLICY_ID << CERT_SYSTEM_STORE_LOCATION_SHIFT; +pub const CERT_SYSTEM_STORE_LOCAL_MACHINE_GROUP_POLICY: ::DWORD = + CERT_SYSTEM_STORE_LOCAL_MACHINE_GROUP_POLICY_ID << CERT_SYSTEM_STORE_LOCATION_SHIFT; +pub const CERT_SYSTEM_STORE_LOCAL_MACHINE_ENTERPRISE: ::DWORD = + CERT_SYSTEM_STORE_LOCAL_MACHINE_ENTERPRISE_ID << CERT_SYSTEM_STORE_LOCATION_SHIFT; +pub const CERT_NAME_EMAIL_TYPE: ::DWORD = 1; +pub const CERT_NAME_RDN_TYPE: ::DWORD = 2; +pub const CERT_NAME_ATTR_TYPE: ::DWORD = 3; +pub const CERT_NAME_SIMPLE_DISPLAY_TYPE: ::DWORD = 4; +pub const CERT_NAME_FRIENDLY_DISPLAY_TYPE: ::DWORD = 5; +pub const CERT_NAME_DNS_TYPE: ::DWORD = 6; +pub const CERT_NAME_URL_TYPE: ::DWORD = 7; +pub const CERT_NAME_UPN_TYPE: ::DWORD = 8; +pub const CERT_SIMPLE_NAME_STR: ::DWORD = 1; +pub const CERT_OID_NAME_STR: ::DWORD = 2; +pub const CERT_X500_NAME_STR: ::DWORD = 3; + +pub const CERT_NAME_STR_SEMICOLON_FLAG: ::DWORD = 0x40000000; +pub const CERT_NAME_STR_NO_PLUS_FLAG: ::DWORD = 0x20000000; +pub const CERT_NAME_STR_NO_QUOTING_FLAG: ::DWORD = 0x10000000; +pub const CERT_NAME_STR_CRLF_FLAG: ::DWORD = 0x08000000; +pub const CERT_NAME_STR_COMMA_FLAG: ::DWORD = 0x04000000; +pub const CERT_NAME_STR_REVERSE_FLAG: ::DWORD = 0x02000000; + +pub const CERT_NAME_ISSUER_FLAG: ::DWORD = 0x1; +pub const CERT_NAME_STR_DISABLE_IE4_UTF8_FLAG: ::DWORD = 0x00010000; +pub const CERT_NAME_STR_ENABLE_T61_UNICODE_FLAG: ::DWORD = 0x00020000; +pub const CERT_NAME_STR_ENABLE_UTF8_UNICODE_FLAG: ::DWORD = 0x00040000; +pub const CERT_NAME_STR_FORCE_UTF8_DIR_STR_FLAG: ::DWORD = 0x00080000; +pub const CERT_DELETE_KEYSET_PROP_ID: ::DWORD = 101; +pub const CERT_COMPARE_MASK: ::DWORD = 0xFFFF; +pub const CERT_COMPARE_SHIFT: ::DWORD = 16; +pub const CERT_COMPARE_ANY: ::DWORD = 0; +pub const CERT_COMPARE_SHA1_HASH: ::DWORD = 1; +pub const CERT_COMPARE_NAME: ::DWORD = 2; +pub const CERT_COMPARE_ATTR: ::DWORD = 3; +pub const CERT_COMPARE_MD5_HASH: ::DWORD = 4; +pub const CERT_COMPARE_PROPERTY: ::DWORD = 5; +pub const CERT_COMPARE_PUBLIC_KEY: ::DWORD = 6; +pub const CERT_COMPARE_HASH: ::DWORD = CERT_COMPARE_SHA1_HASH; +pub const CERT_COMPARE_NAME_STR_A: ::DWORD = 7; +pub const CERT_COMPARE_NAME_STR_W: ::DWORD = 8; +pub const CERT_COMPARE_KEY_SPEC: ::DWORD = 9; +pub const CERT_COMPARE_ENHKEY_USAGE: ::DWORD = 10; +pub const CERT_COMPARE_CTL_USAGE: ::DWORD = CERT_COMPARE_ENHKEY_USAGE; +pub const CERT_COMPARE_SUBJECT_CERT: ::DWORD = 11; +pub const CERT_COMPARE_ISSUER_OF: ::DWORD = 12; +pub const CERT_COMPARE_EXISTING: ::DWORD = 13; +pub const CERT_COMPARE_SIGNATURE_HASH: ::DWORD = 14; +pub const CERT_COMPARE_KEY_IDENTIFIER: ::DWORD = 15; +pub const CERT_COMPARE_CERT_ID: ::DWORD = 16; +pub const CERT_COMPARE_CROSS_CERT_DIST_POINTS: ::DWORD = 17; +pub const CERT_COMPARE_PUBKEY_MD5_HASH: ::DWORD = 18; +pub const CERT_FIND_ANY: ::DWORD = CERT_COMPARE_ANY << CERT_COMPARE_SHIFT; +pub const CERT_FIND_SHA1_HASH: ::DWORD = CERT_COMPARE_SHA1_HASH << CERT_COMPARE_SHIFT; +pub const CERT_FIND_MD5_HASH: ::DWORD = CERT_COMPARE_MD5_HASH << CERT_COMPARE_SHIFT; +pub const CERT_FIND_SIGNATURE_HASH: ::DWORD = CERT_COMPARE_SIGNATURE_HASH << CERT_COMPARE_SHIFT; +pub const CERT_FIND_KEY_IDENTIFIER: ::DWORD = CERT_COMPARE_KEY_IDENTIFIER << CERT_COMPARE_SHIFT; +pub const CERT_FIND_HASH: ::DWORD = CERT_FIND_SHA1_HASH; +pub const CERT_FIND_PROPERTY: ::DWORD = CERT_COMPARE_PROPERTY << CERT_COMPARE_SHIFT; +pub const CERT_FIND_PUBLIC_KEY: ::DWORD = CERT_COMPARE_PUBLIC_KEY << CERT_COMPARE_SHIFT; +pub const CERT_FIND_SUBJECT_NAME: ::DWORD = (CERT_COMPARE_NAME << CERT_COMPARE_SHIFT) + | CERT_INFO_SUBJECT_FLAG; +pub const CERT_FIND_SUBJECT_ATTR: ::DWORD = (CERT_COMPARE_ATTR << CERT_COMPARE_SHIFT) + | CERT_INFO_SUBJECT_FLAG; +pub const CERT_FIND_ISSUER_NAME: ::DWORD = (CERT_COMPARE_NAME << CERT_COMPARE_SHIFT) + | CERT_INFO_ISSUER_FLAG; +pub const CERT_FIND_ISSUER_ATTR: ::DWORD = (CERT_COMPARE_ATTR << CERT_COMPARE_SHIFT) + | CERT_INFO_ISSUER_FLAG; +pub const CERT_FIND_SUBJECT_STR_A: ::DWORD = (CERT_COMPARE_NAME_STR_A << CERT_COMPARE_SHIFT) + | CERT_INFO_SUBJECT_FLAG; +pub const CERT_FIND_SUBJECT_STR_W: ::DWORD = (CERT_COMPARE_NAME_STR_W << CERT_COMPARE_SHIFT) + | CERT_INFO_SUBJECT_FLAG; +pub const CERT_FIND_SUBJECT_STR: ::DWORD = CERT_FIND_SUBJECT_STR_W; +pub const CERT_FIND_ISSUER_STR_A: ::DWORD = (CERT_COMPARE_NAME_STR_A << CERT_COMPARE_SHIFT) + | CERT_INFO_ISSUER_FLAG; +pub const CERT_FIND_ISSUER_STR_W: ::DWORD = (CERT_COMPARE_NAME_STR_W << CERT_COMPARE_SHIFT) + | CERT_INFO_ISSUER_FLAG; +pub const CERT_FIND_ISSUER_STR: ::DWORD = CERT_FIND_ISSUER_STR_W; +pub const CERT_FIND_KEY_SPEC: ::DWORD = CERT_COMPARE_KEY_SPEC << CERT_COMPARE_SHIFT; +pub const CERT_FIND_ENHKEY_USAGE: ::DWORD = CERT_COMPARE_ENHKEY_USAGE << CERT_COMPARE_SHIFT; +pub const CERT_FIND_CTL_USAGE: ::DWORD = CERT_FIND_ENHKEY_USAGE; +pub const CERT_FIND_SUBJECT_CERT: ::DWORD = CERT_COMPARE_SUBJECT_CERT << CERT_COMPARE_SHIFT; +pub const CERT_FIND_ISSUER_OF: ::DWORD = CERT_COMPARE_ISSUER_OF << CERT_COMPARE_SHIFT; +pub const CERT_FIND_EXISTING: ::DWORD = CERT_COMPARE_EXISTING << CERT_COMPARE_SHIFT; +pub const CERT_FIND_CERT_ID: ::DWORD = CERT_COMPARE_CERT_ID << CERT_COMPARE_SHIFT; +pub const CERT_FIND_CROSS_CERT_DIST_POINTS: ::DWORD = CERT_COMPARE_CROSS_CERT_DIST_POINTS + << CERT_COMPARE_SHIFT; +pub const CERT_FIND_PUBKEY_MD5_HASH: ::DWORD = CERT_COMPARE_PUBKEY_MD5_HASH << CERT_COMPARE_SHIFT; +pub const CERT_ENCIPHER_ONLY_KEY_USAGE: ::DWORD = 0x0001; +pub const CERT_CRL_SIGN_KEY_USAGE: ::DWORD = 0x0002; +pub const CERT_KEY_CERT_SIGN_KEY_USAGE: ::DWORD = 0x0004; +pub const CERT_KEY_AGREEMENT_KEY_USAGE: ::DWORD = 0x0008; +pub const CERT_DATA_ENCIPHERMENT_KEY_USAGE: ::DWORD = 0x0010; +pub const CERT_KEY_ENCIPHERMENT_KEY_USAGE: ::DWORD = 0x0020; +pub const CERT_NON_REPUDIATION_KEY_USAGE: ::DWORD = 0x0040; +pub const CERT_DIGITAL_SIGNATURE_KEY_USAGE: ::DWORD = 0x0080; +pub const CERT_DECIPHER_ONLY_KEY_USAGE: ::DWORD = 0x8000; +pub const CERT_STORE_ADD_NEW: ::DWORD = 1; +pub const CERT_STORE_ADD_USE_EXISTING: ::DWORD = 2; +pub const CERT_STORE_ADD_REPLACE_EXISTING: ::DWORD = 3; +pub const CERT_STORE_ADD_ALWAYS: ::DWORD = 4; +pub const CERT_STORE_ADD_REPLACE_EXISTING_INHERIT_PROPERTIES: ::DWORD = 5; +pub const CERT_STORE_ADD_NEWER: ::DWORD = 6; +pub const CERT_STORE_ADD_NEWER_INHERIT_PROPERTIES: ::DWORD = 7; +pub const CERT_STORE_SAVE_AS_STORE: ::DWORD = 1; +pub const CERT_STORE_SAVE_AS_PKCS7: ::DWORD = 2; +pub const CERT_STORE_SAVE_TO_FILE: ::DWORD = 1; +pub const CERT_STORE_SAVE_TO_MEMORY: ::DWORD = 2; +pub const CERT_STORE_SAVE_TO_FILENAME_A: ::DWORD = 3; +pub const CERT_STORE_SAVE_TO_FILENAME_W: ::DWORD = 4; +pub const CERT_STORE_SAVE_TO_FILENAME: ::DWORD = CERT_STORE_SAVE_TO_FILENAME_W; +pub const CERT_CA_SUBJECT_FLAG: ::DWORD = 0x80; +pub const CERT_END_ENTITY_SUBJECT_FLAG: ::DWORD = 0x40; +pub const CERT_CHAIN_POLICY_BASE: ::DWORD = 1; +pub const CERT_CHAIN_POLICY_AUTHENTICODE: ::DWORD = 2; +pub const CERT_CHAIN_POLICY_AUTHENTICODE_TS: ::DWORD = 3; +pub const CERT_CHAIN_POLICY_SSL: ::DWORD = 4; +pub const CERT_CHAIN_POLICY_BASIC_CONSTRAINTS: ::DWORD = 5; +pub const CERT_CHAIN_POLICY_NT_AUTH: ::DWORD = 6; +pub const CERT_CHAIN_POLICY_MICROSOFT_ROOT: ::DWORD = 7; +pub const CERT_CHAIN_REVOCATION_CHECK_END_CERT: ::DWORD = 0x10000000; +pub const CERT_CHAIN_REVOCATION_CHECK_CHAIN: ::DWORD = 0x20000000; +pub const CERT_CHAIN_REVOCATION_CHECK_CHAIN_EXCLUDE_ROOT: ::DWORD = 0x40000000; +pub const CERT_CHAIN_REVOCATION_CHECK_CACHE_ONLY: ::DWORD = 0x80000000; +pub const CERT_CHAIN_REVOCATION_ACCUMULATIVE_TIMEOUT: ::DWORD = 0x08000000; +pub const CERT_TRUST_NO_ERROR: ::DWORD = 0x00000000; +pub const CERT_TRUST_IS_NOT_TIME_VALID: ::DWORD = 0x00000001; +pub const CERT_TRUST_IS_NOT_TIME_NESTED: ::DWORD = 0x00000002; +pub const CERT_TRUST_IS_REVOKED: ::DWORD = 0x00000004; +pub const CERT_TRUST_IS_NOT_SIGNATURE_VALID: ::DWORD = 0x00000008; +pub const CERT_TRUST_IS_NOT_VALID_FOR_USAGE: ::DWORD = 0x00000010; +pub const CERT_TRUST_IS_UNTRUSTED_ROOT: ::DWORD = 0x00000020; +pub const CERT_TRUST_REVOCATION_STATUS_UNKNOWN: ::DWORD = 0x00000040; +pub const CERT_TRUST_IS_CYCLIC: ::DWORD = 0x00000080; + +pub const CERT_TRUST_INVALID_EXTENSION: ::DWORD = 0x00000100; +pub const CERT_TRUST_INVALID_POLICY_CONSTRAINTS: ::DWORD = 0x00000200; +pub const CERT_TRUST_INVALID_BASIC_CONSTRAINTS: ::DWORD = 0x00000400; +pub const CERT_TRUST_INVALID_NAME_CONSTRAINTS: ::DWORD = 0x00000800; +pub const CERT_TRUST_HAS_NOT_SUPPORTED_NAME_CONSTRAINT: ::DWORD = 0x00001000; +pub const CERT_TRUST_HAS_NOT_DEFINED_NAME_CONSTRAINT: ::DWORD = 0x00002000; +pub const CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT: ::DWORD = 0x00004000; +pub const CERT_TRUST_HAS_EXCLUDED_NAME_CONSTRAINT: ::DWORD = 0x00008000; + +pub const CERT_TRUST_IS_OFFLINE_REVOCATION: ::DWORD = 0x01000000; +pub const CERT_TRUST_NO_ISSUANCE_CHAIN_POLICY: ::DWORD = 0x02000000; +pub const CERT_TRUST_IS_PARTIAL_CHAIN: ::DWORD = 0x00010000; +pub const CERT_TRUST_CTL_IS_NOT_TIME_VALID: ::DWORD = 0x00020000; +pub const CERT_TRUST_CTL_IS_NOT_SIGNATURE_VALID: ::DWORD = 0x00040000; +pub const CERT_TRUST_CTL_IS_NOT_VALID_FOR_USAGE: ::DWORD = 0x00080000; +pub const CERT_CHAIN_POLICY_IGNORE_NOT_TIME_VALID_FLAG: ::DWORD = 0x00000001; +pub const CERT_CHAIN_POLICY_IGNORE_CTL_NOT_TIME_VALID_FLAG: ::DWORD = 0x00000002; +pub const CERT_CHAIN_POLICY_IGNORE_NOT_TIME_NESTED_FLAG: ::DWORD = 0x00000004; +pub const CERT_CHAIN_POLICY_IGNORE_INVALID_BASIC_CONSTRAINTS_FLAG: ::DWORD = 0x00000008; + +pub const CERT_CHAIN_POLICY_ALLOW_UNKNOWN_CA_FLAG: ::DWORD = 0x00000010; +pub const CERT_CHAIN_POLICY_IGNORE_WRONG_USAGE_FLAG: ::DWORD = 0x00000020; +pub const CERT_CHAIN_POLICY_IGNORE_INVALID_NAME_FLAG: ::DWORD = 0x00000040; +pub const CERT_CHAIN_POLICY_IGNORE_INVALID_POLICY_FLAG: ::DWORD = 0x00000080; + +pub const CERT_CHAIN_POLICY_IGNORE_END_REV_UNKNOWN_FLAG: ::DWORD = 0x00000100; +pub const CERT_CHAIN_POLICY_IGNORE_CTL_SIGNER_REV_UNKNOWN_FLAG: ::DWORD = 0x00000200; +pub const CERT_CHAIN_POLICY_IGNORE_CA_REV_UNKNOWN_FLAG: ::DWORD = 0x00000400; +pub const CERT_CHAIN_POLICY_IGNORE_ROOT_REV_UNKNOWN_FLAG: ::DWORD = 0x00000800; + +pub const CERT_CHAIN_POLICY_IGNORE_ALL_REV_UNKNOWN_FLAGS: ::DWORD = + CERT_CHAIN_POLICY_IGNORE_END_REV_UNKNOWN_FLAG | + CERT_CHAIN_POLICY_IGNORE_CTL_SIGNER_REV_UNKNOWN_FLAG | + CERT_CHAIN_POLICY_IGNORE_CA_REV_UNKNOWN_FLAG | + CERT_CHAIN_POLICY_IGNORE_ROOT_REV_UNKNOWN_FLAG; +pub const CERT_TRUST_HAS_EXACT_MATCH_ISSUER: ::DWORD = 0x00000001; +pub const CERT_TRUST_HAS_KEY_MATCH_ISSUER: ::DWORD = 0x00000002; +pub const CERT_TRUST_HAS_NAME_MATCH_ISSUER: ::DWORD = 0x00000004; +pub const CERT_TRUST_IS_SELF_SIGNED: ::DWORD = 0x00000008; +pub const CERT_TRUST_HAS_PREFERRED_ISSUER: ::DWORD = 0x00000100; +pub const CERT_TRUST_HAS_ISSUANCE_CHAIN_POLICY: ::DWORD = 0x00000200; +pub const CERT_TRUST_HAS_VALID_NAME_CONSTRAINTS: ::DWORD = 0x00000400; +pub const CERT_TRUST_IS_COMPLEX_CHAIN: ::DWORD = 0x00010000; +pub const CERT_ALT_NAME_OTHER_NAME: ::DWORD = 1; +pub const CERT_ALT_NAME_RFC822_NAME: ::DWORD = 2; +pub const CERT_ALT_NAME_DNS_NAME: ::DWORD = 3; +pub const CERT_ALT_NAME_X400_ADDRESS: ::DWORD = 4; +pub const CERT_ALT_NAME_DIRECTORY_NAME: ::DWORD = 5; +pub const CERT_ALT_NAME_EDI_PARTY_NAME: ::DWORD = 6; +pub const CERT_ALT_NAME_URL: ::DWORD = 7; +pub const CERT_ALT_NAME_IP_ADDRESS: ::DWORD = 8; +pub const CERT_ALT_NAME_REGISTERED_ID: ::DWORD = 9; +pub const CERT_STORE_CTRL_RESYNC: ::DWORD = 1; +pub const CERT_STORE_CTRL_NOTIFY_CHANGE: ::DWORD = 2; +pub const CERT_STORE_CTRL_COMMIT: ::DWORD = 3; +pub const CERT_STORE_CTRL_AUTO_RESYNC: ::DWORD = 4; +pub const CERT_STORE_CTRL_CANCEL_NOTIFY: ::DWORD = 5; +pub const CERT_ID_ISSUER_SERIAL_NUMBER: ::DWORD = 1; +pub const CERT_ID_KEY_IDENTIFIER: ::DWORD = 2; +pub const CERT_ID_SHA1_HASH: ::DWORD = 3; +pub const CERT_KEY_PROV_HANDLE_PROP_ID: ::DWORD = 1; +pub const CERT_KEY_PROV_INFO_PROP_ID: ::DWORD = 2; +pub const CERT_SHA1_HASH_PROP_ID: ::DWORD = 3; +pub const CERT_MD5_HASH_PROP_ID: ::DWORD = 4; +pub const CERT_HASH_PROP_ID: ::DWORD = CERT_SHA1_HASH_PROP_ID; +pub const CERT_KEY_CONTEXT_PROP_ID: ::DWORD = 5; +pub const CERT_KEY_SPEC_PROP_ID: ::DWORD = 6; +pub const CERT_IE30_RESERVED_PROP_ID: ::DWORD = 7; +pub const CERT_PUBKEY_HASH_RESERVED_PROP_ID: ::DWORD = 8; +pub const CERT_ENHKEY_USAGE_PROP_ID: ::DWORD = 9; +pub const CERT_CTL_USAGE_PROP_ID: ::DWORD = CERT_ENHKEY_USAGE_PROP_ID; +pub const CERT_NEXT_UPDATE_LOCATION_PROP_ID: ::DWORD = 10; +pub const CERT_FRIENDLY_NAME_PROP_ID: ::DWORD = 11; +pub const CERT_PVK_FILE_PROP_ID: ::DWORD = 12; +pub const CERT_DESCRIPTION_PROP_ID: ::DWORD = 13; +pub const CERT_ACCESS_STATE_PROP_ID: ::DWORD = 14; +pub const CERT_SIGNATURE_HASH_PROP_ID: ::DWORD = 15; +pub const CERT_SMART_CARD_DATA_PROP_ID: ::DWORD = 16; +pub const CERT_EFS_PROP_ID: ::DWORD = 17; +pub const CERT_FORTEZZA_DATA_PROP_ID: ::DWORD = 18; +pub const CERT_ARCHIVED_PROP_ID: ::DWORD = 19; +pub const CERT_KEY_IDENTIFIER_PROP_ID: ::DWORD = 20; +pub const CERT_AUTO_ENROLL_PROP_ID: ::DWORD = 21; +pub const CERT_PUBKEY_ALG_PARA_PROP_ID: ::DWORD = 22; +pub const CERT_CROSS_CERT_DIST_POINTS_PROP_ID: ::DWORD = 23; +pub const CERT_ISSUER_PUBLIC_KEY_MD5_HASH_PROP_ID: ::DWORD = 24; +pub const CERT_SUBJECT_PUBLIC_KEY_MD5_HASH_PROP_ID: ::DWORD = 25; +pub const CERT_ENROLLMENT_PROP_ID: ::DWORD = 26; +pub const CERT_DATE_STAMP_PROP_ID: ::DWORD = 27; +pub const CERT_ISSUER_SERIAL_NUMBER_MD5_HASH_PROP_ID: ::DWORD = 28; +pub const CERT_SUBJECT_NAME_MD5_HASH_PROP_ID: ::DWORD = 29; +pub const CERT_EXTENDED_ERROR_INFO_PROP_ID: ::DWORD = 30; +pub const CERT_RENEWAL_PROP_ID: ::DWORD = 64; +pub const CERT_ARCHIVED_KEY_HASH_PROP_ID: ::DWORD = 65; +pub const CERT_AUTO_ENROLL_RETRY_PROP_ID: ::DWORD = 66; +pub const CERT_AIA_URL_RETRIEVED_PROP_ID: ::DWORD = 67; +pub const CERT_AUTHORITY_INFO_ACCESS_PROP_ID: ::DWORD = 68; +pub const CERT_BACKED_UP_PROP_ID: ::DWORD = 69; +pub const CERT_OCSP_RESPONSE_PROP_ID: ::DWORD = 70; +pub const CERT_REQUEST_ORIGINATOR_PROP_ID: ::DWORD = 71; +pub const CERT_SOURCE_LOCATION_PROP_ID: ::DWORD = 72; +pub const CERT_SOURCE_URL_PROP_ID: ::DWORD = 73; +pub const CERT_NEW_KEY_PROP_ID: ::DWORD = 74; +pub const CERT_OCSP_CACHE_PREFIX_PROP_ID: ::DWORD = 75; +pub const CERT_SMART_CARD_ROOT_INFO_PROP_ID: ::DWORD = 76; +pub const CERT_NO_AUTO_EXPIRE_CHECK_PROP_ID: ::DWORD = 77; +pub const CERT_NCRYPT_KEY_HANDLE_PROP_ID: ::DWORD = 78; +pub const CERT_HCRYPTPROV_OR_NCRYPT_KEY_HANDLE_PROP_ID: ::DWORD = 79; +pub const CERT_SUBJECT_INFO_ACCESS_PROP_ID: ::DWORD = 80; +pub const CERT_CA_OCSP_AUTHORITY_INFO_ACCESS_PROP_ID: ::DWORD = 81; +pub const CERT_CA_DISABLE_CRL_PROP_ID: ::DWORD = 82; +pub const CERT_ROOT_PROGRAM_CERT_POLICIES_PROP_ID: ::DWORD = 83; +pub const CERT_ROOT_PROGRAM_NAME_CONSTRAINTS_PROP_ID: ::DWORD = 84; +pub const CERT_SUBJECT_OCSP_AUTHORITY_INFO_ACCESS_PROP_ID: ::DWORD = 85; +pub const CERT_SUBJECT_DISABLE_CRL_PROP_ID: ::DWORD = 86; +pub const CERT_CEP_PROP_ID: ::DWORD = 87; +pub const CERT_SIGN_HASH_CNG_ALG_PROP_ID: ::DWORD = 89; +pub const CERT_SCARD_PIN_ID_PROP_ID: ::DWORD = 90; +pub const CERT_SCARD_PIN_INFO_PROP_ID: ::DWORD = 91; +pub const CERT_SUBJECT_PUB_KEY_BIT_LENGTH_PROP_ID: ::DWORD = 92; +pub const CERT_PUB_KEY_CNG_ALG_BIT_LENGTH_PROP_ID: ::DWORD = 93; +pub const CERT_ISSUER_PUB_KEY_BIT_LENGTH_PROP_ID: ::DWORD = 94; +pub const CERT_ISSUER_CHAIN_SIGN_HASH_CNG_ALG_PROP_ID: ::DWORD = 95; +pub const CERT_ISSUER_CHAIN_PUB_KEY_CNG_ALG_BIT_LENGTH_PROP_ID: ::DWORD = 96; +pub const CERT_NO_EXPIRE_NOTIFICATION_PROP_ID: ::DWORD = 97; +pub const CERT_AUTH_ROOT_SHA256_HASH_PROP_ID: ::DWORD = 98; +pub const CERT_NCRYPT_KEY_HANDLE_TRANSFER_PROP_ID: ::DWORD = 99; +pub const CERT_HCRYPTPROV_TRANSFER_PROP_ID: ::DWORD = 100; +pub const CERT_SMART_CARD_READER_PROP_ID: ::DWORD = 101; +pub const CERT_SEND_AS_TRUSTED_ISSUER_PROP_ID: ::DWORD = 102; +pub const CERT_KEY_REPAIR_ATTEMPTED_PROP_ID: ::DWORD = 103; +pub const CERT_DISALLOWED_FILETIME_PROP_ID: ::DWORD = 104; +pub const CERT_ROOT_PROGRAM_CHAIN_POLICIES_PROP_ID: ::DWORD = 105; +pub const CERT_SMART_CARD_READER_NON_REMOVABLE_PROP_ID: ::DWORD = 106; +pub const CERT_SHA256_HASH_PROP_ID: ::DWORD = 107; +pub const CERT_SCEP_SERVER_CERTS_PROP_ID: ::DWORD = 108; +pub const CERT_SCEP_RA_SIGNATURE_CERT_PROP_ID: ::DWORD = 109; +pub const CERT_SCEP_RA_ENCRYPTION_CERT_PROP_ID: ::DWORD = 110; +pub const CERT_SCEP_CA_CERT_PROP_ID: ::DWORD = 111; +pub const CERT_SCEP_SIGNER_CERT_PROP_ID: ::DWORD = 112; +pub const CERT_SCEP_NONCE_PROP_ID: ::DWORD = 113; +pub const CERT_SCEP_ENCRYPT_HASH_CNG_ALG_PROP_ID: ::DWORD = 114; +pub const CERT_SCEP_FLAGS_PROP_ID: ::DWORD = 115; +pub const CERT_SCEP_GUID_PROP_ID: ::DWORD = 116; +pub const CERT_SERIALIZABLE_KEY_CONTEXT_PROP_ID: ::DWORD = 117; +pub const CERT_ISOLATED_KEY_PROP_ID: ::DWORD = 118; +pub const CERT_FIRST_RESERVED_PROP_ID: ::DWORD = 119; +pub const CERT_LAST_RESERVED_PROP_ID: ::DWORD = 0x00007FFF; +pub const CERT_FIRST_USER_PROP_ID: ::DWORD = 0x00008000; +pub const CERT_LAST_USER_PROP_ID: ::DWORD = 0x0000FFFF; +pub const szOID_CERT_PROP_ID_PREFIX: &'static str = "1.3.6.1.4.1.311.10.11."; +pub const szOID_CERT_KEY_IDENTIFIER_PROP_ID: &'static str = "1.3.6.1.4.1.311.10.11.20"; +pub const szOID_CERT_ISSUER_SERIAL_NUMBER_MD5_HASH_PROP_ID: &'static str + = "1.3.6.1.4.1.311.10.11.28"; +pub const szOID_CERT_SUBJECT_NAME_MD5_HASH_PROP_ID: &'static str = "1.3.6.1.4.1.311.10.11.29"; +pub const szOID_CERT_MD5_HASH_PROP_ID: &'static str = "1.3.6.1.4.1.311.10.11.4"; +pub const szOID_CERT_SIGNATURE_HASH_PROP_ID: &'static str = "1.3.6.1.4.1.311.10.11.15"; +pub const szOID_DISALLOWED_HASH: &'static str = szOID_CERT_SIGNATURE_HASH_PROP_ID; +pub const szOID_CERT_DISALLOWED_FILETIME_PROP_ID: &'static str = "1.3.6.1.4.1.311.10.11.104"; +pub const CERT_ACCESS_STATE_WRITE_PERSIST_FLAG: ::DWORD = 0x1; +pub const CERT_ACCESS_STATE_SYSTEM_STORE_FLAG: ::DWORD = 0x2; +pub const CERT_ACCESS_STATE_LM_SYSTEM_STORE_FLAG: ::DWORD = 0x4; +pub const CERT_ACCESS_STATE_GP_SYSTEM_STORE_FLAG: ::DWORD = 0x8; +pub const CERT_ACCESS_STATE_SHARED_USER_FLAG: ::DWORD = 0x10; +pub const szOID_ROOT_PROGRAM_AUTO_UPDATE_CA_REVOCATION: &'static str = "1.3.6.1.4.1.311.60.3.1"; +pub const szOID_ROOT_PROGRAM_AUTO_UPDATE_END_REVOCATION: &'static str = "1.3.6.1.4.1.311.60.3.2"; +pub const szOID_ROOT_PROGRAM_NO_OCSP_FAILOVER_TO_CRL: &'static str = "1.3.6.1.4.1.311.60.3.3"; +STRUCT!{struct CRYPT_KEY_PROV_PARAM { + dwParam: ::DWORD, + pbData: *mut ::BYTE, + cbData: ::DWORD, + dwFlags: ::DWORD, +}} +pub type PCRYPT_KEY_PROV_PARAM = *mut CRYPT_KEY_PROV_PARAM; +STRUCT!{struct CRYPT_KEY_PROV_INFO { + pwszContainerName: ::LPWSTR, + pwszProvName: ::LPWSTR, + dwProvType: ::DWORD, + dwFlags: ::DWORD, + cProvParam: ::DWORD, + rgProvParam: PCRYPT_KEY_PROV_PARAM, + dwKeySpec: ::DWORD, +}} +pub type PCRYPT_KEY_PROV_INFO = *mut CRYPT_KEY_PROV_INFO; +pub const CERT_SET_KEY_PROV_HANDLE_PROP_ID: ::DWORD = 0x00000001; +pub const CERT_SET_KEY_CONTEXT_PROP_ID: ::DWORD = 0x00000001; +pub const CERT_NCRYPT_KEY_SPEC: ::DWORD = 0xFFFFFFFF; +//20213 +pub type HCERT_SERVER_OCSP_RESPONSE = *mut ::c_void; +STRUCT!{struct CERT_SERVER_OCSP_RESPONSE_CONTEXT { + cbSize: ::DWORD, + pbEncodedOcspResponse: *mut ::BYTE, + cbEncodedOcspResponse: ::DWORD, +}} +pub type PCERT_SERVER_OCSP_RESPONSE_CONTEXT = *mut CERT_SERVER_OCSP_RESPONSE_CONTEXT; +pub type PCCERT_SERVER_OCSP_RESPONSE_CONTEXT = *const CERT_SERVER_OCSP_RESPONSE_CONTEXT; +STRUCT!{struct CERT_CHAIN_ENGINE_CONFIG { + cbSize: ::DWORD, + hRestrictedRoot: HCERTSTORE, + hRestrictedTrust: HCERTSTORE, + hRestrictedOther: HCERTSTORE, + cAdditionalStore: ::DWORD, + rghAdditionalStore: *mut HCERTSTORE, + dwFlags: ::DWORD, + dwUrlRetrievalTimeout: ::DWORD, + MaximumCachedCertificates: ::DWORD, + CycleDetectionModulus: ::DWORD, + // #if (NTDDI_VERSION >= NTDDI_WIN7) + hExclusiveRoot: HCERTSTORE, + hExclusiveTrustedPeople: HCERTSTORE, + // #if (NTDDI_VERSION >= NTDDI_WIN8) + dwExclusiveFlags: ::DWORD, +}} +pub type PCERT_CHAIN_ENGINE_CONFIG = *mut CERT_CHAIN_ENGINE_CONFIG; +// 18748 +pub type HCERTCHAINENGINE = ::HANDLE; +pub type PFN_CERT_CREATE_CONTEXT_SORT_FUNC = Option<unsafe extern "system" fn( + cbTotalEncoded: ::DWORD, cbRemainEncoded: ::DWORD, cEntry: ::DWORD, pvSort: *mut ::c_void +) -> ::BOOL>; +STRUCT!{nodebug struct CERT_CREATE_CONTEXT_PARA { + cbSize: ::DWORD, + pfnFree: PFN_CRYPT_FREE, + pvFree: *mut ::c_void, + pfnSort: PFN_CERT_CREATE_CONTEXT_SORT_FUNC, + pvSort: *mut ::c_void, +}} +pub type PCERT_CREATE_CONTEXT_PARA = *mut CERT_CREATE_CONTEXT_PARA; +STRUCT!{struct CERT_EXTENSIONS { + cExtension: ::DWORD, + rgExtension: PCERT_EXTENSION, +}} +pub type PCERT_EXTENSIONS = *mut CERT_EXTENSIONS; +STRUCT!{struct CERT_REVOCATION_CRL_INFO { + cbSize: ::DWORD, + pBaseCrlContext: PCCRL_CONTEXT, + pDeltaCrlContext: PCCRL_CONTEXT, + pCrlEntry: PCRL_ENTRY, + fDeltaCrlEntry: ::BOOL, +}} +pub type PCERT_REVOCATION_CRL_INFO = *mut CERT_REVOCATION_CRL_INFO; +STRUCT!{struct CERT_TRUST_STATUS { + dwErrorStatus: ::DWORD, + dwInfoStatus: ::DWORD, +}} +pub type PCERT_TRUST_STATUS = *mut CERT_TRUST_STATUS; +STRUCT!{struct CERT_REVOCATION_INFO { + cbSize: ::DWORD, + dwRevocationResult: ::DWORD, + pszRevocationOid: ::LPCSTR, + pvOidSpecificInfo: ::LPVOID, + fHasFreshnessTime: ::BOOL, + dwFreshnessTime: ::DWORD, + pCrlInfo: PCERT_REVOCATION_CRL_INFO, +}} +pub type PCERT_REVOCATION_INFO = *mut CERT_REVOCATION_INFO; +STRUCT!{struct CERT_TRUST_LIST_INFO { + cbSize: ::DWORD, + pCtlEntry: PCTL_ENTRY, + pCtlContext: PCCTL_CONTEXT, +}} +pub type PCERT_TRUST_LIST_INFO = *mut CERT_TRUST_LIST_INFO; +STRUCT!{struct CERT_CHAIN_ELEMENT { + cbSize: ::DWORD, + pCertContext: PCCERT_CONTEXT, + TrustStatus: CERT_TRUST_STATUS, + pRevocationInfo: PCERT_REVOCATION_INFO, + pIssuanceUsage: PCERT_ENHKEY_USAGE, + pApplicationUsage: PCERT_ENHKEY_USAGE, + pwszExtendedErrorInfo: ::LPWSTR, +}} +pub type PCERT_CHAIN_ELEMENT = *mut CERT_CHAIN_ELEMENT; +pub type PCCERT_CHAIN_ELEMENT = *const CERT_CHAIN_ELEMENT; +STRUCT!{struct CERT_SIMPLE_CHAIN { + cbSize: ::DWORD, + TrustStatus: CERT_TRUST_STATUS, + cElement: ::DWORD, + rgpElement: *mut PCERT_CHAIN_ELEMENT, + pTrustListInfo: PCERT_TRUST_LIST_INFO, + fHasRevocationFreshnessTime: ::BOOL, + dwRevocationFreshnessTime: ::DWORD, +}} +pub type PCERT_SIMPLE_CHAIN = *mut CERT_SIMPLE_CHAIN; +pub type PCCERT_SIMPLE_CHAIN = *const CERT_SIMPLE_CHAIN; +STRUCT!{struct CERT_CHAIN_CONTEXT { + cbSize: ::DWORD, + TrustStatus: CERT_TRUST_STATUS, + cChain: ::DWORD, + rgpChain: *mut PCERT_SIMPLE_CHAIN, + cLowerQualityChainContext: ::DWORD, + rgpLowerQualityChainContext: *mut PCCERT_CHAIN_CONTEXT, + fHasRevocationFreshnessTime: ::BOOL, + dwRevocationFreshnessTime: ::DWORD, + dwCreateFlags: ::DWORD, + ChainId: ::GUID, +}} +pub type PCERT_CHAIN_CONTEXT = *mut CERT_CHAIN_CONTEXT; +pub type PCCERT_CHAIN_CONTEXT = *const CERT_CHAIN_CONTEXT; +STRUCT!{struct CERT_PHYSICAL_STORE_INFO { + cbSize: ::DWORD, + pszOpenStoreProvider: ::LPSTR, + dwOpenEncodingType: ::DWORD, + dwOpenFlags: ::DWORD, + OpenParameters: CRYPT_DATA_BLOB, + dwFlags: ::DWORD, + dwPriority: ::DWORD, +}} +pub type PCERT_PHYSICAL_STORE_INFO = *mut CERT_PHYSICAL_STORE_INFO; +STRUCT!{struct CERT_SYSTEM_STORE_INFO { + cbSize: ::DWORD, +}} +pub type PCERT_SYSTEM_STORE_INFO = *mut CERT_SYSTEM_STORE_INFO; +//13401 +pub type PFN_CERT_ENUM_SYSTEM_STORE_LOCATION = Option<unsafe extern "system" fn( + pwszStoreLocation: ::LPCWSTR, dwFlags: ::DWORD, pvReserved: *mut ::c_void, pvArg: *mut ::c_void, +) -> ::BOOL>; +//13408 +pub type PFN_CERT_ENUM_SYSTEM_STORE = Option<unsafe extern "system" fn( + pvSystemStore: *const ::c_void, dwFlags: ::DWORD, pStoreInfo: PCERT_SYSTEM_STORE_INFO, + pvReserved: *mut ::c_void, pvArg: *mut ::c_void, +) -> ::BOOL>; +//13416 +pub type PFN_CERT_ENUM_PHYSICAL_STORE = Option<unsafe extern "system" fn( + pvSystemStore: *const ::c_void, dwFlags: ::DWORD, pwszStoreName: ::LPCWSTR, + pStoreInfo: PCERT_PHYSICAL_STORE_INFO, pvReserved: *mut ::c_void, pvArg: *mut ::c_void, +) -> ::BOOL>; +STRUCT!{struct CERT_STRONG_SIGN_SERIALIZED_INFO { + dwFlags: ::DWORD, + pwszCNGSignHashAlgids: ::LPWSTR, + pwszCNGPubKeyMinBitLengths: ::LPWSTR, +}} +pub type PCERT_STRONG_SIGN_SERIALIZED_INFO = *mut CERT_STRONG_SIGN_SERIALIZED_INFO; +STRUCT!{struct CERT_STRONG_SIGN_PARA { + cbSize: ::DWORD, + dwInfoChoice: ::DWORD, + pvInfo: *mut ::c_void, +}} +UNION!( + CERT_STRONG_SIGN_PARA, pvInfo, pSerializedInfo, pSerializedInfo_mut, + PCERT_STRONG_SIGN_SERIALIZED_INFO +); +UNION!(CERT_STRONG_SIGN_PARA, pvInfo, pszOID, pszOID_mut, ::LPSTR); +pub type PCERT_STRONG_SIGN_PARA = *mut CERT_STRONG_SIGN_PARA; +pub type PCCERT_STRONG_SIGN_PARA = *const CERT_STRONG_SIGN_PARA; +STRUCT!{struct CERT_USAGE_MATCH { + dwType: ::DWORD, + Usage: CERT_ENHKEY_USAGE, +}} +pub type PCERT_USAGE_MATCH = *mut CERT_USAGE_MATCH; +STRUCT!{struct CERT_CHAIN_PARA { + cbSize: ::DWORD, + RequestedUsage: CERT_USAGE_MATCH, + RequestedIssuancePolicy: CERT_USAGE_MATCH, + dwUrlRetrievalTimeout: ::DWORD, + fCheckRevocationFreshnessTime: ::BOOL, + dwRevocationFreshnessTime: ::DWORD, + pftCacheResync: ::LPFILETIME, + pStrongSignPara: PCCERT_STRONG_SIGN_PARA, + dwStrongSignFlags: ::DWORD, +}} +pub type PCERT_CHAIN_PARA = *mut CERT_CHAIN_PARA; +STRUCT!{struct CERT_SELECT_CHAIN_PARA { + hChainEngine: HCERTCHAINENGINE, + pTime: ::PFILETIME, + hAdditionalStore: HCERTSTORE, + pChainPara: PCERT_CHAIN_PARA, + dwFlags: ::DWORD, +}} +pub type PCERT_SELECT_CHAIN_PARA = *mut CERT_SELECT_CHAIN_PARA; +pub type PCCERT_SELECT_CHAIN_PARA = *const CERT_SELECT_CHAIN_PARA; +STRUCT!{struct CERT_SELECT_CRITERIA { + dwType: ::DWORD, + cPara: ::DWORD, + ppPara: *mut *mut ::c_void, +}} +pub type PCERT_SELECT_CRITERIA = *mut CERT_SELECT_CRITERIA; +pub type PCCERT_SELECT_CRITERIA = *const CERT_SELECT_CRITERIA; +STRUCT!{struct CTL_VERIFY_USAGE_PARA { + cbSize: ::DWORD, + ListIdentifier: CRYPT_DATA_BLOB, + cCtlStore: ::DWORD, + rghCtlStore: *mut HCERTSTORE, + cSignerStore: ::DWORD, + rghSignerStore: *mut HCERTSTORE, +}} +pub type PCTL_VERIFY_USAGE_PARA = *mut CTL_VERIFY_USAGE_PARA; +STRUCT!{struct CTL_VERIFY_USAGE_STATUS { + cbSize: ::DWORD, + dwError: ::DWORD, + dwFlags: ::DWORD, + ppCtl: *mut PCCTL_CONTEXT, + dwCtlEntryIndex: ::DWORD, + ppSigner: *mut PCCERT_CONTEXT, + dwSignerIndex: ::DWORD, +}} +pub type PCTL_VERIFY_USAGE_STATUS = *mut CTL_VERIFY_USAGE_STATUS; +STRUCT!{struct CERT_CHAIN_POLICY_PARA { + cbSize: ::DWORD, + dwFlags: ::DWORD, + pvExtraPolicyPara: *mut ::c_void, +}} +pub type PCERT_CHAIN_POLICY_PARA = *mut CERT_CHAIN_POLICY_PARA; +STRUCT!{struct CERT_CHAIN_POLICY_STATUS { + cbSize: ::DWORD, + dwError: ::DWORD, + lChainIndex: ::LONG, + lElementIndex: ::LONG, + pvExtraPolicyStatus: *mut ::c_void, +}} +pub type PCERT_CHAIN_POLICY_STATUS = *mut CERT_CHAIN_POLICY_STATUS; +STRUCT!{struct CERT_REVOCATION_CHAIN_PARA { + cbSize: ::DWORD, + hChainEngine: HCERTCHAINENGINE, + hAdditionalStore: HCERTSTORE, + dwChainFlags: ::DWORD, + dwUrlRetrievalTimeout: ::DWORD, + pftCurrentTime: ::LPFILETIME, + pftCacheResync: ::LPFILETIME, +}} +pub type PCERT_REVOCATION_CHAIN_PARA = *mut CERT_REVOCATION_CHAIN_PARA; +STRUCT!{struct CERT_REVOCATION_PARA { + cbSize: ::DWORD, + pIssuerCert: PCCERT_CONTEXT, + cCertStore: ::DWORD, + rgCertStore: *mut HCERTSTORE, + hCrlStore: HCERTSTORE, + pftTimeToUse: ::LPFILETIME, + dwUrlRetrievalTimeout: ::DWORD, + fCheckFreshnessTime: ::BOOL, + dwFreshnessTime: ::DWORD, + pftCurrentTime: ::LPFILETIME, + pCrlInfo: PCERT_REVOCATION_CRL_INFO, + pftCacheResync: ::LPFILETIME, + pChainPara: PCERT_REVOCATION_CHAIN_PARA, +}} +pub type PCERT_REVOCATION_PARA = *mut CERT_REVOCATION_PARA; +STRUCT!{struct CERT_REVOCATION_STATUS { + cbSize: ::DWORD, + dwIndex: ::DWORD, + dwError: ::DWORD, + dwReason: ::DWORD, + fHasFreshnessTime: ::BOOL, + dwFreshnessTime: ::DWORD, +}} +pub type PCERT_REVOCATION_STATUS = *mut CERT_REVOCATION_STATUS; +//16990 +pub type HCRYPTASYNC = ::HANDLE; +pub type PHCRYPTASYNC = *mut ::HANDLE; +STRUCT!{struct CRYPT_ENCRYPT_MESSAGE_PARA { + cbSize: ::DWORD, + dwMsgEncodingType: ::DWORD, + hCryptProv: HCRYPTPROV_LEGACY, + ContentEncryptionAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, + pvEncryptionAuxInfo: *mut ::c_void, + dwFlags: ::DWORD, + dwInnerContentType: ::DWORD, +}} +pub type PCRYPT_ENCRYPT_MESSAGE_PARA = *mut CRYPT_DECRYPT_MESSAGE_PARA; +STRUCT!{struct CRYPT_DECRYPT_MESSAGE_PARA { + cbSize: ::DWORD, + dwMsgAndCertEncodingType: ::DWORD, + cCertStore: ::DWORD, + rghCertStore: *mut HCERTSTORE, + dwFlags: ::DWORD, +}} +pub type PCRYPT_DECRYPT_MESSAGE_PARA = *mut CRYPT_DECRYPT_MESSAGE_PARA; +pub type PFN_CRYPT_GET_SIGNER_CERTIFICATE = Option<unsafe extern "system" fn( + pvGetArg: *mut ::c_void, dwCertEncodingType: ::DWORD, pSignerId: PCERT_INFO, + hMsgCertStore: HCERTSTORE, +) -> PCCERT_CONTEXT>; +STRUCT!{nodebug struct CRYPT_VERIFY_MESSAGE_PARA { + cbSize: ::DWORD, + dwMsgAndCertEncodingType: ::DWORD, + hCryptProv: HCRYPTPROV_LEGACY, + pfnGetSignerCertificate: PFN_CRYPT_GET_SIGNER_CERTIFICATE, + pvGetArg: *mut ::c_void, + pStrongSignPara: PCCERT_STRONG_SIGN_PARA, +}} +pub type PCRYPT_VERIFY_MESSAGE_PARA = *mut CRYPT_VERIFY_MESSAGE_PARA; +STRUCT!{struct CRYPT_OID_INFO { + cbSize: ::DWORD, + oszOID: ::LPCSTR, + pwszName: ::LPCWSTR, + dwGroupId: ::DWORD, + dwValue: ::DWORD, + ExtraInfo: CRYPT_DATA_BLOB, + pwszCNGAlgid: ::LPCWSTR, + pwszCNGExtraAlgid: ::LPCWSTR, +}} +UNION!(CRYPT_OID_INFO, dwValue, Algid, Algid_mut, ALG_ID); +UNION!(CRYPT_OID_INFO, dwValue, dwLength, dwLength_mut, ::DWORD); +pub type PCRYPT_OID_INFO = *mut CRYPT_OID_INFO; +pub type PCCRYPT_OID_INFO = *const CRYPT_OID_INFO; +//18004 +pub type PFN_CRYPT_ENUM_KEYID_PROP = Option<unsafe extern "system" fn( + pKeyIdentifier: *const CRYPT_HASH_BLOB, dwFlags: ::DWORD, pvReserved: *mut ::c_void, + pvArg: *mut ::c_void, cProp: ::DWORD, rgdwPropId: *mut ::DWORD, rgpvData: *mut *mut ::c_void, + rgcbData: *mut ::DWORD, +) -> ::BOOL>; +//6379 +pub type PFN_CRYPT_ENUM_OID_FUNC = Option<unsafe extern "system" fn( + dwEncodingType: ::DWORD, pszFuncName: ::LPCSTR, pszOID: ::LPCSTR, cValue: ::DWORD, + rgdwValueType: *const ::DWORD, rgpwszValueName: *const ::LPCWSTR, + rgpbValueData: *const *const ::BYTE, rgcbValueData: *const ::DWORD, pvArg: *mut ::c_void, +) -> ::BOOL>; +//6675 +pub type PFN_CRYPT_ENUM_OID_INFO = Option<unsafe extern "system" fn( + pInfo: PCCRYPT_OID_INFO, pvArg: *mut ::c_void, +) -> ::BOOL>; +//6022 +pub type HCRYPTOIDFUNCSET = *mut ::c_void; +pub type HCRYPTOIDFUNCADDR = *mut ::c_void; +pub type PFN_CRYPT_ASYNC_PARAM_FREE_FUNC = Option<unsafe extern "system" fn( + pszParamOid: ::LPSTR, pvParam: ::LPVOID, +)>; +STRUCT!{struct CRYPT_HASH_MESSAGE_PARA { + cbSize: ::DWORD, + dwMsgEncodingType: ::DWORD, + hCryptProv: HCRYPTPROV_LEGACY, + HashAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, + pvHashAuxInfo: *mut ::c_void, +}} +pub type PCRYPT_HASH_MESSAGE_PARA = *mut CRYPT_HASH_MESSAGE_PARA; +//14750 +pub type HCRYPTDEFAULTCONTEXT = *mut ::c_void; +STRUCT!{struct CRYPT_OID_FUNC_ENTRY { + pszOID: ::LPCSTR, + pvFuncAddr: *mut ::c_void, +}} +pub type PCRYPT_OID_FUNC_ENTRY = *mut CRYPT_OID_FUNC_ENTRY; +STRUCT!{struct CMSG_SIGNER_ENCODE_INFO { + cbSize: ::DWORD, + pCertInfo: PCERT_INFO, + hCryptProv: HCRYPTPROV, + dwKeySpec: ::DWORD, + HashAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, + pvHashAuxInfo: *mut ::c_void, + cAuthAttr: ::DWORD, + rgAuthAttr: PCRYPT_ATTRIBUTE, + cUnauthAttr: ::DWORD, + rgUnauthAttr: PCRYPT_ATTRIBUTE, +}} +UNION!(CMSG_SIGNER_ENCODE_INFO, hCryptProv, hNCryptKey, hNCryptKey_mut, ::NCRYPT_KEY_HANDLE); +pub type PCMSG_SIGNER_ENCODE_INFO = *mut CMSG_SIGNER_ENCODE_INFO; +STRUCT!{struct CMSG_SIGNED_ENCODE_INFO { + cbSize: ::DWORD, + cSigners: ::DWORD, + rgSigners: PCMSG_SIGNER_ENCODE_INFO, + cCertEncoded: ::DWORD, + rgCertEncoded: PCERT_BLOB, + cCrlEncoded: ::DWORD, + rgCrlEncoded: PCRL_BLOB, +}} +pub type PCMSG_SIGNED_ENCODE_INFO = *mut CMSG_SIGNED_ENCODE_INFO; +//7393 +pub type PFN_CMSG_STREAM_OUTPUT = Option<unsafe extern "system" fn( + pvArg: *const ::c_void, pbData: *mut ::BYTE, cbData: ::DWORD, fFinal: ::BOOL, +) -> ::BOOL>; +STRUCT!{nodebug struct CMSG_STREAM_INFO { + cbContent: ::DWORD, + pfnStreamOutput: PFN_CMSG_STREAM_OUTPUT, + pvArg: *mut ::c_void, +}} +pub type PCMSG_STREAM_INFO = *mut CMSG_STREAM_INFO; +STRUCT!{struct CRYPT_TIMESTAMP_ACCURACY { + dwSeconds: ::DWORD, + dwMillis: ::DWORD, + dwMicros: ::DWORD, +}} +pub type PCRYPT_TIMESTAMP_ACCURACY = *mut CRYPT_TIMESTAMP_ACCURACY; +STRUCT!{struct CRYPT_TIMESTAMP_INFO { + dwVersion: ::DWORD, + pszTSAPolicyId: ::LPSTR, + HashAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, + HashedMessage: CRYPT_DER_BLOB, + SerialNumber: CRYPT_INTEGER_BLOB, + ftTime: ::FILETIME, + pvAccuracy: PCRYPT_TIMESTAMP_ACCURACY, + fOrdering: ::BOOL, + Nonce: CRYPT_DER_BLOB, + Tsa: CRYPT_DER_BLOB, + cExtension: ::DWORD, + rgExtension: PCERT_EXTENSION, +}} +pub type PCRYPT_TIMESTAMP_INFO = *mut CRYPT_TIMESTAMP_INFO; +STRUCT!{struct CRYPT_TIMESTAMP_CONTEXT { + cbEncoded: ::DWORD, + pbEncoded: *mut ::BYTE, + pTimeStamp: PCRYPT_TIMESTAMP_INFO, +}} +pub type PCRYPT_TIMESTAMP_CONTEXT = *mut CRYPT_TIMESTAMP_CONTEXT; +STRUCT!{struct CRYPT_TIMESTAMP_PARA { + pszTSAPolicyId: ::LPCSTR, + fRequestCerts: ::BOOL, + Nonce: CRYPT_INTEGER_BLOB, + cExtension: ::DWORD, + rgExtension: PCERT_EXTENSION, +}} +pub type PCRYPT_TIMESTAMP_PARA = *mut CRYPT_TIMESTAMP_PARA; +STRUCT!{struct CRYPT_SIGN_MESSAGE_PARA { + cbSize: ::DWORD, + dwMsgEncodingType: ::DWORD, + pSigningCert: PCCERT_CONTEXT, + HashAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, + pvHashAuxInfo: *mut ::c_void, + cMsgCert: ::DWORD, + rgpMsgCert: *mut PCCERT_CONTEXT, + cMsgCrl: ::DWORD, + rgpMsgCrl: *mut PCCRL_CONTEXT, + cAuthAttr: ::DWORD, + rgAuthAttr: PCRYPT_ATTRIBUTE, + cUnauthAttr: ::DWORD, + rgUnauthAttr: PCRYPT_ATTRIBUTE, + dwFlags: ::DWORD, + dwInnerContentType: ::DWORD, +}} +pub type PCRYPT_SIGN_MESSAGE_PARA = *mut CRYPT_SIGN_MESSAGE_PARA; +STRUCT!{struct CRYPT_KEY_SIGN_MESSAGE_PARA { + cbSize: ::DWORD, + dwMsgAndCertEncodingType: ::DWORD, + hCryptProv: HCRYPTPROV, + dwKeySpec: ::DWORD, + HashAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, + pvHashAuxInfo: *mut ::c_void, + PubKeyAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, +}} +UNION!(CRYPT_KEY_SIGN_MESSAGE_PARA, hCryptProv, hNCryptKey, hNCryptKey_mut, ::NCRYPT_KEY_HANDLE); +pub type PCRYPT_KEY_SIGN_MESSAGE_PARA = *mut CRYPT_KEY_SIGN_MESSAGE_PARA; +STRUCT!{struct CRYPT_KEY_VERIFY_MESSAGE_PARA { + cbSize: ::DWORD, + dwMsgEncodingType: ::DWORD, + hCryptProv: HCRYPTPROV_LEGACY, +}} +pub type PCRYPT_KEY_VERIFY_MESSAGE_PARA = *mut CRYPT_KEY_VERIFY_MESSAGE_PARA; diff --git a/deps/winapi-0.2.5/src/windef.rs b/deps/winapi-0.2.6/src/windef.rs similarity index 100% rename from deps/winapi-0.2.5/src/windef.rs rename to deps/winapi-0.2.6/src/windef.rs diff --git a/deps/winapi-0.2.5/src/windowscodecs.rs b/deps/winapi-0.2.6/src/windowscodecs.rs similarity index 100% rename from deps/winapi-0.2.5/src/windowscodecs.rs rename to deps/winapi-0.2.6/src/windowscodecs.rs diff --git a/deps/winapi-0.2.5/src/windowsx.rs b/deps/winapi-0.2.6/src/windowsx.rs similarity index 100% rename from deps/winapi-0.2.5/src/windowsx.rs rename to deps/winapi-0.2.6/src/windowsx.rs diff --git a/deps/winapi-0.2.5/src/winerror.rs b/deps/winapi-0.2.6/src/winerror.rs similarity index 100% rename from deps/winapi-0.2.5/src/winerror.rs rename to deps/winapi-0.2.6/src/winerror.rs diff --git a/deps/winapi-0.2.5/src/winevt.rs b/deps/winapi-0.2.6/src/winevt.rs similarity index 100% rename from deps/winapi-0.2.5/src/winevt.rs rename to deps/winapi-0.2.6/src/winevt.rs diff --git a/deps/winapi-0.2.6/src/wingdi.rs b/deps/winapi-0.2.6/src/wingdi.rs new file mode 100644 index 000000000..edc5850ed --- /dev/null +++ b/deps/winapi-0.2.6/src/wingdi.rs @@ -0,0 +1,1238 @@ +// Copyright © 2015, Peter Atashian +// Licensed under the MIT License <LICENSE.md> +//! GDI procedure declarations, constant definitions and macros +pub const DISPLAY_DEVICE_ATTACHED_TO_DESKTOP: ::DWORD = 0x00000001; +pub const DISPLAY_DEVICE_MULTI_DRIVER: ::DWORD = 0x00000002; +pub const DISPLAY_DEVICE_PRIMARY_DEVICE: ::DWORD = 0x00000004; +pub const DISPLAY_DEVICE_MIRRORING_DRIVER: ::DWORD = 0x00000008; +pub const DISPLAY_DEVICE_VGA_COMPATIBLE: ::DWORD = 0x00000010; +pub const DISPLAY_DEVICE_REMOVABLE: ::DWORD = 0x00000020; +pub const DISPLAY_DEVICE_ACC_DRIVER: ::DWORD = 0x00000040; +pub const DISPLAY_DEVICE_MODESPRUNED: ::DWORD = 0x08000000; +pub const DISPLAY_DEVICE_REMOTE: ::DWORD = 0x04000000; +pub const DISPLAY_DEVICE_DISCONNECT: ::DWORD = 0x02000000; +pub const DISPLAY_DEVICE_TS_COMPATIBLE: ::DWORD = 0x00200000; +pub const DISPLAY_DEVICE_UNSAFE_MODES_ON: ::DWORD = 0x00080000; +pub const DISPLAY_DEVICE_ACTIVE: ::DWORD = 0x00000001; +pub const DISPLAY_DEVICE_ATTACHED: ::DWORD = 0x00000002; +pub const DM_ORIENTATION: ::DWORD = 0x00000001; +pub const DM_PAPERSIZE: ::DWORD = 0x00000002; +pub const DM_PAPERLENGTH: ::DWORD = 0x00000004; +pub const DM_PAPERWIDTH: ::DWORD = 0x00000008; +pub const DM_SCALE: ::DWORD = 0x00000010; +pub const DM_POSITION: ::DWORD = 0x00000020; +pub const DM_NUP: ::DWORD = 0x00000040; +pub const DM_DISPLAYORIENTATION: ::DWORD = 0x00000080; +pub const DM_COPIES: ::DWORD = 0x00000100; +pub const DM_DEFAULTSOURCE: ::DWORD = 0x00000200; +pub const DM_PRINTQUALITY: ::DWORD = 0x00000400; +pub const DM_COLOR: ::DWORD = 0x00000800; +pub const DM_DUPLEX: ::DWORD = 0x00001000; +pub const DM_YRESOLUTION: ::DWORD = 0x00002000; +pub const DM_TTOPTION: ::DWORD = 0x00004000; +pub const DM_COLLATE: ::DWORD = 0x00008000; +pub const DM_FORMNAME: ::DWORD = 0x00010000; +pub const DM_LOGPIXELS: ::DWORD = 0x00020000; +pub const DM_BITSPERPEL: ::DWORD = 0x00040000; +pub const DM_PELSWIDTH: ::DWORD = 0x00080000; +pub const DM_PELSHEIGHT: ::DWORD = 0x00100000; +pub const DM_DISPLAYFLAGS: ::DWORD = 0x00200000; +pub const DM_DISPLAYFREQUENCY: ::DWORD = 0x00400000; +pub const DM_ICMMETHOD: ::DWORD = 0x00800000; +pub const DM_ICMINTENT: ::DWORD = 0x01000000; +pub const DM_MEDIATYPE: ::DWORD = 0x02000000; +pub const DM_DITHERTYPE: ::DWORD = 0x04000000; +pub const DM_PANNINGWIDTH: ::DWORD = 0x08000000; +pub const DM_PANNINGHEIGHT: ::DWORD = 0x10000000; +pub const DM_DISPLAYFIXEDOUTPUT: ::DWORD = 0x20000000; +pub const PFD_TYPE_RGBA: ::BYTE = 0; +pub const PFD_TYPE_COLORINDEX: ::BYTE = 1; +pub const PFD_MAIN_PLANE: ::BYTE = 0; +pub const PFD_OVERLAY_PLANE: ::BYTE = 1; +pub const PFD_UNDERLAY_PLANE: ::BYTE = 0xFF; +pub const PFD_DOUBLEBUFFER: ::DWORD = 0x00000001; +pub const PFD_STEREO: ::DWORD = 0x00000002; +pub const PFD_DRAW_TO_WINDOW: ::DWORD = 0x00000004; +pub const PFD_DRAW_TO_BITMAP: ::DWORD = 0x00000008; +pub const PFD_SUPPORT_GDI: ::DWORD = 0x00000010; +pub const PFD_SUPPORT_OPENGL: ::DWORD = 0x00000020; +pub const PFD_GENERIC_FORMAT: ::DWORD = 0x00000040; +pub const PFD_NEED_PALETTE: ::DWORD = 0x00000080; +pub const PFD_NEED_SYSTEM_PALETTE: ::DWORD = 0x00000100; +pub const PFD_SWAP_EXCHANGE: ::DWORD = 0x00000200; +pub const PFD_SWAP_COPY: ::DWORD = 0x00000400; +pub const PFD_SWAP_LAYER_BUFFERS: ::DWORD = 0x00000800; +pub const PFD_GENERIC_ACCELERATED: ::DWORD = 0x00001000; +pub const PFD_SUPPORT_DIRECTDRAW: ::DWORD = 0x00002000; +pub const PFD_DIRECT3D_ACCELERATED: ::DWORD = 0x00004000; +pub const PFD_SUPPORT_COMPOSITION: ::DWORD = 0x00008000; +pub const PFD_DEPTH_DONTCARE: ::DWORD = 0x20000000; +pub const PFD_DOUBLEBUFFER_DONTCARE: ::DWORD = 0x40000000; +pub const PFD_STEREO_DONTCARE: ::DWORD = 0x80000000; +pub const CCHFORMNAME: usize = 32; +STRUCT!{struct DEVMODEA { + dmDeviceName: [::CHAR; ::CCHDEVICENAME], + dmSpecVersion: ::WORD, + dmDriverVersion: ::WORD, + dmSize: ::WORD, + dmDriverExtra: ::WORD, + dmFields: ::DWORD, + union1: [u8; 16], + dmColor: ::c_short, + dmDuplex: ::c_short, + dmYResolution: ::c_short, + dmTTOption: ::c_short, + dmCollate: ::c_short, + dmFormName: [::CHAR; CCHFORMNAME], + dmLogPixels: ::WORD, + dmBitsPerPel: ::DWORD, + dmPelsWidth: ::DWORD, + dmPelsHeight: ::DWORD, + dmDisplayFlags: ::DWORD, + dmDisplayFrequency: ::DWORD, + dmICMMethod: ::DWORD, + dmICMIntent: ::DWORD, + dmMediaType: ::DWORD, + dmDitherType: ::DWORD, + dmReserved1: ::DWORD, + dmReserved2: ::DWORD, + dmPanningWidth: ::DWORD, + dmPanningHeight: ::DWORD, +}} +pub type PDEVMODEA = *mut DEVMODEA; +pub type NPDEVMODEA = *mut DEVMODEA; +pub type LPDEVMODEA = *mut DEVMODEA; +STRUCT!{struct DEVMODEW { + dmDeviceName: [::WCHAR; ::CCHDEVICENAME], + dmSpecVersion: ::WORD, + dmDriverVersion: ::WORD, + dmSize: ::WORD, + dmDriverExtra: ::WORD, + dmFields: ::DWORD, + union1: [u8; 16], + dmColor: ::c_short, + dmDuplex: ::c_short, + dmYResolution: ::c_short, + dmTTOption: ::c_short, + dmCollate: ::c_short, + dmFormName: [::WCHAR; CCHFORMNAME], + dmLogPixels: ::WORD, + dmBitsPerPel: ::DWORD, + dmPelsWidth: ::DWORD, + dmPelsHeight: ::DWORD, + dmDisplayFlags: ::DWORD, + dmDisplayFrequency: ::DWORD, + dmICMMethod: ::DWORD, + dmICMIntent: ::DWORD, + dmMediaType: ::DWORD, + dmDitherType: ::DWORD, + dmReserved1: ::DWORD, + dmReserved2: ::DWORD, + dmPanningWidth: ::DWORD, + dmPanningHeight: ::DWORD, +}} +pub type PDEVMODEW = *mut DEVMODEW; +pub type NPDEVMODEW = *mut DEVMODEW; +pub type LPDEVMODEW = *mut DEVMODEW; +STRUCT!{nodebug struct DISPLAY_DEVICEW { + cb: ::DWORD, + DeviceName: [::WCHAR; 32], + DeviceString: [::WCHAR; 128], + StateFlags: ::DWORD, + DeviceID: [::WCHAR; 128], + DeviceKey: [::WCHAR; 128], +}} +pub type PDISPLAY_DEVICEW = *mut DISPLAY_DEVICEW; +pub type LPDISPLAY_DEVICEW = *mut DISPLAY_DEVICEW; +STRUCT!{nodebug struct DISPLAY_DEVICEA { + cb: ::DWORD, + DeviceName: [::CHAR; 32], + DeviceString: [::CHAR; 128], + StateFlags: ::DWORD, + DeviceID: [::CHAR; 128], + DeviceKey: [::CHAR; 128], +}} +pub type PDISPLAY_DEVICEA = *mut DISPLAY_DEVICEA; +pub type LPDISPLAY_DEVICEA = *mut DISPLAY_DEVICEA; +STRUCT!{struct PIXELFORMATDESCRIPTOR { + nSize: ::WORD, + nVersion: ::WORD, + dwFlags: ::DWORD, + iPixelType: ::BYTE, + cColorBits: ::BYTE, + cRedBits: ::BYTE, + cRedShift: ::BYTE, + cGreenBits: ::BYTE, + cGreenShift: ::BYTE, + cBlueBits: ::BYTE, + cBlueShift: ::BYTE, + cAlphaBits: ::BYTE, + cAlphaShift: ::BYTE, + cAccumBits: ::BYTE, + cAccumRedBits: ::BYTE, + cAccumGreenBits: ::BYTE, + cAccumBlueBits: ::BYTE, + cAccumAlphaBits: ::BYTE, + cDepthBits: ::BYTE, + cStencilBits: ::BYTE, + cAuxBuffers: ::BYTE, + iLayerType: ::BYTE, + bReserved: ::BYTE, + dwLayerMask: ::DWORD, + dwVisibleMask: ::DWORD, + dwDamageMask: ::DWORD, +}} +pub type PPIXELFORMATDESCRIPTOR = *mut PIXELFORMATDESCRIPTOR; +pub type LPPIXELFORMATDESCRIPTOR = *mut PIXELFORMATDESCRIPTOR; +pub const R2_BLACK: ::c_int = 1; +pub const R2_NOTMERGEPEN: ::c_int = 2; +pub const R2_MASKNOTPEN: ::c_int = 3; +pub const R2_NOTCOPYPEN: ::c_int = 4; +pub const R2_MASKPENNOT: ::c_int = 5; +pub const R2_NOT: ::c_int = 6; +pub const R2_XORPEN: ::c_int = 7; +pub const R2_NOTMASKPEN: ::c_int = 8; +pub const R2_MASKPEN: ::c_int = 9; +pub const R2_NOTXORPEN: ::c_int = 10; +pub const R2_NOP: ::c_int = 11; +pub const R2_MERGENOTPEN: ::c_int = 12; +pub const R2_COPYPEN: ::c_int = 13; +pub const R2_MERGEPENNOT: ::c_int = 14; +pub const R2_MERGEPEN: ::c_int = 15; +pub const R2_WHITE: ::c_int = 16; +pub const R2_LAST: ::c_int = 16; +//83 +pub const SRCCOPY: ::DWORD = 0x00CC0020; +pub const SRCPAINT: ::DWORD = 0x00EE0086; +pub const SRCAND: ::DWORD = 0x008800C6; +pub const SRCINVERT: ::DWORD = 0x00660046; +pub const SRCERASE: ::DWORD = 0x00440328; +pub const NOTSRCCOPY: ::DWORD = 0x00330008; +pub const NOTSRCERASE: ::DWORD = 0x001100A6; +pub const MERGECOPY: ::DWORD = 0x00C000CA; +pub const MERGEPAINT: ::DWORD = 0x00BB0226; +pub const PATCOPY: ::DWORD = 0x00F00021; +pub const PATPAINT: ::DWORD = 0x00FB0A09; +pub const PATINVERT: ::DWORD = 0x005A0049; +pub const DSTINVERT: ::DWORD = 0x00550009; +pub const BLACKNESS: ::DWORD = 0x00000042; +pub const WHITENESS: ::DWORD = 0x00FF0062; +//121 +// fnCombineMode values for CombineRgn +pub const RGN_AND: ::c_int = 1; +pub const RGN_OR: ::c_int = 2; +pub const RGN_XOR: ::c_int = 3; +pub const RGN_DIFF: ::c_int = 4; +pub const RGN_COPY: ::c_int = 5; +pub const RGN_MIN: ::c_int = RGN_AND; +pub const RGN_MAX: ::c_int = RGN_COPY; +//572 (Win 7 SDK) +STRUCT!{struct BITMAP { + bmType: ::LONG, + bmWidth: ::LONG, + bmHeight: ::LONG, + bmWidthBytes: ::LONG, + bmPlanes: ::WORD, + bmBitsPixel: ::WORD, + bmBits: ::LPVOID, +}} +pub type PBITMAP = *mut BITMAP; +pub type NPBITMAP = *mut BITMAP; +pub type LPBITMAP = *mut BITMAP; +STRUCT!{struct RGBQUAD { + rgbBlue: ::BYTE, + rgbGreen: ::BYTE, + rgbRed: ::BYTE, + rgbReserved: ::BYTE, +}} +pub type LPRGBQUAD = *mut RGBQUAD; +pub const CS_ENABLE: ::DWORD = 0x00000001; +pub const CS_DISABLE: ::DWORD = 0x00000002; +pub const CS_DELETE_TRANSFORM: ::DWORD = 0x00000003; +pub const LCS_SIGNATURE: ::DWORD = 0x5053_4F43; // 'PSOC' +pub const LCS_sRGB: LCSCSTYPE = 0x7352_4742; // 'sRGB' +pub const LCS_WINDOWS_COLOR_SPACE: LCSCSTYPE = 0x5769_6E20; // 'Win ' +pub type LCSCSTYPE = ::LONG; +pub const LCS_CALIBRATED_RGB: LCSCSTYPE = 0x00000000; +pub type LCSGAMUTMATCH = ::LONG; +pub const LCS_GM_BUSINESS: LCSGAMUTMATCH = 0x00000001; +pub const LCS_GM_GRAPHICS: LCSGAMUTMATCH = 0x00000002; +pub const LCS_GM_IMAGES: LCSGAMUTMATCH = 0x00000004; +pub const LCS_GM_ABS_COLORIMETRIC: LCSGAMUTMATCH = 0x00000008; +pub const CM_OUT_OF_GAMUT: ::BYTE = 255; +pub const CM_IN_GAMUT: ::BYTE = 0; +pub const ICM_ADDPROFILE: ::UINT = 1; +pub const ICM_DELETEPROFILE: ::UINT = 2; +pub const ICM_QUERYPROFILE: ::UINT = 3; +pub const ICM_SETDEFAULTPROFILE: ::UINT = 4; +pub const ICM_REGISTERICMATCHER: ::UINT = 5; +pub const ICM_UNREGISTERICMATCHER: ::UINT = 6; +pub const ICM_QUERYMATCH: ::UINT = 7; +pub type FXPT16DOT16 = ::c_long; +pub type LPFXPT16DOT16 = *mut ::c_long; +pub type FXPT2DOT30 = ::c_long; +pub type LPFXPT2DOT30 = *mut ::c_long; +STRUCT!{struct CIEXYZ { + ciexyzX: FXPT2DOT30, + ciexyzY: FXPT2DOT30, + ciexyzZ: FXPT2DOT30, +}} +pub type LPCIEXYZ = *mut CIEXYZ; +STRUCT!{struct CIEXYZTRIPLE { + ciexyzRed: CIEXYZ, + ciexyzGreen: CIEXYZ, + ciexyzBlue: CIEXYZ, +}} +pub type LPCIEXYZTRIPLE = *mut CIEXYZTRIPLE; +//716 (Win 7 SDK) +STRUCT!{struct BITMAPINFOHEADER { + biSize: ::DWORD, + biWidth: ::LONG, + biHeight: ::LONG, + biPlanes: ::WORD, + biBitCount: ::WORD, + biCompression: ::DWORD, + biSizeImage: ::DWORD, + biXPelsPerMeter: ::LONG, + biYPelsPerMeter: ::LONG, + biClrUsed: ::DWORD, + biClrImportant: ::DWORD, +}} +pub type LPBITMAPINFOHEADER = *mut BITMAPINFOHEADER; +pub type PBITMAPINFOHEADER = *mut BITMAPINFOHEADER; +STRUCT!{struct BITMAPV5HEADER { + bV5Size: ::DWORD, + bV5Width: ::LONG, + bV5Height: ::LONG, + bV5Planes: ::WORD, + bV5BitCount: ::WORD, + bV5Compression: ::DWORD, + bV5SizeImage: ::DWORD, + bV5XPelsPerMeter: ::LONG, + bV5YPelsPerMeter: ::LONG, + bV5ClrUsed: ::DWORD, + bV5ClrImportant: ::DWORD, + bV5RedMask: ::DWORD, + bV5GreenMask: ::DWORD, + bV5BlueMask: ::DWORD, + bV5AlphaMask: ::DWORD, + bV5CSType: ::LONG, // LONG to match LOGCOLORSPACE + bV5Endpoints: CIEXYZTRIPLE, + bV5GammaRed: ::DWORD, + bV5GammaGreen: ::DWORD, + bV5GammaBlue: ::DWORD, + bV5Intent: ::LONG, // LONG to match LOGCOLORSPACE + bV5ProfileData: ::DWORD, + bV5ProfileSize: ::DWORD, + bV5Reserved: ::DWORD, +}} +pub type LPBITMAPV5HEADER = *mut BITMAPV5HEADER; +pub type PBITMAPV5HEADER = *mut BITMAPV5HEADER; +pub const PROFILE_LINKED: ::LONG = 0x4C49_4E4B; // 'LINK' +pub const PROFILE_EMBEDDED: ::LONG = 0x4D42_4544; // 'MBED' +pub const BI_RGB: ::DWORD = 0; +pub const BI_RLE8: ::DWORD = 1; +pub const BI_RLE4: ::DWORD = 2; +pub const BI_BITFIELDS: ::DWORD = 3; +pub const BI_JPEG: ::DWORD = 4; +pub const BI_PNG: ::DWORD = 5; +STRUCT!{struct BITMAPINFO { + bmiHeader: BITMAPINFOHEADER, + bmiColors: [RGBQUAD; 0], +}} +pub type LPBITMAPINFO = *mut BITMAPINFO; +pub type PBITMAPINFO = *mut BITMAPINFO; +//1438 +pub const LF_FACESIZE: usize = 32; +STRUCT!{nodebug struct LOGFONTA { + lfHeight: ::LONG, + lfWidth: ::LONG, + lfEscapement: ::LONG, + lfOrientation: ::LONG, + lfWeight: ::LONG, + lfItalic: ::BYTE, + lfUnderline: ::BYTE, + lfStrikeOut: ::BYTE, + lfCharSet: ::BYTE, + lfOutPrecision: ::BYTE, + lfClipPrecision: ::BYTE, + lfQuality: ::BYTE, + lfPitchAndFamily: ::BYTE, + lfFaceName: [::CHAR; LF_FACESIZE], +}} +pub type LPLOGFONTA = *mut LOGFONTA; +STRUCT!{nodebug struct LOGFONTW { + lfHeight: ::LONG, + lfWidth: ::LONG, + lfEscapement: ::LONG, + lfOrientation: ::LONG, + lfWeight: ::LONG, + lfItalic: ::BYTE, + lfUnderline: ::BYTE, + lfStrikeOut: ::BYTE, + lfCharSet: ::BYTE, + lfOutPrecision: ::BYTE, + lfClipPrecision: ::BYTE, + lfQuality: ::BYTE, + lfPitchAndFamily: ::BYTE, + lfFaceName: [::WCHAR; LF_FACESIZE], +}} +pub type LPLOGFONTW = *mut LOGFONTW; +//1595 +#[inline] +pub fn RGB (r: ::BYTE, g: ::BYTE, b: ::BYTE) -> ::COLORREF { + r as ::COLORREF | ((g as ::COLORREF) << 8) | ((b as ::COLORREF) << 16) +} +// +pub const DRIVERVERSION: ::c_int = 0; +pub const TECHNOLOGY: ::c_int = 2; +pub const HORZSIZE: ::c_int = 4; +pub const VERTSIZE: ::c_int = 6; +pub const HORZRES: ::c_int = 8; +pub const VERTRES: ::c_int = 10; +pub const BITSPIXEL: ::c_int = 12; +pub const PLANES: ::c_int = 14; +pub const NUMBRUSHES: ::c_int = 16; +pub const NUMPENS: ::c_int = 18; +pub const NUMMARKERS: ::c_int = 20; +pub const NUMFONTS: ::c_int = 22; +pub const NUMCOLORS: ::c_int = 24; +pub const PDEVICESIZE: ::c_int = 26; +pub const CURVECAPS: ::c_int = 28; +pub const LINECAPS: ::c_int = 30; +pub const POLYGONALCAPS: ::c_int = 32; +pub const TEXTCAPS: ::c_int = 34; +pub const CLIPCAPS: ::c_int = 36; +pub const RASTERCAPS: ::c_int = 38; +pub const ASPECTX: ::c_int = 40; +pub const ASPECTY: ::c_int = 42; +pub const ASPECTXY: ::c_int = 44; +pub const LOGPIXELSX: ::c_int = 88; +pub const LOGPIXELSY: ::c_int = 90; +pub const SIZEPALETTE: ::c_int = 104; +pub const NUMRESERVED: ::c_int = 106; +pub const COLORRES: ::c_int = 108; +pub const PHYSICALWIDTH: ::c_int = 110; +pub const PHYSICALHEIGHT: ::c_int = 111; +pub const PHYSICALOFFSETX: ::c_int = 112; +pub const PHYSICALOFFSETY: ::c_int = 113; +pub const SCALINGFACTORX: ::c_int = 114; +pub const SCALINGFACTORY: ::c_int = 115; +pub const VREFRESH: ::c_int = 116; +pub const DESKTOPVERTRES: ::c_int = 117; +pub const DESKTOPHORZRES: ::c_int = 118; +pub const BLTALIGNMENT: ::c_int = 119; +pub const SHADEBLENDCAPS: ::c_int = 120; +pub const COLORMGMTCAPS: ::c_int = 121; +//1906 +pub const DIB_RGB_COLORS: ::UINT = 0; +pub const DIB_PAL_COLORS: ::UINT = 1; +pub const CBM_INIT: ::DWORD = 4; +STRUCT!{struct RGNDATAHEADER { + dwSize: ::DWORD, + iType: ::DWORD, + nCount: ::DWORD, + nRgnSize: ::DWORD, + rcBound: ::RECT, +}} +pub type PRGNDATAHEADER = *mut RGNDATAHEADER; +STRUCT!{nodebug struct RGNDATA { + rdh: RGNDATAHEADER, + Buffer: [::c_char; 0], +}} +pub type PRGNDATA = *mut RGNDATA; +pub type NPRGNDATA = *mut RGNDATA; +pub type LPRGNDATA = *mut RGNDATA; +STRUCT!{struct PALETTEENTRY { + peRed: ::BYTE, + peGreen: ::BYTE, + peBlue: ::BYTE, + peFlags: ::BYTE, +}} +pub type PPALETTEENTRY = *mut PALETTEENTRY; +pub type LPPALETTEENTRY = *mut PALETTEENTRY; +//2824 (Win 7 SDK) +STRUCT!{struct ABC { + abcA: ::c_int, + abcB: ::UINT, + abcC: ::c_int, +}} +pub type PABC = *mut ABC; +pub type NPABC = *mut ABC; +pub type LPABC = *mut ABC; +STRUCT!{struct ABCFLOAT { + abcfA: ::FLOAT, + abcfB: ::FLOAT, + abcfC: ::FLOAT, +}} +pub type PABCFLOAT = *mut ABCFLOAT; +pub type NPABCFLOAT = *mut ABCFLOAT; +pub type LPABCFLOAT = *mut ABCFLOAT; +//3581 +pub type LINEDDAPROC = Option<unsafe extern "system" fn(::c_int, ::c_int, ::LPARAM)>; +STRUCT!{struct XFORM { + eM11: ::FLOAT, + eM12: ::FLOAT, + eM21: ::FLOAT, + eM22: ::FLOAT, + eDx: ::FLOAT, + eDy: ::FLOAT, +}} +pub type PXFORM = *mut XFORM; +pub type LPXFORM = *mut XFORM; +STRUCT!{struct LOGBRUSH { + lbStyle: ::UINT, + lbColor: ::COLORREF, + lbHatch: ::ULONG_PTR, +}} +pub type PLOGBRUSH = *mut LOGBRUSH; +STRUCT!{nodebug struct LOGCOLORSPACEA { + lcsSignature: ::DWORD, + lcsVersion: ::DWORD, + lcsSize: ::DWORD, + lcsCSType: LCSCSTYPE, + lcsIntent: LCSGAMUTMATCH, + lcsEndpoints: CIEXYZTRIPLE, + lcsGammaRed: ::DWORD, + lcsGammaGreen: ::DWORD, + lcsGammaBlue: ::DWORD, + lcsFilename: [::CHAR; ::MAX_PATH], +}} +pub type LPLOGCOLORSPACEA = *mut LOGCOLORSPACEA; +STRUCT!{nodebug struct LOGCOLORSPACEW { + lcsSignature: ::DWORD, + lcsVersion: ::DWORD, + lcsSize: ::DWORD, + lcsCSType: LCSCSTYPE, + lcsIntent: LCSGAMUTMATCH, + lcsEndpoints: CIEXYZTRIPLE, + lcsGammaRed: ::DWORD, + lcsGammaGreen: ::DWORD, + lcsGammaBlue: ::DWORD, + lcsFilename: [::WCHAR; ::MAX_PATH], +}} +pub type LPLOGCOLORSPACEW = *mut LOGCOLORSPACEW; +pub const LF_FULLFACESIZE: usize = 64; +STRUCT!{nodebug struct ENUMLOGFONTEXA { + elfLogFont: LOGFONTA, + elfFullName: [::BYTE; LF_FULLFACESIZE], + elfStyle: [::BYTE; LF_FACESIZE], + elfScript: [::BYTE; LF_FACESIZE], +}} +pub type LPENUMLOGFONTEXA = *mut ENUMLOGFONTEXA; +STRUCT!{nodebug struct ENUMLOGFONTEXW { + elfLogFont: LOGFONTW, + elfFullName: [::WCHAR; LF_FULLFACESIZE], + elfStyle: [::WCHAR; LF_FACESIZE], + elfScript: [::WCHAR; LF_FACESIZE], +}} +pub type LPENUMLOGFONTEXW = *mut ENUMLOGFONTEXW; +pub const MM_MAX_NUMAXES: usize = 16; +STRUCT!{struct DESIGNVECTOR { + dvReserved: ::DWORD, + dvNumAxes: ::DWORD, + dvValues: [::LONG; MM_MAX_NUMAXES], +}} +pub type PDESIGNVECTOR = *mut DESIGNVECTOR; +pub type LPDESIGNVECTOR = *mut DESIGNVECTOR; +STRUCT!{nodebug struct ENUMLOGFONTEXDVA { + elfEnumLogfontEx: ENUMLOGFONTEXA, + elfDesignVector: DESIGNVECTOR, +}} +pub type PENUMLOGFONTEXDVA = *mut ENUMLOGFONTEXDVA; +pub type LPENUMLOGFONTEXDVA = *mut ENUMLOGFONTEXDVA; +STRUCT!{nodebug struct ENUMLOGFONTEXDVW { + elfEnumLogfontEx: ENUMLOGFONTEXW, + elfDesignVector: DESIGNVECTOR, +}} +pub type PENUMLOGFONTEXDVW = *mut ENUMLOGFONTEXDVW; +pub type LPENUMLOGFONTEXDVW = *mut ENUMLOGFONTEXDVW; +STRUCT!{struct LOGPALETTE { + palVersion: ::WORD, + palNumEntries: ::WORD, + palPalEntry: [PALETTEENTRY; 1], +}} +pub type PLOGPALETTE = *mut LOGPALETTE; +pub type NPLOGPALETTE = *mut LOGPALETTE; +pub type LPLOGPALETTE = *mut LOGPALETTE; +STRUCT!{struct LOGPEN { + lopnStyle: ::UINT, + lopnWidth: ::POINT, + lopnColor: ::COLORREF, +}} +pub type PLOGPEN = *mut LOGPEN; +pub type NPLOGPEN = *mut LOGPEN; +pub type LPLOGPEN = *mut LOGPEN; +STRUCT!{struct BLENDFUNCTION { + BlendOp: ::BYTE, + BlendFlags: ::BYTE, + SourceConstantAlpha: ::BYTE, + AlphaFormat: ::BYTE, +}} +pub type PBLENDFUNCTION = *mut BLENDFUNCTION; +pub const TMPF_FIXED_PITCH: ::BYTE = 0x01; +pub const TMPF_VECTOR: ::BYTE = 0x02; +pub const TMPF_DEVICE: ::BYTE = 0x08; +pub const TMPF_TRUETYPE: ::BYTE = 0x04; +STRUCT!{struct TEXTMETRICA { + tmHeight: ::LONG, + tmAscent: ::LONG, + tmDescent: ::LONG, + tmInternalLeading: ::LONG, + tmExternalLeading: ::LONG, + tmAveCharWidth: ::LONG, + tmMaxCharWidth: ::LONG, + tmWeight: ::LONG, + tmOverhang: ::LONG, + tmDigitizedAspectX: ::LONG, + tmDigitizedAspectY: ::LONG, + tmFirstChar: ::BYTE, + tmLastChar: ::BYTE, + tmDefaultChar: ::BYTE, + tmBreakChar: ::BYTE, + tmItalic: ::BYTE, + tmUnderlined: ::BYTE, + tmStruckOut: ::BYTE, + tmPitchAndFamily: ::BYTE, + tmCharSet: ::BYTE, +}} +pub type PTEXTMETRICA = *mut TEXTMETRICA; +pub type NPTEXTMETRICA = *mut TEXTMETRICA; +pub type LPTEXTMETRICA = *mut TEXTMETRICA; +STRUCT!{struct TEXTMETRICW { + tmHeight: ::LONG, + tmAscent: ::LONG, + tmDescent: ::LONG, + tmInternalLeading: ::LONG, + tmExternalLeading: ::LONG, + tmAveCharWidth: ::LONG, + tmMaxCharWidth: ::LONG, + tmWeight: ::LONG, + tmOverhang: ::LONG, + tmDigitizedAspectX: ::LONG, + tmDigitizedAspectY: ::LONG, + tmFirstChar: ::WCHAR, + tmLastChar: ::WCHAR, + tmDefaultChar: ::WCHAR, + tmBreakChar: ::WCHAR, + tmItalic: ::BYTE, + tmUnderlined: ::BYTE, + tmStruckOut: ::BYTE, + tmPitchAndFamily: ::BYTE, + tmCharSet: ::BYTE, +}} +pub type PTEXTMETRICW = *mut TEXTMETRICW; +pub type NPTEXTMETRICW = *mut TEXTMETRICW; +pub type LPTEXTMETRICW = *mut TEXTMETRICW; +pub const TA_NOUPDATECP: ::UINT = 0; +pub const TA_UPDATECP: ::UINT = 1; +pub const TA_LEFT: ::UINT = 0; +pub const TA_RIGHT: ::UINT = 2; +pub const TA_CENTER: ::UINT = 6; +pub const TA_TOP: ::UINT = 0; +pub const TA_BOTTOM: ::UINT = 8; +pub const TA_BASELINE: ::UINT = 24; +pub const TA_RTLREADING: ::UINT = 256; +pub const TA_MASK: ::UINT = TA_BASELINE + TA_CENTER + TA_UPDATECP + TA_RTLREADING; +pub const WHITE_BRUSH: ::c_int = 0; +pub const LTGRAY_BRUSH: ::c_int = 1; +pub const GRAY_BRUSH: ::c_int = 2; +pub const DKGRAY_BRUSH: ::c_int = 3; +pub const BLACK_BRUSH: ::c_int = 4; +pub const NULL_BRUSH: ::c_int = 5; +pub const HOLLOW_BRUSH: ::c_int = 5; +pub const WHITE_PEN: ::c_int = 6; +pub const BLACK_PEN: ::c_int = 7; +pub const NULL_PEN: ::c_int = 8; +pub const OEM_FIXED_FONT: ::c_int = 10; +pub const ANSI_FIXED_FONT: ::c_int = 11; +pub const ANSI_VAR_FONT: ::c_int = 12; +pub const SYSTEM_FONT: ::c_int = 13; +pub const DEVICE_DEFAULT_FONT: ::c_int = 14; +pub const DEFAULT_PALETTE: ::c_int = 15; +pub const SYSTEM_FIXED_FONT: ::c_int = 16; +pub const DEFAULT_GUI_FONT: ::c_int = 17; +pub const DC_BRUSH: ::c_int = 18; +pub const DC_PEN: ::c_int = 19; +pub const STOCK_LAST: ::c_int = 19;pub const PS_SOLID: ::c_int = 0; +pub const PS_DASH: ::c_int = 1; +pub const PS_DOT: ::c_int = 2; +pub const PS_DASHDOT: ::c_int = 3; +pub const PS_DASHDOTDOT: ::c_int = 4; +pub const PS_NULL: ::c_int = 5; +pub const PS_INSIDEFRAME: ::c_int = 6; +pub const PS_USERSTYLE: ::c_int = 7; +pub const PS_ALTERNATE: ::c_int = 8; +pub const TRANSPARENT: ::c_int = 1; +pub const OPAQUE: ::c_int = 2; +pub const BKMODE_LAST: ::c_int = 2; +pub const MM_TEXT: ::c_int = 1; +pub const MM_LOMETRIC: ::c_int = 2; +pub const MM_HIMETRIC: ::c_int = 3; +pub const MM_LOENGLISH: ::c_int = 4; +pub const MM_HIENGLISH: ::c_int = 5; +pub const MM_TWIPS: ::c_int = 6; +pub const MM_ISOTROPIC: ::c_int = 7; +pub const MM_ANISOTROPIC: ::c_int = 8; +pub const ALTERNATE: ::c_int = 1; +pub const WINDING: ::c_int = 2; +pub const POLYFILL_LAST: ::c_int = 2; +pub const OUT_DEFAULT_PRECIS: ::DWORD = 0; +pub const OUT_STRING_PRECIS: ::DWORD = 1; +pub const OUT_CHARACTER_PRECIS: ::DWORD = 2; +pub const OUT_STROKE_PRECIS: ::DWORD = 3; +pub const OUT_TT_PRECIS: ::DWORD = 4; +pub const OUT_DEVICE_PRECIS: ::DWORD = 5; +pub const OUT_RASTER_PRECIS: ::DWORD = 6; +pub const OUT_TT_ONLY_PRECIS: ::DWORD = 7; +pub const OUT_OUTLINE_PRECIS: ::DWORD = 8; +pub const OUT_SCREEN_OUTLINE_PRECIS: ::DWORD = 9; +pub const OUT_PS_ONLY_PRECIS: ::DWORD = 10; +pub const CLIP_DEFAULT_PRECIS: ::DWORD = 0; +pub const CLIP_CHARACTER_PRECIS: ::DWORD = 1; +pub const CLIP_STROKE_PRECIS: ::DWORD = 2; +pub const CLIP_MASK: ::DWORD = 0xf; +pub const CLIP_LH_ANGLES: ::DWORD = 1 << 4; +pub const CLIP_TT_ALWAYS: ::DWORD = 2 << 4; +pub const CLIP_DFA_DISABLE: ::DWORD = 4 << 4; +pub const CLIP_EMBEDDED: ::DWORD = 8 << 4; +pub const DEFAULT_QUALITY: ::DWORD = 0; +pub const DRAFT_QUALITY: ::DWORD = 1; +pub const PROOF_QUALITY: ::DWORD = 2; +pub const NONANTIALIASED_QUALITY: ::DWORD = 3; +pub const ANTIALIASED_QUALITY: ::DWORD = 4; +pub const CLEARTYPE_QUALITY: ::DWORD = 5; +pub const CLEARTYPE_NATURAL_QUALITY: ::DWORD = 6; +pub const DEFAULT_PITCH: ::DWORD = 0; +pub const FIXED_PITCH: ::DWORD = 1; +pub const VARIABLE_PITCH: ::DWORD = 2; +pub const FF_DONTCARE: ::DWORD = 0 << 4; +pub const FF_ROMAN: ::DWORD = 1 << 4; +pub const FF_SWISS: ::DWORD = 2 << 4; +pub const FF_MODERN: ::DWORD = 3 << 4; +pub const FF_SCRIPT: ::DWORD = 4 << 4; +pub const FF_DECORATIVE: ::DWORD = 5 << 4; +pub const MONO_FONT: ::DWORD = 8; +pub const ANSI_CHARSET: ::DWORD = 0; +pub const DEFAULT_CHARSET: ::DWORD = 1; +pub const SYMBOL_CHARSET: ::DWORD = 2; +pub const SHIFTJIS_CHARSET: ::DWORD = 128; +pub const HANGEUL_CHARSET: ::DWORD = 129; +pub const HANGUL_CHARSET: ::DWORD = 129; +pub const GB2312_CHARSET: ::DWORD = 134; +pub const CHINESEBIG5_CHARSET: ::DWORD = 136; +pub const OEM_CHARSET: ::DWORD = 255; +pub const JOHAB_CHARSET: ::DWORD = 130; +pub const HEBREW_CHARSET: ::DWORD = 177; +pub const ARABIC_CHARSET: ::DWORD = 178; +pub const GREEK_CHARSET: ::DWORD = 161; +pub const TURKISH_CHARSET: ::DWORD = 162; +pub const VIETNAMESE_CHARSET: ::DWORD = 163; +pub const THAI_CHARSET: ::DWORD = 222; +pub const EASTEUROPE_CHARSET: ::DWORD = 238; +pub const RUSSIAN_CHARSET: ::DWORD = 204; +pub const MAC_CHARSET: ::DWORD = 77; +pub const BALTIC_CHARSET: ::DWORD = 186; +pub const FS_LATIN1: ::DWORD = 0x00000001; +pub const FS_LATIN2: ::DWORD = 0x00000002; +pub const FS_CYRILLIC: ::DWORD = 0x00000004; +pub const FS_GREEK: ::DWORD = 0x00000008; +pub const FS_TURKISH: ::DWORD = 0x00000010; +pub const FS_HEBREW: ::DWORD = 0x00000020; +pub const FS_ARABIC: ::DWORD = 0x00000040; +pub const FS_BALTIC: ::DWORD = 0x00000080; +pub const FS_VIETNAMESE: ::DWORD = 0x00000100; +pub const FS_THAI: ::DWORD = 0x00010000; +pub const FS_JISJAPAN: ::DWORD = 0x00020000; +pub const FS_CHINESESIMP: ::DWORD = 0x00040000; +pub const FS_WANSUNG: ::DWORD = 0x00080000; +pub const FS_CHINESETRAD: ::DWORD = 0x00100000; +pub const FS_JOHAB: ::DWORD = 0x00200000; +pub const FS_SYMBOL: ::DWORD = 0x80000000; +pub const FW_DONTCARE: ::c_int = 0; +pub const FW_THIN: ::c_int = 100; +pub const FW_EXTRALIGHT: ::c_int = 200; +pub const FW_LIGHT: ::c_int = 300; +pub const FW_NORMAL: ::c_int = 400; +pub const FW_MEDIUM: ::c_int = 500; +pub const FW_SEMIBOLD: ::c_int = 600; +pub const FW_BOLD: ::c_int = 700; +pub const FW_EXTRABOLD: ::c_int = 800; +pub const FW_HEAVY: ::c_int = 900; +pub const FW_ULTRALIGHT: ::c_int = FW_EXTRALIGHT; +pub const FW_REGULAR: ::c_int = FW_NORMAL; +pub const FW_DEMIBOLD: ::c_int = FW_SEMIBOLD; +pub const FW_ULTRABOLD: ::c_int = FW_EXTRABOLD; +pub const FW_BLACK: ::c_int = FW_HEAVY; +pub type COLOR16 = ::c_ushort; +STRUCT!{struct TRIVERTEX { + x: ::LONG, + y: ::LONG, + Red: COLOR16, + Green: COLOR16, + Blue: COLOR16, + Alpha: COLOR16, +}} +pub type PTRIVERTEX = *mut TRIVERTEX; +pub type LPTRIVERTEX = *mut TRIVERTEX; +STRUCT!{struct GRADIENT_RECT { + UpperLeft: ::ULONG, + LowerRight: ::ULONG, +}} +pub type PGRADIENT_RECT = *mut GRADIENT_RECT; +pub type LPGRADIENT_RECT = *mut GRADIENT_RECT; +/* Object Definitions for EnumObjects() */ +pub const OBJ_PEN: ::UINT = 1; +pub const OBJ_BRUSH: ::UINT = 2; +pub const OBJ_DC: ::UINT = 3; +pub const OBJ_METADC: ::UINT = 4; +pub const OBJ_PAL: ::UINT = 5; +pub const OBJ_FONT: ::UINT = 6; +pub const OBJ_BITMAP: ::UINT = 7; +pub const OBJ_REGION: ::UINT = 8; +pub const OBJ_METAFILE: ::UINT = 9; +pub const OBJ_MEMDC: ::UINT = 10; +pub const OBJ_EXTPEN: ::UINT = 11; +pub const OBJ_ENHMETADC: ::UINT = 12; +pub const OBJ_ENHMETAFILE: ::UINT = 13; +pub const OBJ_COLORSPACE: ::UINT = 14; +pub const GDI_OBJ_LAST: ::UINT = OBJ_COLORSPACE; +STRUCT!{struct COLORADJUSTMENT { + caSize: ::WORD, + caFlags: ::WORD, + caIlluminantIndex: ::WORD, + caRedGamma: ::WORD, + caGreenGamma: ::WORD, + caBlueGamma: ::WORD, + caReferenceBlack: ::WORD, + caReferenceWhite: ::WORD, + caContrast: ::SHORT, + caBrightness: ::SHORT, + caColorfulness: ::SHORT, + caRedGreenTint: ::SHORT, +}} +pub type PCOLORADJUSTMENT = *mut COLORADJUSTMENT; +pub type LPCOLORADJUSTMENT = *mut COLORADJUSTMENT; +pub type OLDFONTENUMPROCA = Option<unsafe extern "system" fn( + *const LOGFONTA, *const ::VOID, ::DWORD, ::LPARAM +) -> ::c_int>; +pub type OLDFONTENUMPROCW = Option<unsafe extern "system" fn( + *const LOGFONTW, *const ::VOID, ::DWORD, ::LPARAM +) -> ::c_int>; +pub type FONTENUMPROCA = OLDFONTENUMPROCA; +pub type FONTENUMPROCW = OLDFONTENUMPROCW; +STRUCT!{struct WCRANGE { + wcLow: ::WCHAR, + cGlyphs: ::USHORT, +}} +pub type PWCRANGE = *mut WCRANGE; +pub type LPWCRANGE = *mut WCRANGE; +STRUCT!{struct GLYPHSET { + cbThis: ::DWORD, + flAccel: ::DWORD, + cGlyphsSupported: ::DWORD, + cRanges: ::DWORD, + ranges: [WCRANGE;1], +}} +pub type PGLYPHSET = *mut GLYPHSET; +pub type LPGLYPHSET = *mut GLYPHSET; +pub type ABORTPROC = Option<unsafe extern "system" fn(::HDC, ::c_int) -> ::BOOL>; +STRUCT!{struct DOCINFOA { + cbSize: ::c_int, + lpszDocName: ::LPCSTR, + lpszOutput: ::LPCSTR, + lpszDatatype: ::LPCSTR, + fwType: ::DWORD, +}} +pub type LPDOCINFOA = *mut DOCINFOA; +STRUCT!{struct DOCINFOW { + cbSize: ::c_int, + lpszDocName: ::LPCWSTR, + lpszOutput: ::LPCWSTR, + lpszDatatype: ::LPCWSTR, + fwType: ::DWORD, +}} +pub type LPDOCINFOW = *mut DOCINFOW; +pub type ICMENUMPROCA = Option<unsafe extern "system" fn(::LPSTR, ::LPARAM) -> ::c_int>; +pub type ICMENUMPROCW = Option<unsafe extern "system" fn(::LPWSTR, ::LPARAM) -> ::c_int>; +STRUCT!{struct HANDLETABLE { + objectHandle: [::HGDIOBJ; 1], +}} +pub type LPHANDLETABLE = *mut HANDLETABLE; +pub type PHANDLETABLE = *mut HANDLETABLE; +STRUCT!{struct METARECORD { + rdSize: ::DWORD, + rdFunction: ::WORD, + rdParm: [::WORD; 1], +}} +pub type PMETARECORD = *mut METARECORD; +pub type LPMETARECORD = *mut METARECORD; +pub type MFENUMPROC = Option<unsafe extern "system" fn( + hdc: ::HDC, lpht: *mut ::HANDLETABLE, lpMR: *mut ::METARECORD, nObj: ::c_int, param: ::LPARAM +) -> ::c_int>; +pub type GOBJENUMPROC = Option<unsafe extern "system" fn(::LPVOID, ::LPARAM) -> ::c_int>; +STRUCT!{struct GCP_RESULTSA { + lStructSize: ::DWORD, + lpOutString: ::LPSTR, + lpOrder: *const ::UINT, + lpDx: *const ::c_int, + lpCaretPos: *const ::c_int, + lpClass: ::LPSTR, + lpGlyphs: ::LPWSTR, + nGlyphs: ::UINT, + nMaxFit: ::c_int, +}} +pub type LPGCP_RESULTSA = *mut GCP_RESULTSA; +STRUCT!{struct GCP_RESULTSW { + lStructSize: ::DWORD, + lpOutString: ::LPWSTR, + lpOrder: *const ::UINT, + lpDx: *const ::c_int, + lpCaretPos: *const ::c_int, + lpClass: ::LPSTR, + lpGlyphs: ::LPWSTR, + nGlyphs: ::UINT, + nMaxFit: ::c_int, +}} +pub type LPGCP_RESULTSW = *mut GCP_RESULTSW; +STRUCT!{struct FONTSIGNATURE { + fsUsb: [::DWORD; 4], + fsCsb: [::DWORD; 2], +}} +pub type LPFONTSIGNATURE = *mut FONTSIGNATURE; +pub type PFONTSIGNATURE = *mut FONTSIGNATURE; +STRUCT!{struct POLYTEXTA { + x: ::c_int, + y: ::c_int, + n: ::UINT, + lpstr: ::LPCSTR, + uiFlags: ::UINT, + rcl: ::RECT, + pdx: *const ::c_int, +}} +pub type PPOLYTEXTA = *mut POLYTEXTA; +pub type NPPOLYTEXTA = *mut POLYTEXTA; +pub type LPPOLYTEXTA = *mut POLYTEXTA; +STRUCT!{struct POLYTEXTW { + x: ::c_int, + y: ::c_int, + n: ::UINT, + lpstr: ::LPCWSTR, + uiFlags: ::UINT, + rcl: ::RECT, + pdx: *const ::c_int, +}} +pub type PPOLYTEXTW = *mut POLYTEXTW; +pub type NPPOLYTEXTW = *mut POLYTEXTW; +pub type LPPOLYTEXTW = *mut POLYTEXTW; +STRUCT!{struct CHARSETINFO { + ciCharset: ::UINT, + ciACP: ::UINT, + fs: ::FONTSIGNATURE, +}} +pub type PCHARSETINFO = *mut CHARSETINFO; +pub type NPCHARSETINFO = *mut CHARSETINFO; +pub type LPCHARSETINFO = *mut CHARSETINFO; +pub const GRADIENT_FILL_RECT_H: ::ULONG = 0x00000000; +pub const GRADIENT_FILL_RECT_V: ::ULONG = 0x00000001; +pub const GRADIENT_FILL_TRIANGLE: ::ULONG = 0x00000002; +pub const GRADIENT_FILL_OP_FLAG: ::ULONG = 0x000000ff; +STRUCT!{struct LAYERPLANEDESCRIPTOR { + nSize: ::WORD, + nVersion: ::WORD, + dwFlags: ::DWORD, + iPixelType: ::BYTE, + cColorBits: ::BYTE, + cRedBits: ::BYTE, + cRedShift: ::BYTE, + cGreenBits: ::BYTE, + cGreenShift: ::BYTE, + cBlueBits: ::BYTE, + cBlueShift: ::BYTE, + cAlphaBits: ::BYTE, + cAlphaShift: ::BYTE, + cAccumBits: ::BYTE, + cAccumRedBits: ::BYTE, + cAccumGreenBits: ::BYTE, + cAccumBlueBits: ::BYTE, + cAccumAlphaBits: ::BYTE, + cDepthBits: ::BYTE, + cStencilBits: ::BYTE, + cAuxBuffers: ::BYTE, + iLayerPlane: ::BYTE, + bReserved: ::BYTE, + crTransparent: ::COLORREF, +}} +pub type PLAYERPLANEDESCRIPTOR = *mut LAYERPLANEDESCRIPTOR; +pub type LPLAYERPLANEDESCRIPTOR = *mut LAYERPLANEDESCRIPTOR; +STRUCT!{struct ENHMETAHEADER { + iType: ::DWORD, + nSize: ::DWORD, + rclBounds: ::RECTL, + rclFrame: ::RECTL, + dSignature: ::DWORD, + nVersion: ::DWORD, + nBytes: ::DWORD, + nRecords: ::DWORD, + nHandles: ::WORD, + sReserved: ::WORD, + nDescription: ::DWORD, + offDescription: ::DWORD, + nPalEntries: ::DWORD, + szlDevice: ::SIZEL, + szlMillimeters: ::SIZEL, + cbPixelFormat: ::DWORD, + offPixelFormat: ::DWORD, + bOpenGL: ::DWORD, + szlMicrometers: ::SIZEL, +}} +pub type PENHMETAHEADER = *mut ENHMETAHEADER; +pub type LPENHMETAHEADER = *mut ENHMETAHEADER; +STRUCT!{struct FIXED { + fract: ::WORD, + value: ::c_short, +}} +STRUCT!{struct MAT2 { + eM11: FIXED, + eM12: FIXED, + eM21: FIXED, + eM22: FIXED, +}} +pub type LPMAT2 = *mut MAT2; +STRUCT!{struct GLYPHMETRICS { + gmBlackBoxX: ::UINT, + gmBlackBoxY: ::UINT, + gmptGlyphOrigin: ::POINT, + gmCellIncX: ::c_short, + gmCellIncY: ::c_short, +}} +pub type LPGLYPHMETRICS = *mut GLYPHMETRICS; +STRUCT!{struct KERNINGPAIR { + wFirst: ::WORD, + wSecond: ::WORD, + iKernAmount: ::c_int, +}} +pub type LPKERNINGPAIR = *mut KERNINGPAIR; +STRUCT!{struct PANOSE { + bFamilyType: ::BYTE, + bSerifStyle: ::BYTE, + bWeight: ::BYTE, + bProportion: ::BYTE, + bContrast: ::BYTE, + bStrokeVariation: ::BYTE, + bArmStyle: ::BYTE, + bLetterform: ::BYTE, + bMidline: ::BYTE, + bXHeight: ::BYTE, +}} +pub type LPPANOSE = *mut PANOSE; +STRUCT!{struct OUTLINETEXTMETRICA { + otmSize: ::UINT, + otmTextMetrics: TEXTMETRICA, + otmFiller: ::BYTE, + otmPanoseNumber: ::PANOSE, + otmfsSelection: ::UINT, + otmfsType: ::UINT, + otmsCharSlopeRise: ::c_int, + otmsCharSlopeRun: ::c_int, + otmItalicAngle: ::c_int, + otmEMSquare: ::UINT, + otmAscent: ::c_int, + otmDescent: ::c_int, + otmLineGap: ::UINT, + otmsCapEmHeight: ::UINT, + otmsXHeight: ::UINT, + otmrcFontBox: ::RECT, + otmMacAscent: ::c_int, + otmMacDescent: ::c_int, + otmMacLineGap: ::UINT, + otmusMinimumPPEM: ::UINT, + otmptSubscriptSize: ::POINT, + otmptSubscriptOffset: ::POINT, + otmptSuperscriptSize: ::POINT, + otmptSuperscriptOffset: ::POINT, + otmsStrikeoutSize: ::UINT, + otmsStrikeoutPosition: ::c_int, + otmsUnderscoreSize: ::c_int, + otmsUnderscorePosition: ::c_int, + otmpFamilyName: ::PSTR, + otmpFaceName: ::PSTR, + otmpStyleName: ::PSTR, + otmpFullName: ::PSTR, +}} +pub type POUTLINETEXTMETRICA = *mut OUTLINETEXTMETRICA; +pub type NPOUTLINETEXTMETRICA = *mut OUTLINETEXTMETRICA; +pub type LPOUTLINETEXTMETRICA = *mut OUTLINETEXTMETRICA; +STRUCT!{struct OUTLINETEXTMETRICW { + otmSize: ::UINT, + otmTextMetrics: TEXTMETRICW, + otmFiller: ::BYTE, + otmPanoseNumber: ::PANOSE, + otmfsSelection: ::UINT, + otmfsType: ::UINT, + otmsCharSlopeRise: ::c_int, + otmsCharSlopeRun: ::c_int, + otmItalicAngle: ::c_int, + otmEMSquare: ::UINT, + otmAscent: ::c_int, + otmDescent: ::c_int, + otmLineGap: ::UINT, + otmsCapEmHeight: ::UINT, + otmsXHeight: ::UINT, + otmrcFontBox: ::RECT, + otmMacAscent: ::c_int, + otmMacDescent: ::c_int, + otmMacLineGap: ::UINT, + otmusMinimumPPEM: ::UINT, + otmptSubscriptSize: ::POINT, + otmptSubscriptOffset: ::POINT, + otmptSuperscriptSize: ::POINT, + otmptSuperscriptOffset: ::POINT, + otmsStrikeoutSize: ::UINT, + otmsStrikeoutPosition: ::c_int, + otmsUnderscoreSize: ::c_int, + otmsUnderscorePosition: ::c_int, + otmpFamilyName: ::PSTR, + otmpFaceName: ::PSTR, + otmpStyleName: ::PSTR, + otmpFullName: ::PSTR, +}} +pub type POUTLINETEXTMETRICW = *mut OUTLINETEXTMETRICW; +pub type NPOUTLINETEXTMETRICW = *mut OUTLINETEXTMETRICW; +pub type LPOUTLINETEXTMETRICW = *mut OUTLINETEXTMETRICW; +STRUCT!{struct RASTERIZER_STATUS { + nSize: ::c_short, + wFlags: ::c_short, + nLanguageID: ::c_short, +}} +pub type LPRASTERIZER_STATUS = *mut RASTERIZER_STATUS; +STRUCT!{struct ENHMETARECORD { + iType: ::DWORD, + nSize: ::DWORD, + dParm: [::DWORD; 1], +}} +pub type PENHMETARECORD = *mut ENHMETARECORD; +pub type LPENHMETARECORD = *mut ENHMETARECORD; +STRUCT!{struct METAFILEPICT { + mm: ::LONG, + xExt: ::LONG, + yExt: ::LONG, + hMF: ::HMETAFILE, +}} +pub type LPMETAFILEPICT = *mut METAFILEPICT; +STRUCT!{struct POINTFLOAT { + x: ::FLOAT, + y: ::FLOAT, +}} +pub type PPOINTFLOAT = *mut POINTFLOAT; +STRUCT!{struct GLYPHMETRICSFLOAT { + gmfBlackBoxX: ::FLOAT, + gmfBlackBoxY: ::FLOAT, + gmfptGlyphOrigin: POINTFLOAT, + gmfCellIncX: ::FLOAT, + gmfCellIncY: ::FLOAT, +}} +pub type PGLYPHMETRICSFLOAT = *mut GLYPHMETRICSFLOAT; +pub type LPGLYPHMETRICSFLOAT = *mut GLYPHMETRICSFLOAT; +pub const DT_PLOTTER: ::c_int = 0; +pub const DT_RASDISPLAY: ::c_int = 1; +pub const DT_RASPRINTER: ::c_int = 2; +pub const DT_RASCAMERA: ::c_int = 3; +pub const DT_CHARSTREAM: ::c_int = 4; +pub const DT_METAFILE: ::c_int = 5; +pub const DT_DISPFILE: ::c_int = 6; +pub const CLR_INVALID: ::COLORREF = 0xFFFFFFFF; +pub const ETO_OPAQUE: ::UINT = 0x0002; +pub const ETO_CLIPPED: ::UINT = 0x0004; +pub const ETO_GLYPH_INDEX: ::UINT = 0x0010; +pub const ETO_RTLREADING: ::UINT = 0x0080; +pub const ETO_NUMERICSLOCAL: ::UINT = 0x0400; +pub const ETO_NUMERICSLATIN: ::UINT = 0x0800; +pub const ETO_IGNORELANGUAGE: ::UINT = 0x1000; +pub const ETO_PDY: ::UINT = 0x2000; +pub const ETO_REVERSE_INDEX_MAP: ::UINT = 0x10000; +STRUCT!{struct EXTLOGPEN { + elpPenStyle: ::DWORD, + elpWidth: ::DWORD, + elpBrushStyle: ::UINT, + elpColor: ::COLORREF, + elpHatch: ::ULONG_PTR, + elpNumEntries: ::DWORD, + elpStyleEntry: [::DWORD; 1], +}} +pub type PEXTLOGPEN = *mut EXTLOGPEN; +pub type NPEXTLOGPEN = *mut EXTLOGPEN; +pub type LPEXTLOGPEN = *mut EXTLOGPEN; +pub type ENHMFENUMPROC = Option<unsafe extern "system" fn( + hdc: ::HDC, lpht: HANDLETABLE, lpmr: *const ENHMETARECORD, nHandles: ::c_int, data: ::LPARAM +) -> ::c_int>; +/* Metafile Functions */ +pub const META_SETBKCOLOR: ::WORD = 0x0201; +pub const META_SETBKMODE: ::WORD = 0x0102; +pub const META_SETMAPMODE: ::WORD = 0x0103; +pub const META_SETROP2: ::WORD = 0x0104; +pub const META_SETRELABS: ::WORD = 0x0105; +pub const META_SETPOLYFILLMODE: ::WORD = 0x0106; +pub const META_SETSTRETCHBLTMODE: ::WORD = 0x0107; +pub const META_SETTEXTCHAREXTRA: ::WORD = 0x0108; +pub const META_SETTEXTCOLOR: ::WORD = 0x0209; +pub const META_SETTEXTJUSTIFICATION: ::WORD = 0x020A; +pub const META_SETWINDOWORG: ::WORD = 0x020B; +pub const META_SETWINDOWEXT: ::WORD = 0x020C; +pub const META_SETVIEWPORTORG: ::WORD = 0x020D; +pub const META_SETVIEWPORTEXT: ::WORD = 0x020E; +pub const META_OFFSETWINDOWORG: ::WORD = 0x020F; +pub const META_SCALEWINDOWEXT: ::WORD = 0x0410; +pub const META_OFFSETVIEWPORTORG: ::WORD = 0x0211; +pub const META_SCALEVIEWPORTEXT: ::WORD = 0x0412; +pub const META_LINETO: ::WORD = 0x0213; +pub const META_MOVETO: ::WORD = 0x0214; +pub const META_EXCLUDECLIPRECT: ::WORD = 0x0415; +pub const META_INTERSECTCLIPRECT: ::WORD = 0x0416; +pub const META_ARC: ::WORD = 0x0817; +pub const META_ELLIPSE: ::WORD = 0x0418; +pub const META_FLOODFILL: ::WORD = 0x0419; +pub const META_PIE: ::WORD = 0x081A; +pub const META_RECTANGLE: ::WORD = 0x041B; +pub const META_ROUNDRECT: ::WORD = 0x061C; +pub const META_PATBLT: ::WORD = 0x061D; +pub const META_SAVEDC: ::WORD = 0x001E; +pub const META_SETPIXEL: ::WORD = 0x041F; +pub const META_OFFSETCLIPRGN: ::WORD = 0x0220; +pub const META_TEXTOUT: ::WORD = 0x0521; +pub const META_BITBLT: ::WORD = 0x0922; +pub const META_STRETCHBLT: ::WORD = 0x0B23; +pub const META_POLYGON: ::WORD = 0x0324; +pub const META_POLYLINE: ::WORD = 0x0325; +pub const META_ESCAPE: ::WORD = 0x0626; +pub const META_RESTOREDC: ::WORD = 0x0127; +pub const META_FILLREGION: ::WORD = 0x0228; +pub const META_FRAMEREGION: ::WORD = 0x0429; +pub const META_INVERTREGION: ::WORD = 0x012A; +pub const META_PAINTREGION: ::WORD = 0x012B; +pub const META_SELECTCLIPREGION: ::WORD = 0x012C; +pub const META_SELECTOBJECT: ::WORD = 0x012D; +pub const META_SETTEXTALIGN: ::WORD = 0x012E; +pub const META_CHORD: ::WORD = 0x0830; +pub const META_SETMAPPERFLAGS: ::WORD = 0x0231; +pub const META_EXTTEXTOUT: ::WORD = 0x0a32; +pub const META_SETDIBTODEV: ::WORD = 0x0d33; +pub const META_SELECTPALETTE: ::WORD = 0x0234; +pub const META_REALIZEPALETTE: ::WORD = 0x0035; +pub const META_ANIMATEPALETTE: ::WORD = 0x0436; +pub const META_SETPALENTRIES: ::WORD = 0x0037; +pub const META_POLYPOLYGON: ::WORD = 0x0538; +pub const META_RESIZEPALETTE: ::WORD = 0x0139; +pub const META_DIBBITBLT: ::WORD = 0x0940; +pub const META_DIBSTRETCHBLT: ::WORD = 0x0b41; +pub const META_DIBCREATEPATTERNBRUSH: ::WORD = 0x0142; +pub const META_STRETCHDIB: ::WORD = 0x0f43; +pub const META_EXTFLOODFILL: ::WORD = 0x0548; +pub const META_SETLAYOUT: ::WORD = 0x0149; +pub const META_DELETEOBJECT: ::WORD = 0x01f0; +pub const META_CREATEPALETTE: ::WORD = 0x00f7; +pub const META_CREATEPATTERNBRUSH: ::WORD = 0x01F9; +pub const META_CREATEPENINDIRECT: ::WORD = 0x02FA; +pub const META_CREATEFONTINDIRECT: ::WORD = 0x02FB; +pub const META_CREATEBRUSHINDIRECT: ::WORD = 0x02FC; +pub const META_CREATEREGION: ::WORD = 0x06FF; diff --git a/deps/winapi-0.2.5/src/winhttp.rs b/deps/winapi-0.2.6/src/winhttp.rs similarity index 100% rename from deps/winapi-0.2.5/src/winhttp.rs rename to deps/winapi-0.2.6/src/winhttp.rs diff --git a/deps/winapi-0.2.6/src/winioctl.rs b/deps/winapi-0.2.6/src/winioctl.rs new file mode 100644 index 000000000..de3b96107 --- /dev/null +++ b/deps/winapi-0.2.6/src/winioctl.rs @@ -0,0 +1,754 @@ +// Copyright © 2015, Peter Atashian +// Licensed under the MIT License <LICENSE.md> +//! This module defines the 32-Bit Windows Device I/O control codes. +//123 +pub const FILE_DEVICE_BEEP: ::DWORD = 0x00000001; +pub const FILE_DEVICE_CD_ROM: ::DWORD = 0x00000002; +pub const FILE_DEVICE_CD_ROM_FILE_SYSTEM: ::DWORD = 0x00000003; +pub const FILE_DEVICE_CONTROLLER: ::DWORD = 0x00000004; +pub const FILE_DEVICE_DATALINK: ::DWORD = 0x00000005; +pub const FILE_DEVICE_DFS: ::DWORD = 0x00000006; +pub const FILE_DEVICE_DISK: ::DWORD = 0x00000007; +pub const FILE_DEVICE_DISK_FILE_SYSTEM: ::DWORD = 0x00000008; +pub const FILE_DEVICE_FILE_SYSTEM: ::DWORD = 0x00000009; +pub const FILE_DEVICE_INPORT_PORT: ::DWORD = 0x0000000a; +pub const FILE_DEVICE_KEYBOARD: ::DWORD = 0x0000000b; +pub const FILE_DEVICE_MAILSLOT: ::DWORD = 0x0000000c; +pub const FILE_DEVICE_MIDI_IN: ::DWORD = 0x0000000d; +pub const FILE_DEVICE_MIDI_OUT: ::DWORD = 0x0000000e; +pub const FILE_DEVICE_MOUSE: ::DWORD = 0x0000000f; +pub const FILE_DEVICE_MULTI_UNC_PROVIDER: ::DWORD = 0x00000010; +pub const FILE_DEVICE_NAMED_PIPE: ::DWORD = 0x00000011; +pub const FILE_DEVICE_NETWORK: ::DWORD = 0x00000012; +pub const FILE_DEVICE_NETWORK_BROWSER: ::DWORD = 0x00000013; +pub const FILE_DEVICE_NETWORK_FILE_SYSTEM: ::DWORD = 0x00000014; +pub const FILE_DEVICE_NULL: ::DWORD = 0x00000015; +pub const FILE_DEVICE_PARALLEL_PORT: ::DWORD = 0x00000016; +pub const FILE_DEVICE_PHYSICAL_NETCARD: ::DWORD = 0x00000017; +pub const FILE_DEVICE_PRINTER: ::DWORD = 0x00000018; +pub const FILE_DEVICE_SCANNER: ::DWORD = 0x00000019; +pub const FILE_DEVICE_SERIAL_MOUSE_PORT: ::DWORD = 0x0000001a; +pub const FILE_DEVICE_SERIAL_PORT: ::DWORD = 0x0000001b; +pub const FILE_DEVICE_SCREEN: ::DWORD = 0x0000001c; +pub const FILE_DEVICE_SOUND: ::DWORD = 0x0000001d; +pub const FILE_DEVICE_STREAMS: ::DWORD = 0x0000001e; +pub const FILE_DEVICE_TAPE: ::DWORD = 0x0000001f; +pub const FILE_DEVICE_TAPE_FILE_SYSTEM: ::DWORD = 0x00000020; +pub const FILE_DEVICE_TRANSPORT: ::DWORD = 0x00000021; +pub const FILE_DEVICE_UNKNOWN: ::DWORD = 0x00000022; +pub const FILE_DEVICE_VIDEO: ::DWORD = 0x00000023; +pub const FILE_DEVICE_VIRTUAL_DISK: ::DWORD = 0x00000024; +pub const FILE_DEVICE_WAVE_IN: ::DWORD = 0x00000025; +pub const FILE_DEVICE_WAVE_OUT: ::DWORD = 0x00000026; +pub const FILE_DEVICE_8042_PORT: ::DWORD = 0x00000027; +pub const FILE_DEVICE_NETWORK_REDIRECTOR: ::DWORD = 0x00000028; +pub const FILE_DEVICE_BATTERY: ::DWORD = 0x00000029; +pub const FILE_DEVICE_BUS_EXTENDER: ::DWORD = 0x0000002a; +pub const FILE_DEVICE_MODEM: ::DWORD = 0x0000002b; +pub const FILE_DEVICE_VDM: ::DWORD = 0x0000002c; +pub const FILE_DEVICE_MASS_STORAGE: ::DWORD = 0x0000002d; +pub const FILE_DEVICE_SMB: ::DWORD = 0x0000002e; +pub const FILE_DEVICE_KS: ::DWORD = 0x0000002f; +pub const FILE_DEVICE_CHANGER: ::DWORD = 0x00000030; +pub const FILE_DEVICE_SMARTCARD: ::DWORD = 0x00000031; +pub const FILE_DEVICE_ACPI: ::DWORD = 0x00000032; +pub const FILE_DEVICE_DVD: ::DWORD = 0x00000033; +pub const FILE_DEVICE_FULLSCREEN_VIDEO: ::DWORD = 0x00000034; +pub const FILE_DEVICE_DFS_FILE_SYSTEM: ::DWORD = 0x00000035; +pub const FILE_DEVICE_DFS_VOLUME: ::DWORD = 0x00000036; +pub const FILE_DEVICE_SERENUM: ::DWORD = 0x00000037; +pub const FILE_DEVICE_TERMSRV: ::DWORD = 0x00000038; +pub const FILE_DEVICE_KSEC: ::DWORD = 0x00000039; +pub const FILE_DEVICE_FIPS: ::DWORD = 0x0000003A; +pub const FILE_DEVICE_INFINIBAND: ::DWORD = 0x0000003B; +pub const FILE_DEVICE_VMBUS: ::DWORD = 0x0000003E; +pub const FILE_DEVICE_CRYPT_PROVIDER: ::DWORD = 0x0000003F; +pub const FILE_DEVICE_WPD: ::DWORD = 0x00000040; +pub const FILE_DEVICE_BLUETOOTH: ::DWORD = 0x00000041; +pub const FILE_DEVICE_MT_COMPOSITE: ::DWORD = 0x00000042; +pub const FILE_DEVICE_MT_TRANSPORT: ::DWORD = 0x00000043; +pub const FILE_DEVICE_BIOMETRIC: ::DWORD = 0x00000044; +pub const FILE_DEVICE_PMI: ::DWORD = 0x00000045; +pub const FILE_DEVICE_EHSTOR: ::DWORD = 0x00000046; +pub const FILE_DEVICE_DEVAPI: ::DWORD = 0x00000047; +pub const FILE_DEVICE_GPIO: ::DWORD = 0x00000048; +pub const FILE_DEVICE_USBEX: ::DWORD = 0x00000049; +pub const FILE_DEVICE_CONSOLE: ::DWORD = 0x00000050; +pub const FILE_DEVICE_NFP: ::DWORD = 0x00000051; +pub const FILE_DEVICE_SYSENV: ::DWORD = 0x00000052; +pub const FILE_DEVICE_VIRTUAL_BLOCK: ::DWORD = 0x00000053; +pub const FILE_DEVICE_POINT_OF_SERVICE: ::DWORD = 0x00000054; +//224 +pub const METHOD_BUFFERED: ::DWORD = 0; +pub const METHOD_IN_DIRECT: ::DWORD = 1; +pub const METHOD_OUT_DIRECT: ::DWORD = 2; +pub const METHOD_NEITHER: ::DWORD = 3; +//253 +pub const FILE_ANY_ACCESS: ::DWORD = 0; +pub const FILE_SPECIAL_ACCESS: ::DWORD = FILE_ANY_ACCESS; +pub const FILE_READ_ACCESS: ::DWORD = 0x0001; +pub const FILE_WRITE_ACCESS: ::DWORD = 0x0002; +//281 +pub const IOCTL_STORAGE_BASE: ::DWORD = FILE_DEVICE_MASS_STORAGE; +pub const IOCTL_STORAGE_CHECK_VERIFY: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0200, + METHOD_BUFFERED, FILE_READ_ACCESS); +pub const IOCTL_STORAGE_CHECK_VERIFY2: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0200, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const IOCTL_STORAGE_MEDIA_REMOVAL: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0201, + METHOD_BUFFERED, FILE_READ_ACCESS); +pub const IOCTL_STORAGE_EJECT_MEDIA: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0202, + METHOD_BUFFERED, FILE_READ_ACCESS); +pub const IOCTL_STORAGE_LOAD_MEDIA: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0203, + METHOD_BUFFERED, FILE_READ_ACCESS); +pub const IOCTL_STORAGE_LOAD_MEDIA2: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0203, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const IOCTL_STORAGE_RESERVE: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0204, METHOD_BUFFERED, + FILE_READ_ACCESS); +pub const IOCTL_STORAGE_RELEASE: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0205, METHOD_BUFFERED, + FILE_READ_ACCESS); +pub const IOCTL_STORAGE_FIND_NEW_DEVICES: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0206, + METHOD_BUFFERED, FILE_READ_ACCESS); +pub const IOCTL_STORAGE_EJECTION_CONTROL: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0250, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const IOCTL_STORAGE_MCN_CONTROL: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0251, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const IOCTL_STORAGE_GET_MEDIA_TYPES: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0300, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const IOCTL_STORAGE_GET_MEDIA_TYPES_EX: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0301, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const IOCTL_STORAGE_GET_MEDIA_SERIAL_NUMBER: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0304, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const IOCTL_STORAGE_GET_HOTPLUG_INFO: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0305, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const IOCTL_STORAGE_SET_HOTPLUG_INFO: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0306, + METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS); +pub const IOCTL_STORAGE_RESET_BUS: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0400, METHOD_BUFFERED, + FILE_READ_ACCESS); +pub const IOCTL_STORAGE_RESET_DEVICE: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0401, + METHOD_BUFFERED, FILE_READ_ACCESS); +pub const IOCTL_STORAGE_BREAK_RESERVATION: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0405, + METHOD_BUFFERED, FILE_READ_ACCESS); +pub const IOCTL_STORAGE_PERSISTENT_RESERVE_IN: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0406, + METHOD_BUFFERED, FILE_READ_ACCESS); +pub const IOCTL_STORAGE_PERSISTENT_RESERVE_OUT: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0407, + METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS); +pub const IOCTL_STORAGE_GET_DEVICE_NUMBER: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0420, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const IOCTL_STORAGE_PREDICT_FAILURE: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0440, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const IOCTL_STORAGE_FAILURE_PREDICTION_CONFIG: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0441, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const IOCTL_STORAGE_READ_CAPACITY: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0450, + METHOD_BUFFERED, FILE_READ_ACCESS); +pub const IOCTL_STORAGE_GET_DEVICE_TELEMETRY: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0470, + METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS); +pub const IOCTL_STORAGE_DEVICE_TELEMETRY_NOTIFY: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0471, + METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS); +pub const IOCTL_STORAGE_DEVICE_TELEMETRY_QUERY_CAPS: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, + 0x0472, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS); +pub const IOCTL_STORAGE_GET_DEVICE_TELEMETRY_RAW: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0473, + METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS); +pub const IOCTL_STORAGE_QUERY_PROPERTY: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0500, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const IOCTL_STORAGE_MANAGE_DATA_SET_ATTRIBUTES: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0501, + METHOD_BUFFERED, FILE_WRITE_ACCESS); +pub const IOCTL_STORAGE_GET_LB_PROVISIONING_MAP_RESOURCES: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, + 0x0502, METHOD_BUFFERED, FILE_READ_ACCESS); +pub const IOCTL_STORAGE_GET_BC_PROPERTIES: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0600, + METHOD_BUFFERED, FILE_READ_ACCESS); +pub const IOCTL_STORAGE_ALLOCATE_BC_STREAM: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0601, + METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS); +pub const IOCTL_STORAGE_FREE_BC_STREAM: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0602, + METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS); +pub const IOCTL_STORAGE_CHECK_PRIORITY_HINT_SUPPORT: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, + 0x0620, METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const IOCTL_STORAGE_START_DATA_INTEGRITY_CHECK: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0621, + METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS); +pub const IOCTL_STORAGE_STOP_DATA_INTEGRITY_CHECK: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0622, + METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS); +pub const OBSOLETE_IOCTL_STORAGE_RESET_BUS: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0400, + METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS); +pub const OBSOLETE_IOCTL_STORAGE_RESET_DEVICE: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0401, + METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS); +pub const IOCTL_STORAGE_ENABLE_IDLE_POWER: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0720, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const IOCTL_STORAGE_GET_IDLE_POWERUP_REASON: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0721, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const IOCTL_STORAGE_POWER_ACTIVE: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0722, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const IOCTL_STORAGE_POWER_IDLE: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0723, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const IOCTL_STORAGE_EVENT_NOTIFICATION: ::DWORD = CTL_CODE!(IOCTL_STORAGE_BASE, 0x0724, + METHOD_BUFFERED, FILE_ANY_ACCESS); +//2627 +pub const IOCTL_DISK_BASE: ::DWORD = FILE_DEVICE_DISK; +pub const IOCTL_DISK_GET_DRIVE_GEOMETRY: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0000, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const IOCTL_DISK_GET_PARTITION_INFO: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0001, + METHOD_BUFFERED, FILE_READ_ACCESS); +pub const IOCTL_DISK_SET_PARTITION_INFO: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0002, + METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS); +pub const IOCTL_DISK_GET_DRIVE_LAYOUT: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0003, + METHOD_BUFFERED, FILE_READ_ACCESS); +pub const IOCTL_DISK_SET_DRIVE_LAYOUT: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0004, + METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS); +pub const IOCTL_DISK_VERIFY: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0005, METHOD_BUFFERED, + FILE_ANY_ACCESS); +pub const IOCTL_DISK_FORMAT_TRACKS: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0006, METHOD_BUFFERED, + FILE_READ_ACCESS | FILE_WRITE_ACCESS); +pub const IOCTL_DISK_REASSIGN_BLOCKS: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0007, METHOD_BUFFERED, + FILE_READ_ACCESS | FILE_WRITE_ACCESS); +pub const IOCTL_DISK_PERFORMANCE: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0008, METHOD_BUFFERED, + FILE_ANY_ACCESS); +pub const IOCTL_DISK_IS_WRITABLE: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0009, METHOD_BUFFERED, + FILE_ANY_ACCESS); +pub const IOCTL_DISK_LOGGING: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x000a, METHOD_BUFFERED, + FILE_ANY_ACCESS); +pub const IOCTL_DISK_FORMAT_TRACKS_EX: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x000b, + METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS); +pub const IOCTL_DISK_HISTOGRAM_STRUCTURE: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x000c, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const IOCTL_DISK_HISTOGRAM_DATA: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x000d, METHOD_BUFFERED, + FILE_ANY_ACCESS); +pub const IOCTL_DISK_HISTOGRAM_RESET: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x000e, METHOD_BUFFERED, + FILE_ANY_ACCESS); +pub const IOCTL_DISK_REQUEST_STRUCTURE: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x000f, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const IOCTL_DISK_REQUEST_DATA: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0010, METHOD_BUFFERED, + FILE_ANY_ACCESS); +pub const IOCTL_DISK_PERFORMANCE_OFF: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0018, METHOD_BUFFERED, + FILE_ANY_ACCESS); +pub const IOCTL_DISK_CONTROLLER_NUMBER: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0011, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const SMART_GET_VERSION: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0020, METHOD_BUFFERED, + FILE_READ_ACCESS); +pub const SMART_SEND_DRIVE_COMMAND: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0021, METHOD_BUFFERED, + FILE_READ_ACCESS | FILE_WRITE_ACCESS); +pub const SMART_RCV_DRIVE_DATA: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0022, METHOD_BUFFERED, + FILE_READ_ACCESS | FILE_WRITE_ACCESS); +pub const IOCTL_DISK_GET_PARTITION_INFO_EX: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0012, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const IOCTL_DISK_SET_PARTITION_INFO_EX: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0013, + METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS); +pub const IOCTL_DISK_GET_DRIVE_LAYOUT_EX: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0014, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const IOCTL_DISK_SET_DRIVE_LAYOUT_EX: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0015, + METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS); +pub const IOCTL_DISK_CREATE_DISK: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0016, METHOD_BUFFERED, + FILE_READ_ACCESS | FILE_WRITE_ACCESS); +pub const IOCTL_DISK_GET_LENGTH_INFO: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0017, METHOD_BUFFERED, + FILE_READ_ACCESS); +pub const IOCTL_DISK_GET_DRIVE_GEOMETRY_EX: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0028, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const IOCTL_DISK_REASSIGN_BLOCKS_EX: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0029, + METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS); +pub const IOCTL_DISK_UPDATE_DRIVE_SIZE: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0032, + METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS); +pub const IOCTL_DISK_GROW_PARTITION: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0034, METHOD_BUFFERED, + FILE_READ_ACCESS | FILE_WRITE_ACCESS); +pub const IOCTL_DISK_GET_CACHE_INFORMATION: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0035, + METHOD_BUFFERED, FILE_READ_ACCESS); +pub const IOCTL_DISK_SET_CACHE_INFORMATION: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0036, + METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS); +pub const IOCTL_DISK_GET_WRITE_CACHE_STATE: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0037, + METHOD_BUFFERED, FILE_READ_ACCESS); +pub const OBSOLETE_DISK_GET_WRITE_CACHE_STATE: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0037, + METHOD_BUFFERED, FILE_READ_ACCESS); +pub const IOCTL_DISK_DELETE_DRIVE_LAYOUT: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0040, + METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS); +pub const IOCTL_DISK_UPDATE_PROPERTIES: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0050, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const IOCTL_DISK_FORMAT_DRIVE: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x00f3, METHOD_BUFFERED, + FILE_READ_ACCESS | FILE_WRITE_ACCESS); +pub const IOCTL_DISK_SENSE_DEVICE: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x00f8, METHOD_BUFFERED, + FILE_ANY_ACCESS); +pub const IOCTL_DISK_CHECK_VERIFY: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0200, METHOD_BUFFERED, + FILE_READ_ACCESS); +pub const IOCTL_DISK_MEDIA_REMOVAL: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0201, METHOD_BUFFERED, + FILE_READ_ACCESS); +pub const IOCTL_DISK_EJECT_MEDIA: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0202, METHOD_BUFFERED, + FILE_READ_ACCESS); +pub const IOCTL_DISK_LOAD_MEDIA: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0203, METHOD_BUFFERED, + FILE_READ_ACCESS); +pub const IOCTL_DISK_RESERVE: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0204, METHOD_BUFFERED, + FILE_READ_ACCESS); +pub const IOCTL_DISK_RELEASE: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0205, METHOD_BUFFERED, + FILE_READ_ACCESS); +pub const IOCTL_DISK_FIND_NEW_DEVICES: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0206, + METHOD_BUFFERED, FILE_READ_ACCESS); +pub const IOCTL_DISK_GET_MEDIA_TYPES: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0300, METHOD_BUFFERED, + FILE_ANY_ACCESS); +pub const IOCTL_DISK_GET_DISK_ATTRIBUTES: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x003c, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const IOCTL_DISK_SET_DISK_ATTRIBUTES: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x003d, + METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS); +pub const IOCTL_DISK_RESET_SNAPSHOT_INFO: ::DWORD = CTL_CODE!(IOCTL_DISK_BASE, 0x0084, + METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS); +//3907 +pub const IOCTL_CHANGER_BASE: ::DWORD = FILE_DEVICE_CHANGER; +pub const IOCTL_CHANGER_GET_PARAMETERS: ::DWORD = CTL_CODE!(IOCTL_CHANGER_BASE, 0x0000, + METHOD_BUFFERED, FILE_READ_ACCESS); +pub const IOCTL_CHANGER_GET_STATUS: ::DWORD = CTL_CODE!(IOCTL_CHANGER_BASE, 0x0001, + METHOD_BUFFERED, FILE_READ_ACCESS); +pub const IOCTL_CHANGER_GET_PRODUCT_DATA: ::DWORD = CTL_CODE!(IOCTL_CHANGER_BASE, 0x0002, + METHOD_BUFFERED, FILE_READ_ACCESS); +pub const IOCTL_CHANGER_SET_ACCESS: ::DWORD = CTL_CODE!(IOCTL_CHANGER_BASE, 0x0004, + METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS); +pub const IOCTL_CHANGER_GET_ELEMENT_STATUS: ::DWORD = CTL_CODE!(IOCTL_CHANGER_BASE, 0x0005, + METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS); +pub const IOCTL_CHANGER_INITIALIZE_ELEMENT_STATUS: ::DWORD = CTL_CODE!(IOCTL_CHANGER_BASE, 0x0006, + METHOD_BUFFERED, FILE_READ_ACCESS); +pub const IOCTL_CHANGER_SET_POSITION: ::DWORD = CTL_CODE!(IOCTL_CHANGER_BASE, 0x0007, + METHOD_BUFFERED, FILE_READ_ACCESS); +pub const IOCTL_CHANGER_EXCHANGE_MEDIUM: ::DWORD = CTL_CODE!(IOCTL_CHANGER_BASE, 0x0008, + METHOD_BUFFERED, FILE_READ_ACCESS); +pub const IOCTL_CHANGER_MOVE_MEDIUM: ::DWORD = CTL_CODE!(IOCTL_CHANGER_BASE, 0x0009, + METHOD_BUFFERED, FILE_READ_ACCESS); +pub const IOCTL_CHANGER_REINITIALIZE_TRANSPORT: ::DWORD = CTL_CODE!(IOCTL_CHANGER_BASE, 0x000A, + METHOD_BUFFERED, FILE_READ_ACCESS); +pub const IOCTL_CHANGER_QUERY_VOLUME_TAGS: ::DWORD = CTL_CODE!(IOCTL_CHANGER_BASE, 0x000B, + METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS); +pub const IOCTL_SERIAL_LSRMST_INSERT: ::DWORD = CTL_CODE!(FILE_DEVICE_SERIAL_PORT, 31, + METHOD_BUFFERED,FILE_ANY_ACCESS); +pub const IOCTL_SERENUM_EXPOSE_HARDWARE: ::DWORD = CTL_CODE!(FILE_DEVICE_SERENUM, 128, + METHOD_BUFFERED,FILE_ANY_ACCESS); +pub const IOCTL_SERENUM_REMOVE_HARDWARE: ::DWORD = CTL_CODE!(FILE_DEVICE_SERENUM, 129, + METHOD_BUFFERED,FILE_ANY_ACCESS); +pub const IOCTL_SERENUM_PORT_DESC: ::DWORD = CTL_CODE!(FILE_DEVICE_SERENUM, 130, + METHOD_BUFFERED,FILE_ANY_ACCESS); +pub const IOCTL_SERENUM_GET_PORT_NAME: ::DWORD = CTL_CODE!(FILE_DEVICE_SERENUM, 131, + METHOD_BUFFERED,FILE_ANY_ACCESS); +//4690 +pub const FSCTL_REQUEST_OPLOCK_LEVEL_1: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 0, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const FSCTL_REQUEST_OPLOCK_LEVEL_2: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 1, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const FSCTL_REQUEST_BATCH_OPLOCK: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 2, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const FSCTL_OPLOCK_BREAK_ACKNOWLEDGE: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 3, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const FSCTL_OPBATCH_ACK_CLOSE_PENDING: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 4, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const FSCTL_OPLOCK_BREAK_NOTIFY: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 5, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const FSCTL_LOCK_VOLUME: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 6, METHOD_BUFFERED, + FILE_ANY_ACCESS); +pub const FSCTL_UNLOCK_VOLUME: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 7, METHOD_BUFFERED, + FILE_ANY_ACCESS); +pub const FSCTL_DISMOUNT_VOLUME: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 8, METHOD_BUFFERED, + FILE_ANY_ACCESS); +pub const FSCTL_IS_VOLUME_MOUNTED: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 10, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const FSCTL_IS_PATHNAME_VALID: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 11, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const FSCTL_MARK_VOLUME_DIRTY: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 12, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const FSCTL_QUERY_RETRIEVAL_POINTERS: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 14, + METHOD_NEITHER, FILE_ANY_ACCESS); +pub const FSCTL_GET_COMPRESSION: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 15, METHOD_BUFFERED, + FILE_ANY_ACCESS); +pub const FSCTL_SET_COMPRESSION: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 16, METHOD_BUFFERED, + ::FILE_READ_DATA | ::FILE_WRITE_DATA); +pub const FSCTL_SET_BOOTLOADER_ACCESSED: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 19, + METHOD_NEITHER, FILE_ANY_ACCESS); +pub const FSCTL_MARK_AS_SYSTEM_HIVE: ::DWORD = FSCTL_SET_BOOTLOADER_ACCESSED; +pub const FSCTL_OPLOCK_BREAK_ACK_NO_2: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 20, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const FSCTL_INVALIDATE_VOLUMES: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 21, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const FSCTL_QUERY_FAT_BPB: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 22, METHOD_BUFFERED, + FILE_ANY_ACCESS); +pub const FSCTL_REQUEST_FILTER_OPLOCK: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 23, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const FSCTL_FILESYSTEM_GET_STATISTICS: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 24, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const FSCTL_GET_NTFS_VOLUME_DATA: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 25, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const FSCTL_GET_NTFS_FILE_RECORD: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 26, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const FSCTL_GET_VOLUME_BITMAP: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 27, METHOD_NEITHER, + FILE_ANY_ACCESS); +pub const FSCTL_GET_RETRIEVAL_POINTERS: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 28, + METHOD_NEITHER, FILE_ANY_ACCESS); +pub const FSCTL_MOVE_FILE: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 29, METHOD_BUFFERED, + FILE_SPECIAL_ACCESS); +pub const FSCTL_IS_VOLUME_DIRTY: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 30, METHOD_BUFFERED, + FILE_ANY_ACCESS); +pub const FSCTL_ALLOW_EXTENDED_DASD_IO: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 32, + METHOD_NEITHER, FILE_ANY_ACCESS); +pub const FSCTL_FIND_FILES_BY_SID: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 35, METHOD_NEITHER, + FILE_ANY_ACCESS); +pub const FSCTL_SET_OBJECT_ID: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 38, METHOD_BUFFERED, + FILE_SPECIAL_ACCESS); +pub const FSCTL_GET_OBJECT_ID: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 39, METHOD_BUFFERED, + FILE_ANY_ACCESS); +pub const FSCTL_DELETE_OBJECT_ID: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 40, METHOD_BUFFERED, + FILE_SPECIAL_ACCESS); +pub const FSCTL_SET_REPARSE_POINT: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 41, + METHOD_BUFFERED, FILE_SPECIAL_ACCESS); +pub const FSCTL_GET_REPARSE_POINT: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 42, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const FSCTL_DELETE_REPARSE_POINT: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 43, + METHOD_BUFFERED, FILE_SPECIAL_ACCESS); +pub const FSCTL_ENUM_USN_DATA: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 44, + METHOD_NEITHER, FILE_ANY_ACCESS); +pub const FSCTL_SECURITY_ID_CHECK: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 45, METHOD_NEITHER, + ::FILE_READ_DATA); +pub const FSCTL_READ_USN_JOURNAL: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 46, METHOD_NEITHER, + FILE_ANY_ACCESS); +pub const FSCTL_SET_OBJECT_ID_EXTENDED: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 47, + METHOD_BUFFERED, FILE_SPECIAL_ACCESS); +pub const FSCTL_CREATE_OR_GET_OBJECT_ID: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 48, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const FSCTL_SET_SPARSE: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 49, METHOD_BUFFERED, + FILE_SPECIAL_ACCESS); +pub const FSCTL_SET_ZERO_DATA: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 50, METHOD_BUFFERED, + ::FILE_WRITE_DATA); +pub const FSCTL_QUERY_ALLOCATED_RANGES: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 51, + METHOD_NEITHER, ::FILE_READ_DATA); +pub const FSCTL_ENABLE_UPGRADE: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 52, METHOD_BUFFERED, + ::FILE_WRITE_DATA); +pub const FSCTL_SET_ENCRYPTION: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 53, METHOD_NEITHER, + FILE_ANY_ACCESS); +pub const FSCTL_ENCRYPTION_FSCTL_IO: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 54, + METHOD_NEITHER, FILE_ANY_ACCESS); +pub const FSCTL_WRITE_RAW_ENCRYPTED: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 55, + METHOD_NEITHER, FILE_SPECIAL_ACCESS); +pub const FSCTL_READ_RAW_ENCRYPTED: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 56, + METHOD_NEITHER, FILE_SPECIAL_ACCESS); +pub const FSCTL_CREATE_USN_JOURNAL: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 57, + METHOD_NEITHER, FILE_ANY_ACCESS); +pub const FSCTL_READ_FILE_USN_DATA: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 58, + METHOD_NEITHER, FILE_ANY_ACCESS); +pub const FSCTL_WRITE_USN_CLOSE_RECORD: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 59, + METHOD_NEITHER, FILE_ANY_ACCESS); +pub const FSCTL_EXTEND_VOLUME: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 60, METHOD_BUFFERED, + FILE_ANY_ACCESS); +pub const FSCTL_QUERY_USN_JOURNAL: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 61, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const FSCTL_DELETE_USN_JOURNAL: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 62, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const FSCTL_MARK_HANDLE: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 63, METHOD_BUFFERED, + FILE_ANY_ACCESS); +pub const FSCTL_SIS_COPYFILE: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 64, METHOD_BUFFERED, + FILE_ANY_ACCESS); +pub const FSCTL_SIS_LINK_FILES: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 65, METHOD_BUFFERED, + ::FILE_READ_DATA | ::FILE_WRITE_DATA); +pub const FSCTL_RECALL_FILE: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 69, METHOD_NEITHER, + FILE_ANY_ACCESS); +pub const FSCTL_READ_FROM_PLEX: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 71, METHOD_OUT_DIRECT, + ::FILE_READ_DATA); +pub const FSCTL_FILE_PREFETCH: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 72, METHOD_BUFFERED, + FILE_SPECIAL_ACCESS); +pub const FSCTL_MAKE_MEDIA_COMPATIBLE: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 76, + METHOD_BUFFERED, ::FILE_WRITE_DATA); +pub const FSCTL_SET_DEFECT_MANAGEMENT: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 77, + METHOD_BUFFERED, ::FILE_WRITE_DATA); +pub const FSCTL_QUERY_SPARING_INFO: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 78, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const FSCTL_QUERY_ON_DISK_VOLUME_INFO: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 79, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const FSCTL_SET_VOLUME_COMPRESSION_STATE: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 80, + METHOD_BUFFERED, FILE_SPECIAL_ACCESS); +pub const FSCTL_TXFS_MODIFY_RM: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 81, METHOD_BUFFERED, + ::FILE_WRITE_DATA); +pub const FSCTL_TXFS_QUERY_RM_INFORMATION: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 82, + METHOD_BUFFERED, ::FILE_READ_DATA); +pub const FSCTL_TXFS_ROLLFORWARD_REDO: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 84, + METHOD_BUFFERED, ::FILE_WRITE_DATA); +pub const FSCTL_TXFS_ROLLFORWARD_UNDO: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 85, + METHOD_BUFFERED, ::FILE_WRITE_DATA); +pub const FSCTL_TXFS_START_RM: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 86, METHOD_BUFFERED, + ::FILE_WRITE_DATA); +pub const FSCTL_TXFS_SHUTDOWN_RM: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 87, METHOD_BUFFERED, + ::FILE_WRITE_DATA); +pub const FSCTL_TXFS_READ_BACKUP_INFORMATION: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 88, + METHOD_BUFFERED, ::FILE_READ_DATA); +pub const FSCTL_TXFS_WRITE_BACKUP_INFORMATION: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 89, + METHOD_BUFFERED, ::FILE_WRITE_DATA); +pub const FSCTL_TXFS_CREATE_SECONDARY_RM: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 90, + METHOD_BUFFERED, ::FILE_WRITE_DATA); +pub const FSCTL_TXFS_GET_METADATA_INFO: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 91, + METHOD_BUFFERED, ::FILE_READ_DATA); +pub const FSCTL_TXFS_GET_TRANSACTED_VERSION: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 92, + METHOD_BUFFERED, ::FILE_READ_DATA); +pub const FSCTL_TXFS_SAVEPOINT_INFORMATION: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 94, + METHOD_BUFFERED, ::FILE_WRITE_DATA); +pub const FSCTL_TXFS_CREATE_MINIVERSION: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 95, + METHOD_BUFFERED, ::FILE_WRITE_DATA); +pub const FSCTL_TXFS_TRANSACTION_ACTIVE: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 99, + METHOD_BUFFERED, ::FILE_READ_DATA); +pub const FSCTL_SET_ZERO_ON_DEALLOCATION: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 101, + METHOD_BUFFERED, FILE_SPECIAL_ACCESS); +pub const FSCTL_SET_REPAIR: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 102, METHOD_BUFFERED, + FILE_ANY_ACCESS); +pub const FSCTL_GET_REPAIR: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 103, METHOD_BUFFERED, + FILE_ANY_ACCESS); +pub const FSCTL_WAIT_FOR_REPAIR: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 104, METHOD_BUFFERED, + FILE_ANY_ACCESS); +pub const FSCTL_INITIATE_REPAIR: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 106, METHOD_BUFFERED, + FILE_ANY_ACCESS); +pub const FSCTL_CSC_INTERNAL: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 107, METHOD_NEITHER, + FILE_ANY_ACCESS); +pub const FSCTL_SHRINK_VOLUME: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 108, METHOD_BUFFERED, + FILE_SPECIAL_ACCESS); +pub const FSCTL_SET_SHORT_NAME_BEHAVIOR: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 109, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const FSCTL_DFSR_SET_GHOST_HANDLE_STATE: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 110, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const FSCTL_TXFS_LIST_TRANSACTION_LOCKED_FILES: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, + 120, METHOD_BUFFERED, ::FILE_READ_DATA); +pub const FSCTL_TXFS_LIST_TRANSACTIONS: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 121, + METHOD_BUFFERED, ::FILE_READ_DATA); +pub const FSCTL_QUERY_PAGEFILE_ENCRYPTION: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 122, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const FSCTL_RESET_VOLUME_ALLOCATION_HINTS: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 123, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const FSCTL_QUERY_DEPENDENT_VOLUME: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 124, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const FSCTL_SD_GLOBAL_CHANGE: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 125, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const FSCTL_TXFS_READ_BACKUP_INFORMATION2: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 126, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const FSCTL_LOOKUP_STREAM_FROM_CLUSTER: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 127, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const FSCTL_TXFS_WRITE_BACKUP_INFORMATION2: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 128, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const FSCTL_FILE_TYPE_NOTIFICATION: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 129, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const FSCTL_FILE_LEVEL_TRIM: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 130, METHOD_BUFFERED, + ::FILE_WRITE_DATA); +pub const FSCTL_GET_BOOT_AREA_INFO: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 140, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const FSCTL_GET_RETRIEVAL_POINTER_BASE: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 141, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const FSCTL_SET_PERSISTENT_VOLUME_STATE: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 142, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const FSCTL_QUERY_PERSISTENT_VOLUME_STATE: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 143, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const FSCTL_REQUEST_OPLOCK: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 144, METHOD_BUFFERED, + FILE_ANY_ACCESS); +pub const FSCTL_CSV_TUNNEL_REQUEST: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 145, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const FSCTL_IS_CSV_FILE: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 146, METHOD_BUFFERED, + FILE_ANY_ACCESS); +pub const FSCTL_QUERY_FILE_SYSTEM_RECOGNITION: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 147, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const FSCTL_CSV_GET_VOLUME_PATH_NAME: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 148, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const FSCTL_CSV_GET_VOLUME_NAME_FOR_VOLUME_MOUNT_POINT: ::DWORD = CTL_CODE!( + FILE_DEVICE_FILE_SYSTEM, 149, METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const FSCTL_CSV_GET_VOLUME_PATH_NAMES_FOR_VOLUME_NAME: ::DWORD = CTL_CODE!( + FILE_DEVICE_FILE_SYSTEM, 150, METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const FSCTL_IS_FILE_ON_CSV_VOLUME: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 151, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const FSCTL_CORRUPTION_HANDLING: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 152, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const FSCTL_OFFLOAD_READ: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 153, METHOD_BUFFERED, + FILE_READ_ACCESS); +pub const FSCTL_OFFLOAD_WRITE: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 154, METHOD_BUFFERED, + FILE_WRITE_ACCESS); +pub const FSCTL_CSV_INTERNAL: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 155, METHOD_BUFFERED, + FILE_ANY_ACCESS); +pub const FSCTL_SET_PURGE_FAILURE_MODE: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 156, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const FSCTL_QUERY_FILE_LAYOUT: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 157, + METHOD_NEITHER, FILE_ANY_ACCESS); +pub const FSCTL_IS_VOLUME_OWNED_BYCSVFS: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 158, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const FSCTL_GET_INTEGRITY_INFORMATION: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 159, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const FSCTL_SET_INTEGRITY_INFORMATION: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 160, + METHOD_BUFFERED, ::FILE_READ_DATA | ::FILE_WRITE_DATA); +pub const FSCTL_QUERY_FILE_REGIONS: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 161, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const FSCTL_DEDUP_FILE: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 165, METHOD_BUFFERED, + FILE_ANY_ACCESS); +pub const FSCTL_DEDUP_QUERY_FILE_HASHES: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 166, + METHOD_NEITHER, ::FILE_READ_DATA); +pub const FSCTL_DEDUP_QUERY_RANGE_STATE: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 167, + METHOD_NEITHER, ::FILE_READ_DATA); +pub const FSCTL_DEDUP_QUERY_REPARSE_INFO: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 168, + METHOD_NEITHER, FILE_ANY_ACCESS); +pub const FSCTL_RKF_INTERNAL: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 171, METHOD_NEITHER, + FILE_ANY_ACCESS); +pub const FSCTL_SCRUB_DATA: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 172, METHOD_BUFFERED, + FILE_ANY_ACCESS); +pub const FSCTL_REPAIR_COPIES: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 173, METHOD_BUFFERED, + ::FILE_READ_DATA | ::FILE_WRITE_DATA); +pub const FSCTL_DISABLE_LOCAL_BUFFERING: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 174, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const FSCTL_CSV_MGMT_LOCK: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 175, METHOD_BUFFERED, + FILE_ANY_ACCESS); +pub const FSCTL_CSV_QUERY_DOWN_LEVEL_FILE_SYSTEM_CHARACTERISTICS: ::DWORD = CTL_CODE!( + FILE_DEVICE_FILE_SYSTEM, 176, METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const FSCTL_ADVANCE_FILE_ID: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 177, METHOD_BUFFERED, + FILE_ANY_ACCESS); +pub const FSCTL_CSV_SYNC_TUNNEL_REQUEST: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 178, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const FSCTL_CSV_QUERY_VETO_FILE_DIRECT_IO: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 179, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const FSCTL_WRITE_USN_REASON: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 180, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const FSCTL_CSV_CONTROL: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 181, METHOD_BUFFERED, + FILE_ANY_ACCESS); +pub const FSCTL_GET_REFS_VOLUME_DATA: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 182, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const FSCTL_CSV_H_BREAKING_SYNC_TUNNEL_REQUEST: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, + 185, METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const FSCTL_QUERY_STORAGE_CLASSES: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 187, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const FSCTL_QUERY_REGION_INFO: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 188, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const FSCTL_USN_TRACK_MODIFIED_RANGES: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 189, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const FSCTL_QUERY_SHARED_VIRTUAL_DISK_SUPPORT: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, + 192, METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const FSCTL_SVHDX_SYNC_TUNNEL_REQUEST: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 193, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const FSCTL_SVHDX_SET_INITIATOR_INFORMATION: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 194, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const FSCTL_SET_EXTERNAL_BACKING: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 195, + METHOD_BUFFERED, FILE_SPECIAL_ACCESS); +pub const FSCTL_GET_EXTERNAL_BACKING: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 196, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const FSCTL_DELETE_EXTERNAL_BACKING: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 197, + METHOD_BUFFERED, FILE_SPECIAL_ACCESS); +pub const FSCTL_ENUM_EXTERNAL_BACKING: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 198, + METHOD_BUFFERED, FILE_ANY_ACCESS); +pub const FSCTL_ENUM_OVERLAY: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 199, METHOD_NEITHER, + FILE_ANY_ACCESS); +pub const FSCTL_ADD_OVERLAY: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 204, METHOD_BUFFERED, + ::FILE_WRITE_DATA); +pub const FSCTL_REMOVE_OVERLAY: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 205, METHOD_BUFFERED, + ::FILE_WRITE_DATA); +pub const FSCTL_UPDATE_OVERLAY: ::DWORD = CTL_CODE!(FILE_DEVICE_FILE_SYSTEM, 206, METHOD_BUFFERED, + ::FILE_WRITE_DATA); +// FILE_DEVICE_AVIO is defined nowhere +//pub const IOCTL_AVIO_ALLOCATE_STREAM: ::DWORD = CTL_CODE!(FILE_DEVICE_AVIO, 1, METHOD_BUFFERED, +// FILE_SPECIAL_ACCESS); +//pub const IOCTL_AVIO_FREE_STREAM: ::DWORD = CTL_CODE!(FILE_DEVICE_AVIO, 2, METHOD_BUFFERED, +// FILE_SPECIAL_ACCESS); +//pub const IOCTL_AVIO_MODIFY_STREAM: ::DWORD = CTL_CODE!(FILE_DEVICE_AVIO, 3, METHOD_BUFFERED, +// FILE_SPECIAL_ACCESS); +STRUCT!{struct PATHNAME_BUFFER { + PathNameLength: ::DWORD, + Name: [::WCHAR; 1], +}} +pub type PPATHNAME_BUFFER = *mut PATHNAME_BUFFER; +STRUCT!{nodebug struct FSCTL_QUERY_FAT_BPB_BUFFER { + First0x24BytesOfBootSector: [::BYTE; 0x24], +}} +pub type PFSCTL_QUERY_FAT_BPB_BUFFER = *mut FSCTL_QUERY_FAT_BPB_BUFFER; +STRUCT!{struct NTFS_VOLUME_DATA_BUFFER { + VolumeSerialNumber: ::LARGE_INTEGER, + NumberSectors: ::LARGE_INTEGER, + TotalClusters: ::LARGE_INTEGER, + FreeClusters: ::LARGE_INTEGER, + TotalReserved: ::LARGE_INTEGER, + BytesPerSector: ::DWORD, + BytesPerCluster: ::DWORD, + BytesPerFileRecordSegment: ::DWORD, + ClustersPerFileRecordSegment: ::DWORD, + MftValidDataLength: ::LARGE_INTEGER, + MftStartLcn: ::LARGE_INTEGER, + Mft2StartLcn: ::LARGE_INTEGER, + MftZoneStart: ::LARGE_INTEGER, + MftZoneEnd: ::LARGE_INTEGER, +}} +pub type PNTFS_VOLUME_DATA_BUFFER = *mut NTFS_VOLUME_DATA_BUFFER; +STRUCT!{struct NTFS_EXTENDED_VOLUME_DATA { + ByteCount: ::DWORD, + MajorVersion: ::WORD, + MinorVersion: ::WORD, + BytesPerPhysicalSector: ::DWORD, + LfsMajorVersion: ::WORD, + LfsMinorVersion: ::WORD, +}} +pub type PNTFS_EXTENDED_VOLUME_DATA = *mut NTFS_EXTENDED_VOLUME_DATA; +STRUCT!{struct REFS_VOLUME_DATA_BUFFER { + ByteCount: ::DWORD, + MajorVersion: ::DWORD, + MinorVersion: ::DWORD, + BytesPerPhysicalSector: ::DWORD, + VolumeSerialNumber: ::LARGE_INTEGER, + NumberSectors: ::LARGE_INTEGER, + TotalClusters: ::LARGE_INTEGER, + FreeClusters: ::LARGE_INTEGER, + TotalReserved: ::LARGE_INTEGER, + BytesPerSector: ::DWORD, + BytesPerCluster: ::DWORD, + MaximumSizeOfResidentFile: ::LARGE_INTEGER, + Reserved: [::LARGE_INTEGER; 10], +}} +pub type PREFS_VOLUME_DATA_BUFFER = *mut REFS_VOLUME_DATA_BUFFER; +STRUCT!{struct STARTING_LCN_INPUT_BUFFER { + StartingLcn: ::LARGE_INTEGER, +}} +pub type PSTARTING_LCN_INPUT_BUFFER = *mut STARTING_LCN_INPUT_BUFFER; +STRUCT!{struct VOLUME_BITMAP_BUFFER { + StartingLcn: ::LARGE_INTEGER, + BitmapSize: ::LARGE_INTEGER, + Buffer: [::BYTE; 1], +}} +pub type PVOLUME_BITMAP_BUFFER = *mut VOLUME_BITMAP_BUFFER; +STRUCT!{struct STARTING_VCN_INPUT_BUFFER { + StartingVcn: ::LARGE_INTEGER, +}} +pub type PSTARTING_VCN_INPUT_BUFFER = *mut STARTING_VCN_INPUT_BUFFER; +STRUCT!{struct RETRIEVAL_POINTERS_BUFFER_INTERNAL { + NextVcn: ::LARGE_INTEGER, + Lcn: ::LARGE_INTEGER, +}} +STRUCT!{struct RETRIEVAL_POINTERS_BUFFER { + ExtentCount: ::DWORD, + StartingVcn: ::LARGE_INTEGER, + Extents: [RETRIEVAL_POINTERS_BUFFER_INTERNAL; 1], +}} +pub type PRETRIEVAL_POINTERS_BUFFER = *mut RETRIEVAL_POINTERS_BUFFER; +STRUCT!{struct NTFS_FILE_RECORD_INPUT_BUFFER { + FileReferenceNumber: ::LARGE_INTEGER, +}} +pub type PNTFS_FILE_RECORD_INPUT_BUFFER = *mut NTFS_FILE_RECORD_INPUT_BUFFER; +STRUCT!{struct NTFS_FILE_RECORD_OUTPUT_BUFFER { + FileReferenceNumber: ::LARGE_INTEGER, + FileRecordLength: ::DWORD, + FileRecordBuffer: [::BYTE; 1], +}} +pub type PNTFS_FILE_RECORD_OUTPUT_BUFFER = *mut NTFS_FILE_RECORD_OUTPUT_BUFFER; +STRUCT!{struct MOVE_FILE_DATA { + FileHandle: ::HANDLE, + StartingVcn: ::LARGE_INTEGER, + StartingLcn: ::LARGE_INTEGER, + ClusterCount: ::DWORD, +}} +pub type PMOVE_FILE_DATA = *mut MOVE_FILE_DATA; +STRUCT!{struct MOVE_FILE_RECORD_DATA { + FileHandle: ::HANDLE, + SourceFileRecord: ::LARGE_INTEGER, + TargetFileRecord: ::LARGE_INTEGER, +}} +pub type PMOVE_FILE_RECORD_DATA = *mut MOVE_FILE_RECORD_DATA; +//9207 +pub const IOCTL_VOLUME_BASE: ::DWORD = 0x00000056; +pub const IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS: ::DWORD = CTL_CODE!(IOCTL_VOLUME_BASE, 0, + METHOD_BUFFERED, FILE_ANY_ACCESS); +STRUCT!{struct DISK_EXTENT { + DiskNumber: ::DWORD, + StartingOffset: ::LARGE_INTEGER, + ExtentLength: ::LARGE_INTEGER, +}} +pub type PDISK_EXTENT = *mut DISK_EXTENT; +STRUCT!{struct VOLUME_DISK_EXTENTS { + NumberOfDiskExtents: ::DWORD, + Extents: [DISK_EXTENT; ::ANYSIZE_ARRAY], +}} +pub type PVOLUME_DISK_EXTENTS = *mut VOLUME_DISK_EXTENTS; +pub const IOCTL_VOLUME_ONLINE: ::DWORD = CTL_CODE!(IOCTL_VOLUME_BASE, 2, METHOD_BUFFERED, + FILE_READ_ACCESS | FILE_WRITE_ACCESS); +pub const IOCTL_VOLUME_OFFLINE: ::DWORD = CTL_CODE!(IOCTL_VOLUME_BASE, 3, METHOD_BUFFERED, + FILE_READ_ACCESS | FILE_WRITE_ACCESS); +pub const IOCTL_VOLUME_IS_CLUSTERED: ::DWORD = CTL_CODE!(IOCTL_VOLUME_BASE, 12, METHOD_BUFFERED, + FILE_ANY_ACCESS); +pub const IOCTL_VOLUME_GET_GPT_ATTRIBUTES: ::DWORD = CTL_CODE!(IOCTL_VOLUME_BASE, 14, + METHOD_BUFFERED, FILE_ANY_ACCESS); diff --git a/deps/winapi-0.2.5/src/winnetwk.rs b/deps/winapi-0.2.6/src/winnetwk.rs similarity index 100% rename from deps/winapi-0.2.5/src/winnetwk.rs rename to deps/winapi-0.2.6/src/winnetwk.rs diff --git a/deps/winapi-0.2.6/src/winnls.rs b/deps/winapi-0.2.6/src/winnls.rs new file mode 100644 index 000000000..b27e2f0ae --- /dev/null +++ b/deps/winapi-0.2.6/src/winnls.rs @@ -0,0 +1,164 @@ +// Copyright © 2015, Peter Atashian +// Licensed under the MIT License <LICENSE.md> +//! Procedure declarations, constant definitions, and macros for the NLS component. +pub const CP_ACP: ::DWORD = 0; +pub const CP_OEMCP: ::DWORD = 1; +pub const CP_MACCP: ::DWORD = 2; +pub const CP_THREAD_ACP: ::DWORD = 3; +pub const CP_SYMBOL: ::DWORD = 42; +pub const CP_UTF7: ::DWORD = 65000; +pub const CP_UTF8: ::DWORD = 65001; +pub const MAX_LEADBYTES: usize = 12; +pub const MAX_DEFAULTCHAR: usize = 2; +pub type LGRPID = ::DWORD; +pub type LCTYPE = ::DWORD; +pub type CALTYPE = ::DWORD; +pub type CALID = ::DWORD; +pub type GEOID = ::LONG; +pub type GEOTYPE = ::DWORD; +pub type GEOCLASS = ::DWORD; +STRUCT!{struct NLSVERSIONINFO { + dwNLSVersionInfoSize: ::DWORD, + dwNLSVersion: ::DWORD, + dwDefinedVersion: ::DWORD, + dwEffectiveId: ::DWORD, + guidCustomVersion: ::GUID, +}} +pub type LPNLSVERSIONINFO = *mut NLSVERSIONINFO; +STRUCT!{struct NLSVERSIONINFOEX { + dwNLSVersionInfoSize: ::DWORD, + dwNLSVersion: ::DWORD, + dwDefinedVersion: ::DWORD, + dwEffectiveId: ::DWORD, + guidCustomVersion: ::GUID, +}} +pub type LPNLSVERSIONINFOEX = *mut NLSVERSIONINFOEX; +ENUM!{enum NORM_FORM { + NormalizationOther = 0, + NormalizationC = 0x1, + NormalizationD = 0x2, + NormalizationKC = 0x5, + NormalizationKD = 0x6, +}} +pub type LANGUAGEGROUP_ENUMPROCA = Option<unsafe extern "system" fn( + ::LGRPID, ::LPSTR, ::LPSTR, ::DWORD, ::LONG_PTR, +) -> ::BOOL>; +pub type LANGGROUPLOCALE_ENUMPROCA = Option<unsafe extern "system" fn( + ::LGRPID, ::LCID, ::LPSTR, ::LONG_PTR, +) -> ::BOOL>; +pub type UILANGUAGE_ENUMPROCA = Option<unsafe extern "system" fn(::LPSTR, ::LONG_PTR) -> ::BOOL>; +pub type CODEPAGE_ENUMPROCA = Option<unsafe extern "system" fn(::LPSTR) -> ::BOOL>; +pub type DATEFMT_ENUMPROCA = Option<unsafe extern "system" fn(::LPSTR) -> ::BOOL>; +pub type DATEFMT_ENUMPROCEXA = Option<unsafe extern "system" fn(::LPSTR, ::CALID) -> ::BOOL>; +pub type TIMEFMT_ENUMPROCA = Option<unsafe extern "system" fn(::LPSTR) -> ::BOOL>; +pub type CALINFO_ENUMPROCA = Option<unsafe extern "system" fn(::LPSTR) -> ::BOOL>; +pub type CALINFO_ENUMPROCEXA = Option<unsafe extern "system" fn(::LPSTR, ::CALID) -> ::BOOL>; +pub type LOCALE_ENUMPROCA = Option<unsafe extern "system" fn(::LPSTR) -> ::BOOL>; +pub type LOCALE_ENUMPROCW = Option<unsafe extern "system" fn(::LPWSTR) -> ::BOOL>; +pub type LANGUAGEGROUP_ENUMPROCW = Option<unsafe extern "system" fn( + ::LGRPID, ::LPWSTR, ::LPWSTR, ::DWORD, ::LONG_PTR, +) -> ::BOOL>; +pub type LANGGROUPLOCALE_ENUMPROCW = Option<unsafe extern "system" fn( + ::LGRPID, ::LCID, ::LPWSTR, ::LONG_PTR, +) -> ::BOOL>; +pub type UILANGUAGE_ENUMPROCW = Option<unsafe extern "system" fn(::LPWSTR, ::LONG_PTR) -> ::BOOL>; +pub type CODEPAGE_ENUMPROCW = Option<unsafe extern "system" fn(::LPWSTR) -> ::BOOL>; +pub type DATEFMT_ENUMPROCW = Option<unsafe extern "system" fn(::LPWSTR) -> ::BOOL>; +pub type DATEFMT_ENUMPROCEXW = Option<unsafe extern "system" fn(::LPWSTR, ::CALID) -> ::BOOL>; +pub type TIMEFMT_ENUMPROCW = Option<unsafe extern "system" fn(::LPWSTR) -> ::BOOL>; +pub type CALINFO_ENUMPROCW = Option<unsafe extern "system" fn(::LPWSTR) -> ::BOOL>; +pub type CALINFO_ENUMPROCEXW = Option<unsafe extern "system" fn(::LPWSTR, ::CALID) -> ::BOOL>; +pub type GEO_ENUMPROC = Option<unsafe extern "system" fn(GEOID) -> ::BOOL>; +STRUCT!{struct CPINFO { + MaxCharSize: ::UINT, + DefaultChar: [::BYTE; MAX_DEFAULTCHAR], + LeadByte: [::BYTE; MAX_LEADBYTES], +}} +pub type LPCPINFO = *mut CPINFO; +STRUCT!{nodebug struct CPINFOEXA { + MaxCharSize: ::UINT, + DefaultChar: [::BYTE; MAX_DEFAULTCHAR], + LeadByte: [::BYTE; MAX_LEADBYTES], + UnicodeDefaultChar: ::WCHAR, + CodePage: ::UINT, + CodePageName: [::CHAR; ::MAX_PATH], +}} +pub type LPCPINFOEXA = *mut CPINFOEXA; +STRUCT!{nodebug struct CPINFOEXW { + MaxCharSize: ::UINT, + DefaultChar: [::BYTE; MAX_DEFAULTCHAR], + LeadByte: [::BYTE; MAX_LEADBYTES], + UnicodeDefaultChar: ::WCHAR, + CodePage: ::UINT, + CodePageName: [::WCHAR; ::MAX_PATH], +}} +pub type LPCPINFOEXW = *mut CPINFOEXW; +STRUCT!{struct NUMBERFMTA { + NumDigits: ::UINT, + LeadingZero: ::UINT, + Grouping: ::UINT, + lpDecimalSep: ::LPSTR, + lpThousandSep: ::LPSTR, + NegativeOrder: ::UINT, +}} +pub type LPNUMBERFMTA = *mut NUMBERFMTA; +STRUCT!{struct NUMBERFMTW { + NumDigits: ::UINT, + LeadingZero: ::UINT, + Grouping: ::UINT, + lpDecimalSep: ::LPWSTR, + lpThousandSep: ::LPWSTR, + NegativeOrder: ::UINT, +}} +pub type LPNUMBERFMTW = *mut NUMBERFMTW; +STRUCT!{struct CURRENCYFMTA { + NumDigits: ::UINT, + LeadingZero: ::UINT, + Grouping: ::UINT, + lpDecimalSep: ::LPSTR, + lpThousandSep: ::LPSTR, + NegativeOrder: ::UINT, + PositiveOrder: ::UINT, + lpCurrencySymbol: ::LPSTR, +}} +pub type LPCURRENCYFMTA = *mut CURRENCYFMTA; +STRUCT!{struct CURRENCYFMTW { + NumDigits: ::UINT, + LeadingZero: ::UINT, + Grouping: ::UINT, + lpDecimalSep: ::LPWSTR, + lpThousandSep: ::LPWSTR, + NegativeOrder: ::UINT, + PositiveOrder: ::UINT, + lpCurrencySymbol: ::LPWSTR, +}} +pub type LPCURRENCYFMTW = *mut CURRENCYFMTW; +pub type NLS_FUNCTION = ::DWORD; +STRUCT!{struct FILEMUIINFO { + dwSize: ::DWORD, + dwVersion: ::DWORD, + dwFileType: ::DWORD, + pChecksum: [::BYTE; 16], + pServiceChecksum: [::BYTE; 16], + dwLanguageNameOffset: ::DWORD, + dwTypeIDMainSize: ::DWORD, + dwTypeIDMainOffset: ::DWORD, + dwTypeNameMainOffset: ::DWORD, + dwTypeIDMUISize: ::DWORD, + dwTypeIDMUIOffset: ::DWORD, + dwTypeNameMUIOffset: ::DWORD, + abBuffer: [::BYTE; 8], +}} +pub type PFILEMUIINFO = *mut FILEMUIINFO; +pub type CALINFO_ENUMPROCEXEX = Option<unsafe extern "system" fn( + ::LPWSTR, ::CALID, ::LPWSTR, ::LPARAM, +) -> ::BOOL>; +pub type DATEFMT_ENUMPROCEXEX = Option<unsafe extern "system" fn( + ::LPWSTR, ::CALID, ::LPARAM, +) -> ::BOOL>; +pub type TIMEFMT_ENUMPROCEX = Option<unsafe extern "system" fn( + ::LPWSTR, ::LPARAM, +) -> ::BOOL>; +pub type LOCALE_ENUMPROCEX = Option<unsafe extern "system" fn( + ::LPWSTR, ::DWORD, ::LPARAM, +) -> ::BOOL>; diff --git a/deps/winapi-0.2.6/src/winnt.rs b/deps/winapi-0.2.6/src/winnt.rs new file mode 100644 index 000000000..cce242e9b --- /dev/null +++ b/deps/winapi-0.2.6/src/winnt.rs @@ -0,0 +1,2368 @@ +// Copyright © 2015, Peter Atashian +// Licensed under the MIT License <LICENSE.md> +//! This module defines the 32-Bit Windows types and constants that are defined by NT, but exposed +//! through the Win32 API. +pub const ANYSIZE_ARRAY: usize = 1; +//341 +pub type PVOID = *mut ::c_void; +pub type PVOID64 = u64; // This is a 64-bit pointer, even when in 32-bit +//382 +pub type VOID = ::c_void; +pub type CHAR = ::c_char; +pub type SHORT = ::c_short; +pub type LONG = ::c_long; +// pub type INT = ::c_int; // Already defined by minwindef.h +pub type WCHAR = ::wchar_t; +pub type PWCHAR = *mut WCHAR; +pub type LPWCH = *mut WCHAR; +pub type PWCH = *mut WCHAR; +pub type LPCWCH = *const WCHAR; +pub type PCWCH = *const WCHAR; +pub type NWPSTR = *mut WCHAR; +pub type LPWSTR = *mut WCHAR; +pub type PWSTR = *mut WCHAR; +pub type PZPWSTR = *mut PWSTR; +pub type PCZPWSTR = *const PWSTR; +pub type LPUWSTR = *mut WCHAR; +pub type PUWSTR = *mut WCHAR; +pub type LPCWSTR = *const WCHAR; +pub type PCWSTR = *const WCHAR; +pub type PZPCWSTR= *mut PCWSTR; +pub type PCZPCWSTR = *const PCWSTR; +pub type LPCUWSTR = *const WCHAR; +pub type PCUWSTR = *const WCHAR; +pub type PZZWSTR= *mut WCHAR; +pub type PCZZWSTR = *const WCHAR; +pub type PUZZWSTR = *mut WCHAR; +pub type PCUZZWSTR = *const WCHAR; +pub type PNZWCH = *mut WCHAR; +pub type PCNZWCH = *const WCHAR; +pub type PUNZWCH = *mut WCHAR; +pub type PCUNZWCH = *const WCHAR; +pub type LPCWCHAR = *const WCHAR; +pub type PCWCHAR = *const WCHAR; +pub type LPCUWCHAR = *const WCHAR; +pub type PCUWCHAR = *const WCHAR; +pub type UCSCHAR = ::c_ulong; +pub type PUCSCHAR = *mut UCSCHAR; +pub type PCUCSCHAR = *const UCSCHAR; +pub type PUCSSTR = *mut UCSCHAR; +pub type PUUCSSTR = *mut UCSCHAR; +pub type PCUCSSTR = *const UCSCHAR; +pub type PCUUCSSTR = *const UCSCHAR; +pub type PUUCSCHAR = *mut UCSCHAR; +pub type PCUUCSCHAR = *const UCSCHAR; +pub type PCHAR = *mut CHAR; +pub type LPCH = *mut CHAR; +pub type PCH = *mut CHAR; +pub type LPCCH = *const CHAR; +pub type PCCH = *const CHAR; +pub type NPSTR = *mut CHAR; +pub type LPSTR = *mut CHAR; +pub type PSTR = *mut CHAR; +pub type PZPSTR = *mut PSTR; +pub type PCZPSTR = *const PSTR; +pub type LPCSTR = *const CHAR; +pub type PCSTR = *const CHAR; +pub type PZPCSTR = *mut PCSTR; +pub type PCZPCSTR = *const PCSTR; +pub type PZZSTR = *mut CHAR; +pub type PCZZSTR = *const CHAR; +pub type PNZCH = *mut CHAR; +pub type PCNZCH = *const CHAR; +// Skipping TCHAR things +pub type PSHORT = *mut SHORT; +pub type PLONG = *mut LONG; +STRUCT!{struct PROCESSOR_NUMBER { + Group: ::WORD, + Number: ::BYTE, + Reserved: ::BYTE, +}} +pub type PPROCESSOR_NUMBER = *mut PROCESSOR_NUMBER; +STRUCT!{struct GROUP_AFFINITY { + Mask: ::KAFFINITY, + Group: ::WORD, + Reserved: [::WORD; 3], +}} +pub type PGROUP_AFFINITY = *mut GROUP_AFFINITY; +pub type HANDLE = *mut ::c_void; +pub type PHANDLE = *mut HANDLE; +pub type FCHAR = ::BYTE; +pub type FSHORT = ::WORD; +pub type FLONG = ::DWORD; +//667 +pub type CCHAR = ::c_char; +pub type LCID = ::DWORD; +pub type PLCID = ::PDWORD; +pub type LANGID = ::WORD; +ENUM!{enum COMPARTMENT_ID { + UNSPECIFIED_COMPARTMENT_ID = 0, + DEFAULT_COMPARTMENT_ID = 1, +}} +pub type PCOMPARTMENT_ID = *mut COMPARTMENT_ID; +pub const APPLICATION_ERROR_MASK: ::DWORD = 0x20000000; +pub const ERROR_SEVERITY_SUCCESS: ::DWORD = 0x00000000; +pub const ERROR_SEVERITY_INFORMATIONAL: ::DWORD = 0x40000000; +pub const ERROR_SEVERITY_WARNING: ::DWORD = 0x80000000; +pub const ERROR_SEVERITY_ERROR: ::DWORD = 0xC0000000; +//710 +STRUCT!{struct FLOAT128 { + LowPart: ::__int64, + HighPart: ::__int64, +}} +pub type PFLOAT128 = *mut FLOAT128; +pub type LONGLONG = ::__int64; +pub type ULONGLONG = ::__uint64; +pub type PLONGLONG = *mut LONGLONG; +pub type PULONGLONG = *mut ULONGLONG; +pub type USN = LONGLONG; +pub type LARGE_INTEGER = LONGLONG; +pub type PLARGE_INTEGER = *mut LARGE_INTEGER; +pub type ULARGE_INTEGER = ULONGLONG; +pub type PULARGE_INTEGER= *mut ULARGE_INTEGER; +pub type RTL_REFERENCE_COUNT = ::LONG_PTR; +pub type PRTL_REFERENCE_COUNT = *mut ::LONG_PTR; +STRUCT!{struct LUID { + LowPart: ::DWORD, + HighPart: LONG, +}} +pub type PLUID = *mut LUID; +pub type DWORDLONG = ULONGLONG; +pub type PDWORDLONG = *mut DWORDLONG; +//1042 +pub type BOOLEAN = ::BYTE; +pub type PBOOLEAN = *mut BOOLEAN; +STRUCT!{struct LIST_ENTRY { + Flink: *mut LIST_ENTRY, + Blink: *mut LIST_ENTRY, +}} +pub type PLIST_ENTRY = *mut LIST_ENTRY; +STRUCT!{struct SINGLE_LIST_ENTRY { + Next: *mut SINGLE_LIST_ENTRY, +}} +pub type PSINGLE_LIST_ENTRY = *mut SINGLE_LIST_ENTRY; +STRUCT!{struct LIST_ENTRY32 { + Flink: ::DWORD, + Blink: ::DWORD, +}} +pub type PLIST_ENTRY32 = *mut LIST_ENTRY32; +STRUCT!{struct LIST_ENTRY64 { + Flink: ULONGLONG, + Blink: ULONGLONG, +}} +pub type PLIST_ENTRY64 = *mut LIST_ENTRY64; +STRUCT!{struct OBJECTID { + Lineage: ::GUID, + Uniquifier: ::DWORD, +}} +pub const MINCHAR: ::CHAR = 0x80u8 as ::CHAR; +pub const MAXCHAR: ::CHAR = 0x7f; +pub const MINSHORT: ::SHORT = 0x8000u16 as ::SHORT; +pub const MAXSHORT: ::SHORT = 0x7fff; +pub const MINLONG: ::LONG = 0x80000000u32 as ::LONG; +pub const MAXLONG: ::LONG = 0x7fffffff; +pub const MAXBYTE: ::BYTE = 0xff; +pub const MAXWORD: ::WORD = 0xffff; +pub const MAXDWORD: ::DWORD = 0xffffffff; +//1300 +pub type PEXCEPTION_ROUTINE = Option<unsafe extern "system" fn( + ExceptionRecord: *mut EXCEPTION_RECORD, EstablisherFrame: PVOID, ContextRecord: *mut CONTEXT, + DispatcherContext: PVOID, +) -> ::EXCEPTION_DISPOSITION>; +//1498 +pub const LANG_NEUTRAL: ::WORD = 0x00; +pub const LANG_INVARIANT: ::WORD = 0x7f; +pub const LANG_AFRIKAANS: ::WORD = 0x36; +pub const LANG_ALBANIAN: ::WORD = 0x1c; +pub const LANG_ALSATIAN: ::WORD = 0x84; +pub const LANG_AMHARIC: ::WORD = 0x5e; +pub const LANG_ARABIC: ::WORD = 0x01; +pub const LANG_ARMENIAN: ::WORD = 0x2b; +pub const LANG_ASSAMESE: ::WORD = 0x4d; +pub const LANG_AZERI: ::WORD = 0x2c; +pub const LANG_AZERBAIJANI: ::WORD = 0x2c; +pub const LANG_BANGLA: ::WORD = 0x45; +pub const LANG_BASHKIR: ::WORD = 0x6d; +pub const LANG_BASQUE: ::WORD = 0x2d; +pub const LANG_BELARUSIAN: ::WORD = 0x23; +pub const LANG_BENGALI: ::WORD = 0x45; +pub const LANG_BRETON: ::WORD = 0x7e; +pub const LANG_BOSNIAN: ::WORD = 0x1a; +pub const LANG_BOSNIAN_NEUTRAL: ::WORD = 0x781a; +pub const LANG_BULGARIAN: ::WORD = 0x02; +pub const LANG_CATALAN: ::WORD = 0x03; +pub const LANG_CENTRAL_KURDISH: ::WORD = 0x92; +pub const LANG_CHEROKEE: ::WORD = 0x5c; +pub const LANG_CHINESE: ::WORD = 0x04; +pub const LANG_CHINESE_SIMPLIFIED: ::WORD = 0x04; +pub const LANG_CHINESE_TRADITIONAL: ::WORD = 0x7c04; +pub const LANG_CORSICAN: ::WORD = 0x83; +pub const LANG_CROATIAN: ::WORD = 0x1a; +pub const LANG_CZECH: ::WORD = 0x05; +pub const LANG_DANISH: ::WORD = 0x06; +pub const LANG_DARI: ::WORD = 0x8c; +pub const LANG_DIVEHI: ::WORD = 0x65; +pub const LANG_DUTCH: ::WORD = 0x13; +pub const LANG_ENGLISH: ::WORD = 0x09; +pub const LANG_ESTONIAN: ::WORD = 0x25; +pub const LANG_FAEROESE: ::WORD = 0x38; +pub const LANG_FARSI: ::WORD = 0x29; +pub const LANG_FILIPINO: ::WORD = 0x64; +pub const LANG_FINNISH: ::WORD = 0x0b; +pub const LANG_FRENCH: ::WORD = 0x0c; +pub const LANG_FRISIAN: ::WORD = 0x62; +pub const LANG_FULAH: ::WORD = 0x67; +pub const LANG_GALICIAN: ::WORD = 0x56; +pub const LANG_GEORGIAN: ::WORD = 0x37; +pub const LANG_GERMAN: ::WORD = 0x07; +pub const LANG_GREEK: ::WORD = 0x08; +pub const LANG_GREENLANDIC: ::WORD = 0x6f; +pub const LANG_GUJARATI: ::WORD = 0x47; +pub const LANG_HAUSA: ::WORD = 0x68; +pub const LANG_HAWAIIAN: ::WORD = 0x75; +pub const LANG_HEBREW: ::WORD = 0x0d; +pub const LANG_HINDI: ::WORD = 0x39; +pub const LANG_HUNGARIAN: ::WORD = 0x0e; +pub const LANG_ICELANDIC: ::WORD = 0x0f; +pub const LANG_IGBO: ::WORD = 0x70; +pub const LANG_INDONESIAN: ::WORD = 0x21; +pub const LANG_INUKTITUT: ::WORD = 0x5d; +pub const LANG_IRISH: ::WORD = 0x3c; +pub const LANG_ITALIAN: ::WORD = 0x10; +pub const LANG_JAPANESE: ::WORD = 0x11; +pub const LANG_KANNADA: ::WORD = 0x4b; +pub const LANG_KASHMIRI: ::WORD = 0x60; +pub const LANG_KAZAK: ::WORD = 0x3f; +pub const LANG_KHMER: ::WORD = 0x53; +pub const LANG_KICHE: ::WORD = 0x86; +pub const LANG_KINYARWANDA: ::WORD = 0x87; +pub const LANG_KONKANI: ::WORD = 0x57; +pub const LANG_KOREAN: ::WORD = 0x12; +pub const LANG_KYRGYZ: ::WORD = 0x40; +pub const LANG_LAO: ::WORD = 0x54; +pub const LANG_LATVIAN: ::WORD = 0x26; +pub const LANG_LITHUANIAN: ::WORD = 0x27; +pub const LANG_LOWER_SORBIAN: ::WORD = 0x2e; +pub const LANG_LUXEMBOURGISH: ::WORD = 0x6e; +pub const LANG_MACEDONIAN: ::WORD = 0x2f; +pub const LANG_MALAY: ::WORD = 0x3e; +pub const LANG_MALAYALAM: ::WORD = 0x4c; +pub const LANG_MALTESE: ::WORD = 0x3a; +pub const LANG_MANIPURI: ::WORD = 0x58; +pub const LANG_MAORI: ::WORD = 0x81; +pub const LANG_MAPUDUNGUN: ::WORD = 0x7a; +pub const LANG_MARATHI: ::WORD = 0x4e; +pub const LANG_MOHAWK: ::WORD = 0x7c; +pub const LANG_MONGOLIAN: ::WORD = 0x50; +pub const LANG_NEPALI: ::WORD = 0x61; +pub const LANG_NORWEGIAN: ::WORD = 0x14; +pub const LANG_OCCITAN: ::WORD = 0x82; +pub const LANG_ODIA: ::WORD = 0x48; +pub const LANG_ORIYA: ::WORD = 0x48; +pub const LANG_PASHTO: ::WORD = 0x63; +pub const LANG_PERSIAN: ::WORD = 0x29; +pub const LANG_POLISH: ::WORD = 0x15; +pub const LANG_PORTUGUESE: ::WORD = 0x16; +pub const LANG_PULAR: ::WORD = 0x67; +pub const LANG_PUNJABI: ::WORD = 0x46; +pub const LANG_QUECHUA: ::WORD = 0x6b; +pub const LANG_ROMANIAN: ::WORD = 0x18; +pub const LANG_ROMANSH: ::WORD = 0x17; +pub const LANG_RUSSIAN: ::WORD = 0x19; +pub const LANG_SAKHA: ::WORD = 0x85; +pub const LANG_SAMI: ::WORD = 0x3b; +pub const LANG_SANSKRIT: ::WORD = 0x4f; +pub const LANG_SCOTTISH_GAELIC: ::WORD = 0x91; +pub const LANG_SERBIAN: ::WORD = 0x1a; +pub const LANG_SERBIAN_NEUTRAL: ::WORD = 0x7c1a; +pub const LANG_SINDHI: ::WORD = 0x59; +pub const LANG_SINHALESE: ::WORD = 0x5b; +pub const LANG_SLOVAK: ::WORD = 0x1b; +pub const LANG_SLOVENIAN: ::WORD = 0x24; +pub const LANG_SOTHO: ::WORD = 0x6c; +pub const LANG_SPANISH: ::WORD = 0x0a; +pub const LANG_SWAHILI: ::WORD = 0x41; +pub const LANG_SWEDISH: ::WORD = 0x1d; +pub const LANG_SYRIAC: ::WORD = 0x5a; +pub const LANG_TAJIK: ::WORD = 0x28; +pub const LANG_TAMAZIGHT: ::WORD = 0x5f; +pub const LANG_TAMIL: ::WORD = 0x49; +pub const LANG_TATAR: ::WORD = 0x44; +pub const LANG_TELUGU: ::WORD = 0x4a; +pub const LANG_THAI: ::WORD = 0x1e; +pub const LANG_TIBETAN: ::WORD = 0x51; +pub const LANG_TIGRIGNA: ::WORD = 0x73; +pub const LANG_TIGRINYA: ::WORD = 0x73; +pub const LANG_TSWANA: ::WORD = 0x32; +pub const LANG_TURKISH: ::WORD = 0x1f; +pub const LANG_TURKMEN: ::WORD = 0x42; +pub const LANG_UIGHUR: ::WORD = 0x80; +pub const LANG_UKRAINIAN: ::WORD = 0x22; +pub const LANG_UPPER_SORBIAN: ::WORD = 0x2e; +pub const LANG_URDU: ::WORD = 0x20; +pub const LANG_UZBEK: ::WORD = 0x43; +pub const LANG_VALENCIAN: ::WORD = 0x03; +pub const LANG_VIETNAMESE: ::WORD = 0x2a; +pub const LANG_WELSH: ::WORD = 0x52; +pub const LANG_WOLOF: ::WORD = 0x88; +pub const LANG_XHOSA: ::WORD = 0x34; +pub const LANG_YAKUT: ::WORD = 0x85; +pub const LANG_YI: ::WORD = 0x78; +pub const LANG_YORUBA: ::WORD = 0x6a; +pub const LANG_ZULU: ::WORD = 0x35; +//1651 +pub const SUBLANG_NEUTRAL: ::WORD = 0x00; +pub const SUBLANG_DEFAULT: ::WORD = 0x01; +pub const SUBLANG_SYS_DEFAULT: ::WORD = 0x02; +pub const SUBLANG_CUSTOM_DEFAULT: ::WORD = 0x03; +pub const SUBLANG_CUSTOM_UNSPECIFIED: ::WORD = 0x04; +pub const SUBLANG_UI_CUSTOM_DEFAULT: ::WORD = 0x05; +pub const SUBLANG_AFRIKAANS_SOUTH_AFRICA: ::WORD = 0x01; +pub const SUBLANG_ALBANIAN_ALBANIA: ::WORD = 0x01; +pub const SUBLANG_ALSATIAN_FRANCE: ::WORD = 0x01; +pub const SUBLANG_AMHARIC_ETHIOPIA: ::WORD = 0x01; +pub const SUBLANG_ARABIC_SAUDI_ARABIA: ::WORD = 0x01; +pub const SUBLANG_ARABIC_IRAQ: ::WORD = 0x02; +pub const SUBLANG_ARABIC_EGYPT: ::WORD = 0x03; +pub const SUBLANG_ARABIC_LIBYA: ::WORD = 0x04; +pub const SUBLANG_ARABIC_ALGERIA: ::WORD = 0x05; +pub const SUBLANG_ARABIC_MOROCCO: ::WORD = 0x06; +pub const SUBLANG_ARABIC_TUNISIA: ::WORD = 0x07; +pub const SUBLANG_ARABIC_OMAN: ::WORD = 0x08; +pub const SUBLANG_ARABIC_YEMEN: ::WORD = 0x09; +pub const SUBLANG_ARABIC_SYRIA: ::WORD = 0x0a; +pub const SUBLANG_ARABIC_JORDAN: ::WORD = 0x0b; +pub const SUBLANG_ARABIC_LEBANON: ::WORD = 0x0c; +pub const SUBLANG_ARABIC_KUWAIT: ::WORD = 0x0d; +pub const SUBLANG_ARABIC_UAE: ::WORD = 0x0e; +pub const SUBLANG_ARABIC_BAHRAIN: ::WORD = 0x0f; +pub const SUBLANG_ARABIC_QATAR: ::WORD = 0x10; +pub const SUBLANG_ARMENIAN_ARMENIA: ::WORD = 0x01; +pub const SUBLANG_ASSAMESE_INDIA: ::WORD = 0x01; +pub const SUBLANG_AZERI_LATIN: ::WORD = 0x01; +pub const SUBLANG_AZERI_CYRILLIC: ::WORD = 0x02; +pub const SUBLANG_AZERBAIJANI_AZERBAIJAN_LATIN: ::WORD = 0x01; +pub const SUBLANG_AZERBAIJANI_AZERBAIJAN_CYRILLIC: ::WORD = 0x02; +pub const SUBLANG_BANGLA_INDIA: ::WORD = 0x01; +pub const SUBLANG_BANGLA_BANGLADESH: ::WORD = 0x02; +pub const SUBLANG_BASHKIR_RUSSIA: ::WORD = 0x01; +pub const SUBLANG_BASQUE_BASQUE: ::WORD = 0x01; +pub const SUBLANG_BELARUSIAN_BELARUS: ::WORD = 0x01; +pub const SUBLANG_BENGALI_INDIA: ::WORD = 0x01; +pub const SUBLANG_BENGALI_BANGLADESH: ::WORD = 0x02; +pub const SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_LATIN: ::WORD = 0x05; +pub const SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_CYRILLIC: ::WORD = 0x08; +pub const SUBLANG_BRETON_FRANCE: ::WORD = 0x01; +pub const SUBLANG_BULGARIAN_BULGARIA: ::WORD = 0x01; +pub const SUBLANG_CATALAN_CATALAN: ::WORD = 0x01; +pub const SUBLANG_CENTRAL_KURDISH_IRAQ: ::WORD = 0x01; +pub const SUBLANG_CHEROKEE_CHEROKEE: ::WORD = 0x01; +pub const SUBLANG_CHINESE_TRADITIONAL: ::WORD = 0x01; +pub const SUBLANG_CHINESE_SIMPLIFIED: ::WORD = 0x02; +pub const SUBLANG_CHINESE_HONGKONG: ::WORD = 0x03; +pub const SUBLANG_CHINESE_SINGAPORE: ::WORD = 0x04; +pub const SUBLANG_CHINESE_MACAU: ::WORD = 0x05; +pub const SUBLANG_CORSICAN_FRANCE: ::WORD = 0x01; +pub const SUBLANG_CZECH_CZECH_REPUBLIC: ::WORD = 0x01; +pub const SUBLANG_CROATIAN_CROATIA: ::WORD = 0x01; +pub const SUBLANG_CROATIAN_BOSNIA_HERZEGOVINA_LATIN: ::WORD = 0x04; +pub const SUBLANG_DANISH_DENMARK: ::WORD = 0x01; +pub const SUBLANG_DARI_AFGHANISTAN: ::WORD = 0x01; +pub const SUBLANG_DIVEHI_MALDIVES: ::WORD = 0x01; +pub const SUBLANG_DUTCH: ::WORD = 0x01; +pub const SUBLANG_DUTCH_BELGIAN: ::WORD = 0x02; +pub const SUBLANG_ENGLISH_US: ::WORD = 0x01; +pub const SUBLANG_ENGLISH_UK: ::WORD = 0x02; +pub const SUBLANG_ENGLISH_AUS: ::WORD = 0x03; +pub const SUBLANG_ENGLISH_CAN: ::WORD = 0x04; +pub const SUBLANG_ENGLISH_NZ: ::WORD = 0x05; +pub const SUBLANG_ENGLISH_EIRE: ::WORD = 0x06; +pub const SUBLANG_ENGLISH_SOUTH_AFRICA: ::WORD = 0x07; +pub const SUBLANG_ENGLISH_JAMAICA: ::WORD = 0x08; +pub const SUBLANG_ENGLISH_CARIBBEAN: ::WORD = 0x09; +pub const SUBLANG_ENGLISH_BELIZE: ::WORD = 0x0a; +pub const SUBLANG_ENGLISH_TRINIDAD: ::WORD = 0x0b; +pub const SUBLANG_ENGLISH_ZIMBABWE: ::WORD = 0x0c; +pub const SUBLANG_ENGLISH_PHILIPPINES: ::WORD = 0x0d; +pub const SUBLANG_ENGLISH_INDIA: ::WORD = 0x10; +pub const SUBLANG_ENGLISH_MALAYSIA: ::WORD = 0x11; +pub const SUBLANG_ENGLISH_SINGAPORE: ::WORD = 0x12; +pub const SUBLANG_ESTONIAN_ESTONIA: ::WORD = 0x01; +pub const SUBLANG_FAEROESE_FAROE_ISLANDS: ::WORD = 0x01; +pub const SUBLANG_FILIPINO_PHILIPPINES: ::WORD = 0x01; +pub const SUBLANG_FINNISH_FINLAND: ::WORD = 0x01; +pub const SUBLANG_FRENCH: ::WORD = 0x01; +pub const SUBLANG_FRENCH_BELGIAN: ::WORD = 0x02; +pub const SUBLANG_FRENCH_CANADIAN: ::WORD = 0x03; +pub const SUBLANG_FRENCH_SWISS: ::WORD = 0x04; +pub const SUBLANG_FRENCH_LUXEMBOURG: ::WORD = 0x05; +pub const SUBLANG_FRENCH_MONACO: ::WORD = 0x06; +pub const SUBLANG_FRISIAN_NETHERLANDS: ::WORD = 0x01; +pub const SUBLANG_FULAH_SENEGAL: ::WORD = 0x02; +pub const SUBLANG_GALICIAN_GALICIAN: ::WORD = 0x01; +pub const SUBLANG_GEORGIAN_GEORGIA: ::WORD = 0x01; +pub const SUBLANG_GERMAN: ::WORD = 0x01; +pub const SUBLANG_GERMAN_SWISS: ::WORD = 0x02; +pub const SUBLANG_GERMAN_AUSTRIAN: ::WORD = 0x03; +pub const SUBLANG_GERMAN_LUXEMBOURG: ::WORD = 0x04; +pub const SUBLANG_GERMAN_LIECHTENSTEIN: ::WORD = 0x05; +pub const SUBLANG_GREEK_GREECE: ::WORD = 0x01; +pub const SUBLANG_GREENLANDIC_GREENLAND: ::WORD = 0x01; +pub const SUBLANG_GUJARATI_INDIA: ::WORD = 0x01; +pub const SUBLANG_HAUSA_NIGERIA_LATIN: ::WORD = 0x01; +pub const SUBLANG_HAWAIIAN_US: ::WORD = 0x01; +pub const SUBLANG_HEBREW_ISRAEL: ::WORD = 0x01; +pub const SUBLANG_HINDI_INDIA: ::WORD = 0x01; +pub const SUBLANG_HUNGARIAN_HUNGARY: ::WORD = 0x01; +pub const SUBLANG_ICELANDIC_ICELAND: ::WORD = 0x01; +pub const SUBLANG_IGBO_NIGERIA: ::WORD = 0x01; +pub const SUBLANG_INDONESIAN_INDONESIA: ::WORD = 0x01; +pub const SUBLANG_INUKTITUT_CANADA: ::WORD = 0x01; +pub const SUBLANG_INUKTITUT_CANADA_LATIN: ::WORD = 0x02; +pub const SUBLANG_IRISH_IRELAND: ::WORD = 0x02; +pub const SUBLANG_ITALIAN: ::WORD = 0x01; +pub const SUBLANG_ITALIAN_SWISS: ::WORD = 0x02; +pub const SUBLANG_JAPANESE_JAPAN: ::WORD = 0x01; +pub const SUBLANG_KANNADA_INDIA: ::WORD = 0x01; +pub const SUBLANG_KASHMIRI_SASIA: ::WORD = 0x02; +pub const SUBLANG_KASHMIRI_INDIA: ::WORD = 0x02; +pub const SUBLANG_KAZAK_KAZAKHSTAN: ::WORD = 0x01; +pub const SUBLANG_KHMER_CAMBODIA: ::WORD = 0x01; +pub const SUBLANG_KICHE_GUATEMALA: ::WORD = 0x01; +pub const SUBLANG_KINYARWANDA_RWANDA: ::WORD = 0x01; +pub const SUBLANG_KONKANI_INDIA: ::WORD = 0x01; +pub const SUBLANG_KOREAN: ::WORD = 0x01; +pub const SUBLANG_KYRGYZ_KYRGYZSTAN: ::WORD = 0x01; +pub const SUBLANG_LAO_LAO: ::WORD = 0x01; +pub const SUBLANG_LATVIAN_LATVIA: ::WORD = 0x01; +pub const SUBLANG_LITHUANIAN: ::WORD = 0x01; +pub const SUBLANG_LOWER_SORBIAN_GERMANY: ::WORD = 0x02; +pub const SUBLANG_LUXEMBOURGISH_LUXEMBOURG: ::WORD = 0x01; +pub const SUBLANG_MACEDONIAN_MACEDONIA: ::WORD = 0x01; +pub const SUBLANG_MALAY_MALAYSIA: ::WORD = 0x01; +pub const SUBLANG_MALAY_BRUNEI_DARUSSALAM: ::WORD = 0x02; +pub const SUBLANG_MALAYALAM_INDIA: ::WORD = 0x01; +pub const SUBLANG_MALTESE_MALTA: ::WORD = 0x01; +pub const SUBLANG_MAORI_NEW_ZEALAND: ::WORD = 0x01; +pub const SUBLANG_MAPUDUNGUN_CHILE: ::WORD = 0x01; +pub const SUBLANG_MARATHI_INDIA: ::WORD = 0x01; +pub const SUBLANG_MOHAWK_MOHAWK: ::WORD = 0x01; +pub const SUBLANG_MONGOLIAN_CYRILLIC_MONGOLIA: ::WORD = 0x01; +pub const SUBLANG_MONGOLIAN_PRC: ::WORD = 0x02; +pub const SUBLANG_NEPALI_INDIA: ::WORD = 0x02; +pub const SUBLANG_NEPALI_NEPAL: ::WORD = 0x01; +pub const SUBLANG_NORWEGIAN_BOKMAL: ::WORD = 0x01; +pub const SUBLANG_NORWEGIAN_NYNORSK: ::WORD = 0x02; +pub const SUBLANG_OCCITAN_FRANCE: ::WORD = 0x01; +pub const SUBLANG_ODIA_INDIA: ::WORD = 0x01; +pub const SUBLANG_ORIYA_INDIA: ::WORD = 0x01; +pub const SUBLANG_PASHTO_AFGHANISTAN: ::WORD = 0x01; +pub const SUBLANG_PERSIAN_IRAN: ::WORD = 0x01; +pub const SUBLANG_POLISH_POLAND: ::WORD = 0x01; +pub const SUBLANG_PORTUGUESE: ::WORD = 0x02; +pub const SUBLANG_PORTUGUESE_BRAZILIAN: ::WORD = 0x01; +pub const SUBLANG_PULAR_SENEGAL: ::WORD = 0x02; +pub const SUBLANG_PUNJABI_INDIA: ::WORD = 0x01; +pub const SUBLANG_PUNJABI_PAKISTAN: ::WORD = 0x02; +pub const SUBLANG_QUECHUA_BOLIVIA: ::WORD = 0x01; +pub const SUBLANG_QUECHUA_ECUADOR: ::WORD = 0x02; +pub const SUBLANG_QUECHUA_PERU: ::WORD = 0x03; +pub const SUBLANG_ROMANIAN_ROMANIA: ::WORD = 0x01; +pub const SUBLANG_ROMANSH_SWITZERLAND: ::WORD = 0x01; +pub const SUBLANG_RUSSIAN_RUSSIA: ::WORD = 0x01; +pub const SUBLANG_SAKHA_RUSSIA: ::WORD = 0x01; +pub const SUBLANG_SAMI_NORTHERN_NORWAY: ::WORD = 0x01; +pub const SUBLANG_SAMI_NORTHERN_SWEDEN: ::WORD = 0x02; +pub const SUBLANG_SAMI_NORTHERN_FINLAND: ::WORD = 0x03; +pub const SUBLANG_SAMI_LULE_NORWAY: ::WORD = 0x04; +pub const SUBLANG_SAMI_LULE_SWEDEN: ::WORD = 0x05; +pub const SUBLANG_SAMI_SOUTHERN_NORWAY: ::WORD = 0x06; +pub const SUBLANG_SAMI_SOUTHERN_SWEDEN: ::WORD = 0x07; +pub const SUBLANG_SAMI_SKOLT_FINLAND: ::WORD = 0x08; +pub const SUBLANG_SAMI_INARI_FINLAND: ::WORD = 0x09; +pub const SUBLANG_SANSKRIT_INDIA: ::WORD = 0x01; +pub const SUBLANG_SCOTTISH_GAELIC: ::WORD = 0x01; +pub const SUBLANG_SERBIAN_BOSNIA_HERZEGOVINA_LATIN: ::WORD = 0x06; +pub const SUBLANG_SERBIAN_BOSNIA_HERZEGOVINA_CYRILLIC: ::WORD = 0x07; +pub const SUBLANG_SERBIAN_MONTENEGRO_LATIN: ::WORD = 0x0b; +pub const SUBLANG_SERBIAN_MONTENEGRO_CYRILLIC: ::WORD = 0x0c; +pub const SUBLANG_SERBIAN_SERBIA_LATIN: ::WORD = 0x09; +pub const SUBLANG_SERBIAN_SERBIA_CYRILLIC: ::WORD = 0x0a; +pub const SUBLANG_SERBIAN_CROATIA: ::WORD = 0x01; +pub const SUBLANG_SERBIAN_LATIN: ::WORD = 0x02; +pub const SUBLANG_SERBIAN_CYRILLIC: ::WORD = 0x03; +pub const SUBLANG_SINDHI_INDIA: ::WORD = 0x01; +pub const SUBLANG_SINDHI_PAKISTAN: ::WORD = 0x02; +pub const SUBLANG_SINDHI_AFGHANISTAN: ::WORD = 0x02; +pub const SUBLANG_SINHALESE_SRI_LANKA: ::WORD = 0x01; +pub const SUBLANG_SOTHO_NORTHERN_SOUTH_AFRICA: ::WORD = 0x01; +pub const SUBLANG_SLOVAK_SLOVAKIA: ::WORD = 0x01; +pub const SUBLANG_SLOVENIAN_SLOVENIA: ::WORD = 0x01; +pub const SUBLANG_SPANISH: ::WORD = 0x01; +pub const SUBLANG_SPANISH_MEXICAN: ::WORD = 0x02; +pub const SUBLANG_SPANISH_MODERN: ::WORD = 0x03; +pub const SUBLANG_SPANISH_GUATEMALA: ::WORD = 0x04; +pub const SUBLANG_SPANISH_COSTA_RICA: ::WORD = 0x05; +pub const SUBLANG_SPANISH_PANAMA: ::WORD = 0x06; +pub const SUBLANG_SPANISH_DOMINICAN_REPUBLIC: ::WORD = 0x07; +pub const SUBLANG_SPANISH_VENEZUELA: ::WORD = 0x08; +pub const SUBLANG_SPANISH_COLOMBIA: ::WORD = 0x09; +pub const SUBLANG_SPANISH_PERU: ::WORD = 0x0a; +pub const SUBLANG_SPANISH_ARGENTINA: ::WORD = 0x0b; +pub const SUBLANG_SPANISH_ECUADOR: ::WORD = 0x0c; +pub const SUBLANG_SPANISH_CHILE: ::WORD = 0x0d; +pub const SUBLANG_SPANISH_URUGUAY: ::WORD = 0x0e; +pub const SUBLANG_SPANISH_PARAGUAY: ::WORD = 0x0f; +pub const SUBLANG_SPANISH_BOLIVIA: ::WORD = 0x10; +pub const SUBLANG_SPANISH_EL_SALVADOR: ::WORD = 0x11; +pub const SUBLANG_SPANISH_HONDURAS: ::WORD = 0x12; +pub const SUBLANG_SPANISH_NICARAGUA: ::WORD = 0x13; +pub const SUBLANG_SPANISH_PUERTO_RICO: ::WORD = 0x14; +pub const SUBLANG_SPANISH_US: ::WORD = 0x15; +pub const SUBLANG_SWAHILI_KENYA: ::WORD = 0x01; +pub const SUBLANG_SWEDISH: ::WORD = 0x01; +pub const SUBLANG_SWEDISH_FINLAND: ::WORD = 0x02; +pub const SUBLANG_SYRIAC_SYRIA: ::WORD = 0x01; +pub const SUBLANG_TAJIK_TAJIKISTAN: ::WORD = 0x01; +pub const SUBLANG_TAMAZIGHT_ALGERIA_LATIN: ::WORD = 0x02; +pub const SUBLANG_TAMAZIGHT_MOROCCO_TIFINAGH: ::WORD = 0x04; +pub const SUBLANG_TAMIL_INDIA: ::WORD = 0x01; +pub const SUBLANG_TAMIL_SRI_LANKA: ::WORD = 0x02; +pub const SUBLANG_TATAR_RUSSIA: ::WORD = 0x01; +pub const SUBLANG_TELUGU_INDIA: ::WORD = 0x01; +pub const SUBLANG_THAI_THAILAND: ::WORD = 0x01; +pub const SUBLANG_TIBETAN_PRC: ::WORD = 0x01; +pub const SUBLANG_TIGRIGNA_ERITREA: ::WORD = 0x02; +pub const SUBLANG_TIGRINYA_ERITREA: ::WORD = 0x02; +pub const SUBLANG_TIGRINYA_ETHIOPIA: ::WORD = 0x01; +pub const SUBLANG_TSWANA_BOTSWANA: ::WORD = 0x02; +pub const SUBLANG_TSWANA_SOUTH_AFRICA: ::WORD = 0x01; +pub const SUBLANG_TURKISH_TURKEY: ::WORD = 0x01; +pub const SUBLANG_TURKMEN_TURKMENISTAN: ::WORD = 0x01; +pub const SUBLANG_UIGHUR_PRC: ::WORD = 0x01; +pub const SUBLANG_UKRAINIAN_UKRAINE: ::WORD = 0x01; +pub const SUBLANG_UPPER_SORBIAN_GERMANY: ::WORD = 0x01; +pub const SUBLANG_URDU_PAKISTAN: ::WORD = 0x01; +pub const SUBLANG_URDU_INDIA: ::WORD = 0x02; +pub const SUBLANG_UZBEK_LATIN: ::WORD = 0x01; +pub const SUBLANG_UZBEK_CYRILLIC: ::WORD = 0x02; +pub const SUBLANG_VALENCIAN_VALENCIA: ::WORD = 0x02; +pub const SUBLANG_VIETNAMESE_VIETNAM: ::WORD = 0x01; +pub const SUBLANG_WELSH_UNITED_KINGDOM: ::WORD = 0x01; +pub const SUBLANG_WOLOF_SENEGAL: ::WORD = 0x01; +pub const SUBLANG_XHOSA_SOUTH_AFRICA: ::WORD = 0x01; +pub const SUBLANG_YAKUT_RUSSIA: ::WORD = 0x01; +pub const SUBLANG_YI_PRC: ::WORD = 0x01; +pub const SUBLANG_YORUBA_NIGERIA: ::WORD = 0x01; +pub const SUBLANG_ZULU_SOUTH_AFRICA: ::WORD = 0x01; +//1962 +// FIXME: Once feature(const_fn) or some CTFE alternative becomes stable, MAKELANGID! can go +// unless we want to #[macro_export] it ... +macro_rules! MAKELANGID { ($p:expr, $s:expr) => ($s << 10 | $p) } +pub fn MAKELANGID(p: ::WORD, s: ::WORD) -> ::LANGID { MAKELANGID!(p, s) } +pub fn PRIMARYLANGID(lgid: ::LANGID) -> ::WORD { lgid & 0x3ff } +pub fn SUBLANGID(lgid: ::LANGID) -> ::WORD { lgid >> 10 } +//2019 +pub const LANG_SYSTEM_DEFAULT: LANGID = MAKELANGID!(LANG_NEUTRAL, SUBLANG_SYS_DEFAULT); +pub const LANG_USER_DEFAULT: LANGID = MAKELANGID!(LANG_NEUTRAL, SUBLANG_DEFAULT); +//2214 +pub const MAXIMUM_WAIT_OBJECTS: ::DWORD = 64; +pub const MAXIMUM_SUSPEND_COUNT: ::CHAR = MAXCHAR; +//2277 +pub type KSPIN_LOCK = ::ULONG_PTR; +pub type PKSPIN_LOCK = *mut KSPIN_LOCK; +STRUCT!{struct M128A { // FIXME align 16 + Low: ULONGLONG, + High: LONGLONG, +}} +pub type PM128A = *mut M128A; +#[cfg(target_arch = "x86")] +STRUCT!{nodebug struct XSAVE_FORMAT { // FIXME align 16 + ControlWord: ::WORD, + StatusWord: ::WORD, + TagWord: ::BYTE, + Reserved1: ::BYTE, + ErrorOpcode: ::WORD, + ErrorOffset: ::DWORD, + ErrorSelector: ::WORD, + Reserved2: ::WORD, + DataOffset: ::DWORD, + DataSelector: ::WORD, + Reserved3: ::WORD, + MxCsr: ::DWORD, + MxCsr_Mask: ::DWORD, + FloatRegisters: [M128A; 8], + XmmRegisters: [M128A; 8], + Reserved4: [::BYTE; 224], +}} +#[cfg(target_arch = "x86_64")] +STRUCT!{nodebug struct XSAVE_FORMAT { // FIXME align 16 + ControlWord: ::WORD, + StatusWord: ::WORD, + TagWord: ::BYTE, + Reserved1: ::BYTE, + ErrorOpcode: ::WORD, + ErrorOffset: ::DWORD, + ErrorSelector: ::WORD, + Reserved2: ::WORD, + DataOffset: ::DWORD, + DataSelector: ::WORD, + Reserved3: ::WORD, + MxCsr: ::DWORD, + MxCsr_Mask: ::DWORD, + FloatRegisters: [M128A; 8], + XmmRegisters: [M128A; 16], + Reserved4: [::BYTE; 96], +}} +//3563 +#[cfg(target_arch = "x86")] +pub const SIZE_OF_80387_REGISTERS: usize = 80; +#[cfg(target_arch = "x86")] +STRUCT!{nodebug struct FLOATING_SAVE_AREA { + ControlWord: ::DWORD, + StatusWord: ::DWORD, + TagWord: ::DWORD, + ErrorOffset: ::DWORD, + ErrorSelector: ::DWORD, + DataOffset: ::DWORD, + DataSelector: ::DWORD, + RegisterArea: [::BYTE; SIZE_OF_80387_REGISTERS], + Spare0: ::DWORD, +}} +#[cfg(target_arch = "x86")] +pub type PFLOATING_SAVE_AREA = *mut FLOATING_SAVE_AREA; +#[cfg(target_arch = "x86")] +pub const MAXIMUM_SUPPORTED_EXTENSION: usize = 512; +#[cfg(target_arch = "x86")] +STRUCT!{nodebug struct CONTEXT { + ContextFlags: ::DWORD, + Dr0: ::DWORD, + Dr1: ::DWORD, + Dr2: ::DWORD, + Dr3: ::DWORD, + Dr6: ::DWORD, + Dr7: ::DWORD, + FloatSave: FLOATING_SAVE_AREA, + SegGs: ::DWORD, + SegFs: ::DWORD, + SegEs: ::DWORD, + SegDs: ::DWORD, + Edi: ::DWORD, + Esi: ::DWORD, + Ebx: ::DWORD, + Edx: ::DWORD, + Ecx: ::DWORD, + Eax: ::DWORD, + Ebp: ::DWORD, + Eip: ::DWORD, + SegCs: ::DWORD, + EFlags: ::DWORD, + Esp: ::DWORD, + SegSs: ::DWORD, + ExtendedRegisters: [::BYTE; MAXIMUM_SUPPORTED_EXTENSION], +}} +#[cfg(target_arch = "x86_64")] +pub type XMM_SAVE_AREA32 = XSAVE_FORMAT; +pub type PXMM_SAVE_AREA32 = *mut XSAVE_FORMAT; +// FIXME - Align 16 +#[cfg(target_arch = "x86_64")] +STRUCT!{nodebug struct CONTEXT { + P1Home: ::DWORD64, + P2Home: ::DWORD64, + P3Home: ::DWORD64, + P4Home: ::DWORD64, + P5Home: ::DWORD64, + P6Home: ::DWORD64, + ContextFlags: ::DWORD, + MxCsr: ::DWORD, + SegCs: ::WORD, + SegDs: ::WORD, + SegEs: ::WORD, + SegFs: ::WORD, + SegGs: ::WORD, + SegSs: ::WORD, + EFlags: ::DWORD, + Dr0: ::DWORD64, + Dr1: ::DWORD64, + Dr2: ::DWORD64, + Dr3: ::DWORD64, + Dr6: ::DWORD64, + Dr7: ::DWORD64, + Rax: ::DWORD64, + Rcx: ::DWORD64, + Rdx: ::DWORD64, + Rbx: ::DWORD64, + Rsp: ::DWORD64, + Rbp: ::DWORD64, + Rsi: ::DWORD64, + Rdi: ::DWORD64, + R8: ::DWORD64, + R9: ::DWORD64, + R10: ::DWORD64, + R11: ::DWORD64, + R12: ::DWORD64, + R13: ::DWORD64, + R14: ::DWORD64, + R15: ::DWORD64, + Rip: ::DWORD64, + FltSave: XMM_SAVE_AREA32, + VectorRegister: [::M128A; 26], + VectorControl: ::DWORD64, + DebugControl: ::DWORD64, + LastBranchToRip: ::DWORD64, + LastBranchFromRip: ::DWORD64, + LastExceptionToRip: ::DWORD64, + LastExceptionFromRip: ::DWORD64, +}} +pub type PCONTEXT = *mut CONTEXT; +#[test] +fn test_CONTEXT_size() { + use std::mem::size_of; + if cfg!(target_arch = "x86_64") { + assert_eq!(size_of::<CONTEXT>(), 1232) + } else if cfg!(target_arch = "x86") { + assert_eq!(size_of::<CONTEXT>(), 716) + } +} +pub type RUNTIME_FUNCTION = IMAGE_RUNTIME_FUNCTION_ENTRY; +pub type PRUNTIME_FUNCTION = *mut RUNTIME_FUNCTION; +pub const UNWIND_HISTORY_TABLE_SIZE: usize = 12; +STRUCT!{struct UNWIND_HISTORY_TABLE_ENTRY { + ImageBase: ::DWORD64, + FunctionEntry: PRUNTIME_FUNCTION, +}} +pub type PUNWIND_HISTORY_TABLE_ENTRY = *mut UNWIND_HISTORY_TABLE_ENTRY; +STRUCT!{struct UNWIND_HISTORY_TABLE { + Count: ::DWORD, + LocalHint: ::BYTE, + GlobalHint: ::BYTE, + Search: ::BYTE, + Once: ::BYTE, + LowAddress: ::DWORD64, + HighAddress: ::DWORD64, + Entry: [UNWIND_HISTORY_TABLE_ENTRY; UNWIND_HISTORY_TABLE_SIZE], +}} +pub type PUNWIND_HISTORY_TABLE = *mut UNWIND_HISTORY_TABLE; +pub type PGET_RUNTIME_FUNCTION_CALLBACK = Option<unsafe extern "system" fn( + ControlPc: ::DWORD64, Context: ::PVOID, +) -> PRUNTIME_FUNCTION>; +STRUCT!{struct KNONVOLATILE_CONTEXT_POINTERS_u1 { + Xmm0: PM128A, + Xmm1: PM128A, + Xmm2: PM128A, + Xmm3: PM128A, + Xmm4: PM128A, + Xmm5: PM128A, + Xmm6: PM128A, + Xmm7: PM128A, + Xmm8: PM128A, + Xmm9: PM128A, + Xmm10: PM128A, + Xmm11: PM128A, + Xmm12: PM128A, + Xmm14: PM128A, + Xmm15: PM128A, +}} +STRUCT!{struct KNONVOLATILE_CONTEXT_POINTERS_u2 { + Rax: ::DWORD64, + Rcx: ::DWORD64, + Rdx: ::DWORD64, + Rbx: ::DWORD64, + Rsp: ::DWORD64, + Rbp: ::DWORD64, + Rsi: ::DWORD64, + Rdi: ::DWORD64, + R8: ::DWORD64, + R9: ::DWORD64, + R10: ::DWORD64, + R11: ::DWORD64, + R12: ::DWORD64, + R13: ::DWORD64, + R14: ::DWORD64, + R15: ::DWORD64, +}} +STRUCT!{struct KNONVOLATILE_CONTEXT_POINTERS { + FloatingContext: [PM128A; 16], + IntegerContext: [::PDWORD64; 16], +}} +// FIXME: all unions are untagged +UNION!( + KNONVOLATILE_CONTEXT_POINTERS, FloatingContext, Xmms, Xmms_mut, + KNONVOLATILE_CONTEXT_POINTERS_u1 +); +UNION!( + KNONVOLATILE_CONTEXT_POINTERS, IntegerContext, Regs, Regs_mut, + KNONVOLATILE_CONTEXT_POINTERS_u2 +); +pub type PKNONVOLATILE_CONTEXT_POINTERS = *mut KNONVOLATILE_CONTEXT_POINTERS; +//8983 +pub const EXCEPTION_MAXIMUM_PARAMETERS: usize = 15; +STRUCT!{struct EXCEPTION_RECORD { + ExceptionCode: ::DWORD, + ExceptionFlags: ::DWORD, + ExceptionRecord: *mut EXCEPTION_RECORD, + ExceptionAddress: ::PVOID, + NumberParameters: ::DWORD, + ExceptionInformation: [::ULONG_PTR; EXCEPTION_MAXIMUM_PARAMETERS], +}} +pub type PEXCEPTION_RECORD = *mut EXCEPTION_RECORD; +//9023 +STRUCT!{struct EXCEPTION_POINTERS { + ExceptionRecord: PEXCEPTION_RECORD, + ContextRecord: PCONTEXT, +}} +pub type PEXCEPTION_POINTERS = *mut EXCEPTION_POINTERS; +pub type PACCESS_TOKEN = ::PVOID; +pub type PSECURITY_DESCRIPTOR = ::PVOID; +pub type PSID = ::PVOID; +pub type PCLAIMS_BLOB = ::PVOID; +//9091 +pub type ACCESS_MASK = ::DWORD; +pub type PACCESS_MASK = *mut ACCESS_MASK; +pub const DELETE: ::DWORD = 0x00010000; +pub const READ_CONTROL: ::DWORD = 0x00020000; +pub const WRITE_DAC: ::DWORD = 0x00040000; +pub const WRITE_OWNER: ::DWORD = 0x00080000; +pub const SYNCHRONIZE: ::DWORD = 0x00100000; +pub const STANDARD_RIGHTS_REQUIRED: ::DWORD = 0x000F0000; +pub const STANDARD_RIGHTS_READ: ::DWORD = READ_CONTROL; +pub const STANDARD_RIGHTS_WRITE: ::DWORD = READ_CONTROL; +pub const STANDARD_RIGHTS_EXECUTE: ::DWORD = READ_CONTROL; +pub const STANDARD_RIGHTS_ALL: ::DWORD = 0x001F0000; +pub const SPECIFIC_RIGHTS_ALL: ::DWORD = 0x0000FFFF; +pub const ACCESS_SYSTEM_SECURITY: ::DWORD = 0x01000000; +pub const MAXIMUM_ALLOWED: ::DWORD = 0x02000000; +pub const GENERIC_READ: ::DWORD = 0x80000000; +pub const GENERIC_WRITE: ::DWORD = 0x40000000; +pub const GENERIC_EXECUTE: ::DWORD = 0x20000000; +pub const GENERIC_ALL: ::DWORD = 0x10000000; +//9170 +STRUCT!{struct LUID_AND_ATTRIBUTES { + Luid: LUID, + Attributes: ::DWORD, +}} +pub type PLUID_AND_ATTRIBUTES = *mut LUID_AND_ATTRIBUTES; +//9243 +ENUM!{enum SID_NAME_USE { + SidTypeUser = 1, + SidTypeGroup, + SidTypeDomain, + SidTypeAlias, + SidTypeWellKnownGroup, + SidTypeDeletedAccount, + SidTypeInvalid, + SidTypeUnknown, + SidTypeComputer, + SidTypeLabel, +}} +pub type PSID_NAME_USE = *mut SID_NAME_USE; +STRUCT!{struct SID_AND_ATTRIBUTES { + Sid: PSID, + Attributes: ::DWORD, +}} +pub type PSID_AND_ATTRIBUTES = *mut SID_AND_ATTRIBUTES; +//9802 +pub const ACL_REVISION: ::BYTE = 2; +pub const ACL_REVISION_DS: ::BYTE = 4; +pub const ACL_REVISION1: ::BYTE = 1; +pub const MIN_ACL_REVISION: ::BYTE = ACL_REVISION2; +pub const ACL_REVISION2: ::BYTE = 2; +pub const ACL_REVISION3: ::BYTE = 3; +pub const ACL_REVISION4: ::BYTE = 4; +pub const MAX_ACL_REVISION: ::BYTE = ACL_REVISION4; +STRUCT!{struct ACL { + AclRevision: ::BYTE, + Sbz1: ::BYTE, + AclSize: ::WORD, + AceCount: ::WORD, + Sbz2: ::WORD, +}} +pub type PACL = *mut ACL; +//9888 +pub const SE_PRIVILEGE_ENABLED_BY_DEFAULT: ::DWORD = 0x00000001; +pub const SE_PRIVILEGE_ENABLED: ::DWORD = 0x00000002; +pub const SE_PRIVILEGE_REMOVED: ::DWORD = 0x00000004; +pub const SE_PRIVILEGE_USED_FOR_ACCESS: ::DWORD = 0x80000000; +pub const SE_PRIVILEGE_VALID_ATTRIBUTES: ::DWORD = SE_PRIVILEGE_ENABLED_BY_DEFAULT | SE_PRIVILEGE_ENABLED | SE_PRIVILEGE_REMOVED | SE_PRIVILEGE_USED_FOR_ACCESS; +pub const PRIVILEGE_SET_ALL_NECESSARY: ::DWORD = 1; +//10689 +pub const TOKEN_ASSIGN_PRIMARY: ::DWORD = 0x0001; +pub const TOKEN_DUPLICATE: ::DWORD = 0x0002; +pub const TOKEN_IMPERSONATE: ::DWORD = 0x0004; +pub const TOKEN_QUERY: ::DWORD = 0x0008; +pub const TOKEN_QUERY_SOURCE: ::DWORD = 0x0010; +pub const TOKEN_ADJUST_PRIVILEGES: ::DWORD = 0x0020; +pub const TOKEN_ADJUST_GROUPS: ::DWORD = 0x0040; +pub const TOKEN_ADJUST_DEFAULT: ::DWORD = 0x0080; +pub const TOKEN_ADJUST_SESSIONID: ::DWORD = 0x0100; +pub const TOKEN_ALL_ACCESS_P: ::DWORD = STANDARD_RIGHTS_REQUIRED | TOKEN_ASSIGN_PRIMARY + | TOKEN_DUPLICATE | TOKEN_IMPERSONATE | TOKEN_QUERY | TOKEN_QUERY_SOURCE + | TOKEN_ADJUST_PRIVILEGES | TOKEN_ADJUST_GROUPS | TOKEN_ADJUST_DEFAULT; +pub const TOKEN_ALL_ACCESS: ::DWORD = TOKEN_ALL_ACCESS_P | TOKEN_ADJUST_SESSIONID; +pub const TOKEN_READ: ::DWORD = STANDARD_RIGHTS_READ | TOKEN_QUERY; +pub const TOKEN_WRITE: ::DWORD = STANDARD_RIGHTS_WRITE | TOKEN_ADJUST_PRIVILEGES + | TOKEN_ADJUST_GROUPS | TOKEN_ADJUST_DEFAULT; +pub const TOKEN_EXECUTE: ::DWORD = STANDARD_RIGHTS_EXECUTE; +//10823 +STRUCT!{nodebug struct TOKEN_PRIVILEGES { + PrivilegeCount: ::DWORD, + Privileges: [LUID_AND_ATTRIBUTES; 0], +}} +pub type PTOKEN_PRIVILEGES = *mut TOKEN_PRIVILEGES; +//10965 +pub const CLAIM_SECURITY_ATTRIBUTE_TYPE_INVALID: ::WORD = 0x00; +pub const CLAIM_SECURITY_ATTRIBUTE_TYPE_INT64: ::WORD = 0x01; +pub const CLAIM_SECURITY_ATTRIBUTE_TYPE_UINT64: ::WORD = 0x02; +pub const CLAIM_SECURITY_ATTRIBUTE_TYPE_STRING: ::WORD = 0x03; +STRUCT!{struct CLAIM_SECURITY_ATTRIBUTE_FQBN_VALUE { + Version: ::DWORD64, + Name: ::PWSTR, +}} +pub type PCLAIM_SECURITY_ATTRIBUTE_FQBN_VALUE = *mut CLAIM_SECURITY_ATTRIBUTE_FQBN_VALUE; +pub const CLAIM_SECURITY_ATTRIBUTE_TYPE_FQBN: ::WORD = 0x04; +pub const CLAIM_SECURITY_ATTRIBUTE_TYPE_SID: ::WORD = 0x05; +pub const CLAIM_SECURITY_ATTRIBUTE_TYPE_BOOLEAN: ::WORD = 0x06; +STRUCT!{struct CLAIM_SECURITY_ATTRIBUTE_OCTET_STRING_VALUE { + pValue: ::PVOID, + ValueLength: ::DWORD, +}} +pub type PCLAIM_SECURITY_ATTRIBUTE_OCTET_STRING_VALUE = + *mut CLAIM_SECURITY_ATTRIBUTE_OCTET_STRING_VALUE; +pub const CLAIM_SECURITY_ATTRIBUTE_TYPE_OCTET_STRING: ::WORD = 0x10; +pub const CLAIM_SECURITY_ATTRIBUTE_NON_INHERITABLE: ::DWORD = 0x0001; +pub const CLAIM_SECURITY_ATTRIBUTE_VALUE_CASE_SENSITIVE: ::DWORD = 0x0002; +pub const CLAIM_SECURITY_ATTRIBUTE_USE_FOR_DENY_ONLY: ::DWORD = 0x0004; +pub const CLAIM_SECURITY_ATTRIBUTE_DISABLED_BY_DEFAULT: ::DWORD = 0x0008; +pub const CLAIM_SECURITY_ATTRIBUTE_DISABLED: ::DWORD = 0x0010; +pub const CLAIM_SECURITY_ATTRIBUTE_MANDATORY: ::DWORD = 0x0020; +pub const CLAIM_SECURITY_ATTRIBUTE_VALID_FLAGS: ::DWORD = CLAIM_SECURITY_ATTRIBUTE_NON_INHERITABLE + | CLAIM_SECURITY_ATTRIBUTE_VALUE_CASE_SENSITIVE | CLAIM_SECURITY_ATTRIBUTE_USE_FOR_DENY_ONLY + | CLAIM_SECURITY_ATTRIBUTE_DISABLED_BY_DEFAULT | CLAIM_SECURITY_ATTRIBUTE_DISABLED + | CLAIM_SECURITY_ATTRIBUTE_MANDATORY; +pub const CLAIM_SECURITY_ATTRIBUTE_CUSTOM_FLAGS: ::DWORD = 0xFFFF0000; +STRUCT!{struct CLAIM_SECURITY_ATTRIBUTE_V1 { + Name: ::PWSTR, + ValueType: ::WORD, + Reserved: ::WORD, + Flags: ::DWORD, + ValueCount: ::DWORD, + // Put data here +}} +pub type PCLAIM_SECURITY_ATTRIBUTE_V1 = *mut CLAIM_SECURITY_ATTRIBUTE_V1; +STRUCT!{struct CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1 { + Name: ::DWORD, + ValueType: ::WORD, + Reserved: ::WORD, + Flags: ::DWORD, + ValueCount: ::DWORD, + // Put array here +}} +pub type PCLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1 = *mut CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1; +pub const CLAIM_SECURITY_ATTRIBUTES_INFORMATION_VERSION_V1: ::WORD = 1; +pub const CLAIM_SECURITY_ATTRIBUTES_INFORMATION_VERSION: ::WORD = + CLAIM_SECURITY_ATTRIBUTES_INFORMATION_VERSION_V1; +STRUCT!{struct CLAIM_SECURITY_ATTRIBUTES_INFORMATION { + Version: ::WORD, + Reserved: ::WORD, + AttributeCount: ::DWORD, + pAttributeV1: PCLAIM_SECURITY_ATTRIBUTE_V1, +}} +pub type PCLAIM_SECURITY_ATTRIBUTES_INFORMATION = *mut CLAIM_SECURITY_ATTRIBUTES_INFORMATION; +//11257 +pub type SECURITY_INFORMATION = ::DWORD; +pub type PSECURITY_INFORMATION = *mut ::DWORD; +pub const OWNER_SECURITY_INFORMATION: SECURITY_INFORMATION = 0x00000001; +pub const GROUP_SECURITY_INFORMATION: SECURITY_INFORMATION = 0x00000002; +pub const DACL_SECURITY_INFORMATION: SECURITY_INFORMATION = 0x00000004; +pub const SACL_SECURITY_INFORMATION: SECURITY_INFORMATION = 0x00000008; +pub const LABEL_SECURITY_INFORMATION: SECURITY_INFORMATION = 0x00000010; +pub const ATTRIBUTE_SECURITY_INFORMATION: SECURITY_INFORMATION = 0x00000020; +pub const SCOPE_SECURITY_INFORMATION: SECURITY_INFORMATION = 0x00000040; +pub const PROCESS_TRUST_LABEL_SECURITY_INFORMATION: SECURITY_INFORMATION = 0x00000080; +pub const BACKUP_SECURITY_INFORMATION: SECURITY_INFORMATION = 0x00010000; +pub const PROTECTED_DACL_SECURITY_INFORMATION: SECURITY_INFORMATION = 0x80000000; +pub const PROTECTED_SACL_SECURITY_INFORMATION: SECURITY_INFORMATION = 0x40000000; +pub const UNPROTECTED_DACL_SECURITY_INFORMATION: SECURITY_INFORMATION = 0x20000000; +pub const UNPROTECTED_SACL_SECURITY_INFORMATION: SECURITY_INFORMATION = 0x10000000; +ENUM!{enum SE_LEARNING_MODE_DATA_TYPE { + SeLearningModeInvalidType = 0, + SeLearningModeSettings, + SeLearningModeMax, +}} +STRUCT!{struct SECURITY_CAPABILITIES { + AppContainerSid: PSID, + Capabilities: PSID_AND_ATTRIBUTES, + CapabilityCount: ::DWORD, + Reserved: ::DWORD, +}} +pub type PSECURITY_CAPABILITIES = *mut SECURITY_CAPABILITIES; +pub type LPSECURITY_CAPABILITIES = *mut SECURITY_CAPABILITIES; +pub const PROCESS_TERMINATE: ::DWORD = 0x0001; +pub const PROCESS_CREATE_THREAD: ::DWORD = 0x0002; +pub const PROCESS_SET_SESSIONID: ::DWORD = 0x0004; +pub const PROCESS_VM_OPERATION: ::DWORD = 0x0008; +pub const PROCESS_VM_READ: ::DWORD = 0x0010; +pub const PROCESS_VM_WRITE: ::DWORD = 0x0020; +pub const PROCESS_DUP_HANDLE: ::DWORD = 0x0040; +pub const PROCESS_CREATE_PROCESS: ::DWORD = 0x0080; +pub const PROCESS_SET_QUOTA: ::DWORD = 0x0100; +pub const PROCESS_SET_INFORMATION: ::DWORD = 0x0200; +pub const PROCESS_QUERY_INFORMATION: ::DWORD = 0x0400; +pub const PROCESS_SUSPEND_RESUME: ::DWORD = 0x0800; +pub const PROCESS_QUERY_LIMITED_INFORMATION: ::DWORD = 0x1000; +pub const PROCESS_SET_LIMITED_INFORMATION: ::DWORD = 0x2000; +pub const PROCESS_ALL_ACCESS: ::DWORD = STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0xFFFF; +//11007 +pub const THREAD_BASE_PRIORITY_LOWRT: ::DWORD = 15; +pub const THREAD_BASE_PRIORITY_MAX: ::DWORD = 2; +pub const THREAD_BASE_PRIORITY_MIN: ::DWORD = -2i32 as ::DWORD; +pub const THREAD_BASE_PRIORITY_IDLE: ::DWORD = -15i32 as ::DWORD; +//11018 +STRUCT!{struct QUOTA_LIMITS { + PagedPoolLimit: ::SIZE_T, + NonPagedPoolLimit: ::SIZE_T, + MinimumWorkingSetSize: ::SIZE_T, + MaximumWorkingSetSize: ::SIZE_T, + PagefileLimit: ::SIZE_T, + TimeLimit: ::LARGE_INTEGER, +}} +pub type PQUOTA_LIMITS = *mut QUOTA_LIMITS; +pub const QUOTA_LIMITS_HARDWS_MIN_ENABLE: ::DWORD = 0x00000001; +pub const QUOTA_LIMITS_HARDWS_MIN_DISABLE: ::DWORD = 0x00000002; +pub const QUOTA_LIMITS_HARDWS_MAX_ENABLE: ::DWORD = 0x00000004; +pub const QUOTA_LIMITS_HARDWS_MAX_DISABLE: ::DWORD = 0x00000008; +pub const QUOTA_LIMITS_USE_DEFAULT_LIMITS: ::DWORD = 0x00000010; +STRUCT!{struct RATE_QUOTA_LIMIT { + RateData: ::DWORD, + BitFields: ::DWORD, +}} +BITFIELD!(RATE_QUOTA_LIMIT BitFields: ::DWORD [ + RatePercent set_RatePercent[0..7], + Reserved0 set_Reserved0[7..32], +]); +pub type PRATE_QUOTA_LIMIT = *mut RATE_QUOTA_LIMIT; +STRUCT!{struct QUOTA_LIMITS_EX { + PagedPoolLimit: ::SIZE_T, + NonPagedPoolLimit: ::SIZE_T, + MinimumWorkingSetSize: ::SIZE_T, + MaximumWorkingSetSize: ::SIZE_T, + PagefileLimit: ::SIZE_T, + TimeLimit: ::LARGE_INTEGER, + WorkingSetLimit: ::SIZE_T, + Reserved2: ::SIZE_T, + Reserved3: ::SIZE_T, + Reserved4: ::SIZE_T, + Flags: ::DWORD, + CpuRateLimit: RATE_QUOTA_LIMIT, +}} +pub type PQUOTA_LIMITS_EX = *mut QUOTA_LIMITS_EX; +STRUCT!{struct IO_COUNTERS { + ReadOperationCount: ::ULONGLONG, + WriteOperationCount: ::ULONGLONG, + OtherOperationCount: ::ULONGLONG, + ReadTransferCount: ::ULONGLONG, + WriteTransferCount: ::ULONGLONG, + OtherTransferCount: ::ULONGLONG, +}} +pub type PIO_COUNTERS = *mut IO_COUNTERS; +//11192 +STRUCT!{struct JOBOBJECT_BASIC_LIMIT_INFORMATION { + PerProcessUserTimeLimit: ::LARGE_INTEGER, + PerJobUserTimeLimit: ::LARGE_INTEGER, + LimitFlags: ::DWORD, + MinimumWorkingSetSize: ::SIZE_T, + MaximumWorkingSetSize: ::SIZE_T, + ActiveProcessLimit: ::DWORD, + Affinity: ::ULONG_PTR, + PriorityClass: ::DWORD, + SchedulingClass: ::DWORD, +}} +pub type PJOBOBJECT_BASIC_LIMIT_INFORMATION = *mut JOBOBJECT_BASIC_LIMIT_INFORMATION; +STRUCT!{struct JOBOBJECT_EXTENDED_LIMIT_INFORMATION { + BasicLimitInformation: JOBOBJECT_BASIC_LIMIT_INFORMATION, + IoInfo: IO_COUNTERS, + ProcessMemoryLimit: ::SIZE_T, + JobMemoryLimit: ::SIZE_T, + PeakProcessMemoryUsed: ::SIZE_T, + PeakJobMemoryUsed: ::SIZE_T, +}} +pub type PJOBOBJECT_EXTENDED_LIMIT_INFORMATION = *mut JOBOBJECT_EXTENDED_LIMIT_INFORMATION; +STRUCT!{struct JOBOBJECT_BASIC_PROCESS_ID_LIST { + NumberOfAssignedProcesses: ::DWORD, + NumberOfProcessIdsInList: ::DWORD, + ProcessIdList: [::ULONG_PTR; 0], +}} +//11712 +pub const JOB_OBJECT_TERMINATE_AT_END_OF_JOB: ::DWORD = 0; +pub const JOB_OBJECT_POST_AT_END_OF_JOB: ::DWORD = 1; +pub const JOB_OBJECT_MSG_END_OF_JOB_TIME: ::DWORD = 1; +pub const JOB_OBJECT_MSG_END_OF_PROCESS_TIME: ::DWORD = 2; +pub const JOB_OBJECT_MSG_ACTIVE_PROCESS_LIMIT: ::DWORD = 3; +pub const JOB_OBJECT_MSG_ACTIVE_PROCESS_ZERO: ::DWORD = 4; +pub const JOB_OBJECT_MSG_NEW_PROCESS: ::DWORD = 6; +pub const JOB_OBJECT_MSG_EXIT_PROCESS: ::DWORD = 7; +pub const JOB_OBJECT_MSG_ABNORMAL_EXIT_PROCESS: ::DWORD = 8; +pub const JOB_OBJECT_MSG_PROCESS_MEMORY_LIMIT: ::DWORD = 9; +pub const JOB_OBJECT_MSG_JOB_MEMORY_LIMIT: ::DWORD = 10; +pub const JOB_OBJECT_MSG_NOTIFICATION_LIMIT: ::DWORD = 11; +pub const JOB_OBJECT_MSG_JOB_CYCLE_TIME_LIMIT: ::DWORD = 12; +pub const JOB_OBJECT_MSG_MINIMUM: ::DWORD = 1; +pub const JOB_OBJECT_MSG_MAXIMUM: ::DWORD = 12; +pub const JOB_OBJECT_VALID_COMPLETION_FILTER: ::DWORD = ((1 << (JOB_OBJECT_MSG_MAXIMUM + 1)) - 1) + - ((1 << JOB_OBJECT_MSG_MINIMUM) - 1); +pub const JOB_OBJECT_LIMIT_WORKINGSET: ::DWORD = 0x00000001; +pub const JOB_OBJECT_LIMIT_PROCESS_TIME: ::DWORD = 0x00000002; +pub const JOB_OBJECT_LIMIT_JOB_TIME: ::DWORD = 0x00000004; +pub const JOB_OBJECT_LIMIT_ACTIVE_PROCESS: ::DWORD = 0x00000008; +pub const JOB_OBJECT_LIMIT_AFFINITY: ::DWORD = 0x00000010; +pub const JOB_OBJECT_LIMIT_PRIORITY_CLASS: ::DWORD = 0x00000020; +pub const JOB_OBJECT_LIMIT_PRESERVE_JOB_TIME: ::DWORD = 0x00000040; +pub const JOB_OBJECT_LIMIT_SCHEDULING_CLASS: ::DWORD = 0x00000080; +pub const JOB_OBJECT_LIMIT_PROCESS_MEMORY: ::DWORD = 0x00000100; +pub const JOB_OBJECT_LIMIT_JOB_MEMORY: ::DWORD = 0x00000200; +pub const JOB_OBJECT_LIMIT_DIE_ON_UNHANDLED_EXCEPTION: ::DWORD = 0x00000400; +pub const JOB_OBJECT_LIMIT_BREAKAWAY_OK: ::DWORD = 0x00000800; +pub const JOB_OBJECT_LIMIT_SILENT_BREAKAWAY_OK: ::DWORD = 0x00001000; +pub const JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE: ::DWORD = 0x00002000; +pub const JOB_OBJECT_LIMIT_SUBSET_AFFINITY: ::DWORD = 0x00004000; +pub const JOB_OBJECT_LIMIT_JOB_READ_BYTES: ::DWORD = 0x00010000; +pub const JOB_OBJECT_LIMIT_JOB_WRITE_BYTES: ::DWORD = 0x00020000; +pub const JOB_OBJECT_LIMIT_RATE_CONTROL: ::DWORD = 0x00040000; +pub const JOB_OBJECT_LIMIT_RESERVED3: ::DWORD = 0x00008000; +pub const JOB_OBJECT_LIMIT_VALID_FLAGS: ::DWORD = 0x0007ffff; +pub const JOB_OBJECT_BASIC_LIMIT_VALID_FLAGS: ::DWORD = 0x000000ff; +pub const JOB_OBJECT_EXTENDED_LIMIT_VALID_FLAGS: ::DWORD = 0x00007fff; +pub const JOB_OBJECT_NOTIFICATION_LIMIT_VALID_FLAGS: ::DWORD = 0x00070204; +pub const JOB_OBJECT_RESERVED_LIMIT_VALID_FLAGS: ::DWORD = 0x0007ffff; +pub const JOB_OBJECT_UILIMIT_NONE: ::DWORD = 0x00000000; +pub const JOB_OBJECT_UILIMIT_HANDLES: ::DWORD = 0x00000001; +pub const JOB_OBJECT_UILIMIT_READCLIPBOARD: ::DWORD = 0x00000002; +pub const JOB_OBJECT_UILIMIT_WRITECLIPBOARD: ::DWORD = 0x00000004; +pub const JOB_OBJECT_UILIMIT_SYSTEMPARAMETERS: ::DWORD = 0x00000008; +pub const JOB_OBJECT_UILIMIT_DISPLAYSETTINGS: ::DWORD = 0x00000010; +pub const JOB_OBJECT_UILIMIT_GLOBALATOMS: ::DWORD = 0x00000020; +pub const JOB_OBJECT_UILIMIT_DESKTOP: ::DWORD = 0x00000040; +pub const JOB_OBJECT_UILIMIT_EXITWINDOWS: ::DWORD = 0x00000080; +pub const JOB_OBJECT_UILIMIT_ALL: ::DWORD = 0x000000FF; +pub const JOB_OBJECT_UI_VALID_FLAGS: ::DWORD = 0x000000FF; +pub const JOB_OBJECT_SECURITY_NO_ADMIN: ::DWORD = 0x00000001; +pub const JOB_OBJECT_SECURITY_RESTRICTED_TOKEN: ::DWORD = 0x00000002; +pub const JOB_OBJECT_SECURITY_ONLY_TOKEN: ::DWORD = 0x00000004; +pub const JOB_OBJECT_SECURITY_FILTER_TOKENS: ::DWORD = 0x00000008; +pub const JOB_OBJECT_SECURITY_VALID_FLAGS: ::DWORD = 0x0000000f; +pub const JOB_OBJECT_CPU_RATE_CONTROL_ENABLE: ::DWORD = 0x1; +pub const JOB_OBJECT_CPU_RATE_CONTROL_WEIGHT_BASED: ::DWORD = 0x2; +pub const JOB_OBJECT_CPU_RATE_CONTROL_HARD_CAP: ::DWORD = 0x4; +pub const JOB_OBJECT_CPU_RATE_CONTROL_NOTIFY: ::DWORD = 0x8; +pub const JOB_OBJECT_CPU_RATE_CONTROL_VALID_FLAGS: ::DWORD = 0xf; +ENUM!{enum JOBOBJECTINFOCLASS { + JobObjectBasicAccountingInformation = 1, + JobObjectBasicLimitInformation, + JobObjectBasicProcessIdList, + JobObjectBasicUIRestrictions, + JobObjectSecurityLimitInformation, + JobObjectEndOfJobTimeInformation, + JobObjectAssociateCompletionPortInformation, + JobObjectBasicAndIoAccountingInformation, + JobObjectExtendedLimitInformation, + JobObjectJobSetInformation, + JobObjectGroupInformation, + JobObjectNotificationLimitInformation, + JobObjectLimitViolationInformation, + JobObjectGroupInformationEx, + JobObjectCpuRateControlInformation, + JobObjectCompletionFilter, + JobObjectCompletionCounter, + JobObjectReserved1Information = 18, + JobObjectReserved2Information, + JobObjectReserved3Information, + JobObjectReserved4Information, + JobObjectReserved5Information, + JobObjectReserved6Information, + JobObjectReserved7Information, + JobObjectReserved8Information, + JobObjectReserved9Information, + MaxJobObjectInfoClass, +}} +//12063 +pub const SECTION_QUERY: ::DWORD = 0x0001; +pub const SECTION_MAP_WRITE: ::DWORD = 0x0002; +pub const SECTION_MAP_READ: ::DWORD = 0x0004; +pub const SECTION_MAP_EXECUTE: ::DWORD = 0x0008; +pub const SECTION_EXTEND_SIZE: ::DWORD = 0x0010; +pub const SECTION_MAP_EXECUTE_EXPLICIT: ::DWORD = 0x0020; +pub const SECTION_ALL_ACCESS: ::DWORD = STANDARD_RIGHTS_REQUIRED | SECTION_QUERY + | SECTION_MAP_WRITE | SECTION_MAP_READ | SECTION_MAP_EXECUTE | SECTION_EXTEND_SIZE; +//12100 +pub const PAGE_NOACCESS: ::DWORD = 0x01; +pub const PAGE_READONLY: ::DWORD = 0x02; +pub const PAGE_READWRITE: ::DWORD = 0x04; +pub const PAGE_WRITECOPY: ::DWORD = 0x08; +pub const PAGE_EXECUTE: ::DWORD = 0x10; +pub const PAGE_EXECUTE_READ: ::DWORD = 0x20; +pub const PAGE_EXECUTE_READWRITE: ::DWORD = 0x40; +pub const PAGE_EXECUTE_WRITECOPY: ::DWORD = 0x80; +pub const PAGE_GUARD: ::DWORD = 0x100; +pub const PAGE_NOCACHE: ::DWORD = 0x200; +pub const PAGE_WRITECOMBINE: ::DWORD = 0x400; +pub const PAGE_REVERT_TO_FILE_MAP: ::DWORD = 0x80000000; +pub const PAGE_TARGETS_NO_UPDATE: ::DWORD = 0x40000000; +pub const PAGE_TARGETS_INVALID: ::DWORD = 0x40000000; +pub const MEM_COMMIT: ::DWORD = 0x1000; +pub const MEM_RESERVE: ::DWORD = 0x2000; +pub const MEM_DECOMMIT: ::DWORD = 0x4000; +pub const MEM_RELEASE: ::DWORD = 0x8000; +pub const MEM_FREE: ::DWORD = 0x10000; +pub const MEM_PRIVATE: ::DWORD = 0x20000; +pub const MEM_MAPPED: ::DWORD = 0x40000; +pub const MEM_RESET: ::DWORD = 0x80000; +pub const MEM_TOP_DOWN: ::DWORD = 0x100000; +pub const MEM_WRITE_WATCH: ::DWORD = 0x200000; +pub const MEM_PHYSICAL: ::DWORD = 0x400000; +pub const MEM_ROTATE: ::DWORD = 0x800000; +pub const MEM_DIFFERENT_IMAGE_BASE_OK: ::DWORD = 0x800000; +pub const MEM_RESET_UNDO: ::DWORD = 0x1000000; +pub const MEM_LARGE_PAGES: ::DWORD = 0x20000000; +pub const MEM_4MB_PAGES: ::DWORD = 0x80000000; +pub const SEC_FILE: ::DWORD = 0x800000; +pub const SEC_IMAGE: ::DWORD = 0x1000000; +pub const SEC_PROTECTED_IMAGE: ::DWORD = 0x2000000; +pub const SEC_RESERVE: ::DWORD = 0x4000000; +pub const SEC_COMMIT: ::DWORD = 0x8000000; +pub const SEC_NOCACHE: ::DWORD = 0x10000000; +pub const SEC_WRITECOMBINE: ::DWORD = 0x40000000; +pub const SEC_LARGE_PAGES: ::DWORD = 0x80000000; +pub const SEC_IMAGE_NO_EXECUTE: ::DWORD = (SEC_IMAGE | SEC_NOCACHE); +pub const MEM_IMAGE: ::DWORD = SEC_IMAGE; +pub const WRITE_WATCH_FLAG_RESET: ::DWORD = 0x01; +pub const MEM_UNMAP_WITH_TRANSIENT_BOOST: ::DWORD = 0x01; +//12217 +pub const FILE_READ_DATA: ::DWORD = 0x0001; +pub const FILE_LIST_DIRECTORY: ::DWORD = 0x0001; +pub const FILE_WRITE_DATA: ::DWORD = 0x0002; +pub const FILE_ADD_FILE: ::DWORD = 0x0002; +pub const FILE_APPEND_DATA: ::DWORD = 0x0004; +pub const FILE_ADD_SUBDIRECTORY: ::DWORD = 0x0004; +pub const FILE_CREATE_PIPE_INSTANCE: ::DWORD = 0x0004; +pub const FILE_READ_EA: ::DWORD = 0x0008; +pub const FILE_WRITE_EA: ::DWORD = 0x0010; +pub const FILE_EXECUTE: ::DWORD = 0x0020; +pub const FILE_TRAVERSE: ::DWORD = 0x0020; +pub const FILE_DELETE_CHILD: ::DWORD = 0x0040; +pub const FILE_READ_ATTRIBUTES: ::DWORD = 0x0080; +pub const FILE_WRITE_ATTRIBUTES: ::DWORD = 0x0100; +pub const FILE_ALL_ACCESS: ::DWORD = STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0x1FF; +pub const FILE_GENERIC_READ: ::DWORD = STANDARD_RIGHTS_READ | FILE_READ_DATA + | FILE_READ_ATTRIBUTES | FILE_READ_EA | SYNCHRONIZE; +pub const FILE_GENERIC_WRITE: ::DWORD = STANDARD_RIGHTS_WRITE | FILE_WRITE_DATA + | FILE_WRITE_ATTRIBUTES | FILE_WRITE_EA | FILE_APPEND_DATA | SYNCHRONIZE; +pub const FILE_GENERIC_EXECUTE: ::DWORD = STANDARD_RIGHTS_EXECUTE | FILE_READ_ATTRIBUTES + | FILE_EXECUTE | SYNCHRONIZE; +pub const FILE_SHARE_READ: ::DWORD = 0x00000001; +pub const FILE_SHARE_WRITE: ::DWORD = 0x00000002; +pub const FILE_SHARE_DELETE: ::DWORD = 0x00000004; +pub const FILE_ATTRIBUTE_READONLY: ::DWORD = 0x00000001; +pub const FILE_ATTRIBUTE_HIDDEN: ::DWORD = 0x00000002; +pub const FILE_ATTRIBUTE_SYSTEM: ::DWORD = 0x00000004; +pub const FILE_ATTRIBUTE_DIRECTORY: ::DWORD = 0x00000010; +pub const FILE_ATTRIBUTE_ARCHIVE: ::DWORD = 0x00000020; +pub const FILE_ATTRIBUTE_DEVICE: ::DWORD = 0x00000040; +pub const FILE_ATTRIBUTE_NORMAL: ::DWORD = 0x00000080; +pub const FILE_ATTRIBUTE_TEMPORARY: ::DWORD = 0x00000100; +pub const FILE_ATTRIBUTE_SPARSE_FILE: ::DWORD = 0x00000200; +pub const FILE_ATTRIBUTE_REPARSE_POINT: ::DWORD = 0x00000400; +pub const FILE_ATTRIBUTE_COMPRESSED: ::DWORD = 0x00000800; +pub const FILE_ATTRIBUTE_OFFLINE: ::DWORD = 0x00001000; +pub const FILE_ATTRIBUTE_NOT_CONTENT_INDEXED: ::DWORD = 0x00002000; +pub const FILE_ATTRIBUTE_ENCRYPTED: ::DWORD = 0x00004000; +pub const FILE_ATTRIBUTE_INTEGRITY_STREAM: ::DWORD = 0x00008000; +pub const FILE_ATTRIBUTE_VIRTUAL: ::DWORD = 0x00010000; +pub const FILE_ATTRIBUTE_NO_SCRUB_DATA: ::DWORD = 0x00020000; +pub const FILE_ATTRIBUTE_EA: ::DWORD = 0x00040000; +pub const FILE_NOTIFY_CHANGE_FILE_NAME: ::DWORD = 0x00000001; +pub const FILE_NOTIFY_CHANGE_DIR_NAME: ::DWORD = 0x00000002; +pub const FILE_NOTIFY_CHANGE_ATTRIBUTES: ::DWORD = 0x00000004; +pub const FILE_NOTIFY_CHANGE_SIZE: ::DWORD = 0x00000008; +pub const FILE_NOTIFY_CHANGE_LAST_WRITE: ::DWORD = 0x00000010; +pub const FILE_NOTIFY_CHANGE_LAST_ACCESS: ::DWORD = 0x00000020; +pub const FILE_NOTIFY_CHANGE_CREATION: ::DWORD = 0x00000040; +pub const FILE_NOTIFY_CHANGE_SECURITY: ::DWORD = 0x00000100; +pub const FILE_ACTION_ADDED: ::DWORD = 0x00000001; +pub const FILE_ACTION_REMOVED: ::DWORD = 0x00000002; +pub const FILE_ACTION_MODIFIED: ::DWORD = 0x00000003; +pub const FILE_ACTION_RENAMED_OLD_NAME: ::DWORD = 0x00000004; +pub const FILE_ACTION_RENAMED_NEW_NAME: ::DWORD = 0x00000005; +pub const MAILSLOT_NO_MESSAGE: ::DWORD = 0xFFFFFFFF; +pub const MAILSLOT_WAIT_FOREVER: ::DWORD = 0xFFFFFFFF; +pub const FILE_CASE_SENSITIVE_SEARCH: ::DWORD = 0x00000001; +pub const FILE_CASE_PRESERVED_NAMES: ::DWORD = 0x00000002; +pub const FILE_UNICODE_ON_DISK: ::DWORD = 0x00000004; +pub const FILE_PERSISTENT_ACLS: ::DWORD = 0x00000008; +pub const FILE_FILE_COMPRESSION: ::DWORD = 0x00000010; +pub const FILE_VOLUME_QUOTAS: ::DWORD = 0x00000020; +pub const FILE_SUPPORTS_SPARSE_FILES: ::DWORD = 0x00000040; +pub const FILE_SUPPORTS_REPARSE_POINTS: ::DWORD = 0x00000080; +pub const FILE_SUPPORTS_REMOTE_STORAGE: ::DWORD = 0x00000100; +pub const FILE_VOLUME_IS_COMPRESSED: ::DWORD = 0x00008000; +pub const FILE_SUPPORTS_OBJECT_IDS: ::DWORD = 0x00010000; +pub const FILE_SUPPORTS_ENCRYPTION: ::DWORD = 0x00020000; +pub const FILE_NAMED_STREAMS: ::DWORD = 0x00040000; +pub const FILE_READ_ONLY_VOLUME: ::DWORD = 0x00080000; +pub const FILE_SEQUENTIAL_WRITE_ONCE: ::DWORD = 0x00100000; +pub const FILE_SUPPORTS_TRANSACTIONS: ::DWORD = 0x00200000; +pub const FILE_SUPPORTS_HARD_LINKS: ::DWORD = 0x00400000; +pub const FILE_SUPPORTS_EXTENDED_ATTRIBUTES: ::DWORD = 0x00800000; +pub const FILE_SUPPORTS_OPEN_BY_FILE_ID: ::DWORD = 0x01000000; +pub const FILE_SUPPORTS_USN_JOURNAL: ::DWORD = 0x02000000; +pub const FILE_SUPPORTS_INTEGRITY_STREAMS: ::DWORD = 0x04000000; +pub const FILE_INVALID_FILE_ID: ::LONGLONG = -1; +STRUCT!{struct FILE_ID_128 { + Identifier: [::BYTE; 16], +}} +pub type PFILE_ID_128 = *mut FILE_ID_128; +STRUCT!{struct FILE_NOTIFY_INFORMATION { + NextEntryOffset: ::DWORD, + Action: ::DWORD, + FileNameLength: ::DWORD, + FileName: [::WCHAR; 0], +}} +STRUCT!{struct FILE_SEGMENT_ELEMENT { + Buffer: ::PVOID64, + Alignment: ::ULONGLONG, +}} +pub type PFILE_SEGMENT_ELEMENT = *mut FILE_SEGMENT_ELEMENT; +//12475 +pub const IO_REPARSE_TAG_MOUNT_POINT: ::DWORD = 0xA0000003; +pub const IO_REPARSE_TAG_HSM: ::DWORD = 0xC0000004; +pub const IO_REPARSE_TAG_HSM2: ::DWORD = 0x80000006; +pub const IO_REPARSE_TAG_SIS: ::DWORD = 0x80000007; +pub const IO_REPARSE_TAG_WIM: ::DWORD = 0x80000008; +pub const IO_REPARSE_TAG_CSV: ::DWORD = 0x80000009; +pub const IO_REPARSE_TAG_DFS: ::DWORD = 0x8000000A; +pub const IO_REPARSE_TAG_SYMLINK: ::DWORD = 0xA000000C; +pub const IO_REPARSE_TAG_DFSR: ::DWORD = 0x80000012; +pub const IO_REPARSE_TAG_DEDUP: ::DWORD = 0x80000013; +pub const IO_REPARSE_TAG_NFS: ::DWORD = 0x80000014; +pub const IO_REPARSE_TAG_FILE_PLACEHOLDER: ::DWORD = 0x80000015; +pub const IO_REPARSE_TAG_WOF: ::DWORD = 0x80000017; +//12788 +pub const DUPLICATE_CLOSE_SOURCE: ::DWORD = 0x00000001; +pub const DUPLICATE_SAME_ACCESS: ::DWORD = 0x00000002; +//14708 +STRUCT!{struct PROCESSOR_POWER_POLICY_INFO { + TimeCheck: ::DWORD, + DemoteLimit: ::DWORD, + PromoteLimit: ::DWORD, + DemotePercent: ::BYTE, + PromotePercent: ::BYTE, + Spare: [::BYTE; 2], + Reserved: ::DWORD, +}} +BITFIELD!(PROCESSOR_POWER_POLICY_INFO Reserved: ::DWORD [ + AllowDemotion set_AllowDemotion[0..1], + AllowPromotion set_AllowPromotion[1..2], +]); +pub type PPROCESSOR_POWER_POLICY_INFO = *mut PROCESSOR_POWER_POLICY_INFO; +//15000 +STRUCT!{struct IMAGE_FILE_HEADER { + Machine: ::WORD, + NumberOfSections: ::WORD, + TimeDateStamp: ::DWORD, + PointerToSymbolTable: ::DWORD, + NumberOfSymbols: ::DWORD, + SizeOfOptionalHeader: ::WORD, + Characteristics: ::WORD, +}} +pub type PIMAGE_FILE_HEADER = *mut IMAGE_FILE_HEADER; +pub const IMAGE_SIZEOF_FILE_HEADER: usize = 20; +pub const IMAGE_FILE_RELOCS_STRIPPED: ::WORD = 0x0001; +pub const IMAGE_FILE_EXECUTABLE_IMAGE: ::WORD = 0x0002; +pub const IMAGE_FILE_LINE_NUMS_STRIPPED: ::WORD = 0x0004; +pub const IMAGE_FILE_LOCAL_SYMS_STRIPPED: ::WORD = 0x0008; +pub const IMAGE_FILE_AGGRESIVE_WS_TRIM: ::WORD = 0x0010; +pub const IMAGE_FILE_LARGE_ADDRESS_AWARE: ::WORD = 0x0020; +pub const IMAGE_FILE_BYTES_REVERSED_LO: ::WORD = 0x0080; +pub const IMAGE_FILE_32BIT_MACHINE: ::WORD = 0x0100; +pub const IMAGE_FILE_DEBUG_STRIPPED: ::WORD = 0x0200; +pub const IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP: ::WORD = 0x0400; +pub const IMAGE_FILE_NET_RUN_FROM_SWAP: ::WORD = 0x0800; +pub const IMAGE_FILE_SYSTEM: ::WORD = 0x1000; +pub const IMAGE_FILE_DLL: ::WORD = 0x2000; +pub const IMAGE_FILE_UP_SYSTEM_ONLY: ::WORD = 0x4000; +pub const IMAGE_FILE_BYTES_REVERSED_HI: ::WORD = 0x8000; +pub const IMAGE_FILE_MACHINE_UNKNOWN: ::WORD = 0; +pub const IMAGE_FILE_MACHINE_I386: ::WORD = 0x014c; +pub const IMAGE_FILE_MACHINE_R3000: ::WORD = 0x0162; +pub const IMAGE_FILE_MACHINE_R4000: ::WORD = 0x0166; +pub const IMAGE_FILE_MACHINE_R10000: ::WORD = 0x0168; +pub const IMAGE_FILE_MACHINE_WCEMIPSV2: ::WORD = 0x0169; +pub const IMAGE_FILE_MACHINE_ALPHA: ::WORD = 0x0184; +pub const IMAGE_FILE_MACHINE_SH3: ::WORD = 0x01a2; +pub const IMAGE_FILE_MACHINE_SH3DSP: ::WORD = 0x01a3; +pub const IMAGE_FILE_MACHINE_SH3E: ::WORD = 0x01a4; +pub const IMAGE_FILE_MACHINE_SH4: ::WORD = 0x01a6; +pub const IMAGE_FILE_MACHINE_SH5: ::WORD = 0x01a8; +pub const IMAGE_FILE_MACHINE_ARM: ::WORD = 0x01c0; +pub const IMAGE_FILE_MACHINE_THUMB: ::WORD = 0x01c2; +pub const IMAGE_FILE_MACHINE_ARMNT: ::WORD = 0x01c4; +pub const IMAGE_FILE_MACHINE_AM33: ::WORD = 0x01d3; +pub const IMAGE_FILE_MACHINE_POWERPC: ::WORD = 0x01F0; +pub const IMAGE_FILE_MACHINE_POWERPCFP: ::WORD = 0x01f1; +pub const IMAGE_FILE_MACHINE_IA64: ::WORD = 0x0200; +pub const IMAGE_FILE_MACHINE_MIPS16: ::WORD = 0x0266; +pub const IMAGE_FILE_MACHINE_ALPHA64: ::WORD = 0x0284; +pub const IMAGE_FILE_MACHINE_MIPSFPU: ::WORD = 0x0366; +pub const IMAGE_FILE_MACHINE_MIPSFPU16: ::WORD = 0x0466; +pub const IMAGE_FILE_MACHINE_AXP64: ::WORD = IMAGE_FILE_MACHINE_ALPHA64; +pub const IMAGE_FILE_MACHINE_TRICORE: ::WORD = 0x0520; +pub const IMAGE_FILE_MACHINE_CEF: ::WORD = 0x0CEF; +pub const IMAGE_FILE_MACHINE_EBC: ::WORD = 0x0EBC; +pub const IMAGE_FILE_MACHINE_AMD64: ::WORD = 0x8664; +pub const IMAGE_FILE_MACHINE_M32R: ::WORD = 0x9041; +pub const IMAGE_FILE_MACHINE_CEE: ::WORD = 0xC0EE; +STRUCT!{struct IMAGE_DATA_DIRECTORY { + VirtualAddress: ::DWORD, + Size: ::DWORD, +}} +pub type PIMAGE_DATA_DIRECTORY = *mut IMAGE_DATA_DIRECTORY; +pub const IMAGE_NUMBEROF_DIRECTORY_ENTRIES: usize = 16; +STRUCT!{struct IMAGE_OPTIONAL_HEADER32 { + Magic: ::WORD, + MajorLinkerVersion: ::BYTE, + MinorLinkerVersion: ::BYTE, + SizeOfCode: ::DWORD, + SizeOfInitializedData: ::DWORD, + SizeOfUninitializedData: ::DWORD, + AddressOfEntryPoint: ::DWORD, + BaseOfCode: ::DWORD, + BaseOfData: ::DWORD, + ImageBase: ::DWORD, + SectionAlignment: ::DWORD, + FileAlignment: ::DWORD, + MajorOperatingSystemVersion: ::WORD, + MinorOperatingSystemVersion: ::WORD, + MajorImageVersion: ::WORD, + MinorImageVersion: ::WORD, + MajorSubsystemVersion: ::WORD, + MinorSubsystemVersion: ::WORD, + Win32VersionValue: ::DWORD, + SizeOfImage: ::DWORD, + SizeOfHeaders: ::DWORD, + CheckSum: ::DWORD, + Subsystem: ::WORD, + DllCharacteristics: ::WORD, + SizeOfStackReserve: ::DWORD, + SizeOfStackCommit: ::DWORD, + SizeOfHeapReserve: ::DWORD, + SizeOfHeapCommit: ::DWORD, + LoaderFlags: ::DWORD, + NumberOfRvaAndSizes: ::DWORD, + DataDirectory: [IMAGE_DATA_DIRECTORY; IMAGE_NUMBEROF_DIRECTORY_ENTRIES], +}} +pub type PIMAGE_OPTIONAL_HEADER32 = *mut IMAGE_OPTIONAL_HEADER32; +STRUCT!{struct IMAGE_ROM_OPTIONAL_HEADER { + Magic: ::WORD, + MajorLinkerVersion: ::BYTE, + MinorLinkerVersion: ::BYTE, + SizeOfCode: ::DWORD, + SizeOfInitializedData: ::DWORD, + SizeOfUninitializedData: ::DWORD, + AddressOfEntryPoint: ::DWORD, + BaseOfCode: ::DWORD, + BaseOfData: ::DWORD, + BaseOfBss: ::DWORD, + GprMask: ::DWORD, + CprMask: [::DWORD; 4], + GpValue: ::DWORD, +}} +pub type PIMAGE_ROM_OPTIONAL_HEADER = *mut IMAGE_ROM_OPTIONAL_HEADER; +STRUCT!{struct IMAGE_OPTIONAL_HEADER64 { + Magic: ::WORD, + MajorLinkerVersion: ::BYTE, + MinorLinkerVersion: ::BYTE, + SizeOfCode: ::DWORD, + SizeOfInitializedData: ::DWORD, + SizeOfUninitializedData: ::DWORD, + AddressOfEntryPoint: ::DWORD, + BaseOfCode: ::DWORD, + ImageBase: ::ULONGLONG, + SectionAlignment: ::DWORD, + FileAlignment: ::DWORD, + MajorOperatingSystemVersion: ::WORD, + MinorOperatingSystemVersion: ::WORD, + MajorImageVersion: ::WORD, + MinorImageVersion: ::WORD, + MajorSubsystemVersion: ::WORD, + MinorSubsystemVersion: ::WORD, + Win32VersionValue: ::DWORD, + SizeOfImage: ::DWORD, + SizeOfHeaders: ::DWORD, + CheckSum: ::DWORD, + Subsystem: ::WORD, + DllCharacteristics: ::WORD, + SizeOfStackReserve: ULONGLONG, + SizeOfStackCommit: ULONGLONG, + SizeOfHeapReserve: ULONGLONG, + SizeOfHeapCommit: ULONGLONG, + LoaderFlags: ::DWORD, + NumberOfRvaAndSizes: ::DWORD, + DataDirectory: [IMAGE_DATA_DIRECTORY; IMAGE_NUMBEROF_DIRECTORY_ENTRIES], +}} +pub type PIMAGE_OPTIONAL_HEADER64 = *mut IMAGE_OPTIONAL_HEADER64; +pub const IMAGE_NT_OPTIONAL_HDR32_MAGIC: ::WORD = 0x10b; +pub const IMAGE_NT_OPTIONAL_HDR64_MAGIC: ::WORD = 0x20b; +pub const IMAGE_ROM_OPTIONAL_HDR_MAGIC: ::WORD = 0x107; +#[cfg(target_arch = "x86_64")] +pub type IMAGE_OPTIONAL_HEADER = IMAGE_OPTIONAL_HEADER64; +#[cfg(target_arch = "x86_64")] +pub type PIMAGE_OPTIONAL_HEADER = PIMAGE_OPTIONAL_HEADER64; +#[cfg(target_arch = "x86")] +pub type IMAGE_OPTIONAL_HEADER = IMAGE_OPTIONAL_HEADER32; +#[cfg(target_arch = "x86")] +pub type PIMAGE_OPTIONAL_HEADER = PIMAGE_OPTIONAL_HEADER32; +STRUCT!{struct IMAGE_NT_HEADERS64 { + Signature: ::DWORD, + FileHeader: IMAGE_FILE_HEADER, + OptionalHeader: IMAGE_OPTIONAL_HEADER64, +}} +pub type PIMAGE_NT_HEADERS64 = *mut IMAGE_NT_HEADERS64; +STRUCT!{struct IMAGE_NT_HEADERS32 { + Signature: ::DWORD, + FileHeader: IMAGE_FILE_HEADER, + OptionalHeader: IMAGE_OPTIONAL_HEADER32, +}} +pub type PIMAGE_NT_HEADERS32 = *mut IMAGE_NT_HEADERS32; +STRUCT!{struct IMAGE_ROM_HEADERS { + FileHeader: IMAGE_FILE_HEADER, + OptionalHeader: IMAGE_ROM_OPTIONAL_HEADER, +}} +pub type PIMAGE_ROM_HEADERS = *mut IMAGE_ROM_HEADERS; +#[cfg(target_arch = "x86_64")] +pub type IMAGE_NT_HEADERS = IMAGE_NT_HEADERS64; +#[cfg(target_arch = "x86_64")] +pub type PIMAGE_NT_HEADERS = PIMAGE_NT_HEADERS64; +#[cfg(target_arch = "x86")] +pub type IMAGE_NT_HEADERS = IMAGE_NT_HEADERS32; +#[cfg(target_arch = "x86")] +pub type PIMAGE_NT_HEADERS = PIMAGE_NT_HEADERS32; +pub const IMAGE_SUBSYSTEM_UNKNOWN: ::WORD = 0; +pub const IMAGE_SUBSYSTEM_NATIVE: ::WORD = 1; +pub const IMAGE_SUBSYSTEM_WINDOWS_GUI: ::WORD = 2; +pub const IMAGE_SUBSYSTEM_WINDOWS_CUI: ::WORD = 3; +pub const IMAGE_SUBSYSTEM_OS2_CUI: ::WORD = 5; +pub const IMAGE_SUBSYSTEM_POSIX_CUI: ::WORD = 7; +pub const IMAGE_SUBSYSTEM_NATIVE_WINDOWS: ::WORD = 8; +pub const IMAGE_SUBSYSTEM_WINDOWS_CE_GUI: ::WORD = 9; +pub const IMAGE_SUBSYSTEM_EFI_APPLICATION: ::WORD = 10; +pub const IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER: ::WORD = 11; +pub const IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER: ::WORD = 12; +pub const IMAGE_SUBSYSTEM_EFI_ROM: ::WORD = 13; +pub const IMAGE_SUBSYSTEM_XBOX: ::WORD = 14; +pub const IMAGE_SUBSYSTEM_WINDOWS_BOOT_APPLICATION: ::WORD = 16; +pub const IMAGE_DLLCHARACTERISTICS_HIGH_ENTROPY_VA: ::WORD = 0x0020; +pub const IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE: ::WORD = 0x0040; +pub const IMAGE_DLLCHARACTERISTICS_FORCE_INTEGRITY: ::WORD = 0x0080; +pub const IMAGE_DLLCHARACTERISTICS_NX_COMPAT: ::WORD = 0x0100; +pub const IMAGE_DLLCHARACTERISTICS_NO_ISOLATION: ::WORD = 0x0200; +pub const IMAGE_DLLCHARACTERISTICS_NO_SEH: ::WORD = 0x0400; +pub const IMAGE_DLLCHARACTERISTICS_NO_BIND: ::WORD = 0x0800; +pub const IMAGE_DLLCHARACTERISTICS_APPCONTAINER: ::WORD = 0x1000; +pub const IMAGE_DLLCHARACTERISTICS_WDM_DRIVER: ::WORD = 0x2000; +pub const IMAGE_DLLCHARACTERISTICS_GUARD_CF: ::WORD = 0x4000; +pub const IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE: ::WORD = 0x8000; +pub const IMAGE_DIRECTORY_ENTRY_EXPORT: ::WORD = 0; +pub const IMAGE_DIRECTORY_ENTRY_IMPORT: ::WORD = 1; +pub const IMAGE_DIRECTORY_ENTRY_RESOURCE: ::WORD = 2; +pub const IMAGE_DIRECTORY_ENTRY_EXCEPTION: ::WORD = 3; +pub const IMAGE_DIRECTORY_ENTRY_SECURITY: ::WORD = 4; +pub const IMAGE_DIRECTORY_ENTRY_BASERELOC: ::WORD = 5; +pub const IMAGE_DIRECTORY_ENTRY_DEBUG: ::WORD = 6; +pub const IMAGE_DIRECTORY_ENTRY_ARCHITECTURE: ::WORD = 7; +pub const IMAGE_DIRECTORY_ENTRY_GLOBALPTR: ::WORD = 8; +pub const IMAGE_DIRECTORY_ENTRY_TLS: ::WORD = 9; +pub const IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG: ::WORD = 10; +pub const IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT: ::WORD = 11; +pub const IMAGE_DIRECTORY_ENTRY_IAT: ::WORD = 12; +pub const IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT: ::WORD = 13; +pub const IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR: ::WORD = 14; +STRUCT!{struct ANON_OBJECT_HEADER { + Sig1: ::WORD, + Sig2: ::WORD, + Version: ::WORD, + Machine: ::WORD, + TimeDateStamp: ::DWORD, + ClassID: ::CLSID, + SizeOfData: ::DWORD, +}} +STRUCT!{struct ANON_OBJECT_HEADER_V2 { + Sig1: ::WORD, + Sig2: ::WORD, + Version: ::WORD, + Machine: ::WORD, + TimeDateStamp: ::DWORD, + ClassID: ::CLSID, + SizeOfData: ::DWORD, + Flags: ::DWORD, + MetaDataSize: ::DWORD, + MetaDataOffset: ::DWORD, +}} +STRUCT!{struct ANON_OBJECT_HEADER_BIGOBJ { + Sig1: ::WORD, + Sig2: ::WORD, + Version: ::WORD, + Machine: ::WORD, + TimeDateStamp: ::DWORD, + ClassID: ::CLSID, + SizeOfData: ::DWORD, + Flags: ::DWORD, + MetaDataSize: ::DWORD, + MetaDataOffset: ::DWORD, + NumberOfSections: ::DWORD, + PointerToSymbolTable: ::DWORD, + NumberOfSymbols: ::DWORD, +}} +pub const IMAGE_SIZEOF_SHORT_NAME: usize = 8; +STRUCT!{struct IMAGE_SECTION_HEADER { + Name: [::BYTE; IMAGE_SIZEOF_SHORT_NAME], + PhysicalAddressOrVirtualSize: ::DWORD, + VirtualAddress: ::DWORD, + SizeOfRawData: ::DWORD, + PointerToRawData: ::DWORD, + PointerToRelocations: ::DWORD, + PointerToLinenumbers: ::DWORD, + NumberOfRelocations: ::WORD, + NumberOfLinenumbers: ::WORD, + Characteristics: ::DWORD, +}} +pub type PIMAGE_SECTION_HEADER = *mut IMAGE_SECTION_HEADER; +pub const IMAGE_SIZEOF_SECTION_HEADER: usize = 40; +pub const IMAGE_SCN_TYPE_NO_PAD: ::DWORD = 0x00000008; +pub const IMAGE_SCN_CNT_CODE: ::DWORD = 0x00000020; +pub const IMAGE_SCN_CNT_INITIALIZED_DATA: ::DWORD = 0x00000040; +pub const IMAGE_SCN_CNT_UNINITIALIZED_DATA: ::DWORD = 0x00000080; +pub const IMAGE_SCN_LNK_OTHER: ::DWORD = 0x00000100; +pub const IMAGE_SCN_LNK_INFO: ::DWORD = 0x00000200; +pub const IMAGE_SCN_LNK_REMOVE: ::DWORD = 0x00000800; +pub const IMAGE_SCN_LNK_COMDAT: ::DWORD = 0x00001000; +pub const IMAGE_SCN_NO_DEFER_SPEC_EXC: ::DWORD = 0x00004000; +pub const IMAGE_SCN_GPREL: ::DWORD = 0x00008000; +pub const IMAGE_SCN_MEM_FARDATA: ::DWORD = 0x00008000; +pub const IMAGE_SCN_MEM_PURGEABLE: ::DWORD = 0x00020000; +pub const IMAGE_SCN_MEM_16BIT: ::DWORD = 0x00020000; +pub const IMAGE_SCN_MEM_LOCKED: ::DWORD = 0x00040000; +pub const IMAGE_SCN_MEM_PRELOAD: ::DWORD = 0x00080000; +pub const IMAGE_SCN_ALIGN_1BYTES: ::DWORD = 0x00100000; +pub const IMAGE_SCN_ALIGN_2BYTES: ::DWORD = 0x00200000; +pub const IMAGE_SCN_ALIGN_4BYTES: ::DWORD = 0x00300000; +pub const IMAGE_SCN_ALIGN_8BYTES: ::DWORD = 0x00400000; +pub const IMAGE_SCN_ALIGN_16BYTES: ::DWORD = 0x00500000; +pub const IMAGE_SCN_ALIGN_32BYTES: ::DWORD = 0x00600000; +pub const IMAGE_SCN_ALIGN_64BYTES: ::DWORD = 0x00700000; +pub const IMAGE_SCN_ALIGN_128BYTES: ::DWORD = 0x00800000; +pub const IMAGE_SCN_ALIGN_256BYTES: ::DWORD = 0x00900000; +pub const IMAGE_SCN_ALIGN_512BYTES: ::DWORD = 0x00A00000; +pub const IMAGE_SCN_ALIGN_1024BYTES: ::DWORD = 0x00B00000; +pub const IMAGE_SCN_ALIGN_2048BYTES: ::DWORD = 0x00C00000; +pub const IMAGE_SCN_ALIGN_4096BYTES: ::DWORD = 0x00D00000; +pub const IMAGE_SCN_ALIGN_8192BYTES: ::DWORD = 0x00E00000; +pub const IMAGE_SCN_ALIGN_MASK: ::DWORD = 0x00F00000; +pub const IMAGE_SCN_LNK_NRELOC_OVFL: ::DWORD = 0x01000000; +pub const IMAGE_SCN_MEM_DISCARDABLE: ::DWORD = 0x02000000; +pub const IMAGE_SCN_MEM_NOT_CACHED: ::DWORD = 0x04000000; +pub const IMAGE_SCN_MEM_NOT_PAGED: ::DWORD = 0x08000000; +pub const IMAGE_SCN_MEM_SHARED: ::DWORD = 0x10000000; +pub const IMAGE_SCN_MEM_EXECUTE: ::DWORD = 0x20000000; +pub const IMAGE_SCN_MEM_READ: ::DWORD = 0x40000000; +pub const IMAGE_SCN_MEM_WRITE: ::DWORD = 0x80000000; +pub const IMAGE_SCN_SCALE_INDEX: ::DWORD = 0x00000001; +//16590 +STRUCT!{struct IMAGE_DEBUG_DIRECTORY { + Characteristics: ::DWORD, + TimeDateStamp: ::DWORD, + MajorVersion: ::WORD, + MinorVersion: ::WORD, + Type: ::DWORD, + SizeOfData: ::DWORD, + AddressOfRawData: ::DWORD, + PointerToRawData: ::DWORD, +}} +pub type PIMAGE_DEBUG_DIRECTORY = *mut IMAGE_DEBUG_DIRECTORY; +pub const IMAGE_DEBUG_TYPE_UNKNOWN: ::DWORD = 0; +pub const IMAGE_DEBUG_TYPE_COFF: ::DWORD = 1; +pub const IMAGE_DEBUG_TYPE_CODEVIEW: ::DWORD = 2; +pub const IMAGE_DEBUG_TYPE_FPO: ::DWORD = 3; +pub const IMAGE_DEBUG_TYPE_MISC: ::DWORD = 4; +pub const IMAGE_DEBUG_TYPE_EXCEPTION: ::DWORD = 5; +pub const IMAGE_DEBUG_TYPE_FIXUP: ::DWORD = 6; +pub const IMAGE_DEBUG_TYPE_OMAP_TO_SRC: ::DWORD = 7; +pub const IMAGE_DEBUG_TYPE_OMAP_FROM_SRC: ::DWORD = 8; +pub const IMAGE_DEBUG_TYPE_BORLAND: ::DWORD = 9; +pub const IMAGE_DEBUG_TYPE_RESERVED10: ::DWORD = 10; +pub const IMAGE_DEBUG_TYPE_CLSID: ::DWORD = 11; +STRUCT!{struct IMAGE_COFF_SYMBOLS_HEADER { + NumberOfSymbols: ::DWORD, + LvaToFirstSymbol: ::DWORD, + NumberOfLinenumbers: ::DWORD, + LvaToFirstLinenumber: ::DWORD, + RvaToFirstByteOfCode: ::DWORD, + RvaToLastByteOfCode: ::DWORD, + RvaToFirstByteOfData: ::DWORD, + RvaToLastByteOfData: ::DWORD, +}} +pub type PIMAGE_COFF_SYMBOLS_HEADER = *mut IMAGE_COFF_SYMBOLS_HEADER; +STRUCT!{struct IMAGE_RUNTIME_FUNCTION_ENTRY { + BeginAddress: ::DWORD, + EndAddress: ::DWORD, + UnwindInfoAddress: ::DWORD, +}} +UNION!(IMAGE_RUNTIME_FUNCTION_ENTRY, UnwindInfoAddress, UnwindData, UnwindData_mut, ::DWORD); +pub type PIMAGE_RUNTIME_FUNCTION_ENTRY = *mut IMAGE_RUNTIME_FUNCTION_ENTRY; +pub const FRAME_FPO: ::WORD = 0; +pub const FRAME_TRAP: ::WORD = 1; +pub const FRAME_TSS: ::WORD = 2; +pub const FRAME_NONFPO: ::WORD = 3; +STRUCT!{struct FPO_DATA { + ulOffStart: ::DWORD, + cbProcSize: ::DWORD, + cdwLocals: ::DWORD, + cdwParams: ::WORD, + bitfield: ::WORD, +}} +pub type PFPO_DATA = *mut FPO_DATA; +pub const SIZEOF_RFPO_DATA: usize = 16; +pub const IMAGE_DEBUG_MISC_EXENAME: ::DWORD = 1; +STRUCT!{struct IMAGE_DEBUG_MISC { + DataType: ::DWORD, + Length: ::DWORD, + Unicode: ::BOOLEAN, + Reserved: [::BYTE; 3], + Data: [::BYTE; 0], +}} +pub type PIMAGE_DEBUG_MISC = *mut IMAGE_DEBUG_MISC; +STRUCT!{struct IMAGE_FUNCTION_ENTRY { + StartingAddress: ::DWORD, + EndingAddress: ::DWORD, + EndOfPrologue: ::DWORD, +}} +pub type PIMAGE_FUNCTION_ENTRY = *mut IMAGE_FUNCTION_ENTRY; +STRUCT!{struct IMAGE_FUNCTION_ENTRY64 { + StartingAddress: ::ULONGLONG, + EndingAddress: ::ULONGLONG, + EndOfPrologueOrUnwindInfoAddress: ::ULONGLONG, +}} +pub type PIMAGE_FUNCTION_ENTRY64 = *mut IMAGE_FUNCTION_ENTRY64; +//18245 +pub const HEAP_NO_SERIALIZE: ::DWORD = 0x00000001; +pub const HEAP_GROWABLE: ::DWORD = 0x00000002; +pub const HEAP_GENERATE_EXCEPTIONS: ::DWORD = 0x00000004; +pub const HEAP_ZERO_MEMORY: ::DWORD = 0x00000008; +pub const HEAP_REALLOC_IN_PLACE_ONLY: ::DWORD = 0x00000010; +pub const HEAP_TAIL_CHECKING_ENABLED: ::DWORD = 0x00000020; +pub const HEAP_FREE_CHECKING_ENABLED: ::DWORD = 0x00000040; +pub const HEAP_DISABLE_COALESCE_ON_FREE: ::DWORD = 0x00000080; +pub const HEAP_CREATE_ALIGN_16: ::DWORD = 0x00010000; +pub const HEAP_CREATE_ENABLE_TRACING: ::DWORD = 0x00020000; +pub const HEAP_CREATE_ENABLE_EXECUTE: ::DWORD = 0x00040000; +pub const HEAP_MAXIMUM_TAG: ::DWORD = 0x0FFF; +pub const HEAP_PSEUDO_TAG_FLAG: ::DWORD = 0x8000; +pub const HEAP_TAG_SHIFT: ::DWORD = 18; +//18145 +STRUCT!{struct RTL_CRITICAL_SECTION_DEBUG { + Type: ::WORD, + CreatorBackTraceIndex: ::WORD, + CriticalSection: *mut ::RTL_CRITICAL_SECTION, + ProcessLocksList: ::LIST_ENTRY, + EntryCount: ::DWORD, + ContentionCount: ::DWORD, + Flags: ::DWORD, + CreatorBackTraceIndexHigh: ::WORD, + SpareWORD: ::WORD, +}} +pub type PRTL_CRITICAL_SECTION_DEBUG = *mut RTL_CRITICAL_SECTION_DEBUG; +pub type RTL_RESOURCE_DEBUG = RTL_CRITICAL_SECTION_DEBUG; +pub type PRTL_RESOURCE_DEBUG = *mut RTL_CRITICAL_SECTION_DEBUG; +pub const RTL_CRITSECT_TYPE: ::WORD = 0; +pub const RTL_RESOURCE_TYPE: ::WORD = 1; +pub const RTL_CRITICAL_SECTION_FLAG_NO_DEBUG_INFO: ::ULONG_PTR = 0x01000000; +pub const RTL_CRITICAL_SECTION_FLAG_DYNAMIC_SPIN: ::ULONG_PTR = 0x02000000; +pub const RTL_CRITICAL_SECTION_FLAG_STATIC_INIT: ::ULONG_PTR = 0x04000000; +pub const RTL_CRITICAL_SECTION_FLAG_RESOURCE_TYPE: ::ULONG_PTR = 0x08000000; +pub const RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO: ::ULONG_PTR = 0x10000000; +pub const RTL_CRITICAL_SECTION_ALL_FLAG_BITS: ::ULONG_PTR = 0xFF000000; +pub const RTL_CRITICAL_SECTION_FLAG_RESERVED: ::ULONG_PTR = RTL_CRITICAL_SECTION_ALL_FLAG_BITS & !(RTL_CRITICAL_SECTION_FLAG_NO_DEBUG_INFO | RTL_CRITICAL_SECTION_FLAG_DYNAMIC_SPIN | RTL_CRITICAL_SECTION_FLAG_STATIC_INIT | RTL_CRITICAL_SECTION_FLAG_RESOURCE_TYPE | RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO); +pub const RTL_CRITICAL_SECTION_DEBUG_FLAG_STATIC_INIT: ::DWORD = 0x00000001; +STRUCT!{struct RTL_CRITICAL_SECTION { + DebugInfo: ::PRTL_CRITICAL_SECTION_DEBUG, + LockCount: ::LONG, + RecursionCount: ::LONG, + OwningThread: ::HANDLE, + LockSemaphore: ::HANDLE, + SpinCount: ::ULONG_PTR, +}} +pub type PRTL_CRITICAL_SECTION = *mut RTL_CRITICAL_SECTION; +STRUCT!{struct RTL_SRWLOCK { + Ptr: ::PVOID, +}} +pub type PRTL_SRWLOCK = *mut RTL_SRWLOCK; +pub const RTL_SRWLOCK_INIT: RTL_SRWLOCK = RTL_SRWLOCK { Ptr: 0 as PVOID }; +STRUCT!{struct RTL_CONDITION_VARIABLE { + Ptr: ::PVOID, +}} +pub type PRTL_CONDITION_VARIABLE = *mut RTL_CONDITION_VARIABLE; +pub const RTL_CONDITION_VARIABLE_INIT: RTL_CONDITION_VARIABLE = RTL_CONDITION_VARIABLE { + Ptr: 0 as PVOID +}; +//18204 +pub type PAPCFUNC = Option<unsafe extern "system" fn(Parameter: ::ULONG_PTR)>; +pub type PVECTORED_EXCEPTION_HANDLER = Option<unsafe extern "system" fn( + ExceptionInfo: *mut EXCEPTION_POINTERS, +) -> ::LONG>; +ENUM!{enum HEAP_INFORMATION_CLASS { + HeapCompatibilityInformation = 0, + HeapEnableTerminationOnCorruption = 1, + HeapOptimizeResources = 3, +}} +//pub use self::HEAP_INFORMATION_CLASS::*; +pub const HEAP_OPTIMIZE_RESOURCES_CURRENT_VERSION: ::DWORD = 1; +STRUCT!{struct HEAP_OPTIMIZE_RESOURCES_INFORMATION { + Version: ::DWORD, + Flags: ::DWORD, +}} +pub type PHEAP_OPTIMIZE_RESOURCES_INFORMATION = *mut HEAP_OPTIMIZE_RESOURCES_INFORMATION; +pub const WT_EXECUTEDEFAULT: ::ULONG = 0x00000000; +pub const WT_EXECUTEINIOTHREAD: ::ULONG = 0x00000001; +pub const WT_EXECUTEINUITHREAD: ::ULONG = 0x00000002; +pub const WT_EXECUTEINWAITTHREAD: ::ULONG = 0x00000004; +pub const WT_EXECUTEONLYONCE: ::ULONG = 0x00000008; +pub const WT_EXECUTEINTIMERTHREAD: ::ULONG = 0x00000020; +pub const WT_EXECUTELONGFUNCTION: ::ULONG = 0x00000010; +pub const WT_EXECUTEINPERSISTENTIOTHREAD: ::ULONG = 0x00000040; +pub const WT_EXECUTEINPERSISTENTTHREAD: ::ULONG = 0x00000080; +pub const WT_TRANSFER_IMPERSONATION: ::ULONG = 0x00000100; +pub type WAITORTIMERCALLBACKFUNC = Option<unsafe extern "system" fn(::PVOID, ::BOOLEAN)>; +pub type WORKERCALLBACKFUNC = Option<unsafe extern "system" fn(::PVOID)>; +pub type APC_CALLBACK_FUNCTION = Option<unsafe extern "system" fn(::DWORD, ::PVOID, ::PVOID)>; +pub type WAITORTIMERCALLBACK = WAITORTIMERCALLBACKFUNC; +pub type PFLS_CALLBACK_FUNCTION = Option<unsafe extern "system" fn(lpFlsData: ::PVOID)>; +pub type PSECURE_MEMORY_CACHE_CALLBACK = Option<unsafe extern "system" fn( + Addr: ::PVOID, Range: ::SIZE_T, +) -> ::BOOLEAN>; +pub const WT_EXECUTEINLONGTHREAD: ::ULONG = 0x00000010; +pub const WT_EXECUTEDELETEWAIT: ::ULONG = 0x00000008; +//18570 +pub const KEY_QUERY_VALUE: ::REGSAM = 0x0001; +pub const KEY_SET_VALUE: ::REGSAM = 0x0002; +pub const KEY_CREATE_SUB_KEY: ::REGSAM = 0x0004; +pub const KEY_ENUMERATE_SUB_KEYS: ::REGSAM = 0x0008; +pub const KEY_NOTIFY: ::REGSAM = 0x0010; +pub const KEY_CREATE_LINK: ::REGSAM = 0x0020; +pub const KEY_WOW64_32KEY: ::REGSAM = 0x0200; +pub const KEY_WOW64_64KEY: ::REGSAM = 0x0100; +pub const KEY_WOW64_RES: ::REGSAM = 0x0300; +pub const KEY_READ: ::REGSAM = ( + STANDARD_RIGHTS_READ | + KEY_QUERY_VALUE | + KEY_ENUMERATE_SUB_KEYS | + KEY_NOTIFY + ) & (!SYNCHRONIZE); +pub const KEY_WRITE: ::REGSAM = (STANDARD_RIGHTS_WRITE | KEY_SET_VALUE | KEY_CREATE_SUB_KEY) & (!SYNCHRONIZE); +pub const KEY_EXECUTE: ::REGSAM = KEY_READ & (!SYNCHRONIZE); +pub const KEY_ALL_ACCESS: ::REGSAM = ( + STANDARD_RIGHTS_ALL | + KEY_QUERY_VALUE | + KEY_SET_VALUE | + KEY_CREATE_SUB_KEY | + KEY_ENUMERATE_SUB_KEYS | + KEY_NOTIFY | + KEY_CREATE_LINK + ) & (!SYNCHRONIZE); +pub const REG_CREATED_NEW_KEY: ::DWORD = 0x00000001; +pub const REG_OPENED_EXISTING_KEY: ::DWORD = 0x00000002; +pub const REG_NOTIFY_CHANGE_NAME: ::DWORD = 0x00000001; +pub const REG_NOTIFY_CHANGE_ATTRIBUTES: ::DWORD = 0x00000002; +pub const REG_NOTIFY_CHANGE_LAST_SET: ::DWORD = 0x00000004; +pub const REG_NOTIFY_CHANGE_SECURITY: ::DWORD = 0x00000008; +pub const REG_LEGAL_CHANGE_FILTER: ::DWORD = REG_NOTIFY_CHANGE_NAME | + REG_NOTIFY_CHANGE_ATTRIBUTES | + REG_NOTIFY_CHANGE_LAST_SET | + REG_NOTIFY_CHANGE_SECURITY; +pub const REG_NOTIFY_THREAD_AGNOSTIC: ::DWORD = 0x10000000; //supported only on Windows 8 and later +pub const REG_OPTION_RESERVED: ::DWORD = 0x00000000; +pub const REG_OPTION_NON_VOLATILE: ::DWORD = 0x00000000; +pub const REG_OPTION_VOLATILE: ::DWORD = 0x00000001; +pub const REG_OPTION_CREATE_LINK: ::DWORD = 0x00000002; +pub const REG_OPTION_BACKUP_RESTORE: ::DWORD = 0x00000004; +pub const REG_OPTION_OPEN_LINK: ::DWORD = 0x00000008; +pub const REG_NONE: ::DWORD = 0; +pub const REG_SZ: ::DWORD = 1; +pub const REG_EXPAND_SZ: ::DWORD = 2; +pub const REG_BINARY: ::DWORD = 3; +pub const REG_DWORD: ::DWORD = 4; +pub const REG_DWORD_LITTLE_ENDIAN: ::DWORD = 4; +pub const REG_DWORD_BIG_ENDIAN: ::DWORD = 5; +pub const REG_LINK: ::DWORD = 6; +pub const REG_MULTI_SZ: ::DWORD = 7; +pub const REG_RESOURCE_LIST: ::DWORD = 8; +pub const REG_FULL_RESOURCE_DESCRIPTOR: ::DWORD = 9; +pub const REG_RESOURCE_REQUIREMENTS_LIST: ::DWORD = 10; +pub const REG_QWORD: ::DWORD = 11; +pub const REG_QWORD_LITTLE_ENDIAN: ::DWORD = 11; +//18720 +pub const SERVICE_KERNEL_DRIVER: ::DWORD = 0x00000001; +pub const SERVICE_FILE_SYSTEM_DRIVER: ::DWORD = 0x00000002; +pub const SERVICE_ADAPTER: ::DWORD = 0x00000004; +pub const SERVICE_RECOGNIZER_DRIVER: ::DWORD = 0x00000008; +pub const SERVICE_DRIVER: ::DWORD = SERVICE_KERNEL_DRIVER | SERVICE_FILE_SYSTEM_DRIVER + | SERVICE_RECOGNIZER_DRIVER; +pub const SERVICE_WIN32_OWN_PROCESS: ::DWORD = 0x00000010; +pub const SERVICE_WIN32_SHARE_PROCESS: ::DWORD = 0x00000020; +pub const SERVICE_WIN32: ::DWORD = SERVICE_WIN32_OWN_PROCESS | SERVICE_WIN32_SHARE_PROCESS; +pub const SERVICE_INTERACTIVE_PROCESS: ::DWORD = 0x00000100; +pub const SERVICE_TYPE_ALL: ::DWORD = SERVICE_WIN32 | SERVICE_ADAPTER | SERVICE_DRIVER + | SERVICE_INTERACTIVE_PROCESS; +STRUCT!{struct TP_CALLBACK_INSTANCE { + dummy: *mut ::c_void, +}} +pub type PTP_CALLBACK_INSTANCE = *mut TP_CALLBACK_INSTANCE; +STRUCT!{struct TP_IO { + dummy: *mut ::c_void, +}} +pub type PTP_IO = *mut TP_IO; +STRUCT!{struct TP_POOL { + dummy: *mut ::c_void, +}} +pub type PTP_POOL = *mut TP_POOL; +STRUCT!{struct TP_CLEANUP_GROUP { + dummy: *mut ::c_void, +}} +pub type PTP_CLEANUP_GROUP = *mut TP_CLEANUP_GROUP; +STRUCT!{struct TP_TIMER { + dummy: *mut ::c_void, +}} +pub type PTP_TIMER = *mut TP_TIMER; +STRUCT!{struct TP_WAIT { + dummy: *mut ::c_void, +}} +pub type PTP_WAIT = *mut TP_WAIT; +STRUCT!{struct TP_WORK { + dummy: *mut ::c_void, +}} +pub type PTP_WORK = *mut TP_WORK; +STRUCT!{struct ACTIVATION_CONTEXT { + dummy: *mut ::c_void, +}} +ENUM!{enum TP_CALLBACK_PRIORITY { + TP_CALLBACK_PRIORITY_HIGH, + TP_CALLBACK_PRIORITY_NORMAL, + TP_CALLBACK_PRIORITY_LOW, + TP_CALLBACK_PRIORITY_INVALID, + TP_CALLBACK_PRIORITY_COUNT = 4, +}} +pub type PTP_CLEANUP_GROUP_CANCEL_CALLBACK = Option<unsafe extern "system" fn( + ObjectContext: ::PVOID, CleanupContext: ::PVOID, +)>; +pub type PTP_SIMPLE_CALLBACK = Option<unsafe extern "system" fn( + Instance: PTP_CALLBACK_INSTANCE, Context: ::PVOID, +)>; +pub type PTP_WORK_CALLBACK = Option<unsafe extern "system" fn( + Instance: PTP_CALLBACK_INSTANCE, Context: ::PVOID, Work: PTP_WORK, +)>; +pub type PTP_TIMER_CALLBACK = Option<unsafe extern "system" fn( + Instance: PTP_CALLBACK_INSTANCE, Context: ::PVOID, Timer: PTP_TIMER, +)>; +pub type TP_WAIT_RESULT = ::DWORD; +pub type PTP_WAIT_CALLBACK = Option<unsafe extern "system" fn( + Instance: PTP_CALLBACK_INSTANCE, Context: ::PVOID, Wait: PTP_WAIT, WaitResult: TP_WAIT_RESULT, +)>; +pub type TP_VERSION = ::DWORD; +pub type PTP_VERSION = *mut ::DWORD; +STRUCT!{struct TP_POOL_STACK_INFORMATION { + StackReserve: ::SIZE_T, + StackCommit: ::SIZE_T, +}} +pub type PTP_POOL_STACK_INFORMATION = *mut TP_POOL_STACK_INFORMATION; +STRUCT!{struct TP_CALLBACK_ENVIRON_V3_s { + BitFields: ::DWORD, +}} +BITFIELD!(TP_CALLBACK_ENVIRON_V3_s BitFields: ::DWORD [ + LongFunction set_LongFunction[0..1], + Persistent set_Persistent[1..2], + Private set_Private[2..32], +]); +STRUCT!{nodebug struct TP_CALLBACK_ENVIRON_V3 { + Version: TP_VERSION, + Pool: PTP_POOL, + CleanupGroup: PTP_CLEANUP_GROUP, + CleanupGroupCancelCallback: PTP_CLEANUP_GROUP_CANCEL_CALLBACK, + RaceDll: ::PVOID, + ActivationContext: *mut ACTIVATION_CONTEXT, + FinalizationCallback: PTP_SIMPLE_CALLBACK, + u: ::DWORD, + CallbackPriority: TP_CALLBACK_PRIORITY, + Size: ::DWORD, +}} +UNION!(TP_CALLBACK_ENVIRON_V3, u, Flags, Flags_mut, ::DWORD); +UNION!(TP_CALLBACK_ENVIRON_V3, u, s, s_mut, TP_CALLBACK_ENVIRON_V3_s); +pub type TP_CALLBACK_ENVIRON = TP_CALLBACK_ENVIRON_V3; +pub type PTP_CALLBACK_ENVIRON = *mut TP_CALLBACK_ENVIRON_V3; +STRUCT!{struct JOB_SET_ARRAY { + JobHandle: ::HANDLE, + MemberLevel: ::DWORD, + Flags: ::DWORD, +}} +pub type PJOB_SET_ARRAY = *mut JOB_SET_ARRAY; +STRUCT!{struct RTL_BARRIER { + Reserved1: ::DWORD, + Reserved2: ::DWORD, + Reserved3: [::ULONG_PTR; 2], + Reserved4: ::DWORD, + Reserved5: ::DWORD, +}} +pub type PRTL_BARRIER = *mut RTL_BARRIER; +STRUCT!{struct RTL_RUN_ONCE { + Ptr: ::PVOID, +}} +pub type PRTL_RUN_ONCE = *mut RTL_RUN_ONCE; +ENUM!{enum RTL_UMS_THREAD_INFO_CLASS { + UmsThreadInvalidInfoClass = 0, + UmsThreadUserContext, + UmsThreadPriority, // Reserved + UmsThreadAffinity, // Reserved + UmsThreadTeb, + UmsThreadIsSuspended, + UmsThreadIsTerminated, + UmsThreadMaxInfoClass, +}} +ENUM!{enum RTL_UMS_SCHEDULER_REASON { + UmsSchedulerStartup = 0, + UmsSchedulerThreadBlocked, + UmsSchedulerThreadYield, +}} +pub type PRTL_UMS_SCHEDULER_ENTRY_POINT = Option<unsafe extern "system" fn( + Reason: RTL_UMS_SCHEDULER_REASON, ActivationPayload: ::ULONG_PTR, SchedulerParam: ::PVOID, +)>; +ENUM!{enum FIRMWARE_TYPE { + FirmwareTypeUnknown, + FirmwareTypeBios, + FirmwareTypeUefi, + FirmwareTypeMax, +}} +pub type PFIRMWARE_TYPE = *mut FIRMWARE_TYPE; +ENUM!{enum LOGICAL_PROCESSOR_RELATIONSHIP { + RelationProcessorCore, + RelationNumaNode, + RelationCache, + RelationProcessorPackage, + RelationGroup, + RelationAll = 0xffff, +}} +ENUM!{enum PROCESSOR_CACHE_TYPE { + CacheUnified, + CacheInstruction, + CacheData, + CacheTrace, +}} +STRUCT!{struct CACHE_DESCRIPTOR { + Level: ::BYTE, + Associativity: ::BYTE, + LineSize: ::WORD, + Size: ::DWORD, + Type: PROCESSOR_CACHE_TYPE, +}} +pub type PCACHE_DESCRIPTOR = *mut CACHE_DESCRIPTOR; +STRUCT!{struct SYSTEM_LOGICAL_PROCESSOR_INFORMATION_ProcessorCore { + Flags: ::BYTE, +}} +STRUCT!{struct SYSTEM_LOGICAL_PROCESSOR_INFORMATION_NumaNode { + NodeNumber: ::DWORD, +}} +STRUCT!{struct SYSTEM_LOGICAL_PROCESSOR_INFORMATION { + ProcessorMask: ::ULONG_PTR, + Relationship: LOGICAL_PROCESSOR_RELATIONSHIP, + Reserved: [::ULONGLONG; 2], +}} +UNION!( + SYSTEM_LOGICAL_PROCESSOR_INFORMATION, Reserved, ProcessorCore, ProcessorCore_mut, + SYSTEM_LOGICAL_PROCESSOR_INFORMATION_ProcessorCore +); +UNION!( + SYSTEM_LOGICAL_PROCESSOR_INFORMATION, Reserved, NumaNode, NumaNode_mut, + SYSTEM_LOGICAL_PROCESSOR_INFORMATION_NumaNode +); +UNION!(SYSTEM_LOGICAL_PROCESSOR_INFORMATION, Reserved, Cache, Cache_mut, CACHE_DESCRIPTOR); +pub type PSYSTEM_LOGICAL_PROCESSOR_INFORMATION = *mut SYSTEM_LOGICAL_PROCESSOR_INFORMATION; +STRUCT!{struct SYSTEM_PROCESSOR_CYCLE_TIME_INFORMATION { + CycleTime: ::DWORD64, +}} +pub type PSYSTEM_PROCESSOR_CYCLE_TIME_INFORMATION = *mut SYSTEM_PROCESSOR_CYCLE_TIME_INFORMATION; +ENUM!{enum HARDWARE_COUNTER_TYPE { + PMCCounter, + MaxHardwareCounterType, +}} +pub type PHARDWARE_COUNTER_TYPE = *mut HARDWARE_COUNTER_TYPE; +ENUM!{enum PROCESS_MITIGATION_POLICY { + ProcessDEPPolicy, + ProcessASLRPolicy, + ProcessDynamicCodePolicy, + ProcessStrictHandleCheckPolicy, + ProcessSystemCallDisablePolicy, + ProcessMitigationOptionsMask, + ProcessExtensionPointDisablePolicy, + ProcessReserved1Policy, + ProcessSignaturePolicy, + MaxProcessMitigationPolicy, +}} +STRUCT!{nodebug struct OSVERSIONINFOA { + dwOSVersionInfoSize: ::DWORD, + dwMajorVersion: ::DWORD, + dwMinorVersion: ::DWORD, + dwBuildNumber: ::DWORD, + dwPlatformId: ::DWORD, + szCSDVersion: [::CHAR; 128], +}} +pub type POSVERSIONINFOA = *mut OSVERSIONINFOA; +pub type LPOSVERSIONINFOA = *mut OSVERSIONINFOA; +STRUCT!{nodebug struct OSVERSIONINFOW { + dwOSVersionInfoSize: ::DWORD, + dwMajorVersion: ::DWORD, + dwMinorVersion: ::DWORD, + dwBuildNumber: ::DWORD, + dwPlatformId: ::DWORD, + szCSDVersion: [::WCHAR; 128], +}} +pub type POSVERSIONINFOW = *mut OSVERSIONINFOW; +pub type LPOSVERSIONINFOW = *mut OSVERSIONINFOW; +STRUCT!{nodebug struct OSVERSIONINFOEXA { + dwOSVersionInfoSize: ::DWORD, + dwMajorVersion: ::DWORD, + dwMinorVersion: ::DWORD, + dwBuildNumber: ::DWORD, + dwPlatformId: ::DWORD, + szCSDVersion: [::CHAR; 128], + wServicePackMajor: ::WORD, + wServicePackMinor: ::WORD, + wSuiteMask: ::WORD, + wProductType: ::BYTE, + wReserved: ::BYTE, +}} +pub type POSVERSIONINFOEXA = *mut OSVERSIONINFOEXA; +pub type LPOSVERSIONINFOEXA = *mut OSVERSIONINFOEXA; +STRUCT!{nodebug struct OSVERSIONINFOEXW { + dwOSVersionInfoSize: ::DWORD, + dwMajorVersion: ::DWORD, + dwMinorVersion: ::DWORD, + dwBuildNumber: ::DWORD, + dwPlatformId: ::DWORD, + szCSDVersion: [::WCHAR; 128], + wServicePackMajor: ::WORD, + wServicePackMinor: ::WORD, + wSuiteMask: ::WORD, + wProductType: ::BYTE, + wReserved: ::BYTE, +}} +pub type POSVERSIONINFOEXW = *mut OSVERSIONINFOEXW; +pub type LPOSVERSIONINFOEXW = *mut OSVERSIONINFOEXW; +STRUCT!{struct SLIST_ENTRY { + Next: *mut SLIST_ENTRY, +}} +pub type PSLIST_ENTRY = *mut SLIST_ENTRY; +STRUCT!{struct SLIST_HEADER_HeaderX64 { + BitFields1: ::ULONGLONG, + BitFields2: ::ULONGLONG, +}} +BITFIELD!(SLIST_HEADER_HeaderX64 BitFields1: ::ULONGLONG [ + Depth set_Depth[0..16], + Sequence set_Sequence[16..64], +]); +BITFIELD!(SLIST_HEADER_HeaderX64 BitFields2: ::ULONGLONG [ + Reserved set_Reserved[0..4], + NextEntry set_NextEntry[4..64], +]); +STRUCT!{struct SLIST_HEADER { + Alignment: ::ULONGLONG, + Region: ::ULONGLONG, +}} +UNION!(SLIST_HEADER, Alignment, HeaderX64, HeaderX64_mut, SLIST_HEADER_HeaderX64); +pub type PSLIST_HEADER = *mut SLIST_HEADER; +ENUM!{enum SYSTEM_POWER_STATE { + PowerSystemUnspecified = 0, + PowerSystemWorking = 1, + PowerSystemSleeping1 = 2, + PowerSystemSleeping2 = 3, + PowerSystemSleeping3 = 4, + PowerSystemHibernate = 5, + PowerSystemShutdown = 6, + PowerSystemMaximum = 7, +}} +pub type PSYSTEM_POWER_STATE = *mut SYSTEM_POWER_STATE; +ENUM!{enum POWER_ACTION { + PowerActionNone = 0, + PowerActionReserved, + PowerActionSleep, + PowerActionHibernate, + PowerActionShutdown, + PowerActionShutdownReset, + PowerActionShutdownOff, + PowerActionWarmEject, +}} +pub type PPOWER_ACTION = *mut POWER_ACTION; +ENUM!{enum DEVICE_POWER_STATE { + PowerDeviceUnspecified = 0, + PowerDeviceD0, + PowerDeviceD1, + PowerDeviceD2, + PowerDeviceD3, + PowerDeviceMaximum, +}} +pub type PDEVICE_POWER_STATE = *mut DEVICE_POWER_STATE; +ENUM!{enum MONITOR_DISPLAY_STATE { + PowerMonitorOff = 0, + PowerMonitorOn, + PowerMonitorDim, +}} +pub type PMONITOR_DISPLAY_STATE = *mut MONITOR_DISPLAY_STATE; +ENUM!{enum USER_ACTIVITY_PRESENCE { + PowerUserPresent = 0, + PowerUserNotPresent, + PowerUserInactive, + PowerUserMaximum, + //PowerUserInvalid = 3, +}} +pub type PUSER_ACTIVITY_PRESENCE = *mut USER_ACTIVITY_PRESENCE; +pub type EXECUTION_STATE = ::DWORD; +pub type PEXECUTION_STATE = *mut ::DWORD; +ENUM!{enum LATENCY_TIME { + LT_DONT_CARE, + LT_LOWEST_LATENCY, +}} +ENUM!{enum POWER_REQUEST_TYPE { + PowerRequestDisplayRequired, + PowerRequestSystemRequired, + PowerRequestAwayModeRequired, + PowerRequestExecutionRequired, +}} +pub type PPOWER_REQUEST_TYPE = *mut POWER_REQUEST_TYPE; +pub const MAX_HW_COUNTERS: usize = 16; +STRUCT!{struct HARDWARE_COUNTER_DATA { + Type: HARDWARE_COUNTER_TYPE, + Reserved: ::DWORD, + Value: ::DWORD64, +}} +pub type PHARDWARE_COUNTER_DATA = *mut HARDWARE_COUNTER_DATA; +STRUCT!{struct PERFORMANCE_DATA { + Size: ::WORD, + Version: ::BYTE, + HwCountersCount: ::BYTE, + ContextSwitchCount: ::DWORD, + WaitReasonBitMap: ::DWORD64, + CycleTime: ::DWORD64, + RetryCount: ::DWORD, + Reserved: ::DWORD, + HwCounters: [HARDWARE_COUNTER_DATA; MAX_HW_COUNTERS], +}} +pub type PPERFORMANCE_DATA = *mut PERFORMANCE_DATA; +STRUCT!{struct MEMORY_BASIC_INFORMATION { + BaseAddress: ::PVOID, + AllocationBase: ::PVOID, + AllocationProtect: ::DWORD, + RegionSize: ::SIZE_T, + State: ::DWORD, + Protect: ::DWORD, + Type: ::DWORD, +}} +pub type PMEMORY_BASIC_INFORMATION = *mut MEMORY_BASIC_INFORMATION; +STRUCT!{struct MEMORY_BASIC_INFORMATION32 { + BaseAddress: ::DWORD, + AllocationBase: ::DWORD, + AllocationProtect: ::DWORD, + RegionSize: ::DWORD, + State: ::DWORD, + Protect: ::DWORD, + Type: ::DWORD, +}} +pub type PMEMORY_BASIC_INFORMATION32 = *mut MEMORY_BASIC_INFORMATION32; +STRUCT!{struct MEMORY_BASIC_INFORMATION64 { // FIXME: align 16 + BaseAddress: ::ULONGLONG, + AllocationBase: ::ULONGLONG, + AllocationProtect: ::DWORD, + __alignment1: ::DWORD, + RegionSize: ::ULONGLONG, + State: ::DWORD, + Protect: ::DWORD, + Type: ::DWORD, + __alignment2: ::DWORD, +}} +pub type PMEMORY_BASIC_INFORMATION64 = *mut MEMORY_BASIC_INFORMATION64; +pub const WOW64_SIZE_OF_80387_REGISTERS: usize = 80; +pub const WOW64_MAXIMUM_SUPPORTED_EXTENSION: usize = 512; +STRUCT!{nodebug struct WOW64_FLOATING_SAVE_AREA { + ControlWord: ::DWORD, + StatusWord: ::DWORD, + TagWord: ::DWORD, + ErrorOffset: ::DWORD, + ErrorSelector: ::DWORD, + DataOffset: ::DWORD, + DataSelector: ::DWORD, + RegisterArea: [::BYTE; WOW64_SIZE_OF_80387_REGISTERS], + Cr0NpxState: ::DWORD, +}} +pub type PWOW64_FLOATING_SAVE_AREA = *mut WOW64_FLOATING_SAVE_AREA; +STRUCT!{nodebug struct WOW64_CONTEXT { + ContextFlags: ::DWORD, + Dr0: ::DWORD, + Dr1: ::DWORD, + Dr2: ::DWORD, + Dr3: ::DWORD, + Dr4: ::DWORD, + Dr5: ::DWORD, + Dr6: ::DWORD, + Dr7: ::DWORD, + FloatSave: WOW64_FLOATING_SAVE_AREA, + SegGs: ::DWORD, + SegFs: ::DWORD, + SegEs: ::DWORD, + SegDs: ::DWORD, + Edi: ::DWORD, + Esi: ::DWORD, + Ebx: ::DWORD, + Edx: ::DWORD, + Ecx: ::DWORD, + Eax: ::DWORD, + Ebp: ::DWORD, + Eip: ::DWORD, + SegCs: ::DWORD, + EFlags: ::DWORD, + Esp: ::DWORD, + SegSs: ::DWORD, + ExtendedRegisters: [::BYTE; WOW64_MAXIMUM_SUPPORTED_EXTENSION], +}} +pub type PWOW64_CONTEXT = *mut WOW64_CONTEXT; +STRUCT!{struct WOW64_LDT_ENTRY_Bytes { + BaseMid: ::BYTE, + Flags1: ::BYTE, + Flags2: ::BYTE, + BaseHi: ::BYTE, +}} +STRUCT!{struct WOW64_LDT_ENTRY_Bits { + BitFields: ::DWORD, +}} +BITFIELD!(WOW64_LDT_ENTRY_Bits BitFields: ::DWORD [ + BaseMid set_BaseMid[0..8], + Type set_Type[8..13], + Dpl set_Dpl[13..15], + Pres set_Pres[15..16], + LimitHi set_LimitHi[16..20], + Sys set_Sys[20..21], + Reserved_0 set_Reserved_0[21..22], + Default_Big set_Default_Big[22..23], + Granularity set_Granularity[23..24], + BaseHi set_BaseHi[24..32], +]); +STRUCT!{struct WOW64_LDT_ENTRY { + LimitLow: ::WORD, + BaseLow: ::WORD, + HighWord: ::DWORD, +}} +UNION!(WOW64_LDT_ENTRY, HighWord, Bytes, Bytes_mut, WOW64_LDT_ENTRY_Bytes); +UNION!(WOW64_LDT_ENTRY, HighWord, Bits, Bits_mut, WOW64_LDT_ENTRY_Bits); +pub type PWOW64_LDT_ENTRY = *mut WOW64_LDT_ENTRY; diff --git a/deps/winapi-0.2.6/src/winscard.rs b/deps/winapi-0.2.6/src/winscard.rs new file mode 100644 index 000000000..7d20c2d99 --- /dev/null +++ b/deps/winapi-0.2.6/src/winscard.rs @@ -0,0 +1,269 @@ +// Copyright © 2015, skdltmxn +// Licensed under the MIT License <LICENSE.md> +//! Data Protection API Prototypes and Definitions +// This header file provides the definitions and symbols necessary for an +// Application or Smart Card Service Provider to access the Smartcard Subsystem. +pub type LPCBYTE = *const ::BYTE; +pub type SCARDCONTEXT = ::ULONG_PTR; +pub type PSCARDCONTEXT = *mut SCARDCONTEXT; +pub type LPSCARDCONTEXT = *mut SCARDCONTEXT; +pub type SCARDHANDLE = ::ULONG_PTR; +pub type PSCARDHANDLE = *mut SCARDHANDLE; +pub type LPSCARDHANDLE = *mut SCARDHANDLE; +pub const SCARD_AUTOALLOCATE: ::DWORD = -1i32 as ::DWORD; +pub const SCARD_SCOPE_USER: ::DWORD = 0; +pub const SCARD_SCOPE_TERMINAL: ::DWORD = 1; +pub const SCARD_SCOPE_SYSTEM: ::DWORD = 2; +pub const SCARD_PROVIDER_PRIMARY: ::DWORD = 1; +pub const SCARD_PROVIDER_CSP: ::DWORD = 2; +pub const SCARD_PROVIDER_KSP: ::DWORD = 3; +STRUCT!{nodebug struct SCARD_READERSTATEA { + szReader: ::LPCSTR, + pvUserData: ::LPVOID, + dwCurrentState: ::DWORD, + dwEventState: ::DWORD, + cbAtr: ::DWORD, + rgbAtr: [::BYTE; 36], +}} +pub type PSCARD_READERSTATEA = *mut SCARD_READERSTATEA; +pub type LPSCARD_READERSTATEA = *mut SCARD_READERSTATEA; +STRUCT!{nodebug struct SCARD_READERSTATEW { + szReader: ::LPCWSTR, + pvUserData: ::LPVOID, + dwCurrentState: ::DWORD, + dwEventState: ::DWORD, + cbAtr: ::DWORD, + rgbAtr: [::BYTE; 36], +}} +pub type PSCARD_READERSTATEW = *mut SCARD_READERSTATEW; +pub type LPSCARD_READERSTATEW = *mut SCARD_READERSTATEW; +pub type SCARD_READERSTATE_A = SCARD_READERSTATEA; +pub type SCARD_READERSTATE_W = SCARD_READERSTATEW; +pub type PSCARD_READERSTATE_A = PSCARD_READERSTATEA; +pub type PSCARD_READERSTATE_W = PSCARD_READERSTATEW; +pub type LPSCARD_READERSTATE_A = LPSCARD_READERSTATEA; +pub type LPSCARD_READERSTATE_W = LPSCARD_READERSTATEW; +pub const SCARD_STATE_UNAWARE: ::DWORD = 0x00000000; +pub const SCARD_STATE_IGNORE: ::DWORD = 0x00000001; +pub const SCARD_STATE_CHANGED: ::DWORD = 0x00000002; +pub const SCARD_STATE_UNKNOWN: ::DWORD = 0x00000004; +pub const SCARD_STATE_UNAVAILABLE: ::DWORD = 0x00000008; +pub const SCARD_STATE_EMPTY: ::DWORD = 0x00000010; +pub const SCARD_STATE_PRESENT: ::DWORD = 0x00000020; +pub const SCARD_STATE_ATRMATCH: ::DWORD = 0x00000040; +pub const SCARD_STATE_EXCLUSIVE: ::DWORD = 0x00000080; +pub const SCARD_STATE_INUSE: ::DWORD = 0x00000100; +pub const SCARD_STATE_MUTE: ::DWORD = 0x00000200; +pub const SCARD_STATE_UNPOWERED: ::DWORD = 0x00000400; +STRUCT!{nodebug struct SCARD_ATRMASK { + cbAtr: ::DWORD, + rgbAtr: [::BYTE; 36], + rgbMask: [::BYTE; 36], +}} +pub type PSCARD_ATRMASK = *mut SCARD_ATRMASK; +pub type LPSCARD_ATRMASK = *mut SCARD_ATRMASK; +pub const SCARD_SHARE_EXCLUSIVE: ::DWORD = 1; +pub const SCARD_SHARE_SHARED: ::DWORD = 2; +pub const SCARD_SHARE_DIRECT: ::DWORD = 3; +pub const SCARD_LEAVE_CARD: ::DWORD = 0; +pub const SCARD_RESET_CARD: ::DWORD = 1; +pub const SCARD_UNPOWER_CARD: ::DWORD = 2; +pub const SCARD_EJECT_CARD: ::DWORD = 3; +pub const SC_DLG_MINIMAL_UI: ::DWORD = 0x01; +pub const SC_DLG_NO_UI: ::DWORD = 0x02; +pub const SC_DLG_FORCE_UI: ::DWORD = 0x04; +pub const SCERR_NOCARDNAME: ::DWORD = 0x4000; +pub const SCERR_NOGUIDS: ::DWORD = 0x8000; +pub type LPOCNCONNPROCA = Option<unsafe extern "system" fn( + SCARDCONTEXT, ::LPSTR, ::LPSTR, ::PVOID, +) -> SCARDHANDLE>; +pub type LPOCNCONNPROCW = Option<unsafe extern "system" fn( + SCARDCONTEXT, ::LPWSTR, ::LPWSTR, ::PVOID, +) -> SCARDHANDLE>; +pub type LPOCNCHKPROC = Option<unsafe extern "system" fn( + SCARDCONTEXT, SCARDHANDLE, ::PVOID, +) -> ::BOOL>; +pub type LPOCNDSCPROC = Option<unsafe extern "system" fn(SCARDCONTEXT, SCARDHANDLE, ::PVOID)>; +STRUCT!{nodebug struct OPENCARD_SEARCH_CRITERIAA { + dwStructSize: ::DWORD, + lpstrGroupNames: ::LPSTR, + nMaxGroupNames: ::DWORD, + rgguidInterfaces: ::LPCGUID, + cguidInterfaces: ::DWORD, + lpstrCardNames: ::LPSTR, + nMaxCardNames: ::DWORD, + lpfnCheck: LPOCNCHKPROC, + lpfnConnect: LPOCNCONNPROCA, + lpfnDisconnect: LPOCNDSCPROC, + pvUserData: ::LPVOID, + dwShareMode: ::DWORD, + dwPreferredProtocols: ::DWORD, +}} +pub type POPENCARD_SEARCH_CRITERIAA = *mut OPENCARD_SEARCH_CRITERIAA; +pub type LPOPENCARD_SEARCH_CRITERIAA = *mut OPENCARD_SEARCH_CRITERIAA; +STRUCT!{nodebug struct OPENCARD_SEARCH_CRITERIAW { + dwStructSize: ::DWORD, + lpstrGroupNames: ::LPWSTR, + nMaxGroupNames: ::DWORD, + rgguidInterfaces: ::LPCGUID, + cguidInterfaces: ::DWORD, + lpstrCardNames: ::LPWSTR, + nMaxCardNames: ::DWORD, + lpfnCheck: LPOCNCHKPROC, + lpfnConnect: LPOCNCONNPROCW, + lpfnDisconnect: LPOCNDSCPROC, + pvUserData: ::LPVOID, + dwShareMode: ::DWORD, + dwPreferredProtocols: ::DWORD, +}} +pub type POPENCARD_SEARCH_CRITERIAW = *mut OPENCARD_SEARCH_CRITERIAW; +pub type LPOPENCARD_SEARCH_CRITERIAW = *mut OPENCARD_SEARCH_CRITERIAW; +STRUCT!{nodebug struct OPENCARDNAME_EXA { + dwStructSize: ::DWORD, + hSCardContext: SCARDCONTEXT, + hwndOwner: ::HWND, + dwFlags: ::DWORD, + lpstrTitle: ::LPCSTR, + lpstrSearchDesc: ::LPCSTR, + hIcon: ::HICON, + pOpenCardSearchCriteria: POPENCARD_SEARCH_CRITERIAA, + lpfnConnect: LPOCNCONNPROCA, + pvUserData: ::LPVOID, + dwShareMode: ::DWORD, + dwPreferredProtocols: ::DWORD, + lpstrRdr: ::LPSTR, + nMaxRdr: ::DWORD, + lpstrCard: ::LPSTR, + nMaxCard: ::DWORD, + dwActiveProtocol: ::DWORD, + hCardHandle: SCARDHANDLE, +}} +pub type POPENCARDNAME_EXA = *mut OPENCARDNAME_EXA; +pub type LPOPENCARDNAME_EXA = *mut OPENCARDNAME_EXA; +STRUCT!{nodebug struct OPENCARDNAME_EXW { + dwStructSize: ::DWORD, + hSCardContext: SCARDCONTEXT, + hwndOwner: ::HWND, + dwFlags: ::DWORD, + lpstrTitle: ::LPCWSTR, + lpstrSearchDesc: ::LPCWSTR, + hIcon: ::HICON, + pOpenCardSearchCriteria: POPENCARD_SEARCH_CRITERIAW, + lpfnConnect: LPOCNCONNPROCW, + pvUserData: ::LPVOID, + dwShareMode: ::DWORD, + dwPreferredProtocols: ::DWORD, + lpstrRdr: ::LPWSTR, + nMaxRdr: ::DWORD, + lpstrCard: ::LPWSTR, + nMaxCard: ::DWORD, + dwActiveProtocol: ::DWORD, + hCardHandle: SCARDHANDLE, +}} +pub type POPENCARDNAME_EXW = *mut OPENCARDNAME_EXW; +pub type LPOPENCARDNAME_EXW = *mut OPENCARDNAME_EXW; +pub type OPENCARDNAMEA_EX = OPENCARDNAME_EXA; +pub type OPENCARDNAMEW_EX = OPENCARDNAME_EXW; +pub type POPENCARDNAMEA_EX = POPENCARDNAME_EXA; +pub type POPENCARDNAMEW_EX = POPENCARDNAME_EXW; +pub type LPOPENCARDNAMEA_EX = LPOPENCARDNAME_EXA; +pub type LPOPENCARDNAMEW_EX = LPOPENCARDNAME_EXW; +pub const SCARD_READER_SEL_AUTH_PACKAGE: ::DWORD = -629i32 as ::DWORD; +ENUM!{enum READER_SEL_REQUEST_MATCH_TYPE { + RSR_MATCH_TYPE_READER_AND_CONTAINER = 1, + RSR_MATCH_TYPE_SERIAL_NUMBER, + RSR_MATCH_TYPE_ALL_CARDS, +}} +STRUCT!{struct READER_SEL_REQUEST_ReaderAndContainerParameter { + cbReaderNameOffset: ::DWORD, + cchReaderNameLength: ::DWORD, + cbContainerNameOffset: ::DWORD, + cchContainerNameLength: ::DWORD, + dwDesiredCardModuleVersion: ::DWORD, + dwCspFlags: ::DWORD, +}} +STRUCT!{struct READER_SEL_REQUEST_SerialNumberParameter { + cbSerialNumberOffset: ::DWORD, + cbSerialNumberLength: ::DWORD, + dwDesiredCardModuleVersion: ::DWORD, +}} +STRUCT!{struct READER_SEL_REQUEST { + dwShareMode: ::DWORD, + dwPreferredProtocols: ::DWORD, + MatchType: READER_SEL_REQUEST_MATCH_TYPE, + ReaderAndContainerParameter: READER_SEL_REQUEST_ReaderAndContainerParameter, +}} +UNION!( + READER_SEL_REQUEST, ReaderAndContainerParameter, SerialNumberParameter, + SerialNumberParameter_mut, READER_SEL_REQUEST_SerialNumberParameter +); +pub type PREADER_SEL_REQUEST = *mut READER_SEL_REQUEST; +STRUCT!{struct READER_SEL_RESPONSE { + cbReaderNameOffset: ::DWORD, + cchReaderNameLength: ::DWORD, + cbCardNameOffset: ::DWORD, + cchCardNameLength: ::DWORD, +}} +pub type PREADER_SEL_RESPONSE = *mut READER_SEL_RESPONSE; +STRUCT!{nodebug struct OPENCARDNAMEA { + dwStructSize: ::DWORD, + hwndOwner: ::HWND, + hSCardContext: SCARDCONTEXT, + lpstrGroupNames: ::LPSTR, + nMaxGroupNames: ::DWORD, + lpstrCardNames: ::LPSTR, + nMaxCardNames: ::DWORD, + rgguidInterfaces: ::LPCGUID, + cguidInterfaces: ::DWORD, + lpstrRdr: ::LPSTR, + nMaxRdr: ::DWORD, + lpstrCard: ::LPSTR, + nMaxCard: ::DWORD, + lpstrTitle: ::LPCSTR, + dwFlags: ::DWORD, + pvUserData: ::LPVOID, + dwShareMode: ::DWORD, + dwPreferredProtocols: ::DWORD, + dwActiveProtocol: ::DWORD, + lpfnConnect: LPOCNCONNPROCA, + lpfnCheck: LPOCNCHKPROC, + lpfnDisconnect: LPOCNDSCPROC, + hCardHandle: SCARDHANDLE, +}} +pub type POPENCARDNAMEA = *mut OPENCARDNAMEA; +pub type LPOPENCARDNAMEA = *mut OPENCARDNAMEA; +STRUCT!{nodebug struct OPENCARDNAMEW { + dwStructSize: ::DWORD, + hwndOwner: ::HWND, + hSCardContext: SCARDCONTEXT, + lpstrGroupNames: ::LPWSTR, + nMaxGroupNames: ::DWORD, + lpstrCardNames: ::LPWSTR, + nMaxCardNames: ::DWORD, + rgguidInterfaces: ::LPCGUID, + cguidInterfaces: ::DWORD, + lpstrRdr: ::LPWSTR, + nMaxRdr: ::DWORD, + lpstrCard: ::LPWSTR, + nMaxCard: ::DWORD, + lpstrTitle: ::LPCWSTR, + dwFlags: ::DWORD, + pvUserData: ::LPVOID, + dwShareMode: ::DWORD, + dwPreferredProtocols: ::DWORD, + dwActiveProtocol: ::DWORD, + lpfnConnect: LPOCNCONNPROCW, + lpfnCheck: LPOCNCHKPROC, + lpfnDisconnect: LPOCNDSCPROC, + hCardHandle: SCARDHANDLE, +}} +pub type POPENCARDNAMEW = *mut OPENCARDNAMEW; +pub type LPOPENCARDNAMEW = *mut OPENCARDNAMEW; +pub type OPENCARDNAME_A = OPENCARDNAMEA; +pub type OPENCARDNAME_W = OPENCARDNAMEW; +pub type POPENCARDNAME_A = POPENCARDNAMEA; +pub type POPENCARDNAME_W = POPENCARDNAMEW; +pub type LPOPENCARDNAME_A = LPOPENCARDNAMEA; +pub type LPOPENCARDNAME_W = LPOPENCARDNAMEW; +pub const SCARD_AUDIT_CHV_FAILURE: ::DWORD = 0x0; +pub const SCARD_AUDIT_CHV_SUCCESS: ::DWORD = 0x1; diff --git a/deps/winapi-0.2.5/src/winsmcrd.rs b/deps/winapi-0.2.6/src/winsmcrd.rs similarity index 100% rename from deps/winapi-0.2.5/src/winsmcrd.rs rename to deps/winapi-0.2.6/src/winsmcrd.rs diff --git a/deps/winapi-0.2.6/src/winsock2.rs b/deps/winapi-0.2.6/src/winsock2.rs new file mode 100644 index 000000000..05b62f2c4 --- /dev/null +++ b/deps/winapi-0.2.6/src/winsock2.rs @@ -0,0 +1,429 @@ +// Copyright © 2015, Peter Atashian +// Licensed under the MIT License <LICENSE.md> +//! definitions to be used with the WinSock 2 DLL and WinSock 2 applications. +//! +//! This header file corresponds to version 2.2.x of the WinSock API specification. +pub const WINSOCK_VERSION: ::WORD = 2 | (2 << 8); +pub type u_char = ::c_uchar; +pub type u_short = ::c_ushort; +pub type u_int = ::c_uint; +pub type u_long = ::c_ulong; +pub type u_int64 = ::__uint64; +pub type SOCKET = ::UINT_PTR; +pub type GROUP = ::c_uint; +pub const FD_SETSIZE: usize = 64; +pub const FD_MAX_EVENTS: usize = 10; +STRUCT!{nodebug struct fd_set { + fd_count: u_int, + fd_array: [SOCKET; FD_SETSIZE], +}} +STRUCT!{struct timeval { + tv_sec: ::c_long, + tv_usec: ::c_long, +}} +STRUCT!{struct hostent { + h_name: *mut ::c_char, + h_aliases: *mut *mut ::c_char, + h_addrtype: ::c_short, + h_length: ::c_short, + h_addr_list: *mut *mut ::c_char, +}} +STRUCT!{struct netent { + n_name: *mut ::c_char, + n_aliases: *mut *mut ::c_char, + n_addrtype: ::c_short, + n_net: u_long, +}} +#[cfg(target_arch="x86")] +STRUCT!{struct servent { + s_name: *mut ::c_char, + s_aliases: *mut *mut ::c_char, + s_port: ::c_short, + s_proto: *mut ::c_char, +}} +#[cfg(target_arch="x86_64")] +STRUCT!{struct servent { + s_name: *mut ::c_char, + s_aliases: *mut *mut ::c_char, + s_proto: *mut ::c_char, + s_port: ::c_short, +}} +STRUCT!{struct protoent { + p_name: *mut ::c_char, + p_aliases: *mut *mut ::c_char, + p_proto: ::c_short, +}} +pub const WSADESCRIPTION_LEN: usize = 256; +pub const WSASYS_STATUS_LEN: usize = 128; +#[cfg(target_arch="x86")] +STRUCT!{nodebug struct WSADATA { + wVersion: ::WORD, + wHighVersion: ::WORD, + szDescription: [::c_char; WSADESCRIPTION_LEN + 1], + szSystemStatus: [::c_char; WSASYS_STATUS_LEN + 1], + iMaxSockets: ::c_ushort, + iMaxUdpDg: ::c_ushort, + lpVendorInfo: *mut ::c_char, +}} +#[cfg(target_arch="x86_64")] +STRUCT!{nodebug struct WSADATA { + wVersion: ::WORD, + wHighVersion: ::WORD, + iMaxSockets: ::c_ushort, + iMaxUdpDg: ::c_ushort, + lpVendorInfo: *mut ::c_char, + szDescription: [::c_char; WSADESCRIPTION_LEN + 1], + szSystemStatus: [::c_char; WSASYS_STATUS_LEN + 1], +}} +pub type LPWSADATA = *mut WSADATA; +//391 +pub const INVALID_SOCKET: SOCKET = !0; +pub const SOCKET_ERROR: ::c_int = -1; +STRUCT!{struct sockproto { + sp_family: u_short, + sp_protocol: u_short, +}} +pub const PF_UNSPEC: ::c_int = ::AF_UNSPEC; +pub const PF_UNIX: ::c_int = ::AF_UNIX; +pub const PF_INET: ::c_int = ::AF_INET; +pub const PF_IMPLINK: ::c_int = ::AF_IMPLINK; +pub const PF_PUP: ::c_int = ::AF_PUP; +pub const PF_CHAOS: ::c_int = ::AF_CHAOS; +pub const PF_NS: ::c_int = ::AF_NS; +pub const PF_IPX: ::c_int = ::AF_IPX; +pub const PF_ISO: ::c_int = ::AF_ISO; +pub const PF_OSI: ::c_int = ::AF_OSI; +pub const PF_ECMA: ::c_int = ::AF_ECMA; +pub const PF_DATAKIT: ::c_int = ::AF_DATAKIT; +pub const PF_CCITT: ::c_int = ::AF_CCITT; +pub const PF_SNA: ::c_int = ::AF_SNA; +pub const PF_DECnet: ::c_int = ::AF_DECnet; +pub const PF_DLI: ::c_int = ::AF_DLI; +pub const PF_LAT: ::c_int = ::AF_LAT; +pub const PF_HYLINK: ::c_int = ::AF_HYLINK; +pub const PF_APPLETALK: ::c_int = ::AF_APPLETALK; +pub const PF_VOICEVIEW: ::c_int = ::AF_VOICEVIEW; +pub const PF_FIREFOX: ::c_int = ::AF_FIREFOX; +pub const PF_UNKNOWN1: ::c_int = ::AF_UNKNOWN1; +pub const PF_BAN: ::c_int = ::AF_BAN; +pub const PF_ATM: ::c_int = ::AF_ATM; +pub const PF_INET6: ::c_int = ::AF_INET6; +pub const PF_BTH: ::c_int = ::AF_BTH; +pub const PF_MAX: ::c_int = ::AF_MAX; +STRUCT!{struct linger { + l_onoff: u_short, + l_linger: u_short, +}} +pub const SOMAXCONN: ::c_int = 0x7fffffff; +pub type WSAEVENT = ::HANDLE; +pub type LPWSAEVENT = ::LPHANDLE; +pub type WSAOVERLAPPED = ::OVERLAPPED; +pub type LPWSAOVERLAPPED = *mut ::OVERLAPPED; +pub const WSA_IO_PENDING: ::DWORD = ::ERROR_IO_PENDING; +pub const WSA_IO_INCOMPLETE: ::DWORD = ::ERROR_IO_INCOMPLETE; +pub const WSA_INVALID_HANDLE: ::DWORD = ::ERROR_INVALID_HANDLE; +pub const WSA_INVALID_PARAMETER: ::DWORD = ::ERROR_INVALID_PARAMETER; +pub const WSA_NOT_ENOUGH_MEMORY: ::DWORD = ::ERROR_NOT_ENOUGH_MEMORY; +pub const WSA_OPERATION_ABORTED: ::DWORD = ::ERROR_OPERATION_ABORTED; +STRUCT!{struct QOS { + SendingFlowspec: ::FLOWSPEC, + FLOWSPEC: ::FLOWSPEC, + ProviderSpecific: ::WSABUF, +}} +pub type LPQOS = *mut QOS; +STRUCT!{struct WSANETWORKEVENTS { + lNetworkEvents: ::c_long, + iErrorCode: [::c_int; FD_MAX_EVENTS], +}} +pub type LPWSANETWORKEVENTS = *mut WSANETWORKEVENTS; +pub const MAX_PROTOCOL_CHAIN: usize = 7; +STRUCT!{struct WSAPROTOCOLCHAIN { + ChainLen: ::c_int, + ChainEntries: [::DWORD; MAX_PROTOCOL_CHAIN], +}} +pub type LPWSAPROTOCOLCHAIN = *mut WSAPROTOCOLCHAIN; +pub const WSAPROTOCOL_LEN: usize = 255; +STRUCT!{nodebug struct WSAPROTOCOL_INFOA { + dwServiceFlags1: ::DWORD, + dwServiceFlags2: ::DWORD, + dwServiceFlags3: ::DWORD, + dwServiceFlags4: ::DWORD, + dwServiceFlags5: ::DWORD, + ProviderId: ::GUID, + dwCatalogEntryId: ::DWORD, + ProtocolChain: WSAPROTOCOLCHAIN, + iVersion: ::c_int, + iAddressFamily: ::c_int, + iMaxSockAddr: ::c_int, + iMinSockAddr: ::c_int, + iSocketType: ::c_int, + iProtocol: ::c_int, + iProtocolMaxOffset: ::c_int, + iNetworkByteOrder: ::c_int, + iSecurityScheme: ::c_int, + dwMessageSize: ::DWORD, + dwProviderReserved: ::DWORD, + szProtocol: [::CHAR; WSAPROTOCOL_LEN + 1], +}} +pub type LPWSAPROTOCOL_INFOA = *mut WSAPROTOCOL_INFOA; +STRUCT!{nodebug struct WSAPROTOCOL_INFOW { + dwServiceFlags1: ::DWORD, + dwServiceFlags2: ::DWORD, + dwServiceFlags3: ::DWORD, + dwServiceFlags4: ::DWORD, + dwServiceFlags5: ::DWORD, + ProviderId: ::GUID, + dwCatalogEntryId: ::DWORD, + ProtocolChain: WSAPROTOCOLCHAIN, + iVersion: ::c_int, + iAddressFamily: ::c_int, + iMaxSockAddr: ::c_int, + iMinSockAddr: ::c_int, + iSocketType: ::c_int, + iProtocol: ::c_int, + iProtocolMaxOffset: ::c_int, + iNetworkByteOrder: ::c_int, + iSecurityScheme: ::c_int, + dwMessageSize: ::DWORD, + dwProviderReserved: ::DWORD, + szProtocol: [::WCHAR; WSAPROTOCOL_LEN + 1], +}} +pub type LPWSAPROTOCOL_INFOW = *mut WSAPROTOCOL_INFOW; +pub type LPCONDITIONPROC = Option<unsafe extern "system" fn( + lpCallerId: ::LPWSABUF, lpCallerData: ::LPWSABUF, lpSQOS: LPQOS, lpGQOS: LPQOS, + lpCalleeId: ::LPWSABUF, lpCalleeData: ::LPWSABUF, g: *mut GROUP, dwCallbackData: ::DWORD, +) -> ::c_int>; +pub type LPWSAOVERLAPPED_COMPLETION_ROUTINE = Option<unsafe extern "system" fn( + dwError: ::DWORD, cbTransferred: ::DWORD, lpOverlapped: LPWSAOVERLAPPED, dwFlags: ::DWORD, +)>; +ENUM!{enum WSACOMPLETIONTYPE { + NSP_NOTIFY_IMMEDIATELY = 0, + NSP_NOTIFY_HWND, + NSP_NOTIFY_EVENT, + NSP_NOTIFY_PORT, + NSP_NOTIFY_APC, +}} +pub type PWSACOMPLETIONTYPE = *mut WSACOMPLETIONTYPE; +pub type LPWSACOMPLETIONTYPE = *mut WSACOMPLETIONTYPE; +STRUCT!{struct WSACOMPLETION_WindowMessage { + hWnd: ::HWND, + uMsg: ::UINT, + context: ::WPARAM, +}} +STRUCT!{struct WSACOMPLETION_Event { + lpOverlapped: LPWSAOVERLAPPED, +}} +STRUCT!{nodebug struct WSACOMPLETION_Apc { + lpOverlapped: LPWSAOVERLAPPED, + lpfnCompletionProc: LPWSAOVERLAPPED_COMPLETION_ROUTINE, +}} +STRUCT!{struct WSACOMPLETION_Port { + lpOverlapped: LPWSAOVERLAPPED, + hPort: ::HANDLE, + Key: ::ULONG_PTR, +}} +#[cfg(target_arch="x86")] +STRUCT!{struct WSACOMPLETION { + Type: WSACOMPLETIONTYPE, + Parameters: [u8; 12], +}} +#[cfg(target_arch="x86_64")] +STRUCT!{struct WSACOMPLETION { + Type: WSACOMPLETIONTYPE, + Parameters: [u8; 24], +}} +UNION!(WSACOMPLETION, Parameters, WindowMessage, WindowMessage_mut, WSACOMPLETION_WindowMessage); +UNION!(WSACOMPLETION, Parameters, Event, Event_mut, WSACOMPLETION_Event); +UNION!(WSACOMPLETION, Parameters, Apc, Apc_mut, WSACOMPLETION_Apc); +UNION!(WSACOMPLETION, Parameters, Port, Port_mut, WSACOMPLETION_Port); +pub type PWSACOMPLETION = *mut WSACOMPLETION; +pub type LPWSACOMPLETION = *mut WSACOMPLETION; +STRUCT!{struct AFPROTOCOLS { + iAddressFamily: ::INT, + iProtocol: ::INT, +}} +pub type PAFPROTOCOLS = *mut AFPROTOCOLS; +pub type LPAFPROTOCOLS = *mut AFPROTOCOLS; +ENUM!{enum WSAECOMPARATOR { + COMP_EQUAL = 0, + COMP_NOTLESS, +}} +pub type PWSAECOMPARATOR = *mut WSAECOMPARATOR; +pub type LPWSAECOMPARATOR = *mut WSAECOMPARATOR; +STRUCT!{struct WSAVERSION { + dwVersion: ::DWORD, + ecHow: WSAECOMPARATOR, +}} +pub type PWSAVERSION = *mut WSAVERSION; +pub type LPWSAVERSION = *mut WSAVERSION; +STRUCT!{struct WSAQUERYSETA { + dwSize: ::DWORD, + lpszServiceInstanceName: ::LPSTR, + lpServiceClassId: ::LPGUID, + lpVersion: LPWSAVERSION, + lpszComment: ::LPSTR, + dwNameSpace: ::DWORD, + lpNSProviderId: ::LPGUID, + lpszContext: ::LPSTR, + dwNumberOfProtocols: ::DWORD, + lpafpProtocols: LPAFPROTOCOLS, + lpszQueryString: ::LPSTR, + dwNumberOfCsAddrs: ::DWORD, + lpcsaBuffer: ::LPCSADDR_INFO, + dwOutputFlags: ::DWORD, + lpBlob: ::LPBLOB, +}} +pub type PWSAQUERYSETA = *mut WSAQUERYSETA; +pub type LPWSAQUERYSETA = *mut WSAQUERYSETA; +STRUCT!{struct WSAQUERYSETW { + dwSize: ::DWORD, + lpszServiceInstanceName: ::LPWSTR, + lpServiceClassId: ::LPGUID, + lpVersion: LPWSAVERSION, + lpszComment: ::LPWSTR, + dwNameSpace: ::DWORD, + lpNSProviderId: ::LPGUID, + lpszContext: ::LPWSTR, + dwNumberOfProtocols: ::DWORD, + lpafpProtocols: LPAFPROTOCOLS, + lpszQueryString: ::LPWSTR, + dwNumberOfCsAddrs: ::DWORD, + lpcsaBuffer: ::LPCSADDR_INFO, + dwOutputFlags: ::DWORD, + lpBlob: ::LPBLOB, +}} +pub type PWSAQUERYSETW = *mut WSAQUERYSETW; +pub type LPWSAQUERYSETW = *mut WSAQUERYSETW; +STRUCT!{struct WSAQUERYSET2A { + dwSize: ::DWORD, + lpszServiceInstanceName: ::LPSTR, + lpVersion: LPWSAVERSION, + lpszComment: ::LPSTR, + dwNameSpace: ::DWORD, + lpNSProviderId: ::LPGUID, + lpszContext: ::LPSTR, + dwNumberOfProtocols: ::DWORD, + lpafpProtocols: LPAFPROTOCOLS, + lpszQueryString: ::LPSTR, + dwNumberOfCsAddrs: ::DWORD, + lpcsaBuffer: ::LPCSADDR_INFO, + dwOutputFlags: ::DWORD, + lpBlob: ::LPBLOB, +}} +pub type PWSAQUERYSET2A = *mut WSAQUERYSET2A; +pub type LPWSAQUERYSET2A = *mut WSAQUERYSET2A; +STRUCT!{struct WSAQUERYSET2W { + dwSize: ::DWORD, + lpszServiceInstanceName: ::LPWSTR, + lpVersion: LPWSAVERSION, + lpszComment: ::LPWSTR, + dwNameSpace: ::DWORD, + lpNSProviderId: ::LPGUID, + lpszContext: ::LPWSTR, + dwNumberOfProtocols: ::DWORD, + lpafpProtocols: LPAFPROTOCOLS, + lpszQueryString: ::LPWSTR, + dwNumberOfCsAddrs: ::DWORD, + lpcsaBuffer: ::LPCSADDR_INFO, + dwOutputFlags: ::DWORD, + lpBlob: ::LPBLOB, +}} +pub type PWSAQUERYSET2W = *mut WSAQUERYSET2W; +pub type LPWSAQUERYSET2W = *mut WSAQUERYSET2W; +ENUM!{enum WSAESETSERVICEOP { + RNRSERVICE_REGISTER = 0, + RNRSERVICE_DEREGISTER, + RNRSERVICE_DELETE, +}} +pub type PWSAESETSERVICEOP = *mut WSAESETSERVICEOP; +pub type LPWSAESETSERVICEOP = *mut WSAESETSERVICEOP; +STRUCT!{struct WSANSCLASSINFOA { + lpszName: ::LPSTR, + dwNameSpace: ::DWORD, + dwValueType: ::DWORD, + dwValueSize: ::DWORD, + lpValue: ::LPVOID, +}} +pub type PWSANSCLASSINFOA = *mut WSANSCLASSINFOA; +pub type LPWSANSCLASSINFOA = *mut WSANSCLASSINFOA; +STRUCT!{struct WSANSCLASSINFOW { + lpszName: ::LPWSTR, + dwNameSpace: ::DWORD, + dwValueType: ::DWORD, + dwValueSize: ::DWORD, + lpValue: ::LPVOID, +}} +pub type PWSANSCLASSINFOW = *mut WSANSCLASSINFOW; +pub type LPWSANSCLASSINFOW = *mut WSANSCLASSINFOW; +STRUCT!{struct WSASERVICECLASSINFOA { + lpServiceClassId: ::LPGUID, + lpszServiceClassName: ::LPSTR, + dwCount: ::DWORD, + lpClassInfos: LPWSANSCLASSINFOA, +}} +pub type PWSASERVICECLASSINFOA = *mut WSASERVICECLASSINFOA; +pub type LPWSASERVICECLASSINFOA = *mut WSASERVICECLASSINFOA; +STRUCT!{struct WSASERVICECLASSINFOW { + lpServiceClassId: ::LPGUID, + lpszServiceClassName: ::LPWSTR, + dwCount: ::DWORD, + lpClassInfos: LPWSANSCLASSINFOW, +}} +pub type PWSASERVICECLASSINFOW = *mut WSASERVICECLASSINFOW; +pub type LPWSASERVICECLASSINFOW = *mut WSASERVICECLASSINFOW; +STRUCT!{struct WSANAMESPACE_INFOA { + NSProviderId: ::GUID, + dwNameSpace: ::DWORD, + fActive: ::BOOL, + dwVersion: ::DWORD, + lpszIdentifier: ::LPSTR, +}} +pub type PWSANAMESPACE_INFOA = *mut WSANAMESPACE_INFOA; +pub type LPWSANAMESPACE_INFOA = *mut WSANAMESPACE_INFOA; +STRUCT!{struct WSANAMESPACE_INFOW { + NSProviderId: ::GUID, + dwNameSpace: ::DWORD, + fActive: ::BOOL, + dwVersion: ::DWORD, + lpszIdentifier: ::LPWSTR, +}} +pub type PWSANAMESPACE_INFOW = *mut WSANAMESPACE_INFOW; +pub type LPWSANAMESPACE_INFOW = *mut WSANAMESPACE_INFOW; +STRUCT!{struct WSANAMESPACE_INFOEXA { + NSProviderId: ::GUID, + dwNameSpace: ::DWORD, + fActive: ::BOOL, + dwVersion: ::DWORD, + lpszIdentifier: ::LPSTR, + ProviderSpecific: ::BLOB, +}} +pub type PWSANAMESPACE_INFOEXA = *mut WSANAMESPACE_INFOEXA; +pub type LPWSANAMESPACE_INFOEXA = *mut WSANAMESPACE_INFOEXA; +STRUCT!{struct WSANAMESPACE_INFOEXW { + NSProviderId: ::GUID, + dwNameSpace: ::DWORD, + fActive: ::BOOL, + dwVersion: ::DWORD, + lpszIdentifier: ::LPWSTR, + ProviderSpecific: ::BLOB, +}} +pub type PWSANAMESPACE_INFOEXW = *mut WSANAMESPACE_INFOEXW; +pub type LPWSANAMESPACE_INFOEXW = *mut WSANAMESPACE_INFOEXW; +pub const POLLRDNORM: ::SHORT = 0x0100; +pub const POLLRDBAND: ::SHORT = 0x0200; +pub const POLLIN: ::SHORT = POLLRDNORM | POLLRDBAND; +pub const POLLPRI: ::SHORT = 0x0400; +pub const POLLWRNORM: ::SHORT = 0x0010; +pub const POLLOUT: ::SHORT = POLLWRNORM; +pub const POLLWRBAND: ::SHORT = 0x0020; +pub const POLLERR: ::SHORT = 0x0001; +pub const POLLHUP: ::SHORT = 0x0002; +pub const POLLNVAL: ::SHORT = 0x0004; +STRUCT!{struct WSAPOLLFD { + fd: ::SOCKET, + events: ::SHORT, + revents: ::SHORT, +}} +pub type PWSAPOLLFD = *mut WSAPOLLFD; +pub type LPWSAPOLLFD = *mut WSAPOLLFD; +pub const FIONBIO: ::c_ulong = 0x8004667e; diff --git a/deps/winapi-0.2.5/src/winspool.rs b/deps/winapi-0.2.6/src/winspool.rs similarity index 100% rename from deps/winapi-0.2.5/src/winspool.rs rename to deps/winapi-0.2.6/src/winspool.rs diff --git a/deps/winapi-0.2.6/src/winsvc.rs b/deps/winapi-0.2.6/src/winsvc.rs new file mode 100644 index 000000000..93513668a --- /dev/null +++ b/deps/winapi-0.2.6/src/winsvc.rs @@ -0,0 +1,200 @@ +// Copyright © 2015, Peter Atashian +// Licensed under the MIT License <LICENSE.md> +//! Header file for the Service Control Manager +//80 +pub const SERVICE_NO_CHANGE: ::DWORD = 0xffffffff; +pub const SERVICE_ACTIVE: ::DWORD = 0x00000001; +pub const SERVICE_INACTIVE: ::DWORD = 0x00000002; +pub const SERVICE_STATE_ALL: ::DWORD = SERVICE_ACTIVE | SERVICE_INACTIVE; +pub const SERVICE_CONTROL_STOP: ::DWORD = 0x00000001; +pub const SERVICE_CONTROL_PAUSE: ::DWORD = 0x00000002; +pub const SERVICE_CONTROL_CONTINUE: ::DWORD = 0x00000003; +pub const SERVICE_CONTROL_INTERROGATE: ::DWORD = 0x00000004; +pub const SERVICE_CONTROL_SHUTDOWN: ::DWORD = 0x00000005; +pub const SERVICE_CONTROL_PARAMCHANGE: ::DWORD = 0x00000006; +pub const SERVICE_CONTROL_NETBINDADD: ::DWORD = 0x00000007; +pub const SERVICE_CONTROL_NETBINDREMOVE: ::DWORD = 0x00000008; +pub const SERVICE_CONTROL_NETBINDENABLE: ::DWORD = 0x00000009; +pub const SERVICE_CONTROL_NETBINDDISABLE: ::DWORD = 0x0000000A; +pub const SERVICE_CONTROL_DEVICEEVENT: ::DWORD = 0x0000000B; +pub const SERVICE_CONTROL_HARDWAREPROFILECHANGE: ::DWORD = 0x0000000C; +pub const SERVICE_CONTROL_POWEREVENT: ::DWORD = 0x0000000D; +pub const SERVICE_CONTROL_SESSIONCHANGE: ::DWORD = 0x0000000E; +pub const SERVICE_CONTROL_PRESHUTDOWN: ::DWORD = 0x0000000F; +pub const SERVICE_CONTROL_TIMECHANGE: ::DWORD = 0x00000010; +pub const SERVICE_CONTROL_TRIGGEREVENT: ::DWORD = 0x00000020; +pub const SERVICE_STOPPED: ::DWORD = 0x00000001; +pub const SERVICE_START_PENDING: ::DWORD = 0x00000002; +pub const SERVICE_STOP_PENDING: ::DWORD = 0x00000003; +pub const SERVICE_RUNNING: ::DWORD = 0x00000004; +pub const SERVICE_CONTINUE_PENDING: ::DWORD = 0x00000005; +pub const SERVICE_PAUSE_PENDING: ::DWORD = 0x00000006; +pub const SERVICE_PAUSED: ::DWORD = 0x00000007; +pub const SERVICE_ACCEPT_STOP: ::DWORD = 0x00000001; +pub const SERVICE_ACCEPT_PAUSE_CONTINUE: ::DWORD = 0x00000002; +pub const SERVICE_ACCEPT_SHUTDOWN: ::DWORD = 0x00000004; +pub const SERVICE_ACCEPT_PARAMCHANGE: ::DWORD = 0x00000008; +pub const SERVICE_ACCEPT_NETBINDCHANGE: ::DWORD = 0x00000010; +pub const SERVICE_ACCEPT_HARDWAREPROFILECHANGE: ::DWORD = 0x00000020; +pub const SERVICE_ACCEPT_POWEREVENT: ::DWORD = 0x00000040; +pub const SERVICE_ACCEPT_SESSIONCHANGE: ::DWORD = 0x00000080; +pub const SERVICE_ACCEPT_PRESHUTDOWN: ::DWORD = 0x00000100; +pub const SERVICE_ACCEPT_TIMECHANGE: ::DWORD = 0x00000200; +pub const SERVICE_ACCEPT_TRIGGEREVENT: ::DWORD = 0x00000400; +pub const SC_MANAGER_CONNECT: ::DWORD = 0x0001; +pub const SC_MANAGER_CREATE_SERVICE: ::DWORD = 0x0002; +pub const SC_MANAGER_ENUMERATE_SERVICE: ::DWORD = 0x0004; +pub const SC_MANAGER_LOCK: ::DWORD = 0x0008; +pub const SC_MANAGER_QUERY_LOCK_STATUS: ::DWORD = 0x0010; +pub const SC_MANAGER_MODIFY_BOOT_CONFIG: ::DWORD = 0x0020; +pub const SC_MANAGER_ALL_ACCESS: ::DWORD = ::STANDARD_RIGHTS_REQUIRED | SC_MANAGER_CONNECT + | SC_MANAGER_CREATE_SERVICE | SC_MANAGER_ENUMERATE_SERVICE | SC_MANAGER_LOCK + | SC_MANAGER_QUERY_LOCK_STATUS | SC_MANAGER_MODIFY_BOOT_CONFIG; +pub const SERVICE_QUERY_CONFIG: ::DWORD = 0x0001; +pub const SERVICE_CHANGE_CONFIG: ::DWORD = 0x0002; +pub const SERVICE_QUERY_STATUS: ::DWORD = 0x0004; +pub const SERVICE_ENUMERATE_DEPENDENTS: ::DWORD = 0x0008; +pub const SERVICE_START: ::DWORD = 0x0010; +pub const SERVICE_STOP: ::DWORD = 0x0020; +pub const SERVICE_PAUSE_CONTINUE: ::DWORD = 0x0040; +pub const SERVICE_INTERROGATE: ::DWORD = 0x0080; +pub const SERVICE_USER_DEFINED_CONTROL: ::DWORD = 0x0100; +pub const SERVICE_ALL_ACCESS: ::DWORD = ::STANDARD_RIGHTS_REQUIRED | SERVICE_QUERY_CONFIG + | SERVICE_CHANGE_CONFIG | SERVICE_QUERY_STATUS | SERVICE_ENUMERATE_DEPENDENTS | SERVICE_START + | SERVICE_STOP | SERVICE_PAUSE_CONTINUE | SERVICE_INTERROGATE | SERVICE_USER_DEFINED_CONTROL; +pub const SERVICE_RUNS_IN_SYSTEM_PROCESS: ::DWORD = 0x00000001; +pub const SERVICE_CONFIG_DESCRIPTION: ::DWORD = 1; +pub const SERVICE_CONFIG_FAILURE_ACTIONS: ::DWORD = 2; +pub const SERVICE_CONFIG_DELAYED_AUTO_START_INFO: ::DWORD = 3; +pub const SERVICE_CONFIG_FAILURE_ACTIONS_FLAG: ::DWORD = 4; +pub const SERVICE_CONFIG_SERVICE_SID_INFO: ::DWORD = 5; +pub const SERVICE_CONFIG_REQUIRED_PRIVILEGES_INFO: ::DWORD = 6; +pub const SERVICE_CONFIG_PRESHUTDOWN_INFO: ::DWORD = 7; +pub const SERVICE_CONFIG_TRIGGER_INFO: ::DWORD = 8; +pub const SERVICE_CONFIG_PREFERRED_NODE: ::DWORD = 9; +pub const SERVICE_CONFIG_LAUNCH_PROTECTED: ::DWORD = 12; +pub const SERVICE_NOTIFY_STATUS_CHANGE_1: ::DWORD = 1; +pub const SERVICE_NOTIFY_STATUS_CHANGE_2: ::DWORD = 2; +pub const SERVICE_NOTIFY_STATUS_CHANGE: ::DWORD = SERVICE_NOTIFY_STATUS_CHANGE_2; +pub const SERVICE_NOTIFY_STOPPED: ::DWORD = 0x00000001; +pub const SERVICE_NOTIFY_START_PENDING: ::DWORD = 0x00000002; +pub const SERVICE_NOTIFY_STOP_PENDING: ::DWORD = 0x00000004; +pub const SERVICE_NOTIFY_RUNNING: ::DWORD = 0x00000008; +pub const SERVICE_NOTIFY_CONTINUE_PENDING: ::DWORD = 0x00000010; +pub const SERVICE_NOTIFY_PAUSE_PENDING: ::DWORD = 0x00000020; +pub const SERVICE_NOTIFY_PAUSED: ::DWORD = 0x00000040; +pub const SERVICE_NOTIFY_CREATED: ::DWORD = 0x00000080; +pub const SERVICE_NOTIFY_DELETED: ::DWORD = 0x00000100; +pub const SERVICE_NOTIFY_DELETE_PENDING: ::DWORD = 0x00000200; +pub const SERVICE_STOP_REASON_FLAG_MIN: ::DWORD = 0x00000000; +pub const SERVICE_STOP_REASON_FLAG_UNPLANNED: ::DWORD = 0x10000000; +pub const SERVICE_STOP_REASON_FLAG_CUSTOM: ::DWORD = 0x20000000; +pub const SERVICE_STOP_REASON_FLAG_PLANNED: ::DWORD = 0x40000000; +pub const SERVICE_STOP_REASON_FLAG_MAX: ::DWORD = 0x80000000; +pub const SERVICE_STOP_REASON_MAJOR_MIN: ::DWORD = 0x00000000; +pub const SERVICE_STOP_REASON_MAJOR_OTHER: ::DWORD = 0x00010000; +pub const SERVICE_STOP_REASON_MAJOR_HARDWARE: ::DWORD = 0x00020000; +pub const SERVICE_STOP_REASON_MAJOR_OPERATINGSYSTEM: ::DWORD = 0x00030000; +pub const SERVICE_STOP_REASON_MAJOR_SOFTWARE: ::DWORD = 0x00040000; +pub const SERVICE_STOP_REASON_MAJOR_APPLICATION: ::DWORD = 0x00050000; +pub const SERVICE_STOP_REASON_MAJOR_NONE: ::DWORD = 0x00060000; +pub const SERVICE_STOP_REASON_MAJOR_MAX: ::DWORD = 0x00070000; +pub const SERVICE_STOP_REASON_MAJOR_MIN_CUSTOM: ::DWORD = 0x00400000; +pub const SERVICE_STOP_REASON_MAJOR_MAX_CUSTOM: ::DWORD = 0x00ff0000; +pub const SERVICE_STOP_REASON_MINOR_MIN: ::DWORD = 0x00000000; +pub const SERVICE_STOP_REASON_MINOR_OTHER: ::DWORD = 0x00000001; +pub const SERVICE_STOP_REASON_MINOR_MAINTENANCE: ::DWORD = 0x00000002; +pub const SERVICE_STOP_REASON_MINOR_INSTALLATION: ::DWORD = 0x00000003; +pub const SERVICE_STOP_REASON_MINOR_UPGRADE: ::DWORD = 0x00000004; +pub const SERVICE_STOP_REASON_MINOR_RECONFIG: ::DWORD = 0x00000005; +pub const SERVICE_STOP_REASON_MINOR_HUNG: ::DWORD = 0x00000006; +pub const SERVICE_STOP_REASON_MINOR_UNSTABLE: ::DWORD = 0x00000007; +pub const SERVICE_STOP_REASON_MINOR_DISK: ::DWORD = 0x00000008; +pub const SERVICE_STOP_REASON_MINOR_NETWORKCARD: ::DWORD = 0x00000009; +pub const SERVICE_STOP_REASON_MINOR_ENVIRONMENT: ::DWORD = 0x0000000a; +pub const SERVICE_STOP_REASON_MINOR_HARDWARE_DRIVER: ::DWORD = 0x0000000b; +pub const SERVICE_STOP_REASON_MINOR_OTHERDRIVER: ::DWORD = 0x0000000c; +pub const SERVICE_STOP_REASON_MINOR_SERVICEPACK: ::DWORD = 0x0000000d; +pub const SERVICE_STOP_REASON_MINOR_SOFTWARE_UPDATE: ::DWORD = 0x0000000e; +pub const SERVICE_STOP_REASON_MINOR_SECURITYFIX: ::DWORD = 0x0000000f; +pub const SERVICE_STOP_REASON_MINOR_SECURITY: ::DWORD = 0x00000010; +pub const SERVICE_STOP_REASON_MINOR_NETWORK_CONNECTIVITY: ::DWORD = 0x00000011; +pub const SERVICE_STOP_REASON_MINOR_WMI: ::DWORD = 0x00000012; +pub const SERVICE_STOP_REASON_MINOR_SERVICEPACK_UNINSTALL: ::DWORD = 0x00000013; +pub const SERVICE_STOP_REASON_MINOR_SOFTWARE_UPDATE_UNINSTALL: ::DWORD = 0x00000014; +pub const SERVICE_STOP_REASON_MINOR_SECURITYFIX_UNINSTALL: ::DWORD = 0x00000015; +pub const SERVICE_STOP_REASON_MINOR_MMC: ::DWORD = 0x00000016; +pub const SERVICE_STOP_REASON_MINOR_NONE: ::DWORD = 0x00000017; +pub const SERVICE_STOP_REASON_MINOR_MAX: ::DWORD = 0x00000018; +pub const SERVICE_STOP_REASON_MINOR_MIN_CUSTOM: ::DWORD = 0x00000100; +pub const SERVICE_STOP_REASON_MINOR_MAX_CUSTOM: ::DWORD = 0x0000FFFF; +pub const SERVICE_CONTROL_STATUS_REASON_INFO: ::DWORD = 1; +pub const SERVICE_SID_TYPE_NONE: ::DWORD = 0x00000000; +pub const SERVICE_SID_TYPE_UNRESTRICTED: ::DWORD = 0x00000001; +pub const SERVICE_SID_TYPE_RESTRICTED: ::DWORD = 0x00000002 | SERVICE_SID_TYPE_UNRESTRICTED; +pub const SERVICE_TRIGGER_TYPE_DEVICE_INTERFACE_ARRIVAL: ::DWORD = 1; +pub const SERVICE_TRIGGER_TYPE_IP_ADDRESS_AVAILABILITY: ::DWORD = 2; +pub const SERVICE_TRIGGER_TYPE_DOMAIN_JOIN: ::DWORD = 3; +pub const SERVICE_TRIGGER_TYPE_FIREWALL_PORT_EVENT: ::DWORD = 4; +pub const SERVICE_TRIGGER_TYPE_GROUP_POLICY: ::DWORD = 5; +pub const SERVICE_TRIGGER_TYPE_NETWORK_ENDPOINT: ::DWORD = 6; +pub const SERVICE_TRIGGER_TYPE_CUSTOM_SYSTEM_STATE_CHANGE: ::DWORD = 7; +pub const SERVICE_TRIGGER_TYPE_CUSTOM: ::DWORD = 20; +pub const SERVICE_TRIGGER_DATA_TYPE_BINARY: ::DWORD = 1; +pub const SERVICE_TRIGGER_DATA_TYPE_STRING: ::DWORD = 2; +pub const SERVICE_TRIGGER_DATA_TYPE_LEVEL: ::DWORD = 3; +pub const SERVICE_TRIGGER_DATA_TYPE_KEYWORD_ANY: ::DWORD = 4; +pub const SERVICE_TRIGGER_DATA_TYPE_KEYWORD_ALL: ::DWORD = 5; +pub const SERVICE_START_REASON_DEMAND: ::DWORD = 0x00000001; +pub const SERVICE_START_REASON_AUTO: ::DWORD = 0x00000002; +pub const SERVICE_START_REASON_TRIGGER: ::DWORD = 0x00000004; +pub const SERVICE_START_REASON_RESTART_ON_FAILURE: ::DWORD = 0x00000008; +pub const SERVICE_START_REASON_DELAYEDAUTO: ::DWORD = 0x00000010; +pub const SERVICE_DYNAMIC_INFORMATION_LEVEL_START_REASON: ::DWORD = 1; +pub const SERVICE_LAUNCH_PROTECTED_NONE: ::DWORD = 0; +pub const SERVICE_LAUNCH_PROTECTED_WINDOWS: ::DWORD = 1; +pub const SERVICE_LAUNCH_PROTECTED_WINDOWS_LIGHT: ::DWORD = 2; +pub const SERVICE_LAUNCH_PROTECTED_ANTIMALWARE_LIGHT: ::DWORD = 3; +//678 +DECLARE_HANDLE!(SC_HANDLE, SC_HANDLE__); +pub type LPSC_HANDLE = *mut SC_HANDLE; +DECLARE_HANDLE!(SERVICE_STATUS_HANDLE, SERVICE_STATUS_HANDLE__); +ENUM!{enum SC_STATUS_TYPE { + SC_STATUS_PROCESS_INFO = 0, +}} +ENUM!{enum _SC_ENUM_TYPE { + SC_ENUM_PROCESS_INFO = 0, +}} +//700 +STRUCT!{struct SERVICE_STATUS { + dwServiceType: ::DWORD, + dwCurrentState: ::DWORD, + dwControlsAccepted: ::DWORD, + dwWin32ExitCode: ::DWORD, + dwServiceSpecificExitCode: ::DWORD, + dwCheckPoint: ::DWORD, + dwWaitHint: ::DWORD, +}} +pub type LPSERVICE_STATUS = *mut SERVICE_STATUS; +//848 +pub type LPSERVICE_MAIN_FUNCTIONW = Option<unsafe extern "system" fn( + dwNumServicesArgs: ::DWORD, lpServiceArgVectors: *mut ::LPWSTR, +)>; +pub type LPSERVICE_MAIN_FUNCTIONA = Option<unsafe extern "system" fn( + dwNumServicesArgs: ::DWORD, lpServiceArgVectors: *mut ::LPSTR, +)>; +STRUCT!{nodebug struct SERVICE_TABLE_ENTRYA { + lpServiceName: ::LPCSTR, + lpServiceProc: LPSERVICE_MAIN_FUNCTIONA, +}} +pub type LPSERVICE_TABLE_ENTRYA = *mut SERVICE_TABLE_ENTRYA; +STRUCT!{nodebug struct SERVICE_TABLE_ENTRYW { + lpServiceName: ::LPCWSTR, + lpServiceProc: LPSERVICE_MAIN_FUNCTIONW, +}} +pub type LPSERVICE_TABLE_ENTRYW = *mut SERVICE_TABLE_ENTRYW; +//900 +pub type LPHANDLER_FUNCTION = Option<unsafe extern "system" fn(dwControl: ::DWORD)>; +pub type LPHANDLER_FUNCTION_EX = Option<unsafe extern "system" fn( + dwControl: ::DWORD, dwEventType: ::DWORD, lpEventData: ::LPVOID, lpContext: ::LPVOID, +) -> ::DWORD>; diff --git a/deps/winapi-0.2.6/src/winuser.rs b/deps/winapi-0.2.6/src/winuser.rs new file mode 100644 index 000000000..1d456435f --- /dev/null +++ b/deps/winapi-0.2.6/src/winuser.rs @@ -0,0 +1,2273 @@ +// Copyright © 2015, Peter Atashian +// Licensed under the MIT License <LICENSE.md> +//! USER procedure declarations, constant definitions and macros + +// Edit Control Styles +// +pub const ES_LEFT: ::DWORD = 0x0000; +pub const ES_CENTER: ::DWORD = 0x0001; +pub const ES_RIGHT: ::DWORD = 0x0002; +pub const ES_MULTILINE: ::DWORD = 0x0004; +pub const ES_UPPERCASE: ::DWORD = 0x0008; +pub const ES_LOWERCASE: ::DWORD = 0x0010; +pub const ES_PASSWORD: ::DWORD = 0x0020; +pub const ES_AUTOVSCROLL: ::DWORD = 0x0040; +pub const ES_AUTOHSCROLL: ::DWORD = 0x0080; +pub const ES_NOHIDESEL: ::DWORD = 0x0100; +pub const ES_OEMCONVERT: ::DWORD = 0x0400; +pub const ES_READONLY: ::DWORD = 0x0800; +pub const ES_WANTRETURN: ::DWORD = 0x1000; +pub const ES_NUMBER: ::DWORD = 0x2000; + +// Edit Control Notification Codes +// +pub const EN_SETFOCUS: ::WORD = 0x0100; +pub const EN_KILLFOCUS: ::WORD = 0x0200; +pub const EN_CHANGE: ::WORD = 0x0300; +pub const EN_UPDATE: ::WORD = 0x0400; +pub const EN_ERRSPACE: ::WORD = 0x0500; +pub const EN_MAXTEXT: ::WORD = 0x0501; +pub const EN_HSCROLL: ::WORD = 0x0601; +pub const EN_VSCROLL: ::WORD = 0x0602; + +pub const EN_ALIGN_LTR_EC: ::WORD = 0x0700; +pub const EN_ALIGN_RTL_EC: ::WORD = 0x0701; + +// Edit control EM_SETMARGIN parameters +pub const EC_LEFTMARGIN: ::WORD = 0x0001; +pub const EC_RIGHTMARGIN: ::WORD = 0x0002; +pub const EC_USEFONTINFO: ::WORD = 0xffff; + +// wParam of EM_GET/SETIMESTATUS +pub const EMSIS_COMPOSITIONSTRING: ::WORD = 0x0001; + +// lParam for EMSIS_COMPOSITIONSTRING +pub const EIMES_GETCOMPSTRATONCE: ::WORD = 0x0001; +pub const EIMES_CANCELCOMPSTRINFOCUS: ::WORD = 0x0002; +pub const EIMES_COMPLETECOMPSTRKILLFOCUS: ::WORD = 0x0004; + +// Edit Control Messages +// +pub const EM_GETSEL: ::WORD = 0x00B0; +pub const EM_SETSEL: ::WORD = 0x00B1; +pub const EM_GETRECT: ::WORD = 0x00B2; +pub const EM_SETRECT: ::WORD = 0x00B3; +pub const EM_SETRECTNP: ::WORD = 0x00B4; +pub const EM_SCROLL: ::WORD = 0x00B5; +pub const EM_LINESCROLL: ::WORD = 0x00B6; +pub const EM_SCROLLCARET: ::WORD = 0x00B7; +pub const EM_GETMODIFY: ::WORD = 0x00B8; +pub const EM_SETMODIFY: ::WORD = 0x00B9; +pub const EM_GETLINECOUNT: ::WORD = 0x00BA; +pub const EM_LINEINDEX: ::WORD = 0x00BB; +pub const EM_SETHANDLE: ::WORD = 0x00BC; +pub const EM_GETHANDLE: ::WORD = 0x00BD; +pub const EM_GETTHUMB: ::WORD = 0x00BE; +pub const EM_LINELENGTH: ::WORD = 0x00C1; +pub const EM_REPLACESEL: ::WORD = 0x00C2; +pub const EM_GETLINE: ::WORD = 0x00C4; +pub const EM_LIMITTEXT: ::WORD = 0x00C5; +pub const EM_CANUNDO: ::WORD = 0x00C6; +pub const EM_UNDO: ::WORD = 0x00C7; +pub const EM_FMTLINES: ::WORD = 0x00C8; +pub const EM_LINEFROMCHAR: ::WORD = 0x00C9; +pub const EM_SETTABSTOPS: ::WORD = 0x00CB; +pub const EM_SETPASSWORDCHAR: ::WORD = 0x00CC; +pub const EM_EMPTYUNDOBUFFER: ::WORD = 0x00CD; +pub const EM_GETFIRSTVISIBLELINE: ::WORD = 0x00CE; +pub const EM_SETREADONLY: ::WORD = 0x00CF; +pub const EM_SETWORDBREAKPROC: ::WORD = 0x00D0; +pub const EM_GETWORDBREAKPROC: ::WORD = 0x00D1; +pub const EM_GETPASSWORDCHAR: ::WORD = 0x00D2; + +pub const EM_SETMARGINS: ::WORD = 0x00D3; +pub const EM_GETMARGINS: ::WORD = 0x00D4; +pub const EM_SETLIMITTEXT: ::WORD = EM_LIMITTEXT; +pub const EM_GETLIMITTEXT: ::WORD = 0x00D5; +pub const EM_POSFROMCHAR: ::WORD = 0x00D6; +pub const EM_CHARFROMPOS: ::WORD = 0x00D7; + +pub const EM_SETIMESTATUS: ::WORD = 0x00D8; +pub const EM_GETIMESTATUS: ::WORD = 0x00D9; + +// EDITWORDBREAKPROC code values +// +pub const WB_LEFT: ::WORD = 0; +pub const WB_RIGHT: ::WORD = 1; +pub const WB_ISDELIMITER: ::WORD = 2; + +pub const BN_CLICKED: ::WORD = 0; +pub const BN_PAINT: ::WORD = 1; +pub const BN_HILITE: ::WORD = 2; +pub const BN_UNHILITE: ::WORD = 3; +pub const BN_DISABLE: ::WORD = 4; +pub const BN_DOUBLECLICKED: ::WORD = 5; +pub const BN_PUSHED: ::WORD = BN_HILITE; +pub const BN_UNPUSHED: ::WORD = BN_UNHILITE; +pub const BN_DBLCLK: ::WORD = BN_DOUBLECLICKED; +pub const BN_SETFOCUS: ::WORD = 6; +pub const BN_KILLFOCUS: ::WORD = 7; +pub const BS_PUSHBUTTON: ::DWORD = 0x00000000; +pub const BS_DEFPUSHBUTTON: ::DWORD = 0x00000001; +pub const BS_CHECKBOX: ::DWORD = 0x00000002; +pub const BS_AUTOCHECKBOX: ::DWORD = 0x00000003; +pub const BS_RADIOBUTTON: ::DWORD = 0x00000004; +pub const BS_3STATE: ::DWORD = 0x00000005; +pub const BS_AUTO3STATE: ::DWORD = 0x00000006; +pub const BS_GROUPBOX: ::DWORD = 0x00000007; +pub const BS_USERBUTTON: ::DWORD = 0x00000008; +pub const BS_AUTORADIOBUTTON: ::DWORD = 0x00000009; +pub const BS_PUSHBOX: ::DWORD = 0x0000000A; +pub const BS_OWNERDRAW: ::DWORD = 0x0000000B; +pub const BS_TYPEMASK: ::DWORD = 0x0000000F; +pub const BS_LEFTTEXT: ::DWORD = 0x00000020; +pub const BS_TEXT: ::DWORD = 0x00000000; +pub const BS_ICON: ::DWORD = 0x00000040; +pub const BS_BITMAP: ::DWORD = 0x00000080; +pub const BS_LEFT: ::DWORD = 0x00000100; +pub const BS_RIGHT: ::DWORD = 0x00000200; +pub const BS_CENTER: ::DWORD = 0x00000300; +pub const BS_TOP: ::DWORD = 0x00000400; +pub const BS_BOTTOM: ::DWORD = 0x00000800; +pub const BS_VCENTER: ::DWORD = 0x00000C00; +pub const BS_PUSHLIKE: ::DWORD = 0x00001000; +pub const BS_MULTILINE: ::DWORD = 0x00002000; +pub const BS_NOTIFY: ::DWORD = 0x00004000; +pub const BS_FLAT: ::DWORD = 0x00008000; +pub const BS_RIGHTBUTTON: ::DWORD = BS_LEFTTEXT; +pub const CCHILDREN_SCROLLBAR: usize = 5; +pub const CDS_UPDATEREGISTRY: ::DWORD = 0x00000001; +pub const CDS_TEST: ::DWORD = 0x00000002; +pub const CDS_FULLSCREEN: ::DWORD = 0x00000004; +pub const CDS_GLOBAL: ::DWORD = 0x00000008; +pub const CDS_SET_PRIMARY: ::DWORD = 0x00000010; +pub const CDS_VIDEOPARAMETERS: ::DWORD = 0x00000020; +pub const CDS_ENABLE_UNSAFE_MODES: ::DWORD = 0x00000100; +pub const CDS_DISABLE_UNSAFE_MODES: ::DWORD = 0x00000200; +pub const CDS_RESET: ::DWORD = 0x40000000; +pub const CDS_RESET_EX: ::DWORD = 0x20000000; +pub const CDS_NORESET: ::DWORD = 0x10000000; +pub const CS_VREDRAW: ::DWORD = 0x0001; +pub const CS_HREDRAW: ::DWORD = 0x0002; +pub const CS_DBLCLKS: ::DWORD = 0x0008; +pub const CS_OWNDC: ::DWORD = 0x0020; +pub const CS_CLASSDC: ::DWORD = 0x0040; +pub const CS_PARENTDC: ::DWORD = 0x0080; +pub const CS_NOCLOSE: ::DWORD = 0x0200; +pub const CS_SAVEBITS: ::DWORD = 0x0800; +pub const CS_BYTEALIGNCLIENT: ::DWORD = 0x1000; +pub const CS_BYTEALIGNWINDOW: ::DWORD = 0x2000; +pub const CS_GLOBALCLASS: ::DWORD = 0x4000; +pub const CS_IME: ::DWORD = 0x00010000; +pub const CS_DROPSHADOW: ::DWORD = 0x00020000; +pub const DFC_CAPTION: ::UINT = 1; +pub const DFC_MENU: ::UINT = 2; +pub const DFC_SCROLL: ::UINT = 3; +pub const DFC_BUTTON: ::UINT = 4; +pub const DFCS_CAPTIONCLOSE: ::UINT = 0x0000; +pub const DFCS_CAPTIONMIN: ::UINT = 0x0001; +pub const DFCS_CAPTIONMAX: ::UINT = 0x0002; +pub const DFCS_CAPTIONRESTORE: ::UINT = 0x0003; +pub const DFCS_CAPTIONHELP: ::UINT = 0x0004; +pub const DFCS_MENUARROW: ::UINT = 0x0000; +pub const DFCS_MENUCHECK: ::UINT = 0x0001; +pub const DFCS_MENUBULLET: ::UINT = 0x0002; +pub const DFCS_MENUARROWRIGHT: ::UINT = 0x0004; +pub const DFCS_SCROLLUP: ::UINT = 0x0000; +pub const DFCS_SCROLLDOWN: ::UINT = 0x0001; +pub const DFCS_SCROLLLEFT: ::UINT = 0x0002; +pub const DFCS_SCROLLRIGHT: ::UINT = 0x0003; +pub const DFCS_SCROLLCOMBOBOX: ::UINT = 0x0005; +pub const DFCS_SCROLLSIZEGRIP: ::UINT = 0x0008; +pub const DFCS_SCROLLSIZEGRIPRIGHT: ::UINT = 0x0010; +pub const DFCS_BUTTONCHECK: ::UINT = 0x0000; +pub const DFCS_BUTTONRADIOIMAGE: ::UINT = 0x0001; +pub const DFCS_BUTTONRADIOMASK: ::UINT = 0x0002; +pub const DFCS_BUTTONRADIO: ::UINT = 0x0004; +pub const DFCS_BUTTON3STATE: ::UINT = 0x0008; +pub const DFCS_BUTTONPUSH: ::UINT = 0x0010; +pub const DFCS_INACTIVE: ::UINT = 0x0100; +pub const DFCS_PUSHED: ::UINT = 0x0200; +pub const DFCS_CHECKED: ::UINT = 0x0400; +// if WINVER >= 0x0500 +pub const DFCS_TRANSPARENT: ::UINT = 0x0800; +pub const DFCS_HOT: ::UINT = 0x1000; +// end if WINVER >= 0x0500 +pub const DFCS_ADJUSTRECT: ::UINT = 0x2000; +pub const DFCS_FLAT: ::UINT = 0x4000; +pub const DFCS_MONO: ::UINT = 0x8000; +pub const CW_USEDEFAULT: ::c_int = 0x80000000u32 as ::c_int; +pub const DISP_CHANGE_SUCCESSFUL: ::LONG = 0; +pub const DISP_CHANGE_RESTART: ::LONG = 1; +pub const DISP_CHANGE_FAILED: ::LONG = -1; +pub const DISP_CHANGE_BADMODE: ::LONG = -2; +pub const DISP_CHANGE_NOTUPDATED: ::LONG = -3; +pub const DISP_CHANGE_BADFLAGS: ::LONG = -4; +pub const DISP_CHANGE_BADPARAM: ::LONG = -5; +pub const DISP_CHANGE_BADDUALVIEW: ::LONG = -6; +pub const EDD_GET_DEVICE_INTERFACE_NAME: ::DWORD = 0x00000001; +pub const ENUM_CURRENT_SETTINGS: ::DWORD = 0xFFFFFFFF; +pub const ENUM_REGISTRY_SETTINGS: ::DWORD = 0xFFFFFFFE; +pub const GW_HWNDFIRST: ::UINT = 0; +pub const GW_HWNDLAST: ::UINT = 1; +pub const GW_HWNDNEXT: ::UINT = 2; +pub const GW_HWNDPREV: ::UINT = 3; +pub const GW_OWNER: ::UINT = 4; +pub const GW_CHILD: ::UINT = 5; +pub const GW_ENABLEDPOPUP: ::UINT = 6; +pub const GW_MAX: ::UINT = 6; +pub const HTERROR: ::c_int = -2; +pub const HTTRANSPARENT: ::c_int = -1; +pub const HTNOWHERE: ::c_int = 0; +pub const HTCLIENT: ::c_int = 1; +pub const HTCAPTION: ::c_int = 2; +pub const HTSYSMENU: ::c_int = 3; +pub const HTGROWBOX: ::c_int = 4; +pub const HTSIZE: ::c_int = HTGROWBOX; +pub const HTMENU: ::c_int = 5; +pub const HTHSCROLL: ::c_int = 6; +pub const HTVSCROLL: ::c_int = 7; +pub const HTMINBUTTON: ::c_int = 8; +pub const HTMAXBUTTON: ::c_int = 9; +pub const HTLEFT: ::c_int = 10; +pub const HTRIGHT: ::c_int = 11; +pub const HTTOP: ::c_int = 12; +pub const HTTOPLEFT: ::c_int = 13; +pub const HTTOPRIGHT: ::c_int = 14; +pub const HTBOTTOM: ::c_int = 15; +pub const HTBOTTOMLEFT: ::c_int = 16; +pub const HTBOTTOMRIGHT: ::c_int = 17; +pub const HTBORDER: ::c_int = 18; +pub const HTREDUCE: ::c_int = HTMINBUTTON; +pub const HTZOOM: ::c_int = HTMAXBUTTON; +pub const HTSIZEFIRST: ::c_int = HTLEFT; +pub const HTSIZELAST: ::c_int = HTBOTTOMRIGHT; +pub const HTOBJECT: ::c_int = 19; +pub const HTCLOSE: ::c_int = 20; +pub const HTHELP: ::c_int = 21; +pub const LSFW_LOCK: ::UINT = 1; +pub const LSFW_UNLOCK: ::UINT = 2; +pub const MDITILE_VERTICAL: ::UINT = 0x0000; +pub const MDITILE_HORIZONTAL: ::UINT = 0x0001; +pub const MDITILE_SKIPDISABLED: ::UINT = 0x0002; +pub const MDITILE_ZORDER: ::UINT = 0x0004; +pub const MB_OK: ::DWORD = 0x00000000; +pub const MB_OKCANCEL: ::DWORD = 0x00000001; +pub const MB_ABORTRETRYIGNORE: ::DWORD = 0x00000002; +pub const MB_YESNOCANCEL: ::DWORD = 0x00000003; +pub const MB_YESNO: ::DWORD = 0x00000004; +pub const MB_RETRYCANCEL: ::DWORD = 0x00000005; +pub const MB_CANCELTRYCONTINUE: ::DWORD = 0x00000006; +pub const MB_ICONHAND: ::DWORD = 0x00000010; +pub const MB_ICONQUESTION: ::DWORD = 0x00000020; +pub const MB_ICONEXCLAMATION: ::DWORD = 0x00000030; +pub const MB_ICONASTERISK: ::DWORD = 0x00000040; +pub const MB_USERICON: ::DWORD = 0x00000080; +pub const MB_ICONWARNING: ::DWORD = MB_ICONEXCLAMATION; +pub const MB_ICONERROR: ::DWORD = MB_ICONHAND; +pub const MB_ICONINFORMATION: ::DWORD = MB_ICONASTERISK; +pub const MB_ICONSTOP: ::DWORD = MB_ICONHAND; +pub const MB_DEFBUTTON1: ::DWORD = 0x00000000; +pub const MB_DEFBUTTON2: ::DWORD = 0x00000100; +pub const MB_DEFBUTTON3: ::DWORD = 0x00000200; +pub const MB_DEFBUTTON4: ::DWORD = 0x00000300; +pub const MB_APPLMODAL: ::DWORD = 0x00000000; +pub const MB_SYSTEMMODAL: ::DWORD = 0x00001000; +pub const MB_TASKMODAL: ::DWORD = 0x00002000; +pub const MB_HELP: ::DWORD = 0x00004000; +pub const MB_NOFOCUS: ::DWORD = 0x00008000; +pub const MB_SETFOREGROUND: ::DWORD = 0x00010000; +pub const MB_DEFAULT_DESKTOP_ONLY: ::DWORD = 0x00020000; +pub const MB_TOPMOST: ::DWORD = 0x00040000; +pub const MB_RIGHT: ::DWORD = 0x00080000; +pub const MB_RTLREADING: ::DWORD = 0x00100000; +pub const MB_SERVICE_NOTIFICATION: ::DWORD = 0x00200000; +pub const MB_SERVICE_NOTIFICATION_NT3X: ::DWORD = 0x00040000; +pub const MB_TYPEMASK: ::DWORD = 0x0000000F; +pub const MB_ICONMASK: ::DWORD = 0x000000F0; +pub const MB_DEFMASK: ::DWORD = 0x00000F00; +pub const MB_MODEMASK: ::DWORD = 0x00003000; +pub const MB_MISCMASK: ::DWORD = 0x0000C000; +pub const MF_BITMAP: ::UINT = 0x00000004; +pub const MF_CHECKED: ::UINT = 0x00000008; +pub const MF_DISABLED: ::UINT = 0x00000002; +pub const MF_ENABLED: ::UINT = 0x00000000; +pub const MF_GRAYED: ::UINT = 0x00000001; +pub const MF_MENUBARBREAK: ::UINT = 0x00000020; +pub const MF_MENUBREAK: ::UINT = 0x00000040; +pub const MF_OWNERDRAW: ::UINT = 0x00000100; +pub const MF_POPUP: ::UINT = 0x00000010; +pub const MF_SEPARATOR: ::UINT = 0x00000800; +pub const MF_STRING: ::UINT = 0x00000000; +pub const MF_UNCHECKED: ::UINT = 0x00000000; +pub const SB_HORZ: ::c_int = 0; +pub const SB_VERT: ::c_int = 1; +pub const SB_CTL: ::c_int = 2; +pub const SB_BOTH: ::c_int = 3; +pub const SW_HIDE: ::c_int = 0; +pub const SW_SHOWNORMAL: ::c_int = 1; +pub const SW_NORMAL: ::c_int = 1; +pub const SW_SHOWMINIMIZED: ::c_int = 2; +pub const SW_SHOWMAXIMIZED: ::c_int = 3; +pub const SW_MAXIMIZE: ::c_int = 3; +pub const SW_SHOWNOACTIVATE: ::c_int = 4; +pub const SW_SHOW: ::c_int = 5; +pub const SW_MINIMIZE: ::c_int = 6; +pub const SW_SHOWMINNOACTIVE: ::c_int = 7; +pub const SW_SHOWNA: ::c_int = 8; +pub const SW_RESTORE: ::c_int = 9; +pub const SW_SHOWDEFAULT: ::c_int = 10; +pub const SW_FORCEMINIMIZE: ::c_int = 11; +pub const SW_MAX: ::c_int = 11; +pub const SWP_NOSIZE: ::UINT = 0x0001; +pub const SWP_NOMOVE: ::UINT = 0x0002; +pub const SWP_NOZORDER: ::UINT = 0x0004; +pub const SWP_NOREDRAW: ::UINT = 0x0008; +pub const SWP_NOACTIVATE: ::UINT = 0x0010; +pub const SWP_FRAMECHANGED: ::UINT = 0x0020; +pub const SWP_SHOWWINDOW: ::UINT = 0x0040; +pub const SWP_HIDEWINDOW: ::UINT = 0x0080; +pub const SWP_NOCOPYBITS: ::UINT = 0x0100; +pub const SWP_NOOWNERZORDER: ::UINT = 0x0200; +pub const SWP_NOSENDCHANGING: ::UINT = 0x0400; +pub const SWP_DRAWFRAME: ::UINT = SWP_FRAMECHANGED; +pub const SWP_NOREPOSITION: ::UINT = SWP_NOOWNERZORDER; +pub const SWP_DEFERERASE: ::UINT = 0x2000; +pub const SWP_ASYNCWINDOWPOS: ::UINT = 0x4000; +pub const VK_LBUTTON: ::c_int = 0x01; +pub const VK_RBUTTON: ::c_int = 0x02; +pub const VK_CANCEL: ::c_int = 0x03; +pub const VK_MBUTTON: ::c_int = 0x04; +pub const VK_XBUTTON1: ::c_int = 0x05; +pub const VK_XBUTTON2: ::c_int = 0x06; +pub const VK_BACK: ::c_int = 0x08; +pub const VK_TAB: ::c_int = 0x09; +pub const VK_CLEAR: ::c_int = 0x0C; +pub const VK_RETURN: ::c_int = 0x0D; +pub const VK_SHIFT: ::c_int = 0x10; +pub const VK_CONTROL: ::c_int = 0x11; +pub const VK_MENU: ::c_int = 0x12; +pub const VK_PAUSE: ::c_int = 0x13; +pub const VK_CAPITAL: ::c_int = 0x14; +pub const VK_KANA: ::c_int = 0x15; +pub const VK_HANGUEL: ::c_int = 0x15; +pub const VK_HANGUL: ::c_int = 0x15; +pub const VK_JUNJA: ::c_int = 0x17; +pub const VK_FINAL: ::c_int = 0x18; +pub const VK_HANJA: ::c_int = 0x19; +pub const VK_KANJI: ::c_int = 0x19; +pub const VK_ESCAPE: ::c_int = 0x1B; +pub const VK_CONVERT: ::c_int = 0x1C; +pub const VK_NONCONVERT: ::c_int = 0x1D; +pub const VK_ACCEPT: ::c_int = 0x1E; +pub const VK_MODECHANGE: ::c_int = 0x1F; +pub const VK_SPACE: ::c_int = 0x20; +pub const VK_PRIOR: ::c_int = 0x21; +pub const VK_NEXT: ::c_int = 0x22; +pub const VK_END: ::c_int = 0x23; +pub const VK_HOME: ::c_int = 0x24; +pub const VK_LEFT: ::c_int = 0x25; +pub const VK_UP: ::c_int = 0x26; +pub const VK_RIGHT: ::c_int = 0x27; +pub const VK_DOWN: ::c_int = 0x28; +pub const VK_SELECT: ::c_int = 0x29; +pub const VK_PRINT: ::c_int = 0x2A; +pub const VK_EXECUTE: ::c_int = 0x2B; +pub const VK_SNAPSHOT: ::c_int = 0x2C; +pub const VK_INSERT: ::c_int = 0x2D; +pub const VK_DELETE: ::c_int = 0x2E; +pub const VK_HELP: ::c_int = 0x2F; +pub const VK_LWIN: ::c_int = 0x5B; +pub const VK_RWIN: ::c_int = 0x5C; +pub const VK_APPS: ::c_int = 0x5D; +pub const VK_SLEEP: ::c_int = 0x5F; +pub const VK_NUMPAD0: ::c_int = 0x60; +pub const VK_NUMPAD1: ::c_int = 0x61; +pub const VK_NUMPAD2: ::c_int = 0x62; +pub const VK_NUMPAD3: ::c_int = 0x63; +pub const VK_NUMPAD4: ::c_int = 0x64; +pub const VK_NUMPAD5: ::c_int = 0x65; +pub const VK_NUMPAD6: ::c_int = 0x66; +pub const VK_NUMPAD7: ::c_int = 0x67; +pub const VK_NUMPAD8: ::c_int = 0x68; +pub const VK_NUMPAD9: ::c_int = 0x69; +pub const VK_MULTIPLY: ::c_int = 0x6A; +pub const VK_ADD: ::c_int = 0x6B; +pub const VK_SEPARATOR: ::c_int = 0x6C; +pub const VK_SUBTRACT: ::c_int = 0x6D; +pub const VK_DECIMAL: ::c_int = 0x6E; +pub const VK_DIVIDE: ::c_int = 0x6F; +pub const VK_F1: ::c_int = 0x70; +pub const VK_F2: ::c_int = 0x71; +pub const VK_F3: ::c_int = 0x72; +pub const VK_F4: ::c_int = 0x73; +pub const VK_F5: ::c_int = 0x74; +pub const VK_F6: ::c_int = 0x75; +pub const VK_F7: ::c_int = 0x76; +pub const VK_F8: ::c_int = 0x77; +pub const VK_F9: ::c_int = 0x78; +pub const VK_F10: ::c_int = 0x79; +pub const VK_F11: ::c_int = 0x7A; +pub const VK_F12: ::c_int = 0x7B; +pub const VK_F13: ::c_int = 0x7C; +pub const VK_F14: ::c_int = 0x7D; +pub const VK_F15: ::c_int = 0x7E; +pub const VK_F16: ::c_int = 0x7F; +pub const VK_F17: ::c_int = 0x80; +pub const VK_F18: ::c_int = 0x81; +pub const VK_F19: ::c_int = 0x82; +pub const VK_F20: ::c_int = 0x83; +pub const VK_F21: ::c_int = 0x84; +pub const VK_F22: ::c_int = 0x85; +pub const VK_F23: ::c_int = 0x86; +pub const VK_F24: ::c_int = 0x87; +pub const VK_NUMLOCK: ::c_int = 0x90; +pub const VK_SCROLL: ::c_int = 0x91; +pub const VK_OEM_NEC_EQUAL: ::c_int = 0x92; +pub const VK_OEM_FJ_JISHO: ::c_int = 0x92; +pub const VK_OEM_FJ_MASSHOU: ::c_int = 0x93; +pub const VK_OEM_FJ_TOUROKU: ::c_int = 0x94; +pub const VK_OEM_FJ_LOYA: ::c_int = 0x95; +pub const VK_OEM_FJ_ROYA: ::c_int = 0x96; +pub const VK_LSHIFT: ::c_int = 0xA0; +pub const VK_RSHIFT: ::c_int = 0xA1; +pub const VK_LCONTROL: ::c_int = 0xA2; +pub const VK_RCONTROL: ::c_int = 0xA3; +pub const VK_LMENU: ::c_int = 0xA4; +pub const VK_RMENU: ::c_int = 0xA5; +pub const VK_BROWSER_BACK: ::c_int = 0xA6; +pub const VK_BROWSER_FORWARD: ::c_int = 0xA7; +pub const VK_BROWSER_REFRESH: ::c_int = 0xA8; +pub const VK_BROWSER_STOP: ::c_int = 0xA9; +pub const VK_BROWSER_SEARCH: ::c_int = 0xAA; +pub const VK_BROWSER_FAVORITES: ::c_int = 0xAB; +pub const VK_BROWSER_HOME: ::c_int = 0xAC; +pub const VK_VOLUME_MUTE: ::c_int = 0xAD; +pub const VK_VOLUME_DOWN: ::c_int = 0xAE; +pub const VK_VOLUME_UP: ::c_int = 0xAF; +pub const VK_MEDIA_NEXT_TRACK: ::c_int = 0xB0; +pub const VK_MEDIA_PREV_TRACK: ::c_int = 0xB1; +pub const VK_MEDIA_STOP: ::c_int = 0xB2; +pub const VK_MEDIA_PLAY_PAUSE: ::c_int = 0xB3; +pub const VK_LAUNCH_MAIL: ::c_int = 0xB4; +pub const VK_LAUNCH_MEDIA_SELECT: ::c_int = 0xB5; +pub const VK_LAUNCH_APP1: ::c_int = 0xB6; +pub const VK_LAUNCH_APP2: ::c_int = 0xB7; +pub const VK_OEM_1: ::c_int = 0xBA; +pub const VK_OEM_PLUS: ::c_int = 0xBB; +pub const VK_OEM_COMMA: ::c_int = 0xBC; +pub const VK_OEM_MINUS: ::c_int = 0xBD; +pub const VK_OEM_PERIOD: ::c_int = 0xBE; +pub const VK_OEM_2: ::c_int = 0xBF; +pub const VK_OEM_3: ::c_int = 0xC0; +pub const VK_OEM_4: ::c_int = 0xDB; +pub const VK_OEM_5: ::c_int = 0xDC; +pub const VK_OEM_6: ::c_int = 0xDD; +pub const VK_OEM_7: ::c_int = 0xDE; +pub const VK_OEM_8: ::c_int = 0xDF; +pub const VK_OEM_AX: ::c_int = 0xE1; +pub const VK_OEM_102: ::c_int = 0xE2; +pub const VK_ICO_HELP: ::c_int = 0xE3; +pub const VK_ICO_00: ::c_int = 0xE4; +pub const VK_PROCESSKEY: ::c_int = 0xE5; +pub const VK_ICO_CLEAR: ::c_int = 0xE6; +pub const VK_PACKET: ::c_int = 0xE7; +pub const VK_OEM_RESET: ::c_int = 0xE9; +pub const VK_OEM_JUMP: ::c_int = 0xEA; +pub const VK_OEM_PA1: ::c_int = 0xEB; +pub const VK_OEM_PA2: ::c_int = 0xEC; +pub const VK_OEM_PA3: ::c_int = 0xED; +pub const VK_OEM_WSCTRL: ::c_int = 0xEE; +pub const VK_OEM_CUSEL: ::c_int = 0xEF; +pub const VK_OEM_ATTN: ::c_int = 0xF0; +pub const VK_OEM_FINISH: ::c_int = 0xF1; +pub const VK_OEM_COPY: ::c_int = 0xF2; +pub const VK_OEM_AUTO: ::c_int = 0xF3; +pub const VK_OEM_ENLW: ::c_int = 0xF4; +pub const VK_OEM_BACKTAB: ::c_int = 0xF5; +pub const VK_ATTN: ::c_int = 0xF6; +pub const VK_CRSEL: ::c_int = 0xF7; +pub const VK_EXSEL: ::c_int = 0xF8; +pub const VK_EREOF: ::c_int = 0xF9; +pub const VK_PLAY: ::c_int = 0xFA; +pub const VK_ZOOM: ::c_int = 0xFB; +pub const VK_NONAME: ::c_int = 0xFC; +pub const VK_PA1: ::c_int = 0xFD; +pub const VK_OEM_CLEAR: ::c_int = 0xFE; +// if _WIN32_WINNT >= 0x0500 +pub const APPCOMMAND_BROWSER_BACKWARD: ::c_short = 1; +pub const APPCOMMAND_BROWSER_FORWARD: ::c_short = 2; +pub const APPCOMMAND_BROWSER_REFRESH: ::c_short = 3; +pub const APPCOMMAND_BROWSER_STOP: ::c_short = 4; +pub const APPCOMMAND_BROWSER_SEARCH: ::c_short = 5; +pub const APPCOMMAND_BROWSER_FAVORITES: ::c_short = 6; +pub const APPCOMMAND_BROWSER_HOME: ::c_short = 7; +pub const APPCOMMAND_VOLUME_MUTE: ::c_short = 8; +pub const APPCOMMAND_VOLUME_DOWN: ::c_short = 9; +pub const APPCOMMAND_VOLUME_UP: ::c_short = 10; +pub const APPCOMMAND_MEDIA_NEXTTRACK: ::c_short = 11; +pub const APPCOMMAND_MEDIA_PREVIOUSTRACK: ::c_short = 12; +pub const APPCOMMAND_MEDIA_STOP: ::c_short = 13; +pub const APPCOMMAND_MEDIA_PLAY_PAUSE: ::c_short = 14; +pub const APPCOMMAND_LAUNCH_MAIL: ::c_short = 15; +pub const APPCOMMAND_LAUNCH_MEDIA_SELECT: ::c_short = 16; +pub const APPCOMMAND_LAUNCH_APP1: ::c_short = 17; +pub const APPCOMMAND_LAUNCH_APP2: ::c_short = 18; +pub const APPCOMMAND_BASS_DOWN: ::c_short = 19; +pub const APPCOMMAND_BASS_BOOST: ::c_short = 20; +pub const APPCOMMAND_BASS_UP: ::c_short = 21; +pub const APPCOMMAND_TREBLE_DOWN: ::c_short = 22; +pub const APPCOMMAND_TREBLE_UP: ::c_short = 23; +// if _WIN32_WINNT >= 0x0501 +pub const APPCOMMAND_MICROPHONE_VOLUME_MUTE: ::c_short = 24; +pub const APPCOMMAND_MICROPHONE_VOLUME_DOWN: ::c_short = 25; +pub const APPCOMMAND_MICROPHONE_VOLUME_UP: ::c_short = 26; +pub const APPCOMMAND_HELP: ::c_short = 27; +pub const APPCOMMAND_FIND: ::c_short = 28; +pub const APPCOMMAND_NEW: ::c_short = 29; +pub const APPCOMMAND_OPEN: ::c_short = 30; +pub const APPCOMMAND_CLOSE: ::c_short = 31; +pub const APPCOMMAND_SAVE: ::c_short = 32; +pub const APPCOMMAND_PRINT: ::c_short = 33; +pub const APPCOMMAND_UNDO: ::c_short = 34; +pub const APPCOMMAND_REDO: ::c_short = 35; +pub const APPCOMMAND_COPY: ::c_short = 36; +pub const APPCOMMAND_CUT: ::c_short = 37; +pub const APPCOMMAND_PASTE: ::c_short = 38; +pub const APPCOMMAND_REPLY_TO_MAIL: ::c_short = 39; +pub const APPCOMMAND_FORWARD_MAIL: ::c_short = 40; +pub const APPCOMMAND_SEND_MAIL: ::c_short = 41; +pub const APPCOMMAND_SPELL_CHECK: ::c_short = 42; +pub const APPCOMMAND_DICTATE_OR_COMMAND_CONTROL_TOGGLE: ::c_short = 43; +pub const APPCOMMAND_MIC_ON_OFF_TOGGLE: ::c_short = 44; +pub const APPCOMMAND_CORRECTION_LIST: ::c_short = 45; +pub const APPCOMMAND_MEDIA_PLAY: ::c_short = 46; +pub const APPCOMMAND_MEDIA_PAUSE: ::c_short = 47; +pub const APPCOMMAND_MEDIA_RECORD: ::c_short = 48; +pub const APPCOMMAND_MEDIA_FAST_FORWARD: ::c_short = 49; +pub const APPCOMMAND_MEDIA_REWIND: ::c_short = 50; +pub const APPCOMMAND_MEDIA_CHANNEL_UP: ::c_short = 51; +pub const APPCOMMAND_MEDIA_CHANNEL_DOWN: ::c_short = 52; +// end if _WIN32_WINNT >= 0x0501 +// if _WIN32_WINNT >= 0x0600 +pub const APPCOMMAND_DELETE: ::c_short = 53; +pub const APPCOMMAND_DWM_FLIP3D: ::c_short = 54; +// end if _WIN32_WINNT >= 0x0600 +pub const WM_NULL: ::UINT = 0x0000; +pub const WM_CREATE: ::UINT = 0x0001; +pub const WM_DESTROY: ::UINT = 0x0002; +pub const WM_MOVE: ::UINT = 0x0003; +pub const WM_SIZE: ::UINT = 0x0005; +pub const WM_ACTIVATE: ::UINT = 0x0006; +pub const WM_SETFOCUS: ::UINT = 0x0007; +pub const WM_KILLFOCUS: ::UINT = 0x0008; +pub const WM_ENABLE: ::UINT = 0x000A; +pub const WM_SETREDRAW: ::UINT = 0x000B; +pub const WM_SETTEXT: ::UINT = 0x000C; +pub const WM_GETTEXT: ::UINT = 0x000D; +pub const WM_GETTEXTLENGTH: ::UINT = 0x000E; +pub const WM_PAINT: ::UINT = 0x000F; +pub const WM_CLOSE: ::UINT = 0x0010; +pub const WM_QUERYENDSESSION: ::UINT = 0x0011; +pub const WM_QUERYOPEN: ::UINT = 0x0013; +pub const WM_ENDSESSION: ::UINT = 0x0016; +pub const WM_QUIT: ::UINT = 0x0012; +pub const WM_ERASEBKGND: ::UINT = 0x0014; +pub const WM_SYSCOLORCHANGE: ::UINT = 0x0015; +pub const WM_SHOWWINDOW: ::UINT = 0x0018; +pub const WM_WININICHANGE: ::UINT = 0x001A; +pub const WM_SETTINGCHANGE: ::UINT = WM_WININICHANGE; +pub const WM_DEVMODECHANGE: ::UINT = 0x001B; +pub const WM_ACTIVATEAPP: ::UINT = 0x001C; +pub const WM_FONTCHANGE: ::UINT = 0x001D; +pub const WM_TIMECHANGE: ::UINT = 0x001E; +pub const WM_CANCELMODE: ::UINT = 0x001F; +pub const WM_SETCURSOR: ::UINT = 0x0020; +pub const WM_MOUSEACTIVATE: ::UINT = 0x0021; +pub const WM_CHILDACTIVATE: ::UINT = 0x0022; +pub const WM_QUEUESYNC: ::UINT = 0x0023; +pub const WM_GETMINMAXINFO: ::UINT = 0x0024; +pub const WM_PAINTICON: ::UINT = 0x0026; +pub const WM_ICONERASEBKGND: ::UINT = 0x0027; +pub const WM_NEXTDLGCTL: ::UINT = 0x0028; +pub const WM_SPOOLERSTATUS: ::UINT = 0x002A; +pub const WM_DRAWITEM: ::UINT = 0x002B; +pub const WM_MEASUREITEM: ::UINT = 0x002C; +pub const WM_DELETEITEM: ::UINT = 0x002D; +pub const WM_VKEYTOITEM: ::UINT = 0x002E; +pub const WM_CHARTOITEM: ::UINT = 0x002F; +pub const WM_SETFONT: ::UINT = 0x0030; +pub const WM_GETFONT: ::UINT = 0x0031; +pub const WM_SETHOTKEY: ::UINT = 0x0032; +pub const WM_GETHOTKEY: ::UINT = 0x0033; +pub const WM_QUERYDRAGICON: ::UINT = 0x0037; +pub const WM_COMPAREITEM: ::UINT = 0x0039; +pub const WM_GETOBJECT: ::UINT = 0x003D; +pub const WM_COMPACTING: ::UINT = 0x0041; +pub const WM_COMMNOTIFY: ::UINT = 0x0044; +pub const WM_WINDOWPOSCHANGING: ::UINT = 0x0046; +pub const WM_WINDOWPOSCHANGED: ::UINT = 0x0047; +pub const WM_POWER: ::UINT = 0x0048; +pub const WM_COPYDATA: ::UINT = 0x004A; +pub const WM_CANCELJOURNAL: ::UINT = 0x004B; +pub const WM_NOTIFY: ::UINT = 0x004E; +pub const WM_INPUTLANGCHANGEREQUEST: ::UINT = 0x0050; +pub const WM_INPUTLANGCHANGE: ::UINT = 0x0051; +pub const WM_TCARD: ::UINT = 0x0052; +pub const WM_HELP: ::UINT = 0x0053; +pub const WM_USERCHANGED: ::UINT = 0x0054; +pub const WM_NOTIFYFORMAT: ::UINT = 0x0055; +pub const WM_CONTEXTMENU: ::UINT = 0x007B; +pub const WM_STYLECHANGING: ::UINT = 0x007C; +pub const WM_STYLECHANGED: ::UINT = 0x007D; +pub const WM_DISPLAYCHANGE: ::UINT = 0x007E; +pub const WM_GETICON: ::UINT = 0x007F; +pub const WM_SETICON: ::UINT = 0x0080; +pub const WM_NCCREATE: ::UINT = 0x0081; +pub const WM_NCDESTROY: ::UINT = 0x0082; +pub const WM_NCCALCSIZE: ::UINT = 0x0083; +pub const WM_NCHITTEST: ::UINT = 0x0084; +pub const WM_NCPAINT: ::UINT = 0x0085; +pub const WM_NCACTIVATE: ::UINT = 0x0086; +pub const WM_GETDLGCODE: ::UINT = 0x0087; +pub const WM_SYNCPAINT: ::UINT = 0x0088; +pub const WM_NCMOUSEMOVE: ::UINT = 0x00A0; +pub const WM_NCLBUTTONDOWN: ::UINT = 0x00A1; +pub const WM_NCLBUTTONUP: ::UINT = 0x00A2; +pub const WM_NCLBUTTONDBLCLK: ::UINT = 0x00A3; +pub const WM_NCRBUTTONDOWN: ::UINT = 0x00A4; +pub const WM_NCRBUTTONUP: ::UINT = 0x00A5; +pub const WM_NCRBUTTONDBLCLK: ::UINT = 0x00A6; +pub const WM_NCMBUTTONDOWN: ::UINT = 0x00A7; +pub const WM_NCMBUTTONUP: ::UINT = 0x00A8; +pub const WM_NCMBUTTONDBLCLK: ::UINT = 0x00A9; +pub const WM_NCXBUTTONDOWN: ::UINT = 0x00AB; +pub const WM_NCXBUTTONUP: ::UINT = 0x00AC; +pub const WM_NCXBUTTONDBLCLK: ::UINT = 0x00AD; +pub const WM_INPUT_DEVICE_CHANGE: ::UINT = 0x00FE; +pub const WM_INPUT: ::UINT = 0x00FF; +pub const WM_KEYFIRST: ::UINT = 0x0100; +pub const WM_KEYDOWN: ::UINT = 0x0100; +pub const WM_KEYUP: ::UINT = 0x0101; +pub const WM_CHAR: ::UINT = 0x0102; +pub const WM_DEADCHAR: ::UINT = 0x0103; +pub const WM_SYSKEYDOWN: ::UINT = 0x0104; +pub const WM_SYSKEYUP: ::UINT = 0x0105; +pub const WM_SYSCHAR: ::UINT = 0x0106; +pub const WM_SYSDEADCHAR: ::UINT = 0x0107; +pub const WM_UNICHAR: ::UINT = 0x0109; +pub const WM_KEYLAST: ::UINT = 0x0109; +pub const WM_IME_STARTCOMPOSITION: ::UINT = 0x010D; +pub const WM_IME_ENDCOMPOSITION: ::UINT = 0x010E; +pub const WM_IME_COMPOSITION: ::UINT = 0x010F; +pub const WM_IME_KEYLAST: ::UINT = 0x010F; +pub const WM_INITDIALOG: ::UINT = 0x0110; +pub const WM_COMMAND: ::UINT = 0x0111; +pub const WM_SYSCOMMAND: ::UINT = 0x0112; +pub const WM_TIMER: ::UINT = 0x0113; +pub const WM_HSCROLL: ::UINT = 0x0114; +pub const WM_VSCROLL: ::UINT = 0x0115; +pub const WM_INITMENU: ::UINT = 0x0116; +pub const WM_INITMENUPOPUP: ::UINT = 0x0117; +pub const WM_GESTURE: ::UINT = 0x0119; +pub const WM_GESTURENOTIFY: ::UINT = 0x011A; +pub const WM_MENUSELECT: ::UINT = 0x011F; +pub const WM_MENUCHAR: ::UINT = 0x0120; +pub const WM_ENTERIDLE: ::UINT = 0x0121; +pub const WM_MENURBUTTONUP: ::UINT = 0x0122; +pub const WM_MENUDRAG: ::UINT = 0x0123; +pub const WM_MENUGETOBJECT: ::UINT = 0x0124; +pub const WM_UNINITMENUPOPUP: ::UINT = 0x0125; +pub const WM_MENUCOMMAND: ::UINT = 0x0126; +pub const WM_CHANGEUISTATE: ::UINT = 0x0127; +pub const WM_UPDATEUISTATE: ::UINT = 0x0128; +pub const WM_QUERYUISTATE: ::UINT = 0x0129; +pub const WM_CTLCOLORMSGBOX: ::UINT = 0x0132; +pub const WM_CTLCOLOREDIT: ::UINT = 0x0133; +pub const WM_CTLCOLORLISTBOX: ::UINT = 0x0134; +pub const WM_CTLCOLORBTN: ::UINT = 0x0135; +pub const WM_CTLCOLORDLG: ::UINT = 0x0136; +pub const WM_CTLCOLORSCROLLBAR: ::UINT = 0x0137; +pub const WM_CTLCOLORSTATIC: ::UINT = 0x0138; +pub const WM_MOUSEFIRST: ::UINT = 0x0200; +pub const WM_MOUSEMOVE: ::UINT = 0x0200; +pub const WM_LBUTTONDOWN: ::UINT = 0x0201; +pub const WM_LBUTTONUP: ::UINT = 0x0202; +pub const WM_LBUTTONDBLCLK: ::UINT = 0x0203; +pub const WM_RBUTTONDOWN: ::UINT = 0x0204; +pub const WM_RBUTTONUP: ::UINT = 0x0205; +pub const WM_RBUTTONDBLCLK: ::UINT = 0x0206; +pub const WM_MBUTTONDOWN: ::UINT = 0x0207; +pub const WM_MBUTTONUP: ::UINT = 0x0208; +pub const WM_MBUTTONDBLCLK: ::UINT = 0x0209; +pub const WM_MOUSEWHEEL: ::UINT = 0x020A; +pub const WM_XBUTTONDOWN: ::UINT = 0x020B; +pub const WM_XBUTTONUP: ::UINT = 0x020C; +pub const WM_XBUTTONDBLCLK: ::UINT = 0x020D; +pub const WM_MOUSEHWHEEL: ::UINT = 0x020E; +pub const WM_MOUSELAST: ::UINT = 0x020E; +pub const WM_PARENTNOTIFY: ::UINT = 0x0210; +pub const WM_ENTERMENULOOP: ::UINT = 0x0211; +pub const WM_EXITMENULOOP: ::UINT = 0x0212; +pub const WM_NEXTMENU: ::UINT = 0x0213; +pub const WM_SIZING: ::UINT = 0x0214; +pub const WM_CAPTURECHANGED: ::UINT = 0x0215; +pub const WM_MOVING: ::UINT = 0x0216; +pub const WM_POWERBROADCAST: ::UINT = 0x0218; +pub const WM_DEVICECHANGE: ::UINT = 0x0219; +pub const WM_MDICREATE: ::UINT = 0x0220; +pub const WM_MDIDESTROY: ::UINT = 0x0221; +pub const WM_MDIACTIVATE: ::UINT = 0x0222; +pub const WM_MDIRESTORE: ::UINT = 0x0223; +pub const WM_MDINEXT: ::UINT = 0x0224; +pub const WM_MDIMAXIMIZE: ::UINT = 0x0225; +pub const WM_MDITILE: ::UINT = 0x0226; +pub const WM_MDICASCADE: ::UINT = 0x0227; +pub const WM_MDIICONARRANGE: ::UINT = 0x0228; +pub const WM_MDIGETACTIVE: ::UINT = 0x0229; +pub const WM_MDISETMENU: ::UINT = 0x0230; +pub const WM_ENTERSIZEMOVE: ::UINT = 0x0231; +pub const WM_EXITSIZEMOVE: ::UINT = 0x0232; +pub const WM_DROPFILES: ::UINT = 0x0233; +pub const WM_MDIREFRESHMENU: ::UINT = 0x0234; +pub const WM_POINTERDEVICECHANGE: ::UINT = 0x238; +pub const WM_POINTERDEVICEINRANGE: ::UINT = 0x239; +pub const WM_POINTERDEVICEOUTOFRANGE: ::UINT = 0x23A; +pub const WM_TOUCH: ::UINT = 0x0240; +pub const WM_NCPOINTERUPDATE: ::UINT = 0x0241; +pub const WM_NCPOINTERDOWN: ::UINT = 0x0242; +pub const WM_NCPOINTERUP: ::UINT = 0x0243; +pub const WM_POINTERUPDATE: ::UINT = 0x0245; +pub const WM_POINTERDOWN: ::UINT = 0x0246; +pub const WM_POINTERUP: ::UINT = 0x0247; +pub const WM_POINTERENTER: ::UINT = 0x0249; +pub const WM_POINTERLEAVE: ::UINT = 0x024A; +pub const WM_POINTERACTIVATE: ::UINT = 0x024B; +pub const WM_POINTERCAPTURECHANGED: ::UINT = 0x024C; +pub const WM_TOUCHHITTESTING: ::UINT = 0x024D; +pub const WM_POINTERWHEEL: ::UINT = 0x024E; +pub const WM_POINTERHWHEEL: ::UINT = 0x024F; +pub const WM_IME_SETCONTEXT: ::UINT = 0x0281; +pub const WM_IME_NOTIFY: ::UINT = 0x0282; +pub const WM_IME_CONTROL: ::UINT = 0x0283; +pub const WM_IME_COMPOSITIONFULL: ::UINT = 0x0284; +pub const WM_IME_SELECT: ::UINT = 0x0285; +pub const WM_IME_CHAR: ::UINT = 0x0286; +pub const WM_IME_REQUEST: ::UINT = 0x0288; +pub const WM_IME_KEYDOWN: ::UINT = 0x0290; +pub const WM_IME_KEYUP: ::UINT = 0x0291; +pub const WM_MOUSEHOVER: ::UINT = 0x02A1; +pub const WM_MOUSELEAVE: ::UINT = 0x02A3; +pub const WM_NCMOUSEHOVER: ::UINT = 0x02A0; +pub const WM_NCMOUSELEAVE: ::UINT = 0x02A2; +pub const WM_WTSSESSION_CHANGE: ::UINT = 0x02B1; +pub const WM_TABLET_FIRST: ::UINT = 0x02c0; +pub const WM_TABLET_LAST: ::UINT = 0x02df; +pub const WM_DPICHANGED: ::UINT = 0x02E0; +pub const WM_CUT: ::UINT = 0x0300; +pub const WM_COPY: ::UINT = 0x0301; +pub const WM_PASTE: ::UINT = 0x0302; +pub const WM_CLEAR: ::UINT = 0x0303; +pub const WM_UNDO: ::UINT = 0x0304; +pub const WM_RENDERFORMAT: ::UINT = 0x0305; +pub const WM_RENDERALLFORMATS: ::UINT = 0x0306; +pub const WM_DESTROYCLIPBOARD: ::UINT = 0x0307; +pub const WM_DRAWCLIPBOARD: ::UINT = 0x0308; +pub const WM_PAINTCLIPBOARD: ::UINT = 0x0309; +pub const WM_VSCROLLCLIPBOARD: ::UINT = 0x030A; +pub const WM_SIZECLIPBOARD: ::UINT = 0x030B; +pub const WM_ASKCBFORMATNAME: ::UINT = 0x030C; +pub const WM_CHANGECBCHAIN: ::UINT = 0x030D; +pub const WM_HSCROLLCLIPBOARD: ::UINT = 0x030E; +pub const WM_QUERYNEWPALETTE: ::UINT = 0x030F; +pub const WM_PALETTEISCHANGING: ::UINT = 0x0310; +pub const WM_PALETTECHANGED: ::UINT = 0x0311; +pub const WM_HOTKEY: ::UINT = 0x0312; +pub const WM_PRINT: ::UINT = 0x0317; +pub const WM_PRINTCLIENT: ::UINT = 0x0318; +pub const WM_APPCOMMAND: ::UINT = 0x0319; +pub const WM_THEMECHANGED: ::UINT = 0x031A; +pub const WM_CLIPBOARDUPDATE: ::UINT = 0x031D; +pub const WM_DWMCOMPOSITIONCHANGED: ::UINT = 0x031E; +pub const WM_DWMNCRENDERINGCHANGED: ::UINT = 0x031F; +pub const WM_DWMCOLORIZATIONCOLORCHANGED: ::UINT = 0x0320; +pub const WM_DWMWINDOWMAXIMIZEDCHANGE: ::UINT = 0x0321; +pub const WM_DWMSENDICONICTHUMBNAIL: ::UINT = 0x0323; +pub const WM_DWMSENDICONICLIVEPREVIEWBITMAP: ::UINT = 0x0326; +pub const WM_GETTITLEBARINFOEX: ::UINT = 0x033F; +pub const WM_HANDHELDFIRST: ::UINT = 0x0358; +pub const WM_HANDHELDLAST: ::UINT = 0x035F; +pub const WM_AFXFIRST: ::UINT = 0x0360; +pub const WM_AFXLAST: ::UINT = 0x037F; +pub const WM_PENWINFIRST: ::UINT = 0x0380; +pub const WM_PENWINLAST: ::UINT = 0x038F; +pub const WM_APP: ::UINT = 0x8000; +pub const WM_USER: ::UINT = 0x0400; +pub const WMSZ_LEFT: ::UINT = 1; +pub const WMSZ_RIGHT: ::UINT = 2; +pub const WMSZ_TOP: ::UINT = 3; +pub const WMSZ_TOPLEFT: ::UINT = 4; +pub const WMSZ_TOPRIGHT: ::UINT = 5; +pub const WMSZ_BOTTOM: ::UINT = 6; +pub const WMSZ_BOTTOMLEFT: ::UINT = 7; +pub const WMSZ_BOTTOMRIGHT: ::UINT = 8; +pub const SMTO_NORMAL: ::UINT = 0x0000; +pub const SMTO_BLOCK: ::UINT = 0x0001; +pub const SMTO_ABORTIFHUNG: ::UINT = 0x0002; +pub const SMTO_NOTIMEOUTIFNOTHUNG: ::UINT = 0x0008; +pub const SMTO_ERRORONEXIT: ::UINT = 0x0020; +pub const MA_ACTIVATE: ::UINT = 1; +pub const MA_ACTIVATEANDEAT: ::UINT = 2; +pub const MA_NOACTIVATE: ::UINT = 3; +pub const MA_NOACTIVATEANDEAT: ::UINT = 4; +pub const ICON_SMALL: ::UINT = 0; +pub const ICON_BIG: ::UINT = 1; +pub const ICON_SMALL2: ::UINT = 2; +pub const SIZE_RESTORED: ::UINT = 0; +pub const SIZE_MINIMIZED: ::UINT = 1; +pub const SIZE_MAXIMIZED: ::UINT = 2; +pub const SIZE_MAXSHOW: ::UINT = 3; +pub const SIZE_MAXHIDE: ::UINT = 4; +pub const SIZENORMAL: ::UINT = SIZE_RESTORED; +pub const SIZEICONIC: ::UINT = SIZE_MINIMIZED; +pub const SIZEFULLSCREEN: ::UINT = SIZE_MAXIMIZED; +pub const SIZEZOOMSHOW: ::UINT = SIZE_MAXSHOW; +pub const SIZEZOOMHIDE: ::UINT = SIZE_MAXHIDE; +STRUCT!{struct NCCALCSIZE_PARAMS { + rgrc: [::RECT; 3], + lppos: PWINDOWPOS, +}} +pub type PNCCALCSIZE_PARAMS = *mut NCCALCSIZE_PARAMS; +pub type NPNCCALCSIZE_PARAMS = *mut NCCALCSIZE_PARAMS; +pub type LPNCCALCSIZE_PARAMS = *mut NCCALCSIZE_PARAMS; +pub const WVR_ALIGNTOP: ::UINT = 0x0010; +pub const WVR_ALIGNLEFT: ::UINT = 0x0020; +pub const WVR_ALIGNBOTTOM: ::UINT = 0x0040; +pub const WVR_ALIGNRIGHT: ::UINT = 0x0080; +pub const WVR_HREDRAW: ::UINT = 0x0100; +pub const WVR_VREDRAW: ::UINT = 0x0200; +pub const WVR_REDRAW: ::UINT = WVR_HREDRAW | WVR_VREDRAW; +pub const WVR_VALIDRECTS: ::UINT = 0x0400; +pub const HOVER_DEFAULT: ::UINT = 0xFFFFFFFF; +pub const WS_OVERLAPPED: ::DWORD = 0x00000000; +pub const WS_POPUP: ::DWORD = 0x80000000; +pub const WS_CHILD: ::DWORD = 0x40000000; +pub const WS_MINIMIZE: ::DWORD = 0x20000000; +pub const WS_VISIBLE: ::DWORD = 0x10000000; +pub const WS_DISABLED: ::DWORD = 0x08000000; +pub const WS_CLIPSIBLINGS: ::DWORD = 0x04000000; +pub const WS_CLIPCHILDREN: ::DWORD = 0x02000000; +pub const WS_MAXIMIZE: ::DWORD = 0x01000000; +pub const WS_CAPTION: ::DWORD = 0x00C00000; +pub const WS_BORDER: ::DWORD = 0x00800000; +pub const WS_DLGFRAME: ::DWORD = 0x00400000; +pub const WS_VSCROLL: ::DWORD = 0x00200000; +pub const WS_HSCROLL: ::DWORD = 0x00100000; +pub const WS_SYSMENU: ::DWORD = 0x00080000; +pub const WS_THICKFRAME: ::DWORD = 0x00040000; +pub const WS_GROUP: ::DWORD = 0x00020000; +pub const WS_TABSTOP: ::DWORD = 0x00010000; +pub const WS_MINIMIZEBOX: ::DWORD = 0x00020000; +pub const WS_MAXIMIZEBOX: ::DWORD = 0x00010000; +pub const WS_TILED: ::DWORD = WS_OVERLAPPED; +pub const WS_ICONIC: ::DWORD = WS_MINIMIZE; +pub const WS_SIZEBOX: ::DWORD = WS_THICKFRAME; +pub const WS_TILEDWINDOW: ::DWORD = WS_OVERLAPPEDWINDOW; +pub const WS_OVERLAPPEDWINDOW: ::DWORD = WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX; +pub const WS_POPUPWINDOW: ::DWORD = WS_POPUP | WS_BORDER | WS_SYSMENU; +pub const WS_CHILDWINDOW: ::DWORD = WS_CHILD; +pub const WS_EX_DLGMODALFRAME: ::DWORD = 0x00000001; +pub const WS_EX_NOPARENTNOTIFY: ::DWORD = 0x00000004; +pub const WS_EX_TOPMOST: ::DWORD = 0x00000008; +pub const WS_EX_ACCEPTFILES: ::DWORD = 0x00000010; +pub const WS_EX_TRANSPARENT: ::DWORD = 0x00000020; +pub const WS_EX_MDICHILD: ::DWORD = 0x00000040; +pub const WS_EX_TOOLWINDOW: ::DWORD = 0x00000080; +pub const WS_EX_WINDOWEDGE: ::DWORD = 0x00000100; +pub const WS_EX_CLIENTEDGE: ::DWORD = 0x00000200; +pub const WS_EX_CONTEXTHELP: ::DWORD = 0x00000400; +pub const WS_EX_RIGHT: ::DWORD = 0x00001000; +pub const WS_EX_LEFT: ::DWORD = 0x00000000; +pub const WS_EX_RTLREADING: ::DWORD = 0x00002000; +pub const WS_EX_LTRREADING: ::DWORD = 0x00000000; +pub const WS_EX_LEFTSCROLLBAR: ::DWORD = 0x00004000; +pub const WS_EX_RIGHTSCROLLBAR: ::DWORD = 0x00000000; +pub const WS_EX_CONTROLPARENT: ::DWORD = 0x00010000; +pub const WS_EX_STATICEDGE: ::DWORD = 0x00020000; +pub const WS_EX_APPWINDOW: ::DWORD = 0x00040000; +pub const WS_EX_OVERLAPPEDWINDOW: ::DWORD = WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE; +pub const WS_EX_PALETTEWINDOW: ::DWORD = WS_EX_WINDOWEDGE | WS_EX_TOOLWINDOW | WS_EX_TOPMOST; +pub const WS_EX_LAYERED: ::DWORD = 0x00080000; +pub const WS_EX_NOINHERITLAYOUT: ::DWORD = 0x00100000; +pub const WS_EX_NOREDIRECTIONBITMAP: ::DWORD = 0x00200000; +pub const WS_EX_LAYOUTRTL: ::DWORD = 0x00400000; +pub const WS_EX_COMPOSITED: ::DWORD = 0x02000000; +pub const WS_EX_NOACTIVATE: ::DWORD = 0x08000000; +pub type NAMEENUMPROCA = Option<unsafe extern "system" fn(::LPSTR, ::LPARAM) -> ::BOOL>; +pub type NAMEENUMPROCW = Option<unsafe extern "system" fn(::LPWSTR, ::LPARAM) -> ::BOOL>; +pub type DESKTOPENUMPROCA = NAMEENUMPROCA; +pub type DESKTOPENUMPROCW = NAMEENUMPROCW; +pub type WINSTAENUMPROCA = NAMEENUMPROCA; +pub type WINSTAENUMPROCW = NAMEENUMPROCW; +pub type WNDENUMPROC = Option<unsafe extern "system" fn(::HWND, ::LPARAM) -> ::BOOL>; +pub type WNDPROC = Option<unsafe extern "system" fn( + ::HWND, ::UINT, ::WPARAM, ::LPARAM, +) -> ::LRESULT>; +pub type DLGPROC = Option<unsafe extern "system" fn( + ::HWND, ::UINT, ::WPARAM, ::LPARAM, +) -> ::INT_PTR>; +pub type HOOKPROC = Option<unsafe extern "system" fn( + code: ::c_int, wParam: ::WPARAM, lParam: ::LPARAM, +) -> ::LRESULT>; +pub type TimerProc = Option<unsafe extern "system" fn( + hwnd: ::HWND, uMsg: ::UINT, idEvent: ::UINT_PTR, dwTime: ::DWORD, +)>; +pub type DRAWSTATEPROC = Option<unsafe extern "system" fn( + ::HDC, ::LPARAM, ::WPARAM, ::c_int, ::c_int, +) -> ::BOOL>; +pub type PROPENUMPROCA = Option<unsafe extern "system" fn(::HWND, ::LPCSTR, ::HANDLE) -> ::BOOL>; +pub type PROPENUMPROCW = Option<unsafe extern "system" fn(::HWND, ::LPCWSTR, ::HANDLE) -> ::BOOL>; +pub type GRAYSTRINGPROC = Option<unsafe extern "system" fn(::HDC, ::LPARAM, ::c_int) -> ::BOOL>; +pub type MSGBOXCALLBACK = Option<unsafe extern "system" fn(LPHELPINFO)>; +pub type WINEVENTPROC = Option<unsafe extern "system" fn( + ::HWINEVENTHOOK, ::DWORD, ::HWND, ::LONG, ::LONG, ::DWORD, ::DWORD, +)>; +pub type HDEVNOTIFY = ::PVOID; +pub type MENUTEMPLATEA = ::VOID; +pub type MENUTEMPLATEW = ::VOID; +STRUCT!{struct MSG { + hwnd: ::HWND, + message: ::UINT, + wParam: ::WPARAM, + lParam: ::LPARAM, + time: ::DWORD, + pt: ::POINT, +}} +pub type PMSG = *mut MSG; +pub type NPMSG = *mut MSG; +pub type LPMSG = *mut MSG; +STRUCT!{struct PAINTSTRUCT { + hdc: ::HDC, + fErase: ::BOOL, + rcPaint: ::RECT, + fRestore: ::BOOL, + fIncUpdate: ::BOOL, + rgbReserved: [::BYTE; 32], +}} +pub type PPAINTSTRUCT = *mut PAINTSTRUCT; +pub type NPPAINTSTRUCT = *mut PAINTSTRUCT; +pub type LPPAINTSTRUCT = *mut PAINTSTRUCT; +STRUCT!{struct WINDOWPLACEMENT { + length: ::UINT, + flags: ::UINT, + showCmd: ::UINT, + ptMinPosition: ::POINT, + ptMaxPosition: ::POINT, + rcNormalPosition: ::RECT, +}} +pub type PWINDOWPLACEMENT = *mut WINDOWPLACEMENT; +pub type LPWINDOWPLACEMENT = *mut WINDOWPLACEMENT; +STRUCT!{nodebug struct WNDCLASSEXW { + cbSize: ::UINT, + style: ::UINT, + lpfnWndProc: WNDPROC, + cbClsExtra: ::c_int, + cbWndExtra: ::c_int, + hInstance: ::HINSTANCE, + hIcon: ::HICON, + hCursor: ::HCURSOR, + hbrBackground: ::HBRUSH, + lpszMenuName: ::LPCWSTR, + lpszClassName: ::LPCWSTR, + hIconSm: ::HICON, +}} +pub type PWNDCLASSEXW = *mut WNDCLASSEXW; +pub type NPWNDCLASSEXW = *mut WNDCLASSEXW; +pub type LPWNDCLASSEXW = *mut WNDCLASSEXW; +STRUCT!{nodebug struct WNDCLASSW { + style: ::UINT, + lpfnWndProc: WNDPROC, + cbClsExtra: ::c_int, + cbWndExtra: ::c_int, + hInstance: ::HINSTANCE, + hIcon: ::HICON, + hCursor: ::HCURSOR, + hbrBackground: ::HBRUSH, + lpszMenuName: ::LPCWSTR, + lpszClassName: ::LPCWSTR, +}} +pub type PWNDCLASSW = *mut WNDCLASSW; +pub type NPWNDCLASSW = *mut WNDCLASSW; +pub type LPWNDCLASSW = *mut WNDCLASSW; +STRUCT!{struct MINMAXINFO { + ptReserved: ::POINT, + ptMaxSize: ::POINT, + ptMaxPosition: ::POINT, + ptMinTrackSize: ::POINT, + ptMaxTrackSize: ::POINT, +}} +STRUCT!{struct SCROLLBARINFO { + cbSize: ::DWORD, + rcScrollBar: ::RECT, + dxyLineButton: ::c_int, + xyThumbTop: ::c_int, + xyThumbBottom: ::c_int, + reserved: ::c_int, + rgstate: [::DWORD; CCHILDREN_SCROLLBAR + 1], +}} +pub type PSCROLLBARINFO = *mut SCROLLBARINFO; +pub type LPSCROLLBARINFO = *mut SCROLLBARINFO; +STRUCT!{struct SCROLLINFO { + cbSize: ::UINT, + fMask: ::UINT, + nMin: ::c_int, + nMax: ::c_int, + nPage: ::UINT, + nPos: ::c_int, + nTrackPos: ::c_int, +}} +pub type LPSCROLLINFO = *mut SCROLLINFO; +pub type LPCSCROLLINFO = *const SCROLLINFO; +STRUCT!{struct SIZE { + cx: ::LONG, + cy: ::LONG, +}} +pub type PSIZE = *mut SIZE; +pub type LPSIZE = *mut SIZE; +pub type SIZEL = SIZE; +pub type PSIZEL = *mut SIZEL; +pub type LPSIZEL = *mut SIZEL; +//1913 +pub const UNICODE_NOCHAR: ::WPARAM = 0xffff; +pub type HDWP = *mut ::HANDLE; +//2193 +pub const WHEEL_DELTA: ::DWORD = 120; +//2206 +pub const XBUTTON1: ::DWORD = 0x0001; +pub const XBUTTON2: ::DWORD = 0x0002; +//2392 +pub const MK_LBUTTON: ::WPARAM = 0x0001; +pub const MK_RBUTTON: ::WPARAM = 0x0002; +pub const MK_SHIFT: ::WPARAM = 0x0004; +pub const MK_CONTROL: ::WPARAM = 0x0008; +pub const MK_MBUTTON: ::WPARAM = 0x0010; +pub const MK_XBUTTON1: ::WPARAM = 0x0020; +pub const MK_XBUTTON2: ::WPARAM = 0x0040; +//2408 +pub const TME_HOVER: ::DWORD = 0x0000_0001; +pub const TME_LEAVE: ::DWORD = 0x0000_0002; +pub const TME_NONCLIENT: ::DWORD = 0x0000_0010; +pub const TME_QUERY: ::DWORD = 0x4000_0000; +pub const TME_CANCEL: ::DWORD = 0x8000_0000; +pub const HWND_BROADCAST: ::HWND = 0xFFFF as ::HWND; +pub const HWND_MESSAGE: ::HWND = -3isize as ::HWND; +STRUCT!{struct TRACKMOUSEEVENT { + cbSize: ::DWORD, + dwFlags: ::DWORD, + hwndTrack: ::HWND, + dwHoverTime: ::DWORD, +}} +pub type LPTRACKMOUSEEVENT = *mut TRACKMOUSEEVENT; +//2575 +STRUCT!{nodebug struct WINDOWPOS { + hwnd: ::HWND, + hwndInsertAfter: ::HWND, + x: ::c_int, + y: ::c_int, + cx: ::c_int, + cy: ::c_int, + flags: ::UINT, +}} +pub type LPWINDOWPOS = *mut WINDOWPOS; +pub type PWINDOWPOS = *mut WINDOWPOS; +//3082 +STRUCT!{struct CREATESTRUCTA { + lpCreateParams: ::LPVOID, + hInstance: ::HINSTANCE, + hMenu: ::HMENU, + hwndParent: ::HWND, + cy: ::c_int, + cx: ::c_int, + y: ::c_int, + x: ::c_int, + style: ::LONG, + lpszName: ::LPCSTR, + lpszClass: ::LPCSTR, + dwExStyle: ::DWORD, +}} +pub type LPCREATESTRUCTA = *mut CREATESTRUCTA; +STRUCT!{struct CREATESTRUCTW { + lpCreateParams: ::LPVOID, + hInstance: ::HINSTANCE, + hMenu: ::HMENU, + hwndParent: ::HWND, + cy: ::c_int, + cx: ::c_int, + y: ::c_int, + x: ::c_int, + style: ::LONG, + lpszName: ::LPCWSTR, + lpszClass: ::LPCWSTR, + dwExStyle: ::DWORD, +}} +pub type LPCREATESTRUCTW = *mut CREATESTRUCTW; +//3145 +STRUCT!{struct NMHDR { + hwndFrom: ::HWND, + idFrom: ::UINT_PTR, + code: ::UINT, // NM_ code +}} +pub type LPNMHDR = *mut NMHDR; +//3400 +pub const PM_NOREMOVE: ::UINT = 0x0000; +pub const PM_REMOVE: ::UINT = 0x0001; +pub const PM_NOYIELD: ::UINT = 0x0002; +pub const PM_QS_INPUT: ::UINT = QS_INPUT << 16; +pub const PM_QS_POSTMESSAGE: ::UINT = (QS_POSTMESSAGE | QS_HOTKEY | QS_TIMER) << 16; +pub const PM_QS_PAINT: ::UINT = QS_PAINT << 16; +pub const PM_QS_SENDMESSAGE: ::UINT = QS_SENDMESSAGE << 16; +// +pub const LWA_COLORKEY: ::DWORD = 0x00000001; +pub const LWA_ALPHA: ::DWORD = 0x00000002; +//3469 +pub const EWX_LOGOFF: ::UINT = 0x00000000; +pub const EWX_SHUTDOWN: ::UINT = 0x00000001; +pub const EWX_REBOOT: ::UINT = 0x00000002; +pub const EWX_FORCE: ::UINT = 0x00000004; +pub const EWX_POWEROFF: ::UINT = 0x00000008; +pub const EWX_FORCEIFHUNG: ::UINT = 0x00000010; +pub const EWX_QUICKRESOLVE: ::UINT = 0x00000020; +pub const EWX_RESTARTAPPS: ::UINT = 0x00000040; +pub const EWX_HYBRID_SHUTDOWN: ::UINT = 0x00400000; +pub const EWX_BOOTOPTIONS: ::UINT = 0x01000000; +//4054 (Win 7 SDK) +STRUCT!{struct FLASHWINFO { + cbSize: ::UINT, + hwnd: ::HWND, + dwFlags: ::DWORD, + uCount: ::UINT, + dwTimeout: ::DWORD, +}} +pub type PFLASHWINFO = *mut FLASHWINFO; +pub const FLASHW_STOP: ::DWORD = 0; +pub const FLASHW_CAPTION: ::DWORD = 0x00000001; +pub const FLASHW_TRAY: ::DWORD = 0x00000002; +pub const FLASHW_ALL: ::DWORD = FLASHW_CAPTION | FLASHW_TRAY; +pub const FLASHW_TIMER: ::DWORD = 0x00000004; +pub const FLASHW_TIMERNOFG: ::DWORD = 0x0000000C; +//5499 +pub const MAPVK_VK_TO_VSC: ::UINT = 0; +pub const MAPVK_VSC_TO_VK: ::UINT = 1; +pub const MAPVK_VK_TO_CHAR: ::UINT = 2; +pub const MAPVK_VSC_TO_VK_EX: ::UINT = 3; +pub const MAPVK_VK_TO_VSC_EX: ::UINT = 4; +//5741 +pub const KEYEVENTF_EXTENDEDKEY: ::DWORD = 0x0001; +pub const KEYEVENTF_KEYUP: ::DWORD = 0x0002; +pub const KEYEVENTF_UNICODE: ::DWORD = 0x0004; +pub const KEYEVENTF_SCANCODE: ::DWORD = 0x0008; +pub const MOUSEEVENTF_MOVE: ::DWORD = 0x0001; +pub const MOUSEEVENTF_LEFTDOWN: ::DWORD = 0x0002; +pub const MOUSEEVENTF_LEFTUP: ::DWORD = 0x0004; +pub const MOUSEEVENTF_RIGHTDOWN: ::DWORD = 0x0008; +pub const MOUSEEVENTF_RIGHTUP: ::DWORD = 0x0010; +pub const MOUSEEVENTF_MIDDLEDOWN: ::DWORD = 0x0020; +pub const MOUSEEVENTF_MIDDLEUP: ::DWORD = 0x0040; +pub const MOUSEEVENTF_XDOWN: ::DWORD = 0x0080; +pub const MOUSEEVENTF_XUP: ::DWORD = 0x0100; +pub const MOUSEEVENTF_WHEEL: ::DWORD = 0x0800; +pub const MOUSEEVENTF_HWHEEL: ::DWORD = 0x01000; +pub const MOUSEEVENTF_MOVE_NOCOALESCE: ::DWORD = 0x2000; +pub const MOUSEEVENTF_VIRTUALDESK: ::DWORD = 0x4000; +pub const MOUSEEVENTF_ABSOLUTE: ::DWORD = 0x8000; +STRUCT!{struct MOUSEINPUT { + dx: ::LONG, + dy: ::LONG, + mouseData: ::DWORD, + dwFlags: ::DWORD, + time: ::DWORD, + dwExtraInfo: ::ULONG_PTR, +}} +pub type PMOUSEINPUT = *mut MOUSEINPUT; +pub type LPMOUSEINPUT = *mut MOUSEINPUT; +STRUCT!{struct KEYBDINPUT { + wVk: ::WORD, + wScan: ::WORD, + dwFlags: ::DWORD, + time: ::DWORD, + dwExtraInfo: ::ULONG_PTR, +}} +pub type PKEYBDINPUT = *mut KEYBDINPUT; +pub type LPKEYBDINPUT = *mut KEYBDINPUT; +STRUCT!{struct HARDWAREINPUT { + uMsg: ::DWORD, + wParamL: ::WORD, + wParamH: ::WORD, +}} +pub type PHARDWAREINPUT = *mut HARDWAREINPUT; +pub type LPHARDWAREINPUT= *mut HARDWAREINPUT; +pub const INPUT_MOUSE: ::DWORD = 0; +pub const INPUT_KEYBOARD: ::DWORD = 1; +pub const INPUT_HARDWARE: ::DWORD = 2; +#[cfg(target_arch = "x86")] +STRUCT!{struct INPUT { + type_: ::DWORD, + u: [u32; 6], +}} +#[cfg(target_arch = "x86_64")] +STRUCT!{struct INPUT { + type_: ::DWORD, + u: [u64; 4], +}} +UNION!{INPUT, u, mi, mi_mut, MOUSEINPUT} +UNION!{INPUT, u, ki, ki_mut, KEYBDINPUT} +UNION!{INPUT, u, hi, hi_mut, HARDWAREINPUT} +pub type PINPUT = *mut INPUT; +pub type LPINPUT = *mut INPUT; +// if WINVER >= 0x0601 +DECLARE_HANDLE!(HTOUCHINPUT, HTOUCHINPUT__); +STRUCT!{struct TOUCHINPUT { + x: ::LONG, + y: ::LONG, + hSource: ::HANDLE, + dwID: ::DWORD, + dwFlags: ::DWORD, + dwMask: ::DWORD, + dwTime: ::DWORD, + dwExtraInfo: ::ULONG_PTR, + cxContact: ::DWORD, + cyContact: ::DWORD, +}} +pub type PTOUCHINPUT = *mut TOUCHINPUT; +pub type PCTOUCHINPUT = *const TOUCHINPUT; +//Touch input flag values (TOUCHINPUT.dwFlags) +pub const TOUCHEVENTF_MOVE: ::DWORD = 0x0001; +pub const TOUCHEVENTF_DOWN: ::DWORD = 0x0002; +pub const TOUCHEVENTF_UP: ::DWORD = 0x0004; +pub const TOUCHEVENTF_INRANGE: ::DWORD = 0x0008; +pub const TOUCHEVENTF_PRIMARY: ::DWORD = 0x0010; +pub const TOUCHEVENTF_NOCOALESCE: ::DWORD = 0x0020; +pub const TOUCHEVENTF_PEN: ::DWORD = 0x0040; +pub const TOUCHEVENTF_PALM: ::DWORD = 0x0080; +//Touch input mask values (TOUCHINPUT.dwMask) +pub const TOUCHINPUTMASKF_TIMEFROMSYSTEM: ::DWORD = 0x0001; +pub const TOUCHINPUTMASKF_EXTRAINFO: ::DWORD = 0x0002; +pub const TOUCHINPUTMASKF_CONTACTAREA: ::DWORD = 0x0004; +//RegisterTouchWindow flag values +pub const TWF_FINETOUCH: ::ULONG = 0x00000001; +pub const TWF_WANTPALM: ::ULONG = 0x00000002; +// end if WINVER >= 0x0601 +//Indices for GetWindowLong etc. +pub const GWL_EXSTYLE: ::c_int = -20; +pub const GWL_STYLE: ::c_int = -16; +pub const GWL_WNDPROC: ::c_int = -4; +pub const GWLP_WNDPROC: ::c_int = -4; +pub const GWL_HINSTANCE: ::c_int = -6; +pub const GWLP_HINSTANCE: ::c_int = -6; +pub const GWL_HWNDPARENT: ::c_int = -8; +pub const GWLP_HWNDPARENT: ::c_int = -8; +pub const GWL_ID: ::c_int = -12; +pub const GWLP_ID: ::c_int = -12; +pub const GWL_USERDATA: ::c_int = -21; +pub const GWLP_USERDATA: ::c_int = -21; +//5976 +ENUM!{enum POINTER_INPUT_TYPE { + PT_POINTER = 0x00000001, + PT_TOUCH = 0x00000002, + PT_PEN = 0x00000003, + PT_MOUSE = 0x00000004, + PT_TOUCHPAD = 0x00000005, +}} +//6566 +// flags for MsgWaitForMultipleObjectsEx +pub const MWMO_WAITALL: ::DWORD = 0x0001; +pub const MWMO_ALERTABLE: ::DWORD = 0x0002; +pub const MWMO_INPUTAVAILABLE: ::DWORD = 0x0004; +//6573 +pub const QS_KEY: ::UINT = 0x0001; +pub const QS_MOUSEMOVE: ::UINT = 0x0002; +pub const QS_MOUSEBUTTON: ::UINT = 0x0004; +pub const QS_POSTMESSAGE: ::UINT = 0x0008; +pub const QS_TIMER: ::UINT = 0x0010; +pub const QS_PAINT: ::UINT = 0x0020; +pub const QS_SENDMESSAGE: ::UINT = 0x0040; +pub const QS_HOTKEY: ::UINT = 0x0080; +pub const QS_ALLPOSTMESSAGE: ::UINT = 0x0100; +pub const QS_RAWINPUT: ::UINT = 0x0400; +pub const QS_TOUCH: ::UINT = 0x0800; +pub const QS_POINTER: ::UINT = 0x1000; +pub const QS_MOUSE: ::UINT = QS_MOUSEMOVE | QS_MOUSEBUTTON; +pub const QS_INPUT: ::UINT = QS_MOUSE | QS_KEY | QS_RAWINPUT | QS_TOUCH | QS_POINTER; +pub const QS_ALLEVENTS: ::UINT = QS_INPUT | QS_POSTMESSAGE | QS_TIMER | QS_PAINT | QS_HOTKEY; +pub const QS_ALLINPUT: ::UINT = QS_INPUT | QS_POSTMESSAGE | QS_TIMER + | QS_PAINT | QS_HOTKEY | QS_SENDMESSAGE; +//6789 +pub const SM_CXSCREEN: ::c_int = 0; +pub const SM_CYSCREEN: ::c_int = 1; +pub const SM_CXVSCROLL: ::c_int = 2; +pub const SM_CYHSCROLL: ::c_int = 3; +pub const SM_CYCAPTION: ::c_int = 4; +pub const SM_CXBORDER: ::c_int = 5; +pub const SM_CYBORDER: ::c_int = 6; +pub const SM_CXDLGFRAME: ::c_int = 7; +pub const SM_CYDLGFRAME: ::c_int = 8; +pub const SM_CYVTHUMB: ::c_int = 9; +pub const SM_CXHTHUMB: ::c_int = 10; +pub const SM_CXICON: ::c_int = 11; +pub const SM_CYICON: ::c_int = 12; +pub const SM_CXCURSOR: ::c_int = 13; +pub const SM_CYCURSOR: ::c_int = 14; +pub const SM_CYMENU: ::c_int = 15; +pub const SM_CXFULLSCREEN: ::c_int = 16; +pub const SM_CYFULLSCREEN: ::c_int = 17; +pub const SM_CYKANJIWINDOW: ::c_int = 18; +pub const SM_MOUSEPRESENT: ::c_int = 19; +pub const SM_CYVSCROLL: ::c_int = 20; +pub const SM_CXHSCROLL: ::c_int = 21; +pub const SM_DEBUG: ::c_int = 22; +pub const SM_SWAPBUTTON: ::c_int = 23; +pub const SM_RESERVED1: ::c_int = 24; +pub const SM_RESERVED2: ::c_int = 25; +pub const SM_RESERVED3: ::c_int = 26; +pub const SM_RESERVED4: ::c_int = 27; +pub const SM_CXMIN: ::c_int = 28; +pub const SM_CYMIN: ::c_int = 29; +pub const SM_CXSIZE: ::c_int = 30; +pub const SM_CYSIZE: ::c_int = 31; +pub const SM_CXFRAME: ::c_int = 32; +pub const SM_CYFRAME: ::c_int = 33; +pub const SM_CXMINTRACK: ::c_int = 34; +pub const SM_CYMINTRACK: ::c_int = 35; +pub const SM_CXDOUBLECLK: ::c_int = 36; +pub const SM_CYDOUBLECLK: ::c_int = 37; +pub const SM_CXICONSPACING: ::c_int = 38; +pub const SM_CYICONSPACING: ::c_int = 39; +pub const SM_MENUDROPALIGNMENT: ::c_int = 40; +pub const SM_PENWINDOWS: ::c_int = 41; +pub const SM_DBCSENABLED: ::c_int = 42; +pub const SM_CMOUSEBUTTONS: ::c_int = 43; +pub const SM_CXFIXEDFRAME: ::c_int = SM_CXDLGFRAME; +pub const SM_CYFIXEDFRAME: ::c_int = SM_CYDLGFRAME; +pub const SM_CXSIZEFRAME: ::c_int = SM_CXFRAME; +pub const SM_CYSIZEFRAME: ::c_int = SM_CYFRAME; +pub const SM_SECURE: ::c_int = 44; +pub const SM_CXEDGE: ::c_int = 45; +pub const SM_CYEDGE: ::c_int = 46; +pub const SM_CXMINSPACING: ::c_int = 47; +pub const SM_CYMINSPACING: ::c_int = 48; +pub const SM_CXSMICON: ::c_int = 49; +pub const SM_CYSMICON: ::c_int = 50; +pub const SM_CYSMCAPTION: ::c_int = 51; +pub const SM_CXSMSIZE: ::c_int = 52; +pub const SM_CYSMSIZE: ::c_int = 53; +pub const SM_CXMENUSIZE: ::c_int = 54; +pub const SM_CYMENUSIZE: ::c_int = 55; +pub const SM_ARRANGE: ::c_int = 56; +pub const SM_CXMINIMIZED: ::c_int = 57; +pub const SM_CYMINIMIZED: ::c_int = 58; +pub const SM_CXMAXTRACK: ::c_int = 59; +pub const SM_CYMAXTRACK: ::c_int = 60; +pub const SM_CXMAXIMIZED: ::c_int = 61; +pub const SM_CYMAXIMIZED: ::c_int = 62; +pub const SM_NETWORK: ::c_int = 63; +pub const SM_CLEANBOOT: ::c_int = 67; +pub const SM_CXDRAG: ::c_int = 68; +pub const SM_CYDRAG: ::c_int = 69; +pub const SM_SHOWSOUNDS: ::c_int = 70; +pub const SM_CXMENUCHECK: ::c_int = 71; +pub const SM_CYMENUCHECK: ::c_int = 72; +pub const SM_SLOWMACHINE: ::c_int = 73; +pub const SM_MIDEASTENABLED: ::c_int = 74; +pub const SM_MOUSEWHEELPRESENT: ::c_int = 75; +pub const SM_XVIRTUALSCREEN: ::c_int = 76; +pub const SM_YVIRTUALSCREEN: ::c_int = 77; +pub const SM_CXVIRTUALSCREEN: ::c_int = 78; +pub const SM_CYVIRTUALSCREEN: ::c_int = 79; +pub const SM_CMONITORS: ::c_int = 80; +pub const SM_SAMEDISPLAYFORMAT: ::c_int = 81; +pub const SM_IMMENABLED: ::c_int = 82; +pub const SM_CXFOCUSBORDER: ::c_int = 83; +pub const SM_CYFOCUSBORDER: ::c_int = 84; +pub const SM_TABLETPC: ::c_int = 86; +pub const SM_MEDIACENTER: ::c_int = 87; +pub const SM_STARTER: ::c_int = 88; +pub const SM_SERVERR2: ::c_int = 89; +pub const SM_MOUSEHORIZONTALWHEELPRESENT: ::c_int = 91; +pub const SM_CXPADDEDBORDER: ::c_int = 92; +pub const SM_DIGITIZER: ::c_int = 94; +pub const SM_MAXIMUMTOUCHES: ::c_int = 95; +pub const SM_CMETRICS: ::c_int = 97; +pub const SM_REMOTESESSION: ::c_int = 0x1000; +pub const SM_SHUTTINGDOWN: ::c_int = 0x2000; +pub const SM_REMOTECONTROL: ::c_int = 0x2001; +pub const SM_CARETBLINKINGENABLED: ::c_int = 0x2002; +pub const SM_CONVERTIBLESLATEMODE: ::c_int = 0x2003; +pub const SM_SYSTEMDOCKED: ::c_int = 0x2004; +//8855 (Win 7 SDK) +STRUCT!{struct ICONINFO { + fIcon: ::BOOL, + xHotspot: ::DWORD, + yHotspot: ::DWORD, + hbmMask: ::HBITMAP, + hbmColor: ::HBITMAP, +}} +pub type PICONINFO = *mut ICONINFO; +//9066 +// Color indexes for use in GetSysColor and SetSysColor +// 0-18 (after incrementing) are also valid in RegisterClass's WNDCLASS +pub const COLOR_SCROLLBAR: ::c_int = 0; +pub const COLOR_BACKGROUND: ::c_int = 1; +pub const COLOR_ACTIVECAPTION: ::c_int = 2; +pub const COLOR_INACTIVECAPTION: ::c_int = 3; +pub const COLOR_MENU: ::c_int = 4; +pub const COLOR_WINDOW: ::c_int = 5; +pub const COLOR_WINDOWFRAME: ::c_int = 6; +pub const COLOR_MENUTEXT: ::c_int = 7; +pub const COLOR_WINDOWTEXT: ::c_int = 8; +pub const COLOR_CAPTIONTEXT: ::c_int = 9; +pub const COLOR_ACTIVEBORDER: ::c_int = 10; +pub const COLOR_INACTIVEBORDER: ::c_int = 11; +pub const COLOR_APPWORKSPACE: ::c_int = 12; +pub const COLOR_HIGHLIGHT: ::c_int = 13; +pub const COLOR_HIGHLIGHTTEXT: ::c_int = 14; +pub const COLOR_BTNFACE: ::c_int = 15; +pub const COLOR_BTNSHADOW: ::c_int = 16; +pub const COLOR_GRAYTEXT: ::c_int = 17; +pub const COLOR_BTNTEXT: ::c_int = 18; +pub const COLOR_INACTIVECAPTIONTEXT: ::c_int = 19; +pub const COLOR_BTNHIGHLIGHT: ::c_int = 20; +// Introduced in Windows 95 (winver 0x0400): +pub const COLOR_3DDKSHADOW: ::c_int = 21; +pub const COLOR_3DLIGHT: ::c_int = 22; +pub const COLOR_INFOTEXT: ::c_int = 23; +pub const COLOR_INFOBK: ::c_int = 24; +pub const COLOR_DESKTOP: ::c_int = COLOR_BACKGROUND; +pub const COLOR_3DFACE: ::c_int = COLOR_BTNFACE; +pub const COLOR_3DSHADOW: ::c_int = COLOR_BTNSHADOW; +pub const COLOR_3DHIGHLIGHT: ::c_int = COLOR_BTNHIGHLIGHT; +pub const COLOR_3DHILIGHT: ::c_int = COLOR_BTNHIGHLIGHT; +pub const COLOR_BTNHILIGHT: ::c_int = COLOR_BTNHIGHLIGHT; +// Introduced in Windows 2000 (winver 0x0500) +pub const COLOR_HOTLIGHT: ::c_int = 26; +pub const COLOR_GRADIENTACTIVECAPTION: ::c_int = 27; +pub const COLOR_GRADIENTINACTIVECAPTION: ::c_int = 28; +// Introduced in Windows XP (winver 0x0501) +pub const COLOR_MENUHILIGHT: ::c_int = 29; +pub const COLOR_MENUBAR: ::c_int = 30; +//10069 +pub const IDC_ARROW: ::LPCWSTR = 32512 as ::LPCWSTR; +pub const IDC_IBEAM: ::LPCWSTR = 32513 as ::LPCWSTR; +pub const IDC_WAIT: ::LPCWSTR = 32514 as ::LPCWSTR; +pub const IDC_CROSS: ::LPCWSTR = 32515 as ::LPCWSTR; +pub const IDC_UPARROW: ::LPCWSTR = 32516 as ::LPCWSTR; +pub const IDC_SIZE: ::LPCWSTR = 32640 as ::LPCWSTR; +pub const IDC_ICON: ::LPCWSTR = 32641 as ::LPCWSTR; +pub const IDC_SIZENWSE: ::LPCWSTR = 32642 as ::LPCWSTR; +pub const IDC_SIZENESW: ::LPCWSTR = 32643 as ::LPCWSTR; +pub const IDC_SIZEWE: ::LPCWSTR = 32644 as ::LPCWSTR; +pub const IDC_SIZENS: ::LPCWSTR = 32645 as ::LPCWSTR; +pub const IDC_SIZEALL: ::LPCWSTR = 32646 as ::LPCWSTR; +pub const IDC_NO: ::LPCWSTR = 32648 as ::LPCWSTR; +pub const IDC_HAND: ::LPCWSTR = 32649 as ::LPCWSTR; +pub const IDC_APPSTARTING: ::LPCWSTR = 32650 as ::LPCWSTR; +pub const IDC_HELP: ::LPCWSTR = 32651 as ::LPCWSTR; +//10492 +pub const IDI_APPLICATION: ::LPCWSTR = 32512 as ::LPCWSTR; +pub const IDI_HAND: ::LPCWSTR = 32513 as ::LPCWSTR; +pub const IDI_QUESTION: ::LPCWSTR = 32514 as ::LPCWSTR; +pub const IDI_EXCLAMATION: ::LPCWSTR = 32515 as ::LPCWSTR; +pub const IDI_ASTERISK: ::LPCWSTR = 32516 as ::LPCWSTR; +pub const IDI_WINLOGO: ::LPCWSTR = 32517 as ::LPCWSTR; +pub const IDI_SHIELD: ::LPCWSTR = 32518 as ::LPCWSTR; +pub const IDI_WARNING: ::LPCWSTR = IDI_EXCLAMATION; +pub const IDI_ERROR: ::LPCWSTR = IDI_HAND; +pub const IDI_INFORMATION: ::LPCWSTR = IDI_ASTERISK; +pub const SPI_GETBEEP: ::UINT = 0x0001; +pub const SPI_SETBEEP: ::UINT = 0x0002; +pub const SPI_GETMOUSE: ::UINT = 0x0003; +pub const SPI_SETMOUSE: ::UINT = 0x0004; +pub const SPI_GETBORDER: ::UINT = 0x0005; +pub const SPI_SETBORDER: ::UINT = 0x0006; +pub const SPI_GETKEYBOARDSPEED: ::UINT = 0x000A; +pub const SPI_SETKEYBOARDSPEED: ::UINT = 0x000B; +pub const SPI_LANGDRIVER: ::UINT = 0x000C; +pub const SPI_ICONHORIZONTALSPACING: ::UINT = 0x000D; +pub const SPI_GETSCREENSAVETIMEOUT: ::UINT = 0x000E; +pub const SPI_SETSCREENSAVETIMEOUT: ::UINT = 0x000F; +pub const SPI_GETSCREENSAVEACTIVE: ::UINT = 0x0010; +pub const SPI_SETSCREENSAVEACTIVE: ::UINT = 0x0011; +pub const SPI_GETGRIDGRANULARITY: ::UINT = 0x0012; +pub const SPI_SETGRIDGRANULARITY: ::UINT = 0x0013; +pub const SPI_SETDESKWALLPAPER: ::UINT = 0x0014; +pub const SPI_SETDESKPATTERN: ::UINT = 0x0015; +pub const SPI_GETKEYBOARDDELAY: ::UINT = 0x0016; +pub const SPI_SETKEYBOARDDELAY: ::UINT = 0x0017; +pub const SPI_ICONVERTICALSPACING: ::UINT = 0x0018; +pub const SPI_GETICONTITLEWRAP: ::UINT = 0x0019; +pub const SPI_SETICONTITLEWRAP: ::UINT = 0x001A; +pub const SPI_GETMENUDROPALIGNMENT: ::UINT = 0x001B; +pub const SPI_SETMENUDROPALIGNMENT: ::UINT = 0x001C; +pub const SPI_SETDOUBLECLKWIDTH: ::UINT = 0x001D; +pub const SPI_SETDOUBLECLKHEIGHT: ::UINT = 0x001E; +pub const SPI_GETICONTITLELOGFONT: ::UINT = 0x001F; +pub const SPI_SETDOUBLECLICKTIME: ::UINT = 0x0020; +pub const SPI_SETMOUSEBUTTONSWAP: ::UINT = 0x0021; +pub const SPI_SETICONTITLELOGFONT: ::UINT = 0x0022; +pub const SPI_GETFASTTASKSWITCH: ::UINT = 0x0023; +pub const SPI_SETFASTTASKSWITCH: ::UINT = 0x0024; +pub const SPI_SETDRAGFULLWINDOWS: ::UINT = 0x0025; +pub const SPI_GETDRAGFULLWINDOWS: ::UINT = 0x0026; +pub const SPI_GETNONCLIENTMETRICS: ::UINT = 0x0029; +pub const SPI_SETNONCLIENTMETRICS: ::UINT = 0x002A; +pub const SPI_GETMINIMIZEDMETRICS: ::UINT = 0x002B; +pub const SPI_SETMINIMIZEDMETRICS: ::UINT = 0x002C; +pub const SPI_GETICONMETRICS: ::UINT = 0x002D; +pub const SPI_SETICONMETRICS: ::UINT = 0x002E; +pub const SPI_SETWORKAREA: ::UINT = 0x002F; +pub const SPI_GETWORKAREA: ::UINT = 0x0030; +pub const SPI_SETPENWINDOWS: ::UINT = 0x0031; +pub const SPI_GETHIGHCONTRAST: ::UINT = 0x0042; +pub const SPI_SETHIGHCONTRAST: ::UINT = 0x0043; +pub const SPI_GETKEYBOARDPREF: ::UINT = 0x0044; +pub const SPI_SETKEYBOARDPREF: ::UINT = 0x0045; +pub const SPI_GETSCREENREADER: ::UINT = 0x0046; +pub const SPI_SETSCREENREADER: ::UINT = 0x0047; +pub const SPI_GETANIMATION: ::UINT = 0x0048; +pub const SPI_SETANIMATION: ::UINT = 0x0049; +pub const SPI_GETFONTSMOOTHING: ::UINT = 0x004A; +pub const SPI_SETFONTSMOOTHING: ::UINT = 0x004B; +pub const SPI_SETDRAGWIDTH: ::UINT = 0x004C; +pub const SPI_SETDRAGHEIGHT: ::UINT = 0x004D; +pub const SPI_SETHANDHELD: ::UINT = 0x004E; +pub const SPI_GETLOWPOWERTIMEOUT: ::UINT = 0x004F; +pub const SPI_GETPOWEROFFTIMEOUT: ::UINT = 0x0050; +pub const SPI_SETLOWPOWERTIMEOUT: ::UINT = 0x0051; +pub const SPI_SETPOWEROFFTIMEOUT: ::UINT = 0x0052; +pub const SPI_GETLOWPOWERACTIVE: ::UINT = 0x0053; +pub const SPI_GETPOWEROFFACTIVE: ::UINT = 0x0054; +pub const SPI_SETLOWPOWERACTIVE: ::UINT = 0x0055; +pub const SPI_SETPOWEROFFACTIVE: ::UINT = 0x0056; +pub const SPI_SETCURSORS: ::UINT = 0x0057; +pub const SPI_SETICONS: ::UINT = 0x0058; +pub const SPI_GETDEFAULTINPUTLANG: ::UINT = 0x0059; +pub const SPI_SETDEFAULTINPUTLANG: ::UINT = 0x005A; +pub const SPI_SETLANGTOGGLE: ::UINT = 0x005B; +pub const SPI_GETWINDOWSEXTENSION: ::UINT = 0x005C; +pub const SPI_SETMOUSETRAILS: ::UINT = 0x005D; +pub const SPI_GETMOUSETRAILS: ::UINT = 0x005E; +pub const SPI_SETSCREENSAVERRUNNING: ::UINT = 0x0061; +pub const SPI_SCREENSAVERRUNNING: ::UINT = SPI_SETSCREENSAVERRUNNING; +pub const SPI_GETFILTERKEYS: ::UINT = 0x0032; +pub const SPI_SETFILTERKEYS: ::UINT = 0x0033; +pub const SPI_GETTOGGLEKEYS: ::UINT = 0x0034; +pub const SPI_SETTOGGLEKEYS: ::UINT = 0x0035; +pub const SPI_GETMOUSEKEYS: ::UINT = 0x0036; +pub const SPI_SETMOUSEKEYS: ::UINT = 0x0037; +pub const SPI_GETSHOWSOUNDS: ::UINT = 0x0038; +pub const SPI_SETSHOWSOUNDS: ::UINT = 0x0039; +pub const SPI_GETSTICKYKEYS: ::UINT = 0x003A; +pub const SPI_SETSTICKYKEYS: ::UINT = 0x003B; +pub const SPI_GETACCESSTIMEOUT: ::UINT = 0x003C; +pub const SPI_SETACCESSTIMEOUT: ::UINT = 0x003D; +pub const SPI_GETSERIALKEYS: ::UINT = 0x003E; +pub const SPI_SETSERIALKEYS: ::UINT = 0x003F; +pub const SPI_GETSOUNDSENTRY: ::UINT = 0x0040; +pub const SPI_SETSOUNDSENTRY: ::UINT = 0x0041; +pub const SPI_GETSNAPTODEFBUTTON: ::UINT = 0x005F; +pub const SPI_SETSNAPTODEFBUTTON: ::UINT = 0x0060; +pub const SPI_GETMOUSEHOVERWIDTH: ::UINT = 0x0062; +pub const SPI_SETMOUSEHOVERWIDTH: ::UINT = 0x0063; +pub const SPI_GETMOUSEHOVERHEIGHT: ::UINT = 0x0064; +pub const SPI_SETMOUSEHOVERHEIGHT: ::UINT = 0x0065; +pub const SPI_GETMOUSEHOVERTIME: ::UINT = 0x0066; +pub const SPI_SETMOUSEHOVERTIME: ::UINT = 0x0067; +pub const SPI_GETWHEELSCROLLLINES: ::UINT = 0x0068; +pub const SPI_SETWHEELSCROLLLINES: ::UINT = 0x0069; +pub const SPI_GETMENUSHOWDELAY: ::UINT = 0x006A; +pub const SPI_SETMENUSHOWDELAY: ::UINT = 0x006B; +pub const SPI_GETWHEELSCROLLCHARS: ::UINT = 0x006C; +pub const SPI_SETWHEELSCROLLCHARS: ::UINT = 0x006D; +pub const SPI_GETSHOWIMEUI: ::UINT = 0x006E; +pub const SPI_SETSHOWIMEUI: ::UINT = 0x006F; +pub const SPI_GETMOUSESPEED: ::UINT = 0x0070; +pub const SPI_SETMOUSESPEED: ::UINT = 0x0071; +pub const SPI_GETSCREENSAVERRUNNING: ::UINT = 0x0072; +pub const SPI_GETDESKWALLPAPER: ::UINT = 0x0073; +pub const SPI_GETAUDIODESCRIPTION: ::UINT = 0x0074; +pub const SPI_SETAUDIODESCRIPTION: ::UINT = 0x0075; +pub const SPI_GETSCREENSAVESECURE: ::UINT = 0x0076; +pub const SPI_SETSCREENSAVESECURE: ::UINT = 0x0077; +pub const SPI_GETHUNGAPPTIMEOUT: ::UINT = 0x0078; +pub const SPI_SETHUNGAPPTIMEOUT: ::UINT = 0x0079; +pub const SPI_GETWAITTOKILLTIMEOUT: ::UINT = 0x007A; +pub const SPI_SETWAITTOKILLTIMEOUT: ::UINT = 0x007B; +pub const SPI_GETWAITTOKILLSERVICETIMEOUT: ::UINT = 0x007C; +pub const SPI_SETWAITTOKILLSERVICETIMEOUT: ::UINT = 0x007D; +pub const SPI_GETMOUSEDOCKTHRESHOLD: ::UINT = 0x007E; +pub const SPI_SETMOUSEDOCKTHRESHOLD: ::UINT = 0x007F; +pub const SPI_GETPENDOCKTHRESHOLD: ::UINT = 0x0080; +pub const SPI_SETPENDOCKTHRESHOLD: ::UINT = 0x0081; +pub const SPI_GETWINARRANGING: ::UINT = 0x0082; +pub const SPI_SETWINARRANGING: ::UINT = 0x0083; +pub const SPI_GETMOUSEDRAGOUTTHRESHOLD: ::UINT = 0x0084; +pub const SPI_SETMOUSEDRAGOUTTHRESHOLD: ::UINT = 0x0085; +pub const SPI_GETPENDRAGOUTTHRESHOLD: ::UINT = 0x0086; +pub const SPI_SETPENDRAGOUTTHRESHOLD: ::UINT = 0x0087; +pub const SPI_GETMOUSESIDEMOVETHRESHOLD: ::UINT = 0x0088; +pub const SPI_SETMOUSESIDEMOVETHRESHOLD: ::UINT = 0x0089; +pub const SPI_GETPENSIDEMOVETHRESHOLD: ::UINT = 0x008A; +pub const SPI_SETPENSIDEMOVETHRESHOLD: ::UINT = 0x008B; +pub const SPI_GETDRAGFROMMAXIMIZE: ::UINT = 0x008C; +pub const SPI_SETDRAGFROMMAXIMIZE: ::UINT = 0x008D; +pub const SPI_GETSNAPSIZING: ::UINT = 0x008E; +pub const SPI_SETSNAPSIZING: ::UINT = 0x008F; +pub const SPI_GETDOCKMOVING: ::UINT = 0x0090; +pub const SPI_SETDOCKMOVING: ::UINT = 0x0091; +pub const SPI_GETACTIVEWINDOWTRACKING: ::UINT = 0x1000; +pub const SPI_SETACTIVEWINDOWTRACKING: ::UINT = 0x1001; +pub const SPI_GETMENUANIMATION: ::UINT = 0x1002; +pub const SPI_SETMENUANIMATION: ::UINT = 0x1003; +pub const SPI_GETCOMBOBOXANIMATION: ::UINT = 0x1004; +pub const SPI_SETCOMBOBOXANIMATION: ::UINT = 0x1005; +pub const SPI_GETLISTBOXSMOOTHSCROLLING: ::UINT = 0x1006; +pub const SPI_SETLISTBOXSMOOTHSCROLLING: ::UINT = 0x1007; +pub const SPI_GETGRADIENTCAPTIONS: ::UINT = 0x1008; +pub const SPI_SETGRADIENTCAPTIONS: ::UINT = 0x1009; +pub const SPI_GETKEYBOARDCUES: ::UINT = 0x100A; +pub const SPI_SETKEYBOARDCUES: ::UINT = 0x100B; +pub const SPI_GETMENUUNDERLINES: ::UINT = SPI_GETKEYBOARDCUES; +pub const SPI_SETMENUUNDERLINES: ::UINT = SPI_SETKEYBOARDCUES; +pub const SPI_GETACTIVEWNDTRKZORDER: ::UINT = 0x100C; +pub const SPI_SETACTIVEWNDTRKZORDER: ::UINT = 0x100D; +pub const SPI_GETHOTTRACKING: ::UINT = 0x100E; +pub const SPI_SETHOTTRACKING: ::UINT = 0x100F; +pub const SPI_GETMENUFADE: ::UINT = 0x1012; +pub const SPI_SETMENUFADE: ::UINT = 0x1013; +pub const SPI_GETSELECTIONFADE: ::UINT = 0x1014; +pub const SPI_SETSELECTIONFADE: ::UINT = 0x1015; +pub const SPI_GETTOOLTIPANIMATION: ::UINT = 0x1016; +pub const SPI_SETTOOLTIPANIMATION: ::UINT = 0x1017; +pub const SPI_GETTOOLTIPFADE: ::UINT = 0x1018; +pub const SPI_SETTOOLTIPFADE: ::UINT = 0x1019; +pub const SPI_GETCURSORSHADOW: ::UINT = 0x101A; +pub const SPI_SETCURSORSHADOW: ::UINT = 0x101B; +pub const SPI_GETMOUSESONAR: ::UINT = 0x101C; +pub const SPI_SETMOUSESONAR: ::UINT = 0x101D; +pub const SPI_GETMOUSECLICKLOCK: ::UINT = 0x101E; +pub const SPI_SETMOUSECLICKLOCK: ::UINT = 0x101F; +pub const SPI_GETMOUSEVANISH: ::UINT = 0x1020; +pub const SPI_SETMOUSEVANISH: ::UINT = 0x1021; +pub const SPI_GETFLATMENU: ::UINT = 0x1022; +pub const SPI_SETFLATMENU: ::UINT = 0x1023; +pub const SPI_GETDROPSHADOW: ::UINT = 0x1024; +pub const SPI_SETDROPSHADOW: ::UINT = 0x1025; +pub const SPI_GETBLOCKSENDINPUTRESETS: ::UINT = 0x1026; +pub const SPI_SETBLOCKSENDINPUTRESETS: ::UINT = 0x1027; +pub const SPI_GETUIEFFECTS: ::UINT = 0x103E; +pub const SPI_SETUIEFFECTS: ::UINT = 0x103F; +pub const SPI_GETDISABLEOVERLAPPEDCONTENT: ::UINT = 0x1040; +pub const SPI_SETDISABLEOVERLAPPEDCONTENT: ::UINT = 0x1041; +pub const SPI_GETCLIENTAREAANIMATION: ::UINT = 0x1042; +pub const SPI_SETCLIENTAREAANIMATION: ::UINT = 0x1043; +pub const SPI_GETCLEARTYPE: ::UINT = 0x1048; +pub const SPI_SETCLEARTYPE: ::UINT = 0x1049; +pub const SPI_GETSPEECHRECOGNITION: ::UINT = 0x104A; +pub const SPI_SETSPEECHRECOGNITION: ::UINT = 0x104B; +pub const SPI_GETFOREGROUNDLOCKTIMEOUT: ::UINT = 0x2000; +pub const SPI_SETFOREGROUNDLOCKTIMEOUT: ::UINT = 0x2001; +pub const SPI_GETACTIVEWNDTRKTIMEOUT: ::UINT = 0x2002; +pub const SPI_SETACTIVEWNDTRKTIMEOUT: ::UINT = 0x2003; +pub const SPI_GETFOREGROUNDFLASHCOUNT: ::UINT = 0x2004; +pub const SPI_SETFOREGROUNDFLASHCOUNT: ::UINT = 0x2005; +pub const SPI_GETCARETWIDTH: ::UINT = 0x2006; +pub const SPI_SETCARETWIDTH: ::UINT = 0x2007; +pub const SPI_GETMOUSECLICKLOCKTIME: ::UINT = 0x2008; +pub const SPI_SETMOUSECLICKLOCKTIME: ::UINT = 0x2009; +pub const SPI_GETFONTSMOOTHINGTYPE: ::UINT = 0x200A; +pub const SPI_SETFONTSMOOTHINGTYPE: ::UINT = 0x200B; +pub const FE_FONTSMOOTHINGSTANDARD: ::UINT = 0x0001; +pub const FE_FONTSMOOTHINGCLEARTYPE: ::UINT = 0x0002; +pub const SPI_GETFONTSMOOTHINGCONTRAST: ::UINT = 0x200C; +pub const SPI_SETFONTSMOOTHINGCONTRAST: ::UINT = 0x200D; +pub const SPI_GETFOCUSBORDERWIDTH: ::UINT = 0x200E; +pub const SPI_SETFOCUSBORDERWIDTH: ::UINT = 0x200F; +pub const SPI_GETFOCUSBORDERHEIGHT: ::UINT = 0x2010; +pub const SPI_SETFOCUSBORDERHEIGHT: ::UINT = 0x2011; +pub const SPI_GETFONTSMOOTHINGORIENTATION: ::UINT = 0x2012; +pub const SPI_SETFONTSMOOTHINGORIENTATION: ::UINT = 0x2013; +pub const FE_FONTSMOOTHINGORIENTATIONBGR: ::UINT = 0x0000; +pub const FE_FONTSMOOTHINGORIENTATIONRGB: ::UINT = 0x0001; +pub const SPI_GETMINIMUMHITRADIUS: ::UINT = 0x2014; +pub const SPI_SETMINIMUMHITRADIUS: ::UINT = 0x2015; +pub const SPI_GETMESSAGEDURATION: ::UINT = 0x2016; +pub const SPI_SETMESSAGEDURATION: ::UINT = 0x2017; +//11264 +pub const CB_GETEDITSEL: ::UINT = 0x0140; +pub const CB_LIMITTEXT: ::UINT = 0x0141; +pub const CB_SETEDITSEL: ::UINT = 0x0142; +pub const CB_ADDSTRING: ::UINT = 0x0143; +pub const CB_DELETESTRING: ::UINT = 0x0144; +pub const CB_DIR: ::UINT = 0x0145; +pub const CB_GETCOUNT: ::UINT = 0x0146; +pub const CB_GETCURSEL: ::UINT = 0x0147; +pub const CB_GETLBTEXT: ::UINT = 0x0148; +pub const CB_GETLBTEXTLEN: ::UINT = 0x0149; +pub const CB_INSERTSTRING: ::UINT = 0x014A; +pub const CB_RESETCONTENT: ::UINT = 0x014B; +pub const CB_FINDSTRING: ::UINT = 0x014C; +pub const CB_SELECTSTRING: ::UINT = 0x014D; +pub const CB_SETCURSEL: ::UINT = 0x014E; +pub const CB_SHOWDROPDOWN: ::UINT = 0x014F; +pub const CB_GETITEMDATA: ::UINT = 0x0150; +pub const CB_SETITEMDATA: ::UINT = 0x0151; +pub const CB_GETDROPPEDCONTROLRECT: ::UINT = 0x0152; +pub const CB_SETITEMHEIGHT: ::UINT = 0x0153; +pub const CB_GETITEMHEIGHT: ::UINT = 0x0154; +pub const CB_SETEXTENDEDUI: ::UINT = 0x0155; +pub const CB_GETEXTENDEDUI: ::UINT = 0x0156; +pub const CB_GETDROPPEDSTATE: ::UINT = 0x0157; +pub const CB_FINDSTRINGEXACT: ::UINT = 0x0158; +pub const CB_SETLOCALE: ::UINT = 0x0159; +pub const CB_GETLOCALE: ::UINT = 0x015A; +pub const CB_GETTOPINDEX: ::UINT = 0x015b; +pub const CB_SETTOPINDEX: ::UINT = 0x015c; +pub const CB_GETHORIZONTALEXTENT: ::UINT = 0x015d; +pub const CB_SETHORIZONTALEXTENT: ::UINT = 0x015e; +pub const CB_GETDROPPEDWIDTH: ::UINT = 0x015f; +pub const CB_SETDROPPEDWIDTH: ::UINT = 0x0160; +pub const CB_INITSTORAGE: ::UINT = 0x0161; +//12141 +STRUCT!{nodebug struct NONCLIENTMETRICSA { + cbSize: ::UINT, + iBorderWidth: ::c_int, + iScrollWidth: ::c_int, + iScrollHeight: ::c_int, + iCaptionWidth: ::c_int, + iCaptionHeight: ::c_int, + lfCaptionFont: ::LOGFONTA, + iSmCaptionWidth: ::c_int, + iSmCaptionHeight: ::c_int, + lfSmCaptionFont: ::LOGFONTA, + iMenuWidth: ::c_int, + iMenuHeight: ::c_int, + lfMenuFont: ::LOGFONTA, + lfStatusFont: ::LOGFONTA, + lfMessageFont: ::LOGFONTA, + iPaddedBorderWidth: ::c_int, +}} +pub type LPNONCLIENTMETRICSA = *mut NONCLIENTMETRICSA; +STRUCT!{nodebug struct NONCLIENTMETRICSW { + cbSize: ::UINT, + iBorderWidth: ::c_int, + iScrollWidth: ::c_int, + iScrollHeight: ::c_int, + iCaptionWidth: ::c_int, + iCaptionHeight: ::c_int, + lfCaptionFont: ::LOGFONTW, + iSmCaptionWidth: ::c_int, + iSmCaptionHeight: ::c_int, + lfSmCaptionFont: ::LOGFONTW, + iMenuWidth: ::c_int, + iMenuHeight: ::c_int, + lfMenuFont: ::LOGFONTW, + lfStatusFont: ::LOGFONTW, + lfMessageFont: ::LOGFONTW, + iPaddedBorderWidth: ::c_int, +}} +pub type LPNONCLIENTMETRICSW = *mut NONCLIENTMETRICSW; +//12900 +pub const MONITORINFOF_PRIMARY: ::DWORD = 1; +pub const CCHDEVICENAME: usize = 32; +STRUCT!{struct MONITORINFO { + cbSize: ::DWORD, + rcMonitor: ::RECT, + rcWork: ::RECT, + dwFlags: ::DWORD, +}} +pub type LPMONITORINFO = *mut MONITORINFO; +STRUCT!{struct MONITORINFOEXA { + cbSize: ::DWORD, + rcMonitor: ::RECT, + rcWork: ::RECT, + dwFlags: ::DWORD, + szDevice: [::CHAR; ::CCHDEVICENAME], +}} +pub type LPMONITORINFOEXA = *mut MONITORINFOEXA; +STRUCT!{struct MONITORINFOEXW { + cbSize: ::DWORD, + rcMonitor: ::RECT, + rcWork: ::RECT, + dwFlags: ::DWORD, + szDevice: [::WCHAR; ::CCHDEVICENAME], +}} +pub type LPMONITORINFOEXW = *mut MONITORINFOEXW; +//12971 +pub type MONITORENUMPROC = Option<unsafe extern "system" fn( + ::HMONITOR, ::HDC, ::LPRECT, ::LPARAM, +) -> ::BOOL>; +//14098 +DECLARE_HANDLE!(HRAWINPUT, HRAWINPUT__); +pub fn GET_RAWINPUT_CODE_WPARAM(wParam: ::WPARAM) -> ::WPARAM { wParam & 0xff } +pub const RIM_INPUT: ::WPARAM = 0; +pub const RIM_INPUTSINK: ::WPARAM = 1; +STRUCT!{struct RAWINPUTHEADER { + dwType: ::DWORD, + dwSize: ::DWORD, + hDevice: ::HANDLE, + wParam: ::WPARAM, +}} +pub type PRAWINPUTHEADER = *mut RAWINPUTHEADER; +pub type LPRAWINPUTHEADER = *mut RAWINPUTHEADER; +pub const RIM_TYPEMOUSE: ::DWORD = 0; +pub const RIM_TYPEKEYBOARD: ::DWORD = 1; +pub const RIM_TYPEHID: ::DWORD = 2; +STRUCT!{struct RAWMOUSE { + usFlags: ::USHORT, + memory_padding: ::USHORT, // 16bit Padding for 32bit align in following union + usButtonFlags: ::USHORT, + usButtonData: ::USHORT, + ulRawButtons: ::ULONG, + lLastX: ::LONG, + lLastY: ::LONG, + ulExtraInformation: ::ULONG, +}} +pub type PRAWMOUSE = *mut RAWMOUSE; +pub type LPRAWMOUSE = *mut RAWMOUSE; +pub const RI_MOUSE_LEFT_BUTTON_DOWN: ::USHORT = 0x0001; +pub const RI_MOUSE_LEFT_BUTTON_UP: ::USHORT = 0x0002; +pub const RI_MOUSE_RIGHT_BUTTON_DOWN: ::USHORT = 0x0004; +pub const RI_MOUSE_RIGHT_BUTTON_UP: ::USHORT = 0x0008; +pub const RI_MOUSE_MIDDLE_BUTTON_DOWN: ::USHORT = 0x0010; +pub const RI_MOUSE_MIDDLE_BUTTON_UP: ::USHORT = 0x0020; +pub const RI_MOUSE_BUTTON_1_DOWN: ::USHORT = RI_MOUSE_LEFT_BUTTON_DOWN; +pub const RI_MOUSE_BUTTON_1_UP: ::USHORT = RI_MOUSE_LEFT_BUTTON_UP; +pub const RI_MOUSE_BUTTON_2_DOWN: ::USHORT = RI_MOUSE_RIGHT_BUTTON_DOWN; +pub const RI_MOUSE_BUTTON_2_UP: ::USHORT = RI_MOUSE_RIGHT_BUTTON_UP; +pub const RI_MOUSE_BUTTON_3_DOWN: ::USHORT = RI_MOUSE_MIDDLE_BUTTON_DOWN; +pub const RI_MOUSE_BUTTON_3_UP: ::USHORT = RI_MOUSE_MIDDLE_BUTTON_UP; +pub const RI_MOUSE_BUTTON_4_DOWN: ::USHORT = 0x0040; +pub const RI_MOUSE_BUTTON_4_UP: ::USHORT = 0x0080; +pub const RI_MOUSE_BUTTON_5_DOWN: ::USHORT = 0x0100; +pub const RI_MOUSE_BUTTON_5_UP: ::USHORT = 0x0200; +pub const RI_MOUSE_WHEEL: ::USHORT = 0x0400; +pub const MOUSE_MOVE_RELATIVE: ::USHORT = 0; +pub const MOUSE_MOVE_ABSOLUTE: ::USHORT = 1; +pub const MOUSE_VIRTUAL_DESKTOP: ::USHORT = 0x02; +pub const MOUSE_ATTRIBUTES_CHANGED: ::USHORT = 0x04; +pub const MOUSE_MOVE_NOCOALESCE: ::USHORT = 0x08; +STRUCT!{struct RAWKEYBOARD { + MakeCode: ::USHORT, + Flags: ::USHORT, + Reserved: ::USHORT, + VKey: ::USHORT, + Message: ::UINT, + ExtraInformation: ::ULONG, +}} +pub type PRAWKEYBOARD = *mut RAWKEYBOARD; +pub type LPRAWKEYBOARD = *mut RAWKEYBOARD; +pub const KEYBOARD_OVERRUN_MAKE_CODE: ::DWORD = 0xFF; +pub const RI_KEY_MAKE: ::DWORD = 0; +pub const RI_KEY_BREAK: ::DWORD = 1; +pub const RI_KEY_E0: ::DWORD = 2; +pub const RI_KEY_E1: ::DWORD = 4; +pub const RI_KEY_TERMSRV_SET_LED: ::DWORD = 8; +pub const RI_KEY_TERMSRV_SHADOW: ::DWORD = 0x10; +STRUCT!{struct RAWHID { + dwSizeHid: ::DWORD, + dwCount: ::DWORD, + bRawData: [::BYTE; 0], +}} +pub type PRAWHID = *mut RAWHID; +pub type LPRAWHID = *mut RAWHID; +STRUCT!{struct RAWINPUT { + header: RAWINPUTHEADER, + mouse: RAWMOUSE, +}} +UNION!(RAWINPUT, mouse, mouse, mouse_mut, RAWMOUSE); +UNION!(RAWINPUT, mouse, keyboard, keyboard_mut, RAWKEYBOARD); +UNION!(RAWINPUT, mouse, hid, hid_mut, RAWHID); +#[test] +fn test_RAWINPUT() { + use std::mem::{size_of, align_of}; + assert!(size_of::<RAWMOUSE>() >= size_of::<RAWMOUSE>()); + assert!(size_of::<RAWMOUSE>() >= size_of::<RAWKEYBOARD>()); + assert!(size_of::<RAWMOUSE>() >= size_of::<RAWHID>()); + assert!(align_of::<RAWMOUSE>() >= align_of::<RAWMOUSE>()); + assert!(align_of::<RAWMOUSE>() >= align_of::<RAWKEYBOARD>()); + assert!(align_of::<RAWMOUSE>() >= align_of::<RAWHID>()); +} +pub type PRAWINPUT = *mut RAWINPUT; +pub type LPRAWINPUT = *mut RAWINPUT; +pub const RID_INPUT: ::DWORD = 0x10000003; +pub const RID_HEADER: ::DWORD = 0x10000005; +pub const RIDI_PREPARSEDDATA: ::DWORD = 0x20000005; +pub const RIDI_DEVICENAME: ::DWORD = 0x20000007; +pub const RIDI_DEVICEINFO: ::DWORD = 0x2000000b; +STRUCT!{struct RID_DEVICE_INFO_MOUSE { + dwId: ::DWORD, + dwNumberOfButtons: ::DWORD, + dwSampleRate: ::DWORD, + fHasHorizontalWheel: ::BOOL, +}} +pub type PRID_DEVICE_INFO_MOUSE = *mut RID_DEVICE_INFO_MOUSE; +STRUCT!{struct RID_DEVICE_INFO_KEYBOARD { + dwType: ::DWORD, + dwSubType: ::DWORD, + dwKeyboardMode: ::DWORD, + dwNumberOfFunctionKeys: ::DWORD, + dwNumberOfIndicators: ::DWORD, + dwNumberOfKeysTotal: ::DWORD, +}} +pub type PRID_DEVICE_INFO_KEYBOARD = *mut RID_DEVICE_INFO_KEYBOARD; +STRUCT!{struct RID_DEVICE_INFO_HID { + dwVendorId: ::DWORD, + dwProductId: ::DWORD, + dwVersionNumber: ::DWORD, + usUsagePage: ::USHORT, + usUsage: ::USHORT, +}} +pub type PRID_DEVICE_INFO_HID = *mut RID_DEVICE_INFO_HID; +STRUCT!{struct RID_DEVICE_INFO { + cbSize: ::DWORD, + dwType: ::DWORD, + keyboard: RID_DEVICE_INFO_KEYBOARD, +}} +UNION!(RID_DEVICE_INFO, keyboard, mouse, mouse_mut, RID_DEVICE_INFO_MOUSE); +UNION!(RID_DEVICE_INFO, keyboard, keyboard, keyboard_mut, RID_DEVICE_INFO_KEYBOARD); +UNION!(RID_DEVICE_INFO, keyboard, hid, hid_mut, RID_DEVICE_INFO_HID); +#[test] +fn test_RID_DEVICE_INFO() { + use std::mem::{size_of, align_of}; + assert!(size_of::<RID_DEVICE_INFO_KEYBOARD>() >= size_of::<RID_DEVICE_INFO_MOUSE>()); + assert!(size_of::<RID_DEVICE_INFO_KEYBOARD>() >= size_of::<RID_DEVICE_INFO_KEYBOARD>()); + assert!(size_of::<RID_DEVICE_INFO_KEYBOARD>() >= size_of::<RID_DEVICE_INFO_HID>()); + assert!(align_of::<RID_DEVICE_INFO_KEYBOARD>() >= align_of::<RID_DEVICE_INFO_MOUSE>()); + assert!(align_of::<RID_DEVICE_INFO_KEYBOARD>() + >= align_of::<RID_DEVICE_INFO_KEYBOARD>()); + assert!(align_of::<RID_DEVICE_INFO_KEYBOARD>() >= align_of::<RID_DEVICE_INFO_HID>()); +} +pub type PRID_DEVICE_INFO = *mut RID_DEVICE_INFO; +pub type LPRID_DEVICE_INFO = *mut RID_DEVICE_INFO; +STRUCT!{struct RAWINPUTDEVICE { + usUsagePage: ::USHORT, + usUsage: ::USHORT, + dwFlags: ::DWORD, + hwndTarget: ::HWND, +}} +pub type PRAWINPUTDEVICE = *mut RAWINPUTDEVICE; +pub type LPRAWINPUTDEVICE = *mut RAWINPUTDEVICE; +pub type PCRAWINPUTDEVICE = *const RAWINPUTDEVICE; +pub const RIDEV_REMOVE: ::DWORD = 0x00000001; +pub const RIDEV_EXCLUDE: ::DWORD = 0x00000010; +pub const RIDEV_PAGEONLY: ::DWORD = 0x00000020; +pub const RIDEV_NOLEGACY: ::DWORD = 0x00000030; +pub const RIDEV_INPUTSINK: ::DWORD = 0x00000100; +pub const RIDEV_CAPTUREMOUSE: ::DWORD = 0x00000200; +pub const RIDEV_NOHOTKEYS: ::DWORD = 0x00000200; +pub const RIDEV_APPKEYS: ::DWORD = 0x00000400; +pub const RIDEV_EXINPUTSINK: ::DWORD = 0x00001000; +pub const RIDEV_DEVNOTIFY: ::DWORD = 0x00002000; +pub const RIDEV_EXMODEMASK: ::DWORD = 0x000000F0; +pub const GIDC_ARRIVAL: ::DWORD = 1; +pub const GIDC_REMOVAL: ::DWORD = 2; +STRUCT!{struct RAWINPUTDEVICELIST { + hDevice: ::HANDLE, + dwType: ::DWORD, +}} +pub type PRAWINPUTDEVICELIST = *mut RAWINPUTDEVICELIST; +STRUCT!{struct CHANGEFILTERSTRUCT { + cbSize: ::DWORD, + ExtStatus: ::DWORD, +}} +pub type PCHANGEFILTERSTRUCT = *mut CHANGEFILTERSTRUCT; +STRUCT!{struct DLGTEMPLATE { + style: ::DWORD, + dwExtendedStyle: ::DWORD, + cdit: ::WORD, + x: ::c_short, + y: ::c_short, + cx: ::c_short, + cy: ::c_short, +}} +pub type LPDLGTEMPLATEA = *mut DLGTEMPLATE; +pub type LPDLGTEMPLATEW = *mut DLGTEMPLATE; +pub type LPCDLGTEMPLATEA = *const DLGTEMPLATE; +pub type LPCDLGTEMPLATEW = *const DLGTEMPLATE; +STRUCT!{struct DRAWTEXTPARAMS { + cbSize: ::UINT, + iTabLength: ::c_int, + iLeftMargin: ::c_int, + iRightMargin: ::c_int, + uiLengthDrawn: ::UINT, +}} +pub type LPDRAWTEXTPARAMS = *mut DRAWTEXTPARAMS; +STRUCT!{struct ACCEL { + fVirt: ::BYTE, + key: ::WORD, + cmd: ::WORD, +}} +pub type LPACCEL = *mut ACCEL; +STRUCT!{struct MENUITEMINFOA { + cbSize: ::UINT, + fMask: ::UINT, + fType: ::UINT, + fState: ::UINT, + wID: ::UINT, + hSubMenu: ::HMENU, + hbmpChecked: ::HBITMAP, + hbmpUnchecked: ::HBITMAP, + dwItemData: ::ULONG_PTR, + dwTypeData: ::LPSTR, + cch: ::UINT, + hbmpItem: ::HBITMAP, +}} +pub type LPMENUITEMINFOA = *mut MENUITEMINFOA; +pub type LPCMENUITEMINFOA = *const MENUITEMINFOA; +STRUCT!{struct MENUITEMINFOW { + cbSize: ::UINT, + fMask: ::UINT, + fType: ::UINT, + fState: ::UINT, + wID: ::UINT, + hSubMenu: ::HMENU, + hbmpChecked: ::HBITMAP, + hbmpUnchecked: ::HBITMAP, + dwItemData: ::ULONG_PTR, + dwTypeData: ::LPWSTR, + cch: ::UINT, + hbmpItem: ::HBITMAP, +}} +pub type LPMENUITEMINFOW = *mut MENUITEMINFOW; +pub type LPCMENUITEMINFOW = *const MENUITEMINFOW; +STRUCT!{nodebug struct MSGBOXPARAMSA { + cbSize: ::UINT, + hwndOwner: ::HWND, + hInstance: ::HINSTANCE, + lpszText: ::LPCSTR, + lpszCaption: ::LPCSTR, + dwStyle: ::DWORD, + lpszIcon: ::LPCSTR, + dwContextHelpId: ::DWORD_PTR, + lpfnMsgBoxCallback: ::MSGBOXCALLBACK, + dwLanguageId: ::DWORD, +}} +pub type PMSGBOXPARAMSA = *mut MSGBOXPARAMSA; +pub type LPMSGBOXPARAMSA = *mut MSGBOXPARAMSA; +STRUCT!{nodebug struct MSGBOXPARAMSW { + cbSize: ::UINT, + hwndOwner: ::HWND, + hInstance: ::HINSTANCE, + lpszText: ::LPCWSTR, + lpszCaption: ::LPCWSTR, + dwStyle: ::DWORD, + lpszIcon: ::LPCWSTR, + dwContextHelpId: ::DWORD_PTR, + lpfnMsgBoxCallback: ::MSGBOXCALLBACK, + dwLanguageId: ::DWORD, +}} +pub type PMSGBOXPARAMSW = *mut MSGBOXPARAMSW; +pub type LPMSGBOXPARAMSW = *mut MSGBOXPARAMSW; +STRUCT!{struct HELPINFO { + cbSize: ::UINT, + iContextType: ::c_int, + iCtrlId: ::c_int, + hItemHandle: ::HANDLE, + dwContextId: ::DWORD, + MousePos: ::POINT, +}} +pub type LPHELPINFO = *mut HELPINFO; +pub fn GET_WHEEL_DELTA_WPARAM(wParam: ::WPARAM) -> ::c_short { + ::HIWORD(wParam as ::DWORD) as ::c_short +} +pub fn GET_KEYSTATE_WPARAM(wparam: ::WPARAM) -> ::c_int { + ::LOWORD(wparam as ::DWORD) as ::c_short as ::c_int +} +pub fn GET_XBUTTON_WPARAM(wparam: ::WPARAM) -> ::c_int { + ::HIWORD(wparam as ::DWORD) as ::c_int +} +pub const SIF_RANGE: ::UINT = 0x0001; +pub const SIF_PAGE: ::UINT = 0x0002; +pub const SIF_POS: ::UINT = 0x0004; +pub const SIF_DISABLENOSCROLL: ::UINT = 0x0008; +pub const SIF_TRACKPOS: ::UINT = 0x0010; +pub const SIF_ALL: ::UINT = SIF_RANGE | SIF_PAGE | SIF_POS | SIF_TRACKPOS; +pub const SW_SCROLLCHILDREN: ::UINT = 0x0001; +pub const SW_INVALIDATE: ::UINT = 0x0002; +pub const SW_ERASE: ::UINT = 0x0004; +pub const SW_SMOOTHSCROLL: ::UINT = 0x0010; +pub const SB_LINEUP: ::c_int = 0; +pub const SB_LINELEFT: ::c_int = 0; +pub const SB_LINEDOWN: ::c_int = 1; +pub const SB_LINERIGHT: ::c_int = 1; +pub const SB_PAGEUP: ::c_int = 2; +pub const SB_PAGELEFT: ::c_int = 2; +pub const SB_PAGEDOWN: ::c_int = 3; +pub const SB_PAGERIGHT: ::c_int = 3; +pub const SB_THUMBPOSITION: ::c_int = 4; +pub const SB_THUMBTRACK: ::c_int = 5; +pub const SB_TOP: ::c_int = 6; +pub const SB_LEFT: ::c_int = 6; +pub const SB_BOTTOM: ::c_int = 7; +pub const SB_RIGHT: ::c_int = 7; +pub const SB_ENDSCROLL: ::c_int = 8; +pub const LR_DEFAULTCOLOR: ::UINT = 0x00000000; +pub const LR_MONOCHROME: ::UINT = 0x00000001; +pub const LR_COLOR: ::UINT = 0x00000002; +pub const LR_COPYRETURNORG: ::UINT = 0x00000004; +pub const LR_COPYDELETEORG: ::UINT = 0x00000008; +pub const LR_LOADFROMFILE: ::UINT = 0x00000010; +pub const LR_LOADTRANSPARENT: ::UINT = 0x00000020; +pub const LR_DEFAULTSIZE: ::UINT = 0x00000040; +pub const LR_VGACOLOR: ::UINT = 0x00000080; +pub const LR_LOADMAP3DCOLORS: ::UINT = 0x00001000; +pub const LR_CREATEDIBSECTION: ::UINT = 0x00002000; +pub const LR_COPYFROMRESOURCE: ::UINT = 0x00004000; +pub const LR_SHARED: ::UINT = 0x00008000; +pub const IMAGE_BITMAP: ::UINT = 0; +pub const IMAGE_ICON: ::UINT = 1; +pub const IMAGE_CURSOR: ::UINT = 2; +pub const IMAGE_ENHMETAFILE: ::UINT = 3; +pub const DT_TOP: ::UINT = 0x00000000; +pub const DT_LEFT: ::UINT = 0x00000000; +pub const DT_CENTER: ::UINT = 0x00000001; +pub const DT_RIGHT: ::UINT = 0x00000002; +pub const DT_VCENTER: ::UINT = 0x00000004; +pub const DT_BOTTOM: ::UINT = 0x00000008; +pub const DT_WORDBREAK: ::UINT = 0x00000010; +pub const DT_SINGLELINE: ::UINT = 0x00000020; +pub const DT_EXPANDTABS: ::UINT = 0x00000040; +pub const DT_TABSTOP: ::UINT = 0x00000080; +pub const DT_NOCLIP: ::UINT = 0x00000100; +pub const DT_EXTERNALLEADING: ::UINT = 0x00000200; +pub const DT_CALCRECT: ::UINT = 0x00000400; +pub const DT_NOPREFIX: ::UINT = 0x00000800; +pub const DT_INTERNAL: ::UINT = 0x00001000; +pub const DT_EDITCONTROL: ::UINT = 0x00002000; +pub const DT_PATH_ELLIPSIS: ::UINT = 0x00004000; +pub const DT_END_ELLIPSIS: ::UINT = 0x00008000; +pub const DT_MODIFYSTRING: ::UINT = 0x00010000; +pub const DT_RTLREADING: ::UINT = 0x00020000; +pub const DT_WORD_ELLIPSIS: ::UINT = 0x00040000; +pub const DT_NOFULLWIDTHCHARBREAK: ::UINT = 0x00080000; +pub const DT_HIDEPREFIX: ::UINT = 0x00100000; +pub const DT_PREFIXONLY: ::UINT = 0x00200000; +STRUCT!{struct KBDLLHOOKSTRUCT { + vkCode: ::DWORD, + scanCode: ::DWORD, + flags: ::DWORD, + time: ::DWORD, + dwExtraInfo: ::ULONG_PTR, +}} +pub type PKBDLLHOOKSTRUCT = *mut KBDLLHOOKSTRUCT; +pub type LPKBDLLHOOKSTRUCT = *mut KBDLLHOOKSTRUCT; +STRUCT!{struct MSLLHOOKSTRUCT { + pt: ::POINT, + mouseData: ::DWORD, + flags: ::DWORD, + time: ::DWORD, + dwExtraInfo: ::ULONG_PTR, +}} +pub type PMSLLHOOKSTRUCT = *mut MSLLHOOKSTRUCT; +pub type LPMSLLHOOKSTRUCT = *mut MSLLHOOKSTRUCT; +pub const WH_MIN: ::c_int = -1; +pub const WH_MSGFILTER: ::c_int = -1; +pub const WH_JOURNALRECORD: ::c_int = 0; +pub const WH_JOURNALPLAYBACK: ::c_int = 1; +pub const WH_KEYBOARD: ::c_int = 2; +pub const WH_GETMESSAGE: ::c_int = 3; +pub const WH_CALLWNDPROC: ::c_int = 4; +pub const WH_CBT: ::c_int = 5; +pub const WH_SYSMSGFILTER: ::c_int = 6; +pub const WH_MOUSE: ::c_int = 7; +pub const WH_HARDWARE: ::c_int = 8; +pub const WH_DEBUG: ::c_int = 9; +pub const WH_SHELL: ::c_int = 10; +pub const WH_FOREGROUNDIDLE: ::c_int = 11; +pub const WH_CALLWNDPROCRET: ::c_int = 12; +pub const WH_KEYBOARD_LL: ::c_int = 13; +pub const WH_MOUSE_LL: ::c_int = 14; +pub const WH_MAX: ::c_int = 14; +pub const WH_MINHOOK: ::c_int = WH_MIN; +pub const WH_MAXHOOK: ::c_int = WH_MAX; +pub const KLF_ACTIVATE: ::UINT = 1; +pub const KLF_SUBSTITUTE_OK: ::UINT = 2; +pub const KLF_UNLOADPREVIOUS: ::UINT = 4; +pub const KLF_REORDER: ::UINT = 8; +pub const KLF_REPLACELANG: ::UINT = 16; +pub const KLF_NOTELLSHELL: ::UINT = 128; +pub const KLF_SETFORPROCESS: ::UINT = 256; +//RedrawWindow() flags +pub const RDW_INVALIDATE: ::UINT = 0x0001; +pub const RDW_INTERNALPAINT: ::UINT = 0x0002; +pub const RDW_ERASE: ::UINT = 0x0004; +pub const RDW_VALIDATE: ::UINT = 0x0008; +pub const RDW_NOINTERNALPAINT: ::UINT = 0x0010; +pub const RDW_NOERASE: ::UINT = 0x0020; +pub const RDW_NOCHILDREN: ::UINT = 0x0040; +pub const RDW_ALLCHILDREN: ::UINT = 0x0080; +pub const RDW_UPDATENOW: ::UINT = 0x0100; +pub const RDW_ERASENOW: ::UINT = 0x0200; +pub const RDW_FRAME: ::UINT = 0x0400; +pub const RDW_NOFRAME: ::UINT = 0x0800; +STRUCT!{struct MEASUREITEMSTRUCT { + CtlType: ::UINT, + CtlID: ::UINT, + itemID: ::UINT, + itemWidth: ::UINT, + itemHeight: ::UINT, + itemData: ::ULONG_PTR, +}} +pub type LPMEASUREITEMSTRUCT = *mut MEASUREITEMSTRUCT; +STRUCT!{struct DRAWITEMSTRUCT { + CtlType: ::UINT, + CtlID: ::UINT, + itemID: ::UINT, + itemAction: ::UINT, + itemState: ::UINT, + hwndItem: ::HWND, + hDC: ::HDC, + rcItem: ::RECT, + itemData: ::ULONG_PTR, +}} +pub type LPDRAWITEMSTRUCT = *mut DRAWITEMSTRUCT; +STRUCT!{struct DELETEITEMSTRUCT { + CtlType: ::UINT, + CtlID: ::UINT, + itemID: ::UINT, + hwndItem: ::HWND, + itemData: ::ULONG_PTR, +}} +pub type LPDELETEITEMSTRUCT = *mut DELETEITEMSTRUCT; +STRUCT!{struct COMPAREITEMSTRUCT { + CtlType: ::UINT, + CtlID: ::UINT, + hwndItem: ::HWND, + itemID1: ::UINT, + itemData1: ::ULONG_PTR, + itemID2: ::UINT, + itemData2: ::ULONG_PTR, + dwLocaleId: ::DWORD, +}} +pub type LPCOMPAREITEMSTRUCT = *mut COMPAREITEMSTRUCT; +/* Image type */ +pub const DST_COMPLEX: ::UINT = 0x0000; +pub const DST_TEXT: ::UINT = 0x0001; +pub const DST_PREFIXTEXT: ::UINT = 0x0002; +pub const DST_ICON: ::UINT = 0x0003; +pub const DST_BITMAP: ::UINT = 0x0004; +pub const DI_MASK: ::UINT = 0x0001; +pub const DI_IMAGE: ::UINT = 0x0002; +pub const DI_NORMAL: ::UINT = 0x0003; +pub const DI_COMPAT: ::UINT = 0x0004; +pub const DI_DEFAULTSIZE: ::UINT = 0x0008; +// if WINVER >= 0x0601 +// GetSystemMetrics(SM_DIGITIZER) flag values +pub const NID_INTEGRATED_TOUCH: ::UINT = 0x00000001; +pub const NID_EXTERNAL_TOUCH: ::UINT = 0x00000002; +pub const NID_INTEGRATED_PEN: ::UINT = 0x00000004; +pub const NID_EXTERNAL_PEN: ::UINT = 0x00000008; +pub const NID_MULTI_INPUT: ::UINT = 0x00000040; +pub const NID_READY: ::UINT = 0x00000080; +// end if WINVER >= 0x0601 + + diff --git a/deps/winapi-0.2.6/src/ws2def.rs b/deps/winapi-0.2.6/src/ws2def.rs new file mode 100644 index 000000000..dcc4aaa6f --- /dev/null +++ b/deps/winapi-0.2.6/src/ws2def.rs @@ -0,0 +1,279 @@ +// Copyright © 2015, Peter Atashian +// Licensed under the MIT License <LICENSE.md> +//! This file contains the core definitions for the Winsock2 specification that can be used by +//! both user-mode and kernel mode modules. +pub type ADDRESS_FAMILY = ::USHORT; +pub const AF_UNSPEC: ::c_int = 0; +pub const AF_UNIX: ::c_int = 1; +pub const AF_INET: ::c_int = 2; +pub const AF_IMPLINK: ::c_int = 3; +pub const AF_PUP: ::c_int = 4; +pub const AF_CHAOS: ::c_int = 5; +pub const AF_NS: ::c_int = 6; +pub const AF_IPX: ::c_int = AF_NS; +pub const AF_ISO: ::c_int = 7; +pub const AF_OSI: ::c_int = AF_ISO; +pub const AF_ECMA: ::c_int = 8; +pub const AF_DATAKIT: ::c_int = 9; +pub const AF_CCITT: ::c_int = 10; +pub const AF_SNA: ::c_int = 11; +pub const AF_DECnet: ::c_int = 12; +pub const AF_DLI: ::c_int = 13; +pub const AF_LAT: ::c_int = 14; +pub const AF_HYLINK: ::c_int = 15; +pub const AF_APPLETALK: ::c_int = 16; +pub const AF_NETBIOS: ::c_int = 17; +pub const AF_VOICEVIEW: ::c_int = 18; +pub const AF_FIREFOX: ::c_int = 19; +pub const AF_UNKNOWN1: ::c_int = 20; +pub const AF_BAN: ::c_int = 21; +pub const AF_ATM: ::c_int = 22; +pub const AF_INET6: ::c_int = 23; +pub const AF_CLUSTER: ::c_int = 24; +pub const AF_12844: ::c_int = 25; +pub const AF_IRDA: ::c_int = 26; +pub const AF_NETDES: ::c_int = 28; +pub const AF_TCNPROCESS: ::c_int = 29; +pub const AF_TCNMESSAGE: ::c_int = 30; +pub const AF_ICLFXBM: ::c_int = 31; +pub const AF_BTH: ::c_int = 32; +pub const AF_LINK: ::c_int = 33; +pub const AF_MAX: ::c_int = 34; +pub const SOCK_STREAM: ::c_int = 1; +pub const SOCK_DGRAM: ::c_int = 2; +pub const SOCK_RAW: ::c_int = 3; +pub const SOCK_RDM: ::c_int = 4; +pub const SOCK_SEQPACKET: ::c_int = 5; +pub const SOL_SOCKET: ::c_int = 0xffff; +pub const SO_DEBUG: ::c_int = 0x0001; +pub const SO_ACCEPTCONN: ::c_int = 0x0002; +pub const SO_REUSEADDR: ::c_int = 0x0004; +pub const SO_KEEPALIVE: ::c_int = 0x0008; +pub const SO_DONTROUTE: ::c_int = 0x0010; +pub const SO_BROADCAST: ::c_int = 0x0020; +pub const SO_USELOOPBACK: ::c_int = 0x0040; +pub const SO_LINGER: ::c_int = 0x0080; +pub const SO_OOBINLINE: ::c_int = 0x0100; +pub const SO_DONTLINGER: ::c_int = !SO_LINGER; +pub const SO_EXCLUSIVEADDRUSE: ::c_int = !SO_REUSEADDR; +pub const SO_SNDBUF: ::c_int = 0x1001; +pub const SO_RCVBUF: ::c_int = 0x1002; +pub const SO_SNDLOWAT: ::c_int = 0x1003; +pub const SO_RCVLOWAT: ::c_int = 0x1004; +pub const SO_SNDTIMEO: ::c_int = 0x1005; +pub const SO_RCVTIMEO: ::c_int = 0x1006; +pub const SO_ERROR: ::c_int = 0x1007; +pub const SO_TYPE: ::c_int = 0x1008; +pub const SO_BSP_STATE: ::c_int = 0x1009; +pub const SO_GROUP_ID: ::c_int = 0x2001; +pub const SO_GROUP_PRIORITY: ::c_int = 0x2002; +pub const SO_MAX_MSG_SIZE: ::c_int = 0x2003; +pub const SO_CONDITIONAL_ACCEPT: ::c_int = 0x3002; +pub const SO_PAUSE_ACCEPT: ::c_int = 0x3003; +pub const SO_COMPARTMENT_ID: ::c_int = 0x3004; +pub const SO_RANDOMIZE_PORT: ::c_int = 0x3005; +pub const SO_PORT_SCALABILITY: ::c_int = 0x3006; +pub const WSK_SO_BASE: ::c_int = 0x4000; +pub const TCP_NODELAY: ::c_int = 0x0001; +STRUCT!{struct SOCKADDR { + sa_family: ADDRESS_FAMILY, + sa_data: [::CHAR; 14], +}} +pub type PSOCKADDR = *mut SOCKADDR; +pub type LPSOCKADDR = *mut SOCKADDR; +STRUCT!{struct SOCKET_ADDRESS { + lpSockaddr: LPSOCKADDR, + iSockaddrLength: ::INT, +}} +pub type PSOCKET_ADDRESS = *mut SOCKET_ADDRESS; +pub type LPSOCKET_ADDRESS = *mut SOCKET_ADDRESS; +STRUCT!{nodebug struct SOCKET_ADDRESS_LIST { + iAddressCount: ::INT, + Address: [SOCKET_ADDRESS; 0], +}} +pub type PSOCKET_ADDRESS_LIST = *mut SOCKET_ADDRESS_LIST; +pub type LPSOCKET_ADDRESS_LIST = *mut SOCKET_ADDRESS_LIST; +STRUCT!{struct CSADDR_INFO { + LocalAddr: SOCKET_ADDRESS, + RemoteAddr: SOCKET_ADDRESS, + iSocketType: ::INT, + iProtocol: ::INT, +}} +pub type PCSADDR_INFO = *mut CSADDR_INFO; +pub type LPCSADDR_INFO = *mut CSADDR_INFO; +STRUCT!{nodebug struct SOCKADDR_STORAGE_LH { + ss_family: ADDRESS_FAMILY, + __ss_pad1: [::CHAR; 6], + __ss_align: ::__int64, + __ss_pad2: [::CHAR; 112], +}} +pub type PSOCKADDR_STORAGE_LH = *mut SOCKADDR_STORAGE_LH; +pub type LPSOCKADDR_STORAGE_LH = *mut SOCKADDR_STORAGE_LH; +STRUCT!{nodebug struct SOCKADDR_STORAGE_XP { + ss_family: ::c_short, + __ss_pad1: [::CHAR; 6], + __ss_align: ::__int64, + __ss_pad2: [::CHAR; 112], +}} +pub type PSOCKADDR_STORAGE_XP = *mut SOCKADDR_STORAGE_XP; +pub type LPSOCKADDR_STORAGE_XP = *mut SOCKADDR_STORAGE_XP; +pub type SOCKADDR_STORAGE = SOCKADDR_STORAGE_LH; +pub type PSOCKADDR_STORAGE = *mut SOCKADDR_STORAGE; +pub type LPSOCKADDR_STORAGE = *mut SOCKADDR_STORAGE; +STRUCT!{struct SOCKET_PROCESSOR_AFFINITY { + Processor: ::PROCESSOR_NUMBER, + NumaNodeId: ::USHORT, + Reserved: ::USHORT, +}} +pub type PSOCKET_PROCESSOR_AFFINITY = *mut SOCKET_PROCESSOR_AFFINITY; +pub const IOC_UNIX: ::DWORD = 0x00000000; +pub const IOC_WS2: ::DWORD = 0x08000000; +pub const IOC_PROTOCOL: ::DWORD = 0x10000000; +pub const IOC_VENDOR: ::DWORD = 0x18000000; +pub const IOC_WSK: ::DWORD = IOC_WS2 | 0x07000000; +macro_rules! _WSAIO { ($x:expr, $y:expr) => { IOC_VOID | $x | $y } } +macro_rules! _WSAIOR { ($x:expr, $y:expr) => { IOC_OUT | $x | $y } } +macro_rules! _WSAIOW { ($x:expr, $y:expr) => { IOC_IN | $x | $y } } +macro_rules! _WSAIORW { ($x:expr, $y:expr) => { IOC_INOUT | $x | $y } } +pub const SIO_ASSOCIATE_HANDLE: ::DWORD = _WSAIOW!(IOC_WS2, 1); +pub const SIO_ENABLE_CIRCULAR_QUEUEING: ::DWORD = _WSAIO!(IOC_WS2, 2); +pub const SIO_FIND_ROUTE: ::DWORD = _WSAIOR!(IOC_WS2, 3); +pub const SIO_FLUSH: ::DWORD = _WSAIO!(IOC_WS2, 4); +pub const SIO_GET_BROADCAST_ADDRESS: ::DWORD = _WSAIOR!(IOC_WS2, 5); +pub const SIO_GET_EXTENSION_FUNCTION_POINTER: ::DWORD = _WSAIORW!(IOC_WS2, 6); +pub const SIO_GET_QOS: ::DWORD = _WSAIORW!(IOC_WS2, 7); +pub const SIO_GET_GROUP_QOS: ::DWORD = _WSAIORW!(IOC_WS2, 8); +pub const SIO_MULTIPOINT_LOOPBACK: ::DWORD = _WSAIOW!(IOC_WS2, 9); +pub const SIO_MULTICAST_SCOPE: ::DWORD = _WSAIOW!(IOC_WS2, 10); +pub const SIO_SET_QOS: ::DWORD = _WSAIOW!(IOC_WS2, 11); +pub const SIO_SET_GROUP_QOS: ::DWORD = _WSAIOW!(IOC_WS2, 12); +pub const SIO_TRANSLATE_HANDLE: ::DWORD = _WSAIORW!(IOC_WS2, 13); +pub const SIO_ROUTING_INTERFACE_QUERY: ::DWORD = _WSAIORW!(IOC_WS2, 20); +pub const SIO_ROUTING_INTERFACE_CHANGE: ::DWORD = _WSAIOW!(IOC_WS2, 21); +pub const SIO_ADDRESS_LIST_QUERY: ::DWORD = _WSAIOR!(IOC_WS2, 22); +pub const SIO_ADDRESS_LIST_CHANGE: ::DWORD = _WSAIO!(IOC_WS2, 23); +pub const SIO_QUERY_TARGET_PNP_HANDLE: ::DWORD = _WSAIOR!(IOC_WS2, 24); +pub const SIO_QUERY_RSS_PROCESSOR_INFO: ::DWORD = _WSAIOR!(IOC_WS2, 37); +pub const SIO_ADDRESS_LIST_SORT: ::DWORD = _WSAIORW!(IOC_WS2, 25); +pub const SIO_RESERVED_1: ::DWORD = _WSAIOW!(IOC_WS2, 26); +pub const SIO_RESERVED_2: ::DWORD = _WSAIOW!(IOC_WS2, 33); +pub const SIO_GET_MULTIPLE_EXTENSION_FUNCTION_POINTER: ::DWORD = _WSAIORW!(IOC_WS2, 36); +pub const IPPROTO_IP: ::c_int = 0; +ENUM!{enum IPPROTO { + IPPROTO_HOPOPTS = 0, // IPv6 Hop-by-Hop options + IPPROTO_ICMP = 1, + IPPROTO_IGMP = 2, + IPPROTO_GGP = 3, + IPPROTO_IPV4 = 4, + IPPROTO_ST = 5, + IPPROTO_TCP = 6, + IPPROTO_CBT = 7, + IPPROTO_EGP = 8, + IPPROTO_IGP = 9, + IPPROTO_PUP = 12, + IPPROTO_UDP = 17, + IPPROTO_IDP = 22, + IPPROTO_RDP = 27, + IPPROTO_IPV6 = 41, // IPv6 header + IPPROTO_ROUTING = 43, // IPv6 Routing header + IPPROTO_FRAGMENT = 44, // IPv6 fragmentation header + IPPROTO_ESP = 50, // encapsulating security payload + IPPROTO_AH = 51, // authentication header + IPPROTO_ICMPV6 = 58, // ICMPv6 + IPPROTO_NONE = 59, // IPv6 no next header + IPPROTO_DSTOPTS = 60, // IPv6 Destination options + IPPROTO_ND = 77, + IPPROTO_ICLFXBM = 78, + IPPROTO_PIM = 103, + IPPROTO_PGM = 113, + IPPROTO_L2TP = 115, + IPPROTO_SCTP = 132, + IPPROTO_RAW = 255, + IPPROTO_MAX = 256, + IPPROTO_RESERVED_RAW = 257, + IPPROTO_RESERVED_IPSEC = 258, + IPPROTO_RESERVED_IPSECOFFLOAD = 259, + IPPROTO_RESERVED_WNV = 260, + IPPROTO_RESERVED_MAX = 261, +}} +pub type PIPPROTO = *mut IPPROTO; +STRUCT!{struct SOCKADDR_IN { + sin_family: ADDRESS_FAMILY, + sin_port: ::USHORT, + sin_addr: ::IN_ADDR, + sin_zero: [::CHAR; 8], +}} +pub type PSOCKADDR_IN = *mut SOCKADDR_IN; +//645 +pub const IOCPARM_MASK: ::DWORD = 0x7f; +pub const IOC_VOID: ::DWORD = 0x20000000; +pub const IOC_OUT: ::DWORD = 0x40000000; +pub const IOC_IN: ::DWORD = 0x80000000; +pub const IOC_INOUT: ::DWORD = IOC_IN | IOC_OUT; +STRUCT!{struct WSABUF { + len: ::ULONG, + buf: *mut ::CHAR, +}} +pub type LPWSABUF = *mut WSABUF; +STRUCT!{struct WSAMSG { + name: LPSOCKADDR, + namelen: ::INT, + lpBuffers: LPWSABUF, + dwBufferCount: ::ULONG, + Control: WSABUF, + dwFlags: ::ULONG, +}} +pub type PWSAMSG = *mut WSAMSG; +pub type LPWSAMSG = *mut WSAMSG; +STRUCT!{struct ADDRINFOA { + ai_flags: ::c_int, + ai_family: ::c_int, + ai_socktype: ::c_int, + ai_protocol: ::c_int, + ai_addrlen: ::size_t, + ai_canonname: *mut ::c_char, + ai_addr: *mut SOCKADDR, + ai_next: *mut ADDRINFOA, +}} +pub type PADDRINFOA = *mut ADDRINFOA; +STRUCT!{struct ADDRINFOW { + ai_flags: ::c_int, + ai_family: ::c_int, + ai_socktype: ::c_int, + ai_protocol: ::c_int, + ai_addrlen: ::size_t, + ai_canonname: ::PWSTR, + ai_addr: *mut SOCKADDR, + ai_next: *mut ADDRINFOW, +}} +pub type PADDRINFOW = *mut ADDRINFOW; +STRUCT!{struct ADDRINFOEXA { + ai_flags: ::c_int, + ai_family: ::c_int, + ai_socktype: ::c_int, + ai_protocol: ::c_int, + ai_addrlen: ::size_t, + ai_canonname: *mut ::c_char, + ai_addr: *mut SOCKADDR, + ai_blob: *mut ::c_void, + ai_bloblen: ::size_t, + ai_provider: ::LPGUID, + ai_next: *mut ADDRINFOEXW, +}} +pub type PADDRINFOEXA = *mut ADDRINFOEXA; +pub type LPADDRINFOEXA = *mut ADDRINFOEXA; +STRUCT!{struct ADDRINFOEXW { + ai_flags: ::c_int, + ai_family: ::c_int, + ai_socktype: ::c_int, + ai_protocol: ::c_int, + ai_addrlen: ::size_t, + ai_canonname: ::PWSTR, + ai_addr: *mut SOCKADDR, + ai_blob: *mut ::c_void, + ai_bloblen: ::size_t, + ai_provider: ::LPGUID, + ai_next: *mut ADDRINFOEXW, +}} +pub type PADDRINFOEXW = *mut ADDRINFOEXW; +pub type LPADDRINFOEXW = *mut ADDRINFOEXW; diff --git a/deps/winapi-0.2.5/src/ws2ipdef.rs b/deps/winapi-0.2.6/src/ws2ipdef.rs similarity index 100% rename from deps/winapi-0.2.5/src/ws2ipdef.rs rename to deps/winapi-0.2.6/src/ws2ipdef.rs diff --git a/deps/winapi-0.2.6/src/ws2spi.rs b/deps/winapi-0.2.6/src/ws2spi.rs new file mode 100644 index 000000000..9df67c191 --- /dev/null +++ b/deps/winapi-0.2.6/src/ws2spi.rs @@ -0,0 +1,57 @@ +// Copyright © 2015, skdltmxn +// Licensed under the MIT License <LICENSE.md> +//! Definitions to be used with the WinSock service provider +pub const WSPDESCRIPTION_LEN: usize = 255; +STRUCT!{nodebug struct WSPDATA { + wVersion: ::WORD, + wHighVersion: ::WORD, + szDescription: [::WCHAR; WSPDESCRIPTION_LEN + 1], +}} +pub type LPWSPDATA = *mut WSPDATA; +STRUCT!{struct WSATHREADID { + ThreadHandle: ::HANDLE, + Reserved: ::DWORD_PTR, +}} +pub type LPWSATHREADID = *mut WSATHREADID; +pub type LPNSPV2STARTUP = Option<unsafe extern "system" fn( + lpProviderId: ::LPGUID, ppvClientSessionArg: *mut ::LPVOID, +) -> ::INT>; +pub type LPNSPV2CLEANUP = Option<unsafe extern "system" fn( + lpProviderId: ::LPGUID, pvClientSessionArg: ::LPVOID, +) -> ::INT>; +pub type LPNSPV2LOOKUPSERVICEBEGIN = Option<unsafe extern "system" fn( + lpProviderId: ::LPGUID, lpqsRestrictions: ::LPWSAQUERYSET2W, dwControlFlags: ::DWORD, + lpvClientSessionArg: ::LPVOID, lphLookup: ::LPHANDLE, +) -> ::INT>; +pub type LPNSPV2LOOKUPSERVICENEXTEX = Option<unsafe extern "system" fn( + hAsyncCall: ::HANDLE, hLookup: ::HANDLE, dwControlFlags: ::DWORD, lpdwBufferLength: ::LPDWORD, + lpqsResults: ::LPWSAQUERYSET2W +)>; +pub type LPNSPV2LOOKUPSERVICEEND = Option<unsafe extern "system" fn(hLookup: ::HANDLE) -> ::INT>; +pub type LPNSPV2SETSERVICEEX = Option<unsafe extern "system" fn( + hAsyncCall: ::HANDLE, lpProviderId: ::LPGUID, lpqsRegInfo: ::LPWSAQUERYSET2W, + essOperation: ::WSAESETSERVICEOP, dwControlFlags: ::DWORD, lpvClientSessionArg: ::LPVOID, +)>; +pub type LPNSPV2CLIENTSESSIONRUNDOWN = Option<unsafe extern "system" fn( + lpProviderId: ::LPGUID, pvClientSessionArg: ::LPVOID, +)>; +STRUCT!{nodebug struct NSPV2_ROUTINE { + cbSize: ::DWORD, + dwMajorVersion: ::DWORD, + dwMinorVersion: ::DWORD, + NSPv2Startup: LPNSPV2STARTUP, + NSPv2Cleanup: LPNSPV2CLEANUP, + NSPv2LookupServiceBegin: LPNSPV2LOOKUPSERVICEBEGIN, + NSPv2LookupServiceNextEx: LPNSPV2LOOKUPSERVICENEXTEX, + NSPv2LookupServiceEnd: LPNSPV2LOOKUPSERVICEEND, + NSPv2SetServiceEx: LPNSPV2SETSERVICEEX, + NSPv2ClientSessionRundown: LPNSPV2CLIENTSESSIONRUNDOWN, +}} +pub type PNSPV2_ROUTINE = *mut NSPV2_ROUTINE; +pub type LPNSPV2_ROUTINE = *mut NSPV2_ROUTINE; +pub type PCNSPV2_ROUTINE = *const NSPV2_ROUTINE; +pub type LPCNSPV2_ROUTINE = *const NSPV2_ROUTINE; +ENUM!{enum WSC_PROVIDER_INFO_TYPE { + ProviderInfoLspCategories, + ProviderInfoAudit, +}} diff --git a/deps/winapi-0.2.5/src/ws2tcpip.rs b/deps/winapi-0.2.6/src/ws2tcpip.rs similarity index 100% rename from deps/winapi-0.2.5/src/ws2tcpip.rs rename to deps/winapi-0.2.6/src/ws2tcpip.rs diff --git a/deps/winapi-0.2.5/src/wtypes.rs b/deps/winapi-0.2.6/src/wtypes.rs similarity index 100% rename from deps/winapi-0.2.5/src/wtypes.rs rename to deps/winapi-0.2.6/src/wtypes.rs diff --git a/deps/winapi-0.2.5/src/wtypesbase.rs b/deps/winapi-0.2.6/src/wtypesbase.rs similarity index 100% rename from deps/winapi-0.2.5/src/wtypesbase.rs rename to deps/winapi-0.2.6/src/wtypesbase.rs diff --git a/deps/winapi-0.2.5/src/xinput.rs b/deps/winapi-0.2.6/src/xinput.rs similarity index 100% rename from deps/winapi-0.2.5/src/xinput.rs rename to deps/winapi-0.2.6/src/xinput.rs diff --git a/deps/winapi-0.2.5/tests/advapi32.rs b/deps/winapi-0.2.6/tests/advapi32.rs similarity index 100% rename from deps/winapi-0.2.5/tests/advapi32.rs rename to deps/winapi-0.2.6/tests/advapi32.rs diff --git a/deps/winapi-0.2.5/tests/bcrypt.rs b/deps/winapi-0.2.6/tests/bcrypt.rs similarity index 100% rename from deps/winapi-0.2.5/tests/bcrypt.rs rename to deps/winapi-0.2.6/tests/bcrypt.rs diff --git a/deps/winapi-0.2.5/tests/comctl32.rs b/deps/winapi-0.2.6/tests/comctl32.rs similarity index 100% rename from deps/winapi-0.2.5/tests/comctl32.rs rename to deps/winapi-0.2.6/tests/comctl32.rs diff --git a/deps/winapi-0.2.5/tests/comdlg32.rs b/deps/winapi-0.2.6/tests/comdlg32.rs similarity index 100% rename from deps/winapi-0.2.5/tests/comdlg32.rs rename to deps/winapi-0.2.6/tests/comdlg32.rs diff --git a/deps/winapi-0.2.5/tests/credui.rs b/deps/winapi-0.2.6/tests/credui.rs similarity index 100% rename from deps/winapi-0.2.5/tests/credui.rs rename to deps/winapi-0.2.6/tests/credui.rs diff --git a/deps/winapi-0.2.5/tests/crypt32.rs b/deps/winapi-0.2.6/tests/crypt32.rs similarity index 100% rename from deps/winapi-0.2.5/tests/crypt32.rs rename to deps/winapi-0.2.6/tests/crypt32.rs diff --git a/deps/winapi-0.2.5/tests/d2d1.rs b/deps/winapi-0.2.6/tests/d2d1.rs similarity index 100% rename from deps/winapi-0.2.5/tests/d2d1.rs rename to deps/winapi-0.2.6/tests/d2d1.rs diff --git a/deps/winapi-0.2.5/tests/d3d11.rs b/deps/winapi-0.2.6/tests/d3d11.rs similarity index 100% rename from deps/winapi-0.2.5/tests/d3d11.rs rename to deps/winapi-0.2.6/tests/d3d11.rs diff --git a/deps/winapi-0.2.5/tests/d3d12.rs b/deps/winapi-0.2.6/tests/d3d12.rs similarity index 100% rename from deps/winapi-0.2.5/tests/d3d12.rs rename to deps/winapi-0.2.6/tests/d3d12.rs diff --git a/deps/winapi-0.2.5/tests/dwmapi.rs b/deps/winapi-0.2.6/tests/dwmapi.rs similarity index 100% rename from deps/winapi-0.2.5/tests/dwmapi.rs rename to deps/winapi-0.2.6/tests/dwmapi.rs diff --git a/deps/winapi-0.2.5/tests/dwrite.rs b/deps/winapi-0.2.6/tests/dwrite.rs similarity index 100% rename from deps/winapi-0.2.5/tests/dwrite.rs rename to deps/winapi-0.2.6/tests/dwrite.rs diff --git a/deps/winapi-0.2.5/tests/dxgi.rs b/deps/winapi-0.2.6/tests/dxgi.rs similarity index 100% rename from deps/winapi-0.2.5/tests/dxgi.rs rename to deps/winapi-0.2.6/tests/dxgi.rs diff --git a/deps/winapi-0.2.5/tests/gdi32.rs b/deps/winapi-0.2.6/tests/gdi32.rs similarity index 100% rename from deps/winapi-0.2.5/tests/gdi32.rs rename to deps/winapi-0.2.6/tests/gdi32.rs diff --git a/deps/winapi-0.2.5/tests/httpapi.rs b/deps/winapi-0.2.6/tests/httpapi.rs similarity index 100% rename from deps/winapi-0.2.5/tests/httpapi.rs rename to deps/winapi-0.2.6/tests/httpapi.rs diff --git a/deps/winapi-0.2.6/tests/kernel32.rs b/deps/winapi-0.2.6/tests/kernel32.rs new file mode 100644 index 000000000..96786cc7f --- /dev/null +++ b/deps/winapi-0.2.6/tests/kernel32.rs @@ -0,0 +1,1261 @@ +// Copyright © 2015, Peter Atashian +// Licensed under the MIT License <LICENSE.md> +#![cfg(windows)] +extern crate kernel32; +use kernel32::*; +#[inline(never)] fn bb<T>(_: T) {} +#[test] #[cfg(target_arch="x86")] +fn functions_x86() { + bb(InterlockedCompareExchange); + bb(InterlockedCompareExchange64); + bb(InterlockedDecrement); + bb(InterlockedExchange); + bb(InterlockedExchangeAdd); + bb(InterlockedIncrement); +} +#[test] #[cfg(target_arch="x86_64")] +fn functions_x64() { + bb(CreateUmsCompletionList); + bb(CreateUmsThreadContext); + bb(DeleteUmsCompletionList); + bb(DeleteUmsThreadContext); + bb(DequeueUmsCompletionListItems); + bb(EnterUmsSchedulingMode); + bb(ExecuteUmsThread); + bb(GetCurrentUmsThread); + bb(GetNextUmsListItem); + bb(GetUmsCompletionListEvent); + bb(QueryUmsThreadInformation); + bb(RtlAddFunctionTable); + bb(RtlDeleteFunctionTable); + bb(RtlInstallFunctionTableCallback); + bb(RtlLookupFunctionEntry); + bb(RtlRestoreContext); + bb(RtlUnwindEx); + bb(RtlVirtualUnwind); + bb(SetUmsThreadInformation); + bb(UmsThreadYield); + bb(uaw_lstrcmpW); + bb(uaw_lstrcmpiW); + bb(uaw_lstrlenW); + bb(uaw_wcschr); + bb(uaw_wcscpy); + bb(uaw_wcsicmp); + bb(uaw_wcslen); + bb(uaw_wcsrchr); +} +#[test] #[cfg(target_arch="x86_64")] #[cfg(target_env = "msvc")] +fn functions_x64_msvc() { + bb(GetEnabledXStateFeatures); + bb(GetUmsSystemThreadInformation); + bb(GetXStateFeaturesMask); + bb(LocateXStateFeature); + bb(SetXStateFeaturesMask); +} +#[test] #[cfg(any(target_arch="x86_64", target_arch="arm"))] #[cfg(target_env = "msvc")] +fn functions_x64_arm_msvc() { + bb(RtlCompareMemory); + bb(RtlCopyMemory); +} +#[test] #[cfg(target_arch="arm")] +fn functions_arm() { + bb(RtlAddFunctionTable); + bb(RtlDeleteFunctionTable); + bb(RtlInstallFunctionTableCallback); + bb(RtlLookupFunctionEntry); + bb(RtlRestoreContext); + bb(RtlUnwindEx); + bb(RtlVirtualUnwind); + bb(uaw_lstrcmpW); + bb(uaw_lstrcmpiW); + bb(uaw_lstrlenW); + bb(uaw_wcschr); + bb(uaw_wcscpy); + bb(uaw_wcsicmp); + bb(uaw_wcslen); + bb(uaw_wcsrchr); +} +#[test] #[cfg(target_env = "msvc")] +fn functions_msvc() { + bb(AddDllDirectory); + bb(AddResourceAttributeAce); + bb(AddScopedPolicyIDAce); + //bb(CalloutOnFiberStack); + bb(CeipIsOptedIn); + bb(CheckTokenCapability); + bb(CheckTokenMembershipEx); + bb(CopyContext); + bb(CopyFile2); + bb(CreateFile2); + bb(CreateFileMappingFromApp); + bb(CreateRemoteThreadEx); + bb(DeleteSynchronizationBarrier); + bb(DisableThreadProfiling); + bb(DnsHostnameToComputerNameExW); + bb(EnableThreadProfiling); + bb(EnterSynchronizationBarrier); + bb(ExitThread); + bb(GetAppContainerAce); + bb(GetAppContainerNamedObjectPath); + bb(GetCachedSigningLevel); + bb(GetCurrentThreadStackLimits); + bb(GetEnabledXStateFeatures); + bb(GetFileMUIPath); + bb(GetFirmwareEnvironmentVariableExA); + bb(GetFirmwareEnvironmentVariableExW); + bb(GetFirmwareType); + bb(GetLogicalProcessorInformationEx); + bb(GetMemoryErrorHandlingCapabilities); + bb(GetOverlappedResultEx); + bb(GetProcessInformation); + bb(GetProcessMitigationPolicy); + bb(GetSystemTimePreciseAsFileTime); + bb(GetThreadInformation); + bb(GetXStateFeaturesMask); + bb(GlobalAddAtomExA); + bb(GlobalAddAtomExW); + bb(InitializeContext); + bb(InitializeSynchronizationBarrier); + bb(InstallELAMCertificateInfo); + bb(InterlockedPushListSListEx); + bb(IsNativeVhdBoot); + bb(IsProcessCritical); + bb(IsValidNLSVersion); + bb(K32EmptyWorkingSet); + bb(K32EnumDeviceDrivers); + bb(K32EnumPageFilesA); + bb(K32EnumPageFilesW); + bb(K32EnumProcessModules); + bb(K32EnumProcessModulesEx); + bb(K32EnumProcesses); + bb(K32GetDeviceDriverBaseNameA); + bb(K32GetDeviceDriverBaseNameW); + bb(K32GetDeviceDriverFileNameA); + bb(K32GetDeviceDriverFileNameW); + bb(K32GetMappedFileNameA); + bb(K32GetMappedFileNameW); + bb(K32GetModuleBaseNameA); + bb(K32GetModuleBaseNameW); + bb(K32GetModuleFileNameExA); + bb(K32GetModuleFileNameExW); + bb(K32GetModuleInformation); + bb(K32GetPerformanceInfo); + bb(K32GetProcessImageFileNameA); + bb(K32GetProcessImageFileNameW); + bb(K32GetProcessMemoryInfo); + bb(K32GetWsChanges); + bb(K32GetWsChangesEx); + bb(K32InitializeProcessForWsWatch); + bb(K32QueryWorkingSet); + bb(K32QueryWorkingSetEx); + bb(LoadPackagedLibrary); + bb(LocateXStateFeature); + bb(MapViewOfFileFromApp); + bb(PowerSetRequest); + bb(PrefetchVirtualMemory); + bb(PssCaptureSnapshot); + bb(PssDuplicateSnapshot); + bb(PssFreeSnapshot); + bb(PssQuerySnapshot); + bb(PssWalkMarkerCreate); + bb(PssWalkMarkerFree); + bb(PssWalkMarkerGetPosition); + bb(PssWalkMarkerSeekToBeginning); + bb(PssWalkMarkerSetPosition); + bb(PssWalkSnapshot); + bb(QueryProtectedPolicy); + bb(RegisterBadMemoryNotification); + bb(RemoveDllDirectory); + bb(SetCachedSigningLevel); + bb(SetComputerNameEx2W); + bb(SetDefaultDllDirectories); + bb(SetFirmwareEnvironmentVariableExA); + bb(SetFirmwareEnvironmentVariableExW); + bb(SetProcessInformation); + bb(SetProcessMitigationPolicy); + bb(SetProtectedPolicy); + bb(SetThreadInformation); + bb(SetThreadpoolStackInformation); + bb(SetThreadpoolTimerEx); + bb(SetThreadpoolWaitEx); + bb(SetWaitableTimerEx); + bb(SetXStateFeaturesMask); + bb(SystemTimeToTzSpecificLocalTimeEx); + bb(TzSpecificLocalTimeToSystemTimeEx); + bb(UnregisterBadMemoryNotification); +} +#[test] +fn functions() { + bb(AcquireSRWLockExclusive); + bb(AcquireSRWLockShared); + bb(ActivateActCtx); + bb(AddAtomA); + bb(AddAtomW); + bb(AddConsoleAliasA); + bb(AddConsoleAliasW); + bb(AddIntegrityLabelToBoundaryDescriptor); + bb(AddRefActCtx); + bb(AddSIDToBoundaryDescriptor); + bb(AddSecureMemoryCacheCallback); + bb(AddVectoredContinueHandler); + bb(AddVectoredExceptionHandler); + bb(AllocConsole); + bb(AllocateUserPhysicalPages); + bb(AllocateUserPhysicalPagesNuma); + bb(ApplicationRecoveryFinished); + bb(ApplicationRecoveryInProgress); + bb(BackupRead); + bb(BackupSeek); + bb(BackupWrite); + bb(BeginUpdateResourceA); + bb(BeginUpdateResourceW); + bb(BindIoCompletionCallback); + bb(BuildCommDCBA); + bb(BuildCommDCBAndTimeoutsA); + bb(BuildCommDCBAndTimeoutsW); + bb(BuildCommDCBW); + bb(CallNamedPipeA); + bb(CallNamedPipeW); + bb(CallbackMayRunLong); + bb(CancelDeviceWakeupRequest); + bb(CancelIo); + bb(CancelIoEx); + bb(CancelSynchronousIo); + bb(CancelThreadpoolIo); + bb(CancelTimerQueueTimer); + bb(CancelWaitableTimer); + bb(ChangeTimerQueueTimer); + bb(CheckNameLegalDOS8Dot3A); + bb(CheckNameLegalDOS8Dot3W); + bb(CheckRemoteDebuggerPresent); + bb(ClearCommBreak); + bb(ClearCommError); + bb(CloseHandle); + bb(ClosePrivateNamespace); + bb(CloseThreadpool); + bb(CloseThreadpoolCleanupGroup); + bb(CloseThreadpoolCleanupGroupMembers); + bb(CloseThreadpoolIo); + bb(CloseThreadpoolTimer); + bb(CloseThreadpoolWait); + bb(CloseThreadpoolWork); + bb(CommConfigDialogA); + bb(CommConfigDialogW); + bb(CompareFileTime); + bb(CompareStringA); + bb(CompareStringEx); + bb(CompareStringOrdinal); + bb(CompareStringW); + bb(ConnectNamedPipe); + bb(ContinueDebugEvent); + bb(ConvertDefaultLocale); + bb(ConvertFiberToThread); + bb(ConvertThreadToFiber); + bb(ConvertThreadToFiberEx); + bb(CopyFileA); + bb(CopyFileExA); + bb(CopyFileExW); + bb(CopyFileTransactedA); + bb(CopyFileTransactedW); + bb(CopyFileW); + bb(CreateActCtxA); + bb(CreateActCtxW); + bb(CreateBoundaryDescriptorA); + bb(CreateBoundaryDescriptorW); + bb(CreateConsoleScreenBuffer); + bb(CreateDirectoryA); + bb(CreateDirectoryExA); + bb(CreateDirectoryExW); + bb(CreateDirectoryTransactedA); + bb(CreateDirectoryTransactedW); + bb(CreateDirectoryW); + bb(CreateEventA); + bb(CreateEventW); + bb(CreateEventExA); + bb(CreateEventExW); + bb(CreateFiber); + bb(CreateFiberEx); + bb(CreateFileA); + bb(CreateFileMappingA); + bb(CreateFileMappingNumaA); + bb(CreateFileMappingNumaW); + bb(CreateFileMappingW); + bb(CreateFileTransactedA); + bb(CreateFileTransactedW); + bb(CreateFileW); + bb(CreateHardLinkA); + bb(CreateHardLinkTransactedA); + bb(CreateHardLinkTransactedW); + bb(CreateHardLinkW); + bb(CreateIoCompletionPort); + bb(CreateJobObjectA); + bb(CreateJobObjectW); + bb(CreateJobSet); + bb(CreateMailslotA); + bb(CreateMailslotW); + bb(CreateMemoryResourceNotification); + bb(CreateMutexA); + bb(CreateMutexExA); + bb(CreateMutexExW); + bb(CreateMutexW); + bb(CreateNamedPipeA); + bb(CreateNamedPipeW); + bb(CreatePipe); + bb(CreatePrivateNamespaceA); + bb(CreatePrivateNamespaceW); + bb(CreateProcessA); + bb(CreateProcessW); + bb(CreateRemoteThread); + bb(CreateSemaphoreA); + bb(CreateSemaphoreExA); + bb(CreateSemaphoreExW); + bb(CreateSemaphoreW); + bb(CreateSymbolicLinkA); + bb(CreateSymbolicLinkTransactedA); + bb(CreateSymbolicLinkTransactedW); + bb(CreateSymbolicLinkW); + bb(CreateTapePartition); + bb(CreateThread); + bb(CreateThreadpool); + bb(CreateThreadpoolCleanupGroup); + bb(CreateThreadpoolIo); + bb(CreateThreadpoolTimer); + bb(CreateThreadpoolWait); + bb(CreateThreadpoolWork); + bb(CreateTimerQueue); + bb(CreateTimerQueueTimer); + bb(CreateToolhelp32Snapshot); + bb(CreateWaitableTimerA); + bb(CreateWaitableTimerExA); + bb(CreateWaitableTimerExW); + bb(CreateWaitableTimerW); + bb(DeactivateActCtx); + bb(DebugActiveProcess); + bb(DebugActiveProcessStop); + bb(DebugBreak); + bb(DebugBreakProcess); + bb(DebugSetProcessKillOnExit); + bb(DecodePointer); + bb(DecodeSystemPointer); + bb(DefineDosDeviceA); + bb(DefineDosDeviceW); + bb(DelayLoadFailureHook); + bb(DeleteAtom); + bb(DeleteBoundaryDescriptor); + bb(DeleteCriticalSection); + bb(DeleteFiber); + bb(DeleteFileA); + bb(DeleteFileTransactedA); + bb(DeleteFileTransactedW); + bb(DeleteFileW); + bb(DeleteProcThreadAttributeList); + bb(DeleteTimerQueue); + bb(DeleteTimerQueueEx); + bb(DeleteTimerQueueTimer); + bb(DeleteVolumeMountPointA); + bb(DeleteVolumeMountPointW); + bb(DeviceIoControl); + bb(DisableThreadLibraryCalls); + bb(DisassociateCurrentThreadFromCallback); + bb(DisconnectNamedPipe); + bb(DnsHostnameToComputerNameA); + bb(DnsHostnameToComputerNameW); + bb(DosDateTimeToFileTime); + bb(DuplicateHandle); + bb(EncodePointer); + bb(EncodeSystemPointer); + bb(EndUpdateResourceA); + bb(EndUpdateResourceW); + bb(EnumCalendarInfoA); + bb(EnumCalendarInfoExA); + bb(EnumCalendarInfoExEx); + bb(EnumCalendarInfoExW); + bb(EnumCalendarInfoW); + bb(EnumDateFormatsA); + bb(EnumDateFormatsExA); + bb(EnumDateFormatsExEx); + bb(EnumDateFormatsExW); + bb(EnumDateFormatsW); + bb(EnumLanguageGroupLocalesA); + bb(EnumLanguageGroupLocalesW); + bb(EnumResourceLanguagesA); + bb(EnumResourceLanguagesExA); + bb(EnumResourceLanguagesExW); + bb(EnumResourceLanguagesW); + bb(EnumResourceNamesA); + bb(EnumResourceNamesExA); + bb(EnumResourceNamesExW); + bb(EnumResourceNamesW); + bb(EnumResourceTypesA); + bb(EnumResourceTypesExA); + bb(EnumResourceTypesExW); + bb(EnumResourceTypesW); + bb(EnumSystemCodePagesA); + bb(EnumSystemCodePagesW); + bb(EnumSystemFirmwareTables); + bb(EnumSystemGeoID); + bb(EnumSystemLanguageGroupsA); + bb(EnumSystemLanguageGroupsW); + bb(EnumSystemLocalesA); + bb(EnumSystemLocalesEx); + bb(EnumSystemLocalesW); + bb(EnumTimeFormatsA); + bb(EnumTimeFormatsEx); + bb(EnumTimeFormatsW); + bb(EnumUILanguagesA); + bb(EnumUILanguagesW); + bb(EraseTape); + bb(EscapeCommFunction); + bb(ExitProcess); + bb(ExpandEnvironmentStringsA); + bb(ExpandEnvironmentStringsW); + bb(FatalAppExitA); + bb(FatalAppExitW); + bb(FatalExit); + bb(FileTimeToDosDateTime); + bb(FileTimeToLocalFileTime); + bb(FileTimeToSystemTime); + bb(FillConsoleOutputAttribute); + bb(FillConsoleOutputCharacterA); + bb(FillConsoleOutputCharacterW); + bb(FindActCtxSectionGuid); + bb(FindActCtxSectionStringA); + bb(FindActCtxSectionStringW); + bb(FindAtomA); + bb(FindAtomW); + bb(FindClose); + bb(FindCloseChangeNotification); + bb(FindFirstChangeNotificationA); + bb(FindFirstChangeNotificationW); + bb(FindFirstFileA); + bb(FindFirstFileExA); + bb(FindFirstFileExW); + bb(FindFirstFileNameTransactedW); + bb(FindFirstFileNameW); + bb(FindFirstFileTransactedA); + bb(FindFirstFileTransactedW); + bb(FindFirstFileW); + bb(FindFirstStreamTransactedW); + bb(FindFirstStreamW); + bb(FindFirstVolumeA); + bb(FindFirstVolumeMountPointA); + bb(FindFirstVolumeMountPointW); + bb(FindFirstVolumeW); + bb(FindNLSString); + bb(FindNLSStringEx); + bb(FindNextChangeNotification); + bb(FindNextFileA); + bb(FindNextFileNameW); + bb(FindNextFileW); + bb(FindNextStreamW); + bb(FindNextVolumeA); + bb(FindNextVolumeMountPointA); + bb(FindNextVolumeMountPointW); + bb(FindNextVolumeW); + bb(FindResourceA); + bb(FindResourceExA); + bb(FindResourceExW); + bb(FindResourceW); + bb(FindStringOrdinal); + bb(FindVolumeClose); + bb(FindVolumeMountPointClose); + bb(FlsAlloc); + bb(FlsFree); + bb(FlsGetValue); + bb(FlsSetValue); + bb(FlushConsoleInputBuffer); + bb(FlushFileBuffers); + bb(FlushInstructionCache); + bb(FlushProcessWriteBuffers); + bb(FlushViewOfFile); + bb(FoldStringA); + bb(FoldStringW); + bb(FormatMessageA); + bb(FormatMessageW); + bb(FreeConsole); + bb(FreeEnvironmentStringsA); + bb(FreeEnvironmentStringsW); + bb(FreeLibrary); + bb(FreeLibraryAndExitThread); + bb(FreeLibraryWhenCallbackReturns); + bb(FreeResource); + bb(FreeUserPhysicalPages); + bb(GenerateConsoleCtrlEvent); + bb(GetACP); + bb(GetActiveProcessorCount); + bb(GetActiveProcessorGroupCount); + bb(GetApplicationRecoveryCallback); + bb(GetApplicationRestartSettings); + bb(GetAtomNameA); + bb(GetAtomNameW); + bb(GetBinaryTypeA); + bb(GetBinaryTypeW); + bb(GetCPInfo); + bb(GetCPInfoExA); + bb(GetCPInfoExW); + bb(GetCalendarInfoA); + bb(GetCalendarInfoEx); + bb(GetCalendarInfoW); + bb(GetCommConfig); + bb(GetCommMask); + bb(GetCommModemStatus); + bb(GetCommProperties); + bb(GetCommState); + bb(GetCommTimeouts); + bb(GetCommandLineA); + bb(GetCommandLineW); + bb(GetCompressedFileSizeA); + bb(GetCompressedFileSizeTransactedA); + bb(GetCompressedFileSizeTransactedW); + bb(GetCompressedFileSizeW); + bb(GetComputerNameA); + bb(GetComputerNameExA); + bb(GetComputerNameExW); + bb(GetComputerNameW); + bb(GetConsoleAliasA); + bb(GetConsoleAliasExesA); + bb(GetConsoleAliasExesLengthA); + bb(GetConsoleAliasExesLengthW); + bb(GetConsoleAliasExesW); + bb(GetConsoleAliasW); + bb(GetConsoleAliasesA); + bb(GetConsoleAliasesLengthA); + bb(GetConsoleAliasesLengthW); + bb(GetConsoleAliasesW); + bb(GetConsoleCP); + bb(GetConsoleCursorInfo); + bb(GetConsoleDisplayMode); + bb(GetConsoleFontSize); + bb(GetConsoleHistoryInfo); + bb(GetConsoleMode); + bb(GetConsoleOriginalTitleA); + bb(GetConsoleOriginalTitleW); + bb(GetConsoleOutputCP); + bb(GetConsoleProcessList); + bb(GetConsoleScreenBufferInfo); + bb(GetConsoleScreenBufferInfoEx); + bb(GetConsoleSelectionInfo); + bb(GetConsoleTitleA); + bb(GetConsoleTitleW); + bb(GetConsoleWindow); + bb(GetCurrencyFormatA); + bb(GetCurrencyFormatEx); + bb(GetCurrencyFormatW); + bb(GetCurrentActCtx); + bb(GetCurrentConsoleFont); + bb(GetCurrentConsoleFontEx); + bb(GetCurrentDirectoryA); + bb(GetCurrentDirectoryW); + bb(GetCurrentProcess); + bb(GetCurrentProcessId); + bb(GetCurrentProcessorNumber); + bb(GetCurrentProcessorNumberEx); + bb(GetCurrentThread); + bb(GetCurrentThreadId); + bb(GetDateFormatA); + bb(GetDateFormatEx); + bb(GetDateFormatW); + bb(GetDefaultCommConfigA); + bb(GetDefaultCommConfigW); + bb(GetDevicePowerState); + bb(GetDiskFreeSpaceA); + bb(GetDiskFreeSpaceExA); + bb(GetDiskFreeSpaceExW); + bb(GetDiskFreeSpaceW); + bb(GetDllDirectoryA); + bb(GetDllDirectoryW); + bb(GetDurationFormat); + bb(GetDurationFormatEx); + bb(GetDynamicTimeZoneInformation); + bb(GetEnvironmentStrings); + bb(GetEnvironmentStringsW); + bb(GetEnvironmentVariableA); + bb(GetEnvironmentVariableW); + bb(GetErrorMode); + bb(GetExitCodeProcess); + bb(GetExitCodeThread); + bb(GetFileAttributesA); + bb(GetFileAttributesExA); + bb(GetFileAttributesExW); + bb(GetFileAttributesTransactedA); + bb(GetFileAttributesTransactedW); + bb(GetFileAttributesW); + bb(GetFileBandwidthReservation); + bb(GetFileInformationByHandle); + bb(GetFileInformationByHandleEx); + bb(GetFileMUIInfo); + bb(GetFileSize); + bb(GetFileSizeEx); + bb(GetFileTime); + bb(GetFileType); + bb(GetFinalPathNameByHandleA); + bb(GetFinalPathNameByHandleW); + bb(GetFirmwareEnvironmentVariableA); + bb(GetFirmwareEnvironmentVariableW); + bb(GetFullPathNameA); + bb(GetFullPathNameTransactedA); + bb(GetFullPathNameTransactedW); + bb(GetFullPathNameW); + bb(GetGeoInfoA); + bb(GetGeoInfoW); + bb(GetHandleInformation); + bb(GetLargePageMinimum); + bb(GetLargestConsoleWindowSize); + bb(GetLastError); + bb(GetLocalTime); + bb(GetLocaleInfoA); + bb(GetLocaleInfoEx); + bb(GetLocaleInfoW); + bb(GetLogicalDriveStringsA); + bb(GetLogicalDriveStringsW); + bb(GetLogicalDrives); + bb(GetLogicalProcessorInformation); + bb(GetLongPathNameA); + bb(GetLongPathNameTransactedA); + bb(GetLongPathNameTransactedW); + bb(GetLongPathNameW); + bb(GetMailslotInfo); + bb(GetMaximumProcessorCount); + bb(GetMaximumProcessorGroupCount); + bb(GetModuleFileNameA); + bb(GetModuleFileNameW); + bb(GetModuleHandleA); + bb(GetModuleHandleExA); + bb(GetModuleHandleExW); + bb(GetModuleHandleW); + bb(GetNLSVersion); + bb(GetNLSVersionEx); + bb(GetNamedPipeClientComputerNameA); + bb(GetNamedPipeClientComputerNameW); + bb(GetNamedPipeClientProcessId); + bb(GetNamedPipeClientSessionId); + bb(GetNamedPipeHandleStateA); + bb(GetNamedPipeHandleStateW); + bb(GetNamedPipeInfo); + bb(GetNamedPipeServerProcessId); + bb(GetNamedPipeServerSessionId); + bb(GetNativeSystemInfo); + bb(GetNumaAvailableMemoryNode); + bb(GetNumaAvailableMemoryNodeEx); + bb(GetNumaHighestNodeNumber); + bb(GetNumaNodeNumberFromHandle); + bb(GetNumaNodeProcessorMask); + bb(GetNumaNodeProcessorMaskEx); + bb(GetNumaProcessorNode); + bb(GetNumaProcessorNodeEx); + bb(GetNumaProximityNode); + bb(GetNumaProximityNodeEx); + bb(GetNumberFormatA); + bb(GetNumberFormatEx); + bb(GetNumberFormatW); + bb(GetNumberOfConsoleInputEvents); + bb(GetNumberOfConsoleMouseButtons); + bb(GetOEMCP); + bb(GetOverlappedResult); + bb(GetPhysicallyInstalledSystemMemory); + bb(GetPriorityClass); + bb(GetPrivateProfileIntA); + bb(GetPrivateProfileIntW); + bb(GetPrivateProfileSectionA); + bb(GetPrivateProfileSectionNamesA); + bb(GetPrivateProfileSectionNamesW); + bb(GetPrivateProfileSectionW); + bb(GetPrivateProfileStringA); + bb(GetPrivateProfileStringW); + bb(GetPrivateProfileStructA); + bb(GetPrivateProfileStructW); + bb(GetProcAddress); + bb(GetProcessAffinityMask); + bb(GetProcessDEPPolicy); + bb(GetProcessGroupAffinity); + bb(GetProcessHandleCount); + bb(GetProcessHeap); + bb(GetProcessHeaps); + bb(GetProcessId); + bb(GetProcessIdOfThread); + bb(GetProcessIoCounters); + bb(GetProcessPreferredUILanguages); + bb(GetProcessPriorityBoost); + bb(GetProcessShutdownParameters); + bb(GetProcessTimes); + bb(GetProcessVersion); + bb(GetProcessWorkingSetSize); + bb(GetProcessWorkingSetSizeEx); + bb(GetProcessorSystemCycleTime); + bb(GetProductInfo); + bb(GetProfileIntA); + bb(GetProfileIntW); + bb(GetProfileSectionA); + bb(GetProfileSectionW); + bb(GetProfileStringA); + bb(GetProfileStringW); + bb(GetQueuedCompletionStatus); + bb(GetQueuedCompletionStatusEx); + bb(GetShortPathNameA); + bb(GetShortPathNameW); + bb(GetStartupInfoA); + bb(GetStartupInfoW); + bb(GetStdHandle); + bb(GetStringScripts); + bb(GetStringTypeA); + bb(GetStringTypeExA); + bb(GetStringTypeExW); + bb(GetStringTypeW); + bb(GetSystemDEPPolicy); + bb(GetSystemDefaultLCID); + bb(GetSystemDefaultLangID); + bb(GetSystemDefaultLocaleName); + bb(GetSystemDefaultUILanguage); + bb(GetSystemDirectoryA); + bb(GetSystemDirectoryW); + bb(GetSystemFileCacheSize); + bb(GetSystemFirmwareTable); + bb(GetSystemInfo); + bb(GetSystemPowerStatus); + bb(GetSystemPreferredUILanguages); + bb(GetSystemRegistryQuota); + bb(GetSystemTime); + bb(GetSystemTimeAdjustment); + bb(GetSystemTimeAsFileTime); + bb(GetSystemTimes); + bb(GetSystemWindowsDirectoryA); + bb(GetSystemWindowsDirectoryW); + bb(GetSystemWow64DirectoryA); + bb(GetSystemWow64DirectoryW); + bb(GetTapeParameters); + bb(GetTapePosition); + bb(GetTapeStatus); + bb(GetTempFileNameA); + bb(GetTempFileNameW); + bb(GetTempPathA); + bb(GetTempPathW); + bb(GetThreadContext); + bb(GetThreadErrorMode); + bb(GetThreadGroupAffinity); + bb(GetThreadIOPendingFlag); + bb(GetThreadId); + bb(GetThreadIdealProcessorEx); + bb(GetThreadLocale); + bb(GetThreadPreferredUILanguages); + bb(GetThreadPriority); + bb(GetThreadPriorityBoost); + bb(GetThreadSelectorEntry); + bb(GetThreadTimes); + bb(GetThreadUILanguage); + bb(GetTickCount); + bb(GetTickCount64); + bb(GetTimeFormatA); + bb(GetTimeFormatEx); + bb(GetTimeFormatW); + bb(GetTimeZoneInformation); + bb(GetTimeZoneInformationForYear); + bb(GetUILanguageInfo); + bb(GetUserDefaultLCID); + bb(GetUserDefaultLangID); + bb(GetUserDefaultLocaleName); + bb(GetUserDefaultUILanguage); + bb(GetUserGeoID); + bb(GetUserPreferredUILanguages); + bb(GetVersion); + bb(GetVersionExA); + bb(GetVersionExW); + bb(GetVolumeInformationA); + bb(GetVolumeInformationByHandleW); + bb(GetVolumeInformationW); + bb(GetVolumeNameForVolumeMountPointA); + bb(GetVolumeNameForVolumeMountPointW); + bb(GetVolumePathNameA); + bb(GetVolumePathNameW); + bb(GetVolumePathNamesForVolumeNameA); + bb(GetVolumePathNamesForVolumeNameW); + bb(GetWindowsDirectoryA); + bb(GetWindowsDirectoryW); + bb(GetWriteWatch); + bb(GlobalAddAtomA); + bb(GlobalAddAtomW); + bb(GlobalAlloc); + bb(GlobalCompact); + bb(GlobalDeleteAtom); + bb(GlobalFindAtomA); + bb(GlobalFindAtomW); + bb(GlobalFix); + bb(GlobalFlags); + bb(GlobalGetAtomNameA); + bb(GlobalGetAtomNameW); + bb(GlobalHandle); + bb(GlobalLock); + bb(GlobalMemoryStatus); + bb(GlobalMemoryStatusEx); + bb(GlobalReAlloc); + bb(GlobalSize); + bb(GlobalUnWire); + bb(GlobalUnfix); + bb(GlobalUnlock); + bb(GlobalWire); + bb(Heap32First); + bb(Heap32ListFirst); + bb(Heap32ListNext); + bb(Heap32Next); + bb(HeapAlloc); + bb(HeapCompact); + bb(HeapCreate); + bb(HeapDestroy); + bb(HeapFree); + bb(HeapLock); + bb(HeapQueryInformation); + bb(HeapReAlloc); + bb(HeapSetInformation); + bb(HeapSize); + bb(HeapSummary); + bb(HeapUnlock); + bb(HeapValidate); + bb(HeapWalk); + bb(InitAtomTable); + bb(InitOnceBeginInitialize); + bb(InitOnceComplete); + bb(InitOnceExecuteOnce); + bb(InitOnceInitialize); + bb(InitializeConditionVariable); + bb(InitializeCriticalSection); + bb(InitializeCriticalSectionAndSpinCount); + bb(InitializeCriticalSectionEx); + bb(InitializeProcThreadAttributeList); + bb(InitializeSListHead); + bb(InitializeSRWLock); + bb(InterlockedFlushSList); + bb(InterlockedPopEntrySList); + bb(IsBadCodePtr); + bb(IsBadHugeReadPtr); + bb(IsBadHugeWritePtr); + bb(IsBadReadPtr); + bb(IsBadStringPtrA); + bb(IsBadStringPtrW); + bb(IsBadWritePtr); + bb(IsDBCSLeadByte); + bb(IsDBCSLeadByteEx); + bb(IsDebuggerPresent); + bb(IsNLSDefinedString); + bb(IsNormalizedString); + bb(IsProcessInJob); + bb(IsProcessorFeaturePresent); + bb(IsSystemResumeAutomatic); + bb(IsThreadAFiber); + bb(IsThreadpoolTimerSet); + bb(IsValidCodePage); + bb(IsValidLanguageGroup); + bb(IsValidLocale); + bb(IsValidLocaleName); + bb(IsWow64Process); + bb(LCIDToLocaleName); + bb(LCMapStringA); + bb(LCMapStringEx); + bb(LCMapStringW); + bb(LeaveCriticalSection); + bb(LeaveCriticalSectionWhenCallbackReturns); + bb(LoadLibraryA); + bb(LoadLibraryExA); + bb(LoadLibraryExW); + bb(LoadLibraryW); + bb(LoadModule); + bb(LoadResource); + bb(LocalAlloc); + bb(LocalCompact); + bb(LocalFileTimeToFileTime); + bb(LocalFlags); + bb(LocalFree); + bb(LocalHandle); + bb(LocalLock); + bb(LocalReAlloc); + bb(LocalShrink); + bb(LocalSize); + bb(LocalUnlock); + bb(LocaleNameToLCID); + bb(LockFile); + bb(LockFileEx); + bb(LockResource); + bb(MapUserPhysicalPages); + bb(MapUserPhysicalPagesScatter); + bb(MapViewOfFile); + bb(MapViewOfFileEx); + bb(MapViewOfFileExNuma); + bb(Module32First); + bb(Module32FirstW); + bb(Module32Next); + bb(Module32NextW); + bb(MoveFileA); + bb(MoveFileExA); + bb(MoveFileExW); + bb(MoveFileTransactedA); + bb(MoveFileTransactedW); + bb(MoveFileW); + bb(MoveFileWithProgressA); + bb(MoveFileWithProgressW); + bb(MulDiv); + bb(MultiByteToWideChar); + bb(NeedCurrentDirectoryForExePathA); + bb(NeedCurrentDirectoryForExePathW); + bb(NormalizeString); + bb(NotifyUILanguageChange); + bb(OpenEventA); + bb(OpenEventW); + bb(OpenFile); + bb(OpenFileById); + bb(OpenFileMappingA); + bb(OpenFileMappingW); + bb(OpenJobObjectA); + bb(OpenJobObjectW); + bb(OpenMutexA); + bb(OpenMutexW); + bb(OpenPrivateNamespaceA); + bb(OpenPrivateNamespaceW); + bb(OpenProcess); + bb(OpenSemaphoreA); + bb(OpenSemaphoreW); + bb(OpenThread); + bb(OpenWaitableTimerA); + bb(OpenWaitableTimerW); + bb(OutputDebugStringA); + bb(OutputDebugStringW); + bb(PeekConsoleInputA); + bb(PeekConsoleInputW); + bb(PeekNamedPipe); + bb(PostQueuedCompletionStatus); + bb(PowerClearRequest); + bb(PowerCreateRequest); + bb(PrepareTape); + bb(Process32First); + bb(Process32FirstW); + bb(Process32Next); + bb(Process32NextW); + bb(ProcessIdToSessionId); + bb(PulseEvent); + bb(PurgeComm); + bb(QueryActCtxSettingsW); + bb(QueryActCtxW); + bb(QueryDepthSList); + bb(QueryDosDeviceA); + bb(QueryDosDeviceW); + bb(QueryFullProcessImageNameA); + bb(QueryFullProcessImageNameW); + bb(QueryIdleProcessorCycleTime); + bb(QueryIdleProcessorCycleTimeEx); + bb(QueryInformationJobObject); + bb(QueryPerformanceCounter); + bb(QueryPerformanceFrequency); + bb(QueryProcessAffinityUpdateMode); + bb(QueryProcessCycleTime); + bb(QueryThreadCycleTime); + bb(QueryThreadProfiling); + bb(QueryThreadpoolStackInformation); + bb(QueryUnbiasedInterruptTime); + bb(QueueUserAPC); + bb(QueueUserWorkItem); + bb(RaiseException); + bb(RaiseFailFastException); + bb(ReOpenFile); + bb(ReadConsoleA); + bb(ReadConsoleInputA); + bb(ReadConsoleInputW); + bb(ReadConsoleOutputA); + bb(ReadConsoleOutputAttribute); + bb(ReadConsoleOutputCharacterA); + bb(ReadConsoleOutputCharacterW); + bb(ReadConsoleOutputW); + bb(ReadConsoleW); + bb(ReadDirectoryChangesW); + bb(ReadFile); + bb(ReadFileEx); + bb(ReadFileScatter); + bb(ReadProcessMemory); + bb(ReadThreadProfilingData); + bb(RegisterApplicationRecoveryCallback); + bb(RegisterApplicationRestart); + bb(RegisterWaitForSingleObject); + bb(RegisterWaitForSingleObjectEx); + bb(ReleaseActCtx); + bb(ReleaseMutex); + bb(ReleaseMutexWhenCallbackReturns); + bb(ReleaseSRWLockExclusive); + bb(ReleaseSRWLockShared); + bb(ReleaseSemaphore); + bb(ReleaseSemaphoreWhenCallbackReturns); + bb(RemoveDirectoryA); + bb(RemoveDirectoryTransactedA); + bb(RemoveDirectoryTransactedW); + bb(RemoveDirectoryW); + bb(RemoveSecureMemoryCacheCallback); + bb(RemoveVectoredContinueHandler); + bb(RemoveVectoredExceptionHandler); + bb(ReplaceFileA); + bb(ReplaceFileW); + bb(ReplacePartitionUnit); + bb(RequestDeviceWakeup); + bb(RequestWakeupLatency); + bb(ResetEvent); + bb(ResetWriteWatch); + bb(RestoreLastError); + bb(ResumeThread); + bb(RtlCaptureContext); + bb(RtlCaptureStackBackTrace); + bb(RtlUnwind); + bb(ScrollConsoleScreenBufferA); + bb(ScrollConsoleScreenBufferW); + bb(SearchPathA); + bb(SearchPathW); + bb(SetCalendarInfoA); + bb(SetCalendarInfoW); + bb(SetCommBreak); + bb(SetCommConfig); + bb(SetCommMask); + bb(SetCommState); + bb(SetCommTimeouts); + bb(SetComputerNameA); + bb(SetComputerNameExA); + bb(SetComputerNameExW); + bb(SetComputerNameW); + bb(SetConsoleActiveScreenBuffer); + bb(SetConsoleCP); + bb(SetConsoleCtrlHandler); + bb(SetConsoleCursorInfo); + bb(SetConsoleCursorPosition); + bb(SetConsoleDisplayMode); + bb(SetConsoleHistoryInfo); + bb(SetConsoleMode); + bb(SetConsoleOutputCP); + bb(SetConsoleScreenBufferInfoEx); + bb(SetConsoleScreenBufferSize); + bb(SetConsoleTextAttribute); + bb(SetConsoleTitleA); + bb(SetConsoleTitleW); + bb(SetConsoleWindowInfo); + bb(SetCriticalSectionSpinCount); + bb(SetCurrentConsoleFontEx); + bb(SetCurrentDirectoryA); + bb(SetCurrentDirectoryW); + bb(SetDefaultCommConfigA); + bb(SetDefaultCommConfigW); + bb(SetDllDirectoryA); + bb(SetDllDirectoryW); + bb(SetDynamicTimeZoneInformation); + bb(SetEndOfFile); + bb(SetEnvironmentStringsA); + bb(SetEnvironmentStringsW); + bb(SetEnvironmentVariableA); + bb(SetEnvironmentVariableW); + bb(SetErrorMode); + bb(SetEvent); + bb(SetEventWhenCallbackReturns); + bb(SetFileApisToANSI); + bb(SetFileApisToOEM); + bb(SetFileAttributesA); + bb(SetFileAttributesTransactedA); + bb(SetFileAttributesTransactedW); + bb(SetFileAttributesW); + bb(SetFileBandwidthReservation); + bb(SetFileCompletionNotificationModes); + bb(SetFileInformationByHandle); + bb(SetFileIoOverlappedRange); + bb(SetFilePointer); + bb(SetFilePointerEx); + bb(SetFileShortNameA); + bb(SetFileShortNameW); + bb(SetFileTime); + bb(SetFileValidData); + bb(SetFirmwareEnvironmentVariableA); + bb(SetFirmwareEnvironmentVariableW); + bb(SetHandleCount); + bb(SetHandleInformation); + bb(SetInformationJobObject); + bb(SetLastError); + bb(SetLocalTime); + bb(SetLocaleInfoA); + bb(SetLocaleInfoW); + bb(SetMailslotInfo); + bb(SetMessageWaitingIndicator); + bb(SetNamedPipeAttribute); + bb(SetNamedPipeHandleState); + bb(SetPriorityClass); + bb(SetProcessAffinityMask); + bb(SetProcessAffinityUpdateMode); + bb(SetProcessDEPPolicy); + bb(SetProcessPreferredUILanguages); + bb(SetProcessPriorityBoost); + bb(SetProcessShutdownParameters); + bb(SetProcessWorkingSetSize); + bb(SetProcessWorkingSetSizeEx); + bb(SetSearchPathMode); + bb(SetStdHandle); + bb(SetStdHandleEx); + bb(SetSystemFileCacheSize); + bb(SetSystemPowerState); + bb(SetSystemTime); + bb(SetSystemTimeAdjustment); + bb(SetTapeParameters); + bb(SetTapePosition); + bb(SetThreadAffinityMask); + bb(SetThreadContext); + bb(SetThreadErrorMode); + bb(SetThreadExecutionState); + bb(SetThreadGroupAffinity); + bb(SetThreadIdealProcessor); + bb(SetThreadIdealProcessorEx); + bb(SetThreadLocale); + bb(SetThreadPreferredUILanguages); + bb(SetThreadPriority); + bb(SetThreadPriorityBoost); + bb(SetThreadUILanguage); + bb(SetThreadpoolThreadMaximum); + bb(SetThreadpoolThreadMinimum); + bb(SetThreadpoolTimer); + bb(SetThreadpoolWait); + bb(SetTimeZoneInformation); + bb(SetTimerQueueTimer); + bb(SetUnhandledExceptionFilter); + bb(SetUserGeoID); + bb(SetVolumeLabelA); + bb(SetVolumeLabelW); + bb(SetVolumeMountPointA); + bb(SetVolumeMountPointW); + bb(SetWaitableTimer); + bb(SetupComm); + bb(SignalObjectAndWait); + bb(SizeofResource); + bb(Sleep); + bb(SleepConditionVariableCS); + bb(SleepConditionVariableSRW); + bb(SleepEx); + bb(StartThreadpoolIo); + bb(SubmitThreadpoolWork); + bb(SuspendThread); + bb(SwitchToFiber); + bb(SwitchToThread); + bb(SystemTimeToFileTime); + bb(SystemTimeToTzSpecificLocalTime); + bb(TerminateJobObject); + bb(TerminateProcess); + bb(TerminateThread); + bb(Thread32First); + bb(Thread32Next); + bb(TlsAlloc); + bb(TlsFree); + bb(TlsGetValue); + bb(TlsSetValue); + bb(Toolhelp32ReadProcessMemory); + bb(TransactNamedPipe); + bb(TransmitCommChar); + bb(TryAcquireSRWLockExclusive); + bb(TryAcquireSRWLockShared); + bb(TryEnterCriticalSection); + bb(TrySubmitThreadpoolCallback); + bb(TzSpecificLocalTimeToSystemTime); + bb(UnhandledExceptionFilter); + bb(UnlockFile); + bb(UnlockFileEx); + bb(UnmapViewOfFile); + bb(UnregisterApplicationRecoveryCallback); + bb(UnregisterApplicationRestart); + bb(UnregisterWait); + bb(UnregisterWaitEx); + bb(UpdateProcThreadAttribute); + bb(UpdateResourceA); + bb(UpdateResourceW); + bb(VerLanguageNameA); + bb(VerLanguageNameW); + bb(VerSetConditionMask); + bb(VerifyScripts); + bb(VerifyVersionInfoA); + bb(VerifyVersionInfoW); + bb(VirtualAlloc); + bb(VirtualAllocEx); + bb(VirtualAllocExNuma); + bb(VirtualFree); + bb(VirtualFreeEx); + bb(VirtualLock); + bb(VirtualProtect); + bb(VirtualProtectEx); + bb(VirtualQuery); + bb(VirtualQueryEx); + bb(VirtualUnlock); + bb(WTSGetActiveConsoleSessionId); + bb(WaitCommEvent); + bb(WaitForDebugEvent); + bb(WaitForMultipleObjects); + bb(WaitForMultipleObjectsEx); + bb(WaitForSingleObject); + bb(WaitForSingleObjectEx); + bb(WaitForThreadpoolIoCallbacks); + bb(WaitForThreadpoolTimerCallbacks); + bb(WaitForThreadpoolWaitCallbacks); + bb(WaitNamedPipeA); + bb(WaitNamedPipeW); + bb(WakeAllConditionVariable); + bb(WakeConditionVariable); + bb(WerGetFlags); + bb(WerRegisterFile); + bb(WerRegisterMemoryBlock); + bb(WerRegisterRuntimeExceptionModule); + bb(WerSetFlags); + bb(WerUnregisterFile); + bb(WerUnregisterMemoryBlock); + bb(WerUnregisterRuntimeExceptionModule); + bb(WideCharToMultiByte); + bb(WinExec); + bb(Wow64DisableWow64FsRedirection); + bb(Wow64EnableWow64FsRedirection); + bb(Wow64GetThreadContext); + bb(Wow64GetThreadSelectorEntry); + bb(Wow64RevertWow64FsRedirection); + bb(Wow64SetThreadContext); + bb(Wow64SuspendThread); + bb(WriteConsoleA); + bb(WriteConsoleInputA); + bb(WriteConsoleInputW); + bb(WriteConsoleOutputA); + bb(WriteConsoleOutputAttribute); + bb(WriteConsoleOutputCharacterA); + bb(WriteConsoleOutputCharacterW); + bb(WriteConsoleOutputW); + bb(WriteConsoleW); + bb(WriteFile); + bb(WriteFileEx); + bb(WriteFileGather); + bb(WritePrivateProfileSectionA); + bb(WritePrivateProfileSectionW); + bb(WritePrivateProfileStringA); + bb(WritePrivateProfileStringW); + bb(WritePrivateProfileStructA); + bb(WritePrivateProfileStructW); + bb(WriteProcessMemory); + bb(WriteProfileSectionA); + bb(WriteProfileSectionW); + bb(WriteProfileStringA); + bb(WriteProfileStringW); + bb(WriteTapemark); + bb(ZombifyActCtx); + bb(_hread); + bb(_hwrite); + bb(_lclose); + bb(_lcreat); + bb(_llseek); + bb(_lopen); + bb(_lread); + bb(_lwrite); + bb(lstrcat); + bb(lstrcatA); + bb(lstrcatW); + bb(lstrcmp); + bb(lstrcmpA); + bb(lstrcmpW); + bb(lstrcmpi); + bb(lstrcmpiA); + bb(lstrcmpiW); + bb(lstrcpy); + bb(lstrcpyA); + bb(lstrcpyW); + bb(lstrcpyn); + bb(lstrcpynA); + bb(lstrcpynW); + bb(lstrlen); + bb(lstrlenA); + bb(lstrlenW); +} diff --git a/deps/winapi-0.2.5/tests/ktmw32.rs b/deps/winapi-0.2.6/tests/ktmw32.rs similarity index 100% rename from deps/winapi-0.2.5/tests/ktmw32.rs rename to deps/winapi-0.2.6/tests/ktmw32.rs diff --git a/deps/winapi-0.2.6/tests/lib.rs b/deps/winapi-0.2.6/tests/lib.rs new file mode 100644 index 000000000..8b482f726 --- /dev/null +++ b/deps/winapi-0.2.6/tests/lib.rs @@ -0,0 +1,612 @@ +// Copyright © 2015, Peter Atashian +// Licensed under the MIT License <LICENSE.md> +#![cfg(windows)] +extern crate winapi; +use std::mem::{size_of, align_of}; +use winapi::*; +#[test] #[cfg(target_arch = "i686")] +fn template() { +} +#[test] #[cfg(target_arch = "x86_64")] +fn template() { +} +#[test] #[cfg(target_arch = "i686")] +fn d3d11() { + assert_eq!(size_of::<D3D11_INPUT_ELEMENT_DESC>(), 28); + assert_eq!(align_of::<D3D11_INPUT_ELEMENT_DESC>(), 4); + assert_eq!(size_of::<D3D11_SO_DECLARATION_ENTRY>(), 16); + assert_eq!(align_of::<D3D11_SO_DECLARATION_ENTRY>(), 4); + assert_eq!(size_of::<D3D11_VIEWPORT>(), 24); + assert_eq!(align_of::<D3D11_VIEWPORT>(), 4); + assert_eq!(size_of::<D3D11_DRAW_INSTANCED_INDIRECT_ARGS>(), 16); + assert_eq!(align_of::<D3D11_DRAW_INSTANCED_INDIRECT_ARGS>(), 4); + assert_eq!(size_of::<D3D11_DRAW_INDEXED_INSTANCED_INDIRECT_ARGS>(), 20); + assert_eq!(align_of::<D3D11_DRAW_INDEXED_INSTANCED_INDIRECT_ARGS>(), 4); + assert_eq!(size_of::<D3D11_BOX>(), 24); + assert_eq!(align_of::<D3D11_BOX>(), 4); + assert_eq!(size_of::<D3D11_DEPTH_STENCILOP_DESC>(), 16); + assert_eq!(align_of::<D3D11_DEPTH_STENCILOP_DESC>(), 4); + assert_eq!(size_of::<D3D11_DEPTH_STENCIL_DESC>(), 52); + assert_eq!(align_of::<D3D11_DEPTH_STENCIL_DESC>(), 4); + assert_eq!(size_of::<D3D11_RENDER_TARGET_BLEND_DESC>(), 32); + assert_eq!(align_of::<D3D11_RENDER_TARGET_BLEND_DESC>(), 4); + assert_eq!(size_of::<D3D11_BLEND_DESC>(), 264); + assert_eq!(align_of::<D3D11_BLEND_DESC>(), 4); + assert_eq!(size_of::<D3D11_RASTERIZER_DESC>(), 40); + assert_eq!(align_of::<D3D11_RASTERIZER_DESC>(), 4); + assert_eq!(size_of::<D3D11_SUBRESOURCE_DATA>(), 12); + assert_eq!(align_of::<D3D11_SUBRESOURCE_DATA>(), 4); + assert_eq!(size_of::<D3D11_MAPPED_SUBRESOURCE>(), 12); + assert_eq!(align_of::<D3D11_MAPPED_SUBRESOURCE>(), 4); + assert_eq!(size_of::<D3D11_BUFFER_DESC>(), 24); + assert_eq!(align_of::<D3D11_BUFFER_DESC>(), 4); + assert_eq!(size_of::<D3D11_TEXTURE1D_DESC>(), 32); + assert_eq!(align_of::<D3D11_TEXTURE1D_DESC>(), 4); + assert_eq!(size_of::<D3D11_TEXTURE2D_DESC>(), 44); + assert_eq!(align_of::<D3D11_TEXTURE2D_DESC>(), 4); + assert_eq!(size_of::<D3D11_TEXTURE3D_DESC>(), 36); + assert_eq!(align_of::<D3D11_TEXTURE3D_DESC>(), 4); + assert_eq!(size_of::<D3D11_BUFFER_SRV>(), 8); + assert_eq!(align_of::<D3D11_BUFFER_SRV>(), 4); + assert_eq!(size_of::<D3D11_BUFFEREX_SRV>(), 12); + assert_eq!(align_of::<D3D11_BUFFEREX_SRV>(), 4); + assert_eq!(size_of::<D3D11_TEX1D_SRV>(), 8); + assert_eq!(align_of::<D3D11_TEX1D_SRV>(), 4); + assert_eq!(size_of::<D3D11_TEX1D_ARRAY_SRV>(), 16); + assert_eq!(align_of::<D3D11_TEX1D_ARRAY_SRV>(), 4); + assert_eq!(size_of::<D3D11_TEX2D_SRV>(), 8); + assert_eq!(align_of::<D3D11_TEX2D_SRV>(), 4); + assert_eq!(size_of::<D3D11_TEX2D_ARRAY_SRV>(), 16); + assert_eq!(align_of::<D3D11_TEX2D_ARRAY_SRV>(), 4); + assert_eq!(size_of::<D3D11_TEX3D_SRV>(), 8); + assert_eq!(align_of::<D3D11_TEX3D_SRV>(), 4); + assert_eq!(size_of::<D3D11_TEXCUBE_SRV>(), 8); + assert_eq!(align_of::<D3D11_TEXCUBE_SRV>(), 4); + assert_eq!(size_of::<D3D11_TEXCUBE_ARRAY_SRV>(), 16); + assert_eq!(align_of::<D3D11_TEXCUBE_ARRAY_SRV>(), 4); + assert_eq!(size_of::<D3D11_TEX2DMS_SRV>(), 4); + assert_eq!(align_of::<D3D11_TEX2DMS_SRV>(), 4); + assert_eq!(size_of::<D3D11_TEX2DMS_ARRAY_SRV>(), 8); + assert_eq!(align_of::<D3D11_TEX2DMS_ARRAY_SRV>(), 4); + assert_eq!(size_of::<D3D11_SHADER_RESOURCE_VIEW_DESC>(), 24); + assert_eq!(align_of::<D3D11_SHADER_RESOURCE_VIEW_DESC>(), 4); + assert_eq!(size_of::<D3D11_BUFFER_RTV>(), 8); + assert_eq!(align_of::<D3D11_BUFFER_RTV>(), 4); + assert_eq!(size_of::<D3D11_TEX1D_RTV>(), 4); + assert_eq!(align_of::<D3D11_TEX1D_RTV>(), 4); + assert_eq!(size_of::<D3D11_TEX1D_ARRAY_RTV>(), 12); + assert_eq!(align_of::<D3D11_TEX1D_ARRAY_RTV>(), 4); + assert_eq!(size_of::<D3D11_TEX2D_RTV>(), 4); + assert_eq!(align_of::<D3D11_TEX2D_RTV>(), 4); + assert_eq!(size_of::<D3D11_TEX2DMS_RTV>(), 4); + assert_eq!(align_of::<D3D11_TEX2DMS_RTV>(), 4); + assert_eq!(size_of::<D3D11_TEX2D_ARRAY_RTV>(), 12); + assert_eq!(align_of::<D3D11_TEX2D_ARRAY_RTV>(), 4); + assert_eq!(size_of::<D3D11_TEX2DMS_ARRAY_RTV>(), 8); + assert_eq!(align_of::<D3D11_TEX2DMS_ARRAY_RTV>(), 4); + assert_eq!(size_of::<D3D11_TEX3D_RTV>(), 12); + assert_eq!(align_of::<D3D11_TEX3D_RTV>(), 4); + assert_eq!(size_of::<D3D11_RENDER_TARGET_VIEW_DESC>(), 20); + assert_eq!(align_of::<D3D11_RENDER_TARGET_VIEW_DESC>(), 4); + assert_eq!(size_of::<D3D11_TEX1D_DSV>(), 4); + assert_eq!(align_of::<D3D11_TEX1D_DSV>(), 4); + assert_eq!(size_of::<D3D11_TEX1D_ARRAY_DSV>(), 12); + assert_eq!(align_of::<D3D11_TEX1D_ARRAY_DSV>(), 4); + assert_eq!(size_of::<D3D11_TEX2D_DSV>(), 4); + assert_eq!(align_of::<D3D11_TEX2D_DSV>(), 4); + assert_eq!(size_of::<D3D11_TEX2D_ARRAY_DSV>(), 12); + assert_eq!(align_of::<D3D11_TEX2D_ARRAY_DSV>(), 4); + assert_eq!(size_of::<D3D11_TEX2DMS_DSV>(), 4); + assert_eq!(align_of::<D3D11_TEX2DMS_DSV>(), 4); + assert_eq!(size_of::<D3D11_TEX2DMS_ARRAY_DSV>(), 8); + assert_eq!(align_of::<D3D11_TEX2DMS_ARRAY_DSV>(), 4); + assert_eq!(size_of::<D3D11_DEPTH_STENCIL_VIEW_DESC>(), 24); + assert_eq!(align_of::<D3D11_DEPTH_STENCIL_VIEW_DESC>(), 4); + assert_eq!(size_of::<D3D11_BUFFER_UAV>(), 12); + assert_eq!(align_of::<D3D11_BUFFER_UAV>(), 4); + assert_eq!(size_of::<D3D11_TEX1D_UAV>(), 4); + assert_eq!(align_of::<D3D11_TEX1D_UAV>(), 4); + assert_eq!(size_of::<D3D11_TEX1D_ARRAY_UAV>(), 12); + assert_eq!(align_of::<D3D11_TEX1D_ARRAY_UAV>(), 4); + assert_eq!(size_of::<D3D11_TEX2D_UAV>(), 4); + assert_eq!(align_of::<D3D11_TEX2D_UAV>(), 4); + assert_eq!(size_of::<D3D11_TEX2D_ARRAY_UAV>(), 12); + assert_eq!(align_of::<D3D11_TEX2D_ARRAY_UAV>(), 4); + assert_eq!(size_of::<D3D11_TEX3D_UAV>(), 12); + assert_eq!(align_of::<D3D11_TEX3D_UAV>(), 4); + assert_eq!(size_of::<D3D11_UNORDERED_ACCESS_VIEW_DESC>(), 20); + assert_eq!(align_of::<D3D11_UNORDERED_ACCESS_VIEW_DESC>(), 4); + assert_eq!(size_of::<D3D11_SAMPLER_DESC>(), 52); + assert_eq!(align_of::<D3D11_SAMPLER_DESC>(), 4); + assert_eq!(size_of::<D3D11_QUERY_DESC>(), 8); + assert_eq!(align_of::<D3D11_QUERY_DESC>(), 4); + assert_eq!(size_of::<D3D11_QUERY_DATA_TIMESTAMP_DISJOINT>(), 16); + assert_eq!(align_of::<D3D11_QUERY_DATA_TIMESTAMP_DISJOINT>(), 8); + assert_eq!(size_of::<D3D11_QUERY_DATA_PIPELINE_STATISTICS>(), 88); + assert_eq!(align_of::<D3D11_QUERY_DATA_PIPELINE_STATISTICS>(), 8); + assert_eq!(size_of::<D3D11_QUERY_DATA_SO_STATISTICS>(), 16); + assert_eq!(align_of::<D3D11_QUERY_DATA_SO_STATISTICS>(), 8); + assert_eq!(size_of::<D3D11_COUNTER_DESC>(), 8); + assert_eq!(align_of::<D3D11_COUNTER_DESC>(), 4); + assert_eq!(size_of::<D3D11_COUNTER_INFO>(), 12); + assert_eq!(align_of::<D3D11_COUNTER_INFO>(), 4); + assert_eq!(size_of::<D3D11_CLASS_INSTANCE_DESC>(), 32); + assert_eq!(align_of::<D3D11_CLASS_INSTANCE_DESC>(), 4); + assert_eq!(size_of::<D3D11_FEATURE_DATA_THREADING>(), 8); + assert_eq!(align_of::<D3D11_FEATURE_DATA_THREADING>(), 4); + assert_eq!(size_of::<D3D11_FEATURE_DATA_DOUBLES>(), 4); + assert_eq!(align_of::<D3D11_FEATURE_DATA_DOUBLES>(), 4); + assert_eq!(size_of::<D3D11_FEATURE_DATA_FORMAT_SUPPORT>(), 8); + assert_eq!(align_of::<D3D11_FEATURE_DATA_FORMAT_SUPPORT>(), 4); + assert_eq!(size_of::<D3D11_FEATURE_DATA_FORMAT_SUPPORT2>(), 8); + assert_eq!(align_of::<D3D11_FEATURE_DATA_FORMAT_SUPPORT2>(), 4); + assert_eq!(size_of::<D3D11_FEATURE_DATA_D3D10_X_HARDWARE_OPTIONS>(), 4); + assert_eq!(align_of::<D3D11_FEATURE_DATA_D3D10_X_HARDWARE_OPTIONS>(), 4); + assert_eq!(size_of::<D3D11_FEATURE_DATA_D3D11_OPTIONS>(), 56); + assert_eq!(align_of::<D3D11_FEATURE_DATA_D3D11_OPTIONS>(), 4); + assert_eq!(size_of::<D3D11_FEATURE_DATA_ARCHITECTURE_INFO>(), 4); + assert_eq!(align_of::<D3D11_FEATURE_DATA_ARCHITECTURE_INFO>(), 4); + assert_eq!(size_of::<D3D11_FEATURE_DATA_D3D9_OPTIONS>(), 4); + assert_eq!(align_of::<D3D11_FEATURE_DATA_D3D9_OPTIONS>(), 4); + assert_eq!(size_of::<D3D11_FEATURE_DATA_D3D9_SHADOW_SUPPORT>(), 4); + assert_eq!(align_of::<D3D11_FEATURE_DATA_D3D9_SHADOW_SUPPORT>(), 4); + assert_eq!(size_of::<D3D11_FEATURE_DATA_SHADER_MIN_PRECISION_SUPPORT>(), 8); + assert_eq!(align_of::<D3D11_FEATURE_DATA_SHADER_MIN_PRECISION_SUPPORT>(), 4); + assert_eq!(size_of::<D3D11_FEATURE_DATA_D3D11_OPTIONS1>(), 16); + assert_eq!(align_of::<D3D11_FEATURE_DATA_D3D11_OPTIONS1>(), 4); + assert_eq!(size_of::<D3D11_FEATURE_DATA_D3D9_SIMPLE_INSTANCING_SUPPORT>(), 4); + assert_eq!(align_of::<D3D11_FEATURE_DATA_D3D9_SIMPLE_INSTANCING_SUPPORT>(), 4); + assert_eq!(size_of::<D3D11_FEATURE_DATA_MARKER_SUPPORT>(), 4); + assert_eq!(align_of::<D3D11_FEATURE_DATA_MARKER_SUPPORT>(), 4); + assert_eq!(size_of::<D3D11_FEATURE_DATA_D3D9_OPTIONS1>(), 16); + assert_eq!(align_of::<D3D11_FEATURE_DATA_D3D9_OPTIONS1>(), 4); + assert_eq!(size_of::<D3D11_FEATURE_DATA_D3D11_OPTIONS2>(), 32); + assert_eq!(align_of::<D3D11_FEATURE_DATA_D3D11_OPTIONS2>(), 4); + assert_eq!(size_of::<D3D11_FEATURE_DATA_D3D11_OPTIONS3>(), 4); + assert_eq!(align_of::<D3D11_FEATURE_DATA_D3D11_OPTIONS3>(), 4); + assert_eq!(size_of::<D3D11_FEATURE_DATA_GPU_VIRTUAL_ADDRESS_SUPPORT>(), 8); + assert_eq!(align_of::<D3D11_FEATURE_DATA_GPU_VIRTUAL_ADDRESS_SUPPORT>(), 4); + assert_eq!(size_of::<D3D11_VIDEO_DECODER_DESC>(), 28); + assert_eq!(align_of::<D3D11_VIDEO_DECODER_DESC>(), 4); + assert_eq!(size_of::<D3D11_VIDEO_DECODER_CONFIG>(), 100); + assert_eq!(align_of::<D3D11_VIDEO_DECODER_CONFIG>(), 4); + assert_eq!(size_of::<D3D11_AES_CTR_IV>(), 16); + assert_eq!(align_of::<D3D11_AES_CTR_IV>(), 8); + assert_eq!(size_of::<D3D11_ENCRYPTED_BLOCK_INFO>(), 12); + assert_eq!(align_of::<D3D11_ENCRYPTED_BLOCK_INFO>(), 4); + assert_eq!(size_of::<D3D11_VIDEO_DECODER_BUFFER_DESC>(), 64); + assert_eq!(align_of::<D3D11_VIDEO_DECODER_BUFFER_DESC>(), 4); + assert_eq!(size_of::<D3D11_VIDEO_DECODER_EXTENSION>(), 28); + assert_eq!(align_of::<D3D11_VIDEO_DECODER_EXTENSION>(), 4); + assert_eq!(size_of::<D3D11_VIDEO_PROCESSOR_CAPS>(), 36); + assert_eq!(align_of::<D3D11_VIDEO_PROCESSOR_CAPS>(), 4); + assert_eq!(size_of::<D3D11_VIDEO_PROCESSOR_RATE_CONVERSION_CAPS>(), 20); + assert_eq!(align_of::<D3D11_VIDEO_PROCESSOR_RATE_CONVERSION_CAPS>(), 4); + assert_eq!(size_of::<D3D11_VIDEO_CONTENT_PROTECTION_CAPS>(), 24); + assert_eq!(align_of::<D3D11_VIDEO_CONTENT_PROTECTION_CAPS>(), 8); + assert_eq!(size_of::<D3D11_VIDEO_PROCESSOR_CUSTOM_RATE>(), 20); + assert_eq!(align_of::<D3D11_VIDEO_PROCESSOR_CUSTOM_RATE>(), 4); + assert_eq!(size_of::<D3D11_VIDEO_PROCESSOR_FILTER_RANGE>(), 16); + assert_eq!(align_of::<D3D11_VIDEO_PROCESSOR_FILTER_RANGE>(), 4); + assert_eq!(size_of::<D3D11_VIDEO_PROCESSOR_CONTENT_DESC>(), 40); + assert_eq!(align_of::<D3D11_VIDEO_PROCESSOR_CONTENT_DESC>(), 4); + assert_eq!(size_of::<D3D11_VIDEO_COLOR_RGBA>(), 16); + assert_eq!(align_of::<D3D11_VIDEO_COLOR_RGBA>(), 4); + assert_eq!(size_of::<D3D11_VIDEO_COLOR_YCbCrA>(), 16); + assert_eq!(align_of::<D3D11_VIDEO_COLOR_YCbCrA>(), 4); + assert_eq!(size_of::<D3D11_VIDEO_COLOR>(), 16); + assert_eq!(align_of::<D3D11_VIDEO_COLOR>(), 4); + assert_eq!(size_of::<D3D11_VIDEO_PROCESSOR_COLOR_SPACE>(), 4); + assert_eq!(align_of::<D3D11_VIDEO_PROCESSOR_COLOR_SPACE>(), 4); + assert_eq!(size_of::<D3D11_VIDEO_PROCESSOR_STREAM>(), 44); + assert_eq!(align_of::<D3D11_VIDEO_PROCESSOR_STREAM>(), 4); + assert_eq!(size_of::<D3D11_OMAC>(), 16); + assert_eq!(align_of::<D3D11_OMAC>(), 1); + assert_eq!(size_of::<D3D11_AUTHENTICATED_QUERY_INPUT>(), 24); + assert_eq!(align_of::<D3D11_AUTHENTICATED_QUERY_INPUT>(), 4); + assert_eq!(size_of::<D3D11_AUTHENTICATED_QUERY_OUTPUT>(), 44); + assert_eq!(align_of::<D3D11_AUTHENTICATED_QUERY_OUTPUT>(), 4); + assert_eq!(size_of::<D3D11_AUTHENTICATED_PROTECTION_FLAGS>(), 4); + assert_eq!(align_of::<D3D11_AUTHENTICATED_PROTECTION_FLAGS>(), 4); + assert_eq!(size_of::<D3D11_AUTHENTICATED_QUERY_PROTECTION_OUTPUT>(), 48); + assert_eq!(align_of::<D3D11_AUTHENTICATED_QUERY_PROTECTION_OUTPUT>(), 4); + assert_eq!(size_of::<D3D11_AUTHENTICATED_QUERY_CHANNEL_TYPE_OUTPUT>(), 48); + assert_eq!(align_of::<D3D11_AUTHENTICATED_QUERY_CHANNEL_TYPE_OUTPUT>(), 4); + assert_eq!(size_of::<D3D11_AUTHENTICATED_QUERY_DEVICE_HANDLE_OUTPUT>(), 48); + assert_eq!(align_of::<D3D11_AUTHENTICATED_QUERY_DEVICE_HANDLE_OUTPUT>(), 4); + assert_eq!(size_of::<D3D11_AUTHENTICATED_QUERY_CRYPTO_SESSION_INPUT>(), 28); + assert_eq!(align_of::<D3D11_AUTHENTICATED_QUERY_CRYPTO_SESSION_INPUT>(), 4); + assert_eq!(size_of::<D3D11_AUTHENTICATED_QUERY_CRYPTO_SESSION_OUTPUT>(), 56); + assert_eq!(align_of::<D3D11_AUTHENTICATED_QUERY_CRYPTO_SESSION_OUTPUT>(), 4); + assert_eq!(size_of::<D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_COUNT_OUTPUT>(), 48); + assert_eq!(align_of::<D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_COUNT_OUTPUT>(), 4); + assert_eq!(size_of::<D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_INPUT>(), 28); + assert_eq!(align_of::<D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_INPUT>(), 4); + assert_eq!(size_of::<D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_OUTPUT>(), 56); + assert_eq!(align_of::<D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_OUTPUT>(), 4); + assert_eq!(size_of::<D3D11_AUTHENTICATED_QUERY_UNRESTRICTED_PROTECTED_SHARED_RESOURCE_COUNT_OUTPUT>(), 48); + assert_eq!(align_of::<D3D11_AUTHENTICATED_QUERY_UNRESTRICTED_PROTECTED_SHARED_RESOURCE_COUNT_OUTPUT>(), 4); + assert_eq!(size_of::<D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_COUNT_INPUT>(), 32); + assert_eq!(align_of::<D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_COUNT_INPUT>(), 4); + assert_eq!(size_of::<D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_COUNT_OUTPUT>(), 56); + assert_eq!(align_of::<D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_COUNT_OUTPUT>(), 4); + assert_eq!(size_of::<D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_INPUT>(), 36); + assert_eq!(align_of::<D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_INPUT>(), 4); + assert_eq!(size_of::<D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_OUTPUT>(), 64); + assert_eq!(align_of::<D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_OUTPUT>(), 8); + assert_eq!(size_of::<D3D11_AUTHENTICATED_QUERY_ACESSIBILITY_OUTPUT>(), 56); + assert_eq!(align_of::<D3D11_AUTHENTICATED_QUERY_ACESSIBILITY_OUTPUT>(), 4); + assert_eq!(size_of::<D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ENCRYPTION_GUID_COUNT_OUTPUT>(), 48); + assert_eq!(align_of::<D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ENCRYPTION_GUID_COUNT_OUTPUT>(), 4); + assert_eq!(size_of::<D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ENCRYPTION_GUID_INPUT>(), 28); + assert_eq!(align_of::<D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ENCRYPTION_GUID_INPUT>(), 4); + assert_eq!(size_of::<D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ENCRYPTION_GUID_OUTPUT>(), 64); + assert_eq!(align_of::<D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ENCRYPTION_GUID_OUTPUT>(), 4); + assert_eq!(size_of::<D3D11_AUTHENTICATED_QUERY_CURRENT_ACCESSIBILITY_ENCRYPTION_OUTPUT>(), 60); + assert_eq!(align_of::<D3D11_AUTHENTICATED_QUERY_CURRENT_ACCESSIBILITY_ENCRYPTION_OUTPUT>(), 4); + assert_eq!(size_of::<D3D11_AUTHENTICATED_CONFIGURE_INPUT>(), 40); + assert_eq!(align_of::<D3D11_AUTHENTICATED_CONFIGURE_INPUT>(), 4); + assert_eq!(size_of::<D3D11_AUTHENTICATED_CONFIGURE_OUTPUT>(), 44); + assert_eq!(align_of::<D3D11_AUTHENTICATED_CONFIGURE_OUTPUT>(), 4); + assert_eq!(size_of::<D3D11_AUTHENTICATED_CONFIGURE_INITIALIZE_INPUT>(), 48); + assert_eq!(align_of::<D3D11_AUTHENTICATED_CONFIGURE_INITIALIZE_INPUT>(), 4); + assert_eq!(size_of::<D3D11_AUTHENTICATED_CONFIGURE_PROTECTION_INPUT>(), 44); + assert_eq!(align_of::<D3D11_AUTHENTICATED_CONFIGURE_PROTECTION_INPUT>(), 4); + assert_eq!(size_of::<D3D11_AUTHENTICATED_CONFIGURE_CRYPTO_SESSION_INPUT>(), 52); + assert_eq!(align_of::<D3D11_AUTHENTICATED_CONFIGURE_CRYPTO_SESSION_INPUT>(), 4); + assert_eq!(size_of::<D3D11_AUTHENTICATED_CONFIGURE_SHARED_RESOURCE_INPUT>(), 52); + assert_eq!(align_of::<D3D11_AUTHENTICATED_CONFIGURE_SHARED_RESOURCE_INPUT>(), 4); + assert_eq!(size_of::<D3D11_AUTHENTICATED_CONFIGURE_ACCESSIBLE_ENCRYPTION_INPUT>(), 56); + assert_eq!(align_of::<D3D11_AUTHENTICATED_CONFIGURE_ACCESSIBLE_ENCRYPTION_INPUT>(), 4); + assert_eq!(size_of::<D3D11_TEX2D_VDOV>(), 4); + assert_eq!(align_of::<D3D11_TEX2D_VDOV>(), 4); + assert_eq!(size_of::<D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC>(), 24); + assert_eq!(align_of::<D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC>(), 4); + assert_eq!(size_of::<D3D11_TEX2D_VPIV>(), 8); + assert_eq!(align_of::<D3D11_TEX2D_VPIV>(), 4); + assert_eq!(size_of::<D3D11_VIDEO_PROCESSOR_INPUT_VIEW_DESC>(), 16); + assert_eq!(align_of::<D3D11_VIDEO_PROCESSOR_INPUT_VIEW_DESC>(), 4); + assert_eq!(size_of::<D3D11_TEX2D_VPOV>(), 4); + assert_eq!(align_of::<D3D11_TEX2D_VPOV>(), 4); + assert_eq!(size_of::<D3D11_TEX2D_ARRAY_VPOV>(), 12); + assert_eq!(align_of::<D3D11_TEX2D_ARRAY_VPOV>(), 4); + assert_eq!(size_of::<D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC>(), 16); + assert_eq!(align_of::<D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC>(), 4); +} +#[test] #[cfg(target_arch = "x86_64")] +fn d3d11() { + assert_eq!(size_of::<D3D11_INPUT_ELEMENT_DESC>(), 32); + assert_eq!(align_of::<D3D11_INPUT_ELEMENT_DESC>(), 8); + assert_eq!(size_of::<D3D11_SO_DECLARATION_ENTRY>(), 24); + assert_eq!(align_of::<D3D11_SO_DECLARATION_ENTRY>(), 8); + assert_eq!(size_of::<D3D11_VIEWPORT>(), 24); + assert_eq!(align_of::<D3D11_VIEWPORT>(), 4); + assert_eq!(size_of::<D3D11_DRAW_INSTANCED_INDIRECT_ARGS>(), 16); + assert_eq!(align_of::<D3D11_DRAW_INSTANCED_INDIRECT_ARGS>(), 4); + assert_eq!(size_of::<D3D11_DRAW_INDEXED_INSTANCED_INDIRECT_ARGS>(), 20); + assert_eq!(align_of::<D3D11_DRAW_INDEXED_INSTANCED_INDIRECT_ARGS>(), 4); + assert_eq!(size_of::<D3D11_BOX>(), 24); + assert_eq!(align_of::<D3D11_BOX>(), 4); + assert_eq!(size_of::<D3D11_DEPTH_STENCILOP_DESC>(), 16); + assert_eq!(align_of::<D3D11_DEPTH_STENCILOP_DESC>(), 4); + assert_eq!(size_of::<D3D11_DEPTH_STENCIL_DESC>(), 52); + assert_eq!(align_of::<D3D11_DEPTH_STENCIL_DESC>(), 4); + assert_eq!(size_of::<D3D11_RENDER_TARGET_BLEND_DESC>(), 32); + assert_eq!(align_of::<D3D11_RENDER_TARGET_BLEND_DESC>(), 4); + assert_eq!(size_of::<D3D11_BLEND_DESC>(), 264); + assert_eq!(align_of::<D3D11_BLEND_DESC>(), 4); + assert_eq!(size_of::<D3D11_RASTERIZER_DESC>(), 40); + assert_eq!(align_of::<D3D11_RASTERIZER_DESC>(), 4); + assert_eq!(size_of::<D3D11_SUBRESOURCE_DATA>(), 16); + assert_eq!(align_of::<D3D11_SUBRESOURCE_DATA>(), 8); + assert_eq!(size_of::<D3D11_MAPPED_SUBRESOURCE>(), 16); + assert_eq!(align_of::<D3D11_MAPPED_SUBRESOURCE>(), 8); + assert_eq!(size_of::<D3D11_BUFFER_DESC>(), 24); + assert_eq!(align_of::<D3D11_BUFFER_DESC>(), 4); + assert_eq!(size_of::<D3D11_TEXTURE1D_DESC>(), 32); + assert_eq!(align_of::<D3D11_TEXTURE1D_DESC>(), 4); + assert_eq!(size_of::<D3D11_TEXTURE2D_DESC>(), 44); + assert_eq!(align_of::<D3D11_TEXTURE2D_DESC>(), 4); + assert_eq!(size_of::<D3D11_TEXTURE3D_DESC>(), 36); + assert_eq!(align_of::<D3D11_TEXTURE3D_DESC>(), 4); + assert_eq!(size_of::<D3D11_BUFFER_SRV>(), 8); + assert_eq!(align_of::<D3D11_BUFFER_SRV>(), 4); + assert_eq!(size_of::<D3D11_BUFFEREX_SRV>(), 12); + assert_eq!(align_of::<D3D11_BUFFEREX_SRV>(), 4); + assert_eq!(size_of::<D3D11_TEX1D_SRV>(), 8); + assert_eq!(align_of::<D3D11_TEX1D_SRV>(), 4); + assert_eq!(size_of::<D3D11_TEX1D_ARRAY_SRV>(), 16); + assert_eq!(align_of::<D3D11_TEX1D_ARRAY_SRV>(), 4); + assert_eq!(size_of::<D3D11_TEX2D_SRV>(), 8); + assert_eq!(align_of::<D3D11_TEX2D_SRV>(), 4); + assert_eq!(size_of::<D3D11_TEX2D_ARRAY_SRV>(), 16); + assert_eq!(align_of::<D3D11_TEX2D_ARRAY_SRV>(), 4); + assert_eq!(size_of::<D3D11_TEX3D_SRV>(), 8); + assert_eq!(align_of::<D3D11_TEX3D_SRV>(), 4); + assert_eq!(size_of::<D3D11_TEXCUBE_SRV>(), 8); + assert_eq!(align_of::<D3D11_TEXCUBE_SRV>(), 4); + assert_eq!(size_of::<D3D11_TEXCUBE_ARRAY_SRV>(), 16); + assert_eq!(align_of::<D3D11_TEXCUBE_ARRAY_SRV>(), 4); + assert_eq!(size_of::<D3D11_TEX2DMS_SRV>(), 4); + assert_eq!(align_of::<D3D11_TEX2DMS_SRV>(), 4); + assert_eq!(size_of::<D3D11_TEX2DMS_ARRAY_SRV>(), 8); + assert_eq!(align_of::<D3D11_TEX2DMS_ARRAY_SRV>(), 4); + assert_eq!(size_of::<D3D11_SHADER_RESOURCE_VIEW_DESC>(), 24); + assert_eq!(align_of::<D3D11_SHADER_RESOURCE_VIEW_DESC>(), 4); + assert_eq!(size_of::<D3D11_BUFFER_RTV>(), 8); + assert_eq!(align_of::<D3D11_BUFFER_RTV>(), 4); + assert_eq!(size_of::<D3D11_TEX1D_RTV>(), 4); + assert_eq!(align_of::<D3D11_TEX1D_RTV>(), 4); + assert_eq!(size_of::<D3D11_TEX1D_ARRAY_RTV>(), 12); + assert_eq!(align_of::<D3D11_TEX1D_ARRAY_RTV>(), 4); + assert_eq!(size_of::<D3D11_TEX2D_RTV>(), 4); + assert_eq!(align_of::<D3D11_TEX2D_RTV>(), 4); + assert_eq!(size_of::<D3D11_TEX2DMS_RTV>(), 4); + assert_eq!(align_of::<D3D11_TEX2DMS_RTV>(), 4); + assert_eq!(size_of::<D3D11_TEX2D_ARRAY_RTV>(), 12); + assert_eq!(align_of::<D3D11_TEX2D_ARRAY_RTV>(), 4); + assert_eq!(size_of::<D3D11_TEX2DMS_ARRAY_RTV>(), 8); + assert_eq!(align_of::<D3D11_TEX2DMS_ARRAY_RTV>(), 4); + assert_eq!(size_of::<D3D11_TEX3D_RTV>(), 12); + assert_eq!(align_of::<D3D11_TEX3D_RTV>(), 4); + assert_eq!(size_of::<D3D11_RENDER_TARGET_VIEW_DESC>(), 20); + assert_eq!(align_of::<D3D11_RENDER_TARGET_VIEW_DESC>(), 4); + assert_eq!(size_of::<D3D11_TEX1D_DSV>(), 4); + assert_eq!(align_of::<D3D11_TEX1D_DSV>(), 4); + assert_eq!(size_of::<D3D11_TEX1D_ARRAY_DSV>(), 12); + assert_eq!(align_of::<D3D11_TEX1D_ARRAY_DSV>(), 4); + assert_eq!(size_of::<D3D11_TEX2D_DSV>(), 4); + assert_eq!(align_of::<D3D11_TEX2D_DSV>(), 4); + assert_eq!(size_of::<D3D11_TEX2D_ARRAY_DSV>(), 12); + assert_eq!(align_of::<D3D11_TEX2D_ARRAY_DSV>(), 4); + assert_eq!(size_of::<D3D11_TEX2DMS_DSV>(), 4); + assert_eq!(align_of::<D3D11_TEX2DMS_DSV>(), 4); + assert_eq!(size_of::<D3D11_TEX2DMS_ARRAY_DSV>(), 8); + assert_eq!(align_of::<D3D11_TEX2DMS_ARRAY_DSV>(), 4); + assert_eq!(size_of::<D3D11_DEPTH_STENCIL_VIEW_DESC>(), 24); + assert_eq!(align_of::<D3D11_DEPTH_STENCIL_VIEW_DESC>(), 4); + assert_eq!(size_of::<D3D11_BUFFER_UAV>(), 12); + assert_eq!(align_of::<D3D11_BUFFER_UAV>(), 4); + assert_eq!(size_of::<D3D11_TEX1D_UAV>(), 4); + assert_eq!(align_of::<D3D11_TEX1D_UAV>(), 4); + assert_eq!(size_of::<D3D11_TEX1D_ARRAY_UAV>(), 12); + assert_eq!(align_of::<D3D11_TEX1D_ARRAY_UAV>(), 4); + assert_eq!(size_of::<D3D11_TEX2D_UAV>(), 4); + assert_eq!(align_of::<D3D11_TEX2D_UAV>(), 4); + assert_eq!(size_of::<D3D11_TEX2D_ARRAY_UAV>(), 12); + assert_eq!(align_of::<D3D11_TEX2D_ARRAY_UAV>(), 4); + assert_eq!(size_of::<D3D11_TEX3D_UAV>(), 12); + assert_eq!(align_of::<D3D11_TEX3D_UAV>(), 4); + assert_eq!(size_of::<D3D11_UNORDERED_ACCESS_VIEW_DESC>(), 20); + assert_eq!(align_of::<D3D11_UNORDERED_ACCESS_VIEW_DESC>(), 4); + assert_eq!(size_of::<D3D11_SAMPLER_DESC>(), 52); + assert_eq!(align_of::<D3D11_SAMPLER_DESC>(), 4); + assert_eq!(size_of::<D3D11_QUERY_DESC>(), 8); + assert_eq!(align_of::<D3D11_QUERY_DESC>(), 4); + assert_eq!(size_of::<D3D11_QUERY_DATA_TIMESTAMP_DISJOINT>(), 16); + assert_eq!(align_of::<D3D11_QUERY_DATA_TIMESTAMP_DISJOINT>(), 8); + assert_eq!(size_of::<D3D11_QUERY_DATA_PIPELINE_STATISTICS>(), 88); + assert_eq!(align_of::<D3D11_QUERY_DATA_PIPELINE_STATISTICS>(), 8); + assert_eq!(size_of::<D3D11_QUERY_DATA_SO_STATISTICS>(), 16); + assert_eq!(align_of::<D3D11_QUERY_DATA_SO_STATISTICS>(), 8); + assert_eq!(size_of::<D3D11_COUNTER_DESC>(), 8); + assert_eq!(align_of::<D3D11_COUNTER_DESC>(), 4); + assert_eq!(size_of::<D3D11_COUNTER_INFO>(), 12); + assert_eq!(align_of::<D3D11_COUNTER_INFO>(), 4); + assert_eq!(size_of::<D3D11_CLASS_INSTANCE_DESC>(), 32); + assert_eq!(align_of::<D3D11_CLASS_INSTANCE_DESC>(), 4); + assert_eq!(size_of::<D3D11_FEATURE_DATA_THREADING>(), 8); + assert_eq!(align_of::<D3D11_FEATURE_DATA_THREADING>(), 4); + assert_eq!(size_of::<D3D11_FEATURE_DATA_DOUBLES>(), 4); + assert_eq!(align_of::<D3D11_FEATURE_DATA_DOUBLES>(), 4); + assert_eq!(size_of::<D3D11_FEATURE_DATA_FORMAT_SUPPORT>(), 8); + assert_eq!(align_of::<D3D11_FEATURE_DATA_FORMAT_SUPPORT>(), 4); + assert_eq!(size_of::<D3D11_FEATURE_DATA_FORMAT_SUPPORT2>(), 8); + assert_eq!(align_of::<D3D11_FEATURE_DATA_FORMAT_SUPPORT2>(), 4); + assert_eq!(size_of::<D3D11_FEATURE_DATA_D3D10_X_HARDWARE_OPTIONS>(), 4); + assert_eq!(align_of::<D3D11_FEATURE_DATA_D3D10_X_HARDWARE_OPTIONS>(), 4); + assert_eq!(size_of::<D3D11_FEATURE_DATA_D3D11_OPTIONS>(), 56); + assert_eq!(align_of::<D3D11_FEATURE_DATA_D3D11_OPTIONS>(), 4); + assert_eq!(size_of::<D3D11_FEATURE_DATA_ARCHITECTURE_INFO>(), 4); + assert_eq!(align_of::<D3D11_FEATURE_DATA_ARCHITECTURE_INFO>(), 4); + assert_eq!(size_of::<D3D11_FEATURE_DATA_D3D9_OPTIONS>(), 4); + assert_eq!(align_of::<D3D11_FEATURE_DATA_D3D9_OPTIONS>(), 4); + assert_eq!(size_of::<D3D11_FEATURE_DATA_D3D9_SHADOW_SUPPORT>(), 4); + assert_eq!(align_of::<D3D11_FEATURE_DATA_D3D9_SHADOW_SUPPORT>(), 4); + assert_eq!(size_of::<D3D11_FEATURE_DATA_SHADER_MIN_PRECISION_SUPPORT>(), 8); + assert_eq!(align_of::<D3D11_FEATURE_DATA_SHADER_MIN_PRECISION_SUPPORT>(), 4); + assert_eq!(size_of::<D3D11_FEATURE_DATA_D3D11_OPTIONS1>(), 16); + assert_eq!(align_of::<D3D11_FEATURE_DATA_D3D11_OPTIONS1>(), 4); + assert_eq!(size_of::<D3D11_FEATURE_DATA_D3D9_SIMPLE_INSTANCING_SUPPORT>(), 4); + assert_eq!(align_of::<D3D11_FEATURE_DATA_D3D9_SIMPLE_INSTANCING_SUPPORT>(), 4); + assert_eq!(size_of::<D3D11_FEATURE_DATA_MARKER_SUPPORT>(), 4); + assert_eq!(align_of::<D3D11_FEATURE_DATA_MARKER_SUPPORT>(), 4); + assert_eq!(size_of::<D3D11_FEATURE_DATA_D3D9_OPTIONS1>(), 16); + assert_eq!(align_of::<D3D11_FEATURE_DATA_D3D9_OPTIONS1>(), 4); + assert_eq!(size_of::<D3D11_FEATURE_DATA_D3D11_OPTIONS2>(), 32); + assert_eq!(align_of::<D3D11_FEATURE_DATA_D3D11_OPTIONS2>(), 4); + assert_eq!(size_of::<D3D11_FEATURE_DATA_D3D11_OPTIONS3>(), 4); + assert_eq!(align_of::<D3D11_FEATURE_DATA_D3D11_OPTIONS3>(), 4); + assert_eq!(size_of::<D3D11_FEATURE_DATA_GPU_VIRTUAL_ADDRESS_SUPPORT>(), 8); + assert_eq!(align_of::<D3D11_FEATURE_DATA_GPU_VIRTUAL_ADDRESS_SUPPORT>(), 4); + assert_eq!(size_of::<D3D11_VIDEO_DECODER_DESC>(), 28); + assert_eq!(align_of::<D3D11_VIDEO_DECODER_DESC>(), 4); + assert_eq!(size_of::<D3D11_VIDEO_DECODER_CONFIG>(), 100); + assert_eq!(align_of::<D3D11_VIDEO_DECODER_CONFIG>(), 4); + assert_eq!(size_of::<D3D11_AES_CTR_IV>(), 16); + assert_eq!(align_of::<D3D11_AES_CTR_IV>(), 8); + assert_eq!(size_of::<D3D11_ENCRYPTED_BLOCK_INFO>(), 12); + assert_eq!(align_of::<D3D11_ENCRYPTED_BLOCK_INFO>(), 4); + assert_eq!(size_of::<D3D11_VIDEO_DECODER_BUFFER_DESC>(), 72); + assert_eq!(align_of::<D3D11_VIDEO_DECODER_BUFFER_DESC>(), 8); + assert_eq!(size_of::<D3D11_VIDEO_DECODER_EXTENSION>(), 48); + assert_eq!(align_of::<D3D11_VIDEO_DECODER_EXTENSION>(), 8); + assert_eq!(size_of::<D3D11_VIDEO_PROCESSOR_CAPS>(), 36); + assert_eq!(align_of::<D3D11_VIDEO_PROCESSOR_CAPS>(), 4); + assert_eq!(size_of::<D3D11_VIDEO_PROCESSOR_RATE_CONVERSION_CAPS>(), 20); + assert_eq!(align_of::<D3D11_VIDEO_PROCESSOR_RATE_CONVERSION_CAPS>(), 4); + assert_eq!(size_of::<D3D11_VIDEO_CONTENT_PROTECTION_CAPS>(), 24); + assert_eq!(align_of::<D3D11_VIDEO_CONTENT_PROTECTION_CAPS>(), 8); + assert_eq!(size_of::<D3D11_VIDEO_PROCESSOR_CUSTOM_RATE>(), 20); + assert_eq!(align_of::<D3D11_VIDEO_PROCESSOR_CUSTOM_RATE>(), 4); + assert_eq!(size_of::<D3D11_VIDEO_PROCESSOR_FILTER_RANGE>(), 16); + assert_eq!(align_of::<D3D11_VIDEO_PROCESSOR_FILTER_RANGE>(), 4); + assert_eq!(size_of::<D3D11_VIDEO_PROCESSOR_CONTENT_DESC>(), 40); + assert_eq!(align_of::<D3D11_VIDEO_PROCESSOR_CONTENT_DESC>(), 4); + assert_eq!(size_of::<D3D11_VIDEO_COLOR_RGBA>(), 16); + assert_eq!(align_of::<D3D11_VIDEO_COLOR_RGBA>(), 4); + assert_eq!(size_of::<D3D11_VIDEO_COLOR_YCbCrA>(), 16); + assert_eq!(align_of::<D3D11_VIDEO_COLOR_YCbCrA>(), 4); + assert_eq!(size_of::<D3D11_VIDEO_COLOR>(), 16); + assert_eq!(align_of::<D3D11_VIDEO_COLOR>(), 4); + assert_eq!(size_of::<D3D11_VIDEO_PROCESSOR_COLOR_SPACE>(), 4); + assert_eq!(align_of::<D3D11_VIDEO_PROCESSOR_COLOR_SPACE>(), 4); + assert_eq!(size_of::<D3D11_VIDEO_PROCESSOR_STREAM>(), 72); + assert_eq!(align_of::<D3D11_VIDEO_PROCESSOR_STREAM>(), 8); + assert_eq!(size_of::<D3D11_OMAC>(), 16); + assert_eq!(align_of::<D3D11_OMAC>(), 1); + assert_eq!(size_of::<D3D11_AUTHENTICATED_QUERY_INPUT>(), 32); + assert_eq!(align_of::<D3D11_AUTHENTICATED_QUERY_INPUT>(), 8); + assert_eq!(size_of::<D3D11_AUTHENTICATED_QUERY_OUTPUT>(), 48); + assert_eq!(align_of::<D3D11_AUTHENTICATED_QUERY_OUTPUT>(), 8); + assert_eq!(size_of::<D3D11_AUTHENTICATED_PROTECTION_FLAGS>(), 4); + assert_eq!(align_of::<D3D11_AUTHENTICATED_PROTECTION_FLAGS>(), 4); + assert_eq!(size_of::<D3D11_AUTHENTICATED_QUERY_PROTECTION_OUTPUT>(), 56); + assert_eq!(align_of::<D3D11_AUTHENTICATED_QUERY_PROTECTION_OUTPUT>(), 8); + assert_eq!(size_of::<D3D11_AUTHENTICATED_QUERY_CHANNEL_TYPE_OUTPUT>(), 56); + assert_eq!(align_of::<D3D11_AUTHENTICATED_QUERY_CHANNEL_TYPE_OUTPUT>(), 8); + assert_eq!(size_of::<D3D11_AUTHENTICATED_QUERY_DEVICE_HANDLE_OUTPUT>(), 56); + assert_eq!(align_of::<D3D11_AUTHENTICATED_QUERY_DEVICE_HANDLE_OUTPUT>(), 8); + assert_eq!(size_of::<D3D11_AUTHENTICATED_QUERY_CRYPTO_SESSION_INPUT>(), 40); + assert_eq!(align_of::<D3D11_AUTHENTICATED_QUERY_CRYPTO_SESSION_INPUT>(), 8); + assert_eq!(size_of::<D3D11_AUTHENTICATED_QUERY_CRYPTO_SESSION_OUTPUT>(), 72); + assert_eq!(align_of::<D3D11_AUTHENTICATED_QUERY_CRYPTO_SESSION_OUTPUT>(), 8); + assert_eq!(size_of::<D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_COUNT_OUTPUT>(), 56); + assert_eq!(align_of::<D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_COUNT_OUTPUT>(), 8); + assert_eq!(size_of::<D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_INPUT>(), 40); + assert_eq!(align_of::<D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_INPUT>(), 8); + assert_eq!(size_of::<D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_OUTPUT>(), 64); + assert_eq!(align_of::<D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_OUTPUT>(), 8); + assert_eq!(size_of::<D3D11_AUTHENTICATED_QUERY_UNRESTRICTED_PROTECTED_SHARED_RESOURCE_COUNT_OUTPUT>(), 56); + assert_eq!(align_of::<D3D11_AUTHENTICATED_QUERY_UNRESTRICTED_PROTECTED_SHARED_RESOURCE_COUNT_OUTPUT>(), 8); + assert_eq!(size_of::<D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_COUNT_INPUT>(), 48); + assert_eq!(align_of::<D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_COUNT_INPUT>(), 8); + assert_eq!(size_of::<D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_COUNT_OUTPUT>(), 72); + assert_eq!(align_of::<D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_COUNT_OUTPUT>(), 8); + assert_eq!(size_of::<D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_INPUT>(), 56); + assert_eq!(align_of::<D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_INPUT>(), 8); + assert_eq!(size_of::<D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_OUTPUT>(), 80); + assert_eq!(align_of::<D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_OUTPUT>(), 8); + assert_eq!(size_of::<D3D11_AUTHENTICATED_QUERY_ACESSIBILITY_OUTPUT>(), 64); + assert_eq!(align_of::<D3D11_AUTHENTICATED_QUERY_ACESSIBILITY_OUTPUT>(), 8); + assert_eq!(size_of::<D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ENCRYPTION_GUID_COUNT_OUTPUT>(), 56); + assert_eq!(align_of::<D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ENCRYPTION_GUID_COUNT_OUTPUT>(), 8); + assert_eq!(size_of::<D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ENCRYPTION_GUID_INPUT>(), 40); + assert_eq!(align_of::<D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ENCRYPTION_GUID_INPUT>(), 8); + assert_eq!(size_of::<D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ENCRYPTION_GUID_OUTPUT>(), 72); + assert_eq!(align_of::<D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ENCRYPTION_GUID_OUTPUT>(), 8); + assert_eq!(size_of::<D3D11_AUTHENTICATED_QUERY_CURRENT_ACCESSIBILITY_ENCRYPTION_OUTPUT>(), 64); + assert_eq!(align_of::<D3D11_AUTHENTICATED_QUERY_CURRENT_ACCESSIBILITY_ENCRYPTION_OUTPUT>(), 8); + assert_eq!(size_of::<D3D11_AUTHENTICATED_CONFIGURE_INPUT>(), 48); + assert_eq!(align_of::<D3D11_AUTHENTICATED_CONFIGURE_INPUT>(), 8); + assert_eq!(size_of::<D3D11_AUTHENTICATED_CONFIGURE_OUTPUT>(), 48); + assert_eq!(align_of::<D3D11_AUTHENTICATED_CONFIGURE_OUTPUT>(), 8); + assert_eq!(size_of::<D3D11_AUTHENTICATED_CONFIGURE_INITIALIZE_INPUT>(), 56); + assert_eq!(align_of::<D3D11_AUTHENTICATED_CONFIGURE_INITIALIZE_INPUT>(), 8); + assert_eq!(size_of::<D3D11_AUTHENTICATED_CONFIGURE_PROTECTION_INPUT>(), 56); + assert_eq!(align_of::<D3D11_AUTHENTICATED_CONFIGURE_PROTECTION_INPUT>(), 8); + assert_eq!(size_of::<D3D11_AUTHENTICATED_CONFIGURE_CRYPTO_SESSION_INPUT>(), 72); + assert_eq!(align_of::<D3D11_AUTHENTICATED_CONFIGURE_CRYPTO_SESSION_INPUT>(), 8); + assert_eq!(size_of::<D3D11_AUTHENTICATED_CONFIGURE_SHARED_RESOURCE_INPUT>(), 72); + assert_eq!(align_of::<D3D11_AUTHENTICATED_CONFIGURE_SHARED_RESOURCE_INPUT>(), 8); + assert_eq!(size_of::<D3D11_AUTHENTICATED_CONFIGURE_ACCESSIBLE_ENCRYPTION_INPUT>(), 64); + assert_eq!(align_of::<D3D11_AUTHENTICATED_CONFIGURE_ACCESSIBLE_ENCRYPTION_INPUT>(), 8); + assert_eq!(size_of::<D3D11_TEX2D_VDOV>(), 4); + assert_eq!(align_of::<D3D11_TEX2D_VDOV>(), 4); + assert_eq!(size_of::<D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC>(), 24); + assert_eq!(align_of::<D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC>(), 4); + assert_eq!(size_of::<D3D11_TEX2D_VPIV>(), 8); + assert_eq!(align_of::<D3D11_TEX2D_VPIV>(), 4); + assert_eq!(size_of::<D3D11_VIDEO_PROCESSOR_INPUT_VIEW_DESC>(), 16); + assert_eq!(align_of::<D3D11_VIDEO_PROCESSOR_INPUT_VIEW_DESC>(), 4); + assert_eq!(size_of::<D3D11_TEX2D_VPOV>(), 4); + assert_eq!(align_of::<D3D11_TEX2D_VPOV>(), 4); + assert_eq!(size_of::<D3D11_TEX2D_ARRAY_VPOV>(), 12); + assert_eq!(align_of::<D3D11_TEX2D_ARRAY_VPOV>(), 4); + assert_eq!(size_of::<D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC>(), 16); + assert_eq!(align_of::<D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC>(), 4); +} +#[test] #[cfg(target_arch = "i686")] +fn hidclass() { + assert_eq!(size_of::<HID_XFER_PACKET>(), 12); + assert_eq!(align_of::<HID_XFER_PACKET>(), 4); + assert_eq!(size_of::<HID_COLLECTION_INFORMATION>(), 12); + assert_eq!(align_of::<HID_COLLECTION_INFORMATION>(), 4); + assert_eq!(size_of::<HID_DRIVER_CONFIG>(), 8); + assert_eq!(align_of::<HID_DRIVER_CONFIG>(), 4); +} +#[test] #[cfg(target_arch = "x86_64")] +fn hidclass() { + assert_eq!(size_of::<HID_XFER_PACKET>(), 16); + assert_eq!(align_of::<HID_XFER_PACKET>(), 8); + assert_eq!(size_of::<HID_COLLECTION_INFORMATION>(), 12); + assert_eq!(align_of::<HID_COLLECTION_INFORMATION>(), 4); + assert_eq!(size_of::<HID_DRIVER_CONFIG>(), 8); + assert_eq!(align_of::<HID_DRIVER_CONFIG>(), 4); +} +#[test] #[cfg(target_arch = "i686")] +fn hidpi() { + assert_eq!(size_of::<USAGE_AND_PAGE>(), 4); + assert_eq!(align_of::<USAGE_AND_PAGE>(), 2); + assert_eq!(size_of::<HIDP_BUTTON_CAPS>(), 72); + assert_eq!(align_of::<HIDP_BUTTON_CAPS>(), 4); + assert_eq!(size_of::<HIDP_VALUE_CAPS>(), 72); + assert_eq!(align_of::<HIDP_VALUE_CAPS>(), 4); + assert_eq!(size_of::<HIDP_LINK_COLLECTION_NODE>(), 20); + assert_eq!(align_of::<HIDP_LINK_COLLECTION_NODE>(), 4); + assert_eq!(size_of::<HIDP_CAPS>(), 64); + assert_eq!(align_of::<HIDP_CAPS>(), 2); + assert_eq!(size_of::<HIDP_DATA>(), 8); + assert_eq!(align_of::<HIDP_DATA>(), 4); + assert_eq!(size_of::<HIDP_UNKNOWN_TOKEN>(), 8); + assert_eq!(align_of::<HIDP_UNKNOWN_TOKEN>(), 4); + assert_eq!(size_of::<HIDP_EXTENDED_ATTRIBUTES>(), 12); + assert_eq!(align_of::<HIDP_EXTENDED_ATTRIBUTES>(), 4); + assert_eq!(size_of::<HIDP_KEYBOARD_MODIFIER_STATE>(), 4); + assert_eq!(align_of::<HIDP_KEYBOARD_MODIFIER_STATE>(), 4); +} +#[test] #[cfg(target_arch = "x86_64")] +fn hidpi() { + assert_eq!(size_of::<USAGE_AND_PAGE>(), 4); + assert_eq!(align_of::<USAGE_AND_PAGE>(), 2); + assert_eq!(size_of::<HIDP_BUTTON_CAPS>(), 72); + assert_eq!(align_of::<HIDP_BUTTON_CAPS>(), 4); + assert_eq!(size_of::<HIDP_VALUE_CAPS>(), 72); + assert_eq!(align_of::<HIDP_VALUE_CAPS>(), 4); + assert_eq!(size_of::<HIDP_LINK_COLLECTION_NODE>(), 24); + // assert_eq!(align_of::<HIDP_LINK_COLLECTION_NODE>(), 4); // FIXME + assert_eq!(size_of::<HIDP_CAPS>(), 64); + assert_eq!(align_of::<HIDP_CAPS>(), 2); + assert_eq!(size_of::<HIDP_DATA>(), 8); + assert_eq!(align_of::<HIDP_DATA>(), 4); + assert_eq!(size_of::<HIDP_UNKNOWN_TOKEN>(), 8); + assert_eq!(align_of::<HIDP_UNKNOWN_TOKEN>(), 4); + // assert_eq!(size_of::<HIDP_EXTENDED_ATTRIBUTES>(), 16); // FIXME + // assert_eq!(align_of::<HIDP_EXTENDED_ATTRIBUTES>(), 4); // FIXME + assert_eq!(size_of::<HIDP_KEYBOARD_MODIFIER_STATE>(), 4); + assert_eq!(align_of::<HIDP_KEYBOARD_MODIFIER_STATE>(), 4); +} +#[test] #[cfg(target_arch = "i686")] +fn hidsdi() { + assert_eq!(size_of::<HIDD_CONFIGURATION>(), 12); + assert_eq!(align_of::<HIDD_CONFIGURATION>(), 4); + assert_eq!(size_of::<HIDD_ATTRIBUTES>(), 12); + assert_eq!(align_of::<HIDD_ATTRIBUTES>(), 4); +} +#[test] #[cfg(target_arch = "x86_64")] +fn hidsdi() { + assert_eq!(size_of::<HIDD_CONFIGURATION>(), 16); + // assert_eq!(align_of::<HIDD_CONFIGURATION>(), 4); // FIXME + assert_eq!(size_of::<HIDD_ATTRIBUTES>(), 12); + assert_eq!(align_of::<HIDD_ATTRIBUTES>(), 4); +} diff --git a/deps/winapi-0.2.5/tests/mpr.rs b/deps/winapi-0.2.6/tests/mpr.rs similarity index 100% rename from deps/winapi-0.2.5/tests/mpr.rs rename to deps/winapi-0.2.6/tests/mpr.rs diff --git a/deps/winapi-0.2.5/tests/netapi32.rs b/deps/winapi-0.2.6/tests/netapi32.rs similarity index 100% rename from deps/winapi-0.2.5/tests/netapi32.rs rename to deps/winapi-0.2.6/tests/netapi32.rs diff --git a/deps/winapi-0.2.5/tests/psapi.rs b/deps/winapi-0.2.6/tests/psapi.rs similarity index 100% rename from deps/winapi-0.2.5/tests/psapi.rs rename to deps/winapi-0.2.6/tests/psapi.rs diff --git a/deps/winapi-0.2.5/tests/setupapi.rs b/deps/winapi-0.2.6/tests/setupapi.rs similarity index 100% rename from deps/winapi-0.2.5/tests/setupapi.rs rename to deps/winapi-0.2.6/tests/setupapi.rs diff --git a/deps/winapi-0.2.5/tests/shell32.rs b/deps/winapi-0.2.6/tests/shell32.rs similarity index 100% rename from deps/winapi-0.2.5/tests/shell32.rs rename to deps/winapi-0.2.6/tests/shell32.rs diff --git a/deps/winapi-0.2.5/tests/user32.rs b/deps/winapi-0.2.6/tests/user32.rs similarity index 100% rename from deps/winapi-0.2.5/tests/user32.rs rename to deps/winapi-0.2.6/tests/user32.rs diff --git a/deps/winapi-0.2.5/tests/usp10.rs b/deps/winapi-0.2.6/tests/usp10.rs similarity index 100% rename from deps/winapi-0.2.5/tests/usp10.rs rename to deps/winapi-0.2.6/tests/usp10.rs diff --git a/deps/winapi-0.2.5/tests/uuid.rs b/deps/winapi-0.2.6/tests/uuid.rs similarity index 100% rename from deps/winapi-0.2.5/tests/uuid.rs rename to deps/winapi-0.2.6/tests/uuid.rs diff --git a/deps/winapi-0.2.5/tests/winhttp.rs b/deps/winapi-0.2.6/tests/winhttp.rs similarity index 100% rename from deps/winapi-0.2.5/tests/winhttp.rs rename to deps/winapi-0.2.6/tests/winhttp.rs diff --git a/deps/winapi-0.2.5/tests/winmm.rs b/deps/winapi-0.2.6/tests/winmm.rs similarity index 100% rename from deps/winapi-0.2.5/tests/winmm.rs rename to deps/winapi-0.2.6/tests/winmm.rs diff --git a/deps/winapi-0.2.5/tests/winscard.rs b/deps/winapi-0.2.6/tests/winscard.rs similarity index 100% rename from deps/winapi-0.2.5/tests/winscard.rs rename to deps/winapi-0.2.6/tests/winscard.rs diff --git a/deps/winapi-0.2.5/tests/winspool.rs b/deps/winapi-0.2.6/tests/winspool.rs similarity index 100% rename from deps/winapi-0.2.5/tests/winspool.rs rename to deps/winapi-0.2.6/tests/winspool.rs diff --git a/deps/winapi-0.2.5/tests/ws2_32.rs b/deps/winapi-0.2.6/tests/ws2_32.rs similarity index 100% rename from deps/winapi-0.2.5/tests/ws2_32.rs rename to deps/winapi-0.2.6/tests/ws2_32.rs diff --git a/deps/winapi-0.2.6/x86_64.tar b/deps/winapi-0.2.6/x86_64.tar new file mode 100644 index 0000000000000000000000000000000000000000..3608b837c86b31ff1a4f2dd01eb26c55433d8381 GIT binary patch literal 1291264 zcmeFa4RmD3bskvg8ByejqWCZBj{+%*q$q0C_-o8i6g?O;Far{pfzX&A$+9pH=!Zdb z8r@KLV`ji83a!XAttblPC|*U;I$lTXB#PrGj^kCdj-x1!<9L0tUayZfyX)ii`uKRg zK3?x`jyLh<c&)v+eqL3*s`sk;5rq7NdN|eHxOHE>S5@D;@7BFlx7w}sjb7Z`Z5@xu zYjsq|s@3V~X;NiJ>U(l}db~!)#;0o2<KyFFlQjbTW0TWlwE9}zkXr6;e-QQHmQ>my z`u)(;QEy}GnPcxC)sL~siHWh=$?+2>M@OqPOZ^-j9ji@FvNNt6gXS71<d&}za@z?) zZijy{-SJJ9?)n5FnC`8ybpIa^g6S>4#?srrMhK>NzQEGMPZNUakw0PSv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